审查视图

src/views/nmms_import/AllocateSearch.vue 57.9 KB
1 2 3 4 5 6 7
<template>
    <el-container>
        <el-main>
            <el-row class="row-bg">
                <el-col :span="24"><div class="grid-content content co">进港运单分拨申报</div></el-col>
            </el-row>
            <!--查询条件-->
8 9 10
            <el-row style="display: block;background-color: white;padding-left: 5px">
                <el-row>
                    <el-col :span="6">
11 12
                            <el-input placeholder="" v-model="defaultQuery.awba"  style="width: 200px">
                                <template slot="prepend">主单号</template>
13 14 15
                            </el-input>
                    </el-col>
                    <el-col :span="6">
16 17
                            <el-input placeholder="" v-model="defaultQuery.carrier" style="width: 200px">
                                <template slot="prepend">承运人</template>
18 19 20
                            </el-input>
                    </el-col>
                    <el-col :span="6">
21 22
                            <el-input placeholder="" v-model="defaultQuery.flightno" style="width: 200px">
                                <template slot="prepend">航班号</template>
23 24 25
                            </el-input>
                    </el-col>
                    <el-col :span="6">
26 27
                        <div class="ip">
                            航班日期                                    </div>
28 29 30
                                <el-date-picker
                                        v-model="defaultQuery.flightdate"
                                        value-format="yyyy-MM-dd"
31
                                        type="date"  style="width: 130px"
32 33 34 35 36 37
                                        placeholder="航班日期">
                                </el-date-picker>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="6">
38 39 40
                        <div class="ip">
                            业务状态                                  </div>
                            <el-select v-model="defaultQuery.status" placeholder="选择状态" style="width: 120px">
41 42 43 44 45 46 47 48 49
                                <el-option
                                        v-for="item in options"
                                        :key="item.value"
                                        :label="item.label"
                                        :value="item.value">
                                </el-option>
                            </el-select>
                    </el-col>
                    <el-col :span="6">
50 51 52
                        <div class="ip">
                            报文类型                                  </div>
                        <el-select v-model="defaultQuery.turntype" placeholder="报文类型"  style="width: 120px">
53
                            <el-option
54
                                    v-for="item in options2"
55 56 57 58 59 60
                                    :key="item.value"
                                    :label="item.label"
                                    :value="item.value">
                            </el-option>
                        </el-select>
                    </el-col>
61 62 63 64 65 66
                    <el-col :span="6">
                        <el-col :span="8" style="margin-right: 0px">
                            <el-button v-on:click="Query" type="primary">查询</el-button>
                        </el-col>
                    </el-col>
                </el-row>
67
            </el-row>
68
69 70 71 72 73
            <!--查询列表-->
            <el-row>
                <el-col :span="24">
                    <template>
                        <el-table
xudada authored
74
                                v-loading="listLoading"
75 76 77
                                ref="multipleTable"
                                :data="tableData"
                                tooltip-effect="dark"
78 79
                                style="border-radius: 10px 10px 0px 0px;line-height: 25px;min-height: 500px"
                                :header-cell-style="{background:'#6F8294',color:'#FFFFFF'}" size="small">
80 81 82
                            <el-table-column
                                    fixed="left"
                                    label="修改状态"
xudada authored
83
                                    width="100">
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
                                <template slot-scope="scope">
                                    <el-button v-if="scope.row.turntype=='MT6202'"  type="text" @click="seeimport(scope.row)" size="mini">分拨申请</el-button>
                                    <el-button v-else type="text" @click="seearrive(scope.row)" size="mini">分拨运抵</el-button>
                                </template>
                            </el-table-column>
                            <el-table-column
                                    prop="awba"
                                    label="运单号"
                                    width="115">
                            </el-table-column>
                            <el-table-column
                                    prop="carrier"
                                    label="承运人"
                                    width="65">
                            </el-table-column>
                            <el-table-column
                                    prop="flightno"
                                    label="航班号"
                                    width="65">
                            </el-table-column>
                            <el-table-column
                                    prop="flightdate"
                                    label="航班日期"
                                    width="95">
                            </el-table-column>
                            <el-table-column
                                    prop="turnpiece"
                                    label="件数"
                                    width="65">
                            </el-table-column>
                            <el-table-column
                                    prop="turnweight"
                                    label="重量"
                                    width="80">
                            </el-table-column>
                            <el-table-column
                                    prop="customcode"
                                    label="关区号"
                                    width="65">
                            </el-table-column>
                            <el-table-column
                                    prop="turnunloading"
                                    label="到达/卸货地"
                                    width="155">
                            </el-table-column>
                            <el-table-column
                                    prop="status"
                                    label="状态"
xudada authored
132
                                    width="100" :formatter="formatStatus">
133 134 135 136
                            </el-table-column>
                            <el-table-column
                                    label="回执内容"
                                    width="250">
xudada authored
137
                                <template slot-scope="scope">
138 139 140 141 142 143 144
                                    <span v-if="scope.row.ext5 && scope.row.ext5.indexOf('异常') != -1" style="color: #F56C6C">
                                       {{scope.row.ext5}}
                                    </span>
                                    <span v-else-if="scope.row.ext5 && scope.row.ext5.indexOf('不通过') != -1" style="color: #F56C6C">
                                       {{scope.row.ext5}}
                                    </span>
                                    <span v-else-if="scope.row.ext5 && scope.row.ext5.indexOf('不接受') != -1" style="color: #F56C6C">
145 146 147
                                       {{scope.row.ext5}}
                                    </span>
                                    <span v-else-if="scope.row.status=='01' || scope.row.status=='11'" style="color: #67C23A">
