Commit 9557872502f2d938e99028f9db7f32dd2e79ab7d

Authored by zhangzzzz
1 parent 8cb21212

新增附件上传;

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
... ... @@ -1593,7 +1593,18 @@ const MasterComponent = props =&gt; {
1593 1593 if (child.sName === "sProductName") {
1594 1594 return (
1595 1595 <div className={styles.productNameBtns}>
1596   - <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>
1597 1608 </div>
1598 1609 );
1599 1610 }
... ...
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 ? '' :
... ...