审查视图

src/views/nmms_import/AllocateSearch.vue 48.3 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 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83
<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>
            <!--查询条件-->
            <el-row>
                <el-col :span="6">
                    <div class="grid-content">
                        <el-input placeholder="" v-model="defaultQuery.awba">
                            <template slot="prepend">主单号</template>
                        </el-input>
                    </div>
                </el-col>
                <el-col :span="5">
                    <div class="grid-content">
                        <el-input placeholder="" v-model="defaultQuery.carrier">
                            <template slot="prepend">承运人</template>
                        </el-input>
                    </div>
                </el-col>
                <el-col :span="5">
                    <div class="grid-content">
                        <el-input placeholder="" v-model="defaultQuery.flightno">
                            <template slot="prepend">航班号</template>
                        </el-input>
                    </div>
                </el-col>
                <el-col :span="5">
                    <div class="grid-content">
                        <div class="block">
                            <el-date-picker
                                    v-model="defaultQuery.flightdate"
                                    value-format="yyyy-MM-dd"
                                    type="date"
                                    placeholder="航班日期">
                            </el-date-picker>
                        </div>
                    </div>
                </el-col>
            </el-row>
            <el-row>
                <el-col :span="6">
                    <div class="grid-content">
                        <el-select v-model="defaultQuery.status" placeholder="选择状态" class="sel">
                            <el-option
                                    v-for="item in options"
                                    :key="item.value"
                                    :label="item.label"
                                    :value="item.value">
                            </el-option>
                        </el-select>
                    </div>
                </el-col>
                <el-col :span="5">
                    <el-select v-model="defaultQuery.turntype" placeholder="报文类型" class="sel">
                        <el-option
                                v-for="item in options2"
                                :key="item.value"
                                :label="item.label"
                                :value="item.value">
                        </el-option>
                    </el-select>
                </el-col>
                <el-col :span="5">
                    <el-col :span="8" style="margin-right: 0px">
                        <el-button v-on:click="Query" type="primary">查询</el-button>
                    </el-col>
                </el-col>
            </el-row>
            <!--查询列表-->
            <el-row>
                <el-col :span="24">
                    <template>
                        <el-table
                                ref="multipleTable"
                                :data="tableData"
                                tooltip-effect="dark"
                                style="width: 100%">
                            <el-table-column
                                    fixed="left"
                                    label="修改状态"
xudada authored
84
                                    width="100">
85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132
                                <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
133
                                    width="100" :formatter="formatStatus">
134 135
                            </el-table-column>
                            <el-table-column
xudada authored
136
                                    prop="ext5"
137 138 139 140 141
                                    label="回执内容"
                                    width="250">
                            </el-table-column>
                            <el-table-column
                                    label="修改状态"
xudada authored
142
                                    width="550">
143 144 145 146 147
                                <template slot-scope="scope">
                                    <el-button
                                            v-if="scope.row.turntype=='MT6202'"
                                            size="mini"
                                            type="primary"
xudada authored
148
                                            @click="handleDetail(scope.$index, scope.row)">收发明细
149 150 151 152 153
                                    </el-button>
                                    <el-button
                                            v-else
                                            size="mini"
                                            type="primary"
xudada authored
154
                                            @click="handleDetail(scope.$index, scope.row)">收发明细
155 156 157 158 159
                                    </el-button>
                                    <el-button
                                            v-if="scope.row.turntype=='MT6202'"
                                            size="mini"
                                            type="primary"
xudada authored
160
                                            :disabled="btSendStatusFormater(scope.row.status)"
161 162 163 164 165 166
                                            @click="importSend(scope.$index, scope.row)">申请分拨
                                    </el-button>
                                    <el-button
                                            v-else
                                            size="mini"
                                            type="primary"
xudada authored
167
                                            :disabled="btSendStatusFormater(scope.row.status)"
168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185
                                            @click="arriveSend(scope.$index, scope.row)">分拨运抵
                                    </el-button>
                                    <el-button
                                            v-if="scope.row.turntype=='MT6202'"
                                            size="mini"
                                            type="primary"
                                            @click="importEdit(scope.$index, scope.row)">编辑
                                    </el-button>
                                    <el-button
                                            v-else
                                            size="mini"
                                            type="primary"
                                            @click="arriveEdit(scope.$index, scope.row)">编辑
                                    </el-button>
                                    <el-button
                                            v-if="scope.row.turntype=='MT6202'"
                                            size="mini"
                                            type="primary"
xudada authored
186
                                            :disabled="btDeleStatusFormater(scope.row.status)"
187
                                            @click="importDel(scope.$index, scope.row)">申请分拨删除
