作者 xudada

进港操作优化

... ... @@ -7,3 +7,7 @@ export const getCountry = params => { return http.get(`${baseUrl}/getCountryCode
export const getByCountryCodeForName = params => { return http.post(`${baseUrl}/getByCountryCodeForName`,params)};
export const getByCountryCode = params => { return http.post(`${baseUrl}/getByCountryCode`,params)};
export const getAirportCode = params =>{return http.get(`/nmms-server-import/nmms/mt1201/selectList`,params)}
export const getCustomCode = params =>{return http.get(`/nmms-server-import/nmms/mt1201/selectCustomcode`,params)}
... ...
... ... @@ -12,3 +12,7 @@ export const updateStatus = params => { return http.put(`${baseUrl}/updateStatus
export const updateMT3201 = params => { return http.put(`${baseUrl}/updateMt3201`,params)};
export const addMt3201 = params => { return http.post(`${baseUrl}/addMt3201`,params)};
export const sendCreateMt3201 = params => { return http.post(`${baseUrl}/sendCreateMt3201`,params)};
export const sendRemoveMt3201 = params => { return http.post(`${baseUrl}/sendRemoveMt3201`,params)};
... ...
... ... @@ -12,3 +12,8 @@ export const updateStatus = params => { return http.put(`${baseUrl}/updateStatus
export const updateMT4201 = params => { return http.put(`${baseUrl}/updateMt4201`,params)};
export const addMt4201 = params => { return http.post(`${baseUrl}/addMt4201`,params)};
export const sendCreateMt4201 = params => { return http.post(`${baseUrl}/sendCreateMt4201`,params)};
export const sendDeleteMt4201 = params => { return http.post(`${baseUrl}/sendDeleteMt4201`,params)};
... ...
... ... @@ -17,3 +17,9 @@ export const getLostLoadChange = params => { return http.get(`${baseUrl}/getLost
export const saveLostChange = params => { return http.get(`${baseUrl}/saveLostChange`, params)};
export const saveLostLoad = params => { return http.put(`${baseUrl}/saveLostLoad`,params)};
export const sendDeleteMt2201 = params =>{return http.post(`${baseUrl}/sendDeleteMt2201`,params)}
export const sendUpdateMt2201 = params =>{return http.post(`${baseUrl}/sendUpdateMt2201`,params)}
export const sendCreateMt2201 = params =>{return http.post(`${baseUrl}/sendCreateMt2201`,params)}
... ...
... ... @@ -12,3 +12,7 @@ export const updateStatus = params => { return http.put(`${baseUrl}/updateStatus
export const updateMt520X = params => { return http.put(`${baseUrl}/updateMt520x`,params)};
export const addMt520X = params => { return http.post(`${baseUrl}/addMt520x`,params)};
export const sendCreateMt5202 = params => { return http.post(`${baseUrl}/sendCreateMt5202`,params)};
export const sendRemoveMt5202 = params => { return http.post(`${baseUrl}/sendRemoveMt5202`,params)};
... ...
... ... @@ -51,15 +51,15 @@
</el-col>
</el-row>
</div>
<el-table v-loading="listLoading" :data="arriveData" stripe fit highlight-current-row
<tree-table v-loading="listLoading" :data="arriveData" stripe fit highlight-current-row
style="font-size: 12px" border @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center"></el-table-column>
<el-table-column label="航班号" width="70" align="center">
<el-table-column label="航班号" width="60" align="center">
<template slot-scope="scope">
<span>{{scope.row.carrier}}{{scope.row.flightno}}</span>
</template>
</el-table-column>
<el-table-column label="运单号" width="120" align="center">
<el-table-column label="运单号" width="110" align="center">
<template slot-scope="scope">
<span>{{scope.row.awba}}</span>
</template>
... ... @@ -79,7 +79,7 @@
<span>{{scope.row.weight}}</span>
</template>
</el-table-column>
<el-table-column label="货物描述" width="100" align="center">
<el-table-column label="货物描述" width="120" align="center">
<template slot-scope="scope">
<span>{{scope.row.goodsname}}</span>
</template>
... ... @@ -91,48 +91,58 @@
</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 prop="receipt" label="回执信息" 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 prop="operation" label="操作" align="center" width="400">
<template slot-scope="scope">
<el-button size="mini" @click="handleSend(scope.row)">收发明细</el-button>
<el-button size="mini" type="success" @click="handleEdit(scope.row)">编辑运单</el-button>
<el-button size="mini" type="primary" @click="handleAwbSend(scope.row)"
:disabled="scope.row.status !=='00'">发送舱单报
<el-button size="mini" @click="handleSendDesc(scope.row)">收发明细</el-button>
<el-button size="mini" type="success" @click="handleEdit(scope.row)">编辑</el-button>
<el-button size="mini" type="primary" @click="handleSendAwb(scope.row)"
:disabled="scope.row.status ==='23'">发送舱单报
</el-button>
<p></p>
<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 ==='00'">修改状态
:disabled="scope.row.status ==='22'">更改状态
</el-button>
<el-button size="mini" type="danger" @click="handleSendDelete(scope.row)"
:disabled="scope.row.status ==='24'">发删除报
</el-button>
</template>
</el-table-column>
</el-table>
</tree-table>
<div class="btnFoot">
<el-row>
<el-button type="primary" size="mini" v-if="arriveQuery.flightno !==undefined || arriveData.length>0"
@click="handelAddArriveInfo">新增出港运抵
</el-button>
<el-button type="primary" size="mini" v-if="arriveModel.flightno !== undefined || arriveData.length>0"
<el-button type="primary" size="mini" v-if="arriveQuery.flightno !== undefined || arriveData.length>0"
@click="handelBackStep">返回
</el-button>
</el-row>
... ... @@ -185,14 +195,28 @@
<el-row>
<el-col :span="7.5">
<el-form-item label="起始站" prop="originstation">
<el-input v-model="originstation"
:disabled="dialogFormVisible === 'update'"></el-input>
<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'">
<span style="float: left">{{ item.airportdescchn }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.airportid }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="7.5">
<el-form-item label="目的站" prop="destinationstation">
<el-input v-model="destinationstation"
:disabled="dialogFormVisible === 'update'"></el-input>
<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'">
<span style="float: left">{{ item.airportdescchn }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.airportid }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
... ... @@ -226,9 +250,15 @@
</el-col>
<el-col :span="7.5">
<el-form-item label="海关关区" prop="customcode">
<el-select v-model="arriveModel.customcode">
<el-option v-for="item in customcodeList " :key="item" :label="item"
:value="item"></el-option>
<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">
<span style="float: left">{{ item.customcode }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.customname }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
... ... @@ -237,12 +267,11 @@
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible = false">取消</el-button>
<el-button type="primary" @click="dialogStatus==='create'?createData():updateData()">保存</el-button>
<el-button type="success" @click="SaveAndSend">保存并发送</el-button>
</div>
</el-dialog>
<el-dialog title="收发明细" :visible.sync="dialogTableVisible">
<el-table :data="detailData" border>
<el-table-column label="操作时间" width="150">
<el-table-column label="操作时间" width="180">
<template slot-scope="scope">
{{scope.row.busdate}}
</template>
... ... @@ -279,16 +308,51 @@
</el-table-column>
</el-table>
</el-dialog>
<el-dialog title="删除原因" :visible.sync="dialogDeleteVisible" width="30%">
<el-form ref="arriveDeleteForm" :model="respModel" :rules="arriveDeleteRules"
label-width="120px" style="margin-right: 50px">
<el-form-item label="删除原因" prop="reason">
<el-input v-model="respModel.reason" placeholder="删除原因"></el-input>
</el-form-item>
<el-form-item label="删除操作人" prop="contactName">
<el-input v-model="respModel.contactName" placeholder="操作人姓名"></el-input>
</el-form-item>
<el-form-item label="操作人Tel" prop="contactTel">
<el-input v-model="respModel.contactTel" placeholder="删除操作人联系方式"></el-input>
</el-form-item>
<el-form-item label="备注">
<el-input v-model="respModel.content" type="textarea"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogDeleteVisible = false">取消</el-button>
<el-button type="primary" @click="sendArriveDelete()">发送</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import treeTable from '@/components/TreeTable'
import treeToArray from '@/utils/customEval'
import Pagination from '@/components/Pagination'
import {getMt3201ListForParam, deleteByIsDelete, updateStatus, updateMT3201, addMt3201} from '@/api/exitArrive'
import {getCustomCode, getAirportCode} from "@/api/country";
import {
getMt3201ListForParam,
deleteByIsDelete,
updateStatus,
updateMT3201,
addMt3201,
sendCreateMt3201,
sendRemoveMt3201
} from '@/api/exitArrive'
import {Message} from "element-ui";
import {validAwb, validAlphabets, validAlphabetsAndNum,validAlphabetsAndSpanceKey,validatorNum} from "@/utils/validate";
import {
validAwb,
validAlphabets,
validAlphabetsAndNum,
validAlphabetsAndSpanceKey,
validatorNum
} from "@/utils/validate";
import {getResponseForParam} from '@/api/responseDetail'
export default {
... ... @@ -314,8 +378,8 @@
}
callback()
}
const validAlphabetsSpanceKey = (rule,value,callback) =>{
if(!validAlphabetsAndSpanceKey(value)){
const validAlphabetsSpanceKey = (rule, value, callback) => {
if (!validAlphabetsAndSpanceKey(value)) {
callback("只能输入字母、数字、空格")
}
callback()
... ... @@ -339,7 +403,8 @@
flightdate: undefined,
originstation: undefined,
destinationstation: undefined,
customcode: undefined
customcode: undefined,
messageType: undefined,
},
dialogMap: {
update: '编辑出港运抵',
... ... @@ -347,11 +412,14 @@
},
dialogTableVisible: false,
multipleSelection: [],
customcodeList: [4604, 4620],
customCodeList: [],
airportCode: [],
dialogStatus: undefined,
awbhStatus: false,
dialogFormVisible: false,
dialogDeleteVisible: false,
listLoading: false,
customLoading: false,
arriveRoles: {
awba: [{required: true, trigger: 'blur', validator: validatorAwb}],
awbh: [{required: true, trigger: 'blur', validator: validatorAwbh}],
... ... @@ -379,7 +447,24 @@
customcode: undefined,
arrivetime: undefined,
messageType: 'MT3201'
}
},
respModel: {
uuid: undefined,
reason: undefined,
contactName: undefined,
contactTel: undefined,
content: '',
flightNo: undefined,
awba: undefined,
customCode: undefined,
flightDate: undefined,
awbh: ''
},
arriveDeleteRules: {
reason: [{required: true, message: '删除原因不能为空', trigger: 'blur'}],
contactName: [{required: true, message: '删除操作人不能为空', trigger: 'blur'}],
contactTel: [{required: true, message: '操作人联系方式不能为空', trigger: 'blur'}]
},
}
},
created() {
... ... @@ -388,7 +473,6 @@
if (this.$route.params.flightData.awba !== undefined && this.$route.params.flightData.awba !== '') {
this.arriveQuery.awba = this.$route.params.flightData.awba.substring(0, 3) + "-" + this.$route.params.flightData.awba.substring(3)
}
this.arriveQuery.carrier = this.$route.params.flightData.flightno.substring(0, 2)
this.arriveQuery.flightno = this.$route.params.flightData.flightno.substring(2)
this.arriveQuery.flightdate = this.$route.params.flightData.flightdate
... ... @@ -397,7 +481,7 @@
this.getList()
}
let username = JSON.parse(sessionStorage.getItem('user')).username
if(username === 'admin'){
if (username === 'admin') {
this.isAdmin = true
}
},
... ... @@ -575,12 +659,78 @@
})
},
//保存并发送
SaveAndSend() {
// 发送舱单报
handleSendAwb(row) {
this.$confirm("是否发送", "确认消息", {
distinguishCancelAndClose: true,
confirmButtonText: '发送',
cancelButtonText: '取消'
}).then(() => {
if (row.awbh === null) {
row.awbh = ''
}
delete row.parent
delete row.children
sendCreateMt3201(row).then(res => {
if (res.data.count > 0) {
Message.success(res.data.respMessage)
this.getList()
} else {
Message.success(res.data.respMessage)
}
})
}).catch(error => {
Message.error(error.message)
})
},
// 发送删除报
handleSendDelete(row) {
this.respModel = {
carrier: undefined,
reason: undefined,
contactName: undefined,
contactTel: undefined,
content: '',
flightNo: undefined,
awba: undefined,
customCode: undefined,
flightDate: undefined,
awbh: undefined
}
this.dialogDeleteVisible = true
this.respModel.flightNo = row.flightno
this.respModel.awba = row.awba
this.respModel.carrier = row.carrier
if (row.awbh === null) {
this.respModel.awbh = ''
} else {
this.respModel.awbh = row.awbh
}
this.respModel.customCode = row.customcode
this.respModel.flightDate = row.flightdate
this.$nextTick(() => {
this.$refs.arriveDeleteForm.clearValidate()
})
},
sendArriveDelete() {
this.$refs.arriveDeleteForm.validate(valid => {
if (valid) {
sendRemoveMt3201(this.respModel).then(res => {
if (res.data.count > 0) {
Message.success(res.data.respMessage)
this.dialogDeleteVisible = false
this.getList()
} else {
Message.error(res.data.respMessage)
}
})
}
})
},
// 收发明细
handleSend(row) {
handleSendDesc(row) {
const resQuery = {
carrier: row.carrier,
flightNo: row.flightno,
... ... @@ -594,15 +744,7 @@
this.detailData = res.data
})
},
// 发送舱单报
handleAwbSend() {
},
// 发送修改报
handleAwbEdit() {
},
//发送删除报
//删除运单
handleAwbDelete(row) {
this.$confirm("是否删除", "确认消息", {
distinguishCancelAndClose: true,
... ... @@ -634,25 +776,29 @@
},
//更改状态
handleAwbStatus(row) {
this.$confirm("是否发送更改状态", "确认消息", {
distinguishCancelAndClose: true,
confirmButtonText: '确认更改',
cancelButtonText: '取消更改'
}).then(() => {
updateStatus(row).then(res => {
if (res.data.count > 0) {
this.$message({
type: 'success',
message: '当前运单状态已更改'
})
this.getList()
} else {
this.$message({
type: 'error',
message: '状态更改失败,请稍后重试'
})
}
})
if (row.status!==22){
row.status =22;
}
// updateStatus(row).then(res => {
// if (res.data.count > 0) {
// this.$message({
// type: 'success',
// message: '当前运单状态已更改'
// })
// this.getList()
// } else {
// this.$message({
// type: 'error',
// message: '状态更改失败,请稍后重试'
// })
// }
// })
}).catch(action => {
this.$message({
... ... @@ -663,6 +809,41 @@
})
})
},
//获取机场三字码
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 = []
}
},
//关区代码
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 = {
... ... @@ -671,7 +852,8 @@
this.$router.push({name: "出港航班信息", params: {scopeRow: row}})
},
handelBackStep() {
this.$router.push({name: '出港航班信息', params: {scopeRow: this.arriveModel}})
this.arriveQuery.messageType = 'MT3201'
this.$router.push({name: '出港航班信息', params: {scopeRow: this.arriveQuery}})
}
}
... ...
... ... @@ -26,14 +26,42 @@
</el-date-picker>
</el-col>
<el-col :span="4">
<el-input placeholder="必填" v-model="originstation">
<template slot="prepend">始发站</template>
</el-input>
<el-select
:remote-method="remoteMethodAirport"
:loading="listLoading"
v-model="flight.originstation"
allow-create
filterable
remote
placeholder="请选择起始站" clearable>
<el-option
v-for="item in airportCode"
: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-input placeholder="必填" v-model="destinationstation">
<template slot="prepend">目的站</template>
</el-input>
<el-select
:remote-method="remoteMethodAirport"
:loading="listLoading"
v-model="flight.destinationstation"
allow-create
filterable
remote
placeholder="请选择目的站" clearable>
<el-option
v-for="item in airportCode"
: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>
<el-col :span="4" style="margin-left: 20px">
<el-input placeholder="可为空" v-model="awba">
... ... @@ -55,6 +83,7 @@
<script>
import {Message} from "element-ui";
import {getCountry, getAirportCode} from "@/api/country";
export default {
name: 'ExitFlightDesc',
... ... @@ -66,14 +95,18 @@
originstation: undefined,
destinationstation: undefined,
awba: undefined,
messageType:undefined
messageType: undefined
},
btnStatus: true
btnStatus: true,
listLoading: false,
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
... ... @@ -82,61 +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('-', '')
}
}
},
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
}
... ... @@ -144,23 +184,39 @@
this.flight.awba = undefined
}
if(this.flight.messageType ==="MT5201"){
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("请将航班信息填写完整")
}
}
},
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 = []
}
},
}
};
</script>
... ...
... ... @@ -37,7 +37,7 @@
</el-col>
<div class="el-btn">
<el-button type="primary" size="mini" @click="handleSearch">查询</el-button>
<el-button v-if="loadingModel.flightno === undefined && loadingData.length <1"
<el-button v-if="loadingQuery.flightno === undefined && loadingData.length <1"
type="primary" size="mini" @click="handleAddLoading">新增装载
</el-button>
</div>
... ... @@ -49,9 +49,10 @@
<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-column label="运单号" width="160" align="center">
<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>
... ... @@ -78,50 +79,61 @@
</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)">编辑主单
<el-button size="mini" type="success" @click="handleEdit(scope.row)" >编辑
</el-button>
<el-button size="mini" type="primary" @click="handleSendAwb(scope.row)"
:disabled="scope.row.status !=='00'">发送舱单报
:disabled="scope.row.status ==='23'">发送舱单报
</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 ==='00'">更改状态
:disabled="scope.row.status ==='22'">更改状态
</el-button>
<el-button size="mini" type="danger" @click="handleSendDelete(scope.row)"
:disabled="scope.row.status ==='24'">发删除报</el-button>
</template>
</el-table-column>
</tree-table>
</el-table>
<div class="btnFoot">
<el-row>
<el-button type="primary" size="mini"
v-if="loadingModel.flightno !== undefined || loadingData.length >0"
v-if="loadingQuery.flightno !== undefined || loadingData.length >0"
@click="handelAddLoadingInfo">新增出港装载
</el-button>
<el-button type="primary" size="mini" v-if="loadingModel.flightno !== undefined || loadingData.length>0"
@click="handelBackStep">返回</el-button>
<el-button type="primary" size="mini"
v-if="loadingQuery.flightno !== undefined || loadingData.length>0"
@click="handelBackStep">返回
</el-button>
</el-row>
</div>
<pagination v-show="total>0" :total="total" :page.sync="loadingQuery.page" :limit.sync="loadingQuery.limit"
... ... @@ -136,7 +148,7 @@
<el-row>
<el-col :span="7.5">
<el-form-item label="主单号" prop="awba">
<el-input v-model="loadingModel.awba"></el-input>
<el-input v-model="loadingModel.awba" :disabled="dialogStatus ==='update'"></el-input>
</el-form-item>
</el-col>
<el-col :span="7.5">
... ... @@ -155,13 +167,28 @@
<el-col :span="7.5">
<el-form-item label="起始站" prop="originstation">
<el-input v-model="originstation"
:disabled="dialogStatus ==='update'"></el-input>
<el-select filterable clearable placeholder="请选择起始站" :remote-method="remoteMethodAirport"
allow-create v-model="originstation" remote :disabled="dialogStatus ==='update'">
<el-option v-for="item in airportCode"
:key="item.airportid" :label="item.airportid"
:value="item.airportid" :disabled="dialogStatus === 'update'">
<span style="float: left">{{ item.airportdescchn }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.airportid }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="7.5">
<el-form-item label="目的站" prop="flightno">
<el-input v-model="destinationstation" :disabled="dialogStatus ==='update'"></el-input>
<el-form-item label="目的站" prop="originstation">
<el-select filterable clearable placeholder="请选择起始站" :remote-method="remoteMethodAirport"
allow-create v-model="destinationstation" remote :disabled="dialogStatus ==='update'">
<el-option v-for="item in airportCode"
:key="item.airportid" :label="item.airportid"
:value="item.airportid" :disabled="dialogStatus === 'update'">
<span style="float: left">{{ item.airportdescchn }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.airportid }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="7.5">
... ... @@ -206,9 +233,14 @@
</el-col>
<el-col :span="7.5">
<el-form-item label="海关关区" prop="customcode">
<el-select v-model="loadingModel.customcode">
<el-option v-for="item in customcodeList " :key="item" :label="item"
:value="item"></el-option>
<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">
<span style="float: left">{{ item.customcode }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.customname }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
... ... @@ -229,12 +261,11 @@
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible = false">取消</el-button>
<el-button type="primary" @click="dialogStatus==='create'?createData():updateData()">保存</el-button>
<el-button type="success" @click="handleSaveAndSend">保存并发送</el-button>
</div>
</el-dialog>
<el-dialog title="收发明细" :visible.sync="dialogTableVisible">
<el-table :data="detailData" border>
<el-table-column label="操作时间" width="150">
<el-table-column label="操作时间" width="180">
<template slot-scope="scope">
{{scope.row.busdate}}
</template>
... ... @@ -271,19 +302,49 @@
</el-table-column>
</el-table>
</el-dialog>
<el-dialog title="删除原因" :visible.sync="dialogDeleteVisible" width="30%">
<el-form ref="loadingDeleteForm" :model="respModel" :rules="loadingDeleteRules"
label-width="120px" style="margin-right: 50px">
<el-form-item label="删除原因" prop="reason">
<el-input v-model="respModel.reason" placeholder="删除原因"></el-input>
</el-form-item>
<el-form-item label="删除操作人" prop="contactName">
<el-input v-model="respModel.contactName" placeholder="操作人姓名"></el-input>
</el-form-item>
<el-form-item label="操作人Tel" prop="contactTel">
<el-input v-model="respModel.contactTel" placeholder="删除操作人联系方式"></el-input>
</el-form-item>
<el-form-item label="备注">
<el-input v-model="respModel.content" type="textarea"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogDeleteVisible = false">取消</el-button>
<el-button type="primary" @click="sendLoadingDelete()">发送</el-button>
</div>
</el-dialog>
</div>
</div>
</template>
<script>
import treeTable from '@/components/TreeTable'
import treeToArray from '@/utils/customEval'
import Pagination from '@/components/Pagination'
import {getMt4201ListForParam, deleteByIsDelete, updateStatus, updateMT4201, addMt4201} from '@/api/exitLoading'
import {getCustomCode,getAirportCode} from "@/api/country";
import {
getMt4201ListForParam, deleteByIsDelete, updateStatus,
updateMT4201, addMt4201, sendCreateMt4201, sendDeleteMt4201
} from '@/api/exitLoading'
import {Message} from "element-ui";
import {validAwb, validAlphabets, validAlphabetsAndNum, validAlphabetsAndSpanceKey,validatorNum} from "@/utils/validate"
import {
validAwb,
validAlphabets,
validAlphabetsAndNum,
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) => {
... ... @@ -304,8 +365,8 @@
}
callback()
}
const validAlphabetsSpanceKey = (rule,value,callback) =>{
if(!validAlphabetsAndSpanceKey(value)){
const validAlphabetsSpanceKey = (rule, value, callback) => {
if (!validAlphabetsAndSpanceKey(value)) {
callback("只能输入字母、数字、空格")
}
callback()
... ... @@ -317,17 +378,19 @@
callback()
}
return {
func: treeToArray,
total: 1,
isAdmin:false,
isAdmin: false,
dialogMap: {
update: '编辑出港装载',
create: '添加出港装载',
},
customcodeList: [4604, 4620],
customCodeList: [],
airportCode:[],
dialogStatus: undefined,
dialogTableVisible: false,
dialogFormVisible: false,
dialogDeleteVisible: false,
customLoading: false,
listLoading: false,
loadingQuery: {
pageSize: 1,
... ... @@ -338,7 +401,8 @@
flightdate: undefined,
originstation: undefined,
destinationstation: undefined,
customcode: undefined
customcode: undefined,
messageType: undefined
},
loadingRoles: {
awba: [{required: true, trigger: 'blur', validator: validatorAwb}],
... ... @@ -350,12 +414,12 @@
destinationstation: [{required: true, trigger: 'blur', validator: validatorAlphabets}],
piece: [{type: 'number', required: true, trigger: 'change', message: '只能输入数字'}],
weight: [{type: 'number', required: true, trigger: 'change', message: '只能输入数字'}],
customcode:[{required: true, trigger: 'change',message:'不能为空'}]
customcode: [{required: true, trigger: 'change', message: '不能为空'}]
},
loadingData: [],
detailData: [],
loadingModel: {
carrier:undefined,
carrier: undefined,
flightno: undefined,
flightdate: undefined,
originstation: undefined,
... ... @@ -369,8 +433,29 @@
loadingtime: undefined,
messageType: 'MT4201',
awbprice: undefined,
awbweight: undefined
}
awbweight: undefined,
reason: undefined,
contactName: undefined,
contactTel: undefined,
content: undefined,
},
respModel: {
uuid: undefined,
reason: undefined,
contactName: undefined,
contactTel: undefined,
content: '',
flightNo: undefined,
awba: undefined,
customCode: undefined,
flightDate: undefined,
awbh: ''
},
loadingDeleteRules: {
reason: [{required: true, message: '删除原因不能为空', trigger: 'blur'}],
contactName: [{required: true, message: '删除操作人不能为空', trigger: 'blur'}],
contactTel: [{required: true, message: '操作人联系方式不能为空', trigger: 'blur'}]
},
}
},
created() {
... ... @@ -387,7 +472,7 @@
this.getList()
}
let username = JSON.parse(sessionStorage.getItem('user')).username
if(username === 'admin'){
if (username === 'admin') {
this.isAdmin = true
}
},
... ... @@ -477,7 +562,7 @@
this.getList()
},
// 收发明细
handleSend() {
handleSend(row) {
const resQuery = {
carrier: row.carrier,
flightNo: row.flightno,
... ... @@ -494,7 +579,6 @@
// 编辑 弹框
handleEdit(row) {
this.loadingModel = Object.assign({}, row)
console.log(this.loadingModel)
this.dialogStatus = 'update'
this.dialogFormVisible = true
this.$nextTick(() => {
... ... @@ -519,10 +603,75 @@
},
// 发送舱单报
handleSendAwb() {
handleSendAwb(row) {
this.$confirm("是否发送", "确认消息", {
distinguishCancelAndClose: true,
confirmButtonText: '发送',
cancelButtonText: '取消'
}).then(() => {
if(row.awbh === null || row.awbh === undefined){
row.awbh = ''
}
sendCreateMt4201(row).then(res => {
if (res.data.count > 0) {
Message.success(res.data.respMessage)
this.getList()
}else {
Message.success(res.data.respMessage)
}
})
}).catch(error =>{
Message.error(error.message)
})
},
// 发送删除报
handleSendDelete(row) {
this.respModel = {
carrier: undefined,
reason: undefined,
contactName: undefined,
contactTel: undefined,
content: '',
flightNo: undefined,
awba: undefined,
customCode: undefined,
flightDate: undefined,
awbh: ''
}
this.dialogDeleteVisible = true
this.respModel.carrier = row.carrier
this.respModel.flightNo = row.flightno
this.respModel.awba = row.awba
this.respModel.customCode = row.customcode
this.respModel.flightDate = row.flightdate
if(row.awbh ===null){
this.respModel.awbh = ''
}else {
this.respModel.awbh = row.awbh
}
this.$nextTick(() => {
this.$refs.loadingDeleteForm.clearValidate()
})
},
sendLoadingDelete() {
this.$refs.loadingDeleteForm.validate(valid => {
if (valid) {
sendDeleteMt4201(this.respModel).then(res => {
if (res.data.count > 0) {
Message.success(res.data.respMessage)
this.dialogDeleteVisible = false
this.getList()
} else {
Message.success(res.data.respMessage)
}
})
}
})
},
// 删除 发送删除报
// 删除
handleAwbDelete(row) {
this.$confirm("是否删除", "确认消息", {
distinguishCancelAndClose: true,
... ... @@ -559,20 +708,23 @@
confirmButtonText: '确认更改',
cancelButtonText: '取消更改'
}).then(() => {
updateStatus(row).then(res => {
if (res.data.count > 0) {
this.$message({
type: 'success',
message: '当前运单状态已更改'
})
this.getList()
} else {
this.$message({
type: 'error',
message: '状态更改失败,请稍后重试'
})
}
})
if (row.status!==22){
row.status =22;
}
// updateStatus(row).then(res => {
// if (res.data.count > 0) {
// this.$message({
// type: 'success',
// message: '当前运单状态已更改'
// })
// this.getList()
// } else {
// this.$message({
// type: 'error',
// message: '状态更改失败,请稍后重试'
// })
// }
// })
}).catch(action => {
this.$message({
... ... @@ -583,14 +735,10 @@
})
})
},
// 保存并发送
handleSaveAndSend() {
},
// 重置实体
restModel() {
this.loadingModel = {
carrier:undefined,
carrier: undefined,
flightno: undefined,
flightdate: undefined,
originstation: undefined,
... ... @@ -639,6 +787,40 @@
}
})
},
//获取机场三字码
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 = []
}
},
//关区代码
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 = {
'messageType': 'MT4201'
... ... @@ -646,7 +828,8 @@
this.$router.push({name: '出港航班信息', params: {scopeRow: row}})
},
handelBackStep() {
this.$router.push({name: '出港航班信息', params: {scopeRow: this.loadingModel}})
this.loadingQuery.messageType = 'MT4201'
this.$router.push({name: '出港航班信息', params: {scopeRow: this.loadingQuery}})
}
}
}
... ...
... ... @@ -212,6 +212,7 @@
},
handleUpdate(row){
console.log(row.messageType )
if(row.messageType === 'MT2201'){
this.$router.push({name: '出港航班信息', params: {scopeRow: row}})
}
... ... @@ -221,7 +222,7 @@
if(row.messageType === 'MT4201'){
this.$router.push({name: '出港航班信息', params: {scopeRow: row}})
}
if(row.messageType === 'MT5201'){
if(row.messageType === 'MT5202'){
this.$router.push({name: '出港航班信息', params: {scopeRow: row}})
}
},
... ...
... ... @@ -13,9 +13,9 @@
</el-col>
<el-col :span="20">
<div class="grid-content">
<span class="titleSpan">航班号:{{this.listQuery.carrier}}{{this.listQuery.flightNo}}</span>
<span class="titleSpan">航班日期:{{this.listQuery.flightDate}}</span>
<span class="titleSpan">航段:{{this.listQuery.originStation}}-{{this.listQuery.destinationStation}}</span>
<span class="titleSpan">航班号:{{this.preQuery.carrier}}{{this.preQuery.flightno}}</span>
<span class="titleSpan">航班日期:{{this.preQuery.flightdate}}</span>
<span class="titleSpan">航段:{{this.preQuery.originstation}}-{{this.preQuery.destinationstation}}</span>
</div>
</el-col>
</div>
... ... @@ -32,12 +32,12 @@
<div class="grid-content">
<el-col :span="4">
<div class="grid-content">
<el-input v-model="listQuery.awba" placeholder="请输入主单号" clearable></el-input>
<el-input v-model="preQuery.awba" placeholder="请输入主单号" clearable></el-input>
</div>
</el-col>
<div class="grid-content el-btn">
<el-button type="primary" size="mini" @click="handleSerach">查询</el-button>
<el-button v-if="preModel.flightno === undefined && preData.length<1" type="primary"
<el-button v-if="preQuery.flightno === undefined && preData.length<1" type="primary"
size="mini"
@click="handleAddpre">新增预配舱单
</el-button>
... ... @@ -87,27 +87,33 @@
{{scope.row.actime}}
</template>
</el-table-column>
<el-table-column label="代理人代码" width="120" align="center">
<template slot-scope="scope">
{{scope.row.status}}
</template>
</el-table-column>
<!--<el-table-column label="代理人代码" width="120" align="center">-->
<!--<template slot-scope="scope">-->
<!--{{scope.row.status}}-->
<!--</template>-->
<!--</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="回执信息" align="center">
... ... @@ -116,36 +122,38 @@
<el-button size="mini" @click="handleSend(scope.row)">收发明细</el-button>
</template>
</el-table-column>
<el-table-column label="操作" width="300">
<el-table-column label="操作" width="450">
<template slot-scope="scope">
<el-button size="mini" type="success" @click="handleEdit(scope.row)">编辑运单</el-button>
<el-button size="mini" type="success" @click="handleEdit(scope.row)" >编辑</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 === '23'">发舱单报
</el-button>
<p></p>
<el-button size="mini" type="primary" @click="handleAwbEdit(scope.row)">发修改报</el-button>
<el-button size="mini" type="primary" @click="handleAwbEdit(scope.row)"
:disabled="scope.row.status ==='25'">发修改报</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)"
:disabled="scope.row.status ==='24'">发删除报</el-button>
</template>
</el-table-column>
</tree-table>
<div class="btnFoot">
<el-row>
<el-button type="primary" size="mini" v-if="preData.flightno !== undefined || preData.length> 0"
<el-button type="primary" size="mini" v-if="preQuery.flightno !== undefined | preData.length > 0"
@click="handleAddpreInfo">新增预配舱单
</el-button>
<el-button type="primary" size="mini" @click="handelBackStep"
v-if="preModel.flightno !== undefined || preData.length >0">返回
v-if="preQuery.flightno !== undefined || preData.length >0">返回
</el-button>
</el-row>
</div>
<pagination v-show="total>0" :total="total" :page.sync="listQuery.pageSize" :limit.sync="listQuery.limitSize"
<pagination v-show="total>0" :total="total" :page.sync="preQuery.pageSize" :limit.sync="preQuery.limitSize"
@pagination="getList"/>
<el-dialog :title="dialogMap[dialogStatus]" :visible.sync="dialogFormVisible" width="60%">
<el-form ref="preFormData" :model="preModel" :rules="preRoles" label-position="right"
... ... @@ -192,12 +200,34 @@
<el-row>
<el-col :span="7.5">
<el-form-item label="起始站" prop="originstation">
<el-input v-model="originstation" :disabled="dialogStatus === 'addAwbh'" clearable/>
<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'">
<span style="float: left">{{ item.airportdescchn }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.airportid }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="7.5">
<el-form-item label="目的站" prop="destinationstation">
<el-input v-model="destinationstation" :disabled="dialogStatus === 'addAwbh'" clearable/>
<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'" >
<span style="float: left">{{ item.airportdescchn }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.airportid }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
... ... @@ -306,16 +336,20 @@
<el-row>
<el-col :span="7.5">
<el-form-item label="关区代码" prop="customcode">
<el-select v-model="preModel.customcode" class="filter-item" placeholder="请选择关区代码"
<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.value" :label="item.label"
:value="item.value"></el-option>
<el-option v-for="item in customCodeList" :key="item.customcode" :label="item.customcode"
:value="item.customcode">
<span style="float: left">{{ item.customcode }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.customname }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="7.5">
<el-form-item label="海关状态">
<el-select v-model="preModel.awbtype" class="filter-item" placeholder="请录入货物类型">
<el-select v-model="preModel.awbinfo.awbtype" class="filter-item" placeholder="请录入货物类型">
<el-option v-for="item in customTypes" :key="item.value" :label="item.label"
:value="item.value"/>
</el-select>
... ... @@ -520,16 +554,40 @@
<!--</el-form-item>-->
<!--</el-col>-->
</el-row>
<div v-if="dialogStatus === 'sendUpdate'">
<div class="grid-content content">
运单信息
</div>
<el-row>
<el-col :span="7.5">
<el-form-item label="修改原因" prop="reason">
<el-input v-model="preModel.reason" clearable/>
</el-form-item>
</el-col>
<el-col :span="7.5">
<el-form-item label="修改人" prop="contactName">
<el-input v-model="preModel.contactName" clearable/>
</el-form-item>
</el-col>
<el-col :span="7.5">
<el-form-item label="修改人Tel" prop="contactTel">
<el-input v-model="preModel.contactTel" clearable maxlength="5"/>
</el-form-item>
</el-col>
</el-row>
</div>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible = false">取消</el-button>
<el-button type="primary" @click="dialogStatus !=='create'? createData():updateData()">保存</el-button>
<el-button type="success" @click="handleSaveAndSend">保存并发送</el-button>
<el-button type="primary" v-show="dialogStatus!=='sendUpdate'"
@click="dialogStatus ==='create'? createData():updateData()">保存</el-button>
<el-button type="primary" v-show="dialogStatus==='sendUpdate'" @click="sendUpdate()">发送</el-button>
</div>
</el-dialog>
<el-dialog title="收发明细" :visible.sync="dialogTableVisible">
<el-table :data="detailData" border>
<el-table-column label="操作时间" width="150">
<el-table-column label="操作时间" width="180">
<template slot-scope="scope">
{{scope.row.busdate}}
</template>
... ... @@ -566,6 +624,27 @@
</el-table-column>
</el-table>
</el-dialog>
<el-dialog title="删除原因" :visible.sync="dialogDeleteVisble" width="30%">
<el-form ref="sendDeleteForm" :model="respModel" :rules="sendDeleteRules" label-width="120px"
style="margin-right:50px;">
<el-form-item label="删除原因" prop="reason">
<el-input v-model="respModel.reason" placeholder="删除原因"></el-input>
</el-form-item>
<el-form-item label="删除操作人" prop="contactName">
<el-input v-model="respModel.contactName" placeholder="操作人姓名"></el-input>
</el-form-item>
<el-form-item label="操作人Tel" prop="contactTel">
<el-input v-model="respModel.contactTel" placeholder="删除操作人联系方式"></el-input>
</el-form-item>
<el-form-item label="备注">
<el-input v-model="respModel.content" type="textarea"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogDeleteVisble = false">取消</el-button>
<el-button type="primary" @click="sendDelete()">发送</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
... ... @@ -573,8 +652,17 @@
import treeToArray from '@/utils/customEval'
import Pagination from '@/components/Pagination'
import {getCountry, getByCountryCode, getByCountryCodeForName} from "@/api/country";
import {getMt2201ListForParam, deleteByIsDelete, updateStatus, updateMT2201, addMt2201} from '@/api/exitPre'
import {getCountry, getByCountryCode, getByCountryCodeForName,getCustomCode,getAirportCode} from "@/api/country";
import {
getMt2201ListForParam,
deleteByIsDelete,
updateStatus,
updateMT2201,
addMt2201,
sendCreateMt2201,
sendDeleteMt2201,
sendUpdateMt2201
} from '@/api/exitPre'
import {Message} from "element-ui";
import {getResponseForParam} from '@/api/responseDetail'
import {
... ... @@ -623,16 +711,17 @@
return {
func: treeToArray,
total: 1,
isAdmin:false,
listQuery: {
isAdmin: false,
preQuery: {
pageSize: 1,
limitSize: 100,
awba: undefined,
carrier: undefined,
flightNo: undefined,
flightDate: undefined,
originStation: undefined,
destinationStation: undefined
flightno: undefined,
flightdate: undefined,
originstation: undefined,
destinationstation: undefined,
messageType: undefined
},
dialogMap: {
update: '编辑预配舱单',
... ... @@ -647,10 +736,14 @@
{label: '快件', value: '005'}],
payTypes: [{label: '预付', value: '0'}, {label: '到付', value: '1'}],
splitcodes: [{label: '是', value: 'T'}, {label: '否', value: 'P'}],
customcodeList: [{label: '4604', value: '4604'}, {label: '4620', value: '4620'}],
customCodeList: [],
airportCode:[],
dialogStatus: undefined,
dialogTableVisible: false,
dialogDeleteVisble: false,
listLoading: false,
customLoading:false,
airportLoading:false,
disabledStatus: false,
dialogFormVisible: false,
countryOption: [],
... ... @@ -673,6 +766,9 @@
'awbinfo.collected': [{required: true, message: '付款方式必选', trigger: 'change'}],
goodsname: [{required: true, trigger: 'change', validator: validAlphabetsSpanceKey}],
ex5: [{required: true, message: '货物描述不能为空', trigger: 'blur'}],
reason:[{required: true, message: '修改原因不能为空', trigger: 'blur'}],
contactName:[{required: true, message: '修改操作人不能为空', trigger: 'blur'}],
contactTel:[{required: true, message: '修改操作人联系方式不能为空', trigger: 'blur'}],
'awbinfo.sairportid': [{required: true, message: '起始航站不能为空', trigger: 'change'}],
'awbinfo.shprname': [{required: true, message: '发货人不能为空', trigger: 'change'}],
'awbinfo.shprtel': [{required: true, message: '发货电话不能为空', trigger: 'change'}],
... ... @@ -703,6 +799,9 @@
uldNo: undefined,
status: undefined,
ex5: undefined,
reason: undefined,
contactName: undefined,
contactTel: undefined,
awbinfo: {
pcs: undefined,
weight: undefined,
... ... @@ -743,6 +842,23 @@
awbtype: undefined
}
},
respModel: {
uuid: undefined,
reason: undefined,
contactName: undefined,
contactTel: undefined,
content: '',
flightNo: undefined,
awba: undefined,
customCode: undefined,
flightDate: undefined,
awbh: ''
},
sendDeleteRules:{
reason:[{required:true,message:'删除原因不能为空',trigger:'blur'}],
contactName:[{required:true,message:'删除操作人不能为空',trigger:'blur'}],
contactTel:[{required:true,message:'操作人联系方式不能为空',trigger:'blur'}]
},
preData: [],
detailData: []
}
... ... @@ -757,17 +873,19 @@
},
created() {
if (this.$route.params.flightData !== undefined) {
this.listQuery.carrier = this.$route.params.flightData.flightno.substring(0, 2)
this.listQuery.flightNo = this.$route.params.flightData.flightno.substring(2)
this.listQuery.flightDate = this.$route.params.flightData.flightdate
this.listQuery.originStation = this.$route.params.flightData.originstation
this.listQuery.destinationStation = this.$route.params.flightData.destinationstation
this.listQuery.awba = this.$route.params.flightData.awba
this.preQuery.carrier = this.$route.params.flightData.flightno.substring(0, 2)
this.preQuery.flightno = this.$route.params.flightData.flightno.substring(2)
this.preQuery.flightdate = this.$route.params.flightData.flightdate
this.preQuery.originstation = this.$route.params.flightData.originstation
this.preQuery.destinationstation = this.$route.params.flightData.destinationstation
if (this.$route.params.flightData.awba !== undefined && this.$route.params.flightData.awba !== '') {
this.preQuery.awba = this.$route.params.flightData.awba.substring(0, 3) + "-" + this.$route.params.flightData.awba.substring(3)
}
this.getList()
}
this.getCountryList()
let username = JSON.parse(sessionStorage.getItem('user')).username
if(username === 'admin'){
if (username === 'admin') {
this.isAdmin = true
}
},
... ... @@ -981,24 +1099,24 @@
// >>>>>>>>>>>>>>>>获取list集合<<<<<<<<<<<<<<<<<<
getList() {
this.listLoading = true
if (this.listQuery.awba !== undefined && this.listQuery.awba !== '') {
getMt2201ListForParam(this.listQuery).then(res => {
if (this.preQuery.awba !== undefined && this.preQuery.awba !== '') {
getMt2201ListForParam(this.preQuery).then(res => {
this.preData = res.data.dataList
this.total = res.data.count
if (res.data.count > 0) {
this.listQuery.carrier = this.preData[0].carrier
this.listQuery.flightNo = this.preData[0].flightno
this.listQuery.flightDate = this.preData[0].flightdate
this.listQuery.originStation = this.preData[0].originstation
this.listQuery.destinationStation = this.preData[0].destinationstation
this.listQuery.customcode = this.preData[0].customcode
this.preQuery.carrier = this.preData[0].carrier
this.preQuery.flightno = this.preData[0].flightno
this.preQuery.flightdate = this.preData[0].flightdate
this.preQuery.originstation = this.preData[0].originstation
this.preQuery.destinationstation = this.preData[0].destinationstation
this.preQuery.customcode = this.preData[0].customcode
}
setTimeout(() => {
this.listLoading = false
}, 1500)
})
} else {
getMt2201ListForParam(this.listQuery).then(res => {
getMt2201ListForParam(this.preQuery).then(res => {
this.preData = res.data.dataList
this.total = res.data.count
setTimeout(() => {
... ... @@ -1072,12 +1190,12 @@
// >>>>>>>>>>>>>>>>新增主单<<<<<<<<<<<<<<<<<<
handleAddpreInfo() {
this.restModel()
this.preModel.carrier = this.listQuery.carrier
this.preModel.flightno = this.listQuery.flightno
this.preModel.flightdate = this.listQuery.flightdate
this.preModel.originstation = this.listQuery.originstation
this.preModel.destinationstation = this.listQuery.carrier
this.preModel.customcode = this.listQuery.customcode
this.preModel.carrier = this.preQuery.carrier
this.preModel.flightno = this.preQuery.flightno
this.preModel.flightdate = this.preQuery.flightdate
this.preModel.originstation = this.preQuery.originstation
this.preModel.destinationstation = this.preQuery.carrier
this.preModel.customcode = this.preQuery.customcode
this.dialogStatus = 'create'
this.dialogFormVisible = true
this.$nextTick(() => {
... ... @@ -1105,19 +1223,19 @@
},
// >>>>>>>>>>>>>>>>搜索<<<<<<<<<<<<<<<<<<
handleSerach() {
this.listQuery.carrier = undefined
this.listQuery.flightno = undefined
this.listQuery.originstation = undefined
this.listQuery.flightdate = undefined
this.listQuery.destinationstation = undefined
this.preQuery.flightno = undefined
this.preQuery.carrier = undefined
this.preQuery.originstation = undefined
this.preQuery.flightdate = undefined
this.preQuery.destinationstation = undefined
this.getList()
},
// >>>>>>>>>>>>>>>>收发明细<<<<<<<<<<<<<<<<<<
handleSend(row) {
const resQuery = {
carrier: row.carrier,
flightNo: row.flightno,
flightDate: row.flightdate,
flightno: row.flightno,
flightdate: row.flightdate,
awba: row.awba,
awbh: row.awbh,
messageType: 'MT2201'
... ... @@ -1128,8 +1246,26 @@
})
},
// >>>>>>>>>>>>>>>>发送舱单报<<<<<<<<<<<<<<<<<<
handleAwbSend() {
handleAwbSend(row) {
delete row.parent
delete row.children
this.$confirm("是否发送", "确认消息", {
distinguishCancelAndClose: true,
confirmButtonText: '发送',
cancelButtonText: '取消'
}).then(() => {
if (row.awbh === null) {
row.awbh = ''
}
sendCreateMt2201(row).then(res => {
if (res.data.count > 0) {
Message.success(res.data.respMessage)
this.getList()
} else {
Message.error(res.data.respMessage)
}
})
})
},
// >>>>>>>>>>>>>>>>更新运单数据<<<<<<<<<<<<<<<<<<
handleEdit(row) {
... ... @@ -1158,14 +1294,96 @@
})
},
// >>>>>>>>>>>>>>>>发送修改报<<<<<<<<<<<<<<<<<<
handleAwbEdit() {
handleAwbEdit(row) {
delete row.parent
delete row.children
this.preModel = Object.assign({}, row)
this.dialogStatus = 'sendUpdate'
this.dialogFormVisible = true
this.$nextTick(() => {
this.$refs.preFormData.clearValidate()
})
},
// >>>>>>>>>>>>>>>>保存并发送<<<<<<<<<<<<<<<<<<
handleSaveAndSend() {
sendUpdate(){
this.respModel.reason = this.preModel.reason
this.respModel.contactName = this.preModel.contactName
this.respModel.contactTel = this.preModel.contactTel
//
delete this.preModel._expanded
delete this.preModel._level
delete this.preModel._marginLeft
delete this.preModel._show
delete this.preModel._width
const reason = this.preModel.reason
const contactName = this.preModel.contactName
const contactTel = this.preModel.contactTel
this.$refs.preFormData.validate(valid =>{
if(valid){
delete this.preModel.reason
delete this.preModel.contactName
delete this.preModel.contactTel
const map = {
'mt2201': this.preModel,
'reason' : reason,
'contactName': contactName,
'contactTel': contactTel,
}
sendUpdateMt2201(map).then(res =>{
if(res.data.count >0){
Message.success(res.data.respMessage)
this.getList()
this.dialogFormVisible = false
}else {
Message.error(res.data.respMessage)
}
})
}
})
},
// >>>>>>>>>>>>>>>>发送删除报<<<<<<<<<<<<<<<<<<
handleSendDelete(row) {
this.respModel = {
carrier: undefined,
reason: undefined,
contactName: undefined,
contactTel: undefined,
content: '',
flightNo: undefined,
awba: undefined,
customCode: undefined,
flightDate: undefined,
awbh: ''
}
this.dialogDeleteVisble = true
this.respModel.awba = row.awba
this.respModel.flightNo = row.flightno
this.respModel.customCode = row.customcode
this.respModel.awbh = row.awbh
this.respModel.flightDate = row.flightdate
this.respModel.carrier = row.carrier
this.$nextTick(()=>{
this.$refs.sendDeleteForm.clearValidate()
})
},
sendDelete() {
this.$refs.sendDeleteForm.validate(valid =>{
if(valid){
sendDeleteMt2201(this.respModel).then(res => {
if(res.data.count>0){
Message.success(res.data.respMessage)
this.dialogDeleteVisble = false
this.getList()
}else {
Message.error(res.data.respMessage)
}
})
}
})
},
//>>>>>>>>>>>>>>>>删除运单<<<<<<<<<<<<<<<<<<
handleAwbDelete(row) {
delete row.parent
delete row.children
... ... @@ -1199,27 +1417,28 @@
},
// >>>>>>>>>>>>>>>>更改运单状态<<<<<<<<<<<<<<<<<<
handleAwbStatus(row) {
delete row.parent
delete row.children
this.$confirm("是否发送更改状态", "确认消息", {
distinguishCancelAndClose: true,
confirmButtonText: '确认更改',
cancelButtonText: '取消更改'
}).then(() => {
updateStatus(row).then(res => {
if (res.data.count > 0) {
this.$message({
type: 'success',
message: '当前运单状态已更改'
})
this.getList()
} else {
this.$message({
type: 'error',
message: '状态更改失败,请稍后重试'
})
}
})
if (row.status!==22){
row.status =22;
}
// updateStatus(row).then(res => {
// if (res.data.count > 0) {
// this.$message({
// type: 'success',
// message: '当前运单状态已更改'
// })
// this.getList()
// } else {
// this.$message({
// type: 'error',
// message: '状态更改失败,请稍后重试'
// })
// }
// })
}).catch(action => {
this.$message({
... ... @@ -1246,14 +1465,14 @@
this.preModel.awbinfo.sairportid = template.awbinfo.sairportid
this.preModel.awbinfo.eairportid = template.awbinfo.eairportid
this.preModel.awbinfo.ex5 = template.awbinfo.ex5
this.listQuery.awba = template.awba
this.listQuery.flightDate = template.flightdate
this.listQuery.flightNo = template.flightno
this.listQuery.originStation = template.originstation
this.listQuery.destinationStation = template.destinationstation
this.listQuery.customcode = template.customcode
this.listQuery.carrier = template.carrier
getMt2201ListForParam(this.listQuery).then(res => {
this.preQuery.awba = template.awba
this.preQuery.flightdate = template.flightdate
this.preQuery.flightno = template.flightno
this.preQuery.originstation = template.originstation
this.preQuery.destinationstation = template.destinationstation
this.preQuery.customcode = template.customcode
this.preQuery.carrier = template.carrier
getMt2201ListForParam(this.preQuery).then(res => {
this.awbPiece = 0
this.awbWeight = 0
let residuePiece = 0
... ... @@ -1278,7 +1497,7 @@
})
},
//获取城市列表
//获取国家列表
getCountryList() {
getCountry().then(res => {
this.countryList = res.data.dataList
... ... @@ -1294,22 +1513,44 @@
.indexOf(query.toUpperCase()) > -1
})
}, 200)
// if (query.length > 1) {
// this.selectCountry.countryCode = query
// getByCountryCode(this.selectCountry).then(res => {
// this.shpCompnyList = res.data.dataList
// this.shpCompnyTypeOption = this.shpCompnyList.map(item => {
// console.log(item)
// return {value: item.enterpriseCode, label: item.enterpriseCode}
// })
// })
// }
} else {
this.countryOption = []
}
},
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 = []
}
},
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'
... ... @@ -1318,7 +1559,8 @@
},
handelBackStep() {
this.$router.push({name: '出港航班信息', params: {scopeRow: this.preModel}})
this.preQuery.messageType = 'MT2201'
this.$router.push({name: '出港航班信息', params: {scopeRow: this.preQuery}})
}
}
}
... ...
... ... @@ -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,52 +80,55 @@
</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="回执信息" 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)">编辑</el-button>
<el-button size="mini" type="primary" @click="handleAwbSend(scope.row)"
:disabled="scope.row.status !=='00'">发舱单报
</el-button>
:disabled="scope.row.status ==='23'">发舱单报</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 ==='00'">更改状态
</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>
@click="handleAddAwbh(scope.row)">新增分单</el-button>
<el-button size="mini" type="danger" @click="handleSendDelete(scope.row)"
:disabled="scope.row.status ==='24'">发删除报</el-button>
</template>
</el-table-column>
</tree-table>
<div class="btnFoot">
<el-row>
<el-button type="primary" size="mini" v-if="tidyModel.flightno !== undefined || tidyData.length> 0"
<el-button type="primary" size="mini" v-if="tidyQuery.flightno !== undefined || tidyData.length> 0"
@click="handelAddTidyInfo">新增出港理货
</el-button>
<el-button type="primary" size="mini" v-if="tidyModel.flightno !== undefined || tidyData.length> 0"
<el-button type="primary" size="mini" v-if="tidyQuery.flightno !== undefined || tidyData.length> 0"
@click="handelBackStep">返回
</el-button>
</el-row>
... ... @@ -174,14 +177,29 @@
<el-row>
<el-col :span="7.5">
<el-form-item label="起始站" prop="originstation">
<el-input v-model="originstation"
:disabled="dialogStatus === 'update'"></el-input>
<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'">
<span style="float: left">{{ item.airportdescchn }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.airportid }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="7.5">
<el-form-item label="目的站" prop="destinationstation">
<el-input v-model="destinationstation"
:disabled="dialogStatus === 'update'"></el-input>
<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'">
<span style="float: left">{{ item.airportdescchn }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.airportid }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
... ... @@ -238,9 +256,14 @@
</el-col>
<el-col :span="7.5">
<el-form-item label="海关关区" prop="customcode">
<el-select v-model="tidyModel.customcode">
<el-option v-for="item in customcodeList " :key="item" :label="item"
:value="item"></el-option>
<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">
<span style="float: left">{{ item.customcode }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.customname }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
... ... @@ -249,12 +272,11 @@
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible = false">取消</el-button>
<el-button type="primary" @click="dialogStatus==='create'?createData():updateData()">保存</el-button>
<el-button type="success" @click="handleSaveAndSend">保存并发送</el-button>
</div>
</el-dialog>
<el-dialog title="收发明细" :visible.sync="dialogTableVisible">
<el-table :data="detailData" border>
<el-table-column label="操作时间" width="150">
<el-table-column label="操作时间" width="180">
<template slot-scope="scope">
{{scope.row.busdate}}
</template>
... ... @@ -291,7 +313,27 @@
</el-table-column>
</el-table>
</el-dialog>
<el-dialog title="删除原因" :visible.sync="dialogDeleteVisible" width="30%">
<el-form ref="tidyDeleteForm" :model="respModel" :rules="tidyDeleteRules"
label-width="120px" style="margin-right: 50px">
<el-form-item label="删除原因" prop="reason">
<el-input v-model="respModel.reason" placeholder="删除原因"></el-input>
</el-form-item>
<el-form-item label="删除操作人" prop="contactName">
<el-input v-model="respModel.contactName" placeholder="操作人姓名"></el-input>
</el-form-item>
<el-form-item label="操作人Tel" prop="contactTel">
<el-input v-model="respModel.contactTel" placeholder="删除操作人联系方式"></el-input>
</el-form-item>
<el-form-item label="备注">
<el-input v-model="respModel.content" type="textarea"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogDeleteVisible = false">取消</el-button>
<el-button type="primary" @click="sendTidyDelete()">发送</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
... ... @@ -299,10 +341,14 @@
import treeToArray from '@/utils/customEval'
import Pagination from '@/components/Pagination'
import {getMt520XListForParam, deleteByIsDelete, updateStatus, updateMt520X, addMt520X} from '@/api/exitTidy'
import {
getMt520XListForParam, deleteByIsDelete,
updateStatus, updateMt520X, addMt520X,
sendCreateMt5202,sendRemoveMt5202 } from '@/api/exitTidy'
import {Message} from "element-ui";
import {getResponseForParam} from '@/api/responseDetail'
import {validAwb, validAlphabets, validAlphabetsAndNum, validAlphabetsAndSpanceKey,validatorNum} from "@/utils/validate"
import {getCustomCode,getAirportCode} from "@/api/country";
export default {
name: "ExitTidy",
... ... @@ -348,7 +394,8 @@
create: '添加出港理货',
addAwbh: '添加分单理货'
},
customcodeList: [4604, 4620],
customCodeList: [],
airportCode:[],
tidyQuery: {
pageSize: 1,
limitSize: 100,
... ... @@ -358,7 +405,8 @@
flightdate: undefined,
originstation: undefined,
destinationstation: undefined,
customcode: undefined
customcode: undefined,
messageType: undefined
},
tidyRoles: {
awba: [{required: true, trigger: 'blur', validator: validatorAwb}],
... ... @@ -374,9 +422,11 @@
tidyData: [],
detailData: [],
dialogTableVisible: false,
dialogDeleteVisible: false,
dialogStatus: undefined,
disabledStatus: false,
listLoading: false,
customLoading:false,
dialogFormVisible: false,
tidyModel: {
carrier: undefined,
... ... @@ -396,7 +446,25 @@
awbpiece: undefined,
awbweight: undefined,
rcfdep: 'MT5202',
}
},
respModel : {
uuid: undefined,
reason: undefined,
contactName: undefined,
contactTel: undefined,
content: '',
flightNo: undefined,
awba: undefined,
customCode: undefined,
flightDate: undefined,
awbh: undefined,
rcfdep: 'MT5202',
},
tidyDeleteRules: {
reason: [{required: true, message: '删除原因不能为空', trigger: 'blur'}],
contactName: [{required: true, message: '删除操作人不能为空', trigger: 'blur'}],
contactTel: [{required: true, message: '操作人联系方式不能为空', trigger: 'blur'}]
},
}
},
created() {
... ... @@ -489,7 +557,7 @@
getList() {
this.listLoading = true
//根据是否有主单号 来给查询条件赋值
if (this.tidyQuery.awba != undefined && this.tidyQuery.awba != '') {
if (this.tidyQuery.awba !== undefined && this.tidyQuery.awba !== '') {
getMt520XListForParam(this.tidyQuery).then(res => {
this.tidyData = res.data.dataList
this.total = res.data.count
... ... @@ -547,7 +615,26 @@
//发送舱单报
handleAwbSend(row) {
delete row.children
delete row.parent
this.$confirm("是否发送", "确认消息", {
distinguishCancelAndClose: true,
confirmButtonText: '发送',
cancelButtonText: '取消'
}).then(() => {
delete row.messageType
console.log(row)
sendCreateMt5202(row).then(res => {
if (res.data.count > 0) {
Message.success(res.data.respMessage)
this.getList()
}else {
Message.error(res.data.respMessage)
}
})
}).catch(error =>{
Message.error(error.message)
})
},
//新增分单理货
handleAddAwbh(row) {
... ... @@ -564,6 +651,52 @@
this.$refs.tidyFormData.clearValidate()
})
},
// 发删除报
handleSendDelete(row){
this.respModel = {
carrier: undefined,
reason: undefined,
contactName: undefined,
contactTel: undefined,
content: '',
flightNo: undefined,
awba: undefined,
customCode: undefined,
flightDate: undefined,
awbh: undefined,
rcfdep: 'MT5202',
}
this.dialogDeleteVisible = true
this.respModel.carrier = row.carrier
this.respModel.flightNo = row.flightno
this.respModel.awba = row.awba
this.respModel.customCode = row.customcode
this.respModel.flightDate = row.flightdate
if(row.awbh === null){
this.respModel.awbh = ''
}else {
this.respModel.awbh = row.awbh
}
this.$nextTick(() => {
this.$refs.tidyDeleteForm.clearValidate()
})
},
sendTidyDelete(){
this.$refs.tidyDeleteForm.validate(valid =>{
if(valid){
sendRemoveMt5202(this.respModel).then(res =>{
if(res.data.count >0){
Message.success(res.data.respMessage)
this.dialogDeleteVisible = false
this.getList()
}else {
Message.error(res.data.respMessage)
}
})
}
})
},
// 删除当前运单
handleAwbDelete(row) {
delete row.parent
... ... @@ -575,16 +708,10 @@
}).then(() => {
deleteByIsDelete(row).then(res => {
if (res.data.count > 0) {
this.$message({
type: 'success',
message: '删除成功'
})
Message.success("删除成功")
this.getList()
} else {
this.$message({
type: 'error',
message: '删除异常,请稍后重试'
})
Message.success("删除异常,请稍后重试")
}
})
}).catch(action => {
... ... @@ -599,27 +726,23 @@
},
// 更新运单为可发送状态
handleAwbStatus(row) {
delete row.parent
delete row.children
this.$confirm("是否发送更改状态", "确认消息", {
distinguishCancelAndClose: true,
confirmButtonText: '确认更改',
cancelButtonText: '取消更改'
}).then(() => {
updateStatus(row).then(res => {
if (res.data.count > 0) {
this.$message({
type: 'success',
message: '当前运单状态已更改'
})
this.getList()
} else {
this.$message({
type: 'error',
message: '更新失败,请稍后重试'
})
}
})
if (row.status!==22){
row.status =22;
}
// updateStatus(row).then(res => {
// if (res.data.count > 0) {
// Message.success(res.data.respMessage)
// this.getList()
// } else {
// Message.error(res.data.respMessage)
// }
// })
}).catch(action => {
this.$message({
type: 'info',
... ... @@ -712,20 +835,51 @@
}
})
},
// 保存并发送
handleSaveAndSend() {
//获取机场三字码
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 = []
}
},
//关区代码
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() {
const row = {
'messageType': 'MT5201'
const query = {
'messageType': 'MT5202'
}
this.$router.push({name: '出港航班信息', params: {scopeRow: row}})
this.$router.push({name: '出港航班信息', params: {scopeRow: query}})
},
// 返回
handelBackStep() {
this.$router.push({name: '出港航班信息', params: {scopeRow: this.tidyModel}})
this.tidyQuery.messageType = 'MT5202'
this.$router.push({name: '出港航班信息', params: {scopeRow: this.tidyQuery}})
}
}
}
... ...