lihongxiao пре 2 година
родитељ
комит
1b44744431

+ 2 - 2
config/dev.env.js

@@ -8,13 +8,13 @@ module.exports = merge(prodEnv, {
 
   ENV_CONFIG:'"dev"',
   // BASE_URL: '"https://test.baoxianzhanggui.com/web-api"',//测试服务器
-  BASE_URL:'"https://sxzgkj.baoxianzhanggui.com/web-api"'//正式服务器
+  // BASE_URL:'"https://sxzgkj.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.106:8080/"',//屈晨
   // BASE_URL: '"http://192.168.0.253:8080/"',//田智
   // BASE_URL: '"http:///192.168.0.42:8080/"',//武鸿鹏
-  // BASE_URL: '"http:///192.168.0.253:8080/"',//田智
+  BASE_URL: '"http:///192.168.0.253:8080/"',//田智
   // BASE_URL: '"http:///192.168.0.42:8080/"',//武鸿鹏
   // BASE_URL: '"http://192.168.1.101:8080/"',
   // BASE_URL: '"http://192.168.0.250:8080/"',//

+ 28 - 25
src/views/AgreementManage/CarInsurance/AgreementEntry.vue

@@ -86,7 +86,7 @@
               </el-date-picker>
             </el-form-item>
           </el-col>
-          <el-col :span="6"  class="flex a-end j-c">
+          <el-col :span="6" class="flex a-end j-c">
             <el-form-item>
               <kt-button label="查询" :size="overSize" type="primary" perms="agreement:input:query" @click="queryEsmInfo" />
               <el-button :disabled="agreementSelectionList.length == 0" label="批量修改" :size="overSize" type="primary"
@@ -230,7 +230,7 @@
                       style="width: 100%"></el-input>
                   </el-form-item>
                 </el-col>
-              
+
               </el-row>
               <el-row>
                 <el-col :span="12">
@@ -374,7 +374,7 @@
                     </el-select>
                   </el-form-item>
                 </el-col>
-                
+
                 <el-col :span="12">
                   <el-form-item label="序号" prop="serialNumber">
                     <el-input-number :min="0" v-model="agreement.serialNumber"></el-input-number>
@@ -399,10 +399,11 @@
               <el-row>
                 <div class="flex a-c">
                   <span style="font-weight: bold;">api类型</span>
-                    <div class="apiTypestyle flex j-start a-c " :class="{'apiactive':attributionform.apiType==item.id}"  v-for="(item,index) in apiTypelist" :key="index" @click="apiChange(item.id)">
-                      <img :src="attributionform.apiType==item.id?item.activeImg:item.img" alt="">
-                      <span  style="margin:auto">{{ item.label }}</span>
-                    </div>
+                  <div class="apiTypestyle flex j-start a-c " :class="{ 'apiactive': attributionform.apiType == item.id }"
+                    v-for="(item, index) in apiTypelist" :key="index" @click="apiChange(item.id)">
+                    <img :src="attributionform.apiType == item.id ? item.activeImg : item.img" alt="">
+                    <span style="margin:auto">{{ item.label }}</span>
+                  </div>
                 </div>
                 <!-- <el-form-item class="apistyle" label="api类型:">
                     <el-select class="widths1" v-model="attributionform.apiType" @change="apiChange">
@@ -549,7 +550,7 @@
             <span>费用</span>
           </div>
         </div>
-        <el-button class="mrgin-1" size="small" type="warning" v-if="!tableRowForm.isExternal"
+        <el-button class="mrgin-1" size="small" type="warning" v-if="!tableRowForm.isExternal" 
           @click="productCostFactorDialogVisible = true">产品费用因子</el-button>
         <el-form ref="productCostForm" :model="productCostForm" label-width="140px" :size="overSize"
           :rules="costformRules">
@@ -1330,18 +1331,18 @@ export default {
   },
   data() {
     return {
-      apiTypelist:[
+      apiTypelist: [
         {
-          id:1,
-          label:"API",
-          img:require('@/assets/api.png'),
-          activeImg:require('@/assets/api1.png')
+          id: 1,
+          label: "API",
+          img: require('@/assets/api.png'),
+          activeImg: require('@/assets/api1.png')
         },
         {
-          id:2,
-          label:"python",
-          img:require('@/assets/python.png'),
-          activeImg:require('@/assets/python1.png')
+          id: 2,
+          label: "python",
+          img: require('@/assets/python.png'),
+          activeImg: require('@/assets/python1.png')
 
         }
       ],
@@ -2912,6 +2913,7 @@ export default {
     },
     //产品费用
     productCost(index, row) {
+      console.log(row,1111111111111);
       this.insuranceCompanyId = row.insuranceCompanyId;
       this.tableRowForm = row;
       this.agreementId = row.id;
@@ -3252,7 +3254,7 @@ export default {
 
     //请求类型change
     apiChange(id) {
-      this.attributionform.apiType=id;
+      this.attributionform.apiType = id;
       let params = {
         insCompanyId: this.agreement.partnerCompaniesId,
         apiType: id,
@@ -3966,17 +3968,19 @@ export default {
 .apiTypestyle {
   padding: 4px;
   box-sizing: border-box;
-  margin-left:50px;
+  margin-left: 50px;
   width: 124px;
   height: auto;
   background: #F1F2F6;
   border-radius: 4px 4px 4px 4px;
   cursor: pointer;
-  img{
+
+  img {
     width: 28px;
-    height:28px;
+    height: 28px;
   }
-  >span{
+
+  >span {
     // color: rgba(38,38,38,0.8);
     font-size: 14px;
   }
@@ -3985,7 +3989,7 @@ export default {
 .apiactive {
   background: #fff;
   border: 1px solid #2D4D89;
-  color:#2D4D89;
+  color: #2D4D89;
   font-weight: bold;
 }
 
@@ -4142,5 +4146,4 @@ export default {
 .depttree {
   padding: 4px 20px;
   font-weight: 400;
-}
-</style>
+}</style>

+ 36 - 13
src/views/AgreementManage/CarInsurance/AgreementProductFee.vue

@@ -86,7 +86,7 @@
       <el-tabs v-model="activeName" type="card">
         <el-tab-pane :label="tabtitle + '费用'" name="feiyong" class="tab-panestyle">
           <div class="tab-panecent">
-            <el-form ref="productCostForm" :model="productCostForm" label-width="130px" :size="overSize"
+            <el-form ref="productCostForm" :model="productCostForm" label-width="140px" :size="overSize"
               :rules="costformRules">
               <el-row>
                 <h4>费用详情</h4>
@@ -131,19 +131,19 @@
               <el-row v-if="productjqincludes">
                 <h4>交强险费用</h4>
                 <el-col :span="5" :offset="1">
-                  <el-form-item label="费用比例" prop="jqCarCostsProportion">
+                  <el-form-item :label="$route.query.isExternal?'交强入口手续费比例 ' :'费用比例'" prop="jqCarCostsProportion">
                     <el-input v-model="productCostForm.jqCarCostsProportion"
                       @blur="costRatioInput('jqCostsProportion', 'jqCarCostsProportion', 'jqCarOtherCostsProportion')"
                       placeholder="请输入费用比例"></el-input>
                   </el-form-item>
                 </el-col>
-                <el-col :span="5" :offset="1" v-if="permissions">
+                <el-col :span="5" :offset="1" v-if="permissions && !$route.query.isExternal">
                   <el-form-item label="其他费用比例">
                     <el-input disabled v-model="productCostForm.jqCarOtherCostsProportion"
                       placeholder="请输入其他费用比例"></el-input>
                   </el-form-item>
                 </el-col>
-                <el-col :span="5" :offset="1" v-if="permissions">
+                <el-col :span="5" :offset="1" v-if="permissions && !$route.query.isExternal">
                   <el-form-item label="总费用比例" prop="jqCostsProportion">
                     <el-input v-model="productCostForm.jqCostsProportion"
                       @blur="totalCostRatioInput('jqCostsProportion', 'jqCarCostsProportion', 'jqCarOtherCostsProportion')"
@@ -185,21 +185,21 @@
                 <h4>商业险费用</h4>
 
                 <el-col :span="5" :offset="1">
-                  <el-form-item label="费用比例" prop="syCarCostsProportion">
+                  <el-form-item :label="$route.query.isExternal? '商业入口手续费比例' :'费用比例'" prop="syCarCostsProportion">
                     <el-input v-model="productCostForm.syCarCostsProportion"
                       @blur="totalCostRatioInput('syCostsProportion', 'syCarCostsProportion', 'syCarOtherCostsProportion')"
                       placeholder="请输入费用比例"></el-input>
                   </el-form-item>
                 </el-col>
 
-                <el-col :span="5" :offset="1" v-if="permissions">
+                <el-col :span="5" :offset="1" v-if="permissions && !$route.query.isExternal">
                   <el-form-item label="其他费用比例">
                     <el-input v-model="productCostForm.syCarOtherCostsProportion" placeholder="请输入其他费用比例"
                       disabled></el-input>
                   </el-form-item>
                 </el-col>
 
-                <el-col :span="5" :offset="1" v-if="permissions">
+                <el-col :span="5" :offset="1" v-if="permissions && !$route.query.isExternal">
                   <el-form-item label="总费用比例" prop="syCostsProportion">
                     <el-input v-model="productCostForm.syCostsProportion" placeholder="请输入总费用比例"
                       @blur="totalCostRatioInput('syCostsProportion', 'syCarCostsProportion', 'syCarOtherCostsProportion')"></el-input>
@@ -239,21 +239,21 @@
               <el-row>
                 <h4>非车费用</h4>
                 <el-col :span="5" :offset="1">
-                  <el-form-item label="费用比例" prop="noCarCostsProportion">
+                  <el-form-item :label="$route.query.isExternal? '非车入口手续费比例' : '费用比例'" prop="noCarCostsProportion">
                     <el-input v-model="productCostForm.noCarCostsProportion"
                       @blur="totalCostRatioInput('noCostsProportion', 'noCarCostsProportion', 'noCarOtherCostsProportion')"
                       placeholder="请输入费用比例"></el-input>
                   </el-form-item>
                 </el-col>
 
-                <el-col :span="5" :offset="1" v-if="permissions">
+                <el-col :span="5" :offset="1" v-if="permissions && !$route.query.isExternal">
                   <el-form-item label="其他费用比例">
                     <el-input v-model="productCostForm.noCarOtherCostsProportion" placeholder="请输入其他费用比例"
                       disabled></el-input>
                   </el-form-item>
                 </el-col>
 
-                <el-col :span="5" :offset="1" v-if="permissions">
+                <el-col :span="5" :offset="1" v-if="permissions && !$route.query.isExternal">
                   <el-form-item label="总费用比例" prop="noCostsProportion">
                     <el-input v-model="productCostForm.noCostsProportion" placeholder="请输入总费用比例"
                       @blur="totalCostRatioInput('noCostsProportion', 'noCarCostsProportion', 'noCarOtherCostsProportion')"></el-input>
@@ -294,7 +294,7 @@
           </div>
 
         </el-tab-pane>
-        <el-tab-pane label="产品费用因子" name="yinzi" class="tab-panestyle">
+        <el-tab-pane label="产品费用因子" name="yinzi" class="tab-panestyle" v-if="!$route.query.isExternal">
           <div class="tab-panecent2">
             <Product-Cost-Form ref="ProductRef" v-if="productCostAddVehicleFactorVisible" :form="dynamicFormArray"
               :operator="operatorlist" over-size="small"></Product-Cost-Form>
@@ -1033,6 +1033,7 @@ export default {
   },
   // 生命周期函数
   created() {
+    console.log(this.$route.query.isExternal,888888);
     this.insuranceCompanyId = this.$route.query.insuranceCompanyId;
     this.productpageRequest.agreementId = this.$route.query.id;
     this.productCostForm.agreementId = this.$route.query.id;
@@ -1210,6 +1211,28 @@ export default {
       this.getFactorTemplate();
       this.roductList1 = [];
     },
+    costRatioInput(total, partial, other) {
+      if (!this.$route.query.isExternal) {
+        //参数1为总费用,参数2为费用
+        let pay1 = this.productCostForm[total]; //总
+        let pay2 = this.productCostForm[partial]; //费用
+        if (pay1) {
+          if (Number(pay2) <= Number(pay1)) {
+            var otherPay = pay1 - pay2;
+            this.productCostForm[other] = Math.round(otherPay * 100) / 100;
+          } else {
+            //如果总比例不够扣减,则置空重新填
+            this.productCostForm[total] = null;
+            this.productCostForm[partial] = null;
+            this.$message({
+              message: "费用比例必须小于总费用比例",
+              type: "error",
+            });
+          }
+        }
+      }
+
+    },
     totalCostRatioInput(total, partial, other) {
       //参数1为总费用,参数2为费用
       let pay1 = this.productCostForm[total]; //总
@@ -1247,8 +1270,8 @@ export default {
       });
     },
     productCostAddSubmit(formName) {
-      const Arraydata = this.$refs.ProductRef.localForm;
-      this.productCostForm.costsAttrLinks = Arraydata.myArray;
+      const Arraydata = this.$refs.ProductRef && this.$refs.ProductRef.localForm ?this.$refs.ProductRef.localForm:{};
+      this.productCostForm.costsAttrLinks = Arraydata.myArray ?Arraydata.myArray:[];
       this.$refs[formName].validate((valid) => {
         if (valid) {
           if (this.productCostAddDialogType == "add") {