Waybill.vue
17.7 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
349
350
351
352
353
354
355
356
357
358
359
360
<template>
<el-container>
<el-main>
<el-row class="row-bg">
<el-col :span="24"><div class="grid-content content co">进港运单申报</div></el-col>
</el-row>
<!--查询条件-->
<el-row style="display: block;background-color: white">
<el-row>
<el-col :span="6">
<span>
主单号:
</span>
<el-input placeholder="" v-model="defaultQuery.awba" style="width: 150px">
</el-input>
</el-col>
<el-col :span="6">
<span>
承运人:
</span>
<el-input placeholder="" v-model="vcarrier" style="width: 150px">
</el-input>
</el-col>
<el-col :span="6">
<span>
航班号:
</span>
<el-input placeholder="" v-model="defaultQuery.flightno" style="width: 150px">
</el-input>
</el-col>
<el-col :span="6">
<span>
航班日期:
</span>
<el-date-picker
v-model="defaultQuery.flightdate"
type="date"
value-format="yyyy-MM-dd" style="width: 150px"
placeholder="航班日期">
</el-date-picker>
</el-col>
</el-row>
<el-row >
<el-col :span="6">
<span>
业务状态:
</span>
<el-select v-model="defaultQuery.status" placeholder="选择状态" style="width: 140px">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label" style="width: 140px"
:value="item.value">
</el-option>
</el-select>
</el-col>
<el-col :span="6">
<span>
报文类型:
</span>
<el-select v-model="defaultQuery.messageType" placeholder="报文类型" style="width: 140px">
<el-option
v-for="item in options2"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-col>
<el-col :span="6">
<el-col :span="8" style="margin-right: 0px">
<el-button type="primary" v-on:click="QueryData">查询</el-button>
</el-col>
<!--<el-col :span="16" style="margin-right: 0px">
<el-button type="primary">批量修改状态</el-button>
</el-col>-->
</el-col>
</el-row>
</el-row>
<!--查询结果样式-->
<el-row style="font-size: xx-small">
<el-col :span="1" class="mark"><div class="grid-content bg" style="color: red"><span>注:</span></div></el-col>
<el-col :span="3" class="mark"><div class="grid-content bg mainse" style="border-radius: 5px;margin-right: 5px;background-color: #63cdda" ><span>主单原始舱单</span></div></el-col>
<el-col :span="3" class="mark"><div class="grid-content bg fense" style="border-radius: 5px;margin-right: 5px;background-color: #778beb"><span>分单原始舱单</span></div></el-col>
<el-col :span="3" class="mark"><div class="grid-content bg tallse" style="border-radius: 5px;margin-right: 5px;background-color: #f3a683"><span>主单理货报告</span></div></el-col>
<el-col :span="3" class="mark"><div class="grid-content bg tallfense" style="border-radius: 5px;margin-right: 5px;background-color: #f7d794"><span>分单理货报告</span></div></el-col>
</el-row>
<!--查询列表-->
<el-row>
<el-col :span="24">
<template>
<el-table
v-loading="tableloading"
ref="multipleTable"
:data="tableData"
tooltip-effect="dark"
style="width: 100%"
:default-sort = "{prop: 'date', order: 'descending'}"
@selection-change="handleSelectionChange">
<el-table-column
type="selection"
width="45">
</el-table-column>
<el-table-column
fixed="left"
label="操作"
width="75">
<template slot-scope="scope">
<el-button
v-if="scope.row.stype=='MT1201'"
@click="handleClick(scope.row)" type="text" size="small">原始舱单</el-button>
<el-button
v-else
@click="handleTally(scope.row)" type="text" size="small">进港理货</el-button>
</template>
</el-table-column>
<el-table-column
label="航班号"
width="75">
<template slot-scope="scope">
<span>{{scope.row.carrier}}{{scope.row.flightno}}</span>
</template>
</el-table-column>
<el-table-column
prop="flightdate"
label="航班日期"
width="95">
</el-table-column>
<el-table-column
label="航段"
width="90">
<template slot-scope="scope">
<span>{{scope.row.originstation}}-{{scope.row.destinationstation}}</span>
</template>
</el-table-column>
<el-table-column
label="主单号"
width="115"
>
<template slot-scope="scope">
<span v-if="scope.row.stype=='MT1201'&&scope.row.awbh==''" style="background-color:#63cdda;width: 100%;height:100%;display:block">
{{scope.row.awba}}
</span>
<span v-else-if="scope.row.stype=='MT1201'&&scope.row.awbh!=''" style="background-color:#778beb;width: 100%;height:100%;display:block;">
{{scope.row.awba}}
</span>
<span v-else-if="scope.row.stype=='MT5201'&&scope.row.awbh==''" style="background-color:#f3a683;width: 100%;height:100%;display:block;">
{{scope.row.awba}}
</span>
<span v-else-if="scope.row.stype=='MT5201'&&scope.row.awbh!=''" style="background-color:#f7d794;width: 100%;height:100%;display:block;">
{{scope.row.awba}}
</span>
</template>
</el-table-column>
<el-table-column
prop="awbh"
label="分单号"
width="130">
</el-table-column>
<el-table-column
prop="piece"
label="件数"
width="60">
</el-table-column>
<el-table-column
prop="weight"
label="重量"
width="70">
</el-table-column>
<el-table-column
prop="customcode"
label="关区号"
width="65">
</el-table-column>
<el-table-column
prop="actime"
label="时间"
width="155">
<template slot-scope="scope">{{timestampToTime(scope.row.actime)}}</template>
</el-table-column>
<el-table-column
prop="status"
label="状态"
width="90" :formatter="formatStatus">
</el-table-column>
<el-table-column
label="回执内容"
width="250">
<template slot-scope="scope">
<span v-if="scope.row.status=='01' || scope.row.status=='11'" style="color: #67C23A">
{{scope.row.ext5}}
</span>
<span v-else-if="scope.row.status=='02' || scope.row.status=='03'" style="color: #E6A23C">
{{scope.row.ext5}}
</span>
<span v-else-if="scope.row.status=='12' || scope.row.status=='13'" style="color: #F56C6C">
{{scope.row.ext5}}
</span>
<span v-else style="color: #909399;">
{{scope.row.ext5}}
</span>
</template>
</el-table-column>
</el-table>
</template>
</el-col>
</el-row>
<!--分页部分-->
<el-row>
<el-col>
<div class="block">
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="currentPage"
:page-sizes="[100, 200, 300, 400]"
:page-size="pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="total">
</el-pagination>
</div>
</el-col>
</el-row>
</el-main>
</el-container>
</template>
<style scoped>
.co{height: 36px;line-height: 36px;}
.co{border-left: 4px #409EFF solid;padding-left: 10px;background-color: #f9fafc;margin-bottom: 2px}
.row-bg{background-color: white;padding:0px;}
.el-row{margin-bottom: 10px;}
.sel{display: inline;}
.mark{height:24px;}
.bg{height:24px;text-align: center;line-height:24px;min-height: 24px}
.mainse{background: #67C23A}
.fense{background-color: #409eff}
.tallse{background-color: #FF8C00}
.tallfense{background-color: #e6a23c}
.cell{background: #5BB75B}
.cell2{background-color: #12B399}
.el-input-group{
display: table;
}
</style>
<script>
import { QueryData } from '../../api/wayDeclaration'
import {mapActions, mapGetters} from 'vuex'
import {loginedUserInfo} from "../../api/user";
export default {
data() {
return {
defaultQuery:{
awba:'',
carrier:'',
flightno:'',
flightdate:'',
status:'',
messageType:'',
departmentid:''
},
options: [
{
value: '',
label: '业务状态'
}, {
value: '22',
label: '未发送'
}, {
value: '23',
label: '已发舱单报'
}, {
value: '03',
label: '舱单报退单'
}],
options2: [
{
value: '',
label: '业务类型'
}, {
value: 'MT1201',
label: '原始舱单'
}, {
value: 'MT5201',
label: '进港理货'
}],
tableData: [],
multipleSelection: [],
currentPage:1,
pageSize:100,
total:0,
tableloading:false
}
},
methods:{
handleSelectionChange(val) {
this.multipleSelection = val;
},
handleSizeChange(val) {
this.pageSize=val;
this.QueryData();
},
handleCurrentChange(val) {
this.currentPage=val;
this.QueryData();
},
//状态适配
formatStatus:function (row,column) {
return row.status=='01'?'接受申报':row.status=='02'?'待人工审核':row.status=='03'?'退单'
:row.status=='11'?'放行':row.status=='12'?'拒装':row.status=='13'?'禁卸'
:row.status=='21'?'可自动发送':row.status=='22'?'未发送':row.status=='23'?'已发送新增报'
:row.status=='24'?'已发送删除报':row.status=='25'?'已发送修改报':'';
},
//条件查询方法
QueryData(){
let params={currentPage:this.currentPage,pageSize:this.pageSize,awba:this.defaultQuery.awba,carrier:this.defaultQuery.carrier,
flightno:this.defaultQuery.flightno,flightdate:this.defaultQuery.flightdate,status:this.defaultQuery.status,messageType:this.defaultQuery.messageType,departmentid:loginedUserInfo().companyInfo.departmentid};
this.tableloading=true;
QueryData(params).then(res =>{
let response=res.data.data;
this.tableData=response.list;
this.total=response.total;
this.tableloading = false;
});
},
//点击进入原始页面
handleClick(row){
this.$router.push({path:'/origmaster',query:{flightno:JSON.stringify(row.carrier+row.flightno),destinationstation:JSON.stringify(row.destinationstation),awba:JSON.stringify(row.awba),flightdate:JSON.stringify(row.flightdate),originstation:JSON.stringify(row.originstation)}});
},
//点击进入理货页面
handleTally(row){
this.$router.push({path:'/tallymaster',query:{flightno:JSON.stringify(row.carrier+row.flightno),destinationstation:JSON.stringify(row.destinationstation),awba:JSON.stringify(row.awba),flightdate:JSON.stringify(row.flightdate),originstation:JSON.stringify(row.originstation)}});
},
//table显示时间转换
timestampToTime(timestamp) {
var date = new Date(timestamp);//时间戳为10位需*1000,时间戳为13位的话不需乘1000
var Y = date.getFullYear() + '-';
var M = (date.getMonth()+1 < 10 ? '0'+(date.getMonth()+1) : date.getMonth()+1) + '-';
var D = (date.getDate() < 10 ? '0'+date.getDate() : date.getDate()) + ' ';
var h = (date.getHours() < 10 ? '0'+date.getHours() : date.getHours()) + ':';
var m = (date.getMinutes() < 10 ? '0'+date.getMinutes() : date.getMinutes()) + ':';
var s = (date.getSeconds() < 10 ? '0'+date.getSeconds() : date.getSeconds());
return Y+M+D+h+m+s;
},
},
computed:{
vcarrier:{
get:function () {
return this.defaultQuery.carrier;
},
set:function (val) {
this.defaultQuery.carrier=val.toUpperCase();
}
},
...mapGetters(['getUserInfoStore','getUserMenuStore']) // 动态计算属性,相当于this.$store.getters.resturantName
},
}
</script>