zaigang.vue
12.6 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
<template>
<div>
<el-row :gutter="10">
<el-col :span="4">
<el-input
placeholder="航空器注册编号"
v-model="query.aircraftno"
size="medium"
clearable>
</el-input>
</el-col>
<el-col :span="4">
<el-input
placeholder="进境(港)航班号"
v-model="query.flightno"
size="medium"
clearable>
</el-input>
</el-col>
<el-col :span="8">
<div class="block">
<el-date-picker
v-model="query.flightdate"
type="daterange"
:picker-options="pickerOptions"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
size="medium"
align="right">
</el-date-picker>
</div>
</el-col>
<el-col :span="2">
<el-button size="medium" type="primary" plain>查询</el-button>
</el-col>
<el-col :span="2">
<el-button size="medium" type="success" @click="addForm()" plain>新增</el-button>
</el-col>
</el-row>
<el-row :gutter="10">
<el-table
:data="tableData"
border
style="width: 100%">
<el-table-column
fixed
prop="messageid"
label="编号"
width="320">
</el-table-column>
<el-table-column
prop="aircraftno"
label="航空器注册编号"
width="120">
</el-table-column>
<el-table-column
prop="flightno"
label="进境(港)航班号"
width="120">
</el-table-column>
<el-table-column
prop="callport"
label="停靠港"
width="120">
</el-table-column>
<el-table-column
prop="flightdate"
label="航班日期"
width="200">
</el-table-column>
<el-table-column
prop="status"
label="海关状态"
width="120">
</el-table-column>
<el-table-column
fixed="right"
label="操作"
width="140">
<template slot-scope="scope">
<el-button @click="handleClick(scope.row)" type="text" size="small">查看</el-button>
<el-button type="text" size="small">编辑</el-button>
<el-button type="text" size="small">删除</el-button>
</template>
</el-table-column>
</el-table>
</el-row>
<el-row :gutter="10">
<div class="block">
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="currentPage4"
:page-sizes="[100, 200, 300, 400]"
:page-size="100"
layout="total, sizes, prev, pager, next, jumper"
:total="400">
</el-pagination>
</div>
</el-row>
<el-dialog
:title="'在港信息'+textMap[dialogStatus]"
:visible.sync="dialogVisible"
width="80%"
center>
<el-form :model="form" label-width="130px">
<el-divider content-position="left">报给单位</el-divider>
<el-row :gutter="20">
<el-col :span="6">
<el-form-item label="海关关区">
<el-select v-model="form.customcode"
filterable
allow-create
default-first-option
remote
:remote-method="getCustomCode"
:loading="loading" placeholder="请选择">
<el-option
v-for="item in customcodes"
:key="item.customcode"
:label="item.customcode"
:value="item.customcode">
<span style="float: left">{{ item.customcode }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">-{{ item.customname }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-divider content-position="left">航空器信息</el-divider>
<el-row :gutter="20">
<el-col :span="6">
<el-form-item label="航空器注册编号">
<el-input v-model="form.aircraftno"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="注册海关关区">
<el-input v-model="form.registeredcustom"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="航空器备案类型">
<el-input v-model="form.aircrafttype"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-divider content-position="left">在港申报信息</el-divider>
<el-row :gutter="20">
<el-col :span="6">
<el-form-item label="进境(港)航班号">
<el-input v-model="form.flightno"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="航班日期">
<el-input v-model="form.flightdate"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="停靠港">
<el-input v-model="form.callport"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="停机位">
<el-input v-model="form.callarea"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-divider content-position="left">备注信息</el-divider>
<el-row :gutter="20">
<el-col :span="6">
<el-form-item label="滞留原因">
<el-input v-model="form.reasons"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="海关备注">
<el-input v-model="form.remark"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-divider></el-divider>
<el-row :gutter="20">
<el-col :span="12" :offset="6">
<el-form-item>
<el-button @click="dialogVisible=false">取消</el-button>
<el-button type="primary">暂存</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-dialog>
</div>
</template>
<script>
import {selectBycustomcode} from "../../api/transport/transport2.0";
export default {
data(){
return{
query:{
aircraftno:'',
flightno:'',
flightdate:''
},
customcodes:[],
form:{
uuid:'',
customcode:'',
aircraftno:'',
registeredcustom:'',
aircrafttype:'',
flightno:'',
flightdate:'',
callport:'',
callarea:'',
reasons:'',
remark:'',
userid:'',
status:'',
statusmsg:'',
messageid:''
},
dialogVisible: false,
currentPage4: 4,
textMap:{
update: '编辑',
create: '新增'
},
dialogStatus:'',
pickerOptions: {
shortcuts: [{
text: '最近一周',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit('pick', [start, end]);
}
}, {
text: '最近一个月',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
picker.$emit('pick', [start, end]);
}
}, {
text: '最近三个月',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
picker.$emit('pick', [start, end]);
}
}]
},
tableData: [{
messageid: 'CN_CAM006_1P2_460470678920X20211028075151',
aircraftno: 'N345UP',
flightno: '5X174',
callport: 'CGO',
flightdate: '2024-11-15',
status: '01'
}]
}
},
methods:{
//获取关区代码
getCustomCode:function(query){
this.customcodes=[];
let params={customcode:query};
this.loading = true;
selectBycustomcode(params).then(res =>{
if (res !== '') {
setTimeout(() => {
this.loading = false;
this.customcodes=res.data.data;
}, 200);
} else {
this.customcodes = [];
}
});
},
//新增
addForm(){
this.dialogVisible=true;
this.dialogStatus='create';
},
handleClick(row) {
console.log(row);
},
//分页
handleSizeChange(val) {
console.log(`每页 ${val} 条`);
},
handleCurrentChange(val) {
console.log(`当前页: ${val}`);
}
}
}
</script>