basic-data-integrity3.vue
16.3 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
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
<template>
<div class="container resource close-left-menu contaNEW">
<div class="pop-banner clearfix">
<div class="operate-btns" v-if="editList">
<a @click="getData" class="fbtn fb-refresh">刷新</a>
<a @click="edit" class="fbtn fb-modify">修改</a>
</div>
<div class="read-btns ml-30" v-if="editList">
<a class="fbtn rb-remove" v-if="'/supplierEvaluate/delLCRequireValue'">删除</a>
<a class="fbtn rb-save" v-if="'/supplierEvaluate/updateLCRequireValue'">保存</a>
</div>
<div class="operate-btns" v-else>
<a @click="getData" class="fbtn fb-refresh">刷新</a>
<a class="fbtn fb-modify">修改</a>
<a @click="removeInd" class="fbtn fb-remove" v-if="'/supplierEvaluate/delLCRequireValue'">删除</a>
<a @click="save" class="fbtn fb-save" v-if="'/supplierEvaluate/updateLCRequireValue'">保存</a>
</div>
<h3 class="current-module">供应商评价标准配置</h3>
</div>
<div class="step-tips step-3 clearfix" v-if="ban">
<div class="step-item cur-poin" v-on:click="skip('basicDataIntegrity')">
<span class="cur-poin">1</span><span class="cur-poin">供应质量</span>
</div>
<div class="step-item cur-poin" v-on:click="skip('basicDataIntegrity2')">
<span class="cur-poin">2</span><span class="cur-poin">供应及时性</span>
</div>
<div class="step-item active cur-poin">
<span class="cur-poin">3</span><span class="cur-poin">资料完整性</span>
</div>
</div>
<div class="step-tips step-3 clearfix" v-else>
<div class="step-item cur-poin" v-link="{path:'/basicDataIntegrity'}">
<span class="cur-poin">1</span><span class="cur-poin">供应质量</span>
</div>
<div class="step-item cur-poin" v-link="{path:'/basicDataIntegrity2'}">
<span class="cur-poin">2</span><span class="cur-poin">供应及时性</span>
</div>
<div class="step-item active cur-poin">
<span class="cur-poin">3</span><span class="cur-poin">资料完整性</span>
</div>
</div>
<div class="basic-card-show">
<div class="basic-data-inter3">
<div class="basic-data-inter3-left">
<div class="basic-data-inter3-left-div">
<table class="itable basic-user-info data-ind-table table-bor-trl">
<thead>
<tr>
<th class="w70 border1">序号</th>
<th class="w100 border1">资料名称</th>
<th class="w130 border1">已配置数</th>
<th class="w80 border1">开启管理日期</th>
<th class="w100 border1">管理操作</th>
<th class="w100 border1">权重</th>
<th class="w100 border1">操作</th>
</tr>
</thead>
<tbody v-for="sel in selected" class="txt_v">
<tr>
<td class="pl10">
<div class="checkbox-control checkbox-inline" v-if='editList'>
{{$index+1}}
<input type="checkbox">
<label class="checkbox" style='margin:0 3px;'></label>
</div>
<div class="checkbox-control checkbox-inline" v-else>
{{$index+1}}
<input type="checkbox" :id="sel.basedatacode" v-model="sel.checked">
<label class="checkbox" style='margin:0 3px;' :for="sel.basedatacode"></label>
</div>
</td>
<td class="t-left pr10">{{sel.basedataname}}</td>
<td><p class="text-color-blue">属性{{sel.configuredliccount}}项/
证照{{sel.configuredprocount}}项</p></td>
<td>{{sel.startmanagedate}}</td>
<td>
<a class="btn button-green" @click="star(sel.basedatacode,sel.startstate)" v-if='sel.startstate=="Y"'>已开启</a>
<a class="btn button-red" @click="star(sel.basedatacode,sel.startstate)" v-else>已停止</a>
</td>
<td><input type="text" class="w40 mr-5" v-model="sel.value" :readonly="readonly">%</td>
<td>
<a @click="hideFn(sel.basedatacode)" class="btn button-green">配置</a>
</td>
</tr>
</tbody>
</table>
<span class="basic-data-inter3-left-prev"><<</span>
</div>
<div class="fheader pt0" v-if="hide" style='width:97%;'>
<h4 class="fh-data">资料配置</h4>
<div class="stretch ml-20">
<div class="stretch-push">
</div>
</div>
</div>
<div class="indicators" v-if="hide">
<div class="indicators-left">
<h3 class="b">资料提交内容定义</h3>
<!--table-->
<table class="itable basic-user-info data-inb-table data-ind-table">
<thead>
<tr>
<th class="w60 border1">序号</th>
<th class="w120 border1">属性</th>
<th class="w90 border1">操作</th>
</tr>
</thead>
<tbody v-for="item in selectlist2" class="txt_v">
<tr>
<td>{{$index+1}}</td>
<td class="txt-left pr10">{{item.name}}
</td>
<td>
<a class="btn button-red" @click="remove(item.indexcode,item.code)">删除</a>
</td>
</tr>
</tbody>
</table>
<!--end table-->
<!--table-->
<table class="itable basic-user-info data-ind-table data-inb-table">
<tbody v-for="item in unselectList2" class="txt_v">
<tr>
<td class="w60">{{$index+1}}</td>
<td class="txt-left w120">{{item.name}}</td>
<td class="w90">
<a class="btn button-green" @click="add(item.indexcode,item.code)">添加</a>
</td>
</tr>
</tbody>
</table>
<!--end table-->
</div>
<div class="indicators-right">
<h3 class="b">提交证照定义</h3>
<!--table-->
<table class="itable basic-user-info data-inc-table data-ind-table data-inb-table">
<thead>
<tr>
<th class="w60">序号</th>
<th class="w120 txt-left padd-left-30">属性</th>
<th class="">操作</th>
</tr>
</thead>
<tbody v-for="item in selectlist">
<tr>
<td class="w60">{{$index+1}}</td>
<td class="txt-left w120">{{item.licenseclassname}}</td>
<td class="w90">
<!-- <a class="btn-d btn-d-red btn-w60" v-if="editList">删除</a> -->
<a class="btn button-red" @click="remove2(item.indexcode,item.code)">删除</a>
</td>
</tr>
</tbody>
</table>
<!--end table-->
<!--table-->
<table class="itable basic-user-info data-inc-table data-ind-table data-inb-table">
<tbody v-for="item in unselectList">
<tr>
<td class="w60">{{$index+1}}</td>
<td class="txt-left w120">{{item.licenseclassname}}</td>
<td class="w90">
<!-- <a class="btn-d btn-d-activate btn-w60" v-if="editList">添加</a> -->
<a class="btn button-green" @click="add2(item.indexcode,item.code)">添加</a>
</td>
</tr>
</tbody>
</table>
<!--end table-->
</div>
<div class="indicators-bor"></div>
</div>
</div>
<div class="basic-data-inter3-right">
<h3>待选列表</h3>
<div class="bor_btm_1"></div>
<table class="itable basic-user-info data-inc-table data-ind-table">
<thead>
<tr>
<th class="w80 border1">序号</th>
<th class="w250 border1">质量指标</th>
<th class="w100 border1">操作</th>
</tr>
</thead>
<tbody>
<tr v-for="wait in waits">
<td id="wait.code">{{$index+1}}</td>
<td class="text-left">{{wait.name}}</td>
<td class="pt9">
<a class="btn button-green w85" v-if="wait.isselect=='N'" @click="append($index)">
添加
</a>
<a class="btn button-gray w85" v-else>
已添加
</a>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</template>
<script>
module.exports={
data:function(){
return{
dataList:[],
selectlist:[],
unselectList:[],
selectlist2:[],
unselectList2:[],
waits:{},
selected:{},
editList:true,
readonly:true,
hide:false,
ban:false
}
},
methods:{
getData:function(){
var self = this;
Ajax.post('/supplierEvaluate/getAllLCList').then(function(response){
var res=response.data.data;
self.$set('waits',res);
});
Ajax.post('/supplierEvaluate/getLCRequire').then(function(response){
var res=response.data.data;
self.$set('selected',res);
});
},
remove:function(indexcode,code){
var self=this;
Ajax.post('/supplierEvaluate/delLCRequireForPro',
{'indexcode':indexcode,'code':code}).
then(function(response){
var result=response.data;
if(result.errorCode==0){
self.hideFn(indexcode);
}
})
},
remove2:function(indexcode,code){
var self=this;
Ajax.post('/supplierEvaluate/delLCRequireForLC',
{'indexcode':indexcode,'code':code}).
then(function(response){
var result=response.data;
if(result.errorCode==0){
self.hideFn(indexcode);
}
})
},
add:function(indexcode,code){
var self=this;
Ajax.post('/supplierEvaluate/addLCRequireForPro',
{'indexcode':indexcode,'code':code}).
then(function(response){
var result=response.data;
if(result.errorCode==0){
self.hideFn(indexcode);
}
})
},
add2:function(indexcode,code){
var self = this;
Ajax.post('/supplierEvaluate/addLCRequireForLC',
{'indexcode':indexcode,'code':code}).
then(function(response){
var result=response.data;
if(result.errorCode==0){
self.hideFn(indexcode);
}
})
},
edit:function(){
this.editList=false;
this.readonly=false;
this.ban=true;
},
append:function(index){
var self=this;
Ajax.post('/supplierEvaluate/addLCRequire',
{'basedatacode':self.waits[index].code}).
then(function(response){
var result=response.data;
if(result.errorCode==0){
self.getData();
}
})
},
removeInd:function(){
var arr=[];
var self=this;
for(var i=0;i<self.selected.length;i++){
if(this.selected[i].checked==1){
arr.push(this.selected[i]);
}
};
self.MessageBox({
title:'提示',
message:'是不是删除',
type:'alert',
showCancelButton: true
},function(action){
arr=JSON.stringify(arr);
if (action=="confirm") {
Ajax.post('/supplierEvaluate/delLCRequireValue',arr).
then(function(response){
var result=response.data;
if(result.errorCode==0){
self.getData();
self.init();
}
})
}
})
},
star:function(basedatacode,startstate){
var self=this;
//需要关闭
if(startstate=='Y'){
Ajax.post('/supplierEvaluate/stopLCRequire',{'basedatacode':basedatacode}).then(function(response){
var result=response.data;
if(result.errorCode==0){
self.getData();
self.init();
};
});
}else{
Ajax.post('/supplierEvaluate/startLCRequire',{'basedatacode':basedatacode}).then(function(response){
var result=response.data;
if(result.errorCode==0){
self.getData();
self.init();
};
});
}
},
hideFn:function(basedatacode){
var self=this;
Ajax.post('/supplierEvaluate/getLCRequireForLC',{'basedatacode':basedatacode}).then(function(response){
var result=response.data;
if(result.errorCode==0){
var res=result.data;
self.$set('selectlist',res.selectlist);
self.$set('unselectList',res.unselectList);
self.hide=true;
};
});
Ajax.post('/supplierEvaluate/getLCRequireForPro',{'basedatacode':basedatacode}).then(function(response){
var result=response.data;
if(result.errorCode==0){
var res=result.data;
self.$set('selectlist2',res.selectlist);
self.$set('unselectList2',res.unselectList);
self.hide=true;
};
});
},
save:function(){
var self=this;
var selected=JSON.stringify(self.selected);
Ajax.post('/supplierEvaluate/updateLCRequireValue',selected).then(function(response){
var result=response.data;
if(result.errorCode==0){
self.getData();
self.init();
layer.msg('保存成功');
}else {
layer.msg(result.message);
}
});
},
skip:function(router){
var self=this;
self.MessageBox({
title:'提示',
message:'修改内容是否保存',
type:'alert',
showCancelButton: true
},function(action){
self.init();
if(action=="confirm"){
self.save();
self.init();
}
self.$router.go({ 'path': '/'+rou});
})
},
init:function(){
var self=this;
self.editList=true;
self.readonly=true;
self.hide=false;
self.ban=false;
}
},
route :{
activate: function () {
this.getData();
},
},
}
</script>