diff --git a/admin/components.d.ts b/admin/components.d.ts index cea83097..04e73a8d 100644 --- a/admin/components.d.ts +++ b/admin/components.d.ts @@ -33,6 +33,7 @@ declare module '@vue/runtime-core' { ElDescriptions: typeof import('element-plus/es')['ElDescriptions'] ElDescriptionsItem: typeof import('element-plus/es')['ElDescriptionsItem'] ElDialog: typeof import('element-plus/es')['ElDialog'] + ElDivider: typeof import('element-plus/es')['ElDivider'] ElDrawer: typeof import('element-plus/es')['ElDrawer'] ElDropdown: typeof import('element-plus/es')['ElDropdown'] ElDropdownItem: typeof import('element-plus/es')['ElDropdownItem'] diff --git a/admin/src/addon/zhjw/api/contracts.ts b/admin/src/addon/zhjw/api/contracts.ts index 85b7d70e..92286fc0 100644 --- a/admin/src/addon/zhjw/api/contracts.ts +++ b/admin/src/addon/zhjw/api/contracts.ts @@ -63,4 +63,8 @@ export function getWithStudentsList(params: Record){ return request.get('zhjw/students_all', {params}) } +export function getWithCoursesList(params: Record){ + return request.get('zhjw/courses_all', {params}) +} + // USER_CODE_END -- zhjw_contracts diff --git a/admin/src/addon/zhjw/api/orders.ts b/admin/src/addon/zhjw/api/orders.ts index e507b181..91bdf9d7 100644 --- a/admin/src/addon/zhjw/api/orders.ts +++ b/admin/src/addon/zhjw/api/orders.ts @@ -53,8 +53,12 @@ export function deleteOrders(id: number) { export function getWithStudentsList(params: Record){ return request.get('zhjw/students_all', {params}) -}export function getWithContractsList(params: Record){ +} +export function getWithContractsList(params: Record){ return request.get('zhjw/contracts_all', {params}) } +export function getWithCoursesList(params: Record){ + return request.get('zhjw/courses_all', {params}) +} // USER_CODE_END -- zhjw_orders diff --git a/admin/src/addon/zhjw/api/timetables.ts b/admin/src/addon/zhjw/api/timetables.ts index 14151260..3d98d1fb 100644 --- a/admin/src/addon/zhjw/api/timetables.ts +++ b/admin/src/addon/zhjw/api/timetables.ts @@ -66,7 +66,8 @@ export function deleteTimetables(id: number) { export function getWithClassesList(params: Record){ return request.get('zhjw/classes_all', {params}) -}export function getWithCoursesList(params: Record){ +} +export function getWithCoursesList(params: Record){ return request.get('zhjw/courses_all', {params}) } diff --git a/admin/src/addon/zhjw/views/contracts/contracts_edit.vue b/admin/src/addon/zhjw/views/contracts/contracts_edit.vue index 40b2f8b8..9a95dd5c 100644 --- a/admin/src/addon/zhjw/views/contracts/contracts_edit.vue +++ b/admin/src/addon/zhjw/views/contracts/contracts_edit.vue @@ -21,6 +21,18 @@ /> + + + + + + + @@ -81,7 +93,7 @@ import { ref, reactive, computed, watch } from 'vue' import { t } from '@/lang' import { useDictionary } from '@/app/api/dict' import type { FormInstance } from 'element-plus' -import { getContractsInfo,addContracts,editContracts, getWithStudentsList } from '@/addon/zhjw/api/contracts'; +import { getContractsInfo,addContracts,editContracts, getWithStudentsList,getWithCoursesList } from '@/addon/zhjw/api/contracts'; import { useRoute } from 'vue-router' const route = useRoute() @@ -97,6 +109,7 @@ const pageName = route.meta.title const initialFormData = { id: 0, student_id: '', + courses_id:'', title: '', content: '', file_data: '', @@ -139,6 +152,12 @@ const selectData = ref([]) studentIdList.value = await (await getWithStudentsList({})).data } setStudentIdList() + + const coursesIdList = ref([] as any[]) + const setCoursesIdList = async () => { + coursesIdList.value = await (await getWithCoursesList({})).data + } + setCoursesIdList() // 表单验证规则 const formRules = computed(() => { return { diff --git a/admin/src/addon/zhjw/views/orders/orders_edit.vue b/admin/src/addon/zhjw/views/orders/orders_edit.vue index 8bcd4364..ac509648 100644 --- a/admin/src/addon/zhjw/views/orders/orders_edit.vue +++ b/admin/src/addon/zhjw/views/orders/orders_edit.vue @@ -21,6 +21,24 @@ /> + + + + + + + + + + + + @@ -100,7 +118,7 @@ import { ref, reactive, computed, watch } from 'vue' import { t } from '@/lang' import { useDictionary } from '@/app/api/dict' import type { FormInstance } from 'element-plus' -import { getOrdersInfo,addOrders,editOrders, getWithStudentsList, getWithContractsList } from '@/addon/zhjw/api/orders'; +import { getOrdersInfo,addOrders,editOrders, getWithStudentsList, getWithContractsList,getWithCoursesList } from '@/addon/zhjw/api/orders'; import { useRoute } from 'vue-router' const route = useRoute() @@ -116,6 +134,8 @@ const pageName = route.meta.title const initialFormData = { id: 0, student_id: '', + courses_id:'', + courses_num:1, contract_id: '', amount: '', order_type: '', @@ -167,7 +187,7 @@ const selectData = ref([]) const studentIdList = ref([] as any[]) const setStudentIdList = async () => { - studentIdList.value = await (await getWithStudentsList({})).data + studentIdList.value = await (await getWithStudentsList({})).data } setStudentIdList() const contractIdList = ref([] as any[]) @@ -175,6 +195,14 @@ const selectData = ref([]) contractIdList.value = await (await getWithContractsList({})).data } setContractIdList() + + + const coursesIdList = ref([] as any[]) + const setCoursesIdList = async () => { + coursesIdList.value = await (await getWithCoursesList({})).data + } + setCoursesIdList() + // 表单验证规则 const formRules = computed(() => { return { @@ -183,6 +211,11 @@ const formRules = computed(() => { ] , +courses_id: [ + { required: true, message: "请选择课程", trigger: 'blur' }, + + ] +, contract_id: [ { required: true, message: t('contractIdPlaceholder'), trigger: 'blur' }, diff --git a/admin/src/addon/zhjw/views/timetables/timetables_edit.vue b/admin/src/addon/zhjw/views/timetables/timetables_edit.vue index 115ca03a..7f34a77c 100644 --- a/admin/src/addon/zhjw/views/timetables/timetables_edit.vue +++ b/admin/src/addon/zhjw/views/timetables/timetables_edit.vue @@ -83,30 +83,31 @@ - - - - - - - - - - - + 排班详情 + +
+ + + + + + + + + + + + + + + + 删除 + +
+ + 新增排班 - - -