Commit c3149b8df57d72a376953e303f88d732ad966b93

Authored by 陈鑫涛
2 parents 8eb9f312 c9851406

Merge branch 'main' of http://git.xlyprint.cn/zhangz/xlyUmi into main

package.json
@@ -44,7 +44,8 @@ @@ -44,7 +44,8 @@
44 "react-sortable-hoc": "^2.0.0", 44 "react-sortable-hoc": "^2.0.0",
45 "react-to-print": "^3.0.5", 45 "react-to-print": "^3.0.5",
46 "umi": "^4.4.11", 46 "umi": "^4.4.11",
47 - "weixin-js-sdk": "1.6.0" 47 + "weixin-js-sdk": "1.6.0",
  48 + "xlsx": "^0.18.5"
48 }, 49 },
49 "devDependencies": { 50 "devDependencies": {
50 "@types/react": "^18.0.33", 51 "@types/react": "^18.0.33",
src/components/Common/CommonBillEvent.js
@@ -2116,6 +2116,7 @@ export default (ChildComponent) => { @@ -2116,6 +2116,7 @@ export default (ChildComponent) => {
2116 const { 2116 const {
2117 sModelsId, masterData, app, masterConfig, slaveConfig, checkConfig, token, sModelsType, controlConfig, materialsConfig, processConfig, colorConfig, packConfig, slaveData, orderDetailConfig, 2117 sModelsId, masterData, app, masterConfig, slaveConfig, checkConfig, token, sModelsType, controlConfig, materialsConfig, processConfig, colorConfig, packConfig, slaveData, orderDetailConfig,
2118 } = this.props; 2118 } = this.props;
  2119 + const FriendlyReminder = commonFunc.showLocalMessage(this.props, 'FriendlyReminder', '温馨提示');
2119 const sSlaveIdArray = []; 2120 const sSlaveIdArray = [];
2120 if (commonUtils.isNotEmptyArr(slaveData)) { 2121 if (commonUtils.isNotEmptyArr(slaveData)) {
2121 slaveData.forEach((item) => { 2122 slaveData.forEach((item) => {
@@ -2240,13 +2241,12 @@ export default (ChildComponent) => { @@ -2240,13 +2241,12 @@ export default (ChildComponent) => {
2240 } 2241 }
2241 } else if(returnData.code === -8){ 2242 } else if(returnData.code === -8){
2242 Modal.info({ 2243 Modal.info({
2243 - title: '温馨提示:', 2244 + title: FriendlyReminder,
2244 content: ( 2245 content: (
2245 <div> 2246 <div>
2246 {this.handleGetMsg(returnData.msg)} 2247 {this.handleGetMsg(returnData.msg)}
2247 </div> 2248 </div>
2248 ), 2249 ),
2249 - okText: '确认',  
2250 onOk() {}, 2250 onOk() {},
2251 }); 2251 });
2252 this.props.onSaveState({ 2252 this.props.onSaveState({
@@ -2384,7 +2384,7 @@ export default (ChildComponent) =&gt; { @@ -2384,7 +2384,7 @@ export default (ChildComponent) =&gt; {
2384 let iIndex = masterConfig.gdsconfigformslave.findIndex(item => item.sControlName === 'BtnCheck' || item.sControlName === 'BtnExamine' || item.sControlName === 'BtnSubmit'); 2384 let iIndex = masterConfig.gdsconfigformslave.findIndex(item => item.sControlName === 'BtnCheck' || item.sControlName === 'BtnExamine' || item.sControlName === 'BtnSubmit');
2385 /* 配置了表格允许为空 则不进行校验 */ 2385 /* 配置了表格允许为空 则不进行校验 */
2386 if (slaveConfig && slaveConfig.bNotCanEmpty ) { 2386 if (slaveConfig && slaveConfig.bNotCanEmpty ) {
2387 - message.error(`${slaveConfig.sChinese || ''}${commonFunc.showMessage(app.commonConst, 'slaveNotNull')}`); // 从表不能为空! 2387 + message.error(`${slaveConfig.showName || ''}${commonFunc.showMessage(app.commonConst, 'slaveNotNull')}`); // 从表不能为空!
2388 this.props.onSaveState({ 2388 this.props.onSaveState({
2389 loading: false, 2389 loading: false,
2390 }); 2390 });
@@ -2395,7 +2395,7 @@ export default (ChildComponent) =&gt; { @@ -2395,7 +2395,7 @@ export default (ChildComponent) =&gt; {
2395 bCheck = true; 2395 bCheck = true;
2396 } 2396 }
2397 if(bCheck) { 2397 if(bCheck) {
2398 - message.error(`${slaveConfig.sChinese || ''}${commonFunc.showMessage(app.commonConst, 'slaveNotNull')}`); // 从表不能为空! 2398 + message.error(`${slaveConfig.showName || ''}${commonFunc.showMessage(app.commonConst, 'slaveNotNull')}`); // 从表不能为空!
2399 this.props.onSaveState({ 2399 this.props.onSaveState({
2400 loading: false, 2400 loading: false,
2401 }); 2401 });
@@ -6071,6 +6071,9 @@ export default (ChildComponent) =&gt; { @@ -6071,6 +6071,9 @@ export default (ChildComponent) =&gt; {
6071 6071
6072 /** 按钮操作事件 */ 6072 /** 按钮操作事件 */
6073 handleButtonClick = async (name) => { 6073 handleButtonClick = async (name) => {
  6074 +
  6075 + const FriendlyReminder = commonFunc.showLocalMessage(this.props, 'FriendlyReminder', '温馨提示');
  6076 +
6074 if (name === 'BtnOut') { 6077 if (name === 'BtnOut') {
6075 this.handleOut(); 6078 this.handleOut();
6076 } else if (name === 'BtnDesignFunction') { 6079 } else if (name === 'BtnDesignFunction') {
@@ -6329,13 +6332,12 @@ export default (ChildComponent) =&gt; { @@ -6329,13 +6332,12 @@ export default (ChildComponent) =&gt; {
6329 this.props.onSaveState({ ...allReturnMap, pageLoading:false, }); 6332 this.props.onSaveState({ ...allReturnMap, pageLoading:false, });
6330 }else if (dataReturn.code === -8 || dataReturn.code === 2) { 6333 }else if (dataReturn.code === -8 || dataReturn.code === 2) {
6331 Modal.info({ 6334 Modal.info({
6332 - title: '温馨提示:', 6335 + title: FriendlyReminder,
6333 content: ( 6336 content: (
6334 <div> 6337 <div>
6335 {this.handleGetMsg(dataReturn.msg)} 6338 {this.handleGetMsg(dataReturn.msg)}
6336 </div> 6339 </div>
6337 ), 6340 ),
6338 - okText: '确认',  
6339 onOk() {}, 6341 onOk() {},
6340 }); 6342 });
6341 this.props.onSaveState({ ...allReturnMap, pageLoading:false, }); 6343 this.props.onSaveState({ ...allReturnMap, pageLoading:false, });
src/components/Common/CommonElementEvent.js
@@ -2,6 +2,7 @@ @@ -2,6 +2,7 @@
2 /* eslint-disable array-callback-return,no-undef,prefer-destructuring */ 2 /* eslint-disable array-callback-return,no-undef,prefer-destructuring */
3 import React, { Component } from 'react'; 3 import React, { Component } from 'react';
4 import { Modal, message } from 'antd-v4'; 4 import { Modal, message } from 'antd-v4';
  5 +import * as XLSX from 'xlsx';
5 import commonConfig from '../../utils/config'; 6 import commonConfig from '../../utils/config';
6 import * as commonFunc from './commonFunc'; 7 import * as commonFunc from './commonFunc';
7 import * as commonBusiness from './commonBusiness'; /* 单据业务功能 */ 8 import * as commonBusiness from './commonBusiness'; /* 单据业务功能 */
@@ -4068,6 +4069,9 @@ export default (ChildComponent) =&gt; { @@ -4068,6 +4069,9 @@ export default (ChildComponent) =&gt; {
4068 } 4069 }
4069 this.props.onSaveState({ 4070 this.props.onSaveState({
4070 masterData, masterConfig, customerInfoData, ...addState, contactData, enabled: sModelsType === 'system/sisformulaInfo' ? this.props.enabled : true, bUserModel: masterData.bUserModel, 4071 masterData, masterConfig, customerInfoData, ...addState, contactData, enabled: sModelsType === 'system/sisformulaInfo' ? this.props.enabled : true, bUserModel: masterData.bUserModel,
  4072 + }, () => {
  4073 + this.masterChangeCb && this.masterChangeCb();
  4074 + this.masterChangeCb = null;
4071 }); 4075 });
4072 }; 4076 };
4073 handleChangeProductParteName = (sAllPartsName, sisproductclassifyProcessClassifyConfigNew) => { 4077 handleChangeProductParteName = (sAllPartsName, sisproductclassifyProcessClassifyConfigNew) => {
@@ -4640,6 +4644,78 @@ export default (ChildComponent) =&gt; { @@ -4640,6 +4644,78 @@ export default (ChildComponent) =&gt; {
4640 return newWin; 4644 return newWin;
4641 } 4645 }
4642 4646
  4647 + // 导入模版功能
  4648 + handleImportExcel = () => {
  4649 + const fileInput = document.createElement('input');
  4650 + fileInput.type = 'file';
  4651 + fileInput.accept = '.xlsx, .xls';
  4652 + fileInput.style.position = 'fixed';
  4653 + fileInput.style.left = '-9999px';
  4654 + document.body.appendChild(fileInput);
  4655 +
  4656 + fileInput.addEventListener('change', (e) => {
  4657 + const file = e.target.files[0];
  4658 + if (file) {
  4659 + if (!file) return;
  4660 +
  4661 + const reader = new FileReader();
  4662 + reader.readAsArrayBuffer(file);
  4663 + reader.onload = (evt) => {
  4664 + try {
  4665 + const data = evt.target.result;
  4666 + const workbook = XLSX.read(data, { type: 'binary' });
  4667 + const sColTitleName = [];
  4668 + workbook.SheetNames.forEach((sheetName, i) => {
  4669 + const sheet = workbook.Sheets[sheetName];
  4670 + const parsedData = XLSX.utils.sheet_to_json(sheet, { header: 1 });
  4671 + const [firstRow, ...restRows] = parsedData;
  4672 + sColTitleName.push(firstRow.reduce((pre, item, index) => {
  4673 + if (index === 0) {
  4674 + pre.sName = item.replace('sName', '');
  4675 + } else if (item.endsWith('sName')) {
  4676 + pre[`sName${index}`] = item.replace('sName', '');
  4677 + } else {
  4678 + pre[`sValue${index}`] = item;
  4679 + }
  4680 + return pre;
  4681 + }, { panelName: sheetName }));
  4682 + });
  4683 + this.masterChangeCb = () => {
  4684 + const addState = {};
  4685 + workbook.SheetNames.forEach((sheetName, i) => {
  4686 + const sheet = workbook.Sheets[sheetName];
  4687 + const parsedData = XLSX.utils.sheet_to_json(sheet, { header: 1 });
  4688 + const [firstRow, ...restRows] = parsedData;
  4689 + const tableName = `customizeParam${i || ''}`;
  4690 + let { [`${tableName}Data`]: tableData = [], [`${tableName}DelData`]: tableDelData = [] } = this.props;
  4691 + tableDelData = [...tableDelData, ...tableData.map(item => ({ ...item, handleType: 'del' }))];
  4692 + tableData = restRows.map(item => {
  4693 + const columnKeys = Object.keys(sColTitleName[i]);
  4694 + columnKeys.shift();
  4695 + return { ...this.handleTableAdd(tableName, true), ...item.reduce((pre, cur, index) => {
  4696 + pre[columnKeys[index]] = cur;
  4697 + return pre;
  4698 + }, { sType: tableName }) };
  4699 + });
  4700 + addState[`${tableName}Data`] = tableData;
  4701 + addState[`${tableName}DelData`] = tableDelData;
  4702 + });
  4703 + this.props.onSaveState(addState);
  4704 + };
  4705 + this.handleMasterChange('masterData', 'sColTitleName', { sColTitleName: JSON.stringify(sColTitleName) }, undefined, []);
  4706 + } catch (error) {
  4707 + console.log('=====err', error);
  4708 + message.error('文件格式错误');
  4709 + }
  4710 + };
  4711 + }
  4712 +
  4713 + document.body.removeChild(fileInput);
  4714 + });
  4715 +
  4716 + fileInput.click();
  4717 + }
  4718 +
4643 /* 按钮点击功能 */ 4719 /* 按钮点击功能 */
4644 handleBtnClick = (e, btnName) => { 4720 handleBtnClick = (e, btnName) => {
4645 if (btnName === 'BtnAccounts') { 4721 if (btnName === 'BtnAccounts') {
@@ -4648,8 +4724,10 @@ export default (ChildComponent) =&gt; { @@ -4648,8 +4724,10 @@ export default (ChildComponent) =&gt; {
4648 this.handleDesignFunction(); 4724 this.handleDesignFunction();
4649 } else if (e === 'BtnResetpwd') { /* 管理员重置密码 */ 4725 } else if (e === 'BtnResetpwd') { /* 管理员重置密码 */
4650 this.handleResetPwd(); 4726 this.handleResetPwd();
4651 - } if (e === 'BtnOut') { 4727 + } else if (e === 'BtnOut') {
4652 this.handleOut(); 4728 this.handleOut();
  4729 + } else if (e === 'BtnImportExcel') { // 导入Excel模版
  4730 + this.handleImportExcel();
4653 } 4731 }
4654 // else if (e === 'BtnConfigCustomizeParam') { /* 生成变量设置 */ 4732 // else if (e === 'BtnConfigCustomizeParam') { /* 生成变量设置 */
4655 // const { masterData, customizeParamConfig } = this.props; 4733 // const { masterData, customizeParamConfig } = this.props;
src/components/Common/CommonListSelect/index.js
@@ -854,6 +854,9 @@ const CommonListComponent = Form.create({ @@ -854,6 +854,9 @@ const CommonListComponent = Form.create({
854 }, 854 },
855 }; 855 };
856 const upInvoiceName = commonUtils.isNotEmptyArr(btnUploadApi) ? btnUploadApi[0].showName : '发票上传(金税)'; 856 const upInvoiceName = commonUtils.isNotEmptyArr(btnUploadApi) ? btnUploadApi[0].showName : '发票上传(金税)';
  857 +
  858 + const BtnSure = commonFunc.showLocalMessage(this.props, 'BtnSure', '确定');
  859 + const BtnCancel = commonFunc.showLocalMessage(this.props, 'BtnCancel', '取消');
857 860
858 return ( 861 return (
859 <Form > 862 <Form >
@@ -953,8 +956,8 @@ const CommonListComponent = Form.create({ @@ -953,8 +956,8 @@ const CommonListComponent = Form.create({
953 </Button> 956 </Button>
954 )) : 957 )) :
955 <div> 958 <div>
956 - <Button key="back" style={{ marginRight: '8px' }} onClick={props.onCancel}>取消</Button>  
957 - <Button type="primary" onClick={props.onSelect}>确认</Button> 959 + <Button key="back" style={{ marginRight: '8px' }} onClick={props.onCancel}>{BtnCancel}</Button>
  960 + <Button type="primary" onClick={props.onSelect}>{BtnSure}</Button>
958 </div> 961 </div>
959 } 962 }
960 963
src/components/Common/CommonListSelectFlex/index.js
@@ -500,6 +500,9 @@ const CommonListComponent = Form.create({ @@ -500,6 +500,9 @@ const CommonListComponent = Form.create({
500 const tableBelone = commonUtils.isNotEmptyObject(app.currentPane) && commonUtils.isNotEmptyObject(app.currentPane.name) && app.currentPane.bEdit ? 'none' : 'list'; 500 const tableBelone = commonUtils.isNotEmptyObject(app.currentPane) && commonUtils.isNotEmptyObject(app.currentPane.name) && app.currentPane.bEdit ? 'none' : 'list';
501 const sProcessParams = commonFunc.showMessage(app.commonConst, 'sProcessParams');/* 选择工艺参数标题 */ 501 const sProcessParams = commonFunc.showMessage(app.commonConst, 'sProcessParams');/* 选择工艺参数标题 */
502 const displayLeft = (sModelsType !== 'search/sisColor' && sModelsType !== 'search/commonPopup'); 502 const displayLeft = (sModelsType !== 'search/sisColor' && sModelsType !== 'search/commonPopup');
  503 +
  504 + const BtnSure = commonFunc.showLocalMessage(this.props, 'BtnSure', '确定');
  505 + const BtnCancel = commonFunc.showLocalMessage(this.props, 'BtnCancel', '取消');
503 return ( 506 return (
504 <div className="modalChooseProcessContent"> 507 <div className="modalChooseProcessContent">
505 <Form > 508 <Form >
@@ -533,8 +536,8 @@ const CommonListComponent = Form.create({ @@ -533,8 +536,8 @@ const CommonListComponent = Form.create({
533 </div> 536 </div>
534 </Layout> 537 </Layout>
535 <div style={{ textAlign: 'right', marginRight: '9px', marginBottom: '9px' }}> 538 <div style={{ textAlign: 'right', marginRight: '9px', marginBottom: '9px' }}>
536 - <Button key="back" style={{ marginRight: '8px' }} onClick={props.onCancel}>取消</Button>  
537 - <Button type="primary" onClick={props.onSelect}>确认</Button> 539 + <Button key="back" style={{ marginRight: '8px' }} onClick={props.onCancel}>{BtnCancel}</Button>
  540 + <Button type="primary" onClick={props.onSelect}>{BtnSure}</Button>
538 </div> 541 </div>
539 </Layout> 542 </Layout>
540 { 543 {
src/components/Common/CommonNewBillEvent.js
@@ -4167,6 +4167,7 @@ export default (ChildComponent) =&gt; { @@ -4167,6 +4167,7 @@ export default (ChildComponent) =&gt; {
4167 }; 4167 };
4168 /** 按钮操作事件 */ 4168 /** 按钮操作事件 */
4169 handleButtonClick = async (name, bBtncalcComfim) => { 4169 handleButtonClick = async (name, bBtncalcComfim) => {
  4170 + const FriendlyReminder = commonFunc.showLocalMessage(this.props, 'FriendlyReminder', '温馨提示');
4170 if (name === 'BtnOut') { 4171 if (name === 'BtnOut') {
4171 this.handleOut(); 4172 this.handleOut();
4172 } else if (name === 'BtnDesignFunction') { 4173 } else if (name === 'BtnDesignFunction') {
@@ -4426,14 +4427,12 @@ export default (ChildComponent) =&gt; { @@ -4426,14 +4427,12 @@ export default (ChildComponent) =&gt; {
4426 } else if (dataReturn.code === -7) { 4427 } else if (dataReturn.code === -7) {
4427 const _this = this; 4428 const _this = this;
4428 Modal.confirm({ 4429 Modal.confirm({
4429 - title: "温馨提示:", 4430 + title: FriendlyReminder,
4430 content: ( 4431 content: (
4431 <div> 4432 <div>
4432 {this.handleGetMsg(dataReturn.msg)} 4433 {this.handleGetMsg(dataReturn.msg)}
4433 </div> 4434 </div>
4434 ), 4435 ),
4435 - okText: "确认",  
4436 - cancelText: "取消",  
4437 onOk() { 4436 onOk() {
4438 _this.handleButtonClick(name, true); 4437 _this.handleButtonClick(name, true);
4439 }, 4438 },
src/components/Common/CommonSubBillEvent.js
@@ -1912,6 +1912,8 @@ export default (ChildComponent) =&gt; { @@ -1912,6 +1912,8 @@ export default (ChildComponent) =&gt; {
1912 sModelsId, masterData, app, masterConfig, slaveConfig, checkConfig, token, sModelsType, controlConfig, materialsConfig, processConfig, colorConfig, packConfig, slaveData, 1912 sModelsId, masterData, app, masterConfig, slaveConfig, checkConfig, token, sModelsType, controlConfig, materialsConfig, processConfig, colorConfig, packConfig, slaveData,
1913 orderDetailConfig, slaveChildConfig, formRoute, slave0Config, 1913 orderDetailConfig, slaveChildConfig, formRoute, slave0Config,
1914 } = this.props; 1914 } = this.props;
  1915 + const FriendlyReminder = commonFunc.showLocalMessage(this.props, 'FriendlyReminder', '温馨提示');
  1916 +
1915 const sSlaveIdArray = []; 1917 const sSlaveIdArray = [];
1916 if (commonUtils.isNotEmptyArr(slaveData)) { 1918 if (commonUtils.isNotEmptyArr(slaveData)) {
1917 slaveData.forEach((item) => { 1919 slaveData.forEach((item) => {
@@ -2041,13 +2043,12 @@ export default (ChildComponent) =&gt; { @@ -2041,13 +2043,12 @@ export default (ChildComponent) =&gt; {
2041 } 2043 }
2042 }else if(returnData.code === -8){ 2044 }else if(returnData.code === -8){
2043 Modal.info({ 2045 Modal.info({
2044 - title: '温馨提示:', 2046 + title: FriendlyReminder,
2045 content: ( 2047 content: (
2046 <div> 2048 <div>
2047 {this.handleGetMsg(returnData.msg)} 2049 {this.handleGetMsg(returnData.msg)}
2048 </div> 2050 </div>
2049 ), 2051 ),
2050 - okText: '确认',  
2051 onOk() {}, 2052 onOk() {},
2052 }); 2053 });
2053 this.props.onSaveState({ 2054 this.props.onSaveState({
@@ -2191,7 +2192,7 @@ export default (ChildComponent) =&gt; { @@ -2191,7 +2192,7 @@ export default (ChildComponent) =&gt; {
2191 if (sModelsType !== 'commonBill/onlyMaster' && !sModelsType.includes('sales/salesInvoice') && !sModelsType.includes('purchase/purchaseInvoice') && !sModelsType.includes('purchase/outsideInvoice') && sModelsType !== 'cashier/financialTransfer' && sModelsType !== 'cashier/financialAdjustment' 2192 if (sModelsType !== 'commonBill/onlyMaster' && !sModelsType.includes('sales/salesInvoice') && !sModelsType.includes('purchase/purchaseInvoice') && !sModelsType.includes('purchase/outsideInvoice') && sModelsType !== 'cashier/financialTransfer' && sModelsType !== 'cashier/financialAdjustment'
2192 && !sModelsType.includes('cashier/receipt') && !sModelsType.includes('cashier/payment') && !sModelsType.includes('purchase/purchaseEnquiry')) { 2193 && !sModelsType.includes('cashier/receipt') && !sModelsType.includes('cashier/payment') && !sModelsType.includes('purchase/purchaseEnquiry')) {
2193 if (slaveConfig && slaveConfig.bNotCanEmpty && commonUtils.isEmptyArr(slaveData)) { 2194 if (slaveConfig && slaveConfig.bNotCanEmpty && commonUtils.isEmptyArr(slaveData)) {
2194 - message.error(`${slaveConfig.sChinese || ''}${commonFunc.showMessage(app.commonConst, 'slaveNotNull')}`); // 从表不能为空! 2195 + message.error(`${slaveConfig.showName || ''}${commonFunc.showMessage(app.commonConst, 'slaveNotNull')}`); // 从表不能为空!
2195 // if (bGroupDataByDefineNo) { 2196 // if (bGroupDataByDefineNo) {
2196 // commonUtils.isEmptyArr(slaveData) && message.error('按批次汇总失败,请检查批次号等数据!'); 2197 // commonUtils.isEmptyArr(slaveData) && message.error('按批次汇总失败,请检查批次号等数据!');
2197 // } else { 2198 // } else {
src/components/Common/SlaveMemo.js
@@ -10,6 +10,7 @@ import * as commonUtils from &#39;../../utils/utils&#39;; @@ -10,6 +10,7 @@ import * as commonUtils from &#39;../../utils/utils&#39;;
10 import ShowType from './CommonComponent';/* 通用方法 */ 10 import ShowType from './CommonComponent';/* 通用方法 */
11 import AntdDraggableModal from '../Common/AntdDraggableModal'; 11 import AntdDraggableModal from '../Common/AntdDraggableModal';
12 import moment from 'moment'; 12 import moment from 'moment';
  13 +import * as commonFunc from "@/components/Common/commonFunc";
13 14
14 const { TextArea } = Input; 15 const { TextArea } = Input;
15 const FormItem = Form.Item; 16 const FormItem = Form.Item;
@@ -153,7 +154,7 @@ export default class SlaveMemo extends Component { @@ -153,7 +154,7 @@ export default class SlaveMemo extends Component {
153 let bVisibleMemo; 154 let bVisibleMemo;
154 let sMemoField; 155 let sMemoField;
155 let btnName = ''; 156 let btnName = '';
156 - const title = '详细'; 157 + const title = commonFunc.showLocalMessage(this.props, 'sDetailTitle', '详细');
157 let bEnabledTextArea = false; /* 多行文本默认可输入 非编辑状态多行文本禁止输入 */ 158 let bEnabledTextArea = false; /* 多行文本默认可输入 非编辑状态多行文本禁止输入 */
158 let bNoMemo = false; 159 let bNoMemo = false;
159 if (commonUtils.isNotEmptyObject(sCurrMemoProps)) { 160 if (commonUtils.isNotEmptyObject(sCurrMemoProps)) {
src/components/Common/ToolBar/ToolBarNew.js
@@ -1521,6 +1521,11 @@ class ToolBarComponent extends Component { @@ -1521,6 +1521,11 @@ class ToolBarComponent extends Component {
1521 message.error(sErrorInfo); 1521 message.error(sErrorInfo);
1522 return; 1522 return;
1523 } 1523 }
  1524 + const bCancel = commonFunc.showLocalMessage(this.props, 'bCancel', '确定要取消');
  1525 +
  1526 + const bInvalid = commonFunc.showLocalMessage(this.props, 'bInvalid', '确定要作废');
  1527 +
  1528 + const bInvalidCancel = commonFunc.showLocalMessage(this.props, 'bInvalidCancel', '确定要作废');
1524 1529
1525 /* 新增 */ 1530 /* 新增 */
1526 if (key === "BtnAdd") { 1531 if (key === "BtnAdd") {
@@ -2028,13 +2033,13 @@ class ToolBarComponent extends Component { @@ -2028,13 +2033,13 @@ class ToolBarComponent extends Component {
2028 /* 作废、取消作废 */ 2033 /* 作废、取消作废 */
2029 if (key === "BtnBsOperation.BtnInvalid") { 2034 if (key === "BtnBsOperation.BtnInvalid") {
2030 obj = { 2035 obj = {
2031 - title: "确定要作废", 2036 + title: bInvalid,
2032 handleType: "toVoid", 2037 handleType: "toVoid",
2033 }; 2038 };
2034 this.props.onChangeInvalid(obj); 2039 this.props.onChangeInvalid(obj);
2035 } else if (key === "BtnBsOperation.BtnCancelInvalid") { 2040 } else if (key === "BtnBsOperation.BtnCancelInvalid") {
2036 obj = { 2041 obj = {
2037 - title: "确定取消作废", 2042 + title: bInvalidCancel,
2038 handleType: "cancel", 2043 handleType: "cancel",
2039 }; 2044 };
2040 this.props.onChangeInvalid(obj); 2045 this.props.onChangeInvalid(obj);
@@ -2044,13 +2049,13 @@ class ToolBarComponent extends Component { @@ -2044,13 +2049,13 @@ class ToolBarComponent extends Component {
2044 } 2049 }
2045 } else if (key === "BtnInvalid") { 2050 } else if (key === "BtnInvalid") {
2046 obj = { 2051 obj = {
2047 - title: "确定要作废", 2052 + title: bInvalid,
2048 handleType: "toVoid", 2053 handleType: "toVoid",
2049 }; 2054 };
2050 this.props.onChangeInvalid(obj); 2055 this.props.onChangeInvalid(obj);
2051 } else if (key === "BtnCancelInvalid") { 2056 } else if (key === "BtnCancelInvalid") {
2052 obj = { 2057 obj = {
2053 - title: "确定取消作废", 2058 + title: bInvalidCancel,
2054 handleType: "cancel", 2059 handleType: "cancel",
2055 }; 2060 };
2056 this.props.onChangeInvalid(obj); 2061 this.props.onChangeInvalid(obj);
@@ -2129,7 +2134,7 @@ class ToolBarComponent extends Component { @@ -2129,7 +2134,7 @@ class ToolBarComponent extends Component {
2129 } else if (key === "BtnCancel") { 2134 } else if (key === "BtnCancel") {
2130 /* 取消 */ 2135 /* 取消 */
2131 obj = { 2136 obj = {
2132 - title: "确定要取消", 2137 + title: bCancel,
2133 }; 2138 };
2134 this.props.onCancel(obj); 2139 this.props.onCancel(obj);
2135 } else if (key.indexOf("BtnPrint") > -1 && commonUtils.isNotEmptyStr(e.item.props["data-sactiveid"])) { 2140 } else if (key.indexOf("BtnPrint") > -1 && commonUtils.isNotEmptyStr(e.item.props["data-sactiveid"])) {
src/components/Common/commonFunc.js
@@ -566,9 +566,9 @@ export function getFilterConditon(sAssignField, allTableData) { @@ -566,9 +566,9 @@ export function getFilterConditon(sAssignField, allTableData) {
566 } 566 }
567 export function showLocalMessage(props, sName, sChineseName) { 567 export function showLocalMessage(props, sName, sChineseName) {
568 let sTitle = ''; 568 let sTitle = '';
569 - if(commonUtils.isNotEmptyObject(props) && commonUtils.isNotEmptyObject(props.app) && commonUtils.isNotEmptyArr(props.app.gdsformconst)) {  
570 - const gdsformconst = props.app.gdsformconst;  
571 - sTitle = this.showMessage(gdsformconst, sName) 569 + if(commonUtils.isNotEmptyObject(props) && commonUtils.isNotEmptyObject(props.app) && commonUtils.isNotEmptyArr(props.app.commonConst)) {
  570 + const gdsformconst = props.app.commonConst;
  571 + sTitle = showMessage(gdsformconst, sName)
572 } else { 572 } else {
573 sTitle = sChineseName; 573 sTitle = sChineseName;
574 } 574 }
src/components/CommonElementEvent/ProcessInfo.js
@@ -91,7 +91,7 @@ const ProcessComponent = Form.create({ @@ -91,7 +91,7 @@ const ProcessComponent = Form.create({
91 const iIndexProcess = props.masterConfig.gdsconfigformslave.findIndex(item => item.sControlName === 'tabAssort'); /* 配套工序 */ 91 const iIndexProcess = props.masterConfig.gdsconfigformslave.findIndex(item => item.sControlName === 'tabAssort'); /* 配套工序 */
92 if (iIndexProcess > -1) { 92 if (iIndexProcess > -1) {
93 bAssort = props.masterConfig.gdsconfigformslave[iIndexProcess].bVisible; 93 bAssort = props.masterConfig.gdsconfigformslave[iIndexProcess].bVisible;
94 - tabAssort = props.masterConfig.gdsconfigformslave[iIndexProcess].sChinese; 94 + tabAssort = props.masterConfig.gdsconfigformslave[iIndexProcess].showName;
95 } 95 }
96 } 96 }
97 let bOutside = commonUtils.isNotEmptyObject(outsideConfig); /* 發外公式 */ 97 let bOutside = commonUtils.isNotEmptyObject(outsideConfig); /* 發外公式 */
@@ -99,7 +99,7 @@ const ProcessComponent = Form.create({ @@ -99,7 +99,7 @@ const ProcessComponent = Form.create({
99 const iIndexProcess = props.masterConfig.gdsconfigformslave.findIndex(item => item.sControlName === 'tabOutSide'); /* 發外公式 */ 99 const iIndexProcess = props.masterConfig.gdsconfigformslave.findIndex(item => item.sControlName === 'tabOutSide'); /* 發外公式 */
100 if (iIndexProcess > -1) { 100 if (iIndexProcess > -1) {
101 bOutside = props.masterConfig.gdsconfigformslave[iIndexProcess].bVisible; 101 bOutside = props.masterConfig.gdsconfigformslave[iIndexProcess].bVisible;
102 - tabOutside = props.masterConfig.gdsconfigformslave[iIndexProcess].sChinese; 102 + tabOutside = props.masterConfig.gdsconfigformslave[iIndexProcess].showName;
103 } 103 }
104 } 104 }
105 let bProcessstyle = commonUtils.isNotEmptyObject(processstyleConfig); /* 工序规格 */ 105 let bProcessstyle = commonUtils.isNotEmptyObject(processstyleConfig); /* 工序规格 */
@@ -108,7 +108,7 @@ const ProcessComponent = Form.create({ @@ -108,7 +108,7 @@ const ProcessComponent = Form.create({
108 const iIndexProcess = props.masterConfig.gdsconfigformslave.findIndex(item => item.sControlName === 'tabProcessStyle'); /* 工序规格 */ 108 const iIndexProcess = props.masterConfig.gdsconfigformslave.findIndex(item => item.sControlName === 'tabProcessStyle'); /* 工序规格 */
109 if (iIndexProcess > -1) { 109 if (iIndexProcess > -1) {
110 bProcessstyle = props.masterConfig.gdsconfigformslave[iIndexProcess].bVisible; 110 bProcessstyle = props.masterConfig.gdsconfigformslave[iIndexProcess].bVisible;
111 - tabProcessstyle = props.masterConfig.gdsconfigformslave[iIndexProcess].sChinese; 111 + tabProcessstyle = props.masterConfig.gdsconfigformslave[iIndexProcess].showName;
112 } 112 }
113 } 113 }
114 const bProcesssApsRule = false; /* APS规则定义 */ 114 const bProcesssApsRule = false; /* APS规则定义 */
@@ -126,7 +126,7 @@ const ProcessComponent = Form.create({ @@ -126,7 +126,7 @@ const ProcessComponent = Form.create({
126 const iIndexProcess = props.masterConfig.gdsconfigformslave.findIndex(item => item.sControlName === 'tabProcessParam'); /* 工单参数 */ 126 const iIndexProcess = props.masterConfig.gdsconfigformslave.findIndex(item => item.sControlName === 'tabProcessParam'); /* 工单参数 */
127 if (iIndexProcess > -1) { 127 if (iIndexProcess > -1) {
128 bOrderParam = props.masterConfig.gdsconfigformslave[iIndexProcess].bVisible; 128 bOrderParam = props.masterConfig.gdsconfigformslave[iIndexProcess].bVisible;
129 - tabOrderParam = props.masterConfig.gdsconfigformslave[iIndexProcess].sChinese; 129 + tabOrderParam = props.masterConfig.gdsconfigformslave[iIndexProcess].showName;
130 } 130 }
131 } 131 }
132 let bOfferParam = true; /* 报价参数 */ 132 let bOfferParam = true; /* 报价参数 */
@@ -135,7 +135,7 @@ const ProcessComponent = Form.create({ @@ -135,7 +135,7 @@ const ProcessComponent = Form.create({
135 const iIndexProcess = props.masterConfig.gdsconfigformslave.findIndex(item => item.sControlName === 'tabQuoParam'); /* 报价参数 */ 135 const iIndexProcess = props.masterConfig.gdsconfigformslave.findIndex(item => item.sControlName === 'tabQuoParam'); /* 报价参数 */
136 if (iIndexProcess > -1) { 136 if (iIndexProcess > -1) {
137 bOfferParam = props.masterConfig.gdsconfigformslave[iIndexProcess].bVisible; 137 bOfferParam = props.masterConfig.gdsconfigformslave[iIndexProcess].bVisible;
138 - tabOfferParam = props.masterConfig.gdsconfigformslave[iIndexProcess].sChinese; 138 + tabOfferParam = props.masterConfig.gdsconfigformslave[iIndexProcess].showName;
139 } 139 }
140 } 140 }
141 141
@@ -145,7 +145,7 @@ const ProcessComponent = Form.create({ @@ -145,7 +145,7 @@ const ProcessComponent = Form.create({
145 const iIndexProcess = props.masterConfig.gdsconfigformslave.findIndex(item => item.sControlName === 'tabReportParam'); 145 const iIndexProcess = props.masterConfig.gdsconfigformslave.findIndex(item => item.sControlName === 'tabReportParam');
146 if (iIndexProcess > -1) { 146 if (iIndexProcess > -1) {
147 bReportParam = props.masterConfig.gdsconfigformslave[iIndexProcess].bVisible; 147 bReportParam = props.masterConfig.gdsconfigformslave[iIndexProcess].bVisible;
148 - tabReportParam = props.masterConfig.gdsconfigformslave[iIndexProcess].sChinese; 148 + tabReportParam = props.masterConfig.gdsconfigformslave[iIndexProcess].showName;
149 } 149 }
150 } 150 }
151 151
@@ -155,7 +155,7 @@ const ProcessComponent = Form.create({ @@ -155,7 +155,7 @@ const ProcessComponent = Form.create({
155 const iIndex = props.masterConfig.gdsconfigformslave.findIndex(item => item.sControlName === 'tabNormParam'); 155 const iIndex = props.masterConfig.gdsconfigformslave.findIndex(item => item.sControlName === 'tabNormParam');
156 if (iIndex > -1) { 156 if (iIndex > -1) {
157 bNormParam = props.masterConfig.gdsconfigformslave[iIndex].bVisible; 157 bNormParam = props.masterConfig.gdsconfigformslave[iIndex].bVisible;
158 - tabNormParam = props.masterConfig.gdsconfigformslave[iIndex].sChinese; 158 + tabNormParam = props.masterConfig.gdsconfigformslave[iIndex].showName;
159 } 159 }
160 } 160 }
161 161
@@ -165,7 +165,7 @@ const ProcessComponent = Form.create({ @@ -165,7 +165,7 @@ const ProcessComponent = Form.create({
165 const iIndex = props.masterConfig.gdsconfigformslave.findIndex(item => item.sControlName === 'tabTestParam'); 165 const iIndex = props.masterConfig.gdsconfigformslave.findIndex(item => item.sControlName === 'tabTestParam');
166 if (iIndex > -1) { 166 if (iIndex > -1) {
167 bTestParam = props.masterConfig.gdsconfigformslave[iIndex].bVisible; 167 bTestParam = props.masterConfig.gdsconfigformslave[iIndex].bVisible;
168 - tabTestParam = props.masterConfig.gdsconfigformslave[iIndex].sChinese; 168 + tabTestParam = props.masterConfig.gdsconfigformslave[iIndex].showName;
169 } 169 }
170 } 170 }
171 let defalutKey = '3'; 171 let defalutKey = '3';
src/components/Manufacture/WorkOrderPack/WorkOrderPackTableTree.js
@@ -8768,6 +8768,7 @@ const WorkOrderComponent = Form.create({ @@ -8768,6 +8768,7 @@ const WorkOrderComponent = Form.create({
8768 } 8768 }
8769 } 8769 }
8770 const autoHeight = `calc( 100vh - 92px )`; 8770 const autoHeight = `calc( 100vh - 92px )`;
  8771 + const chooseCombinePartsName = commonFunc.showLocalMessage(props, 'chooseCombinePartsName', '选择合版部件名称');
8771 8772
8772 return ( 8773 return (
8773 <Form> 8774 <Form>
@@ -9104,7 +9105,7 @@ const WorkOrderComponent = Form.create({ @@ -9104,7 +9105,7 @@ const WorkOrderComponent = Form.create({
9104 combinePartsChooseVisible ? 9105 combinePartsChooseVisible ?
9105 <AntdDraggableModal 9106 <AntdDraggableModal
9106 width={1150} 9107 width={1150}
9107 - title="选择合版部件名称" 9108 + title={chooseCombinePartsName}
9108 visible={combinePartsChooseVisible === undefined ? false : combinePartsChooseVisible} 9109 visible={combinePartsChooseVisible === undefined ? false : combinePartsChooseVisible}
9109 onCancel={props.onCancelModal.bind(this, 'combinePartsChooseVisible')} 9110 onCancel={props.onCancelModal.bind(this, 'combinePartsChooseVisible')}
9110 // onOk={props.onSelectCombinePartsChoose} 9111 // onOk={props.onSelectCombinePartsChoose}
src/mobile/common/CommobileToolBar.js
@@ -421,7 +421,6 @@ class CommobileToolBar extends Component { @@ -421,7 +421,6 @@ class CommobileToolBar extends Component {
421 {this.handleGetMsg(returnData.msg)} 421 {this.handleGetMsg(returnData.msg)}
422 </div> 422 </div>
423 ), 423 ),
424 - okText: '确认',  
425 onOk() {}, 424 onOk() {},
426 }); 425 });
427 bResult = false; 426 bResult = false;