作者 zhangFan

页面bug修改,报文发送功能开启

... ... @@ -29,8 +29,8 @@ module.exports = {
assetsPublicPath: '/',
proxyTable: {
'/api':{
// target: 'http://192.168.1.53:12343',//设置你调用的接口域名和端口号 别忘了加http
target: 'http://localhost:12343',//设置你调用的接口域名和端口号 别忘了加http
target: 'http://192.168.1.53:12343',//设置你调用的接口域名和端口号 别忘了加http
// target: 'http://localhost:12343',//设置你调用的接口域名和端口号 别忘了加http
changeOrigin: true,
pathRewrite: {
'^/api': '/'//这里理解成用‘/api’代替target里面的地址,后面组件中我们掉接口时直接用api代替 比如我要调用'http://40.00.100.100:3002/user/add',直接写‘/api/user/add’即可
... ...
import http from './http.js'
let baseUrl = 'nmms-server/nmms/country'
let baseUrl = 'nmms-server-export/nmms/country'
export const getCountry = params => { return http.get(`${baseUrl}/getCountryCode`, params); };
... ... @@ -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.post(`/nmms-server-import/nmms/mt1201/selectList`,params)}
export const getCustomCode = params =>{return http.post(`/nmms-server-import/nmms/mt1201/selectCustomcode`,params)}
... ...
import http from './http.js'
let baseUrl = 'nmms-server/nmms/mt3201'
let baseUrl = 'nmms-server-export/nmms/mt3201'
export const getMt3201ListForParam = params => {
return http.get(`${baseUrl}/getMt3201ListForParam`, 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)};
... ...
import http from './http.js'
let baseUrl = 'nmms-server/nmms/flight'
let baseUrl = 'nmms-server-export/nmms/flight'
export const getFlightListForParam = params => {
return http.get(`${baseUrl}/getFlight`, params);
... ...
import http from './http.js'
let baseUrl = 'nmms-server/nmms/mt4201'
let baseUrl = 'nmms-server-export/nmms/mt4201'
export const getMt4201ListForParam = params => {
return http.get(`${baseUrl}/getMt4201ListForParam`, 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)};
... ...
import http from './http.js'
let baseUrl = 'nmms-server/nmms/manifest'
let baseUrl = 'nmms-server-export/nmms/manifest'
export const getManifests = params => {
return http.get(`${baseUrl}/getManifests`, params);
... ...
import http from './http.js'
let baseUrl = 'nmms-server/nmms/mt2201'
let baseUrl = 'nmms-server-export/nmms/mt2201'
export const getMt2201ListForParam = params => { return http.get(`${baseUrl}/getMt2201ListForParam`, 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)}
... ...
import http from './http.js'
let baseUrl = 'nmms-server/nmms/mt520x'
let baseUrl = 'nmms-server-export/nmms/mt520x'
export const getMt520XListForParam = params => {
return http.get(`${baseUrl}/getMt520xListForParam`, 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)};
... ...
... ... @@ -46,7 +46,7 @@ export default {
login: data =>{
return axios({
method: 'POST', // 请求协议
url: 'user-center/login', // 请求的地址
url: 'cloud-user-center/login', // 请求的地址
data: qs.stringify(data), // post 请求的数据
timeout: 30000, // 超时时间, 单位毫秒
headers: {
... ...
import http from './http.js'
let baseUrl = 'nmms-server/nmms/mt1201'
let baseUrl = 'nmms-server-export/nmms/mt1201'
export const getMt1201ListForParam = params => { return http.get(`${baseUrl}/getMt1201ListForParam`, params); };
... ...
import http from './http.js'
let baseUrl = 'nmms-server/nmms/rep'
let baseUrl = 'nmms-server-export/nmms/rep'
export const getResponseForParam = params => {
return http.get(`${baseUrl}/getResponseForParam`, params);
... ...
... ... @@ -98,7 +98,7 @@
},
data() {
return {
sysName: '流浪地球管理系统',
sysName: '新舱单管理系统',
collapsed: false,
sysUserName: '',
sysUserAvatar: '',
... ...
... ... @@ -93,6 +93,7 @@
<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 ==='05'">舱单报退单</span>
<span v-if="scope.row.status ==='06'">舱单转人工</span>
<span v-if="scope.row.status ==='07'">舱单报申报成功</span>
... ... @@ -115,15 +116,13 @@
<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>
<el-button size="mini" type="success" @click="handleEdit(scope.row)" :disabled="scope.row.status !=='01'">编辑</el-button>
<el-button size="mini" type="primary" @click="handleSendAwb(scope.row)"
:disabled="scope.row.status !=='01'">发送舱单报</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'">修改状态
</el-button>
:disabled="scope.row.status ==='01'">修改状态</el-button>
<el-button size="mini" type="danger" @click="handleSendDelete(scope.row)">发删除报</el-button>
</template>
</el-table-column>
</el-table>
... ... @@ -132,7 +131,7 @@
<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 +184,26 @@
<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="请选择起始站" allow-create v-model="arriveModel.originstation">
<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="请选择起始站" allow-create v-model="arriveModel.destinationstation">
<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 +237,13 @@
</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="请选择关区代码" filterable clearable
: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,7 +252,6 @@
<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">
... ... @@ -279,16 +293,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 +363,8 @@
}
callback()
}
const validAlphabetsSpanceKey = (rule,value,callback) =>{
if(!validAlphabetsAndSpanceKey(value)){
const validAlphabetsSpanceKey = (rule, value, callback) => {
if (!validAlphabetsAndSpanceKey(value)) {
callback("只能输入字母、数字、空格")
}
callback()
... ... @@ -339,7 +388,8 @@
flightdate: undefined,
originstation: undefined,
destinationstation: undefined,
customcode: undefined
customcode: undefined,
messageType: undefined,
},
dialogMap: {
update: '编辑出港运抵',
... ... @@ -347,10 +397,12 @@
},
dialogTableVisible: false,
multipleSelection: [],
customcodeList: [4604, 4620],
customCodeList: [],
airportCode:[],
dialogStatus: undefined,
awbhStatus: false,
dialogFormVisible: false,
dialogDeleteVisible: false,
listLoading: false,
arriveRoles: {
awba: [{required: true, trigger: 'blur', validator: validatorAwb}],
... ... @@ -379,7 +431,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 +457,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
... ... @@ -396,8 +464,10 @@
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'){
if (username === 'admin') {
this.isAdmin = true
}
},
... ... @@ -575,9 +645,73 @@
})
},
//保存并发送
SaveAndSend() {
// 发送舱单报
handleSendAwb(row) {
this.$confirm("是否发送", "确认消息", {
distinguishCancelAndClose: true,
confirmButtonText: '发送',
cancelButtonText: '取消'
}).then(() => {
if(row.awbh ===null){
row.awbh = ''
}
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 = {
uuid: 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.carrier + row.flightno
this.respModel.awba = row.awba
this.respModel.uuid = row.uuid
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.success(res.data.respMessage)
}
})
}
})
},
// 收发明细
handleSend(row) {
... ... @@ -663,6 +797,18 @@
})
})
},
getAirportCode(){
getAirportCode().then(res=>{
this.airportCode = res.data.data
console.log(this.airportCode)
})
},
getCustomCode(){
getCustomCode().then(res =>{
this.customCodeList = res.data.data
console.log(this.customCodeList)
})
},
// 携数据跳转 新增运抵
handleAddArrive() {
const row = {
... ... @@ -671,7 +817,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="remoteMethod"
:loading="listLoading"
v-model="flight.originstation"
allow-create
filterable
remote
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>
</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="remoteMethod"
:loading="listLoading"
v-model="flight.destinationstation"
allow-create
filterable
remote
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>
</el-option>
</el-select>
</el-col>
<el-col :span="4" style="margin-left: 20px">
<el-input placeholder="可为空" v-model="awba">
... ... @@ -55,7 +83,7 @@
<script>
import {Message} from "element-ui";
import {getCountry,getAirportCode} from "@/api/country";
export default {
name: 'ExitFlightDesc',
data() {
... ... @@ -68,7 +96,14 @@
awba: undefined,
messageType:undefined
},
btnStatus: true
btnStatus: true,
listLoading: false,
countryOption: [],
countryList: [],
countryResultList: [],
airportList:[],
airportResultCode: [],
airportCode: [],
};
},
created() {
... ... @@ -85,8 +120,23 @@
if(this.$route.params.scopeRow.awba !== undefined){
this.flight.awba = this.$route.params.scopeRow.awba.replace('-','')
}
}
this.getCountryList()
this.getAirport()
},
mounted() {
// 延迟加载,否则会出错
setTimeout(() => {
this.countryResultList = this.countryList.map(item => {
return {value: item.countryCode, label: item.countryNameCn}
})
this.airportResultCode = this.airportCode.map(item =>{
return {label: item.airportdescchn,value: item.airportid}
})
console.log(this.airportResultCode)
}, 6000)
},
computed:{
flightno : {
... ... @@ -144,7 +194,7 @@
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"){
... ... @@ -160,7 +210,44 @@
Message.warning("请将航班信息填写完整")
}
}
},
getAirport(){
getAirportCode().then(res =>{
this.airportCode = res.data.data
})
},
getCountryList() {
getCountry().then(res => {
this.countryList = res.data.dataList
})
},
remoteMethod(query) {
// if (query !== '') {
// this.listLoading = true
// setTimeout(() => {
// this.listLoading = false
// this.countryOption = this.countryResultList.filter(item => {
// return item.value.toUpperCase().trim()
// .indexOf(query.toUpperCase()) > -1
// })
// }, 200)
// } else {
// this.countryOption = []
// }
if (query !== '') {
this.listLoading = true
setTimeout(() => {
this.listLoading = false
this.airportCode = this.airportResultCode.filter(item => {
return item.value.toUpperCase().trim()
.indexOf(query.toUpperCase()) > -1
})
}, 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>
... ... @@ -51,11 +51,16 @@
</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-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>
... ... @@ -102,26 +107,30 @@
<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 size="mini" type="success" @click="handleEdit(scope.row)" :disabled="scope.row.status !=='01'">编辑
</el-button>
<el-button size="mini" type="primary" @click="handleSendAwb(scope.row)"
:disabled="scope.row.status !=='00'">发送舱单报
</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'">更改状态
</el-button>
<el-button size="mini" type="danger" @click="handleSendDelete(scope.row)">发删除报</el-button>
</template>
</el-table-column>
</tree-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"
... ... @@ -155,13 +164,26 @@
<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="请选择起始站" allow-create v-model="loadingModel.originstation">
<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="请选择起始站" allow-create v-model="loadingModel.destinationstation">
<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 +228,13 @@
</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
: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,7 +255,6 @@
<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">
... ... @@ -271,6 +296,27 @@
</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>
... ... @@ -278,9 +324,20 @@
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"
export default {
name: "ExitLoading",
components: {treeTable, Pagination},
... ... @@ -304,8 +361,8 @@
}
callback()
}
const validAlphabetsSpanceKey = (rule,value,callback) =>{
if(!validAlphabetsAndSpanceKey(value)){
const validAlphabetsSpanceKey = (rule, value, callback) => {
if (!validAlphabetsAndSpanceKey(value)) {
callback("只能输入字母、数字、空格")
}
callback()
... ... @@ -319,15 +376,17 @@
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,
listLoading: false,
loadingQuery: {
pageSize: 1,
... ... @@ -338,7 +397,8 @@
flightdate: undefined,
originstation: undefined,
destinationstation: undefined,
customcode: undefined
customcode: undefined,
messageType: undefined
},
loadingRoles: {
awba: [{required: true, trigger: 'blur', validator: validatorAwb}],
... ... @@ -350,12 +410,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 +429,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() {
... ... @@ -386,8 +467,10 @@
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'){
if (username === 'admin') {
this.isAdmin = true
}
},
... ... @@ -494,7 +577,6 @@
// 编辑 弹框
handleEdit(row) {
this.loadingModel = Object.assign({}, row)
console.log(this.loadingModel)
this.dialogStatus = 'update'
this.dialogFormVisible = true
this.$nextTick(() => {
... ... @@ -519,10 +601,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 = {
uuid: undefined,
reason: undefined,
contactName: undefined,
contactTel: undefined,
content: '',
flightNo: undefined,
awba: undefined,
customCode: undefined,
flightDate: undefined,
awbh: ''
}
this.dialogDeleteVisible = true
this.respModel.uuid = row.uuid
this.respModel.flightNo = row.carrier + 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,
... ... @@ -583,14 +730,10 @@
})
})
},
// 保存并发送
handleSaveAndSend() {
},
// 重置实体
restModel() {
this.loadingModel = {
carrier:undefined,
carrier: undefined,
flightno: undefined,
flightdate: undefined,
originstation: undefined,
... ... @@ -639,6 +782,16 @@
}
})
},
getAirportCode(){
getAirportCode().then(res=>{
this.airportCode = res.data.data
})
},
getCustomCode(){
getCustomCode().then(res =>{
this.customCodeList = res.data.data
})
},
handleAddLoading() {
const row = {
'messageType': 'MT4201'
... ... @@ -646,7 +799,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,15 +87,16 @@
{{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 ==='04'">已发送</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>
... ... @@ -116,9 +117,9 @@
<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)" :disabled="scope.row.status !=='01'">编辑</el-button>
<el-button size="mini" type="success" v-if="scope.row.awbh ===null"
@click="handleAddAwbh(scope.row)">新增分单
</el-button>
... ... @@ -127,25 +128,26 @@
</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'">更改状态
</el-button>
<el-button size="mini" type="danger" @click="handleSendDelete(scope.row)">发删除报</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 +194,27 @@
<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="请选择起始站" allow-create v-model="preModel.originstation">
<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-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-input v-model="destinationstation" :disabled="dialogStatus === 'addAwbh'" clearable/>
<el-select filterable clearable placeholder="请选择目的站" allow-create v-model="preModel.destinationstation">
<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 +323,19 @@
<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
: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,11 +540,35 @@
<!--</el-form-item>-->
<!--</el-col>-->
</el-row>
<div v-show="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">
... ... @@ -566,6 +610,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 +638,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 +697,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,9 +722,11 @@
{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,
disabledStatus: false,
dialogFormVisible: false,
... ... @@ -673,6 +750,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 +783,9 @@
uldNo: undefined,
status: undefined,
ex5: undefined,
reason: undefined,
contactName: undefined,
contactTel: undefined,
awbinfo: {
pcs: undefined,
weight: undefined,
... ... @@ -743,6 +826,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 +857,21 @@
},
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()
this.getAirportCode()
this.getCustomCode()
let username = JSON.parse(sessionStorage.getItem('user')).username
if(username === 'admin'){
if (username === 'admin') {
this.isAdmin = true
}
},
... ... @@ -981,24 +1085,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 +1176,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 +1209,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 +1232,24 @@
})
},
// >>>>>>>>>>>>>>>>发送舱单报<<<<<<<<<<<<<<<<<<
handleAwbSend() {
handleAwbSend(row) {
delete row.parent
delete row.children
this.$confirm("是否发送", "确认消息", {
distinguishCancelAndClose: true,
confirmButtonText: '发送',
cancelButtonText: '取消'
}).then(() => {
sendCreateMt2201(row).then(res => {
console.log(res)
if (res.data.count > 0) {
Message.success(res.data.respMessage)
this.getList()
} else {
Message.error(res.data.respMessage)
}
})
})
},
// >>>>>>>>>>>>>>>>更新运单数据<<<<<<<<<<<<<<<<<<
handleEdit(row) {
... ... @@ -1158,14 +1278,82 @@
})
},
// >>>>>>>>>>>>>>>>发送修改报<<<<<<<<<<<<<<<<<<
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
const map = {
'mt2201': this.preModel,
'reason' : this.preModel.reason,
'contactName':this.preModel.contactName,
'contactTel': this.preModel.contactTel,
}
this.$refs.preFormData.validate(valid =>{
if(valid){
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 = {
uuid: 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.carrier + row.flightno
this.respModel.customCode = row.customcode
this.respModel.awbh = row.awbh
this.respModel.flightDate = row.flightdate
this.respModel.uuid = row.uuid
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
... ... @@ -1246,14 +1434,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
... ... @@ -1294,21 +1482,20 @@
.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 = []
}
},
getAirportCode(){
getAirportCode().then(res=>{
this.airportCode = res.data.data
})
},
getCustomCode(){
getCustomCode().then(res =>{
this.customCodeList = res.data.data
})
},
handleAddpre() {
const row = {
... ... @@ -1318,7 +1505,8 @@
},
handelBackStep() {
this.$router.push({name: '出港航班信息', params: {scopeRow: this.preModel}})
this.preQuery.messageType = 'MT2201'
this.$router.push({name: '出港航班信息', params: {scopeRow: this.preQuery}})
}
}
}
... ...
... ... @@ -96,7 +96,7 @@
<span v-if="scope.row.status ==='16'">海关已存在</span>
</template>
</el-table-column>
<el-table-column prop="receipt" label="回执信息" width="180" align="center">
<el-table-column prop="receipt" label="回执信息" width="300" align="center">
<template slot-scope="scope">
<span>{{scope.row.ext5}}</span>
</template>
... ... @@ -105,27 +105,25 @@
<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="success" @click="handleEdit(scope.row)" :disabled="scope.row.status !=='01'">编辑</el-button>
<el-button size="mini" type="primary" @click="handleAwbSend(scope.row)"
:disabled="scope.row.status !=='00'">发舱单报
</el-button>
:disabled="scope.row.status !=='01'">发舱单报</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 ==='01'">更改状态</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)">发删除报</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 +172,27 @@
<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="请选择起始站" allow-create v-model="tidyModel.originstation">
<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="请选择起始站" allow-create v-model="tidyModel.destinationstation">
<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 +249,13 @@
</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
: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,7 +264,6 @@
<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">
... ... @@ -291,7 +305,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 +333,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 +386,8 @@
create: '添加出港理货',
addAwbh: '添加分单理货'
},
customcodeList: [4604, 4620],
customCodeList: [],
airportCode:[],
tidyQuery: {
pageSize: 1,
limitSize: 100,
... ... @@ -358,7 +397,8 @@
flightdate: undefined,
originstation: undefined,
destinationstation: undefined,
customcode: undefined
customcode: undefined,
messageType: undefined
},
tidyRoles: {
awba: [{required: true, trigger: 'blur', validator: validatorAwb}],
... ... @@ -374,6 +414,7 @@
tidyData: [],
detailData: [],
dialogTableVisible: false,
dialogDeleteVisible: false,
dialogStatus: undefined,
disabledStatus: false,
listLoading: false,
... ... @@ -396,7 +437,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() {
... ... @@ -411,6 +470,8 @@
}
this.getList()
}
this.getAirportCode()
this.getCustomCode()
let username = JSON.parse(sessionStorage.getItem('user')).username
if(username === 'admin'){
this.isAdmin = true
... ... @@ -547,7 +608,25 @@
//发送舱单报
handleAwbSend(row) {
delete row.children
delete row.parent
this.$confirm("是否发送", "确认消息", {
distinguishCancelAndClose: true,
confirmButtonText: '发送',
cancelButtonText: '取消'
}).then(() => {
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 +643,52 @@
this.$refs.tidyFormData.clearValidate()
})
},
// 发删除报
handleSendDelete(row){
this.respModel = {
uuid: 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.uuid = row.uuid
this.respModel.flightNo = row.carrier + 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 +700,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 => {
... ... @@ -608,16 +727,10 @@
}).then(() => {
updateStatus(row).then(res => {
if (res.data.count > 0) {
this.$message({
type: 'success',
message: '当前运单状态已更改'
})
Message.success(res.data.respMessage)
this.getList()
} else {
this.$message({
type: 'error',
message: '更新失败,请稍后重试'
})
Message.error(res.data.respMessage)
}
})
}).catch(action => {
... ... @@ -712,20 +825,27 @@
}
})
},
// 保存并发送
handleSaveAndSend() {
getAirportCode(){
getAirportCode().then(res=>{
this.airportCode = res.data.data
})
},
getCustomCode(){
getCustomCode().then(res =>{
this.customCodeList = res.data.data
})
},
// 新增理货弹框
handleAddTidy() {
const row = {
'messageType': 'MT5201'
'messageType': 'MT5202'
}
this.$router.push({name: '出港航班信息', params: {scopeRow: row}})
},
// 返回
handelBackStep() {
this.$router.push({name: '出港航班信息', params: {scopeRow: this.tidyModel}})
this.tidyQuery.messageType = 'MT5202'
this.$router.push({name: '出港航班信息', params: {scopeRow: this.tidyQuery}})
}
}
}
... ...