Browse Source

fix: change textbookPopManager

DESKTOP-USV654P\pc 3 weeks ago
parent
commit
ac50c802ad

+ 1 - 1
Makefile

@@ -12,7 +12,7 @@ build:
 
 commit:
 	git add . && \
-	git commit --no-verify -m "fix: change schoolOpens record"
+	git commit --no-verify -m "fix: change textbookPopManager"
 
 checkPre:
 	git checkout pre

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

@@ -62,7 +62,7 @@ export const tableColumns: BasicColumn[] = [
     width: 120,
   },
   {
-    title: '学生来源',
+    title: '学生类别',
     dataIndex: 'studentTypeCn',
     align: 'left',
   },

+ 200 - 141
src/views/teachingManager/textbookPopManager/components/data.config.ts

@@ -2,43 +2,33 @@ import { BasicColumn, FormSchema } from '/@/components/Table';
 import { requestMagicApi } from '/@/api/magicApi';
 import { getDataOption } from '/@/api/system/dic';
 import { getSubjectGroupInfo } from '/@/services/apis/SubjectGroupController';
-import { getMajorSetOption } from '/@/api/userMagic';
 export const type = {
   0: '菜单',
   1: '目录',
 };
 export const TableColumns: BasicColumn[] = [
   {
-    title: '出库方式',
-    dataIndex: 'issueModeCn',
-    width: 80,
+    title: '学期',
+    dataIndex: 'baseSemesterIdCn',
+    width: 120,
     align: 'left',
-    customRender: ({ text }) => {
-      return text ? text : '/';
-    },
   },
   {
-    title: '出库时间',
-    dataIndex: 'createDate',
-    width: 150,
+    title: '出库单号',
+    dataIndex: 'orderNumber',
+    width: 120,
     align: 'left',
-    customRender: ({ text }) => {
-      return text ? text : '/';
-    },
   },
   {
-    title: '出库数量',
-    dataIndex: 'issueNumber',
-    width: 80,
+    title: '关联入库单号',
+    dataIndex: 'warehouseOrderNumber',
+    width: 120,
     align: 'left',
-    customRender: ({ text }) => {
-      return text ? text : '/';
-    },
   },
   {
-    title: '领取人员',
-    dataIndex: 'claimUser',
-    width: 100,
+    title: '出库类型',
+    dataIndex: 'issueModeCn',
+    width: 80,
     align: 'left',
     customRender: ({ text }) => {
       return text ? text : '/';
@@ -79,27 +69,28 @@ export const TableColumns: BasicColumn[] = [
       return text ? text : '/';
     },
   },
+
   {
-    title: '学科组',
-    dataIndex: 'groupName',
+    title: '规划教材',
     width: 100,
     align: 'left',
+    dataIndex: 'isTextbookPlan',
     customRender: ({ text }) => {
-      return text ? text : '/';
+      return text === 1 ? '是' : '否';
     },
   },
   {
-    title: '使用学期',
-    dataIndex: 'baseSemesterIdCn',
-    width: 120,
+    title: '教材分类',
+    dataIndex: 'textbookTypeCn',
+    width: 100,
     align: 'left',
     customRender: ({ text }) => {
       return text ? text : '/';
     },
   },
   {
-    title: '使用班级',
-    dataIndex: 'className',
+    title: '对应课程',
+    dataIndex: 'courseName',
     width: 100,
     align: 'left',
     customRender: ({ text }) => {
@@ -107,8 +98,8 @@ export const TableColumns: BasicColumn[] = [
     },
   },
   {
-    title: '对应课程',
-    dataIndex: 'courseName',
+    title: '学科组',
+    dataIndex: 'groupName',
     width: 100,
     align: 'left',
     customRender: ({ text }) => {
@@ -116,31 +107,87 @@ export const TableColumns: BasicColumn[] = [
     },
   },
   {
-    title: '规划教材',
-    dataIndex: 'isTextbookPlanCn',
+    title: '使用时长',
+    dataIndex: 'useType',
     width: 100,
     align: 'left',
-    customRender: ({ text }) => {
-      return text ? text : '/';
+    customRender: ({ record }) => {
+      return record.useType ? record.useType + '学期' : '';
     },
   },
   {
-    title: '类型',
-    dataIndex: 'textbookTypeCn',
+    title: '定价(元)',
+    dataIndex: 'price',
     width: 100,
     align: 'left',
-    customRender: ({ text }) => {
-      return text ? text : '/';
-    },
   },
   {
-    title: '规则型号',
-    dataIndex: 'specificationsModels',
+    title: '小计(元)',
+    dataIndex: 'subtotal',
+    width: 100,
+    align: 'left',
+  },
+
+  {
+    title: '出库时间',
+    dataIndex: 'createDate',
+    width: 150,
+    align: 'left',
+  },
+  {
+    title: '领取类型',
+    dataIndex: 'warehouseModeCn',
+    width: 150,
+    align: 'left',
+  },
+  {
+    title: '领取人员',
+    dataIndex: 'claimUser',
+    width: 100,
+    align: 'left',
+  },
+  {
+    title: '年级',
+    dataIndex: 'gradeIdCn',
+    width: 100,
+    align: 'left',
+  },
+  {
+    title: '班级',
+    dataIndex: 'classIdCn',
+    width: 100,
+    align: 'left',
+  },
+  {
+    title: '出库人员',
+    dataIndex: 'issueName',
+    width: 100,
+    align: 'left',
+  },
+
+  {
+    title: '出库数量',
+    dataIndex: 'issueNumber',
+    width: 80,
+    align: 'left',
+  },
+  {
+    title: '退书数量',
+    dataIndex: 'recedeNumber',
+    width: 100,
+    align: 'left',
+  },
+  {
+    title: '实际出库数量',
+    dataIndex: 'actualIssueNumber',
+    width: 100,
+    align: 'left',
+  },
+  {
+    title: '金额(元)',
+    dataIndex: 'amount',
     width: 100,
     align: 'left',
-    customRender: ({ text }) => {
-      return text ? text : '/';
-    },
   },
 ];
 export const Eumns = {
@@ -219,123 +266,90 @@ export const formSchema: FormSchema[] = [
 ];
 export const searchFormSchema: FormSchema[] = [
   {
-    label: '教材类型',
-    field: 'textbookType',
+    label: '学期',
+    field: 'baseSemesterId',
     component: 'ApiSelect',
     componentProps: {
       getPopupContainer: () => document.body,
-      api: getDataOption,
-      params: { code: 'textbook_type' },
+      api: requestMagicApi,
+      params: { url: 'baseData/semester/option' },
     },
-    colProps: { span: 6 },
+    colProps: { span: 8 },
   },
   {
-    label: '学期',
-    field: 'baseSemesterId',
+    label: '出库单号',
+    field: 'orderNumber',
+    component: 'Input',
+    colProps: { span: 8 },
+  },
+  {
+    label: '出库类型',
+    field: 'issueMode',
     component: 'ApiSelect',
     componentProps: {
       getPopupContainer: () => document.body,
-      api: requestMagicApi,
-      params: { url: 'baseData/semester/option' },
+      api: getDataOption,
+      params: { code: 'issue_mode' },
     },
-    colProps: { span: 6 },
+    colProps: { span: 8 },
   },
   {
-    label: '学科组',
-    field: 'subjectGroupId',
+    label: '教材类型',
+    field: 'textbookType',
     component: 'ApiSelect',
     componentProps: {
       getPopupContainer: () => document.body,
-      api: requestMagicApi,
-      params: { url: '/educational/subjectGroup/list' },
+      api: getDataOption,
+      params: { code: 'textbook_type' },
     },
-    colProps: { span: 6 },
+    colProps: { span: 8 },
   },
   {
     label: '书号',
     field: 'issn',
     component: 'Input',
-    colProps: { span: 6 },
+    colProps: { span: 8 },
   },
   {
     label: '书名',
     field: 'bookName',
     component: 'Input',
-    colProps: { span: 6 },
+    colProps: { span: 8 },
+  },
+  {
+    label: '所属学科组',
+    field: 'groupName',
+    component: 'Input',
+    colProps: { span: 8 },
   },
 
   // {
-  //   label: '出版社名称',
-  //   field: 'publishingHouse',
-  //   component: 'Input',
-  //   colProps: { span: 6 },
-  // },
-  // {
-  //   field: 'majorSetId',
-  //   label: '专业方向',
+  //   label: '学科组',
+  //   field: 'subjectGroupId',
   //   component: 'ApiSelect',
-  //   componentProps: ({}) => {
-  //     return {
-  //       getPopupContainer: () => document.body,
-  //       api: getMajorSetOption,
-  //     };
+  //   componentProps: {
+  //     getPopupContainer: () => document.body,
+  //     api: requestMagicApi,
+  //     params: { url: '/educational/subjectGroup/list' },
   //   },
   //   colProps: { span: 6 },
   // },
-  // {
-  //   label: '作者(主编)',
-  //   field: 'editorInChief',
-  //   component: 'Input',
-  //   colProps: { span: 6 },
-  // },
   {
-    label: '规划教材',
-    field: 'isTextbookPlan',
+    label: '年级',
+    field: 'gradeId',
     component: 'ApiSelect',
     componentProps: {
       getPopupContainer: () => document.body,
-      api: getDataOption,
-      params: { code: 'judgment_method_1' },
-    },
-    colProps: { span: 6 },
-  },
-
-  {
-    label: '对应课程',
-    field: 'courseSubjectId',
-    component: 'ApiSelect',
-    componentProps: ({ formModel }) => {
-      return {
-        getPopupContainer: () => document.body,
-        api: async () => {
-          if (!formModel.subjectGroupId) {
-            return [];
-          }
-          const data = await getSubjectGroupInfo({ id: formModel.subjectGroupId });
-          return data.subjectGroupCourseList.map((item) => {
-            return {
-              label: item.courseSubjectIdCN,
-              value: item.courseSubjectId,
-            };
-          });
-        },
-        showSearch: true,
-        // 搜索参考
-        filterOption: (input, option) => {
-          return (
-            option?.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 ||
-            option?.value.toLowerCase().indexOf(input.toLowerCase()) >= 0
-          );
-        },
-      };
+      api: requestMagicApi,
+      params: { url: '/baseData/grade/option' },
     },
-    colProps: { span: 6 },
+    colProps: { span: 8 },
   },
   {
     label: '使用班级',
     field: 'classId',
     component: 'ApiSelect',
-    componentProps: ({ formModel }) => {
+    componentProps: () => {
       return {
         getPopupContainer: () => document.body,
         api: requestMagicApi,
@@ -351,34 +365,79 @@ export const searchFormSchema: FormSchema[] = [
         },
       };
     },
-    colProps: { span: 6 },
+    colProps: { span: 8 },
   },
   {
-    label: '作业本类型',
-    field: 'textBookType',
-    component: 'ApiSelect',
+    label: '出库时间',
+    field: '[startCreateDate,endCreateDate]',
+    component: 'RangePicker',
+    colProps: { span: 8 },
     componentProps: {
       getPopupContainer: () => document.body,
-      api: getDataOption,
-      params: { code: 'exercise_book_type' },
+      placeholder: ['开始时间', '结束时间'],
+      format: 'YYYY-MM-DD HH:mm:ss',
+      showTime: { format: 'HH:mm:ss' },
     },
-    colProps: { span: 6 },
   },
   {
-    label: '规格型号',
-    field: 'specificationsModels',
+    label: '领取类型',
+    field: 'warehouseMode',
+    component: 'Select',
+    componentProps: {
+      getPopupContainer: () => document.body,
+      options: [
+        { label: '学生领取', value: '0' },
+        { label: '教师领取', value: '1' },
+      ],
+    },
+    colProps: { span: 8 },
+  },
+  {
+    label: '领取人员',
+    field: 'claimUser',
     component: 'Input',
-    colProps: { span: 6 },
+    colProps: { span: 8 },
+  },
+  {
+    label: '出库人员',
+    field: 'issueName',
+    component: 'Input',
+    colProps: { span: 8 },
+  },
+  {
+    label: '退书状态',
+    field: 'returnState',
+    component: 'Select',
+    colProps: { span: 8 },
+    componentProps: {
+      getPopupContainer: () => document.body,
+      options: [
+        { label: '有退书', value: 1 },
+        { label: '无退书', value: 0 },
+      ],
+    },
+  },
+  {
+    label: '使用时长',
+    field: 'useType',
+    component: 'Select',
+    colProps: { span: 8 },
+    componentProps: {
+      getPopupContainer: () => document.body,
+      options: [
+        { label: '一学期', value: 1 },
+        { label: '二学期', value: 2 },
+        { label: '三学期', value: 3 },
+        { label: '四学期', value: 4 },
+        { label: '五学期', value: 5 },
+        { label: '六学期', value: 6 },
+      ],
+    },
+  },
+  {
+    label: '关联入库单号',
+    field: 'warehouseOrderNumber',
+    component: 'Input',
+    colProps: { span: 8 },
   },
-  // {
-  //   label: '使用年级',
-  //   field: 'gradeId',
-  //   component: 'ApiSelect',
-  //   componentProps: {
-  //     getPopupContainer: () => document.body,
-  //     api: requestMagicApi,
-  //     params: { url: '/baseData/grade/option' },
-  //   },
-  //   colProps: { span: 6 },
-  // },
 ];