pyt
2025-02-13 7823f4ef5ae7e3cc4c49f44706b06ad99bb1cfe5
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
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
<template>
    <div>
        <!-- <UserInfo :show="true" /> -->
        <Header style="position: sticky;top: 0;z-index: 1999;" />
        <NoticeComponent v-if="noticeShow" :show="noticeShow" @close="noticeShow = false" />
        <AddedInformation v-if="false" :show="false" />
        <div class="search-box">
            <div class="title-card">
                <div class="title-left">
                    订单列表
                </div>
                <div class="title-right">
                    <span @click="noticeShow = true" class="order-agress">下单须知</span>
                    <div class="line"></div>
                    <span class="add-ord" @click="$router.push('/addOrder')">添加订单</span>
                </div>
            </div>
            <div class="search-form">
                <el-form :inline="true" :model="searchForm" class="demo-form-inline">
                    <div class="flex a-center justify-between flex-wrap">
                        <el-form-item label="订单编号:" prop="orderId" class="unset_m" style="margin-left: 15px">
                            <el-input style="width: 230px;" v-model="searchForm.orderId" placeholder="请输入"></el-input>
                        </el-form-item>
                        <el-form-item label="集装箱号:" prop="container" class="unset_m">
                            <el-input style="width: 230px;" v-model="searchForm.container" placeholder="请输入"></el-input>
                        </el-form-item>
                        <el-form-item label="提单号:" prop="bol" class="unset_m">
                            <el-input style="width: 230px;" v-model="searchForm.bol" placeholder="请输入"></el-input>
                        </el-form-item>
                        <el-form-item label="收件人邮箱:" prop="email" class="unset_m">
                            <el-input style="width: 230px;" v-model="searchForm.email" placeholder="请输入"></el-input>
                        </el-form-item>
                        <el-form-item label="订单状态:" prop="status" class="unset_m">
                            <el-select style="width: 230px;" :popper-append-to-body="false" v-model="searchForm.status"
                                placeholder="请选择">
                                <el-option v-for="item in options" placeholder="请输入" :key="item.id" :label="item.label"
                                    :value="item.id">
                                </el-option>
                            </el-select>
                        </el-form-item>
                        <el-form-item label="收件人地址:" prop="address" class="unset_m1"
                            style="margin-bottom: unset !important;">
                            <el-input style="width: 230px;" v-model="searchForm.address" placeholder="请输入"></el-input>
                        </el-form-item>
                        <el-form-item label="DO文件是否上传:" prop="DO" class="unset_m1"
                            style="margin-bottom: unset !important;">
                            <el-select style="width: 230px;" :popper-append-to-body="false" v-model="searchForm.DO"
                                placeholder="请选择">
                                <el-option v-for="item in option1" placeholder="请输入" :key="item.id" :label="item.label"
                                    :value="item.id">
                                </el-option>
                            </el-select>
                        </el-form-item>
                        <el-form-item style="width: 570px;">
                        </el-form-item>
                        <div class="flex a-center">
                            <el-button type="default" class="reset" @click="reset">重置</el-button>
                            <el-button type="primary" class="search" @click="search">搜索</el-button>
                        </div>
                    </div>
                </el-form>
            </div>
        </div>
        <div class="table-box">
            <el-table :data="tableData" style="width: 100%" border>
                <el-table-column width="200" prop="orderId" label="订单编号" align="center">
                </el-table-column>
                <el-table-column width="200" prop="container" label="集装箱号" align="center">
                </el-table-column>
                <el-table-column width="200" prop="bol" label="提单号" align="center">
                </el-table-column>
                <el-table-column width="200" prop="mail" label="收件人邮箱" align="center">
                </el-table-column>
                <el-table-column width="250" prop="address" label="收件人地址" align="center">
                </el-table-column>
                <el-table-column width="200" prop="estimatedArrival" label="预计到达时间" align="center">
                </el-table-column>
                <el-table-column width="200" prop="pickupDate" label="提柜日期" align="center">
                </el-table-column>
                <el-table-column width="200" prop="deliverySchedule" label="预计送柜日期" align="center">
                </el-table-column>
                <el-table-column width="200" prop="cargoType" label="柜型" align="center">
                </el-table-column>
                <el-table-column width="200" prop="realSchedule" label="实际送货日期" align="center">
                </el-table-column>
                <el-table-column width="150" prop="DO" label="DO文件是否上传" align="center">
                    <template slot-scope="scope">
                        <div>{{ scope.row.DO ? '是' : '否' }}</div>
                    </template>
                </el-table-column>
                <el-table-column width="150" prop="asPU" label="PU文件是否上传" align="center">
                    <template slot-scope="scope">
                        <div>{{ scope.row.asPU ? '是' : '否' }}</div>
                    </template>
                </el-table-column>
                <el-table-column width="150" prop="status" label="订单状态" align="center">
                    <template slot-scope="scope">
                        <div v-if="scope.row.status == '收货⼈已确认' || scope.row.status == '待卡⻋确认' || scope.row.status == '待收货⼈确认'">预约中</div>
                        <div v-else-if="scope.row.status == '卡⻋和收货⼈均确认'">预约完成</div>
                        <div v-else>{{ scope.row.status }}</div>
                    </template>
                </el-table-column>
                <el-table-column width="150" prop="option" label="操作" align="center" fixed="right">
                    <template slot-scope="scope">
                        <el-button type="text" class="table-btn"
                            @click="handleClick(scope.row, 'detail')">查看详情</el-button><span class="line-set">|</span>
                        <el-button type="text" class="table-btn" @click="handleClick(scope.row, 'edit')">编辑</el-button>
                    </template>
                </el-table-column>
            </el-table>
 
            <!-- <div class="text-right pagination-card">
                <el-pagination background :page-size="pagination.pageSize" layout="slot,prev,pager,next"
                    :current-page="pagination.pageNum" @current-change="handleCurrentChange"
                    @size-change="handleSizeChange" :total="pagination.total">
                    <span class="total-num">共{{ pagination.total }}条记录</span>
                </el-pagination>
            </div> -->
        </div>
    </div>
