Commit 593e926d by cen

Merge branch 'SAAS+V5.0.0-1014' of http://192.168.3.233:8090/glsx/gl_tape into SAAS+V5.0.0-1014

2 parents 77eec04e 1e763f5b

2.75 MB | W: | H:

2.76 MB | W: | H:

assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -87,7 +87,9 @@ export default { ...@@ -87,7 +87,9 @@ export default {
} }
.box { .box {
width: toRpx(1400); width: toRpx(1400);
height: toRpx(928); // height: toRpx(928);
max-height: 80vh;
min-height: 32vh;
background: #ffffff; background: #ffffff;
border-radius: toRpx(48); border-radius: toRpx(48);
.title { .title {
...@@ -115,11 +117,13 @@ export default { ...@@ -115,11 +117,13 @@ export default {
.content { .content {
padding: toRpx(16) toRpx(80) toRpx(72); padding: toRpx(16) toRpx(80) toRpx(72);
width: 100%; width: 100%;
height: calc(100% - #{toRpx(160)}); height: toRpx(768);
// height: calc(100% - #{toRpx(160)});
gap: 0 toRpx(64); gap: 0 toRpx(64);
.item { .item {
width: calc(50% - #{toRpx(32)}); width: calc(50% - #{toRpx(32)});
height: 100%; height: 100%;
background: #ffffff; background: #ffffff;
box-shadow: 0 toRpx(12) toRpx(24) 0 #2c66f726; box-shadow: 0 toRpx(12) toRpx(24) 0 #2c66f726;
border-radius: toRpx(48); border-radius: toRpx(48);
...@@ -169,6 +173,7 @@ export default { ...@@ -169,6 +173,7 @@ export default {
flex-wrap: wrap; flex-wrap: wrap;
gap: 40rpx; gap: 40rpx;
padding: 16rpx 64rpx 64rpx; padding: 16rpx 64rpx 64rpx;
height: auto;
.item { .item {
width: 100%; width: 100%;
flex-direction: row; flex-direction: row;
......
<template> <template>
<view class="entrance-box">
<template v-if="entranceList.length">
<view class="entrance-container"> <view class="entrance-container">
<view class="entrance-list"> <view class="entrance-list">
<view class="entrance-item" v-for="(item, index) in entranceList" :key="index" @click="handleClick(item)"> <view
class="entrance-item"
v-for="(item, index) in entranceList"
:key="index"
@click="handleClick(item)"
>
<view :class="['sprite-icon', `icon-${item.icon}`]"></view> <view :class="['sprite-icon', `icon-${item.icon}`]"></view>
<view class="entrance-name">{{ item.label }}</view> <view class="entrance-name">{{ item.label }}</view>
</view> </view>
</view> </view>
</view> </view>
</template>
<template v-else>
<view class="developing flex">
<image
class="developing-icon"
src="../assets/images/common/developing.webp"
/>
功能开发中
</view>
</template>
</view>
</template> </template>
<script> <script>
export default { export default {
name: 'Entrance', name: 'Entrance',
data() { data () {
return { return {
entranceList: [
}
},
computed: {
entranceList () {
let { sceneType } = uni.$storage.get('userInfo'),
entranceList = [
{ {
icon: 'daily-report', icon: 'daily-report',
label: '驻店日报', label: '驻店日报',
...@@ -36,15 +60,23 @@ export default { ...@@ -36,15 +60,23 @@ export default {
name: 'OrderManagement' name: 'OrderManagement'
}, },
{ {
icon: 'order-management', icon: 'evaluation-management',
label: '评价表单', label: '评估单管理',
name: 'EvaluationFormList' name: 'EvaluationFormList'
} }
] ]
if (sceneType == 0) return []
else if (sceneType === 7) {
return entranceList.filter(e => ['DailyReport', 'EvaluationFormList'].includes(e.name));
}
if (sceneType === 1) {
return entranceList.filter(e => e.name !== 'EvaluationFormList');
}
} }
}, },
methods: { methods: {
handleClick(item) { handleClick (item) {
// 这里可以根据实际需求进行跳转或功能处理 // 这里可以根据实际需求进行跳转或功能处理
this.$emit('entranceClick', item) this.$emit('entranceClick', item)
} }
...@@ -68,19 +100,25 @@ export default { ...@@ -68,19 +100,25 @@ export default {
} }
.entrance-item { .entrance-item {
width: toRpx(120); min-width: toRpx(120);
// height: 144rpx;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
font-size: toRpx(30); font-size: toRpx(28);
.sprite-icon { color: #333;
background-color: #fff;
border-radius: toRpx(14);
}
.entrance-name { .entrance-name {
margin-top: toRpx(22); margin-top: toRpx(8);
}
}
.developing {
height: 100%;
flex-direction: column;
color: #999999;
font-size: toRpx(20);
&-icon {
width: toRpx(344);
height: toRpx(208);
} }
} }
</style> </style>
...@@ -145,10 +145,10 @@ export default { ...@@ -145,10 +145,10 @@ export default {
icon: 'icon-scene-0', icon: 'icon-scene-0',
zoom: 1.1669, zoom: 1.1669,
}, },
4: { 7: {
title: '二手车', title: '二手车',
describe: '二手车业务', describe: '二手车业务',
icon: 'icon-scene-4', icon: 'icon-scene-5',
zoom: 1.1669, zoom: 1.1669,
} }
...@@ -157,7 +157,7 @@ export default { ...@@ -157,7 +157,7 @@ export default {
let result = [] let result = []
if (openSceneArr && openSceneArr.length) { if (openSceneArr && openSceneArr.length) {
openSceneArr.map(e => { openSceneArr.map(e => {
if (e == 1 || e == 0 || e == 4) { if (e == 1 || e == 0 || e == 7) {
result.push({ result.push({
...sceneTypeObject[e], ...sceneTypeObject[e],
id: e id: e
...@@ -423,7 +423,7 @@ export default { ...@@ -423,7 +423,7 @@ export default {
let url = { let url = {
1: '/pages/boutique/index', 1: '/pages/boutique/index',
0: '/pages/equity/index', 0: '/pages/equity/index',
4: '/pages/usedCar/index' 7: '/pages/usedCar/index'
}[userInfo.sceneType] }[userInfo.sceneType]
uni.reLaunch({ uni.reLaunch({
url url
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<view class="popup-content" :class="[`popup-${type}`]"> <view class="popup-content" :class="[`popup-${type}`]">
<view class="popup-icon"> <view class="popup-icon">
<image <image
:src="require(`../../../../assets/images/common/${type}-notice.png`)" :src="require(`@/assets/images/common/${type}-notice.png`)"
mode="aspectFit" mode="aspectFit"
class="icon-image" class="icon-image"
/> />
......
...@@ -53,7 +53,14 @@ ...@@ -53,7 +53,14 @@
</template> </template>
<template v-else> <template v-else>
<view class="nothing flex"> <view class="nothing flex">
该场景尚未配置素材,请联系总部人员 <template v-if="noDataObject.icon">
<image
:src="noDataObject.icon"
class="icon"
:style="noDataObject.style"
/>
</template>
{{noDataObject.text || '该场景尚未配置素材,请联系总部人员'}}
</view> </view>
</template> </template>
</template> </template>
...@@ -107,7 +114,8 @@ export default { ...@@ -107,7 +114,8 @@ export default {
type: Boolean, type: Boolean,
default: false default: false
}, },
loadComplete: Boolean loadComplete: Boolean,
noDataObject: Object
}, },
watch: { watch: {
moduleList: { moduleList: {
...@@ -258,7 +266,7 @@ export default { ...@@ -258,7 +266,7 @@ export default {
let { blockX, ismove } = this let { blockX, ismove } = this
let pageX = e.changedTouches[0].pageX let pageX = e.changedTouches[0].pageX
let nums = ismove - pageX let nums = ismove - pageX
if(nums == 0) return if (nums == 0) return
if (!(nums > 50 || blockX < -30) || !(nums < -50 || blockX > 30)) { if (!(nums > 50 || blockX < -30) || !(nums < -50 || blockX > 30)) {
this.viewX = -10 this.viewX = -10
setTimeout(() => { setTimeout(() => {
...@@ -290,7 +298,7 @@ export default { ...@@ -290,7 +298,7 @@ export default {
width: 100%; width: 100%;
height: 100%; height: 100%;
justify-content: center; justify-content: center;
.gif{ .gif {
width: toRpx(64); width: toRpx(64);
height: toRpx(64); height: toRpx(64);
} }
...@@ -410,5 +418,10 @@ export default { ...@@ -410,5 +418,10 @@ export default {
justify-content: center; justify-content: center;
color: #999; color: #999;
font-size: toRpx(20); font-size: toRpx(20);
flex-direction: column;
.icon {
width: toRpx(344);
height: toRpx(236);
}
} }
</style> </style>
...@@ -11,13 +11,18 @@ export default { ...@@ -11,13 +11,18 @@ export default {
}, },
mounted () { }, mounted () { },
methods: { methods: {
async checkDailyReport () { /**
*
* @param {是否需要检测企微打卡} checkWW
* @returns
*/
async checkDailyReport (checkWW = true) {
modalQueue = [] modalQueue = []
eventRequest = [] eventRequest = []
let { sceneType, isSuper, loginRole } = this.userInfo let { sceneType, isSuper, loginRole } = this.userInfo
if (!(isSuper || loginRole == 3 || loginRole == 5 || loginRole == 6)) { if (!(isSuper || loginRole == 3 || loginRole == 5 || loginRole == 6)) {
// 判断员工是否已打卡上班 // 判断员工是否已打卡上班
eventRequest.push(this.clockedIntoWork()) if (checkWW) eventRequest.push(this.clockedIntoWork())
let apiName = { let apiName = {
0: this.equityStaffDailyReport, 0: this.equityStaffDailyReport,
1: this.staffDailyReport 1: this.staffDailyReport
...@@ -82,7 +87,7 @@ export default { ...@@ -82,7 +87,7 @@ export default {
console.log(formattedDate) console.log(formattedDate)
const pages = getCurrentPages(), const pages = getCurrentPages(),
currentPage = pages[pages.length - 1] currentPage = pages[pages.length - 1]
if (currentPage.route == 'pages/boutique/tool/index') uni.$emit('jumpToDailyReport',formattedDate) if (currentPage.route == 'pages/boutique/tool/index') uni.$emit('jumpToDailyReport', formattedDate)
else uni.navigateTo({ else uni.navigateTo({
url: `/pages/boutique/tool/index?componentName=DailyReport&currentDate=${formattedDate}` url: `/pages/boutique/tool/index?componentName=DailyReport&currentDate=${formattedDate}`
}) })
......
...@@ -208,6 +208,12 @@ ...@@ -208,6 +208,12 @@
"navigationStyle": "custom", "navigationStyle": "custom",
"disableSwipeBack": true "disableSwipeBack": true
} }
},
{
"path": "pages/usedCar/tool/index",
"style": {
"navigationStyle": "custom"
}
} }
], ],
"globalStyle": { "globalStyle": {
......
...@@ -191,7 +191,7 @@ var weekday = require('dayjs/plugin/weekday') ...@@ -191,7 +191,7 @@ var weekday = require('dayjs/plugin/weekday')
import dayjs from 'dayjs' import dayjs from 'dayjs'
dayjs.extend(weekday) dayjs.extend(weekday)
import GlCell from '@/components/Form/GlCell.vue' import GlCell from '@/components/Form/GlCell.vue'
import NoticePopup from './NoticePopup.vue' import NoticePopup from '@/components/NoticePopup.vue'
export default { export default {
components: { components: {
GlCell, GlCell,
......
...@@ -36,7 +36,7 @@ import OrderManagement from './components/OrderManagement.vue' ...@@ -36,7 +36,7 @@ import OrderManagement from './components/OrderManagement.vue'
import ConfirmOrder from './components/ConfirmOrder.vue' import ConfirmOrder from './components/ConfirmOrder.vue'
import OrderDetail from './components/OrderDetail.vue' import OrderDetail from './components/OrderDetail.vue'
import UploadProofOfPayment from './components/UploadProofOfPayment.vue' import UploadProofOfPayment from './components/UploadProofOfPayment.vue'
import NoticePopup from './components/NoticePopup.vue' import NoticePopup from '@/components/NoticePopup.vue'
import dayjs from 'dayjs' import dayjs from 'dayjs'
import { interceptionMixin } from '@/mixin/index' import { interceptionMixin } from '@/mixin/index'
......
<template> <template>
<view class="box" :key="selectMerchantId"> <view
class="box"
:key="selectMerchantId"
>
<template v-if="flag"> <template v-if="flag">
<template v-if="loginUserInfoList.length"> <template v-if="loginUserInfoList.length">
<template v-for="(item, index) in loginUserInfoList"> <template v-for="(item, index) in loginUserInfoList">
<view :key="index" :class="['items', { active: item.active }]" @click="chooseAccount(item)"> <view
:key="index"
:class="['items', { active: item.active }]"
@click="chooseAccount(item)"
>
<view class="right"> <view class="right">
<view class="sprite-icon icon-store"></view> <view class="sprite-icon icon-store"></view>
</view> </view>
...@@ -33,7 +40,6 @@ export default { ...@@ -33,7 +40,6 @@ export default {
loginUserInfoList: [], loginUserInfoList: [],
copyLoginUserInfoList: [], copyLoginUserInfoList: [],
showSelect: false, showSelect: false,
openSceneArr: [],
flag: false, flag: false,
userInfo: {}, userInfo: {},
selectMerchantId: '' selectMerchantId: ''
...@@ -46,22 +52,22 @@ export default { ...@@ -46,22 +52,22 @@ export default {
init (userInfo) { init (userInfo) {
uni.$logger.info(`进入选择4s店页面!`) uni.$logger.info(`进入选择4s店页面!`)
this.userInfo = userInfo this.userInfo = userInfo
this.getSceneArr() this.getMerchantList()
// this.getSceneArr()
}, },
getSceneArr () { async getSceneArr (merchantId = '') {
let { userInfo } = this return new Promise(async resolve => {
// 超管开通全部场景 let { userInfo } = this,
if (userInfo?.isSuper) return this.getMerchantList() openSceneArr = []
// 获取4s店关联场景数据 // 获取4s店关联场景数据
uni.$api.userApi.getYqMerchantSceneConfigAPI({ const result = await uni.$api.userApi.getYqMerchantSceneConfigAPI({
yqMerchantId: userInfo?.subLoginUser?.merchantId, yqMerchantId: userInfo?.subLoginUser?.merchantId,
merchantId: userInfo?.shopMerchantId merchantId
}).then(result => { })
uni.hideLoading() result.map(val => {
this.openSceneArr = result.map(val => { if (val.sceneOpenFlag == 0) return val.scene }) || [] if (val.sceneOpenFlag == 0) openSceneArr.push(val.scene)
this.getMerchantList() })
}).catch(err => { resolve(openSceneArr)
this.getMerchantList()
}) })
}, },
getMerchantList () { getMerchantList () {
...@@ -84,10 +90,9 @@ export default { ...@@ -84,10 +90,9 @@ export default {
if (result && result.length == 1) this.chooseAccount(result[0]) if (result && result.length == 1) this.chooseAccount(result[0])
}).catch(err => { }).catch(err => {
uni.hideLoading() uni.hideLoading()
console.log(err)
}) })
}, },
chooseAccount (item) { async chooseAccount (item) {
uni.$logger.info(`选择4s店${item.merchantName}!`) uni.$logger.info(`选择4s店${item.merchantName}!`)
uni.showLoading({ uni.showLoading({
mask: true mask: true
...@@ -101,14 +106,15 @@ export default { ...@@ -101,14 +106,15 @@ export default {
} }
return i return i
}) })
let openSceneArr = await this.getSceneArr(item.merchantId)
this.loginUserInfoList = listArr this.loginUserInfoList = listArr
this.selectMerchantId = item.merchantId this.selectMerchantId = item.merchantId
this.jumpPage(item) this.jumpPage(item, openSceneArr)
}, },
async jumpPage (item) { async jumpPage (item, openSceneArr) {
let { openSceneArr } = this, let { merchantName: shopMerchantName, merchantId: shopMerchantId } = item,
{ merchantName: shopMerchantName, merchantId: shopMerchantId } = item,
{ userInfo } = this { userInfo } = this
const usedCarSceneType = 7
if (!openSceneArr?.length && !userInfo?.isSuper) { if (!openSceneArr?.length && !userInfo?.isSuper) {
uni.hideLoading() uni.hideLoading()
uni.showToast({ uni.showToast({
...@@ -117,8 +123,11 @@ export default { ...@@ -117,8 +123,11 @@ export default {
}) })
return return
} }
this.$emit('chooseMerchant', { if (userInfo.isSuper) openSceneArr = [1, 0, usedCarSceneType] //超管默认开通全部场景
userInfo = {
...userInfo, ...userInfo,
openSceneArr: [...openSceneArr, 7], //❗7 为联调写死,提测要删 ❗
shopMerchantName, shopMerchantName,
shopMerchantId, shopMerchantId,
default4SStoreInfo: { default4SStoreInfo: {
...@@ -133,7 +142,23 @@ export default { ...@@ -133,7 +142,23 @@ export default {
merchantId: shopMerchantId, merchantId: shopMerchantId,
merchantName: shopMerchantName merchantName: shopMerchantName
} }
}
if (openSceneArr.length == 1 && openSceneArr[0] == usedCarSceneType) {
const data = await uni.$api.userApi.selectMerchantScene({
merchantId: userInfo.shopMerchantId,
merchantName: userInfo.shopMerchantName,
sceneType: usedCarSceneType
}) })
uni.$logger.local.info(`商户只有二手车场景时自动跳转进入二手车首页!`)
if (data) userInfo.loginRoleOnSelectMerchant = data?.loginRoleOnSelectMerchant
userInfo.sceneType = usedCarSceneType
uni.$storage.set('userInfo', userInfo)
uni.reLaunch({
url: '/pages/usedCar/index'
})
return
}
this.$emit('chooseMerchant', userInfo)
uni.hideLoading() uni.hideLoading()
}, },
searchEvent (searchValue) { searchEvent (searchValue) {
......
...@@ -44,12 +44,11 @@ export default { ...@@ -44,12 +44,11 @@ export default {
{ {
sceneName: '二手车', sceneName: '二手车',
sceneDesc: '二手车业务', sceneDesc: '二手车业务',
sceneType: 4, sceneType: 7,
actived: false actived: false
}, },
], ],
userInfo: {}, userInfo: {},
openSceneArr: []
} }
}, },
mounted () { mounted () {
...@@ -57,34 +56,13 @@ export default { ...@@ -57,34 +56,13 @@ export default {
methods: { methods: {
init (userInfo) { init (userInfo) {
this.userInfo = userInfo this.userInfo = userInfo
this.getSceneArr()
uni.$logger.local.info(`进入选择场景页!`) uni.$logger.local.info(`进入选择场景页!`)
},
getSceneArr () {
this.openSceneArr = []
uni.showLoading({
mask: true
})
// 超管默认开通全部场景
let { userInfo } = this
if (userInfo?.isSuper) return
// 获取4s店关联场景数据
uni.$api.userApi.getYqMerchantSceneConfigAPI({
yqMerchantId: userInfo?.subLoginUser?.merchantId,
merchantId: userInfo?.shopMerchantId
}).then(result => {
uni.hideLoading()
result.map(val => {
if (val.sceneOpenFlag == 0) this.openSceneArr.push(val.scene)
})
}).catch(() => {
uni.hideLoading()
})
}, },
// 选择场景 // 选择场景
async selectScene ({ sceneType }, index) { async selectScene ({ sceneType }, index) {
uni.$logger.local.info(`选择场景${sceneType}!`) uni.$logger.local.info(`选择场景${sceneType}!`)
let { sceneList, openSceneArr, userInfo } = this let { sceneList, userInfo, userInfo: { openSceneArr } } = this
try { try {
if (!openSceneArr.includes(sceneType) && !userInfo?.isSuper) return uni.showToast({ if (!openSceneArr.includes(sceneType) && !userInfo?.isSuper) return uni.showToast({
title: '暂未开通此场景', title: '暂未开通此场景',
...@@ -94,7 +72,6 @@ export default { ...@@ -94,7 +72,6 @@ export default {
sceneList[index].actived = true sceneList[index].actived = true
this.sceneList = sceneList this.sceneList = sceneList
userInfo.sceneType = sceneType userInfo.sceneType = sceneType
userInfo.openSceneArr = [...openSceneArr, 4]
uni.showLoading({ uni.showLoading({
mask: true mask: true
}) })
...@@ -116,7 +93,6 @@ export default { ...@@ -116,7 +93,6 @@ export default {
title: typeof error == "string" ? error : error.toString(), title: typeof error == "string" ? error : error.toString(),
icon: 'none' icon: 'none'
}) })
console.log(error)
uni.$logger.local.error(`选择场景异常:merchantId:${userInfo?.shopMerchantId},merchantName:${userInfo?.shopMerchantName},sceneType:${sceneType},失败原因:${typeof error == "string" ? error : error.toString()}`) uni.$logger.local.error(`选择场景异常:merchantId:${userInfo?.shopMerchantId},merchantName:${userInfo?.shopMerchantName},sceneType:${sceneType},失败原因:${typeof error == "string" ? error : error.toString()}`)
} }
}, },
...@@ -140,7 +116,7 @@ export default { ...@@ -140,7 +116,7 @@ export default {
let url = { let url = {
1: '/pages/boutique/index', 1: '/pages/boutique/index',
0: '/pages/equity/index', 0: '/pages/equity/index',
4: '/pages/usedCar/index' 7: '/pages/usedCar/index'
}[userInfo.sceneType] }[userInfo.sceneType]
uni.reLaunch({ uni.reLaunch({
url url
......
...@@ -3,6 +3,8 @@ ...@@ -3,6 +3,8 @@
<home-frame <home-frame
ref="home" ref="home"
:loadComplete="loadComplete" :loadComplete="loadComplete"
:swiperNoDataObject="swiperNoDataObject"
> >
</home-frame> </home-frame>
</view> </view>
...@@ -14,7 +16,11 @@ export default { ...@@ -14,7 +16,11 @@ export default {
data () { data () {
return { return {
loadComplete: true, loadComplete: true,
requested: false requested: false,
swiperNoDataObject:Object.freeze({
icon: require('@/assets/images/home/swiper-nodata.png'),
text: '暂无数据'
})
} }
}, },
computed: { computed: {
......
<template>
<view class="detail-box">
<view class="nav-bar">
<view
class="back"
@click="backPage"
>
<uni-icons
type="left"
:size="20"
color="#000"
></uni-icons>
</view>
<view class="title">展业工具</view>
</view>
<view class="detail-content">
<view class="detail-left">
<view class="common-title">展业</view>
<view class="content">
<image
class="banner"
src="../../../assets/images/common/tool_banner.png"
mode="scaleToFill"
/>
<template v-if="toolComponentName !== 'DailyReport'">
<Entrance @entranceClick="entranceClick"></Entrance>
</template>
<template v-else>
<uni-calendar
ref="calendar"
:clearDate="false"
:endDate="endDate"
:showMonth="false"
@monthSwitch="currentMonth = `${$event.year}-${$event.month}`"
@change="currentDate = $event.fulldate"
backgroundColor="transparent"
:selected="selectedDays"
:date="currentDate"
/>
</template>
</view>
</view>
<view class="detail-right">
<component
:is="toolComponentName"
@jump="jump"
:transmission-of-data="transmissionOfData"
:currentDate="currentDate"
:currentMonth="currentMonth"
@setCalendarSelected="selectedDays = $event"
/>
</view>
</view>
<NoticePopup
ref="notice"
title="重要提示"
text="当前页面暂未保存,是否确认退出"
type="warning"
></NoticePopup>
</view>
</template>
<script>
import Entrance from '@/components/Entrance.vue'
import DailyReport from './components/DailyReport.vue'
import NoticePopup from '@/components/NoticePopup.vue'
import dayjs from 'dayjs'
import { interceptionMixin } from '@/mixin/index'
export default {
mixins: [interceptionMixin],
components: {
Entrance,
DailyReport,
NoticePopup
},
data () {
return {
toolComponentName: '',
transmissionOfData: null,
endDate: dayjs().format('YYYY-MM-DD'),
currentDate: dayjs().format('YYYY-MM-DD'),
currentMonth: dayjs().format('YYYY-MM'),
selectedDays: []
}
},
onLoad (options) {
if (options.componentName) this.toolComponentName = options.componentName
if (options.currentDate) this.currentDate = options.currentDate
uni.$on('jumpToDailyReport', currentDate => {
this.toolComponentName = 'DailyReport'
if (currentDate) this.currentDate = currentDate
})
},
onBackPress (options) {
if (options.from === 'backbutton') {
// 物理返回按钮触发
// 阻止默认行为,即不执行页面返回
this.backPage()
return true
}
// 其他情况允许正常返回
return false
},
methods: {
async entranceClick (item) {
const noInterceptPage = ['DailyReport']
if (!noInterceptPage.includes(item.name) && ((await this.checkDailyReport()) || (await this.inspectionOfProhibitionBill()))) return
// 保存当前选择的组件信息,但不立即切换
const selectedItem = item
if (this.toolComponentName === selectedItem.name && (!this.transmissionOfData || this.transmissionOfData.type !== 'supplementOrder')) return
// 如果当前组件是OrderManagement,直接切换组件,不显示弹窗
// 只有从CreateOrder、DefeatOrder切换其他组件时需要二次确认
if (this.toolComponentName !== 'CreateOrder' && this.toolComponentName !== 'DefeatOrder') {
this.toolComponentName = selectedItem.name
this.transmissionOfData = null
return
}
this.openNotice(selectedItem)
},
openNotice (selectedItem) {
// 配置弹窗按钮
this.$refs.notice.buttonsList = [
{
text: '确认退出',
type: 'default',
callback: () => {
if (selectedItem) {
// 点击确认后才切换组件
this.toolComponentName = selectedItem.name
this.transmissionOfData = null
}
this.$refs.notice.close()
uni.navigateBack()
}
},
{
text: '继续编辑',
type: 'primary',
callback: () => {
this.$refs.notice.close()
}
}
]
// 打开弹窗
this.$refs.notice.open()
},
backPage () {
this.openNotice()
},
// name:跳转组件名,val:跳转参数
jump (name, val) {
this.toolComponentName = name
console.log(this.toolComponentName, val)
if (val) {
this.transmissionOfData = val
}
}
}
}
</script>
<style scoped lang="scss">
.detail-content {
display: flex;
height: calc(100vh - #{toRpx(212)});
.detail-left {
width: toRpx(800);
height: 100%;
border-radius: toRpx(48);
background: #ffffff59;
box-shadow: inset 0 0 toRpx(16) 0 #ffffff;
margin-right: toRpx(32);
z-index: 1;
overflow: hidden;
.content {
padding: 0 toRpx(48);
.banner {
width: toRpx(704);
height: toRpx(296);
margin-top: toRpx(10);
margin-bottom: toRpx(64);
}
}
}
.detail-right {
width: toRpx(1368);
height: 100%;
border-radius: toRpx(48);
background: #ffffff59;
box-shadow: inset 0 0 toRpx(16) 0 #ffffff;
z-index: 1;
overflow: hidden;
}
.common-title {
display: flex;
align-items: center;
justify-content: space-between;
font-size: toRpx(34);
}
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!