Commit 09a45340d546dbb949420f6819875f2e388e18b7
1 parent
498f739c
是否勒口
Showing
4 changed files
with
145 additions
and
83 deletions
src/components/QuickQuote/index.jsx
| ... | ... | @@ -1339,9 +1339,14 @@ const BoxComponent = props => { |
| 1339 | 1339 | if (item.sName === "dSumPQty" && selectedNode.sTypeKey !== "huace") { |
| 1340 | 1340 | return false; |
| 1341 | 1341 | } |
| 1342 | - const { bAdvancedSetting } = slaveRowData; | |
| 1343 | - | |
| 1344 | - if ((item.sName === "dPortrait" && !bAdvancedSetting) || (item.sName === "dHorizontal" && !bAdvancedSetting)) { | |
| 1342 | + const { bAdvancedSetting, bFlap, bFold } = slaveRowData; | |
| 1343 | + const shouldExcludeItem = (condition, itemNameList) => !condition && itemNameList.includes(item.sName); | |
| 1344 | + | |
| 1345 | + if ( | |
| 1346 | + shouldExcludeItem(bAdvancedSetting, ["dPortrait", "dHorizontal"]) || | |
| 1347 | + shouldExcludeItem(bFlap, ["dFlap"]) || | |
| 1348 | + shouldExcludeItem(bFold, ["sFold", "dAdhesive", "dFold"]) | |
| 1349 | + ) { | |
| 1345 | 1350 | return false; |
| 1346 | 1351 | } |
| 1347 | 1352 | |
| ... | ... | @@ -1367,9 +1372,15 @@ const BoxComponent = props => { |
| 1367 | 1372 | // const upViewProps11 = getUpViewPropsByITag(11); |
| 1368 | 1373 | // 印刷参数表单 |
| 1369 | 1374 | let upViewProps12 = getUpViewPropsByITag(12); |
| 1370 | -if (!(selectedNode.sTypeKey === "huace" && slaveRowData.sBoxModel === "封面")) { | |
| 1371 | - upViewProps12.viewConfigs = upViewProps12.viewConfigs.slice(0, 6); | |
| 1372 | -} | |
| 1375 | + if (!(selectedNode.sTypeKey === "huace" && slaveRowData.sBoxModel === "封面")) { | |
| 1376 | + upViewProps12.viewConfigs = upViewProps12.viewConfigs.slice(0, 6); | |
| 1377 | + } | |
| 1378 | + // | |
| 1379 | + upViewProps12.viewConfigs = upViewProps12.viewConfigs.map(item => { | |
| 1380 | + if (item.sName === "bFlap") { | |
| 1381 | + } | |
| 1382 | + return item; | |
| 1383 | + }); | |
| 1373 | 1384 | |
| 1374 | 1385 | // useEffect(() => { |
| 1375 | 1386 | ... | ... |
src/mobile/quotation/detailNew.jsx
| ... | ... | @@ -1061,7 +1061,18 @@ const QuotationDetail = props => { |
| 1061 | 1061 | if (!masterConfig) return ""; |
| 1062 | 1062 | const ableConfigs = masterConfig.gdsconfigformslave.filter(item => item.sName && item.bVisible); |
| 1063 | 1063 | // 处理长宽样式 |
| 1064 | - const viewConfigs = selectedNode?.bBox ? ableConfigs : ableConfigs.filter(x => x.sName !== "dHeight"); | |
| 1064 | + const viewConfigs = selectedNode?.bBox && selectedNode.sTypeKey !== "kapai" ? ableConfigs : ableConfigs.filter(x => x.sName !== "dHeight"); | |
| 1065 | + if (selectedNode?.bBox && selectedNode.sTypeKey !== "kapai") { | |
| 1066 | + viewConfigs.forEach(item => { | |
| 1067 | + if (item.sName === "dLength" || item.sName === "dWidth") { | |
| 1068 | + item.iColValue = 4; | |
| 1069 | + } | |
| 1070 | + }); | |
| 1071 | + } else { | |
| 1072 | + viewConfigs.forEach(item => { | |
| 1073 | + item.iColValue = viewConfigs[0].iColValue; | |
| 1074 | + }); | |
| 1075 | + } | |
| 1065 | 1076 | const viewProps = { |
| 1066 | 1077 | ...props, |
| 1067 | 1078 | viewConfigs: viewConfigs, |
| ... | ... | @@ -1514,7 +1525,12 @@ const BoxComponent = props => { |
| 1514 | 1525 | }; |
| 1515 | 1526 | |
| 1516 | 1527 | // 印刷参数表单 |
| 1517 | - const upViewProps12 = getUpViewPropsByITag(12); | |
| 1528 | + let upViewProps12 = getUpViewPropsByITag(12); | |
| 1529 | + if (!(selectedNode.sTypeKey === "huace" && slaveRowData.sBoxModel === "封面")) { | |
| 1530 | + if (upViewProps12 && upViewProps12.viewConfigs && upViewProps12.viewConfigs.length) { | |
| 1531 | + upViewProps12.viewConfigs = upViewProps12.viewConfigs.slice(0, 6); | |
| 1532 | + } | |
| 1533 | + } | |
| 1518 | 1534 | // 拼板信息表单 |
| 1519 | 1535 | const upViewProps20 = getUpViewPropsByITag(20); |
| 1520 | 1536 | const { bBox } = selectedNode; |
| ... | ... | @@ -1579,22 +1595,22 @@ const BoxComponent = props => { |
| 1579 | 1595 | }; |
| 1580 | 1596 | |
| 1581 | 1597 | // 获取sType为3的 |
| 1582 | - const { productProcessInfo = [] } = masterData; | |
| 1583 | - const finishedViewProps = { | |
| 1584 | - ...props, | |
| 1585 | - viewConfigs: finishedConfigs | |
| 1586 | - .filter(item => item.sPartsName === boxModel || !item.sPartsName) | |
| 1587 | - .map((item, i) => ({ | |
| 1588 | - ...item, | |
| 1589 | - isSelect: switchStates ? switchStates[item.sName] : false, | |
| 1590 | - // sName: "sParams" + i, | |
| 1591 | - sProductClassifyId: item.sId, | |
| 1592 | - })), | |
| 1593 | - tableConfig: { ...slaveConfig, gdsconfigformslave: finishedConfigs }, | |
| 1594 | - iColValueView: 24, | |
| 1595 | - viewRow: masterData, | |
| 1596 | - tableName: "finished", | |
| 1597 | - }; | |
| 1598 | + // const { productProcessInfo = [] } = masterData; | |
| 1599 | + // const finishedViewProps = { | |
| 1600 | + // ...props, | |
| 1601 | + // viewConfigs: finishedConfigs | |
| 1602 | + // .filter(item => item.sPartsName === boxModel || !item.sPartsName) | |
| 1603 | + // .map((item, i) => ({ | |
| 1604 | + // ...item, | |
| 1605 | + // isSelect: switchStates ? switchStates[item.sName] : false, | |
| 1606 | + // // sName: "sParams" + i, | |
| 1607 | + // sProductClassifyId: item.sId, | |
| 1608 | + // })), | |
| 1609 | + // tableConfig: { ...slaveConfig, gdsconfigformslave: finishedConfigs }, | |
| 1610 | + // iColValueView: 24, | |
| 1611 | + // viewRow: masterData, | |
| 1612 | + // tableName: "finished", | |
| 1613 | + // }; | |
| 1598 | 1614 | const calcMethodData = commonUtils.convertStrToObj(slaveRowData?.sColumnNameConfigExclusion, []); |
| 1599 | 1615 | // const radioValue = null; |
| 1600 | 1616 | const { radioValue = calcMethodData[0]?.sCode } = slaveRowData; |
| ... | ... | @@ -1809,18 +1825,28 @@ const BoxComponent = props => { |
| 1809 | 1825 | backendConfig: { sParentFieldsName: showConfig.sName, sBoxModel: boxModel }, |
| 1810 | 1826 | })); |
| 1811 | 1827 | }; |
| 1812 | - | |
| 1828 | + // 如果是卡牌那么默认使用矩形 | |
| 1829 | + // const currentBoxModel = "slaveUp" + props.boxModel; | |
| 1830 | + // props.onDataChange(currentBoxModel, "sName", { sName: item.sName }, item.sId, boxsList); | |
| 1831 | + if (selectedNode.sTypeKey === "kapai") { | |
| 1832 | + console.log(5555555); | |
| 1833 | + | |
| 1834 | + } | |
| 1813 | 1835 | return ( |
| 1814 | 1836 | <div> |
| 1815 | - {selectedNode.box ? ( | |
| 1837 | + {selectedNode.bBox ? ( | |
| 1816 | 1838 | <div> |
| 1817 | - <Selector | |
| 1818 | - columns={4} | |
| 1819 | - options={boxTypeList} | |
| 1820 | - style={{ "--padding": "0.8rem 0" }} | |
| 1821 | - value={selected ? [selected] : []} | |
| 1822 | - onChange={v => handleChange(v)} | |
| 1823 | - /> | |
| 1839 | + {true ? ( | |
| 1840 | + <Selector | |
| 1841 | + columns={4} | |
| 1842 | + options={boxTypeList} | |
| 1843 | + style={{ "--padding": "0.8rem 0" }} | |
| 1844 | + value={selected ? [selected] : []} | |
| 1845 | + onChange={v => handleChange(v)} | |
| 1846 | + /> | |
| 1847 | + ) : ( | |
| 1848 | + "" | |
| 1849 | + )} | |
| 1824 | 1850 | <div className={styles.line}></div> |
| 1825 | 1851 | <div> |
| 1826 | 1852 | <Grid columns={4} gap={8}> |
| ... | ... | @@ -1866,57 +1892,65 @@ const BoxComponent = props => { |
| 1866 | 1892 | </Grid> |
| 1867 | 1893 | </div> |
| 1868 | 1894 | <div> |
| 1869 | - <div className={styles.boxTitle}> | |
| 1870 | - 拼版信息 | |
| 1871 | - <EditFill color="#BFBFBF" style={{ marginLeft: "1rem" }} /> | |
| 1872 | - </div> | |
| 1895 | + {selectedNode.bBox ? ( | |
| 1896 | + <div> | |
| 1897 | + <div> | |
| 1898 | + <div className={styles.boxTitle}> | |
| 1899 | + 拼版信息 | |
| 1900 | + <EditFill color="#BFBFBF" style={{ marginLeft: "1rem" }} /> | |
| 1901 | + </div> | |
| 1873 | 1902 | |
| 1874 | - <Grid columns={3} gap={8}> | |
| 1875 | - {upViewProps20 | |
| 1876 | - ? upViewProps20.viewConfigs.map(x => ( | |
| 1877 | - <Grid.Item> | |
| 1878 | - <div className={styles.customer} key={x.id || x.showName}> | |
| 1879 | - <div>{x.showName}</div> | |
| 1880 | - <SelectInput | |
| 1881 | - {...upViewProps20} | |
| 1882 | - itemDetail={x} | |
| 1883 | - bCanInput={() => { | |
| 1884 | - // if (x.showDropDown) return false; | |
| 1885 | - return true; | |
| 1886 | - }} | |
| 1887 | - /> | |
| 1888 | - </div> | |
| 1889 | - </Grid.Item> | |
| 1890 | - )) | |
| 1891 | - : ""} | |
| 1892 | - </Grid> | |
| 1893 | - </div> | |
| 1894 | - <div className={styles.svgBox1}> | |
| 1895 | - <div style={{ width: "49%", height: "49%", position: "relative" }}> | |
| 1896 | - <Typesetting {...boxProps} onSaveStates={handleSaveState} onSaveDPartsLength={onSaveDPartsLength} /> | |
| 1897 | - </div> | |
| 1898 | - <div style={{ width: "47%", height: "47%", position: "relative" }}> | |
| 1899 | - <ShowImgM {...showImgMProps} /> | |
| 1900 | - </div> | |
| 1903 | + <Grid columns={3} gap={8}> | |
| 1904 | + {upViewProps20 | |
| 1905 | + ? upViewProps20.viewConfigs.map(x => ( | |
| 1906 | + <Grid.Item> | |
| 1907 | + <div className={styles.customer} key={x.id || x.showName}> | |
| 1908 | + <div>{x.showName}</div> | |
| 1909 | + <SelectInput | |
| 1910 | + {...upViewProps20} | |
| 1911 | + itemDetail={x} | |
| 1912 | + bCanInput={() => { | |
| 1913 | + // if (x.showDropDown) return false; | |
| 1914 | + return true; | |
| 1915 | + }} | |
| 1916 | + /> | |
| 1917 | + </div> | |
| 1918 | + </Grid.Item> | |
| 1919 | + )) | |
| 1920 | + : ""} | |
| 1921 | + </Grid> | |
| 1922 | + </div> | |
| 1923 | + <div className={styles.svgBox1}> | |
| 1924 | + <div style={{ width: "49%", height: "49%", position: "relative" }}> | |
| 1925 | + <Typesetting {...boxProps} onSaveStates={handleSaveState} onSaveDPartsLength={onSaveDPartsLength} /> | |
| 1926 | + </div> | |
| 1927 | + <div style={{ width: "47%", height: "47%", position: "relative" }}> | |
| 1928 | + <ShowImgM {...showImgMProps} /> | |
| 1929 | + </div> | |
| 1930 | + </div> | |
| 1931 | + <Radio.Group | |
| 1932 | + value={radioValue} | |
| 1933 | + onChange={e => { | |
| 1934 | + const iIndex = slaveData.findIndex(item => item.sId === slaveRowData.sId); | |
| 1935 | + slaveData[iIndex].radioValue = e; | |
| 1936 | + props.setState(pre => ({ | |
| 1937 | + ...pre, | |
| 1938 | + slaveData: slaveData, | |
| 1939 | + })); | |
| 1940 | + }} | |
| 1941 | + > | |
| 1942 | + {calcMethod.map(item => ( | |
| 1943 | + <Radio value={item.value} style={{ marginRight: "0.5rem" }}> | |
| 1944 | + {" "} | |
| 1945 | + {item.label} | |
| 1946 | + </Radio> | |
| 1947 | + ))} | |
| 1948 | + </Radio.Group> | |
| 1949 | + </div> | |
| 1950 | + ) : ( | |
| 1951 | + "" | |
| 1952 | + )} | |
| 1901 | 1953 | </div> |
| 1902 | - <Radio.Group | |
| 1903 | - value={radioValue} | |
| 1904 | - onChange={e => { | |
| 1905 | - const iIndex = slaveData.findIndex(item => item.sId === slaveRowData.sId); | |
| 1906 | - slaveData[iIndex].radioValue = e; | |
| 1907 | - props.setState(pre => ({ | |
| 1908 | - ...pre, | |
| 1909 | - slaveData: slaveData, | |
| 1910 | - })); | |
| 1911 | - }} | |
| 1912 | - > | |
| 1913 | - {calcMethod.map(item => ( | |
| 1914 | - <Radio value={item.value} style={{ marginRight: "0.5rem" }}> | |
| 1915 | - {" "} | |
| 1916 | - {item.label} | |
| 1917 | - </Radio> | |
| 1918 | - ))} | |
| 1919 | - </Radio.Group> | |
| 1920 | 1954 | <div> |
| 1921 | 1955 | <MaterialsComponent {...props} slaveRowData={slaveRowData} boxModel={boxModel} /> |
| 1922 | 1956 | </div> |
| ... | ... | @@ -2499,6 +2533,7 @@ const BackendParamsExtraComponent = props => { |
| 2499 | 2533 | }; |
| 2500 | 2534 | |
| 2501 | 2535 | const onCostomClick = () => {}; |
| 2536 | + if (!viewConfigs.length) return; | |
| 2502 | 2537 | return ( |
| 2503 | 2538 | <div> |
| 2504 | 2539 | <div className={styles.boxTitle}> | ... | ... |
src/routes/mobile/IndexMobile.css
0 → 100644
| 1 | +:global #tab-bar { | |
| 2 | + background-color: #f0f0f0; | |
| 3 | +} | |
| 4 | +:global #tab-bar .demoName { | |
| 5 | + font-size: 16px; | |
| 6 | + font-weight: bold; | |
| 7 | + height: 40px; | |
| 8 | + line-height: 40px; | |
| 9 | + text-align: center; | |
| 10 | +} | |
| 11 | +.demoContainer { | |
| 12 | + height: 100%; | |
| 13 | +} | |
| 14 | +.newContainer { | |
| 15 | + height: calc(100vh - 84px); | |
| 16 | +} | ... | ... |