From c196d9733459a118e8d48e22a3564bf8562c7a70 Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Wed, 20 Nov 2024 10:58:37 +0800 Subject: [PATCH] =?UTF-8?q?YT-1093=E5=AE=A1=E6=89=B9=E4=B8=AD=E7=9A=84?= =?UTF-8?q?=E9=87=87=E8=B4=AD=E7=B4=A2=E8=B5=94=E7=94=B3=E8=AF=B7=E5=BA=94?= =?UTF-8?q?=E8=AF=A5=E5=8F=AA=E8=83=BD=E7=BC=96=E8=BE=91=E7=B4=A2=E8=B5=94?= =?UTF-8?q?=E9=87=91=E9=A2=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wms/purchaseClaimRequestDetail/index.ts | 12 ++--- src/components/Detail/src/Detail.vue | 24 +++++++++- .../PurchaseClaimRequestMain.data.ts | 16 +++++++ .../purchaseClaimRequest/index.vue | 48 +++++++++++++++++-- 4 files changed, 89 insertions(+), 11 deletions(-) diff --git a/src/api/wms/purchaseClaimRequestDetail/index.ts b/src/api/wms/purchaseClaimRequestDetail/index.ts index 807f97df5..0d4a45117 100644 --- a/src/api/wms/purchaseClaimRequestDetail/index.ts +++ b/src/api/wms/purchaseClaimRequestDetail/index.ts @@ -15,29 +15,29 @@ export const getPurchaseClaimRequestDetailList = async (supplierCode) => { } // 创建采购索赔子 export const createPurchaseClaimRequestDetail = async (data) => { - return await request.post({ url: `/wms/purchase-claim-request-detail/create`, data }) + return await request.post({ url: `/wms/purchaseClaim-request-detail/create`, data }) } // 修改采购索赔子 export const updatePurchaseClaimRequestDetail = async (data) => { - return await request.put({ url: `/wms/purchase-claim-request-detail/update`, data }) + return await request.put({ url: `/wms/purchaseClaim-request-detail/update`, data }) } // 删除采购索赔子 export const deletePurchaseClaimRequestDetail = async (id) => { - return await request.delete({ url: `/wms/purchase-claim-request-detail/delete?id=` + id }) + return await request.delete({ url: `/wms/purchaseClaim-request-detail/delete?id=` + id }) } // 获得采购索赔子 export const getPurchaseClaimRequestDetail = async (id) => { - return await request.get({ url: `/wms/purchase-claim-request-detail/get?id=` + id }) + return await request.get({ url: `/wms/purchaseClaim-request-detail/get?id=` + id }) } // 导出采购索赔子 Excel export const exportPurchaseClaimRequestDetailExcel = async (params) => { if (params.isSearch) { const data = {...params} - return await request.downloadPost({url: `/wms/purchase-claim-request-detail/export-excel-senior`, data}) + return await request.downloadPost({ url: `/wms/purchaseClaim-request-detail/export-excel-senior`, data}) } else { - return await request.download({ url: `/wms/purchase-claim-request-detail/export-excel`, params }) + return await request.download({ url: `/wms/purchaseClaim-request-detail/export-excel`, params }) } } diff --git a/src/components/Detail/src/Detail.vue b/src/components/Detail/src/Detail.vue index ba1ba9f05..f465845f0 100644 --- a/src/components/Detail/src/Detail.vue +++ b/src/components/Detail/src/Detail.vue @@ -476,6 +476,12 @@ const props = defineProps({ required: false, default: 8 }, + // 根据状态判断是否自定义子表弹窗 + isChangeDetailDrawer:{ + type:Array, + required: false, + default: () => [] + }, }) const allSchemas = ref(props.allSchemas) const detailAllSchemasRef = ref(props.detailAllSchemas) @@ -1015,9 +1021,23 @@ const buttonTableClick = async (val, row) => { } } /** 添加/修改操作 */ +// 根据状态返回判断详情是否显示自定义弹窗 +const isShowChangeDetailDrawer = (row, val) => { + if(!val || val &&val.length == 0) return false; + if (val.indexOf(row.status) > -1) { + return true + } else { + return false + } +} const openForm = async (type: string, row?: number) => { - formRef.value.open(type, row, masterParmas.value) - emit('detailOpenForm', type, row) + // 自定义弹框 + if (isShowChangeDetailDrawer(curRow.value,props.isChangeDetailDrawer)) { + emit('detailOpenForm', type, row, masterParmas.value) + }else{ + formRef.value.open(type, row, masterParmas.value) + emit('detailOpenForm', type, row) + } } // form 提交 const submitForm = async (formType, data) => { diff --git a/src/views/wms/supplierManage/purchaseClaim/purchaseClaimRequest/PurchaseClaimRequestMain.data.ts b/src/views/wms/supplierManage/purchaseClaim/purchaseClaimRequest/PurchaseClaimRequestMain.data.ts index 95be795cd..0d63b2516 100644 --- a/src/views/wms/supplierManage/purchaseClaim/purchaseClaimRequest/PurchaseClaimRequestMain.data.ts +++ b/src/views/wms/supplierManage/purchaseClaim/purchaseClaimRequest/PurchaseClaimRequestMain.data.ts @@ -344,3 +344,19 @@ export const PurchaseClaimRequestDetail = useCrudSchemas(reactive( isTableForm: false, } ])) +export const PurchaseClaimRequestAmount = useCrudSchemas(reactive([ + { + label: '索赔金额', + field: 'claimAmount', + sort: 'custom', + isSearch: false, + isTable: true, + table: { + }, + tableForm: { + type: 'InputNumber', + min: 0, + precision: 5 + } + }, +])) \ No newline at end of file diff --git a/src/views/wms/supplierManage/purchaseClaim/purchaseClaimRequest/index.vue b/src/views/wms/supplierManage/purchaseClaim/purchaseClaimRequest/index.vue index 57c23b3dc..f28284030 100644 --- a/src/views/wms/supplierManage/purchaseClaim/purchaseClaimRequest/index.vue +++ b/src/views/wms/supplierManage/purchaseClaim/purchaseClaimRequest/index.vue @@ -72,7 +72,7 @@ ref="detailRef" :isBasic="false" :allSchemas="PurchaseClaimRequestMain.allSchemas" - :detailAllSchemas="PurchaseClaimRequestDetail.allSchemas" + :detailAllSchemas="detailAllSchemas" :detailAllSchemasRules="PurchaseClaimRequestDetailRules" :apiCreate="PurchaseClaimRequestDetailApi.createPurchaseClaimRequestDetail" :apiUpdate="PurchaseClaimRequestDetailApi.updatePurchaseClaimRequestDetail" @@ -80,6 +80,9 @@ :apiDelete="PurchaseClaimRequestDetailApi.deletePurchaseClaimRequestDetail" :detailButtonIsShowDelete="false" :detailButtonIsShowAdd="false" + :detailButtonIsShowAddStatusArray="['1','2']" + :isChangeDetailDrawer="['2']" + @detailOpenForm="detailOpenForm" /> +