|
|
@@ -28,8 +28,9 @@
|
|
|
<el-table-column prop="user_name" label="姓名" align="center" width="400"></el-table-column>
|
|
|
<el-table-column prop="balance" label="余额(元)" align="right" width="180" :formatter="formatBalance" show-overflow-tooltip></el-table-column>
|
|
|
<el-table-column label="操作" align="center" v-if="userLevel == 2">
|
|
|
- <el-button type="text" slot-scope="scope" @click="handleTkDialog(scope.$index, scope.row)" v-if="scope.row.balance > 0.01">
|
|
|
- <span style="color: #ffffff; display: inline-block; background-color:#ff0000; padding: 5px 8px; border-radius: 5px; margin-top: -10px;">退款</span>
|
|
|
+ <el-button type="text" slot-scope="scope" @click="handleTkDialog(scope.$index, scope.row)" v-if="scope.row.balance > 0.01">
|
|
|
+ <span
|
|
|
+ style="color: #ffffff; display: inline-block; background-color:#ff0000; padding: 5px 8px; border-radius: 5px; margin-top: -10px;">退款</span>
|
|
|
</el-button>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="操作" align="center">
|
|
|
@@ -99,7 +100,9 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { Form } from 'element-ui';
|
|
|
+ import {
|
|
|
+ Form
|
|
|
+ } from 'element-ui';
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
@@ -156,6 +159,12 @@ import { Form } from 'element-ui';
|
|
|
handleDialogTk(param) {
|
|
|
// console.log(param);
|
|
|
var _this = this;
|
|
|
+ const loading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: '在等待服务器响应...',
|
|
|
+ spinner: 'el-icon-loading',
|
|
|
+ background: 'rgba(0, 0, 0, 0.7)'
|
|
|
+ });
|
|
|
let formData = new FormData();
|
|
|
if (_this.tkform.card_number != '' && typeof _this.tkform.card_number != 'undefined') {
|
|
|
formData.append('card_number', this.tkform.card_number);
|
|
|
@@ -168,13 +177,14 @@ import { Form } from 'element-ui';
|
|
|
_this.$message.error("退款金额需要在 0.01~1000 之间!");
|
|
|
return;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
this.$axios.post('/jxch-smartmp/HotWaters/waterrefund.action', formData)
|
|
|
.then(res => {
|
|
|
// console.log(res.data);
|
|
|
if (res.data.code == 200) {
|
|
|
_this.$message.success(res.data.message);
|
|
|
_this.tkdialogFormVisible = false;
|
|
|
+ _this.handleCurrentChange(this.currentPage)
|
|
|
} else {
|
|
|
_this.$message.error(res.data.message);
|
|
|
}
|
|
|
@@ -183,6 +193,10 @@ import { Form } from 'element-ui';
|
|
|
// console.log(err);
|
|
|
_this.$message.error('【操作退款】请求异常: ' + err);
|
|
|
});
|
|
|
+
|
|
|
+ setTimeout(() => {
|
|
|
+ loading.close();
|
|
|
+ }, 2000);
|
|
|
},
|
|
|
// 一弹出对话,让金额输入框获得焦点
|
|
|
onDialogOpen() {
|