|
|
@ -21,10 +21,6 @@ |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
<view class="sort-member" style="margin-right: 10px;display: flex;padding-left: 5px;background: #fff;border-radius: 60rpx;flex: 1;"> |
|
|
|
|
|
<uni-icons type="search" size="12"></uni-icons> |
|
|
|
|
|
<input type="text" placeholder="搜索" style="height: 60rpx;line-height: 60rpx;" v-model="keyword" @confirm="getShopList"> |
|
|
|
|
|
</view> |
|
|
|
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
@ -131,8 +127,59 @@ |
|
|
<view style="width: 100%;height: 50px;margin-top: 16px;"> |
|
|
<view style="width: 100%;height: 50px;margin-top: 16px;"> |
|
|
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/c318cf292a4f40b296995c30e5e539ea.png" alt="" style="width: 100%;height: 50px;background-size: 100%;" /> |
|
|
<img src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/c318cf292a4f40b296995c30e5e539ea.png" alt="" style="width: 100%;height: 50px;background-size: 100%;" /> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
<view class="sort-member" style="width: 260rpx;"> |
|
|
|
|
|
<view class="tab1"> |
|
|
|
|
|
<view class="sort-member" style="position: relative;"> |
|
|
|
|
|
<view class="sort-text" @tap="checkArea"> |
|
|
|
|
|
上下线 <text style="font-size: 20rpx;">▼</text> |
|
|
|
|
|
</view> |
|
|
|
|
|
<view class="sort-value" v-if="isArea"> |
|
|
|
|
|
<view class="sort-value1" v-for="(item,index) in lineStatus" :key="index" @tap="changeOnline(item.value)">{{item.title}}</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
<view class="tabs1" @tap="openPopup()" |
|
|
|
|
|
style="color:#777;font-size:30rpx"> |
|
|
|
|
|
设置指派单规则 |
|
|
|
|
|
</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
<!-- 设置指派单规则弹窗 --> |
|
|
|
|
|
<uni-popup ref="carPopup" background-color="#fff" style="height: 800px !important;"> |
|
|
|
|
|
<view class="guize-list"> |
|
|
|
|
|
<view class="guize1" v-for="(item, index) in waimaRuleList" :key="index" style="flex-direction: column; padding-bottom: 10px; border-bottom: 1px solid #ddd;"> |
|
|
|
|
|
<view style="display: flex; width: 100%;"> |
|
|
|
|
|
<view class="guize1-qusong"> |
|
|
|
|
|
<view class="qusong1"> |
|
|
|
|
|
取 |
|
|
|
|
|
</view> |
|
|
|
|
|
<view class="qusong2"> |
|
|
|
|
|
{{item.getAreaName}} |
|
|
|
|
|
</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
<view class="guize1-qusong"> |
|
|
|
|
|
<view class="qusong1"> |
|
|
|
|
|
送 |
|
|
|
|
|
</view> |
|
|
|
|
|
<view class="qusong2" style="background: rgba(209, 206, 255, 1);"> |
|
|
|
|
|
{{item.putAreaName}} |
|
|
|
|
|
</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
<view class="qusong3" style="display:flex; align-items:center;"> |
|
|
|
|
|
<input type="digit" v-model="item.orderBkge" placeholder="填写配送费" style="flex:1;"> |
|
|
|
|
|
<uni-icons type="closeempty" size="20" @click="selectRule(item)" color="#ff0000" style="margin-left:5px;"></uni-icons> |
|
|
|
|
|
</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
<view style="display: flex; width: 100%; margin-top: 10px; align-items: center;"> |
|
|
|
|
|
<text style="margin: 0 10px 0 5px; color: #777; font-size: 13px; font-weight: bold;">备注:</text> |
|
|
|
|
|
<input type="text" v-model="item.remark" placeholder="填写备注,如:限时/大件加钱" style="flex:1; background: #fff; border-radius: 5px; padding: 0 10px; height: 30px; line-height: 30px;"> |
|
|
|
|
|
</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
</uni-popup> |
|
|
|
|
|
|
|
|
<view style="width: 100%;height: 80px;"></view> |
|
|
<view style="width: 100%;height: 80px;"></view> |
|
|
<uni-load-more :status="loadStatus" /> |
|
|
<uni-load-more :status="loadStatus" /> |
|
|
</view> |
|
|
</view> |
|
|
@ -145,6 +192,20 @@ |
|
|
return { |
|
|
return { |
|
|
tab1Checked: 'daiqu', |
|
|
tab1Checked: 'daiqu', |
|
|
menuButtonInfo: {}, |
|
|
menuButtonInfo: {}, |
|
|
|
|
|
isArea:false, |
|
|
|
|
|
waimaRuleList: [], |
|
|
|
|
|
selectRuleList:[], |
|
|
|
|
|
paotuiRuleList:[], |
|
|
|
|
|
lineStatus:[ |
|
|
|
|
|
{ |
|
|
|
|
|
title:'上线', |
|
|
|
|
|
value:0 |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
title:'下线', |
|
|
|
|
|
value:1 |
|
|
|
|
|
} |
|
|
|
|
|
] |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
props:{ |
|
|
props:{ |
|
|
@ -165,9 +226,79 @@ |
|
|
console.log("配送初始化") |
|
|
console.log("配送初始化") |
|
|
this.menuButtonInfo = uni.getMenuButtonBoundingClientRect() |
|
|
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) { |
|
|
checkTab1(type) { |
|
|
this.tab1Checked = 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) { |
|
|
ceshi(e) { |
|
|
console.log("11111111",e) |
|
|
console.log("11111111",e) |
|
|
if (e.detail.code) { |
|
|
if (e.detail.code) { |
|
|
|