xudada authored
148 149 150 151 152 153 154 155 156 157 158 159
                                        {{scope.row.ext5}}
                                    </span>
                                    <span v-else-if="scope.row.status=='02' || scope.row.status=='03'" style="color: #E6A23C">
                                        {{scope.row.ext5}}
                                    </span>
                                    <span v-else-if="scope.row.status=='12' || scope.row.status=='13'" style="color: #F56C6C">
                                        {{scope.row.ext5}}
                                    </span>
                                    <span v-else style="color: #909399;">
                                        {{scope.row.ext5}}
                                    </span>
                                </template>
160 161
                            </el-table-column>
                            <el-table-column
162
                                    label="修改状态"  prop="operation" fixed="right" align="center" width="285">
163
                                <template slot-scope="scope">
164
                                    <el-row type="flex" justify="space-between">
165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180
                                        <el-button
                                                v-if="scope.row.turntype=='MT6202'"
                                                size="mini"
                                                type="info"
                                                @click="handleDetail(scope.$index, scope.row)">收发明细
                                        </el-button>
                                        <el-button
                                                v-else
                                                size="mini"
                                                type="info"
                                                @click="handleDetail(scope.$index, scope.row)">收发明细
                                        </el-button>
                                        <el-button
                                                v-if="scope.row.turntype=='MT6202'"
                                                size="mini"
                                                type="success"
181
                                                @click="importEdit(scope.$index, scope.row)">编辑信息
182 183 184 185 186
                                        </el-button>
                                        <el-button
                                                v-else
                                                size="mini"
                                                type="success"
187
                                                @click="arriveEdit(scope.$index, scope.row)">编辑信息
188
                                        </el-button>
189 190
                                    </el-row>
                                    <el-row type="flex" justify="space-between">
191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214
                                        <el-button
                                                v-if="scope.row.turntype=='MT6202'"
                                                size="mini"
                                                type="primary"
                                                :disabled="btSendStatusFormater(scope.row.status)"
                                                @click="importSend(scope.$index, scope.row)">申请分拨
                                        </el-button>
                                        <el-button
                                                v-else
                                                size="mini"
                                                type="primary"
                                                :disabled="btSendStatusFormater(scope.row.status)"
                                                @click="arriveSend(scope.$index, scope.row)">分拨运抵
                                        </el-button>
                                        <el-button
                                                size="mini"
                                                type="warning"
                                                @click="UpdateStatus(scope.$index, scope.row)">更改状态
                                        </el-button>
                                        <el-button
                                                v-if="scope.row.turntype=='MT6202'"
                                                size="mini"
                                                type="danger"
                                                :disabled="btDeleStatusFormater(scope.row.status)"
215
                                                @click="importDel(scope.$index, scope.row)">申请删除
216 217 218 219 220 221
                                        </el-button>
                                        <el-button
                                                v-else
                                                size="mini"
                                                type="danger"
                                                :disabled="btDeleStatusFormater(scope.row.status)"
222
                                                @click="arriveDel(scope.$index, scope.row)">申请删除
223
                                        </el-button>
224
                                    </el-row>
225 226 227 228 229 230 231 232 233 234 235 236 237
                                </template>
                            </el-table-column>
                        </el-table>
                    </template>
                </el-col>
            </el-row>
            <!--分页部分-->
            <el-row>
                <el-col>
                    <div class="block">
                        <el-pagination
                                @size-change="handleSizeChange"
                                @current-change="handleCurrentChange"
238
                                :current-page="currentPage"
239
                                :page-sizes="[10, 200, 300, 400]"
240
                                :page-size="pageSize"
241
                                layout="total, sizes, prev, pager, next, jumper"
242
                                :total="total">
243 244 245 246 247 248 249 250 251 252 253 254 255 256 257
                        </el-pagination>
                    </div>
                </el-col>
            </el-row>
            <!--编辑分拨运抵信息-->
            <el-dialog :title="'分拨运抵信息'+textMap[dialogStatus]" :visible.sync="AouterVisible" width="90%">
                <el-form :model="AruleForm" :rules="Arules" ref="AruleForm" :label-position="labelPosition"
                         label-width="78px" size="mini">
                    <!--分拨运抵管理-->
                    <el-row class="flightInfo">
                        <el-col :span="24">
                            <div class="grid-content content" style="height: 36px;line-height: 36px;border-left: 4px #409EFF solid;padding-left: 10px;background-color: #f9fafc;">分拨运抵管理</div>
                        </el-col>
                    </el-row>
                    <el-row>
258 259 260 261 262
                        <el-col :span="6">
                            <el-form-item label="" prop="awba">
                                <el-input disabled="" v-model="AruleForm.awba" style="width: 200px">
                                    <template slot="prepend">运单号</template>
                                </el-input>
263 264 265 266 267 268 269 270 271 272 273 274 275 276
                            </el-form-item>
                        </el-col>
                        <el-col :span="15">
                            <el-button v-if="dialogStatus === 'update'" size="mini" type="primary" @click="AupdateData('AruleForm')" style="float: right">保存</el-button>
                            <el-button else size="mini" type="primary" style="display: none">保存</el-button>
                        </el-col>
                    </el-row>
                    <el-row class="flightInfo">
                        <el-col :span="24">
                            <div class="grid-content content" style="height: 36px;line-height: 36px;border-left: 4px #409EFF solid;padding-left: 10px;background-color: #f9fafc;">货物信息</div>
                        </el-col>
                    </el-row>
                    <el-row>
                        <el-col :span="5">
