Commit 9376f3b7 by 前端

Merge branch 'develop' into 'master'

Develop

See merge request !182
2 parents 33b6c3cf 6dc84173
......@@ -180,5 +180,10 @@ module.exports = {
// 选择4s店和场景
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({
userInfo,
copyStoreList: storeList,
searchValue: '',
edit: false
edit: false,
customStoreList: [],
customSearchFlag: false,
searchSelectIndex: 0
})
}
}
......@@ -59,7 +62,14 @@ Component({
inputFocus: false,
searchValue: '',
copyStoreList: [],
selectedMerchantId: ''
selectedMerchantId: '',
searchSelectData: ['搜门店', '搜客户'],
searchSelectIndex: 0,
showSelect: false,
customStoreList: [],
statusText: ['待跟进', '已升级', '战败', '待支付'],
customSearchFlag: false,
pageNum: 1
},
/**
......@@ -71,6 +81,28 @@ Component({
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() {
if (this.data.disabled) return
this.setData({
......@@ -102,41 +134,93 @@ Component({
type
} = e
this.setData({
edit: false
edit: false,
nothing: false,
pageNum: 1
})
this.setValue(value)
this.searchEvent()
this.searchEvent(true)
},
clearInputText() {
this.setData({
searchValue: '',
edit: false
edit: false,
nothing: false,
pageNum: 1
})
this.searchEvent(true)
},
scrollonReachBottom() {
this.searchEvent()
},
searchEvent() {
let { searchValue, selectedMerchantId } = this.data
searchEvent(isReset = false) {
let { searchValue, selectedMerchantId, searchSelectIndex, pageNum, nothing } = this.data
let userInfo = wx.$util.getUserInfo()
let { storeList } = wx.$util.deepClone(this.data)
if (!searchValue) {
storeList.map(i => {
i.active = false
if (i.merchantId == selectedMerchantId) i.active = true
return i
})
this.setData({
customSearchFlag: false
})
if (searchSelectIndex == 0) { // 搜门店
if (!searchValue) {
storeList.map(i => {
i.active = false
if (i.merchantId == selectedMerchantId) i.active = true
return i
})
this.setData({
copyStoreList: storeList
})
} else {
let arr = []
storeList.map(i => {
i.active = false
if (i.merchantId == selectedMerchantId) i.active = true
if (i.merchantName.indexOf(searchValue) != -1 || i.merchantId == searchValue) {
arr.push(i)
}
})
this.setData({
copyStoreList: arr
})
}
this.setData({
copyStoreList: storeList
customSearchFlag: true
})
} else {
let arr = []
storeList.map(i => {
i.active = false
if (i.merchantId == selectedMerchantId) i.active = true
if (i.merchantName.indexOf(searchValue) != -1 || i.merchantId == searchValue) {
arr.push(i)
} 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({
copyStoreList: arr
this.setData({
customSearchFlag: true
})
})
}
},
......@@ -150,7 +234,7 @@ Component({
const thisPage = wx.$router.getPageInstance()
let { item, selectindex } = e.currentTarget.dataset
if (item.actived) return this.closeMenu()
let { userInfo, storeList, copyStoreList } = this.data
let { userInfo, storeList, copyStoreList, searchSelectIndex } = this.data
copyStoreList?.map((val, index) => {
val.actived = false
if (index == selectindex) val.actived = true
......@@ -162,7 +246,14 @@ Component({
// 精品升级场景 超管切换
if (userInfo?.isSuper && userInfo?.sceneType == 1) {
this.closeMenu()
thisPage.changePicker && thisPage.changePicker(storeList[item.index], item.index)
// 搜客户
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)
}
return
}
// 切换4s店
......@@ -192,6 +283,7 @@ Component({
},
eventCallback(item, sceneType, isSuper) {
const thisPage = wx.$router.getPageInstance()
let { searchSelectIndex } = this.data
let userInfo = wx.$util.getUserInfo()
if (userInfo.merchantAccountList && userInfo.merchantAccountList.length) {
try {
......@@ -278,6 +370,16 @@ Component({
thisPage.initList && thisPage.initList()
// 精品升级首页数据刷新
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 @@
<view class="title_box">
<view class="title">店面列表</view>
</view>
<view class="search_box">
<!-- <view class="search_box">
<view>
<view class="search-input">
<block wx:if="{{ !edit }}">
......@@ -35,8 +35,28 @@
</block>
</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>
<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">
<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>
......@@ -47,6 +67,31 @@
</view>
</block>
</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 catch:tap="goMineCenter" data-index="" class="element mine">
<view class="flex_box">
......
......@@ -23,7 +23,173 @@
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;
display: flex;
align-items: center;
......@@ -70,12 +236,11 @@
.wrapper .search_box .search-input .placeholder{
color: #BEC1C7;
}
} */
.wrapper .element{
position: relative;
padding: 32rpx 0;
padding-left: 32rpx;
padding: 32rpx;
display: flex;
align-items: center;
}
......@@ -83,7 +248,58 @@
display: flex;
flex-flow: column;
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{
font-weight: 500;
font-size: 30rpx;
......@@ -100,6 +316,15 @@
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{
width: 96rpx;
height: 96rpx;
......@@ -145,4 +370,29 @@
border-style: solid;
border-width: 4rpx 4rpx 0 0;
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
......@@ -271,7 +271,7 @@ Page({
this.setShopMerchantObj(obj)
wx.$router.go('pages.sceneIndex')
} else if (!result?.length) {
return wx.$util.showToast('暂无关联4S店,请联系总部管理员')
return wx.$util.showToast('园区店关联的4s店商户账号无效,请联系总部管理员')
} else {
wx.$router.go('pages.merchantList')
}
......@@ -365,6 +365,9 @@ Page({
*/
onShow: function () {
wx.hideHomeButton()
this.setData({
requestFlag: false
})
},
/**
......
......@@ -92,8 +92,7 @@ Page({
}
return i
})
console.log(sceneList, userInfo)
this.setData({ sceneList })
this.setData({ sceneList, jumpPageFlag: false })
},
/**
......
// 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/'
import { getShopSceneConfig } from '~/store/index'
import api from '~/api/api'
import constantData from '../constant/data'
Page({
/**
* 页面的初始数据
......@@ -15,7 +16,13 @@ Page({
shopMerchantName: '',
IMG_URL,
openSceneArr: [],
jumpPageFlag: false
jumpPageFlag: false,
selectData: ['搜门店', '搜客户'],
selectIndex: 0,
customStoreList: [],
statusText: ['待跟进', '已升级', '战败', '待支付'],
customSearchFlag: false,
pageNum: 1,
},
/**
......@@ -31,6 +38,40 @@ Page({
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() {
let userInfo = wx.$util.getUserInfo()
// 超管开通全部场景
......@@ -59,8 +100,8 @@ Page({
})
.catch(err => {})
},
jumpPage() {
let { shopMerchantName, shopMerchantId, openSceneArr } = this.data
jumpPage(item) {
let { shopMerchantName, shopMerchantId, openSceneArr, selectIndex } = this.data
if (!openSceneArr?.length && !wx.$util.getUserInfo()?.isSuper) return wx.$util.showToast('暂无开通业务,请联系总部管理员')
wx.$util.setUserInfo({
...wx.$util.getUserInfo(),
......@@ -79,8 +120,40 @@ Page({
merchantName: shopMerchantName
}
})
wx.$router.go('pages.sceneIndex')
this.setData({jumpPageFlag: false})
if (selectIndex == 0) { // 搜门店
wx.$router.go('pages.sceneIndex')
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) {
if (this.properties.filterEmoji) {
......@@ -110,26 +183,72 @@ Page({
} = e
this.setData({
edit: false,
searchValue: value
searchValue: value,
nothing: false,
pageNum: 1,
customSearchFlag: false
})
this.setValue(value)
this.searchEvent(true)
},
scrollonReachBottom() {
this.searchEvent()
},
// 搜索过滤
searchEvent() {
let { searchValue, copyLoginUserInfoList, shopMerchantId } = this.data
copyLoginUserInfoList.map(val => {
val.active = false
if (val.merchantId == shopMerchantId) val.active = true
return val
})
let filterArr = copyLoginUserInfoList.filter(val => val.merchantName.includes(searchValue) || val.merchantId == searchValue) || []
this.setData({
loginUserInfoList: filterArr
})
if (!searchValue) {
searchEvent(isReset = false) {
let { searchValue, copyLoginUserInfoList, shopMerchantId, selectIndex, pageNum, nothing } = this.data
let userInfo = wx.$util.getUserInfo()
if (selectIndex == 0) { // 搜门店
copyLoginUserInfoList.map(val => {
val.active = false
if (val.merchantId == shopMerchantId) val.active = true
return val
})
let filterArr = copyLoginUserInfoList.filter(val => val.merchantName.includes(searchValue) || val.merchantId == searchValue) || []
this.setData({
loginUserInfoList: filterArr
})
if (!searchValue) {
this.setData({
loginUserInfoList: copyLoginUserInfoList
})
}
this.setData({
loginUserInfoList: copyLoginUserInfoList
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
})
})
}
},
......@@ -137,8 +256,9 @@ Page({
if (this.data.jumpPageFlag) return
this.setData({ jumpPageFlag: true })
let { item } = e.currentTarget.dataset
let { loginUserInfoList } = this.data
loginUserInfoList.map(i => {
let { loginUserInfoList, customStoreList, selectIndex } = this.data
let listArr = selectIndex == 0 ? loginUserInfoList : customStoreList
listArr.map(i => {
i.active = false
if (i.merchantId == item?.merchantId) {
i.active = true
......@@ -146,11 +266,12 @@ Page({
return i
})
this.setData({
loginUserInfoList,
loginUserInfoList: listArr,
customStoreList: listArr,
shopMerchantId: item.merchantId,
shopMerchantName: item.merchantName
})
this.jumpPage()
this.jumpPage(item)
},
/**
......@@ -163,6 +284,7 @@ Page({
*/
onShow: function () {
wx.hideHomeButton()
this.setData({ jumpPageFlag: false })
},
/**
......
<!-- style="padding-bottom:{{isFullSucreen?'224rpx':'160rpx'}}" -->
<view class="layout">
<view class="search-box">
<!-- <view class="search-box">
<view class="search-input">
<block wx:if="{{!edit}}">
<view class="input {{searchValue?'':'placeholder'}}" bindtap="open">
......@@ -17,38 +17,73 @@
<input type="text" class="input" value='{{searchValue}}' focus='{{inputFocus}}' confirm-type="search" bindinput='input' bindblur="inputBlur" bindconfirm="inputConfifm"/>
</block>
</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 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 class="list" scroll-y style="height: calc(100% - {{copyLoginUserInfoList && copyLoginUserInfoList.length >= 10 ? 120 : 50}}rpx);">
<!-- 搜门店 -->
<scroll-view wx:if="{{loginUserInfoList.length && selectIndex == 0}}" class="list" scroll-y style="height: calc(100% - 120rpx);">
<block wx:if="{{flag}}">
<block wx:if="{{loginUserInfoList}}">
<block wx:for="{{loginUserInfoList}}" wx:key="index">
<view class="items {{item.active?'active':''}}" bindtap="chooseAccount" data-index="{{index}}" data-item="{{item}}">
<view class="left">
<view class="icon">
<image src="{{IMG_URL}}/store_icon_bg.png"/>
</view>
<view class="text_box">
<view class="name"></view>{{item.merchantName}}
<view class="text_no">商户号:{{item.merchantId}}</view>
</view>
<block wx:for="{{loginUserInfoList}}" wx:key="index">
<view class="items {{item.active?'active':''}}" bindtap="chooseAccount" data-index="{{index}}" data-item="{{item}}">
<view class="left">
<view class="icon">
<image src="{{IMG_URL}}/store_icon_bg.png"/>
</view>
<!-- userType 1商户号 2员工号 loginRole细化员工号角色 3区域督导 4驻店负责人 -->
<!-- <view class="right">
<view class="icon">
<image src="/images/active-arc.png" />
</view>
<view class='radio' />
</view> -->
</view>
</block>
</block>
<block wx:else>
<view class="list-not" style="height: calc(100vh - {{isFullSucreen ? '159' :'125'}}px)" bindtap="getListSelectAccount">
点击刷新
</view>
</block>
<view class="text_box">
<view class="name"></view>{{item.merchantName}}
<view class="text_no">商户号:{{item.merchantId}}</view>
</view>
</view>
</view>
</block>
</block>
<view class="scrollSpase"></view>
</scroll-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">
<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>
</block>
</scroll-view>
<block wx:else>
<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>
......@@ -66,7 +66,7 @@
color: #1B233D;
}
.search-box .search-input {
/* .search-box .search-input {
width: 100%;
height: 72rpx;
background: #fff;
......@@ -89,6 +89,174 @@
}
.search-input .placeholder{
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{
height: 70rpx;
......@@ -98,7 +266,6 @@
}
.items {
width: 100%;
height: 160rpx;
background: #FFFFFF;
border-radius: 16rpx;
margin-top: 32rpx;
......@@ -117,8 +284,10 @@
border: 4rpx solid #347BFF;
box-shadow: 0 4rpx 20rpx 0 #0000001a;
}
.items .left{
/* width: 65%; */
width: 100%;
display: flex;
align-items: center;
}
......@@ -126,12 +295,62 @@
width: 96rpx;
height: 96rpx;
margin-right: 20rpx;
flex-shrink: 0;
}
.items .left .text_box{
width: calc(100% - 116rpx);
display: flex;
flex-flow: column;
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{
font-weight: 500;
overflow: hidden;
......@@ -146,6 +365,14 @@
color: #999EA8;
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{
flex-shrink: 0;
display: flex;
......@@ -203,6 +430,27 @@
background-color: #3582EE;
border-radius: 16rpx;
}
.list-not{
font-size: 40rpx;
.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
......@@ -108,7 +108,7 @@ Page({
}
return i
})
this.setData({ sceneList })
this.setData({ sceneList, jumpPageFlag: false })
},
/**
......
......@@ -367,14 +367,14 @@ Page({
})
},
search() {
wx.$refresh = false
wx.$refresh = true
let {
searchObj,
userInfo
} = this.data
let merchantId
// 判断是不是超管,不是只能筛选当前4s店的
if (!searchObj.merchantId && !userInfo.isSuper) {
if (!searchObj.merchantId && !userInfo?.isSuper) {
merchantId = userInfo?.shopMerchantId
this.setData({
['searchObj.merchantId']: merchantId
......@@ -432,7 +432,7 @@ Page({
}
})
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 => {
item.repeal = userType && [1, 2].includes(item.inviteStatus)
return item
......@@ -496,6 +496,9 @@ Page({
},
onRoute(options) {
// console.log('activeIndex', options);
let { searchObj } = this.data
let userInfo = wx.$util.getUserInfo()
searchObj.merchantId = ''
if ('activeIndex' in options) {
// let { searchObj } = this.data
// delete searchObj.inviteStatus
......@@ -504,7 +507,14 @@ Page({
// 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()
}
console.log(options, 'options');
......
......@@ -301,7 +301,7 @@ Page({
init(userInfo) {},
search() {
wx.$refresh = false
wx.$refresh = true
let { searchObj, userInfo } = this.data
let merchantId
// 判断是不是超管,不是只能筛选当前4s店的
......@@ -371,7 +371,7 @@ Page({
})
e.total_price = e.totalPrice
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
// console.log(userType);
// console.log(orderType);
......@@ -479,6 +479,17 @@ Page({
// 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 ) {
// this.search()
// // this.getStatByPeriod()
......@@ -502,7 +513,6 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function () {
if (wx.$refresh) this.search()
},
/**
......
......@@ -375,7 +375,7 @@ Page({
this.setData({jumpPageFlag: false})
} else if (!result?.length) {
this.setData({jumpPageFlag: false})
return wx.$util.showToast('暂无关联4S店,请联系总部管理员')
return wx.$util.showToast('园区店关联的4s店商户账号无效,请联系总部管理员')
} else {
wx.$router.go(pageUrl)
this.setData({jumpPageFlag:false})
......@@ -402,6 +402,9 @@ Page({
this.login()
let noSignInUuid = getNoSignInUuid()
noSignInUuid&&app.login(true)
this.setData({
jumpPageFlag: false
})
},
login() {
wx.$util.showLoading()
......
......@@ -207,7 +207,3 @@ page {
left: 50%;
transform: translateX(-50%);
}
.auth_box.lear_bottom{
bottom: 418rpx;
}
......@@ -549,6 +549,13 @@ Page({
onRoute(options) {
options && this.checkShowOrderPop(options)
// 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({
this.checkPhoneShow(app.globalData.YQorderSetting?.yqPhoneConfig)
// wx.$util.setWebSocket()
setWebSocket()
if (options.orderCode) {
wx.$util.showLoading('加载中...')
this.getDetail(options.orderCode)
}
},
onRoute(options) {
if (options.orderCode) {
......
......@@ -67,7 +67,8 @@ const showToast = val => {
let obj = {}
if (val && typeof val === 'string') {
obj.title = val
obj.icon = 'none'
obj.icon = 'none',
obj.duration = 3000
} else {
obj = val
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!