|
|
@ -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,21 @@ const submitFormLabel = async (formType, submitData) => { |
|
|
|
if(data.masterId){ |
|
|
|
data.id = data.masterId |
|
|
|
} |
|
|
|
let flag = true |
|
|
|
detatableData.tableList.forEach(item => { |
|
|
|
if(!item.supplierItemCode){ |
|
|
|
flag = false |
|
|
|
|
|
|
|
// 判断物料 可采购 可制造 |
|
|
|
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 => { |
|
|
|