procurement-catalog-audit.vue
7.97 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
<template>
<div class="container resource close-left-menu contaNEW">
<div class="pop-banner clearfix">
<div class="operate-btns">
<a @click="audit()" class="fbtn fb-to-examine" >审核</a>
<a @click="closeUp(true)" class="fbtn fb-reject hide">驳回</a>
</div>
<h3 class="current-module">采购目录审核</h3>
</div>
<div class="pop-refused-reasons" style="z-index:10;" v-show="showPopupUp">
<div class="pop-rr-tit text-color-blue" style="text-align:left;">驳回理由</div>
<textarea class="input-border" v-model="rejectionreason"></textarea>
<div class="from-button fr mt-10">
<a href="javascript:;" class="red-button p-lr-10" @click="close(false)">取 消<i>|</i></a>
<a href="javascript:;" class="green-button p-lr-10" @click="rebuitApprove(idList,'V01',false,$route.params.clientType)">提 交</a>
</div>
</div>
<!--supply-supplylist start-->
<div class="supplylist clearfix supply-select">
<div class="supplylist-root pt0 w245">
<form class="search-bar" style="min-width: 215px;" active="###">
<div class="search-btn fr cur-poin" @click='getMedList'>
</div>
<input type="text" class="w163" maxlength="20" v-rule placeholder="输入供应商搜索" v-model="medname">
</form>
<div class="root-node-news">
<b class="fl w30 t-center">序号</b>
<b class="fl w180 t-center">供应商</b>
</div>
<div class="root-node-list" id="sortable" style='height: 480px;'>
<template v-for="(indexI,medlist) in getMedLists">
<div class="list-node" style='min-height:50px;line-height:25px;' :class="{ 'active': activeI == indexI }" @click="getMed(indexI,medlist.contentguid,medlist.supplierguid)">
<div class="fl w30 t-center">{{$index + 1}}</div><div class="fl w180 t-left"><a style="cursor: default;" title="{{ medlist.medsuppliername }}">{{ medlist.medsuppliername }}</a></div>
</div>
</template>
</div>
</div>
<div class="supplylist-table ml-265">
<div class="w613 h-50">
<form class="search-bar w370 fl" active="###">
<div class="search-btn fr cur-poin" @click='getMedListClick'>
</div>
<input type="text" maxlength="50" v-rule placeholder="录入商品编码、商品名称、注册证号模糊搜索" v-model="goodsinfo">
</form>
</div>
<div class="fheader no-bottom pd0">
<h4 class="fh-good">商品列表</h4>
</div>
<table class="itable itable-thead-13px">
<thead>
<tr>
<th class="w30">序号</th>
<th class="w100">医院商品</th>
<th class="w100">供应商商品</th>
<th class="w30"></th>
<th class="w50">单位系数转换</th>
<th class="w100">采购价</th>
<th class="w70">结算方式</th>
<th class="w100">委托配送商</th>
</tr>
</thead>
<tbody>
<tr v-for="mFMedGoods in getMedcontentList">
<td>{{ $index + 1 }}</td>
<td><div class="t-left pr10">{{ mFMedGoods.mgoodscode }}<br>{{mFMedGoods.mgoodsname}}<br/>{{mFMedGoods.mgoodsspec}}<br/>{{mFMedGoods.mproducer}}<br/>{{mFMedGoods.mregistkey}}</div></td>
<td v-if="mFMedGoods.contentstate != 'P4'"><div class="t-left pr10">{{ mFMedGoods.sgoodscode }}<br>{{mFMedGoods.sgoodsname}}<br/>{{mFMedGoods.sgoodsspec}}<br/>{{mFMedGoods.sproducer}}<br/>{{mFMedGoods.mregistkey}}</div></td>
<td v-else class="text-color-red"><div class="t-left pr10 mt-50"><b>供应商放弃供应</b></div></td>
<td>
<span class="ct-col w30">
<span class="table-detail-icon icon-green">医</span>
<span class="table-detail-icon icon-green mt-20">供</span>
</span>
</td>
<td>
{{mFMedGoods.purconverratio}}{{mFMedGoods.unitstyle}}<br><br>
{{mFMedGoods.supconverratio}}{{mFMedGoods.supplyunit}}
</td>
<td>{{ mFMedGoods.purchaserprice | numDigit 2 | numFmt }}</td>
<td>{{ mFMedGoods.settlemethod | method}}</td>
<td>{{mFMedGoods.distribuname}}</td>
</tr>
</tbody>
</table>
<div class="pagination m-20-0">
<em class="page">明细条目数【{{ search.total }}】</em>
<pagination
@page-change="getMedListClick"
:class="['m-20-0']"
:page-no.sync="search.page"
:total-pages.sync="search.totalPages">
</pagination>
</div>
</div>
</div>
<!--supply-supplylist end-->
</div>
</template>
<script>
module.exports={
data: function(){
return {
getMedLists: [], //左侧列表
medname:'',
goodsinfo:'',
getMedcontentList:[],
search: {
pageSize: 5,
page: 1,
total: 0,
totalPages: 0
},
getNoMedGoods:'',
getNoGoods:'',
guid:'',
supplierguid:'',
showPopupUp:false,
rejectionreason:'',
activeI :[],
noAudit:false,//防止重复点击审核
};
},
methods: {
//左侧列表 加载数据
getMedList:function(){
var self = this;
Ajax.post('/procurment/getSuppliers',{'medname':self.medname})
.then(function(response){
var data=response.data.data;
if (response.data.errorCode == 0) {
self.$set("getMedLists",data);
for (var i = 0; i < data.length; i++) {
self.guid =data[0].contentguid;
self.supplierguid =data[0].supplierguid;
}
self.getMedListClick();
}else{
layer.msg(response.data.message);
}
})
},
getMed:function(indexI,guid,supplierguid){
var self =this;
self.activeI = indexI;
self.guid = guid;
self.supplierguid = supplierguid;
self.search.page = 1;
self.getMedListClick();
},
//加载右侧商品数据
getMedListClick:function(){
var self = this;
Ajax.post('/procurment/getWaitAuditGoods',{'page':self.search.page,'pageSize':self.search.pageSize,'totalPages':self.search.totalPages,'contentguid':self.guid,'goodsinfo':self.goodsinfo})
.then(function(response){
var data=response.data.data;
self.$set("getMedcontentList",data.list);
self.search.totalPages=data.totalPages;
self.search.total=data.total;
})
},
//审核
audit:function(){
var self = this;
if(self.guid == null || self.guid == ''){
layer.msg('请选择需要审批的供应商!');
return;
}
if(self.noAudit){
return;
}
self.noAudit = true;
Ajax.post('/procurment/audit',{'contentguid':self.guid,'supplierguid':self.supplierguid})
.then(function(response){
self.noAudit = false;
var data=response.data.data;
self.getMedList();
if (response.data.errorCode == 0) {
if(response.data.data == 0){
self.MessageBox({title:'提示', message:'审核成功!', type: 'alert'},function(action){
//跳转
/*self.$router.go({
path: '/procurementList'
});*/
});
}else{
layer.msg('审核成功!');
return;
}
}else{
layer.msg('审核失败!');
}
})
},
closeUp:function(flag) {
var self = this;
self.$set('showPopupUp',flag);
},
close:function(flag) {
var self = this;
self.$set('showPopupUp',flag);
},
},
route:{
activate : function(){
this.getMedList();
}
}
};
</script>