|
|
@@ -11,9 +11,9 @@
|
|
|
<hr style="background-color: #CCCCCC;height: 1px;border: 0;margin-top: 32px;">
|
|
|
<el-row>
|
|
|
<el-col :span="24" class="second-row">
|
|
|
- <el-form :inline="true" :model="formInline" class="demo-form-inline">
|
|
|
+ <el-form :inline="true" class="demo-form-inline">
|
|
|
<el-form-item label="关键字:" class="shuibiaoId">
|
|
|
- <el-input v-model="formInline.user" placeholder="请输入订单号或者姓名"></el-input>
|
|
|
+ <el-input v-model="selectOrder" placeholder="请输入订单号或者姓名"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
<el-button type="primary" @click="onSubmit">搜索</el-button>
|
|
|
@@ -51,37 +51,36 @@
|
|
|
</el-button>
|
|
|
</el-table-column>
|
|
|
</el-table> -->
|
|
|
- <el-table ref="multipleTable" :data="tableData" tooltip-effect="dark" style="width: 100%" :stripe='stripe'
|
|
|
- @selection-change="handleSelectionChange" highlight-current-row>
|
|
|
- <el-table-column label="订单号" align="center" width="200">
|
|
|
+ <el-table ref="multipleTable" :data="tableData" tooltip-effect="dark" :stripe='stripe' style="width: 100%"
|
|
|
+ highlight-current-row>
|
|
|
+ <el-table-column label="订单号" align="center" width="210">
|
|
|
<template slot-scope="scope">{{ scope.row.order }}</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="id" label="学号" width="170"></el-table-column>
|
|
|
+ <el-table-column prop="id" label="学号" width="190"></el-table-column>
|
|
|
<el-table-column prop="stuName" label="姓名" width="90"></el-table-column>
|
|
|
- <el-table-column prop="class" label="班级" width="150"></el-table-column>
|
|
|
- <el-table-column prop="money" label="金额(元)" width="100"></el-table-column>
|
|
|
- <el-table-column prop="time" label="时间" width="200"></el-table-column>
|
|
|
- <el-table-column label="学校状态" align="center" width="90">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-tag :type="scope.row.school_state === '支付失败' ? 'danger' : 'success'" disable-transitions>{{scope.row.school_state}}
|
|
|
- </el-tag>
|
|
|
- </template>
|
|
|
+ <el-table-column label="班级" width="120">
|
|
|
+ <el-popover placement="top-start" trigger="hover" slot-scope="scope" :content="scope.row.class">
|
|
|
+ <div slot="reference">{{ scope.row.class }}</div>
|
|
|
+ </el-popover>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="银行状态" align="center" width="90">
|
|
|
+ <el-table-column prop="money" label="金额(元)" width="100"></el-table-column>
|
|
|
+ <el-table-column prop="method" label="支付渠道" width="110"></el-table-column>
|
|
|
+ <el-table-column prop="time" label="创建时间" width="190"></el-table-column>
|
|
|
+ <el-table-column label="状态" align="center" width="80">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-tag :type="scope.row.bank_state === '支付失败' ? 'danger' : 'success'" disable-transitions>{{scope.row.bank_state}}
|
|
|
+ <el-tag :type="scope.row.state === '支付失败' ? 'danger' : 'success'" disable-transitions>{{scope.row.state}}
|
|
|
</el-tag>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="操作" width="80">
|
|
|
- <el-button id="show-btn" slot-scope="scope" @click="handleEdit(scope.$index, scope.row)">
|
|
|
- {{scope.row.state}}
|
|
|
+ <el-button id="show-btn" slot-scope="scope" @click="handleEdit(scope.$index, scope.row)">查询状态
|
|
|
</el-button>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
<div style="margin-top: 20px" class="table-footer">
|
|
|
<div class="pages">
|
|
|
- <el-pagination layout="prev, pager, next" :total="1"></el-pagination>
|
|
|
+ <el-pagination layout="prev, pager, next" :page-size="pageSize" :total="totalCount"
|
|
|
+ @current-change="handleCurrentChange"></el-pagination>
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-col>
|
|
|
@@ -89,17 +88,18 @@
|
|
|
<el-row>
|
|
|
<el-col :span="24" class="forth-row">
|
|
|
<!-- 编辑对话框 -->
|
|
|
- <el-dialog title="" :visible.sync="editdialogFormVisible" width="640px" height="487px" top="0vh" class="my-dialog">
|
|
|
+ <el-dialog title="" :visible.sync="editdialogFormVisible" width="640px" height="487px" top="0vh"
|
|
|
+ class="my-dialog">
|
|
|
<div id="center">
|
|
|
<div id="logo-center"></div>
|
|
|
</div>
|
|
|
<div id="item-txt">
|
|
|
<span class="item-text">是否确定将该订单从异常列表中移除</span>
|
|
|
</div>
|
|
|
- <span slot="footer" class="dialog-footer">
|
|
|
- <el-button @click="editdialogFormVisible = false">取 消</el-button>
|
|
|
- <el-button type="primary" @click="editdialogFormVisible = false">确 定</el-button>
|
|
|
- </span>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="editdialogFormVisible = false">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="editdialogFormVisible = false">确 定</el-button>
|
|
|
+ </span>
|
|
|
</el-dialog>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
@@ -111,32 +111,109 @@
|
|
|
data() {
|
|
|
return {
|
|
|
editdialogFormVisible: false,
|
|
|
- delDialogVisible: false,
|
|
|
- form: {
|
|
|
- id: 'KB580002652',
|
|
|
- drom: '18',
|
|
|
- room: '118'
|
|
|
- },
|
|
|
- formLabelWidth: '120px',
|
|
|
- formInline: {
|
|
|
- user: '',
|
|
|
- options: [{
|
|
|
- value: '选项1',
|
|
|
- label: '全部'
|
|
|
- }, {
|
|
|
- value: '选项2',
|
|
|
- label: '黄金糕'
|
|
|
- }],
|
|
|
- value: '选项1'
|
|
|
- },
|
|
|
- tableData: [],
|
|
|
- multipleSelection: [],
|
|
|
- stripe: true
|
|
|
+ tableData: [], //数据
|
|
|
+ stripe: true, //表格条纹
|
|
|
+ user_info: '',
|
|
|
+ user_token: '', //token
|
|
|
+ pageSize: 10, //每页订单数目
|
|
|
+ totalCount: 0, //总订单数
|
|
|
+ selectOrder: '', //查找订单号或姓名
|
|
|
+ flag: 1, //选择的状态
|
|
|
+ index: 1, //第几页
|
|
|
+ recordsNum: 0, //订单数量
|
|
|
+ payStatus: 1, //是否支付成功
|
|
|
+ status: 0, //状态
|
|
|
}
|
|
|
},
|
|
|
+ created: function() {
|
|
|
+ this.user_info = JSON.parse(sessionStorage.getItem('usr_info'))
|
|
|
+ this.user_token = this.user_info.token
|
|
|
+ this.getTableData(this.$Api.orderList, this.flag)
|
|
|
+ },
|
|
|
methods: {
|
|
|
+ //分页
|
|
|
+ handleCurrentChange(val) {
|
|
|
+ this.index = val;
|
|
|
+ this.tableData = []
|
|
|
+ this.getTableData(this.$Api.orderList, this.flag, this.index, this.selectOrder)
|
|
|
+ },
|
|
|
+ //获取订单数据
|
|
|
+ getTableData(url, flag, index, key) {
|
|
|
+ this.$axios.get(url + '?' + this.$qs.stringify({
|
|
|
+ 'payStatus': this.payStatus,
|
|
|
+ 'flag': flag,
|
|
|
+ 'curPage': index,
|
|
|
+ 'pageSize': this.pageSize,
|
|
|
+ 'keyword': key,
|
|
|
+ }), {
|
|
|
+ headers: {
|
|
|
+ 'Content-Type': 'application/x-www-form-urlencoded;charset=utf-8',
|
|
|
+ 'Author': 'codingliang',
|
|
|
+ 'admin_token': this.user_token
|
|
|
+ }
|
|
|
+ }).then(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 = {}
|
|
|
+ list.order = res.data.data.page.list[i].orderNo
|
|
|
+ list.id = res.data.data.page.list[i].payerIdentify
|
|
|
+ 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
|
|
|
+
|
|
|
+ list.time = res.data.data.page.list[i].createTime
|
|
|
+ if (res.data.data.page.list[i].status == 2) {
|
|
|
+ list.state = '支付成功'
|
|
|
+ } else {
|
|
|
+ list.state = '支付失败'
|
|
|
+ }
|
|
|
+ this.tableData.push(list)
|
|
|
+ }
|
|
|
+ }).catch(err => {
|
|
|
+ console.log(err)
|
|
|
+ this.$message.error("订单导出失败")
|
|
|
+ })
|
|
|
+ },
|
|
|
+ //根据关键字查找订单
|
|
|
onSubmit() {
|
|
|
- console.log('submit!')
|
|
|
+ this.tableData = []
|
|
|
+ this.index = 1
|
|
|
+ this.getTableData(this.$Api.orderList, this.flag, this.index, this.selectOrder)
|
|
|
+ this.$message.success("查找成功")
|
|
|
+ },
|
|
|
+ //按键查询订单状态
|
|
|
+ handleEdit(index, row) {
|
|
|
+ this.getOrderStatus(this.$Api.OrderStatus, row.order)
|
|
|
+ },
|
|
|
+ //查询订单状态
|
|
|
+ getOrderStatus(url, order){
|
|
|
+ this.$axios.get(url + '?' + this.$qs.stringify({
|
|
|
+ 'orderNo': order,
|
|
|
+ }), {
|
|
|
+ headers: {
|
|
|
+ 'Content-Type': 'application/x-www-form-urlencoded;charset=utf-8',
|
|
|
+ 'Author': 'codingliang',
|
|
|
+ 'admin_token': this.user_token
|
|
|
+ }
|
|
|
+ }).then(res => {
|
|
|
+ this.status = res.data.data.status
|
|
|
+ // console.log(this.status)
|
|
|
+ if(this.status == 1){
|
|
|
+ this.$message.warning("等待支付")
|
|
|
+ }else if(this.status == 2){
|
|
|
+ this.$router.go(0)
|
|
|
+ }
|
|
|
+ }).catch(err => {
|
|
|
+ console.log(err)
|
|
|
+ })
|
|
|
},
|
|
|
handleOpen(key, keyPath) {
|
|
|
console.log(key, keyPath)
|
|
|
@@ -156,25 +233,12 @@
|
|
|
handleSelectionChange(val) {
|
|
|
this.multipleSelection = val
|
|
|
},
|
|
|
- handleEdit(index, row) {
|
|
|
- this.editdialogFormVisible = true
|
|
|
- console.log(index, row)
|
|
|
- },
|
|
|
handleDelete(index, row) {
|
|
|
this.delDialogVisible = true
|
|
|
console.log(index, row)
|
|
|
}
|
|
|
},
|
|
|
- created: function() {
|
|
|
- // for(var i=0 ;i<this.tableData.length ;i++){
|
|
|
- // // console.log(this.tableData[i].state)
|
|
|
- // if(this.tableData[i].state=='支付失败'){
|
|
|
- // this.font_color=true
|
|
|
- // }else{
|
|
|
- // this.font_color=false
|
|
|
- // }
|
|
|
- // }
|
|
|
- }
|
|
|
+
|
|
|
}
|
|
|
</script>
|
|
|
|