|
@@ -26,13 +26,14 @@ Page({
|
|
|
this.setData({
|
|
|
sa_orderid: options.id
|
|
|
});
|
|
|
- this.getDetail();
|
|
|
+ this.getDetail(true);
|
|
|
},
|
|
|
/* 获取详情 */
|
|
|
- getDetail() {
|
|
|
+ getDetail(init = false) {
|
|
|
_Http.basic({
|
|
|
"id": 20221108151302,
|
|
|
"content": {
|
|
|
+ nocache: true,
|
|
|
"sa_orderid": this.data.sa_orderid
|
|
|
}
|
|
|
}).then(res => {
|
|
@@ -45,7 +46,63 @@ Page({
|
|
|
detail: res.data,
|
|
|
loading: false
|
|
|
});
|
|
|
- this.partialRenewal(true)
|
|
|
+ if (init) this.partialRenewal(true)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ /* 选择结算人 */
|
|
|
+ selectAgent() {
|
|
|
+ console.log(this.isEdit());
|
|
|
+ wx.navigateTo({
|
|
|
+ url: `/select/agent/index?params=${JSON.stringify({
|
|
|
+ "id": 20221011144903,
|
|
|
+ "content": {
|
|
|
+ "isExport": 0,
|
|
|
+ "pageNumber": 1,
|
|
|
+ "pageTotal": 1,
|
|
|
+ "pageSize": 20,
|
|
|
+ "where": {
|
|
|
+ "condition": "",
|
|
|
+ "tablefilter": {}
|
|
|
+ },
|
|
|
+ "sa_saleareaids": [14],
|
|
|
+ "containssub": 1
|
|
|
+ }
|
|
|
+ })}&radio=true`,
|
|
|
+ });
|
|
|
+ getApp().globalData.handleSelect = this.setAgeant.bind(this);
|
|
|
+ },
|
|
|
+ /* 设置经销商 */
|
|
|
+ setAgeant({
|
|
|
+ item
|
|
|
+ }) {
|
|
|
+ let that = this;
|
|
|
+ wx.showModal({
|
|
|
+ title: '提示',
|
|
|
+ content: `是否确认设置"${item.enterprisename}"为结算人?`,
|
|
|
+ complete: (res) => {
|
|
|
+ if (res.confirm) {
|
|
|
+ let id = that.data.detail.sys_enterpriseid;
|
|
|
+ that.setData({
|
|
|
+ "detail.sys_enterpriseid": item.sys_enterpriseid
|
|
|
+ });
|
|
|
+ that.changeDetail().then(s => {
|
|
|
+ if (s.msg == '成功') {
|
|
|
+ wx.showToast({
|
|
|
+ title: '设置成功',
|
|
|
+ icon: "none"
|
|
|
+ });
|
|
|
+ setTimeout(() => {
|
|
|
+ wx.navigateBack();
|
|
|
+ that.getDetail();
|
|
|
+ }, 500)
|
|
|
+ } else {
|
|
|
+ that.setData({
|
|
|
+ "detail.sys_enterpriseid": id
|
|
|
+ });
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
})
|
|
|
},
|
|
|
//tabs 切换
|
|
@@ -252,6 +309,6 @@ Page({
|
|
|
title: '当前订单状态不可设置!',
|
|
|
icon: "none"
|
|
|
});
|
|
|
- return this.data.detail.status == '新建';
|
|
|
+ return this.data.detail.status != '新建';
|
|
|
}
|
|
|
})
|