| | |
| | | const approveOpinion = ref(""); |
| | | const approveSubmitting = ref(false); |
| | | |
| | | /** 报价/采购/发货详情加载状态 */ |
| | | const quotationLoading = ref(false); |
| | | const purchaseLoading = ref(false); |
| | | const deliveryLoading = ref(false); |
| | | |
| | | /** 差旅/费用报销专用详情、审批弹窗 */ |
| | | const reimburseDialog = reactive({ |
| | | visible: false, |
| | |
| | | } |
| | | |
| | | detailRow.value = { ...row }; |
| | | const bizType = Number(row.businessType); |
| | | // 报价审批:用审批事由字段承载的"报价单号"去查报价列表 |
| | | if (row.businessType === 6) { |
| | | if (bizType === 6) { |
| | | const quotationNo = row?.quotationNo; |
| | | if (quotationNo) { |
| | | const res = await getQuotationList({ quotationNo }); |
| | | const records = res?.data?.records || []; |
| | | detailData.value = records[0] || {}; |
| | | 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) { |
| | | const res = await getPurchaseByCode({ purchaseContractNumber }); |
| | | detailData.value = res || {}; |
| | | 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) { |
| | | const res = await getDeliveryDetailByShippingNo({ shippingNo }); |
| | | detailData.value = res?.data || res || {}; |
| | | deliveryLoading.value = true; |
| | | try { |
| | | const res = await getDeliveryDetailByShippingNo({ shippingNo }); |
| | | detailData.value = res?.data || res || {}; |
| | | } finally { |
| | | deliveryLoading.value = false; |
| | | } |
| | | } else { |
| | | detailData.value = {}; |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | approveDialog.row = { ...row }; |
| | | approveOpinion.value = ""; |
| | | const bizType = Number(row.businessType); |
| | | // 报价审批:用审批事由字段承载的"报价单号"去查报价列表 |
| | | if (row.businessType === 6) { |
| | | if (bizType === 6) { |
| | | const quotationNo = row?.quotationNo; |
| | | if (quotationNo) { |
| | | const res = await getQuotationList({ quotationNo }); |
| | | const records = res?.data?.records || []; |
| | | detailData.value = records[0] || {}; |
| | | 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) { |
| | | const res = await getPurchaseByCode({ purchaseContractNumber }); |
| | | detailData.value = res || {}; |
| | | 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) { |
| | | const res = await getDeliveryDetailByShippingNo({ shippingNo }); |
| | | detailData.value = res?.data || res || {}; |
| | | deliveryLoading.value = true; |
| | | try { |
| | | const res = await getDeliveryDetailByShippingNo({ shippingNo }); |
| | | detailData.value = res?.data || res || {}; |
| | | } finally { |
| | | deliveryLoading.value = false; |
| | | } |
| | | } else { |
| | | detailData.value = {}; |
| | | } |
| | | } |
| | | |
| | |
| | | detailDialog, |
| | | detailRow, |
| | | detailData, |
| | | quotationLoading, |
| | | purchaseLoading, |
| | | deliveryLoading, |
| | | reimburseDialog, |
| | | approveDialog, |
| | | approveOpinion, |