Commit 8daf27c82ba911265b9a1ecbe4ac287000fff987
1 parent
3d008fd4
功能化页面排序
Showing
4 changed files
with
7703 additions
and
5651 deletions
Too many changes to show.
To preserve performance only 1 of 4 files are displayed.
src/components/Common/CommonNewBill.js
| 1 | 1 | /* eslint-disable */ |
| 2 | 2 | |
| 3 | -import React, { Component, useState, useRef, useEffect } from 'react'; | |
| 4 | -import { Form } from '@ant-design/compatible'; | |
| 3 | +import React, { Component, useState, useRef, useEffect } from "react"; | |
| 4 | +import { Form } from "@ant-design/compatible"; | |
| 5 | 5 | // import '@ant-design/compatible/assets/index.css'; |
| 6 | -import {Row, Col, Checkbox, Layout, Spin, Tabs, Dropdown, Avatar, Button, Menu, Table, Upload} from 'antd-v4'; | |
| 7 | -import { message } from '@/utils/common/message'; | |
| 8 | -import {DownOutlined, UploadOutlined,} from '@ant-design/icons'; | |
| 9 | -import CommonNewSales from '@/components/Common/CommonNewBillEvent';/* 继承销售模块业务功能 */ | |
| 10 | -import * as commonFunc from '@/components/Common/commonFunc';/* 通用单据方法 */ /* 通用单据方法 */ | |
| 11 | -import Toolbar from '@/components/Common/ToolBar/ToolBarNew'; | |
| 12 | -import StaticEditTable from '@/components/Common/CommonTable';/* 可编辑表格 */ | |
| 13 | -import styles from '@/index.less'; | |
| 14 | -import AssignmentField from './AssignmentField'; | |
| 15 | -import CommonView from '@/components/Common/CommonView'; | |
| 16 | -import CommonViewTable from '@/components/Common/CommonViewTable'; | |
| 17 | -import CommonBase from '@/components/Common/CommonBase';/* 获取配置及数据 */ | |
| 18 | -import * as commonBusiness from '@/components/Common/commonBusiness';/* 单据业务功能 */ | |
| 19 | -import commonConfig from '@/utils/config'; | |
| 20 | -import * as commonUtils from '@/utils/utils';/* 通用方法 */ | |
| 21 | -import * as commonServices from '@/services/services';/* 服务类 */ | |
| 22 | -import AddIcon from '@/assets/add.svg'; | |
| 23 | -import DisableAddIcon from '@/assets/disableadd.svg'; | |
| 24 | -import CopyIcon from '@/assets/copy.svg'; | |
| 25 | -import CopyAllIcon from '@/assets/copyall.svg'; | |
| 26 | -import DisableCopyIcon from '@/assets/disablecopy.svg'; | |
| 27 | -import DisableCopyAllIcon from '@/assets/disablecopyall.svg'; | |
| 28 | -import DelIcon from '@/assets/delete.svg'; | |
| 29 | -import DisableDelIcon from '@/assets/disabledelete.svg';/* 获取配置及数据 */ | |
| 30 | -import AntdDraggableModal from '@/components/Common/AntdDraggableModal'; | |
| 6 | +import { Row, Col, Checkbox, Layout, Spin, Tabs, Dropdown, Avatar, Button, Menu, Table, Upload } from "antd-v4"; | |
| 7 | +import { message } from "@/utils/common/message"; | |
| 8 | +import { DownOutlined, UploadOutlined } from "@ant-design/icons"; | |
| 9 | +import CommonNewSales from "@/components/Common/CommonNewBillEvent"; /* 继承销售模块业务功能 */ | |
| 10 | +import * as commonFunc from "@/components/Common/commonFunc"; /* 通用单据方法 */ /* 通用单据方法 */ | |
| 11 | +import Toolbar from "@/components/Common/ToolBar/ToolBarNew"; | |
| 12 | +import StaticEditTable from "@/components/Common/CommonTable"; /* 可编辑表格 */ | |
| 13 | +import styles from "@/index.less"; | |
| 14 | +import AssignmentField from "./AssignmentField"; | |
| 15 | +import CommonView from "@/components/Common/CommonView"; | |
| 16 | +import CommonViewTable from "@/components/Common/CommonViewTable"; | |
| 17 | +import CommonBase from "@/components/Common/CommonBase"; /* 获取配置及数据 */ | |
| 18 | +import * as commonBusiness from "@/components/Common/commonBusiness"; /* 单据业务功能 */ | |
| 19 | +import commonConfig from "@/utils/config"; | |
| 20 | +import * as commonUtils from "@/utils/utils"; /* 通用方法 */ | |
| 21 | +import * as commonServices from "@/services/services"; /* 服务类 */ | |
| 22 | +import AddIcon from "@/assets/add.svg"; | |
| 23 | +import DisableAddIcon from "@/assets/disableadd.svg"; | |
| 24 | +import CopyIcon from "@/assets/copy.svg"; | |
| 25 | +import CopyAllIcon from "@/assets/copyall.svg"; | |
| 26 | +import DisableCopyIcon from "@/assets/disablecopy.svg"; | |
| 27 | +import DisableCopyAllIcon from "@/assets/disablecopyall.svg"; | |
| 28 | +import DelIcon from "@/assets/delete.svg"; | |
| 29 | +import DisableDelIcon from "@/assets/disabledelete.svg"; /* 获取配置及数据 */ | |
| 30 | +import AntdDraggableModal from "@/components/Common/AntdDraggableModal"; | |
| 31 | 31 | import CommonListSelect from "./CommonListSelect"; |
| 32 | -import WorkCalendar from '@/components/Common/WorkCalendar/WorkCalendar'; | |
| 33 | -import ContextMenuModal from '@/components/Common/ContextMenuModal'; | |
| 32 | +import WorkCalendar from "@/components/Common/WorkCalendar/WorkCalendar"; | |
| 33 | +import ContextMenuModal from "@/components/Common/ContextMenuModal"; | |
| 34 | 34 | import CommonViewDragable from "@/components/Common/CommonViewDragable"; |
| 35 | -import CommonExamInfo from '@/components/Common/CommonExamInfo'; | |
| 36 | -import JsonFormatter from '@/components/Common/Json/JsonFormatter'; | |
| 37 | -import lodash from 'lodash'; | |
| 35 | +import CommonExamInfo from "@/components/Common/CommonExamInfo"; | |
| 36 | +import JsonFormatter from "@/components/Common/Json/JsonFormatter"; | |
| 37 | +import lodash from "lodash"; | |
| 38 | 38 | |
| 39 | 39 | // import ProcessIcon from '../../assets/process.svg'; |
| 40 | 40 | // import DisableProcessIcon from '../../assets/disableprocess.svg'; |
| ... | ... | @@ -42,32 +42,31 @@ import lodash from 'lodash'; |
| 42 | 42 | // import DisableMateriallIcon from '../../assets/disablematerial.svg'; |
| 43 | 43 | // import SlaveMemo from './SlaveMemo'; |
| 44 | 44 | |
| 45 | - | |
| 46 | -const width = '18px'; | |
| 47 | -const height = '18px'; | |
| 45 | +const width = "18px"; | |
| 46 | +const height = "18px"; | |
| 48 | 47 | const setAdd = { |
| 49 | - title: '增加', | |
| 48 | + title: "增加", | |
| 50 | 49 | width: { width }, |
| 51 | 50 | height: { height }, |
| 52 | 51 | img: <img src={AddIcon} alt="添加" width={width} height={height} />, |
| 53 | 52 | disableimg: <img src={DisableAddIcon} alt="删除" width={width} height={height} />, |
| 54 | 53 | }; |
| 55 | 54 | const setCopy = { |
| 56 | - title: '复制', | |
| 55 | + title: "复制", | |
| 57 | 56 | width: { width }, |
| 58 | 57 | height: { height }, |
| 59 | 58 | img: <img src={CopyIcon} alt="复制" width="20px" height="20px" />, |
| 60 | 59 | disableimg: <img src={DisableCopyIcon} alt="复制" width="20px" height="20px" />, |
| 61 | 60 | }; |
| 62 | 61 | const setCopyAll = { |
| 63 | - title: '复制部件', | |
| 62 | + title: "复制部件", | |
| 64 | 63 | width: { width }, |
| 65 | 64 | height: { height }, |
| 66 | 65 | img: <img src={CopyAllIcon} alt="复制部件" width="16px" height="16px" />, |
| 67 | 66 | disableimg: <img src={DisableCopyAllIcon} alt="复制部件" width="16px" height="16px" />, |
| 68 | 67 | }; |
| 69 | 68 | const setDelete = { |
| 70 | - title: '删除', | |
| 69 | + title: "删除", | |
| 71 | 70 | width: { width }, |
| 72 | 71 | height: { height }, |
| 73 | 72 | img: <img src={DelIcon} alt="删除" width={width} height={height} />, |
| ... | ... | @@ -92,14 +91,14 @@ const setDelete = { |
| 92 | 91 | const { Header, Content } = Layout; |
| 93 | 92 | const { TabPane } = Tabs; |
| 94 | 93 | |
| 95 | -let _this ={}; | |
| 94 | +let _this = {}; | |
| 96 | 95 | |
| 97 | 96 | // const { confirm } = Modal; |
| 98 | 97 | class CommonNewBill extends Component { |
| 99 | 98 | constructor(props) { |
| 100 | 99 | super(props); |
| 101 | 100 | this.state = { |
| 102 | - currentTab: '' | |
| 101 | + currentTab: "", | |
| 103 | 102 | }; |
| 104 | 103 | _this = this; |
| 105 | 104 | } |
| ... | ... | @@ -108,52 +107,48 @@ class CommonNewBill extends Component { |
| 108 | 107 | // 没有默认页签情况下, 非编辑状态进入,展示第一个tab |
| 109 | 108 | const { enabled, masterConfig } = this.props; |
| 110 | 109 | // 获取默认展开tab |
| 111 | - const defaultTabConfig = masterConfig && masterConfig.gdsconfigformslave.find(item => | |
| 112 | - [ | |
| 113 | - 'MainContent', | |
| 114 | - 'zMaterials', | |
| 115 | - 'zCheck', | |
| 116 | - ...new Array(10).fill('').map((_, index) => `zSlaveInfo${index}`) | |
| 117 | - ].includes(item.sControlName) && | |
| 118 | - item.sDefault | |
| 119 | - ); | |
| 110 | + const defaultTabConfig = | |
| 111 | + masterConfig && | |
| 112 | + masterConfig.gdsconfigformslave.find( | |
| 113 | + item => | |
| 114 | + ["MainContent", "zMaterials", "zCheck", ...new Array(10).fill("").map((_, index) => `zSlaveInfo${index}`)].includes(item.sControlName) && | |
| 115 | + item.sDefault | |
| 116 | + ); | |
| 120 | 117 | if (!enabled && !this.firstLoaded && commonUtils.isEmptyObject(defaultTabConfig)) { |
| 121 | 118 | clearTimeout(this.timer); |
| 122 | 119 | this.timer = setTimeout(() => { |
| 123 | 120 | this.firstLoaded = true; |
| 124 | 121 | if (this.slaveTabsRef) { |
| 125 | - const oFirstTab = this.slaveTabsRef.querySelector('.ant-tabs-nav-list')?.querySelector('.ant-tabs-tab'); | |
| 122 | + const oFirstTab = this.slaveTabsRef.querySelector(".ant-tabs-nav-list")?.querySelector(".ant-tabs-tab"); | |
| 126 | 123 | if (oFirstTab) { |
| 127 | 124 | // 创建一个自定义的 click 事件 |
| 128 | - const clickEvent = new Event('click', { bubbles: true, cancelable: true }); | |
| 125 | + const clickEvent = new Event("click", { bubbles: true, cancelable: true }); | |
| 129 | 126 | // 触发该元素的 click 事件 |
| 130 | 127 | oFirstTab.dispatchEvent(clickEvent); |
| 131 | 128 | } |
| 132 | 129 | } |
| 133 | 130 | }, 500); |
| 134 | 131 | } |
| 135 | - | |
| 136 | 132 | } |
| 137 | 133 | |
| 138 | 134 | /** 行选择 */ |
| 139 | 135 | onRowClick = (name, record) => { |
| 140 | - if (name === 'control') { | |
| 136 | + if (name === "control") { | |
| 141 | 137 | this.props.onTableSelectRowChange(name, [record.sId]); |
| 142 | 138 | } |
| 143 | 139 | }; |
| 144 | 140 | |
| 145 | - onChange = (checkedValues) => { | |
| 141 | + onChange = checkedValues => { | |
| 146 | 142 | this.props.onSaveState({ |
| 147 | 143 | dataPersonArray: checkedValues, |
| 148 | 144 | }); |
| 149 | 145 | }; |
| 150 | - getMenuStatus = (menu) => { | |
| 151 | - if (menu.sControlName === 'BtnImport') { | |
| 146 | + getMenuStatus = menu => { | |
| 147 | + if (menu.sControlName === "BtnImport") { | |
| 152 | 148 | return !this.props.enabled; |
| 153 | 149 | } |
| 154 | 150 | }; |
| 155 | 151 | |
| 156 | - | |
| 157 | 152 | /** 上传后执行函数 */ |
| 158 | 153 | // handleUploadChange = (info) => { |
| 159 | 154 | // const { file } = info; |
| ... | ... | @@ -220,12 +215,12 @@ class CommonNewBill extends Component { |
| 220 | 215 | }; |
| 221 | 216 | const tableDataRow = this.props.onDataRowAdd(name, true); |
| 222 | 217 | const { [`${name}Column`]: tableColumn, masterData, [`${name}Data`]: tableData } = this.props; |
| 223 | - tableColumn.forEach((slaveChild) => { | |
| 218 | + tableColumn.forEach(slaveChild => { | |
| 224 | 219 | const ckey = slaveChild.dataIndex; |
| 225 | - if (ckey === 'sProductNo' || ckey === 'sProductName') { | |
| 226 | - tableDataRow[ckey] = masterData[ckey] !== undefined ? masterData[ckey] : ''; | |
| 227 | - } else if (ckey === 'iOrder') { | |
| 228 | - tableDataRow[ckey] = ''; | |
| 220 | + if (ckey === "sProductNo" || ckey === "sProductName") { | |
| 221 | + tableDataRow[ckey] = masterData[ckey] !== undefined ? masterData[ckey] : ""; | |
| 222 | + } else if (ckey === "iOrder") { | |
| 223 | + tableDataRow[ckey] = ""; | |
| 229 | 224 | } else if (file.response && file.response.code === 1) { |
| 230 | 225 | if (uploadInfo[ckey] !== undefined) { |
| 231 | 226 | tableDataRow[ckey] = uploadInfo[ckey]; |
| ... | ... | @@ -243,25 +238,24 @@ class CommonNewBill extends Component { |
| 243 | 238 | if (commonUtils.isNotEmptyObject(masterData)) { |
| 244 | 239 | const sCustomerId = commonUtils.isEmptyStr(masterData.sCustomerId) ? undefined : masterData.sCustomerId; |
| 245 | 240 | let existCustomerId = false; |
| 246 | - if (sModelsType.includes('sales/') && commonUtils.isNotEmptyStr(sCustomerId)) { | |
| 241 | + if (sModelsType.includes("sales/") && commonUtils.isNotEmptyStr(sCustomerId)) { | |
| 247 | 242 | existCustomerId = true; |
| 248 | - } else if (!sModelsType.includes('sales/')) { | |
| 243 | + } else if (!sModelsType.includes("sales/")) { | |
| 249 | 244 | existCustomerId = true; |
| 250 | 245 | } |
| 251 | 246 | return { |
| 252 | - disabled: !this.props.enabled || !existCustomerId, /* 是否可用 */ | |
| 253 | - style: { display: commonUtils.convertBooleanToDisplayBlock(true) }, /* 是否显示 */ | |
| 247 | + disabled: !this.props.enabled || !existCustomerId /* 是否可用 */, | |
| 248 | + style: { display: commonUtils.convertBooleanToDisplayBlock(true) } /* 是否显示 */, | |
| 254 | 249 | }; |
| 255 | 250 | } |
| 256 | 251 | }; |
| 257 | 252 | |
| 258 | 253 | handleOk = async (flag, tmpCheck, isWait) => { |
| 259 | - const { | |
| 260 | - sModelsId, masterData, app, checkConditions, sCheckModelId, checkPersonData, currentId, masterConfig, slaveConfig, checkConfig, | |
| 261 | - } = this.props; | |
| 254 | + const { sModelsId, masterData, app, checkConditions, sCheckModelId, checkPersonData, currentId, masterConfig, slaveConfig, checkConfig } = | |
| 255 | + this.props; | |
| 262 | 256 | const { currentPane } = app; |
| 263 | - const bCkxTmpCheck = app.systemData.filter(item => item.sName === 'CkxTmpCheck')[0].sValue; | |
| 264 | - if (bCkxTmpCheck === '1') { | |
| 257 | + const bCkxTmpCheck = app.systemData.filter(item => item.sName === "CkxTmpCheck")[0].sValue; | |
| 258 | + if (bCkxTmpCheck === "1") { | |
| 265 | 259 | const returnData = await this.props.onDataAudit(flag, tmpCheck, isWait); |
| 266 | 260 | if (returnData.code === 1) { |
| 267 | 261 | if (returnData.dataset.rows[0].dataSet.outData[0].sCode === 1) { |
| ... | ... | @@ -270,20 +264,21 @@ class CommonNewBill extends Component { |
| 270 | 264 | } else { |
| 271 | 265 | message.error(returnData.dataset.rows[0].dataSet.outData[0].sReturn); |
| 272 | 266 | } |
| 273 | - } else { /* 失败 */ | |
| 267 | + } else { | |
| 268 | + /* 失败 */ | |
| 274 | 269 | this.props.getServiceError(returnData); |
| 275 | 270 | } |
| 276 | 271 | } else { |
| 277 | 272 | const dataPersonArray = commonUtils.isEmptyObject(this.props.dataPersonArray) ? [] : this.props.dataPersonArray; |
| 278 | 273 | if (commonUtils.isEmptyObject(dataPersonArray)) { |
| 279 | - checkPersonData.forEach((item) => { | |
| 274 | + checkPersonData.forEach(item => { | |
| 280 | 275 | dataPersonArray.push(item.sUserId); |
| 281 | 276 | }); |
| 282 | 277 | } |
| 283 | - const dataPersonString = dataPersonArray.join(','); | |
| 278 | + const dataPersonString = dataPersonArray.join(","); | |
| 284 | 279 | const url = `${commonConfig.server_host}business/getProData?sModelsId=${sModelsId}`; |
| 285 | 280 | const value = { |
| 286 | - sProName: 'Sp_System_AutoSendCheckMsg', | |
| 281 | + sProName: "Sp_System_AutoSendCheckMsg", | |
| 287 | 282 | paramsMap: { |
| 288 | 283 | sFormGuid: sModelsId, |
| 289 | 284 | sBillKey: currentPane.sProcName, |
| ... | ... | @@ -291,7 +286,7 @@ class CommonNewBill extends Component { |
| 291 | 286 | sGuid: masterData.sId, |
| 292 | 287 | sBillNo: masterData.sBillNo, |
| 293 | 288 | sCheckCondition: checkConditions, |
| 294 | - sMemo: '', | |
| 289 | + sMemo: "", | |
| 295 | 290 | sCheckModelGuid: sCheckModelId, |
| 296 | 291 | sCheckPerson: dataPersonString, |
| 297 | 292 | }, |
| ... | ... | @@ -299,9 +294,9 @@ class CommonNewBill extends Component { |
| 299 | 294 | |
| 300 | 295 | const returnData = (await commonServices.postValueService(app.token, value, url)).data; |
| 301 | 296 | if (returnData.code === 1) { |
| 302 | - const noCheckMsg = commonFunc.showMessage(app.commonConst, 'NoCheckMsg'); /* 您有消息待审核 */ | |
| 297 | + const noCheckMsg = commonFunc.showMessage(app.commonConst, "NoCheckMsg"); /* 您有消息待审核 */ | |
| 303 | 298 | if (returnData.dataset.rows[0].dataSet.outData[0].sCode === 1) { |
| 304 | - this.props.handleSendSocketMessage('examine', 'showImg', currentId, dataPersonString, noCheckMsg, null); | |
| 299 | + this.props.handleSendSocketMessage("examine", "showImg", currentId, dataPersonString, noCheckMsg, null); | |
| 305 | 300 | const urlCanCheckBill = `${commonConfig.server_host}checkModel/getCanCheckBill?sModelsId=${sModelsId}`; |
| 306 | 301 | const valueCanCheckBill = { sCheckModelId, checkPersonData, sBillId: masterData.sId }; |
| 307 | 302 | const returnCanCheckBill = (await commonServices.postValueService(app.token, valueCanCheckBill, urlCanCheckBill)).data; |
| ... | ... | @@ -313,15 +308,17 @@ class CommonNewBill extends Component { |
| 313 | 308 | }); |
| 314 | 309 | return; |
| 315 | 310 | } |
| 316 | - } else { /* 失败 */ | |
| 311 | + } else { | |
| 312 | + /* 失败 */ | |
| 317 | 313 | this.props.getServiceError(returnCanCheckBill); |
| 318 | 314 | } |
| 319 | - this.props.handleSendSocketMessage('reflush', 'showImg', currentId, dataPersonString, noCheckMsg, null); | |
| 315 | + this.props.handleSendSocketMessage("reflush", "showImg", currentId, dataPersonString, noCheckMsg, null); | |
| 320 | 316 | message.success(returnData.msg); |
| 321 | 317 | } else { |
| 322 | 318 | message.error(returnData.dataset.rows[0].dataSet.outData[0].sReturn); |
| 323 | 319 | } |
| 324 | - } else { /* 失败 */ | |
| 320 | + } else { | |
| 321 | + /* 失败 */ | |
| 325 | 322 | this.props.getServiceError(returnData); |
| 326 | 323 | } |
| 327 | 324 | } |
| ... | ... | @@ -336,11 +333,9 @@ class CommonNewBill extends Component { |
| 336 | 333 | }); |
| 337 | 334 | }; |
| 338 | 335 | handleTableModal = async () => { |
| 339 | - const { | |
| 340 | - sModelsId, controlData, masterData, slaveData, controlConfig, slaveSelectedRowKeys, enabled, slaveConfig, | |
| 341 | - } = this.props; | |
| 336 | + const { sModelsId, controlData, masterData, slaveData, controlConfig, slaveSelectedRowKeys, enabled, slaveConfig } = this.props; | |
| 342 | 337 | const addState = {}; |
| 343 | - if (this.props.sModelsType === 'sales/salesOrder') { | |
| 338 | + if (this.props.sModelsType === "sales/salesOrder") { | |
| 344 | 339 | const iSlaveIndex = slaveData.findIndex(item => item.sId === slaveSelectedRowKeys[0]); |
| 345 | 340 | const iIndex = controlData.findIndex(item => item.sSlaveId === slaveSelectedRowKeys[0]); |
| 346 | 341 | if (iIndex === -1 && iSlaveIndex > -1 && enabled) { |
| ... | ... | @@ -349,15 +344,15 @@ class CommonNewBill extends Component { |
| 349 | 344 | allTableData.slaveData = slaveData; |
| 350 | 345 | // let dropdownProductClassifyId = commonUtils.getStoreDropDownData(sModelsId, 'slave', 'sProductClassifyId'); |
| 351 | 346 | let dropdownProductClassifyId; |
| 352 | - const slaveIndex = slaveConfig.gdsconfigformslave.findIndex(item => item.sName === 'sProductClassifyId'); | |
| 347 | + const slaveIndex = slaveConfig.gdsconfigformslave.findIndex(item => item.sName === "sProductClassifyId"); | |
| 353 | 348 | if (slaveIndex > -1) { |
| 354 | - const sqlDropDownData = await this.props.getSqlDropDownData(sModelsId, 'slave', slaveConfig.gdsconfigformslave[slaveIndex]); | |
| 349 | + const sqlDropDownData = await this.props.getSqlDropDownData(sModelsId, "slave", slaveConfig.gdsconfigformslave[slaveIndex]); | |
| 355 | 350 | dropdownProductClassifyId = sqlDropDownData.dropDownData; |
| 356 | 351 | } |
| 357 | 352 | if (commonUtils.isEmptyArr(dropdownProductClassifyId)) { |
| 358 | - const iIndex = slaveConfig.gdsconfigformslave.findIndex(item => item.sName === 'sProductClassifyName'); | |
| 353 | + const iIndex = slaveConfig.gdsconfigformslave.findIndex(item => item.sName === "sProductClassifyName"); | |
| 359 | 354 | if (iIndex > -1) { |
| 360 | - const sqlDropDownData = await this.props.getSqlDropDownData(sModelsId, 'slave', slaveConfig.gdsconfigformslave[iIndex]); | |
| 355 | + const sqlDropDownData = await this.props.getSqlDropDownData(sModelsId, "slave", slaveConfig.gdsconfigformslave[iIndex]); | |
| 361 | 356 | dropdownProductClassifyId = sqlDropDownData.dropDownData; |
| 362 | 357 | } |
| 363 | 358 | // dropdownProductClassifyId = commonUtils.getStoreDropDownData(sModelsId, 'slave', 'sProductClassifyName'); |
| ... | ... | @@ -367,10 +362,10 @@ class CommonNewBill extends Component { |
| 367 | 362 | if (commonUtils.isNotEmptyObject(dropdownProductClassifyId[iProductClassifyIdIndex])) { |
| 368 | 363 | const sAllPartsName = dropdownProductClassifyId[iProductClassifyIdIndex].sAllPartsName; |
| 369 | 364 | if (commonUtils.isNotEmptyStr(sAllPartsName)) { |
| 370 | - const sAssignFieldObj = sAllPartsName.split(','); | |
| 365 | + const sAssignFieldObj = sAllPartsName.split(","); | |
| 371 | 366 | for (const child of sAssignFieldObj) { |
| 372 | 367 | const tableDataRowAdd = commonFunc.getDefaultData(controlConfig, allTableData); |
| 373 | - tableDataRowAdd.handleType = 'add'; | |
| 368 | + tableDataRowAdd.handleType = "add"; | |
| 374 | 369 | tableDataRowAdd.sId = commonUtils.createSid(); |
| 375 | 370 | tableDataRowAdd.sParentId = masterData && masterData.sId ? masterData.sId : null; |
| 376 | 371 | tableDataRowAdd.sSlaveId = slaveSelectedRowKeys[0]; |
| ... | ... | @@ -402,46 +397,44 @@ class CommonNewBill extends Component { |
| 402 | 397 | }; |
| 403 | 398 | handleTableChooseProcess = () => { |
| 404 | 399 | const { processConfig } = this.props; |
| 405 | - const iIndex = processConfig.gdsconfigformslave.findIndex(item => item.sControlName === 'BtnChooseProcess'); | |
| 400 | + const iIndex = processConfig.gdsconfigformslave.findIndex(item => item.sControlName === "BtnChooseProcess"); | |
| 406 | 401 | |
| 407 | 402 | if (iIndex > -1) { |
| 408 | - this.props.onBtnChoose('process', 'BtnChooseProcess', processConfig.gdsconfigformslave[iIndex]); | |
| 403 | + this.props.onBtnChoose("process", "BtnChooseProcess", processConfig.gdsconfigformslave[iIndex]); | |
| 409 | 404 | } |
| 410 | 405 | }; |
| 411 | - handleCancelModal = (modelVisible) => { | |
| 406 | + handleCancelModal = modelVisible => { | |
| 412 | 407 | this.props.onSaveState({ |
| 413 | 408 | [modelVisible]: false, |
| 414 | 409 | }); |
| 415 | 410 | }; |
| 416 | 411 | handleOkModal = () => { |
| 417 | - const { | |
| 418 | - controlData, slave0Data, processData, sModelsId, slaveData, slaveSelectedRowKeys, materialsConfig, processConfig, | |
| 419 | - } = this.props; | |
| 420 | - const ctData = controlData.filter(item => item.handleType !== 'del' && item.sSlaveId === slaveSelectedRowKeys[0]); | |
| 421 | - const mtData = slave0Data.filter(item => item.handleType !== 'del' && item.sSlaveId === slaveSelectedRowKeys[0]); | |
| 422 | - const pData = processData.filter(item => item.handleType !== 'del' && item.sSlaveId === slaveSelectedRowKeys[0] && item.sType === '2'); | |
| 412 | + const { controlData, slave0Data, processData, sModelsId, slaveData, slaveSelectedRowKeys, materialsConfig, processConfig } = this.props; | |
| 413 | + const ctData = controlData.filter(item => item.handleType !== "del" && item.sSlaveId === slaveSelectedRowKeys[0]); | |
| 414 | + const mtData = slave0Data.filter(item => item.handleType !== "del" && item.sSlaveId === slaveSelectedRowKeys[0]); | |
| 415 | + const pData = processData.filter(item => item.handleType !== "del" && item.sSlaveId === slaveSelectedRowKeys[0] && item.sType === "2"); | |
| 423 | 416 | if (commonUtils.isNotEmptyArr(ctData)) { |
| 424 | - let mDetail = ''; | |
| 425 | - let pDetail = ''; | |
| 417 | + let mDetail = ""; | |
| 418 | + let pDetail = ""; | |
| 426 | 419 | const slaveIndex = slaveData.findIndex(item => item.sId === slaveSelectedRowKeys[0]); |
| 427 | 420 | ctData.forEach(async (controlItem, n) => { |
| 428 | 421 | if (commonUtils.isNotEmptyObject(controlItem.sPartsName)) { |
| 429 | - const qz = n === 0 ? '' : ' '; | |
| 422 | + const qz = n === 0 ? "" : " "; | |
| 430 | 423 | if (commonUtils.isNotEmptyObject(controlItem.sPartsName)) { |
| 431 | 424 | const yDetail = `${mDetail}${qz}#${controlItem.sPartsName}:`; |
| 432 | 425 | const gDetail = `${pDetail}${qz}#${controlItem.sPartsName}:`; |
| 433 | - let imDetail = ''; | |
| 434 | - let ipDetail = ''; | |
| 435 | - const materials = mtData.filter(materialsItem => (materialsItem.sControlId === controlItem.sId)); | |
| 426 | + let imDetail = ""; | |
| 427 | + let ipDetail = ""; | |
| 428 | + const materials = mtData.filter(materialsItem => materialsItem.sControlId === controlItem.sId); | |
| 436 | 429 | // const materialsIdDropDown = commonUtils.getStoreDropDownData(sModelsId, 'materials', 'sMaterialsName'); |
| 437 | 430 | let materialsIdDropDown; |
| 438 | - const materialsIndex = materialsConfig.gdsconfigformslave.findIndex(item => item.sName === 'sMaterialsName'); | |
| 431 | + const materialsIndex = materialsConfig.gdsconfigformslave.findIndex(item => item.sName === "sMaterialsName"); | |
| 439 | 432 | if (materialsIndex > -1) { |
| 440 | - const sqlDropDownData = await this.props.getSqlDropDownData(sModelsId, 'materials', materialsConfig.gdsconfigformslave[materialsIndex]); | |
| 433 | + const sqlDropDownData = await this.props.getSqlDropDownData(sModelsId, "materials", materialsConfig.gdsconfigformslave[materialsIndex]); | |
| 441 | 434 | materialsIdDropDown = sqlDropDownData.dropDownData; |
| 442 | 435 | } |
| 443 | 436 | materials.forEach((mItem, i) => { |
| 444 | - const fh = i === 0 ? '' : ','; | |
| 437 | + const fh = i === 0 ? "" : ","; | |
| 445 | 438 | if (materialsIdDropDown) { |
| 446 | 439 | const materialsIdIndex = materialsIdDropDown.findIndex(item => item.sId === mItem.sMaterialsId); |
| 447 | 440 | if (materialsIdIndex > -1) { |
| ... | ... | @@ -450,16 +443,16 @@ class CommonNewBill extends Component { |
| 450 | 443 | } |
| 451 | 444 | }); |
| 452 | 445 | // processPropsType |
| 453 | - const process = pData.filter(processItem => (processItem.sControlId === controlItem.sId)); | |
| 446 | + const process = pData.filter(processItem => processItem.sControlId === controlItem.sId); | |
| 454 | 447 | // const processIdDropDown = commonUtils.getStoreDropDownData(sModelsId, 'process', 'sProcessName'); |
| 455 | 448 | let processIdDropDown; |
| 456 | - const processIndex = processConfig.gdsconfigformslave.findIndex(item => item.sName === 'sProcessName'); | |
| 449 | + const processIndex = processConfig.gdsconfigformslave.findIndex(item => item.sName === "sProcessName"); | |
| 457 | 450 | if (processIndex > -1) { |
| 458 | - const sqlDropDownData = await this.props.getSqlDropDownData(sModelsId, 'process', processConfig.gdsconfigformslave[processIndex]); | |
| 451 | + const sqlDropDownData = await this.props.getSqlDropDownData(sModelsId, "process", processConfig.gdsconfigformslave[processIndex]); | |
| 459 | 452 | processIdDropDown = sqlDropDownData.dropDownData; |
| 460 | 453 | } |
| 461 | 454 | process.forEach((pItem, i) => { |
| 462 | - const fh = i === 0 ? '' : ','; | |
| 455 | + const fh = i === 0 ? "" : ","; | |
| 463 | 456 | if (processIdDropDown) { |
| 464 | 457 | const processIdIndex = processIdDropDown.findIndex(item => item.sId === pItem.sProcessId); |
| 465 | 458 | if (processIdIndex > -1) { |
| ... | ... | @@ -478,13 +471,13 @@ class CommonNewBill extends Component { |
| 478 | 471 | }); |
| 479 | 472 | slaveData[slaveIndex].sMaterialsMemo = mDetail; |
| 480 | 473 | slaveData[slaveIndex].sProcessMemo = pDetail; |
| 481 | - slaveData[slaveIndex].handleType = commonUtils.isEmpty(slaveData[slaveIndex].handleType) ? 'update' : slaveData[slaveIndex].handleType; | |
| 474 | + slaveData[slaveIndex].handleType = commonUtils.isEmpty(slaveData[slaveIndex].handleType) ? "update" : slaveData[slaveIndex].handleType; | |
| 482 | 475 | } else if (commonUtils.isNotEmptyArr(controlData) && commonUtils.isEmptyArr(ctData)) { |
| 483 | 476 | const sSlaveId = controlData[0].sSlaveId; |
| 484 | 477 | const slaveIndex = slaveData.findIndex(item => item.sId === sSlaveId); |
| 485 | - slaveData[slaveIndex].sMaterialsMemo = ''; | |
| 486 | - slaveData[slaveIndex].sProcessMemo = ''; | |
| 487 | - slaveData[slaveIndex].handleType = commonUtils.isEmpty(slaveData[slaveIndex].handleType) ? 'update' : slaveData[slaveIndex].handleType; | |
| 478 | + slaveData[slaveIndex].sMaterialsMemo = ""; | |
| 479 | + slaveData[slaveIndex].sProcessMemo = ""; | |
| 480 | + slaveData[slaveIndex].handleType = commonUtils.isEmpty(slaveData[slaveIndex].handleType) ? "update" : slaveData[slaveIndex].handleType; | |
| 488 | 481 | } |
| 489 | 482 | this.props.onSaveState({ |
| 490 | 483 | visibleModal: false, |
| ... | ... | @@ -496,7 +489,7 @@ class CommonNewBill extends Component { |
| 496 | 489 | }; |
| 497 | 490 | /** 控制选择控制表时,显示部件工序与成品工序 */ |
| 498 | 491 | handleFilterSlaveData = (name, dataIndex, value, record) => { |
| 499 | - return (commonUtils.isNotEmptyStr(record.sSlaveId) && record.sSlaveId.toString().toLowerCase().includes(value.toLowerCase())); | |
| 492 | + return commonUtils.isNotEmptyStr(record.sSlaveId) && record.sSlaveId.toString().toLowerCase().includes(value.toLowerCase()); | |
| 500 | 493 | }; |
| 501 | 494 | /** 控制选择控制表时,显示部件工序与成品工序 */ |
| 502 | 495 | // eslint-disable-next-line no-unused-vars |
| ... | ... | @@ -517,15 +510,19 @@ class CommonNewBill extends Component { |
| 517 | 510 | // (commonUtils.isNotEmptyStr(record.sControlId) && record.sControlId.toString().toLowerCase().includes(value.toLowerCase())); |
| 518 | 511 | }; |
| 519 | 512 | /* 控制表过滤材料表 工序表数据 */ |
| 520 | - handleGetFilterData = (name) => { | |
| 513 | + handleGetFilterData = name => { | |
| 521 | 514 | const { [`${name}Data`]: data, controlSelectedRowKeys, slaveSelectedRowKeys } = this.props; |
| 522 | 515 | if (data !== undefined) { |
| 523 | - const newArr = data.filter((item) => { | |
| 524 | - if (name === 'control') { | |
| 525 | - return (commonUtils.isNotEmptyStr(item.sSlaveId) && item.sSlaveId.toString().toLowerCase().includes(slaveSelectedRowKeys.toString())); | |
| 516 | + const newArr = data.filter(item => { | |
| 517 | + if (name === "control") { | |
| 518 | + return commonUtils.isNotEmptyStr(item.sSlaveId) && item.sSlaveId.toString().toLowerCase().includes(slaveSelectedRowKeys.toString()); | |
| 526 | 519 | } else { |
| 527 | - return (commonUtils.isNotEmptyStr(item.sControlId) && item.sControlId.toString().toLowerCase().includes(controlSelectedRowKeys.toString()) && | |
| 528 | - commonUtils.isNotEmptyStr(item.sSlaveId) && item.sSlaveId.toString().toLowerCase().includes(slaveSelectedRowKeys.toString())); | |
| 520 | + return ( | |
| 521 | + commonUtils.isNotEmptyStr(item.sControlId) && | |
| 522 | + item.sControlId.toString().toLowerCase().includes(controlSelectedRowKeys.toString()) && | |
| 523 | + commonUtils.isNotEmptyStr(item.sSlaveId) && | |
| 524 | + item.sSlaveId.toString().toLowerCase().includes(slaveSelectedRowKeys.toString()) | |
| 525 | + ); | |
| 529 | 526 | } |
| 530 | 527 | }); |
| 531 | 528 | return newArr.length; |
| ... | ... | @@ -535,24 +532,32 @@ class CommonNewBill extends Component { |
| 535 | 532 | handleTableAdd = async (name, flag) => { |
| 536 | 533 | /* 外置处理业务 */ |
| 537 | 534 | const { |
| 538 | - sModelsId, sModelsType, gdsformconst, slaveData, controlData, controlSelectedRowKeys, [`${name}Data`]: tableData, slaveSelectedRowKeys, slaveConfig, | |
| 535 | + sModelsId, | |
| 536 | + sModelsType, | |
| 537 | + gdsformconst, | |
| 538 | + slaveData, | |
| 539 | + controlData, | |
| 540 | + controlSelectedRowKeys, | |
| 541 | + [`${name}Data`]: tableData, | |
| 542 | + slaveSelectedRowKeys, | |
| 543 | + slaveConfig, | |
| 539 | 544 | } = this.props; |
| 540 | 545 | let tableDataRow = {}; |
| 541 | - if (name === 'control') { | |
| 546 | + if (name === "control") { | |
| 542 | 547 | tableDataRow = this.props.onDataRowAdd(name, true); |
| 543 | 548 | if (commonUtils.isEmptyObject(tableDataRow)) { |
| 544 | 549 | return; |
| 545 | 550 | } |
| 546 | 551 | let dPartsQty = 0; |
| 547 | 552 | if (commonUtils.isNotEmptyArr(slaveData)) { |
| 548 | - slaveData.forEach((item) => { | |
| 553 | + slaveData.forEach(item => { | |
| 549 | 554 | dPartsQty += commonUtils.isNull(item.dProductQty, 0) + commonUtils.isNull(item.dGiveQty, 0) + commonUtils.isNull(item.dStockupQty, 0); |
| 550 | 555 | }); |
| 551 | 556 | // const productIdDropDown = commonUtils.getStoreDropDownData(sModelsId, 'slave', 'sProductName'); |
| 552 | 557 | let productIdDropDown; |
| 553 | - const slaveIndex = slaveConfig.gdsconfigformslave.findIndex(item => item.sName === 'sProductName'); | |
| 558 | + const slaveIndex = slaveConfig.gdsconfigformslave.findIndex(item => item.sName === "sProductName"); | |
| 554 | 559 | if (slaveIndex > -1) { |
| 555 | - const sqlDropDownData = await this.props.getSqlDropDownData(sModelsId, 'slave', slaveConfig.gdsconfigformslave[slaveIndex]); | |
| 560 | + const sqlDropDownData = await this.props.getSqlDropDownData(sModelsId, "slave", slaveConfig.gdsconfigformslave[slaveIndex]); | |
| 556 | 561 | productIdDropDown = sqlDropDownData.dropDownData; |
| 557 | 562 | } |
| 558 | 563 | if (productIdDropDown) { |
| ... | ... | @@ -564,9 +569,10 @@ class CommonNewBill extends Component { |
| 564 | 569 | } |
| 565 | 570 | const iSlaveIndex = slaveData.findIndex(item => item.sId === slaveSelectedRowKeys[0]); |
| 566 | 571 | if (iSlaveIndex > -1) { |
| 567 | - if (sModelsType === 'sales/salesOrder') { | |
| 572 | + if (sModelsType === "sales/salesOrder") { | |
| 568 | 573 | if (!commonUtils.isEmpty(slaveData[iSlaveIndex].dProductQty)) { |
| 569 | - tableDataRow.dPartsQty = commonUtils.isNull(slaveData[iSlaveIndex].dProductQty, 0) + commonUtils.isNull(slaveData[iSlaveIndex].dGiveQty, 0); | |
| 574 | + tableDataRow.dPartsQty = | |
| 575 | + commonUtils.isNull(slaveData[iSlaveIndex].dProductQty, 0) + commonUtils.isNull(slaveData[iSlaveIndex].dGiveQty, 0); | |
| 570 | 576 | } |
| 571 | 577 | } else { |
| 572 | 578 | tableDataRow.dPartsQty = dPartsQty; |
| ... | ... | @@ -575,18 +581,18 @@ class CommonNewBill extends Component { |
| 575 | 581 | } |
| 576 | 582 | tableData.push(tableDataRow); |
| 577 | 583 | this.props.onSaveState({ [`${name}Data`]: tableData, [`${name}SelectedRowKeys`]: [tableDataRow.sId] }); |
| 578 | - } else if (name === 'materials' || name === 'process') { | |
| 584 | + } else if (name === "materials" || name === "process") { | |
| 579 | 585 | tableDataRow = this.props.onDataRowAdd(name, true); |
| 580 | 586 | if (commonUtils.isEmptyArr(controlSelectedRowKeys)) { |
| 581 | - const msg = commonFunc.showMessage(gdsformconst, 'pleaseChooseParts'); | |
| 582 | - message.warn(msg === '' ? '请选择部件' : msg); // 请选择部件 | |
| 587 | + const msg = commonFunc.showMessage(gdsformconst, "pleaseChooseParts"); | |
| 588 | + message.warn(msg === "" ? "请选择部件" : msg); // 请选择部件 | |
| 583 | 589 | return; |
| 584 | 590 | } |
| 585 | 591 | const iIndex = controlData.findIndex(item => item.sId === controlSelectedRowKeys[0]); |
| 586 | 592 | const iSlaveIndex = slaveData.findIndex(item => item.sId === slaveSelectedRowKeys[0]); |
| 587 | 593 | if (iIndex > -1 && iSlaveIndex > -1) { |
| 588 | - if (commonUtils.isEmpty(controlData[iIndex].sPartsName) === '') { | |
| 589 | - message.warn(commonFunc.showMessage(gdsformconst, 'partsNameNotNull')); // 部件名称不能为空 | |
| 594 | + if (commonUtils.isEmpty(controlData[iIndex].sPartsName) === "") { | |
| 595 | + message.warn(commonFunc.showMessage(gdsformconst, "partsNameNotNull")); // 部件名称不能为空 | |
| 590 | 596 | return; |
| 591 | 597 | } |
| 592 | 598 | tableDataRow.sSlaveId = slaveData[iSlaveIndex].sId; |
| ... | ... | @@ -611,7 +617,7 @@ class CommonNewBill extends Component { |
| 611 | 617 | /* 删除从表中的数据并存入删除集合中 */ |
| 612 | 618 | const slaveDataFilter = tableData[tableDataIndex]; |
| 613 | 619 | tableData.splice(tableDataIndex, 1); |
| 614 | - slaveDataFilter.handleType = 'del'; | |
| 620 | + slaveDataFilter.handleType = "del"; | |
| 615 | 621 | tableDelData.push(slaveDataFilter); |
| 616 | 622 | tableDataIndex = tableData.findIndex(item => item.sControlId === sId); |
| 617 | 623 | } |
| ... | ... | @@ -620,14 +626,12 @@ class CommonNewBill extends Component { |
| 620 | 626 | }; |
| 621 | 627 | /** 删除表格数据 */ |
| 622 | 628 | handleTableDel = (name, isWait, tableSelectedRowKeys) => { |
| 623 | - const { | |
| 624 | - slaveSelectedRowKeys, slaveData, slaveConfig, sModelsId, masterData, | |
| 625 | - } = this.props; | |
| 626 | - if (name === 'control') { | |
| 629 | + const { slaveSelectedRowKeys, slaveData, slaveConfig, sModelsId, masterData } = this.props; | |
| 630 | + if (name === "control") { | |
| 627 | 631 | const tableSelectedRowKeys = this.props[`${name}SelectedRowKeys`]; |
| 628 | 632 | if (commonUtils.isNotEmptyArr(tableSelectedRowKeys)) { |
| 629 | - const materialsReturnData = this.otherTableDel('materials', tableSelectedRowKeys); | |
| 630 | - const processReturnData = this.otherTableDel('process', tableSelectedRowKeys); | |
| 633 | + const materialsReturnData = this.otherTableDel("materials", tableSelectedRowKeys); | |
| 634 | + const processReturnData = this.otherTableDel("process", tableSelectedRowKeys); | |
| 631 | 635 | const controlReturnData = this.props.onDataRowDel(name, isWait, tableSelectedRowKeys); |
| 632 | 636 | this.props.onSaveState({ |
| 633 | 637 | ...materialsReturnData, |
| ... | ... | @@ -638,12 +642,14 @@ class CommonNewBill extends Component { |
| 638 | 642 | } else { |
| 639 | 643 | return false; |
| 640 | 644 | } |
| 641 | - }else if (name === 'slave') { /* 删除子表 */ | |
| 642 | - if( slaveConfig.sTableType === 'single') { /* 单表删除 */ | |
| 645 | + } else if (name === "slave") { | |
| 646 | + /* 删除子表 */ | |
| 647 | + if (slaveConfig.sTableType === "single") { | |
| 648 | + /* 单表删除 */ | |
| 643 | 649 | if (commonUtils.isNotEmptyArr(slaveSelectedRowKeys)) { |
| 644 | 650 | let slaveSelectedRowNewKeys = slaveSelectedRowKeys; |
| 645 | 651 | const newSelectedRowKeys = this.handleDelSlaveChild(slaveData, slaveSelectedRowKeys[0], slaveSelectedRowKeys); |
| 646 | - if(commonUtils.isNotEmptyArr(newSelectedRowKeys)) { | |
| 652 | + if (commonUtils.isNotEmptyArr(newSelectedRowKeys)) { | |
| 647 | 653 | slaveSelectedRowNewKeys = newSelectedRowKeys; |
| 648 | 654 | } |
| 649 | 655 | const slaveReturnData = this.props.onDataRowDel(name, isWait, slaveSelectedRowNewKeys); |
| ... | ... | @@ -652,16 +658,24 @@ class CommonNewBill extends Component { |
| 652 | 658 | }); |
| 653 | 659 | return true; |
| 654 | 660 | } |
| 655 | - } else if(sModelsId ==='12710101117000994807090') { /* 从表删除 更新主表入仓数量 */ | |
| 661 | + } else if (sModelsId === "12710101117000994807090") { | |
| 662 | + /* 从表删除 更新主表入仓数量 */ | |
| 656 | 663 | const slaveReturnData = this.props.onDataRowDel(name, true, slaveSelectedRowKeys); |
| 657 | - if(commonUtils.isNotEmptyObject(slaveReturnData) && commonUtils.isNotEmptyArr(slaveReturnData.slaveData) && commonUtils.isNotEmptyObject(masterData) ) { | |
| 664 | + if ( | |
| 665 | + commonUtils.isNotEmptyObject(slaveReturnData) && | |
| 666 | + commonUtils.isNotEmptyArr(slaveReturnData.slaveData) && | |
| 667 | + commonUtils.isNotEmptyObject(masterData) | |
| 668 | + ) { | |
| 658 | 669 | let dSumProductQty = 0; |
| 659 | 670 | slaveReturnData.slaveData.forEach((item, index) => { |
| 660 | - dSumProductQty = commonUtils.convertFixNum(commonUtils.convertFixNum(commonUtils.isNull(dSumProductQty, 0),6) + commonUtils.convertFixNum(commonUtils.isNull(item.dSampleQty),6),6); | |
| 671 | + dSumProductQty = commonUtils.convertFixNum( | |
| 672 | + commonUtils.convertFixNum(commonUtils.isNull(dSumProductQty, 0), 6) + commonUtils.convertFixNum(commonUtils.isNull(item.dSampleQty), 6), | |
| 673 | + 6 | |
| 674 | + ); | |
| 661 | 675 | }); |
| 662 | 676 | masterData.dInspectQty = commonUtils.convertFixNum(dSumProductQty * 10000, 6); |
| 663 | - masterData.handleType = commonUtils.isEmpty(masterData.handleType) ? 'update' : masterData.handleType; | |
| 664 | - slaveReturnData.masterData= masterData; | |
| 677 | + masterData.handleType = commonUtils.isEmpty(masterData.handleType) ? "update" : masterData.handleType; | |
| 678 | + slaveReturnData.masterData = masterData; | |
| 665 | 679 | } |
| 666 | 680 | this.props.onSaveState({ |
| 667 | 681 | ...slaveReturnData, |
| ... | ... | @@ -682,19 +696,17 @@ class CommonNewBill extends Component { |
| 682 | 696 | /* 迭代删除从表子表数据 */ |
| 683 | 697 | handleDelSlaveChild = (tableData, sId, tableSelectedKeys) => { |
| 684 | 698 | const filterData = tableData.filter(item => item.sFatherSlaveId === sId); |
| 685 | - filterData.forEach((item) => { | |
| 699 | + filterData.forEach(item => { | |
| 686 | 700 | tableSelectedKeys.push(item.sId); |
| 687 | 701 | this.handleDelSlaveChild(tableData, item.sId, tableSelectedKeys); |
| 688 | 702 | }); |
| 689 | 703 | return tableSelectedKeys; |
| 690 | - } | |
| 704 | + }; | |
| 691 | 705 | |
| 692 | 706 | /** 销售订单删除从表数据时也删除控制材料工序表数据 */ |
| 693 | 707 | handleSlaveTableDel = (name, isWait, tableSelectedRowKeys) => { |
| 694 | - const { | |
| 695 | - sModelsType, controlData, processData, materialsData, | |
| 696 | - } = this.props; | |
| 697 | - if (sModelsType === 'sales/salesOrder' && name === 'slave') { | |
| 708 | + const { sModelsType, controlData, processData, materialsData } = this.props; | |
| 709 | + if (sModelsType === "sales/salesOrder" && name === "slave") { | |
| 698 | 710 | const controlDataDel = controlData.filter(item => item.sSlaveId === tableSelectedRowKeys[0]); |
| 699 | 711 | const controlDataSelectedRowKeys = []; |
| 700 | 712 | if (!commonUtils.isEmpty(controlDataDel)) { |
| ... | ... | @@ -703,7 +715,7 @@ class CommonNewBill extends Component { |
| 703 | 715 | controlDataSelectedRowKeys.push(materialsDataSelectedRowKey); |
| 704 | 716 | } |
| 705 | 717 | if (commonUtils.isNotEmptyArr(controlDataSelectedRowKeys)) { |
| 706 | - this.props.onDataRowDel('control', isWait, controlDataSelectedRowKeys, true); | |
| 718 | + this.props.onDataRowDel("control", isWait, controlDataSelectedRowKeys, true); | |
| 707 | 719 | } |
| 708 | 720 | const materialsDataDel = materialsData.filter(item => item.sSlaveId === tableSelectedRowKeys[0]); |
| 709 | 721 | const materialsDataSelectedRowKeys = []; |
| ... | ... | @@ -714,7 +726,7 @@ class CommonNewBill extends Component { |
| 714 | 726 | } |
| 715 | 727 | } |
| 716 | 728 | if (commonUtils.isNotEmptyArr(materialsDataSelectedRowKeys)) { |
| 717 | - this.props.onDataRowDel('materials', isWait, materialsDataSelectedRowKeys, true); | |
| 729 | + this.props.onDataRowDel("materials", isWait, materialsDataSelectedRowKeys, true); | |
| 718 | 730 | } |
| 719 | 731 | const processDataDel = processData.filter(item => item.sSlaveId === tableSelectedRowKeys[0]); |
| 720 | 732 | const processDataSelectedRowKeys = []; |
| ... | ... | @@ -725,7 +737,7 @@ class CommonNewBill extends Component { |
| 725 | 737 | } |
| 726 | 738 | } |
| 727 | 739 | if (commonUtils.isNotEmptyArr(processDataSelectedRowKeys)) { |
| 728 | - this.props.onDataRowDel('process', isWait, processDataSelectedRowKeys, true); | |
| 740 | + this.props.onDataRowDel("process", isWait, processDataSelectedRowKeys, true); | |
| 729 | 741 | } |
| 730 | 742 | } |
| 731 | 743 | } |
| ... | ... | @@ -733,21 +745,28 @@ class CommonNewBill extends Component { |
| 733 | 745 | }; |
| 734 | 746 | handleSelect = async (name, selectConfig, selectData) => { |
| 735 | 747 | const { |
| 736 | - [`${name}Data`]: tableData, [`${name}Config`]: tableConfig, masterData, masterConfig, controlSelectedRowKeys, sModelsId, token, app, | |
| 748 | + [`${name}Data`]: tableData, | |
| 749 | + [`${name}Config`]: tableConfig, | |
| 750 | + masterData, | |
| 751 | + masterConfig, | |
| 752 | + controlSelectedRowKeys, | |
| 753 | + sModelsId, | |
| 754 | + token, | |
| 755 | + app, | |
| 737 | 756 | } = this.props; |
| 738 | 757 | const tableSelectedRowKeys = []; |
| 739 | - if (name === 'productProcessInfo') { | |
| 758 | + if (name === "productProcessInfo") { | |
| 740 | 759 | if (commonUtils.isNotEmptyArr(selectData)) { |
| 741 | 760 | let slaveData = []; |
| 742 | 761 | let controlData = []; |
| 743 | 762 | let materialsData = []; |
| 744 | 763 | let processData = []; |
| 745 | - let sConfigMasterIdSlave = ''; | |
| 746 | - let sConfigMasterIdControl = ''; | |
| 747 | - let sConfigMasterIdMaterials = ''; | |
| 748 | - let sConfigMasterIdProcess = ''; | |
| 764 | + let sConfigMasterIdSlave = ""; | |
| 765 | + let sConfigMasterIdControl = ""; | |
| 766 | + let sConfigMasterIdMaterials = ""; | |
| 767 | + let sConfigMasterIdProcess = ""; | |
| 749 | 768 | const selectRowData = selectData[0]; |
| 750 | - const sConfigIdString = masterConfig.gdsconfigformslave.filter(item => item.sName === 'sConfigId')[0].showDropDown; | |
| 769 | + const sConfigIdString = masterConfig.gdsconfigformslave.filter(item => item.sName === "sConfigId")[0].showDropDown; | |
| 751 | 770 | if (commonUtils.isNotEmptyStr(sConfigIdString)) { |
| 752 | 771 | const sConfigId = JSON.parse(sConfigIdString); |
| 753 | 772 | sConfigMasterIdSlave = sConfigId.sConfigMasterIdSlave; |
| ... | ... | @@ -756,24 +775,24 @@ class CommonNewBill extends Component { |
| 756 | 775 | sConfigMasterIdProcess = sConfigId.sConfigMasterIdProcess; |
| 757 | 776 | } |
| 758 | 777 | if (commonUtils.isEmptyStr(sConfigMasterIdSlave)) { |
| 759 | - message.warning(commonFunc.showMessage(app.commonConst, 'slaveParameterErro')); | |
| 778 | + message.warning(commonFunc.showMessage(app.commonConst, "slaveParameterErro")); | |
| 760 | 779 | } |
| 761 | 780 | if (commonUtils.isEmptyStr(sConfigMasterIdControl)) { |
| 762 | - message.warning(commonFunc.showMessage(app.commonConst, 'controlParameterErro')); | |
| 781 | + message.warning(commonFunc.showMessage(app.commonConst, "controlParameterErro")); | |
| 763 | 782 | } |
| 764 | 783 | if (commonUtils.isEmptyStr(sConfigMasterIdMaterials)) { |
| 765 | - message.warning(commonFunc.showMessage(app.commonConst, 'materialsParameterErro')); | |
| 784 | + message.warning(commonFunc.showMessage(app.commonConst, "materialsParameterErro")); | |
| 766 | 785 | } |
| 767 | 786 | if (commonUtils.isEmptyStr(sConfigMasterIdProcess)) { |
| 768 | - message.warning(commonFunc.showMessage(app.commonConst, 'processParameterErro')); | |
| 787 | + message.warning(commonFunc.showMessage(app.commonConst, "processParameterErro")); | |
| 769 | 788 | } |
| 770 | 789 | const slaveUrl = `${commonConfig.server_host}business/getBusinessDataByFormcustomId/${sConfigMasterIdSlave}?sModelsId=${sModelsId}`; |
| 771 | 790 | const value = { sSqlCondition: { sParentId: selectRowData.sId } }; |
| 772 | 791 | const slaveReturnData = (await commonServices.postValueService(token, value, slaveUrl)).data; |
| 773 | 792 | if (slaveReturnData.code === 1) { |
| 774 | 793 | slaveData = slaveReturnData.dataset.rows[0].dataSet; |
| 775 | - slaveData.forEach((item) => { | |
| 776 | - item.handleType = 'add'; | |
| 794 | + slaveData.forEach(item => { | |
| 795 | + item.handleType = "add"; | |
| 777 | 796 | item.sId = commonUtils.createSid(); |
| 778 | 797 | item.sParentId = masterData.sId; |
| 779 | 798 | }); |
| ... | ... | @@ -785,8 +804,8 @@ class CommonNewBill extends Component { |
| 785 | 804 | const controlReturnData = (await commonServices.postValueService(token, value, controlUrl)).data; |
| 786 | 805 | if (controlReturnData.code === 1) { |
| 787 | 806 | controlData = controlReturnData.dataset.rows[0].dataSet; |
| 788 | - controlData.forEach((item) => { | |
| 789 | - item.handleType = 'add'; | |
| 807 | + controlData.forEach(item => { | |
| 808 | + item.handleType = "add"; | |
| 790 | 809 | item.sId = commonUtils.createSid(); |
| 791 | 810 | item.sParentId = masterData.sId; |
| 792 | 811 | }); |
| ... | ... | @@ -797,8 +816,8 @@ class CommonNewBill extends Component { |
| 797 | 816 | const materialsReturnData = (await commonServices.postValueService(token, value, materialsUrl)).data; |
| 798 | 817 | if (materialsReturnData.code === 1) { |
| 799 | 818 | materialsData = materialsReturnData.dataset.rows[0].dataSet; |
| 800 | - materialsData.forEach((item) => { | |
| 801 | - item.handleType = 'add'; | |
| 819 | + materialsData.forEach(item => { | |
| 820 | + item.handleType = "add"; | |
| 802 | 821 | item.sId = commonUtils.createSid(); |
| 803 | 822 | item.sParentId = masterData.sId; |
| 804 | 823 | }); |
| ... | ... | @@ -809,8 +828,8 @@ class CommonNewBill extends Component { |
| 809 | 828 | const processReturnData = (await commonServices.postValueService(token, value, processUrl)).data; |
| 810 | 829 | if (processReturnData.code === 1) { |
| 811 | 830 | processData = processReturnData.dataset.rows[0].dataSet; |
| 812 | - processData.forEach((item) => { | |
| 813 | - item.handleType = 'add'; | |
| 831 | + processData.forEach(item => { | |
| 832 | + item.handleType = "add"; | |
| 814 | 833 | item.sId = commonUtils.createSid(); |
| 815 | 834 | item.sParentId = masterData.sId; |
| 816 | 835 | }); |
| ... | ... | @@ -818,14 +837,19 @@ class CommonNewBill extends Component { |
| 818 | 837 | this.props.getServiceError(processReturnData); |
| 819 | 838 | } |
| 820 | 839 | this.props.onSaveState({ |
| 821 | - processData, materialsData, controlData, slaveData, [`${name}ChooseVisible`]: false, [`${name}SelectedRowKeys`]: tableSelectedRowKeys, | |
| 840 | + processData, | |
| 841 | + materialsData, | |
| 842 | + controlData, | |
| 843 | + slaveData, | |
| 844 | + [`${name}ChooseVisible`]: false, | |
| 845 | + [`${name}SelectedRowKeys`]: tableSelectedRowKeys, | |
| 822 | 846 | }); |
| 823 | 847 | } |
| 824 | 848 | } else { |
| 825 | 849 | const { controlData, slaveData, slaveSelectedRowKeys } = this.props; |
| 826 | 850 | const iIndex = commonUtils.isNotEmptyArr(controlSelectedRowKeys) ? controlData.findIndex(item => item.sId === controlSelectedRowKeys[0]) : -1; |
| 827 | 851 | if (commonUtils.isNotEmptyArr(selectData)) { |
| 828 | - selectData.forEach((item) => { | |
| 852 | + selectData.forEach(item => { | |
| 829 | 853 | const newCopyTo = {}; |
| 830 | 854 | newCopyTo.master = masterData; |
| 831 | 855 | if (iIndex > -1) { |
| ... | ... | @@ -833,20 +857,22 @@ class CommonNewBill extends Component { |
| 833 | 857 | } |
| 834 | 858 | let tableDataRow = commonFunc.getDefaultData(tableConfig, newCopyTo); // 取默认值 |
| 835 | 859 | tableDataRow = { ...tableDataRow, ...commonFunc.getAssignFieldValue(selectConfig.sAssignField, item, newCopyTo) }; // 取赋值字段 |
| 836 | - tableDataRow.handleType = 'add'; | |
| 860 | + tableDataRow.handleType = "add"; | |
| 837 | 861 | tableDataRow.sId = commonUtils.createSid(); |
| 838 | 862 | tableDataRow.sParentId = masterData.sId; |
| 839 | - if (this.props.sModelsType === 'sales/salesOrder') { | |
| 840 | - const iSlaveIndex = commonUtils.isNotEmptyArr(slaveSelectedRowKeys) ? slaveData.findIndex(item => item.sId === slaveSelectedRowKeys[0]) : -1; | |
| 863 | + if (this.props.sModelsType === "sales/salesOrder") { | |
| 864 | + const iSlaveIndex = commonUtils.isNotEmptyArr(slaveSelectedRowKeys) | |
| 865 | + ? slaveData.findIndex(item => item.sId === slaveSelectedRowKeys[0]) | |
| 866 | + : -1; | |
| 841 | 867 | if (iSlaveIndex > -1) { |
| 842 | 868 | tableDataRow.sSlaveId = slaveData[iSlaveIndex].sId; |
| 843 | 869 | } |
| 844 | 870 | } |
| 845 | - if (iIndex > -1 && tableDataRow.sType !== '3') { | |
| 871 | + if (iIndex > -1 && tableDataRow.sType !== "3") { | |
| 846 | 872 | tableDataRow.sControlId = controlData[iIndex].sId; |
| 847 | 873 | tableDataRow.sPartsName = controlData[iIndex].sPartsName; |
| 848 | 874 | tableData.push(tableDataRow); |
| 849 | - } else if (tableDataRow.sType === '3') { | |
| 875 | + } else if (tableDataRow.sType === "3") { | |
| 850 | 876 | tableData.push(tableDataRow); |
| 851 | 877 | } |
| 852 | 878 | tableSelectedRowKeys.push(tableDataRow.sId); |
| ... | ... | @@ -882,38 +908,38 @@ class CommonNewBill extends Component { |
| 882 | 908 | // } |
| 883 | 909 | }; |
| 884 | 910 | |
| 885 | - handleTabChange = (key) => { | |
| 911 | + handleTabChange = key => { | |
| 886 | 912 | setTimeout(() => { |
| 887 | 913 | this.setState({ |
| 888 | - currentTab: key | |
| 889 | - }) | |
| 914 | + currentTab: key, | |
| 915 | + }); | |
| 890 | 916 | }, 0); |
| 891 | - } | |
| 917 | + }; | |
| 892 | 918 | |
| 893 | - handleMenuClick= (e) => { | |
| 919 | + handleMenuClick = e => { | |
| 894 | 920 | let { sId } = this.props.masterData; |
| 895 | 921 | const Type = e.key; |
| 896 | 922 | const { token } = this.props.app; |
| 897 | 923 | const { sType } = this.props.app.userinfo; |
| 898 | - if (Type === 'formSlave') { /* 根据从表勾选数据 生成从表数据 */ | |
| 924 | + if (Type === "formSlave") { | |
| 925 | + /* 根据从表勾选数据 生成从表数据 */ | |
| 899 | 926 | const { slaveSelectedRowKeys } = this.props; |
| 900 | 927 | if (commonUtils.isEmptyObject(slaveSelectedRowKeys)) { |
| 901 | - message.warn('请选择数据'); | |
| 928 | + message.warn("请选择数据"); | |
| 902 | 929 | return; |
| 903 | 930 | } |
| 904 | 931 | sId = slaveSelectedRowKeys; |
| 905 | 932 | } |
| 906 | - const downloadUrl = `${commonConfig.server_host}sqlfile/scriptSqlDownload?methodName=${Type | |
| 907 | - }&sId=${sId}&token=${token}&sType=${sType}`; | |
| 933 | + const downloadUrl = `${commonConfig.server_host}sqlfile/scriptSqlDownload?methodName=${Type}&sId=${sId}&token=${token}&sType=${sType}`; | |
| 908 | 934 | window.open(downloadUrl); |
| 909 | 935 | this.props.onSaveState({ |
| 910 | 936 | downloadUrl, |
| 911 | 937 | }); |
| 912 | 938 | }; |
| 913 | - handleSlaveInit = async (name) => { | |
| 939 | + handleSlaveInit = async name => { | |
| 914 | 940 | const { app, masterData, [`${name}Data`]: slaveData } = this.props; |
| 915 | 941 | if (masterData.sName !== null && masterData.sName !== undefined) { |
| 916 | - message.warn('该节点不能初始化!'); | |
| 942 | + message.warn("该节点不能初始化!"); | |
| 917 | 943 | return; |
| 918 | 944 | } |
| 919 | 945 | // const comfiled = service.service_path.filter(item => (item.route === |
| ... | ... | @@ -921,33 +947,33 @@ class CommonNewBill extends Component { |
| 921 | 947 | // service.service_path.filter(item => (item.route === |
| 922 | 948 | // app.currentPane.route))[0]; |
| 923 | 949 | const comfiled = { |
| 924 | - path: 'gdsconfigform', | |
| 925 | - pathTwo: 'Gdsconfigformmaster', | |
| 926 | - pathSlave: 'Gdsconfigformslave', | |
| 927 | - pathCustom: 'Customslave', | |
| 928 | - pathInit: 'GdsconfigformslaveByMaster', | |
| 929 | - pathSlaveSelect: 'gdsmodule', | |
| 930 | - pathSlaveSelectTwo: 'SelectFormData', | |
| 950 | + path: "gdsconfigform", | |
| 951 | + pathTwo: "Gdsconfigformmaster", | |
| 952 | + pathSlave: "Gdsconfigformslave", | |
| 953 | + pathCustom: "Customslave", | |
| 954 | + pathInit: "GdsconfigformslaveByMaster", | |
| 955 | + pathSlaveSelect: "gdsmodule", | |
| 956 | + pathSlaveSelectTwo: "SelectFormData", | |
| 931 | 957 | }; |
| 932 | - const url = `${commonConfig.server_host}${comfiled.path}/get${comfiled.pathInit | |
| 933 | - }?sParentId=${masterData.sId}&sTbName=${masterData.sTbName}&sType=${masterData.sType}`; | |
| 958 | + const url = `${commonConfig.server_host}${comfiled.path}/get${comfiled.pathInit}?sParentId=${masterData.sId}&sTbName=${masterData.sTbName}&sType=${masterData.sType}`; | |
| 934 | 959 | const dataReturn = (await commonServices.getService(this.props.app.token, url)).data; |
| 935 | 960 | if (dataReturn.code === 1) { |
| 936 | 961 | /* 数据查询成功 */ |
| 937 | 962 | if (commonUtils.isNotEmptyArr(dataReturn.dataset.rows)) { |
| 938 | 963 | const tempData = dataReturn.dataset.rows; |
| 939 | 964 | const initData = []; |
| 940 | - tempData.forEach((item) => { | |
| 941 | - item.handleType = 'add'; | |
| 965 | + tempData.forEach(item => { | |
| 966 | + item.handleType = "add"; | |
| 942 | 967 | initData.push(item); |
| 943 | 968 | }); |
| 944 | 969 | const newData = [...slaveData, ...initData]; |
| 945 | 970 | this.props.onSaveState({ slaveData: newData, enabled: true }); |
| 946 | - message.success('初始化成功!'); | |
| 971 | + message.success("初始化成功!"); | |
| 947 | 972 | } else { |
| 948 | - message.warn('当前表格无需初始化!'); | |
| 973 | + message.warn("当前表格无需初始化!"); | |
| 949 | 974 | } |
| 950 | - } else { /* 失败 */ | |
| 975 | + } else { | |
| 976 | + /* 失败 */ | |
| 951 | 977 | this.props.getServiceError(dataReturn); |
| 952 | 978 | } |
| 953 | 979 | }; |
| ... | ... | @@ -955,35 +981,35 @@ class CommonNewBill extends Component { |
| 955 | 981 | this.props.onCopyRow(name, toname); |
| 956 | 982 | }; |
| 957 | 983 | handleCopy2Custom = () => { |
| 958 | - let toname = 'slave2'; | |
| 984 | + let toname = "slave2"; | |
| 959 | 985 | for (let i = 0; i < 10; i++) { |
| 960 | 986 | const slaveConfigName = `slave${i}Config`; |
| 961 | 987 | const slaveConfig = this.props[slaveConfigName]; |
| 962 | 988 | if (slaveConfig && commonUtils.isNotEmptyObject(slaveConfig)) { |
| 963 | - if (slaveConfig.sTbName === 'gdsconfigformcustomslave') { | |
| 989 | + if (slaveConfig.sTbName === "gdsconfigformcustomslave") { | |
| 964 | 990 | toname = `slave${i}`; |
| 965 | 991 | break; |
| 966 | 992 | } |
| 967 | 993 | } |
| 968 | 994 | } |
| 969 | - this.props.onCopyRow('slave', toname); | |
| 995 | + this.props.onCopyRow("slave", toname); | |
| 970 | 996 | }; |
| 971 | 997 | /** 添加行 */ |
| 972 | 998 | handleAddRow = (name, index) => { |
| 973 | 999 | this.props.onDataRowAdd(name, null, index); |
| 974 | 1000 | }; |
| 975 | 1001 | /** 删除行 */ |
| 976 | - handleDelRow = (name) => { | |
| 1002 | + handleDelRow = name => { | |
| 977 | 1003 | const { [`${name}SelectedRowKeys`]: tableSelectedRowKeys } = this.props; |
| 978 | 1004 | if (this.props.onDataRowDel(name, false, tableSelectedRowKeys)) { |
| 979 | - message.success('删除成功!'); | |
| 1005 | + message.success("删除成功!"); | |
| 980 | 1006 | } |
| 981 | 1007 | }; |
| 982 | 1008 | |
| 983 | 1009 | /* 字段双击弹出 */ |
| 984 | 1010 | handleFieldDoubleClick = (sValue, showConfig, tbName) => { |
| 985 | 1011 | const { [`${tbName}SelectedRowKeys`]: tableSelectedRowKeys, [`${tbName}Data`]: tableData } = this.props; |
| 986 | - if (commonUtils.isNotEmptyObject(showConfig) && showConfig.sName === 'sAssignField') { | |
| 1012 | + if (commonUtils.isNotEmptyObject(showConfig) && showConfig.sName === "sAssignField") { | |
| 987 | 1013 | let tableDataRow = {}; |
| 988 | 1014 | if (commonUtils.isNotEmptyArr(tableData)) { |
| 989 | 1015 | const tableFilterData = tableData.filter(item => tableSelectedRowKeys.includes(item.sId)); |
| ... | ... | @@ -995,17 +1021,18 @@ class CommonNewBill extends Component { |
| 995 | 1021 | { |
| 996 | 1022 | sId: commonUtils.createSid(), |
| 997 | 1023 | sParentId: tableDataRow.sId, |
| 998 | - dataIndex: 'sNewName', | |
| 999 | - title: '现字段', | |
| 1000 | - width: '220px', | |
| 1024 | + dataIndex: "sNewName", | |
| 1025 | + title: "现字段", | |
| 1026 | + width: "220px", | |
| 1001 | 1027 | editable: true, |
| 1002 | 1028 | bNotSort: true, |
| 1003 | - }, { | |
| 1029 | + }, | |
| 1030 | + { | |
| 1004 | 1031 | sId: commonUtils.createSid(), |
| 1005 | 1032 | sParentId: tableDataRow.sId, |
| 1006 | - dataIndex: 'sOldName', | |
| 1007 | - title: '源字段', | |
| 1008 | - width: '220px', | |
| 1033 | + dataIndex: "sOldName", | |
| 1034 | + title: "源字段", | |
| 1035 | + width: "220px", | |
| 1009 | 1036 | editable: true, |
| 1010 | 1037 | bNotSort: true, |
| 1011 | 1038 | }, |
| ... | ... | @@ -1013,10 +1040,10 @@ class CommonNewBill extends Component { |
| 1013 | 1040 | const sAssignFieldData = []; |
| 1014 | 1041 | if (commonUtils.isNotEmptyObject(tableDataRow) && commonUtils.isNotEmptyObject(sValue)) { |
| 1015 | 1042 | const selectedRowKeys = []; |
| 1016 | - const sAssignFieldDataTemp = sValue.split(','); | |
| 1017 | - sAssignFieldDataTemp.forEach((index) => { | |
| 1043 | + const sAssignFieldDataTemp = sValue.split(","); | |
| 1044 | + sAssignFieldDataTemp.forEach(index => { | |
| 1018 | 1045 | const aAssignFieldObj = {}; |
| 1019 | - const splitData = index.split(':'); | |
| 1046 | + const splitData = index.split(":"); | |
| 1020 | 1047 | if (commonUtils.isNotEmptyArr(splitData)) { |
| 1021 | 1048 | aAssignFieldObj.sId = commonUtils.createSid(); |
| 1022 | 1049 | aAssignFieldObj.sNewName = splitData[0]; |
| ... | ... | @@ -1031,7 +1058,7 @@ class CommonNewBill extends Component { |
| 1031 | 1058 | visibleAssignmentField: true, |
| 1032 | 1059 | sAssignFieldData, |
| 1033 | 1060 | sAssignFieldName: tbName, |
| 1034 | - sAssignFieldRowId: tableDataRow.sId, /* 选中行的sId */ | |
| 1061 | + sAssignFieldRowId: tableDataRow.sId /* 选中行的sId */, | |
| 1035 | 1062 | enabled, |
| 1036 | 1063 | }); |
| 1037 | 1064 | } else { |
| ... | ... | @@ -1040,10 +1067,11 @@ class CommonNewBill extends Component { |
| 1040 | 1067 | visibleAssignmentField: true, |
| 1041 | 1068 | sAssignFieldData: [], |
| 1042 | 1069 | sAssignFieldName: tbName, |
| 1043 | - sAssignFieldRowId: tableDataRow.sId, /* 选中行的sId */ | |
| 1070 | + sAssignFieldRowId: tableDataRow.sId /* 选中行的sId */, | |
| 1044 | 1071 | }); |
| 1045 | 1072 | } |
| 1046 | - } else if(showConfig?.sName === 'sInstruct') { /* 指令集弹窗 */ | |
| 1073 | + } else if (showConfig?.sName === "sInstruct") { | |
| 1074 | + /* 指令集弹窗 */ | |
| 1047 | 1075 | const sInstructJsonString = sValue; |
| 1048 | 1076 | this.props.onSaveState({ |
| 1049 | 1077 | visibleInstructField: true, |
| ... | ... | @@ -1053,51 +1081,49 @@ class CommonNewBill extends Component { |
| 1053 | 1081 | }; |
| 1054 | 1082 | /* 拿到赋值字段 */ |
| 1055 | 1083 | handleGetsAssignField = (data, sFieldName) => { |
| 1056 | - if (sFieldName === 'sAssignField') { | |
| 1084 | + if (sFieldName === "sAssignField") { | |
| 1057 | 1085 | const { sAssignFieldRowId, sAssignFieldName } = this.props; /* 双击弹出赋值窗体的行ID */ |
| 1058 | 1086 | const { [`${sAssignFieldName}Data`]: tableData } = this.props; |
| 1059 | 1087 | if (commonUtils.isNotEmptyArr(tableData)) { |
| 1060 | 1088 | const iIndex = tableData.findIndex(item => item.sId === sAssignFieldRowId); |
| 1061 | 1089 | const newData = {}; |
| 1062 | 1090 | /* 将数组变成赋值字符串 */ |
| 1063 | - let sAssignFieldStr = ''; | |
| 1091 | + let sAssignFieldStr = ""; | |
| 1064 | 1092 | const len = data.length; |
| 1065 | 1093 | data.forEach((item, index) => { |
| 1066 | 1094 | sAssignFieldStr += `${item.sNewName}:${item.sOldName}`; |
| 1067 | - if (index !== (len - 1)) { | |
| 1068 | - sAssignFieldStr += ','; | |
| 1095 | + if (index !== len - 1) { | |
| 1096 | + sAssignFieldStr += ","; | |
| 1069 | 1097 | } |
| 1070 | 1098 | }); |
| 1071 | 1099 | newData.sAssignField = sAssignFieldStr; |
| 1072 | - newData.handleType = commonUtils.isEmpty(tableData[iIndex].handleType) ? 'update' : tableData[iIndex].handleType; | |
| 1100 | + newData.handleType = commonUtils.isEmpty(tableData[iIndex].handleType) ? "update" : tableData[iIndex].handleType; | |
| 1073 | 1101 | tableData[iIndex] = { ...tableData[iIndex], ...newData }; |
| 1074 | 1102 | this.props.onSaveState({ [`${sAssignFieldName}Data`]: tableData }); |
| 1075 | 1103 | } |
| 1076 | 1104 | } |
| 1077 | - } | |
| 1105 | + }; | |
| 1078 | 1106 | |
| 1079 | 1107 | handleUploadPropsSales = () => { |
| 1080 | 1108 | const { masterData, sModelsType } = this.props; |
| 1081 | 1109 | if (commonUtils.isNotEmptyObject(masterData)) { |
| 1082 | 1110 | const sCustomerId = commonUtils.isEmptyStr(masterData.sCustomerId) ? undefined : masterData.sCustomerId; |
| 1083 | 1111 | let existCustomerId = false; |
| 1084 | - if (sModelsType.includes('sales/') && commonUtils.isNotEmptyStr(sCustomerId)) { | |
| 1112 | + if (sModelsType.includes("sales/") && commonUtils.isNotEmptyStr(sCustomerId)) { | |
| 1085 | 1113 | existCustomerId = true; |
| 1086 | - } else if (!sModelsType.includes('sales/')) { | |
| 1114 | + } else if (!sModelsType.includes("sales/")) { | |
| 1087 | 1115 | existCustomerId = true; |
| 1088 | 1116 | } |
| 1089 | 1117 | return { |
| 1090 | - disabled: !this.props.enabled || !existCustomerId, /* 是否可用 */ | |
| 1091 | - style: { display: commonUtils.convertBooleanToDisplayBlock(true) }, /* 是否显示 */ | |
| 1118 | + disabled: !this.props.enabled || !existCustomerId /* 是否可用 */, | |
| 1119 | + style: { display: commonUtils.convertBooleanToDisplayBlock(true) } /* 是否显示 */, | |
| 1092 | 1120 | }; |
| 1093 | 1121 | } |
| 1094 | 1122 | }; |
| 1095 | 1123 | |
| 1096 | - handleUploadChangeFile = async (info) => { | |
| 1124 | + handleUploadChangeFile = async info => { | |
| 1097 | 1125 | const { file } = info; |
| 1098 | - const { | |
| 1099 | - masterData, sModelsId, app, token, sModelsType, slaveConfig, slaveData, | |
| 1100 | - } = this.props; | |
| 1126 | + const { masterData, sModelsId, app, token, sModelsType, slaveConfig, slaveData } = this.props; | |
| 1101 | 1127 | if (file.response) { |
| 1102 | 1128 | if (file.response.code === 1) { |
| 1103 | 1129 | if (file.response.dataset.rows.length > 1) { |
| ... | ... | @@ -1110,16 +1136,18 @@ class CommonNewBill extends Component { |
| 1110 | 1136 | const importErrorData = errorInfo; |
| 1111 | 1137 | this.props.onSaveState({ |
| 1112 | 1138 | showImportErrorVisible: true, |
| 1113 | - importData: importErrorData | |
| 1139 | + importData: importErrorData, | |
| 1114 | 1140 | }); |
| 1115 | 1141 | return; |
| 1116 | 1142 | } |
| 1117 | 1143 | |
| 1118 | - const tableName = ['', 0, 1, 2, 3, 4, 5, 6, 7, 8, 9].filter(item => { | |
| 1119 | - const name = `slave${item}Config`; | |
| 1120 | - const config = this.props[name] || {}; | |
| 1121 | - return config.sGrd === row.sGrd || config.sTableName === row.sTableName; | |
| 1122 | - }).map(item => `slave${item}`)[0]; | |
| 1144 | + const tableName = ["", 0, 1, 2, 3, 4, 5, 6, 7, 8, 9] | |
| 1145 | + .filter(item => { | |
| 1146 | + const name = `slave${item}Config`; | |
| 1147 | + const config = this.props[name] || {}; | |
| 1148 | + return config.sGrd === row.sGrd || config.sTableName === row.sTableName; | |
| 1149 | + }) | |
| 1150 | + .map(item => `slave${item}`)[0]; | |
| 1123 | 1151 | |
| 1124 | 1152 | if (!tableName) continue; |
| 1125 | 1153 | |
| ... | ... | @@ -1127,9 +1155,9 @@ class CommonNewBill extends Component { |
| 1127 | 1155 | const { [`${tableName}Data`]: tableData = [], [`${tableName}Config`]: tableConfig } = this.props; |
| 1128 | 1156 | /* 把之前存放的数据删除 */ |
| 1129 | 1157 | addState[`${tableName}DelData`] = []; |
| 1130 | - tableData.forEach((item) => { | |
| 1131 | - if (item.handleType !== 'add') { | |
| 1132 | - item.handleType = 'del'; | |
| 1158 | + tableData.forEach(item => { | |
| 1159 | + if (item.handleType !== "add") { | |
| 1160 | + item.handleType = "del"; | |
| 1133 | 1161 | tableDelData.push(item); |
| 1134 | 1162 | } |
| 1135 | 1163 | }); |
| ... | ... | @@ -1137,16 +1165,22 @@ class CommonNewBill extends Component { |
| 1137 | 1165 | const returnData = row.canbeInsert; |
| 1138 | 1166 | let iCount = 0; |
| 1139 | 1167 | let productIdDropDown; |
| 1140 | - if (productIdDropDown === undefined && commonUtils.isNotEmptyArr(returnData)) { /* 无论导入多少条数据 都只调用1次接口,获取产品下拉数据集 */ | |
| 1141 | - const iIndex = tableConfig.gdsconfigformslave.findIndex(item => item.sName === 'sProductName'); | |
| 1168 | + if (productIdDropDown === undefined && commonUtils.isNotEmptyArr(returnData)) { | |
| 1169 | + /* 无论导入多少条数据 都只调用1次接口,获取产品下拉数据集 */ | |
| 1170 | + const iIndex = tableConfig.gdsconfigformslave.findIndex(item => item.sName === "sProductName"); | |
| 1142 | 1171 | if (iIndex > -1) { |
| 1143 | - const sqlDropDownData = await this.props.getSqlDropDownData(sModelsId, tableName, tableConfig.gdsconfigformslave[iIndex], returnData[0]); | |
| 1172 | + const sqlDropDownData = await this.props.getSqlDropDownData( | |
| 1173 | + sModelsId, | |
| 1174 | + tableName, | |
| 1175 | + tableConfig.gdsconfigformslave[iIndex], | |
| 1176 | + returnData[0] | |
| 1177 | + ); | |
| 1144 | 1178 | productIdDropDown = sqlDropDownData.dropDownData; |
| 1145 | 1179 | } |
| 1146 | 1180 | } |
| 1147 | 1181 | |
| 1148 | - await returnData.forEach(async (tableDataRow) => { | |
| 1149 | - tableDataRow.handleType = 'add'; | |
| 1182 | + await returnData.forEach(async tableDataRow => { | |
| 1183 | + tableDataRow.handleType = "add"; | |
| 1150 | 1184 | tableDataRow.sId = commonUtils.createSid(); |
| 1151 | 1185 | tableDataRow.sParentId = masterData.sId; |
| 1152 | 1186 | tableDataRow.key = tableDataRow.sId; |
| ... | ... | @@ -1156,15 +1190,20 @@ class CommonNewBill extends Component { |
| 1156 | 1190 | tableDataRow.iOrder = iCount; |
| 1157 | 1191 | } |
| 1158 | 1192 | for (const child of Object.keys(tableDataRow)) { |
| 1159 | - const index = child.indexOf('_sRealValue_'); | |
| 1193 | + const index = child.indexOf("_sRealValue_"); | |
| 1160 | 1194 | if (index > -1) { |
| 1161 | 1195 | const property = child.substring(0, child.length - 12); |
| 1162 | 1196 | tableDataRow[property] = tableDataRow[child]; |
| 1163 | 1197 | } |
| 1164 | 1198 | } |
| 1165 | 1199 | if (productIdDropDown !== undefined) { |
| 1166 | - const iProductIdIndex = productIdDropDown.findIndex(item => (item.sId === tableDataRow.sProductId || item.sNId === tableDataRow.sProductId) && item.sProductStyle === tableDataRow.sProductStyle); | |
| 1167 | - if (iProductIdIndex === -1 && commonUtils.isNotEmptyObject(sModelsType) && sModelsType.includes('sales/salesOrder')) { /* 只有销售模块生成新产品 盘点 ,期间 不生成新的产品 */ | |
| 1200 | + const iProductIdIndex = productIdDropDown.findIndex( | |
| 1201 | + item => | |
| 1202 | + (item.sId === tableDataRow.sProductId || item.sNId === tableDataRow.sProductId) && | |
| 1203 | + item.sProductStyle === tableDataRow.sProductStyle | |
| 1204 | + ); | |
| 1205 | + if (iProductIdIndex === -1 && commonUtils.isNotEmptyObject(sModelsType) && sModelsType.includes("sales/salesOrder")) { | |
| 1206 | + /* 只有销售模块生成新产品 盘点 ,期间 不生成新的产品 */ | |
| 1168 | 1207 | tableDataRow.sProductId = tableDataRow.sProductName; |
| 1169 | 1208 | tableDataRow.sProductInfo = JSON.stringify({ |
| 1170 | 1209 | sProductId: tableDataRow.sProductName, |
| ... | ... | @@ -1202,16 +1241,16 @@ class CommonNewBill extends Component { |
| 1202 | 1241 | const importErrorData = errorInfo; |
| 1203 | 1242 | this.props.onSaveState({ |
| 1204 | 1243 | showImportErrorVisible: true, |
| 1205 | - importData: importErrorData | |
| 1244 | + importData: importErrorData, | |
| 1206 | 1245 | }); |
| 1207 | 1246 | return; |
| 1208 | 1247 | } |
| 1209 | 1248 | /* 把之前存放的数据删除 */ |
| 1210 | 1249 | const slaveDelData = []; |
| 1211 | 1250 | if (commonUtils.isNotEmptyArr(slaveData)) { |
| 1212 | - slaveData.forEach((item) => { | |
| 1251 | + slaveData.forEach(item => { | |
| 1213 | 1252 | if (commonUtils.isEmptyObject(item.handleType)) { |
| 1214 | - item.handleType = 'del'; | |
| 1253 | + item.handleType = "del"; | |
| 1215 | 1254 | slaveDelData.push(item); |
| 1216 | 1255 | } |
| 1217 | 1256 | }); |
| ... | ... | @@ -1219,15 +1258,16 @@ class CommonNewBill extends Component { |
| 1219 | 1258 | const returnData = file.response.dataset.rows[0].canbeInsert; |
| 1220 | 1259 | let iCount = 0; |
| 1221 | 1260 | let productIdDropDown; |
| 1222 | - if (productIdDropDown === undefined && commonUtils.isNotEmptyArr(returnData)) { /* 无论导入多少条数据 都只调用1次接口,获取产品下拉数据集 */ | |
| 1223 | - const iIndex = slaveConfig.gdsconfigformslave.findIndex(item => item.sName === 'sProductName'); | |
| 1261 | + if (productIdDropDown === undefined && commonUtils.isNotEmptyArr(returnData)) { | |
| 1262 | + /* 无论导入多少条数据 都只调用1次接口,获取产品下拉数据集 */ | |
| 1263 | + const iIndex = slaveConfig.gdsconfigformslave.findIndex(item => item.sName === "sProductName"); | |
| 1224 | 1264 | if (iIndex > -1) { |
| 1225 | - const sqlDropDownData = await this.props.getSqlDropDownData(sModelsId, 'slave', slaveConfig.gdsconfigformslave[iIndex], returnData[0]); | |
| 1265 | + const sqlDropDownData = await this.props.getSqlDropDownData(sModelsId, "slave", slaveConfig.gdsconfigformslave[iIndex], returnData[0]); | |
| 1226 | 1266 | productIdDropDown = sqlDropDownData.dropDownData; |
| 1227 | 1267 | } |
| 1228 | 1268 | } |
| 1229 | - await returnData.forEach(async (tableDataRow) => { | |
| 1230 | - tableDataRow.handleType = 'add'; | |
| 1269 | + await returnData.forEach(async tableDataRow => { | |
| 1270 | + tableDataRow.handleType = "add"; | |
| 1231 | 1271 | tableDataRow.sId = commonUtils.createSid(); |
| 1232 | 1272 | tableDataRow.sParentId = masterData.sId; |
| 1233 | 1273 | tableDataRow.key = tableDataRow.sId; |
| ... | ... | @@ -1237,15 +1277,19 @@ class CommonNewBill extends Component { |
| 1237 | 1277 | tableDataRow.iOrder = iCount; |
| 1238 | 1278 | } |
| 1239 | 1279 | for (const child of Object.keys(tableDataRow)) { |
| 1240 | - const index = child.indexOf('_sRealValue_'); | |
| 1280 | + const index = child.indexOf("_sRealValue_"); | |
| 1241 | 1281 | if (index > -1) { |
| 1242 | 1282 | const property = child.substring(0, child.length - 12); |
| 1243 | 1283 | tableDataRow[property] = tableDataRow[child]; |
| 1244 | 1284 | } |
| 1245 | 1285 | } |
| 1246 | 1286 | if (productIdDropDown !== undefined) { |
| 1247 | - const iProductIdIndex = productIdDropDown.findIndex(item => (item.sId === tableDataRow.sProductId || item.sNId === tableDataRow.sProductId) && item.sProductStyle === tableDataRow.sProductStyle); | |
| 1248 | - if (iProductIdIndex === -1 && commonUtils.isNotEmptyObject(sModelsType) && sModelsType.includes('sales/salesOrder')) { /* 只有销售模块生成新产品 盘点 ,期间 不生成新的产品 */ | |
| 1287 | + const iProductIdIndex = productIdDropDown.findIndex( | |
| 1288 | + item => | |
| 1289 | + (item.sId === tableDataRow.sProductId || item.sNId === tableDataRow.sProductId) && item.sProductStyle === tableDataRow.sProductStyle | |
| 1290 | + ); | |
| 1291 | + if (iProductIdIndex === -1 && commonUtils.isNotEmptyObject(sModelsType) && sModelsType.includes("sales/salesOrder")) { | |
| 1292 | + /* 只有销售模块生成新产品 盘点 ,期间 不生成新的产品 */ | |
| 1249 | 1293 | tableDataRow.sProductId = tableDataRow.sProductName; |
| 1250 | 1294 | tableDataRow.sProductInfo = JSON.stringify({ |
| 1251 | 1295 | sProductId: tableDataRow.sProductName, |
| ... | ... | @@ -1262,33 +1306,44 @@ class CommonNewBill extends Component { |
| 1262 | 1306 | if (!tableDataRow.dNProductPrice) { |
| 1263 | 1307 | tableDataRow.dNProductPrice = tableDataRow.dProductForeignPrice; |
| 1264 | 1308 | } |
| 1265 | - const models = sModelsType.includes('sales/') || sModelsType.includes('manufacture/') || sModelsType.includes('quotation/') || sModelsType.includes('productStock/') ? 'Product' : 'Materials'; | |
| 1266 | - if (sModelsType.includes('purchase/') || sModelsType.includes('quotation/') || sModelsType.includes('manufacture/') || sModelsType.includes('materialsStock/') || sModelsType.includes('outside/')) { | |
| 1267 | - tableDataRow = await this.props.onMaterialsChange(tableDataRow, sModelsId, masterData, {}, 'dAuxiliaryQty', app, token, models); | |
| 1268 | - tableDataRow = commonBusiness.getCalculateAllMoney(app, models, 'dAuxiliaryQty', masterData, tableDataRow); | |
| 1309 | + const models = | |
| 1310 | + sModelsType.includes("sales/") || | |
| 1311 | + sModelsType.includes("manufacture/") || | |
| 1312 | + sModelsType.includes("quotation/") || | |
| 1313 | + sModelsType.includes("productStock/") | |
| 1314 | + ? "Product" | |
| 1315 | + : "Materials"; | |
| 1316 | + if ( | |
| 1317 | + sModelsType.includes("purchase/") || | |
| 1318 | + sModelsType.includes("quotation/") || | |
| 1319 | + sModelsType.includes("manufacture/") || | |
| 1320 | + sModelsType.includes("materialsStock/") || | |
| 1321 | + sModelsType.includes("outside/") | |
| 1322 | + ) { | |
| 1323 | + tableDataRow = await this.props.onMaterialsChange(tableDataRow, sModelsId, masterData, {}, "dAuxiliaryQty", app, token, models); | |
| 1324 | + tableDataRow = commonBusiness.getCalculateAllMoney(app, models, "dAuxiliaryQty", masterData, tableDataRow); | |
| 1269 | 1325 | } else { |
| 1270 | - tableDataRow = commonBusiness.getCalculateAllMoney(app, models, 'dProductQty', masterData, tableDataRow); | |
| 1326 | + tableDataRow = commonBusiness.getCalculateAllMoney(app, models, "dProductQty", masterData, tableDataRow); | |
| 1271 | 1327 | } |
| 1272 | 1328 | }); |
| 1273 | 1329 | this.props.onSaveState({ slaveData: returnData, slaveDelData }); |
| 1274 | 1330 | } |
| 1275 | - } else { /* 失败s */ | |
| 1331 | + } else { | |
| 1332 | + /* 失败s */ | |
| 1276 | 1333 | this.props.getServiceError(file.response); |
| 1277 | 1334 | } |
| 1278 | 1335 | } |
| 1279 | 1336 | }; |
| 1280 | 1337 | |
| 1281 | - handleSetTabNumList = (tabNumList) => { | |
| 1338 | + handleSetTabNumList = tabNumList => { | |
| 1282 | 1339 | this.tabNumList = tabNumList; |
| 1283 | - } | |
| 1340 | + }; | |
| 1284 | 1341 | |
| 1285 | 1342 | /** 通用下载 */ |
| 1286 | 1343 | handleDownload = (name, flag, tableSelectedRowKeys) => { |
| 1287 | - const { | |
| 1288 | - [`${name}Data`]: tableData, sModelsId, app, | |
| 1289 | - } = this.props; | |
| 1344 | + const { [`${name}Data`]: tableData, sModelsId, app } = this.props; | |
| 1290 | 1345 | if (tableSelectedRowKeys === undefined || tableSelectedRowKeys.length !== 1) { |
| 1291 | - message.warn(commonFunc.showMessage(app.commonConst, 'selectedRowKeysNo'));/* 请先选择一条数据 */ | |
| 1346 | + message.warn(commonFunc.showMessage(app.commonConst, "selectedRowKeysNo")); /* 请先选择一条数据 */ | |
| 1292 | 1347 | return; |
| 1293 | 1348 | } |
| 1294 | 1349 | const dataSelect = tableData.filter(item => item.sId === tableSelectedRowKeys[0]); |
| ... | ... | @@ -1297,35 +1352,36 @@ class CommonNewBill extends Component { |
| 1297 | 1352 | const urlPrint = `${commonConfig.file_host}file/download?sModelsId=${sModelsId}&token=${token}&savePathStr=${sPicturePath}`; |
| 1298 | 1353 | window.open(urlPrint); |
| 1299 | 1354 | }; |
| 1300 | - handleJSONModalOk = (value) => { | |
| 1355 | + handleJSONModalOk = value => { | |
| 1301 | 1356 | const { masterData } = this.props; |
| 1302 | 1357 | const textAreaValue = value; // 获取 textarea 的值 |
| 1303 | - const handleType= commonUtils.isEmpty(masterData.handleType) ? 'update' : masterData.handleType; | |
| 1304 | - const newMasterData = { ...masterData, sInstruct: textAreaValue , handleType}; // 更新 masterData.sInstruct | |
| 1358 | + const handleType = commonUtils.isEmpty(masterData.handleType) ? "update" : masterData.handleType; | |
| 1359 | + const newMasterData = { ...masterData, sInstruct: textAreaValue, handleType }; // 更新 masterData.sInstruct | |
| 1305 | 1360 | this.props.onSaveState({ masterData: newMasterData, visibleInstructField: false }); // 关闭弹窗 |
| 1306 | 1361 | }; |
| 1307 | 1362 | |
| 1308 | 1363 | // ----------------------------数据修改回带wend ---------------------------- // |
| 1309 | 1364 | |
| 1310 | 1365 | render() { |
| 1311 | - const { | |
| 1312 | - pageLoading, visible, checkConditions, checkPersonData, app, | |
| 1313 | - } = this.props; | |
| 1314 | - const checkCondition = commonFunc.showMessage(app.commonConst, 'checkCondition');/* 审核条件 */ | |
| 1315 | - const checkSmemo = commonFunc.showMessage(app.commonConst, 'checkSmemo');/* 备注 */ | |
| 1316 | - const columns = [{ | |
| 1317 | - title: checkCondition, | |
| 1318 | - dataIndex: 'condition', | |
| 1319 | - key: 'condition', | |
| 1320 | - }, { | |
| 1321 | - title: checkSmemo, | |
| 1322 | - dataIndex: 'sMemo', | |
| 1323 | - key: 'sMemo', | |
| 1324 | - }]; | |
| 1325 | - const btnSure = commonFunc.showMessage(app.commonConst, 'btnSure');/* 确认 */ | |
| 1326 | - const check = commonFunc.showMessage(app.commonConst, 'check');/* 审核 */ | |
| 1327 | - const BtnClose = commonFunc.showMessage(app.commonConst, 'BtnClose');/* 关闭 */ | |
| 1328 | - const checkPerson = commonFunc.showMessage(app.commonConst, 'checkPerson');/* 审核人 */ | |
| 1366 | + const { pageLoading, visible, checkConditions, checkPersonData, app } = this.props; | |
| 1367 | + const checkCondition = commonFunc.showMessage(app.commonConst, "checkCondition"); /* 审核条件 */ | |
| 1368 | + const checkSmemo = commonFunc.showMessage(app.commonConst, "checkSmemo"); /* 备注 */ | |
| 1369 | + const columns = [ | |
| 1370 | + { | |
| 1371 | + title: checkCondition, | |
| 1372 | + dataIndex: "condition", | |
| 1373 | + key: "condition", | |
| 1374 | + }, | |
| 1375 | + { | |
| 1376 | + title: checkSmemo, | |
| 1377 | + dataIndex: "sMemo", | |
| 1378 | + key: "sMemo", | |
| 1379 | + }, | |
| 1380 | + ]; | |
| 1381 | + const btnSure = commonFunc.showMessage(app.commonConst, "btnSure"); /* 确认 */ | |
| 1382 | + const check = commonFunc.showMessage(app.commonConst, "check"); /* 审核 */ | |
| 1383 | + const BtnClose = commonFunc.showMessage(app.commonConst, "BtnClose"); /* 关闭 */ | |
| 1384 | + const checkPerson = commonFunc.showMessage(app.commonConst, "checkPerson"); /* 审核人 */ | |
| 1329 | 1385 | return ( |
| 1330 | 1386 | <div> |
| 1331 | 1387 | <Spin spinning={pageLoading}> |
| ... | ... | @@ -1356,40 +1412,41 @@ class CommonNewBill extends Component { |
| 1356 | 1412 | onDelRow={this.handleTableDel} |
| 1357 | 1413 | onJsonModalOk={this.handleJSONModalOk} |
| 1358 | 1414 | /> |
| 1359 | - { | |
| 1360 | - visible ? | |
| 1361 | - <AntdDraggableModal | |
| 1362 | - title={check} | |
| 1363 | - visible={visible} | |
| 1364 | - onCancel={this.handleCancel} | |
| 1365 | - footer={[ | |
| 1366 | - <Button key="back" onClick={this.handleCancel}>{BtnClose}</Button>, | |
| 1367 | - <Button key="submit" type="primary" onClick={this.handleOk.bind(this, 1, 1, true)}> | |
| 1368 | - {btnSure} | |
| 1369 | - </Button>, | |
| 1370 | - ]} | |
| 1371 | - > | |
| 1372 | - <Table columns={columns} dataSource={checkConditions} bordered pagination={false} className={styles.checkTable} /> | |
| 1373 | - <div style={{ float: 'left', width: '15%' }}>{checkPerson}</div> | |
| 1374 | - <div style={{ float: 'left', width: '60%' }}> | |
| 1375 | - <Checkbox.Group style={{ width: '100%' }} onChange={this.onChange}> | |
| 1376 | - <Row> | |
| 1377 | - { commonUtils.isNotEmptyObject(checkPersonData) ? | |
| 1378 | - checkPersonData.map((item) => { | |
| 1415 | + {visible ? ( | |
| 1416 | + <AntdDraggableModal | |
| 1417 | + title={check} | |
| 1418 | + visible={visible} | |
| 1419 | + onCancel={this.handleCancel} | |
| 1420 | + footer={[ | |
| 1421 | + <Button key="back" onClick={this.handleCancel}> | |
| 1422 | + {BtnClose} | |
| 1423 | + </Button>, | |
| 1424 | + <Button key="submit" type="primary" onClick={this.handleOk.bind(this, 1, 1, true)}> | |
| 1425 | + {btnSure} | |
| 1426 | + </Button>, | |
| 1427 | + ]} | |
| 1428 | + > | |
| 1429 | + <Table columns={columns} dataSource={checkConditions} bordered pagination={false} className={styles.checkTable} /> | |
| 1430 | + <div style={{ float: "left", width: "15%" }}>{checkPerson}</div> | |
| 1431 | + <div style={{ float: "left", width: "60%" }}> | |
| 1432 | + <Checkbox.Group style={{ width: "100%" }} onChange={this.onChange}> | |
| 1433 | + <Row> | |
| 1434 | + {commonUtils.isNotEmptyObject(checkPersonData) | |
| 1435 | + ? checkPersonData.map(item => { | |
| 1379 | 1436 | return ( |
| 1380 | 1437 | <Col span={8}> |
| 1381 | 1438 | <Checkbox value={item.sUserId}>{item.sUserName}</Checkbox> |
| 1382 | 1439 | </Col> |
| 1383 | 1440 | ); |
| 1384 | 1441 | }) |
| 1385 | - : '' | |
| 1386 | - } | |
| 1387 | - </Row> | |
| 1388 | - </Checkbox.Group> | |
| 1389 | - </div> | |
| 1390 | - </AntdDraggableModal> | |
| 1391 | - : '' | |
| 1392 | - } | |
| 1442 | + : ""} | |
| 1443 | + </Row> | |
| 1444 | + </Checkbox.Group> | |
| 1445 | + </div> | |
| 1446 | + </AntdDraggableModal> | |
| 1447 | + ) : ( | |
| 1448 | + "" | |
| 1449 | + )} | |
| 1393 | 1450 | </div> |
| 1394 | 1451 | </Spin> |
| 1395 | 1452 | </div> |
| ... | ... | @@ -1399,11 +1456,11 @@ class CommonNewBill extends Component { |
| 1399 | 1456 | |
| 1400 | 1457 | const BillComponent = Form.create({ |
| 1401 | 1458 | mapPropsToFields(props) { |
| 1402 | - const { masterData, masterConfig} = props; | |
| 1459 | + const { masterData, masterConfig } = props; | |
| 1403 | 1460 | const obj = commonFunc.mapPropsToFields(masterData, Form, masterConfig); |
| 1404 | 1461 | return obj; |
| 1405 | 1462 | }, |
| 1406 | -})((props) => { | |
| 1463 | +})(props => { | |
| 1407 | 1464 | const { |
| 1408 | 1465 | form, |
| 1409 | 1466 | onReturnForm, |
| ... | ... | @@ -1478,7 +1535,7 @@ const BillComponent = Form.create({ |
| 1478 | 1535 | sModelsType, |
| 1479 | 1536 | sModelsId, |
| 1480 | 1537 | bDelegate, |
| 1481 | - sInstructJsonString = '' | |
| 1538 | + sInstructJsonString = "", | |
| 1482 | 1539 | } = props; |
| 1483 | 1540 | const masterConfig = props.onMergeMasterConfig(); |
| 1484 | 1541 | const masterConfigOld = { ...masterConfig }; |
| ... | ... | @@ -1493,7 +1550,7 @@ const BillComponent = Form.create({ |
| 1493 | 1550 | |
| 1494 | 1551 | const { currentPane } = app; |
| 1495 | 1552 | let bFlow = currentPane?.bFlow; /* 是否需要展示审批流程信息 */ |
| 1496 | - if(bDelegate) { | |
| 1553 | + if (bDelegate) { | |
| 1497 | 1554 | bFlow = false; |
| 1498 | 1555 | } |
| 1499 | 1556 | |
| ... | ... | @@ -1510,154 +1567,180 @@ const BillComponent = Form.create({ |
| 1510 | 1567 | const bPagination9 = commonUtils.isNotEmptyObject(slave9Config) ? slave9Config.bPagination : false; |
| 1511 | 1568 | const bPagination10 = commonUtils.isNotEmptyObject(slave10Config) ? slave10Config.bPagination : false; |
| 1512 | 1569 | |
| 1513 | - const pagination = !bPagination ? false : { | |
| 1514 | - pageSize, | |
| 1515 | - total: commonUtils.isEmptyArr(slaveData) ? 0 : slaveData.length, | |
| 1516 | - current: commonUtils.isEmptyObject(slavePagination) ? 1 : slavePagination.current, | |
| 1517 | - ...slavePagination, | |
| 1518 | - // showQuickJumper: true, | |
| 1519 | - hideOnSinglePage: false, | |
| 1520 | - size: isSmall ? 'small' : 'large', | |
| 1521 | - pageSizeOptions: commonConfig.pageSizeOptions, | |
| 1522 | - showSizeChanger: !isSmall, | |
| 1523 | - showQuickJumper: !isSmall, | |
| 1524 | - }; | |
| 1525 | - const pagination0 = !bPagination0 ? false : { | |
| 1526 | - pageSize: commonUtils.isNotEmptyNumber(slave0PageSize) && slave0PageSize !== 0 ? slave0PageSize : commonConfig.pageSize, | |
| 1527 | - total: commonUtils.isEmptyArr(slave0Data) ? 0 : slave0Data.length, | |
| 1528 | - current: commonUtils.isEmptyObject(slave0Pagination) ? 1 : slave0Pagination.current, | |
| 1529 | - ...slave0Pagination, | |
| 1530 | - // showQuickJumper: true, | |
| 1531 | - hideOnSinglePage: false, | |
| 1532 | - size: isSmall ? 'small' : 'large', | |
| 1533 | - pageSizeOptions: commonConfig.pageSizeOptions, | |
| 1534 | - showSizeChanger: !isSmall, | |
| 1535 | - showQuickJumper: !isSmall, | |
| 1536 | - }; | |
| 1537 | - const pagination1 = !bPagination1 ? false : { | |
| 1538 | - pageSize: commonUtils.isNotEmptyNumber(slave1PageSize) && slave1PageSize !== 0 ? slave1PageSize : commonConfig.pageSize, | |
| 1539 | - total: commonUtils.isEmptyArr(slave1Data) ? 0 : slave1Data.length, | |
| 1540 | - current: commonUtils.isEmptyObject(slave1Pagination) ? 1 : slave1Pagination.current, | |
| 1541 | - ...slave1Pagination, | |
| 1542 | - // showQuickJumper: true, | |
| 1543 | - hideOnSinglePage: true, | |
| 1544 | - size: isSmall ? 'small' : 'large', | |
| 1545 | - pageSizeOptions: commonConfig.pageSizeOptions, | |
| 1546 | - showSizeChanger: !isSmall, | |
| 1547 | - showQuickJumper: !isSmall, | |
| 1548 | - }; | |
| 1549 | - const pagination2 = !bPagination2 ? false : { | |
| 1550 | - pageSize: commonUtils.isNotEmptyNumber(slave2PageSize) && slave2PageSize !== 0 ? slave2PageSize : commonConfig.pageSize, | |
| 1551 | - total: commonUtils.isEmptyArr(slave2Data) ? 0 : slave2Data.length, | |
| 1552 | - current: commonUtils.isEmptyObject(slave2Pagination) ? 1 : slave2Pagination.current, | |
| 1553 | - ...slave2Pagination, | |
| 1554 | - // showQuickJumper: true, | |
| 1555 | - hideOnSinglePage: true, | |
| 1556 | - size: isSmall ? 'small' : 'large', | |
| 1557 | - pageSizeOptions: commonConfig.pageSizeOptions, | |
| 1558 | - showSizeChanger: !isSmall, | |
| 1559 | - showQuickJumper: !isSmall, | |
| 1560 | - }; | |
| 1561 | - const pagination3 = !bPagination3 ? false : { | |
| 1562 | - pageSize: commonUtils.isNotEmptyNumber(slave3PageSize) && slave3PageSize !== 0 ? slave3PageSize : commonConfig.pageSize, | |
| 1563 | - total: commonUtils.isEmptyArr(slave3Data) ? 0 : slave3Data.length, | |
| 1564 | - current: commonUtils.isEmptyObject(slave3Pagination) ? 1 : slave3Pagination.current, | |
| 1565 | - ...slave3Pagination, | |
| 1566 | - // showQuickJumper: true, | |
| 1567 | - hideOnSinglePage: true, | |
| 1568 | - size: isSmall ? 'small' : 'large', | |
| 1569 | - pageSizeOptions: commonConfig.pageSizeOptions, | |
| 1570 | - showSizeChanger: !isSmall, | |
| 1571 | - showQuickJumper: !isSmall, | |
| 1572 | - }; | |
| 1573 | - const pagination4 = !bPagination4 ? false : { | |
| 1574 | - pageSize: commonUtils.isNotEmptyNumber(slave4PageSize) && slave4PageSize !== 0 ? slave4PageSize : commonConfig.pageSize, | |
| 1575 | - total: commonUtils.isEmptyArr(slave4Data) ? 0 : slave4Data.length, | |
| 1576 | - current: commonUtils.isEmptyObject(slave4Pagination) ? 1 : slave4Pagination.current, | |
| 1577 | - ...slave4Pagination, | |
| 1578 | - // showQuickJumper: true, | |
| 1579 | - hideOnSinglePage: true, | |
| 1580 | - size: isSmall ? 'small' : 'large', | |
| 1581 | - pageSizeOptions: commonConfig.pageSizeOptions, | |
| 1582 | - showSizeChanger: !isSmall, | |
| 1583 | - showQuickJumper: !isSmall, | |
| 1584 | - }; | |
| 1570 | + const pagination = !bPagination | |
| 1571 | + ? false | |
| 1572 | + : { | |
| 1573 | + pageSize, | |
| 1574 | + total: commonUtils.isEmptyArr(slaveData) ? 0 : slaveData.length, | |
| 1575 | + current: commonUtils.isEmptyObject(slavePagination) ? 1 : slavePagination.current, | |
| 1576 | + ...slavePagination, | |
| 1577 | + // showQuickJumper: true, | |
| 1578 | + hideOnSinglePage: false, | |
| 1579 | + size: isSmall ? "small" : "large", | |
| 1580 | + pageSizeOptions: commonConfig.pageSizeOptions, | |
| 1581 | + showSizeChanger: !isSmall, | |
| 1582 | + showQuickJumper: !isSmall, | |
| 1583 | + }; | |
| 1584 | + const pagination0 = !bPagination0 | |
| 1585 | + ? false | |
| 1586 | + : { | |
| 1587 | + pageSize: commonUtils.isNotEmptyNumber(slave0PageSize) && slave0PageSize !== 0 ? slave0PageSize : commonConfig.pageSize, | |
| 1588 | + total: commonUtils.isEmptyArr(slave0Data) ? 0 : slave0Data.length, | |
| 1589 | + current: commonUtils.isEmptyObject(slave0Pagination) ? 1 : slave0Pagination.current, | |
| 1590 | + ...slave0Pagination, | |
| 1591 | + // showQuickJumper: true, | |
| 1592 | + hideOnSinglePage: false, | |
| 1593 | + size: isSmall ? "small" : "large", | |
| 1594 | + pageSizeOptions: commonConfig.pageSizeOptions, | |
| 1595 | + showSizeChanger: !isSmall, | |
| 1596 | + showQuickJumper: !isSmall, | |
| 1597 | + }; | |
| 1598 | + const pagination1 = !bPagination1 | |
| 1599 | + ? false | |
| 1600 | + : { | |
| 1601 | + pageSize: commonUtils.isNotEmptyNumber(slave1PageSize) && slave1PageSize !== 0 ? slave1PageSize : commonConfig.pageSize, | |
| 1602 | + total: commonUtils.isEmptyArr(slave1Data) ? 0 : slave1Data.length, | |
| 1603 | + current: commonUtils.isEmptyObject(slave1Pagination) ? 1 : slave1Pagination.current, | |
| 1604 | + ...slave1Pagination, | |
| 1605 | + // showQuickJumper: true, | |
| 1606 | + hideOnSinglePage: true, | |
| 1607 | + size: isSmall ? "small" : "large", | |
| 1608 | + pageSizeOptions: commonConfig.pageSizeOptions, | |
| 1609 | + showSizeChanger: !isSmall, | |
| 1610 | + showQuickJumper: !isSmall, | |
| 1611 | + }; | |
| 1612 | + const pagination2 = !bPagination2 | |
| 1613 | + ? false | |
| 1614 | + : { | |
| 1615 | + pageSize: commonUtils.isNotEmptyNumber(slave2PageSize) && slave2PageSize !== 0 ? slave2PageSize : commonConfig.pageSize, | |
| 1616 | + total: commonUtils.isEmptyArr(slave2Data) ? 0 : slave2Data.length, | |
| 1617 | + current: commonUtils.isEmptyObject(slave2Pagination) ? 1 : slave2Pagination.current, | |
| 1618 | + ...slave2Pagination, | |
| 1619 | + // showQuickJumper: true, | |
| 1620 | + hideOnSinglePage: true, | |
| 1621 | + size: isSmall ? "small" : "large", | |
| 1622 | + pageSizeOptions: commonConfig.pageSizeOptions, | |
| 1623 | + showSizeChanger: !isSmall, | |
| 1624 | + showQuickJumper: !isSmall, | |
| 1625 | + }; | |
| 1626 | + const pagination3 = !bPagination3 | |
| 1627 | + ? false | |
| 1628 | + : { | |
| 1629 | + pageSize: commonUtils.isNotEmptyNumber(slave3PageSize) && slave3PageSize !== 0 ? slave3PageSize : commonConfig.pageSize, | |
| 1630 | + total: commonUtils.isEmptyArr(slave3Data) ? 0 : slave3Data.length, | |
| 1631 | + current: commonUtils.isEmptyObject(slave3Pagination) ? 1 : slave3Pagination.current, | |
| 1632 | + ...slave3Pagination, | |
| 1633 | + // showQuickJumper: true, | |
| 1634 | + hideOnSinglePage: true, | |
| 1635 | + size: isSmall ? "small" : "large", | |
| 1636 | + pageSizeOptions: commonConfig.pageSizeOptions, | |
| 1637 | + showSizeChanger: !isSmall, | |
| 1638 | + showQuickJumper: !isSmall, | |
| 1639 | + }; | |
| 1640 | + const pagination4 = !bPagination4 | |
| 1641 | + ? false | |
| 1642 | + : { | |
| 1643 | + pageSize: commonUtils.isNotEmptyNumber(slave4PageSize) && slave4PageSize !== 0 ? slave4PageSize : commonConfig.pageSize, | |
| 1644 | + total: commonUtils.isEmptyArr(slave4Data) ? 0 : slave4Data.length, | |
| 1645 | + current: commonUtils.isEmptyObject(slave4Pagination) ? 1 : slave4Pagination.current, | |
| 1646 | + ...slave4Pagination, | |
| 1647 | + // showQuickJumper: true, | |
| 1648 | + hideOnSinglePage: true, | |
| 1649 | + size: isSmall ? "small" : "large", | |
| 1650 | + pageSizeOptions: commonConfig.pageSizeOptions, | |
| 1651 | + showSizeChanger: !isSmall, | |
| 1652 | + showQuickJumper: !isSmall, | |
| 1653 | + }; | |
| 1585 | 1654 | |
| 1586 | - const pagination5 = !bPagination5 ? false : { | |
| 1587 | - pageSize: commonUtils.isNotEmptyNumber(slave5PageSize) && slave5PageSize !== 0 ? slave5PageSize : commonConfig.pageSize, | |
| 1588 | - total: commonUtils.isEmptyArr(slave5Data) ? 0 : slave5Data.length, | |
| 1589 | - current: commonUtils.isEmptyObject(slave5Pagination) ? 1 : slave5Pagination.current, | |
| 1590 | - ...slave5Pagination, | |
| 1591 | - // showQuickJumper: true, | |
| 1592 | - hideOnSinglePage: true, | |
| 1593 | - size: isSmall ? 'small' : 'large', | |
| 1594 | - pageSizeOptions: commonConfig.pageSizeOptions, | |
| 1595 | - showSizeChanger: !isSmall, | |
| 1596 | - showQuickJumper: !isSmall, | |
| 1597 | - }; | |
| 1598 | - const pagination6 = !bPagination6 ? false : { | |
| 1599 | - pageSize: commonUtils.isNotEmptyNumber(slave6PageSize) && slave6PageSize !== 0 ? slave6PageSize : commonConfig.pageSize, | |
| 1600 | - total: commonUtils.isEmptyArr(slave6Data) ? 0 : slave6Data.length, | |
| 1601 | - current: commonUtils.isEmptyObject(slave6Pagination) ? 1 : slave6Pagination.current, | |
| 1602 | - ...slave6Pagination, | |
| 1603 | - // showQuickJumper: true, | |
| 1604 | - hideOnSinglePage: true, | |
| 1605 | - size: isSmall ? 'small' : 'large', | |
| 1606 | - pageSizeOptions: commonConfig.pageSizeOptions, | |
| 1607 | - showSizeChanger: !isSmall, | |
| 1608 | - showQuickJumper: !isSmall, | |
| 1609 | - }; | |
| 1610 | - const pagination7 = !bPagination7 ? false : { | |
| 1611 | - pageSize: commonUtils.isNotEmptyNumber(slave7PageSize) && slave7PageSize !== 0 ? slave7PageSize : commonConfig.pageSize, | |
| 1612 | - total: commonUtils.isEmptyArr(slave7Data) ? 0 : slave7Data.length, | |
| 1613 | - current: commonUtils.isEmptyObject(slave7Pagination) ? 1 : slave7Pagination.current, | |
| 1614 | - ...slave7Pagination, | |
| 1615 | - // showQuickJumper: true, | |
| 1616 | - hideOnSinglePage: true, | |
| 1617 | - size: isSmall ? 'small' : 'large', | |
| 1618 | - pageSizeOptions: commonConfig.pageSizeOptions, | |
| 1619 | - showSizeChanger: !isSmall, | |
| 1620 | - showQuickJumper: !isSmall, | |
| 1621 | - }; | |
| 1622 | - const pagination8 = !bPagination8 ? false : { | |
| 1623 | - pageSize: commonUtils.isNotEmptyNumber(slave8PageSize) && slave8PageSize !== 0 ? slave8PageSize : commonConfig.pageSize, | |
| 1624 | - total: commonUtils.isEmptyArr(slave8Data) ? 0 : slave8Data.length, | |
| 1625 | - current: commonUtils.isEmptyObject(slave8Pagination) ? 1 : slave8Pagination.current, | |
| 1626 | - ...slave8Pagination, | |
| 1627 | - // showQuickJumper: true, | |
| 1628 | - hideOnSinglePage: true, | |
| 1629 | - size: isSmall ? 'small' : 'large', | |
| 1630 | - pageSizeOptions: commonConfig.pageSizeOptions, | |
| 1631 | - showSizeChanger: !isSmall, | |
| 1632 | - showQuickJumper: !isSmall, | |
| 1633 | - }; | |
| 1634 | - const pagination9 = !bPagination9 ? false : { | |
| 1635 | - pageSize: commonUtils.isNotEmptyNumber(slave9PageSize) && slave9PageSize !== 0 ? slave9PageSize : commonConfig.pageSize, | |
| 1636 | - total: commonUtils.isEmptyArr(slave9Data) ? 0 : slave9Data.length, | |
| 1637 | - current: commonUtils.isEmptyObject(slave9Pagination) ? 1 : slave9Pagination.current, | |
| 1638 | - ...slave9Pagination, | |
| 1639 | - // showQuickJumper: true, | |
| 1640 | - hideOnSinglePage: true, | |
| 1641 | - size: isSmall ? 'small' : 'large', | |
| 1642 | - pageSizeOptions: commonConfig.pageSizeOptions, | |
| 1643 | - showSizeChanger: !isSmall, | |
| 1644 | - showQuickJumper: !isSmall, | |
| 1645 | - }; | |
| 1646 | - const pagination10 = !bPagination10 ? false : { | |
| 1647 | - pageSize: commonUtils.isNotEmptyNumber(slave10PageSize) && slave10PageSize !== 0 ? slave10PageSize : commonConfig.pageSize, | |
| 1648 | - total: commonUtils.isEmptyArr(slave10Data) ? 0 : slave10Data.length, | |
| 1649 | - current: commonUtils.isEmptyObject(slave10Pagination) ? 1 : slave10Pagination.current, | |
| 1650 | - ...slave10Pagination, | |
| 1651 | - // showQuickJumper: true, | |
| 1652 | - hideOnSinglePage: true, | |
| 1653 | - size: isSmall ? 'small' : 'large', | |
| 1654 | - pageSizeOptions: commonConfig.pageSizeOptions, | |
| 1655 | - showSizeChanger: !isSmall, | |
| 1656 | - showQuickJumper: !isSmall, | |
| 1657 | - }; | |
| 1655 | + const pagination5 = !bPagination5 | |
| 1656 | + ? false | |
| 1657 | + : { | |
| 1658 | + pageSize: commonUtils.isNotEmptyNumber(slave5PageSize) && slave5PageSize !== 0 ? slave5PageSize : commonConfig.pageSize, | |
| 1659 | + total: commonUtils.isEmptyArr(slave5Data) ? 0 : slave5Data.length, | |
| 1660 | + current: commonUtils.isEmptyObject(slave5Pagination) ? 1 : slave5Pagination.current, | |
| 1661 | + ...slave5Pagination, | |
| 1662 | + // showQuickJumper: true, | |
| 1663 | + hideOnSinglePage: true, | |
| 1664 | + size: isSmall ? "small" : "large", | |
| 1665 | + pageSizeOptions: commonConfig.pageSizeOptions, | |
| 1666 | + showSizeChanger: !isSmall, | |
| 1667 | + showQuickJumper: !isSmall, | |
| 1668 | + }; | |
| 1669 | + const pagination6 = !bPagination6 | |
| 1670 | + ? false | |
| 1671 | + : { | |
| 1672 | + pageSize: commonUtils.isNotEmptyNumber(slave6PageSize) && slave6PageSize !== 0 ? slave6PageSize : commonConfig.pageSize, | |
| 1673 | + total: commonUtils.isEmptyArr(slave6Data) ? 0 : slave6Data.length, | |
| 1674 | + current: commonUtils.isEmptyObject(slave6Pagination) ? 1 : slave6Pagination.current, | |
| 1675 | + ...slave6Pagination, | |
| 1676 | + // showQuickJumper: true, | |
| 1677 | + hideOnSinglePage: true, | |
| 1678 | + size: isSmall ? "small" : "large", | |
| 1679 | + pageSizeOptions: commonConfig.pageSizeOptions, | |
| 1680 | + showSizeChanger: !isSmall, | |
| 1681 | + showQuickJumper: !isSmall, | |
| 1682 | + }; | |
| 1683 | + const pagination7 = !bPagination7 | |
| 1684 | + ? false | |
| 1685 | + : { | |
| 1686 | + pageSize: commonUtils.isNotEmptyNumber(slave7PageSize) && slave7PageSize !== 0 ? slave7PageSize : commonConfig.pageSize, | |
| 1687 | + total: commonUtils.isEmptyArr(slave7Data) ? 0 : slave7Data.length, | |
| 1688 | + current: commonUtils.isEmptyObject(slave7Pagination) ? 1 : slave7Pagination.current, | |
| 1689 | + ...slave7Pagination, | |
| 1690 | + // showQuickJumper: true, | |
| 1691 | + hideOnSinglePage: true, | |
| 1692 | + size: isSmall ? "small" : "large", | |
| 1693 | + pageSizeOptions: commonConfig.pageSizeOptions, | |
| 1694 | + showSizeChanger: !isSmall, | |
| 1695 | + showQuickJumper: !isSmall, | |
| 1696 | + }; | |
| 1697 | + const pagination8 = !bPagination8 | |
| 1698 | + ? false | |
| 1699 | + : { | |
| 1700 | + pageSize: commonUtils.isNotEmptyNumber(slave8PageSize) && slave8PageSize !== 0 ? slave8PageSize : commonConfig.pageSize, | |
| 1701 | + total: commonUtils.isEmptyArr(slave8Data) ? 0 : slave8Data.length, | |
| 1702 | + current: commonUtils.isEmptyObject(slave8Pagination) ? 1 : slave8Pagination.current, | |
| 1703 | + ...slave8Pagination, | |
| 1704 | + // showQuickJumper: true, | |
| 1705 | + hideOnSinglePage: true, | |
| 1706 | + size: isSmall ? "small" : "large", | |
| 1707 | + pageSizeOptions: commonConfig.pageSizeOptions, | |
| 1708 | + showSizeChanger: !isSmall, | |
| 1709 | + showQuickJumper: !isSmall, | |
| 1710 | + }; | |
| 1711 | + const pagination9 = !bPagination9 | |
| 1712 | + ? false | |
| 1713 | + : { | |
| 1714 | + pageSize: commonUtils.isNotEmptyNumber(slave9PageSize) && slave9PageSize !== 0 ? slave9PageSize : commonConfig.pageSize, | |
| 1715 | + total: commonUtils.isEmptyArr(slave9Data) ? 0 : slave9Data.length, | |
| 1716 | + current: commonUtils.isEmptyObject(slave9Pagination) ? 1 : slave9Pagination.current, | |
| 1717 | + ...slave9Pagination, | |
| 1718 | + // showQuickJumper: true, | |
| 1719 | + hideOnSinglePage: true, | |
| 1720 | + size: isSmall ? "small" : "large", | |
| 1721 | + pageSizeOptions: commonConfig.pageSizeOptions, | |
| 1722 | + showSizeChanger: !isSmall, | |
| 1723 | + showQuickJumper: !isSmall, | |
| 1724 | + }; | |
| 1725 | + const pagination10 = !bPagination10 | |
| 1726 | + ? false | |
| 1727 | + : { | |
| 1728 | + pageSize: commonUtils.isNotEmptyNumber(slave10PageSize) && slave10PageSize !== 0 ? slave10PageSize : commonConfig.pageSize, | |
| 1729 | + total: commonUtils.isEmptyArr(slave10Data) ? 0 : slave10Data.length, | |
| 1730 | + current: commonUtils.isEmptyObject(slave10Pagination) ? 1 : slave10Pagination.current, | |
| 1731 | + ...slave10Pagination, | |
| 1732 | + // showQuickJumper: true, | |
| 1733 | + hideOnSinglePage: true, | |
| 1734 | + size: isSmall ? "small" : "large", | |
| 1735 | + pageSizeOptions: commonConfig.pageSizeOptions, | |
| 1736 | + showSizeChanger: !isSmall, | |
| 1737 | + showQuickJumper: !isSmall, | |
| 1738 | + }; | |
| 1658 | 1739 | |
| 1659 | 1740 | /* 表1-commonView显示区域 */ |
| 1660 | - const ableConfigs = commonUtils.isNotEmptyObject(slaveConfig) ? slaveConfig.gdsconfigformslave.filter(item => item.sName !== '' && item.bControl && item.sControlName.indexOf('Btn') === -1) : []; | |
| 1741 | + const ableConfigs = commonUtils.isNotEmptyObject(slaveConfig) | |
| 1742 | + ? slaveConfig.gdsconfigformslave.filter(item => item.sName !== "" && item.bControl && item.sControlName.indexOf("Btn") === -1) | |
| 1743 | + : []; | |
| 1661 | 1744 | /* 选中行 */ |
| 1662 | 1745 | let showAll = true; /* 只显示表格 */ |
| 1663 | 1746 | let bShowLeft = true; /* 表格显示在左侧 */ |
| ... | ... | @@ -1675,13 +1758,13 @@ const BillComponent = Form.create({ |
| 1675 | 1758 | slaveRow = slaveData[0]; |
| 1676 | 1759 | } |
| 1677 | 1760 | if (commonUtils.isNotEmptyObject(slaveConfig) && commonUtils.isNotEmptyArr(slaveConfig.gdsconfigformslave)) { |
| 1678 | - const iIndexArea = slaveConfig.gdsconfigformslave.findIndex(item => item.sControlName !== '' && item.sControlName.includes('bShow')); | |
| 1761 | + const iIndexArea = slaveConfig.gdsconfigformslave.findIndex(item => item.sControlName !== "" && item.sControlName.includes("bShow")); | |
| 1679 | 1762 | if (iIndexArea > -1) { |
| 1680 | 1763 | showAll = false; |
| 1681 | 1764 | } |
| 1682 | 1765 | if (commonUtils.isNotEmptyObject(slaveConfig) && commonUtils.isNotEmptyArr(slaveConfig.gdsconfigformslave)) { |
| 1683 | - const iShowLeft = slaveConfig.gdsconfigformslave.findIndex(item => item.sControlName === 'bShowLeft' && item.bVisible); | |
| 1684 | - const iShowRight = slaveConfig.gdsconfigformslave.findIndex(item => item.sControlName === 'bShowRight' && item.bVisible); | |
| 1766 | + const iShowLeft = slaveConfig.gdsconfigformslave.findIndex(item => item.sControlName === "bShowLeft" && item.bVisible); | |
| 1767 | + const iShowRight = slaveConfig.gdsconfigformslave.findIndex(item => item.sControlName === "bShowRight" && item.bVisible); | |
| 1685 | 1768 | if (iShowLeft > -1) { |
| 1686 | 1769 | bShowLeft = true; |
| 1687 | 1770 | iColValueTable = slaveConfig.gdsconfigformslave[iShowLeft].iColValue; |
| ... | ... | @@ -1694,9 +1777,10 @@ const BillComponent = Form.create({ |
| 1694 | 1777 | iColValueView = commonUtils.isNotEmptyNumber(iColValueTable) ? 24 - iColValueTable : 12; |
| 1695 | 1778 | const iShowOrder = bShowLeft ? 1 : 100; |
| 1696 | 1779 | |
| 1697 | - | |
| 1698 | 1780 | /* 表2-commonView显示区域 */ |
| 1699 | - const ableConfigs0 = commonUtils.isNotEmptyObject(slave0Config) ? slave0Config.gdsconfigformslave.filter(item => item.sName !== '' && item.bControl && item.sControlName.indexOf('Btn') === -1) : []; | |
| 1781 | + const ableConfigs0 = commonUtils.isNotEmptyObject(slave0Config) | |
| 1782 | + ? slave0Config.gdsconfigformslave.filter(item => item.sName !== "" && item.bControl && item.sControlName.indexOf("Btn") === -1) | |
| 1783 | + : []; | |
| 1700 | 1784 | let showAll0 = true; /* 只显示表格 */ |
| 1701 | 1785 | let bShowLeft0 = true; /* 表格显示在左侧 */ |
| 1702 | 1786 | let iColValueView0 = 12; |
| ... | ... | @@ -1713,13 +1797,13 @@ const BillComponent = Form.create({ |
| 1713 | 1797 | slave0Row = slave0Data[0]; |
| 1714 | 1798 | } |
| 1715 | 1799 | if (commonUtils.isNotEmptyObject(slave0Config) && commonUtils.isNotEmptyArr(slave0Config.gdsconfigformslave)) { |
| 1716 | - const iIndexArea = slave0Config.gdsconfigformslave.findIndex(item => item.sControlName !== '' && item.sControlName.includes('bShow')); | |
| 1800 | + const iIndexArea = slave0Config.gdsconfigformslave.findIndex(item => item.sControlName !== "" && item.sControlName.includes("bShow")); | |
| 1717 | 1801 | if (iIndexArea > -1) { |
| 1718 | 1802 | showAll0 = false; |
| 1719 | 1803 | } |
| 1720 | 1804 | if (commonUtils.isNotEmptyObject(slave0Config) && commonUtils.isNotEmptyArr(slave0Config.gdsconfigformslave)) { |
| 1721 | - const iShowLeft0 = slave0Config.gdsconfigformslave.findIndex(item => item.sControlName === 'bShowLeft' && item.bVisible); | |
| 1722 | - const iShowRight0 = slave0Config.gdsconfigformslave.findIndex(item => item.sControlName === 'bShowRight' && item.bVisible); | |
| 1805 | + const iShowLeft0 = slave0Config.gdsconfigformslave.findIndex(item => item.sControlName === "bShowLeft" && item.bVisible); | |
| 1806 | + const iShowRight0 = slave0Config.gdsconfigformslave.findIndex(item => item.sControlName === "bShowRight" && item.bVisible); | |
| 1723 | 1807 | if (iShowLeft0 > -1) { |
| 1724 | 1808 | bShowLeft0 = true; |
| 1725 | 1809 | iColValueTable0 = slave0Config.gdsconfigformslave[iShowLeft0].iColValue; |
| ... | ... | @@ -1732,9 +1816,10 @@ const BillComponent = Form.create({ |
| 1732 | 1816 | iColValueView0 = commonUtils.isNotEmptyNumber(iColValueTable0) ? 24 - iColValueTable0 : 12; |
| 1733 | 1817 | const iShowOrder0 = bShowLeft0 ? 1 : 100; |
| 1734 | 1818 | |
| 1735 | - | |
| 1736 | 1819 | /* 表3-commonView显示区域 */ |
| 1737 | - const ableConfigs1 = commonUtils.isNotEmptyObject(slave1Config) ? slave1Config.gdsconfigformslave.filter(item => item.sName !== '' && item.bControl && item.sControlName.indexOf('Btn') === -1) : []; | |
| 1820 | + const ableConfigs1 = commonUtils.isNotEmptyObject(slave1Config) | |
| 1821 | + ? slave1Config.gdsconfigformslave.filter(item => item.sName !== "" && item.bControl && item.sControlName.indexOf("Btn") === -1) | |
| 1822 | + : []; | |
| 1738 | 1823 | let showAll1 = true; /* 只显示表格 */ |
| 1739 | 1824 | let bShowLeft1 = true; /* 表格显示在左侧 */ |
| 1740 | 1825 | let iColValueView1 = 12; |
| ... | ... | @@ -1751,13 +1836,13 @@ const BillComponent = Form.create({ |
| 1751 | 1836 | slave1Row = slave1Data[0]; |
| 1752 | 1837 | } |
| 1753 | 1838 | if (commonUtils.isNotEmptyObject(slave1Config) && commonUtils.isNotEmptyArr(slave1Config.gdsconfigformslave)) { |
| 1754 | - const iIndexArea = slave1Config.gdsconfigformslave.findIndex(item => item.sControlName !== '' && item.sControlName.includes('bShow')); | |
| 1839 | + const iIndexArea = slave1Config.gdsconfigformslave.findIndex(item => item.sControlName !== "" && item.sControlName.includes("bShow")); | |
| 1755 | 1840 | if (iIndexArea > -1) { |
| 1756 | 1841 | showAll1 = false; |
| 1757 | 1842 | } |
| 1758 | 1843 | if (commonUtils.isNotEmptyObject(slave1Config) && commonUtils.isNotEmptyArr(slave1Config.gdsconfigformslave)) { |
| 1759 | - const iShowLeft1 = slave1Config.gdsconfigformslave.findIndex(item => item.sControlName === 'bShowLeft' && item.bVisible); | |
| 1760 | - const iShowRight1 = slave1Config.gdsconfigformslave.findIndex(item => item.sControlName === 'bShowRight' && item.bVisible); | |
| 1844 | + const iShowLeft1 = slave1Config.gdsconfigformslave.findIndex(item => item.sControlName === "bShowLeft" && item.bVisible); | |
| 1845 | + const iShowRight1 = slave1Config.gdsconfigformslave.findIndex(item => item.sControlName === "bShowRight" && item.bVisible); | |
| 1761 | 1846 | if (iShowLeft1 > -1) { |
| 1762 | 1847 | bShowLeft1 = true; |
| 1763 | 1848 | iColValueTable1 = slave1Config.gdsconfigformslave[iShowLeft1].iColValue; |
| ... | ... | @@ -1770,9 +1855,10 @@ const BillComponent = Form.create({ |
| 1770 | 1855 | iColValueView1 = commonUtils.isNotEmptyNumber(iColValueTable1) ? 24 - iColValueTable1 : 12; |
| 1771 | 1856 | const iShowOrder1 = bShowLeft1 ? 1 : 100; |
| 1772 | 1857 | |
| 1773 | - | |
| 1774 | 1858 | /* 表4-commonView显示区域 */ |
| 1775 | - const ableConfigs2 = commonUtils.isNotEmptyObject(slave2Config) ? slave2Config.gdsconfigformslave.filter(item => item.sName !== '' && item.bControl && item.sControlName.indexOf('Btn') === -1) : []; | |
| 1859 | + const ableConfigs2 = commonUtils.isNotEmptyObject(slave2Config) | |
| 1860 | + ? slave2Config.gdsconfigformslave.filter(item => item.sName !== "" && item.bControl && item.sControlName.indexOf("Btn") === -1) | |
| 1861 | + : []; | |
| 1776 | 1862 | let showAll2 = true; /* 只显示表格 */ |
| 1777 | 1863 | let bShowLeft2 = true; /* 表格显示在左侧 */ |
| 1778 | 1864 | let iColValueView2 = 12; |
| ... | ... | @@ -1789,13 +1875,13 @@ const BillComponent = Form.create({ |
| 1789 | 1875 | slave2Row = slave2Data[0]; |
| 1790 | 1876 | } |
| 1791 | 1877 | if (commonUtils.isNotEmptyObject(slave2Config) && commonUtils.isNotEmptyArr(slave2Config.gdsconfigformslave)) { |
| 1792 | - const iIndexArea = slave2Config.gdsconfigformslave.findIndex(item => item.sControlName !== '' && item.sControlName.includes('bShow')); | |
| 1878 | + const iIndexArea = slave2Config.gdsconfigformslave.findIndex(item => item.sControlName !== "" && item.sControlName.includes("bShow")); | |
| 1793 | 1879 | if (iIndexArea > -1) { |
| 1794 | 1880 | showAll2 = false; |
| 1795 | 1881 | } |
| 1796 | 1882 | if (commonUtils.isNotEmptyObject(slave2Config) && commonUtils.isNotEmptyArr(slave2Config.gdsconfigformslave)) { |
| 1797 | - const iShowLeft2 = slave2Config.gdsconfigformslave.findIndex(item => item.sControlName === 'bShowLeft' && item.bVisible); | |
| 1798 | - const iShowRight2 = slave2Config.gdsconfigformslave.findIndex(item => item.sControlName === 'bShowRight' && item.bVisible); | |
| 1883 | + const iShowLeft2 = slave2Config.gdsconfigformslave.findIndex(item => item.sControlName === "bShowLeft" && item.bVisible); | |
| 1884 | + const iShowRight2 = slave2Config.gdsconfigformslave.findIndex(item => item.sControlName === "bShowRight" && item.bVisible); | |
| 1799 | 1885 | if (iShowLeft2 > -1) { |
| 1800 | 1886 | bShowLeft2 = true; |
| 1801 | 1887 | iColValueTable2 = slave2Config.gdsconfigformslave[iShowLeft2].iColValue; |
| ... | ... | @@ -1806,13 +1892,15 @@ const BillComponent = Form.create({ |
| 1806 | 1892 | } |
| 1807 | 1893 | } |
| 1808 | 1894 | iColValueView2 = commonUtils.isNotEmptyNumber(iColValueTable2) ? 24 - iColValueTable2 : 12; |
| 1809 | - if (slave2Config && slave2Config.sChinese === '上批对比') { | |
| 1810 | - iColValueView2 = iColValueView1 | |
| 1895 | + if (slave2Config && slave2Config.sChinese === "上批对比") { | |
| 1896 | + iColValueView2 = iColValueView1; | |
| 1811 | 1897 | } |
| 1812 | 1898 | const iShowOrder2 = bShowLeft2 ? 1 : 100; |
| 1813 | 1899 | |
| 1814 | 1900 | /* 表5-commonView显示区域 */ |
| 1815 | - const ableConfigs3 = commonUtils.isNotEmptyObject(slave3Config) ? slave3Config.gdsconfigformslave.filter(item => item.sName !== '' && item.bControl && item.sControlName.indexOf('Btn') === -1) : []; | |
| 1901 | + const ableConfigs3 = commonUtils.isNotEmptyObject(slave3Config) | |
| 1902 | + ? slave3Config.gdsconfigformslave.filter(item => item.sName !== "" && item.bControl && item.sControlName.indexOf("Btn") === -1) | |
| 1903 | + : []; | |
| 1816 | 1904 | let showAll3 = true; /* 只显示表格 */ |
| 1817 | 1905 | let bShowLeft3 = true; /* 表格显示在左侧 */ |
| 1818 | 1906 | let iColValueView3 = 12; |
| ... | ... | @@ -1829,13 +1917,13 @@ const BillComponent = Form.create({ |
| 1829 | 1917 | slave3Row = slave3Data[0]; |
| 1830 | 1918 | } |
| 1831 | 1919 | if (commonUtils.isNotEmptyObject(slave3Config) && commonUtils.isNotEmptyArr(slave3Config.gdsconfigformslave)) { |
| 1832 | - const iIndexArea = slave3Config.gdsconfigformslave.findIndex(item => item.sControlName !== '' && item.sControlName.includes('bShow')); | |
| 1920 | + const iIndexArea = slave3Config.gdsconfigformslave.findIndex(item => item.sControlName !== "" && item.sControlName.includes("bShow")); | |
| 1833 | 1921 | if (iIndexArea > -1) { |
| 1834 | 1922 | showAll3 = false; |
| 1835 | 1923 | } |
| 1836 | 1924 | if (commonUtils.isNotEmptyObject(slave3Config) && commonUtils.isNotEmptyArr(slave3Config.gdsconfigformslave)) { |
| 1837 | - const iShowLeft3 = slave3Config.gdsconfigformslave.findIndex(item => item.sControlName === 'bShowLeft' && item.bVisible); | |
| 1838 | - const iShowRight3 = slave3Config.gdsconfigformslave.findIndex(item => item.sControlName === 'bShowRight' && item.bVisible); | |
| 1925 | + const iShowLeft3 = slave3Config.gdsconfigformslave.findIndex(item => item.sControlName === "bShowLeft" && item.bVisible); | |
| 1926 | + const iShowRight3 = slave3Config.gdsconfigformslave.findIndex(item => item.sControlName === "bShowRight" && item.bVisible); | |
| 1839 | 1927 | if (iShowLeft3 > -1) { |
| 1840 | 1928 | bShowLeft3 = true; |
| 1841 | 1929 | iColValueTable3 = slave3Config.gdsconfigformslave[iShowLeft3].iColValue; |
| ... | ... | @@ -1849,7 +1937,9 @@ const BillComponent = Form.create({ |
| 1849 | 1937 | const iShowOrder3 = bShowLeft3 ? 1 : 100; |
| 1850 | 1938 | |
| 1851 | 1939 | /* 表6-commonView显示区域 */ |
| 1852 | - const ableConfigs4 = commonUtils.isNotEmptyObject(slave4Config) ? slave4Config.gdsconfigformslave.filter(item => item.sName !== '' && item.bControl && item.sControlName.indexOf('Btn') === -1) : []; | |
| 1940 | + const ableConfigs4 = commonUtils.isNotEmptyObject(slave4Config) | |
| 1941 | + ? slave4Config.gdsconfigformslave.filter(item => item.sName !== "" && item.bControl && item.sControlName.indexOf("Btn") === -1) | |
| 1942 | + : []; | |
| 1853 | 1943 | let showAll4 = true; /* 只显示表格 */ |
| 1854 | 1944 | let bShowLeft4 = true; /* 表格显示在左侧 */ |
| 1855 | 1945 | let iColValueView4 = 12; |
| ... | ... | @@ -1866,13 +1956,13 @@ const BillComponent = Form.create({ |
| 1866 | 1956 | slave4Row = slave4Data[0]; |
| 1867 | 1957 | } |
| 1868 | 1958 | if (commonUtils.isNotEmptyObject(slave4Config) && commonUtils.isNotEmptyArr(slave4Config.gdsconfigformslave)) { |
| 1869 | - const iIndexArea = slave4Config.gdsconfigformslave.findIndex(item => item.sControlName !== '' && item.sControlName.includes('bShow')); | |
| 1959 | + const iIndexArea = slave4Config.gdsconfigformslave.findIndex(item => item.sControlName !== "" && item.sControlName.includes("bShow")); | |
| 1870 | 1960 | if (iIndexArea > -1) { |
| 1871 | 1961 | showAll4 = false; |
| 1872 | 1962 | } |
| 1873 | 1963 | if (commonUtils.isNotEmptyObject(slave4Config) && commonUtils.isNotEmptyArr(slave4Config.gdsconfigformslave)) { |
| 1874 | - const iShowLeft4 = slave4Config.gdsconfigformslave.findIndex(item => item.sControlName === 'bShowLeft' && item.bVisible); | |
| 1875 | - const iShowRight4 = slave4Config.gdsconfigformslave.findIndex(item => item.sControlName === 'bShowRight' && item.bVisible); | |
| 1964 | + const iShowLeft4 = slave4Config.gdsconfigformslave.findIndex(item => item.sControlName === "bShowLeft" && item.bVisible); | |
| 1965 | + const iShowRight4 = slave4Config.gdsconfigformslave.findIndex(item => item.sControlName === "bShowRight" && item.bVisible); | |
| 1876 | 1966 | if (iShowLeft4 > -1) { |
| 1877 | 1967 | bShowLeft4 = true; |
| 1878 | 1968 | iColValueTable4 = slave4Config.gdsconfigformslave[iShowLeft4].iColValue; |
| ... | ... | @@ -1885,113 +1975,180 @@ const BillComponent = Form.create({ |
| 1885 | 1975 | iColValueView4 = commonUtils.isNotEmptyNumber(iColValueTable4) ? 24 - iColValueTable4 : 12; |
| 1886 | 1976 | const iShowOrder4 = bShowLeft4 ? 1 : 100; |
| 1887 | 1977 | |
| 1978 | + const listType = "commonMultiList"; | |
| 1979 | + const bCheck = commonUtils.isNotEmptyObject(slaveConfig) && slaveConfig.sTbName === "sysbillcheckresult" ? true : false; | |
| 1888 | 1980 | |
| 1889 | - const listType = 'commonMultiList' ; | |
| 1890 | - const bCheck = commonUtils.isNotEmptyObject(slaveConfig) && slaveConfig.sTbName === 'sysbillcheckresult' ? true : false; | |
| 1891 | - | |
| 1892 | - const bSingleTree = commonUtils.isNotEmptyObject(slaveConfig) && slaveConfig.sTableType === 'single'; /* 单表数据 */ | |
| 1893 | - const bShowTreeAddChild = commonUtils.isNotEmptyObject(slaveConfig) && commonUtils.isNotEmptyArr(slaveConfig.gdsconfigformslave.filter(item => item.sControlName.includes('BtnAddChildNode') && item.bVisible)) ? true : false ; /* 是否是树形的单据 */ | |
| 1981 | + const bSingleTree = commonUtils.isNotEmptyObject(slaveConfig) && slaveConfig.sTableType === "single"; /* 单表数据 */ | |
| 1982 | + const bShowTreeAddChild = | |
| 1983 | + commonUtils.isNotEmptyObject(slaveConfig) && | |
| 1984 | + commonUtils.isNotEmptyArr(slaveConfig.gdsconfigformslave.filter(item => item.sControlName.includes("BtnAddChildNode") && item.bVisible)) | |
| 1985 | + ? true | |
| 1986 | + : false; /* 是否是树形的单据 */ | |
| 1894 | 1987 | |
| 1895 | 1988 | const slaveTableProps = { |
| 1896 | - ...commonBusiness.getTableTypes('slave', props), | |
| 1897 | - tableBelone: sModelsType === listType ? 'list' : '', /* 新需求:做个1带N的只可查看不可编辑的表格,模块类型名:commonMultiList */ | |
| 1989 | + ...commonBusiness.getTableTypes("slave", props), | |
| 1990 | + tableBelone: sModelsType === listType ? "list" : "" /* 新需求:做个1带N的只可查看不可编辑的表格,模块类型名:commonMultiList */, | |
| 1898 | 1991 | tableProps: { |
| 1899 | - setAdd, setCopy, setCopyAll, setDelete, bShowTreeAddChild:bShowTreeAddChild, pagination, onChange: props.onTitleChange.bind(this, 'slave'), | |
| 1992 | + setAdd, | |
| 1993 | + setCopy, | |
| 1994 | + setCopyAll, | |
| 1995 | + setDelete, | |
| 1996 | + bShowTreeAddChild: bShowTreeAddChild, | |
| 1997 | + pagination, | |
| 1998 | + onChange: props.onTitleChange.bind(this, "slave"), | |
| 1999 | + dragTableHeight:344 | |
| 1900 | 2000 | }, |
| 1901 | 2001 | noVlistTable: bPagination, |
| 1902 | 2002 | onDelRow: props.onDelRow, |
| 1903 | - data: bSingleTree && commonUtils.isNotEmptyArr(slaveData) ? commonUtils.genTreeByArr(slaveData, 'sId', 'sFatherSlaveId') : slaveData, | |
| 2003 | + data: bSingleTree && commonUtils.isNotEmptyArr(slaveData) ? commonUtils.genTreeByArr(slaveData, "sId", "sFatherSlaveId") : slaveData, | |
| 1904 | 2004 | onTreeAddChild: props.onDataRowAddChild, |
| 1905 | 2005 | customConfig: props.customConfig, |
| 2006 | + isDragAndDrop: true, | |
| 2007 | + onMoveRow: props.onMoveRow, | |
| 2008 | + isSettingFunctions:true | |
| 1906 | 2009 | }; |
| 1907 | 2010 | |
| 1908 | - const bCheck0 = commonUtils.isNotEmptyObject(slave0Config) && slave0Config.sTbName === 'sysbillcheckresult' ? true : false; | |
| 2011 | + const bCheck0 = commonUtils.isNotEmptyObject(slave0Config) && slave0Config.sTbName === "sysbillcheckresult" ? true : false; | |
| 1909 | 2012 | const slave0TableProps = { |
| 1910 | - ...commonBusiness.getTableTypes('slave0', props), | |
| 1911 | - tableBelone: (sModelsType === listType) || bCheck ? 'list' : '', /* 新需求:做个1带N的只可查看不可编辑的表格,模块类型名:commonMultiList */ | |
| 2013 | + ...commonBusiness.getTableTypes("slave0", props), | |
| 2014 | + tableBelone: sModelsType === listType || bCheck ? "list" : "" /* 新需求:做个1带N的只可查看不可编辑的表格,模块类型名:commonMultiList */, | |
| 1912 | 2015 | tableProps: { |
| 1913 | - setAdd, setCopy, setCopyAll, setDelete, pagination : pagination0, onChange: props.onTitleChange.bind(this, 'slave0'), | |
| 2016 | + setAdd, | |
| 2017 | + setCopy, | |
| 2018 | + setCopyAll, | |
| 2019 | + setDelete, | |
| 2020 | + pagination: pagination0, | |
| 2021 | + onChange: props.onTitleChange.bind(this, "slave0"), | |
| 1914 | 2022 | }, |
| 1915 | 2023 | }; |
| 1916 | - const bCheck1 = commonUtils.isNotEmptyObject(slave1Config) && slave1Config.sTbName === 'sysbillcheckresult' ? true : false; | |
| 2024 | + const bCheck1 = commonUtils.isNotEmptyObject(slave1Config) && slave1Config.sTbName === "sysbillcheckresult" ? true : false; | |
| 1917 | 2025 | const slave1TableProps = { |
| 1918 | - ...commonBusiness.getTableTypes('slave1', props), | |
| 1919 | - tableBelone: sModelsType === listType ? 'list' : '', /* 新需求:做个1带N的只可查看不可编辑的表格,模块类型名:commonMultiList */ | |
| 2026 | + ...commonBusiness.getTableTypes("slave1", props), | |
| 2027 | + tableBelone: sModelsType === listType ? "list" : "" /* 新需求:做个1带N的只可查看不可编辑的表格,模块类型名:commonMultiList */, | |
| 1920 | 2028 | tableProps: { |
| 1921 | - setAdd, setCopy, setCopyAll, setDelete, pagination: pagination1, onChange: props.onTitleChange.bind(this, 'slave1'), | |
| 2029 | + setAdd, | |
| 2030 | + setCopy, | |
| 2031 | + setCopyAll, | |
| 2032 | + setDelete, | |
| 2033 | + pagination: pagination1, | |
| 2034 | + onChange: props.onTitleChange.bind(this, "slave1"), | |
| 1922 | 2035 | }, |
| 1923 | 2036 | }; |
| 1924 | - const bCheck2 = commonUtils.isNotEmptyObject(slave2Config) && slave2Config.sTbName === 'sysbillcheckresult' ? true : false; | |
| 2037 | + const bCheck2 = commonUtils.isNotEmptyObject(slave2Config) && slave2Config.sTbName === "sysbillcheckresult" ? true : false; | |
| 1925 | 2038 | const slave2TableProps = { |
| 1926 | - ...commonBusiness.getTableTypes('slave2', props), | |
| 1927 | - tableBelone: sModelsType === listType ? 'list' : '', /* 新需求:做个1带N的只可查看不可编辑的表格,模块类型名:commonMultiList */ | |
| 2039 | + ...commonBusiness.getTableTypes("slave2", props), | |
| 2040 | + tableBelone: sModelsType === listType ? "list" : "" /* 新需求:做个1带N的只可查看不可编辑的表格,模块类型名:commonMultiList */, | |
| 1928 | 2041 | tableProps: { |
| 1929 | - setAdd, setCopy, setCopyAll, setDelete, pagination: pagination2, onChange: props.onTitleChange.bind(this, 'slave2'), | |
| 2042 | + setAdd, | |
| 2043 | + setCopy, | |
| 2044 | + setCopyAll, | |
| 2045 | + setDelete, | |
| 2046 | + pagination: pagination2, | |
| 2047 | + onChange: props.onTitleChange.bind(this, "slave2"), | |
| 1930 | 2048 | }, |
| 1931 | 2049 | }; |
| 1932 | 2050 | const slave3TableProps = { |
| 1933 | - ...commonBusiness.getTableTypes('slave3', props), | |
| 1934 | - tableBelone: sModelsType === listType ? 'list' : '', /* 新需求:做个1带N的只可查看不可编辑的表格,模块类型名:commonMultiList */ | |
| 2051 | + ...commonBusiness.getTableTypes("slave3", props), | |
| 2052 | + tableBelone: sModelsType === listType ? "list" : "" /* 新需求:做个1带N的只可查看不可编辑的表格,模块类型名:commonMultiList */, | |
| 1935 | 2053 | tableProps: { |
| 1936 | - setAdd, setCopy, setCopyAll, setDelete, pagination: pagination3, onChange: props.onTitleChange.bind(this, 'slave3'), | |
| 2054 | + setAdd, | |
| 2055 | + setCopy, | |
| 2056 | + setCopyAll, | |
| 2057 | + setDelete, | |
| 2058 | + pagination: pagination3, | |
| 2059 | + onChange: props.onTitleChange.bind(this, "slave3"), | |
| 1937 | 2060 | }, |
| 1938 | 2061 | }; |
| 1939 | 2062 | const slave4TableProps = { |
| 1940 | - ...commonBusiness.getTableTypes('slave4', props), | |
| 1941 | - tableBelone: sModelsType === listType ? 'list' : '', /* 新需求:做个1带N的只可查看不可编辑的表格,模块类型名:commonMultiList */ | |
| 2063 | + ...commonBusiness.getTableTypes("slave4", props), | |
| 2064 | + tableBelone: sModelsType === listType ? "list" : "" /* 新需求:做个1带N的只可查看不可编辑的表格,模块类型名:commonMultiList */, | |
| 1942 | 2065 | tableProps: { |
| 1943 | - setAdd, setCopy, setCopyAll, setDelete, pagination: pagination4, onChange: props.onTitleChange.bind(this, 'slave4'), | |
| 2066 | + setAdd, | |
| 2067 | + setCopy, | |
| 2068 | + setCopyAll, | |
| 2069 | + setDelete, | |
| 2070 | + pagination: pagination4, | |
| 2071 | + onChange: props.onTitleChange.bind(this, "slave4"), | |
| 1944 | 2072 | }, |
| 1945 | 2073 | }; |
| 1946 | 2074 | const slave5TableProps = { |
| 1947 | - ...commonBusiness.getTableTypes('slave5', props), | |
| 1948 | - tableBelone: sModelsType === listType ? 'list' : '', /* 新需求:做个1带N的只可查看不可编辑的表格,模块类型名:commonMultiList */ | |
| 2075 | + ...commonBusiness.getTableTypes("slave5", props), | |
| 2076 | + tableBelone: sModelsType === listType ? "list" : "" /* 新需求:做个1带N的只可查看不可编辑的表格,模块类型名:commonMultiList */, | |
| 1949 | 2077 | tableProps: { |
| 1950 | - setAdd, setCopy, setCopyAll, setDelete, pagination: pagination5, onChange: props.onTitleChange.bind(this, 'slave5'), | |
| 2078 | + setAdd, | |
| 2079 | + setCopy, | |
| 2080 | + setCopyAll, | |
| 2081 | + setDelete, | |
| 2082 | + pagination: pagination5, | |
| 2083 | + onChange: props.onTitleChange.bind(this, "slave5"), | |
| 1951 | 2084 | }, |
| 1952 | 2085 | }; |
| 1953 | 2086 | |
| 1954 | 2087 | const slave6TableProps = { |
| 1955 | - ...commonBusiness.getTableTypes('slave6', props), | |
| 1956 | - tableBelone: sModelsType === listType ? 'list' : '', /* 新需求:做个1带N的只可查看不可编辑的表格,模块类型名:commonMultiList */ | |
| 2088 | + ...commonBusiness.getTableTypes("slave6", props), | |
| 2089 | + tableBelone: sModelsType === listType ? "list" : "" /* 新需求:做个1带N的只可查看不可编辑的表格,模块类型名:commonMultiList */, | |
| 1957 | 2090 | tableProps: { |
| 1958 | - setAdd, setCopy, setCopyAll, setDelete, pagination: pagination6, onChange: props.onTitleChange.bind(this, 'slave6'), | |
| 2091 | + setAdd, | |
| 2092 | + setCopy, | |
| 2093 | + setCopyAll, | |
| 2094 | + setDelete, | |
| 2095 | + pagination: pagination6, | |
| 2096 | + onChange: props.onTitleChange.bind(this, "slave6"), | |
| 1959 | 2097 | }, |
| 1960 | 2098 | }; |
| 1961 | 2099 | |
| 1962 | 2100 | const slave7TableProps = { |
| 1963 | - ...commonBusiness.getTableTypes('slave7', props), | |
| 1964 | - tableBelone: sModelsType === listType ? 'list' : '', /* 新需求:做个1带N的只可查看不可编辑的表格,模块类型名:commonMultiList */ | |
| 2101 | + ...commonBusiness.getTableTypes("slave7", props), | |
| 2102 | + tableBelone: sModelsType === listType ? "list" : "" /* 新需求:做个1带N的只可查看不可编辑的表格,模块类型名:commonMultiList */, | |
| 1965 | 2103 | tableProps: { |
| 1966 | - setAdd, setCopy, setCopyAll, setDelete, pagination: pagination7, onChange: props.onTitleChange.bind(this, 'slave7'), | |
| 2104 | + setAdd, | |
| 2105 | + setCopy, | |
| 2106 | + setCopyAll, | |
| 2107 | + setDelete, | |
| 2108 | + pagination: pagination7, | |
| 2109 | + onChange: props.onTitleChange.bind(this, "slave7"), | |
| 1967 | 2110 | }, |
| 1968 | 2111 | }; |
| 1969 | 2112 | |
| 1970 | 2113 | const slave8TableProps = { |
| 1971 | - ...commonBusiness.getTableTypes('slave8', props), | |
| 1972 | - tableBelone: sModelsType === listType ? 'list' : '', /* 新需求:做个1带N的只可查看不可编辑的表格,模块类型名:commonMultiList */ | |
| 2114 | + ...commonBusiness.getTableTypes("slave8", props), | |
| 2115 | + tableBelone: sModelsType === listType ? "list" : "" /* 新需求:做个1带N的只可查看不可编辑的表格,模块类型名:commonMultiList */, | |
| 1973 | 2116 | tableProps: { |
| 1974 | - setAdd, setCopy, setCopyAll, setDelete, pagination: pagination8, onChange: props.onTitleChange.bind(this, 'slave8'), | |
| 2117 | + setAdd, | |
| 2118 | + setCopy, | |
| 2119 | + setCopyAll, | |
| 2120 | + setDelete, | |
| 2121 | + pagination: pagination8, | |
| 2122 | + onChange: props.onTitleChange.bind(this, "slave8"), | |
| 1975 | 2123 | }, |
| 1976 | 2124 | }; |
| 1977 | 2125 | |
| 1978 | 2126 | const slave9TableProps = { |
| 1979 | - ...commonBusiness.getTableTypes('slave9', props), | |
| 1980 | - tableBelone: sModelsType === listType ? 'list' : '', /* 新需求:做个1带N的只可查看不可编辑的表格,模块类型名:commonMultiList */ | |
| 2127 | + ...commonBusiness.getTableTypes("slave9", props), | |
| 2128 | + tableBelone: sModelsType === listType ? "list" : "" /* 新需求:做个1带N的只可查看不可编辑的表格,模块类型名:commonMultiList */, | |
| 1981 | 2129 | tableProps: { |
| 1982 | - setAdd, setCopy, setCopyAll, setDelete, pagination: pagination9, onChange: props.onTitleChange.bind(this, 'slave9'), | |
| 2130 | + setAdd, | |
| 2131 | + setCopy, | |
| 2132 | + setCopyAll, | |
| 2133 | + setDelete, | |
| 2134 | + pagination: pagination9, | |
| 2135 | + onChange: props.onTitleChange.bind(this, "slave9"), | |
| 1983 | 2136 | }, |
| 1984 | 2137 | }; |
| 1985 | 2138 | |
| 1986 | 2139 | const slave10TableProps = { |
| 1987 | - ...commonBusiness.getTableTypes('slave10', props), | |
| 1988 | - tableBelone: sModelsType === listType ? 'list' : '', /* 新需求:做个1带N的只可查看不可编辑的表格,模块类型名:commonMultiList */ | |
| 2140 | + ...commonBusiness.getTableTypes("slave10", props), | |
| 2141 | + tableBelone: sModelsType === listType ? "list" : "" /* 新需求:做个1带N的只可查看不可编辑的表格,模块类型名:commonMultiList */, | |
| 1989 | 2142 | tableProps: { |
| 1990 | - setAdd, setCopy, setCopyAll, setDelete, pagination: pagination10, onChange: props.onTitleChange.bind(this, 'slave10'), | |
| 2143 | + setAdd, | |
| 2144 | + setCopy, | |
| 2145 | + setCopyAll, | |
| 2146 | + setDelete, | |
| 2147 | + pagination: pagination10, | |
| 2148 | + onChange: props.onTitleChange.bind(this, "slave10"), | |
| 1991 | 2149 | }, |
| 1992 | 2150 | }; |
| 1993 | 2151 | |
| 1994 | - | |
| 1995 | 2152 | /* 从表view */ |
| 1996 | 2153 | const slaveViewProps = { |
| 1997 | 2154 | ...props, |
| ... | ... | @@ -1999,8 +2156,8 @@ const BillComponent = Form.create({ |
| 1999 | 2156 | tableConfig: slaveConfig, |
| 2000 | 2157 | iColValueView, |
| 2001 | 2158 | viewRow: slaveRow, |
| 2002 | - tableName: 'slave', | |
| 2003 | - handleFieldDoubleClick: props.handleFieldDoubleClick | |
| 2159 | + tableName: "slave", | |
| 2160 | + handleFieldDoubleClick: props.handleFieldDoubleClick, | |
| 2004 | 2161 | }; |
| 2005 | 2162 | |
| 2006 | 2163 | /* 第二张表 */ |
| ... | ... | @@ -2008,27 +2165,27 @@ const BillComponent = Form.create({ |
| 2008 | 2165 | ...props, |
| 2009 | 2166 | viewConfigs: ableConfigs0, |
| 2010 | 2167 | tableConfig: slave0Config, |
| 2011 | - iColValueView:iColValueView0, | |
| 2168 | + iColValueView: iColValueView0, | |
| 2012 | 2169 | viewRow: slave0Row, |
| 2013 | - tableName: 'slave0', | |
| 2170 | + tableName: "slave0", | |
| 2014 | 2171 | }; |
| 2015 | 2172 | /* */ |
| 2016 | 2173 | const slave1ViewProps = { |
| 2017 | 2174 | ...props, |
| 2018 | 2175 | viewConfigs: ableConfigs1, |
| 2019 | 2176 | tableConfig: slave1Config, |
| 2020 | - iColValueView:iColValueView1, | |
| 2177 | + iColValueView: iColValueView1, | |
| 2021 | 2178 | viewRow: slave1Row, |
| 2022 | - tableName: 'slave1', | |
| 2179 | + tableName: "slave1", | |
| 2023 | 2180 | }; |
| 2024 | 2181 | /* 从表view */ |
| 2025 | 2182 | const slave2ViewProps = { |
| 2026 | 2183 | ...props, |
| 2027 | 2184 | viewConfigs: ableConfigs2, |
| 2028 | 2185 | tableConfig: slave2Config, |
| 2029 | - iColValueView:iColValueView2, | |
| 2186 | + iColValueView: iColValueView2, | |
| 2030 | 2187 | viewRow: slave2Row, |
| 2031 | - tableName: 'slave2', | |
| 2188 | + tableName: "slave2", | |
| 2032 | 2189 | }; |
| 2033 | 2190 | |
| 2034 | 2191 | /* pack表view */ |
| ... | ... | @@ -2036,31 +2193,31 @@ const BillComponent = Form.create({ |
| 2036 | 2193 | ...props, |
| 2037 | 2194 | viewConfigs: ableConfigs3, |
| 2038 | 2195 | tableConfig: slave3Config, |
| 2039 | - iColValueView:iColValueView3, | |
| 2196 | + iColValueView: iColValueView3, | |
| 2040 | 2197 | viewRow: slave3Row, |
| 2041 | - tableName: 'slave3', | |
| 2198 | + tableName: "slave3", | |
| 2042 | 2199 | }; |
| 2043 | 2200 | |
| 2044 | 2201 | const slave4ViewProps = { |
| 2045 | 2202 | ...props, |
| 2046 | 2203 | viewConfigs: ableConfigs4, |
| 2047 | 2204 | tableConfig: slave4Config, |
| 2048 | - iColValueView:iColValueView4, | |
| 2205 | + iColValueView: iColValueView4, | |
| 2049 | 2206 | viewRow: slave4Row, |
| 2050 | - tableName: 'slave4', | |
| 2207 | + tableName: "slave4", | |
| 2051 | 2208 | }; |
| 2052 | 2209 | |
| 2053 | 2210 | /* 获取AssignmentField中的props */ |
| 2054 | 2211 | const assignmentFieldProps = { |
| 2055 | - visibleAssignmentField: props.visibleAssignmentField, /* 是否展示 */ | |
| 2056 | - sAssignFieldData: props.sAssignFieldData, /* 数据 */ | |
| 2057 | - sAssignFieldColumn: props.sAssignFieldColumn, /* 表头 */ | |
| 2058 | - selectedRowKeys: props.selectedRowKeys, /* 选中 */ | |
| 2059 | - sAssignFieldSelectedRowKeys: props.selectedRowKeys, /* 选中 */ | |
| 2060 | - onSaveState: props.onSaveState, /* 保存数据方法 */ | |
| 2061 | - onDataRowAdd: props.handleAddRow.bind(this, 'sAssignField'), | |
| 2062 | - onDataRowDel: props.handleDelRow.bind(this, 'sAssignField'), | |
| 2063 | - onDataRowCopy: props.handleCopyRow.bind(this, 'sAssignField'), | |
| 2212 | + visibleAssignmentField: props.visibleAssignmentField /* 是否展示 */, | |
| 2213 | + sAssignFieldData: props.sAssignFieldData /* 数据 */, | |
| 2214 | + sAssignFieldColumn: props.sAssignFieldColumn /* 表头 */, | |
| 2215 | + selectedRowKeys: props.selectedRowKeys /* 选中 */, | |
| 2216 | + sAssignFieldSelectedRowKeys: props.selectedRowKeys /* 选中 */, | |
| 2217 | + onSaveState: props.onSaveState /* 保存数据方法 */, | |
| 2218 | + onDataRowAdd: props.handleAddRow.bind(this, "sAssignField"), | |
| 2219 | + onDataRowDel: props.handleDelRow.bind(this, "sAssignField"), | |
| 2220 | + onDataRowCopy: props.handleCopyRow.bind(this, "sAssignField"), | |
| 2064 | 2221 | // onRowClick: props.handleRowClick.bind(this, 'sAssignField'), |
| 2065 | 2222 | config: props.config, |
| 2066 | 2223 | app: props.app, |
| ... | ... | @@ -2076,78 +2233,101 @@ const BillComponent = Form.create({ |
| 2076 | 2233 | // const slaveInfo0 = commonFunc.showMessage(app.commonConst, 'zSlaveInfo0'); /* 工序表 */ |
| 2077 | 2234 | // const slaveInfo1 = commonFunc.showMessage(app.commonConst, 'zSlaveInfo1'); /* 表二 */ |
| 2078 | 2235 | // const slaveInfo2 = commonFunc.showMessage(app.commonConst, 'zSlaveInfo2'); /* 表三 */ |
| 2079 | - let slaveInfo = ''; | |
| 2080 | - let materialsInfo = ''; | |
| 2081 | - let checkInfo = ''; | |
| 2082 | - let slaveInfo0 = ''; | |
| 2083 | - let slaveInfo1 = ''; | |
| 2084 | - let slaveInfo2 = ''; | |
| 2085 | - let slaveInfo3 = ''; | |
| 2086 | - let slaveInfo4 = ''; | |
| 2087 | - let slaveInfo5 = ''; | |
| 2088 | - let slaveInfo6 = ''; | |
| 2089 | - let slaveInfo7 = ''; | |
| 2090 | - let slaveInfo8 = ''; | |
| 2091 | - | |
| 2092 | - let defaultTab = ''; | |
| 2236 | + let slaveInfo = ""; | |
| 2237 | + let materialsInfo = ""; | |
| 2238 | + let checkInfo = ""; | |
| 2239 | + let slaveInfo0 = ""; | |
| 2240 | + let slaveInfo1 = ""; | |
| 2241 | + let slaveInfo2 = ""; | |
| 2242 | + let slaveInfo3 = ""; | |
| 2243 | + let slaveInfo4 = ""; | |
| 2244 | + let slaveInfo5 = ""; | |
| 2245 | + let slaveInfo6 = ""; | |
| 2246 | + let slaveInfo7 = ""; | |
| 2247 | + let slaveInfo8 = ""; | |
| 2248 | + | |
| 2249 | + let defaultTab = ""; | |
| 2093 | 2250 | |
| 2094 | 2251 | if (commonUtils.isNotEmptyObject(masterConfig) && commonUtils.isNotEmptyArr(masterConfig.gdsconfigformslave)) { |
| 2095 | - slaveInfo = commonUtils.isNotEmptyArr(masterConfig.gdsconfigformslave.filter(item => item.sControlName === 'MainContent')) ? masterConfig.gdsconfigformslave.filter(item => item.sControlName === 'MainContent')[0].showName : commonFunc.showMessage(app.commonConst, 'MainContent'); /* 从表信息 */ | |
| 2096 | - materialsInfo = commonUtils.isNotEmptyArr(masterConfig.gdsconfigformslave.filter(item => item.sControlName === 'zMaterials')) ? masterConfig.gdsconfigformslave.filter(item => item.sControlName === 'zMaterials')[0].showName : commonFunc.showMessage(app.commonConst, 'zMaterials'); /* 表一 */ | |
| 2097 | - checkInfo = commonUtils.isNotEmptyArr(masterConfig.gdsconfigformslave.filter(item => item.sControlName === 'zCheck')) ? masterConfig.gdsconfigformslave.filter(item => item.sControlName === 'zCheck')[0].showName : commonFunc.showMessage(app.commonConst, 'zCheck'); /* 表二 */ | |
| 2098 | - slaveInfo0 = commonUtils.isNotEmptyArr(masterConfig.gdsconfigformslave.filter(item => item.sControlName === 'zSlaveInfo0')) ? masterConfig.gdsconfigformslave.filter(item => item.sControlName === 'zSlaveInfo0')[0].showName : commonFunc.showMessage(app.commonConst, 'zSlaveInfo0'); /* 表三 */ | |
| 2099 | - slaveInfo1 = commonUtils.isNotEmptyArr(masterConfig.gdsconfigformslave.filter(item => item.sControlName === 'zSlaveInfo1')) ? masterConfig.gdsconfigformslave.filter(item => item.sControlName === 'zSlaveInfo1')[0].showName : commonFunc.showMessage(app.commonConst, 'zSlaveInfo1'); /* 表四 */ | |
| 2100 | - slaveInfo2 = commonUtils.isNotEmptyArr(masterConfig.gdsconfigformslave.filter(item => item.sControlName === 'zSlaveInfo2')) ? masterConfig.gdsconfigformslave.filter(item => item.sControlName === 'zSlaveInfo2')[0].showName : commonFunc.showMessage(app.commonConst, 'zSlaveInfo2'); /* 表五 */ | |
| 2101 | - slaveInfo3 = commonUtils.isNotEmptyArr(masterConfig.gdsconfigformslave.filter(item => item.sControlName === 'zSlaveInfo3')) ? masterConfig.gdsconfigformslave.filter(item => item.sControlName === 'zSlaveInfo3')[0].showName : commonFunc.showMessage(app.commonConst, 'zSlaveInfo3'); /* 表六 */ | |
| 2102 | - slaveInfo4 = commonUtils.isNotEmptyArr(masterConfig.gdsconfigformslave.filter(item => item.sControlName === 'zSlaveInfo4')) ? masterConfig.gdsconfigformslave.filter(item => item.sControlName === 'zSlaveInfo4')[0].showName : commonFunc.showMessage(app.commonConst, 'zSlaveInfo4'); /* 表七 */ | |
| 2103 | - slaveInfo5 = commonUtils.isNotEmptyArr(masterConfig.gdsconfigformslave.filter(item => item.sControlName === 'zSlaveInfo5')) ? masterConfig.gdsconfigformslave.filter(item => item.sControlName === 'zSlaveInfo5')[0].showName : commonFunc.showMessage(app.commonConst, 'zSlaveInfo5'); /* 表八 */ | |
| 2104 | - slaveInfo6 = commonUtils.isNotEmptyArr(masterConfig.gdsconfigformslave.filter(item => item.sControlName === 'zSlaveInfo6')) ? masterConfig.gdsconfigformslave.filter(item => item.sControlName === 'zSlaveInfo6')[0].showName : commonFunc.showMessage(app.commonConst, 'zSlaveInfo6'); /* 表九 */ | |
| 2105 | - slaveInfo7 = commonUtils.isNotEmptyArr(masterConfig.gdsconfigformslave.filter(item => item.sControlName === 'zSlaveInfo7')) ? masterConfig.gdsconfigformslave.filter(item => item.sControlName === 'zSlaveInfo7')[0].showName : commonFunc.showMessage(app.commonConst, 'zSlaveInfo7'); /* 表十 */ | |
| 2106 | - slaveInfo8 = commonUtils.isNotEmptyArr(masterConfig.gdsconfigformslave.filter(item => item.sControlName === 'zSlaveInfo8')) ? masterConfig.gdsconfigformslave.filter(item => item.sControlName === 'zSlaveInfo8')[0].showName : commonFunc.showMessage(app.commonConst, 'zSlaveInfo8'); /* 表十一 */ | |
| 2252 | + slaveInfo = commonUtils.isNotEmptyArr(masterConfig.gdsconfigformslave.filter(item => item.sControlName === "MainContent")) | |
| 2253 | + ? masterConfig.gdsconfigformslave.filter(item => item.sControlName === "MainContent")[0].showName | |
| 2254 | + : commonFunc.showMessage(app.commonConst, "MainContent"); /* 从表信息 */ | |
| 2255 | + materialsInfo = commonUtils.isNotEmptyArr(masterConfig.gdsconfigformslave.filter(item => item.sControlName === "zMaterials")) | |
| 2256 | + ? masterConfig.gdsconfigformslave.filter(item => item.sControlName === "zMaterials")[0].showName | |
| 2257 | + : commonFunc.showMessage(app.commonConst, "zMaterials"); /* 表一 */ | |
| 2258 | + checkInfo = commonUtils.isNotEmptyArr(masterConfig.gdsconfigformslave.filter(item => item.sControlName === "zCheck")) | |
| 2259 | + ? masterConfig.gdsconfigformslave.filter(item => item.sControlName === "zCheck")[0].showName | |
| 2260 | + : commonFunc.showMessage(app.commonConst, "zCheck"); /* 表二 */ | |
| 2261 | + slaveInfo0 = commonUtils.isNotEmptyArr(masterConfig.gdsconfigformslave.filter(item => item.sControlName === "zSlaveInfo0")) | |
| 2262 | + ? masterConfig.gdsconfigformslave.filter(item => item.sControlName === "zSlaveInfo0")[0].showName | |
| 2263 | + : commonFunc.showMessage(app.commonConst, "zSlaveInfo0"); /* 表三 */ | |
| 2264 | + slaveInfo1 = commonUtils.isNotEmptyArr(masterConfig.gdsconfigformslave.filter(item => item.sControlName === "zSlaveInfo1")) | |
| 2265 | + ? masterConfig.gdsconfigformslave.filter(item => item.sControlName === "zSlaveInfo1")[0].showName | |
| 2266 | + : commonFunc.showMessage(app.commonConst, "zSlaveInfo1"); /* 表四 */ | |
| 2267 | + slaveInfo2 = commonUtils.isNotEmptyArr(masterConfig.gdsconfigformslave.filter(item => item.sControlName === "zSlaveInfo2")) | |
| 2268 | + ? masterConfig.gdsconfigformslave.filter(item => item.sControlName === "zSlaveInfo2")[0].showName | |
| 2269 | + : commonFunc.showMessage(app.commonConst, "zSlaveInfo2"); /* 表五 */ | |
| 2270 | + slaveInfo3 = commonUtils.isNotEmptyArr(masterConfig.gdsconfigformslave.filter(item => item.sControlName === "zSlaveInfo3")) | |
| 2271 | + ? masterConfig.gdsconfigformslave.filter(item => item.sControlName === "zSlaveInfo3")[0].showName | |
| 2272 | + : commonFunc.showMessage(app.commonConst, "zSlaveInfo3"); /* 表六 */ | |
| 2273 | + slaveInfo4 = commonUtils.isNotEmptyArr(masterConfig.gdsconfigformslave.filter(item => item.sControlName === "zSlaveInfo4")) | |
| 2274 | + ? masterConfig.gdsconfigformslave.filter(item => item.sControlName === "zSlaveInfo4")[0].showName | |
| 2275 | + : commonFunc.showMessage(app.commonConst, "zSlaveInfo4"); /* 表七 */ | |
| 2276 | + slaveInfo5 = commonUtils.isNotEmptyArr(masterConfig.gdsconfigformslave.filter(item => item.sControlName === "zSlaveInfo5")) | |
| 2277 | + ? masterConfig.gdsconfigformslave.filter(item => item.sControlName === "zSlaveInfo5")[0].showName | |
| 2278 | + : commonFunc.showMessage(app.commonConst, "zSlaveInfo5"); /* 表八 */ | |
| 2279 | + slaveInfo6 = commonUtils.isNotEmptyArr(masterConfig.gdsconfigformslave.filter(item => item.sControlName === "zSlaveInfo6")) | |
| 2280 | + ? masterConfig.gdsconfigformslave.filter(item => item.sControlName === "zSlaveInfo6")[0].showName | |
| 2281 | + : commonFunc.showMessage(app.commonConst, "zSlaveInfo6"); /* 表九 */ | |
| 2282 | + slaveInfo7 = commonUtils.isNotEmptyArr(masterConfig.gdsconfigformslave.filter(item => item.sControlName === "zSlaveInfo7")) | |
| 2283 | + ? masterConfig.gdsconfigformslave.filter(item => item.sControlName === "zSlaveInfo7")[0].showName | |
| 2284 | + : commonFunc.showMessage(app.commonConst, "zSlaveInfo7"); /* 表十 */ | |
| 2285 | + slaveInfo8 = commonUtils.isNotEmptyArr(masterConfig.gdsconfigformslave.filter(item => item.sControlName === "zSlaveInfo8")) | |
| 2286 | + ? masterConfig.gdsconfigformslave.filter(item => item.sControlName === "zSlaveInfo8")[0].showName | |
| 2287 | + : commonFunc.showMessage(app.commonConst, "zSlaveInfo8"); /* 表十一 */ | |
| 2107 | 2288 | |
| 2108 | 2289 | // 获取默认展开tab |
| 2109 | - const defaultTabConfig = masterConfig.gdsconfigformslave.find(item => | |
| 2110 | - [ | |
| 2111 | - 'MainContent', | |
| 2112 | - 'zMaterials', | |
| 2113 | - 'zCheck', | |
| 2114 | - ...new Array(10).fill('').map((_, index) => `zSlaveInfo${index}`) | |
| 2115 | - ].includes(item.sControlName) && | |
| 2116 | - item.sDefault | |
| 2117 | - ) | |
| 2290 | + const defaultTabConfig = masterConfig.gdsconfigformslave.find( | |
| 2291 | + item => | |
| 2292 | + ["MainContent", "zMaterials", "zCheck", ...new Array(10).fill("").map((_, index) => `zSlaveInfo${index}`)].includes(item.sControlName) && | |
| 2293 | + item.sDefault | |
| 2294 | + ); | |
| 2118 | 2295 | if (defaultTabConfig) { |
| 2119 | - if (defaultTabConfig.sControlName === 'MainContent') { | |
| 2120 | - defaultTab = '10'; | |
| 2121 | - } else if (defaultTabConfig.sControlName === 'zMaterials') { | |
| 2122 | - defaultTab = '20'; | |
| 2123 | - } else if (defaultTabConfig.sControlName === 'zCheck') { | |
| 2124 | - defaultTab = '30'; | |
| 2296 | + if (defaultTabConfig.sControlName === "MainContent") { | |
| 2297 | + defaultTab = "10"; | |
| 2298 | + } else if (defaultTabConfig.sControlName === "zMaterials") { | |
| 2299 | + defaultTab = "20"; | |
| 2300 | + } else if (defaultTabConfig.sControlName === "zCheck") { | |
| 2301 | + defaultTab = "30"; | |
| 2125 | 2302 | } else { |
| 2126 | 2303 | try { |
| 2127 | - defaultTab = `${Number(defaultTabConfig.sControlName.split('zSlaveInfo')[1]) * 10 + 40}`; | |
| 2128 | - } catch (error) { } | |
| 2304 | + defaultTab = `${Number(defaultTabConfig.sControlName.split("zSlaveInfo")[1]) * 10 + 40}`; | |
| 2305 | + } catch (error) {} | |
| 2129 | 2306 | } |
| 2130 | 2307 | } |
| 2131 | - if (defaultTab && props.currentTab === '') { | |
| 2308 | + if (defaultTab && props.currentTab === "") { | |
| 2132 | 2309 | props.onTabChange(defaultTab); |
| 2133 | 2310 | } |
| 2134 | 2311 | } |
| 2135 | 2312 | |
| 2136 | 2313 | let productProcessInfoType = {}; |
| 2137 | 2314 | let productProcessInfoConfig = {}; |
| 2138 | - let processCardSearchResult = commonFunc.showMessage(app.commonConst, 'processCardSearchResult');/* 复制从工艺卡查询结果 */ | |
| 2315 | + let processCardSearchResult = commonFunc.showMessage(app.commonConst, "processCardSearchResult"); /* 复制从工艺卡查询结果 */ | |
| 2139 | 2316 | if (commonUtils.isNotEmptyObject(props.productProcessInfoChooseData)) { |
| 2140 | 2317 | const productProcessInfoCopyFromKey = props.productProcessInfoCopyFromKey; |
| 2141 | 2318 | const iIndex = masterConfig.gdsconfigformslave.findIndex(item => item.sControlName === productProcessInfoCopyFromKey); |
| 2142 | 2319 | if (iIndex > -1) { |
| 2143 | 2320 | productProcessInfoConfig = masterConfig.gdsconfigformslave[iIndex]; |
| 2144 | - processCardSearchResult = commonUtils.isNotEmptyObject(productProcessInfoConfig) && commonUtils.isNotEmptyObject(productProcessInfoConfig.sActiveName) ? productProcessInfoConfig.sActiveName : processCardSearchResult; | |
| 2321 | + processCardSearchResult = | |
| 2322 | + commonUtils.isNotEmptyObject(productProcessInfoConfig) && commonUtils.isNotEmptyObject(productProcessInfoConfig.sActiveName) | |
| 2323 | + ? productProcessInfoConfig.sActiveName | |
| 2324 | + : processCardSearchResult; | |
| 2145 | 2325 | } |
| 2146 | 2326 | productProcessInfoType = { |
| 2147 | 2327 | app: { |
| 2148 | 2328 | ...props.app, |
| 2149 | 2329 | currentPane: { |
| 2150 | - name: 'productProcessInfo', | |
| 2330 | + name: "productProcessInfo", | |
| 2151 | 2331 | config: productProcessInfoConfig, |
| 2152 | 2332 | conditonValues: props.getSqlCondition(productProcessInfoConfig), |
| 2153 | 2333 | title: props.productProcessInfoChooseData.sMenuName, |
| ... | ... | @@ -2166,18 +2346,25 @@ const BillComponent = Form.create({ |
| 2166 | 2346 | } |
| 2167 | 2347 | |
| 2168 | 2348 | let isSysSetting = false; |
| 2169 | - if (props && props.app && props.app.currentPane && props.app.currentPane.title && props.app.currentPane && props.app.currentPane.title === "功能模块界面设置单据") { | |
| 2349 | + if ( | |
| 2350 | + props && | |
| 2351 | + props.app && | |
| 2352 | + props.app.currentPane && | |
| 2353 | + props.app.currentPane.title && | |
| 2354 | + props.app.currentPane && | |
| 2355 | + props.app.currentPane.title === "功能模块界面设置单据" | |
| 2356 | + ) { | |
| 2170 | 2357 | isSysSetting = true; |
| 2171 | 2358 | } |
| 2172 | - const templateProps = props.formData.filter(item => item.sGrd === 'importTemplate')[0]; | |
| 2173 | - let gdsconfigformmasterId = ''; | |
| 2359 | + const templateProps = props.formData.filter(item => item.sGrd === "importTemplate")[0]; | |
| 2360 | + let gdsconfigformmasterId = ""; | |
| 2174 | 2361 | if (templateProps !== undefined) { |
| 2175 | 2362 | gdsconfigformmasterId = templateProps.sId; |
| 2176 | 2363 | } |
| 2177 | - const sNotEmpty = 'sParentId,sProductId'; | |
| 2364 | + const sNotEmpty = "sParentId,sProductId"; | |
| 2178 | 2365 | let uploadUrl = `${commonConfig.server_host}import/checkExcel?sModelsId=${sModelsId}&gdsconfigformmasterId=${gdsconfigformmasterId}&sNotEmpty=${sNotEmpty}&token=${app.token}`; |
| 2179 | 2366 | /* 送货单需要传客户id */ |
| 2180 | - if (commonUtils.isNotEmptyObject(sModelsType) && sModelsType === 'sales/salesSgoods' && commonUtils.isNotEmptyObject(masterData)) { | |
| 2367 | + if (commonUtils.isNotEmptyObject(sModelsType) && sModelsType === "sales/salesSgoods" && commonUtils.isNotEmptyObject(masterData)) { | |
| 2181 | 2368 | const sCustomerId = masterData.sCustomerId; |
| 2182 | 2369 | if (commonUtils.isNotEmptyObject(sCustomerId)) { |
| 2183 | 2370 | uploadUrl = `${commonConfig.server_host}import/checkExcel?sModelsId=${sModelsId}&gdsconfigformmasterId=${gdsconfigformmasterId}&sNotEmpty=${sNotEmpty}&sCustomerId=${sCustomerId}&token=${app.token}`; |
| ... | ... | @@ -2185,8 +2372,8 @@ const BillComponent = Form.create({ |
| 2185 | 2372 | } |
| 2186 | 2373 | const outProps = { |
| 2187 | 2374 | action: uploadUrl, |
| 2188 | - onChange: props.onUploadChangeFile, /* 文件上传 */ | |
| 2189 | - accept: 'xls/*', | |
| 2375 | + onChange: props.onUploadChangeFile /* 文件上传 */, | |
| 2376 | + accept: "xls/*", | |
| 2190 | 2377 | showUploadList: false, |
| 2191 | 2378 | beforeUpload: () => { |
| 2192 | 2379 | /* 查看时不可上传 */ |
| ... | ... | @@ -2195,37 +2382,41 @@ const BillComponent = Form.create({ |
| 2195 | 2382 | }; |
| 2196 | 2383 | |
| 2197 | 2384 | const uploadPropsSales = props.onUploadPropsSales(); |
| 2198 | - const BtnimportData = commonFunc.showMessage(app.commonConst, 'importData');/* 导入数据 */ | |
| 2199 | - const ImportData = commonUtils.isNotEmptyObject(masterConfig) ? masterConfig.gdsconfigformslave.filter(item => item.sControlName.includes('ImportData') && item.bVisible) : '';/* 后台是否配置导入 */ | |
| 2200 | - | |
| 2385 | + const BtnimportData = commonFunc.showMessage(app.commonConst, "importData"); /* 导入数据 */ | |
| 2386 | + const ImportData = commonUtils.isNotEmptyObject(masterConfig) | |
| 2387 | + ? masterConfig.gdsconfigformslave.filter(item => item.sControlName.includes("ImportData") && item.bVisible) | |
| 2388 | + : ""; /* 后台是否配置导入 */ | |
| 2201 | 2389 | |
| 2202 | 2390 | /* 显示导入报错信息 */ |
| 2203 | 2391 | let importExcelProps = {}; |
| 2204 | - let importExcelTitle = commonUtils.isNotEmptyObject(commonFunc.showMessage(app.commonConst, 'processCardSearchResult')) ? | |
| 2205 | - commonFunc.showMessage(app.commonConst, 'importErrorMsg') : '导入校验信息'; /* 导入校验信息 */ | |
| 2392 | + let importExcelTitle = commonUtils.isNotEmptyObject(commonFunc.showMessage(app.commonConst, "processCardSearchResult")) | |
| 2393 | + ? commonFunc.showMessage(app.commonConst, "importErrorMsg") | |
| 2394 | + : "导入校验信息"; /* 导入校验信息 */ | |
| 2206 | 2395 | if (commonUtils.isNotEmptyObject(props)) { |
| 2207 | 2396 | importExcelProps = { |
| 2208 | - ...commonBusiness.getTableTypes('import', props), | |
| 2397 | + ...commonBusiness.getTableTypes("import", props), | |
| 2209 | 2398 | tableProps: { |
| 2210 | - pagination:null, AutoTableHeight: 400, | |
| 2399 | + pagination: null, | |
| 2400 | + AutoTableHeight: 400, | |
| 2211 | 2401 | }, |
| 2212 | 2402 | // data: bSingleTree && commonUtils.isNotEmptyArr(slaveData) ? commonUtils.genTreeByArr(slaveData, 'sId', 'sFatherSlaveId') : slaveData, |
| 2213 | 2403 | onDelRow: props.onDelRow, |
| 2214 | 2404 | onKeyDown: props.onKeyDown, |
| 2215 | 2405 | onContextMenu: props.onContextMenu, |
| 2216 | 2406 | masterData: props.masterData, // 为通用弹窗提供主表数据(孟总需求:产品新增需要带上客户信息) |
| 2217 | - tableBelone: 'list', | |
| 2407 | + tableBelone: "list", | |
| 2218 | 2408 | }; |
| 2219 | 2409 | } |
| 2220 | - const sProcessParams = commonFunc.showMessage(app.commonConst, 'sProcessParams');/* 选择工艺参数标题 */ | |
| 2410 | + const sProcessParams = commonFunc.showMessage(app.commonConst, "sProcessParams"); /* 选择工艺参数标题 */ | |
| 2221 | 2411 | |
| 2222 | - const sProcessParamsNew = commonUtils.isNotEmptyObject(commonFunc.showMessage(app.commonConst, 'sProcessParamsNew')) ? | |
| 2223 | - commonFunc.showMessage(app.commonConst, 'sProcessParamsNew') : '选择新的工艺参数';/* 选择工艺参数标题 */ | |
| 2412 | + const sProcessParamsNew = commonUtils.isNotEmptyObject(commonFunc.showMessage(app.commonConst, "sProcessParamsNew")) | |
| 2413 | + ? commonFunc.showMessage(app.commonConst, "sProcessParamsNew") | |
| 2414 | + : "选择新的工艺参数"; /* 选择工艺参数标题 */ | |
| 2224 | 2415 | /* 新方式的工艺参数 */ |
| 2225 | 2416 | const sParamProps = { |
| 2226 | - ...commonBusiness.getTableTypes('sParam', props), | |
| 2417 | + ...commonBusiness.getTableTypes("sParam", props), | |
| 2227 | 2418 | tableProps: { |
| 2228 | - rowKey: 'sId', | |
| 2419 | + rowKey: "sId", | |
| 2229 | 2420 | // pagination, |
| 2230 | 2421 | onChange: props.onTitleChange, |
| 2231 | 2422 | sModelsType, |
| ... | ... | @@ -2236,9 +2427,9 @@ const BillComponent = Form.create({ |
| 2236 | 2427 | }; |
| 2237 | 2428 | |
| 2238 | 2429 | const sParamNewProps = { |
| 2239 | - ...commonBusiness.getTableTypes('sParamNew', props), | |
| 2430 | + ...commonBusiness.getTableTypes("sParamNew", props), | |
| 2240 | 2431 | tableProps: { |
| 2241 | - rowKey: 'sId', | |
| 2432 | + rowKey: "sId", | |
| 2242 | 2433 | // pagination, |
| 2243 | 2434 | onChange: props.onTitleChange, |
| 2244 | 2435 | sModelsType, |
| ... | ... | @@ -2255,11 +2446,13 @@ const BillComponent = Form.create({ |
| 2255 | 2446 | // </Menu> |
| 2256 | 2447 | // ); |
| 2257 | 2448 | /* 取 masterConfig中有多少个Tab页签配置 */ |
| 2258 | - const masterShowConfig = commonUtils.isNotEmptyObject(masterConfigOld) ? masterConfigOld.gdsconfigformslave.filter(item => item.bVisible && item.sName !== '') : []; | |
| 2449 | + const masterShowConfig = commonUtils.isNotEmptyObject(masterConfigOld) | |
| 2450 | + ? masterConfigOld.gdsconfigformslave.filter(item => item.bVisible && item.sName !== "") | |
| 2451 | + : []; | |
| 2259 | 2452 | const diliverConfigTypeArr = []; /* 有Tab的配置 */ |
| 2260 | - masterShowConfig.forEach((child) => { | |
| 2261 | - if (child.sControlName.indexOf('_') > -1) { | |
| 2262 | - const tableType = child.sControlName.split('_')[1]; | |
| 2453 | + masterShowConfig.forEach(child => { | |
| 2454 | + if (child.sControlName.indexOf("_") > -1) { | |
| 2455 | + const tableType = child.sControlName.split("_")[1]; | |
| 2263 | 2456 | const isIndex = diliverConfigTypeArr.findIndex(item => item === tableType); |
| 2264 | 2457 | if (isIndex === -1) { |
| 2265 | 2458 | diliverConfigTypeArr.push(tableType); |
| ... | ... | @@ -2269,27 +2462,33 @@ const BillComponent = Form.create({ |
| 2269 | 2462 | |
| 2270 | 2463 | /* 主表页签+表格页签排序规则,表格页签以10位一个间隔,10,20,30,40,50,60,如果想进行排序 则页签顺序介入其间即可 */ |
| 2271 | 2464 | /* 找到各个主表页签Tab所处的区间 */ |
| 2272 | - let diliverConfigTypeArr1 = []; | |
| 2273 | - let diliverConfigTypeArr2= []; | |
| 2465 | + let diliverConfigTypeArr1 = []; | |
| 2466 | + let diliverConfigTypeArr2 = []; | |
| 2274 | 2467 | let diliverConfigTypeArr3 = []; |
| 2275 | 2468 | let diliverConfigTypeArr4 = []; |
| 2276 | 2469 | let diliverConfigTypeArr5 = []; |
| 2277 | 2470 | let diliverConfigTypeArr6 = []; |
| 2278 | 2471 | for (const item of diliverConfigTypeArr) { |
| 2279 | - let numStr = item.replace(/[^\d]/g, '').trim(); | |
| 2472 | + let numStr = item.replace(/[^\d]/g, "").trim(); | |
| 2280 | 2473 | let num = Number(numStr); |
| 2281 | - if(!commonUtils.isEmpty(num)) { | |
| 2282 | - if(num < 10) { /* 0- 10 */ | |
| 2474 | + if (!commonUtils.isEmpty(num)) { | |
| 2475 | + if (num < 10) { | |
| 2476 | + /* 0- 10 */ | |
| 2283 | 2477 | diliverConfigTypeArr1.push(item); |
| 2284 | - } else if(num < 20) { /* 10- 20 */ | |
| 2478 | + } else if (num < 20) { | |
| 2479 | + /* 10- 20 */ | |
| 2285 | 2480 | diliverConfigTypeArr2.push(item); |
| 2286 | - } else if(num < 30) { /* 20- 30 */ | |
| 2481 | + } else if (num < 30) { | |
| 2482 | + /* 20- 30 */ | |
| 2287 | 2483 | diliverConfigTypeArr3.push(item); |
| 2288 | - } else if(num < 40) { /* 30- 40 */ | |
| 2484 | + } else if (num < 40) { | |
| 2485 | + /* 30- 40 */ | |
| 2289 | 2486 | diliverConfigTypeArr4.push(item); |
| 2290 | - } else if(num < 50) { /* 40- 50 */ | |
| 2487 | + } else if (num < 50) { | |
| 2488 | + /* 40- 50 */ | |
| 2291 | 2489 | diliverConfigTypeArr5.push(item); |
| 2292 | - } else if(num < 60) { /* 50- 60 */ | |
| 2490 | + } else if (num < 60) { | |
| 2491 | + /* 50- 60 */ | |
| 2293 | 2492 | diliverConfigTypeArr6.push(item); |
| 2294 | 2493 | } |
| 2295 | 2494 | } |
| ... | ... | @@ -2297,42 +2496,43 @@ const BillComponent = Form.create({ |
| 2297 | 2496 | |
| 2298 | 2497 | const tabNumList = [ |
| 2299 | 2498 | ...diliverConfigTypeArr1, |
| 2300 | - onlySlave ? '10' : '', | |
| 2499 | + onlySlave ? "10" : "", | |
| 2301 | 2500 | ...diliverConfigTypeArr2, |
| 2302 | - onlySlave0 ? '20' : '', | |
| 2501 | + onlySlave0 ? "20" : "", | |
| 2303 | 2502 | ...diliverConfigTypeArr3, |
| 2304 | - onlySlave1 ? '30' : '', | |
| 2503 | + onlySlave1 ? "30" : "", | |
| 2305 | 2504 | ...diliverConfigTypeArr4, |
| 2306 | - onlyslave2 ? '40' : '', | |
| 2505 | + onlyslave2 ? "40" : "", | |
| 2307 | 2506 | ...diliverConfigTypeArr5, |
| 2308 | - onlyslave3 ? '50' : '', | |
| 2507 | + onlyslave3 ? "50" : "", | |
| 2309 | 2508 | ...diliverConfigTypeArr6, |
| 2310 | - onlyslave4 ? '60' : '', | |
| 2311 | - onlyslave5 ? '70' : '', | |
| 2312 | - onlyslave6 ? '80' : '', | |
| 2313 | - onlyslave7 ? '90' : '', | |
| 2314 | - onlyslave8 ? '100' : '', | |
| 2315 | - onlyslave9 ? '110' : '', | |
| 2316 | - onlyslave10 ? '150' : '', | |
| 2509 | + onlyslave4 ? "60" : "", | |
| 2510 | + onlyslave5 ? "70" : "", | |
| 2511 | + onlyslave6 ? "80" : "", | |
| 2512 | + onlyslave7 ? "90" : "", | |
| 2513 | + onlyslave8 ? "100" : "", | |
| 2514 | + onlyslave9 ? "110" : "", | |
| 2515 | + onlyslave10 ? "150" : "", | |
| 2317 | 2516 | ].filter(item => item); |
| 2318 | 2517 | const { enabled } = props.masterData || {}; |
| 2319 | - if (enabled) { // 只有修改状态才会根据数据改变tab页 | |
| 2518 | + if (enabled) { | |
| 2519 | + // 只有修改状态才会根据数据改变tab页 | |
| 2320 | 2520 | const tabNumListOld = props.onGetTabNumList(tabNumList); |
| 2321 | 2521 | if (tabNumListOld && JSON.stringify(tabNumListOld) !== JSON.stringify(tabNumList)) { |
| 2322 | 2522 | const addData = tabNumList.find(item => tabNumListOld.indexOf(item) === -1); |
| 2323 | 2523 | props.onSetTabNumList(tabNumList); |
| 2324 | 2524 | if (addData) { |
| 2325 | - const activeKey = addData.replace(/[^\d]/g, '').trim(); | |
| 2525 | + const activeKey = addData.replace(/[^\d]/g, "").trim(); | |
| 2326 | 2526 | props.onTabChange(activeKey); |
| 2327 | - } else if (!tabNumList.some(item => props.currentTab === item.replace(/[^\d]/g, '').trim())) { | |
| 2328 | - const activeKey = tabNumList[0].replace(/[^\d]/g, '').trim(); | |
| 2527 | + } else if (!tabNumList.some(item => props.currentTab === item.replace(/[^\d]/g, "").trim())) { | |
| 2528 | + const activeKey = tabNumList[0].replace(/[^\d]/g, "").trim(); | |
| 2329 | 2529 | props.onTabChange(activeKey); |
| 2330 | 2530 | } |
| 2331 | 2531 | } |
| 2332 | 2532 | } |
| 2333 | 2533 | |
| 2334 | - if (!defaultTab && props.currentTab === '' && commonUtils.isNotEmptyArr(tabNumList)) { | |
| 2335 | - const activeKey = tabNumList[0].replace(/[^\d]/g, '').trim(); | |
| 2534 | + if (!defaultTab && props.currentTab === "" && commonUtils.isNotEmptyArr(tabNumList)) { | |
| 2535 | + const activeKey = tabNumList[0].replace(/[^\d]/g, "").trim(); | |
| 2336 | 2536 | props.onSetTabNumList(tabNumList); |
| 2337 | 2537 | props.onTabChange(activeKey); |
| 2338 | 2538 | } |
| ... | ... | @@ -2351,10 +2551,21 @@ const BillComponent = Form.create({ |
| 2351 | 2551 | let bControlSeparateTab9 = false; |
| 2352 | 2552 | let bControlSeparateTab10 = false; |
| 2353 | 2553 | |
| 2354 | - let separateTabName, separateTabName0, separateTabName1, separateTabName2, separateTabName3, separateTabName4, separateTabName5, separateTabName6, separateTabName7, separateTabName8, separateTabName9, separateTabName10; | |
| 2554 | + let separateTabName, | |
| 2555 | + separateTabName0, | |
| 2556 | + separateTabName1, | |
| 2557 | + separateTabName2, | |
| 2558 | + separateTabName3, | |
| 2559 | + separateTabName4, | |
| 2560 | + separateTabName5, | |
| 2561 | + separateTabName6, | |
| 2562 | + separateTabName7, | |
| 2563 | + separateTabName8, | |
| 2564 | + separateTabName9, | |
| 2565 | + separateTabName10; | |
| 2355 | 2566 | |
| 2356 | 2567 | if (commonUtils.isNotEmptyObject(slaveConfig) && commonUtils.isNotEmptyArr(slaveConfig.gdsconfigformslave)) { |
| 2357 | - const iIndex = slaveConfig.gdsconfigformslave.findIndex(item => item.sControlName === 'bControlSeparateTab'); | |
| 2568 | + const iIndex = slaveConfig.gdsconfigformslave.findIndex(item => item.sControlName === "bControlSeparateTab"); | |
| 2358 | 2569 | if (iIndex !== -1) { |
| 2359 | 2570 | const separateTabConfig = slaveConfig.gdsconfigformslave[iIndex]; |
| 2360 | 2571 | bControlSeparateTab = true; |
| ... | ... | @@ -2362,7 +2573,7 @@ const BillComponent = Form.create({ |
| 2362 | 2573 | } |
| 2363 | 2574 | } |
| 2364 | 2575 | if (commonUtils.isNotEmptyObject(slave0Config) && commonUtils.isNotEmptyArr(slave0Config.gdsconfigformslave)) { |
| 2365 | - const iIndex = slave0Config.gdsconfigformslave.findIndex(item => item.sControlName === 'bControlSeparateTab'); | |
| 2576 | + const iIndex = slave0Config.gdsconfigformslave.findIndex(item => item.sControlName === "bControlSeparateTab"); | |
| 2366 | 2577 | if (iIndex !== -1) { |
| 2367 | 2578 | const separateTabConfig = slave0Config.gdsconfigformslave[iIndex]; |
| 2368 | 2579 | bControlSeparateTab0 = true; |
| ... | ... | @@ -2370,7 +2581,7 @@ const BillComponent = Form.create({ |
| 2370 | 2581 | } |
| 2371 | 2582 | } |
| 2372 | 2583 | if (commonUtils.isNotEmptyObject(slave1Config) && commonUtils.isNotEmptyArr(slave1Config.gdsconfigformslave)) { |
| 2373 | - const iIndex = slave1Config.gdsconfigformslave.findIndex(item => item.sControlName === 'bControlSeparateTab'); | |
| 2584 | + const iIndex = slave1Config.gdsconfigformslave.findIndex(item => item.sControlName === "bControlSeparateTab"); | |
| 2374 | 2585 | if (iIndex !== -1) { |
| 2375 | 2586 | const separateTabConfig = slave1Config.gdsconfigformslave[iIndex]; |
| 2376 | 2587 | bControlSeparateTab1 = true; |
| ... | ... | @@ -2378,80 +2589,80 @@ const BillComponent = Form.create({ |
| 2378 | 2589 | } |
| 2379 | 2590 | } |
| 2380 | 2591 | if (commonUtils.isNotEmptyObject(slave2Config) && commonUtils.isNotEmptyArr(slave2Config.gdsconfigformslave)) { |
| 2381 | - const iIndex = slave2Config.gdsconfigformslave.findIndex(item => item.sControlName === 'bControlSeparateTab'); | |
| 2382 | - if (iIndex!== -1) { | |
| 2592 | + const iIndex = slave2Config.gdsconfigformslave.findIndex(item => item.sControlName === "bControlSeparateTab"); | |
| 2593 | + if (iIndex !== -1) { | |
| 2383 | 2594 | const separateTabConfig = slave2Config.gdsconfigformslave[iIndex]; |
| 2384 | 2595 | bControlSeparateTab2 = true; |
| 2385 | 2596 | separateTabName2 = separateTabConfig.showName; |
| 2386 | 2597 | } |
| 2387 | 2598 | } |
| 2388 | 2599 | if (commonUtils.isNotEmptyObject(slave3Config) && commonUtils.isNotEmptyArr(slave3Config.gdsconfigformslave)) { |
| 2389 | - const iIndex = slave3Config.gdsconfigformslave.findIndex(item => item.sControlName === 'bControlSeparateTab'); | |
| 2390 | - if (iIndex!== -1) { | |
| 2600 | + const iIndex = slave3Config.gdsconfigformslave.findIndex(item => item.sControlName === "bControlSeparateTab"); | |
| 2601 | + if (iIndex !== -1) { | |
| 2391 | 2602 | const separateTabConfig = slave3Config.gdsconfigformslave[iIndex]; |
| 2392 | 2603 | bControlSeparateTab3 = true; |
| 2393 | 2604 | separateTabName3 = separateTabConfig.showName; |
| 2394 | 2605 | } |
| 2395 | 2606 | } |
| 2396 | 2607 | if (commonUtils.isNotEmptyObject(slave4Config) && commonUtils.isNotEmptyArr(slave4Config.gdsconfigformslave)) { |
| 2397 | - const iIndex = slave4Config.gdsconfigformslave.findIndex(item => item.sControlName === 'bControlSeparateTab'); | |
| 2398 | - if (iIndex!== -1) { | |
| 2608 | + const iIndex = slave4Config.gdsconfigformslave.findIndex(item => item.sControlName === "bControlSeparateTab"); | |
| 2609 | + if (iIndex !== -1) { | |
| 2399 | 2610 | const separateTabConfig = slave4Config.gdsconfigformslave[iIndex]; |
| 2400 | 2611 | bControlSeparateTab4 = true; |
| 2401 | 2612 | separateTabName4 = separateTabConfig.showName; |
| 2402 | 2613 | } |
| 2403 | 2614 | } |
| 2404 | 2615 | if (commonUtils.isNotEmptyObject(slave5Config) && commonUtils.isNotEmptyArr(slave5Config.gdsconfigformslave)) { |
| 2405 | - const iIndex = slave5Config.gdsconfigformslave.findIndex(item => item.sControlName === 'bControlSeparateTab'); | |
| 2406 | - if (iIndex!== -1) { | |
| 2616 | + const iIndex = slave5Config.gdsconfigformslave.findIndex(item => item.sControlName === "bControlSeparateTab"); | |
| 2617 | + if (iIndex !== -1) { | |
| 2407 | 2618 | const separateTabConfig = slave5Config.gdsconfigformslave[iIndex]; |
| 2408 | 2619 | bControlSeparateTab5 = true; |
| 2409 | 2620 | separateTabName5 = separateTabConfig.showName; |
| 2410 | 2621 | } |
| 2411 | 2622 | } |
| 2412 | 2623 | if (commonUtils.isNotEmptyObject(slave6Config) && commonUtils.isNotEmptyArr(slave6Config.gdsconfigformslave)) { |
| 2413 | - const iIndex = slave6Config.gdsconfigformslave.findIndex(item => item.sControlName === 'bControlSeparateTab'); | |
| 2414 | - if (iIndex!== -1) { | |
| 2624 | + const iIndex = slave6Config.gdsconfigformslave.findIndex(item => item.sControlName === "bControlSeparateTab"); | |
| 2625 | + if (iIndex !== -1) { | |
| 2415 | 2626 | const separateTabConfig = slave6Config.gdsconfigformslave[iIndex]; |
| 2416 | 2627 | bControlSeparateTab6 = true; |
| 2417 | 2628 | separateTabName6 = separateTabConfig.showName; |
| 2418 | 2629 | } |
| 2419 | 2630 | } |
| 2420 | 2631 | if (commonUtils.isNotEmptyObject(slave7Config) && commonUtils.isNotEmptyArr(slave7Config.gdsconfigformslave)) { |
| 2421 | - const iIndex = slave7Config.gdsconfigformslave.findIndex(item => item.sControlName === 'bControlSeparateTab'); | |
| 2422 | - if (iIndex!== -1) { | |
| 2632 | + const iIndex = slave7Config.gdsconfigformslave.findIndex(item => item.sControlName === "bControlSeparateTab"); | |
| 2633 | + if (iIndex !== -1) { | |
| 2423 | 2634 | const separateTabConfig = slave7Config.gdsconfigformslave[iIndex]; |
| 2424 | 2635 | bControlSeparateTab7 = true; |
| 2425 | 2636 | separateTabName7 = separateTabConfig.showName; |
| 2426 | 2637 | } |
| 2427 | 2638 | } |
| 2428 | 2639 | if (commonUtils.isNotEmptyObject(slave8Config) && commonUtils.isNotEmptyArr(slave8Config.gdsconfigformslave)) { |
| 2429 | - const iIndex = slave8Config.gdsconfigformslave.findIndex(item => item.sControlName === 'bControlSeparateTab'); | |
| 2430 | - if (iIndex!== -1) { | |
| 2640 | + const iIndex = slave8Config.gdsconfigformslave.findIndex(item => item.sControlName === "bControlSeparateTab"); | |
| 2641 | + if (iIndex !== -1) { | |
| 2431 | 2642 | const separateTabConfig = slave8Config.gdsconfigformslave[iIndex]; |
| 2432 | 2643 | bControlSeparateTab8 = true; |
| 2433 | 2644 | separateTabName8 = separateTabConfig.showName; |
| 2434 | 2645 | } |
| 2435 | 2646 | } |
| 2436 | 2647 | if (commonUtils.isNotEmptyObject(slave9Config) && commonUtils.isNotEmptyArr(slave9Config.gdsconfigformslave)) { |
| 2437 | - const iIndex = slave9Config.gdsconfigformslave.findIndex(item => item.sControlName === 'bControlSeparateTab'); | |
| 2438 | - if (iIndex!== -1) { | |
| 2648 | + const iIndex = slave9Config.gdsconfigformslave.findIndex(item => item.sControlName === "bControlSeparateTab"); | |
| 2649 | + if (iIndex !== -1) { | |
| 2439 | 2650 | const separateTabConfig = slave9Config.gdsconfigformslave[iIndex]; |
| 2440 | 2651 | bControlSeparateTab9 = true; |
| 2441 | 2652 | separateTabName9 = separateTabConfig.showName; |
| 2442 | 2653 | } |
| 2443 | 2654 | } |
| 2444 | 2655 | if (commonUtils.isNotEmptyObject(slave10Config) && commonUtils.isNotEmptyArr(slave10Config.gdsconfigformslave)) { |
| 2445 | - const iIndex = slave10Config.gdsconfigformslave.findIndex(item => item.sControlName === 'bControlSeparateTab'); | |
| 2446 | - if (iIndex!== -1) { | |
| 2656 | + const iIndex = slave10Config.gdsconfigformslave.findIndex(item => item.sControlName === "bControlSeparateTab"); | |
| 2657 | + if (iIndex !== -1) { | |
| 2447 | 2658 | const separateTabConfig = slave10Config.gdsconfigformslave[iIndex]; |
| 2448 | 2659 | bControlSeparateTab10 = true; |
| 2449 | 2660 | separateTabName10 = separateTabConfig.showName; |
| 2450 | 2661 | } |
| 2451 | 2662 | } |
| 2452 | 2663 | |
| 2453 | - const flexRowStyle = bFlow ? {display:'flex', flexDirection:'row'} : {}; | |
| 2454 | - const flexContentStyle = bFlow ? { width:'75%'} : {}; | |
| 2664 | + const flexRowStyle = bFlow ? { display: "flex", flexDirection: "row" } : {}; | |
| 2665 | + const flexContentStyle = bFlow ? { width: "75%" } : {}; | |
| 2455 | 2666 | // 设置初始宽度 |
| 2456 | 2667 | const [containerWidth, setContainerWidth] = useState(410); |
| 2457 | 2668 | const containerRef = useRef(null); |
| ... | ... | @@ -2459,14 +2670,14 @@ const BillComponent = Form.create({ |
| 2459 | 2670 | const [isDragging, setIsDragging] = useState(false); |
| 2460 | 2671 | const [startX, setStartX] = useState(0); |
| 2461 | 2672 | const [initialWidth, setInitialWidth] = useState(0); |
| 2462 | - const handleMouseDown = (e) => { | |
| 2673 | + const handleMouseDown = e => { | |
| 2463 | 2674 | setIsDragging(true); |
| 2464 | 2675 | setStartX(e.clientX); |
| 2465 | 2676 | if (containerRef.current) { |
| 2466 | 2677 | setInitialWidth(containerRef.current.offsetWidth); |
| 2467 | 2678 | } |
| 2468 | 2679 | }; |
| 2469 | - const handleMouseMove = (e) => { | |
| 2680 | + const handleMouseMove = e => { | |
| 2470 | 2681 | if (!isDragging) return; |
| 2471 | 2682 | // 当前鼠标移动位置 |
| 2472 | 2683 | const currentX = e.clientX; |
| ... | ... | @@ -2482,16 +2693,16 @@ const BillComponent = Form.create({ |
| 2482 | 2693 | }; |
| 2483 | 2694 | const handleMouseUp = () => { |
| 2484 | 2695 | setIsDragging(false); |
| 2485 | - document.removeEventListener('mousemove', handleMouseMove); | |
| 2486 | - document.removeEventListener('mouseup', handleMouseUp); | |
| 2696 | + document.removeEventListener("mousemove", handleMouseMove); | |
| 2697 | + document.removeEventListener("mouseup", handleMouseUp); | |
| 2487 | 2698 | }; |
| 2488 | 2699 | |
| 2489 | 2700 | useEffect(() => { |
| 2490 | - document.addEventListener('mousemove', handleMouseMove); | |
| 2491 | - document.addEventListener('mouseup', handleMouseUp); | |
| 2701 | + document.addEventListener("mousemove", handleMouseMove); | |
| 2702 | + document.addEventListener("mouseup", handleMouseUp); | |
| 2492 | 2703 | return () => { |
| 2493 | - document.removeEventListener('mousemove', handleMouseMove); | |
| 2494 | - document.removeEventListener('mouseup', handleMouseUp); | |
| 2704 | + document.removeEventListener("mousemove", handleMouseMove); | |
| 2705 | + document.removeEventListener("mouseup", handleMouseUp); | |
| 2495 | 2706 | }; |
| 2496 | 2707 | }, [isDragging]); |
| 2497 | 2708 | return ( |
| ... | ... | @@ -2499,648 +2710,661 @@ const BillComponent = Form.create({ |
| 2499 | 2710 | <Layout> |
| 2500 | 2711 | <Header className={styles.header}> |
| 2501 | 2712 | <div className="billToolBar"> |
| 2502 | - <Toolbar {...props} className="billBtnGroup btnGroupHasImport" style={{ backgroundColor: '#646464', color: 'rgb(255,255,255)' }} pageFrom="billList" /> | |
| 2713 | + <Toolbar | |
| 2714 | + {...props} | |
| 2715 | + className="billBtnGroup btnGroupHasImport" | |
| 2716 | + style={{ backgroundColor: "#646464", color: "rgb(255,255,255)" }} | |
| 2717 | + pageFrom="billList" | |
| 2718 | + /> | |
| 2503 | 2719 | </div> |
| 2504 | - { commonUtils.isNotEmptyArr(ImportData) ? | |
| 2505 | - <div id="btnImportData" className={`importData ${props.enabled}`} > | |
| 2506 | - <Upload {...outProps}><UploadOutlined />{BtnimportData} | |
| 2720 | + {commonUtils.isNotEmptyArr(ImportData) ? ( | |
| 2721 | + <div id="btnImportData" className={`importData ${props.enabled}`}> | |
| 2722 | + <Upload {...outProps}> | |
| 2723 | + <UploadOutlined /> | |
| 2724 | + {BtnimportData} | |
| 2507 | 2725 | <Button {...uploadPropsSales} /> |
| 2508 | 2726 | </Upload> |
| 2509 | - </div> : ''} | |
| 2727 | + </div> | |
| 2728 | + ) : ( | |
| 2729 | + "" | |
| 2730 | + )} | |
| 2510 | 2731 | </Header> |
| 2511 | 2732 | |
| 2512 | 2733 | <Layout className={styles.clayout} style={flexRowStyle}> |
| 2513 | - <Content className={styles.content} style={flexContentStyle} > | |
| 2514 | - <div style={{ | |
| 2515 | - border: '1px solid #c2c3c5', | |
| 2516 | - margin: '0 8px', | |
| 2517 | - marginTop: 8, | |
| 2518 | - backgroundColor: '#fff', | |
| 2519 | - }} | |
| 2734 | + <Content className={styles.content} style={flexContentStyle}> | |
| 2735 | + <div | |
| 2736 | + style={{ | |
| 2737 | + border: "1px solid #c2c3c5", | |
| 2738 | + margin: "0 8px", | |
| 2739 | + marginTop: 8, | |
| 2740 | + backgroundColor: "#fff", | |
| 2741 | + }} | |
| 2520 | 2742 | > |
| 2521 | - <div className="bill-search-group" > | |
| 2743 | + <div className="bill-search-group"> | |
| 2522 | 2744 | <CommonView {...props} /> |
| 2523 | 2745 | </div> |
| 2524 | 2746 | </div> |
| 2525 | - { | |
| 2526 | - props.sModelsType === 'element/workcalendar' ? | |
| 2527 | - <div className={`${styles.bShow}`}> | |
| 2528 | - <div> | |
| 2529 | - <Avatar src={props.imgSrc} /> | |
| 2530 | - </div> | |
| 2531 | - <WorkCalendar {...props} /> | |
| 2532 | - </div> : | |
| 2533 | - <div id="slaveTabs" className={`${styles.bShow} commonNewBillContainer`} ref={(ref) => { _this.slaveTabsRef = ref; }}> | |
| 2534 | - <div> | |
| 2535 | - <Avatar src={props.imgSrc} /> | |
| 2536 | - </div> | |
| 2537 | - <Tabs activeKey={props.currentTab} onChange={props.onTabChange} className={styles.slaveTabs} tabBarStyle={{ margin: '0 8px' }} > | |
| 2538 | - { | |
| 2539 | - commonUtils.isNotEmptyArr(diliverConfigTypeArr1) ? | |
| 2540 | - diliverConfigTypeArr1.map((item) => { | |
| 2541 | - // 匹配数字 | |
| 2542 | - // eslint-disable-next-line no-unused-vars | |
| 2543 | - let num = item.replace(/[^\d]/g, '').trim(); | |
| 2544 | - let tabName = item.replace(/\d+/g,''); | |
| 2545 | - /* 从主表配置 找到控件名=tabName,否则取他的showName */ | |
| 2546 | - const tableConfigArr = masterConfig?.gdsconfigformslave.filter(row => row.sControlName === item.trim()); | |
| 2547 | - if(commonUtils.isNotEmptyArr(tableConfigArr)) { | |
| 2548 | - tabName=tableConfigArr[0].showName; | |
| 2549 | - } | |
| 2550 | - return ( | |
| 2551 | - <TabPane tab={tabName} key={num} className="xly-bill-list"> | |
| 2552 | - <div> | |
| 2553 | - <CommonView | |
| 2554 | - {...props} | |
| 2555 | - // 使高度和从表高度一直 | |
| 2556 | - // isAutoHeight="ture" | |
| 2557 | - tableConfigType={item} | |
| 2558 | - tableConfigTypeArr={diliverConfigTypeArr} | |
| 2747 | + {props.sModelsType === "element/workcalendar" ? ( | |
| 2748 | + <div className={`${styles.bShow}`}> | |
| 2749 | + <div> | |
| 2750 | + <Avatar src={props.imgSrc} /> | |
| 2751 | + </div> | |
| 2752 | + <WorkCalendar {...props} /> | |
| 2753 | + </div> | |
| 2754 | + ) : ( | |
| 2755 | + <div | |
| 2756 | + id="slaveTabs" | |
| 2757 | + className={`${styles.bShow} commonNewBillContainer`} | |
| 2758 | + ref={ref => { | |
| 2759 | + _this.slaveTabsRef = ref; | |
| 2760 | + }} | |
| 2761 | + > | |
| 2762 | + <div> | |
| 2763 | + <Avatar src={props.imgSrc} /> | |
| 2764 | + </div> | |
| 2765 | + <Tabs activeKey={props.currentTab} onChange={props.onTabChange} className={styles.slaveTabs} tabBarStyle={{ margin: "0 8px" }}> | |
| 2766 | + {commonUtils.isNotEmptyArr(diliverConfigTypeArr1) | |
| 2767 | + ? diliverConfigTypeArr1.map(item => { | |
| 2768 | + // 匹配数字 | |
| 2769 | + // eslint-disable-next-line no-unused-vars | |
| 2770 | + let num = item.replace(/[^\d]/g, "").trim(); | |
| 2771 | + let tabName = item.replace(/\d+/g, ""); | |
| 2772 | + /* 从主表配置 找到控件名=tabName,否则取他的showName */ | |
| 2773 | + const tableConfigArr = masterConfig?.gdsconfigformslave.filter(row => row.sControlName === item.trim()); | |
| 2774 | + if (commonUtils.isNotEmptyArr(tableConfigArr)) { | |
| 2775 | + tabName = tableConfigArr[0].showName; | |
| 2776 | + } | |
| 2777 | + return ( | |
| 2778 | + <TabPane tab={tabName} key={num} className="xly-bill-list"> | |
| 2779 | + <div> | |
| 2780 | + <CommonView | |
| 2781 | + {...props} | |
| 2782 | + // 使高度和从表高度一直 | |
| 2783 | + // isAutoHeight="ture" | |
| 2784 | + tableConfigType={item} | |
| 2785 | + tableConfigTypeArr={diliverConfigTypeArr} | |
| 2786 | + /> | |
| 2787 | + </div> | |
| 2788 | + </TabPane> | |
| 2789 | + ); | |
| 2790 | + }) | |
| 2791 | + : ""} | |
| 2792 | + {onlySlave ? ( | |
| 2793 | + <> | |
| 2794 | + <TabPane tab={slaveInfo} className="xly-bill-list" key={10}> | |
| 2795 | + <div className="TabPaneStyle"> | |
| 2796 | + {app.currentPane.title !== "功能模块界面设置单据" ? ( | |
| 2797 | + <Row gutter={[8, 0]}> | |
| 2798 | + <Col span={showAll ? 24 : iColValueTable} order={iShowOrder}> | |
| 2799 | + <StaticEditTable | |
| 2800 | + {...slaveTableProps} | |
| 2801 | + noVlist | |
| 2802 | + setOpterationColumn={props.sModelsType !== "cost/cosexpenseshare" && sModelsType !== listType && !bCheck ? "Y" : ""} | |
| 2559 | 2803 | /> |
| 2560 | - </div> | |
| 2561 | - </TabPane> | |
| 2562 | - ); | |
| 2563 | - }) | |
| 2564 | - : '' | |
| 2565 | - } | |
| 2566 | - { | |
| 2567 | - onlySlave ? | |
| 2568 | - ( | |
| 2569 | - <> | |
| 2570 | - <TabPane tab={slaveInfo} className="xly-bill-list" key={10}> | |
| 2571 | - <div className="TabPaneStyle"> | |
| 2572 | - { | |
| 2573 | - app.currentPane.title !== '功能模块界面设置单据' ? | |
| 2574 | - <Row gutter={[8, 0]}> | |
| 2575 | - <Col span={showAll ? 24 : iColValueTable} order={iShowOrder}> | |
| 2576 | - <StaticEditTable {...slaveTableProps} noVlist setOpterationColumn={props.sModelsType !== 'cost/cosexpenseshare' && sModelsType!== listType && !bCheck ? 'Y' : ''} /> | |
| 2577 | - </Col> | |
| 2578 | - {!bControlSeparateTab && <CommonViewTable {...slaveViewProps} /> } | |
| 2579 | - </Row> : | |
| 2580 | - <div className="SetModelTable" > | |
| 2581 | - <div style={{ | |
| 2582 | - width: `${containerWidth}px`, | |
| 2583 | - marginRight: '10px', | |
| 2584 | - borderRight: '1px solid #e8e8e8', | |
| 2585 | - paddingRight: '4px', | |
| 2586 | - position: 'relative', | |
| 2587 | - maxWidth: '100%', | |
| 2588 | - }} | |
| 2589 | - ref={containerRef} | |
| 2590 | - > | |
| 2591 | - <div | |
| 2592 | - ref={dividerRef} | |
| 2593 | - style={{ | |
| 2594 | - position: 'absolute', | |
| 2595 | - right: '-5px', | |
| 2596 | - top: '0', | |
| 2597 | - bottom: '0', | |
| 2598 | - width: '10px', | |
| 2599 | - cursor: 'col-resize', | |
| 2600 | - background: 'linear-gradient(to right, transparent, #e8e8e8, transparent)', | |
| 2601 | - }} | |
| 2602 | - onMouseDown={handleMouseDown} | |
| 2603 | - /> | |
| 2604 | - <StaticEditTable {...slaveTableProps} noVlist setOpterationColumn={props.sModelsType !== 'cost/cosexpenseshare' && sModelsType!== listType && !bCheck ? 'Y' : ''} /> | |
| 2605 | - </div> | |
| 2606 | - {!bControlSeparateTab && <CommonViewTable {...slaveViewProps} style={{flex:1}}/> } | |
| 2607 | - </div> | |
| 2608 | - } | |
| 2609 | - </div> | |
| 2610 | - </TabPane> | |
| 2611 | - {bControlSeparateTab && ( | |
| 2612 | - <TabPane tab={separateTabName} className="xly-bill-list" key={11}> | |
| 2613 | - <CommonViewTable {...slaveViewProps} iColValueView={24} /> | |
| 2614 | - </TabPane> | |
| 2615 | - )} | |
| 2616 | - </> | |
| 2617 | - ) : '' | |
| 2618 | - } | |
| 2619 | - { | |
| 2620 | - commonUtils.isNotEmptyArr(diliverConfigTypeArr2) ? | |
| 2621 | - diliverConfigTypeArr2.map((item) => { | |
| 2622 | - // 匹配数字 | |
| 2623 | - // eslint-disable-next-line no-unused-vars | |
| 2624 | - let num = item.replace(/[^\d]/g, '').trim(); | |
| 2625 | - let tabName = item.replace(/\d+/g,''); | |
| 2626 | - /* 从主表配置 找到控件名=tabName,否则取他的showName */ | |
| 2627 | - const tableConfigArr = masterConfig?.gdsconfigformslave.filter(row => row.sControlName === item.trim()); | |
| 2628 | - if(commonUtils.isNotEmptyArr(tableConfigArr)) { | |
| 2629 | - tabName =tableConfigArr[0].showName; | |
| 2630 | - } | |
| 2631 | - return ( | |
| 2632 | - <TabPane tab={tabName} key={num} className="xly-bill-list"> | |
| 2633 | - <div> | |
| 2634 | - <CommonView | |
| 2635 | - {...props} | |
| 2636 | - // 使高度和从表高度一直 | |
| 2637 | - // isAutoHeight="ture" | |
| 2638 | - tableConfigType={item} | |
| 2639 | - tableConfigTypeArr={diliverConfigTypeArr2} | |
| 2804 | + </Col> | |
| 2805 | + {!bControlSeparateTab && <CommonViewTable {...slaveViewProps} />} | |
| 2806 | + </Row> | |
| 2807 | + ) : ( | |
| 2808 | + <div className="SetModelTable"> | |
| 2809 | + <div | |
| 2810 | + style={{ | |
| 2811 | + width: `${containerWidth}px`, | |
| 2812 | + marginRight: "10px", | |
| 2813 | + borderRight: "1px solid #e8e8e8", | |
| 2814 | + paddingRight: "4px", | |
| 2815 | + position: "relative", | |
| 2816 | + maxWidth: "100%", | |
| 2817 | + }} | |
| 2818 | + ref={containerRef} | |
| 2819 | + > | |
| 2820 | + <div | |
| 2821 | + ref={dividerRef} | |
| 2822 | + style={{ | |
| 2823 | + position: "absolute", | |
| 2824 | + right: "-5px", | |
| 2825 | + top: "0", | |
| 2826 | + bottom: "0", | |
| 2827 | + width: "10px", | |
| 2828 | + cursor: "col-resize", | |
| 2829 | + background: "linear-gradient(to right, transparent, #e8e8e8, transparent)", | |
| 2830 | + }} | |
| 2831 | + onMouseDown={handleMouseDown} | |
| 2832 | + /> | |
| 2833 | + <StaticEditTable | |
| 2834 | + {...slaveTableProps} | |
| 2835 | + noVlist | |
| 2836 | + setOpterationColumn={props.sModelsType !== "cost/cosexpenseshare" && sModelsType !== listType && !bCheck ? "Y" : ""} | |
| 2640 | 2837 | /> |
| 2641 | 2838 | </div> |
| 2642 | - </TabPane> | |
| 2643 | - ); | |
| 2644 | - }) | |
| 2645 | - : '' | |
| 2646 | - } | |
| 2647 | - { | |
| 2648 | - onlySlave0 ? | |
| 2649 | - ( | |
| 2650 | - <> | |
| 2651 | - <TabPane tab={materialsInfo} className="xly-bill-list" key={20}> | |
| 2652 | - <div className="TabPaneStyle"> | |
| 2653 | - { | |
| 2654 | - app.currentPane.title !== '功能模块界面设置单据' ? | |
| 2655 | - <Row gutter={[8, 0]}> | |
| 2656 | - <Col span={showAll0 ? 24 : iColValueTable0} order={iShowOrder0}> | |
| 2657 | - <StaticEditTable {...slave0TableProps} noVlist setOpterationColumn={ sModelsType!== listType && !bCheck0 ? 'Y' : ''} /> | |
| 2658 | - </Col> | |
| 2659 | - {!bControlSeparateTab0 &&<CommonViewTable {...slave0ViewProps} />} | |
| 2660 | - {getChildTableComponent(props, 'slave0')} | |
| 2661 | - </Row> : | |
| 2662 | - <div className="SetModelTable" > | |
| 2663 | - <div style={{ | |
| 2664 | - width: `${containerWidth}px`, | |
| 2665 | - marginRight: '10px', | |
| 2666 | - borderRight: '1px solid #e8e8e8', | |
| 2667 | - paddingRight: '4px', | |
| 2668 | - position: 'relative', | |
| 2669 | - maxWidth: '100%', | |
| 2670 | - }} | |
| 2671 | - ref={containerRef} | |
| 2672 | - > | |
| 2673 | - <div | |
| 2674 | - ref={dividerRef} | |
| 2675 | - style={{ | |
| 2676 | - position: 'absolute', | |
| 2677 | - right: '-5px', | |
| 2678 | - top: '0', | |
| 2679 | - bottom: '0', | |
| 2680 | - width: '10px', | |
| 2681 | - cursor: 'col-resize', | |
| 2682 | - background: 'linear-gradient(to right, transparent, #e8e8e8, transparent)', | |
| 2683 | - }} | |
| 2684 | - onMouseDown={handleMouseDown} | |
| 2685 | - /> | |
| 2686 | - <StaticEditTable {...slave0TableProps} noVlist setOpterationColumn={ sModelsType!== listType && !bCheck0 ? 'Y' : ''} /> | |
| 2687 | - </div> | |
| 2688 | - {!bControlSeparateTab0 && <CommonViewTable {...slave0ViewProps} style={{flex:1}}/> } | |
| 2689 | - </div> | |
| 2690 | - } | |
| 2691 | - </div> | |
| 2692 | - </TabPane> | |
| 2693 | - {bControlSeparateTab0 && ( | |
| 2694 | - <TabPane tab={separateTabName0} className="xly-bill-list" key={21}> | |
| 2695 | - <CommonViewTable {...slave0ViewProps} iColValueView={24} /> | |
| 2696 | - </TabPane> | |
| 2697 | - )} | |
| 2698 | - </> | |
| 2699 | - ) : '' | |
| 2700 | - } | |
| 2701 | - { | |
| 2702 | - commonUtils.isNotEmptyArr(diliverConfigTypeArr3) ? | |
| 2703 | - diliverConfigTypeArr3.map((item) => { | |
| 2704 | - // 匹配数字 | |
| 2705 | - // eslint-disable-next-line no-unused-vars | |
| 2706 | - let num = item.replace(/[^\d]/g, '').trim(); | |
| 2707 | - let tabName = item.replace(/\d+/g,''); | |
| 2708 | - /* 从主表配置 找到控件名=tabName,否则取他的showName */ | |
| 2709 | - const tableConfigArr = masterConfig?.gdsconfigformslave.filter(row => row.sControlName === item.trim()); | |
| 2710 | - if(commonUtils.isNotEmptyArr(tableConfigArr)) { | |
| 2711 | - tabName =tableConfigArr[0].showName; | |
| 2712 | - } | |
| 2713 | - return ( | |
| 2714 | - <TabPane tab={tabName} key={num} className="xly-bill-list"> | |
| 2715 | - <div> | |
| 2716 | - <CommonView | |
| 2717 | - {...props} | |
| 2718 | - // 使高度和从表高度一直 | |
| 2719 | - // isAutoHeight="ture" | |
| 2720 | - tableConfigType={item} | |
| 2721 | - tableConfigTypeArr={diliverConfigTypeArr3} | |
| 2839 | + {!bControlSeparateTab && <CommonViewTable {...slaveViewProps} style={{ flex: 1 }} />} | |
| 2840 | + </div> | |
| 2841 | + )} | |
| 2842 | + </div> | |
| 2843 | + </TabPane> | |
| 2844 | + {bControlSeparateTab && ( | |
| 2845 | + <TabPane tab={separateTabName} className="xly-bill-list" key={11}> | |
| 2846 | + <CommonViewTable {...slaveViewProps} iColValueView={24} /> | |
| 2847 | + </TabPane> | |
| 2848 | + )} | |
| 2849 | + </> | |
| 2850 | + ) : ( | |
| 2851 | + "" | |
| 2852 | + )} | |
| 2853 | + {commonUtils.isNotEmptyArr(diliverConfigTypeArr2) | |
| 2854 | + ? diliverConfigTypeArr2.map(item => { | |
| 2855 | + // 匹配数字 | |
| 2856 | + // eslint-disable-next-line no-unused-vars | |
| 2857 | + let num = item.replace(/[^\d]/g, "").trim(); | |
| 2858 | + let tabName = item.replace(/\d+/g, ""); | |
| 2859 | + /* 从主表配置 找到控件名=tabName,否则取他的showName */ | |
| 2860 | + const tableConfigArr = masterConfig?.gdsconfigformslave.filter(row => row.sControlName === item.trim()); | |
| 2861 | + if (commonUtils.isNotEmptyArr(tableConfigArr)) { | |
| 2862 | + tabName = tableConfigArr[0].showName; | |
| 2863 | + } | |
| 2864 | + return ( | |
| 2865 | + <TabPane tab={tabName} key={num} className="xly-bill-list"> | |
| 2866 | + <div> | |
| 2867 | + <CommonView | |
| 2868 | + {...props} | |
| 2869 | + // 使高度和从表高度一直 | |
| 2870 | + // isAutoHeight="ture" | |
| 2871 | + tableConfigType={item} | |
| 2872 | + tableConfigTypeArr={diliverConfigTypeArr2} | |
| 2873 | + /> | |
| 2874 | + </div> | |
| 2875 | + </TabPane> | |
| 2876 | + ); | |
| 2877 | + }) | |
| 2878 | + : ""} | |
| 2879 | + {onlySlave0 ? ( | |
| 2880 | + <> | |
| 2881 | + <TabPane tab={materialsInfo} className="xly-bill-list" key={20}> | |
| 2882 | + <div className="TabPaneStyle"> | |
| 2883 | + {app.currentPane.title !== "功能模块界面设置单据" ? ( | |
| 2884 | + <Row gutter={[8, 0]}> | |
| 2885 | + <Col span={showAll0 ? 24 : iColValueTable0} order={iShowOrder0}> | |
| 2886 | + <StaticEditTable | |
| 2887 | + {...slave0TableProps} | |
| 2888 | + noVlist | |
| 2889 | + setOpterationColumn={sModelsType !== listType && !bCheck0 ? "Y" : ""} | |
| 2890 | + /> | |
| 2891 | + </Col> | |
| 2892 | + {!bControlSeparateTab0 && <CommonViewTable {...slave0ViewProps} />} | |
| 2893 | + {getChildTableComponent(props, "slave0")} | |
| 2894 | + </Row> | |
| 2895 | + ) : ( | |
| 2896 | + <div className="SetModelTable"> | |
| 2897 | + <div | |
| 2898 | + style={{ | |
| 2899 | + width: `${containerWidth}px`, | |
| 2900 | + marginRight: "10px", | |
| 2901 | + borderRight: "1px solid #e8e8e8", | |
| 2902 | + paddingRight: "4px", | |
| 2903 | + position: "relative", | |
| 2904 | + maxWidth: "100%", | |
| 2905 | + }} | |
| 2906 | + ref={containerRef} | |
| 2907 | + > | |
| 2908 | + <div | |
| 2909 | + ref={dividerRef} | |
| 2910 | + style={{ | |
| 2911 | + position: "absolute", | |
| 2912 | + right: "-5px", | |
| 2913 | + top: "0", | |
| 2914 | + bottom: "0", | |
| 2915 | + width: "10px", | |
| 2916 | + cursor: "col-resize", | |
| 2917 | + background: "linear-gradient(to right, transparent, #e8e8e8, transparent)", | |
| 2918 | + }} | |
| 2919 | + onMouseDown={handleMouseDown} | |
| 2920 | + /> | |
| 2921 | + <StaticEditTable | |
| 2922 | + {...slave0TableProps} | |
| 2923 | + noVlist | |
| 2924 | + setOpterationColumn={sModelsType !== listType && !bCheck0 ? "Y" : ""} | |
| 2722 | 2925 | /> |
| 2723 | 2926 | </div> |
| 2724 | - </TabPane> | |
| 2725 | - ); | |
| 2726 | - }) | |
| 2727 | - : '' | |
| 2728 | - } | |
| 2729 | - { | |
| 2730 | - onlySlave1 ? | |
| 2731 | - ( | |
| 2732 | - <> | |
| 2733 | - <TabPane tab={checkInfo} className="xly-bill-list" key={30} > | |
| 2734 | - <div className="TabPaneStyle"> | |
| 2735 | - | |
| 2736 | - { | |
| 2737 | - props.app.currentPane.title !== '功能模块界面设置单据' ? | |
| 2738 | - <div> | |
| 2739 | - | |
| 2740 | - <Row gutter={[8, 0]}> | |
| 2741 | - <Col span={showAll1 ? 24 : iColValueTable1} order={iShowOrder1}> | |
| 2742 | - <StaticEditTable {...slave1TableProps} noVlist setOpterationColumn={ sModelsType!==listType && !bCheck1 ? 'Y' : ''} /> | |
| 2743 | - </Col> | |
| 2744 | - {!bControlSeparateTab1 && <CommonViewTable {...slave1ViewProps} />} | |
| 2745 | - {getChildTableComponent(props, 'slave1')} | |
| 2746 | - </Row> | |
| 2747 | - {/* <Row gutter={[8, 0]}> | |
| 2927 | + {!bControlSeparateTab0 && <CommonViewTable {...slave0ViewProps} style={{ flex: 1 }} />} | |
| 2928 | + </div> | |
| 2929 | + )} | |
| 2930 | + </div> | |
| 2931 | + </TabPane> | |
| 2932 | + {bControlSeparateTab0 && ( | |
| 2933 | + <TabPane tab={separateTabName0} className="xly-bill-list" key={21}> | |
| 2934 | + <CommonViewTable {...slave0ViewProps} iColValueView={24} /> | |
| 2935 | + </TabPane> | |
| 2936 | + )} | |
| 2937 | + </> | |
| 2938 | + ) : ( | |
| 2939 | + "" | |
| 2940 | + )} | |
| 2941 | + {commonUtils.isNotEmptyArr(diliverConfigTypeArr3) | |
| 2942 | + ? diliverConfigTypeArr3.map(item => { | |
| 2943 | + // 匹配数字 | |
| 2944 | + // eslint-disable-next-line no-unused-vars | |
| 2945 | + let num = item.replace(/[^\d]/g, "").trim(); | |
| 2946 | + let tabName = item.replace(/\d+/g, ""); | |
| 2947 | + /* 从主表配置 找到控件名=tabName,否则取他的showName */ | |
| 2948 | + const tableConfigArr = masterConfig?.gdsconfigformslave.filter(row => row.sControlName === item.trim()); | |
| 2949 | + if (commonUtils.isNotEmptyArr(tableConfigArr)) { | |
| 2950 | + tabName = tableConfigArr[0].showName; | |
| 2951 | + } | |
| 2952 | + return ( | |
| 2953 | + <TabPane tab={tabName} key={num} className="xly-bill-list"> | |
| 2954 | + <div> | |
| 2955 | + <CommonView | |
| 2956 | + {...props} | |
| 2957 | + // 使高度和从表高度一直 | |
| 2958 | + // isAutoHeight="ture" | |
| 2959 | + tableConfigType={item} | |
| 2960 | + tableConfigTypeArr={diliverConfigTypeArr3} | |
| 2961 | + /> | |
| 2962 | + </div> | |
| 2963 | + </TabPane> | |
| 2964 | + ); | |
| 2965 | + }) | |
| 2966 | + : ""} | |
| 2967 | + {onlySlave1 ? ( | |
| 2968 | + <> | |
| 2969 | + <TabPane tab={checkInfo} className="xly-bill-list" key={30}> | |
| 2970 | + <div className="TabPaneStyle"> | |
| 2971 | + {props.app.currentPane.title !== "功能模块界面设置单据" ? ( | |
| 2972 | + <div> | |
| 2973 | + <Row gutter={[8, 0]}> | |
| 2974 | + <Col span={showAll1 ? 24 : iColValueTable1} order={iShowOrder1}> | |
| 2975 | + <StaticEditTable | |
| 2976 | + {...slave1TableProps} | |
| 2977 | + noVlist | |
| 2978 | + setOpterationColumn={sModelsType !== listType && !bCheck1 ? "Y" : ""} | |
| 2979 | + /> | |
| 2980 | + </Col> | |
| 2981 | + {!bControlSeparateTab1 && <CommonViewTable {...slave1ViewProps} />} | |
| 2982 | + {getChildTableComponent(props, "slave1")} | |
| 2983 | + </Row> | |
| 2984 | + {/* <Row gutter={[8, 0]}> | |
| 2748 | 2985 | {slave2Config && slave2Config.sChinese === '上批对比' && <CommonViewTable {...slave2ViewProps} />} |
| 2749 | 2986 | </Row> */} |
| 2750 | - </div> | |
| 2751 | - : | |
| 2752 | - <div className="SetModelTable" > | |
| 2753 | - <div style={{ | |
| 2754 | - width: `${containerWidth}px`, | |
| 2755 | - marginRight: '10px', | |
| 2756 | - borderRight: '1px solid #e8e8e8', | |
| 2757 | - paddingRight: '4px', | |
| 2758 | - position: 'relative', | |
| 2759 | - maxWidth: '100%', | |
| 2760 | - }} | |
| 2761 | - ref={containerRef} | |
| 2762 | - > | |
| 2763 | - <div | |
| 2764 | - ref={dividerRef} | |
| 2765 | - style={{ | |
| 2766 | - position: 'absolute', | |
| 2767 | - right: '-5px', | |
| 2768 | - top: '0', | |
| 2769 | - bottom: '0', | |
| 2770 | - width: '10px', | |
| 2771 | - cursor: 'col-resize', | |
| 2772 | - background: 'linear-gradient(to right, transparent, #e8e8e8, transparent)', | |
| 2773 | - }} | |
| 2774 | - onMouseDown={handleMouseDown} | |
| 2775 | - /> | |
| 2776 | - <StaticEditTable {...slave1TableProps} noVlist setOpterationColumn={ sModelsType!== listType && !bCheck0 ? 'Y' : ''} /> | |
| 2777 | - </div> | |
| 2778 | - {!bControlSeparateTab1 && <CommonViewTable {...slave1ViewProps} style={{flex:1}}/> } | |
| 2779 | - </div> | |
| 2780 | - } | |
| 2781 | - </div> | |
| 2782 | - </TabPane> | |
| 2783 | - {bControlSeparateTab1 && ( | |
| 2784 | - <TabPane tab={separateTabName1} className="xly-bill-list" key={31}> | |
| 2785 | - <CommonViewTable {...slave1ViewProps} iColValueView={24} /> | |
| 2786 | - </TabPane> | |
| 2787 | - )} | |
| 2788 | - </> | |
| 2789 | - ) : '' | |
| 2790 | - } | |
| 2791 | - { | |
| 2792 | - commonUtils.isNotEmptyArr(diliverConfigTypeArr4) ? | |
| 2793 | - diliverConfigTypeArr4.map((item) => { | |
| 2794 | - // 匹配数字 | |
| 2795 | - // eslint-disable-next-line no-unused-vars | |
| 2796 | - let num = item.replace(/[^\d]/g, '').trim(); | |
| 2797 | - let tabName = item.replace(/\d+/g,''); | |
| 2798 | - /* 从主表配置 找到控件名=tabName,否则取他的showName */ | |
| 2799 | - const tableConfigArr = masterConfig?.gdsconfigformslave.filter(row => row.sControlName === item.trim()); | |
| 2800 | - if(commonUtils.isNotEmptyArr(tableConfigArr)) { | |
| 2801 | - tabName =tableConfigArr[0].showName; | |
| 2802 | - } | |
| 2803 | - return ( | |
| 2804 | - <TabPane tab={tabName} key={num} className="xly-bill-list"> | |
| 2805 | - <div> | |
| 2806 | - <CommonView | |
| 2807 | - {...props} | |
| 2808 | - // 使高度和从表高度一直 | |
| 2809 | - // isAutoHeight="ture" | |
| 2810 | - tableConfigType={item} | |
| 2811 | - tableConfigTypeArr={diliverConfigTypeArr4} | |
| 2987 | + </div> | |
| 2988 | + ) : ( | |
| 2989 | + <div className="SetModelTable"> | |
| 2990 | + <div | |
| 2991 | + style={{ | |
| 2992 | + width: `${containerWidth}px`, | |
| 2993 | + marginRight: "10px", | |
| 2994 | + borderRight: "1px solid #e8e8e8", | |
| 2995 | + paddingRight: "4px", | |
| 2996 | + position: "relative", | |
| 2997 | + maxWidth: "100%", | |
| 2998 | + }} | |
| 2999 | + ref={containerRef} | |
| 3000 | + > | |
| 3001 | + <div | |
| 3002 | + ref={dividerRef} | |
| 3003 | + style={{ | |
| 3004 | + position: "absolute", | |
| 3005 | + right: "-5px", | |
| 3006 | + top: "0", | |
| 3007 | + bottom: "0", | |
| 3008 | + width: "10px", | |
| 3009 | + cursor: "col-resize", | |
| 3010 | + background: "linear-gradient(to right, transparent, #e8e8e8, transparent)", | |
| 3011 | + }} | |
| 3012 | + onMouseDown={handleMouseDown} | |
| 2812 | 3013 | /> |
| 2813 | - </div> | |
| 2814 | - </TabPane> | |
| 2815 | - ); | |
| 2816 | - }) | |
| 2817 | - : '' | |
| 2818 | - } | |
| 2819 | - { | |
| 2820 | - onlyslave2 ? | |
| 2821 | - ( | |
| 2822 | - <> | |
| 2823 | - <TabPane tab={slaveInfo0} className="xly-bill-list" key={40} > | |
| 2824 | - <div className="TabPaneStyle"> | |
| 2825 | - <Row gutter={[8, 0]}> | |
| 2826 | - <Col span={showAll2 ? 24 : iColValueTable2} order={iShowOrder2}> | |
| 2827 | - <StaticEditTable {...slave2TableProps} noVlist setOpterationColumn={ sModelsType!== listType && !bCheck2 ? 'Y' : ''} /> | |
| 2828 | - </Col> | |
| 2829 | - {!bControlSeparateTab2 && <CommonViewTable {...slave2ViewProps} />} | |
| 2830 | - {getChildTableComponent(props, 'slave2')} | |
| 2831 | - </Row> | |
| 2832 | - </div> | |
| 2833 | - </TabPane> | |
| 2834 | - {bControlSeparateTab2 && ( | |
| 2835 | - <TabPane tab={separateTabName2} className="xly-bill-list" key={41}> | |
| 2836 | - <CommonViewTable {...slave2ViewProps} iColValueView={24} /> | |
| 2837 | - </TabPane> | |
| 2838 | - )} | |
| 2839 | - </> | |
| 2840 | - ) : '' | |
| 2841 | - } | |
| 2842 | - { | |
| 2843 | - commonUtils.isNotEmptyArr(diliverConfigTypeArr5) ? | |
| 2844 | - diliverConfigTypeArr5.map((item) => { | |
| 2845 | - // 匹配数字 | |
| 2846 | - // eslint-disable-next-line no-unused-vars | |
| 2847 | - let num = item.replace(/[^\d]/g, '').trim(); | |
| 2848 | - let tabName = item.replace(/\d+/g,''); | |
| 2849 | - /* 从主表配置 找到控件名=tabName,否则取他的showName */ | |
| 2850 | - const tableConfigArr = masterConfig?.gdsconfigformslave.filter(row => row.sControlName === item.trim()); | |
| 2851 | - if(commonUtils.isNotEmptyArr(tableConfigArr)) { | |
| 2852 | - tabName =tableConfigArr[0].showName; | |
| 2853 | - } | |
| 2854 | - return ( | |
| 2855 | - <TabPane tab={tabName} key={num} className="xly-bill-list"> | |
| 2856 | - <div> | |
| 2857 | - <CommonView | |
| 2858 | - {...props} | |
| 2859 | - // 使高度和从表高度一直 | |
| 2860 | - // isAutoHeight="ture" | |
| 2861 | - tableConfigType={item} | |
| 2862 | - tableConfigTypeArr={diliverConfigTypeArr5} | |
| 3014 | + <StaticEditTable | |
| 3015 | + {...slave1TableProps} | |
| 3016 | + noVlist | |
| 3017 | + setOpterationColumn={sModelsType !== listType && !bCheck0 ? "Y" : ""} | |
| 2863 | 3018 | /> |
| 2864 | 3019 | </div> |
| 2865 | - </TabPane> | |
| 2866 | - ); | |
| 2867 | - }) | |
| 2868 | - : '' | |
| 2869 | - } | |
| 2870 | - { | |
| 2871 | - onlyslave3 ? | |
| 2872 | - ( | |
| 2873 | - <> | |
| 2874 | - <TabPane tab={slaveInfo1} className="xly-bill-list" key={50} > | |
| 2875 | - <div className="TabPaneStyle"> | |
| 2876 | - <Row gutter={[8, 0]}> | |
| 2877 | - <Col span={showAll3 ? 24 : iColValueTable3} order={iShowOrder3}> | |
| 2878 | - <StaticEditTable {...slave3TableProps} noVlist setOpterationColumn={ sModelsType!== listType ? 'Y' : ''} /> | |
| 2879 | - </Col> | |
| 2880 | - {!bControlSeparateTab3 && <CommonViewTable {...slave3ViewProps} />} | |
| 2881 | - {getChildTableComponent(props, 'slave3')} | |
| 2882 | - </Row> | |
| 2883 | - </div> | |
| 2884 | - </TabPane> | |
| 2885 | - {bControlSeparateTab3 && ( | |
| 2886 | - <TabPane tab={separateTabName3} className="xly-bill-list" key={51}> | |
| 2887 | - <CommonViewTable {...slave3ViewProps} iColValueView={24} /> | |
| 2888 | - </TabPane> | |
| 2889 | - )} | |
| 2890 | - </> | |
| 2891 | - ) : '' | |
| 2892 | - } | |
| 2893 | - { | |
| 2894 | - commonUtils.isNotEmptyArr(diliverConfigTypeArr6) ? | |
| 2895 | - diliverConfigTypeArr6.map((item) => { | |
| 2896 | - // 匹配数字 | |
| 2897 | - // eslint-disable-next-line no-unused-vars | |
| 2898 | - let num = item.replace(/[^\d]/g, '').trim(); | |
| 2899 | - let tabName = item.replace(/\d+/g,''); | |
| 2900 | - /* 从主表配置 找到控件名=tabName,否则取他的showName */ | |
| 2901 | - const tableConfigArr = masterConfig?.gdsconfigformslave.filter(row => row.sControlName === item.trim()); | |
| 2902 | - if(commonUtils.isNotEmptyArr(tableConfigArr)) { | |
| 2903 | - tabName = tableConfigArr[0].showName; | |
| 2904 | - } | |
| 2905 | - return ( | |
| 2906 | - <TabPane tab={tabName} key={num} className="xly-bill-list"> | |
| 2907 | - <div> | |
| 2908 | - <CommonView | |
| 2909 | - {...props} | |
| 2910 | - // 使高度和从表高度一直 | |
| 2911 | - // isAutoHeight="ture" | |
| 2912 | - tableConfigType={item} | |
| 2913 | - tableConfigTypeArr={diliverConfigTypeArr6} | |
| 2914 | - /> | |
| 2915 | - </div> | |
| 2916 | - </TabPane> | |
| 2917 | - ); | |
| 2918 | - }) | |
| 2919 | - : '' | |
| 2920 | - } | |
| 2921 | - { | |
| 2922 | - onlyslave4 ? | |
| 2923 | - ( | |
| 2924 | - <> | |
| 2925 | - <TabPane tab={slaveInfo2} className="xly-bill-list" key={60} > | |
| 2926 | - <div className="TabPaneStyle"> | |
| 2927 | - <Row gutter={[8, 0]}> | |
| 2928 | - <Col span={showAll4 ? 24 : iColValueTable4} order={iShowOrder4}> | |
| 2929 | - <StaticEditTable {...slave4TableProps} setOpterationColumn={ sModelsType!== listType ? 'Y' : ''} /> | |
| 2930 | - </Col> | |
| 2931 | - {!bControlSeparateTab4 && <CommonViewTable {...slave4ViewProps} />} | |
| 2932 | - {getChildTableComponent(props, 'slave4')} | |
| 2933 | - </Row> | |
| 2934 | - </div> | |
| 2935 | - </TabPane> | |
| 2936 | - {bControlSeparateTab4 && ( | |
| 2937 | - <TabPane tab={separateTabName4} className="xly-bill-list" key={61}> | |
| 2938 | - <CommonViewTable {...slave4ViewProps} iColValueView={24} /> | |
| 2939 | - </TabPane> | |
| 2940 | - )} | |
| 2941 | - </> | |
| 2942 | - ) : '' | |
| 2943 | - } | |
| 2944 | - { | |
| 2945 | - onlyslave5 ? | |
| 2946 | - ( | |
| 2947 | - <> | |
| 2948 | - <TabPane tab={slaveInfo3} className="xly-bill-list" key={70} > | |
| 2949 | - <div className="TabPaneStyle"> | |
| 2950 | - <Row gutter={[8, 0]}> | |
| 2951 | - <Col span={showAll4 ? 24 : iColValueTable4} order={iShowOrder4}> | |
| 2952 | - <StaticEditTable {...slave5TableProps} setOpterationColumn={ sModelsType!== listType ? 'Y' : ''} /> | |
| 2953 | - </Col> | |
| 2954 | - <CommonViewTable {...slave4ViewProps} /> | |
| 2955 | - </Row> | |
| 2956 | - </div> | |
| 2957 | - </TabPane> | |
| 2958 | - </> | |
| 2959 | - ) : '' | |
| 2960 | - } | |
| 2961 | - { | |
| 2962 | - onlyslave6 ? | |
| 2963 | - ( | |
| 2964 | - <> | |
| 2965 | - <TabPane tab={slaveInfo4} className="xly-bill-list" key={80} > | |
| 2966 | - <div className="TabPaneStyle"> | |
| 2967 | - <Row gutter={[8, 0]}> | |
| 2968 | - <Col span={showAll4 ? 24 : iColValueTable4} order={iShowOrder4}> | |
| 2969 | - <StaticEditTable {...slave6TableProps} setOpterationColumn={ sModelsType!== listType ? 'Y' : ''} /> | |
| 2970 | - </Col> | |
| 2971 | - <CommonViewTable {...slave4ViewProps} /> | |
| 2972 | - </Row> | |
| 2973 | - </div> | |
| 2974 | - </TabPane> | |
| 2975 | - </> | |
| 2976 | - ) : '' | |
| 2977 | - } | |
| 2978 | - { | |
| 2979 | - onlyslave7 ? | |
| 2980 | - ( | |
| 2981 | - <> | |
| 2982 | - <TabPane tab={slaveInfo5} className="xly-bill-list" key={90} > | |
| 2983 | - <div className="TabPaneStyle"> | |
| 2984 | - <Row gutter={[8, 0]}> | |
| 2985 | - <Col span={showAll4 ? 24 : iColValueTable4} order={iShowOrder4}> | |
| 2986 | - <StaticEditTable {...slave7TableProps} setOpterationColumn={ sModelsType!== listType ? 'Y' : ''} /> | |
| 2987 | - </Col> | |
| 2988 | - <CommonViewTable {...slave4ViewProps} /> | |
| 2989 | - </Row> | |
| 2990 | - </div> | |
| 2991 | - </TabPane> | |
| 2992 | - </> | |
| 2993 | - ) : '' | |
| 2994 | - } | |
| 2995 | - { | |
| 2996 | - onlyslave8 ? | |
| 2997 | - ( | |
| 2998 | - <> | |
| 2999 | - <TabPane tab={slaveInfo6} className="xly-bill-list" key={100} > | |
| 3000 | - <div className="TabPaneStyle"> | |
| 3001 | - <Row gutter={[8, 0]}> | |
| 3002 | - <Col span={showAll4 ? 24 : iColValueTable4} order={iShowOrder4}> | |
| 3003 | - <StaticEditTable {...slave8TableProps} setOpterationColumn={ sModelsType!== listType ? 'Y' : ''} /> | |
| 3004 | - </Col> | |
| 3005 | - <CommonViewTable {...slave4ViewProps} /> | |
| 3006 | - </Row> | |
| 3007 | - </div> | |
| 3008 | - </TabPane> | |
| 3009 | - </> | |
| 3010 | - ) : '' | |
| 3011 | - } | |
| 3012 | - { | |
| 3013 | - onlyslave9 ? | |
| 3014 | - ( | |
| 3015 | - <> | |
| 3016 | - <TabPane tab={slaveInfo7} className="xly-bill-list" key={110} > | |
| 3017 | - <div className="TabPaneStyle"> | |
| 3018 | - <Row gutter={[8, 0]}> | |
| 3019 | - <Col span={showAll4 ? 24 : iColValueTable4} order={iShowOrder4}> | |
| 3020 | - <StaticEditTable {...slave9TableProps} setOpterationColumn={ sModelsType!== listType ? 'Y' : ''} /> | |
| 3021 | - </Col> | |
| 3022 | - <CommonViewTable {...slave4ViewProps} /> | |
| 3023 | - </Row> | |
| 3024 | - </div> | |
| 3025 | - </TabPane> | |
| 3026 | - </> | |
| 3027 | - ) : '' | |
| 3028 | - } | |
| 3029 | - { | |
| 3030 | - onlyslave10 ? | |
| 3031 | - ( | |
| 3032 | - <> | |
| 3033 | - <TabPane tab={slaveInfo8} className="xly-bill-list" key={150} > | |
| 3034 | - <div className="TabPaneStyle"> | |
| 3035 | - <Row gutter={[8, 0]}> | |
| 3036 | - <Col span={showAll4 ? 24 : iColValueTable4} order={iShowOrder4}> | |
| 3037 | - <StaticEditTable {...slave10TableProps} setOpterationColumn={ sModelsType!== listType ? 'Y' : ''} /> | |
| 3038 | - </Col> | |
| 3039 | - <CommonViewTable {...slave4ViewProps} /> | |
| 3040 | - </Row> | |
| 3041 | - </div> | |
| 3042 | - </TabPane> | |
| 3043 | - </> | |
| 3044 | - ) : '' | |
| 3045 | - } | |
| 3046 | - </Tabs> | |
| 3047 | - </div> | |
| 3048 | - } | |
| 3049 | - </Content> | |
| 3050 | - { | |
| 3051 | - bFlow ? | |
| 3052 | - <div id='examInfo' style={{width:'25%', textAlign:'center', height:'900px', maxHeight: 'calc(100vh - 130px)' , backgroundColor:'#f0f0f0'}}> | |
| 3053 | - <CommonExamInfo {...props} /> | |
| 3020 | + {!bControlSeparateTab1 && <CommonViewTable {...slave1ViewProps} style={{ flex: 1 }} />} | |
| 3021 | + </div> | |
| 3022 | + )} | |
| 3023 | + </div> | |
| 3024 | + </TabPane> | |
| 3025 | + {bControlSeparateTab1 && ( | |
| 3026 | + <TabPane tab={separateTabName1} className="xly-bill-list" key={31}> | |
| 3027 | + <CommonViewTable {...slave1ViewProps} iColValueView={24} /> | |
| 3028 | + </TabPane> | |
| 3029 | + )} | |
| 3030 | + </> | |
| 3031 | + ) : ( | |
| 3032 | + "" | |
| 3033 | + )} | |
| 3034 | + {commonUtils.isNotEmptyArr(diliverConfigTypeArr4) | |
| 3035 | + ? diliverConfigTypeArr4.map(item => { | |
| 3036 | + // 匹配数字 | |
| 3037 | + // eslint-disable-next-line no-unused-vars | |
| 3038 | + let num = item.replace(/[^\d]/g, "").trim(); | |
| 3039 | + let tabName = item.replace(/\d+/g, ""); | |
| 3040 | + /* 从主表配置 找到控件名=tabName,否则取他的showName */ | |
| 3041 | + const tableConfigArr = masterConfig?.gdsconfigformslave.filter(row => row.sControlName === item.trim()); | |
| 3042 | + if (commonUtils.isNotEmptyArr(tableConfigArr)) { | |
| 3043 | + tabName = tableConfigArr[0].showName; | |
| 3044 | + } | |
| 3045 | + return ( | |
| 3046 | + <TabPane tab={tabName} key={num} className="xly-bill-list"> | |
| 3047 | + <div> | |
| 3048 | + <CommonView | |
| 3049 | + {...props} | |
| 3050 | + // 使高度和从表高度一直 | |
| 3051 | + // isAutoHeight="ture" | |
| 3052 | + tableConfigType={item} | |
| 3053 | + tableConfigTypeArr={diliverConfigTypeArr4} | |
| 3054 | + /> | |
| 3055 | + </div> | |
| 3056 | + </TabPane> | |
| 3057 | + ); | |
| 3058 | + }) | |
| 3059 | + : ""} | |
| 3060 | + {onlyslave2 ? ( | |
| 3061 | + <> | |
| 3062 | + <TabPane tab={slaveInfo0} className="xly-bill-list" key={40}> | |
| 3063 | + <div className="TabPaneStyle"> | |
| 3064 | + <Row gutter={[8, 0]}> | |
| 3065 | + <Col span={showAll2 ? 24 : iColValueTable2} order={iShowOrder2}> | |
| 3066 | + <StaticEditTable {...slave2TableProps} noVlist setOpterationColumn={sModelsType !== listType && !bCheck2 ? "Y" : ""} /> | |
| 3067 | + </Col> | |
| 3068 | + {!bControlSeparateTab2 && <CommonViewTable {...slave2ViewProps} />} | |
| 3069 | + {getChildTableComponent(props, "slave2")} | |
| 3070 | + </Row> | |
| 3071 | + </div> | |
| 3072 | + </TabPane> | |
| 3073 | + {bControlSeparateTab2 && ( | |
| 3074 | + <TabPane tab={separateTabName2} className="xly-bill-list" key={41}> | |
| 3075 | + <CommonViewTable {...slave2ViewProps} iColValueView={24} /> | |
| 3076 | + </TabPane> | |
| 3077 | + )} | |
| 3078 | + </> | |
| 3079 | + ) : ( | |
| 3080 | + "" | |
| 3081 | + )} | |
| 3082 | + {commonUtils.isNotEmptyArr(diliverConfigTypeArr5) | |
| 3083 | + ? diliverConfigTypeArr5.map(item => { | |
| 3084 | + // 匹配数字 | |
| 3085 | + // eslint-disable-next-line no-unused-vars | |
| 3086 | + let num = item.replace(/[^\d]/g, "").trim(); | |
| 3087 | + let tabName = item.replace(/\d+/g, ""); | |
| 3088 | + /* 从主表配置 找到控件名=tabName,否则取他的showName */ | |
| 3089 | + const tableConfigArr = masterConfig?.gdsconfigformslave.filter(row => row.sControlName === item.trim()); | |
| 3090 | + if (commonUtils.isNotEmptyArr(tableConfigArr)) { | |
| 3091 | + tabName = tableConfigArr[0].showName; | |
| 3092 | + } | |
| 3093 | + return ( | |
| 3094 | + <TabPane tab={tabName} key={num} className="xly-bill-list"> | |
| 3095 | + <div> | |
| 3096 | + <CommonView | |
| 3097 | + {...props} | |
| 3098 | + // 使高度和从表高度一直 | |
| 3099 | + // isAutoHeight="ture" | |
| 3100 | + tableConfigType={item} | |
| 3101 | + tableConfigTypeArr={diliverConfigTypeArr5} | |
| 3102 | + /> | |
| 3103 | + </div> | |
| 3104 | + </TabPane> | |
| 3105 | + ); | |
| 3106 | + }) | |
| 3107 | + : ""} | |
| 3108 | + {onlyslave3 ? ( | |
| 3109 | + <> | |
| 3110 | + <TabPane tab={slaveInfo1} className="xly-bill-list" key={50}> | |
| 3111 | + <div className="TabPaneStyle"> | |
| 3112 | + <Row gutter={[8, 0]}> | |
| 3113 | + <Col span={showAll3 ? 24 : iColValueTable3} order={iShowOrder3}> | |
| 3114 | + <StaticEditTable {...slave3TableProps} noVlist setOpterationColumn={sModelsType !== listType ? "Y" : ""} /> | |
| 3115 | + </Col> | |
| 3116 | + {!bControlSeparateTab3 && <CommonViewTable {...slave3ViewProps} />} | |
| 3117 | + {getChildTableComponent(props, "slave3")} | |
| 3118 | + </Row> | |
| 3119 | + </div> | |
| 3120 | + </TabPane> | |
| 3121 | + {bControlSeparateTab3 && ( | |
| 3122 | + <TabPane tab={separateTabName3} className="xly-bill-list" key={51}> | |
| 3123 | + <CommonViewTable {...slave3ViewProps} iColValueView={24} /> | |
| 3124 | + </TabPane> | |
| 3125 | + )} | |
| 3126 | + </> | |
| 3127 | + ) : ( | |
| 3128 | + "" | |
| 3129 | + )} | |
| 3130 | + {commonUtils.isNotEmptyArr(diliverConfigTypeArr6) | |
| 3131 | + ? diliverConfigTypeArr6.map(item => { | |
| 3132 | + // 匹配数字 | |
| 3133 | + // eslint-disable-next-line no-unused-vars | |
| 3134 | + let num = item.replace(/[^\d]/g, "").trim(); | |
| 3135 | + let tabName = item.replace(/\d+/g, ""); | |
| 3136 | + /* 从主表配置 找到控件名=tabName,否则取他的showName */ | |
| 3137 | + const tableConfigArr = masterConfig?.gdsconfigformslave.filter(row => row.sControlName === item.trim()); | |
| 3138 | + if (commonUtils.isNotEmptyArr(tableConfigArr)) { | |
| 3139 | + tabName = tableConfigArr[0].showName; | |
| 3140 | + } | |
| 3141 | + return ( | |
| 3142 | + <TabPane tab={tabName} key={num} className="xly-bill-list"> | |
| 3143 | + <div> | |
| 3144 | + <CommonView | |
| 3145 | + {...props} | |
| 3146 | + // 使高度和从表高度一直 | |
| 3147 | + // isAutoHeight="ture" | |
| 3148 | + tableConfigType={item} | |
| 3149 | + tableConfigTypeArr={diliverConfigTypeArr6} | |
| 3150 | + /> | |
| 3151 | + </div> | |
| 3152 | + </TabPane> | |
| 3153 | + ); | |
| 3154 | + }) | |
| 3155 | + : ""} | |
| 3156 | + {onlyslave4 ? ( | |
| 3157 | + <> | |
| 3158 | + <TabPane tab={slaveInfo2} className="xly-bill-list" key={60}> | |
| 3159 | + <div className="TabPaneStyle"> | |
| 3160 | + <Row gutter={[8, 0]}> | |
| 3161 | + <Col span={showAll4 ? 24 : iColValueTable4} order={iShowOrder4}> | |
| 3162 | + <StaticEditTable {...slave4TableProps} setOpterationColumn={sModelsType !== listType ? "Y" : ""} /> | |
| 3163 | + </Col> | |
| 3164 | + {!bControlSeparateTab4 && <CommonViewTable {...slave4ViewProps} />} | |
| 3165 | + {getChildTableComponent(props, "slave4")} | |
| 3166 | + </Row> | |
| 3167 | + </div> | |
| 3168 | + </TabPane> | |
| 3169 | + {bControlSeparateTab4 && ( | |
| 3170 | + <TabPane tab={separateTabName4} className="xly-bill-list" key={61}> | |
| 3171 | + <CommonViewTable {...slave4ViewProps} iColValueView={24} /> | |
| 3172 | + </TabPane> | |
| 3173 | + )} | |
| 3174 | + </> | |
| 3175 | + ) : ( | |
| 3176 | + "" | |
| 3177 | + )} | |
| 3178 | + {onlyslave5 ? ( | |
| 3179 | + <> | |
| 3180 | + <TabPane tab={slaveInfo3} className="xly-bill-list" key={70}> | |
| 3181 | + <div className="TabPaneStyle"> | |
| 3182 | + <Row gutter={[8, 0]}> | |
| 3183 | + <Col span={showAll4 ? 24 : iColValueTable4} order={iShowOrder4}> | |
| 3184 | + <StaticEditTable {...slave5TableProps} setOpterationColumn={sModelsType !== listType ? "Y" : ""} /> | |
| 3185 | + </Col> | |
| 3186 | + <CommonViewTable {...slave4ViewProps} /> | |
| 3187 | + </Row> | |
| 3188 | + </div> | |
| 3189 | + </TabPane> | |
| 3190 | + </> | |
| 3191 | + ) : ( | |
| 3192 | + "" | |
| 3193 | + )} | |
| 3194 | + {onlyslave6 ? ( | |
| 3195 | + <> | |
| 3196 | + <TabPane tab={slaveInfo4} className="xly-bill-list" key={80}> | |
| 3197 | + <div className="TabPaneStyle"> | |
| 3198 | + <Row gutter={[8, 0]}> | |
| 3199 | + <Col span={showAll4 ? 24 : iColValueTable4} order={iShowOrder4}> | |
| 3200 | + <StaticEditTable {...slave6TableProps} setOpterationColumn={sModelsType !== listType ? "Y" : ""} /> | |
| 3201 | + </Col> | |
| 3202 | + <CommonViewTable {...slave4ViewProps} /> | |
| 3203 | + </Row> | |
| 3204 | + </div> | |
| 3205 | + </TabPane> | |
| 3206 | + </> | |
| 3207 | + ) : ( | |
| 3208 | + "" | |
| 3209 | + )} | |
| 3210 | + {onlyslave7 ? ( | |
| 3211 | + <> | |
| 3212 | + <TabPane tab={slaveInfo5} className="xly-bill-list" key={90}> | |
| 3213 | + <div className="TabPaneStyle"> | |
| 3214 | + <Row gutter={[8, 0]}> | |
| 3215 | + <Col span={showAll4 ? 24 : iColValueTable4} order={iShowOrder4}> | |
| 3216 | + <StaticEditTable {...slave7TableProps} setOpterationColumn={sModelsType !== listType ? "Y" : ""} /> | |
| 3217 | + </Col> | |
| 3218 | + <CommonViewTable {...slave4ViewProps} /> | |
| 3219 | + </Row> | |
| 3220 | + </div> | |
| 3221 | + </TabPane> | |
| 3222 | + </> | |
| 3223 | + ) : ( | |
| 3224 | + "" | |
| 3225 | + )} | |
| 3226 | + {onlyslave8 ? ( | |
| 3227 | + <> | |
| 3228 | + <TabPane tab={slaveInfo6} className="xly-bill-list" key={100}> | |
| 3229 | + <div className="TabPaneStyle"> | |
| 3230 | + <Row gutter={[8, 0]}> | |
| 3231 | + <Col span={showAll4 ? 24 : iColValueTable4} order={iShowOrder4}> | |
| 3232 | + <StaticEditTable {...slave8TableProps} setOpterationColumn={sModelsType !== listType ? "Y" : ""} /> | |
| 3233 | + </Col> | |
| 3234 | + <CommonViewTable {...slave4ViewProps} /> | |
| 3235 | + </Row> | |
| 3236 | + </div> | |
| 3237 | + </TabPane> | |
| 3238 | + </> | |
| 3239 | + ) : ( | |
| 3240 | + "" | |
| 3241 | + )} | |
| 3242 | + {onlyslave9 ? ( | |
| 3243 | + <> | |
| 3244 | + <TabPane tab={slaveInfo7} className="xly-bill-list" key={110}> | |
| 3245 | + <div className="TabPaneStyle"> | |
| 3246 | + <Row gutter={[8, 0]}> | |
| 3247 | + <Col span={showAll4 ? 24 : iColValueTable4} order={iShowOrder4}> | |
| 3248 | + <StaticEditTable {...slave9TableProps} setOpterationColumn={sModelsType !== listType ? "Y" : ""} /> | |
| 3249 | + </Col> | |
| 3250 | + <CommonViewTable {...slave4ViewProps} /> | |
| 3251 | + </Row> | |
| 3252 | + </div> | |
| 3253 | + </TabPane> | |
| 3254 | + </> | |
| 3255 | + ) : ( | |
| 3256 | + "" | |
| 3257 | + )} | |
| 3258 | + {onlyslave10 ? ( | |
| 3259 | + <> | |
| 3260 | + <TabPane tab={slaveInfo8} className="xly-bill-list" key={150}> | |
| 3261 | + <div className="TabPaneStyle"> | |
| 3262 | + <Row gutter={[8, 0]}> | |
| 3263 | + <Col span={showAll4 ? 24 : iColValueTable4} order={iShowOrder4}> | |
| 3264 | + <StaticEditTable {...slave10TableProps} setOpterationColumn={sModelsType !== listType ? "Y" : ""} /> | |
| 3265 | + </Col> | |
| 3266 | + <CommonViewTable {...slave4ViewProps} /> | |
| 3267 | + </Row> | |
| 3268 | + </div> | |
| 3269 | + </TabPane> | |
| 3270 | + </> | |
| 3271 | + ) : ( | |
| 3272 | + "" | |
| 3273 | + )} | |
| 3274 | + </Tabs> | |
| 3054 | 3275 | </div> |
| 3055 | - : '' | |
| 3056 | - } | |
| 3057 | - { | |
| 3058 | - props.productProcessInfoChooseVisible ? | |
| 3059 | - <AntdDraggableModal | |
| 3060 | - width={1200} | |
| 3061 | - title={processCardSearchResult} | |
| 3062 | - visible={props.productProcessInfoChooseVisible} | |
| 3063 | - onCancel={props.onCancelProductProcessInfoChooseModal} | |
| 3064 | - footer={null} | |
| 3065 | - > | |
| 3066 | - <CommonListSelect {...productProcessInfoType} /> | |
| 3067 | - </AntdDraggableModal> | |
| 3068 | - : '' | |
| 3069 | - } | |
| 3070 | - { | |
| 3071 | - props.showImportErrorVisible ? | |
| 3072 | - <AntdDraggableModal | |
| 3073 | - width={1480} | |
| 3074 | - zIndex={1000} | |
| 3075 | - title={importExcelTitle} | |
| 3076 | - bodyStyle ={{ height:'450px' }} | |
| 3077 | - visible={props.showImportErrorVisible} | |
| 3078 | - onCancel={props.handleCancelModal.bind(this, 'showImportErrorVisible')} | |
| 3079 | - onOk={props.handleCancelModal.bind(this, 'showImportErrorVisible')} | |
| 3080 | - onSaveState={props.onSaveState} | |
| 3276 | + )} | |
| 3277 | + </Content> | |
| 3278 | + {bFlow ? ( | |
| 3279 | + <div | |
| 3280 | + id="examInfo" | |
| 3281 | + style={{ width: "25%", textAlign: "center", height: "900px", maxHeight: "calc(100vh - 130px)", backgroundColor: "#f0f0f0" }} | |
| 3282 | + > | |
| 3283 | + <CommonExamInfo {...props} /> | |
| 3284 | + </div> | |
| 3285 | + ) : ( | |
| 3286 | + "" | |
| 3287 | + )} | |
| 3288 | + {props.productProcessInfoChooseVisible ? ( | |
| 3289 | + <AntdDraggableModal | |
| 3290 | + width={1200} | |
| 3291 | + title={processCardSearchResult} | |
| 3292 | + visible={props.productProcessInfoChooseVisible} | |
| 3293 | + onCancel={props.onCancelProductProcessInfoChooseModal} | |
| 3294 | + footer={null} | |
| 3295 | + > | |
| 3296 | + <CommonListSelect {...productProcessInfoType} /> | |
| 3297 | + </AntdDraggableModal> | |
| 3298 | + ) : ( | |
| 3299 | + "" | |
| 3300 | + )} | |
| 3301 | + {props.showImportErrorVisible ? ( | |
| 3302 | + <AntdDraggableModal | |
| 3303 | + width={1480} | |
| 3304 | + zIndex={1000} | |
| 3305 | + title={importExcelTitle} | |
| 3306 | + bodyStyle={{ height: "450px" }} | |
| 3307 | + visible={props.showImportErrorVisible} | |
| 3308 | + onCancel={props.handleCancelModal.bind(this, "showImportErrorVisible")} | |
| 3309 | + onOk={props.handleCancelModal.bind(this, "showImportErrorVisible")} | |
| 3310 | + onSaveState={props.onSaveState} | |
| 3081 | 3311 | // footer={null} |
| 3082 | - > | |
| 3083 | - <StaticEditTable {...importExcelProps} /> | |
| 3084 | - </AntdDraggableModal> | |
| 3085 | - : '' | |
| 3086 | - } | |
| 3087 | - { | |
| 3088 | - false && props.sParamsModalVisible ? | |
| 3089 | - <AntdDraggableModal | |
| 3090 | - width="920px" | |
| 3091 | - className="paramModal" | |
| 3092 | - title={sProcessParams} | |
| 3093 | - visible={props.sParamsModalVisible} | |
| 3094 | - onOk={props.onParamsOk} | |
| 3095 | - onCancel={props.onCancelModal.bind(this, 'sParamsModalVisible')} | |
| 3312 | + > | |
| 3313 | + <StaticEditTable {...importExcelProps} /> | |
| 3314 | + </AntdDraggableModal> | |
| 3315 | + ) : ( | |
| 3316 | + "" | |
| 3317 | + )} | |
| 3318 | + {false && props.sParamsModalVisible ? ( | |
| 3319 | + <AntdDraggableModal | |
| 3320 | + width="920px" | |
| 3321 | + className="paramModal" | |
| 3322 | + title={sProcessParams} | |
| 3323 | + visible={props.sParamsModalVisible} | |
| 3324 | + onOk={props.onParamsOk} | |
| 3325 | + onCancel={props.onCancelModal.bind(this, "sParamsModalVisible")} | |
| 3096 | 3326 | // footer={null} |
| 3097 | - > | |
| 3098 | - <div className="xly-bill-list" > | |
| 3099 | - <StaticEditTable {...sParamProps} footer="hidden" noVlist /> | |
| 3100 | - </div> | |
| 3101 | - </AntdDraggableModal> : '' | |
| 3102 | - } | |
| 3103 | - | |
| 3104 | - { | |
| 3105 | - false && props.sParamsNewModalVisible ? | |
| 3106 | - <AntdDraggableModal | |
| 3107 | - width="920px" | |
| 3108 | - className="paramModal" | |
| 3109 | - title={sProcessParamsNew} | |
| 3110 | - visible={props.sParamsNewModalVisible} | |
| 3111 | - onOk={props.onParamsNewOk} | |
| 3112 | - onCancel={props.onCancelModal.bind(this, 'sParamsNewModalVisible')} | |
| 3327 | + > | |
| 3328 | + <div className="xly-bill-list"> | |
| 3329 | + <StaticEditTable {...sParamProps} footer="hidden" noVlist /> | |
| 3330 | + </div> | |
| 3331 | + </AntdDraggableModal> | |
| 3332 | + ) : ( | |
| 3333 | + "" | |
| 3334 | + )} | |
| 3335 | + | |
| 3336 | + {false && props.sParamsNewModalVisible ? ( | |
| 3337 | + <AntdDraggableModal | |
| 3338 | + width="920px" | |
| 3339 | + className="paramModal" | |
| 3340 | + title={sProcessParamsNew} | |
| 3341 | + visible={props.sParamsNewModalVisible} | |
| 3342 | + onOk={props.onParamsNewOk} | |
| 3343 | + onCancel={props.onCancelModal.bind(this, "sParamsNewModalVisible")} | |
| 3113 | 3344 | // footer={null} |
| 3114 | - > | |
| 3115 | - <div className="xly-bill-list" > | |
| 3116 | - <StaticEditTable {...sParamNewProps} footer="hidden" noVlist /> | |
| 3117 | - </div> | |
| 3118 | - </AntdDraggableModal> : '' | |
| 3119 | - } | |
| 3120 | - | |
| 3121 | - { | |
| 3122 | - props.contextMenuModalVisible ? | |
| 3123 | - <ContextMenuModal {...props} /> | |
| 3124 | - : '' | |
| 3125 | - } | |
| 3126 | - { | |
| 3127 | - props.visibleInstructField ? | |
| 3128 | - <AntdDraggableModal | |
| 3129 | - width="1500px" | |
| 3130 | - className="paramModal" | |
| 3131 | - title='JSON格式化' | |
| 3132 | - visible={props.visibleInstructField} | |
| 3133 | - footer={null} | |
| 3134 | - > | |
| 3135 | - <div> | |
| 3136 | - <JsonFormatter | |
| 3137 | - onJsonFormatOk={props.onJsonModalOk} | |
| 3138 | - onJsonFormatCancel={props.onCancelModal.bind(this, 'visibleInstructField')} | |
| 3139 | - initialJsonString={sInstructJsonString} | |
| 3140 | - /> | |
| 3141 | - </div> | |
| 3142 | - </AntdDraggableModal> : '' | |
| 3143 | - } | |
| 3345 | + > | |
| 3346 | + <div className="xly-bill-list"> | |
| 3347 | + <StaticEditTable {...sParamNewProps} footer="hidden" noVlist /> | |
| 3348 | + </div> | |
| 3349 | + </AntdDraggableModal> | |
| 3350 | + ) : ( | |
| 3351 | + "" | |
| 3352 | + )} | |
| 3353 | + | |
| 3354 | + {props.contextMenuModalVisible ? <ContextMenuModal {...props} /> : ""} | |
| 3355 | + {props.visibleInstructField ? ( | |
| 3356 | + <AntdDraggableModal width="1500px" className="paramModal" title="JSON格式化" visible={props.visibleInstructField} footer={null}> | |
| 3357 | + <div> | |
| 3358 | + <JsonFormatter | |
| 3359 | + onJsonFormatOk={props.onJsonModalOk} | |
| 3360 | + onJsonFormatCancel={props.onCancelModal.bind(this, "visibleInstructField")} | |
| 3361 | + initialJsonString={sInstructJsonString} | |
| 3362 | + /> | |
| 3363 | + </div> | |
| 3364 | + </AntdDraggableModal> | |
| 3365 | + ) : ( | |
| 3366 | + "" | |
| 3367 | + )} | |
| 3144 | 3368 | <div> |
| 3145 | 3369 | <AssignmentField {...assignmentFieldProps} /> |
| 3146 | 3370 | </div> |
| ... | ... | @@ -3153,7 +3377,7 @@ const BillComponent = Form.create({ |
| 3153 | 3377 | |
| 3154 | 3378 | // 工艺参数弹窗 |
| 3155 | 3379 | const ModalComponent = props => { |
| 3156 | - if (!props.sParamsModalVisible && !props.sParamsNewModalVisible) return ''; | |
| 3380 | + if (!props.sParamsModalVisible && !props.sParamsNewModalVisible) return ""; | |
| 3157 | 3381 | |
| 3158 | 3382 | const sProcessParams = props.sParamsModalVisible ? "原工艺参数" : "工艺参数新"; |
| 3159 | 3383 | const bVisible = props.sParamsModalVisible || props.sParamsNewModalVisible; |
| ... | ... | @@ -3166,7 +3390,7 @@ const ModalComponent = props => { |
| 3166 | 3390 | onCancel={() => { |
| 3167 | 3391 | props.onSaveState({ |
| 3168 | 3392 | sParamsModalVisible: false, |
| 3169 | - sParamsNewModalVisible: false | |
| 3393 | + sParamsNewModalVisible: false, | |
| 3170 | 3394 | }); |
| 3171 | 3395 | }} |
| 3172 | 3396 | footer={ |
| ... | ... | @@ -3195,13 +3419,12 @@ const ModalComponent = props => { |
| 3195 | 3419 | onClick={() => { |
| 3196 | 3420 | props.onSaveState({ |
| 3197 | 3421 | sParamsModalVisible: false, |
| 3198 | - sParamsNewModalVisible: false | |
| 3422 | + sParamsNewModalVisible: false, | |
| 3199 | 3423 | }); |
| 3200 | 3424 | }} |
| 3201 | 3425 | > |
| 3202 | 3426 | 确定 |
| 3203 | 3427 | </Button> |
| 3204 | - | |
| 3205 | 3428 | } |
| 3206 | 3429 | > |
| 3207 | 3430 | {[""].map(() => { |
| ... | ... | @@ -3212,10 +3435,10 @@ const ModalComponent = props => { |
| 3212 | 3435 | sParamData: [ |
| 3213 | 3436 | { |
| 3214 | 3437 | sParamType: "sWorkOrder", |
| 3215 | - sParamName: "工单参数" | |
| 3216 | - } | |
| 3438 | + sParamName: "工单参数", | |
| 3439 | + }, | |
| 3217 | 3440 | ], |
| 3218 | - tableName: "slave" | |
| 3441 | + tableName: "slave", | |
| 3219 | 3442 | }; |
| 3220 | 3443 | |
| 3221 | 3444 | // 如果是工艺参数新 |
| ... | ... | @@ -3223,21 +3446,21 @@ const ModalComponent = props => { |
| 3223 | 3446 | const { slaveData = [] } = props; |
| 3224 | 3447 | const slaveDataNew = lodash.cloneDeep(slaveData); |
| 3225 | 3448 | slaveDataNew.forEach(item => { |
| 3226 | - item.handleType = commonUtils.isEmpty(item.handleType) ? 'update' : item.handleType; | |
| 3449 | + item.handleType = commonUtils.isEmpty(item.handleType) ? "update" : item.handleType; | |
| 3227 | 3450 | item.sParams = item.sParamsNew; |
| 3228 | 3451 | item.sWorkOrderParams = item.sWorkOrderParamsNew; |
| 3229 | 3452 | }); |
| 3230 | 3453 | commonViewDragableProps.slaveData = slaveDataNew; |
| 3231 | - commonViewDragableProps.onCostomSaveData = (tableData) => { | |
| 3454 | + commonViewDragableProps.onCostomSaveData = tableData => { | |
| 3232 | 3455 | const slaveDataTemp = lodash.cloneDeep(slaveData); |
| 3233 | 3456 | slaveDataTemp.forEach(item => { |
| 3234 | 3457 | const rowData = tableData.find(i => i.sId === item.sId); |
| 3235 | - item.handleType = commonUtils.isEmpty(item.handleType) ? 'update' : item.handleType; | |
| 3458 | + item.handleType = commonUtils.isEmpty(item.handleType) ? "update" : item.handleType; | |
| 3236 | 3459 | item.sParamsNew = rowData.sParams; |
| 3237 | 3460 | item.sWorkOrderParamsNew = rowData.sWorkOrderParams; |
| 3238 | 3461 | }); |
| 3239 | 3462 | props.onSaveState({ slaveData: slaveDataTemp }); |
| 3240 | - } | |
| 3463 | + }; | |
| 3241 | 3464 | } |
| 3242 | 3465 | return <CommonViewDragable {...commonViewDragableProps} />; |
| 3243 | 3466 | })} |
| ... | ... | @@ -3247,7 +3470,6 @@ const ModalComponent = props => { |
| 3247 | 3470 | ); |
| 3248 | 3471 | }; |
| 3249 | 3472 | |
| 3250 | - | |
| 3251 | 3473 | /** |
| 3252 | 3474 | * 加载子从表格组件 |
| 3253 | 3475 | */ |
| ... | ... | @@ -3266,7 +3488,7 @@ const getChildTableComponent = (props, tableName) => { |
| 3266 | 3488 | slaveData, |
| 3267 | 3489 | } = props; |
| 3268 | 3490 | |
| 3269 | - if(commonUtils.isEmptyStr(tableName)) { | |
| 3491 | + if (commonUtils.isEmptyStr(tableName)) { | |
| 3270 | 3492 | return null; |
| 3271 | 3493 | } |
| 3272 | 3494 | let slaveRow = {}; |
| ... | ... | @@ -3281,19 +3503,14 @@ const getChildTableComponent = (props, tableName) => { |
| 3281 | 3503 | slaveRow = slaveData[0]; |
| 3282 | 3504 | } |
| 3283 | 3505 | // 是否有表单字段 |
| 3284 | - const bHasViewConfigs = fatherConfig.gdsconfigformslave.some( | |
| 3285 | - item => | |
| 3286 | - item.sName !== "" && | |
| 3287 | - item.bControl && | |
| 3288 | - item.sControlName.indexOf("Btn") === -1 | |
| 3289 | - ); | |
| 3506 | + const bHasViewConfigs = fatherConfig.gdsconfigformslave.some(item => item.sName !== "" && item.bControl && item.sControlName.indexOf("Btn") === -1); | |
| 3290 | 3507 | |
| 3291 | 3508 | /* 找到父层下面有多少子级 */ |
| 3292 | 3509 | const slaveChildNameArr = Object.keys(addStateMap).filter( |
| 3293 | - key => commonUtils.isNotEmptyObject(fatherConfig.sChildTableName) && | |
| 3294 | - fatherConfig.sChildTableName.split(",").includes(addStateMap[key].sGrd)); | |
| 3510 | + key => commonUtils.isNotEmptyObject(fatherConfig.sChildTableName) && fatherConfig.sChildTableName.split(",").includes(addStateMap[key].sGrd) | |
| 3511 | + ); | |
| 3295 | 3512 | |
| 3296 | - if (slaveChildNameArr.length === 0) { | |
| 3513 | + if (slaveChildNameArr.length === 0) { | |
| 3297 | 3514 | return null; // 如果没有有效配置,返回 null 避免渲染 |
| 3298 | 3515 | } |
| 3299 | 3516 | return slaveChildNameArr.map(slaveChildName => { |
| ... | ... | @@ -3303,12 +3520,7 @@ const getChildTableComponent = (props, tableName) => { |
| 3303 | 3520 | const { gdsconfigformslave = [] } = config; |
| 3304 | 3521 | |
| 3305 | 3522 | if (commonUtils.isNotEmptyArr(gdsconfigformslave)) { |
| 3306 | - viewConfigs = gdsconfigformslave.filter( | |
| 3307 | - item => | |
| 3308 | - item.sName !== "" && | |
| 3309 | - item.bControl && | |
| 3310 | - item.sControlName.indexOf("Btn") === -1 | |
| 3311 | - ); | |
| 3523 | + viewConfigs = gdsconfigformslave.filter(item => item.sName !== "" && item.bControl && item.sControlName.indexOf("Btn") === -1); | |
| 3312 | 3524 | if (viewConfigs.length === 0) { |
| 3313 | 3525 | return null; // 如果没有有效配置,返回 null 避免渲染 |
| 3314 | 3526 | } |
| ... | ... | @@ -3329,14 +3541,12 @@ const getChildTableComponent = (props, tableName) => { |
| 3329 | 3541 | |
| 3330 | 3542 | return ( |
| 3331 | 3543 | // 新增标题行和子 CommonViewTable |
| 3332 | - <Col key={config?.sId} span={24} order={10} style={{ textAlign: 'center', background: '#ffffff' }}> | |
| 3333 | - <div style={{ fontWeight: 'bold', fontSize: '16px' }}>上批数据</div> | |
| 3544 | + <Col key={config?.sId} span={24} order={10} style={{ textAlign: "center", background: "#ffffff" }}> | |
| 3545 | + <div style={{ fontWeight: "bold", fontSize: "16px" }}>上批数据</div> | |
| 3334 | 3546 | <CommonViewTable {...tableViewProps} /> |
| 3335 | 3547 | </Col> |
| 3336 | 3548 | ); |
| 3337 | 3549 | }); |
| 3338 | -} | |
| 3339 | - | |
| 3340 | - | |
| 3550 | +}; | |
| 3341 | 3551 | |
| 3342 | 3552 | export default CommonBase(CommonNewSales(CommonNewBill)); | ... | ... |