Commit 9d1c8c14 by wangyalan-git

提现审核列表

parent dd416239
export const tableOption = {
border: true,
index: false,
selection: false,
indexLabel: '序号',
stripe: true,
menuAlign: 'center',
refreshBtn: false,
columnBtn: false,
align: 'center',
addBtn: false,
editBtn: false,
delBtn: false,
column: [
{
label: '用户昵称',
prop: 'nickName',
search: true
},
{
label: '金额',
prop: 'amount',
search: true
},
{
label: '到账金额',
prop: 'cashAmount',
},
{
label: '审核状态',
prop: 'applyStatus',
slot: true
},
{
label: '审核类型',
prop: 'applyType',
type: 'select',
slot: true,
search: true,
dicData: [
{
label: '余额提现申请',
value: 0
}, {
label: '订单收益提现申请',
value: 1
},
{
label: '退单申请',
value: 2
}
]
}
]
}
<template>
<el-dialog
title="审核"
:close-on-click-modal="false"
:visible.sync="visible">
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="80px">
<el-form-item label="审核" prop="applyStatus">
<el-radio-group v-model="dataForm.applyStatus">
<el-radio :label="1">通过</el-radio>
<el-radio :label="2">不通过</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="dataForm.remark" placeholder="备注"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="visible = false">取消</el-button>
<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
</span>
</el-dialog>
</template>
<script>
export default {
data () {
return {
visible: false,
dataForm: {
id: 0,
applyStatus: 1,
remark: ''
},
dataRule: {
applyStatus: [
{
required: true,message: '审核类型不能为空',trigger: 'change'
}]
}
}
},
methods: {
init (id,row) {
this.dataForm.id = id || 0
this.visible = true
this.$nextTick(() => {
this.$refs['dataForm'].resetFields()
if (this.dataForm.id) {
this.dataForm.paramName = row.paramName
this.dataForm.paramCode = row.paramCode
this.dataForm.paramValue = row.paramValue
this.dataForm.paramType = row.paramType
this.dataForm.remark = row.remark
}
})
},
// 表单提交
dataFormSubmit () {
this.$refs['dataForm'].validate((valid) => {
if (valid) {
this.$http({
url: this.$http.adornUrl(`/cashApplyRecord/auditCashApplu`),
method: 'post',
data: this.$http.adornData({
'id': this.dataForm.id || undefined,
'applyStatus': this.dataForm.applyStatus,
'remark': this.dataForm.remark
})
}).then(({data}) => {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.visible = false
this.$emit('refreshDataList')
}
})
})
}
})
}
}
}
</script>
<template>
<div class="mod-hotSearcch">
<avue-crud ref="crud"
:page="page"
:data="dataList"
:table-loading="dataListLoading"
:option="tableOption"
@search-change="searchChange"
@on-load="getDataList"
@refresh-change="refreshChange"
@selection-change="selectionChange">
<template slot-scope="scope"
slot="applyStatus">
<div>{{scope.row.applyStatus | filterStatus}}</div>
</template>
<template slot-scope="scope"
slot="applyType">
<div>{{scope.row.applyType | filterType}}</div>
</template>
<template slot-scope="scope"
slot="menu">
<el-button
type="primary"
size="small"
icon="el-icon-edit"
@click="addOrUpdateHandle(scope.row.id,scope.row)">审核</el-button>
</template>
</avue-crud>
<!-- 弹窗, 新增 / 修改 -->
<add-or-update v-if="addOrUpdateVisible"
ref="addOrUpdate"
@refreshDataList="getDataList"></add-or-update>
</div>
</template>
<script>
import { tableOption } from '@/crud/order/audit'
import AddOrUpdate from './audit-add-or-update'
export default {
data () {
return {
dataForm: {
},
dataList: [],
page: {
total: 0, // 总页数
currentPage: 1, // 当前页数
pageSize: 10 // 每页显示多少条
},
dataListLoading: false,
dataListSelections: [],
addOrUpdateVisible: false,
tableOption: tableOption
}
},
components: {
AddOrUpdate
},
filters:{
filterStatus(data){
if(data == 1){
return '已通过'
}else if(data == 2){
return '未通过'
}else{
return '待审核'
}
},
filterType(data){
if(data == 1){
return '订单收益提现申请'
}else if(data == 2){
return '退单申请'
}else{
return '余额提现申请'
}
}
},
methods: {
// 获取数据列表
getDataList (page, params) {
this.dataListLoading = true
this.$http({
url: this.$http.adornUrl('/cashApplyRecord/selectListByOther'),
method: 'get',
params: this.$http.adornParams(Object.assign({
current: page ? page.currentPage : 1,
size: page ? page.pageSize : 20
}, params))
}).then(({ data }) => {
this.page.total = data.total
this.page.pageSize = data.size
this.page.currentPage = data.current
this.dataList = data.records
this.dataListLoading = false
})
},
// 多选回调
selectionChange (list) {
this.dataListSelections = list
},
// 新增 / 修改
addOrUpdateHandle (id,row) {
this.addOrUpdateVisible = true
this.$nextTick(() => {
this.$refs.addOrUpdate.init(id, row)
})
},
// 点击查询
searchChange (params) {
this.getDataList(this.page, params)
},
// 删除
deleteHandle (row, index) {
var ids = row.hotSearchId ? [row.hotSearchId] : this.dataListSelections.map(item => {
return item.hotSearchId
})
this.$confirm(`确定对[id=${ids.join(',')}]进行[${row.hotSearchId ? '删除' : '批量删除'}]操作?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$http({
url: this.$http.adornUrl('/admin/hotSearch'),
method: 'delete',
data: this.$http.adornData(ids, false)
}).then(({ data }) => {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.getDataList()
}
})
})
}).catch(() => { })
},
refreshChange () {
this.getDataList(this.page)
}
}
}
</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