Commit 93233a2f by zhangxw

联调修改

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