Commit 7d69b2ad5f846b26be8303f5f0c36a4f9dc93f37
Merge branch 'main' of http://git.xlyprint.cn/zhangz/xlyUmi into main
Showing
6 changed files
with
68 additions
and
23 deletions
src/components/Common/CommonBillEvent.js
| @@ -2345,7 +2345,7 @@ export default (ChildComponent) => { | @@ -2345,7 +2345,7 @@ export default (ChildComponent) => { | ||
| 2345 | } | 2345 | } |
| 2346 | } | 2346 | } |
| 2347 | this.props.onSaveState({ | 2347 | this.props.onSaveState({ |
| 2348 | - loading: false, | 2348 | + loading: false, slaveDelData: [], controlDelData: [], materialsDelData: [], processDelData: [], manyqtysDelData: [], colorDelData: [], packDelData: [] |
| 2349 | }); | 2349 | }); |
| 2350 | return true; | 2350 | return true; |
| 2351 | } else { | 2351 | } else { |
src/components/Common/CommonComponent/index.js
| @@ -23,7 +23,7 @@ import { | @@ -23,7 +23,7 @@ import { | ||
| 23 | Tooltip, | 23 | Tooltip, |
| 24 | Modal, | 24 | Modal, |
| 25 | } from "antd-v4"; | 25 | } from "antd-v4"; |
| 26 | -import {DeleteOutlined, EyeOutlined, FilePdfOutlined, FileWordOutlined, FileExcelOutlined, FileOutlined, RightOutlined } from "@ant-design/icons"; | 26 | +import {DeleteOutlined, EyeOutlined, FilePdfOutlined, FileWordOutlined, FileExcelOutlined, FileOutlined, RightOutlined, PlaySquareOutlined } from "@ant-design/icons"; |
| 27 | import * as commonUtils from "@/utils/utils"; | 27 | import * as commonUtils from "@/utils/utils"; |
| 28 | import styles from "@/index.less"; | 28 | import styles from "@/index.less"; |
| 29 | import Provinces from "@/assets/provinces.json"; | 29 | import Provinces from "@/assets/provinces.json"; |
| @@ -3526,7 +3526,7 @@ export default class CommonComponent extends Component { | @@ -3526,7 +3526,7 @@ export default class CommonComponent extends Component { | ||
| 3526 | ? `${commonConfig.file_host}file/download?savePathStr=${picAddr[0]}&scale=0.1&sModelsId=100&token=${token}` | 3526 | ? `${commonConfig.file_host}file/download?savePathStr=${picAddr[0]}&scale=0.1&sModelsId=100&token=${token}` |
| 3527 | : picAddr[0]; /* 缩略图 */ | 3527 | : picAddr[0]; /* 缩略图 */ |
| 3528 | // const dataPriviewUrl = `${commonConfig.server_host}file/download?savePathStr=${picAddr}&width=800&&height=500&sModelsId=100&token=${token}`; /* 预览 */ | 3528 | // const dataPriviewUrl = `${commonConfig.server_host}file/download?savePathStr=${picAddr}&width=800&&height=500&sModelsId=100&token=${token}`; /* 预览 */ |
| 3529 | - const officeFileTypeList = ["PDF", "DOCX", "XLSX"]; | 3529 | + const officeFileTypeList = ['PDF', 'DOCX', 'XLSX', 'MP4', 'WEBM', 'OGG']; |
| 3530 | const imgTypeList = ["PNG", "SVG", "JPG", "JPEG", "GIF", "BMP", "TIFF", "ICO"]; | 3530 | const imgTypeList = ["PNG", "SVG", "JPG", "JPEG", "GIF", "BMP", "TIFF", "ICO"]; |
| 3531 | const officeFileType = picAddr[0].split(".").pop().toUpperCase(); | 3531 | const officeFileType = picAddr[0].split(".").pop().toUpperCase(); |
| 3532 | let fileIcon = <FilePdfOutlined />; | 3532 | let fileIcon = <FilePdfOutlined />; |
| @@ -3534,6 +3534,8 @@ export default class CommonComponent extends Component { | @@ -3534,6 +3534,8 @@ export default class CommonComponent extends Component { | ||
| 3534 | fileIcon = <FileWordOutlined />; | 3534 | fileIcon = <FileWordOutlined />; |
| 3535 | } else if (officeFileType === "XLSX") { | 3535 | } else if (officeFileType === "XLSX") { |
| 3536 | fileIcon = <FileExcelOutlined />; | 3536 | fileIcon = <FileExcelOutlined />; |
| 3537 | + } else if (['MP4', 'WEBM', 'OGG'].includes(officeFileType)) { | ||
| 3538 | + fileIcon = <PlaySquareOutlined />; | ||
| 3537 | } | 3539 | } |
| 3538 | let imgBox1 = ""; | 3540 | let imgBox1 = ""; |
| 3539 | if (officeFileTypeList.includes(officeFileType)) { | 3541 | if (officeFileTypeList.includes(officeFileType)) { |
src/components/Common/ToolBar/ToolBarNew.js
| @@ -337,7 +337,7 @@ class ToolBarComponent extends Component { | @@ -337,7 +337,7 @@ class ToolBarComponent extends Component { | ||
| 337 | const { masterConfig = {} } = this.props; | 337 | const { masterConfig = {} } = this.props; |
| 338 | const { gdsconfigformslave = [] } = masterConfig; | 338 | const { gdsconfigformslave = [] } = masterConfig; |
| 339 | const sBtnSendDialogConfigList = gdsconfigformslave.filter(item => item.sControlName && item.sControlName.includes("BtnSendDialog")); | 339 | const sBtnSendDialogConfigList = gdsconfigformslave.filter(item => item.sControlName && item.sControlName.includes("BtnSendDialog")); |
| 340 | - if (commonUtils.isNotEmptyArr(sBtnSendDialogConfigList) && !this.props.onToolBarBtnClick) { | 340 | + if (location.pathname === "/indexPage/quotationPackTableTree" || (commonUtils.isNotEmptyArr(sBtnSendDialogConfigList) && !this.props.onToolBarBtnClick)) { |
| 341 | this.btnSendDialogLoaded = true; | 341 | this.btnSendDialogLoaded = true; |
| 342 | this.props.onSaveState({ | 342 | this.props.onSaveState({ |
| 343 | onToolBarBtnClick: this.handleClick, | 343 | onToolBarBtnClick: this.handleClick, |
src/components/CommonElementEvent/FilfileManageInfo.js
| @@ -87,6 +87,7 @@ class FilfileManageInfoComponent extends Component { | @@ -87,6 +87,7 @@ class FilfileManageInfoComponent extends Component { | ||
| 87 | tableDataRow.sSrcId = commonUtils.isNotEmptyObject(currentPane) ? currentPane.sSrcId : ''; | 87 | tableDataRow.sSrcId = commonUtils.isNotEmptyObject(currentPane) ? currentPane.sSrcId : ''; |
| 88 | tableDataRow.sSrcSlaveId = commonUtils.isNotEmptyObject(currentPane) ? currentPane.sSrcSlaveId : ''; | 88 | tableDataRow.sSrcSlaveId = commonUtils.isNotEmptyObject(currentPane) ? currentPane.sSrcSlaveId : ''; |
| 89 | tableDataRow.sPicturePath = file.response && file.response.code === 1 ? sPicturePath : ''; | 89 | tableDataRow.sPicturePath = file.response && file.response.code === 1 ? sPicturePath : ''; |
| 90 | + tableDataRow.spicture = tableDataRow.sPicturePath; | ||
| 90 | tableDataRow.sFileName = file.response && file.response.code === 1 ? file.name : ''; | 91 | tableDataRow.sFileName = file.response && file.response.code === 1 ? file.name : ''; |
| 91 | tableData.push(tableDataRow); | 92 | tableData.push(tableDataRow); |
| 92 | this.props.onSaveState({ [`${name}Data`]: tableData }); | 93 | this.props.onSaveState({ [`${name}Data`]: tableData }); |
| @@ -127,9 +128,9 @@ class FilfileManageInfoComponent extends Component { | @@ -127,9 +128,9 @@ class FilfileManageInfoComponent extends Component { | ||
| 127 | tableDataRow.sSrcId = commonUtils.isNotEmptyObject(currentPane) ? currentPane.sSrcId : ''; | 128 | tableDataRow.sSrcId = commonUtils.isNotEmptyObject(currentPane) ? currentPane.sSrcId : ''; |
| 128 | tableDataRow.sSrcSlaveId = commonUtils.isNotEmptyObject(currentPane) ? currentPane.sSrcSlaveId : ''; | 129 | tableDataRow.sSrcSlaveId = commonUtils.isNotEmptyObject(currentPane) ? currentPane.sSrcSlaveId : ''; |
| 129 | tableDataRow.sPicturePath = file.response && file.response.code === 1 ? sPicturePath : ''; | 130 | tableDataRow.sPicturePath = file.response && file.response.code === 1 ? sPicturePath : ''; |
| 131 | + tableDataRow.spicture = tableDataRow.sPicturePath; | ||
| 130 | tableDataRow.sFileName = file.response && file.response.code === 1 ? file.name : ''; | 132 | tableDataRow.sFileName = file.response && file.response.code === 1 ? file.name : ''; |
| 131 | tableData.push(tableDataRow); | 133 | tableData.push(tableDataRow); |
| 132 | - console.log('12', tableData); | ||
| 133 | // this.props.onSaveState({ [`${name}Data`]: tableData, enabled: true }); | 134 | // this.props.onSaveState({ [`${name}Data`]: tableData, enabled: true }); |
| 134 | } else if (file.response && file.response.code === -1) { | 135 | } else if (file.response && file.response.code === -1) { |
| 135 | message.error(file.response.msg); | 136 | message.error(file.response.msg); |
src/components/QuickQuote/index.jsx
| @@ -532,13 +532,36 @@ const QuickQuoteEvent = props => { | @@ -532,13 +532,36 @@ const QuickQuoteEvent = props => { | ||
| 532 | packDelData: packDelDataOld = [], | 532 | packDelData: packDelDataOld = [], |
| 533 | } = props; | 533 | } = props; |
| 534 | const addState = { | 534 | const addState = { |
| 535 | - slaveDelData: [...slaveDelDataOld, ...slaveData.map(item => ({ ...item, handleType: "del" }))], | ||
| 536 | - controlDelData: [...controlDelDataOld, ...controlData.map(item => ({ ...item, handleType: "del" }))], | ||
| 537 | - materialsDelData: [...materialsDelDataOld, ...materialsData.map(item => ({ ...item, handleType: "del" }))], | ||
| 538 | - processDelData: [...processDelDataOld, ...processData.map(item => ({ ...item, handleType: "del" }))], | ||
| 539 | - manyqtysDelData: [...manyqtysDelDataOld, ...manyqtysData.map(item => ({ ...item, handleType: "del" }))], | ||
| 540 | - colorDelData: [...colorDelDataOld, ...colorData.map(item => ({ ...item, handleType: "del" }))], | ||
| 541 | - packDelData: [...packDelDataOld, ...packData.map(item => ({ ...item, handleType: "del" }))], | 535 | + slaveDelData: [ |
| 536 | + ...slaveDelDataOld, | ||
| 537 | + ...slaveData.filter(item => !slaveDelDataOld.map(item1 => item1.sId).includes(item.sId)).map(item => ({ ...item, handleType: "del" })), | ||
| 538 | + ], | ||
| 539 | + controlDelData: [ | ||
| 540 | + ...controlDelDataOld, | ||
| 541 | + ...controlData.filter(item => !controlDelDataOld.map(item1 => item1.sId).includes(item.sId)).map(item => ({ ...item, handleType: "del" })), | ||
| 542 | + ], | ||
| 543 | + materialsDelData: [ | ||
| 544 | + ...materialsDelDataOld, | ||
| 545 | + ...materialsData | ||
| 546 | + .filter(item => !materialsDelDataOld.map(item1 => item1.sId).includes(item.sId)) | ||
| 547 | + .map(item => ({ ...item, handleType: "del" })), | ||
| 548 | + ], | ||
| 549 | + processDelData: [ | ||
| 550 | + ...processDelDataOld, | ||
| 551 | + ...processData.filter(item => !processDelDataOld.map(item1 => item1.sId).includes(item.sId)).map(item => ({ ...item, handleType: "del" })), | ||
| 552 | + ], | ||
| 553 | + manyqtysDelData: [ | ||
| 554 | + ...manyqtysDelDataOld, | ||
| 555 | + ...manyqtysData.filter(item => !manyqtysDelDataOld.map(item1 => item1.sId).includes(item.sId)).map(item => ({ ...item, handleType: "del" })), | ||
| 556 | + ], | ||
| 557 | + colorDelData: [ | ||
| 558 | + ...colorDelDataOld, | ||
| 559 | + ...colorData.filter(item => !colorDelDataOld.map(item1 => item1.sId).includes(item.sId)).map(item => ({ ...item, handleType: "del" })), | ||
| 560 | + ], | ||
| 561 | + packDelData: [ | ||
| 562 | + ...packDelDataOld, | ||
| 563 | + ...packData.filter(item => !packDelDataOld.map(item1 => item1.sId).includes(item.sId)).map(item => ({ ...item, handleType: "del" })), | ||
| 564 | + ], | ||
| 542 | }; | 565 | }; |
| 543 | return addState; | 566 | return addState; |
| 544 | }; | 567 | }; |
| @@ -1570,7 +1593,18 @@ const MasterComponent = props => { | @@ -1570,7 +1593,18 @@ const MasterComponent = props => { | ||
| 1570 | if (child.sName === "sProductName") { | 1593 | if (child.sName === "sProductName") { |
| 1571 | return ( | 1594 | return ( |
| 1572 | <div className={styles.productNameBtns}> | 1595 | <div className={styles.productNameBtns}> |
| 1573 | - <Button type="link" icon={<UploadOutlined />}></Button> | 1596 | + <Button |
| 1597 | + type="link" | ||
| 1598 | + icon={<UploadOutlined />} | ||
| 1599 | + onClick={() => { | ||
| 1600 | + const { slaveSelectedRowKeys } = props; | ||
| 1601 | + if (commonUtils.isEmptyArr(slaveSelectedRowKeys)) { | ||
| 1602 | + message.warning("请先核价!"); | ||
| 1603 | + return; | ||
| 1604 | + } | ||
| 1605 | + props.onToolBarBtnClick({ key: "BtnUpload" }); | ||
| 1606 | + }} | ||
| 1607 | + ></Button> | ||
| 1574 | </div> | 1608 | </div> |
| 1575 | ); | 1609 | ); |
| 1576 | } | 1610 | } |
| @@ -2718,17 +2752,20 @@ const ManyComponent = props => { | @@ -2718,17 +2752,20 @@ const ManyComponent = props => { | ||
| 2718 | manyDataCache: [], | 2752 | manyDataCache: [], |
| 2719 | }; | 2753 | }; |
| 2720 | 2754 | ||
| 2721 | - props.onSaveState( | ||
| 2722 | - { | ||
| 2723 | - masterData: { ...props.masterData, handleType: props.masterData.handleType || "update" }, | ||
| 2724 | - ...addState, | ||
| 2725 | - }, | ||
| 2726 | - () => { | ||
| 2727 | - props.handleCalcPrice(); | ||
| 2728 | - } | ||
| 2729 | - ); | 2755 | + props.onSaveState({ |
| 2756 | + masterData: { ...props.masterData, handleType: props.masterData.handleType || "update" }, | ||
| 2757 | + calcPriceTime: commonUtils.createSid(), | ||
| 2758 | + ...addState, | ||
| 2759 | + }); | ||
| 2730 | }; | 2760 | }; |
| 2731 | 2761 | ||
| 2762 | + useEffect(() => { | ||
| 2763 | + if (props.calcPriceTime) { | ||
| 2764 | + props.onSaveState({ calcPriceTime: undefined }); | ||
| 2765 | + props.handleCalcPrice(); | ||
| 2766 | + } | ||
| 2767 | + }, [props.calcPriceTime]); | ||
| 2768 | + | ||
| 2732 | // 根据主表数量更改多数量表 | 2769 | // 根据主表数量更改多数量表 |
| 2733 | useEffect(() => { | 2770 | useEffect(() => { |
| 2734 | const baseCount = masterData.dProductQty || 1000; | 2771 | const baseCount = masterData.dProductQty || 1000; |
src/components/QuoQuotation/QuotationPackTableTree/QuotationPackTableTree.js
| @@ -10058,7 +10058,12 @@ const QuotationComponent = Form.create({ | @@ -10058,7 +10058,12 @@ const QuotationComponent = Form.create({ | ||
| 10058 | </AntdDraggableModal> : '' | 10058 | </AntdDraggableModal> : '' |
| 10059 | } | 10059 | } |
| 10060 | </Layout>} | 10060 | </Layout>} |
| 10061 | - {quickQuoteModelNew && <QuickQuote {...props} bLinkFieledClick={bLinkFieledClick} />} | 10061 | + {quickQuoteModelNew && ( |
| 10062 | + <> | ||
| 10063 | + <div style={{ display: 'none' }}><Toolbar {...props} /></div> | ||
| 10064 | + <QuickQuote {...props} bLinkFieledClick={bLinkFieledClick} /> | ||
| 10065 | + </> | ||
| 10066 | + )} | ||
| 10062 | 10067 | ||
| 10063 | { true ? '' : <AntdDraggableDiv draggableDivClassName="xly-eject"> <a onClick={props.onEjectRight}> <img src={EjectRight} alt="eject" /></a> </AntdDraggableDiv>} | 10068 | { true ? '' : <AntdDraggableDiv draggableDivClassName="xly-eject"> <a onClick={props.onEjectRight}> <img src={EjectRight} alt="eject" /></a> </AntdDraggableDiv>} |
| 10064 | { true ? '' : | 10069 | { true ? '' : |