wuguojie 1 год назад
Родитель
Сommit
4d245d125d

+ 112 - 30
src/views/AgreementManage/CarInsurance/AgreementEntry.vue

@@ -1525,6 +1525,30 @@
         </span>
 
     </el-dialog>
+
+      <el-dialog title="登录" :visible.sync="logindialogVisible" width="600px">
+          <el-tabs v-model="activeName" style="padding: 24px">
+              <el-tab-pane label="密码" name="first">
+                  <el-input placeholder="请输入用户名" v-model="attributionform.username" style="margin-bottom: 20px"></el-input>
+                  <el-input placeholder="请输入密码" v-model="attributionform.password"></el-input>
+                  <p style="display: flex; justify-content: flex-end;">
+                      <el-button size="small" @click="logindialogVisible = false">取 消</el-button>
+                      <el-button size="small" type="primary" @click="userLogin">登录</el-button>
+                  </p>
+              </el-tab-pane>
+              <el-tab-pane label="验证码" name="second">
+                  <el-input placeholder="请输入手机号" v-model="userMobile" style="margin-bottom: 20px">
+                      <el-button type="text" slot="append" @click="handleGetCode">获取验证码</el-button>
+                  </el-input>
+                  <el-input placeholder="请输入验证码" v-model="smscode"></el-input>
+                  <p style="display: flex; justify-content: flex-end;">
+                      <el-button size="small" @click="logindialogVisible = false">取 消</el-button>
+                      <el-button size="small" type="primary" @click="codeLogin">登录</el-button>
+                  </p>
+              </el-tab-pane>
+          </el-tabs>
+      </el-dialog>
+
     <el-drawer :visible.sync="drawer" :direction="'rtl'" size="100%" :before-close="handleClose" :destroy-on-close="true">
 
       <div class="drawer-main">
@@ -1555,6 +1579,7 @@ import agreementUnderwritingRule from "./AgreementUnderwritingRule.vue"
 import agreementNonVehicleConfig from "./AgreementNonVehicleConfig.vue"
 import { updateFeeFile } from "../../../http/moudules/insCompany";
 import {crawlerlogin1, sendLoginSmsCode} from "../../../http/moudules/sys";
+import password from "../../Sys/Password.vue";
 export default {
   components: {
     tree,
@@ -2576,9 +2601,16 @@ export default {
       codedialogVisible: false,//验证码弹窗
       codeLoginVisible: false,//验证码弹窗
       smscode: "",//验证码
+
+        logindialogVisible: false, // 登录方式弹框
+        activeName: 'first', // 登录方式页签
+        userMobile: '', // 手机号
     };
   },
   computed: {
+      password() {
+          return password
+      },
     productjqincludes() {
       let a = ['单交', '交三', '交商', '兜底配置'];
       let b = this.productCostForm.productName;
@@ -4274,6 +4306,52 @@ export default {
         }
       });
     },
