Commit 4b8b038efd8da69a65d514d7d9c0dc382ee6ef22

Authored by 陈鑫涛
1 parent e55278aa

获取参数展示倍率信息

src/components/Common/Typesetting/typesetting.js
... ... @@ -23,14 +23,14 @@ const Typesetting = props => {
23 23 } = props;
24 24 if (!slaveRowData) return;
25 25 let {
26   - dSBLB, // 上边留白
27   - dXBLB, // 下边留白
28   - dZBLB, // 左边留白
29   - dYBLB, // 右边留白
  26 + dSBLB = 0, // 上边留白
  27 + dXBLB = 0, // 下边留白
  28 + dZBLB = 0, // 左边留白
  29 + dYBLB = 0, // 右边留白
30 30 // dXBJJ, // 上边距
31   - dXBJJ, // 下边距
  31 + dXBJJ = 0, // 下边距
32 32 // dYBJJ, // 左边距
33   - dYBJJ, // 右边距
  33 + dYBJJ = 0, // 右边距
34 34 sLengthFormula, // 盒长公式
35 35 sWidthFormula, // 盒宽公式
36 36 sPackDetailPath,
... ... @@ -44,8 +44,8 @@ const Typesetting = props => {
44 44 // 如果是卷筒类 那么上下左右留白等于左留白
45 45 if (selectedNode && selectedNode.sTypeKey === "juantong") {
46 46 dXBLB = dSBLB;
47   - dZBLB = 0
48   - dYBLB = 0
  47 + dZBLB = 0;
  48 + dYBLB = 0;
49 49 }
50 50 // 生成盒子图片
51 51 const [boxKey, setBoxKey] = useState(new Date().getTime());
... ... @@ -187,6 +187,12 @@ const Typesetting = props => {
187 187 ...variables,
188 188 ...result,
189 189 };
  190 + Object.keys(variabless).forEach(key => {
  191 + if (variabless[key] === null || variabless[key] === undefined || variabless[key] === '') {
  192 + variabless[key] = 0;
  193 + }
  194 + });
  195 + console.log("🚀 ~ Object.keys ~ variabless:", variabless)
190 196  
191 197 let DisableMateriallIcon = L ? sPackDetailPath : null;
192 198 // 盒子展长展开公式计算
... ... @@ -554,7 +560,8 @@ const Typesetting = props => {
554 560 }
555 561 }
556 562 }
557   -
  563 + console.log(cols,rows,'cols');
  564 +
