Browse Source

生产退料打印标签

intex_online20241216
张立 2 months ago
parent
commit
6c5242adea
  1. 18
      src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue

18
src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue

@ -708,18 +708,26 @@ const searchTableSuccess1 = async (formField, searchField, val, formRef, type, r
try {
// window.open(src.value + '&asn_number=' + val.map(item1=>item1.number).join(','))
let array = []//
let arrayTool = []//
let array1 = []//
let packingNumbers = []
val.forEach((item,index) => {
packingNumbers.push(item.number)
if (item.itemType == '可采购') {
if (item.itemBasicType =='TOOL') {
arrayTool.push(item)
} else {
array.push(item)
}
}
if (item.itemType == '可制造') {
array1.push(item)
}
})
console.log(arrayTool)
console.log(array)
//
if (array.length>0) {
await PackageApi.getPrintingLableId({packingNumbers:array.map(item1=>item1.number)}).then(res => {
console.log(res)
@ -729,6 +737,16 @@ const searchTableSuccess1 = async (formField, searchField, val, formRef, type, r
message.error('创建标签失败')
})
}
//
if (arrayTool.length>0) {
await PackageApi.getPrintingLableId({packingNumbers:array.map(item1=>item1.number)}).then(res => {
console.log(res)
window.open(BASE_URL + '/jmreport/view/1028102732077142016?token=' + getAccessToken()+'&id=' + res)
}).catch(err => {
console.log(err)
message.error('创建标签失败')
})
}
if (array1.length > 0) {
await PackageApi.batchPrintingLable(array1.map(item1=>item1.number).join(',')).then(res => {
console.log(res)

Loading…
Cancel
Save