Commit 96c9de8611e7694dbb8121aacc80593233e4ee9d

Authored by zhangzzzz
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,15 +8,10 @@ import * as commonFunc from "@/components/Common/commonFunc";
8 import FaceDetect from "@/components/FaceDetect"; 8 import FaceDetect from "@/components/FaceDetect";
9 import ShowType from "@/components/Common/CommonComponent"; 9 import ShowType from "@/components/Common/CommonComponent";
10 const costomPageFun = ({ props, tableName, sFieldName, actionName }) => { 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 let result = false; 13 let result = false;
16 - switch (  
17 - `${sModelsId}-${tableName}${sFieldName ? `-${sFieldName}` : ""  
18 - }-${actionName}`  
19 - ) { 14 + switch (`${sModelsId}-${tableName}${sFieldName ? `-${sFieldName}` : ""}-${actionName}`) {
20 case "12710101117087404588200-table0-mesTableLineAdd": 15 case "12710101117087404588200-table0-mesTableLineAdd":
21 case "12710101117260270570210-table0-mesTableLineAdd": 16 case "12710101117260270570210-table0-mesTableLineAdd":
22 case "12710101117087371044360-slave0-mesTableLineAdd": 17 case "12710101117087371044360-slave0-mesTableLineAdd":
@@ -135,10 +130,7 @@ const costomPageFun = ({ props, tableName, sFieldName, actionName }) => { @@ -135,10 +130,7 @@ const costomPageFun = ({ props, tableName, sFieldName, actionName }) => {
135 break; 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 handleUpDownData({ ...props, tableName, sFieldName }); 134 handleUpDownData({ ...props, tableName, sFieldName });
143 return true; 135 return true;
144 } 136 }
@@ -149,19 +141,14 @@ const costomPageFun = ({ props, tableName, sFieldName, actionName }) => { @@ -149,19 +141,14 @@ const costomPageFun = ({ props, tableName, sFieldName, actionName }) => {
149 // 班组报工行车记录表格新增 141 // 班组报工行车记录表格新增
150 const mesTableLineAdd1 = (props, tableName) => { 142 const mesTableLineAdd1 = (props, tableName) => {
151 // const tableName = "table0"; 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 if (commonUtils.isEmptyObject(selectedRowKeys)) { 146 if (commonUtils.isEmptyObject(selectedRowKeys)) {
158 message.info("请先选中一条行车记录数据!"); 147 message.info("请先选中一条行车记录数据!");
159 return; 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 if (rowDataIndex === -1) return; 152 if (rowDataIndex === -1) return;
166 153
167 const rowData = tableData[rowDataIndex]; 154 const rowData = tableData[rowDataIndex];
@@ -206,21 +193,17 @@ const mesTableLineAdd1 = (props, tableName) => { @@ -206,21 +193,17 @@ const mesTableLineAdd1 = (props, tableName) => {
206 props.onSaveState( 193 props.onSaveState(
207 { 194 {
208 [`${tableName}Data`]: tableDataNew, 195 [`${tableName}Data`]: tableDataNew,
209 - [`${tableName}SelectedRowKeys`]: [rowDataCopy.sId] 196 + [`${tableName}SelectedRowKeys`]: [rowDataCopy.sId],
210 }, 197 },
211 nextProps => { 198 nextProps => {
212 const name = tableName; 199 const name = tableName;
213 const { [`${name}Config`]: tableConfig = {} } = nextProps; 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 if (!rowClickConfig) return; 202 if (!rowClickConfig) return;
220 203
221 props.handleExecInstructSet({ 204 props.handleExecInstructSet({
222 btnConfig: rowClickConfig, 205 btnConfig: rowClickConfig,
223 - nextProps: nextProps 206 + nextProps: nextProps,
224 }); 207 });
225 } 208 }
226 ); 209 );
@@ -228,9 +211,7 @@ const mesTableLineAdd1 = (props, tableName) => { @@ -228,9 +211,7 @@ const mesTableLineAdd1 = (props, tableName) => {
228 211
229 // 研发工艺参数材料表新增 212 // 研发工艺参数材料表新增
230 const mesTableLineAdd2 = (props, tableName) => { 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 if (!oTab) return; 215 if (!oTab) return;
235 216
236 const dataNodeKey = oTab.getAttribute("data-node-key") || ""; 217 const dataNodeKey = oTab.getAttribute("data-node-key") || "";
@@ -242,29 +223,23 @@ const mesTableLineAdd2 = (props, tableName) => { @@ -242,29 +223,23 @@ const mesTableLineAdd2 = (props, tableName) => {
242 handleType: "add", 223 handleType: "add",
243 sParentId: props.yftable0Data?.[0]?.sId || "", 224 sParentId: props.yftable0Data?.[0]?.sId || "",
244 sRev, 225 sRev,
245 - bSave: 0 226 + bSave: 0,
246 }; 227 };
247 228
248 const { [`${tableName}Data`]: tableData = [] } = props; 229 const { [`${tableName}Data`]: tableData = [] } = props;
249 props.onSaveState({ 230 props.onSaveState({
250 - [`${tableName}Data`]: [...tableData, newData] 231 + [`${tableName}Data`]: [...tableData, newData],
251 }); 232 });
252 }; 233 };
253 234
254 // 班组报工行车记录表格起始时间修改 235 // 班组报工行车记录表格起始时间修改
255 const mesTableChange1 = (props, tableName) => { 236 const mesTableChange1 = (props, tableName) => {
256 // const tableName = "table0"; 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 let tableDataNew = lodash.cloneDeep(tableData); 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 if (rowDataIndex === -1) return; 243 if (rowDataIndex === -1) return;
269 244
270 const rowData = tableData[rowDataIndex]; 245 const rowData = tableData[rowDataIndex];
@@ -275,30 +250,23 @@ const mesTableChange1 = (props, tableName) => { @@ -275,30 +250,23 @@ const mesTableChange1 = (props, tableName) => {
275 return; 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 if (parentRowDataIndex === -1) { 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 if (parentRowDataIndex === -1) return; 259 if (parentRowDataIndex === -1) return;
289 260
290 const parentRowData = tableData[parentRowDataIndex]; 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 // 检查tStartDate是否在tEndDate之前 264 // 检查tStartDate是否在tEndDate之前
297 if (moment(tEndDate).isBefore(moment(tStartDate))) { 265 if (moment(tEndDate).isBefore(moment(tStartDate))) {
298 message.info("结束时间不能小于起始时间!", 3); 266 message.info("结束时间不能小于起始时间!", 3);
299 tableDataNew[rowDataIndex] = rowDataOld; 267 tableDataNew[rowDataIndex] = rowDataOld;
300 props.onSaveState({ 268 props.onSaveState({
301 - [`${tableName}Data`]: tableDataNew 269 + [`${tableName}Data`]: tableDataNew,
302 }); 270 });
303 return; 271 return;
304 } 272 }
@@ -308,7 +276,7 @@ const mesTableChange1 = (props, tableName) => { @@ -308,7 +276,7 @@ const mesTableChange1 = (props, tableName) => {
308 message.info("结束不能大于父节点的结束时间!", 3); 276 message.info("结束不能大于父节点的结束时间!", 3);
309 tableDataNew[rowDataIndex] = rowDataOld; 277 tableDataNew[rowDataIndex] = rowDataOld;
310 props.onSaveState({ 278 props.onSaveState({
311 - [`${tableName}Data`]: tableDataNew 279 + [`${tableName}Data`]: tableDataNew,
312 }); 280 });
313 return; 281 return;
314 } 282 }
@@ -318,7 +286,7 @@ const mesTableChange1 = (props, tableName) => { @@ -318,7 +286,7 @@ const mesTableChange1 = (props, tableName) => {
318 message.info("结束不能大于当前时间!", 3); 286 message.info("结束不能大于当前时间!", 3);
319 tableDataNew[rowDataIndex] = rowDataOld; 287 tableDataNew[rowDataIndex] = rowDataOld;
320 props.onSaveState({ 288 props.onSaveState({
321 - [`${tableName}Data`]: tableDataNew 289 + [`${tableName}Data`]: tableDataNew,
322 }); 290 });
323 return; 291 return;
324 } 292 }
@@ -326,14 +294,13 @@ const mesTableChange1 = (props, tableName) => { @@ -326,14 +294,13 @@ const mesTableChange1 = (props, tableName) => {
326 // 父节点的结束时间改成当前行的起始时间 294 // 父节点的结束时间改成当前行的起始时间
327 tableDataNew[rowDataIndex].bUnChanged = false; 295 tableDataNew[rowDataIndex].bUnChanged = false;
328 tableDataNew[parentRowDataIndex].tStartDate = tEndDate; 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 tableDataNew.sort((a, b) => new Date(b.tEndDate) - new Date(a.tEndDate)); 300 tableDataNew.sort((a, b) => new Date(b.tEndDate) - new Date(a.tEndDate));
334 301
335 const addState = { 302 const addState = {
336 - [`${tableName}Data`]: tableDataNew 303 + [`${tableName}Data`]: tableDataNew,
337 }; 304 };
338 props.onSaveState(addState); 305 props.onSaveState(addState);
339 306
@@ -353,32 +320,28 @@ const mesTableLineDel1 = async (props, tableName) => { @@ -353,32 +320,28 @@ const mesTableLineDel1 = async (props, tableName) => {
353 if (commonUtils.isNotEmptyArr(tableData)) { 320 if (commonUtils.isNotEmptyArr(tableData)) {
354 const addState = { 321 const addState = {
355 [`${tableName}SelectedRowKeys`]: [tableData[0].sId], 322 [`${tableName}SelectedRowKeys`]: [tableData[0].sId],
356 - [`slave1SelectedRowKeys`]: [tableData[0].sAbnormalEventId] 323 + [`slave1SelectedRowKeys`]: [tableData[0].sAbnormalEventId],
357 }; 324 };
358 325
359 if (tableData.some(item => item.bUnChanged)) { 326 if (tableData.some(item => item.bUnChanged)) {
360 addState[`${tableName}Data`] = tableData.map(item => ({ 327 addState[`${tableName}Data`] = tableData.map(item => ({
361 ...item, 328 ...item,
362 - bUnChanged: undefined 329 + bUnChanged: undefined,
363 })); 330 }));
364 } 331 }
365 332
366 props.onSaveState(addState); 333 props.onSaveState(addState);
367 const name = tableName; 334 const name = tableName;
368 const { [`${name}Config`]: tableConfig = {} } = props; 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 if (!rowClickConfig) return; 337 if (!rowClickConfig) return;
375 await awaitPromiseReturn(); 338 await awaitPromiseReturn();
376 props.handleExecInstructSet({ 339 props.handleExecInstructSet({
377 btnConfig: rowClickConfig, 340 btnConfig: rowClickConfig,
378 nextProps: { 341 nextProps: {
379 ...props, 342 ...props,
380 - [`${tableName}SelectedRowKeys`]: [tableData[0].sId]  
381 - } 343 + [`${tableName}SelectedRowKeys`]: [tableData[0].sId],
  344 + },
382 }); 345 });
383 } 346 }
384 return; 347 return;
@@ -386,10 +349,7 @@ const mesTableLineDel1 = async (props, tableName) => { @@ -386,10 +349,7 @@ const mesTableLineDel1 = async (props, tableName) => {
386 349
387 // 找剩余数据中开始时间等于删除数据结束时间的那条数据 350 // 找剩余数据中开始时间等于删除数据结束时间的那条数据
388 const iIndex = tableData.findIndex( 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 if (iIndex === -1) { 354 if (iIndex === -1) {
395 if (tableName === "table0") { 355 if (tableName === "table0") {
@@ -404,7 +364,7 @@ const mesTableLineDel1 = async (props, tableName) => { @@ -404,7 +364,7 @@ const mesTableLineDel1 = async (props, tableName) => {
404 tableDataNew[iIndex].tStartDate = tStartDate; 364 tableDataNew[iIndex].tStartDate = tStartDate;
405 tableDataNew[iIndex].handleType = tableDataNew[iIndex].handleType || "update"; 365 tableDataNew[iIndex].handleType = tableDataNew[iIndex].handleType || "update";
406 const addState = { 366 const addState = {
407 - [`${tableName}Data`]: tableDataNew 367 + [`${tableName}Data`]: tableDataNew,
408 }; 368 };
409 props.onSaveState(addState); 369 props.onSaveState(addState);
410 370
@@ -424,73 +384,67 @@ const handleMesSave = props => { @@ -424,73 +384,67 @@ const handleMesSave = props => {
424 sInstruct: JSON.stringify([ 384 sInstruct: JSON.stringify([
425 { 385 {
426 opr: "newempty", 386 opr: "newempty",
427 - newDataset: "NewReportSlave" 387 + newDataset: "NewReportSlave",
428 }, 388 },
429 { 389 {
430 opr: "edit", 390 opr: "edit",
431 desDataset: "NewReportSlave", 391 desDataset: "NewReportSlave",
432 dataset: "table0@sec", 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 opr: "filter", 396 opr: "filter",
438 srcDataset: "table0", 397 srcDataset: "table0",
439 newDataset: "OldReportSlave", 398 newDataset: "OldReportSlave",
440 dataset: "NewReportSlave,table0One", 399 dataset: "NewReportSlave,table0One",
441 - condition: "'${table0One.sId}'=='${NewReportSlave.sSrcHourId}'" 400 + condition: "'${table0One.sId}'=='${NewReportSlave.sSrcHourId}'",
442 }, 401 },
443 { 402 {
444 opr: "newempty", 403 opr: "newempty",
445 - newDataset: "temp0" 404 + newDataset: "temp0",
446 }, 405 },
447 { 406 {
448 opr: "edit", 407 opr: "edit",
449 desDataset: "temp0", 408 desDataset: "temp0",
450 dataset: "NewReportSlave,OldReportSlave", 409 dataset: "NewReportSlave,OldReportSlave",
451 sValue: 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 opr: "exesql", 414 opr: "exesql",
456 data: [ 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 opr: "save", 423 opr: "save",
466 data: [ 424 data: [
467 { 425 {
468 tablename: "mftproductionreportslave", 426 tablename: "mftproductionreportslave",
469 - srcDataset: "table0"  
470 - }  
471 - ] 427 + srcDataset: "table0",
  428 + },
  429 + ],
472 }, 430 },
473 { 431 {
474 opr: "refresh", 432 opr: "refresh",
475 - dataset: "table0,table1,table4,table0NotFirstlineSelected"  
476 - }  
477 - ]) 433 + dataset: "table0,table1,table4,table0NotFirstlineSelected",
  434 + },
  435 + ]),
478 }, 436 },
479 inscallback: async () => { 437 inscallback: async () => {
480 const name = "table0"; 438 const name = "table0";
481 const { [`${name}Config`]: tableConfig = {} } = props; 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 if (!rowClickConfig) return; 441 if (!rowClickConfig) return;
488 await awaitPromiseReturn(); 442 await awaitPromiseReturn();
489 props.handleExecInstructSet({ 443 props.handleExecInstructSet({
490 btnConfig: rowClickConfig, 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,25 +467,24 @@ const handleMesSlave0Save = props => {
513 sInstruct: JSON.stringify([ 467 sInstruct: JSON.stringify([
514 { 468 {
515 opr: "newempty", 469 opr: "newempty",
516 - newDataset: "NewReportSlave" 470 + newDataset: "NewReportSlave",
517 }, 471 },
518 { 472 {
519 opr: "edit", 473 opr: "edit",
520 desDataset: "NewReportSlave", 474 desDataset: "NewReportSlave",
521 dataset: "slave0@sec", 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 opr: "filter", 479 opr: "filter",
527 srcDataset: "slave0", 480 srcDataset: "slave0",
528 newDataset: "OldReportSlave", 481 newDataset: "OldReportSlave",
529 dataset: "NewReportSlave,slave0One", 482 dataset: "NewReportSlave,slave0One",
530 - condition: "'${slave0One.sId}'=='${NewReportSlave.sSrcHourId}'" 483 + condition: "'${slave0One.sId}'=='${NewReportSlave.sSrcHourId}'",
531 }, 484 },
532 { 485 {
533 opr: "newempty", 486 opr: "newempty",
534 - newDataset: "temp0" 487 + newDataset: "temp0",
535 }, 488 },
536 489
537 { 490 {
@@ -539,48 +492,43 @@ const handleMesSlave0Save = props => { @@ -539,48 +492,43 @@ const handleMesSlave0Save = props => {
539 desDataset: "temp0", 492 desDataset: "temp0",
540 dataset: "NewReportSlave,OldReportSlave", 493 dataset: "NewReportSlave,OldReportSlave",
541 sValue: 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 opr: "exesql", 498 opr: "exesql",
546 data: [ 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 opr: "save", 507 opr: "save",
556 data: [ 508 data: [
557 { 509 {
558 tablename: "mftproductionreportslave", 510 tablename: "mftproductionreportslave",
559 - srcDataset: "slave0"  
560 - }  
561 - ] 511 + srcDataset: "slave0",
  512 + },
  513 + ],
562 }, 514 },
563 { 515 {
564 opr: "refresh", 516 opr: "refresh",
565 - dataset: "slave0,slave0NotFirstlineSelected"  
566 - }  
567 - ]) 517 + dataset: "slave0,slave0NotFirstlineSelected",
  518 + },
  519 + ]),
568 }, 520 },
569 inscallback: async nextProps => { 521 inscallback: async nextProps => {
570 const name = "slave0"; 522 const name = "slave0";
571 const { [`${name}Config`]: tableConfig = {} } = props; 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 if (!rowClickConfig) return; 525 if (!rowClickConfig) return;
578 await awaitPromiseReturn(); 526 await awaitPromiseReturn();
579 props.handleExecInstructSet({ 527 props.handleExecInstructSet({
580 btnConfig: rowClickConfig, 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,7 +538,7 @@ const handleMesSave1 = (props, delRow) => {
590 const temp0Data = []; 538 const temp0Data = [];
591 temp0Data.push({ 539 temp0Data.push({
592 sNewReportSlaveId: delRow.sId, 540 sNewReportSlaveId: delRow.sId,
593 - sOldReportSlaveId: delRow.sSrcHourId 541 + sOldReportSlaveId: delRow.sSrcHourId,
594 }); 542 });
595 543
596 props.handleExecInstructSet({ 544 props.handleExecInstructSet({
@@ -602,11 +550,10 @@ const handleMesSave1 = (props, delRow) => { @@ -602,11 +550,10 @@ const handleMesSave1 = (props, delRow) => {
602 opr: "exesql", 550 opr: "exesql",
603 data: [ 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,25 +580,21 @@ const handleMesSave1 = (props, delRow) => {
633 // }, 580 // },
634 { 581 {
635 opr: "refresh", 582 opr: "refresh",
636 - dataset: "table0,table1,table4,tableS1,table0FirstlineSelected"  
637 - }  
638 - ]) 583 + dataset: "table0,table1,table4,tableS1,table0FirstlineSelected",
  584 + },
  585 + ]),
639 }, 586 },
640 inscallback: async nextProps => { 587 inscallback: async nextProps => {
641 const name = "table0"; 588 const name = "table0";
642 const { [`${name}Config`]: tableConfig = {} } = props; 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 if (!rowClickConfig) return; 591 if (!rowClickConfig) return;
649 await awaitPromiseReturn(); 592 await awaitPromiseReturn();
650 props.handleExecInstructSet({ 593 props.handleExecInstructSet({
651 btnConfig: rowClickConfig, 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,7 +604,7 @@ const handleMesSlave0Save1 = (props, delRow) => {
661 const temp0Data = []; 604 const temp0Data = [];
662 temp0Data.push({ 605 temp0Data.push({
663 sNewReportSlaveId: delRow.sId, 606 sNewReportSlaveId: delRow.sId,
664 - sOldReportSlaveId: delRow.sSrcHourId 607 + sOldReportSlaveId: delRow.sSrcHourId,
665 }); 608 });
666 609
667 props.handleExecInstructSet({ 610 props.handleExecInstructSet({
@@ -680,51 +623,40 @@ const handleMesSlave0Save1 = (props, delRow) => { @@ -680,51 +623,40 @@ const handleMesSlave0Save1 = (props, delRow) => {
680 opr: "exesql", 623 opr: "exesql",
681 data: [ 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 opr: "refresh", 632 opr: "refresh",
691 - dataset: "slave0,slave0FirstlineSelected"  
692 - }  
693 - ]) 633 + dataset: "slave0,slave0FirstlineSelected",
  634 + },
  635 + ]),
694 }, 636 },
695 inscallback: async nextProps => { 637 inscallback: async nextProps => {
696 const name = "slave0"; 638 const name = "slave0";
697 const { [`${name}Config`]: tableConfig = {} } = props; 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 if (!rowClickConfig) return; 641 if (!rowClickConfig) return;
704 await awaitPromiseReturn(); 642 await awaitPromiseReturn();
705 props.handleExecInstructSet({ 643 props.handleExecInstructSet({
706 btnConfig: rowClickConfig, 644 btnConfig: rowClickConfig,
707 - nextProps: nextProps 645 + nextProps: nextProps,
708 }); 646 });
709 - } 647 + },
710 }); 648 });
711 }; 649 };
712 650
713 // 班组报工托盘计数信息按钮 651 // 班组报工托盘计数信息按钮
714 const mesGetBtnsConfig1 = props => { 652 const mesGetBtnsConfig1 = props => {
715 - const {  
716 - table0Data = [],  
717 - table0SelectedRowKeys = [],  
718 - btnsConfig = []  
719 - } = props; 653 + const { table0Data = [], table0SelectedRowKeys = [], btnsConfig = [] } = props;
720 654
721 if (!table0SelectedRowKeys.length) { 655 if (!table0SelectedRowKeys.length) {
722 return []; 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 const sSrcHourId = table0Row?.sSrcHourId; 660 const sSrcHourId = table0Row?.sSrcHourId;
729 661
730 // 是否新纪录 662 // 是否新纪录
@@ -740,16 +672,9 @@ const mesGetBtnsConfig1 = props => { @@ -740,16 +672,9 @@ const mesGetBtnsConfig1 = props => {
740 672
741 // 班组报工托盘计数信息按钮点击事件 673 // 班组报工托盘计数信息按钮点击事件
742 const mesTableBtnClick1 = props => { 674 const mesTableBtnClick1 = props => {
743 - const {  
744 - sControlName,  
745 - table0Data = [],  
746 - table0SelectedRowKeys = [],  
747 - params  
748 - } = props; 675 + const { sControlName, table0Data = [], table0SelectedRowKeys = [], params } = props;
749 const { record } = params; 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 const { sId, sSrcHourId, tStartDate, tEndDate } = table0Row; 678 const { sId, sSrcHourId, tStartDate, tEndDate } = table0Row;
754 679
755 let table0RowNext; 680 let table0RowNext;
@@ -757,21 +682,13 @@ const mesTableBtnClick1 = props => { @@ -757,21 +682,13 @@ const mesTableBtnClick1 = props => {
757 // 调至下段 682 // 调至下段
758 table0RowNext = table0Data.find( 683 table0RowNext = table0Data.find(
759 item => 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 } else { 687 } else {
767 // 调至上段 688 // 调至上段
768 table0RowNext = table0Data.find( 689 table0RowNext = table0Data.find(
769 item => 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,7 +696,7 @@ const mesTableBtnClick1 = props => {
779 temp0Data.push({ 696 temp0Data.push({
780 sNewReportSlaveId: sId, 697 sNewReportSlaveId: sId,
781 sOldReportSlaveId: table0RowNext.sId, 698 sOldReportSlaveId: table0RowNext.sId,
782 - sTrayOutId: record.sId 699 + sTrayOutId: record.sId,
783 }); 700 });
784 701
785 props.onExecInstructSet({ 702 props.onExecInstructSet({
@@ -793,16 +710,16 @@ const mesTableBtnClick1 = props => { @@ -793,16 +710,16 @@ const mesTableBtnClick1 = props => {
793 { 710 {
794 sql: 711 sql:
795 "update mftplctray A SET A.sReportTrayId= ${sOldReportSlaveId} WHERE A.sReportTrayId=${sNewReportSlaveId} and A.sTrayOutId=${sTrayOutId}", 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 opr: "refresh", 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,7 +750,7 @@ const mesTableBtnClick2 = props => {
833 tableS5Data: [], 750 tableS5Data: [],
834 tableS8Data: [], 751 tableS8Data: [],
835 tableS9Data: [], 752 tableS9Data: [],
836 - tableS10Data: [] 753 + tableS10Data: [],
837 }); 754 });
838 755
839 const oTabs = document.querySelectorAll(`.ant-tabs-tab-btn[id*="生产日报"]`); 756 const oTabs = document.querySelectorAll(`.ant-tabs-tab-btn[id*="生产日报"]`);
@@ -850,7 +767,7 @@ const mesTableBtnClick3 = props => { @@ -850,7 +767,7 @@ const mesTableBtnClick3 = props => {
850 if (bHourlyReport) { 767 if (bHourlyReport) {
851 props.onExecInstructSet({ 768 props.onExecInstructSet({
852 nextProps: props, 769 nextProps: props,
853 - btnConfig: config 770 + btnConfig: config,
854 }); 771 });
855 return; 772 return;
856 } 773 }
@@ -868,22 +785,20 @@ const mesTableBtnClick3 = props => { @@ -868,22 +785,20 @@ const mesTableBtnClick3 = props => {
868 props.onSaveState({ 785 props.onSaveState({
869 table0SelectedRowKeys: [], 786 table0SelectedRowKeys: [],
870 table4Data: [], 787 table4Data: [],
871 - table13Data: [] 788 + table13Data: [],
872 }); 789 });
873 790
874 setTimeout(() => { 791 setTimeout(() => {
875 props.onTableSelectRowChange("table0", [table0Data[iIndex].sId]); 792 props.onTableSelectRowChange("table0", [table0Data[iIndex].sId]);
876 props.onSaveState({ 793 props.onSaveState({
877 - refreshTableList: ["table0,table0NotFirstlineSelected"] 794 + refreshTableList: ["table0,table0NotFirstlineSelected"],
878 }); 795 });
879 }, 200); 796 }, 200);
880 797
881 const oTabs = document.querySelectorAll(`.ant-tabs-tab-btn[id*="班组报工"]`); 798 const oTabs = document.querySelectorAll(`.ant-tabs-tab-btn[id*="班组报工"]`);
882 oTabs?.[0]?.click(); 799 oTabs?.[0]?.click();
883 setTimeout(() => { 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 oTabs1?.[0]?.click(); 802 oTabs1?.[0]?.click();
888 }, 200); 803 }, 200);
889 }; 804 };
@@ -892,10 +807,7 @@ const mesTableBtnClick3 = props => { @@ -892,10 +807,7 @@ const mesTableBtnClick3 = props => {
892 const handleSlaveWypj2BtnPre = props => { 807 const handleSlaveWypj2BtnPre = props => {
893 const listName = "slaveWypj2"; 808 const listName = "slaveWypj2";
894 const tableName = "slaveWypj3"; 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 const [rowData = {}] = listData; 812 const [rowData = {}] = listData;
901 813
@@ -910,23 +822,21 @@ const handleSlaveWypj2BtnPre = props => { @@ -910,23 +822,21 @@ const handleSlaveWypj2BtnPre = props => {
910 return; 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 if (!sInstructStr) return; 826 if (!sInstructStr) return;
917 827
918 const selectedRowKeys = [tableData[iIndex - 1].sId]; 828 const selectedRowKeys = [tableData[iIndex - 1].sId];
919 props.onSaveState( 829 props.onSaveState(
920 { 830 {
921 - [`${tableName}SelectedRowKeys`]: selectedRowKeys 831 + [`${tableName}SelectedRowKeys`]: selectedRowKeys,
922 }, 832 },
923 nextProps => { 833 nextProps => {
924 props.onExecInstructSet({ 834 props.onExecInstructSet({
925 nextProps: nextProps, 835 nextProps: nextProps,
926 btnConfig: { 836 btnConfig: {
927 showName: "上一卷", 837 showName: "上一卷",
928 - sInstruct: sInstructStr  
929 - } 838 + sInstruct: sInstructStr,
  839 + },
930 }); 840 });
931 } 841 }
932 ); 842 );
@@ -936,10 +846,7 @@ const handleSlaveWypj2BtnPre = props => { @@ -936,10 +846,7 @@ const handleSlaveWypj2BtnPre = props => {
936 const handleSlaveWypj2BtnNext = props => { 846 const handleSlaveWypj2BtnNext = props => {
937 const listName = "slaveWypj2"; 847 const listName = "slaveWypj2";
938 const tableName = "slaveWypj3"; 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 const [rowData = {}] = listData; 851 const [rowData = {}] = listData;
945 852
@@ -954,23 +861,21 @@ const handleSlaveWypj2BtnNext = props => { @@ -954,23 +861,21 @@ const handleSlaveWypj2BtnNext = props => {
954 return; 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 if (!sInstructStr) return; 865 if (!sInstructStr) return;
961 866
962 const selectedRowKeys = [tableData[iIndex + 1].sId]; 867 const selectedRowKeys = [tableData[iIndex + 1].sId];
963 props.onSaveState( 868 props.onSaveState(
964 { 869 {
965 - [`${tableName}SelectedRowKeys`]: selectedRowKeys 870 + [`${tableName}SelectedRowKeys`]: selectedRowKeys,
966 }, 871 },
967 nextProps => { 872 nextProps => {
968 props.onExecInstructSet({ 873 props.onExecInstructSet({
969 nextProps: nextProps, 874 nextProps: nextProps,
970 btnConfig: { 875 btnConfig: {
971 showName: "下一卷", 876 showName: "下一卷",
972 - sInstruct: sInstructStr  
973 - } 877 + sInstruct: sInstructStr,
  878 + },
974 }); 879 });
975 } 880 }
976 ); 881 );
@@ -980,10 +885,7 @@ const handleSlaveWypj2BtnNext = props => { @@ -980,10 +885,7 @@ const handleSlaveWypj2BtnNext = props => {
980 const handleSalveWydm2BtnPre = props => { 885 const handleSalveWydm2BtnPre = props => {
981 const listName = "salveWydm2"; 886 const listName = "salveWydm2";
982 const tableName = "salveWydm3"; 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 const [rowData = {}] = listData; 890 const [rowData = {}] = listData;
989 891
@@ -998,23 +900,21 @@ const handleSalveWydm2BtnPre = props => { @@ -998,23 +900,21 @@ const handleSalveWydm2BtnPre = props => {
998 return; 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 if (!sInstructStr) return; 904 if (!sInstructStr) return;
1005 905
1006 const selectedRowKeys = [tableData[iIndex - 1].sId]; 906 const selectedRowKeys = [tableData[iIndex - 1].sId];
1007 props.onSaveState( 907 props.onSaveState(
1008 { 908 {
1009 - [`${tableName}SelectedRowKeys`]: selectedRowKeys 909 + [`${tableName}SelectedRowKeys`]: selectedRowKeys,
1010 }, 910 },
1011 nextProps => { 911 nextProps => {
1012 props.onExecInstructSet({ 912 props.onExecInstructSet({
1013 nextProps: nextProps, 913 nextProps: nextProps,
1014 btnConfig: { 914 btnConfig: {
1015 showName: "上一版", 915 showName: "上一版",
1016 - sInstruct: sInstructStr  
1017 - } 916 + sInstruct: sInstructStr,
  917 + },
1018 }); 918 });
1019 } 919 }
1020 ); 920 );
@@ -1024,10 +924,7 @@ const handleSalveWydm2BtnPre = props => { @@ -1024,10 +924,7 @@ const handleSalveWydm2BtnPre = props => {
1024 const handleSalveWydm2BtnNext = props => { 924 const handleSalveWydm2BtnNext = props => {
1025 const listName = "salveWydm2"; 925 const listName = "salveWydm2";
1026 const tableName = "salveWydm3"; 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 const [rowData = {}] = listData; 929 const [rowData = {}] = listData;
1033 930
@@ -1042,23 +939,21 @@ const handleSalveWydm2BtnNext = props => { @@ -1042,23 +939,21 @@ const handleSalveWydm2BtnNext = props => {
1042 return; 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 if (!sInstructStr) return; 943 if (!sInstructStr) return;
1049 944
1050 const selectedRowKeys = [tableData[iIndex + 1].sId]; 945 const selectedRowKeys = [tableData[iIndex + 1].sId];
1051 props.onSaveState( 946 props.onSaveState(
1052 { 947 {
1053 - [`${tableName}SelectedRowKeys`]: selectedRowKeys 948 + [`${tableName}SelectedRowKeys`]: selectedRowKeys,
1054 }, 949 },
1055 nextProps => { 950 nextProps => {
1056 props.onExecInstructSet({ 951 props.onExecInstructSet({
1057 nextProps: nextProps, 952 nextProps: nextProps,
1058 btnConfig: { 953 btnConfig: {
1059 showName: "下一版", 954 showName: "下一版",
1060 - sInstruct: sInstructStr  
1061 - } 955 + sInstruct: sInstructStr,
  956 + },
1062 }); 957 });
1063 } 958 }
1064 ); 959 );
@@ -1068,10 +963,7 @@ const handleSalveWydm2BtnNext = props => { @@ -1068,10 +963,7 @@ const handleSalveWydm2BtnNext = props => {
1068 const handleSlaveWyrj2BtnPre = props => { 963 const handleSlaveWyrj2BtnPre = props => {
1069 const listName = "slaveWyrj2"; 964 const listName = "slaveWyrj2";
1070 const tableName = "slaveWyrj3"; 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 const [rowData = {}] = listData; 968 const [rowData = {}] = listData;
1077 969
@@ -1087,23 +979,21 @@ const handleSlaveWyrj2BtnPre = props => { @@ -1087,23 +979,21 @@ const handleSlaveWyrj2BtnPre = props => {
1087 return; 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 if (!sInstructStr) return; 983 if (!sInstructStr) return;
1094 984
1095 const selectedRowKeys = [tableData[iIndex - 1].sId]; 985 const selectedRowKeys = [tableData[iIndex - 1].sId];
1096 props.onSaveState( 986 props.onSaveState(
1097 { 987 {
1098 - [`${tableName}SelectedRowKeys`]: selectedRowKeys 988 + [`${tableName}SelectedRowKeys`]: selectedRowKeys,
1099 }, 989 },
1100 nextProps => { 990 nextProps => {
1101 props.onExecInstructSet({ 991 props.onExecInstructSet({
1102 nextProps: nextProps, 992 nextProps: nextProps,
1103 btnConfig: { 993 btnConfig: {
1104 showName: "上一版", 994 showName: "上一版",
1105 - sInstruct: sInstructStr  
1106 - } 995 + sInstruct: sInstructStr,
  996 + },
1107 }); 997 });
1108 } 998 }
1109 ); 999 );
@@ -1113,10 +1003,7 @@ const handleSlaveWyrj2BtnPre = props => { @@ -1113,10 +1003,7 @@ const handleSlaveWyrj2BtnPre = props => {
1113 const handleSlaveWyrj2BtnNext = props => { 1003 const handleSlaveWyrj2BtnNext = props => {
1114 const listName = "slaveWyrj2"; 1004 const listName = "slaveWyrj2";
1115 const tableName = "slaveWyrj3"; 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 const [rowData = {}] = listData; 1008 const [rowData = {}] = listData;
1122 1009
@@ -1131,23 +1018,21 @@ const handleSlaveWyrj2BtnNext = props => { @@ -1131,23 +1018,21 @@ const handleSlaveWyrj2BtnNext = props => {
1131 return; 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 if (!sInstructStr) return; 1022 if (!sInstructStr) return;
1138 1023
1139 const selectedRowKeys = [tableData[iIndex + 1].sId]; 1024 const selectedRowKeys = [tableData[iIndex + 1].sId];
1140 props.onSaveState( 1025 props.onSaveState(
1141 { 1026 {
1142 - [`${tableName}SelectedRowKeys`]: selectedRowKeys 1027 + [`${tableName}SelectedRowKeys`]: selectedRowKeys,
1143 }, 1028 },
1144 nextProps => { 1029 nextProps => {
1145 props.onExecInstructSet({ 1030 props.onExecInstructSet({
1146 nextProps: nextProps, 1031 nextProps: nextProps,
1147 btnConfig: { 1032 btnConfig: {
1148 showName: "下一版", 1033 showName: "下一版",
1149 - sInstruct: sInstructStr  
1150 - } 1034 + sInstruct: sInstructStr,
  1035 + },
1151 }); 1036 });
1152 } 1037 }
1153 ); 1038 );
@@ -1159,10 +1044,7 @@ const handleUpDownData = props => { @@ -1159,10 +1044,7 @@ const handleUpDownData = props => {
1159 const listName = showTableName; 1044 const listName = showTableName;
1160 const tableName = showTableName.substr(0, showTableName.length - 1) + 3; 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 const [rowData = {}] = listData; 1049 const [rowData = {}] = listData;
1168 1050
@@ -1177,36 +1059,31 @@ const handleUpDownData = props => { @@ -1177,36 +1059,31 @@ const handleUpDownData = props => {
1177 return; 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 message.info("已是最后一条数据!"); 1063 message.info("已是最后一条数据!");
1185 return; 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 if (!sInstructStr) return; 1068 if (!sInstructStr) return;
1192 1069
1193 const info = { 1070 const info = {
1194 "BtnRight.PriorCom": { index: iIndex - 1, message: "上一版" }, 1071 "BtnRight.PriorCom": { index: iIndex - 1, message: "上一版" },
1195 - "BtnRight.NextCom": { index: iIndex + 1, message: "下一版" } 1072 + "BtnRight.NextCom": { index: iIndex + 1, message: "下一版" },
1196 }[sFieldName] || { index: iIndex, message: "当前" }; 1073 }[sFieldName] || { index: iIndex, message: "当前" };
1197 1074
1198 const selectedRowKeys = [tableData[info.index].sId]; 1075 const selectedRowKeys = [tableData[info.index].sId];
1199 props.onSaveState( 1076 props.onSaveState(
1200 { 1077 {
1201 - [`${tableName}SelectedRowKeys`]: selectedRowKeys 1078 + [`${tableName}SelectedRowKeys`]: selectedRowKeys,
1202 }, 1079 },
1203 nextProps => { 1080 nextProps => {
1204 props.onExecInstructSet({ 1081 props.onExecInstructSet({
1205 nextProps: nextProps, 1082 nextProps: nextProps,
1206 btnConfig: { 1083 btnConfig: {
1207 showName: info.message, 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,7 +1097,7 @@ const mesTableChange2 = (props, tableName) => {
1220 delete tableDataNew[0].tConnectDate; 1097 delete tableDataNew[0].tConnectDate;
1221 1098
1222 props.onSaveState({ 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,10 +1134,7 @@ const mesTableChange3 = (props, tableName) => {
1257 } 1134 }
1258 1135
1259 const checkTime = moment(tConnectDate); 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 let msg = ""; 1138 let msg = "";
1265 if (sShift === "1" || sShift === "白班") { 1139 if (sShift === "1" || sShift === "白班") {
1266 if (bDelayedOvertime) { 1140 if (bDelayedOvertime) {
@@ -1280,33 +1154,32 @@ const mesTableChange3 = (props, tableName) => { @@ -1280,33 +1154,32 @@ const mesTableChange3 = (props, tableName) => {
1280 } 1154 }
1281 }; 1155 };
1282 1156
1283 -  
1284 const handleGetRefreshStatus = props => { 1157 const handleGetRefreshStatus = props => {
1285 const { refreshTableListCount = 0 } = props; 1158 const { refreshTableListCount = 0 } = props;
1286 if (!refreshTableListCount) { 1159 if (!refreshTableListCount) {
1287 - message.warning('请先等待页面初始化加载完成!'); 1160 + message.warning("请先等待页面初始化加载完成!");
1288 return true; 1161 return true;
1289 } else { 1162 } else {
1290 return false; 1163 return false;
1291 } 1164 }
1292 -} 1165 +};
1293 // 质量巡检-巡检项目-所有巡检按钮 1166 // 质量巡检-巡检项目-所有巡检按钮
1294 const handleZlxjCheck = async (props, btnName) => { 1167 const handleZlxjCheck = async (props, btnName) => {
1295 const { table0Data = [], table1Data = [], refreshTableListCount = 0 } = props; 1168 const { table0Data = [], table1Data = [], refreshTableListCount = 0 } = props;
1296 const { sTeamNo } = commonUtils.getAppData("userinfo"); 1169 const { sTeamNo } = commonUtils.getAppData("userinfo");
1297 1170
1298 if (!refreshTableListCount) { 1171 if (!refreshTableListCount) {
1299 - message.warning('请先等待页面初始化加载完成!'); 1172 + message.warning("请先等待页面初始化加载完成!");
1300 return; 1173 return;
1301 } 1174 }
1302 1175
1303 const typeList = { 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 const sCurRole = typeList[btnName]; 1184 const sCurRole = typeList[btnName];
1312 1185
@@ -1314,39 +1187,37 @@ const handleZlxjCheck = async (props, btnName) => { @@ -1314,39 +1187,37 @@ const handleZlxjCheck = async (props, btnName) => {
1314 if (!faceResult) return; 1187 if (!faceResult) return;
1315 const { name } = faceResult; 1188 const { name } = faceResult;
1316 if (!name) { 1189 if (!name) {
1317 - message.warning('人脸信息获取失败,请重新尝试!'); 1190 + message.warning("人脸信息获取失败,请重新尝试!");
1318 return; 1191 return;
1319 } 1192 }
1320 1193
1321 const table0DataNew = cloneDeep(table0Data); 1194 const table0DataNew = cloneDeep(table0Data);
1322 const table1DataNew = cloneDeep(table1Data); 1195 const table1DataNew = cloneDeep(table1Data);
1323 table0DataNew[0].sCurRole = sCurRole; 1196 table0DataNew[0].sCurRole = sCurRole;
1324 - table0DataNew[0].handleType = table0DataNew[0].handleType || 'update'; 1197 + table0DataNew[0].handleType = table0DataNew[0].handleType || "update";
1325 1198
1326 table1DataNew.unshift({ 1199 table1DataNew.unshift({
1327 sId: commonUtils.createSid(), 1200 sId: commonUtils.createSid(),
1328 - handleType: 'add', 1201 + handleType: "add",
1329 sSReserve1: sCurRole, 1202 sSReserve1: sCurRole,
1330 bSave: 1, 1203 bSave: 1,
1331 sParentId: table0Data[0].sId, 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 sPollingPerson: name, 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 props.onSaveState({ 1210 props.onSaveState({
1338 userfaceData: [faceResult], 1211 userfaceData: [faceResult],
1339 tempUserName: name, 1212 tempUserName: name,
1340 table0Data: table0DataNew, 1213 table0Data: table0DataNew,
1341 - table1Data: table1DataNew 1214 + table1Data: table1DataNew,
1342 }); 1215 });
1343 -} 1216 +};
1344 1217
1345 let loginInfo = {}; 1218 let loginInfo = {};
1346 const sModelsId = "16034339700006038392152714521000"; 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 const handleGetFormItem = (props, item) => { 1222 const handleGetFormItem = (props, item) => {
1352 let enabledNew = true; 1223 let enabledNew = true;
@@ -1374,32 +1245,28 @@ const handleGetFormItem = (props, item) => { @@ -1374,32 +1245,28 @@ const handleGetFormItem = (props, item) => {
1374 onFilterDropDownData: props.onFilterDropDownData, 1245 onFilterDropDownData: props.onFilterDropDownData,
1375 onSaveState: props.onSaveState, 1246 onSaveState: props.onSaveState,
1376 bPassWord: item.sName === "sPassWord", 1247 bPassWord: item.sName === "sPassWord",
1377 - style: { backgroundColor: "#eaeaea" } 1248 + style: { backgroundColor: "#eaeaea" },
1378 }; 1249 };
1379 return ( 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 <ShowType {...showTypeProps} /> 1252 <ShowType {...showTypeProps} />
1385 </Form.Item> 1253 </Form.Item>
1386 ); 1254 );
1387 }; 1255 };
1388 1256
1389 -const getFaceResult = async (props) => { 1257 +const getFaceResult = async props => {
1390 let faceResult = false; 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 const loginType = await new Promise(resolve => { 1270 const loginType = await new Promise(resolve => {
1404 Modal.confirm({ 1271 Modal.confirm({
1405 title: FriendlyReminder, 1272 title: FriendlyReminder,
@@ -1419,7 +1286,7 @@ const getFaceResult = async (props) =&gt; { @@ -1419,7 +1286,7 @@ const getFaceResult = async (props) =&gt; {
1419 } else { 1286 } else {
1420 resolve(0); 1287 resolve(0);
1421 } 1288 }
1422 - } 1289 + },
1423 }); 1290 });
1424 }); 1291 });
1425 1292
@@ -1444,27 +1311,20 @@ const getFaceResult = async (props) =&gt; { @@ -1444,27 +1311,20 @@ const getFaceResult = async (props) =&gt; {
1444 okText: btnCancel, 1311 okText: btnCancel,
1445 onOk() { 1312 onOk() {
1446 resolve(false); 1313 resolve(false);
1447 - } 1314 + },
1448 }); 1315 });
1449 }); 1316 });
1450 } else if (loginType === 2) { 1317 } else if (loginType === 2) {
1451 // 账号密码登陆 1318 // 账号密码登陆
1452 let loginConfig; 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 if (configReturn.code === 1) { 1322 if (configReturn.code === 1) {
1458 const dataReturn = configReturn.dataset.rows; 1323 const dataReturn = configReturn.dataset.rows;
1459 if (commonUtils.isNotEmptyArr(dataReturn)) { 1324 if (commonUtils.isNotEmptyArr(dataReturn)) {
1460 const { formData } = dataReturn[0]; 1325 const { formData } = dataReturn[0];
1461 if (commonUtils.isNotEmptyArr(formData)) { 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 } else { 1330 } else {
@@ -1496,34 +1356,31 @@ const getFaceResult = async (props) =&gt; { @@ -1496,34 +1356,31 @@ const getFaceResult = async (props) =&gt; {
1496 } 1356 }
1497 1357
1498 const { sBrandsId, sSubsidiaryId } = mesSysbrands; 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 const value = { 1360 const value = {
1502 username: loginInfo.sUserNo || loginInfo.sUserName, 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 onCancel() { 1381 onCancel() {
1525 resolve(false); 1382 resolve(false);
1526 - } 1383 + },
1527 }); 1384 });
1528 }); 1385 });
1529 } 1386 }
@@ -1532,7 +1389,7 @@ const getFaceResult = async (props) =&gt; { @@ -1532,7 +1389,7 @@ const getFaceResult = async (props) =&gt; {
1532 }; 1389 };
1533 1390
1534 // 质量巡检-巡检项目-完成/修改 1391 // 质量巡检-巡检项目-完成/修改
1535 -const mesTableBtnClick4 = async (props) => { 1392 +const mesTableBtnClick4 = async props => {
1536 const { params = {}, table0Data = [], table1Data = [], tempUserName } = props; 1393 const { params = {}, table0Data = [], table1Data = [], tempUserName } = props;
1537 const { config = {}, record } = params; 1394 const { config = {}, record } = params;
1538 const { sControlName } = config; 1395 const { sControlName } = config;
@@ -1556,7 +1413,7 @@ const mesTableBtnClick4 = async (props) =&gt; { @@ -1556,7 +1413,7 @@ const mesTableBtnClick4 = async (props) =&gt; {
1556 table1Data: table1Data.map(item => { 1413 table1Data: table1Data.map(item => {
1557 return item.sId === record.sId ? { ...item, bSave: 1 } : item; 1414 return item.sId === record.sId ? { ...item, bSave: 1 } : item;
1558 }), 1415 }),
1559 - }) 1416 + });
1560 } else if (sControlName === "BtnFinish") { 1417 } else if (sControlName === "BtnFinish") {
1561 const bHasX = Object.keys(record).some(key => key?.startsWith("sItem") && record[key] === "✗"); 1418 const bHasX = Object.keys(record).some(key => key?.startsWith("sItem") && record[key] === "✗");
1562 if (bHasX && !sQualityDeg) { 1419 if (bHasX && !sQualityDeg) {
@@ -1566,18 +1423,18 @@ const mesTableBtnClick4 = async (props) =&gt; { @@ -1566,18 +1423,18 @@ const mesTableBtnClick4 = async (props) =&gt; {
1566 1423
1567 const iIndex = table1Data.findIndex(item => item.sId === record.sId); 1424 const iIndex = table1Data.findIndex(item => item.sId === record.sId);
1568 table1Data[iIndex].bSave = 0; 1425 table1Data[iIndex].bSave = 0;
1569 - table1Data[iIndex].handleType = table1Data[iIndex].handleType || 'update' 1426 + table1Data[iIndex].handleType = table1Data[iIndex].handleType || "update";
1570 if (table1Data[iIndex].sSReserve1 === "1") { 1427 if (table1Data[iIndex].sSReserve1 === "1") {
1571 table1Data[iIndex].sPollingPerson = sUserName; 1428 table1Data[iIndex].sPollingPerson = sUserName;
1572 } 1429 }
1573 if (table1Data[iIndex].tPollingTime) { 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 if (!table1Data[iIndex].tPollingTime) { 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 props.onSaveState({ tempUserName: undefined, ...addState1 }); 1439 props.onSaveState({ tempUserName: undefined, ...addState1 });
1583 props.onExecInstructSet({ 1440 props.onExecInstructSet({
@@ -1591,18 +1448,18 @@ const mesTableBtnClick4 = async (props) =&gt; { @@ -1591,18 +1448,18 @@ const mesTableBtnClick4 = async (props) =&gt; {
1591 data: [ 1448 data: [
1592 { 1449 {
1593 tablename: "qlyqualityinspectionmaster", 1450 tablename: "qlyqualityinspectionmaster",
1594 - srcDataset: "table0" 1451 + srcDataset: "table0",
1595 }, 1452 },
1596 { 1453 {
1597 tablename: "qlyqualityinspectionslave", 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 export default costomPageFun; 1465 export default costomPageFun;