|
|
@@ -1,11 +1,11 @@
|
|
|
<template>
|
|
|
<view class="page">
|
|
|
- <uni-nav-bar :fixed="true" background-color="#FFE05C" :border="false" :statusBar="true" title="首页" />
|
|
|
+ <uni-nav-bar :fixed="true" background-color="#FFE05C" :border="false" :statusBar="true" title="首页" />
|
|
|
<view class="flex-row tuni ">
|
|
|
<image class="profile" :src="userInfo.avatarUrl || '/static/ud4.png'"></image>
|
|
|
<view class="tuniMsg">
|
|
|
<view class="name ">
|
|
|
- <text >{{userInfo.name}}</text>
|
|
|
+ <text>{{userInfo.name}}</text>
|
|
|
</view>
|
|
|
<view>
|
|
|
<text class="biaoqian ">{{userInfo.post}}</text>
|
|
|
@@ -24,9 +24,9 @@
|
|
|
<view class="flex-row justify-center dakaIcon ">
|
|
|
<u-icon name="/static/index/erweima.png" size="35"></u-icon>
|
|
|
</view>
|
|
|
-<!-- <view class="flex-row justify-center dakaText " >-->
|
|
|
-<!-- <text>拓客码</text>-->
|
|
|
-<!-- </view>-->
|
|
|
+ <!-- <view class="flex-row justify-center dakaText " >-->
|
|
|
+ <!-- <text>拓客码</text>-->
|
|
|
+ <!-- </view>-->
|
|
|
</view>
|
|
|
<view class="flex-col " @click="userScanCode">
|
|
|
<view class="flex-row justify-center dakaIcon ">
|
|
|
@@ -41,9 +41,9 @@
|
|
|
</view>
|
|
|
|
|
|
<view class="flex-row justify-around buttons">
|
|
|
-<!-- <view class="buttonItem" @click="call" v-if="currService && currService.callState == '2'">-->
|
|
|
-<!-- <text>叫号</text>-->
|
|
|
-<!-- </view>-->
|
|
|
+ <!-- <view class="buttonItem" @click="call" v-if="currService && currService.callState == '2'">-->
|
|
|
+ <!-- <text>叫号</text>-->
|
|
|
+ <!-- </view>-->
|
|
|
<view class="buttonItem" :class="{buttonState:buttonState[0]}" @click="next">
|
|
|
<text>下一位</text>
|
|
|
</view>
|
|
|
@@ -61,7 +61,8 @@
|
|
|
<view class="flex-row justify-center ">
|
|
|
<view class="serviceMsg " v-if="currService">
|
|
|
<view class="flex-row serviceInfo ">
|
|
|
- <image class="serviceProfile" :src="currService.avatar || '/static/ud4.png'" @click="avatarOpen"></image>
|
|
|
+ <image class="serviceProfile" :src="currService.avatar || '/static/ud4.png'" @click="avatarOpen">
|
|
|
+ </image>
|
|
|
<view class="flex-col justify-end serviceInfo-rigth ">
|
|
|
<view class="flex-row justify-between ">
|
|
|
<view class="">
|
|
|
@@ -84,7 +85,7 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view :style="{'height':'120rpx'}"></view>
|
|
|
+ <view :style="{'height':'120rpx'}"></view>
|
|
|
<view class="flex-row justify-center" v-if="!currService.balanceFlag">
|
|
|
<view class="flex-row justify-center hintView">
|
|
|
<view class="hint">
|
|
|
@@ -97,8 +98,7 @@
|
|
|
</view>
|
|
|
|
|
|
<view class="flex-row justify-center" v-if="currService.balanceFlag && currService.balance *1 <= 200">
|
|
|
- <view class="flex-row justify-center hintView"
|
|
|
- :class="{hintViewBgColor2: currService.balance *1 <= 100,
|
|
|
+ <view class="flex-row justify-center hintView" :class="{hintViewBgColor2: currService.balance *1 <= 100,
|
|
|
hintViewBgColor3: currService.balance *1 > 100 && currService.balance *1 <= 200}">
|
|
|
<view class="hint">
|
|
|
<text>!</text>
|
|
|
@@ -140,7 +140,8 @@
|
|
|
</view>
|
|
|
<view class="flex-row justify-center">
|
|
|
<view class="imgs">
|
|
|
- <view class="mmImgView" :class="{floatRight: (index+1) % 2==0,marginTop:index>1}" v-for="(i,index) in 0" :key="index">
|
|
|
+ <view class="mmImgView" :class="{floatRight: (index+1) % 2==0,marginTop:index>1}"
|
|
|
+ v-for="(i,index) in 0" :key="index">
|
|
|
<image class="mmImg" mode="widthFix" src="/static/mn1.webp"></image>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -165,8 +166,8 @@
|
|
|
</view>
|
|
|
|
|
|
<uni-popup ref="avatarPopup" type="center">
|
|
|
- <view class="avatarView "v-if="currService">
|
|
|
- <view class="flex-row justify-center" >
|
|
|
+ <view class="avatarView " v-if="currService">
|
|
|
+ <view class="flex-row justify-center">
|
|
|
<image class="avatarOpen" mode="widthFix" :src="currService.avatar || '/static/ud4.png'"></image>
|
|
|
</view>
|
|
|
<view class="flex-row justify-center" :style="{'marginTop':'20rpx'}">
|
|
|
@@ -182,7 +183,7 @@
|
|
|
</view>
|
|
|
<view class="textareaView flex-row justify-center ">
|
|
|
<textarea class="textarea" v-model="content" placeholder-style="color:#999999;fontSize:28rpx"
|
|
|
- placeholder="请输入用户喜好" />
|
|
|
+ placeholder="请输入用户喜好" />
|
|
|
</view>
|
|
|
<view class="flex-row justify-around" :style="{'marginTop':'20rpx'}">
|
|
|
<view class="cancelButton " @click="closeReminderPopup">
|
|
|
@@ -204,8 +205,9 @@
|
|
|
<view class="flex-row justify-center">
|
|
|
<view class="serviceItems ">
|
|
|
<view class="serviceItem "
|
|
|
- :class="{vBackGround: serviceProjectListIndex === index,marginLeft16: (index+3) % 3!==0,marginTop24:index>2}"
|
|
|
- v-for="(item,index) in serviceProjectList" :key="index" @click="selectProject(item,index)">
|
|
|
+ :class="{vBackGround: serviceProjectListIndex === index,marginLeft16: (index+3) % 3!==0,marginTop24:index>2}"
|
|
|
+ v-for="(item,index) in serviceProjectList" :key="index"
|
|
|
+ @click="selectProject(item,index)">
|
|
|
<text>{{item.serviceName}}</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -217,12 +219,16 @@
|
|
|
<view class="flex-row justify-center">
|
|
|
<view class="serviceItems ">
|
|
|
<view class="flex-col serviceTeach "
|
|
|
- :class="{marginLeft28: (index+4) % 4!==0,marginTop24:index>3}" v-for="(item,index) in servicePersonList" :key="index" @click="servicePersonListIndex = index">
|
|
|
- <image class="serviceTeachImg" :src="item.facePhotoUrl ||'/static/ud4.png'" :class="{vBackGround: servicePersonListIndex === index}"></image>
|
|
|
+ :class="{marginLeft28: (index+4) % 4!==0,marginTop24:index>3}"
|
|
|
+ v-for="(item,index) in servicePersonList" :key="index"
|
|
|
+ @click="servicePersonListIndex = index">
|
|
|
+ <image class="serviceTeachImg" :src="item.facePhotoUrl ||'/static/ud4.png'"
|
|
|
+ :class="{vBackGround: servicePersonListIndex === index}"></image>
|
|
|
<view class="serviceTeachName">
|
|
|
<text>{{item.personName}}</text>
|
|
|
</view>
|
|
|
- <image v-if="servicePersonListIndex === index" class="vImage" src="/static/index/xuanzhong.png"></image>
|
|
|
+ <image v-if="servicePersonListIndex === index" class="vImage"
|
|
|
+ src="/static/index/xuanzhong.png"></image>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -243,19 +249,22 @@
|
|
|
</view>
|
|
|
</uni-popup>
|
|
|
<uni-popup ref="selectServiceObjectPopup" @change="popupChange" type="bottom">
|
|
|
- <view class="addService" >
|
|
|
+ <view class="addService">
|
|
|
|
|
|
<view class="popupTitle">
|
|
|
<text>切换服务对象</text>
|
|
|
</view>
|
|
|
|
|
|
<scroll-view class="scrollY" scroll-y>
|
|
|
- <view class="flex-row objectItem" :class="{'vBackGround': selectServiceObjectIndex === index}" v-for="(item,index) in selectServiceObjectList" :key="index" @click="selectServiceObjectIndex = index">
|
|
|
+ <view class="flex-row objectItem" :class="{'vBackGround': selectServiceObjectIndex === index}"
|
|
|
+ v-for="(item,index) in selectServiceObjectList" :key="index"
|
|
|
+ @click="selectServiceObjectIndex = index">
|
|
|
<image class="objectImage" :src="item.facePhotoUrl || '/static/ud4.png'"></image>
|
|
|
<view class="flex-col objectName ">
|
|
|
<text>{{item.nickName}}</text>
|
|
|
</view>
|
|
|
- <image v-if="selectServiceObjectIndex === index" class="vImage" src="/static/index/xuanzhong.png"></image>
|
|
|
+ <image v-if="selectServiceObjectIndex === index" class="vImage"
|
|
|
+ src="/static/index/xuanzhong.png"></image>
|
|
|
</view>
|
|
|
</scroll-view>
|
|
|
|
|
|
@@ -269,8 +278,8 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</uni-popup>
|
|
|
- <uni-popup ref="promotionPopup" type="center">
|
|
|
- <view class="promotionView" >
|
|
|
+ <uni-popup ref="promotionPopup" type="center">
|
|
|
+ <view class="promotionView">
|
|
|
<view class="flex-row justify-center qrcodeView">
|
|
|
<uv-qrcode ref="qrcode" size="400rpx" :value="qrcodeUrl" :options="options"></uv-qrcode>
|
|
|
</view>
|
|
|
@@ -291,15 +300,15 @@
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- buttonState:[0,0,0,0],//0:不禁用按钮,1:禁用按钮。
|
|
|
- previousServiceOrderId:'',
|
|
|
- content:'',
|
|
|
- selectServiceObjectList:[],
|
|
|
- selectServiceObjectIndex:-1,
|
|
|
- servicePersonList:[],
|
|
|
- servicePersonListIndex:0,
|
|
|
- serviceProjectList:[],
|
|
|
- serviceProjectListIndex:0,
|
|
|
+ buttonState: [0, 0, 0, 0], //0:不禁用按钮,1:禁用按钮。
|
|
|
+ previousServiceOrderId: '',
|
|
|
+ content: '',
|
|
|
+ selectServiceObjectList: [],
|
|
|
+ selectServiceObjectIndex: -1,
|
|
|
+ servicePersonList: [],
|
|
|
+ servicePersonListIndex: 0,
|
|
|
+ serviceProjectList: [],
|
|
|
+ serviceProjectListIndex: 0,
|
|
|
tabIndex: 0,
|
|
|
sysHeight: '',
|
|
|
readerHeight: '',
|
|
|
@@ -308,12 +317,15 @@
|
|
|
storeId: '',
|
|
|
storeName: '',
|
|
|
currService: null,
|
|
|
- qqMap:new QQMapWX({key: 'ZIABZ-543WB-747UM-JL5Y7-NDS4E-HWB4M',vm: this}),
|
|
|
- qrcodeUrl:'https://jje.admin.xinyuekj.com.cn/recharge/recharge?storeId={promotionStoreId}&techNo={techNo}',
|
|
|
+ qqMap: new QQMapWX({
|
|
|
+ key: 'ZIABZ-543WB-747UM-JL5Y7-NDS4E-HWB4M',
|
|
|
+ vm: this
|
|
|
+ }),
|
|
|
+ qrcodeUrl: 'https://jje.admin.xinyuekj.com.cn/recharge/recharge?storeId={promotionStoreId}&techNo={techNo}',
|
|
|
options: {
|
|
|
// 指定二维码前景,一般可在中间放logo
|
|
|
- foregroundImagePadding:2,
|
|
|
- foregroundImageBorderRadius:5,
|
|
|
+ foregroundImagePadding: 2,
|
|
|
+ foregroundImageBorderRadius: 5,
|
|
|
foregroundImageSrc: '/static/logo.png'
|
|
|
}
|
|
|
|
|
|
@@ -334,11 +346,11 @@
|
|
|
// }
|
|
|
},
|
|
|
methods: {
|
|
|
- avatarOpen(){
|
|
|
+ avatarOpen() {
|
|
|
this.$refs.avatarPopup.open()
|
|
|
},
|
|
|
|
|
|
- promotion(){
|
|
|
+ promotion() {
|
|
|
let data = {
|
|
|
promotionStoreId: this.userInfo.workStoreId || '',
|
|
|
techNo: this.userInfo.techNo || ''
|
|
|
@@ -348,19 +360,19 @@
|
|
|
let regexp = new RegExp("{" + key + "}"); // 构造正则表达式
|
|
|
this.qrcodeUrl = this.qrcodeUrl.replace(regexp, data[key]); // 执行替换操作
|
|
|
}
|
|
|
- console.log('++++qrcodeUrl+++++',this.qrcodeUrl)
|
|
|
+ console.log('++++qrcodeUrl+++++', this.qrcodeUrl)
|
|
|
this.$refs.promotionPopup.open()
|
|
|
},
|
|
|
|
|
|
- closeReminderPopup(){
|
|
|
+ closeReminderPopup() {
|
|
|
this.previousServiceOrderId = ''
|
|
|
this.$refs.reminderPopup.close()
|
|
|
},
|
|
|
- openSelectServiceObjectPopup(){
|
|
|
+ openSelectServiceObjectPopup() {
|
|
|
this.$api.service.getServiceObjectList({
|
|
|
- orderServiceId:this.currService.orderServiceId,
|
|
|
- }).then(res=>{
|
|
|
- this.selectServiceObjectList= res.data.data
|
|
|
+ orderServiceId: this.currService.orderServiceId,
|
|
|
+ }).then(res => {
|
|
|
+ this.selectServiceObjectList = res.data.data
|
|
|
this.getServiceObjectUrl(this.selectServiceObjectList)
|
|
|
uni.hideTabBar()
|
|
|
this.$refs.selectServiceObjectPopup.open()
|
|
|
@@ -382,12 +394,12 @@
|
|
|
}
|
|
|
},
|
|
|
|
|
|
- closeSelectServiceObjectPopup(){
|
|
|
+ closeSelectServiceObjectPopup() {
|
|
|
this.serviceProjectListIndex = -1
|
|
|
this.$refs.selectServiceObjectPopup.close()
|
|
|
},
|
|
|
- switchServiceObject(){
|
|
|
- if (this.selectServiceObjectIndex === -1){
|
|
|
+ switchServiceObject() {
|
|
|
+ if (this.selectServiceObjectIndex === -1) {
|
|
|
uni.showToast({
|
|
|
icon: 'none',
|
|
|
duration: 2000,
|
|
|
@@ -396,16 +408,16 @@
|
|
|
return
|
|
|
}
|
|
|
this.$api.service.switchServiceObject({
|
|
|
- orderServiceId:this.currService.orderServiceId,
|
|
|
- serviceObjectId:this.selectServiceObjectList[this.selectServiceObjectIndex].id
|
|
|
- }).then(res=>{
|
|
|
+ orderServiceId: this.currService.orderServiceId,
|
|
|
+ serviceObjectId: this.selectServiceObjectList[this.selectServiceObjectIndex].id
|
|
|
+ }).then(res => {
|
|
|
this.currServiceInfo()
|
|
|
this.closeSelectServiceObjectPopup()
|
|
|
})
|
|
|
},
|
|
|
|
|
|
addService() {
|
|
|
- if (!this.currService){
|
|
|
+ if (!this.currService) {
|
|
|
uni.showToast({
|
|
|
icon: 'error',
|
|
|
duration: 2000,
|
|
|
@@ -414,42 +426,40 @@
|
|
|
return
|
|
|
}
|
|
|
this.serviceProjectListIndex = 0
|
|
|
- this.$api.service.serviceProjectList().then(res=>{
|
|
|
- this.serviceProjectList= res.data.data
|
|
|
+ this.$api.service.serviceProjectList().then(res => {
|
|
|
+ this.serviceProjectList = res.data.data
|
|
|
this.serviceUserList(res.data.data[0])
|
|
|
uni.hideTabBar()
|
|
|
this.$refs.addServicePopup.open()
|
|
|
})
|
|
|
},
|
|
|
|
|
|
- selectProject(item,index){
|
|
|
+ selectProject(item, index) {
|
|
|
this.serviceProjectListIndex = index
|
|
|
this.serviceUserList(item)
|
|
|
},
|
|
|
- serviceUserList(item){
|
|
|
+ serviceUserList(item) {
|
|
|
this.$api.service.serviceUserList({
|
|
|
- serviceProjectId:item.id,
|
|
|
- storeId:this.storeId
|
|
|
- }).then(res=>{
|
|
|
+ serviceProjectId: item.id,
|
|
|
+ storeId: this.storeId
|
|
|
+ }).then(res => {
|
|
|
this.servicePersonListIndex = 0
|
|
|
- this.servicePersonList=res.data.data
|
|
|
+ this.servicePersonList = res.data.data
|
|
|
this.getServiceObjectUrl(this.servicePersonList)
|
|
|
})
|
|
|
},
|
|
|
|
|
|
- closeAddServicePopup(){
|
|
|
+ closeAddServicePopup() {
|
|
|
this.serviceProjectListIndex = 0
|
|
|
this.$refs.addServicePopup.close()
|
|
|
},
|
|
|
- addServiceProject(){
|
|
|
+ addServiceProject() {
|
|
|
this.previousServiceOrderId = this.currService.serviceObjectId
|
|
|
- this.$api.service.addServiceProject(
|
|
|
- {
|
|
|
- orderServiceId:this.currService.orderServiceId,
|
|
|
- serviceProjectId:this.serviceProjectList[this.serviceProjectListIndex].id,
|
|
|
- serviceUserId:this.servicePersonList[this.servicePersonListIndex].personId
|
|
|
- }
|
|
|
- ).then(res=>{
|
|
|
+ this.$api.service.addServiceProject({
|
|
|
+ orderServiceId: this.currService.orderServiceId,
|
|
|
+ serviceProjectId: this.serviceProjectList[this.serviceProjectListIndex].id,
|
|
|
+ serviceUserId: this.servicePersonList[this.servicePersonListIndex].personId
|
|
|
+ }).then(res => {
|
|
|
this.closeAddServicePopup()
|
|
|
this.currServiceInfo()
|
|
|
this.$refs.reminderPopup.open()
|
|
|
@@ -465,7 +475,7 @@
|
|
|
|
|
|
|
|
|
takePlace() {
|
|
|
- if (!this.currService){
|
|
|
+ if (!this.currService) {
|
|
|
uni.showToast({
|
|
|
icon: 'error',
|
|
|
duration: 2000,
|
|
|
@@ -485,19 +495,19 @@
|
|
|
})
|
|
|
},
|
|
|
|
|
|
- preference(){
|
|
|
+ preference() {
|
|
|
this.$refs.reminderPopup.close()
|
|
|
this.$api.service.preference({
|
|
|
- serviceObjectId:this.previousServiceOrderId,
|
|
|
- preference:this.content
|
|
|
- }).then(res=>{
|
|
|
- if (this.currService){
|
|
|
- if (this.currService.serviceObjectId == this.previousServiceOrderId ){
|
|
|
+ serviceObjectId: this.previousServiceOrderId,
|
|
|
+ preference: this.content
|
|
|
+ }).then(res => {
|
|
|
+ if (this.currService) {
|
|
|
+ if (this.currService.serviceObjectId == this.previousServiceOrderId) {
|
|
|
this.currService.preference = this.content
|
|
|
}
|
|
|
}
|
|
|
- this.previousServiceOrderId=''
|
|
|
- this.content=''
|
|
|
+ this.previousServiceOrderId = ''
|
|
|
+ this.content = ''
|
|
|
uni.showToast({
|
|
|
icon: 'success',
|
|
|
duration: 2000,
|
|
|
@@ -508,7 +518,7 @@
|
|
|
|
|
|
settle() {
|
|
|
let that = this
|
|
|
- if (!that.currService){
|
|
|
+ if (!that.currService) {
|
|
|
uni.showToast({
|
|
|
icon: 'error',
|
|
|
duration: 2000,
|
|
|
@@ -517,12 +527,12 @@
|
|
|
return
|
|
|
}
|
|
|
uni.showModal({
|
|
|
- title:'温馨提示',
|
|
|
- content:'是否确定结算',
|
|
|
- editable:false,
|
|
|
- success:(e)=>{
|
|
|
+ title: '温馨提示',
|
|
|
+ content: '是否确定结算',
|
|
|
+ editable: false,
|
|
|
+ success: (e) => {
|
|
|
console.log(e)
|
|
|
- if (e.confirm){
|
|
|
+ if (e.confirm) {
|
|
|
that.previousServiceOrderId = that.currService.serviceObjectId
|
|
|
uni.showLoading({
|
|
|
title: '结算中...'
|
|
|
@@ -533,7 +543,7 @@
|
|
|
uni.hideLoading();
|
|
|
that.currServiceInfo()
|
|
|
that.$refs.reminderPopup.open()
|
|
|
- }).catch(err =>{
|
|
|
+ }).catch(err => {
|
|
|
uni.hideLoading();
|
|
|
})
|
|
|
}
|
|
|
@@ -556,7 +566,7 @@
|
|
|
this.currServiceInfo()
|
|
|
})
|
|
|
},
|
|
|
- call(){
|
|
|
+ call() {
|
|
|
this.$api.service.call({
|
|
|
orderServiceId: this.currService.orderServiceId
|
|
|
}).then(res => {
|
|
|
@@ -565,7 +575,7 @@
|
|
|
},
|
|
|
|
|
|
next() {
|
|
|
- if (!this.userInfo.signIn){
|
|
|
+ if (!this.userInfo.signIn) {
|
|
|
uni.showToast({
|
|
|
icon: 'error',
|
|
|
duration: 2000,
|
|
|
@@ -574,21 +584,22 @@
|
|
|
return
|
|
|
}
|
|
|
uni.showModal({
|
|
|
- title:'温馨提示',
|
|
|
- content:'是否确定下一位',
|
|
|
- editable:false,
|
|
|
- success:(e)=>{
|
|
|
- if (e.confirm){
|
|
|
+ title: '温馨提示',
|
|
|
+ content: '是否确定下一位',
|
|
|
+ editable: false,
|
|
|
+ success: (e) => {
|
|
|
+ if (e.confirm) {
|
|
|
console.log(e.confirm)
|
|
|
uni.showLoading({
|
|
|
title: '叫号中...'
|
|
|
});
|
|
|
this.$api.service.next({
|
|
|
- orderServiceId: this.currService ? this.currService.orderServiceId : null,
|
|
|
- storeId:this.storeId
|
|
|
+ orderServiceId: this.currService ? this.currService.orderServiceId :
|
|
|
+ null,
|
|
|
+ storeId: this.storeId
|
|
|
}).then(res => {
|
|
|
this.currServiceInfo(true)
|
|
|
- }).catch(err=>{
|
|
|
+ }).catch(err => {
|
|
|
uni.hideLoading();
|
|
|
})
|
|
|
}
|
|
|
@@ -597,7 +608,7 @@
|
|
|
},
|
|
|
|
|
|
currServiceInfo(e) {
|
|
|
- if (!this.userInfo.signIn){
|
|
|
+ if (!this.userInfo.signIn) {
|
|
|
uni.showToast({
|
|
|
icon: 'error',
|
|
|
duration: 2000,
|
|
|
@@ -611,16 +622,16 @@
|
|
|
this.$api.service.currServiceInfo({
|
|
|
storeId: this.userInfo.workStoreId
|
|
|
}).then(res => {
|
|
|
- if (e){
|
|
|
+ if (e) {
|
|
|
console.log(res.data.data)
|
|
|
- if (res.data.data === null){
|
|
|
+ if (res.data.data === null) {
|
|
|
uni.showModal({
|
|
|
- title:'温馨提示',
|
|
|
- content:'暂无需要服务的客户',
|
|
|
- editable:false,
|
|
|
- showCancel:false,
|
|
|
- success:(e)=>{
|
|
|
- if (e.confirm){
|
|
|
+ title: '温馨提示',
|
|
|
+ content: '暂无需要服务的客户',
|
|
|
+ editable: false,
|
|
|
+ showCancel: false,
|
|
|
+ success: (e) => {
|
|
|
+ if (e.confirm) {
|
|
|
|
|
|
}
|
|
|
}
|
|
|
@@ -630,27 +641,27 @@
|
|
|
uni.hideLoading();
|
|
|
this.currService = res.data.data
|
|
|
this.setButtomState(this.currService)
|
|
|
- this.currService.avatar=this.currService.avatar.replace(/^http:/, "https:")
|
|
|
- }).catch(err=>{
|
|
|
+ this.currService.avatar = this.currService.avatar.replace(/^http:/, "https:")
|
|
|
+ }).catch(err => {
|
|
|
uni.hideLoading();
|
|
|
- console.log("出错了+++++++++++出错了+++++++",err)
|
|
|
+ console.log("出错了+++++++++++出错了+++++++", err)
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
|
|
|
|
|
- setButtomState(currService){
|
|
|
- if (currService){
|
|
|
- if (currService.status == 12){
|
|
|
+ setButtomState(currService) {
|
|
|
+ if (currService) {
|
|
|
+ if (currService.status == 12) {
|
|
|
//叫号中
|
|
|
- this.buttonState=[0,0,1,1]
|
|
|
- }else if (currService.status == 8){
|
|
|
+ this.buttonState = [0, 0, 1, 1]
|
|
|
+ } else if (currService.status == 8 || currService.status == 1) {
|
|
|
//服务中
|
|
|
- this.buttonState=[1,1,0,0]
|
|
|
+ this.buttonState = [1, 1, 0, 0]
|
|
|
}
|
|
|
|
|
|
- }else {
|
|
|
- this.buttonState=[0,1,1,1]
|
|
|
+ } else {
|
|
|
+ this.buttonState = [0, 1, 1, 1]
|
|
|
}
|
|
|
},
|
|
|
|
|
|
@@ -658,21 +669,23 @@
|
|
|
this.$api.user.getUserInfo().then(res => {
|
|
|
this.userInfo = res.data.data
|
|
|
this.storeId = res.data.data.workStoreId
|
|
|
- uni.setStorageSync('userInfo', this.userInfo )
|
|
|
- if (this.userInfo.avatar){
|
|
|
+ uni.setStorageSync('userInfo', this.userInfo)
|
|
|
+ if (this.userInfo.avatar) {
|
|
|
this.getImgUrlByOssId(this.userInfo.avatar)
|
|
|
}
|
|
|
- if (this.userInfo.signIn){
|
|
|
- this.buttonState=[0,1,1,1]
|
|
|
+ if (this.userInfo.signIn) {
|
|
|
+ this.buttonState = [0, 1, 1, 1]
|
|
|
this.currServiceInfo()
|
|
|
}
|
|
|
this.$forceUpdate()
|
|
|
})
|
|
|
},
|
|
|
- getImgUrlByOssId(ossId){
|
|
|
- this.$api.service.getImgUrlByOssId({ossId:ossId}).then(res=>{
|
|
|
- this.$set(this.userInfo,'avatarUrl', res.data.data[0].url.replace(/^http:/, "https:"))
|
|
|
- uni.setStorageSync('userInfo', this.userInfo )
|
|
|
+ getImgUrlByOssId(ossId) {
|
|
|
+ this.$api.service.getImgUrlByOssId({
|
|
|
+ ossId: ossId
|
|
|
+ }).then(res => {
|
|
|
+ this.$set(this.userInfo, 'avatarUrl', res.data.data[0].url.replace(/^http:/, "https:"))
|
|
|
+ uni.setStorageSync('userInfo', this.userInfo)
|
|
|
})
|
|
|
},
|
|
|
|
|
|
@@ -682,17 +695,17 @@
|
|
|
url: '/pages/scanCode/scanCode',
|
|
|
events: {
|
|
|
getScancode: function(data) {
|
|
|
- let param ={
|
|
|
- storeId:JSON.parse(data).storeId,
|
|
|
- timestamp:JSON.parse(data).timestamp
|
|
|
+ let param = {
|
|
|
+ storeId: JSON.parse(data).storeId,
|
|
|
+ timestamp: JSON.parse(data).timestamp
|
|
|
}
|
|
|
- that.$api.service.clockIn(param).then(res=>{
|
|
|
+ that.$api.service.clockIn(param).then(res => {
|
|
|
uni.showToast({
|
|
|
icon: 'success',
|
|
|
duration: 2000,
|
|
|
title: '签到成功'
|
|
|
});
|
|
|
- uni.setStorageSync('userInfo', that.userInfo )
|
|
|
+ uni.setStorageSync('userInfo', that.userInfo)
|
|
|
that.getUserInfo()
|
|
|
})
|
|
|
},
|
|
|
@@ -712,4 +725,4 @@
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
@import './index.rpx.css';
|
|
|
-</style>
|
|
|
+</style>
|