order-outall-change.vue
7.62 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
<template>
<div class="container resource close-left-menu">
<div class="pop-banner clearfix ">
<h3 class="current-module">变更单汇总</h3>
</div>
<div class="pd-form fast-search-form">
<div class="group-row">
<div class="form-group">
<div class="control">
<input type="text" v-model="search.search_LIKE_billno"
placeholder="出库单号" title="出库单号" maxlength="26" v-rule></div>
</div>
<div class="form-group form-label">
<label class="label" for='cn25'>采购单位</label>
<div class="control">
<select-ui :list="hosList" v-model='selectMed' class='inp4' id='cn25'></select-ui>
</div>
</div>
</div>
<div class="group-row">
<div class="form-group">
<label for="cn3" class="label"><!-- 出库日期 --></label>
<div class="control control-date" style="height:34px;overflow: inherit;">
<div style="width:44%;float:left;">
<datepicker :target.sync="search.beginbilldate" :readonly="readonlyFlag" title='出库开始日期' placeholder='出库开始日期' styleobj="width:100% !important;border-radius:8px 0px 0px 8px !important;"></datepicker>
</div>
<span class="text-and">-</span>
<div style="width:48%;float:left;">
<datepicker :target.sync="search.endbilldate" :readonly="readonlyFlag" title='出库结束日期' placeholder='出库结束日期'
styleobj="width:100% !important;border-radius:0px 8px 8px 0px !important;"></datepicker>
</div>
</div>
</div>
<div class="form-group">
<!-- <label for="cn1" class="label">采购单号</label> -->
<div class="control">
<input type="text" v-model="search.supplierpobillno" title='采购单号' placeholder='采购单号' maxlength="26" v-rule></div>
</div>
</div>
<div class="group-row">
<div class="form-group w800">
<label for="cn1" class="label w80">业务状态</label>
<div class="control control-filtering control-filtering-green"
style="float:left;width:600px;">
<a id="all" class="all active" href="javascript:;"
@click="state('','all')">全部</a>
<a id="wating" class="option" href="javascript:;"
@click="state('VD01','wating')">未提交</a>
<a id="submit" class="option" href="javascript:;"
@click="state('VD02','submit')">已提交</a>
<a id="submit2" class="option" href="javascript:;"
@click="state('VD03','submit2')">已审核</a>
<a id="submit3" class="option" href="javascript:;"
@click="state('VD04','submit3')">已驳回</a>
</div>
</div>
</div>
<div class="group-row t-right">
<button v-on:click="getData()" class="fast-search-form-btn btn-d btn-d-lg btn-d-activate btn-d-circle">查 询</button>
</div>
</div>
<table class="itable itable-thead-13px">
<thead id="t_header">
<tr>
<th class="w50">序号</th>
<th class="w170">采购单位</th>
<th class="w170">变更单号</th>
<th class="w100">单据类型</th>
<th class="w100">业务状态</th>
<th class="w140">采购单号</th>
<th class="w120">变更日期</th>
<th class="w120">操作</th>
</tr>
</thead>
<tbody class="txt_v">
<tr>
<td colspan="10" v-if="mxList.length==0">
暂无符合条件的记录
</td>
</tr>
<tr v-for="trdo in mxList">
<td>{{$index+1}}</td>
<td class="t-left pr10">
<div class="p-lr-10">{{trdo.medname}}</div>
</td>
<td class="t-left pr10">{{trdo.billno}}</td>
<td>{{trdo.billtype | billtype}}</td>
<td>{{trdo.billstate | billstate_trdos}}</td>
<td class="t-left pr10">{{trdo.supplierpobillno}}</td>
<td>{{trdo.variationdate | getYMD}}</td>
<td class="pt7">
<!-- <a class="btn-d btn-d-activate"
v-on:click="goTRDoDetail(trdo.billtype,trdo.supplierpobillno,trdo.billno,trdo.billstate)">明细</a>
<a class="btn-d btn-d-activate" v-link="{ path: '/orderOutall3-1/' + trdo.guid}">单据跟踪</a> -->
<a href="javascript:;" class="btn button-green" v-link="{path:'/trdo/orderOutallChangeDetail/'+trdo.guid}">明细</a>
</td>
</tr>
</tbody>
</table>
<div class="pagination m-20-0">
<pagination
@page-change="getData"
:page-no.sync="search.page"
:total-pages.sync="search.totalPages">
</pagination>
</div>
</div>
</template>
<!--出库单汇总-->
<script>
module.exports = {
data: function () {
return {
// 医院
hosList: [],
// 明细数据
mxList: [],
// 订单总数量
totalNum:0,
// 查询条件
search: {
pageSize: 50,
page: 1,
totalPages: 0,
//total: 0,
beginbilldate: this.GetDate().begindate,// 出库日期 起
endbilldate: this.GetDate().enddate,// 出库日期 止
billstate: '',// 业务状态
medguid:'',// 采购单位
supplierpobillno: '',// 采购单号
},
// 日期控件
readonlyFlag:false,
};
},
methods: {
// 获取数据
getData:function(){
var self = this;
Ajax.post('/trdo/getTrvariationdoList', this.search)
.then(function (response){
var data = response.data.data;
self.$set('mxList',data.list);
self.search.pageno = data.pageno;
self.search.totalPages = data.totalPages;
self.search.total = data.total;
})
},
// 查询条件选择项
state: function(billstate,objId){
$(".form-group a").each(function(){
// alert($(this).text());
$(this).attr("class", "option");
});
$("#"+objId).attr("class","all active");
// 设置查询的条件
this.search.billstate = billstate;
this.getData();
},
getMedListRelation:function(){
var self = this;
Ajax.post('/trdo/gettrvariatMedList')
.then(function (response){
var data = response.data;
if(data.errorCode == 0){
self.hosList = _.map(data.data, function (item) {
return {
label: item.medname,
value: item.medguid
};
});
}else{
self.MessageBox.alert('数据获取异常!');
}
})
}
},
route: {
activate: function () {
this.getData();
this.getMedListRelation();
}
},
watch:{
// 实时监听复选框勾选变化
'selectMed': function (val) {
this.search.medguid = val;
}
},
filters: {
billstate_trdos:function (val) {
if(val=='VD01') {
return "待提交";
} else if(val=='VD02') {
return "已提交";
} else if(val=='VD03') {
return "已审核";
} else if(val=='VD04') {
return "已驳回";
}
}
}
};
</script>