Commit 5dd20393 by 岑成威

Merge branch 'SAAS+V5.8.4' of 192.168.3.233:glsx/gl_tape into SAAS+V5.8.4

2 parents f97509f9 bb31c7e9
<template> <template>
<view class="report-content "> <view class="report-content ">
<template v-if="!isToday"> <template v-if="!editableDate">
<Detail :templateData="templateData" /> <Detail :templateData="templateData" />
</template> </template>
<template v-else> <template v-else>
......
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
<view class="btn default-btn" @click="$emit('showNegotiationList')">查看洽谈明细表汇总</view> <view class="btn default-btn" @click="$emit('showNegotiationList')">查看洽谈明细表汇总</view>
<view class="btn default-btn" @click="saveBtn = true" v-if="!saveBtn">编辑</view> <view class="btn default-btn" @click="saveBtn = true" v-if="!saveBtn">编辑</view>
<view class="btn default-btn" @click="$emit('saveReport', list)" v-else>保存</view> <view class="btn default-btn" @click="$emit('saveReport', list)" v-else>保存</view>
<view class="btn" @click="$emit('submitReport', list)">提交</view> <view class="btn" @click="$emit('submitReport', list)">上报数据</view>
</Footer> </Footer>
</view> </view>
</template> </template>
......
<template> <template>
<view class="report-content "> <view class="report-content ">
<view :class="['report-component', { 'opacity': showNegotiationList }, { 'show': showReport }]"> <view :class="['report-component', { 'opacity': showNegotiationList }, { 'show': showReport }]">
<template v-if="!isToday || ReportStatus == 1"> <template v-if="!editableDate || ReportStatus == 1">
<Detail :templateData="templateData" /> <Detail :templateData="templateData" />
</template> </template>
<template v-else> <template v-else>
......
...@@ -280,12 +280,12 @@ export default { ...@@ -280,12 +280,12 @@ export default {
async checkReport() { async checkReport() {
let componentRef = this.$refs[`ref-${this.componentName}`], let componentRef = this.$refs[`ref-${this.componentName}`],
{ templateData, templateType, currentDate } = this { templateData, templateType, currentDate } = this
if (templateType != 1) { // if (templateType != 1) {
if (!componentRef.isToday) return false // if (!componentRef.isToday) return false
} else { // } else {
let lastDay = dayjs().subtract(7, 'day') let lastDay = dayjs().subtract(30, 'day')
if (!lastDay.isBefore(dayjs(currentDate), 'day')) return false if (!lastDay.isBefore(dayjs(currentDate), 'day')) return false
} // }
return templateData.length ? componentRef.saveBtnStatus : false return templateData.length ? componentRef.saveBtnStatus : false
}, },
...@@ -376,14 +376,14 @@ export default { ...@@ -376,14 +376,14 @@ export default {
}) })
this.templateData = templateData this.templateData = templateData
} else { } else {
if (this.templateType == 1) { // if (this.templateType == 1) {
let lastDay = dayjs().subtract(7, 'day') let lastDay = dayjs().subtract(30, 'day')
if (lastDay.isBefore(dayjs(currentDate), 'day')) this.getDailyTemplate() if (lastDay.isBefore(dayjs(currentDate), 'day')) this.getDailyTemplate()
else uni.hideLoading() else uni.hideLoading()
} else { // } else {
if (nowDate == currentDate) this.getDailyTemplate() // if (nowDate == currentDate) this.getDailyTemplate()
else uni.hideLoading() // else uni.hideLoading()
} // }
} }
} catch (error) { } catch (error) {
......
...@@ -22,7 +22,7 @@ export default { ...@@ -22,7 +22,7 @@ export default {
computed: { computed: {
/**可编辑日期 */ /**可编辑日期 */
editableDate() { editableDate() {
let lastDay = dayjs().subtract(7, 'day'), let lastDay = dayjs().subtract(30, 'day'),
{ currentDate } = this { currentDate } = this
return lastDay.isBefore(dayjs(currentDate), 'day') return lastDay.isBefore(dayjs(currentDate), 'day')
}, },
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!