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 2719 additions and 556 deletions
......@@ -11,6 +11,7 @@
超管:18129809927 18372203315
商户管理员:15814019200
区域督导:187750352053
销售: 15626599743(开发)
# 生产环境跟手机号和验证码绑定 需要自己到账号中心绑定手机号成为员工或超管
......
......@@ -338,5 +338,10 @@ module.exports = {
// 积分审批通过
approvedPointsAPI(data) {
return api.post('dj.api.smartcarlife.staff.motivation.audit', data)
},
// 上传pdf
uploadPdfAPI(data) {
return api.post('dj.api.smartcarlife.common.uploadPdf', data, ['file'])
}
}
// 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
{
"component": true,
"usingComponents": {
"van-area": "@vant/weapp/area/index",
"van-popup": "@vant/weapp/popup/index"
}
}
\ 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
<!--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
/**
* 动态校验字段
* @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
......@@ -21,6 +21,8 @@ Component({
labelStyle: String,
cellStyle: String,
cellBoxStyle: String,
cellValueStyle: String,
noPadding: Boolean,
background: {
type: String,
value: '#FFFFFF',
......
......@@ -62,6 +62,10 @@
padding-right: var(--fontSize40) !important;
}
.cell-value .noPadding {
padding: 0 !important;
}
.value {
width: 100%;
height: 100%;
......
......@@ -16,8 +16,8 @@
src="{{iconSrc}}" />
<text class="titleBtn" wx:if="{{titleBtn}}">{{titleBtn}}</text>
</view>
<view class='cell-value ' style="width:calc(100% - {{labelWidth}});">
<view class='value {{valueAlign}} {{haveArrow}}'>
<view class='cell-value ' style="width:calc(100% - {{labelWidth}});{{cellValueStyle}}">
<view class='value {{valueAlign}} {{haveArrow}} {{noPadding ? "noPadding" : ""}}'>
<view class='slot'>
<slot/>
</view>
......
......@@ -165,11 +165,11 @@ Component({
let tempList = isReset ? data?.list : [...this.data.storeRangeList, ...data?.list]
if (!searchValue) {
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) {
tempList.push({merchantId: userInfo?.shopMerchantId, merchantName: userInfo?.shopMerchantName});
tempList.push({ merchantId: userInfo?.shopMerchantId, merchantName: userInfo?.shopMerchantName });
}
}
tempList = this.uniqueByProperty(tempList, 'merchantId')
......@@ -186,7 +186,7 @@ Component({
pageNum: pageNum,
pageSize: 10,
keyword: searchValue,
sellerMerchantId: userInfo?.isSuper || userInfo?.loginRole == 3 ? '' : (userInfo?.merchantId || '')
sellerMerchantId: userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5 ? '' : (userInfo?.merchantId || '')
}
if (nothing) return
api.searchOrderCustomer(params).then(res => {
......
......@@ -198,7 +198,7 @@ Component({
pageNum: pageNum,
pageSize: 10,
keyword: searchValue,
sellerMerchantId: userInfo?.isSuper || userInfo?.loginRole == 3 ? '' : (userInfo?.merchantId || '')
sellerMerchantId: userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5 ? '' : (userInfo?.merchantId || '')
}
if (nothing) return
api.searchOrderCustomer(params).then(res => {
......
......@@ -35,7 +35,7 @@ Component({
ready() {
let userInfo = wx.$util.getUserInfo()
this.setData({
isForbidden: !(userInfo?.isSuper || userInfo?.loginRole == 3),
isForbidden: !(userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5),
isYqdSuper: app.globalData.isYqdSuper,
selectedSceneName: constantData?.sceneList?.filter(val => val.sceneType == userInfo?.sceneType)[0]?.sceneName,
selectedSceneDesc: constantData?.sceneList?.filter(val => val.sceneType == userInfo?.sceneType)[0]?.sceneDesc,
......@@ -57,70 +57,70 @@ Component({
* 组件的方法列表
*/
methods: {
/**跳转至银行卡 */
toAddBankAccount(e) {
const {
score,
user
} = this.data
this.setData({
showAccountModal: false
}, () => {
wx.$router.go('integration.detail', {
score
})
})
},
async getStaffBankList() {
let userInfo = wx.$util.getUserInfo(),
res = await api.getStaffBankList({
uuid: userInfo.uuid
/**跳转至银行卡 */
toAddBankAccount(e) {
const {
score,
user
} = this.data
this.setData({
showAccountModal: false
}, () => {
wx.$router.go('integration.detail', {
score
})
})
},
async getStaffBankList() {
let userInfo = wx.$util.getUserInfo(),
res = await api.getStaffBankList({
uuid: userInfo.uuid
})
console.log(res)
if (res.data && res.data.length) {
this.data.staffBankFlag = true
const [staffBankInfo] = res.data
if (staffBankInfo.state == 2 && !this.staffBankInfo) {
this.staffBankInfo = staffBankInfo
if (res.data && res.data.length) {
this.data.staffBankFlag = true
const [staffBankInfo] = res.data
if (staffBankInfo.state == 2 && !this.staffBankInfo) {
this.staffBankInfo = staffBankInfo
this.setData({
showAccountErrorModal: true
})
}
}
},
//我的积分
toPoint() {
console.log(999)
//判断是否添加银行卡
if (!this.data.staffBankFlag) {
this.setData({
showAccountErrorModal: true
showAccountModal: true
})
}
}
},
//我的积分
toPoint() {
console.log(999)
//判断是否添加银行卡
if (!this.data.staffBankFlag) {
return
}
// 新的积分兑换页面
wx.$router.go('integration.index')
},
toCloseModal(e) {
const {
name
} = e.currentTarget.dataset
this.setData({
showAccountModal: true
[name]: false
});
},
//收款账户
jumpAccount() {
const {
score,
user
} = wx.$router.getPageInstance()
wx.$router.go('integration.list', {
score,
user
})
return
}
// 新的积分兑换页面
wx.$router.go('integration.index')
},
toCloseModal(e) {
const {
name
} = e.currentTarget.dataset
this.setData({
[name]: false
});
},
//收款账户
jumpAccount() {
const {
score,
user
} = wx.$router.getPageInstance()
wx.$router.go('integration.list', {
score,
user
})
},
},
// 跳转到工资绩效
jump(e) {
let { url } = e.currentTarget.dataset
......
......@@ -18,7 +18,7 @@ export const appId = "wx570d9331f9ace0bd";
* 4预发布
* 5cdptest
*/
let index = 1;
let index = 2;
const accountInfo = wx.getAccountInfoSync();
const systemInfo = wx.getSystemInfoSync();
const envName = accountInfo.miniProgram.envVersion;
......
......@@ -74,18 +74,19 @@ Component({
path: '',
isTab: true,
tabIndex: 1
},
// {
// menuText: '话术库',
// icon: 'script _library',
// path: ''
// }
},
// {
// menuText: '话术库',
// icon: 'script _library',
// path: ''
// }
],
loginRoleLabel: {
1: '超管',
2: '商户管理员',
3: '区域督导',
4: '驻店负责人'
3: '区域运营',
4: '驻店负责人',
5: '广联销售',
},
loginRole: '',
userInfo: {},
......@@ -113,14 +114,14 @@ Component({
},
getData() {
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
if (code == 0) {
// 分转元
if (data?.todayAmount) data.todayAmount = NP.divide(data?.todayAmount, 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.round(data?.totalAmount, 0 )
if (data?.totalAmount) data.totalAmount = NP.round(data?.totalAmount, 0)
this.setData({
staticData: data || {}
})
......@@ -132,8 +133,8 @@ Component({
navGo(e) {
console.log(e)
const thisPage = wx.$router.getPageInstance()
let {item} = e.currentTarget.dataset
if (item.isTab) return thisPage.changeTabBar && thisPage.changeTabBar({detail: item?.tabIndex})
let { item } = e.currentTarget.dataset
if (item.isTab) return thisPage.changeTabBar && thisPage.changeTabBar({ detail: item?.tabIndex })
if (!item.path) wx.$util.showToast('模块暂未开通\r\n敬请期待')
},
}
......
......@@ -120,7 +120,7 @@ Page({
// // 格式化日期为"yyyy-mm-dd"
// let formattedDate = previousDate.toISOString().split("T")[0];
// 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(
// "日报提醒",
// "您有未填写的日报,请点击前往。",
......@@ -224,7 +224,7 @@ Page({
let { code, data } = res;
if (code == 0) {
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(
"交车目标",
"您有未填写的交车目标,请点击前往",
......@@ -269,7 +269,7 @@ Page({
this.setData({
mode: -1,
});
if (userInfo?.isSuper || userInfo?.loginRole == 3) return false
if (userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5) return false
this.addModalToQueue(
"温馨提示",
"未配置权益规则,请联系客服处理。",
......@@ -327,11 +327,11 @@ Page({
get4SStoreList() {
let userInfo = wx.$util.getUserInfo();
let params = {
merchantId: userInfo?.isSuper || userInfo?.loginRole == 3 ? "" : userInfo?.merchantId,
staffUUID: userInfo?.isSuper || userInfo?.loginRole == 3 ? "" : userInfo?.uuid,
merchantId: userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5 ? "" : userInfo?.merchantId,
staffUUID: userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5 ? "" : userInfo?.uuid,
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();
if (!result?.length) {
userInfo.shopMerchantId = null;
......@@ -341,7 +341,7 @@ Page({
wx.$util.setUserInfo(userInfo);
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) {
result.unshift({ merchantName: '全部' })
}
......@@ -415,7 +415,7 @@ Page({
.then((res) => {
const { list = [] } = res.data;
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(
"对练任务提醒",
"您有未完成的对练任务,点击前往完成",
......@@ -478,7 +478,7 @@ Page({
})
.then((result) => {
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(
"开单预警",
"您已超过三天未开单",
......
......@@ -11,7 +11,7 @@
<block wx:elif="{{tabIndex == 1}}">
<view class="navigation-title">
<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 wx:else>
......@@ -29,7 +29,7 @@
<view class="layout {{ waitInputCount && mode == 1 && tabIndex == 0 ?'tipsHeigh':'layout_noTips' }}" style="padding-top:{{ navBarHeight }}px;position: relative;">
<block wx:if="{{ navBarHeight && showPage }}">
<!-- 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>
<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>
......@@ -41,7 +41,7 @@
</view>
<custom-tabBar list="{{ tabBarList }}" color="#6C6C70" selectedColor="#347BFF" tabIndex="{{ tabIndex }}" bindchange="changeTabBar" />
<!-- <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" />
</block>
<block wx:else>
......@@ -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" />
</view>
<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>
</page-container>
\ No newline at end of file
/* packageEquity/pages/aiCheck/defense/defense.wxss */
\ No newline at end of file
......@@ -110,7 +110,7 @@ Component({
nothing: false,
pageNum: 1,
storeInfo: wx.$util.getUserInfo()?.default4SStoreInfo || {},
isOrder: !(userInfo?.isSuper || userInfo?.loginRole == 3)
isOrder: !(userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5)
})
this.getTotal()
if (!noGetList) this.getList(true)
......
......@@ -294,12 +294,12 @@
bind:delete="handleDeleteImg"
data-attr="invoice"
></van-uploader>
<view class="label">行驶证</view>
<view class="label">行驶证或车辆合格证</view>
<view class="flex">
<van-uploader
class="driveFront"
file-list="{{ imgObj.driveFront }}"
upload-text="行驶证主页"
upload-text="行驶证主页/车辆合格证"
max-count="1"
deletable
preview-size="var(--fontSize192)"
......@@ -310,7 +310,7 @@
<van-uploader
class="driveBack"
file-list="{{ imgObj.driveBack }}"
upload-text="行驶证副页"
upload-text="行驶证副页/车辆合格证"
max-count="1"
deletable
preview-size="var(--fontSize192)"
......
......@@ -301,7 +301,7 @@
}
.upload .van-uploader__upload-text {
font-size: var(--fontSize22) !important;
font-size: var(--fontSize20) !important;
color: #9B9B9E !important;
}
......
......@@ -39,6 +39,8 @@ Component({
*/
methods: {
handleClick() {
// 信息确认直接关闭弹窗
if (this.data.type == 'warning') return this.triggerEvent('close', {type: 'warning'})
this.triggerEvent('click')
},
handleClose() {
......
......@@ -3,8 +3,9 @@
<view class="bg" bindtap="handleShow" />
<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 == '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>
<view class="title">{{title}}</view>
<view class="title {{type == 'warning' ? 'warning_title' : ''}}">{{title}}</view>
<view class="tipTxt">{{tipTxt}}</view>
<view class="btn" bindtap="handleClick">{{btnTxt}}</view>
</view>
......
......@@ -49,6 +49,13 @@
color: #347BFF;
}
.warning_title {
text-align: center;
font-weight: 600;
font-size: var(--fontSize48);
color: #292D33;
}
.tipTxt {
font-size: 14px;
color: #9B9B9E;
......
......@@ -582,7 +582,11 @@ const secondObj = {
name: 'effectiveDate',
type: 'pickerTime',
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('/','-')
},
// {
......
......@@ -14,6 +14,12 @@ const errorObj = {
tipTxt: '',
btnTxt: '重新提单'
}
const warningObj = {
type: 'warning',
title: '信息确认',
tipTxt: '',
btnTxt: '继续出单'
}
Page({
/**
* 页面的初始数据
......@@ -195,9 +201,12 @@ Page({
data?.goodInfoList?.forEach(val => {
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({
serviceInfo: data,
['serviceInfo.attachmentList']:data?.attachmentList||[],
['serviceInfo.allWarrantyFlag']: !allWarrantyFlag ? 1 : 0, // 0 显示生效日期 1不显示
step: data.mode ? 'second' : 'first'
})
this.dealTireObj()
......@@ -304,6 +313,10 @@ Page({
// 0草稿,1提单
params.operationType = typeObj[type]
params.addOnsFlag = serviceInfo.addOnsFlag==2?0:1
if (params?.allWarrantyFlag == 1) { // 全部为延保商品 不传生效日期
delete params.effectiveDate
}
delete params.allWarrantyFlag
console.log(params, '调接口---')
this.setData({
isAsk: true
......@@ -394,7 +407,7 @@ Page({
} else {
this.setData({
['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,
isDialogShow: true,
e: {}
......@@ -402,7 +415,7 @@ Page({
}
} else {
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,
isDialogShow: true,
e: {}
......@@ -413,11 +426,13 @@ Page({
},
handleSecondConfirm(e) {
console.log(e)
let { serviceInfo, conSecondObj, isAsk } = this.data
let { serviceInfo, conSecondObj, isAsk, noCheckVinFlag } = this.data
if (isAsk) {
return true
}
if (e.detail?.type == 'confirm') {
// 校验过车架号重复后,不再做确认,直接提交表单
if (noCheckVinFlag) return this.confirm(e)
this.setData({
secFormData: {
carVin: serviceInfo.vin
......@@ -455,6 +470,7 @@ Page({
this.setData({
isDialogShow: false
})
if (e.detail?.type == 'warning') return this.setData({noCheckVinFlag: true})
wx.$router.reLaunch('packageEquity.equityPage', { tabIndex: 2 })
},
......
......@@ -18,7 +18,7 @@ Component({
userInfo
} = this.data
// 非超管 获取转化人员 销售顾问
if (!(userInfo?.isSuper || userInfo.loginRole == 3)) {
if (!(userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5)) {
if (wx.$orderListDateListScreenRefresh) { // 切换门店将数据清空
this.setData({
'form.referrerIds': [],
......@@ -40,6 +40,13 @@ Component({
observer: function (n) {
this.setOrderStatusListDisabled(n)
}
},
zyStatus: { // 延保协议状态
type: String,
value: null,
observer: function (n) {
this.setZyPayStatus(n)
}
}
},
......@@ -139,6 +146,18 @@ Component({
value: 5
}
],
// 延保协议状态数据
zyPayStatus: [{
name: '全部',
active: true,
value: ''
}, {
name: '待上传',
value: '1'
}, {
name: '已上传',
value: '2'
}],
storeType: 1, // 门店数据类型 默认园区店
showStoreSelectPopup: false
},
......@@ -297,6 +316,28 @@ Component({
i.active = false
})
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({
[`form.${listName}`]: target,
......@@ -306,15 +347,44 @@ Component({
/**订单状态 */
setOrderStatusListDisabled(statusType) {
let {
orderStatus
orderStatus,
zyPayStatus
} = this.data
orderStatus.map((e, index) => {
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({
['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) {
let target = type == 0 ? 'form.transferIds' : 'form.referrerIds'
......@@ -347,7 +417,7 @@ Component({
e.value = [e.uuid]
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) {
// e.active = false
// if (e.uuid == userInfo.uuid) e.active = true
......@@ -376,7 +446,8 @@ Component({
let {
referrerIds,
transferIds,
orderStatus
orderStatus,
zyPayStatus
} = this.data.form, {
userInfo
} = this.data
......@@ -386,19 +457,25 @@ Component({
})
transferIds?.map((val, index) => {
val.active = false
if (!(userInfo?.isSuper || userInfo.loginRole == 3) && 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) && userInfo.uuid == val.uuid) val.active = true
if ((userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5) && index == 0) val.active = true
})
orderStatus?.map((val, index) => {
val.active = false
if (index == 0) val.active = true
})
// 将延保协议状态置为全部
zyPayStatus?.map((val, index) => {
val.active = false
if (index == 0) val.active = true
})
this.setData({
'form.selectedYqMerchantList': [],
'form.selectedMerchantList': [],
'form.transferIds': transferIds || [],
'form.referrerIds': referrerIds || [],
'form.orderStatus': orderStatus,
'form.zyPayStatus': zyPayStatus,
isReset: true
})
this.init()
......@@ -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]
})
if (isReset) obj = {}
......
......@@ -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}}">
<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-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 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="" />
......@@ -21,7 +21,7 @@
</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-left">
转化人员
......@@ -42,11 +42,11 @@
</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-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 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="" />
......@@ -61,11 +61,11 @@
</view>
</view>
<!-- 超管销售顾问 选择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-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 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="" />
......@@ -142,6 +142,16 @@
</block>
</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 class="btn-box {{isFullSucreen?'isFullSucreen-btn':''}}">
<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
{
"component": true,
"usingComponents": {}
}
\ 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
/* 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
<popup
title="添加其他商业险"
show="{{show}}"
bindconfirm="confirm"
height="85%">
<view class="popBox">
<view class="title">商业险名称</view>
<van-field
class="inputBox"
border="{{false}}"
value="{{typeName}}"
data-attrType="vehiclesAndVessels"
data-attrName="typeName"
placeholder="请输入"
bindinput="handleInput" />
<view class="title">险种保额</view>
<van-field
class="inputBox"
border="{{false}}"
value="{{compensation}}"
data-attrType="vehiclesAndVessels"
data-attrName="compensation"
placeholder="请输入险种保额"
bindinput="handleInput" />
<view class="title">保费</view>
<van-field
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>¥</view>
</view>
</van-field>
</view>
</popup>
<popup title="添加其他商业险" show="{{show}}" bindconfirm="confirm" height="85%">
<view class="popBox">
<view class="title">商业险名称</view>
<van-field class="inputBox" border="{{false}}" value="{{typeName}}" data-attrType="vehiclesAndVessels" data-attrName="typeName" placeholder="请输入" bindinput="handleInput" />
<view class="title">险种保额</view>
<van-field class="inputBox" border="{{false}}" value="{{compensation}}" data-attrType="vehiclesAndVessels" data-attrName="compensation" placeholder="请输入险种保额" bindinput="handleInput" />
<view class="title">保费</view>
<van-field class="inputBox" type="digit" border="{{false}}" value="{{payPrice}}" data-type='number' data-attrType="vehiclesAndVessels" data-attrName="payPrice" placeholder="请输入保费" bindinput="handleInput">
<view slot="left-icon">
<view>¥</view>
</view>
</van-field>
</view>
</popup>
\ 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
{
"component": true,
"usingComponents": {
"popup": "../Popup/Popup",
"van-loading": "@vant/weapp/loading/index"
}
}
\ 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
<!--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({
// vin二次确认弹窗
showVinDialog: false,
secFormData: {},
tempVin: ''
tempVin: '',
showZyPopup: false // 上传延保协议弹窗
},
closeTips() {
this.setData({
......@@ -305,9 +306,9 @@ Page({
});
},
async handleSecondConfirm() {
async handleSecondConfirm(e) {
// debugger
let { orderInfo, outTradeNo, confirmStatus, userInfo } = this.data;
let { orderInfo, outTradeNo, confirmStatus, userInfo, carBrandList } = this.data;
let staffCheck = await this.staffDailyReportMerchantValid(userInfo);
if (staffCheck) return false;;
......@@ -364,7 +365,7 @@ Page({
// -------
wx.showLoading("报价中...");
let result = await this.handleSecondConfirmCheck(true);
let result = await this.handleSecondConfirmCheck(true, e);
let { code, data: id, message } = result;
console.log(result);
......@@ -395,8 +396,18 @@ Page({
} else {
console.log(message);
wx.hideLoading();
// 将延保协议弹窗关闭 清空延保协议上传内容,支付凭证内容清空
let owner = this.getOwnerInfo();
if (orderInfo.payType == 2 && carBrandList?.includes(owner?.carChildsBrandId)) {
this.setData({
showZyPopup: false,
['orderInfo.zyPayUrl']: '',
['orderInfo.transactionNo']: '',
['orderInfo.paymentDocList']: []
})
}
this.setData({
confirmStatus: false,
confirmStatus: false
});
wx.$util.showToast(message || "报价失败");
}
......@@ -470,7 +481,8 @@ Page({
}
return owner;
},
handleSecondConfirmCheck(check) {
handleSecondConfirmCheck(check, detail) {
let { carBrandList } = this.data
// 获取保险信息
let orderInfo = this.getInsurance();
let owner = this.getOwnerInfo();
......@@ -479,9 +491,18 @@ Page({
orderInfo.check = check;
orderInfo.paymentDocList = orderInfo.paymentDocList || [];
console.log("orderInfo", orderInfo);
// debugger
// 门店收款且是智界/享界车型 弹出上传延保协议
try {
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
console.log("调接口---");
// 标记错误--补录订单
......@@ -699,6 +720,15 @@ Page({
});
});
},
// 获取智界、享界车系id
async getCarBrandList() {
const {
carBrandList
} = await wx.$util.getMockData()
this.setData({
carBrandList
})
},
// 不需要检验 存草稿
async handleEditSave() {
......@@ -934,6 +964,7 @@ Page({
firstEnter: false
});
this.orderSettingList()
this.getCarBrandList()
},
setCustomerInfo(customerInfo) {
let { owner, orderInfo } = this.data;
......
......@@ -4,7 +4,8 @@
"first-step": "../components/FirstStep/FirstStep",
"second-step": "../components/SecondStepSimple/SecondStep",
"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"
}
......@@ -27,4 +27,6 @@
</view>
<order-popup orderType="{{orderInfo.payType }}" resetTransNo="{{orderInfo.transactionNo || orderInfo.outTradeNo}}" resetOrder="{{orderInfo.resetOrder}}" wx:if="{{showPopup}}" show="{{showPopup}}" />
<!-- vin二次复核 -->
<vin-sec-dialog wx:if="{{showVinDialog}}" showVinDialog="{{showVinDialog}}" secFormData="{{secFormData}}" bindonClose="handleSecClose" bindonConfirm="handleSecConfirm"></vin-sec-dialog>
\ No newline at end of file
<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
......@@ -6,6 +6,8 @@ import {
merchantMode,
orderStatistics,
cancelOrderById,
getQuotationInfoById,
updateCustomerInfo
} from "../../../api";
import { checkDailyReport } from "~/store/ModalToQueueControl";
import data from "../constant/data";
......@@ -112,7 +114,7 @@ Component({
"已完成",
"战败",
],
tabListSimple: ["全部", "待报价", "待支付", "已支付", "已完成", "战败"],
tabListSimple: ["全部", "待报价", "待支付", "已支付", "已完成", "战败", "待上传协议"],
tabList: ["全部", "待报价", "待确认", "待支付", "已支付", "已完成", "战败"],
tabListTemplate: [
"全部",
......@@ -144,7 +146,8 @@ Component({
showRendering: false,
repealVisible: false,
repealReason: '',
repealId: ''
repealId: '',
zyPayStatus: '' // 延保协议状态
},
observers: {
mode: function (value) {
......@@ -209,7 +212,7 @@ Component({
nothing: false,
currentPage: 1,
storeInfo: wx.$util.getUserInfo()?.default4SStoreInfo || {},
isOrder: !(userInfo?.isSuper || userInfo?.loginRole == 3),
isOrder: !(userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5),
list: []
});
// this.getTotal()
......@@ -300,7 +303,8 @@ Component({
userInfo,
storeInfo,
nothing,
staffUuid
staffUuid,
zyPayStatus
} = this.data,
{ screenForm } = this,
merchantId = "";
......@@ -314,6 +318,7 @@ Component({
customerName,
orderStatus,
merchantId,
zyPayStatus
};
if (!userInfo.isSuper && userInfo.loginRole != 3) {
......@@ -417,23 +422,39 @@ Component({
this.filterTag = false;
return;
}
if (this.screenForm && e.orderStatus) {
// 筛选页只会存在订单状态
if (this.screenForm && e.orderStatus && !e.zyPayStatus) {
this.screenForm.orderStatus = e.orderStatus;
this.filterTag = true;
setTimeout(() => {
this.filterTag = false;
}, 500);
} else if (this.screenForm && !e.orderStatus && !tabIndex) {
} else if (this.screenForm && !e.orderStatus && !tabIndex && !e.zyPayStatus) {
this.screenForm.orderStatus = "";
this.filterTag = false;
} else if (this.screenForm && !e.orderStatus && tabIndex) {
} else if (this.screenForm && !e.orderStatus && tabIndex && !e.zyPayStatus) {
this.screenForm.orderStatus = orderStatus;
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({
tabIndex,
orderStatus,
currentPage: 1,
zyPayStatus: e.detail == (tabList?.length - 1) && !e.zyPayStatus ? 1 : e.zyPayStatus ? e.zyPayStatus : '', // 当tab选中最后一项或筛选页面存在值
list: []
});
this.search();
......@@ -443,6 +464,10 @@ Component({
async handleClickBtn(e) {
let { target, type } = e.currentTarget.dataset;
console.log(target);
// 上传延保协议
if (target?.zyPayStatus == '1' && type == 'upload') {
return this.setData({showZyPayPopup: true, showZyTarget: target})
}
// wx.$router.go('createOrderCarQuotation', {
// id: target.id
// })
......@@ -533,6 +558,35 @@ Component({
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() {
this.setData({
showRemark: false,
......@@ -870,12 +924,13 @@ Component({
},
showConfirm() {
const thisPage = wx.$router.getPageInstance();
let { orderStatus } = this.data
let { orderStatus, zyPayStatus } = this.data
thisPage.setData({
showScreen: true,
showOrderRendering: true,
show_order_confirm: true,
orderStatus
orderStatus,
zyPayStatus
});
},
searchScreen(e) {
......@@ -890,10 +945,14 @@ Component({
tabIndex = tabList.findIndex((item) => item.text == name);
if (tabIndex == -1) tabIndex = 0;
}
if (e.detail.zyPayStatus && e.detail.zyPayStatus[0] == 1) {
tabIndex = tabList?.length - 1
}
this.filterTag = false;
this.tabClick({
detail: tabIndex,
orderStatus: e.detail.orderStatus,
zyPayStatus: e.detail.zyPayStatus
});
},
/**获取门店主营品牌 */
......
{
"component": true,
"usingComponents": {
"order-screen": "../components/OrderScreen/OrderScreen"
"order-screen": "../components/OrderScreen/OrderScreen",
"zy-pay-popup": "../components/zyPayPopup/zyPayPopup"
}
}
\ No newline at end of file
......@@ -89,17 +89,21 @@
</view>
</block>
<view class="header-status">
<!-- 0待报价、1待确认、2待支付、3已支付、-1战败 5已完成(已签名)6已退款 -->
<!-- == '3' -->
<view wx:if="{{ item.orderStatus == '3'||item.orderStatus =='5' }}">
<span class="green-txt">{{orderStatusObj[item.orderStatus]}}</span>
<!-- <span class="header-price">¥ {{item.quotedPriceUpdate || ''}}</span> -->
</view>
<view wx:elif="{{ item.orderStatus == '9'||item.orderStatus =='11' || item.orderStatus == '6' }}">
<span class="grey-txt">{{orderStatusObj[item.orderStatus]}}</span>
<!-- <span class="header-price">¥ {{item.quotedPriceUpdate || ''}}</span> -->
</view>
<view wx:else class="{{ item.orderStatus == '-1' ? 'red-txt' : 'default-txt' }}">{{orderStatusObj[item.orderStatus] || '--'}}</view>
<!-- 待上传延保协议且是已支付的订单 -->
<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' }}">
<span class="green-txt">{{orderStatusObj[item.orderStatus]}}</span>
<!-- <span class="header-price">¥ {{item.quotedPriceUpdate || ''}}</span> -->
</view>
<view wx:elif="{{ item.orderStatus == '9'||item.orderStatus =='11' || item.orderStatus == '6' }}">
<span class="grey-txt">{{orderStatusObj[item.orderStatus]}}</span>
<!-- <span class="header-price">¥ {{item.quotedPriceUpdate || ''}}</span> -->
</view>
<view wx:else class="{{ item.orderStatus == '-1' ? 'red-txt' : 'default-txt' }}">{{orderStatusObj[item.orderStatus] || '--'}}</view>
</block>
</view>
</view>
<!-- 内容 -->
......@@ -189,31 +193,41 @@
<view class="item-footer">
<!-- 超管isSuper/商户类型 userType 1账号不可操作 -->
<block wx:if="{{ !userInfo.isSuper && userInfo.userType == 2||staffUuid }}">
<view wx:if="{{ item.orderStatus != '4' && item.orderStatus!=11&& item.orderStatus!=9 }}" class="btn_class">
<block wx:if="{{ item.orderStatus != '0' }}">
<view class="order-btn default-btn padding_20" bindtap="jumpReception" data-item="{{ item }}">接待记录</view>
</block>
<block wx:if="{{ !staffUuid&&isOrder }}">
<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">
<block wx:if="{{ item.orderStatus != '0' }}">
<view class="order-btn default-btn padding_20" bindtap="jumpReception" data-item="{{ item }}">接待记录</view>
</block>
<block wx:if="{{ !staffUuid&&isOrder }}">
<view wx:if="{{ item.orderStatus == '-1' || item.orderStatus == '0' }}" class="order-btn" bindtap="handleClickBtn" data-target="{{ item }}">{{btnTxt[item.orderStatus]}}</view>
<block wx:elif="{{ item.orderStatus != 6 }}">
<block wx:if="{{ item.orderStatus == '2' || item.orderStatus == '3' || item.orderStatus == '5' }}">
<view wx:if="{{ item.orderStatus == '2' }}" class="order-btn default-btn padding_20" bindtap="handleClickBtn" data-target="{{ item }}">战败</view>
<view wx:if="{{ item.orderStatus == '2' }}" class="order-btn padding_20" bindtap="handleClickBtn" data-target="{{ item }}" data-type="pay">{{btnTxt[item.orderStatus]}}</view>
<!-- 已支付保留签名入口 -->
<view wx:if="{{ item.orderStatus == '3'&& item.equityGoodsFlag == '1' }}" class="order-btn default-btn padding_20" bindtap="handleClickBtn" data-target="{{ item }}">客户签名</view>
<!-- 已支付/已完成未录单 -->
<view wx:if="{{ (item.orderStatus == '3' && item.equityOrderStatus == '0'&& item.equityGoodsFlag == '1') || (item.orderStatus == '5' && item.equityOrderStatus == '0'&& item.equityGoodsFlag == '1') }}" class="order-btn padding_20" bindtap="handleClickBtn" data-target="{{ item }}" data-type="handle">{{btnTxt[item.orderStatus]}}</view>
</block>
<block wx:else>
<view class="order-btn default-btn" bindtap="handleClickBtn" data-target="{{ item }}">{{btnTxt[item.orderStatus]}}</view>
<block wx:elif="{{ item.orderStatus != 6 }}">
<block wx:if="{{ item.orderStatus == '2' || item.orderStatus == '3' || item.orderStatus == '5' }}">
<view wx:if="{{ item.orderStatus == '2' }}" class="order-btn default-btn padding_20" bindtap="handleClickBtn" data-target="{{ item }}">战败</view>
<view wx:if="{{ item.orderStatus == '2' }}" class="order-btn padding_20" bindtap="handleClickBtn" data-target="{{ item }}" data-type="pay">{{btnTxt[item.orderStatus]}}</view>
<!-- 已支付保留签名入口 -->
<view wx:if="{{ item.orderStatus == '3'&& item.equityGoodsFlag == '1' }}" class="order-btn default-btn padding_20" bindtap="handleClickBtn" data-target="{{ item }}">客户签名</view>
<!-- 已支付/已完成未录单 -->
<view wx:if="{{ (item.orderStatus == '3' && item.equityOrderStatus == '0'&& item.equityGoodsFlag == '1') || (item.orderStatus == '5' && item.equityOrderStatus == '0'&& item.equityGoodsFlag == '1') }}" class="order-btn padding_20" bindtap="handleClickBtn" data-target="{{ item }}" data-type="handle">{{btnTxt[item.orderStatus]}}</view>
</block>
<block wx:else>
<view class="order-btn default-btn" bindtap="handleClickBtn" data-target="{{ item }}">{{btnTxt[item.orderStatus]}}</view>
</block>
</block>
</block>
</block>
</view>
</view>
</block>
</block>
</view>
<!-- <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">
<image class="icon-info" src="/packageEquity/images/icon-info.png"></image>
订单已支付,未录入权益合同
......@@ -294,4 +308,5 @@
<view class="btn" bindtap="confirmRepeal">确定</view>
</view>
</view>
</view>
\ No newline at end of file
</view>
<zy-pay-popup wx:if="{{showZyPayPopup}}" isListShow="{{true}}" show="{{showZyPayPopup}}" bindconfirm="zyPayConfirm"></zy-pay-popup>
\ No newline at end of file
......@@ -26,17 +26,17 @@ page {
padding-bottom: var(--fontSize30);
}
.box .remark_box{
.box .remark_box {
padding: var(--fontSize20);
}
.box .remark_box .label{
.box .remark_box .label {
font-size: var(--fontSize28);
color: #292D33;
margin: var(--fontSize20) 0 var(--fontSize24) var(--fontSize20);
}
.box .remark_box .textArea_box{
.box .remark_box .textArea_box {
font-size: var(--fontSize28);
background: #F7F8FA;
border: var(--fontSize2) solid #EFF0F2;
......@@ -44,12 +44,12 @@ page {
padding: var(--fontSize24);
}
.box .remark_box .textArea_box .textarea{
.box .remark_box .textArea_box .textarea {
height: var(--fontSize130);
width: 100%;
}
.box .remark_box .textArea_box .currentWordNumber{
.box .remark_box .textArea_box .currentWordNumber {
color: #BEC1C7;
text-align: right;
}
......@@ -260,6 +260,7 @@ page {
z-index: 99;
flex-direction: column;
}
.btns-con {
box-sizing: border-box;
display: flex;
......@@ -340,6 +341,7 @@ page {
line-height: var(--fontSize80);
text-align: right;
}
.picker .arrow {
width: var(--fontSize28);
height: var(--fontSize26);
......
......@@ -43,35 +43,35 @@ Component({
IMG_URL,
// 质检分数
scoreList: [{
name: '全部',
active: true,
value: ''
},
{
name: '0-20分',
subName: '(虚假接待)',
value: 1
},
{
name: '21-50分',
value: 2
},
{
name: '51-80分',
value: 3
},
{
name: '80分以上',
value: 4
}
name: '全部',
active: true,
value: ''
},
{
name: '0-20分',
subName: '(虚假接待)',
value: 1
},
{
name: '21-50分',
value: 2
},
{
name: '51-80分',
value: 3
},
{
name: '80分以上',
value: 4
}
],
maxDate: new Date().format('yyyy-MM-dd'),
// 客户类型
customerTypes: [
{
name: '全部',
active: true,
value: ''
name: '全部',
active: true,
value: ''
}
],
// 车型
......@@ -267,7 +267,7 @@ Component({
} = this.data
dateTime?.forEach(val => {
val.active = false,
val.startDateTime = ''
val.startDateTime = ''
val.endDateTime = ''
})
const setActiveFirstItem = (list) => {
......@@ -330,7 +330,7 @@ Component({
// 日期
if (e == 'dateTime') {
obj.startDateTime = startDateTime || '',
obj.endDateTime = endDateTime || ''
obj.endDateTime = endDateTime || ''
}
// 质检分数
if (e == 'scoreList') {
......@@ -382,7 +382,7 @@ Component({
['form.staffRangeList']: storeRangeList
})
// 超管获取所有质检门店/员工
if (userInfo?.isSuper || userInfo?.loginRole == 3) {
if (userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5) {
this.getStoreList()
}
},
......@@ -412,8 +412,8 @@ Component({
},
getStaffList(isFilterMerchant = false) {
let { storeRangeList, form } = this.data
let selectedMerchantData = form.selectedMerchantList?.map(val => { if (val.merchantNo) return val.merchantNo})
let allMerchantData = storeRangeList?.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 params = {
merchantNos: isFilterMerchant ? (selectedMerchantData?.length ? selectedMerchantData : allMerchantData) : allMerchantData
}
......@@ -479,7 +479,7 @@ Component({
orderResult[1].active = isFilterUpgrade && !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) orderResult[1].active = true
// else orderResult[1].active = false
......@@ -489,7 +489,7 @@ Component({
// this.setData({'form.orderResult': orderResult})
}
},
attached() {
wx.$util.getSystemInfo(info => {
let {
......
<!--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;"
hidden="{{!show}}">
<scroll-view scroll-y class="confirm-box" style="height:calc(100vh - {{navBarHeight - 2}}px);margin-top:{{navBarHeight - 2}}px;" hidden="{{!show}}">
<view class="main">
<view class="box">
<view class="title">
日期
</view>
<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'
vertical minDate="2020-10-01" maxDate="{{maxDate}}" minDate="2024-01-01" isComponents>
<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>
</calendar>
<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>-
......@@ -23,7 +21,7 @@
<view class="list-box">
<view class="item flex-block">
<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>
......@@ -33,8 +31,7 @@
</view>
<view class="list-box">
<block wx:for="{{form.scoreList}}" wx:key="index">
<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>
<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>
</block>
</view>
</view>
......@@ -44,8 +41,7 @@
</view>
<view class="list-box">
<block wx:for="{{form.customerTypes}}" wx:key="index">
<view class="item text-center {{item.active?'active':''}}" bindtap="choose" data-list-name="customerTypes"
data-index="{{index}}">{{item.name}}</view>
<view class="item text-center {{item.active?'active':''}}" bindtap="choose" data-list-name="customerTypes" data-index="{{index}}">{{item.name}}</view>
</block>
</view>
</view>
......@@ -55,8 +51,7 @@
</view>
<view class="list-box">
<block wx:for="{{form.carModels}}" wx:key="index">
<view class="item text-center {{item.active?'active':''}}" bindtap="choose" data-list-name="carModels"
data-index="{{index}}">{{item.name}}</view>
<view class="item text-center {{item.active?'active':''}}" bindtap="choose" data-list-name="carModels" data-index="{{index}}">{{item.name}}</view>
</block>
</view>
</view>
......@@ -66,18 +61,19 @@
</view>
<view class="list-box">
<block wx:for="{{form.orderResult}}" wx:key="index">
<view class="item text-center {{item.active?'active':''}}" bindtap="choose" data-list-name="orderResult"
data-index="{{index}}">{{item.name}}</view>
<view class="item text-center {{item.active?'active':''}}" bindtap="choose" data-list-name="orderResult" data-index="{{index}}">{{item.name}}</view>
</block>
</view>
</view>
<!-- 超管选择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-left">
门店
</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 class="list-box">
<view class="item text-center {{!form.selectedMerchantList.length?'active':''}}" bindtap="merchantChoose">全部</view>
......@@ -91,17 +87,18 @@
</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-left">
员工
</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 class="list-box">
<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"
data-index="{{index}}">{{item.staffName}}</view>
<view class="item text-center {{item.active?'active':''}}" bindtap="choose" hidden="{{index >= 12 && !staffShowMore}}" data-list-name="staffRangeList" data-index="{{index}}">{{item.staffName}}</view>
</block>
</view>
</view>
......@@ -111,4 +108,4 @@
<view class="btn done text-center" bindtap="confirm">确定</view>
</view>
</scroll-view>
<screen-select-popup show="{{showSelectPopup}}" bindconfirm="popupConfirm" bindcancel="hideStorePopup" bindfilterStore="filterPopupList" selectedData="{{form.selectedMerchantList}}" list="{{storeRangeList || []}}" bindupdata="updata"></screen-select-popup>
<screen-select-popup show="{{showSelectPopup}}" bindconfirm="popupConfirm" bindcancel="hideStorePopup" bindfilterStore="filterPopupList" selectedData="{{form.selectedMerchantList}}" list="{{storeRangeList || []}}" bindupdata="updata"></screen-select-popup>
\ No newline at end of file
......@@ -9,7 +9,7 @@ import {
getReceptionRecordList,
getRecordDetailList
} from "../../receptionRecordsApi"
let lastPath = null; // 用于存储上一次的路径
function throttle(func, delay) {
let timeoutId;
let lastExecTime = 0;
......@@ -98,23 +98,23 @@ Component({
statisticsObj: {},
dataActive: "today",
staticDataList: [{
label: "今日营业额",
value: "todayTurnover",
tipsLabel: "今日成交量",
tipsValue: "todayOrderNumber",
},
{
label: "本月营业额",
value: "monthTurnover",
tipsLabel: "本月成交量",
tipsValue: "monthOrderNumber",
},
{
label: "累计营业额",
value: "totalTurnover",
tipsLabel: "累计成交量",
tipsValue: "totalOrderNumber",
},
label: "今日营业额",
value: "todayTurnover",
tipsLabel: "今日成交量",
tipsValue: "todayOrderNumber",
},
{
label: "本月营业额",
value: "monthTurnover",
tipsLabel: "本月成交量",
tipsValue: "monthOrderNumber",
},
{
label: "累计营业额",
value: "totalTurnover",
tipsLabel: "累计成交量",
tipsValue: "totalOrderNumber",
},
],
itemDataList: [
// {
......@@ -168,12 +168,13 @@ Component({
menuText: "培训资料",
icon: "peixun_icon",
path: "packageEquity.trainingMaterials",
}, ],
},],
loginRoleLabel: {
1: "超管",
2: "商户管理员",
3: "区域督导",
3: "区域运营",
4: "驻店负责人",
5: '广联销售',
},
loginRole: "",
userInfo: {},
......@@ -341,10 +342,10 @@ Component({
changeSwiper(e) {
let name =
e.detail.current == 0 ?
"today" :
e.detail.current == 1 ?
"month" :
"total";
"today" :
e.detail.current == 1 ?
"month" :
"total";
this.setData({
current: e.detail.current,
dataActive: name,
......@@ -388,7 +389,7 @@ Component({
if (menuList.some((item) => item.menuText == "战败下单" && mode == 0)) {
menuList = menuList.filter((item) => item.menuText != "战败下单");
}
console.log('menuList', mode, menuList, );
console.log('menuList', mode, menuList,);
// 将menuList排序
menuList.sort((a, b) => a.sortVal - b.sortVal)
this.setData({
......@@ -421,8 +422,8 @@ Component({
orderResult: searchForm?.orderResult,
merchantNo: !searchForm?.merchantNo?.length ? (userInfo?.isSuper ? storeRangeList.map(v => {
if (v.merchantNo) return v.merchantNo
}) : userInfo?.loginRole == 3 ? '' : [userInfo?.default4SStoreInfo?.merchantId]) : searchForm?.merchantNo,
staffUuids: userInfo.isSuper || userInfo?.loginRole == 3 ? searchForm?.staffUuids : [userInfo.uuid]
}) : userInfo?.loginRole == 3 || userInfo.loginRole == 5 ? '' : [userInfo?.default4SStoreInfo?.merchantId]) : searchForm?.merchantNo,
staffUuids: userInfo.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5 ? searchForm?.staffUuids : [userInfo.uuid]
}
return obj
},
......@@ -440,7 +441,7 @@ Component({
this.onPageShow()
const isStaff = app.globalData.isStaff;
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,
isShowDefeatBtn: false
})
......@@ -448,7 +449,7 @@ Component({
storeInfo: wx.$util.getUserInfo()?.default4SStoreInfo || {},
userInfo,
isStaff,
isWait: !(userInfo?.isSuper || userInfo?.loginRole == 3)
isWait: !(userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5)
});
let {
menuList,
......@@ -474,7 +475,7 @@ Component({
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({
menuText: "BI报表",
path: "tabOperating.index",
......@@ -483,7 +484,7 @@ Component({
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({
menuText: "积分审批",
path: "pages.pointsReview",
......@@ -503,7 +504,7 @@ Component({
// });
// }
if (
(isStaff || userInfo.isSuper || userInfo.loginRole == 3) &&
(isStaff || userInfo.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5) &&
menuList.every((item) => item.menuText != "驻店日报")
) {
menuList.unshift({
......@@ -527,7 +528,7 @@ Component({
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({
menuText: "培训资料",
icon: "peixun_icon",
......@@ -539,6 +540,27 @@ Component({
let index = menuList?.findIndex((val) => val.menuText == "交车目标");
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.getData();
// 隐藏待办事项模块
......@@ -569,7 +591,7 @@ Component({
} = res
if (code == 0) {
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 != "接待记录")) {
menuList.push({
menuText: "接待记录",
......@@ -780,8 +802,8 @@ Component({
}
orderStaffValid({
sceneType: userInfo.sceneType,
})
sceneType: userInfo.sceneType,
})
.then((result) => {
console.log(result, "orderStaffValid");
if (result.data) {
......@@ -820,7 +842,7 @@ Component({
});
}
})
.catch((err) => {});
.catch((err) => { });
},
getStaffTargetTask() {
return new Promise(resolve => {
......@@ -828,7 +850,7 @@ Component({
let {
menuList
} = this.data;
if (userInfo?.isSuper || userInfo?.loginRole == 3) return
if (userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5) return
commonApi
.getStaffTargetTaskApi({
sceneType: 0,
......@@ -871,7 +893,7 @@ Component({
.setTaskDialog({
id: data[0]?.id,
})
.then(() => {});
.then(() => { });
}
} else {
wx.$util.showToast(message);
......@@ -991,6 +1013,7 @@ Component({
// }
// },
navGo: throttle(async function (e) {
// debugger
// wx.$util.showLoading('跳转中...')
let {
mode,
......@@ -1001,6 +1024,16 @@ Component({
item
} = e.currentTarget.dataset;
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.menuText == "驻店目标") {
return wx.$router.go(item.path, {
......@@ -1327,10 +1360,10 @@ Component({
wx.$router.go('packageEquity.receptionRecords')
wx.$track.setTrackData(0, 'see_more')
},
onHide(){
onHide() {
this.onPageHide()
},
onUnload(){
onUnload() {
this.onPageHide()
}
},
......
<!--packageCrowdFunding/pages/homePage/index/index.wxml-->
<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">
<view class="tips">
<view class="tips-text text-hide">
你好,
<text>{{loginRoleLabel[loginRole]|| ''}}{{userInfo.name || ''}}</text>
</view>
<view class="tips-text text-hide">
你好,
<text>{{loginRoleLabel[loginRole]|| ''}}{{userInfo.name || ''}}</text>
</view>
<view class="{{!waitInputCount ? 'constent_no_tips_box' : ''}} content_box">
<view class="swiper-wrap">
<swiper bindchange="changeSwiper">
<block wx:for="{{3}}" wx:key="index">
<swiper-item>
<view class="swiper-item">
<view class="total-wrap">
<view class="item">
<view class="title">{{current==0?'今日':current==1?'本月':'累计'}}产值</view>
<veiw class="number">
<text class="unit">¥</text>
<text>{{staticData.totalOutputValue||0}}</text>
</veiw>
</view>
<view class="item">
<view class="title">转化率</view>
<view class="number"><text>{{staticData.conversionRate > 100 ? 100 : staticData.conversionRate||0}}</text><text class="units">%</text></view>
</view>
</view>
<view class="{{!waitInputCount ? 'constent_no_tips_box' : ''}} content_box">
<view class="swiper-wrap">
<swiper bindchange="changeSwiper">
<block wx:for="{{3}}" wx:key="index">
<swiper-item>
<view class="swiper-item">
<view class="total-wrap">
<view class="item">
<view class="title">{{current==0?'今日':current==1?'本月':'累计'}}产值</view>
<veiw class="number">
<text class="unit">¥</text>
<text>{{staticData.totalOutputValue||0}}</text>
</veiw>
</view>
<view class="custom-statistic">
<view class="customItem" wx:for="{{ itemDataList }}" wx:key="index" wx:for-index="index">
<block wx:if="{{item.index==2||item.index==1}}">
<view class="label">
<text>{{item.label}} </text><text>/{{item.waitlabel}}</text>
</view>
<view class="number">
<view class="firstValue">{{staticData[item.value]||0}}</view>
<view class="lastValue">/{{staticData[item.waitValue]||0}}</view>
</view>
</block>
<block wx:else>
<view class="label">
{{item.label}}
</view>
<view class="number">
<text class="unit" wx:if="{{ item.unit }}">¥</text>
<view> {{staticData[item.value]||0}}</view>
</view>
</block>
</view>
<view class="item">
<view class="title">转化率</view>
<view class="number"><text>{{staticData.conversionRate > 100 ? 100 : staticData.conversionRate||0}}</text><text class="units">%</text></view>
</view>
</view>
</swiper-item>
</block>
</swiper>
<view class="dots">
<view wx:for="{{3}}" wx:key="index" wx:for-index="idx" class="dot {{current==idx?'active':''}}"></view>
</view>
</view>
<block wx:if="{{isWait&&todoList.length>0}}">
<view class="todo-list">
<view class="title">今日待办·{{todoList.length}}</view>
<view class="todo-items">
<view class="todo-item" wx:key="idx" wx:for="{{ispopUp?todoList:stodoList}}" wx:for-index="idx">
<view class="todo-item-title">
<image src="{{IMG_URL}}{{item.taskType=='1'?'warn':'task'}}.png" /><text>{{todos[item.taskId]}}</text>
<view class="custom-statistic">
<view class="customItem" wx:for="{{ itemDataList }}" wx:key="index" wx:for-index="index">
<block wx:if="{{item.index==2||item.index==1}}">
<view class="label">
<text>{{item.label}} </text><text>/{{item.waitlabel}}</text>
</view>
<view class="number">
<view class="firstValue">{{staticData[item.value]||0}}</view>
<view class="lastValue">/{{staticData[item.waitValue]||0}}</view>
</view>
</block>
<block wx:else>
<view class="label">
{{item.label}}
</view>
<view class="number">
<text class="unit" wx:if="{{ item.unit }}">¥</text>
<view> {{staticData[item.value]||0}}</view>
</view>
</block>
</view>
</view>
<view class="todo-item-info">{{item.content }}</view>
<view class="todo-item-btn" wx:if="{{item.taskId==2}}" bindtap="goto" data-id="{{item.taskId}}">去开单</view>
<view class="todo-item-btn" wx:elif="{{item.taskId==4}}" data-id="{{item.taskId}}" bindtap="goto">去处理</view>
<view class="todo-item-btn" wx:elif="{{item.taskId==1}}" data-id="{{item.taskId}}" bindtap="goto">去填写</view>
<view class="todo-item-btn" wx:else bindtap="closeRemind" data-id="{{item.taskId}}">关闭提醒</view>
</view>
</swiper-item>
</block>
</swiper>
<view class="dots">
<view wx:for="{{3}}" wx:key="index" wx:for-index="idx" class="dot {{current==idx?'active':''}}"></view>
</view>
</view>
<block wx:if="{{isWait&&todoList.length>0}}">
<view class="todo-list">
<view class="title">今日待办·{{todoList.length}}</view>
<view class="todo-items">
<view class="todo-item" wx:key="idx" wx:for="{{ispopUp?todoList:stodoList}}" wx:for-index="idx">
<view class="todo-item-title">
<image src="{{IMG_URL}}{{item.taskType=='1'?'warn':'task'}}.png" /><text>{{todos[item.taskId]}}</text>
</view>
<view class="todo-item-info">{{item.content }}</view>
<view class="todo-item-btn" wx:if="{{item.taskId==2}}" bindtap="goto" data-id="{{item.taskId}}">去开单</view>
<view class="todo-item-btn" wx:elif="{{item.taskId==4}}" data-id="{{item.taskId}}" bindtap="goto">去处理</view>
<view class="todo-item-btn" wx:elif="{{item.taskId==1}}" data-id="{{item.taskId}}" bindtap="goto">去填写</view>
<view class="todo-item-btn" wx:else bindtap="closeRemind" data-id="{{item.taskId}}">关闭提醒</view>
</view>
<view class="pack-up {{!ispopUp?'pack-up-active':''}}" wx:if="{{todoList.length>2}}" bindtap="packupList">
<image src="{{IMG_URL}}pack-up.png" />
</view>
<view class="pack-up {{!ispopUp?'pack-up-active':''}}" wx:if="{{todoList.length>2}}" bindtap="packupList">
<image src="{{IMG_URL}}pack-up.png" />
</view>
</view>
</block>
<view class="menu_box">
<block wx:for="{{ menuList }}" wx:key="index">
<view class="menu_item" bindtap="navGo" data-item="{{ item }}">
<view class="icon">
<image src="{{ IMG_URL}}crowdFunding/{{item.icon }}.png" mode="widthFix" />
</view>
<view class="text">{{item.menuText}}</view>
<view class="hot_icon" wx:if="{{ item.tipsNum }}">{{item.tipsNum}}</view>
<view class="bubble_icon" wx:if="{{ item.noRead }}"></view>
</view>
</block>
<view class="menu_box">
<block wx:for="{{ menuList }}" wx:key="index">
<view class="menu_item" bindtap="navGo" data-item="{{ item }}">
<view class="icon">
<image src="{{ IMG_URL}}crowdFunding/{{item.icon }}.png" mode="widthFix" />
</view>
<view class="text">{{item.menuText}}</view>
<view class="hot_icon" wx:if="{{ item.tipsNum }}">{{item.tipsNum}}</view>
<view class="bubble_icon" wx:if="{{ item.noRead }}"></view>
</view>
</block>
</view>
<!-- <view class="menu_box" wx:if="{{newMenuList.length}}">
</view>
<!-- <view class="menu_box" wx:if="{{newMenuList.length}}">
<block wx:for="{{ newMenuList }}" wx:key="index">
<view class="menu_item" bindtap="navGo" data-item="{{ item }}">
<view class="icon">
......@@ -101,8 +101,8 @@
</view>
</block>
</view> -->
</view>
<view class="receive-list" wx:if="{{storeRangeList.length || userInfo.loginRole == 3}}">
</view>
<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>
<!-- <text class="title">接待记录</text> -->
......
......@@ -22,15 +22,15 @@ Page({
showEmployeeName: false, // 是否展示销售顾问字段
isShowDefeatBtn: true,
loaded: false,
track_event_code:'staff_reception_list', //埋点动作类型
track_event_code: 'staff_reception_list', //埋点动作类型
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
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,
isShowDefeatBtn: false
})
......@@ -38,7 +38,7 @@ Page({
this.setData({
nothing: false
})
if (userInfo?.isSuper || userInfo?.loginRole == 3) {
if (userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5) {
this.getStoreList()
} else {
this.getReceptionList()
......@@ -86,8 +86,8 @@ Page({
orderResult: searchForm?.orderResult,
merchantNo: !searchForm?.merchantNo?.length ? (userInfo?.isSuper ? storeRangeList.map(v => {
if (v.merchantNo) return v.merchantNo
}) : userInfo?.loginRole == 3 ? '' : [userInfo?.default4SStoreInfo?.merchantId]) : searchForm?.merchantNo,
staffUuids: userInfo.isSuper || userInfo?.loginRole == 3 ? searchForm?.staffUuids : [userInfo.uuid]
}) : userInfo?.loginRole == 3 || userInfo.loginRole == 5 ? '' : [userInfo?.default4SStoreInfo?.merchantId]) : searchForm?.merchantNo,
staffUuids: userInfo.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5 ? searchForm?.staffUuids : [userInfo.uuid]
}
return obj
},
......
......@@ -6,7 +6,7 @@
<block wx:else>
<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-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>
</navigation-bar>
</block>
......
......@@ -16,8 +16,9 @@ Page({
loginRole: {
1: '超管',
2: '商户号',
3: '区域督导',
4: '驻店负责人'
3: '区域运营',
4: '驻店负责人',
5: '销售',
},
selectedUuid: '',
requestFlag: false
......@@ -41,7 +42,7 @@ Page({
// let checkAgree = await this.checkAgree()
// if (!checkAgree) return false
// 超管开通全部场景
if (loginUserObj?.isSuper || loginUserObj?.loginRole == 3) return
if (loginUserObj?.isSuper || loginUserObj?.loginRole == 3 || loginUserObj.loginRole == 5) return
// 获取4s店关联场景数据
getShopSceneConfig({ yqMerchantId }).then(result => {
if (!result?.length) return wx.$util.showToast('暂无开通业务,请联系总部管理员')
......@@ -275,12 +276,12 @@ Page({
get4SStoreList(loginUserObj) {
let { merchantId, isSuper, uuid, loginRole } = loginUserObj
// 超管跳过选择4s店页面
if (isSuper || loginRole == 3) {
if (isSuper || loginRole == 3 || loginRole == 5) {
// this.setShopMerchantObj(obj)
wx.$router.go('pages.sceneIndex')
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]) || {}
// 仅一家4s店
if (result?.length == 1) {
......@@ -324,7 +325,7 @@ Page({
if (e.active) {
yqMerchantId = e.merchantId
id = e.uuid
isSuper = e.isSuper || e.loginRole == 3
isSuper = e.isSuper || e.loginRole == 3 || e.loginRole == 5
}
})
......@@ -368,7 +369,7 @@ Page({
this.get4SStoreList(data.loginUserInfoList[0])
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])
return
}
......
<!-- style="padding-bottom:{{isFullSucreen?'var(--fontSize224)':'var(--fontSize160)'}}" -->
<view class="layout">
<!-- <view class="title">请选择登录的账号</view> -->
<!-- <view class="title">请选择登录的账号</view> -->
<view class="search-box">
<view class="search-input">
<block wx:if="{{!edit}}">
......@@ -15,18 +15,18 @@
</view>
</block>
<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>
</view>
</view>
<scroll-view class="list" scroll-y style="height: calc(100% - {{copyLoginUserInfoList && copyLoginUserInfoList.length >= 10 ? 120 : 50}}rpx);">
<block wx:if="{{flag}}">
<block wx:if="{{loginUserInfoList}}">
<block wx:for="{{loginUserInfoList}}" wx:key="index">
<view class="items {{item.active?'active':''}}" bindtap="chooseAccount" data-index="{{index}}" data-item="{{item}}">
<scroll-view class="list" scroll-y style="height: calc(100% - {{copyLoginUserInfoList && copyLoginUserInfoList.length >= 10 ? 120 : 50}}rpx);">
<block wx:if="{{flag}}">
<block wx:if="{{loginUserInfoList}}">
<block wx:for="{{loginUserInfoList}}" wx:key="index">
<view class="items {{item.active?'active':''}}" bindtap="chooseAccount" data-index="{{index}}" data-item="{{item}}">
<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')}}">
{{item.isSuper==true?'超管':item.userType==1?'商户':(item.loginRole == 3 ? '督导' : item.loginRole == 4 ? '驻店' : '员工')}}
<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 == 5? '销售':item.loginRole == 4 ? '驻店' : '员工'}}
</view>
</view>
<view class="left">
......@@ -39,26 +39,25 @@
</view>
<!-- userType 1商户号 2员工号 loginRole细化员工号角色 3区域督导 4驻店负责人 -->
<!-- <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')}}">
{{item.isSuper==true?'超管':item.userType==1?'商户号':(item.loginRole == 3 ? '区域督导' : item.loginRole == 4 ? '驻店负责人' : '员工号')}}
<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?'商户号':(itemloginRole == 3 || userInfo.loginRole == 5 ? '区域运营' : item.loginRole == 4 ? '驻店负责人' : '员工号')}}
</view>
<view class="icon">
<image src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/arrow-left.png" />
</view>
</view> -->
</view>
</block>
</block>
<block wx:else>
<view class="list-not" style="height: calc(100vh - {{isFullSucreen ? '159' :'125'}}px)" bindtap="getListSelectAccount">
点击刷新
</view>
</block>
</block>
</view>
</block>
</block>
<block wx:else>
<view class="list-not" style="height: calc(100vh - {{isFullSucreen ? '159' :'125'}}px)" bindtap="getListSelectAccount">
点击刷新
</view>
</block>
</block>
<view class="scrollSpase"></view>
</scroll-view >
<!-- <view class="btn-box {{isFullSucreen?'isFullSucreen-btn':''}}">
</scroll-view>
<!-- <view class="btn-box {{isFullSucreen?'isFullSucreen-btn':''}}">
<view class='btn' bindtap="choiceAccountLogin">确定</view>
</view> -->
</view>
</view>
\ No newline at end of file
......@@ -113,7 +113,7 @@
/* border: var(--fontSize2) solid #FF9D0A; */
background-color: #ff9d0a1a;
}
/* 区域督导 */
/* 区域运营 */
.items .right .midle_3{
color: #347BFF;
/* border: var(--fontSize2) solid #347BFF; */
......
......@@ -22,7 +22,7 @@ Page({
if (
!openSceneArr.includes(scene) &&
!userInfo?.isSuper &&
!(userInfo?.loginRole == 3)
!(userInfo?.loginRole == 3 || userInfo.loginRole == 5)
) {
this.setData({ jumpPageFlag: false });
return wx.$util.showToast("暂未开通此场景");
......@@ -68,7 +68,7 @@ Page({
*/
onLoad(options) {
wx.hideHomeButton({
success: (res) => {},
success: (res) => { },
});
this.getSceneArr();
},
......@@ -96,7 +96,7 @@ Page({
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {},
onReady() { },
/**
* 生命周期函数--监听页面显示
......@@ -117,25 +117,25 @@ Page({
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {},
onHide() { },
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {},
onUnload() { },
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {},
onPullDownRefresh() { },
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {},
onReachBottom() { },
/**
* 用户点击右上角分享
*/
onShareAppMessage() {},
onShareAppMessage() { },
});
......@@ -87,10 +87,10 @@ Page({
getMerchantList(e) {
let userInfo = wx.$util.getUserInfo()
let params = {
merchantId: userInfo?.isSuper || userInfo?.loginRole == 3 ? '' : userInfo?.merchantId,
staffUUID: userInfo?.isSuper || userInfo?.loginRole == 3 ? '' : userInfo?.uuid
merchantId: userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5 ? '' : userInfo?.merchantId,
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 => {
this.setData({
loginUserInfoList: result,
......
......@@ -26,7 +26,7 @@ Page({
if (
!openSceneArr.includes(scene) &&
!userInfo?.isSuper &&
!(userInfo?.loginRole == 3)
!(userInfo?.loginRole == 3 || userInfo.loginRole == 5)
) {
this.setData({ jumpPageFlag: false });
return wx.$util.showToast("暂未开通此场景");
......@@ -83,7 +83,7 @@ Page({
*/
onLoad(options) {
wx.hideHomeButton({
success: (res) => {},
success: (res) => { },
});
this.getSceneArr();
},
......@@ -136,7 +136,7 @@ Page({
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {},
onReady() { },
/**
* 生命周期函数--监听页面显示
......@@ -157,25 +157,25 @@ Page({
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {},
onHide() { },
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {},
onUnload() { },
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {},
onPullDownRefresh() { },
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {},
onReachBottom() { },
/**
* 用户点击右上角分享
*/
onShareAppMessage() {},
onShareAppMessage() { },
});
......@@ -16,7 +16,7 @@ Component({
this.setViewData()
let { userInfo } = this.data
// 非超管 获取转化人员 销售顾问
if (!(userInfo?.isSuper|| userInfo.loginRole == 3)) {
if (!(userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5)) {
if (wx.$orderListDateListScreenRefresh) { // 切换门店将数据清空
this.setData({
'form.userIdList': [],
......@@ -135,16 +135,16 @@ Component({
},
showStoreSelectPopup(e) {
let { type } = e.currentTarget.dataset
this.setData({storeType: type, showStoreSelectPopup: true})
this.setData({ storeType: type, showStoreSelectPopup: true })
},
hideStorePopup() {
this.setData({showStoreSelectPopup: false})
this.setData({ showStoreSelectPopup: false })
},
storeConfirm(e) {
let { storeType } = this.data
if (storeType == 1) this.setData({'form.selectedYqMerchantList': e?.detail})
if (storeType == 2) this.setData({'form.selectedMerchantList': e?.detail})
this.setData({showStoreSelectPopup: false})
if (storeType == 1) this.setData({ 'form.selectedYqMerchantList': e?.detail })
if (storeType == 2) this.setData({ 'form.selectedMerchantList': e?.detail })
this.setData({ showStoreSelectPopup: false })
},
choose(e) {
let { index, listName } = e.currentTarget.dataset
......@@ -224,8 +224,8 @@ Component({
this
)
},
/**预约状态 */
setInviteStatusList(n = 0) {
/**预约状态 */
setInviteStatusList(n = 0) {
let arr = [
{
name: '全部',
......
......@@ -2,11 +2,11 @@
<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="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-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 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="" />
......@@ -21,7 +21,7 @@
</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-left">
转化人员
......@@ -42,11 +42,11 @@
</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-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 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="" />
......@@ -61,11 +61,11 @@
</view>
</view>
<!-- 超管销售顾问 选择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-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 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="" />
......
......@@ -325,7 +325,7 @@ Page({
let userInfo = wx.$util.getUserInfo();
this.setData({
phoneShow: app.globalData.YQorderSetting?.yqPhoneConfig,
isMake: !(userInfo?.isSuper || userInfo?.loginRole == 3),
isMake: !(userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5),
});
// this.getStatByPeriod()
// this.getiIviteRecord()
......
......@@ -12,35 +12,35 @@ Page({
navStyle: 'background-color: rgba(0,0,0,0);box-shadow:none;',
workCount: 0,
workItem: [{
label: '上午 09:00-10:30',
startTime: '09:00',
endTime: '10:30',
maxCount: 0
},
{
label: '上午 10:30-12:00',
startTime: '10:30',
endTime: '12:00',
maxCount: 0
},
{
label: '下午 13:00-14:30',
startTime: '13:00',
endTime: '14:30',
maxCount: 0
},
{
label: '下午 14:30-16:00',
startTime: '14:30',
endTime: '16:00',
maxCount: 0
},
{
label: '下午 16:00-17:30',
startTime: '16:00',
endTime: '17:30',
maxCount: 0
}
label: '上午 09:00-10:30',
startTime: '09:00',
endTime: '10:30',
maxCount: 0
},
{
label: '上午 10:30-12:00',
startTime: '10:30',
endTime: '12:00',
maxCount: 0
},
{
label: '下午 13:00-14:30',
startTime: '13:00',
endTime: '14:30',
maxCount: 0
},
{
label: '下午 14:30-16:00',
startTime: '14:30',
endTime: '16:00',
maxCount: 0
},
{
label: '下午 16:00-17:30',
startTime: '16:00',
endTime: '17:30',
maxCount: 0
}
],
grassNum: '',
showMerchantPop: false,
......@@ -53,8 +53,9 @@ Page({
loginRoleLabel: {
1: '超管',
2: '商户管理员',
3: '区域督导',
4: '驻店负责人'
3: '区域运营',
4: '驻店负责人',
5: '广联销售',
},
selectedSceneName: '',
selectedSceneDesc: '',
......@@ -81,7 +82,7 @@ Page({
res = await api.getStaffBankList({
uuid: userInfo.uuid
})
console.log(res)
console.log(res)
if (res.data && res.data.length) {
this.data.staffBankFlag = true
const [staffBankInfo] = res.data
......@@ -90,8 +91,8 @@ Page({
this.setData({
showAccountErrorModal: true
})
}
}
}
},
//我的积分
toPoint() {
......@@ -178,7 +179,7 @@ Page({
navBarHeight
})
},
noScroll() {},
noScroll() { },
showWork() {
let {
showWorkBox
......@@ -201,7 +202,7 @@ Page({
},
userInfo
} = this.data
if (userType == 2 || userInfo.loginRole == 3) return
if (userType == 2 || userInfo?.loginRole == 3 || userInfo.loginRole == 5) return
let value = workItem[index].maxCount
value += count
if (value < 0) value = 0
......@@ -250,7 +251,7 @@ Page({
},
userInfo
} = this.data
if (userType == 2 || userInfo.loginRole == 3) {
if (userType == 2 || userInfo?.loginRole == 3 || userInfo.loginRole == 5) {
this.showWork()
return
}
......@@ -410,16 +411,16 @@ Page({
// this.getTotal()
let userInfo = wx.$util.getUserInfo()
this.setData({
isForbidden: !(userInfo?.isSuper || userInfo?.loginRole == 3),
isForbidden: !(userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5),
isYqdSuper: app.globalData.isYqdSuper,
selectedSceneName: constantData?.sceneList?.filter(val => val.sceneType == userInfo?.sceneType)[0]?.sceneName,
selectedSceneDesc: constantData?.sceneList?.filter(val => val.sceneType == userInfo?.sceneType)[0]?.sceneDesc
})
this.getVersionInfo()
this.getByYqShop()
// this.getStaffBankList()
// console.log(app.globalData.isYqdSuper)
},
// jump: e => wx.$router.jump(e),
......@@ -435,7 +436,7 @@ Page({
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {},
onReady: function () { },
/**
* 生命周期函数--监听页面显示
......@@ -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({
this.setViewData()
let { userInfo } = this.data
// 非超管 获取转化人员 销售顾问
if (!(userInfo?.isSuper || userInfo.loginRole == 3)) {
if (!(userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5)) {
if (wx.$orderListDateListScreenRefresh) { // 切换门店将数据清空
this.setData({
'form.userIdList': [],
......@@ -204,7 +204,7 @@ Component({
init() {
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 => {
let { code, message } = res
......
......@@ -2,11 +2,11 @@
<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="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-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 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="" />
......@@ -21,7 +21,7 @@
</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-left">
转化人员
......@@ -42,11 +42,11 @@
</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-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 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="" />
......@@ -61,11 +61,11 @@
</view>
</view>
<!-- 超管销售顾问 选择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-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 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="" />
......
......@@ -69,9 +69,9 @@ Page({
});
},
// 确定是否要显示
showSelectType({ scene = "", item = {}}, scan = false) {
let {isSettingExpiredTraffic} = this.data
this.setData({isScan: scan})
showSelectType({ scene = "", item = {} }, scan = false) {
let { isSettingExpiredTraffic } = this.data
this.setData({ isScan: scan })
// 当切换门店后,不支持录入失效客户工单,将selectType置为1录入工单
if ((!isSettingExpiredTraffic || scan) && this.data.selectType == 3) {
this.setData({
......@@ -169,6 +169,7 @@ Page({
});
wx.hideTabBar();
},
async jump(e) {
// 订单状态 1 待跟进, 2 不升级, 3 待支付,4 已支付,6 已评价 ,9 已撤销 , 10 已关闭 , 11 已失效
// constructionFlag 施工标识(Y:已施工;N||null:未施工)
......@@ -692,8 +693,8 @@ Page({
let userInfo = wx.$util.getUserInfo()
let merchantType = userInfo?.merchantAccountList.includes("6") || userInfo?.merchantAccountList.includes("8")
if (merchantType && !userInfo?.isSuper && userInfo?.loginRole != 3 && userInfo?.userType == 2 && userInfo?.shopMerchantId) {
api.getServiceBaseInfo({merchantId: userInfo?.shopMerchantId}).then(res => {
this.setData({isSettingExpiredTraffic: res?.data?.trafficExpireFlag == 'Y'})
api.getServiceBaseInfo({ merchantId: userInfo?.shopMerchantId }).then(res => {
this.setData({ isSettingExpiredTraffic: res?.data?.trafficExpireFlag == 'Y' })
})
}
},
......@@ -704,7 +705,7 @@ Page({
// this.test()
let userInfo = wx.$util.getUserInfo();
this.setData({
isMake: !(userInfo?.isSuper || userInfo?.loginRole == 3),
isMake: !(userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5),
});
this.getCreateOrderSetting()
},
......
......@@ -271,8 +271,8 @@ Page({
}
},
checkLoginMessage(needSelectAccount, loginUserObj) {
// 记录登录信息 已选园区店、4s店(或是超管/区域督导)和场景
if (!needSelectAccount && Object.keys(loginUserObj)?.length && (loginUserObj?.shopMerchantId || loginUserObj?.isSuper || loginUserObj?.loginRole == 3) && !((loginUserObj?.sceneType ?? '') === '')) {
// 记录登录信息 已选园区店、4s店(或是超管/区域运营)和场景
if (!needSelectAccount && Object.keys(loginUserObj)?.length && (loginUserObj?.shopMerchantId || loginUserObj?.isSuper || loginUserObj?.loginRole == 3 || loginUserObj?.loginRole == 5) && !((loginUserObj?.sceneType ?? '') === '')) {
this.getYqMerchantSceneConfig(loginUserObj, 0)
} else if (!needSelectAccount && Object.keys(loginUserObj)?.length && loginUserObj?.shopMerchantId && (loginUserObj?.sceneType ?? '') === '') { // 已选园区店、4s店
this.getYqMerchantSceneConfig(loginUserObj, 1)
......@@ -569,11 +569,11 @@ Page({
loginRole
} = loginUserObj
get4SStoreList({
merchantId: isSuper || loginRole == 3 ? undefined : merchantId,
staffUUID: isSuper || loginRole == 3 ? undefined : uuid
}, isSuper || loginRole == 3, true).then(result => {
// 超管/区域督导跳过选择4s店
if (isSuper || loginRole == 3) {
merchantId: isSuper || loginRole == 3 || loginRole == 5 ? undefined : merchantId,
staffUUID: isSuper || loginRole == 3 || loginRole == 5 ? undefined : uuid
}, isSuper || loginRole == 3 || loginRole == 5, true).then(result => {
// 超管/区域运营跳过选择4s店
if (isSuper || loginRole == 3 || loginRole == 5) {
let {
merchantName,
merchantId
......
......@@ -3,9 +3,9 @@ import api from "~/api/api.js";
let eventRequest = [];
const checkDailyReport = async (sceneType) => {
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(
......@@ -121,7 +121,7 @@ const equityStaffDailyReport = (userInfo) => {
if (
wx.__HAS_NOTLOGIN_MODAL ||
userInfo?.isSuper ||
userInfo?.loginRole == 3
userInfo?.loginRole == 3 || userInfo.loginRole == 5
)
return false;
addModalToQueue(
......
......@@ -311,7 +311,7 @@ export const setWebSocket = () => {
}
/** 获取园区店下的4S店 */
export const get4SStoreList = (options, isSupervision, noScene) => { // isSupervision是否是区域督导/超管 noScene登录未选场景时
export const get4SStoreList = (options, isSupervision, noScene) => { // isSupervision是否是区域运营/超管 noScene登录未选场景时
return new Promise((resolve, reject) => {
wx.$util.showLoading()
options.sceneType = options.scene
......
......@@ -166,7 +166,7 @@ Page({
}
let userInfo = wx.$util.getUserInfo();
this.setData({
isOrder: !(userInfo?.isSuper || userInfo?.loginRole == 3),
isOrder: !(userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5),
});
this.checkPhoneShow(app.globalData.YQorderSetting?.yqPhoneConfig);
},
......
......@@ -413,7 +413,7 @@
</modal>
<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="请选择交易参考号" />
<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" />
</block>
<block wx:else>
......
......@@ -254,8 +254,9 @@ export default {
loginRoleLabel: {
1: "超管",
2: "商户管理员",
3: "区域督导",
3: "区域运营",
4: "驻店负责人",
5: '广联销售',
},
// 个人产值过滤条件
changeBtnData: [
......
......@@ -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.popup.need", data);
},
/** 查询4s店填写驻店日报的品牌列表 */
staffDailyReportMerchantCarBand(data) {
return api.post("dj.api.smartcarlife.staff.daily.report.car.brand", data);
},
/** 无需补录订单 */
noNeedSupplementOrder(data) {
return api.post("dj.api.smartcarlife.order.noNeedSupplementOrder", data);
......@@ -235,8 +240,33 @@ module.exports = {
return api.post("dj.api.smartcarlife.weapp.waitinputorder.count", params);
},
/** 质保价格编辑接口 */
modifyWarrantyPrice(data) {
/** 质保价格编辑接口 */
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({
userInfo: o,
isYqdSuper: app.globalData.isYqdSuper,
isStaff: app.globalData.isStaff,
isMake: !(userInfo?.isSuper || userInfo?.loginRole == 3),
isMake: !(userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5),
});
},
......
......@@ -173,7 +173,7 @@ Page({
baseConfigData
})
this.getOrderDetail(options.orderCode)
this.setData({
orderCode: options.orderCode
})
......@@ -203,7 +203,7 @@ Page({
isYqdSuper: app.globalData.isYqdSuper,
isStaff: app.globalData.isStaff,
userInfo: o,
isMake: !(userInfo?.isSuper || userInfo?.loginRole == 3)
isMake: !(userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5)
})
},
......@@ -280,12 +280,12 @@ Page({
if (!e.filmRollNo && e.filmNumberData?.length == 1) e.filmRollNo = e.filmNumberData[0]
}
}
if(data.packageGoodsList){
if (data.packageGoodsList) {
data.packageGoodsList.forEach(item => {
item.packageGoodsOrderList.forEach(g=>{
g.price= g.totalPrice?Number(g.totalPrice) / Number(g.number):g.upgradePrice
item.packageGoodsOrderList.forEach(g => {
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) => {
return prev + Number(cur.totalPrice) / Number(cur.number)
}, 0)
......@@ -298,7 +298,7 @@ Page({
total_price += item.totalPrice
})
}
data = {
...data.customer,
...data.payOrder,
......@@ -376,14 +376,14 @@ Page({
let params = {
orderCode
}
let {total_price}=this.data.orderInfo;
let { total_price } = this.data.orderInfo;
const positionTypeList = await getPositionList() || []
api.getPackageGoodsDetail(params).then(res => {
res.data.packageGoodsList.forEach(item => {
item.packageGoodsOrderList.forEach(g=>{
g.price= g.totalPrice?Number(g.totalPrice) / Number(g.number):g.upgradePrice
item.packageGoodsOrderList.forEach(g => {
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) => {
return prev + Number(cur.totalPrice) / Number(cur.number)
}, 0)
......@@ -393,13 +393,13 @@ Page({
item.packageGoodsOrderList.forEach(g => {
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) {
this.setData({
packageGoodsList: res.data.packageGoodsList,
'orderInfo.total_price': Number(wx.$util.decimal(total_price, 2)).toFixed(2)
'orderInfo.total_price': Number(wx.$util.decimal(total_price, 2)).toFixed(2)
})
}
})
......@@ -527,7 +527,7 @@ Page({
warrantyCardList
})
})
.catch(err => {})
.catch(err => { })
}, 1000 * index)
})
},
......@@ -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
// 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
{
"component": true,
"usingComponents": {
"van-dialog": "@vant/weapp/dialog/index"
}
}
\ 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
<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
// 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
{
"component": true,
"usingComponents": {
"dialog": "../Dialog/Dialog",
"time-picker": "../timePicker/index"
}
}
\ 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
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!