Commit 43b738e252a4d0af7e7e65e5b4ea0a5280aca75d
Merge branch 'main' of http://git.xlyprint.cn/zhangz/xlyUmi into main
Showing
7 changed files
with
53 additions
and
18 deletions
src/components/Common/CommonListSelect/index.js
| @@ -349,6 +349,9 @@ class CommonList extends Component { | @@ -349,6 +349,9 @@ class CommonList extends Component { | ||
| 349 | token, sModelsId, slaveFilterCondition, slaveConfig, slavePagination, slaveOrderBy, app, | 349 | token, sModelsId, slaveFilterCondition, slaveConfig, slavePagination, slaveOrderBy, app, |
| 350 | } = this.props; | 350 | } = this.props; |
| 351 | const { userinfo } = app; | 351 | const { userinfo } = app; |
| 352 | + const BtnSure = commonFunc.showLocalMessage(this.props, 'BtnSure', '确定'); | ||
| 353 | + const FriendlyReminder = commonFunc.showLocalMessage(this.props, 'FriendlyReminder', '温馨提示'); | ||
| 354 | + | ||
| 352 | const onSendSocketMessage = this.props.handleSendSocketMessage; | 355 | const onSendSocketMessage = this.props.handleSendSocketMessage; |
| 353 | const returnData = await commonBusiness.saveData({ token, value: params, sModelsId }); | 356 | const returnData = await commonBusiness.saveData({ token, value: params, sModelsId }); |
| 354 | this.props.onSaveState({ | 357 | this.props.onSaveState({ |
| @@ -360,7 +363,7 @@ class CommonList extends Component { | @@ -360,7 +363,7 @@ class CommonList extends Component { | ||
| 360 | // eslint-disable-next-line no-underscore-dangle | 363 | // eslint-disable-next-line no-underscore-dangle |
| 361 | const _this = this; | 364 | const _this = this; |
| 362 | confirm({ | 365 | confirm({ |
| 363 | - title: '单据校验', /* 防呆校验 */ | 366 | + title: FriendlyReminder, /* 防呆校验 */ |
| 364 | content: returnData.msg, | 367 | content: returnData.msg, |
| 365 | onOk() { | 368 | onOk() { |
| 366 | params.iFlag = 1; | 369 | params.iFlag = 1; |
| @@ -368,8 +371,6 @@ class CommonList extends Component { | @@ -368,8 +371,6 @@ class CommonList extends Component { | ||
| 368 | }, | 371 | }, |
| 369 | onCancel() { | 372 | onCancel() { |
| 370 | }, | 373 | }, |
| 371 | - okText: '保存', | ||
| 372 | - cancelText: '不保存', | ||
| 373 | }); | 374 | }); |
| 374 | this.props.onSaveState({ | 375 | this.props.onSaveState({ |
| 375 | loading: false, | 376 | loading: false, |
| @@ -377,13 +378,12 @@ class CommonList extends Component { | @@ -377,13 +378,12 @@ class CommonList extends Component { | ||
| 377 | return true; | 378 | return true; |
| 378 | } else if (returnData.code === 2 || returnData.code === -8) { | 379 | } else if (returnData.code === 2 || returnData.code === -8) { |
| 379 | Modal.info({ | 380 | Modal.info({ |
| 380 | - title: '温馨提示:', | 381 | + title: FriendlyReminder, |
| 381 | content: ( | 382 | content: ( |
| 382 | <div> | 383 | <div> |
| 383 | {commonFunc.getReturnMsg(returnData.msg)} | 384 | {commonFunc.getReturnMsg(returnData.msg)} |
| 384 | </div> | 385 | </div> |
| 385 | ), | 386 | ), |
| 386 | - okText: '确认', | ||
| 387 | onOk() {}, | 387 | onOk() {}, |
| 388 | }); | 388 | }); |
| 389 | } else { | 389 | } else { |
| @@ -855,8 +855,8 @@ const CommonListComponent = Form.create({ | @@ -855,8 +855,8 @@ const CommonListComponent = Form.create({ | ||
| 855 | }; | 855 | }; |
| 856 | const upInvoiceName = commonUtils.isNotEmptyArr(btnUploadApi) ? btnUploadApi[0].showName : '发票上传(金税)'; | 856 | const upInvoiceName = commonUtils.isNotEmptyArr(btnUploadApi) ? btnUploadApi[0].showName : '发票上传(金税)'; |
| 857 | 857 | ||
| 858 | - const BtnSure = commonFunc.showLocalMessage(this.props, 'BtnSure', '确定'); | ||
| 859 | - const BtnCancel = commonFunc.showLocalMessage(this.props, 'BtnCancel', '取消'); | 858 | + const BtnSure = commonFunc.showLocalMessage(props, 'BtnSure', '确定'); |
| 859 | + const BtnCancel = commonFunc.showLocalMessage(props, 'BtnCancel', '取消'); | ||
| 860 | 860 | ||
| 861 | return ( | 861 | return ( |
| 862 | <Form > | 862 | <Form > |
src/components/Common/CommonListSelectMulti/index.js
| @@ -832,6 +832,8 @@ const CommonListComponent = Form.create({ | @@ -832,6 +832,8 @@ const CommonListComponent = Form.create({ | ||
| 832 | const sProcessParams = commonFunc.showMessage(app.commonConst, 'sProcessParams');/* 选择工艺参数标题 */ | 832 | const sProcessParams = commonFunc.showMessage(app.commonConst, 'sProcessParams');/* 选择工艺参数标题 */ |
| 833 | const displayLeft = (sModelsType !== 'search/sisColor' && sModelsType !== 'search/commonPopup'); | 833 | const displayLeft = (sModelsType !== 'search/sisColor' && sModelsType !== 'search/commonPopup'); |
| 834 | const realizeHeight = commonUtils.isNotEmptyNumber(props.realizeHeight) ? props.realizeHeight : 0; | 834 | const realizeHeight = commonUtils.isNotEmptyNumber(props.realizeHeight) ? props.realizeHeight : 0; |
| 835 | + const BtnSure = commonFunc.showLocalMessage(this.props, 'BtnSure', '确定'); | ||
| 836 | + const BtnCancel = commonFunc.showLocalMessage(this.props, 'BtnCancel', '取消'); | ||
| 835 | const btnClick = (btn) => { | 837 | const btnClick = (btn) => { |
| 836 | const { sControlName } = btn; | 838 | const { sControlName } = btn; |
| 837 | const picArr = slaveConfig.gdsconfigformslave.filter(item => (item.sName === 'picArr')); | 839 | const picArr = slaveConfig.gdsconfigformslave.filter(item => (item.sName === 'picArr')); |
| @@ -915,8 +917,8 @@ const CommonListComponent = Form.create({ | @@ -915,8 +917,8 @@ const CommonListComponent = Form.create({ | ||
| 915 | width: '50%', textAlign: 'right', marginRight: '9px', marginBottom: '9px', | 917 | width: '50%', textAlign: 'right', marginRight: '9px', marginBottom: '9px', |
| 916 | }} | 918 | }} |
| 917 | > | 919 | > |
| 918 | - <Button key="back" style={{ marginRight: '8px' }} onClick={props.onCancel}>取消</Button> | ||
| 919 | - <Button type="primary" onClick={props.onSelect}>确认</Button> | 920 | + <Button key="back" style={{ marginRight: '8px' }} onClick={props.onCancel}>{BtnCancel}</Button> |
| 921 | + <Button type="primary" onClick={props.onSelect}>{BtnSure}</Button> | ||
| 920 | </div> | 922 | </div> |
| 921 | </div> | 923 | </div> |
| 922 | </Layout> | 924 | </Layout> |
src/components/Common/SlaveMemo.js
| @@ -11,6 +11,7 @@ import ShowType from './CommonComponent';/* 通用方法 */ | @@ -11,6 +11,7 @@ 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 | import * as commonFunc from "@/components/Common/commonFunc"; |
| 14 | +import * as commonBusiness from '@/components/Common/commonBusiness'; /* 单据业务功能 */ | ||
| 14 | 15 | ||
| 15 | const { TextArea } = Input; | 16 | const { TextArea } = Input; |
| 16 | const FormItem = Form.Item; | 17 | const FormItem = Form.Item; |
| @@ -64,6 +65,12 @@ export default class SlaveMemo extends Component { | @@ -64,6 +65,12 @@ export default class SlaveMemo extends Component { | ||
| 64 | 65 | ||
| 65 | let valueKey = ''; | 66 | let valueKey = ''; |
| 66 | if (commonUtils.isNotEmptyArr(slaveMemoConfig) && commonUtils.isNotEmptyObject(masterData)) { | 67 | if (commonUtils.isNotEmptyArr(slaveMemoConfig) && commonUtils.isNotEmptyObject(masterData)) { |
| 68 | + const newConfig = { | ||
| 69 | + gdsconfigformslave :slaveMemoConfig | ||
| 70 | + } | ||
| 71 | + if (!commonBusiness.validateTable(newConfig, [masterData], this.props)) { | ||
| 72 | + return; | ||
| 73 | + } | ||
| 67 | // eslint-disable-next-line array-callback-return | 74 | // eslint-disable-next-line array-callback-return |
| 68 | slaveMemoConfig.map((item) => { | 75 | slaveMemoConfig.map((item) => { |
| 69 | /** | 76 | /** |
src/components/CommonSystemSettingEvent/CommonSystemSetting.js
| @@ -88,6 +88,11 @@ const CommonSystemSettingComponent = Form.create({ | @@ -88,6 +88,11 @@ const CommonSystemSettingComponent = Form.create({ | ||
| 88 | onFilterData: props.onFilterData, | 88 | onFilterData: props.onFilterData, |
| 89 | tableProps: { AutoTableHeight: 200 }, | 89 | tableProps: { AutoTableHeight: 200 }, |
| 90 | }; | 90 | }; |
| 91 | + const AccountingPeriod = commonFunc.showLocalMessage(props, 'AccountingPeriod', '会计期间'); | ||
| 92 | + const SalesProductionParameters = commonFunc.showLocalMessage(props, 'SalesProductionParameters', '销售采购生产参数'); | ||
| 93 | + const FinancialWarehouseParameters = commonFunc.showLocalMessage(props, 'FinancialWarehouseParameters', '财务仓库报价参数'); | ||
| 94 | + const DocumentNumberSetup= commonFunc.showLocalMessage(props, 'DocumentNumberSetup', '单据编号设置'); | ||
| 95 | + const SystemSetting = commonFunc.showLocalMessage(props, 'SystemSetting', '系统参数'); | ||
| 91 | return ( | 96 | return ( |
| 92 | <Form> | 97 | <Form> |
| 93 | <Layout> | 98 | <Layout> |
| @@ -98,16 +103,16 @@ const CommonSystemSettingComponent = Form.create({ | @@ -98,16 +103,16 @@ const CommonSystemSettingComponent = Form.create({ | ||
| 98 | <Content className={selfStyles.container}> | 103 | <Content className={selfStyles.container}> |
| 99 | <div> | 104 | <div> |
| 100 | <Tabs className={styles.slaveTabs}> | 105 | <Tabs className={styles.slaveTabs}> |
| 101 | - <TabPane tab="会计期间" key={1}> | 106 | + <TabPane tab={AccountingPeriod} key={1}> |
| 102 | <TabFinancePeriod {...props} /> | 107 | <TabFinancePeriod {...props} /> |
| 103 | </TabPane> | 108 | </TabPane> |
| 104 | - <TabPane tab="销售采购生产参数" key={2}> | 109 | + <TabPane tab={SalesProductionParameters} key={2}> |
| 105 | <TabsSalesBuyer {...props} /> | 110 | <TabsSalesBuyer {...props} /> |
| 106 | </TabPane> | 111 | </TabPane> |
| 107 | - <TabPane tab="财务仓库报价参数" key={3}> | 112 | + <TabPane tab={FinancialWarehouseParameters} key={3}> |
| 108 | <TabFinanceOffer {...props} /> | 113 | <TabFinanceOffer {...props} /> |
| 109 | </TabPane> | 114 | </TabPane> |
| 110 | - <TabPane tab="单据编号设置" key={4}> | 115 | + <TabPane tab={DocumentNumberSetup} key={4}> |
| 111 | <div className="xly-bill-list" > | 116 | <div className="xly-bill-list" > |
| 112 | <StaticEditTable {...tableProps} setOpterationColumn="Y" footer="hidden" /> | 117 | <StaticEditTable {...tableProps} setOpterationColumn="Y" footer="hidden" /> |
| 113 | </div> | 118 | </div> |
| @@ -118,7 +123,7 @@ const CommonSystemSettingComponent = Form.create({ | @@ -118,7 +123,7 @@ const CommonSystemSettingComponent = Form.create({ | ||
| 118 | </div> : '' | 123 | </div> : '' |
| 119 | } | 124 | } |
| 120 | </TabPane> | 125 | </TabPane> |
| 121 | - <TabPane tab="系统参数" key={5}> | 126 | + <TabPane tab={SystemSetting} key={5}> |
| 122 | <TabSysParam {...props} /> | 127 | <TabSysParam {...props} /> |
| 123 | </TabPane> | 128 | </TabPane> |
| 124 | </Tabs> | 129 | </Tabs> |
src/components/Manufacture/ProcessCardPack/ProcessCardPackTableTree.js
| @@ -1906,6 +1906,7 @@ class ProcessCardPackTableTree extends Component { | @@ -1906,6 +1906,7 @@ class ProcessCardPackTableTree extends Component { | ||
| 1906 | gdsformconst, slaveData, controlData, controlSelectedRowKeys, slaveSelectedRowKeys, [`${name}Data`]: tableData, | 1906 | gdsformconst, slaveData, controlData, controlSelectedRowKeys, slaveSelectedRowKeys, [`${name}Data`]: tableData, |
| 1907 | } = this.props; | 1907 | } = this.props; |
| 1908 | let { packData }=this.props; | 1908 | let { packData }=this.props; |
| 1909 | + const selectProduct = commonFunc.showLocalMessage(this.props, 'selectProduct', '请先选择产品!'); | ||
| 1909 | if (name === 'control') { | 1910 | if (name === 'control') { |
| 1910 | /* 增加子部件 */ | 1911 | /* 增加子部件 */ |
| 1911 | const { | 1912 | const { |
| @@ -1979,7 +1980,7 @@ class ProcessCardPackTableTree extends Component { | @@ -1979,7 +1980,7 @@ class ProcessCardPackTableTree extends Component { | ||
| 1979 | if(iIndex ===-1){ | 1980 | if(iIndex ===-1){ |
| 1980 | 1981 | ||
| 1981 | if(commonUtils.isEmptyObject(slaveSelectedRow.sProductId)) { | 1982 | if(commonUtils.isEmptyObject(slaveSelectedRow.sProductId)) { |
| 1982 | - message.error('请先选择产品!'); | 1983 | + message.error(selectProduct); |
| 1983 | return; | 1984 | return; |
| 1984 | } | 1985 | } |
| 1985 | if(slaveSelectedRow){ | 1986 | if(slaveSelectedRow){ |
src/components/Manufacture/WorkOrderPackTableTreeNew/index.js
| @@ -3158,10 +3158,12 @@ const controlProps = props => { | @@ -3158,10 +3158,12 @@ const controlProps = props => { | ||
| 3158 | if (commonUtils.isEmptyArr(packData)) { | 3158 | if (commonUtils.isEmptyArr(packData)) { |
| 3159 | packData = []; | 3159 | packData = []; |
| 3160 | } | 3160 | } |
| 3161 | + const selectProduct = commonFunc.showLocalMessage(props, 'selectProduct', '请先选择产品'); | ||
| 3162 | + | ||
| 3161 | const iIndex = packData.findIndex(item => item.sControlId === tableDataRow.sId); | 3163 | const iIndex = packData.findIndex(item => item.sControlId === tableDataRow.sId); |
| 3162 | if (iIndex === -1) { | 3164 | if (iIndex === -1) { |
| 3163 | if (commonUtils.isEmptyObject(slaveSelectedRow.sProductId)) { | 3165 | if (commonUtils.isEmptyObject(slaveSelectedRow.sProductId)) { |
| 3164 | - message.error("请先选择产品!"); | 3166 | + message.error(selectProduct); |
| 3165 | return; | 3167 | return; |
| 3166 | } | 3168 | } |
| 3167 | if (slaveSelectedRow) { | 3169 | if (slaveSelectedRow) { |
src/components/QuickQuote/index.jsx
| @@ -764,6 +764,19 @@ const QuickQuoteEvent = props => { | @@ -764,6 +764,19 @@ const QuickQuoteEvent = props => { | ||
| 764 | processAfterDataRow.sId = commonUtils.createSid(); | 764 | processAfterDataRow.sId = commonUtils.createSid(); |
| 765 | processAfterDataRow.sParentId = masterData.sId; | 765 | processAfterDataRow.sParentId = masterData.sId; |
| 766 | processAfterDataRow.sControlId = partsDataRow.sId; | 766 | processAfterDataRow.sControlId = partsDataRow.sId; |
| 767 | + | ||
| 768 | + const sBackendParams = process.sBackendParams || []; | ||
| 769 | + if (sBackendParams.length) { | ||
| 770 | + const sQuoParams = sBackendParams.map(item => ({ | ||
| 771 | + sParamKey: item.sParamKey, | ||
| 772 | + sParamKeyNew: item.sParamKeyNew, | ||
| 773 | + sParamName: item.sParam, | ||
| 774 | + sParamValue: item.value !== undefined ? item.value : "", | ||
| 775 | + bSelfCbx: !(item.value === "" || item.value === undefined), | ||
| 776 | + })); | ||
| 777 | + processAfterDataRow.sQuoParams = JSON.stringify(sQuoParams); | ||
| 778 | + } | ||
| 779 | + | ||
| 767 | // processAfterDataRow.sSlaveId = ' '; | 780 | // processAfterDataRow.sSlaveId = ' '; |
| 768 | processData.push(processAfterDataRow); | 781 | processData.push(processAfterDataRow); |
| 769 | // 配套工序 | 782 | // 配套工序 |
| @@ -2484,7 +2497,8 @@ const BackendParamsExtraComponent = props => { | @@ -2484,7 +2497,8 @@ const BackendParamsExtraComponent = props => { | ||
| 2484 | 2497 | ||
| 2485 | const viewConfigs = backendParamsConfig.map((item, index) => ({ | 2498 | const viewConfigs = backendParamsConfig.map((item, index) => ({ |
| 2486 | ...item, | 2499 | ...item, |
| 2487 | - sName: item.sFieldName || `sParams${index}`, | 2500 | + sName0: `sParams${index + 1}`, |
| 2501 | + sName: item.sFieldName || `sParams${index + 1}`, | ||
| 2488 | showName: item.sParam, | 2502 | showName: item.sParam, |
| 2489 | sDropDownType: item.sParamDropDown ? "sql" : "", | 2503 | sDropDownType: item.sParamDropDown ? "sql" : "", |
| 2490 | iColValue: 4, | 2504 | iColValue: 4, |
| @@ -2504,7 +2518,7 @@ const BackendParamsExtraComponent = props => { | @@ -2504,7 +2518,7 @@ const BackendParamsExtraComponent = props => { | ||
| 2504 | tableName: `sBackendParams${boxModel}`, | 2518 | tableName: `sBackendParams${boxModel}`, |
| 2505 | getSqlDropDownData: (...args) => { | 2519 | getSqlDropDownData: (...args) => { |
| 2506 | const showConfig = args[2]; | 2520 | const showConfig = args[2]; |
| 2507 | - const { sParamDropDown = "", sName } = showConfig; | 2521 | + const { sParamDropDown = "", sName0, sName } = showConfig; |
| 2508 | const dropDownData = sParamDropDown.split(","); | 2522 | const dropDownData = sParamDropDown.split(","); |
| 2509 | if (dropDownData?.length) { | 2523 | if (dropDownData?.length) { |
| 2510 | return { | 2524 | return { |
| @@ -2513,6 +2527,8 @@ const BackendParamsExtraComponent = props => { | @@ -2513,6 +2527,8 @@ const BackendParamsExtraComponent = props => { | ||
| 2513 | value: item, | 2527 | value: item, |
| 2514 | sParam: showConfig.sParam, | 2528 | sParam: showConfig.sParam, |
| 2515 | [sName]: item, | 2529 | [sName]: item, |
| 2530 | + sParamKey: sName0, | ||
| 2531 | + sParamKeyNew: sName, | ||
| 2516 | })), | 2532 | })), |
| 2517 | totalPageCount: 1, | 2533 | totalPageCount: 1, |
| 2518 | currentPageNo: 1, | 2534 | currentPageNo: 1, |
| @@ -2533,6 +2549,8 @@ const BackendParamsExtraComponent = props => { | @@ -2533,6 +2549,8 @@ const BackendParamsExtraComponent = props => { | ||
| 2533 | value: changeValue[sFieldName], | 2549 | value: changeValue[sFieldName], |
| 2534 | sParam: showConfig.sParam, | 2550 | sParam: showConfig.sParam, |
| 2535 | [sFieldName]: changeValue[sFieldName], | 2551 | [sFieldName]: changeValue[sFieldName], |
| 2552 | + sParamKey: showConfig.sName0, | ||
| 2553 | + sParamKeyNew: sFieldName, | ||
| 2536 | }; | 2554 | }; |
| 2537 | const { sParam } = dropDownDataSelected; | 2555 | const { sParam } = dropDownDataSelected; |
| 2538 | const { sBackendParams = [] } = slaveData[iIndex].sBackProcessData[iIndex1]; | 2556 | const { sBackendParams = [] } = slaveData[iIndex].sBackProcessData[iIndex1]; |