审查视图

src/views/nmms_fast/WaybillQuerys.vue 16.8 KB
小范 authored
1 2 3 4 5 6 7 8 9 10 11 12
<template>
    <el-container>
        <el-main>
            <el-row class="row-bg">
                <el-col :span="24">
                    <div class="grid-content content">单号查询</div>
                </el-col>
            </el-row>
            <!--            搜索区域-->
            <el-row>
                <el-form :label-position="labelPosition" :model="form"  ref="queryFlight"
                         label-width="130px" class="demo-ruleForm">
小范 authored
13
                    <el-col :span="6" >
小范 authored
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
                        <el-form-item label="" prop="awba" label-width="70px">
                            <el-input v-model="form.awba" style="width:250px">
                                <template slot="prepend">主单号</template>
                            </el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :span="8" >
                        <el-form-item label="" prop="status" label-width="70px">
                            <!--                            <el-input v-model="form.status" style="width:250px">-->
                            <!--                                <template slot="prepend">运单状态</template>-->
                            <!--                            </el-input>-->
                            <div style="display: inline-block;background-color: #6F8294;color: white;
                            border-top-left-radius: 4px;margin-right: -4px;padding-right: 14px;font-size: 12px;
                            border-bottom-left-radius:4px;padding-left: 14px">运单状态</div>
                            <el-select v-model="form.status" style="width:200px">
                                <el-option label="正常" value="30"></el-option>
                                <el-option label="未理货" value="31"></el-option>
                                <el-option label="无原始" value="33"></el-option>
                            </el-select>
                        </el-form-item>
                    </el-col>
                    <el-col :span="5" >
                        <el-button type="primary" @click="getList()">查询</el-button>
                    </el-col>
                </el-form>
            </el-row>
            <!--            表单区域-->
            <el-row>
                <el-table
                        :data="tableData"
                        border default-expand-all
                        height="500" tooltip-effect="dark"
                        v-loading="tableloading"
                        style="border-radius: 10px 10px 0px 0px;line-height: 25px;min-height: 500px"
                        :header-cell-style="{background:'#6F8294',color:'#FFFFFF'}" size="small">
                    <el-table-column
                            label="主单号"
小范 authored
51
                            prop="stockpre"
小范 authored
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74
                            width="180">
                    </el-table-column>
                    <el-table-column
                            label="件数"
                            prop="pcs"
                            width="120">
                    </el-table-column>
                    <el-table-column
                            label="重量"
                            prop="weight"
                            width="120">
                    </el-table-column>
                    <el-table-column
                            label="起始站"
                            prop="sairportid"
                            width="120">
                    </el-table-column>
                    <el-table-column
                            label="目的站"
                            prop="eairportid"
                            width="120">
                    </el-table-column>
                    <el-table-column
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97
                            label="目的站"
                            prop="eairportid"
                            width="120">
                    </el-table-column>
                    <el-table-column
                            label="运单状态"
                            width="120">
                        <template slot-scope="scope">
                            <span v-if="scope.row.status=='30'">
                                        正常
                                    </span>
                            <span v-else-if="scope.row.status=='31'">
                                        未理货
                                    </span>
                            <span v-else-if="scope.row.status=='33'">
                                        无原始
                                    </span>
                            <span v-else >
                                        未知
                                    </span>
                        </template>
                    </el-table-column>
                    <el-table-column