+
+      // 获取验证码
+      handleGetCode() {
+          this.$api.sys.sendLoginSmsCode({
+              ...this.attributionform,
+              phone: this.userMobile
+          }).then((res) => {
+              if (res.code == '200') {
+                  this.codedialogVisible=false;
+                  this.codeLoginVisible = true;
+              } else {
+                  this.$message({
+                      type: 'error',
+                      message: res.msg,
+                  });
+              }
+          });
+      },
+      // 用户名密码登录
+      userLogin() {
+
+      },
+      // 手机号验证码登录
+      codeLogin() {
+          this.agreement.smsCode = this.smscode
+          let params = {
+              agreement: this.agreement,
+              attribution: {
+                  ...this.attributionform,
+                  phone: this.userMobile
+              },
+              dept: this.dept,
+          };
+          this.$api.sys.verifyLoginSmsCode(params).then((res) => {
+              if (res.code == '200') {
+                  this.codedialogVisible=false;
+                  this.codeLoginVisible = true;
+              } else {
+                  this.$message({
+                      type: 'error',
+                      message: res.msg,
+                  });
+              }
+          });
+      },
+
     //提交
     submitForm() {
       // let code = this.agreement.partnerCompaniesId.substring(0,4);
@@ -4406,41 +4484,45 @@ export default {
           }
         });
       } else {
+        // CHAC 诚泰
         let list = ['TSBX', 'XDCX']
         let code = this.agreement.partnerCompaniesId.substring(0,4);
         let apiType = this.attributionform.apiType;
-        if(list.includes(code) && apiType == '2' && !this.codeLoginVisible){
-            this.$api.sys.sendLoginSmsCode(this.attributionform).then((res) => {
-                if (res.code != '200') {
-                    this.$message.error(res.msg);
-                }
-            })
-            this.codedialogVisible = true
-            return
-        }
-        let upparams = {
-          agreementId: this.agreementId,
-          agreement: this.agreement,
-          attribution: this.attributionform,
-          dept: this.dept,
-        };
-        this.$api.insCompany
-          .checkLogin(upparams)
-          .then((res) => {
-            if (res.code == "200") {
-              this.$message({
-                message: res.msg,
-                type: "success",
-              });
-            } else {
-              this.$message({
-                message: res.msg,
-                type: "error",
-              });
+        if(code == 'CHAC') {
+            this.logindialogVisible = true
+        } else {
+            if(list.includes(code) && apiType == '2' && !this.codeLoginVisible){
+                this.$api.sys.sendLoginSmsCode(this.attributionform).then((res) => {
+                    if (res.code != '200') {
+                        this.$message.error(res.msg);
+                    }
+                })
+                this.codedialogVisible = true
+                return
             }
-          });
+            let upparams = {
+                agreementId: this.agreementId,
+                agreement: this.agreement,
+                attribution: this.attributionform,
+                dept: this.dept,
+            };
+            this.$api.insCompany
+                .checkLogin(upparams)
+                .then((res) => {
+                    if (res.code == "200") {
+                        this.$message({
+                            message: res.msg,
+                            type: "success",
+                        });
+                    } else {
+                        this.$message({
+                            message: res.msg,
+                            type: "error",
+                        });
+                    }
+                });
+        }
       }
-
     },
     //分页条数
     handleSizeChange(val) {

+ 10 - 3
src/views/Task/daikeComponents/KtLetter1.vue

@@ -1429,6 +1429,12 @@ agreementitem, agreementindex
                             </el-select>
                         </div>
                     </div>
+                    <div class="card-table flex a-c j-s" v-show="reslistitem.cnName == 'yongan'">
+                        <div class="flex a-c mrgin-5">
+                            <span style="margin-right: 5px;">商业险折扣系数:</span>
+                            <el-input size="small" v-model="reslistitem.result.yaBusinessDiscount"></el-input>
+                        </div>
+                    </div>
                     <div class="card-table flex a-c j-s" v-show="reslistitem.cnName == 'renbao'">
                         <div class="flex a-c mrgin-5">
                             <span style="margin-right: 5px;">赔付优化申请:</span>
@@ -1684,7 +1690,7 @@ agreementitem, agreementindex
                           <div class="flex-1">交强折扣系数:</div>
                           <div class="flex-1">{{ reslistitem.result.jgAdjustRate }}</div>
                         </div>
-                        <div class="table-list-content" v-show="reslistitem.result.syAdjustRate">
+                        <div class="table-list-content" v-show="reslistitem.result.syAdjustRate&&reslistitem.namesimple !== '永安财险'">
                           <div class="flex-1">商业折扣系数:</div>
                           <div class="flex-1">{{ reslistitem.result.syAdjustRate }}</div>
                         </div>
@@ -9971,7 +9977,8 @@ export default {
         kinds: this.totalCompanyList[num].kindList,
         risks: this.riskList,
         productId: this.productId,
-        carChecker: this.totalCompanyList[num].result.carChecker
+        carChecker: this.totalCompanyList[num].result.carChecker,
+        yaBusinessDiscount: this.totalCompanyList[num].result.yaBusinessDiscount
       };
       this.$api.letter.yonganquote(params).then(res => {
         this.totalCompanyList[num].msg = res.msg;
@@ -10884,7 +10891,7 @@ export default {
     // 爬虫对接
     quoteInsurance(num, id, namesimple, apiType) {
       let api = apiType == 2 ? "pythonquote" : "";
-      if (namesimple == "诚泰财险") {
+      if (namesimple == "诚泰财险" || namesimple == "恒邦财险") {
         api = "pythonquote";
       }
       let ccidenttype = this.totalCompanyList[num].cnName;