From 26f2f989580a9221d1ee3f9c3e1bf692beb89901 Mon Sep 17 00:00:00 2001 From: wenlele Date: Tue, 6 Jun 2023 10:00:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=9D=E5=AD=98=E5=BE=85=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sections/workOrder/containers/aboutMe.jsx | 6 +- .../sections/workOrder/containers/index.js | 3 +- .../workOrder/containers/initiated.jsx | 2 +- .../workOrder/containers/preserve.jsx | 195 ++++++++++++++++++ .../sections/workOrder/containers/receipt.jsx | 6 +- .../workOrder/containers/stayDoWorkOrder.jsx | 2 +- .../src/sections/workOrder/nav-item.jsx | 4 +- web/client/src/sections/workOrder/routes.js | 9 +- web/client/src/utils/webapi.js | 2 + 9 files changed, 217 insertions(+), 12 deletions(-) create mode 100644 web/client/src/sections/workOrder/containers/preserve.jsx diff --git a/web/client/src/sections/workOrder/containers/aboutMe.jsx b/web/client/src/sections/workOrder/containers/aboutMe.jsx index 454f448..ebfaa96 100644 --- a/web/client/src/sections/workOrder/containers/aboutMe.jsx +++ b/web/client/src/sections/workOrder/containers/aboutMe.jsx @@ -90,8 +90,8 @@ const Rest = (props) => {
-
已办工单
-
ALREADY WORKORDER
+
抄送我
+
COPPGIVE WORKORDER
{ >
- 共{limits}条信息 + 共{limits}条工单 { >
- 共{limits}条信息 + 共{limits}条工单 { + const { dispatch, actions, user, socket } = props + + const [query, setQuery] = useState({ limit: 10, offset: 0 }); //页码信息 + const [limits, setLimits] = useState(0)//每页实际条数 + const [tableData, setTableData] = useState([]); + const [loading, setLoading] = useState(true); + const [workflowModalVisible, setWorkflowModalVisible] = useState(false) + const [processInstanceId, setProcessInstanceId] = useState(null) + const [params, setParams] = useState({}) + + + useEffect(() => { + backlogData() + }, []) + + let backlogData = (obj = { limit: 10, offset: 0 }) => { + + setLoading(true) + EmisRequest.get(EmisApiTable.processInstancemMyDraftList, + { userId: user?.id, businessType: '', ...obj }) + .then(res => { + setTableData(res?.data) + setLimits(res.count || 0) + setLoading(false) + }, error => { + Toast.error({ content: '保存待发列表请求失败', duration: 1, }) + setLoading(false) + + }); + } + + let columns = [{ + title: '序号', + dataIndex: 'index', + render: (text, record, index) => index + 1 + }, { + title: '标题', + dataIndex: 'nae', + }, { + title: '关联项目', + dataIndex: 'nae', + }, { + title: '申请人', + dataIndex: 'applyerName', + render: (text, record, index) =>user?.name + }, { + title: '申请部门', + dataIndex: 'applyDepartmentName', + render: (text, record, index) =>user?.department[0]?.name + }, { + title: '审批状态', + dataIndex: 'apName', + }, { + title: '提交时间', + dataIndex: 'createAt', + render: (text, record, index) => text && moment(text).format('YYYY-MM-DD HH:mm:ss') || '--' + }, { + title: '期望完成时间', + dataIndex: 'nae', + }, { + title: '操作', + dataIndex: 'hadle', + render: (text, record, index) =>
{ + setProcessInstanceId(record.processInstanceId) + setWorkflowModalVisible(true) + + }}>查看详情
+ }] + + return ( + <> +
+
+
+
+
保存待发
+
PRESERVE WORKORDER
+
+
+ (form.current = formApi)} + layout="horizontal" + style={{ position: "relative", width: "100%", flex: 1 }} + onSubmit={(values) => { + if (values?.applyTimes) { + values.applyTimes = [moment(values?.applyTimes[0]).format('YYYY-MM-DD HH:mm:ss'), moment(values?.applyTimes[1]).format('YYYY-MM-DD HH:mm:ss')] + } + backlogData({ ...values, limit: 10, page: 0 }) + setQuery({ limit: 10, offset: 0 }); + setLimits(0) + setParams({ ...values }) + }} + > + + {/* } + field="keywordsUser" + pure + showClear + style={{ width: 260, marginLeft: 12, marginRight: 12 }} + placeholder="请输入申请人" + /> */} + + + + +
+
+ +
+ + + + +
+
+ + 共{limits}条工单 + + { + setQuery({ limit: pageSize, offset: currentPage - 1 }); + backlogData({ ...params, limit: pageSize, offset: currentPage - 1 }) + }} + /> +
+
+ + + { setWorkflowModalVisible(false) }} + successCallBack={() => { setWorkflowModalVisible(false) }} + /> + + ) +} + +function mapStateToProps (state) { + const { auth, global, members, webSocket } = state; + return { + // loading: members.isRequesting, + user: auth.user, + // actions: global.actions, + // members: members.data, + // socket: webSocket.socket + }; +} + +export default connect(mapStateToProps)(Rest); diff --git a/web/client/src/sections/workOrder/containers/receipt.jsx b/web/client/src/sections/workOrder/containers/receipt.jsx index 898f1b4..91f3510 100644 --- a/web/client/src/sections/workOrder/containers/receipt.jsx +++ b/web/client/src/sections/workOrder/containers/receipt.jsx @@ -60,7 +60,7 @@ const Rest = (props) => { dataIndex: 'nae', }, { title: '申请人', - dataIndex: 'applyerName', + dataIndex: 'application', }, { title: '申请部门', dataIndex: 'applyDepartmentName', @@ -69,7 +69,7 @@ const Rest = (props) => { dataIndex: 'apName', }, { title: '提交时间', - dataIndex: 'startTime', + dataIndex: 'submissionTime', render: (text, record, index) => text && moment(text).format('YYYY-MM-DD HH:mm:ss') || '--' }, { title: '期望完成时间', @@ -157,7 +157,7 @@ const Rest = (props) => { >
- 共{limits}条信息 + 共{limits}条工单 {
- 共{limits}条信息 + 共{limits}条工单