Browse Source

修改 bug

master
王泽彦 8 months ago
parent
commit
f34d9b3a7d
  1. 8
      niucloud/app/adminapi/controller/communication_records/CommunicationRecords.php
  2. 30
      uniapp/components/study-plan-popup/study-plan-popup.vue

8
niucloud/app/adminapi/controller/communication_records/CommunicationRecords.php

@ -56,12 +56,12 @@ class CommunicationRecords extends BaseAdminController
["resource_type",""], ["resource_type",""],
["communication_type",""], ["communication_type",""],
["communication_result",""], ["communication_result",""],
["communication_time","2025-05-19 13:11:39"], ["communication_time",date('Y-m-d H:i:s')],
["remarks",""], ["remarks",""],
["tag",""], ["tag",""],
]); ]);
$this->validate($data, 'app\validate\communication_records\CommunicationRecords.add'); // $this->validate($data, 'app\validate\communication_records\CommunicationRecords.add');
return (new CommunicationRecordsService())->add($data); return (new CommunicationRecordsService())->add($data);
} }
@ -76,12 +76,12 @@ class CommunicationRecords extends BaseAdminController
["resource_type",""], ["resource_type",""],
["communication_type",""], ["communication_type",""],
["communication_result",""], ["communication_result",""],
["communication_time","2025-05-19 13:11:39"], ["communication_time",date('Y-m-d H:i:s')],
["remarks",""], ["remarks",""],
["tag",""], ["tag",""],
]); ]);
$this->validate($data, 'app\validate\communication_records\CommunicationRecords.edit'); // $this->validate($data, 'app\validate\communication_records\CommunicationRecords.edit');
return (new CommunicationRecordsService())->edit($id, $data); return (new CommunicationRecordsService())->edit($id, $data);
} }

30
uniapp/components/study-plan-popup/study-plan-popup.vue

@ -17,14 +17,22 @@
<view class="form-item"> <view class="form-item">
<view class="form-label">开始日期</view> <view class="form-label">开始日期</view>
<view class="form-input"> <view class="form-input">
<input type="date" v-model="planData.start_date" placeholder="请选择开始日期" /> <picker mode="date" :value="planData.start_date" @change="onStartDateChange">
<view class="picker-display">
{{ planData.start_date || '请选择开始日期' }}
</view>
</picker>
</view> </view>
</view> </view>
<view class="form-item"> <view class="form-item">
<view class="form-label">结束日期</view> <view class="form-label">结束日期</view>
<view class="form-input"> <view class="form-input">
<input type="date" v-model="planData.end_date" placeholder="请选择结束日期" /> <picker mode="date" :value="planData.end_date" @change="onEndDateChange">
<view class="picker-display">
{{ planData.end_date || '请选择结束日期' }}
</view>
</picker>
</view> </view>
</view> </view>
@ -214,6 +222,16 @@ export default {
//
onStartDateChange(e) {
this.planData.start_date = e.detail.value
},
//
onEndDateChange(e) {
this.planData.end_date = e.detail.value
},
// //
onStatusChange(e) { onStatusChange(e) {
this.statusIndex = e.detail.value this.statusIndex = e.detail.value
@ -328,11 +346,9 @@ export default {
padding: 20rpx; padding: 20rpx;
color: #ffffff; color: #ffffff;
font-size: 28rpx; font-size: 28rpx;
min-height: 50rpx;
&:empty::before { display: flex;
content: attr(placeholder); align-items: center;
color: #999999;
}
} }
.popup-footer { .popup-footer {

Loading…
Cancel
Save