|
|
@@ -9,10 +9,17 @@ let queue = [],
|
|
|
downCounter = null;
|
|
|
|
|
|
Component({
|
|
|
+ options: {
|
|
|
+ addGlobalClass: true
|
|
|
+ },
|
|
|
properties: {
|
|
|
disabled: {
|
|
|
type: Boolean
|
|
|
}, //禁用
|
|
|
+ isSync: { //居间同步
|
|
|
+ type: Boolean,
|
|
|
+ value: true
|
|
|
+ }
|
|
|
},
|
|
|
data: {
|
|
|
sa_contractid: 0,
|
|
|
@@ -36,7 +43,7 @@ Component({
|
|
|
getList(id, init) {
|
|
|
let content = this.data.content;
|
|
|
content.sa_contractid = id;
|
|
|
- console.log("id", id)
|
|
|
+ this.data.sa_contractid = id;
|
|
|
content.sys_enterpriseid = getCurrentPages().find(v => v.__route__ == 'packageA/contract/detail').data.detail.sys_enterpriseid;
|
|
|
if (init) content.pageNumber = 1;
|
|
|
_Http.basic({
|
|
|
@@ -65,8 +72,7 @@ Component({
|
|
|
"content.pageNumber": res.pageNumber + 1,
|
|
|
"content.pageSize": res.pageSize,
|
|
|
"content.pageTotal": res.pageTotal,
|
|
|
- "content.total": res.total,
|
|
|
- sa_contractid: id
|
|
|
+ "content.total": res.total
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
@@ -198,6 +204,31 @@ Component({
|
|
|
}
|
|
|
});
|
|
|
})
|
|
|
+ },
|
|
|
+ brokerSync() {
|
|
|
+ let that = this;
|
|
|
+ wx.showModal({
|
|
|
+ title: '同步协议',
|
|
|
+ content: '是否添加关联的项目或客户合同中的产品明细同步更新到列表',
|
|
|
+ complete: ({
|
|
|
+ confirm
|
|
|
+ }) => {
|
|
|
+ if (confirm) _Http.basic({
|
|
|
+ "id": 20240518155604,
|
|
|
+ "content": {
|
|
|
+ "sa_contractid": that.data.sa_contractid
|
|
|
+ },
|
|
|
+ }).then(res => {
|
|
|
+ console.log("同步", res)
|
|
|
+ wx.showToast({
|
|
|
+ title: res.msg == '成功' ? '同步成功' : res.msg,
|
|
|
+ icon: "none"
|
|
|
+ })
|
|
|
+ if (res.msg != '成功') return
|
|
|
+ that.getList(that.data.sa_contractid, true)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
})
|