From 6373c12e97dc5d52ad87271d1adb6743b0052607 Mon Sep 17 00:00:00 2001
From: liu <2021943741@qq.com>
Date: 星期三, 26 八月 2026 17:18:47 +0800
Subject: [PATCH] feat(erp): 采购来票选单过滤已开完票订单并修正未开票金额口径

---
 src/views/erp/sale/order/data.ts |   23 ++++++++++++++++++++---
 1 files changed, 20 insertions(+), 3 deletions(-)

diff --git a/src/views/erp/sale/order/data.ts b/src/views/erp/sale/order/data.ts
index 254f22a..b61597e 100644
--- a/src/views/erp/sale/order/data.ts
+++ b/src/views/erp/sale/order/data.ts
@@ -72,7 +72,7 @@
         placeholder: '閫夋嫨璁㈠崟鏃堕棿',
         showTime: true,
         format: 'YYYY-MM-DD HH:mm:ss',
-        valueFormat: 'x',
+        valueFormat: 'YYYY-MM-DD HH:mm:ss',
       },
       rules: 'required',
     },
@@ -181,14 +181,27 @@
     },
     {
       component: 'InputNumber',
-      componentProps: {
+      componentProps: (values) => ({
         class: '!w-full',
         placeholder: '璇疯緭鍏ユ敹鍙栬閲�',
         precision: 2,
         min: 0,
-      },
+        max: values.totalPrice ?? undefined,
+      }),
       fieldName: 'depositPrice',
       label: '鏀跺彇璁㈤噾',
+      dependencies: {
+        triggerFields: ['totalPrice'],
+        rules(values) {
+          if (values.totalPrice != null) {
+            return z
+              .number()
+              .min(0, '璁㈤噾涓嶈兘灏忎簬0')
+              .max(values.totalPrice, '鏀跺彇璁㈤噾涓嶈兘澶т簬浼樻儬鍚庨噾棰�');
+          }
+          return z.number().min(0, '璁㈤噾涓嶈兘灏忎簬0').optional();
+        },
+      },
       rules: z.number().min(0).optional(),
     },
   ];
@@ -216,6 +229,7 @@
       title: '搴撳瓨',
       minWidth: 80,
       formatter: 'formatAmount3',
+      visible: false,
     },
     {
       field: 'productUnitName',
@@ -226,11 +240,13 @@
       field: 'productUnitName2',
       title: '杈呭崟浣�1',
       minWidth: 80,
+      visible: false,
     },
     {
       field: 'productUnitName3',
       title: '杈呭崟浣�2',
       minWidth: 80,
+      visible: false,
     },
     {
       field: 'needProduction',
@@ -243,6 +259,7 @@
       title: '澶囨敞',
       minWidth: 150,
       slots: { default: 'remark' },
+      visible: false,
     },
     {
       field: 'count',

--
Gitblit v1.9.3