Commit 0c8e71df by 张立顺

门店添加搜索功能

1 parent 9402946e
...@@ -41,6 +41,7 @@ Component({ ...@@ -41,6 +41,7 @@ Component({
} }
}, },
attached() { attached() {
// console.log(wx.$util.isFullSucreen(), 'wx.$util.isFullSucreen()')
this.setData({ this.setData({
isFullSucreen: wx.$util.isFullSucreen() isFullSucreen: wx.$util.isFullSucreen()
}) })
......
<view class="popup" hidden="{{!showPopup}}" catchtouchmove="noScroll"> <view class="popup" hidden="{{ !showPopup }}" catchtouchmove="noScroll">
<view class="popup-bg" bindtap="hidePopup"></view> <view class="popup-bg" bindtap="hidePopup"></view>
<view class="popup-content" style="height:{{height}}"> <view class="popup-content" style="height:{{ height }}">
<block wx:if="{{title}}"> <block wx:if="{{ title }}">
<view class="popup-title text-center">{{title}}</view> <view class="popup-title text-center">{{title}}</view>
</block> </block>
<view class="popup-slot {{isFullSucreen?title?'isFullSucreen':'isFullSucreen-notitle':''}}"> <view class="popup-slot {{ isFullSucreen?title?'isFullSucreen':'isFullSucreen-notitle':'' }}">
<slot></slot> <slot></slot>
</view> </view>
<view class="popup-footer {{isFullSucreen?'isFullSucreen':''}}"> <view class="popup-footer {{ isFullSucreen?'isFullSucreen':'' }}">
<view class="cancel btn text-center" bindtap="hidePopup">取消</view> <view class="cancel btn text-center" bindtap="hidePopup">取消</view>
<view class="confirm btn text-center" bindtap="confirm">确认</view> <view class="confirm btn text-center" bindtap="confirm">确认</view>
</view> </view>
......
...@@ -42,23 +42,28 @@ ...@@ -42,23 +42,28 @@
} }
.popup-slot { .popup-slot {
height: calc(100% - 200rpx); height: calc(100% - 100rpx);
} }
.popup-slot.isFullSucreen{
.popup-slot.isFullSucreen {
height: calc(100% - 268rpx); height: calc(100% - 268rpx);
} }
.popup-slot.isFullSucreen-notitle{
.popup-slot.isFullSucreen-notitle {
height: calc(100% - 170rpx); height: calc(100% - 170rpx);
} }
.popup-footer { .popup-footer {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
padding:10rpx 0 ; padding: 10rpx 0;
} }
.popup-footer.isFullSucreen{
.popup-footer.isFullSucreen {
padding-bottom: 68rpx !important; padding-bottom: 68rpx !important;
} }
.popup-footer .btn { .popup-footer .btn {
width: 330rpx; width: 330rpx;
height: 80rpx; height: 80rpx;
...@@ -71,10 +76,12 @@ ...@@ -71,10 +76,12 @@
color: #323233; color: #323233;
border: 2rpx solid #DCDEE0; border: 2rpx solid #DCDEE0;
} }
.popup-footer .confirm{
.popup-footer .confirm {
background: #3582EE; background: #3582EE;
color: #fff; color: #fff;
} }
@keyframes show-popup { @keyframes show-popup {
0% { 0% {
bottom: -100%; bottom: -100%;
......
...@@ -8,29 +8,30 @@ Component({ ...@@ -8,29 +8,30 @@ Component({
* 组件的属性列表 * 组件的属性列表
*/ */
properties: { properties: {
items: { subIndex: {
type: Array, type: Number,
value: [], // value: [],
observer: function (n) { observer: function (n) {
if (n) { this.setData({
let userInfo = wx.$util.getUserInfo() selectStoreIndex: [n]
let defaultSelectStoreIndex = n?.findIndex(v => {return v.merchantId == userInfo?.default4SStoreInfo?.merchantId}) > -1 ? n?.findIndex(v => {return v.merchantId == userInfo?.default4SStoreInfo?.merchantId}) : 0 })
this.setData({defaultSelectStoreIndex: [defaultSelectStoreIndex], selectStoreIndex: defaultSelectStoreIndex})
}
} }
}, },
pickList: {
type: Array,
value: []
},
show: { show: {
type: Boolean, type: Boolean
} }
}, },
/** /**
* 组件的初始数据 * 组件的初始数据
*/ */
data: { data: {
searchValue:'', searchValue: '',
selectStoreIndex:'', selectStoreIndex: '',
edit: false, edit: false
defaultSelectStoreIndex: []
}, },
/** /**
* 组件的方法列表 * 组件的方法列表
...@@ -52,9 +53,7 @@ Component({ ...@@ -52,9 +53,7 @@ Component({
}) })
}, },
input(e) { input(e) {
let { let { value } = e.detail
value
} = e.detail
this.setValue(value) this.setValue(value)
this.triggerEvent('input', { this.triggerEvent('input', {
value value
...@@ -68,9 +67,7 @@ Component({ ...@@ -68,9 +67,7 @@ Component({
}, },
emit(e) { emit(e) {
let { let {
detail:{ detail: { value },
value
},
type type
} = e } = e
this.setData({ this.setData({
...@@ -78,22 +75,28 @@ Component({ ...@@ -78,22 +75,28 @@ Component({
}) })
this.setValue(value) this.setValue(value)
console.log('123') console.log('123')
this.triggerEvent(type == 'confirm' ? 'search' : 'blur', {value}) this.triggerEvent(type == 'confirm' ? 'search' : 'blur', { value })
}, },
confirm() { confirm() {
let {selectStoreIndex, items } = this.data let { selectStoreIndex, pickList } = this.data
if (!items.length) { let value = selectStoreIndex[0]
console.log(value)
console.log(pickList)
if (!pickList[value]?.merchantName) {
return wx.$util.showToast('请选择门店') return wx.$util.showToast('请选择门店')
} }
this.triggerEvent('confirm', selectStoreIndex) // console.log(value)
this.triggerEvent('confirm', { value })
this.triggerEvent('search', { value })
this.setData({ this.setData({
show: false show: false
}) })
}, },
changeStore(e) { changeStore(e) {
// console.log(e.detail.value[0])
this.setData({ this.setData({
selectStoreIndex: e.detail.value[0] selectStoreIndex: [e.detail.value[0]]
}) })
} }
} }
}) })
<!--packageEquity/components/storePicker/storePicker.wxml--> <!--packageEquity/components/storePicker/storePicker.wxml-->
<popup class="date-background" show="{{show}}" bindconfirm="confirm" height="800rpx"> <popup class="date-background" show="{{ show }}" bindconfirm="confirm" height="800rpx">
<view class='date-container'> <view class="date-container">
<view class='date-confirm'> <view class="date-confirm">
<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">
<block wx:if="{{searchValue}}"> <block wx:if="{{ searchValue }}">{{searchValue}}</block>
{{searchValue}}
</block>
<block wx:else> <block wx:else>
<image src="../../../images/search.png" class="icon"></image> <image src="/images/search.png" class="icon"></image>
{{'请输入门店'}} {{'请输入门店'}}
</block> </block>
</view> </view>
</block> </block>
<block wx:else> <block wx:else>
<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>
</view> </view>
<view class="picker-box"> <view class="picker-box">
<picker-view class="picker" value="{{defaultSelectStoreIndex}}" immediate-change="true" indicator-class="indicator" bindchange="changeStore"> <picker-view
class="picker"
value="{{ selectStoreIndex }}"
immediate-change="true"
indicator-class="indicator"
bindchange="changeStore"
>
<picker-view-column> <picker-view-column>
<block wx:for="{{items}}" wx:key="merchantId"> <block wx:for="{{ pickList }}" wx:key="merchantId">
<view class="view pickViewColumn">{{item.merchantName}}</view> <view class="view pickViewColumn">{{item.merchantName}}</view>
</block> </block>
</picker-view-column> </picker-view-column>
......
...@@ -61,7 +61,7 @@ page { ...@@ -61,7 +61,7 @@ page {
} }
.login-btn { .login-btn {
margin: 140rpx 0 28rpx; margin: 130rpx 0 28rpx;
background-image: linear-gradient(125deg, #65B8F8 0%, #3582EE 100%); background-image: linear-gradient(125deg, #65B8F8 0%, #3582EE 100%);
border-radius: 12rpx; border-radius: 12rpx;
text-align: center; text-align: center;
......
...@@ -35,16 +35,18 @@ export const getYQInfo = userInfo => { ...@@ -35,16 +35,18 @@ export const getYQInfo = userInfo => {
// 判断是否是多账号用户 // 判断是否是多账号用户
let subIndex = 0 let subIndex = 0
console.log(!userInfo.isSuper && userInfo.merchantType && userInfo.userType == 2); // console.log(!userInfo.isSuper && userInfo.merchantType && userInfo.userType == 2);
console.log(userInfo.merchantId,'userInfo.merchantId'); // console.log(userInfo.merchantId,'userInfo.merchantId');
if (!userInfo.loginRole || userInfo.loginRole ==4 ) { if (!userInfo.loginRole || userInfo.loginRole == 4) {
// console.log(userInfo.merchantId,'userInfo.merchantId'); // console.log(userInfo.merchantId,'userInfo.merchantId');
app.globalData.yqdInfo = { app.globalData.yqdInfo = {
subIndex, subIndex,
merchantRange: [{ merchantRange: [
{
merchantName: userInfo.merchantName, merchantName: userInfo.merchantName,
merchantId: userInfo.merchantId merchantId: userInfo.merchantId
}] }
]
} }
// this.setData({ // this.setData({
// merchantRange: [{ merchantName: userInfo.merchantName }] // merchantRange: [{ merchantName: userInfo.merchantName }]
...@@ -59,10 +61,7 @@ export const getYQInfo = userInfo => { ...@@ -59,10 +61,7 @@ export const getYQInfo = userInfo => {
.getYQList() .getYQList()
.then(res => { .then(res => {
// console.log(res) // console.log(res)
let { let { code, data } = res
code,
data
} = res
if (code == 0) { if (code == 0) {
let arr = [] let arr = []
if (data.length > 1) { if (data.length > 1) {
...@@ -73,10 +72,12 @@ export const getYQInfo = userInfo => { ...@@ -73,10 +72,12 @@ export const getYQInfo = userInfo => {
} }
arr = [all, ...data] arr = [all, ...data]
} else { } else {
arr = [{ arr = [
{
merchantName: userInfo.merchantName, merchantName: userInfo.merchantName,
merchantId: userInfo.merchantId merchantId: userInfo.merchantId
}] }
]
} }
app.globalData.yqdInfo = { app.globalData.yqdInfo = {
merchantRange: arr, merchantRange: arr,
...@@ -102,10 +103,7 @@ export const getYQorderInfo = () => { ...@@ -102,10 +103,7 @@ export const getYQorderInfo = () => {
} else { } else {
let userInfo = wx.$util.getUserInfo() let userInfo = wx.$util.getUserInfo()
if (!userInfo) this.login(true) if (!userInfo) this.login(true)
let { let { merchantId, merchantName } = userInfo.subLoginUser
merchantId,
merchantName
} = userInfo.subLoginUser
api api
.getMerchantRecordingSettings({ .getMerchantRecordingSettings({
...@@ -114,10 +112,7 @@ export const getYQorderInfo = () => { ...@@ -114,10 +112,7 @@ export const getYQorderInfo = () => {
}) })
.then(res => { .then(res => {
// console.log(res) // console.log(res)
let { let { code, data } = res
code,
data
} = res
if (code == 0) { if (code == 0) {
// debugger // debugger
// console.log(typeof data.yqPhoneConfig, 'data.yqPhoneConfig') // console.log(typeof data.yqPhoneConfig, 'data.yqPhoneConfig')
...@@ -144,9 +139,7 @@ export const setConfigInfo = globalData => { ...@@ -144,9 +139,7 @@ export const setConfigInfo = globalData => {
// 如果有 直接返回 // 如果有 直接返回
// console.log(app.globalData.YQorderSetting, 'app.globalData.YQorderSetting') // console.log(app.globalData.YQorderSetting, 'app.globalData.YQorderSetting')
// console.log('app.globalData.YQorderSetting', app.globalData.YQorderSetting) // console.log('app.globalData.YQorderSetting', app.globalData.YQorderSetting)
let { let { configInfo } = globalData
configInfo
} = globalData
if (configInfo) { if (configInfo) {
return resolve(configInfo) return resolve(configInfo)
} else { } else {
...@@ -175,9 +168,7 @@ export const setConfigInfo = globalData => { ...@@ -175,9 +168,7 @@ export const setConfigInfo = globalData => {
export const checkScene = options => { export const checkScene = options => {
// let query = options.query // let query = options.query
let { let { query } = options
query
} = options
if (query) { if (query) {
// 解码 // 解码
for (const key in query) { for (const key in query) {
...@@ -259,17 +250,14 @@ export const setWebSocket = () => { ...@@ -259,17 +250,14 @@ export const setWebSocket = () => {
/** 获取园区店下的4S店 */ /** 获取园区店下的4S店 */
export const get4SStoreList = options => { export const get4SStoreList = options => {
console.log(options,'options'); console.log(options, 'options')
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
const app = getApp() const app = getApp()
api api
.getSceneMerchantRefStoreList(options) .getSceneMerchantRefStoreList(options)
.then(res => { .then(res => {
let { let { code, data } = res
code,
data
} = res
if (code == 0) { if (code == 0) {
app.globalData.storeListRange = data app.globalData.storeListRange = data
let default4SStoreInfo = wx.$util.getUserInfo()?.default4SStoreInfo ? wx.$util.getUserInfo()?.default4SStoreInfo : data && data[0] let default4SStoreInfo = wx.$util.getUserInfo()?.default4SStoreInfo ? wx.$util.getUserInfo()?.default4SStoreInfo : data && data[0]
...@@ -282,7 +270,8 @@ export const get4SStoreList = options => { ...@@ -282,7 +270,8 @@ export const get4SStoreList = options => {
default4SStoreInfo: default4SStoreInfo default4SStoreInfo: default4SStoreInfo
}) })
if (options.scene == 3 || options.scene == 2) if (options.scene == 3 || options.scene == 2)
if (options.isSubcehicle) { // 是否是次新车转化业务场景(商户关联关系与众筹一样) if (options.isSubcehicle) {
// 是否是次新车转化业务场景(商户关联关系与众筹一样)
wx.$util.setUserInfo({ wx.$util.setUserInfo({
...wx.$util.getUserInfo(), ...wx.$util.getUserInfo(),
default4SStoreInfo_newCarConversion: default4SStoreInfo_newCarConversion default4SStoreInfo_newCarConversion: default4SStoreInfo_newCarConversion
...@@ -308,10 +297,7 @@ export const getStaffListByMerchant = options => { ...@@ -308,10 +297,7 @@ export const getStaffListByMerchant = options => {
api api
.getStaffListByMerchantAPI(options) .getStaffListByMerchantAPI(options)
.then(res => { .then(res => {
let { let { code, data } = res
code,
data
} = res
if (code == 0) { if (code == 0) {
app.globalData.staffListRange = data app.globalData.staffListRange = data
resolve(app.globalData.staffListRange) resolve(app.globalData.staffListRange)
......
...@@ -25,9 +25,13 @@ Page({ ...@@ -25,9 +25,13 @@ Page({
flag: true, flag: true,
dateObj: { dateObj: {
beginDateStr: '' beginDateStr: ''
} },
showPicker: false
// showPicker: true
}, },
showStorePicker() { showStorePicker() {
let { merchantRange } = this.data
merchantRange.length > 1 &&
this.setData({ this.setData({
showPicker: true showPicker: true
}) })
...@@ -124,7 +128,24 @@ Page({ ...@@ -124,7 +128,24 @@ Page({
moveArrow: !this.data.moveArrow moveArrow: !this.data.moveArrow
}) })
}, },
getStoreList(e) {
console.log(e)
let { value } = e.detail
getYQInfo(this.data.userInfo)
.then(result => {
// console.log(result)
let { merchantRange } = result
if (value) {
merchantRange = merchantRange.filter(item => item.merchantName.includes(value))
}
this.setData({
merchantRange
})
})
.catch(err => {})
},
changePicker(e) { changePicker(e) {
console.log(e)
let { value } = e.detail let { value } = e.detail
let { merchantId } = this.data.merchantRange[value] let { merchantId } = this.data.merchantRange[value]
// 修改对应下标显示 // 修改对应下标显示
...@@ -147,7 +168,7 @@ Page({ ...@@ -147,7 +168,7 @@ Page({
this.tapPicker() this.tapPicker()
}, },
jump(e) { jump(e) {
let { item, type, } = e.currentTarget.dataset let { item, type } = e.currentTarget.dataset
let { userInfo } = this.data let { userInfo } = this.data
// 判断是不是门店员工 // 判断是不是门店员工
if (userInfo.merchantType && !userInfo.isSuper && type == 2) { if (userInfo.merchantType && !userInfo.isSuper && type == 2) {
...@@ -399,7 +420,7 @@ Page({ ...@@ -399,7 +420,7 @@ Page({
}, },
getOutputValue(yqdInfo) { getOutputValue(yqdInfo) {
let { dateObj, userInfo } = this.data let { dateObj, userInfo } = this.data
console.log(yqdInfo, 'yqdInfo') // console.log(yqdInfo, 'yqdInfo')
let { subIndex, merchantRange } = yqdInfo let { subIndex, merchantRange } = yqdInfo
// yqMerchantId 不是全部就必要要带过去 // yqMerchantId 不是全部就必要要带过去
// 1-超管 2-商户管理员 3-区域督导 4-驻店人员 // 1-超管 2-商户管理员 3-区域督导 4-驻店人员
......
...@@ -5,6 +5,6 @@ ...@@ -5,6 +5,6 @@
"side-select-popup": "/components/SideSelectPopup/SideSelectPopup", "side-select-popup": "/components/SideSelectPopup/SideSelectPopup",
"CalendarMonthSingle": "/components/CalendarMonthSingle/CalendarMonth", "CalendarMonthSingle": "/components/CalendarMonthSingle/CalendarMonth",
"van-progress": "@vant/weapp/progress/index", "van-progress": "@vant/weapp/progress/index",
"store-picker": "../../components/storePicker/storePicker" "store-picker": "/components/storePicker/storePicker"
} }
} }
...@@ -27,7 +27,8 @@ ...@@ -27,7 +27,8 @@
</view> </view>
</view> </view>
</view> </view>
<block wx:if="{{!userInfo.isSuper && userInfo.merchantType}}"> <!-- wx:if="{{!userInfo.isSuper && userInfo.merchantType}}" -->
<block >
<view class="set-box " bindtap="showWork"> <view class="set-box " bindtap="showWork">
<view class="label"> <view class="label">
<image src="../../images/set.png" /> <image src="../../images/set.png" />
......
...@@ -17,19 +17,19 @@ Page({ ...@@ -17,19 +17,19 @@ Page({
name: '营业概况', name: '营业概况',
active: true, active: true,
componentsName: 'businessCell', componentsName: 'businessCell',
recordId:12 recordId: 12
}, },
{ {
name: '员工业绩', name: '员工业绩',
active: false, active: false,
componentsName: 'staffCell', componentsName: 'staffCell',
recordId:13 recordId: 13
}, },
{ {
name: '今日战果', name: '今日战果',
active: false, active: false,
componentsName: 'conquestCell', componentsName: 'conquestCell',
recordId:14 recordId: 14
} }
], ],
dateObj: { dateObj: {
...@@ -43,10 +43,34 @@ Page({ ...@@ -43,10 +43,34 @@ Page({
totalOrderMoney: 0, totalOrderMoney: 0,
totalAdd: 0 totalAdd: 0
}, },
refresh: false refresh: false,
showPicker: false
}, },
// 混入跳转方法 // 混入跳转方法
...mixins.methods, ...mixins.methods,
showStorePicker() {
let { merchantRange } = this.data
merchantRange.length > 1 &&
this.setData({
showPicker: true
})
},
getStoreList(e) {
console.log(e)
let { value } = e.detail
getYQInfo(this.data.userInfo)
.then(result => {
// console.log(result)
let { merchantRange } = result
if (value) {
merchantRange = merchantRange.filter(item => item.merchantName.includes(value))
}
this.setData({
merchantRange
})
})
.catch(err => {})
},
changePicker(e) { changePicker(e) {
console.log('changePicker') console.log('changePicker')
let { value } = e.detail let { value } = e.detail
...@@ -192,7 +216,7 @@ Page({ ...@@ -192,7 +216,7 @@ Page({
} else { } else {
this.setTimeList(dateObj.nextDay) this.setTimeList(dateObj.nextDay)
} }
wx.$util.pointRecord(type == 'before'?16:17) wx.$util.pointRecord(type == 'before' ? 16 : 17)
this.calendar.resetData(type == 'before' ? dateObj.beforeDay : dateObj.nextDay) this.calendar.resetData(type == 'before' ? dateObj.beforeDay : dateObj.nextDay)
}, },
// 获取选中天数 // 获取选中天数
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
"businessCell": "./components/businessCell/businessCell", "businessCell": "./components/businessCell/businessCell",
"staffCell": "./components/staffCell/staffCell", "staffCell": "./components/staffCell/staffCell",
"conquestCell": "./components/conquestCell/conquestCell", "conquestCell": "./components/conquestCell/conquestCell",
"tipsPopup": "/components/tipsPopup/Popup" "tipsPopup": "/components/tipsPopup/Popup",
"store-picker": "/components/storePicker/storePicker"
} }
} }
...@@ -3,20 +3,19 @@ ...@@ -3,20 +3,19 @@
<wxs src="../index.wxs" module="filter" /> <wxs src="../index.wxs" module="filter" />
<!-- <view class="" style="height:{{statusBarHeight}}px" /> --> <!-- <view class="" style="height:{{statusBarHeight}}px" /> -->
<!-- 自定义的导航栏 --> <!-- 自定义的导航栏 -->
<view class="layout {{flag?'opacity':''}}"> <view class="layout {{ flag?'opacity':'' }}">
<navigation-bar bindback="jump" bindnavbarReady="navbarReady" showBack="{{true}}"> <navigation-bar bindback="jump" bindnavbarReady="navbarReady" showBack="{{ true }}">
<picker range="{{merchantRange}}" value="{{subIndex}}" range-key="merchantName" bindchange="changePicker" bindtap="tapPicker" bindcancel="tapPicker" disabled="{{merchantRange.length < 2}}"> <!-- <picker range="{{merchantRange}}" value="{{subIndex}}" range-key="merchantName" bindchange="changePicker" bindtap="tapPicker" bindcancel="tapPicker" disabled="{{merchantRange.length < 2}}"> -->
<view class="navigation-title"> <view class="navigation-title" bindtap="showStorePicker">
<view class="navigation-title-text text-hide"> <view class="navigation-title-text text-hide">{{merchantRange[subIndex].merchantName}}</view>
{{merchantRange[subIndex].merchantName}} <!-- {{moveArrow?'move':''}} -->
</view> <view class="arrow" wx:if="{{ merchantRange.length > 1 }}">
<view class="arrow {{moveArrow?'move':''}}" wx:if="{{merchantRange.length > 1}}">
<image src="/images/arrow-bottom.png" /> <image src="/images/arrow-bottom.png" />
</view> </view>
</view> </view>
</picker> <!-- </picker> -->
</navigation-bar> </navigation-bar>
<view class="headerContainer" style="margin-top:{{statusBarHeight}}px"> <view class="headerContainer" style="margin-top:{{ statusBarHeight }}px">
<view class="businessDataContainer"> <view class="businessDataContainer">
<view class="turnover"> <view class="turnover">
<view class="num">¥{{filter.toDecimal2(todayData.totalOrderMoney)}}</view> <view class="num">¥{{filter.toDecimal2(todayData.totalOrderMoney)}}</view>
...@@ -30,15 +29,15 @@ ...@@ -30,15 +29,15 @@
</view> </view>
<view class="menu"> <view class="menu">
<!-- wx:for-index="index" --> <!-- wx:for-index="index" -->
<block wx:for="{{menu}}" wx:key="index"> <block wx:for="{{ menu }}" wx:key="index">
<view class="item" bindtap="menuJump" data-item="{{item}}" data-index="{{index}}"> <view class="item" bindtap="menuJump" data-item="{{ item }}" data-index="{{ index }}">
<image src="../../images/navIcon{{index}}.png" /> <image src="../../images/navIcon{{ index }}.png" />
{{item.name}} {{item.name}}
</view> </view>
</block> </block>
</view> </view>
</view> </view>
<view class="Container" style="margin-bottom: {{!activeTab?showTips?bottomLift+41:bottomLift :bottomLift }}px"> <view class="Container" style="margin-bottom: {{ !activeTab?showTips?bottomLift+41:bottomLift :bottomLift }}px">
<!-- <van-calendar show /> + 41 style="padding-bottom: {{ bottomLift + 41}}px" --> <!-- <van-calendar show /> + 41 style="padding-bottom: {{ bottomLift + 41}}px" -->
<view class="dateContainer"> <view class="dateContainer">
<view class="date"> <view class="date">
...@@ -49,7 +48,20 @@ ...@@ -49,7 +48,20 @@
前一天 前一天
</view> </view>
<!-- forceFullSucreen="{{bottomLift>0?true:false}}" --> <!-- forceFullSucreen="{{bottomLift>0?true:false}}" -->
<calendar id="calender" class="calendar" allowSameDay shortcut bindselect='rangeSelect' rangeAll dateType='single' calenderColor='#3582EE' vertical minDate="2020-10-01" maxDate="{{dateObj.maxDate}}" isComponents> <calendar
id="calender"
class="calendar"
allowSameDay
shortcut
bindselect="rangeSelect"
rangeAll
dateType="single"
calenderColor="#3582EE"
vertical
minDate="2020-10-01"
maxDate="{{ dateObj.maxDate }}"
isComponents
>
<!-- dataDateStr="{{dateObj.todayShow}}" --> <!-- dataDateStr="{{dateObj.todayShow}}" -->
<view class="item text-center dateNum"> <view class="item text-center dateNum">
{{dateObj.todayShow}} {{dateObj.todayShow}}
...@@ -57,7 +69,7 @@ ...@@ -57,7 +69,7 @@
</view> </view>
</calendar> </calendar>
<!-- --> <!-- -->
<view class="nextDay item {{dateObj.maxDate==dateObj.today?'hidden':''}}" data-type="next" bindtap="dateChange"> <view class="nextDay item {{ dateObj.maxDate==dateObj.today?'hidden':'' }}" data-type="next" bindtap="dateChange">
后一天 后一天
<image class="arrow" src="../../images/rightArrow.png" mode="" binderror="" bindload="" /> <image class="arrow" src="../../images/rightArrow.png" mode="" binderror="" bindload="" />
</view> </view>
...@@ -65,17 +77,27 @@ ...@@ -65,17 +77,27 @@
</view> </view>
<view class="cellTab"> <view class="cellTab">
<view class="tabContainer"> <view class="tabContainer">
<view bindtap="changeTabIndex" data-index="{{index}}" class="tabItem {{item.active?'active':''}}" wx:for="{{tabList}}" wx:key="index"> <view
{{item.name}} bindtap="changeTabIndex"
</view> data-index="{{ index }}"
class="tabItem {{ item.active?'active':'' }}"
wx:for="{{ tabList }}"
wx:key="index"
>{{item.name}}</view>
</view> </view>
</view> </view>
<!-- wx:if="{{activeTab==0}}" wx:if="{{activeTab==1}}" wx:if="{{activeTab==2}}" --> <!-- wx:if="{{activeTab==0}}" wx:if="{{activeTab==1}}" wx:if="{{activeTab==2}}" -->
<!-- hidden="{{activeTab!=0}}" hidden="{{activeTab!=0}}" --> <!-- hidden="{{activeTab!=0}}" hidden="{{activeTab!=0}}" -->
<view class="componentContainer"> <view class="componentContainer">
<businessCell id="businessCell" wx:if="{{activeTab==0}}" canRemark="{{canRemark}}" today="{{dateObj.maxDate}}" dataDateStr="{{dateObj.today}}" /> <businessCell
<staffCell id="staffCell" wx:if="{{activeTab==1}}" dataDateStr="{{dateObj.today}}" /> id="businessCell"
<conquestCell id="conquestCell" wx:if="{{activeTab==2}}" date="{{dateObj.today}}" /> wx:if="{{ activeTab==0 }}"
canRemark="{{ canRemark }}"
today="{{ dateObj.maxDate }}"
dataDateStr="{{ dateObj.today }}"
/>
<staffCell id="staffCell" wx:if="{{ activeTab==1 }}" dataDateStr="{{ dateObj.today }}" />
<conquestCell id="conquestCell" wx:if="{{ activeTab==2 }}" date="{{ dateObj.today }}" />
</view> </view>
<!-- <scroll-view class="scrollStyle" scroll-y> --> <!-- <scroll-view class="scrollStyle" scroll-y> -->
<!-- </scroll-view> --> <!-- </scroll-view> -->
...@@ -94,17 +116,27 @@ ...@@ -94,17 +116,27 @@
<conquestCell/> <conquestCell/>
</template> --> </template> -->
</view> </view>
<view wx:if="{{!activeTab&& showTips}}" class="btn-box" style="padding-bottom: {{ bottomLift}}px"> <view wx:if="{{ !activeTab&& showTips }}" class="btn-box" style="padding-bottom: {{ bottomLift }}px">
<view class="tips"> <view class="tips">
<image class=" tipsIcon" src="../../../images/tips.png" /> <image class="tipsIcon" src="../../../images/tips.png" />
<view class="contentText">如数据存在不准确,可点击核准数据修改当日数据量。</view> <view class="contentText">如数据存在不准确,可点击核准数据修改当日数据量。</view>
<image class="closeIcon" bindtap="closeTips" src="../../images/closeIcon.png" /> <image class="closeIcon" bindtap="closeTips" src="../../images/closeIcon.png" />
</view> </view>
</view> </view>
</view> </view>
<!-- isFormComponent="{{true}}" bind:closePop="closePop" --> <!-- isFormComponent="{{true}}" bind:closePop="closePop" -->
<remark-popup wx:if="{{showRemark}}" show="{{showRemark}}" isLimitNum="{{remarkObj.type== 'add'?false:true}}" title="{{remarkObj.title}}" btnName="{{'确认'}}" bind:confirm="remarkConfirm" placeholder="{{remarkObj.placeholder}}" maxlength="10" value="{{remarkObj.type== 'add'?'':remarkObj.remarkValue}}" /> <remark-popup
<tipsPopup title="字段解释" show="{{businessTipsShow}}" bindconfirm="confirm" class="tipsShow" height="460px"> wx:if="{{ showRemark }}"
show="{{ showRemark }}"
isLimitNum="{{ remarkObj.type== 'add'?false:true }}"
title="{{ remarkObj.title }}"
btnName="{{ '确认' }}"
bind:confirm="remarkConfirm"
placeholder="{{ remarkObj.placeholder }}"
maxlength="10"
value="{{ remarkObj.type== 'add'?'':remarkObj.remarkValue }}"
/>
<tipsPopup title="字段解释" show="{{ businessTipsShow }}" bindconfirm="confirm" class="tipsShow" height="460px">
<view class="item">今日贴膜台次:当日进店贴膜且下单的车辆台次</view> <view class="item">今日贴膜台次:当日进店贴膜且下单的车辆台次</view>
<view class="item">今日升级太阳膜台次: 当日进店贴膜且下升级工单的车辆台次</view> <view class="item">今日升级太阳膜台次: 当日进店贴膜且下升级工单的车辆台次</view>
<view class="item">今日贴膜升级率: 当日升级工单量与贴膜工单量的比值</view> <view class="item">今日贴膜升级率: 当日升级工单量与贴膜工单量的比值</view>
...@@ -113,10 +145,17 @@ ...@@ -113,10 +145,17 @@
<view class="item">累计剩余未到店贴膜台次: 累计已发券未核销的客户数量</view> <view class="item">累计剩余未到店贴膜台次: 累计已发券未核销的客户数量</view>
<view class="item">其他产品总营业额: 除贴膜产品收入总和外,本店当日其他类型产品的收入总和</view> <view class="item">其他产品总营业额: 除贴膜产品收入总和外,本店当日其他类型产品的收入总和</view>
</tipsPopup> </tipsPopup>
<tipsPopup title="字段解释" show="{{staffTipsShow}}" bindconfirm="confirm" class="tipsShow" height="290px"> <tipsPopup title="字段解释" show="{{ staffTipsShow }}" bindconfirm="confirm" class="tipsShow" height="290px">
<view class="item">今日接车数量:当日该员工服务进店贴膜客户且下单的车辆台次</view> <view class="item">今日接车数量:当日该员工服务进店贴膜客户且下单的车辆台次</view>
<view class="item">贴膜升级率:当日该员工的贴膜升级率</view> <view class="item">贴膜升级率:当日该员工的贴膜升级率</view>
<view class="item">均客单价:当日该员工创造的贴膜收入总和的均值</view> <view class="item">均客单价:当日该员工创造的贴膜收入总和的均值</view>
<view class="item">累计业绩:该员工累计创造的营收数据(累计接车数量/累计总贴膜升级率/累计均客单价)</view> <view class="item">累计业绩:该员工累计创造的营收数据(累计接车数量/累计总贴膜升级率/累计均客单价)</view>
</tipsPopup> </tipsPopup>
<store-picker
subIndex="{{ subIndex }}"
pickList="{{ merchantRange }}"
show="{{ showPicker }}"
bindsearch="getStoreList"
bindconfirm="changePicker"
/>
<!-- bind:close="onClose" bind:confirm="onConfirm" --> <!-- bind:close="onClose" bind:confirm="onConfirm" -->
\ No newline at end of file \ No newline at end of file
...@@ -44,9 +44,32 @@ Page({ ...@@ -44,9 +44,32 @@ Page({
pages: 1, pages: 1,
dateObj: { dateObj: {
beginDateStr: '' beginDateStr: ''
},
showPicker: false
},
showStorePicker() {
let { merchantRange } = this.data
merchantRange.length > 1 &&
this.setData({
showPicker: true
})
},
getStoreList(e) {
console.log(e)
let { value } = e.detail
getYQInfo(this.data.userInfo)
.then(result => {
// console.log(result)
let { merchantRange } = result
if (value) {
merchantRange = merchantRange.filter(item => item.merchantName.includes(value))
} }
this.setData({
merchantRange
})
})
.catch(err => {})
}, },
navbarReady(e) { navbarReady(e) {
let navBarHeight = e.detail.height let navBarHeight = e.detail.height
this.setData({ this.setData({
......
{ {
"navigationStyle": "custom", "navigationStyle": "custom",
"usingComponents": { "usingComponents": {
"CalendarMonth": "/components/CalendarMonth/CalendarMonth" "CalendarMonth": "/components/CalendarMonth/CalendarMonth",
"store-picker": "/components/storePicker/storePicker"
} }
} }
<!-- tabOperating/pages/operatingShow/operatingShow.wxml --> <!-- tabOperating/pages/operatingShow/operatingShow.wxml -->
<!-- src引入filter.wxs, module给模块起名 --> <!-- src引入filter.wxs, module给模块起名 -->
<wxs src="../index.wxs" module="filter" /> <wxs src="../index.wxs" module="filter" />
<view class="layout {{flag?'opacity':''}}"> <view class="layout {{ flag?'opacity':'' }}">
<navigation-bar bindback="jump" bindnavbarReady="navbarReady" showBack="{{true}}"> <navigation-bar bindback="jump" bindnavbarReady="navbarReady" showBack="{{ true }}">
<picker <!-- <picker
range="{{merchantRange}}" range="{{merchantRange}}"
value="{{subIndex}}" value="{{subIndex}}"
range-key="merchantName" range-key="merchantName"
bindchange="changePicker" bindchange="changePicker"
bindtap="tapPicker" bindtap="tapPicker"
bindcancel="tapPicker" bindcancel="tapPicker"
disabled="{{merchantRange.length < 2}}"> disabled="{{merchantRange.length < 2}}"> -->
<view class="navigation-title"> <view class="navigation-title" bindtap="showStorePicker">
<view class="navigation-title-text text-hide"> <view class="navigation-title-text text-hide">{{merchantRange[subIndex].merchantName}}</view>
{{merchantRange[subIndex].merchantName}} <view class="arrow {{ moveArrow?'move':'' }}" wx:if="{{ merchantRange.length > 1 }}">
</view>
<view class="arrow {{moveArrow?'move':''}}" wx:if="{{merchantRange.length > 1}}">
<image src="/images/arrow-bottom.png" /> <image src="/images/arrow-bottom.png" />
</view> </view>
</view> </view>
</picker> <!-- </picker> -->
</navigation-bar> </navigation-bar>
<view class="header" style="margin-top:{{statusBarHeight}}px"> <view class="header" style="margin-top:{{ statusBarHeight }}px">
<view class="date"> <view class="date">
<!-- {{dateObj.maxDate}} --> <!-- {{dateObj.maxDate}} -->
<CalendarMonth <CalendarMonth
allowSameDay allowSameDay
shortcut shortcut
bindselect='rangeSelect' bindselect="rangeSelect"
bindtapCalendar='tapCalendar' bindtapCalendar="tapCalendar"
rangeAll rangeAll
dateType='range' dateType="range"
calenderColor='#3582EE' calenderColor="#3582EE"
vertical vertical
minDate="2020-10-01" minDate="2020-10-01"
maxDate="{{dateObj.today}}" maxDate="{{ dateObj.today }}"
forceFullSucreen="{{bottomLift>0?true:false}}" forceFullSucreen="{{ bottomLift>0?true:false }}"
isComponents> isComponents
>
<view class="item dateNum"> <view class="item dateNum">
<block wx:if="{{dateObj.type=='year'}}">{{dateObj.label}}年</block> <block wx:if="{{ dateObj.type=='year' }}">{{dateObj.label}}年</block>
<block wx:else> <block wx:else>
<!-- {{filter.dateFormatSlash(dateObj.beginDateStr)}}-{{filter.dateFormatSlash(dateObj.endDateStr)}} --> <!-- {{filter.dateFormatSlash(dateObj.beginDateStr)}}-{{filter.dateFormatSlash(dateObj.endDateStr)}} -->
五月份 五月份
...@@ -50,7 +49,7 @@ ...@@ -50,7 +49,7 @@
</block> --> </block> -->
<!-- wx:if="{{merchantRange.length > 1}}" --> <!-- wx:if="{{merchantRange.length > 1}}" -->
<!-- 2021年 2-8月 --> <!-- 2021年 2-8月 -->
<view class="arrow {{whiteArrow?'move':''}}"> <view class="arrow {{ whiteArrow?'move':'' }}">
<image src="/images/whiteArrowIcon.png" /> <image src="/images/whiteArrowIcon.png" />
</view> </view>
</view> </view>
...@@ -73,14 +72,14 @@ ...@@ -73,14 +72,14 @@
</view> </view>
</view> </view>
<!-- --> <!-- -->
<view class="table {{isFullSucreen?'isFullSucreen':''}}"> <view class="table {{ isFullSucreen?'isFullSucreen':'' }}">
<view class="tableContainer"> <view class="tableContainer">
<view class="table-header"> <view class="table-header">
<block wx:for="{{tableHeaderList}}" wx:key="index"> <block wx:for="{{ tableHeaderList }}" wx:key="index">
<view class="tableHeader-td">{{item.name}}</view> <view class="tableHeader-td">{{item.name}}</view>
</block> </block>
</view> </view>
<block wx:if="{{tableList.length}}"> <block wx:if="{{ tableList.length }}">
<view class="table-body"> <view class="table-body">
<!-- show-scrollbar="{{false}}" scroll-x bindscrolltoupper="getAccumulateList" --> <!-- show-scrollbar="{{false}}" scroll-x bindscrolltoupper="getAccumulateList" -->
<!-- bindrefresherrefresh="search" --> <!-- bindrefresherrefresh="search" -->
...@@ -88,45 +87,32 @@ ...@@ -88,45 +87,32 @@
<scroll-view <scroll-view
scroll-y scroll-y
enable-back-to-top enable-back-to-top
refresher-enabled="{{true}}" refresher-enabled="{{ true }}"
bindrefresherrefresh="restPageNum" bindrefresherrefresh="restPageNum"
bindscrolltolower="scrollonReachBottom" bindscrolltolower="scrollonReachBottom"
refresher-threshold="104" refresher-threshold="104"
style="height:100%;" style="height:100%;"
class="list" class="list"
refresher-triggered="{{triggered}}"> refresher-triggered="{{ triggered }}"
<block wx:for="{{tableList}}" wx:for-item="tableItem" wx:key="index"> >
<block wx:for="{{ tableList }}" wx:for-item="tableItem" wx:key="index">
<view class="table-th"> <view class="table-th">
<block <block wx:for="{{ tableHeaderList }}" wx:for-item="item" wx:for-index="tdIndex" wx:key="tdIndex">
wx:for="{{tableHeaderList}}"
wx:for-item="item"
wx:for-index="tdIndex"
wx:key="tdIndex">
<!-- <view class="table-td">{{tableHeaderList[tdIndex]}}</view> --> <!-- <view class="table-td">{{tableHeaderList[tdIndex]}}</view> -->
<view class="table-td" wx:if="{{tableHeaderList[tdIndex]['propName']=='dataDateStr'&&dateObj.type =='day'}}"> <view class="table-td" wx:if="{{ tableHeaderList[tdIndex]['propName']=='dataDateStr'&&dateObj.type =='day' }}">{{filter.dateFormatSlash(tableItem[tableHeaderList[tdIndex]['propName']])}}</view>
{{filter.dateFormatSlash(tableItem[tableHeaderList[tdIndex]['propName']])}} <view class="table-td" wx:elif="{{ tableHeaderList[tdIndex]['propName']=='dataDateStr'&&dateObj.type=='year' }}">{{filter.dateFormatYear(tableItem[tableHeaderList[tdIndex]['propName']])}}</view>
</view> <view class="table-td" wx:elif="{{ tableHeaderList[tdIndex]['propName']=='dataDateStr'&&dateObj.type=='month' }}">{{filter.dateFormatMonth(tableItem[tableHeaderList[tdIndex]['propName']])}}</view>
<view class="table-td" wx:elif="{{tableHeaderList[tdIndex]['propName']=='dataDateStr'&&dateObj.type=='year'}}"> <view class="table-td" wx:elif="{{ tableHeaderList[tdIndex]['propName']=='upgradeRate' }}">{{filter.rateFormat(tableItem[tableHeaderList[tdIndex]['propName']])}}</view>
{{filter.dateFormatYear(tableItem[tableHeaderList[tdIndex]['propName']])}} <view class="table-td" wx:else>{{tableItem[tableHeaderList[tdIndex]['propName']]}}</view>
</view>
<view class="table-td" wx:elif="{{tableHeaderList[tdIndex]['propName']=='dataDateStr'&&dateObj.type=='month'}}">
{{filter.dateFormatMonth(tableItem[tableHeaderList[tdIndex]['propName']])}}
</view>
<view class="table-td" wx:elif="{{tableHeaderList[tdIndex]['propName']=='upgradeRate'}}">
{{filter.rateFormat(tableItem[tableHeaderList[tdIndex]['propName']])}}
</view>
<view class="table-td" wx:else>
{{tableItem[tableHeaderList[tdIndex]['propName']]}}
</view>
<!-- <view class="table-td">{{tableItem[]}}</view> --> <!-- <view class="table-td">{{tableItem[]}}</view> -->
</block> </block>
</view> </view>
</block> </block>
<view class="tips" wx:if="{{currentPage == pages&&tableList.length>13}}">到底了~</view> <view class="tips" wx:if="{{ currentPage == pages&&tableList.length>13 }}">到底了~</view>
</scroll-view> </scroll-view>
</view> </view>
</block> </block>
<block wx:if="{{!tableList.length}}"> <block wx:if="{{ !tableList.length }}">
<!-- <view class="tips-nothing">暂无数据</view> --> <!-- <view class="tips-nothing">暂无数据</view> -->
<!-- <view class=" noListText"> <!-- <view class=" noListText">
<image <image
...@@ -141,4 +127,10 @@ ...@@ -141,4 +127,10 @@
</view> </view>
</view> </view>
</view> </view>
<store-picker
subIndex="{{ subIndex }}"
pickList="{{ merchantRange }}"
show="{{ showPicker }}"
bindsearch="getStoreList"
bindconfirm="changePicker"
/>
\ No newline at end of file \ No newline at end of file
...@@ -21,7 +21,7 @@ class Request { ...@@ -21,7 +21,7 @@ class Request {
} }
: {} : {}
data = _this.getData(data, method, noSignAttr) data = _this.getData(data, method, noSignAttr)
console.log('reqData',data?.sessionId); // console.log('reqData',data?.sessionId);
// delete // delete
// if (data?.sessionId) { // if (data?.sessionId) {
// delete data?.sessionId // delete data?.sessionId
......
...@@ -191,15 +191,23 @@ const isFullSucreen = isComponents => { ...@@ -191,15 +191,23 @@ const isFullSucreen = isComponents => {
success(res) { success(res) {
// console.log(res) // console.log(res)
let { statusBarHeight, screenHeight, windowHeight, safeArea } = res let { statusBarHeight, screenHeight, windowHeight, safeArea } = res
// console.log(statusBarHeight, screenHeight, windowHeight, safeArea)
// const { screenHeight, safeArea } = res // const { screenHeight, safeArea } = res
const { bottom } = safeArea const { bottom } = safeArea
// console.log(bottom) // console.log(bottom)
// console.log(router.isTab, 'router.isTab')
// windowHeight 属性会在自定义导航栏时跟screenHeight 一样导致无法区分是否是iphoneX的机型 // windowHeight 属性会在自定义导航栏时跟screenHeight 一样导致无法区分是否是iphoneX的机型
// 用safeArea可以处理 // 用safeArea可以处理
val = router.isTab ? screenHeight - windowHeight - statusBarHeight - 32 > 72 : screenHeight - bottom > 0 val = router.isTab ? screenHeight - windowHeight - statusBarHeight - 32 > 72 : screenHeight - bottom > 0
// val = router.isTab ? screenHeight - windowHeight - statusBarHeight - 32 > 72 : screenHeight - windowHeight > 72 // val = router.isTab ? screenHeight - windowHeight - statusBarHeight - 32 > 72 : screenHeight - windowHeight > 72
// if (isComponents) val = screenHeight - windowHeight > 72 // if (isComponents) val = screenHeight - windowHeight > 72
if (isComponents) val = screenHeight - bottom > 0 if (isComponents) val = screenHeight - bottom > 0
// console.log(router, 'route')
// if (router.url.includes('tabIndex/pages/index/index')) {
// // console.log('当前页面为 TabBar 页面');
// val = true
// }
}, },
fail(err) { fail(err) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!