Commit 56cf94ad by 前端

Merge branch 'develop' into 'master'

上线合并

See merge request !362
2 parents 9e571bff f8851b1a
......@@ -219,5 +219,9 @@ module.exports = {
// 更新客户签名
updateCustomerNameUrlAPI(data) {
return api.post("dj.api.smartcarlife.vehicle.damage.upgrade.equityOrder.updateCustomerNameUrl", data)
},
// 校验流水号
checkRecord(data) {
return api.post("dj.api.smartcarlife.vehicle.damage.upgrade.quotation.record.check", data)
}
}
......@@ -15,8 +15,10 @@ Component({
if (n) {
let sysInfo = wx.getSystemInfoSync()
// sysInfo.environment 1 企业微信打开 0微信打开
// sysInfo.platform === 'windows' || sysInfo.platform === 'mac' || sysInfo.platform === 'linux' 是否pc端打开
this.setData({
envName: sysInfo.environment ? 1 : 0
envName: sysInfo.environment ? 1 : 0,
envPlat: sysInfo.platform === 'windows' || sysInfo.platform === 'mac' || sysInfo.platform === 'linux' ? 1 : 0
})
}
}
......@@ -53,27 +55,30 @@ Component({
let _this = this
let { fileList } = _this.data
wx.chooseImage({
count: 1,
count: 9 - fileList?.length,
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
const uploadImages = async (tempFilePaths) => {
try {
for (const val of tempFilePaths) {
const imgType = val.split('.')[1]
const type = imgType === 'unknown' ? 'jpg' : imgType
const _res = await new Promise((resolve, reject) => {
wx.getFileSystemManager().readFile({
filePath: val, // 选择图片返回的相对路径
encoding: 'base64', // 编码格式
success: resolve,
fail: reject
})
})
const img = await api.uploadImg({
file: `${type}@${_res.data}`
})
let { code, data, message } = img
const { code, data, message } = img
if (code == 0) {
fileList.push({url: data})
fileList.push({ url: data })
_this.setData({
fileList,
showChangeFileType: false,
......@@ -82,14 +87,16 @@ Component({
} else {
wx.$util.showToast(message)
}
})
},
fail() {
}
} catch (error) {
wx.$util.showToast("上传失败,请重试")
} finally {
_this.setData({
loadingFlag: false
})
}
})
}
}
uploadImages(res?.tempFilePaths)
}
})
},
......@@ -97,94 +104,123 @@ Component({
// 图片预览
previewImage(e) {
let { url, index } = e.currentTarget.dataset
let imageUrl = url?.map(v => { return v.url})
wx.previewImage({
urls: url,
current: url[index]
urls: imageUrl,
current: imageUrl[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 => {
async uploadPDFs() {
let { envPlat, envName } = this.data
if (envPlat == 1 || envName == 1) { // 企微或在pc端打开登录小程序使用跳转h5上传方式
this.setData({
showChangeFileType: false,
show: false
})
const { zyWebViewUrl } = await wx.$util.getMockData()
let path = `${zyWebViewUrl}/#/zyUpload`
return wx.navigateTo({
url: `/pages/webView/webView?url=${encodeURIComponent(path)}`,
events: {
webViewMessage: (data) => {
if (data == 'cancel') { // 稍后补录
return this.close('', 2)
} else { // 确认上传
this.setData({
fileList: [data]
})
this.confirm('', 2)
}
}
}
})
} else { // 移动端微信打开使用打开微信会话选择文件方式
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
})
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);
}
})
console.error('读取文件失败', err);
}
});
},
fail(err) {
console.error('选择文件失败', err);
}
})
}
},
deleteFile(e) {
this.setData({
fileList: []
})
let { index } = e.currentTarget.dataset
let { fileList } = this.data
fileList.splice(index, 1)
this.setData({fileList})
},
closeChangeUploadType() {
this.setData({showChangeFileType: false})
},
close() {
close(e, pageBackNum) {
// pageBackNum 从h5返回页面层级数
let { isListShow } = this.data
if (isListShow) return this.setData({show: false, fileList: []})
let thisPage = wx.$router.getPageInstance()
let thisPage = wx.$router.getPageInstance(pageBackNum || 1)
thisPage.setData({
['orderInfo.zyPayUrl']: '',
confirmStatus: false
})
thisPage.handleSecondConfirm('cancel')
},
confirm(e) {
confirm(e, pageBackNum) {
// pageBackNum 从h5返回页面层级数
let { fileList, isListShow } = this.data
let thisPage = wx.$router.getPageInstance()
let thisPage = wx.$router.getPageInstance(pageBackNum || 1)
if (fileList.length) {
if (isListShow) {
this.triggerEvent('confirm', {zyPayUrl: fileList.map(item => item.url)[0]})
this.triggerEvent('confirm', {zyPayUrl: fileList.map(item => item.url)})
} else {
thisPage.setData({
['orderInfo.zyPayUrl']: fileList.map(item => item.url)[0],
['orderInfo.zyPayUrl']: fileList.map(item => item.url)?.join(','),
confirmStatus: false
})
thisPage.handleSecondConfirm()
......
......@@ -15,8 +15,8 @@
}
}
.upload_content{
width: var(--fontSize192);
height: var(--fontSize192);
width: var(--fontSize200);
height: var(--fontSize200);
background: #F5F5F7;
border-radius: var(--fontSize8);
display: flex;
......@@ -33,12 +33,17 @@
margin-top: var(--fontSize20);
}
}
.content_box{
display: flex;
flex-wrap: wrap;
gap: var(--fontSize20);
}
.image_content{
display: inline-block;
position: relative;
.image_box{
width: var(--fontSize192);
height: var(--fontSize192);
width: var(--fontSize200);
height: var(--fontSize200);
}
.del_icon{
width: var(--fontSize36);
......
......@@ -21,9 +21,15 @@
<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 class="content_box">
<view class="image_content" wx:for="{{fileList}}" wx:key="index">
<image bindtap="previewImage" class="image_box" data-url="{{fileList}}" data-index="{{index}}" src="{{item.url}}"/>
<image class="del_icon" src="{{IMG_URL}}zy_del_icon.png" mode="" bindtap="deleteFile" data-index="{{index}}" />
</view>
<view class="upload_content" bindtap="uploadImages" wx:if="{{fileList.length < 9}}">
<image src="{{IMG_URL}}zy-upload_icon.png"></image>
<text class="text">最多9张</text>
</view>
</view>
</block>
<block wx:else>
......@@ -50,7 +56,7 @@
<view class="popup-content">
<view class="title">请选择</view>
<view class="popup-item" bindtap="uploadImages">上传图片</view>
<view class="popup-item" wx:if="{{envName != 1}}" bindtap="uploadPDFs">上传PDF</view>
<view class="popup-item" bindtap="uploadPDFs">上传PDF</view>
</view>
</van-popup>
</block>
......
......@@ -10,7 +10,8 @@ import {
errorOrderById,
staffDailyReportMerchantValid,
updateOrderStatus,
orderSettingList
orderSettingList,
checkRecord
} from "../../../api";
import { quotedImgUrl } from "~/config";
import dataForm from '../components/constant/stepData'
......@@ -494,14 +495,25 @@ Page({
// 门店收款且是智界/享界车型 弹出上传延保协议
try {
return new Promise(async (resolve, reject) => {
// 当延保协议弹窗点击稍后补录会传值detail:cancel, 提交表单时不会重复弹出延保协议弹出
if (check && orderInfo.payType == 2 && carBrandList?.includes(orderInfo?.owner?.carChildsBrandId) && detail != 'cancel' && !orderInfo?.zyPayUrl) {
// 当延保协议弹窗点击稍后补录会传值detail:cancel, 提交表单时不会重复弹出延保协议弹出 标记错误订单的补录时无需上传延保协议
if (check && orderInfo.payType == 2 && carBrandList?.includes(orderInfo?.owner?.carChildsBrandId) && detail != 'cancel' && !orderInfo?.zyPayUrl && !orderInfo.resetOrder) {
// 添加流水号校验
wx.hideLoading()
this.setData({
showPopup: false
})
reject()
return this.setData({showZyPopup: true})
let result = await checkRecord({transactionNo: orderInfo.transactionNo})
let { code, message } = result
if (code == 0) {
this.setData({
showPopup: false
})
reject()
return this.setData({showZyPopup: true})
} else {
reject()
this.setData({
confirmStatus: false
})
return wx.$util.showToast(message)
}
}
// let { orderInfo } = this.data
console.log("调接口---");
......
......@@ -7,7 +7,8 @@ import {
orderStatistics,
cancelOrderById,
getQuotationInfoById,
updateCustomerInfo
updateCustomerInfo,
errorOrderById
} from "../../../api";
import { checkDailyReport } from "~/store/ModalToQueueControl";
import data from "../constant/data";
......@@ -147,7 +148,8 @@ Component({
repealVisible: false,
repealReason: '',
repealId: '',
zyPayStatus: '' // 延保协议状态
zyPayStatus: '', // 延保协议状态
selectType: 1
},
observers: {
mode: function (value) {
......@@ -353,8 +355,9 @@ Component({
item.isTouchMove = false;
// onlyRepeal 战败且为超管,或者是待报价、待支付的非融合都可撤销
item.onlyRepeal = ((item.orderStatus == 2 || item.orderStatus == 0) || (item.orderStatus == -1 && this.data.userInfo.isSuper)) && item.mode != 0;
// 待上传的支持可撤销
item.repeal =
((item.orderStatus == 3 || item.orderStatus == 5) &&
((item.orderStatus == 3 || item.orderStatus == 5 || item.orderStatus == 7) &&
item.mode != 0) || item.onlyRepeal;
return item;
});
......@@ -457,6 +460,11 @@ Component({
zyPayStatus: e.detail == (tabList?.length - 1) && !e.zyPayStatus ? 1 : e.zyPayStatus ? e.zyPayStatus : '', // 当tab选中最后一项或筛选页面存在值
list: []
});
const thisPage = wx.$router.getPageInstance();
thisPage.setData({
orderStatus,
zyPayStatus: e.detail == (tabList?.length - 1) && !e.zyPayStatus ? 1 : e.zyPayStatus ? e.zyPayStatus : ''
})
this.search();
this.getOrderStatistics();
},
......@@ -466,6 +474,9 @@ Component({
console.log(target);
// 上传延保协议
if (target?.zyPayStatus == '1' && type == 'upload') {
// 校验是否填写昨日日报
let staffCheck = await checkDailyReport(true);
if (staffCheck) return false;
return this.setData({showZyPayPopup: true, showZyTarget: target})
}
// wx.$router.go('createOrderCarQuotation', {
......@@ -576,15 +587,20 @@ Component({
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()
let { code, message, data } = res
if (code == 0) {
let orderInfo = this.getInsurance(data)
// 更新客户信息
updateCustomerInfo({...orderInfo, zyPayUrl: e.detail?.zyPayUrl?.join(',')}).then(result => {
this.setData({
showZyPayPopup: false
}, () => {
this.search()
})
})
})
} else {
wx.$util.showToast(message)
}
})
},
remarkCancel() {
......@@ -896,6 +912,31 @@ Component({
title: "工单标记",
tabTitleShow: false,
success: (res) => {
this.showErrorType(item);
},
error: () => { },
});
}
);
},
selectType(e) {
let { type } = e.currentTarget.dataset;
this.setData({
selectType: type,
});
},
// 确定是否要显示
showErrorType(item) {
wx.$modal(
this,
{
show: true,
title: "请选择录单入口",
tabTitleShow: false,
success: (res) => {
// 跳转新增订单页面 并带特定参数
let { selectType } = this.data;
if (selectType == 1) {
wx.$router.go(
item.mode != 0
? "createOrderCarQuotationSimple"
......@@ -905,10 +946,23 @@ Component({
resetOrder: true,
}
);
},
error: () => { },
});
}
} else {
// 无需补录
errorOrderById({oldQuotationId: item.id, needCreateNewOrder: false}).then(res => {
let { code, message } = res
if (code == 0) {
this.search()
} else {
wx.$util.showToast(message)
}
}).catch(() => {
})
}
},
error: () => { },
},
"#modal2"
);
},
jumpReception(e) {
......@@ -942,7 +996,7 @@ Component({
let name = constantData.orderStatusList.find(
(item) => item.confId == e.detail.orderStatus
)?.confName;
tabIndex = tabList.findIndex((item) => item.text == name);
tabIndex = tabList.findIndex((item) => item.text && item.text == name);
if (tabIndex == -1) tabIndex = 0;
}
if (e.detail.zyPayStatus && e.detail.zyPayStatus[0] == 1) {
......
......@@ -90,7 +90,7 @@
</block>
<view class="header-status">
<!-- 待上传延保协议且是已支付的订单 -->
<block wx:if="{{item.zyPayStatus == 1 && (item.orderStatus == 3 || item.orderStatus == 4)}}">
<block wx:if="{{item.zyPayStatus == 1 && (item.orderStatus == 3 || item.orderStatus == 4 || item.orderStatus == 7)}}">
<view class="default-txt">待上传</view>
</block>
<block wx:else>
......@@ -193,7 +193,7 @@
<view class="item-footer">
<!-- 超管isSuper/商户类型 userType 1账号不可操作 -->
<block wx:if="{{ !userInfo.isSuper && userInfo.userType == 2||staffUuid }}">
<block wx:if="{{ item.zyPayStatus == 1 && (item.orderStatus == 3 || item.orderStatus == 4) }}">
<block wx:if="{{ item.zyPayStatus == 1 && (item.orderStatus == 3 || item.orderStatus == 4 || item.orderStatus == 7) }}">
<view class="btn_class">
<block wx:if="{{ item.orderStatus != '0' }}">
<view class="order-btn default-btn padding_20" bindtap="jumpReception" data-item="{{ item }}">接待记录</view>
......@@ -297,6 +297,18 @@
</view>
</view>
</modal>
<modal id="modal2" class="modal" custom="true" btns="{{ ['取消','确定'] }}">
<view class="modatcontent">
<view class="modalbox {{ selectType == 1?'act': '' }} com" bindtap="selectType" data-type="1">
<gl-image class="icon" src="/miniProgram/order1.png"></gl-image>
新增工单
</view>
<view class="modalbox cancle {{ selectType == 2?'act': '' }}" bindtap="selectType" data-type="2">
<gl-image class="icon" src="/miniProgram/order2.png"></gl-image>
无需补单
</view>
</view>
</modal>
<view class="repeal-modal" wx:if="{{ repealVisible }}">
<view class="repeal-wrap">
<view class="title">撤销原因</view>
......
......@@ -778,7 +778,7 @@
.modatcontent {
box-sizing: border-box;
padding: var(--fontSize48) 0;
padding: var(--fontSize48);
}
.modal text,
......@@ -799,6 +799,41 @@
color: #347BFF;
}
.modal .icon {
width: var(--fontSize96);
height: var(--fontSize96);
margin-right: var(--fontSize30);
}
.modalbox {
display: flex;
align-items: center;
box-sizing: border-box;
width: var(--fontSize522);
height: var(--fontSize136);
background: #F7F8FA;
border-radius: var(--fontSize8);
font-family: PingFangSC-Medium;
font-weight: 500;
font-size: var(--fontSize28);
color: #292D33;
padding-left: var(--fontSize24);
margin: 0 auto;
}
.modalbox:last-child {
margin-top: var(--fontSize16);
}
.act {
background: #347bff1a;
border: var(--fontSize2) solid #347BFF;
color: #3582EE;
}
.modatcontent {
padding: var(--fontSize50) var(--fontSize48) var(--fontSize32);
}
.copy_icon {
width: var(--fontSize28);
height: var(--fontSize28);
......
......@@ -4,7 +4,8 @@ Page({
* 页面的初始数据
*/
data: {
flag: true
flag: true,
isH5Bind: false
},
getParams(str) {
let params = str.split('?')
......@@ -72,15 +73,35 @@ Page({
}
},
handleMessage(e) {
const { data } = e.detail;
// 将数据返回给跳转来源
if (data) {
const eventChannel = this.getOpenerEventChannel();
eventChannel.emit('webViewMessage', data[0]); // 发送数据
this.setData({
isH5Bind: true
})
}
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
let { url } = this.data
if (this.refresh) {
this.setData({
flag: false
})
}
// 中邮上传延保协议页面
if (url.includes('zyUpload')) {
const eventChannel = this.getOpenerEventChannel();
if (!this.data.isH5Bind) {
eventChannel.emit('webViewMessage', 'cancel'); // 发送数据
}
}
},
/**
......
<!-- <web-view src="{{url}}"></web-view> -->
<block wx:if="{{flag}}">
<web-view src="{{url}}"></web-view>
<web-view src="{{url}}" bindmessage="handleMessage"></web-view>
</block>
\ No newline at end of file
......@@ -75,7 +75,7 @@ Page({
},
showStorePicker() {
let { userInfo } = this.data
; (userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5) &&
; (userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo?.loginRole == 5) &&
this.setData({
showPicker: true,
pickerType: 'merchant'
......@@ -83,7 +83,7 @@ Page({
},
showStaffPicker() {
let { userInfo } = this.data
; (userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5) &&
; (userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo?.loginRole == 5) &&
this.setData({
showPicker: true,
pickerType: 'staff'
......@@ -201,7 +201,7 @@ Page({
.staffDailyReportApprove(params)
.then(res => {
wx.$util.hideLoading()
// console.log(res)
console.log(res)
let { code, data, message } = res
if (code == 0) {
this.setData({
......@@ -338,7 +338,7 @@ Page({
} = this.data
// 在超管/区域督导未拿到门店或员工信息
if (
(userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5) &&
(userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo?.loginRole == 5) &&
(!yqMerchantId || !merchantId || !staffUuid)
)
return
......@@ -385,7 +385,7 @@ Page({
} = this.data
// 在超管/区域督导未拿到门店或员工信息
if (
(userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5) &&
(userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo?.loginRole == 5) &&
(!yqMerchantId || !merchantId || !staffUuid)
)
return
......@@ -419,7 +419,7 @@ Page({
} = this.data
// 在超管/区域督导未拿到门店或员工信息
if (
(userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5) &&
(userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo?.loginRole == 5) &&
(!yqMerchantId || !merchantId || !staffUuid)
)
return
......@@ -444,10 +444,12 @@ Page({
},
async getMerchantCarBandList() {
let { orderObj } = this.data
if (!orderObj.merchantId) return false;
// 请求对应的4s店车型
let result = await api.staffDailyReportMerchantCarBand({
merchantId: orderObj.merchantId
})
console.log(result, 'result');
let { code, data } = result
let reportType = 0
let carBandList = []
......@@ -913,7 +915,7 @@ Page({
this.setReportDate()
setTimeout(() => {
// console.log(this.data.role, this.data, 'roleOther');
console.log(this.data.role, 'roleOther');
if (this.data.role == 'other' || approvedSource == '3') {
this.getMerchantCarBandList()
// this.getStaffReport();
......@@ -953,7 +955,7 @@ Page({
// this.getStaffDailyReportDetailWeeklyList();
}
// console.log(userInfo.isSuper, 'userInfo.isSuper')
if (userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5) {
if (userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo?.loginRole == 5) {
this.setData({
role: 'super'
})
......@@ -1059,7 +1061,7 @@ Page({
if (options.approvedSource == '3') {
role = 'staff'
} else {
// role = "other";
role = "other";
}
this.setData(
......@@ -1118,7 +1120,7 @@ Page({
if (options.approvedSource == '3') {
role = 'staff'
} else {
// role = "other";
role = "other";
}
this.setData(
......
......@@ -65,7 +65,7 @@ Page({
},
showStorePicker() {
let { userInfo } = this.data;
(userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5) &&
(userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo?.loginRole == 5) &&
this.setData({
showPicker: true,
pickerType: "merchant",
......@@ -73,7 +73,7 @@ Page({
},
showStaffPicker() {
let { userInfo } = this.data;
(userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5) &&
(userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo?.loginRole == 5) &&
this.setData({
showPicker: true,
pickerType: "staff",
......@@ -297,7 +297,7 @@ Page({
orderObj: { yqMerchantId, merchantId, staffUuid }
} = this.data;
// 在超管/区域运营未拿到门店或员工信息
if ((userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5) && (!yqMerchantId || !merchantId || !staffUuid)) return
if ((userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo?.loginRole == 5) && (!yqMerchantId || !merchantId || !staffUuid)) return
var selectWeek = --this.data.selectWeek
var timeBean = this.data.timeBean
timeBean = util.getWeekDayList(selectWeek)
......@@ -342,7 +342,7 @@ Page({
orderObj: { yqMerchantId, merchantId, staffUuid }
} = this.data;
// 在超管/区域运营未拿到门店或员工信息
if ((userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5) && (!yqMerchantId || !merchantId || !staffUuid)) return
if ((userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo?.loginRole == 5) && (!yqMerchantId || !merchantId || !staffUuid)) return
var selectWeek = ++this.data.selectWeek
var timeBean = this.data.timeBean
timeBean = util.getWeekDayList(selectWeek)
......@@ -368,7 +368,7 @@ Page({
orderObj: { yqMerchantId, merchantId, staffUuid }
} = this.data;
// 在超管/区域运营未拿到门店或员工信息
if ((userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5) && (!yqMerchantId || !merchantId || !staffUuid)) return
if ((userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo?.loginRole == 5) && (!yqMerchantId || !merchantId || !staffUuid)) return
this.setData({
['timeBean.selectDay']: e.detail
})
......@@ -390,6 +390,7 @@ Page({
},
async getMerchantCarBandList() {
let { orderObj } = this.data
if (!orderObj.merchantId) return false;
// 请求对应的4s店车型
let result = await api.staffDailyReportMerchantCarBand({ merchantId: orderObj.merchantId })
let { code, data } = result
......@@ -774,7 +775,7 @@ Page({
this.getMerchantCarBandList()
}
if (userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5) {
if (userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo?.loginRole == 5) {
this.setData({
role: 'super'
})
......@@ -853,7 +854,7 @@ Page({
if (options.approvedSource == '3') {
role = 'staff'
} else {
// role = 'other'
role = 'other'
}
this.setData({
......@@ -894,7 +895,7 @@ Page({
if (options.approvedSource == '3') {
role = 'staff'
} else {
// role = 'other'
role = 'other'
}
this.setData({
......
......@@ -131,7 +131,7 @@ class Request {
'2': 'test',
'3': 'production',
'4': 'beta'
} [envIndex],
}[envIndex],
configUrl = `https://config-center-backend.glsx.com.cn/glsxAdmin/config?moduleUrl=${configModule}&env=${env}`
return new Promise(resolve => {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!