Commit 4fd285ef by 李伟康

fix(dailyNewspaper): 修复日报编辑页面按钮显示和状态判断问题

- 使用 template 标签包裹保存和上报按钮,避免条件渲染冲突
- 修复 inject 中 userInfo 和 sceneType 的多余空格问题
- 修正 ReportStatus 状态判断逻辑,从 !== 0 改为 != 1
- 添加样式分隔符提高代码可读性
- 新增 disabled 样式类用于按钮禁用状态显示
1 parent 31a3e163
......@@ -49,8 +49,10 @@
<Footer>
<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>
<template v-else>
<view class="btn default-btn" @click="$emit('saveReport', list)">保存</view>
<view class="btn" @click="$emit('submitReport', list)">上报数据</view>
</template>
</Footer>
</view>
</template>
......@@ -73,7 +75,7 @@ import DailyPopup from '../components/DailyPopup/index.vue'
export default {
name: 'StoreDailyReport',
components: { Table, Nothing, Footer, EditForm, FormItem, DailyPopup },
inject: ['userInfo','sceneType'],
inject: ['userInfo', 'sceneType'],
props: {
templateData: {
type: Array,
......@@ -104,7 +106,7 @@ export default {
},
ReportStatus: {
handler(val) {
this.saveBtn = val !== 0
this.saveBtn = val != 1
},
immediate: true,
deep: true
......@@ -242,6 +244,7 @@ export default {
flex-wrap: wrap;
gap: toRpx(24) toRpx(32);
align-content: start;
.list-item {
width: calc(50% - #{toRpx(16)});
}
......@@ -327,6 +330,7 @@ export default {
}
}
}
.disabled {
opacity: .5;
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!