diff --git a/src/mes/scheduledTasks/machineTasks/index.js b/src/mes/scheduledTasks/machineTasks/index.js index a23d926..baefa63 100644 --- a/src/mes/scheduledTasks/machineTasks/index.js +++ b/src/mes/scheduledTasks/machineTasks/index.js @@ -17,11 +17,8 @@ import { Space, Dropdown, message, - Tooltip, - Form, - Select + Tooltip } from "antd"; -import { DownOutlined } from '@ant-design/icons'; import { SettingTwoTone } from "@ant-design/icons"; import * as commonFunc from "@/components/Common/commonFunc"; import * as commonUtils from "@/utils/utils"; @@ -351,38 +348,14 @@ const useInfoEvent = props => { props.onTableBtnClick(item); return; } - let value = true - const handleChange = val => { - value = val - } if (showName === "完工") { - Modal.confirm({ title: "温馨提示:", - content:
-
确认完工?
- {/*
*/} - {/*
是否确认完工清场?
*/} - {/* }*/} - {/* onChange={handleChange}*/} - {/* style={{ width: '100%', fontSize: '18px' }}*/} - {/* defaultValue={true}*/} - {/* options={[*/} - {/* { label: '是', value: true },*/} - {/* { label: '否', value: false },*/} - {/* ]}*/} - {/* />*/} - {/*
*/} -
, + content:
确认完工?
, okText: "确认", cancelText: "取消", onOk() { - // const newItem = { - // ...item, - // bComplete: value - // } - handleUpdateProductionplan({ item:newItem, iFlag: 4,}); + handleUpdateProductionplan({ item, iFlag: 4 }); } }); return; @@ -469,17 +442,13 @@ const useInfoEvent = props => { // 更新机台状态 const handleUpdateProductionplan = async ({ item, iFlag, pauseValue }) => { const { app } = props; - const { sId } = item?.record; + const { sId } = item.record; const { token } = app; - let url = `${commonConfig.server_host + const url = `${commonConfig.server_host }oee/updateProductionplan/${sId}/${iFlag}${pauseValue ? `?sWorkOrderChangeMemo=${encodeURIComponent(pauseValue)}` : "" }`; - if (typeof item.bComplete === 'boolean') { - url = url + `?bComplete=${item.bComplete}` - } - const dataReturn = (await commonServices.getService(token, url)).data; if (dataReturn.code === 1) { handleRefresh(); @@ -837,7 +806,7 @@ const MachineTasks = baseProps => { }; const TaskConfirmModal = props => { - const { taskConfirmModalVisible, taskConfirmModalMsg, bPauseOnly = true } = props; + const { taskConfirmModalVisible, taskConfirmModalMsg, bPauseOnly } = props; if (!taskConfirmModalVisible) return ""; const handleClose = () => {