|
|
@@ -34,13 +34,14 @@ Page({
|
|
|
this.setData({
|
|
|
sa_salesforecastbillid: options.sa_salesforecastbillid
|
|
|
});
|
|
|
- this.getDetail();
|
|
|
+ this.getDetail(true);
|
|
|
},
|
|
|
- getDetail() {
|
|
|
+ getDetail(init = false) {
|
|
|
_Http.basic({
|
|
|
"id": 20220914104603,
|
|
|
"version": 1,
|
|
|
"content": {
|
|
|
+ nocache: true,
|
|
|
"sa_salesforecastbillid": this.data.sa_salesforecastbillid
|
|
|
},
|
|
|
}).then(res => {
|
|
|
@@ -54,10 +55,10 @@ Page({
|
|
|
detail: res.data,
|
|
|
briefs: [{
|
|
|
label: "提报开始时间",
|
|
|
- value: '123'
|
|
|
+ value: res.data.periodstart
|
|
|
}, {
|
|
|
label: "提报周期",
|
|
|
- value: res.data.isrepeat == 0 ? res.data.begdate : `每月${res.data.periodpoint}号`
|
|
|
+ value: res.data.reportingperiod
|
|
|
}, {
|
|
|
label: "提报要求",
|
|
|
value: res.data.remarks
|
|
|
@@ -76,10 +77,10 @@ Page({
|
|
|
value: res.data.remarks
|
|
|
}, {
|
|
|
label: "提报开始时间",
|
|
|
- value: res.data.begdate
|
|
|
+ value: res.data.periodstart
|
|
|
}, {
|
|
|
label: "提报周期",
|
|
|
- value: res.data.isrepeat == 0 ? res.data.begdate : `每月${res.data.periodpoint}号`
|
|
|
+ value: res.data.reportingperiod
|
|
|
}, {
|
|
|
label: "预测金额(元)",
|
|
|
value: res.data.sumamount
|
|
|
@@ -102,9 +103,25 @@ Page({
|
|
|
}],
|
|
|
tabsList: this.data.tabsList
|
|
|
});
|
|
|
- this.getTags();
|
|
|
- this.getGroup();
|
|
|
- this.partialRenewal();
|
|
|
+
|
|
|
+ /* 更新列表数据 */
|
|
|
+ let page = getCurrentPages().find(v => v.__route__ == 'packageA/salesForecasting/index');
|
|
|
+ if (page) {
|
|
|
+ let i = page.data.list.findIndex(v => v.sa_salesforecastbillid == this.data.sa_salesforecastbillid);
|
|
|
+ if (i != -1) {
|
|
|
+ page.data.list[i].status = res.data.status;
|
|
|
+ page.data.list[i].amount = res.data.sumamount;
|
|
|
+ page.setData({
|
|
|
+ [`list[${i}]`]: page.data.list[i]
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if (init) {
|
|
|
+ this.getTags();
|
|
|
+ this.getGroup();
|
|
|
+ this.partialRenewal();
|
|
|
+ }
|
|
|
})
|
|
|
},
|
|
|
//tabs 切换
|
|
|
@@ -192,7 +209,8 @@ Page({
|
|
|
icon: "none"
|
|
|
})
|
|
|
let page = getCurrentPages().find(v => v.__route__ == 'packageA/select/project/select');
|
|
|
- if (page) page.deteleItem(data.sa_projectid)
|
|
|
+ if (page) page.deteleItem(data.sa_projectid);
|
|
|
+ that.getDetail();
|
|
|
}, 500)
|
|
|
})
|
|
|
}
|