diff --git a/src/components/Common/CommonTable/index.js b/src/components/Common/CommonTable/index.js index e6bb612..54a96f8 100644 --- a/src/components/Common/CommonTable/index.js +++ b/src/components/Common/CommonTable/index.js @@ -1912,7 +1912,7 @@ class CommonTableRc extends React.Component { if (dQty) { dQty.render = (value, record) => { - const { iJobStatus } = record; + const { iJobStatus, dQtyUp = 0 } = record; if (iJobStatus !== 1) { return ( @@ -1922,7 +1922,7 @@ class CommonTableRc extends React.Component { } else { return ( - + ); } @@ -12535,7 +12535,7 @@ const TEndDateComponent = () => { return {value}; }; -const DqtyComponent = () => { +const DqtyComponent = ({ dQtyUp = 0 }) => { const oDTrayQty = document.querySelector("#MesDynamicNum_dTrayQty"); if (!oDTrayQty) return 0; @@ -12543,7 +12543,15 @@ const DqtyComponent = () => { useEffect(() => { const getValue = () => { const temp = oDTrayQty.innerHTML?.replace(/\,/g, ""); - setValue(temp); + let showNum = temp; + // 只有dQtyUp不为0才叠加,等于0就保持原值 + if (Number(dQtyUp) !== 0) { + const rawNum = Number(temp); + const total = rawNum + Number(dQtyUp); + showNum = String(total); + } + + setValue(showNum); }; getValue();