Index: ssts-web/src/main/webapp/disinfectsystem/invoice/invoicePlanExtractedForm.js =================================================================== diff -u -r15931 -r15961 --- ssts-web/src/main/webapp/disinfectsystem/invoice/invoicePlanExtractedForm.js (.../invoicePlanExtractedForm.js) (revision 15931) +++ ssts-web/src/main/webapp/disinfectsystem/invoice/invoicePlanExtractedForm.js (.../invoicePlanExtractedForm.js) (revision 15961) @@ -80,6 +80,7 @@ } record.set('tempAmount',Number(tempAmount) - Number(amount)); updateErrorAmount(record); + refreshTotalAmount(); } } } @@ -183,6 +184,7 @@ } record.set('tempAmount',Number(amount) + Number(tempAmount)); updateErrorAmount(record); + refreshTotalAmount(); } } } @@ -591,6 +593,7 @@ } record.set('tempAmount', Number(amount)); updateErrorAmount(record); + refreshTotalAmount(); } } } @@ -661,6 +664,29 @@ } }); } +// 刷新总包数 +function refreshTotalAmount(){ + var appAmount = 0; + var scannedAmount = 0; + for ( var i = 0; i < recyclingapplicationStore.getCount(); i++) { + var record = recyclingapplicationStore.getAt(i); + var tempScannedAmount = record.get('tempAmount'); + var tempAppAmount = record.get('count'); + var diposable = record.get('diposable'); + if('是' == diposable){ + continue; + } + tempAppAmount = Number(tempAppAmount); + tempScannedAmount = Number(tempScannedAmount); + appAmount += tempAppAmount; + scannedAmount += tempScannedAmount; + } + var text = '申请总包数:'+appAmount+',已扫总包数:'+scannedAmount; + var amountElement = top.Ext.getCmp('tousseAmountInfo'); + if(amountElement != null){ + amountElement.setText(text); + } +} function setStorage(storages){ if(storages.length > 0){ for ( var i = 0; i < storages.length; i++) { @@ -791,6 +817,7 @@ var sourceWarehouseIdCmp = top.Ext.getCmp('sourceWarehouseId'); if(sourceWarehouseIdCmp != null){ var sourceWarehouseId = sourceWarehouseIdCmp.getValue(); + refreshTotalAmount(); refreshStorage(sourceWarehouseId); } } @@ -1390,6 +1417,9 @@ } }, anchor : '95%' + },{ + text: "", + id : 'tousseAmountInfo' }], autoExpandColumn : 'deleteItem', frame : false,