188 189 190 191 192
                                    </el-button>
                                    <el-button
                                            v-else
                                            size="mini"
                                            type="primary"
xudada authored
193
                                            :disabled="btDeleStatusFormater(scope.row.status)"
194 195
                                            @click="arriveDel(scope.$index, scope.row)">分拨运抵删除
                                    </el-button>
xudada authored
196 197 198 199 200
                                    <el-button
                                            size="mini"
                                            type="primary"
                                            @click="UpdateStatus(scope.$index, scope.row)">更改状态
                                    </el-button>
201 202 203 204 205 206 207 208 209 210 211 212 213
                                </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"
214
                                :current-page="currentPage"
xudada authored
215
                                :page-sizes="[100, 200, 300, 400]"
216
                                :page-size="pageSize"
217
                                layout="total, sizes, prev, pager, next, jumper"
218
                                :total="total">
219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434
                        </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>
                        <el-col :span="5">
                            <el-form-item label="运单号" prop="awba">
                                <el-input disabled="" v-model="AruleForm.awba"></el-input>
                            </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">
                            <el-form-item label="承运人" prop="carrier">
                                <el-input disabled="" v-model="AruleForm.carrier"></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :span="5">
                            <el-form-item label="航班号" prop="flightno">
                                <el-input disabled="" v-model="AruleForm.flightno"></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :span="5">
                            <el-form-item label="航班日期" required>
                                <el-col :span="24">
                                    <el-form-item prop="flightdate">
                                        <el-date-picker disabled="" type="date" placeholder="选择日期" v-model="AruleForm.flightdate" style="width: 100%;"></el-date-picker>
                                    </el-form-item>
                                </el-col>
                            </el-form-item>
                        </el-col>
                        <el-col :span="5">
                            <el-form-item label="海关关区" prop="customcode">
                                <el-col :span="24">
                                    <el-select v-model="AruleForm.customcode" placeholder="请选择海关关区" style="width:100%">
                                        <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-col>
                            </el-form-item>
                        </el-col>
                    </el-row>
                    <el-row>
                        <el-col :span="5">
                            <el-form-item label="运抵件数" prop="turnpiece">
                                <div v-if="dialogStatus === 'update'">
                                <el-input v-model="AruleForm.turnpiece"></el-input>
                                    </div>
                                <div v-else>
                                    <el-input disabled="" v-model="AruleForm.turnpiece"></el-input>
                                </div>
                            </el-form-item>
                        </el-col>
                        <el-col :span="5">
                            <el-form-item label="运抵重量" prop="turnweight">
                                <div v-if="dialogStatus === 'update'">
                                <el-input v-model="AruleForm.turnweight"></el-input>
                                    </div>
                                <div v-else>
                                    <el-input disabled="" v-model="AruleForm.turnweight"></el-input>
                                </div>
                            </el-form-item>
                        </el-col>
                        <el-col :span="5">
                            <el-form-item label="卸货地" prop="turnunloading">
                                <div v-if="dialogStatus === 'update'">
                                <el-input v-model="AruleForm.turnunloading"></el-input>
                                    </div>
                                <div v-else>
                                    <el-input disabled="" v-model="AruleForm.turnunloading"></el-input>
                                </div>
                            </el-form-item>
                        </el-col>
                        <el-col :span="5">
                            <el-form-item label="货物描述" prop="turnunloading">
                                <div v-if="dialogStatus === 'update'">
                                <el-input v-model="AruleForm.goodsname"></el-input>
                                    </div>
                                <div v-else>
                                    <el-input disabled="" v-model="AruleForm.goodsname"></el-input>
                                </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">
                            <el-form-item label="运单号" prop="awba">
                                <el-input disabled="" v-model="IruleForm.awba"></el-input>
                            </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">
                            <el-form-item label="承运人" prop="carrier">
                                <el-input disabled="" v-model="IruleForm.carrier"></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :span="5">
                            <el-form-item label="航班号" prop="flightno">
                                <el-input disabled="" v-model="IruleForm.flightno"></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :span="5">
                            <el-form-item label="航班日期" required>
                                <el-col :span="24">
                                    <el-form-item prop="flightdate">
                                        <el-date-picker disabled="" type="date" placeholder="选择日期" v-model="IruleForm.flightdate" style="width: 100%;"></el-date-picker>
                                    </el-form-item>
                                </el-col>
                            </el-form-item>
                        </el-col>
                        <el-col :span="5">
                            <el-form-item label="海关关区" prop="customcode">
                                <el-col :span="24">
                                    <el-select v-model="IruleForm.customcode" placeholder="请选择海关关区" style="width:100%">
                                        <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-col>
                            </el-form-item>
                        </el-col>
                    </el-row>
                    <el-row>
                        <el-col :span="5">
                            <el-form-item label="运抵件数" prop="turnpiece">
                                <div v-if="dialogStatus === 'update'">
                                <el-input v-model="IruleForm.turnpiece"></el-input>
                                    </div>
                                <div v-else>
                                    <el-input disabled="" v-model="IruleForm.turnpiece"></el-input>
                                </div>
                            </el-form-item>
                        </el-col>
                        <el-col :span="5">
                            <el-form-item label="运抵重量" prop="turnweight">
                                <div v-if="dialogStatus === 'update'">
                                <el-input v-model="IruleForm.turnweight"></el-input>
                                    </div>
                                <div v-else>
                                    <el-input disabled="" v-model="IruleForm.turnweight"></el-input>
                                </div>
                            </el-form-item>
                        </el-col>
                        <el-col :span="5">
                            <el-form-item label="到达地" prop="turnunloading">
                                <div v-if="dialogStatus === 'update'">
                                <el-input v-model="IruleForm.turnunloading"></el-input>
                                    </div>
                                <div v-else>
                                    <el-input disabled="" v-model="IruleForm.turnunloading"></el-input>
                                </div>
                            </el-form-item>
                        </el-col>
                        <el-col :span="5">
                            <el-form-item label="拖车号" prop="pno">
                                <div v-if="dialogStatus === 'update'">
                                <el-input v-model="IruleForm.pno"></el-input>
                                    </div>
                                <div v-else>
                                    <el-input disabled="" v-model="IruleForm.pno"></el-input>
                                </div>
                            </el-form-item>
                        </el-col>