小范 authored
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
                            label="货物描述"
                            prop="goodsname">
                    </el-table-column>
                    <el-table-column
                            fixed="right"
                            label="报文操作"
                            width="120">
                        <template slot-scope="scope">
                            <el-button
                                    size="mini"
                                    type="success"
                                    @click="trnList(scope.$index,scope.row)">查看</el-button>
                        </template>
                    </el-table-column>
                </el-table>
            </el-row>
            <!--分页模块-->
            <el-row style="float: right;margin-top: 20px">
                <div class="block">
                    <el-pagination
                            @size-change="handleSizeChange"
                            @current-change="handleCurrentChange"
                            :current-page="pageNum"
                            :page-sizes="[10, 20, 30, 40]"
                            :page-size="pageSize"
                            layout="total, sizes, prev, pager, next, jumper"
                            :total="total">
                    </el-pagination>
                </div>
            </el-row>
            <el-dialog title="运单明细" :visible.sync="dialogFormVisible" width="65%">
                <el-form :model="ruleForm" :rules="rules" ref="ruleForm" :label-position="labelPosition" size="mini">
                    <el-row class="flightInfo">
                        <el-col :span="24">
                            <el-divider content-position="left">运单信息</el-divider>
                        </el-col>
                    </el-row>
                    <el-row class="flightInfo">
                        <el-col :span="6">
                            <el-form-item  prop="stockpre">
                                <el-input readonly v-model="ruleForm.stockpre" style="width: 200px">
                                    <template slot="prepend">主单号&emsp;</template>
                                </el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :span="6">
                            <el-form-item  prop="stockno">
                                <el-input readonly v-model="ruleForm.stockno" style="width: 200px">
                                    <template slot="prepend">分单号&emsp;</template>
                                </el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :span="6">
                            <el-form-item  prop="pcs">
                                <el-input readonly v-model="ruleForm.pcs" style="width: 200px">
                                    <template slot="prepend">件&emsp;&emsp;数</template>
                                </el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :span="6">
                            <el-form-item prop="weight">
                                <el-input readonly v-model="ruleForm.weight" style="width: 200px">
                                    <template slot="prepend">重&emsp;&emsp;量</template>
                                </el-input>
                            </el-form-item>
                        </el-col>
                    </el-row>
                    <el-row class="flightInfo">
                        <el-col :span="6">
                            <el-form-item  prop="sairportid">
                                <el-input readonly v-model="ruleForm.sairportid" style="width: 200px">
                                    <template slot="prepend">起始站&emsp;</template>
                                </el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :span="6">
                            <el-form-item  prop="eairportid">
                                <el-input readonly v-model="ruleForm.eairportid" style="width: 200px">
                                    <template slot="prepend">目的站&emsp;</template>
                                </el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :span="6">
                            <el-form-item prop="goodsname">
                                <el-input readonly v-model="ruleForm.goodsname" style="width: 200px">
                                    <template slot="prepend">货物描述</template>
                                </el-input>
                            </el-form-item>
                        </el-col>
                    </el-row>
                    <!--发货人信息部分-->
                    <el-row class="flightInfo">
                        <el-col :span="24">
                            <el-divider content-position="left">发货人信息</el-divider>
                        </el-col>
                    </el-row>
                    <el-row style="margin-bottom: 0px;">
                        <el-col :span="6">
                            <el-form-item label="" prop="shprname">
                                <el-input readonly v-model="ruleForm.shprname" style="width: 200px">
                                    <template slot="prepend">发货人称</template>
                                </el-input>
                            </el-form-item>
                        </el-col>

                        <el-col :span="6">
                            <el-form-item label="" prop="shpraddress">
                                <el-input readonly v-model="ruleForm.shpraddress" style="width: 200px">
                                    <template slot="prepend">地&emsp;&emsp;址</template>
                                </el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :span="6">
                            <el-form-item label="" prop="shprtel">
                                <el-input readonly v-model="ruleForm.shprtel" style="width: 200px">
                                    <template slot="prepend">电&emsp;&emsp;话</template>
                                </el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :span="6">
                            <el-form-item label="" prop="shprcountyr">
                                <el-input readonly v-model="ruleForm.shprcountyr" style="width: 200px">
                                    <template slot="prepend">国家代码</template>
                                </el-input>
                            </el-form-item>
                        </el-col>
                    </el-row>
                    <!--收货人信息部分-->
                    <el-row class="flightInfo">
                        <el-col :span="24">
                            <el-divider content-position="left">收货人信息</el-divider>
                        </el-col>
                    </el-row>
                    <el-row style="margin-bottom: 30px">
                        <el-col :span="6">
                            <el-form-item label="" prop="cnsnname">
                                <el-input readonly v-model="ruleForm.cnsnname" style="width: 200px">
                                    <template slot="prepend">收货人称</template>
                                </el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :span="6">
                            <el-form-item label="" prop="cnsnaddress">
                                <el-input readonly v-model="ruleForm.cnsnaddress" style="width: 200px">
                                    <template slot="prepend">地&emsp;&emsp;址</template>
                                </el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :span="6">
                            <el-form-item label="" prop="cnsntel">
                                <el-input readonly v-model="ruleForm.cnsntel" style="width: 200px">
                                    <template slot="prepend">电&emsp;&emsp;话</template>
                                </el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :span="6">
                            <el-form-item label="" prop="cnscountyr">
                                <el-input readonly v-model="ruleForm.cnscountyr" style="width: 200px">
                                    <template slot="prepend">国家代码</template>
                                </el-input>
                            </el-form-item>
                        </el-col>
                    </el-row>
                </el-form>
            </el-dialog>

        </el-main>
    </el-container>
