From f9e6eb6fc2c2e0c2a2b17238b817fcbfcb6bab56 Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期一, 10 八月 2026 16:38:45 +0800
Subject: [PATCH] feat(erp): 添加采购来票管理和付款关联功能

---
 src/views/erp/sale/order/data.ts |   92 +++++++++++++++++++++++++++++----------------
 1 files changed, 59 insertions(+), 33 deletions(-)

diff --git a/src/views/erp/sale/order/data.ts b/src/views/erp/sale/order/data.ts
index d43126c..9597b94 100644
--- a/src/views/erp/sale/order/data.ts
+++ b/src/views/erp/sale/order/data.ts
@@ -36,6 +36,35 @@
       },
     },
     {
+      fieldName: 'productionStatus',
+      label: '鐢熶骇鐘舵��',
+      component: 'Input',
+      dependencies: {
+        triggerFields: ['needProduction', 'productionStatus'],
+        show: (values) => {
+          return formType === 'detail' && values.needProduction === 1;
+        },
+      },
+      componentProps: {
+        disabled: true,
+      },
+      slots: { default: 'productionStatus' },
+    },
+    {
+      fieldName: 'productionFinishTime',
+      label: '鐢熶骇瀹屾垚鏃堕棿',
+      component: 'Input',
+      dependencies: {
+        triggerFields: ['productionStatus'],
+        show: (values) => {
+          return formType === 'detail' && values.productionStatus === 1;
+        },
+      },
+      componentProps: {
+        disabled: true,
+      },
+    },
+    {
       fieldName: 'orderTime',
       label: '璁㈠崟鏃堕棿',
       component: 'DatePicker',
@@ -43,7 +72,7 @@
         placeholder: '閫夋嫨璁㈠崟鏃堕棿',
         showTime: true,
         format: 'YYYY-MM-DD HH:mm:ss',
-        valueFormat: 'x',
+        valueFormat: 'YYYY-MM-DD HH:mm:ss',
       },
       rules: 'required',
     },
@@ -82,23 +111,13 @@
       formItemClass: 'col-span-2',
     },
     {
-      fieldName: 'fileUrl',
+      fieldName: 'blobIds',
       label: '闄勪欢',
       component: 'FileUpload',
       componentProps: {
-        maxNumber: 1,
-        maxSize: 10,
-        accept: [
-          'pdf',
-          'doc',
-          'docx',
-          'xls',
-          'xlsx',
-          'txt',
-          'jpg',
-          'jpeg',
-          'png',
-        ],
+        valueKey: 'id',
+        maxNumber: 10,
+        multiple: true,
         showDescription: formType !== 'detail',
         disabled: formType === 'detail',
       },
@@ -197,11 +216,7 @@
       title: '搴撳瓨',
       minWidth: 80,
       formatter: 'formatAmount3',
-    },
-    {
-      field: 'productBarCode',
-      title: '鏉$爜',
-      minWidth: 120,
+      visible: false,
     },
     {
       field: 'productUnitName',
@@ -212,11 +227,13 @@
       field: 'productUnitName2',
       title: '杈呭崟浣�1',
       minWidth: 80,
+      visible: false,
     },
     {
       field: 'productUnitName3',
       title: '杈呭崟浣�2',
       minWidth: 80,
+      visible: false,
     },
     {
       field: 'needProduction',
@@ -229,6 +246,7 @@
       title: '澶囨敞',
       minWidth: 150,
       slots: { default: 'remark' },
+      visible: false,
     },
     {
       field: 'count',
@@ -274,7 +292,7 @@
     },
     {
       title: '鎿嶄綔',
-      width: 320,
+      width: 80,
       fixed: 'right',
       slots: { default: 'actions' },
       visible: !disabled,
@@ -380,16 +398,16 @@
       },
     },
     {
-      fieldName: 'returnStatus',
-      label: '閫�璐х姸鎬�',
+      fieldName: 'productionStatus',
+      label: '鐢熶骇鐘舵��',
       component: 'Select',
       componentProps: {
         options: [
-          { label: '鏈��璐�', value: 0 },
-          { label: '閮ㄥ垎閫�璐�', value: 1 },
-          { label: '鍏ㄩ儴閫�璐�', value: 2 },
+          { label: '鏃犻渶鐢熶骇', value: -1 },
+          { label: '鏈畬鎴�', value: 0 },
+          { label: '宸插畬鎴�', value: 1 },
         ],
-        placeholder: '璇烽�夋嫨閫�璐х姸鎬�',
+        placeholder: '璇烽�夋嫨鐢熶骇鐘舵��',
         allowClear: true,
       },
     },
@@ -446,12 +464,6 @@
       minWidth: 120,
     },
     {
-      field: 'outStatus',
-      title: '鍑哄簱鐘舵��',
-      minWidth: 100,
-      slots: { default: 'outStatus' },
-    },
-    {
       field: 'totalProductPrice',
       title: '閲戦鍚堣',
       formatter: 'formatAmount2',
@@ -470,6 +482,20 @@
       minWidth: 120,
     },
     {
+      field: 'outStatus',
+      title: '鍑哄簱鐘舵��',
+      minWidth: 100,
+      fixed: 'right',
+      slots: { default: 'outStatus' },
+    },
+    {
+      field: 'productionStatus',
+      title: '鐢熶骇鐘舵��',
+      minWidth: 100,
+      fixed: 'right',
+      slots: { default: 'productionStatus' },
+    },
+    {
       field: 'status',
       title: '鐘舵��',
       minWidth: 100,

--
Gitblit v1.9.3