Browse Source

bom清单 校验 父子不能相同

master
陈薪名 11 months ago
parent
commit
9b294858a5
  1. 6
      src/views/wms/basicDataManage/itemManage/bom/index.vue

6
src/views/wms/basicDataManage/itemManage/bom/index.vue

@ -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'))

Loading…
Cancel
Save