From c65a357fc8b907af755e1ef6a2c201e31eb71e94 Mon Sep 17 00:00:00 2001
From: vincentlu <t1341870251@gmail.com>
Date: 星期六, 07 二月 2026 13:50:38 +0800
Subject: [PATCH] #

---
 zy-acs-flow/src/page/code/CodeList.jsx |   32 +++++++++++++++++---------------
 1 files changed, 17 insertions(+), 15 deletions(-)

diff --git a/zy-acs-flow/src/page/code/CodeList.jsx b/zy-acs-flow/src/page/code/CodeList.jsx
index 5f6f6f7..797ea44 100644
--- a/zy-acs-flow/src/page/code/CodeList.jsx
+++ b/zy-acs-flow/src/page/code/CodeList.jsx
@@ -46,8 +46,10 @@
 import ImportButton from '../components/ImportButton'
 import { useCodeImport } from './useCodeImport';
 
-import * as importTemp from './importTemp.csv?raw';
-const IMPORT_TEMP_URL = `data:text/csv;name=crm_contacts_sample.csv;charset=utf-8,${encodeURIComponent(importTemp.default)}`;
+// import * as importTemp from './importTemp.csv?raw';
+// const IMPORT_TEMP_URL = `data:text/csv;name=crm_contacts_sample.csv;charset=utf-8,${encodeURIComponent(importTemp.default)}`;
+
+const IMPORT_TEMP_URL = '/imports/code_import_template.xlsx';
 
 const StyledDatagrid = styled(DatagridConfigurable)(({ theme }) => ({
     '& .css-1vooibu-MuiSvgIcon-root': {
@@ -80,15 +82,15 @@
         alwaysOn
     />,
     // <TextInput source="scale" label="table.field.code.scale" />,
-    <SelectInput source="spin" label="table.field.code.spin"
-        choices={[
-            { id: 0, name: 'page.code.enums.spin.na' },
-            { id: 1, name: 'page.code.enums.spin.cw' },
-            { id: 2, name: 'page.code.enums.spin.ccw' },
-        ]}
-    // alwaysOn
-    // emptyText={false}
-    />,
+    // <SelectInput source="spin" label="table.field.code.spin"
+    //     choices={[
+    //         { id: 0, name: 'page.code.enums.spin.na' },
+    //         { id: 1, name: 'page.code.enums.spin.cw' },
+    //         { id: 2, name: 'page.code.enums.spin.ccw' },
+    //     ]}
+    //     alwaysOn
+    //     emptyText={false}
+    // />,
     <TextInput label="common.field.memo" source="memo" />,
     <SelectInput
         label="common.field.status"
@@ -126,7 +128,7 @@
                         <FilterButton />
                         <MyCreateButton onClick={() => { setCreateDialog(true) }} />
                         <SelectColumnsButton preferenceKey='code' />
-                        <ImportButton importTemp={IMPORT_TEMP_URL} useCodeImport={useCodeImport} onceBatch={10} />
+                        <ImportButton type="xlsx" importTemp={IMPORT_TEMP_URL} useImport={useCodeImport} onceBatch={10} />
                         <MyExportButton />
                     </TopToolbar>
                 )}
@@ -146,8 +148,8 @@
                     <NumberField source="x" label="table.field.code.x" />
                     <NumberField source="y" label="table.field.code.y" />
                     <BooleanField source="cornerBool" label="table.field.code.corner" sortable={false} />
-                    <TextField source="scale" label="table.field.code.scale" />
-                    <FunctionField
+                    {/* <TextField source="scale" label="table.field.code.scale" /> */}
+                    {/* <FunctionField
                         label="table.field.code.spin"
                         sortable={false}
                         render={(record) => {
@@ -162,7 +164,7 @@
                                     return 'N/A';
                             }
                         }}
-                    />
+                    /> */}
                     <ReferenceField source="updateBy" label="common.field.updateBy" reference="user" link={false} sortable={false}>
                         <TextField source="nickname" />
                     </ReferenceField>

--
Gitblit v1.9.1