From 2186837ed7e75dc9be599ce225c5f5772ba4c1dc Mon Sep 17 00:00:00 2001 From: wangfukang <15630117759@163.com> Date: Sun, 22 Mar 2026 17:36:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20=E6=96=B0=E7=9A=84?= =?UTF-8?q?=E5=85=B3=E6=B3=A8=E5=85=AC=E4=BC=97=E5=8F=B7=20=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E7=BB=91=E5=AE=9A=20=E4=BB=A5=E5=8F=8A=E9=85=8D?= =?UTF-8?q?=E9=80=81=E5=91=98=E4=B8=8A=E4=B8=8B=E7=BA=BF=EF=BC=8C=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E6=8E=A5=E5=8D=95=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/tab-bar/delivery.vue | 139 +++++++++++++++++++++++++++++++- 1 file changed, 135 insertions(+), 4 deletions(-) diff --git a/components/tab-bar/delivery.vue b/components/tab-bar/delivery.vue index cbbfd5c..5db872a 100644 --- a/components/tab-bar/delivery.vue +++ b/components/tab-bar/delivery.vue @@ -21,10 +21,6 @@ - - - - @@ -131,8 +127,59 @@ + + + + + + 上下线 + + + {{item.title}} + + + + 设置指派单规则 + + + + + + + + + + + 取 + + + {{item.getAreaName}} + + + + + 送 + + + {{item.putAreaName}} + + + + + + + + + 备注: + + + + + + @@ -145,6 +192,20 @@ return { tab1Checked: 'daiqu', menuButtonInfo: {}, + isArea:false, + waimaRuleList: [], + selectRuleList:[], + paotuiRuleList:[], + lineStatus:[ + { + title:'上线', + value:0 + }, + { + title:'下线', + value:1 + } + ] } }, props:{ @@ -165,9 +226,79 @@ console.log("配送初始化") this.menuButtonInfo = uni.getMenuButtonBoundingClientRect() }, + selectRule(item){ + //TODO 这里应该改成 复选,选中的遍历再放进来 + let rule = { + id:item.id, + getPushOrder:1 + } + this.selectRuleList.push(rule) + let submitData = { + userId: uni.getStorageSync('id'), + workerRelaPriceList: this.selectRuleList + }; + this.tui.request('/app/workerRelaPrice/batchUpdate', 'post', submitData).then(res => { + uni.hideLoading(); + if (res.code == 200) { + uni.showToast({title: '设置成功'}); + } else { + uni.showToast({title: res.message, icon: 'none'}); + } + }).catch(err => { + uni.hideLoading(); + }); + }, + openPopup(){ + let that = this + that.tui.request("/app/workerRelaPrice/getByWorkerId?workerId=" + uni.getStorageSync('worker').workerId, "GET", {}, false, true).then((res) => { + if (res.code == 200) { + if(res.result != null){ + let data = res.result; + let list = data.workerRelaPriceList || []; + let waimaList = list.filter(item => item.orderType == 0); + let paotuiList = list.filter(item => item.orderType == 1); + + if(waimaList.length > 0) { + that.waimaRuleList = waimaList; + } + if(paotuiList.length > 0) { + that.paotuiRuleList = paotuiList; + } + that.$forceUpdate(); + } + + this.$refs.carPopup.open('bottom') + } else { + that.tui.toast(res.message) + return + } + }).catch((res) => {}) + }, + checkArea(){ + this.isArea = !this.isArea + }, checkTab1(type) { this.tab1Checked = type }, + changeOnline(value){ + let url = '' + if(value == 0){ + url = '/worker/onLine' + }else{ + url = '/worker/offLine' + } + this.tui.request(url, "POST", { + id:uni.getStorageSync('worker').workerId + }, false, true).then((res) => { + if (res.code == 200) { + this.tui.toast(res.message) + } else { + this.tui.toast(res.message) + } + + }) + this.isArea = !this.isArea + }, ceshi(e) { console.log("11111111",e) if (e.detail.code) {