excel-query-distribution.vue
5.29 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
<template>
<div class="container resource close-left-menu">
<div class="pop-banner clearfix">
<div class="operate-btns">
<a href="javascript:void(0)" class="fbtn fb-download">导出</a>
</div>
<div class="operate-btns">
</div>
<h3 class="current-module">配送商库存查询</h3>
</div>
<!--order-orderlist-view start-->
<div class="order-orderlist-view clearfix">
<div class="pd-form form-label4em mb-40 fast-search-form">
<div class="group-row">
<div class="form-group">
<div class="control">
<input type="text" v-model="goodsname" placeholder="商品信息" title="商品信息">
</div>
</div>
<div class="form-group">
<label for="cn3" class="label"><!-- 出库日期 --></label>
<div class="control control-date" style="height:34px;overflow: inherit;">
<div style="width:44%;float:left;height:32px;">
<datepicker :target.sync="productiondate" :readonly="readonlyFlag" title='开始日期' placeholder='开始日期' styleobj="width:100% !important;border-radius:8px 0px 0px 8px !important;"></datepicker>
</div>
<span class="text-and">-</span>
<div style="width:48%;float:left;height:32px;">
<datepicker :target.sync="expiredate" :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">
<div class="control">
<input type="text" v-model="storeRoom" placeholder="库房" title="库房">
</div>
</div>
<div class="form-group">
<div class="control">
<input type="text" v-model="shelves" placeholder="货位" title="货位">
</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">查 询</button>
</div>
</div>
<table class="itable itable-bordertop itable-td-long-text">
<thead>
<tr>
<th class="w40">序号</th>
<th class="w130">库房</th>
<th class="w130">货位</th>
<th class="w260">商品</th>
<th class="w80">单位</th>
<th class="w80">库存可用数量</th>
<th class="w80">批号</th>
<th class="w80">生产日期</th>
<th class="w80">有效期</th>
<!-- <th class="w80">操作</th> -->
</tr>
</thead>
<tbody v-for="item in list">
<tr>
<td>{{$index+1}}
<div class="pro-pic" :style="{'background-image': 'url('+item.pictcontent.thumbnail.photo+')'}">
<span class="pic-max blue-search"></span>
</div>
</td>
<td>{{item.storeroom}}</td>
<td>{{item.shelves}}</td>
<td class="v-middle t-left">
<div class="p-lr-10">
{{item.GoodsCode}}<br>
<span class="p-tit-green">{{item.goodsname}}</span><br>
{{item.goodsspec}}<br>
{{item.Producer}}<br>
{{item.registkey}}
</div>
</td>
<td class="v-middle">{{item.unitstyle}}</td>
<td class="v-middle">{{item.stockqty}}</td>
<td class="v-middle">{{item.lot}}</td>
<td class="v-middle">{{item.productiondate}}</td>
<td class="v-middle">{{item.expiredate}}</td>
<!-- <td class="v-middle">
<a class="btn-d btn-d-activate" href="settlement-hospital-list2.html">明细</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>
<!--order-orderlist-view end-->
</div>
</template>
<script>
module.exports={
data: function(){
return {
list:{},
goodsname:'',
storeRoom:'',
shelves:'',
productiondate:'',
expiredate:'',
search:{
page: 1,
totalPages: 1,
pageSize:5
},
};
},
methods: {
getData: function(){
var self = this;
Ajax.post('/distributorReport/getDistributorStocklist',{
'page':self.search.page,'pageSize':5,'goodsname':self.goodsname,
'storeRoom':self.storeRoom,'shelves':self.shelves,'productiondate':self.productiondate,
'expiredate':self.expiredate
}).
then(function(response){
var res=response.data.data;
var list = res.list || [], imgReg = /\.(jpg|jpeg|png|gif|bmp)$/i; //判断字符串是否为图片路径;
list.map(l => {
l.pictcontent.thumbnail.photo = imgReg.test(l.pictcontent.thumbnail.path) ? l.pictcontent.thumbnail.path : l.pictcontent.thumbnail.path + l.pictcontent.thumbnail.name;
})
self.list=res.list;
self.search.page=res.pageNo;
self.search.totalPages=res.totalPages;
})
},
},
route:{
activate : function(){
this.getData();
}
}
};
</script>