From 24bee1a669c3f01f4c3ce7c6f4f4e2e37fe3dfe2 Mon Sep 17 00:00:00 2001
From: zhou zhou <3272660260@qq.com>
Date: 星期六, 10 一月 2026 08:34:40 +0800
Subject: [PATCH] #application-dev

---
 rsf-admin/src/page/locPreview/LocPreviewList.jsx |   67 ++++++++++++++++++++++++++++++++-
 1 files changed, 64 insertions(+), 3 deletions(-)

diff --git a/rsf-admin/src/page/locPreview/LocPreviewList.jsx b/rsf-admin/src/page/locPreview/LocPreviewList.jsx
index 5c20428..6ee064f 100644
--- a/rsf-admin/src/page/locPreview/LocPreviewList.jsx
+++ b/rsf-admin/src/page/locPreview/LocPreviewList.jsx
@@ -109,7 +109,7 @@
             source="useStatus"
             optionValue="value"
             parse={v => v}
-
+            alwaysOn
         />,
         <TextInput source="code" label="table.field.loc.code" />,
         <AutocompleteInput
@@ -123,7 +123,7 @@
         <TextInput source="name" label="table.field.loc.name" />,
         <NumberInput source="flagLogic" label="table.field.loc.flagLogic" />,
         <TextInput source="fucAtrrs" label="table.field.loc.fucAtrrs" />,
-        <TextInput source="barcode" label="table.field.loc.barcode" />,
+        <TextInput source="barcode" label="table.field.loc.barcode" alwaysOn/>,
         <TextInput source="unit" label="table.field.loc.unit" />,
         <TextInput source="size" label="table.field.loc.size" />,
         <NumberInput source="row" label="table.field.loc.row" />,
@@ -201,6 +201,8 @@
                     <TextField source="memo" label="common.field.memo" sortable={false} />
                     <WrapperField cellClassName="opt" label="common.field.opt">
                         <EditButton sx={{ padding: '1px', fontSize: '.75rem' }}  label="toolbar.detail" />
+                        {/* <LocButton sx={{ padding: '1px', fontSize: '.75rem' }} ></LocButton>
+                        <UnLockButton sx={{ padding: '1px', fontSize: '.75rem' }} mutationMode={OPERATE_MODE} /><UnLockButton /> */}
                     </WrapperField>
                 </StyledDatagrid>
             </List>
@@ -208,4 +210,63 @@
     )
 }
 
-export default LocPreviewList;
\ No newline at end of file
+export default LocPreviewList;
+
+/**
+ * 鎿嶄綔
+ * @returns 
+ */
+const LocButton = (props) => {
+    // const record = useRecordContext();
+    const notify = useNotify();
+    const refresh = useRefresh();
+    const clickComplete = () => {
+        completeTask(record)
+    };
+    //瀹屾垚浠诲姟
+    const completeTask = async (row) => {
+        const { data: { code, data, msg } } = await request.post(`task/complete/` + row.id);
+        if (code === 200) {
+            notify(msg);
+            refresh();
+        } else {
+            notify(msg);
+        }
+    }
+    return (
+        <ConfirmButton label={"鍐荤粨"} color="secondary" startIcon={<TaskAltIcon />} onConfirm={clickComplete} />
+    )
+}
+
+/**
+ * 鍙栨秷鎸夐挳
+ * @returns 
+ */
+const UnLockButton = () => {
+    const record = useRecordContext();
+    const notify = useNotify();
+    const refresh = useRefresh();
+    const clickCancel = () => {
+        cancleTask(record)
+    };
+    //鍙栨秷浠诲姟
+    const cancleTask = async (row) => {
+        const { data: { code, data, msg } } = await request.post(`/task/remove/` + row.id);
+        if (code === 200) {
+            notify(msg);
+            refresh();
+        } else {
+            notify(msg);
+        }
+    }
+    return (
+        (record.taskStatus == 1 || record.taskStatus == 101) && (record.taskType == 1 || record.taskType == 101 || record.taskType == 10 || record.taskType == 107 || record.taskType == 103 || record.taskType == 11) ?
+            <ConfirmButton
+                onConfirm={clickCancel}
+                startIcon={<CancelIcon />}
+                label={"toolbar.cancel"}>
+            </ConfirmButton>
+            :
+            <></>
+    )
+}
\ No newline at end of file

--
Gitblit v1.9.1