</template>
 
<script>
import UserInfo from '@/component/userInfo.vue'
import Header from '@/component/Header.vue'
import NoticeComponent from '@/component/Notice.vue'
import { getList } from './home'
export default {
    name: "Home",
    components: {
        UserInfo,
        Header,
        NoticeComponent,
    },
    data() {
        return {
            noticeShow: false,
            showUserInfo: false,
            searchForm: {
                orderId: '',
                container: '',
                bol: '',
                email: '',
                address: '',
                DO: '',
                status: '',
                extra: JSON.parse(localStorage.getItem('userInfo')).extra
            },
            options: [
                {
                    id: '待到港',
                    label: '待到港'
                },
                {
                    id:  '已到港',
                    label: '已到港'
                },
                {
                    id: '可提柜',
                    label: '可提柜'
                },
                {
                    id: '预约中',
                    label: '预约中'
                },
                {
                    id: '预约完成',
                    label: '预约完成'
                },
                {
                    id: '送柜中',
                    label: '送柜中'
                },
                {
                    id: '送柜完成',
                    label: '送柜完成'
                },
                {
                    id: '返空',
                    label: '返空'
                },
                {
                    id: '订单完成',
                    label: '订单完成'
                },
                {
                    id: '已取消',
                    label: '已取消'
                },
                {
                    id: '预约中',
                    label: '预约中'
                },
                {
                    id: '预约完成',
                    label: '预约完成'
                }
            ],
            tableData: [],
            option1: [
                {
                    id: 1,
                    label: '是'
                },
                {
                    id: 2,
                    label: '否'
                }
            ],
            // pagination: {
            //     total: 999,
            //     pageNum: 1,
            //     pageSize: 10,
            // },
        };
    },
    created() {
        this.getLists()
    },
    methods: {
        handleClick(e, type) {
            this.$router.push({
                path: '/addOrder',
                query: {
                    orderId: e.orderId,
                    type: type
                },
            })
        },
        getLists() {
            let params = {
                ...this.searchForm
            }
            // params.orderId = params.orderId ? params.orderId : null
            if (!params.orderId) {
                delete params.orderId
            }
            if (!params.container) {
                delete params.container
            }
            if (!params.bol) {
                delete params.bol
            }
            if (!params.email) {
                delete params.email
            }
            if (!params.address) {
                delete params.address
            }
            if (!params.DO) {
                delete params.DO
            }
            if (!params.status) {
                delete params.status
            }
            getList({ ...params, }).then(res => {
                this.tableData = res.data
            })
        },
        search() {
            this.getLists()
        },
        reset() {
            this.searchForm = {
                orderId: '',
                container: '',
                bol: '',
                email: '',
                address: '',
                DO: '',
                status: '',
                extra: JSON.parse(localStorage.getItem('userInfo')).extra
            }
            this.getLists()
        }
    }
};
</script>
<style>
html {
    background-color: rgba(237, 237, 243, 1);
}
</style>
<style scoped lang="less">
.search-box {
    background-color: #fff;
 
    border-radius: 6px;
    min-height: 263px;
    margin-top: 16px;
    margin-left: 35px;
    margin-right: 35px;
    width: calc(100% - 70px);
 
    .title-card {
        padding: 0 23px;
        display: flex;
        justify-content: space-between;
        height: 75px;
        line-height: 75px;
        font-family: SourceHanSansCN, SourceHanSansCN;
        font-weight: bold;
        font-size: 20px;
        color: #3B3F56;
        border-bottom: 1px solid rgba(151, 151, 151, .25);
 
        .title-right {
            display: flex;
            align-items: center;
 
            .order-agress {
                font-family: SourceHanSansCN, SourceHanSansCN;
                font-weight: bold;
                font-size: 20px;
                color: #014099;
                cursor: pointer;
            }
 
            .line {
                width: 2px;
                height: 20px;
                margin: 0 10px;
                background-color: rgba(1, 64, 153, .8);
            }
 
            .add-ord {
                font-family: SourceHanSansCN, SourceHanSansCN;
                font-weight: bold;
                font-size: 20px;
                color: #014099;
                cursor: pointer;
            }
        }
    }
 
    .search-form {
        padding: 23px 23px 32px 17px;
 
        .reset {
            width: 190px;
            height: 50px;
            background: #FFFFFF;
            border-radius: 4px;
            border: 2px solid #D2D2D2;
            font-family: SourceHanSansCN, SourceHanSansCN;
            font-weight: 500;
            font-size: 20px;
            color: rgba(0, 0, 0, .81);
        }
 
        .search {
            width: 190px;
            height: 50px;
            background: #014099;
            border-radius: 4px;
            font-family: SourceHanSansCN, SourceHanSansCN;
            font-weight: 500;
            font-size: 20px;
            color: #FFFFFF;
        }
 
        ::v-deep {
            .el-form-item__label {
                font-size: 16px;
                color: rgba(59, 63, 86, .8);
            }
 
            .el-input__inner {
                height: 50px;
                font-size: 16px;
            }
 
            .el-form-item {
                margin-left: unset;
                margin-right: unset;
                margin-bottom: 32px;
            }
 
 
 
        }
    }
}
 
