zxz 2 tahun lalu
induk
melakukan
af33cec13e

+ 4 - 4
src/views/tranManagement/tranManagementVehicleDispatching.vue

@@ -550,7 +550,7 @@
             var tmp1 = 'C00'
             var tmp1 = 'C00'
             this.deptBudgetList.count++
             this.deptBudgetList.count++
             console.log(this.deptBudgetList.tranCarInfoList,this.deptBudgetList.tranCarInfoList1.length)
             console.log(this.deptBudgetList.tranCarInfoList,this.deptBudgetList.tranCarInfoList1.length)
-            if ((this.deptBudgetList.tranCarInfoList.length+this.deptBudgetList.tranCarInfoList1.length) < 10) {
+            if ((this.deptBudgetList.tranCarInfoList.length+this.deptBudgetList.tranCarInfoList1.length) < 9) {
               this.deptBudgetList.tranCarInfoList1.push({
               this.deptBudgetList.tranCarInfoList1.push({
                 driverName: '',
                 driverName: '',
                 driverPhone: '',
                 driverPhone: '',
@@ -569,8 +569,8 @@
                 tranCarNo: 'C00' + (this.deptBudgetList.tranCarInfoList.length+this.deptBudgetList.tranCarInfoList1.length+1),
                 tranCarNo: 'C00' + (this.deptBudgetList.tranCarInfoList.length+this.deptBudgetList.tranCarInfoList1.length+1),
                 tranPrice: this.deptBudgetList.tranPrice
                 tranPrice: this.deptBudgetList.tranPrice
               })
               })
-            } else if ((this.deptBudgetList.tranCarInfoList.length+this.deptBudgetList.tranCarInfoList1.length) < 100 && (this.deptBudgetList.tranCarInfoList.length+this.deptBudgetList.tranCarInfoList1.length) >=
-              10) {
+            } else if ((this.deptBudgetList.tranCarInfoList.length+this.deptBudgetList.tranCarInfoList1.length) < 99 && (this.deptBudgetList.tranCarInfoList.length+this.deptBudgetList.tranCarInfoList1.length) >=
+              9) {
               tmp1 = 'C0'
               tmp1 = 'C0'
               this.deptBudgetList.count++
               this.deptBudgetList.count++
               this.deptBudgetList.tranCarInfoList1.push({
               this.deptBudgetList.tranCarInfoList1.push({
@@ -592,7 +592,7 @@
                 tranPrice: this.deptBudgetList.tranPrice
                 tranPrice: this.deptBudgetList.tranPrice
               })
               })
             } else if ((this.deptBudgetList.tranCarInfoList.length+this.deptBudgetList.tranCarInfoList1.length) < 1000 && (this.deptBudgetList.tranCarInfoList.length+this.deptBudgetList.tranCarInfoList1.length) >=
             } else if ((this.deptBudgetList.tranCarInfoList.length+this.deptBudgetList.tranCarInfoList1.length) < 1000 && (this.deptBudgetList.tranCarInfoList.length+this.deptBudgetList.tranCarInfoList1.length) >=
-              100) {
+              99) {
                 console.log(111111)
                 console.log(111111)
               tmp1 = 'C'
               tmp1 = 'C'
               this.deptBudgetList.count++
               this.deptBudgetList.count++

+ 15 - 9
src/views/warehousenew/warehouseManagementList.vue

@@ -1211,19 +1211,25 @@
               if(this.totalReserves[j].cost && this.totalReserves[j].stockNum){
               if(this.totalReserves[j].cost && this.totalReserves[j].stockNum){
                 this.totalReserves[j].totalMoney = (Number(this.totalReserves[j].cost) *  Number(this.totalReserves[j].stockNum)).toFixed(3)
                 this.totalReserves[j].totalMoney = (Number(this.totalReserves[j].cost) *  Number(this.totalReserves[j].stockNum)).toFixed(3)
                 this.totalMoney = (Number(this.totalMoney) + Number(this.totalReserves[j].totalMoney)).toFixed(3)
                 this.totalMoney = (Number(this.totalMoney) + Number(this.totalReserves[j].totalMoney)).toFixed(3)
+                for(let r = 0;r<response.warehouseNumViewList.length;r++){
+                    if(this.totalReserves[j].goodsName == response.warehouseNumViewList[r].goodsName){
+                      this.$message.error('当前仓库无潮粮库存,无需折算!')
+                      this.value = '0'
+                      return
+                    }
+                }
               }
               }
             }
             }
-            // debugger
             if(response.warehouseNumViewList.length != 0){
             if(response.warehouseNumViewList.length != 0){
               var result = []
               var result = []
-            for(let i = 0; i < response.warehouseNumViewList.length ; i++){
-              let param ={}
-              if (response.warehouseNumViewList[i].pureWeight) {
-                param.goodsName =response.warehouseNumViewList[i].goodsName
-                param.stockNum = Number(response.warehouseNumViewList[i].pureWeight).toFixed(3)
-                param.conversionCost = (Number(this.totalMoney) / Number(param.stockNum)).toFixed(3)
-                result.push(param)
-              } 
+              for(let i = 0; i < response.warehouseNumViewList.length ; i++){
+                let param ={}
+                if (response.warehouseNumViewList[i].pureWeight) {
+                  param.goodsName =response.warehouseNumViewList[i].goodsName
+                  param.stockNum = Number(response.warehouseNumViewList[i].pureWeight).toFixed(3)
+                  param.conversionCost = (Number(this.totalMoney) / Number(param.stockNum)).toFixed(3)
+                  result.push(param)
+                } 
              }
              }
              console.log(result)
              console.log(result)
              this.totalReserves = result
              this.totalReserves = result