From bc1f22e0affa49132515d5a8906c047b69a67dc9 Mon Sep 17 00:00:00 2001 From: yufei_wang <2267742828@qq.com> Date: Mon, 16 Dec 2024 09:01:21 +0800 Subject: [PATCH] FWHL-127 --- .../productionreturnRequestMainNo/index.vue | 27 ++++++++++++------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/index.vue b/src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/index.vue index f08808159..ed50e9723 100644 --- a/src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/index.vue +++ b/src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/index.vue @@ -424,6 +424,8 @@ const butttondata = (row,$index) => { ] } +const enableMake = ref('') + // 列表-操作按钮事件 const buttonTableClick = async (val, row) => { if (val == 'mainClose') { // 关闭 @@ -515,6 +517,7 @@ const buttonTableClick = async (val, row) => { by: 'ASC', }).then(res => { if (res.list.length > 0) { + enableMake.value = res.list[0].enableMake // 判断物料 可采购 可制造 if (res.list[0].enableMake == "FALSE") { // 修改 tableform 属性 @@ -547,6 +550,7 @@ const buttonTableClick = async (val, row) => { }) } } else { + enableMake.value = '' message.warning('没有查询到物料代码:【' + item.itemCode + '】') return } @@ -724,17 +728,22 @@ const submitFormLabel = async (formType, submitData) => { if(data.masterId){ data.id = data.masterId } - let flag = true - detatableData.tableList.forEach(item => { - if(!item.supplierItemCode){ - flag = false + alert(enableMake.value) + + // 判断物料 可采购 可制造 + if (enableMake.value == "FALSE") { + + let flag = true + detatableData.tableList.forEach(item => { + if(!item.supplierItemCode){ + flag = false + } + }); + if(!flag){ + message.error('请填写供应商代码') + return } - }); - if(!flag){ - message.error('请填写供应商代码') - return } - try { detatableData.tableList.forEach(async (item) => { await PackageApi.createPackageLabel({...item,toLocationCode:item.fromLocationCode}).then(res => {