diff --git a/src/api/country.js b/src/api/country.js index 6f591ea..ba1595c 100644 --- a/src/api/country.js +++ b/src/api/country.js @@ -8,6 +8,6 @@ export const getByCountryCodeForName = params => { return http.post(`${baseUrl}/ export const getByCountryCode = params => { return http.post(`${baseUrl}/getByCountryCode`,params)}; -export const getAirportCode = params =>{return http.post(`/nmms-server-import/nmms/mt1201/selectList`,params)} +export const getAirportCode = params =>{return http.get(`/nmms-server-import/nmms/mt1201/selectList`,params)} -export const getCustomCode = params =>{return http.post(`/nmms-server-import/nmms/mt1201/selectCustomcode`,params)} +export const getCustomCode = params =>{return http.get(`/nmms-server-import/nmms/mt1201/selectCustomcode`,params)} diff --git a/src/views/nmms/ExitArrive.vue b/src/views/nmms/ExitArrive.vue index 5780e74..57f8087 100644 --- a/src/views/nmms/ExitArrive.vue +++ b/src/views/nmms/ExitArrive.vue @@ -91,21 +91,26 @@ </el-table-column> <el-table-column label="状态" width="100" align="center"> <template slot-scope="scope"> - <span v-if="scope.row.status ==='01'">未发送</span> - <span v-if="scope.row.status ==='02'">已发舱单报</span> - <span v-if="scope.row.status ==='04'">已发送</span> + <span v-if="scope.row.status ==='01'">接受申报</span> + <span v-if="scope.row.status ==='02'">待人工审核</span> + <span v-if="scope.row.status ==='03'">退单</span> <span v-if="scope.row.status ==='05'">舱单报退单</span> <span v-if="scope.row.status ==='06'">舱单转人工</span> <span v-if="scope.row.status ==='07'">舱单报申报成功</span> <span v-if="scope.row.status ==='08'">已发舱单删除报</span> <span v-if="scope.row.status ==='09'">舱单删除报退单</span> <span v-if="scope.row.status ==='10'">舱单删除报转人工</span> - <span v-if="scope.row.status ==='11'">舱单删除成功</span> - <span v-if="scope.row.status ==='12'">已发舱单修改报</span> - <span v-if="scope.row.status ==='13'">舱单修改报退单</span> + <span v-if="scope.row.status ==='11'">放行</span> + <span v-if="scope.row.status ==='12'">拒装</span> + <span v-if="scope.row.status ==='13'">禁卸</span> <span v-if="scope.row.status ==='14'">舱单修改报转人工</span> <span v-if="scope.row.status ==='15'">舱单修改报成功</span> <span v-if="scope.row.status ==='16'">海关已存在</span> + <span v-if="scope.row.status ==='21'">可自动发送</span> + <span v-if="scope.row.status ==='22'">未发送</span> + <span v-if="scope.row.status ==='23'">已发送新增报</span> + <span v-if="scope.row.status ==='24'">已发送删除报</span> + <span v-if="scope.row.status ==='25'">已发送修改报</span> </template> </el-table-column> <el-table-column prop="receipt" label="回执信息" width="180" align="center"> @@ -115,13 +120,13 @@ </el-table-column> <el-table-column prop="operation" label="操作" align="center"> <template slot-scope="scope"> - <el-button size="mini" @click="handleSend(scope.row)">收发明细</el-button> - <el-button size="mini" type="success" @click="handleEdit(scope.row)" :disabled="scope.row.status !=='01'">编辑</el-button> + <el-button size="mini" @click="handleSendDesc(scope.row)">收发明细</el-button> + <el-button size="mini" type="success" @click="handleEdit(scope.row)" :disabled="scope.row.status !=='22'">编辑</el-button> <el-button size="mini" type="primary" @click="handleSendAwb(scope.row)" - :disabled="scope.row.status !=='01'">发送舱单报</el-button> + :disabled="scope.row.status !=='22'">发送舱单报</el-button> <el-button size="mini" type="danger" v-if="isAdmin" @click="handleAwbDelete(scope.row)">删除运单</el-button> <el-button size="mini" type="warning" @click="handleAwbStatus(scope.row)" - :disabled="scope.row.status ==='01'">修改状态</el-button> + :disabled="scope.row.status ==='22'">更改状态</el-button> <el-button size="mini" type="danger" @click="handleSendDelete(scope.row)">发删除报</el-button> </template> </el-table-column> @@ -184,7 +189,8 @@ <el-row> <el-col :span="7.5"> <el-form-item label="起始站" prop="originstation"> - <el-select filterable clearable placeholder="请选择起始站" allow-create v-model="arriveModel.originstation"> + <el-select filterable clearable placeholder="请选择起始站" :remote-method="remoteMethodAirport" + allow-create v-model="originstation" remote> <el-option v-for="item in airportCode" :key="item.airportid" :label="item.airportid" :value="item.airportid" :disabled="dialogFormVisible === 'update'"> @@ -196,7 +202,8 @@ </el-col> <el-col :span="7.5"> <el-form-item label="目的站" prop="destinationstation"> - <el-select filterable clearable placeholder="请选择起始站" allow-create v-model="arriveModel.destinationstation"> + <el-select filterable clearable placeholder="请选择起始站" :remote-method="remoteMethodAirport" + allow-create v-model="destinationstation" remote> <el-option v-for="item in airportCode" :key="item.airportid" :label="item.airportid" :value="item.airportid" :disabled="dialogFormVisible === 'update'"> @@ -237,7 +244,8 @@ </el-col> <el-col :span="7.5"> <el-form-item label="海关关区" prop="customcode"> - <el-select v-model="arriveModel.customcode" placeholder="请选择关区代码" filterable clearable + <el-select v-model="arriveModel.customcode" placeholder="请选择关区代码" :loading="customLoading" + filterable clearable remote :remote-method="remoteMethodCustomCode" :disabled="dialogStatus === 'addAwbh'"> <el-option v-for="item in customCodeList" :key="item.customcode" :label="item.customcode" :value="item.customcode"> @@ -404,6 +412,7 @@ dialogFormVisible: false, dialogDeleteVisible: false, listLoading: false, + customLoading: false, arriveRoles: { awba: [{required: true, trigger: 'blur', validator: validatorAwb}], awbh: [{required: true, trigger: 'blur', validator: validatorAwbh}], @@ -464,8 +473,6 @@ this.arriveQuery.destinationstation = this.$route.params.flightData.destinationstation this.getList() } - this.getAirportCode() - this.getCustomCode() let username = JSON.parse(sessionStorage.getItem('user')).username if (username === 'admin') { this.isAdmin = true @@ -707,14 +714,14 @@ this.dialogDeleteVisible = false this.getList() } else { - Message.success(res.data.respMessage) + Message.error(res.data.respMessage) } }) } }) }, // 收发明细 - handleSend(row) { + handleSendDesc(row) { const resQuery = { carrier: row.carrier, flightNo: row.flightno, @@ -728,7 +735,7 @@ this.detailData = res.data }) }, - //发送删除报 + //删除运单 handleAwbDelete(row) { this.$confirm("是否删除", "确认消息", { distinguishCancelAndClose: true, @@ -789,16 +796,41 @@ }) }) }, - getAirportCode(){ - getAirportCode().then(res=>{ - this.airportCode = res.data.data - }) + //获取机场三字码 + remoteMethodAirport(query){ + this.airportCode = [] + if (query !== '') { + this.listLoading = true + getAirportCode({airportid: query}).then(res => { + if(res !== null){ + setTimeout(() => { + this.listLoading = false + this.airportCode = res.data.data + }, 200) + } + }) + } else { + this.airportCode = [] + } }, - getCustomCode(){ - getCustomCode().then(res =>{ - this.customCodeList = res.data.data - }) + //关区代码 + remoteMethodCustomCode(query){ + this.customCodeList = [] + if (query !== '') { + this.customLoading = true + getCustomCode({customcode: query}).then(res => { + if(res !== null){ + setTimeout(() => { + this.customLoading = false + this.customCodeList = res.data.data + }, 200) + } + }) + } else { + this.airportCode = [] + } }, + // 携数据跳转 新增运抵 handleAddArrive() { const row = { diff --git a/src/views/nmms/ExitFlightDesc.vue b/src/views/nmms/ExitFlightDesc.vue index 85de9b4..06f738a 100644 --- a/src/views/nmms/ExitFlightDesc.vue +++ b/src/views/nmms/ExitFlightDesc.vue @@ -27,7 +27,7 @@ </el-col> <el-col :span="4"> <el-select - :remote-method="remoteMethod" + :remote-method="remoteMethodAirport" :loading="listLoading" v-model="flight.originstation" allow-create @@ -36,17 +36,17 @@ placeholder="请选择起始站" clearable> <el-option v-for="item in airportCode" - :key="item.value" - :label="item.value" - :value="item.value"> - <span style="float: left">{{ item.label }}</span> - <span style="float: right; color: #8492a6; font-size: 13px">{{ item.value }}</span> + :key="item.airportid" + :label="item.airportid" + :value="item.airportid"> + <span style="float: left">{{ item.airportdescchn }}</span> + <span style="float: right; color: #8492a6; font-size: 13px">{{ item.airportid }}</span> </el-option> </el-select> </el-col> <el-col :span="4" style="margin-left: 20px"> <el-select - :remote-method="remoteMethod" + :remote-method="remoteMethodAirport" :loading="listLoading" v-model="flight.destinationstation" allow-create @@ -55,11 +55,11 @@ placeholder="请选择目的站" clearable> <el-option v-for="item in airportCode" - :key="item.value" - :label="item.value" - :value="item.value"> - <span style="float: left">{{ item.label }}</span> - <span style="float: right; color: #8492a6; font-size: 13px">{{ item.value }}</span> + :key="item.airportid" + :label="item.airportdescchn" + :value="item.airportid"> + <span style="float: left">{{ item.airportdescchn }}</span> + <span style="float: right; color: #8492a6; font-size: 13px">{{ item.airportid }}</span> </el-option> </el-select> </el-col> @@ -83,7 +83,8 @@ <script> import {Message} from "element-ui"; - import {getCountry,getAirportCode} from "@/api/country"; + import {getCountry, getAirportCode} from "@/api/country"; + export default { name: 'ExitFlightDesc', data() { @@ -94,18 +95,18 @@ originstation: undefined, destinationstation: undefined, awba: undefined, - messageType:undefined + messageType: undefined }, btnStatus: true, listLoading: false, - airportList:[], + airportList: [], airportResultCode: [], airportCode: [], }; }, created() { if (this.$route.params.scopeRow !== undefined) { - if(this.$route.params.scopeRow.carrier === undefined){ + if (this.$route.params.scopeRow.carrier === undefined) { this.flight.flightno = this.$route.params.scopeRow.flightno } else { this.flight.flightno = this.$route.params.scopeRow.carrier + this.$route.params.scopeRow.flightno @@ -114,70 +115,68 @@ this.flight.originstation = this.$route.params.scopeRow.originstation this.flight.destinationstation = this.$route.params.scopeRow.destinationstation this.flight.messageType = this.$route.params.scopeRow.messageType - if(this.$route.params.scopeRow.awba !== undefined){ - this.flight.awba = this.$route.params.scopeRow.awba.replace('-','') + if (this.$route.params.scopeRow.awba !== undefined) { + this.flight.awba = this.$route.params.scopeRow.awba.replace('-', '') } } - this.getCountryList() - this.getAirport() - }, - mounted() { - // 延迟加载,否则会出错 - setTimeout(() => { - this.airportResultCode = this.airportCode.map(item =>{ - return {label: item.airportdescchn,value: item.airportid} - }) - }, 6000) }, - computed:{ - flightno : { + // mounted() { + // // 延迟加载,否则会出错 + // setTimeout(() => { + // this.airportResultCode = this.airportCode.map(item =>{ + // return {label: item.airportdescchn,value: item.airportid} + // }) + // }, 6000) + // }, + computed: { + flightno: { get: function () { return this.flight.flightno }, - set: function(val){ + set: function (val) { this.flight.flightno = val.toUpperCase().trim() } }, - originstation :{ + originstation: { get: function () { return this.flight.originstation }, - set: function(val){ + set: function (val) { this.flight.originstation = val.toUpperCase().trim() } }, - destinationstation :{ + destinationstation: { get: function () { return this.flight.destinationstation }, - set: function(val){ + set: function (val) { this.flight.destinationstation = val.toUpperCase().trim() } }, - awba :{ + awba: { get: function () { return this.flight.awba }, - set: function(val){ + set: function (val) { this.flight.awba = val.trim() } } }, methods: { nstep() { - if (this.flight.flightno !== undefined && this.flight.flightno !==''&& - this.flight.flightdate !== undefined &&this.flight.flightdate !== '' && - this.flight.destinationstation !== undefined && this.flight.destinationstation !==''&& - this.flight.originstation !== undefined && this.flight.originstation !=='') { - if(this.flight.awba !== '' && this.flight.awba !== undefined){ + if (this.flight.flightno !== undefined && this.flight.flightno !== '' && + this.flight.flightdate !== undefined && this.flight.flightdate !== '' && + this.flight.destinationstation !== undefined && this.flight.destinationstation !== '' && + this.flight.originstation !== undefined && this.flight.originstation !== '') { + if (this.flight.awba !== '' && this.flight.awba !== undefined) { const manifest = this.flight.awba; const reg = /^[0-9]{11}$/ - if(!reg.test(manifest)){ + if (!reg.test(manifest)) { Message.error("主单号只支持数字并且最多11位") return } - const num = (manifest.substring(3,10)) % 7 - if(num !== eval(manifest.substring(10))){ + const num = (manifest.substring(3, 10)) % 7 + if (num !== eval(manifest.substring(10))) { Message.error("主单号不符合模7校验") return } @@ -185,43 +184,35 @@ this.flight.awba = undefined } - if(this.flight.messageType ==="MT5202"){ + if (this.flight.messageType === "MT5202") { this.$router.push({name: '出港理货', params: {flightData: this.flight}}); } - if(this.flight.messageType ==="MT4201"){ + if (this.flight.messageType === "MT4201") { this.$router.push({name: '出港装载', params: {flightData: this.flight}}); } - if(this.flight.messageType ==="MT3201"){ - this.$router.push({name:'出港运抵',params:{flightData: this.flight}}) + if (this.flight.messageType === "MT3201") { + this.$router.push({name: '出港运抵', params: {flightData: this.flight}}) } - if(this.flight.messageType ==="MT2201"){ - this.$router.push({name:'出港预配舱单',params:{flightData: this.flight}}) + if (this.flight.messageType === "MT2201") { + this.$router.push({name: '出港预配舱单', params: {flightData: this.flight}}) } } else { Message.warning("请将航班信息填写完整") } }, - - getAirport(){ - getAirportCode().then(res =>{ - this.airportCode = res.data.data - }) - }, - getCountryList() { - getCountry().then(res => { - this.countryList = res.data.dataList - }) - }, - remoteMethod(query) { + remoteMethodAirport(query) { + this.airportCode = [] if (query !== '') { this.listLoading = true - setTimeout(() => { - this.listLoading = false - this.airportCode = this.airportResultCode.filter(item => { - return item.value.trim().indexOf(query.toUpperCase()) > -1 - }) - }, 200) + getAirportCode({airportid: query}).then(res => { + if(res !== null){ + setTimeout(() => { + this.listLoading = false + this.airportCode = res.data.data + }, 200) + } + }) } else { this.airportCode = [] } diff --git a/src/views/nmms/ExitLoading.vue b/src/views/nmms/ExitLoading.vue index 99a0754..0759718 100644 --- a/src/views/nmms/ExitLoading.vue +++ b/src/views/nmms/ExitLoading.vue @@ -49,18 +49,14 @@ <div class="grid-content content" style="margin-top: 6px">出港装载明细</div> </el-col> </el-row> - <tree-table v-loading="listLoading" :data="loadingData" :eval-func="func" :expand-all="true" stripe - style="font-size: 12px" border @selection-change="handleSelectionChange"> + <el-table v-loading="listLoading" :data="loadingData"stripe style="font-size: 12px" + border @selection-change="handleSelectionChange"> + <el-table-column type="selection" width="60"></el-table-column> <el-table-column label="主单号" width="160" align="center"> <template slot-scope="scope"> <span>{{scope.row.awba}}</span> </template> </el-table-column> - <!--<el-table-column label="分单号" width="160" align="center">--> - <!--<template slot-scope="scope">--> - <!--<span>{{scope.row.awbh}}</span>--> - <!--</template>--> - <!--</el-table-column>--> <el-table-column label="运载件数" width="70" align="center"> <template slot-scope="scope"> <span>{{scope.row.lodingpiece}}</span> @@ -83,44 +79,50 @@ </el-table-column> <el-table-column label="状态" width="100" align="center"> <template slot-scope="scope"> - <span v-if="scope.row.status ==='01'">未发送</span> - <span v-if="scope.row.status ==='02'">已发舱单报</span> + <span v-if="scope.row.status ==='01'">接受申报</span> + <span v-if="scope.row.status ==='02'">待人工审核</span> + <span v-if="scope.row.status ==='03'">退单</span> <span v-if="scope.row.status ==='05'">舱单报退单</span> <span v-if="scope.row.status ==='06'">舱单转人工</span> <span v-if="scope.row.status ==='07'">舱单报申报成功</span> <span v-if="scope.row.status ==='08'">已发舱单删除报</span> <span v-if="scope.row.status ==='09'">舱单删除报退单</span> <span v-if="scope.row.status ==='10'">舱单删除报转人工</span> - <span v-if="scope.row.status ==='11'">舱单删除成功</span> - <span v-if="scope.row.status ==='12'">已发舱单修改报</span> - <span v-if="scope.row.status ==='13'">舱单修改报退单</span> + <span v-if="scope.row.status ==='11'">放行</span> + <span v-if="scope.row.status ==='12'">拒装</span> + <span v-if="scope.row.status ==='13'">禁卸</span> <span v-if="scope.row.status ==='14'">舱单修改报转人工</span> <span v-if="scope.row.status ==='15'">舱单修改报成功</span> <span v-if="scope.row.status ==='16'">海关已存在</span> + <span v-if="scope.row.status ==='21'">可自动发送</span> + <span v-if="scope.row.status ==='22'">未发送</span> + <span v-if="scope.row.status ==='23'">已发送新增报</span> + <span v-if="scope.row.status ==='24'">已发送删除报</span> + <span v-if="scope.row.status ==='25'">已发送修改报</span> </template> </el-table-column> - <el-table-column prop="receipt" label="回执信息" width="180" align="center"> + <el-table-column label="回执信息" width="180" align="center"> <template slot-scope="scope"> <span>{{scope.row.ext5}}</span> </template> </el-table-column> - <el-table-column prop="operation" label="操作" align="center"> + <el-table-column label="操作" align="center"> <template slot-scope="scope"> <el-button size="mini" @click="handleSend(scope.row)">收发明细</el-button> - <el-button size="mini" type="success" @click="handleEdit(scope.row)" :disabled="scope.row.status !=='01'">编辑 + <el-button size="mini" type="success" @click="handleEdit(scope.row)" :disabled="scope.row.status !=='22'">编辑 </el-button> <el-button size="mini" type="primary" @click="handleSendAwb(scope.row)" - :disabled="scope.row.status !=='00'">发送舱单报 + :disabled="scope.row.status !=='22'">发送舱单报 </el-button> <el-button size="mini" type="danger" v-if="isAdmin" @click="handleAwbDelete(scope.row)">删除运单 </el-button> <el-button size="mini" type="warning" @click="handleAwbStatus(scope.row)" - :disabled="scope.row.status ==='00'">更改状态 + :disabled="scope.row.status ==='22'">更改状态 </el-button> <el-button size="mini" type="danger" @click="handleSendDelete(scope.row)">发删除报</el-button> </template> </el-table-column> - </tree-table> + </el-table> <div class="btnFoot"> <el-row> <el-button type="primary" size="mini" @@ -164,7 +166,8 @@ <el-col :span="7.5"> <el-form-item label="起始站" prop="originstation"> - <el-select filterable clearable placeholder="请选择起始站" allow-create v-model="loadingModel.originstation"> + <el-select filterable clearable placeholder="请选择起始站" :remote-method="remoteMethodAirport" + allow-create v-model="originstation" remote> <el-option v-for="item in airportCode" :key="item.airportid" :label="item.airportid" :value="item.airportid" :disabled="dialogStatus === 'update'"> @@ -176,7 +179,8 @@ </el-col> <el-col :span="7.5"> <el-form-item label="目的站" prop="originstation"> - <el-select filterable clearable placeholder="请选择起始站" allow-create v-model="loadingModel.destinationstation"> + <el-select filterable clearable placeholder="请选择起始站" :remote-method="remoteMethodAirport" + allow-create v-model="destinationstation" remote> <el-option v-for="item in airportCode" :key="item.airportid" :label="item.airportid" :value="item.airportid" :disabled="dialogStatus === 'update'"> @@ -228,7 +232,8 @@ </el-col> <el-col :span="7.5"> <el-form-item label="海关关区" prop="customcode"> - <el-select v-model="loadingModel.customcode" placeholder="请选择关区代码" filterable clearable + <el-select v-model="loadingModel.customcode" placeholder="请选择关区代码" + filterable clearable remote :remote-method="remoteMethodCustomCode" :loading="customLoading" :disabled="dialogStatus === 'addAwbh'"> <el-option v-for="item in customCodeList" :key="item.customcode" :label="item.customcode" :value="item.customcode"> @@ -321,8 +326,6 @@ </div> </template> <script> - import treeTable from '@/components/TreeTable' - import treeToArray from '@/utils/customEval' import Pagination from '@/components/Pagination' import {getCustomCode,getAirportCode} from "@/api/country"; import { @@ -337,10 +340,10 @@ validAlphabetsAndSpanceKey, validatorNum } from "@/utils/validate" - + import {getResponseForParam} from '@/api/responseDetail' export default { name: "ExitLoading", - components: {treeTable, Pagination}, + components: { Pagination}, inject: ['reload'], data() { const validatorAwb = (rule, value, callback) => { @@ -374,7 +377,6 @@ callback() } return { - func: treeToArray, total: 1, isAdmin: false, dialogMap: { @@ -387,6 +389,7 @@ dialogTableVisible: false, dialogFormVisible: false, dialogDeleteVisible: false, + customLoading: false, listLoading: false, loadingQuery: { pageSize: 1, @@ -467,8 +470,6 @@ this.loadingQuery.destinationstation = this.$route.params.flightData.destinationstation this.getList() } - this.getAirportCode() - this.getCustomCode() let username = JSON.parse(sessionStorage.getItem('user')).username if (username === 'admin') { this.isAdmin = true @@ -560,7 +561,7 @@ this.getList() }, // 收发明细 - handleSend() { + handleSend(row) { const resQuery = { carrier: row.carrier, flightNo: row.flightno, @@ -782,15 +783,39 @@ } }) }, - getAirportCode(){ - getAirportCode().then(res=>{ - this.airportCode = res.data.data - }) + //获取机场三字码 + remoteMethodAirport(query){ + this.airportCode = [] + if (query !== '') { + this.listLoading = true + getAirportCode({airportid: query}).then(res => { + if(res !== null){ + setTimeout(() => { + this.listLoading = false + this.airportCode = res.data.data + }, 200) + } + }) + } else { + this.airportCode = [] + } }, - getCustomCode(){ - getCustomCode().then(res =>{ - this.customCodeList = res.data.data - }) + //关区代码 + remoteMethodCustomCode(query){ + this.customCodeList = [] + if (query !== '') { + this.customLoading = true + getCustomCode({customcode: query}).then(res => { + if(res !== null){ + setTimeout(() => { + this.customLoading = false + this.customCodeList = res.data.data + }, 200) + } + }) + } else { + this.airportCode = [] + } }, handleAddLoading() { const row = { diff --git a/src/views/nmms/ExitPre.vue b/src/views/nmms/ExitPre.vue index 20522cc..d16a304 100644 --- a/src/views/nmms/ExitPre.vue +++ b/src/views/nmms/ExitPre.vue @@ -94,21 +94,26 @@ <!--</el-table-column>--> <el-table-column label="状态" width="100" align="center"> <template slot-scope="scope"> - <span v-if="scope.row.status ==='01'">未发送</span> - <span v-if="scope.row.status ==='02'">已发舱单报</span> - <span v-if="scope.row.status ==='04'">已发送</span> + <span v-if="scope.row.status ==='01'">接受申报</span> + <span v-if="scope.row.status ==='02'">待人工审核</span> + <span v-if="scope.row.status ==='03'">退单</span> <span v-if="scope.row.status ==='05'">舱单报退单</span> <span v-if="scope.row.status ==='06'">舱单转人工</span> <span v-if="scope.row.status ==='07'">舱单报申报成功</span> <span v-if="scope.row.status ==='08'">已发舱单删除报</span> <span v-if="scope.row.status ==='09'">舱单删除报退单</span> <span v-if="scope.row.status ==='10'">舱单删除报转人工</span> - <span v-if="scope.row.status ==='11'">舱单删除成功</span> - <span v-if="scope.row.status ==='12'">已发舱单修改报</span> - <span v-if="scope.row.status ==='13'">舱单修改报退单</span> + <span v-if="scope.row.status ==='11'">放行</span> + <span v-if="scope.row.status ==='12'">拒装</span> + <span v-if="scope.row.status ==='13'">禁卸</span> <span v-if="scope.row.status ==='14'">舱单修改报转人工</span> <span v-if="scope.row.status ==='15'">舱单修改报成功</span> <span v-if="scope.row.status ==='16'">海关已存在</span> + <span v-if="scope.row.status ==='21'">可自动发送</span> + <span v-if="scope.row.status ==='22'">未发送</span> + <span v-if="scope.row.status ==='23'">已发送新增报</span> + <span v-if="scope.row.status ==='24'">已发送删除报</span> + <span v-if="scope.row.status ==='25'">已发送修改报</span> </template> </el-table-column> <el-table-column prop="receipt" label="回执信息" align="center"> @@ -119,19 +124,18 @@ </el-table-column> <el-table-column label="操作" width="450"> <template slot-scope="scope"> - <el-button size="mini" type="success" @click="handleEdit(scope.row)" :disabled="scope.row.status !=='01'">编辑</el-button> + <el-button size="mini" type="success" @click="handleEdit(scope.row)" :disabled="scope.row.status !=='22'">编辑</el-button> <el-button size="mini" type="success" v-if="scope.row.awbh ===null" @click="handleAddAwbh(scope.row)">新增分单 </el-button> <el-button size="mini" type="primary" @click="handleAwbSend(scope.row)" - :disabled="scope.row.status !== '01'">发舱单报 + :disabled="scope.row.status !== '22'">发舱单报 </el-button> <p></p> <el-button size="mini" type="primary" @click="handleAwbEdit(scope.row)">发修改报</el-button> - <el-button size="mini" type="danger" v-if="isAdmin" @click="handleAwbDelete(scope.row)">删除运单 - </el-button> + <el-button size="mini" type="danger" v-if="isAdmin" @click="handleAwbDelete(scope.row)">删除运单</el-button> <el-button size="mini" type="warning" @click="handleAwbStatus(scope.row)" - :disabled="scope.row.status === '01'">更改状态 + :disabled="scope.row.status === '22'">更改状态 </el-button> <el-button size="mini" type="danger" @click="handleSendDelete(scope.row)">发删除报</el-button> </template> @@ -194,7 +198,14 @@ <el-row> <el-col :span="7.5"> <el-form-item label="起始站" prop="originstation"> - <el-select filterable clearable placeholder="请选择起始站" allow-create v-model="preModel.originstation"> + <el-select + filterable + clearable + placeholder="请选择起始站" + :remote-method="remoteMethodAirport" + allow-create remote + v-model="originstation" + :loading="airportLoading"> <el-option v-for="item in airportCode" :key="item.airportid" :label="item.airportid" :value="item.airportid" :disabled="dialogStatus === 'addAwbh'"> @@ -202,12 +213,12 @@ <span style="float: right; color: #8492a6; font-size: 13px">{{ item.airportid }}</span> </el-option> </el-select> - <!--<el-input v-model="preModel.originstation" :disabled="dialogStatus === 'addAwbh'" clearable/>--> </el-form-item> </el-col> <el-col :span="7.5"> <el-form-item label="目的站" prop="destinationstation"> - <el-select filterable clearable placeholder="请选择目的站" allow-create v-model="preModel.destinationstation"> + <el-select filterable clearable placeholder="请选择目的站" allow-create remote + v-model="destinationstation" :remote-method="remoteMethodAirport"> <el-option v-for="item in airportCode" :key="item.airportid" :label="item.airportid" :value="item.airportid" :disabled="dialogStatus === 'addAwbh'" > @@ -323,7 +334,8 @@ <el-row> <el-col :span="7.5"> <el-form-item label="关区代码" prop="customcode"> - <el-select v-model="preModel.customcode" placeholder="请选择关区代码" filterable clearable + <el-select v-model="preModel.customcode" placeholder="请选择关区代码" + filterable clearable :remote-method="remoteMethodCustomCode" :loading="customLoading" remote :disabled="dialogStatus === 'addAwbh'"> <el-option v-for="item in customCodeList" :key="item.customcode" :label="item.customcode" :value="item.customcode"> @@ -728,6 +740,8 @@ dialogTableVisible: false, dialogDeleteVisble: false, listLoading: false, + customLoading:false, + airportLoading:false, disabledStatus: false, dialogFormVisible: false, countryOption: [], @@ -868,8 +882,6 @@ this.getList() } this.getCountryList() - this.getAirportCode() - this.getCustomCode() let username = JSON.parse(sessionStorage.getItem('user')).username if (username === 'admin') { this.isAdmin = true @@ -1466,7 +1478,7 @@ }) }, - //获取城市列表 + //获取国家列表 getCountryList() { getCountry().then(res => { this.countryList = res.data.dataList @@ -1486,17 +1498,40 @@ this.countryOption = [] } }, - - getAirportCode(){ - getAirportCode().then(res=>{ - this.airportCode = res.data.data - }) + remoteMethodAirport(query){ + this.airportCode = [] + if (query !== '') { + this.airportLoading = true + getAirportCode({airportid: query}).then(res => { + if(res !== null){ + setTimeout(() => { + this.airportLoading = false + this.airportCode = res.data.data + }, 200) + } + }) + } else { + this.airportCode = [] + } }, - getCustomCode(){ - getCustomCode().then(res =>{ - this.customCodeList = res.data.data - }) + + remoteMethodCustomCode(query){ + this.customCodeList = [] + if (query !== '') { + this.customLoading = true + getCustomCode({customcode: query}).then(res => { + if(res !== null){ + setTimeout(() => { + this.customLoading = false + this.customCodeList = res.data.data + }, 200) + } + }) + } else { + this.airportCode = [] + } }, + handleAddpre() { const row = { 'messageType': 'MT2201' diff --git a/src/views/nmms/ExitTidy.vue b/src/views/nmms/ExitTidy.vue index 0c9ee0d..052111f 100644 --- a/src/views/nmms/ExitTidy.vue +++ b/src/views/nmms/ExitTidy.vue @@ -32,7 +32,7 @@ <div class="grid-content"> <el-col :span="4"> <div class="grid-content"> - <el-input v-model="tidyQuery.awba" placeholder="请输入主单号"></el-input> + <el-input v-model="tidyQuery.awba" placeholder="请输入主单号" clearable></el-input> </div> </el-col> <div class="grid-content el-btn"> @@ -58,7 +58,7 @@ <span>{{scope.row.awba}}</span> </template> </el-table-column> - <el-table-column label="运单号" width="120" align="center"> + <el-table-column label="分单号" width="120" align="center"> <template slot-scope="scope"> <span>{{scope.row.awbh}}</span> </template> @@ -80,38 +80,42 @@ </el-table-column> <el-table-column label="状态" width="100" align="center"> <template slot-scope="scope"> - <span v-if="scope.row.status ==='01'">未发送</span> - <span v-if="scope.row.status ==='02'">已发舱单报</span> + <span v-if="scope.row.status ==='01'">接受申报</span> + <span v-if="scope.row.status ==='02'">待人工审核</span> + <span v-if="scope.row.status ==='03'">退单</span> <span v-if="scope.row.status ==='05'">舱单报退单</span> <span v-if="scope.row.status ==='06'">舱单转人工</span> <span v-if="scope.row.status ==='07'">舱单报申报成功</span> - <span v-if="scope.row.status ==='08'">已发舱单删除报</span> <span v-if="scope.row.status ==='09'">舱单删除报退单</span> <span v-if="scope.row.status ==='10'">舱单删除报转人工</span> - <span v-if="scope.row.status ==='11'">舱单删除成功</span> - <span v-if="scope.row.status ==='12'">已发舱单修改报</span> - <span v-if="scope.row.status ==='13'">舱单修改报退单</span> + <span v-if="scope.row.status ==='11'">放行</span> + <span v-if="scope.row.status ==='12'">拒装</span> + <span v-if="scope.row.status ==='13'">禁卸</span> <span v-if="scope.row.status ==='14'">舱单修改报转人工</span> <span v-if="scope.row.status ==='15'">舱单修改报成功</span> <span v-if="scope.row.status ==='16'">海关已存在</span> + <span v-if="scope.row.status ==='21'">可自动发送</span> + <span v-if="scope.row.status ==='22'">未发送</span> + <span v-if="scope.row.status ==='23'">已发送新增报</span> + <span v-if="scope.row.status ==='24'">已发送删除报</span> + <span v-if="scope.row.status ==='25'">已发送修改报</span> </template> </el-table-column> - <el-table-column prop="receipt" label="回执信息" width="300" align="center"> + <el-table-column label="回执信息" show-overflow-tooltip width="300" align="center"> <template slot-scope="scope"> <span>{{scope.row.ext5}}</span> </template> </el-table-column> - <el-table-column prop="operation" label="操作" show-overflow-tooltip align="center"> + <el-table-column prop="operation" label="操作" align="center"> <template slot-scope="scope"> - <el-button size="mini" @click="handleSend(scope.row)">收发明细</el-button> - <el-button size="mini" type="success" @click="handleEdit(scope.row)" :disabled="scope.row.status !=='01'">编辑</el-button> + <el-button size="mini" type="success" @click="handleEdit(scope.row)" :disabled="scope.row.status !=='22'">编辑</el-button> <el-button size="mini" type="primary" @click="handleAwbSend(scope.row)" - :disabled="scope.row.status !=='01'">发舱单报</el-button> + :disabled="scope.row.status !=='22'">发舱单报</el-button> <el-button size="mini" type="danger" v-if="isAdmin" @click="handleAwbDelete(scope.row)">删除运单</el-button> <p></p> <el-button size="mini" type="warning" @click="handleAwbStatus(scope.row)" - :disabled="scope.row.status ==='01'">更改状态</el-button> + :disabled="scope.row.status ==='22'">更改状态</el-button> <el-button size="mini" type="primary" v-if="scope.row.awbh ===null" @click="handleAddAwbh(scope.row)">新增分单</el-button> <el-button size="mini" type="danger" @click="handleSendDelete(scope.row)">发删除报</el-button> @@ -173,7 +177,8 @@ <el-col :span="7.5"> <el-form-item label="起始站" prop="originstation"> - <el-select filterable clearable placeholder="请选择起始站" allow-create v-model="tidyModel.originstation"> + <el-select filterable clearable placeholder="请选择起始站" :remote-method="remoteMethodAirport" + allow-create v-model="originstation" remote> <el-option v-for="item in airportCode" :key="item.airportid" :label="item.airportid" :value="item.airportid" :disabled="dialogStatus === 'update'"> @@ -185,7 +190,8 @@ </el-col> <el-col :span="7.5"> <el-form-item label="目的站" prop="destinationstation"> - <el-select filterable clearable placeholder="请选择起始站" allow-create v-model="tidyModel.destinationstation"> + <el-select filterable clearable placeholder="请选择起始站" :remote-method="remoteMethodAirport" + allow-create v-model="destinationstation" remote> <el-option v-for="item in airportCode" :key="item.airportid" :label="item.airportid" :value="item.airportid" :disabled="dialogStatus === 'update'"> @@ -249,7 +255,8 @@ </el-col> <el-col :span="7.5"> <el-form-item label="海关关区" prop="customcode"> - <el-select v-model="tidyModel.customcode" placeholder="请选择关区代码" filterable clearable + <el-select v-model="tidyModel.customcode" placeholder="请选择关区代码" + filterable clearable remote :remote-method="remoteMethodCustomCode" :loading="customLoading" :disabled="dialogStatus === 'addAwbh'"> <el-option v-for="item in customCodeList" :key="item.customcode" :label="item.customcode" :value="item.customcode"> @@ -418,6 +425,7 @@ dialogStatus: undefined, disabledStatus: false, listLoading: false, + customLoading:false, dialogFormVisible: false, tidyModel: { carrier: undefined, @@ -470,8 +478,6 @@ } this.getList() } - this.getAirportCode() - this.getCustomCode() let username = JSON.parse(sessionStorage.getItem('user')).username if(username === 'admin'){ this.isAdmin = true @@ -825,15 +831,39 @@ } }) }, - getAirportCode(){ - getAirportCode().then(res=>{ - this.airportCode = res.data.data - }) + //获取机场三字码 + remoteMethodAirport(query){ + this.airportCode = [] + if (query !== '') { + this.listLoading = true + getAirportCode({airportid: query}).then(res => { + if(res !== null){ + setTimeout(() => { + this.listLoading = false + this.airportCode = res.data.data + }, 200) + } + }) + } else { + this.airportCode = [] + } }, - getCustomCode(){ - getCustomCode().then(res =>{ - this.customCodeList = res.data.data - }) + //关区代码 + remoteMethodCustomCode(query){ + this.customCodeList = [] + if (query !== '') { + this.customLoading = true + getCustomCode({customcode: query}).then(res => { + if(res !== null){ + setTimeout(() => { + this.customLoading = false + this.customCodeList = res.data.data + }, 200) + } + }) + } else { + this.airportCode = [] + } }, // 新增理货弹框 handleAddTidy() {