Commit 8add8984 by 杨北旺

Merge branch 'V4.38.1-0422' of 192.168.3.233:saas_plus/dj-car-boutique-work-wechat into V4.38.1-0422

2 parents 0135b573 90e22921
......@@ -119,7 +119,8 @@
"pages/aiInspectionDetail/aiInspectionDetail",
"pages/aiInspectionReception/aiInspectionReception",
"pages/trainingMaterials/trainingMaterials",
"pages/trainingMaterials/pages/playVideo/index"
"pages/trainingMaterials/pages/playVideo/index",
"pages/deliveryTarget/deliveryTarget"
]
},
{
......
......@@ -274,14 +274,14 @@ Component({
wx.$util.setUserInfo({ ...wx.$util.getUserInfo(), subLoginUser: data.subLoginUser })
wx.$util.hideLoading()
wx.$storage.rm('dateStaffPop')
this.eventCallback(item, userInfo?.sceneType)
this.eventCallback(item, userInfo?.sceneType, false, data)
} else {
wx.$util.showToast(message)
}
})
}
},
eventCallback(item, sceneType, isSuper) {
eventCallback(item, sceneType, isSuper, data) {
const thisPage = wx.$router.getPageInstance()
let { searchSelectIndex } = this.data
let userInfo = wx.$util.getUserInfo()
......@@ -359,7 +359,8 @@ Component({
default4SStoreInfo_crowdFunding: {
merchantId: item.merchantId,
merchantName: item.merchantName
}
},
loginRoleOnSelectMerchant: data.loginRoleOnSelectMerchant
}
wx.$util.setUserInfo(obj)
thisPage.setData({
......
......@@ -177,4 +177,18 @@ module.exports = {
return api.post('dj.api.smartcarlife.order.staff.valid', data)
},
// 获取驻店负责人交车目标填写详情
deliveryTargetInfo(data) {
return api.post('dj.api.analysis.vehicle.delivery.target.get.detail', data, [], '/rop-dj-pe-analysis/router')
},
// 获取当周驻店负责人交车目标是否填写列表
deliveryTargetDetailWeekList(data) {
return api.post('dj.api.analysis.vehicle.delivery.target.range.page', data, [], '/rop-dj-pe-analysis/router')
},
// 保存驻店负责人交车目标
deliveryTargetSave(data) {
return api.post('dj.api.analysis.vehicle.delivery.target.saveOrUpdate', data, [], '/rop-dj-pe-analysis/router')
}
}
// pages/equity/index.js
import { get4SStoreList } from '~/store/index'
import api from '~/api/api.js'
import { merchantMode, waitinputorder, staffDailyReportDetailWeeklyList, staffDailyReportMerchantValid, quotationRecording, isBusinessSchoolEnableCurrentUser } from '../../api'
import { merchantMode, waitinputorder, staffDailyReportDetailWeeklyList, staffDailyReportMerchantValid, quotationRecording, isBusinessSchoolEnableCurrentUser, deliveryTargetInfo } from '../../api'
import { getBusinessSchoolScene } from '~/store/index'
const app = getApp()
let time = null
......@@ -194,6 +194,38 @@ Page({
}
},
checkDeliveryTarget() {
let userInfo = wx.$util.getUserInfo()
let currentDate = new Date()
// 格式化日期为"yyyy-mm-dd"
let formattedDate = currentDate.toISOString().split('T')[0]
// 驻店负责人 loginRoleOnSelectMerchant 跟随门店配置是否是驻店负责人
if (app.globalData.isStaff && userInfo.loginRoleOnSelectMerchant == 4) {
deliveryTargetInfo({merchantId: userInfo.shopMerchantId, targetDate: formattedDate}).then(res => {
let { code, data } = res
if (code == 0) {
if (!data) {
wx.showModal({
title: '交车目标',
content: '您有未填写的交车目标,请点击前往',
cancelText: '取消', // '取消
cancelColor: '#292D33',
confirmText: '前往填写',
confirmColor: '#347BFF',
success(res) {
if (res.confirm) {
wx.$router.go('packageEquity.deliveryTarget', {
})
}
},
complete: () => {
}
})
}
}
})
}
},
getMerchant4SMode() {
let storeInfo = wx.$util.getUserInfo()?.default4SStoreInfo || {}
// console.log(wx.$util.getUserInfo()?.default4SStoreInfo ,'wx.$util.getUserInfo()?.default4SStoreInfo ');
......@@ -334,6 +366,7 @@ Page({
this.checkDailyRecport()
},
initList() {
this.checkDeliveryTarget()
this.getMerchant4SMode()
let { tabIndex } = this.data
// console.log(this.selectComponent(`#page-${tabIndex}`)?.onLoad,'this.selectComponent(`#page-${tabIndex}`)?.onLoad');
......
// compoents/weekCalendar/weekCalendar.js
Component({
options: {
multipleSlots: true // 在组件定义时的选项中启用多slot支持
},
/** * 组件的属性列表 * 用于组件自定义设置 */
properties: {
timeBean: {
// 属性名 在wxml调用组件时利用该属性传递组件显示的数据
type: Object, // 类型(必填),目前接受的类型包括:String, Number, Boolean, Object, Array, null(表示任意类型)
value: '' // 属性初始值(可选),如果未指定则会根据类型选择一个
}
// weeklyList: {
// type: Array,
// value: []
// }
},
/**
* 组件的方法列表
*/
methods: {
lastWeek: function (e) {
//点击了上一周
this.triggerEvent('lastWeek')
},
nextWeek: function (e) {
//点击了下一周
this.triggerEvent('nextWeek')
},
itemClick: function (e) {
//点击了某一日,传递该日的下标
// 超过当前时间不可点击
if (e.currentTarget.dataset.disabled) {
return
}
var index = e.currentTarget.dataset.index
this.triggerEvent('dayClick', index)
}
}
})
\ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
.row {
display: flex;
flex-direction: column;
justify-content: space-around;
align-items: center;
background: #fff;
.week_box{
height: var(--fontSize60);
width: 100%;
display: flex;
justify-content: space-around;
align-items: center;
box-shadow: 0 var(--fontSize4) var(--fontSize8) 0 #cdcdd159;
}
.date_box{
height: var(--fontSize128);
width: 100%;
display: flex;
justify-content: space-around;
align-items: center;
}
}
.weekselect {
height: var(--fontSize80);
flex-direction: row;
justify-content: space-between;
}
.column {
display: flex;
flex-flow: column;
align-items: center;
justify-content: center;
flex: 1;
}
.nextWeek {
font-family: PingFangSC-Regular;
font-weight: 400;
flex-direction: row;
color: #181A1F;
width: var(--fontSize180);
}
.dateType {
position: relative;
display: flex;
align-items: center;
justify-content: center;
font-size: var(--fontSize32);
color: #292D33;
border-radius: 50%;
width: var(--fontSize64);
height: var(--fontSize64);
.empty {
box-sizing: border-box;
position: absolute;
width: var(--fontSize38);
text-align: center;
height: var(--fontSize32);
background: #F24724;
border-radius: var(--fontSize16);
bottom: var(--fontSize40);
left: var(--fontSize40);
font-size: var(--fontSize22);
z-index: 2;
padding: 0 var(--fontSize4);
color: #fff;
}
}
.weekType {
font-size: var(--fontSize28);
color: darkgrey;
}
.select-column {
.dateType{
background: #347BFF;
color: #fff;
}
}
.disabled {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding-bottom: var(--fontSize5);
padding-top: var(--fontSize5);
margin-left: var(--fontSize5);
margin-right: var(--fontSize5);
margin-top: var(--fontSize10);
flex: 1;
border-top-left-radius: var(--fontSize20);
border-top-right-radius: var(--fontSize20);
background: #F6FCFE;
color: #292D33;
}
.timeType {
font-family: PingFangSC-Medium;
font-weight: 500;
font-size: var(--fontSize28);
color: #181A1F;
// font-size: var(--fontSize35);
// font-weight: bold;
// margin-right: auto;
}
.line {
height: var(--fontSize1);
width: 100%;
background-color: gainsboro;
}
.lastweek {
width: var(--fontSize180);
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: var(--fontSize28);
flex-direction: row;
color: #181A1F;
}
.line-shadow {
height: var(--fontSize3);
width: 100%;
background-color: gainsboro;
box-shadow: 5px 0px 5px 0px gainsboro;
}
@font-face {
font-family: "iconfont";
src: url('iconfont.eot?t=1533031583450');
/* IE9*/
src: url('iconfont.eot?t=1533031583450#iefix') format('embedded-opentype'),
/* IE6-IE8 */
url('data:application/x-font-woff;charset=utf-8;base64,d09GRgABAAAAAAZsAAsAAAAACRQAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADMAAABCsP6z7U9TLzIAAAE8AAAARAAAAFZW70iqY21hcAAAAYAAAAB4AAABwJvIBhZnbHlmAAAB+AAAAkwAAAKQdkD3EWhlYWQAAAREAAAAMQAAADYSKu8/aGhlYQAABHgAAAAgAAAAJAfdA4hobXR4AAAEmAAAABgAAAAYF+r//2xvY2EAAASwAAAADgAAAA4CUAFWbWF4cAAABMAAAAAfAAAAIAEVAF1uYW1lAAAE4AAAAUUAAAJtPlT+fXBvc3QAAAYoAAAAQgAAAFjpq2VXeJxjYGRgYOBikGPQYWB0cfMJYeBgYGGAAJAMY05meiJQDMoDyrGAaQ4gZoOIAgCKIwNPAHicY2Bk/sM4gYGVgYOpk+kMAwNDP4RmfM1gxMjBwMDEwMrMgBUEpLmmMDgwVDzbztzwv4EhhrmVoREozAiSAwAyfQ0teJzFkcENhDAMBMcEIoQo5T60cG9q4cWDyqAjt8GtYz5XAWtNZK8cOXKAASjiI3qwHSO0ybXmF6bm93xVT4x0isOrL37dt7zMz5anTH0ZkQ+628UUq7wme2/0v+Z2rk8V+z8e9ESvSfi+JPEvfibaI34llB8XahpqeJxlUTtoFGEQ/uf/s8/s43b39pm7vdtdb1cTvXCbuz0f5ILGQo+gEYOoVQQbidEqpFE8CAE1IQg2KbQRwdIuAUmTWNtaCBZBC1GwujK355/a4ZsPZoaBb75BDELDQ7JHHGSgk6iBLqN5hICdgFDBZQiSZh1PgBkwpl1USBIlAReFdTINdsgWrTRrxjbLsSoo4MNUkGZJHSfQanbwBUitMoA75t3UayWdvALRSfz1vIvfgVmJSmrnTH719EwxrRr8qqTrrq5v8izD8BiPqAos25bACCKbv2dUz9yrnMIVkNzEm7sjV8f0e8+bj8o1WwDo9cAYqyofZjRPo3jiWYbucgWZdzw5OlGE1Z+jjiGV4x+IBhwT7uO/CCMkgAYS/IJe/hp/+3+G+7kDPVgexAiR4XD4bASRdSQgGwUIufRam9FqMVvjNAVUqHWgrdWB0FRBa3cAQhc+5jfckBxsg2+vwKwX0uZ38K2dHcsn84NKqSFuk/vbvKNdGvilc4X5FaFRwocl9+g35YL64ujNS/X8sawR+qMB2SAsStA0mkVdKrcZJ1ErTurAUSjAsccUKWBSZWbRovZn09CBWmanWTvO2pll+0CF2ZYdZBC1aEGXk0ABsiGLqtbyUq3w4Nbc7cLFcd1hbVHGa8u63Fe0h2uDpeAsL2OYWegusEQVSaMcyoO3Imx9nXrcXNr6LOFP8gH8ESXA3UDloXEdc9cSPG5M2iCJT/cnFxXDUBYn978EROC4u6NwJRZHCUDBTINcmKUWVsnu5uYu+gfDb3VreJxjYGRgYADi/KUVefH8Nl8ZuFkYQOB6W+h8GP3///96FgbmViCXg4EJJAoATnwMXwAAAHicY2BkYGBu+N/AEMPC+P8/AwMLAwNQBAWwAQB19gRuBAAAAAPpAAAEAAAABAAAAAQB//8EAAAAAAAAAAB2AIQAkgDSAUgAAHicY2BkYGBgYwhkYGUAASYg5gJCBob/YD4DABFIAXMAeJxlj01OwzAQhV/6B6QSqqhgh+QFYgEo/RGrblhUavdddN+mTpsqiSPHrdQDcB6OwAk4AtyAO/BIJ5s2lsffvHljTwDc4Acejt8t95E9XDI7cg0XuBeuU38QbpBfhJto41W4Rf1N2MczpsJtdGF5g9e4YvaEd2EPHXwI13CNT+E69S/hBvlbuIk7/Aq30PHqwj7mXle4jUcv9sdWL5xeqeVBxaHJIpM5v4KZXu+Sha3S6pxrW8QmU4OgX0lTnWlb3VPs10PnIhVZk6oJqzpJjMqt2erQBRvn8lGvF4kehCblWGP+tsYCjnEFhSUOjDFCGGSIyujoO1Vm9K+xQ8Jee1Y9zed0WxTU/3OFAQL0z1xTurLSeTpPgT1fG1J1dCtuy56UNJFezUkSskJe1rZUQuoBNmVXjhF6XNGJPyhnSP8ACVpuyAAAAHicY2BigAAuBuyAjZGJkZmRhZGVkY2RnYGxgrs4MS8rMzE/JzWthAfKLspMzyhhTcrPzzZkzc1MS8xjYAAAPg4OSAAA') format('woff'),
url('iconfont.ttf?t=1533031583450') format('truetype'),
/* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
url('iconfont.svg?t=1533031583450#iconfont') format('svg');
/* iOS 4.1- */
}
.iconfont {
font-family: "iconfont" !important;
font-size: 16px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
/**
*字体图标,左右箭头,书,米饭,可以修改界面对图标进行修改替换
*/
.icon-sanjiaoleft:before {
content: "\e6b6";
}
.icon-sanjiaoright:before {
content: "\e6b7";
}
.icon-book1:before {
content: "\e631";
}
.icon-mifan:before {
content: "\e606";
}
\ No newline at end of file
<!--compoents/weekCalendar/weekCalendar.wxml-->
<wxs src="../../index.wxs" module="filter"/>
<view class="line"></view>
<view class="row weekselect">
<view class="row lastweek" bindtap="lastWeek">
<text class="iconfont icon-sanjiaoleft" style="padding:var(--fontSize15);color: #bec1c7;"></text>
<view style="">上一周</view>
</view>
<view class="timeType">{{timeBean.yearMonth}}</view>
<view class="row nextWeek" bindtap="nextWeek">
<block wx:if="{{ !timeBean.isInCurrentWeek }}">
<view style=" ">下一周</view>
<text class="iconfont icon-sanjiaoright" style="padding:var(--fontSize15);color: #bec1c7;"></text>
</block>
</view>
</view>
<view class="row">
<view class="week_box">
<view wx:for="{{ [0,1,2,3,4,5,6] }}" data-index="{{ index }}" data-disabled="{{ timeBean.weekDayList[index].disabled }}" class="item column" bindtap="itemClick" wx:key="index">
<view class="weekType">{{timeBean.weekDayList[index].week}}</view>
</view>
</view>
<view class="date_box">
<view wx:for="{{ [0,1,2,3,4,5,6] }}" data-index="{{ index }}" data-disabled="{{ timeBean.weekDayList[index].disabled }}" class="item column {{ index==timeBean.selectDay?'select-column':'' }}" bindtap="itemClick" wx:key="index">
<view class="dateType">
{{timeBean.weekDayList[index].day}}
<view class="empty" wx:if="{{ filter.dateContrast(timeBean.weekDayList[index].date) && !timeBean.weekDayList[index].hasDailyValue }}">空</view>
</view>
</view>
</view>
</view>
<!-- <view class="line-shadow"></view> -->
<view class="suspension" bindtap="addMenuClick">
<text class="iconfont icon-tianjia" style="font-size:var(--fontSize60); color:#fff;"></text>
</view>
\ No newline at end of file
{
"navigationStyle": "custom",
"usingComponents": {
"weekCalendar": "./components/weekCalendar/weekCalendar"
}
}
\ No newline at end of file
/* packageEquity/pages/deliveryTarget/deliveryTarget.wxss */
page {
background-color: rgb(246, 247, 247);
}
.layout {
// height: 100%;
height: 100vh;
// display: flex;
// flex-direction: column;
}
// 去除滚动条样式
::-webkit-scrollbar {
width: 0;
height: 0;
color: transparent;
}
.navigation-title {
display: flex;
align-items: center;
justify-content: center;
}
.navigation-title-text {
text-align: center;
// max-width: calc(100% - var(--fontSize24));
}
.navigation-title .arrow {
width: var(--fontSize20);
height: var(--fontSize16);
margin-left: var(--fontSize4);
transform: translateY(25%);
transition: all 0.5s;
}
.arrow {
width: var(--fontSize10);
height: var(--fontSize6);
margin-left: var(--fontSize12);
transform: translateY(25%);
transition: all 0.5s;
}
.move {
transform: rotate(-180deg) translateY(0);
}
.opacity {
opacity: 1;
}
.main {
padding: 0 var(--fontSize20) var(--fontSize136);
.mainheader {
margin: var(--fontSize20) var(--fontSize10) 0;
display: flex;
justify-content: space-between;
align-items: center;
.navigation-title-text {
margin-right: var(--fontSize10);
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: var(--fontSize28);
color: #347BFF;
}
@media screen and (min-device-width: 600px) and (-webkit-min-device-pixel-ratio: 1) {
.navigation-title-text {
font-size: var(--fontSize23);
}
}
}
.title {
font-family: PingFangSC-SNaNrpxibold;
font-weight: 500;
font-size: var(--fontSize28);
color: #292D33;
}
}
.isFullSucreen {
padding-bottom: 102px !important;
}
.isFullSucreen-btn {
padding-bottom: 34px !important;
}
.box {
background: #FFFFFF;
box-shadow: 0 var(--fontSize4) var(--fontSize20) 0 rgba(0, 0, 0, 0.10);
border-radius: var(--fontSize16);
overflow: hidden;
margin-top: var(--fontSize20);
height: calc(100% - var(--fontSize100));
padding: var(--fontSize24) 0;
.input-item{
padding: 0 var(--fontSize40);
color: #292D33;
font-size: var(--fontSize28);
.label{
margin-bottom: var(--fontSize16);
text{
color: #347BFF;
}
.required_text{
color: #F24724;
margin-right: var(--fontSize8);
}
}
.content-input{
height: var(--fontSize72);
background: #FFFFFF;
border: var(--fontSize2) solid #ECECEC;
padding: 0 var(--fontSize24);
border-radius: var(--fontSize8);
margin-bottom: var(--fontSize24);
}
.content-input.disabled{
background: #EFF0F2;
}
.content-input.flex{
display: flex;
align-items: center;
justify-content: space-between;
}
.input-placeholder{
color: #BEC1C7;
}
}
}
.btns {
position: fixed;
left: 0;
width: 100%;
bottom: 0;
min-height: var(--fontSize100);
background: #FFFFFF;
box-sizing: border-box;
/* padding: var(--fontSize10) var(--fontSize32); */
display: flex;
align-items: center;
justify-content: space-between;
font-size: var(--fontSize32);
font-weight: 500;
z-index: 99;
flex-direction: column;
}
.btns-con {
width: 100%;
box-sizing: border-box;
display: flex;
flex-flow: column;
padding: var(--fontSize10) 0;
}
.tipsIcon,
.closeIcon {
width: var(--fontSize32);
height: var(--fontSize32);
}
.btns .btns-con view {
border: var(--fontSize2) solid #0075F9;
border-radius: var(--fontSize12);
height: var(--fontSize80);
box-sizing: border-box;
}
.btns .confirm {
border: var(--fontSize2) solid #0075F9;
border-radius: var(--fontSize12);
height: var(--fontSize80);
box-sizing: border-box;
width: 100%;
color: #fff;
background-color: #347BFF;
}
.btns {
position: fixed;
bottom: 0;
width: 100%;
padding: var(--fontSize20);
background: #ffffff;
display: flex;
text-align: center;
font-size: var(--fontSize32);
font-weight: 500;
}
\ No newline at end of file
<!--packageEquity/pages/deliveryTarget/deliveryTarget.wxml-->
<wxs src="./index.wxs" module="filter" />
<view class="layout">
<navigation-bar bindback="jump" bindnavbarReady="navbarReady" showBack="{{approvedSource ? false : true}}">
<view class="navigation-title">
<view class="navigation-title-text text-hide">{{merchantRange[0].merchantName || userInfo.default4SStoreInfo.merchantName}}</view>
</view>
</navigation-bar>
<view style="margin-top:{{ navBarHeight }}px">
<weekCalendar timeBean="{{ timeBean }}" bind:lastWeek="lastWeek" bind:nextWeek="nextWeek" bind:dayClick="dayClick"></weekCalendar>
</view>
<view class="main {{ isFullSucreen?'isFullSucreen':'' }}">
<view class="mainheader">
<view class="title">交车目标填写</view>
</view>
<view class="box">
<block wx:for="{{formParams}}" wx:key="index">
<view class="input-item">
<view class="label">{{item.label}}<text class="required_text">*</text></view>
<input
value="{{ !filter.isShowBtns(targetInfo.reportDate) ? (targetInfo[item.value] || '-') : targetInfo[item.value] }}"
class="content-input {{!filter.isShowBtns(targetInfo.reportDate) ? 'disabled' : ''}}"
placeholder="{{item.tipsText}}"
maxlength="3"
bindinput="input"
data-name="{{item.value}}"
disabled="{{!filter.isShowBtns(targetInfo.reportDate)}}"
type="number"/>
<text>{{timeBean.weekDayList[targetInfo.reportDate].hasDailyValue}}</text>
</view>
</block>
</view>
</view>
<view class="btns {{ isFullSucreen?'isFullSucreen-btn':'' }}">
<!-- 只可编辑当天或后一天 -->
<view class="btns-con" wx:if="{{filter.isShowBtns(targetInfo.reportDate)}}">
<view class="confirm text-center" bindtap="submit">提交</view>
</view>
</view>
</view>
\ No newline at end of file
// 对比日期
var dateContrast = function (params) {
var oneDay = 24 * 60 * 60 * 1000 // 一天的毫秒数
var currentDate = getDate().getTime() // 当前日期
var targetDate = getDate(params).getTime() // 给定的日期
return targetDate < currentDate + oneDay
}
// 是否是当天或未来一天
var isShowBtns = function (date) {
var oneDay = 24 * 60 * 60 * 1000 // 一天的毫秒数
var currentDate = getDate() // 当前日期
var targetDate = getDate(date) // 给定的日期
// 计算给定日期与当前日期的时间差(以毫秒为单位)
var diffMilliseconds = targetDate - currentDate
// 计算时间差对应的天数
var diffDays = Math.floor(diffMilliseconds / oneDay)
return diffDays >= -1
}
module.exports = {
dateContrast: dateContrast,
isShowBtns: isShowBtns
}
\ No newline at end of file
......@@ -140,6 +140,18 @@ Component({
icon: 'supplementary_order'
})
}
// 驻店负责人
if (app.globalData.isStaff && userInfo?.loginRoleOnSelectMerchant == 4 && menuList.every(item => item.menuText != '交车目标')) {
menuList.push({
menuText: '交车目标',
path: 'packageEquity.deliveryTarget',
icon: 'delivery_target'
})
}
if (!app.globalData.isStaff || userInfo?.loginRoleOnSelectMerchant != 4) {
let index = menuList?.findIndex(val => val.menuText == '交车目标')
index > -1 && menuList.splice(index, 1)
}
getBusinessSchoolScene({}).then(res => {
console.log(res, 'res')
......
......@@ -38,7 +38,7 @@ Page({
let {code, data, message} = res
this.setData({jumpPageFlag: false})
if (code == 0) {
wx.$util.setUserInfo({ ...userInfo, sceneType: scene })
wx.$util.setUserInfo({ ...userInfo, sceneType: scene, loginRoleOnSelectMerchant: data?.loginRoleOnSelectMerchant })
wx.$router.reLaunch(constantData?.pageUrl[scene], {resetStoreList: true})
} else {
wx.$util.showToast(message)
......
......@@ -42,7 +42,7 @@ Page({
let { code, data, message } = res
this.setData({ jumpPageFlag: false })
if (code == 0) {
wx.$util.setUserInfo({ ...userInfo, sceneType: scene })
wx.$util.setUserInfo({ ...userInfo, sceneType: scene, loginRoleOnSelectMerchant: data?.loginRoleOnSelectMerchant })
wx.$router.reLaunch(constantData?.pageUrl[scene], { resetStoreList: true })
} else {
wx.$util.showToast(message)
......
......@@ -440,7 +440,8 @@ Page({
default4SStoreInfo_newCarConversion: {
merchantId: shopMerchantId,
merchantName: shopMerchantName
}
},
loginRoleOnSelectMerchant: loginUserObj?.loginRoleOnSelectMerchant
})
if (num == 0) wx.$router.reLaunch(pageUrl[num])
else wx.$router.go(pageUrl[num])
......
......@@ -220,6 +220,7 @@ export const checkScene = options => {
}
console.log(query, 'query')
let userInfo = wx.$util.getStorageSync('dj_boutique_user_info')
// 交车目标/日报
if (query && query.reportDate && query.hasOwnProperty('approvedSource')) {
const app = getApp()
// console.log(app, 'app');
......@@ -244,7 +245,8 @@ export const checkScene = options => {
followUpOrder: 'tabDate/pages/detail',
staffDaily: 'tabWorkOrder/pages/staffDaily/staffDaily',
playVideo: 'packageEquity/pages/trainingMaterials/pages/playVideo/index',
upgradeStaffDaily: 'tabWorkOrder/pages/upgradeStaffDaily/upgradeStaffDaily'
upgradeStaffDaily: 'tabWorkOrder/pages/upgradeStaffDaily/upgradeStaffDaily',
deliveryTarget: 'packageEquity/pages/deliveryTarget/deliveryTarget'
}
options.path = pagePath[query.page]
}
......@@ -265,7 +267,7 @@ export const checkScene = options => {
console.log(options.path, 'options.path')
// wx.$SCENE = options
if (!userInfo && !['pages/accountItems/accountItems', 'pages/wxLogin/wxLogin', 'tabWorkOrder/pages/staffDaily/staffDaily', 'tabWorkOrder/pages/upgradeStaffDaily/upgradeStaffDaily', 'packageEquity/pages/trainingMaterials/pages/playVideo/index'].includes(options.path)) {
if (!userInfo && !['pages/accountItems/accountItems', 'pages/wxLogin/wxLogin', 'tabWorkOrder/pages/staffDaily/staffDaily', 'tabWorkOrder/pages/upgradeStaffDaily/upgradeStaffDaily', 'packageEquity/pages/trainingMaterials/pages/playVideo/index', 'packageEquity/pages/deliveryTarget/deliveryTarget'].includes(options.path)) {
// if (!userInfo) {
// console.log(userInfo);
console.log('未登录,请登录。')
......
......@@ -3,7 +3,7 @@
* var weekDay = {week: '',day: ''}
* 参数:selectWeek 0为本周,数字代表前几周或者后几周,例如1是下一周
*/
function getWeekDayList(selectWeek, selectDay) {
function getWeekDayList(selectWeek, selectDay, customerDisabled,) {
// 1.获取周一对应得时间
// 2.用循环七次添加周一到周日对应得周几和几号
var selectWeekTime = getCurrentTimeStamp(selectDay) + selectWeek * 7 * 24 * 60 * 60 * 1000
......@@ -35,7 +35,7 @@ function getWeekDayList(selectWeek, selectDay) {
weekDay.week = getWeek(dataStr)
weekDay.day = getMyDay(dataStr)
weekDay.date = getDataFormat(dataStr)
weekDay.disabled = dataStr > currentTimestamp
weekDay.disabled = customerDisabled ? dataStr > (currentTimestamp + 24 * 60 * 60 * 1000) : dataStr > currentTimestamp
timeBean.weekDayList.push(weekDay)
if (i == 0) {
timeBean.starDay = getMyDay(dataStr)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!