tianyi 2 hours ago
parent
commit
cabe47006e
  1. 2
      pages/goods/addGoods.vue
  2. 4
      pages/goods/gategory.vue
  3. 4
      pages/goods/gategoryLow.vue
  4. 71
      pages/index/index.vue
  5. 11
      pages/login/login.vue
  6. 4
      pages/myCenter/shopDetail.vue
  7. 4
      pages/shop/addType.vue
  8. 4
      pages/shop/afterService.vue
  9. 8
      pages/shop/attributeList.vue
  10. 6
      pages/shop/goodsList.vue
  11. 8
      pages/shop/orderDetail.vue
  12. 6
      pages/shop/shopOrderList.vue
  13. 4
      pages/shop/shopSettlementDetail.vue
  14. 2
      pages/shop/transferDeliveryOrderList.vue
  15. 6
      pages/worker/index.vue
  16. 20
      pages/worker/partTimeJobCenter.vue
  17. 276
      pages/worker/partTimeJobRegister.vue
  18. 4
      pages/worker/ranking.vue
  19. 2
      pages/worker/wallet.vue
  20. 6
      pages/worker/workerOrderList.vue

2
pages/goods/addGoods.vue

@ -360,7 +360,7 @@
//
goGategoryLow() {
uni.navigateTo({
url: '/package1/myCenter/addType'
url: '/pages/shop/addType'
})
},
//

4
pages/goods/gategory.vue

