|
@@ -10,7 +10,7 @@ Page({
|
|
|
dateEnd: "", //日期结束时间
|
|
|
},
|
|
|
onLoad(options) {
|
|
|
- let ymonth = formatTime(new Date(), '-').split(" ")[0].slice(0, 7);
|
|
|
+ let ymonth = formatTime(new Date(), '年').split(" ")[0].slice(0, 7);
|
|
|
this.setData({
|
|
|
ymonth,
|
|
|
dateEnd: ymonth
|
|
@@ -42,7 +42,7 @@ Page({
|
|
|
/* 切换查看时间 */
|
|
|
changeDate(e) {
|
|
|
this.setData({
|
|
|
- ymonth: e.detail.value
|
|
|
+ ymonth: e.detail.value.replace('-', '年')
|
|
|
})
|
|
|
this.getList();
|
|
|
},
|
|
@@ -55,8 +55,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]
|
|
|
+ "year": this.data.ymonth.split("年")[0],
|
|
|
+ "month": this.data.ymonth.split("年")[1]
|
|
|
}
|
|
|
}
|
|
|
}).then(res => {
|
|
@@ -67,7 +67,7 @@ Page({
|
|
|
if (res.data.total.length) {
|
|
|
let expendObj = res.data.total.find(v => v.type == 1);
|
|
|
if (expendObj) expend = expendObj.sumamount;
|
|
|
- let earningObj = res.data.total.find(v => v.type == 1);
|
|
|
+ let earningObj = res.data.total.find(v => v.type == 0);
|
|
|
if (earningObj) earning = earningObj.sumamount;
|
|
|
}
|
|
|
this.setData({
|