|
@@ -229,7 +229,9 @@ export default {
|
|
|
async getVoucherList() {
|
|
|
const res = await getVoucherList()
|
|
|
console.log('充值', res);
|
|
|
- this.tableData = res.datas.data
|
|
|
+ if (res && res.code == 200) {
|
|
|
+ this.tableData = res.datas.data
|
|
|
+ }
|
|
|
},
|
|
|
// 分页
|
|
|
async onPageChange(page) {
|
|
@@ -241,7 +243,9 @@ export default {
|
|
|
this.endTime = this.dataRange[1]/1000 || ''
|
|
|
const res = await queryVoucherList(this.pageNumber,this.startTime, this.endTime)
|
|
|
console.log('查询动账', res);
|
|
|
- this.tableData = res.datas.data
|
|
|
+ if (res && res.code == 200) {
|
|
|
+ this.tableData = res.datas.data
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
// 搜索
|
|
@@ -250,8 +254,10 @@ export default {
|
|
|
this.endTime = this.dataRange[1]/1000 || ''
|
|
|
const res = await queryVoucherList(this.pageNumber,this.startTime, this.endTime)
|
|
|
console.log('查询动账', res);
|
|
|
- this.tableData = res.datas.data
|
|
|
- this.total = res.datas.total * this.pageSize
|
|
|
+ if (res && res.code == 200) {
|
|
|
+ this.tableData = res.datas.data
|
|
|
+ this.total = res.datas.total * this.pageSize
|
|
|
+ }
|
|
|
},
|
|
|
// 重置
|
|
|
onReset() {
|
|
@@ -400,7 +406,9 @@ export default {
|
|
|
console.log('fd', fd);
|
|
|
const res = await updateVoucher(fd) // 调用接口实现文件上传
|
|
|
console.log('res', res);
|
|
|
- this.file_path = res.datas.file_path
|
|
|
+ if (res && res.code == 200) {
|
|
|
+ this.file_path = res.datas.file_path
|
|
|
+ }
|
|
|
|
|
|
// const res = await this.$axios.post('http://192.168.1.195/upfile.php', {
|
|
|
// name: fd
|