|
@@ -1,4 +1,7 @@
|
|
|
-const _Http = getApp().globalData.http;
|
|
|
+const _Http = getApp().globalData.http,
|
|
|
+ {
|
|
|
+ formatTime
|
|
|
+ } = require("../../utils/getTime");
|
|
|
let pageNumber = 1,
|
|
|
pageTotal = 1,
|
|
|
sys_payorderid = null,
|
|
@@ -21,7 +24,6 @@ Page({
|
|
|
})
|
|
|
sys_payorderid = options.sys_payorderid;
|
|
|
this.getVersions();
|
|
|
- this.getUsers(true);
|
|
|
},
|
|
|
/* 保存订单进度 */
|
|
|
changeOrder() {
|
|
@@ -96,6 +98,7 @@ Page({
|
|
|
versionsList: res.data,
|
|
|
sys_site_systempartitionid: res.data[0].sys_site_systempartitionid || ''
|
|
|
})
|
|
|
+ this.getUsers(true);
|
|
|
})
|
|
|
},
|
|
|
/* 切换版本 */
|
|
@@ -107,7 +110,7 @@ Page({
|
|
|
this.setData({
|
|
|
sys_site_systempartitionid
|
|
|
});
|
|
|
- this.changeOrder();
|
|
|
+ this.setUsers();
|
|
|
},
|
|
|
checkVer(e) {
|
|
|
const {
|
|
@@ -127,7 +130,7 @@ Page({
|
|
|
"method": "chooseUsers",
|
|
|
"content": {
|
|
|
pageNumber,
|
|
|
- "pageSize": 20,
|
|
|
+ "pageSize": 99999,
|
|
|
"where": {
|
|
|
"condition": ""
|
|
|
}
|
|
@@ -147,15 +150,36 @@ Page({
|
|
|
};
|
|
|
pageTotal = res.pageTotal;
|
|
|
this.setData({
|
|
|
- userList: res.pageNumber == 1 ? res.data : this.data.userList.concat(res.data),
|
|
|
- users: res.pageNumber == 1 ? [this.data.sys_payincidence == 1 ? (res.data[0].userid + "") : (res.data[0].sa_agentsid + "" || "")] : this.data.users,
|
|
|
+ userList: res.pageNumber == 1 ? res.data : this.data.userList.concat(res.data)
|
|
|
})
|
|
|
pageNumber = res.pageNumber + 1;
|
|
|
+ this.setUsers();
|
|
|
this.changeOrder();
|
|
|
})
|
|
|
},
|
|
|
+ setUsers() {
|
|
|
+ let users = [],
|
|
|
+ list = this.data.userList,
|
|
|
+ idname = this.data.sys_payincidence == 1 ? 'userid' : 'sa_agentsid'
|
|
|
+ list.forEach(v => {
|
|
|
+ if (v.userid == wx.getStorageSync('userMsg').userid) {
|
|
|
+ users.push(v[idname] + '');
|
|
|
+ } else if (v.isleader == 1) {
|
|
|
+ let date = v.enddate[this.data.sys_site_systempartitionid];
|
|
|
+ if (date) {
|
|
|
+ if (formatTime(new Date(), '-').split(" ")[0] >= date) users.push(v[idname] + '');
|
|
|
+ } else {
|
|
|
+ users.push(v[idname] + '');
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ this.setData({
|
|
|
+ users
|
|
|
+ });
|
|
|
+ this.changeOrder();
|
|
|
+ },
|
|
|
onReachBottom() {
|
|
|
- this.getUsers();
|
|
|
+ // this.getUsers();
|
|
|
},
|
|
|
onChange(e) {
|
|
|
const {
|