Commit 1d1d373da7ec8b2eee3de57ce2806a90f3438b13
1 parent
48b5692b
feat: update工单管理
Showing
5 changed files
with
43 additions
and
19 deletions
.umirc.ts
@@ -14,9 +14,9 @@ export default defineConfig({ | @@ -14,9 +14,9 @@ export default defineConfig({ | ||
14 | }, | 14 | }, |
15 | proxy: { | 15 | proxy: { |
16 | '/api/': { | 16 | '/api/': { |
17 | - // target: 'http://localhost:8085/', | 17 | + target: 'http://localhost:8085/', |
18 | // target: 'http://192.168.1.6:8085/', | 18 | // target: 'http://192.168.1.6:8085/', |
19 | - target: 'http://39.108.227.113:8085/', | 19 | + // target: 'http://39.108.227.113:8085/', |
20 | changeOrigin: true, | 20 | changeOrigin: true, |
21 | pathRewrite: { '^/api': '' }, | 21 | pathRewrite: { '^/api': '' }, |
22 | }, | 22 | }, |
@@ -191,7 +191,6 @@ export default defineConfig({ | @@ -191,7 +191,6 @@ export default defineConfig({ | ||
191 | path: '/tickets', | 191 | path: '/tickets', |
192 | component: './Tickets', | 192 | component: './Tickets', |
193 | icon: 'BookOutlined', | 193 | icon: 'BookOutlined', |
194 | - access: 'canReadAdminAndWarehouseKeeperAndProcure', | ||
195 | }, | 194 | }, |
196 | ], | 195 | ], |
197 | 196 |
src/pages/Tickets/components/readModal.tsx
@@ -175,7 +175,11 @@ export default ({ id, toReload }) => { | @@ -175,7 +175,11 @@ export default ({ id, toReload }) => { | ||
175 | defaultDoms[0], | 175 | defaultDoms[0], |
176 | <Space key="buttons"> | 176 | <Space key="buttons"> |
177 | {!isEditMode && !isProcessing && ( | 177 | {!isEditMode && !isProcessing && ( |
178 | - <Button type="primary" onClick={() => setIsEditMode(true)}> | 178 | + <Button |
179 | + type="primary" | ||
180 | + onClick={() => setIsEditMode(true)} | ||
181 | + disabled={status === 'SOLVED'} | ||
182 | + > | ||
179 | 编辑 | 183 | 编辑 |
180 | </Button> | 184 | </Button> |
181 | )} | 185 | )} |
@@ -329,6 +333,35 @@ export default ({ id, toReload }) => { | @@ -329,6 +333,35 @@ export default ({ id, toReload }) => { | ||
329 | <span>{status === 'SOLVED' ? '已处理' : '待处理'}</span> | 333 | <span>{status === 'SOLVED' ? '已处理' : '待处理'}</span> |
330 | </Form.Item> | 334 | </Form.Item> |
331 | </ProCard> | 335 | </ProCard> |
336 | + {status === 'SOLVED' && ( | ||
337 | + <> | ||
338 | + <ProCard> | ||
339 | + <Form.Item label="处理结果"> | ||
340 | + <ProFormText | ||
341 | + name="result" | ||
342 | + placeholder="请输入处理结果" | ||
343 | + width={200} | ||
344 | + readonly | ||
345 | + /> | ||
346 | + </Form.Item> | ||
347 | + </ProCard> | ||
348 | + <ProCard> | ||
349 | + <Form.Item label="附件"> | ||
350 | + {form.getFieldValue('resultAnnexUrl') ? ( | ||
351 | + <a | ||
352 | + href={form.getFieldValue('resultAnnexUrl')} | ||
353 | + target="_blank" | ||
354 | + rel="noopener noreferrer" | ||
355 | + > | ||
356 | + {form.getFieldValue('resultAnnexName') || '附件'} | ||
357 | + </a> | ||
358 | + ) : ( | ||
359 | + <span>无附件</span> | ||
360 | + )} | ||
361 | + </Form.Item> | ||
362 | + </ProCard> | ||
363 | + </> | ||
364 | + )} | ||
332 | </ProCard.Group> | 365 | </ProCard.Group> |
333 | </ProCard> | 366 | </ProCard> |
334 | </ProCard> | 367 | </ProCard> |
src/pages/Tickets/components/solveBtnModal.tsx
@@ -20,7 +20,7 @@ const waitTime = (time = 100) => { | @@ -20,7 +20,7 @@ const waitTime = (time = 100) => { | ||
20 | }); | 20 | }); |
21 | }; | 21 | }; |
22 | 22 | ||
23 | -export default ({ id, reload, show, closeMadel, solved }) => { | 23 | +export default ({ id, reload, show, solved }) => { |
24 | const [form] = Form.useForm<{ result: string }>(); | 24 | const [form] = Form.useForm<{ result: string }>(); |
25 | const [fileList, setFileList] = useState<file[]>([]); | 25 | const [fileList, setFileList] = useState<file[]>([]); |
26 | 26 | ||
@@ -72,16 +72,7 @@ export default ({ id, reload, show, closeMadel, solved }) => { | @@ -72,16 +72,7 @@ export default ({ id, reload, show, closeMadel, solved }) => { | ||
72 | title="处理工单" | 72 | title="处理工单" |
73 | width={660} | 73 | width={660} |
74 | form={form} | 74 | form={form} |
75 | - trigger={ | ||
76 | - <Button | ||
77 | - onClick={() => { | ||
78 | - closeMadel(); | ||
79 | - }} | ||
80 | - disabled={show} | ||
81 | - > | ||
82 | - 处理 | ||
83 | - </Button> | ||
84 | - } | 75 | + trigger={<Button disabled={show}>处理</Button>} |
85 | modalProps={{ | 76 | modalProps={{ |
86 | okText: '确定', | 77 | okText: '确定', |
87 | cancelText: '取消', | 78 | cancelText: '取消', |
@@ -95,8 +86,8 @@ export default ({ id, reload, show, closeMadel, solved }) => { | @@ -95,8 +86,8 @@ export default ({ id, reload, show, closeMadel, solved }) => { | ||
95 | ticketRequest.result = values.result; | 86 | ticketRequest.result = values.result; |
96 | } | 87 | } |
97 | if (fileList.length !== 0) { | 88 | if (fileList.length !== 0) { |
98 | - ticketRequest.annexUrl = fileList[0].url; | ||
99 | - ticketRequest.annexName = fileList[0].name; | 89 | + ticketRequest.resultAnnexUrl = fileList[0].url; |
90 | + ticketRequest.resultAnnexName = fileList[0].name; | ||
100 | } | 91 | } |
101 | let res = postOrderErpTicketsUpdate({ | 92 | let res = postOrderErpTicketsUpdate({ |
102 | data: { | 93 | data: { |
src/pages/Tickets/components/solveModal.tsx
@@ -86,8 +86,8 @@ export default ({ id, toReload }) => { | @@ -86,8 +86,8 @@ export default ({ id, toReload }) => { | ||
86 | ticketRequest.result = values.result; | 86 | ticketRequest.result = values.result; |
87 | } | 87 | } |
88 | if (fileList.length !== 0) { | 88 | if (fileList.length !== 0) { |
89 | - ticketRequest.annexUrl = fileList[0].url; | ||
90 | - ticketRequest.annexName = fileList[0].name; | 89 | + ticketRequest.resultAnnexUrl = fileList[0].url; |
90 | + ticketRequest.resultAnnexName = fileList[0].name; | ||
91 | } | 91 | } |
92 | let res = postOrderErpTicketsUpdate({ | 92 | let res = postOrderErpTicketsUpdate({ |
93 | data: { | 93 | data: { |
src/pages/Tickets/index.tsx
@@ -20,6 +20,7 @@ import DeleteButton from './components/deleteModal'; | @@ -20,6 +20,7 @@ import DeleteButton from './components/deleteModal'; | ||
20 | import ReSetPeopleModal from './components/reSetPeopleModal'; | 20 | import ReSetPeopleModal from './components/reSetPeopleModal'; |
21 | import ReadModal from './components/readModal'; | 21 | import ReadModal from './components/readModal'; |
22 | import SolveModal from './components/solveModal'; | 22 | import SolveModal from './components/solveModal'; |
23 | +import './index.less'; | ||
23 | const TicketsPage = () => { | 24 | const TicketsPage = () => { |
24 | const [assignPeopleOptions, setAssignPeopleOptions] = useState([]); | 25 | const [assignPeopleOptions, setAssignPeopleOptions] = useState([]); |
25 | 26 |