gjy 3 anni fa
parent
commit
bd8efea723

+ 14 - 10
src/views/tranManagement/tranManagementDriverAdd.vue

@@ -932,14 +932,12 @@ export default {
         EventBus.$emit('error', '驾驶证不能为空')
         return
       }
-      // if (!this.addressUrls.way) {
-      //   EventBus.$emit('error', '道路运营证不能为空')
-      //   return
-      // }
-      // if (!this.addressUrls.qualification) {
-      //   EventBus.$emit('error', '从业资格证不能为空')
-      //   return
-      // }
+      if (!this.addressUrls.way) {
+        this.addressUrls.way='$'
+      }
+      if (!this.addressUrls.qualification) {
+        this.addressUrls.qualification='$'
+      }
       if (!this.addressUrls.identityjust) {
         EventBus.$emit('error', '身份证正面不能为空')
         return
@@ -949,8 +947,13 @@ export default {
         return
       }
       var arr = []
+      var arr1=[]
       for (let key in this.addressUrls) {
-        arr.push(this.addressUrls[key])
+        if(key=='identityjust'||key=='identityagainst'){
+          arr.push(this.addressUrls[key])
+        }else{
+          arr1.push(this.addressUrls[key])
+        }
       }
 
       this.$refs.deptBudgetList.validate((valid) => {
@@ -960,7 +963,8 @@ export default {
             CodeToText[this.selectedOptions[0]]
           this.deptBudgetList.residentCityMunicipal =
             CodeToText[this.selectedOptions[1]]
-          this.deptBudgetList.addressUrl = arr.toString()
+          this.deptBudgetList.addressUrl = arr1.toString()
+          this.deptBudgetList.cardAddressUrl = arr.toString()
           this.deptBudgetList.driverCarInfoList = this.freightspace
           this.deptBudgetList.driverPayeeInfoList = this.freightspace1
           addDriver(this.deptBudgetList)

+ 34 - 9
src/views/tranManagement/tranManagementDriverEdit.vue

@@ -667,15 +667,22 @@ export default {
         .toPromise()
         .then((response) => {
           // this.selectedOptions.push()
-          this.deptBudgetList.addressUrlArray = response.addressUrl.split(',')
-          this.addressUrls.travel = this.deptBudgetList.addressUrlArray[0]
-          this.addressUrls.drive = this.deptBudgetList.addressUrlArray[1]
-          this.addressUrls.way = this.deptBudgetList.addressUrlArray[2]
-          this.addressUrls.qualification =
-            this.deptBudgetList.addressUrlArray[3]
-          this.addressUrls.identityjust = this.deptBudgetList.addressUrlArray[4]
-          this.addressUrls.identityagainst =
-            this.deptBudgetList.addressUrlArray[5]
+          this.deptBudgetList.addressUrlArray = response.cardAddressUrl.split(',')
+           this.deptBudgetList.addressUrlArray1 = response.addressUrl.split(',')
+           this.$set(this.addressUrls, 'travel', this.deptBudgetList.addressUrlArray1[0])
+           this.$set(this.addressUrls, 'drive', this.deptBudgetList.addressUrlArray1[1])
+          if(this.deptBudgetList.addressUrlArray1[2]!='$'){
+            this.$set(this.addressUrls, 'way', this.deptBudgetList.addressUrlArray1[2])
+          }else{
+             this.$set(this.addressUrls, 'way', '')
+          }
+          if(this.deptBudgetList.addressUrlArray1[3]!='$'){
+            this.$set(this.addressUrls, 'qualification', this.deptBudgetList.addressUrlArray1[3])
+          }else{
+            this.$set(this.addressUrls, 'qualification', '')
+          }
+          this.$set(this.addressUrls, 'identityjust', this.deptBudgetList.addressUrlArray[0])
+          this.$set(this.addressUrls, 'identityagainst', this.deptBudgetList.addressUrlArray[1])
 
           for (var i = 0; i < response.driverPayeeInfoList.length; i++) {
             if (response.driverPayeeInfoList[i].cardAddressUrl != null) {
@@ -758,6 +765,7 @@ export default {
         })
     },
     uploadSuccessHandletravel(e) {
+      console.log(e.url)
       this.$set(this.addressUrls, 'travel', e.url)
     },
     uploadSuccessHandledrive(e) {
@@ -865,8 +873,25 @@ export default {
     },
 
     submit() {
+      if (!this.addressUrls.way) {
+        this.addressUrls.way='$'
+      }
+      if (!this.addressUrls.qualification) {
+        this.addressUrls.qualification='$'
+      }
+      var arr = []
+      var arr1=[]
+      for (let key in this.addressUrls) {
+        if(key=='identityjust'||key=='identityagainst'){
+          arr.push(this.addressUrls[key])
+        }else{
+          arr1.push(this.addressUrls[key])
+        }
+      }
       this.$refs.deptBudgetList.validate((valid) => {
         if (valid) {
+          this.deptBudgetList.addressUrl = arr1.toString()
+          this.deptBudgetList.cardAddressUrl = arr.toString()
           this.deptBudgetList.compId = sessionStorage.getItem('ws-pf_compId')
           this.deptBudgetList.residentCityProvincial =
             CodeToText[this.selectedOptions[0]]