purchase-storage.vue
12.4 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
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
<template>
<div class="container resource close-left-menu contaNEW" style="min-height: 596px;">
<div class="pop-banner clearfix">
<div class="operate-btns"></div>
<h3 class="current-module">入库收货</h3>{{dual}}
</div>
<!-- start-->
<div class="pd-form fast-search-form">
<div class="group-row">
<div class="form-group">
<!-- <label for="cn1" class="label">入库单号</label> -->
<div class="control">
<input type="text" id="cn1" maxlength="17" v-rule v-model="search.search_LIKE_billno" title='入库单号' placeholder='入库单号'>
</div>
</div>
<div class="form-group">
<!-- <label class="label" for='cn2'>商品</label> -->
<div class="control">
<input type="text" id="cn2" maxlength="50" v-rule v-model="search.search_LIKE_goodsname" title='商品' placeholder='商品'>
</div>
</div>
</div>
<div class="group-row">
<div class="form-group form-label">
<label for="cn3" class="label">单据类型</label>
<div class="control select-style">
<!--<select-ui :list="billtype" v-model="search.search_EQ_billtype" v-bind:disabled="disabled"
title='单据类型' class='inp4' id='cn3'></select-ui>-->
<select v-model="search.search_EQ_billtype" class="inp4">
<option value="">--请选择--</option>
<option v-for="type in $store.state.$billType" v-bind:value="type.catenumber">
{{type.catename}}
</option>
</select>
</div>
</div>
<div class="form-group">
<!-- <label class="label w60" for='cn4'>制单日期</label> -->
<div class="control control-date" style="height:34px;overflow: inherit;">
<div style="width: 42%;float: left">
<datepicker :target.sync="search.search_GTE_startDate" :readonly="readonlyFlag" :id='cn4'
title='制单开始日期' placeholder='制单开始日期'
styleobj="width:100% !important;border-radius:8px 0px 0px 8px !important;"></datepicker>
</div>
<span class="text-and" style="width: 45px">至</span>
<div style="width: 48%;float: left;">
<datepicker :target.sync="search.search_LTE_endDate" :readonly="readonlyFlag" title='制单结束日期'
placeholder='制单结束日期'
styleobj="width:100% !important;border-radius:0px 8px 8px 0px !important;"></datepicker>
</div>
</div>
</div>
</div>
<div class="group-row">
<div class="form-group">
<!-- <label for="cn5" class="label">供应商</label> -->
<div class="control select-style">
<input type="text" maxlength="20" v-rule v-model="search.search_LIKE_suppliername" id='cn5' title='供应商'
placeholder='供应商'>
</div>
</div>
<div class="form-group">
<!-- <label class="label" for='cn8'>计划单号</label> -->
<div class="control">
<input type="text" id="cn8" maxlength="17" v-rule v-model="search.search_LIKE_medplanbillno" title='计划单号'
placeholder='计划单号'>
</div>
</div>
<!--<div class="form-group">-->
<!--<div class="control">-->
<!--<input type="text" v-model="search.search_LIKE_mkstaffname" id='cn6' title='业务员' placeholder='业务员'>-->
<!--</div>-->
<!--</div>-->
</div>
<div class="group-row">
<div class="form-group">
<!-- <label for="cn7" class="label">配送商</label> -->
<div class="control select-style">
<input type="text" id="cn7" maxlength="20" v-rule v-model="search.search_LIKE_distrbname" title='配送商'
placeholder='配送商'>
</div>
</div>
<div class="form-group">
<label class="label w80">入库状态</label>
<div class="control control-filtering control-filtering-green fl" style='width:370px;'>
<a class="option"
:class="{'all active':search.search_EQ_billstate==''}"
href="javascript:void(0)" @click="search.search_EQ_billstate=''">全部</a>
<a class="option"
:class="{'all active':search.search_EQ_billstate=='M01'}"
href="javascript:void(0)" @click="search.search_EQ_billstate='M01'">未入库</a>
<a class="option"
:class="{'all active':search.search_EQ_billstate=='M02'}"
href="javascript:void(0)" @click="search.search_EQ_billstate='M02'">部分入库</a>
<a class="option"
:class="{'all active':search.search_EQ_billstate=='M03'}"
href="javascript:void(0)" @click="search.search_EQ_billstate='M03'">已完结</a>
<!--
<a class="{{ state3 }} option" href="javascript:void(0)" @click="state('3')">待出库</a>
<a class="{{ state4 }} option" href="javascript:void(0)" @click="state('4')">部分出库</a>
<a class="{{ state5 }} option" href="javascript:void(0)" @click="state('5')">全部出库</a>
<a class="{{ state6 }} option" href="javascript:void(0)" @click="state('6')">部分入库</a>
<a class="{{ state7 }} option" href="javascript:void(0)" @click="state('7')">已完结</a> -->
</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" @click="getData(true)">查
询
</button>
</div>
</div>
<table class="itable itable-thead-13px">
<thead id="t_header">
<tr>
<th class="w50">序号</th>
<th class="w90">入库单号</th>
<th class="w90">制单日期</th>
<th class="w130">供应商</th>
<th class="w60">品规数</th>
<th class="w90">单据类型</th>
<th class="w90">入库状态</th>
<th class="w100">计划单号</th>
<th class="w130">配送商</th>
<th class="w80">操作</th>
</tr>
</thead>
<tbody>
<tr v-if="listTrmedwv==null || listTrmedwv.length==0">
<td colspan="10">
暂无符合条件的记录
</td>
</tr>
<tr v-for="trmedwv in listTrmedwv" v-else>
<td>{{$index + 1}}</td>
<td class="t-left pr10">{{trmedwv.billno}}</td>
<td class="t-center pr10">{{trmedwv.inputdate | getYMD}}<br>{{trmedwv.inputdate | getHMS}}</td>
<td>{{trmedwv.suppliername}}</td>
<td>{{trmedwv.varchar1}}</td>
<td>{{trmedwv.billtype | billtype}}</td>
<!-- <td>{{billTypefn(trmedwv.billtype) }}</td> -->
<td>
<span class="text-color-red" v-if='trmedwv.billstate=="M01"'>未入库</span>
<span class="text-color-or" v-if='trmedwv.billstate=="M02"'>部分入库</span>
<span v-if='trmedwv.billstate=="M03"'>已完结</span>
</td>
<td class="t-left pr10">{{trmedwv.medplanbillno}}</td>
<td class="t-left pr10">{{trmedwv.distrbname}}</td>
<td class="pt9">
<a class="btn button-green" v-link="{path:'/purchaseStoragedetail/'+ trmedwv.guid}">明细 </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>
</template>
<script>
module.exports = {
data: function () {
return {
search: {
pageSize: 50,
page: 1,
totalPages: 0,
search_LIKE_billno: '',
search_LIKE_mkstaffname: '',
search_LTE_endDate: '',
search_GTE_startDate: '',
search_LIKE_distrbname: '',
search_LIKE_suppliername: '',
search_EQ_billtype: '',
search_LIKE_medplanbillno: '',
search_EQ_medguid: '',
search_EQ_billstate: ''
},
billtype: [{
value: "01",
label: "普耗"
}, {
value: "02",
label: "跟台高值"
},
{
value: "03",
label: "备货高值"
},
{
value: "04",
label: "药品"
},
{
value: "05",
label: "后勤物资"
},
{
value: "06",
label: "消毒用品"
},
{
value: "07",
label: "洗涤用品"
},
{
value: "08",
label: "中药材"
},
{
value: "09",
label: "设施设备"
}],
supplierList: [],
billTypeList: [], // 单据类型
listTrmedwv: [],
authoritySetting: {
oneSearchFlag: true,
twoDetailFlag: true,
},
};
},
methods: {
billTypefn: function(val) {
let ret = '';
this.$store.state.$billType.forEach(ele => {
if (val == ele.catenumber) {
ret = ele.catename;
}
});
return ret
},
getData: function (isRefresh) {
var self = this;
if (isRefresh) {
this.search.page = 1;
}
Ajax.get('/hospitalTrmedwv/listTrmedwv', this.search)
.then(function (response) {
var data = response.data.data;
self.$set('listTrmedwv', data.list);
self.search.totalPages = data.totalPages;
})
}
},
watch:{
'search.search_EQ_billstate':function(){
this.getData();
}
},
route: {
activate: function () {
if ( window.sessionStorage.getItem('value')){
this.search.search_EQ_billstate = window.sessionStorage.getItem('value');
window.sessionStorage.removeItem('value');
}
this.getData();
}
}
};
</script>