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 | 17 | Space, |
| 18 | 18 | Dropdown, |
| 19 | 19 | message, |
| 20 | - Tooltip, | |
| 21 | - Form, | |
| 22 | - Select | |
| 20 | + Tooltip | |
| 23 | 21 | } from "antd"; |
| 24 | -import { DownOutlined } from '@ant-design/icons'; | |
| 25 | 22 | import { SettingTwoTone } from "@ant-design/icons"; |
| 26 | 23 | import * as commonFunc from "@/components/Common/commonFunc"; |
| 27 | 24 | import * as commonUtils from "@/utils/utils"; |
| ... | ... | @@ -351,38 +348,14 @@ const useInfoEvent = props => { |
| 351 | 348 | props.onTableBtnClick(item); |
| 352 | 349 | return; |
| 353 | 350 | } |
| 354 | - let value = true | |
| 355 | - const handleChange = val => { | |
| 356 | - value = val | |
| 357 | - } | |
| 358 | 351 | if (showName === "完工") { |
| 359 | - | |
| 360 | 352 | Modal.confirm({ |
| 361 | 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 | 355 | okText: "确认", |
| 379 | 356 | cancelText: "取消", |
| 380 | 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 | 361 | return; |
| ... | ... | @@ -469,17 +442,13 @@ const useInfoEvent = props => { |
| 469 | 442 | // 更新机台状态 |
| 470 | 443 | const handleUpdateProductionplan = async ({ item, iFlag, pauseValue }) => { |
| 471 | 444 | const { app } = props; |
| 472 | - const { sId } = item?.record; | |
| 445 | + const { sId } = item.record; | |
| 473 | 446 | const { token } = app; |
| 474 | - let url = `${commonConfig.server_host | |
| 447 | + const url = `${commonConfig.server_host | |
| 475 | 448 | }oee/updateProductionplan/${sId}/${iFlag}${pauseValue |
| 476 | 449 | ? `?sWorkOrderChangeMemo=${encodeURIComponent(pauseValue)}` |
| 477 | 450 | : "" |
| 478 | 451 | }`; |
| 479 | - if (typeof item.bComplete === 'boolean') { | |
| 480 | - url = url + `?bComplete=${item.bComplete}` | |
| 481 | - } | |
| 482 | - | |
| 483 | 452 | const dataReturn = (await commonServices.getService(token, url)).data; |
| 484 | 453 | if (dataReturn.code === 1) { |
| 485 | 454 | handleRefresh(); |
| ... | ... | @@ -837,7 +806,7 @@ const MachineTasks = baseProps => { |
| 837 | 806 | }; |
| 838 | 807 | |
| 839 | 808 | const TaskConfirmModal = props => { |
| 840 | - const { taskConfirmModalVisible, taskConfirmModalMsg, bPauseOnly = true } = props; | |
| 809 | + const { taskConfirmModalVisible, taskConfirmModalMsg, bPauseOnly } = props; | |
| 841 | 810 | if (!taskConfirmModalVisible) return ""; |
| 842 | 811 | |
| 843 | 812 | const handleClose = () => { | ... | ... |