Commit 75b3806b by 前端

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

上线合并

See merge request !65
2 parents 613113a8 85fb8039
Showing 59 changed files with 2100 additions and 316 deletions
...@@ -601,5 +601,72 @@ module.exports = { ...@@ -601,5 +601,72 @@ module.exports = {
projectName: 'pad', projectName: 'pad',
...data ...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 @@ ...@@ -246,6 +246,9 @@
.pt-12 { .pt-12 {
padding-top: toRpx(12); padding-top: toRpx(12);
} }
.pb-24 {
padding-bottom: toRpx(24);
}
.flex-1 { .flex-1 {
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 @@ ...@@ -2,7 +2,7 @@
<view class="entrance-box"> <view class="entrance-box">
<template v-if="entranceList.length"> <template v-if="entranceList.length">
<view class="entrance-container"> <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="entrance-item" v-for="(item, index) in entranceList" :key="index" @click="handleClick(item)">
<view :class="['sprite-icon', `icon-${item.icon}`]"></view> <view :class="['sprite-icon', `icon-${item.icon}`]"></view>
<view class="entrance-name">{{ item.label }}</view> <view class="entrance-name">{{ item.label }}</view>
...@@ -22,12 +22,28 @@ ...@@ -22,12 +22,28 @@
<script> <script>
export default { export default {
name: 'Entrance', name: 'Entrance',
props: {
// 默认一行展示5个,type传1展示4个
type: {
type: Number,
default: 0
}
},
data() { data() {
return {} return {
// 工资申诉入口是否允许显示
wageAppealAllowed: false,
// 工资申诉入口加载中,加载完成前不展示避免误显示
loadingEntrance: true
}
},
created() {
// 组件创建时请求工资申诉入口权限
this.fetchWageAppealEntrance()
}, },
computed: { computed: {
entranceList() { entranceList() {
let { sceneType } = uni.$storage.get('userInfo'), let { sceneType } = uni.$storage.get('userInfo') || {},
entranceList = [ entranceList = [
{ {
icon: 'daily-report', icon: 'daily-report',
...@@ -60,6 +76,12 @@ export default { ...@@ -60,6 +76,12 @@ export default {
sceneType: [0, 1] sceneType: [0, 1]
}, },
{ {
icon: 'wage-appeal',
label: '工资申诉',
name: 'WageAppeal',
sceneType: [0, 1]
},
{
icon: 'evaluation-management', icon: 'evaluation-management',
label: '评估单管理', label: '评估单管理',
name: 'EvaluationFormList', name: 'EvaluationFormList',
...@@ -80,10 +102,45 @@ export default { ...@@ -80,10 +102,45 @@ export default {
sceneType: [7] 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: { 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) { handleClick(item) {
// 这里可以根据实际需求进行跳转或功能处理 // 这里可以根据实际需求进行跳转或功能处理
this.$emit('entranceClick', item) this.$emit('entranceClick', item)
...@@ -101,10 +158,16 @@ export default { ...@@ -101,10 +158,16 @@ export default {
} }
.entrance-list { .entrance-list {
display: flex; width: 100%;
flex-wrap: wrap; display: grid;
gap: toRpx(68); row-gap: toRpx(30);
justify-content: flex-start; column-gap: toRpx(68);
&.entrance-list-0 {
grid-template-columns: repeat(5, 1fr);
}
&.entrance-list-1 {
grid-template-columns: repeat(4, 1fr);
}
} }
.entrance-item { .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 \ No newline at end of file
...@@ -33,15 +33,9 @@ export default { ...@@ -33,15 +33,9 @@ export default {
componentList:['Attendance','Income'], componentList:['Attendance','Income'],
tabName: 'Attendance', tabName: 'Attendance',
tabList:[ tabList:[
// {
// name:'我的积分',
// },
{ {
name:'我的考勤', name:'我的考勤',
}, },
{
name:'我的收入',
}
] ]
} }
}, },
...@@ -67,25 +61,25 @@ export default { ...@@ -67,25 +61,25 @@ export default {
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.tab-box { .tab-box {
margin-top: 68rpx; margin-top: toRpx(68);
width: 550rpx; width: toRpx(290);
height: 84rpx; height: toRpx(84);
line-height: 74rpx; line-height: toRpx(74);
background: rgba(101, 171, 250, 0.12); background: rgba(101, 171, 250, 0.12);
border-radius: 20rpx; border-radius: toRpx(20);
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
.tab-item { .tab-item {
font-size: 28rpx; font-size: toRpx(28);
color: #1a1a1a; color: #1a1a1a;
text-align: center; text-align: center;
width: 50%; width: 50%;
&.active { &.active {
width: 260rpx; width: toRpx(260);
height: 72rpx; height: toRpx(72);
background: #ffffff; background: #ffffff;
border-radius: 16rpx; border-radius: toRpx(16);
text-align: center; text-align: center;
font-weight: 600; font-weight: 600;
color: #4673ff; color: #4673ff;
......
<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 = { ...@@ -378,6 +378,18 @@ const componentConfig = {
searchValue: '', searchValue: '',
noData: false, noData: false,
defeat: true defeat: true
},
28: {
name: 'OrderTypePopup',
title: '订单类型',
hideSearch: true,
hideFooter: false,
// 绑定 CreateOrder 中的字段名
idKey: 'djOrderType',
cacheData: [],
loadComplete: false,
searchValue: '',
noData: false
} }
} }
export default { componentConfig } export default { componentConfig }
<template> <template>
<view class="order-popup"> <view class="order-popup">
<popup <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) || ''">
:position="position"
:animation="animation"
ref="popup"
@onConfirm="confirm"
@onCancel="cancel"
@onReset="reset"
:showReset="popupType === 15"
:hideFooter="componentObject[popupType].hideFooter"
:popupStyle="componentObject[popupType].popupStyle || ''"
>
<view class="popup-title flex"> <view class="popup-title flex">
{{ title }} {{ title }}
<view <view class="popup-close flex" @click="close">
class="popup-close flex" <uni-icons type="closeempty" size="16"></uni-icons>
@click="close"
>
<uni-icons
type="closeempty"
size="16"
></uni-icons>
</view> </view>
</view> </view>
<template v-if="!componentObject[popupType].hideSearch"> <template v-if="componentObject[popupType] && !componentObject[popupType].hideSearch">
<view class="popup-search"> <view class="popup-search">
<input <input class="input" type="text" :placeholder="(componentObject[popupType] && componentObject[popupType].placeholder) || '请输入'" placeholder-class="placeholder" v-model="componentObject[popupType].searchValue" confirm-type="search" @confirm="handleSearch" />
class="input" <view class="clear flex" @click="clear">
type="text" <uni-icons type="closeempty" size="16" v-if="componentObject[popupType] && componentObject[popupType].searchValue"></uni-icons>
: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>
</view> </view>
</view> </view>
</template> </template>
<view :class="['popup-body', <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 }]">
{'hide-footer': componentObject[popupType].hideFooter }, <scroll-view scroll-y :class="['popup-scroll-view', { show: componentObject[popupType].loadComplete }]">
{'hide-search': componentObject[popupType].hideSearch }, <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>
{'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"> <template v-if="componentObject[popupType].noData">
<view class="nothing flex">暂无数据</view> <view class="nothing flex">暂无数据</view>
</template> </template>
</scroll-view> </scroll-view>
<image <image v-if="!componentObject[popupType].loadComplete" class="loading" src="../../assets/images/common/loadding.gif" />
v-if="!componentObject[popupType].loadComplete"
class="loading"
src="../../assets/images/common/loadding.gif"
/>
</view> </view>
</popup> </popup>
<sku-popup <sku-popup ref="skuPopupRef" @onConfirm="skuConfirm"></sku-popup>
ref="skuPopupRef"
@onConfirm="skuConfirm"
></sku-popup>
</view> </view>
</template> </template>
...@@ -109,6 +51,7 @@ import Customer from './components/Customer.vue' ...@@ -109,6 +51,7 @@ import Customer from './components/Customer.vue'
import Options from './components/Options.vue' import Options from './components/Options.vue'
import CarBrand from './components/CarBrand.vue' import CarBrand from './components/CarBrand.vue'
import Gearbox from './components/Gearbox.vue' import Gearbox from './components/Gearbox.vue'
import OrderTypePopup from './components/OrderTypePopup.vue'
export default { export default {
components: { components: {
...@@ -131,7 +74,8 @@ export default { ...@@ -131,7 +74,8 @@ export default {
Customer, Customer,
Options, Options,
CarBrand, CarBrand,
Gearbox Gearbox,
OrderTypePopup
}, },
name: '', name: '',
props: { props: {
...@@ -237,17 +181,25 @@ export default { ...@@ -237,17 +181,25 @@ export default {
}, },
initPopupData () { initPopupData () {
this.chooseContent = null this.chooseContent = null
if (!this.componentObject[this.popupType]) {
console.error(`Popup type ${this.popupType} not found in config`)
return
}
let componentRef = this.componentRef() let componentRef = this.componentRef()
if (!componentRef) setTimeout(this.initPopupData, .1e3) 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 () { handleSearch () {
if (!this.componentObject[this.popupType]) {
console.error(`Popup type ${this.popupType} not found in config`)
return
}
let componentRef = this.componentRef() let componentRef = this.componentRef()
if (!componentRef) uni.showToast({ if (!componentRef) uni.showToast({
title: '请稍后再试', title: '请稍后再试',
icon: 'none' icon: 'none'
}) })
else componentRef.handleSearch(this.componentObject[this.popupType].searchValue) else componentRef.handleSearch(this.componentObject[this.popupType].searchValue || '')
}, },
confirm (autoClose) { confirm (autoClose) {
try { 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 \ No newline at end of file
<template> <template>
<view class="list"> <view class="list">
<view <view @click="currentId = ''" :class="['item flex', { active: !currentId }]">
@click="currentId = ''"
:class="['item flex',{active:!currentId}]"
>
<view class="sprite-icon icon-tag-checked"></view> <view class="sprite-icon icon-tag-checked"></view>
全部 全部
</view> </view>
<template v-for="(i, index) in list"> <template v-for="(i, index) in list">
<view <view :key="index" @click="currentId = i.id" :class="['item flex', { active: currentId == i.id }]">
:key="index"
@click="currentId = i.id"
:class="['item flex',{active:currentId == i.id}]"
>
<view class="sprite-icon icon-tag-checked"></view> <view class="sprite-icon icon-tag-checked"></view>
{{i.name}} {{ i.name }}
</view> </view>
</template> </template>
</view> </view>
</template> </template>
<script type='text/ecmascript-6'> <script type="text/ecmascript-6">
export default { export default {
name: 'OrderStatusList', name: 'OrderStatusList',
inject: ['userInfo'], inject: ['userInfo'],
...@@ -63,7 +56,7 @@ export default { ...@@ -63,7 +56,7 @@ export default {
id: 7 id: 7
}, },
{ {
name: '已失效', name: '错误订单',
value: [11], value: [11],
id: 8 id: 8
}, },
...@@ -81,7 +74,12 @@ export default { ...@@ -81,7 +74,12 @@ export default {
name: '已退款', name: '已退款',
value: [5, 12], value: [5, 12],
id: 11 id: 11
} },
{
name: '审批中',
value: [14],
id: 12
},
]), ]),
currentId: '', currentId: '',
} }
...@@ -120,7 +118,7 @@ export default { ...@@ -120,7 +118,7 @@ export default {
} }
</script> </script>
<style scoped lang='scss'> <style scoped lang="scss">
.list { .list {
display: grid; display: grid;
grid-template-columns: repeat(6, 1fr); grid-template-columns: repeat(6, 1fr);
......
const screenList = [ const screenList = [
{ {
title: '转化人员', title: '转化人员',
...@@ -27,18 +26,16 @@ const screenList = [ ...@@ -27,18 +26,16 @@ const screenList = [
componentName: 'TimeList', componentName: 'TimeList',
params: { params: {
idKey: ['placeOrderStartDateStr', 'placeOrderEndDateStr'], idKey: ['placeOrderStartDateStr', 'placeOrderEndDateStr'],
currentIdKey: 'orderTimeId', currentIdKey: 'orderTimeId'
}, }
}, },
{ {
title: '支付时间', title: '支付时间',
componentName: 'TimeList', componentName: 'TimeList',
params: { params: {
idKey: ['installUpgradeBeginTimeStr', 'installUpgradeEndTimeStr'], idKey: ['installUpgradeBeginTimeStr', 'installUpgradeEndTimeStr'],
currentIdKey: 'payTimeId', currentIdKey: 'payTimeId'
}, }
}, },
{ {
title: '订单状态', title: '订单状态',
...@@ -48,13 +45,19 @@ const screenList = [ ...@@ -48,13 +45,19 @@ const screenList = [
} }
}, },
{ {
title: '异常标记',
componentName: 'ErrorOrderList',
params: {
idKey: 'abnormalFlag'
}
},
{
title: '支付方式', title: '支付方式',
componentName: 'PayList', componentName: 'PayList',
params: { params: {
idKey: 'payType' idKey: 'payType'
} }
}, }
] ]
export default { screenList } export default { screenList }
...@@ -73,6 +73,7 @@ import TimeList from './components/TimeList.vue' ...@@ -73,6 +73,7 @@ import TimeList from './components/TimeList.vue'
import OrderStatusList from './components/OrderStatusList.vue' import OrderStatusList from './components/OrderStatusList.vue'
import PayList from './components/PayList.vue' import PayList from './components/PayList.vue'
import CourseOptionList from './components/CourseOptionList.vue' import CourseOptionList from './components/CourseOptionList.vue'
import ErrorOrderList from './components/ErrorOrderList.vue'
export default { export default {
components: { components: {
Popup, Popup,
...@@ -80,7 +81,8 @@ export default { ...@@ -80,7 +81,8 @@ export default {
TimeList, TimeList,
OrderStatusList, OrderStatusList,
PayList, PayList,
CourseOptionList CourseOptionList,
ErrorOrderList
}, },
name: 'OrderScreen', name: 'OrderScreen',
props: { 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 \ No newline at end of file
...@@ -65,7 +65,12 @@ export default { ...@@ -65,7 +65,12 @@ export default {
name: '战败', name: '战败',
value: -1, value: -1,
id: 11 id: 11
} },
{
name: '审批中',
value: [14],
id: 12
},
]), ]),
currentId: '', currentId: '',
} }
......
...@@ -45,6 +45,13 @@ const screenList = [ ...@@ -45,6 +45,13 @@ const screenList = [
} }
}, },
{ {
title: '异常标记',
componentName: 'ErrorOrderList',
params: {
idKey: 'abnormalFlag'
}
},
{
title: '支付方式', title: '支付方式',
componentName: 'PayList', componentName: 'PayList',
params: { params: {
......
...@@ -37,6 +37,7 @@ import OrderStatusList from './components/OrderStatusList.vue' ...@@ -37,6 +37,7 @@ import OrderStatusList from './components/OrderStatusList.vue'
import PayList from './components/PayList.vue' import PayList from './components/PayList.vue'
import CourseOptionList from './components/CourseOptionList.vue' import CourseOptionList from './components/CourseOptionList.vue'
import ContractList from './components/ContractList.vue' import ContractList from './components/ContractList.vue'
import ErrorOrderList from './components/ErrorOrderList.vue'
export default { export default {
components: { components: {
Popup, Popup,
...@@ -45,7 +46,8 @@ export default { ...@@ -45,7 +46,8 @@ export default {
OrderStatusList, OrderStatusList,
PayList, PayList,
CourseOptionList, CourseOptionList,
ContractList ContractList,
ErrorOrderList
}, },
name: 'OrderScreen', name: 'OrderScreen',
props: { props: {
......
...@@ -39,7 +39,7 @@ const secretKey = { ...@@ -39,7 +39,7 @@ const secretKey = {
const domain = { const domain = {
// ip: 'http://192.168.2.94:8558', // ip: 'http://192.168.2.94:8558',
// ip: 'http://192.168.2.3:8315', // 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:8315
商城: 192.168.2.3:8558 */ 商城: 192.168.2.3:8558 */
dev: 'https://scrm.dev.glsx.com.cn', dev: 'https://scrm.dev.glsx.com.cn',
...@@ -49,8 +49,8 @@ const domain = { ...@@ -49,8 +49,8 @@ const domain = {
}[target[index]] }[target[index]]
const djDomain = { const djDomain = {
ip: 'http://dj.dev.glsx.com.cn', // ip: 'http://dj.dev.glsx.com.cn',
// ip: 'http://192.168.1.125:8080', ip: 'http://192.168.1.122:8292',
dev: 'http://dj.dev.glsx.com.cn', dev: 'http://dj.dev.glsx.com.cn',
beta: 'https://dj.beta.glsx.com.cn', //预发布 appid: wx9f91c1ec493eb425 beta: 'https://dj.beta.glsx.com.cn', //预发布 appid: wx9f91c1ec493eb425
uat: 'https://dj.test.glsx.com.cn', //测试 appid: wxe10067a63c1856ac uat: 'https://dj.test.glsx.com.cn', //测试 appid: wxe10067a63c1856ac
...@@ -160,7 +160,8 @@ const pathEnum = { ...@@ -160,7 +160,8 @@ const pathEnum = {
merchants: '/rop-merchants/', merchants: '/rop-merchants/',
pad: '/rop-dj-pad/', pad: '/rop-dj-pad/',
clue: '/rop-scrm-clue/', clue: '/rop-scrm-clue/',
evaluation: '/gsc-vcp-pad-facade' evaluation: '/gsc-vcp-pad-facade',
staffMiniprogram: '/rop-dj-staff-miniprogram/'
} }
const CONFIG_ENV_MAP = { const CONFIG_ENV_MAP = {
1: 'develop', 1: 'develop',
......
...@@ -164,11 +164,11 @@ function requestAndroidPermission (permissionID) { ...@@ -164,11 +164,11 @@ function requestAndroidPermission (permissionID) {
}, },
['android.permission.CAMERA']: { ['android.permission.CAMERA']: {
title: '相机', title: '相机',
content: '为了拍摄活动现场照片及客户购车凭证,展业助手需要申请您的相机权限。' content: '展业助手需要申请相机权限,用于上传相关图片资料以完成业务办理。'
}, },
['android.permission.READ_EXTERNAL_STORAGE']: { ['android.permission.READ_EXTERNAL_STORAGE']: {
title: '相册', title: '相册',
content: '为了上传活动现场照片及客户购车凭证,展业助手需要申请您的相册权限。' content: '展业助手需要申请相册权限,用于上传相关图片资料以完成业务办理。'
} }
}[permissionID] || { }[permissionID] || {
title: permissionID, title: permissionID,
......
{ {
"name" : "展业助手", "name": "展业助手",
"appid" : "__UNI__D3BD3DF", "appid": "__UNI__D3BD3DF",
"description" : "", "description": "",
"versionName" : "2.21.0", "versionName": "2.21.1",
"versionCode" : 2210, "versionCode": 2211,
"transformPx" : false, "transformPx": false,
"sassImplementationName" : "node-sass", "sassImplementationName": "node-sass",
/* 5+App特有相关 */ /* 5+App特有相关 */
"app-plus" : { "app-plus": {
"cache" : false, "cache": false,
"bounce" : "none", "bounce": "none",
"usingComponents" : true, "usingComponents": true,
"nvueStyleCompiler" : "uni-app", "nvueStyleCompiler": "uni-app",
"compilerVersion" : 3, "compilerVersion": 3,
"compatible" : { "compatible": {
"ignoreVersion" : true "ignoreVersion": true
}, },
"screenOrientation" : "landscape", "screenOrientation": "landscape",
"splashscreen" : { "splashscreen": {
"alwaysShowBeforeRender" : true, "alwaysShowBeforeRender": true,
"waiting" : true, "waiting": true,
"autoclose" : true, "autoclose": true,
"delay" : 0 "delay": 0
}, },
/* 模块配置 */ /* 模块配置 */
"modules" : { "modules": {
"Camera" : {}, "Camera": {},
"Record" : {}, "Record": {},
"VideoPlayer" : {}, "VideoPlayer": {},
"AudioPlayer" : {}, "AudioPlayer": {},
"SQLite" : {}, "SQLite": {},
"Maps" : {}, "Maps": {},
"Geolocation" : {} "Geolocation": {}
}, },
/* 应用发布信息 */ /* 应用发布信息 */
"distribute" : { "distribute": {
/* android打包配置 */ /* android打包配置 */
"android" : { "android": {
"permissions" : [ "permissions": [
"<uses-feature android:name=\"android.hardware.camera\"/>", "<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>", "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>", "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
...@@ -54,83 +54,81 @@ ...@@ -54,83 +54,81 @@
"<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>", "<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>" "<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>"
], ],
"abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ], "abiFilters": ["armeabi-v7a", "arm64-v8a", "x86"],
"targetSdkVersion" : 30, "targetSdkVersion": 30,
"minSdkVersion" : 21, "minSdkVersion": 21,
"excludePermissions" : [ "excludePermissions": ["<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>"]
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>"
]
}, },
/* ios打包配置 */ /* ios打包配置 */
"ios" : { "ios": {
"dSYMs" : false, "dSYMs": false,
"UIBackgroundModes" : "audio" "UIBackgroundModes": "audio"
}, },
/* SDK配置 */ /* SDK配置 */
"sdkConfigs" : { "sdkConfigs": {
"ad" : {}, "ad": {},
"speech" : {}, "speech": {},
"geolocation" : { "geolocation": {
"baidu" : { "baidu": {
"__platform__" : [ "android" ], "__platform__": ["android"],
"appkey_ios" : "", "appkey_ios": "",
"appkey_android" : "rfN7u5gCi0KyCGIWWBYGXlmKrVQsKH8z" "appkey_android": "rfN7u5gCi0KyCGIWWBYGXlmKrVQsKH8z"
} }
}, },
"maps" : {} "maps": {}
}, },
"icons" : { "icons": {
"android" : { "android": {
"hdpi" : "static/72.png", "hdpi": "static/72.png",
"xhdpi" : "static/96.png", "xhdpi": "static/96.png",
"xxhdpi" : "static/144.png" "xxhdpi": "static/144.png"
} }
} }
}, },
"nativePlugins" : { "nativePlugins": {
"Ba-KeepAliveSuit" : { "Ba-KeepAliveSuit": {
"__plugin_info__" : { "__plugin_info__": {
"name" : "安卓保活套装(通用、常驻通知、电池优化、自启管理、后台运行等)", "name": "安卓保活套装(通用、常驻通知、电池优化、自启管理、后台运行等)",
"description" : "在Ba-KeepAlive的基础上,新增了忽略电池优化、自启管理、常驻通知。为定位、推送、websocket、定时任务、蓝牙、聊天等保驾护航(**注意:**不保证支持所有机型和场景,建议先试用再购买)", "description": "在Ba-KeepAlive的基础上,新增了忽略电池优化、自启管理、常驻通知。为定位、推送、websocket、定时任务、蓝牙、聊天等保驾护航(**注意:**不保证支持所有机型和场景,建议先试用再购买)",
"platforms" : "Android", "platforms": "Android",
"url" : "https://ext.dcloud.net.cn/plugin?id=11765", "url": "https://ext.dcloud.net.cn/plugin?id=11765",
"android_package_name" : "uni.gltap", "android_package_name": "uni.gltap",
"ios_bundle_id" : "", "ios_bundle_id": "",
"isCloud" : true, "isCloud": true,
"bought" : 1, "bought": 1,
"pid" : "11765", "pid": "11765",
"parameters" : {} "parameters": {}
} }
} }
} }
}, },
/* 快应用特有相关 */ /* 快应用特有相关 */
"quickapp" : {}, "quickapp": {},
/* 小程序特有相关 */ /* 小程序特有相关 */
"mp-weixin" : { "mp-weixin": {
"appid" : "wx79d1ff39bee3d047", "appid": "wx79d1ff39bee3d047",
"setting" : { "setting": {
"urlCheck" : false "urlCheck": false
}, },
"usingComponents" : true "usingComponents": true
}, },
"mp-alipay" : { "mp-alipay": {
"usingComponents" : true "usingComponents": true
}, },
"mp-baidu" : { "mp-baidu": {
"usingComponents" : true "usingComponents": true
}, },
"mp-toutiao" : { "mp-toutiao": {
"usingComponents" : true "usingComponents": true
}, },
"uniStatistics" : { "uniStatistics": {
"enable" : false "enable": false
}, },
"vueVersion" : "2", "vueVersion": "2",
"h5" : { "h5": {
"devServer" : { "devServer": {
"port" : 8080, "port": 8080,
"https" : false "https": false
} }
} }
} }
let modalQueue = [], let modalQueue = [],
eventRequest = [] eventRequest = []
export default { export default {
data () { data() {
return {} return {}
}, },
computed: { computed: {
userInfo () { userInfo() {
return uni.$storage.get('userInfo') || {} return uni.$storage.get('userInfo') || {}
} }
}, },
mounted () { }, mounted() {},
methods: { methods: {
/** /**
* *
* @param {是否需要检测企微打卡} checkWW * @param {是否需要检测企微打卡} checkWW
* @returns * @returns
*/ */
async checkDailyReport (checkWW = true) { async checkDailyReport(checkWW = true) {
modalQueue = [] modalQueue = []
eventRequest = [] eventRequest = []
let { sceneType, isSuper, loginRole } = this.userInfo let { sceneType, isSuper, loginRole } = this.userInfo
...@@ -39,7 +39,7 @@ export default { ...@@ -39,7 +39,7 @@ export default {
}) })
}) })
}, },
showNextModal () { showNextModal() {
if (modalQueue.length > 0) { if (modalQueue.length > 0) {
const modalInfo = modalQueue.pop() const modalInfo = modalQueue.pop()
// if (wx.__HAS_SHOW_MODAL) return; // if (wx.__HAS_SHOW_MODAL) return;
...@@ -63,7 +63,7 @@ export default { ...@@ -63,7 +63,7 @@ export default {
/** /**
* 轻改日报 * 轻改日报
*/ */
staffDailyReport () { staffDailyReport() {
let { userInfo } = this let { userInfo } = this
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
uni.$api.interceptionApi uni.$api.interceptionApi
...@@ -92,7 +92,8 @@ export default { ...@@ -92,7 +92,8 @@ export default {
const pages = getCurrentPages(), const pages = getCurrentPages(),
currentPage = pages[pages.length - 1] currentPage = pages[pages.length - 1]
if (currentPage.route == 'pages/boutique/tool/index') uni.$emit('jumpToDailyReport', formattedDate) if (currentPage.route == 'pages/boutique/tool/index') uni.$emit('jumpToDailyReport', formattedDate)
else uni.navigateTo({ else
uni.navigateTo({
url: `/pages/boutique/tool/index?componentName=DailyReport&currentDate=${formattedDate}` url: `/pages/boutique/tool/index?componentName=DailyReport&currentDate=${formattedDate}`
}) })
} }
...@@ -110,7 +111,7 @@ export default { ...@@ -110,7 +111,7 @@ export default {
/** /**
* 二手车日报 * 二手车日报
*/ */
usedCarDailyReport () { usedCarDailyReport() {
let { userInfo } = this let { userInfo } = this
return new Promise(async (resolve, reject) => { return new Promise(async (resolve, reject) => {
const data = await uni.$api.interceptionApi.checkUsedCarStaffIsNew({ const data = await uni.$api.interceptionApi.checkUsedCarStaffIsNew({
...@@ -120,10 +121,11 @@ export default { ...@@ -120,10 +121,11 @@ export default {
staffPhone: userInfo.phone, staffPhone: userInfo.phone,
sceneType: 7 sceneType: 7
}) })
if (!data) resolve(false) //检测是否新员工或调店 flase不检测日报 true检测日报 if (!data)
resolve(false) //检测是否新员工或调店 flase不检测日报 true检测日报
else { else {
const _data = await uni.$api.interceptionApi.checkUsedCarStaffDailyReportValid({ const _data = await uni.$api.interceptionApi.checkUsedCarStaffDailyReportValid({
sellerMerchantId: userInfo.shopMerchantId, sellerMerchantId: userInfo.shopMerchantId
}) //true 已填写 false 未填写 }) //true 已填写 false 未填写
if (!_data) { if (!_data) {
// 获取当前日期 // 获取当前日期
...@@ -141,7 +143,8 @@ export default { ...@@ -141,7 +143,8 @@ export default {
const pages = getCurrentPages(), const pages = getCurrentPages(),
currentPage = pages[pages.length - 1] currentPage = pages[pages.length - 1]
if (currentPage.route == 'pages/usedCar/tool/index') uni.$emit('jumpToDailyReport', formattedDate) if (currentPage.route == 'pages/usedCar/tool/index') uni.$emit('jumpToDailyReport', formattedDate)
else uni.navigateTo({ else
uni.navigateTo({
url: `/pages/usedCar/tool/index?componentName=DailyReport&currentDate=${formattedDate}` url: `/pages/usedCar/tool/index?componentName=DailyReport&currentDate=${formattedDate}`
}) })
} }
...@@ -149,10 +152,9 @@ export default { ...@@ -149,10 +152,9 @@ export default {
resolve(true) resolve(true)
} else resolve(false) } else resolve(false)
} }
}) })
}, },
clockedIntoWork () { clockedIntoWork() {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
uni.$api.interceptionApi uni.$api.interceptionApi
.clockInConfigPhone({}) .clockInConfigPhone({})
...@@ -179,7 +181,7 @@ export default { ...@@ -179,7 +181,7 @@ export default {
}) })
}, },
/**延保日报 */ /**延保日报 */
equityStaffDailyReport () { equityStaffDailyReport() {
let { userInfo } = this let { userInfo } = this
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
uni.$api.interceptionApi uni.$api.interceptionApi
...@@ -207,7 +209,8 @@ export default { ...@@ -207,7 +209,8 @@ export default {
const pages = getCurrentPages(), const pages = getCurrentPages(),
currentPage = pages[pages.length - 1] currentPage = pages[pages.length - 1]
if (currentPage.route == 'pages/equity/tool/index') uni.$emit('jumpToDailyReport', formattedDate) if (currentPage.route == 'pages/equity/tool/index') uni.$emit('jumpToDailyReport', formattedDate)
else uni.navigateTo({ else
uni.navigateTo({
url: `/pages/equity/tool/index?componentName=DailyReport&currentDate=${formattedDate}` url: `/pages/equity/tool/index?componentName=DailyReport&currentDate=${formattedDate}`
}) })
} }
...@@ -216,12 +219,13 @@ export default { ...@@ -216,12 +219,13 @@ export default {
} else { } else {
resolve(false) resolve(false)
} }
}).catch(err => { })
.catch(err => {
resolve() resolve()
}) })
}) })
}, },
addModalToQueue (title, content, confirmText, showCancel, priority, eventCallback) { addModalToQueue(title, content, confirmText, showCancel, priority, eventCallback) {
if (modalQueue.findIndex(val => val.content == content) < 0) if (modalQueue.findIndex(val => val.content == content) < 0)
modalQueue.push({ modalQueue.push({
title, title,
...@@ -236,7 +240,7 @@ export default { ...@@ -236,7 +240,7 @@ export default {
/** /**
* 查询当前员工处罚情况 * 查询当前员工处罚情况
*/ */
async inspectionOfProhibitionBill () { async inspectionOfProhibitionBill() {
const data = await uni.$api.interceptionApi.checkStaffStudyPunish() const data = await uni.$api.interceptionApi.checkStaffStudyPunish()
if (data) if (data)
uni.showModal({ uni.showModal({
...@@ -250,11 +254,16 @@ export default { ...@@ -250,11 +254,16 @@ export default {
return Promise.resolve(data) return Promise.resolve(data)
}, },
// 限制录单 // 限制录单
async getLimitRecord () { async getLimitRecord() {
const data = await uni.$api.commonApi.getLimitRecord() const data = await uni.$api.commonApi.getLimitRecord()
if (data) if (data) console.log(data, '限制录单')
console.log(data, '限制录单')
return Promise.resolve(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 @@ ...@@ -317,6 +317,12 @@
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
},
{
"path": "pages/common/wageAppeal/index",
"style": {
"navigationStyle": "custom"
}
} }
], ],
"globalStyle": { "globalStyle": {
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
</view> </view>
<view class="goods-price"> <view class="goods-price">
¥ ¥
<text>{{ i.totalPrice || 0 }}</text> <text>{{ i.finalPrice || 0 }}</text>
</view> </view>
</view> </view>
...@@ -39,6 +39,36 @@ ...@@ -39,6 +39,36 @@
</view> </view>
</view> </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="info-box">
<view class="order-list align-center" v-for="(item, sindex) in orderCardDetail.deliveryUserId ? pointsMultiObj : orderObj" :key="sindex"> <view class="order-list align-center" v-for="(item, sindex) in orderCardDetail.deliveryUserId ? pointsMultiObj : orderObj" :key="sindex">
<view class="order flex align-center"> <view class="order flex align-center">
...@@ -78,7 +108,7 @@ ...@@ -78,7 +108,7 @@
<view class="order-price-label">实付金额</view> <view class="order-price-label">实付金额</view>
<view class="price"> <view class="price">
<text class="unit">¥</text> <text class="unit">¥</text>
{{ orderCardDetail.totalPrice }} {{ orderCardDetail.finalPrice }}
</view> </view>
</view> </view>
</view> </view>
...@@ -151,6 +181,12 @@ export default { ...@@ -151,6 +181,12 @@ export default {
}, },
status() { status() {
return order_mixins.data.status || {} return order_mixins.data.status || {}
},
goodsOrderApplyStatus() {
return order_mixins.data.goodsOrderApplyStatus || {}
},
orderType() {
return order_mixins.data.orderType || {}
} }
}, },
data() { data() {
...@@ -443,7 +479,26 @@ export default { ...@@ -443,7 +479,26 @@ export default {
border-radius: toRpx(4); border-radius: toRpx(4);
border: toRpx(1) solid transparent; 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 { .info-box {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
...@@ -456,7 +511,7 @@ export default { ...@@ -456,7 +511,7 @@ export default {
&:nth-child(2n) { &:nth-child(2n) {
padding-right: 0; padding-right: 0;
padding-left: toRpx(20); // padding-left: toRpx(20);
} }
} }
} }
......
...@@ -102,15 +102,20 @@ module.exports = { ...@@ -102,15 +102,20 @@ module.exports = {
} }
], ],
status: { status: {
14: {
text: '审批中',
color: '#FF9D0A',
background: '#FFF5E6'
},
12: { 12: {
text: '已退款', text: '已退款',
color: '#F7A431', color: '#F7A431',
background: '#FFF5E6' background: '#FFF5E6'
}, },
11: { 11: {
text: '已失效', text: '错误订单',
color: '#8F959E', color: '#F59619',
background: ' #F3F4F5' background: ' #FFF6EB'
}, },
10: { 10: {
text: '已关闭', text: '已关闭',
...@@ -178,12 +183,25 @@ module.exports = { ...@@ -178,12 +183,25 @@ module.exports = {
value: [10] value: [10]
}, },
{ {
name: '已失效', name: '错误订单',
value: [11] value: [11]
} }
], ],
grassInfo: {}, grassInfo: {},
orderCode: '', orderCode: '',
userInfo: {} userInfo: {},
goodsOrderApplyStatus: {
1: '审批中', //区域运营待审核
2: '审批中', //线上运营待审核
3: '审核通过',
4: '审批驳回'
},
orderType: {
1: '正常订单',
2: '打折策略',
3: '买赠策略',
4: '冲量活动',
5: '组合付款'
}
} }
} }
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
<view class="meal-box" v-for="(item, index) in orderInfo.packageGoodsList"> <view class="meal-box" v-for="(item, index) in orderInfo.packageGoodsList">
<view class="meal-hd flex justify-between align-center"> <view class="meal-hd flex justify-between align-center">
<view>{{ item.packageAlias || item.packageName }}</view> <view>{{ item.packageAlias || item.packageName }}</view>
<view class="price">¥{{ item.totalPrice }}</view> <view class="price">¥{{ item.finalPrice }}</view>
</view> </view>
<view class="meal-bd"> <view class="meal-bd">
<view class="meal-bd-box" v-for="g in item.packageGoodsOrderList"> <view class="meal-bd-box" v-for="g in item.packageGoodsOrderList">
...@@ -286,8 +286,34 @@ export default { ...@@ -286,8 +286,34 @@ export default {
let warrantyCardList = [] let warrantyCardList = []
for (var i = 0; i < data?.subOrderList?.length; i++) { for (var i = 0; i < data?.subOrderList?.length; i++) {
let e = data?.subOrderList[i] let e = data?.subOrderList[i]
total_price += e.totalPrice total_price += e.finalPrice
e.price = Number(utils.decimal(Number(e.totalPrice / e.number), 2)).toFixed(2) // 根据订单类型决定使用哪个价格:
// - 正常订单(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 || '' e.positionStr = this.positionTypeList.filter(v => v.positionValue == e.upgradeGoodsPosition)[0]?.positionName || ''
if (e.upgradeWarrantyPeriod || e.upgradeWarrantyPeriod > 0) { if (e.upgradeWarrantyPeriod || e.upgradeWarrantyPeriod > 0) {
warrantyCardList.push({ warrantyCardList.push({
...@@ -297,20 +323,54 @@ export default { ...@@ -297,20 +323,54 @@ export default {
} }
} }
data.packageGoodsList?.forEach(item => { data.packageGoodsList?.forEach(item => {
// 获取订单类型(优先使用套餐内商品的订单类型,否则使用订单级别的)
const orderType = item.packageGoodsOrderList?.[0]?.djOrderType || data.djOrderType
item.packageGoodsOrderList.forEach(g => { 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.goodsList = item.packageGoodsOrderList
// 套餐价格根据订单类型计算
item.price = item.goodsList.reduce((prev, cur) => { 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) }, 0)
item.count = item.goodsList.length ? item.goodsList[0].number : 1 item.count = item.goodsList.length ? item.goodsList[0].number : 1
let total = item.price * item.count let total = item.price * item.count
item.totalPrice = utils.decimal(total, 2) item.finalPrice = utils.decimal(total, 2)
item.packageGoodsOrderList.forEach(g => { item.packageGoodsOrderList.forEach(g => {
g.positionStr = this.positionTypeList.filter(v => v.positionValue == g.upgradeGoodsPosition)[0]?.positionName || '' g.positionStr = this.positionTypeList.filter(v => v.positionValue == g.upgradeGoodsPosition)[0]?.positionName || ''
}) })
total_price += item.totalPrice total_price += item.finalPrice
}) })
data = { data = {
...@@ -524,8 +584,16 @@ export default { ...@@ -524,8 +584,16 @@ export default {
if (data) { if (data) {
console.log(`类型为:${selectPayType}`) console.log(`类型为:${selectPayType}`)
console.log(this.orderInfo) console.log(this.orderInfo)
console.log(data,'data')
if (selectPayType == 3 || selectPayType == 1) { 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 let size = 0
try { try {
const info = uni.getSystemInfoSync() const info = uni.getSystemInfoSync()
......
...@@ -178,7 +178,7 @@ ...@@ -178,7 +178,7 @@
src="../../../../assets/images/common/report-no-data.webp" src="../../../../assets/images/common/report-no-data.webp"
class="icon" class="icon"
/> />
已超过 7 个自然日,暂不支持补填操作 暂不支持补填操作
</view> </view>
</template> </template>
</template> </template>
...@@ -237,7 +237,8 @@ export default { ...@@ -237,7 +237,8 @@ export default {
}, },
props: { props: {
currentDate: String, currentDate: String,
currentMonth: String currentMonth: String,
enterType: String,
}, },
name: 'DailyReport', name: 'DailyReport',
data () { data () {
...@@ -390,7 +391,8 @@ export default { ...@@ -390,7 +391,8 @@ export default {
return `¥${this.orderObj.totalOrderMoney || 0}` return `¥${this.orderObj.totalOrderMoney || 0}`
} }
} }
]) ]),
editableDay: null
} }
}, },
computed: { computed: {
...@@ -426,8 +428,9 @@ export default { ...@@ -426,8 +428,9 @@ export default {
back () { back () {
uni.navigateBack() uni.navigateBack()
}, },
initData () { async initData () {
const { merchantId, merchantName, name, uuid, shopMerchantId, shopMerchantName } = this.userInfo let inT1T5 = await uni.$api.commonApi.checkTodayInT1T5(),
{ merchantId, merchantName, name, uuid, shopMerchantId, shopMerchantName } = this.userInfo
this.orderObj = { this.orderObj = {
yqMerchantId: merchantId, yqMerchantId: merchantId,
yqMerchantName: merchantName, yqMerchantName: merchantName,
...@@ -436,6 +439,7 @@ export default { ...@@ -436,6 +439,7 @@ export default {
merchantId: shopMerchantId, merchantId: shopMerchantId,
merchantName: shopMerchantName merchantName: shopMerchantName
} }
if (inT1T5) this.editableDay = dayjs().subtract(1, 'M').startOf('M')
this.getDailyReportCarBrand() this.getDailyReportCarBrand()
}, },
async getDailyReportCarBrand () { async getDailyReportCarBrand () {
...@@ -509,11 +513,14 @@ export default { ...@@ -509,11 +513,14 @@ export default {
async getStaffDailyReportDetail () { async getStaffDailyReportDetail () {
this.isEditReport = false this.isEditReport = false
this.loadComplete = false this.loadComplete = false
let { currentDate, let {
currentDate,
userInfo, userInfo,
carBandList, carBandList,
hwOhterObjArray, hwOhterObjArray,
orderObj } = this, orderObj,
editableDay
} = this,
{ shopMerchantId, merchantId, uuid } = userInfo { shopMerchantId, merchantId, uuid } = userInfo
uni.showLoading({ uni.showLoading({
mask: true mask: true
...@@ -567,14 +574,15 @@ export default { ...@@ -567,14 +574,15 @@ export default {
return item 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.hwOhterObjArray = hwOhterObjArray
this.carBandList = carBandList this.carBandList = carBandList
this.orderObj = { this.orderObj = {
...orderObj, ...orderObj,
reportDate: currentDate, reportDate: currentDate,
isDateWithin7Days: diffDay < 7, isDateWithin7Days:editableDay ? !disabledReport : diffDay < 7,
isDateWithin60Days: diffDay < 60,
remark, remark,
lastStaffName: data.lastStaffName, lastStaffName: data.lastStaffName,
lastStaffUuid: data.lastStaffUuid, lastStaffUuid: data.lastStaffUuid,
...@@ -697,6 +705,8 @@ export default { ...@@ -697,6 +705,8 @@ export default {
const data = await uni.$api.boutiqueApi.saveStaffDailyReport(orderObj) const data = await uni.$api.boutiqueApi.saveStaffDailyReport(orderObj)
uni.hideLoading() uni.hideLoading()
if (data) { if (data) {
let _text = '返回首页'
if (this.enterType == 'wageAppeal') _text = '返回上一页'
this.isEditReport = false this.isEditReport = false
this.noticeObj = { this.noticeObj = {
title: '提交成功', title: '提交成功',
...@@ -704,10 +714,11 @@ export default { ...@@ -704,10 +714,11 @@ export default {
type: 'success', type: 'success',
buttons: [ buttons: [
{ {
text: '返回首页', text: _text,
type: 'primary', type: 'primary',
callback: _ => { callback: _ => {
uni.navigateBack() uni.navigateBack()
if (this.enterType == 'wageAppeal') uni.$emit('backToWageAppeal')
} }
} }
] ]
......
...@@ -416,15 +416,15 @@ export default { ...@@ -416,15 +416,15 @@ export default {
e.packageGoodsList?.forEach(item => { e.packageGoodsList?.forEach(item => {
item.packageGoodsOrderList.forEach(g => { 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.goodsList = item.packageGoodsOrderList
item.price = item.goodsList.reduce((prev, cur) => { item.price = item.goodsList.reduce((prev, cur) => {
return prev + Number(cur.totalPrice) / Number(cur.number) return prev + Number(cur.finalPrice) / Number(cur.number)
}, 0) }, 0)
item.count = item.goodsList.length ? item.goodsList[0].number : 1 item.count = item.goodsList.length ? item.goodsList[0].number : 1
let total = item.price * item.count let total = item.price * item.count
item.totalPrice = utils.decimal(total, 2) item.finalPrice = utils.decimal(total, 2)
}) })
if (e.packageGoodsList && e.packageGoodsList.length) { if (e.packageGoodsList && e.packageGoodsList.length) {
e.subOrderList = e.subOrderList.concat(e.packageGoodsList) e.subOrderList = e.subOrderList.concat(e.packageGoodsList)
...@@ -433,11 +433,17 @@ export default { ...@@ -433,11 +433,17 @@ export default {
// e.subOrderList = e.subOrderList.filter(item => item.id) // e.subOrderList = e.subOrderList.filter(item => item.id)
// 处理显示订单右上角文字 // 处理显示订单右上角文字
let text = this.status[e.status].text // 安全检查:如果状态不存在,使用默认值
let color = this.status[e.status].color const statusConfig = this.status[e.status] || {
let background = this.status[e.status].background 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 = '已施工' text = '已施工'
color = '#347BFF' color = '#347BFF'
background = '#F3F7FC' background = '#F3F7FC'
......
<template> <template>
<view> <view>
<view :class="[list.length ? 'shop-list':'']"> <view :class="[list.length ? 'shop-list' : '']">
<view class="shop-item" v-for="(item, index) in list" :key="item.goods.goodsId"> <view class="shop-item" v-for="(item, index) in list" :key="item.goods.goodsId">
<view class="flex flex-1 pb-24">
<view class="sprite-icon icon-blue-delete" @click="deleteGoods(index)"></view> <view class="sprite-icon icon-blue-delete" @click="deleteGoods(index)"></view>
<view class="right"> <view class="right">
<view class="shop-name">商品名称:{{ item.goods.goodsAlias || item.goods.upgradeGoodsName || item.goods.goodsInfo.goodsName }}</view> <view class="shop-name">商品名称:{{ item.goods.goodsAlias || item.goods.upgradeGoodsName || item.goods.goodsInfo.goodsName }}</view>
...@@ -24,11 +25,16 @@ ...@@ -24,11 +25,16 @@
</view> </view>
</view> </view>
</view> </view>
<!-- 28 行:折扣 / 买赠 / 组合付款策略组件 -->
<OrderStrategy v-if="getStrategyType(item)" :strategyType="getStrategyType(item)" v-model="item.goods.strategyConfig" :basePrice="getBasePrice(item)" :displayPrice="getDisplayPrice(item)" @priceChange="onPriceChange(item, $event)" />
</view>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import OrderStrategy from './OrderStrategy.vue'
export default { export default {
name: 'Product', name: 'Product',
props: { props: {
...@@ -47,8 +53,15 @@ export default { ...@@ -47,8 +53,15 @@ export default {
isDisabled: { isDisabled: {
type: Boolean, type: Boolean,
default: false default: false
},
orderTypeCode: {
type: [String, Number],
default: ''
} }
}, },
components: {
OrderStrategy
},
created() { created() {
// 初始化商品数量 // 初始化商品数量
this.initProductNumbers() this.initProductNumbers()
...@@ -61,7 +74,159 @@ export default { ...@@ -61,7 +74,159 @@ export default {
// 当组件数据更新时也检查number属性 // 当组件数据更新时也检查number属性
this.initProductNumbers() this.initProductNumbers()
}, },
watch: {
orderTypeCode: {
handler() {
this.initStrategyConfig()
},
immediate: true
}
},
methods: { methods: {
// 根据订单类型获取策略类型
getStrategyType(item) {
const orderType = String(this.orderTypeCode || '')
// '1' 正常订单、'4' 冲量活动:不显示策略组件
if (orderType === '1' || orderType === '4') {
return null
}
// '2' 打折策略
if (orderType === '2') {
return 'discount'
}
// '3' 买赠策略
if (orderType === '3') {
return 'gift'
}
// '5' 组合付款
if (orderType === '5') {
return 'combined'
}
return null
},
// 计算基础价格(单价,不乘以数量)
getBasePrice(item) {
if (!item || !item.goods) return 0
const sellPrice = parseFloat(item.goods.sellPrice || 0)
// 四舍五入保留两位小数
return Math.round(sellPrice * 100) / 100
},
// 计算最终显示价格
getDisplayPrice(item) {
const basePrice = this.getBasePrice(item)
if (!basePrice) return '¥0.00'
const orderType = String(this.orderTypeCode || '')
const strategyConfig = item.goods.strategyConfig || {}
// '2' 打折策略
if (orderType === '2') {
if (strategyConfig.mode === 'ratio' && strategyConfig.discountRatio) {
// 折扣比例:0.1-10,表示 0.1 折到 10 折(即 0.01 到 1.0)
const ratio = parseFloat(strategyConfig.discountRatio)
if (ratio >= 0.1 && ratio <= 10) {
const finalPrice = basePrice * (ratio / 10)
return '¥' + (Math.round(finalPrice * 100) / 100).toFixed(2)
}
} else if (strategyConfig.mode === 'amount' && strategyConfig.discountAmount) {
// 折扣金额:0.01 到不能大于基础价格
const discountAmount = parseFloat(strategyConfig.discountAmount)
if (discountAmount >= 0.01 && discountAmount <= basePrice) {
const finalPrice = basePrice - discountAmount
return '¥' + (Math.round(finalPrice * 100) / 100).toFixed(2)
}
}
return '¥' + basePrice.toFixed(2)
}
// '3' 买赠策略
if (orderType === '3') {
if (strategyConfig.isGift === '1') {
return '¥0.00'
}
return '¥' + basePrice.toFixed(2)
}
// '5' 组合付款
if (orderType === '5') {
if (strategyConfig.mode === 'deduct' && strategyConfig.deductAmount) {
// 抵扣金额:0.01 到不能大于基础价格
const deductAmount = parseFloat(strategyConfig.deductAmount)
if (deductAmount >= 0.01 && deductAmount <= basePrice) {
const finalPrice = basePrice - deductAmount
return '¥' + (Math.round(finalPrice * 100) / 100).toFixed(2)
}
}
return '¥' + basePrice.toFixed(2)
}
return '¥' + basePrice.toFixed(2)
},
// 价格变化回调(finalPrice 是单件商品优惠后的价格,需要乘以数量得到总价)
onPriceChange(item, finalPricePerUnit) {
// 计算总价:单件优惠价 * 数量
const number = parseInt(item.goods.number || 1)
const totalFinalPrice = Math.round(finalPricePerUnit * number * 100) / 100
// 存储总价
this.$set(item.goods, 'finalPrice', totalFinalPrice)
// 同时存储单价优惠后的价格,用于数量改变时重新计算
this.$set(item.goods, 'finalPricePerUnit', finalPricePerUnit)
this.$emit('changeTotalPrice')
},
// 重新计算 finalPrice(当数量改变时调用)
recalculateFinalPrice(item) {
// 如果有优惠策略配置
if (item.goods.strategyConfig && item.goods.finalPricePerUnit !== undefined) {
const number = parseInt(item.goods.number || 1)
const totalFinalPrice = Math.round(item.goods.finalPricePerUnit * number * 100) / 100
this.$set(item.goods, 'finalPrice', totalFinalPrice)
}
},
// 初始化策略配置
initStrategyConfig() {
if (!this.list || this.list.length === 0) return
const strategyType = this.getStrategyType({})
if (!strategyType) {
// 订单类型切换时,重置所有商品的策略配置
this.list.forEach(item => {
if (!item.goods) return
if (item.goods.strategyConfig) {
item.goods.strategyConfig = {}
}
item.goods.discountType = null
item.goods.discountValue = null
item.goods.finalPrice = null
})
return
}
this.list.forEach(item => {
if (!item.goods) return
// 如果商品已经有 discountType 和 discountValue(回显数据),则跳过初始化
const hasDiscountData = item.goods.discountType !== undefined && item.goods.discountType !== null
if (hasDiscountData && item.goods.strategyConfig && Object.keys(item.goods.strategyConfig).length > 0) {
// 回显时已经有正确的 strategyConfig,不重置
return
}
// 无论 strategyConfig 是否存在,都根据新的策略类型重新初始化
if (strategyType === 'discount') {
this.$set(item.goods, 'strategyConfig', {
mode: 'none',
discountRatio: '',
discountAmount: ''
})
} else if (strategyType === 'gift') {
this.$set(item.goods, 'strategyConfig', {
isGift: '0'
})
} else if (strategyType === 'combined') {
this.$set(item.goods, 'strategyConfig', {
mode: 'none',
deductAmount: ''
})
}
})
},
// 初始化商品数量方法 // 初始化商品数量方法
initProductNumbers() { initProductNumbers() {
if (this.list && this.list.length > 0) { if (this.list && this.list.length > 0) {
...@@ -125,8 +290,13 @@ export default { ...@@ -125,8 +290,13 @@ export default {
value = item.goods.minSellPrice.toString() value = item.goods.minSellPrice.toString()
} }
// 更新值 // 更新值
// this.$set(item.goods, 'sellPrice', value)
this.$set(this.list[index].goods, 'sellPrice', value) this.$set(this.list[index].goods, 'sellPrice', value)
// 商品价格修改时,清空折扣 / 抵扣配置,避免旧的优惠继续生效
this.resetStrategyWhenPriceChange(this.list[index])
// 价格变化时,如果已选择订单类型,触发策略组件重新计算价格
this.$forceUpdate()
this.$emit('changeTotalPrice') this.$emit('changeTotalPrice')
}, },
// 验证数量输入 // 验证数量输入
...@@ -140,6 +310,10 @@ export default { ...@@ -140,6 +310,10 @@ export default {
} }
// 更新值 // 更新值
this.$set(item.goods, 'number', value) this.$set(item.goods, 'number', value)
// 数量改变时,需要重新计算 finalPrice
this.recalculateFinalPrice(item)
// 数量变化时,如果已选择订单类型,触发策略组件重新计算价格
this.$forceUpdate()
this.$emit('changeTotalPrice') this.$emit('changeTotalPrice')
}, },
// 增加数量 // 增加数量
...@@ -152,8 +326,37 @@ export default { ...@@ -152,8 +326,37 @@ export default {
const newValue = currentValue >= 999 ? 999 : currentValue + 1 const newValue = currentValue >= 999 ? 999 : currentValue + 1
this.$set(item.goods, 'number', newValue.toString()) this.$set(item.goods, 'number', newValue.toString())
} }
// 数量改变时,需要重新计算 finalPrice
this.recalculateFinalPrice(item)
this.$emit('changeTotalPrice') this.$emit('changeTotalPrice')
}, },
// 商品价格变动时,清空当前商品的折扣/抵扣配置,并重算 finalPrice
resetStrategyWhenPriceChange(item) {
if (!item || !item.goods) return
const goods = item.goods
// 重置内部 strategyConfig
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(goods.number || 1)
const totalFinalPrice = Math.round(unitPrice * number * 100) / 100
this.$set(goods, 'finalPricePerUnit', unitPrice)
this.$set(goods, 'finalPrice', totalFinalPrice)
},
// 减少数量 // 减少数量
decreaseNumber(item) { decreaseNumber(item) {
// 如果商品数量不存在或小于等于1,设置为1 // 如果商品数量不存在或小于等于1,设置为1
...@@ -165,6 +368,8 @@ export default { ...@@ -165,6 +368,8 @@ export default {
// 确保减少后的值不小于1 // 确保减少后的值不小于1
const newValue = Math.max(1, currentValue - 1) const newValue = Math.max(1, currentValue - 1)
this.$set(item.goods, 'number', newValue.toString()) this.$set(item.goods, 'number', newValue.toString())
// 数量改变时,需要重新计算 finalPrice
this.recalculateFinalPrice(item)
this.$emit('changeTotalPrice') this.$emit('changeTotalPrice')
}, },
// 删除商品 // 删除商品
...@@ -181,8 +386,6 @@ export default { ...@@ -181,8 +386,6 @@ export default {
padding: toRpx(12) toRpx(32) toRpx(12) 0; padding: toRpx(12) toRpx(32) toRpx(12) 0;
.shop-item { .shop-item {
display: flex;
align-items: center;
background-color: #f5f7fa; background-color: #f5f7fa;
border-radius: toRpx(16); border-radius: toRpx(16);
margin-bottom: toRpx(16); margin-bottom: toRpx(16);
......
...@@ -127,6 +127,13 @@ const FORM_LIST = [ ...@@ -127,6 +127,13 @@ const FORM_LIST = [
required: true required: true
}, },
{ {
label: '订单类型',
value: 'djOrderType',
type: 'select',
key: 'name',
required: true
},
{
label: '请选择产品', label: '请选择产品',
onlyLabel: true, onlyLabel: true,
required: true, required: true,
...@@ -611,6 +618,11 @@ const popupTypeEnum = { ...@@ -611,6 +618,11 @@ const popupTypeEnum = {
13: { 13: {
key: 'todayShow', key: 'todayShow',
list: '' list: ''
},
28: {
// 订单类型弹窗(OrderTypePopup)
key: 'djOrderType',
list: ''
} }
} }
......
...@@ -22,10 +22,7 @@ ...@@ -22,10 +22,7 @@
src="../../../assets/images/common/tool_banner.png" src="../../../assets/images/common/tool_banner.png"
mode="scaleToFill" mode="scaleToFill"
/> />
<template v-if="toolComponentName !== 'DailyReport'"> <template v-if="toolComponentName === 'DailyReport'">
<Entrance @entranceClick="entranceClick"></Entrance>
</template>
<template v-else>
<uni-calendar <uni-calendar
ref="calendar" ref="calendar"
:clearDate="false" :clearDate="false"
...@@ -38,6 +35,12 @@ ...@@ -38,6 +35,12 @@
:date="currentDate" :date="currentDate"
/> />
</template> </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> </view>
<view class="detail-right"> <view class="detail-right">
...@@ -47,7 +50,9 @@ ...@@ -47,7 +50,9 @@
:transmission-of-data="transmissionOfData" :transmission-of-data="transmissionOfData"
:currentDate="currentDate" :currentDate="currentDate"
:currentMonth="currentMonth" :currentMonth="currentMonth"
:lastMonth="lastMonth"
@setCalendarSelected="selectedDays = $event" @setCalendarSelected="selectedDays = $event"
:enterType="enterType"
/> />
</view> </view>
</view> </view>
...@@ -61,6 +66,30 @@ ...@@ -61,6 +66,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"> <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" /> <StudyCenterPermissionPopup :lockReason="lockReason" @confirm="handleStudyPermissionConfirm" />
</StudyPopup> </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> </view>
</template> </template>
...@@ -78,6 +107,9 @@ import dayjs from 'dayjs' ...@@ -78,6 +107,9 @@ import dayjs from 'dayjs'
import { interceptionMixin } from '@/mixin/index' import { interceptionMixin } from '@/mixin/index'
import StudyPopup from '@/components/StudyPopup.vue' import StudyPopup from '@/components/StudyPopup.vue'
import StudyCenterPermissionPopup from '@/components/StudyCenterPermissionPopup.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 { export default {
mixins: [interceptionMixin], mixins: [interceptionMixin],
...@@ -92,7 +124,10 @@ export default { ...@@ -92,7 +124,10 @@ export default {
UploadProofOfPayment, UploadProofOfPayment,
OrderDetail, OrderDetail,
StudyPopup, StudyPopup,
StudyCenterPermissionPopup StudyCenterPermissionPopup,
WageAppeal,
MonthCalendar,
ErrorOrderPopup
}, },
data () { data () {
return { return {
...@@ -103,16 +138,37 @@ export default { ...@@ -103,16 +138,37 @@ export default {
currentMonth: dayjs().format('YYYY-MM'), currentMonth: dayjs().format('YYYY-MM'),
selectedDays: [], selectedDays: [],
lockReason: '', lockReason: '',
showStudyPermissionPopup: false showStudyPermissionPopup: false,
lastMonth: dayjs().subtract(1, 'month').format('YYYY-MM'),
// 异常订单锁单弹窗
showErrorOrderPopup: false,
abnormalOrderCount: 0,
enterType: '',
} }
}, },
onLoad (options) { onLoad (options) {
if (options.componentName) this.toolComponentName = options.componentName if (options.componentName) this.toolComponentName = options.componentName
if (options.currentDate) this.setCurrentDate(options.currentDate) if (options.currentDate) this.setCurrentDate(options.currentDate)
if (options.enterType) this.enterType = options.enterType
uni.$on('jumpToDailyReport', currentDate => { uni.$on('jumpToDailyReport', currentDate => {
this.toolComponentName = 'DailyReport' this.toolComponentName = 'DailyReport'
if (currentDate) this.setCurrentDate(currentDate) 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: { methods: {
setCurrentDate (currentDate) { setCurrentDate (currentDate) {
...@@ -194,11 +250,18 @@ export default { ...@@ -194,11 +250,18 @@ export default {
}, 100) }, 100)
} }
}) })
} },
// 确认选择的月份
confirmMonth(month) {
this.lastMonth = month
},
} }
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.nav-bar {
z-index: 1;
}
.detail-content { .detail-content {
display: flex; display: flex;
height: calc(100vh - #{toRpx(212)}); height: calc(100vh - #{toRpx(212)});
...@@ -239,4 +302,48 @@ export default { ...@@ -239,4 +302,48 @@ export default {
font-size: toRpx(34); 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> </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 \ No newline at end of file
...@@ -235,6 +235,7 @@ export default { ...@@ -235,6 +235,7 @@ export default {
}) })
const carBrandList = uni.$storage.get('carBrandList') const carBrandList = uni.$storage.get('carBrandList')
const carChildsBrandIds = carBrandList.map(i => i.id) const carChildsBrandIds = carBrandList.map(i => i.id)
const { sceneType } = uni.$storage.get('userInfo')
let params = { let params = {
merchantId: shopMerchantId, merchantId: shopMerchantId,
pageNum, pageNum,
...@@ -242,6 +243,7 @@ export default { ...@@ -242,6 +243,7 @@ export default {
carModel: carModel || '', carModel: carModel || '',
orderStatus: 3, orderStatus: 3,
merchantOrder, merchantOrder,
sceneType: sceneType,
historyOrderGoodsTypes: this.historyOrderGoodsTypes historyOrderGoodsTypes: this.historyOrderGoodsTypes
} }
if (!params.merchantOrder) { if (!params.merchantOrder) {
......
...@@ -183,7 +183,15 @@ export default { ...@@ -183,7 +183,15 @@ export default {
...this.customerInfo, ...this.customerInfo,
phoneNumber: e.ownerPhone, phoneNumber: e.ownerPhone,
customerName: e.ownerName, customerName: e.ownerName,
carModel: e.brandModel }
uni.$logger.local.info(`从客户档案选择:${JSON.stringify(e)}`)
if (e.carModelId) {
this.customerInfo.carModelId = e.carModelId
this.customerInfo.carModel = e.brandModel
this.customerInfo.carBrand = e.carBrand
this.customerInfo.carBrandId = e.carBrandId
this.customerInfo.oneCarBrand = e.oneCarBrand
this.customerInfo.oneCarBrandId = e.oneCarBrandId
} }
this.inputCustomer() this.inputCustomer()
}, },
......
...@@ -213,8 +213,21 @@ module.exports = { ...@@ -213,8 +213,21 @@ module.exports = {
5: { text: '已完成', color: '#2CCA74', background: '#EAF9F1' }, 5: { text: '已完成', color: '#2CCA74', background: '#EAF9F1' },
'-1': { text: '战败', color: '#F24724', background: '#FDECE9' }, '-1': { text: '战败', color: '#F24724', background: '#FDECE9' },
9: { text: '已撤销', color: '#999999', background: 'rgba(153, 153, 153, 0.1)' }, 9: { text: '已撤销', color: '#999999', background: 'rgba(153, 153, 153, 0.1)' },
11: { text: '已失效', color: '#F7A431', background: '#FFF5E6' }, 11: { text: '错误订单', color: '#F7A431', background: '#FFF5E6' },
6: { 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 @@ ...@@ -229,7 +229,7 @@
src="../../../../assets/images/common/report-no-data.webp" src="../../../../assets/images/common/report-no-data.webp"
class="icon" class="icon"
/> />
已超过 7 个自然日,暂不支持补填操作 暂不支持补填操作
</view> </view>
</template> </template>
</template> </template>
...@@ -291,7 +291,8 @@ export default { ...@@ -291,7 +291,8 @@ export default {
}, },
props: { props: {
currentDate: String, currentDate: String,
currentMonth: String currentMonth: String,
enterType: String
}, },
name: 'DailyReport', name: 'DailyReport',
data () { data () {
...@@ -377,6 +378,7 @@ export default { ...@@ -377,6 +378,7 @@ export default {
]), ]),
weeklyList: [], weeklyList: [],
isEditReport: false, isEditReport: false,
editableDay: null
} }
}, },
computed: { computed: {
...@@ -503,8 +505,9 @@ export default { ...@@ -503,8 +505,9 @@ export default {
this.isEditReport = false this.isEditReport = false
}, },
methods: { methods: {
initData () { async initData () {
const { merchantId, merchantName, name, uuid, shopMerchantId, shopMerchantName } = this.userInfo let inT1T5 = await uni.$api.commonApi.checkTodayInT1T5(),
{ merchantId, merchantName, name, uuid, shopMerchantId, shopMerchantName } = this.userInfo
this.orderObj = { this.orderObj = {
yqMerchantId: merchantId, yqMerchantId: merchantId,
yqMerchantName: merchantName, yqMerchantName: merchantName,
...@@ -513,6 +516,7 @@ export default { ...@@ -513,6 +516,7 @@ export default {
merchantId: shopMerchantId, merchantId: shopMerchantId,
merchantName: shopMerchantName merchantName: shopMerchantName
} }
if (inT1T5) this.editableDay = dayjs().subtract(1, 'M').startOf('M')
this.getDailyReportCarBrand() this.getDailyReportCarBrand()
}, },
async getDailyReportCarBrand () { async getDailyReportCarBrand () {
...@@ -598,7 +602,9 @@ export default { ...@@ -598,7 +602,9 @@ export default {
carBandList, carBandList,
hwOhterObjArray, hwOhterObjArray,
orderObj, orderObj,
isHmStore } = this, isHmStore,
editableDay
} = this,
{ shopMerchantId, merchantId, uuid } = userInfo { shopMerchantId, merchantId, uuid } = userInfo
uni.showLoading({ uni.showLoading({
mask: true mask: true
...@@ -654,14 +660,15 @@ export default { ...@@ -654,14 +660,15 @@ export default {
return item 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.hwOhterObjArray = hwOhterObjArray
this.carBandList = carBandList this.carBandList = carBandList
this.orderObj = { this.orderObj = {
...orderObj, ...orderObj,
reportDate: currentDate, reportDate: currentDate,
isDateWithin7Days: diffDay < 7, isDateWithin7Days:editableDay ? !disabledReport : diffDay < 7,
isDateWithin60Days: diffDay < 60,
remark, remark,
lastStaffName: data.lastStaffName, lastStaffName: data.lastStaffName,
lastStaffUuid: data.lastStaffUuid, lastStaffUuid: data.lastStaffUuid,
...@@ -808,6 +815,8 @@ export default { ...@@ -808,6 +815,8 @@ export default {
const data = await uni.$api.boutiqueApi.saveStaffDailyReport(orderObj) const data = await uni.$api.boutiqueApi.saveStaffDailyReport(orderObj)
uni.hideLoading() uni.hideLoading()
if (data) { if (data) {
let _text = '返回首页'
if (this.enterType == 'wageAppeal') _text = '返回上一页'
this.isEditReport = false this.isEditReport = false
this.noticeObj = { this.noticeObj = {
title: '提交成功', title: '提交成功',
...@@ -815,10 +824,11 @@ export default { ...@@ -815,10 +824,11 @@ export default {
type: 'success', type: 'success',
buttons: [ buttons: [
{ {
text: '返回首页', text: _text,
type: 'primary', type: 'primary',
callback: _ => { callback: _ => {
uni.navigateBack() uni.navigateBack()
if (this.enterType == 'wageAppeal') uni.$emit('backToWageAppeal')
} }
} }
] ]
......
...@@ -13,14 +13,42 @@ ...@@ -13,14 +13,42 @@
</view> </view>
</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 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: status[orderCardDetail.orderStatus].color, 'background-color': status[orderCardDetail.orderStatus].background }"> <view v-else class="status text-center" :style="{ color: currentStatusConfig.color, 'background-color': currentStatusConfig.background }">
{{ status[orderCardDetail.orderStatus].text }} {{ 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> </view>
<view class="order-card-bottom-box"> <view class="order-card-bottom-box">
<view class="info-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 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 flex align-center" v-if="item.key == 'remark' && orderCardDetail.orderStatus == '-1'">
<view class="order-label">{{ item.label }}</view> <view class="order-label">{{ item.label }}</view>
...@@ -34,7 +62,6 @@ ...@@ -34,7 +62,6 @@
<view>{{ orderCardDetail[item.key] || '' }}</view> <view>{{ orderCardDetail[item.key] || '' }}</view>
</view> </view>
</view> </view>
<!-- &&( item.orderStatus == '3'||item.orderStatus =='5') -->
<view class="order flex align-center" v-if="item.key == 'createdTime'"> <view class="order flex align-center" v-if="item.key == 'createdTime'">
<view class="order-label">{{ item.label }}</view> <view class="order-label">{{ item.label }}</view>
<view class="order-value"> <view class="order-value">
...@@ -71,15 +98,15 @@ ...@@ -71,15 +98,15 @@
</view> </view>
</view> </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="order-label">支付金额</view>
<view class="price flex"> <view class="price flex">
<text class="unit">¥</text> <text class="unit">¥</text>
{{ orderCardDetail.quotedPriceUpdate || '' }} {{ orderCardDetail.finalPrice || '' }}
</view> </view>
<view class="refund-box" v-if="orderCardDetail.refundAmount"> <view class="refund-box" v-if="orderCardDetail.refundAmount">
部分退款 部分退款
<text class="unit">¥</text> <text class="refund-box-unit">¥</text>
{{ orderCardDetail.refundAmount }} {{ orderCardDetail.refundAmount }}
</view> </view>
<!-- 已录单未签名 --> <!-- 已录单未签名 -->
...@@ -200,6 +227,26 @@ export default { ...@@ -200,6 +227,26 @@ export default {
status() { status() {
return order_mixins.data.orderStatusObj || {} 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() { buttonConfig() {
const config = { const config = {
showMoreBtn: false, showMoreBtn: false,
...@@ -211,6 +258,11 @@ export default { ...@@ -211,6 +258,11 @@ export default {
const order = this.orderCardDetail const order = this.orderCardDetail
const localUser = this.localUserInfo const localUser = this.localUserInfo
// 如果是审批中状态(approveStatus === 0),不显示任何操作按钮
if (order.approveStatus === 0 || order.approveStatus === '0') {
return config
}
// 超管或商户类型1不可操作 // 超管或商户类型1不可操作
if (localUser?.isSuper || localUser?.userType !== 2) { if (localUser?.isSuper || localUser?.userType !== 2) {
config.showMoreBtn = order.showInvoiceEntrance || ((order.orderStatus == 3 || order.orderStatus == 5 || (order.orderStatus == 6 && order.refundAmount)) && this.isOrder) config.showMoreBtn = order.showInvoiceEntrance || ((order.orderStatus == 3 || order.orderStatus == 5 || (order.orderStatus == 6 && order.refundAmount)) && this.isOrder)
...@@ -990,7 +1042,20 @@ export default { ...@@ -990,7 +1042,20 @@ export default {
border-radius: toRpx(4); border-radius: toRpx(4);
border: toRpx(1) solid transparent; 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 { .info-box {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
...@@ -1278,4 +1343,24 @@ export default { ...@@ -1278,4 +1343,24 @@ export default {
.updateInfo.isHide { .updateInfo.isHide {
display: none; 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> </style>
...@@ -327,7 +327,7 @@ export default { ...@@ -327,7 +327,7 @@ export default {
if (!arr) { if (!arr) {
return arr return arr
} }
var attrList = ['equityPrice', 'quotedPrice', 'quotedPriceUpdate', 'refundAmount'] var attrList = ['equityPrice', 'quotedPrice', 'quotedPriceUpdate', 'refundAmount','finalPrice']
arr.forEach(item => { arr.forEach(item => {
attrList.forEach(k => { attrList.forEach(k => {
if (item[k]) { if (item[k]) {
......
...@@ -102,7 +102,7 @@ export default { ...@@ -102,7 +102,7 @@ export default {
if (payId) { if (payId) {
const data = await uni.$api.equityApi.getOrderDetail({ orderCode: payId }) const data = await uni.$api.equityApi.getOrderDetail({ orderCode: payId })
console.log(data, '----') console.log(data, '----')
this.orderInfo.total_price = data.totalPrice this.orderInfo.total_price = data.finalPrice
let { payOrder, status } = data let { payOrder, status } = data
if (payOrder?.payStatus == 2 || status == 4) { if (payOrder?.payStatus == 2 || status == 4) {
this.closePopup() this.closePopup()
......
...@@ -157,6 +157,10 @@ export default { ...@@ -157,6 +157,10 @@ export default {
} }
// 更新值 // 更新值
this.$set(this.list[index].packageGoods.goodsList[ind], 'sellPrice', value) 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') this.$emit('changeTotalPrice')
}, },
// 删除商品 // 删除商品
...@@ -173,6 +177,31 @@ export default { ...@@ -173,6 +177,31 @@ export default {
}) })
item.packageGoods.upgradePrice = total item.packageGoods.upgradePrice = total
return total.toFixed(2) 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 = [ ...@@ -135,6 +135,13 @@ const FORM_LIST = [
], ],
[ [
{ {
label: '订单类型',
value: 'djOrderType',
type: 'select',
key: 'name',
required: true
},
{
label: '购买商品', label: '购买商品',
value: 'skuGoods', value: 'skuGoods',
type: 'select', type: 'select',
...@@ -395,6 +402,11 @@ const popupTypeEnum = { ...@@ -395,6 +402,11 @@ const popupTypeEnum = {
key: 'defeatEmployeeName', key: 'defeatEmployeeName',
targetIdKey: 'referrerId', targetIdKey: 'referrerId',
targetNameKey: 'referrer' targetNameKey: 'referrer'
},
28: {
// 订单类型弹窗(OrderTypePopup)
key: 'djOrderType',
list: ''
} }
} }
const titleList = [null, { addHtml: 'customer' }, { name: '车辆信息' }, { name: '增值车损险' }, { name: '其他信息' }] const titleList = [null, { addHtml: 'customer' }, { name: '车辆信息' }, { name: '增值车损险' }, { name: '其他信息' }]
...@@ -647,6 +659,11 @@ const EQUITY_POPUP_ENUM = { ...@@ -647,6 +659,11 @@ const EQUITY_POPUP_ENUM = {
}, },
25: { 25: {
key: 'carBrand' key: 'carBrand'
},
28: {
// 订单类型弹窗(OrderTypePopup)
key: 'djOrderType',
list: ''
} }
} }
...@@ -731,7 +748,7 @@ const EQUITY_FORM_RULE = { ...@@ -731,7 +748,7 @@ const EQUITY_FORM_RULE = {
{ required: true, message: '联系电话不能为空' }, { required: true, message: '联系电话不能为空' },
{ {
validator: (rule, value) => { 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 return !phoneRex.test(value) ? { message: '请输入正确的手机号' } : null
} }
} }
......
...@@ -11,16 +11,19 @@ ...@@ -11,16 +11,19 @@
<view class="common-title">展业</view> <view class="common-title">展业</view>
<view class="content"> <view class="content">
<image class="banner" src="../../../assets/images/common/tool_banner.png" mode="scaleToFill" /> <image class="banner" src="../../../assets/images/common/tool_banner.png" mode="scaleToFill" />
<template v-if="toolComponentName !== 'DailyReport'"> <template v-if="toolComponentName === 'DailyReport'">
<Entrance @entranceClick="entranceClick"></Entrance> <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>
<template v-else> <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> </template>
</view> </view>
</view> </view>
<view class="detail-right"> <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>
</view> </view>
<NoticePopup ref="notice" title="重要提示" text="当前页面暂未保存,是否确认退出" type="warning"></NoticePopup> <NoticePopup ref="notice" title="重要提示" text="当前页面暂未保存,是否确认退出" type="warning"></NoticePopup>
...@@ -29,6 +32,30 @@ ...@@ -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"> <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" /> <StudyCenterPermissionPopup :lockReason="lockReason" @confirm="handleStudyPermissionConfirm" />
</StudyPopup> </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> </view>
</template> </template>
...@@ -47,11 +74,12 @@ import UpdateOrderInfo from './components/UpdateOrderInfo.vue' ...@@ -47,11 +74,12 @@ import UpdateOrderInfo from './components/UpdateOrderInfo.vue'
import StudyPopup from '@/components/StudyPopup.vue' import StudyPopup from '@/components/StudyPopup.vue'
import StudyCenterPermissionPopup from '@/components/StudyCenterPermissionPopup.vue' import StudyCenterPermissionPopup from '@/components/StudyCenterPermissionPopup.vue'
import EquityManagement from './components/EquityManagement.vue' import EquityManagement from './components/EquityManagement.vue'
import CreateEquity from './components/CreateEquity.vue' import CreateEquity from './components/CreateEquity.vue'
import SignName from './components/SignName.vue' import SignName from './components/SignName.vue'
import PreviewList from './components/PreviewList.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 { export default {
mixins: [interceptionMixin], mixins: [interceptionMixin],
components: { components: {
...@@ -69,7 +97,10 @@ export default { ...@@ -69,7 +97,10 @@ export default {
EquityManagement, EquityManagement,
CreateEquity, CreateEquity,
SignName, SignName,
PreviewList PreviewList,
WageAppeal,
MonthCalendar,
ErrorOrderPopup
}, },
data() { data() {
return { return {
...@@ -80,16 +111,37 @@ export default { ...@@ -80,16 +111,37 @@ export default {
currentMonth: dayjs().format('YYYY-MM'), currentMonth: dayjs().format('YYYY-MM'),
selectedDays: [], selectedDays: [],
lockReason: '', lockReason: '',
showStudyPermissionPopup: false showStudyPermissionPopup: false,
lastMonth: dayjs().subtract(1, 'month').format('YYYY-MM'),
// 异常订单锁单弹窗
showErrorOrderPopup: false,
abnormalOrderCount: 0,
enterType: ''
} }
}, },
onLoad(options) { onLoad(options) {
if (options.componentName) this.toolComponentName = options.componentName if (options.componentName) this.toolComponentName = options.componentName
if (options.currentDate) this.setCurrentDate(options.currentDate) if (options.currentDate) this.setCurrentDate(options.currentDate)
if (options.enterType) this.enterType = options.enterType
uni.$on('jumpToDailyReport', currentDate => { uni.$on('jumpToDailyReport', currentDate => {
this.toolComponentName = 'DailyReport' this.toolComponentName = 'DailyReport'
if (currentDate) this.setCurrentDate(currentDate) 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: { methods: {
setCurrentDate(currentDate) { setCurrentDate(currentDate) {
...@@ -108,6 +160,13 @@ export default { ...@@ -108,6 +160,13 @@ export default {
this.lockReason = res.lockReason this.lockReason = res.lockReason
return return
} }
// 提示锁单
// const { lockOrderFlag, abnormalOrderNum } = await this.getAbnormalOrderLock()
// if (lockOrderFlag == "Y" && abnormalOrderNum > 0) {
// this.showErrorOrderPopup = true
// this.abnormalOrderCount = abnormalOrderNum
// return
// }
// 保存当前选择的组件信息,但不立即切换 // 保存当前选择的组件信息,但不立即切换
const selectedItem = item const selectedItem = item
if (this.toolComponentName === selectedItem.name && (!this.transmissionOfData || this.transmissionOfData.type !== 'supplementOrder')) return if (this.toolComponentName === selectedItem.name && (!this.transmissionOfData || this.transmissionOfData.type !== 'supplementOrder')) return
...@@ -169,11 +228,18 @@ export default { ...@@ -169,11 +228,18 @@ export default {
}, 100) }, 100)
} }
}) })
} },
// 确认选择的月份
confirmMonth(month) {
this.lastMonth = month
},
} }
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.nav-bar {
z-index: 1;
}
.detail-content { .detail-content {
display: flex; display: flex;
height: calc(100vh - #{toRpx(212)}); height: calc(100vh - #{toRpx(212)});
...@@ -212,5 +278,50 @@ export default { ...@@ -212,5 +278,50 @@ export default {
justify-content: space-between; justify-content: space-between;
font-size: toRpx(34); 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> </style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!