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" /> +