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 {
}
.box {
width: toRpx(1400);
height: toRpx(928);
// height: toRpx(928);
max-height: 80vh;
min-height: 32vh;
background: #ffffff;
border-radius: toRpx(48);
.title {
......@@ -115,11 +117,13 @@ export default {
.content {
padding: toRpx(16) toRpx(80) toRpx(72);
width: 100%;
height: calc(100% - #{toRpx(160)});
height: toRpx(768);
// height: calc(100% - #{toRpx(160)});
gap: 0 toRpx(64);
.item {
width: calc(50% - #{toRpx(32)});
height: 100%;
background: #ffffff;
box-shadow: 0 toRpx(12) toRpx(24) 0 #2c66f726;
border-radius: toRpx(48);
......@@ -169,6 +173,7 @@ export default {
flex-wrap: wrap;
gap: 40rpx;
padding: 16rpx 64rpx 64rpx;
height: auto;
.item {
width: 100%;
flex-direction: row;
......
<template>
<view class="entrance-container">
<view class="entrance-list">
<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="entrance-name">{{ item.label }}</view>
<view class="entrance-box">
<template v-if="entranceList.length">
<view class="entrance-container">
<view class="entrance-list">
<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="entrance-name">{{ item.label }}</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>
<script>
export default {
name: 'Entrance',
data() {
data () {
return {
entranceList: [
{
icon: 'daily-report',
label: '驻店日报',
name: 'DailyReport'
},
{
icon: 'create-order',
label: '新建工单',
name: 'CreateOrder'
},
{
icon: 'defeat-order',
label: '战败下单',
name: 'DefeatOrder'
},
{
icon: 'order-management',
label: '工单列表',
name: 'OrderManagement'
},
{
icon: 'order-management',
label: '评价表单',
name: 'EvaluationFormList'
}
]
}
},
computed: {
entranceList () {
let { sceneType } = uni.$storage.get('userInfo'),
entranceList = [
{
icon: 'daily-report',
label: '驻店日报',
name: 'DailyReport'
},
{
icon: 'create-order',
label: '新建工单',
name: 'CreateOrder'
},
{
icon: 'defeat-order',
label: '战败下单',
name: 'DefeatOrder'
},
{
icon: 'order-management',
label: '工单列表',
name: 'OrderManagement'
},
{
icon: 'evaluation-management',
label: '评估单管理',
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: {
handleClick(item) {
handleClick (item) {
// 这里可以根据实际需求进行跳转或功能处理
this.$emit('entranceClick', item)
}
......@@ -68,19 +100,25 @@ export default {
}
.entrance-item {
width: toRpx(120);
// height: 144rpx;
min-width: toRpx(120);
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: toRpx(30);
.sprite-icon {
background-color: #fff;
border-radius: toRpx(14);
}
font-size: toRpx(28);
color: #333;
.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>
......@@ -145,10 +145,10 @@ export default {
icon: 'icon-scene-0',
zoom: 1.1669,
},
4: {
7: {
title: '二手车',
describe: '二手车业务',
icon: 'icon-scene-4',
icon: 'icon-scene-5',
zoom: 1.1669,
}
......@@ -157,7 +157,7 @@ export default {
let result = []
if (openSceneArr && openSceneArr.length) {
openSceneArr.map(e => {
if (e == 1 || e == 0 || e == 4) {
if (e == 1 || e == 0 || e == 7) {
result.push({
...sceneTypeObject[e],
id: e
......@@ -423,7 +423,7 @@ export default {
let url = {
1: '/pages/boutique/index',
0: '/pages/equity/index',
4: '/pages/usedCar/index'
7: '/pages/usedCar/index'
}[userInfo.sceneType]
uni.reLaunch({
url
......
......@@ -3,7 +3,7 @@
<view class="popup-content" :class="[`popup-${type}`]">
<view class="popup-icon">
<image
:src="require(`../../../../assets/images/common/${type}-notice.png`)"
:src="require(`@/assets/images/common/${type}-notice.png`)"
mode="aspectFit"
class="icon-image"
/>
......
......@@ -53,7 +53,14 @@
</template>
<template v-else>
<view class="nothing flex">
该场景尚未配置素材,请联系总部人员
<template v-if="noDataObject.icon">
<image
:src="noDataObject.icon"
class="icon"
:style="noDataObject.style"
/>
</template>
{{noDataObject.text || '该场景尚未配置素材,请联系总部人员'}}
</view>
</template>
</template>
......@@ -107,7 +114,8 @@ export default {
type: Boolean,
default: false
},
loadComplete: Boolean
loadComplete: Boolean,
noDataObject: Object
},
watch: {
moduleList: {
......@@ -258,7 +266,7 @@ export default {
let { blockX, ismove } = this
let pageX = e.changedTouches[0].pageX
let nums = ismove - pageX
if(nums == 0) return
if (nums == 0) return
if (!(nums > 50 || blockX < -30) || !(nums < -50 || blockX > 30)) {
this.viewX = -10
setTimeout(() => {
......@@ -290,7 +298,7 @@ export default {
width: 100%;
height: 100%;
justify-content: center;
.gif{
.gif {
width: toRpx(64);
height: toRpx(64);
}
......@@ -410,5 +418,10 @@ export default {
justify-content: center;
color: #999;
font-size: toRpx(20);
flex-direction: column;
.icon {
width: toRpx(344);
height: toRpx(236);
}
}
</style>
......@@ -11,13 +11,18 @@ export default {
},
mounted () { },
methods: {
async checkDailyReport () {
/**
*
* @param {是否需要检测企微打卡} checkWW
* @returns
*/
async checkDailyReport (checkWW = true) {
modalQueue = []
eventRequest = []
let { sceneType, isSuper, loginRole } = this.userInfo
if (!(isSuper || loginRole == 3 || loginRole == 5 || loginRole == 6)) {
// 判断员工是否已打卡上班
eventRequest.push(this.clockedIntoWork())
if (checkWW) eventRequest.push(this.clockedIntoWork())
let apiName = {
0: this.equityStaffDailyReport,
1: this.staffDailyReport
......@@ -82,7 +87,7 @@ export default {
console.log(formattedDate)
const pages = getCurrentPages(),
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({
url: `/pages/boutique/tool/index?componentName=DailyReport&currentDate=${formattedDate}`
})
......
......@@ -208,6 +208,12 @@
"navigationStyle": "custom",
"disableSwipeBack": true
}
},
{
"path": "pages/usedCar/tool/index",
"style": {
"navigationStyle": "custom"
}
}
],
"globalStyle": {
......
......@@ -191,7 +191,7 @@ var weekday = require('dayjs/plugin/weekday')
import dayjs from 'dayjs'
dayjs.extend(weekday)
import GlCell from '@/components/Form/GlCell.vue'
import NoticePopup from './NoticePopup.vue'
import NoticePopup from '@/components/NoticePopup.vue'
export default {
components: {
GlCell,
......
......@@ -36,7 +36,7 @@ import OrderManagement from './components/OrderManagement.vue'
import ConfirmOrder from './components/ConfirmOrder.vue'
import OrderDetail from './components/OrderDetail.vue'
import UploadProofOfPayment from './components/UploadProofOfPayment.vue'
import NoticePopup from './components/NoticePopup.vue'
import NoticePopup from '@/components/NoticePopup.vue'
import dayjs from 'dayjs'
import { interceptionMixin } from '@/mixin/index'
......
<template>
<view class="box" :key="selectMerchantId">
<view
class="box"
:key="selectMerchantId"
>
<template v-if="flag">
<template v-if="loginUserInfoList.length">
<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="sprite-icon icon-store"></view>
</view>
......@@ -33,7 +40,6 @@ export default {
loginUserInfoList: [],
copyLoginUserInfoList: [],
showSelect: false,
openSceneArr: [],
flag: false,
userInfo: {},
selectMerchantId: ''
......@@ -46,22 +52,22 @@ export default {
init (userInfo) {
uni.$logger.info(`进入选择4s店页面!`)
this.userInfo = userInfo
this.getSceneArr()
this.getMerchantList()
// this.getSceneArr()
},
getSceneArr () {
let { userInfo } = this
// 超管开通全部场景
if (userInfo?.isSuper) return this.getMerchantList()
// 获取4s店关联场景数据
uni.$api.userApi.getYqMerchantSceneConfigAPI({
yqMerchantId: userInfo?.subLoginUser?.merchantId,
merchantId: userInfo?.shopMerchantId
}).then(result => {
uni.hideLoading()
this.openSceneArr = result.map(val => { if (val.sceneOpenFlag == 0) return val.scene }) || []
this.getMerchantList()
}).catch(err => {
this.getMerchantList()
async getSceneArr (merchantId = '') {
return new Promise(async resolve => {
let { userInfo } = this,
openSceneArr = []
// 获取4s店关联场景数据
const result = await uni.$api.userApi.getYqMerchantSceneConfigAPI({
yqMerchantId: userInfo?.subLoginUser?.merchantId,
merchantId
})
result.map(val => {
if (val.sceneOpenFlag == 0) openSceneArr.push(val.scene)
})
resolve(openSceneArr)
})
},
getMerchantList () {
......@@ -84,10 +90,9 @@ export default {
if (result && result.length == 1) this.chooseAccount(result[0])
}).catch(err => {
uni.hideLoading()
console.log(err)
})
},
chooseAccount (item) {
async chooseAccount (item) {
uni.$logger.info(`选择4s店${item.merchantName}!`)
uni.showLoading({
mask: true
......@@ -101,14 +106,15 @@ export default {
}
return i
})
let openSceneArr = await this.getSceneArr(item.merchantId)
this.loginUserInfoList = listArr
this.selectMerchantId = item.merchantId
this.jumpPage(item)
this.jumpPage(item, openSceneArr)
},
async jumpPage (item) {
let { openSceneArr } = this,
{ merchantName: shopMerchantName, merchantId: shopMerchantId } = item,
async jumpPage (item, openSceneArr) {
let { merchantName: shopMerchantName, merchantId: shopMerchantId } = item,
{ userInfo } = this
const usedCarSceneType = 7
if (!openSceneArr?.length && !userInfo?.isSuper) {
uni.hideLoading()
uni.showToast({
......@@ -117,8 +123,11 @@ export default {
})
return
}
this.$emit('chooseMerchant', {
if (userInfo.isSuper) openSceneArr = [1, 0, usedCarSceneType] //超管默认开通全部场景
userInfo = {
...userInfo,
openSceneArr: [...openSceneArr, 7], //❗7 为联调写死,提测要删 ❗
shopMerchantName,
shopMerchantId,
default4SStoreInfo: {
......@@ -133,7 +142,23 @@ export default {
merchantId: shopMerchantId,
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()
},
searchEvent (searchValue) {
......
......@@ -44,12 +44,11 @@ export default {
{
sceneName: '二手车',
sceneDesc: '二手车业务',
sceneType: 4,
sceneType: 7,
actived: false
},
],
userInfo: {},
openSceneArr: []
}
},
mounted () {
......@@ -57,34 +56,13 @@ export default {
methods: {
init (userInfo) {
this.userInfo = userInfo
this.getSceneArr()
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) {
uni.$logger.local.info(`选择场景${sceneType}!`)
let { sceneList, openSceneArr, userInfo } = this
let { sceneList, userInfo, userInfo: { openSceneArr } } = this
try {
if (!openSceneArr.includes(sceneType) && !userInfo?.isSuper) return uni.showToast({
title: '暂未开通此场景',
......@@ -94,7 +72,6 @@ export default {
sceneList[index].actived = true
this.sceneList = sceneList
userInfo.sceneType = sceneType
userInfo.openSceneArr = [...openSceneArr, 4]
uni.showLoading({
mask: true
})
......@@ -116,7 +93,6 @@ export default {
title: typeof error == "string" ? error : error.toString(),
icon: 'none'
})
console.log(error)
uni.$logger.local.error(`选择场景异常:merchantId:${userInfo?.shopMerchantId},merchantName:${userInfo?.shopMerchantName},sceneType:${sceneType},失败原因:${typeof error == "string" ? error : error.toString()}`)
}
},
......@@ -140,7 +116,7 @@ export default {
let url = {
1: '/pages/boutique/index',
0: '/pages/equity/index',
4: '/pages/usedCar/index'
7: '/pages/usedCar/index'
}[userInfo.sceneType]
uni.reLaunch({
url
......
......@@ -3,6 +3,8 @@
<home-frame
ref="home"
:loadComplete="loadComplete"
:swiperNoDataObject="swiperNoDataObject"
>
</home-frame>
</view>
......@@ -14,7 +16,11 @@ export default {
data () {
return {
loadComplete: true,
requested: false
requested: false,
swiperNoDataObject:Object.freeze({
icon: require('@/assets/images/home/swiper-nodata.png'),
text: '暂无数据'
})
}
},
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!