Commit 93233a2f by zhangxw

联调修改

1 parent da9808ee
......@@ -38,7 +38,8 @@ Component({
value: true
},
hideTab: Boolean,
isTab: Boolean
isTab: Boolean,
popupSlotStyle: String
},
/**
......
......@@ -4,7 +4,7 @@
<block wx:if="{{title}}">
<view class="popup-title text-center">{{title}}</view>
</block>
<view class="popup-slot {{isTab && !hideTab? '': title?'isFullSucreen':'isFullSucreen-notitle'}}">
<view class="popup-slot {{isTab && !hideTab? '': title?'isFullSucreen':'isFullSucreen-notitle'}}" style="{{popupSlotStyle}}">
<slot></slot>
</view>
<view class="popup-footer {{isTab && !hideTab?'':'isFullSucreen'}}" wx:if="{{only}}">
......
......@@ -18,7 +18,7 @@ Component({
if (n) {
let { staffTypeList, notAll } = this.data
if (notAll) {
let index = staffTypeList.findIndex(v => v.type == '')
let index = staffTypeList.findIndex(v => v.staffType == '')
if (index > -1) staffTypeList.splice(index, 1)
this.setData({
staffTypeList
......@@ -36,16 +36,16 @@ Component({
data: {
staffTypeList: [
{
type: '',
typeStr: '全部'
staffType: '',
staffTypeStr: '全部'
},
{
type: '1',
typeStr: '驻店'
staffType: '0',
staffTypeStr: '驻店'
},
{
type: '2',
typeStr: '技师'
staffType: '1',
staffTypeStr: '技师'
}
],
copySelectInfo: {}
......
......@@ -7,10 +7,10 @@
height="500rpx">
<block wx:for="{{staffTypeList}}" wx:key="index">
<view
class="itemCon text-hide {{item.type == copySelectInfo.type?'active':''}}"
class="itemCon text-hide {{item.staffType == copySelectInfo.staffType?'active':''}}"
data-target="{{item}}"
bindtap="select">
{{item.typeStr}}
{{item.staffTypeStr}}
</view>
</block>
</popup>
const phoneRex = /^[1]([3-9])[0-9]{9}$/
const formRule = {
selectInfo: [{ required: true, message: '所属服务中心不能为空' }],
type: [{ required: true, message: '员工类型不能为空' }],
staffType: [{ required: true, message: '员工类型不能为空' }],
staffName: [{ required: true, message: '员工姓名不能为空' }],
staffPhone: [
{ required: true, message: '手机号码不能为空' },
......@@ -22,8 +22,8 @@ const formItems = [{
pageType: 1
}, {
label: '员工类型',
props: 'type',
valueFn: 'typeStr',
props: 'staffType',
valueFn: 'staffTypeStr',
type: 'select',
placeholder: '请选择员工类型',
pageType: 3
......
......@@ -56,7 +56,8 @@ Page({
serviceValue: optionsInfo.merchantName,
visualType: optionsInfo.visualType || 0,
connectionValue: optionsInfo.visualType == 1 ? `已选${optionsInfo.visibleMerchantNo?.split(',')?.length}位客户`: '全部',
selectedConnectionIds: optionsInfo.visualType == 1 ? optionsInfo.visibleMerchantNo?.split(',').map((v) => {return v && Number(v)}) : []
selectedConnectionIds: optionsInfo.visualType == 1 ? optionsInfo.visibleMerchantNo?.split(',').map((v) => {return v && Number(v)}) : [],
staffTypeStr: optionsInfo.staffType == 0 ? '驻店' : optionsInfo.staffType == 1 ? '技师' : ''
} : {}
this.setData({
addOrEdit: options?.info ? 'edit' : 'add',
......@@ -202,7 +203,8 @@ Page({
staffPhone: formData?.staffPhone,
createdSource: 3, // 创建来源 固定3 生意助手
visualType: formData?.visualType,
visibleMerchantNoList: formData?.visualType == 0 ? undefined : formData?.selectedConnectionIds // 全部 无需传可见客户数据
visibleMerchantNoList: formData?.visualType == 0 ? undefined : formData?.selectedConnectionIds, // 全部 无需传可见客户数据
staffType: Number(formData?.staffType)
}
let message = addOrEdit == 'add' ? '是否确定创建员工?' : '是否确定修改员工信息?'
wx.showModal({
......
......@@ -72,7 +72,7 @@ Page({
}).then(res => {
this.setData({
connectionList: res || [],
selectedConnectionList: res?.filter(val => { return options?.selectedConnectionIds.length && options.selectedConnectionIds.includes(val.merchantId) }) || []
selectedConnectionList: res?.filter(val => { return options?.selectedConnectionIds?.length && options.selectedConnectionIds.includes(val.merchantId) }) || []
})
})
},
......
......@@ -11,7 +11,7 @@ Page({
bgUrl: `${IMG_URL}/personal/empty_tran.png`,
popupShow: false,
staffList: [],
selectInfo: { yqMerchantName: '全部服务中心', typeStr: '全部员工类型', type: '' },
selectInfo: { yqMerchantName: '全部服务中心', staffTypeStr: '全部员工类型', staffType: '' },
total: 0,
serviceList: [],
currentPage: 1,
......@@ -62,7 +62,7 @@ Page({
pageSize: 10,
pageNum: currentPage,
merchantNoList: selectInfo?.yqMerchantId ? [selectInfo?.yqMerchantId] : allServiceIds,
type: selectInfo.type
staffType: selectInfo.staffType
}
if (nothing || isAsk) {
return
......@@ -71,6 +71,9 @@ Page({
isAsk: true
})
mineApi.getStaffListAPI(params).then(res => {
res?.list?.forEach(val => {
val.staffTypeStr = val.staffType == 0 ? '驻店' : '技师'
})
let tempList = isReset ? res?.list || [] : this.data.staffList.concat(res?.list || [])
this.setData({
staffList: tempList,
......@@ -122,8 +125,8 @@ Page({
getStaffList(e) {
wx.$api.hideLoading()
let { selectInfo } = this.data
let { type, typeStr } = e.detail
if (type == '' && typeStr == '全部') e.detail.typeStr = '全部员工类型'
let { staffType, staffTypeStr } = e.detail
if (staffType == '' && staffTypeStr == '全部') e.detail.staffTypeStr = '全部员工类型'
let obj = {
...selectInfo,
...e.detail
......
......@@ -11,7 +11,7 @@
<view class="select-box">
<view class="select-btn">
<view class="type" bindtap="handleStaffTypeChange">
<text>{{selectInfo.typeStr}}</text>
<text>{{selectInfo.staffTypeStr}}</text>
<glsx-image class="point" src="index/point.png" />
</view>
</view>
......@@ -40,7 +40,7 @@
<glsx-image wx:if="{{!item.weChatAvatarUrl}}" src="personal/staff_defalut_avatar.png" class="avatar"/>
<image wx:else src="{{item.weChatAvatarUrl}}" class="avatar"></image>
<view class="message-text">
<view class="name"><text>{{item.staffName}}</text><text wx:if="{{item.type}}" class="type_tips">{{filter.filterType(item.type)}}</text></view>
<view class="name"><text>{{item.staffName}}</text><text wx:if="{{item.staffTypeStr}}" class="type_tips">{{filter.filterType(item.staffTypeStr)}}</text></view>
<view class="mobile">{{format.formatMobile(item.staffPhone)}}</view>
</view>
</view>
......
......@@ -8,6 +8,7 @@
background: #F7F7F7;
border-radius: 8rpx;
display: flex;
margin-top: -2rpx;
.merchant_text{
display: flex;
view{
......@@ -22,7 +23,7 @@
padding: 0 32rpx;
box-sizing: border-box;
font-size: 28rpx;
height: calc(100% - 100rpx);
height: calc(100% - 200rpx);
.month_item{
display: flex;
align-items: center;
......
......@@ -5,7 +5,9 @@
bind:hidePopup="hidePopup"
bindconfirm="confirm"
height="60%"
title="员工提成">
title="员工提成"
isTab="{{true}}"
popupSlotStyle="height: calc(100% - 200rpx)">
<!-- 服务多家门店不显示门店名称 -->
<view class="title_tips">
<view decode="{{true}}" class="merchant_text" wx:if="{{(handleCommissionObj.constructionStats && handleCommissionObj.constructionStats.length == 1) || (handleCommissionObj.outputValueStats && handleCommissionObj.outputValueStats.length == 1)}}">
......
......@@ -17,7 +17,7 @@ Component({
thisPage.setData({
isShowFilterScreen: true
})
this.setDate() // 默认展示当前月份
if (!this.data.formData.startTime || !this.data.formData.endTime) this.setDate() // 未选择时间默认展示当前月份
this.setViewData()
}
}
......@@ -182,9 +182,11 @@ Component({
target.map(i => (i.active = false))
target[index].active = true
} else {
target[index].active = true
target[index].active = !target[index].active
target[0].active = false
}
let activeFlag = target.findIndex(val => val.active)
if (activeFlag < 0) target[0].active = true
break
case 'sceneList':
target.map(i => (i.active = false))
......
......@@ -94,10 +94,14 @@
width: 316rpx;
height: 68rpx;
line-height: 68rpx;
font-size: 26rpx;
text-align: center;
background: #F7F7F7;
border-radius: 8rpx;
}
.box .date_box .date_item.placeholder{
color: #9E9EA8;
}
.box .list_box {
display: flex;
......
......@@ -48,9 +48,11 @@
</view>
</view>
<view class="date_box">
<view class="date_item">{{filter.filterDate(formData.startTime)}}</view>
<view class="date_item" wx:if="{{formData.startTime}}">{{filter.filterDate(formData.startTime) || '开始时间'}}</view>
<view class="date_item placeholder" wx:else>YYYY/MM</view>
<view>-</view>
<view class="date_item">{{filter.filterDate(formData.endTime)}}</view>
<view class="date_item" wx:if="{{formData.endTime}}">{{filter.filterDate(formData.endTime) || '结束时间'}}</view>
<view class="date_item placeholder" wx:else>YYYY/MM</view>
</view>
</view>
<view class="box" wx:if="{{tabType == 0}}">
......
......@@ -25,8 +25,8 @@
<view class="flex_spa-be">
<view class="merchant_num">服务门店·{{item.outputValueType == 1 ? item.outputValueStats.length : item.constructionStats.length}}家</view>
<view class="commission">
<view class="flex" data-target="{{item}}" bindtap="handleCommissionPopup"><text>提成</text><text class="arrow"></text></view>
<!-- <view class="disabled" wx:else="">提成未设置</view> -->
<view class="flex" wx:if="{{item.commissionFlag}}" data-target="{{item}}" bindtap="handleCommissionPopup"><text>提成</text><text class="arrow"></text></view>
<view class="disabled" wx:else="">提成未设置</view>
</view>
</view>
</view>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!