Commit 0537585c7cc0df2d37288c72a41438efcd009042
1 parent
70c28e12
优化报价单多数量保存;
Showing
1 changed file
with
3 additions
and
1 deletions
src/components/QuoQuotation/QuotationPackTableTree/QuotationPackTableTree.js
| @@ -2340,6 +2340,7 @@ class QuotationPackTableTree extends Component { | @@ -2340,6 +2340,7 @@ class QuotationPackTableTree extends Component { | ||
| 2340 | if(commonUtils.isNotEmptyObject(manyqtysConfig)) { | 2340 | if(commonUtils.isNotEmptyObject(manyqtysConfig)) { |
| 2341 | data.push(commonBusiness.mergeData('manyqtys', `${manyqtysConfig.sTbName.toLowerCase()}_tmp`, manyqtysData?.map(item => { | 2341 | data.push(commonBusiness.mergeData('manyqtys', `${manyqtysConfig.sTbName.toLowerCase()}_tmp`, manyqtysData?.map(item => { |
| 2342 | delete item.manyData; | 2342 | delete item.manyData; |
| 2343 | + item.handleType = item.handleType || 'update'; | ||
| 2343 | return item; | 2344 | return item; |
| 2344 | }), [], true)); | 2345 | }), [], true)); |
| 2345 | } | 2346 | } |
| @@ -2389,11 +2390,12 @@ class QuotationPackTableTree extends Component { | @@ -2389,11 +2390,12 @@ class QuotationPackTableTree extends Component { | ||
| 2389 | processData = this.sortData(controlData, processData); | 2390 | processData = this.sortData(controlData, processData); |
| 2390 | const addState = {}; | 2391 | const addState = {}; |
| 2391 | if(commonUtils.isNotEmptyObject(manyqtysConfig)) { | 2392 | if(commonUtils.isNotEmptyObject(manyqtysConfig)) { |
| 2393 | + const manyqtysDataOld = cloneDeep(manyqtysData); | ||
| 2392 | manyqtysData = valueReturn[`${manyqtysConfig.sTbName.toLowerCase()}_tmp`]?.map((item, index) => { | 2394 | manyqtysData = valueReturn[`${manyqtysConfig.sTbName.toLowerCase()}_tmp`]?.map((item, index) => { |
| 2393 | return { | 2395 | return { |
| 2394 | ...item, | 2396 | ...item, |
| 2395 | sId: manyqtysData[index] ? manyqtysData[index].sId : item.sId, | 2397 | sId: manyqtysData[index] ? manyqtysData[index].sId : item.sId, |
| 2396 | - handleType: dQuickQuoteProductQty ? 'add' : item.handleType | 2398 | + handleType: dQuickQuoteProductQty ? 'add' : (manyqtysDataOld[index].handleType || item.handleType) |
| 2397 | } | 2399 | } |
| 2398 | }); | 2400 | }); |
| 2399 | if (cacheIndex === -1 && manyqtysData?.some(item => item.manyData)) { | 2401 | if (cacheIndex === -1 && manyqtysData?.some(item => item.manyData)) { |