Browse Source

制品拆解申请 bom信息提示

master
陈薪名 11 months ago
parent
commit
fbae9ee25c
  1. 27
      src/views/wms/productionManage/productdismantle/productdismantleRequestMain/index.vue

27
src/views/wms/productionManage/productdismantle/productdismantleRequestMain/index.vue

@ -434,14 +434,27 @@ const handleDeleteTable = (item, index) => {
//
const submitForm = async (formType, data) => {
data.subList = tableData.value //
try {
if (formType === 'create') {
await ProductdismantleRequestMainApi.createProductdismantleRequestMain(data)
message.success(t('common.createSuccess'))
} else {
await ProductdismantleRequestMainApi.updateProductdismantleRequestMain(data)
message.success(t('common.updateSuccess'))
// bom
let childListRs = true
//
tableData.value.forEach((item) => {
if (!item.childList) {
childListRs = false
}
})
if (!childListRs) {
message.warning('请填写Bom信息!')
formRef.value.dialogVisible = false
return
}
try {
if (formType === 'create') {
await ProductdismantleRequestMainApi.createProductdismantleRequestMain(data)
message.success(t('common.createSuccess'))
} else {
await ProductdismantleRequestMainApi.updateProductdismantleRequestMain(data)
message.success(t('common.updateSuccess'))
}
formRef.value.dialogVisible = false
//
getList()

Loading…
Cancel
Save