Commit f45a9ed4 by 张立顺

Merge branch 'SAAS+V4.49.0-0121' into 'develop'

上线合并

See merge request !357
2 parents 9d9335b8 5ffc7e0e
Showing 129 changed files with 3002 additions and 268 deletions
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
超管:18129809927 18372203315 超管:18129809927 18372203315
商户管理员:15814019200 商户管理员:15814019200
区域督导:187750352053 区域督导:187750352053
销售: 15626599743(开发)
# 生产环境跟手机号和验证码绑定 需要自己到账号中心绑定手机号成为员工或超管 # 生产环境跟手机号和验证码绑定 需要自己到账号中心绑定手机号成为员工或超管
......
...@@ -338,5 +338,10 @@ module.exports = { ...@@ -338,5 +338,10 @@ module.exports = {
// 积分审批通过 // 积分审批通过
approvedPointsAPI(data) { approvedPointsAPI(data) {
return api.post('dj.api.smartcarlife.staff.motivation.audit', data) return api.post('dj.api.smartcarlife.staff.motivation.audit', data)
},
// 上传pdf
uploadPdfAPI(data) {
return api.post('dj.api.smartcarlife.common.uploadPdf', data, ['file'])
} }
} }
...@@ -109,7 +109,9 @@ ...@@ -109,7 +109,9 @@
"pages/premiumUpgrade/premiumUpgrade", "pages/premiumUpgrade/premiumUpgrade",
"pages/defeatOrder/defeatOrder", "pages/defeatOrder/defeatOrder",
"pages/staffDaily/staffDaily", "pages/staffDaily/staffDaily",
"pages/upgradeStaffDaily/upgradeStaffDaily" "pages/upgradeStaffDaily/upgradeStaffDaily",
"pages/supervisorDaily/supervisorDaily",
"pages/residentManage/residentManage"
] ]
}, },
{ {
...@@ -206,6 +208,7 @@ ...@@ -206,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",
...@@ -220,11 +223,14 @@ ...@@ -220,11 +223,14 @@
"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",
"glsx-privacy": "glsk-applet-component/GlsxPrivacy/index", "glsx-privacy": "glsk-applet-component/GlsxPrivacy/index",
"empty-data": "/components/EmptyData/EmptyData" "empty-data": "/components/EmptyData/EmptyData",
"van-switch": "@vant/weapp/switch/index"
}, },
"preloadRule": { "preloadRule": {
"pages/tabWorkOrder/pages/index/index": { "pages/tabWorkOrder/pages/index/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: 'transparent'
}
},
/**
* 组件的初始数据
*/
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' ? '0 24rpx 0 0 !important': '0'}; border-radius: ${item.type == 'input' ? '8rpx': '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 */
.gl-cust-form {
.input-box {
display: flex;
align-items: center;
justify-content: space-between;
align-items: center;
--cell-line-height: 40rpx !important;
}
.radio-box {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
}
.radio-item {
display: inline-block;
width: 270rpx;
}
.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(--fontSize40) !important;
line-height: var(--fontSize40) !important;
text-align: right;
}
.arrow {
// width: var(--fontSize28);
// height: var(--fontSize26);
// margin-top: var(--fontSize26);
// flex-shrink: 0;
width: var(--fontSize28);
height: var(--fontSize26);
margin-top: var(--fontSize6);
transform: 0;
flex-shrink: 0;
}
.text-hide {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.brand {
text-align: right;
padding: var(--fontSize40) 0;
}
.textarea .van-field__control {
//padding: 16rpx 24rpx !important;
height: 38px;
line-height: 38px;
padding-left: 24rpx;
}
.placeholder {
font-weight: 400;
font-size: var(--fontSize28);
color: #B6B6B8;
}
}
// .input-box .textarea input {
// height: var(--fontSize40);
// }
// .gl-cust-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" />
<glsx-privacy appletName="生意助手员工版" bind:agreeClick="agreeClick" bind:disagreeClick="disagreeClick"></glsx-privacy>
<view wx:for="{{formDataList}}" wx:key="index" class="custom-class gl-cust-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}}"
requiredBefore="false"
requiredAfter="true"
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}}"
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,
......
...@@ -18,7 +18,7 @@ export const appId = "wx570d9331f9ace0bd"; ...@@ -18,7 +18,7 @@ export const appId = "wx570d9331f9ace0bd";
* 4预发布 * 4预发布
* 5cdptest * 5cdptest
*/ */
let index = 1; let index = 2;
const accountInfo = wx.getAccountInfoSync(); const accountInfo = wx.getAccountInfoSync();
const systemInfo = wx.getSystemInfoSync(); const systemInfo = wx.getSystemInfoSync();
const envName = accountInfo.miniProgram.envVersion; const envName = accountInfo.miniProgram.envVersion;
......
...@@ -84,8 +84,9 @@ Component({ ...@@ -84,8 +84,9 @@ Component({
loginRoleLabel: { loginRoleLabel: {
1: '超管', 1: '超管',
2: '商户管理员', 2: '商户管理员',
3: '区域督导', 3: '区域运营',
4: '驻店负责人' 4: '驻店负责人',
5: '广联销售',
}, },
loginRole: '', loginRole: '',
userInfo: {}, userInfo: {},
...@@ -113,14 +114,14 @@ Component({ ...@@ -113,14 +114,14 @@ Component({
}, },
getData() { getData() {
const userInfo = wx.$util.getUserInfo() const userInfo = wx.$util.getUserInfo()
api.getStaticData({merchantId: userInfo?.default4SStoreInfo_crowdFunding?.merchantId}).then(res => { api.getStaticData({ merchantId: userInfo?.default4SStoreInfo_crowdFunding?.merchantId }).then(res => {
let { code, data, message } = res let { code, data, message } = res
if (code == 0) { if (code == 0) {
// 分转元 // 分转元
if (data?.todayAmount) data.todayAmount = NP.divide(data?.todayAmount, 100) if (data?.todayAmount) data.todayAmount = NP.divide(data?.todayAmount, 100)
if (data?.monthAmount) data.monthAmount = NP.divide(data?.monthAmount, 100) if (data?.monthAmount) data.monthAmount = NP.divide(data?.monthAmount, 100)
if (data?.totalAmount) data.totalAmount = NP.divide(data?.totalAmount, 100) if (data?.totalAmount) data.totalAmount = NP.divide(data?.totalAmount, 100)
if (data?.totalAmount) data.totalAmount = NP.round(data?.totalAmount, 0 ) if (data?.totalAmount) data.totalAmount = NP.round(data?.totalAmount, 0)
this.setData({ this.setData({
staticData: data || {} staticData: data || {}
}) })
...@@ -132,8 +133,8 @@ Component({ ...@@ -132,8 +133,8 @@ Component({
navGo(e) { navGo(e) {
console.log(e) console.log(e)
const thisPage = wx.$router.getPageInstance() const thisPage = wx.$router.getPageInstance()
let {item} = e.currentTarget.dataset let { item } = e.currentTarget.dataset
if (item.isTab) return thisPage.changeTabBar && thisPage.changeTabBar({detail: item?.tabIndex}) if (item.isTab) return thisPage.changeTabBar && thisPage.changeTabBar({ detail: item?.tabIndex })
if (!item.path) wx.$util.showToast('模块暂未开通\r\n敬请期待') if (!item.path) wx.$util.showToast('模块暂未开通\r\n敬请期待')
}, },
} }
......
...@@ -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>
...@@ -60,6 +60,6 @@ ...@@ -60,6 +60,6 @@
<reception-screen show="{{ show_reception_confirm }}" userInfo="{{ userInfo }}" dateTime="{{dateTime}}" isFilterUpgrade="{{isFilterUpgrade}}" isFilterDefeat="{{isFilterDefeat}}" maxDayRange="{{7}}" maxDayRangeType="day" navBarHeight="{{ navBarHeight }}" bindconfirm="searchScreen" /> <reception-screen show="{{ show_reception_confirm }}" userInfo="{{ userInfo }}" dateTime="{{dateTime}}" isFilterUpgrade="{{isFilterUpgrade}}" isFilterDefeat="{{isFilterDefeat}}" maxDayRange="{{7}}" maxDayRangeType="day" navBarHeight="{{ navBarHeight }}" bindconfirm="searchScreen" />
</view> </view>
<view wx:if="{{ showOrderRendering }}"> <view wx:if="{{ showOrderRendering }}">
<order-screen show="{{ show_order_confirm }}" userInfo="{{ userInfo }}" navBarHeight="{{ navBarHeight }}" status="{{ orderStatus }}" bindconfirm="searchScreen" /> <order-screen show="{{ show_order_confirm }}" userInfo="{{ userInfo }}" navBarHeight="{{ navBarHeight }}" status="{{ orderStatus }}" zyStatus="{{ zyPayStatus }}" bindconfirm="searchScreen" />
</view> </view>
</page-container> </page-container>
\ No newline at end of file \ No newline at end of file
/* packageEquity/pages/aiCheck/defense/defense.wxss */
\ No newline at end of file \ No newline at end of file
...@@ -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': [],
...@@ -40,6 +40,13 @@ Component({ ...@@ -40,6 +40,13 @@ Component({
observer: function (n) { observer: function (n) {
this.setOrderStatusListDisabled(n) this.setOrderStatusListDisabled(n)
} }
},
zyStatus: { // 延保协议状态
type: String,
value: null,
observer: function (n) {
this.setZyPayStatus(n)
}
} }
}, },
...@@ -139,6 +146,18 @@ Component({ ...@@ -139,6 +146,18 @@ Component({
value: 5 value: 5
} }
], ],
// 延保协议状态数据
zyPayStatus: [{
name: '全部',
active: true,
value: ''
}, {
name: '待上传',
value: '1'
}, {
name: '已上传',
value: '2'
}],
storeType: 1, // 门店数据类型 默认园区店 storeType: 1, // 门店数据类型 默认园区店
showStoreSelectPopup: false showStoreSelectPopup: false
}, },
...@@ -297,6 +316,28 @@ Component({ ...@@ -297,6 +316,28 @@ Component({
i.active = false i.active = false
}) })
target[index].active = true target[index].active = true
// 切换延保协议,将支付状态置为全部
if (listName === 'zyPayStatus' && index != 0) {
let { orderStatus } = this.data.form
orderStatus?.map((val, idx) => {
val.active = false
if (idx == 0) val.active = true
})
this.setData({
'form.orderStatus': orderStatus
})
}
// 切换订单状态,非全部,将延保协议置为全部
if (listName === 'orderStatus' && index != 0) {
let { zyPayStatus } = this.data.form
zyPayStatus?.map((val, idx) => {
val.active = false
if (idx == 0) val.active = true
})
this.setData({
'form.zyPayStatus': zyPayStatus
})
}
} }
this.setData({ this.setData({
[`form.${listName}`]: target, [`form.${listName}`]: target,
...@@ -306,15 +347,44 @@ Component({ ...@@ -306,15 +347,44 @@ Component({
/**订单状态 */ /**订单状态 */
setOrderStatusListDisabled(statusType) { setOrderStatusListDisabled(statusType) {
let { let {
orderStatus orderStatus,
zyPayStatus
} = this.data } = this.data
orderStatus.map((e, index) => { orderStatus.map((e, index) => {
e.active = e.value == statusType e.active = e.value == statusType
}) })
if (statusType !== '') { // 有订单状态,将延保协议状态置为全部
zyPayStatus.map((e, index) => {
e.active = false
if (index == 0) e.active = true
})
this.setData({
['form.zyPayStatus']: wx.$util.deepClone(zyPayStatus)
})
}
this.setData({ this.setData({
['form.orderStatus']: wx.$util.deepClone(orderStatus) ['form.orderStatus']: wx.$util.deepClone(orderStatus)
}) })
}, },
// 延保协议
setZyPayStatus(value) {
let { zyPayStatus, orderStatus } = this.data
if (value !== '') { // 没有延保协议状态时 防止干扰
orderStatus.map((e, index) => {
e.active = false
if (index == 0) e.active = true
})
this.setData({
['form.orderStatus']: wx.$util.deepClone(orderStatus)
})
}
zyPayStatus.map(e => {
e.active = e.value == value
})
this.setData({
['form.zyPayStatus']: wx.$util.deepClone(zyPayStatus)
})
},
/**转化人员 & 销售人员*/ /**转化人员 & 销售人员*/
getsellerUserIdList(merchantId, type) { getsellerUserIdList(merchantId, type) {
let target = type == 0 ? 'form.transferIds' : 'form.referrerIds' let target = type == 0 ? 'form.transferIds' : 'form.referrerIds'
...@@ -347,7 +417,7 @@ Component({ ...@@ -347,7 +417,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
...@@ -376,7 +446,8 @@ Component({ ...@@ -376,7 +446,8 @@ Component({
let { let {
referrerIds, referrerIds,
transferIds, transferIds,
orderStatus orderStatus,
zyPayStatus
} = this.data.form, { } = this.data.form, {
userInfo userInfo
} = this.data } = this.data
...@@ -386,19 +457,25 @@ Component({ ...@@ -386,19 +457,25 @@ 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
if (index == 0) val.active = true if (index == 0) val.active = true
}) })
// 将延保协议状态置为全部
zyPayStatus?.map((val, index) => {
val.active = false
if (index == 0) val.active = true
})
this.setData({ this.setData({
'form.selectedYqMerchantList': [], 'form.selectedYqMerchantList': [],
'form.selectedMerchantList': [], 'form.selectedMerchantList': [],
'form.transferIds': transferIds || [], 'form.transferIds': transferIds || [],
'form.referrerIds': referrerIds || [], 'form.referrerIds': referrerIds || [],
'form.orderStatus': orderStatus, 'form.orderStatus': orderStatus,
'form.zyPayStatus': zyPayStatus,
isReset: true isReset: true
}) })
this.init() this.init()
...@@ -450,7 +527,7 @@ Component({ ...@@ -450,7 +527,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="" />
...@@ -142,6 +142,16 @@ ...@@ -142,6 +142,16 @@
</block> </block>
</view> </view>
</view> </view>
<view class="box">
<view class="title">
延保协议
</view>
<view class="list-box">
<block wx:for="{{form.zyPayStatus}}" wx:key="index">
<view class="item text-center {{item.active?'active':''}}" bindtap="choose" data-list-name="zyPayStatus" data-index="{{index}}">{{item.name}}</view>
</block>
</view>
</view>
</view> </view>
<view class="btn-box {{isFullSucreen?'isFullSucreen-btn':''}}"> <view class="btn-box {{isFullSucreen?'isFullSucreen-btn':''}}">
<view class="btn clear text-center" bindtap="reset">清除</view> <view class="btn clear text-center" bindtap="reset">清除</view>
......
// tabWorkOrder/pages/createOrder/createOrderComponents/Popup/Popup.js
Component({
externalClasses: ['popup-slot-class'],
/**
* 组件的属性列表
*/
properties: {
show: {
type: Boolean,
value: false,
observer: function (n, o) {
n && wx.hideKeyboard()
this.setData({
showPopup: n
})
}
},
title: String,
height: {
type: String,
value: '85%'
},
slotStyle: String,
cancelText: String,
cancelStyle: String
},
/**
* 组件的初始数据
*/
data: {},
/**
* 组件的方法列表
*/
methods: {
noScroll() {},
hidePopup() {
this.setData({
show: false
})
this.triggerEvent('cancel')
},
confirm() {
this.triggerEvent('confirm')
}
},
attached() {
// console.log(wx.$util.isFullSucreen(), 'wx.$util.isFullSucreen()')
this.setData({
isFullSucreen: wx.$util.isFullSucreen(true)
})
}
})
\ No newline at end of file \ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
<view class="popup" hidden="{{ !showPopup }}" catchtouchmove="noScroll">
<view class="popup-bg"></view>
<view class="popup-content" style="height:{{ height }}">
<block wx:if="{{ title }}">
<view class="popup-title text-center">{{title}}</view>
</block>
<view class="popup-slot popup-slot-class {{ isFullSucreen?title?'isFullSucreen':'isFullSucreen-notitle':'' }}" style="{{slotStyle}}">
<slot></slot>
</view>
<view class="popup-footer {{ isFullSucreen?'isFullSucreen':'' }}">
<view class="cancel btn text-center" bindtap="hidePopup" style="{{cancelStyle}}">{{cancelText || '取消'}}</view>
<view class="confirm btn text-center" bindtap="confirm">确认</view>
</view>
</view>
</view>
\ No newline at end of file \ No newline at end of file
/* tabWorkOrder/pages/createOrder/createOrderComponents/Popup/Popup.wxss */
.popup {
position: fixed;
top: 0;
left: 0;
bottom: 0;
right: 0;
z-index: 998;
}
.popup-bg {
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
background-color: rgba(0, 0, 0, .7);
}
.text-center {
display: flex;
align-items: center;
justify-content: center;
}
.popup-content {
position: absolute;
left: 0;
width: 100%;
background: #FFFFFF;
border-radius: var(--fontSize20) var(--fontSize20) 0 0;
animation: show-popup .5s forwards;
box-sizing: border-box;
padding: 0 var(--fontSize32);
}
.popup-title {
height: var(--fontSize98);
font-size: var(--fontSize32);
color: #333333;
border-bottom: var(--fontSize2) solid #EBEDF0;
}
.popup-slot {
height: calc(100% - var(--fontSize214));
}
.popup-slot.isFullSucreen {
height: calc(100% - var(--fontSize282));
}
.popup-slot.isFullSucreen-notitle {
height: calc(100% - var(--fontSize184));
}
.popup-footer {
display: flex;
align-items: center;
justify-content: space-between;
padding: var(--fontSize20) 0;
}
.popup-footer.isFullSucreen {
padding-bottom: var(--fontSize68) !important;
}
.popup-footer .btn {
width: var(--fontSize330);
height: var(--fontSize80);
box-sizing: border-box;
border-radius: var(--fontSize12);
font-size: var(--fontSize32);
}
.popup-footer .cancel {
/* color: #323233;
border: var(--fontSize2) solid #DCDEE0; */
color: #292D33;
background: #F7F8FA;
}
.popup-footer .confirm {
background: #347BFF;
color: #fff;
}
@keyframes show-popup {
0% {
bottom: -100%;
}
100% {
bottom: 0;
}
}
\ No newline at end of file \ No newline at end of file
<popup <popup title="添加其他商业险" show="{{show}}" bindconfirm="confirm" height="85%">
title="添加其他商业险"
show="{{show}}"
bindconfirm="confirm"
height="85%">
<view class="popBox"> <view class="popBox">
<view class="title">商业险名称</view> <view class="title">商业险名称</view>
<van-field <van-field class="inputBox" border="{{false}}" value="{{typeName}}" data-attrType="vehiclesAndVessels" data-attrName="typeName" placeholder="请输入" bindinput="handleInput" />
class="inputBox"
border="{{false}}"
value="{{typeName}}"
data-attrType="vehiclesAndVessels"
data-attrName="typeName"
placeholder="请输入"
bindinput="handleInput" />
<view class="title">险种保额</view> <view class="title">险种保额</view>
<van-field <van-field class="inputBox" border="{{false}}" value="{{compensation}}" data-attrType="vehiclesAndVessels" data-attrName="compensation" placeholder="请输入险种保额" bindinput="handleInput" />
class="inputBox"
border="{{false}}"
value="{{compensation}}"
data-attrType="vehiclesAndVessels"
data-attrName="compensation"
placeholder="请输入险种保额"
bindinput="handleInput" />
<view class="title">保费</view> <view class="title">保费</view>
<van-field <van-field class="inputBox" type="digit" border="{{false}}" value="{{payPrice}}" data-type='number' data-attrType="vehiclesAndVessels" data-attrName="payPrice" placeholder="请输入保费" bindinput="handleInput">
class="inputBox"
type="digit"
border="{{false}}"
value="{{payPrice}}"
data-type='number'
data-attrType="vehiclesAndVessels"
data-attrName="payPrice"
placeholder="请输入保费"
type="digit"
bindinput="handleInput">
<view slot="left-icon"> <view slot="left-icon">
<view>¥</view> <view>¥</view>
</view> </view>
</van-field> </van-field>
</view> </view>
</popup> </popup>
\ No newline at end of file \ No newline at end of file
// packageEquity/pages/carQuotation/components/zyPayPopup/zyPayPopup.js
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/'
import api from '~/api/api.js'
Component({
/**
* 组件的属性列表
*/
options: {
styleIsolation: 'shared', // 自定义覆盖vant样式
},
properties: {
show: Boolean,
isListShow: Boolean
},
/**
* 组件的初始数据
*/
data: {
IMG_URL,
showChangeFileType: false,
fileList: []
},
/** 组件生命周期 */
lifetimes: {
attached: function () {
}
},
/**
* 组件的方法列表
*/
methods: {
noScroll() { },
selectUplaodType() {
this.setData({
showChangeFileType: true
})
},
uploadImages() {
let _this = this
let { fileList } = _this.data
wx.chooseImage({
count: 1,
success(res) {
let [tempFiles] = res.tempFilePaths
let imgType = tempFiles.split('.')[1]
let type = imgType == 'unknown' ? 'jpg' : imgType
_this.setData({
loadingFlag: true
})
wx.getFileSystemManager().readFile({
filePath: tempFiles, //选择图片返回的相对路径
encoding: 'base64', //编码格式
success(_res) {
api.uploadImg({
file: `${type}@${_res.data}`
}).then(img => {
_this.setData({
loadingFlag: false
})
let { code, data, message } = img
if (code == 0) {
fileList.push({url: data})
_this.setData({
fileList,
showChangeFileType: false,
fileType: 'image'
})
} else {
wx.$util.showToast(message)
}
})
},
fail() {
_this.setData({
loadingFlag: false
})
}
})
}
})
},
// 图片预览
previewImage(e) {
let { url, index } = e.currentTarget.dataset
wx.previewImage({
urls: url,
current: url[index]
})
},
uploadPDFs() {
let _this = this
let { fileList } = _this.data
wx.chooseMessageFile({
count: 1,
type: 'file',
extension: ['pdf'],
success(res) {
// 正确获取选择的文件
let tempFile = res.tempFiles[0]
let fileName = tempFile.name // 获取文件名
let fileType = fileName.split('.').pop() // 获取文件扩展名
// 读取文件
if (fileType != 'pdf') return wx.$util.showToast('只可上传pdf类型文件')
_this.setData({
loadingFlag: true
})
wx.getFileSystemManager().readFile({
filePath: tempFile.path, // 使用正确的路径
encoding: 'base64',
success(_res) {
// 调用上传接口
api.uploadPdfAPI({
file: `${fileType}@${_res.data}` // 处理文件类型
}).then(img => {
_this.setData({
loadingFlag: false
})
let { code, data, message } = img;
if (code == 0) {
fileList.push({ url: data, fileName: fileName }); // 添加到文件列表
_this.setData({
fileList,
showChangeFileType: false,
fileType: 'pdf' // 设置文件类型为 pdf
});
} else {
wx.$util.showToast(message);
}
});
},
fail(err) {
_this.setData({
loadingFlag: false
})
console.error('读取文件失败', err);
}
});
},
fail(err) {
console.error('选择文件失败', err);
}
})
},
deleteFile(e) {
this.setData({
fileList: []
})
},
closeChangeUploadType() {
this.setData({showChangeFileType: false})
},
close() {
let { isListShow } = this.data
if (isListShow) return this.setData({show: false, fileList: []})
let thisPage = wx.$router.getPageInstance()
thisPage.setData({
['orderInfo.zyPayUrl']: '',
confirmStatus: false
})
thisPage.handleSecondConfirm('cancel')
},
confirm(e) {
let { fileList, isListShow } = this.data
let thisPage = wx.$router.getPageInstance()
if (fileList.length) {
if (isListShow) {
this.triggerEvent('confirm', {zyPayUrl: fileList.map(item => item.url)[0]})
} else {
thisPage.setData({
['orderInfo.zyPayUrl']: fileList.map(item => item.url)[0],
confirmStatus: false
})
thisPage.handleSecondConfirm()
}
} else {
wx.$util.showToast('请上传延保协议')
}
}
}
})
\ No newline at end of file \ No newline at end of file
{
"component": true,
"usingComponents": {
"popup": "../Popup/Popup",
"van-loading": "@vant/weapp/loading/index"
}
}
\ No newline at end of file \ No newline at end of file
/* packageEquity/pages/carQuotation/components/zyPayPopup/zyPayPopup.wxss */
.content {
padding-bottom: var(--fontSize40);
}
.tips-text{
display: flex;
align-items: center;
padding: var(--fontSize40) 0 var(--fontSize32) 0;
font-size: var(--fontSize28);
color: #222222;
image{
width: var(--fontSize32);
height: var(--fontSize32);
margin-right: var(--fontSize12);
}
}
.upload_content{
width: var(--fontSize192);
height: var(--fontSize192);
background: #F5F5F7;
border-radius: var(--fontSize8);
display: flex;
flex-flow: column;
align-items: center;
justify-content: center;
image{
width: var(--fontSize40);
height: var(--fontSize40);
}
.text{
font-size: var(--fontSize24);
color: #9B9B9E;
margin-top: var(--fontSize20);
}
}
.image_content{
display: inline-block;
position: relative;
.image_box{
width: var(--fontSize192);
height: var(--fontSize192);
}
.del_icon{
width: var(--fontSize36);
height: var(--fontSize36);
position: absolute;
top: 0;
right: 0;
}
}
.file_content {
width: 100%;
height: var(--fontSize112);
background: #F5F5F7;
border-radius: var(--fontSize8);
display: flex;
align-items: center;
justify-content: space-between;
.file_box{
display: flex;
align-items: center;
.pdf_icon{
width: var(--fontSize72);
height: var(--fontSize72);
margin: 0 var(--fontSize24);
}
.file_name{
font-size: var(--fontSize28);
color: #222222;
width: var(--fontSize500);
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
}
.del_icon{
margin-right: var(--fontSize24);
width: var(--fontSize40);
height: var(--fontSize40);
}
}
.popup-content{
display: flex;
flex-flow: column;
align-items: center;
justify-content: center;
.title{
margin-top: var(--fontSize24);
font-size: var(--fontSize24);
color: #9B9B9E;
}
.popup-item{
font-size: var(--fontSize32);
color: #222222;
font-weight: 500;
width: 100%;
height: var(--fontSize112);
text-align: center;
line-height: var(--fontSize112);
border-bottom: var(--fontSize1) solid #EBEDF0;
}
}
.loading-box{
background-color: rgba(0, 0, 0, 0.7);
.van-loading__text{
color: #FFFFFF !important;
}
}
\ No newline at end of file \ No newline at end of file
<!--packageEquity/pages/carQuotation/components/zyPayPopup/zyPayPopup.wxml-->
<glsx-privacy appletName="生意助手员工版" bind:agreeClick="agreeClick" bind:disagreeClick="disagreeClick"></glsx-privacy>
<block wx:if="{{!showChangeFileType && !loadingFlag}}">
<popup
title="{{'上传延保协议'}}"
show="{{show}}"
bindconfirm="confirm"
bindcancel="close"
cancelText="稍后补录"
cancelStyle="color: #347BFF;"
notCloseOnClickOverlay="{{true}}"
height="auto">
<view class="content">
<block wx:if="{{!fileList.length}}">
<view class="tips-text"><image src="{{IMG_URL}}zy_tips_icon.png"></image>事系提成核算,务必提供</view>
<view class="upload_content" bindtap="selectUplaodType">
<image src="{{IMG_URL}}zy-upload_icon.png"></image>
<text class="text">图片或PDF</text>
</view>
</block>
<block wx:else>
<view class="tips-text">已上传</view>
<block wx:if="{{fileType == 'image'}}">
<view class="image_content" wx:for="{{fileList}}" wx:key="index">
<image bindtap="previewImage" class="image_box" data-url="{{[item.url]}}" data-index="{{index}}" src="{{item.url}}"/>
<image class="del_icon" src="{{IMG_URL}}zy_del_icon.png" mode="" bindtap="deleteFile"/>
</view>
</block>
<block wx:else>
<view class="file_content" wx:for="{{fileList}}" wx:key="index">
<view class="file_box">
<image class="pdf_icon" src="{{IMG_URL}}zy_upload_pdf.png" mode=""/>
<text class="file_name">{{item.fileName}}</text>
</view>
<image class="del_icon" src="{{IMG_URL}}zy_paf_del_icon.png" mode="" bindtap="deleteFile"/>
</view>
</block>
</block>
</view>
</popup>
</block>
<block wx:if="{{showChangeFileType && !loadingFlag}}">
<van-popup
class="file-type-popup"
show="{{show}}"
position="bottom"
bind:close="closeChangeUploadType"
round
>
<view class="popup-content">
<view class="title">请选择</view>
<view class="popup-item" bindtap="uploadImages">上传图片</view>
<view class="popup-item" bindtap="uploadPDFs">上传PDF</view>
</view>
</van-popup>
</block>
<block wx:if="{{loadingFlag}}">
<van-popup show="{{show}}" close-on-click-overlay="{{false}}" >
<van-loading custom-class="loading-box" color="#FFFFFF" type="spinner" size="45px" vertical>上传中</van-loading>
</van-popup>
</block>
...@@ -100,7 +100,8 @@ Page({ ...@@ -100,7 +100,8 @@ Page({
// vin二次确认弹窗 // vin二次确认弹窗
showVinDialog: false, showVinDialog: false,
secFormData: {}, secFormData: {},
tempVin: '' tempVin: '',
showZyPopup: false // 上传延保协议弹窗
}, },
closeTips() { closeTips() {
this.setData({ this.setData({
...@@ -305,9 +306,9 @@ Page({ ...@@ -305,9 +306,9 @@ Page({
}); });
}, },
async handleSecondConfirm() { async handleSecondConfirm(e) {
// debugger // debugger
let { orderInfo, outTradeNo, confirmStatus, userInfo } = this.data; let { orderInfo, outTradeNo, confirmStatus, userInfo, carBrandList } = this.data;
let staffCheck = await this.staffDailyReportMerchantValid(userInfo); let staffCheck = await this.staffDailyReportMerchantValid(userInfo);
if (staffCheck) return false;; if (staffCheck) return false;;
...@@ -364,7 +365,7 @@ Page({ ...@@ -364,7 +365,7 @@ Page({
// ------- // -------
wx.showLoading("报价中..."); wx.showLoading("报价中...");
let result = await this.handleSecondConfirmCheck(true); let result = await this.handleSecondConfirmCheck(true, e);
let { code, data: id, message } = result; let { code, data: id, message } = result;
console.log(result); console.log(result);
...@@ -395,8 +396,18 @@ Page({ ...@@ -395,8 +396,18 @@ Page({
} else { } else {
console.log(message); console.log(message);
wx.hideLoading(); wx.hideLoading();
// 将延保协议弹窗关闭 清空延保协议上传内容,支付凭证内容清空
let owner = this.getOwnerInfo();
if (orderInfo.payType == 2 && carBrandList?.includes(owner?.carChildsBrandId)) {
this.setData({ this.setData({
confirmStatus: false, showZyPopup: false,
['orderInfo.zyPayUrl']: '',
['orderInfo.transactionNo']: '',
['orderInfo.paymentDocList']: []
})
}
this.setData({
confirmStatus: false
}); });
wx.$util.showToast(message || "报价失败"); wx.$util.showToast(message || "报价失败");
} }
...@@ -470,7 +481,8 @@ Page({ ...@@ -470,7 +481,8 @@ Page({
} }
return owner; return owner;
}, },
handleSecondConfirmCheck(check) { handleSecondConfirmCheck(check, detail) {
let { carBrandList } = this.data
// 获取保险信息 // 获取保险信息
let orderInfo = this.getInsurance(); let orderInfo = this.getInsurance();
let owner = this.getOwnerInfo(); let owner = this.getOwnerInfo();
...@@ -479,9 +491,18 @@ Page({ ...@@ -479,9 +491,18 @@ Page({
orderInfo.check = check; orderInfo.check = check;
orderInfo.paymentDocList = orderInfo.paymentDocList || []; orderInfo.paymentDocList = orderInfo.paymentDocList || [];
console.log("orderInfo", orderInfo); console.log("orderInfo", orderInfo);
// debugger // 门店收款且是智界/享界车型 弹出上传延保协议
try { try {
return new Promise(async (resolve, reject) => { return new Promise(async (resolve, reject) => {
// 当延保协议弹窗点击稍后补录会传值detail:cancel, 提交表单时不会重复弹出延保协议弹出
if (check && orderInfo.payType == 2 && carBrandList?.includes(orderInfo?.owner?.carChildsBrandId) && detail != 'cancel' && !orderInfo?.zyPayUrl) {
wx.hideLoading()
this.setData({
showPopup: false
})
reject()
return this.setData({showZyPopup: true})
}
// let { orderInfo } = this.data // let { orderInfo } = this.data
console.log("调接口---"); console.log("调接口---");
// 标记错误--补录订单 // 标记错误--补录订单
...@@ -699,6 +720,15 @@ Page({ ...@@ -699,6 +720,15 @@ Page({
}); });
}); });
}, },
// 获取智界、享界车系id
async getCarBrandList() {
const {
carBrandList
} = await wx.$util.getMockData()
this.setData({
carBrandList
})
},
// 不需要检验 存草稿 // 不需要检验 存草稿
async handleEditSave() { async handleEditSave() {
...@@ -934,6 +964,7 @@ Page({ ...@@ -934,6 +964,7 @@ Page({
firstEnter: false firstEnter: false
}); });
this.orderSettingList() this.orderSettingList()
this.getCarBrandList()
}, },
setCustomerInfo(customerInfo) { setCustomerInfo(customerInfo) {
let { owner, orderInfo } = this.data; let { owner, orderInfo } = this.data;
......
...@@ -4,7 +4,8 @@ ...@@ -4,7 +4,8 @@
"first-step": "../components/FirstStep/FirstStep", "first-step": "../components/FirstStep/FirstStep",
"second-step": "../components/SecondStepSimple/SecondStep", "second-step": "../components/SecondStepSimple/SecondStep",
"order-popup": "../components/OrderPopup/OrderPopup", "order-popup": "../components/OrderPopup/OrderPopup",
"vin-sec-dialog": "../components/VinSecDialog/VinSecDialog" "vin-sec-dialog": "../components/VinSecDialog/VinSecDialog",
"zy-pay-popup": "../components/zyPayPopup/zyPayPopup"
}, },
"navigationStyle": "custom" "navigationStyle": "custom"
} }
...@@ -28,3 +28,5 @@ ...@@ -28,3 +28,5 @@
<order-popup orderType="{{orderInfo.payType }}" resetTransNo="{{orderInfo.transactionNo || orderInfo.outTradeNo}}" resetOrder="{{orderInfo.resetOrder}}" wx:if="{{showPopup}}" show="{{showPopup}}" /> <order-popup orderType="{{orderInfo.payType }}" resetTransNo="{{orderInfo.transactionNo || orderInfo.outTradeNo}}" resetOrder="{{orderInfo.resetOrder}}" wx:if="{{showPopup}}" show="{{showPopup}}" />
<!-- vin二次复核 --> <!-- vin二次复核 -->
<vin-sec-dialog wx:if="{{showVinDialog}}" showVinDialog="{{showVinDialog}}" secFormData="{{secFormData}}" bindonClose="handleSecClose" bindonConfirm="handleSecConfirm"></vin-sec-dialog> <vin-sec-dialog wx:if="{{showVinDialog}}" showVinDialog="{{showVinDialog}}" secFormData="{{secFormData}}" bindonClose="handleSecClose" bindonConfirm="handleSecConfirm"></vin-sec-dialog>
<!-- 上传延保协议 -->
<zy-pay-popup show="{{showZyPopup}}" wx:if="{{showZyPopup}}"></zy-pay-popup>
\ No newline at end of file \ No newline at end of file
...@@ -6,6 +6,8 @@ import { ...@@ -6,6 +6,8 @@ import {
merchantMode, merchantMode,
orderStatistics, orderStatistics,
cancelOrderById, cancelOrderById,
getQuotationInfoById,
updateCustomerInfo
} from "../../../api"; } from "../../../api";
import { checkDailyReport } from "~/store/ModalToQueueControl"; import { checkDailyReport } from "~/store/ModalToQueueControl";
import data from "../constant/data"; import data from "../constant/data";
...@@ -112,7 +114,7 @@ Component({ ...@@ -112,7 +114,7 @@ Component({
"已完成", "已完成",
"战败", "战败",
], ],
tabListSimple: ["全部", "待报价", "待支付", "已支付", "已完成", "战败"], tabListSimple: ["全部", "待报价", "待支付", "已支付", "已完成", "战败", "待上传协议"],
tabList: ["全部", "待报价", "待确认", "待支付", "已支付", "已完成", "战败"], tabList: ["全部", "待报价", "待确认", "待支付", "已支付", "已完成", "战败"],
tabListTemplate: [ tabListTemplate: [
"全部", "全部",
...@@ -144,7 +146,8 @@ Component({ ...@@ -144,7 +146,8 @@ Component({
showRendering: false, showRendering: false,
repealVisible: false, repealVisible: false,
repealReason: '', repealReason: '',
repealId: '' repealId: '',
zyPayStatus: '' // 延保协议状态
}, },
observers: { observers: {
mode: function (value) { mode: function (value) {
...@@ -209,7 +212,7 @@ Component({ ...@@ -209,7 +212,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()
...@@ -300,7 +303,8 @@ Component({ ...@@ -300,7 +303,8 @@ Component({
userInfo, userInfo,
storeInfo, storeInfo,
nothing, nothing,
staffUuid staffUuid,
zyPayStatus
} = this.data, } = this.data,
{ screenForm } = this, { screenForm } = this,
merchantId = ""; merchantId = "";
...@@ -314,6 +318,7 @@ Component({ ...@@ -314,6 +318,7 @@ Component({
customerName, customerName,
orderStatus, orderStatus,
merchantId, merchantId,
zyPayStatus
}; };
if (!userInfo.isSuper && userInfo.loginRole != 3) { if (!userInfo.isSuper && userInfo.loginRole != 3) {
...@@ -417,23 +422,39 @@ Component({ ...@@ -417,23 +422,39 @@ Component({
this.filterTag = false; this.filterTag = false;
return; return;
} }
if (this.screenForm && e.orderStatus) { // 筛选页只会存在订单状态
if (this.screenForm && e.orderStatus && !e.zyPayStatus) {
this.screenForm.orderStatus = e.orderStatus; this.screenForm.orderStatus = e.orderStatus;
this.filterTag = true; this.filterTag = true;
setTimeout(() => { setTimeout(() => {
this.filterTag = false; this.filterTag = false;
}, 500); }, 500);
} else if (this.screenForm && !e.orderStatus && !tabIndex) { } else if (this.screenForm && !e.orderStatus && !tabIndex && !e.zyPayStatus) {
this.screenForm.orderStatus = ""; this.screenForm.orderStatus = "";
this.filterTag = false; this.filterTag = false;
} else if (this.screenForm && !e.orderStatus && tabIndex) { } else if (this.screenForm && !e.orderStatus && tabIndex && !e.zyPayStatus) {
this.screenForm.orderStatus = orderStatus; this.screenForm.orderStatus = orderStatus;
this.filterTag = false; this.filterTag = false;
} }
// 筛选页只会存在延保协议状态
if (this.screenForm && e.zyPayStatus && !e.orderStatus) {
this.screenForm.zyPayStatus = e.zyPayStatus
this.filterTag = true;
setTimeout(() => {
this.filterTag = false;
}, 500);
} else if (this.screenForm && e.detail == (tabList?.length - 1) && !e.zyPayStatus && !e.orderStatus) {
this.screenForm.zyPayStatus = 1
this.filterTag = false;
} else if (this.screenForm && e.detail != (tabList?.length - 1) && !e.zyPayStatus && !e.orderStatus) {
this.screenForm.zyPayStatus = ''
this.filterTag = false;
}
this.setData({ this.setData({
tabIndex, tabIndex,
orderStatus, orderStatus,
currentPage: 1, currentPage: 1,
zyPayStatus: e.detail == (tabList?.length - 1) && !e.zyPayStatus ? 1 : e.zyPayStatus ? e.zyPayStatus : '', // 当tab选中最后一项或筛选页面存在值
list: [] list: []
}); });
this.search(); this.search();
...@@ -443,6 +464,10 @@ Component({ ...@@ -443,6 +464,10 @@ Component({
async handleClickBtn(e) { async handleClickBtn(e) {
let { target, type } = e.currentTarget.dataset; let { target, type } = e.currentTarget.dataset;
console.log(target); console.log(target);
// 上传延保协议
if (target?.zyPayStatus == '1' && type == 'upload') {
return this.setData({showZyPayPopup: true, showZyTarget: target})
}
// wx.$router.go('createOrderCarQuotation', { // wx.$router.go('createOrderCarQuotation', {
// id: target.id // id: target.id
// }) // })
...@@ -533,6 +558,35 @@ Component({ ...@@ -533,6 +558,35 @@ Component({
id: target.id, id: target.id,
}); });
}, },
getInsurance(res) {
let obj = wx.$util.deepClone(res), orderInfo = {};
let { default4SStoreInfo } = wx.$util.getUserInfo();
orderInfo.check = true
orderInfo.id = obj.id
orderInfo.orderId = obj.orderId
orderInfo.merchantId4s = default4SStoreInfo?.merchantId;
orderInfo.merchantName4s = default4SStoreInfo?.merchantName;
orderInfo.referrer = obj.referrer
orderInfo.referrerId = obj.referrerId
return orderInfo;
},
// 延保协议上传确定
zyPayConfirm(e) {
let { showZyTarget } = this.data
getQuotationInfoById({
id: showZyTarget?.id
}).then(res => {
let orderInfo = this.getInsurance(res.data)
// 更新客户信息
updateCustomerInfo({...orderInfo, zyPayUrl: e.detail?.zyPayUrl}).then(result => {
this.setData({
showZyPayPopup: false
}, () => {
this.search()
})
})
})
},
remarkCancel() { remarkCancel() {
this.setData({ this.setData({
showRemark: false, showRemark: false,
...@@ -870,12 +924,13 @@ Component({ ...@@ -870,12 +924,13 @@ Component({
}, },
showConfirm() { showConfirm() {
const thisPage = wx.$router.getPageInstance(); const thisPage = wx.$router.getPageInstance();
let { orderStatus } = this.data let { orderStatus, zyPayStatus } = this.data
thisPage.setData({ thisPage.setData({
showScreen: true, showScreen: true,
showOrderRendering: true, showOrderRendering: true,
show_order_confirm: true, show_order_confirm: true,
orderStatus orderStatus,
zyPayStatus
}); });
}, },
searchScreen(e) { searchScreen(e) {
...@@ -890,10 +945,14 @@ Component({ ...@@ -890,10 +945,14 @@ Component({
tabIndex = tabList.findIndex((item) => item.text == name); tabIndex = tabList.findIndex((item) => item.text == name);
if (tabIndex == -1) tabIndex = 0; if (tabIndex == -1) tabIndex = 0;
} }
if (e.detail.zyPayStatus && e.detail.zyPayStatus[0] == 1) {
tabIndex = tabList?.length - 1
}
this.filterTag = false; this.filterTag = false;
this.tabClick({ this.tabClick({
detail: tabIndex, detail: tabIndex,
orderStatus: e.detail.orderStatus, orderStatus: e.detail.orderStatus,
zyPayStatus: e.detail.zyPayStatus
}); });
}, },
/**获取门店主营品牌 */ /**获取门店主营品牌 */
......
{ {
"component": true, "component": true,
"usingComponents": { "usingComponents": {
"order-screen": "../components/OrderScreen/OrderScreen" "order-screen": "../components/OrderScreen/OrderScreen",
"zy-pay-popup": "../components/zyPayPopup/zyPayPopup"
} }
} }
\ No newline at end of file \ No newline at end of file
...@@ -89,8 +89,11 @@ ...@@ -89,8 +89,11 @@
</view> </view>
</block> </block>
<view class="header-status"> <view class="header-status">
<!-- 0待报价、1待确认、2待支付、3已支付、-1战败 5已完成(已签名)6已退款 --> <!-- 待上传延保协议且是已支付的订单 -->
<!-- == '3' --> <block wx:if="{{item.zyPayStatus == 1 && (item.orderStatus == 3 || item.orderStatus == 4)}}">
<view class="default-txt">待上传</view>
</block>
<block wx:else>
<view wx:if="{{ item.orderStatus == '3'||item.orderStatus =='5' }}"> <view wx:if="{{ item.orderStatus == '3'||item.orderStatus =='5' }}">
<span class="green-txt">{{orderStatusObj[item.orderStatus]}}</span> <span class="green-txt">{{orderStatusObj[item.orderStatus]}}</span>
<!-- <span class="header-price">¥ {{item.quotedPriceUpdate || ''}}</span> --> <!-- <span class="header-price">¥ {{item.quotedPriceUpdate || ''}}</span> -->
...@@ -100,6 +103,7 @@ ...@@ -100,6 +103,7 @@
<!-- <span class="header-price">¥ {{item.quotedPriceUpdate || ''}}</span> --> <!-- <span class="header-price">¥ {{item.quotedPriceUpdate || ''}}</span> -->
</view> </view>
<view wx:else class="{{ item.orderStatus == '-1' ? 'red-txt' : 'default-txt' }}">{{orderStatusObj[item.orderStatus] || '--'}}</view> <view wx:else class="{{ item.orderStatus == '-1' ? 'red-txt' : 'default-txt' }}">{{orderStatusObj[item.orderStatus] || '--'}}</view>
</block>
</view> </view>
</view> </view>
<!-- 内容 --> <!-- 内容 -->
...@@ -189,6 +193,15 @@ ...@@ -189,6 +193,15 @@
<view class="item-footer"> <view class="item-footer">
<!-- 超管isSuper/商户类型 userType 1账号不可操作 --> <!-- 超管isSuper/商户类型 userType 1账号不可操作 -->
<block wx:if="{{ !userInfo.isSuper && userInfo.userType == 2||staffUuid }}"> <block wx:if="{{ !userInfo.isSuper && userInfo.userType == 2||staffUuid }}">
<block wx:if="{{ item.zyPayStatus == 1 && (item.orderStatus == 3 || item.orderStatus == 4) }}">
<view class="btn_class">
<block wx:if="{{ item.orderStatus != '0' }}">
<view class="order-btn default-btn padding_20" bindtap="jumpReception" data-item="{{ item }}">接待记录</view>
</block>
<view class="order-btn" bindtap="handleClickBtn" data-target="{{ item }}" data-type="upload">上传协议</view>
</view>
</block>
<block wx:else>
<view wx:if="{{ item.orderStatus != '4' && item.orderStatus!=11&& item.orderStatus!=9 }}" class="btn_class"> <view wx:if="{{ item.orderStatus != '4' && item.orderStatus!=11&& item.orderStatus!=9 }}" class="btn_class">
<block wx:if="{{ item.orderStatus != '0' }}"> <block wx:if="{{ item.orderStatus != '0' }}">
<view class="order-btn default-btn padding_20" bindtap="jumpReception" data-item="{{ item }}">接待记录</view> <view class="order-btn default-btn padding_20" bindtap="jumpReception" data-item="{{ item }}">接待记录</view>
...@@ -211,9 +224,10 @@ ...@@ -211,9 +224,10 @@
</block> </block>
</view> </view>
</block> </block>
</block>
</view> </view>
<!-- <view class="tipsCon"> --> <!-- <view class="tipsCon"> -->
<block wx:if="{{ !staffUuid }}"> <block wx:if="{{ !staffUuid && item.zyPayStatus != 1 }}">
<view wx:if="{{ (item.orderStatus == '3' && item.equityOrderStatus == '0' && item.equityGoodsFlag == '1' ) || (item.orderStatus == '5' && item.equityOrderStatus == '0') }}" class="orange-txt tipsCon"> <view wx:if="{{ (item.orderStatus == '3' && item.equityOrderStatus == '0' && item.equityGoodsFlag == '1' ) || (item.orderStatus == '5' && item.equityOrderStatus == '0') }}" class="orange-txt tipsCon">
<image class="icon-info" src="/packageEquity/images/icon-info.png"></image> <image class="icon-info" src="/packageEquity/images/icon-info.png"></image>
订单已支付,未录入权益合同 订单已支付,未录入权益合同
...@@ -295,3 +309,4 @@ ...@@ -295,3 +309,4 @@
</view> </view>
</view> </view>
</view> </view>
<zy-pay-popup wx:if="{{showZyPayPopup}}" isListShow="{{true}}" show="{{showZyPayPopup}}" bindconfirm="zyPayConfirm"></zy-pay-popup>
\ No newline at end of file \ No newline at end of file
...@@ -26,17 +26,17 @@ page { ...@@ -26,17 +26,17 @@ page {
padding-bottom: var(--fontSize30); padding-bottom: var(--fontSize30);
} }
.box .remark_box{ .box .remark_box {
padding: var(--fontSize20); padding: var(--fontSize20);
} }
.box .remark_box .label{ .box .remark_box .label {
font-size: var(--fontSize28); font-size: var(--fontSize28);
color: #292D33; color: #292D33;
margin: var(--fontSize20) 0 var(--fontSize24) var(--fontSize20); margin: var(--fontSize20) 0 var(--fontSize24) var(--fontSize20);
} }
.box .remark_box .textArea_box{ .box .remark_box .textArea_box {
font-size: var(--fontSize28); font-size: var(--fontSize28);
background: #F7F8FA; background: #F7F8FA;
border: var(--fontSize2) solid #EFF0F2; border: var(--fontSize2) solid #EFF0F2;
...@@ -44,12 +44,12 @@ page { ...@@ -44,12 +44,12 @@ page {
padding: var(--fontSize24); padding: var(--fontSize24);
} }
.box .remark_box .textArea_box .textarea{ .box .remark_box .textArea_box .textarea {
height: var(--fontSize130); height: var(--fontSize130);
width: 100%; width: 100%;
} }
.box .remark_box .textArea_box .currentWordNumber{ .box .remark_box .textArea_box .currentWordNumber {
color: #BEC1C7; color: #BEC1C7;
text-align: right; text-align: right;
} }
...@@ -260,6 +260,7 @@ page { ...@@ -260,6 +260,7 @@ page {
z-index: 99; z-index: 99;
flex-direction: column; flex-direction: column;
} }
.btns-con { .btns-con {
box-sizing: border-box; box-sizing: border-box;
display: flex; display: flex;
...@@ -340,6 +341,7 @@ page { ...@@ -340,6 +341,7 @@ page {
line-height: var(--fontSize80); line-height: var(--fontSize80);
text-align: right; text-align: right;
} }
.picker .arrow { .picker .arrow {
width: var(--fontSize28); width: var(--fontSize28);
height: var(--fontSize26); height: var(--fontSize26);
......
...@@ -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
......
<!--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>
......
...@@ -9,7 +9,7 @@ import { ...@@ -9,7 +9,7 @@ import {
getReceptionRecordList, getReceptionRecordList,
getRecordDetailList getRecordDetailList
} from "../../receptionRecordsApi" } from "../../receptionRecordsApi"
let lastPath = null; // 用于存储上一次的路径
function throttle(func, delay) { function throttle(func, delay) {
let timeoutId; let timeoutId;
let lastExecTime = 0; let lastExecTime = 0;
...@@ -168,12 +168,13 @@ Component({ ...@@ -168,12 +168,13 @@ Component({
menuText: "培训资料", menuText: "培训资料",
icon: "peixun_icon", icon: "peixun_icon",
path: "packageEquity.trainingMaterials", path: "packageEquity.trainingMaterials",
}, ], },],
loginRoleLabel: { loginRoleLabel: {
1: "超管", 1: "超管",
2: "商户管理员", 2: "商户管理员",
3: "区域督导", 3: "区域运营",
4: "驻店负责人", 4: "驻店负责人",
5: '广联销售',
}, },
loginRole: "", loginRole: "",
userInfo: {}, userInfo: {},
...@@ -388,7 +389,7 @@ Component({ ...@@ -388,7 +389,7 @@ Component({
if (menuList.some((item) => item.menuText == "战败下单" && mode == 0)) { if (menuList.some((item) => item.menuText == "战败下单" && mode == 0)) {
menuList = menuList.filter((item) => item.menuText != "战败下单"); menuList = menuList.filter((item) => item.menuText != "战败下单");
} }
console.log('menuList', mode, menuList, ); console.log('menuList', mode, menuList,);
// 将menuList排序 // 将menuList排序
menuList.sort((a, b) => a.sortVal - b.sortVal) menuList.sort((a, b) => a.sortVal - b.sortVal)
this.setData({ this.setData({
...@@ -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",
...@@ -539,6 +540,27 @@ Component({ ...@@ -539,6 +540,27 @@ Component({
let index = menuList?.findIndex((val) => val.menuText == "交车目标"); let index = menuList?.findIndex((val) => val.menuText == "交车目标");
index > -1 && menuList.splice(index, 1); index > -1 && menuList.splice(index, 1);
} }
// 督导和销售
if ((userInfo?.loginRole == 3 || userInfo?.loginRole == 5) && menuList.every((item) => item.menuText != '工作日报')) {
menuList.push({
menuText: "工作日报",
path: "tabWorkOrder.supervisorDaily",
icon: "supervisorDaily",
})
}
if (
(userInfo?.isSuper ||
userInfo?.loginRole == 3 ||
userInfo.loginRole == 5) &&
menuList.every((item) => item.menuText != "驻店管理")
) {
menuList.push({
menuText: "驻店管理",
path: "tabWorkOrder.residentManage",
recordId: 13,
icon: "residentManage"
});
}
this.checkIsPadOrNot(); this.checkIsPadOrNot();
this.getData(); this.getData();
// 隐藏待办事项模块 // 隐藏待办事项模块
...@@ -569,7 +591,7 @@ Component({ ...@@ -569,7 +591,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: "接待记录",
...@@ -820,7 +842,7 @@ Component({ ...@@ -820,7 +842,7 @@ Component({
}); });
} }
}) })
.catch((err) => {}); .catch((err) => { });
}, },
getStaffTargetTask() { getStaffTargetTask() {
return new Promise(resolve => { return new Promise(resolve => {
...@@ -828,7 +850,7 @@ Component({ ...@@ -828,7 +850,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,
...@@ -871,7 +893,7 @@ Component({ ...@@ -871,7 +893,7 @@ Component({
.setTaskDialog({ .setTaskDialog({
id: data[0]?.id, id: data[0]?.id,
}) })
.then(() => {}); .then(() => { });
} }
} else { } else {
wx.$util.showToast(message); wx.$util.showToast(message);
...@@ -991,6 +1013,7 @@ Component({ ...@@ -991,6 +1013,7 @@ Component({
// } // }
// }, // },
navGo: throttle(async function (e) { navGo: throttle(async function (e) {
// debugger
// wx.$util.showLoading('跳转中...') // wx.$util.showLoading('跳转中...')
let { let {
mode, mode,
...@@ -1001,6 +1024,16 @@ Component({ ...@@ -1001,6 +1024,16 @@ Component({
item item
} = e.currentTarget.dataset; } = e.currentTarget.dataset;
let userInfo = wx.$util.getUserInfo(); let userInfo = wx.$util.getUserInfo();
// 如果 item.path 相同,则不执行后续跳转
if (item.path === lastPath) {
console.log('路径一样');
return; // 直接返回,不执行后续逻辑
}
// 解决路径不清空问题
setTimeout(() => {
lastPath = null
}, 2000)
lastPath = item.path; // 更新上一次的路径
if (item.path) { if (item.path) {
if (item.menuText == "驻店目标") { if (item.menuText == "驻店目标") {
return wx.$router.go(item.path, { return wx.$router.go(item.path, {
...@@ -1327,10 +1360,10 @@ Component({ ...@@ -1327,10 +1360,10 @@ Component({
wx.$router.go('packageEquity.receptionRecords') wx.$router.go('packageEquity.receptionRecords')
wx.$track.setTrackData(0, 'see_more') wx.$track.setTrackData(0, 'see_more')
}, },
onHide(){ onHide() {
this.onPageHide() this.onPageHide()
}, },
onUnload(){ onUnload() {
this.onPageHide() this.onPageHide()
} }
}, },
......
<!--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">
...@@ -102,7 +102,7 @@ ...@@ -102,7 +102,7 @@
</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,7 +22,7 @@ Page({ ...@@ -22,7 +22,7 @@ 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', //埋点动作类型
}, },
/** /**
...@@ -30,7 +30,7 @@ Page({ ...@@ -30,7 +30,7 @@ Page({
*/ */
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>
......
...@@ -16,8 +16,9 @@ Page({ ...@@ -16,8 +16,9 @@ Page({
loginRole: { loginRole: {
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
} }
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
</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>
...@@ -25,8 +25,8 @@ ...@@ -25,8 +25,8 @@
<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':(item.loginRole == 3 || item.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?'商户':item.loginRole == 3 ? '督导' : item.loginRole == 5? '销售':item.loginRole == 4 ? '驻店' : '员工'}}
</view> </view>
</view> </view>
<view class="left"> <view class="left">
...@@ -39,8 +39,8 @@ ...@@ -39,8 +39,8 @@
</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" />
...@@ -56,9 +56,8 @@ ...@@ -56,9 +56,8 @@
</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
...@@ -113,7 +113,7 @@ ...@@ -113,7 +113,7 @@
/* border: var(--fontSize2) solid #FF9D0A; */ /* border: var(--fontSize2) solid #FF9D0A; */
background-color: #ff9d0a1a; background-color: #ff9d0a1a;
} }
/* 区域督导 */ /* 区域运营 */
.items .right .midle_3{ .items .right .midle_3{
color: #347BFF; color: #347BFF;
/* border: var(--fontSize2) solid #347BFF; */ /* border: var(--fontSize2) solid #347BFF; */
......
...@@ -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
......
...@@ -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()
......
...@@ -53,8 +53,9 @@ Page({ ...@@ -53,8 +53,9 @@ Page({
loginRoleLabel: { loginRoleLabel: {
1: '超管', 1: '超管',
2: '商户管理员', 2: '商户管理员',
3: '区域督导', 3: '区域运营',
4: '驻店负责人' 4: '驻店负责人',
5: '广联销售',
}, },
selectedSceneName: '', selectedSceneName: '',
selectedSceneDesc: '', selectedSceneDesc: '',
...@@ -178,7 +179,7 @@ Page({ ...@@ -178,7 +179,7 @@ Page({
navBarHeight navBarHeight
}) })
}, },
noScroll() {}, noScroll() { },
showWork() { showWork() {
let { let {
showWorkBox showWorkBox
...@@ -201,7 +202,7 @@ Page({ ...@@ -201,7 +202,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 +251,7 @@ Page({ ...@@ -250,7 +251,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,7 +411,7 @@ Page({ ...@@ -410,7 +411,7 @@ 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,
...@@ -435,7 +436,7 @@ Page({ ...@@ -435,7 +436,7 @@ Page({
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */
onReady: function () {}, onReady: function () { },
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
...@@ -448,22 +449,22 @@ Page({ ...@@ -448,22 +449,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({
...@@ -169,6 +169,7 @@ Page({ ...@@ -169,6 +169,7 @@ Page({
}); });
wx.hideTabBar(); wx.hideTabBar();
}, },
async jump(e) { async jump(e) {
// 订单状态 1 待跟进, 2 不升级, 3 待支付,4 已支付,6 已评价 ,9 已撤销 , 10 已关闭 , 11 已失效 // 订单状态 1 待跟进, 2 不升级, 3 待支付,4 已支付,6 已评价 ,9 已撤销 , 10 已关闭 , 11 已失效
// constructionFlag 施工标识(Y:已施工;N||null:未施工) // constructionFlag 施工标识(Y:已施工;N||null:未施工)
...@@ -692,8 +693,8 @@ Page({ ...@@ -692,8 +693,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 +705,7 @@ Page({ ...@@ -704,7 +705,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()
}, },
......
...@@ -271,8 +271,8 @@ Page({ ...@@ -271,8 +271,8 @@ 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
......
...@@ -3,9 +3,9 @@ import api from "~/api/api.js"; ...@@ -3,9 +3,9 @@ import api from "~/api/api.js";
let eventRequest = []; let eventRequest = [];
const checkDailyReport = async (sceneType) => { const checkDailyReport = async (sceneType) => {
let userInfo = wx.$util.getUserInfo(); let userInfo = wx.$util.getUserInfo();
// debugger
// 判读是否要填写日报 // 判读是否要填写日报
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(
......
...@@ -311,7 +311,7 @@ export const setWebSocket = () => { ...@@ -311,7 +311,7 @@ export const setWebSocket = () => {
} }
/** 获取园区店下的4S店 */ /** 获取园区店下的4S店 */
export const get4SStoreList = (options, isSupervision, noScene) => { // isSupervision是否是区域督导/超管 noScene登录未选场景时 export const get4SStoreList = (options, isSupervision, noScene) => { // isSupervision是否是区域运营/超管 noScene登录未选场景时
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
wx.$util.showLoading() wx.$util.showLoading()
options.sceneType = options.scene options.sceneType = options.scene
......
...@@ -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>
......
...@@ -254,8 +254,9 @@ export default { ...@@ -254,8 +254,9 @@ export default {
loginRoleLabel: { loginRoleLabel: {
1: "超管", 1: "超管",
2: "商户管理员", 2: "商户管理员",
3: "区域督导", 3: "区域运营",
4: "驻店负责人", 4: "驻店负责人",
5: '广联销售',
}, },
// 个人产值过滤条件 // 个人产值过滤条件
changeBtnData: [ changeBtnData: [
......
...@@ -222,6 +222,11 @@ module.exports = { ...@@ -222,6 +222,11 @@ module.exports = {
// return api.post('dj.api.smartcarlife.staff.daily.report.merchant.valid', data) // return api.post('dj.api.smartcarlife.staff.daily.report.merchant.valid', data)
return api.post("dj.api.smartcarlife.staff.daily.report.popup.need", data); return api.post("dj.api.smartcarlife.staff.daily.report.popup.need", data);
}, },
/** 查询4s店填写驻店日报的品牌列表 */
staffDailyReportMerchantCarBand(data) {
return api.post("dj.api.smartcarlife.staff.daily.report.car.brand", data);
},
/** 无需补录订单 */ /** 无需补录订单 */
noNeedSupplementOrder(data) { noNeedSupplementOrder(data) {
return api.post("dj.api.smartcarlife.order.noNeedSupplementOrder", data); return api.post("dj.api.smartcarlife.order.noNeedSupplementOrder", data);
...@@ -239,4 +244,29 @@ module.exports = { ...@@ -239,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),
}); });
}, },
......
...@@ -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)
...@@ -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,7 +393,7 @@ Page({ ...@@ -393,7 +393,7 @@ 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) {
...@@ -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
// const api = wx.$request
import api from "~/utils/request/request.js";
// const api = wx.$request
module.exports = {
/**驻店管理-获取4s店 */
getshopMerchantList(data) {
return api.post("dj.api.smartcarlife.scene.shopMerchant.pageList", data);
},
/**驻店管理-获取园区店 */
getyqMerchantList(data) {
return api.post('dj.api.smartcarlife.scene.yqMerchant.pageList', data)
},
/**小程序新增员工*/
createStaffAccount(data) {
let params = data || {}
return api.post('dj.api.smartcarlife.staffBaseInfo.account.add', params)
},
/** 员工日报配置列表查询 */
getDailyReportConfigList(data) {
let params = data || {};
return api.post("dj.api.smartcarlife.staff.dailyReportConfig.page", {
pageSize: 10,
...params,
});
},
/** 禁启用员工园区店账号 */
updateAccountStatus(data) {
return api.post("dj.api.smartcarlife.staffBaseInfo.accountStatus.update", data);
},
/**修改员工日报填报门店配置 */
updateDailyReportConfig(data) {
return api.post("dj.api.smartcarlife.staff.dailyReportConfig.update", data);
}
};
// packageStoreAssistant/components/Dialog/Dialog.js
Component({
options: {
multipleSlots: true
},
/**
* 组件的属性列表
*/
properties: {
show: Boolean,
confirmText: String,
cancelText: String,
showCancelButton: Boolean,
success: Boolean,
text: String
},
/**
* 组件的初始数据
*/
data: {},
/**
* 组件的方法列表
*/
methods: {
confirm() {
this.triggerEvent('confirm')
},
cancel() {
this.triggerEvent('cancel')
}
}
})
\ No newline at end of file \ No newline at end of file
{
"component": true,
"usingComponents": {
"van-dialog": "@vant/weapp/dialog/index"
}
}
\ No newline at end of file \ No newline at end of file
.dialog {
display: flex;
flex-direction: column;
align-items: center;
.icon {
color: #292d33;
font-size: 32rpx;
text-align:center;
font-weight: 500;
}
.text {
font-size: 30rpx;
color: #5a5e66;
text-align: center;
max-width: 494rpx;
line-height: 40rpx;
padding: 10rpx 0 54rpx;
}
}
\ No newline at end of file \ No newline at end of file
<van-dialog use-slot use-title-slot show="{{ show }}" show-cancel-button="{{showCancelButton}}" confirm-button-text="{{confirmText}}" cancel-button-text="{{cancelText}}" confirm-button-color="#347BFF" cancel-button-color="#1B233D" bindconfirm="confirm" bindcancel="cancel">
<view class="dialog">
<view class="icon">
温馨提示
</view>
<text class="text">
<block wx:if="{{text}}">
{{text}}
</block>
<block wx:else>
<block wx:if="{{success}}">
<slot name="success"></slot>
</block>
<block wx:else>
<slot name="error"></slot>
</block>
</block>
</text>
</view>
</van-dialog>
\ No newline at end of file \ No newline at end of file
// tabWorkOrder/pages/residentManage/components/accountAllocation/index.js
const IMG_URL =
"https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/";
import api from '../../api'
Component({
/**
* 组件的属性列表
*/
properties: {
},
/**
* 组件的初始数据
*/
data: {
nothing: false,
showModal: false,
showTimeModal: false,
isFlag: false,
total: 0,
pageNum: 1,
pageSize: 10,
keyword:'',
staffNameOrPhone: "",
IMG_URL,
accountList: [],
businessType: ['会员权益/升级', '轻改'],
disableObj: {}
},
/**
* 组件的方法列表
*/
methods: {
onChange(e) {
let {
index,
accountIndex
} = e.currentTarget.dataset, {
accountList
} = this.data;
let {
deletedState,
yqMerchantId,
yqMerchantName
} = accountList[index].staffAccountList[accountIndex], {
staffPhone
} = accountList[index];
this.setData({
showModal: true,
disableObj: {
index,
accountIndex,
yqMerchantId,
staffPhone,
accountStatus: deletedState ? 'I' : 'N'
},
success: true,
dialogText: `是否${!deletedState?'启用':'禁用'}该员工${yqMerchantName}${yqMerchantId}登录账号`
})
},
dialogClose() {
this.setData({
showModal: false
})
},
dialogConfirm() {
const {
success,
accountList,
disableObj: {
index,
accountIndex,
yqMerchantId,
staffPhone,
accountStatus
}
} = this.data;
if (success) {
api.updateAccountStatus({
yqMerchantId,
staffPhone,
accountStatus
}).then(res => {
let {
code,
data,
message
} = res;
if (code == 0) {
accountList[index].staffAccountList[accountIndex].deletedState = !accountList[index].staffAccountList[accountIndex].deletedState
this.setData({
accountList,
showModal: false
}, () => {
wx.$util.showToast('操作成功');
})
} else {
wx.$util.showToast(message);
}
})
}
},
updateConfig(e) {
let {
index,
accountIndex,
storeIndex
} = e.currentTarget.dataset, {
accountList
} = this.data;
let {
yqMerchantId
} = accountList[index].staffAccountList[accountIndex], {
staffPhone
} = accountList[index], {
merchantId,
deferredOpenState,
id
} = accountList[index].staffAccountList[accountIndex].staffConfigList[storeIndex]
this.setData({
disableObj: {
index,
accountIndex,
yqMerchantId,
merchantId,
staffPhone,
storeIndex,
deferredOpenFlag: !deferredOpenState ? 'Y' : 'N',
id
},
// success: true,
// dialogText: `是否${!deletedState?'启用':'禁用'}该员工${yqMerchantName}${yqMerchantId}登录账号`
})
if (!deferredOpenState) {
this.setData({
showTimeModal: true,
})
} else {
let e = {
detail: {
startEffectiveTime: ''
}
}
this.timeConfirm(e)
}
},
dialogTimeClose() {
this.setData({
showTimeModal: false
})
},
timeConfirm(e) {
const {
startEffectiveTime
} = e.detail;
const {
accountList,
disableObj: {
id,
index,
accountIndex,
yqMerchantId,
merchantId,
staffPhone,
storeIndex,
deferredOpenFlag
}
} = this.data;
let params = {
staffPhone,
yqMerchantId,
merchantId,
deferredOpenFlag,
startEffectiveTime,
dailyReportConfigId: id
}
let item = accountList[index].staffAccountList[accountIndex],
isFlag = item.staffConfigList[storeIndex].deferredOpenState,
checkList = item.checkList
api.updateDailyReportConfig(params).then(res => {
let {
code,
data,
message
} = res;
if (code == 0) {
this.setData({
accountList: [],
pageNum: 1,
showTimeModal: false,
staffNameOrPhone: ''
}, () => {
this.getData()
})
wx.$util.showToast('操作成功');
// if (checkList.length == 0) {
// if (!isFlag) {
// checkList.push(item.staffConfigList[storeIndex])
// }
// } else {
// if (!isFlag) {
// checkList.push(item.staffConfigList[storeIndex])
// } else {
// checkList.filter(item => {
// if (item.merchantId != merchantId) {
// return item
// }
// })
// }
// }
// accountList[index].staffAccountList[accountIndex].staffConfigList[storeIndex].deferredOpenState = !isFlag
// accountList[index].staffAccountList[accountIndex].checkList = checkList
// accountList[index].staffAccountList[accountIndex].unfold=true
// this.setData({
// accountList
// }, () => {
// wx.$util.showToast('操作成功');
// })
} else {
wx.$util.showToast(message);
}
})
},
clear() {
this.setData({
keyword:'',
staffNameOrPhone: ""
});
this.search();
},
input(e) {
let {
value
} = e.detail;
this.setData({
keyword: value
});
},
search() {
this.setData({
staffNameOrPhone:this.data.keyword,
pageNum: 1,
accountList: [],
isFlag: false,
nothing: false,
}, () => {
this.getData()
});
},
getData() {
let {
accountList,
staffNameOrPhone,
pageNum,
pageSize
} = this.data
let params = {
staffNameOrPhone,
pageNum,
pageSize
}
api.getDailyReportConfigList(params).then(res => {
if (res.code == 0) {
let {
list,
total
} = res.data;
res.data.list.forEach(item => {
item.labelArr = item.staffSceneLabel.split(',')
item.staffAccountList.forEach(account => {
account.checkList = []
account.deletedState = account.deletedFlag == 'N' ? true : false
account.staffConfigList.forEach(config => {
if (config.deferredOpenFlag === 'Y') {
account.checkList.push(config)
}
config.startEffectiveTime = config.startEffectiveTime ? new Date(config.startEffectiveTime).format(`yyyy-MM-dd`) : ''
config.deferredOpenState = config.deferredOpenFlag == 'Y' ? true : false
})
account.unfold = true
})
})
let tempList = pageNum == 1 ? list : [...accountList, ...list]
this.setData({
accountList: tempList,
isFlag: true,
total: total,
nothing: pageNum == 1 ? false : total == tempList.length,
})
}
})
},
goToStaff(e) {
let {
index
} = e.currentTarget.dataset, {
accountList
} = this.data;
let {
staffPhone,
staffName
} = accountList[index]
let pageInstance = wx.$router.getPageInstance()
pageInstance.setData({
activeIndex: 0
}, () => {
let thisPage = pageInstance.selectComponent(`#componet-0`)
thisPage.setData({
'staffObj.staffName': staffName,
'staffObj.staffPhone': staffPhone
})
})
},
// 触底刷新
mineReachBottom() {
console.log('触底')
let {
pageNum,
total,
pageSize
} = this.data
if (pageNum * pageSize >= total) {
return
}
this.setData({
pageNum: pageNum + 1
}, () => {
this.getData()
})
},
packupList(e) {
let {
index,
accountIndex
} = e.currentTarget.dataset, {
accountList
} = this.data;
let isFlag = accountList[index].staffAccountList[accountIndex].unfold
accountList[index].staffAccountList[accountIndex].unfold = !isFlag
this.setData({
accountList
})
},
},
lifetimes: {
attached: function () {
this.getData()
}
},
})
\ No newline at end of file \ No newline at end of file
{
"component": true,
"usingComponents": {
"dialog": "../Dialog/Dialog",
"time-picker": "../timePicker/index"
}
}
\ No newline at end of file \ No newline at end of file
/* tabWorkOrder/pages/residentManage/components/accountAllocation/index.wxss */
.search-input {
// border: 1rpx solid #979797;
background: #ffffff;
border-radius: var(--fontSize38);
width: calc(100% - var(--fontSize64));
height: var(--fontSize72);
display: flex;
align-items: center;
margin: 16rpx 32rpx;
}
.search-input .search-icon {
width: var(--fontSize28);
height: var(--fontSize28);
margin: 0 var(--fontSize10) 0 var(--fontSize26);
}
.search-input .search-clear {
width: var(--fontSize36);
height: var(--fontSize36);
margin: 0 var(--fontSize26) 0 var(--fontSize10);
}
.search-input .input {
font-size: var(--fontSize28);
height: var(--fontSize38);
line-height: var(--fontSize38);
width: calc(100% - var(--fontSize136));
}
.input-placeholder {
color: rgba(200, 201, 204, .89);
}
.info {
padding: 32rpx 40rpx;
box-sizing: border-box;
color: #999ea8;
font-size: 24rpx;
border-radius: 16rpx;
opacity: 1;
background: #ffffff;
margin: 0 20rpx;
}
.title {
color: #181a1f;
font-size: 32rpx;
font-weight: bold;
margin: 32rpx 0 16rpx 30rpx;
display: flex;
align-items: center;
text {
color: #999ea8;
font-size: 20rpx;
font-weight: normal;
margin-left: 12rpx;
}
}
.list {
margin: 0 20rpx;
.item {
border-radius: 16rpx;
background: #ffffff;
box-shadow: 0 4rpx 16rpx 0 #cdcdd180;
padding: 0 32rpx;
margin-bottom: 20rpx;
.header {
display: flex;
align-items: center;
justify-content: space-between;
border-bottom: 1.6rpx solid #f7f8fa;
padding: 32rpx 0;
.left {
.name {
color: #292d33;
font-size: 32rpx;
font-weight: bold;
margin-bottom: 8rpx;
white-space: nowrap;
display: flex;
align-items: center;
.staff{
white-space: nowrap;
max-width: 204rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
text {
font-size: 28rpx;
font-weight: normal;
margin-left: 16rpx;
}
}
.tags {
display: flex;
align-items: center;
.tag {
color: #999ea8;
font-size: 24rpx;
padding: 0 8rpx;
line-height: 36rpx;
border-radius: 4rpx;
border: 2rpx solid #e8ecf0;
margin-right: 8rpx;
}
}
}
.right {
padding: 8rpx 32rpx;
border-radius: 32rpx;
background: #347bff;
color: #ffffff;
font-size: 28rpx;
font-weight: 400;
}
}
.item-content {
margin-top: 20rpx;
.content-account {
margin-top: 2rpx;
.account-header {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 34rpx;
.park-name {
color: #999ea8;
font-size: 24rpx;
margin-right: 56rpx;
display: flex;
align-items: center;
white-space: nowrap;
width: calc(100% - 164rpx);
.yqMerchant-box {
display: flex;
align-items: center;
font-size: 28rpx;
color: #292d33;
margin-left: 16rpx;
width: calc(100% - 74rpx);
}
.text-hide {
max-width: calc(100vw - 100rpx);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
.operation {
width:auto;
height: 44rpx;
position: relative;
}
}
.store-list {
border-radius: 12rpx;
background: #f5f5f7;
.store {
height: 100rpx;
display: flex;
align-items: center;
border-bottom: 2rpx solid #ffffff;
padding: 16rpx 32rpx;
box-sizing:border-box;
.choose-open {
width: 32rpx;
height: 32rpx;
.select {
width: 100%;
height: 100%;
}
}
.store-info {
margin-left: 32rpx;
width: calc(100% - 64rpx);
.name {
color: #292d33;
font-size: 24rpx;
line-height: 36rpx;
margin-bottom: 4rpx;
white-space: nowrap;
display: flex;
align-items: center;
.text-hide {
max-width: calc(100vw - 100rpx);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
.time {
color: #999ea8;
font-size: 20rpx;
}
}
}
}
.more {
padding: 32rpx;
color: #999ea8;
font-size: 24rpx;
text-align: center;
display: flex;
align-items: center;
justify-content: center;
.pack-up {
width: 32rpx;
height: 32rpx;
margin-left: 14rpx;
image {
width: 100%;
height: 100%;
}
}
.down {
transform: rotate(180deg);
}
}
}
}
}
}
/*swtich整体大小及背景色*/
/*白色样式(false的样式)*/
.wx-switch-input::before {
width: 108rpx !important;
height: 44rpx !important;
}
/* 中间的小圆球 */
/*绿色样式(true的样式)*/
.wx-switch-input::after {
width: 108rpx !important;
height: 44rpx !important;
}
.wx-switch-input {
zoom: 0.8;
}
.list-nothing,
.list-not {
text-align: center;
}
.operation {
.switch-text {
box-sizing: border-box;
display: flex;
align-items: center;
color: #ffffff;
font-size: 22rpx;
view{
position: absolute;
top:10rpx;
}
}
.active{
margin-left:8rpx;
white-space:nowrap;
}
.disabled{
margin-left:52rpx;
white-space:nowrap;
}
}
.active-switch{
.van-switch {
width: 108rpx !important;
height: 44rpx !important;
}
}
\ No newline at end of file \ No newline at end of file
<!--tabWorkOrder/pages/residentManage/components/accountAllocation/index.wxml-->
<view class="container">
<view class="search-input">
<image src="/images/search.png" class="search-icon" />
<input type="text" placeholder="员工姓名/手机号查询" class="input" value="{{ keyword }}" placeholder-class="input-placeholder" bindinput="input" bindconfirm="search" />
<block wx:if="{{ keyword }}">
<image src="/images/clear.png" class="search-clear" bindtap="clear" />
</block>
</view>
<view class="info">员工调店分配新门店账号,业务督导需要处理员工的账号管理,若旧门店账号不再使用,请禁用旧账号,请标记勾选员工所在店面</view>
<view class="title">账号列表<text>请勾选员工目前调岗在店的门店名称</text></view>
<block wx:if="{{isFlag}}">
<scroll-view class="account-box" style="height: calc(100vh - var(--fontSize640));" enhanced="{{true}}" show-scrollbar="{{false}}" scroll-y bindscrolltolower="mineReachBottom">
<view class="list" wx:if="{{accountList.length>0}}">
<view class="item" wx:for="{{accountList}}" wx:key="index">
<view class="header">
<view class="left">
<view class="name"><view class="staff">{{item.staffName}}</view><text>{{item.staffPhone}}</text></view>
<view class="tags">
<view class="tag" wx:for="{{item.labelArr}}" wx:for-item="tag" wx:for-index="key" wx:key="key">{{businessType[tag]}}</view>
</view>
</view>
<view class="right" bind:tap="goToStaff" data-index="{{index}}">新增员工账号</view>
</view>
<view class="item-content">
<view class="content-account" wx:for="{{item.staffAccountList}}" wx:for-item="account" wx:for-index="i" wx:key="i">
<view class="account-header">
<view class="park-name">账号{{i+1}}<view class="yqMerchant-box"><view class="text-hide">{{account.yqMerchantName}}</view>{{account.yqMerchantId}}</view></view>
<view class="operation">
<van-switch class="active-switch" checked="{{ account.deletedState }}" active-color="#347BFF" inactive-color="#D0D2D6" data-index="{{index}}" data-account-index="{{i}}" bind:change="onChange" size="26px" />
<view class="switch-text">
<view class="active" wx:if="{{ account.deletedState}}">启用</view>
<view class="disabled" wx:else>禁用</view>
</view>
</view>
</view>
<view class="store-list">
<view class="store" wx:for="{{account.unfold?account.checkList:account.staffConfigList}}" wx:for-item="store" wx:for-index="s" wx:key="s">
<view class="choose">
<view class="choose-open" wx:if="{{ account.deletedState}}" catch:tap="updateConfig" data-index="{{index}}" data-account-index="{{i}}" data-store-index="{{s}}">
<gl-image webp mode="widthFix" wx:if="{{store.deferredOpenState}}" class="select" src="/check.png" />
<gl-image webp mode="widthFix" wx:else class="select" src="/no-check.png" />
</view>
<view class="choose-open" wx:else>
<gl-image webp mode="widthFix" wx:if="{{store.deferredOpenState}}" class="select" src="/dis-check.png" />
<gl-image webp mode="widthFix" wx:else class="select" src="/no-dis-check.png" />
</view>
</view>
<view class="store-info">
<view class="name"><view class="text-hide">{{store.merchantName}}</view>{{store.merchantId}}</view>
<view class="time" wx:if="{{store.startEffectiveTime}}">生效时间:{{store.startEffectiveTime?store.startEffectiveTime:'--'}}</view>
</view>
</view>
</view>
<block wx:if="{{account.unfold}}">
<view class="more" catchtap="packupList" data-index="{{index}}" data-account-index="{{i}}">查看员工更多可登录4s店 <view class="pack-up">
<image src="{{IMG_URL}}arrow.png" />
</view>
</view>
</block>
<block wx:else>
<view class="more" catchtap="packupList" data-index="{{index}}" data-account-index="{{i}}">折叠无效非在岗门店 <view class="pack-up down">
<image src="{{IMG_URL}}arrow.png" />
</view>
</view>
</block>
</view>
</view>
</view>
<block wx:if="{{nothing}}">
<view class="list-nothing">到底了~</view>
</block>
</view>
<view class="no-data" wx:else>
<empty-data />
</view>
</scroll-view>
</block>
</view>
<dialog show="{{showModal}}" confirmText="确定" cancelText="取消" showCancelButton success="{{success}}" bindconfirm="dialogConfirm" bindcancel="dialogClose" text="{{dialogText}}">
</dialog>
<time-picker show="{{showTimeModal}}" confirmText="确定" cancelText="取消" showCancelButton success="{{success}}" bindconfirm="timeConfirm" bindcancel="dialogTimeClose"></time-picker>
\ No newline at end of file \ No newline at end of file
// tabWorkOrder/pages/residentManage/components/addStaff/index.js
import api from '../../api'
let toastList = {
staffName: "员工姓名不能为空",
staffPhone: "手机号不能为空",
staffSceneLabel: "所属业务不能为空",
merchantId: "归属门店不能为空",
yqMerchantId: '关联账号不能为空'
};
Component({
/**
* 组件的属性列表
*/
properties: {
},
/**
* 组件的初始数据
*/
data: {
isBusiness: false,
shopMerchantBox: false,
yqMerchartBox: false,
cellHeight: false,
cellStyle: "min-height:52px",
cellBoxStyle: ' border-radius: 0 0 16rpx 16rpx',
requiredList: [],
yqMerchartList: [],
staffObj: {
staffName: '',
staffPhone: '',
staffSceneLabel: '', //所属业务(1.轻改,0.权益+延保
staffSceneLabelText: '',
merchantId: '', //归属门店id
merchantName: '', //归属门店名称
yqMerchantId: '', //园区店id
yqMerchantName: '', //园区店名称
}
},
/**
* 组件的方法列表
*/
methods: {
showPopup(e) {
let {
showName
} = e.currentTarget.dataset, {
staffObj: {
staffSceneLabel,
merchantId,
},
yqMerchartList
} = this.data;
if (showName == 'shopMerchantBox' && staffSceneLabel == '') {
wx.$util.showToast(`请先选择所属业务`);
return
}
if (showName == 'yqMerchartBox' && merchantId == '') {
wx.$util.showToast(`请先选择归属门店`);
return
}
if (showName == 'yqMerchartBox' && yqMerchartList.length <= 1) {
return
}
this.setData({
[showName]: true
});
},
getyqMerchantList() {
let {
staffSceneLabel,
merchantId
} = this.data.staffObj
let params = {
sceneLabel: staffSceneLabel,
merchantId
}
try {
api.getyqMerchantList(params).then(res => {
if (res.code == 0) {
let item = res.data.list.length ? res.data.list[0] : ''
this.setData({
yqMerchartList: res.data.list,
'staffObj.yqMerchantId': item ? item.yqMerchantId : '',
'staffObj.yqMerchantName': item ? item.yqMerchantName : ''
})
}
})
} catch (err) {
}
},
selectChoose(e) {
let {
chooseList,
text,
key
} = e.detail
let textArr = [],
idArr = [];
chooseList.forEach(item => {
textArr.push(item.text)
idArr.push(item.id)
})
this.setData({
[text]: textArr.join(','),
[key]: idArr.join(','),
'staffObj.yqMerchantId': '',
'staffObj.yqMerchantName': '',
'staffObj.merchantId': '',
'staffObj.merchantName': '',
yqMerchartList: []
})
},
async submit(i) {
let _this = this;
let {
staffObj
} = this.data;
let thisPage = wx.$router.getPageInstance()
let key = thisPage.checkRequired(staffObj);
if (key) {
toastList[key] && wx.$util.showToast(toastList[key]);
return;
}
wx.$util.showLoading("加载中...")
let apiName =
"createStaffAccount",
params = {
...staffObj
};
delete params.staffSceneLabelText
api[apiName](params)
.then((res) => {
let {
code,
data,
message
} = res;
if (code == 0) {
wx.hideLoading();
wx.showModal({
title: "温馨提示",
content: "保存成功",
showCancel: false,
confirmText: "知道了",
confirmColor: "#347BFF",
success(_res_) {
if (_res_.confirm) {
// let clearData={
// staffName: '',
// staffPhone: '',
// staffSceneLabel: '',
// staffSceneLabelText: '',
// merchantId: '',
// merchantName: '',
// yqMerchantId: '',
// yqMerchantName: ''
// }
// _this.setData({
// staffObj: clearData
// }
// )
thisPage.setData({
activeIndex: 1
})
}
},
});
} else {
wx.$util.showToast(message);
}
})
},
input(e) {
let {
value
} = e.detail;
let {
name
} = e.currentTarget.dataset;
this.setData({
[`${name}`]: value.trim(),
});
},
}
})
\ No newline at end of file \ No newline at end of file
{
"component": true,
"usingComponents": {
"business-type":"../businessType/index",
"shop-merchant":"../shopMerchant/index",
"yq-merchant":"../yqMerchant/index"
}
}
\ No newline at end of file \ No newline at end of file
/* tabWorkOrder/pages/residentManage/components/addStaff/index.wxss */
.container {
margin: 16rpx 20rpx;
border-radius: 16rpx;
opacity: 1;
background: #ffffff;
padding: 32rpx 40rpx 0;
box-sizing: border-box;
.title {
color: #181a1f;
font-size: 32rpx;
font-weight: bold;
margin-bottom: 16prpx;
}
.info {
color: #999ea8;
font-size: 24rpx;
margin-top:16rpx;
margin-bottom: 32rpx;
}
.box {
margin:0 -40rpx;
.input {
text-align: right;
font-size: var(--fontSize28);
height: 100%;
}
.between{
text-align:right;
}
.placeholder-class {
color: #BEC1C7;
}
}
}
.btn {
width: 622rpx;
height: 88rpx;
border-radius: 12rpx;
opacity: 1;
background: #347bff;
margin: 156rpx 64rpx 0;
text-align: center;
line-height: 88rpx;
color: #ffffff;
font-size: 32rpx;
font-weight: 500;
margin-bottom: 32rpx;
}
.hint {
color: #999ea8;
font-size: 24rpx;
text-align: center;
line-height: 36rpx;
display: block;
margin:0 auto;
}
<!--tabWorkOrder/pages/residentManage/components/addStaff/index.wxml-->
<view class="container">
<view class="title">增设新员工门店账号</view>
<view class="info">增设的员工账号支持该手机号所绑定的员工登录「生意助手员工版」小程序开展业务录单。
仅支持新增深圳嘀加服务商下的员工账号</view>
<view class="box">
<gl-cell border valueAlign="right" label="员工姓名" cellHeight="{{cellHeight}}" cellStyle="{{cellStyle}}" requiredAfter labelWidth="var(--fontSize290)" required>
<input placeholder="请输入" value="{{staffObj.staffName}}" class="input" placeholder-class="placeholder-class" bindinput="input" data-name="staffObj.staffName" always-embed></input>
</gl-cell>
<gl-cell border valueAlign="right" label="手机号" cellHeight="{{cellHeight}}" cellStyle="{{cellStyle}}" requiredAfter labelWidth="var(--fontSize140)" required>
<input placeholder="请输入" class="input" value="{{staffObj.staffPhone}}" type="number" maxlength="11" placeholder-class="placeholder-class" bindinput="input" bindblur="phoneBlur" data-name="staffObj.staffPhone" always-embed></input>
</gl-cell>
<gl-cell border valueAlign="right" label="所属业务" cellHeight="{{cellHeight}}" cellStyle="{{cellStyle}}" requiredAfter labelWidth="var(--fontSize180)" required haveArrow bindclick="showPopup"data-show-name="isBusiness" placeholder="点击选择">
<block wx:if="{{ staffObj.staffSceneLabelText }}">
<view class="between">{{staffObj.staffSceneLabelText}}</view>
</block>
</gl-cell>
<gl-cell border valueAlign="right" required label="归属门店" cellHeight="{{cellHeight}}" cellStyle="{{cellStyle}}" requiredAfter labelWidth="var(--fontSize180)" haveArrow bindclick="showPopup" data-show-name="shopMerchantBox" placeholder="点击选择">
<block wx:if="{{ staffObj.merchantId }}">
<view class="between">{{staffObj.merchantName}}{{staffObj.merchantId}}</view>
</block>
</gl-cell>
<gl-cell valueAlign="right" label="关联账号" required cellHeight="{{cellHeight}}" cellBoxStyle="{{cellBoxStyle}}" cellStyle="{{cellStyle}}" requiredAfter labelWidth="var(--fontSize290)" haveArrow="{{yqMerchartList.length>1}}" bindclick="showPopup" data-show-name="yqMerchartBox" placeholder="点击选择" >
<block wx:if="{{ staffObj.yqMerchantName }}">
<view class="between">{{staffObj.yqMerchantName}}{{staffObj.yqMerchantId}}</view>
</block>
</gl-cell>
</view>
</view>
<view class="btn" bind:tap="submit">确认开通</view>
<text class="hint">请核对员工姓名、手机号,开通账号后即可</text>
<text class="hint">投入使用。登录密码默认为Aa+手机号</text>
<business-type show="{{isBusiness}}" scene-label="{{staffObj.staffSceneLabel}}" bindconfirm="selectChoose"></business-type>
<shop-merchant show="{{shopMerchantBox}}" scene-label="{{staffObj.staffSceneLabel}}" bindconfirm="selectChoose" merchantId="{{staffObj.merchantId}}"></shop-merchant>
<yq-merchant show="{{yqMerchartBox}}" merchantId="{{staffObj.yqMerchantId}}" yqMerchartList="{{yqMerchartList}}"></yq-merchant>
\ No newline at end of file \ No newline at end of file
// tabWorkOrder/pages/residentManage/components/businessType/index.js
Component({
/**
* 组件的属性列表
*/
properties: {
show: {
type: Boolean,
observer: function (n) {
if (n) this.initData();
}
},
sceneLabel: String,
},
/**
* 组件的初始数据
*/
data: {
key:'staffObj.staffSceneLabel',
text:'staffObj.staffSceneLabelText',
list: [{
text: '轻改',
id: 1,
active: false
},
{
text: '会员权益/升级',
id: 0,
active: false
}
]
},
/**
* 组件的方法列表
*/
methods: {
initData(ids) {
let arr = this.data.sceneLabel ?this.data.sceneLabel.split(','):[],
{
list
} = this.data;
list.forEach(item => {
item.active = false
if (arr.includes(String(item.id))) {
item.active = true
}
})
this.setData({
list
})
},
choose(e) {
let {
list
} = this.data, {
index
} = e.currentTarget.dataset;
let thisPage = wx.$router.getPageInstance();
list.forEach(item=>{
item.active=false
})
list[index].active =true
this.setData({
list,
});
},
confirm() {
let {
list,
text,
key
} = this.data;
let chooseList = list.filter(item => {
if (item.active) {
return item
}
})
let thisPage = wx.$router.getPageInstance();
if (!chooseList.length) return wx.$util.showToast("请勾选业务");
this.setData({
show: false,
});
thisPage.setData({
isBusiness: false,
});
// thisPage?.setGoodsTotal && thisPage.setGoodsTotal(chooseList);
// thisPage.setData({
// goodsList: chooseList,
// });
console.log(chooseList)
this.triggerEvent("confirm",{ chooseList,text,key});
},
cancel() {
let pageInstance = wx.$router.getPageInstance();
let thisPage = pageInstance.selectComponent(`#componet-0`)
this.setData({
show: false,
});
thisPage.setData({
isBusiness: false,
});
},
}
})
\ No newline at end of file \ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
/* tabWorkOrder/pages/residentManage/components/businessType/index.wxss */
.box {
height:200rpx;
// width: calc(100% + var(--fontSize64));
// margin-left: calc(-1 * var(--fontSize32));
}
.item {
padding: 24rpx 4rpx;
box-sizing: border-box;
border-bottom: var(--fontSize1) solid #EFF0F2;
.item-hd {
display: flex;
align-items: center;
.name {
max-width: 400rpx;
font-weight: 400;
font-size: 28rpx;
color: #292D33;
margin-left: 20rpx;
overflow: hidden;
text-overflow: ellipsis;
}
.total-price {
font-weight: 500;
font-size: 28rpx;
color: #347BFF;
margin-left: auto;
}
.icon {
display: block;
width: var(--fontSize32);
height: var(--fontSize32);
}
.icon .arc {
width: 100%;
height: 100%;
border: var(--fontSize2) solid #979797;
border-radius: 100%;
box-sizing: border-box;
}
}
}
\ No newline at end of file \ No newline at end of file
<popup show="{{ show }}" title="选择所属业务" bindconfirm="confirm" bindcancel="cancel" height="40%">
<view class="box">
<block wx:if="{{list.length}}">
<view class="item" wx:for="{{ list }}">
<view class="item-hd" catchtap="choose" data-index="{{ index }}">
<view class="icon" >
<block wx:if="{{ item.active }}">
<image src="../../image/radio.png" />
</block>
<block wx:else>
<view class="arc" />
</block>
</view>
<view class="name">{{item.text}}</view>
</view>
</view>
</block>
<view class="safeAreaInset"></view>
</view>
</popup>
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!