435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454
                        <el-col :span="5">
                            <el-form-item label="卸货地" prop="ext2">
                                <div v-if="dialogStatus === 'update'">
                                    <el-input v-model="IruleForm.ext2"></el-input>
                                </div>
                                <div v-else>
                                    <el-input disabled="" v-model="IruleForm.ext2"></el-input>
                                </div>
                            </el-form-item>
                        </el-col>
                        <el-col :span="5">
                            <el-form-item label="车辆所属" prop="ext1">
                                <div v-if="dialogStatus === 'update'">
                                    <el-input v-model="IruleForm.ext1"></el-input>
                                </div>
                                <div v-else>
                                    <el-input disabled="" v-model="IruleForm.ext1"></el-input>
                                </div>
                            </el-form-item>
                        </el-col>
455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471
                    </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>
472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491
            <!--发送删除报修改报提示框-->
            <el-row>
                <el-dialog :title="'提交'+Reason[udStatus]+'信息'" :visible.sync="dialogFormVisible">
                    <el-form :model="Udform" :rules="udrules" ref="Udform" class="demo-ruleForm">
                        <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-form>
                    <div slot="footer" class="dialog-footer">
                        <el-button @click="dialogFormVisible = false">取 消</el-button>
                        <el-button type="primary" @click="deleteIdForm('Udform')">确 定</el-button>
                    </div>
                </el-dialog>
            </el-row>
xudada authored
492 493 494 495 496 497 498 499 500 501 502 503
            <!--明细列表弹出框-->
            <el-row>
                <el-dialog title="回执明细列表" :visible.sync="dialogTableVisible" width="70%">
                    <el-table :data="gridData">
                        <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>
504 505 506 507 508 509 510 511 512 513 514
        </el-main>
    </el-container>
</template>
<style scoped>
    .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
515 516 517
    .el-input-group{
        display: table;
    }
518 519
</style>
<script>
xudada authored
520
    import{addResponse,selectResponseList} from "../../api/InResponse";
521
    import { QueryData,ediAllocat,sendCreateMt6202,sendRemoveMt6202,sendCreateMt3202,sendRemoveMt3202 } from '../../api/Allocat'
522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560
    export default{
        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
561 562
                }
                ],
563 564 565 566 567 568 569 570 571 572
                options2: [
                    {
                    value: '',
                    label: '选择状态'
                }, {
                    value: 'MT6202',
                    label: '分拨申请'
                }, {
                    value: 'MT3202',
                    label: '分拨运抵'
xudada authored
573 574
                }
                ],
575 576 577 578 579 580 581 582 583 584 585 586 587 588
                options3: [
                    {
                        value: '4604',
                        label: '4604'
                    }, {
                        value: '4620',
                        label: '4620'
                    }, {
                        value: '4613',
                        label: '4613'
                    }],
                tableData: [],
                multipleSelection: [],
                labelPosition:'left',
589
                currentPage:1,
