Browse Source

Merge branch 'dev' of http://git.ycjcjy.com/SpaceOfCheng/admin into dev

wangfei 6 years ago
parent
commit
8335d68af7

+ 1
- 1
dist/index.html View File

1
-<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link rel=stylesheet href=//at.alicdn.com/t/font_775069_dwqa9wy3lkh.css><link rel="shortcut icon" href=favorite.ico><title>城的空间后台管理系统</title><link href=./static/css/app.a5d4b1edf9c5311f32caf6653108a163.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.59816f74ac1cbe691e41.js></script><script type=text/javascript src=./static/js/vendor.3e23df4c746a989f6ce9.js></script><script type=text/javascript src=./static/js/app.53948ad612ffae35df86.js></script></body></html>
1
+<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link rel=stylesheet href=//at.alicdn.com/t/font_775069_dwqa9wy3lkh.css><link rel="shortcut icon" href=favorite.ico><title>城的空间后台管理系统</title><link href=./static/css/app.f80c3fe4118c7340a231ce0c7032c427.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.59816f74ac1cbe691e41.js></script><script type=text/javascript src=./static/js/vendor.43a7259699a243426e8a.js></script><script type=text/javascript src=./static/js/app.29af7cb07154acceafb6.js></script></body></html>

+ 14
- 14
src/components/tableSearch/index.vue View File

1
 <template>
1
 <template>
2
-  <div class="tableSearch flex-h">
3
-    <div class="flex-item">
4
-      <el-input
5
-        :placeholder="value==undefined ? '请输入内容' : value"
6
-        v-model="key"
7
-        clearable>
8
-      </el-input>
9
-    </div>
10
-    <el-button
11
-        size="mini"
12
-        type="primary" @click="search">搜索</el-button>
13
-  </div>
2
+  <el-form inline label-width="80px" >
3
+    <el-form-item label="姓名">
4
+      <el-input size="small" v-model="name"></el-input>
5
+    </el-form-item>
6
+    <el-form-item label="手机号">
7
+      <el-input size="small" v-model="phone"></el-input>
8
+    </el-form-item>
9
+    <el-form-item>
10
+      <el-button size="small" type="primary" @click="search">搜索</el-button>
11
+    </el-form-item>
12
+  </el-form>
14
 </template>
13
 </template>
15
 
14
 
16
 <script>
15
 <script>
19
   props: ['value'],
18
   props: ['value'],
20
   data () {
19
   data () {
21
     return {
20
     return {
22
-      key: ''
21
+      name: '',
22
+      phone: ''
23
     }
23
     }
24
   },
24
   },
25
   mounted () {
25
   mounted () {
29
   },
29
   },
30
   methods: {
30
   methods: {
31
     search () { // 搜索
31
     search () { // 搜索
32
-      this.$emit('exportSearchKey', this.key)
32
+      this.$emit('exportSearchKey', { name: this.name, phone: this.phone })
33
     },
33
     },
34
   }
34
   }
35
 }
35
 }

src/pages/system/dataStatistics/frontEndUserList/index.vue → src/pages/system/customerManager/customer/index.vue View File

60
       total: 0,
60
       total: 0,
61
       postData: { // 表格搜索条件
61
       postData: { // 表格搜索条件
62
         phone: '', // 手机号
62
         phone: '', // 手机号
63
+        username: '',
63
         page: 1, // 当前页码
64
         page: 1, // 当前页码
64
         pagesize: 10, // 请求数据量
65
         pagesize: 10, // 请求数据量
65
       },
66
       },
81
     handleCurrentChange (val) {
82
     handleCurrentChange (val) {
82
       this.getList()
83
       this.getList()
83
     },
84
     },
84
-    searchList (key) { // 搜索列表
85
-      this.postData.phone = key
85
+    searchList ({ name, phone } = {}) { // 搜索列表
86
+      this.postData.username = name
87
+      this.postData.phone = phone
86
       this.postData.page = 1
88
       this.postData.page = 1
87
       this.getList()
89
       this.getList()
88
     },
90
     },

src/pages/system/dataStatistics/frontEndUserList/page.scss → src/pages/system/customerManager/customer/page.scss View File


+ 19
- 0
src/pages/system/customerManager/index.vue View File

1
+<template>
2
+  <div class="mainPage">
3
+    <router-view></router-view>
4
+  </div>
5
+</template>
6
+
7
+<script>
8
+export default {
9
+  name: '',
10
+  data () {
11
+    return {}
12
+  },
13
+  components: {}
14
+}
15
+</script>
16
+
17
+<!-- Add "scoped" attribute to limit CSS to this component only -->
18
+<style lang="scss" scoped>
19
+</style>

+ 1
- 0
src/pages/system/library/books/detail.vue View File

155
   },
155
   },
156
   beforeRouteLeave (to, from, next) {
156
   beforeRouteLeave (to, from, next) {
157
     this.resetStore('detail')
157
     this.resetStore('detail')
158
+    this.resetStore('type.list')
158
     next()
159
     next()
159
   },
160
   },
