306 行
12 KiB
HTML
可执行文件
306 行
12 KiB
HTML
可执行文件
<!--[1.6.48]-->
|
|
<style>
|
|
.sale_screen_hr {
|
|
padding: 5px;
|
|
background-color: #F2F2F2;
|
|
display: flex;
|
|
margin-bottom: 10px;
|
|
flex-wrap: wrap;
|
|
justify-content: space-between;
|
|
}
|
|
|
|
.card {
|
|
border-radius: 2px;
|
|
background-color: #fff;
|
|
box-shadow: 0 1px 2px 0 rgba(0, 0, 0, .05);
|
|
width: 15%;
|
|
margin: 5px;
|
|
min-width: 150px;
|
|
text-align: center;
|
|
}
|
|
|
|
.card-header {
|
|
position: relative;
|
|
height: 30px;
|
|
line-height: 30px;
|
|
padding: 0 10px;
|
|
border-bottom: 1px solid #f6f6f6;
|
|
color: #333;
|
|
border-radius: 2px 2px 0 0;
|
|
font-size: 14px;
|
|
}
|
|
|
|
.card-body {
|
|
position: relative;
|
|
padding: 10px 10px;
|
|
line-height: 24px;
|
|
font-size: 16px;
|
|
}
|
|
|
|
.seek {
|
|
margin-right: 10px;
|
|
margin-bottom: 10px;
|
|
}
|
|
|
|
</style>
|
|
<div id="guideTakeApp">
|
|
<div style="display: flex;flex-wrap: wrap;">
|
|
<div class="seek">
|
|
<el-input placeholder="导购名称/手机号码"
|
|
type="text"
|
|
size="small"
|
|
v-model="searchForm.keyword"
|
|
clearable></el-input>
|
|
</div>
|
|
<div class="seek">
|
|
<el-date-picker
|
|
v-model="searchForm.startdate"
|
|
type="datetime"
|
|
size="small"
|
|
clearable
|
|
format="yyyy-MM-dd HH:mm:ss"
|
|
value-format="yyyy-MM-dd HH:mm:ss"
|
|
placeholder="起始时间">
|
|
</el-date-picker>
|
|
</div>
|
|
<div class="seek">
|
|
<el-date-picker
|
|
v-model="searchForm.enddate"
|
|
type="datetime"
|
|
size="small"
|
|
clearable
|
|
format="yyyy-MM-dd HH:mm:ss"
|
|
value-format="yyyy-MM-dd HH:mm:ss"
|
|
placeholder="截止时间">
|
|
</el-date-picker>
|
|
</div>
|
|
<div class="seek">
|
|
<el-select v-model="searchForm.moneystate"
|
|
size="small" clearable
|
|
placeholder="结算状态">
|
|
<el-option label="未提现" value="1"></el-option>
|
|
<el-option label="待审核" value="2"></el-option>
|
|
<el-option label="已结算" value="3"></el-option>
|
|
</el-select>
|
|
</div>
|
|
|
|
<div class="seek" style="display: flex;text-align: center;">
|
|
<el-button type="primary" plain @click="searchData" size="small">查询</el-button>
|
|
<if condition="$data_export eq 1">
|
|
<el-button @click="exportExcel" v-if="operate.all_sell_list_export" size="small">导出</el-button>
|
|
</if>
|
|
<el-button size="small"
|
|
v-if="operate.get_audit_list"
|
|
@click="batchAuditOrder">批量审核
|
|
</el-button>
|
|
</div>
|
|
</div>
|
|
<div class="sale_screen_hr">
|
|
<div class="card">
|
|
<div class="card-header">销售数量</div>
|
|
<div class="card-body">{{sumData.count}}</div>
|
|
</div>
|
|
<div class="card">
|
|
<div class="card-header">销售金额</div>
|
|
<div class="card-body">{{sumData.all_money}}</div>
|
|
</div>
|
|
<div class="card">
|
|
<div class="card-header">佣金额</div>
|
|
<div class="card-body">{{sumData.income}}</div>
|
|
</div>
|
|
<div class="card">
|
|
<div class="card-header">未提现</div>
|
|
<div class="card-body">{{sumData.not_money}}</div>
|
|
</div>
|
|
<div class="card">
|
|
<div class="card-header">待审核</div>
|
|
<div class="card-body">{{sumData.audit_money}}</div>
|
|
</div>
|
|
<div class="card">
|
|
<div class="card-header">已结算</div>
|
|
<div class="card-body">{{sumData.do_money}}</div>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<el-table :data="orderList" border size="small">
|
|
<el-table-column type="index" label="序号" width="60" align="center"></el-table-column>
|
|
<el-table-column prop="guidename" label="导购员" align="center" :show-overflow-tooltip="true"
|
|
min-width="80px"></el-table-column>
|
|
<el-table-column prop="vip_name" label="会员" align="center" :show-overflow-tooltip="true"
|
|
min-width="80px"></el-table-column>
|
|
<el-table-column prop="allmoney" label="销售金额" align="center" :show-overflow-tooltip="true"
|
|
min-width="70px"></el-table-column>
|
|
<el-table-column prop="pay_name" label="消费方式" align="center" :show-overflow-tooltip="true"
|
|
min-width="70px"></el-table-column>
|
|
<el-table-column prop="paytime" label="消费时间" align="center" :show-overflow-tooltip="true"
|
|
min-width="130px"></el-table-column>
|
|
<el-table-column prop="income" label="所得金额" align="center" :show-overflow-tooltip="true"
|
|
min-width="70px"></el-table-column>
|
|
<el-table-column prop="money_state" label="提现状态" align="center" :show-overflow-tooltip="true"
|
|
min-width="70px"></el-table-column>
|
|
<el-table-column prop="guide_type" label="打款类型" align="center" :show-overflow-tooltip="true"
|
|
min-width="70px"></el-table-column>
|
|
<el-table-column prop="number" label="打款账号" align="center" :show-overflow-tooltip="true"
|
|
min-width="100px"></el-table-column>
|
|
<el-table-column prop="moneytime" label="提现时间" align="center" :show-overflow-tooltip="true"
|
|
min-width="130px"></el-table-column>
|
|
<el-table-column prop="auditname" label="审核人" align="center" :show-overflow-tooltip="true"
|
|
min-width="60px"></el-table-column>
|
|
<el-table-column prop="auditnotes" label="审核备注" align="center" :show-overflow-tooltip="true"
|
|
min-width="100px"></el-table-column>
|
|
<el-table-column fixed="right" min-width="70" label="操作">
|
|
<template slot-scope="scope">
|
|
<el-button type="text"
|
|
size="small"
|
|
v-if="operate.audit&&scope.row.moneystate== 2"
|
|
@click="auditOrder(scope.row.id)">审核结算
|
|
</el-button>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
<el-pagination
|
|
@size-change="sizeChange"
|
|
@current-change="currentChange"
|
|
layout="total, sizes, prev, pager, next, jumper"
|
|
:pager-count="5"
|
|
:page-sizes="[10,20,30,40,50,60,70,80,90]"
|
|
:page-size="10"
|
|
:total="count">
|
|
</el-pagination>
|
|
</div>
|
|
</div>
|
|
<script type="text/javascript">
|
|
var guideTakeApp = new Vue({
|
|
el: '#guideTakeApp',
|
|
data() {
|
|
return {
|
|
orderList: [],
|
|
count: 0,
|
|
searchForm: {
|
|
keyword: '',
|
|
startdate: '',
|
|
enddate: '',
|
|
moneystate: '',
|
|
page: 1,
|
|
limit: 10,
|
|
},
|
|
sumData: {
|
|
count: 0,
|
|
all_money: 0,
|
|
income: 0,
|
|
not_money: 0,
|
|
audit_money: 0,
|
|
do_money: 0,
|
|
},
|
|
operate: {},
|
|
}
|
|
},
|
|
methods: {
|
|
searchData() {
|
|
this.searchForm.page = 1;
|
|
this.getOrderData();
|
|
},
|
|
getOrderData() {
|
|
$.ajax({
|
|
url: "{:U('get_all_sell_list')}",
|
|
type: "post",
|
|
data: this.searchForm,
|
|
success: (res) => {
|
|
if (res.code === 0) {
|
|
this.orderList = res.data;
|
|
this.count = parseInt(res.count);
|
|
this.sumData = {
|
|
count: res.count + '(笔)',
|
|
all_money: res.all_money,
|
|
income: res.income,
|
|
not_money: res.not_money,
|
|
audit_money: res.audit_money,
|
|
do_money: res.do_money,
|
|
};
|
|
}
|
|
}
|
|
});
|
|
},
|
|
/**
|
|
* 分页
|
|
* @param int val 当前选择的页数
|
|
*/
|
|
currentChange(val) {
|
|
this.searchForm.page = val;
|
|
this.getOrderData();
|
|
},
|
|
|
|
/**
|
|
* 每页显示数量
|
|
* @param int val 数量
|
|
*/
|
|
sizeChange(val) {
|
|
this.searchForm.limit = val;
|
|
this.searchForm.page = 1;
|
|
this.getOrderData();
|
|
},
|
|
//审核
|
|
auditOrder(id) {
|
|
top.layer.open({
|
|
type: 2,
|
|
content: "{:U('audit')}?id=" + id,
|
|
title: "审核打款",
|
|
area: ['550px', '670px'],
|
|
btnAlign: 'c',
|
|
end: () => {
|
|
this.getOrderData();
|
|
}
|
|
})
|
|
},
|
|
//批量审核
|
|
batchAuditOrder() {
|
|
top.layer.open({
|
|
type: 2,
|
|
title: '批量审核',
|
|
area: ['calc(100% - 160px)', 'calc(100% - 65px)'],
|
|
offset: 'rb',
|
|
shade: 0,
|
|
content: "{:U('batchAudit')}",
|
|
end: function () {
|
|
MenuApp.refreshWindow();
|
|
}
|
|
});
|
|
},
|
|
//导出
|
|
exportExcel() {
|
|
this.$confirm('确认导出所有销售数据?', '提示', {
|
|
confirmButtonText: '确定',
|
|
cancelButtonText: '取消',
|
|
type: 'warning'
|
|
}).then(() => {
|
|
window.location.href = "{:U('all_sell_list_export')}?start_date=" + this.searchForm.startdate + "&end_date=" + this.searchForm.enddate + "&keyword=" + this.searchForm.keyword + "&moneystate=" + this.searchForm.moneystate;
|
|
}).catch(() => {
|
|
})
|
|
},
|
|
//获取操作权限
|
|
getOperate() {
|
|
var auth_list = {
|
|
all_sell_list_export: '/index.php/Retail/Guide/all_sell_list_export',
|
|
get_audit_list: '/index.php/Retail/Guide/get_audit_list',
|
|
audit: '/index.php/Retail/Guide/audit',
|
|
};
|
|
$.ajax({
|
|
url: '/index.php/Retail/Component/checkOperateAuth',
|
|
type: "post",
|
|
data: {
|
|
auth_list: JSON.stringify(auth_list),
|
|
},
|
|
success: (res) => {
|
|
if (res.status == 1) {
|
|
this.operate = res.data;
|
|
}
|
|
}
|
|
})
|
|
},
|
|
},
|
|
created() {
|
|
this.getOperate();
|
|
this.getOrderData();
|
|
}
|
|
})
|
|
</script> |