Index: ssts-web/src/main/webapp/disinfectsystem/invoice/operationReservationInvoiceView.js =================================================================== diff -u -r15446 -r16055 --- ssts-web/src/main/webapp/disinfectsystem/invoice/operationReservationInvoiceView.js (.../operationReservationInvoiceView.js) (revision 15446) +++ ssts-web/src/main/webapp/disinfectsystem/invoice/operationReservationInvoiceView.js (.../operationReservationInvoiceView.js) (revision 16055) @@ -242,6 +242,7 @@ } record.set('tempAmount',Number(tempAmount) - Number(amount)); updateErrorAmount(record); + refreshTotalAmount(); } } } @@ -345,6 +346,7 @@ } record.set('tempAmount',Number(amount) + Number(tempAmount)); updateErrorAmount(record); + refreshTotalAmount(); } } } @@ -730,6 +732,7 @@ } record.set('tempAmount', Number(amount)); updateErrorAmount(record); + refreshTotalAmount(); } } } @@ -800,6 +803,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++) { @@ -850,6 +876,7 @@ {name : 'name'}, {name : 'showTousseName'}, {name : 'count'}, + {name : 'middlePackageAmount'}, {name : 'diposable'}, {name : 'price'}, {name : 'urgentAmount'}, @@ -860,6 +887,7 @@ {name : 'applicationAmount'}, {name : 'batchNumber'}, {name : 'disposableGoodsIdSet'}, + {name : 'invoicePlanIDList'}, {name : 'invoicePlanType'} ] }); @@ -877,6 +905,7 @@ var sourceWarehouseIdCmp = top.Ext.getCmp('sourceWarehouseId'); if(sourceWarehouseIdCmp != null){ var sourceWarehouseId = sourceWarehouseIdCmp.getValue(); + refreshTotalAmount(); refreshStorage(sourceWarehouseId); } } @@ -1396,6 +1425,10 @@ width :423, height :425, loadMask : true, + tbar:[{ + text: "", + id : 'tousseAmountInfo' + }], autoExpandColumn : 'deleteItem', frame : false, bodyStyle : 'border:1px solid #afd7af',