error-list.vue
5.33 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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
<template>
<div class="container resource close-left-menu" style="min-height: 490px;">
<div class="pop-banner clearfix">
<h3 class="current-module" v-if='search.createstate=="0"'>异常列表</h3>
<h3 class="current-module" v-if='search.createstate=="1"'>预警中心</h3>
</div>
<!--purchase-plan start-->
<div class="purchase-plan">
<div class="pd-form fast-search-form">
<div class="group-row">
<div class="form-group">
<label for="cn1" class="label label-6em">供应商</label>
<div class="control w370">
<input type="text" v-model="search.suppliername" id="cn1">
</div>
</div>
<div class="form-group">
<label for="cn11" class="label label-6em">医院</label>
<div class="control">
<input type="text" v-model="search.medname" id="cn11">
</div>
</div>
</div>
<div class="group-row">
<div class="form-group data200">
<label for="cn3" class="label">出库日期</label>
<div class="control control-date">
<div style="width:58%;float:left;">
<datepicker :target.sync="search.startdate"></datepicker>
</div>
<span class="text-and t-center" style="width: 39px">至</span>
<div style="width:19%;float:left;">
<datepicker :target.sync="search.enddate"></datepicker>
</div>
</div>
</div>
<div class="form-group">
<label for="cn11" class="label label-6em">业务单号</label>
<div class="control">
<input type="text" v-model="search.billno" id="cn11">
</div>
</div>
</div>
<div class="group-row">
<div class="form-group">
<label for="cn8" class="label">异常状态</label>
<div class="control">
<div class="radio-control" style='width:330px;'>
<input type="radio" id="radio04" name="radioio" v-model="search.dealstate" value="">
<label class="radio" for="radio04">全部</label>
<input type="radio" id="radio01" name="radioio" v-model="search.dealstate" value="0">
<label class="radio" for="radio01">未处理</label>
<input type="radio" name="radioio" id="radio03" v-model="search.dealstate" value="1">
<label class="radio" for="radio03">已处理</label>
</div>
</div>
</div>
</div>
<div class="group-row t-right">
<button class="fast-search-form-btn btn-d btn-d-lg btn-d-activate btn-d-circle"
v-on:click="getData('search')">查 询</button>
</div>
</div>
<table class="itable itable-bordertop itable-thead-13px">
<thead>
<tr>
<th class="w50">序号</th>
<th class="w100">登记人</th>
<th class="w100">登记日期</th>
<th class="w100">供应商</th>
<th class="w100">业务单号</th>
<th class="w150">医疗机构</th>
<th class="w150">异常商品</th>
<th class="w80">处理人</th>
<th class="w90">状态</th>
<th class="w140">操作</th>
</tr>
</thead>
<tbody>
<tr v-if="list.length==null || list.length==0">
<td colspan="11"> 暂无数据 </td>
</tr>
<tr v-for="item in list">
<td>{{$index+1}}</td>
<td>{{item.operatername}}</td>
<td>{{item.update_time | getYMD}}</td>
<td class="t-left pr10">{{item.suppliername}}</td>
<td class="t-left pr10">{{item.billno}}</td>
<td class="t-left pr10">{{item.medname}}</td>
<td class="t-left pr10">{{item.goodsname}}</td>
<td>{{item.handlingpersonname}}</td>
<td :class='{"text-color-red":item.dealstate==0}'>{{item.dealstate | dealstate}}</td>
<td>
<a class="btn-d btn-d-activate" v-if='item.dealstate==0' v-link="{path:'/errorView/'+item.guid+'/true'}">处理</a>
<a class="btn-d btn-d-activate" v-else v-link="{path:'/errorView/'+item.guid+'/false'}">详情</a>
</td>
</tr>
</tbody>
</table>
<pagination
@page-change="getData"
:class="['m-20-0']"
:page-no.sync="search.page"
:total-pages.sync="search.totalPages"></pagination>
</div>
<!--purchase-plan end-->
</div>
</template>
<script>
module.exports={
data:function(){
return {
list:[],
search:{
pageSize: 20,
page: 1,
totalPages: 0,
medname:'',
suppliername:'',
startdate:'',
enddate:'',
dealstate:'',
billno:'',
createstate:''
}
}
},methods:{
getData:function(falg){//请求数据
if(falg=='search'){
this.search.page=1;
}
Ajax.post('/api/getListTrGovInvAbnormal',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))
}
},route:{
data:function(){
this.list=[];
this.search.createstate=this.$route.params.dealstate;
this.getData('search');
}
},
watch:{
'search.dealstate':function(){
this.getData('search');
}
}
}
</script>