|
|
@@ -6,7 +6,13 @@
|
|
|
<div id="logo"></div>
|
|
|
<div class="tag">订单管理</div>
|
|
|
<div>
|
|
|
- <el-select v-model="formInline.value" class="selectDate" placeholder="请选择" @change="selectTime">
|
|
|
+ <el-select v-model="form.value" class="selectDate" placeholder="请选择查找银行" @change="selectBank">
|
|
|
+ <el-option v-for="item in form.options" :key="item.value" :label="item.label" :value="item.value">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <el-select v-model="formInline.value" class="selectDate" placeholder="请选择查找时间" @change="selectTime">
|
|
|
<el-option v-for="item in formInline.options" :key="item.value" :label="item.label" :value="item.value">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
@@ -49,16 +55,17 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table> -->
|
|
|
- <el-table ref="multipleTable" :data="tableData" tooltip-effect="dark" style="width: 100%" highlight-current-row>
|
|
|
- <el-table-column label="订单号" align="center">
|
|
|
+ <el-table ref="multipleTable" :data="tableData" tooltip-effect="dark" :stripe='stripe' style="width: 100%" highlight-current-row>
|
|
|
+ <el-table-column label="订单号" align="center" width="200">
|
|
|
<template slot-scope="scope">{{ scope.row.order }}</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="id" label="学号"></el-table-column>
|
|
|
+ <el-table-column prop="id" label="学号" width="200"></el-table-column>
|
|
|
<el-table-column prop="stuName" label="姓名"></el-table-column>
|
|
|
- <el-table-column prop="class" label="班级"></el-table-column>
|
|
|
- <el-table-column prop="money" label="金额(元)"></el-table-column>
|
|
|
- <el-table-column prop="time" label="时间" widshow-overflow-tooltip></el-table-column>
|
|
|
- <el-table-column label="状态" align="center">
|
|
|
+ <el-table-column prop="class" label="班级" width="160"></el-table-column>
|
|
|
+ <el-table-column prop="money" label="金额(元)" width="100"></el-table-column>
|
|
|
+ <el-table-column prop="method" label="支付渠道"></el-table-column>
|
|
|
+ <el-table-column prop="time" label="时间" width="200"></el-table-column>
|
|
|
+ <el-table-column label="状态" align="center" width="80">
|
|
|
<template slot-scope="scope">
|
|
|
<el-tag :type="scope.row.state === '支付失败' ? 'danger' : 'success'" disable-transitions>{{scope.row.state}}
|
|
|
</el-tag>
|
|
|
@@ -126,7 +133,22 @@
|
|
|
label: '按日期选择'
|
|
|
}],
|
|
|
value: ''
|
|
|
- },
|
|
|
+ },//时间列表
|
|
|
+ form: {
|
|
|
+ user: '',
|
|
|
+ options: [{
|
|
|
+ value: 'all',
|
|
|
+ label: '全部'
|
|
|
+ }, {
|
|
|
+ value: 'jianhang',
|
|
|
+ label: '建行支付'
|
|
|
+ }, {
|
|
|
+ value: 'nongshang',
|
|
|
+ label: '农商行支付'
|
|
|
+ }],
|
|
|
+ value: ''
|
|
|
+ },//银行列表
|
|
|
+ user_info:'',
|
|
|
tableData: [], //订单数据
|
|
|
user_token: '', //token
|
|
|
all_money: 0, //总钱数
|
|
|
@@ -135,8 +157,12 @@
|
|
|
selectOrder: '', //查找订单号或姓名
|
|
|
monthValue: '', //选择的月份
|
|
|
dayValue: '', //选择的日期
|
|
|
+ timeValue: '', //选择的时间,flag为2时值为monthValue,flag为3时值为dayValue
|
|
|
flag: 1, //选择的状态
|
|
|
datestr: '', //选择的时间
|
|
|
+ stripe: true,
|
|
|
+ bankValue: '', //选择的银行
|
|
|
+ index: 1, //第几页
|
|
|
}
|
|
|
},
|
|
|
created: function() {
|
|
|
@@ -147,10 +173,27 @@
|
|
|
methods: {
|
|
|
//分页
|
|
|
handleCurrentChange(val) {
|
|
|
- this.currentPage = val;
|
|
|
+ this.index = val;
|
|
|
this.tableData = []
|
|
|
this.all_money = 0
|
|
|
- this.getTableData(this.$Api.orderList, this.flag, val)
|
|
|
+ this.getTableData(this.$Api.orderList, this.flag, this.index,)
|
|
|
+ },
|
|
|
+ //选择银行
|
|
|
+ selectBank(val){
|
|
|
+ console.log(val)
|
|
|
+ if(val == 'jianhang'){
|
|
|
+ this.bankValue = 1
|
|
|
+ this.tableData = []
|
|
|
+ this.getTableData(this.$Api.orderList, this.flag, this.index, this.selectOrder, this.timeValue, this.bankValue)
|
|
|
+ }else if(val == 'nongshang'){
|
|
|
+ this.bankValue = 2
|
|
|
+ this.tableData = []
|
|
|
+ this.getTableData(this.$Api.orderList, this.flag, this.index, this.selectOrder, this.timeValue, this.bankValue)
|
|
|
+ }else{
|
|
|
+ this.bankValue = ''
|
|
|
+ this.tableData = []
|
|
|
+ this.getTableData(this.$Api.orderList, this.flag, this.index, this.selectOrder, this.timeValue, this.bankValue)
|
|
|
+ }
|
|
|
},
|
|
|
//选择时间
|
|
|
selectTime(val) {
|
|
|
@@ -168,7 +211,7 @@
|
|
|
this.tableData = []
|
|
|
this.all_money = 0
|
|
|
this.flag = 1
|
|
|
- this.getTableData(this.$Api.orderList, this.flag)
|
|
|
+ this.getTableData(this.$Api.orderList, this.flag, this.index, this.selectOrder, this.timeValue, this.bankValue)
|
|
|
}
|
|
|
},
|
|
|
//选择月份按钮
|
|
|
@@ -178,7 +221,7 @@
|
|
|
this.btnChangeEnableMonth = false
|
|
|
}
|
|
|
},
|
|
|
- //确定选择日期
|
|
|
+ //确定日期按钮
|
|
|
handleSelectDay(){
|
|
|
if (this.dayValue != '') {
|
|
|
this.btnChangeEnableDay = false
|
|
|
@@ -186,23 +229,27 @@
|
|
|
},
|
|
|
//确定选择月份
|
|
|
selectMonth(val) {
|
|
|
- console.log(this.monthValue)
|
|
|
+ // console.log(this.monthValue)
|
|
|
this.formInline.value = this.monthValue
|
|
|
this.editdialogFormVisible = false
|
|
|
this.tableData = []
|
|
|
this.all_money = 0
|
|
|
- this.getTableData(this.$Api.orderList, this.flag, 1, '', this.monthValue)
|
|
|
+ this.timeValue = this.monthValue
|
|
|
+ this.getTableData(this.$Api.orderList, this.flag, this.index, this.selectOrder, this.timeValue, this.bankValue)
|
|
|
this.$message.success("选择成功")
|
|
|
+ // console.log(this.flag+' '+this.timeValue)
|
|
|
},
|
|
|
//确定选择日期
|
|
|
selectDay() {
|
|
|
- console.log(this.dayValue)
|
|
|
+ // console.log(this.dayValue)
|
|
|
this.formInline.value = this.dayValue
|
|
|
this.editdialogFormVisible = false
|
|
|
this.tableData = []
|
|
|
this.all_money = 0
|
|
|
- this.getTableData(this.$Api.orderList, this.flag, 1, '', this.dayValue)
|
|
|
+ this.timeValue = this.dayValue
|
|
|
+ this.getTableData(this.$Api.orderList, this.flag, this.index, this.selectOrder, this.timeValue, this.bankValue)
|
|
|
this.$message.success("选择成功")
|
|
|
+ // console.log(this.flag+' '+this.timeValue)
|
|
|
},
|
|
|
//退出选择
|
|
|
selectLogout() {
|
|
|
@@ -221,16 +268,17 @@
|
|
|
// console.log(this.selectOrder)
|
|
|
this.tableData = []
|
|
|
this.all_money = 0
|
|
|
- this.getTableData(this.$Api.orderList, this.flag, 1, this.selectOrder)
|
|
|
+ this.getTableData(this.$Api.orderList, this.flag, this.index, this.selectOrder, this.timeValue, this.bankValue)
|
|
|
},
|
|
|
//获取订单数据
|
|
|
- getTableData(url, flag, index, key, dateStr) {
|
|
|
+ getTableData(url, flag, index, key, dateStr, payMethod) {
|
|
|
this.$axios.get(url + '?' + this.$qs.stringify({
|
|
|
'flag': flag,
|
|
|
'curPage': index,
|
|
|
'pageSize': this.pageSize,
|
|
|
'keyword': key,
|
|
|
- 'dateStr': dateStr
|
|
|
+ 'dateStr': dateStr,
|
|
|
+ 'payMethod': payMethod
|
|
|
}), {
|
|
|
headers: {
|
|
|
'Content-Type': 'application/x-www-form-urlencoded;charset=utf-8',
|
|
|
@@ -238,7 +286,7 @@
|
|
|
'admin_token': this.user_token
|
|
|
}
|
|
|
}).then(res => {
|
|
|
- // console.log(res)
|
|
|
+ console.log(res)
|
|
|
this.totalCount = res.data.data.page.totalCount
|
|
|
for (var i = 0; i < res.data.data.page.list.length; i++) {
|
|
|
var list = {}
|
|
|
@@ -247,7 +295,11 @@
|
|
|
list.stuName = res.data.data.page.list[i].studentName
|
|
|
list.class = res.data.data.page.list[i].className
|
|
|
list.money = res.data.data.page.list[i].orderAmount
|
|
|
-
|
|
|
+ if(res.data.data.page.list[i].payMethod == 1){
|
|
|
+ list.method = "建行支付"
|
|
|
+ }else if(res.data.data.page.list[i].payMethod == 2){
|
|
|
+ list.method = "农商行支付"
|
|
|
+ }
|
|
|
// this.all_money = (this.all_money + list.money).toFixed(2)
|
|
|
this.all_money = this.all_money + list.money
|
|
|
|
|
|
@@ -303,8 +355,7 @@
|
|
|
document.body.appendChild(link)
|
|
|
link.click()
|
|
|
}
|
|
|
- },
|
|
|
-
|
|
|
+ }
|
|
|
}
|
|
|
</script>
|
|
|
|