Commit 0aff5a951c91923607d91529d13c1963311970e8

Authored by Min
2 parents 778842fc 9ac94f24

Merge branch 'release/customer/2025/AJT' of http://git.xlyprint.cn/qiangmj/ebc-M…

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