zjxpcyc 6 år sedan
förälder
incheckning
07e2e8511e

+ 14
- 14
src/components/tableSearch/index.vue Visa fil

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
 }

+ 4
- 2
src/pages/system/dataStatistics/frontEndUserList/index.vue Visa fil

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
     },

+ 8
- 0
src/pages/system/library/books/list.vue Visa fil

189
         caseid: caseId,
189
         caseid: caseId,
190
         barcode: this.formData.bookBarcode,
190
         barcode: this.formData.bookBarcode,
191
         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
+        }
192
       }).catch(err => {
200
       }).catch(err => {
193
         this.$message({
201
         this.$message({
194
           showClose: true,
202
           showClose: true,

+ 1
- 1
src/pages/system/library/books/types/list.vue Visa fil

101
     }),
101
     }),
102
 
102
 
103
     filterList({ page = 0 } = {}) {
103
     filterList({ page = 0 } = {}) {
104
-      const caseId = this.formData.caseId || this.defaultCase
104
+      const caseId = this.formData.caseid || this.defaultCase
105
       if (!caseId) {
105
       if (!caseId) {
106
         this.$message({
106
         this.$message({
107
           showClose: true,
107
           showClose: true,

+ 13
- 1
src/pages/system/library/borrow/borrow.vue Visa fil

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>
104
     }),
108
     }),
105
     ...mapLibSate({
109
     ...mapLibSate({
106
       list: s => s.list,
110
       list: s => s.list,
111
+      types: s => s.type.list,
107
       borrowHistory: s => s.borrow.history,
112
       borrowHistory: s => s.borrow.history,
108
     }),
113
     }),
109
     caseId: {
114
     caseId: {
126
     ...mapActions({
131
     ...mapActions({
127
       getBorrowHistory: 'getBorrowHistory',
132
       getBorrowHistory: 'getBorrowHistory',
128
       getList: 'getBookList',
133
       getList: 'getBookList',
134
+      getTypeList: 'getTypeList',
129
       borrowBooks: 'borrowBooks'
135
       borrowBooks: 'borrowBooks'
130
     }),
136
     }),
131
 
137
 
177
         return
183
         return
178
       }
184
       }
179
 
185
 
186
+      this.getTypeList({ page: 0, pagesize: 1000, caseid: this.formData.caseid })
187
+
180
       this.getList({
188
       this.getList({
181
         ...this.formData,
189
         ...this.formData,
182
         // customerphone: this.borrowHistory.Phone,
190
         // customerphone: this.borrowHistory.Phone,
226
         })
234
         })
227
         .catch(x => x)
235
         .catch(x => x)
228
     },
236
     },
237
+
238
+    getTypeName(id) {
239
+      return (this.types.filter(x => x.BookTypeId === id)[0] || {}).BookTypeName
240
+    },
229
   }
241
   }
230
 }
242
 }
231
 </script>
243
 </script>