瀏覽代碼

核保因子条件配置

lihongxiao 2 年之前
父節點
當前提交
bd5c17cb3c

+ 11 - 1
src/views/AgreementManage/CarInsurance/AgreementEntry.vue

@@ -531,7 +531,7 @@
       </span>
     </el-dialog>
     <el-dialog :visible.sync="bfyzVisible"  :fullscreen="true">
-      <premium-factor ref="premiumfactor"></premium-factor>
+      <premium-factor ref="premiumfactor" :energyType="energyTypeoptions" :trafficManagementVehicleType="trafficManagementVehicleTypeoptions" :natureOfVehicleUse="natureOfVehicleUseoptions" :licenseOptions="licenseOptions"></premium-factor>
       <!-- <el-form ref="CostfactorForm" :model="CostfactorForm" label-width="100px" :size="overSize">
         <el-card class="box-card">
           <div slot="header" class="clearfix">
@@ -1239,6 +1239,10 @@ export default {
       prodInsurance: [],
       schemeindex: "",
       productCostsindex: "",
+      energyTypeoptions:[],
+      trafficManagementVehicleTypeoptions:[],
+      natureOfVehicleUseoptions:[],
+      licenseOptions:[]
     };
   },
   watch: {
@@ -1296,7 +1300,13 @@ export default {
     this.getDicType("supplierTypeEnum");//供应商类型
     this.getDicType("approvalStatus");//审批状态
     this.getDicType("productsType");//车险产品
+    this.getDicType("natureOfVehicleUse"); //车辆使用性质
+    this.getDicType("trafficManagementVehicleType"); //车辆类型
+    this.getDicType("energyType"); //能源种类
     this.findPage();
+    this.$api.insCompany.license().then((res) => {
+      this.licenseOptions = res.data;
+    });
     this.$api.insCompany.gainTopList("1").then(res => {
       this.prodInsurance = res.data;
     })

+ 25 - 31
src/views/AgreementManage/CarInsurance/components/PremiumFactor.vue

@@ -562,11 +562,10 @@ export default {
         chepai2: "",
         条件适用对象: [],
       },
-
-      trafficManagementVehicleTypeoptions: [],
-      natureOfVehicleUseoptions: [],
-      licenseOptions: [],
-      energyTypeoptions: [],
+      // trafficManagementVehicleTypeoptions: [],
+      // natureOfVehicleUseoptions: [],
+      // licenseOptions: [],
+      // energyTypeoptions: [],
       circularContentPro:[],
       circularContent:[
         {
@@ -706,21 +705,21 @@ export default {
               label: "能源类型",
               prop: "能源类型",
               type: "selectmultiple",
-              options: this.energyTypeoptions,
+              options: this.energyType,
             },
             {
               label: "使用性质",
               prop1: "使用性质1",
               prop2: "使用性质2",
               type: "selectsearch",
-              options: this.natureOfVehicleUseoptions,
+              options: this.natureOfVehicleUse,
             },
             {
               label: "车辆类型",
               prop1: "车辆类型1",
               prop2: "车辆类型2",
               type: "selectsearch",
-              options: this.trafficManagementVehicleTypeoptions,
+              options: this.trafficManagementVehicleType,
             },
             {
               label: "额定载重质量(吨)",
@@ -936,14 +935,26 @@ export default {
       },
     },
   },
+  props:{
+    energyType:{
+      type:Array,
+      default:[]
+    },
+    trafficManagementVehicleType:{
+      type:Array,
+      default:[]
+    },
+    natureOfVehicleUse:{
+      type:Array,
+      default:[]
+    },
+    licenseOptions:{
+      type:Array,
+      default:[]
+    }
+  },
   created() {
-    this.getDicType("natureOfVehicleUse"); //车辆使用性质
-    this.getDicType("trafficManagementVehicleType"); //车辆类型
-    this.getDicType("energyType"); //能源种类
     this.circularContentPro=JSON.parse(JSON.stringify(this.circularContent))
-    this.$api.insCompany.license().then((res) => {
-      this.licenseOptions = res.data;
-    });
     this.conditiondata.forEach((val, index) => {
       this.checkedmData[index] = {
         checkAll: false,
@@ -955,23 +966,6 @@ export default {
   },
 
   methods: {
-    //--数据字典 begin --
-    getDicType(type) {
-      this.$api.insCompany.dicType(type).then((res) => {
-        if (res.code == 200) {
-          if (type == "insOrderStatus") {
-            let data = JSON.parse(JSON.stringify(res.data.ddList));
-            data.unshift({
-              dictTag: "全部",
-              dictValue: "888",
-            });
-            this[type + "options"] = data;
-          } else {
-            this[type + "options"] = res.data.ddList;
-          }
-        }
-      });
-    },
     hides(index) {
       this.circularContent[index].hideAll =
         !this.circularContent[index].hideAll;