boxpagebpd.vue
2.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
<style>
</style>
<template>
<div class="row-launch " v-show="show">
<h3>{{count}}</h3>
<table class="itable">
<thead>
<tr>
<th class="w60">序号</th>
<th class="w120">供应商</th>
<th class="w80">出库订单</th>
<th class="w140">医疗机构</th>
<th class="w120">配送商</th>
<th class="w100">出库日期</th>
<th class="w80">单据类型</th>
<th class="w80">采购员</th>
<th class="w80">总金额</th>
<th class="">备注</th>
</tr>
</thead>
<tbody>
<tr v-for="item in list">
<td>{{$index+1}}</td>
<td>{{item.SupplierName}}</td>
<td>{{item.BillNo}}</td>
<td>{{item.Name}}</td>
<td>{{item.DistrbName}}</td>
<td>{{item.BillDate}}</td>
<td>{{item.BillType | ftCase "01:器械;02:耗材;04:药品" }}</td>
<td>{{item.BuyerName}}</td>
<td>{{item.DetailSum}}</td>
<td></td>
</tr>
</tbody>
</table>
<pagination @page-change="getData" :page-no.sync="search.page" :total-pages.sync="search.totalPages">
<!-- <em class="page">明细条目数【3】</em> -->
</pagination>
<div class="zip" v-on:click="show=false"></div>
</div>
</template>
<script>
module.exports = {
data: function() {
return {
list: [],
search: {
size: 20,
page: 1,
totalPages: 0,
billDate: '',
billType: ''
}
}
},
props: {
id: {
type: String,
default: ''
},
show: {
type: Boolean,
default: false
},
count: {
type: String,
default: ''
},
type: {
type: String,
default: '01'
},
action: {
type: String,
default: '1'
}
},
watch: {
'show': function(show) {
if(show == true) {
this.getData();
}
}
},
methods: {
getData: function(casetxt) { //请求数据
this.search.billDate = this.id;
this.search.billType = this.type;
if(this.action == 1) {
Ajax.get('/api/goverment_report_getDoBillList',
this.search).then(function(res) {
var result = res.data;
if(result.data) {
this.$set('list', result.data.list);
this.search.totalPages = result.data.totalPages
}
}.bind(this))
} else {
Ajax.get('/api/goverment_report_getDoBillList',
this.search).then(function(res) {
var result = res.data;
if(result.data) {
this.$set('list', result.data.list);
this.search.totalPages = result.data.totalPages
}
}.bind(this))
}
}
}
}
</script>