Parcourir la source

1.organizationSource字段为3时,选用专用报价单和二维码页面
2.机构页面,渠道字段改为字典下拉

lihongxiao il y a 2 ans
Parent
commit
e753dbe451

+ 2 - 2
config/dev.env.js

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

+ 67 - 5
src/views/Letter/Letter.vue

@@ -2110,7 +2110,7 @@
         <el-table-column prop="remark" label="配置" align="center"></el-table-column>
       </el-table>
     </el-dialog>
-
+    <!--第一种 二维码 -->
     <el-dialog
       :visible.sync="codedialogVisible"
       width="430px"
@@ -2181,6 +2181,38 @@
         <el-button size="small" style="width:100px;border-color:#D42426;color:#D42426 " @click="codedialogVisible = false">关闭</el-button>
 
       </span>
+    </el-dialog>
+     <!--第二种 二维码 -->
+     <el-dialog
+      :visible.sync="codedialogVisiblePro"
+      width="660px"
+      class="proSaomazhifucodeClass"
+      top="10vh"
+      title="扫码付款"
+    >
+      <div class="flex j-s" >
+       <div class="scan-code">
+          <div style="font-weight: bold;">总金额:<span style="color:#2D4D89 ">{{ sumpremium }}</span></div>
+          <div>交强险:{{ jqpremium }}</div>
+          <div>车船税:{{ taxamount }}</div>
+          <div>商业险:{{ sypremium }}</div>
+          <div>非车险:{{ jypremium }}</div>
+       </div>
+        <div >
+          <img v-if="['太平财险'].includes(inscompany)" :src="paycodeimg" alt="" style="width:100%">
+          <div  v-else id="qrcode"  ref="qrcode"></div>
+        </div>
+        <div class="scan-code">
+          <div>保险公司:{{ inscompany }}</div>
+          <div>车牌号:{{ licenseNo }}</div>
+          <div>投保人:{{ applyName }}</div>
+          <div>交强险起保日期:{{ jqstartdate }}</div>
+          <div>商业险起保日期:{{ systartdate }}</div>
+       </div>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button  size="small" style="width:100px;background: #EAEDF1;border-color:#EAEDF1;color:#2D4D89 " @click="codedialogVisiblePro = false">关闭</el-button>
+      </span>
     </el-dialog>
     <el-dialog
       :visible.sync="uploadcardialogVisible"
@@ -3049,6 +3081,7 @@
     </el-dialog>
       <!-- 报价单 -->
       <quotationDialog ref="quotationDialog" :queryOrders="queryOrders"></quotationDialog>
+      <quotationDialogPro ref="quotationDialogPro" :queryOrders="queryOrders"></quotationDialogPro>
     <el-image-viewer
       v-if="showViewer"
       :on-close="closeViewer"
@@ -3070,6 +3103,7 @@ import {
   base64ToPath
 } from '@/common/image-tools-base64.js';
 import quotationDialog from './components/quotationDialog.vue'
+import quotationDialogPro from './components/quotationDialogPro.vue'
 import detailsDialog from './components/detailsDialog.vue'
 
 export default {
@@ -3111,6 +3145,8 @@ export default {
 
     }
     return {
+      qrcodeWidth:'180',
+      qrcodeHeight:'180',
       activeName:'1',
       isTaxSourceModel:'',
       tabLiIndex:0,
@@ -3279,6 +3315,7 @@ export default {
       chexingdialogVisible: false, //车型选择     显示/隐藏
       sbdmdialogVisible: false, //车型车辆识别代码选择     显示/隐藏
       codedialogVisible: false, //二维码     显示/隐藏
+      codedialogVisiblePro: false,
       uploadcardialogVisible: false, //行驶证识别     显示/隐藏
       uploaduserdialogVisible: false, //身份证识别     显示/隐藏
       imageUploaddialogVisible: false, //影像上传     显示/隐藏
@@ -4467,6 +4504,7 @@ export default {
   components: {
     detailsDialog,
   quotationDialog,
+  quotationDialogPro,
     "el-image-viewer": () =>
       import("element-ui/packages/image/src/image-viewer")
   },
@@ -5637,8 +5675,8 @@ else{
       } else {
         this.qrcode = new QRCode("qrcode", {
           text: text,
-          width: 180,
-          height: 180,
+          width: this.qrcodeWidth,
+          height: this.qrcodeHeight ,
           colorDark: "#000000",
           colorLight: "#ffffff",
           correctLevel: QRCode.CorrectLevel.H
@@ -8197,7 +8235,12 @@ else{
           }
           data.logoImg = this.iconfftter(res.data.inscompany);
           this.queryOrders = data;
-          this.$refs.quotationDialog.setBackupVisible(true)
+          if(this.$store.state.user.roles.managementSource&&this.$store.state.user.roles.managementSource=='3'){
+            this.$refs.quotationDialogPro.setBackupVisible(true)
+          }
+          else{
+            this.$refs.quotationDialog.setBackupVisible(true)
+          }
         }
       });
     },
@@ -8230,7 +8273,14 @@ else{
                 this.creatQrCode(res.data.qrCodeUrl);
               }
               });
-          this.codedialogVisible = true;
+              if(this.$store.state.user.roles.managementSource&&this.$store.state.user.roles.managementSource=='3'){
+                this.codedialogVisiblePro = true;
+                this.qrcodeWidth='154'
+                this.qrcodeHeight='154'
+              }
+              else{
+                this.codedialogVisible = true;
+              }
       } else {
           this.$message({ message: res.msg, type: "warning" })
         }
