From 2c38ccf9592a3d44e35ecc6b145adb763c63c287 Mon Sep 17 00:00:00 2001
From: huminmin <mac@MacBook-Pro.local>
Date: 星期五, 21 八月 2026 13:37:08 +0800
Subject: [PATCH] Merge branch 'dev_pro2.0' of http://114.132.189.42:9002/r/mom-pro2-before into dev_pro2.0

---
 src/views/basicData/mdm/unit/data.ts |   91 ++++++++++++---------------------------------
 1 files changed, 24 insertions(+), 67 deletions(-)

diff --git a/src/views/basicData/mdm/unit/data.ts b/src/views/basicData/mdm/unit/data.ts
index e6081e4..6e15fe9 100644
--- a/src/views/basicData/mdm/unit/data.ts
+++ b/src/views/basicData/mdm/unit/data.ts
@@ -5,7 +5,6 @@
 import { getDictOptions } from '#/packages/effects/hooks/src';
 
 import { z } from '#/adapter/form';
-import { getUnitPage } from '#/api/mdm/unit';
 
 /** 鏂板/淇敼鐨勮〃鍗� */
 export function useFormSchema(): VbenFormSchema[] {
@@ -34,61 +33,6 @@
       rules: 'required',
       componentProps: {
         placeholder: '璇疯緭鍏ュ崟浣嶅悕绉�',
-      },
-    },
-    {
-      component: 'Switch',
-      fieldName: 'primaryFlag',
-      label: '鏄惁涓诲崟浣�',
-      componentProps: {
-        class: 'w-auto',
-        checkedChildren: '鏄�',
-        unCheckedChildren: '鍚�',
-      },
-      rules: z.boolean().default(false),
-    },
-    {
-      component: 'ApiSelect',
-      fieldName: 'primaryId',
-      label: '涓诲崟浣�',
-      dependencies: {
-        triggerFields: ['primaryFlag'],
-        show: (values) => {
-          return values.primaryFlag === false;
-        },
-        required: (values) => {
-          return values.primaryFlag === false;
-        },
-      },
-      componentProps: {
-        placeholder: '璇烽�夋嫨涓诲崟浣�',
-        allowClear: true,
-        api: async () => {
-          const res = await getUnitPage({ pageNo: 1, pageSize: 100, primaryFlag: true, status: 0 });
-          return res.list || [];
-        },
-        labelField: 'name',
-        valueField: 'id',
-      },
-    },
-    {
-      component: 'InputNumber',
-      fieldName: 'changeRate',
-      label: '鎹㈢畻姣斾緥',
-      dependencies: {
-        triggerFields: ['primaryFlag'],
-        show: (values) => {
-          return values.primaryFlag === false;
-        },
-        required: (values) => {
-          return values.primaryFlag === false;
-        },
-      },
-      componentProps: {
-        class: '!w-full',
-        min: 0,
-        precision: 4,
-        placeholder: '璇疯緭鍏ユ崲绠楁瘮渚�',
       },
     },
     {
@@ -163,17 +107,6 @@
       minWidth: 150,
     },
     {
-      field: 'primaryFlag',
-      title: '涓诲崟浣�',
-      minWidth: 80,
-      slots: { default: 'primaryFlag' },
-    },
-    {
-      field: 'changeRate',
-      title: '鎹㈢畻姣斾緥',
-      minWidth: 100,
-    },
-    {
       field: 'status',
       title: '鐘舵��',
       minWidth: 80,
@@ -195,4 +128,28 @@
       slots: { default: 'actions' },
     },
   ];
+}
+
+/** 璁¢噺鍗曚綅瀵煎叆鐨勮〃鍗� */
+export function useImportFormSchema(): VbenFormSchema[] {
+  return [
+    {
+      fieldName: 'file',
+      label: '鍗曚綅鏁版嵁',
+      component: 'Upload',
+      rules: 'required',
+      help: '浠呭厑璁稿鍏� xls銆亁lsx 鏍煎紡鏂囦欢',
+    },
+    {
+      fieldName: 'updateSupport',
+      label: '鏄惁瑕嗙洊',
+      component: 'Switch',
+      componentProps: {
+        checkedChildren: '鏄�',
+        unCheckedChildren: '鍚�',
+      },
+      rules: z.boolean().default(false),
+      help: '鏄惁鏇存柊宸茬粡瀛樺湪鐨勫崟浣嶆暟鎹�',
+    },
+  ];
 }
\ No newline at end of file

--
Gitblit v1.9.3