Browse Source

feat: 修改教材

DESKTOP-USV654P\pc 8 months ago
parent
commit
768e305e9a

+ 15 - 0
src/views/educational/classLessons/components/edit.vue

@@ -29,6 +29,21 @@
       dataIndex: 'bookName',
       align: 'left',
     },
+    {
+      title: '书号',
+      dataIndex: 'issn',
+      align: 'left',
+    },
+    {
+      title: '作者(主编)',
+      dataIndex: 'editorInChief',
+      align: 'left',
+    },
+    {
+      title: '版次',
+      dataIndex: 'version',
+      align: 'left',
+    },
   ]);
   const [allTable] = useTable({
     title: '可选课程',

+ 13 - 4
src/views/teachingManager/textbookManagement/components/data.config.ts

@@ -183,6 +183,13 @@ export const formSchema: FormSchema[] = [
     required: true,
     colProps: { span: 12 },
   },
+  {
+    label: '版次',
+    field: 'version',
+    component: 'Input',
+    required: true,
+    colProps: { span: 12 },
+  },
   {
     label: '作者(主编)',
     field: 'editorInChief',
@@ -254,6 +261,7 @@ export const formSchema: FormSchema[] = [
     defaultValue: 0,
     required: true,
     colProps: { span: 12 },
+    dynamicDisabled: true,
     componentProps: ({ formModel }) => {
       return {
         min: 0,
@@ -283,13 +291,14 @@ export const formSchema: FormSchema[] = [
           if (e > 10) {
             e = 10;
           }
-          if (formModel.price && formModel.subtotal) {
-            formModel.subtotal = (formModel.price * e).toFixed(2);
-          }
+          formModel.subtotal = (((formModel.price || 0) * e) / 10).toFixed(2);
+          // if (formModel.price && formModel.subtotal) {
+          //   formModel.subtotal = (formModel.price * e).toFixed(2);
+          // }
         },
       };
     },
-    dynamicDisabled: true,
+    // dynamicDisabled: true,
     colProps: { span: 12 },
   },
   {