@dongkboy преди 3 години
родител
ревизия
0ee576e194
променени са 2 файла, в които са добавени 4 реда и са изтрити 2 реда
  1. 3 1
      src/utils/validate.js
  2. 1 1
      src/views/Letter/Letter.vue

+ 3 - 1
src/utils/validate.js

@@ -162,8 +162,9 @@ export function searchkey(cityName){
 }
 //身份证地址识别
 export function addressCode(address){
-  let rule=/.+?(省|市|自治区|自治州|县|区|城|旗|域|岛|院|划|街道)/g;
+  let rule= /.+?(省|市|自治区|自治州|县|区)/g;
   const targetValues=address.match(rule)
+  // console.log(targetValues)
   const matchedKeys = [];
   for (const key in codeToText) {
     const value = codeToText[key];
@@ -171,6 +172,7 @@ export function addressCode(address){
       matchedKeys.push(key)
     }
   }
+  // console.log(matchedKeys)
   const cityValues = [];
   if(matchedKeys.length<3 && matchedKeys.length!=0){
     let unknown=matchedKeys[1].length==6?'true' : "false";

+ 1 - 1
src/views/Letter/Letter.vue

@@ -3106,7 +3106,7 @@ export default {
       this.totalCompanyList[index].agreementId = "";
       this.totalCompanyList[index].checked = e;
       this.totalCompanyList[index].agreementId = this.totalCompanyList[index].agreement[0].id;
-      if (this.carInfo.licenseNo.slice(0, 2) != '晋A') {
+      if (this.carInfo.licenseNo.slice(0, 2) != '晋A' && ins=='中煤财险') {
         this.totalCompanyList[0].agreementId = this.totalCompanyList[0].agreement[1].id;
       }
       switch (ins) {