277 278 279 280
                            <el-form-item label="" prop="carrier">
                                <el-input disabled="" v-model="AruleForm.carrier" style="width: 200px">
                                    <template slot="prepend">承运人</template>
                                </el-input>
281 282 283
                            </el-form-item>
                        </el-col>
                        <el-col :span="5">
284 285 286 287
                            <el-form-item label="" prop="flightno">
                                <el-input disabled="" v-model="AruleForm.flightno" style="width: 200px">
                                    <template slot="prepend">航班号</template>
                                </el-input>
288 289
                            </el-form-item>
                        </el-col>
290 291
                        <el-col :span="7">
                            <el-form-item label="" required>
292
                                    <el-form-item prop="flightdate">
293 294 295
                                        <div class="ipt">
                                            航班日期                                  </div>
                                        <el-date-picker disabled="" type="date" placeholder="选择日期" v-model="AruleForm.flightdate" style="width: 130px;"></el-date-picker>
296 297 298
                                    </el-form-item>
                            </el-form-item>
                        </el-col>
299 300 301 302 303
                        <el-col :span="7">
                            <el-form-item label="" prop="customcode">
                                    <div class="ipt">
                                        海关关区                                  </div>
                                    <el-select v-model="AruleForm.customcode" placeholder="请选择海关关区" style="width:120px">
304 305 306 307 308 309 310 311 312 313 314 315 316 317
                                        <div v-if="dialogStatus === 'update'">
                                        <el-option v-for="item in options3" :key="item.value" :label="item.label"
                                                   :value="item.value" ></el-option>
                                            </div>
                                        <div v-else>
                                            <el-option disabled="" v-for="item in options3" :key="item.value" :label="item.label"
                                                       :value="item.value" ></el-option>
                                        </div>
                                    </el-select>
                            </el-form-item>
                        </el-col>
                    </el-row>
                    <el-row>
                        <el-col :span="5">
318
                            <el-form-item label="" prop="turnpiece">
319
                                <div v-if="dialogStatus === 'update'">
320 321 322
                                <el-input type="number" v-model="AruleForm.turnpiece" style="width: 200px">
                                    <template slot="prepend">运抵件数</template>
                                </el-input>
323 324
                                    </div>
                                <div v-else>
325 326 327
                                    <el-input type="number" disabled="" v-model="AruleForm.turnpiece" style="width: 200px">
                                        <template slot="prepend">运抵件数</template>
                                    </el-input>
328 329 330 331
                                </div>
                            </el-form-item>
                        </el-col>
                        <el-col :span="5">
332
                            <el-form-item label="" prop="turnweight">
333
                                <div v-if="dialogStatus === 'update'">
334 335 336
                                <el-input type="number" v-model="AruleForm.turnweight" style="width: 200px">
                                    <template slot="prepend">运抵重量</template>
                                </el-input>
337 338
                                    </div>
                                <div v-else>
339 340 341
                                    <el-input type="number" disabled="" v-model="AruleForm.turnweight" style="width: 200px">
                                        <template slot="prepend">运抵重量</template>
                                    </el-input>
342 343 344
                                </div>
                            </el-form-item>
                        </el-col>
345 346
                        <el-col :span="7">
                            <el-form-item label="" prop="turnunloading">
347
                                <div v-if="dialogStatus === 'update'">
348 349 350
                                <el-input v-model="AruleForm.turnunloading" style="width: 215px">
                                    <template slot="prepend">卸货地</template>
                                </el-input>
351 352
                                    </div>
                                <div v-else>
353 354 355
                                    <el-input disabled="" v-model="AruleForm.turnunloading" style="width: 215px">
                                        <template slot="prepend">卸货地</template>
                                    </el-input>
356 357 358 359
                                </div>
                            </el-form-item>
                        </el-col>
                        <el-col :span="5">
360
                            <el-form-item label="" prop="turnunloading">
361
                                <div v-if="dialogStatus === 'update'">
362 363 364
                                <el-input v-model="AruleForm.goodsname" style="width: 200px">
                                    <template slot="prepend">货物描述</template>
                                </el-input>
365 366
                                    </div>
                                <div v-else>
367 368 369
                                    <el-input disabled="" v-model="AruleForm.goodsname" style="width: 200px">
                                        <template slot="prepend">货物描述</template>
                                    </el-input>
370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388
                                </div>
                            </el-form-item>
                        </el-col>
                    </el-row>

                </el-form>
            </el-dialog>
            <!--编辑分拨申请信息-->
            <el-dialog :title="'申请分拨信息'+textMap[dialogStatus]" :visible.sync="IouterVisible" width="90%">
                <el-form :model="IruleForm" :rules="Irules" ref="IruleForm" :label-position="labelPosition"
                         label-width="78px" size="mini">
                    <!--分拨运抵管理-->
                    <el-row class="flightInfo">
                        <el-col :span="24">
                            <div class="grid-content content" style="height: 36px;line-height: 36px;border-left: 4px #409EFF solid;padding-left: 10px;background-color: #f9fafc;">分拨运单管理</div>
                        </el-col>
                    </el-row>
                    <el-row>
                        <el-col :span="5">
389 390 391 392
                            <el-form-item label="" prop="awba">
                                <el-input disabled="" v-model="IruleForm.awba" style="width: 200px">
                                    <template slot="prepend">运单号</template>
                                </el-input>
