zjxpcyc 6 년 전
부모
커밋
154a9a7094
3개의 변경된 파일9개의 추가작업 그리고 68개의 파일을 삭제
  1. 4
    9
      src/pages/system/library/books/detail.vue
  2. 1
    1
      src/pages/system/library/books/list.vue
  3. 4
    58
      src/store/library/index.js

+ 4
- 9
src/pages/system/library/books/detail.vue 파일 보기

135
   watch: {
135
   watch: {
136
     detail: {
136
     detail: {
137
       handler (nv, ov) {
137
       handler (nv, ov) {
138
-        console.log(nv)
139
         if (nv.BookId === this.formData.BookId) {
138
         if (nv.BookId === this.formData.BookId) {
140
           return
139
           return
141
         }
140
         }
142
 
141
 
142
+        if (!this.$route.params.id) {
143
+          return
144
+        }
145
+
143
         let CaseId = nv.CaseId
146
         let CaseId = nv.CaseId
144
         if (!CaseId) {
147
         if (!CaseId) {
145
           CaseId = this.defaultCase
148
           CaseId = this.defaultCase
146
         }
149
         }
147
 
150
 
148
         this.formData = { ...nv, CaseId }
151
         this.formData = { ...nv, CaseId }
149
-        // this.mergeDetail(nv)
150
       },
152
       },
151
       immediate: true,
153
       immediate: true,
152
     },
154
     },
153
-    // formData: {
154
-    //   handler (nv) {
155
-    //     console.log('----------', nv)
156
-    //     this.bookImg = nv.BookImg
157
-    //   },
158
-    //   deep: true,
159
-    // },
160
   },
155
   },
161
   methods: {
156
   methods: {
162
     ...mapMutations({
157
     ...mapMutations({

+ 1
- 1
src/pages/system/library/books/list.vue 파일 보기

90
       width="50%">
90
       width="50%">
91
       <div :style="{ margin: 'auto', width: '80%' }">
91
       <div :style="{ margin: 'auto', width: '80%' }">
92
         <div><el-button @click="inputRef.click()" :style="{ width: '100%' }">上传文件</el-button></div>
92
         <div><el-button @click="inputRef.click()" :style="{ width: '100%' }">上传文件</el-button></div>
93
-        <div><el-button type="text" size="medium" :style="{ float: 'right' }">下载导入模板</el-button></div>
93
+        <div :style="{ textAlign: 'right', paddingTop: '20px' }"><a href="https://jinchengjiaye.oss-cn-beijing.aliyuncs.com/excel/books-batch-import.xlsx" download="书籍导入模板" :style="{ color: '#409EFF' }">下载导入模板</a></div>
94
       </div>
94
       </div>
95
       <span slot="footer" class="dialog-footer">
95
       <span slot="footer" class="dialog-footer">
96
         <el-button type="primary" @click="showDialog = false">确 定</el-button>
96
         <el-button type="primary" @click="showDialog = false">确 定</el-button>

+ 4
- 58
src/store/library/index.js 파일 보기

7
   state: {
7
   state: {
8
     page: 0,
8
     page: 0,
9
     pagenum: 0,
9
     pagenum: 0,
10
-    list: [
11
-      {
12
-        BookId: '1',
13
-        BookTypeId: '1',
14
-        BookName: '遮天',
15
-        BookBarcode: '123456',
16
-        BookImg: 'http://jingcheng-resourceplat.oss-cn-shanghai.aliyuncs.com/upload/135230460466.png',
17
-        Author: '辰东',
18
-        Publisher: '南京出版社',
19
-        Price: 90.00,
20
-        InStock: 10,
21
-        LeftNum: 2,
22
-        BorrowNum: 5,
23
-        BorrowDays: 7,
24
-        BookDescription: '《遮天》是一部古典仙侠类型的网络小说',
25
-        CaseId: '1',
26
-        OrgId: '1',
27
-        CreateDate: new Date(),
28
-        IsRecommend: 1,
29
-        Status: 1,
30
-      },
31
-    ],
10
+    list: [],
32
     detail: {},
11
     detail: {},
33
     type: {
12
     type: {
34
       page: 0,
13
       page: 0,
35
       pagenum: 0,
14
       pagenum: 0,
36
-      list: [
37
-        {
38
-          BookTypeId: '1',
39
-          BookTypeName: '测试',
40
-          BookTypeImg: 'http://jingcheng-resourceplat.oss-cn-shanghai.aliyuncs.com/upload/135230460466.png',
41
-          CaseId: '1',
42
-          OrgId: '1',
43
-          Nums: 100,
44
-          Status: 1,
45
-          CreateDate: new Date()
46
-        }
47
-      ],
48
-      detail: {
49
-        BookTypeId: '',
50
-        BookTypeName: '',
51
-        BookTypeImg: '',
52
-        CaseId: '',
53
-        OrgId: '1',
54
-        Status: 1,
55
-        CreateDate: new Date()
56
-      },
15
+      list: [],
16
+      detail: {},
57
     },
17
     },
58
     stock: {
18
     stock: {
59
       page: 0,
19
       page: 0,
60
       pagenum: 0,
20
       pagenum: 0,
61
-      list: [
62
-        {
63
-          RecordId: '1',
64
-          BookId: '1',
65
-          InStockTotal: 20,
66
-          InStockBefore: 8,
67
-          InStockAfter: 10,
68
-          ChangeReason: '补库存',
69
-          ChangeDate: new Date(),
70
-          ChangeUser: '1',
71
-          ChangeUserName: 'admin',
72
-          CaseId: '1',
73
-          OrgId: '1',
74
-        }
75
-      ],
21
+      list: [],
76
       detail: {},
22
       detail: {},
77
     },
23
     },
78
     borrow: {
24
     borrow: {