@ -329,8 +329,10 @@
uni.showModal({
title: "提示",
content: "此分类已经维护了子分类,确定继续删除吗?",
confirmText: '取消',
cancelText: '确认',
success: function(res2) {
if (res2.confirm) {
if (res2.cancel) {
that.delItemModal()
}
}

4
pages/goods/gategoryLow.vue

@ -381,8 +381,10 @@
uni.showModal({
title: '提示',
content: '是否确认删除此分类?',
confirmText: '取消',
cancelText: '确认',
success: function (res) {
if (res.confirm) {
if (res.cancel) {
that.delItemModal()
}
}

71
pages/index/index.vue

@ -198,28 +198,44 @@
顾客评价
</view>
</view>
<view class="menu22" @tap="goDetail('hx')">
<view class="menu22" @tap="goDetail('dy')">
<view class="menu33" style="width: 100%;height: 56rpx;">
<uni-icons type="scan" size="25"></uni-icons>
<image src="../../static/image/dingdan/dd4.png" alt="" />
</view>
<view class="menu44">
扫码核销
打印设置
</view>
</view>
<view class="menu22" @tap="goDetail('dy')">
<view class="menu22" @tap="goDetail('shjl')">
<view class="menu33" style="width: 100%;height: 56rpx;">
<image src="../../static/image/dingdan/dd1.png" alt="" />
<image src="../../static/image/dingdan/dd0.png" alt="" />
</view>
<view class="menu44">
打印设置
退款售后记录
</view>
</view>
<view class="menu22" @tap="goDetail('shjl')">
<view class="menu22" @tap="goDetail('yyxx')">
<view class="menu33" style="width: 100%;height: 56rpx;">
<image src="../../static/image/dingdan/dd0.png" alt="" />
</view>
<view class="menu44">
退款售后记录
营业信息
</view>
</view>
<view class="menu22" @tap="goDetail('sjxx')">
<view class="menu33" style="width: 100%;height: 56rpx;">
<image src="../../static/image/dingdan/dd1.png" alt="" />
</view>
<view class="menu44">
商家信息
</view>
</view>
<view class="menu22" @tap="goDetail('hx')">
<view class="menu33" style="width: 100%;height: 56rpx;">
<uni-icons type="scan" size="25"></uni-icons>
</view>
<view class="menu44">
扫码核销
</view>
</view>
</view>
@ -282,7 +298,8 @@
}
},
onLoad() {
if(!uni.getStorageSync('area')){
console.log('hahaha',uni.getStorageSync('shopId'))
if(!uni.getStorageSync('area') || !uni.getStorageSync('shopId')){
uni.reLaunch({
url: '../login/login'
})
@ -361,7 +378,7 @@
onClickArea(item) {
uni.setStorageSync('shopId', item.shop.id)
uni.setStorageSync('shopMerchantType', item.shop.merchantType)
uni.setStorageSync('area', JSON.stringify(item))
uni.setStorageSync('area', JSON.stringify(item.shop))
this.getBusinessStatus()
this.getData()
this.$refs.areaPopup.close()
@ -372,8 +389,10 @@
uni.showModal({
title: '提示',
content: '要更改营业状态吗?',
cancelText:'确定',
confirmText:'取消',
success: function(res1) {
if (res1.confirm) {
if (res1.cancel) {
that.NB.sendRequest("/app/shoptakeaway/update", {
shopId: uni.getStorageSync('shopId'),
status: that.businessStatus == "1" ? '0' : that.businessStatus == "0" ?
@ -433,6 +452,12 @@
case 'shjl':
url = '/pages/shop/afterService?type=shop&mode=record'
break;
case 'sjxx':
url = '/pages/myCenter/shopDetail'
break;
case 'yyxx':
url = '/pages/myCenter/businessInfo'
break;
case 'pj':
let item = {
shopScore: uni.getStorageSync('shopScore'),
@ -467,21 +492,25 @@
that.NB.sendRequest("/mall/order/countByShop/" + uni.getStorageSync('shopId'), {}, false, 'GET',
'application/x-www-form-urlencoded').then((res) => {
if (res.code == 200) {
this.shopData = res.result
this.clearData()
for (let i = 0; i < this.shopData.orderStatusCount.length; i++) {
if (this.shopData.orderStatusCount[i].counttype) {
if (this.shopData.orderStatusCount[i].counttype == 'daisong') {
this.shopData = res.result || {}
this.shopData.orderStatusCount = this.shopData.orderStatusCount || []
this.shopData.orderRevenueAndCount = this.shopData.orderRevenueAndCount || {}
for(let i=0;i<this.shopData.orderStatusCount.length;i++){
if(this.shopData.orderStatusCount[i].counttype){
if(this.shopData.orderStatusCount[i].counttype == 'daipeisongjiedan'){
this.daipeisongjiedan = this.shopData.orderStatusCount[i].count
}else if(this.shopData.orderStatusCount[i].counttype == 'daisong'){
this.daisongda = this.shopData.orderStatusCount[i].count
} else if (this.shopData.orderStatusCount[i].counttype == 'daiqu') {
}else if(this.shopData.orderStatusCount[i].counttype == 'daiqu'){
this.daiquhuo = this.shopData.orderStatusCount[i].count
} else if (this.shopData.orderStatusCount[i].counttype == 'daixiaofei') {
}else if(this.shopData.orderStatusCount[i].counttype == 'daixiaofei'){
this.daixiaofei = this.shopData.orderStatusCount[i].count
} else if (this.shopData.orderStatusCount[i].counttype == 'daichucan') {
}else if(this.shopData.orderStatusCount[i].counttype == 'daichucan'){
this.daichucan = this.shopData.orderStatusCount[i].count
}
}
}
this.$forceUpdate()
} else {
uni.showToast({
title: res.message,
@ -503,8 +532,10 @@
uni.showModal({
title: '提示',
content: '确定要核销该订单吗?',
confirmText: '取消',
cancelText: '确认',
success: function(res1) {
if (res1.confirm) {
if (res1.cancel) {
that.NB.sendRequest("/mall/order/complete", {
orderId: productId
}, false, 'post',

11
pages/login/login.vue

@ -370,6 +370,14 @@
});
return;
}
if(this.code == uni.getStorageSync('yanzhengma')){
uni.showToast({
title: '验证码输入有误',
icon: 'none'
});
return;
}
uni.setStorageSync('yanzhengma',this.code)
let url;
let data;
@ -397,6 +405,7 @@
});
this.getCaptchaImg()
} else {
uni.removeStorageSync('code');
if (res.result.accessToken) uni.setStorageSync('hiver_token', res.result.accessToken)
if (res.result.worker !== undefined) uni.setStorageSync('worker', res.result.worker)
uni.setStorageSync("wayValue", this.wayValue)
@ -420,7 +429,7 @@
// uni.setStorageSync('area',JSON.stringify(item))
this.shopList = res.result.shop;
let data = {
id: res.result.worker.region
regionId: res.result.worker.region
}
uni.setStorageSync('area', JSON.stringify(data))
uni.setStorageSync('peisongyuan', this.peisongyuan)

4
pages/myCenter/shopDetail.vue

@ -17,7 +17,7 @@
<view class="value">
<view class="name">联系方式</view>
<view class="text">
<input type="text" v-model="shop.contactPhone" maxlength="16" placeholder="请输入联系方式" />
<input type="number" v-model="shop.contactPhone" maxlength="11" placeholder="请输入联系方式" />
</view>
</view>
<view class="value">
@ -115,7 +115,7 @@
let regionId = ''
try {
const area = uni.getStorageSync('area')
regionId = area ? JSON.parse(area).id : ''
regionId = area ? JSON.parse(area).regionId : ''
} catch (e) {}
this.NB.sendRequest('/app/shop/getShopInfoById', {
id: shopId,

4
pages/shop/addType.vue

@ -117,8 +117,10 @@
uni.showModal({
title: '提示',
content: '确定删除该分类吗?',
confirmText: '取消',
cancelText: '确认',
success: function (res) {
if (res.confirm) {
if (res.cancel) {
this.delItemModal()
}
}

4
pages/shop/afterService.vue

@ -556,8 +556,10 @@
uni.showModal({
title: '提示',
content: titleText,
confirmText: '取消',
cancelText: '确认',
success: (res) => {
if (res.confirm) {
if (res.cancel) {
this.submitLoading = true;
this.submitRefundId = item.id;
uni.showLoading({

8
pages/shop/attributeList.vue

@ -443,8 +443,10 @@
uni.showModal({
title: "提示",
content: "此属性已经维护了子属性,确定继续删除吗?",
confirmText: '取消',
cancelText: '确认',
success: function(res2) {
if (res2.confirm) {
if (res2.cancel) {
that.delItemModal()
}
}
@ -453,8 +455,10 @@
uni.showModal({
title: "提示",
content: "是否确认删除此属性?",
confirmText: '取消',
cancelText: '确认',
success: function(res3) {
if (res3.confirm) {
if (res3.cancel) {
that.delItemModal()
}
}

6
pages/shop/goodsList.vue

@ -138,7 +138,7 @@
</view>
</view>
</view>
<view style="width:50rpx;height: 140rpx;"></view>
<u-loadmore v-if="showLoadmore" :status="status" />
</scroll-view>
</view>
@ -273,8 +273,10 @@
uni.showModal({
title: '提示',
content: '确定要删除该商品吗?',
confirmText: '取消',
cancelText: '确认',
success: function (res) {
if (res.confirm) {
if (res.cancel) {
that.NB.sendRequest("/app/product/delById", {
id: v.id
}, false, 'POST', 'application/x-www-form-urlencoded').then((res) => {

8
pages/shop/orderDetail.vue

@ -365,12 +365,12 @@
{{data.incomeSummary ? formatMoney(data.incomeSummary.expectedIncome) : (data.yujishouru?data.yujishouru:0)}}
</view>
</view>
<view style="margin-top: 20rpx;">
<view v-if="Ptype != 'work'" style="margin-top: 20rpx;">
<view @tap="printData(data)" class="btn" style="background: rgba(0, 35, 28, 1);color: rgba(166, 255, 234, 1);">
打印小票
</view>
</view>
<view style="margin-top: 20rpx;">
<view v-if="Ptype != 'work'" style="margin-top: 20rpx;">
<view @tap="mealServing(data)" v-if="(data.status == 3 && data.deliveryType == 1 && data.shopMakeTime == null) || (data.status == 3 && data.deliveryType == 2 && data.userRequireMake == 1)" class="btn" style="background: rgba(0, 35, 28, 1);color: rgba(166, 255, 234, 1);">
已出餐
</view>
@ -818,8 +818,10 @@
uni.showModal({
title: '提示',
content: '确定要出餐吗?',
confirmText: '取消',
cancelText: '确认',
success: function (res) {
if (res.confirm) {
if (res.cancel) {
let data = {}
let url = ''
if(item.deliveryType == 2){ //

6
pages/shop/shopOrderList.vue

@ -207,8 +207,10 @@
uni.showModal({
title: '提示',
content: '确定要出餐吗?',
confirmText: '取消',
cancelText: '确认',
success: function (res) {
if (res.confirm) {
if (res.cancel) {
let data = {}
let url = ''
if(item.deliveryType == 2){ //
@ -236,7 +238,7 @@
},
goDetail(id){
uni.navigateTo({
url:'/package2/shop/orderDetail?id=' + id
url:'/pages/shop/orderDetail?id=' + id
})
},
handleStatusClick(index,value) {

4
pages/shop/shopSettlementDetail.vue

@ -124,9 +124,9 @@
getRegionId() {
const area = uni.getStorageSync('area')
if (!area) return ''
if (typeof area === 'object') return area.id || ''
if (typeof area === 'object') return area.regionId || ''
try {
return JSON.parse(area).id || ''
return JSON.parse(area).regionId || ''
} catch (e) {
return ''
}

2
pages/shop/transferDeliveryOrderList.vue

@ -69,7 +69,7 @@
this.totalPages = 1
this.list = []
this.loadStatus = 'more'
this.searchForm.shopId = JSON.parse(uni.getStorageSync('area')).id
this.searchForm.shopId = JSON.parse(uni.getStorageSync('area')).regionId
const area = uni.getStorageSync('area')
this.searchForm.regionId = area ? JSON.parse(area).regionId : ''
this.getList()

6
pages/worker/index.vue

@ -568,7 +568,7 @@
const redirectUrl = '/pages/index/index' + (!isNaN(index) && index > 0 ? '?tabIndex=' + index : '')
uni.setStorageSync(redirectKey, redirectUrl)
uni.navigateTo({
url: '/package2/login/login?redirect=' + redirectKey
url: '/pages/login/login?redirect=' + redirectKey
})
return false
},
@ -591,7 +591,7 @@
this.checkArea()
} else {
if (uni.getStorageSync('area')) {
this.searchForm.regionId = JSON.parse(uni.getStorageSync('area')).id;
this.searchForm.regionId = JSON.parse(uni.getStorageSync('area')).regionId;
}
let area = JSON.parse(uni.getStorageSync('area'))
this.areaName = area.title
@ -839,7 +839,7 @@
workerId: uni.getStorageSync('worker') ? uni.getStorageSync('worker').workerId : '',
workerPhone: uni.getStorageSync('worker') ? uni.getStorageSync('worker').mobile : '',
workerName: uni.getStorageSync('worker') ? uni.getStorageSync('worker').workerName : '',
regionId: JSON.parse(uni.getStorageSync('area')).id,
regionId: JSON.parse(uni.getStorageSync('area')).regionId,
geolocation: that.latitude + ',' + that.longitude
}
this.NB.sendRequest("/mall/delivery/accept", data, false, 'post', 'application/x-www-form-urlencoded').then((

20
pages/worker/partTimeJobCenter.vue

@ -198,7 +198,7 @@
this.orderData = {}
this.NB.sendRequest("/mall/delivery/countOrderByStatusIndex", {
workerId:worker.workerId,
regionId:JSON.parse(uni.getStorageSync('area')).id
regionId:JSON.parse(uni.getStorageSync('area')).regionId
}, false, 'POST', 'application/x-www-form-urlencoded').then(res => {
if (res.code == 200) {
if(res.result != null){
@ -233,10 +233,20 @@
})
},
logOut() {
uni.clearStorage()
getApp().globalData.userinfo = ''
uni.reLaunch({
url: '../login/login'
uni.showModal({
title: '提示',
content: '确定要退出登录吗?',
confirmText: '取消',
cancelText: '确认',
success: (res) => {
if (res.cancel) {
uni.clearStorage()
getApp().globalData.userinfo = ''
uni.reLaunch({
url: '../login/login'
})
}
}
})
},
goDetail(type, index) {

276
pages/worker/partTimeJobRegister.vue

@ -1,7 +1,6 @@
<template>
<!-- 兼职注册 -->
<page-meta
:page-style="routePopupVisible || dispatchPopupVisible ? 'overflow: hidden;' : 'overflow: visible;'"></page-meta>
<page-meta :page-style="routePopupVisible || dispatchPopupVisible ? 'overflow: hidden;' : 'overflow: visible;'"></page-meta>
<view class="page1">
<view class="title">
<view class="title-sreach">
@ -19,6 +18,7 @@
<input type="text" v-model="formData.name" maxlength="10" placeholder="请填写姓名"
@input="onWorkerNameInput"
style="background: rgba(247, 248, 248, 0.6);height: 80rpx;line-height: 80rpx;padding: 18rpx 20rpx;border-radius: 20rpx;">
<view class="audit-tip" v-if="workerNameAuditTip">{{workerNameAuditTip}}</view>
</view>
</view>
@ -40,7 +40,8 @@
<text style="color:red;">*</text> 超出3楼以上额外收费
</view>
<view class="reg-value">
<input type="digit" v-model="formData.highFloorFee" placeholder="可设置金额" :adjust-position="false"
<input type="digit" v-model="formData.highFloorFee" placeholder="可设置金额"
:adjust-position="false"
@input="onHighFloorFeeInput"
style="background: rgba(247, 248, 248, 0.6);height: 80rpx;line-height: 80rpx;padding: 18rpx 20rpx;border-radius: 20rpx;">
</view>
@ -122,7 +123,8 @@
<view class="route-price">
<text></text>
<input type="digit" :value="item.orderBkge" placeholder="最低价"
:adjust-position="false" @input="onOrderBkgeInput($event, item)">
:adjust-position="false"
@input="onOrderBkgeInput($event, item)">
</view>
<view class="route-delete" @tap="removeRule('waima', index)">×</view>
</view>
@ -166,7 +168,8 @@
<view class="route-price">
<text></text>
<input type="digit" :value="item.orderBkge" placeholder="最低价"
:adjust-position="false" @input="onOrderBkgeInput($event, item)">
:adjust-position="false"
@input="onOrderBkgeInput($event, item)">
</view>
<view class="route-delete" @tap="removeRule('paotui', index)">×</view>
</view>
@ -188,16 +191,18 @@
</view>
<view class="official-card">
<image @longpress="handleLongPress"
<image show-menu-by-longpress
src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/d23a9043a8c24731831ec4db909fe3b4.jpg" alt=""
class="official-qr" />
<view class="official-info">
<view class="official-title">长按 保存二维码 微信扫码关注</view>
<view class="official-title">长按 关注公众号</view>
<view class="official-desc">关注后可提现佣金有新订单会及时通知下线后不再接收通知</view>
</view>
</view>
<view class="btn" @click="submit">
{{worker ? '保存规则' : '提交注册'}}
<view class="bottom-action">
<view class="btn" @click="submit">
{{worker ? '保存规则' : '提交注册'}}
</view>
</view>
</view>
<!-- 查看大图弹出层 -->
@ -260,13 +265,15 @@
<view class="route-default-input">
<text></text>
<input type="digit" v-model="defaultRoutePrice" placeholder="如 1"
:adjust-position="false" @input="onDefaultRoutePriceInput">
:adjust-position="false"
@input="onDefaultRoutePriceInput">
</view>
</view>
<view class="route-default-row route-default-row--remark">
<view class="route-default-label">统一备注</view>
<input class="route-default-remark" type="text" v-model="defaultRouteRemark" maxlength="20"
@input="onDefaultRouteRemarkInput" placeholder="选填,如:大件不接/限时加钱">
@input="onDefaultRouteRemarkInput"
placeholder="选填,如:大件不接/限时加钱">
</view>
</view>
<view class="area-section-title">
@ -292,9 +299,8 @@
</view>
</view>
<view class="area-options">
<view class="box-check-btn" @tap="qucanOrsongcan('songcan',index)"
v-for="(item,index) in songcan" :key="index"
style="float: left;padding: 0 20rpx;width: auto;margin-bottom:20rpx;"
<view class="box-check-btn" @tap="qucanOrsongcan('songcan',index)" v-for="(item,index) in songcan"
:key="index" style="float: left;padding: 0 20rpx;width: auto;margin-bottom:20rpx;"
:style="{background:item.checked?'rgba(180, 255, 238, 0.27)':'rgba(247, 248, 248, 0.6)',border:item.checked?'1px solid rgba(180, 255, 238, 1)':'1px solid #777'}">
{{item.title}}
</view>
@ -310,8 +316,7 @@
</view>
</uni-popup>
<!-- 指派单规则弹出层 -->
<uni-popup ref="dispatchPopup" type="bottom" background-color="transparent" :mask-click="false"
@change="onDispatchPopupChange">
<uni-popup ref="dispatchPopup" type="bottom" background-color="transparent" :mask-click="false" @change="onDispatchPopupChange">
<view class="dispatch-popup-content">
<view class="dispatch-popup-title">设置指派单规则</view>
<view class="dispatch-popup-desc">
@ -407,7 +412,7 @@
songcan: [],
shopArea: [],
waimaRuleList: [],
worker: {},
worker:{},
paotuiRuleList: [],
currentConfigType: '',
defaultRoutePrice: '1',
@ -416,7 +421,8 @@
dispatchPopupVisible: false,
dispatchSaving: false,
zhipaiCheck: false,
pendingNewDispatchRuleKeys: []
pendingNewDispatchRuleKeys: [],
workerNameAuditTip: ''
}
},
components: {
@ -442,8 +448,7 @@
}
},
totalRuleCount() {
return (this.waimaRuleList ? this.waimaRuleList.length : 0) + (this.paotuiRuleList ? this.paotuiRuleList
.length : 0)
return (this.waimaRuleList ? this.waimaRuleList.length : 0) + (this.paotuiRuleList ? this.paotuiRuleList.length : 0)
}
},
onLoad() {
@ -453,7 +458,7 @@
this.worker = uni.getStorageSync('worker')
},
onShow() {
},
methods: {
formatMoneyInput(value) {
@ -494,76 +499,6 @@
if (isNaN(amount)) return '0'
return amount.toFixed(2).replace(/\.?0+$/, '')
},
// 1.
handleLongPress() {
uni.showActionSheet({
itemList: ['保存图片'],
success: (res) => {
if (res.tapIndex === 0) {
this.saveImageToAlbum();
}
}
});
},
// 2.
saveImageToAlbum() {
uni.showLoading({
title: '保存中...'
});
uni.downloadFile({
url: "https://jewel-shop.oss-cn-beijing.aliyuncs.com/d23a9043a8c24731831ec4db909fe3b4.jpg",
success: (res) => {
if (res.statusCode === 200) {
this.doSave(res.tempFilePath);
} else {
this.saveFail('图片下载失败');
}
},
fail: () => {
this.saveFail('网络异常,下载失败');
}
});
},
// 3.
doSave(filePath) {
uni.saveImageToPhotosAlbum({
filePath: filePath,
success: () => {
uni.hideLoading();
uni.showToast({
title: '保存成功',
icon: 'success'
});
},
fail: (err) => {
this.saveFail('保存失败');
console.error(err);
//
if (err.errMsg && (err.errMsg.includes('auth') || err.errMsg.includes('deny') || err
.errMsg.includes('fail'))) {
uni.showModal({
title: '权限提示',
content: '需要您授权相册权限才能保存图片,请去设置中开启',
confirmText: '去设置',
success: (modalRes) => {
if (modalRes.confirm) {
uni.openSetting(); // App
}
}
});
}
}
});
},
saveFail(msg) {
uni.hideLoading();
uni.showToast({
title: msg,
icon: 'none'
});
},
getMinFee(list) {
const fees = (list || []).map(item => parseFloat(item.orderBkge)).filter(item => !isNaN(item) && item > 0)
if (fees.length == 0) return 0
@ -602,8 +537,29 @@
onWorkerNameInput(e) {
const value = this.limitText(e.detail.value, 10)
this.formData.name = value
this.workerNameAuditTip = ''
return value
},
getResponseMessage(res, fallback) {
if (!res) return fallback
if (res.message) return res.message
if (res.msg) return res.msg
if (res.errMsg) return res.errMsg
if (res.data && res.data.message) return res.data.message
if (res.data && res.data.msg) return res.data.msg
return fallback
},
isWorkerNameAuditMessage(message) {
return !!message && (message.indexOf('审核') !== -1 || message.indexOf('不合适') !== -1)
},
showWorkerNameAuditTip(message) {
const tip = message || '姓名内容未通过审核,请修改后再提交'
this.workerNameAuditTip = tip
uni.showToast({
title: tip,
icon: 'none'
})
},
onDefaultRouteRemarkInput(e) {
const value = this.limitText(e.detail.value, 20)
this.defaultRouteRemark = value
@ -639,9 +595,7 @@
const worker = uni.getStorageSync('worker')
if (!worker || !worker.workerId) return
let that = this
this.NB.sendRequest("/app/workerRelaPrice/getByWorkerId?workerId=" + worker.workerId, {
regionId: regionId
}, false, 'get', 'application/json').then((res) => {
this.NB.sendRequest("/app/workerRelaPrice/getByWorkerId?workerId=" + worker.workerId, {}, false, 'get', 'application/x-www-form-urlencoded').then((res) => {
if (res.code == 200) {
if (res.result != null) {
let data = res.result;
@ -650,13 +604,11 @@
if (data.mobile) that.formData.mobile = data.mobile;
if (data.highFloorFee !== undefined && data.highFloorFee !== null) that.formData
.highFloorFee = data.highFloorFee;
if (data.deliveryLocation !== undefined && data.deliveryLocation !== null) that
.formData
if (data.deliveryLocation !== undefined && data.deliveryLocation !== null) that.formData
.deliveryLocation = data.deliveryLocation;
let list = (data.workerRelaPriceList || []).map(item => {
const isNewRule = enablePushOrderAfterLoad && that
.pendingNewDispatchRuleKeys.indexOf(that.getRuleKey(item)) !== -1
const isNewRule = enablePushOrderAfterLoad && that.pendingNewDispatchRuleKeys.indexOf(that.getRuleKey(item)) !== -1
return Object.assign({}, item, {
remark: that.limitText(item.remark, 20),
isChecked: item.getPushOrder == 1 || isNewRule
@ -664,7 +616,7 @@
});
let waimaList = list.filter(item => item.orderType == 0);
let paotuiList = list.filter(item => item.orderType == 1);
if (waimaList.length > 0) {
that.formData.waima = true;
}
@ -674,9 +626,9 @@
that.waimaRuleList = waimaList;
that.paotuiRuleList = paotuiList;
const workerInfo = uni.getStorageSync('worker') || {};
const pushOrder = data.getPushOrder !== undefined && data.getPushOrder !== null ?
data.getPushOrder :
workerInfo.getPushOrder;
const pushOrder = data.getPushOrder !== undefined && data.getPushOrder !== null
? data.getPushOrder
: workerInfo.getPushOrder;
that.zhipaiCheck = enablePushOrderAfterLoad ? true : pushOrder == 1;
that.$forceUpdate();
if (openDispatchAfterLoad) {
@ -686,19 +638,18 @@
}
that.pendingNewDispatchRuleKeys = []
}
} else {
uni.showToast({
title: res.message,
icon: 'none'
});
return
}
}).catch((res) => {
uni.showToast({
title: res.message,
icon: 'none'
})
});
})
},
getShopArea() {
let that = this
this.NB.sendRequest("/app/shopArea/getByParentId/" + JSON.parse(uni.getStorageSync('area')).id, {
regionId: regionId
}, false, 'get', 'application/json').then((res) => {
this.NB.sendRequest("/app/shopArea/getByParentId/" + JSON.parse(uni.getStorageSync('area')).regionId, {}, false, 'get', 'application/x-www-form-urlencoded').then((res) => {
if (res.code == 200) {
if (res.result != null) {
for (let m = 0; m < res.result.length; m++) {
@ -709,10 +660,11 @@
uni.showToast({
title: res.message,
icon: 'none'
})
});
return
}
}).catch((res) => {});
})
},
back() {
uni.navigateBack()
@ -808,8 +760,8 @@
});
this.$refs.guizePopup.close()
},
changePopup(e) {
if (e.show == false) {
changePopup(e){
if(e.show == false){
this.openDispatchPopup()
}
},
@ -880,11 +832,11 @@
})
}
this.dispatchSaving = true
this.NB.sendRequest('/app/workerRelaPrice/batchUpdate', {
this.NB.sendRequest("/app/workerRelaPrice/batchUpdate", {
userId: uni.getStorageSync('id'),
workerRelaPriceList: selectRuleList,
getPushOrder: this.zhipaiCheck ? 1 : 0
}, false, 'get', 'application/json').then((res) => {
}, false, 'post', 'application/x-www-form-urlencoded').then((res) => {
this.dispatchSaving = false
if (res.code == 200) {
let worker = uni.getStorageSync('worker') || {}
@ -906,9 +858,10 @@
icon: 'none'
})
}
}).catch((res) => {
}).catch(() => {
this.dispatchSaving = false
});
})
},
checkAddress(type) {
let that = this
@ -945,6 +898,7 @@
},
submit() {
this.formData.name = this.limitText(this.formData.name, 10)
this.workerNameAuditTip = ''
if (!this.formData.name) return uni.showToast({
title: '请填写姓名',
icon: 'none'
@ -1011,9 +965,8 @@
title: '提交中...',
mask: true
});
this.NB.sendRequest('/app/workerRelaPrice/batchAdd', submitData, false, 'get', 'application/json').then((
res) => {
this.dispatchSaving = false
this.NB.sendRequest("/app/workerRelaPrice/batchAdd", submitData, false, 'post', 'application/x-www-form-urlencoded').then((res) => {
uni.hideLoading();
if (res.code == 200) {
let user = res.result;
uni.setStorageSync('officialAccountOpenid', user.officialAccountOpenid)
@ -1026,14 +979,29 @@
if (hasNewRule) worker1.getPushOrder = 1
uni.setStorageSync('worker', worker1)
this.getWorkerMessage(true, hasNewRule)
} else {
const message = this.getResponseMessage(res, '提交失败')
if (this.isWorkerNameAuditMessage(message)) {
this.showWorkerNameAuditTip(message)
} else {
uni.showToast({
title: message,
icon: 'none'
});
}
}
}).catch(err => {
uni.hideLoading();
const message = this.getResponseMessage(err, '提交失败,请稍后再试')
if (this.isWorkerNameAuditMessage(message)) {
this.showWorkerNameAuditTip(message)
} else {
uni.showToast({
title: res.message,
title: message,
icon: 'none'
})
});
}
}).catch((res) => {
uni.hideLoading();
});
},
pictureAdd() {
@ -1059,7 +1027,7 @@
let that = this;
let hiver_token = uni.getStorageSync("hiver_token")
await uni.uploadFile({
url: getApp().globalData.mainurl + '/upload/file',
url: that.tui.interfaceUrl() + '/upload/file',
filePath: path,
name: 'file',
header: {
@ -1120,9 +1088,7 @@
}
.back-btn {
position: absolute;
bottom: 0;
left: 0;
padding-top:80rpx;
}
.content {
@ -1132,6 +1098,10 @@
border-radius: 40rpx;
background: #fff;
padding: 16rpx 20rpx;
padding-bottom: 220rpx;
padding-bottom: calc(220rpx + constant(safe-area-inset-bottom));
padding-bottom: calc(220rpx + env(safe-area-inset-bottom));
box-sizing: border-box;
}
.reg-name {
@ -1146,6 +1116,13 @@
margin-top: 10rpx;
}
.audit-tip {
margin-top: 12rpx;
color: #ff3b30;
font-size: 24rpx;
line-height: 34rpx;
}
.img-popup-content {
width: 500rpx;
height: 500rpx;
@ -1157,23 +1134,20 @@
padding: 10px;
height: 150px;
}
.liangge-title {
height: 50px;
line-height: 35px;
text-align: center;
font-size: 16px;
font-weight: 700;
.liangge-title{
height: 50px;
line-height: 35px;
text-align: center;
font-size: 16px;
font-weight: 700;
}
.liangge-text {
.liangge-text{
height: 30px;
font-size: 14px;
font-weight: 700;
}
.box-check-btn {
width: 160rpx;
height: 70rpx;
@ -1514,8 +1488,22 @@
font-weight: 700;
}
.bottom-action {
position: fixed;
left: 0;
right: 0;
bottom: 0;
padding: 22rpx 20rpx 32rpx;
padding-bottom: calc(32rpx + constant(safe-area-inset-bottom));
padding-bottom: calc(32rpx + env(safe-area-inset-bottom));
background: #fff;
box-shadow: 0 -10rpx 28rpx rgba(0, 35, 28, 0.08);
box-sizing: border-box;
z-index: 20;
}
.btn {
width: 95%;
width: 100%;
height: 100rpx;
font-size: 32rpx;
font-weight: 700;
@ -1523,7 +1511,7 @@
border-radius: 100rpx;
line-height: 100rpx;
text-align: center;
margin: 40rpx auto;
box-shadow: 0 16rpx 36rpx rgba(0, 35, 28, 0.18);
}
.guize-popup-content {

4
pages/worker/ranking.vue

@ -137,7 +137,7 @@
},
getFireList(){
this.NB.sendRequest("/mall/delivery/countOrdersLimit", {
regionId: JSON.parse(uni.getStorageSync('area')).id
regionId: JSON.parse(uni.getStorageSync('area')).regionId
}, false, 'GET', 'application/x-www-form-urlencoded').then(res => {
if (res.code == 200) {
if(res.result.data != null){
@ -225,7 +225,7 @@
}
.back-btn {
padding-top: 100rpx;
padding-top: 80rpx;
width: 72rpx;
height: 72rpx;
display: flex;

2
pages/worker/wallet.vue

@ -512,7 +512,7 @@
if (res.code == 200) {
this.skipWalletRefreshOnShow = true
uni.navigateTo({
url: '/package2/shop/orderDetail?id=' + res.result,
url: '/pages/shop/orderDetail?id=' + res.result,
fail: () => {
this.skipWalletRefreshOnShow = false
}

6
pages/worker/workerOrderList.vue

@ -158,7 +158,7 @@
pageNum: 1,
pageSize: 10,
order: '',
regionId: JSON.parse(uni.getStorageSync('area')).id,
regionId: JSON.parse(uni.getStorageSync('area')).regionId,
deliveryType: null,
workerId: uni.getStorageSync('worker').workerId,
startDate: '',
@ -210,7 +210,7 @@
}
},
onShow() {
this.searchForm.regionId = JSON.parse(uni.getStorageSync('area')).id
this.searchForm.regionId = JSON.parse(uni.getStorageSync('area')).regionId
},
onLoad(option) {
if (option.index) {
@ -297,7 +297,7 @@
},
goDetail(item) {
uni.navigateTo({
url: '/package2/shop/orderDetail?type=work&id=' + item.orderId
url: '/pages/shop/orderDetail?type=work&id=' + item.orderId
})
},
back() {

Loading…
Cancel
Save