From eee8116587dfd606b847eaab041ad3475f5d1808 Mon Sep 17 00:00:00 2001 From: fangdawei <44673626@qq.com> Date: Thu, 18 Jan 2024 13:49:32 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E4=B8=8D=E4=B8=BA?= =?UTF-8?q?=E9=9B=B6=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../scrap/scrapRequestMain/index.vue | 31 +++++++++++++++++++ .../scrapRequestMain/scrapRequestMain.data.ts | 4 +-- .../transferissueRequestMain/index.vue | 31 +++++++++++++++++++ .../transferissueRequestMain.data.ts | 4 +-- .../unplannedissueRequestMain/index.vue | 31 +++++++++++++++++++ .../unplannedissueRequestMain.data.ts | 4 +-- .../unplannedreceiptRequestMain/index.vue | 31 +++++++++++++++++++ 7 files changed, 130 insertions(+), 6 deletions(-) diff --git a/src/views/wms/inventoryjobManage/scrap/scrapRequestMain/index.vue b/src/views/wms/inventoryjobManage/scrap/scrapRequestMain/index.vue index 0fa394c92..63c5920e5 100644 --- a/src/views/wms/inventoryjobManage/scrap/scrapRequestMain/index.vue +++ b/src/views/wms/inventoryjobManage/scrap/scrapRequestMain/index.vue @@ -69,6 +69,7 @@ :apiDelete="ScrapRequestDetailApi.deleteScrapRequestDetail" :Echo="Echo" @searchTableSuccessDetail="searchTableSuccessDetail" + :detailValidate="detailValidate" /> @@ -348,6 +349,23 @@ const submitForm = async (formType, data) => { data.subList = tableData.value // 拼接子表数据参数 try { if (formType === 'create') { + console.log("【报废出库子列表】",data.subList) + if(data.subList.length == 0){ + message.warning("请添加子列表数据") + return; + } + let flag = false; + data.subList.forEach((item) => { + if(item.qty == 0){ + message.warning("数量不能为0") + flag = true; + return; + } + }) + if(flag){ + formRef.value.formLoading = false + return + } await ScrapRequestMainApi.createScrapRequestMain(data) message.success(t('common.createSuccess')) } else { @@ -362,6 +380,19 @@ const submitForm = async (formType, data) => { } } +// 子表新增/编辑校验 +const detailValidate = (data) => { + let tag = false; + if(data.qty <= 0){ + message.warning('数量必须大于0') + tag = false; + return tag; + }else { + tag = true; + return tag; + } +} + /** 导入 */ const importFormRef = ref() const handleImport = () => { diff --git a/src/views/wms/inventoryjobManage/scrap/scrapRequestMain/scrapRequestMain.data.ts b/src/views/wms/inventoryjobManage/scrap/scrapRequestMain/scrapRequestMain.data.ts index f65ba9005..0f52150e6 100644 --- a/src/views/wms/inventoryjobManage/scrap/scrapRequestMain/scrapRequestMain.data.ts +++ b/src/views/wms/inventoryjobManage/scrap/scrapRequestMain/scrapRequestMain.data.ts @@ -514,13 +514,13 @@ export const ScrapRequestDetail = useCrudSchemas(reactive([ form: { component: 'InputNumber', componentProps: { - min: 1, + min: 0, precision: 6 } }, tableForm: { type: 'InputNumber', - min: 1, + min: 0, precision: 6 } }, diff --git a/src/views/wms/inventoryjobManage/transferissue/transferissueRequestMain/index.vue b/src/views/wms/inventoryjobManage/transferissue/transferissueRequestMain/index.vue index 99c6c7d38..68e979687 100644 --- a/src/views/wms/inventoryjobManage/transferissue/transferissueRequestMain/index.vue +++ b/src/views/wms/inventoryjobManage/transferissue/transferissueRequestMain/index.vue @@ -69,6 +69,7 @@ :apiDelete="TransferissueRequestDetailApi.deleteTransferissueRequestDetail" :Echo="Echo" @searchTableSuccessDetail="searchTableSuccessDetail" + :detailValidate="detailValidate" /> @@ -361,7 +362,24 @@ const handleDeleteTable = (item, index) => { const submitForm = async (formType, data) => { data.subList = tableData.value // 拼接子表数据参数 try { + console.log("【调拨出库子列表】",data.subList) if (formType === 'create') { + if(data.subList.length == 0){ + message.warning("请添加子列表数据") + return; + } + let flag = false; + data.subList.forEach((item) => { + if(item.qty == 0){ + message.warning("数量不能为0") + flag = true; + return; + } + }) + if(flag){ + formRef.value.formLoading = false + return + } await TransferissueRequestMainApi.createTransferissueRequestMain(data) message.success(t('common.createSuccess')) } else { @@ -376,6 +394,19 @@ const submitForm = async (formType, data) => { } } +// 子表新增/编辑校验 +const detailValidate = (data) => { + let tag = false; + if(data.qty <= 0){ + message.warning('数量必须大于0') + tag = false; + return tag; + }else { + tag = true; + return tag; + } +} + /** 导入 */ const importFormRef = ref() const handleImport = () => { diff --git a/src/views/wms/inventoryjobManage/transferissue/transferissueRequestMain/transferissueRequestMain.data.ts b/src/views/wms/inventoryjobManage/transferissue/transferissueRequestMain/transferissueRequestMain.data.ts index 8961091c2..cc3dbc662 100644 --- a/src/views/wms/inventoryjobManage/transferissue/transferissueRequestMain/transferissueRequestMain.data.ts +++ b/src/views/wms/inventoryjobManage/transferissue/transferissueRequestMain/transferissueRequestMain.data.ts @@ -634,13 +634,13 @@ export const TransferissueRequestDetail = useCrudSchemas(reactive( form: { component: 'InputNumber', componentProps: { - min: 1, + min: 0, precision: 6, } }, tableForm: { type: 'InputNumber', - min: 1, + min: 0, precision: 6, }, }, diff --git a/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/index.vue b/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/index.vue index ecdeb9952..ba0f20174 100644 --- a/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/index.vue +++ b/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/index.vue @@ -69,6 +69,7 @@ :apiDelete="UnplannedissueRequestDetailApi.deleteUnplannedissueRequestDetail" :Echo="Echo" @searchTableSuccessDetail="searchTableSuccessDetail" + :detailValidate="detailValidate" /> @@ -356,6 +357,23 @@ const submitForm = async (formType, data) => { data.subList = tableData.value // 拼接子表数据参数 try { if (formType === 'create') { + console.log("【计划外出库子列表】",data.subList) + if(data.subList.length == 0){ + message.warning("请添加子列表数据") + return; + } + let flag = false; + data.subList.forEach((item) => { + if(item.qty == 0){ + message.warning("数量不能为0") + flag = true; + return; + } + }) + if(flag){ + formRef.value.formLoading = false + return + } await UnplannedissueRequestMainApi.createUnplannedissueRequestMain(data) message.success(t('common.createSuccess')) } else { @@ -370,6 +388,19 @@ const submitForm = async (formType, data) => { } } +// 子表新增/编辑校验 +const detailValidate = (data) => { + let tag = false; + if(data.qty <= 0){ + message.warning('数量必须大于0') + tag = false; + return tag; + }else { + tag = true; + return tag; + } +} + /** 导入 */ const importFormRef = ref() const handleImport = () => { diff --git a/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/unplannedissueRequestMain.data.ts b/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/unplannedissueRequestMain.data.ts index e413e729d..1f562ed23 100644 --- a/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/unplannedissueRequestMain.data.ts +++ b/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/unplannedissueRequestMain.data.ts @@ -451,13 +451,13 @@ export const UnplannedissueRequestDetail = useCrudSchemas(reactive form: { component: 'InputNumber', componentProps: { - min: 1, + min: 0, precision: 6, } }, tableForm: { type: 'InputNumber', - min: 1, + min: 0, precision: 6, } }, diff --git a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue index f402d9928..c86c086a7 100644 --- a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue +++ b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue @@ -69,6 +69,7 @@ :apiDelete="UnplannedreceiptRequestDetailApi.deleteUnplannedreceiptRequestDetail" :Echo="Echo" @searchTableSuccessDetail="searchTableSuccessDetail" + :detailValidate="detailValidate" /> @@ -479,6 +480,23 @@ const submitForm = async (formType, data) => { data.subList = tableData.value // 拼接子表数据参数 try { if (formType === 'create') { + console.log("【计划外入库子列表】",data.subList) + if(data.subList.length == 0){ + message.warning("请添加子列表数据") + return; + } + let flag = false; + data.subList.forEach((item) => { + if(item.qty == 0){ + message.warning("数量不能为0") + flag = true; + return; + } + }) + if(flag){ + formRef.value.formLoading = false + return + } await UnplannedreceiptRequestMainApi.createUnplannedreceiptRequestMain(data) message.success(t('common.createSuccess')) } else { @@ -493,6 +511,19 @@ const submitForm = async (formType, data) => { } } +// 子表新增/编辑校验 +const detailValidate = (data) => { + let tag = false; + if(data.qty <= 0){ + message.warning('数量必须大于0') + tag = false; + return tag; + }else { + tag = true; + return tag; + } +} + /** 导入 */ const importFormRef = ref() const handleImport = () => { From 746000a22b0015e09a9ab46a5947ae83e50540d1 Mon Sep 17 00:00:00 2001 From: zhaoxuebing Date: Thu, 18 Jan 2024 14:13:26 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../unplannedreceiptRequestMain.data.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts index af25b3bec..5e8537215 100644 --- a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts +++ b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts @@ -513,13 +513,13 @@ export const UnplannedreceiptRequestDetail = useCrudSchemas(reactive Date: Thu, 18 Jan 2024 14:41:59 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=88=B6=E5=93=81?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E4=B8=BA=E5=B0=8F=E6=95=B0=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../productdismantleRequestMain/index.vue | 30 +++++++++++++++++++ .../productdismantleRequestMain.data.ts | 4 +-- .../productrepairRequestMain/index.vue | 30 +++++++++++++++++++ .../productrepairRequestMain.data.ts | 4 +-- .../productscrapRequestMain/index.vue | 30 +++++++++++++++++++ .../productscrapRequestMain.data.ts | 4 +-- 6 files changed, 96 insertions(+), 6 deletions(-) diff --git a/src/views/wms/productionManage/productdismantle/productdismantleRequestMain/index.vue b/src/views/wms/productionManage/productdismantle/productdismantleRequestMain/index.vue index 10f760c5c..0832f952b 100644 --- a/src/views/wms/productionManage/productdismantle/productdismantleRequestMain/index.vue +++ b/src/views/wms/productionManage/productdismantle/productdismantleRequestMain/index.vue @@ -71,6 +71,7 @@ @searchTableSuccessDetail="searchTableSuccessDetail" :buttondataTable="buttondataTable" @tableFormButton="tableFormButton" + :detailValidate="detailValidate" /> @@ -494,6 +495,22 @@ const submitForm = async (formType, data) => { } try { if (formType === 'create') { + if(data.subList.length == 0){ + message.warning("请添加子列表数据") + return; + } + let flag = false; + data.subList.forEach((item) => { + if(item.qty == 0){ + message.warning("数量不能为0") + flag = true; + return; + } + }) + if(flag){ + formRef.value.formLoading = false + return + } await ProductdismantleRequestMainApi.createProductdismantleRequestMain(data) message.success(t('common.createSuccess')) } else { @@ -508,6 +525,19 @@ const submitForm = async (formType, data) => { } } +// 子表新增/编辑校验 +const detailValidate = (data) => { + let tag = false; + if(data.qty <= 0){ + message.warning('数量必须大于0') + tag = false; + return tag; + }else { + tag = true; + return tag; + } +} + // 筛选提交 const searchFormClick = (searchData) => { tableObject.params = { diff --git a/src/views/wms/productionManage/productdismantle/productdismantleRequestMain/productdismantleRequestMain.data.ts b/src/views/wms/productionManage/productdismantle/productdismantleRequestMain/productdismantleRequestMain.data.ts index 36d710310..7f0e5a0ae 100644 --- a/src/views/wms/productionManage/productdismantle/productdismantleRequestMain/productdismantleRequestMain.data.ts +++ b/src/views/wms/productionManage/productdismantle/productdismantleRequestMain/productdismantleRequestMain.data.ts @@ -636,13 +636,13 @@ export const ProductdismantleRequestDetaila = useCrudSchemas(reactive @@ -531,6 +532,22 @@ const submitForm = async (formType, data) => { } try { if (formType === 'create') { + if(data.subList.length == 0){ + message.warning("请添加子列表数据") + return; + } + let flag = false; + data.subList.forEach((item) => { + if(item.qty == 0){ + message.warning("数量不能为0") + flag = true; + return; + } + }) + if(flag){ + formRef.value.formLoading = false + return + } await ProductrepairRequestMainApi.createProductrepairRequestMain(data) message.success(t('common.createSuccess')) } else { @@ -545,6 +562,19 @@ const submitForm = async (formType, data) => { } } +// 子表新增/编辑校验 +const detailValidate = (data) => { + let tag = false; + if(data.qty <= 0){ + message.warning('数量必须大于0') + tag = false; + return tag; + }else { + tag = true; + return tag; + } +} + /** 导入 */ const importFormRef = ref() const handleImport = () => { diff --git a/src/views/wms/productionManage/productrepair/productrepairRequestMain/productrepairRequestMain.data.ts b/src/views/wms/productionManage/productrepair/productrepairRequestMain/productrepairRequestMain.data.ts index 0b0a138be..1d2a61c59 100644 --- a/src/views/wms/productionManage/productrepair/productrepairRequestMain/productrepairRequestMain.data.ts +++ b/src/views/wms/productionManage/productrepair/productrepairRequestMain/productrepairRequestMain.data.ts @@ -820,13 +820,13 @@ export const ProductrepairRequestDetaila = useCrudSchemas(reactive form: { component: 'InputNumber', componentProps: { - min: 1, + min: 0, precision: 6 } }, tableForm: { type: 'InputNumber', - min: 1, + min: 0, precision: 6 } }, diff --git a/src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue b/src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue index 53abff31f..3e6fc1879 100644 --- a/src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue +++ b/src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue @@ -72,6 +72,7 @@ @searchTableSuccessDetail="searchTableSuccessDetail" :buttondataTable="buttondataTable" @tableFormButton="tableFormButton" + :detailValidate="detailValidate" /> @@ -532,6 +533,22 @@ const submitForm = async (formType, data) => { } try { if (formType === 'create') { + if(data.subList.length == 0){ + message.warning("请添加子列表数据") + return; + } + let flag = false; + data.subList.forEach((item) => { + if(item.qty == 0){ + message.warning("数量不能为0") + flag = true; + return; + } + }) + if(flag){ + formRef.value.formLoading = false + return + } await ProductscrapRequestMainApi.createProductscrapRequestMain(data) message.success(t('common.createSuccess')) } else { @@ -546,6 +563,19 @@ const submitForm = async (formType, data) => { } } +// 子表新增/编辑校验 +const detailValidate = (data) => { + let tag = false; + if(data.qty <= 0){ + message.warning('数量必须大于0') + tag = false; + return tag; + }else { + tag = true; + return tag; + } +} + /** 导入 */ const importFormRef = ref() const handleImport = () => { diff --git a/src/views/wms/productionManage/productscrap/productscrapRequestMain/productscrapRequestMain.data.ts b/src/views/wms/productionManage/productscrap/productscrapRequestMain/productscrapRequestMain.data.ts index d9f6f27f9..a35409adc 100644 --- a/src/views/wms/productionManage/productscrap/productscrapRequestMain/productscrapRequestMain.data.ts +++ b/src/views/wms/productionManage/productscrap/productscrapRequestMain/productscrapRequestMain.data.ts @@ -788,13 +788,13 @@ export const ProductscrapRequestDetail = useCrudSchemas(reactive([ form: { component: 'InputNumber', componentProps: { - min: 1, + min: 0, precision: 6 }, }, tableForm: { type: 'InputNumber', - min: 1, + min: 0, precision: 6 } }, From 2490e5d3b82e9e4397c105498e51e9f13967faaf Mon Sep 17 00:00:00 2001 From: zhaoxuebing Date: Thu, 18 Jan 2024 16:00:47 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../transferreceipt/transferreceiptRequestMain/index.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/src/views/wms/inventoryjobManage/transferreceipt/transferreceiptRequestMain/index.vue b/src/views/wms/inventoryjobManage/transferreceipt/transferreceiptRequestMain/index.vue index 59a15585d..f92d77491 100644 --- a/src/views/wms/inventoryjobManage/transferreceipt/transferreceiptRequestMain/index.vue +++ b/src/views/wms/inventoryjobManage/transferreceipt/transferreceiptRequestMain/index.vue @@ -69,6 +69,7 @@ :apiUpdate="TransferreceiptRequestDetailApi.updateTransferreceiptRequestDetail" :apiPage="TransferreceiptRequestDetailApi.getTransferreceiptRequestDetailPage" :apiDelete="TransferreceiptRequestDetailApi.deleteTransferreceiptRequestDetail" + :detailButtonIsShowAdd="false" :detailButtonIsShowEdit="false" :detailButtonIsShowDelete="false" />