invoice-query-list.vue
11.1 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
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
<style scoped>
.pic-list p{
margin:0;
padding: 0;
font-size: 14px;
text-align: left;
text-indent: 1em;
width: 260px;
word-wrap: break-word;
word-break: normal;
}
.pic-list p em{
font-size: 22px;
font-weight: bold;
font-style: normal;
}
.pro-pics-tit {
padding-bottom: 10px;
}
.product-pics {
width:400px;
padding-top:10px;
height: 210px;
}
.pro-pics .pic-list{
width: 370px;
height: 160px;
}
.pic-container{
height: 160px;
}
.ctable .ct-row .row-line>.ct-col{
line-height: 15px;
word-wrap: break-word;
word-break: normal;
white-space: normal;
}
.close-left-menu .pro-pics .pic-list>li{
width: 80px;
height: 70px;
margin-right: 0px;
padding: 0;
}
</style>
<template>
<div>
<div class="container resource close-left-menu clearfix" style="min-height: 600px;">
<div class="pop-banner clearfix">
<div class="operate-btns">
<a class="fbtn fb-return" href="javascript:history.go(-1)">返回</a>
</div>
<h3 class="current-module">出库单详情</h3>
</div>
<!--suppliername start 分配供应商-->
<div class="fl" style='width:550px;padding-right:20px;border-right:1px solid #e8ebef;'>
<div class="purchase-add-plan">
<div class="supplylist clearfix supply-select">
<div class="supplylist-table ml-0">
<div class="min-search min-search-green " style="display: inline-block;border-right:0px; margin: 10px 0px;">
<input class="min-search-txt" v-model="search.name" style="border-right:0px;width:300px;"
placeholder="商品搜索">
<button class="min-search-btn" v-on:click="getData(true)" style="margin-left:0px;"></button>
</div>
<div id="leftCtable" class="ctable ct-parentr" style='border-bottom:1px solid #e8ebef;'>
<div class="ct-head">
<span class="ct-col w60">序号</span>
<span class="ct-col w150">商品 </span>
<span class="ct-col w150">出库情况</span>
<span class="ct-col w70">审核人</span>
<span class="ct-col w70">审核状态</span>
</div>
<div class="ct-row" v-if="list.length==null || list.length==0">
<div class="row-line">
<span class="ct-col" style="width: 100%;"> 暂无数据 </span>
</div>
</div>
<div class="ct-row" id="div1{{$index}}" v-for="item in list">
<div class="row-line" @click='invoice(item.supplierdobillno,item.supplierdorowno,item.guid,item.checkstate,item.rowno)'>
<span class="ct-col w60"> {{$index + 1}} </span>
<span class="ct-col w150 pr10 t-left">
{{item.goodscode}}
<br>
<span class="p-tit-green">{{item.goodsname}}</span>
<br>
{{item.goodsspec}}
<br>
{{item.manufacturer}}
<br>
{{item.registkey}}
</span>
<span class="ct-col w150 t-left">{{item.qty}}{{item.unit}} * {{item.price}}元
<br> {{item.amount | numDigit 2}}元
</span>
<span class="ct-col w70">{{item.operatername}}
</span>
<span class="ct-col w70" :class='{"text-color-red":item.checkstate==2}'>{{item.checkstate | Gcheckstate}}
</span>
</div>
</div>
</div>
</div>
<pagination
@page-change="getData"
:class="['m-20-0']"
:page-no.sync="search.page"
:total-pages.sync="search.totalPages"></pagination>
</div>
</div>
</div>
<div class="fr">
<div class="product-pics clearfix mt-10" v-for='item in manList'>
<div class="pro-pics-tit clearfix">
<h3 style='font-size:16px;color:#4AA8E5;padding-left:18px;'>厂家发票</h3>
<div class="pro-ctrl">
</div>
</div>
<div class="pro-pics" style='padding:0;margin:0;min-height: 120px;'>
<div class="pic-container">
<ul class="pic-list clearfix">
<li class="has-image">
<div class="pic-contain" :style="'background:url( '+item.path+') no-repeat;width:70px;height:60px;background-size:contain;'">
</div>
</li>
<div style='width:260px;height:120px;' class="fl">
<p><em>{{item.supdobillno}}</em></p>
<!-- <p><em>{{item.invoicenum}}</em> 元</p> -->
<p><em>{{item.invoicenum}}</em> {{item.unit}}</p>
<p>开票时间 {{item.invoicedate | getYMD}}</p>
</div>
<div class="fl" style='margin-left:110px;'>
<a class="btn-d btn-d-activate fl" href="javascript:void(0);" style='margin-top:1px;'>
<imagebox v-bind:imgarr="[{img:item.original}]"> 检验发票</imagebox>
</a>
<a class="btn-d btn-d-activate" href="javascript:void(0);">查看资质</a>
</div>
</ul>
</div>
</div>
</div>
<div class="product-pics clearfix mt-10" v-for='item in terList'>
<div class="pro-pics-tit clearfix">
<h3 style='font-size:16px;color:#4AA8E5;padding-left:18px;'>终端发票</h3>
<div class="pro-ctrl">
</div>
</div>
<div class="pro-pics" style='padding:0;margin:0;min-height: 120px;'>
<div class="pic-container">
<ul class="pic-list clearfix">
<li class="has-image">
<div class="pic-contain" :style="'background:url( '+item.path+') no-repeat;width:70px;height:60px;background-size:contain;'">
</div>
</li>
<div style='width:260px;height:120px;' class="fl">
<p><em>{{item.supdobillno}}</em></p>
<!-- <p><em>223</em> 元</p> -->
<p><em>{{item.invoicemoney | numDigit 2}}</em> 元</p>
<p>开票时间 {{item.invoicedate | getYMD}}</p>
</div>
<div class="fl" style='margin-left:110px;'>
<a class="btn-d btn-d-activate fl" href="javascript:void(0);" style='margin-top:2px;'>
<imagebox v-bind:imgarr="[{img:item.original}]"> 检验发票</imagebox>
</a>
<a class="btn-d btn-d-activate" href="javascript:void(0);">查看资质</a>
</div>
</ul>
</div>
</div>
</div>
<div class="fl" style='width:400px;padding-left: 130px;padding-top: 30px;'
v-if='falg'>
<a class="btn-d btn-d-activate" href="javascript:void(0);" @click='audit'>审核通过</a>
<a class="btn-d btn-d-red" href="javascript:void(0);" v-link='{path:"/registerError/"+supguid+"/"+rowno+"/"+supplierdorowno+"/"+supplierdobillno}'>登记异常</a>
</div>
</div>
</div>
<div class="roll-bg" v-show='requestS'>
<div class="w60" style="margin:0 auto;">
<img src="/images/roll.gif">
</div>
<div class="container resource t-center text-color-red">
正在处理中,请勿关闭!
</div>
</div>
</div>
</template>
<style type="text/css">
.filed1::-ms-input-placeholder {
text-align: right;
}
.filed1::-webkit-input-placeholder {
text-align: right;
}
</style>
<script>
module.exports = {
data: function() {
return {
falg:false,
manList:[],
terList:[],
list:[],
// 分页
search: {
pageSize: 20,
page: 1,
totalPages: 0,
guid:'',
name:'',
rowno:''
},
// 医院分页
hosSearch: {
pageSize: 50,
page: 1,
totalPages: 0,
medname: ''
},
getHosList: [],
getSupList: '',
goodsInfo: '',
oParamList: [],
checkArr: [], //复选框数组
checkArrList: [],
supCode: [],
isShowPage: true,
selectSup: [],
allSelect: [],
requestS:false
};
},
methods: {
// 加载数据
getData: function(state) {
if(state){
this.search.page=1;
}
Ajax.post('/api/getTrGovInvCheckDetail',this.search).then(function(res){
var result=res.data;
if(result.errorCode==0){
this.$set('list',result.data.list);
this.search.totalPages=result.data.totalPages;
}else{
this.MessageBox.alert(result.message);
}
}.bind(this))
},
invoice:function(supplierdobillno,supplierdorowno,guid,checkstate,rowno){
if(checkstate==0){
this.falg=true;
this.supguid=guid;
this.rowno=rowno;
this.search.rowno=rowno;
this.checkstate=checkstate;
this.supplierdorowno=supplierdorowno;
this.supplierdobillno=supplierdobillno;
}
// 获取厂商发票
this.query(supplierdobillno,supplierdorowno,1);
// 获取终端发票
this.query(supplierdobillno,supplierdorowno,2);
},
query:function(billno,rowno,state){
var obj={};
obj.supplierdobillno=billno;
obj.supplierdorowno=rowno;
obj.invoicestate=state;
Ajax.post('/api/getTrDoInvoice',obj).then(function(res){
var result=res.data;
var imgReg = /\.(jpg|jpeg|png|gif|bmp)$/i; //判断字符串是否为图片路径;
if(result.errorCode==0){
if(state==1){
for (let a=0;a<result.data.length;a++) {
var img=JSON.parse(result.data[a].invoicepic);
if(!result.data[a].invoicepic){
continue;
}
result.data[a].path= imgReg.test(img[0].thumbnail.path) ? img[0].thumbnail.path : img[0].thumbnail.path+img[0].thumbnail.name;
result.data[a].original=imgReg.test(img[0].original.path) ? img[0].original.path : img[0].original.path+img[0].original.name;
}
this.$set('manList',result.data);
}else{
for (let a=0;a<result.data.length;a++) {
if(!result.data[a].invoicepic){
continue;
}
var img=JSON.parse(result.data[a].invoicepic);
result.data[a].path= imgReg.test(img[0].thumbnail.path) ? img[0].thumbnail.path : img[0].thumbnail.path+img[0].thumbnail.name;
result.data[a].original=imgReg.test(img[0].original.path) ? img[0].original.path : img[0].original.path+img[0].original.name;
}
this.$set('terList',result.data);
}
}else{
this.MessageBox.alert(result.message);
}
}.bind(this))
},
audit:function(){
this.requestS=true;
Ajax.post('/api/getTrGovInvCheckPass',this.search)
.then(function(res){
var result=res.data;
if(result.errorCode==0){
this.MessageBox.alert('审核成功');
this.$router.go({ 'path': '/invoiceQuery' });
}else{
this.MessageBox.alert(result.message);
}
this.requestS=false;
}.bind(this))
}
},
route: {
data: function() {
this.$set('manList',[]);
this.$set('terList',[]);
this.falg=false;
this.search.guid=this.$route.params.guid;
this.getData(true);
}
}
};
</script>