Pārlūkot izejas kodu

fix: change textbook textbookSubscription

DESKTOP-USV654P\pc 1 mēnesi atpakaļ
vecāks
revīzija
234de580f0

+ 2 - 1
src/views/educational/textbookSubscription/components/changeTextBook.vue

@@ -98,8 +98,9 @@
     if (changeType.value === 2) {
       value.courseSubjectId = value.id;
     }
-    value.id = changeId.value;
+    // value.id = changeId.value;
     value.alterationType = changeType.value;
+    value.textbookSubscriptionItemId = changeId.value;
     try {
       setModalProps({
         confirmLoading: true,

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

@@ -346,9 +346,9 @@ export const historyTableColumns: BasicColumn[] = [
   },
   {
     title: '使用班级数量',
-    dataIndex: 'classNum',
+    dataIndex: 'useClassNum',
     width: 150,
-    slots: { default: 'classNum' },
+    slots: { default: 'useClassNum' },
   },
   {
     title: '操作',

+ 2 - 1
src/views/educational/textbookSubscription/components/edit.vue

@@ -25,7 +25,7 @@
   const dataInfo = ref<any>({});
   const selectUserList = ref<any>([]);
   const isUpdate = ref(true);
-  const modelRef = ref({});
+  const modelRef = ref<Recordable>({});
 
   const [addReg, { openModal: addModelOpen }] = useModal();
   const [historyViewReg, { openModal: historyViewOpen }] = useModal();
@@ -211,6 +211,7 @@
     const data = await getTextbookListSubscription({
       classIds: ids.join(','),
       baseSemesterId: dataInfo.value.baseSemesterId,
+      textbookSubscriptionId: modelRef.value.id,
     });
 
     data.forEach((item: any) => {

+ 2 - 2
src/views/educational/textbookSubscription/components/historyView.vue

@@ -3,8 +3,8 @@
   import BasicModal from '/@/components/Modal/src/BasicModal.vue';
   import BasicTable from '/@/components/Table/src/BasicTable.vue';
   import { useModalInner } from '/@/components/Modal';
-  import { getWfTextbookSubscriptionHistoryList } from '/@/services/apis/WfTextbookSubscriptionController';
   import { reactive } from 'vue';
+  import { getTextbookSubscriptionHistoryList } from '/@/services/apis/TextbookSubscriptionController';
   const searchForm = reactive({
     baseSemesterId: '',
     textbookId: '',
@@ -16,7 +16,7 @@
   });
   const [tableRegister, { reload }] = useTable({
     rowKey: 'id',
-    api: getWfTextbookSubscriptionHistoryList,
+    api: getTextbookSubscriptionHistoryList,
     immediate: false,
     bordered: true,
     resizeHeightOffset: 200,

+ 4 - 4
src/views/educational/textbookSubscription/components/view.vue

@@ -124,15 +124,15 @@
             变更
           </a-button>
         </template>
-        <template #classNum="{ text, record }">
-          <div @click="handleView({ id: itemId, textbookSubscriptionItemId: record.id })">
+        <template #useClassNum="{ text, record }">
+          <a @click="handleView({ id: itemId, textbookSubscriptionItemId: record.id })">
             {{ text }}
-          </div>
+          </a>
         </template>
       </BasicTable>
     </div>
     <changeTextBookVue @register="changeRef" @success="reloadHistory()" />
-    <changeHistoryVue @register="changeHistoryRef" />
+    <changeHistoryVue @register="changeHistoryRef" @success="reloadHistory" />
     <ClassDetail @register="classDetailRef" />
   </BasicModal>
 </template>

+ 3 - 3
src/views/schoolOpens/record/data.config.ts

@@ -73,7 +73,7 @@ export const tableColumns: BasicColumn[] = [
     width: 80,
   },
   {
-    title: '状态',
+    title: '报到状态',
     dataIndex: 'isReport',
     customRender: ({ record }) => {
       if (!Reflect.has(record, 'pendingStatus')) {
@@ -81,8 +81,8 @@ export const tableColumns: BasicColumn[] = [
       }
       return h(Switch, {
         checked: record.isReport === 1,
-        checkedChildren: '报到',
-        unCheckedChildren: '未报到',
+        // checkedChildren: '报到',
+        // unCheckedChildren: '未报到',
         loading: record.pendingStatus,
         onChange(checked: boolean) {
           record.pendingStatus = true;

+ 2 - 2
src/views/schoolOpens/record/index.vue

@@ -78,8 +78,8 @@
     );
   };
 
-  function handleSelect(data) {
-    searchInfo.studentReportPlanId = data.id;
+  function handleSelect(id) {
+    searchInfo.studentReportPlanId = id;
     reload();
   }
 </script>