|
|
@ -67,6 +67,7 @@ import TableHead from '@/components/TableHead/src/TableHead.vue' |
|
|
|
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' |
|
|
|
import Detail from '@/components/Detail/src/Detail.vue' |
|
|
|
|
|
|
|
// 物品清单 |
|
|
|
defineOptions({ name: 'Bom' }) |
|
|
|
|
|
|
|
const message = useMessage() // 消息弹窗 |
|
|
@ -148,6 +149,7 @@ const openForm = (type: string, row?: any) => { |
|
|
|
|
|
|
|
// form表单提交 |
|
|
|
const formsSuccess = async (formType,data) => { |
|
|
|
|
|
|
|
var isHave =Bom.allSchemas.formSchema.some(function (item) { |
|
|
|
return item.field === 'activeTime' || item.field === 'expireTime'; |
|
|
|
}); |
|
|
@ -159,6 +161,10 @@ const formsSuccess = async (formType,data) => { |
|
|
|
} |
|
|
|
if(data.activeTime==0)data.activeTime = null; |
|
|
|
if(data.expireTime==0)data.expireTime = null; |
|
|
|
if (data.productItemCode == data.componentItemCode) { |
|
|
|
message.error('父物品代码和子物品代码不能相同!') |
|
|
|
return |
|
|
|
} |
|
|
|
if (formType === 'create') { |
|
|
|
await BomApi.createBom(data) |
|
|
|
message.success(t('common.createSuccess')) |
|
|
|