Commit a1a27ca103580b39445e3953c246c42805951121

Authored by 陈鑫涛
1 parent 1830f667

app快速报价

src/assets/mobile/6.png 0 → 100644

3.67 KB

src/assets/mobile/61.png 0 → 100644

3.64 KB

src/components/QuickQuote/index.jsx
@@ -1187,9 +1187,11 @@ const ContentComponent = props => { @@ -1187,9 +1187,11 @@ const ContentComponent = props => {
1187 // 主表组件 1187 // 主表组件
1188 const MasterComponent = props => { 1188 const MasterComponent = props => {
1189 const { masterConfig, masterData = {}, selectedNode = {} } = props.state; 1189 const { masterConfig, masterData = {}, selectedNode = {} } = props.state;
  1190 + console.log("🚀 ~ masterConfig:", masterConfig)
1190 if (!masterConfig) return ""; 1191 if (!masterConfig) return "";
1191 1192
1192 const ableConfigs = masterConfig.gdsconfigformslave.filter(item => item.sName && item.bVisible); 1193 const ableConfigs = masterConfig.gdsconfigformslave.filter(item => item.sName && item.bVisible);
  1194 + console.log("🚀 ~ ableConfigs:", ableConfigs)
1193 // 处理长宽样式 1195 // 处理长宽样式
1194 const viewConfigs = selectedNode?.bBox ? ableConfigs : ableConfigs.filter(x => x.sName !== "dHeight"); 1196 const viewConfigs = selectedNode?.bBox ? ableConfigs : ableConfigs.filter(x => x.sName !== "dHeight");
1195 if (selectedNode?.bBox) { 1197 if (selectedNode?.bBox) {
src/mobile/components/SelectInput.jsx 0 → 100644
  1 +import React, { useState, useRef, useEffect, useCallback } from "react";
  2 +import { Input, Popup, Button, Toast, PickerView, SearchBar } from "antd-mobile";
  3 +import { DownOutline } from "antd-mobile-icons";
  4 +import commonConfig from "@/utils/config";
  5 +import * as commonServices from "@/services/services";
  6 +import * as commonFunc from "@/components/Common/commonFunc";
  7 +import styles from "./selectInput.less";
  8 +import debounce from "lodash/debounce";
  9 +
  10 +
  11 +const SelectInput = (props) => {
  12 + console.log(props, "SelectInput props");
  13 +
  14 + const [value, setValue] = useState("");
  15 + const [values, setValues] = useState("");
  16 + const [searchValue, setSearchValue] = useState("");
  17 + const [visible, setVisible] = useState(false);
  18 + useEffect(() => {
  19 + // 监听滚动事件
  20 + // const data = getSqlDropDownData()
  21 + // console.log(data, "data");
  22 +
  23 + }, [visible]);
  24 + const [columns, setColumns] = useState([
  25 + { label: "选项1", value: "option1" },
  26 + { label: "选项2", value: "option2" },
  27 + { label: "选项3", value: "option3" },
  28 + ]);
  29 + const [coplyColumns, setCopyColumns] = useState(columns);
  30 + //
  31 + const [hasMore, setHasMore] = useState(true);
  32 + const [loading, setLoading] = useState(false);
  33 +
  34 + const handleConfirm = () => {
  35 + console.log(values, "values");
  36 + setValue(values);
  37 + setVisible(false);
  38 + };
  39 +
  40 + const handleCancel = () => {
  41 + Toast.show("取消按钮被点击");
  42 + setVisible(false);
  43 + };
  44 + const changeInputValue = val => {
  45 + console.log(val, "val");
  46 + };
  47 +
  48 + const searchData = val => {
  49 + // todo调用接口
  50 + setSearchValue(val);
  51 + const list = columns.filter(item => item.label.includes(val));
  52 + setColumns(list);
  53 + if (val === "") {
  54 + console.log(36666);
  55 + setColumns(coplyColumns);
  56 + }
  57 + };
  58 + // 处理选择器变化
  59 + const changeOption = val => {
  60 + setValues(val[0]);
  61 + };
  62 +
  63 + const getSqlDropDownData = async ({ sId, sModelsId, sName }) => {
  64 + const url = `${commonConfig.server_host}business/getSelectLimit/${sId}?sModelsId=${sModelsId}&sName=${sName}`;
  65 + const body = {
  66 + sSqlCondition: "",
  67 + sKeyUpFilterName: "",
  68 + pageNum: 1,
  69 + pageSize: 20,
  70 + };
  71 + const retrunData = await commonServices.postValueService(props.app.token, body, url);
  72 + const sColumnNameConfigStr = retrunData.data?.dataset?.rows?.[0]?.sColumnNameConfig;
  73 + return commonUtils.convertStrToObj(sColumnNameConfigStr, []);
  74 + };
  75 + return (
  76 + <div>
  77 + <div className={styles.inputBox}>
  78 + <Input
  79 + placeholder=""
  80 + value={value}
  81 + onChange={val => {
  82 + setValue(val);
  83 + }}
  84 + />
  85 + <div className={styles.icons} onClick={() => setVisible(true)}>
  86 + <DownOutline />
  87 + </div>
  88 + </div>
  89 + <Popup visible={visible} onMaskClick={() => setVisible(false)} onClose={() => setVisible(false)} bodyStyle={{ height: "50vh" }}>
  90 + <div className={styles.popupHeader}>
  91 + <Button onClick={handleCancel} color="primary" fill="none">
  92 + 取消
  93 + </Button>
  94 + <Button onClick={handleConfirm} color="primary" fill="none">
  95 + 确认
  96 + </Button>
  97 + </div>
  98 + <div style={{ padding: "0 1.5rem", marginTop: "1rem" }}>
  99 + <SearchBar placeholder="请输入内容" showCancelButton value={searchValue} onChange={val => searchData(val)} />
  100 + </div>
  101 + <PickerView
  102 + columns={[columns]}
  103 + value={values}
  104 + onChange={val => changeOption(val)}
  105 + style={{ "--height": "200px", "--item-height": "2.8rem" }}
  106 + />
  107 + </Popup>
  108 + </div>
  109 + );
  110 +};
  111 +
  112 +export default SelectInput;
src/mobile/components/selectInput.css 0 → 100644
  1 +.inputBox {
  2 + position: relative;
  3 +}
  4 +.inputBox .icons {
  5 + position: absolute;
  6 + top: 50%;
  7 + right: 0rem;
  8 + transform: translateY(-50%);
  9 + width: 3.125rem;
  10 + height: 3.125rem;
  11 + line-height: 3.125rem;
  12 + text-align: center;
  13 +}
  14 +.inputBox .pickerWrapper {
  15 + flex: 1;
  16 + overflow-y: auto;
  17 + -webkit-overflow-scrolling: touch;
  18 +}
  19 +.popupHeader {
  20 + display: flex;
  21 + align-items: center;
  22 + justify-content: space-between;
  23 + margin: 0.2rem;
  24 +}
src/mobile/components/selectInput.less 0 → 100644
  1 +.inputBox {
  2 + position: relative;
  3 + .icons {
  4 + position: absolute;
  5 + top: 50%;
  6 + right: 0rem;
  7 + transform: translateY(-50%);
  8 + width: 3.125rem;
  9 + height: 3.125rem;
  10 + line-height: 3.125rem;
  11 + text-align: center;
  12 + }
  13 + .pickerWrapper {
  14 + flex: 1;
  15 + overflow-y: auto;
  16 + -webkit-overflow-scrolling: touch;
  17 + }
  18 +}
  19 +.popupHeader{
  20 + display: flex;
  21 + align-items: center;
  22 + justify-content: space-between;
  23 + margin: 0.2rem;
  24 +}
0 \ No newline at end of file 25 \ No newline at end of file
src/mobile/components/showType.jsx 0 → 100644
  1 +import React, { useState } from "react";
  2 +import { history } from "umi";
  3 +import { Tabs } from "antd-mobile";
  4 +import commonConfig from "@/utils/config";
  5 +import * as commonServices from "@/services/services";
  6 +import * as commonFunc from "@/components/Common/commonFunc";
  7 +import { useEffect } from "react";
  8 +import styles from "./showType.less";
  9 +const showType = props => {
  10 + // const {state} = props.location
  11 +
  12 + // console.log(JSON.parse(state), "QuotationAllprogressDetail");
  13 + console.log(props, "QuotationAllprogressDetail props");
  14 +
  15 + return (
  16 + <div className={styles.quotationDetailBox}>
  17 + 66666
  18 + </div>
  19 + );
  20 +};
  21 +
  22 +
  23 +export default showType;
src/mobile/components/showType.less 0 → 100644
src/mobile/quotation/detail.jsx 0 → 100644
  1 +import React, { useState } from "react";
  2 +import { history } from "umi";
  3 +import { Tabs } from "antd-mobile";
  4 +import commonConfig from "@/utils/config";
  5 +import * as commonServices from "@/services/services";
  6 +import * as commonFunc from "@/components/Common/commonFunc";
  7 +import { useEffect } from "react";
  8 +import styles from "./quotationDetail.less";
  9 +import SelectInput from "../components/SelectInput";
  10 +const QuotationAllprogressDetail = props => {
  11 + // const {state} = props.location
  12 +
  13 + // console.log(JSON.parse(state), "QuotationAllprogressDetail");
  14 + console.log(props, "QuotationAllprogressDetail props");
  15 +
  16 + return (
  17 + <div className={styles.quotationDetailBox}>
  18 + <QuotationDetail {...props} />
  19 + </div>
  20 + );
  21 +};
  22 +
  23 +const QuotationDetail = props => {
  24 + const { location, app } = props;
  25 + const { token } = app;
  26 + const [state, setState] = useState(null);
  27 +
  28 + // 初始化状态
  29 + const { formData = [] } = state || {};
  30 + const { quotationData } = JSON.parse(location.state) || {};
  31 + const [masterConfig, setMasterConfig] = useState(null);
  32 + useEffect(() => {
  33 + // 安全地解析 state
  34 + let parsedState = {};
  35 + try {
  36 + parsedState = JSON.parse(location.state || "{}");
  37 + } catch (error) {
  38 + console.error("Error parsing state:", error);
  39 + }
  40 + const { sModelsId } = parsedState;
  41 + // 构造请求 URL
  42 + const configUrl = `${commonConfig.server_host}business/getModelBysId/${"172129113112117428019179600"}?sModelsId=${"172129113112117428019179600"}`;
  43 + // 调用服务获取数据
  44 + commonServices
  45 + .getService(token, configUrl)
  46 + .then(({ data: configReturn }) => {
  47 + if (configReturn.code === 1) {
  48 + const formData = configReturn.dataset.rows[0]?.formData;
  49 + setMasterConfig(formData[0]);
  50 + setState(pre => ({ ...pre, formData }));
  51 + }
  52 + })
  53 + .catch(error => {
  54 + console.error("Error fetching data:", error);
  55 + });
  56 + }, [location, app]);
  57 +
  58 + // 主表
  59 + const list = masterConfig?.gdsconfigformslave.filter(item => item.sName && item.bVisible);
  60 + console.log("🚀 ~ list:", list);
  61 + // 客户
  62 + const customer = list?.find(x => x.showName === "客户名称") || {};
  63 + // console.log("🚀 ~ ableConfigs:", masterConfig);
  64 + console.log("🚀 ~ customer:", customer);
  65 + return (
  66 + <div>
  67 + <div>{quotationData?.showName || "Loading..."}</div>
  68 + {/* {list&& list.length
  69 + ? list.map((item, index) => {
  70 + return (
  71 + <div key={index} className={styles.customer}>
  72 + <div className={styles.quotationDetailTitle}>{item.showName}</div>
  73 + <SelectInput {...props} detailData={item}/>
  74 + </div>
  75 + );
  76 + })
  77 + : ""} */}
  78 + <div className={styles.customer}>
  79 + <div>客户名称</div>
  80 + <SelectInput {...props} />
  81 + </div>
  82 + </div>
  83 + );
  84 +};
  85 +
  86 +export default QuotationAllprogressDetail;
src/mobile/quotation/index.css 0 → 100644
  1 +.quotationBox {
  2 + width: 100%;
  3 + height: 100%;
  4 + position: relative;
  5 + display: flex;
  6 + align-items: center;
  7 + justify-content: center;
  8 +}
  9 +.quotationBox .quotationNavigation {
  10 + width: 30%;
  11 + height: 100%;
  12 +}
  13 +.quotationBox .quotationNavigation :global .adm-side-bar {
  14 + background-color: #EBF2FD;
  15 +}
  16 +.quotationBox .quotationContent {
  17 + width: 70%;
  18 + height: 100%;
  19 +}
  20 +.quotationBox .quotationContent .contentItem {
  21 + width: 92%;
  22 + height: 7.5rem;
  23 + border-radius: 10px;
  24 + background-color: #fff;
  25 + margin: 0 auto;
  26 + margin-bottom: 1rem;
  27 + display: flex;
  28 + padding: 0.625rem;
  29 +}
  30 +.quotationBox .quotationContent .contentItem .contentItemImg {
  31 + width: 6rem;
  32 + height: 6rem;
  33 + border-radius: 10px;
  34 +}
  35 +.quotationBox .quotationContent .contentItem .contentItemTitle {
  36 + font-size: 1.1rem;
  37 + color: #333;
  38 + margin-left: 0.625rem;
  39 + font-weight: 700;
  40 +}
src/mobile/quotation/index.jsx 0 → 100644
  1 +import React, { useEffect, useState } from "react";
  2 +import { history } from "umi";
  3 +import { SideBar } from "antd-mobile";
  4 +import styles from "./index.less";
  5 +import Icon5 from "@/assets/mobile/20.png";
  6 +import commonConfig from "@/utils/config";
  7 +import * as commonServices from "@/services/services";
  8 +import quotation from "@/routes/mobile/quotation";
  9 +const QuotationAllprogress = baseProps => {
  10 + const { sModelsId } = baseProps;
  11 + const { token } = baseProps.app;
  12 + const [state, setState] = useState(null);
  13 + const [selectedKey, setSelectedKey] = useState(null);
  14 + const { treeDataList } = baseProps.state || {};
  15 + const getQuotationList = async () => {
  16 + const configDataId = "172129113112117428019180410";
  17 + const formSrcRoute = "";
  18 + const condition = {
  19 + bFilter: [],
  20 + pageNum: 1,
  21 + pageSize: 1000,
  22 + };
  23 + const dataUrl = `${commonConfig.server_host}filterTree/getFilterTree/${configDataId}?sModelsId=${sModelsId}&sName=${formSrcRoute}`;
  24 + const dataReturn = (await commonServices.postValueService(token, condition, dataUrl)).data;
  25 + const treeDataList = dataReturn.dataset.rows[0].children.map(item => {
  26 + return item;
  27 + });
  28 + setState(pre => ({ ...pre, treeDataList }));
  29 + // setSelectedKey(treeDataList[0].sId); // 默认选中第一条
  30 + };
  31 + // 172129113112117428019180410
  32 + useEffect(() => {
  33 + getQuotationList();
  34 + }, [sModelsId]);
  35 + const treeProps = {
  36 + ...baseProps,
  37 + state,
  38 + selectedKey,
  39 + setState,
  40 + };
  41 + return (
  42 + <div className={styles.quotationBox}>
  43 + <div className={styles.quotationNavigation}>
  44 + <TreeComponent {...treeProps} />
  45 + </div>
  46 + <div className={styles.quotationContent}>
  47 + <ContentComponent {...treeProps} />
  48 + </div>
  49 + </div>
  50 + );
  51 +};
  52 +// 侧边导航
  53 +const TreeComponent = props => {
  54 + const { treeDataList, selectedKey } = props.state || {};
  55 + const { setState } = props;
  56 + useEffect(() => {
  57 + if (treeDataList && treeDataList.length) {
  58 + const list = treeDataList.find(item => item.sId === treeDataList[0].sId);
  59 + if (list && list.children && list.children.length) {
  60 + // 如果有子节点,则取子节点的名称
  61 + setState(pre => ({
  62 + ...pre,
  63 + selectedKey: treeDataList[0].sId,
  64 + contentList: list.children.map(child => {
  65 + return child;
  66 + }),
  67 + }));
  68 + }
  69 + }
  70 + }, [treeDataList]);
  71 + return treeDataList && treeDataList.length ? (
  72 + <SideBar
  73 + selectedKeys={[selectedKey]} // 设置默认选中项
  74 + onChange={key => {
  75 + const list = treeDataList.find(item => item.sId === key);
  76 + if (list && list.children && list.children.length) {
  77 + // 如果有子节点,则取子节点的名称
  78 + setState(pre => ({
  79 + ...pre,
  80 + selectedKey: key,
  81 + contentList: list.children.map(child => {
  82 + return child;
  83 + }),
  84 + }));
  85 + }
  86 + }}
  87 + >
  88 + {treeDataList && treeDataList.length
  89 + ? treeDataList.map(item => <SideBar.Item key={item.sId} title={item.showName} style={{ background: "#EBF2FD" }} />)
  90 + : ""}
  91 + </SideBar>
  92 + ) : (
  93 + ""
  94 + );
  95 +};
  96 +// 内容
  97 +const ContentComponent = props => {
  98 + const { contentList = [] } = props.state || {};
  99 + // 路由
  100 + const handleGridClick = item => () => {
  101 + console.log(item, props, "handleGridClick");
  102 + console.log(props.dispatch, "handleGridClick");
  103 +
  104 + props.dispatch({
  105 + type: "content/onRouterMobile",
  106 + payload: {
  107 + url: "/indexMobile/quotationDetail" /* 接口地址 */,
  108 + urlKey: undefined,
  109 + sModelsId: props.sModelsId,
  110 + sModelType: props.sModelType,
  111 + quotationData: item
  112 + },
  113 + });
  114 + };
  115 + return (
  116 + <div className={styles.content}>
  117 + {contentList.map(item => (
  118 + <div key={item.key} className={styles.contentItem} onClick={handleGridClick(item)}>
  119 + <img src={Icon5} alt="" className={styles.contentItemImg} />
  120 + <span className={styles.contentItemTitle}>{item.showName}</span>
  121 + </div>
  122 + ))}
  123 + </div>
  124 + );
  125 +};
  126 +export default QuotationAllprogress;
src/mobile/quotation/index.less 0 → 100644
  1 +
  2 +.quotationBox {
  3 + width: 100%;
  4 + height: 100%;
  5 + position: relative;
  6 + display: flex;
  7 + align-items: center;
  8 + justify-content: center;
  9 + .quotationNavigation {
  10 + width: 30%;
  11 + height: 100%;
  12 + :global .adm-side-bar {
  13 + background-color: #EBF2FD;
  14 + }
  15 + }
  16 + .quotationContent {
  17 + width: 70%;
  18 + height: 100%;
  19 + .contentItem {
  20 + width: 92%;
  21 + height: 7.5rem;
  22 + border-radius: 10px;
  23 + background-color: #fff;
  24 + margin: 0 auto;
  25 + margin-bottom: 1rem;
  26 + display: flex;
  27 + padding: 0.625rem;
  28 + .contentItemImg {
  29 + width: 6rem;
  30 + height: 6rem;
  31 + border-radius: 10px;
  32 + }
  33 + .contentItemTitle {
  34 + font-size: 1.1rem;
  35 + color: #333;
  36 + margin-left: 0.625rem;
  37 + font-weight: 700;
  38 + }
  39 + }
  40 + }
  41 +}
src/mobile/quotation/quotationDetail.css 0 → 100644
  1 +.quotationDetailBox {
  2 + padding: 1rem;
  3 + background-color: #fff;
  4 +}
  5 +.customer {
  6 + margin-top: 2rem;
  7 +}
  8 +.customer :global .adm-input-element {
  9 + border: 1px solid #DEDEDF;
  10 + height: 3.125rem;
  11 + margin: 0.5rem 0;
  12 + border-radius: 5px;
  13 +}
src/mobile/quotation/quotationDetail.less 0 → 100644
  1 +.quotationDetailBox{
  2 + padding: 1rem;
  3 + // height: 100%;
  4 + background-color: #fff;
  5 + // height: 100vh;
  6 +}
  7 +.customer{
  8 + margin-top: 2rem;
  9 + :global .adm-input-element{
  10 + border: 1px solid #DEDEDF;
  11 + height: 3.125rem;
  12 + margin: 0.5rem 0;
  13 + border-radius: 5px;
  14 + }
  15 +}
0 \ No newline at end of file 16 \ No newline at end of file
src/models/content.js
@@ -94,6 +94,8 @@ export default { @@ -94,6 +94,8 @@ export default {
94 94
95 *onRouterMobile({ payload }, { put, call, select }) { 95 *onRouterMobile({ payload }, { put, call, select }) {
96 const { urlKey } = payload; /* 参数接收 */ 96 const { urlKey } = payload; /* 参数接收 */
  97 + console.log(payload,'payload');
  98 +
97 if (urlKey !== undefined) { 99 if (urlKey !== undefined) {
98 const token = yield select(state => state.app.token); /* 用户令牌 */ 100 const token = yield select(state => state.app.token); /* 用户令牌 */
99 const { data } = yield call(services.getService, token, urlKey); 101 const { data } = yield call(services.getService, token, urlKey);
@@ -126,11 +128,13 @@ export default { @@ -126,11 +128,13 @@ export default {
126 yield put({ type: 'app/throwErrorMobile', payload: data }); 128 yield put({ type: 'app/throwErrorMobile', payload: data });
127 } 129 }
128 } else { 130 } else {
  131 +
129 const param = { 132 const param = {
130 sModelsId: payload.sModelsId, 133 sModelsId: payload.sModelsId,
131 sId: payload.sId, 134 sId: payload.sId,
132 personPic: payload.personPic, 135 personPic: payload.personPic,
133 slaveData: payload.slaveData, 136 slaveData: payload.slaveData,
  137 + quotationData: payload.quotationData,
134 }; 138 };
135 history.push(payload.url, commonUtils.convertObjToStr(param)); 139 history.push(payload.url, commonUtils.convertObjToStr(param));
136 // yield put(routerRedux.push({ 140 // yield put(routerRedux.push({
src/routes/mobile/IndexMobile.js
@@ -28,6 +28,10 @@ import Icon31 from &quot;../../assets/mobile/31.png&quot;; @@ -28,6 +28,10 @@ import Icon31 from &quot;../../assets/mobile/31.png&quot;;
28 // import Icon41 from '../../assets/mobile/41.png'; 28 // import Icon41 from '../../assets/mobile/41.png';
29 import Icon5 from "../../assets/mobile/5.png"; 29 import Icon5 from "../../assets/mobile/5.png";
30 import Icon51 from "../../assets/mobile/51.png"; 30 import Icon51 from "../../assets/mobile/51.png";
  31 +import Icon6 from "../../assets/mobile/6.png";
  32 +import Icon61 from "../../assets/mobile/61.png";
  33 +import Quotation from "./quotation/index";
  34 +import QuotationDetail from "./quotation/detail";
31 // import AppUtil from '../../utils/AppUtil'; 35 // import AppUtil from '../../utils/AppUtil';
32 import * as commonBusiness from "../../components/Common/commonBusiness"; 36 import * as commonBusiness from "../../components/Common/commonBusiness";
33 37
@@ -48,8 +52,6 @@ class IndexMobile extends React.Component { @@ -48,8 +52,6 @@ class IndexMobile extends React.Component {
48 } 52 }
49 componentWillMount() { 53 componentWillMount() {
50 history.push("/indexMobile"); // 刷新时更新路由,避免底部按钮和返回按钮错乱显示 54 history.push("/indexMobile"); // 刷新时更新路由,避免底部按钮和返回按钮错乱显示
51 - console.log("🚀 ~ IndexMobile ~ componentWillMount ~ this.props:", this.props)  
52 -  
53 if (this.props.routing && this.props.routing) { 55 if (this.props.routing && this.props.routing) {
54 const { state } = this.props.routing; 56 const { state } = this.props.routing;
55 if (state) { 57 if (state) {
@@ -72,6 +74,7 @@ class IndexMobile extends React.Component { @@ -72,6 +74,7 @@ class IndexMobile extends React.Component {
72 scene: "现场", 74 scene: "现场",
73 workbench: "工作台", 75 workbench: "工作台",
74 device: "设备", 76 device: "设备",
  77 + quotation: "报价下单",
75 myself: "我的", 78 myself: "我的",
76 }[this.state.selectedTab]; 79 }[this.state.selectedTab];
77 80
@@ -113,6 +116,8 @@ class IndexMobile extends React.Component { @@ -113,6 +116,8 @@ class IndexMobile extends React.Component {
113 } 116 }
114 }; 117 };
115 renderContent(pageText) { 118 renderContent(pageText) {
  119 + console.log(this.props, "pageText");
  120 +
116 if (pageText === "message") { 121 if (pageText === "message") {
117 if (location.pathname === "/indexMobile/examine") { 122 if (location.pathname === "/indexMobile/examine") {
118 return ( 123 return (
@@ -208,6 +213,19 @@ class IndexMobile extends React.Component { @@ -208,6 +213,19 @@ class IndexMobile extends React.Component {
208 </div> 213 </div>
209 ); 214 );
210 } 215 }
  216 + } else if (pageText === "quotation") {
  217 + if (location.pathname === "/indexMobile/quotationDetail") {
  218 + return (
  219 +
  220 + <QuotationDetail {...this.props} sModelType={pageText} sModelsId="101251240115016076506222050" />
  221 + )
  222 + } else {
  223 + return (
  224 + <div className={styles.demoContainer}>
  225 + <Quotation {...this.props} sModelType={pageText} sModelsId="101251240115016076506222050" />
  226 + </div>
  227 + );
  228 + }
211 } 229 }
212 } 230 }
213 231
@@ -378,6 +396,42 @@ class IndexMobile extends React.Component { @@ -378,6 +396,42 @@ class IndexMobile extends React.Component {
378 style={{ 396 style={{
379 width: "22px", 397 width: "22px",
380 height: "22px", 398 height: "22px",
  399 + background: `url(${Icon61}) center center / 21px 21px no-repeat`,
  400 + }}
  401 + />
  402 + }
  403 + selectedIcon={
  404 + <div
  405 + style={{
  406 + width: "22px",
  407 + height: "22px",
  408 + background: `url(${Icon6}) center center / 21px 21px no-repeat`,
  409 + }}
  410 + />
  411 + }
  412 + title="报价"
  413 + key="quotation"
  414 + // badge="2"
  415 + selected={this.state.selectedTab === "quotation"}
  416 + onPress={() => {
  417 + const { app } = this.props;
  418 + const { token } = app;
  419 + commonBusiness.clearSocketData({ token, value: {}, sModelsId: 100 });
  420 + this.setState({
  421 + selectedTab: "quotation",
  422 + title: "报价下单",
  423 + });
  424 + history.push("/indexMobile");
  425 + }}
  426 + >
  427 + {this.state.selectedTab === "quotation" ? this.renderContent(this.state.selectedTab) : ""}
  428 + </TabBar.Item>
  429 + <TabBar.Item
  430 + icon={
  431 + <div
  432 + style={{
  433 + width: "22px",
  434 + height: "22px",
381 background: `url(${Icon51}) center center / 21px 21px no-repeat`, 435 background: `url(${Icon51}) center center / 21px 21px no-repeat`,
382 }} 436 }}
383 /> 437 />
src/routes/mobile/common/ContactsInfoMobile.js
1 import React from 'react'; 1 import React from 'react';
2 -import { connect } from 'dva'; 2 +import { connect } from 'umi';
3 import ContactsInfoMobileComponent from '../../../mobile/common/ContactsInfoMobile'; 3 import ContactsInfoMobileComponent from '../../../mobile/common/ContactsInfoMobile';
4 import * as commonUtils from '../../../utils/utils'; 4 import * as commonUtils from '../../../utils/utils';
5 5
src/routes/mobile/common/ContactsMobile.js
1 import React from 'react'; 1 import React from 'react';
2 -import { connect } from 'dva'; 2 +import { connect } from 'umi';
3 import ContactsMobileComponent from '../../../mobile/common/ContactsMobile'; 3 import ContactsMobileComponent from '../../../mobile/common/ContactsMobile';
4 4
5 function ContactsMobile({ 5 function ContactsMobile({
src/routes/mobile/common/DeviceMobile.js
1 import React from 'react'; 1 import React from 'react';
2 -import { connect } from 'dva'; 2 +import { connect } from 'umi';
3 import DeviceMobileComponent from '../../../mobile/common/CommobileList'; 3 import DeviceMobileComponent from '../../../mobile/common/CommobileList';
4 4
5 function DeviceMobile({ 5 function DeviceMobile({
src/routes/mobile/common/ExamineMobile.js
1 import React from 'react'; 1 import React from 'react';
2 -import { connect } from 'dva'; 2 +import { connect } from 'umi';
3 import ExamineMobileComponent from '../../../mobile/common/ExamineMobile'; 3 import ExamineMobileComponent from '../../../mobile/common/ExamineMobile';
4 import * as commonUtils from '../../../utils/utils'; 4 import * as commonUtils from '../../../utils/utils';
5 5
src/routes/mobile/common/MessageMobile.js
1 import React from 'react'; 1 import React from 'react';
2 -import { connect } from 'dva'; 2 +import { connect } from 'umi';
3 import MessageMobileComponent from '../../../mobile/common/MessageMobile'; 3 import MessageMobileComponent from '../../../mobile/common/MessageMobile';
4 4
5 function MessageMobile({ 5 function MessageMobile({
src/routes/mobile/common/MyselfMobile.js
1 import React from 'react'; 1 import React from 'react';
2 -import { connect } from 'dva'; 2 +import { connect } from 'umi';
3 import MyselfMobileComponent from '../../../mobile/common/MyselfMobile'; 3 import MyselfMobileComponent from '../../../mobile/common/MyselfMobile';
4 4
5 function MyselfMobile({ 5 function MyselfMobile({
src/routes/mobile/common/NewsMobile.js
1 import React from 'react'; 1 import React from 'react';
2 -import { connect } from 'dva'; 2 +import { connect } from 'umi';
3 import NewsMobileComponent from '../../../mobile/common/NewsMobile'; 3 import NewsMobileComponent from '../../../mobile/common/NewsMobile';
4 4
5 function NewsMobile({ 5 function NewsMobile({
src/routes/mobile/common/ProcessReportMobile.js
1 import React from 'react'; 1 import React from 'react';
2 -import { connect } from 'dva'; 2 +import { connect } from 'umi';
3 import ProcessReportMobileComponent from '../../../mobile/common/ProcessReportMobile'; 3 import ProcessReportMobileComponent from '../../../mobile/common/ProcessReportMobile';
4 import * as commonUtils from '../../../utils/utils'; 4 import * as commonUtils from '../../../utils/utils';
5 5
src/routes/mobile/common/RevisePasswordMobile.js
1 import React from 'react'; 1 import React from 'react';
2 -import { connect } from 'dva'; 2 +import { connect } from 'umi';
3 import RevisePasswordMobileComponent from '../../../mobile/common/RevisePasswordMobile'; 3 import RevisePasswordMobileComponent from '../../../mobile/common/RevisePasswordMobile';
4 4
5 function RevisePasswordMobile({ 5 function RevisePasswordMobile({
src/routes/mobile/common/SceneCssMobile.js
1 import React from 'react'; 1 import React from 'react';
2 -import { connect } from 'dva'; 2 +import { connect } from 'umi';
3 import SceneCssMobileComponent from '../../../mobile/common/SceneCssMobile'; 3 import SceneCssMobileComponent from '../../../mobile/common/SceneCssMobile';
4 4
5 function SceneMobile({ 5 function SceneMobile({
src/routes/mobile/common/SceneSrmMobile.js
1 import React from 'react'; 1 import React from 'react';
2 -import { connect } from 'dva'; 2 +import { connect } from 'umi';
3 import SceneSrmMobileComponent from '../../../mobile/common/SceneSrmMobile'; 3 import SceneSrmMobileComponent from '../../../mobile/common/SceneSrmMobile';
4 4
5 function SceneMobile({ 5 function SceneMobile({
src/routes/mobile/common/WorkBenchMobile.js
1 import React from 'react'; 1 import React from 'react';
2 -import { connect } from 'dva'; 2 +import { connect } from 'umi';
3 import WorkBenchMobileComponent from '../../../mobile/common/WorkBenchMobile'; 3 import WorkBenchMobileComponent from '../../../mobile/common/WorkBenchMobile';
4 4
5 5
src/routes/mobile/common/commobilePrintPdf.js
@@ -4,7 +4,7 @@ @@ -4,7 +4,7 @@
4 */ 4 */
5 5
6 import React from 'react'; 6 import React from 'react';
7 -import { connect } from 'dva'; 7 +import { connect } from 'umi';
8 import * as commonUtils from '../../../utils/utils'; 8 import * as commonUtils from '../../../utils/utils';
9 import CommobilePrintPdf from '../../../mobile/common/CommobilePrintPdf'; 9 import CommobilePrintPdf from '../../../mobile/common/CommobilePrintPdf';
10 10
src/routes/mobile/logincss/LoginCss.js
1 import React from 'react'; 1 import React from 'react';
2 -import { connect } from 'dva'; 2 +import { connect } from 'umi';
3 import LoginCssComponent from '../../../mobile/logincss/LoginCss'; 3 import LoginCssComponent from '../../../mobile/logincss/LoginCss';
4 4
5 function LoginCss({ 5 function LoginCss({
src/routes/mobile/loginsrm/LoginSrm.js
1 import React from 'react'; 1 import React from 'react';
2 -import { connect } from 'dva'; 2 +import { connect } from 'umi';
3 import LoginSrmComponent from '../../../mobile/loginsrm/LoginSrm'; 3 import LoginSrmComponent from '../../../mobile/loginsrm/LoginSrm';
4 4
5 function LoginSrm({ 5 function LoginSrm({
src/routes/mobile/quotation/detail.js 0 → 100644
  1 +import { connect } from "umi";
  2 +import QuotationAllprogressDetail from "@/mobile/quotation/detail.jsx";
  3 +
  4 +function quotationDetail({ dispatch, app, content, location, sModelsId }) {
  5 + const quotationProps = {
  6 + app,
  7 + content,
  8 + dispatch,
  9 + location, // 只传递需要的部分
  10 + sModelsId,
  11 + };
  12 + return <QuotationAllprogressDetail {...quotationProps} />;
  13 +}
  14 +
  15 +const mapStateToProps = ({ app, content }) => ({
  16 + app,
  17 + content,
  18 +});
  19 +
  20 +export default connect(mapStateToProps)(quotationDetail);
0 \ No newline at end of file 21 \ No newline at end of file
src/routes/mobile/quotation/index.js 0 → 100644
  1 +import { connect } from "umi";
  2 +import QuotationAllprogress from "@/mobile/quotation/index.jsx";
  3 +
  4 +function quotation({ dispatch, app, content, location, sModelsId }) {
  5 + const quotationProps = {
  6 + app,
  7 + content,
  8 + dispatch,
  9 + location, // 只传递需要的部分
  10 + sModelsId,
  11 + };
  12 + return <QuotationAllprogress {...quotationProps} />;
  13 +}
  14 +
  15 +const mapStateToProps = ({ app, content }) => ({
  16 + app,
  17 + content,
  18 +});
  19 +
  20 +export default connect(mapStateToProps)(quotation);
0 \ No newline at end of file 21 \ No newline at end of file