393 394 395 396 397 398 399 400 401 402 403 404 405 406
                            </el-form-item>
                        </el-col>
                        <el-col :span="15">
                            <el-button v-if="dialogStatus === 'update'" size="mini" type="primary" @click="IupdateData('IruleForm')" style="float: right">保存</el-button>
                            <el-button v-else size="mini" type="primary"  style="display: none">保存</el-button>
                        </el-col>
                    </el-row>
                    <el-row class="flightInfo">
                        <el-col :span="24">
                            <div class="grid-content content" style="height: 36px;line-height: 36px;border-left: 4px #409EFF solid;padding-left: 10px;background-color: #f9fafc;">货物信息</div>
                        </el-col>
                    </el-row>
                    <el-row>
                        <el-col :span="5">
407 408 409 410
                            <el-form-item label="" prop="carrier">
                                <el-input disabled="" v-model="IruleForm.carrier" style="width: 200px">
                                    <template slot="prepend">运承运人单号</template>
                                </el-input>
411 412 413
                            </el-form-item>
                        </el-col>
                        <el-col :span="5">
414 415 416 417
                            <el-form-item label="" prop="flightno">
                                <el-input disabled="" v-model="IruleForm.flightno" style="width: 200px">
                                    <template slot="prepend">航班号</template>
                                </el-input>
418 419
                            </el-form-item>
                        </el-col>
420 421
                        <el-col :span="7">
                            <el-form-item label="" required>
422
                                    <el-form-item prop="flightdate">
423 424 425
                                        <div class="ipt">
                                            航班日期                                  </div>
                                        <el-date-picker disabled="" type="date" placeholder="选择日期" v-model="IruleForm.flightdate" style="width: 130px;"></el-date-picker>
426 427 428
                                    </el-form-item>
                            </el-form-item>
                        </el-col>
429 430 431 432 433
                        <el-col :span="7">
                            <el-form-item label="" prop="customcode">
                                    <div class="ipt">
                                        海关关区                                  </div>
                                    <el-select v-model="IruleForm.customcode" placeholder="请选择海关关区" style="width:120px">
434 435 436 437 438 439 440 441 442 443 444 445 446 447
                                        <div v-if="dialogStatus === 'update'">
                                        <el-option v-for="item in options3" :key="item.value" :label="item.label"
                                                   :value="item.value" ></el-option>
                                            </div>
                                        <div v-else>
                                            <el-option disabled="" v-for="item in options3" :key="item.value" :label="item.label"
                                                       :value="item.value" ></el-option>
                                        </div>
                                    </el-select>
                            </el-form-item>
                        </el-col>
                    </el-row>
                    <el-row>
                        <el-col :span="5">
448
                            <el-form-item label="" prop="turnpiece">
449
                                <div v-if="dialogStatus === 'update'">
450 451 452
                                <el-input v-model="IruleForm.turnpiece" style="width: 200px">
                                    <template slot="prepend">运抵件数</template>
                                </el-input>
453 454
                                    </div>
                                <div v-else>
455 456 457
                                    <el-input disabled="" v-model="IruleForm.turnpiece" style="width: 200px">
                                        <template slot="prepend">运抵件数</template>
                                    </el-input>
458 459 460 461
                                </div>
                            </el-form-item>
                        </el-col>
                        <el-col :span="5">
462
                            <el-form-item label="" prop="turnweight">
463
                                <div v-if="dialogStatus === 'update'">
464 465 466
                                <el-input v-model="IruleForm.turnweight" style="width: 200px">
                                    <template slot="prepend">运抵重量</template>
                                </el-input>
467 468
                                    </div>
                                <div v-else>
469 470 471
                                    <el-input disabled="" v-model="IruleForm.turnweight" style="width: 200px">
                                        <template slot="prepend">运抵重量</template>
                                    </el-input>
472 473 474
                                </div>
                            </el-form-item>
                        </el-col>
475 476
                        <el-col :span="7">
                            <el-form-item label="" prop="turnunloading">
477
                                <div v-if="dialogStatus === 'update'">
478 479 480
                                <el-input v-model="IruleForm.turnunloading" style="width: 200px">
                                    <template slot="prepend">到达地</template>
                                </el-input>
481 482
                                    </div>
                                <div v-else>
483 484 485
                                    <el-input disabled="" v-model="IruleForm.turnunloading" style="width: 200px">
                                        <template slot="prepend">到达地</template>
                                    </el-input>
486 487 488 489
                                </div>
                            </el-form-item>
                        </el-col>
                        <el-col :span="5">
490
                            <el-form-item label="" prop="pno">
491
                                <div v-if="dialogStatus === 'update'">
492 493 494
                                <el-input v-model="IruleForm.pno" style="width: 200px">
                                    <template slot="prepend">拖车号</template>
                                </el-input>
495 496
                                    </div>
                                <div v-else>
497 498 499
                                    <el-input disabled="" v-model="IruleForm.pno" style="width: 200px">
                                        <template slot="prepend">拖车号</template>
                                    </el-input>
500 501 502
                                </div>
                            </el-form-item>
                        </el-col>
503 504 505

                    </el-row>
                    <el-row>
506
                        <el-col :span="5">
507
                            <el-form-item label="" prop="ext2">
508
                                <div v-if="dialogStatus === 'update'">
509 510 511
                                    <el-input v-model="IruleForm.ext2" style="width: 200px">
                                        <template slot="prepend">卸货地</template>
                                    </el-input>
512 513
                                </div>
                                <div v-else>
514 515 516
                                    <el-input disabled="" v-model="IruleForm.ext2" style="width: 200px">
                                        <template slot="prepend">卸货地</template>
                                    </el-input>
517 518 519 520
                                </div>
                            </el-form-item>
                        </el-col>
                        <el-col :span="5">
521
                            <el-form-item label="" prop="ext1">
