Переглянути джерело

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

haizhouwang 2 роки тому
батько
коміт
4656c56c9c
3 змінених файлів з 88 додано та 29 видалено
  1. 2 2
      config/dev.env.js
  2. 60 21
      src/views/Letter/Letter.vue
  3. 26 6
      src/views/Letter/Orderlist.vue

+ 2 - 2
config/dev.env.js

@@ -5,9 +5,9 @@ const prodEnv = require('./prod.env')
 module.exports = merge(prodEnv, {
 module.exports = merge(prodEnv, {
   NODE_ENV: '"development"',
   NODE_ENV: '"development"',
   ENV_CONFIG:'"dev"',
   ENV_CONFIG:'"dev"',
-  // BASE_URL: '"http://39.98.239.48/web-api"',//测试服务器
+  BASE_URL: '"http://39.98.239.48/web-api"',//测试服务器
   // BASE_URL:'"http://sxzgkj.baoxianzhanggui.com/web-api"'//正式服务器
   // BASE_URL:'"http://sxzgkj.baoxianzhanggui.com/web-api"'//正式服务器
-  BASE_URL: '"http://192.168.0.115:8080/"' //凯森
+  // BASE_URL: '"http://192.168.0.115:8080/"' //凯森
 })
 })
 
 
 
 

+ 60 - 21
src/views/Letter/Letter.vue

@@ -339,7 +339,7 @@
               <el-select v-model="policyHolderInfo.identifyType" placeholder="身份证" disabled>
               <el-select v-model="policyHolderInfo.identifyType" placeholder="身份证" disabled>
                 <el-option label="身份证" value="01"></el-option>
                 <el-option label="身份证" value="01"></el-option>
               </el-select>
               </el-select>
-              
+
             </el-form-item>
             </el-form-item>
           </el-col>
           </el-col>
           <el-col :xs="xscell" :sm="smcell" :md="mdcell" :lg="lgcell" :xl="xlcell">
           <el-col :xs="xscell" :sm="smcell" :md="mdcell" :lg="lgcell" :xl="xlcell">
@@ -1097,6 +1097,8 @@
                 @click="bjdpreview(scope.row.id)">报价单</el-button>
                 @click="bjdpreview(scope.row.id)">报价单</el-button>
               <el-button size="small" v-show="scope.row.orderstatus == '2'" type="text" style="color:rgb(240, 12, 10)"
               <el-button size="small" v-show="scope.row.orderstatus == '2'" type="text" style="color:rgb(240, 12, 10)"
                 @click="Payment(scope.row.id)">付款码</el-button>
                 @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>
             </template>
             </template>
           </el-table-column>
           </el-table-column>
         </el-table>
         </el-table>
@@ -1130,9 +1132,9 @@
             车船税:
             车船税:
             <span>¥{{ queryOrders.taxamount }}</span>
             <span>¥{{ queryOrders.taxamount }}</span>
           </div>
           </div>
-          <div v-if="queryOrders.accidentInfo">
+          <div v-if="queryOrders.jypremium">
             驾意险:
             驾意险:
-            <span>¥{{ queryOrders.accidentInfo.sumPremium }}</span>
+            <span>¥{{ queryOrders.jypremium }}</span>
           </div>
           </div>
           <div v-show="queryOrders.jqstartdate">
           <div v-show="queryOrders.jqstartdate">
             交强险起保日期:
             交强险起保日期:
@@ -1274,18 +1276,27 @@
           </div>
           </div>
         </div>
         </div>
       </div>
       </div>
-      <div class="Enclosure" v-if="queryOrders.accidentInfo">
+      <div class="Enclosure" v-if="queryOrders.accidentInfo&&queryOrders.accidentInfo.length>0">
         <div class="home flex j-s a-c back">
         <div class="home flex j-s a-c back">
           <div class="flex j-s a-c color">
           <div class="flex j-s a-c color">
             <img src="../../../src/icon/company.png" alt class="icon-img" />
             <img src="../../../src/icon/company.png" alt class="icon-img" />
             <span style="margin-left:10px;">驾意险</span>
             <span style="margin-left:10px;">驾意险</span>
           </div>
           </div>
         </div>
         </div>
