Commit 79cbf38ceb625c6a04161ab67bdae1685c9052ba
Merge branch 'main' of http://git.xlyprint.cn/zhangz/xlyUmi into main
Showing
8 changed files
with
65 additions
and
21 deletions
src/components/Common/AffixMenu.js
| ... | ... | @@ -349,7 +349,12 @@ class AffixMenuComponent extends Component { |
| 349 | 349 | const columniFitWidth = commonFunc.showMessage(app.commonConst, 'columniFitWidth');/* 宽度 */ |
| 350 | 350 | const columnbVisible = commonFunc.showMessage(app.commonConst, 'columnbVisible');/* 是否显示 */ |
| 351 | 351 | const columnsName = commonFunc.showMessage(app.commonConst, 'columnsName');/* 字段名 */ |
| 352 | + const columnsReadOnly = commonFunc.showMessage(app.commonConst, 'columnsReadOnly') || '是否只读';/* 是否自读 */ | |
| 353 | + const columnsFontColor = commonFunc.showMessage(app.commonConst, 'columnsFontColor') || '字体颜色';/* 字体颜色 */ | |
| 352 | 354 | const isDefault = commonFunc.showMessage(app.commonConst, 'isDefault');/* 是否设置默认 */ |
| 355 | + const BtnSure = commonFunc.showMessage(app.commonConst, 'BtnSure') || '确认';/* 按钮确认 */ | |
| 356 | + const BtnCancel = commonFunc.showMessage(app.commonConst, 'BtnCancel') || '取消';/* 按钮取消 */ | |
| 357 | + const selectAll = commonFunc.showMessage(app.commonConst, 'selectAll') || '全选';/* 全选 */ | |
| 353 | 358 | // eslint-disable-next-line no-unused-vars |
| 354 | 359 | Object.keys(modalData).forEach((child, i) => { |
| 355 | 360 | const splitArr = commonUtils.isNotEmptyObject(child) && commonUtils.isNotEmptyArr(child.split('_')) ? child.split('_') : []; |
| ... | ... | @@ -404,11 +409,11 @@ class AffixMenuComponent extends Component { |
| 404 | 409 | visible += 1; |
| 405 | 410 | } |
| 406 | 411 | } |
| 407 | - checkAll = <span>全选 <Checkbox indeterminate={visible !== len && visible} defaultChecked={visible === len} onChange={e => this.onCheckAll(e, child, count, configId)} /></span>; | |
| 412 | + checkAll = <span>{selectAll} <Checkbox indeterminate={visible !== len && visible} defaultChecked={visible === len} onChange={e => this.onCheckAll(e, child, count, configId)} /></span>; | |
| 408 | 413 | } |
| 409 | 414 | if (this.props.app.userinfo.sType === 'sysadmin' || true) { /* 管理员设置列是否可修改 */ |
| 410 | 415 | columns.push({ |
| 411 | - title: '是否只读', | |
| 416 | + title: columnsReadOnly, | |
| 412 | 417 | dataIndex: 'bReadonly', |
| 413 | 418 | render: (text, record) => this.renderColumns(text, 'bReadonly', configId, record), |
| 414 | 419 | width: 80, |
| ... | ... | @@ -416,7 +421,7 @@ class AffixMenuComponent extends Component { |
| 416 | 421 | } |
| 417 | 422 | if (this.props.app.userinfo.sType === 'sysadmin' || true) { /* 管理员设置列颜色 */ |
| 418 | 423 | columns.push({ |
| 419 | - title: '字体颜色', | |
| 424 | + title: columnsFontColor, | |
| 420 | 425 | dataIndex: 'sFontColor', |
| 421 | 426 | render: (text, record) => this.renderColumns(text, 'sFontColor', configId, record), |
| 422 | 427 | width: 80, |
| ... | ... | @@ -484,6 +489,8 @@ class AffixMenuComponent extends Component { |
| 484 | 489 | onCancel={this.handlePpopUpPaneCancel.bind(this)} |
| 485 | 490 | onOk={this.handleOk.bind(this)} |
| 486 | 491 | width={1000} |
| 492 | + okText={BtnSure} | |
| 493 | + cancelText={BtnCancel} | |
| 487 | 494 | > |
| 488 | 495 | <div className={styles.modalsContent}> |
| 489 | 496 | { | ... | ... |
src/components/Common/CommonBase.js
| ... | ... | @@ -981,6 +981,9 @@ export default (ChildComponent) => { |
| 981 | 981 | * 原代码: |
| 982 | 982 | */ |
| 983 | 983 | let billNum = ''; |
| 984 | + let footTotalStr = ''; | |
| 985 | + const footTotal =commonFunc.showMessage(this.props.app.commonConst, 'footTotal') || | |
| 986 | + '当前显示 共${billNum}个单据 共${total}条记录'; | |
| 984 | 987 | if (dataReturn.dataset.billNum) { |
| 985 | 988 | billNum = `共${dataReturn.dataset.billNum}个单据 `; |
| 986 | 989 | } |
| ... | ... | @@ -993,8 +996,9 @@ export default (ChildComponent) => { |
| 993 | 996 | current: dataReturn.dataset.currentPageNo, |
| 994 | 997 | pageSize: pageSize, |
| 995 | 998 | showTotal: (total) => { |
| 999 | + footTotalStr = footTotal.replace('${billNum}', dataReturn.dataset.billNum).replace('${total}', total); | |
| 996 | 1000 | return ( |
| 997 | - <span style={{fontWeight: 'bold'}}>{`当前显示 ${billNum}共${total}条记录`}</span> | |
| 1001 | + <span style={{fontWeight: 'bold'}}>{footTotalStr}</span> | |
| 998 | 1002 | ); |
| 999 | 1003 | }, |
| 1000 | 1004 | }; | ... | ... |
src/components/Common/CommonTable/index.js
| ... | ... | @@ -2858,6 +2858,7 @@ class CommonTableRc extends React.Component { |
| 2858 | 2858 | let sAlumitePopup = false; /* 选择电化铝 */ |
| 2859 | 2859 | let bCopyMore = false; /* 复制多行 */ |
| 2860 | 2860 | let bReplace = false; /* 替换数据 */ |
| 2861 | + const setOperation = commonFunc.showMessage(props.app.commonConst, 'operation') || '操作'; | |
| 2861 | 2862 | const bShowTreeAdd = props.tableProps.bShowTreeAdd && this.findIsExistByControlName(props, 'BtnAdd'); /* 添加树节点 */ |
| 2862 | 2863 | const bShowTreeAddChild = props.tableProps.bShowTreeAddChild && this.findIsExistByControlName(props, 'BtnAddChildNode'); /* 添加树节点 */ |
| 2863 | 2864 | const bShowTreeDel = props.tableProps.bShowTreeDel && this.findIsExistByControlName(props, 'BtnDel'); /* 添加树节点 */ |
| ... | ... | @@ -3185,7 +3186,7 @@ class CommonTableRc extends React.Component { |
| 3185 | 3186 | style={{ |
| 3186 | 3187 | width: '100%', height: '100%', display: 'flex', justifyContent: 'left', textDecoration: 'none', |
| 3187 | 3188 | }} |
| 3188 | - >操作 {uploadIcon ? <Upload {...divProps} disabled={!this.props.enabled}> | |
| 3189 | + >{setOperation} {uploadIcon ? <Upload {...divProps} disabled={!this.props.enabled}> | |
| 3189 | 3190 | <a {...uploadProps} |
| 3190 | 3191 | contenteditable="true" |
| 3191 | 3192 | ref={(ref) => {this.uploadRef1 = ref;}} |
| ... | ... | @@ -4344,6 +4345,8 @@ class CommonTableRc extends React.Component { |
| 4344 | 4345 | const { tableColumn, totalData, totalData1 } = this.state; |
| 4345 | 4346 | const { dNetMoney, dNetPrice } = this.props.app.decimals; |
| 4346 | 4347 | const sModelsType = commonUtils.isNotEmptyObject(this.props) && commonUtils.isNotEmptyObject(this.props.app) ? this.props.app.currentPane.sModelsType : ''; |
| 4348 | + const sumset = commonFunc.showMessage(this.props.app.commonConst, 'sumSet') || '合计'; | |
| 4349 | + | |
| 4347 | 4350 | let colSpan = 0; |
| 4348 | 4351 | if ((!totalData.length && !totalData1.length) || this.props.footer !== undefined) { |
| 4349 | 4352 | return (<></>); |
| ... | ... | @@ -4363,7 +4366,7 @@ class CommonTableRc extends React.Component { |
| 4363 | 4366 | let summaryCellTotal = ''; |
| 4364 | 4367 | summaryCellTotal = ( |
| 4365 | 4368 | <Table.Summary.Cell key={0} colSpan={colSpan ? colSpan: 1} index={0}> |
| 4366 | - <span className={styles.summaryCellTotal}>合计</span> | |
| 4369 | + <span className={styles.summaryCellTotal}>{sumset}</span> | |
| 4367 | 4370 | </Table.Summary.Cell> |
| 4368 | 4371 | ); |
| 4369 | 4372 | // if(this.props.slaveInfo) { | ... | ... |
src/components/Common/PersonCenter/PersonCenter.js
| ... | ... | @@ -115,8 +115,9 @@ class PersonCenter extends Component { |
| 115 | 115 | }; |
| 116 | 116 | dispatch({ type: 'app/addPane', payload: { pane } }); |
| 117 | 117 | } else if (e.key === 'clearOption') { |
| 118 | + const recordDeletion = commonFunc.showMessage(this.props.app.commonConst, 'recordDeletion') || '记录删除';/* 人脸采集 */ | |
| 118 | 119 | sessionStorage.clear(); |
| 119 | - this.clearSocket({ optName: '记录删除' }); | |
| 120 | + this.clearSocket({ optName: recordDeletion }); | |
| 120 | 121 | commonUtils.clearStoreDropDownData(); |
| 121 | 122 | } else if (e.key === 'about') { |
| 122 | 123 | this.handleShowAbout(); |
| ... | ... | @@ -858,7 +859,8 @@ const PersonCenterOnlineUser = Form.create({ |
| 858 | 859 | onlineUserState = {}, |
| 859 | 860 | onExitTbRow, |
| 860 | 861 | } = props; |
| 861 | - const OnlineUserName = '在线用户'; | |
| 862 | + const OnlineUsers = commonFunc.showMessage(props.app.commonConst, 'OnlineUsers');/* 在线用户 */ | |
| 863 | + const OnlineUserName = { OnlineUsers }; | |
| 862 | 864 | // const ModifyPassword = commonFunc.showMessage(app.commonConst, 'ModifyPassword');/* 修改密码 */ |
| 863 | 865 | const onlineUserDataNew = commonUtils.isNotEmptyObject(onlineUserData) ? onlineUserData : {}; |
| 864 | 866 | const onlineUserConfig = { | ... | ... |
src/components/FaceDetect/index.js
| ... | ... | @@ -6,6 +6,7 @@ import { Progress, message } from 'antd-v4'; |
| 6 | 6 | import * as commonServices from "../../services/services"; |
| 7 | 7 | import config from '@/utils/config'; |
| 8 | 8 | import './index.less'; |
| 9 | +import * as commonFunc from "../Common/commonFunc"; | |
| 9 | 10 | |
| 10 | 11 | let token = '92d3bf5f3edcb55c731acb11b7f28202'; // 测试的删除token |
| 11 | 12 | |
| ... | ... | @@ -407,7 +408,8 @@ class FaceDetect extends Component { |
| 407 | 408 | |
| 408 | 409 | render() { |
| 409 | 410 | const enable = ((this.props.enabled && this.user_id !== '' )|| this.props.actionType === 'identifyFace'); |
| 410 | - return ( | |
| 411 | + const faceCollection = commonFunc.showMessage(this.props.app.commonConst, 'faceCollection') || '人脸采集';/* 人脸采集 */ | |
| 412 | + return ( | |
| 411 | 413 | <> |
| 412 | 414 | <div className="face-recognition-container"> |
| 413 | 415 | <div className="face-recognition"> |
| ... | ... | @@ -420,21 +422,28 @@ class FaceDetect extends Component { |
| 420 | 422 | </div> |
| 421 | 423 | <div className="tips"> |
| 422 | 424 | <span>{this.state.statusContent}</span> |
| 423 | - { | |
| 424 | - (this.state.currentPercent > 0) && <Progress type="circle" percent={this.state.currentPercent} status={this.state.percentStatus} width={20} strokeWidth={10} format={() => ''}/> | |
| 425 | - } | |
| 425 | + {this.state.currentPercent > 0 && ( | |
| 426 | + <Progress | |
| 427 | + type="circle" | |
| 428 | + percent={this.state.currentPercent} | |
| 429 | + status={this.state.percentStatus} | |
| 430 | + width={20} | |
| 431 | + strokeWidth={10} | |
| 432 | + format={() => ""} | |
| 433 | + /> | |
| 434 | + )} | |
| 426 | 435 | </div> |
| 427 | 436 | <video id="video" autoPlay="autoplay"></video> |
| 428 | - { this.state.thumbImg !== '' && <img src={this.state.thumbImg} className={"thumb-img"} alt=""/>} | |
| 437 | + {this.state.thumbImg !== "" && <img src={this.state.thumbImg} className={"thumb-img"} alt="" />} | |
| 429 | 438 | <div className="canvas-wrapper"> |
| 430 | 439 | <canvas id="canvas" width="268" height="214"></canvas> |
| 431 | 440 | </div> |
| 432 | - <div className={`action ${enable ? '' : 'action_disabled'}`}> | |
| 441 | + <div className={`action ${enable ? "" : "action_disabled"}`}> | |
| 433 | 442 | <div onClick={() => this.handleEvent(enable)} className="action-item"> |
| 434 | 443 | <span className="action-item-icon"> |
| 435 | 444 | <VideoCameraOutlined /> |
| 436 | 445 | </span> |
| 437 | - <span>人脸采集</span> | |
| 446 | + <span>{faceCollection}</span> | |
| 438 | 447 | </div> |
| 439 | 448 | </div> |
| 440 | 449 | </div> |
| ... | ... | @@ -447,7 +456,7 @@ class FaceDetect extends Component { |
| 447 | 456 | {/* <Button onClick={this.getFaceList}>用户列表</Button>*/} |
| 448 | 457 | {/*</div>*/} |
| 449 | 458 | </> |
| 450 | - ) | |
| 459 | + ); | |
| 451 | 460 | } |
| 452 | 461 | } |
| 453 | 462 | ... | ... |
src/components/QuickQuote/index.jsx
| ... | ... | @@ -436,7 +436,7 @@ const QuickQuoteEvent = props => { |
| 436 | 436 | loading: true, |
| 437 | 437 | }, |
| 438 | 438 | () => { |
| 439 | - props.onButtonClick("BtnDraft"); | |
| 439 | + props.onButtonClick("BtnDraft", true); | |
| 440 | 440 | } |
| 441 | 441 | ); |
| 442 | 442 | }; |
| ... | ... | @@ -763,6 +763,17 @@ const QuickQuoteEvent = props => { |
| 763 | 763 | processAfterDataRow.sId = commonUtils.createSid(); |
| 764 | 764 | processAfterDataRow.sParentId = masterData.sId; |
| 765 | 765 | processAfterDataRow.sControlId = partsDataRow.sId; |
| 766 | + | |
| 767 | + const sBackendParams = process.sBackendParams || []; | |
| 768 | + if (sBackendParams.length) { | |
| 769 | + const sQuoParams = sBackendParams.map(item => ({ | |
| 770 | + sParamName: item.sParam, | |
| 771 | + sParamValue: item.value !== undefined ? item.value : "", | |
| 772 | + bSelfCbx: !(item.value === "" || item.value === undefined), | |
| 773 | + })); | |
| 774 | + processAfterDataRow.sQuoParams = JSON.stringify(sQuoParams); | |
| 775 | + } | |
| 776 | + | |
| 766 | 777 | // processAfterDataRow.sSlaveId = ' '; |
| 767 | 778 | processData.push(processAfterDataRow); |
| 768 | 779 | // 配套工序 | ... | ... |
src/components/QuoQuotation/QuotationPackTableTree/QuotationPackTableTree.js
| ... | ... | @@ -2340,6 +2340,7 @@ class QuotationPackTableTree extends Component { |
| 2340 | 2340 | if(commonUtils.isNotEmptyObject(manyqtysConfig)) { |
| 2341 | 2341 | data.push(commonBusiness.mergeData('manyqtys', `${manyqtysConfig.sTbName.toLowerCase()}_tmp`, manyqtysData?.map(item => { |
| 2342 | 2342 | delete item.manyData; |
| 2343 | + item.handleType = item.handleType || 'update'; | |
| 2343 | 2344 | return item; |
| 2344 | 2345 | }), [], true)); |
| 2345 | 2346 | } |
| ... | ... | @@ -2389,11 +2390,12 @@ class QuotationPackTableTree extends Component { |
| 2389 | 2390 | processData = this.sortData(controlData, processData); |
| 2390 | 2391 | const addState = {}; |
| 2391 | 2392 | if(commonUtils.isNotEmptyObject(manyqtysConfig)) { |
| 2393 | + const manyqtysDataOld = cloneDeep(manyqtysData); | |
| 2392 | 2394 | manyqtysData = valueReturn[`${manyqtysConfig.sTbName.toLowerCase()}_tmp`]?.map((item, index) => { |
| 2393 | 2395 | return { |
| 2394 | 2396 | ...item, |
| 2395 | 2397 | sId: manyqtysData[index] ? manyqtysData[index].sId : item.sId, |
| 2396 | - handleType: dQuickQuoteProductQty ? 'add' : item.handleType | |
| 2398 | + handleType: dQuickQuoteProductQty ? 'add' : (manyqtysDataOld[index].handleType || item.handleType) | |
| 2397 | 2399 | } |
| 2398 | 2400 | }); |
| 2399 | 2401 | if (cacheIndex === -1 && manyqtysData?.some(item => item.manyData)) { |
| ... | ... | @@ -6755,9 +6757,9 @@ class QuotationPackTableTree extends Component { |
| 6755 | 6757 | } |
| 6756 | 6758 | } |
| 6757 | 6759 | } else { /* packData没数据时 */ |
| 6758 | - const packDataRow = this.handlePackDataAdd(slaveItem, 0, tableDataRow.sId, 'add'); | |
| 6760 | + const packDataRow = this.handlePackDataAdd(slaveDataRow, 0, tableDataRow.sId, 'add'); | |
| 6759 | 6761 | packDataRow.dCombineQty = tableDataRow.dSinglePQty; |
| 6760 | - packDataRow.dFactProductQty = commonUtils.isNull(slaveItem.dProductQty, 0); /* 排版数为1时,实际生产数 = 产品数 */ | |
| 6762 | + packDataRow.dFactProductQty = commonUtils.isNull(slaveDataRow.dProductQty, 0); /* 排版数为1时,实际生产数 = 产品数 */ | |
| 6761 | 6763 | if (tableDataRow.dSinglePQty > 0) { |
| 6762 | 6764 | const { sId, sProductNo, dProductQty, dCombineQty, dFactProductQty,sCombinePartsName }= packDataRow; |
| 6763 | 6765 | const tableCombineSelectedData =[]; | ... | ... |
src/routes/tab/tab.js
| ... | ... | @@ -75,6 +75,7 @@ import CommonNewListBill from "@/routes/common/commonNewListBill"; /* é€šç”¨å•æ |
| 75 | 75 | import CommonGroupBill from "@/routes/common/commonGroupBill"; /* é€šç”¨å•æ®é¡µ */ |
| 76 | 76 | import PrintPdf from "../printPdf/printPdf"; /* å•预览 */ |
| 77 | 77 | import Feedback from '../feedback/feedback'; |
| 78 | +import * as commonFunc from "@/components/Common/commonFunc"; | |
| 78 | 79 | /* 计算方案s */ |
| 79 | 80 | const { confirm } = Modal; |
| 80 | 81 | const { TabPane } = Tabs; |
| ... | ... | @@ -269,9 +270,12 @@ function Tab({ dispatch, app }) { |
| 269 | 270 | } |
| 270 | 271 | } |
| 271 | 272 | if (app.diffMap && removePane[0] && app.diffMap.get(removePane[0].key)) { |
| 273 | + const contentStr = commonFunc.showMessage(app.commonConst, 'isLeave') || '内容未ä¿å˜ï¼Œæ˜¯å¦ç¦»å¼€ï¼Ÿ';/* 内容未ä¿å˜ï¼Œæ˜¯å¦ç¦»å¼€ï¼Ÿ */ | |
| 274 | + const BtnSure = commonFunc.showMessage(app.commonConst, 'BtnSure') || '确认';/* 按钮确认 */ | |
| 275 | + const BtnCancel = commonFunc.showMessage(app.commonConst, 'BtnCancel') || 'å–æ¶ˆ';/* æŒ‰é’®å–æ¶ˆ */ | |
| 272 | 276 | confirm({ |
| 273 | 277 | icon: <ExclamationCircleOutlined />, |
| 274 | - content: "内容未ä¿å˜ï¼Œæ˜¯å¦ç¦»å¼€ï¼Ÿ", | |
| 278 | + content: contentStr, | |
| 275 | 279 | onOk() { |
| 276 | 280 | removeData.forEach(i => { |
| 277 | 281 | clearWebSocketMsg(i); |
| ... | ... | @@ -281,6 +285,8 @@ function Tab({ dispatch, app }) { |
| 281 | 285 | onCancel() { |
| 282 | 286 | console.log("å–æ¶ˆå…³é—"); |
| 283 | 287 | }, |
| 288 | + okText:BtnSure, | |
| 289 | + cancelText:BtnCancel | |
| 284 | 290 | }); |
| 285 | 291 | } else { |
| 286 | 292 | removeData.forEach(i => { | ... | ... |