Commit d3f38e87 authored by 沈翠玲's avatar 沈翠玲

无重码打印

parent c0bb5fa5
......@@ -73,9 +73,9 @@
prop="salesVoucherItem"
/>
<el-table-column label="LPN码" align="center" prop="lpnNo" />
<el-table-column label="on" align="center" prop="是否打印">
<el-table-column label="recordOn" align="center" prop="是否打印">
<template slot-scope="scope">
{{ scope.row.on ? '是' : '否' }}
{{ scope.row.recordOn ? '是' : '否' }}
</template>
</el-table-column>
<el-table-column label="创建人" align="center" prop="createBy" />
......@@ -148,17 +148,25 @@ export default {
},
methods: {
handleprint() {
const valueList = this.selectedRows.map((v) => {
return {
packagePrint: {
lpnNo: v.lpnNo,
},
}
})
postBatchPrintPdf('package-lpnV2', valueList).then(() => {
this.visible = false
this.getPackageList()
})
const rows = this.selectedRows.filter(v => v.recordOn)
const rowsOff = this.selectedRows.filter(v => !v.recordOn)
const lpnlist = rowsOff.map(v => v.lpnNo)
if (lpnlist.length > 0) {
this.$modal.msgWarning(lpnlist.join(',') + '无法打印')
}
if (rows.length > 0) {
const valueList = rows.map((v) => {
return {
packagePrint: {
lpnNo: v.lpnNo,
},
}
})
postBatchPrintPdf('package-lpnV2', valueList).then(() => {
this.visible = false
this.getPackageList()
})
}
},
onItemSelected(obj) {
if (obj != undefined && obj != null) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment