From da6e158cc3037f447a09ab129a84c245641af860 Mon Sep 17 00:00:00 2001
From: "Mr.j" <2221464500@qq.com>
Date: Wed, 13 Aug 2025 11:25:55 +0800
Subject: [PATCH] =?UTF-8?q?=E8=AE=BE=E5=A4=87=E9=87=87=E8=B4=AD=E6=A8=A1?=
=?UTF-8?q?=E5=9D=97=E6=B7=BB=E5=8A=A0=E6=94=B6=E8=B4=A7=E7=8A=B6=E6=80=81?=
=?UTF-8?q?=E5=92=8C=E6=94=AF=E4=BB=98=E7=8A=B6=E6=80=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../components/PaymentDetailModal.vue | 249 ++++++++++++++++++
.../components/ReceiptDetailModal.vue | 211 +++++++++++++++
.../device-management/procurement/index.vue | 184 +++++++++++++
3 files changed, 644 insertions(+)
create mode 100644 src/views/system-resource/device-management/procurement/components/PaymentDetailModal.vue
create mode 100644 src/views/system-resource/device-management/procurement/components/ReceiptDetailModal.vue
diff --git a/src/views/system-resource/device-management/procurement/components/PaymentDetailModal.vue b/src/views/system-resource/device-management/procurement/components/PaymentDetailModal.vue
new file mode 100644
index 0000000..879f86c
--- /dev/null
+++ b/src/views/system-resource/device-management/procurement/components/PaymentDetailModal.vue
@@ -0,0 +1,249 @@
+
+
+
+
+
+
+
+ {{ paymentData?.equipmentName || '-' }}
+
+
+ {{ paymentData?.equipmentType || '-' }}
+
+
+ {{ paymentData?.equipmentModel || '-' }}
+
+
+ {{ paymentData?.brand || '-' }}
+
+
+ {{ paymentData?.supplierName || '-' }}
+
+
+ {{ paymentData?.purchaseOrder || '-' }}
+
+
+
+
+
+
+
+
+ ¥{{ paymentData?.purchasePrice || '-' }}
+
+
+ {{ paymentData?.quantity || '-' }}
+
+
+ ¥{{ paymentData?.totalPrice || '-' }}
+
+
+ {{ paymentData?.purchaseTime || '-' }}
+
+
+
+
+
+
+
+
+
+ {{ getPaymentStatusText(paymentData?.paymentStatus) }}
+
+
+
+ {{ paymentData?.paymentMethod || '-' }}
+
+
+ ¥{{ paymentData?.paymentAmount || '-' }}
+
+
+ {{ paymentData?.paymentTime || '-' }}
+
+
+ {{ paymentData?.paymentPerson || '-' }}
+
+
+ {{ paymentData?.paymentRemark || '-' }}
+
+
+
+
+
+
+
+
+
+ {{ getInvoiceStatusText(paymentData?.invoiceStatus) }}
+
+
+
+ {{ paymentData?.invoiceType || '-' }}
+
+
+ {{ paymentData?.invoiceNumber || '-' }}
+
+
+ {{ paymentData?.invoiceDate || '-' }}
+
+
+ ¥{{ paymentData?.invoiceAmount || '-' }}
+
+
+ {{ paymentData?.taxRate || '-' }}
+
+
+ ¥{{ paymentData?.taxAmount || '-' }}
+
+
+ ¥{{ paymentData?.amountWithoutTax || '-' }}
+
+
+
+
+
+
+
+
+ {{ paymentData?.contractNumber || '-' }}
+
+
+
+ {{ getContractStatusText(paymentData?.contractStatus) }}
+
+
+
+ ¥{{ paymentData?.contractAmount || '-' }}
+
+
+ {{ paymentData?.contractDate || '-' }}
+
+
+ {{ paymentData?.paymentTerms || '-' }}
+
+
+ {{ paymentData?.paymentDeadline || '-' }}
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/system-resource/device-management/procurement/components/ReceiptDetailModal.vue b/src/views/system-resource/device-management/procurement/components/ReceiptDetailModal.vue
new file mode 100644
index 0000000..2e8e7b7
--- /dev/null
+++ b/src/views/system-resource/device-management/procurement/components/ReceiptDetailModal.vue
@@ -0,0 +1,211 @@
+
+
+
+
+
+
+
+ {{ receiptData?.equipmentName || '-' }}
+
+
+ {{ receiptData?.equipmentType || '-' }}
+
+
+ {{ receiptData?.equipmentModel || '-' }}
+
+
+ {{ receiptData?.brand || '-' }}
+
+
+ {{ receiptData?.supplierName || '-' }}
+
+
+ {{ receiptData?.purchaseOrder || '-' }}
+
+
+
+
+
+
+
+
+
+ {{ getReceiptStatusText(receiptData?.receiptStatus) }}
+
+
+
+ {{ receiptData?.receiptTime || '-' }}
+
+
+ {{ receiptData?.receiptPerson || '-' }}
+
+
+ {{ receiptData?.receiptQuantity || '-' }}
+
+
+ {{ receiptData?.receiptRemark || '-' }}
+
+
+
+
+
+
+
+
+ {{ receiptData?.appearanceCheck || '-' }}
+
+
+ {{ receiptData?.functionTest || '-' }}
+
+
+ {{ receiptData?.packageIntegrity || '-' }}
+
+
+ {{ receiptData?.accessoryIntegrity || '-' }}
+
+
+
+ {{ getCheckResultText(receiptData?.checkResult) }}
+
+
+
+ {{ receiptData?.checkRemark || '-' }}
+
+
+
+
+
+
+
+
+
+ {{ getStorageStatusText(receiptData?.storageStatus) }}
+
+
+
+ {{ receiptData?.storageTime || '-' }}
+
+
+ {{ receiptData?.storageLocation || '-' }}
+
+
+ {{ receiptData?.storageManager || '-' }}
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/system-resource/device-management/procurement/index.vue b/src/views/system-resource/device-management/procurement/index.vue
index b3f4431..5155506 100644
--- a/src/views/system-resource/device-management/procurement/index.vue
+++ b/src/views/system-resource/device-management/procurement/index.vue
@@ -178,6 +178,20 @@
-
+
+
+
+ {{ getReceiptStatusText(record.receiptStatus) }}
+
+
+
+
+
+
+ {{ getPaymentStatusText(record.paymentStatus) }}
+
+
+
@@ -196,6 +210,40 @@
>
申请采购
+
+
+ 确认收货
+
+
+ 查看收货
+
+
+
+ 付款
+
+
+ 查看支付详情
+
+
+
+
+
+
+
@@ -271,6 +331,8 @@ import message from '@arco-design/web-vue/es/message'
import ProcurementModal from './components/ProcurementModal.vue'
import ProcurementSearch from './components/ProcurementSearch.vue'
import ProcurementApplicationModal from './components/ProcurementApplicationModal.vue'
+import ReceiptDetailModal from './components/ReceiptDetailModal.vue'
+import PaymentDetailModal from './components/PaymentDetailModal.vue'
import { equipmentProcurementApi } from '@/apis/equipment/procurement'
import { equipmentApprovalApi } from '@/apis/equipment/approval'
import type { EquipmentListReq, EquipmentResp } from '@/apis/equipment/type'
@@ -307,6 +369,14 @@ const modalMode = ref<'add' | 'edit' | 'view'>('add')
const applicationModalVisible = ref(false)
const currentApplicationData = ref(null)
+// 收货详情弹窗控制
+const receiptDetailModalVisible = ref(false)
+const currentReceiptData = ref(null)
+
+// 支付详情弹窗控制
+const paymentDetailModalVisible = ref(false)
+const currentPaymentData = ref(null)
+
// 表格选择
const selectedRowKeys = ref([])
const rowSelection = reactive({
@@ -418,6 +488,20 @@ const columns = [
slotName: 'createTime',
width: 160,
},
+ {
+ title: '收货状态',
+ dataIndex: 'receiptStatus',
+ key: 'receiptStatus',
+ slotName: 'receiptStatus',
+ width: 120,
+ },
+ {
+ title: '支付状态',
+ dataIndex: 'paymentStatus',
+ key: 'paymentStatus',
+ slotName: 'paymentStatus',
+ width: 120,
+ },
{
title: '操作',
key: 'action',
@@ -527,6 +611,50 @@ const getHealthStatusText = (status: string) => {
return textMap[status] || '未知'
}
+// 获取收货状态颜色
+const getReceiptStatusColor = (status: string) => {
+ const colorMap: Record = {
+ NOT_RECEIVED: 'gray',
+ RECEIVED: 'green',
+ PARTIALLY_RECEIVED: 'orange',
+ REJECTED: 'red',
+ }
+ return colorMap[status] || 'blue'
+}
+
+// 获取收货状态文本
+const getReceiptStatusText = (status: string) => {
+ const textMap: Record = {
+ NOT_RECEIVED: '未收货',
+ RECEIVED: '已收货',
+ PARTIALLY_RECEIVED: '部分收货',
+ REJECTED: '已拒收',
+ }
+ return textMap[status] || '未知'
+}
+
+// 获取支付状态颜色
+const getPaymentStatusColor = (status: string) => {
+ const colorMap: Record = {
+ NOT_PAID: 'gray',
+ PAID: 'green',
+ PARTIALLY_PAID: 'orange',
+ REJECTED: 'red',
+ }
+ return colorMap[status] || 'blue'
+}
+
+// 获取支付状态文本
+const getPaymentStatusText = (status: string) => {
+ const textMap: Record = {
+ NOT_PAID: '未支付',
+ PAID: '已支付',
+ PARTIALLY_PAID: '部分支付',
+ REJECTED: '已拒付',
+ }
+ return textMap[status] || '未知'
+}
+
// 格式化价格
const formatPrice = (price: number) => {
return price.toLocaleString('zh-CN', {
@@ -601,6 +729,8 @@ const transformBackendData = (data: any[]): EquipmentResp[] => {
inventoryBasis: item.inventoryBasis,
dynamicRecord: item.dynamicRecord,
procurementStatus: item.procurementStatus,
+ receiptStatus: item.receiptStatus || 'NOT_RECEIVED',
+ paymentStatus: item.paymentStatus || 'NOT_PAID',
}))
}
@@ -850,6 +980,60 @@ const canApplyProcurement = (record: EquipmentResp) => {
return canApply
}
+// 检查是否可以收货
+const canReceiveGoods = (record: EquipmentResp) => {
+ const receiptStatus = (record as any).receiptStatus
+ return receiptStatus === 'NOT_RECEIVED' || receiptStatus === 'PARTIALLY_RECEIVED'
+}
+
+// 收货操作
+const handleReceiveGoods = async (record: EquipmentResp) => {
+ try {
+ // 暂时模拟API调用
+ // await equipmentProcurementApi.receiveGoods(record.equipmentId)
+ message.success('收货成功')
+ // 模拟状态更新
+ (record as any).receiptStatus = 'RECEIVED'
+ loadData(currentSearchParams.value)
+ } catch (error: any) {
+ console.error('收货失败:', error)
+ message.error(error?.message || '收货失败')
+ }
+}
+
+// 查看收货详情
+const handleViewReceipt = (record: EquipmentResp) => {
+ currentReceiptData.value = { ...record }
+ receiptDetailModalVisible.value = true
+}
+
+// 检查是否可以付款
+const canMakePayment = (record: EquipmentResp) => {
+ const paymentStatus = (record as any).paymentStatus
+ return paymentStatus === 'NOT_PAID' || paymentStatus === 'PARTIALLY_PAID'
+}
+
+// 付款操作
+const handleMakePayment = async (record: EquipmentResp) => {
+ try {
+ // 暂时模拟API调用
+ // await equipmentProcurementApi.makePayment(record.equipmentId)
+ message.success('付款成功')
+ // 模拟状态更新
+ (record as any).paymentStatus = 'PAID'
+ loadData(currentSearchParams.value)
+ } catch (error: any) {
+ console.error('付款失败:', error)
+ message.error(error?.message || '付款失败')
+ }
+}
+
+// 查看支付详情
+const handleViewPayment = (record: EquipmentResp) => {
+ currentPaymentData.value = { ...record }
+ paymentDetailModalVisible.value = true
+}
+
// 获取审批状态颜色
const getApprovalStatusColor = (status: string) => {
const colorMap: Record = {