审查视图

src/views/nmms/ExitManifest.vue 15.4 KB
1 2 3
<template>
    <!--<div class="app-container">-->
    <div class="app-content">
小范 authored
4
        <div class="filter-container" style="margin-top: 50px;padding-bottom: 5px">
5 6 7
            <el-input v-model="listQuery.awba" @blur="inputAwba" clearable style="width: 200px;margin-right: 10px" class="filter-item" placeholder="运单号"/>
<!--            <el-input v-model="listQuery.carrier" clearable style="width: 200px;margin-right: 10px" class="filter-item" placeholder="承运人"/>-->
            <el-input v-model="flightComNo" clearable style="width: 200px;margin-right: 10px" class="filter-item" placeholder="航班号"/>
8 9 10
            <el-date-picker v-model="listQuery.flightDate" type="date" placeholder="航班日期"
                            value-format="yyyy-MM-dd" class="filter-item"></el-date-picker>
        </div>
小范 authored
11 12
        <div class="filter-container" style="padding-bottom: 5px">
            <el-select v-model="listQuery.messageType" clearable class="filter-item" placeholder="请选择报文类型" style="width: 200px;margin-right: 10px">
13 14
                <el-option v-for="item in messageTypeList" :key="item.value" :label="item.label" :value="item.value"></el-option>
            </el-select>
小范 authored
15
            <el-select v-model="listQuery.messageStatus" clearable class="filter-item" placeholder="请选择报文状态" style="width: 200px;margin-right: 10px">
16 17
                <el-option v-for="item in messageStatusList" :key="item.value" :label="item.label" :value="item.value"></el-option>
            </el-select>
小范 authored
18
            <el-select v-model="listQuery.customStatus" clearable class="filter-item" placeholder="请选择海关状态" style="width: 200px;margin-right: 10px">
19 20
                <el-option v-for="item in customStatusList" :key="item.value" :label="item.label" :value="item.value"></el-option>
            </el-select>
21 22
            <el-button type="warning" style="width:150px" icon="el-icon-search" @click="handleSearch">查&emsp;&emsp;询</el-button>
            <el-button type="primary" style="width:150px"  icon="el-icon-search"
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
                       @click="handleUpdateStatus">批量修改状态</el-button>
        </div>
        <div class="midSpan">
            <el-row>
                <el-col :span="0.5">
                    <span style="color: red">注:</span>
                </el-col>
                <el-col :span="1" style="background: oldlace; margin-right: 5px" align="center">
                    <span>预配舱单</span>
                </el-col>
                <el-col :span="1" style="background: #f0f9eb; margin-right: 5px" align="center">
                    <span>出港运抵</span>
                </el-col>
                <el-col :span="1" style="background: #bce7fd; margin-right: 5px" align="center">
                    <span>出港装载</span>
                </el-col>
                <el-col :span="1" style="background: #f5ffc0" align="center">
                    <span>出港理货</span>
                </el-col>
            </el-row>
        </div>
44
        <el-table v-loading="listLoading" :data="manifestData" :eval-func="func" :expand-all="true"
45 46
                    style="font-size: 13px" border @selection-change="handleSelectionChange"
                    :row-class-name="tableRowClassName">
47
            <el-table-column type="selection" width="60"></el-table-column>
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
            <el-table-column label="航班号" width="80px" align="center">
                <template slot-scope="scope">
                    <span>{{ scope.row.carrier }}{{ scope.row.flightno }}</span>
                </template>
            </el-table-column>
            <el-table-column label="航班日期" width="100px" align="center">
                <template slot-scope="scope">
                    <span>{{ scope.row.flightdate }}</span>
                </template>
            </el-table-column>
            <el-table-column label="航段" width="100px" align="center">
                <template slot-scope="scope">
                    <span>{{ scope.row.originstation }}-{{ scope.row.destinationstation }}</span>
                </template>
            </el-table-column>
            <el-table-column label="主单号" width="120px" align="center" >
                <template slot-scope="scope" >
                    <span>{{ scope.row.awba }}</span>
                </template>
            </el-table-column>
            <el-table-column label="分单号" width="150px" align="center">
                <template slot-scope="scope">
                    <span>{{ scope.row.awbh }}</span>
                </template>
            </el-table-column>
            <el-table-column label="件数" width="60px" align="center">
                <template slot-scope="scope">
                    <span>{{ scope.row.piece }}</span>
                </template>
            </el-table-column>
            <el-table-column label="重量" width="60px" align="center">
                <template slot-scope="scope">
                    <span>{{ scope.row.weight }}</span>
                </template>
            </el-table-column>
            <el-table-column label="关区" width="60px" align="center">
                <template slot-scope="scope">
                    <span>{{ scope.row.customcode }}</span>
                </template>
            </el-table-column>
            <el-table-column label="时间" width="150px" align="center">
            <template slot-scope="scope">
                <span>{{ scope.row.actime }}</span>
            </template>
        </el-table-column>
