Commit 18a4cd70 by cen

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

2 parents 038209af dc9d226b
......@@ -237,7 +237,8 @@ export default {
},
props: {
currentDate: String,
currentMonth: String
currentMonth: String,
enterType: String,
},
name: 'DailyReport',
data () {
......@@ -704,6 +705,8 @@ export default {
const data = await uni.$api.boutiqueApi.saveStaffDailyReport(orderObj)
uni.hideLoading()
if (data) {
let _text = '返回首页'
if (this.enterType == 'wageAppeal') _text = '返回上一页'
this.isEditReport = false
this.noticeObj = {
title: '提交成功',
......@@ -711,10 +714,11 @@ export default {
type: 'success',
buttons: [
{
text: '返回首页',
text: _text,
type: 'primary',
callback: _ => {
uni.navigateBack()
if (this.enterType == 'wageAppeal') uni.$emit('backToWageAppeal')
}
}
]
......
......@@ -52,6 +52,7 @@
:currentMonth="currentMonth"
:lastMonth="lastMonth"
@setCalendarSelected="selectedDays = $event"
:enterType="enterType"
/>
</view>
</view>
......@@ -141,12 +142,14 @@ export default {
lastMonth: dayjs().subtract(1, 'month').format('YYYY-MM'),
// 异常订单锁单弹窗
showErrorOrderPopup: false,
abnormalOrderCount: 0
abnormalOrderCount: 0,
enterType: '',
}
},
onLoad (options) {
if (options.componentName) this.toolComponentName = options.componentName
if (options.currentDate) this.setCurrentDate(options.currentDate)
if (options.enterType) this.enterType = options.enterType
uni.$on('jumpToDailyReport', currentDate => {
this.toolComponentName = 'DailyReport'
if (currentDate) this.setCurrentDate(currentDate)
......
......@@ -56,6 +56,7 @@ export default {
},
computed: {
canGoNext() {
if (dayjs().month() === 0) return false
return this.displayYear < this.today.year
},
canGoPrev() {
......
......@@ -79,7 +79,7 @@
</view>
</view>
</scroll-view>
<AttendanceRecord @confirm="handleConfirm" :appealStartTime="appealData.appealStartTime" :appealEndTime="appealData.appealEndTime" ref="attendanceRecord" :lastRecord="lastRecord" :currentCount="currentCount" :popType="popType" :month="month" />
<AttendanceRecord :appealStartTime="appealData.appealStartTime" :appealEndTime="appealData.appealEndTime" ref="attendanceRecord" :lastRecord="lastRecord" :currentCount="currentCount" :popType="popType" :month="month" />
</view>
</template>
......@@ -132,6 +132,14 @@ export default {
}
}
},
created() {
uni.$on('backToWageAppeal', () => {
this.loadData(this.month)
})
},
beforeDestroy() {
uni.$off('backToWageAppeal')
},
methods: {
// 格式化时间
formatTime(time, formatStr) {
......@@ -162,7 +170,18 @@ export default {
// 根据类型跳转或弹窗
if (type === 'dailyReport') {
// 去补日报逻辑
uni.$emit('jumpToDailyReport')
const {sceneType} = uni.$storage.get('userInfo')
const len = this.appealData.missingDailyReportDates.length
const currentDate = `${this.month}-${this.appealData.missingDailyReportDates[len - 1]}`
if (sceneType == 1) {
uni.navigateTo({
url: `/pages/boutique/tool/index?componentName=DailyReport&currentDate=${currentDate}&enterType=wageAppeal`
})
} else if (sceneType == 0) {
uni.navigateTo({
url: `/pages/equity/tool/index?componentName=DailyReport&currentDate=${currentDate}&enterType=wageAppeal`
})
}
} else {
// 申诉弹窗或其他逻辑
this.popType = type
......@@ -182,10 +201,6 @@ export default {
this.$refs.attendanceRecord.open()
}
},
handleConfirm(val) {
console.log(val)
this.loadData(this.lastMonth)
}
}
}
</script>
......
......@@ -291,7 +291,8 @@ export default {
},
props: {
currentDate: String,
currentMonth: String
currentMonth: String,
enterType: String
},
name: 'DailyReport',
data () {
......@@ -814,6 +815,8 @@ export default {
const data = await uni.$api.boutiqueApi.saveStaffDailyReport(orderObj)
uni.hideLoading()
if (data) {
let _text = '返回首页'
if (this.enterType == 'wageAppeal') _text = '返回上一页'
this.isEditReport = false
this.noticeObj = {
title: '提交成功',
......@@ -821,10 +824,11 @@ export default {
type: 'success',
buttons: [
{
text: '返回首页',
text: _text,
type: 'primary',
callback: _ => {
uni.navigateBack()
if (this.enterType == 'wageAppeal') uni.$emit('backToWageAppeal')
}
}
]
......
......@@ -23,7 +23,7 @@
</view>
</view>
<view class="detail-right">
<component :is="toolComponentName" @jump="jump" :transmission-of-data="transmissionOfData" :currentDate="currentDate" :currentMonth="currentMonth" :lastMonth="lastMonth" @setCalendarSelected="selectedDays = $event" />
<component :is="toolComponentName" @jump="jump" :transmission-of-data="transmissionOfData" :currentDate="currentDate" :currentMonth="currentMonth" :lastMonth="lastMonth" @setCalendarSelected="selectedDays = $event" :enterType="enterType" />
</view>
</view>
<NoticePopup ref="notice" title="重要提示" text="当前页面暂未保存,是否确认退出" type="warning"></NoticePopup>
......@@ -115,12 +115,14 @@ export default {
lastMonth: dayjs().subtract(1, 'month').format('YYYY-MM'),
// 异常订单锁单弹窗
showErrorOrderPopup: false,
abnormalOrderCount: 0
abnormalOrderCount: 0,
enterType: ''
}
},
onLoad(options) {
if (options.componentName) this.toolComponentName = options.componentName
if (options.currentDate) this.setCurrentDate(options.currentDate)
if (options.enterType) this.enterType = options.enterType
uni.$on('jumpToDailyReport', currentDate => {
this.toolComponentName = 'DailyReport'
if (currentDate) this.setCurrentDate(currentDate)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!