Browse Source

收款管理,派发

zxz 3 years ago
parent
commit
a16e8c7d5f
1 changed files with 6 additions and 4 deletions
  1. 6 4
      src/views/financialManagement/collectionManagementList.vue

+ 6 - 4
src/views/financialManagement/collectionManagementList.vue

@@ -424,9 +424,10 @@ export default {
     current: function () {
       if (this.freightspace.length > 0) {
         var maxStorage = 0
-        for (var i = 0; i < this.freightspace.tranFlag; i++) {
-           maxStorage =(this.freightspace.tranFlag.length)
-         
+        for (var i = 0; i < this.freightspace.length; i++) {
+          if(this.freightspace[i].tranFlag!=null&&this.freightspace[i].tranFlag == 1){
+              maxStorage ++
+          }
         }
         return maxStorage
       }
@@ -598,6 +599,7 @@ export default {
           var tmp1='C00'
           if(response.length>0){
             this.freightspace = response
+            console.log(this.freightspace)
           }else{
             this.freightspace=[{
             carNo: '',
@@ -618,7 +620,7 @@ export default {
             boxNo: '',
             titleNo: '',
             tranCarNo: tmp1+(this.freightspace.length+1),
-            agent: this.freightspace[1].agent
+            agent: this.freightspace[this.freightspace.length-1].agent
           })
           
         })