Pārlūkot izejas kodu

集装箱显示一条

zhangyuewww 3 gadi atpakaļ
vecāks
revīzija
31d9992101

+ 4 - 0
src/views/tranManagement/tranManagementShippingArrangemen.vue

@@ -498,6 +498,10 @@ export default {
         .then((response) => {
           this.deptBudgetList = response
           if (response.tranCarInfoList.length > 0) {
+            if(response.tranCarInfoList[0].shipType =='集装箱') {
+              this.deptBudgetList.tranCarInfoList=[this.deptBudgetList.tranCarInfoList[0]]
+
+            }
             // for (
             //   var i = 0;
             //   i < this.deptBudgetList.tranCarInfoList.length;

+ 7 - 3
src/views/tranManagement/tranManagementShippingLook.vue

@@ -180,9 +180,13 @@
           .toPromise()
           .then((response) => {
             this.deptBudgetList = response
-            this.deptBudgetList.tranCarInfoList = response.tranCarInfoList
-            console.log(this.deptBudgetList.tranCarInfoList[0].driverPhone)
-            console.log(this.deptBudgetList.tranCarInfoList[1].driverPhone)
+            if(response.tranCarInfoList[0].shipType =='集装箱') {
+              this.deptBudgetList.tranCarInfoList=[this.deptBudgetList.tranCarInfoList[0]]
+
+            }else{
+               this.deptBudgetList.tranCarInfoList = response.tranCarInfoList
+
+            }
           })
       },
       //返回按钮