|
@@ -11,14 +11,13 @@ Page({
|
|
|
data: {
|
|
|
accountList: [],
|
|
|
active: 0,
|
|
|
- ymonth: "", //年月
|
|
|
dateEnd: "", //日期结束时间
|
|
|
+ begindate: "",
|
|
|
+ enddate: "",
|
|
|
},
|
|
|
onLoad(options) {
|
|
|
- let ymonth = formatTime(new Date(), '年').split(" ")[0].slice(0, 7);
|
|
|
this.setData({
|
|
|
- ymonth,
|
|
|
- dateEnd: ymonth
|
|
|
+ dateEnd: formatTime(new Date(), '-').split(" ")[0]
|
|
|
});
|
|
|
_Http.basic({
|
|
|
id: 20221008145903,
|
|
@@ -52,9 +51,9 @@ Page({
|
|
|
/* 切换查看时间 */
|
|
|
changeDate(e) {
|
|
|
this.setData({
|
|
|
- ymonth: e.detail.value.replace('-', '年')
|
|
|
+ [`${e.currentTarget.dataset.name}`]: e.detail.value
|
|
|
})
|
|
|
- this.getList();
|
|
|
+ this.getList(true);
|
|
|
},
|
|
|
getList() {
|
|
|
let data = this.data.accountList[this.data.active];
|
|
@@ -65,8 +64,8 @@ Page({
|
|
|
"sys_enterpriseid": data.sys_enterpriseid,
|
|
|
"sa_accountclassid": data.sa_accountclassid,
|
|
|
"where": {
|
|
|
- "year": this.data.ymonth.split("年")[0],
|
|
|
- "month": this.data.ymonth.split("年")[1]
|
|
|
+ begindate: this.data.begindate,
|
|
|
+ enddate: this.data.enddate
|
|
|
}
|
|
|
}
|
|
|
}).then(res => {
|