-        <el-descriptions size="small">
-          <el-descriptions-item label="产品">{{ queryOrders.accidentInfo.rideRiskName }}</el-descriptions-item>
-          <el-descriptions-item label="份数">{{ queryOrders.accidentInfo.quantity }}</el-descriptions-item>
-          <el-descriptions-item label="价格">{{ queryOrders.accidentInfo.unitPremium }}/份</el-descriptions-item>
-        </el-descriptions>
+        <div style="font-size:12px"  >
+          <div class="jyxStyle" style=" font-weight: bold;color: #333;">
+            <span style="width:50%;margin-left:50px">产品</span>
+            <span style="width:20%">份数</span>
+            <span style="width:20%">价格</span>
+          </div>
+          <div  v-for="(kindinfoitem, kindinfoindex) in queryOrders.accidentInfo" :key="kindinfoindex">
+            <div style="margin-top:20px" class="jyxStyle">
+              <span style="width:50%;margin-left:50px">{{ kindinfoitem.projectName }}</span>
+              <span style="width:20%">{{ kindinfoitem.quantity ?kindinfoitem.quantity:'1' }}</span>
+              <span style="width:20%">{{ kindinfoitem.actualPremium}}/份</span>
+            </div>
+          </div>
+        </div>
       </div>
       </div>
       <div class="Enclosure" v-if="queryOrders">
       <div class="Enclosure" v-if="queryOrders">
         <div class="home flex j-s a-c back">
         <div class="home flex j-s a-c back">
@@ -1580,6 +1591,10 @@
             <span>交强:</span>
             <span>交强:</span>
             <span>{{ jqpremium }}</span>
             <span>{{ jqpremium }}</span>
           </div>
           </div>
+          <div v-if="jypremium">
+            <span>驾意:</span>
+            <span>{{ jypremium }}</span>
+          </div>
           <div v-show="sypremium">
           <div v-show="sypremium">
             <span>商业:</span>
             <span>商业:</span>
             <span>{{ sypremium }}</span>
             <span>{{ sypremium }}</span>