558 565 // 判断展开长展开宽是否变化
559 566 if (dPartsLength !== innerWidth && !innerDivs.length) {
560 567 setDPartsLength(innerWidth);
... ... @@ -696,7 +703,7 @@ const Typesetting = props => {
696 703 Number(slaveDataDetail?.dMaxWidth) >= Number(slaveRowData?.dMachineWidth);
697 704  
698 705 const isShow = slaveRowData && slaveRowData.dMachineLength && slaveRowData.dMaxWidth && slaveRowData.dMaxLength && isMax && innerDivs.length > 0;
699   -
  706 +
700 707 const confirmParam = commonFunc.showLocalMessage(props, "confirmParam", "排版尺寸大于上机尺寸,请确认参数!");
701 708 const isJuantong = selectedNode.sTypeKey === "juantong";
702 709 if (isCustomized && !isShow) {
... ... @@ -1198,11 +1205,11 @@ const Typesetting = props => {
1198 1205 }}
1199 1206 >
1200 1207 <span style={{ color: "red", display: "inline-block", width: "100px" }}>{materialWidth}</span>
1201   - {isJuantong ? (
  1208 + {isJuantong ? (
1202 1209 <span
1203 1210 style={{
1204 1211 position: "absolute",
1205   - top: '50%',
  1212 + top: "50%",
1206 1213 textAlign: "center",
1207 1214 width: "30px",
1208 1215 writingMode: "vertical-rl",
... ...
src/components/QuickQuote/index.jsx
... ... @@ -1326,7 +1326,7 @@ const TreeComponent = props =&gt; {
1326 1326 };
1327 1327 });
1328 1328 };
1329   -
  1329 + console.log(selectedNode, "selectedNode");
1330 1330 if (selectedNode.sTypeKey === "juantong") {
1331 1331 props.onSaveState({
1332 1332 masterData: { ...props.masterData, sFormId: "101251240115016002356125200" },
... ... @@ -1603,7 +1603,9 @@ const BoxComponent = props =&gt; {
1603 1603 }
1604 1604 const { bAdvancedSetting, bFlap, bFold } = slaveRowData;
1605 1605 const shouldExcludeItem = (condition, itemNameList) => !condition && itemNameList.includes(item.sName);
1606   -
  1606 + if (selectedNode.showName === "封套") {
  1607 + slaveRowData.bFold = true;
  1608 + }
1607 1609 if (
1608 1610 shouldExcludeItem(bAdvancedSetting, ["dPortrait", "dHorizontal"]) ||
1609 1611 shouldExcludeItem(bFlap, ["dFlap"]) ||
... ... @@ -1611,24 +1613,24 @@ const BoxComponent = props =&gt; {
1611 1613 ) {
1612 1614 return false;
1613 1615 }
1614   - const rateList = [
1615   - { id: 0, name: "不显示倍率" },
1616   - { id: 1, name: "每本张数" },
1617   - { id: 2, name: "片数" },
1618   - ];
  1616 + if (item.sName === 'iRateType') {
  1617 + console.log(item,'iRateType');
  1618 +
  1619 + }
1619 1620 if (Number(selectedNode.iRateType) === 0 && item.sName === "iPage") {
1620 1621 return false;
1621 1622 } else {
1622 1623 if (item.sName === "iPage") {
1623   - item.showName = rateList.find(rate => rate.id === Number(selectedNode.iRateType))?.name || "倍率";
  1624 + const rateList = JSON.parse(slaveConfig.gdsconfigformslave.find(x=>x.sName === "iRateType")?.showDropDown) || []
  1625 + item.showName = rateList[Number(selectedNode.iRateType)] || "倍率";
1624 1626 }
1625 1627 }
1626 1628  
1627 1629 if (item.sName === "dWlcd" && selectedNode.sTypeKey === "juantong") {
1628   - return false
  1630 + return false;
1629 1631 }
1630 1632 if (item.sName === "dAuxiliaryQty" && selectedNode.sTypeKey !== "juantong") {
1631   - return false
  1633 + return false;
1632 1634 }
1633 1635 if (item.sName === "dWlkd") {
1634 1636 if (selectedNode.sTypeKey === "juantong") {
... ... @@ -1653,6 +1655,9 @@ const BoxComponent = props =&gt; {
1653 1655 if (selectedNode.sTypeKey !== "juantong" && item.sName === "sPaperDirection") {
1654 1656 return false;
1655 1657 }
  1658 + if ((selectedNode.showName === "封套" && item.sName === "dSpine") || (selectedNode.showName === "封套" && item.sName === "bFlap")) {
  1659 + return false;
  1660 + }
1656 1661  
1657 1662 return item.iTag === iTag;
1658 1663 });
... ... @@ -1966,7 +1971,7 @@ const BoxComponent = props =&gt; {
1966 1971 // 判断展长展宽是否可以放下原纸
1967 1972 const isDPartsLength =
1968 1973 slaveData[index]?.dPartsLength < slaveData[index]?.dMaxLength && slaveData[index]?.dPartsWidth < slaveData[index]?.dMaxWidth;
1969   - const dProductQtys = props.state.masterData.dProductQty || 0
  1974 + const dProductQtys = props.state.masterData.dProductQty || 0;
1970 1975 if (index !== undefined && index !== -1) {
1971 1976 // 计算开数
1972 1977 // 获取原始对象并创建一个新的对象进行更新
... ... @@ -1991,7 +1996,7 @@ const BoxComponent = props =&gt; {
1991 1996 // dWlcd: selectedNode.sTypeKey === 'juantong' ? Math.floor(dProductQty / dSinglePQty * ( length/ 1000)) : dWlcd,
1992 1997 dWlcd: dWlcd,
1993 1998 dWlkd: dWlkd,
1994   - dAuxiliaryQty: Math.floor(dProductQty / dSinglePQty * ( length/ 1000)),
  1999 + dAuxiliaryQty: Math.floor((dProductQty / dSinglePQty) * (length / 1000)),
1995 2000 dMachineQty: Math.floor(dProductQty / dSinglePQty),
1996 2001 dSinglePQty: dSinglePQty,
1997 2002 dMaterialsKQty: dMaterialsKQty,
... ...
src/components/QuickQuote/kapai.json
... ... @@ -16,9 +16,9 @@
16 16 "dZBLB": 5,
17 17 "dYBLB": 5,
18 18 "dSBJJ": 0,
19   - "dXBJJ": 5,
  19 + "dXBJJ": 0,
20 20 "dZBJJ": 0,
21   - "dYBJJ": 5,
  21 + "dYBJJ": 0,
22 22 "sColumnNameConfig": "[{\"sId\": \"17503121050007868467942061636000\", \"sBig5\": \"上方盒舌\", \"sName\": \"dSFHS\", \"iOrder\": 1, \"sTypes\": \"\", \"bVisible\": 0, \"sChinese\": \"上方盒舌\", \"sDefault\": 0, \"showName\": \"上方盒舌\", \"iFitWidth\": 120, \"sBrandsId\": \"1111111111\", \"sParentId\": \"17503120900005596112489925319000\", \"iIncrement\": 24930, \"sSubsidiaryId\": \"1111111111\", \"sAssignFormula\": null},{\"sId\": \"17503121050004734713992285329000\", \"sBig5\": \"盒底组件\", \"sName\": \"dHDC\", \"iOrder\": 2, \"sTypes\": \"\", \"bVisible\": 0, \"sChinese\": \"盒底组件\", \"sDefault\": 0, \"showName\": \"盒底组件\", \"iFitWidth\": 120, \"sBrandsId\": \"1111111111\", \"sParentId\": \"17503120900005596112489925319000\", \"iIncrement\": 24931, \"sSubsidiaryId\": \"1111111111\", \"sAssignFormula\": null},{\"sId\": \"17503121050003805022968003848700\", \"sBig5\": \"下方盒舌\", \"sName\": \"dXFHS\", \"iOrder\": 3, \"sTypes\": \"\", \"bVisible\": 0, \"sChinese\": \"下方盒舌\", \"sDefault\": 0, \"showName\": \"下方盒舌\", \"iFitWidth\": 120, \"sBrandsId\": \"1111111111\", \"sParentId\": \"17503120900005596112489925319000\", \"iIncrement\": 24932, \"sSubsidiaryId\": \"1111111111\", \"sAssignFormula\": null},{\"sId\": \"17503121050009676586559595633000\", \"sBig5\": \"左(上)插位组件\", \"sName\": \"dZSCW\", \"iOrder\": 4, \"sTypes\": \"\", \"bVisible\": 0, \"sChinese\": \"左(上)插位组件\", \"sDefault\": 0, \"showName\": \"左(上)插位组件\", \"iFitWidth\": 120, \"sBrandsId\": \"1111111111\", \"sParentId\": \"17503120900005596112489925319000\", \"iIncrement\": 24933, \"sSubsidiaryId\": \"1111111111\", \"sAssignFormula\": null},{\"sId\": \"17503121050001962345088454939000\", \"sBig5\": \"左贴边位\", \"sName\": \"dZTBW\", \"iOrder\": 5, \"sTypes\": \"\", \"bVisible\": 0, \"sChinese\": \"左贴边位\", \"sDefault\": 0, \"showName\": \"左贴边位\", \"iFitWidth\": 120, \"sBrandsId\": \"1111111111\", \"sParentId\": \"17503120900005596112489925319000\", \"iIncrement\": 24934, \"sSubsidiaryId\": \"1111111111\", \"sAssignFormula\": null},{\"sId\": \"17503121050002414611810439558000\", \"sBig5\": \"左(下)插位组件\", \"sName\": \"dZXCW\", \"iOrder\": 6, \"sTypes\": \"\", \"bVisible\": 0, \"sChinese\": \"左(下)插位组件\", \"sDefault\": 0, \"showName\": \"左(下)插位组件\", \"iFitWidth\": 120, \"sBrandsId\": \"1111111111\", \"sParentId\": \"17503120900005596112489925319000\", \"iIncrement\": 24935, \"sSubsidiaryId\": \"1111111111\", \"sAssignFormula\": null},{\"sId\": \"17503121050002143115722990272500\", \"sBig5\": \"右(上)插位组件\", \"sName\": \"dYSCW\", \"iOrder\": 7, \"sTypes\": \"\", \"bVisible\": 0, \"sChinese\": \"右(上)插位组件\", \"sDefault\": 0, \"showName\": \"右(上)插位组件\", \"iFitWidth\": 120, \"sBrandsId\": \"1111111111\", \"sParentId\": \"17503120900005596112489925319000\", \"iIncrement\": 24936, \"sSubsidiaryId\": \"1111111111\", \"sAssignFormula\": null},{\"sId\": \"17503121050003634411255280123400\", \"sBig5\": \"右贴边位\", \"sName\": \"dYTBW\", \"iOrder\": 8, \"sTypes\": \"\", \"bVisible\": 0, \"sChinese\": \"右贴边位\", \"sDefault\": 0, \"showName\": \"右贴边位\", \"iFitWidth\": 120, \"sBrandsId\": \"1111111111\", \"sParentId\": \"17503120900005596112489925319000\", \"iIncrement\": 24937, \"sSubsidiaryId\": \"1111111111\", \"sAssignFormula\": null},{\"sId\": \"17503121050004462109599634759000\", \"sBig5\": \"右(下)插位组件\", \"sName\": \"dYXCW\", \"iOrder\": 9, \"sTypes\": \"\", \"bVisible\": 0, \"sChinese\": \"右(下)插位组件\", \"sDefault\": 0, \"showName\": \"右(下)插位组件\", \"iFitWidth\": 120, \"sBrandsId\": \"1111111111\", \"sParentId\": \"17503120900005596112489925319000\", \"iIncrement\": 24938, \"sSubsidiaryId\": \"1111111111\", \"sAssignFormula\": null}]",
23 23 "sColumnNameConfigExclusion": "[{\"sId\": \"17503122410009257367226894416000\", \"sBig5\": \"正常算法\", \"sCode\": \"横向\", \"sName\": \"横向\", \"iOrder\": 1, \"iFAngle\": 0, \"iSAngle\": 0, \"sChinese\": \"正常算法\", \"showName\": \"正常算法\", \"iFitWidth\": 120, \"sBrandsId\": \"1111111111\", \"sParentId\": \"17503120900005596112489925319000\", \"iIncrement\": 23752, \"sFWidthOffset\": \"0\", \"sSGroupOffset\": \"首盒\", \"sSWidthOffset\": \"0\", \"sSubsidiaryId\": \"1111111111\", \"sFLengthOffset\": \"0\", \"sSLengthOffset\": \"0\", \"sSettingMethod\": \"从上到下\", \"sSecondorizontalOffset\": \"0\", \"sSecondLongitudinalOffset\": \"0\"}]",
24 24 "sLengthFormula": "L",
... ...