</template>

<script>
269
    import { selectAwmbList } from '../../api/wayDeclaration'
小范 authored
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

    export default {
        name: "WaybillQuerys",
        data(){
            return{
                form:{
                    awba:'',
                    status:''
                },
                pageNum:1,
                pageSize:100,
                total:0,
                ruleForm:{
                    stockpre:'',
                    stockno:'',
                    pcs:'',
                    weight:'',
                    sairportid:'',
                    eairportid:'',
                    goodsname:'',
                    shprname:'',
                    shprtel:'',
                    shprcountyr:'',
                    shpraddress:'',
                    cnsnname:'',
                    cnsnaddress:'',
                    cnsntel:'',
                    cnscountyr:'',
                },
                rules:{

                },
                dialogFormVisible:false,
                tableData:[],
                labelPosition:'left',
                // pageNum: 1,
                // pageSize:10,
                // total:0,
                tableloading:false,

            }
        },
        methods:{
            /*分页方法*/
            handleSizeChange(val) {
                this.pageSize=val;
                this.getList();
            },
            handleCurrentChange(val) {
                this.currentPage=val;
                this.getList();
            },
            // 获取消息标签列表
            getList() {
                const _this = this
                this.tableloading = true;
326
                selectAwmbList(this.form).then((response) => {
小范 authored
327 328 329 330 331 332 333 334
                    console.log(response);
                    const res = response.data
                    if (res.code != '200') {
                        return _this.$message.error('获取消息收发记录,失败!')
                    }
                    // 获取列表数据
                    _this.tableData = res.data.list;
                    // 获取列表的总记录数
小范 authored
335
                    _this.total = res.total
小范 authored
336 337 338 339 340 341 342 343 344 345 346 347 348
                    this.tableloading = false;
                    _this.$message.success('获取消息收发记录,成功!')
                }).catch(error => {
                    // 关闭加载
                    _this.$message.error(error.toString())
                    this.tableloading = false;

                })
            },
            /*编辑主单信息*/
            trnList(index, row){
                this.dialogFormVisible = true;
                this.ruleForm=row;
小范 authored
349 350 351 352
                // if(row.stocktypeid=="AWBA"){
                //     this.ruleForm.stockpre=row.stockpre+"-"+row.stockno;
                //     this.ruleForm.stockno="";
                // }
小范 authored
353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374
            },
        }
    }
</script>

<style scoped>
    .grid-content {
        height: 36px;
        line-height: 36px;
    }
    .el-dialog__body{text-align: center}
    .content {
        border-left: 4px #409EFF solid;
        padding-left: 10px;
        background-color: #f9fafc;
        margin-bottom: 2px
    }

    .row-bg{
        background-color: white;
    }
</style>