Commit e33713f4 by 李伟康

Merge branch 'SAAS+V4.35.0-0305' of http://192.168.3.233:8090/saas_plus/dj-car-b…

…outique-work-wechat into SAAS+V4.35.0-0305
2 parents 9ed7a470 a2eb1f24
......@@ -216,4 +216,9 @@ module.exports = {
getCustomerClueRemind(params = {}) {
return api.post('dj.api.smartcarlife.customer.clue.tips.newCount', params)
},
/** 获取驻店员工目标任务 */
getStaffTargetTaskApi(data) {
return api.post('dj.api.smartcarlife.staffTargetCheck.getTargetCheck', data)
}
}
......@@ -151,5 +151,10 @@ module.exports = {
/** 获取工资绩效员工信息及前3月绩效信息 */
staffInfo(data) {
return api.post('dj.api.businessSchool.staff.info', data)
},
/** 将驻店员工目标任务标记为已读 */
taskMarkAsReadApi(data){
return api.post('dj.api.smartcarlife.staffTargetCheck.readTargetCheck', data)
}
}
......@@ -101,7 +101,7 @@
<view class="item-footer">
<view>{{item.createdDate}}</view>
<!-- 超管isSuper/商户类型 userType 1账号不可操作 -->
<block wx:if="{{(!userInfo.isSuper && userInfo.userType == 2)||(item.orderStatus==2) }}">
<block wx:if="{{(!userInfo.isSuper && userInfo.userType == 2&&item.orderStatus!=4)||(item.orderStatus==2) }}">
<view
wx:if="{{item.orderStatus == '2'}}"
class="order-btn"
......
......@@ -320,7 +320,8 @@ Page({
// 标记错误--补录订单
if (orderInfo.resetOrder && orderInfo.id) {
orderInfo.oldQuotationId = orderInfo.id
orderInfo.transactionNo = orderInfo.transactionNo + ','
orderInfo.transactionNo = orderInfo.transactionNo || orderInfo.outTradeNo
orderInfo.transactionNo = orderInfo.transactionNo+','
let result = await errorOrderById(orderInfo)
return resolve(result)
}
......
......@@ -48,7 +48,7 @@
</view>
<order-popup
orderType="{{orderInfo.payType }}"
resetTransNo="{{orderInfo.transactionNo}}"
resetTransNo="{{orderInfo.transactionNo || orderInfo.outTradeNo}}"
resetOrder="{{orderInfo.resetOrder}}"
wx:if="{{showPopup}}"
show="{{showPopup}}" />
\ No newline at end of file
......@@ -82,6 +82,10 @@
<span class="green-txt">{{orderStatusObj[item.orderStatus]}}</span>
<!-- <span class="header-price">¥ {{item.quotedPriceUpdate || ''}}</span> -->
</view>
<view wx:elif="{{ item.orderStatus == '9'||item.orderStatus =='11'}}">
<span class="grey-txt">{{orderStatusObj[item.orderStatus]}}</span>
<!-- <span class="header-price">¥ {{item.quotedPriceUpdate || ''}}</span> -->
</view>
<view wx:else class="{{item.orderStatus == '-1' ? 'red-txt' : 'default-txt' }}">
{{orderStatusObj[item.orderStatus] || '--'}}
</view>
......@@ -155,7 +159,7 @@
</view>
<!-- 超管isSuper/商户类型 userType 1账号不可操作 -->
<block wx:if="{{!userInfo.isSuper && userInfo.userType == 2}}">
<view wx:if="{{item.orderStatus != '4' && item.orderStatus!=11}}" class="btn_class">
<view wx:if="{{item.orderStatus != '4' && item.orderStatus!=11&& item.orderStatus!=9}}" class="btn_class">
<view wx:if="{{item.orderStatus == '-1' || item.orderStatus == '0'}}" class="order-btn" bindtap="handleClickBtn" data-target="{{item}}">
{{btnTxt[item.orderStatus]}}
</view>
......
......@@ -289,6 +289,13 @@
border-radius: 4rpx;
}
.grey-txt{
background: #F2F3F5;
color: #999999;
padding: 4rpx 8rpx;
font-size: 24rpx;
border-radius: 4rpx;
}
.red-txt {
color: #EB4E4E;
background: #FDECE9;
......
......@@ -83,10 +83,6 @@ Component({
menuText: '新建工单',
icon: 'create_order',
path: ''
}, {
menuText: '驻店目标',
icon: 'resident_target',
path: 'packageEquity.residentTarget'
}],
loginRoleLabel: {
1: '超管',
......@@ -140,6 +136,37 @@ Component({
this.getData()
this.getTotal(this.data.dataActive)
this.getYqStoreConfig()
// 获取驻店员工目标
this.getStaffTargetTask()
},
getStaffTargetTask() {
let userInfo = wx.$util.getUserInfo()
let { menuList } = this.data
commonApi.getStaffTargetTaskApi({
sceneType: 0,
merchantId: userInfo?.default4SStoreInfo?.merchantId
}).then(res => {
let { code, data, message } = res
if (code == 0) {
// 切换门店 需删除入口 重新请求判断显示入口
let index = menuList.findIndex(v => v.menuText == '驻店目标')
if (index > -1) menuList.splice(index, 1)
if ((data?.length) && menuList.every(item => item.name != '驻店目标')) {
menuList.push({
menuText: '驻店目标',
path: 'packageEquity.residentTarget',
icon: 'resident_target',
noRead: data[0]?.readFlag == 'N'
})
}
this.setData({
taskId: data[0]?.id,
menuList
})
} else {
wx.$util.showToast(message)
}
})
},
getTotal() {
let {
......@@ -247,11 +274,18 @@ Component({
navGo(e) {
let {
mode,
taskId
} = this.data
let {
item
} = e.currentTarget.dataset
if (item.path) wx.$router.go(item.path)
if (item.path) {
if (item.menuText == '驻店目标') {
wx.$router.go(item.path, {id: taskId})
} else {
wx.$router.go(item.path)
}
}
else {
// 工资绩效特殊处理
if (item.menuText == '工资绩效') {
......
......@@ -237,3 +237,14 @@
display: flex;
justify-content: center;
}
.bubble_icon{
position: absolute;
right: 14rpx;
top: 12rpx;
width: 16rpx;
height: 16rpx;
background: #F24724;
border-radius: 16rpx;
display: flex;
justify-content: center;
}
......@@ -81,6 +81,7 @@
</view>
<view class="text">{{item.menuText}}</view>
<view class="hot_icon" wx:if="{{item.tipsNum}}">{{item.tipsNum}}</view>
<view class="bubble_icon" wx:if="{{item.noRead}}"></view>
</view>
</block>
</block>
......
// packageEquity/pages/residentTarget/residentTarget.js
import { taskMarkAsReadApi } from '../../api'
import { ImgUrl } from '~/config.js'
Page({
/**
* 页面的初始数据
*/
data: {
navStyle: 'background-color: transparent;box-shadow:none;'
ImgUrl: ImgUrl + '/miniProgram/',
navStyle: 'background-color: transparent;box-shadow:none;',
taskInfo: {},
userInfo: {}
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
onRoute(options) {
// 读取员工任务
this.markAsRead(options)
this.setData({
userInfo: wx.$util.getUserInfo()
})
},
markAsRead(options) {
taskMarkAsReadApi({id: options?.id}).then(res => {
let { code, data, message } = res
if (code == 0) {
data?.taskList?.map(val => {
val.checkMonthPeriod = `${{1: '首月', 2: '次月', 3: '第三月'}[data?.checkMonth]}-${{1: '上半月', 2: '下半月'}[data?.checkPeriod]}` // 考核周期
let carArr = []
val?.carList?.forEach(subV => {
carArr.push(`${subV.carBrand}-${subV.carChildsBrandName}-${subV.carSeriesName}`)
})
val.carText = carArr.join('/') // 车辆类型
let goodsTypeArr = []
val?.goodsTypeList?.map(v => {
goodsTypeArr.push(v?.goodsTypeName)
})
val.goodsTypeText = goodsTypeArr.join('/') // 商品分类
})
this.setData({
taskInfo: data
})
} else {
wx.$util.showToast(message)
}
})
},
navbarReady(e) {
let navBarHeight = e.detail.height
......@@ -20,6 +57,11 @@ Page({
navBarHeight
})
},
back() {
wx.$router.back()
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
......
......@@ -25,12 +25,61 @@ page{
width: 662rpx;
height: 360rpx;
margin: 20rpx auto 8rpx;
&-bg {
&-bg {
position: absolute;
z-index: -1;
width: 100%;
height: 100%;
}
.box_content{
display: flex;
flex-flow: column;
align-items: space-between;
justify-content: space-between;
padding: 52rpx;
.top{
display: flex;
align-items: center;
.avatar{
width: 96rpx;
height: 96rpx;
}
.nameCon{
display: flex;
flex-flow: column;
.nameLabel{
font-size: 24rpx;
color: #999EA8;
}
.name{
font-size: 34rpx;
font-weight: 500;
color: #347BFF;
}
}
}
.bottom{
margin-top: 56rpx;
font-weight: 400;
display: flex;
.left{
width: 230rpx;
}
.right{
margin-left: 40rpx;
}
.left,.right{
.hierophantLabel{
font-size: 22rpx;
color: #999EA8;
}
.name{
font-size: 28rpx;
color: #347BFF;
}
}
}
}
}
......@@ -50,4 +99,72 @@ page{
height: 16rpx;
}
}
.task_detail_content{
.detail_item{
margin: 20rpx;
background: #FFFFFF;
border-radius: 16rpx;
padding: 32rpx;
}
.item_box{
margin-bottom: 24rpx;
display: flex;
font-size: 28rpx;
color: #292D33;
.textLabel{
width: 180rpx;
text-align: left;
color: #999EA8;
}
.textLabel.mar_b20{
margin-bottom: 20rpx;
}
.upgradeGoodsName{
position: relative;
display: flex;
align-items: center;
padding-left: 32rpx;
/* margin-bottom: 20rpx; */
position: relative;
justify-content: space-between;
margin: 16rpx;
&::after {
position: absolute;
width: 12rpx;
height: 12rpx;
top: 50%;
left: 0;
transform: translateY(-50%);
content: '';
background: #347BFF;
border-radius: 100%;
}
}
.coefficient_value{
display: grid;
grid-template-columns: repeat(2, 328rpx);
justify-content: space-between;
grid-gap: 16rpx;
align-items: center;
.value_item{
background: #F6FCFE;
border-radius: 6px;
padding: 20rpx 48rpx;
.valueLabel{
color: #5A5E66;
}
.valueNum{
font-size: 40rpx;
font-family: 'numberBold';
}
.valueNum.blue{
color: #347BFF;
}
}
}
}
.item_box.block{
flex-flow: column
}
}
}
\ No newline at end of file
......@@ -11,6 +11,26 @@
<view class="user-info-bg">
<gl-image webp src="/equity/card-bg.png"></gl-image>
</view>
<view class="box_content">
<view class="top">
<image class="avatar" src="{{ ImgUrl+'avatarIcon.png' }}"></image>
<view class="nameCon">
<view class="nameLabel">姓名</view>
<view class="name">{{taskInfo.staffName}}</view>
</view>
</view>
<view class="bottom">
<view class="left">
<view class="hierophantLabel">业务场景</view>
<view class="name">{{['会员权益/升级', '精品升级'][taskInfo.targetCofig.sceneType]}}</view>
</view>
<view class="right">
<view class="hierophantLabel">所属门店</view>
<view class="name">{{userInfo.merchantName}} </view>
</view>
</view>
</view>
</view>
<view class="title">
驻店目标
......@@ -18,4 +38,79 @@
<gl-image webp src="/equity/title-bg.png"></gl-image>
</view>
</view>
<view class="task_detail_content">
<block wx:for="{{taskInfo.taskList}}" wx:for-item="item" wx:for-index="index" wx:key="index">
<view class="detail_item">
<view class="item_box">
<view class="textLabel">考核周期</view>
<view class="textName">{{item.checkMonthPeriod}}</view>
</view>
<view class="item_box" wx:if="{{item.selectCarType == 1}}">
<view class="textLabel">车辆价格</view>
<view class="textName">{{item.minCarPrice}}-{{item.maxCarPrice}}万</view>
</view>
<view class="item_box" wx:if="{{item.selectCarType == 2}}">
<view class="textLabel">车辆类型</view>
<view class="textName">{{taskInfo.carText}}</view>
</view>
<view class="item_box" wx:if="{{item.selectGoodsType == 1}}">
<view class="textLabel">商品分类</view>
<view class="textName">{{taskInfo.goodsTypeText}}</view>
</view>
<view class="item_box block">
<view class="textLabel mar_b20">主推产品套餐</view>
<view class="package_box">
<!-- 单商品/多商品模式在商品信息内 -->
<block wx:if="{{item.selectPackageType == 1}}">
<block wx:for="{{item.packageList}}" wx:for-item="monItem" wx:for-index="monIndex" wx:key="monIndex">
<view class="upgradeGoodsName">{{monItem.upgradeGoodsName}}</view>
<view class="coefficient_value">
<view class="value_item">
<view class="valueLabel">目标转化率</view>
<view class="valueNum blue">{{monItem.conversionRate}}<text style="font-size: 24rpx;font-weight: 700;margin-right: 4rpx;">%</text></view>
</view>
<view class="value_item">
<view class="valueLabel">提成系数</view>
<view class="valueNum">{{monItem.conversionRatePercentage}}<text style="font-size: 24rpx;margin-right: 4rpx;">%</text></view>
</view>
<view class="value_item">
<view class="valueLabel">目标客单价</view>
<view class="valueNum blue"><text style="font-size: 24rpx;margin-right: 4rpx;">¥</text>{{monItem.customerUnitPrice}}</view>
</view>
<view class="value_item">
<view class="valueLabel">提成系数</view>
<view class="valueNum">{{monItem.customerUnitPricePercentage}}<text style="font-size: 24rpx;margin-right: 4rpx;">%</text></view>
</view>
</view>
</block>
</block>
<!-- 无/商品组合 -->
<block wx:else>
<block wx:for="{{item.packageList}}" wx:for-item="monItem" wx:for-index="monIndex" wx:key="monIndex">
<view class="upgradeGoodsName">{{monItem.upgradeGoodsName}}</view>
</block>
<view class="coefficient_value">
<view class="value_item">
<view class="valueLabel">目标转化率</view>
<view class="valueNum blue">{{item.conversionRate || 0}}<text style="font-size: 24rpx;margin-right: 4rpx;">%</text></view>
</view>
<view class="value_item">
<view class="valueLabel">提成系数</view>
<view class="valueNum">{{item.conversionRatePercentage || 0}}<text style="font-size: 24rpx;margin-right: 4rpx;">%</text></view>
</view>
<view class="value_item">
<view class="valueLabel">目标客单价</view>
<view class="valueNum blue"><text style="font-size: 24rpx;margin-right: 4rpx;">¥</text>{{item.customerUnitPrice || 0}}</view>
</view>
<view class="value_item">
<view class="valueLabel">提成系数</view>
<view class="valueNum">{{item.customerUnitPricePercentage || 0}}<text style="font-size: 24rpx;margin-right: 4rpx;">%</text></view>
</view>
</view>
</block>
</view>
</view>
</view>
</block>
</view>
</view>
\ No newline at end of file
......@@ -250,7 +250,8 @@ Page({
type
} = e.currentTarget.dataset
let {
userInfo
userInfo,
taskId
} = this.data
// 工资绩效
if (item.name == '工资绩效') {
......@@ -284,7 +285,11 @@ Page({
}
})
} else {
wx.$router.go(item.url)
if (item.name == '驻店目标') {
wx.$router.go(item.url, {id: taskId})
} else {
wx.$router.go(item.url)
}
}
} else {
if (!['tabWorkOrder.createOrder', 'tabWorkOrder.createArchives', 'tabWorkOrder.defeatOrder'].includes(item.url)) {
......@@ -655,6 +660,8 @@ Page({
...result
})
})
// 切换门店 获取驻店员工目标
this.getStaffTargetTask()
},
checkShowOrderPop(options) {
let userInfo = wx.$util.getStorageSync('dj_boutique_user_info')
......@@ -697,6 +704,38 @@ Page({
})
this.get4SStoreList()
this.getIsBusinessSchoolEnableCurrentUser()
// 获取驻店员工目标
this.getStaffTargetTask()
},
getStaffTargetTask() {
let userInfo = wx.$util.getUserInfo()
let { menu } = this.data
commonApi.getStaffTargetTaskApi({
sceneType: 1,
merchantId: userInfo?.default4SStoreInfo?.merchantId
}).then(res => {
let { code, data, message } = res
if (code == 0) {
// 切换门店 需删除入口 重新请求判断显示入口
let index = menu.findIndex(v => v.name == '驻店目标')
if (index > -1) menu.splice(index, 1)
if ((data?.length) && menu.every(item => item.name != '驻店目标')) {
menu.push({
name: '驻店目标',
url: 'packageEquity.residentTarget',
icon: 'resident_target',
noRead: data[0]?.readFlag == 'N'
})
}
this.setData({
taskId: data[0]?.id,
menu
})
} else {
wx.$util.showToast(message)
}
})
},
getIsBusinessSchoolEnableCurrentUser() {
......
......@@ -214,6 +214,18 @@ page ::-webkit-scrollbar {
justify-content: center;
}
.menu .item .bubble_icon{
position: absolute;
right: 14rpx;
top: 12rpx;
width: 16rpx;
height: 16rpx;
background: #F24724;
border-radius: 16rpx;
display: flex;
justify-content: center;
}
.contentUtil {
padding: 0 20rpx;
}
......
......@@ -86,6 +86,7 @@
<view class="label">{{item.name}}</view>
<view class="hot_icon" wx:if="{{item.hot}}">热</view>
<view class="hot_icon" wx:if="{{item.tipsNum}}">{{item.tipsNum}}</view>
<view class="bubble_icon" wx:if="{{item.noRead}}"></view>
</view>
</block>
</div>
......
......@@ -67,12 +67,6 @@ export default {
type:"mini",
recordId: 12,
icon: 'boutique-syzs'
},
{
name: '驻店目标',
url: 'packageEquity.residentTarget',
recordId: 11,
icon: 'resident_target'
}
],
totalTableSum: [
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!