From db59052e47cc9064c5a68cb7d8023d8beea8fdcd Mon Sep 17 00:00:00 2001
From: tianyi <13521030702@163.com>
Date: Mon, 23 Mar 2026 15:43:37 +0800
Subject: [PATCH] =?UTF-8?q?=E7=BB=84=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
components/tab-bar/delivery.vue | 539 ++++++++++++++++++++++++--------
components/tab-bar/myCenter.vue | 10 +-
2 files changed, 423 insertions(+), 126 deletions(-)
diff --git a/components/tab-bar/delivery.vue b/components/tab-bar/delivery.vue
index 5db872a..c8b2536 100644
--- a/components/tab-bar/delivery.vue
+++ b/components/tab-bar/delivery.vue
@@ -9,14 +9,16 @@
:style="{'color':tab1Checked == 'daiqu'?'#000':'#777','font-size':tab1Checked== 'daiqu'?'36rpx':'30rpx'}">
待取货
待送达
@@ -30,7 +32,8 @@
#021
-
+
代买饭
立即送达(10:30前)
-
+
备注:不要葱,不要香菜
-
+
取件方式(3件)
@@ -62,25 +67,26 @@
手机尾号
-
-
-
-
+
-
+
沁园春第三食堂A20窗口
@@ -90,11 +96,15 @@
-
+
-
-
+
+
11号宿舍楼610
@@ -104,7 +114,9 @@
-
+
@@ -114,8 +126,11 @@
-
+
配送佣金
+
+ 超大/超重
+
¥5.00 (包含¥2平台佣金)
@@ -125,9 +140,10 @@
-
+
-
+
@@ -135,51 +151,111 @@
上下线 ▼
- {{item.title}}
+ {{item.title}}
-
-
+
+
设置指派单规则
-
+
-
-
-
-
-
- 取
-
-
- {{item.getAreaName}}
-
+
+
+ 设置指派单规则
+
+
+ 接受指派单
+
+
+
+
+
+ 外卖规则
+
+ 全选
+
+
+
+
+
+
+
+
+ 取
-
-
- 送
-
-
- {{item.putAreaName}}
-
+
+ {{item.getAreaName}}
-
-
-
+
+
+
+ 送
+
+
+ {{item.putAreaName}}
-
- 备注:
-
+
+
+
+
+
+
+ 跑腿规则
+
+ 全选
+
+
+
+
+
+
+
+
+ 取
+
+
+ {{item.getAreaName}}
+
+
+
+
+ 送
+
+
+ {{item.putAreaName}}
+
+
+
+
+
+
+
+
+
+
+ 确认修改
+
+
+
+
+
+
-
@@ -190,128 +266,221 @@
export default {
data() {
return {
+ bigImg:'',
+ zhipaiCheck: false,
tab1Checked: 'daiqu',
menuButtonInfo: {},
- isArea:false,
+ isArea: false,
waimaRuleList: [],
- selectRuleList:[],
- paotuiRuleList:[],
- lineStatus:[
- {
- title:'上线',
- value:0
+ selectRuleList: [],
+ paotuiRuleList: [],
+ lineStatus: [{
+ title: '上线',
+ value: 0
},
{
- title:'下线',
- value:1
+ title: '下线',
+ value: 1
}
]
}
},
- props:{
-
+ props: {
+
},
watch: {
-
+
},
onReachBottom() {
if (this.searchForm.pageNumber >= this.totalPages) return;
// this.status = 'loading';
this.searchForm.pageNumber++;
this.getShopList();
-
+
},
methods: {
- init(){
+ init() {
console.log("配送初始化")
this.menuButtonInfo = uni.getMenuButtonBoundingClientRect()
},
- selectRule(item){
+ //查看大图
+ largeImg(img) {
+ this.bigImg = 'https://jewel-shop.oss-cn-beijing.aliyuncs.com/00b1f011787c4549bbea650d95a4eb39.png'
+ this.$refs.imgPopup.open()
+ },
+ zhipaiChange(e) {
+ this.zhipaiCheck = e.detail.value
+ },
+ checkVoucher(index,type) {
+ if (type == 'waimai'){
+ this.waimaRuleList[index].isChecked = !this.waimaRuleList[index].isChecked
+ }else{
+ this.paotuiRuleList[index].isChecked = !this.paotuiRuleList[index].isChecked
+ }
+ },
+ selectRule(item) {
//TODO 这里应该改成 复选,选中的遍历再放进来
- let rule = {
- id:item.id,
- getPushOrder:1
+ // let rule = {
+ // id: item.id,
+ // getPushOrder: 1
+ // }
+ // this.selectRuleList.push(rule)
+ this.selectRuleList = []
+ this.waimaiData = []
+ this.paotuiData = []
+ for(let i=0;i {
uni.hideLoading();
if (res.code == 200) {
- uni.showToast({title: '设置成功'});
+ let worker = uni.getStorageSync('worker') || {}; // 避免取不到时出错
+ worker.getPushOrder = this.zhipaiCheck ? 1 : 0;
+ uni.setStorageSync('worker', worker);
+ uni.setStorageSync('waimaiData',JSON.stringify(this.waimaiData))
+ uni.setStorageSync('paotuiData',JSON.stringify(this.paotuiData))
+ if(this.zhipaiCheck == false){
+ uni.removeStorageSync('waimaiData')
+ uni.removeStorageSync('paotuiData')
+ }
+ uni.showToast({
+ title: '设置成功'
+ });
} else {
- uni.showToast({title: res.message, icon: 'none'});
+ 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;
+ allCheck(type){
+ let data = []
+ if(type=='waimai'){
+ data = this.waimaRuleList
+ }else{
+ data = this.paotuiRuleList
+ }
+ for(let i=0;i {
+ if (res.code == 200) {
+ if (res.result != null) {
+ let data = res.result;
+ let list = data.workerRelaPriceList || [];
+ for(let i=0;i 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.zhipaiCheck = uni.getStorageSync('worker').getPushOrder==1?true:false
+ if(uni.getStorageSync('waimaiData')){
+ let waimaiData = JSON.parse(uni.getStorageSync('waimaiData'))
+ for(let i=0;i 0) {
- that.paotuiRuleList = paotuiList;
+ }
+ }
+ if(uni.getStorageSync('paotuiData')){
+ let paotuiData = JSON.parse(uni.getStorageSync('paotuiData'))
+ for(let i=0;i {})
+ this.$refs.carPopup.open()
+ } else {
+ that.tui.toast(res.message)
+ return
+ }
+ }).catch((res) => {})
},
- checkArea(){
+ checkArea() {
this.isArea = !this.isArea
},
checkTab1(type) {
this.tab1Checked = type
},
- changeOnline(value){
+ changeOnline(value) {
let url = ''
- if(value == 0){
+ if (value == 0) {
url = '/worker/onLine'
- }else{
+ } else {
url = '/worker/offLine'
}
this.tui.request(url, "POST", {
- id:uni.getStorageSync('worker').workerId
+ id: uni.getStorageSync('worker').workerId
}, false, true).then((res) => {
if (res.code == 200) {
+ let worker = uni.getStorageSync('worker') || {}; // 避免取不到时出错
+ worker.isOnLine = value;
+ uni.setStorageSync('worker', worker);
this.tui.toast(res.message)
} else {
this.tui.toast(res.message)
}
-
+
})
this.isArea = !this.isArea
},
ceshi(e) {
- console.log("11111111",e)
+ console.log("11111111", e)
if (e.detail.code) {
// 将 code 发送给后端
this.tui.request("/social/wechat/getPhone", "POST", {
- code:e.detail.code
+ code: e.detail.code
}, false, true).then((res) => {
if (res.code == 200) {
-
+
} else {
this.tui.toast(res.message)
}
-
+
})
} else {
// 用户拒绝授权
@@ -330,7 +499,7 @@
background: #F5F8F5;
color: #00231C;
}
-
+
.page1 {
width: 100%;
height: 100%;
@@ -339,28 +508,32 @@
display: flex;
flex-direction: column;
}
+
.title {
background: url('https://jewel-shop.oss-cn-beijing.aliyuncs.com/8bc15960c2dc40268e295d6dd23aecce.png') no-repeat;
width: 100%;
height: 190px;
}
- .title-sreach{
+
+ .title-sreach {
width: 100%;
display: flex;
height: 200rpx;
position: relative;
}
+
.sort-member {
line-height: 60rpx;
text-align: center;
height: 60rpx;
}
+
.tab1 {
- height: 60rpx;
- line-height: 60rpx;
- display: flex;
+ height: 60rpx;
+ line-height: 60rpx;
+ display: flex;
}
-
+
.tabs1 {
position: relative;
font-size: 30rpx;
@@ -368,6 +541,7 @@
color: #777;
flex: 1;
}
+
.content {
flex: 1;
width: 95%;
@@ -375,38 +549,157 @@
-webkit-overflow-scrolling: touch;
margin: -90px auto 0;
}
+
.box1 {
width: 100%;
margin: 20rpx auto 20rpx;
background: #fff;
border-radius: 20rpx;
padding: 20rpx;
- position:relative;
+ position: relative;
}
-
+
.goods-content {
flex: 1;
}
-
+
.goods-name {
font-size: 32rpx;
font-weight: 900;
}
+
.maotou {
width: 90rpx;
background: url('https://jewel-shop.oss-cn-beijing.aliyuncs.com/a1584a13e9db4b6fbcc66890219d0018.png') no-repeat;
height: 90rpx;
- background-size: 100%;
- position: absolute;
- top: -20rpx;
- right: 20rpx;
- text-align: center;
- line-height: 90rpx;
- font-weight: 900;
- font-size: 24rpx;
+ background-size: 100%;
+ position: absolute;
+ top: -20rpx;
+ right: 20rpx;
+ text-align: center;
+ line-height: 90rpx;
+ font-weight: 900;
+ font-size: 24rpx;
+ }
+
+ .right {
+ width: 30px;
+ padding-top: 10px;
+ }
+
+ .guize-list {
+ width: 300px;
+ padding: 10px;
+ overflow: scroll;
+ background: #fff;
+ border-radius: 10px;
+ max-height: 500px;
+ }
+
+ .zhipai-box {
+ display: flex;
+ height: 50px;
+ line-height: 50px;
+ font-size: 16px;
+ font-weight: 700;
+ border-bottom: 1px solid #eee;
+ }
+
+ .zhipai {
+ flex: 1;
+ text-align: right;
+ }
+ .radio-check {
+ background: linear-gradient(90deg, rgba(227, 255, 150, 1), rgba(166, 255, 234, 1));
+ width: 24px;
+ height: 24px;
+ border-radius: 24px;
+ text-align: center;
+ line-height: 24px;
+ margin: 8px 10px 0 0;
+ }
+ .radio-no-check {
+ width: 24px;
+ height: 24px;
+ border-radius: 24px;
+ border: 1px solid #eee;
+ margin: 8px 10px 0 0;
+ }
+ .guize1-qusong {
+ display: flex;
+ flex: 1;
+ padding-top: 10px;
+ }
+
+ .guize1 {
+ display: flex;
+ }
+
+ .qusong1 {
+ width: 20px;
+ height: 20px;
+ background: rgba(0, 35, 28, 1);
+ color: #fff;
+ border-radius: 20px;
+ text-align: center;
+ line-height: 20px;
+ font-size: 10px;
+ z-index: 80;
+ }
+
+ .qusong2 {
+ height: 20px;
+ font-size: 12px;
+ line-height: 19px;
+ text-align: center;
+ background: rgba(166, 255, 234, 0.5);
+ padding: 0 10px;
+ margin-left: -5px;
+ font-weight: 700;
+ border-top-right-radius: 20px;
+ border-bottom-right-radius: 20px;
+ }
+
+ .qusong3 {
+ width: 95px;
+ height: 35px;
+ background: #fff;
+ border-radius: 5px;
+ padding: 5px 10px;
+ flex: 1;
+ }
+ .btn {
+ width: 95%;
+ height: 50px;
+ font-size: 16px;
+ font-weight: 700;
+ background: linear-gradient(90deg, rgba(227, 255, 150, 1), rgba(166, 255, 234, 1));
+ border-radius: 50px;
+ line-height: 50px;
+ text-align: center;
+ margin: 20px auto;
+ }
+ .code-box{
+ display: inline-block;
+ height: 26px;
+ line-height: 26px;
+ background: rgba(166, 255, 234, 0.4);
+ padding: 0 10px;
+ border-radius: 5px;
+ color: #000;
+ border: 1px solid rgba(2, 251, 221, 1);
+ }
+ .img-popup-content {
+ width: 500rpx;
+ height: 500rpx;
}
- .right{
- width: 30px;
- padding-top: 10px;
+ .chaoda{
+ height: 15px;
+ line-height: 15px;
+ margin: 5px 0 0 10px;
+ padding: 0 5px;
+ background: rgba(255, 117, 88, 1);
+ color: #fff;
+ border-radius: 5px;
}
\ No newline at end of file
diff --git a/components/tab-bar/myCenter.vue b/components/tab-bar/myCenter.vue
index fdf4c82..662859c 100644
--- a/components/tab-bar/myCenter.vue
+++ b/components/tab-bar/myCenter.vue
@@ -4,7 +4,7 @@
新增商品
商家入驻
兼职注册
-
+
@@ -63,8 +63,12 @@
this.$refs.jianzhiPopup.close()
}
}else if(e=='jianzhizhuce'){
- this.$refs.jianzhiPopup.open()
- return
+ if(uni.getStorageSync('worker')){
+ url = '/package1/myCenter/partTimeJobRegister'
+ }else{
+ this.$refs.jianzhiPopup.open()
+ return
+ }
}
uni.navigateTo({
url: url