src/views/officeProcessAutomation/ApproveManage/approve-list/components/ApproveDetailPanel.vue
@@ -126,7 +126,7 @@ </span> </el-descriptions-item> </el-descriptions> <div v-if="detailData.products.length" style="margin-top: 20px;"> <div v-if="detailData.products?.length" style="margin-top: 20px;"> <h4>产品明细</h4> <el-table :data="detailData.products" border src/views/officeProcessAutomation/ApproveManage/approve-list/index.vue
@@ -370,6 +370,9 @@ detailDialog, detailRow, detailData, quotationLoading, purchaseLoading, deliveryLoading, reimburseDialog, approveDialog, approveOpinion, src/views/officeProcessAutomation/ApproveManage/approve-list/useApproveList.js
@@ -86,6 +86,11 @@ const approveOpinion = ref(""); const approveSubmitting = ref(false); /** 报价/采购/发货详情加载状态 */ const quotationLoading = ref(false); const purchaseLoading = ref(false); const deliveryLoading = ref(false); /** 差旅/费用报销专用详情、审批弹窗 */ const reimburseDialog = reactive({ visible: false, @@ -294,31 +299,53 @@ } detailRow.value = { ...row }; const bizType = Number(row.businessType); // 报价审批:用审批事由字段承载的"报价单号"去查报价列表 if (row.businessType === 6) { if (bizType === 6) { const quotationNo = row?.quotationNo; if (quotationNo) { quotationLoading.value = true; try { const res = await getQuotationList({ quotationNo }); const records = res?.data?.records || []; detailData.value = records[0] || {}; } finally { quotationLoading.value = false; } } else { detailData.value = {}; } } // 采购审批:用审批事由字段承载的"采购合同号"去查采购详情 else if (row.businessType === 5) { else if (bizType === 5) { const purchaseContractNumber = row?.purchaseContractNumber; if (purchaseContractNumber) { purchaseLoading.value = true; try { const res = await getPurchaseByCode({ purchaseContractNumber }); detailData.value = res || {}; } finally { purchaseLoading.value = false; } } else { detailData.value = {}; } } // 发货审批:用审批事由字段承载的"发货单号"去查发货详情 else if (row.businessType === 7) { else if (bizType === 7) { const shippingNo = row?.shippingNo; if (shippingNo) { deliveryLoading.value = true; try { const res = await getDeliveryDetailByShippingNo({ shippingNo }); detailData.value = res?.data || res || {}; } finally { deliveryLoading.value = false; } } else { detailData.value = {}; } } @@ -339,31 +366,53 @@ } approveDialog.row = { ...row }; approveOpinion.value = ""; const bizType = Number(row.businessType); // 报价审批:用审批事由字段承载的"报价单号"去查报价列表 if (row.businessType === 6) { if (bizType === 6) { const quotationNo = row?.quotationNo; if (quotationNo) { quotationLoading.value = true; try { const res = await getQuotationList({ quotationNo }); const records = res?.data?.records || []; detailData.value = records[0] || {}; } finally { quotationLoading.value = false; } } else { detailData.value = {}; } } // 采购审批:用审批事由字段承载的"采购合同号"去查采购详情 else if (row.businessType === 5) { else if (bizType === 5) { const purchaseContractNumber = row?.purchaseContractNumber; if (purchaseContractNumber) { purchaseLoading.value = true; try { const res = await getPurchaseByCode({ purchaseContractNumber }); detailData.value = res || {}; } finally { purchaseLoading.value = false; } } else { detailData.value = {}; } } // 发货审批:用审批事由字段承载的"发货单号"去查发货详情 else if (row.businessType === 7) { else if (bizType === 7) { const shippingNo = row?.shippingNo; if (shippingNo) { deliveryLoading.value = true; try { const res = await getDeliveryDetailByShippingNo({ shippingNo }); detailData.value = res?.data || res || {}; } finally { deliveryLoading.value = false; } } else { detailData.value = {}; } } @@ -658,6 +707,9 @@ detailDialog, detailRow, detailData, quotationLoading, purchaseLoading, deliveryLoading, reimburseDialog, approveDialog, approveOpinion, src/views/procurementManagement/procurementLedger/index.vue
@@ -271,8 +271,7 @@ <template #default="scope"> <el-button link type="primary" @click="openForm('edit', scope.row)" :disabled="scope.row.stockInStatus === '完全入库'">编辑 @click="openForm('edit', scope.row)">编辑 </el-button> <el-button link type="primary" src/views/salesManagement/salesQuotation/index.vue
@@ -70,7 +70,7 @@ </el-table-column> <el-table-column label="操作" width="200" fixed="right" align="center"> <template #default="scope"> <el-button link type="primary" @click="handleEdit(scope.row)" :disabled="!['待审批','拒绝'].includes(scope.row.status)">编辑</el-button> <el-button link type="primary" @click="handleEdit(scope.row)">编辑</el-button> <el-button link type="primary" @click="handleView(scope.row)" style="color: #67C23A">查看</el-button> <el-button link type="danger" @click="handleDelete(scope.row)">删除</el-button> </template> @@ -338,9 +338,6 @@ products: [], subtotal: 0, freight: 0, otherFee: 0, discountRate: 0, discountAmount: 0, totalAmount: 0 }) @@ -595,10 +592,6 @@ } })) : [] form.subtotal = row.subtotal || 0 form.freight = row.freight || 0 form.otherFee = row.otherFee || 0 form.discountRate = row.discountRate || 0 form.discountAmount = row.discountAmount || 0 form.totalAmount = row.totalAmount || 0 dialogVisible.value = true @@ -639,8 +632,6 @@ form.subtotal = 0 form.freight = 0 form.otherFee = 0 form.discountRate = 0 form.discountAmount = 0 form.totalAmount = 0 } @@ -693,11 +684,19 @@ }, 0) form.customer = customerOption.value.find(item => item.id === form.customerId)?.customerName || '' // 剔除 products 中的 modelOptions 字段,以及 form 中的 subtotal、freight 字段 const { subtotal, freight, ...formWithoutSubtotal } = form const submitData = { ...formWithoutSubtotal, products: form.products.map(({ modelOptions, ...rest }) => rest) } if (isEdit.value) { // 编辑 const index = quotationList.value.findIndex(item => item.id === editId.value) if (index > -1) { updateQuotation(form).then(res=>{ updateQuotation(submitData).then(res=>{ // console.log(res) if(res.code===200){ ElMessage.success('编辑成功') @@ -708,7 +707,7 @@ } } else { // 新增 addQuotation(form).then(res=>{ addQuotation(submitData).then(res=>{ if(res.code===200){ ElMessage.success('新增成功') dialogVisible.value = false @@ -763,9 +762,6 @@ })) : [], subtotal: item.subtotal || 0, freight: item.freight || 0, otherFee: item.otherFee || 0, discountRate: item.discountRate || 0, discountAmount: item.discountAmount || 0, totalAmount: item.totalAmount || 0 })) pagination.total = res.data.total