493 行
23 KiB
HTML
可执行文件
493 行
23 KiB
HTML
可执行文件
<!--[1.9.20]-->
|
|
<link rel="stylesheet" href="/Public/Retail/css/order-details.css">
|
|
<link rel="stylesheet" href="/Public/css/component-serial.css">
|
|
<link rel="stylesheet" href="/Public/css/component-serial-modify-record.css">
|
|
<link rel="stylesheet" href="/Public/css/component-blessing.css">
|
|
<div id="receblesApp" v-cloak>
|
|
<!--<div class="page-tips">-->
|
|
<!-- <p>默认展示当月数据</p>-->
|
|
<!--</div>-->
|
|
<el-tabs v-model="activeName" @tab-click="handleClick">
|
|
<el-tab-pane label="申请结算" name="first">
|
|
<!--<div class="table-top-card-box">-->
|
|
<!-- <div class="table-top-card">-->
|
|
<!-- <div class="table-top-card-header">本店消费</div>-->
|
|
<!-- <div class="table-top-card-body">{{totalMoney}}元</div>-->
|
|
<!-- </div>-->
|
|
<!--</div>-->
|
|
|
|
<el-form :inline="true" size="small">
|
|
<el-form-item>
|
|
<el-date-picker @change="dateCharge()" type="daterange" v-model="timer" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
|
|
</el-form-item>
|
|
<!--<el-form-item>-->
|
|
<!-- <el-input placeholder="订单号搜索" type="text" class="page-input" v-model="order_no" clearable-->
|
|
<!-- @keydown.enter.exact.native.prevent="search">-->
|
|
<!-- </el-input>-->
|
|
<!--</el-form-item>-->
|
|
<!-- <el-form-item>-->
|
|
<!-- <el-select v-model="type" placeholder="展示类型">-->
|
|
<!-- <el-option label="申请结算" value="1"></el-option>-->
|
|
<!-- <el-option label="确认结算" value="2"></el-option>-->
|
|
<!-- </el-select>-->
|
|
<!-- </el-form-item>-->
|
|
<el-form-item>
|
|
<el-button type="primary" @click="search">查询</el-button>
|
|
</el-form-item>
|
|
</el-form>
|
|
|
|
<div style="max-width: calc(100vw - 208px);margin-top: 20px;">
|
|
<el-table border :data="list" size="mini" max-height="500"
|
|
:header-cell-style="{background:'#F5F7FA',color:'#606266'}">
|
|
<el-table-column align="center" prop="storetag" label="店铺名称"></el-table-column>
|
|
<el-table-column align="center" prop="address" label="地址"></el-table-column>
|
|
<el-table-column align="center" prop="add_money" label="该店积分消费(¥)"></el-table-column>
|
|
<!--<el-table-column align="center" prop="dec_money" label="支出(¥)"></el-table-column>-->
|
|
<!--<el-table-column align="center" label="差额(¥)">-->
|
|
|
|
<!-- <template slot-scope="scope">-->
|
|
<!-- <span style="color: red;">-->
|
|
<!-- {{ Number(scope.row.add_money - scope.row.dec_money).toFixed(3) }}-->
|
|
<!-- </span>-->
|
|
<!-- </template>-->
|
|
|
|
<!--</el-table-column>-->
|
|
<!--<el-table-column align="center" width="180" prop="order_num" label="订单号">-->
|
|
<!--</el-table-column>-->
|
|
<!--<el-table-column align="center" prop="title" label="店铺名称" min-width="220" show-overflow-tooltip>-->
|
|
<!--</el-table-column>-->
|
|
<!--<el-table-column align="center" prop="name" label="联系人" min-width="80" show-overflow-tooltip>-->
|
|
<!--</el-table-column>-->
|
|
<!--<el-table-column align="center" prop="mobile" label="联系电话" min-width="150" show-overflow-tooltip>-->
|
|
<!--</el-table-column>-->
|
|
<!--</el-table-column>-->
|
|
<!--<el-table-column align="center" prop="money" label="会员卡消费结余" min-width="120" show-overflow-tooltip>-->
|
|
<!--</el-table-column>-->
|
|
<!--<el-table-column align="center" label="状态" width="120">-->
|
|
<!-- <template slot-scope="scope">-->
|
|
<!-- <span style="color: red;" v-if="scope.row.status == 3">待结算</span>-->
|
|
<!-- <span style="color: orange;"-->
|
|
<!-- v-if="storeId == scope.row.use_store_id && scope.row.status == 2">申请中</span>-->
|
|
<!-- <span style="color: orange;" v-if="storeId == scope.row.recharge_store_id && scope.row.status == 2">待确认</span>-->
|
|
<!-- <span style="color: green;" v-if="scope.row.status == 1">已结算</span>-->
|
|
<!-- </template>-->
|
|
<!--</el-table-column>-->
|
|
<!--<el-table-column align="center" prop="create_time" label="记录时间" min-width="160" show-overflow-tooltip>-->
|
|
<!--</el-table-column>-->
|
|
|
|
<el-table-column align="center" fixed="right" label="操作" width="170">
|
|
<template slot-scope="scope">
|
|
<el-button v-if="scope.row.add_money > 0" @click="applyFor(scope.row)" type="text"
|
|
size="mini">
|
|
申请结算
|
|
</el-button>
|
|
|
|
<el-button v-else style="color:#9a9a9a;" type="text"
|
|
size="mini">
|
|
不需结算
|
|
</el-button>
|
|
|
|
<!--<el-button @click="confirmMoney(scope.row)" type="text"-->
|
|
<!-- size="mini">-->
|
|
<!-- 确认结算-->
|
|
<!--</el-button>-->
|
|
</template>
|
|
</el-table-column>
|
|
|
|
<!--<el-table-column align="center" fixed="right" label="操作" width="170">-->
|
|
<!-- <template slot-scope="scope">-->
|
|
<!-- <el-button @click="applyFor(scope.row)"-->
|
|
<!-- v-if="storeId == scope.row.use_store_id && scope.row.status == 3" type="text"-->
|
|
<!-- size="mini">-->
|
|
<!-- 申请结算-->
|
|
<!-- </el-button>-->
|
|
<!-- <el-button @click="confirmMoney(scope.row)"-->
|
|
<!-- v-if="storeId == scope.row.recharge_store_id && scope.row.status == 2" type="text"-->
|
|
<!-- size="mini">-->
|
|
<!-- 确认结算-->
|
|
<!-- </el-button>-->
|
|
<!-- </template>-->
|
|
<!--</el-table-column>-->
|
|
<div slot="empty" v-if="!loading">暂无数据</div>
|
|
<div slot="empty" v-else><span class="el-icon-loading"></span></div>
|
|
</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="100"-->
|
|
<!-- layout="total, sizes, prev, pager, next, jumper" :total="currentLen">-->
|
|
<!--</el-pagination>-->
|
|
</div>
|
|
</el-tab-pane>
|
|
<el-tab-pane label="结算审核" name="second">
|
|
|
|
<el-select v-model="value" placeholder="请选择类型" @change="selectChange()" style="margin-bottom:10px;">
|
|
<el-option
|
|
v-for="item in options"
|
|
:key="item.value"
|
|
:label="item.label"
|
|
:value="item.value">
|
|
</el-option>
|
|
</el-select>
|
|
|
|
<div style="max-width: calc(100vw - 10px);">
|
|
<el-table border :data="cash_order_list"
|
|
size="mini" :header-cell-style="{background:'#F5F7FA',color:'#606266'}"
|
|
max-height="500"
|
|
v-loading="loading"
|
|
element-loading-text="数据获取中"
|
|
element-loading-spinner="el-icon-loading">
|
|
<el-table-column align="center" fixed="right" label="店铺名称">
|
|
<template slot-scope="scope">
|
|
<span>{{scope.row.pay_store.storetag}}</span>
|
|
</template>
|
|
</el-table-column>
|
|
|
|
<el-table-column align="center" fixed="right" label="地址">
|
|
<template slot-scope="scope">
|
|
<span>{{scope.row.pay_store.address}}</span>
|
|
</template>
|
|
</el-table-column>
|
|
|
|
<el-table-column align="center" fixed="right" label="结算金额(¥)" prop="money">
|
|
</el-table-column>
|
|
|
|
<el-table-column align="center" fixed="right" label="发起时间" prop="add_time">
|
|
</el-table-column>
|
|
|
|
<el-table-column align="center" fixed="right" label="结算状态/操作">
|
|
<template slot-scope="scope">
|
|
<div style="width:100%" v-if="scope.row.current_store == scope.row.store_id">
|
|
<span style="color:green" v-if="scope.row.state == 2">
|
|
{{ scope.row.state == 1 ? '待审核' : (scope.row.state == 2 ? '已结算' : '未通过') }}
|
|
</span>
|
|
|
|
<span style="color:red" v-else>
|
|
{{ scope.row.state == 1 ? '待审核' : (scope.row.state == 2 ? '已结算' : '未通过') }}
|
|
</span>
|
|
</div>
|
|
|
|
<div style="width:100%" v-else>
|
|
<div v-if="scope.row.state == 1">
|
|
<el-row>
|
|
<el-button type="success" size="mini" @click="successCashOut(scope.row.id,2)">通过</el-button>
|
|
<el-button type="danger" size="mini" @click="successCashOut(scope.row.id,3)">拒绝</el-button>
|
|
</el-row>
|
|
</div>
|
|
|
|
<span style="color:green" v-if="scope.row.state == 2">
|
|
已结算
|
|
</span>
|
|
|
|
<span style="color:green" v-if="scope.row.state == 3">
|
|
拒绝结算
|
|
</span>
|
|
</div>
|
|
|
|
<!--<span style="color:red;">{{scope.row.current_store == }}</span>-->
|
|
</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="100"
|
|
layout="total, sizes, prev, pager, next, jumper"
|
|
:total="currentLen">
|
|
</el-pagination>
|
|
</div>
|
|
|
|
</el-tab-pane>
|
|
</el-tabs>
|
|
<!--订单详情-->
|
|
<order-details :show.sync="showOrderDetails" :order-no="details_order_no"></order-details>
|
|
|
|
<!--支付详情-->
|
|
<pay-order-details :show.sync="showPayDetails" order-genre="0" :order-no="details_order_no"></pay-order-details>
|
|
|
|
<!-- 祝福语 -->
|
|
<component-blessing :visible.sync="blessingDialogVisible" :id="blessingOrderId"></component-blessing>
|
|
</div>
|
|
<script src="/Public/Retail/js/select-cashier.js"></script>
|
|
<script src="/Public/Retail/js/select-pay-type.js"></script>
|
|
<script src="/Public/js/component-serial.js?v=1.0.0"></script>
|
|
<script src="/Public/js/component-serial-modify-record.js?v=1.0.0"></script>
|
|
<script src="/Public/Retail/js/order-details.js"></script>
|
|
<script src="/Public/js/component-blessing.js?v=1.0.0"></script>
|
|
<script type="text/javascript">
|
|
var receblesApp = new Vue({
|
|
el: '#receblesApp',
|
|
data: {
|
|
options: [{
|
|
value: '1',
|
|
label: '我发起'
|
|
},{
|
|
value: '2',
|
|
label: '我审核'
|
|
}],
|
|
value: "",
|
|
totalMoney: 0,
|
|
storeId: '',
|
|
type: '1',
|
|
list: [],
|
|
activeName:"first",
|
|
currentPage: 1,
|
|
currentLimit: 10,
|
|
currentLen: 0,
|
|
operate: {},
|
|
sell_count: '',
|
|
refund_count: '',
|
|
sell_money: '',
|
|
refund_money: '',
|
|
money: '',
|
|
exchange_money: '',
|
|
dismoney: '',
|
|
cashier_manual_money: '',
|
|
cashierdiscountmoney: '',
|
|
small_changes_money: '',
|
|
pay_coupon_money: '',
|
|
time: [],
|
|
timer : [],
|
|
order_no: '',
|
|
member_number: '',
|
|
mec_vip_key: '',
|
|
mec_villages_id: '',
|
|
cashier_id: '',
|
|
pay_type: '',
|
|
order_type: '',
|
|
user_type: '',
|
|
showOrderDetails: false,
|
|
showPayDetails: false,
|
|
cash_order_list:[],
|
|
loading: false, // 加载
|
|
other_type: '', // 其他支付类型
|
|
details_order_no: '',//查看详情的订单号
|
|
blessingDialogVisible: false, //祝福语组件开关
|
|
blessingOrderId: null, //当前祝福语订单ID
|
|
blessingAuthority: false, //当前门店是否具备祝福语权限
|
|
mecPayType: false,//德育币会员
|
|
},
|
|
methods: {
|
|
selectChange(){
|
|
this.currentPage = 1
|
|
this.getCashOutList()
|
|
},
|
|
confirmMoney(item) {
|
|
this.$confirm('您确定要结算吗?', '提示', {
|
|
confirmButtonText: '确定',
|
|
cancelButtonText: '取消',
|
|
type: 'info'
|
|
}).then(() => {
|
|
this.loading = true;
|
|
$.ajax({
|
|
url: "{:U('confirmMoney')}",
|
|
type: "POST",
|
|
data: {
|
|
order: item.order_num
|
|
},
|
|
success: (res) => {
|
|
this.loading = false;
|
|
if (res.code === 200) {
|
|
this.$message({
|
|
type: 'success',
|
|
message: res.msg
|
|
});
|
|
this.getData();
|
|
} else {
|
|
this.$message({
|
|
type: 'warning',
|
|
message: res.msg
|
|
});
|
|
}
|
|
}
|
|
})
|
|
}).catch(() => {
|
|
|
|
});
|
|
},
|
|
// 申请结算
|
|
applyFor(item) {
|
|
this.$confirm('您确定要申请结算吗?', '提示', {
|
|
confirmButtonText: '确定',
|
|
cancelButtonText: '取消',
|
|
type: 'info'
|
|
}).then(() => {
|
|
this.loading = true;
|
|
$.ajax({
|
|
url: "{:U('applyFor1')}",
|
|
type: "POST",
|
|
data: {
|
|
// order: item.order_num
|
|
storeId : item.id,
|
|
date : this.list.date
|
|
},
|
|
success: (res) => {
|
|
this.loading = false;
|
|
if (res.code === 200) {
|
|
this.$message({
|
|
type: 'success',
|
|
message: res.msg
|
|
});
|
|
this.getData();
|
|
this.getCashOutList()
|
|
} else {
|
|
this.$message({
|
|
type: 'warning',
|
|
message: res.msg
|
|
});
|
|
}
|
|
}
|
|
})
|
|
}).catch(() => {
|
|
|
|
});
|
|
},
|
|
handleSizeChange(val) {
|
|
this.currentLimit = val;//切换每页数量
|
|
this.currentPage = 1;
|
|
this.getData();
|
|
},
|
|
|
|
handleCurrentChange(val) {
|
|
this.currentPage = val;
|
|
this.getData();//切换页数
|
|
},
|
|
|
|
successCashOut(id,state){
|
|
this.$confirm('确定'+ (state == 2 ? '通过' : '拒绝') +'此条结算?', '提示', {
|
|
confirmButtonText: '确定',
|
|
cancelButtonText: '取消',
|
|
type: 'info'
|
|
}).then(() => {
|
|
this.loading = true;
|
|
$.ajax({
|
|
url: "{:U('successCashOut')}",
|
|
type: "POST",
|
|
data: {
|
|
// order: item.order_num
|
|
id,
|
|
state
|
|
},
|
|
success: (res) => {
|
|
console.log(res)
|
|
this.loading = false;
|
|
if (res.code === 200) {
|
|
this.$message({
|
|
type: 'success',
|
|
message: res.msg
|
|
});
|
|
this.getCashOutList();
|
|
} else {
|
|
this.$message({
|
|
type: 'warning',
|
|
message: res.msg
|
|
});
|
|
}
|
|
}
|
|
})
|
|
}).catch(() => {
|
|
|
|
});
|
|
},
|
|
//搜索
|
|
search() {
|
|
this.currentPage = 1;
|
|
this.getData();
|
|
},
|
|
handleClick(tab,event){
|
|
this.activeName = tab.paneName
|
|
},
|
|
dateCharge(e){
|
|
var time_arr = []
|
|
|
|
this.timer.forEach((item,index)=>{
|
|
var t = new Date(item)
|
|
var newTime = `${ ""+t.getFullYear() + '-' +((t.getMonth() + 1) < 10 ? '0'+(t.getMonth() + 1) : ""+(t.getMonth() + 1)) + '-' + (t.getDate() < 0 ? '0'+ t.getDate() : ""+t.getDate())}`
|
|
|
|
time_arr.push(newTime)
|
|
})
|
|
|
|
this.time = time_arr
|
|
},
|
|
timeFormate(time){
|
|
|
|
},
|
|
getCashOutList(){
|
|
this.loading = true;
|
|
$.ajax({
|
|
url: "{:U('getCashOutList')}",
|
|
type: "POST",
|
|
data: {
|
|
page: this.currentPage,
|
|
limit: this.currentLimit,
|
|
time: this.time,
|
|
type: this.value
|
|
},
|
|
success: (res) => {
|
|
console.log(res)
|
|
|
|
this.loading = false;
|
|
if (res.code === 0) {
|
|
this.cash_order_list = []
|
|
this.cash_order_list = res.data
|
|
// this.currentLen = parseInt(res.count);
|
|
// this.storeId = res.store_id;
|
|
// this.totalMoney = res.totalMoney;
|
|
} else {
|
|
this.$message.error('数据获取失败');
|
|
}
|
|
}
|
|
})
|
|
},
|
|
getData() {
|
|
this.loading = true;
|
|
$.ajax({
|
|
url: "{:U('getVipUserList')}",
|
|
type: "POST",
|
|
data: {
|
|
page: this.currentPage,
|
|
limit: this.currentLimit,
|
|
time: this.time,
|
|
order_no: this.order_no,
|
|
type: this.type
|
|
},
|
|
success: (res) => {
|
|
console.log(res)
|
|
|
|
this.loading = false;
|
|
if (res.code === 0) {
|
|
this.list = [];
|
|
this.list = res.data;
|
|
// this.currentLen = parseInt(res.count);
|
|
// this.storeId = res.store_id;
|
|
// this.totalMoney = res.totalMoney;
|
|
} else {
|
|
this.$message.error('数据获取失败');
|
|
}
|
|
}
|
|
})
|
|
},
|
|
},
|
|
created() {
|
|
// this.time = this.getThisMonthTime();
|
|
this.getData();
|
|
this.getCashOutList()
|
|
this.checkOperateAuth({
|
|
export: '/index.php/Retail/Sale/export',
|
|
sell_goods_info: '/index.php/Retail/Sale/sell_goods_info',
|
|
wifiPrint: '/index.php/Retail/Sale/storeIdGet',
|
|
orderPrint: '/index.php/Retail/WebPrint/orderPrint',
|
|
}, (data) => {
|
|
this.operate = data;
|
|
})
|
|
this.sendRequest('Retail/Mgoods/getPlatformType', {
|
|
success: (res) => {
|
|
if (res.status == 1 && res.moral_education_coin) {
|
|
this.mecPayType = true;
|
|
}
|
|
}
|
|
})
|
|
}
|
|
})
|
|
</script> |