diff --git a/src/mes/indexMes/index.js b/src/mes/indexMes/index.js index 5078552..592a0f3 100644 --- a/src/mes/indexMes/index.js +++ b/src/mes/indexMes/index.js @@ -988,9 +988,13 @@ const SystemFunComponent = () => { // 切换手动/切换自动 const handleProcedureCall1 = async (params = {}, iFlag) => { const extraValues = await new Promise(resolve => { + const shiftValue = String(props.app.sShift || '1'); form.setFieldsValue({ tReportDate: moment(), - sTeamType: props.app.sShift + sTeamType: { + value: shiftValue, // 统一为字符串类型 + label: shiftValue === '1' ? '白班' : '夜班' + } }); Modal.confirm({ title: "取消手动", @@ -1019,7 +1023,7 @@ const SystemFunComponent = () => { onOk() { const values = form.getFieldsValue(); const tReportDate = values?.tReportDate.format("YYYY-MM-DD") || ""; - const sTeamType = values.sTeamType; + const sTeamType = values.sTeamType?.value || ''; resolve({ tReportDate, sTeamType }); }, onCancel() {