@@ -8856,8 +8906,20 @@ else{
       border-right: 2px solid var(--themeColor);
       color: var(--themeColor);
 }
+.scan-code{
+  div{
+    margin-top: 10px;
+  }
+}
 /* 清除图片上传动画bug */
 /deep/ {
+  .proSaomazhifucodeClass .el-dialog__header{
+    background: rgba(45,77,137,0.1);
+    font-weight: bold;
+  }
+  .proSaomazhifucodeClass .el-dialog__footer{
+    border-top:1px solid #EEF1F6 ;
+  }
   .el-upload-list__item {
     transition: none !important;
   }

+ 67 - 7
src/views/Letter/Orderlist.vue

@@ -399,6 +399,7 @@
         :total="totalSize"
       ></el-pagination>
     </div>
+    <!--第一种 二维码 -->
     <el-dialog
       :visible.sync="codedialogVisible"
       width="430px"
@@ -462,6 +463,38 @@
         <el-button  size="small" style="width:100px;border-color:#D42426;color:#D42426 " @click="codedialogVisible = false">关闭</el-button>
       </span>
     </el-dialog>
+    <!--第二种 二维码 -->
+    <el-dialog
+      :visible.sync="codedialogVisiblePro"
+      width="660px"
+      class="proSaomazhifucodeClass"
+      top="10vh"
+      title="扫码付款"
+    >
+      <div class="flex j-s" >
+       <div class="scan-code">
+          <div style="font-weight: bold;">总金额:<span style="color:#2D4D89 ">{{ sumpremium }}</span></div>
+          <div>交强险:{{ jqpremium }}</div>
+          <div>车船税:{{ taxamount }}</div>
+          <div>商业险:{{ sypremium }}</div>
+          <div>非车险:{{ jypremium }}</div>
+       </div>
+        <div >
+          <img v-if="['太平财险'].includes(inscompany)" :src="paycodeimg" alt="" style="width:100%">
+          <div  v-else id="qrcode"  ref="qrcode"></div>
+        </div>
+        <div class="scan-code">
+          <div>保险公司:{{ inscompany }}</div>
+          <div>车牌号:{{ licenseNo }}</div>
+          <div>投保人:{{ applyName }}</div>
+          <div>交强险起保日期:{{ jqstartdate }}</div>
+          <div>商业险起保日期:{{ systartdate }}</div>
+       </div>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button  size="small" style="width:100px;background: #EAEDF1;border-color:#EAEDF1;color:#2D4D89 " @click="codedialogVisiblePro = false">关闭</el-button>
+      </span>
+    </el-dialog>
     <!-- 车辆报价新页面 -->
     <detailsDialog ref="detailsDialog" :orderInfo="orderInfo"></detailsDialog>
     <!-- 订单轨迹 -->
@@ -630,6 +663,7 @@
     </el-dialog>
     <!-- 报价单 -->
     <quotationDialog ref="quotationDialog" :queryOrders="queryOrders"></quotationDialog>
+    <quotationDialogPro ref="quotationDialogPro" :queryOrders="queryOrders"></quotationDialogPro>
   </div>
 </template>
 <script>
@@ -639,10 +673,13 @@ import CommonUtil from "@/utils/comutil.js";
 import Cookies from "js-cookie";
 import QRCode from "qrcodejs2";
 import quotationDialog from './components/quotationDialog.vue'
+import quotationDialogPro from './components/quotationDialogPro.vue'
 import detailsDialog from './components/detailsDialog.vue'
 export default {
   data() {
     return {
+      qrcodeWidth:'180',
+      qrcodeHeight:'180',
       ddgjdialogVisible: false,
       trajectoryTable: [],
       queryOrders: {
@@ -656,6 +693,7 @@ export default {
       value2: "",
       optionsStatus: [],
       codedialogVisible: false,
+      codedialogVisiblePro: false,
       loading: false,
       pageNum: 1, //页数
       pageSize: 20, //条数
@@ -728,7 +766,7 @@ export default {
       natureOfVehicleUseoptions:[],
     };
   },
-  components:{quotationDialog,detailsDialog},
+  components:{quotationDialog,detailsDialog,quotationDialogPro},
   created() {
     this.getDicType("natureOfVehicleUse");//车辆使用性质
     this.$api.letter.gainTopList().then((res) => {
@@ -886,7 +924,12 @@ export default {
           }
           data.logoImg = this.iconfftter(res.data.inscompany);
           this.queryOrders = data;
-          this.$refs.quotationDialog.setBackupVisible(true)
+          if(this.$store.state.user.roles.managementSource&&this.$store.state.user.roles.managementSource=='3'){
+            this.$refs.quotationDialogPro.setBackupVisible(true)
+          }
+          else{
+            this.$refs.quotationDialog.setBackupVisible(true)
+          }
         }
       });
     },
@@ -953,8 +996,8 @@ export default {
       } else {
         this.qrcode = new QRCode("qrcode", {
           text: text,
-          width: 180,
-          height: 180,
+          width: this.qrcodeWidth,
+          height: this.qrcodeHeight ,
           colorDark: "#000000",
           colorLight: "#ffffff",
           correctLevel: QRCode.CorrectLevel.H,
@@ -1130,9 +1173,6 @@ export default {
     },
     //二维码
     carcode(row, item) {
-      let params = {
-        companyId: item.id,
-      };
       this.$api.letter.getQrCode(item.id).then((res) => {
         if (res.code == "200") {
           this.inscompany = res.data.inscompany; //保险公司
@@ -1157,7 +1197,14 @@ export default {
               this.creatQrCode(res.data.qrCodeUrl);
             }
           });
+        if(this.$store.state.user.roles.managementSource&&this.$store.state.user.roles.managementSource=='3'){
+          this.codedialogVisiblePro = true;
+          this.qrcodeWidth='154'
+          this.qrcodeHeight='154'
+        }
+        else{
           this.codedialogVisible = true;
+        }
         } else {
           this.$message({ message: res.msg, type: "warning" });
         }
@@ -2128,6 +2175,12 @@ export default {
 };
 </script>
 <style lang="scss" scoped>
+.scan-code{
+  div{
+    margin-top: 10px;
+  }
+}
+
 .green_color{
   color: #068069;
   border: 1px solid #068069;
@@ -2151,6 +2204,13 @@ export default {
 }
 
 /deep/ {
+  .proSaomazhifucodeClass .el-dialog__header{
+    background: rgba(45,77,137,0.1);
+    font-weight: bold;
+  }
+  .proSaomazhifucodeClass .el-dialog__footer{
+    border-top:1px solid #EEF1F6 ;
+  }
   .el-step__head {
     min-height: 90px;
   }

+ 250 - 0
src/views/Letter/components/quotationDialogPro.vue

@@ -0,0 +1,250 @@
+<template>
+     <el-dialog
+      :visible.sync="dialogVisible"
+      width="1080px"
+      class="quotation_style"
+    >
+        <div id="pdfContentsDiv" style="padding: 25px;">
+            <div slot="title" class="dialog-title quotation-title">
+                <img
+                :src="queryOrders.logoImg"
+                class="align"
+                alt
+                style="width: 28px; height: 28px;vertical-align: middle;"
+            />
+                <span style="color:#000">{{queryOrders.inscompany}}-报价单</span>
+            </div>
+            <div style="border: 1px solid #000000;margin:10px 0">
+                <div  class="quotation_title">
+                    <div style="font-weight: 500;font-size: 24px;margin-bottom:5px">{{queryOrders.inscompany}}报价单</div>
+                    <div>报价时间:{{ queryOrders.createtime }}</div>
+                </div>
+            <div class="vehicle">
+                <li>
+                    <span>订单号:</span>{{ queryOrders.orderno }}
+                </li>
+                <li>
+                    <span>车型:</span>{{ queryOrders.carinfo.modelcname  }}
+                </li>
+                <li>
+                    <span>车牌号:</span>{{ queryOrders.carinfo.licenseNo }}
+                </li>
+                <li>
+                    <span>车主姓名:</span>{{ queryOrders.ownerinfo.name }}
+                </li>
+                <li>
+                    <span>投保人姓名:</span>{{ queryOrders.applyinfo.name }}
+                </li>
+                <li>
+                    <span>被保人姓名:</span>{{ queryOrders.insureinfo.name }}
+                </li>
+                <li>
+                    <span>发动机号:</span>{{ queryOrders.carinfo.engineNo }}
+                </li>
+                <li>
+                    <span>车架号:</span>{{ queryOrders.carinfo.vinNo }}
+                </li>
+                <li>
+                    <span>座位数:</span>{{ queryOrders.carinfo.seatCount }}
+                </li>
+               
+                <li style="width: 100%;">
+                    <span>车辆交强险保险期间:</span>{{ queryOrders.jqstartdate }} 至 {{ queryOrders.jqenddate }}
+                </li>
+                <li style="width: 100%;" v-if="queryOrders.systartdate &&queryOrders.syenddate">
+                    <span>车辆商业险保险期间:</span>{{ queryOrders.systartdate }} 至 {{ queryOrders.syenddate }}
+                </li>
+            </div>
+            <div class="quotation-style tax-arrears" v-if="queryOrders.kindinfo && queryOrders.kindinfo.length>0">
+                <b>商业险险别</b>
+                <b>保额(元)</b>
+                <b style=" border-right:0">保费(元)</b>
+                <div v-for="(kindinfoitem, kindinfoindex) in queryOrders.kindinfo"
+                    :key="kindinfoindex">
+                    <span >{{ kindinfoitem.kindName }}</span>
+                    <span
+                v-if="['D4', 'SY_FJ_YBW2'].includes(kindinfoitem.kindCode)"
+                >{{ kindinfoitem.unitAmount }}</span
+              >
+              <span
+                v-else-if="
+                  ['MJ1', 'MJ2', 'MJ3', 'MJ4'].includes(kindinfoitem.kindCode)
+                "
+              >
+                {{ kindinfoitem.deductibleRate }}
+              </span>
+              <span v-else>{{ kindinfoitem.amount }}</span>
+              <span >{{ kindinfoitem.coveragePremium ?kindinfoitem.coveragePremium :'-' }}</span>
+                </div>
+            </div>
+            <div v-else style="height: 1px;width:100%;background:#000"></div>
+            <div  class="money_style">
+                <div v-if="queryOrders.sypremium">车辆商业险:<span>¥{{ queryOrders.sypremium }}</span></div>
+                <div v-if="queryOrders.jqpremium">交强险:<span>¥{{ queryOrders.jqpremium }}</span></div>
+                <div v-if="queryOrders.taxamount">车船税:<span>¥{{ queryOrders.taxamount }}</span></div>
+                <div v-if="queryOrders.jypremium">驾意险:<span>¥{{ queryOrders.jypremium }}</span></div>
+                <div style="font-weight: bold;">应缴金额:<span>¥{{ queryOrders.sumpremium }}</span></div>
+            </div>
+        </div>
+        <div >注:本报价单仅供参考,最终以出单价格为准。</div>
+
+    </div>
+    <span slot="footer" class="dialog-footer">
+        <el-button type="primary" class="blue_color" size="small" @click="copybjd()">截图</el-button>
+        <el-button size="small" class="blueplain_color"  @click="dialogVisible = false">关闭</el-button>
+    </span>
+    </el-dialog>
+</template>
+<script>
+import html2Canvas from "html2canvas";
+
+export default {
+  name: "quotationDialog",
+    props:{
+        queryOrders:{
+            type:Object,
+            default:{}
+        }
+    },
+    data(){
+        return{
+            dialogVisible:false,
+            logoImg:''
+        }
+    },
+    created(){
+    },
+    methods:{
+        setBackupVisible: function (backupVisible) {
+            this.dialogVisible = backupVisible
+        },
+        // 截图粘贴
+    copybjd() {
+      html2Canvas(document.getElementById("pdfContentsDiv"), {
+        allowTaint: true,
+        taintTest: false,
+        // useCORS: true
+      }).then(function (canvas) {
+        let base64Data = "";
+        base64Data = canvas.toDataURL("image/png", 1);
+        const date = new Date();
+        const saveInfo = {
+          download: date.getTime() + `.png`,
+          href: base64Data,
+        };
+        const element = document.createElement("a");
+        element.style.display = "none";
+        for (const key in saveInfo) {
+          element.setAttribute(key, saveInfo[key]);
+        }
+        document.body.appendChild(element);
+        element.click();
+        setTimeout(() => {
+          document.body.removeChild(element);
+        }, 300);
+      });
+    },
+    }
+}
+</script>
+<style scoped lang="scss">
+.vehicle{
+    li{
+        width: 49%;
+        padding-top: 13px;
+        display: inline-block;
+    }
+    span{
+       color: #868B98 ;
+    }
+    margin: 10px 0 20px 5px
+}
+.dialog-footer{
+    button{
+        width: 96px;
+        text-align: center;
+    }
+}
+.quotation-title{
+    color: var(--themeColor);
+    font-weight: bold;
+    font-size: 16px;
+}
+.quotation_title{
+    text-align: center;
+    padding: 10px 0;
+    border-bottom: 1px solid #000000;
+}
+.tax-arrears{
+    b,span{
+        width: 33.3%;
+    }
+}
+.quotation-style{
+    font-size: 0;
+    b{
+        font-size: 14px;
+        border-top: 1px solid #000 ;
+    }
+    b,span{
+        display: inline-block;
+        box-sizing: border-box;
+        width: 33.3%;
+        text-align: center;
+        line-height: 40px;
+        border-bottom: 1px solid #000 ;
+        border-right: 1px solid #000 ;
+        font-size: 14px;
+    }
+    span:last-child{
+        border-right:0;
+        // border-bottom: 1px solid #000 ;
+    }
+}
+.blue_color{
+  color: #fff;
+  background: #2D4D89;
+  border: 1px solid #2D4D89;
+}
+.blueplain_color{
+  color: #2D4D89;
+  background: #EAEDF1;
+  border: 1px solid #EAEDF1;
+}
+.money_style{
+    text-align: right ;
+    div{
+        line-height: 30px;
+    }
+    span{
+        display: inline-block;
+        width: 100px;
+        text-align: left;
+    }
+}
+/deep/ {
+    .el-dialog__header{
+        padding: 0 ;
+
+    }
+    .el-dialog__body{
+        padding: 0;
+        border-bottom: 1px solid #EEF1F6
+    }
+     .el-descriptions__body{
+        padding:0
+     }
+    .el-descriptions__body .el-descriptions__table .el-descriptions-item__cell{
+        text-align: center;
+    }
+    .el-descriptions-item__content{
+        color: #333333 ;
+        font-weight: bold;
+    }
+    .el-descriptions-item__label.is-bordered-label{
+        background: var(--themeColor);
+        color: #fff;
+    }
+
+}
+</style>

+ 2 - 0
src/views/Login.vue

@@ -168,6 +168,8 @@ export default {
               if(response.data.headSculpture!=''&&response.data.headSculpture!=null&&response.data.headSculpture!=undefined){
                 response.data.headSculpture = process.env.BASE_URL +response.data.headSculpture
               }
+
+              this.$store.commit("SET_USER", response.data);
               localStorage.setItem('user_data', JSON.stringify(response.data)) 
             }
             else{

+ 12 - 4
src/views/Sys/Deptall.vue

@@ -44,10 +44,8 @@
               ></el-input>
             </el-form-item>
             <el-form-item label="来源:">
-              <el-select v-model="managementSource" placeholder="选择来源">
-                <el-option label="渠道" value="1"></el-option>
-                <el-option label="个代" value="2"></el-option>
-                <el-option label="服务" value="3"></el-option>
+              <el-select v-model="managementSource" placeholder="选择来源" v-for="val in organizationSourceoptions" :key="val.dictValue">
+                <el-option  :label="val.dictTag" :value="val.dictValue"></el-option>
               </el-select>
             </el-form-item>
             <el-form-item>
@@ -571,6 +569,7 @@ export default {
     this.getDictItems("comlevel");
     this.getDictItems("comattribute");
     this.getDictItems("comtype");
+    this.getDicType("organizationSource");
     this.getQueryTree(); //获取省市区数据
   },
   mounted() {
@@ -625,6 +624,7 @@ export default {
       comleveloptions: [],
       comattributeoptions: [],
       comtypeoptions: [],
+      organizationSourceoptions:[],
       //------------下拉框数据   end-----------------
 
       //---dialog begin ----
@@ -819,6 +819,14 @@ export default {
           this[typeName + "options"] = [];
         });
     },
+    getDicType(type) {
+      this.$api.insCompany.dicType(type).then(res => {
+        if (res.code == 200) {
+            this[type + 'options'] = res.data.ddList;
+        }
+      })
+
+    },
     //获取省市区树数据
     getQueryTree() {
       this.$api.dept.queryTree().then((res) => {