486 行
20 KiB
HTML
可执行文件
486 行
20 KiB
HTML
可执行文件
<!--收入管理-->
|
|
<!--[1.6.48]-->
|
|
<style>
|
|
th {
|
|
background-color: #f5f7fa !important;
|
|
}
|
|
|
|
th > .cell {
|
|
white-space: nowrap !important;
|
|
text-align: center;
|
|
}
|
|
|
|
th, td {
|
|
text-align: center;
|
|
line-height: 30px;
|
|
padding: 0;
|
|
}
|
|
|
|
th > .cell, td > .cell {
|
|
text-align: center;
|
|
}
|
|
|
|
.el-pagination {
|
|
padding: 8px;
|
|
}
|
|
|
|
.el-table__row > td:last-child > .cell {
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.el-divider--horizontal {
|
|
margin: 10px 0 !important;
|
|
}
|
|
|
|
.headers-box {
|
|
display: flex;
|
|
width: 100%;
|
|
flex-wrap: wrap;
|
|
overflow-x: auto;
|
|
margin-bottom: 2px;
|
|
}
|
|
|
|
.headers-box > .el-input, .headers-box > .el-select {
|
|
margin-right: 10px;
|
|
}
|
|
|
|
.headers-list {
|
|
width: 20%;
|
|
min-width: 150px;
|
|
height: 6vw;
|
|
min-height: 90px;
|
|
margin: 0 20px;
|
|
text-align: center;
|
|
display: flex;
|
|
align-items: center;
|
|
flex-direction: column;
|
|
justify-content: center;
|
|
background-color: #ebeef5;
|
|
}
|
|
|
|
.headers-list-size {
|
|
font-size: 22px;
|
|
text-align: center;
|
|
margin-right: 19px;
|
|
margin-top: 10px;
|
|
}
|
|
</style>
|
|
<body>
|
|
<div id="franchiseStoreApp" v-cloak>
|
|
<div class="headers-box" style="flex-wrap: nowrap">
|
|
<div class="headers-list">
|
|
<div>总收入(元)</div>
|
|
<div class="headers-list-size">{{store_total_money}}</div>
|
|
</div>
|
|
<div class="headers-list">
|
|
<div>总提现金额(元)</div>
|
|
<div class="headers-list-size">{{total_money}}</div>
|
|
</div>
|
|
<div class="headers-list">
|
|
<div>总平账金额(元)</div>
|
|
<div class="headers-list-size">{{total_flat_money*-1}}</div>
|
|
</div>
|
|
<div class="headers-list">
|
|
<div>待提现金额(元)</div>
|
|
<div class="headers-list-size">{{stay_money}}</div>
|
|
</div>
|
|
<div class="headers-list">
|
|
<div>待平账金额(元)</div>
|
|
<div class="headers-list-size">{{stay_flat_money*-1}}</div>
|
|
</div>
|
|
</div>
|
|
<el-divider></el-divider>
|
|
<div class="headers-box">
|
|
<el-select v-model="settlement" size="small" clearable placeholder="结算周期">
|
|
<el-option v-for="item in settlement_interval" :key="item.value" :label="item.label"
|
|
:value="item.value">
|
|
</el-option>
|
|
</el-select>
|
|
<el-select v-model="data_type" size="small" clearable placeholder="结算方式">
|
|
<el-option v-for="item in clearing_form" :key="item.value" :label="item.label" :value="item.value">
|
|
</el-option>
|
|
</el-select>
|
|
<el-select v-model="status" size="small" clearable placeholder="审核状态">
|
|
<el-option v-for="item in audit_status" :key="item.value" :label="item.label" :value="item.value">
|
|
</el-option>
|
|
</el-select>
|
|
<div>
|
|
<el-date-picker size="small"
|
|
clearable
|
|
v-model="apply_time"
|
|
type="datetimerange"
|
|
value-format="yyyy-MM-dd"
|
|
range-separator="至"
|
|
start-placeholder="开始时间" end-placeholder="结束时间">
|
|
</el-date-picker>
|
|
<el-tooltip class="item"
|
|
style="margin-top: 8px;margin-left: 5px;"
|
|
effect="dark"
|
|
content="账单生成时间"
|
|
placement="top-start">
|
|
<i class="el-icon-question"></i>
|
|
</el-tooltip>
|
|
</div>
|
|
</div>
|
|
<div style="margin-top: 10px">
|
|
<el-button type="primary" plain size="small" @click="currentPage=1;getData()">搜索</el-button>
|
|
<el-button size="small" @click="exports">批量导出</el-button>
|
|
</div>
|
|
<hr/>
|
|
<div style="width: 100%">
|
|
<el-table ref="multipleTable"
|
|
:data="tableData" tooltip-effect="dark" size="small"
|
|
style="width: 100%" border
|
|
@selection-change="handleSelectionChange">
|
|
<el-table-column type="index" label="序号" width="80"></el-table-column>
|
|
<el-table-column prop="store_name" label="结算门店" min-width="120px"></el-table-column>
|
|
<el-table-column prop="franchisee_time" label="结算日期" min-width="290px"></el-table-column>
|
|
<el-table-column prop="add_time" label="账单生成时间" min-width="150px"></el-table-column>
|
|
<el-table-column prop="apply_time" label="申请时间" min-width="150px"></el-table-column>
|
|
<el-table-column prop="type_remark" label="结算方式"></el-table-column>
|
|
<el-table-column prop="money" label="结算金额"></el-table-column>
|
|
<el-table-column prop="status_remark" label="审核状态" min-width="90px"></el-table-column>
|
|
<el-table-column v-if="operate" prop="" label="操作" width="150">
|
|
<template slot-scope="scope">
|
|
<!--提现-->
|
|
<template v-if="scope.row.data_type==1">
|
|
<template v-if="scope.row.status==1||scope.row.status==3">
|
|
<el-button type="text" size="mini" @click="operatingReceipt(1,scope.row)">申请提现</el-button>
|
|
</template>
|
|
<el-button v-else type="text" size="mini" @click="operatingReceipt(2,scope.row)">详情</el-button>
|
|
<template v-if="scope.row.status==3">
|
|
<el-button type="text" size="mini" @click="reject(scope.row)">驳回信息</el-button>
|
|
</template>
|
|
<template v-if="scope.row.status==5">
|
|
<el-button type="text" size="mini" @click="seeMakeMoney(scope.row)">
|
|
打款详情
|
|
</el-button>
|
|
</template>
|
|
</template>
|
|
<!--平账-->
|
|
<template v-else>
|
|
<el-button type="text" size="mini" @click="operatingReceipt(4,scope.row)">详情</el-button>
|
|
<template v-if="scope.row.status==9||scope.row.status==7">
|
|
<el-button type="text" size="mini" @click="reconciliation(scope.row)">申请平账</el-button>
|
|
</template>
|
|
<template v-if="scope.row.status==7">
|
|
<el-button type="text" size="mini" @click="reject(scope.row)">驳回信息</el-button>
|
|
</template>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
|
|
</el-table>
|
|
<el-pagination @size-change="handleSizeChange"
|
|
@current-change="handleCurrentChange"
|
|
:current-page="currentPage"
|
|
:page-sizes="[10, 15, 20, 25, 30, 35, 40, 45, 50]"
|
|
:page-size="limit"
|
|
layout="total, sizes, prev, pager, next, jumper"
|
|
:total="total_num">
|
|
</el-pagination>
|
|
</div>
|
|
<!--打款详情-->
|
|
<el-dialog :title="settlement_data.title"
|
|
:visible.sync="showSettlementDetail"
|
|
:modal-append-to-body="false"
|
|
:append-to-body="false">
|
|
<div style="padding: 0 20px;">
|
|
<el-form label-width="136px" size="small">
|
|
<el-form-item label="结算账户类型:">
|
|
<span v-if="settlement_data.clearing_form==1">银行卡</span>
|
|
<span v-if="settlement_data.clearing_form==2">支付宝</span>
|
|
</el-form-item>
|
|
<el-form-item label="账号:">{{settlement_data.account_number}}</el-form-item>
|
|
<el-form-item v-if="settlement_data.clearing_form==1" label="开户行信息:">{{settlement_data.opening_bank}}
|
|
</el-form-item>
|
|
<el-form-item label="姓名:">{{settlement_data.name}}</el-form-item>
|
|
<el-form-item label="打款金额:">
|
|
<span style="font-weight: bold;font-size: 16px">{{settlement_data.money}}</span>
|
|
</el-form-item>
|
|
</el-form>
|
|
</div>
|
|
</el-dialog>
|
|
<!--驳回详情-->
|
|
<el-dialog :title="reject_data.title"
|
|
:visible.sync="showRejectDetail"
|
|
:modal-append-to-body="false"
|
|
:append-to-body="false">
|
|
<div style="padding: 0 20px;">
|
|
<el-form label-width="136px">
|
|
<el-form-item label="驳回时间:">{{reject_data.time}}</el-form-item>
|
|
<el-form-item label="驳回原因:">{{reject_data.reject_reason}}</el-form-item>
|
|
</el-form>
|
|
</div>
|
|
</el-dialog>
|
|
</div>
|
|
<script src="__PUBLIC__/jquery/js/jquery-3.2.1.min.js"></script>
|
|
<script type="text/javascript">
|
|
var franchiseStoreApp = new Vue({
|
|
el: '#franchiseStoreApp',
|
|
data: function () {
|
|
return {
|
|
business: "",
|
|
recharge_income: "",
|
|
nubmoney: "",
|
|
Amountmoney: '',
|
|
namid: '',
|
|
total_money: '',
|
|
total_flat_money: '',
|
|
stay_money: '',
|
|
stay_flat_money: '',
|
|
store_total_money: "",
|
|
loading: true,
|
|
settlement: '',
|
|
data_type: '',
|
|
audit: '',
|
|
apply_time: '',
|
|
status: '',
|
|
limit: 10,
|
|
type: '',
|
|
total_num: 0,
|
|
currentPage: 1,
|
|
pageSize: 10,
|
|
currentLen: 0,
|
|
settlement_interval: [
|
|
{
|
|
value: 1,
|
|
label: '日结'
|
|
}, {
|
|
value: 2,
|
|
label: '周结'
|
|
}, {
|
|
value: 3,
|
|
label: '月结'
|
|
},
|
|
],
|
|
clearing_form: [
|
|
{
|
|
value: '1',
|
|
label: '提现'
|
|
}, {
|
|
value: '2',
|
|
label: '平账'
|
|
},
|
|
],
|
|
audit_status: [
|
|
{
|
|
value: 1,
|
|
label: '待提现'
|
|
}, {
|
|
value: 2,
|
|
label: '提现待审核'
|
|
}, {
|
|
value: 3,
|
|
label: '提现驳回'
|
|
}, {
|
|
value: 4,
|
|
label: '提现通过待打款'
|
|
}, {
|
|
value: 5,
|
|
label: '已打款'
|
|
}, {
|
|
value: 6,
|
|
label: '平账待审核'
|
|
}, {
|
|
value: 7,
|
|
label: '平账驳回'
|
|
}, {
|
|
value: 8,
|
|
label: '已平账'
|
|
}, {
|
|
value: 9,
|
|
label: '待平账'
|
|
}, {
|
|
value: 10,
|
|
label: '无需操作'
|
|
}
|
|
],
|
|
tableData: [],
|
|
settlement_data: {},//打款详情
|
|
showSettlementDetail: false,//是否显示打款详情
|
|
reject_data: {},//打款详情
|
|
showRejectDetail: false,//是否显示打款详情
|
|
operate: false,//操作权限
|
|
}
|
|
},
|
|
methods: {
|
|
getData() {
|
|
$.ajax({
|
|
url: "{:U('getList')}",
|
|
type: 'post',
|
|
data: {
|
|
user_type: 2,//1商户 2门店
|
|
status: this.status, //审核状态
|
|
data_type: this.data_type, //结算方式
|
|
money: this.tableData.money, //结算金额
|
|
type: this.settlement, //结算周期
|
|
page: this.currentPage, //页数
|
|
limit: this.pageSize, //列表页数
|
|
start_time: this.apply_time ? this.apply_time[0] : '', //开始时间
|
|
end_time: this.apply_time ? this.apply_time[1] : '', //结束时间
|
|
},
|
|
dataType: 'json',
|
|
success: res => {
|
|
console.log(res);
|
|
this.tableData = res.data;
|
|
this.total_num = res.pages.total_num;
|
|
},
|
|
error: res => {
|
|
this.requestError(res);
|
|
}
|
|
})
|
|
},
|
|
//获取统计数据
|
|
getSumTotal() {
|
|
$.ajax({
|
|
url: "{:U('getSumTotal')}",
|
|
type: 'post',
|
|
data: {
|
|
user_type: 2,//1商户 2门店
|
|
status: this.status, //审核状态
|
|
data_type: this.data_type, //结算方式
|
|
money: this.tableData.money, //结算金额
|
|
type: this.settlement, //结算周期
|
|
start_time: this.apply_time ? this.apply_time[0] : '', //开始时间
|
|
end_time: this.apply_time ? this.apply_time[1] : '', //结束时间
|
|
},
|
|
dataType: 'json',
|
|
success: res => {
|
|
console.log(res);
|
|
if (res.status == 1) {
|
|
this.total_money = res.total.total_money ? res.total.total_money : '0.00';
|
|
this.total_flat_money = res.total.total_flat_money ? res.total.total_flat_money : '0.00';
|
|
this.stay_money = res.total.stay_money ? res.total.stay_money : '0.00';
|
|
this.stay_flat_money = res.total.stay_flat_money ? res.total.stay_flat_money : '0.00';
|
|
this.store_total_money = res.total.store_total_money ? res.total.store_total_money : '0.00';
|
|
} else {
|
|
this.$confirm(res.msg, "错误提示", {
|
|
confirmButtonText: '确定',
|
|
showCancelButton: false,
|
|
type: 'error'
|
|
}).then(() => {
|
|
}).catch(() => {
|
|
})
|
|
}
|
|
},
|
|
error: res => {
|
|
this.requestError(res);
|
|
}
|
|
})
|
|
},
|
|
//错误提示
|
|
requestError(res) {
|
|
console.log(res);
|
|
this.$confirm("请求发生错误", "错误提示", {
|
|
confirmButtonText: '确定',
|
|
showCancelButton: false,
|
|
type: 'error'
|
|
}).then(() => {
|
|
}).catch(() => {
|
|
})
|
|
},
|
|
//数据导出
|
|
exports() {
|
|
var arr = [
|
|
`user_type=2`,
|
|
`type=${this.type}`,
|
|
`data_type=${this.data_type}`,
|
|
`status=${this.status}`,
|
|
`start_time=${this.apply_time ? this.apply_time[0] : ''}`, //开始时间
|
|
`end_time=${this.apply_time ? this.apply_time[1] : ''}`, //结束时间
|
|
];
|
|
console.log(arr)
|
|
location.href = `{:U('accountCSV')}?${arr.join('&')}`;
|
|
},
|
|
|
|
handleSelectionChange(val) {
|
|
this.multipleSelection = [];
|
|
val.forEach(item => {
|
|
this.multipleSelection.push(item.id)
|
|
console.log(item)
|
|
});
|
|
console.log(val);
|
|
},
|
|
handleSizeChange: function (val) {
|
|
this.pageSize = val;
|
|
this.currentPage = 1;
|
|
this.getData();
|
|
},
|
|
handleCurrentChange: function (val) {
|
|
this.currentPage = val;
|
|
this.getData();
|
|
},
|
|
|
|
//申请提现、提现详情、平账详情
|
|
operatingReceipt: function (type, item) {
|
|
item.operating_user = 2;//1商户 2门店
|
|
sessionStorage.setItem("operatingReceipt", JSON.stringify(item));
|
|
var title = {
|
|
1: '提现审核',
|
|
2: '提现详情',
|
|
4: '平账详情',
|
|
};
|
|
MenuApp.pathData.push({
|
|
name: title[type],
|
|
path: '/index.php/Retail/FranchiseDeal/operatingReceipt',
|
|
onClose: () => {
|
|
this.getData();
|
|
}
|
|
});
|
|
},
|
|
//查看打款详情
|
|
seeMakeMoney: function (item) {
|
|
this.settlement_data = JSON.parse(item.settlement_json);
|
|
this.settlement_data.title = `打款详情 - ${item.store_name} - ${item.franchisee_time}`;
|
|
this.showSettlementDetail = true;
|
|
},
|
|
//查看驳回信息
|
|
reject: function (item) {
|
|
this.reject_data = {
|
|
title: `驳回详情 - ${item.store_name} - ${item.franchisee_time}`,
|
|
time: item.reject_time,
|
|
reject_reason: item.reject_reason,
|
|
};
|
|
this.showRejectDetail = true;
|
|
},
|
|
//申请平账
|
|
reconciliation: function (item) {
|
|
sessionStorage.setItem("reconciliation", JSON.stringify(item));
|
|
MenuApp.pathData.push({
|
|
name: '申请平账',
|
|
path: '/index.php/Retail/FranchiseDeal/reconciliation',
|
|
onClose: () => {
|
|
this.getData();
|
|
}
|
|
});
|
|
},
|
|
},
|
|
mounted() {
|
|
this.getData();
|
|
this.getSumTotal();
|
|
//获取操作权限
|
|
var auth_list = {
|
|
operate: '/index.php/Retail/FranchiseDeal/status',
|
|
};
|
|
$.ajax({
|
|
url: "{:U('Retail/Component/checkOperateAuth')}",
|
|
type: "post",
|
|
data: {
|
|
auth_list: JSON.stringify(auth_list),
|
|
},
|
|
success: (res) => {
|
|
if (res.status == 1 && res.data.operate) {
|
|
this.operate = true;
|
|
}
|
|
}
|
|
})
|
|
},
|
|
|
|
created: function () {
|
|
sessionStorage.removeItem("operatingReceipt");
|
|
}
|
|
});
|
|
</script>
|
|
</body>
|