Commit 8c891460 by zhangxw

工单管理 预约管理 筛选改版

1 parent 264f5e3e
......@@ -195,4 +195,14 @@ module.exports = {
logout() {
return api.post('dj.api.smartcarlife.logout')
},
// 分页获取场景值关联园区店数据
getYqMerchantListPage(data) {
return api.post('dj.api.scenemerchantref.listYqShopByRef.page', data)
},
// 分页获取场景值关联4s店数据
getMerchantListPage(data) {
return api.post('dj.api.scenemerchantref.listShop4sByRef.page', data)
}
}
......@@ -45,7 +45,7 @@ Component({
attached() {
// console.log(wx.$util.isFullSucreen(), 'wx.$util.isFullSucreen()')
this.setData({
isFullSucreen: wx.$util.isFullSucreen()
isFullSucreen: wx.$util.isFullSucreen(true)
})
}
})
// components/StoreSelectPopup/StoreSelectPopup.js
import api from '~/api/api'
Component({
/**
* 组件的属性列表
*/
properties: {
show: {
type: Boolean,
observer: function(n) {
if (n) {
this.setData({
scrollTop: 0,
pageNum: 1
})
this.getList(true)
}
}
},
type: Number,
selectedData: Array
},
/**
* 组件的初始数据
*/
data: {
pageNum: 1,
scrollTop: 0,
nothing: false
},
/**
* 组件的方法列表
*/
methods: {
getList(isReset = false) {
let { type, pageNum, searchValue, nothing, selectedData } = this.data
// type 1园区店数据 2 4s店数据
let requestEvent = type == 1 ? 'getYqMerchantListPage' : 'getMerchantListPage'
let params = {
pageSize: 20,
pageNum: isReset ? 1 : pageNum,
scene: 1,
merchantName: searchValue
}
if (nothing) return
api[requestEvent](params).then(res => {
let { code, data } = res
if (code == 0) {
if (isReset) data?.list.unshift({ merchantId: '', merchantName: '全部', active: true })
let tempList = isReset ? data?.list : this.data.storeRangeList.concat(data?.list)
if (selectedData?.length) {
tempList[0].active = false
tempList.forEach(val => {
val.active = selectedData.some(v => v.merchantId == val.merchantId)
})
}
this.setData({
storeRangeList: tempList,
pageNum: pageNum + 1,
total: data?.total,
nothing: data?.total == (tempList.length - 1),
})
}
})
},
scrollonReachBottom() {
this.getList()
},
open() {
if (this.data.disabled) return
this.setData({
edit: true,
inputFocus: true
})
},
setValue(value) {
if (this.properties.filterEmoji) {
if (wx.$util.haveEmoji(value)) value = wx.$util.replaceEmoji(value)
}
this.setData({
searchValue: value
})
},
input(e) {
let { value } = e.detail
this.setValue(value)
this.triggerEvent('input', {
value
})
},
inputConfifm(e) {
this.emit(e)
},
emit(e) {
let {
detail: { value },
type
} = e
this.setData({
edit: false,
nothing: false,
pageNum: 1
})
this.setValue(value)
this.getList(true)
},
choose(e) {
let { item, index } = e.currentTarget.dataset
let { active } = item
let { storeRangeList } = this.data
if (index > 0) {
let target = `storeRangeList[${index}].active`
this.setData({
[target]: !active,
'storeRangeList[0].active': false
}, () => {
this.setSelectedData()
})
} else {
if (!active) {
storeRangeList.map(val => { return val.active = false })
storeRangeList[0].active = true
}
this.setData({storeRangeList}, () => {
this.setSelectedData()
})
}
},
setSelectedData() {
let { storeRangeList, selectedData } = this.data
let arr = []
storeRangeList?.forEach(val => {
if (val.active && val.merchantId) arr.push(val)
})
this.setData({
selectedData: this.arrayUnique(arr.concat(selectedData), 'merchantId')
})
},
arrayUnique(arr, name) {
var hash = {}
return arr.reduce(function(acc, cru, index) {
if (!hash[cru[name]]) {
hash[cru[name]] = { index: index }
acc.push(cru)
} else {
acc.splice(hash[cru[name]]['index'], 1, cru)
}
return acc
}, [])
},
hidePopup() {
this.triggerEvent('cancel')
},
confirm() {
let {selectedData} = this.data
this.triggerEvent('confirm', selectedData)
}
}
})
\ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
<!--components/StoreSelectPopup/StoreSelectPopup.wxml-->
<popup title="选择门店" show="{{ show }}" bindconfirm="confirm" height="85%" bindcancel="hidePopup">
<view class="search-box">
<view class="search-input">
<block wx:if="{{ !edit }}">
<view class="input {{ searchValue?'':'placeholder' }}" bindtap="open">
<block wx:if="{{ searchValue }}">{{searchValue}}</block>
<block wx:else>
<image src="/images/search.png" class="icon"></image>
查找
</block>
</view>
</block>
<block wx:else>
<input
type="text"
class="input"
value="{{ searchValue }}"
focus="{{ inputFocus }}"
confirm-type="search"
bindinput="input"
bindblur="inputBlur"
bindconfirm="inputConfifm"
/>
</block>
</view>
</view>
<view class="title">门店名称</view>
<scroll-view class="store-select-box" scroll-y enhanced="{{true}}" show-scrollbar="{{false}}" scroll-top="{{scrollTop}}" bindscrolltolower="scrollonReachBottom">
<view class="box">
<view class="merchant-box">
<block wx:for="{{storeRangeList}}" wx:key="index">
<view class="item {{item.active?'active':''}}" bindtap="choose" data-item="{{item}}"
data-index="{{index}}">
<view
class="icon"
catchtap="choose"
data-index="{{index}}"
data-item="{{item}}">
<block wx:if="{{item.active}}">
<image src="../images/radio.png" />
</block>
<block wx:else>
<view class="arc" />
</block>
</view>
<view class="merchant_item">
<view class="text-hide">{{item.merchantName}}</view>
<view>{{item.merchantId}}</view>
</view>
</view>
</block>
</view>
</view>
</scroll-view>
</popup>
\ No newline at end of file
/* components/StoreSelectPopup/StoreSelectPopup.wxss */
.search-box {
height: 104rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 28rpx;
}
.search-box .search-input {
width: 686rpx;
height: 72rpx;
background: #F7F8FA;
border-radius: 38rpx;
color: #333;
}
.search-input .input{
display: flex;
align-items: center;
justify-content: center;
height: 100%;
width: 100%;
text-align: center;
}
.search-input .icon{
width: 28rpx;
height: 28rpx;
margin-right: 10rpx;
}
.search-input .placeholder{
color: #C8C9CC;
}
.title{
margin-bottom: 20rpx;
}
.store-select-box{
height: calc(100% - 168rpx);
}
.merchant-box .item{
display: flex;
height: 88rpx;
align-items: center;
color: #292D33;
}
.merchant-box .item.active{
color: #347BFF;
}
.item .merchant_item{
height: 88rpx;
font-size: 28rpx;
display: flex;
align-items: center;
width: calc(100% - 52rpx);
border-top: 1rpx solid #EFF0F2;
}
.item .merchant_item .text-hide{
max-width: calc(100% - 192rpx);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.item .icon {
width: 32rpx;
height: 32rpx;
display: block;
margin-right: 20rpx;
flex-shrink: 0;
}
.item .icon .arc {
width: 100%;
height: 100%;
border: 2rpx solid #979797;
border-radius: 100%;
box-sizing: border-box;
}
\ No newline at end of file
......@@ -4,6 +4,10 @@ import api from '~/utils/request/request.js'
module.exports = {
/** 预约列表 */
getInviteList(data) {
// return api.post('dj.api.smartcarlife.inviteRecord.query', {
// pageSize: 10,
// ...data
// })
return api.post('dj.api.smartcarlife.inviteRecord.query.new', {
pageSize: 10,
...data
......@@ -15,6 +19,7 @@ module.exports = {
},
/** 预约总数 */
getiIviteRecord(data) {
// return api.post('dj.api.smartcarlife.inviteRecord.count', data)
return api.post('dj.api.smartcarlife.inviteRecord.count.new', data)
},
/** 获取时间维度的邀约统计 */
......
// pages/tabDateIndex/components/DateScreen/DateScreen.js
import api from '~/api/api'
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/'
Component({
/**
* 组件的属性列表
*/
properties: {
userInfo: Object,
navBarHeight: String,
show: {
type: Boolean,
observer: function (n, o) {
if (n) {
this.setViewData()
let { userInfo } = this.data
// 非超管 获取转化人员 销售顾问
if (!userInfo?.isSuper) {
if (wx.$dateListRefresh) {
this.getScreenList()
}
}
} else {
this.setData({
x: this.data.windowWidth
})
}
}
},
inviteStatus: {
type: Number,
value: -1,
observer: function (n) {
if (n != -1) {
this.setInviteStatusList(n)
}
}
},
},
/**
* 组件的初始数据
*/
data: {
IMG_URL,
dateTimeList: [{
name: '全部',
active: true
}, {
name: '今日',
startDate: new Date().format('yyyy-MM-dd'),
endDate: new Date().format('yyyy-MM-dd')
}, {
name: '本月',
startDate: new Date(new Date().setDate(1)).format('yyyy-MM-dd'),
endDate: new Date().format('yyyy-MM-dd')
}, {
startDate: '',
endDate: '',
type: 'custom'
}],
showStoreSelectPopup: false
},
/**
* 组件的方法列表
*/
methods: {
init() {
let { dateTimeList } = this.data
this.setData({
['form.dateTimeList']: wx.$util.deepClone(dateTimeList)
})
this.setInviteStatusList()
},
getScreenList() {
let { userInfo } = this.data
this.getConversionEmployeeList(userInfo?.merchantId, 0)
this.getConversionEmployeeList(userInfo?.shopMerchantId, 1)
},
/**转化人员 & 销售人员*/
getConversionEmployeeList(merchantId, type) {
let target = type == 0 ? 'form.conversionEmployeeList' : 'form.salesmanList'
if (merchantId) {
api
.getConversionEmployeeList({
merchantId,
sceneList: type == 1 ? [1] : ''
})
.then(res => {
wx.hideLoading()
let arr = [
{
staffName: '全部',
active: true,
value: []
}
]
let { code, data, message } = res
if (code == 0) {
data.map(e => {
e.value = [e.uuid]
arr.push(e)
})
} else {
wx.$util.showToast(message)
}
this.setData({
[target]: arr
})
})
} else {
wx.hideLoading()
this.setData({
[target]: [
{
staffName: '全部',
active: true,
value: []
}
]
})
}
},
showStoreSelectPopup(e) {
let { type } = e.currentTarget.dataset
this.setData({storeType: type, showStoreSelectPopup: true})
},
hideStorePopup() {
this.setData({showStoreSelectPopup: false})
},
storeConfirm(e) {
let { storeType } = this.data
if (storeType == 1) this.setData({'form.selectedYqMerchantList': e?.detail})
if (storeType == 2) this.setData({'form.selectedMerchantList': e?.detail})
this.setData({showStoreSelectPopup: false})
},
choose(e) {
let { index, listName } = e.currentTarget.dataset
let target = this.data.form[listName]
if (target[index].disabled) return
target.map(i => (i.active = false))
target[index].active = true
this.setData({
[`form.${listName}`]: target,
isReset: false
})
},
yqMerchantChoose() {
this.setData({
'form.selectedYqMerchantList': []
})
},
merchantChoose() {
this.setData({
'form.selectedMerchantList': []
})
},
showMore(e) {
let { type } = e.currentTarget.dataset
let { employShowMore, salesmanShowMore } = this.data
let prop = type == 1 ? 'employShowMore' : 'salesmanShowMore'
this.setData({
[prop]: type == 1 ? !employShowMore : !salesmanShowMore
})
},
rangeSelect(e) {
let { index, name } = e.currentTarget.dataset
let data = this.data.form[name]
let {
date: { start, end }
} = e.detail
data?.map(i => (i.active = false))
let obj = {
active: true,
startDate: start,
endDate: end,
type: 'custom'
}
data[index] = obj
this.setData({
[`form.${name}`]: data,
})
},
// 日期组件
showCalendar(e) {
let calendarModule = this.selectComponent('#calendar')
calendarModule.showCalendar && calendarModule.showCalendar(e)
},
setViewData() {
let { navBarHeight } = this.data
wx.$util.getViewInfo(
'.btn-box',
res => {
this.setData({
height: navBarHeight,
btnHeight: res.height
})
},
this
)
},
/**预约状态 */
setInviteStatusList(n = 0) {
let arr = [
{
name: '全部',
active: true,
value: []
},
{
name: '待预约',
value: [1]
},
{
name: '已预约',
value: [2]
},
{
name: '超时未到店',
value: [5]
},
{
name: '取消预约',
value: [3]
},
{
name: '已施工',
value: [4]
}
]
this.setData({
['form.inviteStatusList']: arr
})
this.setInviteStatusListDisabled(n)
},
setInviteStatusListDisabled(statusType) {
let { inviteStatusList } = this.data.form
inviteStatusList.map((e, index) => {
if (statusType == 0) {
e.disabled = false
} else if (statusType == 1) {
if (index == 1 || index == 4) e.disabled = true
} else {
if (index == 2 || index == 3 || index == 5) e.disabled = true
}
})
this.setData({
['form.inviteStatusList']: inviteStatusList
})
},
reset() {
let { salesmanList, conversionEmployeeList } = this.data.form
salesmanList?.map((val, index) => {
val.active = false
if (index == 0) val.active = true
})
conversionEmployeeList?.map((val, index) => {
val.active = false
if (index == 0) val.active = true
})
this.setData({
'form.selectedYqMerchantList': [],
'form.selectedMerchantList': [],
'form.conversionEmployeeList': conversionEmployeeList,
'form.salesmanList': salesmanList
})
this.init()
},
confirm() {
let { form, userInfo, isReset } = this.data
let obj = {}
Object.keys(form).map(e => {
form[e].map(i => {
if (i.active) {
obj[e] = i.value
let { startDate, endDate } = i
// 预约时间
if (startDate && endDate) {
startDate = `${startDate} 00:00:00`
endDate = `${endDate} 23:59:59`
obj.inviteDateStartDate = startDate
obj.inviteDateEndDate = endDate
}
// 超管销售顾问
// if (e == 'selectedMerchantList') obj[]
// // 超管转化人员
// if (e == 'selectedYqMerchantList') obj
// 非超管
if (!userInfo?.isSuper) {
if (obj?.sellerUserIdList?.length) obj['sellerMerchantId'] = [userInfo?.merchantId]
if (obj?.userIdList?.length) obj['merchantId'] = [userInfo?.shopMerchantId]
}
}
})
})
let page = wx.$router.getPageInstance()
if (isReset) {
obj = {}
}
page.setData({
searchObj: obj
})
page.back()
page.search()
}
},
attached() {
wx.$util.getSystemInfo(info => {
let { windowWidth } = info
this.setData({
x: windowWidth,
windowWidth,
isFullSucreen: wx.$util.isFullSucreen(true),
userInfo: wx.$util.getUserInfo()
})
})
this.init()
this.getScreenList()
}
})
\ No newline at end of file
{
"component": true,
"usingComponents": {
"store-select-popup": "/components/StoreSelectPopup/StoreSelectPopup"
}
}
\ No newline at end of file
<!--pages/tabDateIndex/components/DateScreen/DateScreen.wxml-->
<scroll-view scroll-y class="confirm-box" style="height:calc(100% - {{height}}px);margin-top:{{navBarHeight}}px;"
hidden="{{!show}}">
<view class="main" style="min-height:calc(100% - {{btnHeight}}px)">
<view class="box" wx:if="{{!userInfo.isSuper}}">
<view class="title">
<view class="title-left">
转化人员
<view class="title-tips" wx:if="{{!userInfo.isSuper}}">{{userInfo.merchantName}}</view>
</view>
<view wx:if="{{form.conversionEmployeeList.length > 12}}" bindtap="showMore" data-type="1" class="collapse-btn {{!employShowMore ? 'rotate-180' : ''}}"><image src="{{IMG_URL}}collapse_icon.png" mode=""/></view>
</view>
<view class="list-box">
<block wx:for="{{form.conversionEmployeeList}}" wx:key="index">
<view class="item text-center {{item.active?'active':''}}" bindtap="choose"
data-list-name="conversionEmployeeList" data-index="{{index}}" hidden="{{index >= 12 && !employShowMore}}">
<view class="text-item">{{item.staffName}}</view>
</view>
</block>
</view>
</view>
<view class="box" wx:if="{{userInfo.isSuper}}">
<view class="title">
<view class="title-left">
转化人员
</view>
<view wx:if="{{form.selectedYqMerchantList.length > 3}}" bindtap="showMore" data-type="1" class="collapse-btn {{!employShowMore ? 'rotate-180' : ''}}"><image src="{{IMG_URL}}collapse_icon.png" mode=""/></view>
</view>
<view class="list-box">
<view class="item text-center {{!form.selectedYqMerchantList.length?'active':''}}" bindtap="yqMerchantChoose">全部</view>
<view class="item text-center" bindtap="showStoreSelectPopup" data-type="1">自定义</view>
<block wx:for="{{form.selectedYqMerchantList}}" wx:key="index">
<view class="item active flex-1" bindtap="choose"
data-list-name="selectedYqMerchantList" data-index="{{index}}" hidden="{{index >= 3 && !employShowMore}}">
<view class="inline-block merchant-name">{{item.merchantName}}</view>
<view class="inline-block">{{item.merchantId}}</view>
</view>
</block>
</view>
</view>
<view class="box" wx:if="{{!userInfo.isSuper}}">
<view class="title">
<view class="title-left">
销售顾问
<view class="title-tips" wx:if="{{!userInfo.isSuper}}">{{userInfo.shopMerchantName}}</view>
</view>
<view wx:if="{{form.salesmanList.length > 12}}" bindtap="showMore" data-type="2" class="collapse-btn {{!salesmanShowMore ? 'rotate-180' : ''}}"><image src="{{IMG_URL}}collapse_icon.png" mode=""/></view>
</view>
<view class="list-box">
<block wx:for="{{form.salesmanList}}" wx:key="index">
<view class="item text-center {{item.active?'active':''}}" bindtap="choose" data-list-name="salesmanList"
data-index="{{index}}">
<view class="text-item">{{item.staffName}}</view>
</view>
</block>
</view>
</view>
<view class="box" wx:if="{{userInfo.isSuper}}">
<view class="title">
<view class="title-left">
销售顾问
<view class="title-tips" wx:if="{{!userInfo.isSuper}}">{{userInfo.shopMerchantName}}</view>
</view>
<view wx:if="{{form.selectedMerchantList.length > 3}}" bindtap="showMore" data-type="2" class="collapse-btn {{!salesmanShowMore ? 'rotate-180' : ''}}"><image src="{{IMG_URL}}collapse_icon.png" mode=""/></view>
</view>
<view class="list-box">
<view class="item text-center {{!form.selectedMerchantList.length?'active':''}}" bindtap="merchantChoose">全部</view>
<view class="item text-center" bindtap="showStoreSelectPopup" data-type="2">自定义</view>
<block wx:for="{{form.selectedMerchantList}}" wx:key="index">
<view class="item active flex-1" bindtap="choose"
data-list-name="selectedMerchantList" data-index="{{index}}" hidden="{{index >= 3 && !salesmanShowMore}}">
<view class="inline-block merchant-name">{{item.merchantName}}</view>
<view class="inline-block">{{item.merchantId}}</view>
</view>
</block>
</view>
</view>
<view class="box">
<view class="title">
预约时间
</view>
<view class="list-box">
<block wx:for="{{form.dateTimeList}}" wx:key="index">
<block wx:if="{{item.type}}">
<calendar allowSameDay shortcut bindselect='rangeSelect' id="calendar" data-index="{{index}}" data-name="dateTimeList" dateType='range' calenderColor='#347BFF'
vertical minDate="2020-10-01" maxDate="{{maxDate}}" isComponents>
</calendar>
<view style="display: flex;align-items: center;">
<view bindtap="showCalendar" data-type="show" class="item custom-time text-center {{!item.startDate ? 'grey' : ''}} {{item.active?'active':''}}">{{item.startDate || '开始时间'}}</view>-
<view bindtap="showCalendar" data-type="show" class="item custom-time text-center {{!item.endDate ? 'grey' : ''}} {{item.active?'active':''}}">{{item.endDate || '结束时间'}}</view>
</view>
</block>
<block wx:else>
<view class="item text-center {{item.active?'active':''}}" bindtap="choose" data-list-name="dateTimeList"
data-index="{{index}}">{{item.name}}</view>
</block>
</block>
</view>
</view>
<view class="box">
<view class="title">
预约状态
</view>
<view class="list-box">
<block wx:for="{{form.inviteStatusList}}" wx:key="index">
<view class="item text-center {{item.active?'active':''}} {{item.disabled ?'disabled':''}}" bindtap="choose"
data-list-name="inviteStatusList" data-index="{{index}}">{{item.name}}</view>
</block>
</view>
</view>
</view>
<view class="btn-box {{isFullSucreen?'isFullSucreen-btn':''}}">
<view class="btn clear text-center" bindtap="reset">清除</view>
<view class="btn done text-center" bindtap="confirm">确定</view>
</view>
</scroll-view>
<store-select-popup show="{{showStoreSelectPopup}}" type="{{storeType}}" bindconfirm="storeConfirm" bindcancel="hideStorePopup" selectedData="{{storeType == 1 ? form.selectedYqMerchantList : form.selectedMerchantList}}"></store-select-popup>
/* pages/tabDateIndex/components/DateScreen/DateScreen.wxss */
.confirm-box {
position: fixed;
top: 0;
z-index: 10;
height: 100vh;
width: 100%;
box-sizing: border-box;
background-color: #fff;
animation: show-confirm-box .5s forwards;
}
@keyframes show-confirm-box {
0%{
right: -100%;
}
100%{
right: 0;
}
}
.box {
margin: 0 32rpx;
}
.box .title {
display: flex;
align-items: center;
justify-content: space-between;
font-size: 32rpx;
font-weight: 500;
color: #292D33;
padding: 34rpx 0 30rpx;
position: sticky;
left: 0;
top: 0;
background: #fff;
z-index: 2;
}
.box .title .title-left{
display: flex;
align-items: flex-end;
}
.box .title .title-tips{
font-size: 22rpx;
font-weight: 400;
color: #757980;
margin-left: 8rpx;
}
.box .title .collapse-btn{
width: 48rpx;
height: 48rpx;
}
.box .title .collapse-btn.rotate-180{
transform: rotate(180deg);
}
.box .list-box {
display: flex;
border-bottom: 2rpx solid rgba(195, 195, 195, .3);
flex-wrap: wrap;
padding-bottom: 20rpx;
}
.box .list-box .item {
width: 214rpx;
min-height: 68rpx;
border-radius: 4rpx;
box-sizing: border-box;
border: 2rpx solid transparent;
padding: 16rpx 33rpx;
margin-bottom: 20rpx;
flex-wrap: wrap;
font-size: 24rpx;
text-align: center;
background-color: #F7F8FA;
color: #292D33;
transition: all .2s;
margin: 0 20rpx 20rpx 0;
}
.box .list-box .item .text-item{
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.box .list-box .item.flex-1{
width: 100%;
text-align: left;
margin-right: 0;
line-height: 100%;
}
.box .list-box .item.grey{
color: #999EA8;
}
.box .list-box .item.custom-time{
width: 316rpx;
margin-bottom: 0;
}
.box .list-box .item.custom-time:last-child{
margin-right: 0;
margin-left: 20rpx;
}
.box .list-box .item:nth-of-type(3n+3) {
margin-right: 0;
}
.box .list-box .calendar .item {
margin-right: 0;
}
.box .list-box .item.active {
background: rgba(53, 130, 238, 0.08);
border: 2rpx solid #347BFF;
color: #347BFF;
}
.box .list-box .item.disabled {
opacity: .4;
}
.box .list-box .item .inline-block{
display: inline-block;
}
.box .list-box .item .merchant-name{
max-width: calc(100% - 140rpx);
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.btn-box {
position: sticky;
padding: 10rpx 32rpx;
display: flex;
align-items: center;
justify-content: space-between;
font-size: 28rpx;
bottom: 0;
left: 0;
width: 100%;
box-sizing: border-box;
z-index: 9;
background-color: #fff;
}
.btn-box .btn {
border-radius: 12rpx;
border: 2rpx solid #0075F9;
box-sizing: border-box;
height: 80rpx;
}
.btn-box .btn.clear {
border: 2rpx solid #DEE0E3;
width: 186rpx;
color: #292D33;
}
.btn-box .btn.done {
background: #347BFF;
color: #fff;
width: 480rpx;
}
.isFullSucreen-btn {
padding-bottom: 68rpx;
}
.text-center {
display: flex;
align-items: center;
justify-content: center;
}
.text-hide {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
\ No newline at end of file
......@@ -424,7 +424,7 @@ Page({
...searchObj
}
if (keyword) obj.keyword = keyword
if (tabIndex != 0) obj.inviteStatusList = tabIndex == 1 ? [2,4,5,7] : [1, 3,6]
if (tabIndex != 0) obj.inviteStatusList = tabIndex == 1 ? [2, 4, 5, 7] : [1, 3, 6]
console.log(tabIndex, obj);
// debugger
api.getInviteList(obj).then(res => {
......
{
"navigationStyle":"custom"
"navigationStyle":"custom",
"usingComponents": {
"date-screen": "../components/DateScreen/DateScreen"
}
}
\ No newline at end of file
......@@ -159,11 +159,12 @@
</block>
</view>
</block>
<order-confirm
<page-container show="{{show_confirm}}" duration="{{0}}" overlay="{{false}}" bind:afterleave="back">
<date-screen
show="{{show_confirm}}"
userInfo="{{userInfo}}"
type="2"
navBarHeight="{{navBarHeight}}"
inviteStatus="{{tabIndex}}" />
</page-container>
<date-picker show="{{showDate}}" merchantId="{{dateItem.merchantCoupon.yqMerchantId}}" />
{
"component": true,
"usingComponents": {
"store-select-popup": "/components/StoreSelectPopup/StoreSelectPopup"
}
}
\ No newline at end of file
<!--pages/tabWorkOrder/components/OrderScreen/OrderScreen.wxml-->
<scroll-view scroll-y class="confirm-box" style="height:calc(100% - {{height}}px);margin-top:{{navBarHeight}}px;"
hidden="{{!show}}">
<view class="main" style="padding-bottom:{{btnHeight}}px">
<view class="box" wx:if="{{!userInfo.isSuper}}">
<view class="title">
<view class="title-left">
转化人员
<view class="title-tips" wx:if="{{!userInfo.isSuper}}">{{userInfo.merchantName}}</view>
</view>
<view wx:if="{{form.sellerUserIdList.length > 12}}" bindtap="showMore" data-type="1" class="collapse-btn {{!employShowMore ? 'rotate-180' : ''}}"><image src="{{IMG_URL}}collapse_icon.png" mode=""/></view>
</view>
<view class="list-box">
<block wx:for="{{form.sellerUserIdList}}" wx:key="index">
<view class="item text-center {{item.active?'active':''}}" bindtap="choose"
data-list-name="sellerUserIdList" data-index="{{index}}" hidden="{{index >= 12 && !employShowMore}}">
<view class="text-item">{{item.staffName}}</view>
</view>
</block>
</view>
</view>
<view class="box" wx:if="{{userInfo.isSuper}}">
<view class="title">
<view class="title-left">
转化人员
</view>
<view wx:if="{{form.selectedYqMerchantList.length > 3}}" bindtap="showMore" data-type="1" class="collapse-btn {{!employShowMore ? 'rotate-180' : ''}}"><image src="{{IMG_URL}}collapse_icon.png" mode=""/></view>
</view>
<view class="list-box">
<view class="item text-center {{!form.selectedYqMerchantList.length?'active':''}}" bindtap="yqMerchantChoose">全部</view>
<view class="item text-center" bindtap="showStoreSelectPopup" data-type="1">自定义</view>
<block wx:for="{{form.selectedYqMerchantList}}" wx:key="index">
<view class="item active flex-1" bindtap="choose"
data-list-name="selectedYqMerchantList" data-index="{{index}}" hidden="{{index >= 3 && !employShowMore}}">
<view class="inline-block merchant-name">{{item.merchantName}}</view>
<view class="inline-block">{{item.merchantId}}</view>
</view>
</block>
</view>
</view>
<view class="box" wx:if="{{!userInfo.isSuper}}">
<view class="title">
<view class="title-left">
销售顾问
<view class="title-tips" wx:if="{{!userInfo.isSuper}}">{{userInfo.shopMerchantName}}</view>
</view>
<view wx:if="{{form.userIdList.length > 12}}" bindtap="showMore" data-type="2" class="collapse-btn {{!salesmanShowMore ? 'rotate-180' : ''}}"><image src="{{IMG_URL}}collapse_icon.png" mode=""/></view>
</view>
<view class="list-box">
<block wx:for="{{form.userIdList}}" wx:key="index">
<view class="item text-center {{item.active?'active':''}}" bindtap="choose" data-list-name="userIdList"
data-index="{{index}}">
<view class="text-item">{{item.staffName}}</view>
</view>
</block>
</view>
</view>
<view class="box" wx:if="{{userInfo.isSuper}}">
<view class="title">
<view class="title-left">
销售顾问
<view class="title-tips" wx:if="{{!userInfo.isSuper}}">{{userInfo.shopMerchantName}}</view>
</view>
<view wx:if="{{form.selectedMerchantList.length > 3}}" bindtap="showMore" data-type="2" class="collapse-btn {{!salesmanShowMore ? 'rotate-180' : ''}}"><image src="{{IMG_URL}}collapse_icon.png" mode=""/></view>
</view>
<view class="list-box">
<view class="item text-center {{!form.selectedMerchantList.length?'active':''}}" bindtap="merchantChoose">全部</view>
<view class="item text-center" bindtap="showStoreSelectPopup" data-type="2">自定义</view>
<block wx:for="{{form.selectedMerchantList}}" wx:key="index">
<view class="item active flex-1" bindtap="choose"
data-list-name="selectedMerchantList" data-index="{{index}}" hidden="{{index >= 3 && !salesmanShowMore}}">
<view class="inline-block merchant-name">{{item.merchantName}}</view>
<view class="inline-block">{{item.merchantId}}</view>
</view>
</block>
</view>
</view>
<view class="box">
<view class="title">
订单时间
</view>
<view class="list-box">
<block wx:for="{{form.orderTimeList}}" wx:key="index">
<block wx:if="{{item.type}}">
<calendar allowSameDay shortcut bindselect='rangeSelect' id="orderCalendar" data-index="{{index}}" data-name="orderTimeList" dateType='range' calenderColor='#347BFF'
vertical minDate="2020-10-01" maxDate="{{maxDate}}" isComponents>
</calendar>
<view style="display: flex;align-items: center;">
<view bindtap="showCalendar" data-type="show" data-target="showOrder" class="item custom-time text-center {{!item.orderStartDate ? 'grey' : ''}} {{item.active?'active':''}}">{{item.orderStartDate || '开始时间'}}</view>-
<view bindtap="showCalendar" data-type="show" data-target="showOrder" class="item custom-time text-center {{!item.orderEndDate ? 'grey' : ''}} {{item.active?'active':''}}">{{item.orderEndDate || '结束时间'}}</view>
</view>
</block>
<block wx:else>
<view class="item text-center {{item.active?'active':''}}" bindtap="choose" data-list-name="orderTimeList"
data-index="{{index}}">{{item.name}}</view>
</block>
</block>
</view>
</view>
<view class="box">
<view class="title">
支付时间
</view>
<view class="list-box">
<block wx:for="{{form.payTimeList}}" wx:key="index">
<block wx:if="{{item.type}}">
<calendar allowSameDay shortcut bindselect='rangeSelect' data-index="{{index}}" id="payCalendar" data-name="payTimeList" dateType='range' calenderColor='#347BFF'
vertical minDate="2020-10-01" maxDate="{{maxDate}}" isComponents>
</calendar>
<view style="display: flex;align-items: center;">
<view bindtap="showCalendar" data-type="show" data-target="showPay" class="item custom-time text-center {{!item.payStartDate ? 'grey' : ''}} {{item.active?'active':''}}">{{item.payStartDate || '开始时间'}}</view>-
<view bindtap="showCalendar" data-type="show" data-target="showPay" class="item custom-time text-center {{!item.payEndDate ? 'grey' : ''}} {{item.active?'active':''}}">{{item.payEndDate || '结束时间'}}</view>
</view>
</block>
<block wx:else>
<view class="item text-center {{item.active?'active':''}}" bindtap="choose" data-list-name="payTimeList"
data-index="{{index}}">{{item.name}}</view>
</block>
</block>
</view>
</view>
<view class="box">
<view class="title">
订单状态
</view>
<view class="list-box">
<block wx:for="{{form.statusList}}" wx:key="index">
<view class="item text-center {{item.active?'active':''}} {{item.disabled ?'disabled':''}}" bindtap="choose"
data-list-name="statusList" data-index="{{index}}">{{item.name}}</view>
</block>
</view>
</view>
<view class="box">
<view class="title">
支付方式
</view>
<view class="list-box">
<block wx:for="{{form.payType}}" wx:key="index">
<view class="item text-center {{item.active?'active':''}}" bindtap="choose" data-list-name="payType"
data-index="{{index}}">{{item.name}}</view>
</block>
</view>
</view>
</view>
<view class="btn-box {{isFullSucreen?'isFullSucreen-btn':''}}">
<view class="btn clear text-center" bindtap="reset">清除</view>
<view class="btn done text-center" bindtap="confirm">确定</view>
</view>
</scroll-view>
<store-select-popup show="{{showStoreSelectPopup}}" type="{{storeType}}" bindconfirm="storeConfirm" bindcancel="hideStorePopup" selectedData="{{storeType == 1 ? form.selectedYqMerchantList : form.selectedMerchantList}}"></store-select-popup>
/* pages/tabWorkOrder/components/OrderScreen/OrderScreen.wxss */
.confirm-box {
position: fixed;
top: 0;
z-index: 10;
height: 100vh;
width: 100%;
box-sizing: border-box;
background-color: #fff;
animation: show-confirm-box .5s forwards;
}
@keyframes show-confirm-box {
0%{
right: -100%;
}
100%{
right: 0;
}
}
.box {
margin: 0 32rpx;
}
.box .title {
display: flex;
align-items: center;
justify-content: space-between;
font-size: 32rpx;
font-weight: 500;
color: #292D33;
padding: 34rpx 0 30rpx;
position: sticky;
left: 0;
top: 0;
background: #fff;
z-index: 2;
}
.box .title .title-left{
display: flex;
align-items: flex-end;
}
.box .title .title-tips{
font-size: 22rpx;
font-weight: 400;
color: #757980;
margin-left: 8rpx;
}
.box .title .collapse-btn{
width: 48rpx;
height: 48rpx;
}
.box .title .collapse-btn.rotate-180{
transform: rotate(180deg);
}
.box .list-box {
display: flex;
border-bottom: 2rpx solid rgba(195, 195, 195, .3);
flex-wrap: wrap;
padding-bottom: 20rpx;
}
.box .list-box .item {
width: 214rpx;
min-height: 68rpx;
border-radius: 4rpx;
box-sizing: border-box;
border: 2rpx solid transparent;
padding: 16rpx 33rpx;
margin-bottom: 20rpx;
flex-wrap: wrap;
font-size: 24rpx;
text-align: center;
background-color: #F7F8FA;
color: #292D33;
transition: all .2s;
margin: 0 20rpx 20rpx 0;
}
.box .list-box .item .text-item{
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.box .list-box .item.flex-1{
width: 100%;
text-align: left;
margin-right: 0;
line-height: 100%;
}
.box .list-box .item.grey{
color: #999EA8;
}
.box .list-box .item.custom-time{
width: 316rpx;
margin-bottom: 0;
}
.box .list-box .item.custom-time:last-child{
margin-right: 0;
margin-left: 20rpx;
}
.box .list-box .item:nth-of-type(3n+3) {
margin-right: 0;
}
.box .list-box .calendar .item {
margin-right: 0;
}
.box .list-box .item.active {
background: rgba(53, 130, 238, 0.08);
border: 2rpx solid #347BFF;
color: #347BFF;
}
.box .list-box .item.disabled {
opacity: .4;
}
.box .list-box .item .inline-block{
display: inline-block;
}
.box .list-box .item .merchant-name{
max-width: calc(100% - 140rpx);
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.btn-box {
position: sticky;
padding: 10rpx 32rpx;
display: flex;
align-items: center;
justify-content: space-between;
font-size: 28rpx;
bottom: 0;
left: 0;
width: 100%;
box-sizing: border-box;
z-index: 9;
background-color: #fff;
}
.btn-box .btn {
border-radius: 12rpx;
border: 2rpx solid #0075F9;
box-sizing: border-box;
height: 80rpx;
}
.btn-box .btn.clear {
border: 2rpx solid #DEE0E3;
width: 186rpx;
color: #292D33;
}
.btn-box .btn.done {
background: #347BFF;
color: #fff;
width: 480rpx;
}
.isFullSucreen-btn {
padding-bottom: 68rpx;
}
.text-center {
display: flex;
align-items: center;
justify-content: center;
}
.text-hide {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
\ No newline at end of file
{
"navigationStyle":"custom"
"navigationStyle":"custom",
"usingComponents": {
"order-screen": "../../components/OrderScreen/OrderScreen"
}
}
\ No newline at end of file
......@@ -228,10 +228,11 @@
</view>
</block>
</block>
<order-confirm
<page-container show="{{show_confirm}}" duration="{{0}}" overlay="{{false}}" bind:afterleave="back">
<order-screen
show="{{show_confirm}}"
userInfo="{{userInfo}}"
type="1"
navBarHeight="{{navBarHeight}}"
orderStatus="{{tabIndex}}" />
</page-container>
......@@ -54,7 +54,7 @@
</view>
<view class="box canvasBox">
<view class="title">电子签名处</view>
<view wx:if="{{!signImage}}" class="canvas_wrap">
<view wx:if="{{!signImage}}" hidden="{{filmRollNoPopup || artificerSelectPopup}}" class="canvas_wrap">
<canvas
canvas-id="signature"
class="modal-canvas"
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!