.table-box {
    margin-top: 16px;
    margin-left: 35px;
    margin-right: 35px;
    width: calc(100% - 70px);
    border-radius: 6px;
    background-color: #fff;
    padding-bottom: 24px;
 
    ::v-deep {
        .el-table__header {
            .el-table__cell {
                background-color: rgba(246, 246, 247, 1) !important;
 
                .cell {
                    font-family: SourceHanSansCN, SourceHanSansCN;
                    font-weight: 500;
                    font-size: 16px;
                    color: #3B3F56;
                }
            }
        }
    }
 
    ::v-deep {
        .el-table__cell {
            height: 50px;
        }
    }
 
    ::v-deep .el-table__row {
        .el-table__cell {
            font-family: SourceHanSansCN, SourceHanSansCN;
            font-weight: 400;
            font-size: 16px;
            color: #3B3F56 !important;
        }
    }
 
    .table-btn {
        font-family: SourceHanSansCN, SourceHanSansCN;
        font-weight: 400;
        font-size: 16px;
        color: #014099;
    }
 
    .line-set {
        font-size: 14px;
        color: #014099;
        margin: 0 5px;
    }
 
    .total-num {
        font-family: PingFangSC, PingFang SC;
        font-weight: 400;
        font-size: 12px;
        color: #989BB0;
        margin-right: 12px;
    }
}
 
::v-deep .el-pager {
    .number {
        min-width: 30px;
        height: 30px;
        background: #FFFFFF !important;
        border-radius: 4px !important;
        border: 1px solid #DBDBE7 !important;
        font-family: PingFangSC, PingFang SC;
        font-weight: 400;
        font-size: 12px;
        color: #989BB0;
    }
 
    .active {
        min-width: 30px;
        height: 30px;
        background: #014099 !important;
        border-radius: 4px !important;
        font-family: PingFangSC, PingFang SC;
        font-weight: 400;
        font-size: 12px;
        color: #FFFFFF;
    }
 
 
}
 
.pagination-card {
    margin-top: 49px;
    margin-right: 14px;
}
 
::v-deep .btn-prev {
    margin-left: 0;
    margin-right: 5px;
 
    .el-icon-arrow-left:before {
        content: "\E792";
    }
}
 
::v-deep .btn-next {
    margin-left: 5px;
    margin-right: 0;
 
    .el-icon-arrow-right:before {
        content: "\E791";
    }
}
</style>