Commit add848477ee2555a9a8477f68645e2cbd88ecd0a

Authored by 陈鑫涛
1 parent cd7d7085

报价app

src/components/Common/BoxDesignCompontent/svg.js
... ... @@ -312,7 +312,7 @@ const SvgBox = props => {
312 312 } else {
313 313 leftSize = zbtb?.value;
314 314 }
315   - svg.setAttribute("viewBox", `${-(leftSize * scale)} ${-ySvg} ${dSvgBoxWidth} ${dSvgBoxHeight}`);
  315 + svg.setAttribute("viewBox", `${-((leftSize * scale))} ${-ySvg} ${dSvgBoxWidth} ${dSvgBoxHeight}`);
316 316 svg.setAttribute("width", `${dSvgBoxWidth}px`);
317 317 svg.setAttribute("height", `${dSvgBoxHeight}px`);
318 318 svgContainerRef.current.style.width = `${dSvgBoxWidth}px`;
... ...
src/components/Common/CommonViewTable/index.js
... ... @@ -362,6 +362,7 @@ export default class CommonViewTable extends Component {
362 362 }
363 363  
364 364 const viewRowNew = this.props.getViewRow?.(child) || viewRow;
  365 + console.log("🚀 ~ CommonViewTable ~ viewConfigs&&viewConfigs.map ~ viewRowNew:", viewRowNew)
365 366  
366 367 const showTypeProps = {
367 368 app,
... ...
src/mobile/components/SelectInput.jsx
... ... @@ -10,33 +10,44 @@ import debounce from "lodash/debounce";
10 10  
11 11 const SelectInput = props => {
12 12 console.log("🚀 ~ selectInputValue:", props);
13   - const [value, setValue] = useState(props.name || ""); // 如果存在 name 属性,将其值赋值给 value
  13 + const [value, setValue] = useState(props.sValue || ""); // 如果存在 name 属性,将其值赋值给 value
14 14 const [values, setValues] = useState("");
15 15 const [searchValue, setSearchValue] = useState("");
16 16 const [visible, setVisible] = useState(false);
17   - const { sId } = props.formData || {};
18   - const { sModelsId, bCanInput, sValue, name, id, No } = props || {};
  17 + const { sId } = props.itemDetail || {};
  18 + const { viewRow, itemDetail, sModelsId, sValue, name, id, No, quotationData, showDropDown } = props || {};
  19 + const [bCanInput, setBCanInput] = useState(props.bCanInput);
  20 + const { bReadonly } = itemDetail || {};
  21 + console.log("🚀 ~ formDatassss:", bReadonly);
19 22  
  23 + // useEffect(() => {
  24 + // setValue(props.sValue || ""); // 动态更新 value
  25 + // }, [props.sValue]);
20 26 useEffect(() => {
21   - setValue(props.name || ""); // 动态更新 value
22   - }, [props.name]);
  27 + if (!itemDetail) return;
  28 + console.log(itemDetail.sName, 'viewRowNew');
23 29  
  30 + const viewRowNew = itemDetail.sName ? viewRow?.[itemDetail.sName] : "";
  31 + console.log("🚀 ~ useEffect ~ viewRowNew:", viewRowNew);
  32 + setValue(viewRowNew || ""); // 动态更新 value
  33 +}, [itemDetail, itemDetail?.sName, viewRow]);
