|
@@ -1,7 +1,553 @@
|
1
|
1
|
<template>
|
2
|
2
|
<div class="main-contain">
|
3
|
3
|
<div class="app-container ">
|
4
|
|
- 有效期 库存查询喔喔喔
|
|
4
|
+ <div style="justify-content: space-between;margin: 0px 0 12px 0;display: flex;align-items: center;">
|
|
5
|
+ <div>
|
|
6
|
+ <span>有效期:</span>
|
|
7
|
+ <el-select v-model="expiry_type" style="width:200px;margin-right:10px;" placeholder="请选择"
|
|
8
|
+ filterable
|
|
9
|
+ @change="changeExpriyList">
|
|
10
|
+ <el-option
|
|
11
|
+ v-for="item in expriyList"
|
|
12
|
+ :key="item.id"
|
|
13
|
+ :label="item.name"
|
|
14
|
+ :value="item.id">
|
|
15
|
+ </el-option>
|
|
16
|
+ </el-select>
|
|
17
|
+ <span>仓库名称:</span>
|
|
18
|
+ <el-select v-model="storehouse_id" style="width:200px;margin-right:10px;" placeholder="请选择"
|
|
19
|
+ filterable
|
|
20
|
+ @change="changeStorehouseName">
|
|
21
|
+ <el-option
|
|
22
|
+ v-for="item in houseList"
|
|
23
|
+ :key="item.id"
|
|
24
|
+ :label="item.storehouse_name"
|
|
25
|
+ :value="item.id">
|
|
26
|
+ </el-option>
|
|
27
|
+ </el-select>
|
|
28
|
+ <el-input v-model="keyword" style="width:200px" placeholder="请输入耗材名称或生产厂商" ></el-input>
|
|
29
|
+ <el-button type="primary" icon="el-icon-search" @click="seach">搜索</el-button>
|
|
30
|
+ </div>
|
|
31
|
+ </div>
|
|
32
|
+ <el-table
|
|
33
|
+ :row-style="{ color: '#303133' }"
|
|
34
|
+ :header-cell-style="{
|
|
35
|
+ backgroundColor: 'rgb(245, 247, 250)',
|
|
36
|
+ color: '#606266'
|
|
37
|
+ }"
|
|
38
|
+ :data="tableList"
|
|
39
|
+ :class="signAndWeighBoxPatients"
|
|
40
|
+ border
|
|
41
|
+ >
|
|
42
|
+ <el-table-column label="耗材类型" align="center">
|
|
43
|
+ <template slot-scope="scope">
|
|
44
|
+ {{getGoodTypeName(scope.row.GoodInfo.good_type_id)}}
|
|
45
|
+ </template>
|
|
46
|
+ </el-table-column>
|
|
47
|
+ <el-table-column label="耗材名称" align="center">
|
|
48
|
+ <template slot-scope="scope">
|
|
49
|
+ {{scope.row.GoodInfo.good_name}}
|
|
50
|
+ </template>
|
|
51
|
+ </el-table-column>
|
|
52
|
+ <el-table-column label="规格&单位" align="center">
|
|
53
|
+ <template slot-scope="scope">
|
|
54
|
+ {{scope.row.GoodInfo.specification_name}}
|
|
55
|
+ </template>
|
|
56
|
+ </el-table-column>
|
|
57
|
+ <el-table-column label="生产厂商" align="center">
|
|
58
|
+ <template slot-scope="scope">
|
|
59
|
+ {{getManufacturName(scope.row.manufacturer)}}
|
|
60
|
+ </template>
|
|
61
|
+ </el-table-column>
|
|
62
|
+ <el-table-column label="进货价" align="center">
|
|
63
|
+ <template slot-scope="scope">
|
|
64
|
+ {{scope.row.price}}
|
|
65
|
+ </template>
|
|
66
|
+ </el-table-column>
|
|
67
|
+ <el-table-column label="库存" align="center">
|
|
68
|
+ <template slot-scope="scope">
|
|
69
|
+ {{scope.row.stock_count}}
|
|
70
|
+ </template>
|
|
71
|
+ </el-table-column>
|
|
72
|
+
|
|
73
|
+ <el-table-column label="批号" align="center">
|
|
74
|
+ <template slot-scope="scope">
|
|
75
|
+ {{scope.row.number}}
|
|
76
|
+ </template>
|
|
77
|
+ </el-table-column>
|
|
78
|
+
|
|
79
|
+ <el-table-column label="有效期" align="center">
|
|
80
|
+ <template slot-scope="scope">
|
|
81
|
+ {{getTime(scope.row.expiry_date)}}
|
|
82
|
+ </template>
|
|
83
|
+ </el-table-column>
|
|
84
|
+
|
|
85
|
+ <el-table-column label="剩余天数" align="center">
|
|
86
|
+ <template slot-scope="scope">
|
|
87
|
+ {{getDaysBetween(getTime(scope.row.expiry_date),getTime(nowtime))}}
|
|
88
|
+ </template>
|
|
89
|
+ </el-table-column>
|
|
90
|
+ </el-table>
|
|
91
|
+ <el-pagination
|
|
92
|
+ @size-change="handleSizeChange"
|
|
93
|
+ @current-change="handleCurrentChange"
|
|
94
|
+ :page-sizes="[10, 50, 100,200,500,1000]"
|
|
95
|
+ :page-size="10"
|
|
96
|
+ background
|
|
97
|
+ align="right"
|
|
98
|
+ style="margin-top:20px;"
|
|
99
|
+ layout="total, sizes, prev, pager, next, jumper"
|
|
100
|
+ :total="total"
|
|
101
|
+ >
|
|
102
|
+ </el-pagination>
|
5
|
103
|
</div>
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
|
6
|
109
|
</div>
|
7
|
|
-</template>
|
|
110
|
+</template>
|
|
111
|
+<script>
|
|
112
|
+import { getStorehouseList,getGoodExpiryDateQuery,getGoodWarehouseOutInfoById } from "@/api/drug/drug"
|
|
113
|
+import {
|
|
114
|
+ getStockDrugCount
|
|
115
|
+} from "@/api/stock";
|
|
116
|
+import { uParseTime } from '@/utils/tools'
|
|
117
|
+import moment from 'moment';
|
|
118
|
+export default {
|
|
119
|
+
|
|
120
|
+ data(){
|
|
121
|
+ return{
|
|
122
|
+ tableList:[],
|
|
123
|
+ goodList:[
|
|
124
|
+ {id:1,name:"全部耗材"},
|
|
125
|
+ {id:2,name:"库存预警"},
|
|
126
|
+ ],
|
|
127
|
+ houseList:[],
|
|
128
|
+ storehouse_id:0,
|
|
129
|
+ good_type:1,
|
|
130
|
+ multipleSelection: [],
|
|
131
|
+ signAndWeighBoxPatients: "sign-and-weigh-box-patients",
|
|
132
|
+ manufacturerList:[],
|
|
133
|
+ limit:10,
|
|
134
|
+ page:1,
|
|
135
|
+ total:0,
|
|
136
|
+ limitone:10,
|
|
137
|
+ pageone:1,
|
|
138
|
+ totalone:0,
|
|
139
|
+ keyword:"",
|
|
140
|
+ goodTypeList:[],
|
|
141
|
+ start_time:"",
|
|
142
|
+ end_time:"",
|
|
143
|
+ countList:[],
|
|
144
|
+ outCountList:[],
|
|
145
|
+ autoCountList:[],
|
|
146
|
+ cancelCountList:[],
|
|
147
|
+ org_id:this.$store.getters.xt_user.org_id,
|
|
148
|
+ dialogVisible:false,
|
|
149
|
+ start_first_time:"",
|
|
150
|
+ end_first_time:"",
|
|
151
|
+ tableData:[],
|
|
152
|
+ good_id:0,
|
|
153
|
+ patientList:[],
|
|
154
|
+ good_name:"",
|
|
155
|
+ specification_name:"",
|
|
156
|
+ expiry_type:0,
|
|
157
|
+ expriyList:[
|
|
158
|
+ {id:0,name:"全部"},
|
|
159
|
+ {id:1,name:"已过期"},
|
|
160
|
+ {id:2,name:"30天内过期"},
|
|
161
|
+ {id:3,name:"90天内过期"},
|
|
162
|
+ {id:4,name:"180天内过期"},
|
|
163
|
+ {id:5,name:"1年内过期"},
|
|
164
|
+ ],
|
|
165
|
+ nowtime:0,
|
|
166
|
+ start_time:"",
|
|
167
|
+ }
|
|
168
|
+
|
|
169
|
+ },
|
|
170
|
+ methods:{
|
|
171
|
+ changeStorehouseName(){
|
|
172
|
+ this.getlist()
|
|
173
|
+ },
|
|
174
|
+ changeGoodName(){
|
|
175
|
+
|
|
176
|
+ },
|
|
177
|
+ getStorehouseList(){
|
|
178
|
+ getStorehouseList().then(response=>{
|
|
179
|
+ if(response.data.state == 1){
|
|
180
|
+ var houseList = response.data.data.list
|
|
181
|
+ var obj = {id:0,storehouse_name:"全部"}
|
|
182
|
+ this.houseList.push(obj)
|
|
183
|
+ for(let i=0;i<houseList.length;i++){
|
|
184
|
+ this.houseList.push(houseList[i])
|
|
185
|
+ }
|
|
186
|
+ this.manufacturerList = response.data.data.manufacturerList
|
|
187
|
+ this.goodTypeList = response.data.data.goodTypeList
|
|
188
|
+ this.patientList = response.data.data.patientList
|
|
189
|
+ }
|
|
190
|
+ })
|
|
191
|
+ },
|
|
192
|
+ getlist(){
|
|
193
|
+ var params = {
|
|
194
|
+ storehouse_id:this.storehouse_id,
|
|
195
|
+ expiry_type:this.expiry_type,
|
|
196
|
+ keyword:this.keyword,
|
|
197
|
+ page:this.page,
|
|
198
|
+ limit:this.limit,
|
|
199
|
+ start_time:this.start_time,
|
|
200
|
+ }
|
|
201
|
+ getGoodExpiryDateQuery(params).then(response=>{
|
|
202
|
+ if(response.data.state == 1){
|
|
203
|
+ var list = response.data.data.list
|
|
204
|
+ this.tableList = list
|
|
205
|
+ var manufacturerList = response.data.data.manufacturerList
|
|
206
|
+ this.manufacturerList = manufacturerList
|
|
207
|
+ this.total = response.data.data.total
|
|
208
|
+ this.nowtime = response.data.data.nowtime
|
|
209
|
+ }
|
|
210
|
+ })
|
|
211
|
+ },
|
|
212
|
+ getManufacturName(id){
|
|
213
|
+ var manufacturer_name = ""
|
|
214
|
+ for(let i=0;i<this.manufacturerList.length;i++){
|
|
215
|
+ if(id == this.manufacturerList[i].id){
|
|
216
|
+ manufacturer_name = this.manufacturerList[i].manufacturer_name
|
|
217
|
+ }
|
|
218
|
+ }
|
|
219
|
+ return manufacturer_name
|
|
220
|
+ },
|
|
221
|
+ handleSizeChange(val) {
|
|
222
|
+ this.limit = val;
|
|
223
|
+ this.getlist()
|
|
224
|
+ },
|
|
225
|
+ handleCurrentChange(val) {
|
|
226
|
+ this.page = val;
|
|
227
|
+ this.getlist()
|
|
228
|
+ },
|
|
229
|
+ handleSizeChangeOne(val) {
|
|
230
|
+ this.limitone = val;
|
|
231
|
+ this.toDialogClick(this.good_id,this.good_name,this.specification_name)
|
|
232
|
+ },
|
|
233
|
+ handleCurrentChangeOne(val) {
|
|
234
|
+ this.pageone = val;
|
|
235
|
+ this.toDialogClick(this.good_id,this.good_name,this.specification_name)
|
|
236
|
+ },
|
|
237
|
+ seach(){
|
|
238
|
+ this.getlist()
|
|
239
|
+ },
|
|
240
|
+ getGoodTypeName(id){
|
|
241
|
+ var type_name = ""
|
|
242
|
+ for(let i=0;i<this.goodTypeList.length;i++){
|
|
243
|
+ if(id == this.goodTypeList[i].id){
|
|
244
|
+ type_name = this.goodTypeList[i].type_name
|
|
245
|
+ }
|
|
246
|
+ }
|
|
247
|
+ return type_name
|
|
248
|
+ },
|
|
249
|
+ getHouseName(id){
|
|
250
|
+ var storehouse_name = ""
|
|
251
|
+ for(let i=0;i<this.houseList.length;i++){
|
|
252
|
+ if(id == this.houseList[i].id){
|
|
253
|
+ storehouse_name = this.houseList[i].storehouse_name
|
|
254
|
+ }
|
|
255
|
+ }
|
|
256
|
+ return storehouse_name
|
|
257
|
+ },
|
|
258
|
+ getWareInfoCount(val,storehouse_id){
|
|
259
|
+ var count = 0
|
|
260
|
+ if(val.length > 0){
|
|
261
|
+ for(let i=0;i<val.length;i++){
|
|
262
|
+ if(val[i].storehouse_id == storehouse_id){
|
|
263
|
+ count +=val[i].warehousing_count
|
|
264
|
+ }
|
|
265
|
+ }
|
|
266
|
+ }
|
|
267
|
+ if(count > 0){
|
|
268
|
+ return count
|
|
269
|
+ }else{
|
|
270
|
+ return ""
|
|
271
|
+ }
|
|
272
|
+ },
|
|
273
|
+ getStockDrugCount(){
|
|
274
|
+ var params ={
|
|
275
|
+ keywords: this.keywords,
|
|
276
|
+ start_time:this.start_time,
|
|
277
|
+ end_time:this.end_time,
|
|
278
|
+ }
|
|
279
|
+ getStockDrugCount(params).then(response=>{
|
|
280
|
+ if(response.data.state == 1){
|
|
281
|
+ var outlist = response.data.data.outList
|
|
282
|
+ this.outCountList = outlist
|
|
283
|
+ var autoCount = response.data.data.autoCount
|
|
284
|
+ this.autoCountList = autoCount
|
|
285
|
+ var totalCount = response.data.data.totalCount
|
|
286
|
+ this.cancelCountList = totalCount
|
|
287
|
+ }
|
|
288
|
+ })
|
|
289
|
+ },
|
|
290
|
+ getWareInfoCountOne(val,storehouse_id){
|
|
291
|
+ var count = 0
|
|
292
|
+ if(val.length > 0){
|
|
293
|
+ for(let i=0;i<val.length;i++){
|
|
294
|
+ if(val[i].storehouse_id == storehouse_id){
|
|
295
|
+ count +=val[i].stock_count
|
|
296
|
+ }
|
|
297
|
+ }
|
|
298
|
+ }
|
|
299
|
+ if(count > 0){
|
|
300
|
+ return count
|
|
301
|
+ }else{
|
|
302
|
+ return ""
|
|
303
|
+ }
|
|
304
|
+ },
|
|
305
|
+ getOutCount(id){
|
|
306
|
+ var count = 0
|
|
307
|
+ for(let i=0;i<this.outCountList.length;i++){
|
|
308
|
+ if(id == this.outCountList[i].good_id){
|
|
309
|
+ count = this.outCountList[i].count
|
|
310
|
+ }
|
|
311
|
+ }
|
|
312
|
+ return count
|
|
313
|
+ },
|
|
314
|
+ getAutoCount(id){
|
|
315
|
+ var count= 0
|
|
316
|
+ for(let i=0;i<this.autoCountList.length;i++){
|
|
317
|
+ if(id == this.autoCountList[i].good_id){
|
|
318
|
+ count = this.autoCountList[i].count
|
|
319
|
+ }
|
|
320
|
+ }
|
|
321
|
+ return count
|
|
322
|
+ },
|
|
323
|
+ getCancelCount(id){
|
|
324
|
+ var count = 0
|
|
325
|
+ for(let i=0;i<this.cancelCountList.length;i++){
|
|
326
|
+ if(id == this.cancelCountList[i].good_id){
|
|
327
|
+ count = this.cancelCountList[i].count
|
|
328
|
+ }
|
|
329
|
+ }
|
|
330
|
+ return count
|
|
331
|
+ },
|
|
332
|
+ getCancelCountInfo(cancel_stock_info,storehouse_id){
|
|
333
|
+ var count = 0
|
|
334
|
+ if(cancel_stock_info.length >0){
|
|
335
|
+ for(let i=0;i<cancel_stock_info.length;i++){
|
|
336
|
+ if(storehouse_id == cancel_stock_info[i].storehouse_id){
|
|
337
|
+ count += cancel_stock_info[i].count
|
|
338
|
+ }
|
|
339
|
+ }
|
|
340
|
+ }
|
|
341
|
+ return count
|
|
342
|
+ },
|
|
343
|
+ getWareOutInfoCount(warehouse_out_info,storehouse_id){
|
|
344
|
+ var count = 0
|
|
345
|
+ if(warehouse_out_info.length > 0){
|
|
346
|
+ for(let i=0;i<warehouse_out_info.length;i++){
|
|
347
|
+ if(storehouse_id == warehouse_out_info[i].storehouse_id){
|
|
348
|
+ count +=warehouse_out_info[i].count
|
|
349
|
+ }
|
|
350
|
+ }
|
|
351
|
+ }
|
|
352
|
+ return count
|
|
353
|
+ },
|
|
354
|
+ getInCount(id){
|
|
355
|
+ var count= 0
|
|
356
|
+ for(let i=0;i<this.countList.length;i++){
|
|
357
|
+ if(id == this.countList[i].good_id){
|
|
358
|
+ count = this.countList[i].count
|
|
359
|
+ }
|
|
360
|
+ }
|
|
361
|
+ return count
|
|
362
|
+ },
|
|
363
|
+ getOutCount(id){
|
|
364
|
+ var count = 0
|
|
365
|
+ for(let i=0;i<this.outCountList.length;i++){
|
|
366
|
+ if(id == this.outCountList[i].good_id){
|
|
367
|
+ count = this.outCountList[i].count
|
|
368
|
+ }
|
|
369
|
+ }
|
|
370
|
+ return count
|
|
371
|
+ },
|
|
372
|
+ getAutoCount(id){
|
|
373
|
+ var count= 0
|
|
374
|
+ for(let i=0;i<this.autoCountList.length;i++){
|
|
375
|
+ if(id == this.autoCountList[i].good_id){
|
|
376
|
+ count = this.autoCountList[i].count
|
|
377
|
+ }
|
|
378
|
+ }
|
|
379
|
+ return count
|
|
380
|
+ },
|
|
381
|
+ getCancelCount(id){
|
|
382
|
+ var count = 0
|
|
383
|
+ for(let i=0;i<this.cancelCountList.length;i++){
|
|
384
|
+ if(id == this.cancelCountList[i].good_id){
|
|
385
|
+ count = this.cancelCountList[i].count
|
|
386
|
+ }
|
|
387
|
+ }
|
|
388
|
+ return count
|
|
389
|
+ },
|
|
390
|
+ getStockCount(id){
|
|
391
|
+ var stock_count = 0
|
|
392
|
+ for(let i=0;i<this.countList.length;i++){
|
|
393
|
+ if(id == this.countList[i].good_id){
|
|
394
|
+ stock_count = this.countList[i].stock_count
|
|
395
|
+ }
|
|
396
|
+ }
|
|
397
|
+ return stock_count
|
|
398
|
+ },
|
|
399
|
+ getWareInfo(arr){
|
|
400
|
+ var total = 0
|
|
401
|
+ if(arr.length > 0){
|
|
402
|
+ for(let i=0;i<arr.length;i++){
|
|
403
|
+ total += parseInt(arr[i].warehousing_count)
|
|
404
|
+ }
|
|
405
|
+ }else{
|
|
406
|
+ total = ""
|
|
407
|
+ }
|
|
408
|
+ return total
|
|
409
|
+ },
|
|
410
|
+ getOverplus(arr){
|
|
411
|
+ var total = 0
|
|
412
|
+ if(arr.length > 0){
|
|
413
|
+ for(let i=0;i<arr.length;i++){
|
|
414
|
+ total += arr[i].stock_count
|
|
415
|
+ }
|
|
416
|
+ }else{
|
|
417
|
+ total = ""
|
|
418
|
+ }
|
|
419
|
+ return total
|
|
420
|
+ },
|
|
421
|
+ getCancelInfo(arr){
|
|
422
|
+ var total = 0
|
|
423
|
+ if(arr.length > 0){
|
|
424
|
+ for(let i=0;i<arr.length;i++){
|
|
425
|
+ total += arr[i].count
|
|
426
|
+ }
|
|
427
|
+ }else{
|
|
428
|
+ total = ""
|
|
429
|
+ }
|
|
430
|
+ return total
|
|
431
|
+ },
|
|
432
|
+ getOverFlushInfo(arr){
|
|
433
|
+ var total = 0
|
|
434
|
+ if(arr.length >0){
|
|
435
|
+ for(let i=0;i<arr.length;i++){
|
|
436
|
+ total += arr[i].stock_count
|
|
437
|
+ }
|
|
438
|
+ }
|
|
439
|
+ return total
|
|
440
|
+ },
|
|
441
|
+ toDialogClick(id,good_name,specification_name){
|
|
442
|
+ this.good_id = id
|
|
443
|
+ this.good_name = good_name
|
|
444
|
+ this.specification_name = specification_name
|
|
445
|
+ var params = {
|
|
446
|
+ good_id:id,
|
|
447
|
+ limit:this.limitone,
|
|
448
|
+ page:this.pageone,
|
|
449
|
+ start_first_time:this.start_first_time,
|
|
450
|
+ end_first_time:this.end_first_time,
|
|
451
|
+ }
|
|
452
|
+ getGoodWarehouseOutInfoById(params).then(response=>{
|
|
453
|
+ if(response.data.state == 1){
|
|
454
|
+ var list = response.data.data.list
|
|
455
|
+ console.log("list23233233232w",list)
|
|
456
|
+ this.tableList = list
|
|
457
|
+ this.tableData = list
|
|
458
|
+ this.totalone = response.data.data.total
|
|
459
|
+ this.dialogVisible = true
|
|
460
|
+ }
|
|
461
|
+ })
|
|
462
|
+
|
|
463
|
+ },
|
|
464
|
+ startFirstTimeChange(){
|
|
465
|
+
|
|
466
|
+ },
|
|
467
|
+ endEndTimeChange(){
|
|
468
|
+
|
|
469
|
+ },
|
|
470
|
+ getTime(val) {
|
|
471
|
+ if(val < 0){
|
|
472
|
+ return ""
|
|
473
|
+ }
|
|
474
|
+ if(val == ""){
|
|
475
|
+ return ""
|
|
476
|
+ }else {
|
|
477
|
+ return uParseTime(val, '{y}-{m}-{d}')
|
|
478
|
+ }
|
|
479
|
+ },
|
|
480
|
+ getName(id){
|
|
481
|
+ var name = ""
|
|
482
|
+ for(let i=0;i<this.patientList.length;i++){
|
|
483
|
+ if(id == this.patientList[i].id){
|
|
484
|
+ name = this.patientList[i].name
|
|
485
|
+ }
|
|
486
|
+ }
|
|
487
|
+ return name
|
|
488
|
+ },
|
|
489
|
+ getDaysBetween(dateString1, dateString2) {
|
|
490
|
+ let startDate = Date.parse(dateString1);
|
|
491
|
+ let endDate = Date.parse(dateString2);
|
|
492
|
+ return (startDate - endDate ) / (1 * 24 * 60 * 60 * 1000);
|
|
493
|
+ },
|
|
494
|
+ changeExpriyList(val){
|
|
495
|
+
|
|
496
|
+ if(val ==0){
|
|
497
|
+ this.start_time = ""
|
|
498
|
+ this.getlist()
|
|
499
|
+ }
|
|
500
|
+ //已过期
|
|
501
|
+ if(val == 1){
|
|
502
|
+ this.getlist()
|
|
503
|
+ }
|
|
504
|
+ //30天内过期
|
|
505
|
+ if(val == 2){
|
|
506
|
+ var time = this.addDate(this.getTime(this.nowtime),30)
|
|
507
|
+ this.start_time = time
|
|
508
|
+ this.getlist()
|
|
509
|
+ }
|
|
510
|
+ //90天内过期
|
|
511
|
+ if(val == 3){
|
|
512
|
+ var time = this.addDate(this.getTime(this.nowtime),90)
|
|
513
|
+ this.start_time = time
|
|
514
|
+ this.getlist()
|
|
515
|
+ }
|
|
516
|
+ //180天内过期
|
|
517
|
+ if(val == 4){
|
|
518
|
+ var time = this.addDate(this.getTime(this.nowtime),180)
|
|
519
|
+ this.start_time = time
|
|
520
|
+ }
|
|
521
|
+ //1年以后
|
|
522
|
+ if(val == 5){
|
|
523
|
+ var time = this.addDate(this.getTime(this.nowtime),365)
|
|
524
|
+ this.start_time = time
|
|
525
|
+ this.getlist()
|
|
526
|
+ }
|
|
527
|
+
|
|
528
|
+ },
|
|
529
|
+ addDate(date, days) {
|
|
530
|
+ var date = new Date(date);
|
|
531
|
+ date.setDate(date.getDate() + days);
|
|
532
|
+ var year = date.getFullYear();
|
|
533
|
+ var month = date.getMonth() + 1;
|
|
534
|
+ var day = date.getDate();
|
|
535
|
+ var mm = "'" + month + "'";
|
|
536
|
+ var dd = "'" + day + "'";
|
|
537
|
+ if(mm.length == 3) {
|
|
538
|
+ month = "0" + month;
|
|
539
|
+ }
|
|
540
|
+ if(dd.length == 3) {
|
|
541
|
+ day = "0" + day;
|
|
542
|
+ }
|
|
543
|
+ var time = year + "-" + month + "-" + day
|
|
544
|
+ return time;
|
|
545
|
+ },
|
|
546
|
+ },
|
|
547
|
+ created(){
|
|
548
|
+ this.getStorehouseList()
|
|
549
|
+ this.getlist()
|
|
550
|
+ }
|
|
551
|
+}
|
|
552
|
+</script>
|
|
553
|
+
|