From d835d1b51f832889929cdf69010034a30ef44d02 Mon Sep 17 00:00:00 2001
From: Junjie <xjj@123>
Date: 星期四, 17 十月 2024 13:57:29 +0800
Subject: [PATCH] #
---
zy-asrs-flow/src/pages/task/task/index.jsx | 94 ++++++++++++++++++++++++++++++++++++----------
1 files changed, 73 insertions(+), 21 deletions(-)
diff --git a/zy-asrs-flow/src/pages/task/task/index.jsx b/zy-asrs-flow/src/pages/task/task/index.jsx
index 4c81bb6..6f7590f 100644
--- a/zy-asrs-flow/src/pages/task/task/index.jsx
+++ b/zy-asrs-flow/src/pages/task/task/index.jsx
@@ -1,6 +1,6 @@
import React, { useState, useRef, useEffect } from 'react';
-import { Button, message, Modal, Tag } from 'antd';
+import { Button, message, Modal, Tag } from 'antd';
import {
FooterToolbar,
PageContainer,
@@ -11,6 +11,7 @@
import { PlusOutlined, ExportOutlined } from '@ant-design/icons';
import Http from '@/utils/http';
import Edit from './components/edit'
+import ShuttleCommand from './components/shuttleCommand'
import { TextFilter, SelectFilter, DatetimeRangeFilter, LinkFilter } from '@/components/TableSearch'
import { statusMap } from '@/utils/enum-util'
import { repairBug } from '@/utils/common-util';
@@ -131,13 +132,13 @@
}
};
-
const Main = () => {
const intl = useIntl();
const formTableRef = useRef();
const actionRef = useRef();
const [selectedRows, setSelectedRows] = useState([]);
const [modalVisible, setModalVisible] = useState(false);
+ const [shuttleCommandModalVisible, setShuttleCommandModalVisible] = useState(false);
const [currentRow, setCurrentRow] = useState();
const [searchParam, setSearchParam] = useState({});
@@ -191,6 +192,20 @@
copyable: true,
filterDropdown: (props) => <TextFilter
name='taskNo'
+ {...props}
+ actionRef={actionRef}
+ setSearchParam={setSearchParam}
+ />,
+ },
+ {
+ title: 'WMS浠诲姟鍙�',
+ dataIndex: 'wmsTaskNo',
+ valueType: 'text',
+ hidden: false,
+ width: 140,
+ copyable: true,
+ filterDropdown: (props) => <TextFilter
+ name='wmsTaskNo'
{...props}
actionRef={actionRef}
setSearchParam={setSearchParam}
@@ -511,7 +526,7 @@
{
title: '鎿嶄綔',
dataIndex: 'option',
- width: 240,
+ width: 300,
valueType: 'option',
render: (_, record) => [
<Button
@@ -523,6 +538,16 @@
}}
>
<FormattedMessage id='page.edit' defaultMessage='缂栬緫' />
+ </Button>,
+ <Button
+ type="link"
+ key="shuttleCommand"
+ onClick={() => {
+ setShuttleCommandModalVisible(true);
+ setCurrentRow(record);
+ }}
+ >
+ <FormattedMessage id='page.shuttleCommand' defaultMessage='绌挎杞︽寚浠�' />
</Button>,
// <Button
// type="link"
@@ -566,25 +591,25 @@
<FormattedMessage id='page.complete' defaultMessage='瀹屾垚' />
</Button>,
<Button
- type="link"
- key="cancel"
- onClick={async () => {
- Modal.confirm({
- title: intl.formatMessage({ id: 'page.cancel', defaultMessage: '鍙栨秷' }),
- content: intl.formatMessage({ id: 'page.cancel.confirm', defaultMessage: '纭畾鍙栨秷璇ラ」鍚楋紵' }),
- onOk: async () => {
- const success = await handleCancel([record], intl);
- if (success) {
- if (actionRef.current) {
- actionRef.current.reload();
+ type="link"
+ key="cancel"
+ onClick={async () => {
+ Modal.confirm({
+ title: intl.formatMessage({ id: 'page.cancel', defaultMessage: '鍙栨秷' }),
+ content: intl.formatMessage({ id: 'page.cancel.confirm', defaultMessage: '纭畾鍙栨秷璇ラ」鍚楋紵' }),
+ onOk: async () => {
+ const success = await handleCancel([record], intl);
+ if (success) {
+ if (actionRef.current) {
+ actionRef.current.reload();
+ }
}
- }
- },
- });
- }}
- >
- <FormattedMessage id='page.cancel' defaultMessage='鍙栨秷' />
- </Button>,
+ },
+ });
+ }}
+ >
+ <FormattedMessage id='page.cancel' defaultMessage='鍙栨秷' />
+ </Button>,
],
},
];
@@ -729,6 +754,33 @@
}
}}
/>
+
+ <ShuttleCommand
+ open={shuttleCommandModalVisible}
+ values={currentRow || {}}
+ onCancel={
+ () => {
+ setShuttleCommandModalVisible(false);
+ setCurrentRow(undefined);
+ }
+ }
+ onSubmit={async (values) => {
+ let ok = false;
+ if (values.id) {
+ ok = await handleUpdate({ ...values }, intl)
+ } else {
+ ok = await handleSave({ ...values }, intl)
+ }
+ if (ok) {
+ setShuttleCommandModalVisible(false);
+ setCurrentRow(undefined);
+ if (actionRef.current) {
+ actionRef.current.reload();
+ }
+ }
+ }}
+ />
+
</PageContainer>
);
};
--
Gitblit v1.9.1