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>
<view class="report-content ">
<template v-if="!isToday">
<template v-if="!editableDate">
<Detail :templateData="templateData" />
</template>
<template v-else>
......
......@@ -50,7 +50,7 @@
<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="$emit('saveReport', list)" v-else>保存</view>
<view class="btn" @click="$emit('submitReport', list)">提交</view>
<view class="btn" @click="$emit('submitReport', list)">上报数据</view>
</Footer>
</view>
</template>
......
<template>
<view class="report-content ">
<view :class="['report-component', { 'opacity': showNegotiationList }, { 'show': showReport }]">
<template v-if="!isToday || ReportStatus == 1">
<template v-if="!editableDate || ReportStatus == 1">
<Detail :templateData="templateData" />
</template>
<template v-else>
......
......@@ -280,12 +280,12 @@ export default {
async checkReport() {
let componentRef = this.$refs[`ref-${this.componentName}`],
{ templateData, templateType, currentDate } = this
if (templateType != 1) {
if (!componentRef.isToday) return false
} else {
let lastDay = dayjs().subtract(7, 'day')
// if (templateType != 1) {
// if (!componentRef.isToday) return false
// } else {
let lastDay = dayjs().subtract(30, 'day')
if (!lastDay.isBefore(dayjs(currentDate), 'day')) return false
}
// }
return templateData.length ? componentRef.saveBtnStatus : false
},
......@@ -376,14 +376,14 @@ export default {
})
this.templateData = templateData
} else {
if (this.templateType == 1) {
let lastDay = dayjs().subtract(7, 'day')
// if (this.templateType == 1) {
let lastDay = dayjs().subtract(30, 'day')
if (lastDay.isBefore(dayjs(currentDate), 'day')) this.getDailyTemplate()
else uni.hideLoading()
} else {
if (nowDate == currentDate) this.getDailyTemplate()
else uni.hideLoading()
}
// } else {
// if (nowDate == currentDate) this.getDailyTemplate()
// else uni.hideLoading()
// }
}
} catch (error) {
......
......@@ -22,7 +22,7 @@ export default {
computed: {
/**可编辑日期 */
editableDate() {
let lastDay = dayjs().subtract(7, 'day'),
let lastDay = dayjs().subtract(30, 'day'),
{ currentDate } = this
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!