文件
mashangyoujiu/Application/Retail/View/PayFlow/abnormal_order.html

182 行
7.2 KiB
HTML
可执行文件

<!--[1.6.48]-->
<style>
.seek {
margin-right: 10px;
margin-bottom: 10px;
white-space: nowrap;
}
.table-cell-content > div > span {
color: #999;
}
</style>
<div id="abnormalOrderApp" v-cloak>
<div style="display: flex;flex-wrap: wrap;">
<div class="seek">
<el-date-picker
v-model="searchForm.date"
type="daterange"
size="small"
:editable="false"
:clearable="false"
format="yyyy 年 MM 月 dd 日"
value-format="yyyy-MM-dd"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期">
</el-date-picker>
</div>
<div class="seek">
<el-input placeholder="内部订单号"
type="text"
size="small"
v-model="searchForm.order_no"
clearable></el-input>
</div>
<div class="seek" style="display: flex;text-align: center;">
<el-button type="primary" @click="getWaitPayFlowList" size="small">查询</el-button>
</div>
</div>
<div v-loading="loading">
<el-table :data="orderList" :highlight-current-row="true" border size="small">
<el-table-column type="index" label="序号" width="60" align="center"></el-table-column>
<el-table-column prop="store_name" label="消费门店" :show-overflow-tooltip="true"></el-table-column>
<el-table-column prop="out_trade_no" label="订单号" min-width="150px"></el-table-column>
<el-table-column prop="trade_amount" label="订单金额" :show-overflow-tooltip="true"></el-table-column>
<el-table-column prop="order_type" label="支付类型" :show-overflow-tooltip="true"></el-table-column>
<el-table-column prop="pay_type" label="支付方式" :show-overflow-tooltip="true"></el-table-column>
<el-table-column prop="m_pay_type" label="支付模式" :show-overflow-tooltip="true"></el-table-column>
<el-table-column prop="add_time" label="交易时间" min-width="100px"
:show-overflow-tooltip="true"></el-table-column>
<el-table-column label="处理订单" width="100" align="center">
<template slot-scope="scope" slot="header">
<el-tooltip class="item"
effect="dark"
placement="top-start">
<div slot="content">
<p>1.查询订单支付状态</p>
<p>2.如已支付:则修复该订单</p>
</div>
<div>处理订单<i class="el-icon-question"></i></div>
</el-tooltip>
</template>
<template slot-scope="scope">
<el-button type="text" size="mini" @click="handleOrder(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>
var abnormalOrderApp = new Vue({
el: '#abnormalOrderApp',
data: function () {
return {
searchForm: {
date: [], // 时间段
order_no: "", //订单号
page: 1, // 分页
limit: 10, // 每页显示条数
},
loading: false, // 加载
orderList: [], // 支付流水列表
count: 0, // 总数 int类型
};
},
methods: {
handleOrder(id) {
this.$loading({
lock: true,
text: '处理中,请等待',
spinner: 'el-icon-loading',
background: 'rgba(255, 255, 255, 0.7)'
});
$.ajax({
url: "{:U('handleWaitPayOrder')}",
type: 'post',
data: {
id: id,
},
success: (res) => {
this.$loading().close();
if (res.status == 1) {
this.$message({
message: res.msg,
type: 'success',
});
this.getWaitPayFlowList();
} else {
this.$alert(res.msg ? res.msg : '请求发生错误,请稍后重试!', '错误提示', {
confirmButtonText: '确定',
callback: action => {
}
});
}
},
error: (data) => {
console.log(data);
this.$loading().close();
this.$alert('请求发生错误,请稍后重试!', '错误提示', {
confirmButtonText: '确定',
callback: action => {
}
});
}
})
},
/**
* 获取列表数据
*/
getWaitPayFlowList() {
this.loading = true;
$.ajax({
url: "{:U('getWaitPayFlowList')}",
type: "post",
data: this.searchForm,
success: (res) => {
this.loading = false;
if (res.status == 1) {
this.orderList = res.data;
this.count = res.count;
}
}
});
},
/**
* 分页
* @param int val 当前选择的页数
*/
currentChange(val) {
this.searchForm.page = val;
this.getWaitPayFlowList();
},
/**
* 每页显示数量
* @param int val 数量
*/
sizeChange(val) {
this.searchForm.limit = val;
this.searchForm.page = 1;
this.getWaitPayFlowList();
},
},
created() {
this.getWaitPayFlowList();
},
})
</script>