shenhailong authored
93
            <el-table-column label="状态" width="130px" align="center">
94
            <template slot-scope="scope">
shenhailong authored
95 96 97
                <span v-if="scope.row.status ==='01'">接受申报</span>
                <span v-if="scope.row.status ==='02'">待人工审核</span>
                <span v-if="scope.row.status ==='03'">退单</span>
98 99 100 101 102 103
                <span v-if="scope.row.status ==='05'">舱单报退单</span>
                <span v-if="scope.row.status ==='06'">舱单转人工</span>
                <span v-if="scope.row.status ==='07'">舱单报申报成功</span>
                <span v-if="scope.row.status ==='08'">已发舱单删除报</span>
                <span v-if="scope.row.status ==='09'">舱单删除报退单</span>
                <span v-if="scope.row.status ==='10'">舱单删除报转人工</span>
shenhailong authored
104 105 106
                <span v-if="scope.row.status ==='11'">放行</span>
                <span v-if="scope.row.status ==='12'">拒装</span>
                <span v-if="scope.row.status ==='13'">禁卸</span>
107 108 109
                <span v-if="scope.row.status ==='14'">舱单修改报转人工</span>
                <span v-if="scope.row.status ==='15'">舱单修改报成功</span>
                <span v-if="scope.row.status ==='16'">海关已存在</span>
shenhailong authored
110 111 112 113 114
                <span v-if="scope.row.status ==='21'">可自动发送</span>
                <span v-if="scope.row.status ==='22'">未发送</span>
                <span v-if="scope.row.status ==='23'">已发送新增报</span>
                <span v-if="scope.row.status ==='24'">已发送删除报</span>
                <span v-if="scope.row.status ==='25'">已发送修改报</span>
115 116 117 118
            </template>
            </el-table-column>
            <el-table-column label="回执内容"  align="center" show-overflow-tooltip>
                <template slot-scope="scope">
119 120 121 122 123 124 125 126 127 128 129 130
                    <el-tag v-if="scope.row.status=='01' || scope.row.status=='11'" type="success">
                        {{scope.row.customText}}
                    </el-tag>
                    <el-tag v-else-if="scope.row.status=='02' || scope.row.status=='03'" type="warning">
                        {{scope.row.customText}}
                    </el-tag>
                    <el-tag v-else-if="scope.row.status=='12' || scope.row.status=='13'" type="danger">
                        {{scope.row.customText}}
                    </el-tag>
                    <el-tag v-else>
                        {{scope.row.customText}}
                    </el-tag>
131 132 133 134 135 136 137 138
                </template>
            </el-table-column>
            <el-table-column label="操作" width="180px" align="center">
                <template slot-scope="scope">
                    <a style="color: #1d8ce0; margin-right: 5px" v-if="scope.row.messageType==='MT2201'" @click="handleUpdate(scope.row)">预配舱单</a>
                    <a style="color: #1d8ce0; margin-right: 5px" v-if="scope.row.messageType==='MT3201'" @click="handleUpdate(scope.row)">出港运抵</a>
                    <a style="color: #1d8ce0; margin-right: 5px" v-if="scope.row.messageType==='MT4201'" @click="handleUpdate(scope.row)">出港装载</a>
                    <a style="color: #1d8ce0; margin-right: 5px" v-if="scope.row.messageType==='MT5202'" @click="handleUpdate(scope.row)">出港理货</a>
139
<!--                    <a style="color: #1d8ce0" @click="handleUpdateStatus(scope.row)">更改状态</a>-->
140 141
                </template>
            </el-table-column>
142
        </el-table>
143 144 145 146 147 148 149 150 151 152 153 154 155
        <pagination v-show="total>0" :total="total" :page.sync="listQuery.pageSize" :limit.sync="listQuery.limitSize"
                    @pagination="getList"/>
    </div>
</template>
<script>
    import treeTable from '@/components/TreeTable'
    import treeToArray from '@/utils/customEval'
    import Pagination from '@/components/Pagination'
    import {getManifests} from "@/api/exitManifest"

    import {getMt520XListForParam} from "@/api/exitTidy";
    import {getMt3201ListForParam} from "@/api/exitArrive";
    import {getMt4201ListForParam} from "@/api/exitLoading";
156
    import {Message} from "element-ui";
