Commit d7c1602f by wangzhihui

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

…outique-work-wechat into SAAS+V4.49.0-0121
2 parents e2e0dff2 d50b9bc2
Showing 68 changed files with 1460 additions and 445 deletions
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
超管:18129809927 18372203315 超管:18129809927 18372203315
商户管理员:15814019200 商户管理员:15814019200
区域督导:187750352053 区域督导:187750352053
销售: 15626599743(开发)
# 生产环境跟手机号和验证码绑定 需要自己到账号中心绑定手机号成为员工或超管 # 生产环境跟手机号和验证码绑定 需要自己到账号中心绑定手机号成为员工或超管
......
...@@ -208,6 +208,7 @@ ...@@ -208,6 +208,7 @@
"usingComponents": { "usingComponents": {
"gl-textarea": "/components/GlTextarea/GlTextarea", "gl-textarea": "/components/GlTextarea/GlTextarea",
"gl-cell": "/components/GlCell/GlCell", "gl-cell": "/components/GlCell/GlCell",
"gl-cust-form": "/components/GLCustForm/GLCustForm",
"calendar": "/components/Calendar/Calendar", "calendar": "/components/Calendar/Calendar",
"navigation-bar": "/components/navigationBar/navigationBar", "navigation-bar": "/components/navigationBar/navigationBar",
"popup": "/components/Popup/Popup", "popup": "/components/Popup/Popup",
...@@ -222,6 +223,8 @@ ...@@ -222,6 +223,8 @@
"tips-bottom": "components/tipsBottom/index", "tips-bottom": "components/tipsBottom/index",
"gl-image": "components/GlImage/index", "gl-image": "components/GlImage/index",
"van-field": "@vant/weapp/field/index", "van-field": "@vant/weapp/field/index",
"van-radio-group": "@vant/weapp/radio-group/index",
"van-radio": "@vant/weapp/radio/index",
"van-popup": "@vant/weapp/popup/index", "van-popup": "@vant/weapp/popup/index",
"van-dialog": "@vant/weapp/dialog/index", "van-dialog": "@vant/weapp/dialog/index",
"van-uploader": "@vant/weapp/uploader/index", "van-uploader": "@vant/weapp/uploader/index",
......
// components/GLCustForm/GLCustForm.js
Component({
externalClasses: ['custom-class'],
options: {
multipleSlots: true, // 在组件定义时的选项中启用多 slot 支持
styleIsolation: 'shared', // 自定义覆盖vant样式
},
/**
* 组件的属性列表
*/
properties: {
formData: {
type: Object,
value: () => { },
observer: function (n) {
this.setData({
formData: n
})
}
},
formDataList: {
type: Array,
observer: function(n) {
if(n) {
this.changeStyle()
}
}
},
labelWidth: {
type: String,
value: 'var(--fontSize140)'
},
// 页面存放表单对象的对象名,用于直接变更page的值
dataAttrName: {
type: String,
value: null
},
disable: {
type: Boolean,
value: false
},
glCellClass: {
type: String,
value: false
},
// 背景色
background: {
type: String,
value: '#FFFFFF'
}
},
/**
* 组件的初始数据
*/
data: {
targetIdx: -1,
areaList: []
},
lifetimes: {
attached() {
let thisPage = wx.$router.getPageInstance()
console.log(this.data.formDataList, 'formDataList---')
this.changeStyle()
wx.$eventbus.on('set_car_info', n => {
let {
targetIdx,
dataAttrName
} = this.data
let formData = thisPage?.data[dataAttrName] || null
if (formData) {
if (targetIdx != -1) {
let targetItem = this.data.formDataList[targetIdx] || {}
if (targetItem.handleChange) {
targetItem.handleChange(thisPage, dataAttrName, n)
}
if (!targetItem.noDefault) {
thisPage.setData({
[dataAttrName + '.' + targetItem.labelName]: n.vehicleBrandName + '/' + n.vehicleSeriesName + '/' + n.vehicleShapeName + '/' + n.vehicleSubBrandName
})
}
}
formData = Object.assign(formData, n)
thisPage.setData({
[dataAttrName]: formData
// carInfo: n,
})
}
})
}
},
/**
* 组件的方法列表
*/
methods: {
/**
* 默认样式为label和value在同一行
* 改为label和value为两行
*/
changeStyle() {
let { formDataList } = this.data
formDataList.forEach((item, idx) => {
if(item.isLabelNoLine) {
formDataList[idx].noBorder = true
formDataList[idx].noPadding = true
formDataList[idx].cellStyle = 'display: block !important; height: auto !important; padding: 0 40rpx !important;'
formDataList[idx].labelStyle = 'width: 100% !important; padding: 24rpx 0 16rpx 0;'
formDataList[idx].cellValueStyle = `box-sizing: border-box; width: 100% !important; border: ${item.type == 'input' ? '2rpx': '0'} solid #ececec; padding: ${item.type == 'input' ? '16rpx 24rpx !important': '0'};`
formDataList[idx].customStyle = `padding: 0 0; display: flex; align-items: center; justify-content: space-between;`
formDataList[idx].inputCustomStyle = `width: ${item.suffix ? 'calc(100% - 4rpx)' : '100%'} !important; flex-shrink: 0; padding: 0 0;`
}
})
this.setData({
formDataList
})
},
getHeight(selector) {
return new Promise(resolve => {
wx.$util.getViewInfo(selector, res => {
return resolve(res)
}, this)
})
},
parentSetData(attr, value) {
let {
dataAttrName
} = this.data
let thisPage = wx.$router.getPageInstance()
thisPage.setData({
[dataAttrName + '.' + attr]: value
})
},
handleRadio(e) {
let value = e.detail
let {
attr
} = e.target.dataset
let {
dataAttrName
} = this.data
let thisPage = wx.$router.getPageInstance()
thisPage.setData({
[dataAttrName + '.' + attr]: value
})
this.triggerEvent('radioEvent', {
attr
})
},
handleInput(e) {
let value = e.detail
let {
attr,
item
} = e.target.dataset
let {
dataAttrName
} = this.data
// if (attr == 'price') {
// value = value >= 2000000 ? '2000000' : value
// // wx.$eventbus.emit('delete_goodsSelect')
// }
// console.log(item,'handleInput');
let thisPage = wx.$router.getPageInstance()
if (item.inputLimit && item.inputLimit.maxVal) {
value = value >= item.inputLimit.maxVal ? item.inputLimit.maxVal : value
}
if (item.inputLimit && item.inputLimit.minVal) {
value = value <= item.inputLimit.minVal ? item.inputLimit.minVal : value
}
if (item.inputLimit && item.inputLimit.type == 'digit') {
let [number, decimal] = value.toString().split('.')
if (decimal != undefined) {
decimal = decimal.substring(0, item.inputLimit.decimalDigit || 2)
number += `.${decimal}`
value = number
}
}
const diffValue = value.toString()
const trimValue = value.toString().trim()
if (diffValue != trimValue) {
value = trimValue
}
thisPage.setData({
[dataAttrName + '.' + attr]: value
})
this.triggerEvent('inputEvent', {
attr
})
},
handlePickerChange(e) {
let idx = e.detail.value || 0
let {
target
} = e.currentTarget.dataset
let {
dataAttrName
} = this.data
let thisPage = wx.$router.getPageInstance()
console.log(target, 'target---')
thisPage.setData({
[dataAttrName + '.' + target.name]: target.optionList[idx][target.optionId],
[dataAttrName + '.' + target.labelName]: target.optionList[idx][target.optionLabel]
})
this.triggerEvent('pickerChange', {
obj: target.optionList[idx]
})
},
handleTimeChange(e) {
let {
value
} = e.detail
let {
target
} = e.currentTarget.dataset
let {
dataAttrName
} = this.data
let thisPage = wx.$router.getPageInstance()
thisPage.setData({
[dataAttrName + '.' + target.name]: value
})
// console.log(this.data.formData)
},
// 品牌车型
handleJumpBrand(e) {
wx.$router.go('packageEquity.carBrands')
},
handleCellClick(e) {
let {
target,
idx
} = e.currentTarget.dataset
switch (target.type) {
case 'brand':
this.setData({
targetIdx: idx
})
this.handleJumpBrand()
break
default:
break
}
},
showAreaFun() {
let {
showArea,
areaList
} = this.data
if (!areaList.length) areaList = wx.$areaList // 省市区数据
this.setData({
showArea: !showArea,
areaList
})
},
bindRegionChange(e) {
this.triggerEvent('RegionChange', e)
this.showAreaFun()
}
}
})
\ No newline at end of file \ No newline at end of file
{
"component": true,
"usingComponents": {
"van-area": "@vant/weapp/area/index",
"van-popup": "@vant/weapp/popup/index"
}
}
\ No newline at end of file \ No newline at end of file
/* components/GLCustForm/GLCustForm.wxss */
.input-box {
display: flex;
align-items: center;
justify-content: space-between;
align-items: center;
--cell-line-height: calc(28vmin / 7.5) !important;
}
.radio-box {
display: flex;
align-items: center;
justify-content: space-between;
align-items: center;
}
.radio-item {
display: inline-block;
width: 40%;
}
.textarea {
text-align: right;
font-size: var(--fontSize28) !important;
flex-grow: 1;
}
.input-suffix {
/* height: var(--fontSize88);
line-height: var(--fontSize88); */
/* height: var(--fontSize132);
line-height: var(--fontSize132); */
margin-left: var(--fontSize4);
}
.placeholder-class {
color: #C3C3C3;
}
.picker {
display: flex;
flex-direction: row-reverse;
height: var(--fontSize80);
line-height: var(--fontSize80);
text-align: right;
}
.placeholder {
font-weight: 400;
font-size: var(--fontSize28);
color: #B6B6B8;
}
.gl-form .arrow {
// width: var(--fontSize28);
// height: var(--fontSize26);
// margin-top: var(--fontSize26);
// flex-shrink: 0;
width: var(--fontSize28);
height: var(--fontSize26);
margin-top: var(--fontSize26);
flex-shrink: 0;
}
.text-hide {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.brand {
text-align: right;
padding: var(--fontSize40) 0;
}
.gl-form .van-field__control--disabled {
color: #666666;
-webkit-text-fill-color: #666666;
}
.input-box .textarea input {
height: var(--fontSize72);
}
.gl-form .van-cell--borderless {
padding: var(--fontSize10) 0 !important;
}
.between .van-cell--borderless {
padding: var(--fontSize30) 0 !important;
}
/* @media screen and (min-device-width: 600px) and (-webkit-min-device-pixel-ratio: 1) {
} */
\ No newline at end of file \ No newline at end of file
<!--components/GLCustForm/GLCustForm.wxml-->
<wxs src="./GLForm.wxs" module="filterUtils" />
<view wx:for="{{formDataList}}" wx:key="index" class="custom-class gl-form">
<gl-cell
wx:if="{{filterUtils.isShowFn(formData, item) && item.type != 'otherSlot' && !item.isHide}}"
border="{{!item.noBorder}}"
class="{{item.name}}"
haveArrow="{{item.haveArrow || false}}"
valueAlign="right"
label="{{item.label}}"
labelWidth="{{item.labelWidth || labelWidth}}"
placeholder="{{item.placeholder || ''}}"
bindclick="handleCellClick"
data-target="{{item}}"
data-idx="{{index}}"
background="{{background}}"
required="{{item.required}}"
requiredAfter="{{item.requiredAfter}}"
cellHeight="{{!item.noCellHeight}}"
cellStyle="{{item.cellStyle||''}}"
labelStyle="{{item.labelStyle}}"
cellValueStyle="{{item.cellValueStyle}}"
cellBoxStyle="{{item.cellBoxStyle||''}}"
show-word-limit
noPadding="{{item.noPadding}}">
<!-- slot -->
<slot wx:if="{{item.type == 'slot'}}" name="{{item.name}}" />
<!-- radio -->
<view wx:if="{{item.type == 'radio'}}">
<van-radio-group value="{{formData[item.name]}}" disabled="{{item.disabled||disable}}" class="radio-box" data-attr="{{item.name}}" bindchange="handleRadio">
<van-radio wx:for="{{item.optionList}}" class="radio-item" wx:for-item="k"
wx:for-index="kIdx" wx:key="kIdx" name="{{k[item.optionLabel]}}">{{k[item.optionLabel]}}</van-radio>
</van-radio-group>
</view>
<!-- input / textarea -->
<view wx:if="{{item.type == 'input'}}" class="input-box" style="{{item.customStyle}}">
<!-- rows="1" -->
<van-field
class="textarea"
custom-style="padding: var(--fontSize30) 0; font-size: var(--fontSize28); background: {{background}}{{item.inputCustomStyle}};"
border="{{false}}"
value="{{formData[item.name]}}"
input-align="{{item.inputAlign || 'right'}}"
autosize
hold-keyboard
type="{{item.fieldType || 'text'}}"
rows="{{item.rows || '1'}}"
placeholder="{{item.placeholder || '请输入'}}"
maxlength="{{item.maxlength || 140}}"
disabled="{{item.disabled||disable}}"
readonly="{{item.readonly}}"
data-attr="{{item.name}}"
data-item="{{item}}"
bindinput="handleInput" />
<text wx:if="{{item.suffix}}" class="input-suffix">{{item.suffix}}</text>
</view>
<!-- picker -->
<picker
wx:if="{{item.type == 'select'}}"
bindchange="handlePickerChange"
data-target="{{item}}"
value="{{index}}"
disabled="{{item.disabled||disable}}"
range="{{item.optionList}}"
range-key="{{item.optionLabel}}">
<view class="picker">
<image class="arrow" src="/components/images/arrow-x.png" />
<view class="text-hide" wx:if="{{formData[item.labelName]}}">
{{formData[item.labelName]}}
</view>
<text class="placeholder" wx:else>请选择</text>
</view>
</picker>
<!-- 省市区 -->
<block wx:if="{{item.type == 'region'}}">
<view class="picker" bindtap="showAreaFun">
<image class="arrow" src="/components/images/arrow-x.png" />
<view class="text-hide" wx:if="{{formData[item.labelName]}}">
{{formData[item.labelName]}}
</view>
<text class="placeholder" wx:else>请选择</text>
</view>
<van-popup
show="{{ showArea }}"
position="bottom"
bind:close="showAreaFun"
>
<van-area area-list="{{ areaList }}" columns-num="{{ item.columnsNum }}" title="{{item.label}}" bind:confirm="bindRegionChange" bind:cancel="showAreaFun" />
</van-popup>
</block>
<!-- 时间选择器 -->
<picker
wx:if="{{item.type == 'pickerTime'}}"
mode="date"
value="{{formData[name] || formData[item.name]}}"
start="{{item.start || ''}}"
end="{{item.end || ''}}"
bindchange="handleTimeChange"
data-target="{{item}}">
<view class="picker">
<view class="text-hide" wx:if="{{formData[item.name]}}">{{formData[item.name]}}</view>
<text class="placeholder" wx:else>请选择</text>
</view>
</picker>
<!-- 品牌车型 -->
<view wx:if="{{item.type == 'brand'}}" class="brand">
<view wx:if="{{formData.vehicleBrandId}}">
{{formData.vehicleBrandName || ''}}/{{formData.vehicleSubBrandName || ''}}/{{formData.vehicleSeriesName || ''}}/{{formData.vehicleShapeName || ''}}
</view>
<view wx:else class="placeholder-class">{{item.placeholder || '请选择'}}</view>
</view>
</gl-cell>
<slot wx:if="{{item.type == 'otherSlot'}}" name="{{item.name}}" />
</view>
var isShowFn = function (formData, targetItem) {
var flag = false
if (targetItem.isShowObj && formData) {
for (var i = 0; i <= targetItem.isShowObj.list.length; i++) {
var item = targetItem.isShowObj.list[i]
if (item == formData[targetItem.isShowObj.attr]) {
flag = true
break
}
}
} else {
flag = true
}
return flag
}
module.exports = {
isShowFn: isShowFn
}
\ No newline at end of file \ No newline at end of file
/**
* 动态校验字段
* @param {*} obj 需校验的对象
* @param {*} formRule 校验规则
* formRule = {
* id: [
* { required: true, message: 'xx不能为空' },
* {
* validator: (rule, value) => {
* return value != 'cwq' ? { message: '错误信息' } : null
* }
* }
* ],
* }
*/
const checkRequired = function (obj, formRule) {
let target = Object.keys(formRule)
for (let i = 0; i < target.length; i++) {
let attr = target[i]
let item = formRule[attr]
let requirObj = item.find(k => k.required == true)
let validFn = item.find(k => k.validator)
if (requirObj && !obj[attr]) {
return {
...requirObj,
attr
}
}
if (validFn) {
let validObj = validFn.validator({}, obj[attr], obj)
if (validObj) {
return {
...validObj,
attr
}
}
}
}
return false
}
export default {
checkRequired
}
\ No newline at end of file \ No newline at end of file
...@@ -21,6 +21,8 @@ Component({ ...@@ -21,6 +21,8 @@ Component({
labelStyle: String, labelStyle: String,
cellStyle: String, cellStyle: String,
cellBoxStyle: String, cellBoxStyle: String,
cellValueStyle: String,
noPadding: Boolean,
background: { background: {
type: String, type: String,
value: '#FFFFFF', value: '#FFFFFF',
......
...@@ -62,6 +62,10 @@ ...@@ -62,6 +62,10 @@
padding-right: var(--fontSize40) !important; padding-right: var(--fontSize40) !important;
} }
.cell-value .noPadding {
padding: 0 !important;
}
.value { .value {
width: 100%; width: 100%;
height: 100%; height: 100%;
......
...@@ -16,8 +16,8 @@ ...@@ -16,8 +16,8 @@
src="{{iconSrc}}" /> src="{{iconSrc}}" />
<text class="titleBtn" wx:if="{{titleBtn}}">{{titleBtn}}</text> <text class="titleBtn" wx:if="{{titleBtn}}">{{titleBtn}}</text>
</view> </view>
<view class='cell-value ' style="width:calc(100% - {{labelWidth}});"> <view class='cell-value ' style="width:calc(100% - {{labelWidth}});{{cellValueStyle}}">
<view class='value {{valueAlign}} {{haveArrow}}'> <view class='value {{valueAlign}} {{haveArrow}} {{noPadding ? "noPadding" : ""}}'>
<view class='slot'> <view class='slot'>
<slot/> <slot/>
</view> </view>
......
...@@ -165,11 +165,11 @@ Component({ ...@@ -165,11 +165,11 @@ Component({
let tempList = isReset ? data?.list : [...this.data.storeRangeList, ...data?.list] let tempList = isReset ? data?.list : [...this.data.storeRangeList, ...data?.list]
if (!searchValue) { if (!searchValue) {
if (!tempList.some(v => v.merchantName === '全部')) { if (!tempList.some(v => v.merchantName === '全部')) {
tempList.unshift({merchantName: '全部'}) tempList.unshift({ merchantName: '全部' })
} }
if (isReset) this.setData({scrollTop: 0}) if (isReset) this.setData({ scrollTop: 0 })
if (!tempList.some(v => v.merchantId === userInfo?.shopMerchantId) && userInfo?.shopMerchantId) { if (!tempList.some(v => v.merchantId === userInfo?.shopMerchantId) && userInfo?.shopMerchantId) {
tempList.push({merchantId: userInfo?.shopMerchantId, merchantName: userInfo?.shopMerchantName}); tempList.push({ merchantId: userInfo?.shopMerchantId, merchantName: userInfo?.shopMerchantName });
} }
} }
tempList = this.uniqueByProperty(tempList, 'merchantId') tempList = this.uniqueByProperty(tempList, 'merchantId')
...@@ -186,7 +186,7 @@ Component({ ...@@ -186,7 +186,7 @@ Component({
pageNum: pageNum, pageNum: pageNum,
pageSize: 10, pageSize: 10,
keyword: searchValue, keyword: searchValue,
sellerMerchantId: userInfo?.isSuper || userInfo?.loginRole == 3 ? '' : (userInfo?.merchantId || '') sellerMerchantId: userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5 ? '' : (userInfo?.merchantId || '')
} }
if (nothing) return if (nothing) return
api.searchOrderCustomer(params).then(res => { api.searchOrderCustomer(params).then(res => {
......
...@@ -198,7 +198,7 @@ Component({ ...@@ -198,7 +198,7 @@ Component({
pageNum: pageNum, pageNum: pageNum,
pageSize: 10, pageSize: 10,
keyword: searchValue, keyword: searchValue,
sellerMerchantId: userInfo?.isSuper || userInfo?.loginRole == 3 ? '' : (userInfo?.merchantId || '') sellerMerchantId: userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5 ? '' : (userInfo?.merchantId || '')
} }
if (nothing) return if (nothing) return
api.searchOrderCustomer(params).then(res => { api.searchOrderCustomer(params).then(res => {
......
...@@ -35,7 +35,7 @@ Component({ ...@@ -35,7 +35,7 @@ Component({
ready() { ready() {
let userInfo = wx.$util.getUserInfo() let userInfo = wx.$util.getUserInfo()
this.setData({ this.setData({
isForbidden: !(userInfo?.isSuper || userInfo?.loginRole == 3), isForbidden: !(userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5),
isYqdSuper: app.globalData.isYqdSuper, isYqdSuper: app.globalData.isYqdSuper,
selectedSceneName: constantData?.sceneList?.filter(val => val.sceneType == userInfo?.sceneType)[0]?.sceneName, selectedSceneName: constantData?.sceneList?.filter(val => val.sceneType == userInfo?.sceneType)[0]?.sceneName,
selectedSceneDesc: constantData?.sceneList?.filter(val => val.sceneType == userInfo?.sceneType)[0]?.sceneDesc, selectedSceneDesc: constantData?.sceneList?.filter(val => val.sceneType == userInfo?.sceneType)[0]?.sceneDesc,
...@@ -57,70 +57,70 @@ Component({ ...@@ -57,70 +57,70 @@ Component({
* 组件的方法列表 * 组件的方法列表
*/ */
methods: { methods: {
/**跳转至银行卡 */ /**跳转至银行卡 */
toAddBankAccount(e) { toAddBankAccount(e) {
const { const {
score, score,
user user
} = this.data } = this.data
this.setData({ this.setData({
showAccountModal: false showAccountModal: false
}, () => { }, () => {
wx.$router.go('integration.detail', { wx.$router.go('integration.detail', {
score score
}) })
})
},
async getStaffBankList() {
let userInfo = wx.$util.getUserInfo(),
res = await api.getStaffBankList({
uuid: userInfo.uuid
}) })
},
async getStaffBankList() {
let userInfo = wx.$util.getUserInfo(),
res = await api.getStaffBankList({
uuid: userInfo.uuid
})
console.log(res) console.log(res)
if (res.data && res.data.length) { if (res.data && res.data.length) {
this.data.staffBankFlag = true this.data.staffBankFlag = true
const [staffBankInfo] = res.data const [staffBankInfo] = res.data
if (staffBankInfo.state == 2 && !this.staffBankInfo) { if (staffBankInfo.state == 2 && !this.staffBankInfo) {
this.staffBankInfo = staffBankInfo this.staffBankInfo = staffBankInfo
this.setData({
showAccountErrorModal: true
})
}
}
},
//我的积分
toPoint() {
console.log(999)
//判断是否添加银行卡
if (!this.data.staffBankFlag) {
this.setData({ this.setData({
showAccountErrorModal: true showAccountModal: true
}) })
} return
} }
}, // 新的积分兑换页面
//我的积分 wx.$router.go('integration.index')
toPoint() { },
console.log(999) toCloseModal(e) {
//判断是否添加银行卡 const {
if (!this.data.staffBankFlag) { name
} = e.currentTarget.dataset
this.setData({ this.setData({
showAccountModal: true [name]: false
});
},
//收款账户
jumpAccount() {
const {
score,
user
} = wx.$router.getPageInstance()
wx.$router.go('integration.list', {
score,
user
}) })
return
}
// 新的积分兑换页面
wx.$router.go('integration.index')
},
toCloseModal(e) {
const {
name
} = e.currentTarget.dataset
this.setData({
[name]: false
});
},
//收款账户
jumpAccount() {
const {
score,
user
} = wx.$router.getPageInstance()
wx.$router.go('integration.list', {
score,
user
})
}, },
// 跳转到工资绩效 // 跳转到工资绩效
jump(e) { jump(e) {
let { url } = e.currentTarget.dataset let { url } = e.currentTarget.dataset
......
...@@ -85,7 +85,8 @@ Component({ ...@@ -85,7 +85,8 @@ Component({
1: '超管', 1: '超管',
2: '商户管理员', 2: '商户管理员',
3: '区域督导', 3: '区域督导',
4: '驻店负责人' 4: '驻店负责人',
5: '销售',
}, },
loginRole: '', loginRole: '',
userInfo: {}, userInfo: {},
......
...@@ -120,7 +120,7 @@ Page({ ...@@ -120,7 +120,7 @@ Page({
// // 格式化日期为"yyyy-mm-dd" // // 格式化日期为"yyyy-mm-dd"
// let formattedDate = previousDate.toISOString().split("T")[0]; // let formattedDate = previousDate.toISOString().split("T")[0];
// console.log("formattedDate", formattedDate); // console.log("formattedDate", formattedDate);
// if (wx.__HAS_NOTLOGIN_MODAL || userInfo?.isSuper || userInfo?.loginRole == 3) return false; // if (wx.__HAS_NOTLOGIN_MODAL || userInfo?.isSuper || userInfo?loginRole == 3 || userInfo.loginRole == 5) return false;
// this.addModalToQueue( // this.addModalToQueue(
// "日报提醒", // "日报提醒",
// "您有未填写的日报,请点击前往。", // "您有未填写的日报,请点击前往。",
...@@ -224,7 +224,7 @@ Page({ ...@@ -224,7 +224,7 @@ Page({
let { code, data } = res; let { code, data } = res;
if (code == 0) { if (code == 0) {
if (!data) { if (!data) {
if (wx.__HAS_NOTLOGIN_MODAL || userInfo?.isSuper || userInfo?.loginRole == 3) return false; if (wx.__HAS_NOTLOGIN_MODAL || userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5) return false;
this.addModalToQueue( this.addModalToQueue(
"交车目标", "交车目标",
"您有未填写的交车目标,请点击前往", "您有未填写的交车目标,请点击前往",
...@@ -269,7 +269,7 @@ Page({ ...@@ -269,7 +269,7 @@ Page({
this.setData({ this.setData({
mode: -1, mode: -1,
}); });
if (userInfo?.isSuper || userInfo?.loginRole == 3) return false if (userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5) return false
this.addModalToQueue( this.addModalToQueue(
"温馨提示", "温馨提示",
"未配置权益规则,请联系客服处理。", "未配置权益规则,请联系客服处理。",
...@@ -327,11 +327,11 @@ Page({ ...@@ -327,11 +327,11 @@ Page({
get4SStoreList() { get4SStoreList() {
let userInfo = wx.$util.getUserInfo(); let userInfo = wx.$util.getUserInfo();
let params = { let params = {
merchantId: userInfo?.isSuper || userInfo?.loginRole == 3 ? "" : userInfo?.merchantId, merchantId: userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5 ? "" : userInfo?.merchantId,
staffUUID: userInfo?.isSuper || userInfo?.loginRole == 3 ? "" : userInfo?.uuid, staffUUID: userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5 ? "" : userInfo?.uuid,
scene: 0, scene: 0,
}; };
get4SStoreList(params, userInfo?.isSuper || userInfo?.loginRole == 3).then((result) => { get4SStoreList(params, userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5).then((result) => {
let userInfo = wx.$util.getUserInfo(); let userInfo = wx.$util.getUserInfo();
if (!result?.length) { if (!result?.length) {
userInfo.shopMerchantId = null; userInfo.shopMerchantId = null;
...@@ -341,7 +341,7 @@ Page({ ...@@ -341,7 +341,7 @@ Page({
wx.$util.setUserInfo(userInfo); wx.$util.setUserInfo(userInfo);
return wx.$router.reLaunch("pages.accountItems"); return wx.$router.reLaunch("pages.accountItems");
} }
if (result?.length && (userInfo?.isSuper || userInfo.loginRole == 3)) { if (result?.length && (userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5)) {
if (result[0]?.merchantName !== '全部' && result[0]?.merchantId) { if (result[0]?.merchantName !== '全部' && result[0]?.merchantId) {
result.unshift({ merchantName: '全部' }) result.unshift({ merchantName: '全部' })
} }
...@@ -415,7 +415,7 @@ Page({ ...@@ -415,7 +415,7 @@ Page({
.then((res) => { .then((res) => {
const { list = [] } = res.data; const { list = [] } = res.data;
if (list.length) { if (list.length) {
if (wx.__HAS_NOTLOGIN_MODAL || userInfo?.isSuper || userInfo?.loginRole == 3) return false; if (wx.__HAS_NOTLOGIN_MODAL || userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5) return false;
this.addModalToQueue( this.addModalToQueue(
"对练任务提醒", "对练任务提醒",
"您有未完成的对练任务,点击前往完成", "您有未完成的对练任务,点击前往完成",
...@@ -478,7 +478,7 @@ Page({ ...@@ -478,7 +478,7 @@ Page({
}) })
.then((result) => { .then((result) => {
if (result.data) { if (result.data) {
if (wx.__HAS_NOTLOGIN_MODAL || userInfo?.isSuper || userInfo?.loginRole == 3) return false; if (wx.__HAS_NOTLOGIN_MODAL || userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5) return false;
this.addModalToQueue( this.addModalToQueue(
"开单预警", "开单预警",
"您已超过三天未开单", "您已超过三天未开单",
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<block wx:elif="{{tabIndex == 1}}"> <block wx:elif="{{tabIndex == 1}}">
<view class="navigation-title"> <view class="navigation-title">
<view class="navigation-title-text text-hide"> <view class="navigation-title-text text-hide">
<block wx:if="{{userInfo && (userInfo.isSuper||userInfo.loginRole == 3)}}"> <block wx:if="{{userInfo && (userInfo.isSuper||userInfo.loginRole== 3 || userInfo.loginRole== 5)}}">
数字报价 数字报价
</block> </block>
<block wx:else> <block wx:else>
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
<view class="layout {{ waitInputCount && mode == 1 && tabIndex == 0 ?'tipsHeigh':'layout_noTips' }}" style="padding-top:{{ navBarHeight }}px;position: relative;"> <view class="layout {{ waitInputCount && mode == 1 && tabIndex == 0 ?'tipsHeigh':'layout_noTips' }}" style="padding-top:{{ navBarHeight }}px;position: relative;">
<block wx:if="{{ navBarHeight && showPage }}"> <block wx:if="{{ navBarHeight && showPage }}">
<!-- wx:if="{{ tabIndex == 0}}" wx:if="{{ tabIndex == 1}}" --> <!-- wx:if="{{ tabIndex == 0}}" wx:if="{{ tabIndex == 1}}" -->
<quotation-list id="page-1" navBarHeight="{{ navBarHeight }}" class="pagedetail {{ tabIndex == 1?'':'hide' }}" mode="{{ mode }}" staffUuid="{{staffUuid}}"/> <quotation-list id="page-1" navBarHeight="{{ navBarHeight }}" class="pagedetail {{ tabIndex == 1?'':'hide' }}" mode="{{ mode }}" staffUuid="{{staffUuid}}" />
<home id="page-0" class="pagedetail {{ tabIndex == 0?'':'hide' }}" navBarHeight="{{ navBarHeight }}" waitInputCount="{{waitInputCount}}" mode="{{ mode }}" showScreen="{{showScreen}}" show="{{tabIndex == 0}}"></home> <home id="page-0" class="pagedetail {{ tabIndex == 0?'':'hide' }}" navBarHeight="{{ navBarHeight }}" waitInputCount="{{waitInputCount}}" mode="{{ mode }}" showScreen="{{showScreen}}" show="{{tabIndex == 0}}"></home>
<equity-list id="page-2" outTabIndex="{{ tabIndex }}" navBarHeight="{{ navBarHeight }}" class="pagedetail {{ tabIndex == 2?'':'hide' }}" /> <equity-list id="page-2" outTabIndex="{{ tabIndex }}" navBarHeight="{{ navBarHeight }}" class="pagedetail {{ tabIndex == 2?'':'hide' }}" />
<makert-material id="page-3" navBarHeight="{{ navBarHeight }}" class="pagedetail {{tabIndex == 3?'':'hide'}}"></makert-material> <makert-material id="page-3" navBarHeight="{{ navBarHeight }}" class="pagedetail {{tabIndex == 3?'':'hide'}}"></makert-material>
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
</view> </view>
<custom-tabBar list="{{ tabBarList }}" color="#6C6C70" selectedColor="#347BFF" tabIndex="{{ tabIndex }}" bindchange="changeTabBar" /> <custom-tabBar list="{{ tabBarList }}" color="#6C6C70" selectedColor="#347BFF" tabIndex="{{ tabIndex }}" bindchange="changeTabBar" />
<!-- <store-picker items="{{ storeListRange }}" show="{{ showPicker }}" bindsearch="getStoreList" bindconfirm="changePicker" /> --> <!-- <store-picker items="{{ storeListRange }}" show="{{ showPicker }}" bindsearch="getStoreList" bindconfirm="changePicker" /> -->
<block wx:if="{{userInfo.isSuper || userInfo.loginRole == 3}}"> <block wx:if="{{userInfo.isSuper || userInfo.loginRole== 3 || userInfo.loginRole== 5}}">
<side-select-by-page-popup show="{{ shopSideSelectPopup }}" bindconfirm="changePicker" /> <side-select-by-page-popup show="{{ shopSideSelectPopup }}" bindconfirm="changePicker" />
</block> </block>
<block wx:else> <block wx:else>
......
...@@ -110,7 +110,7 @@ Component({ ...@@ -110,7 +110,7 @@ Component({
nothing: false, nothing: false,
pageNum: 1, pageNum: 1,
storeInfo: wx.$util.getUserInfo()?.default4SStoreInfo || {}, storeInfo: wx.$util.getUserInfo()?.default4SStoreInfo || {},
isOrder: !(userInfo?.isSuper || userInfo?.loginRole == 3) isOrder: !(userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5)
}) })
this.getTotal() this.getTotal()
if (!noGetList) this.getList(true) if (!noGetList) this.getList(true)
......
...@@ -294,12 +294,12 @@ ...@@ -294,12 +294,12 @@
bind:delete="handleDeleteImg" bind:delete="handleDeleteImg"
data-attr="invoice" data-attr="invoice"
></van-uploader> ></van-uploader>
<view class="label">行驶证</view> <view class="label">行驶证或车辆合格证</view>
<view class="flex"> <view class="flex">
<van-uploader <van-uploader
class="driveFront" class="driveFront"
file-list="{{ imgObj.driveFront }}" file-list="{{ imgObj.driveFront }}"
upload-text="行驶证主页" upload-text="行驶证主页/车辆合格证"
max-count="1" max-count="1"
deletable deletable
preview-size="var(--fontSize192)" preview-size="var(--fontSize192)"
...@@ -310,7 +310,7 @@ ...@@ -310,7 +310,7 @@
<van-uploader <van-uploader
class="driveBack" class="driveBack"
file-list="{{ imgObj.driveBack }}" file-list="{{ imgObj.driveBack }}"
upload-text="行驶证副页" upload-text="行驶证副页/车辆合格证"
max-count="1" max-count="1"
deletable deletable
preview-size="var(--fontSize192)" preview-size="var(--fontSize192)"
......
...@@ -301,7 +301,7 @@ ...@@ -301,7 +301,7 @@
} }
.upload .van-uploader__upload-text { .upload .van-uploader__upload-text {
font-size: var(--fontSize22) !important; font-size: var(--fontSize20) !important;
color: #9B9B9E !important; color: #9B9B9E !important;
} }
......
...@@ -39,6 +39,8 @@ Component({ ...@@ -39,6 +39,8 @@ Component({
*/ */
methods: { methods: {
handleClick() { handleClick() {
// 信息确认直接关闭弹窗
if (this.data.type == 'warning') return this.triggerEvent('close', {type: 'warning'})
this.triggerEvent('click') this.triggerEvent('click')
}, },
handleClose() { handleClose() {
......
...@@ -3,8 +3,9 @@ ...@@ -3,8 +3,9 @@
<view class="bg" bindtap="handleShow" /> <view class="bg" bindtap="handleShow" />
<view class="content"> <view class="content">
<image wx:if="{{type == 'error'}}" class="icon" src="../../../image/icon-error.png" show-menu-by-longpress="{{true}}"></image> <image wx:if="{{type == 'error'}}" class="icon" src="../../../image/icon-error.png" show-menu-by-longpress="{{true}}"></image>
<image wx:if="{{type == 'warning'}}" class="icon" src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/order_warning.png" mode="" show-menu-by-longpress="{{true}}"/>
<image wx:else class="icon" src="../../../image/icon-success.png" show-menu-by-longpress="{{true}}"></image> <image wx:else class="icon" src="../../../image/icon-success.png" show-menu-by-longpress="{{true}}"></image>
<view class="title">{{title}}</view> <view class="title {{type == 'warning' ? 'warning_title' : ''}}">{{title}}</view>
<view class="tipTxt">{{tipTxt}}</view> <view class="tipTxt">{{tipTxt}}</view>
<view class="btn" bindtap="handleClick">{{btnTxt}}</view> <view class="btn" bindtap="handleClick">{{btnTxt}}</view>
</view> </view>
......
...@@ -49,6 +49,13 @@ ...@@ -49,6 +49,13 @@
color: #347BFF; color: #347BFF;
} }
.warning_title {
text-align: center;
font-weight: 600;
font-size: var(--fontSize48);
color: #292D33;
}
.tipTxt { .tipTxt {
font-size: 14px; font-size: 14px;
color: #9B9B9E; color: #9B9B9E;
......
...@@ -582,7 +582,11 @@ const secondObj = { ...@@ -582,7 +582,11 @@ const secondObj = {
name: 'effectiveDate', name: 'effectiveDate',
type: 'pickerTime', type: 'pickerTime',
start: Util.tsFormatTime(new Date(new Date().setDate(new Date(new Date()).getDate() + 1)), 'Y-M-D'), start: Util.tsFormatTime(new Date(new Date().setDate(new Date(new Date()).getDate() + 1)), 'Y-M-D'),
haveArrow: true haveArrow: true,
isShowObj: {
attr: 'allWarrantyFlag',
list: ['0']
}
// .toLocaleDateString().replace('/','-') // .toLocaleDateString().replace('/','-')
}, },
// { // {
......
...@@ -14,6 +14,12 @@ const errorObj = { ...@@ -14,6 +14,12 @@ const errorObj = {
tipTxt: '', tipTxt: '',
btnTxt: '重新提单' btnTxt: '重新提单'
} }
const warningObj = {
type: 'warning',
title: '信息确认',
tipTxt: '',
btnTxt: '继续出单'
}
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
...@@ -195,9 +201,12 @@ Page({ ...@@ -195,9 +201,12 @@ Page({
data?.goodInfoList?.forEach(val => { data?.goodInfoList?.forEach(val => {
if (val.printType == 2 && !['YB0001', 'YB0002', 'YB0003'].includes(val.itemsCode)) val.displacementPowerFlag = val.displacementPowerFlag || 0 // 默认是选中排量 if (val.printType == 2 && !['YB0001', 'YB0002', 'YB0003'].includes(val.itemsCode)) val.displacementPowerFlag = val.displacementPowerFlag || 0 // 默认是选中排量
}) })
// 判断购买商品是否全部是延保allWarrantyFlag
const allWarrantyFlag = data?.goodInfoList?.some(v => v.printType != 2)
this.setData({ this.setData({
serviceInfo: data, serviceInfo: data,
['serviceInfo.attachmentList']:data?.attachmentList||[], ['serviceInfo.attachmentList']:data?.attachmentList||[],
['serviceInfo.allWarrantyFlag']: !allWarrantyFlag ? 1 : 0, // 0 显示生效日期 1不显示
step: data.mode ? 'second' : 'first' step: data.mode ? 'second' : 'first'
}) })
this.dealTireObj() this.dealTireObj()
...@@ -304,6 +313,10 @@ Page({ ...@@ -304,6 +313,10 @@ Page({
// 0草稿,1提单 // 0草稿,1提单
params.operationType = typeObj[type] params.operationType = typeObj[type]
params.addOnsFlag = serviceInfo.addOnsFlag==2?0:1 params.addOnsFlag = serviceInfo.addOnsFlag==2?0:1
if (params?.allWarrantyFlag == 1) { // 全部为延保商品 不传生效日期
delete params.effectiveDate
}
delete params.allWarrantyFlag
console.log(params, '调接口---') console.log(params, '调接口---')
this.setData({ this.setData({
isAsk: true isAsk: true
...@@ -394,7 +407,7 @@ Page({ ...@@ -394,7 +407,7 @@ Page({
} else { } else {
this.setData({ this.setData({
['conSecondObj.vin']: serviceInfo.vin, ['conSecondObj.vin']: serviceInfo.vin,
dialogObj: JSON.parse(JSON.stringify(errorObj)), dialogObj: res?.message?.includes('该车架已经购买过') ? JSON.parse(JSON.stringify(warningObj)) : JSON.parse(JSON.stringify(errorObj)),
['dialogObj.tipTxt']: res.message, ['dialogObj.tipTxt']: res.message,
isDialogShow: true, isDialogShow: true,
e: {} e: {}
...@@ -402,7 +415,7 @@ Page({ ...@@ -402,7 +415,7 @@ Page({
} }
} else { } else {
this.setData({ this.setData({
dialogObj: JSON.parse(JSON.stringify(errorObj)), dialogObj: res?.message?.includes('该车架已经购买过') ? JSON.parse(JSON.stringify(warningObj)) : JSON.parse(JSON.stringify(errorObj)),
['dialogObj.tipTxt']: res.message, ['dialogObj.tipTxt']: res.message,
isDialogShow: true, isDialogShow: true,
e: {} e: {}
...@@ -413,11 +426,13 @@ Page({ ...@@ -413,11 +426,13 @@ Page({
}, },
handleSecondConfirm(e) { handleSecondConfirm(e) {
console.log(e) console.log(e)
let { serviceInfo, conSecondObj, isAsk } = this.data let { serviceInfo, conSecondObj, isAsk, noCheckVinFlag } = this.data
if (isAsk) { if (isAsk) {
return true return true
} }
if (e.detail?.type == 'confirm') { if (e.detail?.type == 'confirm') {
// 校验过车架号重复后,不再做确认,直接提交表单
if (noCheckVinFlag) return this.confirm(e)
this.setData({ this.setData({
secFormData: { secFormData: {
carVin: serviceInfo.vin carVin: serviceInfo.vin
...@@ -455,6 +470,7 @@ Page({ ...@@ -455,6 +470,7 @@ Page({
this.setData({ this.setData({
isDialogShow: false isDialogShow: false
}) })
if (e.detail?.type == 'warning') return this.setData({noCheckVinFlag: true})
wx.$router.reLaunch('packageEquity.equityPage', { tabIndex: 2 }) wx.$router.reLaunch('packageEquity.equityPage', { tabIndex: 2 })
}, },
......
...@@ -18,7 +18,7 @@ Component({ ...@@ -18,7 +18,7 @@ Component({
userInfo userInfo
} = this.data } = this.data
// 非超管 获取转化人员 销售顾问 // 非超管 获取转化人员 销售顾问
if (!(userInfo?.isSuper || userInfo.loginRole == 3)) { if (!(userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5)) {
if (wx.$orderListDateListScreenRefresh) { // 切换门店将数据清空 if (wx.$orderListDateListScreenRefresh) { // 切换门店将数据清空
this.setData({ this.setData({
'form.referrerIds': [], 'form.referrerIds': [],
...@@ -347,7 +347,7 @@ Component({ ...@@ -347,7 +347,7 @@ Component({
e.value = [e.uuid] e.value = [e.uuid]
arr.push(e) arr.push(e)
}) })
// if (!(userInfo?.isSuper || userInfo.loginRole == 3)) arr.map(e => { // if (!(userInfo?.isSuper || userInfo?.loginRole== 3 || userInfo.loginRole== 5)) arr.map(e => {
// if (type == 0) { // if (type == 0) {
// e.active = false // e.active = false
// if (e.uuid == userInfo.uuid) e.active = true // if (e.uuid == userInfo.uuid) e.active = true
...@@ -386,8 +386,8 @@ Component({ ...@@ -386,8 +386,8 @@ Component({
}) })
transferIds?.map((val, index) => { transferIds?.map((val, index) => {
val.active = false val.active = false
if (!(userInfo?.isSuper || userInfo.loginRole == 3) && userInfo.uuid == val.uuid) val.active = true if (!(userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5) && userInfo.uuid == val.uuid) val.active = true
if ((userInfo?.isSuper || userInfo.loginRole == 3) && index == 0) val.active = true if ((userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5) && index == 0) val.active = true
}) })
orderStatus?.map((val, index) => { orderStatus?.map((val, index) => {
val.active = false val.active = false
...@@ -450,7 +450,7 @@ Component({ ...@@ -450,7 +450,7 @@ Component({
} }
}) })
}) })
if ((userInfo?.isSuper || userInfo.loginRole == 3)) ['selectedYqMerchantList', 'selectedMerchantList'].map(e => { if ((userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5)) ['selectedYqMerchantList', 'selectedMerchantList'].map(e => {
delete obj[e] delete obj[e]
}) })
if (isReset) obj = {} if (isReset) obj = {}
......
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
<scroll-view scroll-y class="confirm-box" style="height:calc(100vh - {{navBarHeight }}px + 1px);margin-top:calc({{navBarHeight }}px - 1px);" hidden="{{!show}}"> <scroll-view scroll-y class="confirm-box" style="height:calc(100vh - {{navBarHeight }}px + 1px);margin-top:calc({{navBarHeight }}px - 1px);" hidden="{{!show}}">
<view class="main" style="padding-bottom:{{btnHeight}}px"> <view class="main" style="padding-bottom:{{btnHeight}}px">
<!-- 非超管转化人员 --> <!-- 非超管转化人员 -->
<view class="box" wx:if="{{!(userInfo.isSuper || userInfo.loginRole == 3)}}"> <view class="box" wx:if="{{!(userInfo.isSuper || userInfo.loginRole== 3 || userInfo.loginRole== 5)}}">
<view class="title"> <view class="title">
<view class="title-left"> <view class="title-left">
转化人员 转化人员
<view class="title-tips" wx:if="{{!(userInfo.isSuper || userInfo.loginRole == 3)}}">{{userInfo.merchantName}}</view> <view class="title-tips" wx:if="{{!(userInfo.isSuper || userInfo.loginRole== 3 || userInfo.loginRole== 5)}}">{{userInfo.merchantName}}</view>
</view> </view>
<view wx:if="{{form.transferIds.length > 12}}" bindtap="showMore" data-type="1" class="collapse-btn {{!employShowMore ? 'rotate-180' : ''}}"> <view wx:if="{{form.transferIds.length > 12}}" bindtap="showMore" data-type="1" class="collapse-btn {{!employShowMore ? 'rotate-180' : ''}}">
<image src="{{IMG_URL}}collapse_icon.png" mode="" /> <image src="{{IMG_URL}}collapse_icon.png" mode="" />
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
</view> </view>
</view> </view>
<!-- 超管转化人员 选择园区店 --> <!-- 超管转化人员 选择园区店 -->
<view class="box" wx:if="{{(userInfo.isSuper || userInfo.loginRole == 3)}}"> <view class="box" wx:if="{{(userInfo.isSuper || userInfo.loginRole== 3 || userInfo.loginRole== 5)}}">
<view class="title"> <view class="title">
<view class="title-left"> <view class="title-left">
转化人员 转化人员
...@@ -42,11 +42,11 @@ ...@@ -42,11 +42,11 @@
</view> </view>
</view> </view>
<!-- 非超管销售顾问 --> <!-- 非超管销售顾问 -->
<view class="box" wx:if="{{!(userInfo.isSuper || userInfo.loginRole == 3)}}"> <view class="box" wx:if="{{!(userInfo.isSuper || userInfo.loginRole== 3 || userInfo.loginRole== 5)}}">
<view class="title"> <view class="title">
<view class="title-left"> <view class="title-left">
销售顾问 销售顾问
<view class="title-tips" wx:if="{{!(userInfo.isSuper || userInfo.loginRole == 3)}}">{{userInfo.shopMerchantName}}</view> <view class="title-tips" wx:if="{{!(userInfo.isSuper || userInfo.loginRole== 3 || userInfo.loginRole== 5)}}">{{userInfo.shopMerchantName}}</view>
</view> </view>
<view wx:if="{{form.referrerIds.length > 12}}" bindtap="showMore" data-type="2" class="collapse-btn {{!salesmanShowMore ? 'rotate-180' : ''}}"> <view wx:if="{{form.referrerIds.length > 12}}" bindtap="showMore" data-type="2" class="collapse-btn {{!salesmanShowMore ? 'rotate-180' : ''}}">
<image src="{{IMG_URL}}collapse_icon.png" mode="" /> <image src="{{IMG_URL}}collapse_icon.png" mode="" />
...@@ -61,11 +61,11 @@ ...@@ -61,11 +61,11 @@
</view> </view>
</view> </view>
<!-- 超管销售顾问 选择4s店 --> <!-- 超管销售顾问 选择4s店 -->
<view class="box" wx:if="{{(userInfo.isSuper || userInfo.loginRole == 3)}}"> <view class="box" wx:if="{{(userInfo.isSuper || userInfo.loginRole== 3 || userInfo.loginRole== 5)}}">
<view class="title"> <view class="title">
<view class="title-left"> <view class="title-left">
销售顾问 销售顾问
<view class="title-tips" wx:if="{{!(userInfo.isSuper || userInfo.loginRole == 3)}}">{{userInfo.shopMerchantName}}</view> <view class="title-tips" wx:if="{{!(userInfo.isSuper || userInfo.loginRole== 3 || userInfo.loginRole== 5)}}">{{userInfo.shopMerchantName}}</view>
</view> </view>
<view wx:if="{{form.selectedMerchantList.length > 3}}" bindtap="showMore" data-type="2" class="collapse-btn {{!salesmanShowMore ? 'rotate-180' : ''}}"> <view wx:if="{{form.selectedMerchantList.length > 3}}" bindtap="showMore" data-type="2" class="collapse-btn {{!salesmanShowMore ? 'rotate-180' : ''}}">
<image src="{{IMG_URL}}collapse_icon.png" mode="" /> <image src="{{IMG_URL}}collapse_icon.png" mode="" />
......
...@@ -209,7 +209,7 @@ Component({ ...@@ -209,7 +209,7 @@ Component({
nothing: false, nothing: false,
currentPage: 1, currentPage: 1,
storeInfo: wx.$util.getUserInfo()?.default4SStoreInfo || {}, storeInfo: wx.$util.getUserInfo()?.default4SStoreInfo || {},
isOrder: !(userInfo?.isSuper || userInfo?.loginRole == 3), isOrder: !(userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5),
list: [] list: []
}); });
// this.getTotal() // this.getTotal()
......
...@@ -43,35 +43,35 @@ Component({ ...@@ -43,35 +43,35 @@ Component({
IMG_URL, IMG_URL,
// 质检分数 // 质检分数
scoreList: [{ scoreList: [{
name: '全部', name: '全部',
active: true, active: true,
value: '' value: ''
}, },
{ {
name: '0-20分', name: '0-20分',
subName: '(虚假接待)', subName: '(虚假接待)',
value: 1 value: 1
}, },
{ {
name: '21-50分', name: '21-50分',
value: 2 value: 2
}, },
{ {
name: '51-80分', name: '51-80分',
value: 3 value: 3
}, },
{ {
name: '80分以上', name: '80分以上',
value: 4 value: 4
} }
], ],
maxDate: new Date().format('yyyy-MM-dd'), maxDate: new Date().format('yyyy-MM-dd'),
// 客户类型 // 客户类型
customerTypes: [ customerTypes: [
{ {
name: '全部', name: '全部',
active: true, active: true,
value: '' value: ''
} }
], ],
// 车型 // 车型
...@@ -267,7 +267,7 @@ Component({ ...@@ -267,7 +267,7 @@ Component({
} = this.data } = this.data
dateTime?.forEach(val => { dateTime?.forEach(val => {
val.active = false, val.active = false,
val.startDateTime = '' val.startDateTime = ''
val.endDateTime = '' val.endDateTime = ''
}) })
const setActiveFirstItem = (list) => { const setActiveFirstItem = (list) => {
...@@ -330,7 +330,7 @@ Component({ ...@@ -330,7 +330,7 @@ Component({
// 日期 // 日期
if (e == 'dateTime') { if (e == 'dateTime') {
obj.startDateTime = startDateTime || '', obj.startDateTime = startDateTime || '',
obj.endDateTime = endDateTime || '' obj.endDateTime = endDateTime || ''
} }
// 质检分数 // 质检分数
if (e == 'scoreList') { if (e == 'scoreList') {
...@@ -382,7 +382,7 @@ Component({ ...@@ -382,7 +382,7 @@ Component({
['form.staffRangeList']: storeRangeList ['form.staffRangeList']: storeRangeList
}) })
// 超管获取所有质检门店/员工 // 超管获取所有质检门店/员工
if (userInfo?.isSuper || userInfo?.loginRole == 3) { if (userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5) {
this.getStoreList() this.getStoreList()
} }
}, },
...@@ -412,8 +412,8 @@ Component({ ...@@ -412,8 +412,8 @@ Component({
}, },
getStaffList(isFilterMerchant = false) { getStaffList(isFilterMerchant = false) {
let { storeRangeList, form } = this.data let { storeRangeList, form } = this.data
let selectedMerchantData = form.selectedMerchantList?.map(val => { if (val.merchantNo) return val.merchantNo}) let selectedMerchantData = form.selectedMerchantList?.map(val => { if (val.merchantNo) return val.merchantNo })
let allMerchantData = storeRangeList?.map(val => { if (val.merchantNo) return val.merchantNo}) let allMerchantData = storeRangeList?.map(val => { if (val.merchantNo) return val.merchantNo })
let params = { let params = {
merchantNos: isFilterMerchant ? (selectedMerchantData?.length ? selectedMerchantData : allMerchantData) : allMerchantData merchantNos: isFilterMerchant ? (selectedMerchantData?.length ? selectedMerchantData : allMerchantData) : allMerchantData
} }
...@@ -479,7 +479,7 @@ Component({ ...@@ -479,7 +479,7 @@ Component({
orderResult[1].active = isFilterUpgrade && !orderResult[0].active; orderResult[1].active = isFilterUpgrade && !orderResult[0].active;
orderResult[2].active = isFilterDefeat && !orderResult[0].active; orderResult[2].active = isFilterDefeat && !orderResult[0].active;
this.setData({'form.orderResult': orderResult}); this.setData({ 'form.orderResult': orderResult });
// if (isFilterUpgrade || isFilterDefeat) orderResult[0].active = false // if (isFilterUpgrade || isFilterDefeat) orderResult[0].active = false
// if (isFilterUpgrade) orderResult[1].active = true // if (isFilterUpgrade) orderResult[1].active = true
// else orderResult[1].active = false // else orderResult[1].active = false
...@@ -489,7 +489,7 @@ Component({ ...@@ -489,7 +489,7 @@ Component({
// this.setData({'form.orderResult': orderResult}) // this.setData({'form.orderResult': orderResult})
} }
}, },
attached() { attached() {
wx.$util.getSystemInfo(info => { wx.$util.getSystemInfo(info => {
let { let {
......
<!--pages/tabWorkOrder/components/OrderScreen/OrderScreen.wxml--> <!--pages/tabWorkOrder/components/OrderScreen/OrderScreen.wxml-->
<scroll-view scroll-y class="confirm-box" style="height:calc(100vh - {{navBarHeight - 2}}px);margin-top:{{navBarHeight - 2}}px;" <scroll-view scroll-y class="confirm-box" style="height:calc(100vh - {{navBarHeight - 2}}px);margin-top:{{navBarHeight - 2}}px;" hidden="{{!show}}">
hidden="{{!show}}">
<view class="main"> <view class="main">
<view class="box"> <view class="box">
<view class="title"> <view class="title">
日期 日期
</view> </view>
<view class="list-box" wx:for="{{form.dateTime}}" wx:key="index"> <view class="list-box" wx:for="{{form.dateTime}}" wx:key="index">
<calendar allowSameDay maxDayRange="{{maxDayRange}}" maxDayRangeType="{{maxDayRangeType}}" shortcut bindselect='rangeSelect' id="orderCalendar" data-index="{{index}}" data-name="dateTime" dateType='range' calenderColor='#347BFF' <calendar allowSameDay maxDayRange="{{maxDayRange}}" maxDayRangeType="{{maxDayRangeType}}" shortcut bindselect='rangeSelect' id="orderCalendar" data-index="{{index}}" data-name="dateTime" dateType='range' calenderColor='#347BFF' vertical minDate="2020-10-01" maxDate="{{maxDate}}" minDate="2024-01-01" isComponents>
vertical minDate="2020-10-01" maxDate="{{maxDate}}" minDate="2024-01-01" isComponents>
</calendar> </calendar>
<view style="display: flex;align-items: center;width: 100%;"> <view style="display: flex;align-items: center;width: 100%;">
<view bindtap="showCalendar" data-type="show" data-target="showOrder" class="item custom-time text-center {{!item.startDateTime ? 'grey' : ''}} {{item.active?'active':''}}">{{item.startDateTime || '开始时间'}}</view>- <view bindtap="showCalendar" data-type="show" data-target="showOrder" class="item custom-time text-center {{!item.startDateTime ? 'grey' : ''}} {{item.active?'active':''}}">{{item.startDateTime || '开始时间'}}</view>-
...@@ -23,7 +21,7 @@ ...@@ -23,7 +21,7 @@
<view class="list-box"> <view class="list-box">
<view class="item flex-block"> <view class="item flex-block">
<image src="/images/search.png" class="icon"></image> <image src="/images/search.png" class="icon"></image>
<input placeholder="客户姓名/手机号" bindinput="input" value="{{customerName}}" type="text"/> <input placeholder="客户姓名/手机号" bindinput="input" value="{{customerName}}" type="text" />
</view> </view>
</view> </view>
</view> </view>
...@@ -33,8 +31,7 @@ ...@@ -33,8 +31,7 @@
</view> </view>
<view class="list-box"> <view class="list-box">
<block wx:for="{{form.scoreList}}" wx:key="index"> <block wx:for="{{form.scoreList}}" wx:key="index">
<view class="item text-center {{item.active?'active':''}} {{item.disabled ?'disabled':''}}" bindtap="choose" <view class="item text-center {{item.active?'active':''}} {{item.disabled ?'disabled':''}}" bindtap="choose" data-list-name="scoreList" data-index="{{index}}"><text>{{item.name}}</text><text style="font-size: var(--fontSize20);">{{item.subName}}</text></view>
data-list-name="scoreList" data-index="{{index}}"><text>{{item.name}}</text><text style="font-size: var(--fontSize20);">{{item.subName}}</text></view>
</block> </block>
</view> </view>
</view> </view>
...@@ -44,8 +41,7 @@ ...@@ -44,8 +41,7 @@
</view> </view>
<view class="list-box"> <view class="list-box">
<block wx:for="{{form.customerTypes}}" wx:key="index"> <block wx:for="{{form.customerTypes}}" wx:key="index">
<view class="item text-center {{item.active?'active':''}}" bindtap="choose" data-list-name="customerTypes" <view class="item text-center {{item.active?'active':''}}" bindtap="choose" data-list-name="customerTypes" data-index="{{index}}">{{item.name}}</view>
data-index="{{index}}">{{item.name}}</view>
</block> </block>
</view> </view>
</view> </view>
...@@ -55,8 +51,7 @@ ...@@ -55,8 +51,7 @@
</view> </view>
<view class="list-box"> <view class="list-box">
<block wx:for="{{form.carModels}}" wx:key="index"> <block wx:for="{{form.carModels}}" wx:key="index">
<view class="item text-center {{item.active?'active':''}}" bindtap="choose" data-list-name="carModels" <view class="item text-center {{item.active?'active':''}}" bindtap="choose" data-list-name="carModels" data-index="{{index}}">{{item.name}}</view>
data-index="{{index}}">{{item.name}}</view>
</block> </block>
</view> </view>
</view> </view>
...@@ -66,18 +61,19 @@ ...@@ -66,18 +61,19 @@
</view> </view>
<view class="list-box"> <view class="list-box">
<block wx:for="{{form.orderResult}}" wx:key="index"> <block wx:for="{{form.orderResult}}" wx:key="index">
<view class="item text-center {{item.active?'active':''}}" bindtap="choose" data-list-name="orderResult" <view class="item text-center {{item.active?'active':''}}" bindtap="choose" data-list-name="orderResult" data-index="{{index}}">{{item.name}}</view>
data-index="{{index}}">{{item.name}}</view>
</block> </block>
</view> </view>
</view> </view>
<!-- 超管选择4s店 --> <!-- 超管选择4s店 -->
<view class="box" wx:if="{{userInfo.isSuper || userInfo.loginRole == 3}}"> <view class="box" wx:if="{{userInfo.isSuper || userInfo.loginRole== 3 || userInfo.loginRole== 5}}">
<view class="title"> <view class="title">
<view class="title-left"> <view class="title-left">
门店 门店
</view> </view>
<view wx:if="{{form.selectedMerchantList.length > 3}}" bindtap="showMore" data-type="1" class="collapse-btn {{!merchantShowMore ? 'rotate-180' : ''}}"><image src="{{IMG_URL}}collapse_icon.png" mode=""/></view> <view wx:if="{{form.selectedMerchantList.length > 3}}" bindtap="showMore" data-type="1" class="collapse-btn {{!merchantShowMore ? 'rotate-180' : ''}}">
<image src="{{IMG_URL}}collapse_icon.png" mode="" />
</view>
</view> </view>
<view class="list-box"> <view class="list-box">
<view class="item text-center {{!form.selectedMerchantList.length?'active':''}}" bindtap="merchantChoose">全部</view> <view class="item text-center {{!form.selectedMerchantList.length?'active':''}}" bindtap="merchantChoose">全部</view>
...@@ -91,17 +87,18 @@ ...@@ -91,17 +87,18 @@
</view> </view>
</view> </view>
<!-- 超管选择员工 --> <!-- 超管选择员工 -->
<view class="box" wx:if="{{userInfo.isSuper || userInfo.loginRole == 3}}"> <view class="box" wx:if="{{userInfo.isSuper || userInfo.loginRole== 3 || userInfo.loginRole== 5}}">
<view class="title"> <view class="title">
<view class="title-left"> <view class="title-left">
员工 员工
</view> </view>
<view wx:if="{{form.staffRangeList.length > 12}}" bindtap="showMore" data-type="2" class="collapse-btn {{!staffShowMore ? 'rotate-180' : ''}}"><image src="{{IMG_URL}}collapse_icon.png" mode=""/></view> <view wx:if="{{form.staffRangeList.length > 12}}" bindtap="showMore" data-type="2" class="collapse-btn {{!staffShowMore ? 'rotate-180' : ''}}">
<image src="{{IMG_URL}}collapse_icon.png" mode="" />
</view>
</view> </view>
<view class="list-box"> <view class="list-box">
<block wx:for="{{form.staffRangeList}}" wx:key="index"> <block wx:for="{{form.staffRangeList}}" wx:key="index">
<view class="item text-center {{item.active?'active':''}}" bindtap="choose" hidden="{{index >= 12 && !staffShowMore}}" data-list-name="staffRangeList" <view class="item text-center {{item.active?'active':''}}" bindtap="choose" hidden="{{index >= 12 && !staffShowMore}}" data-list-name="staffRangeList" data-index="{{index}}">{{item.staffName}}</view>
data-index="{{index}}">{{item.staffName}}</view>
</block> </block>
</view> </view>
</view> </view>
...@@ -111,4 +108,4 @@ ...@@ -111,4 +108,4 @@
<view class="btn done text-center" bindtap="confirm">确定</view> <view class="btn done text-center" bindtap="confirm">确定</view>
</view> </view>
</scroll-view> </scroll-view>
<screen-select-popup show="{{showSelectPopup}}" bindconfirm="popupConfirm" bindcancel="hideStorePopup" bindfilterStore="filterPopupList" selectedData="{{form.selectedMerchantList}}" list="{{storeRangeList || []}}" bindupdata="updata"></screen-select-popup> <screen-select-popup show="{{showSelectPopup}}" bindconfirm="popupConfirm" bindcancel="hideStorePopup" bindfilterStore="filterPopupList" selectedData="{{form.selectedMerchantList}}" list="{{storeRangeList || []}}" bindupdata="updata"></screen-select-popup>
\ No newline at end of file \ No newline at end of file
...@@ -174,6 +174,7 @@ Component({ ...@@ -174,6 +174,7 @@ Component({
2: "商户管理员", 2: "商户管理员",
3: "区域督导", 3: "区域督导",
4: "驻店负责人", 4: "驻店负责人",
5: '销售',
}, },
loginRole: "", loginRole: "",
userInfo: {}, userInfo: {},
...@@ -421,8 +422,8 @@ Component({ ...@@ -421,8 +422,8 @@ Component({
orderResult: searchForm?.orderResult, orderResult: searchForm?.orderResult,
merchantNo: !searchForm?.merchantNo?.length ? (userInfo?.isSuper ? storeRangeList.map(v => { merchantNo: !searchForm?.merchantNo?.length ? (userInfo?.isSuper ? storeRangeList.map(v => {
if (v.merchantNo) return v.merchantNo if (v.merchantNo) return v.merchantNo
}) : userInfo?.loginRole == 3 ? '' : [userInfo?.default4SStoreInfo?.merchantId]) : searchForm?.merchantNo, }) : userInfo?.loginRole == 3 || userInfo.loginRole == 5 ? '' : [userInfo?.default4SStoreInfo?.merchantId]) : searchForm?.merchantNo,
staffUuids: userInfo.isSuper || userInfo?.loginRole == 3 ? searchForm?.staffUuids : [userInfo.uuid] staffUuids: userInfo.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5 ? searchForm?.staffUuids : [userInfo.uuid]
} }
return obj return obj
}, },
...@@ -440,7 +441,7 @@ Component({ ...@@ -440,7 +441,7 @@ Component({
this.onPageShow() this.onPageShow()
const isStaff = app.globalData.isStaff; const isStaff = app.globalData.isStaff;
let userInfo = wx.$util.getUserInfo() || {}; let userInfo = wx.$util.getUserInfo() || {};
if (userInfo?.isSuper || userInfo?.loginRole == 3) this.setData({ if (userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5) this.setData({
showEmployeeName: true, showEmployeeName: true,
isShowDefeatBtn: false isShowDefeatBtn: false
}) })
...@@ -448,7 +449,7 @@ Component({ ...@@ -448,7 +449,7 @@ Component({
storeInfo: wx.$util.getUserInfo()?.default4SStoreInfo || {}, storeInfo: wx.$util.getUserInfo()?.default4SStoreInfo || {},
userInfo, userInfo,
isStaff, isStaff,
isWait: !(userInfo?.isSuper || userInfo?.loginRole == 3) isWait: !(userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5)
}); });
let { let {
menuList, menuList,
...@@ -474,7 +475,7 @@ Component({ ...@@ -474,7 +475,7 @@ Component({
sortVal: 3 sortVal: 3
}); });
} }
if ((userInfo.isSuper || userInfo.loginRole == 3) && menuList.every((item) => item.menuText != "BI报表")) { if ((userInfo.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5) && menuList.every((item) => item.menuText != "BI报表")) {
menuList.unshift({ menuList.unshift({
menuText: "BI报表", menuText: "BI报表",
path: "tabOperating.index", path: "tabOperating.index",
...@@ -483,7 +484,7 @@ Component({ ...@@ -483,7 +484,7 @@ Component({
sortVal: 11 sortVal: 11
}) })
} }
if (userInfo.loginRole == 3 && menuList.every((item) => item.menuText != '积分审批')) { if (userInfo?.loginRole == 3 || userInfo.loginRole == 5 && menuList.every((item) => item.menuText != '积分审批')) {
menuList.unshift({ menuList.unshift({
menuText: "积分审批", menuText: "积分审批",
path: "pages.pointsReview", path: "pages.pointsReview",
...@@ -503,7 +504,7 @@ Component({ ...@@ -503,7 +504,7 @@ Component({
// }); // });
// } // }
if ( if (
(isStaff || userInfo.isSuper || userInfo.loginRole == 3) && (isStaff || userInfo.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5) &&
menuList.every((item) => item.menuText != "驻店日报") menuList.every((item) => item.menuText != "驻店日报")
) { ) {
menuList.unshift({ menuList.unshift({
...@@ -527,7 +528,7 @@ Component({ ...@@ -527,7 +528,7 @@ Component({
sortVal: 9 sortVal: 9
}); });
} }
if (!(userInfo?.isSuper || userInfo?.loginRole == 3) && menuList.every((item) => item.menuText != "培训资料")) { if (!(userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5) && menuList.every((item) => item.menuText != "培训资料")) {
menuList.push({ menuList.push({
menuText: "培训资料", menuText: "培训资料",
icon: "peixun_icon", icon: "peixun_icon",
...@@ -540,10 +541,10 @@ Component({ ...@@ -540,10 +541,10 @@ Component({
index > -1 && menuList.splice(index, 1); index > -1 && menuList.splice(index, 1);
} }
// userInfo?.loginRole == 3 && 督导 // userInfo?loginRole == 3 || userInfo.loginRole == 5
if (menuList.every((item) => item.menuText != '督导日报')) { if (menuList.every((item) => item.menuText != '工作日报')) {
menuList.push({ menuList.push({
menuText: "督导日报", menuText: "工作日报",
path: "tabWorkOrder.supervisorDaily", path: "tabWorkOrder.supervisorDaily",
icon: "supervisorDaily", icon: "supervisorDaily",
}) })
...@@ -591,7 +592,7 @@ Component({ ...@@ -591,7 +592,7 @@ Component({
} = res } = res
if (code == 0) { if (code == 0) {
let index = data?.findIndex(v => v.merchantNo == userInfo?.default4SStoreInfo?.merchantId) let index = data?.findIndex(v => v.merchantNo == userInfo?.default4SStoreInfo?.merchantId)
if (userInfo.isSuper || index > -1 || userInfo.loginRole === 3) { if (userInfo.isSuper || index > -1 || userInfo.loginRole === 3 || userInfo.loginRole == 5) {
if (menuList.every((item) => item.menuText != "接待记录")) { if (menuList.every((item) => item.menuText != "接待记录")) {
menuList.push({ menuList.push({
menuText: "接待记录", menuText: "接待记录",
...@@ -850,7 +851,7 @@ Component({ ...@@ -850,7 +851,7 @@ Component({
let { let {
menuList menuList
} = this.data; } = this.data;
if (userInfo?.isSuper || userInfo?.loginRole == 3) return if (userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5) return
commonApi commonApi
.getStaffTargetTaskApi({ .getStaffTargetTaskApi({
sceneType: 0, sceneType: 0,
......
<!--packageCrowdFunding/pages/homePage/index/index.wxml--> <!--packageCrowdFunding/pages/homePage/index/index.wxml-->
<wxs src="../../index.wxs" module="filter" /> <wxs src="../../index.wxs" module="filter" />
<view class="layout_box" > <view class="layout_box">
<scroll-view scroll-y style="height: 100%;" bindscroll="onScroll" bindscrolltolower="onBottomRefresh"> <scroll-view scroll-y style="height: 100%;" bindscroll="onScroll" bindscrolltolower="onBottomRefresh">
<view class="tips"> <view class="tips">
<view class="tips-text text-hide"> <view class="tips-text text-hide">
你好, 你好,
<text>{{loginRoleLabel[loginRole]|| ''}}{{userInfo.name || ''}}</text> <text>{{loginRoleLabel[loginRole]|| ''}}{{userInfo.name || ''}}</text>
</view>
</view> </view>
<view class="{{!waitInputCount ? 'constent_no_tips_box' : ''}} content_box"> </view>
<view class="swiper-wrap"> <view class="{{!waitInputCount ? 'constent_no_tips_box' : ''}} content_box">
<swiper bindchange="changeSwiper"> <view class="swiper-wrap">
<block wx:for="{{3}}" wx:key="index"> <swiper bindchange="changeSwiper">
<swiper-item> <block wx:for="{{3}}" wx:key="index">
<view class="swiper-item"> <swiper-item>
<view class="total-wrap"> <view class="swiper-item">
<view class="item"> <view class="total-wrap">
<view class="title">{{current==0?'今日':current==1?'本月':'累计'}}产值</view> <view class="item">
<veiw class="number"> <view class="title">{{current==0?'今日':current==1?'本月':'累计'}}产值</view>
<text class="unit">¥</text> <veiw class="number">
<text>{{staticData.totalOutputValue||0}}</text> <text class="unit">¥</text>
</veiw> <text>{{staticData.totalOutputValue||0}}</text>
</view> </veiw>
<view class="item">
<view class="title">转化率</view>
<view class="number"><text>{{staticData.conversionRate > 100 ? 100 : staticData.conversionRate||0}}</text><text class="units">%</text></view>
</view>
</view> </view>
<view class="custom-statistic"> <view class="item">
<view class="customItem" wx:for="{{ itemDataList }}" wx:key="index" wx:for-index="index"> <view class="title">转化率</view>
<block wx:if="{{item.index==2||item.index==1}}"> <view class="number"><text>{{staticData.conversionRate > 100 ? 100 : staticData.conversionRate||0}}</text><text class="units">%</text></view>
<view class="label">
<text>{{item.label}} </text><text>/{{item.waitlabel}}</text>
</view>
<view class="number">
<view class="firstValue">{{staticData[item.value]||0}}</view>
<view class="lastValue">/{{staticData[item.waitValue]||0}}</view>
</view>
</block>
<block wx:else>
<view class="label">
{{item.label}}
</view>
<view class="number">
<text class="unit" wx:if="{{ item.unit }}">¥</text>
<view> {{staticData[item.value]||0}}</view>
</view>
</block>
</view>
</view> </view>
</view> </view>
</swiper-item> <view class="custom-statistic">
</block> <view class="customItem" wx:for="{{ itemDataList }}" wx:key="index" wx:for-index="index">
</swiper> <block wx:if="{{item.index==2||item.index==1}}">
<view class="dots"> <view class="label">
<view wx:for="{{3}}" wx:key="index" wx:for-index="idx" class="dot {{current==idx?'active':''}}"></view> <text>{{item.label}} </text><text>/{{item.waitlabel}}</text>
</view> </view>
</view> <view class="number">
<block wx:if="{{isWait&&todoList.length>0}}"> <view class="firstValue">{{staticData[item.value]||0}}</view>
<view class="todo-list"> <view class="lastValue">/{{staticData[item.waitValue]||0}}</view>
<view class="title">今日待办·{{todoList.length}}</view> </view>
<view class="todo-items"> </block>
<view class="todo-item" wx:key="idx" wx:for="{{ispopUp?todoList:stodoList}}" wx:for-index="idx"> <block wx:else>
<view class="todo-item-title"> <view class="label">
<image src="{{IMG_URL}}{{item.taskType=='1'?'warn':'task'}}.png" /><text>{{todos[item.taskId]}}</text> {{item.label}}
</view>
<view class="number">
<text class="unit" wx:if="{{ item.unit }}">¥</text>
<view> {{staticData[item.value]||0}}</view>
</view>
</block>
</view>
</view> </view>
<view class="todo-item-info">{{item.content }}</view>
<view class="todo-item-btn" wx:if="{{item.taskId==2}}" bindtap="goto" data-id="{{item.taskId}}">去开单</view>
<view class="todo-item-btn" wx:elif="{{item.taskId==4}}" data-id="{{item.taskId}}" bindtap="goto">去处理</view>
<view class="todo-item-btn" wx:elif="{{item.taskId==1}}" data-id="{{item.taskId}}" bindtap="goto">去填写</view>
<view class="todo-item-btn" wx:else bindtap="closeRemind" data-id="{{item.taskId}}">关闭提醒</view>
</view> </view>
</swiper-item>
</block>
</swiper>
<view class="dots">
<view wx:for="{{3}}" wx:key="index" wx:for-index="idx" class="dot {{current==idx?'active':''}}"></view>
</view>
</view>
<block wx:if="{{isWait&&todoList.length>0}}">
<view class="todo-list">
<view class="title">今日待办·{{todoList.length}}</view>
<view class="todo-items">
<view class="todo-item" wx:key="idx" wx:for="{{ispopUp?todoList:stodoList}}" wx:for-index="idx">
<view class="todo-item-title">
<image src="{{IMG_URL}}{{item.taskType=='1'?'warn':'task'}}.png" /><text>{{todos[item.taskId]}}</text>
</view>
<view class="todo-item-info">{{item.content }}</view>
<view class="todo-item-btn" wx:if="{{item.taskId==2}}" bindtap="goto" data-id="{{item.taskId}}">去开单</view>
<view class="todo-item-btn" wx:elif="{{item.taskId==4}}" data-id="{{item.taskId}}" bindtap="goto">去处理</view>
<view class="todo-item-btn" wx:elif="{{item.taskId==1}}" data-id="{{item.taskId}}" bindtap="goto">去填写</view>
<view class="todo-item-btn" wx:else bindtap="closeRemind" data-id="{{item.taskId}}">关闭提醒</view>
</view> </view>
<view class="pack-up {{!ispopUp?'pack-up-active':''}}" wx:if="{{todoList.length>2}}" bindtap="packupList"> </view>
<image src="{{IMG_URL}}pack-up.png" /> <view class="pack-up {{!ispopUp?'pack-up-active':''}}" wx:if="{{todoList.length>2}}" bindtap="packupList">
<image src="{{IMG_URL}}pack-up.png" />
</view>
</view>
</block>
<view class="menu_box">
<block wx:for="{{ menuList }}" wx:key="index">
<view class="menu_item" bindtap="navGo" data-item="{{ item }}">
<view class="icon">
<image src="{{ IMG_URL}}crowdFunding/{{item.icon }}.png" mode="widthFix" />
</view> </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> </view>
</block> </block>
<view class="menu_box"> </view>
<block wx:for="{{ menuList }}" wx:key="index"> <!-- <view class="menu_box" wx:if="{{newMenuList.length}}">
<view class="menu_item" bindtap="navGo" data-item="{{ item }}">
<view class="icon">
<image src="{{ IMG_URL}}crowdFunding/{{item.icon }}.png" mode="widthFix" />
</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>
</view>
<!-- <view class="menu_box" wx:if="{{newMenuList.length}}">
<block wx:for="{{ newMenuList }}" wx:key="index"> <block wx:for="{{ newMenuList }}" wx:key="index">
<view class="menu_item" bindtap="navGo" data-item="{{ item }}"> <view class="menu_item" bindtap="navGo" data-item="{{ item }}">
<view class="icon"> <view class="icon">
...@@ -101,8 +101,8 @@ ...@@ -101,8 +101,8 @@
</view> </view>
</block> </block>
</view> --> </view> -->
</view> </view>
<view class="receive-list" wx:if="{{storeRangeList.length || userInfo.loginRole == 3}}"> <view class="receive-list" wx:if="{{storeRangeList.length || userInfo.loginRole== 3 || userInfo.loginRole== 5}}">
<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> -->
......
...@@ -22,15 +22,15 @@ Page({ ...@@ -22,15 +22,15 @@ Page({
showEmployeeName: false, // 是否展示销售顾问字段 showEmployeeName: false, // 是否展示销售顾问字段
isShowDefeatBtn: true, isShowDefeatBtn: true,
loaded: false, loaded: false,
track_event_code:'staff_reception_list', //埋点动作类型 track_event_code: 'staff_reception_list', //埋点动作类型
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { onLoad(options) {
let userInfo = wx.$util.getUserInfo() || {} let userInfo = wx.$util.getUserInfo() || {}
if (userInfo?.isSuper || userInfo?.loginRole == 3) this.setData({ if (userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5) this.setData({
showEmployeeName: true, showEmployeeName: true,
isShowDefeatBtn: false isShowDefeatBtn: false
}) })
...@@ -38,7 +38,7 @@ Page({ ...@@ -38,7 +38,7 @@ Page({
this.setData({ this.setData({
nothing: false nothing: false
}) })
if (userInfo?.isSuper || userInfo?.loginRole == 3) { if (userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5) {
this.getStoreList() this.getStoreList()
} else { } else {
this.getReceptionList() this.getReceptionList()
...@@ -86,8 +86,8 @@ Page({ ...@@ -86,8 +86,8 @@ Page({
orderResult: searchForm?.orderResult, orderResult: searchForm?.orderResult,
merchantNo: !searchForm?.merchantNo?.length ? (userInfo?.isSuper ? storeRangeList.map(v => { merchantNo: !searchForm?.merchantNo?.length ? (userInfo?.isSuper ? storeRangeList.map(v => {
if (v.merchantNo) return v.merchantNo if (v.merchantNo) return v.merchantNo
}) : userInfo?.loginRole == 3 ? '' : [userInfo?.default4SStoreInfo?.merchantId]) : searchForm?.merchantNo, }) : userInfo?.loginRole == 3 || userInfo.loginRole == 5 ? '' : [userInfo?.default4SStoreInfo?.merchantId]) : searchForm?.merchantNo,
staffUuids: userInfo.isSuper || userInfo?.loginRole == 3 ? searchForm?.staffUuids : [userInfo.uuid] staffUuids: userInfo.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5 ? searchForm?.staffUuids : [userInfo.uuid]
} }
return obj return obj
}, },
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<block wx:else> <block wx:else>
<navigation-bar class="navigation-header" bindnavbarReady="navbarReady" showBack navStyle="{{'background-color: #FFFFFF;box-shadow:none;' }}" bindback="back"> <navigation-bar class="navigation-header" bindnavbarReady="navbarReady" showBack navStyle="{{'background-color: #FFFFFF;box-shadow:none;' }}" bindback="back">
<view class="navigation-title"> <view class="navigation-title">
<view class="navigation-title-text text-hide">{{(userInfo && (userInfo.isSuper || userInfo.loginRole == 3)) ? '接待记录' : (userInfo.default4SStoreInfo && userInfo.default4SStoreInfo.merchantName)}}</view> <view class="navigation-title-text text-hide">{{(userInfo && (userInfo.isSuper || userInfo.loginRole== 3 || userInfo.loginRole== 5)) ? '接待记录' : (userInfo.default4SStoreInfo && userInfo.default4SStoreInfo.merchantName)}}</view>
</view> </view>
</navigation-bar> </navigation-bar>
</block> </block>
......
...@@ -17,7 +17,8 @@ Page({ ...@@ -17,7 +17,8 @@ Page({
1: '超管', 1: '超管',
2: '商户号', 2: '商户号',
3: '区域督导', 3: '区域督导',
4: '驻店负责人' 4: '驻店负责人',
5: '销售',
}, },
selectedUuid: '', selectedUuid: '',
requestFlag: false requestFlag: false
...@@ -41,7 +42,7 @@ Page({ ...@@ -41,7 +42,7 @@ Page({
// let checkAgree = await this.checkAgree() // let checkAgree = await this.checkAgree()
// if (!checkAgree) return false // if (!checkAgree) return false
// 超管开通全部场景 // 超管开通全部场景
if (loginUserObj?.isSuper || loginUserObj?.loginRole == 3) return if (loginUserObj?.isSuper || loginUserObj?.loginRole == 3 || loginUserObj.loginRole == 5) return
// 获取4s店关联场景数据 // 获取4s店关联场景数据
getShopSceneConfig({ yqMerchantId }).then(result => { getShopSceneConfig({ yqMerchantId }).then(result => {
if (!result?.length) return wx.$util.showToast('暂无开通业务,请联系总部管理员') if (!result?.length) return wx.$util.showToast('暂无开通业务,请联系总部管理员')
...@@ -275,12 +276,12 @@ Page({ ...@@ -275,12 +276,12 @@ Page({
get4SStoreList(loginUserObj) { get4SStoreList(loginUserObj) {
let { merchantId, isSuper, uuid, loginRole } = loginUserObj let { merchantId, isSuper, uuid, loginRole } = loginUserObj
// 超管跳过选择4s店页面 // 超管跳过选择4s店页面
if (isSuper || loginRole == 3) { if (isSuper || loginRole == 3 || loginRole == 5) {
// this.setShopMerchantObj(obj) // this.setShopMerchantObj(obj)
wx.$router.go('pages.sceneIndex') wx.$router.go('pages.sceneIndex')
return return
} }
get4SStoreList({ merchantId: isSuper || loginRole == 3 ? undefined : merchantId, staffUUID: uuid }, isSuper || loginRole == 3, true).then(result => { get4SStoreList({ merchantId: isSuper || loginRole == 3 || loginRole == 5 ? undefined : merchantId, staffUUID: uuid }, isSuper || loginRole == 3 || loginRole == 5, true).then(result => {
let obj = (result && result[0]) || {} let obj = (result && result[0]) || {}
// 仅一家4s店 // 仅一家4s店
if (result?.length == 1) { if (result?.length == 1) {
...@@ -324,7 +325,7 @@ Page({ ...@@ -324,7 +325,7 @@ Page({
if (e.active) { if (e.active) {
yqMerchantId = e.merchantId yqMerchantId = e.merchantId
id = e.uuid id = e.uuid
isSuper = e.isSuper || e.loginRole == 3 isSuper = e.isSuper || e.loginRole == 3 || e.loginRole == 5
} }
}) })
...@@ -368,7 +369,7 @@ Page({ ...@@ -368,7 +369,7 @@ Page({
this.get4SStoreList(data.loginUserInfoList[0]) this.get4SStoreList(data.loginUserInfoList[0])
return return
} }
if (data.loginUserInfoList[0] && data.loginUserInfoList[0].loginRole == 3 && (wx.$SCENE?.path != 'tabWorkOrder/staffDaily' || wx.$SCENE?.path != 'tabWorkOrder/upgradeStaffDaily')) { if (data.loginUserInfoList[0] && (data.loginUserInfoList[0]?.loginRole == 3 || data.loginUserInfoList[0]?.loginRole == 5) && (wx.$SCENE?.path != 'tabWorkOrder/staffDaily' || wx.$SCENE?.path != 'tabWorkOrder/upgradeStaffDaily')) {
this.get4SStoreList(data.loginUserInfoList[0]) this.get4SStoreList(data.loginUserInfoList[0])
return return
} }
......
<!-- style="padding-bottom:{{isFullSucreen?'var(--fontSize224)':'var(--fontSize160)'}}" --> <!-- style="padding-bottom:{{isFullSucreen?'var(--fontSize224)':'var(--fontSize160)'}}" -->
<view class="layout"> <view class="layout">
<!-- <view class="title">请选择登录的账号</view> --> <!-- <view class="title">请选择登录的账号</view> -->
<view class="search-box"> <view class="search-box">
<view class="search-input"> <view class="search-input">
<block wx:if="{{!edit}}"> <block wx:if="{{!edit}}">
...@@ -15,18 +15,18 @@ ...@@ -15,18 +15,18 @@
</view> </view>
</block> </block>
<block wx:else> <block wx:else>
<input type="text" class="input" value='{{searchValue}}' focus='{{inputFocus}}' confirm-type="search" bindinput='input' bindblur="inputBlur" bindconfirm="inputConfifm"/> <input type="text" class="input" value='{{searchValue}}' focus='{{inputFocus}}' confirm-type="search" bindinput='input' bindblur="inputBlur" bindconfirm="inputConfifm" />
</block> </block>
</view> </view>
</view> </view>
<scroll-view class="list" scroll-y style="height: calc(100% - {{copyLoginUserInfoList && copyLoginUserInfoList.length >= 10 ? 120 : 50}}rpx);"> <scroll-view class="list" scroll-y style="height: calc(100% - {{copyLoginUserInfoList && copyLoginUserInfoList.length >= 10 ? 120 : 50}}rpx);">
<block wx:if="{{flag}}"> <block wx:if="{{flag}}">
<block wx:if="{{loginUserInfoList}}"> <block wx:if="{{loginUserInfoList}}">
<block wx:for="{{loginUserInfoList}}" wx:key="index"> <block wx:for="{{loginUserInfoList}}" wx:key="index">
<view class="items {{item.active?'active':''}}" bindtap="chooseAccount" data-index="{{index}}" data-item="{{item}}"> <view class="items {{item.active?'active':''}}" bindtap="chooseAccount" data-index="{{index}}" data-item="{{item}}">
<view class="right"> <view class="right">
<view class="midle {{item.isSuper==true?'midle_1':item.userType==1?'midle_2':(item.loginRole == 3 ?'midle_3' : item.loginRole == 4 ? 'midle_4' : 'midle_5')}}"> <view class="midle {{item.isSuper==true?'midle_1':item.userType==1?'midle_2':(itemloginRole == 3 || userInfo.loginRole == 5 ?'midle_3' : item.loginRole == 4 ? 'midle_4' : 'midle_5')}}">
{{item.isSuper==true?'超管':item.userType==1?'商户':(item.loginRole == 3 ? '督导' : item.loginRole == 4 ? '驻店' : '员工')}} {{item.isSuper==true?'超管':item.userType==1?'商户':itemloginRole == 3 ? '督导' : userInfo.loginRole == 5? '销售':item.loginRole == 4 ? '驻店' : '员工'}}
</view> </view>
</view> </view>
<view class="left"> <view class="left">
...@@ -39,26 +39,25 @@ ...@@ -39,26 +39,25 @@
</view> </view>
<!-- userType 1商户号 2员工号 loginRole细化员工号角色 3区域督导 4驻店负责人 --> <!-- userType 1商户号 2员工号 loginRole细化员工号角色 3区域督导 4驻店负责人 -->
<!-- <view class="right"> <!-- <view class="right">
<view class="midle {{item.isSuper==true?'midle_1':item.userType==1?'midle_2':(item.loginRole == 3 ?'midle_3' : item.loginRole == 4 ? 'midle_4' : 'midle_5')}}"> <view class="midle {{item.isSuper==true?'midle_1':item.userType==1?'midle_2':(itemloginRole == 3 || userInfo.loginRole == 5 ?'midle_3' : item.loginRole == 4 ? 'midle_4' : 'midle_5')}}">
{{item.isSuper==true?'超管':item.userType==1?'商户号':(item.loginRole == 3 ? '区域督导' : item.loginRole == 4 ? '驻店负责人' : '员工号')}} {{item.isSuper==true?'超管':item.userType==1?'商户号':(itemloginRole == 3 || userInfo.loginRole == 5 ? '区域督导' : item.loginRole == 4 ? '驻店负责人' : '员工号')}}
</view> </view>
<view class="icon"> <view class="icon">
<image src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/arrow-left.png" /> <image src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/arrow-left.png" />
</view> </view>
</view> --> </view> -->
</view> </view>
</block> </block>
</block> </block>
<block wx:else> <block wx:else>
<view class="list-not" style="height: calc(100vh - {{isFullSucreen ? '159' :'125'}}px)" bindtap="getListSelectAccount"> <view class="list-not" style="height: calc(100vh - {{isFullSucreen ? '159' :'125'}}px)" bindtap="getListSelectAccount">
点击刷新 点击刷新
</view> </view>
</block> </block>
</block> </block>
<view class="scrollSpase"></view> <view class="scrollSpase"></view>
</scroll-view > </scroll-view>
<!-- <view class="btn-box {{isFullSucreen?'isFullSucreen-btn':''}}"> <!-- <view class="btn-box {{isFullSucreen?'isFullSucreen-btn':''}}">
<view class='btn' bindtap="choiceAccountLogin">确定</view> <view class='btn' bindtap="choiceAccountLogin">确定</view>
</view> --> </view> -->
</view> </view>
\ No newline at end of file \ No newline at end of file
...@@ -22,7 +22,7 @@ Page({ ...@@ -22,7 +22,7 @@ Page({
if ( if (
!openSceneArr.includes(scene) && !openSceneArr.includes(scene) &&
!userInfo?.isSuper && !userInfo?.isSuper &&
!(userInfo?.loginRole == 3) !(userInfo?.loginRole == 3 || userInfo.loginRole == 5)
) { ) {
this.setData({ jumpPageFlag: false }); this.setData({ jumpPageFlag: false });
return wx.$util.showToast("暂未开通此场景"); return wx.$util.showToast("暂未开通此场景");
...@@ -68,7 +68,7 @@ Page({ ...@@ -68,7 +68,7 @@ Page({
*/ */
onLoad(options) { onLoad(options) {
wx.hideHomeButton({ wx.hideHomeButton({
success: (res) => {}, success: (res) => { },
}); });
this.getSceneArr(); this.getSceneArr();
}, },
...@@ -96,7 +96,7 @@ Page({ ...@@ -96,7 +96,7 @@ Page({
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */
onReady() {}, onReady() { },
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
...@@ -117,25 +117,25 @@ Page({ ...@@ -117,25 +117,25 @@ Page({
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
*/ */
onHide() {}, onHide() { },
/** /**
* 生命周期函数--监听页面卸载 * 生命周期函数--监听页面卸载
*/ */
onUnload() {}, onUnload() { },
/** /**
* 页面相关事件处理函数--监听用户下拉动作 * 页面相关事件处理函数--监听用户下拉动作
*/ */
onPullDownRefresh() {}, onPullDownRefresh() { },
/** /**
* 页面上拉触底事件的处理函数 * 页面上拉触底事件的处理函数
*/ */
onReachBottom() {}, onReachBottom() { },
/** /**
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
onShareAppMessage() {}, onShareAppMessage() { },
}); });
...@@ -87,10 +87,10 @@ Page({ ...@@ -87,10 +87,10 @@ Page({
getMerchantList(e) { getMerchantList(e) {
let userInfo = wx.$util.getUserInfo() let userInfo = wx.$util.getUserInfo()
let params = { let params = {
merchantId: userInfo?.isSuper || userInfo?.loginRole == 3 ? '' : userInfo?.merchantId, merchantId: userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5 ? '' : userInfo?.merchantId,
staffUUID: userInfo?.isSuper || userInfo?.loginRole == 3 ? '' : userInfo?.uuid staffUUID: userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5 ? '' : userInfo?.uuid
} }
get4SStoreList(params, userInfo?.isSuper || userInfo?.loginRole == 3, true) get4SStoreList(params, userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5, true)
.then(result => { .then(result => {
this.setData({ this.setData({
loginUserInfoList: result, loginUserInfoList: result,
......
...@@ -26,7 +26,7 @@ Page({ ...@@ -26,7 +26,7 @@ Page({
if ( if (
!openSceneArr.includes(scene) && !openSceneArr.includes(scene) &&
!userInfo?.isSuper && !userInfo?.isSuper &&
!(userInfo?.loginRole == 3) !(userInfo?.loginRole == 3 || userInfo.loginRole == 5)
) { ) {
this.setData({ jumpPageFlag: false }); this.setData({ jumpPageFlag: false });
return wx.$util.showToast("暂未开通此场景"); return wx.$util.showToast("暂未开通此场景");
...@@ -83,7 +83,7 @@ Page({ ...@@ -83,7 +83,7 @@ Page({
*/ */
onLoad(options) { onLoad(options) {
wx.hideHomeButton({ wx.hideHomeButton({
success: (res) => {}, success: (res) => { },
}); });
this.getSceneArr(); this.getSceneArr();
}, },
...@@ -136,7 +136,7 @@ Page({ ...@@ -136,7 +136,7 @@ Page({
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */
onReady() {}, onReady() { },
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
...@@ -157,25 +157,25 @@ Page({ ...@@ -157,25 +157,25 @@ Page({
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
*/ */
onHide() {}, onHide() { },
/** /**
* 生命周期函数--监听页面卸载 * 生命周期函数--监听页面卸载
*/ */
onUnload() {}, onUnload() { },
/** /**
* 页面相关事件处理函数--监听用户下拉动作 * 页面相关事件处理函数--监听用户下拉动作
*/ */
onPullDownRefresh() {}, onPullDownRefresh() { },
/** /**
* 页面上拉触底事件的处理函数 * 页面上拉触底事件的处理函数
*/ */
onReachBottom() {}, onReachBottom() { },
/** /**
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
onShareAppMessage() {}, onShareAppMessage() { },
}); });
...@@ -16,7 +16,7 @@ Component({ ...@@ -16,7 +16,7 @@ Component({
this.setViewData() this.setViewData()
let { userInfo } = this.data let { userInfo } = this.data
// 非超管 获取转化人员 销售顾问 // 非超管 获取转化人员 销售顾问
if (!(userInfo?.isSuper|| userInfo.loginRole == 3)) { if (!(userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5)) {
if (wx.$orderListDateListScreenRefresh) { // 切换门店将数据清空 if (wx.$orderListDateListScreenRefresh) { // 切换门店将数据清空
this.setData({ this.setData({
'form.userIdList': [], 'form.userIdList': [],
...@@ -135,16 +135,16 @@ Component({ ...@@ -135,16 +135,16 @@ Component({
}, },
showStoreSelectPopup(e) { showStoreSelectPopup(e) {
let { type } = e.currentTarget.dataset let { type } = e.currentTarget.dataset
this.setData({storeType: type, showStoreSelectPopup: true}) this.setData({ storeType: type, showStoreSelectPopup: true })
}, },
hideStorePopup() { hideStorePopup() {
this.setData({showStoreSelectPopup: false}) this.setData({ showStoreSelectPopup: false })
}, },
storeConfirm(e) { storeConfirm(e) {
let { storeType } = this.data let { storeType } = this.data
if (storeType == 1) this.setData({'form.selectedYqMerchantList': e?.detail}) if (storeType == 1) this.setData({ 'form.selectedYqMerchantList': e?.detail })
if (storeType == 2) this.setData({'form.selectedMerchantList': e?.detail}) if (storeType == 2) this.setData({ 'form.selectedMerchantList': e?.detail })
this.setData({showStoreSelectPopup: false}) this.setData({ showStoreSelectPopup: false })
}, },
choose(e) { choose(e) {
let { index, listName } = e.currentTarget.dataset let { index, listName } = e.currentTarget.dataset
...@@ -224,8 +224,8 @@ Component({ ...@@ -224,8 +224,8 @@ Component({
this this
) )
}, },
/**预约状态 */ /**预约状态 */
setInviteStatusList(n = 0) { setInviteStatusList(n = 0) {
let arr = [ let arr = [
{ {
name: '全部', name: '全部',
......
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
<scroll-view scroll-y class="confirm-box" style="height:calc(100vh - {{navBarHeight}}px);margin-top:{{navBarHeight}}px;" hidden="{{!show}}"> <scroll-view scroll-y class="confirm-box" style="height:calc(100vh - {{navBarHeight}}px);margin-top:{{navBarHeight}}px;" hidden="{{!show}}">
<view class="main" style="min-height:calc(100% - {{btnHeight}}px)"> <view class="main" style="min-height:calc(100% - {{btnHeight}}px)">
<!-- 非超管转化人员 --> <!-- 非超管转化人员 -->
<view class="box" wx:if="{{!(userInfo.isSuper|| userInfo.loginRole == 3)}}"> <view class="box" wx:if="{{!(userInfo.isSuper|| userInfo.loginRole== 3 || userInfo.loginRole== 5)}}">
<view class="title"> <view class="title">
<view class="title-left"> <view class="title-left">
转化人员 转化人员
<view class="title-tips" wx:if="{{!(userInfo.isSuper|| userInfo.loginRole == 3)}}">{{userInfo.merchantName}}</view> <view class="title-tips" wx:if="{{!(userInfo.isSuper|| userInfo.loginRole== 3 || userInfo.loginRole== 5)}}">{{userInfo.merchantName}}</view>
</view> </view>
<view wx:if="{{form.userIdList.length > 12}}" bindtap="showMore" data-type="1" class="collapse-btn {{!employShowMore ? 'rotate-180' : ''}}"> <view wx:if="{{form.userIdList.length > 12}}" bindtap="showMore" data-type="1" class="collapse-btn {{!employShowMore ? 'rotate-180' : ''}}">
<image src="{{IMG_URL}}collapse_icon.png" mode="" /> <image src="{{IMG_URL}}collapse_icon.png" mode="" />
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
</view> </view>
</view> </view>
<!-- 超管转化人员 选择园区店 --> <!-- 超管转化人员 选择园区店 -->
<view class="box" wx:if="{{(userInfo.isSuper|| userInfo.loginRole == 3)}}"> <view class="box" wx:if="{{(userInfo.isSuper|| userInfo.loginRole== 3 || userInfo.loginRole== 5)}}">
<view class="title"> <view class="title">
<view class="title-left"> <view class="title-left">
转化人员 转化人员
...@@ -42,11 +42,11 @@ ...@@ -42,11 +42,11 @@
</view> </view>
</view> </view>
<!-- 非超管销售顾问 --> <!-- 非超管销售顾问 -->
<view class="box" wx:if="{{!(userInfo.isSuper|| userInfo.loginRole == 3)}}"> <view class="box" wx:if="{{!(userInfo.isSuper|| userInfo.loginRole== 3 || userInfo.loginRole== 5)}}">
<view class="title"> <view class="title">
<view class="title-left"> <view class="title-left">
销售顾问 销售顾问
<view class="title-tips" wx:if="{{!(userInfo.isSuper|| userInfo.loginRole == 3)}}">{{userInfo.shopMerchantName}}</view> <view class="title-tips" wx:if="{{!(userInfo.isSuper|| userInfo.loginRole== 3 || userInfo.loginRole== 5)}}">{{userInfo.shopMerchantName}}</view>
</view> </view>
<view wx:if="{{form.issuerUserIdList.length > 12}}" bindtap="showMore" data-type="2" class="collapse-btn {{!salesmanShowMore ? 'rotate-180' : ''}}"> <view wx:if="{{form.issuerUserIdList.length > 12}}" bindtap="showMore" data-type="2" class="collapse-btn {{!salesmanShowMore ? 'rotate-180' : ''}}">
<image src="{{IMG_URL}}collapse_icon.png" mode="" /> <image src="{{IMG_URL}}collapse_icon.png" mode="" />
...@@ -61,11 +61,11 @@ ...@@ -61,11 +61,11 @@
</view> </view>
</view> </view>
<!-- 超管销售顾问 选择4s店 --> <!-- 超管销售顾问 选择4s店 -->
<view class="box" wx:if="{{(userInfo.isSuper|| userInfo.loginRole == 3)}}"> <view class="box" wx:if="{{(userInfo.isSuper|| userInfo.loginRole== 3 || userInfo.loginRole== 5)}}">
<view class="title"> <view class="title">
<view class="title-left"> <view class="title-left">
销售顾问 销售顾问
<view class="title-tips" wx:if="{{!(userInfo.isSuper|| userInfo.loginRole == 3)}}">{{userInfo.shopMerchantName}}</view> <view class="title-tips" wx:if="{{!(userInfo.isSuper|| userInfo.loginRole== 3 || userInfo.loginRole== 5)}}">{{userInfo.shopMerchantName}}</view>
</view> </view>
<view wx:if="{{form.selectedMerchantList.length > 3}}" bindtap="showMore" data-type="2" class="collapse-btn {{!salesmanShowMore ? 'rotate-180' : ''}}"> <view wx:if="{{form.selectedMerchantList.length > 3}}" bindtap="showMore" data-type="2" class="collapse-btn {{!salesmanShowMore ? 'rotate-180' : ''}}">
<image src="{{IMG_URL}}collapse_icon.png" mode="" /> <image src="{{IMG_URL}}collapse_icon.png" mode="" />
......
...@@ -325,7 +325,7 @@ Page({ ...@@ -325,7 +325,7 @@ Page({
let userInfo = wx.$util.getUserInfo(); let userInfo = wx.$util.getUserInfo();
this.setData({ this.setData({
phoneShow: app.globalData.YQorderSetting?.yqPhoneConfig, phoneShow: app.globalData.YQorderSetting?.yqPhoneConfig,
isMake: !(userInfo?.isSuper || userInfo?.loginRole == 3), isMake: !(userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5),
}); });
// this.getStatByPeriod() // this.getStatByPeriod()
// this.getiIviteRecord() // this.getiIviteRecord()
......
...@@ -12,35 +12,35 @@ Page({ ...@@ -12,35 +12,35 @@ Page({
navStyle: 'background-color: rgba(0,0,0,0);box-shadow:none;', navStyle: 'background-color: rgba(0,0,0,0);box-shadow:none;',
workCount: 0, workCount: 0,
workItem: [{ workItem: [{
label: '上午 09:00-10:30', label: '上午 09:00-10:30',
startTime: '09:00', startTime: '09:00',
endTime: '10:30', endTime: '10:30',
maxCount: 0 maxCount: 0
}, },
{ {
label: '上午 10:30-12:00', label: '上午 10:30-12:00',
startTime: '10:30', startTime: '10:30',
endTime: '12:00', endTime: '12:00',
maxCount: 0 maxCount: 0
}, },
{ {
label: '下午 13:00-14:30', label: '下午 13:00-14:30',
startTime: '13:00', startTime: '13:00',
endTime: '14:30', endTime: '14:30',
maxCount: 0 maxCount: 0
}, },
{ {
label: '下午 14:30-16:00', label: '下午 14:30-16:00',
startTime: '14:30', startTime: '14:30',
endTime: '16:00', endTime: '16:00',
maxCount: 0 maxCount: 0
}, },
{ {
label: '下午 16:00-17:30', label: '下午 16:00-17:30',
startTime: '16:00', startTime: '16:00',
endTime: '17:30', endTime: '17:30',
maxCount: 0 maxCount: 0
} }
], ],
grassNum: '', grassNum: '',
showMerchantPop: false, showMerchantPop: false,
...@@ -81,7 +81,7 @@ Page({ ...@@ -81,7 +81,7 @@ Page({
res = await api.getStaffBankList({ res = await api.getStaffBankList({
uuid: userInfo.uuid uuid: userInfo.uuid
}) })
console.log(res) console.log(res)
if (res.data && res.data.length) { if (res.data && res.data.length) {
this.data.staffBankFlag = true this.data.staffBankFlag = true
const [staffBankInfo] = res.data const [staffBankInfo] = res.data
...@@ -90,8 +90,8 @@ Page({ ...@@ -90,8 +90,8 @@ Page({
this.setData({ this.setData({
showAccountErrorModal: true showAccountErrorModal: true
}) })
}
} }
}
}, },
//我的积分 //我的积分
toPoint() { toPoint() {
...@@ -178,7 +178,7 @@ Page({ ...@@ -178,7 +178,7 @@ Page({
navBarHeight navBarHeight
}) })
}, },
noScroll() {}, noScroll() { },
showWork() { showWork() {
let { let {
showWorkBox showWorkBox
...@@ -201,7 +201,7 @@ Page({ ...@@ -201,7 +201,7 @@ Page({
}, },
userInfo userInfo
} = this.data } = this.data
if (userType == 2 || userInfo.loginRole == 3) return if (userType == 2 || userInfo?.loginRole == 3 || userInfo.loginRole == 5) return
let value = workItem[index].maxCount let value = workItem[index].maxCount
value += count value += count
if (value < 0) value = 0 if (value < 0) value = 0
...@@ -250,7 +250,7 @@ Page({ ...@@ -250,7 +250,7 @@ Page({
}, },
userInfo userInfo
} = this.data } = this.data
if (userType == 2 || userInfo.loginRole == 3) { if (userType == 2 || userInfo?.loginRole == 3 || userInfo.loginRole == 5) {
this.showWork() this.showWork()
return return
} }
...@@ -410,16 +410,16 @@ Page({ ...@@ -410,16 +410,16 @@ Page({
// this.getTotal() // this.getTotal()
let userInfo = wx.$util.getUserInfo() let userInfo = wx.$util.getUserInfo()
this.setData({ this.setData({
isForbidden: !(userInfo?.isSuper || userInfo?.loginRole == 3), isForbidden: !(userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5),
isYqdSuper: app.globalData.isYqdSuper, isYqdSuper: app.globalData.isYqdSuper,
selectedSceneName: constantData?.sceneList?.filter(val => val.sceneType == userInfo?.sceneType)[0]?.sceneName, selectedSceneName: constantData?.sceneList?.filter(val => val.sceneType == userInfo?.sceneType)[0]?.sceneName,
selectedSceneDesc: constantData?.sceneList?.filter(val => val.sceneType == userInfo?.sceneType)[0]?.sceneDesc selectedSceneDesc: constantData?.sceneList?.filter(val => val.sceneType == userInfo?.sceneType)[0]?.sceneDesc
}) })
this.getVersionInfo() this.getVersionInfo()
this.getByYqShop() this.getByYqShop()
// this.getStaffBankList() // this.getStaffBankList()
// console.log(app.globalData.isYqdSuper) // console.log(app.globalData.isYqdSuper)
}, },
// jump: e => wx.$router.jump(e), // jump: e => wx.$router.jump(e),
...@@ -435,7 +435,7 @@ Page({ ...@@ -435,7 +435,7 @@ Page({
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */
onReady: function () {}, onReady: function () { },
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
...@@ -448,22 +448,22 @@ Page({ ...@@ -448,22 +448,22 @@ Page({
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
*/ */
onHide: function () {}, onHide: function () { },
/** /**
* 生命周期函数--监听页面卸载 * 生命周期函数--监听页面卸载
*/ */
onUnload: function () {}, onUnload: function () { },
/** /**
* 页面相关事件处理函数--监听用户下拉动作 * 页面相关事件处理函数--监听用户下拉动作
*/ */
onPullDownRefresh: function () {}, onPullDownRefresh: function () { },
/** /**
* 页面上拉触底事件的处理函数 * 页面上拉触底事件的处理函数
*/ */
onReachBottom: function () {}, onReachBottom: function () { },
/** /**
* 查看我的种草 * 查看我的种草
......
...@@ -16,7 +16,7 @@ Component({ ...@@ -16,7 +16,7 @@ Component({
this.setViewData() this.setViewData()
let { userInfo } = this.data let { userInfo } = this.data
// 非超管 获取转化人员 销售顾问 // 非超管 获取转化人员 销售顾问
if (!(userInfo?.isSuper || userInfo.loginRole == 3)) { if (!(userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5)) {
if (wx.$orderListDateListScreenRefresh) { // 切换门店将数据清空 if (wx.$orderListDateListScreenRefresh) { // 切换门店将数据清空
this.setData({ this.setData({
'form.userIdList': [], 'form.userIdList': [],
...@@ -204,7 +204,7 @@ Component({ ...@@ -204,7 +204,7 @@ Component({
init() { init() {
let { orderTimeList, payTimeList, userInfo } = this.data let { orderTimeList, payTimeList, userInfo } = this.data
// 非超管 // 非超管
if (!(userInfo?.isSuper || userInfo.loginRole == 3)) { if (!(userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5)) {
// 获取支付方式 // 获取支付方式
api.getYqStoreConfig({ yqMerchantId: userInfo?.merchantId }).then(res => { api.getYqStoreConfig({ yqMerchantId: userInfo?.merchantId }).then(res => {
let { code, message } = res let { code, message } = res
......
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
<scroll-view scroll-y class="confirm-box" style="height:calc(100vh - {{navBarHeight}}px);margin-top:{{navBarHeight}}px;" hidden="{{!show}}"> <scroll-view scroll-y class="confirm-box" style="height:calc(100vh - {{navBarHeight}}px);margin-top:{{navBarHeight}}px;" hidden="{{!show}}">
<view class="main" style="padding-bottom:{{btnHeight}}px"> <view class="main" style="padding-bottom:{{btnHeight}}px">
<!-- 非超管转化人员 --> <!-- 非超管转化人员 -->
<view class="box" wx:if="{{!(userInfo.isSuper || userInfo.loginRole == 3)}}"> <view class="box" wx:if="{{!(userInfo.isSuper || userInfo.loginRole== 3 || userInfo.loginRole== 5)}}">
<view class="title"> <view class="title">
<view class="title-left"> <view class="title-left">
转化人员 转化人员
<view class="title-tips" wx:if="{{!(userInfo.isSuper || userInfo.loginRole == 3)}}">{{userInfo.merchantName}}</view> <view class="title-tips" wx:if="{{!(userInfo.isSuper || userInfo.loginRole== 3 || userInfo.loginRole== 5)}}">{{userInfo.merchantName}}</view>
</view> </view>
<view wx:if="{{form.sellerUserIdList.length > 12}}" bindtap="showMore" data-type="1" class="collapse-btn {{!employShowMore ? 'rotate-180' : ''}}"> <view wx:if="{{form.sellerUserIdList.length > 12}}" bindtap="showMore" data-type="1" class="collapse-btn {{!employShowMore ? 'rotate-180' : ''}}">
<image src="{{IMG_URL}}collapse_icon.png" mode="" /> <image src="{{IMG_URL}}collapse_icon.png" mode="" />
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
</view> </view>
</view> </view>
<!-- 超管转化人员 选择园区店 --> <!-- 超管转化人员 选择园区店 -->
<view class="box" wx:if="{{userInfo.isSuper || userInfo.loginRole == 3}}"> <view class="box" wx:if="{{userInfo.isSuper || userInfo.loginRole== 3 || userInfo.loginRole== 5}}">
<view class="title"> <view class="title">
<view class="title-left"> <view class="title-left">
转化人员 转化人员
...@@ -42,11 +42,11 @@ ...@@ -42,11 +42,11 @@
</view> </view>
</view> </view>
<!-- 非超管销售顾问 --> <!-- 非超管销售顾问 -->
<view class="box" wx:if="{{!(userInfo.isSuper || userInfo.loginRole == 3)}}"> <view class="box" wx:if="{{!(userInfo.isSuper || userInfo.loginRole== 3 || userInfo.loginRole== 5)}}">
<view class="title"> <view class="title">
<view class="title-left"> <view class="title-left">
销售顾问 销售顾问
<view class="title-tips" wx:if="{{!(userInfo.isSuper || userInfo.loginRole == 3)}}">{{userInfo.shopMerchantName}}</view> <view class="title-tips" wx:if="{{!(userInfo.isSuper || userInfo.loginRole== 3 || userInfo.loginRole== 5)}}">{{userInfo.shopMerchantName}}</view>
</view> </view>
<view wx:if="{{form.userIdList.length > 12}}" bindtap="showMore" data-type="2" class="collapse-btn {{!salesmanShowMore ? 'rotate-180' : ''}}"> <view wx:if="{{form.userIdList.length > 12}}" bindtap="showMore" data-type="2" class="collapse-btn {{!salesmanShowMore ? 'rotate-180' : ''}}">
<image src="{{IMG_URL}}collapse_icon.png" mode="" /> <image src="{{IMG_URL}}collapse_icon.png" mode="" />
...@@ -61,11 +61,11 @@ ...@@ -61,11 +61,11 @@
</view> </view>
</view> </view>
<!-- 超管销售顾问 选择4s店 --> <!-- 超管销售顾问 选择4s店 -->
<view class="box" wx:if="{{userInfo.isSuper || userInfo.loginRole == 3}}"> <view class="box" wx:if="{{userInfo.isSuper || userInfo.loginRole== 3 || userInfo.loginRole== 5}}">
<view class="title"> <view class="title">
<view class="title-left"> <view class="title-left">
销售顾问 销售顾问
<view class="title-tips" wx:if="{{!(userInfo.isSuper || userInfo.loginRole == 3)}}">{{userInfo.shopMerchantName}}</view> <view class="title-tips" wx:if="{{!(userInfo.isSuper || userInfo.loginRole== 3 || userInfo.loginRole== 5)}}">{{userInfo.shopMerchantName}}</view>
</view> </view>
<view wx:if="{{form.selectedMerchantList.length > 3}}" bindtap="showMore" data-type="2" class="collapse-btn {{!salesmanShowMore ? 'rotate-180' : ''}}"> <view wx:if="{{form.selectedMerchantList.length > 3}}" bindtap="showMore" data-type="2" class="collapse-btn {{!salesmanShowMore ? 'rotate-180' : ''}}">
<image src="{{IMG_URL}}collapse_icon.png" mode="" /> <image src="{{IMG_URL}}collapse_icon.png" mode="" />
......
...@@ -69,9 +69,9 @@ Page({ ...@@ -69,9 +69,9 @@ Page({
}); });
}, },
// 确定是否要显示 // 确定是否要显示
showSelectType({ scene = "", item = {}}, scan = false) { showSelectType({ scene = "", item = {} }, scan = false) {
let {isSettingExpiredTraffic} = this.data let { isSettingExpiredTraffic } = this.data
this.setData({isScan: scan}) this.setData({ isScan: scan })
// 当切换门店后,不支持录入失效客户工单,将selectType置为1录入工单 // 当切换门店后,不支持录入失效客户工单,将selectType置为1录入工单
if ((!isSettingExpiredTraffic || scan) && this.data.selectType == 3) { if ((!isSettingExpiredTraffic || scan) && this.data.selectType == 3) {
this.setData({ this.setData({
...@@ -692,8 +692,8 @@ Page({ ...@@ -692,8 +692,8 @@ Page({
let userInfo = wx.$util.getUserInfo() let userInfo = wx.$util.getUserInfo()
let merchantType = userInfo?.merchantAccountList.includes("6") || userInfo?.merchantAccountList.includes("8") let merchantType = userInfo?.merchantAccountList.includes("6") || userInfo?.merchantAccountList.includes("8")
if (merchantType && !userInfo?.isSuper && userInfo?.loginRole != 3 && userInfo?.userType == 2 && userInfo?.shopMerchantId) { if (merchantType && !userInfo?.isSuper && userInfo?.loginRole != 3 && userInfo?.userType == 2 && userInfo?.shopMerchantId) {
api.getServiceBaseInfo({merchantId: userInfo?.shopMerchantId}).then(res => { api.getServiceBaseInfo({ merchantId: userInfo?.shopMerchantId }).then(res => {
this.setData({isSettingExpiredTraffic: res?.data?.trafficExpireFlag == 'Y'}) this.setData({ isSettingExpiredTraffic: res?.data?.trafficExpireFlag == 'Y' })
}) })
} }
}, },
...@@ -704,7 +704,7 @@ Page({ ...@@ -704,7 +704,7 @@ Page({
// this.test() // this.test()
let userInfo = wx.$util.getUserInfo(); let userInfo = wx.$util.getUserInfo();
this.setData({ this.setData({
isMake: !(userInfo?.isSuper || userInfo?.loginRole == 3), isMake: !(userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5),
}); });
this.getCreateOrderSetting() this.getCreateOrderSetting()
}, },
......
...@@ -272,7 +272,7 @@ Page({ ...@@ -272,7 +272,7 @@ Page({
}, },
checkLoginMessage(needSelectAccount, loginUserObj) { checkLoginMessage(needSelectAccount, loginUserObj) {
// 记录登录信息 已选园区店、4s店(或是超管/区域督导)和场景 // 记录登录信息 已选园区店、4s店(或是超管/区域督导)和场景
if (!needSelectAccount && Object.keys(loginUserObj)?.length && (loginUserObj?.shopMerchantId || loginUserObj?.isSuper || loginUserObj?.loginRole == 3) && !((loginUserObj?.sceneType ?? '') === '')) { if (!needSelectAccount && Object.keys(loginUserObj)?.length && (loginUserObj?.shopMerchantId || loginUserObj?.isSuper || loginUserObj?.loginRole == 3 || loginUserObj?.loginRole == 5) && !((loginUserObj?.sceneType ?? '') === '')) {
this.getYqMerchantSceneConfig(loginUserObj, 0) this.getYqMerchantSceneConfig(loginUserObj, 0)
} else if (!needSelectAccount && Object.keys(loginUserObj)?.length && loginUserObj?.shopMerchantId && (loginUserObj?.sceneType ?? '') === '') { // 已选园区店、4s店 } else if (!needSelectAccount && Object.keys(loginUserObj)?.length && loginUserObj?.shopMerchantId && (loginUserObj?.sceneType ?? '') === '') { // 已选园区店、4s店
this.getYqMerchantSceneConfig(loginUserObj, 1) this.getYqMerchantSceneConfig(loginUserObj, 1)
...@@ -569,11 +569,11 @@ Page({ ...@@ -569,11 +569,11 @@ Page({
loginRole loginRole
} = loginUserObj } = loginUserObj
get4SStoreList({ get4SStoreList({
merchantId: isSuper || loginRole == 3 ? undefined : merchantId, merchantId: isSuper || loginRole == 3 || loginRole == 5 ? undefined : merchantId,
staffUUID: isSuper || loginRole == 3 ? undefined : uuid staffUUID: isSuper || loginRole == 3 || loginRole == 5 ? undefined : uuid
}, isSuper || loginRole == 3, true).then(result => { }, isSuper || loginRole == 3 || loginRole == 5, true).then(result => {
// 超管/区域督导跳过选择4s店 // 超管/区域督导跳过选择4s店
if (isSuper || loginRole == 3) { if (isSuper || loginRole == 3 || loginRole == 5) {
let { let {
merchantName, merchantName,
merchantId merchantId
......
...@@ -5,7 +5,7 @@ const checkDailyReport = async (sceneType) => { ...@@ -5,7 +5,7 @@ const checkDailyReport = async (sceneType) => {
let userInfo = wx.$util.getUserInfo(); let userInfo = wx.$util.getUserInfo();
// 判读是否要填写日报 // 判读是否要填写日报
if (!(userInfo?.isSuper || userInfo?.loginRole == 3)) { if (!(userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5)) {
// 判断员工是否已打卡上班 // 判断员工是否已打卡上班
eventRequest.push(clockedIntoWork()); eventRequest.push(clockedIntoWork());
eventRequest.push( eventRequest.push(
...@@ -121,7 +121,7 @@ const equityStaffDailyReport = (userInfo) => { ...@@ -121,7 +121,7 @@ const equityStaffDailyReport = (userInfo) => {
if ( if (
wx.__HAS_NOTLOGIN_MODAL || wx.__HAS_NOTLOGIN_MODAL ||
userInfo?.isSuper || userInfo?.isSuper ||
userInfo?.loginRole == 3 userInfo?.loginRole == 3 || userInfo.loginRole == 5
) )
return false; return false;
addModalToQueue( addModalToQueue(
......
...@@ -166,7 +166,7 @@ Page({ ...@@ -166,7 +166,7 @@ Page({
} }
let userInfo = wx.$util.getUserInfo(); let userInfo = wx.$util.getUserInfo();
this.setData({ this.setData({
isOrder: !(userInfo?.isSuper || userInfo?.loginRole == 3), isOrder: !(userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5),
}); });
this.checkPhoneShow(app.globalData.YQorderSetting?.yqPhoneConfig); this.checkPhoneShow(app.globalData.YQorderSetting?.yqPhoneConfig);
}, },
......
...@@ -413,7 +413,7 @@ ...@@ -413,7 +413,7 @@
</modal> </modal>
<remark-popup wx:if="{{ showRemark }}" show="{{ showRemark }}" isLimitNum="{{ false }}" title="{{ '修改贴膜台次' }}" btnName="{{ '确认' }}" bind:confirm="remarkConfirm" placeholder="{{ '请输入整数' }}" maxlength="4" value="{{ methodUpdateInfo.filmTimes }}" isInt="{{ true }}" /> <remark-popup wx:if="{{ showRemark }}" show="{{ showRemark }}" isLimitNum="{{ false }}" title="{{ '修改贴膜台次' }}" btnName="{{ '确认' }}" bind:confirm="remarkConfirm" placeholder="{{ '请输入整数' }}" maxlength="4" value="{{ methodUpdateInfo.filmTimes }}" isInt="{{ true }}" />
<recording-order-popup wx:if="{{ showOrderpop }}" show="{{ showOrderpop }}" bind:success="navigator" title="请选择交易参考号" /> <recording-order-popup wx:if="{{ showOrderpop }}" show="{{ showOrderpop }}" bind:success="navigator" title="请选择交易参考号" />
<block wx:if="{{ userInfo.isSuper || userInfo.loginRole == 3 }}"> <block wx:if="{{ userInfo.isSuper || userInfo.loginRole== 3 || userInfo.loginRole== 5 }}">
<side-select-by-page-popup show="{{ shopSideSelectPopup }}" bindconfirm="storeSearchEvent" subIndex="{{ subIndex }}" hasTabBar="true" /> <side-select-by-page-popup show="{{ shopSideSelectPopup }}" bindconfirm="storeSearchEvent" subIndex="{{ subIndex }}" hasTabBar="true" />
</block> </block>
<block wx:else> <block wx:else>
......
...@@ -244,4 +244,29 @@ module.exports = { ...@@ -244,4 +244,29 @@ module.exports = {
modifyWarrantyPrice(data) { modifyWarrantyPrice(data) {
return api.post("dj.api.smartcarlife.customer.warrantyCard.modifyWarrantyPrice", data); return api.post("dj.api.smartcarlife.customer.warrantyCard.modifyWarrantyPrice", data);
}, },
/** 查询用户日报模版 */
getMyTemplate(data) {
return api.post("dj.api.mindworkplate.app.daily.report.myTemplate", data);
},
/** 查询用户指定日期范围内填写日报的日期 */
getDateRecord(data) {
return api.post("dj.api.mindworkplate.app.daily.report.mySubmittedDateRecord", data);
},
/** 查询用户指定日期的日报详情 */
getRecordDetail(data) {
return api.post("dj.api.mindworkplate.app.daily.report.myRecordDetail", data);
},
/** 用户提交日报 */
saveTempReport(data) {
return api.post("dj.api.mindworkplate.app.daily.report.save", data);
},
/** 获取与会驻店人员 */
getStaffList(data) {
return api.get("dj.api.mindworkplate.app.daily.report.staffBaseInfo.pageList", data);
},
}; };
...@@ -372,7 +372,7 @@ Page({ ...@@ -372,7 +372,7 @@ Page({
userInfo: o, userInfo: o,
isYqdSuper: app.globalData.isYqdSuper, isYqdSuper: app.globalData.isYqdSuper,
isStaff: app.globalData.isStaff, isStaff: app.globalData.isStaff,
isMake: !(userInfo?.isSuper || userInfo?.loginRole == 3), isMake: !(userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5),
}); });
}, },
......
...@@ -173,7 +173,7 @@ Page({ ...@@ -173,7 +173,7 @@ Page({
baseConfigData baseConfigData
}) })
this.getOrderDetail(options.orderCode) this.getOrderDetail(options.orderCode)
this.setData({ this.setData({
orderCode: options.orderCode orderCode: options.orderCode
}) })
...@@ -203,7 +203,7 @@ Page({ ...@@ -203,7 +203,7 @@ Page({
isYqdSuper: app.globalData.isYqdSuper, isYqdSuper: app.globalData.isYqdSuper,
isStaff: app.globalData.isStaff, isStaff: app.globalData.isStaff,
userInfo: o, userInfo: o,
isMake: !(userInfo?.isSuper || userInfo?.loginRole == 3) isMake: !(userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5)
}) })
}, },
...@@ -280,12 +280,12 @@ Page({ ...@@ -280,12 +280,12 @@ Page({
if (!e.filmRollNo && e.filmNumberData?.length == 1) e.filmRollNo = e.filmNumberData[0] if (!e.filmRollNo && e.filmNumberData?.length == 1) e.filmRollNo = e.filmNumberData[0]
} }
} }
if(data.packageGoodsList){ if (data.packageGoodsList) {
data.packageGoodsList.forEach(item => { data.packageGoodsList.forEach(item => {
item.packageGoodsOrderList.forEach(g=>{ item.packageGoodsOrderList.forEach(g => {
g.price= g.totalPrice?Number(g.totalPrice) / Number(g.number):g.upgradePrice g.price = g.totalPrice ? Number(g.totalPrice) / Number(g.number) : g.upgradePrice
}) })
item.goodsList=item.packageGoodsOrderList item.goodsList = item.packageGoodsOrderList
item.price = item.goodsList.reduce((prev, cur) => { item.price = item.goodsList.reduce((prev, cur) => {
return prev + Number(cur.totalPrice) / Number(cur.number) return prev + Number(cur.totalPrice) / Number(cur.number)
}, 0) }, 0)
...@@ -298,7 +298,7 @@ Page({ ...@@ -298,7 +298,7 @@ Page({
total_price += item.totalPrice total_price += item.totalPrice
}) })
} }
data = { data = {
...data.customer, ...data.customer,
...data.payOrder, ...data.payOrder,
...@@ -376,14 +376,14 @@ Page({ ...@@ -376,14 +376,14 @@ Page({
let params = { let params = {
orderCode orderCode
} }
let {total_price}=this.data.orderInfo; let { total_price } = this.data.orderInfo;
const positionTypeList = await getPositionList() || [] const positionTypeList = await getPositionList() || []
api.getPackageGoodsDetail(params).then(res => { api.getPackageGoodsDetail(params).then(res => {
res.data.packageGoodsList.forEach(item => { res.data.packageGoodsList.forEach(item => {
item.packageGoodsOrderList.forEach(g=>{ item.packageGoodsOrderList.forEach(g => {
g.price= g.totalPrice?Number(g.totalPrice) / Number(g.number):g.upgradePrice g.price = g.totalPrice ? Number(g.totalPrice) / Number(g.number) : g.upgradePrice
}) })
item.goodsList=item.packageGoodsOrderList item.goodsList = item.packageGoodsOrderList
item.price = item.goodsList.reduce((prev, cur) => { item.price = item.goodsList.reduce((prev, cur) => {
return prev + Number(cur.totalPrice) / Number(cur.number) return prev + Number(cur.totalPrice) / Number(cur.number)
}, 0) }, 0)
...@@ -393,13 +393,13 @@ Page({ ...@@ -393,13 +393,13 @@ Page({
item.packageGoodsOrderList.forEach(g => { item.packageGoodsOrderList.forEach(g => {
g.positionStr = positionTypeList.filter(v => v.positionValue == g.upgradeGoodsPosition)[0]?.positionName || '' g.positionStr = positionTypeList.filter(v => v.positionValue == g.upgradeGoodsPosition)[0]?.positionName || ''
}) })
total_price = Number(total_price)+Number(item.totalPrice) total_price = Number(total_price) + Number(item.totalPrice)
}) })
if (res.code == 0) { if (res.code == 0) {
this.setData({ this.setData({
packageGoodsList: res.data.packageGoodsList, packageGoodsList: res.data.packageGoodsList,
'orderInfo.total_price': Number(wx.$util.decimal(total_price, 2)).toFixed(2) 'orderInfo.total_price': Number(wx.$util.decimal(total_price, 2)).toFixed(2)
}) })
} }
}) })
...@@ -527,7 +527,7 @@ Page({ ...@@ -527,7 +527,7 @@ Page({
warrantyCardList warrantyCardList
}) })
}) })
.catch(err => {}) .catch(err => { })
}, 1000 * index) }, 1000 * index)
}) })
}, },
...@@ -681,30 +681,30 @@ Page({ ...@@ -681,30 +681,30 @@ Page({
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */
onReady: function () {}, onReady: function () { },
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow: function (options) {}, onShow: function (options) { },
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
*/ */
onHide: function () {}, onHide: function () { },
/** /**
* 生命周期函数--监听页面卸载 * 生命周期函数--监听页面卸载
*/ */
onUnload: function () {}, onUnload: function () { },
/** /**
* 页面相关事件处理函数--监听用户下拉动作 * 页面相关事件处理函数--监听用户下拉动作
*/ */
onPullDownRefresh: function () {}, onPullDownRefresh: function () { },
/** /**
* 页面上拉触底事件的处理函数 * 页面上拉触底事件的处理函数
*/ */
onReachBottom: function () {} onReachBottom: function () { }
}) })
\ No newline at end of file \ No newline at end of file
...@@ -16,6 +16,10 @@ Component({ ...@@ -16,6 +16,10 @@ Component({
}, },
index: { index: {
type: Number type: Number
},
optionLabel: {
type: 'String',
default: 'confName'
} }
}, },
...@@ -26,6 +30,12 @@ Component({ ...@@ -26,6 +30,12 @@ Component({
}, },
lifetimes: {
attached() {
console.log(this.data.optionList)
},
},
/** /**
* 组件的方法列表 * 组件的方法列表
*/ */
......
<!--tabWorkOrder/pages/staffDaily/components/selectItemPopup/selectItemPopup.wxml--> <!--tabWorkOrder/pages/staffDaily/components/selectItemPopup/selectItemPopup.wxml-->
<popup class="date-background" popup-slot-class="popup-style" show="{{ show }}" bindcancel="cancel" bindconfirm="confirm" height="var(--fontSize500)" title="{{title}}"> <popup class="date-background" popup-slot-class="popup-style" show="{{ show }}" bindcancel="cancel" bindconfirm="confirm" height="var(--fontSize500)" title="{{title}}">
<view class="check-block"> <scroll-view style="height: 200rpx;" scroll-y>
<view class="check-block" >
<view <view
class="check-box {{ subItem.active ? 'active' : '' }}" class="check-box {{ subItem.active ? 'active' : '' }}"
wx:for="{{ optionList }}" wx:for="{{ optionList }}"
...@@ -11,8 +12,9 @@ ...@@ -11,8 +12,9 @@
data-pidx="{{ index }}" data-pidx="{{ index }}"
data-idx="{{ idx }}" data-idx="{{ idx }}"
> >
{{subItem.confName}} {{subItem[optionLabel]}}
<image wx:if="{{ subItem.active }}" class="mult" src="../../../../images/check-active.png"></image> <image wx:if="{{ subItem.active }}" class="mult" src="../../../../images/check-active.png"></image>
</view> </view>
</view> </view>
</scroll-view>
</popup> </popup>
\ No newline at end of file \ No newline at end of file
...@@ -75,19 +75,19 @@ Page({ ...@@ -75,19 +75,19 @@ Page({
}, },
showStorePicker() { showStorePicker() {
let { userInfo } = this.data let { userInfo } = this.data
;(userInfo?.isSuper || userInfo?.loginRole == 3) && ; (userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5) &&
this.setData({ this.setData({
showPicker: true, showPicker: true,
pickerType: 'merchant' pickerType: 'merchant'
}) })
}, },
showStaffPicker() { showStaffPicker() {
let { userInfo } = this.data let { userInfo } = this.data
;(userInfo?.isSuper || userInfo?.loginRole == 3) && ; (userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5) &&
this.setData({ this.setData({
showPicker: true, showPicker: true,
pickerType: 'staff' pickerType: 'staff'
}) })
}, },
navbarReady(e) { navbarReady(e) {
let navBarHeight = e.detail.height let navBarHeight = e.detail.height
...@@ -216,7 +216,7 @@ Page({ ...@@ -216,7 +216,7 @@ Page({
showCancel: false, showCancel: false,
confirmText: '确定', confirmText: '确定',
confirmColor: '#347BFF', confirmColor: '#347BFF',
success(res) {} success(res) { }
}) })
} else { } else {
wx.$util.showToast(message) wx.$util.showToast(message)
...@@ -305,7 +305,7 @@ Page({ ...@@ -305,7 +305,7 @@ Page({
showCancel: false, showCancel: false,
confirmText: '确定', confirmText: '确定',
confirmColor: '#347BFF', confirmColor: '#347BFF',
success(res) {} success(res) { }
}) })
} else { } else {
wx.$util.showToast(message) wx.$util.showToast(message)
...@@ -338,7 +338,7 @@ Page({ ...@@ -338,7 +338,7 @@ Page({
} = this.data } = this.data
// 在超管/区域督导未拿到门店或员工信息 // 在超管/区域督导未拿到门店或员工信息
if ( if (
(userInfo?.isSuper || userInfo?.loginRole == 3) && (userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5) &&
(!yqMerchantId || !merchantId || !staffUuid) (!yqMerchantId || !merchantId || !staffUuid)
) )
return return
...@@ -383,7 +383,7 @@ Page({ ...@@ -383,7 +383,7 @@ Page({
} = this.data } = this.data
// 在超管/区域督导未拿到门店或员工信息 // 在超管/区域督导未拿到门店或员工信息
if ( if (
(userInfo?.isSuper || userInfo?.loginRole == 3) && (userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5) &&
(!yqMerchantId || !merchantId || !staffUuid) (!yqMerchantId || !merchantId || !staffUuid)
) )
return return
...@@ -417,7 +417,7 @@ Page({ ...@@ -417,7 +417,7 @@ Page({
} = this.data } = this.data
// 在超管/区域督导未拿到门店或员工信息 // 在超管/区域督导未拿到门店或员工信息
if ( if (
(userInfo?.isSuper || userInfo?.loginRole == 3) && (userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5) &&
(!yqMerchantId || !merchantId || !staffUuid) (!yqMerchantId || !merchantId || !staffUuid)
) )
return return
...@@ -805,7 +805,7 @@ Page({ ...@@ -805,7 +805,7 @@ Page({
wx.$util.message(message) wx.$util.message(message)
} }
}) })
.catch(err => {}) .catch(err => { })
}, },
inputSearch(e) { inputSearch(e) {
let { pickerType } = this.data let { pickerType } = this.data
...@@ -942,7 +942,7 @@ Page({ ...@@ -942,7 +942,7 @@ Page({
// this.getStaffDailyReportDetailWeeklyList(); // this.getStaffDailyReportDetailWeeklyList();
} }
// console.log(userInfo.isSuper, 'userInfo.isSuper') // console.log(userInfo.isSuper, 'userInfo.isSuper')
if (userInfo?.isSuper || userInfo?.loginRole == 3) { if (userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5) {
this.setData({ this.setData({
role: 'super' role: 'super'
}) })
...@@ -1012,7 +1012,7 @@ Page({ ...@@ -1012,7 +1012,7 @@ Page({
} }
// } // }
}) })
.catch(err => {}) .catch(err => { })
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
...@@ -1134,5 +1134,5 @@ Page({ ...@@ -1134,5 +1134,5 @@ Page({
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */
onReady: function () {} onReady: function () { }
}) })
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<navigation-bar bindback="jump" bindnavbarReady="navbarReady" showBack="{{ role!='other' && approvedSource != '3' ? true:false }}"> <navigation-bar bindback="jump" bindnavbarReady="navbarReady" showBack="{{ role!='other' && approvedSource != '3' ? true:false }}">
<view class="navigation-title" bindtap="showStorePicker"> <view class="navigation-title" bindtap="showStorePicker">
<view class="navigation-title-text text-hide">{{orderObj.merchantName}}</view> <view class="navigation-title-text text-hide">{{orderObj.merchantName}}</view>
<view class="arrow" wx:if="{{ userInfo.isSuper || userInfo.loginRole == 3 }}"> <view class="arrow" wx:if="{{ userInfo.isSuper || userInfo.loginRole== 3 || userInfo.loginRole== 5 }}">
<image src="/images/arrow-bottom.png" /> <image src="/images/arrow-bottom.png" />
</view> </view>
</view> </view>
......
export const tempRuleFnObj = {
/** 业绩报告 */
performanceReport: {
/** 管理门店数 */
managedStoreCount: {
ruleFn: (rule, value) => {
return /^\d{1,2}$/.test(value) ? null : { message: '管理门店数请输入两位数字' }
}
},
/** 延保 - 门店平均客单价 */
warrantyStoreAverageCartValue: {
ruleFn: (rule, value) => {
return /^\d+(\.\d{0,2})?$/.test(value) ? null : { message: '延保门店平均客单价请输入仅有两位小数的数字' }
}
},
/** 延保 - 门店平均渗透率 */
warrantyStorePenetrationAverage: {
ruleFn: (rule, value) => {
return /^\d+(\.\d{0,1})?$/.test(value) ? null : { message: '延保门店平均渗透率请输入仅有一位小数的数字' }
}
},
/** 权益 - 门店平均客单价 */
equityStoreAverageCartValue: {
ruleFn: (rule, value) => {
return /^\d+(\.\d{0,2})?$/.test(value) ? null : { message: '权益门店平均客单价请输入仅有两位小数的数字' }
}
},
/** 权益 - 门店平均渗透率 */
equityStorePenetrationAverage: {
ruleFn: (rule, value) => {
return /^\d+(\.\d{0,1})?$/.test(value) ? null : { message: '权益门店平均渗透率请输入仅有一位小数的数字' }
}
},
/** 精品 - 门店平均客单价 */
boutiqueStoreAverageCartValue: {
ruleFn: (rule, value) => {
return /^\d+(\.\d{0,2})?$/.test(value) ? null : { message: '精品门店平均客单价请输入仅有两位小数的数字' }
}
},
/** 精品 - 门店平均渗透率 */
boutiqueStorePenetrationAverage: {
ruleFn: (rule, value) => {
return /^\d+(\.\d{0,1})?$/.test(value) ? null : { message: '精品门店平均渗透率请输入仅有一位小数的数字' }
}
},
},
/** 带教培训 */
organizeTraining: {},
/** 招聘面试 */
jobInterview: {
/** 今日面试 */
todayInterview: {
ruleFn: (rule, value) => {
return /^\d{1,2}$/.test(value) ? null : { message: '今日面试请输入两位数字' }
}
},
/** 面试通过 */
interviewPassed: {
ruleFn: (rule, value) => {
return /^\d{1,2}$/.test(value) ? null : { message: '面试通过请输入两位数字' }
}
},
/** 本月入职 */
thisMonthOnboarding: {
ruleFn: (rule, value) => {
return /^\d{1,2}$/.test(value) ? null : { message: '本月入职请输入两位数字' }
}
},
/** 本月待招 */
thisMonthPendingRecruits: {
ruleFn: (rule, value) => {
return /^\d{1,2}$/.test(value) ? null : { message: '本月待招请输入两位数字' }
}
},
},
/** 谈客接待 */
guestReception: {
/** 今日接待 */
todayReception: {
ruleFn: (rule, value) => {
return /^\d{1,2}$/.test(value) ? null : { message: '今日接待请输入两位数字' }
}
},
/** 今日成交 */
todayTransactions: {
ruleFn: (rule, value) => {
return /^\d{1,2}$/.test(value) ? null : { message: '今日成交请输入两位数字' }
}
},
},
/** 工作总结 */
// workSummary: {
// /** 今日总结 */
// todaySummary: {
// ruleFn: (rule, value) => {
// return null
// }
// },
// /** 明日计划 */
// tomorrowPlan: {
// ruleFn: (rule, value) => {
// return null
// }
// },
// }
}
\ No newline at end of file \ No newline at end of file
{ {
"usingComponents": {} "navigationStyle": "custom",
"usingComponents": {
"van-overlay": "@vant/weapp/overlay/index",
"weekCalendar": "../staffDaily/components/weekCalendar/weekCalendar",
"select-item-popup": "../staffDaily/components/selectItemPopup/selectItemPopup"
}
} }
\ No newline at end of file \ No newline at end of file
/* tabWorkOrder/pages/supervisorDaily/supervisorDaily.wxss */
page {
background-color: #f7f8fa;
}
.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;
// }
.tab-box {
width: 100%;
height: 88rpx;
line-height: 88rpx;
display: flex;
white-space: nowrap;
.tab-item {
color: #5a5e66;
font-size: 28rpx;
// margin-right: 64rpx;
padding: 0 35rpx;
}
.tab-item.active {
color: #347bff;
border-bottom: 2rpx solid #347BFF;
}
}
.cust-form-box {
box-sizing: border-box;
margin: 16rpx 20rpx;
padding-bottom: 32rpx;
background: #FFFFFF;
box-shadow: 0 4rpx 20rpx 0 #0000001a;
border-radius: 16rpx;
}
.meeting-box {
.van-cell {
line-height: auto !important;
}
.meeting-textarea {
border: 2rpx solid #ececec;
margin-top: 16rpx;
}
}
.example-tips {
color: #999ea8;
font-size: 24rpx;
margin-bottom: 8rpx;
}
.example-btn {
color: #347bff;
font-size: 24rpx;
margin-left: 8rpx;
}
.trainingPhotos .plus {
margin-top: 24rpx;
}
.trainingPhotos .plus .van-icon-photograph:before {
content: '';
width: var(--fontSize32);
height: var(--fontSize32);
background-image: url('https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/miniProgram/icon-plus.png');
background-size: 100% 100%;
}
.picker {
display: flex;
flex-direction: row-reverse;
height: var(--fontSize80);
line-height: var(--fontSize80);
text-align: right;
.placeholder {
font-weight: 400;
font-size: var(--fontSize28);
color: #B6B6B8;
}
.pickerArrow {
width: var(--fontSize28);
height: var(--fontSize26);
margin-top: var(--fontSize26);
flex-shrink: 0;
}
}
.btn {
box-sizing: border-box;
height: var(--fontSize88);
line-height: var(--fontSize88);
text-align: center;
font-size: var(--fontSize32);
color: #FFFFFF;
background: #347BFF;
border-radius: var(--fontSize12);
margin: var(--fontSize126) var(--fontSize64) var(--fontSize20);
}
.empty-box {
margin-top: 276rpx;
text-align: center;
color: #5a5e66;
font-size: 28rpx;
font-weight: bold;
// font-family: "PingFang SC", -apple-system;
font-family: PingFangSC-SNaNrpxibold;
.icon-empty {
width: 172rpx !important;
height: 172rpx !important;
margin-bottom: 32rpx;
}
.sub-txt {
margin-top: 16rpx;
color: #999ea8;
font-size: 24rpx;
font-weight: 400;
}
}
}
.wrapper {
position: absolute;
top: 50%;
width: 100%;
height: auto;
transform: translateY(-50%);
}
.isFullSucreen {
padding-bottom: 102px !important;
}
.isFullSucreen-btn {
padding-bottom: 34px !important;
}
\ No newline at end of file \ No newline at end of file
/* tabWorkOrder/pages/supervisorDaily/supervisorDaily.wxss */
\ No newline at end of file \ No newline at end of file
<!--tabWorkOrder/pages/supervisorDaily/supervisorDaily.wxml--> <!--tabWorkOrder/pages/supervisorDaily/supervisorDaily.wxml-->
<text>tabWorkOrder/pages/supervisorDaily/supervisorDaily.wxml</text> <view class="layout {{ flag ? 'opacity' : '' }}" v-loading="true">
<navigation-bar bindback="jump" bindnavbarReady="navbarReady" showBack="true">
<view class="navigation-title">
<view class="navigation-title-text text-hide">日报填写</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 wx:if="{{tmlpInitData.length}}">
<scroll-view class="tab-box" scroll-x enable-flex scroll-with-animation>
<view class="tab-item {{ tabActive == item.key ? 'active' : ''}}" wx:for="{{tabList}}" wx:key="index" bindtap="tabChange" data-key="{{item.key}}">{{item.name}}</view>
</scroll-view>
<!-- 动态表单 -->
<view class="cust-form-box">
<gl-cust-form wx:if="{{tmlpObj}}" id="{{tabActive}}" formData="{{ tmlpFormData }}" disable="{{disable}}" dataAttrName="{{ dataAttrName }}" formDataList="{{ tmlpObj[tabActive] }}" bind:radioEvent="radioEvent">
<!-- 与会人员 -->
<view slot='attendingStaff'>
<view class="picker" bindtap="handleProblemPicker" data-name="attendingStaff" data-pname="organizeTraining">
<image class="pickerArrow" src="/components/images/arrow-x.png" />
<view class="text-hide" wx:if="{{selectedStr}}">{{ selectedStr }}</view>
<text class="placeholder" wx:else>请选择</text>
</view>
</view>
<!-- 腾讯会议录屏链接 -->
<view slot='tencentMeetingRecordingLink' class="meeting-box">
<view class="example-tips">会议录制文件权限需设置为「所有人可查看」<text class="example-btn" bindclick="handleLookPictrue" bind:tap="onClickShow" data-name="example-meeting">示例</text></view>
<view class="meeting-textarea">
<van-field value="{{tmlpFormData.tencentMeetingRecordingLink}}" autosize hold-keyboard type="textarea" rows="4" show-word-limit placeholder="录制:驻店人员预定的会议 录指纹键:http://meeting.tencent.com/crm/2rejORzKc560" maxlength="100" disabled="{{disable}}" data-attr="tencentMeetingRecordingLink" bindinput="handleInput" />
</view>
</view>
<!-- 培训照片 -->
<view slot='trainingPhotos' class="trainingPhotos">
<view class="example-tips">线下培训上传「与会人员照片」<text class="example-btn" bind:tap="onClickShow" data-name="example-xianxia">示例</text></view>
<view class="example-tips">线上培训上传「会议上线截图」<text class="example-btn" bind:tap="onClickShow" data-name="example-xianshang">示例</text></view>
<van-uploader class="plus" file-list="{{ imgObj.trainingPhotos }}" upload-text="上传照片" max-count="1" deletable="{{!disable}}" preview-size="var(--fontSize192)" bind:before-read="beforeUpload" bind:after-read="upLoad" bind:delete="handleDeleteImg" data-attr="trainingPhotos"></van-uploader>
</view>
<!-- 工作总结 -->
<view slot='todaySummary' class="meeting-box">
<view class="meeting-textarea">
<van-field value="{{tmlpFormData.todaySummary}}" autosize hold-keyboard type="textarea" rows="4" show-word-limit placeholder="清晰扼要的总结今日的工作内容,例如:参加区域M9车型延保分享,清远驻店辅助,加强提升渗透率,电销安心包MAX" maxlength="200" disabled="{{disable}}" data-attr="todaySummary" bindinput="handleInput" />
</view>
</view>
<!-- 明日计划 -->
<view slot='tomorrowPlan' class="meeting-box">
<view class="meeting-textarea">
<van-field value="{{tmlpFormData.tomorrowPlan}}" autosize hold-keyboard type="textarea" rows="4" show-word-limit placeholder="简单扼要的总结明天的工作计划,例如:驻清远问界店辅助渗透率提升,加强提升渗透率,电销安心包MAX" maxlength="200" disabled="{{disable}}" data-attr="tomorrowPlan" bindinput="handleInput" />
</view>
</view>
</gl-cust-form>
</view>
<button wx:if="{{!disable}}" class="btn" bindtap="handleConfirm">提交</button>
</view>
<!-- 未配置模版 -->
<view wx:else class="empty-box">
<view>
<gl-image class="icon-empty" src="/miniProgram/daily-empty.png"></gl-image>
<view>总部尚未配置日报信息</view>
<view class="sub-txt">请查阅其他日期或联系总部</view>
</view>
</view>
</view>
</view>
<!-- 与会人员多选 -->
<select-item-popup show="{{showSelectItemPopup}}" title="{{selectItemTitle}}" optionList="{{mutiOption[selectItemName].optionList}}" index="1" optionLabel="staffName" bindconfirm="changePromble" bindcancel="closeSlectItemPopup" bindclick="click" />
<van-overlay show="{{ imgShow }}" bind:click="onClickHide" z-index="99999999">
<view class="wrapper">
<image src="{{IMG_URL}}/{{imgName}}.png" mode="widthFix" />
</view>
</van-overlay>
\ No newline at end of file \ No newline at end of file
...@@ -65,7 +65,7 @@ Page({ ...@@ -65,7 +65,7 @@ Page({
}, },
showStorePicker() { showStorePicker() {
let { userInfo } = this.data; let { userInfo } = this.data;
(userInfo?.isSuper || userInfo?.loginRole == 3) && (userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5) &&
this.setData({ this.setData({
showPicker: true, showPicker: true,
pickerType: "merchant", pickerType: "merchant",
...@@ -73,7 +73,7 @@ Page({ ...@@ -73,7 +73,7 @@ Page({
}, },
showStaffPicker() { showStaffPicker() {
let { userInfo } = this.data; let { userInfo } = this.data;
(userInfo?.isSuper || userInfo?.loginRole == 3) && (userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5) &&
this.setData({ this.setData({
showPicker: true, showPicker: true,
pickerType: "staff", pickerType: "staff",
...@@ -297,7 +297,7 @@ Page({ ...@@ -297,7 +297,7 @@ Page({
orderObj: { yqMerchantId, merchantId, staffUuid } orderObj: { yqMerchantId, merchantId, staffUuid }
} = this.data; } = this.data;
// 在超管/区域督导未拿到门店或员工信息 // 在超管/区域督导未拿到门店或员工信息
if ((userInfo?.isSuper || userInfo?.loginRole == 3) && (!yqMerchantId || !merchantId || !staffUuid)) return if ((userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5) && (!yqMerchantId || !merchantId || !staffUuid)) return
var selectWeek = --this.data.selectWeek var selectWeek = --this.data.selectWeek
var timeBean = this.data.timeBean var timeBean = this.data.timeBean
timeBean = util.getWeekDayList(selectWeek) timeBean = util.getWeekDayList(selectWeek)
...@@ -340,7 +340,7 @@ Page({ ...@@ -340,7 +340,7 @@ Page({
orderObj: { yqMerchantId, merchantId, staffUuid } orderObj: { yqMerchantId, merchantId, staffUuid }
} = this.data; } = this.data;
// 在超管/区域督导未拿到门店或员工信息 // 在超管/区域督导未拿到门店或员工信息
if ((userInfo?.isSuper || userInfo?.loginRole == 3) && (!yqMerchantId || !merchantId || !staffUuid)) return if ((userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5) && (!yqMerchantId || !merchantId || !staffUuid)) return
var selectWeek = ++this.data.selectWeek var selectWeek = ++this.data.selectWeek
var timeBean = this.data.timeBean var timeBean = this.data.timeBean
timeBean = util.getWeekDayList(selectWeek) timeBean = util.getWeekDayList(selectWeek)
...@@ -366,7 +366,7 @@ Page({ ...@@ -366,7 +366,7 @@ Page({
orderObj: { yqMerchantId, merchantId, staffUuid } orderObj: { yqMerchantId, merchantId, staffUuid }
} = this.data; } = this.data;
// 在超管/区域督导未拿到门店或员工信息 // 在超管/区域督导未拿到门店或员工信息
if ((userInfo?.isSuper || userInfo?.loginRole == 3) && (!yqMerchantId || !merchantId || !staffUuid)) return if ((userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5) && (!yqMerchantId || !merchantId || !staffUuid)) return
this.setData({ this.setData({
['timeBean.selectDay']: e.detail ['timeBean.selectDay']: e.detail
}) })
...@@ -764,7 +764,7 @@ Page({ ...@@ -764,7 +764,7 @@ Page({
this.getMerchantCarBandList() this.getMerchantCarBandList()
} }
if (userInfo?.isSuper || userInfo?.loginRole == 3) { if (userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5) {
this.setData({ this.setData({
role: 'super' role: 'super'
}) })
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<navigation-bar bindback="jump" bindnavbarReady="navbarReady" showBack="{{ role!='other' && approvedSource != '3' ? true : false }}"> <navigation-bar bindback="jump" bindnavbarReady="navbarReady" showBack="{{ role!='other' && approvedSource != '3' ? true : false }}">
<view class="navigation-title" bindtap="showStorePicker"> <view class="navigation-title" bindtap="showStorePicker">
<view class="navigation-title-text text-hide">{{orderObj.merchantName}}</view> <view class="navigation-title-text text-hide">{{orderObj.merchantName}}</view>
<view class="arrow" wx:if="{{ userInfo.isSuper || userInfo.loginRole == 3 }}"> <view class="arrow" wx:if="{{ userInfo.isSuper || userInfo.loginRole== 3 || userInfo.loginRole== 5 }}">
<image src="/images/arrow-bottom.png" /> <image src="/images/arrow-bottom.png" />
</view> </view>
</view> </view>
......
...@@ -106,7 +106,7 @@ const setUserInfo = userInfo => { ...@@ -106,7 +106,7 @@ const setUserInfo = userInfo => {
// userInfo.loginrole // userInfo.loginrole
const loginRole = userInfo.loginRole const loginRole = userInfo.loginRole
userInfo.isSuper = userInfo?.isSuper ? true : false userInfo.isSuper = userInfo?.isSuper ? true : false
if (loginRole && loginRole == 3) { if (loginRole && (loginRole == 3 || loginRole == 5)) {
userInfo.userType = 1 userInfo.userType = 1
} }
wx.setStorageSync('dj_boutique_user_info', JSON.stringify(userInfo)) wx.setStorageSync('dj_boutique_user_info', JSON.stringify(userInfo))
...@@ -168,12 +168,12 @@ var type = function (data) { ...@@ -168,12 +168,12 @@ var type = function (data) {
var dataType = var dataType =
data instanceof Element ? data instanceof Element ?
'element' // 为了统一DOM节点类型输出 'element' // 为了统一DOM节点类型输出
: :
toString toString
.call(data) .call(data)
.replace(/\[object\s(.+)\]/, '$1') .replace(/\[object\s(.+)\]/, '$1')
.toLowerCase() .toLowerCase()
return dataType return dataType
} }
/** /**
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!