|
@@ -2,7 +2,7 @@
|
|
|
<div>
|
|
<div>
|
|
|
<el-row>
|
|
<el-row>
|
|
|
<el-col :span="24" class="first-row">
|
|
<el-col :span="24" class="first-row">
|
|
|
- <div class="tag">充值记录</div>
|
|
|
|
|
|
|
+ <div class="tag">退费管理</div>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
</el-row>
|
|
</el-row>
|
|
|
<el-row>
|
|
<el-row>
|
|
@@ -15,14 +15,7 @@
|
|
|
</el-date-picker>
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="" class="shuibiaoId">
|
|
<el-form-item label="" class="shuibiaoId">
|
|
|
- <el-input v-model="searchformUser" clearable placeholder="请输入户号/联系人/手机号"></el-input>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- <el-form-item label="" class="zhuangtai">
|
|
|
|
|
- <el-select v-model="selectItem.value" clearable placeholder="支付状态" @change="getItem">
|
|
|
|
|
- <el-option v-for="item in options" :key="item.value" :label="item.label"
|
|
|
|
|
- :value="item.value">
|
|
|
|
|
- </el-option>
|
|
|
|
|
- </el-select>
|
|
|
|
|
|
|
+ <el-input v-model="searchformUser" clearable placeholder="联系人/手机号"></el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
<el-form-item>
|
|
|
<el-button type="primary" icon="el-icon-search" @click="onSearch">搜索</el-button>
|
|
<el-button type="primary" icon="el-icon-search" @click="onSearch">搜索</el-button>
|
|
@@ -38,7 +31,6 @@
|
|
|
<div class="">
|
|
<div class="">
|
|
|
<span class="item">总计:<span class="green_txt">{{ amount }}</span>元</span> <span
|
|
<span class="item">总计:<span class="green_txt">{{ amount }}</span>元</span> <span
|
|
|
class="item">总交易笔数:<span class="green_txt">{{ total_times }}</span>笔</span> <span
|
|
class="item">总交易笔数:<span class="green_txt">{{ total_times }}</span>笔</span> <span
|
|
|
- class="item">次均额:<span class="green_txt">{{ avg }}</span>元</span>
|
|
|
|
|
</div>
|
|
</div>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
</el-row>
|
|
</el-row>
|
|
@@ -54,29 +46,11 @@
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column prop="user_name" label="联系人" align="center"></el-table-column>
|
|
<el-table-column prop="user_name" label="联系人" align="center"></el-table-column>
|
|
|
<el-table-column prop="order_num" label="交易流水号" align="center"></el-table-column>
|
|
<el-table-column prop="order_num" label="交易流水号" align="center"></el-table-column>
|
|
|
- <el-table-column prop="balance" label="充值前余额" align="center" :formatter="formatBalance">
|
|
|
|
|
|
|
+ <el-table-column prop="handler_man" label="操作账号" align="center">
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
- <el-table-column prop="account" label="支付余额(元)" align="center" :formatter="formatBalance"
|
|
|
|
|
|
|
+ <el-table-column prop="account" label="支付金额(元)" align="center" :formatter="formatBalance"
|
|
|
show-overflow-tooltip></el-table-column>
|
|
show-overflow-tooltip></el-table-column>
|
|
|
- <!-- <el-table-column prop="account" label="到账余额(元)" align="center" :formatter="formatBalance"
|
|
|
|
|
- show-overflow-tooltip></el-table-column> -->
|
|
|
|
|
- <el-table-column label="支付状态" align="center">
|
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
|
- <el-tag class="green_font" v-if="scope.row.pay_state == 2" type="text"
|
|
|
|
|
- @click="handleShowDialog(scope.$index, scope.row)">
|
|
|
|
|
- 已到账
|
|
|
|
|
- </el-tag>
|
|
|
|
|
- <el-tag class="red_font" v-else-if="scope.row.pay_state == 1" type="text"
|
|
|
|
|
- @click="handleShowDialog(scope.$index, scope.row)">
|
|
|
|
|
- 未到账
|
|
|
|
|
- </el-tag>
|
|
|
|
|
- <el-tag class="red_font" v-else="scope.row.pay_state == 0" type="text"
|
|
|
|
|
- @click="handleShowDialog(scope.$index, scope.row)">
|
|
|
|
|
- 未支付
|
|
|
|
|
- </el-tag>
|
|
|
|
|
- </template>
|
|
|
|
|
- </el-table-column>
|
|
|
|
|
- <el-table-column prop="re_time" label="支付时间" align="center" width="200px"></el-table-column>
|
|
|
|
|
|
|
+ <el-table-column prop="time" label="支付时间" align="center" width="200px"></el-table-column>
|
|
|
</el-table>
|
|
</el-table>
|
|
|
<div style="margin-top: 20px" class="table-footer">
|
|
<div style="margin-top: 20px" class="table-footer">
|
|
|
<div class="pages">
|
|
<div class="pages">
|
|
@@ -87,31 +61,6 @@
|
|
|
</div>
|
|
</div>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
</el-row>
|
|
</el-row>
|
|
|
- <el-row>
|
|
|
|
|
- <el-col :span="24" class="forth-row">
|
|
|
|
|
- <!-- 支付状态对话框 -->
|
|
|
|
|
- <el-dialog title="支付状态" :visible.sync="viewdialogFormVisible" :close-on-click-modal="false"
|
|
|
|
|
- :close-on-press-escape="false" width="500px" top="0vh" class="my-dialog">
|
|
|
|
|
- <hr
|
|
|
|
|
- style="width:100%; position:absolute; top:60px; left:0px; background-color:#CCCCCC; height:1px; border:0;">
|
|
|
|
|
- <div class="desc">
|
|
|
|
|
- <span class="lab">联系人:</span>
|
|
|
|
|
- <span class="con">{{ showOrderStatus.userName }}</span>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="desc">
|
|
|
|
|
- <span class="lab">支付情况:</span>
|
|
|
|
|
- <span class="con">{{ showOrderStatus.orderState }}</span>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="desc">
|
|
|
|
|
- <span class="lab">现账户余额:</span>
|
|
|
|
|
- <span class="con">{{ showOrderStatus.balance }}</span>
|
|
|
|
|
- </div>
|
|
|
|
|
- <span class="seal-result" v-if="showOrderStatus.result == 0">已支付</span>
|
|
|
|
|
- <span class="seal-result seal-result-fail" v-else-if="showOrderStatus.result == 1">未支付</span>
|
|
|
|
|
- <span v-else="showOrderStatus.result == -1"></span>
|
|
|
|
|
- </el-dialog>
|
|
|
|
|
- </el-col>
|
|
|
|
|
- </el-row>
|
|
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -121,24 +70,9 @@
|
|
|
return {
|
|
return {
|
|
|
amount: 0.0.toFixed(2),
|
|
amount: 0.0.toFixed(2),
|
|
|
total_times: 0,
|
|
total_times: 0,
|
|
|
- avg: 0.0.toFixed(2),
|
|
|
|
|
select_datetime: [],
|
|
select_datetime: [],
|
|
|
startTime: '',
|
|
startTime: '',
|
|
|
endTime: '',
|
|
endTime: '',
|
|
|
- options: [{
|
|
|
|
|
- value: 2,
|
|
|
|
|
- label: '已到账'
|
|
|
|
|
- }, {
|
|
|
|
|
- value: 1,
|
|
|
|
|
- label: '未到账'
|
|
|
|
|
- }, {
|
|
|
|
|
- value: 0,
|
|
|
|
|
- label: '未支付'
|
|
|
|
|
- }],
|
|
|
|
|
- selectItem: {
|
|
|
|
|
- value: '',
|
|
|
|
|
- label: ''
|
|
|
|
|
- },
|
|
|
|
|
searchformUser: '', // 查找的姓名
|
|
searchformUser: '', // 查找的姓名
|
|
|
select_month: '', // 选择的月份
|
|
select_month: '', // 选择的月份
|
|
|
// 余额列表
|
|
// 余额列表
|
|
@@ -157,7 +91,7 @@
|
|
|
},
|
|
},
|
|
|
created() {
|
|
created() {
|
|
|
// 获取总金额
|
|
// 获取总金额
|
|
|
- // this.get_total_amount()
|
|
|
|
|
|
|
+ this.get_total_amount()
|
|
|
// 获取余额列表
|
|
// 获取余额列表
|
|
|
let params = {
|
|
let params = {
|
|
|
page: this.currentPage,
|
|
page: this.currentPage,
|
|
@@ -168,90 +102,37 @@
|
|
|
this.initDate()
|
|
this.initDate()
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
- /**
|
|
|
|
|
- * 订单详情
|
|
|
|
|
- * @param {Object} index
|
|
|
|
|
- * @param {Object} row
|
|
|
|
|
- */
|
|
|
|
|
- handleShowDialog(index, row) {
|
|
|
|
|
- // console.log(index, row)
|
|
|
|
|
- // 显示支付状态对话框
|
|
|
|
|
- this.viewdialogFormVisible = true
|
|
|
|
|
-
|
|
|
|
|
- // 获取订单状态
|
|
|
|
|
- this.get_order_state(row.user_name, row.stu_number, row.order_num)
|
|
|
|
|
- },
|
|
|
|
|
- /**
|
|
|
|
|
- * 获取订单状态
|
|
|
|
|
- * @param {Object} userName
|
|
|
|
|
- * @param {Object} orderNo
|
|
|
|
|
- */
|
|
|
|
|
- get_order_state(userName, stu_number, orderNo) {
|
|
|
|
|
- // 组合参数
|
|
|
|
|
|
|
+ get_total_amount() {
|
|
|
|
|
+ var _this = this;
|
|
|
let formData = new FormData();
|
|
let formData = new FormData();
|
|
|
- formData.append("orderNo", orderNo);
|
|
|
|
|
- formData.append("stu_number", stu_number);
|
|
|
|
|
-
|
|
|
|
|
- this.showOrderStatus = {
|
|
|
|
|
- userName: '',
|
|
|
|
|
- orderState: '',
|
|
|
|
|
- balance: 0,
|
|
|
|
|
- result: -1
|
|
|
|
|
|
|
+ if (typeof _this.startTime != 'undefined' && _this.startTime != '') {
|
|
|
|
|
+ formData.append("begin_time", _this.startTime);
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
- var _this = this;
|
|
|
|
|
- this.$axios.post('/jxch-smartmp/HotWaters/wpqueryOrder.action', formData)
|
|
|
|
|
|
|
+ if (typeof _this.endTime != 'undefined' && _this.endTime != '') {
|
|
|
|
|
+ formData.append("end_time", _this.endTime);
|
|
|
|
|
+ }
|
|
|
|
|
+ if (_this.searchformUser != '' && typeof _this.searchformUser != 'undefined') {
|
|
|
|
|
+ params.user_name = this.searchformUser
|
|
|
|
|
+ }
|
|
|
|
|
+ this.$axios.post('/jxch-smartmp/HotWaters/waterrefund_total.action', formData)
|
|
|
.then(res => {
|
|
.then(res => {
|
|
|
// console.log(res.data);
|
|
// console.log(res.data);
|
|
|
if (res.data.code == 200) {
|
|
if (res.data.code == 200) {
|
|
|
- // _this.$message.success('数据加载成功!');
|
|
|
|
|
- _this.showOrderStatus.result = 0
|
|
|
|
|
- } else if (res.data.code == 205) {
|
|
|
|
|
- _this.showOrderStatus.result = 1
|
|
|
|
|
- } else if (res.data.code == 520) {
|
|
|
|
|
- _this.showOrderStatus.result = -1
|
|
|
|
|
- } else {
|
|
|
|
|
- _this.showOrderStatus.result = -1
|
|
|
|
|
- _this.$message.warning('【获取订单状态】暂无数据!');
|
|
|
|
|
|
|
+ _this.amount = res.data.data;
|
|
|
|
|
+ } else{
|
|
|
|
|
+ _this.$message.error(res.data.message);
|
|
|
}
|
|
}
|
|
|
- _this.showOrderStatus.userName = userName;
|
|
|
|
|
- _this.showOrderStatus.balance = res.data.balance.toFixed(2);
|
|
|
|
|
- _this.showOrderStatus.orderState = res.data.message;
|
|
|
|
|
})
|
|
})
|
|
|
.catch(err => {
|
|
.catch(err => {
|
|
|
// console.log(err);
|
|
// console.log(err);
|
|
|
- _this.$message.error('【获取订单状态】请求异常: ' + err);
|
|
|
|
|
- })
|
|
|
|
|
- },
|
|
|
|
|
- /**
|
|
|
|
|
- * 获取参数
|
|
|
|
|
- * @param {Object} e
|
|
|
|
|
- */
|
|
|
|
|
- getItem(e) {
|
|
|
|
|
- if (typeof e == 'number' && e == 2) {
|
|
|
|
|
- this.selectItem.value = this.options[0].value
|
|
|
|
|
- this.selectItem.label = this.options[0].label
|
|
|
|
|
- } else if (typeof e == 'number' && e == 1) {
|
|
|
|
|
- this.selectItem.value = this.options[1].value
|
|
|
|
|
- this.selectItem.label = this.options[1].label
|
|
|
|
|
- } else if (typeof e == 'number' && e == 0) {
|
|
|
|
|
- this.selectItem.value = this.options[2].value
|
|
|
|
|
- this.selectItem.label = this.options[2].label
|
|
|
|
|
- } else {
|
|
|
|
|
- this.selectItem = {
|
|
|
|
|
- value: '',
|
|
|
|
|
- label: ''
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- // console.log(typeof(this.selectItem));
|
|
|
|
|
- // console.log(this.selectItem);
|
|
|
|
|
|
|
+ _this.$message.error('【获取退款总金额】请求异常: ' + err);
|
|
|
|
|
+ });
|
|
|
},
|
|
},
|
|
|
/**
|
|
/**
|
|
|
* 序号的计算
|
|
* 序号的计算
|
|
|
*/
|
|
*/
|
|
|
indexMethod(index) {
|
|
indexMethod(index) {
|
|
|
- return (this.currentPage - 1) * 8 + index + 1;
|
|
|
|
|
|
|
+ return (this.currentPage - 1) * this.pageRows + index + 1;
|
|
|
},
|
|
},
|
|
|
/**
|
|
/**
|
|
|
* 格式化列数据
|
|
* 格式化列数据
|
|
@@ -263,54 +144,32 @@
|
|
|
// index: 行索引,注意:2.3.9版本以后才有。
|
|
// index: 行索引,注意:2.3.9版本以后才有。
|
|
|
return cellValue.toFixed(2)
|
|
return cellValue.toFixed(2)
|
|
|
},
|
|
},
|
|
|
- formatStatus: (row, column, cellValue, index) => {
|
|
|
|
|
- // row: 行数据
|
|
|
|
|
- // column: 列属性
|
|
|
|
|
- // cellValue: 单元格数据值
|
|
|
|
|
- // index: 行索引,注意:2.3.9版本以后才有。
|
|
|
|
|
- // 0:未支付,1:未到账,2:已到账
|
|
|
|
|
- if (cellValue == 2) {
|
|
|
|
|
- return '已到账'
|
|
|
|
|
- } else if (cellValue == 1) {
|
|
|
|
|
- return '未到账'
|
|
|
|
|
- } else if (cellValue == 0) {
|
|
|
|
|
- return '未支付'
|
|
|
|
|
- } else {
|
|
|
|
|
- return '未知'
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
/**
|
|
/**
|
|
|
- * 充值记录列表
|
|
|
|
|
|
|
+ * 退款列表
|
|
|
*/
|
|
*/
|
|
|
get_amount_list(params) {
|
|
get_amount_list(params) {
|
|
|
var _this = this
|
|
var _this = this
|
|
|
- // _this.tableData = []
|
|
|
|
|
- // _this.rows_total = 0
|
|
|
|
|
- this.$axios.get('/jxch-smartmp/HotWaters/waterqueryRe.action', {
|
|
|
|
|
|
|
+ this.$axios.get('/jxch-smartmp/HotWaters/waterrefund_list.action', {
|
|
|
params: params
|
|
params: params
|
|
|
})
|
|
})
|
|
|
.then(res => {
|
|
.then(res => {
|
|
|
// console.log(res.data);
|
|
// console.log(res.data);
|
|
|
- if (typeof(res.data.rows) != 'undefined' && res.data.rows != '' && JSON.stringify(res.data) !=
|
|
|
|
|
|
|
+ if (typeof res.data.rows != 'undefined' && res.data.rows != '' && JSON.stringify(res.data) !=
|
|
|
'{}') {
|
|
'{}') {
|
|
|
// _this.$message.success('数据加载成功!');
|
|
// _this.$message.success('数据加载成功!');
|
|
|
_this.tableData = res.data.rows
|
|
_this.tableData = res.data.rows
|
|
|
_this.rows_total = res.data.total
|
|
_this.rows_total = res.data.total
|
|
|
-
|
|
|
|
|
- _this.amount = res.data.totalAccount.toFixed(2)
|
|
|
|
|
- _this.total_times = res.data.total
|
|
|
|
|
- _this.avg = res.data.avgAccount.toFixed(2)
|
|
|
|
|
} else {
|
|
} else {
|
|
|
- _this.$message.success('【充值记录列表】暂无数据!');
|
|
|
|
|
|
|
+ _this.$message.success('【退款列表】暂无数据!');
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
.catch(err => {
|
|
.catch(err => {
|
|
|
// console.log(err);
|
|
// console.log(err);
|
|
|
- _this.$message.error('【充值记录列表】请求异常: ' + err);
|
|
|
|
|
|
|
+ _this.$message.error('【退款列表】请求异常: ' + err);
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
/**
|
|
/**
|
|
|
- * 充值记录列表改变页码
|
|
|
|
|
|
|
+ * 退款列表改变页码
|
|
|
* @param {Object} val
|
|
* @param {Object} val
|
|
|
*/
|
|
*/
|
|
|
handleCurrentChange(val) {
|
|
handleCurrentChange(val) {
|
|
@@ -320,21 +179,17 @@
|
|
|
page: this.currentPage,
|
|
page: this.currentPage,
|
|
|
rows: this.pageRows,
|
|
rows: this.pageRows,
|
|
|
}
|
|
}
|
|
|
- if (this.startTime != '' && typeof(this.startTime) != 'undefined') {
|
|
|
|
|
|
|
+ if (this.startTime != '' && typeof this.startTime != 'undefined') {
|
|
|
params.begin_time = this.startTime
|
|
params.begin_time = this.startTime
|
|
|
}
|
|
}
|
|
|
- if (this.endTime != '' && typeof(this.endTime) != 'undefined') {
|
|
|
|
|
|
|
+ if (this.endTime != '' && typeof this.endTime != 'undefined') {
|
|
|
params.end_time = this.endTime
|
|
params.end_time = this.endTime
|
|
|
}
|
|
}
|
|
|
- if (this.searchformUser != '' && typeof(this.searchformUser) != 'undefined') {
|
|
|
|
|
|
|
+ if (this.searchformUser != '' && typeof this.searchformUser != 'undefined') {
|
|
|
params.user_name = this.searchformUser
|
|
params.user_name = this.searchformUser
|
|
|
}
|
|
}
|
|
|
- if (typeof this.selectItem.value == 'number' && this.selectItem.label != '') {
|
|
|
|
|
- params.value = this.selectItem.value
|
|
|
|
|
- // params.label = this.selectItem.label
|
|
|
|
|
- }
|
|
|
|
|
|
|
|
|
|
- // 获取充值记录列表
|
|
|
|
|
|
|
+ // 获取退款列表
|
|
|
this.get_amount_list(params)
|
|
this.get_amount_list(params)
|
|
|
},
|
|
},
|
|
|
/**
|
|
/**
|
|
@@ -409,7 +264,7 @@
|
|
|
if (typeof _this.endTime != 'undefined' && _this.endTime != '') {
|
|
if (typeof _this.endTime != 'undefined' && _this.endTime != '') {
|
|
|
formData.append("end_time", _this.endTime);
|
|
formData.append("end_time", _this.endTime);
|
|
|
}
|
|
}
|
|
|
- this.$axios.post('/jxch-smartmp/HotWaters/waterre_toExcel.action', formData)
|
|
|
|
|
|
|
+ this.$axios.post('/jxch-smartmp/HotWaters/watertoRefundExcel.action', formData)
|
|
|
.then(res => {
|
|
.then(res => {
|
|
|
if (typeof res.data.downurl != 'undefined' && res.data.downurl != '' && JSON
|
|
if (typeof res.data.downurl != 'undefined' && res.data.downurl != '' && JSON
|
|
|
.stringify(res.data) != '{}') {
|
|
.stringify(res.data) != '{}') {
|
|
@@ -423,32 +278,6 @@
|
|
|
// console.log(err);
|
|
// console.log(err);
|
|
|
_this.$message.error('【导出表格】请求异常: ' + err);
|
|
_this.$message.error('【导出表格】请求异常: ' + err);
|
|
|
})
|
|
})
|
|
|
- },
|
|
|
|
|
- /**
|
|
|
|
|
- * 获取查看记录列表
|
|
|
|
|
- */
|
|
|
|
|
- get_view_list(params) {
|
|
|
|
|
- var _this = this
|
|
|
|
|
- _this.view_tableData = []
|
|
|
|
|
- // _this.view_rows_total = 0
|
|
|
|
|
- this.$axios.get('/jxch-smartmp/HotWaters/waterfindRecharge.action', {
|
|
|
|
|
- params: params
|
|
|
|
|
- })
|
|
|
|
|
- .then(res => {
|
|
|
|
|
- // console.log(res.data);
|
|
|
|
|
- if (typeof(res.data.rows) != 'undefined' && res.data.rows != '' && JSON.stringify(res.data) !=
|
|
|
|
|
- '{}') {
|
|
|
|
|
- // _this.$message.success('数据加载成功!');
|
|
|
|
|
- _this.view_tableData = res.data.rows
|
|
|
|
|
- _this.view_rows_total = res.data.total
|
|
|
|
|
- } else {
|
|
|
|
|
- _this.$message.success('【获取查看记录列表】暂无数据!');
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- .catch(err => {
|
|
|
|
|
- // console.log(err);
|
|
|
|
|
- _this.$message.error('【获取查看记录列表】请求异常: ' + err);
|
|
|
|
|
- })
|
|
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|