Commit 6027d3714e9f9f8bdd232a35bd63c7a5bd8b9a6f
1 parent
e7eb8706
回滚机台完工按钮功能
Showing
1 changed file
with
6 additions
and
37 deletions
src/mes/scheduledTasks/machineTasks/index.js
| @@ -17,11 +17,8 @@ import { | @@ -17,11 +17,8 @@ import { | ||
| 17 | Space, | 17 | Space, |
| 18 | Dropdown, | 18 | Dropdown, |
| 19 | message, | 19 | message, |
| 20 | - Tooltip, | ||
| 21 | - Form, | ||
| 22 | - Select | 20 | + Tooltip |
| 23 | } from "antd"; | 21 | } from "antd"; |
| 24 | -import { DownOutlined } from '@ant-design/icons'; | ||
| 25 | import { SettingTwoTone } from "@ant-design/icons"; | 22 | import { SettingTwoTone } from "@ant-design/icons"; |
| 26 | import * as commonFunc from "@/components/Common/commonFunc"; | 23 | import * as commonFunc from "@/components/Common/commonFunc"; |
| 27 | import * as commonUtils from "@/utils/utils"; | 24 | import * as commonUtils from "@/utils/utils"; |
| @@ -351,38 +348,14 @@ const useInfoEvent = props => { | @@ -351,38 +348,14 @@ const useInfoEvent = props => { | ||
| 351 | props.onTableBtnClick(item); | 348 | props.onTableBtnClick(item); |
| 352 | return; | 349 | return; |
| 353 | } | 350 | } |
| 354 | - let value = true | ||
| 355 | - const handleChange = val => { | ||
| 356 | - value = val | ||
| 357 | - } | ||
| 358 | if (showName === "完工") { | 351 | if (showName === "完工") { |
| 359 | - | ||
| 360 | Modal.confirm({ | 352 | Modal.confirm({ |
| 361 | title: "温馨提示:", | 353 | title: "温馨提示:", |
| 362 | - content: <div> | ||
| 363 | - <div>确认完工?</div> | ||
| 364 | - {/*<div>*/} | ||
| 365 | - {/* <div style={{ padding: '8px 0' }}>是否确认完工清场?</div>*/} | ||
| 366 | - {/* <Select*/} | ||
| 367 | - {/* suffixIcon={<DownOutlined style={{ fontSize: '16px' }} />}*/} | ||
| 368 | - {/* onChange={handleChange}*/} | ||
| 369 | - {/* style={{ width: '100%', fontSize: '18px' }}*/} | ||
| 370 | - {/* defaultValue={true}*/} | ||
| 371 | - {/* options={[*/} | ||
| 372 | - {/* { label: '是', value: true },*/} | ||
| 373 | - {/* { label: '否', value: false },*/} | ||
| 374 | - {/* ]}*/} | ||
| 375 | - {/* />*/} | ||
| 376 | - {/*</div>*/} | ||
| 377 | - </div>, | 354 | + content: <div>确认完工?</div>, |
| 378 | okText: "确认", | 355 | okText: "确认", |
| 379 | cancelText: "取消", | 356 | cancelText: "取消", |
| 380 | onOk() { | 357 | onOk() { |
| 381 | - // const newItem = { | ||
| 382 | - // ...item, | ||
| 383 | - // bComplete: value | ||
| 384 | - // } | ||
| 385 | - handleUpdateProductionplan({ item:newItem, iFlag: 4,}); | 358 | + handleUpdateProductionplan({ item, iFlag: 4 }); |
| 386 | } | 359 | } |
| 387 | }); | 360 | }); |
| 388 | return; | 361 | return; |
| @@ -469,17 +442,13 @@ const useInfoEvent = props => { | @@ -469,17 +442,13 @@ const useInfoEvent = props => { | ||
| 469 | // 更新机台状态 | 442 | // 更新机台状态 |
| 470 | const handleUpdateProductionplan = async ({ item, iFlag, pauseValue }) => { | 443 | const handleUpdateProductionplan = async ({ item, iFlag, pauseValue }) => { |
| 471 | const { app } = props; | 444 | const { app } = props; |
| 472 | - const { sId } = item?.record; | 445 | + const { sId } = item.record; |
| 473 | const { token } = app; | 446 | const { token } = app; |
| 474 | - let url = `${commonConfig.server_host | 447 | + const url = `${commonConfig.server_host |
| 475 | }oee/updateProductionplan/${sId}/${iFlag}${pauseValue | 448 | }oee/updateProductionplan/${sId}/${iFlag}${pauseValue |
| 476 | ? `?sWorkOrderChangeMemo=${encodeURIComponent(pauseValue)}` | 449 | ? `?sWorkOrderChangeMemo=${encodeURIComponent(pauseValue)}` |
| 477 | : "" | 450 | : "" |
| 478 | }`; | 451 | }`; |
| 479 | - if (typeof item.bComplete === 'boolean') { | ||
| 480 | - url = url + `?bComplete=${item.bComplete}` | ||
| 481 | - } | ||
| 482 | - | ||
| 483 | const dataReturn = (await commonServices.getService(token, url)).data; | 452 | const dataReturn = (await commonServices.getService(token, url)).data; |
| 484 | if (dataReturn.code === 1) { | 453 | if (dataReturn.code === 1) { |
| 485 | handleRefresh(); | 454 | handleRefresh(); |
| @@ -837,7 +806,7 @@ const MachineTasks = baseProps => { | @@ -837,7 +806,7 @@ const MachineTasks = baseProps => { | ||
| 837 | }; | 806 | }; |
| 838 | 807 | ||
| 839 | const TaskConfirmModal = props => { | 808 | const TaskConfirmModal = props => { |
| 840 | - const { taskConfirmModalVisible, taskConfirmModalMsg, bPauseOnly = true } = props; | 809 | + const { taskConfirmModalVisible, taskConfirmModalMsg, bPauseOnly } = props; |
| 841 | if (!taskConfirmModalVisible) return ""; | 810 | if (!taskConfirmModalVisible) return ""; |
| 842 | 811 | ||
| 843 | const handleClose = () => { | 812 | const handleClose = () => { |