|
@@ -1,8 +1,7 @@
|
|
|
<!-- 模板区域 -->
|
|
<!-- 模板区域 -->
|
|
|
<template>
|
|
<template>
|
|
|
<div>
|
|
<div>
|
|
|
- <el-drawer v-model="props.ruleFeeVisible" :direction="direction" size="57%"
|
|
|
|
|
- @close="close">
|
|
|
|
|
|
|
+ <el-drawer v-model="props.ruleFeeVisible" :direction="direction" size="62%" @close="close">
|
|
|
<template #header>
|
|
<template #header>
|
|
|
<h4>添加费用</h4>
|
|
<h4>添加费用</h4>
|
|
|
</template>
|
|
</template>
|
|
@@ -72,19 +71,20 @@
|
|
|
:disabled-date="(date: any) => disabledEndDate(date, index, Costindex)" />
|
|
:disabled-date="(date: any) => disabledEndDate(date, index, Costindex)" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</ElCol>
|
|
</ElCol>
|
|
|
- <ElCol :md="24" :lg="12">
|
|
|
|
|
- <el-form-item label="审核方式" prop="auditMethod">
|
|
|
|
|
- <el-select v-model="Costitem.auditMethod" placeholder="选择审核方式">
|
|
|
|
|
- <el-option label="自动审核" value="0" />
|
|
|
|
|
- <el-option label="手动审核" value="1" />
|
|
|
|
|
- </el-select>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </ElCol>
|
|
|
|
|
- <ElCol :md="24" :lg="12">
|
|
|
|
|
- <el-form-item label="优先级" prop="priorityLevel">
|
|
|
|
|
- <el-input-number style="width: 100%" v-model="Costitem.priorityLevel" placeholder="请填写优先级" />
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </ElCol>
|
|
|
|
|
|
|
+ <ElCol :md="24" :lg="12">
|
|
|
|
|
+ <el-form-item label="审核方式" prop="auditMethod">
|
|
|
|
|
+ <el-select v-model="Costitem.auditMethod" placeholder="选择审核方式">
|
|
|
|
|
+ <el-option label="自动审核" value="0" />
|
|
|
|
|
+ <el-option label="手动审核" value="1" />
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </ElCol>
|
|
|
|
|
+ <ElCol :md="24" :lg="12">
|
|
|
|
|
+ <el-form-item label="优先级" prop="priorityLevel">
|
|
|
|
|
+ <el-input-number style="width: 100%" v-model="Costitem.priorityLevel"
|
|
|
|
|
+ placeholder="请填写优先级" />
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </ElCol>
|
|
|
<ElCol :md="24" :lg="24">
|
|
<ElCol :md="24" :lg="24">
|
|
|
<el-form-item label="费用描述" prop="costDescribe">
|
|
<el-form-item label="费用描述" prop="costDescribe">
|
|
|
<el-input v-model="Costitem.costDescribe" maxlength="500" placeholder="请输入费用描述"
|
|
<el-input v-model="Costitem.costDescribe" maxlength="500" placeholder="请输入费用描述"
|
|
@@ -120,7 +120,15 @@
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
<el-table-column prop="costType" label="类型"></el-table-column>
|
|
<el-table-column prop="costType" label="类型"></el-table-column>
|
|
|
- <el-table-column prop="inlet" label="入口比例" width="180" align="center">
|
|
|
|
|
|
|
+ <el-table-column prop="costType" label="入口手续费比例" width="150" align="center"
|
|
|
|
|
+ v-if="handlingFee.jqEntranceFeeRatio || handlingFee.syEntranceFeeRatio || handlingFee.jyEntranceFeeRatio">
|
|
|
|
|
+ <template #default="scope">
|
|
|
|
|
+ <span v-if="scope.row.costType == '交强险'">{{ handlingFee.jqEntranceFeeRatio }}%</span>
|
|
|
|
|
+ <span v-if="scope.row.costType == '商业险'">{{ handlingFee.syEntranceFeeRatio }}%</span>
|
|
|
|
|
+ <span v-if="scope.row.costType == '驾意险'">{{ handlingFee.jyEntranceFeeRatio }}%</span>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column prop="inlet" label="入口比例" width="160" align="center">
|
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
|
<el-input-number v-model="scope.row.inlet" :precision="2" controls-position="right"
|
|
<el-input-number v-model="scope.row.inlet" :precision="2" controls-position="right"
|
|
|
style="width: 100%;" :min="0" :max="100" @change="handelRK(scope)">
|
|
style="width: 100%;" :min="0" :max="100" @change="handelRK(scope)">
|
|
@@ -136,38 +144,30 @@
|
|
|
</el-input-number>
|
|
</el-input-number>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
-<!-- <el-table-column prop="commission" label="手续费比例" width="180" align="center">
|
|
|
|
|
|
|
+ <el-table-column prop="addThrow" label="加投比例" width="160" align="center">
|
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
|
- <el-input-number v-model="scope.row.commission" :precision="2" controls-position="right"
|
|
|
|
|
- style="width: 100%;" :min="0" :max="100">
|
|
|
|
|
|
|
+ <el-input-number v-model="scope.row.addThrow" :precision="2" controls-position="right"
|
|
|
|
|
+ style="width: 100%;" :min="0" :max="100" @change="handelJT(scope)">
|
|
|
|
|
+ <template #suffix>%</template>
|
|
|
|
|
+ </el-input-number>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column prop="keepPointRatio" label="留点比例" width="160" align="center">
|
|
|
|
|
+ <template #default="scope">
|
|
|
|
|
+ <el-input-number v-model="scope.row.keepPointRatio" :precision="2" controls-position="right"
|
|
|
|
|
+ style="width: 100%;" :min="0" :max="100" @change="handelLD(scope)">
|
|
|
|
|
+ <template #suffix>%</template>
|
|
|
|
|
+ </el-input-number>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column prop="keepPointRatio" label="出口留点比例" width="180" align="center">
|
|
|
|
|
+ <template #default="scope">
|
|
|
|
|
+ <el-input-number v-model="scope.row.exportKeepPointRatio" :precision="2"
|
|
|
|
|
+ controls-position="right" style="width: 100%;" :min="0" :max="100">
|
|
|
<template #suffix>%</template>
|
|
<template #suffix>%</template>
|
|
|
</el-input-number>
|
|
</el-input-number>
|
|
|
</template>
|
|
</template>
|
|
|
- </el-table-column>-->
|
|
|
|
|
- <el-table-column prop="addThrow" label="加投比例" width="180" align="center">
|
|
|
|
|
- <template #default="scope">
|
|
|
|
|
- <el-input-number v-model="scope.row.addThrow" :precision="2" controls-position="right"
|
|
|
|
|
- style="width: 100%;" :min="0" :max="100" @change="handelJT(scope)">
|
|
|
|
|
- <template #suffix>%</template>
|
|
|
|
|
- </el-input-number>
|
|
|
|
|
- </template>
|
|
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
- <el-table-column prop="keepPointRatio" label="留点比例" width="180" align="center">
|
|
|
|
|
- <template #default="scope">
|
|
|
|
|
- <el-input-number v-model="scope.row.keepPointRatio" :precision="2" controls-position="right"
|
|
|
|
|
- style="width: 100%;" :min="0" :max="100" @change="handelLD(scope)">
|
|
|
|
|
- <template #suffix>%</template>
|
|
|
|
|
- </el-input-number>
|
|
|
|
|
- </template>
|
|
|
|
|
- </el-table-column>
|
|
|
|
|
- <el-table-column prop="keepPointRatio" label="出口留点比例" width="180" align="center">
|
|
|
|
|
- <template #default="scope">
|
|
|
|
|
- <el-input-number v-model="scope.row.exportKeepPointRatio" :precision="2" controls-position="right"
|
|
|
|
|
- style="width: 100%;" :min="0" :max="100">
|
|
|
|
|
- <template #suffix>%</template>
|
|
|
|
|
- </el-input-number>
|
|
|
|
|
- </template>
|
|
|
|
|
- </el-table-column>
|
|
|
|
|
</el-table>
|
|
</el-table>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -185,8 +185,8 @@
|
|
|
</template>
|
|
</template>
|
|
|
</el-drawer>
|
|
</el-drawer>
|
|
|
<!-- 规则条件弹窗 -->
|
|
<!-- 规则条件弹窗 -->
|
|
|
- <RuleCondition ref="RuleConditionRefs" :ruleConditionVisible="ruleConditionVisible" @cancel="ruleConditionVisible = false"
|
|
|
|
|
- @save="ruleConditionSave" :attrIdList="echoResponse" />
|
|
|
|
|
|
|
+ <RuleCondition ref="RuleConditionRefs" :ruleConditionVisible="ruleConditionVisible"
|
|
|
|
|
+ @cancel="ruleConditionVisible = false" @save="ruleConditionSave" :attrIdList="echoResponse" />
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -206,6 +206,7 @@ const props = defineProps<{
|
|
|
ruleFeeVisible: boolean,
|
|
ruleFeeVisible: boolean,
|
|
|
agreementInfo: any,
|
|
agreementInfo: any,
|
|
|
RulesInfo: any,
|
|
RulesInfo: any,
|
|
|
|
|
+ handlingFee?: any,
|
|
|
}>();
|
|
}>();
|
|
|
const emits = defineEmits(["cancel", 'save']);
|
|
const emits = defineEmits(["cancel", 'save']);
|
|
|
const ruleFeeinfo = ref();//规则费用集合
|
|
const ruleFeeinfo = ref();//规则费用集合
|
|
@@ -224,9 +225,9 @@ const feerules = ref<FormRules>({
|
|
|
auditMethod: [
|
|
auditMethod: [
|
|
|
{ required: true, trigger: 'change', message: '请选择审核方式' },
|
|
{ required: true, trigger: 'change', message: '请选择审核方式' },
|
|
|
],
|
|
],
|
|
|
- priorityLevel: [
|
|
|
|
|
- { required: true, trigger: 'blur', message: '请填写优先级' },
|
|
|
|
|
- ]
|
|
|
|
|
|
|
+ priorityLevel: [
|
|
|
|
|
+ { required: true, trigger: 'blur', message: '请填写优先级' },
|
|
|
|
|
+ ]
|
|
|
})
|
|
})
|
|
|
interface RuleCondition {
|
|
interface RuleCondition {
|
|
|
min: number | string;
|
|
min: number | string;
|
|
@@ -244,7 +245,9 @@ onMounted(async () => {
|
|
|
ptlAgreementCostAddList: [],//费用集合
|
|
ptlAgreementCostAddList: [],//费用集合
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
|
|
+ console.log(props.handlingFee)
|
|
|
})
|
|
})
|
|
|
|
|
+
|
|
|
// 禁用失效时间选择
|
|
// 禁用失效时间选择
|
|
|
const disabledEndDate = (date: any, index: number, Costindex: number) => {
|
|
const disabledEndDate = (date: any, index: number, Costindex: number) => {
|
|
|
let start = ruleFeeinfo.value[index].ptlAgreementCostAddList[Costindex]?.effectiveTime;
|
|
let start = ruleFeeinfo.value[index].ptlAgreementCostAddList[Costindex]?.effectiveTime;
|
|
@@ -300,6 +303,7 @@ const save = async (formEl: FormInstance | undefined | any) => {
|
|
|
if (formRef) {
|
|
if (formRef) {
|
|
|
formEl[index].validate((valid: boolean) => {
|
|
formEl[index].validate((valid: boolean) => {
|
|
|
if (valid) {
|
|
if (valid) {
|
|
|
|
|
+
|
|
|
if (!ruleFeeinfo.value[insuranceTypeIndex.value].ptlAgreementCostAddList[index].ruleConditions.length) {
|
|
if (!ruleFeeinfo.value[insuranceTypeIndex.value].ptlAgreementCostAddList[index].ruleConditions.length) {
|
|
|
ElMessage({
|
|
ElMessage({
|
|
|
type: 'error',
|
|
type: 'error',
|
|
@@ -318,7 +322,7 @@ const save = async (formEl: FormInstance | undefined | any) => {
|
|
|
// return;
|
|
// return;
|
|
|
// }
|
|
// }
|
|
|
const result = checkArrayValues(ruleFeeinfo.value[insuranceTypeIndex.value].ptlAgreementCostAddList[index].ruleConditions as RuleCondition[]);
|
|
const result = checkArrayValues(ruleFeeinfo.value[insuranceTypeIndex.value].ptlAgreementCostAddList[index].ruleConditions as RuleCondition[]);
|
|
|
- if(!result){
|
|
|
|
|
|
|
+ if (!result) {
|
|
|
ElMessage({
|
|
ElMessage({
|
|
|
type: 'error',
|
|
type: 'error',
|
|
|
message: `规则条件不能为空值`,
|
|
message: `规则条件不能为空值`,
|
|
@@ -326,8 +330,34 @@ const save = async (formEl: FormInstance | undefined | any) => {
|
|
|
});
|
|
});
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
- if(ruleFeeinfo.value[insuranceTypeIndex.value].ptlAgreementCostAddList[index].ruleConditions.length && result ) {
|
|
|
|
|
- resolve(true);
|
|
|
|
|
|
|
+ // 检查入口比例是否小于入口手续费比例
|
|
|
|
|
+ const hasInvalidItem = formRef.ptlAgreementCostTypeList.some((item: any) => {
|
|
|
|
|
+ // 获取当前险种对应的入口手续费比例
|
|
|
|
|
+ let entranceFeeRatio = 0;
|
|
|
|
|
+ if (item.costType == '交强险') {
|
|
|
|
|
+ entranceFeeRatio = props.handlingFee?.jqEntranceFeeRatio || 0;
|
|
|
|
|
+ } else if (item.costType == '商业险') {
|
|
|
|
|
+ entranceFeeRatio = props.handlingFee?.syEntranceFeeRatio || 0;
|
|
|
|
|
+ } else if (item.costType == '驾意险') {
|
|
|
|
|
+ entranceFeeRatio = props.handlingFee?.jyEntranceFeeRatio || 0;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 检查入口比例是否小于入口手续费比例(转换为数字比较)
|
|
|
|
|
+ if (Number(item.inlet) < Number(entranceFeeRatio)) {
|
|
|
|
|
+ ElMessage({
|
|
|
|
|
+ type: 'warning',
|
|
|
|
|
+ message: `${item.costType}入口比例不能小于入口手续费比例(${entranceFeeRatio}%)`,
|
|
|
|
|
+ plain: true,
|
|
|
|
|
+ });
|
|
|
|
|
+ return true; // 找到不符合条件的项,中断循环
|
|
|
|
|
+ }
|
|
|
|
|
+ return false;
|
|
|
|
|
+ });
|
|
|
|
|
+ if (hasInvalidItem) {
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (ruleFeeinfo.value[insuranceTypeIndex.value].ptlAgreementCostAddList[index].ruleConditions.length && result) {
|
|
|
|
|
+ resolve(true);
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|
|
|
reject(index);
|
|
reject(index);
|
|
@@ -348,7 +378,7 @@ const save = async (formEl: FormInstance | undefined | any) => {
|
|
|
|
|
|
|
|
return val;
|
|
return val;
|
|
|
})
|
|
})
|
|
|
- emits("save",{ptlAgreementCode:props.agreementInfo.agreementCode,ptlAgreementName:props.agreementInfo.agreementTitle,costAddList:ruleFeeinfo.value} )
|
|
|
|
|
|
|
+ emits("save", { ptlAgreementCode: props.agreementInfo.agreementCode, ptlAgreementName: props.agreementInfo.agreementTitle, costAddList: ruleFeeinfo.value })
|
|
|
} catch (error) {
|
|
} catch (error) {
|
|
|
const invalidIndex: any = error; // 获取未通过校验的表单索引
|
|
const invalidIndex: any = error; // 获取未通过校验的表单索引
|
|
|
// const invalidForm = ruleFeeinfo.value[insuranceTypeIndex.value].ptlAgreementCostAddList[invalidIndex]; // 获取未通过校验的表单对象
|
|
// const invalidForm = ruleFeeinfo.value[insuranceTypeIndex.value].ptlAgreementCostAddList[invalidIndex]; // 获取未通过校验的表单对象
|
|
@@ -364,40 +394,40 @@ const save = async (formEl: FormInstance | undefined | any) => {
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
const checkArrayValues = <T, K extends keyof T>(arr: T[]) => {
|
|
const checkArrayValues = <T, K extends keyof T>(arr: T[]) => {
|
|
|
- console.log('规则数组', arr)
|
|
|
|
|
|
|
+ console.log('规则数组', arr)
|
|
|
// 遍历数组
|
|
// 遍历数组
|
|
|
for (let item of arr) {
|
|
for (let item of arr) {
|
|
|
- // 检查指定键的值是否为空
|
|
|
|
|
- if (item.operator === null || item.operator === undefined || item.operator === "") {
|
|
|
|
|
- return false; // 如果为空,返回 false
|
|
|
|
|
- }
|
|
|
|
|
- if(item.attrType == 'radio') {
|
|
|
|
|
- if (item.min === null || item.min === undefined || item.min === "") {
|
|
|
|
|
- return false; // 如果为空,返回 false
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ // 检查指定键的值是否为空
|
|
|
|
|
+ if (item.operator === null || item.operator === undefined || item.operator === "") {
|
|
|
|
|
+ return false; // 如果为空,返回 false
|
|
|
|
|
+ }
|
|
|
|
|
+ if (item.attrType == 'radio') {
|
|
|
|
|
+ if (item.min === null || item.min === undefined || item.min === "") {
|
|
|
|
|
+ return false; // 如果为空,返回 false
|
|
|
}
|
|
}
|
|
|
- if(item.attrType == 'checkbox' || item.attrType == 'select' || item.attrType == 'inputTag') {
|
|
|
|
|
- if (item.minArray === null || item.minArray === undefined || item.minArray === "") {
|
|
|
|
|
- return false; // 如果为空,返回 false
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ }
|
|
|
|
|
+ if (item.attrType == 'checkbox' || item.attrType == 'select' || item.attrType == 'inputTag') {
|
|
|
|
|
+ if (item.minArray === null || item.minArray === undefined || item.minArray === "") {
|
|
|
|
|
+ return false; // 如果为空,返回 false
|
|
|
}
|
|
}
|
|
|
- if(item.attrType == 'inputNumber' || item.attrType == 'datetime') {
|
|
|
|
|
- if(item.operator == '1' || item.operator == null) {
|
|
|
|
|
- if ((item.min === null || item.min === undefined || item.min === "") || (item.max === null || item.max === undefined || item.max === "")) {
|
|
|
|
|
- return false; // 如果为空,返回 false
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ }
|
|
|
|
|
+ if (item.attrType == 'inputNumber' || item.attrType == 'datetime') {
|
|
|
|
|
+ if (item.operator == '1' || item.operator == null) {
|
|
|
|
|
+ if ((item.min === null || item.min === undefined || item.min === "") || (item.max === null || item.max === undefined || item.max === "")) {
|
|
|
|
|
+ return false; // 如果为空,返回 false
|
|
|
}
|
|
}
|
|
|
- if(item.operator == '2' || item.operator == '3') {
|
|
|
|
|
- if(item.min === null || item.min === undefined || item.min === "") {
|
|
|
|
|
- return false; // 如果为空,返回 false
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ }
|
|
|
|
|
+ if (item.operator == '2' || item.operator == '3') {
|
|
|
|
|
+ if (item.min === null || item.min === undefined || item.min === "") {
|
|
|
|
|
+ return false; // 如果为空,返回 false
|
|
|
}
|
|
}
|
|
|
- if(item.operator == '4' || item.operator == '5') {
|
|
|
|
|
- if(item.max === null || item.max === undefined || item.max === "") {
|
|
|
|
|
- return false; // 如果为空,返回 false
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ }
|
|
|
|
|
+ if (item.operator == '4' || item.operator == '5') {
|
|
|
|
|
+ if (item.max === null || item.max === undefined || item.max === "") {
|
|
|
|
|
+ return false; // 如果为空,返回 false
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
return true; // 如果所有值都不为空,返回 true
|
|
return true; // 如果所有值都不为空,返回 true
|
|
|
}
|
|
}
|
|
@@ -406,58 +436,80 @@ const addRuleCondition = (index: number, Costindex: number) => {
|
|
|
insuranceTypeIndex.value = index;
|
|
insuranceTypeIndex.value = index;
|
|
|
feeIndex.value = Costindex;
|
|
feeIndex.value = Costindex;
|
|
|
ruleConditionVisible.value = true;
|
|
ruleConditionVisible.value = true;
|
|
|
- RuleConditionRefs.value.ruleAttr(props.agreementInfo.companyId)
|
|
|
|
|
|
|
+ RuleConditionRefs.value.ruleAttr(props.agreementInfo.companyId)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
const handelRK = (scope) => {
|
|
const handelRK = (scope) => {
|
|
|
- if(scope.row.export&&scope.row.addThrow || scope.row.export&&scope.row.addThrow === 0) {
|
|
|
|
|
- scope.row.keepPointRatio = scope.row.inlet + scope.row.addThrow - scope.row.export
|
|
|
|
|
- }
|
|
|
|
|
- if(scope.row.export&&scope.row.keepPointRatio) {
|
|
|
|
|
- scope.row.addThrow = scope.row.export + scope.row.keepPointRatio - scope.row.inlet
|
|
|
|
|
- }
|
|
|
|
|
- if(scope.row.keepPointRatio&&scope.row.addThrow || scope.row.keepPointRatio&&scope.row.addThrow === 0) {
|
|
|
|
|
- scope.row.export = scope.row.inlet + scope.row.addThrow - scope.row.keepPointRatio
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ // 获取当前险种对应的入口手续费比例
|
|
|
|
|
+ let entranceFeeRatio = 0;
|
|
|
|
|
+ if (scope.row.costType == '交强险') {
|
|
|
|
|
+ entranceFeeRatio = props.handlingFee?.jqEntranceFeeRatio || 0;
|
|
|
|
|
+ } else if (scope.row.costType == '商业险') {
|
|
|
|
|
+ entranceFeeRatio = props.handlingFee?.syEntranceFeeRatio || 0;
|
|
|
|
|
+ } else if (scope.row.costType == '驾意险') {
|
|
|
|
|
+ entranceFeeRatio = props.handlingFee?.jyEntranceFeeRatio || 0;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 检查入口比例是否小于入口手续费比例
|
|
|
|
|
+ if (scope.row.inlet < entranceFeeRatio) {
|
|
|
|
|
+ ElMessage({
|
|
|
|
|
+ type: 'warning',
|
|
|
|
|
+ message: `入口比例不能小于入口手续费比例(${entranceFeeRatio}%)`,
|
|
|
|
|
+ plain: true,
|
|
|
|
|
+ });
|
|
|
|
|
+ scope.row.inlet = entranceFeeRatio;
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ console.log(scope.row)
|
|
|
|
|
+ if (scope.row.export && scope.row.addThrow || scope.row.export && scope.row.addThrow === 0) {
|
|
|
|
|
+ scope.row.keepPointRatio = scope.row.inlet + scope.row.addThrow - scope.row.export
|
|
|
|
|
+ }
|
|
|
|
|
+ if (scope.row.export && scope.row.keepPointRatio) {
|
|
|
|
|
+ scope.row.addThrow = scope.row.export + scope.row.keepPointRatio - scope.row.inlet
|
|
|
|
|
+ }
|
|
|
|
|
+ if (scope.row.keepPointRatio && scope.row.addThrow || scope.row.keepPointRatio && scope.row.addThrow === 0) {
|
|
|
|
|
+ scope.row.export = scope.row.inlet + scope.row.addThrow - scope.row.keepPointRatio
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
const handelCK = (scope) => {
|
|
const handelCK = (scope) => {
|
|
|
- if(scope.row.inlet&&scope.row.addThrow || scope.row.inlet&&scope.row.addThrow === 0) {
|
|
|
|
|
- scope.row.keepPointRatio = scope.row.inlet + scope.row.addThrow - scope.row.export
|
|
|
|
|
- }
|
|
|
|
|
- if(scope.row.inlet&&scope.row.keepPointRatio) {
|
|
|
|
|
- scope.row.addThrow = scope.row.export + scope.row.keepPointRatio - scope.row.inlet
|
|
|
|
|
- }
|
|
|
|
|
- if(scope.row.keepPointRatio&&scope.row.addThrow || scope.row.keepPointRatio&&scope.row.addThrow === 0) {
|
|
|
|
|
- scope.row.inlet = scope.row.export + scope.row.keepPointRatio - scope.row.addThrow
|
|
|
|
|
- }
|
|
|
|
|
- if(scope.row.keepPointRatio) {
|
|
|
|
|
- scope.row.exportKeepPointRatio = scope.row.export - scope.row.keepPointRatio
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ if (scope.row.inlet && scope.row.addThrow || scope.row.inlet && scope.row.addThrow === 0) {
|
|
|
|
|
+ scope.row.keepPointRatio = scope.row.inlet + scope.row.addThrow - scope.row.export
|
|
|
|
|
+ }
|
|
|
|
|
+ if (scope.row.inlet && scope.row.keepPointRatio) {
|
|
|
|
|
+ scope.row.addThrow = scope.row.export + scope.row.keepPointRatio - scope.row.inlet
|
|
|
|
|
+ }
|
|
|
|
|
+ if (scope.row.keepPointRatio && scope.row.addThrow || scope.row.keepPointRatio && scope.row.addThrow === 0) {
|
|
|
|
|
+ scope.row.inlet = scope.row.export + scope.row.keepPointRatio - scope.row.addThrow
|
|
|
|
|
+ }
|
|
|
|
|
+ if (scope.row.keepPointRatio) {
|
|
|
|
|
+ scope.row.exportKeepPointRatio = scope.row.export - scope.row.keepPointRatio
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
const handelJT = (scope) => {
|
|
const handelJT = (scope) => {
|
|
|
- if(scope.row.inlet&&scope.row.export) {
|
|
|
|
|
- scope.row.keepPointRatio = scope.row.inlet + scope.row.addThrow - scope.row.export
|
|
|
|
|
- }
|
|
|
|
|
- if(scope.row.inlet&&scope.row.keepPointRatio) {
|
|
|
|
|
- scope.row.export = scope.row.addThrow + scope.row.inlet - scope.row.keepPointRatio
|
|
|
|
|
- }
|
|
|
|
|
- if(scope.row.keepPointRatio&&scope.row.export) {
|
|
|
|
|
- scope.row.inlet = scope.row.export + scope.row.keepPointRatio - scope.row.addThrow
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ if (scope.row.inlet && scope.row.export) {
|
|
|
|
|
+ scope.row.keepPointRatio = scope.row.inlet + scope.row.addThrow - scope.row.export
|
|
|
|
|
+ }
|
|
|
|
|
+ if (scope.row.inlet && scope.row.keepPointRatio) {
|
|
|
|
|
+ scope.row.export = scope.row.addThrow + scope.row.inlet - scope.row.keepPointRatio
|
|
|
|
|
+ }
|
|
|
|
|
+ if (scope.row.keepPointRatio && scope.row.export) {
|
|
|
|
|
+ scope.row.inlet = scope.row.export + scope.row.keepPointRatio - scope.row.addThrow
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
const handelLD = (scope) => {
|
|
const handelLD = (scope) => {
|
|
|
- if(scope.row.inlet&&scope.row.export) {
|
|
|
|
|
- scope.row.addThrow = scope.row.export + scope.row.keepPointRatio - scope.row.inlet
|
|
|
|
|
- }
|
|
|
|
|
- if(scope.row.inlet&&scope.row.addThrow || scope.row.inlet&&scope.row.addThrow === 0) {
|
|
|
|
|
- scope.row.export = scope.row.addThrow + scope.row.inlet - scope.row.keepPointRatio
|
|
|
|
|
- }
|
|
|
|
|
- if(scope.row.addThrow&&scope.row.export || scope.row.addThrow === 0&&scope.row.export) {
|
|
|
|
|
- scope.row.inlet = scope.row.export + scope.row.keepPointRatio - scope.row.addThrow
|
|
|
|
|
- }
|
|
|
|
|
- if(scope.row.export) {
|
|
|
|
|
- scope.row.exportKeepPointRatio = scope.row.export - scope.row.keepPointRatio
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ if (scope.row.inlet && scope.row.export) {
|
|
|
|
|
+ scope.row.addThrow = scope.row.export + scope.row.keepPointRatio - scope.row.inlet
|
|
|
|
|
+ }
|
|
|
|
|
+ if (scope.row.inlet && scope.row.addThrow || scope.row.inlet && scope.row.addThrow === 0) {
|
|
|
|
|
+ scope.row.export = scope.row.addThrow + scope.row.inlet - scope.row.keepPointRatio
|
|
|
|
|
+ }
|
|
|
|
|
+ if (scope.row.addThrow && scope.row.export || scope.row.addThrow === 0 && scope.row.export) {
|
|
|
|
|
+ scope.row.inlet = scope.row.export + scope.row.keepPointRatio - scope.row.addThrow
|
|
|
|
|
+ }
|
|
|
|
|
+ if (scope.row.export) {
|
|
|
|
|
+ scope.row.exportKeepPointRatio = scope.row.export - scope.row.keepPointRatio
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
//对应险种下添加费用
|
|
//对应险种下添加费用
|