Commit 09c210af7972942297d791c6f7d7c3cdfcae567d
1 parent
5095d5fd
勒口
Showing
4 changed files
with
60 additions
and
13 deletions
src/components/Common/BoxDesignCompontent/svg.js
| ... | ... | @@ -188,8 +188,8 @@ const SvgBox = props => { |
| 188 | 188 | viewBoxWidth = (boxHeight + boxWidth) * 2 + dYTBW + dZTBW; |
| 189 | 189 | viewBoxHeight = boxLength + max; |
| 190 | 190 | } else if (Number(svgType) === 6) { |
| 191 | - viewBoxWidth = boxLength + 2; | |
| 192 | - viewBoxHeight = boxWidth + 2; | |
| 191 | + viewBoxWidth = boxWidth + 2; | |
| 192 | + viewBoxHeight = boxLength + 2; | |
| 193 | 193 | } |
| 194 | 194 | // 计算缩放比例 |
| 195 | 195 | let scale = 1; |
| ... | ... | @@ -1033,7 +1033,7 @@ const SvgBox = props => { |
| 1033 | 1033 | svg.appendChild(g); |
| 1034 | 1034 | // g.setAttribute('transform', `rotate(90, ${viewBoxWidth/2}, ${viewBoxHeight/2})`); |
| 1035 | 1035 | } else if (Number(svgType) === 6) { |
| 1036 | - const rectangles = [{ x: 0, y: 0, width: scaledWidth, height: scaledHeight }]; | |
| 1036 | + const rectangles = [{ x: 0, y: 0, width: scaledHeight, height: scaledWidth }]; | |
| 1037 | 1037 | rectangles.forEach(rect => { |
| 1038 | 1038 | g.appendChild(createPathElements(rect.x, rect.y, rect.width, rect.height)); |
| 1039 | 1039 | }); | ... | ... |
src/components/Common/Typesetting/typesetting.js
| ... | ... | @@ -537,6 +537,7 @@ const Typesetting = props => { |
| 537 | 537 | newDHorizontalType !== dHorizontalType || |
| 538 | 538 | newDPortraitType !== dPortraitType |
| 539 | 539 | ) { |
| 540 | + | |
| 540 | 541 | setMaterialLength(newMaterialLength); |
| 541 | 542 | setMaterialWidth(newMaterialWidth); |
| 542 | 543 | setMaterialName(sMaterialsName); | ... | ... |
src/components/QuickQuote/index.jsx
| ... | ... | @@ -321,6 +321,23 @@ const QuickQuoteEvent = props => { |
| 321 | 321 | dMaxWidth: Number(selectedNode.sMachineStyle.split("*")[1]), |
| 322 | 322 | }; |
| 323 | 323 | } |
| 324 | + | |
| 325 | + if (sFieldName === "bFlap") { | |
| 326 | + slaveData[saveIndex] = { | |
| 327 | + ...slaveData[saveIndex], | |
| 328 | + bFold: false, | |
| 329 | + sFold: "", | |
| 330 | + dFold: "", | |
| 331 | + dAdhesive: "", | |
| 332 | + }; | |
| 333 | + } | |
| 334 | + if (sFieldName === "bFold") { | |
| 335 | + slaveData[saveIndex] = { | |
| 336 | + ...slaveData[saveIndex], | |
| 337 | + bFlap: false, | |
| 338 | + dFlap: "", | |
| 339 | + }; | |
| 340 | + } | |
| 324 | 341 | setState(pre => ({ ...pre, slaveData, ...extraState })); |
| 325 | 342 | } else if (name === "finished") { |
| 326 | 343 | const { productProcessInfo = [] } = masterData; |
| ... | ... | @@ -546,7 +563,6 @@ const QuickQuoteEvent = props => { |
| 546 | 563 | const dataReturn = (await commonServices.postValueService(token, paramMap, url)).data; |
| 547 | 564 | |
| 548 | 565 | if (dataReturn.code === 1) { |
| 549 | - | |
| 550 | 566 | const { slaveConfig, masterData: masterData1, materialsConfig, processConfig, sModelsId, app } = props; |
| 551 | 567 | const { productClassify, partsNewInfo = [], productProcessInfo, partsInfo: partsOldInfo } = dataReturn.dataset.rows[0]; |
| 552 | 568 | const { bCalculatingArea } = selectedNode; |
| ... | ... | @@ -615,10 +631,10 @@ const QuickQuoteEvent = props => { |
| 615 | 631 | slaveRowData.dAuxiliaryQty = item.materialsInfo?.[0]?.dAuxiliaryQty; |
| 616 | 632 | slaveRowData.sPrint = item.sProcessName; |
| 617 | 633 | if (bCalculatingArea) { |
| 618 | - // todo 核价成功后 判断bSpecialRules 为false 就要给材料长材料款赋值 | |
| 634 | + // todo 核价成功后 判断bSpecialRules 为false 就要给材料长材料款赋值 | |
| 619 | 635 | // partsNewInfo |
| 620 | - slaveRowData.dWlcd = item.dMaterialsLength | |
| 621 | - slaveRowData.dWlkd = item.dMaterialsWidth | |
| 636 | + slaveRowData.dWlcd = item.dMaterialsLength; | |
| 637 | + slaveRowData.dWlkd = item.dMaterialsWidth; | |
| 622 | 638 | } |
| 623 | 639 | setState(pre => ({ ...pre, slaveData: stateSlaveData })); |
| 624 | 640 | }); |
| ... | ... | @@ -1257,6 +1273,20 @@ const MasterComponent = props => { |
| 1257 | 1273 | item.iColValue = viewConfigs[0].iColValue; |
| 1258 | 1274 | }); |
| 1259 | 1275 | } |
| 1276 | + const lengthData = viewConfigs.find(x => x.sName === "dLength"); | |
| 1277 | + if (selectedNode.sTypeKey !== "danye") { | |
| 1278 | + if (lengthData) { | |
| 1279 | + lengthData.showName = "高(D)"; | |
| 1280 | + lengthData.sChinese = "高(D)"; | |
| 1281 | + lengthData.sEnglish = "Height (D)"; | |
| 1282 | + } | |
| 1283 | + } else { | |
| 1284 | + if (lengthData) { | |
| 1285 | + lengthData.showName = "长(L)"; | |
| 1286 | + lengthData.sChinese = "长(L)"; | |
| 1287 | + lengthData.sEnglish = "Length (L)"; | |
| 1288 | + } | |
| 1289 | + } | |
| 1260 | 1290 | const viewProps = { |
| 1261 | 1291 | ...props, |
| 1262 | 1292 | viewConfigs: viewConfigs, |
| ... | ... | @@ -1835,7 +1865,13 @@ const BoxComponent = props => { |
| 1835 | 1865 | </Divider> |
| 1836 | 1866 | <div className={styles.viewTable1}> |
| 1837 | 1867 | <PrintParamsComponent {...props} /> |
| 1838 | - <CommonViewTable {...upViewProps12} /> | |
| 1868 | + <div className={styles.materialsLine}> | |
| 1869 | + <div className={styles.materialsViewTable}> | |
| 1870 | + <CommonViewTable {...upViewProps12} /> | |
| 1871 | + </div> | |
| 1872 | + <div className={styles.materialsBtns} style={{ width: "10%", height: "30px" }}></div> | |
| 1873 | + </div> | |
| 1874 | + {/* <CommonViewTable {...upViewProps12} /> */} | |
| 1839 | 1875 | </div> |
| 1840 | 1876 | {/* <Divider {...dividerProps} orientationMargin="10px"> |
| 1841 | 1877 | 材料信息 |
| ... | ... | @@ -2038,7 +2074,7 @@ const PrintParamsComponent = props => { |
| 2038 | 2074 | <div className={styles.materialsViewTable}> |
| 2039 | 2075 | <CommonViewTable {...viewProps} /> |
| 2040 | 2076 | </div> |
| 2041 | - <div className={styles.materialsBtns} style={{ width: "25%", paddingRight: "calc(25% - 85px)" }}> | |
| 2077 | + <div className={styles.materialsBtns} style={{ width: "10%" }}> | |
| 2042 | 2078 | <Button |
| 2043 | 2079 | type="primary" |
| 2044 | 2080 | icon={<PlusOutlined />} |
| ... | ... | @@ -2603,7 +2639,6 @@ const BackendParamsExtraComponent = props => { |
| 2603 | 2639 | const { state, slaveConfig, boxModel } = props; |
| 2604 | 2640 | const { backendParamsConfig = [], backendConfig = {}, slaveData, selectedNode } = state; |
| 2605 | 2641 | if (!backendParamsConfig.length) return ""; |
| 2606 | - console.log(backendParamsConfig, "backendParamsConfig"); | |
| 2607 | 2642 | |
| 2608 | 2643 | const { sParentFieldsName, sBoxModel } = backendConfig; |
| 2609 | 2644 | |
| ... | ... | @@ -2686,7 +2721,6 @@ const BackendParamsExtraComponent = props => { |
| 2686 | 2721 | props.setState(pre => ({ ...pre, slaveData })); |
| 2687 | 2722 | }, |
| 2688 | 2723 | }; |
| 2689 | - console.log(viewProps, "viewProps"); | |
| 2690 | 2724 | |
| 2691 | 2725 | return ( |
| 2692 | 2726 | <> | ... | ... |
src/mobile/quotation/detailNew.jsx
| ... | ... | @@ -630,11 +630,17 @@ const QuickQuoteEvent = props => { |
| 630 | 630 | |
| 631 | 631 | // 返回数据赋值 |
| 632 | 632 | const { slaveData: stateSlaveData = [] } = state; |
| 633 | + const { bCalculatingArea } = selectedNode; | |
| 633 | 634 | partsNewInfo.forEach(item => { |
| 634 | 635 | const slaveRowData = stateSlaveData.find(row => item.sTreeNodeName === row.sTreeNodeName && item.sBoxModel === row.sBoxModel); |
| 635 | 636 | slaveRowData.dMachineQty = item.dMachineQty; |
| 636 | 637 | slaveRowData.dAuxiliaryQty = item.materialsInfo?.[0]?.dAuxiliaryQty; |
| 637 | 638 | slaveRowData.sPrint = item.sProcessName; |
| 639 | + if (bCalculatingArea) { | |
| 640 | + // todo 核价成功后 判断bSpecialRules 为false 就要给材料长材料款赋值 | |
| 641 | + slaveRowData.dWlcd = item.dMaterialsLength; | |
| 642 | + slaveRowData.dWlkd = item.dMaterialsWidth; | |
| 643 | + } | |
| 638 | 644 | setState(pre => ({ ...pre, slaveData: stateSlaveData })); |
| 639 | 645 | }); |
| 640 | 646 | |
| ... | ... | @@ -2561,7 +2567,7 @@ const BackendParamsExtraComponent = props => { |
| 2561 | 2567 | slaveData[iIndex].sBackProcessData[iIndex1].dManualValue = dManualLength * dManualWidth; |
| 2562 | 2568 | } |
| 2563 | 2569 | } |
| 2564 | - | |
| 2570 | + | |
| 2565 | 2571 | const itemDetail = viewProps.viewConfigs.find(x => x.sName === sFieldName); |
| 2566 | 2572 | props.setState(pre => ({ ...pre, slaveData })); |
| 2567 | 2573 | // props.onCostomClick(itemDetail); |
| ... | ... | @@ -2581,7 +2587,13 @@ const BackendParamsExtraComponent = props => { |
| 2581 | 2587 | <Grid.Item> |
| 2582 | 2588 | <div className={styles.customer} key={x.id || x.showName}> |
| 2583 | 2589 | <div>{x.showName}</div> |
| 2584 | - <SelectInput {...viewProps} itemDetail={x} getSqlDropDownData={viewProps.getSqlDropDownData} onDataChange={viewProps.onDataChange} onCostomClick={null}/> | |
| 2590 | + <SelectInput | |
| 2591 | + {...viewProps} | |
| 2592 | + itemDetail={x} | |
| 2593 | + getSqlDropDownData={viewProps.getSqlDropDownData} | |
| 2594 | + onDataChange={viewProps.onDataChange} | |
| 2595 | + onCostomClick={null} | |
| 2596 | + /> | |
| 2585 | 2597 | </div> |
| 2586 | 2598 | </Grid.Item> |
| 2587 | 2599 | ))} | ... | ... |