Commit 9376f3b7 by 前端

Merge branch 'develop' into 'master'

Develop

See merge request !182
2 parents 33b6c3cf 6dc84173
...@@ -180,5 +180,10 @@ module.exports = { ...@@ -180,5 +180,10 @@ module.exports = {
// 选择4s店和场景 // 选择4s店和场景
selectMerchantScene(data) { selectMerchantScene(data) {
return api.post('dj.api.smartcarlife.selectMerchantScene', data) return api.post('dj.api.smartcarlife.selectMerchantScene', data)
},
// 按客户查找门店工单/预约
searchOrderCustomer(data) {
return api.post('dj.api.smartcarlife.order.searchOrderCustomer', data)
} }
} }
...@@ -30,7 +30,10 @@ Component({ ...@@ -30,7 +30,10 @@ Component({
userInfo, userInfo,
copyStoreList: storeList, copyStoreList: storeList,
searchValue: '', searchValue: '',
edit: false edit: false,
customStoreList: [],
customSearchFlag: false,
searchSelectIndex: 0
}) })
} }
} }
...@@ -59,7 +62,14 @@ Component({ ...@@ -59,7 +62,14 @@ Component({
inputFocus: false, inputFocus: false,
searchValue: '', searchValue: '',
copyStoreList: [], copyStoreList: [],
selectedMerchantId: '' selectedMerchantId: '',
searchSelectData: ['搜门店', '搜客户'],
searchSelectIndex: 0,
showSelect: false,
customStoreList: [],
statusText: ['待跟进', '已升级', '战败', '待支付'],
customSearchFlag: false,
pageNum: 1
}, },
/** /**
...@@ -71,6 +81,28 @@ Component({ ...@@ -71,6 +81,28 @@ Component({
show:false show:false
}) })
}, },
// 查询条件类型切换
selectTap() {
this.setData({
showSelect: !this.data.showSelect
});
},
optionTap(e) {
let { index } = e.currentTarget.dataset
this.setData({
searchSelectIndex: index,
showSelect: !this.data.showSelect,
searchValue: '',
nothing: false,
pageNum: 1
})
this.searchEvent(true)
},
closeSelect() {
this.setData({
showSelect: false
})
},
open() { open() {
if (this.data.disabled) return if (this.data.disabled) return
this.setData({ this.setData({
...@@ -102,21 +134,33 @@ Component({ ...@@ -102,21 +134,33 @@ Component({
type type
} = e } = e
this.setData({ this.setData({
edit: false edit: false,
nothing: false,
pageNum: 1
}) })
this.setValue(value) this.setValue(value)
this.searchEvent() this.searchEvent(true)
}, },
clearInputText() { clearInputText() {
this.setData({ this.setData({
searchValue: '', searchValue: '',
edit: false edit: false,
nothing: false,
pageNum: 1
}) })
this.searchEvent(true)
},
scrollonReachBottom() {
this.searchEvent() this.searchEvent()
}, },
searchEvent() { searchEvent(isReset = false) {
let { searchValue, selectedMerchantId } = this.data let { searchValue, selectedMerchantId, searchSelectIndex, pageNum, nothing } = this.data
let userInfo = wx.$util.getUserInfo()
let { storeList } = wx.$util.deepClone(this.data) let { storeList } = wx.$util.deepClone(this.data)
this.setData({
customSearchFlag: false
})
if (searchSelectIndex == 0) { // 搜门店
if (!searchValue) { if (!searchValue) {
storeList.map(i => { storeList.map(i => {
i.active = false i.active = false
...@@ -139,6 +183,46 @@ Component({ ...@@ -139,6 +183,46 @@ Component({
copyStoreList: arr copyStoreList: arr
}) })
} }
this.setData({
customSearchFlag: true
})
} else { // 搜客户
let params = {
pageNum: pageNum,
pageSize: 10,
keyword: searchValue,
sellerMerchantId: userInfo?.isSuper ? '' : (userInfo?.merchantId || '')
}
if (!searchValue) {
this.setData({customStoreList: []})
return
}
if (nothing) return
api.searchOrderCustomer(params).then(res => {
let { code, data, message } = res
if (code == 0) {
data?.list.forEach(val => {
// upgradeFlag Y已升级 N已战败
// listStatus 0待跟进 1已升级 2战败 3待支付
val.listStatus = val.upgradeFlag == 'Y' ? 1 : val.upgradeFlag == 'N' ? 2 : (!val.upgradeFlag && val.status == 1) ? 0 : (!val.upgradeFlag && val.status == 2) ? 3 : ''
val.merchantId = userInfo?.isSuper ? val.sellerMerchantId : val.merchantId
val.merchantName = userInfo?.isSuper ? val.sellerMerchantName : val.merchantName
})
let tempList = isReset ? data?.list : this.data.customStoreList.concat(data?.list)
this.setData({
customStoreList: tempList,
pageNum: pageNum + 1,
total: data?.total,
nothing: data?.total == tempList.length,
})
} else {
wx.$util.showToast(message)
}
this.setData({
customSearchFlag: true
})
})
}
}, },
showTabBar() { showTabBar() {
if (this.data.hasTabBar) wx.showTabBar({animation: true}) if (this.data.hasTabBar) wx.showTabBar({animation: true})
...@@ -150,7 +234,7 @@ Component({ ...@@ -150,7 +234,7 @@ Component({
const thisPage = wx.$router.getPageInstance() const thisPage = wx.$router.getPageInstance()
let { item, selectindex } = e.currentTarget.dataset let { item, selectindex } = e.currentTarget.dataset
if (item.actived) return this.closeMenu() if (item.actived) return this.closeMenu()
let { userInfo, storeList, copyStoreList } = this.data let { userInfo, storeList, copyStoreList, searchSelectIndex } = this.data
copyStoreList?.map((val, index) => { copyStoreList?.map((val, index) => {
val.actived = false val.actived = false
if (index == selectindex) val.actived = true if (index == selectindex) val.actived = true
...@@ -162,7 +246,14 @@ Component({ ...@@ -162,7 +246,14 @@ Component({
// 精品升级场景 超管切换 // 精品升级场景 超管切换
if (userInfo?.isSuper && userInfo?.sceneType == 1) { if (userInfo?.isSuper && userInfo?.sceneType == 1) {
this.closeMenu() this.closeMenu()
// 搜客户
if (searchSelectIndex == 1) {
let customIndex = storeList.findIndex(val => val.merchantId == item.merchantId)
thisPage.changePicker && thisPage.changePicker(item, customIndex)
this.goPage(item)
} else { // 搜门店
thisPage.changePicker && thisPage.changePicker(storeList[item.index], item.index) thisPage.changePicker && thisPage.changePicker(storeList[item.index], item.index)
}
return return
} }
// 切换4s店 // 切换4s店
...@@ -192,6 +283,7 @@ Component({ ...@@ -192,6 +283,7 @@ Component({
}, },
eventCallback(item, sceneType, isSuper) { eventCallback(item, sceneType, isSuper) {
const thisPage = wx.$router.getPageInstance() const thisPage = wx.$router.getPageInstance()
let { searchSelectIndex } = this.data
let userInfo = wx.$util.getUserInfo() let userInfo = wx.$util.getUserInfo()
if (userInfo.merchantAccountList && userInfo.merchantAccountList.length) { if (userInfo.merchantAccountList && userInfo.merchantAccountList.length) {
try { try {
...@@ -278,6 +370,16 @@ Component({ ...@@ -278,6 +370,16 @@ Component({
thisPage.initList && thisPage.initList() thisPage.initList && thisPage.initList()
// 精品升级首页数据刷新 // 精品升级首页数据刷新
thisPage.initData && thisPage.initData() thisPage.initData && thisPage.initData()
// 搜客户
if (searchSelectIndex == 1) {
this.goPage(item)
}
},
// 跳转到工单详情/预约详情
goPage(item) {
// status 1待跟进(有inviteRecordId跳转预约详情 微信支付跳转工单确认页面)3待支付(跳转工单确认页面)constructionFlag(已施工页面)
let pageName = (item.status == 1 && item?.inviteRecordId) ? 'tabDate.detail' : (item.status == 3 || (item.status == 1 && item.selectPayType == 1))? 'tabWorkOrder.confirmOrder' : item.constructionFlag == 'Y' && item.status != 10 ? 'tabWorkOrder.constructionOrderDetail' : 'tabWorkOrder.orderDetail'
wx.$router.go(`${pageName}?id=${item?.inviteRecordId}&orderCode=${item?.orderCode}`)
} }
} }
}) })
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<view class="title_box"> <view class="title_box">
<view class="title">店面列表</view> <view class="title">店面列表</view>
</view> </view>
<view class="search_box"> <!-- <view class="search_box">
<view> <view>
<view class="search-input"> <view class="search-input">
<block wx:if="{{ !edit }}"> <block wx:if="{{ !edit }}">
...@@ -35,8 +35,28 @@ ...@@ -35,8 +35,28 @@
</block> </block>
</view> </view>
</view> </view>
</view> -->
<view class="search-box">
<view class='select_box' wx:if="{{userInfo.sceneType == 1}}">
<view class='select' catchtap='selectTap'>
<view class='select_text'>{{searchSelectData[searchSelectIndex]}}</view>
<image class='select_img {{showSelect&&"select_img_rotate"}}' src='/images/arrow-right.png'></image>
</view>
<view class='option_box' wx:if="{{showSelect}}">
<view class='option {{searchSelectIndex == index ? "active" : ""}}' wx:for='{{searchSelectData}}' wx:key='this' data-index='{{index}}' catchtap='optionTap'>{{item}}</view>
</view>
<view class="mask_class" wx:if="{{showSelect}}" bindtap="closeSelect"></view>
</view>
<view class="search-input">
<image src="/images/search.png" class="search-icon" />
<input type="text" placeholder="{{searchSelectIndex == 0 ? '搜索门店名称/商户号' : '搜索客户姓名/手机号'}}" class="input" confirm-type="search" value="{{searchValue}}" placeholder-class="input-placeholder" bindinput="input" bindconfirm="inputConfifm" />
<block wx:if="{{searchValue}}">
<image src="/images/clear.png" class="search-clear" bindtap="clearInputText" />
</block>
</view>
</view> </view>
<scroll-view scroll-y style="height: calc(100vh - 264rpx - 88rpx);" enhanced="{{true}}" show-scrollbar="{{false}}"> <!-- 搜门店 -->
<scroll-view wx:if="{{copyStoreList.length && searchSelectIndex == 0}}" scroll-y style="height: calc(100vh - 264rpx - 88rpx);" enhanced="{{true}}" show-scrollbar="{{false}}">
<block wx:for="{{copyStoreList}}" wx:key="index" wx:for-index="index"> <block wx:for="{{copyStoreList}}" wx:key="index" wx:for-index="index">
<view catch:tap="selectStore" data-item="{{item}}" data-selectindex="{{index}}" class="element {{item.actived ? 'active' : ''}}"> <view catch:tap="selectStore" data-item="{{item}}" data-selectindex="{{index}}" class="element {{item.actived ? 'active' : ''}}">
<view><image src="{{IMG_URL}}/store_icon_nobg.png"></image></view> <view><image src="{{IMG_URL}}/store_icon_nobg.png"></image></view>
...@@ -47,6 +67,31 @@ ...@@ -47,6 +67,31 @@
</view> </view>
</block> </block>
</scroll-view> </scroll-view>
<!-- 搜客户 -->
<scroll-view wx:if="{{customStoreList.length && searchSelectIndex == 1 && userInfo.sceneType == 1}}" scroll-y style="height: calc(100vh - 264rpx - 88rpx);" enhanced="{{true}}" show-scrollbar="{{false}}" bindscrolltolower="scrollonReachBottom">
<block wx:for="{{customStoreList}}" wx:key="index" wx:for-index="index">
<view catch:tap="selectStore" data-item="{{item}}" data-selectindex="{{index}}" class="element custom_element {{item.actived ? 'active' : ''}}">
<view><image src="{{IMG_URL}}/user_avatar.png"></image></view>
<view class="text_box">
<view class="custom_text">
<view>
<text class="custom_name">{{item.customer.customerName}}</text>
<text class="custom_phone">{{item.customer.customerPhone}}</text>
</view>
<view class="status_text status_text_{{item.listStatus}}">{{statusText[item.listStatus]}}</view>
</view>
<view class="label">{{item.merchantName}}</view>
<view class="label_no" wx:if="{{item.merchantId}}">商户号:{{item.merchantId}}</view>
</view>
</view>
</block>
</scroll-view>
<block wx:if="{{(!customStoreList.length && searchSelectIndex == 1) || (!copyStoreList.length && searchSelectIndex == 0)}}">
<view class="list_not">
<image class="list_nothing_img {{customSearchFlag ? '' : 'big_list_nothing_img'}}" src="{{IMG_URL}}/{{customSearchFlag ? 'no_data_bg' : 'search_icon_bg'}}.png" mode=""/>
<view class="list_not_text">{{customSearchFlag ? '您搜索的内容暂无结果' : '快去搜索看看'}}</view>
</view>
</block>
<!-- <view class="title">通用</view> <!-- <view class="title">通用</view>
<view catch:tap="goMineCenter" data-index="" class="element mine"> <view catch:tap="goMineCenter" data-index="" class="element mine">
<view class="flex_box"> <view class="flex_box">
......
...@@ -23,7 +23,173 @@ ...@@ -23,7 +23,173 @@
color: #FFFFFF80; color: #FFFFFF80;
} }
.wrapper .search_box{ .search-box {
display: flex;
position: sticky;
top: 0;
left: 0;
z-index: 1009;
box-sizing: border-box;
margin-bottom: 16rpx;
}
.search-box .select_box{
width: 180rpx;
display: flex;
flex-flow: column;
align-items: center;
justify-content: center;
font-size: 24rpx;
color: #999999;
}
.search-box .select_box .select{
display: flex;
align-items: center;
width: 132rpx;
}
.search-box .select_box .select .select_text{
color: #FFFFFF;
font-size: 28rpx;
}
.search-box .select_box .select .select_img{
transform: rotate(90deg);
width: 12rpx;
height: 20rpx;
flex-shrink: 0;
margin-left: 6rpx;
}
.search-box .select_box .select .select_img_rotate{
transform: rotate(-90deg);
}
.search-box .select_box .option_box{
position: absolute;
z-index: 200;
top: 100rpx;
left: 32rpx;
width: 194rpx;
box-sizing: border-box;
background: #FFFFFF;
box-shadow: 0 6rpx 12rpx 0 #0000000d;
border-radius: 16rpx;
height: 176rpx;
}
.search-box .select_box .option_box::after{
height: 0;
width: 0;
content: '';
position: absolute;
border: 14rpx solid transparent;
border-right: 14rpx solid #FFFFFF;
top: -24rpx;
left: 88rpx;
z-index:-1;
transform: rotate(90deg);
}
.search-box .select_box .option_box::before{
height: 0;
width: 0;
content: '';
position: absolute;
border: 14rpx solid transparent;
border-right: 14rpx solid #FFFFFF;
top: -24rpx;
left: 88rpx;
z-index:-1;
transform: rotate(90deg);
}
.search-box .select_box .option_box .option{
display: block;
height: 88rpx;
line-height: 88rpx;
text-align: center;
color: #333333;
overflow: hidden;
}
.search-box .select_box .option_box .option:first-child{
border-radius: 16rpx 16rpx 0 0;
}
.search-box .select_box .option_box .option:last-child{
border-radius: 0 0 16rpx 16rpx;
}
.search-box .select_box .option_box .option.active{
background: #347bff1a;
color: #347BFF;
}
.search-box .search-input {
width: 100%;
height: 72rpx;
display: flex;
align-items: center;
background: rgba(255, 255, 255, .15);
border-radius: 38rpx;
}
.search-box .search-input .search-icon {
width: 28rpx;
height: 28rpx;
margin: 0 8rpx 0 24rpx;
flex-shrink: 0;
}
.search-box .search-input .search-clear {
flex-shrink: 0;
padding: 10rpx;
width: 36rpx;
height: 36rpx;
margin: 0 10rpx 0 10rpx;
}
.search-box .search-input .input {
font-size: 28rpx;
color: #FFFFFF;
width: calc(100% - 100rpx);
}
.input-placeholder {
color: #BEC1C7;
}
.search-box .search {
width: 144rpx;
height: 100%;
color: #666;
box-sizing: border-box;
padding: 0 24rpx;
}
.search-box .search .text-center {
font-size: 24rpx;
/* background-color: #f7f7f7; */
border-radius: 12rpx;
width: 100%;
height: 50rpx;
color: #888;
}
.search-box .search .text-center .search-filter {
margin-left: 6rpx;
width: 24rpx;
height: 24rpx;
}
.mask_class{
width: 100vw;
height: 100vh;
background: transparent;
position: fixed;
top: 0;
left: 0;
z-index: 100;
}
/* .wrapper .search_box{
padding-bottom: 16rpx; padding-bottom: 16rpx;
display: flex; display: flex;
align-items: center; align-items: center;
...@@ -70,12 +236,11 @@ ...@@ -70,12 +236,11 @@
.wrapper .search_box .search-input .placeholder{ .wrapper .search_box .search-input .placeholder{
color: #BEC1C7; color: #BEC1C7;
} } */
.wrapper .element{ .wrapper .element{
position: relative; position: relative;
padding: 32rpx 0; padding: 32rpx;
padding-left: 32rpx;
display: flex; display: flex;
align-items: center; align-items: center;
} }
...@@ -83,7 +248,58 @@ ...@@ -83,7 +248,58 @@
display: flex; display: flex;
flex-flow: column; flex-flow: column;
justify-content: center; justify-content: center;
width: calc(100% - 116rpx);
}
.wrapper .element .text_box .custom_text{
display: flex;
align-items: center;
justify-content: space-between;
color: #FFFFFF;
margin-bottom: 16rpx;
} }
.wrapper .custom_element .text_box .custom_text .custom_name{
font-size: 28rpx;
}
.wrapper .custom_element .text_box .custom_text .custom_phone{
font-size: 24rpx;
margin-left: 8rpx;
}
.wrapper .custom_element .text_box .status_text{
width: 76rpx;
height: 36rpx;
flex-shrink: 0;
line-height: 36rpx;
border-radius: 4rpx;
text-align: center;
font-size: 20rpx;
font-weight: 600;
}
/* 待跟进 */
.wrapper .custom_element .text_box .status_text_0{
background: #FFF5E6;
color: #FF9D0A;
}
/* 已升级 */
.wrapper .custom_element .text_box .status_text_1{
background: #EAF1FF;
color: #347BFF;
}
/* 战败 */
.wrapper .custom_element .text_box .status_text_2{
background: #FDECE9;
color: #F24724;
}
/* 待支付 */
.wrapper .custom_element .text_box .status_text_3{
background: #FFF5E6;
color: #FF9D0A;
}
.wrapper .element .text_box .label{ .wrapper .element .text_box .label{
font-weight: 500; font-weight: 500;
font-size: 30rpx; font-size: 30rpx;
...@@ -100,6 +316,15 @@ ...@@ -100,6 +316,15 @@
margin-top: 16rpx; margin-top: 16rpx;
} }
.wrapper .custom_element .text_box .label{
font-size: 24rpx;
color: #999EA8;
}
.wrapper .custom_element .text_box .label_no{
margin-top: 0;
}
.wrapper .element image{ .wrapper .element image{
width: 96rpx; width: 96rpx;
height: 96rpx; height: 96rpx;
...@@ -146,3 +371,28 @@ ...@@ -146,3 +371,28 @@
border-width: 4rpx 4rpx 0 0; border-width: 4rpx 4rpx 0 0;
transform: rotate(45deg); transform: rotate(45deg);
} }
.list_nothing_img{
width: 226rpx;
height: 156rpx;
}
.big_list_nothing_img{
width: 258rpx;
height: 258rpx;
}
.list_not {
height: calc(100vh - 264rpx - 88rpx);
width: 100%;
display: flex;
flex-flow: column;
align-items: center;
justify-content: center;
}
.list_not_text{
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: 28rpx;
color: #BEC1C7;
margin-top: 24rpx;
}
\ No newline at end of file \ No newline at end of file
...@@ -271,7 +271,7 @@ Page({ ...@@ -271,7 +271,7 @@ Page({
this.setShopMerchantObj(obj) this.setShopMerchantObj(obj)
wx.$router.go('pages.sceneIndex') wx.$router.go('pages.sceneIndex')
} else if (!result?.length) { } else if (!result?.length) {
return wx.$util.showToast('暂无关联4S店,请联系总部管理员') return wx.$util.showToast('园区店关联的4s店商户账号无效,请联系总部管理员')
} else { } else {
wx.$router.go('pages.merchantList') wx.$router.go('pages.merchantList')
} }
...@@ -365,6 +365,9 @@ Page({ ...@@ -365,6 +365,9 @@ Page({
*/ */
onShow: function () { onShow: function () {
wx.hideHomeButton() wx.hideHomeButton()
this.setData({
requestFlag: false
})
}, },
/** /**
......
...@@ -92,8 +92,7 @@ Page({ ...@@ -92,8 +92,7 @@ Page({
} }
return i return i
}) })
console.log(sceneList, userInfo) this.setData({ sceneList, jumpPageFlag: false })
this.setData({ sceneList })
}, },
/** /**
......
// pages/accountItems/accountItems.js // pages/accountItems/accountItems.js
import { get4SStoreList } from '~/store/index' import { get4SStoreList, getShopSceneConfig } from '~/store/index'
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/' const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/'
import { getShopSceneConfig } from '~/store/index' import api from '~/api/api'
import constantData from '../constant/data'
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
...@@ -15,7 +16,13 @@ Page({ ...@@ -15,7 +16,13 @@ Page({
shopMerchantName: '', shopMerchantName: '',
IMG_URL, IMG_URL,
openSceneArr: [], openSceneArr: [],
jumpPageFlag: false jumpPageFlag: false,
selectData: ['搜门店', '搜客户'],
selectIndex: 0,
customStoreList: [],
statusText: ['待跟进', '已升级', '战败', '待支付'],
customSearchFlag: false,
pageNum: 1,
}, },
/** /**
...@@ -31,6 +38,40 @@ Page({ ...@@ -31,6 +38,40 @@ Page({
inputFocus: true inputFocus: true
}) })
}, },
// 查询条件类型切换
selectTap() {
this.setData({
showSelect: !this.data.showSelect
});
},
optionTap(e) {
let { index } = e.currentTarget.dataset
this.setData({
selectIndex: index,
showSelect: !this.data.showSelect,
searchValue: '',
nothing: false,
pageNum: 1,
customSearchFlag: false
})
this.searchEvent(true)
},
closeSelect() {
this.setData({
showSelect: false
})
},
clearInputText() {
this.setData({
searchValue: '',
edit: false,
nothing: false,
pageNum: 1,
customSearchFlag: false
})
this.searchEvent(true)
},
getSceneArr() { getSceneArr() {
let userInfo = wx.$util.getUserInfo() let userInfo = wx.$util.getUserInfo()
// 超管开通全部场景 // 超管开通全部场景
...@@ -59,8 +100,8 @@ Page({ ...@@ -59,8 +100,8 @@ Page({
}) })
.catch(err => {}) .catch(err => {})
}, },
jumpPage() { jumpPage(item) {
let { shopMerchantName, shopMerchantId, openSceneArr } = this.data let { shopMerchantName, shopMerchantId, openSceneArr, selectIndex } = this.data
if (!openSceneArr?.length && !wx.$util.getUserInfo()?.isSuper) return wx.$util.showToast('暂无开通业务,请联系总部管理员') if (!openSceneArr?.length && !wx.$util.getUserInfo()?.isSuper) return wx.$util.showToast('暂无开通业务,请联系总部管理员')
wx.$util.setUserInfo({ wx.$util.setUserInfo({
...wx.$util.getUserInfo(), ...wx.$util.getUserInfo(),
...@@ -79,8 +120,40 @@ Page({ ...@@ -79,8 +120,40 @@ Page({
merchantName: shopMerchantName merchantName: shopMerchantName
} }
}) })
if (selectIndex == 0) { // 搜门店
wx.$router.go('pages.sceneIndex') wx.$router.go('pages.sceneIndex')
this.setData({jumpPageFlag: false}) this.setData({jumpPageFlag: false})
} else { // 搜客户
if (!openSceneArr.includes(0)) return wx.$util.showToast('暂未开通精品升级场景')
// 进入精品升级场景 工单/预约详情
api.selectMerchantScene({
merchantId: shopMerchantId,
merchantName: shopMerchantName,
sceneType: 1
}).then(res => {
let {code, data, message} = res
this.setData({jumpPageFlag: false})
if (code == 0) {
wx.$util.setUserInfo({ ...wx.$util.getUserInfo(), sceneType: 1 })
// listStatus 0 待跟进 1已升级 2战败 3待支付
let queryParams = {
isGoPage: true,
listStatus: item.listStatus,
status: item.status, // 工单状态
selectPayType: item.selectPayType, // 支付方式
constructionFlag: item.constructionFlag, // 已施工标识
pageParams: {
id: item.inviteRecordId || '', // 预约id
orderCode: item.orderCode || '' // 工单号
}
}
wx.$router.reLaunch(constantData?.pageUrl[1], queryParams)
} else {
wx.$util.showToast(message)
}
})
}
}, },
setValue(value) { setValue(value) {
if (this.properties.filterEmoji) { if (this.properties.filterEmoji) {
...@@ -110,14 +183,22 @@ Page({ ...@@ -110,14 +183,22 @@ Page({
} = e } = e
this.setData({ this.setData({
edit: false, edit: false,
searchValue: value searchValue: value,
nothing: false,
pageNum: 1,
customSearchFlag: false
}) })
this.setValue(value) this.setValue(value)
this.searchEvent(true)
},
scrollonReachBottom() {
this.searchEvent() this.searchEvent()
}, },
// 搜索过滤 // 搜索过滤
searchEvent() { searchEvent(isReset = false) {
let { searchValue, copyLoginUserInfoList, shopMerchantId } = this.data let { searchValue, copyLoginUserInfoList, shopMerchantId, selectIndex, pageNum, nothing } = this.data
let userInfo = wx.$util.getUserInfo()
if (selectIndex == 0) { // 搜门店
copyLoginUserInfoList.map(val => { copyLoginUserInfoList.map(val => {
val.active = false val.active = false
if (val.merchantId == shopMerchantId) val.active = true if (val.merchantId == shopMerchantId) val.active = true
...@@ -132,13 +213,52 @@ Page({ ...@@ -132,13 +213,52 @@ Page({
loginUserInfoList: copyLoginUserInfoList loginUserInfoList: copyLoginUserInfoList
}) })
} }
this.setData({
customSearchFlag: true
})
} else { // 搜客户
let params = {
pageNum: pageNum,
pageSize: 10,
keyword: searchValue,
sellerMerchantId: userInfo?.merchantId || ''
}
if (!searchValue) {
this.setData({customStoreList: []})
return
}
if (nothing) return
api.searchOrderCustomer(params).then(res => {
let { code, data, message } = res
if (code == 0) {
data?.list.forEach(val => {
// upgradeFlag Y已升级 N已战败
// listStatus 0待跟进 1已升级 2战败 3待支付
val.listStatus = val.upgradeFlag == 'Y' ? 1 : val.upgradeFlag == 'N' ? 2 : (!val.upgradeFlag && val.status == 1) ? 0 : (!val.upgradeFlag && val.status == 3) ? 3 : ''
})
let tempList = isReset ? data?.list : this.data.customStoreList.concat(data?.list)
this.setData({
customStoreList: tempList,
pageNum: pageNum + 1,
total: data?.total,
nothing: data?.total == tempList.length,
})
} else {
wx.$util.showToast(message)
}
this.setData({
customSearchFlag: true
})
})
}
}, },
chooseAccount(e) { chooseAccount(e) {
if (this.data.jumpPageFlag) return if (this.data.jumpPageFlag) return
this.setData({ jumpPageFlag: true }) this.setData({ jumpPageFlag: true })
let { item } = e.currentTarget.dataset let { item } = e.currentTarget.dataset
let { loginUserInfoList } = this.data let { loginUserInfoList, customStoreList, selectIndex } = this.data
loginUserInfoList.map(i => { let listArr = selectIndex == 0 ? loginUserInfoList : customStoreList
listArr.map(i => {
i.active = false i.active = false
if (i.merchantId == item?.merchantId) { if (i.merchantId == item?.merchantId) {
i.active = true i.active = true
...@@ -146,11 +266,12 @@ Page({ ...@@ -146,11 +266,12 @@ Page({
return i return i
}) })
this.setData({ this.setData({
loginUserInfoList, loginUserInfoList: listArr,
customStoreList: listArr,
shopMerchantId: item.merchantId, shopMerchantId: item.merchantId,
shopMerchantName: item.merchantName shopMerchantName: item.merchantName
}) })
this.jumpPage() this.jumpPage(item)
}, },
/** /**
...@@ -163,6 +284,7 @@ Page({ ...@@ -163,6 +284,7 @@ Page({
*/ */
onShow: function () { onShow: function () {
wx.hideHomeButton() wx.hideHomeButton()
this.setData({ jumpPageFlag: false })
}, },
/** /**
......
<!-- style="padding-bottom:{{isFullSucreen?'224rpx':'160rpx'}}" --> <!-- style="padding-bottom:{{isFullSucreen?'224rpx':'160rpx'}}" -->
<view class="layout"> <view class="layout">
<view class="search-box"> <!-- <view class="search-box">
<view class="search-input"> <view class="search-input">
<block wx:if="{{!edit}}"> <block wx:if="{{!edit}}">
<view class="input {{searchValue?'':'placeholder'}}" bindtap="open"> <view class="input {{searchValue?'':'placeholder'}}" bindtap="open">
...@@ -17,10 +17,29 @@ ...@@ -17,10 +17,29 @@
<input type="text" class="input" value='{{searchValue}}' focus='{{inputFocus}}' confirm-type="search" bindinput='input' bindblur="inputBlur" bindconfirm="inputConfifm"/> <input type="text" class="input" value='{{searchValue}}' focus='{{inputFocus}}' confirm-type="search" bindinput='input' bindblur="inputBlur" bindconfirm="inputConfifm"/>
</block> </block>
</view> </view>
</view> -->
<view class="search-box">
<view class='select_box'>
<view class='select' catchtap='selectTap'>
<view class='select_text'>{{selectData[selectIndex]}}</view>
<image class='select_img {{showSelect&&"select_img_rotate"}}' src='/images/back.png'></image>
</view>
<view class='option_box' wx:if="{{showSelect}}" >
<view class='option {{selectIndex == index ? "active" : ""}}' wx:for='{{selectData}}' wx:key='this' data-index='{{index}}' catchtap='optionTap'>{{item}}</view>
</view> </view>
<scroll-view class="list" scroll-y style="height: calc(100% - {{copyLoginUserInfoList && copyLoginUserInfoList.length >= 10 ? 120 : 50}}rpx);"> <view class="mask_class" wx:if="{{showSelect}}" bindtap="closeSelect"></view>
</view>
<view class="search-input">
<image src="/images/search.png" class="search-icon" />
<input type="text" placeholder="{{selectIndex == 0 ? '搜索门店名称/商户号' : '请输入客户姓名/手机号搜索'}}" class="input" confirm-type="search" value="{{searchValue}}" placeholder-class="input-placeholder" bindinput="input" bindconfirm="inputConfifm" />
<block wx:if="{{searchValue}}">
<image src="/images/clear.png" class="search-clear" bindtap="clearInputText" />
</block>
</view>
</view>
<!-- 搜门店 -->
<scroll-view wx:if="{{loginUserInfoList.length && selectIndex == 0}}" class="list" scroll-y style="height: calc(100% - 120rpx);">
<block wx:if="{{flag}}"> <block wx:if="{{flag}}">
<block wx:if="{{loginUserInfoList}}">
<block wx:for="{{loginUserInfoList}}" wx:key="index"> <block wx:for="{{loginUserInfoList}}" wx:key="index">
<view class="items {{item.active?'active':''}}" bindtap="chooseAccount" data-index="{{index}}" data-item="{{item}}"> <view class="items {{item.active?'active':''}}" bindtap="chooseAccount" data-index="{{index}}" data-item="{{item}}">
<view class="left"> <view class="left">
...@@ -32,23 +51,39 @@ ...@@ -32,23 +51,39 @@
<view class="text_no">商户号:{{item.merchantId}}</view> <view class="text_no">商户号:{{item.merchantId}}</view>
</view> </view>
</view> </view>
<!-- userType 1商户号 2员工号 loginRole细化员工号角色 3区域督导 4驻店负责人 --> </view>
<!-- <view class="right"> </block>
</block>
<view class="scrollSpase"></view>
</scroll-view >
<!-- 搜客户 -->
<scroll-view wx:elif="{{customStoreList.length && selectIndex == 1}}" class="list" scroll-y style="height: calc(100% - 120rpx);" bindscrolltolower="scrollonReachBottom">
<block wx:for="{{customStoreList}}" wx:key="index">
<view class="items custom_items {{item.active?'active':''}}" bindtap="chooseAccount" data-index="{{index}}" data-item="{{item}}">
<view class="left">
<view class="icon"> <view class="icon">
<image src="/images/active-arc.png" /> <image src="{{IMG_URL}}/user_avatar.png"/>
</view>
<view class="text_box">
<view class="custom_text">
<view>
<text class="custom_name">{{item.customer.customerName}}</text>
<text class="custom_phone">{{item.customer.customerPhone}}</text>
</view>
<view class="status_text status_text_{{item.listStatus}}">{{statusText[item.listStatus]}}</view>
</view>
<view class="name">{{item.merchantName}}</view>
<view class="text_no" wx:if="{{item.merchantId}}">商户号:{{item.merchantId}}</view>
</view>
</view> </view>
<view class='radio' />
</view> -->
</view> </view>
</block> </block>
</block> </scroll-view>
<block wx:else> <block wx:else>
<view class="list-not" style="height: calc(100vh - {{isFullSucreen ? '159' :'125'}}px)" bindtap="getListSelectAccount"> <view class="list_not">
点击刷新 <image class="list_nothing_img {{customSearchFlag ? '' : 'big_list_nothing_img'}}" src="{{IMG_URL}}/{{customSearchFlag ? 'no_data_bg' : 'search_icon_bg'}}.png" mode=""/>
<view class="list_not_text">{{customSearchFlag ? '您搜索的内容暂无结果' : '快去搜索看看'}}</view>
</view> </view>
</block> </block>
</block>
<view class="scrollSpase"></view>
</scroll-view >
</view> </view>
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
color: #1B233D; color: #1B233D;
} }
.search-box .search-input { /* .search-box .search-input {
width: 100%; width: 100%;
height: 72rpx; height: 72rpx;
background: #fff; background: #fff;
...@@ -89,6 +89,174 @@ ...@@ -89,6 +89,174 @@
} }
.search-input .placeholder{ .search-input .placeholder{
color: #C8C9CC; color: #C8C9CC;
} */
.search-box {
width: 100%;
height: 72rpx;
padding-left: 24rpx;
box-sizing: border-box;
margin-bottom: 32rpx;
color: #333;
display: flex;
position: sticky;
top: 0;
left: 0;
z-index: 1009;
box-sizing: border-box;
}
.search-box .select_box{
width: 200rpx;
display: flex;
flex-flow: column;
align-items: center;
justify-content: center;
font-size: 24rpx;
color: #999999;
}
.search-box .select_box .select{
width: 140rpx;
display: flex;
align-items: center;
}
.search-box .select_box .select .select_text{
font-size: 28rpx;
color: #181A1F;
}
.search-box .select_box .select .select_img{
transform: rotate(-90deg);
width: 32rpx;
height: 32rpx;
flex-shrink: 0;
margin-left: 6rpx;
}
.search-box .select_box .select .select_img_rotate{
transform: rotate(90deg);
}
.search-box .select_box .option_box{
position: absolute;
z-index: 200;
top: 100rpx;
left: 32rpx;
width: 194rpx;
box-sizing: border-box;
background: #FFFFFF;
box-shadow: 0 6rpx 12rpx 0 #0000000d;
height: 176rpx;
border-radius: 16rpx;
}
.search-box .select_box .option_box::after{
height: 0;
width: 0;
content: '';
position: absolute;
border: 14rpx solid transparent;
border-right: 14rpx solid #FFFFFF;
top: -24rpx;
left: 88rpx;
z-index: -1;
transform: rotate(90deg);
}
.search-box .select_box .option_box::before{
height: 0;
width: 0;
content: '';
position: absolute;
border: 14rpx solid transparent;
border-right: 14rpx solid #FFFFFF;
top: -24rpx;
left: 88rpx;
z-index: -1;
transform: rotate(90deg);
}
.search-box .select_box .option_box .option{
display: block;
height: 88rpx;
line-height: 88rpx;
text-align: center;
color: #333333;
overflow: hidden;
}
.search-box .select_box .option_box .option:first-child{
border-radius: 16rpx 16rpx 0 0;
}
.search-box .select_box .option_box .option:last-child{
border-radius: 0 0 16rpx 16rpx;
}
.search-box .select_box .option_box .option.active{
background: #347bff1a;
color: #347BFF;
}
.search-box .search-input {
width: 100%;
height: 72rpx;
display: flex;
align-items: center;
background: #FFFFFF;
border-radius: 38rpx;
}
.search-box .search-input .search-icon {
width: 28rpx;
height: 28rpx;
margin: 0 10rpx 0 26rpx;
}
.search-box .search-input .search-clear {
width: 36rpx;
height: 36rpx;
padding: 10rpx;
margin: 0 26rpx 0 10rpx;
}
.search-box .search-input .input {
font-size: 28rpx;
width: calc(100% - 136rpx);
}
.input-placeholder {
color: rgba(200, 201, 204, .89);
}
.search-box .search {
width: 144rpx;
height: 100%;
color: #666;
box-sizing: border-box;
padding: 0 24rpx;
}
.search-box .search .text-center {
font-size: 24rpx;
/* background-color: #f7f7f7; */
border-radius: 12rpx;
width: 100%;
height: 50rpx;
color: #888;
}
.search-box .search .text-center .search-filter {
margin-left: 6rpx;
width: 24rpx;
height: 24rpx;
}
.mask_class{
width: 100vw;
height: 100vh;
background: transparent;
position: fixed;
top: 0;
left: 0;
z-index: 100;
} }
.list .scrollSpase{ .list .scrollSpase{
height: 70rpx; height: 70rpx;
...@@ -98,7 +266,6 @@ ...@@ -98,7 +266,6 @@
} }
.items { .items {
width: 100%; width: 100%;
height: 160rpx;
background: #FFFFFF; background: #FFFFFF;
border-radius: 16rpx; border-radius: 16rpx;
margin-top: 32rpx; margin-top: 32rpx;
...@@ -117,8 +284,10 @@ ...@@ -117,8 +284,10 @@
border: 4rpx solid #347BFF; border: 4rpx solid #347BFF;
box-shadow: 0 4rpx 20rpx 0 #0000001a; box-shadow: 0 4rpx 20rpx 0 #0000001a;
} }
.items .left{ .items .left{
/* width: 65%; */ /* width: 65%; */
width: 100%;
display: flex; display: flex;
align-items: center; align-items: center;
} }
...@@ -126,12 +295,62 @@ ...@@ -126,12 +295,62 @@
width: 96rpx; width: 96rpx;
height: 96rpx; height: 96rpx;
margin-right: 20rpx; margin-right: 20rpx;
flex-shrink: 0;
} }
.items .left .text_box{ .items .left .text_box{
width: calc(100% - 116rpx);
display: flex; display: flex;
flex-flow: column; flex-flow: column;
justify-content: center; justify-content: center;
} }
.items .text_box .custom_text{
display: flex;
align-items: center;
justify-content: space-between;
color: #181A1F;
margin-bottom: 16rpx;
}
.custom_items .text_box .custom_text .custom_name{
font-size: 28rpx;
font-weight: 500;
}
.custom_items .text_box .custom_text .custom_phone{
font-size: 24rpx;
margin-left: 8rpx;
}
.custom_items .text_box .status_text{
width: 76rpx;
height: 36rpx;
flex-shrink: 0;
border-radius: 4rpx;
text-align: center;
line-height: 36rpx;
font-size: 20rpx;
font-weight: 600;
}
/* 待跟进 */
.custom_items .text_box .status_text_0{
background: #FF9D0A10;
color: #FF9D0A;
}
/* 已升级 */
.custom_items .text_box .status_text_1{
background: #347BFF10;
color: #347BFF;
}
/* 战败 */
.custom_items .text_box .status_text_2{
background: #F2472410;
color: #F24724;
}
/* 待支付 */
.custom_items .text_box .status_text_3{
background: #FF9D0A10;
color: #FF9D0A;
}
.items .left .text_box .name{ .items .left .text_box .name{
font-weight: 500; font-weight: 500;
overflow: hidden; overflow: hidden;
...@@ -146,6 +365,14 @@ ...@@ -146,6 +365,14 @@
color: #999EA8; color: #999EA8;
margin-top: 16rpx; margin-top: 16rpx;
} }
.custom_items .left .text_box .name{
font-size: 24rpx;
color: #999EA8;
}
.custom_items .left .text_box .text_no{
margin-top: 0;
}
.items .right{ .items .right{
flex-shrink: 0; flex-shrink: 0;
display: flex; display: flex;
...@@ -203,6 +430,27 @@ ...@@ -203,6 +430,27 @@
background-color: #3582EE; background-color: #3582EE;
border-radius: 16rpx; border-radius: 16rpx;
} }
.list-not{ .list_nothing_img{
font-size: 40rpx; width: 226rpx;
height: 156rpx;
}
.big_list_nothing_img{
width: 258rpx;
height: 258rpx;
}
.list_not {
height: calc(100vh - 264rpx - 88rpx);
width: 100%;
display: flex;
flex-flow: column;
align-items: center;
justify-content: center;
}
.list_not_text{
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: 28rpx;
color: #BEC1C7;
margin-top: 24rpx;
} }
\ No newline at end of file \ No newline at end of file
...@@ -108,7 +108,7 @@ Page({ ...@@ -108,7 +108,7 @@ Page({
} }
return i return i
}) })
this.setData({ sceneList }) this.setData({ sceneList, jumpPageFlag: false })
}, },
/** /**
......
...@@ -367,14 +367,14 @@ Page({ ...@@ -367,14 +367,14 @@ Page({
}) })
}, },
search() { search() {
wx.$refresh = false wx.$refresh = true
let { let {
searchObj, searchObj,
userInfo userInfo
} = this.data } = this.data
let merchantId let merchantId
// 判断是不是超管,不是只能筛选当前4s店的 // 判断是不是超管,不是只能筛选当前4s店的
if (!searchObj.merchantId && !userInfo.isSuper) { if (!searchObj.merchantId && !userInfo?.isSuper) {
merchantId = userInfo?.shopMerchantId merchantId = userInfo?.shopMerchantId
this.setData({ this.setData({
['searchObj.merchantId']: merchantId ['searchObj.merchantId']: merchantId
...@@ -432,7 +432,7 @@ Page({ ...@@ -432,7 +432,7 @@ Page({
} }
}) })
console.log(data.list, 'list') console.log(data.list, 'list')
const userType = !userInfo?.isSuper && userInfo.merchantType && userInfo.userType == 1 const userType = !userInfo?.isSuper && userInfo?.merchantType && (userInfo.userType == 1 || userInfo?.userType == 2)
list = data.list.map(item => { list = data.list.map(item => {
item.repeal = userType && [1, 2].includes(item.inviteStatus) item.repeal = userType && [1, 2].includes(item.inviteStatus)
return item return item
...@@ -496,6 +496,9 @@ Page({ ...@@ -496,6 +496,9 @@ Page({
}, },
onRoute(options) { onRoute(options) {
// console.log('activeIndex', options); // console.log('activeIndex', options);
let { searchObj } = this.data
let userInfo = wx.$util.getUserInfo()
searchObj.merchantId = ''
if ('activeIndex' in options) { if ('activeIndex' in options) {
// let { searchObj } = this.data // let { searchObj } = this.data
// delete searchObj.inviteStatus // delete searchObj.inviteStatus
...@@ -504,7 +507,14 @@ Page({ ...@@ -504,7 +507,14 @@ Page({
// searchObj.inviteStatusList // searchObj.inviteStatusList
}) })
} }
if (wx.$refresh && !options.activeIndex) { this.setData({
userInfo: {
...userInfo,
merchantType: userInfo?.merchantAccountList.includes('6') || userInfo?.merchantAccountList.includes('8')
},
searchObj
})
if (wx.$refresh) {
this.search() this.search()
} }
console.log(options, 'options'); console.log(options, 'options');
......
...@@ -301,7 +301,7 @@ Page({ ...@@ -301,7 +301,7 @@ Page({
init(userInfo) {}, init(userInfo) {},
search() { search() {
wx.$refresh = false wx.$refresh = true
let { searchObj, userInfo } = this.data let { searchObj, userInfo } = this.data
let merchantId let merchantId
// 判断是不是超管,不是只能筛选当前4s店的 // 判断是不是超管,不是只能筛选当前4s店的
...@@ -371,7 +371,7 @@ Page({ ...@@ -371,7 +371,7 @@ Page({
}) })
e.total_price = e.totalPrice e.total_price = e.totalPrice
e.totalPrice = Number(wx.$util.decimal(e.totalPrice, 2)).toFixed(2) e.totalPrice = Number(wx.$util.decimal(e.totalPrice, 2)).toFixed(2)
let orderType = userInfo.userType == 1 && e.status != 9 && e.status != 1 && ![1,3,4].includes(e.selectPayType) let orderType = (userInfo.userType == 1 || userInfo.userType == 2) && e.status != 9 && e.status != 1 && ![1,3,4].includes(e.selectPayType)
// let orderType = userInfo.userType !== 1 && e.status != 9 && e.status != 1 && e.selectPayType != 3 && e.selectPayType != 1 // let orderType = userInfo.userType !== 1 && e.status != 9 && e.status != 1 && e.selectPayType != 3 && e.selectPayType != 1
// console.log(userType); // console.log(userType);
// console.log(orderType); // console.log(orderType);
...@@ -479,6 +479,17 @@ Page({ ...@@ -479,6 +479,17 @@ Page({
// searchObj.inviteStatusList // searchObj.inviteStatusList
}) })
} }
let { searchObj } = this.data
let userInfo = wx.$util.getUserInfo()
searchObj.merchantId = ''
this.setData({
userInfo: {
...userInfo,
merchantType: userInfo?.merchantAccountList.includes('6') || userInfo?.merchantAccountList.includes('8')
},
searchObj
})
if (wx.$refresh) this.search()
// if (wx.$refresh ) { // if (wx.$refresh ) {
// this.search() // this.search()
// // this.getStatByPeriod() // // this.getStatByPeriod()
...@@ -502,7 +513,6 @@ Page({ ...@@ -502,7 +513,6 @@ Page({
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow: function () { onShow: function () {
if (wx.$refresh) this.search()
}, },
/** /**
......
...@@ -375,7 +375,7 @@ Page({ ...@@ -375,7 +375,7 @@ Page({
this.setData({jumpPageFlag: false}) this.setData({jumpPageFlag: false})
} else if (!result?.length) { } else if (!result?.length) {
this.setData({jumpPageFlag: false}) this.setData({jumpPageFlag: false})
return wx.$util.showToast('暂无关联4S店,请联系总部管理员') return wx.$util.showToast('园区店关联的4s店商户账号无效,请联系总部管理员')
} else { } else {
wx.$router.go(pageUrl) wx.$router.go(pageUrl)
this.setData({jumpPageFlag:false}) this.setData({jumpPageFlag:false})
...@@ -402,6 +402,9 @@ Page({ ...@@ -402,6 +402,9 @@ Page({
this.login() this.login()
let noSignInUuid = getNoSignInUuid() let noSignInUuid = getNoSignInUuid()
noSignInUuid&&app.login(true) noSignInUuid&&app.login(true)
this.setData({
jumpPageFlag: false
})
}, },
login() { login() {
wx.$util.showLoading() wx.$util.showLoading()
......
...@@ -207,7 +207,3 @@ page { ...@@ -207,7 +207,3 @@ page {
left: 50%; left: 50%;
transform: translateX(-50%); transform: translateX(-50%);
} }
.auth_box.lear_bottom{
bottom: 418rpx;
}
...@@ -549,6 +549,13 @@ Page({ ...@@ -549,6 +549,13 @@ Page({
onRoute(options) { onRoute(options) {
options && this.checkShowOrderPop(options) options && this.checkShowOrderPop(options)
// options && options.resetStoreList && this.get4SStoreList() // options && options.resetStoreList && this.get4SStoreList()
// 跳转工单/预约详情
// listStatus 0 待跟进 1已升级 2战败 3待支付
if (options?.isGoPage) {
// status 1待跟进(有inviteRecordId跳转预约详情无跳转待跟进工单页面 微信支付跳转工单确认页面)3待支付(跳转工单确认页面)constructionFlag(已施工页面)
let pageName = (options?.status == 1 && options?.pageParams?.id) ? 'tabDate.detail' : (options.status == 3 || (options.status == 1 && options.selectPayType == 1))? 'tabWorkOrder.confirmOrder' : options.constructionFlag == 'Y' && options.status != 10 ? 'tabWorkOrder.constructionOrderDetail' : 'tabWorkOrder.orderDetail'
wx.$router.go(`${pageName}?id=${options?.pageParams?.id}&orderCode=${options?.pageParams?.orderCode}`, {...options?.pageParams})
}
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
......
...@@ -222,6 +222,10 @@ Page({ ...@@ -222,6 +222,10 @@ Page({
this.checkPhoneShow(app.globalData.YQorderSetting?.yqPhoneConfig) this.checkPhoneShow(app.globalData.YQorderSetting?.yqPhoneConfig)
// wx.$util.setWebSocket() // wx.$util.setWebSocket()
setWebSocket() setWebSocket()
if (options.orderCode) {
wx.$util.showLoading('加载中...')
this.getDetail(options.orderCode)
}
}, },
onRoute(options) { onRoute(options) {
if (options.orderCode) { if (options.orderCode) {
......
...@@ -67,7 +67,8 @@ const showToast = val => { ...@@ -67,7 +67,8 @@ const showToast = val => {
let obj = {} let obj = {}
if (val && typeof val === 'string') { if (val && typeof val === 'string') {
obj.title = val obj.title = val
obj.icon = 'none' obj.icon = 'none',
obj.duration = 3000
} else { } else {
obj = val obj = val
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!