diff --git a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue index 9bce5e57e..68b6e62ab 100644 --- a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue +++ b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue @@ -1062,7 +1062,7 @@ const labelPrint = async (row) => { // labelPrint(row) await UnplannedreceiptRequestDetailApi.getDetailList(row.masterId).then(async (res) => { if (res.length > 0) { - const itemType = res.some((item) => item.itemType == '可采购' && item.itemBasicType =='TOOL')//跳转协定品 + const itemType = res.some((item) => item.itemType == '可采购' && item.itemBasicType =='TOOL')//跳转协定品标签 const itemType2 = res.some((item) => item.itemType == '可采购' && item.itemBasicType !='TOOL') const itemType1 = res.some((item) => item.itemType == '可制造') if (itemType) { diff --git a/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue b/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue index 9994f33f7..8e0e6f734 100644 --- a/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue +++ b/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue @@ -979,14 +979,18 @@ const searchTableSuccessLabel = async (formField, searchField, val, formRef, typ return } // window.open(src.value + '&asn_number=' + val.map(item1=>item1.number).join(',')) -let array = []//存储可采购数据 + 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) @@ -1000,6 +1004,16 @@ let array = []//存储可采购数据 console.log(err) message.error('创建标签失败') }) + } + // 打印协定品采购件 + if (arrayTool.length>0) { + await PackageApi.getPrintingLableId({packingNumbers:arrayTool.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 => {