From 72139f39a0845f8de31fd44bc5dd7077df17d48e Mon Sep 17 00:00:00 2001
From: lbq <1065079612@qq.com>
Date: 星期一, 05 一月 2026 09:56:29 +0800
Subject: [PATCH] 仓库和库区页面优化
---
rsf-admin/src/page/locPreview/LocPreviewList.jsx | 63 +++++++++++++++++++++++++++++++
1 files changed, 62 insertions(+), 1 deletions(-)
diff --git a/rsf-admin/src/page/locPreview/LocPreviewList.jsx b/rsf-admin/src/page/locPreview/LocPreviewList.jsx
index a30d41a..6ee064f 100644
--- a/rsf-admin/src/page/locPreview/LocPreviewList.jsx
+++ b/rsf-admin/src/page/locPreview/LocPreviewList.jsx
@@ -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