160
   methods: {
161
   methods: {

+ 27
- 14
src/pages/system/library/books/list.vue View File

115
         bookBarcode: '',
115
         bookBarcode: '',
116
         bookName: '',
116
         bookName: '',
117
       },
117
       },
118
-      inputRef: window.document.createElement('input'),
118
+      inputRef: undefined,
119
       showDialog: false,
119
       showDialog: false,
120
     }
120
     }
121
   },
121
   },
141
     },
141
     },
142
   },
142
   },
143
   created() {
143
   created() {
144
-    this.inputRef.type = 'file'
145
-    // https://developer.mozilla.org/zh-CN/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Complete_list_of_MIME_types
146
-    this.inputRef.accept = 'application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
147
-    this.inputRef.addEventListener('change', this.importBatch.bind(this))
148
-
149
-    // this.filterList()
144
+    this.resetInputRef()
150
   },
145
   },
151
   beforeRouteLeave (to, from, next) {
146
   beforeRouteLeave (to, from, next) {
152
     this.resetStore('list')
147
     this.resetStore('list')
164
       batchImport: 'batchImport',
159
       batchImport: 'batchImport',
165
     }),
160
     }),
166
 
161
 
162
+    resetInputRef() {
163
+      const ipt = window.document.createElement('input')
164
+
165
+      ipt.type = 'file'
166
+      // https://developer.mozilla.org/zh-CN/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Complete_list_of_MIME_types
167
+      ipt.accept = 'application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
168
+      ipt.addEventListener('change', this.importBatch.bind(this))
169
+
170
+      this.inputRef = ipt
171
+    },
172
+
167
     // 查询过滤
173
     // 查询过滤
168
     filterList({ page = 0 } = {}) {
174
     filterList({ page = 0 } = {}) {
169
       const caseId = this.caseId || this.defaultCase
175
       const caseId = this.caseId || this.defaultCase
183
         caseid: caseId,
189
         caseid: caseId,
184
         barcode: this.formData.bookBarcode,
190
         barcode: this.formData.bookBarcode,
185
         name: this.formData.bookName
191
         name: this.formData.bookName
192
+      }).then(({ list }) => {
193
+        if (!list) {
194
+          this.$message({
195
+            showClose: true,
196
+            message: '未查询到数据',
197
+            type: 'error'
198
+          })
199
+        }
186
       }).catch(err => {
200
       }).catch(err => {
187
         this.$message({
201
         this.$message({
188
           showClose: true,
202
           showClose: true,
277
       this.showDialog = true
291
       this.showDialog = true
278
     },
292
     },
279
     importBatch(e) {
293
     importBatch(e) {
294
+      this.resetInputRef()
280
       this.showDialog = false
295
       this.showDialog = false
281
 
296
 
282
       // 需要指定案场
297
       // 需要指定案场
308
 
323
 
309
           this.batchImport(data).then(() => {
324
           this.batchImport(data).then(() => {
310
             loadding.close()
325
             loadding.close()
311
-
312
-            this.$confirm(`数据导入完成, 点击【确定】刷新页面`, '提示', {
313
-              confirmButtonText: '确定',
314
-              cancelButtonText: '取消',
315
-              type: 'warning'
316
-            }).then(() => {
317
-              window.location.reload()
326
+            this.filterList()
327
+            this.$message({
328
+              showClose: true,
329
+              message: '数据导入完成',
330
+              type: 'success'
318
             })
331
             })
319
           }).catch((err) => {
332
           }).catch((err) => {
320
             loadding.close()
333
             loadding.close()

+ 21
- 1
src/pages/system/library/borrow/borrow.vue View File

64
         </el-table-column>
64
         </el-table-column>
65
         <el-table-column prop="BookBarcode" label="条形码"></el-table-column>
65
         <el-table-column prop="BookBarcode" label="条形码"></el-table-column>
66
         <el-table-column prop="BookName" label="书名"></el-table-column>
66
         <el-table-column prop="BookName" label="书名"></el-table-column>
67
-        <el-table-column prop="BookTypeName" label="分类"></el-table-column>
67
+        <el-table-column label="分类">
68
+          <template slot-scope="scope">
69
+            <span>{{ getTypeName(scope.row.BookTypeId) }}</span>
70
+          </template>
71
+        </el-table-column>
68
         <el-table-column prop="LeftNum" label="可借数量"></el-table-column>
72
         <el-table-column prop="LeftNum" label="可借数量"></el-table-column>
69
         <el-table-column prop="BorrowDays" label="规定借阅天数"></el-table-column>
73
         <el-table-column prop="BorrowDays" label="规定借阅天数"></el-table-column>
70
       </el-table>
74
       </el-table>
83
 const {
87
 const {
84
   mapState: mapLibSate,
88
   mapState: mapLibSate,
85
   mapActions,
89
   mapActions,
90
+  mapMutations,
86
 } = createNamespacedHelpers('library')
91
 } = createNamespacedHelpers('library')
87
 
92
 
88
 export default {
93
 export default {
103
     }),
108
     }),
104
     ...mapLibSate({
109
     ...mapLibSate({
105
       list: s => s.list,
110
       list: s => s.list,
111
+      types: s => s.type.list,
106
       borrowHistory: s => s.borrow.history,
112
       borrowHistory: s => s.borrow.history,
107
     }),
113
     }),
108
     caseId: {
114
     caseId: {
114
       },
120
       },
115
     },
121
     },
116
   },
122
   },
123
+  beforeRouteLeave (to, from, next) {
124
+    this.resetStore('list')
125
+    next()
126
+  },
117
   methods: {
127
   methods: {
128
+    ...mapMutations({
129
+      resetStore: 'clearData',
130
+    }),
118
     ...mapActions({
131
     ...mapActions({
119
       getBorrowHistory: 'getBorrowHistory',
132
       getBorrowHistory: 'getBorrowHistory',
120
       getList: 'getBookList',
133
       getList: 'getBookList',
134
+      getTypeList: 'getTypeList',
121
       borrowBooks: 'borrowBooks'
135
       borrowBooks: 'borrowBooks'
122
     }),
136
     }),
123
 
137
 
169
         return
183
         return
170
       }
184
       }
171
 
185
 
186
+      this.getTypeList({ page: 0, pagesize: 1000, caseid: this.formData.caseid })
187
+
172
       this.getList({
188
       this.getList({
173
         ...this.formData,
189
         ...this.formData,
174
         // customerphone: this.borrowHistory.Phone,
190
         // customerphone: this.borrowHistory.Phone,
218
         })
234
         })
219
         .catch(x => x)
235
         .catch(x => x)
220
     },
236
     },
237
+
238
+    getTypeName(id) {
239
+      return (this.types.filter(x => x.BookTypeId === id)[0] || {}).BookTypeName
240
+    },
221
   }
241
   }
