diff --git a/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue b/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue index ffe2c8c6f..eecbfbbe2 100644 --- a/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue +++ b/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 == '可采购') { - array.push(item) + 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)