audit-data.vue
9.01 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
<template>
<div class="container resource close-left-menu" style="min-height: 621px;">
<div class="pop-banner clearfix">
<form class="search-bar" active="###" @submit.prevent="domedsupplier()">
<div class="search-btn">
<input type="submit" value="搜索"> </div>
<input type="text" style="color:black;" placeholder="输入供应商名称" v-model="search.itemName"></form>
<h3 class="current-module">资料审核</h3>{{dual}}
</div>
<!--supply-data start-->
<div class="verify-data clearfix">
<div class="data-root">
<div class="root-node" style="overflow:auto;" v-if='supplierNameList'>
<div v-for="hospital in supplierNameList">
<div class="list-node box-shadow" @click="getData(true,$index)"><span class="node-btn"></span>{{hospital.medName}}
</div>
<div class="list-show" v-if='hospital.state'>
<div class="box-shadow" v-for="(index,supplierid) in hospital.supplierid" @click="domedsupplier(supplierid,hospital.medGuid)">{{hospital.suppliername[index]}}
</div>
</div>
</div>
</div>
</div>
<div class="data-list" v-if='supplierList' style='width: 700px;margin-left: 300px!important;'>
<div v-for="supplier in supplierList">
<!-- 左边显示 -->
<div class="list-tit clearfix">
<!-- <img src="/assets/c5.jpg"> -->
<h3><a class="btn-d btn-d-green" style="border: none !important;text-decoration:underline;" v-link="{path:'/audit/edit/' + supplier.id +'/' + supplier.medGuid+'/'+ supplier.distrbGuid+'/o'}">{{supplier.itemName}}</a>
</h3>
<span>
<em>{{supplier.updateCount}}</em>类事项待审核</span>
</div>
<div class="list-show clearfix" v-if='supplier'>
<div class="sub-tr">
<strong class="sub-tr-tit img-icon-book">基本资料</strong>
<div class="sub-tr-right">
<div class="sub-tr-item img-icon-company">
<strong>企业资料</strong>
<p><em>{{supplier.entUpdateCount}}</em>项变更</p>
</div>
<div class="sub-tr-item img-icon-product">
<strong>商品资料</strong>
<p><em>{{supplier.goodsUpdateCount}}</em>项变更</p>
</div>
<!-- <div class="sub-tr-item img-icon-supply">
<strong>供应品种关系</strong>
<p class="p-add"><em>{{supplier.goodsInsertCount}}</em>条申请增加</p>
<p><em>{{supplier.custStopCount}}</em>条申请停止供应</p>
<p><em>{{supplier.custUpdateCount}}</em>项变更</p>
</div> -->
</div>
</div>
<div class="sub-tr">
<strong class="sub-tr-tit img-icon-card">产品证照</strong>
<div class="sub-tr-right">
<div class="sub-tr-item img-icon-mechanics">
<strong>医疗器械注册证</strong>
<p><em>{{supplier.licUpdateCount}}</em>项变更</p>
</div>
<div class="sub-tr-item img-icon-empower">
<strong>经销授权书</strong>
<p><em>{{supplier.authUpdateCount}}</em>项变更</p>
</div>
<!-- <div class="sub-tr-item img-icon-price">
<strong>物价</strong>
<p><em>{{supplier.priceUpdateCount}}</em>项变更</p>
</div> -->
<div class="sub-tr-item img-icon-manufacturer">
<strong>生产厂商</strong>
<p><em>{{supplier.factoryUpdateCount}}</em>项变更</p>
</div>
<!-- <div class="sub-tr-item img-icon-agent">
<strong>一级代理商</strong>
<p><em>{{supplier.proxyUpdateCount}}</em>项变更</p>
</div> -->
<!-- <div class="sub-tr-item img-icon-service">
<strong>售后服务机构</strong>
<p><em>{{supplier.serviceUpdateCount}}</em>项变更</p>
</div> -->
</div>
</div>
<div class="sub-tr">
<strong class="sub-tr-tit img-icon-relation">供应关系</strong>
<div class="sub-tr-right">
<!-- <div class="sub-tr-item img-icon-license">
<strong>合规证照</strong>
<p><em>{{supplier.complianceLicCount}}</em>项变更</p>
</div> -->
<div class="sub-tr-item img-icon-empower">
<strong>业务授权书</strong>
<p><em>{{supplier.smAuthorizeCount}}</em>项变更</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!--supply-data end-->
<div class="pagination m-20-0">
<pagination @page-change="getData" :class="['m-20-0']" :page-no.sync="search.pageNo" :total-pages.sync="search.totalPages"></pagination>
</div>
</div>
</template>
<script>
module.exports = {
data: function() {
return {
supplierList: [],
supplierNameList: [],
checkIdList: [],
search: {
pageSize: 3,
pageNo: 1,
totalPages: 1,
itemName: '',
supplierId: '',
medguid: '',
clienttype: 'o',
},
authoritySetting: {
oneSearchFlag: false,
},
height: 0,
};
},
computed: {
dual: function() {
var self = this;
var curMenuRole = this.$store.state.user.curMenuRole;
//this.$store.state.user.userName;
return '';
}
},
watch: {
checkIdList: function(val) {
this.checkon();
},
},
methods: {
getData: function(falg, index) {
var self = this;
if(falg) {
var index = index;
var num = 0;
self.supplierNameList[index].state = !self.supplierNameList[index].state;
} else {
var index = 0;
var num = (self.search.pageNo - 1) * 3;
}
var supplierid = self.supplierNameList[index].supplierid;
self.supplierList = [];
// if(isRefresh) {
// this.search.pageNo = 1;
// this.search.supplierId ='';
// this.search.medguid ='';
// }
for(var a = num; a < self.search.pageNo * 3; a++) {
Ajax.post('/user/AuditsupplierForOne', {
'supplierId': supplierid[a]
})
.then(function(response) {
var res = response.data;
// self.$set('',data.list);
if(res.errorCode == 0 && !!res.data && res.data.length > 0) {
self.supplierList.push(res.data[0]);
self.search.pageNo = 1;
} else {
layer.msg("无结果,请更改查询条件");
}
// else{
// self.MessageBox({title:'提示',message:res.message,type:'alert'})
// }
// if(data.list.length == 0 && self.search.itemName.length != 0){
// self.MessageBox({title:'提示',message:"无结果,请更改查询条件",type:'alert'})
// }
})
}
self.search.totalPages = supplierid.length % 3;
},
getSupplistListData: function() {
var self = this;
Ajax.post('/user/auditsupplierNameList', self.search)
.then(function(response) {
var data = response.data.data;
if(data != null && data != undefined) {
for(var a=0;a<data.length;a++){
data[a].state=false;
}
self.$set('supplierNameList', data);
self.getData(false);
}
})
},
checkon: function() {
var self = this;
var length = this.checkIdList.length;
var tempId = "";
for(var i = 0; i < length; i++) {
tempId = tempId + this.checkIdList[i] + ",";
}
if(tempId != "") {
tempId = tempId.substring(0, tempId.length - 1);
tempId = "'" + tempId + "'";
self.search.supplierId = tempId;
self.search.pageNo = 1;
// Ajax.post('/user/auditsupplierListByLeft', self.search)
// .then(function (response){
// var data = response.data.data;
// if (data!=null && data!=undefined) {
// self.$set('supplierList',data.list);
// self.search.totalPages = data.totalPages;
// }
// })
} else {
self.search.supplierId = '';
self.getData(false);
}
},
domedsupplier: function(supplierId,medGuid) {
var self = this;
self.supplierList = [];
Ajax.post('/user/AuditsupplierForOne', {
'supplierId': supplierId,
'medguid': medGuid,
itemName: self.search.itemName
})
.then(function(response) {
var res = response.data;
// self.$set('',data.list);
if(res.errorCode == 0 && !!res.data && res.data.length > 0) {
self.supplierList.push(res.data[0]);
} else {
layer.msg("无结果,请更改查询条件");
}
// else{
// self.MessageBox({title:'提示',message:res.message,type:'alert'})
// }
// if(data.list.length == 0 && self.search.itemName.length != 0){
// self.MessageBox({title:'提示',message:"无结果,请更改查询条件",type:'alert'})
// }
})
self.search.itemName = '';
// self.search.supplierId = supplierId;
// self.search.medguid = medguid;
// self.search.pageNo = 1;
// Ajax.post('/user/auditsupplierListByLeft', self.search)
// .then(function (response){
// var data = response.data.data;
// if (data!=null && data!=undefined) {
// self.$set('supplierList',data.list);
// self.search.totalPages = data.totalPages;
// }
// })
},
},
route: {
activate: function() {
this.getSupplistListData();
this.supplierList = [];
this.supplierNameList = [];
this.auditsupplierListByLeft = [];
}
}
};
</script>