Commit ce3393a0 authored by libin's avatar libin

提现记录文案更改

parent 7f1fac05
...@@ -17,11 +17,12 @@ ...@@ -17,11 +17,12 @@
<el-col :span="6"> <el-col :span="6">
<el-form-item label="状态" prop="type"> <el-form-item label="状态" prop="type">
<el-select class="filter-item" v-model="listQuery.state" placeholder="请输入状态"> <el-select class="filter-item" v-model="listQuery.state" placeholder="请输入状态">
<el-option v-for="(item,index) in typeOptions" :key="index" :label="item.name" :value="item.val"> </el-option> <el-option v-for="(item,index) in typeOptions" :key="index" :label="item.name"
:value="item.val"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-button class="filter-item" type="primary" v-waves icon="search" @click="handleFilter">搜索</el-button> <el-button class="filter-item" type="primary" v-waves icon="search" @click="handleFilter">搜索</el-button>
</el-row> </el-row>
</el-form> </el-form>
</div> </div>
...@@ -49,7 +50,7 @@ ...@@ -49,7 +50,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> <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="申请时间">
...@@ -64,7 +65,9 @@ ...@@ -64,7 +65,9 @@
</el-table-column> </el-table-column>
<el-table-column align="center" label="操作" width="65" fixed="right"> <el-table-column align="center" label="操作" width="65" fixed="right">
<template scope="scope"> <template scope="scope">
<el-button size="small" class="el-button el-button--text el-button--small" v-if="scope.row.stauts==0" @click="handleUpdate(scope.row)">审核</el-button> <el-button size="small" class="el-button el-button--text el-button--small" v-if="scope.row.stauts==0"
@click="handleUpdate(scope.row)">审核
</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -96,184 +99,186 @@ ...@@ -96,184 +99,186 @@
</template> </template>
<script> <script>
import { import {
formatDate formatDate
} from 'utils/dateFormattor'; } from 'utils/dateFormattor';
import { import {
toEast8Date, toEast8Date,
deepCopyDate, deepCopyDate,
newEast8Date, newEast8Date,
convertDate2Str, convertDate2Str,
timestamp2Date timestamp2Date
} from 'utils/dateUtils'; } from 'utils/dateUtils';
import rsCode from '../../utils/rsCode'; import rsCode from '../../utils/rsCode';
import {mapGetters} from 'vuex'; import {mapGetters} from 'vuex';
import { import {
getToken getToken
} from 'utils/auth'; } from 'utils/auth';
import { import {
discountList, discountList,
editObj 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";
import ElCol from "element-ui/packages/col/src/col"; import ElCol from "element-ui/packages/col/src/col";
export default { export default {
name: 'discountRecord', name: 'discountRecord',
components: { components: {
ElCol, ElCol,
ElRow, ElRow,
Element1, Element1,
},
data() {
return {
typeOptions: [
{
"name":'全部',
"val":''
},
{
"name":'未到账',
"val":'0'
},
{
"name":'已到账',
"val":'1'
},
],
dialogVisible:false,
BASE_API: process.env.BASE_API,
showLoadingBody: false,
list: null,
total: null,
listLoading: true,
listQuery: {
page: 1,
limit: 20,
phone: '',//手机号
username: '',//姓名
state:'',//状态
}, },
inline: true, data() {
tableKey: 0, return {
dialogFrom:{ typeOptions: [
status:'1', {
cono:'', "name": '全部',
reason:'' "val": ''
},
{
"name": '未到账',
"val": '0'
},
{
"name": '已到账',
"val": '1'
},
],
dialogVisible: false,
BASE_API: process.env.BASE_API,
showLoadingBody: false,
list: null,
total: null,
listLoading: true,
listQuery: {
page: 1,
limit: 20,
phone: '',//手机号
username: '',//姓名
state: '',//状态
},
inline: true,
tableKey: 0,
dialogFrom: {
status: '1',
cono: '',
reason: ''
},
}
}, },
} created() {
},
created() {
this.getList();
},
computed: {
...mapGetters([
'elements'
])
},
methods: {
/**
* 获取提现列表
* */
getList() {
this.listLoading = true;
discountList(this.listQuery).then(response => {
let totalCountRs = undefined;
let listRs = undefined;
if (!this.$utils.isEmpty(response.data.data) && this.$utils.isInteger(response.data.totalCount)) {
listRs = response.data.data;
totalCountRs = response.data.totalCount;
listRs.map(function(item){
item.crtTimeStr = timestamp2Date(item.crtTime);
item.finishTimeStr = timestamp2Date(item.finishTime);
});
}
this.listLoading = false;
this.list = listRs;
this.total = totalCountRs;
})
},
handleFilter() {
this.listQuery.page = 1;
this.$refs.queryForm.validate(valid => {
if (valid) {
this.getList(); this.getList();
} else { },
return false; computed: {
} ...mapGetters([
}); 'elements'
}, ])
handleSizeChange(val) { },
this.listQuery.limit = val; methods: {
this.getList(); /**
}, * 获取提现列表
handleCurrentChange(val) { * */
this.listQuery.page = val; getList() {
this.getList(); this.listLoading = true;
}, discountList(this.listQuery).then(response => {
cancelHandel(){ let totalCountRs = undefined;
this.dialogVisible = false; let listRs = undefined;
}, if (!this.$utils.isEmpty(response.data.data) && this.$utils.isInteger(response.data.totalCount)) {
handleUpdate(row){ listRs = response.data.data;
this.dialogFrom.cathId = row.id; totalCountRs = response.data.totalCount;
this.dialogVisible = true; listRs.map(function (item) {
}, item.crtTimeStr = timestamp2Date(item.crtTime);
edit(formName) { if (item.finishTime != 0 && item.finishTime != null) {
var that = this; item.finishTimeStr = timestamp2Date(item.finishTime);
const set = this.$refs; }
set[formName].validate(valid => { });
if(this.dialogFrom.status==1){ }
if(this.dialogFrom.cono==''){ this.listLoading = false;
this.$notify({ this.list = listRs;
title: '警告', this.total = totalCountRs;
message: '请输入订单号', })
type: 'warning',
duration: 2000 },
}); handleFilter() {
return false; this.listQuery.page = 1;
} this.$refs.queryForm.validate(valid => {
} if (valid) {
if(this.dialogFrom.status==2){ this.getList();
if(this.dialogFrom.reason==''){ } else {
this.$notify({ return false;
title: '警告', }
message: '请输入拒绝原因', });
type: 'warning', },
duration: 2000 handleSizeChange(val) {
}); this.listQuery.limit = val;
return false; this.getList();
} },
} handleCurrentChange(val) {
if (valid) { this.listQuery.page = val;
editObj(that.dialogFrom).then(response => { this.getList();
if (response.status === 200) { },
this.dialogVisible = false; cancelHandel() {
this.getList(); this.dialogVisible = false;
this.$notify({ },
title: '成功', handleUpdate(row) {
message: '审核成功', this.dialogFrom.cathId = row.id;
type: 'success', this.dialogVisible = true;
duration: 2000 },
}); edit(formName) {
} else { var that = this;
this.$notify({ const set = this.$refs;
title: '失败', set[formName].validate(valid => {
message: rsCode.msg[response.code] ? rsCode.msg[response.code] : '操作失败!', if (this.dialogFrom.status == 1) {
type: 'error', if (this.dialogFrom.cono == '') {
duration: 2000 this.$notify({
}); title: '警告',
} message: '请输入订单号',
}); type: 'warning',
} else { duration: 2000
return false; });
} 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