Commit 6c71ad6b by 前端

Merge branch 'SAAS+V4.44-0902' into 'develop'

上线合并

See merge request !323
2 parents 9538f958 b07afbc4
...@@ -318,4 +318,14 @@ module.exports = { ...@@ -318,4 +318,14 @@ module.exports = {
// return api.post('dj.api.smartcarlife.staff.daily.report.merchant.valid', data) // return api.post('dj.api.smartcarlife.staff.daily.report.merchant.valid', data)
return api.post("dj.api.smartcarlife.staff.daily.report.popup.need", data); return api.post("dj.api.smartcarlife.staff.daily.report.popup.need", data);
}, },
// 获取积分审批列表数据
getPointsReviewListAPI(data) {
return api.post('dj.api.smartcarlife.staff.motivation.page', data)
},
// 积分审批通过
approvedPointsAPI(data) {
return api.post('dj.api.smartcarlife.staff.motivation.audit', data)
}
}; };
...@@ -20,6 +20,7 @@ import { ...@@ -20,6 +20,7 @@ import {
setSystem_info, setSystem_info,
getNoSignInUuid, getNoSignInUuid,
removeSystemStorage, removeSystemStorage,
rmNoSignInUuid
} from "~/utils/cache/storageApi"; } from "~/utils/cache/storageApi";
setSystem_info(); // 存储设备信息 setSystem_info(); // 存储设备信息
import { checkYqdSuper, checkScene } from "~/store/index"; import { checkYqdSuper, checkScene } from "~/store/index";
...@@ -118,8 +119,12 @@ App({ ...@@ -118,8 +119,12 @@ App({
let res = checkScene(options); let res = checkScene(options);
// console.log(res, 'res') // console.log(res, 'res')
// 如果需要重新登录 // 如果需要重新登录 去掉30天免登录逻辑避免自动登录直接跳回到首页去
res && this.login(true, res); if (res) {
rmNoSignInUuid()
this.login(true, res);
}
// res &&
} }
}, },
login(relogin, context, RequestMethods) { login(relogin, context, RequestMethods) {
...@@ -155,7 +160,7 @@ App({ ...@@ -155,7 +160,7 @@ App({
} else { } else {
let thisPage = wx.$router.getPageInstance() let thisPage = wx.$router.getPageInstance()
// 启动页loading中的埋点接口 在触发登录超时后 ios端wx.showModal会被页面跳转截断,导致无弹窗,将loading页面这个埋点接口的登录超时不做弹窗处理 // 启动页loading中的埋点接口 在触发登录超时后 ios端wx.showModal会被页面跳转截断,导致无弹窗,将loading页面这个埋点接口的登录超时不做弹窗处理
if (thisPage.route == 'pages/loading/loading' && RequestMethods.includes('dj.api.smartcarlife.staff.login.record.save')) return if (thisPage?.route == 'pages/loading/loading' && RequestMethods.includes('dj.api.smartcarlife.staff.login.record.save')) return
// 标志位 解决安卓查复弹框问题 // 标志位 解决安卓查复弹框问题
if (wx.__HAS_NOTLOGIN_MODAL) return false; if (wx.__HAS_NOTLOGIN_MODAL) return false;
wx.__HAS_NOTLOGIN_MODAL = true; wx.__HAS_NOTLOGIN_MODAL = true;
......
...@@ -13,7 +13,8 @@ ...@@ -13,7 +13,8 @@
"pages/tabDateIndex/pages/tabDateIndex", "pages/tabDateIndex/pages/tabDateIndex",
"pages/log/log", "pages/log/log",
"pages/changeScene/changeScene", "pages/changeScene/changeScene",
"pages/materails/index" "pages/materails/index",
"pages/pointsReview/pointsReview"
], ],
"window": { "window": {
"backgroundTextStyle": "light", "backgroundTextStyle": "light",
......
...@@ -376,6 +376,7 @@ ...@@ -376,6 +376,7 @@
} }
.order-content { .order-content {
margin-top: var(--fontSize24);
display: flex; display: flex;
} }
...@@ -384,7 +385,11 @@ ...@@ -384,7 +385,11 @@
font-weight: 500; font-weight: 500;
font-size: var(--fontSize30); font-size: var(--fontSize30);
color: #333333; color: #333333;
padding-bottom: var(--fontSize24); display: -webkit-box;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
-webkit-line-clamp: 2;
} }
.order-list .pro-bg { .order-list .pro-bg {
...@@ -454,6 +459,11 @@ ...@@ -454,6 +459,11 @@
width: calc(100% - var(--fontSize120)); width: calc(100% - var(--fontSize120));
display: flex; display: flex;
align-items: center; align-items: center;
display: -webkit-box;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
-webkit-line-clamp: 2;
} }
.list .item .order .order-value .order-value-item:first-of-type { .list .item .order .order-value .order-value-item:first-of-type {
......
...@@ -5,7 +5,7 @@ page { ...@@ -5,7 +5,7 @@ page {
.item_box { .item_box {
box-sizing: border-box; box-sizing: border-box;
padding: var(--fontSize32); padding: 0 var(--fontSize32);
width: var(--fontSize710); width: var(--fontSize710);
height: var(--fontSize120); height: var(--fontSize120);
margin: var(--fontSize20) auto 0; margin: var(--fontSize20) auto 0;
...@@ -19,7 +19,13 @@ page { ...@@ -19,7 +19,13 @@ page {
font-weight: 500; font-weight: 500;
font-size: var(--fontSize32); font-size: var(--fontSize32);
color: #222222; color: #222222;
.goods-name-text{
display: -webkit-box;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
-webkit-line-clamp: 2;
}
} }
.arrow { .arrow {
...@@ -42,6 +48,7 @@ page { ...@@ -42,6 +48,7 @@ page {
margin-left: 40prx;} margin-left: 40prx;}
.icon { .icon {
flex-shrink: 0;
width: var(--fontSize40); width: var(--fontSize40);
height: var(--fontSize40); height: var(--fontSize40);
} }
\ No newline at end of file \ No newline at end of file
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<view class="box"> <view class="box">
<view class="list_container" wx:for="{{ list }}" wx:key="index"> <view class="list_container" wx:for="{{ list }}" wx:key="index">
<view class="item_box"> <view class="item_box">
<view wx:if="{{ item.goodName }}">合同:{{item.goodName}}</view> <view class="goods-name-text" wx:if="{{ item.goodName }}">合同:{{item.goodName}}</view>
<view wx:else>合同{{item.label}}</view> <view wx:else>合同{{item.label}}</view>
<!-- <image src="" binderror="" bindload=""></image> --> <!-- <image src="" binderror="" bindload=""></image> -->
<!-- <view class="arrow"></view> --> <!-- <view class="arrow"></view> -->
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<view class="value " catchtap="choose" data-index="{{index}}" data-ind="{{ind}}" data-item="{{i}}"> <view class="value " catchtap="choose" data-index="{{index}}" data-ind="{{ind}}" data-item="{{i}}">
<block wx:if="{{i.goods}}"> <block wx:if="{{i.goods}}">
<view class="name text-hide "> <view class="name text-hide ">
<view>{{filter.replaceItemText(i.goods.goodsAlias) ||filter.replaceItemText(i.goods.upgradeGoodsName) || filter.replaceItemText(i.goods.goodsInfo.goodsName)}}</view> <view class="text-hide">{{filter.replaceItemText(i.goods.goodsAlias) ||filter.replaceItemText(i.goods.upgradeGoodsName) || filter.replaceItemText(i.goods.goodsInfo.goodsName)}}</view>
<!-- <text wx:if="{{i.merchantGoodsPosition && i.goodsInfo.goodsType == 1}}">{{'「' + i.positionStr+'」'}}</text> --> <!-- <text wx:if="{{i.merchantGoodsPosition && i.goodsInfo.goodsType == 1}}">{{'「' + i.positionStr+'」'}}</text> -->
<view class="serveName" wx:if="{{i.goods.serveName}}">(包含{{i.goods.serveName}})</view> <view class="serveName" wx:if="{{i.goods.serveName}}">(包含{{i.goods.serveName}})</view>
<!-- <text class="warning_text" wx:if="{{!i.merchantGoodsPosition && i.goodsInfo.goodsType == 1}}">无部位</text> --> <!-- <text class="warning_text" wx:if="{{!i.merchantGoodsPosition && i.goodsInfo.goodsType == 1}}">无部位</text> -->
......
...@@ -120,6 +120,7 @@ Page({ ...@@ -120,6 +120,7 @@ Page({
item.paySuccessTimeLabel = wx.$util.tsFormatTime(item.paySuccessTime, 'Y年M月D日 h:m:s') item.paySuccessTimeLabel = wx.$util.tsFormatTime(item.paySuccessTime, 'Y年M月D日 h:m:s')
return item return item
}) })
data.orderList = data.orderList.slice(0, 100)
// wx.$util.tsFormatTime(data.orderTime, 'Y年M月D日 h:m:s') // wx.$util.tsFormatTime(data.orderTime, 'Y年M月D日 h:m:s')
orderList.push({ ...data }) orderList.push({ ...data })
// 当获取不到数据 无法触发scroll-view 触底加载 手动触发加载 // 当获取不到数据 无法触发scroll-view 触底加载 手动触发加载
...@@ -165,7 +166,7 @@ Page({ ...@@ -165,7 +166,7 @@ Page({
} }
item.staffDataList = item.staffDataList.map((childItem) => { item.staffDataList = item.staffDataList.map((childItem) => {
// 工资=最终工资finalWage-绩效提成performanceWage // 工资=最终工资finalWage-绩效提成performanceWage
childItem.wages = this.Subtr(childItem?.finalWage, childItem?.performanceWage) childItem.wages = this.Subtr(childItem?.finalWage, childItem?.performanceWage)
// if (Boolean(childItem.minimumWage && childItem.minimumWage > childItem.finalWage)) { // if (Boolean(childItem.minimumWage && childItem.minimumWage > childItem.finalWage)) {
// childItem.finalWage = childItem.minimumWage // childItem.finalWage = childItem.minimumWage
// // item.performanceWage = 0 // // item.performanceWage = 0
...@@ -209,22 +210,22 @@ Page({ ...@@ -209,22 +210,22 @@ Page({
}) })
}, },
// 减法运算解决精度丢失问题 // 减法运算解决精度丢失问题
Subtr(num1, num2) { Subtr(num1, num2) {
var r1, r2, m, n var r1, r2, m, n
try{ try {
r1 = num1.toString().split('.')[1].length r1 = num1.toString().split('.')[1].length
} catch(e) { } catch (e) {
r1 = 0 r1 = 0
} }
try{ try {
r2 = num2.toString().split(".")[1].length r2 = num2.toString().split(".")[1].length
}catch(e) { } catch (e) {
r2 = 0 r2 = 0
} }
m = Math.pow(10, Math.max(r1, r2)) m = Math.pow(10, Math.max(r1, r2))
n = (r1 >= r2) ? r1 : r2 n = (r1 >= r2) ? r1 : r2
return ((num1 * m - num2 * m) / m).toFixed(n) return ((num1 * m - num2 * m) / m).toFixed(n)
}, },
getDetailInfo() { getDetailInfo() {
let monthArray = this.getYearMonthArray() let monthArray = this.getYearMonthArray()
this.setData({ this.setData({
......
...@@ -437,6 +437,14 @@ Component({ ...@@ -437,6 +437,14 @@ Component({
sortVal: 11 sortVal: 11
}) })
} }
if (userInfo.loginRole == 3 && menuList.every((item) => item.menuText != '积分审批')) {
menuList.unshift({
menuText: "积分审批",
path: "pages.pointsReview",
icon: "points_review",
sortVal: 12
})
}
// if ( // if (
// userInfo.isSuper && // userInfo.isSuper &&
// menuList.every((item) => item.menuText != "质检管理") // menuList.every((item) => item.menuText != "质检管理")
......
...@@ -474,7 +474,7 @@ swiper{ ...@@ -474,7 +474,7 @@ swiper{
position: sticky; position: sticky;
top: 0; top: 0;
left: 0; left: 0;
z-index: 1000; z-index: 100;
} }
&.bg-white{ &.bg-white{
background: #FFFFFF; background: #FFFFFF;
......
...@@ -102,7 +102,7 @@ ...@@ -102,7 +102,7 @@
</block> </block>
</view> --> </view> -->
</view> </view>
<view class="receive-list" wx:if="{{storeRangeList.length}}"> <view class="receive-list" wx:if="{{storeRangeList.length || userInfo.loginRole == 3}}">
<view class="'screen-box' {{showScreen ? '' : 'sticky-screen'}} {{isScrollTop ? 'bg-white' : ''}}"> <view class="'screen-box' {{showScreen ? '' : 'sticky-screen'}} {{isScrollTop ? 'bg-white' : ''}}">
<view> <view>
<!-- <text class="title">接待记录</text> --> <!-- <text class="title">接待记录</text> -->
......
...@@ -34,7 +34,7 @@ const pageUrl = { ...@@ -34,7 +34,7 @@ const pageUrl = {
0: 'packageEquity.equityPage', 0: 'packageEquity.equityPage',
1: 'tabIndex.index', 1: 'tabIndex.index',
3: 'packageCrowdFunding.crowdFundingPage', 3: 'packageCrowdFunding.crowdFundingPage',
2: 'subvehicleConversion.conversionPage' 2: 'subvehicleConversion.conversionPage',
} }
export default { export default {
......
...@@ -72,7 +72,12 @@ Component({ ...@@ -72,7 +72,12 @@ Component({
this.materialListApi(params).then(res => { this.materialListApi(params).then(res => {
if (res && res.data) { if (res && res.data) {
res.data.forEach(el => { res.data.forEach(el => {
if (el.createdDate) el.createdDate = new Date(el.createdDate).format('yyyy-MM-dd') // if (el.createdDate) el.createdDate = new Date(el.createdDate).format('yyyy/MM/dd')
if (el.createdDate) {
let date = el.createdDate + ''
date = date.replace(/-/g, '/').split(' ')[0] // 日期格式处理
el.createdDate = date
}
}) })
} }
list = res.data list = res.data
...@@ -122,7 +127,7 @@ Component({ ...@@ -122,7 +127,7 @@ Component({
}) })
} }
}, },
onHide(){ onHide() {
clearInterval(this.intaval) clearInterval(this.intaval)
} }
......
// pages/pointsReview/index.js
import api from '~/api/api'
Page({
/**
* 页面的初始数据
*/
data: {
tabList: ['全部', '待审批', '已审批', '已失效'],
keyword: '',
sceneType: '',
listData: [],
statusObj: {
0: {
text: '待审批',
color: '#FF9D0A',
background: '#FFF5E6'
},
1: {
text: '已审批',
color: '#347BFF',
background: '#EAF1FF'
},
2: {
text: '已失效',
color: '#F24724',
background: '#FDECE9'
}
},
listItemObj: [{
label: '订单编号',
key: 'orderCode'
}, {
label: '支付时间',
key: 'payTime'
}, {
label: '推荐人',
arr: ['staffName', 'staffPhone']
}, {
label: '门店名称',
key: 'merchantName'
}, {
label: '订单时间',
key: 'orderTime'
}, {
label: '交易流水号',
key: 'tradeNo'
}, {
label: '备注',
key: 'remark'
}],
imageUrlData: [],
pageNum: 1,
nothing: false,
total: 0
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
onRoute(options) {
this.setData({
sceneType: options?.scene
})
},
tabClick(e) {
this.setData({
tabIndex: e?.detail
}, () => {
this.search()
})
},
search() {
this.setData({
listData: [],
pageNum: 1,
flag: false,
nothing: false
}, () => {
this.getListData()
})
},
getListData() {
let { sceneType, listData, pageNum, nothing, keyword, tabIndex } = this.data
let statusObj = {0: '', 1: 0, 2: 1, 3: 2}
let params = {
// sceneType,
pageNum,
pageSize: 4,
search: keyword,
supervisorAudit: statusObj[tabIndex]
}
if (nothing) return
api.getPointsReviewListAPI(params).then(res => {
let { code, data, message } = res
if (code == 0) {
data?.list?.forEach(val => {
val.payTime = (val.payTime && (new Date(val.payTime).format('yyyy.MM.dd hh:mm:ss') || val.payTime)) || '' // 支付时间
val.orderTime = (val.orderTime && (new Date(val.orderTime).format('yyyy.MM.dd hh:mm:ss') || val.orderTime)) || '' // 订单时间
val.subOrderList = val?.goodsName?.split(',') // 商品
val.failTime = (val.failTime && (new Date(val.failTime).format('yyyy.MM.dd hh:mm:ss') || val.failTime)) || '' // 退款,撤单,错单时间
val.operateTime = (val?.operationList?.[0]?.operateTime && (new Date(val.operationList[0].operateTime).format('yyyy.MM.dd hh:mm:ss') || val.operationList[0].operateTime)) || '' // 审批时间
val.operator = val?.operationList?.[0]?.operator || '' // 审批人
val.operatorPhone = val?.operationList?.[0]?.operatorPhone || '' // 审批人手机号
})
let tempList = listData?.concat(data?.list)
this.setData({
listData: tempList,
nothing: data?.total == (tempList?.length - 1),
total: data?.total,
flag: true,
triggered: false
})
} else {
wx.$util.showToast(message)
}
}).catch(err => {})
},
// 查看全部商品
showAllGoodsList(e) {
let {
item
} = e.currentTarget.dataset
let {
listData
} = this.data
listData.forEach(subVal => {
if (subVal.id == item.id) subVal.showAllGoodsListFlag = !subVal?.showAllGoodsListFlag
})
this.setData({
listData
})
},
// 审批
handleReview(e) {
let { item } = e.currentTarget.dataset
this.setData({
show: true,
approvedItem: item,
imageUrlData: item?.attachments?.split(',') || []
})
},
handleConfirm() {
let {approvedItem} = this.data
let userInfo = wx.$util.getUserInfo()
let params = {
id: approvedItem?.id,
auditResult: 0,
operatorId: userInfo?.uuid
}
api.approvedPointsAPI(params).then(res => {
let { code, message } = res
if (code == 0) {
this.search()
} else {
wx.$util.showToast(message)
}
}).catch(err => {})
this.hideDialog()
},
handleCancel() {
this.hideDialog()
},
hideDialog() {
this.setData({
show: false
})
},
viewImage(e) {
let { url } = e.currentTarget.dataset
let { imageUrlData } = this.data
wx.previewImage({
urls: imageUrlData,
current: url
})
},
input(e) {
let { value } = e.detail
this.setData({
keyword: value
})
},
clear() {
this.setData({
keyword: ''
}, () => {
this.search()
})
},
scrollonReachBottom() {
let {
total,
pageNum,
nothing
} = this.data
wx.$util.onReachBottom({
total,
pageNum,
nothing,
pageSize: 4
},
res => {
this.getListData()
}
)
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file \ No newline at end of file
{
"navigationBarTitleText": "积分审批",
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
/* pages/pointsReview/index.wxss */
.main {
.to-box{
position: relative;
}
.search-box {
width: 100%;
padding: var(--fontSize16) var(--fontSize32);
display: flex;
align-items: center;
background-color: #fff;
position: sticky;
top: 0;
left: 0;
z-index: 9;
box-sizing: border-box;
.search-input {
background: #F7F8FA;
border-radius: var(--fontSize38);
width: 100%;
height: var(--fontSize72);
display: flex;
align-items: center;
.search-icon {
width: var(--fontSize28);
height: var(--fontSize28);
margin: 0 var(--fontSize10) 0 var(--fontSize26);
}
.search-clear {
width: var(--fontSize36);
height: var(--fontSize36);
margin: 0 var(--fontSize26) 0 var(--fontSize10);
}
.input {
font-size: var(--fontSize28);
height: var(--fontSize38);
line-height: var(--fontSize38);
width: calc(100% - var(--fontSize136));
}
.input-placeholder {
color: rgba(200, 201, 204, .89);
}
}
}
.list {
box-sizing: border-box;
width: 100%;
background: transparent;
.occupy_element{
width: 100%;
height: var(--fontSize24);
background: transparent;
}
.list-item{
box-sizing: border-box;
width: calc(100% - var(--fontSize40));
background: #FFFFFF;
box-shadow: var(--fontSize4) var(--fontSize4) var(--fontSize16) 0 #cdcdd180;
border-radius: var(--fontSize16);
padding: var(--fontSize32);
position: relative;
font-size: var(--fontSize24);
margin: 0 var(--fontSize20) var(--fontSize20);
.status {
position: absolute;
font-size: var(--fontSize24);
font-weight: 500;
top: var(--fontSize32);
right: var(--fontSize32);
height: var(--fontSize44);
background: #F0F0F0;
border-radius: var(--fontSize4);
padding: 0 var(--fontSize8);
}
.name {
display: flex;
color: #292D33;
align-items: center;
.name-text{
font-size: var(--fontSize32);
font-weight: 500;
display: inline-block;
max-width: var(--fontSize350);
}
.phone-text{
font-size: var(--fontSize28);
font-weight: 400;
margin-left: var(--fontSize16);
}
}
.goods-list{
margin-top: var(--fontSize28);
.goods {
display: flex;
align-items: center;
padding-left: var(--fontSize32);
position: relative;
justify-content: space-between;
margin-bottom: var(--fontSize20);
}
.goods::after {
position: absolute;
width: var(--fontSize12);
height: var(--fontSize12);
top: 50%;
left: 0;
transform: translateY(-50%);
content: '';
background: #347BFF;
border-radius: 100%;
}
.goods-more {
padding-left: var(--fontSize12);
font-size: var(--fontSize24);
color: #347BFF;
display: flex;
align-items: center;
margin-top: calc(-1 * var(--fontSize20));
.show-goods-btn{
display: inline-block;
padding: var(--fontSize20) 0 var(--fontSize20);
}
}
}
.order-box{
background: #f2f3f5cc;
border-radius: var(--fontSize8);
padding: var(--fontSize16);
display: flex;
align-items: center;
justify-content: space-around;
margin-top: var(--fontSize4);
.order-box-item{
text-align: center;
flex-shrink: 0;
width: 30%;
.label{
font-size: var(--fontSize24);
color: #999EA8;
margin-bottom: var(--fontSize4);
}
.price{
font-family: 'numberBold';
font-size: var(--fontSize28);
color: #347BFF;
}
.value{
color: #292D33;
text{
display: inline-block;
text-align: center;
vertical-align: middle;
}
.name{
display: inline-block;
max-width: 100%;
margin-right: var(--fontSize8);
font-size: var(--fontSize24);
white-space: nowrap;
}
.phone{
font-size: var(--fontSize20);
white-space: normal;
}
}
}
.order-box-item:last-child{
width: 40%;
}
}
.form-item{
margin-top: var(--fontSize8);
color: #292D33;
.item-flex{
display: flex;
align-items: center;
margin-top: var(--fontSize16);
.label{
flex-shrink: 0;
width: var(--fontSize140);
color: #999EA8;
}
.value{
display: flex;
align-items: center;
.value-item:first-child{
margin-right: var(--fontSize8);
display: inline-block;
max-width: var(--fontSize320);
}
}
}
}
.btn-box{
margin-bottom: calc(-1 * var(--fontSize12));
.line{
width: 100%;
height: var(--fontSize1);
background: #E4E8EE;
margin: var(--fontSize16) 0;
}
.btn{
margin-left: auto;
display: flex;
justify-content: center;
align-items: center;
width: var(--fontSize140);
height: var(--fontSize56);
background: #347BFF;
border-radius: var(--fontSize32);
color: #FFFFFF;
font-size: var(--fontSize28);
}
}
.review-message{
margin-top: var(--fontSize16);
background: #F9FCFF;
border-radius: var(--fontSize8);
padding: var(--fontSize20) var(--fontSize16);
.review-item{
display: flex;
align-items: center;
.label{
flex-shrink: 0;
width: var(--fontSize136);
color: #999EA8;
}
.value{
display: flex;
align-items: center;
text{
display: inline-block;
max-width: var(--fontSize480);
margin-right: var(--fontSize8);
}
}
}
.review-item:last-child{
margin-top: var(--fontSize16);
}
}
}
}
.dialog-container{
padding: var(--fontSize46);
.title-text{
color: #292D33;
font-size: var(--fontSize32);
font-weight: 500;
text-align: center;
}
.title-tips{
text-align: center;
color: #5A5E66;
margin-top: var(--fontSize34);
font-size: var(--fontSize30);
margin-bottom: var(--fontSize24);
}
.image-content{
display: felx;
flex-wrap: wrap;
justify-content: space-between;
&.center-content{
text-align: center;
}
.image-item{
width: var(--fontSize160);
height: var(--fontSize160);
border-radius: var(--fontSize8);
margin-right: var(--fontSize24);
margin-bottom: var(--fontSize24);
}
.image-item:nth-child(3n) {
margin-right: 0;
}
.image-item-big{
width: var(--fontSize280);
height: var(--fontSize280);
border-radius: var(--fontSize8);
}
}
.btn{
width: 100%;
height: var(--fontSize88);
border-radius: var(--fontSize12);
color: #FFFFFF;
font-size: var(--fontSize32);
font-weight: 500;
display: flex;
align-items: center;
justify-content: center;
}
.confirm-btn{
background: #347BFF;
margin-top: var(--fontSize20);
}
.cancel-btn{
margin-top: var(--fontSize20);
background: #F7F8FA;
font-weight: 400;
color: #292D33
}
}
}
.van-dialog__header{
display: none;
}
.van-dialog__footer{
display: none !important;
}
\ No newline at end of file \ No newline at end of file
<!--pages/pointsReview/index.wxml-->
<wxs src="../tabWorkOrder/index.wxs" module="filter" />
<view class="main">
<view class="to-box">
<view class="search-box">
<view class="search-input">
<image src="/images/search.png" class="search-icon" />
<input type="text" placeholder="商品名称/客户姓名/手机号/销售顾问/门店" class="input" value="{{keyword}}" placeholder-class="input-placeholder" bindinput="input" bindconfirm="search" />
<block wx:if="{{keyword}}">
<image src="/images/clear.png" class="search-clear" bindtap="clear" />
</block>
</view>
</view>
<tab-bar tabList="{{tabList}}" bindclick="tabClick" activeIndex="{{activeIndex}}" />
</view>
<block wx:if="{{flag}}">
<scroll-view scroll-y enable-back-to-top refresher-enabled="{{true}}" bindrefresherrefresh="search" bindscrolltolower="scrollonReachBottom" class="list" style="height:calc(100vh - var(--fontSize216));" refresher-threshold="104" refresher-triggered="{{triggered}}">
<block wx:if="{{listData.length > 0}}">
<!-- 占位元素 防止高度未铺满出现滚动调 -->
<view class="occupy_element"></view>
<block wx:for="{{listData}}" wx:key="index">
<view class="list-item">
<view class="status text-center" style="color:{{statusObj[item.supervisorAudit].color }};background-color:{{statusObj[item.supervisorAudit].background }};">
{{statusObj[item.supervisorAudit].text }}
</view>
<view class="name">
<view class="name-text text-hide ">{{item.customerName}}</view>
<view class="phone-text text-hide ">{{item.customerPhone}}</view>
</view>
<view class="goods-list" style="padding-bottom:{{item.subOrderList.length<1?0:''}}">
<block wx:if="{{item.subOrderList.length}}">
<block wx:for="{{item.subOrderList}}" wx:key="sindex" wx:for-item="i" wx:for-index="sindex">
<view class="goods" wx:if="{{item.showAllGoodsListFlag ? true : sindex < 2}}">
<view class="goods-name text-hide">
{{filter.replaceItemText(i) || ''}}
</view>
</view>
</block>
<block wx:if="{{item.subOrderList.length > 2}}">
<view class="goods-more">
<text catch:tap="showAllGoodsList" class="show-goods-btn" data-item="{{item}}">{{item.showAllGoodsListFlag ? '收起' : '查看全部'}}</text>
(共{{item.subOrderList.length}}件)
</view>
</block>
</block>
</view>
<view class="order-box">
<view class="order-box-item">
<view class="label">订单金额</view>
<view class="price" wx:if="{{item.orderMoney}}">¥{{item.orderMoney}}</view>
</view>
<view class="order-box-item">
<view class="label">积分收益</view>
<view class="price" wx:if="{{item.integralIncome}}">¥{{item.integralIncome}}</view>
</view>
<view class="order-box-item">
<view class="label">转化人员</view>
<view class="value">
<text class="name text-hide">{{item.transferName}}</text>
<text class="phone">{{item.transferPhone || ''}}</text>
</view>
</view>
</view>
<view class="form-item">
<view class="item-flex" wx:for="{{listItemObj}}" wx:key="sindex" wx:for-index="sindex" wx:for-item="i">
<view class="label">{{i.label}}</view>
<view class="value">
<block wx:if="{{i.arr}}">
<block wx:for="{{i.arr}}" wx:key='subIndex' wx:for-index="subIndex" wx:for-item="subItem">
<view class="value-item text-hide">{{item[subItem] || ''}}</view>
</block>
</block>
<block wx:else>
{{item[i.key] || ''}}
</block>
</view>
</view>
<view class="item-flex" wx:if="{{item.supervisorAudit == 2}}">
<view class="label">{{item.failType == 1 ? '退款' : item.failType == 2 ? '撤单' : item.failType == 3 ? '错单' : ''}}时间</view>
<view class="value">{{item.failTime}}</view>
</view>
</view>
<view class="btn-box" wx:if="{{item.supervisorAudit == 0}}">
<view class="line"></view>
<view class="btn" catch:tap="handleReview" data-item="{{item}}">审批</view>
</view>
<view class="review-message" wx:if="{{item.supervisorAudit == 1}}">
<view class="review-item">
<view class="label">审批时间</view>
<view class="value">{{item.operateTime}}</view>
</view>
<view class="review-item">
<view class="label">审批人</view>
<view class="value"><text class='text-hide'>{{item.operator}}</text></view>
</view>
</view>
</view>
</block>
<block wx:if="{{nothing}}">
<view class="list-nothing">到底了~</view>
</block>
</block>
<block wx:else>
<empty-data />
</block>
</scroll-view>
</block>
<van-dialog use-slot use-title-slot use-confirm-button-slot use-cancel-button-slot show="{{ show }}" width="calc(100% - var(--fontSize128))">
<view class="dialog-container">
<view slot="title">
<view class="title-text">积分审批</view>
</view>
<view class="title-tips">点击确定按钮则代表审批通过</view>
<view class="image-content {{imageUrlData.length <= 1 ? 'center-content' : ''}}">
<block wx:for="{{imageUrlData}}" wx:key="index">
<image src="{{item}}" bindtap="viewImage" data-url="{{item}}" class="image-item {{imageUrlData.length > 1 ? '' : 'image-item-big'}}" />
</block>
</view>
<view slot="confirm-button">
<view class="confirm-btn btn" bindtap="handleConfirm">确定</view>
</view>
<view slot="cancel-button">
<view class="cancel-btn btn" bindtap="handleCancel">取消</view>
</view>
</view>
</van-dialog>
</view>
...@@ -245,7 +245,9 @@ export const checkScene = options => { ...@@ -245,7 +245,9 @@ export const checkScene = options => {
staffDaily: 'tabWorkOrder/pages/staffDaily/staffDaily', staffDaily: 'tabWorkOrder/pages/staffDaily/staffDaily',
playVideo: 'packageEquity/pages/trainingMaterials/pages/playVideo/index', playVideo: 'packageEquity/pages/trainingMaterials/pages/playVideo/index',
upgradeStaffDaily: 'tabWorkOrder/pages/upgradeStaffDaily/upgradeStaffDaily', upgradeStaffDaily: 'tabWorkOrder/pages/upgradeStaffDaily/upgradeStaffDaily',
deliveryTarget: 'packageEquity/pages/deliveryTarget/deliveryTarget' deliveryTarget: 'packageEquity/pages/deliveryTarget/deliveryTarget',
'aiDetail': 'packageEquity/pages/aiExcercise/ai/ai',
'tabDateIndex': 'pages/tabDateIndex/pages/tabDateIndex'
} }
options.path = pagePath[query.page] options.path = pagePath[query.page]
} }
......
...@@ -1120,23 +1120,37 @@ Page({ ...@@ -1120,23 +1120,37 @@ Page({
}); });
}, },
getIsBusinessSchoolEnableCurrentUser() { getIsBusinessSchoolEnableCurrentUser() {
getBusinessSchoolScene({}).then((res) => { let { menu } = this.data;
let { menu } = this.data; let userInfo = wx.$util.getUserInfo();
let userInfo = wx.$util.getUserInfo(); if (userInfo?.isSuper && menu.every((item) => item.name != "工资绩效")) {
if ( menu.push({
(res || userInfo?.isSuper) && name: "工资绩效",
menu.every((item) => item.name != "工资绩效") icon: "businessschoo",
) { path: "",
menu.push({ });
name: "工资绩效", this.setData({
icon: "businessschoo", menu
path: "", });
}); console.log(menu, userInfo?.isSuper && menu.every((item) => item.name != "工资绩效"), 'userInfo?.isSuper');
this.setData({
menu, } else {
}); getBusinessSchoolScene({}).then((res) => {
} if (res && menu.every((item) => item.name != "工资绩效")
}); ) {
menu.push({
name: "工资绩效",
icon: "businessschoo",
path: "",
});
this.setData({
menu,
});
}
});
}
}, },
customerOnReady() { customerOnReady() {
...@@ -1159,7 +1173,7 @@ Page({ ...@@ -1159,7 +1173,7 @@ Page({
let { menu, newMenu } = this.data; let { menu, newMenu } = this.data;
let userInfo = wx.$util.getUserInfo(); let userInfo = wx.$util.getUserInfo();
const isNoStaff = userInfo?.loginRole != 4 && userInfo?.loginRole != null; const isNoStaff = userInfo?.loginRole != 4 && userInfo?.loginRole != null;
this.getIsBusinessSchoolEnableCurrentUser();
// 不是员工类型 // 不是员工类型
if (isNoStaff) { if (isNoStaff) {
menu = [ menu = [
...@@ -1212,6 +1226,13 @@ Page({ ...@@ -1212,6 +1226,13 @@ Page({
icon: "boutique-syzs", icon: "boutique-syzs",
}); });
} }
if (userInfo?.loginRole == 3 && menu.every((item) => item.name != '积分审批')) {
menu.push({
name: "积分审批",
url: "pages.pointsReview",
icon: "points_review",
})
}
if (checklist.includes(userInfo?.accountName)) { if (checklist.includes(userInfo?.accountName)) {
menu = menu.filter((e) => e.name != "预约管理"); menu = menu.filter((e) => e.name != "预约管理");
} }
...@@ -1237,6 +1258,8 @@ Page({ ...@@ -1237,6 +1258,8 @@ Page({
isNoStaff, isNoStaff,
newMenu, newMenu,
}); });
this.getIsBusinessSchoolEnableCurrentUser();
}, },
onRoute(options) { onRoute(options) {
options && this.checkShowOrderPop(options); options && this.checkShowOrderPop(options);
...@@ -1287,7 +1310,6 @@ Page({ ...@@ -1287,7 +1310,6 @@ Page({
this.checkIsPadOrNot(); this.checkIsPadOrNot();
if (!userInfo?.isSuper && userInfo?.loginRole != 3) this.get4SStoreList(); if (!userInfo?.isSuper && userInfo?.loginRole != 3) this.get4SStoreList();
// this.getIsBusinessSchoolEnableCurrentUser();
// 获取驻店员工目标 // 获取驻店员工目标
if (app.globalData.isStaff) this.getStaffTargetTask(); if (app.globalData.isStaff) this.getStaffTargetTask();
}, },
......
...@@ -174,6 +174,9 @@ Page({ ...@@ -174,6 +174,9 @@ Page({
}, },
chooseCustomerInfo(e) { chooseCustomerInfo(e) {
let { detail } = e; let { detail } = e;
let { outTradeNo } = this.data
detail.outTradeNo = outTradeNo
console.log(detail, 'detail');
this.onRoute(detail); this.onRoute(detail);
}, },
closeTips() { closeTips() {
...@@ -398,25 +401,25 @@ Page({ ...@@ -398,25 +401,25 @@ Page({
this.setGoodsTotal(goodsList); this.setGoodsTotal(goodsList);
}, },
removeLeadingZerosAndEnsureNonNegative(inputStr) { // removeLeadingZerosAndEnsureNonNegative(inputStr) {
// 使用正则表达式去掉前导零 // // 使用正则表达式去掉前导零
let trimmedStr = inputStr.replace(/^0+/, ""); // let trimmedStr = inputStr.replace(/^0+/, "");
let [number, decimal] = trimmedStr.split("."); // let [number, decimal] = trimmedStr.split(".");
if (decimal != undefined) { // if (decimal != undefined) {
decimal = decimal.substring(0, 2); // decimal = decimal.substring(0, 2);
number += `.${decimal}`; // number += `.${decimal}`;
trimmedStr = number; // trimmedStr = number;
} // }
// 将字符串转换为浮点数 // // 将字符串转换为浮点数
const numberValue = parseFloat(trimmedStr); // const numberValue = parseFloat(trimmedStr);
// 如果转换后的值为 NaN 或者小于 0,则默认为 0 // // 如果转换后的值为 NaN 或者小于 0,则默认为 0
if (isNaN(numberValue) || numberValue < 0) { // if (isNaN(numberValue) || numberValue < 0) {
return 0; // return 0;
} // }
return trimmedStr; // return trimmedStr;
}, // },
priceBlur(e) { priceBlur(e) {
let { index, item } = e.currentTarget.dataset; let { index, item } = e.currentTarget.dataset;
let target = `goodsList[${index}].price`; let target = `goodsList[${index}].price`;
...@@ -551,6 +554,7 @@ Page({ ...@@ -551,6 +554,7 @@ Page({
this.setData({ this.setData({
submitStatus: true, submitStatus: true,
}); });
console.log(submitObj);
// return // return
let apiName = let apiName =
save && !isErrorOrder save && !isErrorOrder
...@@ -1245,7 +1249,7 @@ Page({ ...@@ -1245,7 +1249,7 @@ Page({
let { code, message, data } = result; let { code, message, data } = result;
// data.customer.customerName = res.customerName // data.customer.customerName = res.customerName
code == 0 && (res = data); code == 0 && (res = data);
} }
let { tipsProps, isAlreadyExistOrder } = this.data; let { tipsProps, isAlreadyExistOrder } = this.data;
if (Object.keys(res).length > 0) { if (Object.keys(res).length > 0) {
......
...@@ -161,23 +161,23 @@ const removeLeadingZerosAndEnsureNonNegative = inputStr => { ...@@ -161,23 +161,23 @@ const removeLeadingZerosAndEnsureNonNegative = inputStr => {
// 使用正则表达式过滤掉除数字和小数点以外的字符 // 使用正则表达式过滤掉除数字和小数点以外的字符
const filteredStr = inputStr.replace(/[^0-9.]/g, ''); const filteredStr = inputStr.replace(/[^0-9.]/g, '');
// 使用正则表达式去掉前导零,但保留一个零作为整数部分 // 使用正则表达式去掉前导零,但保留一个零作为整数部分
let trimmedStr = filteredStr.replace(/^0+(?=\d)|^0+(?=\.)/, ''); let trimmedStr = filteredStr.replace(/^0+(?=\d)|^0+(?=\.)/, '');
// 如果字符串以小数点结尾,不做任何修改 // 如果字符串以小数点结尾,不做任何修改
if (trimmedStr === '.') { if (trimmedStr === '.') {
return '0.'; return '0.';
} }
// 如果字符串以小数点开始,添加一个零作为整数部分 // 如果字符串以小数点开始,添加一个零作为整数部分
if (trimmedStr.startsWith('.')) { if (trimmedStr.startsWith('.')) {
trimmedStr = '0' + trimmedStr; trimmedStr = '0' + trimmedStr;
} }
// // 如果小数点后没有数字,则在末尾添加一个零 // // 如果小数点后没有数字,则在末尾添加一个零
// if (trimmedStr.indexOf('.') !== -1 && trimmedStr.endsWith('.')) { // if (trimmedStr.indexOf('.') !== -1 && trimmedStr.endsWith('.')) {
// trimmedStr += '0'; // trimmedStr += '0';
// } // }
// // 如果字符串以小数点结尾,不做任何修改 // // 如果字符串以小数点结尾,不做任何修改
// if (trimmedStr.endsWith('.')) { // if (trimmedStr.endsWith('.')) {
// return trimmedStr; // return trimmedStr;
...@@ -196,6 +196,10 @@ const removeLeadingZerosAndEnsureNonNegative = inputStr => { ...@@ -196,6 +196,10 @@ const removeLeadingZerosAndEnsureNonNegative = inputStr => {
if (isNaN(numberValue) || numberValue < 0) { if (isNaN(numberValue) || numberValue < 0) {
return 0; return 0;
} }
// 如果转换后的值大于于 100000,则默认为 100000
if (isNaN(numberValue) || numberValue > 100000) {
return 100000;
}
return trimmedStr; return trimmedStr;
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!