|
@@ -5,16 +5,16 @@
|
5
|
5
|
<div class="flex-item flex-h"></div>
|
6
|
6
|
<ul style="white-space: normal;">
|
7
|
7
|
<li style="margin-bottom: 15px;">
|
8
|
|
- <el-input placeholder="请输入条形码" v-model="postData.BarCode"></el-input>
|
|
8
|
+ <el-input placeholder="请输入条形码" v-model="postData.barcode"></el-input>
|
9
|
9
|
</li>
|
10
|
10
|
<li style="margin-bottom: 15px;">
|
11
|
|
- <el-input placeholder="请输入图书名" v-model="postData.BookName"></el-input>
|
|
11
|
+ <el-input placeholder="请输入图书名" v-model="postData.bookname"></el-input>
|
12
|
12
|
</li>
|
13
|
13
|
<li style="margin-bottom: 15px;">
|
14
|
|
- <el-input placeholder="请输入用户名" v-model="postData.UserName"></el-input>
|
|
14
|
+ <el-input placeholder="请输入用户名" v-model="postData.customername"></el-input>
|
15
|
15
|
</li>
|
16
|
16
|
<li style="margin-bottom: 15px;">
|
17
|
|
- <el-input placeholder="请输入手机号" v-model="postData.Tel"></el-input>
|
|
17
|
+ <el-input placeholder="请输入手机号" v-model="postData.customerphone"></el-input>
|
18
|
18
|
</li>
|
19
|
19
|
<li style="margin-bottom: 15px;">
|
20
|
20
|
<el-select v-model="CaseId" placeholder="请选择案场">
|
|
@@ -34,26 +34,31 @@
|
34
|
34
|
</div>
|
35
|
35
|
<div class="system-table-box">
|
36
|
36
|
<el-table :data="list" stripe style="width: 100%">
|
37
|
|
- <el-table-column prop="GoodsName" label="案场"></el-table-column>
|
|
37
|
+ <el-table-column label="案场">
|
|
38
|
+ <template slot-scope="scope">{{returnCaseName(scope.row.CaseId)}}</template>
|
|
39
|
+ </el-table-column>
|
38
|
40
|
<el-table-column label="图片" width="300">
|
39
|
41
|
<template slot-scope="scope">
|
40
|
|
- <img :src="((scope.row.Images || [])[0] || {}).ImgUrl" style="width:200px;">
|
|
42
|
+ <img :src="scope.row.BookImg" style="height: 150px;">
|
41
|
43
|
</template>
|
42
|
44
|
</el-table-column>
|
43
|
|
- <el-table-column prop="BarCode" label="条形码"></el-table-column>
|
|
45
|
+ <el-table-column prop="BookBarcode" label="条形码"></el-table-column>
|
44
|
46
|
<el-table-column prop="BookName" label="图书名"></el-table-column>
|
45
|
|
- <el-table-column prop="UserName" label="用户名"></el-table-column>
|
46
|
|
- <el-table-column prop="Tel" label="手机号"></el-table-column>
|
47
|
|
- <el-table-column prop="xxDate" label="预约时间"></el-table-column>
|
48
|
|
- <el-table-column prop="xxDate" label="保留时间"></el-table-column>
|
|
47
|
+ <el-table-column prop="CustomerName" label="用户名"></el-table-column>
|
|
48
|
+ <el-table-column prop="CustomerPhone" label="手机号"></el-table-column>
|
|
49
|
+ <el-table-column label="预约时间">
|
|
50
|
+ <template slot-scope="scope">{{toolClass.dateFormat(scope.row.ReserveDate)}}</template>
|
|
51
|
+ </el-table-column>
|
|
52
|
+ <el-table-column label="保留时间">
|
|
53
|
+ <template slot-scope="scope">{{toolClass.dateFormat(scope.row.ReserveEndDate)}}</template>
|
|
54
|
+ </el-table-column>
|
49
|
55
|
<el-table-column label="操作">
|
50
|
56
|
<template slot-scope="scope">
|
51
|
|
- <el-button size="mini" type="warning">取消预约</el-button>
|
|
57
|
+ <el-button size="mini" type="warning" @click="cancel(scope.row.BookBorrowRecordId)">取消预约</el-button>
|
52
|
58
|
</template>
|
53
|
59
|
</el-table-column>
|
54
|
60
|
</el-table>
|
55
|
61
|
<el-pagination
|
56
|
|
- @size-change="handleSizeChange"
|
57
|
62
|
@current-change="handleCurrentChange"
|
58
|
63
|
:current-page.sync="postData.page"
|
59
|
64
|
:page-size="postData.pagesize"
|
|
@@ -71,25 +76,28 @@ export default {
|
71
|
76
|
name: 'borrowList',
|
72
|
77
|
data () {
|
73
|
78
|
return {
|
74
|
|
- total: 1000,
|
|
79
|
+ total: 1,
|
75
|
80
|
postData: {
|
76
|
|
- BarCode: '',
|
77
|
|
- BookName: '',
|
78
|
|
- UserName: '',
|
79
|
|
- Tel: '',
|
80
|
|
- Status: '',
|
81
|
|
- CaseId: '',
|
|
81
|
+ barcode: '',
|
|
82
|
+ bookname: '',
|
|
83
|
+ customername: '',
|
|
84
|
+ customerphone: '',
|
|
85
|
+ borrowstatus: '4',
|
|
86
|
+ caseid: '',
|
82
|
87
|
page: 1,
|
83
|
88
|
pagesize: 10
|
84
|
89
|
},
|
85
|
90
|
statusList: [{
|
86
|
91
|
id: '',
|
87
|
92
|
value: ''
|
88
|
|
- }],
|
89
|
|
- list: []
|
|
93
|
+ }]
|
90
|
94
|
}
|
91
|
95
|
},
|
92
|
96
|
created () {
|
|
97
|
+ this.getBorrowList({ ...this.postData }).then((res) => {
|
|
98
|
+ this.page = res.page
|
|
99
|
+ this.total = res.pagenum
|
|
100
|
+ })
|
93
|
101
|
},
|
94
|
102
|
computed: {
|
95
|
103
|
...mapState({
|
|
@@ -98,26 +106,54 @@ export default {
|
98
|
106
|
orgid: x => x.app.user.OrgId
|
99
|
107
|
}),
|
100
|
108
|
...mapLibSate({
|
|
109
|
+ list: x => x.borrow.list
|
101
|
110
|
}),
|
102
|
111
|
CaseId: {
|
103
|
112
|
get () {
|
104
|
|
- return this.postData.CaseId || this.defaultCaseId
|
|
113
|
+ return this.postData.caseid || this.defaultCaseId
|
105
|
114
|
},
|
106
|
115
|
set (val) {
|
107
|
|
- this.postData.CaseId = val
|
|
116
|
+ this.postData.caseid = val
|
108
|
117
|
}
|
109
|
118
|
}
|
110
|
119
|
},
|
111
|
120
|
methods: {
|
112
|
|
- ...mapLibActions([]),
|
113
|
|
- search () {
|
114
|
|
-
|
|
121
|
+ ...mapLibActions(['getBorrowList', 'cancelBorrow']),
|
|
122
|
+ cancel (id) {
|
|
123
|
+ this.$confirm('确认取消预约?', '提示', {
|
|
124
|
+ confirmButtonText: '确定',
|
|
125
|
+ cancelButtonText: '取消',
|
|
126
|
+ type: 'warning'
|
|
127
|
+ }).then(() => {
|
|
128
|
+ this.cancelBorrow(id).then(() => {
|
|
129
|
+ this.getBorrowList({ ...this.postData }).then((res) => {
|
|
130
|
+ this.page = res.page
|
|
131
|
+ this.total = res.pagenum
|
|
132
|
+ })
|
|
133
|
+ })
|
|
134
|
+ })
|
115
|
135
|
},
|
116
|
|
- handleSizeChange (val) {
|
117
|
|
- console.log(`每页 ${val} 条`)
|
|
136
|
+ search () {
|
|
137
|
+ this.page = 1
|
|
138
|
+ this.getBorrowList({ ...this.postData }).then((res) => {
|
|
139
|
+ this.page = res.page
|
|
140
|
+ this.total = res.pagenum
|
|
141
|
+ })
|
118
|
142
|
},
|
119
|
143
|
handleCurrentChange (val) {
|
|
144
|
+ this.postData.page = val
|
|
145
|
+ this.getBorrowList({ ...this.postData }).then((res) => {
|
|
146
|
+ this.page = res.page
|
|
147
|
+ this.total = res.pagenum
|
|
148
|
+ })
|
120
|
149
|
},
|
|
150
|
+ returnCaseName (id) {
|
|
151
|
+ var name = ''
|
|
152
|
+ this.cases.map((item) => {
|
|
153
|
+ if (item.CaseId === id) name = item.CaseName
|
|
154
|
+ })
|
|
155
|
+ return name
|
|
156
|
+ }
|
121
|
157
|
}
|
122
|
158
|
}
|
123
|
159
|
</script>
|