Explorar el Código

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

wangfei hace 6 años
padre
commit
8335d68af7

+ 1
- 1
dist/index.html Ver fichero

@@ -1 +1 @@
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 Ver fichero

@@ -1,16 +1,15 @@
1 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 13
 </template>
15 14
 
16 15
 <script>
@@ -19,7 +18,8 @@ export default {
19 18
   props: ['value'],
20 19
   data () {
21 20
     return {
22
-      key: ''
21
+      name: '',
22
+      phone: ''
23 23
     }
24 24
   },
25 25
   mounted () {
@@ -29,7 +29,7 @@ export default {
29 29
   },
30 30
   methods: {
31 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 Ver fichero

@@ -60,6 +60,7 @@ export default {
60 60
       total: 0,
61 61
       postData: { // 表格搜索条件
62 62
         phone: '', // 手机号
63
+        username: '',
63 64
         page: 1, // 当前页码
64 65
         pagesize: 10, // 请求数据量
65 66
       },
@@ -81,8 +82,9 @@ export default {
81 82
     handleCurrentChange (val) {
82 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 88
       this.postData.page = 1
87 89
       this.getList()
88 90
     },

src/pages/system/dataStatistics/frontEndUserList/page.scss → src/pages/system/customerManager/customer/page.scss Ver fichero


+ 19
- 0
src/pages/system/customerManager/index.vue Ver fichero

@@ -0,0 +1,19 @@
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 Ver fichero

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

+ 27
- 14
src/pages/system/library/books/list.vue Ver fichero

@@ -115,7 +115,7 @@ export default {
115 115
         bookBarcode: '',
116 116
         bookName: '',
117 117
       },
118
-      inputRef: window.document.createElement('input'),
118
+      inputRef: undefined,
119 119
       showDialog: false,
120 120
     }
121 121
   },
@@ -141,12 +141,7 @@ export default {
141 141
     },
142 142
   },
143 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 146
   beforeRouteLeave (to, from, next) {
152 147
     this.resetStore('list')
@@ -164,6 +159,17 @@ export default {
164 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 174
     filterList({ page = 0 } = {}) {
169 175
       const caseId = this.caseId || this.defaultCase
@@ -183,6 +189,14 @@ export default {
183 189
         caseid: caseId,
184 190
         barcode: this.formData.bookBarcode,
185 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 200
       }).catch(err => {
187 201
         this.$message({
188 202
           showClose: true,
@@ -277,6 +291,7 @@ export default {
277 291
       this.showDialog = true
278 292
     },
279 293
     importBatch(e) {
294
+      this.resetInputRef()
280 295
       this.showDialog = false
281 296
 
282 297
       // 需要指定案场
@@ -308,13 +323,11 @@ export default {
308 323
 
309 324
           this.batchImport(data).then(() => {
310 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 332
           }).catch((err) => {
320 333
             loadding.close()

+ 21
- 1
src/pages/system/library/borrow/borrow.vue Ver fichero

@@ -64,7 +64,11 @@
64 64
         </el-table-column>
65 65
         <el-table-column prop="BookBarcode" label="条形码"></el-table-column>
66 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 72
         <el-table-column prop="LeftNum" label="可借数量"></el-table-column>
69 73
         <el-table-column prop="BorrowDays" label="规定借阅天数"></el-table-column>
70 74
       </el-table>
@@ -83,6 +87,7 @@ import { createNamespacedHelpers, mapState } from 'vuex'
83 87
 const {
84 88
   mapState: mapLibSate,
85 89
   mapActions,
90
+  mapMutations,
86 91
 } = createNamespacedHelpers('library')
87 92
 
88 93
 export default {
@@ -103,6 +108,7 @@ export default {
103 108
     }),
104 109
     ...mapLibSate({
105 110
       list: s => s.list,
111
+      types: s => s.type.list,
106 112
       borrowHistory: s => s.borrow.history,
107 113
     }),
108 114
     caseId: {
@@ -114,10 +120,18 @@ export default {
114 120
       },
115 121
     },
116 122
   },
123
+  beforeRouteLeave (to, from, next) {
124
+    this.resetStore('list')
125
+    next()
126
+  },
117 127
   methods: {
128
+    ...mapMutations({
129
+      resetStore: 'clearData',
130
+    }),
118 131
     ...mapActions({
119 132
       getBorrowHistory: 'getBorrowHistory',
120 133
       getList: 'getBookList',
134
+      getTypeList: 'getTypeList',
121 135
       borrowBooks: 'borrowBooks'
122 136
     }),
123 137
 
@@ -169,6 +183,8 @@ export default {
169 183
         return
170 184
       }
171 185
 
186
+      this.getTypeList({ page: 0, pagesize: 1000, caseid: this.formData.caseid })
187
+
172 188
       this.getList({
173 189
         ...this.formData,
174 190
         // customerphone: this.borrowHistory.Phone,
@@ -218,6 +234,10 @@ export default {
218 234
         })
219 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 243
 </script>

+ 15
- 7
src/pages/system/page.js Ver fichero

@@ -86,7 +86,7 @@ import flashbuyVerification from './verificationManager/flashbuyVerification/ind
86 86
 import flashbuyVerificationList from './verificationManager/flashbuyVerification/verificationList/index' // 抢购核销列表
87 87
 
88 88
 import dataStatistics from './dataStatistics/index' // 数据统计
89
-import frontEndUserList from './dataStatistics/frontEndUserList/index' // 课程管理
89
+// import frontEndUserList from './dataStatistics/frontEndUserList/index' // 课程管理
90 90
 import cardCouponList from './dataStatistics/cardCouponList/index' // 卡券统计列表
91 91
 import cardCouponUsedList from './dataStatistics/cardCouponUsedList/index' // 卡券使用统计
92 92
 import courseStatisticsList from './dataStatistics/courseStatisticsList/index' // 课程统计列表
@@ -148,6 +148,9 @@ import ReturnBooks from './library/borrow/bookreturn' // 图书归还
148 148
 import borrowList from './library/borrow/borrowList' // 借阅记录
149 149
 import appointmentList from './library/borrow/appointmentList' // 预约记录
150 150
 
151
+import CustomerManager from './customerManager' // 会员管理
152
+import CustomerList from './customerManager/customer' // 会员列表
153
+
151 154
 export default {
152 155
   router: [
153 156
     {
@@ -548,12 +551,7 @@ export default {
548 551
         path: 'dataStatistics',
549 552
         name: 'dataStatistics',
550 553
         component: dataStatistics,
551
-        children: [{ // 前台用户列表
552
-          path: 'frontEndUserList',
553
-          name: 'frontEndUserList',
554
-          component: frontEndUserList,
555
-          children: []
556
-        }, { // 卡券统计列表
554
+        children: [{ // 卡券统计列表
557 555
           path: 'cardCouponList',
558 556
           name: 'cardCouponList',
559 557
           component: cardCouponList,
@@ -793,6 +791,16 @@ export default {
793 791
           component: appointmentList,
794 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
   ],