Browse Source

修改干线模板参数

dev-xx
qb 1 year ago
parent
commit
faafe406b4
  1. 45
      src/views/financialsector/Financialse/FinancialTrunkLine.vue

45
src/views/financialsector/Financialse/FinancialTrunkLine.vue

@ -4,11 +4,11 @@
<!-- 计价方式 --> <!-- 计价方式 -->
<el-form-item <el-form-item
label="计价方式" label="计价方式"
prop="priceMethod" prop="trunklinePricingType"
:rules="[{ required: true, message: '请选择计价方式', trigger: ['blur', 'change'] }]" :rules="[{ required: true, message: '请选择计价方式', trigger: ['blur', 'change'] }]"
> >
<el-select <el-select
v-model="details.form.priceMethod" v-model="details.form.trunklinePricingType"
clearable clearable
multiple multiple
placeholder="请选择计价方式" placeholder="请选择计价方式"
@ -26,7 +26,7 @@
<!-- 是否统一区域计费 --> <!-- 是否统一区域计费 -->
<el-form-item label="是否统一区域计费"> <el-form-item label="是否统一区域计费">
<el-radio-group v-model="details.form.isUnify" class="ml-4"> <el-radio-group v-model="details.form.trunklineIsUnifyAreaBill" class="ml-4">
<el-radio <el-radio
v-for="item in details.isType" v-for="item in details.isType"
:key="item.value" :key="item.value"
@ -39,7 +39,7 @@
<!-- 是否区分品类 --> <!-- 是否区分品类 -->
<el-form-item label="是否区分品类"> <el-form-item label="是否区分品类">
<el-radio-group v-model="details.form.isDistinguish" class="ml-4"> <el-radio-group v-model="details.form.trunklineIsByCategory" class="ml-4">
<el-radio <el-radio
v-for="item in details.isType" v-for="item in details.isType"
:key="item.value" :key="item.value"
@ -51,14 +51,14 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<template v-if="details.form.isDistinguish === '1'"> <template v-if="details.form.trunklineIsByCategory === '1'">
<el-divider content-position="left">品类管理</el-divider> <el-divider content-position="left">品类管理</el-divider>
<template v-for="value in details.form.billTemplateDetail" :key="value.title"> <template v-for="value in details.form.billTemplateDetail" :key="value.title">
<!-- 附加费品类 --> <!-- 附加费品类 -->
<el-form-item <el-form-item
label-width="150px" label-width="150px"
v-if="details.form.priceMethod.includes(value.code)" v-if="details.form.trunklinePricingType.includes(value.code)"
:label="value.title" :label="value.title"
> >
<div <div
@ -122,7 +122,7 @@
<!-- 是否特殊配置 --> <!-- 是否特殊配置 -->
<el-form-item label-width="150px" label="是否特殊配置"> <el-form-item label-width="150px" label="是否特殊配置">
<el-radio-group v-model="details.form.isSpecial" class="ml-4"> <el-radio-group v-model="details.form.trunklineIsPeculiarSetup" class="ml-4">
<el-radio v-for="item in details.isType" :key="item.value" :label="item.value" size="large" <el-radio v-for="item in details.isType" :key="item.value" :label="item.value" size="large"
>{{ item.label }} >{{ item.label }}
</el-radio> </el-radio>
@ -133,7 +133,7 @@
<!-- 是否最低计费 --> <!-- 是否最低计费 -->
<el-form-item label-width="150px" label="是否最低计费"> <el-form-item label-width="150px" label="是否最低计费">
<el-radio-group v-model="details.form.isLowest" class="ml-4"> <el-radio-group v-model="details.form.trunklineIsMinCost" class="ml-4">
<el-radio v-for="item in details.isType" :key="item.value" :label="item.value" size="large" <el-radio v-for="item in details.isType" :key="item.value" :label="item.value" size="large"
>{{ item.label }} >{{ item.label }}
</el-radio> </el-radio>
@ -141,11 +141,15 @@
</el-form-item> </el-form-item>
<!-- 最低计费类型 --> <!-- 最低计费类型 -->
<el-form-item v-if="details.form.isLowest === '1'" label-width="150px" label="最低计费类型"> <el-form-item
<el-radio-group v-model="details.form.lowestMethod" class="ml-4"> v-if="details.form.trunklineIsMinCost === '1'"
label-width="150px"
label="最低计费类型"
>
<el-radio-group v-model="details.form.trunklineMinCostType" class="ml-4">
<template v-for="item in details.lowestType" :key="item.value"> <template v-for="item in details.lowestType" :key="item.value">
<el-radio <el-radio
v-if="!item.MappingOrNot || details.form.priceMethod.includes(item.mapValue)" v-if="!item.MappingOrNot || details.form.trunklinePricingType.includes(item.mapValue)"
:label="item.dictKey" :label="item.dictKey"
size="large" size="large"
>{{ item.dictValue }} >{{ item.dictValue }}
@ -268,17 +272,17 @@ const details = reactive({
/** 表单数据 */ /** 表单数据 */
form: { form: {
/** 计价方式 */ /** 计价方式 */
priceMethod: [], trunklinePricingType: [],
/** 是否统一区域计费 */ /** 是否统一区域计费 */
isUnify: '1', trunklineIsUnifyAreaBill: '1',
/** 是否区分品类 */ /** 是否区分品类 */
isDistinguish: '1', trunklineIsByCategory: '1',
/** 是否特殊配置 */ /** 是否特殊配置 */
isSpecial: '1', trunklineIsPeculiarSetup: '1',
/** 是否最低计费 */ /** 是否最低计费 */
isLowest: '1', trunklineIsMinCost: '1',
/** 最低计费类型 */ /** 最低计费类型 */
lowestMethod: '0', trunklineMinCostType: '0',
/** 计费模版详情 */ /** 计费模版详情 */
billTemplateDetail: [] as BillTemplateDetail[], billTemplateDetail: [] as BillTemplateDetail[],
}, },
@ -299,13 +303,14 @@ const handleChangePrcieMethod = value => {
let activeItem: any = {}; let activeItem: any = {};
for (let i = 0; i < details.lowestType.length; i++) { for (let i = 0; i < details.lowestType.length; i++) {
const item = details.lowestType[i]; const item = details.lowestType[i];
if (item.value !== details.form.lowestMethod) continue; if (item.value !== details.form.trunklineMinCostType) continue;
activeItem = item; activeItem = item;
break; break;
} }
if (!activeItem.MappingOrNot) return; if (!activeItem.MappingOrNot) return;
if (!details.form.priceMethod.includes(activeItem.mapValue)) details.form.lowestMethod = '0'; if (!details.form.trunklinePricingType.includes(activeItem.mapValue))
details.form.trunklineMinCostType = '0';
}; };
/** 处理干线计费模式 */ /** 处理干线计费模式 */
@ -465,7 +470,7 @@ const resetFormData = () => {
/** 提交 */ /** 提交 */
const handleSubmit = () => { const handleSubmit = () => {
if (details.form.priceMethod.length === 0) ElMessage.error('请选择计价方式'); if (details.form.trunklinePricingType.length === 0) ElMessage.error('请选择计价方式');
formRef.value.validate(async valid => { formRef.value.validate(async valid => {
if (!valid) return; if (!valid) return;

Loading…
Cancel
Save