Commit e2a4aa75ec1a89752dc2cacf26371a1a24be0832

Authored by 陈鑫涛
1 parent b3e1ef15

优化首页样式

.umirc.ts
... ... @@ -13,6 +13,7 @@ export default defineConfig({
13 13 { path: '/indexPage/CommonBill' },
14 14 { path: '/indexPage/CommonListEdit' },
15 15 { path: '/indexPage/CommonClassify' },
  16 + { path: '/indexPage/eleknifemould'}
16 17 ],
17 18 },
18 19 ],
... ...
src/components/Common/CommonElementEvent.js 0 → 100644
  1 +/* eslint-disable array-callback-return,no-undef,prefer-destructuring */
  2 +import React, { Component } from 'react';
  3 +import { Modal, message } from 'antd';
  4 +import commonConfig from '../../utils/config';
  5 +import * as commonFunc from './commonFunc';
  6 +import * as commonBusiness from './commonBusiness'; /* 单据业务功能 */
  7 +import * as commonUtils from '../../utils/utils'; /* 通用方法 */
  8 +import * as commonServices from './../../services/services'; /* 服务类 */
  9 +
  10 +const { confirm } = Modal;
  11 +
  12 +export default (ChildComponent) => {
  13 + return class extends Component {
  14 + constructor(props) {
  15 + super(props);
  16 + this.state = {};
  17 + this.form = {};
  18 + /* 表单对象 */
  19 + }
  20 +
  21 + async componentWillReceiveProps(nextProps) {
  22 + const {
  23 + formData, currentId, sModelsType, app,
  24 + } = nextProps;
  25 + let {
  26 + employeeConfig, bReceived, masterConfig,
  27 + sisproductclassifyProcessClassifyConfig, siscommonstyleproductclassifyConfig,
  28 + } = nextProps;
  29 + const {
  30 + contactConfig: contactOldConfig, supplyConfig: supplyOldConfig, machineConfig: machineOldConfig,
  31 + picFileConfig: picFileOldConfig, eleemployeeConfig: eleemployeeOldConfig, jurgroupConfig: jurgroupOldConfig,
  32 + userConfig: userOldConfig, sischeckphaselogininfoConfig: sischeckphaselogininfoOldConfig, sysmsguserConfig: sysmsguserOldConfig,
  33 + eleknifemouldproductConfig: eleknifemouldOldproductConfig, eleteststandarditemConfig: eleteststandardOlditemConfig,
  34 + } = nextProps;
  35 + if (commonUtils.isEmptyObject(contactOldConfig) && (sModelsType === 'element/supplyInfo' || sModelsType === 'element/customerInfo') && formData.length > 0) {
  36 + const sId = currentId !== undefined ? currentId : '';
  37 + /* 数据Id */
  38 + const masterConfig = formData.filter(item => !item.bGrd)[0];
  39 + if (sModelsType === 'element/customerInfo') {
  40 + const contactConfig = formData.filter(item => item.bGrd && item.sTbName === 'elecustomercontacts')[0];
  41 + const contactColumn = commonFunc.getHeaderConfig(contactConfig);
  42 + const addressConfig = formData.filter(item => item.bGrd && item.sTbName === 'elecustomeraddress')[0];
  43 + const addressColumn = commonFunc.getHeaderConfig(addressConfig);
  44 + let addState = {};
  45 + if (sId === '') {
  46 + const config = {};
  47 + config.masterConfig = masterConfig;
  48 + config.contactConfig = contactConfig;
  49 + config.addressConfig = addressConfig;
  50 + addState = await this.handleAdd(config, nextProps.app.currentPane.copyTo, true);
  51 + } else {
  52 + this.handleGetData(masterConfig, contactConfig, addressConfig);
  53 + }
  54 + this.props.onSaveState({
  55 + masterConfig,
  56 + contactConfig,
  57 + contactColumn,
  58 + addressConfig,
  59 + addressColumn,
  60 + sId,
  61 + pageLoading: false,
  62 + ...addState,
  63 + });
  64 + } else if (sModelsType === 'element/supplyInfo') {
  65 + const contactConfig = formData.filter(item => item.bGrd && item.sTbName === 'elesupplycontacts')[0];
  66 + const contactColumn = commonFunc.getHeaderConfig(contactConfig);
  67 + const addressConfig = formData.filter(item => item.bGrd && item.sTbName === 'elesupplyaddress')[0];
  68 + const addressColumn = commonFunc.getHeaderConfig(addressConfig);
  69 + let addState = {};
  70 + if (sId === '') {
  71 + const config = {};
  72 + config.masterConfig = masterConfig;
  73 + config.contactConfig = contactConfig;
  74 + config.addressConfig = addressConfig;
  75 + addState = await this.handleAdd(config, nextProps.app.currentPane.copyTo, true);
  76 + } else {
  77 + this.handleGetData(masterConfig, contactConfig, addressConfig);
  78 + }
  79 + this.props.onSaveState({
  80 + masterConfig,
  81 + contactConfig,
  82 + contactColumn,
  83 + addressConfig,
  84 + addressColumn,
  85 + sId,
  86 + pageLoading: false,
  87 + ...addState,
  88 + });
  89 + }
  90 + }
  91 + if (commonUtils.isEmptyObject(supplyOldConfig) && formData.length > 0 && sModelsType === 'element/materialsInfo') {
  92 + const sId = currentId !== undefined ? currentId : '';
  93 + /* 数据Id */
  94 + const masterConfig = formData.filter(item => !item.bGrd)[0];
  95 + /* bGrd代表是否是表格 */
  96 + const supplyConfig = formData.filter(item => item.bGrd && item.sTbName === 'elematerialssupply')[0];
  97 + const supplyColumn = commonFunc.getHeaderConfig(supplyConfig);
  98 + const stockConfig = formData.filter(item => item.bGrd && item.sTbName === 'elematerialsstock')[0];
  99 + const stockColumn = commonFunc.getHeaderConfig(stockConfig);
  100 + let addState = {};
  101 + if (sId === '') {
  102 + const config = {};
  103 + config.masterConfig = masterConfig;
  104 + config.supplyConfig = supplyConfig;
  105 + config.stockConfig = stockConfig;
  106 + addState = await this.handleAdd(config, nextProps.app.currentPane.copyTo, true);
  107 + } else {
  108 + this.handleGetMaterialsData(masterConfig, supplyConfig, stockConfig);
  109 + }
  110 + this.props.onSaveState({
  111 + masterConfig,
  112 + supplyConfig,
  113 + supplyColumn,
  114 + stockConfig,
  115 + stockColumn,
  116 + sId,
  117 + pageLoading: false,
  118 + ...addState,
  119 + });
  120 + }
  121 + /* 印件分类 */
  122 + if (commonUtils.isEmptyObject(sisproductclassifyProcessClassifyConfig) && formData.length > 0 && sModelsType === 'element/sisproductclassify') {
  123 + const sId = currentId !== undefined ? currentId : '';
  124 + /* 数据Id */
  125 + const masterConfig = formData.filter(item => !item.bGrd)[0];
  126 + /* bGrd代表是否是表格 */
  127 + sisproductclassifyProcessClassifyConfig = formData.filter(item => item.bGrd && item.sTbName === 'sisproductclassifyProcessClassify')[0];
  128 + const sisproductclassifyProcessClassifyColumn = commonFunc.getHeaderConfig(sisproductclassifyProcessClassifyConfig);
  129 + let addState = {};
  130 + if (sId === '') {
  131 + const config = {};
  132 + config.masterConfig = masterConfig;
  133 + config.sisproductclassifyProcessClassifyConfig = sisproductclassifyProcessClassifyConfig;
  134 + addState = await this.handleAdd(config, nextProps.app.currentPane.copyTo, true);
  135 + } else {
  136 + this.handleGetProductclassifyData(masterConfig, sisproductclassifyProcessClassifyConfig);
  137 + }
  138 + this.props.onSaveState({
  139 + masterConfig,
  140 + sisproductclassifyProcessClassifyConfig,
  141 + sisproductclassifyProcessClassifyColumn,
  142 + sId,
  143 + pageLoading: false,
  144 + ...addState,
  145 + });
  146 + }
  147 + if (commonUtils.isEmptyObject(machineOldConfig) && formData.length > 0 && sModelsType === 'element/processInfo') {
  148 + const sId = currentId !== undefined ? currentId : '';
  149 + /* 数据Id */
  150 + const masterConfig = formData.filter(item => !item.bGrd)[0];
  151 + /* bGrd代表是否是表格 */
  152 + const machineConfig = formData.filter(item => item.bGrd && item.sTbName === 'eleprocessmachine')[0];
  153 + const machineColumn = commonFunc.getHeaderConfig(machineConfig);
  154 + const assortConfig = formData.filter(item => item.bGrd && item.sTbName === 'eleprocessloss')[0]; /* 劲嘉 配套工序不要使用,换成 装版损设置 */
  155 + const assortColumn = commonFunc.getHeaderConfig(assortConfig);
  156 + const outsideConfig = formData.filter(item => item.bGrd && item.sTbName === 'eleprocessoutside')[0];
  157 + const outsideColumn = commonFunc.getHeaderConfig(outsideConfig);
  158 + const processstyleConfig = formData.filter(item => item.bGrd && item.sTbName === 'eleprocessstyle')[0];
  159 + const processstyleColumn = commonFunc.getHeaderConfig(processstyleConfig);
  160 + const processApsRuleConfig = formData.filter(item => item.bGrd && item.sTbName === 'eleprocesssApsRule')[0]; /* APS定义规则 */
  161 + const processApsRuleColumn = commonFunc.getHeaderConfig(processApsRuleConfig);
  162 +
  163 + const dynamicParamConfig = commonUtils.isNotEmptyArr(formData.filter(item => item.bGrd && item.sTbName === 'eleprocessdynamic')) ? formData.filter(item => item.bGrd && item.sTbName === 'eleprocessdynamic')[0] : {}; /* 动态参数 */
  164 + const dynamicParamColumn = commonUtils.isNotEmptyObject(dynamicParamConfig) ? commonFunc.getHeaderConfig(dynamicParamConfig) : [];
  165 +
  166 + let addState = {};
  167 + if (sId === '') {
  168 + const config = {};
  169 + config.masterConfig = masterConfig;
  170 + config.machineConfig = machineConfig;
  171 + config.assortConfig = assortConfig;
  172 + config.outsideConfig = outsideConfig;
  173 + config.processstyleConfig = processstyleConfig;
  174 + config.processApsRuleConfig = processApsRuleConfig;
  175 + config.dynamicParamConfig = dynamicParamConfig;
  176 + addState = await this.handleAdd(config, nextProps.app.currentPane.copyTo, true);
  177 + } else {
  178 + this.handleGetProcessData(masterConfig, machineConfig, assortConfig, outsideConfig, processstyleConfig, processApsRuleConfig, dynamicParamConfig);
  179 + }
  180 + this.props.onSaveState({
  181 + masterConfig,
  182 + machineConfig,
  183 + machineColumn,
  184 + assortConfig,
  185 + assortColumn,
  186 + outsideConfig,
  187 + outsideColumn,
  188 + processstyleConfig,
  189 + processstyleColumn,
  190 + processApsRuleConfig,
  191 + processApsRuleColumn,
  192 + dynamicParamConfig,
  193 + dynamicParamColumn,
  194 + sId,
  195 + pageLoading: false,
  196 + ...addState,
  197 + });
  198 + }
  199 + if (commonUtils.isEmptyObject(picFileOldConfig) && formData.length > 0 && sModelsType === 'element/printInfo') {
  200 + const sId = currentId !== undefined ? currentId : '';
  201 + /* 数据Id */
  202 + const masterConfig = formData.filter(item => !item.bGrd)[0];
  203 + /* bGrd代表是否是表格 */
  204 + const picFileConfig = formData.filter(item => item.bGrd && item.sTbName === 'eleproductfile')[0];
  205 + const picFileColumn = commonFunc.getHeaderConfig(picFileConfig);
  206 + const stockConfig = formData.filter(item => item.bGrd && item.sTbName === 'eleproductstock')[0];
  207 + const stockColumn = commonFunc.getHeaderConfig(stockConfig);
  208 + const customerInfoConfig = formData.filter(item => item.bGrd && item.sTbName === 'eleproductcustomer')[0];
  209 + const customerInfoColumn = commonFunc.getHeaderConfig(customerInfoConfig);
  210 + let addState = {};
  211 + if (sId === '') {
  212 + const config = {};
  213 + config.masterConfig = masterConfig;
  214 + config.picFileConfig = picFileConfig;
  215 + config.stockConfig = stockConfig;
  216 + config.customerInfoConfig = customerInfoConfig;
  217 + addState = await this.handleAdd(config, nextProps.app.currentPane.copyTo, true);
  218 + } else {
  219 + this.handleGetPrintData(masterConfig, picFileConfig, stockConfig, customerInfoConfig);
  220 + }
  221 + this.props.onSaveState({
  222 + masterConfig,
  223 + picFileConfig,
  224 + picFileColumn,
  225 + stockConfig,
  226 + stockColumn,
  227 + customerInfoConfig,
  228 + customerInfoColumn,
  229 + sId,
  230 + pageLoading: false,
  231 + ...addState,
  232 + });
  233 + }
  234 + // 常用规格信息 commonUtils.isEmptyArr(siscommonstyleproductclassifyColumn)
  235 + if (commonUtils.isEmptyObject(siscommonstyleproductclassifyConfig) && formData.length > 0 && sModelsType === 'element/siscommonstyle') {
  236 + const sId = currentId !== undefined ? currentId : '';
  237 + /* 数据Id */
  238 + const masterConfig = formData.filter(item => !item.bGrd)[0];
  239 + /* bGrd代表是否是表格 */
  240 + siscommonstyleproductclassifyConfig = formData.filter(item => item.bGrd && item.sTbName === 'siscommonstyleproductclassify')[0];
  241 + const siscommonstyleproductclassifyColumn = commonFunc.getHeaderConfig(siscommonstyleproductclassifyConfig);
  242 + let addState = {};
  243 + if (sId === '') {
  244 + const config = {};
  245 + config.masterConfig = masterConfig;
  246 + config.siscommonstyleproductclassifyConfig = siscommonstyleproductclassifyConfig;
  247 + addState = await this.handleAdd(config, nextProps.app.currentPane.copyTo, true);
  248 + } else {
  249 + this.handleGetStyleData(masterConfig, siscommonstyleproductclassifyConfig);
  250 + }
  251 + this.props.onSaveState({
  252 + masterConfig,
  253 + siscommonstyleproductclassifyConfig,
  254 + siscommonstyleproductclassifyColumn,
  255 + sId,
  256 + pageLoading: false,
  257 + ...addState,
  258 + });
  259 + }
  260 + // 班组信息
  261 + if (commonUtils.isEmptyObject(eleemployeeOldConfig) && formData.length > 0 && sModelsType === 'element/teamInfo') {
  262 + const sId = currentId !== undefined ? currentId : '';
  263 + const masterConfig = formData.filter(item => !item.bGrd && item.sTbName === 'eleteam')[0];
  264 + const eleemployeeConfig = formData.filter(item => item.bGrd && item.sTbName === 'eleteamemployee')[0];
  265 + const eleemployeeColumn = commonFunc.getHeaderConfig(eleemployeeConfig);
  266 +
  267 + const elemachineConfig = formData.filter(item => item.bGrd && item.sTbName === 'eleteammachine')[0];
  268 + const elemachineColumn = commonFunc.getHeaderConfig(elemachineConfig);
  269 +
  270 + let addState = {};
  271 + if (sId === '') {
  272 + const config = {};
  273 + config.masterConfig = masterConfig;
  274 + config.eleemployeeConfig = eleemployeeConfig;
  275 + config.elemachineConfig = elemachineConfig;
  276 + addState = await this.handleAdd(config, nextProps.app.currentPane.copyTo, true);
  277 + } else {
  278 + this.handleGetTeamData(masterConfig, eleemployeeConfig, elemachineConfig);
  279 + }
  280 + this.props.onSaveState({
  281 + masterConfig,
  282 + eleemployeeConfig,
  283 + eleemployeeColumn,
  284 + elemachineConfig,
  285 + elemachineColumn,
  286 + sId,
  287 + pageLoading: false,
  288 + ...addState,
  289 + });
  290 + }
  291 + if (commonUtils.isEmptyObject(jurgroupOldConfig) && formData.length > 0 && sModelsType === 'element/sftloginInfo') {
  292 + const sId = currentId !== undefined ? currentId : '';
  293 + /* 数据Id */
  294 + const masterConfig = formData.filter(item => !item.bGrd)[0];
  295 + /* bGrd代表是否是表格 */
  296 + const jurgroupConfig = formData.filter(item => item.bGrd && item.sTbName === 'sftlogininfojurisdictiongroup')[0];
  297 + const jurgroupColumn = commonFunc.getHeaderConfig(jurgroupConfig);
  298 + const customergroupConfig = formData.filter(item => item.bGrd && item.sTbName === 'sftlogininfocustomergroup')[0];
  299 + const customergroupColumn = commonFunc.getHeaderConfig(customergroupConfig);
  300 + const supplygroupConfig = formData.filter(item => item.bGrd && item.sTbName === 'sftlogininfosupplygroup')[0];
  301 + const supplygroupColumn = commonFunc.getHeaderConfig(supplygroupConfig);
  302 + const persongroupConfig = formData.filter(item => item.bGrd && item.sTbName === 'sftlogininfopersongroup')[0];
  303 + const persongroupColumn = commonFunc.getHeaderConfig(persongroupConfig);
  304 + const processgroupConfig = formData.filter(item => item.bGrd && item.sTbName === 'sftlogininfoprocessgroup')[0];
  305 + const processgroupColumn = commonFunc.getHeaderConfig(processgroupConfig);
  306 + const drivergroupConfig = formData.filter(item => item.bGrd && item.sTbName === 'sftlogininfodrivergroup')[0];
  307 + const drivergroupColumn = commonFunc.getHeaderConfig(drivergroupConfig); /* 司机查看权限 */
  308 +
  309 + const departgroupConfig = commonUtils.isNotEmptyArr(formData.filter(item => item.bGrd && item.sTbName === 'sftlogininfodepartgroup')) ?
  310 + formData.filter(item => item.bGrd && item.sTbName === 'sftlogininfodepartgroup')[0] : {};
  311 + let departgroupColumn = [];
  312 + if (commonUtils.isNotEmptyObject(departgroupConfig)) {
  313 + departgroupColumn = commonFunc.getHeaderConfig(departgroupConfig); /* 供应商查看权限 */
  314 + }
  315 +
  316 + const approveGroupConfig = formData.filter(item => item.bGrd && item.sTbName === 'sftlogininfojurisApprovalgroup')[0];
  317 + const approveGroupColumn = commonFunc.getHeaderConfig(approveGroupConfig); /* 审批组权限 */
  318 +
  319 + let addState = {};
  320 + if (sId === '') {
  321 + const config = {};
  322 + config.masterConfig = masterConfig;
  323 + config.jurgroupConfig = jurgroupConfig;
  324 + config.customergroupConfig = customergroupConfig;
  325 + config.supplygroupConfig = supplygroupConfig;
  326 + config.persongroupConfig = persongroupConfig;
  327 + config.processgroupConfig = processgroupConfig;
  328 + config.drivergroupConfig = drivergroupConfig;
  329 + config.departgroupConfig = departgroupConfig;
  330 + config.approveGroupConfig = approveGroupConfig;
  331 + addState = await this.handleAdd(config, nextProps.app.currentPane.copyTo, true);
  332 + } else {
  333 + const flag = undefined;
  334 + const isWait = true;
  335 + const params = await this.handleGetSflLoginData(masterConfig, jurgroupConfig, customergroupConfig, supplygroupConfig, persongroupConfig, processgroupConfig, drivergroupConfig, departgroupConfig, flag, isWait, undefined, { approveGroupConfig });
  336 + this.handleGetUserInfoData(params);
  337 + }
  338 + this.props.onSaveState({
  339 + masterConfig,
  340 + jurgroupConfig,
  341 + jurgroupColumn,
  342 + customergroupConfig,
  343 + customergroupColumn,
  344 + supplygroupConfig,
  345 + supplygroupColumn,
  346 + persongroupConfig,
  347 + persongroupColumn,
  348 + processgroupConfig,
  349 + processgroupColumn,
  350 + drivergroupConfig,
  351 + drivergroupColumn,
  352 + departgroupConfig,
  353 + departgroupColumn,
  354 + approveGroupConfig,
  355 + approveGroupColumn,
  356 + sId,
  357 + pageLoading: false,
  358 + ...addState,
  359 + });
  360 + }
  361 + if ((bReceived === undefined || !bReceived) && formData.length > 0 && sModelsType === 'system/sisformulaInfo') {
  362 + const sId = currentId !== undefined ? currentId : '';
  363 + const masterConfig = formData.filter(item => !item.bGrd && item.sTbName === 'sisformula')[0];
  364 + const paramConfig = formData.filter(item => item.bGrd && item.sTbName === 'sisformulaparam')[0];
  365 + let customizeParamConfig = commonUtils.isNotEmptyArr(formData.filter(item => item.bGrd && item.sTbName === 'sisformulacustomizeparam')) ? formData.filter(item => item.bGrd && item.sTbName === 'sisformulacustomizeparam')[0] : {};
  366 + /* 获取主表自定义列名为自定义变量配置 */
  367 + const customizeParamConfigNew = this.handleGetCustomizeParamConfig({}, customizeParamConfig);
  368 + if (commonUtils.isNotEmptyArr(customizeParamConfigNew.gdsconfigformslave)) {
  369 + customizeParamConfig = customizeParamConfigNew;
  370 + }
  371 +
  372 + this.handleGetSlaveData('Set', 'param', paramConfig);
  373 + let addState = {};
  374 +
  375 + const systemFunctionData = [];
  376 + systemFunctionData.push({ value: 'Max(round(变量,0))', sName: commonFunc.showMessage(app.commonConst, 'sysMaxInteger') });
  377 + systemFunctionData.push({ value: 'round(变量,小数位数)', sName: commonFunc.showMessage(app.commonConst, 'sysRounding') });
  378 + systemFunctionData.push({ value: 'Min(round(变量,0))', sName: commonFunc.showMessage(app.commonConst, 'sysMinInteger') });
  379 +
  380 + const bussinessFunctionData = [];
  381 + bussinessFunctionData.push({ value: '应收账款([客户名称])', sName: commonFunc.showMessage(app.commonConst, 'sysReceivable') });
  382 +
  383 + const customizeParamName = [];
  384 + const userParamName = [];
  385 + const addState1 = {};
  386 + if (sId === '') {
  387 + const config = {};
  388 + config.masterConfig = masterConfig;
  389 + config.paramConfig = paramConfig;
  390 + config.customizeParamConfig = customizeParamConfig;
  391 + addState = await this.handleAdd(config, nextProps.app.currentPane.copyTo, true);
  392 + } else {
  393 + this.handleGetSlaveData('One', undefined, masterConfig);
  394 + /* 通过sId找到列表跳转行数据 */
  395 +
  396 + let currentRecords = [];
  397 + if (commonUtils.isNotEmptyArr(nextProps.app.currentPane.currentRecord)) {
  398 + if (Array.isArray(nextProps.app.currentPane.currentRecord)) {
  399 + currentRecords = nextProps.app.currentPane.currentRecord;
  400 + } else {
  401 + currentRecords = [nextProps.app.currentPane.currentRecord];
  402 + }
  403 + } else {
  404 + currentRecords = [];
  405 + }
  406 + const currentRecordArr = commonUtils.isNotEmptyArr(currentRecords) ? currentRecords.filter(item => item.sId === sId) : [];
  407 + if (commonUtils.isNotEmptyArr(currentRecordArr) && currentRecordArr[0].sColTitleName) {
  408 + const currentRecord = currentRecordArr[0]; /* 找到列表选中行 */
  409 + /* 取自定义列名 */
  410 + const { sColTitleName } = currentRecord;
  411 + if (commonUtils.isJSON(sColTitleName) && Array.isArray(JSON.parse(sColTitleName))) { // Array格式
  412 + JSON.parse(sColTitleName).forEach((config, index) => {
  413 + const paramIndex = index === 0 ? '' : index;
  414 + const customizePanelName = config.panelName ? config.panelName : `变量设置${paramIndex}`;
  415 + addState1[`customizePanelName${paramIndex}`] = customizePanelName;
  416 + let customizeParamConfigNew = this.handleGetCustomizeParamConfig(currentRecord, config, index);
  417 + customizeParamConfigNew = { ...customizeParamConfig, ...customizeParamConfigNew };
  418 + if (commonUtils.isNotEmptyArr(customizeParamConfigNew.gdsconfigformslave)) {
  419 + customizeParamName.push(`customizeParam${paramIndex}`);
  420 + userParamName.push(`userParam${paramIndex}`);
  421 + addState1[`customizeParam${paramIndex}Config`] = customizeParamConfigNew;
  422 + }
  423 + });
  424 + addState1.customizeParamName = customizeParamName;
  425 + addState1.userParamName = userParamName;
  426 + } else {
  427 + const customizeParamConfigNew = this.handleGetCustomizeParamConfig(currentRecord, customizeParamConfig);
  428 + if (commonUtils.isNotEmptyStr(customizeParamConfig.panelName)) {
  429 + addState1.customizePanelName = customizeParamConfig.panelName;
  430 + }
  431 + if (commonUtils.isNotEmptyArr(customizeParamConfigNew.gdsconfigformslave)) {
  432 + customizeParamConfig = customizeParamConfigNew;
  433 + }
  434 + }
  435 + }
  436 + if (commonUtils.isNotEmptyObject(customizeParamConfig)) {
  437 + this.handleGetSlaveData('customizeParam', 'customizeParam', customizeParamConfig);
  438 + }
  439 + }
  440 +
  441 + let customizeParamColumn = [];
  442 + let userParamConfig = {};
  443 + let userParamColumn = [];
  444 + if (commonUtils.isNotEmptyArr(customizeParamName)) {
  445 + customizeParamName.forEach((paramName, index) => {
  446 + const config = addState1[`${paramName}Config`];
  447 + if (commonUtils.isNotEmptyObject(config)) {
  448 + addState1[`${paramName}Column`] = commonFunc.getHeaderConfig(config);
  449 +
  450 + const userParamConfig = JSON.parse(JSON.stringify(config));
  451 + addState1[`${userParamName[index]}Config`] = userParamConfig;
  452 + if (commonUtils.isNotEmptyArr(userParamConfig.gdsconfigformslave)) {
  453 + userParamConfig.gdsconfigformslave.forEach((item) => {
  454 + if (item.sName.indexOf('sValue') === -1) { /* 除了参数值 其他均不可修改 */
  455 + item.iTag = 1;
  456 + }
  457 + if (item.sName === 'sParam') {
  458 + item.bVisible = false;
  459 + }
  460 + });
  461 + }
  462 + addState1[`${userParamName[index]}Column`] = commonFunc.getHeaderConfig(userParamConfig);
  463 + }
  464 + });
  465 + } else {
  466 + if (commonUtils.isNotEmptyObject(customizeParamConfig)) {
  467 + customizeParamColumn = commonFunc.getHeaderConfig(customizeParamConfig);
  468 + }
  469 + /* 用户模式 只有参数值可以修改 其他均不可修改 参数名不可见 */
  470 + userParamColumn = customizeParamColumn;
  471 + if (commonUtils.isNotEmptyObject(customizeParamConfig)) {
  472 + userParamConfig = JSON.parse(JSON.stringify(customizeParamConfig));
  473 + if (commonUtils.isNotEmptyArr(userParamConfig.gdsconfigformslave)) {
  474 + userParamConfig.gdsconfigformslave.forEach((item) => {
  475 + if (item.sName.indexOf('sValue') === -1) { /* 除了参数值 其他均不可修改 */
  476 + item.iTag = 1;
  477 + }
  478 + if (item.sName === 'sParam') {
  479 + item.bVisible = false;
  480 + }
  481 + });
  482 + }
  483 + userParamColumn = commonFunc.getHeaderConfig(userParamConfig);
  484 + }
  485 + }
  486 +
  487 +
  488 + bReceived = true;
  489 + this.props.onSaveState({
  490 + masterConfig,
  491 + paramConfig,
  492 + customizeParamConfig,
  493 + customizeParamColumn,
  494 + userParamConfig,
  495 + userParamColumn,
  496 + sId,
  497 + systemFunctionData,
  498 + bussinessFunctionData,
  499 + bReceived,
  500 + pageLoading: false,
  501 + ...addState,
  502 + ...addState1,
  503 + });
  504 + }
  505 + if ((bReceived === undefined || !bReceived) && formData.length > 0 && sModelsType === 'element/machineInfo') {
  506 + const sId = currentId !== undefined ? currentId : '';
  507 + const masterConfig = formData.filter(item => !item.bGrd && item.sTbName === 'elemachine')[0];
  508 + let addState = {};
  509 + let slaveConfig = {};
  510 + let slaveColumn = [];
  511 + let iPlcNoConfig = {};
  512 + let slave0Config = {};
  513 + let slave0Column = [];
  514 + const addState2 = {};
  515 + const memoDataList = [];
  516 + const slaveInfoList = [];
  517 + const filterSlaveData = formData.filter(item => item.sTbName !== 'sysbillcheckresult' && item.bGrd && item.bGrdVisible);
  518 + if (commonUtils.isNotEmptyArr(filterSlaveData)) {
  519 + filterSlaveData.forEach((config, index) => {
  520 + if (index > 1) {
  521 + const slaveName = `slave${index === 0 ? '' : index - 1}`;
  522 + if (index !== 0) {
  523 + addState2[`${slaveName}Config`] = config;
  524 + addState2[`${slaveName}Column`] = commonFunc.getHeaderConfig(config);
  525 + memoDataList.push({
  526 + name: slaveName,
  527 + config,
  528 + });
  529 + slaveInfoList.push(slaveName);
  530 + }
  531 + }
  532 + });
  533 + }
  534 + addState.slaveInfoList = slaveInfoList;
  535 + addState.memoDataList = memoDataList;
  536 + addState = { ...addState, ...addState2 };
  537 +
  538 + iPlcNoConfig = commonUtils.isNotEmptyObject(masterConfig.gdsconfigformslave) ? masterConfig.gdsconfigformslave.filter(item => item.bVisible && item.sName === 'iPlcNo')[0] : {};
  539 + if (commonUtils.isNotEmptyObject(iPlcNoConfig)) {
  540 + slaveConfig = formData.filter(item => item.bGrd && item.sTbName === 'plc_currentmachinevalue')[0];
  541 + slaveColumn = commonFunc.getHeaderConfig(slaveConfig);
  542 + }
  543 + const slave0FilterData = formData.filter(item => item.bGrd && item.sTbName === 'eleprocessmachinesinstallarea');
  544 + if (commonUtils.isNotEmptyArr(slave0FilterData)) {
  545 + slave0Config = slave0FilterData[0];
  546 + slave0Column = commonFunc.getHeaderConfig(slave0Config);
  547 + }
  548 + if (sId === '') {
  549 + const config = {};
  550 + config.masterConfig = masterConfig;
  551 + addState = await this.handleAdd(config, nextProps.app.currentPane.copyTo, true);
  552 + } else {
  553 + // this.handleGetSlaveData('One', null, masterConfig);
  554 + const addStateConfig = {
  555 + slave0: slave0Config,
  556 + };
  557 + if (commonUtils.isNotEmptyArr(memoDataList)) {
  558 + memoDataList.forEach((item) => {
  559 + addStateConfig[item.name] = item.config;
  560 + });
  561 + }
  562 + this.handleGetSlaveData('One', null, masterConfig, slaveConfig, iPlcNoConfig, false, addStateConfig);
  563 + }
  564 + bReceived = true;
  565 + this.props.onSaveState({
  566 + bReceived,
  567 + expand: true,
  568 + masterConfig,
  569 + slaveConfig,
  570 + slaveColumn,
  571 + slave0Config,
  572 + slave0Column,
  573 + iPlcNoConfig,
  574 + sId,
  575 + pageLoading: false,
  576 + ...addState,
  577 + });
  578 + }
  579 + if (commonUtils.isEmptyObject(userOldConfig) && formData.length > 0 && sModelsType === 'element/checkModelInfo') {
  580 + const sId = currentId !== undefined ? currentId : '';
  581 + /* 数据Id */
  582 + const masterConfig = formData.filter(item => !item.bGrd && item.sTbName === 'elecheckmodel')[0];
  583 + /* bGrd代表是否是表格 */
  584 + const userConfig = formData.filter(item => item.bGrd && item.sTbName === 'elecheckmodeluser')[0];
  585 + const userColumn = commonFunc.getHeaderConfig(userConfig);
  586 + const phaseConfig = formData.filter(item => item.bGrd && item.sTbName === 'elecheckmodelphase')[0];
  587 + const phaseColumn = commonFunc.getHeaderConfig(phaseConfig);
  588 + const conditionConfig = formData.filter(item => item.bGrd && item.sTbName === 'elecheckmodelcondition')[0];
  589 + const conditionColumn = commonFunc.getHeaderConfig(conditionConfig);
  590 + let addState = {};
  591 + if (sId === '') {
  592 + const config = {};
  593 + config.masterConfig = masterConfig;
  594 + config.userConfig = userConfig;
  595 + config.phaseConfig = phaseConfig;
  596 + config.conditionConfig = conditionConfig;
  597 + addState = await this.handleAdd(config, nextProps.app.currentPane.copyTo, true);
  598 + } else {
  599 + this.handleGetCheckModelData(masterConfig, userConfig, phaseConfig, conditionConfig);
  600 + }
  601 + this.props.onSaveState({
  602 + masterConfig,
  603 + userConfig,
  604 + userColumn,
  605 + phaseConfig,
  606 + phaseColumn,
  607 + conditionConfig,
  608 + conditionColumn,
  609 + sId,
  610 + pageLoading: false,
  611 + ...addState,
  612 + });
  613 + }
  614 + if (commonUtils.isEmptyObject(sischeckphaselogininfoOldConfig) && formData.length > 0 && sModelsType === 'element/checkPhaseInfo') {
  615 + const sId = currentId !== undefined ? currentId : '';
  616 + /* 数据Id */
  617 + const masterConfig = formData.filter(item => !item.bGrd && item.sTbName === 'sischeckphase')[0];
  618 + /* bGrd代表是否是表格 */
  619 + const sischeckphaselogininfoConfig = formData.filter(item => item.bGrd && item.sTbName === 'sischeckphaselogininfo')[0];
  620 + const sischeckphaselogininfoColumn = commonFunc.getHeaderConfig(sischeckphaselogininfoConfig);
  621 + let addState = {};
  622 + if (sId === '') {
  623 + const config = {};
  624 + config.masterConfig = masterConfig;
  625 + config.sischeckphaselogininfoConfig = sischeckphaselogininfoConfig;
  626 + addState = await this.handleAdd(config, nextProps.app.currentPane.copyTo, true);
  627 + } else {
  628 + this.handleGetCheckPhaseData(masterConfig, sischeckphaselogininfoConfig);
  629 + }
  630 + this.props.onSaveState({
  631 + masterConfig,
  632 + sischeckphaselogininfoConfig,
  633 + sischeckphaselogininfoColumn,
  634 + sId,
  635 + pageLoading: false,
  636 + ...addState,
  637 + });
  638 + }
  639 + if ((bReceived === undefined || !bReceived) && formData.length > 0 && sModelsType === 'sis/paymentTerms') {
  640 + const sId = currentId !== undefined ? currentId : '';
  641 + const masterConfig = formData.filter(item => !item.bGrd && item.sTbName === 'sispayment')[0];
  642 +
  643 + const firstRow = masterConfig.gdsconfigformslave.filter(item => item.bVisible && item.sName === 'sName');
  644 + const secondRow = masterConfig.gdsconfigformslave.filter(item => item.bVisible && item.sName === 'sType');
  645 + masterConfig.rowGdsconfig = [{ gdsconfigformslave: firstRow }, { gdsconfigformslave: secondRow }];
  646 +
  647 + let addState = {};
  648 + if (sId === '') {
  649 + const config = {};
  650 + config.masterConfig = masterConfig;
  651 + addState = await this.handleAdd(config, nextProps.app.currentPane.copyTo, true);
  652 + } else {
  653 + this.handleGetSlaveData('One', null, masterConfig);
  654 + }
  655 + bReceived = true;
  656 + this.props.onSaveState({
  657 + bReceived,
  658 + expand: true,
  659 + masterConfig,
  660 + sId,
  661 + pageLoading: false,
  662 + ...addState,
  663 + });
  664 + }
  665 + if (commonUtils.isEmptyObject(employeeConfig) && formData.length > 0 && sModelsType === 'element/employeeInfo') {
  666 + const sId = currentId !== undefined ? currentId : '';
  667 + /* 数据Id */
  668 + const masterConfig = formData.filter(item => !item.bGrd)[0];
  669 + /* bGrd代表是否是表格 */
  670 + employeeConfig = masterConfig;
  671 + let addState = {};
  672 + if (sId === '') {
  673 + const config = {};
  674 + config.masterConfig = masterConfig;
  675 + addState = await this.handleAdd(config, nextProps.app.currentPane.copyTo, true);
  676 + } else {
  677 + this.handleGetEleemployeeData(masterConfig);
  678 + }
  679 + this.props.onSaveState({
  680 + masterConfig,
  681 + employeeConfig,
  682 + sId,
  683 + pageLoading: false,
  684 + ...addState,
  685 + });
  686 + }
  687 + if (formData.length > 0 && commonUtils.isEmptyObject(sysmsguserOldConfig) && sModelsType === 'smg/sendMailMsg') {
  688 + const sId = currentId !== undefined ? currentId : '';
  689 + /* 数据Id */
  690 + const masterConfig = formData.filter(item => !item.bGrd)[0];
  691 +
  692 + const sysmsguserConfig = formData.filter(item => item.bGrd && item.sTbName === 'sysmsguser')[0];
  693 + const sysmsguserColumn = commonFunc.getHeaderConfig(sysmsguserConfig);
  694 + let addState = {};
  695 + if (sId === '') {
  696 + const config = {};
  697 + config.masterConfig = masterConfig;
  698 + config.sysmsguserConfig = sysmsguserConfig;
  699 + addState = await this.handleAdd(config, nextProps.app.currentPane.copyTo, true);
  700 + } else {
  701 + this.handleGetSysMsgData(masterConfig, sysmsguserConfig);
  702 + // this.handleGetSlaveData('One', null, masterConfig);
  703 + }
  704 +
  705 + this.props.onSaveState({
  706 + masterConfig,
  707 + sysmsguserConfig,
  708 + sysmsguserColumn,
  709 + sId,
  710 + pageLoading: false,
  711 + ...addState,
  712 + });
  713 + }
  714 + if (formData.length > 0 && commonUtils.isEmptyObject(masterConfig) && sModelsType === 'sis/monthEndingClosing') {
  715 + const sId = currentId !== undefined ? currentId : '';
  716 + masterConfig = formData.filter(item => !item.bGrd)[0];
  717 +
  718 + const firstRow = masterConfig.gdsconfigformslave[0];
  719 + const secondRow = masterConfig.gdsconfigformslave[1];
  720 + masterConfig.rowGdsconfig = [
  721 + { gdsconfigformslave: [{ ...firstRow }] },
  722 + { gdsconfigformslave: [{ ...secondRow }] },
  723 + ];
  724 +
  725 + let addState = {};
  726 + if (sId === '') {
  727 + const config = {};
  728 + config.masterConfig = masterConfig;
  729 + addState = await this.handleAdd(config, nextProps.app.currentPane.copyTo, true);
  730 + }
  731 + this.props.onSaveState({
  732 + masterConfig, sId, pageLoading: false, ...addState,
  733 + });
  734 + }
  735 + /* 刀模信息 */
  736 + if (commonUtils.isEmptyObject(eleknifemouldOldproductConfig) && formData.length > 0 && sModelsType === 'element/knifemouldInfo') {
  737 + const sId = currentId !== undefined ? currentId : '';
  738 + /* 数据Id */
  739 + const masterConfig = formData.filter(item => !item.bGrd)[0];
  740 + /* bGrd代表是否是表格 */
  741 + const eleknifemouldproductConfig = formData.length > 0 ? formData.filter(item => item.bGrd)[0] : {};
  742 + let eleknifemouldproductColumn = [];
  743 + if (commonUtils.isNotEmptyObject(eleknifemouldproductConfig)) {
  744 + eleknifemouldproductColumn = commonFunc.getHeaderConfig(eleknifemouldproductConfig);
  745 + }
  746 + const eleknifemouldfileConfig = formData.length > 1 ? formData.filter(item => item.bGrd)[1] : {};
  747 + let eleknifemouldfileColumn = [];
  748 + if (commonUtils.isNotEmptyObject(eleknifemouldfileConfig)) {
  749 + eleknifemouldfileColumn = commonFunc.getHeaderConfig(eleknifemouldfileConfig);
  750 + }
  751 + let addState = {};
  752 + if (sId === '') {
  753 + const config = {};
  754 + config.masterConfig = masterConfig;
  755 + config.eleknifemouldproductConfig = eleknifemouldproductConfig;
  756 + config.elekinfemouldfileConfig = eleknifemouldfileConfig;
  757 + addState = await this.handleAdd(config, nextProps.app.currentPane.copyTo, true);
  758 + } else {
  759 + this.handleGetEleKnifeMouldData(masterConfig, eleknifemouldproductConfig, eleknifemouldfileConfig);
  760 + }
  761 + this.props.onSaveState({
  762 + masterConfig,
  763 + eleknifemouldproductConfig,
  764 + eleknifemouldproductColumn,
  765 + eleknifemouldfileConfig,
  766 + eleknifemouldfileColumn,
  767 + sId,
  768 + pageLoading: false,
  769 + ...addState,
  770 + });
  771 + }
  772 + /* 检验标准 */
  773 + if (commonUtils.isEmptyObject(eleteststandardOlditemConfig) && formData.length > 0 && sModelsType === 'element/eleteststandInfo') {
  774 + const sId = currentId !== undefined ? currentId : '';
  775 + /* 数据Id */
  776 + const masterConfig = formData.filter(item => !item.bGrd)[0];
  777 + /* bGrd代表是否是表格 */
  778 + const eleteststandarditemConfig = formData.filter(item => item.bGrd && item.sTbName === 'EleTestStandardItem')[0];
  779 + const eleteststandarditemColumn = commonFunc.getHeaderConfig(eleteststandarditemConfig);
  780 + let addState = {};
  781 + if (sId === '') {
  782 + const config = {};
  783 + config.masterConfig = masterConfig;
  784 + config.eleteststandarditemConfig = eleteststandarditemConfig;
  785 + addState = await this.handleAdd(config, nextProps.app.currentPane.copyTo, true);
  786 + } else {
  787 + this.handleGetTestStandData(masterConfig, eleteststandarditemConfig);
  788 + }
  789 + this.props.onSaveState({
  790 + masterConfig,
  791 + eleteststandarditemConfig,
  792 + eleteststandarditemColumn,
  793 + sId,
  794 + pageLoading: false,
  795 + ...addState,
  796 + });
  797 + }
  798 + }
  799 +
  800 + shouldComponentUpdate(nextProps, nextState) {
  801 + const { masterConfig } = nextProps;
  802 + let flag = true;
  803 + /* 追加弹出框数值回填放行判断ppopupPane */
  804 + if (nextProps.sTabId === nextProps.app.currentPane.key || ((nextProps.app.ppopupPane !== undefined
  805 + && nextProps.app.ppopupPane.mainConfig !== undefined)
  806 + ? nextProps.sTabId === nextProps.app.ppopupPane.mainConfig.key : false)) {
  807 + if (nextState.disabled !== this.state.disabled) {
  808 + return true;
  809 + }
  810 + flag = true;
  811 + if (commonUtils.isNotEmptyObject(masterConfig)) {
  812 + flag = true;
  813 + } else {
  814 + flag = false;
  815 + }
  816 + } else {
  817 + flag = false;
  818 + }
  819 + return flag;
  820 + }
  821 +
  822 + componentWillUpdate(nextProps) {
  823 + const {
  824 + masterData, sModelsType, elemachineData, contactData, addressData, masterConfig, sysmsguserData,
  825 + } = nextProps;
  826 + const sendSocketMessage = this.props.handleSendSocketMessage;
  827 + if (sModelsType === 'element/teamInfo' && masterData !== undefined) {
  828 + if (commonUtils.isNotEmptyObject(elemachineData)) {
  829 + elemachineData.forEach((row, index) => {
  830 + const addState = {};
  831 + if (row.sMachineId === masterData.sMachineId) {
  832 + addState.bDefault = true;
  833 + } else {
  834 + addState.bDefault = false;
  835 + }
  836 + elemachineData[index] = { ...elemachineData[index], ...addState };
  837 + });
  838 + }
  839 + } else if (sModelsType === 'element/eleteststandInfo' && masterData !== undefined) { /* 检验类型为工序检验时,工序名称出现 */
  840 + const { sTestType } = masterData;
  841 + const iIndex = masterConfig.gdsconfigformslave.findIndex(item => item.sName === 'sProcessName');
  842 + if (iIndex > -1) {
  843 + if (sTestType !== '2') {
  844 + masterConfig.gdsconfigformslave[iIndex].bVisible = false;
  845 + } else {
  846 + masterConfig.gdsconfigformslave[iIndex].bVisible = true;
  847 + }
  848 + }
  849 + } else if ((sModelsType === 'element/customerInfo' || sModelsType === 'element/supplyInfo') && masterData !== undefined) {
  850 + if (commonUtils.isNotEmptyObject(contactData)) {
  851 + contactData.forEach((row, index) => {
  852 + const addState = {};
  853 + if (row.sContacts === masterData.sContacts) {
  854 + addState.bDefault = true;
  855 + } else {
  856 + addState.bDefault = false;
  857 + }
  858 + contactData[index] = { ...contactData[index], ...addState };
  859 + });
  860 + }
  861 + if (commonUtils.isNotEmptyObject(addressData)) {
  862 + addressData.forEach((row, index) => {
  863 + const addState = {};
  864 + if (row.csProvince_sCity_sArea === masterData.csProvince_sCity_sArea && (row.sDetailAddress === masterData.sCompanyAddress || (row.sDetailAddress === undefined && masterData.sCompanyAddress === ''))) {
  865 + addState.bDefault = true;
  866 + } else {
  867 + addState.bDefault = false;
  868 + }
  869 + addressData[index] = { ...addressData[index], ...addState };
  870 + });
  871 + }
  872 + } else if (sModelsType === 'system/sisformulaInfo' && commonUtils.isNotEmptyObject(masterData)) {
  873 + masterData.sFormulaMemo = masterData.sFormula;
  874 + const iIndex = masterConfig.gdsconfigformslave.findIndex(item => item.sName === 'sColTitleName');
  875 + const iIndexBtn = masterConfig.gdsconfigformslave.findIndex(item => item.sControlName === 'BtnConfigCustomizeParam');
  876 + masterData.bUserModel = nextProps.bUserModel;
  877 + if (masterData.bUserModel === undefined || !masterData.bUserModel) { /* 用户模式 */
  878 + if (iIndex > -1) { /* 用户模式:不显示自定义类名 */
  879 + masterConfig.gdsconfigformslave[iIndex].bVisible = false;
  880 + }
  881 + if (iIndexBtn > -1) { /* 用户模式:不显示生成列配置按钮 */
  882 + masterConfig.gdsconfigformslave[iIndexBtn].bVisible = false;
  883 + }
  884 + } else if (masterData.bUserModel) { /* 开发者模式 */
  885 + if (iIndex > -1) { /* 显示自定义类名 */
  886 + masterConfig.gdsconfigformslave[iIndex].bVisible = true;
  887 + }
  888 + if (iIndexBtn > -1) { /* 显示生成列配置按钮 */
  889 + masterConfig.gdsconfigformslave[iIndexBtn].bVisible = true;
  890 + }
  891 + }
  892 + } else if (sModelsType === 'sis/paymentTerms' && commonUtils.isNotEmptyObject(masterData)) {
  893 + const { rowGdsconfig } = masterConfig;
  894 + if (commonUtils.isNotEmptyArr(rowGdsconfig) && rowGdsconfig.length === 2) {
  895 + if (masterData.sType === 'deliver') {
  896 + const rows = {};
  897 + const threeRows = masterConfig.gdsconfigformslave.filter(item => item.bVisible && item.sName === 'iAfterDeliverDay');
  898 + rows.gdsconfigformslave = threeRows;
  899 + rowGdsconfig.push(rows);
  900 + this.props.onSaveState({ masterConfig });
  901 + } else if (masterData.sType === 'month') {
  902 + const rows = {};
  903 + const threeRows = masterConfig.gdsconfigformslave.filter(item => item.bVisible && (item.sName === 'iMonth' || item.sName === 'iDay'));
  904 + rows.gdsconfigformslave = threeRows;
  905 + rowGdsconfig.push(rows);
  906 + this.props.onSaveState({ masterConfig });
  907 + }
  908 + }
  909 + } else if (sModelsType === 'smg/sendMailMsg' && commonUtils.isNotEmptyArr(sysmsguserData) && commonUtils.isNotEmptyObject(masterData) && commonUtils.isEmptyObject(masterData.sUserIds)) {
  910 + const { app } = this.props;
  911 + const { userinfo } = app;
  912 + const userId = [];
  913 + sysmsguserData.forEach((tableDataRow) => {
  914 + userId.push(tableDataRow.sUserId);
  915 + });
  916 + masterData.sUserIds = userId;
  917 + sendSocketMessage('msgRead', 'noAction', masterData.sId, userinfo.sId, null, null);
  918 + if (this.props.app.currentPane.refresh !== undefined) {
  919 + this.props.app.currentPane.refresh();
  920 + }
  921 + } else if (sModelsType === 'element/materialsInfo' && commonUtils.isNotEmptyObject(masterData)) {
  922 + const { sMaterialsType } = masterData;
  923 + const iIndex = masterConfig.gdsconfigformslave.findIndex(item => item.sName === 'dGramWeight');
  924 + if (sMaterialsType === 'paper') { /* 物料类别为纸张的时候,克重必填 */
  925 + masterConfig.gdsconfigformslave[iIndex].bNotEmpty = true;
  926 + } else {
  927 + masterConfig.gdsconfigformslave[iIndex].bNotEmpty = false;
  928 + }
  929 + }
  930 + // else if (sModelsType === 'element/sisproductclassify' && commonUtils.isNotEmptyObject(masterData)) {
  931 + // const { sAllPartsName } = masterData;
  932 + // this.handleChangeProductParteName(sAllPartsName);
  933 + // }
  934 + }
  935 + handleGetTableConfig = async (name, sModelsId) => {
  936 + if (commonUtils.isNotEmptyObject(sModelsId)) {
  937 + const newConfig = await this.props.onGetTableConfig(name, sModelsId);
  938 + if (commonUtils.isNotEmptyObject(newConfig)) {
  939 + this.props.onSaveState({ [`${[name]}Config`]: newConfig });
  940 + }
  941 + }
  942 + }
  943 + handleViewClick = (name, sName, record, index, myConfig) => {
  944 + if (sName === 'myTableConfig') {
  945 + this.handleQuickViewClick(name, sName, record, index, myConfig);
  946 + } else {
  947 + this.props.onViewClick(name, sName, record, index, myConfig);
  948 + }
  949 + }
  950 + handleQuickViewClick = async (name, sName, record, index, myConfigArr) => {
  951 + const {
  952 + slaveData,
  953 + // dispatch,
  954 + slaveFilterCondition,
  955 + slavePagination,
  956 + // slaveOrderBy,
  957 + // sModelsType,
  958 + formRoute,
  959 + // treeFilterCondition,
  960 + // app,
  961 + // iPageSize,
  962 + sModelsId,
  963 + // slaveSelectedData,
  964 + // masterData,
  965 + // employeeConfig,
  966 + } = this.props;
  967 +
  968 + let picArr = [];
  969 + if (commonUtils.isNotEmptyArr(myConfigArr)) {
  970 + picArr = myConfigArr;
  971 + }
  972 +
  973 + if (picArr.length > 0) {
  974 + const getConfig = this.handleGetTableConfig;
  975 + const tableDataRow = record;
  976 + const iIndex = index;
  977 + const [{ sActiveId }] = picArr;
  978 + let [{ sActiveKey }] = picArr;
  979 + const sFormId = sActiveId === '1' ? commonUtils.isEmpty(tableDataRow.sFormId) ? tableDataRow.sSrcFormId : tableDataRow.sFormId : sActiveId;
  980 + if (commonUtils.isNotEmptyObject(sActiveKey) && sActiveKey.includes('.')) { /* 接口按钮跳转 如果有slave.对应字段 则需要取出对应字段 */
  981 + const index = sActiveKey.lastIndexOf('.');
  982 + sActiveKey = sActiveKey.substring(index + 1, sActiveKey.length);
  983 + }
  984 + const sNameUrl = `${commonConfig.server_host}gdsmodule/getGdsmoduleById/${sFormId}?sModelsId=${sFormId}&sName=${formRoute}`;
  985 + const filterCondition = [];
  986 + const conditionValues = this.props.getSqlCondition(picArr[0], name, tableDataRow);
  987 + if (!commonUtils.isEmpty(conditionValues)) {
  988 + Object.keys(conditionValues).forEach((item) => {
  989 + if ((item === 'tStartDate_pro' || item.substring(0, 1) === 'p')) {
  990 + if (!commonUtils.isEmpty(conditionValues[item]) && conditionValues[item].length >= 2) {
  991 + const tStartDate = moment(conditionValues[item][0]).format(this.sDateFormat);
  992 + const tEndDate = moment(conditionValues[item][1]).add(1, 'days').format(this.sDateFormat);
  993 + filterCondition.push({
  994 + bFilterName: item,
  995 + bFilterCondition: '=',
  996 + bFilterValue: `${tStartDate},${tEndDate}`,
  997 + });
  998 + }
  999 + } else if ((item === 'mStartDate_pro' || item.substring(0, 1) === 'm')) {
  1000 + if (!commonUtils.isEmpty(conditionValues[item])) {
  1001 + const tStartDate = moment(conditionValues[item]).startOf('month').format(this.sDateFormat);
  1002 + const tEndDate = moment(conditionValues[item]).endOf('month').add(1, 'days').format(this.sDateFormat);
  1003 + filterCondition.push({
  1004 + bFilterName: `t${item.substring(1, item.length)}`,
  1005 + bFilterCondition: '=',
  1006 + bFilterValue: `${tStartDate},${tEndDate}`,
  1007 + });
  1008 + }
  1009 + } else if (item.substring(0, 1) === 't') {
  1010 + filterCondition.push({
  1011 + bFilterName: item,
  1012 + bFilterCondition: '=',
  1013 + bFilterValue: moment(conditionValues[item]).format(this.sDateFormat),
  1014 + });
  1015 + } else {
  1016 + filterCondition.push({
  1017 + bFilterName: item,
  1018 + bFilterCondition: '=',
  1019 + bFilterValue: conditionValues[item],
  1020 + });
  1021 + }
  1022 + });
  1023 + }
  1024 + this.props.dispatch({
  1025 + type: 'content/onRouter',
  1026 + payload: {
  1027 + url: sNameUrl,
  1028 + refresh: getConfig.bind(this, name, sModelsId), /* 刷新方法 */
  1029 + sTabId: commonUtils.createSid(),
  1030 + sParentId: this.state.sTabId,
  1031 + urlDataType: 'newPane',
  1032 + checkedId: myConfigArr[0].sId,
  1033 + sName: myConfigArr[0].sName,
  1034 + bFilter: slaveFilterCondition,
  1035 + pageSize: commonConfig.pageSize,
  1036 + pages: slavePagination,
  1037 + currentData: slaveData,
  1038 + conditonValues: conditionValues,
  1039 + newKey: tableDataRow[sActiveKey],
  1040 + currentIndex: iIndex,
  1041 + filterCondition,
  1042 + },
  1043 + });
  1044 + }
  1045 + };
  1046 + /** 获取主表、联系人、地址表数据 */
  1047 + handleGetData = (masterConfig, contactConfig, addressConfig, bEditClick) => {
  1048 + const { currentId } = this.props;
  1049 + /* 当前页签数据 */
  1050 + const sId = currentId !== undefined ? currentId : '';
  1051 + this.props.handleGetDataOne({
  1052 + name: 'master', configData: masterConfig, condition: { sId, pageSize: '', pageNum: '' }, bEditClick,
  1053 + });
  1054 + this.props.handleGetDataSet({
  1055 + name: 'contact', configData: contactConfig, condition: { sSqlCondition: { sParentId: sId } },
  1056 + });
  1057 + this.props.handleGetDataSet({
  1058 + name: 'address', configData: addressConfig, condition: { sSqlCondition: { sParentId: sId } },
  1059 + });
  1060 + };
  1061 + handleGetSflLoginDataAll = async (masterConfig, jurgroupConfig, customergroupConfig, supplygroupConfig, persongroupConfig, processgroupConfig, drivergroupConfig, departgroupConfig, { approveGroupConfig }) => {
  1062 + const flag = undefined;
  1063 + const isWait = true;
  1064 + const params = await this.handleGetSflLoginData(masterConfig, jurgroupConfig, customergroupConfig, supplygroupConfig, persongroupConfig, processgroupConfig, drivergroupConfig, departgroupConfig, flag, isWait, undefined, { approveGroupConfig });
  1065 + this.handleGetUserInfoData(params);
  1066 + };
  1067 + /** 获取印件分类主表、从表 */
  1068 + handleGetProductclassifyData = async (masterConfig, sisproductclassifyProcessClassifyConfig, bEditClick) => {
  1069 + const { currentId } = this.props;
  1070 + /* 当前页签数据 */
  1071 + const sId = currentId !== undefined ? currentId : '';
  1072 + const addState = await this.props.handleGetDataOne({
  1073 + name: 'master', configData: masterConfig, condition: { sId, pageSize: '', pageNum: '' }, isWait: true, bEditClick,
  1074 + });
  1075 + const addStateSlave = await this.props.handleGetDataSet({
  1076 + name: 'sisproductclassifyProcessClassify', configData: sisproductclassifyProcessClassifyConfig, condition: { sSqlCondition: { sParentId: sId } }, isWait: true,
  1077 + });
  1078 + const { sAllPartsName } = addState.masterData;
  1079 + if (commonUtils.isNotEmptyObject(sAllPartsName)) {
  1080 + addState.sisproductclassifyProcessClassifyConfig = this.handleChangeProductParteName(sAllPartsName);
  1081 + } else {
  1082 + addState.sisproductclassifyProcessClassifyConfig = sisproductclassifyProcessClassifyConfig;
  1083 + }
  1084 + this.props.onSaveState({ ...addState, ...addStateSlave });
  1085 + };
  1086 +
  1087 + /** 获取主表、图片文件、仓库表数据 */
  1088 + handleGetPrintData = (masterConfig, picFileConfig, stockConfig, customerInfoConfig, bEditClick) => {
  1089 + const { currentId } = this.props;
  1090 + /* 当前页签数据 */
  1091 + const sId = currentId !== undefined ? currentId : '';
  1092 + this.props.handleGetDataOne({
  1093 + name: 'master', configData: masterConfig, condition: { sId, pageSize: '', pageNum: '' }, bEditClick,
  1094 + });
  1095 + this.props.handleGetDataSet({
  1096 + name: 'picFile', configData: picFileConfig, condition: { sSqlCondition: { sParentId: sId } },
  1097 + });
  1098 + this.props.handleGetDataSet({
  1099 + name: 'stock', configData: stockConfig, condition: { sSqlCondition: { sParentId: sId } },
  1100 + });
  1101 + this.props.handleGetDataSet({
  1102 + name: 'customerInfo', configData: customerInfoConfig, condition: { sSqlCondition: { sParentId: sId } },
  1103 + });
  1104 + };
  1105 + /** 获取主表、制单日期、制单人数据 */
  1106 + handleGetStyleData = (masterConfig, siscommonstyleproductclassifyConfig, bEditClick) => {
  1107 + const { currentId } = this.props;
  1108 + /* 当前页签数据 */
  1109 + const sId = currentId !== undefined ? currentId : '';
  1110 + this.props.handleGetDataOne({
  1111 + name: 'master', configData: masterConfig, condition: { sId, pageSize: '', pageNum: '' }, bEditClick,
  1112 + });
  1113 + this.props.handleGetDataSet({
  1114 + name: 'siscommonstyleproductclassify', configData: siscommonstyleproductclassifyConfig, condition: { sSqlCondition: { sParentId: sId } },
  1115 + });
  1116 + };
  1117 + /** 获取主表、创建者、审核阶段、审核条件数据 */
  1118 + handleGetCheckModelData = (masterConfig, userConfig, phaseConfig, conditionConfig, bEditClick) => {
  1119 + const { currentId } = this.props;
  1120 + /* 当前页签数据 */
  1121 + const sId = currentId !== undefined ? currentId : '';
  1122 + this.props.handleGetDataOne({
  1123 + name: 'master', configData: masterConfig, condition: { sId, pageSize: '', pageNum: '' }, bEditClick,
  1124 + });
  1125 + this.props.handleGetDataSet({
  1126 + name: 'user', configData: userConfig, condition: { sSqlCondition: { sParentId: sId } },
  1127 + });
  1128 + this.props.handleGetDataSet({
  1129 + name: 'phase', configData: phaseConfig, condition: { sSqlCondition: { sParentId: sId } },
  1130 + });
  1131 + this.props.handleGetDataSet({
  1132 + name: 'condition', configData: conditionConfig, condition: { sSqlCondition: { sParentId: sId } },
  1133 + });
  1134 + };
  1135 + /** 获取员工数据 */
  1136 + handleGetEleemployeeData = (masterConfig, bEditClick) => {
  1137 + const { currentId } = this.props;
  1138 + /* 当前页签数据 */
  1139 + const sId = currentId !== undefined ? currentId : '';
  1140 + this.props.handleGetDataOne({
  1141 + name: 'master', configData: masterConfig, condition: { sId, pageSize: '', pageNum: '' }, bEditClick,
  1142 + });
  1143 + };
  1144 + /** 获取印件分类 */
  1145 + handleGetSisproductclassifyData = (masterConfig, sisproductclassifyProcessClassifyConfig, bEditClick) => {
  1146 + const { currentId } = this.props;
  1147 + /* 当前页签数据 */
  1148 + const sId = currentId !== undefined ? currentId : '';
  1149 + this.props.handleGetDataOne({
  1150 + name: 'master', configData: masterConfig, condition: { sId, pageSize: '', pageNum: '' }, bEditClick,
  1151 + });
  1152 + this.props.handleGetDataSet({
  1153 + name: 'sisproductclassifyProcessClassify', configData: sisproductclassifyProcessClassifyConfig, condition: { sSqlCondition: { sParentId: sId } },
  1154 + });
  1155 + };
  1156 + /** 获取主表、审核人员数据 */
  1157 + handleGetCheckPhaseData = (masterConfig, sischeckphaselogininfoConfig, bEditClick) => {
  1158 + const { currentId } = this.props;
  1159 + /* 当前页签数据 */
  1160 + const sId = currentId !== undefined ? currentId : '';
  1161 + this.props.handleGetDataOne({
  1162 + name: 'master', configData: masterConfig, condition: { sId, pageSize: '', pageNum: '' }, bEditClick,
  1163 + });
  1164 + this.props.handleGetDataSet({
  1165 + name: 'sischeckphaselogininfo', configData: sischeckphaselogininfoConfig, condition: { sSqlCondition: { sParentId: sId } },
  1166 + });
  1167 + };
  1168 +
  1169 + /** 获取主表、询价信息、仓库表数据 */
  1170 + handleGetMaterialsData = (masterConfig, supplyConfig, stockConfig, bEditClick) => {
  1171 + const { currentId } = this.props;
  1172 + /* 当前页签数据 */
  1173 + const sId = currentId !== undefined ? currentId : '';
  1174 + this.props.handleGetDataOne({
  1175 + name: 'master', configData: masterConfig, condition: { sId, pageSize: '', pageNum: '' }, bEditClick,
  1176 + });
  1177 + this.props.handleGetDataSet({
  1178 + name: 'supply', configData: supplyConfig, condition: { sSqlCondition: { sParentId: sId } },
  1179 + });
  1180 + this.props.handleGetDataSet({
  1181 + name: 'stock', configData: stockConfig, condition: { sSqlCondition: { sParentId: sId } },
  1182 + });
  1183 + };
  1184 +
  1185 + /** 获取用户信息数据 */
  1186 + handleGetSflLoginData = async (masterConfig, jurgroupConfig, customergroupConfig, supplygroupConfig, persongroupConfig, processgroupConfig, drivergroupConfig, departgroupConfig, flag, isWait, bEditClick, { approveGroupConfig }) => {
  1187 + const { currentId } = this.props;
  1188 + /* 当前页签数据 */
  1189 + const sId = currentId !== undefined ? currentId : '';
  1190 + const masterAddState = await this.props.handleGetDataOne({
  1191 + name: 'master', configData: masterConfig, condition: { sId, pageSize: '', pageNum: '' }, bEditClick, isWait,
  1192 + });
  1193 + const jurgroupAddState = await this.props.handleGetDataSet({
  1194 + name: 'jurgroup', configData: jurgroupConfig, condition: { sSqlCondition: { sParentId: sId } }, flag, isWait,
  1195 + });
  1196 + const customergroupAddState = await this.props.handleGetDataSet({
  1197 + name: 'customergroup', configData: customergroupConfig, condition: { sSqlCondition: { sParentId: sId } }, flag, isWait,
  1198 + });
  1199 + const supplygroupAddState = await this.props.handleGetDataSet({
  1200 + name: 'supplygroup', configData: supplygroupConfig, condition: { sSqlCondition: { sParentId: sId } }, flag, isWait,
  1201 + });
  1202 + const persongroupAddState = await this.props.handleGetDataSet({
  1203 + name: 'persongroup', configData: persongroupConfig, condition: { sSqlCondition: { sParentId: sId } }, flag, isWait,
  1204 + });
  1205 + const processgroupAddState = await this.props.handleGetDataSet({
  1206 + name: 'processgroup', configData: processgroupConfig, condition: { sSqlCondition: { sParentId: sId } }, flag, isWait,
  1207 + });
  1208 + const drivergroupAddState = await this.props.handleGetDataSet({
  1209 + name: 'drivergroup', configData: drivergroupConfig, condition: { sSqlCondition: { sParentId: sId } }, flag, isWait,
  1210 + });
  1211 + let departgroupAddState = {};
  1212 + if (commonUtils.isNotEmptyObject(departgroupConfig)) {
  1213 + departgroupAddState = await this.props.handleGetDataSet({
  1214 + name: 'departgroup', configData: departgroupConfig, condition: { sSqlCondition: { sParentId: sId } }, flag, isWait,
  1215 + });
  1216 + }
  1217 +
  1218 + const approveGroupAddState = await this.props.handleGetDataSet({
  1219 + name: 'approveGroup', configData: approveGroupConfig, condition: { sSqlCondition: { sParentId: sId } }, flag, isWait,
  1220 + });
  1221 +
  1222 + return {
  1223 + masterAddState, jurgroupAddState, customergroupAddState, supplygroupAddState, persongroupAddState, processgroupAddState, drivergroupAddState, departgroupAddState, approveGroupAddState,
  1224 + };
  1225 + };
  1226 +
  1227 + /** 获取用户信息初始数据 */
  1228 + handleGetUserInfoData = async (params) => {
  1229 + const {
  1230 + sModelsId, token, app,
  1231 + } = this.props;
  1232 + const dataUrl = `${commonConfig.server_host}userinfo/getUserInfoData/?sModelsId=${sModelsId}`;
  1233 + const dataReturn = (await commonServices.postValueService(token, { sParentId: app?.currentPane?.currentRecord?.[0]?.sId }, dataUrl)).data;
  1234 + if (dataReturn.code === 1) {
  1235 + const returnData = dataReturn.dataset.rows[0];
  1236 + const {
  1237 + masterAddState = {}, jurgroupAddState, customergroupAddState, supplygroupAddState, persongroupAddState, processgroupAddState, drivergroupAddState, departgroupAddState, approveGroupAddState,
  1238 + } = params;
  1239 + const { jurgroupData } = jurgroupAddState;
  1240 + const { customergroupData } = customergroupAddState;
  1241 + const { supplygroupData } = supplygroupAddState;
  1242 + const { persongroupData } = persongroupAddState;
  1243 + const { processgroupData } = processgroupAddState;
  1244 + const { drivergroupData } = drivergroupAddState;
  1245 + const { approveGroupData } = approveGroupAddState;
  1246 + let departgroupData = [];
  1247 + if (commonUtils.isNotEmptyObject(departgroupAddState)) {
  1248 + departgroupData = departgroupAddState.departgroupData;
  1249 + }
  1250 + const jurgroupSelectedRowKeys = [];
  1251 + const customergroupSelectedRowKeys = [];
  1252 + const supplygroupSelectedRowKeys = [];
  1253 + const persongroupSelectedRowKeys = [];
  1254 + const processgroupSelectedRowKeys = [];
  1255 + const drivergroupSelectedRowKeys = [];
  1256 + const departgroupSelectedRowKeys = [];
  1257 + const approveGroupSelectedRowKeys = [];
  1258 + const jurgroupAllData = returnData.jurgroupData;
  1259 + const customergroupAllData = returnData.customergroupData;
  1260 + const supplygroupAllData = returnData.supplygroupData;
  1261 + const persongroupAllData = returnData.persongroupData;
  1262 + const processgroupAllData = returnData.processgroupData;
  1263 + const drivergroupAllData = returnData.drivergroupData;
  1264 + const departgroupAllData = returnData.departgroupData;
  1265 + const approveGroupAllData = returnData.sApprovalprocessData;
  1266 + if (commonUtils.isNotEmptyArr(jurgroupAllData)) {
  1267 + for (const itemAll of jurgroupAllData) {
  1268 + if (commonUtils.isNotEmptyArr(jurgroupData)) {
  1269 + for (const item of jurgroupData) {
  1270 + if (item.sJurisdictionClassifyId === itemAll.sJurisdictionClassifyId) {
  1271 + jurgroupSelectedRowKeys.push(itemAll.sId);
  1272 + }
  1273 + }
  1274 + }
  1275 + }
  1276 + }
  1277 + if (commonUtils.isNotEmptyArr(customergroupAllData)) {
  1278 + for (const itemAll of customergroupAllData) {
  1279 + if (commonUtils.isNotEmptyArr(customergroupData)) {
  1280 + for (const item of customergroupData) {
  1281 + if (item.sSalesManId === itemAll.sSalesManId) {
  1282 + customergroupSelectedRowKeys.push(itemAll.sId);
  1283 + }
  1284 + }
  1285 + }
  1286 + }
  1287 + }
  1288 + if (commonUtils.isNotEmptyArr(supplygroupAllData)) {
  1289 + for (const itemAll of supplygroupAllData) {
  1290 + if (commonUtils.isNotEmptyArr(supplygroupData)) {
  1291 + for (const item of supplygroupData) {
  1292 + if (item.sPurchaseManId === itemAll.sPurchaseManId) {
  1293 + supplygroupSelectedRowKeys.push(itemAll.sId);
  1294 + }
  1295 + }
  1296 + }
  1297 + }
  1298 + }
  1299 + if (commonUtils.isNotEmptyArr(persongroupAllData)) {
  1300 + for (const itemAll of persongroupAllData) {
  1301 + if (commonUtils.isNotEmptyArr(persongroupData)) {
  1302 + for (const item of persongroupData) {
  1303 + if (item.sEmployeeId === itemAll.sEmployeeId) {
  1304 + persongroupSelectedRowKeys.push(itemAll.sId);
  1305 + }
  1306 + }
  1307 + }
  1308 + }
  1309 + }
  1310 + if (commonUtils.isNotEmptyArr(processgroupAllData)) {
  1311 + for (const itemAll of processgroupAllData) {
  1312 + if (commonUtils.isNotEmptyArr(processgroupData)) {
  1313 + for (const item of processgroupData) {
  1314 + if (item.sProcessClassifyId === itemAll.sProcessClassifyId) {
  1315 + processgroupSelectedRowKeys.push(itemAll.sId);
  1316 + }
  1317 + }
  1318 + }
  1319 + }
  1320 + }
  1321 + if (commonUtils.isNotEmptyArr(drivergroupAllData)) {
  1322 + for (const itemAll of drivergroupAllData) {
  1323 + if (commonUtils.isNotEmptyArr(drivergroupData)) {
  1324 + for (const item of drivergroupData) {
  1325 + if (item.sDriverId === itemAll.sDriverId) {
  1326 + drivergroupSelectedRowKeys.push(itemAll.sId);
  1327 + }
  1328 + }
  1329 + }
  1330 + }
  1331 + }
  1332 +
  1333 + if (commonUtils.isNotEmptyArr(departgroupAllData)) {
  1334 + for (const itemAll of departgroupAllData) {
  1335 + if (commonUtils.isNotEmptyArr(departgroupAllData)) {
  1336 + for (const item of departgroupData) {
  1337 + if (item.sDepartId === itemAll.sDepartId) {
  1338 + departgroupSelectedRowKeys.push(itemAll.sId);
  1339 + }
  1340 + }
  1341 + }
  1342 + }
  1343 + }
  1344 +
  1345 + if (commonUtils.isNotEmptyArr(approveGroupAllData)) {
  1346 + for (const itemAll of approveGroupAllData) {
  1347 + if (commonUtils.isNotEmptyArr(approveGroupData)) {
  1348 + for (const item of approveGroupData) {
  1349 + if (item.sJurisdictionClassifyId === itemAll.sJurisdictionClassifyId) {
  1350 + approveGroupSelectedRowKeys.push(itemAll.sId);
  1351 + }
  1352 + }
  1353 + }
  1354 + }
  1355 + }
  1356 +
  1357 + this.props.onSaveState({
  1358 + ...masterAddState,
  1359 + jurgroupData: jurgroupAllData,
  1360 + jurgroupOldData: jurgroupData,
  1361 + customergroupData: customergroupAllData,
  1362 + customergroupOldData: customergroupData,
  1363 + supplygroupData: supplygroupAllData,
  1364 + supplygroupOldData: supplygroupData,
  1365 + persongroupData: persongroupAllData,
  1366 + persongroupOldData: persongroupData,
  1367 + processgroupData: processgroupAllData,
  1368 + processgroupOldData: processgroupData,
  1369 + drivergroupData: drivergroupAllData,
  1370 + drivergroupOldData: drivergroupData,
  1371 + departgroupData: departgroupAllData,
  1372 + departgroupOldData: departgroupData,
  1373 + approveGroupData: approveGroupAllData,
  1374 + approveGroupOldData: approveGroupData,
  1375 + jurgroupSelectedRowKeys,
  1376 + customergroupSelectedRowKeys,
  1377 + supplygroupSelectedRowKeys,
  1378 + persongroupSelectedRowKeys,
  1379 + processgroupSelectedRowKeys,
  1380 + drivergroupSelectedRowKeys,
  1381 + departgroupSelectedRowKeys,
  1382 + approveGroupSelectedRowKeys,
  1383 + });
  1384 + }
  1385 + };
  1386 +
  1387 + /** 获取主表、对应机台、配套工序、发外公式、工序规格表数据 */
  1388 + handleGetProcessData = (masterConfig, machineConfig, assortConfig, outsideConfig, processstyleConfig, processApsRuleConfig, dynamicParamConfig, bEditClick) => {
  1389 + const { currentId } = this.props;
  1390 + /* 当前页签数据 */
  1391 + const sId = currentId !== undefined ? currentId : '';
  1392 + this.props.handleGetDataOne({
  1393 + name: 'master', configData: masterConfig, condition: { sId, pageSize: '', pageNum: '' }, bEditClick,
  1394 + });
  1395 + this.props.handleGetDataSet({
  1396 + name: 'machine', configData: machineConfig, condition: { sSqlCondition: { sParentId: sId } },
  1397 + });
  1398 + this.props.handleGetDataSet({
  1399 + name: 'assort', configData: assortConfig, condition: { sSqlCondition: { sParentId: sId } },
  1400 + });
  1401 + this.props.handleGetDataSet({
  1402 + name: 'outside', configData: outsideConfig, condition: { sSqlCondition: { sParentId: sId } },
  1403 + });
  1404 + this.props.handleGetDataSet({
  1405 + name: 'processstyle', configData: processstyleConfig, condition: { sSqlCondition: { sParentId: sId } },
  1406 + });
  1407 + this.props.handleGetDataSet({
  1408 + name: 'processApsRule', configData: processApsRuleConfig, condition: { sSqlCondition: { sParentId: sId } },
  1409 + });
  1410 +
  1411 + this.props.handleGetDataSet({
  1412 + name: 'dynamicParam', configData: dynamicParamConfig, condition: { sSqlCondition: { sParentId: sId } },
  1413 + });
  1414 + };
  1415 + /** 获取班组主表、员工、机台表数据 */
  1416 + handleGetTeamData = (masterConfig, eleemployeeConfig, elemachineConfig, bEditClick) => {
  1417 + const { currentId } = this.props;
  1418 + /* 当前页签数据 */
  1419 + const sId = currentId !== undefined ? currentId : '';
  1420 + this.props.handleGetDataOne({
  1421 + name: 'master', configData: masterConfig, condition: { sId, pageSize: '', pageNum: '' }, bEditClick,
  1422 + });
  1423 + this.props.handleGetDataSet({
  1424 + name: 'eleemployee', configData: eleemployeeConfig, condition: { sSqlCondition: { sParentId: sId } },
  1425 + });
  1426 + this.props.handleGetDataSet({
  1427 + name: 'elemachine', configData: elemachineConfig, condition: { sSqlCondition: { sParentId: sId } },
  1428 + });
  1429 + };
  1430 + /** 获取刀模主表、从表 */
  1431 + handleGetEleKnifeMouldData = (masterConfig, knifemouldproductConfig, knifemouldfileConfig, bEditClick) => {
  1432 + const { currentId } = this.props;
  1433 + /* 当前页签数据 */
  1434 + const sId = currentId !== undefined ? currentId : '';
  1435 + this.props.handleGetDataOne({
  1436 + name: 'master', configData: masterConfig, condition: { sId, pageSize: '', pageNum: '' }, bEditClick,
  1437 + });
  1438 + this.props.handleGetDataSet({
  1439 + name: 'eleknifemouldproduct', configData: knifemouldproductConfig, condition: { sSqlCondition: { sParentId: sId } },
  1440 + });
  1441 + this.props.handleGetDataSet({
  1442 + name: 'eleknifemouldfile', configData: knifemouldfileConfig, condition: { sSqlCondition: { sParentId: sId } },
  1443 + });
  1444 + };
  1445 + /** 获取检验标准主表、从表 */
  1446 + handleGetTestStandData = (masterConfig, eleteststandarditemConfig, bEditClick) => {
  1447 + const { currentId } = this.props;
  1448 + /* 当前页签数据 */
  1449 + const sId = currentId !== undefined ? currentId : '';
  1450 + this.props.handleGetDataOne({
  1451 + name: 'master', configData: masterConfig, condition: { sId, pageSize: '', pageNum: '' }, bEditClick,
  1452 + });
  1453 + this.props.handleGetDataSet({
  1454 + name: 'eleteststandarditem', configData: eleteststandarditemConfig, condition: { sSqlCondition: { sParentId: sId } },
  1455 + });
  1456 + };
  1457 + /** 消息发送数据 */
  1458 + handleGetSysMsgData = (masterConfig, sysmsguserConfig, bEditClick) => {
  1459 + const { currentId } = this.props;
  1460 + /* 当前页签数据 */
  1461 + const sId = currentId !== undefined ? currentId : '';
  1462 + this.props.handleGetDataOne({
  1463 + name: 'master', configData: masterConfig, condition: { sId, pageSize: '', pageNum: '' }, bEditClick,
  1464 + });
  1465 + this.props.handleGetDataSet({
  1466 + name: 'sysmsguser', configData: sysmsguserConfig, condition: { sSqlCondition: { sParentId: sId } },
  1467 + });
  1468 + };
  1469 +
  1470 + handleGetSisformulaData = (masterConfig) => {
  1471 + this.handleGetSlaveData('One', null, masterConfig);
  1472 + }
  1473 +
  1474 + handleGetSlaveData = async (getType, sName, currConfig, slaveConfig, iPlcNoConfig, bEditClick, addStateConfig) => {
  1475 + const { currentId } = this.props;
  1476 + /* 当前页签数据 */
  1477 + let addState = {};
  1478 + const sId = currentId !== undefined ? currentId : '';
  1479 + if (getType === 'One') {
  1480 + this.props.handleGetDataOne({
  1481 + name: 'master', configData: currConfig, condition: { sId, pageSize: '', pageNum: '' }, bEditClick,
  1482 + });
  1483 + if (commonUtils.isNotEmptyObject(iPlcNoConfig) && commonUtils.isNotEmptyObject(slaveConfig)) {
  1484 + this.props.handleGetDataOne({
  1485 + name: 'master', configData: currConfig, condition: { sId, pageSize: '', pageNum: '' }, bEditClick,
  1486 + });
  1487 + this.props.handleGetDataSet({
  1488 + name: 'slave', configData: slaveConfig, condition: { sSqlCondition: { sParentId: sId } },
  1489 + });
  1490 + if (commonUtils.isNotEmptyObject(addStateConfig)) {
  1491 + for (const name of Object.keys(addStateConfig)) {
  1492 + const returnData = await this.props.handleGetDataSet({
  1493 + name, configData: addStateConfig[name], condition: { sSqlCondition: { sParentId: sId } }, isWait: true,
  1494 + });
  1495 + console.log('returnData', name, returnData);
  1496 + addState = { ...addState, ...returnData, [`${name}SelectedRowKeys`]: [] };
  1497 + }
  1498 + }
  1499 + this.props.onSaveState(addState);
  1500 + // const iPlcNo = commonUtils.isNotEmptyObject(iPlcNoData) ? iPlcNoData.masterData[iPlcNoConfig.sName] : '';
  1501 + // this.handleGetplcMachineData(iPlcNo);
  1502 + }
  1503 + }
  1504 + if (getType === 'Set') {
  1505 + this.props.handleGetDataSet({
  1506 + name: sName, configData: currConfig, condition: { sSqlCondition: { sParentId: sId } },
  1507 + });
  1508 + }
  1509 + if (getType === 'customizeParam') {
  1510 + const returnData = await this.props.handleGetDataSet({
  1511 + name: sName, configData: currConfig, condition: { sSqlCondition: { sParentId: sId } }, isWait: true,
  1512 + });
  1513 +
  1514 + if (commonUtils.isNotEmptyObject(returnData)) {
  1515 + const { customizeParamData = [] } = returnData;
  1516 + const addState = {};
  1517 + customizeParamData.forEach((item) => {
  1518 + const { sType = 'customizeParam' } = item;
  1519 + if (commonUtils.isNotEmptyArr(addState[`${sType}Data`])) {
  1520 + addState[`${sType}Data`].push(item);
  1521 + } else {
  1522 + addState[`${sType}Data`] = [item];
  1523 + }
  1524 + });
  1525 + this.props.onSaveState({ ...returnData, ...addState });
  1526 + }
  1527 + }
  1528 + }
  1529 + handleGetplcMachineData = async (iOrder) => {
  1530 + const { sModelsId, token, masterData } = this.props;
  1531 + if (iOrder !== 0) {
  1532 + if (commonUtils.isNotEmptyObject(masterData)) {
  1533 + const dataUrl = `${commonConfig.server_host}plc/getplcMachine/${iOrder}/${masterData.sId}?sModelsId=${sModelsId}`;
  1534 + const dataReturn = (await commonServices.getService(token, dataUrl)).data;
  1535 + if (dataReturn.code === 1) {
  1536 + const returnData = dataReturn.dataset.rows;
  1537 + this.props.onSaveState({
  1538 + slaveData: returnData,
  1539 + });
  1540 + }
  1541 + }
  1542 + }
  1543 + }
  1544 +
  1545 + /* 获取变量设置配置 */
  1546 + handleGetCustomizeParamConfig = (masterData, customizeParamConfig, sColTitleNameIndex) => {
  1547 + let customizeParamConfigNew = {};
  1548 + if (commonUtils.isNotEmptyObject(masterData) && commonUtils.isNotEmptyObject(customizeParamConfig)) {
  1549 + let sColTitleName = '{"sClassfiyName": "分类", "sName": "参数中文", "sValue": "参数值", "sValue1": "参数值1", "sValue2": "参数值2", "sValue3": "参数值3", "sValue4": "参数值4", "sValue5": "参数值5", "sValue6": "参数值6", "sValue7": "参数值7", "sValue8": "参数值9", "sValue9": "参数值9" }';
  1550 + sColTitleName = masterData.sColTitleName;
  1551 + if (commonUtils.isJSON(sColTitleName)) {
  1552 + customizeParamConfigNew = JSON.parse(JSON.stringify(customizeParamConfig));
  1553 + const configObj = sColTitleNameIndex === undefined ? JSON.parse(sColTitleName) : JSON.parse(sColTitleName)[sColTitleNameIndex];
  1554 + const gdsconfigformslaveNew = [];
  1555 + if (commonUtils.isNotEmptyObject(configObj)) {
  1556 + for (const key of Object.keys(configObj)) {
  1557 + if (key !== 'panelName') {
  1558 + const configNew = {};
  1559 + configNew.sName = key;
  1560 + configNew.sChinese = configObj[key];
  1561 + configNew.bVisible = true;
  1562 + configNew.iFitWidth = 80;
  1563 + configNew.showName = configObj[key];
  1564 + configNew.bReadonly = false;
  1565 + gdsconfigformslaveNew.push(configNew);
  1566 + }
  1567 + }
  1568 + }
  1569 + const BtnArr = commonUtils.isNotEmptyArr(customizeParamConfig.gdsconfigformslave) ? customizeParamConfig.gdsconfigformslave.filter(item => item.sName === '' && commonUtils.isNotEmptyObject(item.sControlName) && item.sControlName.indexOf('Btn') > -1) : [];
  1570 + if (commonUtils.isNotEmptyArr(BtnArr)) {
  1571 + for (const item of BtnArr) {
  1572 + gdsconfigformslaveNew.push(item);
  1573 + }
  1574 + }
  1575 + if (commonUtils.isNotEmptyArr(gdsconfigformslaveNew)) {
  1576 + gdsconfigformslaveNew[0].bMergeCell = true;
  1577 + gdsconfigformslaveNew[0].iFitWidth = 100;
  1578 + customizeParamConfigNew.gdsconfigformslave = gdsconfigformslaveNew;
  1579 + }
  1580 + }
  1581 + }
  1582 + return customizeParamConfigNew;
  1583 + }
  1584 + /** 主表控件是否全部显示 */
  1585 + handleToggle = () => {
  1586 + const { expand } = this.props;
  1587 + this.props.onSaveState({ expand: !expand });
  1588 + };
  1589 + /* 取消操作 */
  1590 + handleCancel = (obj) => {
  1591 + /* 待用数据声明 */
  1592 + const {
  1593 + app, currentId, masterConfig, contactConfig, addressConfig, supplyConfig, stockConfig, customerInfoConfig, eleknifemouldproductConfig, eleknifemouldfileConfig, siscommonstyleproductclassifyConfig, sModelsType, machineConfig, assortConfig, outsideConfig, picFileConfig, userConfig, sischeckphaselogininfoConfig, phaseConfig, conditionConfig, eleemployeeConfig, elemachineConfig, jurgroupConfig, customergroupConfig, supplygroupConfig, persongroupConfig, processgroupConfig, drivergroupConfig,
  1594 + eleteststandarditemConfig, processstyleConfig, processApsRuleConfig, dynamicParamConfig, bUserModel, departgroupConfig, approveGroupConfig,
  1595 + } = this.props;
  1596 + const { userinfo } = app;
  1597 + const onSendSocketMessage = this.props.handleSendSocketMessage;
  1598 + if (sModelsType === 'element/customerInfo' || sModelsType === 'element/supplyInfo') {
  1599 + const onGetDataOk = this.handleGetData;
  1600 + const onSaveStateOk = this.props.onSaveState;
  1601 + confirm({
  1602 + title: obj.title,
  1603 + onOk() {
  1604 + onGetDataOk(masterConfig, contactConfig, addressConfig);
  1605 + onSaveStateOk({ enabled: false });
  1606 + onSendSocketMessage('release', 'noAction', currentId, userinfo.sId, null, null);
  1607 + },
  1608 + onCancel() {
  1609 + },
  1610 + });
  1611 + } else if (sModelsType === 'element/materialsInfo') {
  1612 + const onGetDataOk = this.handleGetMaterialsData;
  1613 + const onSaveStateOk = this.props.onSaveState;
  1614 + confirm({
  1615 + title: obj.title,
  1616 + onOk() {
  1617 + onGetDataOk(masterConfig, supplyConfig, stockConfig);
  1618 + onSaveStateOk({ enabled: false });
  1619 + onSendSocketMessage('release', 'noAction', currentId, userinfo.sId, null, null);
  1620 + },
  1621 + onCancel() {
  1622 + },
  1623 + });
  1624 + } else if (sModelsType === 'element/processInfo') {
  1625 + const onGetDataOk = this.handleGetProcessData;
  1626 + const onSaveStateOk = this.props.onSaveState;
  1627 + confirm({
  1628 + title: obj.title,
  1629 + onOk() {
  1630 + onGetDataOk(masterConfig, machineConfig, assortConfig, outsideConfig, processstyleConfig, processApsRuleConfig, dynamicParamConfig);
  1631 + onSaveStateOk({ enabled: false });
  1632 + onSendSocketMessage('release', 'noAction', currentId, userinfo.sId, null, null);
  1633 + },
  1634 + onCancel() {
  1635 + },
  1636 + });
  1637 + } else if (sModelsType === 'element/printInfo') {
  1638 + const onGetDataOk = this.handleGetPrintData;
  1639 + const onSaveStateOk = this.props.onSaveState;
  1640 + confirm({
  1641 + title: obj.title,
  1642 + onOk() {
  1643 + onGetDataOk(masterConfig, picFileConfig, stockConfig, customerInfoConfig);
  1644 + onSaveStateOk({ enabled: false });
  1645 + onSendSocketMessage('release', 'noAction', currentId, userinfo.sId, null, null);
  1646 + },
  1647 + onCancel() {
  1648 + },
  1649 + });
  1650 + } else if (sModelsType === 'element/knifemouldInfo') {
  1651 + const onGetDataOk = this.handleGetEleKnifeMouldData;
  1652 + const onSaveStateOk = this.props.onSaveState;
  1653 + confirm({
  1654 + title: obj.title,
  1655 + onOk() {
  1656 + onGetDataOk(masterConfig, eleknifemouldproductConfig, eleknifemouldfileConfig);
  1657 + onSaveStateOk({ enabled: false });
  1658 + onSendSocketMessage('release', 'noAction', currentId, userinfo.sId, null, null);
  1659 + },
  1660 + onCancel() {
  1661 + },
  1662 + });
  1663 + } else if (sModelsType === 'element/eleteststandInfo') {
  1664 + const onGetDataOk = this.handleGetTestStandData;
  1665 + const onSaveStateOk = this.props.onSaveState;
  1666 + confirm({
  1667 + title: obj.title,
  1668 + onOk() {
  1669 + onGetDataOk(masterConfig, eleteststandarditemConfig);
  1670 + onSaveStateOk({ enabled: false });
  1671 + onSendSocketMessage('release', 'noAction', currentId, userinfo.sId, null, null);
  1672 + },
  1673 + onCancel() {
  1674 + },
  1675 + });
  1676 + } else if (sModelsType === 'element/siscommonstyle') {
  1677 + const onGetDataOk = this.handleGetStyleData;
  1678 + const onSaveStateOk = this.props.onSaveState;
  1679 + confirm({
  1680 + title: obj.title,
  1681 + onOk() {
  1682 + onGetDataOk(masterConfig, siscommonstyleproductclassifyConfig);
  1683 + onSaveStateOk({ enabled: false });
  1684 + onSendSocketMessage('release', 'noAction', currentId, userinfo.sId, null, null);
  1685 + },
  1686 + onCancel() {
  1687 + },
  1688 + });
  1689 + } else if (sModelsType === 'element/teamInfo') {
  1690 + const onGetDataOk = this.handleGetTeamData;
  1691 + const onSaveStateOk = this.props.onSaveState;
  1692 + confirm({
  1693 + title: obj.title,
  1694 + onOk() {
  1695 + onGetDataOk(masterConfig, eleemployeeConfig, elemachineConfig);
  1696 + onSaveStateOk({ enabled: false });
  1697 + onSendSocketMessage('release', 'noAction', currentId, userinfo.sId, null, null);
  1698 + },
  1699 + onCancel() {
  1700 + },
  1701 + });
  1702 + } else if (sModelsType === 'element/sftloginInfo') {
  1703 + const onGetDataOk = this.handleGetSflLoginDataAll;
  1704 + const onSaveStateOk = this.props.onSaveState;
  1705 + confirm({
  1706 + title: obj.title,
  1707 + onOk() {
  1708 + onGetDataOk(masterConfig, jurgroupConfig, customergroupConfig, supplygroupConfig, persongroupConfig, processgroupConfig, drivergroupConfig, departgroupConfig, { approveGroupConfig });
  1709 + onSaveStateOk({ enabled: false });
  1710 + onSendSocketMessage('release', 'noAction', currentId, userinfo.sId, null, null);
  1711 + },
  1712 + onCancel() {
  1713 + },
  1714 + });
  1715 + } else if (sModelsType === 'system/sisformulaInfo') {
  1716 + const onGetDataOk = this.handleGetSlaveData;
  1717 + const onSaveStateOk = this.props.onSaveState;
  1718 + confirm({
  1719 + title: obj.title,
  1720 + onOk() {
  1721 + onGetDataOk('One', null, masterConfig);
  1722 + onSaveStateOk({ enabled: false, bUserModel });
  1723 + onSendSocketMessage('release', 'noAction', currentId, userinfo.sId, null, null);
  1724 + },
  1725 + onCancel() {
  1726 + },
  1727 + });
  1728 + } else if (sModelsType === 'element/machineInfo') {
  1729 + const onGetDataOk = this.handleGetSlaveData;
  1730 + const onSaveStateOk = this.props.onSaveState;
  1731 + confirm({
  1732 + title: obj.title,
  1733 + onOk() {
  1734 + onGetDataOk('One', null, masterConfig);
  1735 + onSaveStateOk({ enabled: false });
  1736 + onSendSocketMessage('release', 'noAction', currentId, userinfo.sId, null, null);
  1737 + },
  1738 + onCancel() {
  1739 + },
  1740 + });
  1741 + } else if (sModelsType === 'element/checkModelInfo') {
  1742 + const onGetDataOk = this.handleGetCheckModelData;
  1743 + const onSaveStateOk = this.props.onSaveState;
  1744 + confirm({
  1745 + title: obj.title,
  1746 + onOk() {
  1747 + onGetDataOk(masterConfig, userConfig, phaseConfig, conditionConfig);
  1748 + onSaveStateOk({ enabled: false });
  1749 + onSendSocketMessage('release', 'noAction', currentId, userinfo.sId, null, null);
  1750 + },
  1751 + onCancel() {
  1752 + },
  1753 + });
  1754 + } else if (sModelsType === 'element/checkPhaseInfo') {
  1755 + const onGetDataOk = this.handleGetCheckPhaseData;
  1756 + const onSaveStateOk = this.props.onSaveState;
  1757 + confirm({
  1758 + title: obj.title,
  1759 + onOk() {
  1760 + onGetDataOk(masterConfig, sischeckphaselogininfoConfig);
  1761 + onSaveStateOk({ enabled: false });
  1762 + onSendSocketMessage('release', 'noAction', currentId, userinfo.sId, null, null);
  1763 + },
  1764 + onCancel() {
  1765 + },
  1766 + });
  1767 + } else if (sModelsType === 'sis/paymentTerms') {
  1768 + const onGetDataOk = this.handleGetSlaveData;
  1769 + const onSaveStateOk = this.props.onSaveState;
  1770 + confirm({
  1771 + title: obj.title,
  1772 + onOk() {
  1773 + onGetDataOk('One', null, masterConfig);
  1774 + onSaveStateOk({ enabled: false });
  1775 + onSendSocketMessage('release', 'noAction', currentId, userinfo.sId, null, null);
  1776 + },
  1777 + onCancel() {
  1778 + },
  1779 + });
  1780 + } else if (sModelsType === 'element/employeeInfo') {
  1781 + const onGetDataOk = this.handleGetEleemployeeData;
  1782 + const onSaveStateOk = this.props.onSaveState;
  1783 + confirm({
  1784 + title: obj.title,
  1785 + onOk() {
  1786 + onGetDataOk(masterConfig);
  1787 + onSaveStateOk({ enabled: false });
  1788 + onSendSocketMessage('release', 'noAction', currentId, userinfo.sId, null, null);
  1789 + },
  1790 + onCancel() {
  1791 + },
  1792 + });
  1793 + } else if (sModelsType === 'element/sisproductclassify') {
  1794 + const onGetDataOk = this.handleGetTableData;
  1795 + const onSaveStateOk = this.props.onSaveState;
  1796 + confirm({
  1797 + title: obj.title,
  1798 + onOk() {
  1799 + onGetDataOk(masterConfig);
  1800 + onSaveStateOk({ enabled: false });
  1801 + onSendSocketMessage('release', 'noAction', currentId, userinfo.sId, null, null);
  1802 + },
  1803 + onCancel() {
  1804 + },
  1805 + });
  1806 + } else if (sModelsType === 'smg/sendMailMsg') {
  1807 + const onGetDataOk = this.handleGetTableData;
  1808 + const onSaveStateOk = this.props.onSaveState;
  1809 + confirm({
  1810 + title: obj.title,
  1811 + onOk() {
  1812 + onGetDataOk(masterConfig);
  1813 + onSaveStateOk({ enabled: false });
  1814 + onSendSocketMessage('release', 'noAction', currentId, userinfo.sId, null, null);
  1815 + },
  1816 + onCancel() {
  1817 + },
  1818 + });
  1819 + }
  1820 + };
  1821 + handleGetTableData = async (bEditClick) => {
  1822 + const {
  1823 + sModelsType, masterConfig, slaveConfig, iPlcNoConfig, siscommonstyleproductclassifyConfig, contactConfig, addressConfig, machineConfig, assortConfig, outsideConfig, processstyleConfig, processApsRuleConfig, dynamicParamConfig, supplyConfig,
  1824 + stockConfig, customerInfoConfig, picFileConfig, eleemployeeConfig, elemachineConfig, jurgroupConfig, customergroupConfig, supplygroupConfig,
  1825 + persongroupConfig, processgroupConfig, drivergroupConfig, departgroupConfig, paramConfig, userConfig, phaseConfig, conditionConfig, sischeckphaselogininfoConfig,
  1826 + sisproductclassifyProcessClassifyConfig, sysmsguserConfig, eleknifemouldproductConfig, eleknifemouldfileConfig, eleteststandarditemConfig, formData, approveGroupConfig,
  1827 + slave0Config, memoDataList,
  1828 + } = this.props;
  1829 + if (sModelsType === 'element/customerInfo' || sModelsType === 'element/supplyInfo') {
  1830 + this.handleGetData(masterConfig, contactConfig, addressConfig, bEditClick);
  1831 + } else if (sModelsType === 'element/processInfo') {
  1832 + this.handleGetProcessData(masterConfig, machineConfig, assortConfig, outsideConfig, processstyleConfig, processApsRuleConfig, dynamicParamConfig, bEditClick);
  1833 + } else if (sModelsType === 'element/materialsInfo') {
  1834 + this.handleGetMaterialsData(masterConfig, supplyConfig, stockConfig, bEditClick);
  1835 + } else if (sModelsType === 'element/printInfo') {
  1836 + this.handleGetPrintData(masterConfig, picFileConfig, stockConfig, customerInfoConfig, bEditClick);
  1837 + } else if (sModelsType === 'element/siscommonstyle') {
  1838 + this.handleGetStyleData(masterConfig, siscommonstyleproductclassifyConfig, bEditClick);
  1839 + } else if (sModelsType === 'element/teamInfo') {
  1840 + this.handleGetTeamData(masterConfig, eleemployeeConfig, elemachineConfig, bEditClick);
  1841 + } else if (sModelsType === 'element/knifemouldInfo') {
  1842 + this.handleGetEleKnifeMouldData(masterConfig, eleknifemouldproductConfig, eleknifemouldfileConfig, bEditClick);
  1843 + } else if (sModelsType === 'element/eleteststandInfo') {
  1844 + this.handleGetTestStandData(masterConfig, eleteststandarditemConfig, bEditClick);
  1845 + } else if (sModelsType === 'element/sftloginInfo') {
  1846 + const flag = undefined;
  1847 + const isWait = true;
  1848 + const params = await this.handleGetSflLoginData(masterConfig, jurgroupConfig, customergroupConfig, supplygroupConfig, persongroupConfig, processgroupConfig, drivergroupConfig, departgroupConfig, flag, isWait, bEditClick, { approveGroupConfig });
  1849 + this.handleGetUserInfoData(params);
  1850 + } else if (sModelsType === 'element/machineInfo') {
  1851 + const addStateConfig = {
  1852 + slave0: slave0Config,
  1853 + };
  1854 + if (commonUtils.isNotEmptyArr(memoDataList)) {
  1855 + memoDataList.forEach((item) => {
  1856 + addStateConfig[item.name] = item.config;
  1857 + });
  1858 + }
  1859 + this.handleGetSlaveData('One', null, masterConfig, slaveConfig, iPlcNoConfig, bEditClick, addStateConfig);
  1860 + } else if (sModelsType === 'sis/paymentTerms') {
  1861 + this.handleGetSlaveData('One', null, masterConfig, bEditClick);
  1862 + } else if (sModelsType === 'system/sisformulaInfo') {
  1863 + this.handleGetSlaveData('Set', 'param', paramConfig, bEditClick);
  1864 + this.handleGetSlaveData('One', undefined, masterConfig, bEditClick);
  1865 + let customizeParamConfig = commonUtils.isNotEmptyArr(formData.filter(item => item.bGrd && item.sTbName === 'sisformulacustomizeparam')) ? formData.filter(item => item.bGrd && item.sTbName === 'sisformulacustomizeparam')[0] : {};
  1866 + /* 获取主表自定义列名为自定义变量配置 */
  1867 + const customizeParamConfigNew = this.handleGetCustomizeParamConfig({}, customizeParamConfig);
  1868 + if (commonUtils.isNotEmptyArr(customizeParamConfigNew.gdsconfigformslave)) {
  1869 + customizeParamConfig = customizeParamConfigNew;
  1870 + }
  1871 + this.handleGetSlaveData('customizeParam', 'customizeParam', customizeParamConfig, bEditClick); /* 获取自定义变量参数数据集 */
  1872 + } else if (sModelsType === 'element/checkModelInfo') {
  1873 + this.handleGetCheckModelData(masterConfig, userConfig, phaseConfig, conditionConfig, bEditClick);
  1874 + } else if (sModelsType === 'element/checkPhaseInfo') {
  1875 + this.handleGetCheckPhaseData(masterConfig, sischeckphaselogininfoConfig, bEditClick);
  1876 + } else if (sModelsType === 'element/employeeInfo') {
  1877 + this.handleGetEleemployeeData(masterConfig, bEditClick);
  1878 + } else if (sModelsType === 'element/sisproductclassify') {
  1879 + this.handleGetSisproductclassifyData(masterConfig, sisproductclassifyProcessClassifyConfig, bEditClick);
  1880 + } else if (sModelsType === 'element/sisproductclassify') {
  1881 + this.handleGetSysMsgData(masterConfig, sysmsguserConfig, bEditClick);
  1882 + }
  1883 + };
  1884 + /** 点击修改按钮操作 */
  1885 + handleEdit = async () => {
  1886 + /* 数据参数 */
  1887 + // const {
  1888 + // app, currentId, token, masterConfig, sModelsId,
  1889 + // } = this.props;
  1890 + // const sId = currentId !== undefined ? currentId : '';
  1891 + // const { userinfo } = app;
  1892 + // const value = {
  1893 + // tableName: masterConfig.sTbName,
  1894 + // sId: [sId],
  1895 + // };
  1896 + this.props.onSaveState({ pageLoading: true });
  1897 + const { masterData, bUserModel, dispatch } = this.props;
  1898 + let timValue = 0;
  1899 + if (this.props.app.webSocket === null || this.props.app.webSocket.readyState !== WebSocket.OPEN) {
  1900 + this.props.dispatch({ type: 'app/createWebSocket', payload: { reStart: true, dispatch } });
  1901 + timValue = 3000;
  1902 + }
  1903 + const reset = (ws, config1) => {
  1904 + clearTimeout(config1.timerServer);
  1905 + clearTimeout(config1.serverTimer);
  1906 + start(ws, config1);
  1907 + };
  1908 + const start = (ws, config1) => {
  1909 + config1.timerServer = setTimeout(() => {
  1910 + const message = { sendFrom: this.props.app.userinfo.sId, connectTest: 'test' }; // param 存放其它参数 keyName 需要放入Redis的数据key,keyValue 需要放入Redis的数据key 的值
  1911 + ws.send(JSON.stringify(message));
  1912 + }, config1.timeoutServer);
  1913 + };
  1914 + setTimeout(() => {
  1915 + this.props.app.webSocket.onmessage = async (msg) => {
  1916 + reset(this.props.app.webSocket, commonConfig);
  1917 + const rtmsg = JSON.parse(msg.data);
  1918 + if (rtmsg.action === 'showMsg') {
  1919 + message.warning(rtmsg.msg);
  1920 + this.props.onSaveState({ loading: false });
  1921 + } else if (rtmsg.action === 'loginOut') {
  1922 + if (location.pathname.indexOf('/indexOee') > -1) {
  1923 + dispatch({ type: 'app/throwErrorOee', payload: { code: -2, msg: rtmsg.msg } });
  1924 + } else if (location.pathname.indexOf('/indexMobile') > -1) {
  1925 + dispatch({ type: 'app/throwErrorMobile', payload: { code: -2, msg: rtmsg.msg } });
  1926 + } else {
  1927 + dispatch({ type: 'app/throwError', payload: { code: -2, msg: rtmsg.msg } });
  1928 + }
  1929 + } else if (rtmsg.action === 'update') {
  1930 + await this.handleGetTableData('update');
  1931 + this.props.onSaveState({
  1932 + enabled: true,
  1933 + bUserModel,
  1934 + isEnabledPlcNo: (masterData.iPlcNo === undefined || masterData.iPlcNo === 0),
  1935 + loading: false,
  1936 + });
  1937 + } else if (this.props.app.webSocket.homeAction) {
  1938 + this.props.app.webSocket.homeAction(msg);
  1939 + }
  1940 + this.props.onSaveState({ pageLoading: false });
  1941 + };
  1942 + this.props.handleSendSocketMessage('update', 'showMsg', this.props.currentId, this.props.app.userinfo.sId, null, null);
  1943 + }, timValue);
  1944 + // const url = `${commonConfig.server_host}business/addSysLocking?sModelsId=${sModelsId}`;
  1945 + // /* 接收返回值 */
  1946 + // const { data } = await commonServices.postValueService(token, value, url);
  1947 + // if (data.code === 1) {
  1948 + // this.props.handleSendSocketMessage('update', 'showMsg', currentId, userinfo.sId, null, null);
  1949 + // this.handleGetTableData();
  1950 + // this.props.onSaveState({ enabled: true });
  1951 + // } else { /* 失败 */
  1952 + // this.props.getServiceError(data);
  1953 + // }
  1954 + };
  1955 + /* 删除 */
  1956 + handleDel = (obj) => {
  1957 + const props = { ...this.props, ...this.state };
  1958 + const onOkDel = this.handleOkDel;
  1959 + confirm({
  1960 + title: obj.title,
  1961 + onOk() {
  1962 + onOkDel(props);
  1963 + },
  1964 + onCancel() {
  1965 + },
  1966 + });
  1967 + };
  1968 + /* 确定要删除 */
  1969 + handleOkDel = async (props) => {
  1970 + /* 数据参数 */
  1971 + const {
  1972 + currentId, token, sModelsId, masterConfig, contactConfig, addressConfig, supplyConfig, stockConfig, customerInfoConfig, eleknifemouldproductConfig, eleknifemouldfileConfig, eleteststandarditemConfig, siscommonstyleproductclassifyConfig, machineConfig, assortConfig, outsideConfig, picFileConfig, eleemployeeConfig, elemachineConfig, jurgroupConfig, customergroupConfig, supplygroupConfig, persongroupConfig, processgroupConfig, drivergroupConfig, userConfig, sischeckphaselogininfoConfig, phaseConfig, conditionConfig, sModelsType, sisproductclassifyProcessClassifyConfig,
  1973 + approveGroupConfig,
  1974 + } = props;
  1975 + /* 当前页签数据 */
  1976 + const sId = currentId !== undefined ? currentId : '';
  1977 + let value = {};
  1978 + if (sModelsType === 'element/customerInfo' || sModelsType === 'element/supplyInfo') {
  1979 + value = {
  1980 + sClientType: '1',
  1981 + data: {
  1982 + sMasterTable: masterConfig.sTbName,
  1983 + sId: [sId],
  1984 + sSlaveTable: [
  1985 + {
  1986 + tableName: contactConfig.sTbName,
  1987 + relationName: 'sParentId',
  1988 + }, {
  1989 + tableName: addressConfig.sTbName,
  1990 + relationName: 'sParentId',
  1991 + }],
  1992 + },
  1993 + };
  1994 + } else if (sModelsType === 'element/materialsInfo') {
  1995 + value = {
  1996 + sClientType: '1',
  1997 + data: {
  1998 + sMasterTable: masterConfig.sTbName,
  1999 + sId: [sId],
  2000 + sSlaveTable: [
  2001 + {
  2002 + tableName: supplyConfig.sTbName,
  2003 + relationName: 'sParentId',
  2004 + }, {
  2005 + tableName: stockConfig.sTbName,
  2006 + relationName: 'sParentId',
  2007 + }],
  2008 + },
  2009 + };
  2010 + } else if (sModelsType === 'element/processInfo') {
  2011 + value = {
  2012 + sClientType: '1',
  2013 + data: {
  2014 + sMasterTable: masterConfig.sTbName,
  2015 + sId: [sId],
  2016 + sSlaveTable: [
  2017 + {
  2018 + tableName: machineConfig.sTbName,
  2019 + relationName: 'sParentId',
  2020 + }, {
  2021 + tableName: assortConfig.sTbName,
  2022 + relationName: 'sParentId',
  2023 + }, {
  2024 + tableName: outsideConfig.sTbName,
  2025 + relationName: 'sParentId',
  2026 + }],
  2027 + },
  2028 + };
  2029 + } else if (sModelsType === 'element/printInfo') {
  2030 + value = {
  2031 + sClientType: '1',
  2032 + data: {
  2033 + sMasterTable: masterConfig.sTbName,
  2034 + sId: [sId],
  2035 + sSlaveTable: [
  2036 + {
  2037 + tableName: picFileConfig.sTbName,
  2038 + relationName: 'sParentId',
  2039 + }, {
  2040 + tableName: stockConfig.sTbName,
  2041 + relationName: 'sParentId',
  2042 + }, {
  2043 + tableName: customerInfoConfig.sTbName,
  2044 + relationName: 'sParentId',
  2045 + }],
  2046 + },
  2047 + };
  2048 + } else if (sModelsType === 'element/knifemouldInfo') {
  2049 + value = {
  2050 + sClientType: '1',
  2051 + data: {
  2052 + sMasterTable: masterConfig.sTbName,
  2053 + sId: [sId],
  2054 + sSlaveTable: [
  2055 + {
  2056 + tableName: eleknifemouldproductConfig.sTbName,
  2057 + relationName: 'sParentId',
  2058 + }, {
  2059 + tableName: eleknifemouldfileConfig.sTbName,
  2060 + relationName: 'sParentId',
  2061 + }],
  2062 + },
  2063 + };
  2064 + } else if (sModelsType === 'element/eleteststandInfo') {
  2065 + value = {
  2066 + sClientType: '1',
  2067 + data: {
  2068 + sMasterTable: masterConfig.sTbName,
  2069 + sId: [sId],
  2070 + sSlaveTable: [
  2071 + {
  2072 + tableName: eleteststandarditemConfig.sTbName,
  2073 + relationName: 'sParentId',
  2074 + }],
  2075 + },
  2076 + };
  2077 + } else if (sModelsType === 'element/siscommonstyle') {
  2078 + value = {
  2079 + sClientType: '1',
  2080 + data: {
  2081 + sMasterTable: masterConfig.sTbName,
  2082 + sId: [sId],
  2083 + sSlaveTable: [
  2084 + {
  2085 + tableName: siscommonstyleproductclassifyConfig.sTbName,
  2086 + relationName: 'sParentId',
  2087 + }],
  2088 + },
  2089 + };
  2090 + } else if (sModelsType === 'element/teamInfo') {
  2091 + value = {
  2092 + sClientType: '1',
  2093 + data: {
  2094 + sMasterTable: masterConfig.sTbName,
  2095 + sId: [sId],
  2096 + sSlaveTable: [
  2097 + {
  2098 + tableName: eleemployeeConfig.sTbName,
  2099 + relationName: 'sParentId',
  2100 + }, {
  2101 + tableName: elemachineConfig.sTbName,
  2102 + relationName: 'sParentId',
  2103 + }],
  2104 + },
  2105 + };
  2106 + } else if (sModelsType === 'element/sftloginInfo') {
  2107 + value = {
  2108 + sClientType: '1',
  2109 + data: {
  2110 + sMasterTable: masterConfig.sTbName,
  2111 + sId: [sId],
  2112 + sSlaveTable: [
  2113 + {
  2114 + tableName: jurgroupConfig.sTbName,
  2115 + relationName: 'sParentId',
  2116 + }, {
  2117 + tableName: customergroupConfig.sTbName,
  2118 + relationName: 'sParentId',
  2119 + }, {
  2120 + tableName: supplygroupConfig.sTbName,
  2121 + relationName: 'sParentId',
  2122 + }, {
  2123 + tableName: persongroupConfig.sTbName,
  2124 + relationName: 'sParentId',
  2125 + }, {
  2126 + tableName: processgroupConfig.sTbName,
  2127 + relationName: 'sParentId',
  2128 + }, {
  2129 + tableName: drivergroupConfig.sTbName,
  2130 + relationName: 'sParentId',
  2131 + }, {
  2132 + tableName: approveGroupConfig.sTbName,
  2133 + relationName: 'sParentId',
  2134 + }],
  2135 + },
  2136 + };
  2137 + } else if (sModelsType === 'system/sisformulaInfo') {
  2138 + value = {
  2139 + sClientType: '1',
  2140 + data: {
  2141 + sMasterTable: masterConfig.sTbName,
  2142 + sId: [sId],
  2143 + sSlaveTable: [],
  2144 + },
  2145 + };
  2146 + } else if (sModelsType === 'element/machineInfo') {
  2147 + value = {
  2148 + sClientType: '1',
  2149 + data: {
  2150 + sMasterTable: masterConfig.sTbName,
  2151 + sId: [sId],
  2152 + sSlaveTable: [],
  2153 + },
  2154 + };
  2155 + } else if (sModelsType === 'element/checkModelInfo') {
  2156 + value = {
  2157 + sClientType: '1',
  2158 + data: {
  2159 + sMasterTable: masterConfig.sTbName,
  2160 + sId: [sId],
  2161 + sSlaveTable: [
  2162 + {
  2163 + tableName: userConfig.sTbName,
  2164 + relationName: 'sParentId',
  2165 + }, {
  2166 + tableName: phaseConfig.sTbName,
  2167 + relationName: 'sParentId',
  2168 + }, {
  2169 + tableName: conditionConfig.sTbName,
  2170 + relationName: 'sParentId',
  2171 + }],
  2172 + },
  2173 + };
  2174 + } else if (sModelsType === 'element/checkPhaseInfo') {
  2175 + value = {
  2176 + sClientType: '1',
  2177 + data: {
  2178 + sMasterTable: masterConfig.sTbName,
  2179 + sId: [sId],
  2180 + sSlaveTable: [
  2181 + {
  2182 + tableName: sischeckphaselogininfoConfig.sTbName,
  2183 + relationName: 'sParentId',
  2184 + }],
  2185 + },
  2186 + };
  2187 + } else if (sModelsType === 'sis/paymentTerms') {
  2188 + value = {
  2189 + sClientType: '1',
  2190 + data: {
  2191 + sMasterTable: masterConfig.sTbName,
  2192 + sId: [sId],
  2193 + sSlaveTable: [],
  2194 + },
  2195 + };
  2196 + } else if (sModelsType === 'element/employeeInfo') {
  2197 + value = {
  2198 + sClientType: '1',
  2199 + data: {
  2200 + sMasterTable: masterConfig.sTbName,
  2201 + sId: [sId],
  2202 + sSlaveTable: [],
  2203 + },
  2204 + };
  2205 + } else if (sModelsType === 'element/sisproductclassify') {
  2206 + value = {
  2207 + sClientType: '1',
  2208 + data: {
  2209 + sMasterTable: masterConfig.sTbName,
  2210 + sId: [sId],
  2211 + sSlaveTable: [
  2212 + {
  2213 + tableName: sisproductclassifyProcessClassifyConfig.sTbName,
  2214 + relationName: 'sParentId',
  2215 + }],
  2216 + },
  2217 + };
  2218 + }
  2219 + const { sBillNo, sId: sIdMaster } = props.masterData || {};
  2220 + const url = `${commonConfig.server_host}business/delMasSlaBusinessData?sModelsId=${sModelsId}&sBillNo=${sBillNo}&sSysLogSrcId=${sIdMaster}`;
  2221 + /* 接收返回值 */
  2222 + const { data } = await commonServices.postValueService(token, value, url);
  2223 + if (data.code === 1) {
  2224 + /* 数据删除成功 */
  2225 + if (this.props.app.currentPane.refresh !== undefined) {
  2226 + this.props.app.currentPane.refresh();
  2227 + }
  2228 + this.handleDelDataSuccess(props);
  2229 + } else { /* 失败 */
  2230 + this.props.getServiceError(data);
  2231 + }
  2232 + };
  2233 + /* 数据删除成功跳转到新路由即pane */
  2234 + handleDelDataSuccess = (props) => {
  2235 + const { app } = props;
  2236 + let { panes, currentPane } = app;
  2237 + /* 删除单据后退出当前路由后,标签panes变化后的集合 */
  2238 + panes = panes.filter(pane => pane.key !== currentPane.key);
  2239 + /* 跳转到panes集合的最后一个路由,因为panes集合一定含有主页路由所以panes的集合大于等于1 */
  2240 + currentPane = panes[panes.length - 1];
  2241 + this.props.onRemovePane(panes, currentPane);
  2242 + };
  2243 + /** toolbar校验保存 */
  2244 + handleValidateSave = async () => {
  2245 + const { masterConfig, sModelsType } = this.props;
  2246 + this.form.validateFields(async (err, values) => {
  2247 + /* 验证通过与不通过走不同的流程 */
  2248 + if (err) { /* 验证失败 */
  2249 + /* 直接渲染显示错误提示 */
  2250 + for (const key of Object.keys(err)) {
  2251 + message.warning(err[key].errors[0].message);
  2252 + if (sModelsType === 'element/machineInfo') {
  2253 + const notEmptyConfigData = masterConfig.gdsconfigformslave.filter(item => item.sName === err[key].errors[0].field && item.bNotEmpty && item.sName !== '' && item.sControlName.indexOf('_') !== -1);
  2254 + if (commonUtils.isNotEmptyArr(notEmptyConfigData)) {
  2255 + const activeKey = notEmptyConfigData[0].sControlName.split('_')[1].replace(/[^\d]/g, ' ');
  2256 + this.props.onSaveState({ activeKey });
  2257 + }
  2258 + }
  2259 + }
  2260 + this.props.onSaveState({
  2261 + loading: false,
  2262 + });
  2263 + } else { /* 验证成功 */
  2264 + const {
  2265 + masterConfig, masterData, slaveConfig, slaveData, slaveDelData, slave0Config, slave0Data, slave0DelData, supplyConfig, supplyData, supplyDelData, stockConfig, stockData, stockDelData, customerInfoConfig,
  2266 + contactConfig, contactData, contactDelData, addressConfig, addressData, addressDelData, sModelsType, machineConfig,
  2267 + machineData, machineDelData, assortConfig, sisproductclassifyProcessClassifyConfig, eleknifemouldproductConfig, eleknifemouldfileConfig, eleteststandarditemConfig,
  2268 + assortData, assortDelData, outsideConfig, outsideData, outsideDelData, processstyleConfig, processstyleData, processstyleDelData,
  2269 + processApsRuleConfig, dynamicParamConfig, processApsRuleData, processApsRuleDelData,
  2270 + picFileConfig, picFileData, picFileDelData, eleemployeeConfig, eleemployeeData, eleemployeeDelData, elemachineConfig,
  2271 + elemachineData, elemachineDelData, jurgroupConfig, jurgroupData, customergroupConfig, customergroupData,
  2272 + supplygroupConfig, supplygroupData, persongroupConfig, persongroupData, drivergroupConfig, drivergroupData, departgroupConfig, departgroupData,
  2273 + processgroupConfig, processgroupData, userConfig, sischeckphaselogininfoConfig,
  2274 + sischeckphaselogininfoData, sischeckphaselogininfoDelData, phaseConfig, conditionConfig, userData, phaseData, conditionData,
  2275 + userDelData, phaseDelData, conditionDelData, sisproductclassifyProcessClassifyData, sisproductclassifyProcessClassifyDelData,
  2276 + siscommonstyleproductclassifyConfig, siscommonstyleproductclassifyData, siscommonstyleproductclassifyDelData, customerInfoData,
  2277 + customerInfoDelData, sysmsguserConfig, customergroupOldData, customergroupOldDelData, supplygroupOldData, supplygroupOldDelData,
  2278 + processgroupOldData, processgroupOldDelData, jurgroupOldData, jurgroupOldDelData, persongroupOldData, persongroupOldDelData, drivergroupOldData, drivergroupOldDelData,
  2279 + eleknifemouldproductData, eleknifemouldproductDelData, eleknifemouldfileData, eleknifemouldfileDelData, eleteststandarditemData, eleteststandarditemDelData,
  2280 + customizeParamConfig, customizeParamData, customizeParamDelData, dynamicParamData, dynamicParamDelData, departgroupOldData, departgroupOldDelData, customizeParamName,
  2281 + approveGroupConfig, approveGroupData, approveGroupOldData, approveGroupOldDelData, slaveInfoList,
  2282 + } = this.props;
  2283 + /* app, const { webSocket, currentPane } = app;
  2284 + const { key } = currentPane; */
  2285 + if (!commonBusiness.validateField(values, this.props)) { /* 验证字段输入是否合规 */
  2286 + return;
  2287 + }
  2288 + const data = [];
  2289 + if (sModelsType === 'system/sisformulaInfo' && commonUtils.isNotEmptyObject(customizeParamConfig)) {
  2290 + let sFormulaSet = ''; /* 公式自定义部分 */
  2291 + if (commonUtils.isNotEmptyArr(customizeParamData)) {
  2292 + if (commonUtils.isNotEmptyObject(masterData.sColTitleName)) { /* 有自定义列名 则变量名代码生成 */
  2293 + const regex = /^customizeParam(?:\d+)?Data$/;
  2294 + Object.keys(this.props).filter(key => regex.test(key)).forEach((key) => {
  2295 + const tableName = key.split('Data')[0];
  2296 + const lastChar = tableName.charAt(tableName.length - 1);
  2297 + const firstChar = this.handleGetFirstChar(lastChar);
  2298 + const tempData = this.props[key];
  2299 + tempData.forEach((item, index) => {
  2300 + for (const key of Object.keys(item)) {
  2301 + if (key.includes('sValue')) {
  2302 + const sParam = `${firstChar}${index}_${key}`;
  2303 + let keyValue = item[key];
  2304 + if (commonUtils.isEmpty(keyValue)) {
  2305 + keyValue = '0';
  2306 + }
  2307 + const sFormulaSetRow = `SET @${sParam}:=${keyValue};`;
  2308 + sFormulaSet += sFormulaSetRow;
  2309 + }
  2310 + }
  2311 + });
  2312 + });
  2313 +
  2314 + // customizeParamData.forEach((item, index) => {
  2315 + // for (const key of Object.keys(item)) {
  2316 + // if (key.includes('sValue')) {
  2317 + // const sParam = `R${index}_${key}`;
  2318 + // let keyValue = item[key];
  2319 + // if (commonUtils.isEmpty(keyValue)) {
  2320 + // keyValue = '0';
  2321 + // }
  2322 + // const sFormulaSetRow = `SET @${sParam}:=${keyValue};`;
  2323 + // sFormulaSet += sFormulaSetRow;
  2324 + // }
  2325 + // }
  2326 + // });
  2327 + } else {
  2328 + customizeParamData.forEach((item) => { /* 没有自定义列名 维持原来 */
  2329 + const sFormulaSetRow = `SET @${item.sParam}:=${item.sValue};`;
  2330 + sFormulaSet += sFormulaSetRow;
  2331 + });
  2332 + }
  2333 + }
  2334 + masterData.handleType = commonUtils.isEmpty(masterData.handleType) ? 'update' : masterData.handleType;
  2335 + masterData.sFormulaSet = sFormulaSet;
  2336 + }
  2337 + data.push(commonBusiness.mergeData('master', masterConfig.sTbName, [masterData]));
  2338 + if (sModelsType === 'element/customerInfo' || sModelsType === 'element/supplyInfo') {
  2339 + if (!commonBusiness.validateTable(contactConfig, contactData, this.props, '2') || !commonBusiness.validateTable(addressConfig, addressData, this.props, '3')) {
  2340 + return;
  2341 + }
  2342 + data.push(commonBusiness.mergeData('contact', contactConfig.sTbName, contactData, contactDelData));
  2343 + data.push(commonBusiness.mergeData('address', addressConfig.sTbName, addressData, addressDelData));
  2344 + } else if (sModelsType === 'element/materialsInfo') {
  2345 + if (!commonBusiness.validateTable(supplyConfig, supplyData, this.props, '2') || !commonBusiness.validateTable(stockConfig, stockData, this.props, '3')) {
  2346 + return;
  2347 + }
  2348 + data.push(commonBusiness.mergeData('supply', supplyConfig.sTbName, supplyData, supplyDelData));
  2349 + data.push(commonBusiness.mergeData('stock', stockConfig.sTbName, stockData, stockDelData));
  2350 + } else if (sModelsType === 'element/processInfo') {
  2351 + if (!commonBusiness.validateTable(machineConfig, machineData, this.props, '2') || !commonBusiness.validateTable(assortConfig, assortData, this.props, '3') || !commonBusiness.validateTable(outsideConfig, outsideData, this.props, '4') || !commonBusiness.validateTable(processstyleConfig, processstyleData, this.props, '5')
  2352 + || !commonBusiness.validateTable(processApsRuleConfig, processApsRuleData, this.props, '6') || !commonBusiness.validateTable(dynamicParamConfig, dynamicParamData, this.props, '7')) {
  2353 + return;
  2354 + }
  2355 + const {
  2356 + sReportParam,
  2357 + sProcessParam,
  2358 + sWorkOrderParam,
  2359 + sNormParam,
  2360 + sTestParam,
  2361 + } = masterData;
  2362 + /* 工序信息保存时,验证上报参数设置、工艺参数设置、工单参数设置 JSON字符串格式是否正确 */
  2363 + if (commonUtils.isNotEmptyObject(masterData)) {
  2364 + // eslint-disable-next-line no-unused-vars
  2365 + let JsonData = [];
  2366 + let bjson = true;
  2367 + if (commonUtils.isNotEmptyObject(sReportParam)) {
  2368 + try {
  2369 + JsonData = JSON.parse(sReportParam);
  2370 + } catch (e) {
  2371 + message.error('上报参数JSON格式配置错误!');
  2372 + bjson = false;
  2373 + }
  2374 + }
  2375 + if (commonUtils.isNotEmptyObject(sProcessParam)) {
  2376 + try {
  2377 + JsonData = JSON.parse(sProcessParam);
  2378 + } catch (e) {
  2379 + message.error('工艺参数JSON格式配置错误!');
  2380 + bjson = false;
  2381 + }
  2382 + }
  2383 + if (commonUtils.isNotEmptyObject(sWorkOrderParam)) {
  2384 + try {
  2385 + JsonData = JSON.parse(sWorkOrderParam);
  2386 + } catch (e) {
  2387 + message.error('工单参数JSON格式配置错误');
  2388 + bjson = false;
  2389 + }
  2390 + }
  2391 + if (commonUtils.isNotEmptyObject(sNormParam)) {
  2392 + try {
  2393 + JsonData = JSON.parse(sNormParam);
  2394 + } catch (e) {
  2395 + message.error('标准书参数JSON格式配置错误');
  2396 + bjson = false;
  2397 + }
  2398 + }
  2399 + if (commonUtils.isNotEmptyObject(sTestParam)) {
  2400 + try {
  2401 + JsonData = JSON.parse(sTestParam);
  2402 + } catch (e) {
  2403 + message.error('测试参数JSON格式配置错误');
  2404 + bjson = false;
  2405 + }
  2406 + }
  2407 +
  2408 + /* 若序号大于6 则进行提示 */
  2409 + // if (commonUtils.isNotEmptyArr(dynamicParamData)) {
  2410 + // const filterData = dynamicParamData.filter(item => item.iOrder > 11);
  2411 + // if (commonUtils.isNotEmptyArr(filterData)) {
  2412 + // message.error('参数序号不能大于11');
  2413 + // bjson = false;
  2414 + // }
  2415 + // }
  2416 +
  2417 + if (!bjson) {
  2418 + this.props.onSaveState({
  2419 + loading: false,
  2420 + });
  2421 + return;
  2422 + }
  2423 + }
  2424 +
  2425 + /* 动态参数表业务逻辑处理 */
  2426 + if (commonUtils.isNotEmptyArr(dynamicParamData)) {
  2427 + /* 先把动态参数按照大小顺序排序 */
  2428 + dynamicParamData.sort((g1, g2) => {
  2429 + return parseFloat(g1.iOrder) - parseFloat(g2.iOrder);
  2430 + });
  2431 + /* 动态参数 */
  2432 + let sReportParamStr = sReportParam; /* 上报参数字符串 */
  2433 + let sProcessParamStr = sProcessParam; /* 工艺参数字符串 */
  2434 + let sWorkOrderParamStr = sWorkOrderParam; /* 工单参数字符串 */
  2435 + let sNormParamStr = sNormParam; /* 标准书参数字符串 */
  2436 + let sTestParamStr = sTestParam; /* 测试参数字符串 */
  2437 + const jsonsReportParam = {};
  2438 + const jsonsProcessParam = {};
  2439 + const jsonsWorkOrderParam = {};
  2440 + const jsonsNormParam = {};
  2441 + const jsonsTestParam = {};
  2442 + dynamicParamData.forEach((item) => {
  2443 + const key = `sParam${item.iOrder}`; /* sParma1 */
  2444 + const sParamDefault = `sParamDefault${item.iOrder}`; /* sParmaDefault1 */
  2445 + const sParamNotEmpty = `sParamNotEmpty${item.iOrder}`;
  2446 + const sParamNotFirstEmpty = `sParamNotFirstEmpty${item.iOrder}`;
  2447 + const sParamReadOnly = `sParamReadOnly${item.iOrder}`;
  2448 + const sParamDropDownKey = `sParamDropDown${item.iOrder}`; /* sParamDropDown1 */
  2449 + const sParamsColumnConfig = `sParamColumnConfig${item.iOrder}`; /* sParamColumnConfig1 */
  2450 + const sParamAssFieldName = `sParamAssFieldName${item.iOrder}`;
  2451 + const sParamFieldName = `sParamFieldName${item.iOrder}`;
  2452 + const sParamNotZero = `sParamNotZero${item.iOrder}`;
  2453 + const sParamDropDownType = `sParamDropDownType${item.iOrder}`;
  2454 + const sParamAssignField = `sParamAssignField${item.iOrder}`;
  2455 + const sParamSqlCondition = `sParamSqlCondition${item.iOrder}`;
  2456 + const sParamKeyUpFilter = `sParamKeyUpFilter${item.iOrder}`;
  2457 + let dropDownSplitData = [];
  2458 + let childParamObj = {};
  2459 + /* 参数下拉字段逗号分割转换为数组 */
  2460 + if (commonUtils.isNotEmptyObject(item.sParamDropDown)) {
  2461 + if (item.sDropDownType === 'sql') {
  2462 + childParamObj = item.sParamDropDown;
  2463 + } else {
  2464 + dropDownSplitData = item.sParamDropDown.split(',');
  2465 + for (const i of dropDownSplitData) {
  2466 + const eachArr = i.split(':');
  2467 + if (commonUtils.isNotEmptyArr(eachArr) && eachArr.length > 1) {
  2468 + const skey = eachArr[0];
  2469 + const sValue = eachArr[1];
  2470 + childParamObj[skey] = sValue;
  2471 + } else {
  2472 + childParamObj[i] = i;
  2473 + }
  2474 + }
  2475 + }
  2476 + }
  2477 + if (item.sType === '1') { /* 工单参数 */
  2478 + jsonsReportParam[key] = item.sParam;
  2479 + jsonsReportParam[sParamDefault] = item.sParamDefault; /* 默认值 */
  2480 + jsonsReportParam[sParamNotEmpty] = item.bNotEmpty ? true : undefined;
  2481 + jsonsReportParam[sParamNotFirstEmpty] = item.bNotFirstEmpty ? true : undefined;
  2482 + jsonsReportParam[sParamReadOnly] = item.bReadonly ? true : undefined;
  2483 + jsonsReportParam[sParamAssFieldName] = commonUtils.isNotEmptyStr(item.sAssFieldName) ? item.sAssFieldName : undefined;
  2484 + jsonsReportParam[sParamFieldName] = commonUtils.isNotEmptyStr(item.sFieldName) ? item.sFieldName : undefined;
  2485 + jsonsReportParam[sParamNotZero] = item.bNotZero ? true : undefined;
  2486 + jsonsReportParam[sParamDropDownType] = commonUtils.isNotEmptyStr(item.sDropDownType) ? item.sDropDownType : undefined;
  2487 + jsonsReportParam[sParamAssignField] = commonUtils.isNotEmptyStr(item.sAssignField) ? item.sAssignField : undefined;
  2488 + jsonsReportParam[sParamSqlCondition] = commonUtils.isNotEmptyStr(item.sSqlCondition) ? item.sSqlCondition : undefined;
  2489 + jsonsReportParam[sParamKeyUpFilter] = commonUtils.isNotEmptyStr(item.sKeyUpFilter) ? item.sKeyUpFilter : undefined;
  2490 + if (commonUtils.isNotEmptyObject(childParamObj)) {
  2491 + jsonsReportParam[sParamDropDownKey] = childParamObj;
  2492 + }
  2493 + jsonsReportParam[sParamsColumnConfig] = item.sColumnConfig; /* 表格配置 */
  2494 + } else if (item.sType === '2') { /* 报价参数 */
  2495 + jsonsProcessParam[key] = item.sParam;
  2496 + jsonsProcessParam[sParamDefault] = item.sParamDefault; /* 默认值 */
  2497 + jsonsProcessParam[sParamNotEmpty] = item.bNotEmpty ? true : undefined;
  2498 + jsonsProcessParam[sParamNotFirstEmpty] = item.bNotFirstEmpty ? true : undefined;
  2499 + jsonsProcessParam[sParamReadOnly] = item.bReadonly ? true : undefined;
  2500 + jsonsProcessParam[sParamAssFieldName] = commonUtils.isNotEmptyStr(item.sAssFieldName) ? item.sAssFieldName : undefined;
  2501 + jsonsProcessParam[sParamFieldName] = commonUtils.isNotEmptyStr(item.sFieldName) ? item.sFieldName : undefined;
  2502 + jsonsProcessParam[sParamNotZero] = item.bNotZero ? true : undefined;
  2503 + jsonsProcessParam[sParamDropDownType] = commonUtils.isNotEmptyStr(item.sDropDownType) ? item.sDropDownType : undefined;
  2504 + jsonsProcessParam[sParamAssignField] = commonUtils.isNotEmptyStr(item.sAssignField) ? item.sAssignField : undefined;
  2505 + jsonsProcessParam[sParamSqlCondition] = commonUtils.isNotEmptyStr(item.sSqlCondition) ? item.sSqlCondition : undefined;
  2506 + jsonsProcessParam[sParamKeyUpFilter] = commonUtils.isNotEmptyStr(item.sKeyUpFilter) ? item.sKeyUpFilter : undefined;
  2507 + if (commonUtils.isNotEmptyObject(childParamObj)) {
  2508 + jsonsProcessParam[sParamDropDownKey] = childParamObj;
  2509 + }
  2510 + jsonsProcessParam[sParamsColumnConfig] = item.sColumnConfig; /* 表格配置 */
  2511 + } else if (item.sType === '3') { /* 上报参数 */
  2512 + jsonsWorkOrderParam[key] = item.sParam;
  2513 + jsonsWorkOrderParam[sParamDefault] = item.sParamDefault; /* 默认值 */
  2514 + jsonsWorkOrderParam[sParamNotEmpty] = item.bNotEmpty ? true : undefined;
  2515 + jsonsWorkOrderParam[sParamNotFirstEmpty] = item.bNotFirstEmpty ? true : undefined;
  2516 + jsonsWorkOrderParam[sParamReadOnly] = item.bReadonly ? true : undefined;
  2517 + jsonsWorkOrderParam[sParamAssFieldName] = commonUtils.isNotEmptyStr(item.sAssFieldName) ? item.sAssFieldName : undefined;
  2518 + jsonsWorkOrderParam[sParamFieldName] = commonUtils.isNotEmptyStr(item.sFieldName) ? item.sFieldName : undefined;
  2519 + jsonsWorkOrderParam[sParamNotZero] = item.bNotZero ? true : undefined;
  2520 + jsonsWorkOrderParam[sParamDropDownType] = commonUtils.isNotEmptyStr(item.sDropDownType) ? item.sDropDownType : undefined;
  2521 + jsonsWorkOrderParam[sParamAssignField] = commonUtils.isNotEmptyStr(item.sAssignField) ? item.sAssignField : undefined;
  2522 + jsonsWorkOrderParam[sParamSqlCondition] = commonUtils.isNotEmptyStr(item.sSqlCondition) ? item.sSqlCondition : undefined;
  2523 + jsonsWorkOrderParam[sParamKeyUpFilter] = commonUtils.isNotEmptyStr(item.sKeyUpFilter) ? item.sKeyUpFilter : undefined;
  2524 + if (commonUtils.isNotEmptyObject(childParamObj)) {
  2525 + jsonsWorkOrderParam[sParamDropDownKey] = childParamObj;
  2526 + }
  2527 + jsonsWorkOrderParam[sParamsColumnConfig] = item.sColumnConfig; /* 表格配置 */
  2528 + } else if (item.sType === '4') { /* 标准书参数 */
  2529 + jsonsNormParam[key] = item.sParam;
  2530 + jsonsNormParam[sParamDefault] = item.sParamDefault; /* 默认值 */
  2531 + jsonsNormParam[sParamNotEmpty] = item.bNotEmpty ? true : undefined;
  2532 + jsonsNormParam[sParamNotFirstEmpty] = item.bNotFirstEmpty ? true : undefined;
  2533 + jsonsNormParam[sParamReadOnly] = item.bReadonly ? true : undefined;
  2534 + jsonsNormParam[sParamAssFieldName] = commonUtils.isNotEmptyStr(item.sAssFieldName) ? item.sAssFieldName : undefined;
  2535 + jsonsNormParam[sParamFieldName] = commonUtils.isNotEmptyStr(item.sFieldName) ? item.sFieldName : undefined;
  2536 + jsonsNormParam[sParamNotZero] = item.bNotZero ? true : undefined;
  2537 + jsonsNormParam[sParamDropDownType] = commonUtils.isNotEmptyStr(item.sDropDownType) ? item.sDropDownType : undefined;
  2538 + jsonsNormParam[sParamAssignField] = commonUtils.isNotEmptyStr(item.sAssignField) ? item.sAssignField : undefined;
  2539 + jsonsNormParam[sParamSqlCondition] = commonUtils.isNotEmptyStr(item.sSqlCondition) ? item.sSqlCondition : undefined;
  2540 + jsonsNormParam[sParamKeyUpFilter] = commonUtils.isNotEmptyStr(item.sKeyUpFilter) ? item.sKeyUpFilter : undefined;
  2541 + if (commonUtils.isNotEmptyObject(childParamObj)) {
  2542 + jsonsNormParam[sParamDropDownKey] = childParamObj;
  2543 + }
  2544 + jsonsNormParam[sParamsColumnConfig] = item.sColumnConfig; /* 表格配置 */
  2545 + } else if (item.sType === '5') { /* 测试参数 */
  2546 + jsonsTestParam[key] = item.sParam;
  2547 + jsonsTestParam[sParamDefault] = item.sParamDefault; /* 默认值 */
  2548 + jsonsTestParam[sParamNotEmpty] = item.bNotEmpty ? true : undefined;
  2549 + jsonsTestParam[sParamNotFirstEmpty] = item.bNotFirstEmpty ? true : undefined;
  2550 + jsonsTestParam[sParamReadOnly] = item.bReadonly ? true : undefined;
  2551 + jsonsTestParam[sParamAssFieldName] = commonUtils.isNotEmptyStr(item.sAssFieldName) ? item.sAssFieldName : undefined;
  2552 + jsonsTestParam[sParamFieldName] = commonUtils.isNotEmptyStr(item.sFieldName) ? item.sFieldName : undefined;
  2553 + jsonsTestParam[sParamNotZero] = item.bNotZero ? true : undefined;
  2554 + jsonsTestParam[sParamDropDownType] = commonUtils.isNotEmptyStr(item.sDropDownType) ? item.sDropDownType : undefined;
  2555 + jsonsTestParam[sParamAssignField] = commonUtils.isNotEmptyStr(item.sAssignField) ? item.sAssignField : undefined;
  2556 + jsonsTestParam[sParamSqlCondition] = commonUtils.isNotEmptyStr(item.sSqlCondition) ? item.sSqlCondition : undefined;
  2557 + jsonsTestParam[sParamKeyUpFilter] = commonUtils.isNotEmptyStr(item.sKeyUpFilter) ? item.sKeyUpFilter : undefined;
  2558 + if (commonUtils.isNotEmptyObject(childParamObj)) {
  2559 + jsonsTestParam[sParamDropDownKey] = childParamObj;
  2560 + }
  2561 + jsonsTestParam[sParamsColumnConfig] = item.sColumnConfig; /* 表格配置 */
  2562 + }
  2563 + });
  2564 +
  2565 + if (commonUtils.isNotEmptyObject(jsonsReportParam)) {
  2566 + sReportParamStr = JSON.stringify(jsonsReportParam);
  2567 + masterData.sReportParam = sReportParamStr;
  2568 + masterData.handleType = commonUtils.isEmpty(masterData.handleType) ? 'update' : masterData.handleType;
  2569 + } else {
  2570 + masterData.sReportParam = '';
  2571 + }
  2572 + if (commonUtils.isNotEmptyObject(jsonsProcessParam)) {
  2573 + sProcessParamStr = JSON.stringify(jsonsProcessParam);
  2574 + masterData.sProcessParam = sProcessParamStr;
  2575 + masterData.handleType = commonUtils.isEmpty(masterData.handleType) ? 'update' : masterData.handleType;
  2576 + } else {
  2577 + masterData.sProcessParam = '';
  2578 + }
  2579 + if (commonUtils.isNotEmptyObject(jsonsWorkOrderParam)) {
  2580 + sWorkOrderParamStr = JSON.stringify(jsonsWorkOrderParam);
  2581 + masterData.sWorkOrderParam = sWorkOrderParamStr;
  2582 + masterData.handleType = commonUtils.isEmpty(masterData.handleType) ? 'update' : masterData.handleType;
  2583 + } else {
  2584 + masterData.sWorkOrderParam = '';
  2585 + }
  2586 + if (commonUtils.isNotEmptyObject(jsonsNormParam)) {
  2587 + sNormParamStr = JSON.stringify(jsonsNormParam);
  2588 + masterData.sNormParam = sNormParamStr;
  2589 + masterData.handleType = commonUtils.isEmpty(masterData.handleType) ? 'update' : masterData.handleType;
  2590 + } else {
  2591 + masterData.sNormParam = '';
  2592 + }
  2593 + if (commonUtils.isNotEmptyObject(jsonsTestParam)) {
  2594 + sTestParamStr = JSON.stringify(jsonsTestParam);
  2595 + masterData.sTestParam = sTestParamStr;
  2596 + masterData.handleType = commonUtils.isEmpty(masterData.handleType) ? 'update' : masterData.handleType;
  2597 + } else {
  2598 + masterData.sTestParam = '';
  2599 + }
  2600 + data.splice(0);
  2601 + data.push(commonBusiness.mergeData('master', masterConfig.sTbName, [masterData]));
  2602 + }
  2603 +
  2604 + data.push(commonBusiness.mergeData('machine', machineConfig.sTbName, machineData, machineDelData));
  2605 + data.push(commonBusiness.mergeData('assort', assortConfig.sTbName, assortData, assortDelData));
  2606 + data.push(commonBusiness.mergeData('outside', outsideConfig.sTbName, outsideData, outsideDelData));
  2607 + data.push(commonBusiness.mergeData('processstyleConfig', processstyleConfig.sTbName, processstyleData, processstyleDelData));
  2608 + data.push(commonBusiness.mergeData('processApsRuleConfig', processApsRuleConfig.sTbName, processApsRuleData, processApsRuleDelData));
  2609 + data.push(commonBusiness.mergeData('dynamicParamConfig', dynamicParamConfig.sTbName, dynamicParamData, dynamicParamDelData));
  2610 + } else if (sModelsType === 'element/printInfo') {
  2611 + if (!commonBusiness.validateTable(picFileConfig, picFileData, this.props, '2') || !commonBusiness.validateTable(stockConfig, stockData, this.props, '3') || !commonBusiness.validateTable(customerInfoConfig, customerInfoData, this.props, '4')) {
  2612 + return;
  2613 + }
  2614 + data.push(commonBusiness.mergeData('picFile', picFileConfig.sTbName, picFileData, picFileDelData));
  2615 + data.push(commonBusiness.mergeData('stock', stockConfig.sTbName, stockData, stockDelData));
  2616 + data.push(commonBusiness.mergeData('customerInfo', customerInfoConfig.sTbName, customerInfoData, customerInfoDelData));
  2617 + } else if (sModelsType === 'element/knifemouldInfo') {
  2618 + if (!commonBusiness.validateTable(eleknifemouldproductConfig, eleknifemouldproductData, this.props, '2') || !commonBusiness.validateTable(eleknifemouldfileConfig, eleknifemouldfileData, this.props, '3')) {
  2619 + return;
  2620 + }
  2621 + data.push(commonBusiness.mergeData('eleknifemouldproduct', eleknifemouldproductConfig.sTbName, eleknifemouldproductData, eleknifemouldproductDelData));
  2622 + data.push(commonBusiness.mergeData('eleknifemouldfile', eleknifemouldfileConfig.sTbName, eleknifemouldfileData, eleknifemouldfileDelData));
  2623 + } else if (sModelsType === 'element/eleteststandInfo') {
  2624 + if (!commonBusiness.validateTable(eleteststandarditemConfig, eleteststandarditemData, this.props, '2')) {
  2625 + return;
  2626 + }
  2627 + data.push(commonBusiness.mergeData('eleteststandarditem', eleteststandarditemConfig.sTbName, eleteststandarditemData, eleteststandarditemDelData));
  2628 + } else if (sModelsType === 'element/siscommonstyle') {
  2629 + if (!commonBusiness.validateTable(siscommonstyleproductclassifyConfig, siscommonstyleproductclassifyData, this.props, '2')) {
  2630 + return;
  2631 + }
  2632 + data.push(commonBusiness.mergeData('siscommonstyleproductclassify', siscommonstyleproductclassifyConfig.sTbName, siscommonstyleproductclassifyData, siscommonstyleproductclassifyDelData));
  2633 + } else if (sModelsType === 'element/teamInfo') {
  2634 + if (!commonBusiness.validateTable(eleemployeeConfig, eleemployeeData, this.props, '2') || !commonBusiness.validateTable(elemachineConfig, elemachineData, this.props, '3')) {
  2635 + return;
  2636 + }
  2637 + data.push(commonBusiness.mergeData('eleemployee', eleemployeeConfig.sTbName, eleemployeeData, eleemployeeDelData));
  2638 + data.push(commonBusiness.mergeData('elemachine', elemachineConfig.sTbName, elemachineData, elemachineDelData));
  2639 + } else if (sModelsType === 'element/sftloginInfo') {
  2640 + if (!commonBusiness.validateTable(jurgroupConfig, jurgroupData, this.props, '2') || !commonBusiness.validateTable(customergroupConfig, customergroupData, this.props, '3') || !commonBusiness.validateTable(supplygroupConfig, supplygroupData, this.props, '4') || !commonBusiness.validateTable(persongroupConfig, persongroupData, this.props, '5') || !commonBusiness.validateTable(processgroupConfig, processgroupData, this.props, '6') || !commonBusiness.validateTable(drivergroupConfig, drivergroupData, this.props, '7')
  2641 + || !commonBusiness.validateTable(drivergroupConfig, departgroupData, this.props, '8') || !commonBusiness.validateTable(approveGroupConfig, approveGroupData, this.props, '9')) {
  2642 + return;
  2643 + }
  2644 + data.push(commonBusiness.mergeData('jurgroup', jurgroupConfig.sTbName, jurgroupOldData, jurgroupOldDelData));
  2645 + data.push(commonBusiness.mergeData('customergroup', customergroupConfig.sTbName, customergroupOldData, customergroupOldDelData));
  2646 + data.push(commonBusiness.mergeData('supplygroup', supplygroupConfig.sTbName, supplygroupOldData, supplygroupOldDelData));
  2647 + data.push(commonBusiness.mergeData('persongroup', persongroupConfig.sTbName, persongroupOldData, persongroupOldDelData));
  2648 + data.push(commonBusiness.mergeData('processgroup', processgroupConfig.sTbName, processgroupOldData, processgroupOldDelData));
  2649 + data.push(commonBusiness.mergeData('drivergroup', drivergroupConfig.sTbName, drivergroupOldData, drivergroupOldDelData));
  2650 + data.push(commonBusiness.mergeData('departgroup', departgroupConfig.sTbName, departgroupOldData, departgroupOldDelData));
  2651 + data.push(commonBusiness.mergeData('approveGroup', approveGroupConfig.sTbName, approveGroupOldData, approveGroupOldDelData));
  2652 + } else if (sModelsType === 'element/checkModelInfo') {
  2653 + if (!commonBusiness.validateTable(userConfig, userData, this.props, '2') || !commonBusiness.validateTable(phaseConfig, phaseData, this.props, '3') || !commonBusiness.validateTable(conditionConfig, conditionData, this.props, '4')) {
  2654 + return;
  2655 + }
  2656 + data.push(commonBusiness.mergeData('user', userConfig.sTbName, userData, userDelData));
  2657 + data.push(commonBusiness.mergeData('phase', phaseConfig.sTbName, phaseData, phaseDelData));
  2658 + data.push(commonBusiness.mergeData('condition', conditionConfig.sTbName, conditionData, conditionDelData));
  2659 + } else if (sModelsType === 'element/checkPhaseInfo') {
  2660 + if (!commonBusiness.validateTable(sischeckphaselogininfoConfig, userData, this.props, '2')) {
  2661 + return;
  2662 + }
  2663 + data.push(commonBusiness.mergeData('sischeckphaselogininfo', sischeckphaselogininfoConfig.sTbName, sischeckphaselogininfoData, sischeckphaselogininfoDelData));
  2664 + } else if (sModelsType === 'element/sisproductclassify') {
  2665 + if (!commonBusiness.validateTable(sisproductclassifyProcessClassifyConfig, sisproductclassifyProcessClassifyData, this.props, '2')) {
  2666 + return;
  2667 + }
  2668 + data.push(commonBusiness.mergeData('sisproductclassifyProcessClassify', sisproductclassifyProcessClassifyConfig.sTbName, sisproductclassifyProcessClassifyData, sisproductclassifyProcessClassifyDelData));
  2669 + } else if (sModelsType === 'system/sisformulaInfo') {
  2670 + const bResult = await this.handleField();
  2671 + if (!bResult) {
  2672 + this.props.onSaveState({
  2673 + loading: false,
  2674 + });
  2675 + return;
  2676 + }
  2677 + if (commonUtils.isNotEmptyArr(customizeParamName)) {
  2678 + let customizeParamDataNew = [];
  2679 + let customizeParamDelDataNew = [];
  2680 + customizeParamName.forEach((paramName) => {
  2681 + const { [`${paramName}Data`]: cpData = [], [`${paramName}DelData`]: cpdData = [] } = this.props;
  2682 + customizeParamDataNew = [...customizeParamDataNew, ...cpData];
  2683 + customizeParamDelDataNew = [...customizeParamDelDataNew, ...cpdData];
  2684 + if (paramName === 'customizeParam' && commonUtils.isEmptyObject(customizeParamConfig.sTbName)) {
  2685 + customizeParamConfig.sTbName = 'sisformulacustomizeparam';
  2686 + }
  2687 + });
  2688 + data.push(commonBusiness.mergeData('customizeParam', customizeParamConfig.sTbName, customizeParamDataNew, customizeParamDelDataNew));
  2689 + } else if (commonUtils.isNotEmptyObject(customizeParamConfig)) {
  2690 + data.push(commonBusiness.mergeData('customizeParam', customizeParamConfig.sTbName, customizeParamData, customizeParamDelData));
  2691 + }
  2692 + } else if (sModelsType === 'smg/sendMailMsg') {
  2693 + masterData.sContent = masterData.sContentMemo;
  2694 + masterData.sType = '1';
  2695 + // masterData.sCheckPerson = masterData.sUserIds;
  2696 + data.splice(0);
  2697 + data.push(commonBusiness.mergeData('master', masterConfig.sTbName, [masterData]));
  2698 + let sUserIds;
  2699 + if (typeof masterData.sUserIds === 'string') {
  2700 + sUserIds = masterData.sUserIds.split(',');
  2701 + } else {
  2702 + sUserIds = masterData.sUserIds;
  2703 + }
  2704 + const sysmsguserData = [];
  2705 + if (commonUtils.isNotEmptyArr(sUserIds)) {
  2706 + const spid = masterData.sId;
  2707 + sUserIds.forEach((key) => {
  2708 + const smguserData = {};
  2709 + smguserData.sParentId = spid;
  2710 + smguserData.sId = commonUtils.createSid();
  2711 + smguserData.sUserId = key;
  2712 + smguserData.bReply = false;
  2713 + smguserData.bIsView = false;
  2714 + smguserData.handleType = 'add';
  2715 + sysmsguserData.push(smguserData);
  2716 + });
  2717 + }
  2718 + data.push(commonBusiness.mergeData('sysmsguser', sysmsguserConfig.sTbName, sysmsguserData, []));
  2719 + // commonFunc.sendWebSocketMessage(webSocket, key, 'sendMsg', 'reflush', this.props.app.userinfo.sId, null, null, sUserIds.join(','), null);
  2720 + } else if (sModelsType === 'element/machineInfo') {
  2721 + if (!commonBusiness.validateTable(slaveConfig, slaveData, this.props, '3')) {
  2722 + return;
  2723 + }
  2724 + data.push(commonBusiness.mergeData('slave', slaveConfig.sTbName, slaveData, slaveDelData));
  2725 + data.push(commonBusiness.mergeData('slave0', slave0Config.sTbName, slave0Data, slave0DelData));
  2726 + if (commonUtils.isNotEmptyArr(slaveInfoList)) {
  2727 + slaveInfoList.forEach((name) => {
  2728 + const tbName = name.replace('Config', '');
  2729 + const { [`${tbName}Config`]: tableConfig, [`${tbName}Data`]: tableData, [`${tbName}DelData`]: tableDelData } = this.props;
  2730 + if (tableConfig && tableConfig.sTbName && tableConfig.sSqlStr !== 'noQuery') {
  2731 + const tableDataNew = tbName === 'master' ? [tableData] : tableData;
  2732 + data.push(commonBusiness.mergeData(tbName, tableConfig.sTbName, tableDataNew, tableDelData));
  2733 + }
  2734 + });
  2735 + console.log('data', data);
  2736 + }
  2737 + this.props.onSaveState({
  2738 + isEnabledPlcNo: false,
  2739 + });
  2740 + }
  2741 + this.handleSaveData({ data, sClientType: '1', sSysLogSrcId: masterData.sId });
  2742 + }
  2743 + });
  2744 + };
  2745 + /** toolbar保存 */
  2746 + handleSaveData = async (params) => {
  2747 + const {
  2748 + app, currentId, token, sModelsId, masterData, billnosetting, sModelsType, dispatch,
  2749 + } = this.props;
  2750 + const { webSocket, userinfo, currentPane } = app;
  2751 + const { key } = currentPane;
  2752 + const returnData = await commonBusiness.saveData({ token, value: params, sModelsId });
  2753 + if (commonUtils.isNotEmptyObject(returnData)) {
  2754 + // 释放数据操作权限
  2755 + commonFunc.sendWebSocketMessage(webSocket, key, 'release', 'noAction', userinfo.sId, null, currentId, userinfo.sId, null);
  2756 + this.props.onSaveState({
  2757 + enabled: false, currentId: masterData.sId === undefined ? masterData.sid : masterData.sId,
  2758 + });
  2759 + // 保存后更新panes,currentPane的checkedId,防止浏览器刷新时重新又变成新增。
  2760 + const iPaneIndex = app.panes.findIndex(item => item.key === app.currentPane.key);
  2761 + app.panes[iPaneIndex].checkedId = masterData.sId;
  2762 + app.currentPane.checkedId = masterData.sId;
  2763 + if (commonUtils.isNotEmptyArr(app.panes)) { /* 处理选择窗体通过新增 复制跳转到基础信息,保存后 选择窗体在基础信息界面显示 导致Modal关闭不掉bug */
  2764 + for (const each of app.panes) {
  2765 + each.notCurrentPane = true;
  2766 + }
  2767 + }
  2768 + dispatch({ type: 'app/savePanesAndCurrentPane', payload: { panes: app.panes, currentPane: app.currentPane } });
  2769 +
  2770 + commonUtils.clearStoreDropDownData();
  2771 + /* 新记录时,关闭后能自动带值 */
  2772 + const callBackRecord = this.props.app.currentPane.newRecordMethod;
  2773 + if (callBackRecord !== undefined) {
  2774 + const sId = masterData.sId === undefined ? masterData.sid : masterData.sId;/* sId */
  2775 + /* 回调 传[新增的数据sId] */
  2776 + if (this.props.app.currentPane.newRecordMethod !== undefined) {
  2777 + this.props.app.currentPane.newRecordMethod(sId);
  2778 + }
  2779 + }
  2780 + if (billnosetting.bAutoCheck) {
  2781 + this.handleAudit(1);
  2782 + } else {
  2783 + this.handleGetTableData();
  2784 + if (this.props.app.currentPane.refresh !== undefined) {
  2785 + this.props.app.currentPane.refresh();
  2786 + }
  2787 + }
  2788 + if (sModelsType === 'smg/sendMailMsg') {
  2789 + this.props.handleSendSocketMessage('reflush', 'showImg', currentId, masterData.sUserIds, '您有消息待审核', null);
  2790 + }
  2791 + this.props.onSaveState({
  2792 + loading: false,
  2793 + });
  2794 + return true;
  2795 + } else {
  2796 + this.props.onSaveState({
  2797 + loading: false,
  2798 + });
  2799 + return false;
  2800 + }
  2801 + };
  2802 + /** toolbar审核(消审) */
  2803 + handleAudit = (flag) => {
  2804 + /* 待用数据声明 */
  2805 + const { masterData, gdsformconst } = this.props;
  2806 + /* 作废订单不能审核 */
  2807 + if (masterData.bInvalid) {
  2808 + message.warning(gdsformconst.filter(item => (item.sName === 'sToVoid'))[0].showName);
  2809 + return '';
  2810 + }
  2811 + /** 数据审核 */
  2812 + this.dataAudit(flag);
  2813 + };
  2814 + /** 数据审核 */
  2815 + dataAudit = async (flag, tmpCheck, isWait) => {
  2816 + message.destroy();
  2817 + /* 待用数据声明 */
  2818 + const {
  2819 + sModelsId, masterData, app, masterConfig, token, sModelsType, controlConfig, materialsConfig, processConfig,
  2820 + contactConfig, addressConfig,
  2821 + } = this.props;
  2822 + /* 数据参数 */
  2823 + const value = {
  2824 + sClientType: '1',
  2825 + paramsMap: {
  2826 + iFlag: flag,
  2827 + iTmpCheck: commonUtils.isEmptyNumber(tmpCheck) ? 0 : tmpCheck,
  2828 + sFormGuid: sModelsId,
  2829 + sGuid: masterData.sId,
  2830 + },
  2831 + };
  2832 + /* 数据审核 */
  2833 + const url = `${commonConfig.server_host}business/doExamine?sModelsId=${sModelsId}`;
  2834 + const returnData = (await commonServices.postValueService(app.token, value, url)).data;
  2835 + if (isWait) {
  2836 + return returnData;
  2837 + } else {
  2838 + /* 接收返回值 */
  2839 + if (returnData.code === 1) { /* 成功 */
  2840 + this.props.onSaveState({
  2841 + loading: false,
  2842 + });
  2843 + if (flag === 1) {
  2844 + /* 审核 */
  2845 + const { outData } = returnData.dataset.rows[0].dataSet;
  2846 + if (outData[0].sCode === -1) {
  2847 + message.error(commonFunc.showMessage(app.commonConst, 'BtnExamine') + outData[0].sReturn);/* 审核 */
  2848 + return;
  2849 + }
  2850 + if (commonUtils.isNotEmptyStr(outData[0].sReturn)) {
  2851 + const sReturnArray = outData[0].sReturn.split('|');
  2852 + const checkConditions = [];
  2853 + let checkPersonData = {};
  2854 + sReturnArray.forEach((item) => {
  2855 + const checkCondition = item.split('-')[2];
  2856 + checkConditions.push({
  2857 + key: commonUtils.createSid(),
  2858 + condition: checkCondition,
  2859 + });
  2860 + });
  2861 + const sCheckModelId = sReturnArray[0].split('-')[1];
  2862 + if (commonUtils.isNotEmptyStr(sCheckModelId)) {
  2863 + const urlCheck = `${commonConfig.server_host}checkModel/getUserListByModelId/${sCheckModelId}?sModelsId=${sModelsId}`;
  2864 + const dataReturn = (await commonServices.getService(token, urlCheck)).data;
  2865 + if (dataReturn.code === 1) {
  2866 + checkPersonData = dataReturn.dataset.rows;
  2867 + checkPersonData.forEach((item) => {
  2868 + item.key = commonUtils.createSid();
  2869 + });
  2870 + this.props.onSaveState({
  2871 + checkConditions, checkPersonData, sCheckModelId, visible: true,
  2872 + });
  2873 + } else { /* 失败 */
  2874 + this.props.getServiceError({ msg: commonFunc.showMessage(app.commonConst, 'BtnExamine') + dataReturn }); /* 审核 */
  2875 + }
  2876 + }
  2877 + } else {
  2878 + this.handleGetTableData();
  2879 + message.success(commonFunc.showMessage(app.commonConst, 'BtnExamine') + returnData.msg);/* 审核 */
  2880 + }
  2881 + } else {
  2882 + /* 消审 */
  2883 + // this.handleGetData(masterConfig, slaveConfig, checkConfig);
  2884 + if (sModelsType === 'element/customerInfo') { /* 客户审核、消审 */
  2885 + this.handleGetData(masterConfig, contactConfig, addressConfig);
  2886 + }
  2887 + if (sModelsType.includes('sales/salesOrder') && !commonUtils.isEmpty(controlConfig)) {
  2888 + this.handleGetMemoData(controlConfig, materialsConfig, processConfig);
  2889 + }
  2890 + const { outData } = returnData.dataset.rows[0].dataSet;
  2891 + if (commonUtils.isNotEmptyStr(outData[0].sReturn)) {
  2892 + message.error(outData[0].sReturn);
  2893 + } else {
  2894 + message.success(commonFunc.showMessage(app.commonConst, 'BtnCancelExamine') + returnData.msg); /* 消审 */
  2895 + }
  2896 + }
  2897 + } else { /* 失败 */
  2898 + this.props.getServiceError(returnData); /* 审核或消审 */
  2899 + this.props.onSaveState({
  2900 + loading: false,
  2901 + });
  2902 + }
  2903 + return true;
  2904 + }
  2905 + };
  2906 + /** 表单回带 */
  2907 + handleForm = (form) => {
  2908 + this.form = form;
  2909 + };
  2910 + /* 上一条、下一条、首条、末条 */
  2911 + handleSearchData = async (handleType) => {
  2912 + const {
  2913 + sModelsId, app, currentIndexFlag, currentPageNo,
  2914 + } = this.props;
  2915 + const { currentPane, token } = app;
  2916 + const {
  2917 + pages, sFilterOrderBy, bFilter, sListFormmasterId, currentIndex,
  2918 + } = currentPane;
  2919 +
  2920 + let currentPosition = currentIndexFlag ? currentPageNo : commonUtils.isEmptyObject(pages) ? 1 : (((pages.current - 1) * commonConfig.pageSize) + Number.parseInt(currentIndex, 10)) + 1;
  2921 + if (commonUtils.isEmptyObject(pages) || commonUtils.isEmptyNumber(pages.total)) {
  2922 + if (handleType === 'next' || handleType === 'end') {
  2923 + message.warning('当前已是最后一条数据');
  2924 + return;
  2925 + } else {
  2926 + message.warning('当前已是第一条数据');
  2927 + return;
  2928 + }
  2929 + }
  2930 + if (currentIndex === undefined) {
  2931 + currentPosition = 1;
  2932 + if (handleType === 'next') {
  2933 + currentPosition = pages.total;
  2934 + }
  2935 + }
  2936 + if (handleType === 'first') {
  2937 + currentPosition = 1;
  2938 + } else if (handleType === 'end') {
  2939 + currentPosition = pages.total;
  2940 + }
  2941 +
  2942 + const value = {
  2943 + sClientType: '1',
  2944 + sFilterOrderBy,
  2945 + bFilter,
  2946 + sListFormmasterId,
  2947 + currentPosition,
  2948 + handleType,
  2949 + iCountSum: pages.total,
  2950 + };
  2951 + const url = `${commonConfig.server_host}business/getBusinessDataByIndex?sModelsId=${sModelsId}`;
  2952 + /* 接收返回值 */
  2953 + const { data } = await commonServices.postValueService(token, value, url);
  2954 + /* 接收返回值 */
  2955 + /* 成功的话刷新页面(同步主表和从表数据),不成功就弹出错误提示 */
  2956 + if (data.code === 1) {
  2957 + /* 数据查询成功 */
  2958 + const returnData = data.dataset.rows[0];
  2959 + this.props.onSaveState({
  2960 + currentIndexFlag: true,
  2961 + currentPageNo: returnData.currentPosition,
  2962 + currentId: returnData.sId,
  2963 + searchUpDownData: {},
  2964 + slaveSelectedRowKeys: [],
  2965 + });
  2966 + this.handleGetTableData();
  2967 + } else { /* 失败 */
  2968 + this.props.getServiceError(data);
  2969 + }
  2970 + };
  2971 + /* 切换作废状态 */
  2972 + handleOkChangeInvaild = async (props) => {
  2973 + const {
  2974 + currentId, sModelsId, masterData, masterConfig, handleType,
  2975 + } = props;
  2976 + const sId = currentId !== undefined ? currentId : '';
  2977 + const value = {
  2978 + sClientType: '1',
  2979 + sId: [sId],
  2980 + sTableName: masterConfig.sTbName,
  2981 + handleType,
  2982 + sBooleanCheck: false,
  2983 + };
  2984 + const url = `${commonConfig.server_host}checkModel/updatebInvalid?sModelsId=${sModelsId}`;
  2985 + const { data } = await commonServices.postValueService(props.app.token, value, url);
  2986 + if (data.code === 1) {
  2987 + message.success(data.msg);
  2988 + masterData.bInvalid = handleType === 'toVoid'; /* 作废状态 */
  2989 + props.onSaveState({ masterData });
  2990 + /* 审核(消审)后刷新跳转路由数据(commonList)的数据 */
  2991 + if (props.app.currentPane.refresh !== undefined) {
  2992 + props.app.currentPane.refresh();
  2993 + }
  2994 + commonUtils.clearStoreDropDownData();/* 清除所有下拉框缓存 */
  2995 + } else {
  2996 + props.getServiceError(data);
  2997 + }
  2998 + };
  2999 +
  3000 + /* 作废、取消作废的公用函数 */
  3001 + handleInvalid = (obj) => {
  3002 + const props = { ...this.props, ...this.state, ...obj };
  3003 + const onOkInvaild = this.handleOkChangeInvaild;
  3004 + confirm({
  3005 + title: obj.title,
  3006 + onOk() {
  3007 + onOkInvaild(props);
  3008 + },
  3009 + onCancel() {
  3010 + },
  3011 + });
  3012 + };
  3013 + /** 点击新增按钮 */
  3014 + handleAdd = async (config, copyTo, isWait) => {
  3015 + /* 外置处理业务 */
  3016 + const { sModelsId, sModelsType } = this.props;
  3017 + let masterConfig = commonUtils.isEmptyObject(config) ? {} : config.masterConfig;
  3018 + if (!isWait) {
  3019 + masterConfig = this.props.masterConfig;
  3020 + }
  3021 + let masterData = commonFunc.getDefaultData(masterConfig);
  3022 + masterData.handleType = 'add';
  3023 + masterData.sId = commonUtils.createSid();
  3024 + masterData.sFormId = sModelsId;
  3025 + if (commonUtils.isNotEmptyObject(copyTo)) {
  3026 + const masterOldData = JSON.parse(JSON.stringify(copyTo.masterData));
  3027 + masterData = copyTo.masterData;
  3028 + delete masterData.tCreateDate;
  3029 + masterData.handleType = 'add';
  3030 + masterData.sId = commonUtils.createSid();
  3031 + masterData.sFormId = sModelsId;
  3032 + let state = {};
  3033 + if (sModelsType === 'element/materialsInfo') {
  3034 + masterData.maxBillNo = 'sMaterialsNo';
  3035 + delete masterData.sMaterialsNo;
  3036 + delete masterData.bCheck;
  3037 + const supplyData = copyTo.supplyData;
  3038 + supplyData.forEach((tableDataRow) => {
  3039 + tableDataRow.handleType = 'add';
  3040 + tableDataRow.sId = commonUtils.createSid();
  3041 + tableDataRow.key = tableDataRow.sId;
  3042 + tableDataRow.sParentId = masterData.sId;
  3043 + tableDataRow.sFormId = sModelsId;
  3044 + tableDataRow.sMaterialsId = masterData.sId;
  3045 + });
  3046 + const stockData = copyTo.stockData;
  3047 + stockData.forEach((tableDataRow) => {
  3048 + tableDataRow.handleType = 'add';
  3049 + tableDataRow.sId = commonUtils.createSid();
  3050 + tableDataRow.key = tableDataRow.sId;
  3051 + tableDataRow.sParentId = masterData.sId;
  3052 + tableDataRow.sFormId = sModelsId;
  3053 + tableDataRow.sMaterialsId = masterData.sId;
  3054 + });
  3055 + state = {
  3056 + masterData,
  3057 + supplyData,
  3058 + stockData,
  3059 + enabled: true,
  3060 + };
  3061 + } else if (sModelsType === 'element/customerInfo') {
  3062 + masterData.maxBillNo = 'sCustomerNo';
  3063 + delete masterData.sCustomerNo;
  3064 + delete masterData.bCheck;
  3065 + const contactData = copyTo.contactData;
  3066 + contactData.forEach((tableDataRow) => {
  3067 + tableDataRow.handleType = 'add';
  3068 + tableDataRow.sId = commonUtils.createSid();
  3069 + tableDataRow.sParentId = masterData.sId;
  3070 + tableDataRow.sFormId = sModelsId;
  3071 + });
  3072 + const addressData = copyTo.addressData;
  3073 + addressData.forEach((tableDataRow) => {
  3074 + tableDataRow.handleType = 'add';
  3075 + tableDataRow.sId = commonUtils.createSid();
  3076 + tableDataRow.sParentId = masterData.sId;
  3077 + tableDataRow.sFormId = sModelsId;
  3078 + });
  3079 + state = {
  3080 + masterData,
  3081 + contactData,
  3082 + addressData,
  3083 + enabled: true,
  3084 + };
  3085 + } else if (sModelsType === 'element/printInfo') {
  3086 + masterData.sSrcProductNo = masterOldData.sProductNo; /* 产品编号赋到原产品编号 */
  3087 + masterData.maxBillNo = 'sProductNo';
  3088 + delete masterData.sProductNo;
  3089 + delete masterData.bCheck;
  3090 + const picFileData = copyTo.picFileData;
  3091 + picFileData.forEach((tableDataRow) => {
  3092 + tableDataRow.handleType = 'add';
  3093 + tableDataRow.sId = commonUtils.createSid();
  3094 + tableDataRow.sParentId = masterData.sId;
  3095 + tableDataRow.sFormId = sModelsId;
  3096 + tableDataRow.sProductId = masterData.sId;
  3097 + tableDataRow.sCustomerId = masterData.sCustomerId;
  3098 + });
  3099 + const stockData = copyTo.stockData;
  3100 + stockData.forEach((tableDataRow) => {
  3101 + tableDataRow.handleType = 'add';
  3102 + tableDataRow.sId = commonUtils.createSid();
  3103 + tableDataRow.sParentId = masterData.sId;
  3104 + tableDataRow.sFormId = sModelsId;
  3105 + tableDataRow.sProductId = masterData.sId;
  3106 + tableDataRow.sCustomerId = masterData.sCustomerId;
  3107 + });
  3108 + const customerInfoData = copyTo.customerInfoData;
  3109 + customerInfoData.forEach((tableDataRow) => {
  3110 + tableDataRow.handleType = 'add';
  3111 + tableDataRow.sId = commonUtils.createSid();
  3112 + tableDataRow.sParentId = masterData.sId;
  3113 + tableDataRow.sFormId = sModelsId;
  3114 + tableDataRow.sProductId = masterData.sId;
  3115 + });
  3116 + state = {
  3117 + masterData,
  3118 + picFileData,
  3119 + stockData,
  3120 + customerInfoData,
  3121 + enabled: true,
  3122 + };
  3123 + } else if (sModelsType === 'element/employeeInfo') {
  3124 + masterData.maxBillNo = 'sEmployeeNo';
  3125 + delete masterData.sEmployeeNo;
  3126 + delete masterData.bCheck;
  3127 + state = {
  3128 + masterData,
  3129 + enabled: true,
  3130 + };
  3131 + } else if (sModelsType === 'element/sisproductclassify') {
  3132 + masterData.maxBillNo = 'sNo';
  3133 + delete masterData.sNo;
  3134 + delete masterData.bCheck;
  3135 + const masterDataOld = copyTo.masterData;
  3136 + if (commonUtils.isNotEmptyObject(masterDataOld.sAllId)) {
  3137 + const treeCopyNodes = new Map();
  3138 + const sAllOldId = masterDataOld.sAllId;
  3139 + const arr = sAllOldId.split(',');
  3140 + const newId = masterData.sId;
  3141 + const sOldId = masterDataOld.sId;
  3142 + let sOldParentId = '';
  3143 + let sNewParentAllId = '';
  3144 + if (arr.length < 2) { /* 根节点复制 */
  3145 + masterData.sAllId = newId;
  3146 + sOldParentId = newId;
  3147 + sNewParentAllId = newId;
  3148 + } else {
  3149 + sOldParentId = arr[arr.length - 2];
  3150 + if (treeCopyNodes.has(sOldParentId)) {
  3151 + sNewParentAllId = treeCopyNodes.get(sOldParentId);
  3152 + } else {
  3153 + const obj = arr[arr.length - 1];
  3154 + sNewParentAllId = sAllOldId.replace((`,${obj}`), '');
  3155 + }
  3156 + const sNewArr = sNewParentAllId.split(',');
  3157 + masterData.sControlParentId = sNewArr[sNewArr.length - 1];
  3158 + sNewParentAllId = `${sNewParentAllId},${newId}`;
  3159 + masterData.sAllId = sNewParentAllId;
  3160 + }
  3161 + treeCopyNodes.set(sOldId, sNewParentAllId);
  3162 + }
  3163 + const sisproductclassifyProcessClassifyData = copyTo.sisproductclassifyProcessClassifyData;
  3164 + if (commonUtils.isNotEmptyArr(sisproductclassifyProcessClassifyData)) {
  3165 + sisproductclassifyProcessClassifyData.forEach((tableDataRow) => {
  3166 + tableDataRow.handleType = 'add';
  3167 + tableDataRow.sId = commonUtils.createSid();
  3168 + tableDataRow.sParentId = masterData.sId;
  3169 + tableDataRow.sFormId = sModelsId;
  3170 + });
  3171 + }
  3172 + state = {
  3173 + masterData,
  3174 + sisproductclassifyProcessClassifyData,
  3175 + enabled: true,
  3176 + };
  3177 + if (commonUtils.isNotEmptyObject(masterData.sAllPartsName)) {
  3178 + state.sisproductclassifyProcessClassifyConfig = this.handleChangeProductParteName(masterData.sAllPartsName, config.sisproductclassifyProcessClassifyConfig);
  3179 + }
  3180 + } else if (sModelsType === 'element/processInfo') {
  3181 + masterData.maxBillNo = 'sProcessNo';
  3182 + delete masterData.sProcessNo;
  3183 + delete masterData.bCheck;
  3184 + const machineData = copyTo.machineData;
  3185 + machineData.forEach((tableDataRow) => {
  3186 + tableDataRow.handleType = 'add';
  3187 + tableDataRow.sId = commonUtils.createSid();
  3188 + tableDataRow.sParentId = masterData.sId;
  3189 + tableDataRow.sFormId = sModelsId;
  3190 + });
  3191 + const assortData = copyTo.assortData;
  3192 + assortData.forEach((tableDataRow) => {
  3193 + tableDataRow.handleType = 'add';
  3194 + tableDataRow.sId = commonUtils.createSid();
  3195 + tableDataRow.sParentId = masterData.sId;
  3196 + tableDataRow.sFormId = sModelsId;
  3197 + });
  3198 + const outsideData = copyTo.outsideData;
  3199 + outsideData.forEach((tableDataRow) => {
  3200 + tableDataRow.handleType = 'add';
  3201 + tableDataRow.sId = commonUtils.createSid();
  3202 + tableDataRow.sParentId = masterData.sId;
  3203 + tableDataRow.sFormId = sModelsId;
  3204 + });
  3205 + const processstyleData = copyTo.processstyleData;
  3206 + processstyleData.forEach((tableDataRow) => {
  3207 + tableDataRow.handleType = 'add';
  3208 + tableDataRow.sId = commonUtils.createSid();
  3209 + tableDataRow.sParentId = masterData.sId;
  3210 + tableDataRow.sFormId = sModelsId;
  3211 + });
  3212 + const processApsRuleData = copyTo.processApsRuleData;
  3213 + processApsRuleData.forEach((tableDataRow) => {
  3214 + tableDataRow.handleType = 'add';
  3215 + tableDataRow.sId = commonUtils.createSid();
  3216 + tableDataRow.sParentId = masterData.sId;
  3217 + tableDataRow.sFormId = sModelsId;
  3218 + });
  3219 + const dynamicParamData = copyTo.dynamicParamData;
  3220 + dynamicParamData.forEach((tableDataRow) => {
  3221 + tableDataRow.handleType = 'add';
  3222 + tableDataRow.sId = commonUtils.createSid();
  3223 + tableDataRow.sParentId = masterData.sId;
  3224 + tableDataRow.sFormId = sModelsId;
  3225 + });
  3226 + state = {
  3227 + masterData,
  3228 + machineData,
  3229 + assortData,
  3230 + outsideData,
  3231 + processstyleData,
  3232 + processApsRuleData,
  3233 + dynamicParamData,
  3234 + enabled: true,
  3235 + };
  3236 + } else if (sModelsType === 'element/supplyInfo') {
  3237 + masterData.maxBillNo = 'sSupplyNo';
  3238 + delete masterData.sSupplyNo;
  3239 + delete masterData.bCheck;
  3240 + const contactData = copyTo.contactData;
  3241 + contactData.forEach((tableDataRow) => {
  3242 + tableDataRow.handleType = 'add';
  3243 + tableDataRow.sId = commonUtils.createSid();
  3244 + tableDataRow.sParentId = masterData.sId;
  3245 + tableDataRow.sFormId = sModelsId;
  3246 + });
  3247 + const addressData = copyTo.addressData;
  3248 + addressData.forEach((tableDataRow) => {
  3249 + tableDataRow.handleType = 'add';
  3250 + tableDataRow.sId = commonUtils.createSid();
  3251 + tableDataRow.sParentId = masterData.sId;
  3252 + tableDataRow.sFormId = sModelsId;
  3253 + });
  3254 + state = {
  3255 + masterData,
  3256 + contactData,
  3257 + addressData,
  3258 + enabled: true,
  3259 + };
  3260 + } else if (sModelsType === 'element/machineInfo') {
  3261 + masterData.maxBillNo = 'sMachineNo';
  3262 + delete masterData.sMachineNo;
  3263 + delete masterData.bCheck;
  3264 + state = {
  3265 + masterData,
  3266 + enabled: true,
  3267 + };
  3268 + } else if (sModelsType === 'element/teamInfo') {
  3269 + masterData.maxBillNo = 'sTeamNo';
  3270 + delete masterData.sTeamNo;
  3271 + delete masterData.bCheck;
  3272 + const eleemployeeData = copyTo.eleemployeeData;
  3273 + eleemployeeData.forEach((tableDataRow) => {
  3274 + tableDataRow.handleType = 'add';
  3275 + tableDataRow.sId = commonUtils.createSid();
  3276 + tableDataRow.sParentId = masterData.sId;
  3277 + tableDataRow.sFormId = sModelsId;
  3278 + });
  3279 + const elemachineData = copyTo.elemachineData;
  3280 + elemachineData.forEach((tableDataRow) => {
  3281 + tableDataRow.handleType = 'add';
  3282 + tableDataRow.sId = commonUtils.createSid();
  3283 + tableDataRow.sParentId = masterData.sId;
  3284 + tableDataRow.sFormId = sModelsId;
  3285 + });
  3286 + state = {
  3287 + masterData,
  3288 + eleemployeeData,
  3289 + elemachineData,
  3290 + enabled: true,
  3291 + };
  3292 + } else if (sModelsType === 'sis/paymentTerms') {
  3293 + delete masterData.bCheck;
  3294 + state = {
  3295 + masterData,
  3296 + enabled: true,
  3297 + };
  3298 + } else if (sModelsType === 'smg/sendMailMsg') {
  3299 + masterData.maxBillNo = 'sNo';
  3300 + delete masterData.sNo;
  3301 + delete masterData.bCheck;
  3302 + const sysmsguserData = copyTo.sysmsguserData;
  3303 + sysmsguserData.forEach((tableDataRow) => {
  3304 + tableDataRow.handleType = 'add';
  3305 + tableDataRow.sId = commonUtils.createSid();
  3306 + tableDataRow.sParentId = masterData.sId;
  3307 + tableDataRow.sFormId = sModelsId;
  3308 + });
  3309 + state = {
  3310 + masterData,
  3311 + sysmsguserData,
  3312 + enabled: true,
  3313 + };
  3314 + } else if (sModelsType === 'element/knifemouldInfo') { /* 刀模信息 */
  3315 + masterData.maxBillNo = 'sKnifeMouldNo';
  3316 + delete masterData.bCheck;
  3317 + const eleknifemouldproductData = copyTo.eleknifemouldproductData;
  3318 + eleknifemouldproductData.forEach((tableDataRow) => {
  3319 + tableDataRow.handleType = 'add';
  3320 + tableDataRow.sId = commonUtils.createSid();
  3321 + tableDataRow.sParentId = masterData.sId;
  3322 + tableDataRow.sFormId = sModelsId;
  3323 + });
  3324 + const eleknifemouldfileData = copyTo.eleknifemouldfileData;
  3325 + eleknifemouldfileData.forEach((tableDataRow) => {
  3326 + tableDataRow.handleType = 'add';
  3327 + tableDataRow.sId = commonUtils.createSid();
  3328 + tableDataRow.sParentId = masterData.sId;
  3329 + tableDataRow.sFormId = sModelsId;
  3330 + });
  3331 + state = {
  3332 + masterData,
  3333 + eleknifemouldproductData,
  3334 + eleknifemouldfileData,
  3335 + enabled: true,
  3336 + };
  3337 + } else if (sModelsType === 'element/eleteststandInfo') { /* 检验标准 */
  3338 + masterData.maxBillNo = 'sTestNo';
  3339 + delete masterData.bCheck;
  3340 + const eleteststandarditemData = copyTo.eleteststandarditemData;
  3341 + eleteststandarditemData.forEach((tableDataRow) => {
  3342 + tableDataRow.handleType = 'add';
  3343 + tableDataRow.sId = commonUtils.createSid();
  3344 + tableDataRow.sParentId = masterData.sId;
  3345 + tableDataRow.sFormId = sModelsId;
  3346 + });
  3347 + state = {
  3348 + masterData,
  3349 + eleteststandarditemData,
  3350 + enabled: true,
  3351 + };
  3352 + } else if (sModelsType === 'system/sisformulaInfo') { /* 计算方案 */
  3353 + // masterData.maxBillNo = 'sNo';
  3354 + delete masterData.bCheck;
  3355 + masterData.bUserModel = true;
  3356 + const customizeParamData = copyTo.customizeParamData;
  3357 + customizeParamData.forEach((tableDataRow) => {
  3358 + tableDataRow.handleType = 'add';
  3359 + tableDataRow.sId = commonUtils.createSid();
  3360 + tableDataRow.sParentId = masterData.sId;
  3361 + tableDataRow.sFormId = sModelsId;
  3362 + });
  3363 + state = {
  3364 + masterData,
  3365 + customizeParamData,
  3366 + enabled: true,
  3367 + };
  3368 + }
  3369 + state.sUseInfo = '';
  3370 + if (isWait) {
  3371 + return state;
  3372 + }
  3373 + this.props.onSaveState(state);
  3374 + }
  3375 + let state = {};
  3376 + if (sModelsType === 'element/customerInfo') {
  3377 + masterData.maxBillNo = 'sCustomerNo';
  3378 + state = {
  3379 + masterData,
  3380 + contactData: [],
  3381 + addressData: [],
  3382 + enabled: true,
  3383 + };
  3384 + } else if (sModelsType === 'element/supplyInfo') {
  3385 + masterData.maxBillNo = 'sSupplyNo';
  3386 + state = {
  3387 + masterData,
  3388 + contactData: [],
  3389 + addressData: [],
  3390 + enabled: true,
  3391 + };
  3392 + } else if (sModelsType === 'element/materialsInfo') {
  3393 + masterData.maxBillNo = 'sMaterialsNo';
  3394 + state = {
  3395 + masterData,
  3396 + supplyData: [],
  3397 + stockData: [],
  3398 + enabled: true,
  3399 + };
  3400 + } else if (sModelsType === 'element/processInfo') {
  3401 + masterData.maxBillNo = 'sProcessNo';
  3402 + state = {
  3403 + masterData,
  3404 + machineData: [],
  3405 + assortData: [],
  3406 + outsideData: [],
  3407 + processstyleData: [],
  3408 + processApsRuleData: [],
  3409 + dynamicParamData: [],
  3410 + enabled: true,
  3411 + };
  3412 + } else if (sModelsType === 'element/printInfo') {
  3413 + masterData.maxBillNo = 'sProductNo';
  3414 + /* 新增产品/印件,如果是newRecord过来的,则要获取关联的客户信息 */
  3415 + if (this.props.app.currentPane.newRecordRelation !== undefined) {
  3416 + const addStata = this.props.app.currentPane.newRecordRelation;
  3417 + if (commonUtils.isNotEmptyObject(addStata) && commonUtils.isNotEmptyObject(addStata.sCustomerId)) {
  3418 + masterData.sCustomerId = addStata.sCustomerId;
  3419 + masterData.sCustomerNo = addStata.sCustomerNo;
  3420 + masterData.sCustomerName = addStata.sCustomerName;
  3421 + /* newRecord新增产品,客户不可修改 */
  3422 + const ssCustomerNameIndex = masterConfig.gdsconfigformslave.findIndex(item => item.sName === 'sCustomerName');
  3423 + if (ssCustomerNameIndex > -1) {
  3424 + masterConfig.gdsconfigformslave[ssCustomerNameIndex].iTag = 1;
  3425 + }
  3426 + }
  3427 + }
  3428 + state = {
  3429 + masterData,
  3430 + picFileData: [],
  3431 + stockData: [],
  3432 + customerInfoData: [],
  3433 + enabled: true,
  3434 + };
  3435 + } else if (sModelsType === 'element/siscommonstyle') {
  3436 + state = {
  3437 + masterData,
  3438 + siscommonstyleproductclassifyData: [],
  3439 + enabled: true,
  3440 + };
  3441 + } else if (sModelsType === 'element/teamInfo') {
  3442 + masterData.maxBillNo = 'sTeamNo';
  3443 + state = {
  3444 + masterData,
  3445 + eleemployeeData: [],
  3446 + elemachineData: [],
  3447 + enabled: true,
  3448 + };
  3449 + } else if (sModelsType === 'element/sftloginInfo') {
  3450 + const {
  3451 + sModelsId, token,
  3452 + } = this.props;
  3453 + /* 当前页签数据 */
  3454 + const condition = { };
  3455 + const dataUrl = `${commonConfig.server_host}userinfo/getUserInfoData/?sModelsId=${sModelsId}`;
  3456 + const dataReturn = (await commonServices.postValueService(token, condition, dataUrl)).data;
  3457 + if (dataReturn.code === 1) {
  3458 + const returnData = dataReturn.dataset.rows[0];
  3459 + state = {
  3460 + masterData,
  3461 + jurgroupData: returnData.jurgroupData,
  3462 + customergroupData: returnData.customergroupData,
  3463 + supplygroupData: returnData.supplygroupData,
  3464 + persongroupData: returnData.persongroupData,
  3465 + processgroupData: returnData.processgroupData,
  3466 + drivergroupData: returnData.drivergroupData,
  3467 + departgroupData: returnData.departgroupData,
  3468 + approveGroupData: returnData.sApprovalprocessData,
  3469 + jurgroupOldData: [],
  3470 + customergroupOldData: [],
  3471 + supplygroupOldData: [],
  3472 + persongroupOldData: [],
  3473 + processgroupOldData: [],
  3474 + drivergroupOldData: [],
  3475 + approveGroupOldData: [],
  3476 + jurgroupSelectedRowKeys: [],
  3477 + customergroupSelectedRowKeys: [],
  3478 + supplygroupSelectedRowKeys: [],
  3479 + persongroupSelectedRowKeys: [],
  3480 + processgroupSelectedRowKeys: [],
  3481 + drivergroupSelectedRowKeys: [],
  3482 + departgroupSelectedRowKeys: [],
  3483 + approveGroupSelectedRowKeys: [],
  3484 + enabled: true,
  3485 + };
  3486 + }
  3487 + } else if (sModelsType === 'system/sisformulaInfo') {
  3488 + const customizeParamData = [];
  3489 + let configNew = {};
  3490 + if (commonUtils.isEmptyObject(config)) {
  3491 + const { customizeParamConfig } = this.props;
  3492 + configNew.customizeParamConfig = customizeParamConfig;
  3493 + } else {
  3494 + configNew = config;
  3495 + }
  3496 + if (commonUtils.isNotEmptyObject(configNew.customizeParamConfig)) {
  3497 + const allTableData = {};
  3498 + masterData.bUserModel = true;
  3499 + allTableData.master = masterData;
  3500 + allTableData.customizeParam = customizeParamData;
  3501 + const tableDataRowAdd = commonFunc.getDefaultData(configNew.customizeParamConfig, allTableData);
  3502 + tableDataRowAdd.handleType = 'add';
  3503 + tableDataRowAdd.sId = commonUtils.createSid();
  3504 + tableDataRowAdd.sSlaveId = tableDataRowAdd.sId;
  3505 + tableDataRowAdd.sParentId = masterData && masterData.sId ? masterData.sId : null;
  3506 + tableDataRowAdd.key = tableDataRowAdd.sId;
  3507 + tableDataRowAdd.bDefault = false;
  3508 + tableDataRowAdd.iOrder = 1;
  3509 + customizeParamData.push(tableDataRowAdd);
  3510 + }
  3511 +
  3512 + let addState = {};
  3513 +
  3514 + // 在本页面新增时
  3515 + if (commonUtils.isEmptyObject(config)) {
  3516 + // 将customize/userParam开头的参数都置空
  3517 + addState = Object.keys(this.props)
  3518 + .filter(key => key?.startsWith('customize') || key?.startsWith('userParam'))
  3519 + .reduce((result, key) => {
  3520 + result[key] = undefined;
  3521 + return result;
  3522 + }, {});
  3523 +
  3524 + const sisformulacustomizeparamConfig = this.props.formData.find(item => item.bGrd && item.sTbName === 'sisformulacustomizeparam');
  3525 + const customizeParamConfig = sisformulacustomizeparamConfig || {};
  3526 + const customizeParamColumn = commonFunc.getHeaderConfig(customizeParamConfig);
  3527 +
  3528 + addState.customizeParamConfig = customizeParamConfig;
  3529 + addState.customizeParamColumn = customizeParamColumn;
  3530 +
  3531 + if (commonUtils.isNotEmptyObject(customizeParamConfig)) {
  3532 + const userParamConfig = JSON.parse(JSON.stringify(customizeParamConfig));
  3533 + if (commonUtils.isNotEmptyArr(userParamConfig.gdsconfigformslave)) {
  3534 + userParamConfig.gdsconfigformslave.forEach((item) => {
  3535 + if (item.sName.indexOf('sValue') === -1) { /* 除了参数值 其他均不可修改 */
  3536 + item.iTag = 1;
  3537 + }
  3538 + if (item.sName === 'sParam') {
  3539 + item.bVisible = false;
  3540 + }
  3541 + });
  3542 + }
  3543 + const userParamColumn = commonFunc.getHeaderConfig(userParamConfig);
  3544 + addState.userParamConfig = userParamConfig;
  3545 + addState.userParamColumn = userParamColumn;
  3546 + }
  3547 + }
  3548 +
  3549 + state = {
  3550 + ...addState,
  3551 + masterData,
  3552 + enabled: true,
  3553 + customizeParamData,
  3554 + };
  3555 + } else if (sModelsType === 'element/machineInfo') {
  3556 + masterData.maxBillNo = 'sMachineNo';
  3557 + state = {
  3558 + masterData,
  3559 + enabled: true,
  3560 + isEnabledPlcNo: true,
  3561 + };
  3562 + } else if (sModelsType === 'sis/paymentTerms') {
  3563 + // masterData.maxBillNo = 'sMachineNo';
  3564 + state = {
  3565 + masterData,
  3566 + enabled: true,
  3567 + };
  3568 + } else if (sModelsType === 'element/checkModelInfo') {
  3569 + state = {
  3570 + masterData,
  3571 + userData: [],
  3572 + phaseData: [],
  3573 + conditionData: [],
  3574 + enabled: true,
  3575 + };
  3576 + } else if (sModelsType === 'element/checkPhaseInfo') {
  3577 + state = {
  3578 + masterData,
  3579 + sischeckphaselogininfoData: [],
  3580 + enabled: true,
  3581 + };
  3582 + } else if (sModelsType === 'sis/paymentTerms') {
  3583 + state = {
  3584 + masterData,
  3585 + enabled: true,
  3586 + };
  3587 + } else if (sModelsType === 'element/employeeInfo') {
  3588 + masterData.maxBillNo = 'sEmployeeNo';
  3589 + state = {
  3590 + masterData,
  3591 + enabled: true,
  3592 + };
  3593 + } else if (sModelsType === 'element/sisproductclassify') {
  3594 + masterData.maxBillNo = 'sNo';
  3595 + state = {
  3596 + masterData,
  3597 + sisproductclassifyProcessClassifyData: [],
  3598 + enabled: true,
  3599 + };
  3600 + } else if (sModelsType === 'smg/sendMailMsg') {
  3601 + // masterData.maxBillNo = 'sNo';
  3602 + state = {
  3603 + masterData,
  3604 + sysmsguserData: [],
  3605 + enabled: true,
  3606 + };
  3607 + } else if (sModelsType === 'sis/monthEndingClosing') {
  3608 + state = {
  3609 + masterData,
  3610 + enabled: true,
  3611 + };
  3612 + } else if (sModelsType === 'element/knifemouldInfo') { /* 刀模信息 */
  3613 + masterData.maxBillNo = 'sKnifeMouldNo';
  3614 + state = {
  3615 + masterData,
  3616 + eleknifemouldproductData: [],
  3617 + eleknifemouldfileData: [],
  3618 + enabled: true,
  3619 + };
  3620 + } else if (sModelsType === 'element/eleteststandInfo') { /* 检验标准 */
  3621 + masterData.maxBillNo = 'sTestNo';
  3622 + state = {
  3623 + masterData,
  3624 + eleteststandarditemData: [],
  3625 + enabled: true,
  3626 + };
  3627 + }
  3628 + state.sUseInfo = '';
  3629 + if (isWait) {
  3630 + return state;
  3631 + }
  3632 + this.props.onSaveState(state);
  3633 + };
  3634 + /** 表格数据更改 */
  3635 + // name 不写完整的state名称作用为了要用到total // (name, changeValue, sId, dropDownData)
  3636 + handleTableChange = async (name, sFieldName, changeValue, sId, dropDownData) => {
  3637 + /* 从CommonBase获取默认参数 */
  3638 + const {
  3639 + [`${name}Data`]: tableData, masterData: oldMasterData, sModelsType, app, sModelsId, token,
  3640 + } = this.props;
  3641 + let flag = true;
  3642 + const iIndex = tableData.findIndex(item => item.sId === sId);
  3643 + if (name === 'elemachine') {
  3644 + tableData.forEach((item, i) => {
  3645 + if (i !== iIndex && changeValue.sMachineId === item.sMachineId) {
  3646 + message.error(commonFunc.showMessage(app.commonConst, 'notMachineRepeat'));
  3647 + flag = false;
  3648 + }
  3649 + });
  3650 + }
  3651 + if (!flag) {
  3652 + return;
  3653 + }
  3654 + let tableDataRow = this.props.onDataChange(name, sFieldName, changeValue, sId, dropDownData, true);
  3655 + const models = sModelsType.includes('sales/') || sModelsType.includes('manufacture/') ? 'Product' : 'Materials';
  3656 + tableData[iIndex] = commonBusiness.getCalculateAllMoney(app, models, sFieldName, oldMasterData, tableDataRow);
  3657 + const masterData = { ...oldMasterData };
  3658 + if (name === 'contact') {
  3659 + if (tableData[iIndex].bDefault === true) {
  3660 + if (commonUtils.isNotEmptyObject(tableData[iIndex].sContacts)) {
  3661 + masterData.sContacts = tableData[iIndex].sContacts;
  3662 + }
  3663 + if (commonUtils.isNotEmptyObject(tableData[iIndex].sPhone1)) {
  3664 + masterData.sPhone1 = tableData[iIndex].sPhone1;
  3665 + }
  3666 + if (commonUtils.isNotEmptyObject(tableData[iIndex].sMobile)) {
  3667 + masterData.sMobile = tableData[iIndex].sMobile;
  3668 + }
  3669 + if (commonUtils.isNotEmptyObject(tableData[iIndex].sEmail)) {
  3670 + masterData.sEmail = tableData[iIndex].sEmail;
  3671 + }
  3672 + masterData.handleType = masterData.handleType === 'add' ? 'add' : 'update';
  3673 + tableData.forEach((item, i) => {
  3674 + if (i !== iIndex) {
  3675 + tableData[i].bDefault = false;
  3676 + }
  3677 + });
  3678 + } else if (tableData[iIndex].bDefault === false) {
  3679 + masterData.handleType = masterData.handleType === 'add' ? 'add' : 'update';
  3680 + }
  3681 + } else if (name === 'address') {
  3682 + if (tableData[iIndex].bDefault === true) {
  3683 + masterData.csProvince_sCity_sArea = tableData[iIndex].csProvince_sCity_sArea;
  3684 + masterData.sCompanyAddress = tableData[iIndex].sDetailAddress;
  3685 + masterData.sProvince = tableData[iIndex].sProvince;
  3686 + masterData.sCity = tableData[iIndex].sCity;
  3687 + masterData.sArea = tableData[iIndex].sArea;
  3688 + masterData.handleType = masterData.handleType === 'add' ? 'add' : 'update';
  3689 + tableData.forEach((item, i) => {
  3690 + if (i !== iIndex) {
  3691 + tableData[i].bDefault = false;
  3692 + }
  3693 + });
  3694 + } else if (tableData[iIndex].bDefault === false) {
  3695 + masterData.handleType = masterData.handleType === 'add' ? 'add' : 'update';
  3696 + }
  3697 + } else if (name === 'elemachine') {
  3698 + if (tableData[iIndex].bDefault === true) {
  3699 + masterData.sMachineId = tableData[iIndex].sMachineId;
  3700 + masterData.handleType = masterData.handleType === 'add' ? 'add' : 'update';
  3701 + }
  3702 + } else if (name === 'stock') { /* 物料信息仓库中输入最大换算库存,最小换算库存时,调用handleMaterialsChange进行换算 */
  3703 + tableDataRow.dGramWeight = commonUtils.isNotEmptyNumber(masterData.dGramWeight) ? masterData.dGramWeight : 0;/* 拿到克重 */
  3704 + tableDataRow.dCoefficient = masterData.dCoefficient;/* 拿到换算系数 */
  3705 + tableDataRow.dGramWeight = commonUtils.isNotEmptyNumber(masterData.dGramWeight) ? masterData.dGramWeight : 0;/* 卷筒 */
  3706 + tableDataRow.bReel = masterData.bReel;
  3707 + tableDataRow.sMaterialsUnit = masterData.sMaterialsUnit;
  3708 + tableDataRow.sComputeId = masterData.sComputeId;
  3709 + tableDataRow = await this.handleMaterialsChange(tableDataRow, sModelsId, masterData, changeValue, sFieldName, app, token, models);
  3710 + } else if (commonUtils.isNotEmptyStr(masterData.handleType)) {
  3711 + masterData.handleType = masterData.handleType === 'add' ? 'add' : 'update';
  3712 + }
  3713 +
  3714 + if (name.includes('customizeParam')) {
  3715 + tableData.forEach((item) => {
  3716 + item.sType = name;
  3717 + });
  3718 + }
  3719 + this.props.onSaveState({ [`${name}Data`]: tableData, masterData, enabled: true });
  3720 + };
  3721 + handleMaterialsChange = async (tableDataRow, sModelsId, masterData, changeValue, sFieldName, app, token) => {
  3722 + const { sComputeId } = tableDataRow;
  3723 + if (sFieldName === 'dMaxStockAuxiliaryQty' || sFieldName === 'sMaterialsStyle') {
  3724 + if (commonUtils.isEmpty(sComputeId)) {
  3725 + tableDataRow = commonBusiness.getMaterialsQty(app, tableDataRow, 'dMaxStockAuxiliaryQty', 'dMaxStock');
  3726 + } else {
  3727 + tableDataRow.dMaxStock = await commonBusiness.getFormulaValue({
  3728 + token, sModelsId, masterData, tableDataRow, sComputeId,
  3729 + });
  3730 + }
  3731 + }
  3732 + if (sFieldName === 'dMinStockAuxiliaryQty' || sFieldName === 'sMaterialsStyle') {
  3733 + if (commonUtils.isEmpty(sComputeId)) {
  3734 + tableDataRow = commonBusiness.getMaterialsQty(app, tableDataRow, 'dMinStockAuxiliaryQty', 'dMinStock');
  3735 + } else {
  3736 + tableDataRow.dMinStock = await commonBusiness.getFormulaValue({
  3737 + token, sModelsId, masterData, tableDataRow, sComputeId,
  3738 + });
  3739 + }
  3740 + }
  3741 + return tableDataRow;
  3742 + }
  3743 +
  3744 + /* 计算方案 计算公式设计点击事件 */
  3745 + handleButtonChange = (sName, value) => {
  3746 + /* 改变公示显示值 */
  3747 + const { masterData: masterDataOld } = this.props;
  3748 + const masterData = { ...masterDataOld };
  3749 + const sFormulaMemo = (Object.keys(masterData).length > 0 && masterData.sFormulaMemo !== undefined) ? masterData.sFormulaMemo : '';
  3750 + if (sName === 'systemFunction') {
  3751 + if (value === 'sysMaxInteger') {
  3752 + value = '最大整数(变量,0)';
  3753 + } else if (value === 'sysRounding') {
  3754 + value = '四舍五入(变量,0)';
  3755 + } else if (value === 'sysMinInteger') {
  3756 + value = '最小整数(变量,0)';
  3757 + }
  3758 + } else if (sName === 'bussinessFunction') {
  3759 + if (value === 'serviceMaterialsStocks') {
  3760 + value = '(材料名称,材料规格,仓库名称,自定义项)';
  3761 + } else if (value === 'serviceFinishedInventory') {
  3762 + value = '(成品名称,仓库名称,自定义项)';
  3763 + } else if (value === 'serviceMaterialCostPrice') {
  3764 + value = '(材料名称)';
  3765 + } else if (value === 'sysReceivable') {
  3766 + value = '应收账款([客户名称])';
  3767 + }
  3768 + }
  3769 + const changeFormula = `${sFormulaMemo}${value}`;
  3770 + masterData.sFormula = changeFormula;
  3771 + masterData.sFormulaMemo = changeFormula;
  3772 + masterData.handleType = masterData.handleType === 'add' ? 'add' : 'update';
  3773 + this.props.onSaveState({ masterData });
  3774 + };
  3775 +
  3776 + /** 修改主表数据 */
  3777 + handleMasterChange = async (name, sFieldName, changeValue, sId, dropDownData) => {
  3778 + const { sModelsType, masterConfig, formData } = this.props;
  3779 + const addState = this.props.onChange(name, sFieldName, changeValue, sId, dropDownData, true);
  3780 + const masterDataAfter = commonBusiness.getKeyUpEvent(name, sFieldName, masterConfig, addState.masterData, {}, true);
  3781 + if (commonUtils.isNotEmptyObject(masterDataAfter)) {
  3782 + addState.masterData = masterDataAfter;
  3783 + }
  3784 + let { masterData } = addState;
  3785 + const { customerInfoData } = this.props;
  3786 + const { contactData } = this.props;
  3787 + if (sModelsType === 'system/sisformulaInfo') { // 计算方案信息
  3788 + if (sFieldName === 'sFormulaMemo') {
  3789 + masterData.sFormula = changeValue.sFormulaMemo;
  3790 + } else if (sFieldName === 'sColTitleName') {
  3791 + let { [sFieldName]: customizeParamConfig } = changeValue;
  3792 + if (commonUtils.isJSON(customizeParamConfig)) {
  3793 + customizeParamConfig = JSON.parse(customizeParamConfig);
  3794 + if (Array.isArray(customizeParamConfig)) { // 数组格式
  3795 + const customizeParamName = [];
  3796 + const userParamName = [];
  3797 + customizeParamConfig.forEach((config, index) => {
  3798 + const paramIndex = index === 0 ? '' : index;
  3799 +
  3800 + const customizePanelName = config.panelName ? config.panelName : `变量设置${paramIndex}`;
  3801 + addState[`customizePanelName${paramIndex}`] = customizePanelName;
  3802 +
  3803 + let customizeParamConfigNew = this.handleGetCustomizeParamConfig(masterData, config, index);
  3804 + customizeParamConfigNew = { ...customizeParamConfig, ...customizeParamConfigNew };
  3805 + if (commonUtils.isNotEmptyArr(customizeParamConfigNew)) {
  3806 + addState[`customizeParam${paramIndex}Config`] = customizeParamConfigNew;
  3807 + addState[`customizeParam${paramIndex}Column`] = commonFunc.getHeaderConfig(customizeParamConfigNew);
  3808 + addState.tableKey = commonUtils.createSid();
  3809 + customizeParamName.push(`customizeParam${paramIndex}`);
  3810 + userParamName.push(`userParam${paramIndex}`);
  3811 +
  3812 + const userParamConfig = JSON.parse(JSON.stringify(customizeParamConfigNew));
  3813 + addState[`userParam${paramIndex}Config`] = userParamConfig;
  3814 + if (commonUtils.isNotEmptyArr(userParamConfig.gdsconfigformslave)) {
  3815 + userParamConfig.gdsconfigformslave.forEach((item) => {
  3816 + if (item.sName.indexOf('sValue') === -1) { /* 除了参数值 其他均不可修改 */
  3817 + item.iTag = 1;
  3818 + }
  3819 + if (item.sName === 'sParam') {
  3820 + item.bVisible = false;
  3821 + }
  3822 + });
  3823 + }
  3824 + addState[`userParam${paramIndex}Column`] = commonFunc.getHeaderConfig(userParamConfig);
  3825 + }
  3826 + });
  3827 + addState.customizeParamName = customizeParamName;
  3828 + addState.userParamName = userParamName;
  3829 + } else { // json格式
  3830 + const customizeParamConfigNew = this.handleGetCustomizeParamConfig(masterData, customizeParamConfig);
  3831 + if (commonUtils.isNotEmptyObject(customizeParamConfigNew)) {
  3832 + if (commonUtils.isNotEmptyStr(customizeParamConfig.panelName)) {
  3833 + addState.customizePanelName = customizeParamConfig.panelName;
  3834 + }
  3835 + addState.customizeParamColumn = commonFunc.getHeaderConfig(customizeParamConfigNew);
  3836 + addState.tableKey = commonUtils.createSid();
  3837 + addState.customizeParamName = [];
  3838 + addState.userParamName = [];
  3839 + }
  3840 + }
  3841 + } else {
  3842 + addState.tableKey = commonUtils.createSid();
  3843 + addState.customizeParamName = [];
  3844 + addState.userParamName = [];
  3845 + addState.customizePanelName = '';
  3846 + customizeParamConfig = commonUtils.isNotEmptyArr(formData.filter(item => item.bGrd && item.sTbName === 'sisformulacustomizeparam')) ? formData.filter(item => item.bGrd && item.sTbName === 'sisformulacustomizeparam')[0] : {};
  3847 + addState.customizeParamColumn = commonFunc.getHeaderConfig(customizeParamConfig);
  3848 + }
  3849 +
  3850 + // if (commonUtils.isNotEmptyObject(customizeParamConfig)) {
  3851 + // customizeParamColumn = commonFunc.getHeaderConfig(customizeParamConfig);
  3852 + // }
  3853 + }
  3854 + } else if (sModelsType === 'sis/paymentTerms' && sFieldName === 'sType') {
  3855 + const { rowGdsconfig } = masterConfig;
  3856 + const newMasterData = {};
  3857 + newMasterData.handleType = masterData.handleType;
  3858 + newMasterData.sFormId = masterData.sFormId;
  3859 + newMasterData.sId = masterData.sId;
  3860 + newMasterData.sName = masterData.sName;
  3861 + newMasterData.sType = masterData.sType;
  3862 +
  3863 + if (changeValue.sType === 'deliver') {
  3864 + newMasterData.iAfterDeliverDay = masterData.iAfterDeliverDay;
  3865 + const threeRow = masterConfig.gdsconfigformslave.filter(item => item.bVisible && item.sName === 'iAfterDeliverDay');
  3866 + if (rowGdsconfig.length > 2) {
  3867 + rowGdsconfig.splice(2, 1, { gdsconfigformslave: threeRow });
  3868 + } else {
  3869 + rowGdsconfig.push({ gdsconfigformslave: threeRow });
  3870 + }
  3871 + } else if (changeValue.sType === 'month') {
  3872 + newMasterData.iDay = masterData.iDay;
  3873 + newMasterData.iMonth = masterData.iMonth;
  3874 + const threeRow = masterConfig.gdsconfigformslave.filter(item => item.bVisible && (item.sName === 'iMonth' || item.sName === 'iDay'));
  3875 + if (rowGdsconfig.length > 2) {
  3876 + rowGdsconfig.splice(2, 1, { gdsconfigformslave: threeRow });
  3877 + } else {
  3878 + rowGdsconfig.push({ gdsconfigformslave: threeRow });
  3879 + }
  3880 + } else if (rowGdsconfig.length > 2) {
  3881 + rowGdsconfig.splice(2, 1);
  3882 + }
  3883 + masterData = newMasterData;
  3884 + } else if (sModelsType === 'element/materialsInfo' && sFieldName === 'sMaterialsType') {
  3885 + const iIndex = masterConfig.gdsconfigformslave.findIndex(item => item.sName === 'dGramWeight');
  3886 + if (changeValue[sFieldName] === 'paper') { /* 物料类别为纸张的时候,克重必填 */
  3887 + masterConfig.gdsconfigformslave[iIndex].bNotEmpty = true;
  3888 + } else {
  3889 + masterConfig.gdsconfigformslave[iIndex].bNotEmpty = false;
  3890 + }
  3891 + } else if (sModelsType === 'element/sisproductclassify' && sFieldName === 'sAllPartsName') {
  3892 + const sisproductclassifyProcessClassifyConfig = this.handleChangeProductParteName(changeValue.sAllPartsName);
  3893 + if (sisproductclassifyProcessClassifyConfig !== undefined) {
  3894 + addState.sisproductclassifyProcessClassifyConfig = sisproductclassifyProcessClassifyConfig;
  3895 + }
  3896 + } else if (sModelsType === 'element/printInfo' && sFieldName === 'sCustomerId') {
  3897 + if (customerInfoData.length === 1 && commonUtils.isEmptyArr(customerInfoData[0].sCustomerId)) {
  3898 + customerInfoData[0].sCustomerId = masterData.sCustomerId;
  3899 + }
  3900 + } else if (sModelsType === 'element/eleteststandInfo' && sFieldName === 'sTestType') { /* 检验类型选择工序检验时,工序名称出现 */
  3901 + const iIndex = masterConfig.gdsconfigformslave.findIndex(item => item.sName === 'sProcessName');
  3902 + if (iIndex > -1) {
  3903 + if (commonUtils.isNotEmptyObject(masterData[sFieldName]) && masterData[sFieldName] === '2') {
  3904 + masterConfig.gdsconfigformslave[iIndex].bVisible = true;
  3905 + } else {
  3906 + masterConfig.gdsconfigformslave[iIndex].bVisible = false;
  3907 + }
  3908 + }
  3909 + } else if (sModelsType === 'smg/sendMailMsg' && sFieldName === 'sDepartName') { /* 选择部门时,加载部门人员 */
  3910 + const { sModelsId } = this.props;
  3911 + const sDepartNameStr = changeValue.sDepartName;
  3912 + const sDepartNameArr = sDepartNameStr.split(',');
  3913 + // const dropdownData = commonUtils.getStoreDropDownData(sModelsId, name, 'sUserIds');/* 筛选所有人员 */
  3914 + let dropdownData;
  3915 + const slaveIndex = masterConfig.gdsconfigformslave.findIndex(item => item.sName === 'sUserIds');
  3916 + if (slaveIndex > -1) {
  3917 + const sqlDropDownData = await this.props.getSqlDropDownData(sModelsId, name, masterConfig.gdsconfigformslave[slaveIndex]);
  3918 + dropdownData = sqlDropDownData.dropDownData;
  3919 + }
  3920 + let sUserArrsTemp = [];
  3921 + const sUserArrs = [];
  3922 + if (commonUtils.isNotEmptyArr(sDepartNameArr)) {
  3923 + sDepartNameArr.forEach((sDepId) => {
  3924 + const filterData = dropdownData.filter(item => item.sDepartId === sDepId);
  3925 + sUserArrsTemp = filterData.concat(sUserArrsTemp);
  3926 + });
  3927 + sUserArrsTemp.forEach((item) => {
  3928 + sUserArrs.push(item.sId);
  3929 + });
  3930 + masterData.sUserIds = sUserArrs;
  3931 + }
  3932 + } else if (sModelsType === 'element/customerInfo' || sModelsType === 'element/supplyInfo') { /* 选择客户、供应商 */
  3933 + if (sFieldName === 'sContacts' || sFieldName === 'sPhone1' || sFieldName === 'sMobile' || sFieldName === 'sEmail') {
  3934 + if (commonUtils.isNotEmptyArr(contactData)) { /* 从表不为空,且有默认行 */
  3935 + const iIndex = contactData.findIndex(item => item.bDefault);
  3936 + if (iIndex > -1) {
  3937 + const tableDataRow = contactData[iIndex];
  3938 + if (sFieldName !== 'sContacts' && commonUtils.isEmptyObject(tableDataRow.sContacts)) {
  3939 + return;
  3940 + }
  3941 + if (commonUtils.isNotEmptyObject(tableDataRow)) {
  3942 + contactData[iIndex] = { ...tableDataRow, [sFieldName]: changeValue[sFieldName] };
  3943 + }
  3944 + }
  3945 + }
  3946 + }
  3947 + } else if (sModelsType === 'element/machineInfo' && sFieldName === 'iPlcNo') {
  3948 + this.handleGetplcMachineData(changeValue[sFieldName]);
  3949 + }
  3950 + this.props.onSaveState({
  3951 + masterData, masterConfig, customerInfoData, ...addState, contactData, enabled: sModelsType === 'system/sisformulaInfo' ? this.props.enabled : true, bUserModel: masterData.bUserModel,
  3952 + });
  3953 + };
  3954 + handleChangeProductParteName = (sAllPartsName, sisproductclassifyProcessClassifyConfigNew) => {
  3955 + const { sisproductclassifyProcessClassifyConfig: sisproductclassifyProcessClassifyConfigOld } = this.props;
  3956 + if (commonUtils.isNotEmptyObject(sAllPartsName)) {
  3957 + let sisproductclassifyProcessClassifyConfig;
  3958 + if (commonUtils.isNotEmptyObject(sisproductclassifyProcessClassifyConfigNew)) {
  3959 + sisproductclassifyProcessClassifyConfig = JSON.parse(JSON.stringify(sisproductclassifyProcessClassifyConfigNew));
  3960 + } else {
  3961 + sisproductclassifyProcessClassifyConfig = JSON.parse(JSON.stringify(sisproductclassifyProcessClassifyConfigOld));
  3962 + }
  3963 + const sAllPartsArray = sAllPartsName.split(',');
  3964 + const gdsconfigformslave = sisproductclassifyProcessClassifyConfig.gdsconfigformslave;
  3965 + const iIndex = gdsconfigformslave.findIndex(item => item.sName === 'sPartsName');
  3966 + if (iIndex > -1) {
  3967 + const sAllPartsConfig = gdsconfigformslave.filter(item => item.sName === 'sPartsName')[0];
  3968 + if (commonUtils.isNotEmptyObject(sAllPartsConfig)) {
  3969 + const showDropDownNew = [];
  3970 + sAllPartsArray.forEach((item) => {
  3971 + showDropDownNew.push({ sId: item, value: item });
  3972 + });
  3973 + showDropDownNew.push({ sId: '', value: '全部组件' });
  3974 + // sisproductclassifyProcessClassifyConfig.gdsconfigformslave[iIndex].dropDownData = showDropDownNew;
  3975 + // return sisproductclassifyProcessClassifyConfig;
  3976 + sisproductclassifyProcessClassifyConfig.gdsconfigformslave[iIndex] = { ...sisproductclassifyProcessClassifyConfig.gdsconfigformslave[iIndex], dropDownData: showDropDownNew, showDropDown: showDropDownNew };
  3977 + return sisproductclassifyProcessClassifyConfig;
  3978 + }
  3979 + }
  3980 + }
  3981 + };
  3982 + /* 计算方案 校验公式 功能 */
  3983 + handleField = async () => {
  3984 + let bResult = true;
  3985 + const {
  3986 + sModelsId, masterData, sModelsType, customizeParamData,
  3987 + } = this.props;
  3988 + if (sModelsType === 'system/sisformulaInfo') {
  3989 + const { sType, sFormula } = masterData;
  3990 + /* 公式中,如果公式分类为放损公式时,公式中有 [投入数] 提示公式验证错误,不允许使用投入数 */
  3991 + if (commonUtils.isNotEmptyObject(sFormula) && sType === 'loss' && sFormula.includes('投入数')) {
  3992 + bResult = false;
  3993 + message.error('公式验证错误,不允许使用投入数!');
  3994 + return bResult;
  3995 + }
  3996 + let sFormulaSet = ''; /* 公式自定义部分 */
  3997 + if (commonUtils.isNotEmptyArr(customizeParamData)) {
  3998 + if (commonUtils.isNotEmptyObject(masterData.sColTitleName)) { /* 有自定义列名 则变量名代码生成 */
  3999 + const regex = /^customizeParam(?:\d+)?Data$/;
  4000 + Object.keys(this.props).filter(key => regex.test(key)).forEach((key) => {
  4001 + const tableName = key.split('Data')[0];
  4002 + const lastChar = tableName.charAt(tableName.length - 1);
  4003 + const firstChar = this.handleGetFirstChar(lastChar);
  4004 + const tempData = this.props[key];
  4005 + tempData.forEach((item, index) => {
  4006 + for (const key of Object.keys(item)) {
  4007 + if (key.includes('sValue')) {
  4008 + const sParam = `${firstChar}${index}_${key}`;
  4009 + let keyValue = item[key];
  4010 + if (commonUtils.isEmpty(keyValue)) {
  4011 + keyValue = '0';
  4012 + }
  4013 + const sFormulaSetRow = `SET @${sParam}:=${keyValue};`;
  4014 + sFormulaSet += sFormulaSetRow;
  4015 + }
  4016 + }
  4017 + });
  4018 + });
  4019 + // customizeParamData.forEach((item, index) => {
  4020 + // for (const key of Object.keys(item)) {
  4021 + // if (key.includes('sValue')) {
  4022 + // const sParam = `R${index}_${key}`;
  4023 + // let keyValue = item[key];
  4024 + // if (commonUtils.isEmpty(keyValue)) {
  4025 + // keyValue = '0';
  4026 + // }
  4027 + // const sFormulaSetRow = `SET @${sParam}:=${keyValue};`;
  4028 + // sFormulaSet += sFormulaSetRow;
  4029 + // }
  4030 + // }
  4031 + // });
  4032 + } else {
  4033 + customizeParamData.forEach((item) => { /* 没有自定义列名 维持原来 */
  4034 + const sFormulaSetRow = `SET @${item.sParam}:=${item.sValue};`;
  4035 + sFormulaSet += sFormulaSetRow;
  4036 + });
  4037 + }
  4038 + }
  4039 + const { token } = this.props.app;
  4040 + const value = {
  4041 + handleType: 'check',
  4042 + sFormulaText: masterData.sFormulaMemo,
  4043 + sisformulacustomizeparam: customizeParamData,
  4044 + sFormulaSet,
  4045 + sClientType: '1',
  4046 +
  4047 + };
  4048 + const dataUrl = `${commonConfig.server_host}replaceField/checkReplaceField?sModelsId=${sModelsId}`;
  4049 + const { data } = await commonServices.postValueService(token, value, dataUrl);
  4050 + if (data.code === 1) {
  4051 + message.success(data.msg);
  4052 + bResult = true;
  4053 + } else {
  4054 + this.props.getServiceError(data);
  4055 + bResult = false;
  4056 + }
  4057 + }
  4058 + return bResult;
  4059 + };
  4060 +
  4061 + handleGetFirstChar = (lastChar) => {
  4062 + let firstChar = 'R';
  4063 + switch (lastChar) {
  4064 + case '1':
  4065 + firstChar = 'S';
  4066 + break;
  4067 + case '2':
  4068 + firstChar = 'T';
  4069 + break;
  4070 + case '3':
  4071 + firstChar = 'U';
  4072 + break;
  4073 + case '4':
  4074 + firstChar = 'V';
  4075 + break;
  4076 + case '5':
  4077 + firstChar = 'W';
  4078 + break;
  4079 + case '6':
  4080 + firstChar = 'X';
  4081 + break;
  4082 + case '7':
  4083 + firstChar = 'Y';
  4084 + break;
  4085 + case '8':
  4086 + firstChar = 'Z';
  4087 + break;
  4088 + case '9':
  4089 + firstChar = 'A';
  4090 + break;
  4091 + case '0':
  4092 + firstChar = 'B';
  4093 + break;
  4094 + default:
  4095 + break;
  4096 + }
  4097 + return firstChar;
  4098 + }
  4099 +
  4100 + /** 添加表格空行 */
  4101 + handleTableAdd = (name, isWait) => {
  4102 + /* 从CommonBase获取默认参数 */
  4103 + const {
  4104 + masterData, masterConfig, sModelsType, gdsformconst,
  4105 + } = this.props;
  4106 + let { [`${name}Data`]: tableData } = this.props;
  4107 + let tableDataRow = this.props.onDataRowAdd(name, true);
  4108 + /* 添加行的业务处理拿出去 */
  4109 + if (sModelsType.includes('sales/')) {
  4110 + if (commonUtils.isEmptyStr(masterData.sCustomerId)) {
  4111 + const iIndex = masterConfig.gdsconfigformslave.findIndex(item => (item.sName === 'sCustomerId' && item.bVisible));
  4112 + if (iIndex > -1) {
  4113 + const { showName } = masterConfig.gdsconfigformslave[iIndex];
  4114 + message.warn(showName + commonFunc.showMessage(gdsformconst, 'isNotNull')); // 不能为空
  4115 + tableDataRow = {};
  4116 + }
  4117 + }
  4118 + }
  4119 + const { formId } = this.props.app.currentPane;
  4120 + if (sModelsType === 'element/materialsInfo') {
  4121 + tableDataRow.sFormId = formId;
  4122 + tableDataRow.sMaterialsId = masterData.sId;
  4123 + } else if (sModelsType === 'element/printInfo') {
  4124 + tableDataRow.sFormId = formId;
  4125 + tableDataRow.sProductId = masterData.sId;
  4126 + tableDataRow.sCustomerId = masterData.sCustomerId;
  4127 + /* 产品信息-客户信息页签新增第一行时,将主表客户添加到客户名称中 */
  4128 + if (name === 'customerInfo') {
  4129 + if (tableData.length === 0) {
  4130 + tableDataRow.sCustomerName = masterData.sCustomerName;
  4131 + tableDataRow.sCustomerNo = masterData.sCustomerNo;
  4132 + }
  4133 + }
  4134 + }
  4135 + if (name === 'report') {
  4136 + tableDataRow.sFormId = formId;
  4137 + }
  4138 + if (isWait) {
  4139 + return tableDataRow;
  4140 + } else if (commonUtils.isNotEmptyObject(tableDataRow)) {
  4141 + if (commonUtils.isEmptyArr(tableData)) {
  4142 + tableData = [];
  4143 + }
  4144 + tableData.push(tableDataRow);
  4145 + this.props.onSaveState({ [`${name}Data`]: tableData, [`${name}Pagination`]: { total: tableData.length, current: 9999 } });
  4146 + }
  4147 + };
  4148 + /** 删除表格行 */
  4149 + handleTableDel = (name, flag, tableSelectedRowKeys) => {
  4150 + const { sModelsType } = this.props;
  4151 + let { masterData } = this.props;
  4152 + const masterNewData = {};
  4153 + const rtval = this.props.onDataRowDel(name, true, tableSelectedRowKeys);
  4154 + const { [`${name}DelData`]: tableDelData } = rtval;
  4155 + if (sModelsType === 'element/teamInfo') {
  4156 + if (name === 'elemachine' && commonUtils.isNotEmptyArr(tableDelData)) {
  4157 + for (const delData of tableDelData) {
  4158 + if (delData.bDefault && delData.sMachineId === masterData.sMachineId) {
  4159 + masterNewData.sMachineId = '';
  4160 + masterNewData.handleType = masterData.handleType !== 'add' ? 'update' : 'add';
  4161 + break;
  4162 + }
  4163 + }
  4164 + }
  4165 + } else if (sModelsType === 'element/customerInfo') {
  4166 + if (name === 'address' && commonUtils.isNotEmptyArr(tableDelData)) {
  4167 + const { [`${name}Data`]: tableData } = rtval;
  4168 + if (commonUtils.isNotEmptyArr(tableData) && tableData.length === 1) {
  4169 + const addState = {};
  4170 + addState.bDefault = true;
  4171 + masterNewData.csProvince_sCity_sArea = tableData[0].csProvince_sCity_sArea;
  4172 + masterNewData.sCompanyAddress = tableData[0].sDetailAddress;
  4173 + masterNewData.sProvince = tableData[0].sProvince;
  4174 + masterNewData.sCity = tableData[0].sCity;
  4175 + masterNewData.sArea = tableData[0].sArea;
  4176 + tableData[0] = { ...tableData[0], ...addState };/* 只有最后一行时,设置默认地址 */
  4177 + } else {
  4178 + masterNewData.csProvince_sCity_sArea = '';
  4179 + masterNewData.sCompanyAddress = '';
  4180 + masterNewData.sProvince = '';
  4181 + masterNewData.sCity = '';
  4182 + masterNewData.sArea = '';
  4183 + }
  4184 + masterNewData.handleType = masterData.handleType !== 'add' ? 'update' : 'add';
  4185 + }
  4186 + }
  4187 + masterData = { ...masterData, ...masterNewData };
  4188 + this.props.onSaveState({ ...rtval, masterData });
  4189 + };
  4190 + /* 基础信息复制到 */
  4191 +
  4192 + handleCopyTo = (name) => {
  4193 + /* 待用数据声明 */
  4194 + const {
  4195 + dispatch, masterConfig, masterData, sModelsId, sModelsType, contactData, addressData,
  4196 + sisproductclassifyProcessClassifyData, machineData, assortData, outsideData, processstyleData, processApsRuleData, dynamicParamData,
  4197 + eleemployeeData, elemachineData, eleknifemouldproductData, eleknifemouldfileData, eleteststandarditemData, app, customizeParamData,
  4198 + } = this.props;
  4199 + const { pages } = app.currentPane; /* 传递pages */
  4200 + const copyTo = {};
  4201 + const copyToConfig = masterConfig.gdsconfigformslave.filter(item => item.sControlName.includes(name));
  4202 + copyTo.name = name;
  4203 + copyTo.config = copyToConfig;
  4204 + copyTo.masterData = masterData;
  4205 + if (sModelsType === 'element/materialsInfo') {
  4206 + copyTo.supplyData = [];
  4207 + copyTo.stockData = [];
  4208 + } else if (sModelsType === 'element/customerInfo') {
  4209 + const addStata = {};
  4210 + addStata.bCheck = true;
  4211 + copyTo.masterData = { ...masterData, ...addStata };
  4212 + copyTo.contactData = contactData;
  4213 + copyTo.addressData = addressData;
  4214 + } else if (sModelsType === 'element/printInfo') {
  4215 + copyTo.picFileData = [];
  4216 + copyTo.stockData = [];
  4217 + copyTo.customerInfoData = [];
  4218 + } else if (sModelsType === 'element/sisproductclassify') {
  4219 + if (commonUtils.isNotEmptyArr(sisproductclassifyProcessClassifyData)) {
  4220 + copyTo.sisproductclassifyProcessClassifyData = sisproductclassifyProcessClassifyData;
  4221 + }
  4222 + } else if (sModelsType === 'element/processInfo') {
  4223 + copyTo.machineData = machineData;
  4224 + copyTo.assortData = assortData;
  4225 + copyTo.outsideData = outsideData;
  4226 + copyTo.processstyleData = processstyleData;
  4227 + copyTo.processApsRuleData = processApsRuleData;
  4228 + copyTo.dynamicParamData = dynamicParamData;
  4229 + } else if (sModelsType === 'element/supplyInfo') {
  4230 + copyTo.contactData = contactData;
  4231 + copyTo.addressData = addressData;
  4232 + } else if (sModelsType === 'element/teamInfo') {
  4233 + copyTo.eleemployeeData = eleemployeeData;
  4234 + copyTo.elemachineData = elemachineData;
  4235 + } else if (sModelsType === 'element/knifemouldInfo') {
  4236 + copyTo.eleknifemouldproductData = eleknifemouldproductData;
  4237 + copyTo.eleknifemouldfileData = eleknifemouldfileData;
  4238 + /**
  4239 + * 修改日期:2021-04-23
  4240 + * 修改人:吕杰
  4241 + * 区域:以下 2 行
  4242 + * BUG:
  4243 + * 说明:孟总需求,刀版复制到不需要刀版编号,刀版编号赋值给原刀版编号(sSrcKnifeMouldNo)
  4244 + * 原代码:
  4245 + */
  4246 + copyTo.masterData.sSrcKnifeMouldNo = copyTo.masterData.sKnifeMouldNo;
  4247 + copyTo.masterData.sKnifeMouldNo = undefined;
  4248 + } else if (sModelsType === 'element/eleteststandInfo') {
  4249 + copyTo.eleteststandarditemData = eleteststandarditemData;
  4250 + } else if (sModelsType === 'system/sisformulaInfo') { /* 计算方案复制到功能 */
  4251 + copyTo.customizeParamData = customizeParamData;
  4252 + }
  4253 + dispatch({
  4254 + type: 'content/onRouter',
  4255 + payload: {
  4256 + url: `${commonConfig.server_host}gdsmodule/getGdsmoduleById/${sModelsId}?sModelsId=${sModelsId}`, /* 接口地址 */
  4257 + copyTo,
  4258 + pages,
  4259 + },
  4260 + });
  4261 + };
  4262 + handleTableSelectRowChange = (name, selectedRowKeys) => {
  4263 + const {
  4264 + sModelsType, [`${name}OldData`]: oldData, masterData, enabled,
  4265 + } = this.props;
  4266 + if (sModelsType === 'element/sftloginInfo') {
  4267 + if (!enabled) {
  4268 + message.warn('请先点击修改!');
  4269 + return;
  4270 + }
  4271 + const addState = this.props.onTableSelectRowChange(name, selectedRowKeys, true);
  4272 + const { [`${name}SelectedRowKeys`]: rowKeys } = addState;
  4273 + if (oldData.length > 0) {
  4274 + const allTableData = {};
  4275 + allTableData.master = masterData;
  4276 + // const tableDataRowOld = commonFunc.getDefaultData(tableConfig, allTableData);
  4277 + const delKeys = [];
  4278 + const addkeys = JSON.parse(JSON.stringify(rowKeys));
  4279 + for (const item of oldData) {
  4280 + let index = '';
  4281 + if (name === 'jurgroup') {
  4282 + index = addkeys.indexOf(item.sJurisdictionClassifyId);
  4283 + }
  4284 + if (name === 'customergroup') {
  4285 + index = addkeys.indexOf(item.sSalesManId);
  4286 + }
  4287 + if (name === 'supplygroup') {
  4288 + index = addkeys.indexOf(item.sPurchaseManId);
  4289 + }
  4290 + if (name === 'persongroup') {
  4291 + index = addkeys.indexOf(item.sEmployeeId);
  4292 + }
  4293 + if (name === 'processgroup') {
  4294 + index = addkeys.indexOf(item.sProcessClassifyId);
  4295 + }
  4296 + if (name === 'drivergroup') {
  4297 + index = addkeys.indexOf(item.sDriverId);
  4298 + }
  4299 + if (name === 'departgroup') {
  4300 + index = addkeys.indexOf(item.sDepartId);
  4301 + }
  4302 + if (name === 'approveGroup') {
  4303 + index = addkeys.indexOf(item.sJurisdictionClassifyId);
  4304 + }
  4305 + if (index === -1) {
  4306 + delKeys.push(item.sId);
  4307 + } else if (index > -1) {
  4308 + addkeys.splice(index, 1);
  4309 + }
  4310 + }
  4311 + if (commonUtils.isNotEmptyArr(delKeys)) {
  4312 + if (name === 'jurgroup') {
  4313 + this.handleTableDel('jurgroupOld', false, delKeys);
  4314 + }
  4315 + if (name === 'customergroup') {
  4316 + this.handleTableDel('customergroupOld', false, delKeys);
  4317 + }
  4318 + if (name === 'supplygroup') {
  4319 + this.handleTableDel('supplygroupOld', false, delKeys);
  4320 + }
  4321 + if (name === 'persongroup') {
  4322 + this.handleTableDel('persongroupOld', false, delKeys);
  4323 + }
  4324 + if (name === 'processgroup') {
  4325 + this.handleTableDel('processgroupOld', false, delKeys);
  4326 + }
  4327 + if (name === 'drivergroup') {
  4328 + this.handleTableDel('drivergroupOld', false, delKeys);
  4329 + }
  4330 + if (name === 'departgroup') {
  4331 + this.handleTableDel('departgroupOld', false, delKeys);
  4332 + }
  4333 + if (name === 'approveGroup') {
  4334 + this.handleTableDel('approveGroupOld', false, delKeys);
  4335 + }
  4336 + }
  4337 + if (commonUtils.isNotEmptyArr(addkeys)) {
  4338 + for (const key of addkeys) {
  4339 + const tableDataRow = {};
  4340 + tableDataRow.handleType = 'add';
  4341 + tableDataRow.sId = commonUtils.createSid();
  4342 + tableDataRow.sParentId = masterData && masterData.sId ? masterData.sId : null;
  4343 + tableDataRow.key = tableDataRow.sId;
  4344 + tableDataRow.bDefault = false;
  4345 + tableDataRow.iOrder = oldData ? oldData.length : 0;
  4346 + tableDataRow.defaultAdded = oldData.length === 0;
  4347 + if (name === 'jurgroup') {
  4348 + tableDataRow.sJurisdictionClassifyId = key;
  4349 + }
  4350 + if (name === 'customergroup') {
  4351 + tableDataRow.sSalesManId = key;
  4352 + }
  4353 + if (name === 'supplygroup') {
  4354 + tableDataRow.sPurchaseManId = key;
  4355 + }
  4356 + if (name === 'persongroup') {
  4357 + tableDataRow.sEmployeeId = key;
  4358 + }
  4359 + if (name === 'processgroup') {
  4360 + tableDataRow.sProcessClassifyId = key;
  4361 + }
  4362 + if (name === 'drivergroup') {
  4363 + tableDataRow.sDriverId = key;
  4364 + }
  4365 + if (name === 'departgroup') {
  4366 + tableDataRow.sDepartId = key;
  4367 + }
  4368 + if (name === 'approveGroup') {
  4369 + tableDataRow.sJurisdictionClassifyId = key;
  4370 + }
  4371 + oldData.push(tableDataRow);
  4372 + }
  4373 + }
  4374 + }
  4375 + if (oldData.length === 0) {
  4376 + const allTableData = {};
  4377 + allTableData.master = masterData;
  4378 + // const tableDataRow = commonFunc.getDefaultData(tableConfig, allTableData);
  4379 + for (const item of rowKeys) {
  4380 + const tableDataRow = {};
  4381 + tableDataRow.handleType = 'add';
  4382 + tableDataRow.sId = commonUtils.createSid();
  4383 + tableDataRow.sParentId = masterData && masterData.sId ? masterData.sId : null;
  4384 + tableDataRow.key = tableDataRow.sId;
  4385 + tableDataRow.bDefault = false;
  4386 + tableDataRow.iOrder = oldData ? oldData.length : 0;
  4387 + tableDataRow.defaultAdded = oldData.length === 0;
  4388 + tableDataRow.sJurisdictionClassifyId = item;
  4389 + if (name === 'jurgroup') {
  4390 + tableDataRow.sJurisdictionClassifyId = item;
  4391 + }
  4392 + if (name === 'customergroup') {
  4393 + tableDataRow.sSalesManId = item;
  4394 + }
  4395 + if (name === 'supplygroup') {
  4396 + tableDataRow.sPurchaseManId = item;
  4397 + }
  4398 + if (name === 'persongroup') {
  4399 + tableDataRow.sEmployeeId = item;
  4400 + }
  4401 + if (name === 'processgroup') {
  4402 + tableDataRow.sProcessClassifyId = item;
  4403 + }
  4404 + if (name === 'drivergroup') {
  4405 + tableDataRow.sDriverId = item;
  4406 + }
  4407 + if (name === 'departgroup') {
  4408 + tableDataRow.sDepartId = item;
  4409 + }
  4410 + if (name === 'approveGroup') {
  4411 + tableDataRow.sJurisdictionClassifyId = item;
  4412 + }
  4413 + oldData.push(tableDataRow);
  4414 + }
  4415 + }
  4416 + this.props.onSaveState(addState, oldData);
  4417 + } else {
  4418 + this.props.onTableSelectRowChange(name, selectedRowKeys);
  4419 + }
  4420 + };
  4421 +
  4422 + /** 复制 */
  4423 + handleTableCopy = (name, isWait) => {
  4424 + const {
  4425 + [`${name}Data`]: tableData, [`${name}SelectedRowKeys`]: tableSelectedRowKeys, app,
  4426 + } = this.props;
  4427 + if (commonUtils.isEmptyArr(tableSelectedRowKeys)) {
  4428 + message.warn(commonFunc.showMessage(app.commonConst, 'pleaseChooseCopyData'));/* 请选择复制数据 */
  4429 + } else {
  4430 + for (const sId of tableSelectedRowKeys) {
  4431 + const tableDataIndex = tableData.findIndex(item => item.sId === sId);
  4432 + if (tableDataIndex > -1) {
  4433 + const tableDataRow = JSON.parse(JSON.stringify(tableData[tableDataIndex]));
  4434 + tableDataRow.sId = commonUtils.createSid();
  4435 + tableDataRow.handleType = 'add';
  4436 + tableDataRow.key = tableDataRow.sId;
  4437 + tableDataRow.sSrcSlaveId = '';
  4438 + tableDataRow.sSrcId = '';
  4439 + tableDataRow.dSrcQty = null;
  4440 + const iOrderArr = [];
  4441 + tableData.forEach((item) => {
  4442 + const iOrder = commonUtils.isNotEmptyNumber(item.iOrder) ? item.iOrder : 0; /* 获取tableData中iOrder最大值 */
  4443 + iOrderArr.push(iOrder);
  4444 + });
  4445 + const iOrderMax = Math.max(...iOrderArr);
  4446 + tableDataRow.iOrder = commonUtils.isNotEmptyArr(tableData) ? iOrderMax + 1 : 1;
  4447 + if (isWait) {
  4448 + return tableDataRow;
  4449 + } else if (commonUtils.isNotEmptyObject(tableDataRow)) {
  4450 + tableData.push(tableDataRow);
  4451 + this.props.onSaveState({ [`${name}Data`]: tableData, [`${name}Pagination`]: { total: tableData.length, current: 9999 } });
  4452 + }
  4453 + }
  4454 + }
  4455 + }
  4456 + };
  4457 +
  4458 + /** 复制全部 */
  4459 + handleTableCopyAll = (name, isWait) => {
  4460 + const {
  4461 + [`${name}Data`]: tableData, [`${name}SelectedRowKeys`]: tableSelectedRowKeys, app,
  4462 + } = this.props;
  4463 + if (commonUtils.isEmptyArr(tableSelectedRowKeys)) {
  4464 + message.warn(commonFunc.showMessage(app.commonConst, 'pleaseChooseCopyData'));/* 请选择复制数据 */
  4465 + } else {
  4466 + for (const sId of tableSelectedRowKeys) {
  4467 + const tableDataIndex = tableData.findIndex(item => item.sId === sId);
  4468 + if (tableDataIndex > -1) {
  4469 + const tableDataRow = JSON.parse(JSON.stringify(tableData[tableDataIndex]));
  4470 + tableDataRow.sId = commonUtils.createSid();
  4471 + tableDataRow.handleType = 'add';
  4472 + tableDataRow.key = tableDataRow.sId;
  4473 + if (isWait) {
  4474 + return tableDataRow;
  4475 + } else if (commonUtils.isNotEmptyObject(tableDataRow)) {
  4476 + tableData.push(tableDataRow);
  4477 + this.props.onSaveState({ [`${name}Data`]: tableData, [`${name}Pagination`]: { total: tableData.length, current: 9999 } });
  4478 + }
  4479 + }
  4480 + }
  4481 + }
  4482 + };
  4483 +
  4484 + /* 导出Excel */
  4485 + handleOut = async () => {
  4486 + const {
  4487 + eleemployeeConfig, formRoute, masterData,
  4488 + } = this.props;
  4489 +
  4490 + /* 导出使用Post提交 */
  4491 + const url = `${commonConfig.server_host}excel/export/${eleemployeeConfig.sId}?sModelsId=${eleemployeeConfig.sParentId}&sName=${formRoute}&token=${encodeURIComponent(this.props.app.token)}`;
  4492 + const conditionValuesStr = JSON.stringify({ sId: masterData?.sId, sBillNo: masterData?.sBillNo });
  4493 + this.handleOpenOut(url, '', '', undefined, conditionValuesStr);
  4494 + };
  4495 +
  4496 + /* Get提交地址栏参数过多,更改Get提交为Post提交 */
  4497 + handleOpenOut = (url, bFilter, slaveOrderBy, sGroupByList, conditionValues) => {
  4498 + const newWin = window.open();
  4499 + let formStr = '';
  4500 + // 设置样式为隐藏,打开新标签再跳转页面前,如果有可现实的表单选项,用户会看到表单内容数据
  4501 + formStr = `<form style="visibility:hidden;" method="POST" action="${url}">` +
  4502 + `<input type="hidden" name="bFilter" value='${bFilter}' />`;
  4503 + if (commonUtils.isNotEmptyObject(conditionValues)) {
  4504 + formStr += `<input type="hidden" name="sSqlCondition" value='${conditionValues}' />`;
  4505 + }
  4506 + formStr += '</form>';
  4507 + newWin.document.body.innerHTML = formStr;
  4508 + newWin.document.forms[0].submit();
  4509 + return newWin;
  4510 + }
  4511 +
  4512 + /* 按钮点击功能 */
  4513 + handleBtnClick = (e, btnName) => {
  4514 + if (btnName === 'BtnAccounts') {
  4515 + this.handleSettleSccounts();
  4516 + } else if (e === 'BtnDesignFunction') { /* 设计报表打印 */
  4517 + this.handleDesignFunction();
  4518 + } else if (e === 'BtnResetpwd') { /* 管理员重置密码 */
  4519 + this.handleResetPwd();
  4520 + } if (e === 'BtnOut') {
  4521 + this.handleOut();
  4522 + }
  4523 + // else if (e === 'BtnConfigCustomizeParam') { /* 生成变量设置 */
  4524 + // const { masterData, customizeParamConfig } = this.props;
  4525 + // const customizeParamConfigNew = this.handleGetCustomizeParamConfig(masterData, customizeParamConfig);
  4526 + // if (commonUtils.isNotEmptyObject(customizeParamConfigNew)) {
  4527 + // const customizeParamColumnNew = commonFunc.getHeaderConfig(customizeParamConfigNew);
  4528 + // const userParamColumn = commonFunc.getHeaderConfig(customizeParamConfigNew);
  4529 + // this.props.onSaveState({
  4530 + // customizeParamConfig: customizeParamConfigNew, customizeParamColumn: customizeParamColumnNew, userParamConfig: customizeParamConfigNew, userParamColumn,
  4531 + // });
  4532 + // }
  4533 + // }
  4534 + };
  4535 +
  4536 + /** 获取应收账款 */
  4537 + handleSettleSccounts = async () => {
  4538 + const { sModelsId, masterData } = this.props;
  4539 + if (!commonUtils.isEmpty(masterData.mclosingDate)) {
  4540 + const url = `${commonConfig.server_host}business/getProData?sModelsId=${sModelsId}`;
  4541 + const value = { sProName: 'Sp_System_AutoMaterialsPriceSingle_new', paramsMap: { } };
  4542 + const dataReturn = (await commonServices.postValueService(this.props.app.token, value, url)).data;
  4543 + if (dataReturn.code === 1) {
  4544 + /* 数据查询成功 */
  4545 + this.props.onSaveState({ masterData: masterDataNew });
  4546 + } else { /* 失败 */
  4547 + this.props.getServiceError(dataReturn);
  4548 + }
  4549 + }
  4550 + };
  4551 + /* 设计报表功能 */
  4552 + handleDesignFunction = () => {
  4553 + this.props.onSaveState({ visibleStatement: true });
  4554 + };
  4555 + handleBtnPrint = (sActiveId) => {
  4556 + const {
  4557 + app, sModelsId, masterConfig, masterData, reportData,
  4558 + } = this.props;
  4559 + const { token } = app;
  4560 + const queryFilter = {};
  4561 + queryFilter[masterConfig.sId] = { sId: masterData.sId };
  4562 + queryFilter.getType = 'BaseReport';
  4563 + const queryFilterJson = escape(JSON.stringify(queryFilter));
  4564 + /* 拿到打印报表名称 */
  4565 + let printReportName = 'report';
  4566 + if (commonUtils.isNotEmptyArr(reportData)) {
  4567 + const iIndex = reportData.findIndex(item => item.sId === sActiveId);
  4568 + if (iIndex > -1) {
  4569 + printReportName = reportData[iIndex].sReportName;
  4570 + }
  4571 + }
  4572 + const urlPrint = `${commonConfig.file_host}printReport/printPdf/${sActiveId}/${printReportName}.pdf?queryFilter=${queryFilterJson}&sModelsId=${sModelsId}&sMaintableId=${masterConfig.sId}&token=${encodeURIComponent(token)}`;
  4573 + window.open(urlPrint);
  4574 + };
  4575 + /* 重置密码 重置人退出系统 */
  4576 + handleResetPwdOut = () => {
  4577 + const { masterData, dispatch } = this.props;
  4578 + const { sId } = masterData;
  4579 + if (commonUtils.isNotEmptyObject(sId)) {
  4580 + const url = `${commonConfig.server_host}sftlogininfo/updatePasswordUserName/reset?sModelsId=${100}&sId=${sId}`;
  4581 + const value = {};
  4582 + value.sId = sId;
  4583 + dispatch({ type: 'app/resetPwd', payload: { url, value } });
  4584 + }
  4585 + };
  4586 +
  4587 + /* 重置别人密码 重置人不退出系统 */
  4588 + handleResetPwd = async () => {
  4589 + const { masterData, app } = this.props;
  4590 + const { sId } = masterData;
  4591 + if (commonUtils.isNotEmptyObject(sId)) {
  4592 + const url = `${commonConfig.server_host}sftlogininfo/updatePasswordUserName/reset?sModelsId=${100}&sId=${sId}`;
  4593 + const value = {};
  4594 + value.sId = sId;
  4595 + const dataReturn = (await commonServices.postValueService(app.token, value, url)).data;
  4596 + if (dataReturn.code === 1) {
  4597 + message.success(dataReturn.msg);
  4598 + } else {
  4599 + this.props.getServiceError(dataReturn);
  4600 + }
  4601 + }
  4602 + };
  4603 + handleTitleChange = (slavePagination) => {
  4604 + this.props.onSaveState({ slavePagination });
  4605 + };
  4606 + render() {
  4607 + const { masterData, sModelsType } = this.props;
  4608 + const imgSrc = commonBusiness.handleAddIcon(masterData, sModelsType);
  4609 + return (
  4610 + <ChildComponent
  4611 + {...this.props}
  4612 + {...this.state}
  4613 + onToggle={this.handleToggle}
  4614 + onAdd={this.handleAdd}
  4615 + onCancel={this.handleCancel}
  4616 + onEdit={this.handleEdit}
  4617 + onDel={this.handleDel}
  4618 + onSubmit={this.handleValidateSave}
  4619 + onReturnForm={this.handleForm}
  4620 + onTitleChange={this.handleTitleChange}
  4621 + onBtnFirst={this.handleSearchData.bind(this, 'first')}
  4622 + onBtnPrior={this.handleSearchData.bind(this, 'up')}
  4623 + onNext={this.handleSearchData.bind(this, 'next')}
  4624 + onBtnLast={this.handleSearchData.bind(this, 'end')}
  4625 + onChangeInvalid={this.handleInvalid}
  4626 + onViewClick={this.handleViewClick}
  4627 + onDataChange={this.handleTableChange}
  4628 + onButtonChange={this.handleButtonChange.bind(this)}
  4629 + onField={this.handleField.bind(this)}
  4630 + onChange={this.handleMasterChange}
  4631 + onDataRowAdd={this.handleTableAdd}
  4632 + onDataRowDel={this.handleTableDel}
  4633 + onCopyTo={this.handleCopyTo}
  4634 + onTableSelectRowChange={this.handleTableSelectRowChange}
  4635 + onBtnExamine={this.handleAudit.bind(this, 1)}
  4636 + onBtnCancelExamine={this.handleAudit.bind(this, 0)}
  4637 + onDataAudit={this.dataAudit}
  4638 + imgSrc={imgSrc}
  4639 + onDataRowCopy={this.handleTableCopy}
  4640 + onDataRowCopyAll={this.handleTableCopyAll}
  4641 + onBtnClick={this.handleBtnClick}
  4642 + onButtonClick={this.handleBtnClick}
  4643 + onMaterialsChange={this.handleMaterialsChange}
  4644 + onBtnPrint={this.handleBtnPrint}
  4645 + onGetFirstChar={this.handleGetFirstChar}
  4646 + />
  4647 + );
  4648 + }
  4649 + };
  4650 +};