xudada authored
590
                pageSize:100,
591
                total:0,
592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610
                dialogStatus:'',
                IouterVisible: false,
                AouterVisible: false,
                centerDialogVisible:false,
                msg:'',
                code:'',
                textMap:{
                    update: '编辑',
                    detail: ''
                },
                AruleForm:{
                    awba:'',
                    carrier:'',
                    flightno:'',
                    flightdate:'',
                    customcode:'',
                    turnpiece:'',
                    turnweight:'',
                    turnunloading:'',
611 612 613
                    goodsname:'',
                    ext2:'',
                    ext1:''
614 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 647 648 649 650 651 652
                },
                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,
653 654 655
                    pno:undefined,
                    ext1:undefined,
                    ext2:undefined
656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684
                },
                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' }
                    ],
685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714
                    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: '删除'
715
                },
716 717 718 719
                udStatus:'',
                dialogFormVisible: false,
                rows:{},
                loading:false,
xudada authored
720 721
                dialogTableVisible:false,
                gridData:[]
722 723 724
            }
        },
        methods:{
xudada authored
725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741
            //更改状态
            UpdateStatus(column,row){
                this.$confirm("是否发送更改状态", "确认消息", {
                    distinguishCancelAndClose: true,
                    confirmButtonText: '确认更改',
                    cancelButtonText: '取消更改'
                }).then(() => {
                    row.status = '22';
                }).catch(action => {
                    this.$message({
                        type: 'info',
                        message: action === 'cancel'
                            ? '取消状态更改'
                            : '状态更改取消'
                    })
                })
            },
xudada authored
742 743 744 745 746 747 748 749 750 751 752 753
            //回执收发明细
            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
754 755 756 757 758 759 760
            //状态适配
            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
761 762 763 764 765 766 767 768 769 770 771 772 773 774 775
            //发送舱单报按钮判定事件
            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;
                }
            },
776 777 778 779 780 781 782 783
            //发送分拨申请报
            importSend(index,row){
                const map = {'mt6202':row}
                sendCreateMt6202(map).then(res=>{
                    let response=res.data;
                    //console.log(res);
                    this.code=response.code;
                    if(this.code=='200'){
xudada authored
784 785
                        row.status='23'
                        row.ext5='分拨申请发送成功';
786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804
                        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
805
                this.Udform.bustype='MT6202';
806 807 808 809 810 811 812 813 814 815 816 817
                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
818
                    if (valid) {
819 820 821 822 823 824 825 826 827 828 829 830 831 832 833
                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,
                    'carrier':this.rows.carrier}
                    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
834 835
                                this.rows.status='24';
                                this.rows.ext5='分拨申请删除报发送成功';
836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852
                                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
853 854
                                this.rows.status='24';
                                this.rows.ext5='分拨运抵删除报发送成功';
855 856 857 858 859 860 861 862 863 864 865
                                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
866 867 868 869 870
                    }}
                    else {
                            console.log('error submit!!');
                            return false;
                        }
871 872 873 874 875
                });

            },
            //发送分拨运抵报
            arriveSend(index,row){
xudada authored
876
877 878 879 880 881 882
                const map = {'mt3202':row}
                sendCreateMt3202(map).then(res=>{
                    let response=res.data;
                    //console.log(res);
                    this.code=response.code;
                    if(this.code=='200'){
xudada authored
883 884
                        row.status='23'
                        row.ext5='分拨运抵发送成功';
885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903
                        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
904
                this.Udform.bustype='MT3202';
905 906 907 908 909 910 911 912 913
                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;
            },
914 915 916 917
            handleClick(row) {
                console.log(row);
            },
            handleSizeChange(val) {
918 919
                this.pageSize=val;
                this.Query();
920 921
            },
            handleCurrentChange(val) {
922 923
                this.currentPage=val;
                this.query();
924 925 926
            },
            //条件查询
            Query(){
927
                this.listLoading = true;
928
                QueryData(this.defaultQuery).then(res =>{
929
                    console.log(res);
930
                    let response=res.data.data;
931 932 933
                    this.tableData=response.list;
                    this.total=response.total;
                    this.listLoading = false;
934 935 936 937
            });
            },
            getList(){
                this.defaultQuery=this.$route.params;
938
                this.listLoading = true;
939 940 941
                QueryData(this.defaultQuery).then(res =>{
                    //console.log(res);
                    let response=res.data.data;
942 943 944
                    this.tableData=response.list;
                    this.total=response.total;
                    this.listLoading = false;
945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023
            });
            },
            //运抵信息编辑
            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;
            }
            });
            }
        },
        mounted(){
            this.getList();
        }
    }
</script>