salesman-audit.vue
15.5 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
<template>
<div class="container resource close-left-menu contaNEW">
<div class="pop-banner clearfix">
<div class="operate-btns">
<a @click="checkChange(listArr,'2')" class="fbtn fb-to-examine">批量审核</a>
<a @click="rejectData(listArr,'3')" class="fbtn fb-reject">批量驳回</a>
</div>
<h3 class="current-module">业务员审核</h3>
</div>
<!--采购目录 start-->
<div class="purchase-plan">
<div class="pd-form fast-search-form">
<div class="group-row">
<div class="form-group form-label">
<div class="control">
<input type="text" id="cn1" maxlength="50" v-rule v-model='search.goodsinfo' title='商品信息' placeholder="商品信息">
</div>
</div>
<div class="form-group form-label">
<div class="control">
<input type="text" id="cn2" maxlength="20" v-rule v-model="search.suppliername" title='供应商名称' placeholder="供应商名称">
</div>
</div>
</div>
<div class="group-row">
<div class="form-group form-label">
<div class="control">
<input type="text" id="cn3" maxlength="8" v-rule v-model="search.staffname" title='人员' placeholder="人员"></div>
</div>
<div class="form-group ">
<label class="label w80 fl">业务状态</label>
<div class="control control-filtering control-filtering-green fl w380">
<a class="option" :class="{'all active':search.checkstate==''}" href="javascript:void(0)"
@click="search.checkstate=''">全部</a>
<a class="option" :class="{'all active':search.checkstate=='1'}" href="javascript:void(0)"
@click="search.checkstate='1'">未审批</a>
<a class="option" :class="{'all active':search.checkstate=='2'}" href="javascript:void(0)"
@click="search.checkstate='2'">审批通过</a>
<a class="option" :class="{'all active':search.checkstate=='3'}" href="javascript:void(0)"
@click="search.checkstate='3'">已驳回</a>
</div>
</div>
</div>
<div class="group-row t-right">
<button class="fast-search-form-btn btn-d btn-d-lg btn-d-activate btn-d-circle"
@click="getData(true)">查 询
</button>
</div>
</div>
<table class="itable itable-bordertop itable-thead-13px itable-tr-border-dash">
<thead id="t_header">
<tr>
<th class="w50">
<div class="checkbox-control" v-if="search.checkstate =='' || search.checkstate =='1'">
<input type="checkbox" id="pro.guid" v-model="allCheck" @click="clickCheckAll(allCheck)"
:value="1">
<label class="checkbox" for="pro.guid">序号</label>
</div>
<div v-else>序号</div>
</th>
<th class="w150">医院商品</th>
<th class="w150">供应商商品</th>
<th class="w30"></th>
<th class="w90">价格(元)</th>
<th class="w120">通用名</th>
<th class="w100">人员</th>
<th class="w70">状态</th>
<th class="w100" >原因</th>
<th class="w120" >操作</th>
</tr>
</thead>
<tbody>
<tr v-if="getMedcontentList.length==0">
<td colspan="11">暂无数据!</td>
</tr>
<tr v-for="pro in getMedcontentList">
<td>
<div class="checkbox-control" v-if="pro.checkstate =='' || pro.checkstate =='1'">
<input type="checkbox" id="{{pro.guid}}" v-model="pro.checked">
<label class="checkbox" for="{{pro.guid}}">{{ $index + 1 }} </label>
</div>
<div v-else>
{{ $index + 1 }}
</div>
</td>
<td class="t-left pr10">
{{pro.medgoodscode}}</br>
<span class="p-tit-green">{{pro.medgoodsname}}</span></br>
{{pro.medgoodsspec}}</br>
{{pro.medproducer}}</br>
{{pro.medregistkey}}
</td>
<td class="t-left pr10">
{{pro.supgoodscode}}</br>
<span class="p-tit-green">{{pro.supgoodsname}}</span></br>
{{pro.supgoodsspec}}</br>
{{pro.supproducer}}</br>
{{pro.supregistkey}}
</td>
<td>
<span class="ct-col w30">
<span class="table-detail-icon icon-green">新</span>
<span class="table-detail-icon bg-orange mt-10">旧</span>
</span>
</td>
<td class="pr10 lh-30">
<div v-if="pro.newprice">
{{pro.newprice}}</br>
<!--{{pro.oldprice}}-->
<span class="text-color-or">{{pro.oldprice}}</span>
</div>
</td>
<td class="lh-30 ">
<div v-if="pro.newchemicalname">
<div title="{{pro.newchemicalname}}" style="width: 120px; overflow: hidden;
display: block; text-overflow: ellipsis; white-space: nowrap; cursor: pointer;">{{pro.newchemicalname || ' '}}</div>
<span class="text-color-or">{{pro.oldchemicalname}}</span>
</div>
</td>
<td class="lh-30 ">
<div v-if="pro.newstaffname">
<span title="{{pro.newstaffname}}" class="">{{pro.newstaffname || ' '}}</span>
</br>
<span title="{{pro.oldstaffname}}" class="text-color-or">{{pro.oldstaffname}}</span>
</div>
</td>
<!--(1:未审核 2:审核通过 3:审核未通过)-->
<td class="lh-38"><span
:class="pro.checkstate=='1'?'text-color-or': (pro.checkstate=='2'?'text-color-blue':'text-color-red' )"> {{pro.checkstate |checkstate }}</span>
</td>
<td >
{{pro.checkerMemo}}
</td>
<td class="pr20" >
<div class="from-button" v-if="pro.checkstate =='' || pro.checkstate =='1'">
<a href="javascript:;" class="green-button p-lr-10" @click="checkChange([pro.guid],'2')">审核<i>|</i></a>
<a href="javascript:;" class="red-button p-lr-10" @click="rejectData([pro.guid],'3')">驳回</a>
</div>
<div class="from-button" v-else>
<a href="javascript:;"
class="green-button p-lr-10 text-color-custom readonly-gray">审核<i>|</i></a>
<a href="javascript:;" class="red-button p-lr-10 text-color-custom readonly-gray">驳回</a>
</div>
</td>
</tr>
</tbody>
</table>
<div class="pagination m-20-0">
<em class="page">明细条目数【{{ search.total }}】</em>
<pagination @page-change="getData()" :class="['m-20-0']" :page-no.sync="search.page"
:total-pages.sync="search.totalPages">
</pagination>
</div>
</div>
<div class="modal" v-show='showPopupUp'>
<div class="pop-refused-reason" style="z-index:10;left:35%;top:35%;">
<div class="pop-rr-tit text-color-blue" style="text-align:left;">驳回理由</div>
<textarea class="input-border" v-model="reason" style='width:100%;padding: 5px'></textarea>
<div class="from-button fr mt-10">
<a href="javascript:;" class="red-button p-lr-10" @click="showPopupUp=false">取 消<i
style='font-style: inherit'>|</i></a>
<a href="javascript:;" class="green-button p-lr-10" @click="submit(rejectArr,'3')">确 定</a>
</div>
</div>
</div>
<!--采购目录 end-->
</div>
</template>
<script>
module.exports = {
data: function () {
return {
search: {
pageSize: 50,
page: 1,
totalPages: 0,
total: 0,
goodsinfo: '',
suppliername: '',
staffname: '',
checkstate: '1',
},
getMedcontentList: [],
allCheck: false,
checkArr: [],
listArr: [],
showPopupUp: false,
reason: '',
rejectArr:[]
};
},
methods: {
//新增采购目录,判断是否可以跳转
newCatalogue: function () {
var self = this;
Ajax.post('/procurment/decideAddMedContentList', {})
.then(function (response) {
var data = response.data.data;
if (response.data.errorCode == 0) {
if (data == "Y") {
self.$router.go({
'path': '/newCatalogue'
});
} else {
self.MessageBox({
title: '提示',
message: '建立关系的供应商未配置权限字段,不可使用采购目录!',
type: 'alert'
}, function (action) {
return;
});
}
}
})
},
//加载数据
getData: function (isRefresh) {
var self = this;
if (isRefresh) {
this.search.page = 1;
}
self.$set("getMedcontentList", []);
Ajax.post('/procurment/getTrmedcontentdetailchanges', self.search)
.then(function (response) {
var data = response.data.data;
self.$set("getMedcontentList", data.list);
self.search.totalPages = data.totalPages;
self.search.total = data.total;
})
},
// 审核方法
checkTrmedcontentdetailchange: function (item, state, memo) {
var self = this;
Ajax.post('/procurment/checkTrmedcontentdetailchange', {
guids: item,
checkstate: state,
checkerMemo: memo,
}).then(function (response) {
var data = response.data.data;
self.allCheck = '';
if (data) {
self.MessageBox({
title: '提示',
message: '操作成功!',
type: 'alert'
}, function (action) {
window.location.reload();
});
} else {
layer.msg(response.data.message);
}
})
},
// 审核
checkChange: function (item, state, memo) {
if (item == null || item == '') {
layer.msg('请勾选数据')
return;
}
this.checkTrmedcontentdetailchange(item, state, memo)
},
// 驳回
rejectData: function (item) {
var self = this;
if (item.length == 0) {
layer.msg('请勾选数据')
return;
}
self.showPopupUp = true;
self.rejectArr=item;
},
submit: function (item, state) {
var self = this;
if (self.reason.trim() == '') {
layer.msg('请输入驳回理由!')
return;
} else {
this.checkTrmedcontentdetailchange(item, state, self.reason)
self.showPopupUp = false;
}
},
clickCheckAll: function () {
console.log(this.allCheck);
var self = this;
for (var a = 0; a < self.getMedcontentList.length; a++) {
if (self.getMedcontentList[a].checkstate==''||self.getMedcontentList[a].checkstate=='1' ) {
self.$set("getMedcontentList["+ a +"].checked",!self.allCheck);
}
}
},
},
route: {
activate: function () {
this.search={
pageSize: 50,
page: 1,
totalPages: 0,
total: 0,
goodsinfo: '',
suppliername: '',
staffname: '',
checkstate: '1',
}
this.getData(true);
}
},
watch: {
'search.checkstate': function () {
this.getData(true);
},
'getMedcontentList': {
handler(checkbox) {
var self = this;
var arr = [];
let sum=0;
if (checkbox != null && checkbox != '') {
for (var a = 0; a < checkbox.length; a++) {
if (checkbox[a].checked) {
arr.push(checkbox[a].guid);
}
if (checkbox[a].checkstate=='' || checkbox[a].checkstate=='1') {
sum++
}
}
if (arr.length == sum) {
self.$set('allCheck',true);
}else {
self.$set('allCheck',false);
}
self.listArr = arr;
console.log(self.listArr)
}
},
deep: true
},
}
};
</script>