审查视图

src/views/lostLoadChange/lostLoadChange.vue 12.9 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
<template>
    <!--<div class="app-container">-->
    <div class="app-content">
        <div class="filter-container">
            <el-input v-model="listQuery.awba" clearable style="width: 200px;" class="filter-item" placeholder="运单号"/>
            <el-input v-model="listQuery.carrier" clearable style="width: 200px;" class="filter-item" placeholder="承运人"/>
            <el-input v-model="listQuery.flightno" clearable style="width: 200px;" class="filter-item" placeholder="航班号"/>
            <el-date-picker v-model="listQuery.flightDate" type="date" placeholder="航班日期"
                            value-format="yyyy-MM-dd" class="filter-item"></el-date-picker>
        </div>
        <div class="filter-container">
            <el-select v-model="listQuery.messageType" clearable class="filter-item" placeholder="请选择报文类型" style="width: 200px;">
                <el-option v-for="item in messageTypeList" :key="item.value" :label="item.label" :value="item.value"></el-option>
            </el-select>
            <el-select v-model="listQuery.messageStatus" clearable class="filter-item" placeholder="请选择报文状态" style="width: 200px;">
                <el-option v-for="item in messageStatusList" :key="item.value" :label="item.label" :value="item.value"></el-option>
            </el-select>
            <el-select v-model="listQuery.customStatus" clearable class="filter-item" placeholder="请选择海关状态" style="width: 200px;">
                <el-option v-for="item in customStatusList" :key="item.value" :label="item.label" :value="item.value"></el-option>
            </el-select>
            <el-button class="filter-item" type="primary" @click="handleSearch">查询</el-button>
            <el-button class="filter-item" style="margin-left: 10px;" type="warning"
                       @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>
        <tree-table v-loading="listLoading" :data="manifestData" :eval-func="func" :expand-all="true"
45 46 47
                    style="border-radius: 10px 10px 0px 0px;line-height: 25px;"
                    :header-cell-style="{background:'#6F8294',color:'#FFFFFF'}" size="small"
                    tooltip-effect="dark" border @selection-change="handleSelectionChange"
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
                    :row-class-name="tableRowClassName">
            <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>
            <el-table-column label="状态" width="90px" align="center">
                <template slot-scope="scope">
                    <span v-if="scope.row.status ==='01'">未发送</span>
                    <span v-if="scope.row.status ==='02'">已发舱单报</span>
                    <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>
                    <span v-if="scope.row.status ==='11'">舱单删除成功</span>
                    <span v-if="scope.row.status ==='12'">已发舱单修改报</span>
                    <span v-if="scope.row.status ==='13'">舱单修改报退单</span>
                    <span v-if="scope.row.status ==='14'">舱单修改报转人工</span>
                    <span v-if="scope.row.status ==='15'">舱单修改报成功</span>
                    <span v-if="scope.row.status ==='16'">海关已存在</span>
                </template>
            </el-table-column>
            <el-table-column label="回执内容"  align="center" show-overflow-tooltip>
                <template slot-scope="scope">
                    <span>{{ scope.row.customText }}</span>
                    <!--<div>-->
                    <!--<el-progress :percentage="scope.row.customComplate" :status="scope.row.status | statusFilter"/>-->
                    <!--</div>-->
                </template>
            </el-table-column>
120
            <el-table-column label="操作" width="180px" align="center" fixed="right">
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
                <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>
                    <a style="color: #1d8ce0" @click="handleUpdateStatus(scope.row)">更改状态</a>
                </template>
            </el-table-column>
        </tree-table>
        <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";

    export default {
        name: "LostLoadChange",
        components: {treeTable, Pagination},
        inject:['reload'],
        data() {
            return {
                func: treeToArray,
                total: 1,
                listLoading: false,
                listQuery: {
                    pageSize: 1,
                    limitSize: 100,
                    awba:undefined,
                    carrier: undefined,
                    flightno:undefined,
                    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'},
                ]
            }
        },
        methods: {
            getList() {
                this.listLoading = true
                getManifests(this.listQuery).then(res =>{
                    this.manifestData = res.data.dataList
                    this.total = res.data.count
                    setTimeout(() =>{
                        this.listLoading = false
                    },1500)
                })
            },
            handleSelectionChange() {

            },
            handleSearch(){
                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}})
                }
                if(row.messageType === 'MT5201'){
                    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;
    }
    .midSpan{
        margin-bottom: 10px;
    }
</style>