Browse Source

fix: change textbook textbookSubscription

DESKTOP-USV654P\pc 1 month ago
parent
commit
6a7a0e4224

+ 3 - 0
src/services/apis/StudentReportPlanController.ts

@@ -32,4 +32,7 @@ export async function getStudentReportPlanInfo(params:any,mode: ErrorMessageMode
 /** 学生报到计划列表(分页) GET /student/studentReportPlan/page */
 export async function getStudentReportPlanPage(params:any,mode: ErrorMessageMode = 'modal'){ return defHttp.get<API.PageOutput<API.StudentReportPlanPageVo>>
         ({url: '/student/studentReportPlan/page', params:params},{errorMessageMode:mode});}
+/** 学期计划树 GET /student/studentReportPlan/tree */
+export async function getStudentReportPlanTree(params:any,mode: ErrorMessageMode = 'modal'){ return defHttp.get<API.StudentReportPlanTreeVo[]>
+        ({url: '/student/studentReportPlan/tree', params:params},{errorMessageMode:mode});}
             

+ 5 - 1
src/services/apis/TextbookSubscriptionController.ts

@@ -22,6 +22,10 @@ export async function putTextbookTextbookSubscription(params:API.UpdateTextbookS
 /** 删除教材教辅征订记录表 DELETE /textbook/textbookSubscription */
 export async function deleteTextbookTextbookSubscription(params:string[],mode: ErrorMessageMode = 'modal'){ return defHttp.delete<any>
         ({url: '/textbook/textbookSubscription', data:params},{errorMessageMode:mode});}
+/** 变更 PUT /textbook/textbookSubscription/alteration */
+export async function putTextbookSubscriptionAlteration(params:API.UpdateWfTextbookSubscriptionItemDto
+,mode: ErrorMessageMode = 'modal'){ return defHttp.put<any>
+        ({url: '/textbook/textbookSubscription/alteration', data:params},{errorMessageMode:mode});}
 /** 征订班级列表(分页) GET /textbook/textbookSubscription/baseclass-page */
 export async function getTextbookSubscriptionBaseclassPage(params:any,mode: ErrorMessageMode = 'modal'){ return defHttp.get<API.PageOutput<API.BaseclassPageVo>>
         ({url: '/textbook/textbookSubscription/baseclass-page', params:params},{errorMessageMode:mode});}
@@ -38,7 +42,7 @@ export async function getTextbookSubscriptionEveryInstockroomList(params:any,mod
 /** 导出 GET /textbook/textbookSubscription/export */
 export async function getTextbookSubscriptionExport(params:any,mode: ErrorMessageMode = 'modal'){ return defHttp.download<any>
         ({url: '/textbook/textbookSubscription/export',responseType:'blob', params:params},{errorMessageMode:mode});}
-/** 教材教辅征订历史列表(分页) GET /textbook/textbookSubscription/history-list */
+/** 教材教辅征订历史列表(分页) GET /textbook/textbookSubscription/history-list */
 export async function getTextbookSubscriptionHistoryList(params:any,mode: ErrorMessageMode = 'modal'){ return defHttp.get<API.TextbookSubscriptionHistoryListVo[]>
         ({url: '/textbook/textbookSubscription/history-list', params:params},{errorMessageMode:mode});}
 /** 导入 POST /textbook/textbookSubscription/import */

+ 24 - 1
src/services/typing.d.ts

@@ -3764,6 +3764,8 @@ textbookSubscriptionItemList?: AddTextbookSubscriptionItemDto[];
 type AddTextbookSubscriptionItemDto = {
 /** 变更类型(0:未变更,1:学生用书征订数量,2:教师用书征订数量,3:变更课程,) */
 alterationType?: number;
+/** 按班级征订征订的班级主键(base_class) */
+baseClassIds?: string;
 /** 实际折扣 */
 discount?: number;
 /** 当前征订任务征订项入库数量 */
@@ -17190,6 +17192,8 @@ userId?: string;
 type StudentReportPlanClassRelationVo = {
 /** 班级id */
 classId?: string;
+/** 班级名称 */
+className?: string;
 /** 主键 */
 id?: string;
 /** 计划id */
@@ -17200,7 +17204,7 @@ type StudentReportPlanPageVo = {
 /** 创建时间 */
 createDate?: string;
 /** 创建人 */
-createUserId?: string;
+createUserName?: string;
 /** 删除标记(0:未删除 1:已删除) */
 deleteMark?: any;
 /** 有效标记(0:未启用 1:已启用) */
@@ -17217,6 +17221,8 @@ modifyUserId?: string;
 name?: string;
 /** 学期id(base_semester) */
 semesterId?: string;
+/** 所属学期 */
+semesterName?: string;
 /** 报到开始时间 */
 startTime?: string;
 /** 状态(0:草稿 1:进行中 2:已结束) */
@@ -17234,6 +17240,19 @@ id?: string;
 status?: number;
 }
 
+type StudentReportPlanTreeVo = {
+/** children */
+children?: StudentReportPlanTreeVo[];
+/** id */
+id?: string;
+/** name */
+name?: string;
+/** disabled */
+parentId?: string;
+/** 状态(1:进行中,2:已结束) */
+status?: number;
+}
+
 type StudentReportPlanVo = {
 /** 报到结束时间 */
 endTime?: string;
@@ -18510,6 +18529,8 @@ textbookSubscriptionId?: string;
 textbookType?: string;
 /** 教材分类(xjr_dictionary_item[textbook_type]) */
 textbookTypeCn?: string;
+/** 在本次征订中本征订项的教材使用的班级数量 */
+useClassNum?: number;
 }
 
 type TextbookSubscriptionItemVo = {
@@ -18595,6 +18616,8 @@ textbookId?: string;
 textbookType?: string;
 /** 教材类型(xjr_dictionary_item[textbook_type]) */
 textbookTypeCn?: string;
+/** 在本次征订中本征订项的教材使用的班级数量 */
+useClassNum?: number;
 /** 使用类型(单位:学期) */
 useType?: number;
 /** 版本 */

+ 11 - 15
src/views/educational/textbookSubscription/components/changeTextBook.vue

@@ -8,22 +8,21 @@
   import { Modal } from 'ant-design-vue';
   import { getTextbookPage } from '/@/services/apis/TextbookController';
   import { getDataOption } from '/@/api/system/dic';
-  import { putWfTextbookSubscriptionAlteration } from '/@/services/apis/WfTextbookSubscriptionController';
   import { useMessage } from '/@/hooks/web/useMessage';
+  import { putTextbookSubscriptionAlteration } from '/@/services/apis/TextbookSubscriptionController';
   const emits = defineEmits(['success', 'register']);
-  const dataSource = ref<any>([]);
   const visible = ref(false);
   const changeType = ref(0);
   const changeId = ref<string>('');
   const rawValue = reactive({
-    studentSubscriptionNumber: 0,
-    teacherSubscriptionNumber: 0,
+    studentNum: 0,
+    teacherNum: 0,
   });
   const [register, { closeModal, setModalProps }] = useModalInner((data) => {
     changeId.value = data.id;
     setTableData([data]);
-    rawValue.studentSubscriptionNumber = data.studentSubscriptionNumber;
-    rawValue.teacherSubscriptionNumber = data.teacherSubscriptionNumber;
+    rawValue.studentNum = data.studentNum;
+    rawValue.teacherNum = data.teacherNum;
   });
   const [selectTableRef, { getSelectRows, clearSelectedRowKeys }] = useTable({
     title: '可选课程信息',
@@ -92,10 +91,7 @@
 
     const value = getDataSource()[0];
     if (changeType.value === 1) {
-      if (
-        rawValue.studentSubscriptionNumber === value.studentSubscriptionNumber &&
-        rawValue.teacherSubscriptionNumber === value.teacherSubscriptionNumber
-      ) {
+      if (rawValue.studentNum === value.studentNum && rawValue.teacherNum === value.teacherNum) {
         return createMessage.warning('您未进行任何变更,请选择变更课程或者变更征订数量后提交');
       }
     }
@@ -108,7 +104,7 @@
       setModalProps({
         confirmLoading: true,
       });
-      await putWfTextbookSubscriptionAlteration(value, 'none');
+      await putTextbookSubscriptionAlteration(value, 'none');
       createMessage.success('变更成功');
       emits('success');
       changeType.value = 0;
@@ -135,24 +131,24 @@
   >
     <a-button type="primary" @click="visible = true">选择变更课程</a-button>
     <BasicTable @register="indexTable">
-      <template #studentSubscriptionNumber="{ record }">
+      <template #studentNum="{ record }">
         <a-input-number
           :default-value="0"
           @change="changeType !== 2 ? (changeType = 1) : null"
           :step="1"
           :min="0"
           placeholder="请输入"
-          v-model:value="record.studentSubscriptionNumber"
+          v-model:value="record.studentNum"
         />
       </template>
-      <template #teacherSubscriptionNumber="{ record }">
+      <template #teacherNum="{ record }">
         <a-input-number
           :default-value="0"
           @change="changeType !== 2 ? (changeType = 1) : null"
           :step="1"
           :min="0"
           placeholder="请输入"
-          v-model:value="record.teacherSubscriptionNumber"
+          v-model:value="record.teacherNum"
         />
       </template>
     </BasicTable>

+ 4 - 4
src/views/educational/textbookSubscription/components/data.config.ts

@@ -427,16 +427,16 @@ export const changeColumns: BasicColumn[] = [
 
   {
     title: '学生用书征订数量',
-    dataIndex: 'studentSubscriptionNumber',
+    dataIndex: 'studentNum',
     slots: {
-      default: 'studentSubscriptionNumber',
+      default: 'studentNum',
     },
   },
   {
     title: '教师用书征订数量',
-    dataIndex: 'teacherSubscriptionNumber',
+    dataIndex: 'teacherNum',
     slots: {
-      default: 'teacherSubscriptionNumber',
+      default: 'teacherNum',
     },
   },
 ];