24 34 const [columns, setColumns] = useState([]);
25 35 const [coplyColumns, setCopyColumns] = useState(columns);
26 36 const getSqlDropDownData = async searchValue => {
27 37 const url = `${commonConfig.server_host}business/getSelectLimit/${sId}?sModelsId=${sModelsId}&sName=${""}`;
28 38 const body = {
29   - sSqlCondition: "",
  39 + sSqlCondition: {
  40 + sProductClassifyId: quotationData.sId,
  41 + },
30 42 sKeyUpFilterName: searchValue,
31 43 pageNum: 1,
32 44 pageSize: 20,
33 45 };
34 46 commonServices.postValueService(props.app.token, body, url).then(res => {
35 47 if (res.data.code === 1) {
36   - console.log("🚀 ~ commonServices.postValueService ~ res.data:", res.data)
37 48 const list = res.data.dataset.rows?.map(item => ({
38   - label: item.sCustomerName || item.sName,
39   - value: item.sId,
  49 + label: item.sCustomerName || item.sName || item.sProcessName || item.sColorName,
  50 + value: item.sId || item.sSlaveId,
40 51 }));
41 52 setColumns(list);
42 53 setCopyColumns(list);
... ... @@ -74,7 +85,17 @@ const SelectInput = props => {
74 85 };
75 86 useEffect(() => {
76 87 if (!visible) return;
77   - getSqlDropDownData(searchValue);
  88 + let { sDropDownType } = itemDetail;
  89 + if (sDropDownType === "sql") {
  90 + getSqlDropDownData(searchValue);
  91 + } else if ((sDropDownType = "const")) {
  92 + const list = Object.entries(JSON.parse(itemDetail.showDropDown)).map(([key, value]) => ({
  93 + label: value,
  94 + value: key,
  95 + }));
  96 + setColumns(list);
  97 + setCopyColumns(list);
  98 + }
78 99 }, [visible]);
79 100 useCallback;
80 101 useEffect(() => {
... ... @@ -83,6 +104,11 @@ const SelectInput = props => {
83 104 }, [sValue]);
84 105 useCallback;
85 106  
  107 + const clickBtn = () => {
  108 + console.log(itemDetail, "clickBtn");
  109 +
  110 + setVisible(true);
  111 + };
86 112 return (
87 113 <div>
88 114 <div className={styles.inputBox}>
... ... @@ -91,10 +117,12 @@ const SelectInput = props =&gt; {
91 117 value={value}
92 118 onChange={val => {
93 119 setValue(val);
  120 + props.setState(pre => ({ ...pre,[itemDetail.sName]:val}));
94 121 }}
  122 + readOnly={bReadonly}
95 123 />
96 124 {!bCanInput ? (
97   - <div className={styles.icons} onClick={() => setVisible(true)}>
  125 + <div className={styles.icons} onClick={clickBtn}>
98 126 <DownOutline />
99 127 </div>
100 128 ) : null}
... ...
src/mobile/quotation/detail.jsx
1   -import React, { useState, useCallback } from "react";
  1 +import { useRef, useEffect, useState, useCallback, useMemo } from "react";
2 2 import { history } from "umi";
3   -import { Tabs, Selector, Grid, Image } from "antd-mobile";
  3 +import { Tabs, Selector, Grid, Image, Button, Checkbox, Switch, Dialog, Toast } from "antd-mobile";
  4 +import { AddOutline, MinusOutline } from "antd-mobile-icons";
4 5 import commonConfig from "@/utils/config";
5 6 import * as commonServices from "@/services/services";
6 7 import * as commonFunc from "@/components/Common/commonFunc";
7   -import { useEffect } from "react";
  8 +import * as commonBusiness from "@/components/Common/commonBusiness";
8 9 import styles from "./quotationDetail.less";
9 10 import SelectInput from "../components/SelectInput";
10 11 import JsonData from "./index.json";
... ... @@ -12,9 +13,899 @@ import * as commonUtils from &quot;@/utils/utils&quot;;
12 13 import Typesetting from "@/components/Common/Typesetting/typesetting";
13 14 import DynamicSVG from "@/components/Common/BoxDesignCompontent/svg";
14 15 import ShowImgM from "@/components/Common/BoxShowImgMaterial/indexNew";
15   -const QuotationAllprogressDetail = props => {
16   - // const {state} = props.location
  16 +const QuickQuoteEvent = props => {
  17 + console.log("🚀 ~ QuickQuoteEvent:", props);
  18 + const { location } = props;
  19 + const selectedNode = JSON.parse(location.state).quotationData;
  20 + const addState = {};
  21 + const [masterConfig, setMasterConfig] = useState(null);
  22 + const { sModelsId } = props;
  23 +
  24 + addState.onGetFilterState = (state, bInit) => {
  25 + const result = Object.keys(state).reduce((pre, cur) => {
  26 + if (cur.endsWith("Column") || cur.endsWith("Config") || ["formData", "treeData", "downAbleConfigs", "finishedConfigs"].includes(cur)) {
  27 + return pre;
  28 + }
  29 +
  30 + pre[cur] = state[cur];
  31 + return pre;
  32 + }, {});
  33 +
  34 + const { slaveData = [], manyData = [] } = result;
  35 + const materialInfoFields = [
  36 + "sMaterialsName",
  37 + "sMaterialsNo",
  38 + "sMaterialsId",
  39 + "sAuxiliaryUnit",
  40 + "sMaterialsUnit",
  41 + "bReel",
  42 + "dCoefficient",
  43 + "bInverse",
  44 + "sMaterialsStyle",
  45 + "sComputeId",
  46 + "sReComputeId",
  47 + "dGramWeight",
  48 + "sReConversionComputeId",
  49 + "sConversionComputeId",
  50 + "sMaterialsType",
  51 + "bComMaterials",
  52 + "dWlcd",
  53 + "dWlkd",
  54 + ];
  55 + const slaveDataNew = bInit
  56 + ? slaveData.map(item => {
  57 + const { materialsInfo = [], sMaterialsName } = item;
  58 + if (!materialsInfo.length && sMaterialsName) {
  59 + return {
  60 + ...item,
  61 + materialsInfo: [
  62 + materialInfoFields.reduce((pre, cur) => {
  63 + pre[cur] = item[cur];
  64 + return pre;
  65 + }, {}),
  66 + ],
  67 + };
  68 + } else {
  69 + return item;
  70 + }
  71 + })
  72 + : slaveData;
  73 +
  74 + const manyDataNew = manyData.map(item => {
  75 + delete item.manyData;
  76 + return item;
  77 + });
  78 +
  79 + return { ...result, slaveData: slaveDataNew, manyData: manyDataNew };
  80 + };
  81 +
  82 + const sQuoConfig = commonUtils.convertStrToObj(props.masterData.sQuoConfig, {});
  83 +
  84 + const [state, setState] = useState(addState.onGetFilterState(sQuoConfig, true));
  85 +
  86 + const { formData = [] } = state;
  87 + const { bLinkFieledClick } = props;
  88 + const [hideBackBtn, setHideBackBtn] = useState(false);
  89 + const [enabled, setEnabled] = useState(props.enabled);
  90 + useEffect(() => {
  91 + setState(pre => ({ ...pre, selectedNode }));
  92 + }, []);
  93 + useEffect(() => {
  94 + setHideBackBtn(!bLinkFieledClick);
  95 + setEnabled(!bLinkFieledClick || props.enabled);
  96 + }, [bLinkFieledClick, props.enabled]);
  97 + useEffect(() => {
  98 + // 获取 masterConfig
  99 + const configUrl = `${commonConfig.server_host}business/getModelBysId/${"172129113112117428019179600"}?sModelsId=${"172129113112117428019179600"}`;
  100 + commonServices
  101 + .getService(props.app.token, configUrl)
  102 + .then(({ data: configReturn }) => {
  103 + if (configReturn.code === 1) {
  104 + const formData = configReturn.dataset.rows[0]?.formData;
  105 + setMasterConfig(formData);
  106 + setState(pre => ({ ...pre, masterConfig: formData, slaveConfig: formData[1] }));
  107 + }
  108 + })
  109 + .catch(error => {});
  110 + const formDataUrl = `${commonConfig.server_host}business/getModelBysId/${sModelsId}?sModelsId=${sModelsId}`;
  111 + commonServices
  112 + .getService(props.app.token, formDataUrl)
  113 + .then(({ data: formDataReturn }) => {
  114 + if (formDataReturn.code === 1) {
  115 + const formDatas = formDataReturn.dataset.rows[0]?.formData;
  116 + setState(pre => ({ ...pre, formData: formDatas }));
  117 + }
  118 + })
  119 + .catch(error => {});
  120 + }, []);
  121 +
  122 + // 获取盒型定义配置
  123 + useEffect(() => {
  124 + if (!formData.length) return;
  125 + const sBoxActiveId = formData.find(item => item.sGrd === "slave")?.gdsconfigformslave?.find(item => item.sName === "sName")?.sActiveId;
  126 + if (!sBoxActiveId) return;
  127 + const { token } = props;
  128 + const configUrl = `${commonConfig.server_host}business/getModelBysId/${sBoxActiveId}?sModelsId=${sBoxActiveId}`;
  129 + commonServices.getService(token, configUrl).then(({ data: configReturn }) => {
  130 + if (configReturn.code === 1) {
  131 + const formData = configReturn.dataset.rows[0].formData;
  132 + setState(pre => ({ ...pre, boxConfig: formData[0] }));
  133 + }
  134 + });
  135 + }, [formData.length]);
  136 +
  137 + // 获取column
  138 + useEffect(() => {
  139 + if (!formData.length) return;
  140 +
  141 + let result = {};
  142 + for (let i = 0; i < formData.length; i++) {
  143 + const tableConfig = formData[i];
  144 + const { sGrd } = tableConfig;
  145 + if (!sGrd) continue;
  146 + const column = commonFunc.getHeaderConfig(tableConfig);
  147 + result = {
  148 + ...result,
  149 + [`${sGrd}Column`]: column,
  150 + [`${sGrd}Config`]: tableConfig,
  151 + };
  152 + }
  153 + setState(pre => ({ ...pre, ...result }));
  154 + }, [formData.length]);
  155 +
  156 + addState.onBackClick = () => {
  157 + props.onSaveState({ masterData: { ...props.masterData, sQuoConfig: JSON.stringify(addState.onGetFilterState(state)) }, quickQuoteModel: false });
  158 + };
  159 +
  160 + addState.onDataChange = (name, sFieldName, changeValue, sId, dropDownData, isWait) => {
  161 + const { masterData = {}, slaveData = [], selectedNode = {} } = state;
  162 +
  163 + const extraState = {
  164 + calcPriceFinished: false,
  165 + manyData: [],
  166 + };
  167 +
  168 + if (name === "master") {
  169 + const masterDataNew = { ...masterData, ...changeValue };
  170 + masterDataNew.handleType = masterDataNew.handleType || "update";
  171 + masterDataNew.sId = masterDataNew.sId || commonUtils.createSid();
  172 + if (sFieldName === "dProductQty") {
  173 + setState(pre => ({
  174 + ...pre,
  175 + dProductQty: changeValue.dProductQty,
  176 + }));
  177 + }
  178 +
  179 + setState(pre => ({ ...pre, masterData: masterDataNew, ...extraState }));
  180 + } else if (name.includes("slave")) {
  181 + const boxModel = name.replace("slaveUp", "").replace("slaveDown", "");
  182 + if (sFieldName === "sName") {
  183 + if (!changeValue.sName) return;
  184 + const dropDownDataSelected = dropDownData.find(item => item.sName === changeValue.sName);
  185 + const { sColumnNameConfig, sColumnNameConfigExclusion, sColumnNameConfigPic } = dropDownDataSelected;
  186 + const upAbleConfigsExtra = commonUtils.convertStrToObj(sColumnNameConfig, []).map(item => ({
  187 + ...item,
  188 + iColValue: item.iColValue || 6,
  189 + }));
  190 + const defaultData = commonFunc.getDefaultData({ gdsconfigformslave: upAbleConfigsExtra });
  191 + delete defaultData.sId;
  192 + delete dropDownDataSelected.sId;
  193 + changeValue = {
  194 + ...changeValue,
  195 + ...defaultData,
  196 + ...dropDownDataSelected,
  197 + upAbleConfigsExtra,
  198 + calcMethodData: commonUtils.convertStrToObj(sColumnNameConfigExclusion, []),
  199 + boxPicData: commonUtils.convertStrToObj(sColumnNameConfigPic, []),
  200 + };
  201 + }
  202 +
  203 + const { selectedNode = {}, slaveConfig } = state;
  204 + const { showName: sTreeNodeName } = selectedNode;
  205 + const iIndex = slaveData.findIndex(item => item.sTreeNodeName === sTreeNodeName && item.sBoxModel === boxModel);
  206 + if (name.includes("slaveDown")) {
  207 + const dropDownDataSelected = dropDownData.find(item => item.sId === changeValue[sFieldName]);
  208 + dropDownDataSelected && (dropDownDataSelected[sFieldName] = dropDownDataSelected.sProcessName);
  209 + const extraRowData = {};
  210 + // if (dropDownDataSelected.sProcessName === "胶印") {
  211 + // extraRowData.sPrintProcessId = dropDownDataSelected.sId;
  212 + // }
  213 + if (iIndex === -1) {
  214 + slaveData.push({
  215 + sId: commonUtils.createSid(),
  216 + handleType: "add",
  217 + sBoxModel: boxModel,
  218 + sTreeNodeName,
  219 + sBackProcessData: dropDownDataSelected === undefined ? [] : [dropDownDataSelected],
  220 + ...extraRowData,
  221 + });
  222 + } else {
  223 + const sBackProcessData = slaveData[iIndex].sBackProcessData || [];
  224 + const iIndex1 = sBackProcessData.findIndex(item => item.sProductClassifyId === dropDownData[0].sProductClassifyId);
  225 + if (iIndex1 === -1) {
  226 + dropDownDataSelected !== undefined && sBackProcessData.push(dropDownDataSelected);
  227 + } else {
  228 + if (dropDownDataSelected === undefined) {
  229 + sBackProcessData.splice(iIndex1, 1);
  230 + } else {
  231 + sBackProcessData[iIndex1] = dropDownDataSelected;
  232 + }
  233 + }
  234 + slaveData[iIndex].sBackProcessData = sBackProcessData;
  235 +
  236 + slaveData[iIndex] = {
  237 + ...slaveData[iIndex],
  238 + ...extraRowData,
  239 + handleType: slaveData[iIndex].handleType || "update",
  240 + };
  241 + }
  242 + } else {
  243 + if (iIndex === -1) {
  244 + slaveData.push({
  245 + ...changeValue,
  246 + sId: commonUtils.createSid(),
  247 + handleType: "add",
  248 + sBoxModel: boxModel,
  249 + sTreeNodeName,
  250 + });
  251 + } else {
  252 + slaveData[iIndex] = {
  253 + ...(sFieldName === "sName"
  254 + ? {
  255 + sId: slaveData[iIndex].sId,
  256 + sBoxModel: boxModel,
  257 + sTreeNodeName,
  258 + ...commonFunc.getDefaultData(slaveConfig),
  259 + }
  260 + : slaveData[iIndex]),
  261 + ...changeValue,
  262 + handleType: slaveData[iIndex].handleType || "update",
  263 + };
  264 + }
  265 + }
  266 + const saveIndex = slaveData.findIndex(item => item.sTreeNodeName === selectedNode.showName && item.sBoxModel === boxModel);
  267 + const materialStyleLength = slaveData[saveIndex].materialLength || 0;
  268 + const materialStyleWidth = slaveData[saveIndex].materialWidth || 0;
  269 + slaveData[saveIndex] = {
  270 + ...slaveData[saveIndex],
  271 + sMachineStyle: materialStyleLength + "*" + materialStyleWidth,
  272 + dMachineQty: slaveData[saveIndex].dProductQty ? slaveData[saveIndex].dProductQty : masterData.dProductQty,
  273 + };
  274 + if (sFieldName === "dWlcd" || sFieldName === "dWlkd") {
  275 + const horizontalBoxes = Math.floor(slaveData[saveIndex]?.dWlkd / slaveData[saveIndex]?.materialWidth);
  276 + const verticalBoxes = Math.floor(slaveData[saveIndex]?.dWlcd / slaveData[saveIndex]?.materialLength);
  277 + const newDMaterialsKQty = horizontalBoxes * verticalBoxes;
  278 + slaveData[saveIndex] = {
  279 + ...slaveData[saveIndex],
  280 + dMachineQty: Math.floor(slaveData[saveIndex].dMachineQty / slaveData[saveIndex].dSinglePQty),
  281 + dMaterialsKQty: newDMaterialsKQty,
  282 + };
  283 + }
17 284  
  285 + if (sFieldName === "sName") {
  286 + slaveData[saveIndex] = {
  287 + ...slaveData[saveIndex],
  288 + dMaxLength: Number(selectedNode.sMachineStyle.split("*")[0]),
  289 + dMaxWidth: Number(selectedNode.sMachineStyle.split("*")[1]),
  290 + };
  291 + }
  292 +
  293 + setState(pre => ({ ...pre, slaveData, ...extraState }));
  294 + } else if (name === "finished") {
  295 + const { productProcessInfo = [] } = masterData;
  296 + const dropDownDataSelected = dropDownData.find(item => item.sId === changeValue[sFieldName]);
  297 + dropDownDataSelected && (dropDownDataSelected[sFieldName] = dropDownDataSelected.sProcessName);
  298 + const iIndex = productProcessInfo.findIndex(item => item.sProductClassifyId === dropDownData[0].sProductClassifyId);
  299 + if (iIndex === -1) {
  300 + dropDownDataSelected !== undefined && productProcessInfo.push(dropDownDataSelected);
  301 + } else {
  302 + if (dropDownDataSelected === undefined) {
  303 + productProcessInfo.splice(iIndex, 1);
  304 + } else {
  305 + productProcessInfo[iIndex] = dropDownDataSelected;
  306 + }
  307 + }
  308 + const cpProcessName = productProcessInfo.map(item => item.sProcessName).join(",");
  309 + const masterDataNew = { ...masterData, cpProcessName, productProcessInfo };
  310 + masterDataNew.handleType = masterDataNew.handleType || "update";
  311 + masterDataNew.sId = masterDataNew.sId || commonUtils.createSid();
  312 + setState(pre => ({ ...pre, masterData: masterDataNew, ...extraState }));
  313 + }
  314 + };
  315 +
  316 + addState.onGetAllDelData = () => {
  317 + const {
  318 + slaveData = [],
  319 + slaveDelData: slaveDelDataOld = [],
  320 + controlData = [],
  321 + controlDelData: controlDelDataOld = [],
  322 + materialsData = [],
  323 + materialsDelData: materialsDelDataOld = [],
  324 + processData = [],
  325 + processDelData: processDelDataOld = [],
  326 + manyqtysData = [],
  327 + manyqtysDelData: manyqtysDelDataOld = [],
  328 + colorData = [],
  329 + colorDelData: colorDelDataOld = [],
  330 + packData = [],
  331 + packDelData: packDelDataOld = [],
  332 + } = props;
  333 + const addState = {
  334 + slaveDelData: [...slaveDelDataOld, ...slaveData.map(item => ({ ...item, handleType: "del" }))],
  335 + controlDelData: [...controlDelDataOld, ...controlData.map(item => ({ ...item, handleType: "del" }))],
  336 + materialsDelData: [...materialsDelDataOld, ...materialsData.map(item => ({ ...item, handleType: "del" }))],
  337 + processDelData: [...processDelDataOld, ...processData.map(item => ({ ...item, handleType: "del" }))],
  338 + manyqtysDelData: [...manyqtysDelDataOld, ...manyqtysData.map(item => ({ ...item, handleType: "del" }))],
  339 + colorDelData: [...colorDelDataOld, ...colorData.map(item => ({ ...item, handleType: "del" }))],
  340 + packDelData: [...packDelDataOld, ...packData.map(item => ({ ...item, handleType: "del" }))],
  341 + };
  342 + return addState;
  343 + };
  344 +
  345 + // 存草稿
  346 + const onSaveDraft = (nextState = state, nextProps = props) => {
  347 + const { masterData = {} } = nextState;
  348 + const { sProductName, sProductNo, sCustomerName, sCustomerId, sCustomerNo } = masterData;
  349 + if (!sProductName || !sCustomerName) {
  350 + message.info("请先填写客户名称和产品名称");
  351 + return;
  352 + }
  353 +
  354 + props.onSaveState(
  355 + {
  356 + ...addState.onGetAllDelData(),
  357 + masterData: { ...nextProps.masterData, sQuoConfig: JSON.stringify(addState.onGetFilterState(nextState)) },
  358 + slaveData: nextProps.slaveData.map(item => {
  359 + return {
  360 + ...item,
  361 + sProductName: sProductName,
  362 + sProductNo: sProductNo,
  363 + sCustomerName: sCustomerName,
  364 + sCustomerId: sCustomerId,
  365 + sCustomerNo: sCustomerNo,
  366 + handleType: "add",
  367 + };
  368 + }),
  369 + controlData: nextProps.controlData.map(item => {
  370 + return {
  371 + ...item,
  372 + // sPartsName: sProductName,
  373 + handleType: "add",
  374 + };
  375 + }),
  376 + materialsData: nextProps.materialsData?.map(item => {
  377 + return {
  378 + ...item,
  379 + handleType: "add",
  380 + };
  381 + }),
  382 + processData: nextProps.processData?.map(item => {
  383 + return {
  384 + ...item,
  385 + handleType: "add",
  386 + };
  387 + }),
  388 + manyqtysData: nextProps.manyqtysData?.map(item => {
  389 + return {
  390 + ...item,
  391 + handleType: "add",
  392 + };
  393 + }),
  394 + colorData: nextProps.colorData?.map(item => {
  395 + return {
  396 + ...item,
  397 + handleType: "add",
  398 + };
  399 + }),
  400 + packData: nextProps.packData?.map(item => {
  401 + return {
  402 + ...item,
  403 + handleType: "add",
  404 + };
  405 + }),
  406 + loading: true,
  407 + },
  408 + () => {
  409 + props.onButtonClick("BtnDraft");
  410 + }
  411 + );
  412 + };
  413 +
  414 + addState.onSaveDraft = onSaveDraft;
  415 +
  416 + // 核价按钮
  417 + addState.handleCalcPrice = async () => {
  418 + const { masterData = {}, slaveData = [], selectedNode = {}, extraParts = {} } = state;
  419 +
  420 + if (commonUtils.isEmptyObject(selectedNode)) {
  421 + message.error("请先选择产品");
  422 + return;
  423 + }
  424 + const mustFieldsMap = {
  425 + sCustomerName: "请先选择客户名称",
  426 + sProductName: "请先输入产品名称",
  427 + sProductUnit: "请先输入产品单位",
  428 + dLength: "请先输入长度",
  429 + dWidth: "请先输入宽度",
  430 + dProductQty: "请先输入数量",
  431 + };
  432 +
  433 + const checkResult = Object.keys(mustFieldsMap).find(item => masterData[item] === undefined);
  434 + if (checkResult) {
  435 + message.error(mustFieldsMap[checkResult]);
  436 + return;
  437 + }
  438 +
  439 + const { bBox, showName, sId } = selectedNode;
  440 + let { sAllPartsName } = selectedNode;
  441 + if (!sAllPartsName) {
  442 + sAllPartsName = showName;
  443 + }
  444 +
  445 + const slaveRowDataList =
  446 + slaveData
  447 + .filter(item => item.sTreeNodeName === showName && item.materialsInfo && !item.materialsInfo.some(x => !x.sMaterialsName))
  448 + .filter(item => (bBox ? item.sName : true))
  449 + .filter(item => item.sPrint !== undefined && item.sColor !== undefined && item.iPrintModePo !== undefined) || [];
  450 + if (!slaveRowDataList.length) {
  451 + message.error("请至少保证一个部件的材料信息填写完整");
  452 + return;
  453 + }
  454 +
  455 + setState(pre => ({ ...pre, calcPriceLoading: true, calcPriceFinished: false }));
  456 +
  457 + const { sModelsId, token, sBoxModel } = props;
  458 + const extraPartsList = extraParts[showName] || [];
  459 + const sAllPartsNameList = [...sAllPartsName.split(","), ...extraPartsList];
  460 +
  461 + const masterDataNew = {
  462 + ...masterData,
  463 + cpProcessName: masterData.cpProcessName || "",
  464 + productProcessInfo: masterData.productProcessInfo?.map(item => ({ ...item, sProcessId: item.sId })) || [],
  465 + sProductClassifyId: sId,
  466 + sProductName1: masterData.sProductName,
  467 + dProductWidth: masterData.dWidth,
  468 + dProductLength: masterData.dLength,
  469 + dProductHeight: masterData.dHeight,
  470 + sProductStyle:
  471 + masterData.dHeight !== undefined
  472 + ? `${masterData.dLength}*${masterData.dWidth}*${masterData.dHeight}`
  473 + : `${masterData.dLength}*${masterData.dWidth}`,
  474 + };
  475 + const paramMap = {
  476 + bQuotation: true,
  477 + ...masterDataNew,
  478 + product: masterDataNew,
  479 + sPartsStyle: "",
  480 + partsInfo: sAllPartsNameList
  481 + .map(partName => {
  482 + const temp = {
  483 + ...slaveData.find(item => item.sTreeNodeName === showName && item.sBoxModel === partName),
  484 + };
  485 + return temp;
  486 + })
  487 + .filter(item => commonUtils.isNotEmptyObject(item) && item.materialsInfo && item.materialsInfo.length)
  488 + .map(item => {
  489 + return {
  490 + ...Object.keys(item).reduce((pre, cur) => {
  491 + if (typeof item[cur] !== "object") {
  492 + pre[cur] = item[cur];
  493 + }
  494 + return pre;
  495 + }, {}),
  496 + dPartsQty: masterData.dProductQty,
  497 + iPositiveColor: Number(item.sColor),
  498 + sPartsName: item.sBoxModel,
  499 + materialsInfo: item.materialsInfo?.filter(x => commonUtils.isNotEmptyObject(x)),
  500 + processInfo:
  501 + item.sBackProcessData?.map(item => ({
  502 + ...item,
  503 + sProcessId: item.sId,
  504 + })) || [],
  505 + };
  506 + }),
  507 + };
  508 + paramMap.sPartsStyle = (paramMap.partsInfo[0].dPartsLength || 0) + "*" + (paramMap.partsInfo[0].dPartsWidth || 0);
  509 + if (paramMap.sPartsStyle === "0*0") {
  510 + delete paramMap.sPartsStyle;
  511 + }
  512 + const url = `${commonConfig.server_host}calculationStd/countMoney?sModelsId=${sModelsId}`;
  513 + const dataReturn = (await commonServices.postValueService(token, paramMap, url)).data;
  514 +
  515 + if (dataReturn.code === 1) {
  516 + const { slaveConfig, masterData: masterData1, materialsConfig, processConfig, sModelsId, app } = props;
  517 + const { productClassify, partsNewInfo = [], productProcessInfo, partsInfo: partsOldInfo } = dataReturn.dataset.rows[0];
  518 +
  519 + const slaveData = [];
  520 + const controlData = [];
  521 + const materialsData = [];
  522 + let processData = [];
  523 + let tableDataRow = {};
  524 + for (const item of slaveConfig.gdsconfigformslave) {
  525 + tableDataRow[item.sName] = masterData[item.sName];
  526 + }
  527 + tableDataRow.sId = commonUtils.createSid();
  528 + tableDataRow.handleType = "add";
  529 + tableDataRow.iOrder = 1;
  530 + tableDataRow.sParentId = masterData.sId;
  531 + // const productIdDropDown = commonUtils.getStoreDropDownData(sModelsId, 'slave', 'sProductName');
  532 + let productIdDropDown;
  533 + const slaveIndex = slaveConfig.gdsconfigformslave.findIndex(item => item.sName === "sProductName");
  534 + if (slaveIndex > -1) {
  535 + const sqlDropDownData = await props.getSqlDropDownData(sModelsId, "slave", slaveConfig.gdsconfigformslave[slaveIndex], tableDataRow);
  536 + productIdDropDown = sqlDropDownData.dropDownData;
  537 + }
  538 + const iProductIdIndex = commonUtils.isEmptyArr(productIdDropDown)
  539 + ? -1
  540 + : productIdDropDown.findIndex(item => item.sId === tableDataRow.sProductId);
  541 + if (iProductIdIndex === -1) {
  542 + tableDataRow.sProductId = tableDataRow.sProductName;
  543 + const tableDataRowNew = { ...tableDataRow, ...masterDataNew };
  544 + const extraProps = {
  545 + sProductId: tableDataRowNew.sProductName,
  546 + sProductName: tableDataRowNew.sProductName,
  547 + sProductStyle: tableDataRowNew.sProductStyle,
  548 + sProductUnit: tableDataRowNew.sProductUnit,
  549 + sProductNo: tableDataRowNew.sProductNo,
  550 + sCustomerProductNo: tableDataRowNew.sCustomerProductNo,
  551 + sProductClassifyId: tableDataRowNew.sProductClassifyId,
  552 + sProductClassifyName: tableDataRowNew.sProductClassifyName,
  553 + };
  554 + tableDataRow = { ...tableDataRow, ...extraProps };
  555 + tableDataRow.sProductInfo = JSON.stringify(extraProps);
  556 + } else {
  557 + tableDataRow.sProductInfo = "";
  558 + }
  559 + slaveData.push(tableDataRow);
  560 + const sInfoArr = [];
  561 + let errorFlag = false;
  562 + if (!commonUtils.isEmptyArr(partsOldInfo)) {
  563 + partsOldInfo.forEach(item => {
  564 + if (commonUtils.isNotEmptyObject(item) && !commonUtils.isEmpty(item.errorFlag)) {
  565 + errorFlag = true;
  566 + props.getServiceError({ msg: `${item.sPartsName} ${item.errorFlag}` });
  567 + }
  568 + });
  569 + }
  570 + if (errorFlag) {
  571 + setState(pre => ({ ...pre, calcPriceLoading: false }));
  572 + return;
  573 + }
  574 +
  575 + // 返回数据赋值
  576 + const { slaveData: stateSlaveData = [] } = state;
  577 + partsNewInfo.forEach(item => {
  578 + const slaveRowData = stateSlaveData.find(row => item.sTreeNodeName === row.sTreeNodeName && item.sBoxModel === row.sBoxModel);
  579 + slaveRowData.dMachineQty = item.dMachineQty;
  580 + slaveRowData.dAuxiliaryQty = item.materialsInfo?.[0]?.dAuxiliaryQty;
  581 + slaveRowData.sPrint = item.sProcessName;
  582 + setState(pre => ({ ...pre, slaveData: stateSlaveData }));
  583 + });
  584 +
  585 + if (props.app.userinfo.sType === "sysadmin") {
  586 + /* 超级管理员,弹窗显示接口返回的sInfo */
  587 + partsNewInfo.forEach(item => {
  588 + const { sPartsName, sInfo } = item;
  589 + const sInfoObj = {};
  590 + sInfoObj.sPartsName = sPartsName;
  591 + sInfoObj.sInfo = sInfo;
  592 + sInfoArr.push(sInfoObj);
  593 + });
  594 + }
  595 +
  596 + const bProcessAssort = true;
  597 + let returnProcessAssort = [];
  598 + let processAssignAssort = "";
  599 + let dropDownDataProcessName;
  600 + if (bProcessAssort) {
  601 + const dataUrl = `${commonConfig.server_host}salesorder/getProcessAssort?sModelsId=${sModelsId}`;
  602 + const dataProcessAssort = (await commonServices.postValueService(token, {}, dataUrl)).data;
  603 + if (dataProcessAssort.code === 1) {
  604 + returnProcessAssort = dataProcessAssort.dataset.rows[0].processassort;
  605 + const iIndex = processConfig.gdsconfigformslave.findIndex(item => item.sName === "sProcessName");
  606 + if (iIndex > -1) {
  607 + const sqlDropDownData = await props.getSqlDropDownData(sModelsId, "slave", processConfig.gdsconfigformslave[iIndex]);
  608 + dropDownDataProcessName = sqlDropDownData.dropDownData;
  609 + processAssignAssort = processConfig.gdsconfigformslave[iIndex].sAssignField;
  610 + }
  611 + }
  612 + }
  613 + const newCopyTo = {};
  614 + newCopyTo.master = masterData;
  615 + newCopyTo.slave = commonUtils.isEmptyArr(slaveData) ? {} : slaveData[0];
  616 + for (let i = 0; i < partsNewInfo.length; i++) {
  617 + const partInfo = partsNewInfo[i];
  618 + const iIndex = i;
  619 + const partsDataRow = {};
  620 + for (const child of Object.keys(partInfo)) {
  621 + partsDataRow[child] = partInfo[child];
  622 + }
  623 + partsDataRow.handleType = "add";
  624 + partsDataRow.iOrder = iIndex + 1; /* 快速下单编号从1开始 */
  625 + partsDataRow.sId = commonUtils.createSid();
  626 + partsDataRow.sParentId = masterData.sId;
  627 + // partsDataRow.sSlaveId = ' ';
  628 + if (partsDataRow.iPrintMode !== 3) {
  629 + partsDataRow.iOppositeColor = partsDataRow.iPositiveColor;
  630 + }
  631 + delete partsDataRow.dMaterialsKQty;
  632 + delete partsDataRow.dMaterialsLength;
  633 + delete partsDataRow.dMaterialsWidth;
  634 + if (productClassify.bSpecialRules) {
  635 + partsDataRow.dMachineLength = partsDataRow.dMaxMachineLength;
  636 + partsDataRow.dMachineWidth = partsDataRow.dMaxMachineWidth;
  637 + }
  638 + controlData.push(partsDataRow);
  639 + // 材料信息
  640 + for (let i = 0; i < partInfo.materialsInfo.length; i++) {
  641 + const materialInfo = partInfo.materialsInfo[i];
  642 + const iOrder = i;
  643 + let materialDataRow = {};
  644 + for (const item of materialsConfig.gdsconfigformslave) {
  645 + materialDataRow[item.sName] = materialInfo[item.sName];
  646 + }
  647 + materialDataRow.handleType = "add";
  648 + materialDataRow.sType = "0";
  649 + materialDataRow.iPartOrder = iIndex;
  650 + materialDataRow.iOrder = iOrder + 1;
  651 + materialDataRow.sPartsName = partsDataRow.sPartsName;
  652 + materialDataRow.sId = commonUtils.createSid();
  653 + materialDataRow.sParentId = masterData.sId;
  654 + materialDataRow.sControlId = partsDataRow.sId;
  655 + // materialDataRow.sSlaveId = ' ';
  656 + materialDataRow.dMaterialsKQty = partsDataRow.iNumberofMaterial;
  657 + const models = "Materials";
  658 + materialDataRow = await props.onMaterialsChange(materialDataRow, sModelsId, masterData, [], "dAuxiliaryQty", app, token, models);
  659 + materialDataRow = commonBusiness.getCalculateAllMoney(app, models, "dAuxiliaryQty", masterData, materialDataRow);
  660 + materialsData.push(materialDataRow);
  661 + }
  662 +
  663 + // 工序信息
  664 + let processPrintDataRow = {};
  665 + processPrintDataRow.handleType = "add";
  666 + processPrintDataRow.sProcessId = partInfo.sProcessId;
  667 + const iProcessPrintIndex = dropDownDataProcessName.findIndex(item => item.sId === processPrintDataRow.sProcessId);
  668 + if (iProcessPrintIndex > -1) {
  669 + processPrintDataRow = {
  670 + ...processPrintDataRow,
  671 + ...commonFunc.getAssignFieldValue(processAssignAssort, dropDownDataProcessName[iProcessPrintIndex], newCopyTo),
  672 + }; // 取赋值字段
  673 + }
  674 + processPrintDataRow.sType = partInfo.sType;
  675 + processPrintDataRow.iPartOrder = iIndex;
  676 + processPrintDataRow.iOrder = 1;
  677 + processPrintDataRow.sProcessName = partInfo.sProcessName;
  678 + processPrintDataRow.sPartsName = partsDataRow.sPartsName;
  679 + processPrintDataRow.dProcessInQty = partInfo.dProcessInQty;
  680 + processPrintDataRow.dLossQty = partInfo.dLossQty;
  681 + processPrintDataRow.dProcessOutQty = partInfo.dProcessOutQty;
  682 + processPrintDataRow.sId = commonUtils.createSid();
  683 + processPrintDataRow.sParentId = masterData.sId;
  684 + processPrintDataRow.sControlId = partsDataRow.sId;
  685 + // processPrintDataRow.sSlaveId = ' ';
  686 + processData.push(processPrintDataRow);
  687 + // 配套工序
  688 + if (bProcessAssort) {
  689 + returnProcessAssort
  690 + .filter(item => item.sParentId === processPrintDataRow.sProcessId)
  691 + .forEach(itemProcessAssort => {
  692 + const iIndex = dropDownDataProcessName.findIndex(item => item.sId === itemProcessAssort.sProcessId);
  693 + const iProcessIndex = -1;
  694 + const iNewProcessIndex = processData.findIndex(
  695 + item => item.sProcessId === itemProcessAssort.sProcessId && item.sControlId === partsDataRow.sId
  696 + );
  697 + if (iIndex > -1 && iProcessIndex < 0 && iNewProcessIndex < 0) {
  698 + let processRow = commonFunc.getDefaultData(processConfig, newCopyTo); // 取默认值
  699 + processRow = { ...processRow, ...commonFunc.getAssignFieldValue(processAssignAssort, dropDownDataProcessName[iIndex], newCopyTo) }; // 取赋值字段
  700 + processRow.handleType = "add";
  701 + processRow.sId = commonUtils.createSid();
  702 + processRow.sParentId = masterData.sId;
  703 + processRow.sControlId = partsDataRow.sId;
  704 + processRow.sPartsName = partsDataRow.sPartsName;
  705 + processRow.sType = dropDownDataProcessName[iIndex].sType;
  706 + // processRow.sSlaveId = ' ';
  707 + processData.push(processRow);
  708 + }
  709 + });
  710 + }
  711 +
  712 + partInfo.processInfo.forEach((process, iOrder) => {
  713 + let processAfterDataRow = {};
  714 + for (const item of processConfig.gdsconfigformslave) {
  715 + processAfterDataRow[item.sName] = process[item.sName];
  716 + }
  717 + for (const child of Object.keys(process)) {
  718 + processAfterDataRow[child] = process[child];
  719 + }
  720 + processAfterDataRow.handleType = "add";
  721 + processAfterDataRow.sProcessId = process.sProcessId;
  722 + const iProcessAfterIndex = dropDownDataProcessName.findIndex(item => item.sId === processAfterDataRow.sProcessId);
  723 + if (iProcessAfterIndex > -1) {
  724 + processAfterDataRow = {
  725 + ...processAfterDataRow,
  726 + ...commonFunc.getAssignFieldValue(processAssignAssort, dropDownDataProcessName[iProcessAfterIndex], newCopyTo),
  727 + }; // 取赋值字段
  728 + }
  729 + processAfterDataRow.sType = process.sType;
  730 + processAfterDataRow.iPartOrder = iIndex;
  731 + processAfterDataRow.iOrder = iOrder + 1;
  732 + processAfterDataRow.sPartsName = partsDataRow.sPartsName;
  733 + processAfterDataRow.sId = commonUtils.createSid();
  734 + processAfterDataRow.sParentId = masterData.sId;
  735 + processAfterDataRow.sControlId = partsDataRow.sId;
  736 + // processAfterDataRow.sSlaveId = ' ';
  737 + processData.push(processAfterDataRow);
  738 + // 配套工序
  739 + if (bProcessAssort) {
  740 + returnProcessAssort
  741 + .filter(item => item.sParentId === processPrintDataRow.sProcessId)
  742 + .forEach(itemProcessAssort => {
  743 + const iIndex = dropDownDataProcessName.findIndex(item => item.sId === itemProcessAssort.sProcessId);
  744 + const iProcessIndex = -1;
  745 + const iNewProcessIndex = processData.findIndex(
  746 + item => item.sProcessId === itemProcessAssort.sProcessId && item.sControlId === partsDataRow.sId
  747 + );
  748 + if (iIndex > -1 && iProcessIndex < 0 && iNewProcessIndex < 0) {
  749 + let processRow = commonFunc.getDefaultData(processConfig, newCopyTo); // 取默认值
  750 + processRow = { ...processRow, ...commonFunc.getAssignFieldValue(processAssignAssort, dropDownDataProcessName[iIndex], newCopyTo) }; // 取赋值字段
  751 + processRow.handleType = "add";
  752 + processRow.sId = commonUtils.createSid();
  753 + processRow.sParentId = masterData.sId;
  754 + processRow.sControlId = partsDataRow.sId;
  755 + processRow.sPartsName = partsDataRow.sPartsName;
  756 + processRow.sType = dropDownDataProcessName[iIndex].sType;
  757 + // processRow.sSlaveId = ' ';
  758 + processData.push(processRow);
  759 + }
  760 + });
  761 + }
  762 + });
  763 + }
  764 + productProcessInfo.forEach((process, iOrder) => {
  765 + let processProductDataRow = {};
  766 + for (const item of processConfig.gdsconfigformslave) {
  767 + processProductDataRow[item.sName] = process[item.sName];
  768 + }
  769 + for (const child of Object.keys(process)) {
  770 + processProductDataRow[child] = process[child];
  771 + }
  772 + const iProductProcessIndex = dropDownDataProcessName.findIndex(item => item.sId === processProductDataRow.sProcessId);
  773 + if (iProductProcessIndex > -1) {
  774 + processProductDataRow = {
  775 + ...processProductDataRow,
  776 + ...commonFunc.getAssignFieldValue(processAssignAssort, dropDownDataProcessName[iProductProcessIndex], newCopyTo),
  777 + }; // 取赋值字段
  778 + }
  779 + processProductDataRow.handleType = "add";
  780 + processProductDataRow.sType = "3";
  781 + processProductDataRow.sPartsName = "";
  782 + processProductDataRow.iPartOrder = 999;
  783 + processProductDataRow.iOrder = iOrder + 1;
  784 + processProductDataRow.sId = commonUtils.createSid();
  785 + processProductDataRow.sParentId = masterData.sId;
  786 + // processProductDataRow.sSlaveId = ' ';
  787 + processData.push(processProductDataRow);
  788 + // 配套工序
  789 + if (bProcessAssort) {
  790 + returnProcessAssort
  791 + .filter(item => item.sParentId === processProductDataRow.sProcessId)
  792 + .forEach(itemProcessAssort => {
  793 + const iIndex = dropDownDataProcessName.findIndex(item => item.sId === itemProcessAssort.sProcessId);
  794 + const iProcessIndex = -1;
  795 + const iNewProcessIndex = processData.findIndex(item => item.sProcessId === itemProcessAssort.sProcessId);
  796 + if (iIndex > -1 && iProcessIndex < 0 && iNewProcessIndex < 0) {
  797 + let processRow = commonFunc.getDefaultData(processConfig, newCopyTo); // 取默认值
  798 + processRow = { ...processRow, ...commonFunc.getAssignFieldValue(processAssignAssort, dropDownDataProcessName[iIndex], newCopyTo) }; // 取赋值字段
  799 + processRow.handleType = "add";
  800 + processRow.sId = commonUtils.createSid();
  801 + processRow.sParentId = masterData.sId;
  802 + processRow.sType = dropDownDataProcessName[iIndex].sType;
  803 + // processRow.sSlaveId = ' ';
  804 + processData.push(processRow);
  805 + }
  806 + });
  807 + }
  808 + });
  809 + processData = props.sortData(controlData, processData);
  810 + const addState = { controlSelectedRowKeys: ["0000000"] };
  811 + if (!commonUtils.isEmptyArr(slaveData)) {
  812 + addState.slaveSelectedRowKeys = [slaveData[0].sId];
  813 + }
  814 +
  815 + const newState = {
  816 + materialsConfig,
  817 + masterData: { ...masterData1, ...masterData },
  818 + slaveData,
  819 + controlData,
  820 + materialsData,
  821 + processData,
  822 + fastOrderModalVisible: false,
  823 + quotationAllprogress: 0,
  824 + materialsSelectedRowKeys: [],
  825 + ...addState,
  826 + sInfoArr,
  827 + // bVisiblesInfo: !!commonUtils.isNotEmptyArr(sInfoArr),
  828 + Loading: false,
  829 + // quickQuoteModel: false,
  830 + };
  831 +
  832 + delete newState.masterData.sQuoConfig;
  833 +
  834 + const result = await props.handleCalculation(
  835 + false,
  836 + { ...props, ...newState, manyqtysConfig: state.manyConfig, manyqtysData: state.manyData },
  837 + true
  838 + );
  839 +
  840 + if (commonUtils.isEmptyObject(result)) {
  841 + setState(pre => ({ ...pre, calcPriceLoading: false }));
  842 + return;
  843 + }
  844 +
  845 + const { manyqtysData = [] } = result;
  846 + result.manyqtysData = manyqtysData.map(item => ({
  847 + ...item,
  848 + sParentId: newState.masterData.sId,
  849 + }));
  850 +
  851 + setState(pre => {
  852 + const preNew = { ...pre, manyData: result.manyqtysData, calcPriceLoading: false, calcPriceFinished: true };
  853 + const stateNew = { ...newState, ...result };
  854 + props.onSaveState(stateNew, () => {
  855 + onSaveDraft(preNew, stateNew);
  856 + });
  857 + return preNew;
  858 + });
  859 + } else {
  860 + message.error(dataReturn.erroMsg || dataReturn.msg);
  861 + setState(pre => ({ ...pre, calcPriceLoading: false }));
  862 + }
  863 + };
  864 +
  865 + // 新报价
  866 + addState.onAdd = () => {
  867 + const restList = ["formData", "manyColumn", "manyConfig", "masterConfig", "slaveConfig", "slaveColumn", "treeData"];
  868 + const stateNew = {
  869 + ...restList.reduce((pre, cur) => {
  870 + pre[cur] = state[cur];
  871 + return pre;
  872 + }, {}),
  873 + masterData: {},
  874 + slaveData: [],
  875 + manyData: [],
  876 + };
  877 + setState(stateNew);
  878 + props.onAdd();
  879 + };
  880 +
  881 + // 选择盒型弹窗
  882 + addState.onFieldPopupModal = (showConfig, name) => {
  883 + if (showConfig.sName === "sName") {
  884 + props.onSaveState({ boxModelSelectedModalVisible: true, currentBoxModel: name });
  885 + }
  886 + };
  887 +
  888 + return {
  889 + ...props,
  890 + onDataChange0: props.onDataChange,
  891 + ...addState,
  892 + hideBackBtn,
  893 + enabled,
  894 + state,
  895 + setState,
  896 + masterConfig: masterConfig && masterConfig.length ? masterConfig[0] : {},
  897 + };
  898 +};
  899 +
  900 +const QuotationAllprogressDetail = baseProps => {
  901 + // const props = QuickQuoteEvent(baseProps);
  902 + const [state, setState] = useState(JsonData.state);
  903 + const props = {
  904 + ...baseProps,
  905 + ...JsonData,
  906 + setState,
  907 + state,
  908 + };
18 909 return (
19 910 <div className={styles.quotationDetailBox}>
20 911 <QuotationDetail {...props} />
... ... @@ -23,140 +914,103 @@ const QuotationAllprogressDetail = props =&gt; {
23 914 };
24 915  
25 916 const QuotationDetail = props => {
26   - const { location, app, sModelsId } = props;
  917 + const { location, app, sModelsId, state, masterData, selectedNode = {} } = props;
  918 + console.log("🚀 ~ QuotationDetail:", props);
27 919 const { token } = app;
28   - const [state, setState] = useState(null);
29   - const addState = {};
30   -
31   - // addState.onGetFilterState = (state, bInit) => {
32   - // const result = Object.keys(state).reduce((pre, cur) => {
33   - // if (cur.endsWith("Column") || cur.endsWith("Config") || ["formData", "treeData", "downAbleConfigs", "finishedConfigs"].includes(cur)) {
34   - // return pre;
35   - // }
36   -
37   - // pre[cur] = state[cur];
38   - // return pre;
39   - // }, {});
40   -
41   - // const { slaveData = [], manyData = [] } = result;
42   - // const materialInfoFields = [
43   - // "sMaterialsName",
44   - // "sMaterialsNo",
45   - // "sMaterialsId",
46   - // "sAuxiliaryUnit",
47   - // "sMaterialsUnit",
48   - // "bReel",
49   - // "dCoefficient",
50   - // "bInverse",
51   - // "sMaterialsStyle",
52   - // "sComputeId",
53   - // "sReComputeId",
54   - // "dGramWeight",
55   - // "sReConversionComputeId",
56   - // "sConversionComputeId",
57   - // "sMaterialsType",
58   - // "bComMaterials",
59   - // "dWlcd",
60   - // "dWlkd",
61   - // ];
62   - // const slaveDataNew = bInit
63   - // ? slaveData.map(item => {
64   - // const { materialsInfo = [], sMaterialsName } = item;
65   - // if (!materialsInfo.length && sMaterialsName) {
66   - // return {
67   - // ...item,
68   - // materialsInfo: [
69   - // materialInfoFields.reduce((pre, cur) => {
70   - // pre[cur] = item[cur];
71   - // return pre;
72   - // }, {}),
73   - // ],
74   - // };
75   - // } else {
76   - // return item;
77   - // }
78   - // })
79   - // : slaveData;
80   -
81   - // const manyDataNew = manyData.map(item => {
82   - // delete item.manyData;
83   - // return item;
84   - // });
85   -
86   - // return { ...result, slaveData: slaveDataNew, manyData: manyDataNew };
87   - // };
88   -
89   - // 初始化状态
90   - const { formData = [] } = state || {};
  920 + const { formData = [], masterConfig } = state || {};
91 921 const { quotationData } = JSON.parse(location.state) || {};
92   - const [masterConfig, setMasterConfig] = useState(null);
  922 + if (!masterConfig) return;
  923 + //masterData 主表数据
93 924 // 获取主表信息
94   - // useEffect(() => {
95   - // const configUrl = `${commonConfig.server_host}business/getModelBysId/${sModelsId}?sModelsId=${sModelsId}`;
96   - // commonServices.getService(token, configUrl).then(({ data: configReturn }) => {
97   - // if (configReturn.code === 1) {
98   - // const formData = configReturn.dataset.rows[0].formData;
99   - // setMasterConfig(formData[0]);
100   -
101   - // setState(pre => ({ ...pre, formData }));
102   - // }
103   - // });
104   - // }, []);
105   - // useEffect(() => {
106   - // // 安全地解析 state
107   - // let parsedState = {};
108   - // try {
109   - // parsedState = JSON.parse(location.state || "{}");
110   - // } catch (error) {
111   - // console.error("Error parsing state:", error);
112   - // }
113   - // const { sModelsId } = parsedState;
114   - // // 构造请求 URL
115   - // const configUrl = `${commonConfig.server_host}business/getModelBysId/${"172129113112117428019179600"}?sModelsId=${"172129113112117428019179600"}`;
116   - // // 调用服务获取数据
117   - // commonServices
118   - // .getService(token, configUrl)
119   - // .then(({ data: configReturn }) => {
120   - // if (configReturn.code === 1) {
121   - // const formData = configReturn.dataset.rows[0]?.formData;
122   - // setState(pre => ({ ...pre, ...JsonData, selectedNode: quotationData, boxConfig: formData[0], masterConfig: formData[0] }));
123   - // }
124   - // })
125   - // .catch(error => {
126   - // console.error("Error fetching data:", error);
127   - // });
128   - // }, [location, app]);
129   -
130   - // const sQuoConfig = commonUtils.convertStrToObj(JsonData.masterData.sQuoConfig, {});
131   - // const [state, setState] = useState(addState.onGetFilterState(sQuoConfig, true));
132   - // 主表
133   - const list = JsonData.state?.masterConfig?.gdsconfigformslave.filter(item => item.sName && item.bVisible);
134   - // 客户
135   - const customer = list?.find(x => x.showName === "客户名称") || {};
  925 + const viewConfigs = masterConfig.gdsconfigformslave.filter(item => item.sName && item.bVisible);
  926 + const viewProps = {
  927 + ...props,
  928 + viewConfigs: viewConfigs,
  929 + tableConfig: masterConfig,
  930 + iColValueView: 24,
  931 + viewRow: { ...masterData, sProductClassifyId: selectedNode.sId },
  932 + tableName: "master",
  933 + };
  934 + console.log("🚀 ~ viewProps:", viewProps);
  935 +
  936 + return (
  937 + <div>
  938 + <div>{quotationData?.showName || "Loading..."}</div>
  939 +
  940 + <div>
  941 + <MasterComponent {...viewProps} />
  942 + </div>
  943 + <div>
  944 + <QuotationTabs {...props} />
  945 + </div>
  946 + </div>
  947 + );
  948 +};
  949 +const MasterComponent = props => {
  950 + console.log("🚀 ~ MasterComponent:", props);
  951 + const { viewConfigs, masterData } = props;
  952 +
  953 + const customer = viewConfigs?.find(x => x.sName === "sCustomerName") || {};
136 954 const customerProps = {
137 955 ...props,
138   - ...JsonData,
139   - formData: customer,
140   - // masterConfig,
  956 + itemDetail: customer,
  957 + sValue: masterData.sCustomerName,
  958 + id: masterData.sCustomerId,
  959 + No: masterData.sCustomerNo,
141 960 };
142   - const product = list?.find(x => x.showName === "产品名称") || {};
  961 + const product = viewConfigs?.find(x => x.sName === "sProductName") || {};
143 962 const productProps = {
144 963 ...props,
145   - ...JsonData,
146   - formData: product,
147   - // masterConfig,
  964 + itemDetail: product,
  965 + bCanInput: true,
  966 + sValue: masterData.sProductName,
  967 + };
  968 + const dLength = viewConfigs?.find(x => x.sName === "dLength") || {};
  969 +
  970 + const dLengthProps = {
  971 + ...props,
  972 + itemDetail: dLength,
  973 + bCanInput: true,
  974 + sValue: masterData.dLength,
  975 + };
  976 + const dWidth = viewConfigs?.find(x => x.sName === "dWidth") || {};
  977 + const dWidthProps = {
  978 + ...props,
  979 + itemDetail: dWidth,
  980 + bCanInput: true,
  981 + sValue: masterData.dWidth,
  982 + };
  983 + const dHeight = viewConfigs?.find(x => x.sName === "dHeight") || {};
  984 + const dHeightProps = {
  985 + ...props,
  986 + itemDetail: dHeight,
  987 + bCanInput: true,
  988 + sValue: masterData.dHeight,
  989 + };
  990 + const dProductQty = viewConfigs?.find(x => x.sName === "dProductQty") || {};
  991 + const dProductQtyProps = {
  992 + ...props,
  993 + itemDetail: dProductQty,
  994 + bCanInput: true,
  995 + sValue: masterData.dProductQty,
  996 + };
  997 + const sProductUnit = viewConfigs?.find(x => x.sName === "sProductUnit") || {};
  998 + const sProductUnitProps = {
  999 + ...props,
  1000 + itemDetail: sProductUnit,
  1001 + sValue: masterData.sProductUnit,
  1002 + };
  1003 + const sDeliverName = viewConfigs?.find(x => x.sName === "sDeliverName") || {};
  1004 + const sDeliverNameProps = {
  1005 + ...props,
  1006 + itemDetail: sDeliverName,
  1007 + sValue: masterData.sDeliverName,
148 1008 };
149   - // setState
150 1009 const baseProps = {
151 1010 ...props,
152   - ...JsonData,
153   - // state,
154   - // masterConfig,
155 1011 };
156   -
157 1012 return (
158 1013 <div>
159   - <div>{quotationData?.showName || "Loading..."}</div>
160 1014 <div className={styles.customer}>
161 1015 <div>{customerProps.formData.showName}</div>
162 1016 <SelectInput {...customerProps} />
... ... @@ -170,19 +1024,19 @@ const QuotationDetail = props =&gt; {
170 1024 <div className={styles.sizeBox}>
171 1025 <div className={styles.sizeItem}>
172 1026 <div style={{ width: "70%" }}>
173   - <SelectInput {...productProps} />
  1027 + <SelectInput {...dLengthProps} />
174 1028 </div>
175 1029 <div style={{ width: "30%", textAlign: "center" }}>X</div>
176 1030 </div>
177 1031 <div className={styles.sizeItem}>
178 1032 <div style={{ width: "70%" }}>
179   - <SelectInput {...productProps} />
  1033 + <SelectInput {...dWidthProps} />
180 1034 </div>{" "}
181 1035 <div style={{ width: "30%", textAlign: "center" }}>X</div>
182 1036 </div>
183 1037 <div className={styles.sizeItem}>
184 1038 <div style={{ width: "70%" }}>
185   - <SelectInput {...productProps} />
  1039 + <SelectInput {...dHeightProps} />
186 1040 </div>
187 1041 <div style={{ width: "30%", textAlign: "center" }}>mm</div>
188 1042 </div>
... ... @@ -191,42 +1045,36 @@ const QuotationDetail = props =&gt; {
191 1045 <div className={styles.sizeBox}>
192 1046 <div className={styles.customer}>
193 1047 <div>数量</div>
194   - <SelectInput {...productProps} />
  1048 + <SelectInput {...dProductQtyProps} />
195 1049 </div>
196 1050 <div className={styles.customer}>
197 1051 <div>单位</div>
198   - <SelectInput {...customerProps} />
  1052 + <SelectInput {...sProductUnitProps} />
199 1053 </div>
200 1054 <div className={styles.customer}>
201 1055 <div>收货方式</div>
202   - <SelectInput {...customerProps} />
  1056 + <SelectInput {...sDeliverNameProps} />
203 1057 </div>
204 1058 </div>
205   - <div>
206   - <QuotationTabs {...baseProps} setState={setState} />
207   - </div>
208 1059 </div>
209 1060 );
210 1061 };
211   -
212 1062 const QuotationTabs = props => {
213   - const { location } = props;
214   - const { state } = location;
215   - const JsonState = state ? JSON.parse(state) : "";
216   - const sAllPartsName = JsonState ? JsonState.quotationData.sAllPartsName : "";
217   - const sAllPartsNameList = sAllPartsName.split(",");
218   - const [activeKey, setActiveKey] = useState(sAllPartsNameList[0]);
  1063 + const { state } = props;
  1064 + const { selectedNode } = state;
  1065 + const sAllPartsName = selectedNode?.sAllPartsName;
  1066 + const sAllPartsNameList = sAllPartsName?.split(",");
  1067 + const [activeKey, setActiveKey] = useState(sAllPartsNameList && sAllPartsNameList.length ? sAllPartsNameList[0] : null);
219 1068  
220 1069 useEffect(() => {
221 1070 // 更新父组件的状态
222   - props.setState(pre => ({ ...pre, activeKey, boxModel: activeKey }));
  1071 + props.setState(pre => ({ ...pre, boxModel: activeKey }));
223 1072 }, [activeKey]);
224 1073  
225 1074 const tabsProps = {
226 1075 ...props,
227 1076 boxModel: activeKey,
228 1077 };
229   -
230 1078 return (
231 1079 <Tabs
232 1080 activeKey={activeKey}
... ... @@ -245,17 +1093,22 @@ const QuotationTabs = props =&gt; {
245 1093 );
246 1094 };
247 1095  
  1096 +// 内容
248 1097 const BoxComponent = props => {
249 1098 const { state, boxModel } = props;
250   - const { activeKey, slaveConfig, masterData, selectedNode, boxConfig, slaveData } = state || {};
  1099 + const { activeKey, slaveConfig, masterData, selectedNode, boxConfig, downAbleConfigs = [], slaveData } = state || {};
  1100 + console.log("🚀 ~ BoxComponent:", slaveData);
251 1101 const { sModelsId } = props;
252 1102 const [selectList, setSelectList] = useState([]);
  1103 + const [boxTypeList, setBoxTypeList] = useState([]);
253 1104 const [searchValue, setSearchValue] = useState("");
254   -
  1105 + const [slaveRowData, setSlaveRowData] = useState(null);
  1106 + const [boxPopup, setBoxPopup] = useState(false);
  1107 + const [boxsList, setBoxsList] = useState([]);
  1108 + const [selected, setSelected] = useState(null);
  1109 + // 获取盒型信息
255 1110 useEffect(() => {
256   - // 17428091410008594700322758474000
257 1111 const sId = "17428091410008594700322758474000";
258   -
259 1112 const url = `${commonConfig.server_host}business/getSelectLimit/${sId}?sModelsId=${sModelsId}&sName=${""}`;
260 1113 const body = {
261 1114 sSqlCondition: "",
... ... @@ -272,12 +1125,41 @@ const BoxComponent = props =&gt; {
272 1125 value: x.sId,
273 1126 };
274 1127 });
  1128 + const boxTypeLists = Array.from(
  1129 + new Set(
  1130 + list.map(item => {
  1131 + return {
  1132 + ...item,
  1133 + label: item.sBoxType,
  1134 + value: item.sBoxType,
  1135 + };
  1136 + })
  1137 + )
  1138 + );
  1139 + // 去重
  1140 + const uniqueArray = boxTypeLists.filter((item, index, self) => index === self.findIndex(i => i.sBoxType === item.sBoxType));
  1141 + setBoxTypeList(uniqueArray);
275 1142 setSelectList(list);
276 1143 }
277 1144 });
278 1145 // 获取盒型
279   - }, [boxModel]);
280   - const slaveRowData = slaveData.find(item => item.sTreeNodeName === selectedNode.showName && item.sBoxModel === boxModel) || {};
  1146 + }, []);
  1147 +
  1148 + useEffect(() => {
  1149 + props.setState(prevState => ({
  1150 + ...prevState,
  1151 + slaveRowData,
  1152 + }));
  1153 + }, [slaveRowData]);
  1154 +
  1155 + useEffect(() => {
  1156 + // changeBox()
  1157 + if (selectList.length <= 0) return;
  1158 + const boxModelData = slaveData.find(x=>x.sBoxModel === boxModel)
  1159 + const selectListDetail = selectList.find(x=>x.sName === boxModelData?.sName)
  1160 + setSelected(selectListDetail?.sBoxType);
  1161 + changeBox(selectListDetail)
  1162 + }, [slaveData, selectList]);
281 1163 const { sColumnNameConfig } = slaveRowData || {};
282 1164 const upAbleConfigsExtra = commonUtils.convertStrToObj(sColumnNameConfig, []).map(item => ({
283 1165 ...item,
... ... @@ -382,9 +1264,9 @@ const BoxComponent = props =&gt; {
382 1264 isMobile: true,
383 1265 };
384 1266 // 印刷参数
385   - if (!slaveConfig) return;
386   -
  1267 + // if (!slaveConfig) return;
387 1268 const getUpViewPropsByITag = iTag => {
  1269 + if (!slaveConfig) return;
388 1270 const config = slaveConfig.gdsconfigformslave.filter(item => {
389 1271 if (item.sName === "dSumPQty" && selectedNode.sTypeKey !== "huace") {
390 1272 return false;
... ... @@ -398,21 +1280,37 @@ const BoxComponent = props =&gt; {
398 1280 boxConfigList = boxConfig?.gdsconfigformslave?.filter(item => item.bVisible && showNameKeyList.includes(item.sName)) || [];
399 1281 }
400 1282 const newConfig = [...boxConfigList, ...config];
401   -
402 1283 return {
403 1284 ...props,
404 1285 viewConfigs: newConfig,
405 1286 tableConfig: { ...slaveConfig, gdsconfigformslave: newConfig },
406 1287 iColValueView: 24,
407 1288 viewRow: slaveRowData,
408   - // tableName: `slaveUp${boxModel}`,
  1289 + tableName: `slaveUp${boxModel}`,
409 1290 };
410 1291 };
  1292 +
411 1293 // 印刷参数表单
412 1294 const upViewProps12 = getUpViewPropsByITag(12);
413 1295 // 拼板信息表单
414 1296 const upViewProps20 = getUpViewPropsByITag(20);
415   - // const { calcMethodData = [], boxPicData = [], radioValue = calcMethodData[0]?.sCode } = slaveRowData;
  1297 +
  1298 + // 后道参数
  1299 + const downViewProps = {
  1300 + ...props,
  1301 + viewConfigs: downAbleConfigs
  1302 + .filter(item => item.sPartsName === boxModel || !item.sPartsName)
  1303 + .map(item => {
  1304 + return {
  1305 + ...item,
  1306 + isSelect: false,
  1307 + };
  1308 + }),
  1309 + tableConfig: { ...slaveConfig, gdsconfigformslave: downAbleConfigs },
  1310 + iColValueView: 24,
  1311 + viewRow: slaveRowData,
  1312 + tableName: `slaveDown${boxModel}`,
  1313 + };
416 1314 const calcMethodData = commonUtils.convertStrToObj(slaveRowData?.sColumnNameConfigExclusion, []);
417 1315 const radioValue = calcMethodData[0]?.sCode;
418 1316 const [materialLength, setMaterialLength] = useState(0);
... ... @@ -502,36 +1400,68 @@ const BoxComponent = props =&gt; {
502 1400 const boxProps = {
503 1401 ...props,
504 1402 slaveRowData,
505   - dSBJJ: slaveRowData.dXBJJ,
506   - dZBJJ: slaveRowData.dYBJJ,
  1403 + dSBJJ: slaveRowData?.dXBJJ,
  1404 + dZBJJ: slaveRowData?.dYBJJ,
507 1405 radioValue: calcMethodData?.find(item => item.sCode === radioValue),
  1406 + boxWidth: 190,
  1407 + boxHeight: 150,
  1408 + textSize: 9,
508 1409 // boxPicData,
509 1410 };
  1411 + const showImgMProps = {
  1412 + ...props,
  1413 + materialLength,
  1414 + materialWidth,
  1415 + bBox: true, // 快速报价盒型展示
  1416 + width: 200,
  1417 + height: 150,
  1418 + size: 9,
  1419 + };
  1420 + const handleChange = v => {
  1421 + if (v.length) {
  1422 + const newValue = v[0];
  1423 + if (newValue === selected) {
  1424 + // 如果是再次点击已选中的项,则不取消选中
  1425 + return;
  1426 + }
  1427 + setSelected(newValue);
  1428 + const list = selectList.filter(x => x.sBoxType === newValue);
  1429 + setBoxsList(list);
  1430 + setBoxPopup(true);
  1431 + } else {
  1432 + const list = selectList.filter(x => x.sBoxType === selected);
  1433 + setBoxsList(list);
  1434 + setBoxPopup(true);
  1435 + }
  1436 + };
  1437 + const changeBox = item => {
  1438 + // if (!item) return
  1439 + const data = selectList.find(x => x.sId === item.sId);
  1440 + if (!data) return;
  1441 + const slaveNewData = JSON.parse(data.sColumnNameConfig).map(x => {
  1442 + return {
  1443 + [x.sName]: x.sDefault,
  1444 + };
  1445 + });
  1446 + const slaveDataDetail = slaveData.find(item => item.sTreeNodeName === selectedNode.showName && item.sBoxModel === boxModel) || {};
  1447 +
  1448 + console.log("🚀 ~ slaveDataDetail:", slaveNewData)
  1449 + const rowData = {
  1450 + ...slaveDataDetail,
  1451 + ...data,
  1452 + ...Object.assign({}, ...slaveNewData),
  1453 + };
  1454 + setSlaveRowData(rowData);
  1455 + setBoxPopup(false);
  1456 + };
510 1457 return (
511 1458 <div>
512 1459 <Selector
513 1460 columns={4}
514   - options={selectList}
515   - defaultValue={["3"]}
516   - style={{ "--padding": "0.8rem" }}
517   - onChange={v => {
518   - if (v.length) {
519   - const data = selectList.find(x => x.sId === v[0]);
520   - const slaveNewData = JSON.parse(data.sColumnNameConfig).map(x => {
521   - return {
522   - [x.sName]: x.sDefault,
523   - };
524   - });
525   - const rowData = {
526   - ...data,
527   - ...Object.assign({}, ...slaveNewData),
528   - };
529   - props.setState(prevState => ({
530   - ...prevState,
531   - slaveRowData: rowData,
532   - }));
533   - }
534   - }}
  1461 + options={boxTypeList}
  1462 + style={{ "--padding": "0.8rem 0" }}
  1463 + value={selected ? [selected] : []}
  1464 + onChange={v => handleChange(v)}
535 1465 />
536 1466 <div>
537 1467 <Grid columns={4} gap={8}>
... ... @@ -554,34 +1484,261 @@ const BoxComponent = props =&gt; {
554 1484 <div>
555 1485 <div>印刷信息</div>
556 1486 <Grid columns={3} gap={8}>
557   - {upViewProps12.viewConfigs.map(x => (
558   - <Grid.Item>
559   - <div className={styles.customer} key={x.id || x.showName}>
560   - <div>{x.showName}</div>
561   - <SelectInput {...upViewProps12} {...x} bCanInput={false} />
562   - </div>
563   - </Grid.Item>
564   - ))}
  1487 + {upViewProps12
  1488 + ? upViewProps12.viewConfigs.map(x => (
  1489 + <Grid.Item>
  1490 + <div className={styles.customer} key={x.id || x.showName}>
  1491 + <div>{x.showName}</div>
  1492 + <SelectInput {...upViewProps12} itemDetail={x} bCanInput={false} />
  1493 + </div>
  1494 + </Grid.Item>
  1495 + ))
  1496 + : ""}
565 1497 </Grid>
566 1498 </div>
567 1499 <div>
568 1500 <div>拼版信息</div>
569 1501 <Grid columns={3} gap={8}>
570   - {upViewProps20.viewConfigs.map(x => (
571   - <Grid.Item>
572   - <div className={styles.customer} key={x.id || x.showName}>
573   - <div>{x.showName}</div>
574   - <SelectInput {...upViewProps12} {...x} bCanInput={false} />
575   - </div>
576   - </Grid.Item>
577   - ))}
  1502 + {upViewProps20
  1503 + ? upViewProps20.viewConfigs.map(x => (
  1504 + <Grid.Item>
  1505 + <div className={styles.customer} key={x.id || x.showName}>
  1506 + <div>{x.showName}</div>
  1507 + <SelectInput {...upViewProps20} itemDetail={x} bCanInput={true} />
  1508 + </div>
  1509 + </Grid.Item>
  1510 + ))
  1511 + : ""}
578 1512 </Grid>
579 1513 </div>
580   - <div>
581   - <div style={{ width: "9.375rem", height: "9.375rem", position: "relative" }}>
  1514 + <div className={styles.svgBox1}>
  1515 + <div style={{ width: "49%", height: "49%", position: "relative" }}>
582 1516 <Typesetting {...boxProps} onSaveStates={handleSaveState} onSaveDPartsLength={onSaveDPartsLength} />
583 1517 </div>
584   - <div>{/* <ShowImgM {...showImgMProps} /> */}</div>
  1518 + <div style={{ width: "47%", height: "47%", position: "relative" }}>
  1519 + <ShowImgM {...showImgMProps} />
  1520 + </div>
  1521 + </div>
  1522 + <div>
  1523 + <MaterialsComponent {...props} />
  1524 + </div>
  1525 + <div>
  1526 + <div>后道参数</div>
  1527 + {downViewProps.viewConfigs.map((x, i) => (
  1528 + <div>
  1529 + {x.showName}
  1530 + <Switch
  1531 + onChange={async val => {
  1532 + console.log(val, x, "val");
  1533 + }}
  1534 + />
  1535 + </div>
  1536 + ))}
  1537 + </div>
  1538 + <div>
  1539 + 多数量报价
  1540 + <ManyComponent {...props}></ManyComponent>
  1541 + </div>
  1542 + <Dialog
  1543 + visible={boxPopup}
  1544 + closeOnAction
  1545 + onClose={() => {
  1546 + setBoxPopup(false);
  1547 + }}
  1548 + actions={[
  1549 + {
  1550 + key: "close",
  1551 + text: "关闭",
  1552 + },
  1553 + ]}
  1554 + content={
  1555 + <div>
  1556 + {boxsList.map(item => {
  1557 + return (
  1558 + <div className={styles.boxListBody}>
  1559 + <div>
  1560 + {item.sName}
  1561 + <Image src={item.sPackPath} width={100} height={100}></Image>
  1562 + </div>
  1563 + <Button color="primary" fill="outline" size="small" onClick={changeBox(item)}>
  1564 + 选择
  1565 + </Button>
  1566 + </div>
  1567 + );
  1568 + })}
  1569 + </div>
  1570 + }
  1571 + ></Dialog>
  1572 + </div>
  1573 + );
  1574 +};
  1575 +
  1576 +// 材料组件
  1577 +const MaterialsComponent = props => {
  1578 + const { state, boxModel } = props;
  1579 + const { slaveRowData, slaveConfig, slaveData = [], selectedNode = {} } = state;
  1580 + if (!slaveRowData) return;
  1581 + const { sParam = "" } = selectedNode;
  1582 + const sParamList = sParam.split(",");
  1583 + let materialsInfoDefaultData = sParam ? new Array(sParamList.length).fill({}).map((_, index) => ({ showName: sParamList[index] })) : [{}];
  1584 + let { materialsInfo = materialsInfoDefaultData } = slaveRowData;
  1585 + const materialsConfig = slaveConfig.gdsconfigformslave
  1586 + .filter(item => item.iTag === 11)
  1587 + .map(item => {
  1588 + const { sName } = item;
  1589 + if (sName === "sMaterialsName") {
  1590 + return {
  1591 + ...item,
  1592 + sVisColumnName: "sMaterialsName",
  1593 + iColValue: 20,
  1594 + };
  1595 + } else if (sName === "sComMaterials") {
  1596 + return {
  1597 + ...item,
  1598 + sName: "bComMaterials",
  1599 + iColValue: 4,
  1600 + };
  1601 + } else {
  1602 + return item;
  1603 + }
  1604 + });
  1605 +
  1606 + const extraState = {
  1607 + calcPriceFinished: false,
  1608 + manyData: [],
  1609 + };
  1610 + return materialsInfo.map((item, index) => {
  1611 + let viewRow = { ...materialsInfo[index], sProductClassifyId: selectedNode.sId };
  1612 + viewRow = { ...viewRow, sMaterialsName0: viewRow.showName || "" };
  1613 + let materialsConfigNew = JSON.parse(JSON.stringify(materialsConfig));
  1614 + if (viewRow.showName) {
  1615 + const iIndex = materialsConfigNew.findIndex(item => item.sName === "sMaterialsName");
  1616 + if (iIndex !== -1) {
  1617 + materialsConfigNew[iIndex].showName = viewRow.showName;
  1618 + }
  1619 + }
  1620 + const viewProps = {
  1621 + ...props,
  1622 + viewConfigs: materialsConfigNew,
  1623 + tableConfig: { ...slaveConfig, gdsconfigformslave: materialsConfigNew },
  1624 + iColValueView: 24,
  1625 + viewRow,
  1626 + tableName: `slaveUp${boxModel}`,
  1627 + onDataChange: (name, sFieldName, changeValue, sId, dropDownData, isWait) => {
  1628 + const iIndex = slaveData.findIndex(item => item.sId === slaveRowData.sId);
  1629 + if (iIndex !== -1) {
  1630 + slaveData[iIndex].materialsInfo = materialsInfo.map((item, i) => (i === index ? { ...item, ...changeValue } : item));
  1631 + } else {
  1632 + const { selectedNode = {} } = state;
  1633 + const { showName: sTreeNodeName } = selectedNode;
  1634 + slaveData.push({
  1635 + sId: commonUtils.createSid(),
  1636 + handleType: "add",
  1637 + sBoxModel: boxModel,
  1638 + sTreeNodeName,
  1639 + materialsInfo: materialsInfo.map((item, i) => (i === index ? { ...item, ...changeValue } : item)),
  1640 + });
  1641 + }
  1642 +
  1643 + props.setState(pre => ({ ...pre, slaveData, ...extraState }));
  1644 + },
  1645 + };
  1646 +
  1647 + return (
  1648 + <div>
  1649 + 材料信息
  1650 + <div className={styles.materialsLine}>
  1651 + <div className={styles.selectInput} style={{ width: "50%" }}>
  1652 + <SelectInput {...viewProps} />
  1653 + </div>
  1654 + <div className={styles.materialBtns}>
  1655 + <div className={styles.materialBtns}>
  1656 + <span>来料</span>
  1657 + <Checkbox />
  1658 + </div>
  1659 + <Button
  1660 + color="primary"
  1661 + fill="solid"
  1662 + size="small"
  1663 + style={{ width: "1.93rem", height: "1.93rem", display: "flex", justifyContent: "center", alignItems: "center", textAlign: "center" }}
  1664 + onClick={() => {
  1665 + const iIndex = slaveData.findIndex(item => item.sId === slaveRowData.sId);
  1666 + const rowIndex = materialsInfo.findIndex((item, i) => i === index);
  1667 + const materialsInfoNew = [...materialsInfo];
  1668 + materialsInfoNew.splice(rowIndex + 1, 0, {});
  1669 + if (iIndex !== -1) {
  1670 + slaveData[iIndex].materialsInfo = materialsInfoNew;
  1671 + } else {
  1672 + const { selectedNode = {} } = state;
  1673 + const { showName: sTreeNodeName } = selectedNode;
  1674 + slaveData.push({
  1675 + sId: commonUtils.createSid(),
  1676 + handleType: "add",
  1677 + sBoxModel: boxModel,
  1678 + sTreeNodeName,
  1679 + materialsInfo: materialsInfoNew,
  1680 + });
  1681 + }
  1682 + props.setState(pre => ({ ...pre, slaveData, ...extraState }));
  1683 + }}
  1684 + >
  1685 + <AddOutline />
  1686 + </Button>
  1687 + <Button
  1688 + style={
  1689 + index === 0 || viewRow.showName
  1690 + ? {
  1691 + visibility: "hidden",
  1692 + width: "1.93rem",
  1693 + height: "1.93rem",
  1694 + display: "flex",
  1695 + justifyContent: "center",
  1696 + alignItems: "center",
  1697 + textAlign: "center",
  1698 + }
  1699 + : { width: "1.93rem", height: "1.93rem", display: "flex", justifyContent: "center", alignItems: "center", textAlign: "center" }
  1700 + }
  1701 + >
  1702 + <AddOutline />
  1703 + </Button>
  1704 + </div>
  1705 + </div>
  1706 + </div>
  1707 + );
  1708 + });
  1709 +};
  1710 +// 多数量组件
  1711 +const ManyComponent = props => {
  1712 + const { state, setState, enabled, loading } = props;
  1713 + const { masterData = {}, calcPriceLoading, calcPriceFinished, manyData = [] } = state;
  1714 + const [submitLoading, setSubmitLoading] = useState(false);
  1715 + const [processPercent, setProcessPercent] = useState(0);
  1716 + const tableProps = {
  1717 + ...commonBusiness.getTableTypes("many", { ...props, ...state }),
  1718 + fixedHeight: 185,
  1719 + enabled: false,
  1720 + };
  1721 + const { headerColumn, data } = tableProps;
  1722 + return (
  1723 + <div>
  1724 + <div className={styles.tableBox}>
  1725 + {headerColumn.map(item => {
  1726 + return <div className={styles.tableHeader}>{item.title}</div>;
  1727 + })}
  1728 + </div>
  1729 + <div>
  1730 + {data.map(item => {
  1731 + return (
  1732 + <div className={styles.tableBox}>
  1733 + <div className={styles.tableBody}>{item.dManyQty}</div>
  1734 + <div className={styles.tableBody}>{item.dPrintMoney}</div>
  1735 + <div className={styles.tableBody}>{item.dAfterProcessMoney}</div>
  1736 + <div className={styles.tableBody}>{item.dMaterialsMoney}</div>
  1737 + <div className={styles.tableBody}>{item.dManyPrice}</div>
  1738 + <div className={styles.tableBody}> {item.dDiscountMoney}</div>
  1739 + </div>
  1740 + );
  1741 + })}
585 1742 </div>
586 1743 </div>
587 1744 );
... ...
src/mobile/quotation/detailNew.jsx
1 1 import { useRef, useEffect, useState, useCallback, useMemo } from "react";
2 2 import { history } from "umi";
3   -import { Tabs, Selector, Grid, Image, Button, Checkbox, Switch } from "antd-mobile";
  3 +import { Tabs, Selector, Grid, Image, Button, Checkbox, Switch, Dialog, Toast } from "antd-mobile";
4 4 import { AddOutline, MinusOutline } from "antd-mobile-icons";
5 5 import commonConfig from "@/utils/config";
6 6 import * as commonServices from "@/services/services";
... ... @@ -949,61 +949,62 @@ const QuotationDetail = props =&gt; {
949 949 const MasterComponent = props => {
950 950 console.log("🚀 ~ MasterComponent:", props);
951 951 const { viewConfigs, masterData } = props;
  952 +
952 953 const customer = viewConfigs?.find(x => x.sName === "sCustomerName") || {};
953 954 const customerProps = {
954 955 ...props,
955   - formData: customer,
956   - name: masterData.sCustomerName,
  956 + itemDetail: customer,
  957 + sValue: masterData.sCustomerName,
957 958 id: masterData.sCustomerId,
958 959 No: masterData.sCustomerNo,
959 960 };
960 961 const product = viewConfigs?.find(x => x.sName === "sProductName") || {};
961 962 const productProps = {
962 963 ...props,
963   - formData: product,
  964 + itemDetail: product,
964 965 bCanInput: true,
965   - name: masterData.sProductName,
  966 + sValue: masterData.sProductName,
966 967 };
967 968 const dLength = viewConfigs?.find(x => x.sName === "dLength") || {};
968 969  
969 970 const dLengthProps = {
970 971 ...props,
971   - formData: dLength,
  972 + itemDetail: dLength,
972 973 bCanInput: true,
973   - name: masterData.dLength,
  974 + sValue: masterData.dLength,
974 975 };
975 976 const dWidth = viewConfigs?.find(x => x.sName === "dWidth") || {};
976 977 const dWidthProps = {
977 978 ...props,
978   - formData: dWidth,
  979 + itemDetail: dWidth,
979 980 bCanInput: true,
980   - name: masterData.dWidth,
  981 + sValue: masterData.dWidth,
981 982 };
982 983 const dHeight = viewConfigs?.find(x => x.sName === "dHeight") || {};
983 984 const dHeightProps = {
984 985 ...props,
985   - formData: dHeight,
  986 + itemDetail: dHeight,
986 987 bCanInput: true,
987   - name: masterData.dHeight,
  988 + sValue: masterData.dHeight,
988 989 };
989 990 const dProductQty = viewConfigs?.find(x => x.sName === "dProductQty") || {};
990 991 const dProductQtyProps = {
991 992 ...props,
992   - formData: dProductQty,
  993 + itemDetail: dProductQty,
993 994 bCanInput: true,
994   - name: masterData.dProductQty,
  995 + sValue: masterData.dProductQty,
995 996 };
996 997 const sProductUnit = viewConfigs?.find(x => x.sName === "sProductUnit") || {};
997 998 const sProductUnitProps = {
998 999 ...props,
999   - formData: sProductUnit,
1000   - name: masterData.sProductUnit,
  1000 + itemDetail: sProductUnit,
  1001 + sValue: masterData.sProductUnit,
1001 1002 };
1002 1003 const sDeliverName = viewConfigs?.find(x => x.sName === "sDeliverName") || {};
1003 1004 const sDeliverNameProps = {
1004 1005 ...props,
1005   - formData: sDeliverName,
1006   - name: masterData.sDeliverName,
  1006 + itemDetail: sDeliverName,
  1007 + sValue: masterData.sDeliverName,
1007 1008 };
1008 1009 const baseProps = {
1009 1010 ...props,
... ... @@ -1096,11 +1097,15 @@ const QuotationTabs = props =&gt; {
1096 1097 const BoxComponent = props => {
1097 1098 const { state, boxModel } = props;
1098 1099 const { activeKey, slaveConfig, masterData, selectedNode, boxConfig, downAbleConfigs = [], slaveData } = state || {};
1099   - console.log("🚀 ~ BoxComponent:", slaveConfig);
  1100 + console.log("🚀 ~ BoxComponent:", slaveData);
1100 1101 const { sModelsId } = props;
1101 1102 const [selectList, setSelectList] = useState([]);
  1103 + const [boxTypeList, setBoxTypeList] = useState([]);
1102 1104 const [searchValue, setSearchValue] = useState("");
1103 1105 const [slaveRowData, setSlaveRowData] = useState(null);
  1106 + const [boxPopup, setBoxPopup] = useState(false);
  1107 + const [boxsList, setBoxsList] = useState([]);
  1108 + const [selected, setSelected] = useState(null);
1104 1109 // 获取盒型信息
1105 1110 useEffect(() => {
1106 1111 const sId = "17428091410008594700322758474000";
... ... @@ -1120,6 +1125,20 @@ const BoxComponent = props =&gt; {
1120 1125 value: x.sId,
1121 1126 };
1122 1127 });
  1128 + const boxTypeLists = Array.from(
  1129 + new Set(
  1130 + list.map(item => {
  1131 + return {
  1132 + ...item,
  1133 + label: item.sBoxType,
  1134 + value: item.sBoxType,
  1135 + };
  1136 + })
  1137 + )
  1138 + );
  1139 + // 去重
  1140 + const uniqueArray = boxTypeLists.filter((item, index, self) => index === self.findIndex(i => i.sBoxType === item.sBoxType));
  1141 + setBoxTypeList(uniqueArray);
1123 1142 setSelectList(list);
1124 1143 }
1125 1144 });
... ... @@ -1253,7 +1272,6 @@ const BoxComponent = props =&gt; {
1253 1272 boxConfigList = boxConfig?.gdsconfigformslave?.filter(item => item.bVisible && showNameKeyList.includes(item.sName)) || [];
1254 1273 }
1255 1274 const newConfig = [...boxConfigList, ...config];
1256   -
1257 1275 return {
1258 1276 ...props,
1259 1277 viewConfigs: newConfig,
... ... @@ -1263,6 +1281,7 @@ const BoxComponent = props =&gt; {
1263 1281 tableName: `slaveUp${boxModel}`,
1264 1282 };
1265 1283 };
  1284 +
1266 1285 // 印刷参数表单
1267 1286 const upViewProps12 = getUpViewPropsByITag(12);
1268 1287 // 拼板信息表单
... ... @@ -1390,32 +1409,50 @@ const BoxComponent = props =&gt; {
1390 1409 height: 150,
1391 1410 size: 9,
1392 1411 };
1393   -
  1412 + const handleChange = v => {
  1413 + if (v.length) {
  1414 + const newValue = v[0];
  1415 + if (newValue === selected) {
  1416 + // 如果是再次点击已选中的项,则不取消选中
  1417 + return;
  1418 + }
  1419 + setSelected(newValue);
  1420 + const list = selectList.filter(x => x.sBoxType === newValue);
  1421 + setBoxsList(list);
  1422 + setBoxPopup(true);
  1423 + } else {
  1424 + const list = selectList.filter(x => x.sBoxType === selected);
  1425 + setBoxsList(list);
  1426 + setBoxPopup(true);
  1427 + }
  1428 + };
  1429 + useEffect(() => {
  1430 + // const boxModelData = slaveData.find(x => x.sBoxModel === boxModel);
  1431 + // const selectListDetail = selectList.find(x => x.sName === boxModelData?.sName);
  1432 + // const data = selectList.find(x => x.sId === selectListDetail.sId);
  1433 + // if (!data) return;
  1434 + // const slaveNewData = JSON.parse(data.sColumnNameConfig).map(x => {
  1435 + // return {
  1436 + // [x.sName]: x.sDefault,
  1437 + // };
  1438 + // });
  1439 + // const slaveDataDetail = slaveData.find(item => item.sTreeNodeName === selectedNode.showName && item.sBoxModel === boxModel) || {};
  1440 + // const rowData = {
  1441 + // ...slaveDataDetail,
  1442 + // ...data,
  1443 + // ...Object.assign({}, ...slaveNewData),
  1444 + // };
  1445 + // setSlaveRowData(rowData);
  1446 + // setSelected(selectListDetail?.sBoxType);
  1447 + },[slaveData]);
1394 1448 return (
1395 1449 <div>
1396 1450 <Selector
1397 1451 columns={4}
1398   - options={selectList}
1399   - defaultValue={["3"]}
  1452 + options={boxTypeList}
1400 1453 style={{ "--padding": "0.8rem 0" }}
1401   - onChange={v => {
1402   - if (v.length) {
1403   - const data = selectList.find(x => x.sId === v[0]);
1404   - const slaveNewData = JSON.parse(data.sColumnNameConfig).map(x => {
1405   - return {
1406   - [x.sName]: x.sDefault,
1407   - };
1408   - });
1409   - const slaveDataDetail = slaveData.find(item => item.sTreeNodeName === selectedNode.showName && item.sBoxModel === boxModel) || {};
1410   -
1411   - const rowData = {
1412   - ...slaveDataDetail,
1413   - ...data,
1414   - ...Object.assign({}, ...slaveNewData),
1415   - };
1416   - setSlaveRowData(rowData);
1417   - }
1418   - }}
  1454 + value={selected ? [selected] : []}
  1455 + onChange={v => handleChange(v)}
1419 1456 />
1420 1457 <div>
1421 1458 <Grid columns={4} gap={8}>
... ... @@ -1443,7 +1480,7 @@ const BoxComponent = props =&gt; {
1443 1480 <Grid.Item>
1444 1481 <div className={styles.customer} key={x.id || x.showName}>
1445 1482 <div>{x.showName}</div>
1446   - <SelectInput {...upViewProps12} {...x} bCanInput={false} />
  1483 + <SelectInput {...upViewProps12} itemDetail={x} bCanInput={false} />
1447 1484 </div>
1448 1485 </Grid.Item>
1449 1486 ))
... ... @@ -1458,7 +1495,7 @@ const BoxComponent = props =&gt; {
1458 1495 <Grid.Item>
1459 1496 <div className={styles.customer} key={x.id || x.showName}>
1460 1497 <div>{x.showName}</div>
1461   - <SelectInput {...upViewProps12} {...x} bCanInput={false} />
  1498 + <SelectInput {...upViewProps20} itemDetail={x} bCanInput={true} />
1462 1499 </div>
1463 1500 </Grid.Item>
1464 1501 ))
... ... @@ -1493,6 +1530,58 @@ const BoxComponent = props =&gt; {
1493 1530 多数量报价
1494 1531 <ManyComponent {...props}></ManyComponent>
1495 1532 </div>
  1533 + <Dialog
  1534 + visible={boxPopup}
  1535 + closeOnAction
  1536 + onClose={() => {
  1537 + setBoxPopup(false);
  1538 + }}
  1539 + actions={[
  1540 + {
  1541 + key: "close",
  1542 + text: "关闭",
  1543 + },
  1544 + ]}
  1545 + content={
  1546 + <div>
  1547 + {boxsList.map(item => {
  1548 + return (
  1549 + <div className={styles.boxListBody}>
  1550 + <div>
  1551 + {item.sName}
  1552 + <Image src={item.sPackPath} width={100} height={100}></Image>
  1553 + </div>
  1554 + <Button
  1555 + color="primary"
  1556 + fill="outline"
  1557 + size="small"
  1558 + onClick={val => {
  1559 + const data = selectList.find(x => x.sId === item.sId);
  1560 + if (!data) return;
  1561 + const slaveNewData = JSON.parse(data.sColumnNameConfig).map(x => {
  1562 + return {
  1563 + [x.sName]: x.sDefault,
  1564 + };
  1565 + });
  1566 + const slaveDataDetail =
  1567 + slaveData.find(item => item.sTreeNodeName === selectedNode.showName && item.sBoxModel === boxModel) || {};
  1568 + const rowData = {
  1569 + ...slaveDataDetail,
  1570 + ...data,
  1571 + ...Object.assign({}, ...slaveNewData),
  1572 + };
  1573 + setSlaveRowData(rowData);
  1574 + setBoxPopup(false);
  1575 + }}
  1576 + >
  1577 + 选择
  1578 + </Button>
  1579 + </div>
  1580 + );
  1581 + })}
  1582 + </div>
  1583 + }
  1584 + ></Dialog>
1496 1585 </div>
1497 1586 );
1498 1587 };
... ...
src/mobile/quotation/index.jsx
... ... @@ -22,6 +22,8 @@ const QuotationAllprogress = baseProps =&gt; {
22 22 };
23 23 const dataUrl = `${commonConfig.server_host}filterTree/getFilterTree/${configDataId}?sModelsId=${sModelsId}&sName=${formSrcRoute}`;
24 24 const dataReturn = (await commonServices.postValueService(token, condition, dataUrl)).data;
  25 + console.log("🚀 ~ getQuotationList ~ dataReturn:", dataReturn)
  26 + if (dataReturn.dataset.rows) return
25 27 const treeDataList = dataReturn.dataset.rows[0].children.map(item => {
26 28 return item;
27 29 });
... ... @@ -95,10 +97,10 @@ const TreeComponent = props =&gt; {
95 97 };
96 98 // 内容
97 99 const ContentComponent = props => {
98   - const { contentList = [] } = props.state || {};
  100 + const { contentList = [] ,selectedKey} = props.state || {};
99 101 // 路由
100 102 const handleGridClick = item => () => {
101   - console.log(item, props, "handleGridClick");
  103 + console.log(selectedKey, props, "handleGridClick");
102 104 console.log(props.dispatch, "handleGridClick");
103 105  
104 106 props.dispatch({
... ... @@ -108,7 +110,11 @@ const ContentComponent = props =&gt; {
108 110 urlKey: undefined,
109 111 sModelsId: props.sModelsId,
110 112 sModelType: props.sModelType,
111   - quotationData: item
  113 + quotationData: {
  114 + ...item,
  115 + sProductClassifyId:selectedKey
  116 + },
  117 +
112 118 },
113 119 });
114 120 };
... ...
src/mobile/quotation/quotationDetail.css
... ... @@ -85,3 +85,15 @@
85 85 font-size: 0.875rem;
86 86 text-align: center;
87 87 }
  88 +.boxListBody {
  89 + display: flex;
  90 + align-items: center;
  91 + justify-content: space-between;
  92 + border: 0.0625rem solid #f3f3f3;
  93 + padding: 1rem;
  94 + margin-bottom: 0.5rem;
  95 + border-radius: 0.1875rem;
  96 +}
  97 +:global .adm-input-element:read-only {
  98 + background-color: #f1f2f8 !important;
  99 +}
... ...
src/mobile/quotation/quotationDetail.less
... ... @@ -93,3 +93,16 @@
93 93 text-align: center;
94 94 }
95 95 }
  96 +.boxListBody{
  97 + display: flex;
  98 + align-items: center;
  99 + justify-content: space-between;
  100 + border: .0625rem solid #f3f3f3;
  101 + padding: 1rem;
  102 + margin-bottom: 0.5rem;
  103 + border-radius: .1875rem;
  104 +}
  105 + :global .adm-input-element:read-only {
  106 + background-color: #f1f2f8 !important;
  107 +
  108 +}
96 109 \ No newline at end of file
... ...
src/routes/mobile/quotation/detail.js
1 1 import { connect } from "umi";
2 2 import QuotationAllprogressDetail from "@/mobile/quotation/detailNew";
3 3 import * as commonUtils from "@/utils/utils";
4   -function quotationDetail({ dispatch, app, content, location, sModelsId }) {
  4 +function quotationDetail({ dispatch, app, content, location, sModelsId, }) {
  5 +
5 6 const masterData = {
6 7 handleType: "add",
7 8 iPositiveColor: 4,
... ... @@ -16,8 +17,8 @@ function quotationDetail({ dispatch, app, content, location, sModelsId }) {
16 17 location, // 只传递需要的部分
17 18 sModelsId,
18 19 masterData,
  20 + quotationData:JSON.parse(location.state).quotationData
19 21 };
20   -
21 22 return <QuotationAllprogressDetail {...quotationProps} />;
22 23 }
23 24  
... ...
src/routes/mobile/quotation/index.js
1 1 import { connect } from "umi";
2 2 import QuotationAllprogress from "@/mobile/quotation/index.jsx";
3 3  
4   -function quotation({ dispatch, app, content, location, sModelsId }) {
  4 +function quotation({ dispatch, app, content, location, sModelsId,sProductClassifyId }) {
5 5 const quotationProps = {
6 6 app,
7 7 content,
... ...