outbound-order-review-detail.vue
15 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
<template>
<div class="container resource close-left-menu">
<div class="pop-banner clearfix">
<!-- <div class="operate-btns">
</div> -->
<div class="operate-btns" v-if="list.billstate == 'VD02'">
<a @click="audit()" class="fbtn fb-submit">审核</a>
<a @click="closeUp(true)" class="fbtn fb-return">驳回</a>
</div>
<h3 class="current-module">变更单审核详情</h3>
</div>
<!--purchase-storage start-->
<div class="purchase-storage">
<div class="pd-form mb-40">
<div class="group-row group-row-3">
<div class="form-group form-label">
<label for="cn1" class="label">入库单号</label>
<div class="control">
<input type="text" id='cn1' readonly="readonly" v-model="list.billno" class="inp4">
</div>
</div>
<div class="form-group form-label">
<label for="cn7" class="label">单据类型</label>
<div class="control">
<input type="text" readonly="readonly" v-model="list.billtype | billtype" class="inp4">
</div>
</div>
<div class="form-group form-label">
<label class="label" for='cn3'>执行状态</label>
<div class="control">
<input type="text" id='cn3' readonly="readonly" v-bind:value="list.billstate | billstate_trdos" class="inp4">
</div>
</div>
</div>
<div class="group-row group-row-3">
<div class="form-group form-label">
<label class="label" for='cn6' style="width: 6em;">要求到货日期</label>
<div class="control">
<input type="text" id='cn6' readonly="readonly" v-model="list.planenddate | getYMD" class="inp4" style=" padding-left: 7em!important;">
</div>
</div>
<div class="form-group form-label">
<label class="label">入库单位</label>
<div class="control">
<input type="text" readonly="readonly" v-model="list.medname" class="inp3" style=" padding-left:4.6em!important;">
</div>
</div>
<div class="form-group form-label">
<label class="label">变更日期</label>
<div class="control">
<input type="text" readonly="readonly" v-model="list.variationdate | getYMD" class="inp3" style=" padding-left:4.6em!important;">
</div>
</div>
</div>
<div class="group-row">
<div class="form-group form-label">
<label for="cn7" class="label">操作人</label>
<div class="control">
<input type="text" readonly="readonly" v-model="list.operatername" class="inp3">
</div>
</div>
<div class="form-group form-label">
<label for="cn7" class="label">收货地点</label>
<div class="control">
<input type="text" id='cn7' readonly="readonly" v-model="list.address" class="inp4">
</div>
</div>
</div>
<div class="group-row">
<div class="form-group form-label">
<label for="cn7" class="label">供应商</label>
<div class="control">
<input type="text" readonly="readonly" v-model="list.suppliername" class="inp3">
</div>
</div>
</div>
</div>
<div class="ctable ct-parentr">
<div class="ct-head" id='t_header'>
<span class="ct-col w50">序号</span>
<span class="ct-col w300">商品</span>
<span class="ct-col w120">订货数</span>
<span class="ct-col w120">本次出库数</span>
<span class="ct-col w120">已出库数</span>
<span class="ct-col w130">价格(元)</span>
<span class="ct-col w130">含税价格</span>
</div>
<div class="ct-row" v-for="item in list2">
<div class="row-line">
<span class="ct-col w50 v-top">
{{$index+1}}
<imagebox v-bind:imgarr="imgcache[item.supplierGoodsguid] | original">
<img
v-if="item.supplierGoodsguid!=null && imgcache[item.supplierGoodsguid]!='NOPIC'"
class="pro-pic" style="margin-top:0px;"
v-bind:src="imgcache[item.supplierGoodsguid] | thumbnail">
<span class="pic-max blue-search">
<div class="pro-pic"
v-if="item.supplierGoodsguid==null || imgcache[item.supplierGoodsguid]=='NOPIC'"
style="background-image: url(../images/default.jpg)"></div>
</span>
</imagebox>
</span>
<span class="ct-col w300 t-left break-it">
<div class="p-lr-10 break">
{{item.supplier_GoodsCode}}<br>
<span class="p-tit-green">{{item.supplier_GoodsName}}</span><br>
{{item.supplier_GoodsSpec}}<br>
{{item.manufacturer}}<br>
{{item.registKey}}
</div>
</span>
<span class="ct-col w120 pr10 v-top">
<span class="table-detail-text">{{item.purchaser_poqty==null ?'0':item.purchaser_poqty}}<br>{{item.purchaser_unit}}</span>
</span>
<span class="ct-col w120 pr10 v-top">
<span class="table-detail-text">{{item.purchaserPesentqty==null ?'0':item.purchaserPesentqty}}<br>{{item.purchaser_unit}}</span>
</span>
<span class="ct-col w120 v-top">
<span class="table-detail-text">{{item.purchaserArrivalqty==null ?'0':item.purchaserArrivalqty}}<br>{{item.purchaser_unit}}</span>
</span>
<span class="ct-col w130 v-top t-right">{{item.purchaserPrice=='null'?'0':item.purchaserPrice| numDigit 2 | numFmt}}</span>
<span class="ct-col w130 v-top t-right">{{item.amount = item.purchaserPesentqty* item.purchaserPrice | numDigit 2 | numFmt}}</span>
</div>
<div class="row-line text-color-green">
<span class="ct-col w150 break-it"><span class="td-head">批号</span><span class="break t-center">{{item.newLot}}</span></span>
<span class="ct-col w120 break-it"><span class="td-head">生产日期</span><span class="break t-center">{{item.newProductiondate | getYMD}}</span></span>
<span class="ct-col w120 break-it"><span class="td-head">有效期至</span><span class="break t-center">{{item.newExpiredate | getYMD}}</span></span>
<span class="ct-col w170 break-it"><span class="td-head">灭菌批号</span><span class="brea t-center">{{item.newSterilantlot}}</span></span>
<span class="ct-col w170 break-it"><span class="td-head">灭菌日期</span><span class="break t-center">{{item.newSterilantdate | getYMD}}</span></span>
<span class="ct-col w170 break-it"><span class="td-head">灭菌效期</span><span class="break t-center">{{item.newSterilantexpdate | getYMD}}</span></span>
</div>
</div>
</div>
<pagination
@page-change="getData"
:class="['m-20-0']"
:page-no.sync="search.page"
:total-pages.sync="search.totalPages">
</pagination>
</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%;'></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">确 定</a>
</div>
</div>
</div>
<!--purchase-storage end-->
</div>
</template>
<script>
module.exports={
data: function(){
return {
list:{},
list2:{},
billno:'',
search:{
page:1,
total:0,
totalPages:1,
pageSize:50,
guid:'',
},
// 图片数据
imgcache:[],
showPopupUp:false,
reason:'',
};
},
methods: {
getData:function(){
var self = this;
// 头部获取
Ajax.get('/hospitalTrmedwv/getTrvariationdo/'+this.$route.params.guid)
.then(function (response){
var data = response.data.data;
self.$set('list',data);
})
self.imgcache = [];
self.search.guid = this.$route.params.guid;
// 2.获得商品列表信息
Ajax.post('/hospitalTrmedwv/getTrvariationdoDetailList', self.search)
.then(function (response){
var data = response.data.data;
self.$set('list2',data.list);
for (var i = 0; i <self.list2.length; i++) {
if(self.list2[i].newLot == null || self.list2[i].newLot == ''){
self.list2[i].newLot = self.list2[i].lot;
}
if(self.list2[i].newProductiondate == null || self.list2[i].newProductiondate == ''){
self.list2[i].newProductiondate = self.list2[i].productiondate;
}
if(self.list2[i].newExpiredate == null || self.list2[i].newExpiredate == ''){
self.list2[i].newExpiredate = self.list2[i].expiredate;
}
if(self.list2[i].newSterilantlot == null || self.list2[i].newSterilantlot == ''){
self.list2[i].newSterilantlot = self.list2[i].sterilantlot;
}
if(self.list2[i].newSterilantdate == null || self.list2[i].newSterilantdate == ''){
self.list2[i].newSterilantdate = self.list2[i].sterilantdate;
}
if(self.list2[i].newSterilantexpdate == null || self.list2[i].newSterilantexpdate == ''){
self.list2[i].newSterilantexpdate = self.list2[i].sterilantexpdate;
}
}
self.search.pageno = data.pageno;
self.search.totalPages = data.totalPages;
self.search.total = data.total;
// 封存商品图片信息
self.$set('imgcache',response.data.senData);
})
},
//驳回
submit:function(){
var self=this;
if(self.reason.trim()==''){
self.MessageBox({title:'提示',message:"请输入驳回理由!",type:'alert'});
return;
}else{
self.showPopupUp=false;
}
var volist = [];
volist.push(self.$route.params.guid);
Ajax.post('/hospitalTrmedwv/rejectTrvariationdo',{'guids':volist,'rejectreason':self.reason})
.then(function(response) {
var data = response.data.data;
if(data){
self.MessageBox({
title: '提示',
message: '操作成功!',
type: 'alert'
}, function(action) {
self.getData();
self.reason = '';
});
}else{
self.MessageBox({title:'提示',message:"操作失败!",type:'alert'});
}
})
},
//审核
audit:function(){
var self = this;
var volist = [];
volist.push(self.$route.params.guid);
Ajax.post('/hospitalTrmedwv/auditTravriationdo',{'guids':volist})
.then(function(response){
var data=response.data.data;
if (response.data.errorCode == 0) {
self.MessageBox({title:'提示', message:'审核成功!', type: 'alert'},function(action){
self.getData();
});
}else{
self.MessageBox({title:'提示',message:response.data.message,type:'alert'});
}
})
},
closeUp:function(flag) {
var self = this;
self.$set('showPopupUp',flag);
},
close:function(flag) {
var self = this;
self.$set('showPopupUp',flag);
},
},
route:{
data: function (transition) {
var self=this;
var guid = transition.to.params.guid;
var billno = transition.to.params.billno;
self.guid=guid;
self.billno=billno;
self.getData();
},
}
}
</script>