|
|
@ -1234,7 +1234,6 @@ const labelPrint = async (row) => { |
|
|
|
|
|
|
|
// 打印全部 |
|
|
|
const printAllClick = () => {} |
|
|
|
|
|
|
|
// 批量打印--供应商发货申请 |
|
|
|
const searchTableSuccess1 = async (formField, searchField, val, formRef, type, row) => { |
|
|
|
// let rows:any = [] |
|
|
@ -1245,31 +1244,23 @@ const searchTableSuccess1 = async (formField, searchField, val, formRef, type, r |
|
|
|
message.warning(t('ts.请先选择要打印的数据')) |
|
|
|
return |
|
|
|
} |
|
|
|
// window.open(src.value + '&asn_number=' + val.map(item1=>item1.number).join(',')) |
|
|
|
let array = []//存储可采购数据 |
|
|
|
let arrayTool = []//存储可采购协定品数据 |
|
|
|
let array1 = [] |
|
|
|
val.forEach((item,index) => { |
|
|
|
if (item.itemBasicType =='TOOL') { |
|
|
|
arrayTool.push(item) |
|
|
|
array1 = arrayTool |
|
|
|
} else { |
|
|
|
array.push(item) |
|
|
|
array1 = array |
|
|
|
array1.push(item) |
|
|
|
}) |
|
|
|
await PackageApi.batchPrintingLablesForYT(array1) |
|
|
|
.then(res => { |
|
|
|
if(res.xdpLabel){ |
|
|
|
//协定品标签 |
|
|
|
window.open(src1.value + '&asn_number=' + res.xdpLabel) |
|
|
|
} |
|
|
|
if (res.cgLabel) { |
|
|
|
//采购标签 |
|
|
|
window.open(src.value + '&asn_number=' + res.cgLabel) |
|
|
|
} |
|
|
|
}).catch(err => { |
|
|
|
message.error(t('ts.创建标签失败')) |
|
|
|
}) |
|
|
|
await PackageApi.batchPrintingLable(array1.map((item1) => item1.number).join(',')) |
|
|
|
.then((res) => { |
|
|
|
if (array.length > 0) { |
|
|
|
window.open(src.value + '&asn_number=' + res) |
|
|
|
} |
|
|
|
if (arrayTool.length > 0) { |
|
|
|
window.open(src1.value + '&asn_number=' + res) |
|
|
|
} |
|
|
|
}) |
|
|
|
.catch((err) => { |
|
|
|
message.error(t('ts.创建标签失败')) |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
const print = async () => { |
|
|
|