222
 }
242
 }
223
 </script>
243
 </script>

+ 15
- 7
src/pages/system/page.js View File

86
 import flashbuyVerificationList from './verificationManager/flashbuyVerification/verificationList/index' // 抢购核销列表
86
 import flashbuyVerificationList from './verificationManager/flashbuyVerification/verificationList/index' // 抢购核销列表
87
 
87
 
88
 import dataStatistics from './dataStatistics/index' // 数据统计
88
 import dataStatistics from './dataStatistics/index' // 数据统计
89
-import frontEndUserList from './dataStatistics/frontEndUserList/index' // 课程管理
89
+// import frontEndUserList from './dataStatistics/frontEndUserList/index' // 课程管理
90
 import cardCouponList from './dataStatistics/cardCouponList/index' // 卡券统计列表
90
 import cardCouponList from './dataStatistics/cardCouponList/index' // 卡券统计列表
91
 import cardCouponUsedList from './dataStatistics/cardCouponUsedList/index' // 卡券使用统计
91
 import cardCouponUsedList from './dataStatistics/cardCouponUsedList/index' // 卡券使用统计
92
 import courseStatisticsList from './dataStatistics/courseStatisticsList/index' // 课程统计列表
92
 import courseStatisticsList from './dataStatistics/courseStatisticsList/index' // 课程统计列表
148
 import borrowList from './library/borrow/borrowList' // 借阅记录
148
 import borrowList from './library/borrow/borrowList' // 借阅记录
149
 import appointmentList from './library/borrow/appointmentList' // 预约记录
149
 import appointmentList from './library/borrow/appointmentList' // 预约记录
150
 
150
 
151
+import CustomerManager from './customerManager' // 会员管理
152
+import CustomerList from './customerManager/customer' // 会员列表
153
+
151
 export default {
154
 export default {
152
   router: [
155
   router: [
153
     {
156
     {
548
         path: 'dataStatistics',
551
         path: 'dataStatistics',
549
         name: 'dataStatistics',
552
         name: 'dataStatistics',
550
         component: dataStatistics,
553
         component: dataStatistics,
551
-        children: [{ // 前台用户列表
552
-          path: 'frontEndUserList',
553
-          name: 'frontEndUserList',
554
-          component: frontEndUserList,
555
-          children: []
556
-        }, { // 卡券统计列表
554
+        children: [{ // 卡券统计列表
557
           path: 'cardCouponList',
555
           path: 'cardCouponList',
558
           name: 'cardCouponList',
556
           name: 'cardCouponList',
559
           component: cardCouponList,
557
           component: cardCouponList,
793
           component: appointmentList,
791
           component: appointmentList,
794
           children: []
792
           children: []
795
         }]
793
         }]
794
+      },{
795
+        path: 'member',
796
+        name: 'member',
797
+        component: CustomerManager,
798
+        children: [{
799
+          path: 'list',
800
+          name: 'memberList',
801
+          component: CustomerList,
802
+          children: []
803
+        }],
796
       }]
804
       }]
797
     },
805
     },
798
   ],
806
   ],