From c55e9624bfc9a44aeb8a06d918c5e9e9e38d28a2 Mon Sep 17 00:00:00 2001 From: zhaoxuebing <1291173720@qq.com> Date: Mon, 15 Jan 2024 14:37:48 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E8=A6=81=E8=B4=A7=E8=AE=A1=E5=88=92?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Detail/src/Detail.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Detail/src/Detail.vue b/src/components/Detail/src/Detail.vue index c63305294..c3f9b9649 100644 --- a/src/components/Detail/src/Detail.vue +++ b/src/components/Detail/src/Detail.vue @@ -563,7 +563,7 @@ const openForm = async (type: string, row?: number) => { const submitForm = async (formType, data) => { try { // 子表新增编辑校验 如果业务需要子表提交校验 需在主页详情组件添加 detailValidate 参数及方法 - const rs = (await props.detailValidate) ? props.detailValidate(data) : true + const rs = (await props.detailValidate) ? await props.detailValidate(data) : true if (!rs) return if (formType === 'create') { await props.apiCreate(data) From 9bf053cb3c1bb99212a5f1d50fe32e54c68ad0ae Mon Sep 17 00:00:00 2001 From: zhaoxuebing <1291173720@qq.com> Date: Mon, 15 Jan 2024 14:38:09 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E8=A6=81=E8=B4=A7=E8=AE=A1=E5=88=92?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../purchasePlanMain/index.vue | 37 ++++++++++++++++--- 1 file changed, 31 insertions(+), 6 deletions(-) diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue b/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue index c52d7dae4..ec70f1d80 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue @@ -35,12 +35,17 @@ @searchTableSuccess="searchTableSuccess" @submitForm="submitForm" /> - @@ -55,6 +60,7 @@ import * as PurchasePlanDetailApi from '@/api/wms/purchasePlanDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as PurchaseDetailApi from '@/api/wms/purchaseDetail' + import {mainListPurchasePlanModBtn} from "@/utils/disposition/defaultButtons"; // 要货计划 defineOptions({ name: 'PurchasePlanMain' }) @@ -191,6 +197,7 @@ defaultButtons.mainListPurchasePlanAccBtn({ hide: isShowMainButton(row, ['3']) }), // 接受 defaultButtons.mainListPurchasePlanRejBtn({ hide: isShowMainButton(row, ['3']) }), // 不接受 defaultButtons.mainListPurchasePlanWitBtn({ hide: isShowMainButton(row, ['3']) }), // 下架 + defaultButtons.mainListPurchasePlanModBtn({ hide: isShowMainButton(row, ['5']) }), // 修改 // defaultButtons.mainListEditBtn({ hide: isShowMainButton(row, ['1']), hasPermi: 'wms:purchase-plan-main:update' }), // 编辑 // defaultButtons.mainListDeleteBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:purchase-plan-main:delete'}), // 删除 ] @@ -210,7 +217,9 @@ handleRej(row.id) } else if (val == 'mainPurPlanWit') { // 下架 handleWit(row.id) - } else if (val == 'edit') { // 编辑 + } else if(val == 'mainPurPlanMod'){ // 修改 + handleReOpen(row.id) + }else if (val == 'edit') { // 编辑 openForm('update', row) } else if (val == 'delete') { // 删除 handleDelete(row.id) @@ -269,6 +278,20 @@ } catch { } } + + /** 打开按钮操作 */ + const handleReOpen = async (id : number) => { + try { + // 打开的二次确认 + await message.confirm('是否重新打开所选中数据?') + // 发起打开 + await PurchasePlanMainApi.openPurchasePlanMain(id) + message.success(t('打开成功!')) + // 刷新列表 + await getList() + } catch { } + } + /** 发布按钮操作 */ const handlePublish = async (id : number) => { try { @@ -391,9 +414,9 @@ } // 子表新增/编辑校验 - const detailValidate = (data) => { + const detailValidate = async (data) => { let tag = false - PurchaseDetailApi.getPurchaseDetailPage({ + await PurchaseDetailApi.getPurchaseDetailPage({ number: data.poNumber, lineNumber: data.poLine }).then(res => { @@ -403,6 +426,8 @@ } else { tag = true } + }).catch(err =>{ + console.log(err); }) return tag } From dacd3dc4e947864c531ead2bf7c6d493d3a20afb Mon Sep 17 00:00:00 2001 From: chenfang Date: Mon, 15 Jan 2024 15:02:20 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../supplierdeliverRequestMain/index.vue | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue index db8b7319c..fadac4a11 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue @@ -334,8 +334,20 @@ const openForm = async (type: string, row?: number) => { } }) }else { - item.componentProps.isSearchList = true - item.componentProps.disabled = true + SupplierdeliverRequestMain.allSchemas.formSchema.forEach((item) => { + if(item.field == 'supplierCode'){ + item.componentProps.isSearchList = true + } + if(item.field == 'ppNumber'){ + item.componentProps.isSearchList = true + } + if(item.field == 'asnNumber'){ + item.componentProps.disabled = false + } + if(item.field == 'planArriveTime'){ + item.componentProps.disabled = false + } + }) } tableData.value = [] // 重置明细数据 formRef.value.open(type, row)