Commit a81630cd by 李伟康

```

feat(usedCar): 添加日报组件引用并优化日期切换逻辑

为日报组件添加 ref 引用以便获取组件实例数据
优化日期切换逻辑,支持根据日报填写状态判断是否允许手动切换日期
当日报未填写且在7天内时,弹出确认框再进行日期切换
```
1 parent ede96c73
...@@ -44,6 +44,7 @@ ...@@ -44,6 +44,7 @@
</view> </view>
<view class="detail-right"> <view class="detail-right">
<component <component
:ref="`detail-${toolComponentName}-Ref`"
:is="toolComponentName" :is="toolComponentName"
@jump="jump" @jump="jump"
:transmission-of-data="transmissionOfData" :transmission-of-data="transmissionOfData"
...@@ -165,6 +166,14 @@ export default { ...@@ -165,6 +166,14 @@ export default {
} }
}, },
changeDate (e) { changeDate (e) {
let dailyReportRef = this.$refs['detail-DailyReport-Ref']
if(dailyReportRef){
let { isDateWithin7Days , orderObj , isFilled} = dailyReportRef
if((!isDateWithin7Days && !orderObj.id )|| isFilled) {
this.$refs.calendar.manualChangeDate(e)
return
}
}
this.openNotice(null, false, _ => { this.openNotice(null, false, _ => {
this.$refs.calendar.manualChangeDate(e) this.$refs.calendar.manualChangeDate(e)
}) })
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!