|
|
|
@ -485,39 +485,44 @@ |
|
|
|
this.waimaiData = [] |
|
|
|
this.kuaidiData = [] |
|
|
|
for(let i=0;i<this.waimaRuleList.length;i++){ |
|
|
|
if(this.waimaRuleList[i].isChecked){ |
|
|
|
let rule = { |
|
|
|
id: this.waimaRuleList[i].id, |
|
|
|
getPushOrder: 1 |
|
|
|
} |
|
|
|
this.selectRuleList.push(rule) |
|
|
|
let rule = { |
|
|
|
id: this.waimaRuleList[i].id, |
|
|
|
getPushOrder: 1 |
|
|
|
} |
|
|
|
if(!this.waimaRuleList[i].isChecked){ |
|
|
|
rule.getPushOrder = 0 |
|
|
|
}else{ |
|
|
|
this.waimaiData.push(this.waimaRuleList[i]) |
|
|
|
} |
|
|
|
this.selectRuleList.push(rule) |
|
|
|
} |
|
|
|
for(let i=0;i<this.paotuiRuleList.length;i++){ |
|
|
|
if(this.paotuiRuleList[i].isChecked){ |
|
|
|
let rule = { |
|
|
|
id: this.paotuiRuleList[i].id, |
|
|
|
getPushOrder: 1 |
|
|
|
} |
|
|
|
this.selectRuleList.push(rule) |
|
|
|
let rule = { |
|
|
|
id: this.paotuiRuleList[i].id, |
|
|
|
getPushOrder: 1 |
|
|
|
} |
|
|
|
if(!this.paotuiRuleList[i].isChecked){ |
|
|
|
rule.getPushOrder = 0 |
|
|
|
}else{ |
|
|
|
this.kuaidiData.push(this.paotuiRuleList[i]) |
|
|
|
} |
|
|
|
this.selectRuleList.push(rule) |
|
|
|
} |
|
|
|
let submitData = { |
|
|
|
userId: uni.getStorageSync('id'), |
|
|
|
workerRelaPriceList: this.selectRuleList, |
|
|
|
getPushOrder: this.zhipaiCheck?1:0 |
|
|
|
}; |
|
|
|
let that = this; |
|
|
|
this.tui.request('/app/workerRelaPrice/batchUpdate', 'post', submitData).then(res => { |
|
|
|
uni.hideLoading(); |
|
|
|
if (res.code == 200) { |
|
|
|
let worker = uni.getStorageSync('worker') || {}; // 避免取不到时出错 |
|
|
|
worker.getPushOrder = this.zhipaiCheck ? 1 : 0; |
|
|
|
worker.getPushOrder = that.zhipaiCheck ? 1 : 0; |
|
|
|
uni.setStorageSync('worker', worker); |
|
|
|
uni.setStorageSync('waimaiData',this.waimaiData) |
|
|
|
uni.setStorageSync('kuaidiData',this.kuaidiData) |
|
|
|
if(this.zhipaiCheck == false){ |
|
|
|
uni.setStorageSync('waimaiData',that.waimaiData) |
|
|
|
uni.setStorageSync('kuaidiData',that.kuaidiData) |
|
|
|
if(that.zhipaiCheck == false){ |
|
|
|
uni.removeStorageSync('waimaiData') |
|
|
|
uni.removeStorageSync('kuaidiData') |
|
|
|
} |
|
|
|
@ -546,6 +551,10 @@ |
|
|
|
} |
|
|
|
}, |
|
|
|
openPopup() { |
|
|
|
if(this.isOnLine != 0){ |
|
|
|
this.tui.toast('请先上线后配置'); |
|
|
|
return; |
|
|
|
} |
|
|
|
let that = this |
|
|
|
that.tui.request("/app/workerRelaPrice/getByWorkerId?workerId=" + uni.getStorageSync('worker').workerId, |
|
|
|
"GET", {}, false, true).then((res) => { |
|
|
|
|