Commit 21be3529 authored by liudong1993's avatar liudong1993

1

parent 7aa94da0
<style scoped>
.departmentTreeStyleCont {
padding-top: 20px;
display: flex;
height: 100%;
}
.departmentTreeStyleCont .departmentTreeStyle {
background: #fff;
padding: 20px;
flex: 0 1 400px;
min-height: 800px;
}
.departmentTreeStyleCont .departmentTreeStyle > p {
font-size: 14px;
margin-bottom: 15px;
color: #333;
font-weight: bold;
height: 14px;
line-height: 14px;
border-left: 3px solid #E95252;
text-indent: 20px;
}
.departmentTreeStyleCont .departmentTreeStyle .spanIcon {
padding-left: 20px;
display: none
}
.departmentTreeStyleCont .departmentTreeStyle .el-tree-node__content {
height: 32px;
line-height: 32px;
font-size: 12px
}
.TreeSpan img {
width: 24px;
height: 24px;
border-radius: 12px;
vertical-align: sub;
margin-right: 3px;
}
.departmentTreeStyleCont .departmentTreeStyle .el-tree-node__content:hover .spanIcon {
display: inline-block
}
.departmentTreeStyleCont .departmentTreeStyle .el-tree-node__content:hover .spanIcon i {
font-size: 14px !important;
color: #999;
margin-right: 2px;
}
.departmentTreeStyleCont .departmentTreeStyle .el-tree-node__content:hover .spanIcon i:hover {
color: #E95252;
}
.departmentTreeStyleCont .departmentTreeLayer > p {
font-size: 14px;
margin-bottom: 15px;
color: #333;
font-weight: bold;
height: 14px;
line-height: 14px;
border-left: 3px solid #E95252;
text-indent: 20px;
}
.departmentTreeStyleCont .departmentTreeLayer {
background: #fff;
min-height: 300px;
padding: 20px;
margin-left: 20px;
flex: auto
}
.departmentTreeStyleCont .el-date-editor.el-input,
.departmentTreeStyleCont .el-date-editor.el-input__inner {
width: auto !important;
}
.sfd_tit {
border-left: 3px solid #E95252;
text-indent: 10px;
font-size: 16px;
line-height: 30px;
margin: 20px 0 10px 0;
}
</style>
<template>
<div class="flexOne">
<div style="display: flex;justify-content: space-between;align-items: center;">
<p class="sfd_tit clearfix"><span>积分配置</span></p>
<div style="text-align: right;">
<input type="button" class="hollowFixedBtn" :value="$t('pub.addBtn')" @click="add"/>
</div>
</div>
<table class="singeRowTable" border="0" cellspacing="0" cellpadding="0" v-loading='loading'>
<tr>
<th>订单类型</th>
<th>线路</th>
<th>团队类型</th>
<th>积分比例</th>
<th>积分购买力</th>
<th>操作</th>
</tr>
<tr v-for="(item,index) in JFDataList" :key="index+500">
<td>{{item.OrderTypeName}}</td>
<td>{{item.LineName}}</td>
<td>{{item.TeamTypeName}}</td>
<td>{{item.Rate}}/100</td>
<td>{{item.IntegralBuyRate}}RMB/积分</td>
<td>
<el-tooltip class="item" effect="dark" :content="$t('pub.edit')" placement="top-start">
<el-button type="primary" icon="el-icon-edit" circle @click="Edit(item)"></el-button>
</el-tooltip>
<el-tooltip class="item" effect="dark" :content="$t('system.table_delete')" placement="top-start">
<el-button @click="Delete(item)" type="danger" icon="el-icon-delete" circle></el-button>
</el-tooltip>
</td>
</tr>
<tr v-if='JFDataList.length==0'>
<td colspan="6" align="center">{{$t('system.content_noData')}}</td>
</tr>
</table>
<el-dialog :title="'新增'+(addMsg.Type==1?'积分':'存折')+'配置'" :visible.sync="dialogVisible" width="400px">
<el-form label-width="120px" class="demo-ruleForm">
<el-form-item label="订单类型" prop="OrderType">
<el-select v-model="addMsg.OrderType" placeholder="请选择">
<el-option
v-for="item in OrderTypeList"
:key="item.Id"
:label="item.Name"
:value="item.Id">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="线路" prop="OrderType">
<el-select v-model="addMsg.LineId" placeholder="请选择">
<el-option label="通用" value="0"></el-option>
<el-option
v-for="item in LineList"
:key="item.LineID"
:label="item.LineName"
:value="item.LineID">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="团队类型" prop="OrderType">
<el-select v-model="addMsg.TeamType" placeholder="请选择">
<el-option
v-for="item in TeamTypeList"
:key="item.Id"
:label="item.Name"
:value="item.Id">
</el-option>
</el-select>
</el-form-item>
<el-form-item v-if="addMsg.Type==1" label="反积分比例" prop="Rate">
<el-input v-model="addMsg.Rate" type="Number"> <template slot="append">100RMB兑积分</template></el-input>
</el-form-item>
<el-form-item v-if="addMsg.Type==1" label="积分购买力" prop="IntegralBuyRate">
<el-input v-model="addMsg.IntegralBuyRate" type="Number"><template slot="append">1积分可换RMB</template></el-input>
</el-form-item>
<el-form-item v-if="addMsg.Type==2" label="反佣金比例" prop="Rate">
<el-input v-model="addMsg.Rate" type="Number"> <template slot="append">RMB/人</template></el-input>
</el-form-item>
<el-form-item v-if="addMsg.Type==2" label="适配客户" prop="CustomerId">
<el-input v-model="addMsg.CustomerId" type="Number"> <template slot="append">客户ID</template></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">{{$t('pub.cancelBtn')}}</el-button>
<el-button type="danger" @click="submitForm('ruleForm')">{{$t('pub.sureBtn')}}</el-button>
</span>
</el-dialog>
<div style="display: flex;justify-content: space-between;align-items: center;">
<p class="sfd_tit clearfix"><span>幸福存折</span></p>
<div style="text-align: right;">
<input type="button" class="hollowFixedBtn" :value="$t('pub.addBtn')" @click="addT"/>
</div>
</div>
<table class="singeRowTable" border="0" cellspacing="0" cellpadding="0" v-loading='loading'>
<tr>
<th>订单类型</th>
<th>线路</th>
<th>团队类型</th>
<th>返佣比例</th>
<th width="300">适配同行</th>
<th>操作</th>
</tr>
<tr v-for="(item,index) in CZDataList" :key="index+100">
<td>{{item.OrderTypeName}}</td>
<td>{{item.LineName}}</td>
<td>{{item.TeamTypeName}}</td>
<td>{{item.Rate}}/人</td>
<td>{{item.CustomerName}}</td>
<td>
<el-tooltip class="item" effect="dark" :content="$t('pub.edit')" placement="top-start">
<el-button type="primary" icon="el-icon-edit" circle @click="Edit(item)"></el-button>
</el-tooltip>
<el-tooltip class="item" effect="dark" :content="$t('system.table_delete')" placement="top-start">
<el-button @click="Delete(item)" type="danger" icon="el-icon-delete" circle></el-button>
</el-tooltip>
</td>
</tr>
<tr v-if='CZDataList.length==0'>
<td colspan="6" align="center">{{$t('system.content_noData')}}</td>
</tr>
</table>
</div>
</template>
<script>
export default {
data() {
return {
dialogVisible:false,
loading: true,
JFDataList:[],
CZDataList:[],
addMsg:{
Id:0,
Type:1,
OrderType:1,
LineId:'0',
TeamType:0,
Rate:0,
IntegralBuyRate:0,
CustomerId:0
},
OrderTypeList:[{
Id: 1,
Name: '团队订单'
}],
LineList:[],
TeamTypeList:[{
Id: 0,
Name: '常规团'
},{
Id: 1,
Name: '小包团'
},{
Id: 2,
Name: '当地游'
},{
Id: 5,
Name: '切位团'
}],
}
},
created(){
},
mounted() {
this.getLineList();
this.getList();
},
methods: {
getLineList() {
this.apipost("line_post_GetAllList_V2", {
LineDirection: 0
}, res => {
if (res.data.resultCode == 1) {
this.LineList = res.data.data;
}
});
},
Delete(item){
this.$confirm(this.$t('tips.shifoushanchu'), this.$t('tips.tips'), {
confirmButtonText: this.$t('pub.sureBtn'),
cancelButtonText: this.$t('pub.cancelBtn'),
type: 'warning'
}).then(() => {
this.apipost('customer_post_DelRePayConfig', {Id:item.Id}, res => {
if (res.data.resultCode == 1) {
this.getList();
this.dialogVisible=false;
this.Success(res.data.message)
} else {
this.Success(res.data.message)
}
}, err => {
})
}).catch(() => {
});
},
Edit(item){
this.addMsg={
Id:item.Id,
Type:item.Type,
OrderType:item.OrderType,
LineId:item.LineId,
TeamType:item.TeamType,
Rate:item.Rate,
IntegralBuyRate:item.IntegralBuyRate,
CustomerId:item.CustomerId
}
this.dialogVisible=true;
},
add(){
this.addMsg={
Id:0,
Type:1,
OrderType:1,
LineId:'0',
TeamType:0,
Rate:0,
IntegralBuyRate:0,
CustomerId:0
}
this.dialogVisible=true;
},
addT(){
this.addMsg={
Id:0,
Type:2,
OrderType:1,
LineId:'0',
TeamType:0,
Rate:0,
IntegralBuyRate:0,
CustomerId:0
}
this.dialogVisible=true;
},
submitForm() {
this.apipost('customer_post_SetRePayConfig', this.addMsg, res => {
if (res.data.resultCode == 1) {
this.getList();
this.dialogVisible=false;
this.Success(res.data.message)
} else {
this.Error(res.data.message)
}
}, err => {
})
},
getList() { //获取数据
this.loading = true;
this.apipost('customer_post_GetRePayConfigList', {}, res => {
this.loading = false
if (res.data.resultCode == 1) {
this.JFDataList = res.data.data.IntegralList;
this.CZDataList = res.data.data.DepositBookList;
} else {
}
}, err => {
})
},
}
}
</script>
......@@ -2966,6 +2966,14 @@ export default {
title: '返佣查询'
},
},
{
path: '/RepayConfig', // 销售=>返佣比例管理
name: 'RepayConfig',
component: resolve => require(['@/components/SalesModule/RepayConfig'], resolve),
meta: {
title: '积分/幸福存折配置'
},
},
{
path: '/Returnratio', // 销售=>返佣比例管理
name: 'Returnratio',
......
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