diff --git a/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue b/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue index 4a264b745..952978a97 100644 --- a/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue +++ b/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue @@ -70,6 +70,7 @@ @searchTableSuccessDetail="searchTableSuccessDetail" :buttondataTable="buttondataTable" @tableFormButton="tableFormButton" + :detailValidate="detailValidate" /> @@ -124,6 +125,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as ItembasicApi from '@/api/wms/itembasic' import * as PackageApi from '@/api/wms/package' import { formatTime } from '@/utils/index' +import * as PurchaseDetailApi from "@/api/wms/purchaseDetail"; // 制品收货申请 defineOptions({ name: 'ProductreceiptRequestMain' }) @@ -554,6 +556,19 @@ const tableFormButton = async (val , row) => { } } +// 子表新增/编辑校验 +const detailValidate = (data) => { + let tag = false; + if(data.qty <= 0){ + message.warning('数量必须大于0') + tag = false; + return tag; + }else { + tag = true; + return tag; + } +} + /** 初始化 **/ onMounted(async () => { getList() diff --git a/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/productreceiptRequestMain.data.ts b/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/productreceiptRequestMain.data.ts index 47fa4bbbb..22fcce7ca 100644 --- a/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/productreceiptRequestMain.data.ts +++ b/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/productreceiptRequestMain.data.ts @@ -1022,9 +1022,6 @@ export const ProductreceiptRequestDetailRules = reactive({ workStationCode: [ { required: true, message: '请选择工位代码', trigger: 'change' } ], - qty:[ - { min: 0.000001, message: '数量不能为0', trigger: 'blur' } - ], uom: [ { required: true, message: '请选择计量单位', trigger: 'change' } ],