Selaa lähdekoodia

前端汽运调度车牌号司机联动

gjy 2 vuotta sitten
vanhempi
commit
47035f9f56

+ 24 - 21
src/views/houseSelfCollect/inspectionManagementNew.vue

@@ -938,28 +938,31 @@ export default {
         }
         // debugger
         //客户
-        getcustomer({
-          warehouseId: this.cangid,
-          goodsName: this.deptBudgetList.goodsName
-        })
-          .toPromise()
-          .then((response) => {
-            this.customerList1 = response
-            this.customerList = []
-            let customer = response
-            for (let i = 0; i < response.length; i++) {
-              if (response[i].supplier) {
-                customer = response[i].customerName + '(' + response[i].customerPhone + ')' + '-' + response[i]
-                  .supplier
-              } else {
-                customer = response[i].customerName + '(' + response[i].customerPhone + ')'
-              }
-              this.customerList.push({
-                valueKey: i,
-                value: customer,
-              })
-            }
+        if(this.serviceManagementType==3){
+          getcustomer({
+            warehouseId: this.cangid,
+            goodsName: this.deptBudgetList.goodsName
           })
+            .toPromise()
+            .then((response) => {
+              this.customerList1 = response
+              this.customerList = []
+              let customer = response
+              for (let i = 0; i < response.length; i++) {
+                if (response[i].supplier) {
+                  customer = response[i].customerName + '(' + response[i].customerPhone + ')' + '-' + response[i]
+                    .supplier
+                } else {
+                  customer = response[i].customerName + '(' + response[i].customerPhone + ')'
+                }
+                this.customerList.push({
+                  valueKey: i,
+                  value: customer,
+                })
+              }
+            })
+        }
+        
         for (var i = 0; i < this.purchasePriceList.length; i++) {
           if (this.purchasePriceList[i].goodsName == this.deptBudgetList.goodsName) {
             this.$set(this.deptBudgetList, 'buckleWeightRatio', this.purchasePriceList[i].deductWeight)

+ 7 - 2
src/views/tranManagement/tranManagementVehicleDispatching.vue

@@ -178,7 +178,7 @@
               <el-col :span="8">
                 <el-form-item label="车牌号:" span="1" prop="carNo" label-width="125px">
                   <el-select :disabled="item.id" v-model="item.carNo" placeholder="请选择车牌号"
-                    filterable clearable class="row-item" @change="
+                    filterable clearable @clear="clear" class="row-item" @change="
                                (val) => {
                                  carNochange(val, item.tranCarIndex)
                                }
@@ -331,6 +331,7 @@
         // 提交类型
         readonly: true,
         tranPriceApprove: {},
+        carList1:[],
         size: 10,
         compId: localStorage.getItem('ws-pf_compId'),
         date: {
@@ -878,6 +879,7 @@
           .toPromise()
           .then((response) => {
             this.carList = response
+            this.carList1 = response
           })
           getcarNumber({
             compId: this.compId
@@ -919,6 +921,9 @@
           }
         }
       },
+      clear(){
+        this.carList=this.carList1
+      },
       carNochange(val,index){
         for (var i = 0; i < this.carNoList.length; i++) {
           if (this.carNoList[i].carNumber == val) {
@@ -942,7 +947,7 @@
               })
               .toPromise()
               .then((response) => {
-                console.log(this, response)
+                this.carList=response
                 
               })
           }