Răsfoiți Sursa

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

lihongxiao 2 ani în urmă
părinte
comite
55b5df6cee

+ 9 - 1
src/views/Sys/Deptall.vue

@@ -134,7 +134,7 @@
               @click.native.stop="handleEdit(scope.row)"
                 @findPage="findSubDeptPage"
                ></KtButton>
-               <KtButton :perms="'sys:institution:delete'" :size="'medium'" :type="'text'" :label="'删除'"
+               <KtButton :perms="'sys:institution:delete'" v-show="scope.row.parentId != '0'" :size="'medium'" :type="'text'" :label="'删除'"
               @click.native.stop="deleteMechanism(scope.row)"
                ></KtButton>
             </template>
@@ -1076,6 +1076,14 @@ export default {
     },
     //删除机构或部门
     deleteMechanism(data) {
+      if (data.parentId == '0') {
+        this.$message({
+          message: "总部不可删除",
+          type: "warning",
+          duration: 1000,
+        });
+        return
+      }
       this.$prompt('请输入密码', '提示', {
           confirmButtonText: '确定',
           cancelButtonText: '取消',

+ 39 - 14
src/views/Task/daikeComponents/KtLetter.vue

@@ -2102,8 +2102,14 @@
         </div>
         <div class="ORcode">
           <div style="padding:13px;position: relative;">
-            <img v-if="['太平财险', '华泰财险'].includes(inscompany)" :src="paycodeimg" alt style="width:100%" />
-            <div v-else id="qrcode" ref="qrcode"></div>
+            <div  v-if="inscompany=='大家财险'">
+                <div v-if="apiType == 1"  id="qrcode" ref="qrcode"></div>
+                <img v-else :src="paycodeimg" alt style="width:100%" />
+            </div>
+            <div v-else>
+              <img v-if="['太平财险', '华泰财险'].includes(inscompany)" :src="paycodeimg" alt style="width:100%" />
+              <div v-else id="qrcode" ref="qrcode"></div>
+            </div>
           </div>
         </div>
         <img style="margin-left: -16px" src="../../../assets/image/divider.png" alt />
@@ -2178,7 +2184,11 @@
           <div>商业险:{{ sypremium }}</div>
           <div>非车险:{{ jypremium }}</div>
         </div>
-        <div>
+        <div  v-if="inscompany=='大家财险'">
+            <div v-if="apiType == 1"  id="qrcode" ref="qrcode"></div>
+            <img v-else :src="paycodeimg" alt style="width:100%" />
+        </div>
+        <div v-else>
           <img v-if="['太平财险', '华泰财险'].includes(inscompany)" :src="paycodeimg" alt style="width:200px;height: 200px;" />
           <div v-else id="qrcode" ref="qrcode"></div>
         </div>
@@ -3308,10 +3318,10 @@ export default {
           { required: true, message: "请输入整备质量", trigger: "blur" }
         ],
         name: [{ required: true, message: "请填写姓名", trigger: "blur" }],
-     
+
         taxamount: [{ required: true, message: "请填写车船税", trigger: "blur" }],
         signDate: [{ required: true, message: "请填写签单日期", trigger: "blur" }],
-     
+
 
         // identifyNumber: [
         //   { required: true, message: "请填写证件号", trigger: "blur" },
@@ -6861,17 +6871,17 @@ export default {
       //   accidentalDrivingVo.rideRiskName=this.dajiaaccidentalDrivingVo.cvrgName;
       //   accidentalDrivingVo.quantity=this.dajiaaccidentalDrivingVo.quantity;
       // }
+      let type = this.totalCompanyList[num].apiType;
+      let api = type == 2 ? "pythonquote" : "dajiaquote";
       let isTaxSource = this.totalCompanyList[num].isTaxSource;
-
       let params = {
         accidentalDrivingVo: this.dajiaaccidentalDrivingVo,
         orderNo: this.orderno,
         companyId: id,
         agreementId: this.totalCompanyList[num].agreementId,
         isTaxSource: isTaxSource == 1 ? isTaxSource : null,
-
       };
-      this.$api.letter.dajiaquote(params).then(res => {
+      this.$api.letter[api](params).then(res => {
         this.totalCompanyList[num].msg = res.msg;
         if (!!res.msg && res.msg.indexOf("不存在有效协议") >= 0) {
           this.totalCompanyList[num].quoteCode = "4";
@@ -8297,16 +8307,21 @@ export default {
                   });
                 break;
               case "大家财险":
-                await this.$api.letter
-                  .dajiasubmitImage({
-                    companyId: this.companyId
+              let DJApiImage = "";
+              DJApiImage =
+                  this.apiType == 2
+                    ? "pythonsubmitImage"
+                    : "dajiasubmitImage";
+                await this.$api.letter[DJApiImage]({
+                  [this.apiType == 2 ? "subOrderNo" : "companyId"]: this.companyId
                   })
                   .then(res => {
                     if (res.code == "200") {
                       var _this = this;
-                      _this.$api.letter
-                        .dajiaaudit({
-                          companyId: this.companyId
+                      let DJApiaudit = "";
+                      DJApiaudit = this.apiType == 2 ? "pythonaudit" : "dajiaaudit";
+                      _this.$api.letter[DJApiaudit]({
+                        [this.apiType == 2 ? "subOrderNo" : "companyId"]: this.companyId,
                         })
                         .then(res => {
                           if (res.code == "200") {
@@ -9426,6 +9441,16 @@ export default {
                         break;
                     }
                     break;
+                    case '大家财险':
+                    switch (item.apiType) {
+                      case 1:
+                      this.creatQrCode(qrCodeUrl);
+                        break;
+                      case 2:
+                        this.paycodeimg = qrCodeUrl;
+                        break;
+                    }
+                    break;
                   default:
                     this.creatQrCode(qrCodeUrl);
                 }

+ 183 - 90
src/views/Task/daikeComponents/KtOrder.vue

@@ -47,12 +47,11 @@
         </el-col>
         <el-col :span="6">
           <el-form-item label="险种">
-              <el-select v-model="pageRequest.productid"  placeholder="选择险种" style="width: 100%"
-                >
-                <el-option v-for="item in productsTypeoptions" :key="item.dictValue" :label="item.dictTag"
-                  :value="item.dictValue"></el-option>
-              </el-select>
-            </el-form-item>
+            <el-select v-model="pageRequest.productid" placeholder="选择险种" style="width: 100%">
+              <el-option v-for="item in productsTypeoptions" :key="item.dictValue" :label="item.dictTag"
+                :value="item.dictValue"></el-option>
+            </el-select>
+          </el-form-item>
         </el-col>
         <el-col :span="3">
           <el-button type="primary" size="small" @click="onSubmit">查询</el-button>
@@ -120,7 +119,6 @@
               <el-button size="mini" type="text" v-if="item.orderstatus == '1' &&
                 [
                   '中煤财险',
-                  '华泰财险',
                   '大家财险',
                   '永诚财险',
                   '国任财险',
@@ -244,8 +242,14 @@
         </div>
         <div class="ORcode">
           <div style="padding:13px;position: relative;">
-            <img v-if="['太平财险', '华泰财险'].includes(inscompany)" :src="paycodeimg" alt style="width:100%" />
-            <div v-else id="qrcode" ref="qrcode"></div>
+            <div v-if="inscompany == '大家财险'">
+              <div v-if="apiType == 1" id="qrcode" ref="qrcode"></div>
+              <img v-else :src="paycodeimg" alt style="width:100%" />
+            </div>
+            <div v-else>
+              <img v-if="['太平财险', '华泰财险'].includes(inscompany)" :src="paycodeimg" alt style="width:100%" />
+              <div v-else id="qrcode" ref="qrcode"></div>
+            </div>
           </div>
         </div>
         <img style="margin-left: -16px" src="../../../assets/image/divider.png" alt />
@@ -312,7 +316,11 @@
           <div>商业险:{{ sypremium }}</div>
           <div>非车险:{{ jypremium }}</div>
         </div>
-        <div>
+        <div v-if="inscompany == '大家财险'">
+          <div v-if="apiType == 1" id="qrcode" ref="qrcode"></div>
+          <img v-else :src="paycodeimg" alt style="width:100%" />
+        </div>
+        <div v-else>
           <img v-if="['太平财险', '华泰财险'].includes(inscompany)" :src="paycodeimg" alt style="width:200px;height: 200px;" />
           <div v-else id="qrcode" ref="qrcode"></div>
         </div>
@@ -516,7 +524,7 @@ export default {
       downloadstatus: 0,
       expands: [],
       productsTypeoptions: [],
-      InsInsuranceKindoptions:[],
+      InsInsuranceKindoptions: [],
       width: document.documentElement.clientWidth,
       insAreaCompanyList: [], //子订单list
       companyList: [], //保险公司
@@ -529,9 +537,10 @@ export default {
       vehicleTypeoptions: [],
       trafficManagementVehicleTypeoptions: [],
       outOfBusinessVehicleUseoptions: [],
-      userIdPor:  Cookies.get("user"),
+      userIdPor: Cookies.get("user"),
       statusPor: '',
-      deptIdPor: ''
+      deptIdPor: '',
+      apiType: "",
     };
   },
   components: { quotationDialog, detailsDialog, quotationDialogPro },
@@ -795,8 +804,6 @@ export default {
     refreshStatus(item) {
       let inscompany = {
         国任财险: "updateOrderInfoGuoren",
-        华泰财险: "orderStatushuatai",
-        大家财险: "updateOrderInfoDajia",
         中煤财险: "orderStatuszhongmei",
         太平财险: "auditStatusQuery",
         泰康财险: "auditStatusQuery",
@@ -851,12 +858,12 @@ export default {
           }
         });
       }
-      if (item.inscompany == "华泰财险") {
+      if (item.inscompany == "大家财险") {
         let HtApiType =
           item.apiType == 2
             ? "auditStatusQuery"
-            : "orderStatushuatai";
-        this.$api.letter[HtApiType](item.id).then(res => {
+            : "updateOrderInfoDajia";
+        this.$api.letter[HtApiType]({ companyId: item.id }).then(res => {
           if (res.code == 200) {
             this.$message({
               message: res.msg ? res.msg : "已刷新状态",
@@ -953,8 +960,32 @@ export default {
             ? "pychonverifyPayment"
             : "updateOrderInfoHuatai";
 
-        this.$api.letter[HtApiType]({[item.apiType == 2 ? "subOrderNo" : "companyId"]: item.id
-						}).then(res => {
+        this.$api.letter[HtApiType]({
+          [item.apiType == 2 ? "subOrderNo" : "companyId"]: item.id
+        }).then(res => {
+          if (res.code == 200) {
+            this.$message({
+              message: res.msg ? res.msg : "已刷新状态",
+              type: "success"
+            });
+            this.quotationhistorydialogVisible ? this.RadioHistoryChange() : "";
+            this.findPage();
+            this.querystatusLoaing = false;
+          } else {
+            this.querystatusLoaing = false;
+            this.$message({ message: res.msg, type: "error" });
+          }
+        });
+      }
+      if (item.inscompany == "大家财险") {
+        let DJApiType =
+          item.apiType == 2
+            ? "pychonverifyPayment"
+            : "updateOrderInfoDajia";
+
+        this.$api.letter[DJApiType]({
+          [item.apiType == 2 ? "subOrderNo" : "companyId"]: item.id
+        }).then(res => {
           if (res.code == 200) {
             this.$message({
               message: res.msg ? res.msg : "已刷新状态",
@@ -1011,6 +1042,7 @@ export default {
     },
     //二维码
     carcode(item) {
+      this.apiType = item.apiType;
       this.$api.letter.getQrCode(item.id).then(res => {
         if (res.code == "200") {
           this.inscompany = res.data.inscompany; //保险公司
@@ -1025,7 +1057,7 @@ export default {
           this.systartdate = res.data.syStartDate; //商业起保日期
           // this.mobile = res.data.applyinfo.mobile;//投保人手机号
           let qrCodeUrl = res.data.qrCodeUrl;
-          this.$api.letter.getThemeByUserId( this.userIdPor).then(res => {
+          this.$api.letter.getThemeByUserId(this.userIdPor).then(res => {
             if (res.code == 200) {
               if (res.data[0] == 'GD') {
                 this.codedialogVisiblePro = true;
@@ -1055,6 +1087,15 @@ export default {
                       });
                       break;
                   }
+                } else if (item.inscompany == "大家财险") {
+                  switch (item.apiType) {
+                    case 1:
+                      this.creatQrCode(qrCodeUrl);
+                      break;
+                    case 2:
+                      this.paycodeimg = qrCodeUrl;
+                      break;
+                  }
                 }
                 else {
                   this.creatQrCode(qrCodeUrl);
@@ -1919,81 +1960,133 @@ export default {
                   }
                   break;
                 case "大家财险":
-                  if (this.orderInfo.jqpolicyno) {
-                    this.$api.letter
-                      .obtainWarranty({
-                        companyId: item.id,
-                        riskCode: "0507",
-                        type: "2" //2:保单
-                      })
-                      .then(res => {
-                        if (res.data) {
-                          this.oldfileList.push({
-                            fileTitle: "交强电子保单",
-                            filename: this.orderInfo.jqpolicyno,
-                            fileurl: res.data
+                  switch (item.apiType) {
+                    case 1:
+                      if (this.orderInfo.jqpolicyno) {
+                        this.$api.letter
+                          .obtainWarranty({
+                            companyId: item.id,
+                            riskCode: "0507",
+                            type: "2" //2:保单
+                          })
+                          .then(res => {
+                            if (res.data) {
+                              this.oldfileList.push({
+                                fileTitle: "交强电子保单",
+                                filename: this.orderInfo.jqpolicyno,
+                                fileurl: res.data
+                              });
+                            } else {
+                              this.$message.error(res.msg);
+                            }
                           });
-                        } else {
-                          this.$message.error(res.msg);
-                        }
-                      });
-                    this.$api.letter
-                      .obtainWarranty({
-                        companyId: item.id,
-                        riskCode: "0507",
-                        type: "1" //1:标志
-                      })
-                      .then(res => {
-                        if (res.data) {
-                          this.oldfileList.push({
-                            fileTitle: "交强电子标志",
-                            filename: this.orderInfo.jqpolicyno,
-                            fileurl: res.data
+                        this.$api.letter
+                          .obtainWarranty({
+                            companyId: item.id,
+                            riskCode: "0507",
+                            type: "1" //1:标志
+                          })
+                          .then(res => {
+                            if (res.data) {
+                              this.oldfileList.push({
+                                fileTitle: "交强电子标志",
+                                filename: this.orderInfo.jqpolicyno,
+                                fileurl: res.data
+                              });
+                            } else {
+                              this.$message.error(res.msg);
+                            }
                           });
-                        } else {
-                          this.$message.error(res.msg);
-                        }
-                      });
-                  }
-                  if (this.orderInfo.sypolicyno) {
-                    this.$api.letter
-                      .obtainWarranty({
-                        companyId: item.id,
-                        riskCode: "0510",
-                        type: "2" //2:保单
-                      })
-                      .then(res => {
-                        if (res.data) {
-                          businessList.push({
-                            fileTitle: "商业电子保单",
-                            filename: this.orderInfo.sypolicyno,
-                            fileurl: res.data
+                      }
+                      if (this.orderInfo.sypolicyno) {
+                        this.$api.letter
+                          .obtainWarranty({
+                            companyId: item.id,
+                            riskCode: "0510",
+                            type: "2" //2:保单
+                          })
+                          .then(res => {
+                            if (res.data) {
+                              businessList.push({
+                                fileTitle: "商业电子保单",
+                                filename: this.orderInfo.sypolicyno,
+                                fileurl: res.data
+                              });
+                            }
                           });
-                        }
-                      });
-                  }
-                  if (this.orderInfo.crossInsurance.length > 0) {
-                    this.orderInfo.crossInsurance.map(ele => {
-                      this.$api.letter
-                        .zijingetPolicyPrint({
-                          companyId: item.id,
-                          policyNumber: ele.policyNumber,
-                          riskCode: "0513",
-                          type: "2" //2:保单
-                        })
-                        .then(res => {
-                          if (res.data) {
-                            accidentList.push({
-                              fileTitle: "驾意险保单",
-                              filename: ele.policyNumber,
-                              fileurl: res.data
+                      }
+                      if (this.orderInfo.crossInsurance.length > 0) {
+                        this.orderInfo.crossInsurance.map(ele => {
+                          this.$api.letter
+                            .zijingetPolicyPrint({
+                              companyId: item.id,
+                              policyNumber: ele.policyNumber,
+                              riskCode: "0513",
+                              type: "2" //2:保单
+                            })
+                            .then(res => {
+                              if (res.data) {
+                                accidentList.push({
+                                  fileTitle: "驾意险保单",
+                                  filename: ele.policyNumber,
+                                  fileurl: res.data
+                                });
+                              } else {
+                                this.$message.error(res.msg);
+                              }
                             });
-                          } else {
-                            this.$message.error(res.msg);
-                          }
                         });
-                    });
+                      }
+                      break;
+                    case 2:
+                      if (this.orderInfo.jqpolicyno || this.orderInfo.sypolicyno) {
+                        this.$api.letter
+                          .pythongetPolicyPrint({
+                            subOrderNo: item.id
+                          })
+                          .then(res => {
+                            if (res.code == 200 && res.data) {
+                              if (res.data.jqxPolicyUrl) {
+                                this.oldfileList.push({
+                                  fileTitle: "交强电子保单",
+                                  filename: this.orderInfo.jqpolicyno,
+                                  fileurl: res.data.jqxPolicyUrl
+                                });
+                              }
+                              if (res.data.jqxFlagUrl) {
+                                this.oldfileList.push({
+                                  fileTitle: "交强电子标志",
+                                  filename: this.orderInfo.jqpolicyno,
+                                  fileurl: res.data.jqxFlagUrl
+                                });
+                              }
+                              if (res.data.syxPolicyUrl) {
+                                businessList.push({
+                                  fileTitle: "商业电子保单",
+                                  filename: this.orderInfo.sypolicyno,
+                                  fileurl: res.data.syxPolicyUrl
+                                });
+                              }
+                              if (
+                                res.data.jyxInfoList &&
+                                res.data.jyxInfoList.length > 0
+                              ) {
+                                res.data.jyxInfoList.forEach(val => {
+                                  accidentList.push({
+                                    fileTitle: "驾意险保单",
+                                    filename: "驾意险保单",
+                                    fileurl: val.jyx_policy_url
+                                  });
+                                });
+                              }
+                            } else {
+                              this.$message.error(res.msg);
+                            }
+                          });
+                      }
+                      break;
                   }
+
                   break;
                 default:
               }