增加:运营中心增加缴费记录
This commit is contained in:
parent
73e8a969fe
commit
90599a43dc
|
|
@ -817,8 +817,10 @@ export function deliveryMerList(data) {
|
|||
export function deliveryOrderAllocation(data) {
|
||||
return request.post(`marketing/agent/delivery_order_allocation`,data)
|
||||
}
|
||||
|
||||
|
||||
// 代理中心 - 缴费记录
|
||||
export function agentPayRecord(data) {
|
||||
return request.get(`marketing/agent/pay_record`,data)
|
||||
}
|
||||
|
||||
|
||||
// 活动分类 - 列表获取
|
||||
|
|
|
|||
|
|
@ -603,6 +603,15 @@ const marketingRouter =
|
|||
},
|
||||
component: () => import('@/views/marketing/agent/delivery/order')
|
||||
},
|
||||
{
|
||||
path: 'pay_record',
|
||||
name: `agentPayRecord`,
|
||||
meta: {
|
||||
title: '缴费记录',
|
||||
noCache: true
|
||||
},
|
||||
component: () => import('@/views/marketing/agent/record/pay_record')
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -4,13 +4,14 @@
|
|||
<el-form ref="config" :model="config" label-width="200px" class="demo-config">
|
||||
<el-tabs v-model="activeName" @tab-click="handleClick">
|
||||
<el-tab-pane label="入驻基本设置" name="pay_money">
|
||||
<!--顶部提示-->
|
||||
<el-alert type="warning" show-icon :closable="false">
|
||||
<template slot="title">费用及佣金说明</template>
|
||||
1、费用为该角色加入时需要支付的金额,例如:总部外勤邀请省发起人加入,则省发起人需要在【省发起人定金中选择个档次支付】,如果仅存在一个档次则无需选择,如果无任何档次信息则无需支付!<br />
|
||||
2、费用设置为0时则无需支付,且【推荐奖励佣金】设置将失效,无奖励佣金<br />
|
||||
3、奖励仅邀请人归属的上级可得,例如:合伙人加入且支付后→邀请该合伙人的运营商可获得奖励→邀请该运营商的省公司外勤可获得奖励→邀请该省公司外勤的省发起人可获得奖励→邀请该省发起人的总部外勤可获得奖励<br />
|
||||
</el-alert>
|
||||
|
||||
<!--循环基本设置项-->
|
||||
<div v-for="(item,index) in agent_base_set" :key="index">
|
||||
<el-divider content-position="left">{{ item.title }}</el-divider>
|
||||
<el-form-item label="是否需要审核:">
|
||||
|
|
@ -19,13 +20,21 @@
|
|||
<el-radio :label="1">无需审核</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="缴费总额:">
|
||||
<el-input v-model="item.total_money" :precision="2" :step="0.01" :min="0" type="number" class="selWidth">
|
||||
<el-form-item label="保证金:">
|
||||
<el-input v-model="item.earnest_money" :precision="2" :step="0.01" :min="0" type="number" class="selWidth">
|
||||
<template slot="append">元</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="入驻缴费总额:">
|
||||
<el-input
|
||||
:value="item.total_money"
|
||||
@input="changeTotalMoney($event,index)"
|
||||
:precision="2" :step="0.01" :min="0" type="number" class="selWidth">
|
||||
<template slot="append">元</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<template v-if="item.total_money > 0">
|
||||
<el-form-item label="缴费定金:">
|
||||
<el-form-item label="入驻缴费定金:">
|
||||
<div v-for="(depositItem, depositIndex) in item.deposit_list" :key="depositIndex">
|
||||
<el-input
|
||||
:value="depositItem.deposit_price"
|
||||
|
|
@ -282,6 +291,32 @@ export default {
|
|||
|
||||
this.$set(this.agent_base_set[index], 'commission_list', commissionList);
|
||||
this.$forceUpdate();
|
||||
},
|
||||
// 总额变更
|
||||
changeTotalMoney(e, index){
|
||||
let value = e || 0;
|
||||
let baseSet = Object.assign({}, this.agent_base_set || {});
|
||||
let currentInfo = Object.assign({}, baseSet[index] || {});
|
||||
let currentDepositList = Object.assign({}, currentInfo.deposit_list || {});
|
||||
currentInfo.total_money = value || 0;
|
||||
// 处理定金信息
|
||||
if(Number(value) > 0 && Object.values(currentDepositList).length > 0){
|
||||
Object.values(currentDepositList).forEach((item,key) => {
|
||||
// 判断:如果定金大于总额 则定金等于总额
|
||||
if(Number(item.deposit_price) > Number(value)) {
|
||||
item.deposit_price = Number(value);
|
||||
currentDepositList[key].deposit_price = Number(value);
|
||||
}
|
||||
// 计算:新的剩余金额
|
||||
currentDepositList[key].surplus_price = Number(value - item.deposit_price).toFixed(2);
|
||||
})
|
||||
}else{
|
||||
currentDepositList = {};
|
||||
}
|
||||
currentInfo.deposit_list = currentDepositList;
|
||||
|
||||
this.$set(this.agent_base_set, index, currentInfo);
|
||||
this.$forceUpdate();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,183 @@
|
|||
<template>
|
||||
<div class="divBox">
|
||||
<el-card class="box-card">
|
||||
<!--顶部搜索栏-->
|
||||
<div slot="header" class="clearfix">
|
||||
<div class="container">
|
||||
<el-form inline size="small" label-width="80px">
|
||||
<el-form-item label="">
|
||||
<el-input v-model="tableFrom.object_id" placeholder="请输入运营中心角色ID" class="selWidth" clearable />
|
||||
<el-select v-model="tableFrom.pay_status" class="selWidth" clearable>
|
||||
<el-option label="未交费" :value="0"></el-option>
|
||||
<el-option label="已缴费" :value="1"></el-option>
|
||||
<el-option label="已退款" :value="2"></el-option>
|
||||
</el-select>
|
||||
<el-select v-model="tableFrom.pay_type" class="selWidth" clearable>
|
||||
<el-option label="定金" :value="1"></el-option>
|
||||
<el-option label="尾款" :value="2"></el-option>
|
||||
<el-option label="保证金" :value="3"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-button size="small" type="primary" @click="getList(1)">搜索</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<!--表格信息-->
|
||||
<el-table v-loading="listLoading" :data="tableData.data" style="width: 100%" size="mini">
|
||||
<el-table-column prop="id" label="ID" min-width="50" align="center"/>
|
||||
<el-table-column label="缴费用户" min-width="200" align="center">
|
||||
<template slot-scope="scope">
|
||||
<div class="user-content">
|
||||
<div class="user-avatar">
|
||||
<img :src="scope.row.user.avatar || moren" />
|
||||
</div>
|
||||
<div class="user-info">
|
||||
<div class="nickname">{{ scope.row.user.nickname }}</div>
|
||||
<div class="user-id">ID:{{ scope.row.user.uid }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="运营中心身份" min-width="200" align="center">
|
||||
<template slot-scope="scope">
|
||||
<div class="user-content" v-if="scope.row.agent">
|
||||
{{ scope.row.agent.agent_type_text || '' }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="缴费类型" min-width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.pay_type == 1">定金</el-tag>
|
||||
<el-tag v-else-if="scope.row.pay_type == 2">尾款</el-tag>
|
||||
<el-tag v-else-if="scope.row.pay_type == 3">保证金</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="缴费金额" prop="money" min-width="100" align="center"/>
|
||||
<el-table-column label="状态" min-width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.pay_status == 0" type="info">未缴费</el-tag>
|
||||
<el-tag v-else-if="scope.row.pay_status == 1" type="success">已缴费</el-tag>
|
||||
<el-tag v-else-if="scope.row.pay_status == 2" type="warning">已退款</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="缴费时间" prop="pay_time" min-width="150" align="center"/>
|
||||
<!--<el-table-column label="操作" min-width="150" fixed="right" align="center">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <el-button v-if="scope.row.status == 1" type="text" size="small" class="mr10" @click="allocationOrder(scope.row)">分配</el-button>-->
|
||||
<!-- </template>-->
|
||||
<!--</el-table-column>-->
|
||||
</el-table>
|
||||
<!--分页-->
|
||||
<div class="block">
|
||||
<el-pagination :page-size="tableFrom.limit" :current-page="tableFrom.page" :total="tableData.total" @current-change="pageChange" />
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { agentPayRecord } from '@/api/marketing'
|
||||
export default {
|
||||
name: "preSaleProductList",
|
||||
components: { },
|
||||
data() {
|
||||
return {
|
||||
moren: require("@/assets/images/f.png"),
|
||||
listLoading: true,
|
||||
tableData: {
|
||||
data: [],
|
||||
total: 0,
|
||||
},
|
||||
tableFrom: {
|
||||
page: 1,
|
||||
limit: 20,
|
||||
object_id: '',
|
||||
pay_status: '',
|
||||
pay_type: '',
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
},
|
||||
watch: {},
|
||||
mounted() {
|
||||
this.getList('');
|
||||
},
|
||||
methods: {
|
||||
// 获取列表
|
||||
getList(num) {
|
||||
let _this = this;
|
||||
_this.listLoading = true;
|
||||
_this.tableFrom.page = num ? num : this.tableFrom.page;
|
||||
agentPayRecord(this.tableFrom).then((res) => {
|
||||
_this.tableData.data = res.data.list;
|
||||
_this.tableData.total = res.data.count;
|
||||
_this.listLoading = false;
|
||||
}).catch((res) => {
|
||||
_this.listLoading = false;
|
||||
_this.$message.error(res.message);
|
||||
});
|
||||
},
|
||||
pageChange(page) {
|
||||
this.tableFrom.page = page;
|
||||
this.getList('');
|
||||
},
|
||||
|
||||
|
||||
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
/deep/ .el-table .cell{
|
||||
padding: 0!important;
|
||||
}
|
||||
.selWidth{
|
||||
margin-bottom: 10px!important;
|
||||
}
|
||||
.user-content{
|
||||
--user-content-height-: 80px;
|
||||
|
||||
height: var(--user-content-height-);
|
||||
width: 100%;
|
||||
display: inline-flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: nowrap;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
.user-avatar{
|
||||
height: var(--user-content-height-);
|
||||
width: var(--user-content-height-);
|
||||
display: inline-flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: nowrap;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
img{
|
||||
height: 80%!important;
|
||||
width: 80%!important;
|
||||
border-radius: 50% !important;
|
||||
}
|
||||
}
|
||||
.user-info{
|
||||
height: var(--user-content-height-);
|
||||
display: inline-flex;
|
||||
flex-direction: column;
|
||||
flex-wrap: nowrap;
|
||||
justify-content: center;
|
||||
align-items: flex-start;
|
||||
.nickname{
|
||||
font-size: 15px;
|
||||
font-weight: bold;
|
||||
line-height: calc(var(--user-content-height- * 65%));
|
||||
}
|
||||
.user-id{
|
||||
font-size: 13px;
|
||||
line-height: calc(var(--user-content-height- * 35%));
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Loading…
Reference in New Issue