settlement-invoice.vue
7.02 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
<template>
<div class="container resource close-left-menu contaNEW">
<div class="pop-banner clearfix">
<!-- <div class="current-operate"></div>
-->
<div class="operate-btns"></div>
<h3 class="current-module">发票登录</h3>
</div>
<!--order-orderlist-view start-->
<div class="order-orderlist-view clearfix">
<div class="pd-form form-label4em mb-20 fast-search-form">
<div class="group-row">
<div class="form-group">
<!-- <label for="cn1" class="label lable-xf pl10">结算单号</label> -->
<div class="control">
<input type="text" v-model="search.search_LIKE_settlebillno" title='结算单号' placeholder='结算单号' maxlength="26" v-rule></div>
</div>
<div class="form-group">
<!-- <label for="cn1" class="label lable-xf pl10">结算单日期</label> -->
<div class="control control-date" style="height:34px;overflow: inherit;">
<div style="width:44%;float:left;">
<datepicker :target.sync="search.search_GTE_settledate" :readonly="readonlyFlag" title='结算单日期起' placeholder='结算单日期起'styleobj="width:100% !important;border-radius:8px 0px 0px 8px !important;"></datepicker>
</div>
<div class="text-and">—</div>
<div style="width:48%;float:left;">
<datepicker :target.sync="search.search_LTE_settledate" :readonly="readonlyFlag" title='结算单日期止' placeholder='结算单日期止'styleobj="width:100% !important;border-radius:0px 8px 8px 0px !important;"></datepicker>
</div>
</div>
</div>
</div>
<div class="group-row mt-5">
<div class="form-group">
<!-- <label for="cn1" class="label lable-xf pl10">采购单位</label> -->
<div class="control">
<input type="text" id="cn1" title='采购单位' placeholder='采购单位'></div>
</div>
</div>
<div class="form-group h-35 mt-5 hide">
<label for="cn3" class="label fl lh-34"><b>单据状态</b></label>
<div id="statebill" class="control control-filtering control-filtering-green fl ml-20">
<a id="all_bill" class="all active"
@click="stateBillno('','all_bill')">全部</a>
<a id="wating_bill" class="option"
@click="stateBillno('S01','wating_bill')">待提交</a>
<a id="submit_bill" class="option"
@click="stateBillno('S02','submit_bill')">已提交</a>
</div>
</div>
<div class="form-group h-35 mt-5">
<label for="cn3" class="label fl lh-34"><b>发票状态</b></label>
<div id="stateinvoice" class="control control-filtering control-filtering-green fl ml-20">
<a id="all_invoice" class="all active"
@click="stateInvoice('','all_invoice')">全部</a>
<a id="wating_invoice" class="option"
@click="stateInvoice('I01','wating_invoice')">未开发票</a>
<a id="finish_invoice" class="option"
@click="stateInvoice('I03','finish_invoice')">已开发票</a>
<a id="part_invoice" class="option"
@click="stateInvoice('I02','part_invoice')">已开部分发票</a>
</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-td-long-text">
<thead id="t_header">
<tr>
<th class="w40">序号</th>
<th class="w120">采购单位</th>
<th class="w120">结算单号</th>
<th class="w80">结算单日期</th>
<th class="w80">发票状态</th>
<th class="w70">单据状态</th>
<th class="w80">商品数</th>
<th class="w80">结算金额</th>
<th class="w80">已开发票金额</th>
<th class="w90">操作</th>
</tr>
</thead>
<tbody class="txt_v">
<tr>
<td colspan="10" v-if="mxList.length==0">
暂无符合条件的记录
</td>
</tr>
<tr v-for="po in mxList" v-else>
<td>{{$index+1}}</td>
<td class="t-left pr10">{{po.purchasercorpname}}</td>
<td class="t-left pr10">{{po.settlebillno}}</td>
<td>{{po.settledate | getYMD}}</td>
<td>{{po.invoicestate | invoicestate}}</td>
<td>{{po.billstate | settletype}}</td>
<td class="t-right pr10">{{po.goodssum==null?'0':po.goodssum}}</td>
<td class="t-right pr10">{{po.amount | numDigit 2 | numFmt}}元</td>
<td class="t-right pr10">{{po.inovicedamount | numDigit 2 | numFmt}}元</td>
<td class="pr7">
<a v-on:click="toLogInvoice(po.guid)" class="btn button-green">发票录入</a>
</td>
</tr>
</tbody>
</table>
<div class="pagination m-20-0" v-if="mxList.length!=0">
<pagination
@page-change="getData"
:page-no.sync="search.page"
:total-pages.sync="search.totalPages">
</pagination>
</div>
</div>
<!--order-orderlist-view end-->
</div>
</template>
<!--发票登录-->
<script >
module.exports = {
data: function () {
return {
// 明细数据
mxList: [],
// 查询条件
search: {
pageSize: 50,
page: 1,
totalPages: 0,
//total: 0,
search_LIKE_settlebillno: '',
search_EQ_billstate: '',
search_EQ_invoicestate: '',
search_GTE_settledate: '',
search_LTE_settledate: '',
},
readonlyFlag:false,
};
},
methods: {
getData: function () {
var self = this;
Ajax.get('/trsettle/list', 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;
})
},
// 发票登录:这里采用guid,因为明细表也是采用guid
toLogInvoice:function(guid){
var self = this;
self.$route.router.go('/trsettle/settlementInvoice2/'+guid);
},
// 单据状态
stateBillno: function(billstate,objId){
$("#statebill a").each(function(){
$(this).attr("class", "option");
});
$("#"+objId).attr("class","all active");
// 设置查询的条件
this.search.search_EQ_billstate = billstate;
this.getData();
},
// 发票状态
stateInvoice: function(billstate,objId){
$("#stateinvoice a").each(function(){
$(this).attr("class", "option");
});
$("#"+objId).attr("class","all active");
// 设置查询的条件
this.search.search_EQ_invoicestate = billstate;
this.getData();
},
},
route: {
activate: function () {
this.getData();
}
}
};
</script>