Commit c97c0476 by 李伟康

commit 提交

1 parent dc7cd52c

2.74 MB | W: | H:

2.74 MB | W: | H:

assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -145,7 +145,7 @@ export default { ...@@ -145,7 +145,7 @@ export default {
icon: 'icon-scene-0', icon: 'icon-scene-0',
zoom: 1.1669, zoom: 1.1669,
}, },
5: { 7: {
title: '二手车', title: '二手车',
describe: '二手车业务', describe: '二手车业务',
icon: 'icon-scene-5', icon: 'icon-scene-5',
...@@ -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
......
...@@ -385,7 +385,7 @@ export default { ...@@ -385,7 +385,7 @@ export default {
}, },
start () { start () {
const { sceneType } = this const { sceneType } = this
if (sceneType == 4) return //二手车无接待功能 if (sceneType == 7) return //二手车无接待功能
uni.$track.add({ uni.$track.add({
eventCode: 'app_reception_begins' eventCode: 'app_reception_begins'
}) })
...@@ -406,8 +406,12 @@ export default { ...@@ -406,8 +406,12 @@ export default {
} }
const noInterceptPage = ['DailyReport'] const noInterceptPage = ['DailyReport']
if (!noInterceptPage.includes(item.name) && ((await this.checkDailyReport()) || (await this.inspectionOfProhibitionBill()))) return if (!noInterceptPage.includes(item.name) && ((await this.checkDailyReport()) || (await this.inspectionOfProhibitionBill()))) return
let pageName = {
1: 'boutique',
7: 'usedCar'
}[this.sceneType]
uni.navigateTo({ uni.navigateTo({
url: `/pages/boutique/tool/index?componentName=${item.name}` url: `/pages/${pageName}/tool/index?componentName=${item.name}`
}) })
} }
} }
......
...@@ -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"
/> />
......
...@@ -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'
......
...@@ -114,7 +114,7 @@ export default { ...@@ -114,7 +114,7 @@ export default {
async jumpPage (item, openSceneArr) { async jumpPage (item, openSceneArr) {
let { merchantName: shopMerchantName, merchantId: shopMerchantId } = item, let { merchantName: shopMerchantName, merchantId: shopMerchantId } = item,
{ userInfo } = this { userInfo } = this
const usedCarSceneType = 5 const usedCarSceneType = 7
if (!openSceneArr?.length && !userInfo?.isSuper) { if (!openSceneArr?.length && !userInfo?.isSuper) {
uni.hideLoading() uni.hideLoading()
uni.showToast({ uni.showToast({
...@@ -127,7 +127,7 @@ export default { ...@@ -127,7 +127,7 @@ export default {
userInfo = { userInfo = {
...userInfo, ...userInfo,
openSceneArr: [...openSceneArr, 5], //❗5 为联调写死,提测要删 ❗ openSceneArr: [...openSceneArr, 7], //❗7 为联调写死,提测要删 ❗
shopMerchantName, shopMerchantName,
shopMerchantId, shopMerchantId,
default4SStoreInfo: { default4SStoreInfo: {
......
...@@ -44,7 +44,7 @@ export default { ...@@ -44,7 +44,7 @@ export default {
{ {
sceneName: '二手车', sceneName: '二手车',
sceneDesc: '二手车业务', sceneDesc: '二手车业务',
sceneType: 5, sceneType: 7,
actived: false actived: false
}, },
], ],
...@@ -116,7 +116,7 @@ export default { ...@@ -116,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',
5: '/pages/usedCar/index' 7: '/pages/usedCar/index'
}[userInfo.sceneType] }[userInfo.sceneType]
uni.reLaunch({ uni.reLaunch({
url url
......
<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!