Commit b2ffcd23 authored by denghr's avatar denghr

提现审核

parent b50fa712
...@@ -59,3 +59,15 @@ export function discountList(query) { ...@@ -59,3 +59,15 @@ export function discountList(query) {
params: query params: query
}); });
} }
/**
* 列表审核
* @param query
*/
export function editObj(obj) {
return fetch({
url: '/api/admin/walletcath/admin/verifyCath',
method: 'post',
params: obj
});
}
...@@ -49,6 +49,7 @@ ...@@ -49,6 +49,7 @@
<template scope="scope"> <template scope="scope">
<span v-if="scope.row.stauts==0">未到帐</span> <span v-if="scope.row.stauts==0">未到帐</span>
<span v-if="scope.row.stauts==1">已到账</span> <span v-if="scope.row.stauts==1">已到账</span>
<span v-if="scope.row.stauts==2">审核失败</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="申请时间"> <el-table-column align="center" label="申请时间">
...@@ -61,6 +62,11 @@ ...@@ -61,6 +62,11 @@
<span>{{scope.row.finishTimeStr}}</span> <span>{{scope.row.finishTimeStr}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="操作">
<template scope="scope">
<el-button size="small" type="primary" v-if="scope.row.stauts==0" @click="handleUpdate(scope.row)">审核</el-button>
</template>
</el-table-column>
</el-table> </el-table>
<div v-show="!listLoading" class="pagination-container"> <div v-show="!listLoading" class="pagination-container">
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
...@@ -68,6 +74,24 @@ ...@@ -68,6 +74,24 @@
layout="total, sizes, prev, pager, next, jumper" :total="total"></el-pagination> layout="total, sizes, prev, pager, next, jumper" :total="total"></el-pagination>
</div> </div>
</div> </div>
<el-dialog title="审核" :visible.sync="dialogVisible">
<el-form :model="dialogFrom" ref="dialogFrom" label-width="80px">
<el-form-item label="审核类型">
<el-radio v-model="dialogFrom.status" label='1'>通过</el-radio>
<el-radio v-model="dialogFrom.status" label='2'>拒绝</el-radio>
</el-form-item>
<el-form-item label="订单号" v-if="dialogFrom.status==1" required>
<el-input v-model="dialogFrom.cono" placeholder="请输入订单号"></el-input>
</el-form-item>
<el-form-item label="拒绝原因" v-if="dialogFrom.status==2" required>
<el-input type="textarea" v-model="dialogFrom.reason" placeholder="拒绝原因"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="cancelHandel">取 消</el-button>
<el-button type="primary" @click="edit('dialogFrom')">确 定</el-button>
</div>
</el-dialog>
</div> </div>
</template> </template>
...@@ -91,7 +115,8 @@ ...@@ -91,7 +115,8 @@
getToken getToken
} from 'utils/auth'; } from 'utils/auth';
import { import {
discountList discountList,
editObj
} from 'api/purseManage'; } from 'api/purseManage';
import Element1 from "../admin/menu/components/element"; import Element1 from "../admin/menu/components/element";
import ElRow from "element-ui/packages/row/src/row"; import ElRow from "element-ui/packages/row/src/row";
...@@ -120,6 +145,7 @@ ...@@ -120,6 +145,7 @@
"val":'1' "val":'1'
}, },
], ],
dialogVisible:false,
BASE_API: process.env.BASE_API, BASE_API: process.env.BASE_API,
showLoadingBody: false, showLoadingBody: false,
list: null, list: null,
...@@ -133,7 +159,12 @@ ...@@ -133,7 +159,12 @@
state:'',//状态 state:'',//状态
}, },
inline: true, inline: true,
tableKey: 0 tableKey: 0,
dialogFrom:{
status:'1',
cono:'',
reason:''
},
} }
}, },
created() { created() {
...@@ -184,7 +215,65 @@ ...@@ -184,7 +215,65 @@
handleCurrentChange(val) { handleCurrentChange(val) {
this.listQuery.page = val; this.listQuery.page = val;
this.getList(); this.getList();
},
cancelHandel(){
this.dialogVisible = false;
},
handleUpdate(row){
this.dialogFrom.cathId = row.id;
this.dialogVisible = true;
},
edit(formName) {
var that = this;
const set = this.$refs;
set[formName].validate(valid => {
if(this.dialogFrom.status==1){
if(this.dialogFrom.cono==''){
this.$notify({
title: '警告',
message: '请输入订单号',
type: 'warning',
duration: 2000
});
return false;
} }
} }
if(this.dialogFrom.status==2){
if(this.dialogFrom.reason==''){
this.$notify({
title: '警告',
message: '请输入拒绝原因',
type: 'warning',
duration: 2000
});
return false;
}
}
if (valid) {
editObj(that.dialogFrom).then(response => {
if (response.status === 200) {
this.dialogVisible = false;
this.getList();
this.$notify({
title: '成功',
message: '审核成功',
type: 'success',
duration: 2000
});
} else {
this.$notify({
title: '失败',
message: rsCode.msg[response.code] ? rsCode.msg[response.code] : '操作失败!',
type: 'error',
duration: 2000
});
}
});
} else {
return false;
}
});
},
}
} }
</script> </script>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment