cert-contractor-list.vue
10.8 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
<!--证照列表:生产厂商-->
<script>
import model_tab from './cert-tab-include.vue';
import model_rate from './cert-rate-include.vue';
module.exports = {
data: function () {
return {
requestS:false,
tab_index:2,// 标签页
licsType:'10',// 证照类型
title:'生产厂商',
imgArry:[],
//生产厂商
dataList:[],
// 查询条件
search:{
pageSize: 50,
pageNo: 1,
totalPages: 0,
total:0,
// 查询条件
param:{
keyvalue:'',
}
// licsType:this.licsType
},
}
},
methods:{
// 获得初始数据
getData: function(){
var self = this;
self.requestS = true;
Ajax.post('/supplierProductLic/Producer',self.search)
.then(function (response) {
var data = response.data;
self.requestS = false;
if(data.errorCode==0){
self.$set('dataList', data.data.list);
self.search.pageNo = data.data.pageNo;
self.search.totalPages = data.data.totalPages;
self.search.total = data.data.total;
}else{
layer.msg('数据获取异常!');
}
});
},
// 查询之后的数据:需要初始化页码
getSearchData:function(){
var self = this;
self.search.pageNo = 1;
self.getData();
},
// 医疗器械注册证 - 查询注册证关联的商品
listAccordion:function(index){
var self = this;
var dpoObj = self.dataList[index];
if(dpoObj.search==null){
// 设置每组的查询条件
dpoObj.search = {
pageSize:10,
pageNo: 1,
totalPages: 0,
param:{
ywguid:dpoObj.guid,
}
};
}
Ajax.post('/certacc/listProducerGoods',dpoObj.search)
.then(function (response) {
var data = response.data.data;
if(response.data.errorCode==0){
self.$set('dataList['+index+'].mxList', data.list);
dpoObj.search.pageNo = data.pageNo;
dpoObj.search.totalPages = data.totalPages;
dpoObj.search.total = data.total;
self.$set('dataList['+index+'].search',dpoObj.search);
}else{
}
});
},
slideup:function(index,num){
$("#row-l"+num+index).slideUp(400,function(){
$("#ct-r"+index).removeClass('active');
$("#isFocus"+num+index).removeClass("focus");
$(".ct-col:eq("+index+")").removeClass('activate');
});
},
slidedown:function(index,num){
var clss=$("#ct-r"+index).attr("class");
if(clss.indexOf("active")!=-1){
this.slideup(index,num);
return;
}
this.listAccordion(index);
$("#ct-r"+index).addClass("active");
$("#isFocus"+num+index).addClass("focus");
$("#row-l"+num+index).slideDown(400,function(){
});
},
showBigImgs:function(obj){
var jsonStr='[', imgReg = /\.(jpg|jpeg|png|gif|bmp)$/i; //判断字符串是否为图片路径;
if(obj!=null && obj.length>0){
obj=JSON.parse(obj);
for(var i=0;i<obj.length;i++){
var path=imgReg.test(obj[i].original.path) ? obj[i].original.path : obj[i].original.path+obj[i].original.name;
jsonStr+='"'+path+'",';
}
jsonStr=jsonStr.substring(0,jsonStr.length-1);
}
jsonStr+=']';
this.$set('imgArry',JSON.parse(jsonStr));
$("#bigImgs").click();
},
},
route: {
activate: function () {
this.getData();
}
},
components: {
model_tab,model_rate
},
};
</script>
<template>
<div>
<div class="container resource close-left-menu contaNEW">
<!--完整率-->
<model_rate :licstype="licsType" :title="title" v-on:click="getData"></model_rate>
<!--不同证照的标签页切换-->
<model_tab :tab_index="tab_index" :licsnum="search.total"></model_tab>
<!--搜索区域-->
<!-- <div class="clearfix pt20">
<form action="###" class="filter-form fl ">
<input type="text" placeholder="请输入搜索条件" v-model="search.param.keyvalue">
<input type="button" @click="getSearchData" value="搜索"></form>
</div> -->
<div class="clearfix pt20">
<form class="search-bar" active="###" >
<input type="text" placeholder="输入关键词" class="ipt" v-model="search.param.keyvalue">
<div class="search-btn">
<input type="button" @click="getSearchData" value="搜索">
</div>
</form>
</div>
<imagebox v-bind:imgarr="imgArry">
<span class="pic-max blue-search" id="bigImgs"></span>
</imagebox>
<div class="tab-section">
<div class="ctable ct-parent">
<div class="ct-head" id='t_header'>
<span class="ct-col w50">序号</span>
<span class="ct-col w250">生产厂商</span>
<span class="ct-col w100">供应种类</span>
<span class="ct-col w70">商品数</span>
<span class="ct-col w70">营业执照</span>
<span class="ct-col w100">生产许可证</span>
<span class="ct-col w100">税务登记证</span>
<span class="ct-col w120">组织机构代码证</span>
<span class="ct-col w80">操作</span>
</div>
<div class="ct-row " v-for="detailpo in dataList" id="ct-r{{$index}}">
<div class="row-line">
<span class="ct-col w50">{{$index+1}}</span>
<span class="ct-col w250 break-it activate t-left pr10">
{{detailpo.producer}}
</span>
<span class="ct-col w100">{{detailpo.detailpotype | supplierType}}</span>
<span class="ct-col w70 activate" id="isFocus1{{$index}}" v-if="detailpo.goodsCount>0">
<div>
<a href="javascript:void(0);" class="txt_underline text-color-green"
@click="slidedown($index,1)" >{{detailpo.goodsCount}}</a>
</div>
</span>
<span class="ct-col w70" v-if="detailpo.goodsCount<=0">
<div>
{{detailpo.goodsCount}}
</div>
</span>
<span class="ct-col w70" :class="detailpo.picCount1>
0?'':'empting'">
{{detailpo.picCount1>0?"有":"缺"}}
</span>
<span class="ct-col w100 " :class="detailpo.picCount4>
0?'':'empting'">
{{detailpo.picCount4>0?"有":"缺"}}
</span>
<span class="ct-col w100" :class="detailpo.picCount3>
0?'':'empting'">
{{detailpo.picCount3>0?"有":"缺"}}
</span>
<span class="ct-col w120" :class="detailpo.picCount2>
0?'':'empting'">
{{detailpo.picCount2>0?"有":"缺"}}
</span>
<span class="ct-col w80 pt9">
<a class="btn button-green " v-link="{path:'/certContractor/'+detailpo.guid}" href="javascript:void(0);">明细</a>
</span>
</div>
<div class="row-launch" style="display:none;" id="row-l1{{$index}}">
<h3>商品数({{detailpo.search==null?0:detailpo.search.total}})</h3>
<table class="itable">
<thead>
<tr>
<th class="w40">序号</th>
<th class="w80">商品编号</th>
<th class="w100">商品名称</th>
<th class="w100">规格</th>
<th class="w100">小包装含量</th>
<th class="w100">包装单位</th>
<th class="w100">进口/国产</th>
<th class="w100">注册证号</th>
<th class="w80">照片</th>
</tr>
</thead>
<tbody>
<tr v-if="!detailpo.mxList" >
<td colspan="9">暂无符合条件的记录</td>
</tr>
<tr v-else v-for="mx in detailpo.mxList" >
<td>{{$index+1 }}</td>
<td>{{mx.goodscode}}</td>
<td class="t-left">
<p class="ellipsis-sty w150">
<a :title="mx.goodsname" style="cursor: default;">{{mx.goodsname}}</a>
</p>
</td>
<td class="t-left">
<p class="ellipsis-sty w150">
<a :title="mx.goodsspec" style="cursor: default;">{{mx.goodsspec}}</a>
</p>
</td>
<td>{{mx.minunitqty}}</td>
<td>{{mx.minunitstyle}}</td>
<td>{{mx.importedflag | IMPORTEDFLAG}}</td>
<td>{{mx.registkey}}</td>
<td>
<div class="pro-box big-imgs" v-if="mx.pictcontent!=null && mx.pictcontent!=''" @click="showBigImgs(mx.pictcontent)" style="background-image: url({{mx.pictcontent | thumbnail}})"></div>
<div class="pro-box pro-pic" v-if="mx.pictcontent==null || mx.pictcontent==''" style="background-image: url(/images/default.jpg)">
<!--<span class="pic-max blue-search"></span>-->
</div>
</td>
</tr>
</tbody>
</table>
<div class="pagination page-line" v-if="detailpo.mxList" >
<pagination
@page-change="listAccordion($index)"
:page-no.sync="detailpo.search.pageNo"
:total-pages.sync="detailpo.search.totalPages">
</pagination>
</div>
<div class="zip" @click="slideup($index,1)"></div>
</div>
</div>
</div>
<div class="pagination m-20-0">
<pagination
@page-change="getData"
:page-no.sync="search.pageNo"
:total-pages.sync="search.totalPages"></pagination>
</div>
</div>
</div>
<div class="roll-bg" v-if='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>