Commit 7d69b2ad5f846b26be8303f5f0c36a4f9dc93f37

Authored by 陈鑫涛
2 parents dd43301a 95578725

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

src/components/Common/CommonBillEvent.js
... ... @@ -2345,7 +2345,7 @@ export default (ChildComponent) => {
2345 2345 }
2346 2346 }
2347 2347 this.props.onSaveState({
2348   - loading: false,
  2348 + loading: false, slaveDelData: [], controlDelData: [], materialsDelData: [], processDelData: [], manyqtysDelData: [], colorDelData: [], packDelData: []
2349 2349 });
2350 2350 return true;
2351 2351 } else {
... ...
src/components/Common/CommonComponent/index.js
... ... @@ -23,7 +23,7 @@ import {
23 23 Tooltip,
24 24 Modal,
25 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 27 import * as commonUtils from "@/utils/utils";
28 28 import styles from "@/index.less";
29 29 import Provinces from "@/assets/provinces.json";
... ... @@ -3526,7 +3526,7 @@ export default class CommonComponent extends Component {
3526 3526 ? `${commonConfig.file_host}file/download?savePathStr=${picAddr[0]}&scale=0.1&sModelsId=100&token=${token}`
3527 3527 : picAddr[0]; /* 缩略图 */
3528 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 3530 const imgTypeList = ["PNG", "SVG", "JPG", "JPEG", "GIF", "BMP", "TIFF", "ICO"];
3531 3531 const officeFileType = picAddr[0].split(".").pop().toUpperCase();
3532 3532 let fileIcon = <FilePdfOutlined />;
... ... @@ -3534,6 +3534,8 @@ export default class CommonComponent extends Component {
3534 3534 fileIcon = <FileWordOutlined />;
3535 3535 } else if (officeFileType === "XLSX") {
3536 3536 fileIcon = <FileExcelOutlined />;
  3537 + } else if (['MP4', 'WEBM', 'OGG'].includes(officeFileType)) {
  3538 + fileIcon = <PlaySquareOutlined />;
3537 3539 }
3538 3540 let imgBox1 = "";
3539 3541 if (officeFileTypeList.includes(officeFileType)) {
... ...
src/components/Common/ToolBar/ToolBarNew.js
... ... @@ -337,7 +337,7 @@ class ToolBarComponent extends Component {
337 337 const { masterConfig = {} } = this.props;
338 338 const { gdsconfigformslave = [] } = masterConfig;
339 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 341 this.btnSendDialogLoaded = true;
342 342 this.props.onSaveState({
343 343 onToolBarBtnClick: this.handleClick,
... ...
src/components/CommonElementEvent/FilfileManageInfo.js
... ... @@ -87,6 +87,7 @@ class FilfileManageInfoComponent extends Component {
87 87 tableDataRow.sSrcId = commonUtils.isNotEmptyObject(currentPane) ? currentPane.sSrcId : '';
88 88 tableDataRow.sSrcSlaveId = commonUtils.isNotEmptyObject(currentPane) ? currentPane.sSrcSlaveId : '';
89 89 tableDataRow.sPicturePath = file.response && file.response.code === 1 ? sPicturePath : '';
  90 + tableDataRow.spicture = tableDataRow.sPicturePath;
90 91 tableDataRow.sFileName = file.response && file.response.code === 1 ? file.name : '';
91 92 tableData.push(tableDataRow);
92 93 this.props.onSaveState({ [`${name}Data`]: tableData });
... ... @@ -127,9 +128,9 @@ class FilfileManageInfoComponent extends Component {
127 128 tableDataRow.sSrcId = commonUtils.isNotEmptyObject(currentPane) ? currentPane.sSrcId : '';
128 129 tableDataRow.sSrcSlaveId = commonUtils.isNotEmptyObject(currentPane) ? currentPane.sSrcSlaveId : '';
129 130 tableDataRow.sPicturePath = file.response && file.response.code === 1 ? sPicturePath : '';
  131 + tableDataRow.spicture = tableDataRow.sPicturePath;
130 132 tableDataRow.sFileName = file.response && file.response.code === 1 ? file.name : '';
131 133 tableData.push(tableDataRow);
132   - console.log('12', tableData);
133 134 // this.props.onSaveState({ [`${name}Data`]: tableData, enabled: true });
134 135 } else if (file.response && file.response.code === -1) {
135 136 message.error(file.response.msg);
... ...
src/components/QuickQuote/index.jsx
... ... @@ -532,13 +532,36 @@ const QuickQuoteEvent = props =&gt; {
532 532 packDelData: packDelDataOld = [],
533 533 } = props;
534 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 566 return addState;
544 567 };
... ... @@ -1570,7 +1593,18 @@ const MasterComponent = props =&gt; {
1570 1593 if (child.sName === "sProductName") {
1571 1594 return (
1572 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 1608 </div>
1575 1609 );
1576 1610 }
... ... @@ -2718,17 +2752,20 @@ const ManyComponent = props =&gt; {
2718 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 2770 useEffect(() => {
2734 2771 const baseCount = masterData.dProductQty || 1000;
... ...
src/components/QuoQuotation/QuotationPackTableTree/QuotationPackTableTree.js
... ... @@ -10058,7 +10058,12 @@ const QuotationComponent = Form.create({
10058 10058 </AntdDraggableModal> : ''
10059 10059 }
10060 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 10068 { true ? '' : <AntdDraggableDiv draggableDivClassName="xly-eject"> <a onClick={props.onEjectRight}> <img src={EjectRight} alt="eject" /></a> </AntdDraggableDiv>}
10064 10069 { true ? '' :
... ...