... ...
src/components/IndexCenter/IndexCenter.js
... ... @@ -823,7 +823,7 @@ class IndexCenter extends Component {
823 823 size="middle"
824 824 pagination={false}
825 825 id="kpiTable"
826   - scroll={{ x: 'max-content', y: 'calc(100vh - 235px)' }}
  826 + scroll={{ x: 'max-content', y: 'calc(100vh - 250px)' }}
827 827 onRow={(record) => { return { onDoubleClick: () => { this.handleDoubleClick(record); } }; }}
828 828 rowClassName={this.getRowClassName}
829 829 />
... ...
src/components/IndexCenter/index.less
... ... @@ -108,7 +108,7 @@
108 108 height: 100%;
109 109 border: 1px solid #d9d9d9;
110 110 border-top: 0;
111   - height: calc(100vh - 235px);
  111 + height: calc(100vh - 240px);
112 112 overflow: auto;
113 113 // border-right: 0;
114 114 &::-webkit-scrollbar {
... ... @@ -229,6 +229,7 @@
229 229 .indexFooter {
230 230 text-align: center;
231 231 padding: 10px 50px!important;
  232 + margin-top: 10px;
232 233 }
233 234 }
234 235  
... ...
src/routes/basicInfoSetting/knifemouldInfo/knifemouldInfo.js 0 → 100644
  1 +import { connect } from 'umi';
  2 +import KnifeMouldInfoComponent from '../../../components/CommonElementEvent/KnifeMouldInfo';
  3 +
  4 +function KnifemouldInfo({ dispatch, app, content }) {
  5 + function removePane(changePanes, currentPane) {
  6 + dispatch({ type: 'app/removePane', payload: { changePanes, currentPane } });
  7 + }
  8 +
  9 + function removeModalPan(changePanes) {
  10 + dispatch({ type: 'app/removeModalPane', payload: { changePanes } });
  11 + }
  12 +
  13 + function addPane(pane) {
  14 + dispatch({ type: 'app/addPane', payload: { pane } });
  15 + }
  16 +
  17 + const knifemouldInfoProps = {
  18 + app,
  19 + content,
  20 + dispatch,
  21 + onAddPane: addPane,
  22 + onRemovePane: removePane,
  23 + onRemoveModalPane: removeModalPan,
  24 + };
  25 +
  26 + return (
  27 + <KnifeMouldInfoComponent {...knifemouldInfoProps} style = {{height:'100%'}}/>
  28 + );
  29 +}
  30 +
  31 +export default connect(({ app, content }) =>
  32 + ({ app, content }))(KnifemouldInfo);
... ...
src/routes/indexPage.less
... ... @@ -157,8 +157,9 @@
157 157 .content {
158 158 position: relative;
159 159 height: 100%;
160   - //z-index: 2;
161   - //height: calc(100vh - 10rem);
  160 + background-color: #F0F2F5;
  161 + // z-index: 2;
  162 + // height: calc(100vh - 10rem);
162 163 }
163 164  
164 165  
... ...
src/routes/tab/tab.js
... ... @@ -12,6 +12,7 @@ import CommonClassify from &#39;@/routes/commonClassify/commonClassify&#39;;/* 公共分
12 12 import styles from '@/index.less';
13 13 import { sendWebSocketMessage } from '@/components/Common/commonFunc';
14 14 import { isNotEmptyObject, isNotEmptyArr } from '@/utils/utils'; /* 通用方法 */
  15 +import KnifemouldInfo from '@/routes/basicInfoSetting/knifemouldInfo/knifemouldInfo';/* 刀模信息 */
15 16 /* 计算方案s */
16 17 const { confirm } = Modal;
17 18 const { TabPane } = Tabs;
... ... @@ -28,7 +29,8 @@ function Tab({ dispatch, app }) {
28 29 '/indexPage/commonNewBill': <CommonNewBill />,
29 30 '/indexPage/commonBill' : <CommonBill/>,
30 31 '/indexPage/commonListEdit' : <CommonListEdit/>,
31   - '/indexPage/commonClassify' : <CommonClassify/>
  32 + '/indexPage/commonClassify' : <CommonClassify/>,
  33 + '/indexPage/eleknifemould' : <KnifemouldInfo/>
32 34 }
33 35 const content = routeList[pane.route] || <IndexCenter />;
34 36  
... ...