Commit 87bd2113 by liuchenxi

Merge branch 'feature/12月迭代' into dev

parents 44e3cedf 73196ebb
......@@ -353,7 +353,7 @@ export default {
// 保存了计费规则
async callBackSave(cbOther) {
if (cbOther) {
// 单切多时需要重新调这些接口需要计费部门Id
// 多商户改变配置就重新调接口
await this.getRule();
this.consumeRecord('one');
this.consumeRecord('two');
......
<template>
<el-select v-model="departId" placeholder="请选择计费部门" class="select_more" ref="select" @change="handleChange" filterable remote :remote-method="remoteMethod" suffix-icon="el-icon-search">
<el-select v-model="departId" placeholder="请选择计费部门" class="select_more" ref="select" @change="handleChange" filterable remote :remote-method="remoteMethod" suffix-icon="el-icon-search" @visible-change="onVisibleChange">
<div class="infinite-list" ref="infinite-list" v-infinite-scroll="load" style="overflow:auto;max-height:260px">
<el-option v-for="item in data.list" :key="item.accountDepartId" :value="item.accountDepartId" :label="item.accountDepartName">{{ item.accountDepartName }}</el-option>
<p style="text-align: center" :hidden="!loading"><i class="el-icon-loading"></i></p>
......@@ -23,7 +23,9 @@ export default {
},
data() {
return {
departId: ''
departId: '',
search: '',
cacheSearch: ''
};
},
methods: {
......@@ -31,12 +33,16 @@ export default {
this.$emit('load');
},
handleChange() {
console.log(this.departId);
this.cacheSearch = this.search;
this.$emit('getDepartId', this.departId);
},
remoteMethod(val) {
this.search = val;
this.$refs['infinite-list'].scrollTop = 0;
this.$emit('remote-search', val);
},
onVisibleChange(val) {
if (!val) this.remoteMethod(this.cacheSearch);
}
}
};
......
......@@ -5,7 +5,7 @@
</template>
<el-form ref="form" :model="form" class="content" label-width="170px" :rules="rules">
<p class="tip lineh17">开启“多账户模式”后,系统将根据所配置的计费规则将通讯费用按照“独立计费部门”进行汇总核算及扣除费用;开启后次日凌晨生效,并且开启后不允许关闭,请谨慎操作;</p>
<el-form-item label="是否开启多账户模式:" class="mt17 mb17" prop="status">
<el-form-item label="是否开启多账户模式:" class="mt15 mb15" prop="status">
<el-radio-group v-model="form.status" :disabled="isMoreAccount">
<el-radio :label="0">关闭</el-radio>
<el-radio :label="1">开启</el-radio>
......@@ -66,9 +66,9 @@
<template>
<h2 class="icon-type-title mb20">
<div class="mark" />
双向呼叫&录音
双向呼叫
</h2>
<el-form-item label="双向呼叫&录音:" prop="callRule" class="mb20">
<el-form-item label="双向呼叫:" prop="callRule" class="mb20">
<el-radio-group v-model="form.callRule">
<el-radio :label="4">导购所在门店</el-radio>
<el-radio :label="3">活动创建人</el-radio>
......@@ -131,24 +131,29 @@ export default {
const options2 = { confirmButtonText: '立即设置', cancelButtonText: '稍后设置', type: 'success' };
try {
// 单商户转多商户二次弹窗确认,不存在多切单的情况
const para = this.form.status ? this.form : { status: 0 };
const para = this.form.status ? this.form : {};
// 比较字段值是否有改变
if (this.compareIsEdit(para, this.data)) {
if (!this.isMoreAccount) await this.$confirm('开启多账户计费模式次日凌晨生效,并且开启', '确认开启多账户模式?', options1);
await saveAccountRule(para);
this.$emit('getNewData', !this.isMoreAccount);
} else {
if (!this.isMoreAccount) {
await this.$confirm('开启多账户计费模式次日凌晨生效,并且开启后不允许关闭', '确认开启多账户模式?', options1);
await saveAccountRule(para);
this.$emit('getNewData', !this.isMoreAccount);
try {
await this.$confirm('赶紧去设置不同的计费账户吧,也可点击【计费中心-账户明细】配置不同的计费账户', '保存成功', options2);
this.$router.push(this.$router.push('/recharge/accountDetail'));
} catch (e) {
this.$emit('update:visible', false);
return false;
}
} else {
await saveAccountRule(para);
this.$emit('getNewData', this.isMoreAccount);
this.$emit('update:visible', false);
return this.$message.success('保存成功');
}
}
try {
await this.$confirm('赶紧去设置不同的计费账户吧,也可点击【计费中心-账户明细】配置不同的计费账户', '保存成功', options2);
this.$router.push(this.$router.push('/recharge/accountDetail'));
} catch (e) {
} else {
this.$emit('update:visible', false);
return false;
return this.$message.success('保存成功');
}
} catch (e) {
return false;
......@@ -202,7 +207,7 @@ h2 {
}
.content {
font-family: PingFangSC-Regular, PingFang SC;
padding: 0 20px;
padding: 0 20px 56px;
color: #303133;
.tip {
color: #909399;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment