|
@@ -1,5 +1,5 @@
|
|
|
const app = getApp()
|
|
|
-import { examine_status } from '../../utils/dict';
|
|
|
+import { paystatusList } from '../../utils/dict';
|
|
|
import WxValidate from '../../utils/wxValidate';
|
|
|
Page({
|
|
|
|
|
@@ -12,13 +12,31 @@ Page({
|
|
|
list: [],
|
|
|
dialog: { title: '详细信息', show: false, type: '1' },
|
|
|
info: {},
|
|
|
+ statusList: paystatusList
|
|
|
},
|
|
|
// 跳转菜单
|
|
|
back(e) {
|
|
|
wx.navigateBack({ delta: 1 })
|
|
|
},
|
|
|
// 查询
|
|
|
- search: function (e) { console.log('查询'); },
|
|
|
+ onSearch: function () {
|
|
|
+ const that = this;
|
|
|
+ that.setData({ dialog: { title: '查询条件', show: true, type: '2' } })
|
|
|
+ },
|
|
|
+ // 选择支付状态
|
|
|
+ statusChange: function (e) {
|
|
|
+ const that = this;
|
|
|
+ let data = that.data.statusList[e.detail.value];
|
|
|
+ if (data) that.setData({ 'searchInfo.status': data.value })
|
|
|
+ },
|
|
|
+ // 提交查询
|
|
|
+ searchSubmit: function (e) {
|
|
|
+ const that = this;
|
|
|
+ const params = e.detail.value;
|
|
|
+ that.setData({ searchInfo: params })
|
|
|
+ that.watchLogin();
|
|
|
+ that.toClose()
|
|
|
+ },
|
|
|
// 查看
|
|
|
toView: async function (e) {
|
|
|
const that = this;
|
|
@@ -68,10 +86,15 @@ Page({
|
|
|
// 监听用户是否登录
|
|
|
watchLogin: async function () {
|
|
|
const that = this;
|
|
|
+ const searchInfo = that.data.searchInfo;
|
|
|
wx.getStorage({
|
|
|
key: 'user',
|
|
|
success: async res => {
|
|
|
- const arr = await app.$get(`/newCourt/api/payOrder`, { skip: 0, limit: 1000 });
|
|
|
+ let info = {};
|
|
|
+ if (searchInfo.money) info.money = searchInfo.money;
|
|
|
+ if (searchInfo.type) info.type = searchInfo.type;
|
|
|
+ if (searchInfo.status) info.status = searchInfo.status;
|
|
|
+ const arr = await app.$get(`/newCourt/api/payOrder`, { skip: 0, limit: 1000, ...info });
|
|
|
if (arr.errcode == '0') {
|
|
|
let list = arr.data;
|
|
|
for (const val of list) {
|