522
                                <div v-if="dialogStatus === 'update'">
523 524 525
                                    <el-input v-model="IruleForm.ext1" style="width: 200px">
                                        <template slot="prepend">车辆所属</template>
                                    </el-input>
526 527
                                </div>
                                <div v-else>
528 529 530
                                    <el-input disabled="" v-model="IruleForm.ext1" style="width: 200px">
                                        <template slot="prepend">车辆所属</template>
                                    </el-input>
531 532 533
                                </div>
                            </el-form-item>
                        </el-col>
534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550
                    </el-row>
                </el-form>
            </el-dialog>
            <!--对话提示框-->
            <el-row>
                <el-dialog
                        title="系统提示"
                        :visible.sync="centerDialogVisible"
                        width="30%"
                        center>
                    <span>{{msg}}</span>
                      <span slot="footer" class="dialog-footer">
                          <el-button @click="centerDialogVisible = false">取 消</el-button>
                        <el-button type="primary" @click="centerDialogVisible = false">确 定</el-button>
                      </span>
                </el-dialog>
            </el-row>
551 552 553 554
            <!--发送删除报修改报提示框-->
            <el-row>
                <el-dialog :title="'提交'+Reason[udStatus]+'信息'" :visible.sync="dialogFormVisible">
                    <el-form :model="Udform" :rules="udrules" ref="Udform" class="demo-ruleForm">
555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590
<!--                        <el-form-item label="操作原因" prop="operreason">-->
<!--                            <el-input type="textarea" v-model="Udform.operreason"></el-input>-->
<!--                        </el-form-item>-->
<!--                        <el-form-item label="操作人" prop="operperson">-->
<!--                            <el-input v-model="Udform.operperson"></el-input>-->
<!--                        </el-form-item>-->
<!--                        <el-form-item label="联系电话" prop="opertel">-->
<!--                            <el-input v-model="Udform.opertel"></el-input>-->
<!--                        </el-form-item>-->
                        <el-row style="margin: 10px auto">
                            <el-col :span="22">
                                <el-form-item label="" prop="operreason">
                                    <div class="ipt">
                                        操作原因
                                    </div>
                                    <el-input autosize type="textarea" v-model="Udform.operreason" style="width: 80%">
                                    </el-input>
                                </el-form-item>
                            </el-col>
                        </el-row>
                        <el-row>
                            <el-col :span="11" style="margin-right: 10px">
                                <el-form-item label="" prop="operperson">
                                    <el-input v-model="Udform.operperson" style="width: 200px">
                                        <template slot="prepend">操作人</template>
                                    </el-input>
                                </el-form-item>
                            </el-col>
                            <el-col :span="10">
                                <el-form-item label="" prop="opertel">
                                    <el-input v-model="Udform.opertel" style="width: 250px">
                                        <template slot="prepend">联系电话</template>
                                    </el-input>
                                </el-form-item>
                            </el-col>
                        </el-row>
591
                    </el-form>
592
                    <div slot="footer" class="dialog-footer" style="margin-top: 30px" align="center">
593 594 595 596 597
                        <el-button @click="dialogFormVisible = false">取 消</el-button>
                        <el-button type="primary" @click="deleteIdForm('Udform')">确 定</el-button>
                    </div>
                </el-dialog>
            </el-row>
xudada authored
598 599 600
            <!--明细列表弹出框-->
            <el-row>
                <el-dialog title="回执明细列表" :visible.sync="dialogTableVisible" width="70%">
601 602
                    <el-table :data="gridData" style="border-radius: 10px 10px 0px 0px;line-height: 25px;min-height: 500px"
                              :header-cell-style="{background:'#6F8294',color:'#FFFFFF'}" size="small" >
xudada authored
603 604 605 606 607 608 609 610
                        <el-table-column property="busdate" label="时间" width="160"></el-table-column>
                        <el-table-column property="username" label="操作人" width="130"></el-table-column>
                        <el-table-column property="buspiece" label="发送件数" width="130"></el-table-column>
                        <el-table-column property="busweight" label="发送重量" width="130"></el-table-column>
                        <el-table-column property="cusrestext" label="回执内容"></el-table-column>
                    </el-table>
                </el-dialog>
            </el-row>
611 612 613 614
        </el-main>
    </el-container>
</template>
<style scoped>
615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646
    .ip{
        max-width: 100px;
        margin-right: -6px;
        display: inline-block;
        background-color: #6F8294;
        color: #ffffff;
        border: 1px solid #DCDFE6;
        vertical-align: middle;
        padding: 5px 18px;
        white-space: nowrap;
        border-top-right-radius: 0px;
        border-top-left-radius: 4px;
        border-bottom-left-radius: 4px;
        border-bottom-right-radius: 0px;
        font-size: 10px;
    }
    .ipt{
        max-width: 100px;
        margin-right: -4px;
        display: inline-block;
        background-color: #6F8294;
        color: #ffffff;
        border: 1px solid #DCDFE6;
        vertical-align: middle;
        padding: 0 18px;
        white-space: nowrap;
        border-top-right-radius: 0px;
        border-top-left-radius: 4px;
        border-bottom-left-radius: 4px;
        border-bottom-right-radius: 0px;
        font-size: 10px;
    }