157 158 159 160 161 162 163 164 165 166 167 168

    export default {
        name: "ExitManifest",
        components: {treeTable, Pagination},
        inject:['reload'],
        data() {
            return {
                func: treeToArray,
                total: 1,
                listLoading: false,
                listQuery: {
                    pageSize: 1,
169
                    limitSize: 10,
170
                    awba:undefined,
171 172
                    carrier: '',
                    flightno:'',
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
                    flightDate: new Date(),
                    messageType: undefined,
                    messageStatus: undefined,
                    customStatus: undefined,
                },
                manifestData: [],
                messageTypeList: [
                    {label:'预配舱单',value:'MT2201'},
                    {label:'出港运抵',value:'MT3201'},
                    {label:'出港装载',value:'MT4201'},
                    {label:'出港理货',value:'MT5202'}
                ],
                messageStatusList: [
                    {label:'未发送',value:'01'},
                    {label:'已发舱单报',value:'02'},
                    {label:'舱单报退单',value:'05'},
                    {label:'舱单转人工',value:'06'},
                    {label:'舱单报申报成功',value:'07'},
                    {label:'已发舱单删除报',value:'08'},
                    {label:'舱单删除报退单',value:'09'},
                    {label:'舱单删除报转人工',value:'10'},
                    {label:'舱单删除成功',value:'11'},
                    {label:'已发舱单修改报',value:'12'},
                    {label:'舱单修改报退单',value:'13'},
                    {label:'舱单修改报转人工',value:'14'},
                    {label:'舱单修改报成功',value:'15'},
                    {label:'海关已存在',value:'16'},
                ],
                customStatusList: [
                    {label:'普通货物',value:'001'},
                    {label:'国际转运货物',value:'002'},
                    {label:'国内转关',value:'003'},
                    {label:'空箱',value:'004'},
                    {label:'快件',value:'006'},
                ]
            }
        },
210 211 212 213 214 215 216 217 218 219 220
        computed: {
            flightComNo: {
                get: function () {
                    return this.listQuery.carrier+this.listQuery.flightno;
                },
                set: function (val) {
                    this.listQuery.carrier='';
                    this.listQuery.flightno = val.toUpperCase();
                }
            }
        },
221 222
        methods: {
            getList() {
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
                // 主单为空 航班号 航班日期 不能为空
                if (this.listQuery.awba == undefined
                    && this.listQuery.flightno != ''){
                    this.listLoading = true
                    if (this.listQuery.flightno != '' && this.listQuery.flightno.length > 0){
                        this.listQuery.carrier = this.listQuery.flightno.substring(0,2);
                        this.listQuery.flightno = this.listQuery.flightno.substring(2);
                    }
                    getManifests(this.listQuery).then(res =>{
                        this.manifestData = res.data.data.list
                        this.total = res.data.data.total
                        setTimeout(() =>{
                            this.listLoading = false
                        },1500)
                    })
                }else if (this.listQuery.awba != undefined){
                    this.listLoading = true
                    this.listQuery.flightDate = undefined;
                    getManifests(this.listQuery).then(res =>{
                        this.manifestData = res.data.data.list
                        this.total = res.data.data.total
                        setTimeout(() =>{
                            this.listLoading = false
                        },1500)
                    })
                }else {
                    Message.warning("请输入运单号或者航班号为查询条件");
                }

            },
            inputAwba(){
                this.listQuery.flightDate = '';
255 256 257 258 259
            },
            handleSelectionChange() {

            },
            handleSearch(){
260
                this.listQuery.pageSize =1;
261 262 263 264 265 266 267 268 269 270 271 272 273 274 275
                this.getList()
            },
            handleUpdateStatus(row){

            },
            handleUpdate(row){
                if(row.messageType === 'MT2201'){
                    this.$router.push({name: '出港航班信息', params: {scopeRow: row}})
                }
                if(row.messageType === 'MT3201'){
                    this.$router.push({name: '出港航班信息', params: {scopeRow: row}})
                }
                if(row.messageType === 'MT4201'){
                    this.$router.push({name: '出港航班信息', params: {scopeRow: row}})
                }
276
                if(row.messageType === 'MT5202'){
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
                    this.$router.push({name: '出港航班信息', params: {scopeRow: row}})
                }
            },
            tableRowClassName({row,index}){
                if(row.messageType === 'MT2201'){
                    return 'MT2201-row'
                }
                if(row.messageType === 'MT3201'){
                    return 'MT3201-row'
                }
                if(row.messageType === 'MT4201'){
                    return 'MT4201-row'
                }
                if(row.messageType === 'MT5202'){
                    return 'MT5202-row'
                }
            }
        }
    }

</script>
<style>
    .el-table .MT2201-row {
        background: oldlace;
    }

    .el-table  .MT3201-row {
        background: #f0f9eb;
    }

    .el-table .MT4201-row {
        background: #bce7fd;
    }

    .el-table .MT5202-row {
        background: #f5ffc0;
    }
    .app-content{
        margin-top: 20px;
316 317 318
        width: 100%;
        height: 850px;
        overflow: auto;
319 320 321 322 323
    }
    .midSpan{
        margin-bottom: 10px;
    }
</style>