|
|
@@ -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") {
|