647 648 649 650 651 652 653
    .co{height: 36px;line-height: 36px;}
    .co{border-left: 4px #409EFF solid;padding-left: 10px;background-color: #f9fafc;margin-bottom: 2px}
    .row-bg{background-color: white;padding:0px;}
    .el-row{margin-bottom: 10px;}
    .sel{display: inline;}
    .mark{height:24px;}
    .bg{height:24px;text-align: center;line-height:24px;min-height: 24px}
xudada authored
654 655 656
    .el-input-group{
        display: table;
    }
657 658
</style>
<script>
xudada authored
659
    import{addResponse,selectResponseList} from "../../api/InResponse";
660
    import { QueryData,ediAllocat,sendCreateMt6202,sendRemoveMt6202,sendCreateMt3202,sendRemoveMt3202 } from '../../api/Allocat'
661
    import loginUserInfo from '@/api/base'
662
    import {mapActions, mapGetters} from 'vuex'
663
    import {loginedUserInfo} from "../../api/user";
664
    export default{
665
        name:'Allocatesearch',
666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703
        data(){
            return{
                defaultQuery:{
                    awba:'',
                    carrier:'',
                    flighto:'',
                    flightdate:'',
                    status:'',
                    turntype:''
                },
                options: [
                    {
                    value: '',
                    label: '选择状态'
                }, {
                    value: '01',
                    label: '未发送'
                }, {
                    value: '02',
                    label: '已发舱单报'
                }, {
                    value: '03',
                    label: '收到舱单报回执'
                }, {
                    value: '04',
                    label: '收到舱单报回执'
                }, {
                    value: '05',
                    label: '舱单报申报成功'
                }, {
                    value: '06',
                    label: '已发舱单删除报'
                }, {
                    value: '07',
                    label: '舱单删除报退单'
                }, {
                    value: '08',
                    label: '舱单删除报转人工'
xudada authored
704 705
                }
                ],
706 707 708 709 710 711 712 713 714 715
                options2: [
                    {
                    value: '',
                    label: '选择状态'
                }, {
                    value: 'MT6202',
                    label: '分拨申请'
                }, {
                    value: 'MT3202',
                    label: '分拨运抵'
xudada authored
716 717
                }
                ],
718 719 720 721 722 723 724 725 726 727 728 729 730 731
                options3: [
                    {
                        value: '4604',
                        label: '4604'
                    }, {
                        value: '4620',
                        label: '4620'
                    }, {
                        value: '4613',
                        label: '4613'
                    }],
                tableData: [],
                multipleSelection: [],
                labelPosition:'left',
732
                currentPage:1,
733
                pageSize:10,
734
                total:0,
735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753
                dialogStatus:'',
                IouterVisible: false,
                AouterVisible: false,
                centerDialogVisible:false,
                msg:'',
                code:'',
                textMap:{
                    update: '编辑',
                    detail: ''
                },
                AruleForm:{
                    awba:'',
                    carrier:'',
                    flightno:'',
                    flightdate:'',
                    customcode:'',
                    turnpiece:'',
                    turnweight:'',
                    turnunloading:'',
754 755 756
                    goodsname:'',
                    ext2:'',
                    ext1:''
757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795
                },
                Arules: {
                    awba: [
                        { required: true, message: '请输入运单号', trigger: 'blur' },
                    ],
                    carrier: [
                        { required: true, message: '请输入承运人', trigger: 'blur' }
                    ],
                    flightno: [
                        { required: true, message: '请输入航班号', trigger: 'blur' }
                    ],
                    goodsname: [
                        { required: true, message: '请输入货物描述', trigger: 'blur' }
                    ],
                    turnpiece: [
                        { required: true, message: '请输入分拨件数', trigger: 'blur' }
                    ],
                    turnweight: [
                        { required: true, message: '请输入分拨重量', trigger: 'blur' }
                    ],
                    flightdate: [
                        {required: true, message: '航班日期必须选择', trigger: 'change'}
                    ],
                    customcode: [
                        { required: true, message: '请选择海关关区', trigger: 'change' }
                    ],
                    turnunLoading: [
                        { required: true, message: '请选择分拨到达地', trigger: 'change' }
                    ],
                },
                IruleForm:{
                    awba:undefined,
                    carrier:undefined,
                    flightno:undefined,
                    flightdate:undefined,
                    customcode:undefined,
                    turnpiece:undefined,
                    turnweight:undefined,
                    turnunloading:undefined,
796 797 798
                    pno:undefined,
                    ext1:undefined,
                    ext2:undefined
799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827
                },
                Irules: {
                    awba: [
                        { required: true, message: '请输入运单号', trigger: 'blur' },
                    ],
                    carrier: [
                        { required: true, message: '请输入承运人', trigger: 'blur' }
                    ],
                    flightno: [
                        { required: true, message: '请输入航班号', trigger: 'blur' }
                    ],
                    goodsname: [
                        { required: true, message: '请输入货物描述', trigger: 'blur' }
                    ],
                    turnpiece: [
                        { required: true, message: '请输入分拨件数', trigger: 'blur' }
                    ],
                    turnweight: [
                        { required: true, message: '请输入分拨重量', trigger: 'blur' }
                    ],
                    flightdate: [
                        {required: true, message: '航班日期必须选择', trigger: 'change'}
                    ],
                    customcode: [
                        { required: true, message: '请选择海关关区', trigger: 'change' }
                    ],
                    turnunLoading: [
                        { required: true, message: '请选择分拨到达地', trigger: 'change' }
                    ],
828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857
                    ext2: [
                        { required: true, message: '请输入卸货地代码', trigger: 'change' }
                    ],
                    ext1: [
                        { required: true, message: '请输入车辆所属承运人代码', trigger: 'change' }
                    ],
                },
                Udform:{
                    operreason:'',
                    operperson:'',
                    opertel:'',
                    flightdate:'',
                    flightno:'',
                    carrier:'',
                    awbano:'',
                    awbhno:'',
                    bustype:'',
                    busdate:'',
                    busweight:'',
                    buspiece:'',
                    opertype:'',
                },
                udrules:{
                    operreason: [{required: true, message: '请输入操作原因', trigger: 'blur'}],
                    operperson: [{required: true, message: '请输入操作人', trigger: 'blur'}],
                    opertel: [{required: true, message: '请输入操作人联系电话', trigger: 'blur'}],
                },
                Reason:{
                    update: '修改',
                    delete: '删除'
858
                },
859 860 861 862
                udStatus:'',
                dialogFormVisible: false,
                rows:{},
                loading:false,
xudada authored
863
                dialogTableVisible:false,
xudada authored
864 865
                gridData:[],
                listLoading:false
866 867 868
            }
        },
        methods:{
xudada authored
869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885
            //更改状态
            UpdateStatus(column,row){
                this.$confirm("是否发送更改状态", "确认消息", {
                    distinguishCancelAndClose: true,
                    confirmButtonText: '确认更改',
                    cancelButtonText: '取消更改'
                }).then(() => {
                    row.status = '22';
                }).catch(action => {
                    this.$message({
                        type: 'info',
                        message: action === 'cancel'
                            ? '取消状态更改'
                            : '状态更改取消'
                    })
                })
            },
xudada authored
886 887 888 889 890 891 892 893 894 895 896 897
            //回执收发明细
            handleDetail(index,row){
                if(row.flightno.length>4){
                    row.flightno=row.flightno.substring(2);
                }
                let params={awbano:row.awba,awbhno:row.awbh,carrier:row.carrier,flightno:row.flightno,flightdate:row.flightdate,bustype:row.turntype}
                selectResponseList(params).then(res=>{
                    this.dialogTableVisible=true;
                    let response=res.data.data;
                    this.gridData=response;
                });
            },
xudada authored
898 899 900 901 902 903 904
            //状态适配
            formatStatus:function (row,column) {
                return row.status=='01'?'接受申报':row.status=='02'?'待人工审核':row.status=='03'?'退单'
                    :row.status=='11'?'放行':row.status=='12'?'拒装':row.status=='13'?'禁卸'
                        :row.status=='21'?'可自动发送':row.status=='22'?'未发送':row.status=='23'?'已发送新增报'
                            :row.status=='24'?'已发送删除报':row.status=='25'?'已发送修改报':'';
            },
xudada authored
905 906 907 908 909 910 911 912 913 914 915 916 917 918 919
            //发送舱单报按钮判定事件
            btSendStatusFormater:(status) => {
                if(status=='23' || status=='24'||status=='25'){
                    return true;
                }else if(status=='22' ) {
                    return false;
                }
            },
            btDeleStatusFormater:(status) => {
                if(status=='23' || status=='24'||status=='25'){
                    return true;
                }else if(status=='22' ) {
                    return false;
                }
            },
920 921
            //发送分拨申请报
            importSend(index,row){
922
                const map = {'mt6202':row,'username':loginedUserInfo().username}
923 924
                sendCreateMt6202(map).then(res=>{
                    let response=res.data;
925
                    console.log(res);
926 927
                    this.code=response.code;
                    if(this.code=='200'){
xudada authored
928 929
                        row.status='23'
                        row.ext5='分拨申请发送成功';
930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948
                        this.outerVisible = false;
                        this.centerDialogVisible=true;
                        this.msg=response.msg;
                    }else{
                        this.outerVisible = false;
                        this.centerDialogVisible=true;
                        this.msg=response.msg;
                    }
                });
            },
            //发送分拨申请删除报
            importDel(index,row){
                this.dialogFormVisible=true;
                this.udStatus='delete';
                this.Udform.awbano=row.awba;
                this.Udform.awbhno=row.awbh;
                this.Udform.carrier=row.carrier;
                this.Udform.flightno=row.flightno.substring(2);
                this.Udform.flightdate=row.flightdate;
xudada authored
949
                this.Udform.bustype='MT6202';
950 951 952 953 954 955 956 957 958 959 960 961
                this.Udform.busdate=Date.parse(new Date());
                this.Udform.busweight=row.weight;
                this.Udform.buspiece=row.piece;
                this.Udform.opertype='发送分拨申请删除报';
                if(row.awbh==null){
                    row.awbh="";
                }
                this.rows=row;
            },
            //发送分拨申请删除报表单
            deleteIdForm(formName){
                this.$refs[formName].validate((valid) => {
xudada authored
962
                    if (valid) {
963 964 965 966 967 968 969 970
                const map = {'flightNo':this.rows.flightno,
                    'flightDate':this.rows.flightdate,
                    'awba':this.rows.awba,
                    'content':'',
                    'customCode':this.rows.customcode,
                    'reason' :this.Udform.operreason,
                    'contactName':this.Udform.operperson,
                    'contactTel':this.Udform.opertel,
971
                    'carrier':this.rows.carrier,
972
                    'username':loginedUserInfo().username}
973 974 975 976 977 978
                    if(this.rows.turntype=='MT6202'){
                        sendRemoveMt6202(map).then(res=>{
                            let response=res.data;
                            //console.log(res);
                            this.code=response.code;
                            if(this.code=='200'){
xudada authored
979 980
                                this.rows.status='24';
                                this.rows.ext5='分拨申请删除报发送成功';
981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997
                                this.dialogFormVisible=false;
                                this.outerVisible = false;
                                this.centerDialogVisible=true;
                                this.msg=response.msg;
                            }else{
                                this.dialogFormVisible=false;
                                this.outerVisible = false;
                                this.centerDialogVisible=true;
                                this.msg=response.msg;
                            }
                        });
                    }else{
                        sendRemoveMt3202(map).then(res=>{
                            let response=res.data;
                            //console.log(res);
                            this.code=response.code;
                            if(this.code=='200'){
xudada authored
998 999
                                this.rows.status='24';
                                this.rows.ext5='分拨运抵删除报发送成功';
1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010
                                this.dialogFormVisible=false;
                                this.outerVisible = false;
                                this.centerDialogVisible=true;
                                this.msg=response.msg;
                            }else{
                                this.dialogFormVisible=false;
                                this.outerVisible = false;
                                this.centerDialogVisible=true;
                                this.msg=response.msg;
                            }
                        });
xudada authored
1011 1012 1013 1014 1015
                    }}
                    else {
                            console.log('error submit!!');
                            return false;
                        }
1016 1017 1018 1019 1020
                });

            },
            //发送分拨运抵报
            arriveSend(index,row){
xudada authored
1021
1022
                const map = {'mt3202':row,'username':loginedUserInfo().username}
1023 1024 1025 1026 1027
                sendCreateMt3202(map).then(res=>{
                    let response=res.data;
                    //console.log(res);
                    this.code=response.code;
                    if(this.code=='200'){
xudada authored
1028 1029
                        row.status='23'
                        row.ext5='分拨运抵发送成功';
1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048
                        this.outerVisible = false;
                        this.centerDialogVisible=true;
                        this.msg=response.msg;
                    }else{
                        this.outerVisible = false;
                        this.centerDialogVisible=true;
                        this.msg=response.msg;
                    }
                });
            },
            //发送分拨返抵删除报
            arriveDel(index,row){
                this.dialogFormVisible=true;
                this.udStatus='delete';
                this.Udform.awbano=row.awba;
                this.Udform.awbhno=row.awbh;
                this.Udform.carrier=row.carrier;
                this.Udform.flightno=row.flightno.substring(2);
                this.Udform.flightdate=row.flightdate;
xudada authored
1049
                this.Udform.bustype='MT3202';
1050 1051 1052 1053 1054 1055 1056 1057 1058
                this.Udform.busdate=Date.parse(new Date());
                this.Udform.busweight=row.weight;
                this.Udform.buspiece=row.piece;
                this.Udform.opertype='发送分拨运抵删除报';
                if(row.awbh==null){
                    row.awbh="";
                }
                this.rows=row;
            },
1059 1060 1061 1062
            handleClick(row) {
                console.log(row);
            },
            handleSizeChange(val) {
1063 1064
                this.pageSize=val;
                this.Query();
1065 1066
            },
            handleCurrentChange(val) {
1067 1068
                this.currentPage=val;
                this.query();
1069 1070 1071
            },
            //条件查询
            Query(){
1072
                this.listLoading = true;
1073
                QueryData(this.defaultQuery).then(res =>{
1074
                    console.log(res);
1075
                    let response=res.data.data;
1076 1077 1078
                    this.tableData=response.list;
                    this.total=response.total;
                    this.listLoading = false;
1079 1080 1081 1082
            });
            },
            getList(){
                this.defaultQuery=this.$route.params;
1083
                this.listLoading = true;
1084 1085 1086
                QueryData(this.defaultQuery).then(res =>{
                    //console.log(res);
                    let response=res.data.data;
1087 1088 1089
                    this.tableData=response.list;
                    this.total=response.total;
                    this.listLoading = false;
1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163
            });
            },
            //运抵信息编辑
            arriveEdit(index,row){
                this.AouterVisible=true;
                this.dialogStatus="update";
                this.AruleForm=row;
            },
            //申请分拨编辑
            importEdit(index,row){
                this.IouterVisible=true;
                this.dialogStatus="update";
                this.IruleForm=row;
            },
            //查看分拨申请信息
            seeimport(row){
                this.IouterVisible=true;
                this.dialogStatus="detail";
                this.IruleForm=row;
            },
            //查看分拨运抵信息
            seearrive(row){
                this.AouterVisible=true;
                this.dialogStatus="detail";
                this.AruleForm=row;
            },
            //分拨运抵更新
            AupdateData(formName){
                this.$refs[formName].validate((valid) => {
                    if (valid) {
                        ediAllocat(this.AruleForm).then(res=>{
                            let response=res.data;
                        this.code=response.code;
                        if(this.code=='200'){
                            this.AouterVisible = false;
                            this.centerDialogVisible=true;
                            this.msg=response.msg;
                        }else{
                            this.AouterVisible = false;
                            this.centerDialogVisible=true;
                            this.msg=response.msg;
                        }
                    });
                    } else {
                        console.log('error submit!!');
                return false;
            }
            });
            },
            //分拨申请更新
            IupdateData(formName){
                this.$refs[formName].validate((valid) => {
                    if (valid) {
                        ediAllocat(this.IruleForm).then(res=>{
                            let response=res.data;
                        //console.log(res);
                        this.code=response.code;
                        if(this.code=='200'){
                            this.IouterVisible = false;
                            this.centerDialogVisible=true;
                            this.msg=response.msg;
                        }else{
                            this.IouterVisible = false;
                            this.centerDialogVisible=true;
                            this.msg=response.msg;
                        }
                    });
                    } else {
                        console.log('error submit!!');
                return false;
            }
            });
            }
        },
1164 1165 1166
        computed:{
            ...mapGetters(['getUserInfoStore','getUserMenuStore']) // 动态计算属性,相当于this.$store.getters.resturantName
        },
1167
        activated(){
1168 1169 1170
            this.getList();
        }
    }
1171
</script>