Commit 75b3806b by 前端

Merge branch 'SAAS+V5.6.1' into 'master'

上线合并

See merge request !65
2 parents 613113a8 85fb8039
Showing 59 changed files with 1996 additions and 434 deletions
......@@ -601,5 +601,72 @@ module.exports = {
projectName: 'pad',
...data
})
}
},
// 工资新增申诉
addWageAppeal(data={}) {
return http.post({
method: 'dj.api.staff.miniprogram.salaryapply.pad.create',
projectName: 'staffMiniprogram',
...data,
})
},
// 工资申诉概览信息(包含申诉状态、申诉类型、申诉时间等)
getWageAppealOverview(data={}) {
return http.post({
method: 'dj.api.staff.miniprogram.salaryapply.summary',
projectName: 'staffMiniprogram',
...data,
})
},
// 工资申诉订单统计查询
getWageAppealStatistics(data={}) {
return http.post({
method: 'dj.api.staff.miniprogram.salaryapply.order.statistics',
projectName: 'staffMiniprogram',
...data,
})
},
// 工资申诉复议记录
replyList(data={}) {
return http.post({
method: 'dj.api.staff.miniprogram.salaryapply.reply.list',
projectName: 'staffMiniprogram',
...data,
})
},
// 工资申诉最新记录查询
getWageAppealLatestRecord(data={}) {
return http.post({
method: 'dj.api.staff.miniprogram.salaryapply.latest',
projectName: 'staffMiniprogram',
...data,
})
},
// 异常订单锁单信息查询
getAbnormalOrderLock(data = {}) {
return http.post({
method: 'dj.api.smartcarlife.goodsOrder.abnormalOrder.lock.select',
projectName: 'boutique',
...data
})
},
/**
* 检查今天是否在T1-T5之间
*/
checkTodayInT1T5(data={}) {
return http.post({
method: 'dj.api.staff.miniprogram.salaryapply.daily.report.fill.check',
projectName: 'staffMiniprogram',
...data,
})
},
// 工资申诉入口判断
getWageAppealEntrance(data={}) {
return http.post({
method: 'dj.staff.api.has.performance.config.formerchant',
projectName: 'staffMiniprogram',
...data,
})
},
}
......@@ -246,6 +246,9 @@
.pt-12 {
padding-top: toRpx(12);
}
.pb-24 {
padding-bottom: toRpx(24);
}
.flex-1 {
flex: 1;
}

2.99 MB | W: | H:

3 MB | W: | H:

assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -2,7 +2,7 @@
<view class="entrance-box">
<template v-if="entranceList.length">
<view class="entrance-container">
<view class="entrance-list">
<view :class="['entrance-list', `entrance-list-${type}`]">
<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>
......@@ -22,12 +22,28 @@
<script>
export default {
name: 'Entrance',
props: {
// 默认一行展示5个,type传1展示4个
type: {
type: Number,
default: 0
}
},
data() {
return {}
return {
// 工资申诉入口是否允许显示
wageAppealAllowed: false,
// 工资申诉入口加载中,加载完成前不展示避免误显示
loadingEntrance: true
}
},
created() {
// 组件创建时请求工资申诉入口权限
this.fetchWageAppealEntrance()
},
computed: {
entranceList() {
let { sceneType } = uni.$storage.get('userInfo'),
let { sceneType } = uni.$storage.get('userInfo') || {},
entranceList = [
{
icon: 'daily-report',
......@@ -60,6 +76,12 @@ export default {
sceneType: [0, 1]
},
{
icon: 'wage-appeal',
label: '工资申诉',
name: 'WageAppeal',
sceneType: [0, 1]
},
{
icon: 'evaluation-management',
label: '评估单管理',
name: 'EvaluationFormList',
......@@ -80,10 +102,45 @@ export default {
sceneType: [7]
}
]
return entranceList.filter(e => e.sceneType.includes(sceneType))
// 先根据场景过滤
let list = entranceList.filter(e => e.sceneType.includes(sceneType))
// 加载阶段或不允许显示时,移除工资申诉入口
if (this.loadingEntrance || !this.wageAppealAllowed) {
list = list.filter(e => e.name !== 'WageAppeal')
}
return list
}
},
methods: {
// 请求工资申诉入口权限,并设置显示开关
async fetchWageAppealEntrance() {
try {
this.loadingEntrance = true
const userInfo = uni.$storage.get('userInfo') || {}
const { shopMerchantId } = userInfo
// 缺少商户ID时降级为不展示
if (!shopMerchantId) {
this.wageAppealAllowed = false
return
}
const res = await uni.$api.commonApi.getWageAppealEntrance({
merchantId: shopMerchantId
})
// 兼容不同返回结构,解析是否允许显示
this.wageAppealAllowed = !!res
} catch (error) {
// 接口异常降级:不展示工资申诉入口,并提示(非打断式)
this.wageAppealAllowed = false
if (error) {
uni.showToast({
title: '工资申诉入口获取失败',
icon: 'none'
})
}
} finally {
this.loadingEntrance = false
}
},
handleClick(item) {
// 这里可以根据实际需求进行跳转或功能处理
this.$emit('entranceClick', item)
......@@ -101,10 +158,16 @@ export default {
}
.entrance-list {
display: flex;
flex-wrap: wrap;
gap: toRpx(68);
justify-content: flex-start;
width: 100%;
display: grid;
row-gap: toRpx(30);
column-gap: toRpx(68);
&.entrance-list-0 {
grid-template-columns: repeat(5, 1fr);
}
&.entrance-list-1 {
grid-template-columns: repeat(4, 1fr);
}
}
.entrance-item {
......
<!-- 异常订单 -->
<template>
<view v-if="show" class="error-order-popup-mask" @click="handleMaskClick">
<view
class="error-order-popup-content"
@click.stop
>
<!-- 顶部图片 -->
<image
v-if="topImage"
class="top-image"
:src="topImage"
:style="topImageStyle"
/>
<view v-if="closeButton" @click.stop="closePopup">
<view class="sprite-icon icon-evaluationClose"></view>
</view>
<!-- 标题 -->
<view v-if="title" class="popup-title">{{ title }}</view>
<!-- 内容区域 - 默认插槽 -->
<view class="popup-body">
<slot></slot>
</view>
<!-- 底部按钮插槽 -->
<slot name="footer"></slot>
</view>
</view>
</template>
<script>
export default {
name: 'ErrorOrderPopup',
props: {
show: {
type: Boolean,
default: false
},
width: {
type: [Number, String],
default: 848
},
height: {
type: [Number, String],
default: 1054
},
title: {
type: String,
default: ''
},
topImage: {
type: String,
default: ''
},
topImageWidth: {
type: [Number, String],
default: 848
},
topImageHeight: {
type: [Number, String],
default: 248
},
maskClosable: {
type: Boolean,
default: false
},
closeButton: {
type: Boolean,
default: false
}
},
computed: {
contentStyle() {
return {
width: this.formatSize(this.width),
minHeight: this.formatSize(this.height)
}
},
topImageStyle() {
return {
width: this.formatSize(this.topImageWidth),
height: this.formatSize(this.topImageHeight)
}
}
},
methods: {
formatSize(size) {
return typeof size === 'number' ? `${size}rpx` : size
},
handleMaskClick() {
if (this.maskClosable) {
this.close()
}
},
close() {
this.$emit('update:show', false)
this.$emit('close')
},
closePopup() {
this.close()
}
}
}
</script>
<style lang="scss" scoped>
.error-order-popup-mask {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.5);
display: flex;
justify-content: center;
align-items: center;
z-index: 9999;
}
.error-order-popup-content {
background: #FFFFFF;
border-radius: toRpx(48);
display: flex;
flex-direction: column;
align-items: center;
position: relative;
max-height: toRpx(740);
overflow-y: auto;
}
.sprite-icon {
top: toRpx(48);
right: toRpx(48);
position: absolute;
}
.top-image {
width: 100%;
display: block;
margin-bottom: toRpx(48);
flex-shrink: 0;
border-radius: toRpx(20) toRpx(20) 0 0;
}
.popup-title {
font-size: toRpx(40);
font-weight: 500;
letter-spacing: 0;
line-height: toRpx(46.88);
color: rgba(51, 51, 51, 1);
text-align: center;
margin-bottom: toRpx(48);
padding: 0 toRpx(32);
}
.popup-body {
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
padding: 0 toRpx(32);
}
</style>
\ No newline at end of file
<!--
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2024-12-31 16:53:31
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2025-01-17 21:26:09
* @FilePath: \gl-tape\components\HomeFrame\components\Point.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<view class="point-container">
<view class="tab-box">
<view @click="selectTab(index)" :class="{ 'tab-item': true, active: activeIndex == index }" v-for="(i, index) in tabList" :key="index">{{ i.name }}</view>
</view>
<component :is="tabName" ref="centerRef" @selectTab="selectTab"></component>
</view>
</template>
<script type="text/ecmascript-6">
import Point from './Point/index.vue'
import Income from './Income/index.vue'
import Attendance from './Attendance/index.vue'
import { mapState } from 'vuex'
export default {
name: '',
components: {
Point,
Income,
Attendance
},
data () {
return {
activeIndex: 0,
componentList:['Attendance','Income'],
tabName: 'Attendance',
tabList:[
// {
// name:'我的积分',
// },
{
name:'我的考勤',
},
{
name:'我的收入',
}
]
}
},
computed: {
...mapState(['point.tabIndex']),
},
watch: {
'$store.state.point.tabIndex'(val) {
console.log(val)
this.activeIndex = val
this.tabName = this.componentList[val]
}
},
mounted() {
this.$store.dispatch('setTab', 0)
},
methods: {
selectTab(index){
this.$store.dispatch('setTab', index)
}
},
}
</script>
<style scoped lang="scss">
.tab-box {
margin-top: 68rpx;
width: 550rpx;
height: 84rpx;
line-height: 74rpx;
background: rgba(101, 171, 250, 0.12);
border-radius: 20rpx;
display: flex;
align-items: center;
justify-content: center;
.tab-item {
font-size: 28rpx;
color: #1a1a1a;
text-align: center;
width: 50%;
&.active {
width: 260rpx;
height: 72rpx;
background: #ffffff;
border-radius: 16rpx;
text-align: center;
font-weight: 600;
color: #4673ff;
}
}
}
</style>
<!--
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2024-12-31 16:53:31
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2025-01-17 21:26:09
* @FilePath: \gl-tape\components\HomeFrame\components\Point.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<view class="point-container">
<view class="tab-box">
<view @click="selectTab(index)" :class="{ 'tab-item': true, active: activeIndex == index }" v-for="(i, index) in tabList" :key="index">{{ i.name }}</view>
</view>
<component :is="tabName" ref="centerRef" @selectTab="selectTab"></component>
</view>
</template>
<script type="text/ecmascript-6">
import Point from './Point/index.vue'
import Income from './Income/index.vue'
import Attendance from './Attendance/index.vue'
import { mapState } from 'vuex'
export default {
name: '',
components: {
Point,
Income,
Attendance
},
data () {
return {
activeIndex: 0,
componentList:['Attendance','Income'],
tabName: 'Attendance',
tabList:[
{
name:'我的考勤',
},
]
}
},
computed: {
...mapState(['point.tabIndex']),
},
watch: {
'$store.state.point.tabIndex'(val) {
console.log(val)
this.activeIndex = val
this.tabName = this.componentList[val]
}
},
mounted() {
this.$store.dispatch('setTab', 0)
},
methods: {
selectTab(index){
this.$store.dispatch('setTab', index)
}
},
}
</script>
<style scoped lang="scss">
.tab-box {
margin-top: toRpx(68);
width: toRpx(290);
height: toRpx(84);
line-height: toRpx(74);
background: rgba(101, 171, 250, 0.12);
border-radius: toRpx(20);
display: flex;
align-items: center;
justify-content: center;
.tab-item {
font-size: toRpx(28);
color: #1a1a1a;
text-align: center;
width: 50%;
&.active {
width: toRpx(260);
height: toRpx(72);
background: #ffffff;
border-radius: toRpx(16);
text-align: center;
font-weight: 600;
color: #4673ff;
}
}
}
</style>
<template>
<view class="merchant-list">
<template v-for="(i, index) in list">
<view :key="index" @click="choose(i)" :class="['item flex', { active: currentId ? i.value == currentId : i.value == data.orderTypeCode }]">
<view class="sprite-icon icon-tag-checked"></view>
{{ i.name }}
</view>
</template>
</view>
</template>
<script type="text/ecmascript-6">
import popupmixin from './popupmixin'
export default {
mixins: [popupmixin],
name: 'OrderTypePopup',
data () {
return {
}
},
mounted () {
},
methods: {
async getList () {
const params = this.params
const data = [{ name: '正常订单', value: '1' }, { name: '打折策略', value: '2' }, { name: '买赠策略', value: '3' }, { name: '冲量活动', value: '4' }, { name: '组合付款', value: '5' }]
this.updateParams(params, data || [])
},
initData (list) {
const { data } = this
// 使用 orderTypeCode 而不是 djOrderType,因为 orderTypeCode 存储的是代码(如 "1"),而 djOrderType 存储的是名称(如 "正常订单")
if (data.orderTypeCode) {
this.currentId = data.orderTypeCode
let item = list.find(i => i.value == this.currentId)
if (item) {
this.$emit('choose', item)
}
}
this.list = list
this.$emit('onComplete')
},
choose (i) {
this.currentId = i.value
this.$emit('choose', i)
}
}
}
</script>
<style scoped lang="scss">
.merchant-list {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: toRpx(32);
margin: 0 toRpx(48);
.item {
justify-content: center;
height: toRpx(72);
border-radius: toRpx(8);
border: toRpx(2) solid #dce0e6;
box-sizing: border-box;
position: relative;
color: #333333;
font-size: toRpx(32);
.sprite-icon {
display: none;
position: absolute;
top: 0;
right: 0;
}
}
.active {
border-color: #2c66f7;
background: #ecf1ff;
color: #2c66f7;
.sprite-icon {
display: block;
}
}
}
</style>
......@@ -378,6 +378,18 @@ const componentConfig = {
searchValue: '',
noData: false,
defeat: true
},
28: {
name: 'OrderTypePopup',
title: '订单类型',
hideSearch: true,
hideFooter: false,
// 绑定 CreateOrder 中的字段名
idKey: 'djOrderType',
cacheData: [],
loadComplete: false,
searchValue: '',
noData: false
}
}
export default { componentConfig }
<template>
<view class="order-popup">
<popup
:position="position"
:animation="animation"
ref="popup"
@onConfirm="confirm"
@onCancel="cancel"
@onReset="reset"
:showReset="popupType === 15"
:hideFooter="componentObject[popupType].hideFooter"
:popupStyle="componentObject[popupType].popupStyle || ''"
>
<popup :position="position" :animation="animation" ref="popup" @onConfirm="confirm" @onCancel="cancel" @onReset="reset" :showReset="popupType === 15" :hideFooter="componentObject[popupType] && componentObject[popupType].hideFooter" :popupStyle="(componentObject[popupType] && componentObject[popupType].popupStyle) || ''">
<view class="popup-title flex">
{{ title }}
<view
class="popup-close flex"
@click="close"
>
<uni-icons
type="closeempty"
size="16"
></uni-icons>
<view class="popup-close flex" @click="close">
<uni-icons type="closeempty" size="16"></uni-icons>
</view>
</view>
<template v-if="!componentObject[popupType].hideSearch">
<template v-if="componentObject[popupType] && !componentObject[popupType].hideSearch">
<view class="popup-search">
<input
class="input"
type="text"
:placeholder="componentObject[popupType].placeholder || '请输入'"
placeholder-class="placeholder"
v-model="componentObject[popupType].searchValue"
confirm-type="search"
@confirm="handleSearch"
/>
<view
class="clear flex"
@click="clear"
>
<uni-icons
type="closeempty"
size="16"
v-if="componentObject[popupType].searchValue"
></uni-icons>
<input class="input" type="text" :placeholder="(componentObject[popupType] && componentObject[popupType].placeholder) || '请输入'" placeholder-class="placeholder" v-model="componentObject[popupType].searchValue" confirm-type="search" @confirm="handleSearch" />
<view class="clear flex" @click="clear">
<uni-icons type="closeempty" size="16" v-if="componentObject[popupType] && componentObject[popupType].searchValue"></uni-icons>
</view>
</view>
</template>
<view :class="['popup-body',
{'hide-footer': componentObject[popupType].hideFooter },
{'hide-search': componentObject[popupType].hideSearch },
{'hide-footer-search':componentObject[popupType].hideFooter && componentObject[popupType].hideSearch }
]">
<scroll-view
scroll-y
:class="['popup-scroll-view', { show: componentObject[popupType].loadComplete }]"
>
<component
:is="componentObject[popupType].name"
:params.sync="componentObject[popupType]"
:data="data"
:dataKey="dataKey"
:isDefeatOrder="isDefeatOrder"
:defaultTime="defaultTime"
:positionTypeList="positionTypeList"
ref="componentRef"
@choose="chooseContent = $event"
@openSkuPopup="openSkuPopup"
@onComplete="componentObject[popupType].loadComplete = true"
@confirm="confirm"
></component>
<view v-if="componentObject[popupType]" :class="['popup-body', { 'hide-footer': componentObject[popupType].hideFooter }, { 'hide-search': componentObject[popupType].hideSearch }, { 'hide-footer-search': componentObject[popupType].hideFooter && componentObject[popupType].hideSearch }]">
<scroll-view scroll-y :class="['popup-scroll-view', { show: componentObject[popupType].loadComplete }]">
<component :is="componentObject[popupType].name" :params.sync="componentObject[popupType]" :data="data" :dataKey="dataKey" :isDefeatOrder="isDefeatOrder" :defaultTime="defaultTime" :positionTypeList="positionTypeList" ref="componentRef" @choose="chooseContent = $event" @openSkuPopup="openSkuPopup" @onComplete="componentObject[popupType].loadComplete = true" @confirm="confirm"></component>
<template v-if="componentObject[popupType].noData">
<view class="nothing flex">暂无数据</view>
</template>
</scroll-view>
<image
v-if="!componentObject[popupType].loadComplete"
class="loading"
src="../../assets/images/common/loadding.gif"
/>
<image v-if="!componentObject[popupType].loadComplete" class="loading" src="../../assets/images/common/loadding.gif" />
</view>
</popup>
<sku-popup
ref="skuPopupRef"
@onConfirm="skuConfirm"
></sku-popup>
<sku-popup ref="skuPopupRef" @onConfirm="skuConfirm"></sku-popup>
</view>
</template>
......@@ -109,6 +51,7 @@ import Customer from './components/Customer.vue'
import Options from './components/Options.vue'
import CarBrand from './components/CarBrand.vue'
import Gearbox from './components/Gearbox.vue'
import OrderTypePopup from './components/OrderTypePopup.vue'
export default {
components: {
......@@ -131,7 +74,8 @@ export default {
Customer,
Options,
CarBrand,
Gearbox
Gearbox,
OrderTypePopup
},
name: '',
props: {
......@@ -237,17 +181,25 @@ export default {
},
initPopupData () {
this.chooseContent = null
if (!this.componentObject[this.popupType]) {
console.error(`Popup type ${this.popupType} not found in config`)
return
}
let componentRef = this.componentRef()
if (!componentRef) setTimeout(this.initPopupData, .1e3)
else componentRef.getList && componentRef.getList(this.componentObject[this.popupType].searchValue)
else componentRef.getList && componentRef.getList(this.componentObject[this.popupType].searchValue || '')
},
handleSearch () {
if (!this.componentObject[this.popupType]) {
console.error(`Popup type ${this.popupType} not found in config`)
return
}
let componentRef = this.componentRef()
if (!componentRef) uni.showToast({
title: '请稍后再试',
icon: 'none'
})
else componentRef.handleSearch(this.componentObject[this.popupType].searchValue)
else componentRef.handleSearch(this.componentObject[this.popupType].searchValue || '')
},
confirm (autoClose) {
try {
......
<template>
<view class="list">
<view
@click="currentId = ''"
:class="['item flex',{active:!currentId}]"
>
<view class="sprite-icon icon-tag-checked"></view>
全部
</view>
<template v-for="(i, index) in list">
<view
:key="index"
@click="currentId = i.value"
:class="['item flex',{active:currentId == i.value}]"
>
<view class="sprite-icon icon-tag-checked"></view>
{{i.name}}
</view>
</template>
</view>
</template>
<script type='text/ecmascript-6'>
const errorOrderList = [{
name: '无异常',
value: "N"
},
{
name: '异常',
value: 'Y'
}
]
export default {
name: 'PayList',
inject: ['userInfo'],
data () {
return {
list: [],
currentId: '',
}
},
props: {
params: Object,
data: [Object, Array],
},
watch: {
currentId: {
handler (value) {
let { params: { idKey } } = this
this.$emit('choose', {
key: idKey,
value
})
},
deep: true
}
},
mounted () {
this.getList()
},
methods: {
async getList () {
const { userInfo, params } = this,
{ cacheData } = params
if (cacheData && cacheData.length) {
this.initList(cacheData)
return
}
this.initList(errorOrderList)
params.cacheData = errorOrderList
this.$emit('update:params', params)
},
initList (list) {
this.list = list
let { data, params: { idKey } } = this
this.currentId = data[idKey]
this.$emit('onComplete')
},
}
}
</script>
<style scoped lang='scss'>
.list {
display: grid;
grid-template-columns: repeat(6, 1fr);
gap: toRpx(32);
margin: 0 toRpx(48);
.item {
justify-content: center;
height: toRpx(72);
border-radius: toRpx(8);
border: toRpx(2) solid #dce0e6;
box-sizing: border-box;
position: relative;
color: #333333;
font-size: toRpx(32);
.sprite-icon {
display: none;
position: absolute;
top: 0;
right: 0;
}
}
.splice {
color: #333333;
font-size: toRpx(32);
margin: 0 toRpx(8);
}
.active {
border-color: #2c66f7;
background: #ecf1ff;
color: #2c66f7;
.sprite-icon {
display: block;
}
}
}
</style>
\ No newline at end of file
<template>
<view class="list">
<view
@click="currentId = ''"
:class="['item flex',{active:!currentId}]"
>
<view @click="currentId = ''" :class="['item flex', { active: !currentId }]">
<view class="sprite-icon icon-tag-checked"></view>
全部
</view>
<template v-for="(i, index) in list">
<view
:key="index"
@click="currentId = i.id"
:class="['item flex',{active:currentId == i.id}]"
>
<view :key="index" @click="currentId = i.id" :class="['item flex', { active: currentId == i.id }]">
<view class="sprite-icon icon-tag-checked"></view>
{{i.name}}
{{ i.name }}
</view>
</template>
</view>
</template>
<script type='text/ecmascript-6'>
<script type="text/ecmascript-6">
export default {
name: 'OrderStatusList',
inject: ['userInfo'],
......@@ -63,7 +56,7 @@ export default {
id: 7
},
{
name: '已失效',
name: '错误订单',
value: [11],
id: 8
},
......@@ -81,7 +74,12 @@ export default {
name: '已退款',
value: [5, 12],
id: 11
}
},
{
name: '审批中',
value: [14],
id: 12
},
]),
currentId: '',
}
......@@ -120,7 +118,7 @@ export default {
}
</script>
<style scoped lang='scss'>
<style scoped lang="scss">
.list {
display: grid;
grid-template-columns: repeat(6, 1fr);
......@@ -156,4 +154,4 @@ export default {
}
}
}
</style>
\ No newline at end of file
</style>
const screenList = [
{
title: '转化人员',
......@@ -27,18 +26,16 @@ const screenList = [
componentName: 'TimeList',
params: {
idKey: ['placeOrderStartDateStr', 'placeOrderEndDateStr'],
currentIdKey: 'orderTimeId',
},
currentIdKey: 'orderTimeId'
}
},
{
title: '支付时间',
componentName: 'TimeList',
params: {
idKey: ['installUpgradeBeginTimeStr', 'installUpgradeEndTimeStr'],
currentIdKey: 'payTimeId',
},
currentIdKey: 'payTimeId'
}
},
{
title: '订单状态',
......@@ -48,13 +45,19 @@ const screenList = [
}
},
{
title: '异常标记',
componentName: 'ErrorOrderList',
params: {
idKey: 'abnormalFlag'
}
},
{
title: '支付方式',
componentName: 'PayList',
params: {
idKey: 'payType'
}
},
}
]
export default { screenList }
\ No newline at end of file
export default { screenList }
......@@ -73,6 +73,7 @@ import TimeList from './components/TimeList.vue'
import OrderStatusList from './components/OrderStatusList.vue'
import PayList from './components/PayList.vue'
import CourseOptionList from './components/CourseOptionList.vue'
import ErrorOrderList from './components/ErrorOrderList.vue'
export default {
components: {
Popup,
......@@ -80,7 +81,8 @@ export default {
TimeList,
OrderStatusList,
PayList,
CourseOptionList
CourseOptionList,
ErrorOrderList
},
name: 'OrderScreen',
props: {
......
<template>
<view class="list">
<view
@click="currentId = ''"
:class="['item flex',{active:!currentId}]"
>
<view class="sprite-icon icon-tag-checked"></view>
全部
</view>
<template v-for="(i, index) in list">
<view
:key="index"
@click="currentId = i.value"
:class="['item flex',{active:currentId == i.value}]"
>
<view class="sprite-icon icon-tag-checked"></view>
{{i.name}}
</view>
</template>
</view>
</template>
<script type='text/ecmascript-6'>
const errorOrderList = [{
name: '无异常',
value: "N"
},
{
name: '异常',
value: 'Y'
}
]
export default {
name: 'PayList',
inject: ['userInfo'],
data () {
return {
list: [],
currentId: '',
}
},
props: {
params: Object,
data: [Object, Array],
},
watch: {
currentId: {
handler (value) {
let { params: { idKey } } = this
this.$emit('choose', {
key: idKey,
value
})
},
deep: true
}
},
mounted () {
this.getList()
},
methods: {
async getList () {
const { userInfo, params } = this,
{ cacheData } = params
if (cacheData && cacheData.length) {
this.initList(cacheData)
return
}
this.initList(errorOrderList)
params.cacheData = errorOrderList
this.$emit('update:params', params)
},
initList (list) {
this.list = list
let { data, params: { idKey } } = this
this.currentId = data[idKey]
this.$emit('onComplete')
},
}
}
</script>
<style scoped lang='scss'>
.list {
display: grid;
grid-template-columns: repeat(6, 1fr);
gap: toRpx(32);
margin: 0 toRpx(48);
.item {
justify-content: center;
height: toRpx(72);
border-radius: toRpx(8);
border: toRpx(2) solid #dce0e6;
box-sizing: border-box;
position: relative;
color: #333333;
font-size: toRpx(32);
.sprite-icon {
display: none;
position: absolute;
top: 0;
right: 0;
}
}
.splice {
color: #333333;
font-size: toRpx(32);
margin: 0 toRpx(8);
}
.active {
border-color: #2c66f7;
background: #ecf1ff;
color: #2c66f7;
.sprite-icon {
display: block;
}
}
}
</style>
\ No newline at end of file
......@@ -65,7 +65,12 @@ export default {
name: '战败',
value: -1,
id: 11
}
},
{
name: '审批中',
value: [14],
id: 12
},
]),
currentId: '',
}
......
......@@ -45,6 +45,13 @@ const screenList = [
}
},
{
title: '异常标记',
componentName: 'ErrorOrderList',
params: {
idKey: 'abnormalFlag'
}
},
{
title: '支付方式',
componentName: 'PayList',
params: {
......
......@@ -37,6 +37,7 @@ import OrderStatusList from './components/OrderStatusList.vue'
import PayList from './components/PayList.vue'
import CourseOptionList from './components/CourseOptionList.vue'
import ContractList from './components/ContractList.vue'
import ErrorOrderList from './components/ErrorOrderList.vue'
export default {
components: {
Popup,
......@@ -45,7 +46,8 @@ export default {
OrderStatusList,
PayList,
CourseOptionList,
ContractList
ContractList,
ErrorOrderList
},
name: 'OrderScreen',
props: {
......
......@@ -39,7 +39,7 @@ const secretKey = {
const domain = {
// ip: 'http://192.168.2.94:8558',
// ip: 'http://192.168.2.3:8315',
ip: 'http://192.168.1.170:8315',
ip: 'http://192.168.1.122:8292',
/**登录: 192.168.2.3:8315
商城: 192.168.2.3:8558 */
dev: 'https://scrm.dev.glsx.com.cn',
......@@ -49,8 +49,8 @@ const domain = {
}[target[index]]
const djDomain = {
ip: 'http://dj.dev.glsx.com.cn',
// ip: 'http://192.168.1.125:8080',
// ip: 'http://dj.dev.glsx.com.cn',
ip: 'http://192.168.1.122:8292',
dev: 'http://dj.dev.glsx.com.cn',
beta: 'https://dj.beta.glsx.com.cn', //预发布 appid: wx9f91c1ec493eb425
uat: 'https://dj.test.glsx.com.cn', //测试 appid: wxe10067a63c1856ac
......@@ -160,7 +160,8 @@ const pathEnum = {
merchants: '/rop-merchants/',
pad: '/rop-dj-pad/',
clue: '/rop-scrm-clue/',
evaluation: '/gsc-vcp-pad-facade'
evaluation: '/gsc-vcp-pad-facade',
staffMiniprogram: '/rop-dj-staff-miniprogram/'
}
const CONFIG_ENV_MAP = {
1: 'develop',
......
......@@ -164,11 +164,11 @@ function requestAndroidPermission (permissionID) {
},
['android.permission.CAMERA']: {
title: '相机',
content: '为了拍摄活动现场照片及客户购车凭证,展业助手需要申请您的相机权限。'
content: '展业助手需要申请相机权限,用于上传相关图片资料以完成业务办理。'
},
['android.permission.READ_EXTERNAL_STORAGE']: {
title: '相册',
content: '为了上传活动现场照片及客户购车凭证,展业助手需要申请您的相册权限。'
content: '展业助手需要申请相册权限,用于上传相关图片资料以完成业务办理。'
}
}[permissionID] || {
title: permissionID,
......
{
"name" : "展业助手",
"appid" : "__UNI__D3BD3DF",
"description" : "",
"versionName" : "2.21.0",
"versionCode" : 2210,
"transformPx" : false,
"sassImplementationName" : "node-sass",
/* 5+App特有相关 */
"app-plus" : {
"cache" : false,
"bounce" : "none",
"usingComponents" : true,
"nvueStyleCompiler" : "uni-app",
"compilerVersion" : 3,
"compatible" : {
"ignoreVersion" : true
},
"screenOrientation" : "landscape",
"splashscreen" : {
"alwaysShowBeforeRender" : true,
"waiting" : true,
"autoclose" : true,
"delay" : 0
},
/* 模块配置 */
"modules" : {
"Camera" : {},
"Record" : {},
"VideoPlayer" : {},
"AudioPlayer" : {},
"SQLite" : {},
"Maps" : {},
"Geolocation" : {}
},
/* 应用发布信息 */
"distribute" : {
/* android打包配置 */
"android" : {
"permissions" : [
"<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.INTERNET\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>"
],
"abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ],
"targetSdkVersion" : 30,
"minSdkVersion" : 21,
"excludePermissions" : [
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>"
]
},
/* ios打包配置 */
"ios" : {
"dSYMs" : false,
"UIBackgroundModes" : "audio"
},
/* SDK配置 */
"sdkConfigs" : {
"ad" : {},
"speech" : {},
"geolocation" : {
"baidu" : {
"__platform__" : [ "android" ],
"appkey_ios" : "",
"appkey_android" : "rfN7u5gCi0KyCGIWWBYGXlmKrVQsKH8z"
}
},
"maps" : {}
},
"icons" : {
"android" : {
"hdpi" : "static/72.png",
"xhdpi" : "static/96.png",
"xxhdpi" : "static/144.png"
}
}
},
"nativePlugins" : {
"Ba-KeepAliveSuit" : {
"__plugin_info__" : {
"name" : "安卓保活套装(通用、常驻通知、电池优化、自启管理、后台运行等)",
"description" : "在Ba-KeepAlive的基础上,新增了忽略电池优化、自启管理、常驻通知。为定位、推送、websocket、定时任务、蓝牙、聊天等保驾护航(**注意:**不保证支持所有机型和场景,建议先试用再购买)",
"platforms" : "Android",
"url" : "https://ext.dcloud.net.cn/plugin?id=11765",
"android_package_name" : "uni.gltap",
"ios_bundle_id" : "",
"isCloud" : true,
"bought" : 1,
"pid" : "11765",
"parameters" : {}
}
}
}
},
/* 快应用特有相关 */
"quickapp" : {},
/* 小程序特有相关 */
"mp-weixin" : {
"appid" : "wx79d1ff39bee3d047",
"setting" : {
"urlCheck" : false
},
"usingComponents" : true
},
"mp-alipay" : {
"usingComponents" : true
"name": "展业助手",
"appid": "__UNI__D3BD3DF",
"description": "",
"versionName": "2.21.1",
"versionCode": 2211,
"transformPx": false,
"sassImplementationName": "node-sass",
/* 5+App特有相关 */
"app-plus": {
"cache": false,
"bounce": "none",
"usingComponents": true,
"nvueStyleCompiler": "uni-app",
"compilerVersion": 3,
"compatible": {
"ignoreVersion": true
},
"mp-baidu" : {
"usingComponents" : true
"screenOrientation": "landscape",
"splashscreen": {
"alwaysShowBeforeRender": true,
"waiting": true,
"autoclose": true,
"delay": 0
},
"mp-toutiao" : {
"usingComponents" : true
/* 模块配置 */
"modules": {
"Camera": {},
"Record": {},
"VideoPlayer": {},
"AudioPlayer": {},
"SQLite": {},
"Maps": {},
"Geolocation": {}
},
"uniStatistics" : {
"enable" : false
/* 应用发布信息 */
"distribute": {
/* android打包配置 */
"android": {
"permissions": [
"<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.INTERNET\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>"
],
"abiFilters": ["armeabi-v7a", "arm64-v8a", "x86"],
"targetSdkVersion": 30,
"minSdkVersion": 21,
"excludePermissions": ["<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>"]
},
/* ios打包配置 */
"ios": {
"dSYMs": false,
"UIBackgroundModes": "audio"
},
/* SDK配置 */
"sdkConfigs": {
"ad": {},
"speech": {},
"geolocation": {
"baidu": {
"__platform__": ["android"],
"appkey_ios": "",
"appkey_android": "rfN7u5gCi0KyCGIWWBYGXlmKrVQsKH8z"
}
},
"maps": {}
},
"icons": {
"android": {
"hdpi": "static/72.png",
"xhdpi": "static/96.png",
"xxhdpi": "static/144.png"
}
}
},
"vueVersion" : "2",
"h5" : {
"devServer" : {
"port" : 8080,
"https" : false
"nativePlugins": {
"Ba-KeepAliveSuit": {
"__plugin_info__": {
"name": "安卓保活套装(通用、常驻通知、电池优化、自启管理、后台运行等)",
"description": "在Ba-KeepAlive的基础上,新增了忽略电池优化、自启管理、常驻通知。为定位、推送、websocket、定时任务、蓝牙、聊天等保驾护航(**注意:**不保证支持所有机型和场景,建议先试用再购买)",
"platforms": "Android",
"url": "https://ext.dcloud.net.cn/plugin?id=11765",
"android_package_name": "uni.gltap",
"ios_bundle_id": "",
"isCloud": true,
"bought": 1,
"pid": "11765",
"parameters": {}
}
}
}
},
/* 快应用特有相关 */
"quickapp": {},
/* 小程序特有相关 */
"mp-weixin": {
"appid": "wx79d1ff39bee3d047",
"setting": {
"urlCheck": false
},
"usingComponents": true
},
"mp-alipay": {
"usingComponents": true
},
"mp-baidu": {
"usingComponents": true
},
"mp-toutiao": {
"usingComponents": true
},
"uniStatistics": {
"enable": false
},
"vueVersion": "2",
"h5": {
"devServer": {
"port": 8080,
"https": false
}
}
}
let modalQueue = [],
eventRequest = []
export default {
data () {
data() {
return {}
},
computed: {
userInfo () {
userInfo() {
return uni.$storage.get('userInfo') || {}
}
},
mounted () { },
mounted() {},
methods: {
/**
*
* @param {是否需要检测企微打卡} checkWW
* @returns
*
* @param {是否需要检测企微打卡} checkWW
* @returns
*/
async checkDailyReport (checkWW = true) {
async checkDailyReport(checkWW = true) {
modalQueue = []
eventRequest = []
let { sceneType, isSuper, loginRole } = this.userInfo
......@@ -39,7 +39,7 @@ export default {
})
})
},
showNextModal () {
showNextModal() {
if (modalQueue.length > 0) {
const modalInfo = modalQueue.pop()
// if (wx.__HAS_SHOW_MODAL) return;
......@@ -63,7 +63,7 @@ export default {
/**
* 轻改日报
*/
staffDailyReport () {
staffDailyReport() {
let { userInfo } = this
return new Promise((resolve, reject) => {
uni.$api.interceptionApi
......@@ -92,9 +92,10 @@ export default {
const pages = getCurrentPages(),
currentPage = pages[pages.length - 1]
if (currentPage.route == 'pages/boutique/tool/index') uni.$emit('jumpToDailyReport', formattedDate)
else uni.navigateTo({
url: `/pages/boutique/tool/index?componentName=DailyReport&currentDate=${formattedDate}`
})
else
uni.navigateTo({
url: `/pages/boutique/tool/index?componentName=DailyReport&currentDate=${formattedDate}`
})
}
})
resolve(true)
......@@ -110,7 +111,7 @@ export default {
/**
* 二手车日报
*/
usedCarDailyReport () {
usedCarDailyReport() {
let { userInfo } = this
return new Promise(async (resolve, reject) => {
const data = await uni.$api.interceptionApi.checkUsedCarStaffIsNew({
......@@ -120,10 +121,11 @@ export default {
staffPhone: userInfo.phone,
sceneType: 7
})
if (!data) resolve(false) //检测是否新员工或调店 flase不检测日报 true检测日报
if (!data)
resolve(false) //检测是否新员工或调店 flase不检测日报 true检测日报
else {
const _data = await uni.$api.interceptionApi.checkUsedCarStaffDailyReportValid({
sellerMerchantId: userInfo.shopMerchantId,
sellerMerchantId: userInfo.shopMerchantId
}) //true 已填写 false 未填写
if (!_data) {
// 获取当前日期
......@@ -141,18 +143,18 @@ export default {
const pages = getCurrentPages(),
currentPage = pages[pages.length - 1]
if (currentPage.route == 'pages/usedCar/tool/index') uni.$emit('jumpToDailyReport', formattedDate)
else uni.navigateTo({
url: `/pages/usedCar/tool/index?componentName=DailyReport&currentDate=${formattedDate}`
})
else
uni.navigateTo({
url: `/pages/usedCar/tool/index?componentName=DailyReport&currentDate=${formattedDate}`
})
}
})
resolve(true)
} else resolve(false)
}
})
},
clockedIntoWork () {
clockedIntoWork() {
return new Promise((resolve, reject) => {
uni.$api.interceptionApi
.clockInConfigPhone({})
......@@ -179,7 +181,7 @@ export default {
})
},
/**延保日报 */
equityStaffDailyReport () {
equityStaffDailyReport() {
let { userInfo } = this
return new Promise((resolve, reject) => {
uni.$api.interceptionApi
......@@ -207,21 +209,23 @@ export default {
const pages = getCurrentPages(),
currentPage = pages[pages.length - 1]
if (currentPage.route == 'pages/equity/tool/index') uni.$emit('jumpToDailyReport', formattedDate)
else uni.navigateTo({
url: `/pages/equity/tool/index?componentName=DailyReport&currentDate=${formattedDate}`
})
else
uni.navigateTo({
url: `/pages/equity/tool/index?componentName=DailyReport&currentDate=${formattedDate}`
})
}
})
resolve(true)
} else {
resolve(false)
}
}).catch(err => {
})
.catch(err => {
resolve()
})
})
},
addModalToQueue (title, content, confirmText, showCancel, priority, eventCallback) {
addModalToQueue(title, content, confirmText, showCancel, priority, eventCallback) {
if (modalQueue.findIndex(val => val.content == content) < 0)
modalQueue.push({
title,
......@@ -236,7 +240,7 @@ export default {
/**
* 查询当前员工处罚情况
*/
async inspectionOfProhibitionBill () {
async inspectionOfProhibitionBill() {
const data = await uni.$api.interceptionApi.checkStaffStudyPunish()
if (data)
uni.showModal({
......@@ -250,11 +254,16 @@ export default {
return Promise.resolve(data)
},
// 限制录单
async getLimitRecord () {
async getLimitRecord() {
const data = await uni.$api.commonApi.getLimitRecord()
if (data)
console.log(data, '限制录单')
if (data) console.log(data, '限制录单')
return Promise.resolve(data)
},
async getAbnormalOrderLock() {
let { sceneType } = this.userInfo
const data = await uni.$api.commonApi.getAbnormalOrderLock({ sceneType: sceneType })
if (data) console.log(data, '异常订单锁单信息')
return Promise.resolve(data)
}
}
}
......@@ -317,6 +317,12 @@
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/common/wageAppeal/index",
"style": {
"navigationStyle": "custom"
}
}
],
"globalStyle": {
......
......@@ -27,7 +27,7 @@
</view>
<view class="goods-price">
¥
<text>{{ i.totalPrice || 0 }}</text>
<text>{{ i.finalPrice || 0 }}</text>
</view>
</view>
......@@ -39,6 +39,36 @@
</view>
</view>
</view>
<view class="flex errorBox" v-if="orderCardDetail.status == 11 && orderCardDetail.associatedOrderCode">
<view class="order-list align-center flex-1">
<text>原错误订单编号</text>
<text class="priceName">{{ orderCardDetail.associatedOrderCode }}</text>
</view>
<view class="order-list align-center flex-1">
<text>原错误订单总价</text>
<text class="priceName">¥{{ orderCardDetail.associatedOrderCodeFinalPrice }}</text>
</view>
</view>
<!-- 支付方式 -->
<view class="order-payType flex">
<view class="payType flex align-center">
<view class="payType-label">订单类型</view>
<view class="payType-value flex align-center">
{{ orderType[orderCardDetail['orderType']] }}
<view class="flex align-center errorTips" v-if="orderCardDetail.abnormalFlag == 'Y'">
<view class="sprite-icon icon-errortips"></view>
异常
</view>
</view>
</view>
<view class="payType flex align-center">
<view class="payType-label">审批状态</view>
<view class="payType-value flex align-center">
{{ goodsOrderApplyStatus[orderCardDetail.goodsOrderApplyStatus] }}
</view>
</view>
</view>
<view class="info-box">
<view class="order-list align-center" v-for="(item, sindex) in orderCardDetail.deliveryUserId ? pointsMultiObj : orderObj" :key="sindex">
<view class="order flex align-center">
......@@ -78,7 +108,7 @@
<view class="order-price-label">实付金额</view>
<view class="price">
<text class="unit">¥</text>
{{ orderCardDetail.totalPrice }}
{{ orderCardDetail.finalPrice }}
</view>
</view>
</view>
......@@ -151,6 +181,12 @@ export default {
},
status() {
return order_mixins.data.status || {}
},
goodsOrderApplyStatus() {
return order_mixins.data.goodsOrderApplyStatus || {}
},
orderType() {
return order_mixins.data.orderType || {}
}
},
data() {
......@@ -443,7 +479,26 @@ export default {
border-radius: toRpx(4);
border: toRpx(1) solid transparent;
}
.errorBox {
background: #f7f8fa;
border-radius: toRpx(16);
padding: toRpx(16) toRpx(24);
color: #999ea8;
font-size: toRpx(24);
margin-bottom: toRpx(20);
}
.errorTips {
color: #eb4e4e;
font-size: toRpx(24);
font-weight: 400;
margin-left: toRpx(16);
}
.priceName {
color: #5a5e66;
font-size: toRpx(24);
font-weight: 400;
margin-left: toRpx(30);
}
.info-box {
display: flex;
flex-wrap: wrap;
......@@ -456,7 +511,7 @@ export default {
&:nth-child(2n) {
padding-right: 0;
padding-left: toRpx(20);
// padding-left: toRpx(20);
}
}
}
......
......@@ -102,15 +102,20 @@ module.exports = {
}
],
status: {
14: {
text: '审批中',
color: '#FF9D0A',
background: '#FFF5E6'
},
12: {
text: '已退款',
color: '#F7A431',
background: '#FFF5E6'
},
11: {
text: '已失效',
color: '#8F959E',
background: ' #F3F4F5'
text: '错误订单',
color: '#F59619',
background: ' #FFF6EB'
},
10: {
text: '已关闭',
......@@ -178,12 +183,25 @@ module.exports = {
value: [10]
},
{
name: '已失效',
name: '错误订单',
value: [11]
}
],
grassInfo: {},
orderCode: '',
userInfo: {}
userInfo: {},
goodsOrderApplyStatus: {
1: '审批中', //区域运营待审核
2: '审批中', //线上运营待审核
3: '审核通过',
4: '审批驳回'
},
orderType: {
1: '正常订单',
2: '打折策略',
3: '买赠策略',
4: '冲量活动',
5: '组合付款'
}
}
}
......@@ -31,7 +31,7 @@
<view class="meal-box" v-for="(item, index) in orderInfo.packageGoodsList">
<view class="meal-hd flex justify-between align-center">
<view>{{ item.packageAlias || item.packageName }}</view>
<view class="price">¥{{ item.totalPrice }}</view>
<view class="price">¥{{ item.finalPrice }}</view>
</view>
<view class="meal-bd">
<view class="meal-bd-box" v-for="g in item.packageGoodsOrderList">
......@@ -286,8 +286,34 @@ export default {
let warrantyCardList = []
for (var i = 0; i < data?.subOrderList?.length; i++) {
let e = data?.subOrderList[i]
total_price += e.totalPrice
e.price = Number(utils.decimal(Number(e.totalPrice / e.number), 2)).toFixed(2)
total_price += e.finalPrice
// 根据订单类型决定使用哪个价格:
// - 正常订单(1)和冲量活动(4):使用 totalPrice(原价)
// - 打折策略(2)、买赠策略(3)、组合付款(5):使用 finalPrice(优惠后价格)
const orderType = e.djOrderType || data.djOrderType
if (orderType === 1 || orderType === 4) {
// 正常订单或冲量活动,使用原价
if (e.totalPrice !== undefined && e.totalPrice !== null) {
e.price = Number(
utils.decimal(Number(e.totalPrice) / Number(e.number || 1), 2)
).toFixed(2)
} else if (e.finalPrice !== undefined && e.finalPrice !== null) {
e.price = Number(
utils.decimal(Number(e.finalPrice) / Number(e.number || 1), 2)
).toFixed(2)
}
} else {
// 优惠类型订单,使用优惠后价格
if (e.finalPrice !== undefined && e.finalPrice !== null) {
e.price = Number(
utils.decimal(Number(e.finalPrice) / Number(e.number || 1), 2)
).toFixed(2)
} else if (e.totalPrice !== undefined && e.totalPrice !== null) {
e.price = Number(
utils.decimal(Number(e.totalPrice) / Number(e.number || 1), 2)
).toFixed(2)
}
}
e.positionStr = this.positionTypeList.filter(v => v.positionValue == e.upgradeGoodsPosition)[0]?.positionName || ''
if (e.upgradeWarrantyPeriod || e.upgradeWarrantyPeriod > 0) {
warrantyCardList.push({
......@@ -297,20 +323,54 @@ export default {
}
}
data.packageGoodsList?.forEach(item => {
// 获取订单类型(优先使用套餐内商品的订单类型,否则使用订单级别的)
const orderType = item.packageGoodsOrderList?.[0]?.djOrderType || data.djOrderType
item.packageGoodsOrderList.forEach(g => {
g.price = g.totalPrice ? Number(g.totalPrice) / Number(g.number) : g.upgradePrice
// 根据订单类型决定使用哪个价格
if (orderType === 1 || orderType === 4) {
// 正常订单或冲量活动,使用原价
if (g.totalPrice !== undefined && g.totalPrice !== null) {
g.price = Number(g.totalPrice) / Number(g.number || 1)
} else if (g.finalPrice !== undefined && g.finalPrice !== null) {
g.price = Number(g.finalPrice) / Number(g.number || 1)
} else {
g.price = g.upgradePrice || 0
}
} else {
// 优惠类型订单,使用优惠后价格
if (g.finalPrice !== undefined && g.finalPrice !== null) {
g.price = Number(g.finalPrice) / Number(g.number || 1)
} else if (g.totalPrice !== undefined && g.totalPrice !== null) {
g.price = Number(g.totalPrice) / Number(g.number || 1)
} else {
g.price = g.upgradePrice || 0
}
}
})
item.goodsList = item.packageGoodsOrderList
// 套餐价格根据订单类型计算
item.price = item.goodsList.reduce((prev, cur) => {
return prev + Number(cur.totalPrice) / Number(cur.number)
// 根据订单类型决定使用哪个价格
const unitPrice = (orderType === 1 || orderType === 4)
? (cur.totalPrice !== undefined && cur.totalPrice !== null
? Number(cur.totalPrice) / Number(cur.number || 1)
: (cur.finalPrice !== undefined && cur.finalPrice !== null
? Number(cur.finalPrice) / Number(cur.number || 1)
: cur.price || 0))
: (cur.finalPrice !== undefined && cur.finalPrice !== null
? Number(cur.finalPrice) / Number(cur.number || 1)
: (cur.totalPrice !== undefined && cur.totalPrice !== null
? Number(cur.totalPrice) / Number(cur.number || 1)
: cur.price || 0))
return prev + unitPrice
}, 0)
item.count = item.goodsList.length ? item.goodsList[0].number : 1
let total = item.price * item.count
item.totalPrice = utils.decimal(total, 2)
item.finalPrice = utils.decimal(total, 2)
item.packageGoodsOrderList.forEach(g => {
g.positionStr = this.positionTypeList.filter(v => v.positionValue == g.upgradeGoodsPosition)[0]?.positionName || ''
})
total_price += item.totalPrice
total_price += item.finalPrice
})
data = {
......@@ -524,8 +584,16 @@ export default {
if (data) {
console.log(`类型为:${selectPayType}`)
console.log(this.orderInfo)
console.log(data,'data')
if (selectPayType == 3 || selectPayType == 1) {
this.orderInfo.payOrder.outTradeNo = data.outTradeNo
// 确保 orderInfo 和 payOrder 对象存在,避免空指针错误
if (!this.orderInfo) {
this.orderInfo = {}
}
if (!this.orderInfo.payOrder) {
this.$set(this.orderInfo, 'payOrder', {})
}
this.$set(this.orderInfo.payOrder, 'outTradeNo', data.outTradeNo)
let size = 0
try {
const info = uni.getSystemInfoSync()
......
This diff could not be displayed because it is too large.
......@@ -416,15 +416,15 @@ export default {
e.packageGoodsList?.forEach(item => {
item.packageGoodsOrderList.forEach(g => {
g.price = g.totalPrice ? Number(g.totalPrice) / Number(g.number) : g.upgradePrice
g.price = g.finalPrice ? Number(g.finalPrice) / Number(g.number) : g.upgradePrice
})
item.goodsList = item.packageGoodsOrderList
item.price = item.goodsList.reduce((prev, cur) => {
return prev + Number(cur.totalPrice) / Number(cur.number)
return prev + Number(cur.finalPrice) / Number(cur.number)
}, 0)
item.count = item.goodsList.length ? item.goodsList[0].number : 1
let total = item.price * item.count
item.totalPrice = utils.decimal(total, 2)
item.finalPrice = utils.decimal(total, 2)
})
if (e.packageGoodsList && e.packageGoodsList.length) {
e.subOrderList = e.subOrderList.concat(e.packageGoodsList)
......@@ -433,11 +433,17 @@ export default {
// e.subOrderList = e.subOrderList.filter(item => item.id)
// 处理显示订单右上角文字
let text = this.status[e.status].text
let color = this.status[e.status].color
let background = this.status[e.status].background
// 安全检查:如果状态不存在,使用默认值
const statusConfig = this.status[e.status] || {
text: '未知状态',
color: '#8F959E',
background: '#F3F4F5'
}
let text = statusConfig.text
let color = statusConfig.color
let background = statusConfig.background
// 不是订单失效状态优先显示已施工
if (![9, 11, 12].includes(e.status) && e.constructionFlag == 'Y') {
if (![9, 11, 12, 14].includes(e.status) && e.constructionFlag == 'Y') {
text = '已施工'
color = '#347BFF'
background = '#F3F7FC'
......
......@@ -127,6 +127,13 @@ const FORM_LIST = [
required: true
},
{
label: '订单类型',
value: 'djOrderType',
type: 'select',
key: 'name',
required: true
},
{
label: '请选择产品',
onlyLabel: true,
required: true,
......@@ -611,6 +618,11 @@ const popupTypeEnum = {
13: {
key: 'todayShow',
list: ''
},
28: {
// 订单类型弹窗(OrderTypePopup)
key: 'djOrderType',
list: ''
}
}
......
......@@ -22,11 +22,8 @@
src="../../../assets/images/common/tool_banner.png"
mode="scaleToFill"
/>
<template v-if="toolComponentName !== 'DailyReport'">
<Entrance @entranceClick="entranceClick"></Entrance>
</template>
<template v-else>
<uni-calendar
<template v-if="toolComponentName === 'DailyReport'">
<uni-calendar
ref="calendar"
:clearDate="false"
:endDate="endDate"
......@@ -38,6 +35,12 @@
:date="currentDate"
/>
</template>
<template v-else-if="toolComponentName === 'WageAppeal'">
<MonthCalendar @confirm="confirmMonth"></MonthCalendar>
</template>
<template v-else>
<Entrance @entranceClick="entranceClick" :type="1"></Entrance>
</template>
</view>
</view>
<view class="detail-right">
......@@ -47,7 +50,9 @@
:transmission-of-data="transmissionOfData"
:currentDate="currentDate"
:currentMonth="currentMonth"
:lastMonth="lastMonth"
@setCalendarSelected="selectedDays = $event"
:enterType="enterType"
/>
</view>
</view>
......@@ -57,10 +62,34 @@
text="当前页面暂未保存,是否确认退出"
type="warning"
></NoticePopup>
<!-- 学习中心权限弹窗 -->
<!-- 学习中心权限弹窗 -->
<StudyPopup :show.sync="showStudyPermissionPopup" title="" :width="848" :height="870" :topImage="require('@/assets/images/common/warning-notice.png')" :topImageWidth="848" :topImageHeight="248" style="overflow: hidden">
<StudyCenterPermissionPopup :lockReason="lockReason" @confirm="handleStudyPermissionConfirm" />
</StudyPopup>
<!-- 异常订单锁单弹窗,样式与车险工具页保持一致 -->
<ErrorOrderPopup
:show.sync="showErrorOrderPopup"
title=""
:width="848"
:height="870"
:topImage="require('@/assets/images/common/warning-notice.png')"
:topImageWidth="848"
:topImageHeight="248"
style="overflow: hidden"
>
<view>
<view class="error-order-title">异常订单提醒</view>
<view class="error-order-content">存在{{ abnormalOrderCount }} 条异常订单未处理,请尽快处理!</view>
</view>
<template #footer>
<view class="flex justify-between error-order-footer">
<view class="footer-btn sure flex-1" @click="showErrorOrderPopup = false">
好的
</view>
</view>
</template>
</ErrorOrderPopup>
</view>
</template>
......@@ -78,6 +107,9 @@ import dayjs from 'dayjs'
import { interceptionMixin } from '@/mixin/index'
import StudyPopup from '@/components/StudyPopup.vue'
import StudyCenterPermissionPopup from '@/components/StudyCenterPermissionPopup.vue'
import WageAppeal from '../../common/wageAppeal/index.vue'
import MonthCalendar from '../../common/components/MonthCalendar.vue'
import ErrorOrderPopup from '@/components/ErrorOrderPopup.vue'
export default {
mixins: [interceptionMixin],
......@@ -92,7 +124,10 @@ export default {
UploadProofOfPayment,
OrderDetail,
StudyPopup,
StudyCenterPermissionPopup
StudyCenterPermissionPopup,
WageAppeal,
MonthCalendar,
ErrorOrderPopup
},
data () {
return {
......@@ -103,16 +138,37 @@ export default {
currentMonth: dayjs().format('YYYY-MM'),
selectedDays: [],
lockReason: '',
showStudyPermissionPopup: false
showStudyPermissionPopup: false,
lastMonth: dayjs().subtract(1, 'month').format('YYYY-MM'),
// 异常订单锁单弹窗
showErrorOrderPopup: false,
abnormalOrderCount: 0,
enterType: '',
}
},
onLoad (options) {
if (options.componentName) this.toolComponentName = options.componentName
if (options.currentDate) this.setCurrentDate(options.currentDate)
if (options.enterType) this.enterType = options.enterType
uni.$on('jumpToDailyReport', currentDate => {
this.toolComponentName = 'DailyReport'
if (currentDate) this.setCurrentDate(currentDate)
})
// 监听异常订单锁单事件(来自 CreateOrder.vue)
uni.$on('showErrorOrderPopup', payload => {
try {
const abnormalOrderNum = payload && typeof payload === 'object' ? payload.abnormalOrderNum : payload
if (abnormalOrderNum > 0) {
this.showErrorOrderPopup = true
this.abnormalOrderCount = abnormalOrderNum
}
} catch (e) {
console.error('showErrorOrderPopup 事件处理异常:', e)
}
})
},
onUnload () {
uni.$off('showErrorOrderPopup')
},
methods: {
setCurrentDate (currentDate) {
......@@ -194,11 +250,18 @@ export default {
}, 100)
}
})
}
},
// 确认选择的月份
confirmMonth(month) {
this.lastMonth = month
},
}
}
</script>
<style scoped lang="scss">
.nav-bar {
z-index: 1;
}
.detail-content {
display: flex;
height: calc(100vh - #{toRpx(212)});
......@@ -239,4 +302,48 @@ export default {
font-size: toRpx(34);
}
}
.error-order-title {
text-align: center;
color: #333333;
font-size: toRpx(40);
font-weight: 500;
}
.error-order-content {
text-align: center;
color: #666666;
font-size: toRpx(32);
font-weight: 400;
margin-top: toRpx(16);
}
.error-order-footer {
margin-top: toRpx(64);
margin-bottom: toRpx(48);
width: 100%;
.cancel{
height: toRpx(88);
border-radius: toRpx(64);
opacity: 1;
line-height: toRpx(88);
background: #f0f1f5;
width: toRpx(344);
text-align: center;
color: #1a1a1a;
font-size: toRpx(32);
font-weight: 400;
}
.sure{
height: toRpx(88);
border-radius: toRpx(64);
opacity: 1;
line-height: toRpx(88);
background: linear-gradient(0deg, #2c66f7 0%, #48a6ff 100%);
color: #fff;
font-size: toRpx(32);
font-weight: 500;
width: 100%;
text-align: center;
margin-left: toRpx(32);
margin-right: toRpx(32);
}
}
</style>
<template>
<view class="month-calendar">
<view class="calendar-header">
<view class="arrow-box" @click="changeYear(-1)">
<uni-icons :style="{ opacity: canGoPrev ? 1 : 0 }" type="left" size="16" color="#414348"></uni-icons>
</view>
<view class="year-text">{{ displayYear }}</view>
<view class="arrow-box" @click="changeYear(1)">
<uni-icons :style="{ opacity: canGoNext ? 1 : 0 }" type="right" size="16" color="#414348"></uni-icons>
</view>
</view>
<view class="month-grid">
<view
class="month-item"
v-for="m in 12"
:key="m"
:class="{
'active': isSelected(m),
'disabled': isDisabled(m)
}"
@click="onMonthClick(m)"
>
{{ m }}月
</view>
</view>
</view>
</template>
<script>
import dayjs from 'dayjs';
export default {
name: 'MonthCalendar',
props: {
// 默认选中的日期,格式 YYYY-MM
defaultDate: {
type: String,
default: ''
}
},
data() {
// 1. 先计算出上个月的时间对象
const lastMonthDate = dayjs().subtract(1, 'month');
// 2. 分别获取
const yearNum = lastMonthDate.year();
const monthNum = lastMonthDate.month() + 1;
const todayYear = dayjs().year();
const todayMonth = dayjs().month() + 1;
const lastYear = lastMonthDate.year();
return {
today: { year: todayYear, month: todayMonth },
displayYear: lastYear,
selected: { year: yearNum, month: monthNum }
}
},
computed: {
canGoNext() {
if (dayjs().month() === 0) return false
return this.displayYear < this.today.year
},
canGoPrev() {
return this.displayYear > this.today.year - 1
}
},
watch: {
defaultDate: {
handler(val) {
if (val) {
const d = dayjs(val)
if (!d.isValid()) return
const y = d.year()
const m = d.month() + 1
this.selected = { year: y, month: m }
this.displayYear = y
}
},
immediate: true
}
},
methods: {
changeYear(step) {
const targetYear = this.displayYear + step
// 不允许切换到未来年份
if (step > 0 && targetYear > this.today.year) return
// 不允许切换到早于去年的年份
if (step < 0 && targetYear < this.today.year - 1) return
this.displayYear = targetYear
},
isSelected(m) {
return this.selected.year === this.displayYear && this.selected.month === m
},
isDisabled(m) {
// 未来年份的所有月份都不可选(虽然已经限制了年份切换,但作为兜底)
if (this.displayYear > this.today.year) return true
// 当前年份,超过当前月份的不可选
if (this.displayYear === this.today.year && m > this.today.month - 1) return true
return false
},
onMonthClick(m) {
if (this.isDisabled(m)) return
this.selected = {
year: this.displayYear,
month: m
}
const date = dayjs().year(this.displayYear).month(m - 1).date(1)
this.$emit('confirm', date.format('YYYY-MM'))
}
}
}
</script>
<style lang="scss" scoped>
.month-calendar {
padding: 16rpx 0;
}
.calendar-header {
display: flex;
justify-content: center;
align-items: center;
margin-bottom: 24rpx;
.year-text {
font-size: 28rpx;
color: #37393D;
margin: 0 60rpx;
}
.arrow-box {
padding: 10rpx;
display: flex;
align-items: center;
justify-content: center;
}
}
.month-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
row-gap: 32rpx;
column-gap: 30rpx;
}
.month-item {
height: 88rpx;
display: flex;
justify-content: center;
align-items: center;
font-size: 32rpx;
color: #37393D;
border-radius: 12rpx;
&.active {
background-color: #4673FF;
color: #fff;
}
&.disabled {
color: #AAAFBD;
background-color: transparent;
}
}
</style>
<template>
<uni-popup ref="popup" type="right" :mask-click="maskClick" @change="change">
<view class="right-popup-container" :style="{ width: width }">
<!-- Header -->
<view class="popup-header">
<text class="popup-title">{{ title }}</text>
<uni-icons class="close-icon" type="closeempty" size="20" color="#999EA8" @click="close" />
</view>
<!-- Content -->
<scroll-view scroll-y class="popup-body">
<slot></slot>
</scroll-view>
<!-- Footer -->
<view class="popup-footer" v-if="$slots.footer || showFooter">
<slot name="footer">
<view class="footer-btns">
<button class="btn cancel" :class="{ 'disabled': cancelDisabled }" :disabled="cancelDisabled" @click="close">取消</button>
<button class="btn confirm" :class="{ 'disabled': confirmDisabled }" :disabled="confirmDisabled" @click="confirm">确定</button>
</view>
</slot>
</view>
</view>
</uni-popup>
</template>
<script>
export default {
name: 'RightPopup',
props: {
title: {
type: String,
default: '标题'
},
width: {
type: String,
default: '1400rpx'
},
maskClick: {
type: Boolean,
default: false
},
showFooter: {
type: Boolean,
default: false
},
confirmDisabled: {
type: Boolean,
default: false
},
cancelDisabled: {
type: Boolean,
default: false
}
},
methods: {
open() {
this.$refs.popup.open()
},
close() {
this.$refs.popup.close()
},
change(e) {
this.$emit('change', e)
},
confirm() {
this.$emit('confirm')
}
}
}
</script>
<style lang="scss" scoped>
.right-popup-container {
height: 100vh;
background-color: #fff;
display: flex;
flex-direction: column;
border-radius: 48rpx 0 0 48rpx;
}
.popup-header {
position: relative;
display: flex;
justify-content: space-between;
align-items: center;
padding: 30rpx;
height: 152rpx;
// border-bottom: 1rpx solid #eee;
background: url('@/assets/images/common/right-header.png') no-repeat center center;
background-size: 100% 100%;
border-radius: 48rpx 0 0 0;
.popup-title {
font-size: 40rpx;
font-weight: 500;
color: #292D33;
text-align: center;
width: 100%;
}
.close-icon {
position: absolute;
right: 64rpx;
top: 50%;
transform: translateY(-50%);
}
}
.popup-body {
flex: 1;
overflow-y: auto;
// padding: 16rpx 64rpx;
box-sizing: border-box;
}
.popup-footer {
height: 144rpx;
padding: 24rpx 40rpx;
// border-top: 1rpx solid #eee;
border-radius: 0 0 0 48rpx;
background-color: #fff;
padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: env(safe-area-inset-bottom);
.footer-btns {
display: flex;
justify-content: space-between;
gap: 20rpx;
.btn {
flex: 1;
font-size: 28rpx;
font-weight: 500;
height: 80rpx;
line-height: 80rpx;
border-radius: 40rpx;
margin: 0;
&.cancel {
background: #3b73ff1a;
color: #4673FF;
&::after { border: none; }
&.disabled {
background: #f5f5f5;
color: #cccccc;
}
}
&.confirm {
background: linear-gradient(0deg, #2c66f7 0%, #48a6ff 100%);
color: #fff;
&::after { border: none; }
&.disabled {
background: linear-gradient(0deg, rgba(44, 102, 247, 0.5) 0%, rgba(72, 166, 255, 0.5) 100%);
color: #ffffff;
}
}
}
}
}
</style>
const title = {
attendance: '申诉考勤',
record: '申诉平板'
}
const formItem = {
attendance: [
{
label: '本月实际出勤天数',
value: 'actualAttendanceDays',
unit: '天',
},
{
label: '申诉修改实际出勤天数',
value: 'applyActualAttendanceDays',
unit: '天',
maxlength: 5
}
],
record: [
{
label: '平板录音完成总数',
value: 'padRecordNum',
unit: '条'
},
{
label: '申诉修改平板录音总数',
value: 'applyPadRecordNum',
unit: '条',
maxlength: 3
}
]
}
const BOUTIQUE_ORDER_COUNT_FIELDS = [
{
label: '窗膜',
prop: 'windowFilmDealCount'
},
{
label: '车衣',
prop: 'carCoverDealCount'
},
{
label: '精品',
prop: 'boutiqueAccessoryDealCount'
}
]
// 权益订单数统计字段
const EQUITY_ORDER_COUNT_FIELDS = [
{
label: '整车延保',
prop: 'wholeCarWarrantyDealCount'
},
{
label: '轮胎险',
prop: 'tireInsuranceAchieveCount'
},
{
label: '安心包max',
prop: 'safePackageMaxAchieveCount'
},
{
label: '安心包',
prop: 'safePackageAchieveCount'
},
{
label: '电池延保',
prop: 'batteryWarrantyDealCount'
},
{
label: '北汽无忧成交',
prop: 'baicWorryFreeDealCount'
},
{
label: '广爱无忧成交',
prop: 'guangAiWorryFreeDealCount'
},
{
label: '广联权益',
prop: 'guangLianBenefitDealCount'
}
]
export {
title,
formItem,
BOUTIQUE_ORDER_COUNT_FIELDS,
EQUITY_ORDER_COUNT_FIELDS
}
\ No newline at end of file
......@@ -235,6 +235,7 @@ export default {
})
const carBrandList = uni.$storage.get('carBrandList')
const carChildsBrandIds = carBrandList.map(i => i.id)
const { sceneType } = uni.$storage.get('userInfo')
let params = {
merchantId: shopMerchantId,
pageNum,
......@@ -242,6 +243,7 @@ export default {
carModel: carModel || '',
orderStatus: 3,
merchantOrder,
sceneType: sceneType,
historyOrderGoodsTypes: this.historyOrderGoodsTypes
}
if (!params.merchantOrder) {
......
......@@ -213,8 +213,21 @@ module.exports = {
5: { text: '已完成', color: '#2CCA74', background: '#EAF9F1' },
'-1': { text: '战败', color: '#F24724', background: '#FDECE9' },
9: { text: '已撤销', color: '#999999', background: 'rgba(153, 153, 153, 0.1)' },
11: { text: '已失效', color: '#F7A431', background: '#FFF5E6' },
6: { text: '已退款', color: '#F7A431', background: '#FFF5E6' }
11: { text: '错误订单', color: '#F7A431', background: '#FFF5E6' },
6: { text: '已退款', color: '#F7A431', background: '#FFF5E6' },
14: { text: '审批中', color: '#FF9D0A', background: '#FFF5E6' }
},
goodsOrderApplyStatus: {
0: '审批中', //区域运营待审核
1: '审批通过', //线上运营待审核
2: '审批驳回',
},
orderType: {
1: '正常订单',
2: '打折策略',
3: '买赠策略',
4: '冲量活动',
5: '组合付款'
}
}
}
......@@ -229,7 +229,7 @@
src="../../../../assets/images/common/report-no-data.webp"
class="icon"
/>
已超过 7 个自然日,暂不支持补填操作
暂不支持补填操作
</view>
</template>
</template>
......@@ -291,7 +291,8 @@ export default {
},
props: {
currentDate: String,
currentMonth: String
currentMonth: String,
enterType: String
},
name: 'DailyReport',
data () {
......@@ -377,6 +378,7 @@ export default {
]),
weeklyList: [],
isEditReport: false,
editableDay: null
}
},
computed: {
......@@ -503,8 +505,9 @@ export default {
this.isEditReport = false
},
methods: {
initData () {
const { merchantId, merchantName, name, uuid, shopMerchantId, shopMerchantName } = this.userInfo
async initData () {
let inT1T5 = await uni.$api.commonApi.checkTodayInT1T5(),
{ merchantId, merchantName, name, uuid, shopMerchantId, shopMerchantName } = this.userInfo
this.orderObj = {
yqMerchantId: merchantId,
yqMerchantName: merchantName,
......@@ -513,6 +516,7 @@ export default {
merchantId: shopMerchantId,
merchantName: shopMerchantName
}
if (inT1T5) this.editableDay = dayjs().subtract(1, 'M').startOf('M')
this.getDailyReportCarBrand()
},
async getDailyReportCarBrand () {
......@@ -598,7 +602,9 @@ export default {
carBandList,
hwOhterObjArray,
orderObj,
isHmStore } = this,
isHmStore,
editableDay
} = this,
{ shopMerchantId, merchantId, uuid } = userInfo
uni.showLoading({
mask: true
......@@ -654,14 +660,15 @@ export default {
return item
})
}
let diffDay = dayjs().diff(dayjs(currentDate), 'day')
let diffDay = dayjs().diff(dayjs(currentDate), 'day'),
disabledReport = false
if (editableDay && editableDay.diff(dayjs(currentDate), 'day') > 0) disabledReport = true
this.hwOhterObjArray = hwOhterObjArray
this.carBandList = carBandList
this.orderObj = {
...orderObj,
reportDate: currentDate,
isDateWithin7Days: diffDay < 7,
isDateWithin60Days: diffDay < 60,
isDateWithin7Days:editableDay ? !disabledReport : diffDay < 7,
remark,
lastStaffName: data.lastStaffName,
lastStaffUuid: data.lastStaffUuid,
......@@ -808,6 +815,8 @@ export default {
const data = await uni.$api.boutiqueApi.saveStaffDailyReport(orderObj)
uni.hideLoading()
if (data) {
let _text = '返回首页'
if (this.enterType == 'wageAppeal') _text = '返回上一页'
this.isEditReport = false
this.noticeObj = {
title: '提交成功',
......@@ -815,10 +824,11 @@ export default {
type: 'success',
buttons: [
{
text: '返回首页',
text: _text,
type: 'primary',
callback: _ => {
uni.navigateBack()
if (this.enterType == 'wageAppeal') uni.$emit('backToWageAppeal')
}
}
]
......
......@@ -13,14 +13,42 @@
</view>
</view>
<!-- 待上传合同协议且是已支付的订单 -->
<view class="status text-center" :style="{ color: status[0].color, 'background-color': status[0].background }" v-if="orderCardDetail.zyPayStatus == 1 && (orderCardDetail.orderStatus == 3 || orderCardDetail.orderStatus == 4 || orderCardDetail.orderStatus == 7)">待上传</view>
<view v-else class="status text-center" :style="{ color: status[orderCardDetail.orderStatus].color, 'background-color': status[orderCardDetail.orderStatus].background }">
{{ status[orderCardDetail.orderStatus].text }}
<view class="status text-center" :style="{ color: (status[0] && status[0].color) || '#FF9D0A', 'background-color': (status[0] && status[0].background) || '#FFF5E6' }" v-if="orderCardDetail.zyPayStatus == 1 && (orderCardDetail.orderStatus == 3 || orderCardDetail.orderStatus == 4 || orderCardDetail.orderStatus == 7)">待上传</view>
<view v-else class="status text-center" :style="{ color: currentStatusConfig.color, 'background-color': currentStatusConfig.background }">
{{ currentStatusConfig.text }}
</view>
</view>
<view class="flex errorBox" v-if="orderCardDetail.oldOrderCode">
<view class="order-list align-center flex-1">
<text>原错误订单编号</text>
<text class="priceName">{{ orderCardDetail.oldOrderCode }}</text>
</view>
<view class="order-list align-center flex-1">
<text>原错误订单总价</text>
<text class="priceName">¥{{ orderCardDetail.oldOrderFinalPrice / 100 }}</text>
</view>
</view>
<view class="order-card-bottom-box">
<view class="info-box">
<view class="order-list align-center" v-for="(item, sindex) in orderCardDetail.deliveryId ? pointsMultiObj : orderObj" :key="sindex">
<view class="order-list align-center">
<view class="order flex align-center">
<view class="order-label">订单类型</view>
<view class="order-value flex">
{{ orderTypeText[orderCardDetail.orderType] }}
<view class="flex align-center errorTips" v-if="orderCardDetail.abnormalFlag == true">
<view class="sprite-icon icon-errortips"></view>
异常
</view>
</view>
</view>
</view>
<view class="order-list align-center">
<view class="order flex align-center">
<view class="order-label">审批状态</view>
<view class="order-value flex">{{ goodsOrderApplyStatus[orderCardDetail.approveStatus] || '-' }}</view>
</view>
</view>
<view class="order-list align-center" v-for="(item, sindex) in orderCardDetail.deliveryId ? pointsMultiObj : orderObj" :key="sindex" v-if="(item.key !== 'remark' || orderCardDetail.orderStatus === '-1') && (item.key !== 'payTime' || orderCardDetail.orderStatus === '3' || orderCardDetail.orderStatus === '5')">
<view v-if="item.key == 'remark' || item.key == 'payTime' || item.key == 'createdTime'">
<view class="order flex align-center" v-if="item.key == 'remark' && orderCardDetail.orderStatus == '-1'">
<view class="order-label">{{ item.label }}</view>
......@@ -34,7 +62,6 @@
<view>{{ orderCardDetail[item.key] || '' }}</view>
</view>
</view>
<!-- &&( item.orderStatus == '3'||item.orderStatus =='5') -->
<view class="order flex align-center" v-if="item.key == 'createdTime'">
<view class="order-label">{{ item.label }}</view>
<view class="order-value">
......@@ -71,15 +98,15 @@
</view>
</view>
</view>
<view class="order flex align-center" v-if="orderCardDetail.orderStatus != '-1' && orderCardDetail.quotedPriceUpdate">
<view class="order flex align-center" v-if="orderCardDetail.orderStatus != '-1' && orderCardDetail.finalPrice">
<view class="order-label">支付金额</view>
<view class="price flex">
<text class="unit">¥</text>
{{ orderCardDetail.quotedPriceUpdate || '' }}
{{ orderCardDetail.finalPrice || '' }}
</view>
<view class="refund-box" v-if="orderCardDetail.refundAmount">
部分退款
<text class="unit">¥</text>
<text class="refund-box-unit">¥</text>
{{ orderCardDetail.refundAmount }}
</view>
<!-- 已录单未签名 -->
......@@ -200,6 +227,26 @@ export default {
status() {
return order_mixins.data.orderStatusObj || {}
},
goodsOrderApplyStatus() {
return order_mixins.data.goodsOrderApplyStatus || {}
},
orderTypeText() {
return order_mixins.data.orderType || {}
},
// 安全获取当前订单状态配置,如果状态不存在则返回默认配置
currentStatusConfig() {
const statusKey = this.orderCardDetail.orderStatus
const statusObj = this.status[statusKey]
if (statusObj && statusObj.color && statusObj.background) {
return statusObj
}
// 返回默认状态配置
return {
text: '未知状态',
color: '#8F959E',
background: '#F3F4F5'
}
},
buttonConfig() {
const config = {
showMoreBtn: false,
......@@ -211,6 +258,11 @@ export default {
const order = this.orderCardDetail
const localUser = this.localUserInfo
// 如果是审批中状态(approveStatus === 0),不显示任何操作按钮
if (order.approveStatus === 0 || order.approveStatus === '0') {
return config
}
// 超管或商户类型1不可操作
if (localUser?.isSuper || localUser?.userType !== 2) {
config.showMoreBtn = order.showInvoiceEntrance || ((order.orderStatus == 3 || order.orderStatus == 5 || (order.orderStatus == 6 && order.refundAmount)) && this.isOrder)
......@@ -990,7 +1042,20 @@ export default {
border-radius: toRpx(4);
border: toRpx(1) solid transparent;
}
.errorBox {
background: #f7f8fa;
border-radius: toRpx(16);
padding: toRpx(16) toRpx(24);
color: #999ea8;
font-size: toRpx(24);
margin-bottom: toRpx(20);
}
.priceName {
color: #5a5e66;
font-size: toRpx(24);
font-weight: 400;
margin-left: toRpx(30);
}
.info-box {
display: flex;
flex-wrap: wrap;
......@@ -1278,4 +1343,24 @@ export default {
.updateInfo.isHide {
display: none;
}
.errorTips {
color: #eb4e4e;
font-size: toRpx(24);
font-weight: 400;
margin-left: toRpx(16);
}
.refund-box {
margin-left: toRpx(16);
background: #fff2e0;
padding: toRpx(4) toRpx(8);
color: #f7a431;
font-size: toRpx(24);
font-weight: 500;
font-family: 'numberBold';
border-radius: toRpx(4);
}
.refund-box .refund-box-unit {
font-size: toRpx(24);
}
</style>
......@@ -327,7 +327,7 @@ export default {
if (!arr) {
return arr
}
var attrList = ['equityPrice', 'quotedPrice', 'quotedPriceUpdate', 'refundAmount']
var attrList = ['equityPrice', 'quotedPrice', 'quotedPriceUpdate', 'refundAmount','finalPrice']
arr.forEach(item => {
attrList.forEach(k => {
if (item[k]) {
......
......@@ -102,7 +102,7 @@ export default {
if (payId) {
const data = await uni.$api.equityApi.getOrderDetail({ orderCode: payId })
console.log(data, '----')
this.orderInfo.total_price = data.totalPrice
this.orderInfo.total_price = data.finalPrice
let { payOrder, status } = data
if (payOrder?.payStatus == 2 || status == 4) {
this.closePopup()
......
......@@ -157,6 +157,10 @@ export default {
}
// 更新值
this.$set(this.list[index].packageGoods.goodsList[ind], 'sellPrice', value)
// 价格变动时,清空该商品的折扣/买赠/抵扣配置,并按原价重算 finalPrice
this.resetStrategyWhenPriceChange(this.list[index].packageGoods.goodsList[ind], this.list[index])
this.$emit('changeTotalPrice')
},
// 删除商品
......@@ -173,6 +177,31 @@ export default {
})
item.packageGoods.upgradePrice = total
return total.toFixed(2)
},
// 商品价格变动时,清空当前套餐内单个商品的折扣/抵扣配置,并重算 finalPrice
resetStrategyWhenPriceChange(goods, item) {
if (!goods) return
const strategyConfig = goods.strategyConfig || {}
// 重置策略为无优惠,买赠强制为非赠品
this.$set(goods, 'strategyConfig', {
mode: 'none',
discountRatio: '',
discountAmount: '',
isGift: '0',
deductAmount: ''
})
this.$set(goods, 'discountType', null)
this.$set(goods, 'discountValue', null)
this.$set(goods, 'discountAmount', null)
// 按当前单价和套餐数量,重新计算无优惠时的 finalPrice
const unitPrice = parseFloat(goods.sellPrice || 0)
const number = parseInt(item?.packageGoods?.number || 1)
const totalFinalPrice = Math.round(unitPrice * number * 100) / 100
this.$set(goods, 'finalPricePerUnit', unitPrice)
this.$set(goods, 'finalPrice', totalFinalPrice)
}
}
}
......
......@@ -135,6 +135,13 @@ const FORM_LIST = [
],
[
{
label: '订单类型',
value: 'djOrderType',
type: 'select',
key: 'name',
required: true
},
{
label: '购买商品',
value: 'skuGoods',
type: 'select',
......@@ -395,6 +402,11 @@ const popupTypeEnum = {
key: 'defeatEmployeeName',
targetIdKey: 'referrerId',
targetNameKey: 'referrer'
},
28: {
// 订单类型弹窗(OrderTypePopup)
key: 'djOrderType',
list: ''
}
}
const titleList = [null, { addHtml: 'customer' }, { name: '车辆信息' }, { name: '增值车损险' }, { name: '其他信息' }]
......@@ -647,6 +659,11 @@ const EQUITY_POPUP_ENUM = {
},
25: {
key: 'carBrand'
},
28: {
// 订单类型弹窗(OrderTypePopup)
key: 'djOrderType',
list: ''
}
}
......@@ -731,7 +748,7 @@ const EQUITY_FORM_RULE = {
{ required: true, message: '联系电话不能为空' },
{
validator: (rule, value) => {
const phoneRex = /^[1]([3-9])[0-9]{9}$/;
const phoneRex = /^[1]([3-9])[0-9]{9}$/
return !phoneRex.test(value) ? { message: '请输入正确的手机号' } : null
}
}
......
......@@ -11,16 +11,19 @@
<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 v-if="toolComponentName === 'DailyReport'">
<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>
<template v-else-if="toolComponentName === 'WageAppeal'">
<MonthCalendar @confirm="confirmMonth"></MonthCalendar>
</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" />
<Entrance @entranceClick="entranceClick" :type="1"></Entrance>
</template>
</view>
</view>
<view class="detail-right">
<component :is="toolComponentName" @jump="jump" :transmission-of-data="transmissionOfData" :currentDate="currentDate" :currentMonth="currentMonth" @setCalendarSelected="selectedDays = $event" />
<component :is="toolComponentName" @jump="jump" :transmission-of-data="transmissionOfData" :currentDate="currentDate" :currentMonth="currentMonth" :lastMonth="lastMonth" @setCalendarSelected="selectedDays = $event" :enterType="enterType" />
</view>
</view>
<NoticePopup ref="notice" title="重要提示" text="当前页面暂未保存,是否确认退出" type="warning"></NoticePopup>
......@@ -29,6 +32,30 @@
<StudyPopup :show.sync="showStudyPermissionPopup" title="" :width="848" :height="870" :topImage="require('@/assets/images/common/warning-notice.png')" :topImageWidth="848" :topImageHeight="248" style="overflow: hidden">
<StudyCenterPermissionPopup :lockReason="lockReason" @confirm="handleStudyPermissionConfirm" />
</StudyPopup>
<!-- 异常订单锁单弹窗(与 HomeFrame 逻辑保持一致) -->
<ErrorOrderPopup
:show.sync="showErrorOrderPopup"
title=""
:width="848"
:height="870"
:topImage="require('@/assets/images/common/warning-notice.png')"
:topImageWidth="848"
:topImageHeight="248"
style="overflow: hidden"
>
<view>
<view class="error-order-title">异常订单提醒</view>
<view class="error-order-content">存在{{ abnormalOrderCount }} 条异常订单未处理,请尽快处理!</view>
</view>
<template #footer>
<view class="flex justify-between error-order-footer">
<view class="footer-btn sure flex-1" @click="showErrorOrderPopup = false">
好的
</view>
</view>
</template>
</ErrorOrderPopup>
</view>
</template>
......@@ -47,11 +74,12 @@ import UpdateOrderInfo from './components/UpdateOrderInfo.vue'
import StudyPopup from '@/components/StudyPopup.vue'
import StudyCenterPermissionPopup from '@/components/StudyCenterPermissionPopup.vue'
import EquityManagement from './components/EquityManagement.vue'
import CreateEquity from './components/CreateEquity.vue'
import SignName from './components/SignName.vue'
import PreviewList from './components/PreviewList.vue'
import WageAppeal from '../../common/wageAppeal/index.vue'
import MonthCalendar from '../../common/components/MonthCalendar.vue'
import ErrorOrderPopup from '@/components/ErrorOrderPopup.vue'
export default {
mixins: [interceptionMixin],
components: {
......@@ -69,7 +97,10 @@ export default {
EquityManagement,
CreateEquity,
SignName,
PreviewList
PreviewList,
WageAppeal,
MonthCalendar,
ErrorOrderPopup
},
data() {
return {
......@@ -80,16 +111,37 @@ export default {
currentMonth: dayjs().format('YYYY-MM'),
selectedDays: [],
lockReason: '',
showStudyPermissionPopup: false
showStudyPermissionPopup: false,
lastMonth: dayjs().subtract(1, 'month').format('YYYY-MM'),
// 异常订单锁单弹窗
showErrorOrderPopup: false,
abnormalOrderCount: 0,
enterType: ''
}
},
onLoad(options) {
if (options.componentName) this.toolComponentName = options.componentName
if (options.currentDate) this.setCurrentDate(options.currentDate)
if (options.enterType) this.enterType = options.enterType
uni.$on('jumpToDailyReport', currentDate => {
this.toolComponentName = 'DailyReport'
if (currentDate) this.setCurrentDate(currentDate)
})
// 监听异常订单锁单事件(来自 CreateOrder.vue)
uni.$on('showErrorOrderPopup', payload => {
try {
const abnormalOrderNum = payload && typeof payload === 'object' ? payload.abnormalOrderNum : payload
if (abnormalOrderNum > 0) {
this.showErrorOrderPopup = true
this.abnormalOrderCount = abnormalOrderNum
}
} catch (e) {
console.error('showErrorOrderPopup 事件处理异常:', e)
}
})
},
onUnload() {
uni.$off('showErrorOrderPopup')
},
methods: {
setCurrentDate(currentDate) {
......@@ -108,6 +160,13 @@ export default {
this.lockReason = res.lockReason
return
}
// 提示锁单
// const { lockOrderFlag, abnormalOrderNum } = await this.getAbnormalOrderLock()
// if (lockOrderFlag == "Y" && abnormalOrderNum > 0) {
// this.showErrorOrderPopup = true
// this.abnormalOrderCount = abnormalOrderNum
// return
// }
// 保存当前选择的组件信息,但不立即切换
const selectedItem = item
if (this.toolComponentName === selectedItem.name && (!this.transmissionOfData || this.transmissionOfData.type !== 'supplementOrder')) return
......@@ -169,11 +228,18 @@ export default {
}, 100)
}
})
}
},
// 确认选择的月份
confirmMonth(month) {
this.lastMonth = month
},
}
}
</script>
<style scoped lang="scss">
.nav-bar {
z-index: 1;
}
.detail-content {
display: flex;
height: calc(100vh - #{toRpx(212)});
......@@ -212,5 +278,50 @@ export default {
justify-content: space-between;
font-size: toRpx(34);
}
}
.error-order-title {
text-align: center;
color: #333333;
font-size: toRpx(40);
font-weight: 500;
}
.error-order-content {
text-align: center;
color: #666666;
font-size: toRpx(32);
font-weight: 400;
margin-top: toRpx(16);
}
.error-order-footer {
margin-top: toRpx(64);
margin-bottom: toRpx(48);
width: 100%;
.cancel{
height: toRpx(88);
border-radius: toRpx(64);
opacity: 1;
line-height: toRpx(88);
background: #f0f1f5;
width: toRpx(344);
text-align: center;
color: #1a1a1a;
font-size: toRpx(32);
font-weight: 400;
}
.sure{
height: toRpx(88);
border-radius: toRpx(64);
opacity: 1;
line-height: toRpx(88);
background: linear-gradient(0deg, #2c66f7 0%, #48a6ff 100%);
color: #fff;
font-size: toRpx(32);
font-weight: 500;
width: 100%;
text-align: center;
margin-left: toRpx(32);
margin-right: toRpx(32);
}
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!