From d8530dc4347dbde778f33e317a29abab382cac38 Mon Sep 17 00:00:00 2001 From: zeyan <258785420@qq.com> Date: Fri, 4 Jul 2025 14:19:50 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/controller/apiController/Contract.php | 3 +- niucloud/app/model/personnel/Personnel.php | 2 +- .../api/apiService/ContractService.php | 8 +- uniapp/api/apiRoute.js | 5 + uniapp/components/schedule/ScheduleDetail.vue | 586 +++++++----------- uniapp/pages.json | 27 + uniapp/pages/coach/schedule/add_schedule.vue | 474 ++++++++++++++ uniapp/pages/coach/schedule/adjust_course.vue | 497 +++++++++++++++ uniapp/pages/coach/schedule/sign_in.vue | 511 +++++++++++++++ uniapp/pages/coach/student/student_list.vue | 9 +- .../pages/common/contract/contract_sign.vue | 2 +- uniapp/pages/common/contract/my_contract.vue | 6 +- 12 files changed, 1741 insertions(+), 389 deletions(-) create mode 100644 uniapp/pages/coach/schedule/add_schedule.vue create mode 100644 uniapp/pages/coach/schedule/adjust_course.vue create mode 100644 uniapp/pages/coach/schedule/sign_in.vue diff --git a/niucloud/app/api/controller/apiController/Contract.php b/niucloud/app/api/controller/apiController/Contract.php index b84c848d..a9f94487 100644 --- a/niucloud/app/api/controller/apiController/Contract.php +++ b/niucloud/app/api/controller/apiController/Contract.php @@ -66,8 +66,7 @@ class Contract extends BaseApiService } $where = [ - 'contract_id' => $contract_id, - 'personnel_id' => $this->member_id + 'id' => $contract_id ]; try { diff --git a/niucloud/app/model/personnel/Personnel.php b/niucloud/app/model/personnel/Personnel.php index 6eb20c11..93f05811 100644 --- a/niucloud/app/model/personnel/Personnel.php +++ b/niucloud/app/model/personnel/Personnel.php @@ -47,7 +47,7 @@ class Personnel extends BaseModel * 定义软删除标记字段. * @var string */ - protected $deleteTime = 'delete_time'; + protected $deleteTime = 'deleted_at'; /** * 定义软删除字段的默认值. diff --git a/niucloud/app/service/api/apiService/ContractService.php b/niucloud/app/service/api/apiService/ContractService.php index e9098c3b..50ddf160 100644 --- a/niucloud/app/service/api/apiService/ContractService.php +++ b/niucloud/app/service/api/apiService/ContractService.php @@ -101,10 +101,9 @@ class ContractService extends BaseApiService ]; try { - $contract_id = $where['contract_id'] ?? 0; - $personnel_id = $where['personnel_id'] ?? 0; + $id = $where['id'] ?? 0; - if (empty($contract_id) || empty($personnel_id)) { + if (empty($id)) { $res['msg'] = '参数错误'; return $res; } @@ -112,8 +111,7 @@ class ContractService extends BaseApiService // 查询合同签订记录,关联合同表 $contractSign = ContractSign::alias('cs') ->join('school_contract c', 'cs.contract_id = c.id') - ->where('cs.contract_id', $contract_id) - ->where('cs.personnel_id', $personnel_id) + ->where('cs.id', $id) ->where('cs.deleted_at', 0) ->where('c.deleted_at', 0) ->field([ diff --git a/uniapp/api/apiRoute.js b/uniapp/api/apiRoute.js index 4bca4098..a6aa2e46 100644 --- a/uniapp/api/apiRoute.js +++ b/uniapp/api/apiRoute.js @@ -455,4 +455,9 @@ export default { async getCourseScheduleFilterOptions(data = {}) { return await http.get('/courseSchedule/filterOptions', data); }, + + // 提交课程点名 + async submitScheduleSignIn(data = {}) { + return await http.post('/courseSchedule/signIn', data); + }, } \ No newline at end of file diff --git a/uniapp/components/schedule/ScheduleDetail.vue b/uniapp/components/schedule/ScheduleDetail.vue index fdeab7f8..49c07e6b 100644 --- a/uniapp/components/schedule/ScheduleDetail.vue +++ b/uniapp/components/schedule/ScheduleDetail.vue @@ -1,104 +1,89 @@ - \ No newline at end of file diff --git a/uniapp/pages.json b/uniapp/pages.json index 836e81a6..0ddfb6f3 100644 --- a/uniapp/pages.json +++ b/uniapp/pages.json @@ -674,6 +674,33 @@ "navigationBarTextStyle": "white" } }, + { + "path": "pages/coach/schedule/add_schedule", + "style": { + "navigationBarTitleText": "添加课程安排", + "navigationStyle": "custom", + "navigationBarBackgroundColor": "#292929", + "navigationBarTextStyle": "white" + } + }, + { + "path": "pages/coach/schedule/adjust_course", + "style": { + "navigationBarTitleText": "调整课程安排", + "navigationStyle": "custom", + "navigationBarBackgroundColor": "#292929", + "navigationBarTextStyle": "white" + } + }, + { + "path": "pages/coach/schedule/sign_in", + "style": { + "navigationBarTitleText": "课程点名", + "navigationStyle": "custom", + "navigationBarBackgroundColor": "#292929", + "navigationBarTextStyle": "white" + } + }, { "path": "pages/academic/home/index", "style": { diff --git a/uniapp/pages/coach/schedule/add_schedule.vue b/uniapp/pages/coach/schedule/add_schedule.vue new file mode 100644 index 00000000..8f89ce4c --- /dev/null +++ b/uniapp/pages/coach/schedule/add_schedule.vue @@ -0,0 +1,474 @@ + + + + + \ No newline at end of file diff --git a/uniapp/pages/coach/schedule/adjust_course.vue b/uniapp/pages/coach/schedule/adjust_course.vue new file mode 100644 index 00000000..ddb3fcd8 --- /dev/null +++ b/uniapp/pages/coach/schedule/adjust_course.vue @@ -0,0 +1,497 @@ + + + + + \ No newline at end of file diff --git a/uniapp/pages/coach/schedule/sign_in.vue b/uniapp/pages/coach/schedule/sign_in.vue new file mode 100644 index 00000000..6e7e3986 --- /dev/null +++ b/uniapp/pages/coach/schedule/sign_in.vue @@ -0,0 +1,511 @@ + + + + + \ No newline at end of file diff --git a/uniapp/pages/coach/student/student_list.vue b/uniapp/pages/coach/student/student_list.vue index 22bf29b2..14987ff4 100644 --- a/uniapp/pages/coach/student/student_list.vue +++ b/uniapp/pages/coach/student/student_list.vue @@ -1,5 +1,5 @@