Jelajahi Sumber

Merge branch 'master' of http://www.baoxianzhanggui.com:8090/sxzgd/vue-insagent-pc

haizhouwang 2 tahun lalu
induk
melakukan
ae27dede55

+ 1 - 1
config/dev.env.js

@@ -8,7 +8,7 @@ module.exports = merge(prodEnv, {
   BASE_URL: '"http://39.98.239.48/web-api"',//测试服务器
   // BASE_URL:'"http://sxzgkj.baoxianzhanggui.com/web-api"'//正式服务器
   // BASE_URL: '"http://192.168.0.115:8080/"' //凯森
-  // BASE_URL: '"http:///192.168.0.106:8080/"',//田智
+  BASE_URL: '"http:///192.168.0.253:8080/"',//田智
 })
 
 

+ 22 - 3
src/components/VDistpicker/districts.js

@@ -34,6 +34,7 @@ export default {
     710000: '台湾省',
     810000: '香港特别行政区',
     820000: '澳门特别行政区',
+    890000: '海外',
   },
   110000: {
     110100: '北京城区',
@@ -129,6 +130,7 @@ export default {
     130229: '玉田县',
     130281: '遵化市',
     130283: '迁安市',
+    130284: '滦州市',
   },
   130300: {
     130302: '海港区',
@@ -160,9 +162,10 @@ export default {
     130481: '武安市',
   },
   130500: {
-    130502: '桥东区',
-    130503: '桥西区',
-    130521: '邢台县',
+    130502: '襄都区',
+    130503: '信都区',
+    130505: '任泽区',
+    130506: '南和区',
     130522: '临城县',
     130523: '内丘县',
     130524: '柏乡县',
@@ -223,6 +226,8 @@ export default {
     130730: '怀来县',
     130731: '涿鹿县',
     130732: '赤城县',
+    130772: '察北管理区',
+    130773: '塞北管理区',
   },
   130800: {
     130802: '双桥区',
@@ -280,6 +285,11 @@ export default {
     131128: '阜城县',
     131182: '深州市',
   },
+  131200:{
+    131231: '雄县',
+    131232: '容城县',
+    131233: '安新县',
+  },
   140000: {
     140100: '太原市',
     140200: '大同市',
@@ -310,6 +320,9 @@ export default {
     140203: '矿区',
     140211: '南郊区',
     140212: '新荣区',
+    140213: '平城区',
+    140214: '云冈区',
+    140215: '云州区',
     140221: '阳高县',
     140222: '天镇县',
     140223: '广灵县',
@@ -327,6 +340,10 @@ export default {
   },
   140400: {
     140402: '城区',
+    140403: '潞州区',
+    140404: '上党区',
+    140405: '屯留区',
+    140406: '潞城区',
     140411: '郊区',
     140421: '长治县',
     140423: '襄垣县',
@@ -355,9 +372,11 @@ export default {
     140622: '应县',
     140623: '右玉县',
     140624: '怀仁县',
+    140681: '怀仁市',
   },
   140700: {
     140702: '榆次区',
+    140703: '太谷区',
     140721: '榆社县',
     140722: '左权县',
     140723: '和顺县',

+ 15 - 0
src/http/moudules/letter.js

@@ -58,6 +58,21 @@ export const getByCompanyId = (data) => {
         data
     })
 }
+//二维码
+export const getQrCode = (data) => {
+    return axios({
+        url: '/order/qrCode/getQrCode?areaCompanyId='+data,
+        method: 'get',
+    })
+}
+// 销毁二维码
+export const getRevokeQrCode = (data) => {
+    return axios({
+        url: '/order/qrCode/destructionQrCode?areaCompanyId='+data,
+        method: 'post',
+    })
+}
+
 //永安报价
 export const yonganquote = (data) => {
     return axios({

+ 102 - 65
src/views/Letter/Letter.vue

@@ -1124,6 +1124,8 @@
                 @click="Payment(scope.row.id)">付款码</el-button>
                 <el-button size="mini" type="text" v-if="scope.row.orderstatus == '2' && ['紫金财险'].includes(scope.row.inscompany)"
                 @click="cancelorder(scope.row)" style="color:#f56c6c">撤单</el-button>
+              <el-button type="text" size="mini" v-if="scope.row.orderstatus == '2'"  @click="revokeCode(scope.row.id)">撤销二维码</el-button>
+
             </template>
           </el-table-column>
         </el-table>
@@ -1588,10 +1590,11 @@
         <div style="padding:0 20px">
           <div class="ORcode">
             <div style="padding:5px;position: relative;">
-              <div v-show="['永安财险', '人保财险', '永诚财险', '中煤财险','华泰财险', '众安财险', '紫金财险','中国人寿'].includes(inscompany)" id="qrcode"
+              <!-- <div v-show="['永安财险', '人保财险', '永诚财险', '中煤财险','华泰财险', '众安财险', '紫金财险','中国人寿'].includes(inscompany)" id="qrcode"
                 ref="qrcode">
               </div>
-              <img v-show="['恒邦财险','安盛天平','国任财险'].includes(inscompany)" :src="paycodeimg" alt style="width:100%" />
+              <img v-show="['恒邦财险','安盛天平','国任财险'].includes(inscompany)" :src="paycodeimg" alt style="width:100%" /> -->
+              <div id="qrcode"  ref="qrcode"></div>
             </div>
           </div>
         </div>
@@ -5980,6 +5983,19 @@ export default {
           }
         });
       }
+    },
+     // 撤销二维码
+     revokeCode(id){
+      this.$api.letter.getRevokeQrCode(id).then(res => {
+        if(res.code==200){
+          this.$message({
+          message: res.msg,
+          type: 'success'
+        });
+        this.QuotationHistory()
+        }
+      })
+
     },
     //品牌型号查询
     toChooseVehicleType(cartype) {
@@ -6669,72 +6685,93 @@ export default {
       let params = {
         companyId: id
       };
-      this.$api.letter.getByCompanyId(params).then(res => {
-        if (res.code == "200") {
-          const { inscompany, sumpremium, carinfo, insuredname, jqpremium, sypremium, taxamount, jqstartdate, systartdate, applyinfo,jypremium } = res.data;
-          this.inscompany = inscompany; // 保险公司
-          this.sumpremium = sumpremium; // 总价
-          this.licenseNo = carinfo.licenseNo; // 车牌号
-          this.applyName = insuredname; // 车主
-          this.jqpremium = jqpremium; // 交强
-          this.sypremium = sypremium; // 商业
-          this.jypremium = jypremium; // 商业
-          this.taxamount = taxamount; // 车船税
-          this.jqstartdate = jqstartdate; // 交强起保日期
-          this.systartdate = systartdate; // 商业起保日期
-          this.mobile = applyinfo.mobile; // 投保人手机号
-          switch (this.inscompany) {
-            case "永安财险":
-              let url =
-                this.global.h5BaseUrl +
-                "/#/pages/carInsure1/yonganCode?companyId=" +
-                this.companyId +
-                "&mobile=" +
-                this.mobile;
-              this.$nextTick(() => {
-                this.creatQrCode(url);
-              });
-              break;
-            case "人保财险":
-            case "中煤财险":
-            case "华泰财险":
-            case "永诚财险":
-            case "众安财险":
-            case "紫金财险":
-              this.$nextTick(() => {
-                this.creatQrCode(res.data.paymentLink);
-              });
-              break;
-            case "国任财险":
-            this.paycodeimg = res.data.paymentLink;
-              break;
-            case "中国人寿":
-              this.$nextTick(() => {
-                this.creatQrCode(res.data.paymentLink);
+      this.$api.letter.getQrCode(id).then(res => {
+        if (res.code == '200') {
+          this.inscompany = res.data.inscompany;//保险公司
+          this.sumpremium = res.data.sumpremium;//总价
+          this.licenseNo = res.data.cPlateNo;//车牌号
+          this.applyName = res.data.cInsuredNme;//车主
+          this.jqpremium = res.data.jqpremium;//交强
+          this.sypremium = res.data.sypremium;//商业
+          this.taxamount = res.data.taxamount;//车船税
+          this.jypremium = res.data.jypremium;//驾意险
+          this.jqstartdate = res.data.jqstartdate;//交强起保日期
+          this.systartdate = res.data.systartdate;//商业起保日期
+          // this.mobile = res.data.applyinfo.mobile;//投保人手机号
+          this.$nextTick(() => {
+                this.creatQrCode(res.data.qrCodeUrl);
               });
-              break;
-            case "恒邦财险":
-              this.paycodeimg = res.data.paymentLink;
-              break;
-              case "安盛天平":
-              let anresult = res.data.paymentLink.replace(/[\r\n]/g, "");
-              let animgBase64 = `data:image/png;base64,${anresult}`;
-              base64ToPath(animgBase64)
-                .then(path => {
-                  this.paycodeimg = path;
-                })
-              break;
-            default:
-              this.$message({
-                message: "识别不到保险公司,请检查",
-                type: "warning"
-              });
-          }
           this.codedialogVisible = true;
-        } else {
-          this.$message({ message: res.msg, type: "warning" });
+      } else {
+          this.$message({ message: res.msg, type: "warning" })
         }
-      });
+      })
+      // this.$api.letter.getByCompanyId(params).then(res => {
+      //   if (res.code == "200") {
+      //     const { inscompany, sumpremium, carinfo, insuredname, jqpremium, sypremium, taxamount, jqstartdate, systartdate, applyinfo,jypremium } = res.data;
+      //     this.inscompany = inscompany; // 保险公司
+      //     this.sumpremium = sumpremium; // 总价
+      //     this.licenseNo = carinfo.licenseNo; // 车牌号
+      //     this.applyName = insuredname; // 车主
+      //     this.jqpremium = jqpremium; // 交强
+      //     this.sypremium = sypremium; // 商业
+      //     this.jypremium = jypremium; // 商业
+      //     this.taxamount = taxamount; // 车船税
+      //     this.jqstartdate = jqstartdate; // 交强起保日期
+      //     this.systartdate = systartdate; // 商业起保日期
+      //     this.mobile = applyinfo.mobile; // 投保人手机号
+      //     switch (this.inscompany) {
+      //       case "永安财险":
+      //         let url =
+      //           this.global.h5BaseUrl +
+      //           "/#/pages/carInsure1/yonganCode?companyId=" +
+      //           this.companyId +
+      //           "&mobile=" +
+      //           this.mobile;
+      //         this.$nextTick(() => {
+      //           this.creatQrCode(url);
+      //         });
+      //         break;
+      //       case "人保财险":
+      //       case "中煤财险":
+      //       case "华泰财险":
+      //       case "永诚财险":
+      //       case "众安财险":
+      //       case "紫金财险":
+      //         this.$nextTick(() => {
+      //           this.creatQrCode(res.data.paymentLink);
+      //         });
+      //         break;
+      //       case "国任财险":
+      //       this.paycodeimg = res.data.paymentLink;
+      //         break;
+      //       case "中国人寿":
+      //         this.$nextTick(() => {
+      //           this.creatQrCode(res.data.paymentLink);
+      //         });
+      //         break;
+      //       case "恒邦财险":
+      //         this.paycodeimg = res.data.paymentLink;
+      //         break;
+      //         case "安盛天平":
+      //         let anresult = res.data.paymentLink.replace(/[\r\n]/g, "");
+      //         let animgBase64 = `data:image/png;base64,${anresult}`;
+      //         base64ToPath(animgBase64)
+      //           .then(path => {
+      //             this.paycodeimg = path;
+      //           })
+      //         break;
+      //       default:
+      //         this.$message({
+      //           message: "识别不到保险公司,请检查",
+      //           type: "warning"
+      //         });
+      //     }
+      //     this.codedialogVisible = true;
+      //   } else {
+      //     this.$message({ message: res.msg, type: "warning" });
+      //   }
+      // });
     },
     //同步
     synchronization() {

+ 86 - 60
src/views/Letter/Orderlist.vue

@@ -121,6 +121,7 @@
               <el-button size="mini" type="text" @click="OrderDetails(scope.row, item)">查看详情
               </el-button>
               <el-button type="text" size="mini" style="color:rgb(240, 12, 10)"  @click="bjdpreview(item.id)">报价单</el-button>
+              <el-button type="text" size="mini" v-if="item.orderstatus == '2'"  @click="revokeCode(item.id)">撤销二维码</el-button>
               <!-- <el-button size="mini" type="text" @click="CloseEdit(scope.$index, scope.row)">编辑</el-button> -->
 
             </div>
@@ -177,10 +178,12 @@
         <div style="padding:0 20px">
           <div class="ORcode ">
             <div style="padding:5px;position: relative;">
-              <div v-if="['永安财险', '人保财险', '永诚财险', '中煤财险','华泰财险', '众安财险', '紫金财险', '中国人寿'].includes(inscompany)" id="qrcode"
+              <!-- <div v-if="['永安财险', '人保财险', '永诚财险', '中煤财险','华泰财险', '众安财险', '紫金财险', '中国人寿'].includes(inscompany)" id="qrcode"
                 ref="qrcode">
               </div>
-              <img v-if="['恒邦财险', '安盛天平','国任财险'].includes(inscompany)" :src="paycodeimg" alt="" style="width:100%">
+              <img v-if="['恒邦财险', '安盛天平','国任财险'].includes(inscompany)" :src="paycodeimg" alt="" style="width:100%"> -->
+              <div id="qrcode"  ref="qrcode"></div>
+
             </div>
           </div>
         </div>
@@ -1740,6 +1743,19 @@ export default {
         // });
       })
     },
+    // 撤销二维码
+    revokeCode(id){
+      this.$api.letter.getRevokeQrCode(id).then(res => {
+        if(res.code==200){
+          this.$message({
+          message: res.msg,
+          type: 'success'
+        });
+        this.findPage()
+        }
+      })
+
+    },
     bjdpreview(companyId) {
       let params = {
         companyId: companyId
@@ -2078,66 +2094,88 @@ export default {
       let params = {
         companyId: item.id,
       }
-      this.$api.letter.getByCompanyId(params).then(res => {
+      
+      this.$api.letter.getQrCode(item.id).then(res => {
         if (res.code == '200') {
           this.inscompany = res.data.inscompany;//保险公司
           this.sumpremium = res.data.sumpremium;//总价
-          this.licenseNo = res.data.carinfo.licenseNo;//车牌号
-          this.applyName = res.data.insuredname;//车主
+          this.licenseNo = res.data.cPlateNo;//车牌号
+          this.applyName = res.data.cInsuredNme;//车主
           this.jqpremium = res.data.jqpremium;//交强
           this.sypremium = res.data.sypremium;//商业
           this.taxamount = res.data.taxamount;//车船税
           this.jypremium = res.data.jypremium;//驾意险
           this.jqstartdate = res.data.jqstartdate;//交强起保日期
           this.systartdate = res.data.systartdate;//商业起保日期
-          this.mobile = res.data.applyinfo.mobile;//投保人手机号
-          switch (item.inscompany) {
-            case "永安财险":
-              let url = this.global.h5BaseUrl + '/#/pages/carInsure1/yonganCode?companyId=' + item.id + '&mobile=' + this.mobile;
-              this.$nextTick(() => {
-                this.creatQrCode(url);
-              });
-              break;
-            case "人保财险":
-            case "中煤财险":
-            case "华泰财险":
-            case "永诚财险":
-            case "紫金财险":
-              this.$nextTick(() => {
-                this.creatQrCode(res.data.paymentLink);
-              });
-              break;
-            case "众安财险":
-            this.paycodeimg = res.data.paymentLink;
-              break;
-            case "中国人寿":
-              this.$nextTick(() => {
-                this.creatQrCode(res.data.paymentLink);
+          // this.mobile = res.data.applyinfo.mobile;//投保人手机号
+          this.$nextTick(() => {
+                this.creatQrCode(res.data.qrCodeUrl);
               });
-              break;
-            case "恒邦财险":
-              this.paycodeimg = res.data.paymentLink;
-              break;
-            case "国任财险":
-            this.paycodeimg = res.data.paymentLink;
-              break;
-            case "安盛天平":
-              let anresult = res.data.paymentLink.replace(/[\r\n]/g, "");
-              let animgBase64 = `data:image/png;base64,${anresult}`;
-              base64ToPath(animgBase64)
-                .then(path => {
-                  this.paycodeimg = path;
-                })
-              break;
-            default:
-              this.$message({ message: "识别不到保险公司,请检查", type: "warning" })
-          }
           this.codedialogVisible = true;
-
-        } else {
+      } else {
           this.$message({ message: res.msg, type: "warning" })
         }
       })
+      // this.$api.letter.getByCompanyId(params).then(res => {
+      //   if (res.code == '200') {
+      //     this.inscompany = res.data.inscompany;//保险公司
+      //     this.sumpremium = res.data.sumpremium;//总价
+      //     this.licenseNo = res.data.carinfo.licenseNo;//车牌号
+      //     this.applyName = res.data.insuredname;//车主
+      //     this.jqpremium = res.data.jqpremium;//交强
+      //     this.sypremium = res.data.sypremium;//商业
+      //     this.taxamount = res.data.taxamount;//车船税
+      //     this.jypremium = res.data.jypremium;//驾意险
+      //     this.jqstartdate = res.data.jqstartdate;//交强起保日期
+      //     this.systartdate = res.data.systartdate;//商业起保日期
+      //     this.mobile = res.data.applyinfo.mobile;//投保人手机号
+      //     switch (item.inscompany) {
+      //       case "永安财险":
+      //         let url = this.global.h5BaseUrl + '/#/pages/carInsure1/yonganCode?companyId=' + item.id + '&mobile=' + this.mobile;
+      //         this.$nextTick(() => {
+      //           this.creatQrCode(url);
+      //         });
+      //         break;
+      //       case "人保财险":
+      //       case "中煤财险":
+      //       case "华泰财险":
+      //       case "永诚财险":
+      //       case "紫金财险":
+      //         this.$nextTick(() => {
+      //           this.creatQrCode(res.data.paymentLink);
+      //         });
+      //         break;
+      //       case "众安财险":
+      //       this.paycodeimg = res.data.paymentLink;
+      //         break;
+      //       case "中国人寿":
+      //         this.$nextTick(() => {
+      //           this.creatQrCode(res.data.paymentLink);
+      //         });
+      //         break;
+      //       case "恒邦财险":
+      //         this.paycodeimg = res.data.paymentLink;
+      //         break;
+      //       case "国任财险":
+      //       this.paycodeimg = res.data.paymentLink;
+      //         break;
+      //       case "安盛天平":
+      //         let anresult = res.data.paymentLink.replace(/[\r\n]/g, "");
+      //         let animgBase64 = `data:image/png;base64,${anresult}`;
+      //         base64ToPath(animgBase64)
+      //           .then(path => {
+      //             this.paycodeimg = path;
+      //           })
+      //         break;
+      //       default:
+      //         this.$message({ message: "识别不到保险公司,请检查", type: "warning" })
+      //     }
+      //     this.codedialogVisible = true;
+
+      //   } else {
+      //     this.$message({ message: res.msg, type: "warning" })
+      //   }
+      // })
 
     },
     //应用详情
@@ -2609,18 +2647,6 @@ export default {
         }
       });
     },
-    beforeAvatarUpload(file) {
-      const isJPG = file.type === "image/jpeg" || file.type === "image/png";
-      // const isLt2M = file.size / 1024 / 1024 < 0.2;
-      if (!isJPG) {
-        this.$message({
-          message: "上传图片只能是 JPG 或者 PNG 格式!",
-          type: "error",
-          duration: 2000,
-        });
-      }
-      return isJPG;
-    },
     handleClose(done) {
       this.$confirm("确认关闭?")
         .then((_) => {