Commit 91aa05e0 by zhangxw

修改

1 parent 98e6cfea
......@@ -75,7 +75,7 @@ Page({
this.setData({
staffList: tempList,
currentPage: currentPage + 1,
total: res.count,
total: res.total,
nothing: res.count == tempList.length,
triggered: false
})
......
......@@ -171,9 +171,10 @@ Page({
})
let { serviceMerchatList } = await getMockData() || { serviceMerchatList: [] }
this.setData({
isShowService: serviceMerchatList.includes(userInfo.merchantId + '')
})
// v4.27.0_0831版本隐藏加微入口
// this.setData({
// isShowService: serviceMerchatList.includes(userInfo.merchantId + '')
// })
this.judgeIsHide()
console.log(serviceMerchantId)
},
......
......@@ -37,9 +37,8 @@ Component({
}, {
month: '2023-03',
ruleStatus: '1',
commission: 5230
commission: 5230.1
}
],
nowMonth: getNowMonth()
},
......
......@@ -16,10 +16,10 @@
</view>
<scroll-view scroll-y class="month_box">
<view class="month_item" wx:for="{{monthCommossionData}}" wx:key="index">
<view class="month">{{filter.getMonth(item.month)}}月份<view class="inline_b" wx:if="{{nowMonth == item.month}}">(当前月)</view></view>
<view class="month">{{item.month}}<view class="inline_b" wx:if="{{nowMonth == item.month}}">(当前月)</view></view>
<view wx:if="{{item.ruleStatus == '1' && nowMonth == item.month}}" class="tips">提成在本月完结后自动计算</view>
<view wx:if="{{item.ruleStatus == '0'}}" class="tips">提成未设置,请登录后台设置</view>
<view wx:if="{{item.ruleStatus == '1' && nowMonth != item.month}}" class="commissionNum">¥{{filter.setPrice(item.commission)}}</view>
<view wx:if="{{item.ruleStatus == '1' && nowMonth != item.month}}" class="commissionNum">¥{{filter.money_three_for_two_thousands(item.commission || '0.00', false)}}</view>
</view>
</scroll-view>
</popup>
......@@ -17,7 +17,9 @@ Component({
data: {
merchantList: [],
popupShow: false,
confirmShow: false
confirmShow: false,
pageLoaded: false,
userInfo: {}
},
lifetimes: {
......@@ -50,13 +52,14 @@ Component({
let { code, data } = res
if (code == '0') {
this.setData({
merchantList: data
merchantList: data,
pageLoaded: true,
userInfo
})
}
})
},
handleMerchantChange(e) {
console.log('111111')
let {merchantId, merchantName} = e.detail
let { formData } = this.data
const thisPage = wx.$router.getPageInstance()
......
......@@ -12,4 +12,4 @@
<!-- 选择门店 -->
<select-merchant-popup wx:if="{{popupShow}}" bind:hidePopup="handleSlectMerchant" bindmerchantConfirm="handleMerchantChange" selectInfo="{{formData}}" popShow="{{popupShow}}" merchantRange="{{merchantList}}" isTab="{{true}}"/>
<!-- 筛选 -->
<screen-confirm-box wx:if="{{confirmShow}}" tabBarStyle="{{tabBarStyle}}" show="{{confirmShow}}" formData="{{formData}}" tabType="{{tabType}}" bindreloadMerchantList="getMerchantList"></screen-confirm-box>
\ No newline at end of file
<screen-confirm-box wx:if="{{pageLoaded}}" tabBarStyle="{{tabBarStyle}}" show="{{confirmShow}}" userInfo="{{userInfo}}" formData="{{formData}}" tabType="{{tabType}}" bindreloadMerchantList="getMerchantList"></screen-confirm-box>
\ No newline at end of file
......@@ -17,20 +17,19 @@ Component({
thisPage.setData({
isShowFilterScreen: true
})
if (this.data.tabType == 1) this.setDate() // 员工默认展示当前月份
this.setViewData()
this.updateUserInfo()
}
}
},
tabType: Number // tab值 0我的门店 1我的员工
tabType: Number, // tab值 0我的门店 1我的员工
userInfo: Object
},
/**
* 组件的初始数据
*/
data: {
userInfo: {},
isSuper: false,
servicePopupShow: false,
merchantRange: [],
sceneList: [
......@@ -59,13 +58,6 @@ Component({
* 组件的方法列表
*/
methods: {
updateUserInfo() {
let { userInfo } = wx.$storage.get()
this.setData({
userInfo,
isSuper: userInfo.isSuper
})
},
setViewData() {
let { tabBarStyle } = this.data
wx.$api.getViewInfo(
......@@ -80,9 +72,9 @@ Component({
)
},
getMerchantRange() {
let { isSuper, userInfo } = this.data
let { userInfo } = this.data
// 判断是超管才需要切换账号
if (isSuper) {
if (userInfo?.isSuper) {
USERAPI.adminSelectLogin()
.then(result => {
let { merchantList: merchantRange } = result
......@@ -138,6 +130,9 @@ Component({
formData
})
},
setDate() {
},
getLastDay(year, month) {
var new_year = year //取当前的年份
var new_month = month++ //取下一个月的第一天,方便计算(最后一天不固定)
......@@ -181,7 +176,7 @@ Component({
},
init() {
this.getMerchantRange()
if (this.data.tabType == 1) this.getStaffList() // 我的员工有员工筛选条件
this.getStaffList() // 我的员工有员工筛选条件
},
choose(e) {
let { index, listName } = e.currentTarget.dataset
......
......@@ -6,7 +6,7 @@
<view class="box">
<view class="title">
服务商名称
<block wx:if="{{isSuper}}">
<block wx:if="{{userInfo.isSuper}}">
<view class="picker_box" bindtap="servicePicker">
<view class="picker_text">
切换
......
......@@ -2,6 +2,7 @@
const IMAGES = Object.freeze({
userAvatarUrl: `/personal/userAvatarUrl.png`
})
import { IMG_URL } from '~/utils/constantData'
Component({
/**
* 组件的属性列表
......@@ -15,6 +16,7 @@ Component({
*/
data: {
IMAGES,
IMG_URL,
dataList: [{
staffRoleName: '技师',
staffName: '张三',
......@@ -84,7 +86,8 @@ Component({
]
}],
commissionPopup: false,
handleCommissionObj: {}
handleCommissionObj: {},
bgUrl: `${IMG_URL}/personal/empty_tran.png`,
},
/**
......@@ -95,7 +98,7 @@ Component({
let { target } = e.currentTarget.dataset
this.setData({
commissionPopup: !this.data.commissionPopup,
handleCommissionObj: target
handleCommissionObj: target || {}
})
},
showMore(e) {
......
<!--pages/tab/outputValue/components/employees/employess.wxml-->
<wxs src="../../index.wxs" module="filter" />
<scroll-view scroll-y
enable-back-to-top
refresher-enabled="{{true}}"
......@@ -18,7 +19,7 @@
<view class="name">{{item.staffName}}</view>
<view class="role_name">「{{item.staffRoleName}}」</view>
</view>
<view class="output_text"><text style="font-size: 24rpx;">¥</text><text>{{item.totalOutputValue}}</text></view>
<view class="output_text"><text style="font-size: 24rpx;">¥</text><text>{{filter.money_three_for_two_thousands(item.totalOutputValue || '0.00', false)}}</text></view>
</view>
<view class="flex_spa-be">
<view class="merchant_num">服务门店·{{item.outputValueType == 1 ? item.outputValueStats.length : item.constructionStats.length}}家</view>
......@@ -41,8 +42,8 @@
<view class="merchant_item flex_spa-arr" style="{{item.outputValueStats.length > 3 && !item.showMore && subIndex == 2 ? 'border:none;' : ''}}" wx:if="{{subIndex < 3 || item.showMore}}">
<view class="flex_2 name">{{subItem.shopMerchantName}}</view>
<view class="flex_1">
<view class="font_wei">{{'¥' + subItem.totalOrderMoney}}</view>
<view>{{'¥' + subItem.customerUnitPrice}}</view>
<view class="font_wei">{{'¥' + filter.money_three_for_two_thousands(subItem.totalOrderMoney || '0.00', false)}}</view>
<view>{{'¥' + filter.money_three_for_two_thousands(subItem.customerUnitPrice || '0.00', false)}}</view>
</view>
<view class="flex_1 padd_r16">
<view class="font_wei">{{subItem.orderCount}}单</view>
......
......@@ -46,15 +46,10 @@ var threeNumForTwo = {
}
}
var getMonth = function (n) {
if (n) return n.split('-').length && Number(n.split('-')[1])
}
/*
* 导出
*/
module.exports = {
setPrice: setPrice,
money_three_for_two_thousands: threeNumForTwo.money_three_for_two_thousands, //暴露接口调用
getMonth: getMonth
}
......@@ -65,6 +65,7 @@ Page({
},
// 筛选回调
searchEvent(isNoBack = false) {
console.log(this.data.screenFormData, 'screenFormData')
if (!isNoBack) this.back()
},
setUserInfo() {
......
......@@ -19,9 +19,6 @@
<merchant id="merchant" />
</view>
<!-- 我的员工 -->
<!-- <view class="comCom" hidden="{{tabIndx != 1}}">
<staff id="staff" />
</view> -->
<view class="comCom" hidden="{{tabIndx != 1}}">
<employess id="employess"/>
</view>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!