|
@@ -16,30 +16,54 @@ Page({
|
|
|
enddate: "",
|
|
|
},
|
|
|
onLoad(options) {
|
|
|
+ let usertype = wx.getStorageSync('userMsg').usertype
|
|
|
this.setData({
|
|
|
- dateEnd: formatTime(new Date(), '-').split(" ")[0]
|
|
|
+ dateEnd: formatTime(new Date(), '-').split(" ")[0],
|
|
|
+ usertype
|
|
|
});
|
|
|
- _Http.basic({
|
|
|
- id: 20221008145903,
|
|
|
- "content": {
|
|
|
- pageSize: 999,
|
|
|
- type: 1,
|
|
|
- "where": {
|
|
|
- "condition": ""
|
|
|
+ if (usertype == 1) {
|
|
|
+ _Http.basic({
|
|
|
+ "id": 20240111085504,
|
|
|
+ "content": {
|
|
|
+ "hrid": wx.getStorageSync('userMsg').hrid,
|
|
|
+ "pageSize": 999,
|
|
|
+ "pageNumner": 1
|
|
|
}
|
|
|
- }
|
|
|
- }).then(res => {
|
|
|
- console.log(res)
|
|
|
- this.setData({
|
|
|
- accountList: res.data.map(v => {
|
|
|
- v.creditquota = CNY(v.creditquota);
|
|
|
- v.usable = CNY(currency(v.creditquota).add(v.balance));
|
|
|
- v.balance = CNY(v.balance)
|
|
|
- return v
|
|
|
- })
|
|
|
- });
|
|
|
- this.getList(true);
|
|
|
- })
|
|
|
+ }).then(res => {
|
|
|
+ console.log("usertype1", res)
|
|
|
+ this.setData({
|
|
|
+ accountList: res.data.map(v => {
|
|
|
+ v.balance = CNY(v.balance)
|
|
|
+ v.expectedReward = CNY(v.expectedReward)
|
|
|
+ v.accountname = v.hraccountname
|
|
|
+ return v
|
|
|
+ })
|
|
|
+ });
|
|
|
+ this.getList(true);
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ _Http.basic({
|
|
|
+ id: 20221008145903,
|
|
|
+ "content": {
|
|
|
+ pageSize: 999,
|
|
|
+ type: 1,
|
|
|
+ "where": {
|
|
|
+ "condition": ""
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }).then(res => {
|
|
|
+ console.log(res)
|
|
|
+ this.setData({
|
|
|
+ accountList: res.data.map(v => {
|
|
|
+ v.creditquota = CNY(v.creditquota);
|
|
|
+ v.usable = CNY(currency(v.creditquota).add(v.balance));
|
|
|
+ v.balance = CNY(v.balance)
|
|
|
+ return v
|
|
|
+ })
|
|
|
+ });
|
|
|
+ this.getList(true);
|
|
|
+ })
|
|
|
+ }
|
|
|
},
|
|
|
/* 切换查看账户 */
|
|
|
changeAccount(e) {
|
|
@@ -57,7 +81,21 @@ Page({
|
|
|
},
|
|
|
getList() {
|
|
|
let data = this.data.accountList[this.data.active];
|
|
|
- _Http.basic({
|
|
|
+ let params = this.data.usertype == 1 ? {
|
|
|
+ "id": 20240111090304,
|
|
|
+ "content": {
|
|
|
+ "pageSize": 999999,
|
|
|
+ "pageNumber": 1,
|
|
|
+ "hrid": wx.getStorageSync('userMsg').hrid,
|
|
|
+ "where": {
|
|
|
+ "condition": "",
|
|
|
+ begindate: this.data.begindate,
|
|
|
+ enddate: this.data.enddate,
|
|
|
+ "type": "",
|
|
|
+ "sa_hraccountclassid": data.sa_hraccountclassid
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } : {
|
|
|
"id": "20230111103403",
|
|
|
"version": 1,
|
|
|
"content": {
|
|
@@ -68,7 +106,9 @@ Page({
|
|
|
enddate: this.data.enddate
|
|
|
}
|
|
|
}
|
|
|
- }).then(res => {
|
|
|
+ };
|
|
|
+
|
|
|
+ _Http.basic(params).then(res => {
|
|
|
console.log("账户流水", res)
|
|
|
if (res.msg == '成功') {
|
|
|
let expend = 0, //收入
|