Commit 5b10677b9e74a327309d1c83282fd6424aebf574
1 parent
198ee074
同步代码;
Showing
2 changed files
with
543 additions
and
352 deletions
src/mes/common/commonModelComponent/index.js
| @@ -347,6 +347,7 @@ const useCommonModelEvent = props => { | @@ -347,6 +347,7 @@ const useCommonModelEvent = props => { | ||
| 347 | useEffect( | 347 | useEffect( |
| 348 | () => { | 348 | () => { |
| 349 | if (!props.bFinish) return; | 349 | if (!props.bFinish) return; |
| 350 | + window.refreshTableList = undefined; | ||
| 350 | 351 | ||
| 351 | const { firstTableName } = props; | 352 | const { firstTableName } = props; |
| 352 | if (!firstTableName) return; | 353 | if (!firstTableName) return; |
src/mes/costomPageFun/index.js
| @@ -7,16 +7,10 @@ import * as commonServices from "@/services/services"; | @@ -7,16 +7,10 @@ import * as commonServices from "@/services/services"; | ||
| 7 | import FaceDetect from "@/components/FaceDetect"; | 7 | import FaceDetect from "@/components/FaceDetect"; |
| 8 | import ShowType from "@/components/Common/CommonComponent"; | 8 | import ShowType from "@/components/Common/CommonComponent"; |
| 9 | const costomPageFun = ({ props, tableName, sFieldName, actionName }) => { | 9 | const costomPageFun = ({ props, tableName, sFieldName, actionName }) => { |
| 10 | - const { sModelsId } = commonUtils.convertStrToObj( | ||
| 11 | - localStorage.xlybusinesscurrentMesPane | ||
| 12 | - ); | 10 | + const { sModelsId } = commonUtils.convertStrToObj(localStorage.xlybusinesscurrentMesPane); |
| 13 | 11 | ||
| 14 | let result = false; | 12 | let result = false; |
| 15 | - switch ( | ||
| 16 | - `${sModelsId}-${tableName}${ | ||
| 17 | - sFieldName ? `-${sFieldName}` : "" | ||
| 18 | - }-${actionName}` | ||
| 19 | - ) { | 13 | + switch (`${sModelsId}-${tableName}${sFieldName ? `-${sFieldName}` : ""}-${actionName}`) { |
| 20 | case "12710101117087404588200-table0-mesTableLineAdd": | 14 | case "12710101117087404588200-table0-mesTableLineAdd": |
| 21 | case "12710101117260270570210-table0-mesTableLineAdd": | 15 | case "12710101117260270570210-table0-mesTableLineAdd": |
| 22 | case "12710101117087371044360-slave0-mesTableLineAdd": | 16 | case "12710101117087371044360-slave0-mesTableLineAdd": |
| @@ -85,10 +79,10 @@ const costomPageFun = ({ props, tableName, sFieldName, actionName }) => { | @@ -85,10 +79,10 @@ const costomPageFun = ({ props, tableName, sFieldName, actionName }) => { | ||
| 85 | } | 79 | } |
| 86 | break; | 80 | break; |
| 87 | } | 81 | } |
| 88 | - case "12710101117089395856660-table1-mesTableBtnClick": { | 82 | + case "12710101117089395856660-table1-mesTableBtnClick": { |
| 89 | mesTableBtnClick4(props); | 83 | mesTableBtnClick4(props); |
| 90 | result = true; | 84 | result = true; |
| 91 | - } | 85 | + } |
| 92 | default: | 86 | default: |
| 93 | break; | 87 | break; |
| 94 | } | 88 | } |
| @@ -131,14 +125,63 @@ const costomPageFun = ({ props, tableName, sFieldName, actionName }) => { | @@ -131,14 +125,63 @@ const costomPageFun = ({ props, tableName, sFieldName, actionName }) => { | ||
| 131 | result = true; | 125 | result = true; |
| 132 | handleZlxjCheck(props, sFieldName); | 126 | handleZlxjCheck(props, sFieldName); |
| 133 | break; | 127 | break; |
| 128 | + case "mesBtnClick-slave0-BtnRight.foremanReview": | ||
| 129 | + result = true; | ||
| 130 | + window.refreshTableList = ["slave1"]; | ||
| 131 | + handleCjlbshCheck(props); | ||
| 132 | + break; | ||
| 133 | + case "mesBtnClick-slave0-BtnRight.reverseReview": | ||
| 134 | + result = true; | ||
| 135 | + window.refreshTableList = ["slave1"]; | ||
| 136 | + handleCjlbfsCheck(props); | ||
| 137 | + break; | ||
| 138 | + case "mesBtnClick-slave0-BtnRight.ipqcReview": | ||
| 139 | + result = true; | ||
| 140 | + window.refreshTableList = ["slave1"]; | ||
| 141 | + handlePgshCheck(props); | ||
| 142 | + break; | ||
| 143 | + case "mesBtnClick-slave0-BtnRight.ipqcReverseReview": | ||
| 144 | + result = true; | ||
| 145 | + window.refreshTableList = ["slave1"]; | ||
| 146 | + handlePgfsCheck(props); | ||
| 147 | + break; | ||
| 148 | + case "mesBtnClick-slave0-BtnRight.confirmSubmit": | ||
| 149 | + result = true; | ||
| 150 | + window.refreshTableList = ["slave1"]; | ||
| 151 | + handleConfirmSubmit(props); | ||
| 152 | + break; | ||
| 153 | + case "mesBtnClick-slave0-BtnRight..edit": | ||
| 154 | + case "mesBtnClick-slave0-BtnRight.edit": | ||
| 155 | + { | ||
| 156 | + window.refreshTableList = ["slave1"]; | ||
| 157 | + const { slave0Data } = props; | ||
| 158 | + result = true; | ||
| 159 | + const slave0DataNew = [{ ...slave0Data[0], bSubmit: 0, handleType: slave0Data[0].handleType || "update" }]; | ||
| 160 | + props.onExecInstructSet({ | ||
| 161 | + nextProps: { ...props, slave0Data: slave0DataNew }, | ||
| 162 | + btnConfig: { | ||
| 163 | + showName: "保存", | ||
| 164 | + sInstruct: JSON.stringify([ | ||
| 165 | + { | ||
| 166 | + opr: "save", | ||
| 167 | + data: [ | ||
| 168 | + { | ||
| 169 | + tablename: "EptCompletionSiteClearanceMaster", | ||
| 170 | + srcDataset: "slave0", | ||
| 171 | + }, | ||
| 172 | + ], | ||
| 173 | + }, | ||
| 174 | + ]), | ||
| 175 | + }, | ||
| 176 | + }); | ||
| 177 | + break; | ||
| 178 | + } | ||
| 179 | + | ||
| 134 | default: | 180 | default: |
| 135 | break; | 181 | break; |
| 136 | } | 182 | } |
| 137 | 183 | ||
| 138 | - if ( | ||
| 139 | - ["mesBtnClick"].includes(actionName) && | ||
| 140 | - ["BtnRight.PriorCom", "BtnRight.NextCom"].includes(sFieldName) | ||
| 141 | - ) { | 184 | + if (["mesBtnClick"].includes(actionName) && ["BtnRight.PriorCom", "BtnRight.NextCom"].includes(sFieldName)) { |
| 142 | handleUpDownData({ ...props, tableName, sFieldName }); | 185 | handleUpDownData({ ...props, tableName, sFieldName }); |
| 143 | return true; | 186 | return true; |
| 144 | } | 187 | } |
| @@ -149,19 +192,14 @@ const costomPageFun = ({ props, tableName, sFieldName, actionName }) => { | @@ -149,19 +192,14 @@ const costomPageFun = ({ props, tableName, sFieldName, actionName }) => { | ||
| 149 | // 班组报工行车记录表格新增 | 192 | // 班组报工行车记录表格新增 |
| 150 | const mesTableLineAdd1 = (props, tableName) => { | 193 | const mesTableLineAdd1 = (props, tableName) => { |
| 151 | // const tableName = "table0"; | 194 | // const tableName = "table0"; |
| 152 | - const { | ||
| 153 | - [`${tableName}SelectedRowKeys`]: selectedRowKeys, | ||
| 154 | - [`${tableName}Data`]: tableData = [] | ||
| 155 | - } = props; | 195 | + const { [`${tableName}SelectedRowKeys`]: selectedRowKeys, [`${tableName}Data`]: tableData = [] } = props; |
| 156 | 196 | ||
| 157 | if (commonUtils.isEmptyObject(selectedRowKeys)) { | 197 | if (commonUtils.isEmptyObject(selectedRowKeys)) { |
| 158 | message.info("请先选中一条行车记录数据!"); | 198 | message.info("请先选中一条行车记录数据!"); |
| 159 | return; | 199 | return; |
| 160 | } | 200 | } |
| 161 | 201 | ||
| 162 | - const rowDataIndex = tableData.findIndex( | ||
| 163 | - item => item.sId === selectedRowKeys[0] | ||
| 164 | - ); | 202 | + const rowDataIndex = tableData.findIndex(item => item.sId === selectedRowKeys[0]); |
| 165 | if (rowDataIndex === -1) return; | 203 | if (rowDataIndex === -1) return; |
| 166 | 204 | ||
| 167 | const rowData = tableData[rowDataIndex]; | 205 | const rowData = tableData[rowDataIndex]; |
| @@ -206,21 +244,17 @@ const mesTableLineAdd1 = (props, tableName) => { | @@ -206,21 +244,17 @@ const mesTableLineAdd1 = (props, tableName) => { | ||
| 206 | props.onSaveState( | 244 | props.onSaveState( |
| 207 | { | 245 | { |
| 208 | [`${tableName}Data`]: tableDataNew, | 246 | [`${tableName}Data`]: tableDataNew, |
| 209 | - [`${tableName}SelectedRowKeys`]: [rowDataCopy.sId] | 247 | + [`${tableName}SelectedRowKeys`]: [rowDataCopy.sId], |
| 210 | }, | 248 | }, |
| 211 | nextProps => { | 249 | nextProps => { |
| 212 | const name = tableName; | 250 | const name = tableName; |
| 213 | const { [`${name}Config`]: tableConfig = {} } = nextProps; | 251 | const { [`${name}Config`]: tableConfig = {} } = nextProps; |
| 214 | - const rowClickConfig = tableConfig.gdsconfigformslave?.find( | ||
| 215 | - item => | ||
| 216 | - item.sControlName && | ||
| 217 | - item.sControlName.toLowerCase().includes("rowclick") | ||
| 218 | - ); | 252 | + const rowClickConfig = tableConfig.gdsconfigformslave?.find(item => item.sControlName && item.sControlName.toLowerCase().includes("rowclick")); |
| 219 | if (!rowClickConfig) return; | 253 | if (!rowClickConfig) return; |
| 220 | 254 | ||
| 221 | props.handleExecInstructSet({ | 255 | props.handleExecInstructSet({ |
| 222 | btnConfig: rowClickConfig, | 256 | btnConfig: rowClickConfig, |
| 223 | - nextProps: nextProps | 257 | + nextProps: nextProps, |
| 224 | }); | 258 | }); |
| 225 | } | 259 | } |
| 226 | ); | 260 | ); |
| @@ -228,9 +262,7 @@ const mesTableLineAdd1 = (props, tableName) => { | @@ -228,9 +262,7 @@ const mesTableLineAdd1 = (props, tableName) => { | ||
| 228 | 262 | ||
| 229 | // 研发工艺参数材料表新增 | 263 | // 研发工艺参数材料表新增 |
| 230 | const mesTableLineAdd2 = (props, tableName) => { | 264 | const mesTableLineAdd2 = (props, tableName) => { |
| 231 | - const oTab = document | ||
| 232 | - .querySelector('.ant-tabs-tabpane-active[id*="研发工艺参数"]') | ||
| 233 | - .querySelector(".ant-tabs-tab-active"); | 265 | + const oTab = document.querySelector('.ant-tabs-tabpane-active[id*="研发工艺参数"]').querySelector(".ant-tabs-tab-active"); |
| 234 | if (!oTab) return; | 266 | if (!oTab) return; |
| 235 | 267 | ||
| 236 | const dataNodeKey = oTab.getAttribute("data-node-key") || ""; | 268 | const dataNodeKey = oTab.getAttribute("data-node-key") || ""; |
| @@ -242,29 +274,23 @@ const mesTableLineAdd2 = (props, tableName) => { | @@ -242,29 +274,23 @@ const mesTableLineAdd2 = (props, tableName) => { | ||
| 242 | handleType: "add", | 274 | handleType: "add", |
| 243 | sParentId: props.yftable0Data?.[0]?.sId || "", | 275 | sParentId: props.yftable0Data?.[0]?.sId || "", |
| 244 | sRev, | 276 | sRev, |
| 245 | - bSave: 0 | 277 | + bSave: 0, |
| 246 | }; | 278 | }; |
| 247 | 279 | ||
| 248 | const { [`${tableName}Data`]: tableData = [] } = props; | 280 | const { [`${tableName}Data`]: tableData = [] } = props; |
| 249 | props.onSaveState({ | 281 | props.onSaveState({ |
| 250 | - [`${tableName}Data`]: [...tableData, newData] | 282 | + [`${tableName}Data`]: [...tableData, newData], |
| 251 | }); | 283 | }); |
| 252 | }; | 284 | }; |
| 253 | 285 | ||
| 254 | // 班组报工行车记录表格起始时间修改 | 286 | // 班组报工行车记录表格起始时间修改 |
| 255 | const mesTableChange1 = (props, tableName) => { | 287 | const mesTableChange1 = (props, tableName) => { |
| 256 | // const tableName = "table0"; | 288 | // const tableName = "table0"; |
| 257 | - const { | ||
| 258 | - [`${tableName}SelectedRowKeys`]: selectedRowKeys, | ||
| 259 | - [`${tableName}Data`]: tableData = [], | ||
| 260 | - rowDataOld | ||
| 261 | - } = props; | 289 | + const { [`${tableName}SelectedRowKeys`]: selectedRowKeys, [`${tableName}Data`]: tableData = [], rowDataOld } = props; |
| 262 | 290 | ||
| 263 | let tableDataNew = lodash.cloneDeep(tableData); | 291 | let tableDataNew = lodash.cloneDeep(tableData); |
| 264 | 292 | ||
| 265 | - const rowDataIndex = tableData.findIndex( | ||
| 266 | - item => item.sId === selectedRowKeys[0] | ||
| 267 | - ); | 293 | + const rowDataIndex = tableData.findIndex(item => item.sId === selectedRowKeys[0]); |
| 268 | if (rowDataIndex === -1) return; | 294 | if (rowDataIndex === -1) return; |
| 269 | 295 | ||
| 270 | const rowData = tableData[rowDataIndex]; | 296 | const rowData = tableData[rowDataIndex]; |
| @@ -275,30 +301,23 @@ const mesTableChange1 = (props, tableName) => { | @@ -275,30 +301,23 @@ const mesTableChange1 = (props, tableName) => { | ||
| 275 | return; | 301 | return; |
| 276 | } | 302 | } |
| 277 | 303 | ||
| 278 | - let parentRowDataIndex = tableData.findIndex( | ||
| 279 | - item => item.sId !== sId && item.tStartDate === tStartDate | ||
| 280 | - ); | 304 | + let parentRowDataIndex = tableData.findIndex(item => item.sId !== sId && item.tStartDate === tStartDate); |
| 281 | 305 | ||
| 282 | if (parentRowDataIndex === -1) { | 306 | if (parentRowDataIndex === -1) { |
| 283 | - parentRowDataIndex = tableData.findIndex( | ||
| 284 | - item => item.tStartDate === rowDataOld.tEndDate | ||
| 285 | - ); | 307 | + parentRowDataIndex = tableData.findIndex(item => item.tStartDate === rowDataOld.tEndDate); |
| 286 | } | 308 | } |
| 287 | 309 | ||
| 288 | if (parentRowDataIndex === -1) return; | 310 | if (parentRowDataIndex === -1) return; |
| 289 | 311 | ||
| 290 | const parentRowData = tableData[parentRowDataIndex]; | 312 | const parentRowData = tableData[parentRowDataIndex]; |
| 291 | - const { | ||
| 292 | - tStartDate: tStartDateParent, | ||
| 293 | - tEndDate: tEndDateParent | ||
| 294 | - } = parentRowData; | 313 | + const { tStartDate: tStartDateParent, tEndDate: tEndDateParent } = parentRowData; |
| 295 | 314 | ||
| 296 | // 检查tStartDate是否在tEndDate之前 | 315 | // 检查tStartDate是否在tEndDate之前 |
| 297 | if (moment(tEndDate).isBefore(moment(tStartDate))) { | 316 | if (moment(tEndDate).isBefore(moment(tStartDate))) { |
| 298 | message.info("结束时间不能小于起始时间!", 3); | 317 | message.info("结束时间不能小于起始时间!", 3); |
| 299 | tableDataNew[rowDataIndex] = rowDataOld; | 318 | tableDataNew[rowDataIndex] = rowDataOld; |
| 300 | props.onSaveState({ | 319 | props.onSaveState({ |
| 301 | - [`${tableName}Data`]: tableDataNew | 320 | + [`${tableName}Data`]: tableDataNew, |
| 302 | }); | 321 | }); |
| 303 | return; | 322 | return; |
| 304 | } | 323 | } |
| @@ -308,7 +327,7 @@ const mesTableChange1 = (props, tableName) => { | @@ -308,7 +327,7 @@ const mesTableChange1 = (props, tableName) => { | ||
| 308 | message.info("结束不能大于父节点的结束时间!", 3); | 327 | message.info("结束不能大于父节点的结束时间!", 3); |
| 309 | tableDataNew[rowDataIndex] = rowDataOld; | 328 | tableDataNew[rowDataIndex] = rowDataOld; |
| 310 | props.onSaveState({ | 329 | props.onSaveState({ |
| 311 | - [`${tableName}Data`]: tableDataNew | 330 | + [`${tableName}Data`]: tableDataNew, |
| 312 | }); | 331 | }); |
| 313 | return; | 332 | return; |
| 314 | } | 333 | } |
| @@ -318,7 +337,7 @@ const mesTableChange1 = (props, tableName) => { | @@ -318,7 +337,7 @@ const mesTableChange1 = (props, tableName) => { | ||
| 318 | message.info("结束不能大于当前时间!", 3); | 337 | message.info("结束不能大于当前时间!", 3); |
| 319 | tableDataNew[rowDataIndex] = rowDataOld; | 338 | tableDataNew[rowDataIndex] = rowDataOld; |
| 320 | props.onSaveState({ | 339 | props.onSaveState({ |
| 321 | - [`${tableName}Data`]: tableDataNew | 340 | + [`${tableName}Data`]: tableDataNew, |
| 322 | }); | 341 | }); |
| 323 | return; | 342 | return; |
| 324 | } | 343 | } |
| @@ -326,14 +345,13 @@ const mesTableChange1 = (props, tableName) => { | @@ -326,14 +345,13 @@ const mesTableChange1 = (props, tableName) => { | ||
| 326 | // 父节点的结束时间改成当前行的起始时间 | 345 | // 父节点的结束时间改成当前行的起始时间 |
| 327 | tableDataNew[rowDataIndex].bUnChanged = false; | 346 | tableDataNew[rowDataIndex].bUnChanged = false; |
| 328 | tableDataNew[parentRowDataIndex].tStartDate = tEndDate; | 347 | tableDataNew[parentRowDataIndex].tStartDate = tEndDate; |
| 329 | - tableDataNew[parentRowDataIndex].handleType = | ||
| 330 | - tableDataNew[parentRowDataIndex].handleType || "update"; | 348 | + tableDataNew[parentRowDataIndex].handleType = tableDataNew[parentRowDataIndex].handleType || "update"; |
| 331 | 349 | ||
| 332 | // 时间倒序排序 | 350 | // 时间倒序排序 |
| 333 | tableDataNew.sort((a, b) => new Date(b.tEndDate) - new Date(a.tEndDate)); | 351 | tableDataNew.sort((a, b) => new Date(b.tEndDate) - new Date(a.tEndDate)); |
| 334 | 352 | ||
| 335 | const addState = { | 353 | const addState = { |
| 336 | - [`${tableName}Data`]: tableDataNew | 354 | + [`${tableName}Data`]: tableDataNew, |
| 337 | }; | 355 | }; |
| 338 | props.onSaveState(addState); | 356 | props.onSaveState(addState); |
| 339 | 357 | ||
| @@ -353,32 +371,28 @@ const mesTableLineDel1 = async (props, tableName) => { | @@ -353,32 +371,28 @@ const mesTableLineDel1 = async (props, tableName) => { | ||
| 353 | if (commonUtils.isNotEmptyArr(tableData)) { | 371 | if (commonUtils.isNotEmptyArr(tableData)) { |
| 354 | const addState = { | 372 | const addState = { |
| 355 | [`${tableName}SelectedRowKeys`]: [tableData[0].sId], | 373 | [`${tableName}SelectedRowKeys`]: [tableData[0].sId], |
| 356 | - [`slave1SelectedRowKeys`]: [tableData[0].sAbnormalEventId] | 374 | + [`slave1SelectedRowKeys`]: [tableData[0].sAbnormalEventId], |
| 357 | }; | 375 | }; |
| 358 | 376 | ||
| 359 | if (tableData.some(item => item.bUnChanged)) { | 377 | if (tableData.some(item => item.bUnChanged)) { |
| 360 | addState[`${tableName}Data`] = tableData.map(item => ({ | 378 | addState[`${tableName}Data`] = tableData.map(item => ({ |
| 361 | ...item, | 379 | ...item, |
| 362 | - bUnChanged: undefined | 380 | + bUnChanged: undefined, |
| 363 | })); | 381 | })); |
| 364 | } | 382 | } |
| 365 | 383 | ||
| 366 | props.onSaveState(addState); | 384 | props.onSaveState(addState); |
| 367 | const name = tableName; | 385 | const name = tableName; |
| 368 | const { [`${name}Config`]: tableConfig = {} } = props; | 386 | const { [`${name}Config`]: tableConfig = {} } = props; |
| 369 | - const rowClickConfig = tableConfig.gdsconfigformslave?.find( | ||
| 370 | - item => | ||
| 371 | - item.sControlName && | ||
| 372 | - item.sControlName.toLowerCase().includes("rowclick") | ||
| 373 | - ); | 387 | + const rowClickConfig = tableConfig.gdsconfigformslave?.find(item => item.sControlName && item.sControlName.toLowerCase().includes("rowclick")); |
| 374 | if (!rowClickConfig) return; | 388 | if (!rowClickConfig) return; |
| 375 | await awaitPromiseReturn(); | 389 | await awaitPromiseReturn(); |
| 376 | props.handleExecInstructSet({ | 390 | props.handleExecInstructSet({ |
| 377 | btnConfig: rowClickConfig, | 391 | btnConfig: rowClickConfig, |
| 378 | nextProps: { | 392 | nextProps: { |
| 379 | ...props, | 393 | ...props, |
| 380 | - [`${tableName}SelectedRowKeys`]: [tableData[0].sId] | ||
| 381 | - } | 394 | + [`${tableName}SelectedRowKeys`]: [tableData[0].sId], |
| 395 | + }, | ||
| 382 | }); | 396 | }); |
| 383 | } | 397 | } |
| 384 | return; | 398 | return; |
| @@ -386,10 +400,7 @@ const mesTableLineDel1 = async (props, tableName) => { | @@ -386,10 +400,7 @@ const mesTableLineDel1 = async (props, tableName) => { | ||
| 386 | 400 | ||
| 387 | // 找剩余数据中开始时间等于删除数据结束时间的那条数据 | 401 | // 找剩余数据中开始时间等于删除数据结束时间的那条数据 |
| 388 | const iIndex = tableData.findIndex( | 402 | const iIndex = tableData.findIndex( |
| 389 | - item => | ||
| 390 | - !item.bUnChanged && | ||
| 391 | - (item.sSrcHourId === sSrcHourId || item.sId === sSrcHourId) && | ||
| 392 | - tEndDate === item.tStartDate | 403 | + item => !item.bUnChanged && (item.sSrcHourId === sSrcHourId || item.sId === sSrcHourId) && tEndDate === item.tStartDate |
| 393 | ); | 404 | ); |
| 394 | if (iIndex === -1) { | 405 | if (iIndex === -1) { |
| 395 | if (tableName === "table0") { | 406 | if (tableName === "table0") { |
| @@ -404,7 +415,7 @@ const mesTableLineDel1 = async (props, tableName) => { | @@ -404,7 +415,7 @@ const mesTableLineDel1 = async (props, tableName) => { | ||
| 404 | tableDataNew[iIndex].tStartDate = tStartDate; | 415 | tableDataNew[iIndex].tStartDate = tStartDate; |
| 405 | tableDataNew[iIndex].handleType = tableDataNew[iIndex].handleType || "update"; | 416 | tableDataNew[iIndex].handleType = tableDataNew[iIndex].handleType || "update"; |
| 406 | const addState = { | 417 | const addState = { |
| 407 | - [`${tableName}Data`]: tableDataNew | 418 | + [`${tableName}Data`]: tableDataNew, |
| 408 | }; | 419 | }; |
| 409 | props.onSaveState(addState); | 420 | props.onSaveState(addState); |
| 410 | 421 | ||
| @@ -424,73 +435,67 @@ const handleMesSave = props => { | @@ -424,73 +435,67 @@ const handleMesSave = props => { | ||
| 424 | sInstruct: JSON.stringify([ | 435 | sInstruct: JSON.stringify([ |
| 425 | { | 436 | { |
| 426 | opr: "newempty", | 437 | opr: "newempty", |
| 427 | - newDataset: "NewReportSlave" | 438 | + newDataset: "NewReportSlave", |
| 428 | }, | 439 | }, |
| 429 | { | 440 | { |
| 430 | opr: "edit", | 441 | opr: "edit", |
| 431 | desDataset: "NewReportSlave", | 442 | desDataset: "NewReportSlave", |
| 432 | dataset: "table0@sec", | 443 | dataset: "table0@sec", |
| 433 | - sValue: | ||
| 434 | - "sNewReportSlaveId:table0.sId,sSrcHourId:table0.sSrcHourId,tEndDate:table0.tEndDate" | 444 | + sValue: "sNewReportSlaveId:table0.sId,sSrcHourId:table0.sSrcHourId,tEndDate:table0.tEndDate", |
| 435 | }, | 445 | }, |
| 436 | { | 446 | { |
| 437 | opr: "filter", | 447 | opr: "filter", |
| 438 | srcDataset: "table0", | 448 | srcDataset: "table0", |
| 439 | newDataset: "OldReportSlave", | 449 | newDataset: "OldReportSlave", |
| 440 | dataset: "NewReportSlave,table0One", | 450 | dataset: "NewReportSlave,table0One", |
| 441 | - condition: "'${table0One.sId}'=='${NewReportSlave.sSrcHourId}'" | 451 | + condition: "'${table0One.sId}'=='${NewReportSlave.sSrcHourId}'", |
| 442 | }, | 452 | }, |
| 443 | { | 453 | { |
| 444 | opr: "newempty", | 454 | opr: "newempty", |
| 445 | - newDataset: "temp0" | 455 | + newDataset: "temp0", |
| 446 | }, | 456 | }, |
| 447 | { | 457 | { |
| 448 | opr: "edit", | 458 | opr: "edit", |
| 449 | desDataset: "temp0", | 459 | desDataset: "temp0", |
| 450 | dataset: "NewReportSlave,OldReportSlave", | 460 | dataset: "NewReportSlave,OldReportSlave", |
| 451 | sValue: | 461 | sValue: |
| 452 | - "iOperateType:${1},sNewReportSlaveId:NewReportSlave.sNewReportSlaveId,sOldReportSlaveId:OldReportSlave.sId,tNewEndDate:NewReportSlave.tEndDate" | 462 | + "iOperateType:${1},sNewReportSlaveId:NewReportSlave.sNewReportSlaveId,sOldReportSlaveId:OldReportSlave.sId,tNewEndDate:NewReportSlave.tEndDate", |
| 453 | }, | 463 | }, |
| 454 | { | 464 | { |
| 455 | opr: "exesql", | 465 | opr: "exesql", |
| 456 | data: [ | 466 | data: [ |
| 457 | { | 467 | { |
| 458 | - sql: | ||
| 459 | - "call Sp_mes_Operate_ProductionReport(${iOperateType},${sNewReportSlaveId},${sOldReportSlaveId},${tNewEndDate})", | ||
| 460 | - srcDataset: "temp0" | ||
| 461 | - } | ||
| 462 | - ] | 468 | + sql: "call Sp_mes_Operate_ProductionReport(${iOperateType},${sNewReportSlaveId},${sOldReportSlaveId},${tNewEndDate})", |
| 469 | + srcDataset: "temp0", | ||
| 470 | + }, | ||
| 471 | + ], | ||
| 463 | }, | 472 | }, |
| 464 | { | 473 | { |
| 465 | opr: "save", | 474 | opr: "save", |
| 466 | data: [ | 475 | data: [ |
| 467 | { | 476 | { |
| 468 | tablename: "mftproductionreportslave", | 477 | tablename: "mftproductionreportslave", |
| 469 | - srcDataset: "table0" | ||
| 470 | - } | ||
| 471 | - ] | 478 | + srcDataset: "table0", |
| 479 | + }, | ||
| 480 | + ], | ||
| 472 | }, | 481 | }, |
| 473 | { | 482 | { |
| 474 | opr: "refresh", | 483 | opr: "refresh", |
| 475 | - dataset: "table0,table1,table4,table0NotFirstlineSelected" | ||
| 476 | - } | ||
| 477 | - ]) | 484 | + dataset: "table0,table1,table4,table0NotFirstlineSelected", |
| 485 | + }, | ||
| 486 | + ]), | ||
| 478 | }, | 487 | }, |
| 479 | inscallback: async () => { | 488 | inscallback: async () => { |
| 480 | const name = "table0"; | 489 | const name = "table0"; |
| 481 | const { [`${name}Config`]: tableConfig = {} } = props; | 490 | const { [`${name}Config`]: tableConfig = {} } = props; |
| 482 | - const rowClickConfig = tableConfig.gdsconfigformslave?.find( | ||
| 483 | - item => | ||
| 484 | - item.sControlName && | ||
| 485 | - item.sControlName.toLowerCase().includes("rowclick") | ||
| 486 | - ); | 491 | + const rowClickConfig = tableConfig.gdsconfigformslave?.find(item => item.sControlName && item.sControlName.toLowerCase().includes("rowclick")); |
| 487 | if (!rowClickConfig) return; | 492 | if (!rowClickConfig) return; |
| 488 | await awaitPromiseReturn(); | 493 | await awaitPromiseReturn(); |
| 489 | props.handleExecInstructSet({ | 494 | props.handleExecInstructSet({ |
| 490 | btnConfig: rowClickConfig, | 495 | btnConfig: rowClickConfig, |
| 491 | - nextProps: props | 496 | + nextProps: props, |
| 492 | }); | 497 | }); |
| 493 | - } | 498 | + }, |
| 494 | }); | 499 | }); |
| 495 | }; | 500 | }; |
| 496 | 501 | ||
| @@ -513,25 +518,24 @@ const handleMesSlave0Save = props => { | @@ -513,25 +518,24 @@ const handleMesSlave0Save = props => { | ||
| 513 | sInstruct: JSON.stringify([ | 518 | sInstruct: JSON.stringify([ |
| 514 | { | 519 | { |
| 515 | opr: "newempty", | 520 | opr: "newempty", |
| 516 | - newDataset: "NewReportSlave" | 521 | + newDataset: "NewReportSlave", |
| 517 | }, | 522 | }, |
| 518 | { | 523 | { |
| 519 | opr: "edit", | 524 | opr: "edit", |
| 520 | desDataset: "NewReportSlave", | 525 | desDataset: "NewReportSlave", |
| 521 | dataset: "slave0@sec", | 526 | dataset: "slave0@sec", |
| 522 | - sValue: | ||
| 523 | - "sNewReportSlaveId:slave0.sId,sSrcHourId:slave0.sSrcHourId,tEndDate:slave0.tEndDate" | 527 | + sValue: "sNewReportSlaveId:slave0.sId,sSrcHourId:slave0.sSrcHourId,tEndDate:slave0.tEndDate", |
| 524 | }, | 528 | }, |
| 525 | { | 529 | { |
| 526 | opr: "filter", | 530 | opr: "filter", |
| 527 | srcDataset: "slave0", | 531 | srcDataset: "slave0", |
| 528 | newDataset: "OldReportSlave", | 532 | newDataset: "OldReportSlave", |
| 529 | dataset: "NewReportSlave,slave0One", | 533 | dataset: "NewReportSlave,slave0One", |
| 530 | - condition: "'${slave0One.sId}'=='${NewReportSlave.sSrcHourId}'" | 534 | + condition: "'${slave0One.sId}'=='${NewReportSlave.sSrcHourId}'", |
| 531 | }, | 535 | }, |
| 532 | { | 536 | { |
| 533 | opr: "newempty", | 537 | opr: "newempty", |
| 534 | - newDataset: "temp0" | 538 | + newDataset: "temp0", |
| 535 | }, | 539 | }, |
| 536 | 540 | ||
| 537 | { | 541 | { |
| @@ -539,48 +543,43 @@ const handleMesSlave0Save = props => { | @@ -539,48 +543,43 @@ const handleMesSlave0Save = props => { | ||
| 539 | desDataset: "temp0", | 543 | desDataset: "temp0", |
| 540 | dataset: "NewReportSlave,OldReportSlave", | 544 | dataset: "NewReportSlave,OldReportSlave", |
| 541 | sValue: | 545 | sValue: |
| 542 | - "iOperateType:${1},sNewReportSlaveId:NewReportSlave.sNewReportSlaveId,sOldReportSlaveId:OldReportSlave.sId,tNewEndDate:NewReportSlave.tEndDate" | 546 | + "iOperateType:${1},sNewReportSlaveId:NewReportSlave.sNewReportSlaveId,sOldReportSlaveId:OldReportSlave.sId,tNewEndDate:NewReportSlave.tEndDate", |
| 543 | }, | 547 | }, |
| 544 | { | 548 | { |
| 545 | opr: "exesql", | 549 | opr: "exesql", |
| 546 | data: [ | 550 | data: [ |
| 547 | { | 551 | { |
| 548 | - sql: | ||
| 549 | - "call Sp_mes_Operate_ProductionReport(${iOperateType},${sNewReportSlaveId},${sOldReportSlaveId},${tNewEndDate})", | ||
| 550 | - srcDataset: "temp0" | ||
| 551 | - } | ||
| 552 | - ] | 552 | + sql: "call Sp_mes_Operate_ProductionReport(${iOperateType},${sNewReportSlaveId},${sOldReportSlaveId},${tNewEndDate})", |
| 553 | + srcDataset: "temp0", | ||
| 554 | + }, | ||
| 555 | + ], | ||
| 553 | }, | 556 | }, |
| 554 | { | 557 | { |
| 555 | opr: "save", | 558 | opr: "save", |
| 556 | data: [ | 559 | data: [ |
| 557 | { | 560 | { |
| 558 | tablename: "mftproductionreportslave", | 561 | tablename: "mftproductionreportslave", |
| 559 | - srcDataset: "slave0" | ||
| 560 | - } | ||
| 561 | - ] | 562 | + srcDataset: "slave0", |
| 563 | + }, | ||
| 564 | + ], | ||
| 562 | }, | 565 | }, |
| 563 | { | 566 | { |
| 564 | opr: "refresh", | 567 | opr: "refresh", |
| 565 | - dataset: "slave0,slave0NotFirstlineSelected" | ||
| 566 | - } | ||
| 567 | - ]) | 568 | + dataset: "slave0,slave0NotFirstlineSelected", |
| 569 | + }, | ||
| 570 | + ]), | ||
| 568 | }, | 571 | }, |
| 569 | inscallback: async nextProps => { | 572 | inscallback: async nextProps => { |
| 570 | const name = "slave0"; | 573 | const name = "slave0"; |
| 571 | const { [`${name}Config`]: tableConfig = {} } = props; | 574 | const { [`${name}Config`]: tableConfig = {} } = props; |
| 572 | - const rowClickConfig = tableConfig.gdsconfigformslave?.find( | ||
| 573 | - item => | ||
| 574 | - item.sControlName && | ||
| 575 | - item.sControlName.toLowerCase().includes("rowclick") | ||
| 576 | - ); | 575 | + const rowClickConfig = tableConfig.gdsconfigformslave?.find(item => item.sControlName && item.sControlName.toLowerCase().includes("rowclick")); |
| 577 | if (!rowClickConfig) return; | 576 | if (!rowClickConfig) return; |
| 578 | await awaitPromiseReturn(); | 577 | await awaitPromiseReturn(); |
| 579 | props.handleExecInstructSet({ | 578 | props.handleExecInstructSet({ |
| 580 | btnConfig: rowClickConfig, | 579 | btnConfig: rowClickConfig, |
| 581 | - nextProps: nextProps | 580 | + nextProps: nextProps, |
| 582 | }); | 581 | }); |
| 583 | - } | 582 | + }, |
| 584 | }); | 583 | }); |
| 585 | }; | 584 | }; |
| 586 | 585 | ||
| @@ -590,7 +589,7 @@ const handleMesSave1 = (props, delRow) => { | @@ -590,7 +589,7 @@ const handleMesSave1 = (props, delRow) => { | ||
| 590 | const temp0Data = []; | 589 | const temp0Data = []; |
| 591 | temp0Data.push({ | 590 | temp0Data.push({ |
| 592 | sNewReportSlaveId: delRow.sId, | 591 | sNewReportSlaveId: delRow.sId, |
| 593 | - sOldReportSlaveId: delRow.sSrcHourId | 592 | + sOldReportSlaveId: delRow.sSrcHourId, |
| 594 | }); | 593 | }); |
| 595 | 594 | ||
| 596 | props.handleExecInstructSet({ | 595 | props.handleExecInstructSet({ |
| @@ -602,11 +601,10 @@ const handleMesSave1 = (props, delRow) => { | @@ -602,11 +601,10 @@ const handleMesSave1 = (props, delRow) => { | ||
| 602 | opr: "exesql", | 601 | opr: "exesql", |
| 603 | data: [ | 602 | data: [ |
| 604 | { | 603 | { |
| 605 | - sql: | ||
| 606 | - "call Sp_mes_Operate_ProductionReport(2,${sNewReportSlaveId},${sOldReportSlaveId},null)", | ||
| 607 | - srcDataset: "temp0" | ||
| 608 | - } | ||
| 609 | - ] | 604 | + sql: "call Sp_mes_Operate_ProductionReport(2,${sNewReportSlaveId},${sOldReportSlaveId},null)", |
| 605 | + srcDataset: "temp0", | ||
| 606 | + }, | ||
| 607 | + ], | ||
| 610 | }, | 608 | }, |
| 611 | 609 | ||
| 612 | // { | 610 | // { |
| @@ -633,25 +631,21 @@ const handleMesSave1 = (props, delRow) => { | @@ -633,25 +631,21 @@ const handleMesSave1 = (props, delRow) => { | ||
| 633 | // }, | 631 | // }, |
| 634 | { | 632 | { |
| 635 | opr: "refresh", | 633 | opr: "refresh", |
| 636 | - dataset: "table0,table1,table4,tableS1,table0FirstlineSelected" | ||
| 637 | - } | ||
| 638 | - ]) | 634 | + dataset: "table0,table1,table4,tableS1,table0FirstlineSelected", |
| 635 | + }, | ||
| 636 | + ]), | ||
| 639 | }, | 637 | }, |
| 640 | inscallback: async nextProps => { | 638 | inscallback: async nextProps => { |
| 641 | const name = "table0"; | 639 | const name = "table0"; |
| 642 | const { [`${name}Config`]: tableConfig = {} } = props; | 640 | const { [`${name}Config`]: tableConfig = {} } = props; |
| 643 | - const rowClickConfig = tableConfig.gdsconfigformslave?.find( | ||
| 644 | - item => | ||
| 645 | - item.sControlName && | ||
| 646 | - item.sControlName.toLowerCase().includes("rowclick") | ||
| 647 | - ); | 641 | + const rowClickConfig = tableConfig.gdsconfigformslave?.find(item => item.sControlName && item.sControlName.toLowerCase().includes("rowclick")); |
| 648 | if (!rowClickConfig) return; | 642 | if (!rowClickConfig) return; |
| 649 | await awaitPromiseReturn(); | 643 | await awaitPromiseReturn(); |
| 650 | props.handleExecInstructSet({ | 644 | props.handleExecInstructSet({ |
| 651 | btnConfig: rowClickConfig, | 645 | btnConfig: rowClickConfig, |
| 652 | - nextProps: nextProps | 646 | + nextProps: nextProps, |
| 653 | }); | 647 | }); |
| 654 | - } | 648 | + }, |
| 655 | }); | 649 | }); |
| 656 | }; | 650 | }; |
| 657 | 651 | ||
| @@ -661,7 +655,7 @@ const handleMesSlave0Save1 = (props, delRow) => { | @@ -661,7 +655,7 @@ const handleMesSlave0Save1 = (props, delRow) => { | ||
| 661 | const temp0Data = []; | 655 | const temp0Data = []; |
| 662 | temp0Data.push({ | 656 | temp0Data.push({ |
| 663 | sNewReportSlaveId: delRow.sId, | 657 | sNewReportSlaveId: delRow.sId, |
| 664 | - sOldReportSlaveId: delRow.sSrcHourId | 658 | + sOldReportSlaveId: delRow.sSrcHourId, |
| 665 | }); | 659 | }); |
| 666 | 660 | ||
| 667 | props.handleExecInstructSet({ | 661 | props.handleExecInstructSet({ |
| @@ -680,51 +674,40 @@ const handleMesSlave0Save1 = (props, delRow) => { | @@ -680,51 +674,40 @@ const handleMesSlave0Save1 = (props, delRow) => { | ||
| 680 | opr: "exesql", | 674 | opr: "exesql", |
| 681 | data: [ | 675 | data: [ |
| 682 | { | 676 | { |
| 683 | - sql: | ||
| 684 | - "call Sp_mes_Operate_ProductionReport(2,${sNewReportSlaveId},${sOldReportSlaveId},null)", | ||
| 685 | - srcDataset: "temp0" | ||
| 686 | - } | ||
| 687 | - ] | 677 | + sql: "call Sp_mes_Operate_ProductionReport(2,${sNewReportSlaveId},${sOldReportSlaveId},null)", |
| 678 | + srcDataset: "temp0", | ||
| 679 | + }, | ||
| 680 | + ], | ||
| 688 | }, | 681 | }, |
| 689 | { | 682 | { |
| 690 | opr: "refresh", | 683 | opr: "refresh", |
| 691 | - dataset: "slave0,slave0FirstlineSelected" | ||
| 692 | - } | ||
| 693 | - ]) | 684 | + dataset: "slave0,slave0FirstlineSelected", |
| 685 | + }, | ||
| 686 | + ]), | ||
| 694 | }, | 687 | }, |
| 695 | inscallback: async nextProps => { | 688 | inscallback: async nextProps => { |
| 696 | const name = "slave0"; | 689 | const name = "slave0"; |
| 697 | const { [`${name}Config`]: tableConfig = {} } = props; | 690 | const { [`${name}Config`]: tableConfig = {} } = props; |
| 698 | - const rowClickConfig = tableConfig.gdsconfigformslave?.find( | ||
| 699 | - item => | ||
| 700 | - item.sControlName && | ||
| 701 | - item.sControlName.toLowerCase().includes("rowclick") | ||
| 702 | - ); | 691 | + const rowClickConfig = tableConfig.gdsconfigformslave?.find(item => item.sControlName && item.sControlName.toLowerCase().includes("rowclick")); |
| 703 | if (!rowClickConfig) return; | 692 | if (!rowClickConfig) return; |
| 704 | await awaitPromiseReturn(); | 693 | await awaitPromiseReturn(); |
| 705 | props.handleExecInstructSet({ | 694 | props.handleExecInstructSet({ |
| 706 | btnConfig: rowClickConfig, | 695 | btnConfig: rowClickConfig, |
| 707 | - nextProps: nextProps | 696 | + nextProps: nextProps, |
| 708 | }); | 697 | }); |
| 709 | - } | 698 | + }, |
| 710 | }); | 699 | }); |
| 711 | }; | 700 | }; |
| 712 | 701 | ||
| 713 | // 班组报工托盘计数信息按钮 | 702 | // 班组报工托盘计数信息按钮 |
| 714 | const mesGetBtnsConfig1 = props => { | 703 | const mesGetBtnsConfig1 = props => { |
| 715 | - const { | ||
| 716 | - table0Data = [], | ||
| 717 | - table0SelectedRowKeys = [], | ||
| 718 | - btnsConfig = [] | ||
| 719 | - } = props; | 704 | + const { table0Data = [], table0SelectedRowKeys = [], btnsConfig = [] } = props; |
| 720 | 705 | ||
| 721 | if (!table0SelectedRowKeys.length) { | 706 | if (!table0SelectedRowKeys.length) { |
| 722 | return []; | 707 | return []; |
| 723 | } | 708 | } |
| 724 | 709 | ||
| 725 | - const table0Row = table0Data.find( | ||
| 726 | - item => item.sId === table0SelectedRowKeys[0] | ||
| 727 | - ); | 710 | + const table0Row = table0Data.find(item => item.sId === table0SelectedRowKeys[0]); |
| 728 | const sSrcHourId = table0Row?.sSrcHourId; | 711 | const sSrcHourId = table0Row?.sSrcHourId; |
| 729 | 712 | ||
| 730 | // 是否新纪录 | 713 | // 是否新纪录 |
| @@ -740,16 +723,9 @@ const mesGetBtnsConfig1 = props => { | @@ -740,16 +723,9 @@ const mesGetBtnsConfig1 = props => { | ||
| 740 | 723 | ||
| 741 | // 班组报工托盘计数信息按钮点击事件 | 724 | // 班组报工托盘计数信息按钮点击事件 |
| 742 | const mesTableBtnClick1 = props => { | 725 | const mesTableBtnClick1 = props => { |
| 743 | - const { | ||
| 744 | - sControlName, | ||
| 745 | - table0Data = [], | ||
| 746 | - table0SelectedRowKeys = [], | ||
| 747 | - params | ||
| 748 | - } = props; | 726 | + const { sControlName, table0Data = [], table0SelectedRowKeys = [], params } = props; |
| 749 | const { record } = params; | 727 | const { record } = params; |
| 750 | - const table0Row = table0Data.find( | ||
| 751 | - item => item.sId === table0SelectedRowKeys[0] | ||
| 752 | - ); | 728 | + const table0Row = table0Data.find(item => item.sId === table0SelectedRowKeys[0]); |
| 753 | const { sId, sSrcHourId, tStartDate, tEndDate } = table0Row; | 729 | const { sId, sSrcHourId, tStartDate, tEndDate } = table0Row; |
| 754 | 730 | ||
| 755 | let table0RowNext; | 731 | let table0RowNext; |
| @@ -757,21 +733,13 @@ const mesTableBtnClick1 = props => { | @@ -757,21 +733,13 @@ const mesTableBtnClick1 = props => { | ||
| 757 | // 调至下段 | 733 | // 调至下段 |
| 758 | table0RowNext = table0Data.find( | 734 | table0RowNext = table0Data.find( |
| 759 | item => | 735 | item => |
| 760 | - !item.bUnChanged && | ||
| 761 | - item.tStartDate === tEndDate && | ||
| 762 | - (item.sId === sSrcHourId || | ||
| 763 | - item.sSrcHourId === sSrcHourId || | ||
| 764 | - item.sSrcHourId === sId) | 736 | + !item.bUnChanged && item.tStartDate === tEndDate && (item.sId === sSrcHourId || item.sSrcHourId === sSrcHourId || item.sSrcHourId === sId) |
| 765 | ); | 737 | ); |
| 766 | } else { | 738 | } else { |
| 767 | // 调至上段 | 739 | // 调至上段 |
| 768 | table0RowNext = table0Data.find( | 740 | table0RowNext = table0Data.find( |
| 769 | item => | 741 | item => |
| 770 | - !item.bUnChanged && | ||
| 771 | - item.tEndDate === tStartDate && | ||
| 772 | - (item.sId === sSrcHourId || | ||
| 773 | - item.sSrcHourId === sSrcHourId || | ||
| 774 | - item.sSrcHourId === sId) | 742 | + !item.bUnChanged && item.tEndDate === tStartDate && (item.sId === sSrcHourId || item.sSrcHourId === sSrcHourId || item.sSrcHourId === sId) |
| 775 | ); | 743 | ); |
| 776 | } | 744 | } |
| 777 | 745 | ||
| @@ -779,7 +747,7 @@ const mesTableBtnClick1 = props => { | @@ -779,7 +747,7 @@ const mesTableBtnClick1 = props => { | ||
| 779 | temp0Data.push({ | 747 | temp0Data.push({ |
| 780 | sNewReportSlaveId: sId, | 748 | sNewReportSlaveId: sId, |
| 781 | sOldReportSlaveId: table0RowNext.sId, | 749 | sOldReportSlaveId: table0RowNext.sId, |
| 782 | - sTrayOutId: record.sId | 750 | + sTrayOutId: record.sId, |
| 783 | }); | 751 | }); |
| 784 | 752 | ||
| 785 | props.onExecInstructSet({ | 753 | props.onExecInstructSet({ |
| @@ -793,16 +761,16 @@ const mesTableBtnClick1 = props => { | @@ -793,16 +761,16 @@ const mesTableBtnClick1 = props => { | ||
| 793 | { | 761 | { |
| 794 | sql: | 762 | sql: |
| 795 | "update mftplctray A SET A.sReportTrayId= ${sOldReportSlaveId} WHERE A.sReportTrayId=${sNewReportSlaveId} and A.sTrayOutId=${sTrayOutId}", | 763 | "update mftplctray A SET A.sReportTrayId= ${sOldReportSlaveId} WHERE A.sReportTrayId=${sNewReportSlaveId} and A.sTrayOutId=${sTrayOutId}", |
| 796 | - srcDataset: "temp0" | ||
| 797 | - } | ||
| 798 | - ] | 764 | + srcDataset: "temp0", |
| 765 | + }, | ||
| 766 | + ], | ||
| 799 | }, | 767 | }, |
| 800 | { | 768 | { |
| 801 | opr: "refresh", | 769 | opr: "refresh", |
| 802 | - dataset: "table1" | ||
| 803 | - } | ||
| 804 | - ]) | ||
| 805 | - } | 770 | + dataset: "table1", |
| 771 | + }, | ||
| 772 | + ]), | ||
| 773 | + }, | ||
| 806 | }); | 774 | }); |
| 807 | }; | 775 | }; |
| 808 | 776 | ||
| @@ -833,7 +801,7 @@ const mesTableBtnClick2 = props => { | @@ -833,7 +801,7 @@ const mesTableBtnClick2 = props => { | ||
| 833 | tableS5Data: [], | 801 | tableS5Data: [], |
| 834 | tableS8Data: [], | 802 | tableS8Data: [], |
| 835 | tableS9Data: [], | 803 | tableS9Data: [], |
| 836 | - tableS10Data: [] | 804 | + tableS10Data: [], |
| 837 | }); | 805 | }); |
| 838 | 806 | ||
| 839 | const oTabs = document.querySelectorAll(`.ant-tabs-tab-btn[id*="生产日报"]`); | 807 | const oTabs = document.querySelectorAll(`.ant-tabs-tab-btn[id*="生产日报"]`); |
| @@ -850,7 +818,7 @@ const mesTableBtnClick3 = props => { | @@ -850,7 +818,7 @@ const mesTableBtnClick3 = props => { | ||
| 850 | if (bHourlyReport) { | 818 | if (bHourlyReport) { |
| 851 | props.onExecInstructSet({ | 819 | props.onExecInstructSet({ |
| 852 | nextProps: props, | 820 | nextProps: props, |
| 853 | - btnConfig: config | 821 | + btnConfig: config, |
| 854 | }); | 822 | }); |
| 855 | return; | 823 | return; |
| 856 | } | 824 | } |
| @@ -868,22 +836,20 @@ const mesTableBtnClick3 = props => { | @@ -868,22 +836,20 @@ const mesTableBtnClick3 = props => { | ||
| 868 | props.onSaveState({ | 836 | props.onSaveState({ |
| 869 | table0SelectedRowKeys: [], | 837 | table0SelectedRowKeys: [], |
| 870 | table4Data: [], | 838 | table4Data: [], |
| 871 | - table13Data: [] | 839 | + table13Data: [], |
| 872 | }); | 840 | }); |
| 873 | 841 | ||
| 874 | setTimeout(() => { | 842 | setTimeout(() => { |
| 875 | props.onTableSelectRowChange("table0", [table0Data[iIndex].sId]); | 843 | props.onTableSelectRowChange("table0", [table0Data[iIndex].sId]); |
| 876 | props.onSaveState({ | 844 | props.onSaveState({ |
| 877 | - refreshTableList: ["table0,table0NotFirstlineSelected"] | 845 | + refreshTableList: ["table0,table0NotFirstlineSelected"], |
| 878 | }); | 846 | }); |
| 879 | }, 200); | 847 | }, 200); |
| 880 | 848 | ||
| 881 | const oTabs = document.querySelectorAll(`.ant-tabs-tab-btn[id*="班组报工"]`); | 849 | const oTabs = document.querySelectorAll(`.ant-tabs-tab-btn[id*="班组报工"]`); |
| 882 | oTabs?.[0]?.click(); | 850 | oTabs?.[0]?.click(); |
| 883 | setTimeout(() => { | 851 | setTimeout(() => { |
| 884 | - const oTabs1 = document.querySelectorAll( | ||
| 885 | - `.ant-tabs-tab-btn[id*="产量上报信息"]` | ||
| 886 | - ); | 852 | + const oTabs1 = document.querySelectorAll(`.ant-tabs-tab-btn[id*="产量上报信息"]`); |
| 887 | oTabs1?.[0]?.click(); | 853 | oTabs1?.[0]?.click(); |
| 888 | }, 200); | 854 | }, 200); |
| 889 | }; | 855 | }; |
| @@ -892,10 +858,7 @@ const mesTableBtnClick3 = props => { | @@ -892,10 +858,7 @@ const mesTableBtnClick3 = props => { | ||
| 892 | const handleSlaveWypj2BtnPre = props => { | 858 | const handleSlaveWypj2BtnPre = props => { |
| 893 | const listName = "slaveWypj2"; | 859 | const listName = "slaveWypj2"; |
| 894 | const tableName = "slaveWypj3"; | 860 | const tableName = "slaveWypj3"; |
| 895 | - const { | ||
| 896 | - [`${listName}Data`]: listData = [], | ||
| 897 | - [`${tableName}Data`]: tableData = [] | ||
| 898 | - } = props; | 861 | + const { [`${listName}Data`]: listData = [], [`${tableName}Data`]: tableData = [] } = props; |
| 899 | 862 | ||
| 900 | const [rowData = {}] = listData; | 863 | const [rowData = {}] = listData; |
| 901 | 864 | ||
| @@ -910,23 +873,21 @@ const handleSlaveWypj2BtnPre = props => { | @@ -910,23 +873,21 @@ const handleSlaveWypj2BtnPre = props => { | ||
| 910 | return; | 873 | return; |
| 911 | } | 874 | } |
| 912 | 875 | ||
| 913 | - const sInstructStr = props[`${tableName}Config`]?.gdsconfigformslave.find( | ||
| 914 | - item => item.sControlName === "BtnTable.View" | ||
| 915 | - )?.sInstruct; | 876 | + const sInstructStr = props[`${tableName}Config`]?.gdsconfigformslave.find(item => item.sControlName === "BtnTable.View")?.sInstruct; |
| 916 | if (!sInstructStr) return; | 877 | if (!sInstructStr) return; |
| 917 | 878 | ||
| 918 | const selectedRowKeys = [tableData[iIndex - 1].sId]; | 879 | const selectedRowKeys = [tableData[iIndex - 1].sId]; |
| 919 | props.onSaveState( | 880 | props.onSaveState( |
| 920 | { | 881 | { |
| 921 | - [`${tableName}SelectedRowKeys`]: selectedRowKeys | 882 | + [`${tableName}SelectedRowKeys`]: selectedRowKeys, |
| 922 | }, | 883 | }, |
| 923 | nextProps => { | 884 | nextProps => { |
| 924 | props.onExecInstructSet({ | 885 | props.onExecInstructSet({ |
| 925 | nextProps: nextProps, | 886 | nextProps: nextProps, |
| 926 | btnConfig: { | 887 | btnConfig: { |
| 927 | showName: "上一卷", | 888 | showName: "上一卷", |
| 928 | - sInstruct: sInstructStr | ||
| 929 | - } | 889 | + sInstruct: sInstructStr, |
| 890 | + }, | ||
| 930 | }); | 891 | }); |
| 931 | } | 892 | } |
| 932 | ); | 893 | ); |
| @@ -936,10 +897,7 @@ const handleSlaveWypj2BtnPre = props => { | @@ -936,10 +897,7 @@ const handleSlaveWypj2BtnPre = props => { | ||
| 936 | const handleSlaveWypj2BtnNext = props => { | 897 | const handleSlaveWypj2BtnNext = props => { |
| 937 | const listName = "slaveWypj2"; | 898 | const listName = "slaveWypj2"; |
| 938 | const tableName = "slaveWypj3"; | 899 | const tableName = "slaveWypj3"; |
| 939 | - const { | ||
| 940 | - [`${listName}Data`]: listData = [], | ||
| 941 | - [`${tableName}Data`]: tableData = [] | ||
| 942 | - } = props; | 900 | + const { [`${listName}Data`]: listData = [], [`${tableName}Data`]: tableData = [] } = props; |
| 943 | 901 | ||
| 944 | const [rowData = {}] = listData; | 902 | const [rowData = {}] = listData; |
| 945 | 903 | ||
| @@ -954,23 +912,21 @@ const handleSlaveWypj2BtnNext = props => { | @@ -954,23 +912,21 @@ const handleSlaveWypj2BtnNext = props => { | ||
| 954 | return; | 912 | return; |
| 955 | } | 913 | } |
| 956 | 914 | ||
| 957 | - const sInstructStr = props[`${tableName}Config`]?.gdsconfigformslave.find( | ||
| 958 | - item => item.sControlName === "BtnTable.View" | ||
| 959 | - )?.sInstruct; | 915 | + const sInstructStr = props[`${tableName}Config`]?.gdsconfigformslave.find(item => item.sControlName === "BtnTable.View")?.sInstruct; |
| 960 | if (!sInstructStr) return; | 916 | if (!sInstructStr) return; |
| 961 | 917 | ||
| 962 | const selectedRowKeys = [tableData[iIndex + 1].sId]; | 918 | const selectedRowKeys = [tableData[iIndex + 1].sId]; |
| 963 | props.onSaveState( | 919 | props.onSaveState( |
| 964 | { | 920 | { |
| 965 | - [`${tableName}SelectedRowKeys`]: selectedRowKeys | 921 | + [`${tableName}SelectedRowKeys`]: selectedRowKeys, |
| 966 | }, | 922 | }, |
| 967 | nextProps => { | 923 | nextProps => { |
| 968 | props.onExecInstructSet({ | 924 | props.onExecInstructSet({ |
| 969 | nextProps: nextProps, | 925 | nextProps: nextProps, |
| 970 | btnConfig: { | 926 | btnConfig: { |
| 971 | showName: "下一卷", | 927 | showName: "下一卷", |
| 972 | - sInstruct: sInstructStr | ||
| 973 | - } | 928 | + sInstruct: sInstructStr, |
| 929 | + }, | ||
| 974 | }); | 930 | }); |
| 975 | } | 931 | } |
| 976 | ); | 932 | ); |
| @@ -980,10 +936,7 @@ const handleSlaveWypj2BtnNext = props => { | @@ -980,10 +936,7 @@ const handleSlaveWypj2BtnNext = props => { | ||
| 980 | const handleSalveWydm2BtnPre = props => { | 936 | const handleSalveWydm2BtnPre = props => { |
| 981 | const listName = "salveWydm2"; | 937 | const listName = "salveWydm2"; |
| 982 | const tableName = "salveWydm3"; | 938 | const tableName = "salveWydm3"; |
| 983 | - const { | ||
| 984 | - [`${listName}Data`]: listData = [], | ||
| 985 | - [`${tableName}Data`]: tableData = [] | ||
| 986 | - } = props; | 939 | + const { [`${listName}Data`]: listData = [], [`${tableName}Data`]: tableData = [] } = props; |
| 987 | 940 | ||
| 988 | const [rowData = {}] = listData; | 941 | const [rowData = {}] = listData; |
| 989 | 942 | ||
| @@ -998,23 +951,21 @@ const handleSalveWydm2BtnPre = props => { | @@ -998,23 +951,21 @@ const handleSalveWydm2BtnPre = props => { | ||
| 998 | return; | 951 | return; |
| 999 | } | 952 | } |
| 1000 | 953 | ||
| 1001 | - const sInstructStr = props[`${tableName}Config`]?.gdsconfigformslave.find( | ||
| 1002 | - item => item.sControlName === "BtnReelView" | ||
| 1003 | - )?.sInstruct; | 954 | + const sInstructStr = props[`${tableName}Config`]?.gdsconfigformslave.find(item => item.sControlName === "BtnReelView")?.sInstruct; |
| 1004 | if (!sInstructStr) return; | 955 | if (!sInstructStr) return; |
| 1005 | 956 | ||
| 1006 | const selectedRowKeys = [tableData[iIndex - 1].sId]; | 957 | const selectedRowKeys = [tableData[iIndex - 1].sId]; |
| 1007 | props.onSaveState( | 958 | props.onSaveState( |
| 1008 | { | 959 | { |
| 1009 | - [`${tableName}SelectedRowKeys`]: selectedRowKeys | 960 | + [`${tableName}SelectedRowKeys`]: selectedRowKeys, |
| 1010 | }, | 961 | }, |
| 1011 | nextProps => { | 962 | nextProps => { |
| 1012 | props.onExecInstructSet({ | 963 | props.onExecInstructSet({ |
| 1013 | nextProps: nextProps, | 964 | nextProps: nextProps, |
| 1014 | btnConfig: { | 965 | btnConfig: { |
| 1015 | showName: "上一版", | 966 | showName: "上一版", |
| 1016 | - sInstruct: sInstructStr | ||
| 1017 | - } | 967 | + sInstruct: sInstructStr, |
| 968 | + }, | ||
| 1018 | }); | 969 | }); |
| 1019 | } | 970 | } |
| 1020 | ); | 971 | ); |
| @@ -1024,10 +975,7 @@ const handleSalveWydm2BtnPre = props => { | @@ -1024,10 +975,7 @@ const handleSalveWydm2BtnPre = props => { | ||
| 1024 | const handleSalveWydm2BtnNext = props => { | 975 | const handleSalveWydm2BtnNext = props => { |
| 1025 | const listName = "salveWydm2"; | 976 | const listName = "salveWydm2"; |
| 1026 | const tableName = "salveWydm3"; | 977 | const tableName = "salveWydm3"; |
| 1027 | - const { | ||
| 1028 | - [`${listName}Data`]: listData = [], | ||
| 1029 | - [`${tableName}Data`]: tableData = [] | ||
| 1030 | - } = props; | 978 | + const { [`${listName}Data`]: listData = [], [`${tableName}Data`]: tableData = [] } = props; |
| 1031 | 979 | ||
| 1032 | const [rowData = {}] = listData; | 980 | const [rowData = {}] = listData; |
| 1033 | 981 | ||
| @@ -1042,23 +990,21 @@ const handleSalveWydm2BtnNext = props => { | @@ -1042,23 +990,21 @@ const handleSalveWydm2BtnNext = props => { | ||
| 1042 | return; | 990 | return; |
| 1043 | } | 991 | } |
| 1044 | 992 | ||
| 1045 | - const sInstructStr = props[`${tableName}Config`]?.gdsconfigformslave.find( | ||
| 1046 | - item => item.sControlName === "BtnReelView" | ||
| 1047 | - )?.sInstruct; | 993 | + const sInstructStr = props[`${tableName}Config`]?.gdsconfigformslave.find(item => item.sControlName === "BtnReelView")?.sInstruct; |
| 1048 | if (!sInstructStr) return; | 994 | if (!sInstructStr) return; |
| 1049 | 995 | ||
| 1050 | const selectedRowKeys = [tableData[iIndex + 1].sId]; | 996 | const selectedRowKeys = [tableData[iIndex + 1].sId]; |
| 1051 | props.onSaveState( | 997 | props.onSaveState( |
| 1052 | { | 998 | { |
| 1053 | - [`${tableName}SelectedRowKeys`]: selectedRowKeys | 999 | + [`${tableName}SelectedRowKeys`]: selectedRowKeys, |
| 1054 | }, | 1000 | }, |
| 1055 | nextProps => { | 1001 | nextProps => { |
| 1056 | props.onExecInstructSet({ | 1002 | props.onExecInstructSet({ |
| 1057 | nextProps: nextProps, | 1003 | nextProps: nextProps, |
| 1058 | btnConfig: { | 1004 | btnConfig: { |
| 1059 | showName: "下一版", | 1005 | showName: "下一版", |
| 1060 | - sInstruct: sInstructStr | ||
| 1061 | - } | 1006 | + sInstruct: sInstructStr, |
| 1007 | + }, | ||
| 1062 | }); | 1008 | }); |
| 1063 | } | 1009 | } |
| 1064 | ); | 1010 | ); |
| @@ -1068,15 +1014,11 @@ const handleSalveWydm2BtnNext = props => { | @@ -1068,15 +1014,11 @@ const handleSalveWydm2BtnNext = props => { | ||
| 1068 | const handleSlaveWyrj2BtnPre = props => { | 1014 | const handleSlaveWyrj2BtnPre = props => { |
| 1069 | const listName = "slaveWyrj2"; | 1015 | const listName = "slaveWyrj2"; |
| 1070 | const tableName = "slaveWyrj3"; | 1016 | const tableName = "slaveWyrj3"; |
| 1071 | - const { | ||
| 1072 | - [`${listName}Data`]: listData = [], | ||
| 1073 | - [`${tableName}Data`]: tableData = [] | ||
| 1074 | - } = props; | 1017 | + const { [`${listName}Data`]: listData = [], [`${tableName}Data`]: tableData = [] } = props; |
| 1075 | 1018 | ||
| 1076 | const [rowData = {}] = listData; | 1019 | const [rowData = {}] = listData; |
| 1077 | 1020 | ||
| 1078 | const iIndex = tableData.findIndex(item => item.sId === rowData.sId); | 1021 | const iIndex = tableData.findIndex(item => item.sId === rowData.sId); |
| 1079 | - console.log("=====rowData", rowData, tableData); | ||
| 1080 | if (iIndex === -1) { | 1022 | if (iIndex === -1) { |
| 1081 | message.info("暂无数据!"); | 1023 | message.info("暂无数据!"); |
| 1082 | return; | 1024 | return; |
| @@ -1087,23 +1029,21 @@ const handleSlaveWyrj2BtnPre = props => { | @@ -1087,23 +1029,21 @@ const handleSlaveWyrj2BtnPre = props => { | ||
| 1087 | return; | 1029 | return; |
| 1088 | } | 1030 | } |
| 1089 | 1031 | ||
| 1090 | - const sInstructStr = props[`${tableName}Config`]?.gdsconfigformslave.find( | ||
| 1091 | - item => item.sControlName === "BtnReelView" | ||
| 1092 | - )?.sInstruct; | 1032 | + const sInstructStr = props[`${tableName}Config`]?.gdsconfigformslave.find(item => item.sControlName === "BtnReelView")?.sInstruct; |
| 1093 | if (!sInstructStr) return; | 1033 | if (!sInstructStr) return; |
| 1094 | 1034 | ||
| 1095 | const selectedRowKeys = [tableData[iIndex - 1].sId]; | 1035 | const selectedRowKeys = [tableData[iIndex - 1].sId]; |
| 1096 | props.onSaveState( | 1036 | props.onSaveState( |
| 1097 | { | 1037 | { |
| 1098 | - [`${tableName}SelectedRowKeys`]: selectedRowKeys | 1038 | + [`${tableName}SelectedRowKeys`]: selectedRowKeys, |
| 1099 | }, | 1039 | }, |
| 1100 | nextProps => { | 1040 | nextProps => { |
| 1101 | props.onExecInstructSet({ | 1041 | props.onExecInstructSet({ |
| 1102 | nextProps: nextProps, | 1042 | nextProps: nextProps, |
| 1103 | btnConfig: { | 1043 | btnConfig: { |
| 1104 | showName: "上一版", | 1044 | showName: "上一版", |
| 1105 | - sInstruct: sInstructStr | ||
| 1106 | - } | 1045 | + sInstruct: sInstructStr, |
| 1046 | + }, | ||
| 1107 | }); | 1047 | }); |
| 1108 | } | 1048 | } |
| 1109 | ); | 1049 | ); |
| @@ -1113,10 +1053,7 @@ const handleSlaveWyrj2BtnPre = props => { | @@ -1113,10 +1053,7 @@ const handleSlaveWyrj2BtnPre = props => { | ||
| 1113 | const handleSlaveWyrj2BtnNext = props => { | 1053 | const handleSlaveWyrj2BtnNext = props => { |
| 1114 | const listName = "slaveWyrj2"; | 1054 | const listName = "slaveWyrj2"; |
| 1115 | const tableName = "slaveWyrj3"; | 1055 | const tableName = "slaveWyrj3"; |
| 1116 | - const { | ||
| 1117 | - [`${listName}Data`]: listData = [], | ||
| 1118 | - [`${tableName}Data`]: tableData = [] | ||
| 1119 | - } = props; | 1056 | + const { [`${listName}Data`]: listData = [], [`${tableName}Data`]: tableData = [] } = props; |
| 1120 | 1057 | ||
| 1121 | const [rowData = {}] = listData; | 1058 | const [rowData = {}] = listData; |
| 1122 | 1059 | ||
| @@ -1131,23 +1068,21 @@ const handleSlaveWyrj2BtnNext = props => { | @@ -1131,23 +1068,21 @@ const handleSlaveWyrj2BtnNext = props => { | ||
| 1131 | return; | 1068 | return; |
| 1132 | } | 1069 | } |
| 1133 | 1070 | ||
| 1134 | - const sInstructStr = props[`${tableName}Config`]?.gdsconfigformslave.find( | ||
| 1135 | - item => item.sControlName === "BtnReelView" | ||
| 1136 | - )?.sInstruct; | 1071 | + const sInstructStr = props[`${tableName}Config`]?.gdsconfigformslave.find(item => item.sControlName === "BtnReelView")?.sInstruct; |
| 1137 | if (!sInstructStr) return; | 1072 | if (!sInstructStr) return; |
| 1138 | 1073 | ||
| 1139 | const selectedRowKeys = [tableData[iIndex + 1].sId]; | 1074 | const selectedRowKeys = [tableData[iIndex + 1].sId]; |
| 1140 | props.onSaveState( | 1075 | props.onSaveState( |
| 1141 | { | 1076 | { |
| 1142 | - [`${tableName}SelectedRowKeys`]: selectedRowKeys | 1077 | + [`${tableName}SelectedRowKeys`]: selectedRowKeys, |
| 1143 | }, | 1078 | }, |
| 1144 | nextProps => { | 1079 | nextProps => { |
| 1145 | props.onExecInstructSet({ | 1080 | props.onExecInstructSet({ |
| 1146 | nextProps: nextProps, | 1081 | nextProps: nextProps, |
| 1147 | btnConfig: { | 1082 | btnConfig: { |
| 1148 | showName: "下一版", | 1083 | showName: "下一版", |
| 1149 | - sInstruct: sInstructStr | ||
| 1150 | - } | 1084 | + sInstruct: sInstructStr, |
| 1085 | + }, | ||
| 1151 | }); | 1086 | }); |
| 1152 | } | 1087 | } |
| 1153 | ); | 1088 | ); |
| @@ -1159,10 +1094,7 @@ const handleUpDownData = props => { | @@ -1159,10 +1094,7 @@ const handleUpDownData = props => { | ||
| 1159 | const listName = showTableName; | 1094 | const listName = showTableName; |
| 1160 | const tableName = showTableName.substr(0, showTableName.length - 1) + 3; | 1095 | const tableName = showTableName.substr(0, showTableName.length - 1) + 3; |
| 1161 | 1096 | ||
| 1162 | - const { | ||
| 1163 | - [`${listName}Data`]: listData = [], | ||
| 1164 | - [`${tableName}Data`]: tableData = [] | ||
| 1165 | - } = props; | 1097 | + const { [`${listName}Data`]: listData = [], [`${tableName}Data`]: tableData = [] } = props; |
| 1166 | 1098 | ||
| 1167 | const [rowData = {}] = listData; | 1099 | const [rowData = {}] = listData; |
| 1168 | 1100 | ||
| @@ -1177,36 +1109,31 @@ const handleUpDownData = props => { | @@ -1177,36 +1109,31 @@ const handleUpDownData = props => { | ||
| 1177 | return; | 1109 | return; |
| 1178 | } | 1110 | } |
| 1179 | 1111 | ||
| 1180 | - if ( | ||
| 1181 | - ["BtnRight.NextCom"].includes(sFieldName) && | ||
| 1182 | - iIndex === tableData.length - 1 | ||
| 1183 | - ) { | 1112 | + if (["BtnRight.NextCom"].includes(sFieldName) && iIndex === tableData.length - 1) { |
| 1184 | message.info("已是最后一条数据!"); | 1113 | message.info("已是最后一条数据!"); |
| 1185 | return; | 1114 | return; |
| 1186 | } | 1115 | } |
| 1187 | 1116 | ||
| 1188 | - const sInstructStr = props[`${tableName}Config`]?.gdsconfigformslave.find( | ||
| 1189 | - item => item.sControlName === "BtnReelView" | ||
| 1190 | - )?.sInstruct; | 1117 | + const sInstructStr = props[`${tableName}Config`]?.gdsconfigformslave.find(item => item.sControlName === "BtnReelView")?.sInstruct; |
| 1191 | if (!sInstructStr) return; | 1118 | if (!sInstructStr) return; |
| 1192 | 1119 | ||
| 1193 | const info = { | 1120 | const info = { |
| 1194 | "BtnRight.PriorCom": { index: iIndex - 1, message: "上一版" }, | 1121 | "BtnRight.PriorCom": { index: iIndex - 1, message: "上一版" }, |
| 1195 | - "BtnRight.NextCom": { index: iIndex + 1, message: "下一版" } | 1122 | + "BtnRight.NextCom": { index: iIndex + 1, message: "下一版" }, |
| 1196 | }[sFieldName] || { index: iIndex, message: "当前" }; | 1123 | }[sFieldName] || { index: iIndex, message: "当前" }; |
| 1197 | 1124 | ||
| 1198 | const selectedRowKeys = [tableData[info.index].sId]; | 1125 | const selectedRowKeys = [tableData[info.index].sId]; |
| 1199 | props.onSaveState( | 1126 | props.onSaveState( |
| 1200 | { | 1127 | { |
| 1201 | - [`${tableName}SelectedRowKeys`]: selectedRowKeys | 1128 | + [`${tableName}SelectedRowKeys`]: selectedRowKeys, |
| 1202 | }, | 1129 | }, |
| 1203 | nextProps => { | 1130 | nextProps => { |
| 1204 | props.onExecInstructSet({ | 1131 | props.onExecInstructSet({ |
| 1205 | nextProps: nextProps, | 1132 | nextProps: nextProps, |
| 1206 | btnConfig: { | 1133 | btnConfig: { |
| 1207 | showName: info.message, | 1134 | showName: info.message, |
| 1208 | - sInstruct: sInstructStr | ||
| 1209 | - } | 1135 | + sInstruct: sInstructStr, |
| 1136 | + }, | ||
| 1210 | }); | 1137 | }); |
| 1211 | } | 1138 | } |
| 1212 | ); | 1139 | ); |
| @@ -1220,7 +1147,7 @@ const mesTableChange2 = (props, tableName) => { | @@ -1220,7 +1147,7 @@ const mesTableChange2 = (props, tableName) => { | ||
| 1220 | delete tableDataNew[0].tConnectDate; | 1147 | delete tableDataNew[0].tConnectDate; |
| 1221 | 1148 | ||
| 1222 | props.onSaveState({ | 1149 | props.onSaveState({ |
| 1223 | - [`${tableName}Data`]: tableDataNew | 1150 | + [`${tableName}Data`]: tableDataNew, |
| 1224 | }); | 1151 | }); |
| 1225 | }; | 1152 | }; |
| 1226 | 1153 | ||
| @@ -1257,10 +1184,7 @@ const mesTableChange3 = (props, tableName) => { | @@ -1257,10 +1184,7 @@ const mesTableChange3 = (props, tableName) => { | ||
| 1257 | } | 1184 | } |
| 1258 | 1185 | ||
| 1259 | const checkTime = moment(tConnectDate); | 1186 | const checkTime = moment(tConnectDate); |
| 1260 | - if ( | ||
| 1261 | - !checkTime.isSameOrAfter(startTime) || | ||
| 1262 | - !checkTime.isSameOrBefore(endTime) | ||
| 1263 | - ) { | 1187 | + if (!checkTime.isSameOrAfter(startTime) || !checkTime.isSameOrBefore(endTime)) { |
| 1264 | let msg = ""; | 1188 | let msg = ""; |
| 1265 | if (sShift === "1" || sShift === "白班") { | 1189 | if (sShift === "1" || sShift === "白班") { |
| 1266 | if (bDelayedOvertime) { | 1190 | if (bDelayedOvertime) { |
| @@ -1280,33 +1204,32 @@ const mesTableChange3 = (props, tableName) => { | @@ -1280,33 +1204,32 @@ const mesTableChange3 = (props, tableName) => { | ||
| 1280 | } | 1204 | } |
| 1281 | }; | 1205 | }; |
| 1282 | 1206 | ||
| 1283 | - | ||
| 1284 | const handleGetRefreshStatus = props => { | 1207 | const handleGetRefreshStatus = props => { |
| 1285 | const { refreshTableListCount = 0 } = props; | 1208 | const { refreshTableListCount = 0 } = props; |
| 1286 | if (!refreshTableListCount) { | 1209 | if (!refreshTableListCount) { |
| 1287 | - message.warning('请先等待页面初始化加载完成!'); | 1210 | + message.warning("请先等待页面初始化加载完成!"); |
| 1288 | return true; | 1211 | return true; |
| 1289 | } else { | 1212 | } else { |
| 1290 | return false; | 1213 | return false; |
| 1291 | } | 1214 | } |
| 1292 | -} | 1215 | +}; |
| 1293 | // 质量巡检-巡检项目-所有巡检按钮 | 1216 | // 质量巡检-巡检项目-所有巡检按钮 |
| 1294 | const handleZlxjCheck = async (props, btnName) => { | 1217 | const handleZlxjCheck = async (props, btnName) => { |
| 1295 | const { table0Data = [], table1Data = [], refreshTableListCount = 0 } = props; | 1218 | const { table0Data = [], table1Data = [], refreshTableListCount = 0 } = props; |
| 1296 | const { sTeamNo } = commonUtils.getAppData("userinfo"); | 1219 | const { sTeamNo } = commonUtils.getAppData("userinfo"); |
| 1297 | 1220 | ||
| 1298 | if (!refreshTableListCount) { | 1221 | if (!refreshTableListCount) { |
| 1299 | - message.warning('请先等待页面初始化加载完成!'); | 1222 | + message.warning("请先等待页面初始化加载完成!"); |
| 1300 | return; | 1223 | return; |
| 1301 | } | 1224 | } |
| 1302 | 1225 | ||
| 1303 | const typeList = { | 1226 | const typeList = { |
| 1304 | - "BtnRight.ipqcCheck": '2', | ||
| 1305 | - "BtnRight.qualityCheck": '3', | ||
| 1306 | - "BtnRight.foremanCheck": '4', | ||
| 1307 | - "BtnRight.managerCheck": '5', | ||
| 1308 | - "BtnRight.otherCheck": '6' | ||
| 1309 | - } | 1227 | + "BtnRight.ipqcCheck": "2", |
| 1228 | + "BtnRight.qualityCheck": "3", | ||
| 1229 | + "BtnRight.foremanCheck": "4", | ||
| 1230 | + "BtnRight.managerCheck": "5", | ||
| 1231 | + "BtnRight.otherCheck": "6", | ||
| 1232 | + }; | ||
| 1310 | 1233 | ||
| 1311 | const sCurRole = typeList[btnName]; | 1234 | const sCurRole = typeList[btnName]; |
| 1312 | 1235 | ||
| @@ -1314,39 +1237,37 @@ const handleZlxjCheck = async (props, btnName) => { | @@ -1314,39 +1237,37 @@ const handleZlxjCheck = async (props, btnName) => { | ||
| 1314 | if (!faceResult) return; | 1237 | if (!faceResult) return; |
| 1315 | const { name } = faceResult; | 1238 | const { name } = faceResult; |
| 1316 | if (!name) { | 1239 | if (!name) { |
| 1317 | - message.warning('人脸信息获取失败,请重新尝试!'); | 1240 | + message.warning("人脸信息获取失败,请重新尝试!"); |
| 1318 | return; | 1241 | return; |
| 1319 | } | 1242 | } |
| 1320 | - | 1243 | + |
| 1321 | const table0DataNew = cloneDeep(table0Data); | 1244 | const table0DataNew = cloneDeep(table0Data); |
| 1322 | const table1DataNew = cloneDeep(table1Data); | 1245 | const table1DataNew = cloneDeep(table1Data); |
| 1323 | table0DataNew[0].sCurRole = sCurRole; | 1246 | table0DataNew[0].sCurRole = sCurRole; |
| 1324 | - table0DataNew[0].handleType = table0DataNew[0].handleType || 'update'; | 1247 | + table0DataNew[0].handleType = table0DataNew[0].handleType || "update"; |
| 1325 | 1248 | ||
| 1326 | table1DataNew.unshift({ | 1249 | table1DataNew.unshift({ |
| 1327 | sId: commonUtils.createSid(), | 1250 | sId: commonUtils.createSid(), |
| 1328 | - handleType: 'add', | 1251 | + handleType: "add", |
| 1329 | sSReserve1: sCurRole, | 1252 | sSReserve1: sCurRole, |
| 1330 | bSave: 1, | 1253 | bSave: 1, |
| 1331 | sParentId: table0Data[0].sId, | 1254 | sParentId: table0Data[0].sId, |
| 1332 | - tPollingTime: moment().format('YYYY-MM-DD HH:mm:ss'), | 1255 | + tPollingTime: moment().format("YYYY-MM-DD HH:mm:ss"), |
| 1333 | sPollingPerson: name, | 1256 | sPollingPerson: name, |
| 1334 | - sGroup: sTeamNo.substr(sTeamNo.length-1,1) === 'A' ? 'A' : 'B' | 1257 | + sGroup: sTeamNo.substr(sTeamNo.length - 1, 1) === "A" ? "A" : "B", |
| 1335 | }); | 1258 | }); |
| 1336 | 1259 | ||
| 1337 | props.onSaveState({ | 1260 | props.onSaveState({ |
| 1338 | userfaceData: [faceResult], | 1261 | userfaceData: [faceResult], |
| 1339 | tempUserName: name, | 1262 | tempUserName: name, |
| 1340 | table0Data: table0DataNew, | 1263 | table0Data: table0DataNew, |
| 1341 | - table1Data: table1DataNew | 1264 | + table1Data: table1DataNew, |
| 1342 | }); | 1265 | }); |
| 1343 | -} | 1266 | +}; |
| 1344 | 1267 | ||
| 1345 | let loginInfo = {}; | 1268 | let loginInfo = {}; |
| 1346 | const sModelsId = "16034339700006038392152714521000"; | 1269 | const sModelsId = "16034339700006038392152714521000"; |
| 1347 | -const mesSysbrands = commonUtils.convertStrToObj( | ||
| 1348 | - localStorage.getItem("mesSysbrands") | ||
| 1349 | -); | 1270 | +const mesSysbrands = commonUtils.convertStrToObj(localStorage.getItem("mesSysbrands")); |
| 1350 | 1271 | ||
| 1351 | const handleGetFormItem = (props, item) => { | 1272 | const handleGetFormItem = (props, item) => { |
| 1352 | let enabledNew = true; | 1273 | let enabledNew = true; |
| @@ -1374,19 +1295,16 @@ const handleGetFormItem = (props, item) => { | @@ -1374,19 +1295,16 @@ const handleGetFormItem = (props, item) => { | ||
| 1374 | onFilterDropDownData: props.onFilterDropDownData, | 1295 | onFilterDropDownData: props.onFilterDropDownData, |
| 1375 | onSaveState: props.onSaveState, | 1296 | onSaveState: props.onSaveState, |
| 1376 | bPassWord: item.sName === "sPassWord", | 1297 | bPassWord: item.sName === "sPassWord", |
| 1377 | - style: { backgroundColor: "#eaeaea" } | 1298 | + style: { backgroundColor: "#eaeaea" }, |
| 1378 | }; | 1299 | }; |
| 1379 | return ( | 1300 | return ( |
| 1380 | - <Form.Item | ||
| 1381 | - label={item.sName === "sUserName" ? "账号" : item.showName} | ||
| 1382 | - key={item.sName} | ||
| 1383 | - > | 1301 | + <Form.Item label={item.sName === "sUserName" ? "账号" : item.showName} key={item.sName}> |
| 1384 | <ShowType {...showTypeProps} /> | 1302 | <ShowType {...showTypeProps} /> |
| 1385 | </Form.Item> | 1303 | </Form.Item> |
| 1386 | ); | 1304 | ); |
| 1387 | }; | 1305 | }; |
| 1388 | 1306 | ||
| 1389 | -const getFaceResult = async (props) => { | 1307 | +const getFaceResult = async props => { |
| 1390 | let faceResult = false; | 1308 | let faceResult = false; |
| 1391 | const loginType = await new Promise(resolve => { | 1309 | const loginType = await new Promise(resolve => { |
| 1392 | Modal.confirm({ | 1310 | Modal.confirm({ |
| @@ -1407,7 +1325,7 @@ const getFaceResult = async (props) => { | @@ -1407,7 +1325,7 @@ const getFaceResult = async (props) => { | ||
| 1407 | } else { | 1325 | } else { |
| 1408 | resolve(0); | 1326 | resolve(0); |
| 1409 | } | 1327 | } |
| 1410 | - } | 1328 | + }, |
| 1411 | }); | 1329 | }); |
| 1412 | }); | 1330 | }); |
| 1413 | 1331 | ||
| @@ -1432,28 +1350,20 @@ const getFaceResult = async (props) => { | @@ -1432,28 +1350,20 @@ const getFaceResult = async (props) => { | ||
| 1432 | okText: "取消", | 1350 | okText: "取消", |
| 1433 | onOk() { | 1351 | onOk() { |
| 1434 | resolve(false); | 1352 | resolve(false); |
| 1435 | - } | 1353 | + }, |
| 1436 | }); | 1354 | }); |
| 1437 | }); | 1355 | }); |
| 1438 | } else if (loginType === 2) { | 1356 | } else if (loginType === 2) { |
| 1439 | // 账号密码登陆 | 1357 | // 账号密码登陆 |
| 1440 | let loginConfig; | 1358 | let loginConfig; |
| 1441 | - const configUrl = `${ | ||
| 1442 | - commonConfig.server_host | ||
| 1443 | - }business/getModelBysId/${sModelsId}?sModelsId=${sModelsId}&sName=/commonAuto`; | ||
| 1444 | - const configReturn = (await commonServices.getService("", configUrl)) | ||
| 1445 | - .data; | 1359 | + const configUrl = `${commonConfig.server_host}business/getModelBysId/${sModelsId}?sModelsId=${sModelsId}&sName=/commonAuto`; |
| 1360 | + const configReturn = (await commonServices.getService("", configUrl)).data; | ||
| 1446 | if (configReturn.code === 1) { | 1361 | if (configReturn.code === 1) { |
| 1447 | const dataReturn = configReturn.dataset.rows; | 1362 | const dataReturn = configReturn.dataset.rows; |
| 1448 | if (commonUtils.isNotEmptyArr(dataReturn)) { | 1363 | if (commonUtils.isNotEmptyArr(dataReturn)) { |
| 1449 | const { formData } = dataReturn[0]; | 1364 | const { formData } = dataReturn[0]; |
| 1450 | if (commonUtils.isNotEmptyArr(formData)) { | 1365 | if (commonUtils.isNotEmptyArr(formData)) { |
| 1451 | - loginConfig = formData[0].gdsconfigformslave.filter( | ||
| 1452 | - item => | ||
| 1453 | - item.bVisible && | ||
| 1454 | - item.sName && | ||
| 1455 | - ["sUserName", "sPassWord"].includes(item.sName) | ||
| 1456 | - ); | 1366 | + loginConfig = formData[0].gdsconfigformslave.filter(item => item.bVisible && item.sName && ["sUserName", "sPassWord"].includes(item.sName)); |
| 1457 | } | 1367 | } |
| 1458 | } | 1368 | } |
| 1459 | } else { | 1369 | } else { |
| @@ -1485,35 +1395,31 @@ const getFaceResult = async (props) => { | @@ -1485,35 +1395,31 @@ const getFaceResult = async (props) => { | ||
| 1485 | } | 1395 | } |
| 1486 | 1396 | ||
| 1487 | const { sBrandsId, sSubsidiaryId } = mesSysbrands; | 1397 | const { sBrandsId, sSubsidiaryId } = mesSysbrands; |
| 1488 | - const url = `${ | ||
| 1489 | - commonConfig.server_host | ||
| 1490 | - }userloginUserNo/${sBrandsId}/${sSubsidiaryId}`; | 1398 | + const url = `${commonConfig.server_host}userloginUserNo/${sBrandsId}/${sSubsidiaryId}`; |
| 1491 | const value = { | 1399 | const value = { |
| 1492 | username: loginInfo.sUserNo || loginInfo.sUserName, | 1400 | username: loginInfo.sUserNo || loginInfo.sUserName, |
| 1493 | - password: loginInfo.sPassWord | 1401 | + password: loginInfo.sPassWord, |
| 1494 | }; | 1402 | }; |
| 1495 | 1403 | ||
| 1496 | - commonServices | ||
| 1497 | - .postValueService(null, value, url) | ||
| 1498 | - .then(({ data: dataReturn }) => { | ||
| 1499 | - const { msg, code, dataset } = dataReturn; | ||
| 1500 | - if (code !== 1) { | ||
| 1501 | - message.error(msg); | ||
| 1502 | - return; | ||
| 1503 | - } | ||
| 1504 | - | ||
| 1505 | - if (commonUtils.isNotEmptyObject(msg)) { | ||
| 1506 | - message.warning(msg, 6); | ||
| 1507 | - } | ||
| 1508 | - | ||
| 1509 | - const result = dataset.rows[0]; | ||
| 1510 | - resolve(result); | ||
| 1511 | - }); | 1404 | + commonServices.postValueService(null, value, url).then(({ data: dataReturn }) => { |
| 1405 | + const { msg, code, dataset } = dataReturn; | ||
| 1406 | + if (code !== 1) { | ||
| 1407 | + message.error(msg); | ||
| 1408 | + return; | ||
| 1409 | + } | ||
| 1410 | + | ||
| 1411 | + if (commonUtils.isNotEmptyObject(msg)) { | ||
| 1412 | + message.warning(msg, 6); | ||
| 1413 | + } | ||
| 1414 | + | ||
| 1415 | + const result = dataset.rows[0]; | ||
| 1416 | + resolve(result); | ||
| 1417 | + }); | ||
| 1512 | } | 1418 | } |
| 1513 | }, | 1419 | }, |
| 1514 | onCancel() { | 1420 | onCancel() { |
| 1515 | resolve(false); | 1421 | resolve(false); |
| 1516 | - } | 1422 | + }, |
| 1517 | }); | 1423 | }); |
| 1518 | }); | 1424 | }); |
| 1519 | } | 1425 | } |
| @@ -1522,7 +1428,7 @@ const getFaceResult = async (props) => { | @@ -1522,7 +1428,7 @@ const getFaceResult = async (props) => { | ||
| 1522 | }; | 1428 | }; |
| 1523 | 1429 | ||
| 1524 | // 质量巡检-巡检项目-完成/修改 | 1430 | // 质量巡检-巡检项目-完成/修改 |
| 1525 | -const mesTableBtnClick4 = async (props) => { | 1431 | +const mesTableBtnClick4 = async props => { |
| 1526 | const { params = {}, table0Data = [], table1Data = [], tempUserName } = props; | 1432 | const { params = {}, table0Data = [], table1Data = [], tempUserName } = props; |
| 1527 | const { config = {}, record } = params; | 1433 | const { config = {}, record } = params; |
| 1528 | const { sControlName } = config; | 1434 | const { sControlName } = config; |
| @@ -1546,7 +1452,7 @@ const mesTableBtnClick4 = async (props) => { | @@ -1546,7 +1452,7 @@ const mesTableBtnClick4 = async (props) => { | ||
| 1546 | table1Data: table1Data.map(item => { | 1452 | table1Data: table1Data.map(item => { |
| 1547 | return item.sId === record.sId ? { ...item, bSave: 1 } : item; | 1453 | return item.sId === record.sId ? { ...item, bSave: 1 } : item; |
| 1548 | }), | 1454 | }), |
| 1549 | - }) | 1455 | + }); |
| 1550 | } else if (sControlName === "BtnFinish") { | 1456 | } else if (sControlName === "BtnFinish") { |
| 1551 | const bHasX = Object.keys(record).some(key => key?.startsWith("sItem") && record[key] === "✗"); | 1457 | const bHasX = Object.keys(record).some(key => key?.startsWith("sItem") && record[key] === "✗"); |
| 1552 | if (bHasX && !sQualityDeg) { | 1458 | if (bHasX && !sQualityDeg) { |
| @@ -1556,18 +1462,18 @@ const mesTableBtnClick4 = async (props) => { | @@ -1556,18 +1462,18 @@ const mesTableBtnClick4 = async (props) => { | ||
| 1556 | 1462 | ||
| 1557 | const iIndex = table1Data.findIndex(item => item.sId === record.sId); | 1463 | const iIndex = table1Data.findIndex(item => item.sId === record.sId); |
| 1558 | table1Data[iIndex].bSave = 0; | 1464 | table1Data[iIndex].bSave = 0; |
| 1559 | - table1Data[iIndex].handleType = table1Data[iIndex].handleType || 'update' | 1465 | + table1Data[iIndex].handleType = table1Data[iIndex].handleType || "update"; |
| 1560 | if (table1Data[iIndex].sSReserve1 === "1") { | 1466 | if (table1Data[iIndex].sSReserve1 === "1") { |
| 1561 | table1Data[iIndex].sPollingPerson = sUserName; | 1467 | table1Data[iIndex].sPollingPerson = sUserName; |
| 1562 | } | 1468 | } |
| 1563 | if (table1Data[iIndex].tPollingTime) { | 1469 | if (table1Data[iIndex].tPollingTime) { |
| 1564 | - table1Data[iIndex].tSReserve1 = moment().format('YYYY-MM-DD HH:mm:ss'); | 1470 | + table1Data[iIndex].tSReserve1 = moment().format("YYYY-MM-DD HH:mm:ss"); |
| 1565 | } | 1471 | } |
| 1566 | if (!table1Data[iIndex].tPollingTime) { | 1472 | if (!table1Data[iIndex].tPollingTime) { |
| 1567 | - table1Data[iIndex].tPollingTime = moment().format('YYYY-MM-DD HH:mm:ss'); | 1473 | + table1Data[iIndex].tPollingTime = moment().format("YYYY-MM-DD HH:mm:ss"); |
| 1568 | } | 1474 | } |
| 1569 | 1475 | ||
| 1570 | - const addState1 = { table0Data: table0Data.map(item => ({ ...item, bSave: 0, handleType: item.handleType || 'update' })), table1Data }; | 1476 | + const addState1 = { table0Data: table0Data.map(item => ({ ...item, bSave: 0, handleType: item.handleType || "update" })), table1Data }; |
| 1571 | 1477 | ||
| 1572 | props.onSaveState({ tempUserName: undefined, ...addState1 }); | 1478 | props.onSaveState({ tempUserName: undefined, ...addState1 }); |
| 1573 | props.onExecInstructSet({ | 1479 | props.onExecInstructSet({ |
| @@ -1577,22 +1483,306 @@ const mesTableBtnClick4 = async (props) => { | @@ -1577,22 +1483,306 @@ const mesTableBtnClick4 = async (props) => { | ||
| 1577 | sInstruct: JSON.stringify([ | 1483 | sInstruct: JSON.stringify([ |
| 1578 | { | 1484 | { |
| 1579 | opr: "save", | 1485 | opr: "save", |
| 1580 | - doNotRefresh: true, | 1486 | + // doNotRefresh: true, |
| 1581 | data: [ | 1487 | data: [ |
| 1582 | { | 1488 | { |
| 1583 | - tablename: "qlyqualityinspectionmaster", | ||
| 1584 | - srcDataset: "table0" | 1489 | + tablename: "qlyqualityinspectionmaster", |
| 1490 | + srcDataset: "table0", | ||
| 1585 | }, | 1491 | }, |
| 1586 | { | 1492 | { |
| 1587 | - tablename: "qlyqualityinspectionslave", | ||
| 1588 | - srcDataset: "table1" | ||
| 1589 | - } | ||
| 1590 | - ] | ||
| 1591 | - } | ||
| 1592 | - ]) | ||
| 1593 | - } | 1493 | + tablename: "qlyqualityinspectionslave", |
| 1494 | + srcDataset: "table1", | ||
| 1495 | + }, | ||
| 1496 | + ], | ||
| 1497 | + }, | ||
| 1498 | + ]), | ||
| 1499 | + }, | ||
| 1594 | }); | 1500 | }); |
| 1595 | } | 1501 | } |
| 1596 | -} | 1502 | +}; |
| 1503 | + | ||
| 1504 | +// 完工情场确认-车间领班审核 | ||
| 1505 | +const handleCjlbshCheck = async props => { | ||
| 1506 | + const faceResult = await getFaceResult(props); | ||
| 1507 | + | ||
| 1508 | + if (!faceResult) return; | ||
| 1509 | + | ||
| 1510 | + const { name } = faceResult; | ||
| 1511 | + const { slave0Config, slave0Data = [] } = props; | ||
| 1512 | + const filterConfig = slave0Config?.gdsconfigformslave?.filter(item => { | ||
| 1513 | + return item.sName === "sForemanCheckMemo"; | ||
| 1514 | + }); | ||
| 1515 | + | ||
| 1516 | + const returnData = await new Promise(resolve => { | ||
| 1517 | + props.onSaveState({ | ||
| 1518 | + commonRepairModalParams: { | ||
| 1519 | + visible: true, | ||
| 1520 | + title: "领班审核备注", | ||
| 1521 | + tableName: "slave0", | ||
| 1522 | + config: slave0Config, | ||
| 1523 | + record: { ...slave0Data[0], bSubmit: 0 }, | ||
| 1524 | + filterConfig, | ||
| 1525 | + callback: rowData => { | ||
| 1526 | + resolve(rowData); | ||
| 1527 | + }, | ||
| 1528 | + }, | ||
| 1529 | + }); | ||
| 1530 | + }); | ||
| 1531 | + | ||
| 1532 | + if (commonUtils.isEmptyObject(returnData)) return; | ||
| 1533 | + | ||
| 1534 | + const slave0DataNew = [ | ||
| 1535 | + { | ||
| 1536 | + ...returnData, | ||
| 1537 | + bSubmit: 1, | ||
| 1538 | + tForemanCheckDate: moment().format("YYYY-MM-DD HH:mm:ss"), | ||
| 1539 | + sForemanCheckPerson: name, | ||
| 1540 | + bForemanCheck: 1, | ||
| 1541 | + handleType: returnData.handleType || "update", | ||
| 1542 | + }, | ||
| 1543 | + ]; | ||
| 1544 | + | ||
| 1545 | + props.onSaveState({ slave0Data: slave0DataNew }); | ||
| 1546 | + props.onExecInstructSet({ | ||
| 1547 | + nextProps: { ...props, slave0Data: slave0DataNew }, | ||
| 1548 | + btnConfig: { | ||
| 1549 | + showName: "保存", | ||
| 1550 | + sInstruct: JSON.stringify([ | ||
| 1551 | + { | ||
| 1552 | + opr: "save", | ||
| 1553 | + doNotRefresh: true, | ||
| 1554 | + data: [ | ||
| 1555 | + { | ||
| 1556 | + tablename: "EptCompletionSiteClearanceMaster", | ||
| 1557 | + srcDataset: "slave0", | ||
| 1558 | + }, | ||
| 1559 | + ], | ||
| 1560 | + }, | ||
| 1561 | + ]), | ||
| 1562 | + }, | ||
| 1563 | + }); | ||
| 1564 | +}; | ||
| 1565 | + | ||
| 1566 | +// 完工情场确认-车间领班反审 | ||
| 1567 | +const handleCjlbfsCheck = async props => { | ||
| 1568 | + const faceResult = await getFaceResult(props); | ||
| 1569 | + if (!faceResult) return; | ||
| 1570 | + | ||
| 1571 | + const { slave0Data = [] } = props; | ||
| 1572 | + | ||
| 1573 | + const slave0DataNew = [{ ...slave0Data[0], bForemanCheck: 0, bIPQCCheck: 0, handleType: slave0Data[0].handleType || "update" }]; | ||
| 1574 | + | ||
| 1575 | + props.onSaveState({ slave0Data: slave0DataNew }); | ||
| 1576 | + props.onExecInstructSet({ | ||
| 1577 | + nextProps: { ...props, slave0Data: slave0DataNew }, | ||
| 1578 | + btnConfig: { | ||
| 1579 | + showName: "保存", | ||
| 1580 | + sInstruct: JSON.stringify([ | ||
| 1581 | + { | ||
| 1582 | + opr: "save", | ||
| 1583 | + doNotRefresh: true, | ||
| 1584 | + data: [ | ||
| 1585 | + { | ||
| 1586 | + tablename: "EptCompletionSiteClearanceMaster", | ||
| 1587 | + srcDataset: "slave0", | ||
| 1588 | + }, | ||
| 1589 | + ], | ||
| 1590 | + }, | ||
| 1591 | + ]), | ||
| 1592 | + }, | ||
| 1593 | + }); | ||
| 1594 | +}; | ||
| 1595 | + | ||
| 1596 | +// 完工情场确认-品管审核 | ||
| 1597 | +const handlePgshCheck = async props => { | ||
| 1598 | + const faceResult = await getFaceResult(props); | ||
| 1599 | + | ||
| 1600 | + if (!faceResult) return; | ||
| 1601 | + | ||
| 1602 | + const { name } = faceResult; | ||
| 1603 | + const { slave0Config, slave0Data = [] } = props; | ||
| 1604 | + const filterConfig = slave0Config?.gdsconfigformslave?.filter(item => { | ||
| 1605 | + return item.sName === "sIPQCCheckMemo"; | ||
| 1606 | + }); | ||
| 1607 | + | ||
| 1608 | + const returnData = await new Promise(resolve => { | ||
| 1609 | + props.onSaveState({ | ||
| 1610 | + commonRepairModalParams: { | ||
| 1611 | + visible: true, | ||
| 1612 | + title: "品管审核备注", | ||
| 1613 | + tableName: "slave0", | ||
| 1614 | + config: slave0Config, | ||
| 1615 | + record: { ...slave0Data[0], bSubmit: 0 }, | ||
| 1616 | + filterConfig, | ||
| 1617 | + callback: rowData => { | ||
| 1618 | + resolve(rowData); | ||
| 1619 | + }, | ||
| 1620 | + }, | ||
| 1621 | + }); | ||
| 1622 | + }); | ||
| 1623 | + | ||
| 1624 | + if (commonUtils.isEmptyObject(returnData)) return; | ||
| 1625 | + | ||
| 1626 | + const slave0DataNew = [ | ||
| 1627 | + { | ||
| 1628 | + ...returnData, | ||
| 1629 | + bSubmit: 1, | ||
| 1630 | + tIPQCCheckDate: moment().format("YYYY-MM-DD HH:mm:ss"), | ||
| 1631 | + sIPQCCheckPerson: name, | ||
| 1632 | + bIPQCCheck: 1, | ||
| 1633 | + handleType: returnData.handleType || "update", | ||
| 1634 | + }, | ||
| 1635 | + ]; | ||
| 1636 | + | ||
| 1637 | + props.onSaveState({ slave0Data: slave0DataNew }); | ||
| 1638 | + props.onExecInstructSet({ | ||
| 1639 | + nextProps: { ...props, slave0Data: slave0DataNew }, | ||
| 1640 | + btnConfig: { | ||
| 1641 | + showName: "保存", | ||
| 1642 | + sInstruct: JSON.stringify([ | ||
| 1643 | + { | ||
| 1644 | + opr: "save", | ||
| 1645 | + doNotRefresh: true, | ||
| 1646 | + data: [ | ||
| 1647 | + { | ||
| 1648 | + tablename: "EptCompletionSiteClearanceMaster", | ||
| 1649 | + srcDataset: "slave0", | ||
| 1650 | + }, | ||
| 1651 | + ], | ||
| 1652 | + }, | ||
| 1653 | + ]), | ||
| 1654 | + }, | ||
| 1655 | + }); | ||
| 1656 | +}; | ||
| 1657 | + | ||
| 1658 | +// 完工情场确认-品管反审 | ||
| 1659 | +const handlePgfsCheck = async props => { | ||
| 1660 | + const faceResult = await getFaceResult(props); | ||
| 1661 | + if (!faceResult) return; | ||
| 1662 | + | ||
| 1663 | + const { slave0Data = [] } = props; | ||
| 1664 | + | ||
| 1665 | + const slave0DataNew = [{ ...slave0Data[0], bIPQCCheck: 0, handleType: slave0Data[0].handleType || "update" }]; | ||
| 1666 | + | ||
| 1667 | + props.onSaveState({ slave0Data: slave0DataNew }); | ||
| 1668 | + props.onExecInstructSet({ | ||
| 1669 | + nextProps: { ...props, slave0Data: slave0DataNew }, | ||
| 1670 | + btnConfig: { | ||
| 1671 | + showName: "保存", | ||
| 1672 | + sInstruct: JSON.stringify([ | ||
| 1673 | + { | ||
| 1674 | + opr: "save", | ||
| 1675 | + doNotRefresh: true, | ||
| 1676 | + data: [ | ||
| 1677 | + { | ||
| 1678 | + tablename: "EptCompletionSiteClearanceMaster", | ||
| 1679 | + srcDataset: "slave0", | ||
| 1680 | + }, | ||
| 1681 | + ], | ||
| 1682 | + }, | ||
| 1683 | + ]), | ||
| 1684 | + }, | ||
| 1685 | + }); | ||
| 1686 | +}; | ||
| 1687 | + | ||
| 1688 | +// 完工清场确认-确认提交 | ||
| 1689 | +const handleConfirmSubmit = async props => { | ||
| 1690 | + const { slave0Data } = props; | ||
| 1691 | + const slave0RowData = slave0Data[0]; | ||
| 1692 | + const { tFirstCompleteTime, tFirstClearanceTime, tSecondStartTime } = slave0RowData; | ||
| 1693 | + if (tFirstCompleteTime) { | ||
| 1694 | + // 完工时间需小于清场时间 | ||
| 1695 | + if (moment(tFirstCompleteTime).isAfter(moment(tFirstClearanceTime))) { | ||
| 1696 | + message.error("完工时间需小于清场时间", 3); | ||
| 1697 | + return; | ||
| 1698 | + } | ||
| 1699 | + } | ||
| 1700 | + | ||
| 1701 | + if (tSecondStartTime) { | ||
| 1702 | + // 清场时间需小于第二单开单时间 | ||
| 1703 | + if (moment(tFirstClearanceTime).isAfter(moment(tSecondStartTime))) { | ||
| 1704 | + message.error("清场时间需小于第二单开单时间", 3); | ||
| 1705 | + return; | ||
| 1706 | + } | ||
| 1707 | + } | ||
| 1708 | + | ||
| 1709 | + if (!tFirstCompleteTime || !tSecondStartTime) { | ||
| 1710 | + const confirmResult = await new Promise(resolve => { | ||
| 1711 | + Modal.confirm({ | ||
| 1712 | + title: "温馨提示:", | ||
| 1713 | + content: "工单完工时间或者第二单开工时间未填写是否继续提交?", | ||
| 1714 | + closable: true, | ||
| 1715 | + maskClosable: true, | ||
| 1716 | + wrapClassName: "mesCommonModal", | ||
| 1717 | + onOk() { | ||
| 1718 | + resolve(1); | ||
| 1719 | + }, | ||
| 1720 | + onCancel() { | ||
| 1721 | + resolve(0); | ||
| 1722 | + }, | ||
| 1723 | + }); | ||
| 1724 | + }); | ||
| 1725 | + | ||
| 1726 | + if (!confirmResult) return; | ||
| 1727 | + } | ||
| 1728 | + | ||
| 1729 | + const { sMachineGuid, sUserName, sTeamNo, sTeamId } = commonUtils.getAppData("userinfo"); | ||
| 1730 | + const addState = { | ||
| 1731 | + sMachineId: sMachineGuid, | ||
| 1732 | + bSave: 1, | ||
| 1733 | + bSubmit: 1, | ||
| 1734 | + sFormId: "17086722220003015078585693314000", | ||
| 1735 | + sMakePerson: sUserName, | ||
| 1736 | + sFirstTeamNo: sTeamNo, | ||
| 1737 | + sSecondTeamNo: sTeamNo, | ||
| 1738 | + sFirstTeamId: sTeamId, | ||
| 1739 | + sSecondTeamId: sTeamId, | ||
| 1740 | + sFirstClearancePerson: sUserName, | ||
| 1741 | + handleType: slave0RowData.handleType || "update" | ||
| 1742 | + }; | ||
| 1743 | + const slave0DataNew = [{ ...slave0RowData, ...addState }]; | ||
| 1744 | + | ||
| 1745 | + let refreshDataset = "slave1"; | ||
| 1746 | + if (addState.handleType === 'add') { | ||
| 1747 | + window.rowclickAfterFunc = (nextProps) => { | ||
| 1748 | + const { slave1Data } = nextProps; | ||
| 1749 | + props.onSaveState({ slave1SelectedRowKeys: [slave1Data[0].sId] }); | ||
| 1750 | + } | ||
| 1751 | + } else { | ||
| 1752 | + refreshDataset = "*"; | ||
| 1753 | + } | ||
| 1754 | + | ||
| 1755 | + props.onExecInstructSet({ | ||
| 1756 | + nextProps: { ...props, bSaveAndUpdate: true, slave0Data: slave0DataNew }, | ||
| 1757 | + btnConfig: { | ||
| 1758 | + showName: "保存", | ||
| 1759 | + sInstruct: JSON.stringify([ | ||
| 1760 | + { | ||
| 1761 | + opr: "save", | ||
| 1762 | + doNotRefresh: true, | ||
| 1763 | + data: [ | ||
| 1764 | + { | ||
| 1765 | + tablename: "EptCompletionSiteClearanceMaster", | ||
| 1766 | + srcDataset: "slave0", | ||
| 1767 | + }, | ||
| 1768 | + ].map(item => { | ||
| 1769 | + if (!slave0RowData.sBillNo) { | ||
| 1770 | + return { | ||
| 1771 | + ...item, | ||
| 1772 | + maxBillNo: "sBillNo" | ||
| 1773 | + } | ||
| 1774 | + } else { | ||
| 1775 | + return item; | ||
| 1776 | + } | ||
| 1777 | + }), | ||
| 1778 | + }, | ||
| 1779 | + { | ||
| 1780 | + opr: "refresh", | ||
| 1781 | + dataset: refreshDataset | ||
| 1782 | + }, | ||
| 1783 | + ]), | ||
| 1784 | + }, | ||
| 1785 | + }); | ||
| 1786 | +}; | ||
| 1597 | 1787 | ||
| 1598 | export default costomPageFun; | 1788 | export default costomPageFun; |