@@ -3113,6 +3128,7 @@ export default {
       sumpremium: "", //保费合计
       sumpremium: "", //保费合计
       jqpremium: "", //交强
       jqpremium: "", //交强
       sypremium: "", //商业
       sypremium: "", //商业
+      jypremium:'',//驾意险
       taxamount: "", //车船税
       taxamount: "", //车船税
       jqstartdate: "", //交强时间
       jqstartdate: "", //交强时间
       systartdate: "", //商业时间
       systartdate: "", //商业时间
@@ -3406,6 +3422,7 @@ export default {
       };
       };
       this.$api.letter.queryQuoteHistory(params).then(res => {
       this.$api.letter.queryQuoteHistory(params).then(res => {
         res.data.forEach(item => {
         res.data.forEach(item => {
+          item.accidentInfo.constructor=== Object?[res.data.accidentInfo]:res.data.accidentInfo
           item.username = this.paramsEdit.username+'('+this.paramsEdit.userid+')'
           item.username = this.paramsEdit.username+'('+this.paramsEdit.userid+')'
         })
         })
         this.HistoryList = res.data;
         this.HistoryList = res.data;
@@ -3577,7 +3594,7 @@ export default {
       this.systartDate=item.startDateSy?item.startDateSy:this.systartDate
       this.systartDate=item.startDateSy?item.startDateSy:this.systartDate
       this.syendDate=item.endDateSy?item.endDateSy:this.syendDate
       this.syendDate=item.endDateSy?item.endDateSy:this.syendDate
     },
     },
-  
+
     //纳税类型事件
     //纳税类型事件
     taxRelifFlagChange(val){
     taxRelifFlagChange(val){
       if (val == 4) {
       if (val == 4) {
@@ -3792,6 +3809,7 @@ export default {
       };
       };
       this.$api.letter.queryQuoteHistory(params).then(res => {
       this.$api.letter.queryQuoteHistory(params).then(res => {
         res.data.forEach(item => {
         res.data.forEach(item => {
+          item.accidentInfo.constructor=== Object?[res.data.accidentInfo]:res.data.accidentInfo
           item.username = this.paramsEdit.username+'('+this.paramsEdit.userid+')'
           item.username = this.paramsEdit.username+'('+this.paramsEdit.userid+')'
         })
         })
         this.HistoryList = res.data;
         this.HistoryList = res.data;
@@ -4298,6 +4316,7 @@ export default {
       };
       };
       this.$api.letter.queryQuoteHistory(params).then(res => {
       this.$api.letter.queryQuoteHistory(params).then(res => {
         res.data.forEach(item => {
         res.data.forEach(item => {
+          item.accidentInfo.constructor=== Object?[res.data.accidentInfo]:res.data.accidentInfo
           item.username = this.paramsEdit.username+'('+this.paramsEdit.userid+')'
           item.username = this.paramsEdit.username+'('+this.paramsEdit.userid+')'
         })
         })
         this.HistoryList = res.data;
         this.HistoryList = res.data;
@@ -4825,7 +4844,7 @@ export default {
         agreementId: this.totalCompanyList[num].agreementId,
         agreementId: this.totalCompanyList[num].agreementId,
       };
       };
       this.$api.letter.guorenquote(params).then(res => {
       this.$api.letter.guorenquote(params).then(res => {
-      
+
         this.totalCompanyList[num].msg = res.msg;
         this.totalCompanyList[num].msg = res.msg;
         if (!!res.msg && res.msg.indexOf("不存在有效协议") >= 0) {
         if (!!res.msg && res.msg.indexOf("不存在有效协议") >= 0) {
           this.totalCompanyList[num].quoteCode = "4";
           this.totalCompanyList[num].quoteCode = "4";
@@ -5209,6 +5228,17 @@ export default {
     imageUpload() {
     imageUpload() {
       this.imageUploaddialogVisible = true;
       this.imageUploaddialogVisible = true;
     },
     },
+    cancelorder(item) {
+      this.$api.letter.zijincancelorder({ companyId: item.id }).then(res => {
+        if(res.code==200){
+          this.$message({
+          message: res.msg,
+          type: 'success'
+        });
+        this.QuotationHistory()
+        }
+      })
+    },
     imageEcho(quotenos) {
     imageEcho(quotenos) {
       //影像查询
       //影像查询
       this.$api.letter.findByQuoteNo(quotenos)
       this.$api.letter.findByQuoteNo(quotenos)
@@ -5529,6 +5559,7 @@ export default {
                           loading.close();
                           loading.close();
                           _this.$message({
                           _this.$message({
                             showClose: true,
                             showClose: true,
+                            dangerouslyUseHTMLString: true,
                             message: this.queryOrders.inscompany + "提核--:" + res.msg,
                             message: this.queryOrders.inscompany + "提核--:" + res.msg,
                             type: "error",
                             type: "error",
                             duration: 0
                             duration: 0
@@ -5950,7 +5981,7 @@ export default {
         this.carInfo.transferDate=""
         this.carInfo.transferDate=""
       }
       }
     },
     },
-   
+
     //影像上传
     //影像上传
     drivingupload(file, imageIdList, imgurl, type) {
     drivingupload(file, imageIdList, imgurl, type) {
       let that=this
       let that=this
@@ -5970,7 +6001,7 @@ export default {
       let name=file.raw.name
       let name=file.raw.name
       var image = new Image();
       var image = new Image();
       image.src = window.URL.createObjectURL(file.raw);
       image.src = window.URL.createObjectURL(file.raw);
-      that.carfrontImg =  image.src 
+      that.carfrontImg =  image.src
       image.onload = function(){
       image.onload = function(){
         let aaa= that.base64ToFile(that.compress(image, 500, 400, 0.7),name)
         let aaa= that.base64ToFile(that.compress(image, 500, 400, 0.7),name)
       const params = new FormData()
       const params = new FormData()
@@ -6039,12 +6070,12 @@ export default {
         });
         });
       }
       }
     },
     },
-      compress(img, width, height, ratio) {                
+      compress(img, width, height, ratio) {
           var canvas, ctx, img64;
           var canvas, ctx, img64;
-          canvas = document.createElement('canvas');                
+          canvas = document.createElement('canvas');
           canvas.width = width;
           canvas.width = width;
           canvas.height = height;
           canvas.height = height;
-          ctx = canvas.getContext("2d");                
+          ctx = canvas.getContext("2d");
           ctx.drawImage(img, 0, 0, width, height);
           ctx.drawImage(img, 0, 0, width, height);
           img64 = canvas.toDataURL("image/jpeg", ratio);
           img64 = canvas.toDataURL("image/jpeg", ratio);
           return img64;
           return img64;
@@ -6081,9 +6112,10 @@ export default {
       let name=file.raw.name
       let name=file.raw.name
       var image = new Image();
       var image = new Image();
       image.src = window.URL.createObjectURL(file.raw);
       image.src = window.URL.createObjectURL(file.raw);
-      that.carfrontImg =  image.src 
+      that.carfrontImg =  image.src
       image.onload = function(){
       image.onload = function(){
         let aaa= that.base64ToFile(that.compress(image, 500, 400, 0.7),name)
         let aaa= that.base64ToFile(that.compress(image, 500, 400, 0.7),name)
+
       that.carfrontImg = image.src;
       that.carfrontImg = image.src;
       const params = new FormData(); // 声明formData数据类型
       const params = new FormData(); // 声明formData数据类型
       params.append("multipartFile", aaa);
       params.append("multipartFile", aaa);
@@ -6611,13 +6643,14 @@ export default {
       };
       };
       this.$api.letter.getByCompanyId(params).then(res => {
       this.$api.letter.getByCompanyId(params).then(res => {
         if (res.code == "200") {
         if (res.code == "200") {
-          const { inscompany, sumpremium, carinfo, insuredname, jqpremium, sypremium, taxamount, jqstartdate, systartdate, applyinfo } = res.data;
+          const { inscompany, sumpremium, carinfo, insuredname, jqpremium, sypremium, taxamount, jqstartdate, systartdate, applyinfo,jypremium } = res.data;
           this.inscompany = inscompany; // 保险公司
           this.inscompany = inscompany; // 保险公司
           this.sumpremium = sumpremium; // 总价
           this.sumpremium = sumpremium; // 总价
           this.licenseNo = carinfo.licenseNo; // 车牌号
           this.licenseNo = carinfo.licenseNo; // 车牌号
           this.applyName = insuredname; // 车主
           this.applyName = insuredname; // 车主
           this.jqpremium = jqpremium; // 交强
           this.jqpremium = jqpremium; // 交强
           this.sypremium = sypremium; // 商业
           this.sypremium = sypremium; // 商业
+          this.jypremium = jypremium; // 商业
           this.taxamount = taxamount; // 车船税
           this.taxamount = taxamount; // 车船税
           this.jqstartdate = jqstartdate; // 交强起保日期
           this.jqstartdate = jqstartdate; // 交强起保日期
           this.systartdate = systartdate; // 商业起保日期
           this.systartdate = systartdate; // 商业起保日期
@@ -6670,7 +6703,7 @@ export default {
       // //上传图片
       // //上传图片
       const mergedArray = [...this.imageList1, ...this.imageList2, ...this.imageList3, ...this.imageList4];
       const mergedArray = [...this.imageList1, ...this.imageList2, ...this.imageList3, ...this.imageList4];
       let imageparam = {
       let imageparam = {
-        imageList: mergedArray, 
+        imageList: mergedArray,
         quoteNo: this.quoteno
         quoteNo: this.quoteno
       }
       }
       this.$api.letter.uploadImages(imageparam).then(responses => {
       this.$api.letter.uploadImages(imageparam).then(responses => {
@@ -7520,6 +7553,10 @@ export default {
       margin-top: 0
       margin-top: 0
   }
   }
 }
 }
+.jyxStyle>span{
+  display: inline-block;
+  text-align: center;
+}
 /* 清除图片上传动画bug */
 /* 清除图片上传动画bug */
 /deep/ {
 /deep/ {
   .el-upload-list__item {
   .el-upload-list__item {
@@ -7558,7 +7595,7 @@ export default {
   .el-upload-list__item {
   .el-upload-list__item {
     width: 198px;
     width: 198px;
     height: 128px;
     height: 128px;
-    margin: 0 !important; 
+    margin: 0 !important;
     display: block !important;
     display: block !important;
   }
   }
 
 
@@ -7639,4 +7676,6 @@ export default {
     }
     }
   }
   }
 
 
-}</style>
+}
+
+</style>

+ 26 - 6
src/views/Letter/Orderlist.vue

@@ -184,6 +184,10 @@
             <span>交强:</span>
             <span>交强:</span>
             <span>{{ jqpremium }}</span>
             <span>{{ jqpremium }}</span>
           </div>
           </div>
+          <div v-if="jypremium">
+            <span>驾意:</span>
+            <span>{{ jypremium }}</span>
+          </div>
           <div v-if="sypremium">
           <div v-if="sypremium">
             <span>商业:</span>
             <span>商业:</span>
             <span>{{ sypremium }}</span>
             <span>{{ sypremium }}</span>
@@ -382,18 +386,27 @@
           </div>
           </div>
         </div>
         </div>
       </div>
       </div>
-      <div class="Enclosure" v-if="orderInfo.accidentInfo">
+      <div class="Enclosure" v-if="orderInfo.accidentInfo&&orderInfo.accidentInfo.length>0">
         <div class="home flex j-s a-c back">
         <div class="home flex j-s a-c back">
           <div class="flex j-s a-c color">
           <div class="flex j-s a-c color">
             <img src="../../../src/icon/company.png" alt class="icon-img" />
             <img src="../../../src/icon/company.png" alt class="icon-img" />
             <span style="margin-left:10px;">驾意险</span>
             <span style="margin-left:10px;">驾意险</span>
           </div>
           </div>
         </div>
         </div>
-        <el-descriptions size="small">
-          <el-descriptions-item label="产品">{{ orderInfo.accidentInfo.rideRiskName }}</el-descriptions-item>
-          <el-descriptions-item label="份数">{{ orderInfo.accidentInfo.quantity }}</el-descriptions-item>
-          <el-descriptions-item label="价格">{{ orderInfo.accidentInfo.unitPremium }}/份</el-descriptions-item>
-        </el-descriptions>
+        <div style="font-size:12px"  >
+          <div class="jyxStyle" style=" font-weight: bold;color: #333;">
+            <span style="width:50%;margin-left:50px">产品</span>
+            <span style="width:20%">份数</span>
+            <span style="width:20%">价格</span>
+          </div>
+          <div  v-for="(kindinfoitem, kindinfoindex) in orderInfo.accidentInfo" :key="kindinfoindex">
+            <div style="margin-top:20px" class="jyxStyle">
+              <span style="width:50%;margin-left:50px">{{ kindinfoitem.projectName }}</span>
+              <span style="width:20%">{{ kindinfoitem.quantity ?kindinfoitem.quantity:'1' }}</span>
+              <span style="width:20%">{{ kindinfoitem.actualPremium}}/份</span>
+            </div>
+          </div>
+        </div>
       </div>
       </div>
       <div class="Enclosure" v-if="orderInfo">
       <div class="Enclosure" v-if="orderInfo">
         <div class="home flex j-s a-c back">
         <div class="home flex j-s a-c back">
@@ -1574,6 +1587,7 @@ export default {
       jqpremium: "",//交强
       jqpremium: "",//交强
       sypremium: "",//商业
       sypremium: "",//商业
       taxamount: "",//车船税
       taxamount: "",//车船税
+      jypremium:"",//驾意险
       jqstartdate: "",//交强时间
       jqstartdate: "",//交强时间
       systartdate: "",//商业时间
       systartdate: "",//商业时间
       mobile: "",//投保人手机号
       mobile: "",//投保人手机号
@@ -1952,6 +1966,7 @@ export default {
           this.jqpremium = res.data.jqpremium;//交强
           this.jqpremium = res.data.jqpremium;//交强
           this.sypremium = res.data.sypremium;//商业
           this.sypremium = res.data.sypremium;//商业
           this.taxamount = res.data.taxamount;//车船税
           this.taxamount = res.data.taxamount;//车船税
+          this.jypremium = res.data.jypremium;//驾意险
           this.jqstartdate = res.data.jqstartdate;//交强起保日期
           this.jqstartdate = res.data.jqstartdate;//交强起保日期
           this.systartdate = res.data.systartdate;//商业起保日期
           this.systartdate = res.data.systartdate;//商业起保日期
           this.mobile = res.data.applyinfo.mobile;//投保人手机号
           this.mobile = res.data.applyinfo.mobile;//投保人手机号
@@ -2020,6 +2035,7 @@ export default {
         if (res.code == 200) {
         if (res.code == 200) {
           this.licenseNo = res.data.licenseno;//车牌号
           this.licenseNo = res.data.licenseno;//车牌号
           this.inscompany = res.data.inscompany;//保险公司
           this.inscompany = res.data.inscompany;//保险公司
+          res.data.accidentInfo.constructor === Object?[res.data.accidentInfo]:res.data.accidentInfo
           Object.assign(this.orderInfo, res.data);
           Object.assign(this.orderInfo, res.data);
           for (let i = 0; i < this.orderInfo.riskinfo.length; i++) {
           for (let i = 0; i < this.orderInfo.riskinfo.length; i++) {
             if (this.orderInfo.riskinfo[i].riskCode == "0510") {
             if (this.orderInfo.riskinfo[i].riskCode == "0510") {
@@ -3073,4 +3089,8 @@ export default {
 .Risk_title>div :nth-child(3) {
 .Risk_title>div :nth-child(3) {
   border-top-right-radius: 10px;
   border-top-right-radius: 10px;
 }
 }
+.jyxStyle>span{
+  display: inline-block;
+  text-align: center;
+}
 </style>
 </style>