Commit a923d960e2d59bab4a3bdac80e43717513a71e83
1 parent
d765b569
app核价
Showing
4 changed files
with
68 additions
and
34 deletions
src/components/Common/Typesetting/typesetting.js
| @@ -54,7 +54,7 @@ const Typesetting = props => { | @@ -54,7 +54,7 @@ const Typesetting = props => { | ||
| 54 | const [dPartsLength, setDPartsLength] = useState(0); | 54 | const [dPartsLength, setDPartsLength] = useState(0); |
| 55 | 55 | ||
| 56 | // 横板 | 56 | // 横板 |
| 57 | - const { dHorizontal, dPortrait, dHorizontalType, dPortraitType } = slaveRowData; | 57 | + let { dHorizontal, dPortrait, dHorizontalType, dPortraitType } = slaveRowData; |
| 58 | // 使用 useRef 获取 DOM 元素 | 58 | // 使用 useRef 获取 DOM 元素 |
| 59 | const boxRef = useRef(null); | 59 | const boxRef = useRef(null); |
| 60 | const boxsRef = useRef(null); | 60 | const boxsRef = useRef(null); |
| @@ -71,9 +71,12 @@ const Typesetting = props => { | @@ -71,9 +71,12 @@ const Typesetting = props => { | ||
| 71 | const maxWidth = Number(slaveDataDetail?.dMaxLength); | 71 | const maxWidth = Number(slaveDataDetail?.dMaxLength); |
| 72 | const maxHeight = Number(slaveDataDetail?.dMaxWidth); | 72 | const maxHeight = Number(slaveDataDetail?.dMaxWidth); |
| 73 | 73 | ||
| 74 | - const outerWidth = Number(slaveDataDetail?.dMaxLength); // 默认取最大上机尺寸 | ||
| 75 | - const outerHeight = Number(slaveDataDetail?.dMaxWidth); // 默认取最大上机尺寸 | ||
| 76 | - console.log("🚀 ~ maxWidth:", dHorizontal, dPortrait,dHorizontalType,dPortraitType, outerWidth, outerHeight); | 74 | + let outerWidth = Number(slaveDataDetail?.dMaxLength); // 默认取最大上机尺寸 |
| 75 | + let outerHeight = Number(slaveDataDetail?.dMaxWidth); // 默认取最大上机尺寸 | ||
| 76 | + dHorizontal = 2; | ||
| 77 | + // 如果需要自定义排版数 | ||
| 78 | + | ||
| 79 | + console.log("🚀 ~ maxWidth:", dHorizontal, dPortrait, dHorizontalType, dPortraitType, outerWidth, outerHeight); | ||
| 77 | 80 | ||
| 78 | // 确认是竖向排列还是横向排列 | 81 | // 确认是竖向排列还是横向排列 |
| 79 | const L = masterData?.dLength; | 82 | const L = masterData?.dLength; |
| @@ -192,12 +195,7 @@ const Typesetting = props => { | @@ -192,12 +195,7 @@ const Typesetting = props => { | ||
| 192 | const boxWidthOffset = evaluateFormula(sSecondLongitudinalOffset, variabless); // 第二列纵向偏移 | 195 | const boxWidthOffset = evaluateFormula(sSecondLongitudinalOffset, variabless); // 第二列纵向偏移 |
| 193 | const isVertical = sSettingMethod === "从上到下"; // true 表示竖向排列,false 表示横向排列 sSettingMethod === '从上到下' | 196 | const isVertical = sSettingMethod === "从上到下"; // true 表示竖向排列,false 表示横向排列 sSettingMethod === '从上到下' |
| 194 | const reference = sSGroupOffset === "首盒"; // 第三列参考 | 197 | const reference = sSGroupOffset === "首盒"; // 第三列参考 |
| 195 | - const style = { | ||
| 196 | - width: `${outerWidth}px`, | ||
| 197 | - height: `${outerHeight}px`, | ||
| 198 | - backgroundColor: "#f3f3f3", | ||
| 199 | - position: "relative", // 设置外层 div 为相对定位 | ||
| 200 | - }; | 198 | + |
| 201 | // 计算内层盒子尺寸 加上间距 | 199 | // 计算内层盒子尺寸 加上间距 |
| 202 | let jInnerHeight = innerHeight + dXBJJ + dXBJJ; | 200 | let jInnerHeight = innerHeight + dXBJJ + dXBJJ; |
| 203 | let jInnerWidth = innerWidth + dYBJJ + dYBJJ; | 201 | let jInnerWidth = innerWidth + dYBJJ + dYBJJ; |
| @@ -216,6 +214,13 @@ const Typesetting = props => { | @@ -216,6 +214,13 @@ const Typesetting = props => { | ||
| 216 | const innerWidthCombined = isVertical | 214 | const innerWidthCombined = isVertical |
| 217 | ? Math.max(jInnerWidth + dFLengthOffset, jInnerWidth + dSLengthOffset) | 215 | ? Math.max(jInnerWidth + dFLengthOffset, jInnerWidth + dSLengthOffset) |
| 218 | : jInnerWidth * 2 + dSLengthOffset + dFLengthOffset; | 216 | : jInnerWidth * 2 + dSLengthOffset + dFLengthOffset; |
| 217 | + | ||
| 218 | + const style = { | ||
| 219 | + width: `${outerWidth}px`, | ||
| 220 | + height: `${outerHeight}px`, | ||
| 221 | + backgroundColor: "#f3f3f3", | ||
| 222 | + position: "relative", // 设置外层 div 为相对定位 | ||
| 223 | + }; | ||
| 219 | // 加上间距后的最大盒子长宽 计算每列可以放多少个组合 需要计算间距 | 224 | // 加上间距后的最大盒子长宽 计算每列可以放多少个组合 需要计算间距 |
| 220 | // 每个盒子加上边距 和第二组偏移量 如果根据次盒再加上次盒偏移量 | 225 | // 每个盒子加上边距 和第二组偏移量 如果根据次盒再加上次盒偏移量 |
| 221 | let cols = Math.floor(outerWidth / (innerWidthCombined + boxLengthOffset + (reference ? 0 : dSLengthOffset))); | 226 | let cols = Math.floor(outerWidth / (innerWidthCombined + boxLengthOffset + (reference ? 0 : dSLengthOffset))); |
| @@ -243,7 +248,7 @@ const Typesetting = props => { | @@ -243,7 +248,7 @@ const Typesetting = props => { | ||
| 243 | //剩余量能不能放一下单独一个 | 248 | //剩余量能不能放一下单独一个 |
| 244 | const commonHeightCheck = remainingHeight > jInnerHeight; | 249 | const commonHeightCheck = remainingHeight > jInnerHeight; |
| 245 | const commonWidthCheck = remainingWidth > jInnerWidth; | 250 | const commonWidthCheck = remainingWidth > jInnerWidth; |
| 246 | - const remaining = isVertical ? commonHeightCheck : commonWidthCheck; | 251 | + let remaining = isVertical ? commonHeightCheck : commonWidthCheck; |
| 247 | console.log( | 252 | console.log( |
| 248 | cols, | 253 | cols, |
| 249 | rows, | 254 | rows, |
| @@ -265,7 +270,21 @@ const Typesetting = props => { | @@ -265,7 +270,21 @@ const Typesetting = props => { | ||
| 265 | dFLengthOffset, | 270 | dFLengthOffset, |
| 266 | "rowsMaxLength" | 271 | "rowsMaxLength" |
| 267 | ); | 272 | ); |
| 268 | - | 273 | + // 从上到下 |
| 274 | + if (isVertical) { | ||
| 275 | + // dHorizontal, dPortrait, dHorizontalType, dPortraitType | ||
| 276 | + // 如果dHorizontal 与 dHorizontalType 不相同 横板 | ||
| 277 | + if (Number(dHorizontal) !== Number(dHorizontalType)) { | ||
| 278 | + console.log(dHorizontal, "dHorizontal"); | ||
| 279 | + } | ||
| 280 | + } else { | ||
| 281 | + if (Number(dHorizontal) !== Number(dHorizontalType)) { | ||
| 282 | + // outerWidth = outerWidth - jInnerWidth; | ||
| 283 | + } | ||
| 284 | + if (Number(dPortrait) !== Number(dPortraitType)) { | ||
| 285 | + console.log(dPortrait, "dPortrait"); | ||
| 286 | + } | ||
| 287 | + } | ||
| 269 | // 抵扣盒默认展示 svg | 288 | // 抵扣盒默认展示 svg |
| 270 | // const isSvg = props.slaveRowData.sName === "扣抵盒"; | 289 | // const isSvg = props.slaveRowData.sName === "扣抵盒"; |
| 271 | // 组装svg数据 | 290 | // 组装svg数据 |
| @@ -546,6 +565,8 @@ const Typesetting = props => { | @@ -546,6 +565,8 @@ const Typesetting = props => { | ||
| 546 | newMaterialWidth, | 565 | newMaterialWidth, |
| 547 | innerWidth, | 566 | innerWidth, |
| 548 | innerHeight, | 567 | innerHeight, |
| 568 | + dHorizontal, | ||
| 569 | + dPortrait, | ||
| 549 | dHorizontalType, | 570 | dHorizontalType, |
| 550 | dPortraitType | 571 | dPortraitType |
| 551 | ); | 572 | ); |
| @@ -565,6 +586,8 @@ const Typesetting = props => { | @@ -565,6 +586,8 @@ const Typesetting = props => { | ||
| 565 | slaveDataDetail.dWlkd, | 586 | slaveDataDetail.dWlkd, |
| 566 | innerWidth, | 587 | innerWidth, |
| 567 | innerHeight, | 588 | innerHeight, |
| 589 | + dHorizontal, | ||
| 590 | + dPortrait, | ||
| 568 | dHorizontalType, | 591 | dHorizontalType, |
| 569 | dPortraitType | 592 | dPortraitType |
| 570 | ); | 593 | ); |
src/components/QuickQuote/index.jsx
| @@ -1000,7 +1000,8 @@ const TreeComponent = props => { | @@ -1000,7 +1000,8 @@ const TreeComponent = props => { | ||
| 1000 | // 点击节点后查询数据 | 1000 | // 点击节点后查询数据 |
| 1001 | useEffect(() => { | 1001 | useEffect(() => { |
| 1002 | if (!selectedNode.sId || commonUtils.isEmptyObject(slaveConfig)) return; | 1002 | if (!selectedNode.sId || commonUtils.isEmptyObject(slaveConfig)) return; |
| 1003 | - | 1003 | + console.log(selectedNode,'selectedNode'); |
| 1004 | + | ||
| 1004 | timeRef.current += 1; | 1005 | timeRef.current += 1; |
| 1005 | 1006 | ||
| 1006 | const getSqlDropDownData = async ({ sId }) => { | 1007 | const getSqlDropDownData = async ({ sId }) => { |
| @@ -1539,7 +1540,9 @@ const BoxComponent = props => { | @@ -1539,7 +1540,9 @@ const BoxComponent = props => { | ||
| 1539 | innerWidth, | 1540 | innerWidth, |
| 1540 | innerHeight, | 1541 | innerHeight, |
| 1541 | dHorizontal, | 1542 | dHorizontal, |
| 1542 | - dPortrait | 1543 | + dPortrait, |
| 1544 | + dHorizontalType, | ||
| 1545 | + dPortraitType | ||
| 1543 | ) => { | 1546 | ) => { |
| 1544 | // 查找符合条件的索引 | 1547 | // 查找符合条件的索引 |
| 1545 | const { selectedNode } = props.state; | 1548 | const { selectedNode } = props.state; |
| @@ -1579,10 +1582,10 @@ const BoxComponent = props => { | @@ -1579,10 +1582,10 @@ const BoxComponent = props => { | ||
| 1579 | scale: scale, | 1582 | scale: scale, |
| 1580 | dPartsLength: innerWidth, | 1583 | dPartsLength: innerWidth, |
| 1581 | dPartsWidth: innerHeight, | 1584 | dPartsWidth: innerHeight, |
| 1582 | - dHorizontal: dHorizontal, | ||
| 1583 | - dPortrait: dPortrait, | ||
| 1584 | - dHorizontalType: dHorizontal, | ||
| 1585 | - dPortraitType: dPortrait, | 1585 | + dHorizontal: dHorizontal || dHorizontalType, |
| 1586 | + dPortrait: dPortrait || dPortraitType, | ||
| 1587 | + dHorizontalType: dHorizontalType, // 判断 | ||
| 1588 | + dPortraitType: dPortraitType, | ||
| 1586 | }; | 1589 | }; |
| 1587 | // 更新状态 | 1590 | // 更新状态 |
| 1588 | props.setState(prevState => ({ | 1591 | props.setState(prevState => ({ |
| @@ -2315,7 +2318,7 @@ const BoxModelSelectedModal = props => { | @@ -2315,7 +2318,7 @@ const BoxModelSelectedModal = props => { | ||
| 2315 | }; | 2318 | }; |
| 2316 | return svgProps; | 2319 | return svgProps; |
| 2317 | }; | 2320 | }; |
| 2318 | - | 2321 | + const selectBoxList = boxData.filter(item => (boxTypeSelected === "全部" ? true : (item.sBoxType || "其它") === boxTypeSelected)) |
| 2319 | const tableProps = { | 2322 | const tableProps = { |
| 2320 | ...commonBusiness.getTableTypes("box", { | 2323 | ...commonBusiness.getTableTypes("box", { |
| 2321 | ...props, | 2324 | ...props, |
| @@ -2333,8 +2336,8 @@ const BoxModelSelectedModal = props => { | @@ -2333,8 +2336,8 @@ const BoxModelSelectedModal = props => { | ||
| 2333 | // (value ? (column.dataIndex === 'sPackDetailPath' ? (boxData[index].sPackPath ? <img src={value} alt="" width={270} height={270} /> : '') : <img src={value} alt="" width={270} height={270} />) : "暂无图片"); | 2336 | // (value ? (column.dataIndex === 'sPackDetailPath' ? (boxData[index].sPackPath ? <img src={value} alt="" width={270} height={270} /> : '') : <img src={value} alt="" width={270} height={270} />) : "暂无图片"); |
| 2334 | column.render = (value, record, index) => | 2337 | column.render = (value, record, index) => |
| 2335 | column.dataIndex === "sPackDetailPathUpLoad" ? ( | 2338 | column.dataIndex === "sPackDetailPathUpLoad" ? ( |
| 2336 | - boxData[index].sTypes ? ( | ||
| 2337 | - <DynamicSVG {...getSvgProps(boxData[index])} /> | 2339 | + selectBoxList[index].sTypes ? ( |
| 2340 | + <DynamicSVG {...getSvgProps(selectBoxList[index])} /> | ||
| 2338 | ) : ( | 2341 | ) : ( |
| 2339 | <img src={value} alt="" width={270} height={270} /> | 2342 | <img src={value} alt="" width={270} height={270} /> |
| 2340 | ) | 2343 | ) |
src/mobile/quotation/detailNew.jsx
| @@ -358,11 +358,10 @@ const QuickQuoteEvent = props => { | @@ -358,11 +358,10 @@ const QuickQuoteEvent = props => { | ||
| 358 | return; | 358 | return; |
| 359 | } | 359 | } |
| 360 | const type = isDraftSaved ? "add" : "update"; | 360 | const type = isDraftSaved ? "add" : "update"; |
| 361 | - | ||
| 362 | props.onSaveState( | 361 | props.onSaveState( |
| 363 | { | 362 | { |
| 364 | ...addState.onGetAllDelData(), | 363 | ...addState.onGetAllDelData(), |
| 365 | - masterData: { ...nextProps.masterData, handleType: masterData.handleType, sQuoConfig: JSON.stringify(addState.onGetFilterState(nextState)) }, | 364 | + masterData: { ...nextProps.masterData, sQuoConfig: JSON.stringify(addState.onGetFilterState(nextState)) }, |
| 366 | slaveData: nextProps.slaveData.map(item => { | 365 | slaveData: nextProps.slaveData.map(item => { |
| 367 | return { | 366 | return { |
| 368 | ...item, | 367 | ...item, |
| @@ -418,7 +417,10 @@ const QuickQuoteEvent = props => { | @@ -418,7 +417,10 @@ const QuickQuoteEvent = props => { | ||
| 418 | newState => { | 417 | newState => { |
| 419 | if (newState) { | 418 | if (newState) { |
| 420 | props.onButtonClick("BtnDraft", { ...props, ...newState }); | 419 | props.onButtonClick("BtnDraft", { ...props, ...newState }); |
| 421 | - setIsDraftSaved(true); | 420 | + |
| 421 | + // setTimeout(() => { | ||
| 422 | + // setIsDraftSaved(true); | ||
| 423 | + // }, 500); | ||
| 422 | } | 424 | } |
| 423 | } | 425 | } |
| 424 | ); | 426 | ); |
src/mobile/quotation/master.jsx
| @@ -338,7 +338,6 @@ const handleMaterialsChange = async (tableDataRow, sModelsId, masterData, change | @@ -338,7 +338,6 @@ const handleMaterialsChange = async (tableDataRow, sModelsId, masterData, change | ||
| 338 | }; | 338 | }; |
| 339 | // 计算数量 | 339 | // 计算数量 |
| 340 | const handleCalculation = async (bSave, nextProps, isWait, props) => { | 340 | const handleCalculation = async (bSave, nextProps, isWait, props) => { |
| 341 | - | ||
| 342 | const dataUrl = `${commonConfig.server_host}business/addQuotationsheet?sModelsId=${nextProps.sModelsId}`; | 341 | const dataUrl = `${commonConfig.server_host}business/addQuotationsheet?sModelsId=${nextProps.sModelsId}`; |
| 343 | const { | 342 | const { |
| 344 | masterConfig, | 343 | masterConfig, |
| @@ -361,6 +360,7 @@ const handleCalculation = async (bSave, nextProps, isWait, props) => { | @@ -361,6 +360,7 @@ const handleCalculation = async (bSave, nextProps, isWait, props) => { | ||
| 361 | manyDataCache = [], | 360 | manyDataCache = [], |
| 362 | dQuickQuoteProductQty, | 361 | dQuickQuoteProductQty, |
| 363 | } = nextProps; | 362 | } = nextProps; |
| 363 | + console.log("🚀 ~ handleCalculation ~ dQuickQuoteProductQty:", dQuickQuoteProductQty) | ||
| 364 | let { slaveData, controlData, materialsData, processData, masterData, manyqtysData, packData } = nextProps; | 364 | let { slaveData, controlData, materialsData, processData, masterData, manyqtysData, packData } = nextProps; |
| 365 | const sMakePerson = masterData.sMakePerson; | 365 | const sMakePerson = masterData.sMakePerson; |
| 366 | const data = []; | 366 | const data = []; |
| @@ -408,24 +408,28 @@ const handleCalculation = async (bSave, nextProps, isWait, props) => { | @@ -408,24 +408,28 @@ const handleCalculation = async (bSave, nextProps, isWait, props) => { | ||
| 408 | masterData.sFormId = nextProps.masterData.sFormId; | 408 | masterData.sFormId = nextProps.masterData.sFormId; |
| 409 | masterData.sBillNo = nextProps.masterData.sBillNo; | 409 | masterData.sBillNo = nextProps.masterData.sBillNo; |
| 410 | } | 410 | } |
| 411 | - masterData.handleType = nextProps.handleType && nextProps.handleType === 'update' ? "update" : "add"; | 411 | + masterData.handleType = nextProps.handleType && nextProps.handleType === "update" ? "update" : "add"; |
| 412 | if (masterData.handleType === "update" && !commonUtils.isEmpty(sMakePerson)) { | 412 | if (masterData.handleType === "update" && !commonUtils.isEmpty(sMakePerson)) { |
| 413 | masterData.sMakePerson = sMakePerson; | 413 | masterData.sMakePerson = sMakePerson; |
| 414 | } | 414 | } |
| 415 | slaveData = valueReturn[`${slaveConfig.sTbName.toLowerCase()}_tmp`].map(item => { | 415 | slaveData = valueReturn[`${slaveConfig.sTbName.toLowerCase()}_tmp`].map(item => { |
| 416 | - item.handleType = dQuickQuoteProductQty ? "add" : item.handleType; | 416 | + item.handleType = dQuickQuoteProductQty ? "update" : item.handleType; |
| 417 | + item.sId = commonUtils.createSid(); | ||
| 417 | return item; | 418 | return item; |
| 418 | }); | 419 | }); |
| 419 | controlData = valueReturn[`${controlConfig.sTbName.toLowerCase()}_tmp`].map(item => { | 420 | controlData = valueReturn[`${controlConfig.sTbName.toLowerCase()}_tmp`].map(item => { |
| 420 | - item.handleType = dQuickQuoteProductQty ? "add" : item.handleType; | 421 | + item.handleType = dQuickQuoteProductQty ? "update" : item.handleType; |
| 422 | + item.sId = commonUtils.createSid(); | ||
| 421 | return item; | 423 | return item; |
| 422 | }); | 424 | }); |
| 423 | materialsData = valueReturn[`${materialsConfig.sTbName.toLowerCase()}_tmp`].map(item => { | 425 | materialsData = valueReturn[`${materialsConfig.sTbName.toLowerCase()}_tmp`].map(item => { |
| 424 | item.handleType = dQuickQuoteProductQty ? "add" : item.handleType; | 426 | item.handleType = dQuickQuoteProductQty ? "add" : item.handleType; |
| 427 | + item.sId = commonUtils.createSid(); | ||
| 425 | return item; | 428 | return item; |
| 426 | }); | 429 | }); |
| 427 | processData = valueReturn[`${processConfig.sTbName.toLowerCase()}_tmp`].map(item => { | 430 | processData = valueReturn[`${processConfig.sTbName.toLowerCase()}_tmp`].map(item => { |
| 428 | item.handleType = dQuickQuoteProductQty ? "add" : item.handleType; | 431 | item.handleType = dQuickQuoteProductQty ? "add" : item.handleType; |
| 432 | + item.sId = commonUtils.createSid(); | ||
| 429 | return item; | 433 | return item; |
| 430 | }); | 434 | }); |
| 431 | processData = props.sortData(controlData, processData); | 435 | processData = props.sortData(controlData, processData); |
| @@ -435,7 +439,7 @@ const handleCalculation = async (bSave, nextProps, isWait, props) => { | @@ -435,7 +439,7 @@ const handleCalculation = async (bSave, nextProps, isWait, props) => { | ||
| 435 | return { | 439 | return { |
| 436 | ...item, | 440 | ...item, |
| 437 | sId: manyqtysData[index] ? manyqtysData[index].sId : item.sId, | 441 | sId: manyqtysData[index] ? manyqtysData[index].sId : item.sId, |
| 438 | - handleType: dQuickQuoteProductQty ? "add" : item.handleType, | 442 | + handleType: dQuickQuoteProductQty ? "update" : item.handleType, |
| 439 | }; | 443 | }; |
| 440 | }); | 444 | }); |
| 441 | manyqtysData.forEach((x, i) => { | 445 | manyqtysData.forEach((x, i) => { |
| @@ -501,7 +505,7 @@ const handleCalculation = async (bSave, nextProps, isWait, props) => { | @@ -501,7 +505,7 @@ const handleCalculation = async (bSave, nextProps, isWait, props) => { | ||
| 501 | const data = []; | 505 | const data = []; |
| 502 | // masterData.handleType = "update"; | 506 | // masterData.handleType = "update"; |
| 503 | // masterData.sFormId = commonUtils.createSid() | 507 | // masterData.sFormId = commonUtils.createSid() |
| 504 | - masterData.sId = commonUtils.createSid() | 508 | + masterData.sId = commonUtils.createSid(); |
| 505 | data.push(commonBusiness.mergeData("master", masterConfig.sTbName, [masterData])); | 509 | data.push(commonBusiness.mergeData("master", masterConfig.sTbName, [masterData])); |
| 506 | data.push(commonBusiness.mergeData("slave", slaveConfig.sTbName, slaveData, slaveDelData)); | 510 | data.push(commonBusiness.mergeData("slave", slaveConfig.sTbName, slaveData, slaveDelData)); |
| 507 | data.push(commonBusiness.mergeData("control", controlConfig.sTbName, controlData, controlDelData)); | 511 | data.push(commonBusiness.mergeData("control", controlConfig.sTbName, controlData, controlDelData)); |
| @@ -535,7 +539,7 @@ const handleCalculation = async (bSave, nextProps, isWait, props) => { | @@ -535,7 +539,7 @@ const handleCalculation = async (bSave, nextProps, isWait, props) => { | ||
| 535 | ...addState, | 539 | ...addState, |
| 536 | }); | 540 | }); |
| 537 | } else { | 541 | } else { |
| 538 | - masterData.handleType = 'update' | 542 | + masterData.handleType = "update"; |
| 539 | if (isWait) { | 543 | if (isWait) { |
| 540 | return { | 544 | return { |
| 541 | slaveData, | 545 | slaveData, |
| @@ -546,7 +550,7 @@ const handleCalculation = async (bSave, nextProps, isWait, props) => { | @@ -546,7 +550,7 @@ const handleCalculation = async (bSave, nextProps, isWait, props) => { | ||
| 546 | manyqtysData, | 550 | manyqtysData, |
| 547 | loading: false, | 551 | loading: false, |
| 548 | packData, | 552 | packData, |
| 549 | - handleType:'update', | 553 | + handleType: "update", |
| 550 | ...addState, | 554 | ...addState, |
| 551 | }; | 555 | }; |
| 552 | } else { | 556 | } else { |
| @@ -560,7 +564,7 @@ const handleCalculation = async (bSave, nextProps, isWait, props) => { | @@ -560,7 +564,7 @@ const handleCalculation = async (bSave, nextProps, isWait, props) => { | ||
| 560 | loading: false, | 564 | loading: false, |
| 561 | packData, | 565 | packData, |
| 562 | ...addState, | 566 | ...addState, |
| 563 | - handleType:'update' | 567 | + handleType: "update", |
| 564 | }); | 568 | }); |
| 565 | } | 569 | } |
| 566 | // message.success(commonFunc.getConfigShowName(masterConfig, "BtnCalculation") + commonFunc.showMessage(app.commonConst, "handleSuccess")); | 570 | // message.success(commonFunc.getConfigShowName(masterConfig, "BtnCalculation") + commonFunc.showMessage(app.commonConst, "handleSuccess")); |
| @@ -794,9 +798,11 @@ const handleSaveData = async (params, props) => { | @@ -794,9 +798,11 @@ const handleSaveData = async (params, props) => { | ||
| 794 | Toast.show({ | 798 | Toast.show({ |
| 795 | content: "保存成功", | 799 | content: "保存成功", |
| 796 | }); | 800 | }); |
| 801 | + masterData.handleType = "update"; | ||
| 797 | props.onSaveState({ | 802 | props.onSaveState({ |
| 798 | enabled: false, | 803 | enabled: false, |
| 799 | currentId: masterData.sId, | 804 | currentId: masterData.sId, |
| 805 | + masterData, | ||
| 800 | }); | 806 | }); |
| 801 | // 保存后更新panes,currentPane的checkedId,防止浏览器刷新时重新又变成新增。 | 807 | // 保存后更新panes,currentPane的checkedId,防止浏览器刷新时重新又变成新增。 |
| 802 | const iPaneIndex = app.panes.findIndex(item => item.key === app.currentPane.key); | 808 | const iPaneIndex = app.panes.findIndex(item => item.key === app.currentPane.key); |
| @@ -911,7 +917,7 @@ const handleSave = async (skipCalculation, props) => { | @@ -911,7 +917,7 @@ const handleSave = async (skipCalculation, props) => { | ||
| 911 | } | 917 | } |
| 912 | } | 918 | } |
| 913 | if ((skipFlag === 0 || masterData.bNoVerify) && !skipCalculation) { | 919 | if ((skipFlag === 0 || masterData.bNoVerify) && !skipCalculation) { |
| 914 | - handleCalculation(true, props, false, props); | 920 | + handleCalculation(true, props.state.newNextProps, false, props); |
| 915 | } else { | 921 | } else { |
| 916 | props.onSaveData({ | 922 | props.onSaveData({ |
| 917 | data, | 923 | data, |