Commit 96c9de8611e7694dbb8121aacc80593233e4ee9d
1 parent
41492bc0
格式化代码;
Showing
1 changed file
with
210 additions
and
353 deletions
src/mes/costomPageFun/index.js
| ... | ... | @@ -8,15 +8,10 @@ import * as commonFunc from "@/components/Common/commonFunc"; |
| 8 | 8 | import FaceDetect from "@/components/FaceDetect"; |
| 9 | 9 | import ShowType from "@/components/Common/CommonComponent"; |
| 10 | 10 | const costomPageFun = ({ props, tableName, sFieldName, actionName }) => { |
| 11 | - const { sModelsId } = commonUtils.convertStrToObj( | |
| 12 | - localStorage.xlybusinesscurrentMesPane | |
| 13 | - ); | |
| 11 | + const { sModelsId } = commonUtils.convertStrToObj(localStorage.xlybusinesscurrentMesPane); | |
| 14 | 12 | |
| 15 | 13 | let result = false; |
| 16 | - switch ( | |
| 17 | - `${sModelsId}-${tableName}${sFieldName ? `-${sFieldName}` : "" | |
| 18 | - }-${actionName}` | |
| 19 | - ) { | |
| 14 | + switch (`${sModelsId}-${tableName}${sFieldName ? `-${sFieldName}` : ""}-${actionName}`) { | |
| 20 | 15 | case "12710101117087404588200-table0-mesTableLineAdd": |
| 21 | 16 | case "12710101117260270570210-table0-mesTableLineAdd": |
| 22 | 17 | case "12710101117087371044360-slave0-mesTableLineAdd": |
| ... | ... | @@ -135,10 +130,7 @@ const costomPageFun = ({ props, tableName, sFieldName, actionName }) => { |
| 135 | 130 | break; |
| 136 | 131 | } |
| 137 | 132 | |
| 138 | - if ( | |
| 139 | - ["mesBtnClick"].includes(actionName) && | |
| 140 | - ["BtnRight.PriorCom", "BtnRight.NextCom"].includes(sFieldName) | |
| 141 | - ) { | |
| 133 | + if (["mesBtnClick"].includes(actionName) && ["BtnRight.PriorCom", "BtnRight.NextCom"].includes(sFieldName)) { | |
| 142 | 134 | handleUpDownData({ ...props, tableName, sFieldName }); |
| 143 | 135 | return true; |
| 144 | 136 | } |
| ... | ... | @@ -149,19 +141,14 @@ const costomPageFun = ({ props, tableName, sFieldName, actionName }) => { |
| 149 | 141 | // 班组报工行车记录表格新增 |
| 150 | 142 | const mesTableLineAdd1 = (props, tableName) => { |
| 151 | 143 | // const tableName = "table0"; |
| 152 | - const { | |
| 153 | - [`${tableName}SelectedRowKeys`]: selectedRowKeys, | |
| 154 | - [`${tableName}Data`]: tableData = [] | |
| 155 | - } = props; | |
| 144 | + const { [`${tableName}SelectedRowKeys`]: selectedRowKeys, [`${tableName}Data`]: tableData = [] } = props; | |
| 156 | 145 | |
| 157 | 146 | if (commonUtils.isEmptyObject(selectedRowKeys)) { |
| 158 | 147 | message.info("请先选中一条行车记录数据!"); |
| 159 | 148 | return; |
| 160 | 149 | } |
| 161 | 150 | |
| 162 | - const rowDataIndex = tableData.findIndex( | |
| 163 | - item => item.sId === selectedRowKeys[0] | |
| 164 | - ); | |
| 151 | + const rowDataIndex = tableData.findIndex(item => item.sId === selectedRowKeys[0]); | |
| 165 | 152 | if (rowDataIndex === -1) return; |
| 166 | 153 | |
| 167 | 154 | const rowData = tableData[rowDataIndex]; |
| ... | ... | @@ -206,21 +193,17 @@ const mesTableLineAdd1 = (props, tableName) => { |
| 206 | 193 | props.onSaveState( |
| 207 | 194 | { |
| 208 | 195 | [`${tableName}Data`]: tableDataNew, |
| 209 | - [`${tableName}SelectedRowKeys`]: [rowDataCopy.sId] | |
| 196 | + [`${tableName}SelectedRowKeys`]: [rowDataCopy.sId], | |
| 210 | 197 | }, |
| 211 | 198 | nextProps => { |
| 212 | 199 | const name = tableName; |
| 213 | 200 | const { [`${name}Config`]: tableConfig = {} } = nextProps; |
| 214 | - const rowClickConfig = tableConfig.gdsconfigformslave?.find( | |
| 215 | - item => | |
| 216 | - item.sControlName && | |
| 217 | - item.sControlName.toLowerCase().includes("rowclick") | |
| 218 | - ); | |
| 201 | + const rowClickConfig = tableConfig.gdsconfigformslave?.find(item => item.sControlName && item.sControlName.toLowerCase().includes("rowclick")); | |
| 219 | 202 | if (!rowClickConfig) return; |
| 220 | 203 | |
| 221 | 204 | props.handleExecInstructSet({ |
| 222 | 205 | btnConfig: rowClickConfig, |
| 223 | - nextProps: nextProps | |
| 206 | + nextProps: nextProps, | |
| 224 | 207 | }); |
| 225 | 208 | } |
| 226 | 209 | ); |
| ... | ... | @@ -228,9 +211,7 @@ const mesTableLineAdd1 = (props, tableName) => { |
| 228 | 211 | |
| 229 | 212 | // 研发工艺参数材料表新增 |
| 230 | 213 | const mesTableLineAdd2 = (props, tableName) => { |
| 231 | - const oTab = document | |
| 232 | - .querySelector('.ant-tabs-tabpane-active[id*="研发工艺参数"]') | |
| 233 | - .querySelector(".ant-tabs-tab-active"); | |
| 214 | + const oTab = document.querySelector('.ant-tabs-tabpane-active[id*="研发工艺参数"]').querySelector(".ant-tabs-tab-active"); | |
| 234 | 215 | if (!oTab) return; |
| 235 | 216 | |
| 236 | 217 | const dataNodeKey = oTab.getAttribute("data-node-key") || ""; |
| ... | ... | @@ -242,29 +223,23 @@ const mesTableLineAdd2 = (props, tableName) => { |
| 242 | 223 | handleType: "add", |
| 243 | 224 | sParentId: props.yftable0Data?.[0]?.sId || "", |
| 244 | 225 | sRev, |
| 245 | - bSave: 0 | |
| 226 | + bSave: 0, | |
| 246 | 227 | }; |
| 247 | 228 | |
| 248 | 229 | const { [`${tableName}Data`]: tableData = [] } = props; |
| 249 | 230 | props.onSaveState({ |
| 250 | - [`${tableName}Data`]: [...tableData, newData] | |
| 231 | + [`${tableName}Data`]: [...tableData, newData], | |
| 251 | 232 | }); |
| 252 | 233 | }; |
| 253 | 234 | |
| 254 | 235 | // 班组报工行车记录表格起始时间修改 |
| 255 | 236 | const mesTableChange1 = (props, tableName) => { |
| 256 | 237 | // const tableName = "table0"; |
| 257 | - const { | |
| 258 | - [`${tableName}SelectedRowKeys`]: selectedRowKeys, | |
| 259 | - [`${tableName}Data`]: tableData = [], | |
| 260 | - rowDataOld | |
| 261 | - } = props; | |
| 238 | + const { [`${tableName}SelectedRowKeys`]: selectedRowKeys, [`${tableName}Data`]: tableData = [], rowDataOld } = props; | |
| 262 | 239 | |
| 263 | 240 | let tableDataNew = lodash.cloneDeep(tableData); |
| 264 | 241 | |
| 265 | - const rowDataIndex = tableData.findIndex( | |
| 266 | - item => item.sId === selectedRowKeys[0] | |
| 267 | - ); | |
| 242 | + const rowDataIndex = tableData.findIndex(item => item.sId === selectedRowKeys[0]); | |
| 268 | 243 | if (rowDataIndex === -1) return; |
| 269 | 244 | |
| 270 | 245 | const rowData = tableData[rowDataIndex]; |
| ... | ... | @@ -275,30 +250,23 @@ const mesTableChange1 = (props, tableName) => { |
| 275 | 250 | return; |
| 276 | 251 | } |
| 277 | 252 | |
| 278 | - let parentRowDataIndex = tableData.findIndex( | |
| 279 | - item => item.sId !== sId && item.tStartDate === tStartDate | |
| 280 | - ); | |
| 253 | + let parentRowDataIndex = tableData.findIndex(item => item.sId !== sId && item.tStartDate === tStartDate); | |
| 281 | 254 | |
| 282 | 255 | if (parentRowDataIndex === -1) { |
| 283 | - parentRowDataIndex = tableData.findIndex( | |
| 284 | - item => item.tStartDate === rowDataOld.tEndDate | |
| 285 | - ); | |
| 256 | + parentRowDataIndex = tableData.findIndex(item => item.tStartDate === rowDataOld.tEndDate); | |
| 286 | 257 | } |
| 287 | 258 | |
| 288 | 259 | if (parentRowDataIndex === -1) return; |
| 289 | 260 | |
| 290 | 261 | const parentRowData = tableData[parentRowDataIndex]; |
| 291 | - const { | |
| 292 | - tStartDate: tStartDateParent, | |
| 293 | - tEndDate: tEndDateParent | |
| 294 | - } = parentRowData; | |
| 262 | + const { tStartDate: tStartDateParent, tEndDate: tEndDateParent } = parentRowData; | |
| 295 | 263 | |
| 296 | 264 | // 检查tStartDate是否在tEndDate之前 |
| 297 | 265 | if (moment(tEndDate).isBefore(moment(tStartDate))) { |
| 298 | 266 | message.info("结束时间不能小于起始时间!", 3); |
| 299 | 267 | tableDataNew[rowDataIndex] = rowDataOld; |
| 300 | 268 | props.onSaveState({ |
| 301 | - [`${tableName}Data`]: tableDataNew | |
| 269 | + [`${tableName}Data`]: tableDataNew, | |
| 302 | 270 | }); |
| 303 | 271 | return; |
| 304 | 272 | } |
| ... | ... | @@ -308,7 +276,7 @@ const mesTableChange1 = (props, tableName) => { |
| 308 | 276 | message.info("结束不能大于父节点的结束时间!", 3); |
| 309 | 277 | tableDataNew[rowDataIndex] = rowDataOld; |
| 310 | 278 | props.onSaveState({ |
| 311 | - [`${tableName}Data`]: tableDataNew | |
| 279 | + [`${tableName}Data`]: tableDataNew, | |
| 312 | 280 | }); |
| 313 | 281 | return; |
| 314 | 282 | } |
| ... | ... | @@ -318,7 +286,7 @@ const mesTableChange1 = (props, tableName) => { |
| 318 | 286 | message.info("结束不能大于当前时间!", 3); |
| 319 | 287 | tableDataNew[rowDataIndex] = rowDataOld; |
| 320 | 288 | props.onSaveState({ |
| 321 | - [`${tableName}Data`]: tableDataNew | |
| 289 | + [`${tableName}Data`]: tableDataNew, | |
| 322 | 290 | }); |
| 323 | 291 | return; |
| 324 | 292 | } |
| ... | ... | @@ -326,14 +294,13 @@ const mesTableChange1 = (props, tableName) => { |
| 326 | 294 | // 父节点的结束时间改成当前行的起始时间 |
| 327 | 295 | tableDataNew[rowDataIndex].bUnChanged = false; |
| 328 | 296 | tableDataNew[parentRowDataIndex].tStartDate = tEndDate; |
| 329 | - tableDataNew[parentRowDataIndex].handleType = | |
| 330 | - tableDataNew[parentRowDataIndex].handleType || "update"; | |
| 297 | + tableDataNew[parentRowDataIndex].handleType = tableDataNew[parentRowDataIndex].handleType || "update"; | |
| 331 | 298 | |
| 332 | 299 | // 时间倒序排序 |
| 333 | 300 | tableDataNew.sort((a, b) => new Date(b.tEndDate) - new Date(a.tEndDate)); |
| 334 | 301 | |
| 335 | 302 | const addState = { |
| 336 | - [`${tableName}Data`]: tableDataNew | |
| 303 | + [`${tableName}Data`]: tableDataNew, | |
| 337 | 304 | }; |
| 338 | 305 | props.onSaveState(addState); |
| 339 | 306 | |
| ... | ... | @@ -353,32 +320,28 @@ const mesTableLineDel1 = async (props, tableName) => { |
| 353 | 320 | if (commonUtils.isNotEmptyArr(tableData)) { |
| 354 | 321 | const addState = { |
| 355 | 322 | [`${tableName}SelectedRowKeys`]: [tableData[0].sId], |
| 356 | - [`slave1SelectedRowKeys`]: [tableData[0].sAbnormalEventId] | |
| 323 | + [`slave1SelectedRowKeys`]: [tableData[0].sAbnormalEventId], | |
| 357 | 324 | }; |
| 358 | 325 | |
| 359 | 326 | if (tableData.some(item => item.bUnChanged)) { |
| 360 | 327 | addState[`${tableName}Data`] = tableData.map(item => ({ |
| 361 | 328 | ...item, |
| 362 | - bUnChanged: undefined | |
| 329 | + bUnChanged: undefined, | |
| 363 | 330 | })); |
| 364 | 331 | } |
| 365 | 332 | |
| 366 | 333 | props.onSaveState(addState); |
| 367 | 334 | const name = tableName; |
| 368 | 335 | const { [`${name}Config`]: tableConfig = {} } = props; |
| 369 | - const rowClickConfig = tableConfig.gdsconfigformslave?.find( | |
| 370 | - item => | |
| 371 | - item.sControlName && | |
| 372 | - item.sControlName.toLowerCase().includes("rowclick") | |
| 373 | - ); | |
| 336 | + const rowClickConfig = tableConfig.gdsconfigformslave?.find(item => item.sControlName && item.sControlName.toLowerCase().includes("rowclick")); | |
| 374 | 337 | if (!rowClickConfig) return; |
| 375 | 338 | await awaitPromiseReturn(); |
| 376 | 339 | props.handleExecInstructSet({ |
| 377 | 340 | btnConfig: rowClickConfig, |
| 378 | 341 | nextProps: { |
| 379 | 342 | ...props, |
| 380 | - [`${tableName}SelectedRowKeys`]: [tableData[0].sId] | |
| 381 | - } | |
| 343 | + [`${tableName}SelectedRowKeys`]: [tableData[0].sId], | |
| 344 | + }, | |
| 382 | 345 | }); |
| 383 | 346 | } |
| 384 | 347 | return; |
| ... | ... | @@ -386,10 +349,7 @@ const mesTableLineDel1 = async (props, tableName) => { |
| 386 | 349 | |
| 387 | 350 | // 找剩余数据中开始时间等于删除数据结束时间的那条数据 |
| 388 | 351 | const iIndex = tableData.findIndex( |
| 389 | - item => | |
| 390 | - !item.bUnChanged && | |
| 391 | - (item.sSrcHourId === sSrcHourId || item.sId === sSrcHourId) && | |
| 392 | - tEndDate === item.tStartDate | |
| 352 | + item => !item.bUnChanged && (item.sSrcHourId === sSrcHourId || item.sId === sSrcHourId) && tEndDate === item.tStartDate | |
| 393 | 353 | ); |
| 394 | 354 | if (iIndex === -1) { |
| 395 | 355 | if (tableName === "table0") { |
| ... | ... | @@ -404,7 +364,7 @@ const mesTableLineDel1 = async (props, tableName) => { |
| 404 | 364 | tableDataNew[iIndex].tStartDate = tStartDate; |
| 405 | 365 | tableDataNew[iIndex].handleType = tableDataNew[iIndex].handleType || "update"; |
| 406 | 366 | const addState = { |
| 407 | - [`${tableName}Data`]: tableDataNew | |
| 367 | + [`${tableName}Data`]: tableDataNew, | |
| 408 | 368 | }; |
| 409 | 369 | props.onSaveState(addState); |
| 410 | 370 | |
| ... | ... | @@ -424,73 +384,67 @@ const handleMesSave = props => { |
| 424 | 384 | sInstruct: JSON.stringify([ |
| 425 | 385 | { |
| 426 | 386 | opr: "newempty", |
| 427 | - newDataset: "NewReportSlave" | |
| 387 | + newDataset: "NewReportSlave", | |
| 428 | 388 | }, |
| 429 | 389 | { |
| 430 | 390 | opr: "edit", |
| 431 | 391 | desDataset: "NewReportSlave", |
| 432 | 392 | dataset: "table0@sec", |
| 433 | - sValue: | |
| 434 | - "sNewReportSlaveId:table0.sId,sSrcHourId:table0.sSrcHourId,tEndDate:table0.tEndDate" | |
| 393 | + sValue: "sNewReportSlaveId:table0.sId,sSrcHourId:table0.sSrcHourId,tEndDate:table0.tEndDate", | |
| 435 | 394 | }, |
| 436 | 395 | { |
| 437 | 396 | opr: "filter", |
| 438 | 397 | srcDataset: "table0", |
| 439 | 398 | newDataset: "OldReportSlave", |
| 440 | 399 | dataset: "NewReportSlave,table0One", |
| 441 | - condition: "'${table0One.sId}'=='${NewReportSlave.sSrcHourId}'" | |
| 400 | + condition: "'${table0One.sId}'=='${NewReportSlave.sSrcHourId}'", | |
| 442 | 401 | }, |
| 443 | 402 | { |
| 444 | 403 | opr: "newempty", |
| 445 | - newDataset: "temp0" | |
| 404 | + newDataset: "temp0", | |
| 446 | 405 | }, |
| 447 | 406 | { |
| 448 | 407 | opr: "edit", |
| 449 | 408 | desDataset: "temp0", |
| 450 | 409 | dataset: "NewReportSlave,OldReportSlave", |
| 451 | 410 | sValue: |
| 452 | - "iOperateType:${1},sNewReportSlaveId:NewReportSlave.sNewReportSlaveId,sOldReportSlaveId:OldReportSlave.sId,tNewEndDate:NewReportSlave.tEndDate" | |
| 411 | + "iOperateType:${1},sNewReportSlaveId:NewReportSlave.sNewReportSlaveId,sOldReportSlaveId:OldReportSlave.sId,tNewEndDate:NewReportSlave.tEndDate", | |
| 453 | 412 | }, |
| 454 | 413 | { |
| 455 | 414 | opr: "exesql", |
| 456 | 415 | data: [ |
| 457 | 416 | { |
| 458 | - sql: | |
| 459 | - "call Sp_mes_Operate_ProductionReport(${iOperateType},${sNewReportSlaveId},${sOldReportSlaveId},${tNewEndDate})", | |
| 460 | - srcDataset: "temp0" | |
| 461 | - } | |
| 462 | - ] | |
| 417 | + sql: "call Sp_mes_Operate_ProductionReport(${iOperateType},${sNewReportSlaveId},${sOldReportSlaveId},${tNewEndDate})", | |
| 418 | + srcDataset: "temp0", | |
| 419 | + }, | |
| 420 | + ], | |
| 463 | 421 | }, |
| 464 | 422 | { |
| 465 | 423 | opr: "save", |
| 466 | 424 | data: [ |
| 467 | 425 | { |
| 468 | 426 | tablename: "mftproductionreportslave", |
| 469 | - srcDataset: "table0" | |
| 470 | - } | |
| 471 | - ] | |
| 427 | + srcDataset: "table0", | |
| 428 | + }, | |
| 429 | + ], | |
| 472 | 430 | }, |
| 473 | 431 | { |
| 474 | 432 | opr: "refresh", |
| 475 | - dataset: "table0,table1,table4,table0NotFirstlineSelected" | |
| 476 | - } | |
| 477 | - ]) | |
| 433 | + dataset: "table0,table1,table4,table0NotFirstlineSelected", | |
| 434 | + }, | |
| 435 | + ]), | |
| 478 | 436 | }, |
| 479 | 437 | inscallback: async () => { |
| 480 | 438 | const name = "table0"; |
| 481 | 439 | const { [`${name}Config`]: tableConfig = {} } = props; |
| 482 | - const rowClickConfig = tableConfig.gdsconfigformslave?.find( | |
| 483 | - item => | |
| 484 | - item.sControlName && | |
| 485 | - item.sControlName.toLowerCase().includes("rowclick") | |
| 486 | - ); | |
| 440 | + const rowClickConfig = tableConfig.gdsconfigformslave?.find(item => item.sControlName && item.sControlName.toLowerCase().includes("rowclick")); | |
| 487 | 441 | if (!rowClickConfig) return; |
| 488 | 442 | await awaitPromiseReturn(); |
| 489 | 443 | props.handleExecInstructSet({ |
| 490 | 444 | btnConfig: rowClickConfig, |
| 491 | - nextProps: props | |
| 445 | + nextProps: props, | |
| 492 | 446 | }); |
| 493 | - } | |
| 447 | + }, | |
| 494 | 448 | }); |
| 495 | 449 | }; |
| 496 | 450 | |
| ... | ... | @@ -513,25 +467,24 @@ const handleMesSlave0Save = props => { |
| 513 | 467 | sInstruct: JSON.stringify([ |
| 514 | 468 | { |
| 515 | 469 | opr: "newempty", |
| 516 | - newDataset: "NewReportSlave" | |
| 470 | + newDataset: "NewReportSlave", | |
| 517 | 471 | }, |
| 518 | 472 | { |
| 519 | 473 | opr: "edit", |
| 520 | 474 | desDataset: "NewReportSlave", |
| 521 | 475 | dataset: "slave0@sec", |
| 522 | - sValue: | |
| 523 | - "sNewReportSlaveId:slave0.sId,sSrcHourId:slave0.sSrcHourId,tEndDate:slave0.tEndDate" | |
| 476 | + sValue: "sNewReportSlaveId:slave0.sId,sSrcHourId:slave0.sSrcHourId,tEndDate:slave0.tEndDate", | |
| 524 | 477 | }, |
| 525 | 478 | { |
| 526 | 479 | opr: "filter", |
| 527 | 480 | srcDataset: "slave0", |
| 528 | 481 | newDataset: "OldReportSlave", |
| 529 | 482 | dataset: "NewReportSlave,slave0One", |
| 530 | - condition: "'${slave0One.sId}'=='${NewReportSlave.sSrcHourId}'" | |
| 483 | + condition: "'${slave0One.sId}'=='${NewReportSlave.sSrcHourId}'", | |
| 531 | 484 | }, |
| 532 | 485 | { |
| 533 | 486 | opr: "newempty", |
| 534 | - newDataset: "temp0" | |
| 487 | + newDataset: "temp0", | |
| 535 | 488 | }, |
| 536 | 489 | |
| 537 | 490 | { |
| ... | ... | @@ -539,48 +492,43 @@ const handleMesSlave0Save = props => { |
| 539 | 492 | desDataset: "temp0", |
| 540 | 493 | dataset: "NewReportSlave,OldReportSlave", |
| 541 | 494 | sValue: |
| 542 | - "iOperateType:${1},sNewReportSlaveId:NewReportSlave.sNewReportSlaveId,sOldReportSlaveId:OldReportSlave.sId,tNewEndDate:NewReportSlave.tEndDate" | |
| 495 | + "iOperateType:${1},sNewReportSlaveId:NewReportSlave.sNewReportSlaveId,sOldReportSlaveId:OldReportSlave.sId,tNewEndDate:NewReportSlave.tEndDate", | |
| 543 | 496 | }, |
| 544 | 497 | { |
| 545 | 498 | opr: "exesql", |
| 546 | 499 | data: [ |
| 547 | 500 | { |
| 548 | - sql: | |
| 549 | - "call Sp_mes_Operate_ProductionReport(${iOperateType},${sNewReportSlaveId},${sOldReportSlaveId},${tNewEndDate})", | |
| 550 | - srcDataset: "temp0" | |
| 551 | - } | |
| 552 | - ] | |
| 501 | + sql: "call Sp_mes_Operate_ProductionReport(${iOperateType},${sNewReportSlaveId},${sOldReportSlaveId},${tNewEndDate})", | |
| 502 | + srcDataset: "temp0", | |
| 503 | + }, | |
| 504 | + ], | |
| 553 | 505 | }, |
| 554 | 506 | { |
| 555 | 507 | opr: "save", |
| 556 | 508 | data: [ |
| 557 | 509 | { |
| 558 | 510 | tablename: "mftproductionreportslave", |
| 559 | - srcDataset: "slave0" | |
| 560 | - } | |
| 561 | - ] | |
| 511 | + srcDataset: "slave0", | |
| 512 | + }, | |
| 513 | + ], | |
| 562 | 514 | }, |
| 563 | 515 | { |
| 564 | 516 | opr: "refresh", |
| 565 | - dataset: "slave0,slave0NotFirstlineSelected" | |
| 566 | - } | |
| 567 | - ]) | |
| 517 | + dataset: "slave0,slave0NotFirstlineSelected", | |
| 518 | + }, | |
| 519 | + ]), | |
| 568 | 520 | }, |
| 569 | 521 | inscallback: async nextProps => { |
| 570 | 522 | const name = "slave0"; |
| 571 | 523 | const { [`${name}Config`]: tableConfig = {} } = props; |
| 572 | - const rowClickConfig = tableConfig.gdsconfigformslave?.find( | |
| 573 | - item => | |
| 574 | - item.sControlName && | |
| 575 | - item.sControlName.toLowerCase().includes("rowclick") | |
| 576 | - ); | |
| 524 | + const rowClickConfig = tableConfig.gdsconfigformslave?.find(item => item.sControlName && item.sControlName.toLowerCase().includes("rowclick")); | |
| 577 | 525 | if (!rowClickConfig) return; |
| 578 | 526 | await awaitPromiseReturn(); |
| 579 | 527 | props.handleExecInstructSet({ |
| 580 | 528 | btnConfig: rowClickConfig, |
| 581 | - nextProps: nextProps | |
| 529 | + nextProps: nextProps, | |
| 582 | 530 | }); |
| 583 | - } | |
| 531 | + }, | |
| 584 | 532 | }); |
| 585 | 533 | }; |
| 586 | 534 | |
| ... | ... | @@ -590,7 +538,7 @@ const handleMesSave1 = (props, delRow) => { |
| 590 | 538 | const temp0Data = []; |
| 591 | 539 | temp0Data.push({ |
| 592 | 540 | sNewReportSlaveId: delRow.sId, |
| 593 | - sOldReportSlaveId: delRow.sSrcHourId | |
| 541 | + sOldReportSlaveId: delRow.sSrcHourId, | |
| 594 | 542 | }); |
| 595 | 543 | |
| 596 | 544 | props.handleExecInstructSet({ |
| ... | ... | @@ -602,11 +550,10 @@ const handleMesSave1 = (props, delRow) => { |
| 602 | 550 | opr: "exesql", |
| 603 | 551 | data: [ |
| 604 | 552 | { |
| 605 | - sql: | |
| 606 | - "call Sp_mes_Operate_ProductionReport(2,${sNewReportSlaveId},${sOldReportSlaveId},null)", | |
| 607 | - srcDataset: "temp0" | |
| 608 | - } | |
| 609 | - ] | |
| 553 | + sql: "call Sp_mes_Operate_ProductionReport(2,${sNewReportSlaveId},${sOldReportSlaveId},null)", | |
| 554 | + srcDataset: "temp0", | |
| 555 | + }, | |
| 556 | + ], | |
| 610 | 557 | }, |
| 611 | 558 | |
| 612 | 559 | // { |
| ... | ... | @@ -633,25 +580,21 @@ const handleMesSave1 = (props, delRow) => { |
| 633 | 580 | // }, |
| 634 | 581 | { |
| 635 | 582 | opr: "refresh", |
| 636 | - dataset: "table0,table1,table4,tableS1,table0FirstlineSelected" | |
| 637 | - } | |
| 638 | - ]) | |
| 583 | + dataset: "table0,table1,table4,tableS1,table0FirstlineSelected", | |
| 584 | + }, | |
| 585 | + ]), | |
| 639 | 586 | }, |
| 640 | 587 | inscallback: async nextProps => { |
| 641 | 588 | const name = "table0"; |
| 642 | 589 | const { [`${name}Config`]: tableConfig = {} } = props; |
| 643 | - const rowClickConfig = tableConfig.gdsconfigformslave?.find( | |
| 644 | - item => | |
| 645 | - item.sControlName && | |
| 646 | - item.sControlName.toLowerCase().includes("rowclick") | |
| 647 | - ); | |
| 590 | + const rowClickConfig = tableConfig.gdsconfigformslave?.find(item => item.sControlName && item.sControlName.toLowerCase().includes("rowclick")); | |
| 648 | 591 | if (!rowClickConfig) return; |
| 649 | 592 | await awaitPromiseReturn(); |
| 650 | 593 | props.handleExecInstructSet({ |
| 651 | 594 | btnConfig: rowClickConfig, |
| 652 | - nextProps: nextProps | |
| 595 | + nextProps: nextProps, | |
| 653 | 596 | }); |
| 654 | - } | |
| 597 | + }, | |
| 655 | 598 | }); |
| 656 | 599 | }; |
| 657 | 600 | |
| ... | ... | @@ -661,7 +604,7 @@ const handleMesSlave0Save1 = (props, delRow) => { |
| 661 | 604 | const temp0Data = []; |
| 662 | 605 | temp0Data.push({ |
| 663 | 606 | sNewReportSlaveId: delRow.sId, |
| 664 | - sOldReportSlaveId: delRow.sSrcHourId | |
| 607 | + sOldReportSlaveId: delRow.sSrcHourId, | |
| 665 | 608 | }); |
| 666 | 609 | |
| 667 | 610 | props.handleExecInstructSet({ |
| ... | ... | @@ -680,51 +623,40 @@ const handleMesSlave0Save1 = (props, delRow) => { |
| 680 | 623 | opr: "exesql", |
| 681 | 624 | data: [ |
| 682 | 625 | { |
| 683 | - sql: | |
| 684 | - "call Sp_mes_Operate_ProductionReport(2,${sNewReportSlaveId},${sOldReportSlaveId},null)", | |
| 685 | - srcDataset: "temp0" | |
| 686 | - } | |
| 687 | - ] | |
| 626 | + sql: "call Sp_mes_Operate_ProductionReport(2,${sNewReportSlaveId},${sOldReportSlaveId},null)", | |
| 627 | + srcDataset: "temp0", | |
| 628 | + }, | |
| 629 | + ], | |
| 688 | 630 | }, |
| 689 | 631 | { |
| 690 | 632 | opr: "refresh", |
| 691 | - dataset: "slave0,slave0FirstlineSelected" | |
| 692 | - } | |
| 693 | - ]) | |
| 633 | + dataset: "slave0,slave0FirstlineSelected", | |
| 634 | + }, | |
| 635 | + ]), | |
| 694 | 636 | }, |
| 695 | 637 | inscallback: async nextProps => { |
| 696 | 638 | const name = "slave0"; |
| 697 | 639 | const { [`${name}Config`]: tableConfig = {} } = props; |
| 698 | - const rowClickConfig = tableConfig.gdsconfigformslave?.find( | |
| 699 | - item => | |
| 700 | - item.sControlName && | |
| 701 | - item.sControlName.toLowerCase().includes("rowclick") | |
| 702 | - ); | |
| 640 | + const rowClickConfig = tableConfig.gdsconfigformslave?.find(item => item.sControlName && item.sControlName.toLowerCase().includes("rowclick")); | |
| 703 | 641 | if (!rowClickConfig) return; |
| 704 | 642 | await awaitPromiseReturn(); |
| 705 | 643 | props.handleExecInstructSet({ |
| 706 | 644 | btnConfig: rowClickConfig, |
| 707 | - nextProps: nextProps | |
| 645 | + nextProps: nextProps, | |
| 708 | 646 | }); |
| 709 | - } | |
| 647 | + }, | |
| 710 | 648 | }); |
| 711 | 649 | }; |
| 712 | 650 | |
| 713 | 651 | // 班组报工托盘计数信息按钮 |
| 714 | 652 | const mesGetBtnsConfig1 = props => { |
| 715 | - const { | |
| 716 | - table0Data = [], | |
| 717 | - table0SelectedRowKeys = [], | |
| 718 | - btnsConfig = [] | |
| 719 | - } = props; | |
| 653 | + const { table0Data = [], table0SelectedRowKeys = [], btnsConfig = [] } = props; | |
| 720 | 654 | |
| 721 | 655 | if (!table0SelectedRowKeys.length) { |
| 722 | 656 | return []; |
| 723 | 657 | } |
| 724 | 658 | |
| 725 | - const table0Row = table0Data.find( | |
| 726 | - item => item.sId === table0SelectedRowKeys[0] | |
| 727 | - ); | |
| 659 | + const table0Row = table0Data.find(item => item.sId === table0SelectedRowKeys[0]); | |
| 728 | 660 | const sSrcHourId = table0Row?.sSrcHourId; |
| 729 | 661 | |
| 730 | 662 | // 是否新纪录 |
| ... | ... | @@ -740,16 +672,9 @@ const mesGetBtnsConfig1 = props => { |
| 740 | 672 | |
| 741 | 673 | // 班组报工托盘计数信息按钮点击事件 |
| 742 | 674 | const mesTableBtnClick1 = props => { |
| 743 | - const { | |
| 744 | - sControlName, | |
| 745 | - table0Data = [], | |
| 746 | - table0SelectedRowKeys = [], | |
| 747 | - params | |
| 748 | - } = props; | |
| 675 | + const { sControlName, table0Data = [], table0SelectedRowKeys = [], params } = props; | |
| 749 | 676 | const { record } = params; |
| 750 | - const table0Row = table0Data.find( | |
| 751 | - item => item.sId === table0SelectedRowKeys[0] | |
| 752 | - ); | |
| 677 | + const table0Row = table0Data.find(item => item.sId === table0SelectedRowKeys[0]); | |
| 753 | 678 | const { sId, sSrcHourId, tStartDate, tEndDate } = table0Row; |
| 754 | 679 | |
| 755 | 680 | let table0RowNext; |
| ... | ... | @@ -757,21 +682,13 @@ const mesTableBtnClick1 = props => { |
| 757 | 682 | // 调至下段 |
| 758 | 683 | table0RowNext = table0Data.find( |
| 759 | 684 | item => |
| 760 | - !item.bUnChanged && | |
| 761 | - item.tStartDate === tEndDate && | |
| 762 | - (item.sId === sSrcHourId || | |
| 763 | - item.sSrcHourId === sSrcHourId || | |
| 764 | - item.sSrcHourId === sId) | |
| 685 | + !item.bUnChanged && item.tStartDate === tEndDate && (item.sId === sSrcHourId || item.sSrcHourId === sSrcHourId || item.sSrcHourId === sId) | |
| 765 | 686 | ); |
| 766 | 687 | } else { |
| 767 | 688 | // 调至上段 |
| 768 | 689 | table0RowNext = table0Data.find( |
| 769 | 690 | item => |
| 770 | - !item.bUnChanged && | |
| 771 | - item.tEndDate === tStartDate && | |
| 772 | - (item.sId === sSrcHourId || | |
| 773 | - item.sSrcHourId === sSrcHourId || | |
| 774 | - item.sSrcHourId === sId) | |
| 691 | + !item.bUnChanged && item.tEndDate === tStartDate && (item.sId === sSrcHourId || item.sSrcHourId === sSrcHourId || item.sSrcHourId === sId) | |
| 775 | 692 | ); |
| 776 | 693 | } |
| 777 | 694 | |
| ... | ... | @@ -779,7 +696,7 @@ const mesTableBtnClick1 = props => { |
| 779 | 696 | temp0Data.push({ |
| 780 | 697 | sNewReportSlaveId: sId, |
| 781 | 698 | sOldReportSlaveId: table0RowNext.sId, |
| 782 | - sTrayOutId: record.sId | |
| 699 | + sTrayOutId: record.sId, | |
| 783 | 700 | }); |
| 784 | 701 | |
| 785 | 702 | props.onExecInstructSet({ |
| ... | ... | @@ -793,16 +710,16 @@ const mesTableBtnClick1 = props => { |
| 793 | 710 | { |
| 794 | 711 | sql: |
| 795 | 712 | "update mftplctray A SET A.sReportTrayId= ${sOldReportSlaveId} WHERE A.sReportTrayId=${sNewReportSlaveId} and A.sTrayOutId=${sTrayOutId}", |
| 796 | - srcDataset: "temp0" | |
| 797 | - } | |
| 798 | - ] | |
| 713 | + srcDataset: "temp0", | |
| 714 | + }, | |
| 715 | + ], | |
| 799 | 716 | }, |
| 800 | 717 | { |
| 801 | 718 | opr: "refresh", |
| 802 | - dataset: "table1" | |
| 803 | - } | |
| 804 | - ]) | |
| 805 | - } | |
| 719 | + dataset: "table1", | |
| 720 | + }, | |
| 721 | + ]), | |
| 722 | + }, | |
| 806 | 723 | }); |
| 807 | 724 | }; |
| 808 | 725 | |
| ... | ... | @@ -833,7 +750,7 @@ const mesTableBtnClick2 = props => { |
| 833 | 750 | tableS5Data: [], |
| 834 | 751 | tableS8Data: [], |
| 835 | 752 | tableS9Data: [], |
| 836 | - tableS10Data: [] | |
| 753 | + tableS10Data: [], | |
| 837 | 754 | }); |
| 838 | 755 | |
| 839 | 756 | const oTabs = document.querySelectorAll(`.ant-tabs-tab-btn[id*="生产日报"]`); |
| ... | ... | @@ -850,7 +767,7 @@ const mesTableBtnClick3 = props => { |
| 850 | 767 | if (bHourlyReport) { |
| 851 | 768 | props.onExecInstructSet({ |
| 852 | 769 | nextProps: props, |
| 853 | - btnConfig: config | |
| 770 | + btnConfig: config, | |
| 854 | 771 | }); |
| 855 | 772 | return; |
| 856 | 773 | } |
| ... | ... | @@ -868,22 +785,20 @@ const mesTableBtnClick3 = props => { |
| 868 | 785 | props.onSaveState({ |
| 869 | 786 | table0SelectedRowKeys: [], |
| 870 | 787 | table4Data: [], |
| 871 | - table13Data: [] | |
| 788 | + table13Data: [], | |
| 872 | 789 | }); |
| 873 | 790 | |
| 874 | 791 | setTimeout(() => { |
| 875 | 792 | props.onTableSelectRowChange("table0", [table0Data[iIndex].sId]); |
| 876 | 793 | props.onSaveState({ |
| 877 | - refreshTableList: ["table0,table0NotFirstlineSelected"] | |
| 794 | + refreshTableList: ["table0,table0NotFirstlineSelected"], | |
| 878 | 795 | }); |
| 879 | 796 | }, 200); |
| 880 | 797 | |
| 881 | 798 | const oTabs = document.querySelectorAll(`.ant-tabs-tab-btn[id*="班组报工"]`); |
| 882 | 799 | oTabs?.[0]?.click(); |
| 883 | 800 | setTimeout(() => { |
| 884 | - const oTabs1 = document.querySelectorAll( | |
| 885 | - `.ant-tabs-tab-btn[id*="产量上报信息"]` | |
| 886 | - ); | |
| 801 | + const oTabs1 = document.querySelectorAll(`.ant-tabs-tab-btn[id*="产量上报信息"]`); | |
| 887 | 802 | oTabs1?.[0]?.click(); |
| 888 | 803 | }, 200); |
| 889 | 804 | }; |
| ... | ... | @@ -892,10 +807,7 @@ const mesTableBtnClick3 = props => { |
| 892 | 807 | const handleSlaveWypj2BtnPre = props => { |
| 893 | 808 | const listName = "slaveWypj2"; |
| 894 | 809 | const tableName = "slaveWypj3"; |
| 895 | - const { | |
| 896 | - [`${listName}Data`]: listData = [], | |
| 897 | - [`${tableName}Data`]: tableData = [] | |
| 898 | - } = props; | |
| 810 | + const { [`${listName}Data`]: listData = [], [`${tableName}Data`]: tableData = [] } = props; | |
| 899 | 811 | |
| 900 | 812 | const [rowData = {}] = listData; |
| 901 | 813 | |
| ... | ... | @@ -910,23 +822,21 @@ const handleSlaveWypj2BtnPre = props => { |
| 910 | 822 | return; |
| 911 | 823 | } |
| 912 | 824 | |
| 913 | - const sInstructStr = props[`${tableName}Config`]?.gdsconfigformslave.find( | |
| 914 | - item => item.sControlName === "BtnTable.View" | |
| 915 | - )?.sInstruct; | |
| 825 | + const sInstructStr = props[`${tableName}Config`]?.gdsconfigformslave.find(item => item.sControlName === "BtnTable.View")?.sInstruct; | |
| 916 | 826 | if (!sInstructStr) return; |
| 917 | 827 | |
| 918 | 828 | const selectedRowKeys = [tableData[iIndex - 1].sId]; |
| 919 | 829 | props.onSaveState( |
| 920 | 830 | { |
| 921 | - [`${tableName}SelectedRowKeys`]: selectedRowKeys | |
| 831 | + [`${tableName}SelectedRowKeys`]: selectedRowKeys, | |
| 922 | 832 | }, |
| 923 | 833 | nextProps => { |
| 924 | 834 | props.onExecInstructSet({ |
| 925 | 835 | nextProps: nextProps, |
| 926 | 836 | btnConfig: { |
| 927 | 837 | showName: "上一卷", |
| 928 | - sInstruct: sInstructStr | |
| 929 | - } | |
| 838 | + sInstruct: sInstructStr, | |
| 839 | + }, | |
| 930 | 840 | }); |
| 931 | 841 | } |
| 932 | 842 | ); |
| ... | ... | @@ -936,10 +846,7 @@ const handleSlaveWypj2BtnPre = props => { |
| 936 | 846 | const handleSlaveWypj2BtnNext = props => { |
| 937 | 847 | const listName = "slaveWypj2"; |
| 938 | 848 | const tableName = "slaveWypj3"; |
| 939 | - const { | |
| 940 | - [`${listName}Data`]: listData = [], | |
| 941 | - [`${tableName}Data`]: tableData = [] | |
| 942 | - } = props; | |
| 849 | + const { [`${listName}Data`]: listData = [], [`${tableName}Data`]: tableData = [] } = props; | |
| 943 | 850 | |
| 944 | 851 | const [rowData = {}] = listData; |
| 945 | 852 | |
| ... | ... | @@ -954,23 +861,21 @@ const handleSlaveWypj2BtnNext = props => { |
| 954 | 861 | return; |
| 955 | 862 | } |
| 956 | 863 | |
| 957 | - const sInstructStr = props[`${tableName}Config`]?.gdsconfigformslave.find( | |
| 958 | - item => item.sControlName === "BtnTable.View" | |
| 959 | - )?.sInstruct; | |
| 864 | + const sInstructStr = props[`${tableName}Config`]?.gdsconfigformslave.find(item => item.sControlName === "BtnTable.View")?.sInstruct; | |
| 960 | 865 | if (!sInstructStr) return; |
| 961 | 866 | |
| 962 | 867 | const selectedRowKeys = [tableData[iIndex + 1].sId]; |
| 963 | 868 | props.onSaveState( |
| 964 | 869 | { |
| 965 | - [`${tableName}SelectedRowKeys`]: selectedRowKeys | |
| 870 | + [`${tableName}SelectedRowKeys`]: selectedRowKeys, | |
| 966 | 871 | }, |
| 967 | 872 | nextProps => { |
| 968 | 873 | props.onExecInstructSet({ |
| 969 | 874 | nextProps: nextProps, |
| 970 | 875 | btnConfig: { |
| 971 | 876 | showName: "下一卷", |
| 972 | - sInstruct: sInstructStr | |
| 973 | - } | |
| 877 | + sInstruct: sInstructStr, | |
| 878 | + }, | |
| 974 | 879 | }); |
| 975 | 880 | } |
| 976 | 881 | ); |
| ... | ... | @@ -980,10 +885,7 @@ const handleSlaveWypj2BtnNext = props => { |
| 980 | 885 | const handleSalveWydm2BtnPre = props => { |
| 981 | 886 | const listName = "salveWydm2"; |
| 982 | 887 | const tableName = "salveWydm3"; |
| 983 | - const { | |
| 984 | - [`${listName}Data`]: listData = [], | |
| 985 | - [`${tableName}Data`]: tableData = [] | |
| 986 | - } = props; | |
| 888 | + const { [`${listName}Data`]: listData = [], [`${tableName}Data`]: tableData = [] } = props; | |
| 987 | 889 | |
| 988 | 890 | const [rowData = {}] = listData; |
| 989 | 891 | |
| ... | ... | @@ -998,23 +900,21 @@ const handleSalveWydm2BtnPre = props => { |
| 998 | 900 | return; |
| 999 | 901 | } |
| 1000 | 902 | |
| 1001 | - const sInstructStr = props[`${tableName}Config`]?.gdsconfigformslave.find( | |
| 1002 | - item => item.sControlName === "BtnReelView" | |
| 1003 | - )?.sInstruct; | |
| 903 | + const sInstructStr = props[`${tableName}Config`]?.gdsconfigformslave.find(item => item.sControlName === "BtnReelView")?.sInstruct; | |
| 1004 | 904 | if (!sInstructStr) return; |
| 1005 | 905 | |
| 1006 | 906 | const selectedRowKeys = [tableData[iIndex - 1].sId]; |
| 1007 | 907 | props.onSaveState( |
| 1008 | 908 | { |
| 1009 | - [`${tableName}SelectedRowKeys`]: selectedRowKeys | |
| 909 | + [`${tableName}SelectedRowKeys`]: selectedRowKeys, | |
| 1010 | 910 | }, |
| 1011 | 911 | nextProps => { |
| 1012 | 912 | props.onExecInstructSet({ |
| 1013 | 913 | nextProps: nextProps, |
| 1014 | 914 | btnConfig: { |
| 1015 | 915 | showName: "上一版", |
| 1016 | - sInstruct: sInstructStr | |
| 1017 | - } | |
| 916 | + sInstruct: sInstructStr, | |
| 917 | + }, | |
| 1018 | 918 | }); |
| 1019 | 919 | } |
| 1020 | 920 | ); |
| ... | ... | @@ -1024,10 +924,7 @@ const handleSalveWydm2BtnPre = props => { |
| 1024 | 924 | const handleSalveWydm2BtnNext = props => { |
| 1025 | 925 | const listName = "salveWydm2"; |
| 1026 | 926 | const tableName = "salveWydm3"; |
| 1027 | - const { | |
| 1028 | - [`${listName}Data`]: listData = [], | |
| 1029 | - [`${tableName}Data`]: tableData = [] | |
| 1030 | - } = props; | |
| 927 | + const { [`${listName}Data`]: listData = [], [`${tableName}Data`]: tableData = [] } = props; | |
| 1031 | 928 | |
| 1032 | 929 | const [rowData = {}] = listData; |
| 1033 | 930 | |
| ... | ... | @@ -1042,23 +939,21 @@ const handleSalveWydm2BtnNext = props => { |
| 1042 | 939 | return; |
| 1043 | 940 | } |
| 1044 | 941 | |
| 1045 | - const sInstructStr = props[`${tableName}Config`]?.gdsconfigformslave.find( | |
| 1046 | - item => item.sControlName === "BtnReelView" | |
| 1047 | - )?.sInstruct; | |
| 942 | + const sInstructStr = props[`${tableName}Config`]?.gdsconfigformslave.find(item => item.sControlName === "BtnReelView")?.sInstruct; | |
| 1048 | 943 | if (!sInstructStr) return; |
| 1049 | 944 | |
| 1050 | 945 | const selectedRowKeys = [tableData[iIndex + 1].sId]; |
| 1051 | 946 | props.onSaveState( |
| 1052 | 947 | { |
| 1053 | - [`${tableName}SelectedRowKeys`]: selectedRowKeys | |
| 948 | + [`${tableName}SelectedRowKeys`]: selectedRowKeys, | |
| 1054 | 949 | }, |
| 1055 | 950 | nextProps => { |
| 1056 | 951 | props.onExecInstructSet({ |
| 1057 | 952 | nextProps: nextProps, |
| 1058 | 953 | btnConfig: { |
| 1059 | 954 | showName: "下一版", |
| 1060 | - sInstruct: sInstructStr | |
| 1061 | - } | |
| 955 | + sInstruct: sInstructStr, | |
| 956 | + }, | |
| 1062 | 957 | }); |
| 1063 | 958 | } |
| 1064 | 959 | ); |
| ... | ... | @@ -1068,10 +963,7 @@ const handleSalveWydm2BtnNext = props => { |
| 1068 | 963 | const handleSlaveWyrj2BtnPre = props => { |
| 1069 | 964 | const listName = "slaveWyrj2"; |
| 1070 | 965 | const tableName = "slaveWyrj3"; |
| 1071 | - const { | |
| 1072 | - [`${listName}Data`]: listData = [], | |
| 1073 | - [`${tableName}Data`]: tableData = [] | |
| 1074 | - } = props; | |
| 966 | + const { [`${listName}Data`]: listData = [], [`${tableName}Data`]: tableData = [] } = props; | |
| 1075 | 967 | |
| 1076 | 968 | const [rowData = {}] = listData; |
| 1077 | 969 | |
| ... | ... | @@ -1087,23 +979,21 @@ const handleSlaveWyrj2BtnPre = props => { |
| 1087 | 979 | return; |
| 1088 | 980 | } |
| 1089 | 981 | |
| 1090 | - const sInstructStr = props[`${tableName}Config`]?.gdsconfigformslave.find( | |
| 1091 | - item => item.sControlName === "BtnReelView" | |
| 1092 | - )?.sInstruct; | |
| 982 | + const sInstructStr = props[`${tableName}Config`]?.gdsconfigformslave.find(item => item.sControlName === "BtnReelView")?.sInstruct; | |
| 1093 | 983 | if (!sInstructStr) return; |
| 1094 | 984 | |
| 1095 | 985 | const selectedRowKeys = [tableData[iIndex - 1].sId]; |
| 1096 | 986 | props.onSaveState( |
| 1097 | 987 | { |
| 1098 | - [`${tableName}SelectedRowKeys`]: selectedRowKeys | |
| 988 | + [`${tableName}SelectedRowKeys`]: selectedRowKeys, | |
| 1099 | 989 | }, |
| 1100 | 990 | nextProps => { |
| 1101 | 991 | props.onExecInstructSet({ |
| 1102 | 992 | nextProps: nextProps, |
| 1103 | 993 | btnConfig: { |
| 1104 | 994 | showName: "上一版", |
| 1105 | - sInstruct: sInstructStr | |
| 1106 | - } | |
| 995 | + sInstruct: sInstructStr, | |
| 996 | + }, | |
| 1107 | 997 | }); |
| 1108 | 998 | } |
| 1109 | 999 | ); |
| ... | ... | @@ -1113,10 +1003,7 @@ const handleSlaveWyrj2BtnPre = props => { |
| 1113 | 1003 | const handleSlaveWyrj2BtnNext = props => { |
| 1114 | 1004 | const listName = "slaveWyrj2"; |
| 1115 | 1005 | const tableName = "slaveWyrj3"; |
| 1116 | - const { | |
| 1117 | - [`${listName}Data`]: listData = [], | |
| 1118 | - [`${tableName}Data`]: tableData = [] | |
| 1119 | - } = props; | |
| 1006 | + const { [`${listName}Data`]: listData = [], [`${tableName}Data`]: tableData = [] } = props; | |
| 1120 | 1007 | |
| 1121 | 1008 | const [rowData = {}] = listData; |
| 1122 | 1009 | |
| ... | ... | @@ -1131,23 +1018,21 @@ const handleSlaveWyrj2BtnNext = props => { |
| 1131 | 1018 | return; |
| 1132 | 1019 | } |
| 1133 | 1020 | |
| 1134 | - const sInstructStr = props[`${tableName}Config`]?.gdsconfigformslave.find( | |
| 1135 | - item => item.sControlName === "BtnReelView" | |
| 1136 | - )?.sInstruct; | |
| 1021 | + const sInstructStr = props[`${tableName}Config`]?.gdsconfigformslave.find(item => item.sControlName === "BtnReelView")?.sInstruct; | |
| 1137 | 1022 | if (!sInstructStr) return; |
| 1138 | 1023 | |
| 1139 | 1024 | const selectedRowKeys = [tableData[iIndex + 1].sId]; |
| 1140 | 1025 | props.onSaveState( |
| 1141 | 1026 | { |
| 1142 | - [`${tableName}SelectedRowKeys`]: selectedRowKeys | |
| 1027 | + [`${tableName}SelectedRowKeys`]: selectedRowKeys, | |
| 1143 | 1028 | }, |
| 1144 | 1029 | nextProps => { |
| 1145 | 1030 | props.onExecInstructSet({ |
| 1146 | 1031 | nextProps: nextProps, |
| 1147 | 1032 | btnConfig: { |
| 1148 | 1033 | showName: "下一版", |
| 1149 | - sInstruct: sInstructStr | |
| 1150 | - } | |
| 1034 | + sInstruct: sInstructStr, | |
| 1035 | + }, | |
| 1151 | 1036 | }); |
| 1152 | 1037 | } |
| 1153 | 1038 | ); |
| ... | ... | @@ -1159,10 +1044,7 @@ const handleUpDownData = props => { |
| 1159 | 1044 | const listName = showTableName; |
| 1160 | 1045 | const tableName = showTableName.substr(0, showTableName.length - 1) + 3; |
| 1161 | 1046 | |
| 1162 | - const { | |
| 1163 | - [`${listName}Data`]: listData = [], | |
| 1164 | - [`${tableName}Data`]: tableData = [] | |
| 1165 | - } = props; | |
| 1047 | + const { [`${listName}Data`]: listData = [], [`${tableName}Data`]: tableData = [] } = props; | |
| 1166 | 1048 | |
| 1167 | 1049 | const [rowData = {}] = listData; |
| 1168 | 1050 | |
| ... | ... | @@ -1177,36 +1059,31 @@ const handleUpDownData = props => { |
| 1177 | 1059 | return; |
| 1178 | 1060 | } |
| 1179 | 1061 | |
| 1180 | - if ( | |
| 1181 | - ["BtnRight.NextCom"].includes(sFieldName) && | |
| 1182 | - iIndex === tableData.length - 1 | |
| 1183 | - ) { | |
| 1062 | + if (["BtnRight.NextCom"].includes(sFieldName) && iIndex === tableData.length - 1) { | |
| 1184 | 1063 | message.info("已是最后一条数据!"); |
| 1185 | 1064 | return; |
| 1186 | 1065 | } |
| 1187 | 1066 | |
| 1188 | - const sInstructStr = props[`${tableName}Config`]?.gdsconfigformslave.find( | |
| 1189 | - item => item.sControlName === "BtnReelView" | |
| 1190 | - )?.sInstruct; | |
| 1067 | + const sInstructStr = props[`${tableName}Config`]?.gdsconfigformslave.find(item => item.sControlName === "BtnReelView")?.sInstruct; | |
| 1191 | 1068 | if (!sInstructStr) return; |
| 1192 | 1069 | |
| 1193 | 1070 | const info = { |
| 1194 | 1071 | "BtnRight.PriorCom": { index: iIndex - 1, message: "上一版" }, |
| 1195 | - "BtnRight.NextCom": { index: iIndex + 1, message: "下一版" } | |
| 1072 | + "BtnRight.NextCom": { index: iIndex + 1, message: "下一版" }, | |
| 1196 | 1073 | }[sFieldName] || { index: iIndex, message: "当前" }; |
| 1197 | 1074 | |
| 1198 | 1075 | const selectedRowKeys = [tableData[info.index].sId]; |
| 1199 | 1076 | props.onSaveState( |
| 1200 | 1077 | { |
| 1201 | - [`${tableName}SelectedRowKeys`]: selectedRowKeys | |
| 1078 | + [`${tableName}SelectedRowKeys`]: selectedRowKeys, | |
| 1202 | 1079 | }, |
| 1203 | 1080 | nextProps => { |
| 1204 | 1081 | props.onExecInstructSet({ |
| 1205 | 1082 | nextProps: nextProps, |
| 1206 | 1083 | btnConfig: { |
| 1207 | 1084 | showName: info.message, |
| 1208 | - sInstruct: sInstructStr | |
| 1209 | - } | |
| 1085 | + sInstruct: sInstructStr, | |
| 1086 | + }, | |
| 1210 | 1087 | }); |
| 1211 | 1088 | } |
| 1212 | 1089 | ); |
| ... | ... | @@ -1220,7 +1097,7 @@ const mesTableChange2 = (props, tableName) => { |
| 1220 | 1097 | delete tableDataNew[0].tConnectDate; |
| 1221 | 1098 | |
| 1222 | 1099 | props.onSaveState({ |
| 1223 | - [`${tableName}Data`]: tableDataNew | |
| 1100 | + [`${tableName}Data`]: tableDataNew, | |
| 1224 | 1101 | }); |
| 1225 | 1102 | }; |
| 1226 | 1103 | |
| ... | ... | @@ -1257,10 +1134,7 @@ const mesTableChange3 = (props, tableName) => { |
| 1257 | 1134 | } |
| 1258 | 1135 | |
| 1259 | 1136 | const checkTime = moment(tConnectDate); |
| 1260 | - if ( | |
| 1261 | - !checkTime.isSameOrAfter(startTime) || | |
| 1262 | - !checkTime.isSameOrBefore(endTime) | |
| 1263 | - ) { | |
| 1137 | + if (!checkTime.isSameOrAfter(startTime) || !checkTime.isSameOrBefore(endTime)) { | |
| 1264 | 1138 | let msg = ""; |
| 1265 | 1139 | if (sShift === "1" || sShift === "白班") { |
| 1266 | 1140 | if (bDelayedOvertime) { |
| ... | ... | @@ -1280,33 +1154,32 @@ const mesTableChange3 = (props, tableName) => { |
| 1280 | 1154 | } |
| 1281 | 1155 | }; |
| 1282 | 1156 | |
| 1283 | - | |
| 1284 | 1157 | const handleGetRefreshStatus = props => { |
| 1285 | 1158 | const { refreshTableListCount = 0 } = props; |
| 1286 | 1159 | if (!refreshTableListCount) { |
| 1287 | - message.warning('请先等待页面初始化加载完成!'); | |
| 1160 | + message.warning("请先等待页面初始化加载完成!"); | |
| 1288 | 1161 | return true; |
| 1289 | 1162 | } else { |
| 1290 | 1163 | return false; |
| 1291 | 1164 | } |
| 1292 | -} | |
| 1165 | +}; | |
| 1293 | 1166 | // 质量巡检-巡检项目-所有巡检按钮 |
| 1294 | 1167 | const handleZlxjCheck = async (props, btnName) => { |
| 1295 | 1168 | const { table0Data = [], table1Data = [], refreshTableListCount = 0 } = props; |
| 1296 | 1169 | const { sTeamNo } = commonUtils.getAppData("userinfo"); |
| 1297 | 1170 | |
| 1298 | 1171 | if (!refreshTableListCount) { |
| 1299 | - message.warning('请先等待页面初始化加载完成!'); | |
| 1172 | + message.warning("请先等待页面初始化加载完成!"); | |
| 1300 | 1173 | return; |
| 1301 | 1174 | } |
| 1302 | 1175 | |
| 1303 | 1176 | const typeList = { |
| 1304 | - "BtnRight.ipqcCheck": '2', | |
| 1305 | - "BtnRight.qualityCheck": '3', | |
| 1306 | - "BtnRight.foremanCheck": '4', | |
| 1307 | - "BtnRight.managerCheck": '5', | |
| 1308 | - "BtnRight.otherCheck": '6' | |
| 1309 | - } | |
| 1177 | + "BtnRight.ipqcCheck": "2", | |
| 1178 | + "BtnRight.qualityCheck": "3", | |
| 1179 | + "BtnRight.foremanCheck": "4", | |
| 1180 | + "BtnRight.managerCheck": "5", | |
| 1181 | + "BtnRight.otherCheck": "6", | |
| 1182 | + }; | |
| 1310 | 1183 | |
| 1311 | 1184 | const sCurRole = typeList[btnName]; |
| 1312 | 1185 | |
| ... | ... | @@ -1314,39 +1187,37 @@ const handleZlxjCheck = async (props, btnName) => { |
| 1314 | 1187 | if (!faceResult) return; |
| 1315 | 1188 | const { name } = faceResult; |
| 1316 | 1189 | if (!name) { |
| 1317 | - message.warning('人脸信息获取失败,请重新尝试!'); | |
| 1190 | + message.warning("人脸信息获取失败,请重新尝试!"); | |
| 1318 | 1191 | return; |
| 1319 | 1192 | } |
| 1320 | 1193 | |
| 1321 | 1194 | const table0DataNew = cloneDeep(table0Data); |
| 1322 | 1195 | const table1DataNew = cloneDeep(table1Data); |
| 1323 | 1196 | table0DataNew[0].sCurRole = sCurRole; |
| 1324 | - table0DataNew[0].handleType = table0DataNew[0].handleType || 'update'; | |
| 1197 | + table0DataNew[0].handleType = table0DataNew[0].handleType || "update"; | |
| 1325 | 1198 | |
| 1326 | 1199 | table1DataNew.unshift({ |
| 1327 | 1200 | sId: commonUtils.createSid(), |
| 1328 | - handleType: 'add', | |
| 1201 | + handleType: "add", | |
| 1329 | 1202 | sSReserve1: sCurRole, |
| 1330 | 1203 | bSave: 1, |
| 1331 | 1204 | sParentId: table0Data[0].sId, |
| 1332 | - tPollingTime: moment().format('YYYY-MM-DD HH:mm:ss'), | |
| 1205 | + tPollingTime: moment().format("YYYY-MM-DD HH:mm:ss"), | |
| 1333 | 1206 | sPollingPerson: name, |
| 1334 | - sGroup: sTeamNo.substr(sTeamNo.length - 1, 1) === 'A' ? 'A' : 'B' | |
| 1207 | + sGroup: sTeamNo.substr(sTeamNo.length - 1, 1) === "A" ? "A" : "B", | |
| 1335 | 1208 | }); |
| 1336 | 1209 | |
| 1337 | 1210 | props.onSaveState({ |
| 1338 | 1211 | userfaceData: [faceResult], |
| 1339 | 1212 | tempUserName: name, |
| 1340 | 1213 | table0Data: table0DataNew, |
| 1341 | - table1Data: table1DataNew | |
| 1214 | + table1Data: table1DataNew, | |
| 1342 | 1215 | }); |
| 1343 | -} | |
| 1216 | +}; | |
| 1344 | 1217 | |
| 1345 | 1218 | let loginInfo = {}; |
| 1346 | 1219 | const sModelsId = "16034339700006038392152714521000"; |
| 1347 | -const mesSysbrands = commonUtils.convertStrToObj( | |
| 1348 | - localStorage.getItem("mesSysbrands") | |
| 1349 | -); | |
| 1220 | +const mesSysbrands = commonUtils.convertStrToObj(localStorage.getItem("mesSysbrands")); | |
| 1350 | 1221 | |
| 1351 | 1222 | const handleGetFormItem = (props, item) => { |
| 1352 | 1223 | let enabledNew = true; |
| ... | ... | @@ -1374,32 +1245,28 @@ const handleGetFormItem = (props, item) => { |
| 1374 | 1245 | onFilterDropDownData: props.onFilterDropDownData, |
| 1375 | 1246 | onSaveState: props.onSaveState, |
| 1376 | 1247 | bPassWord: item.sName === "sPassWord", |
| 1377 | - style: { backgroundColor: "#eaeaea" } | |
| 1248 | + style: { backgroundColor: "#eaeaea" }, | |
| 1378 | 1249 | }; |
| 1379 | 1250 | return ( |
| 1380 | - <Form.Item | |
| 1381 | - label={item.sName === "sUserName" ? "账号" : item.showName} | |
| 1382 | - key={item.sName} | |
| 1383 | - > | |
| 1251 | + <Form.Item label={item.sName === "sUserName" ? "账号" : item.showName} key={item.sName}> | |
| 1384 | 1252 | <ShowType {...showTypeProps} /> |
| 1385 | 1253 | </Form.Item> |
| 1386 | 1254 | ); |
| 1387 | 1255 | }; |
| 1388 | 1256 | |
| 1389 | -const getFaceResult = async (props) => { | |
| 1257 | +const getFaceResult = async props => { | |
| 1390 | 1258 | let faceResult = false; |
| 1391 | 1259 | |
| 1392 | - | |
| 1393 | - const selectMethod = commonFunc.showLocalMessage(props, 'selectMethod', '请选择验证方式'); | |
| 1394 | - const FriendlyReminder = commonFunc.showLocalMessage(props, 'FriendlyReminder', '温馨提示'); | |
| 1395 | - const accountPwd = commonFunc.showLocalMessage(props, 'account', '账号密码'); | |
| 1396 | - const faceRecognition = commonFunc.showLocalMessage(props, 'faceRecognition', '人脸识别'); | |
| 1397 | - const btnCancel = commonFunc.showLocalMessage(props, 'BtnCancel', '取消'); | |
| 1398 | - const btnSure = commonFunc.showLocalMessage(props, 'BtnSure', '确定'); | |
| 1399 | - const enterAccountPwd = commonFunc.showLocalMessage(props, 'enterAccountPwd', '请输入账号密码'); | |
| 1400 | - const nameNotEmpty = commonFunc.showLocalMessage(props, 'NameNotEmpty', '账号/姓名不能为空!'); | |
| 1401 | - const passwordNotEmpty = commonFunc.showLocalMessage(props, 'PasswordNotEmpty', '密码不能为空!'); | |
| 1402 | - const account = commonFunc.showLocalMessage(props, 'account', '账号'); | |
| 1260 | + const selectMethod = commonFunc.showLocalMessage(props, "selectMethod", "请选择验证方式"); | |
| 1261 | + const FriendlyReminder = commonFunc.showLocalMessage(props, "FriendlyReminder", "温馨提示"); | |
| 1262 | + const accountPwd = commonFunc.showLocalMessage(props, "account", "账号密码"); | |
| 1263 | + const faceRecognition = commonFunc.showLocalMessage(props, "faceRecognition", "人脸识别"); | |
| 1264 | + const btnCancel = commonFunc.showLocalMessage(props, "BtnCancel", "取消"); | |
| 1265 | + const btnSure = commonFunc.showLocalMessage(props, "BtnSure", "确定"); | |
| 1266 | + const enterAccountPwd = commonFunc.showLocalMessage(props, "enterAccountPwd", "请输入账号密码"); | |
| 1267 | + const nameNotEmpty = commonFunc.showLocalMessage(props, "NameNotEmpty", "账号/姓名不能为空!"); | |
| 1268 | + const passwordNotEmpty = commonFunc.showLocalMessage(props, "PasswordNotEmpty", "密码不能为空!"); | |
| 1269 | + const account = commonFunc.showLocalMessage(props, "account", "账号"); | |
| 1403 | 1270 | const loginType = await new Promise(resolve => { |
| 1404 | 1271 | Modal.confirm({ |
| 1405 | 1272 | title: FriendlyReminder, |
| ... | ... | @@ -1419,7 +1286,7 @@ const getFaceResult = async (props) => { |
| 1419 | 1286 | } else { |
| 1420 | 1287 | resolve(0); |
| 1421 | 1288 | } |
| 1422 | - } | |
| 1289 | + }, | |
| 1423 | 1290 | }); |
| 1424 | 1291 | }); |
| 1425 | 1292 | |
| ... | ... | @@ -1444,27 +1311,20 @@ const getFaceResult = async (props) => { |
| 1444 | 1311 | okText: btnCancel, |
| 1445 | 1312 | onOk() { |
| 1446 | 1313 | resolve(false); |
| 1447 | - } | |
| 1314 | + }, | |
| 1448 | 1315 | }); |
| 1449 | 1316 | }); |
| 1450 | 1317 | } else if (loginType === 2) { |
| 1451 | 1318 | // 账号密码登陆 |
| 1452 | 1319 | let loginConfig; |
| 1453 | - const configUrl = `${commonConfig.server_host | |
| 1454 | - }business/getModelBysId/${sModelsId}?sModelsId=${sModelsId}&sName=/commonAuto`; | |
| 1455 | - const configReturn = (await commonServices.getService("", configUrl)) | |
| 1456 | - .data; | |
| 1320 | + const configUrl = `${commonConfig.server_host}business/getModelBysId/${sModelsId}?sModelsId=${sModelsId}&sName=/commonAuto`; | |
| 1321 | + const configReturn = (await commonServices.getService("", configUrl)).data; | |
| 1457 | 1322 | if (configReturn.code === 1) { |
| 1458 | 1323 | const dataReturn = configReturn.dataset.rows; |
| 1459 | 1324 | if (commonUtils.isNotEmptyArr(dataReturn)) { |
| 1460 | 1325 | const { formData } = dataReturn[0]; |
| 1461 | 1326 | if (commonUtils.isNotEmptyArr(formData)) { |
| 1462 | - loginConfig = formData[0].gdsconfigformslave.filter( | |
| 1463 | - item => | |
| 1464 | - item.bVisible && | |
| 1465 | - item.sName && | |
| 1466 | - ["sUserName", "sPassWord"].includes(item.sName) | |
| 1467 | - ); | |
| 1327 | + loginConfig = formData[0].gdsconfigformslave.filter(item => item.bVisible && item.sName && ["sUserName", "sPassWord"].includes(item.sName)); | |
| 1468 | 1328 | } |
| 1469 | 1329 | } |
| 1470 | 1330 | } else { |
| ... | ... | @@ -1496,34 +1356,31 @@ const getFaceResult = async (props) => { |
| 1496 | 1356 | } |
| 1497 | 1357 | |
| 1498 | 1358 | const { sBrandsId, sSubsidiaryId } = mesSysbrands; |
| 1499 | - const url = `${commonConfig.server_host | |
| 1500 | - }userloginUserNo/${sBrandsId}/${sSubsidiaryId}`; | |
| 1359 | + const url = `${commonConfig.server_host}userloginUserNo/${sBrandsId}/${sSubsidiaryId}`; | |
| 1501 | 1360 | const value = { |
| 1502 | 1361 | username: loginInfo.sUserNo || loginInfo.sUserName, |
| 1503 | - password: loginInfo.sPassWord | |
| 1362 | + password: loginInfo.sPassWord, | |
| 1504 | 1363 | }; |
| 1505 | 1364 | |
| 1506 | - commonServices | |
| 1507 | - .postValueService(null, value, url) | |
| 1508 | - .then(({ data: dataReturn }) => { | |
| 1509 | - const { msg, code, dataset } = dataReturn; | |
| 1510 | - if (code !== 1) { | |
| 1511 | - message.error(msg); | |
| 1512 | - return; | |
| 1513 | - } | |
| 1514 | - | |
| 1515 | - if (commonUtils.isNotEmptyObject(msg)) { | |
| 1516 | - message.warning(msg, 6); | |
| 1517 | - } | |
| 1518 | - | |
| 1519 | - const result = dataset.rows[0]; | |
| 1520 | - resolve(result); | |
| 1521 | - }); | |
| 1365 | + commonServices.postValueService(null, value, url).then(({ data: dataReturn }) => { | |
| 1366 | + const { msg, code, dataset } = dataReturn; | |
| 1367 | + if (code !== 1) { | |
| 1368 | + message.error(msg); | |
| 1369 | + return; | |
| 1370 | + } | |
| 1371 | + | |
| 1372 | + if (commonUtils.isNotEmptyObject(msg)) { | |
| 1373 | + message.warning(msg, 6); | |
| 1374 | + } | |
| 1375 | + | |
| 1376 | + const result = dataset.rows[0]; | |
| 1377 | + resolve(result); | |
| 1378 | + }); | |
| 1522 | 1379 | } |
| 1523 | 1380 | }, |
| 1524 | 1381 | onCancel() { |
| 1525 | 1382 | resolve(false); |
| 1526 | - } | |
| 1383 | + }, | |
| 1527 | 1384 | }); |
| 1528 | 1385 | }); |
| 1529 | 1386 | } |
| ... | ... | @@ -1532,7 +1389,7 @@ const getFaceResult = async (props) => { |
| 1532 | 1389 | }; |
| 1533 | 1390 | |
| 1534 | 1391 | // 质量巡检-巡检项目-完成/修改 |
| 1535 | -const mesTableBtnClick4 = async (props) => { | |
| 1392 | +const mesTableBtnClick4 = async props => { | |
| 1536 | 1393 | const { params = {}, table0Data = [], table1Data = [], tempUserName } = props; |
| 1537 | 1394 | const { config = {}, record } = params; |
| 1538 | 1395 | const { sControlName } = config; |
| ... | ... | @@ -1556,7 +1413,7 @@ const mesTableBtnClick4 = async (props) => { |
| 1556 | 1413 | table1Data: table1Data.map(item => { |
| 1557 | 1414 | return item.sId === record.sId ? { ...item, bSave: 1 } : item; |
| 1558 | 1415 | }), |
| 1559 | - }) | |
| 1416 | + }); | |
| 1560 | 1417 | } else if (sControlName === "BtnFinish") { |
| 1561 | 1418 | const bHasX = Object.keys(record).some(key => key?.startsWith("sItem") && record[key] === "✗"); |
| 1562 | 1419 | if (bHasX && !sQualityDeg) { |
| ... | ... | @@ -1566,18 +1423,18 @@ const mesTableBtnClick4 = async (props) => { |
| 1566 | 1423 | |
| 1567 | 1424 | const iIndex = table1Data.findIndex(item => item.sId === record.sId); |
| 1568 | 1425 | table1Data[iIndex].bSave = 0; |
| 1569 | - table1Data[iIndex].handleType = table1Data[iIndex].handleType || 'update' | |
| 1426 | + table1Data[iIndex].handleType = table1Data[iIndex].handleType || "update"; | |
| 1570 | 1427 | if (table1Data[iIndex].sSReserve1 === "1") { |
| 1571 | 1428 | table1Data[iIndex].sPollingPerson = sUserName; |
| 1572 | 1429 | } |
| 1573 | 1430 | if (table1Data[iIndex].tPollingTime) { |
| 1574 | - table1Data[iIndex].tSReserve1 = moment().format('YYYY-MM-DD HH:mm:ss'); | |
| 1431 | + table1Data[iIndex].tSReserve1 = moment().format("YYYY-MM-DD HH:mm:ss"); | |
| 1575 | 1432 | } |
| 1576 | 1433 | if (!table1Data[iIndex].tPollingTime) { |
| 1577 | - table1Data[iIndex].tPollingTime = moment().format('YYYY-MM-DD HH:mm:ss'); | |
| 1434 | + table1Data[iIndex].tPollingTime = moment().format("YYYY-MM-DD HH:mm:ss"); | |
| 1578 | 1435 | } |
| 1579 | 1436 | |
| 1580 | - const addState1 = { table0Data: table0Data.map(item => ({ ...item, bSave: 0, handleType: item.handleType || 'update' })), table1Data }; | |
| 1437 | + const addState1 = { table0Data: table0Data.map(item => ({ ...item, bSave: 0, handleType: item.handleType || "update" })), table1Data }; | |
| 1581 | 1438 | |
| 1582 | 1439 | props.onSaveState({ tempUserName: undefined, ...addState1 }); |
| 1583 | 1440 | props.onExecInstructSet({ |
| ... | ... | @@ -1591,18 +1448,18 @@ const mesTableBtnClick4 = async (props) => { |
| 1591 | 1448 | data: [ |
| 1592 | 1449 | { |
| 1593 | 1450 | tablename: "qlyqualityinspectionmaster", |
| 1594 | - srcDataset: "table0" | |
| 1451 | + srcDataset: "table0", | |
| 1595 | 1452 | }, |
| 1596 | 1453 | { |
| 1597 | 1454 | tablename: "qlyqualityinspectionslave", |
| 1598 | - srcDataset: "table1" | |
| 1599 | - } | |
| 1600 | - ] | |
| 1601 | - } | |
| 1602 | - ]) | |
| 1603 | - } | |
| 1455 | + srcDataset: "table1", | |
| 1456 | + }, | |
| 1457 | + ], | |
| 1458 | + }, | |
| 1459 | + ]), | |
| 1460 | + }, | |
| 1604 | 1461 | }); |
| 1605 | 1462 | } |
| 1606 | -} | |
| 1463 | +}; | |
| 1607 | 1464 | |
| 1608 | 1465 | export default costomPageFun; | ... | ... |