作者 shenhailong

excel 导入 出港预配装载理货 新增删除修改操作 用户名称插入回执表

... ... @@ -23,3 +23,7 @@ export const sendDeleteMt2201 = params =>{return http.post(`${baseUrl}/sendDelet
export const sendUpdateMt2201 = params =>{return http.post(`${baseUrl}/sendUpdateMt2201`,params)}
export const sendCreateMt2201 = params =>{return http.post(`${baseUrl}/sendCreateMt2201`,params)}
export const uploadFileExcel = params =>{return http.post(`${baseUrl}/uploadFileExcel`,params)}
... ...
... ... @@ -316,7 +316,7 @@
</el-table-column>
<el-table-column label="操作人" width="100">
<template slot-scope="scope">
{{scope.row.operusername}}
{{scope.row.opersystemname}}
</template>
</el-table-column>
</el-table>
... ... @@ -460,7 +460,10 @@
goodsname: undefined,
customcode: undefined,
arrivetime: undefined,
messageType: 'MT3201'
messageType: 'MT3201',
user :{
username : JSON.parse(sessionStorage.getItem('user')).username
}
},
respModel: {
uuid: undefined,
... ... @@ -627,7 +630,10 @@
this.arriveModel.customcode = row.customcode
this.dialogStatus = 'create'
this.fenStatus = 'addAwbh'
this.dialogFormVisible = true
this.dialogFormVisible = true,
row.user = {
username: JSON.parse(sessionStorage.getItem('user')).username
}
this.$nextTick(() => {
this.$refs.arriveFormData.clearValidate()
})
... ... @@ -664,6 +670,9 @@
goodsname: undefined,
customcode: undefined,
arrivetime: undefined,
user: {
username: JSON.parse(sessionStorage.getItem('user')).username
}
}
},
// 编辑
... ... @@ -683,7 +692,11 @@
})
},
updateData() {
var _this = this
this.$refs.arriveFormData.validate(valid => {
_this.arriveModel.user= {
username : JSON.parse(sessionStorage.getItem('user')).username
}
if (valid) {
updateMT3201(this.arriveModel).then(res => {
if (res.data.count > 0) {
... ... @@ -710,6 +723,11 @@
}
delete row.parent
delete row.children
row.user = {
username : JSON.parse(sessionStorage.getItem('user')).username
}
sendCreateMt3201(row).then(res => {
if (res.data.count > 0) {
Message.success(res.data.respMessage)
... ... @@ -735,7 +753,8 @@
awba: undefined,
customCode: undefined,
flightDate: undefined,
awbh: undefined
awbh: undefined,
username: JSON.parse(sessionStorage.getItem('user')).username,
}
this.dialogDeleteVisible = true
this.respModel.flightNo = row.flightno
... ...
... ... @@ -41,6 +41,16 @@
size="mini"
@click="handleAddpre">新增预配舱单
</el-button>
<el-upload
style="display: inline; margin-left: 10px;margin-right: 10px;"
action=""
:http-request="uploadFile"
:limit=1
:on-exceed="fileExceed"
accept="application/vnd.ms-excel,application/vnd.ms-excels"
ref="fileupload">
<el-button slot="trigger" size="small" type="primary">导入excel</el-button>
</el-upload>
</div>
</div>
</el-col>
... ... @@ -158,7 +168,7 @@
<pagination background layout="total, prev, pager, next" 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="90%">
<el-dialog top="5vh" :title="dialogMap[dialogStatus]" :visible.sync="dialogFormVisible" width="90%">
<el-form ref="preFormData" :model="preModel" :rules="preRoles" label-position="right"
label-width="78px" size="mini" class="el-dialog-div" style="height: 90%">
<div class="grid-content content" style="font-size: 10px">
... ... @@ -602,7 +612,7 @@
</el-table-column>
<el-table-column label="操作人" width="100">
<template slot-scope="scope">
{{scope.row.operusername}}
{{scope.row.opersystemname}}
</template>
</el-table-column>
</el-table>
... ... @@ -644,7 +654,8 @@
addMt2201,
sendCreateMt2201,
sendDeleteMt2201,
sendUpdateMt2201
sendUpdateMt2201,
uploadFileExcel
} from '@/api/exitPre'
import {Message} from "element-ui";
import {getResponseForParam} from '@/api/responseDetail'
... ... @@ -825,6 +836,9 @@
csgcustomerid: undefined,
paymodel: '0',
awbtype: undefined
},
user: {
username: this.username
}
},
respModel: {
... ... @@ -1106,6 +1120,7 @@
} else {
getMt2201ListForParam(this.preQuery).then(res => {
this.preData = res.data.dataList
this.total = res.data.count
setTimeout(() => {
this.listLoading = false
... ... @@ -1171,6 +1186,9 @@
eairportid: undefined,
csgcustomerid: undefined,
paymodel: '0',
},
user: {
username : JSON.parse(sessionStorage.getItem('user')).username
}
}
},
... ... @@ -1248,6 +1266,9 @@
if (row.awbh === null) {
row.awbh = ''
}
row.user = {
username : JSON.parse(sessionStorage.getItem('user')).username
}
sendCreateMt2201(row).then(res => {
if (res.data.count > 0) {
Message.success(res.data.respMessage)
... ... @@ -1269,7 +1290,8 @@
},
// >>>>>>>>>>>>>>>>更新运单数据<<<<<<<<<<<<<<<<<<
handleEdit(row) {
console.log(row)
this.dialogStatus = undefined;
this.fenStatus = undefined;
this.preModel = Object.assign({}, row)
this.dialogStatus = 'update'
if (row.awbh !== undefined && row.awbh !== ""){
... ... @@ -1282,11 +1304,16 @@
})
},
updateData() {
let _this = this;
this.$refs.preFormData.validate(valid => {
if (valid) {
delete this.preModel.parent
delete this.preModel.children
updateMT2201(this.preModel).then(res => {
_this.preModel.user= {
username : JSON.parse(sessionStorage.getItem('user')).username
}
updateMT2201(_this.preModel).then(res => {
if (res.data.count > 0) {
Message.success("修改成功")
this.dialogFormVisible = false
... ... @@ -1332,6 +1359,8 @@
const reason = this.preModel.reason
const contactName = this.preModel.contactName
const contactTel = this.preModel.contactTel
const username = JSON.parse(sessionStorage.getItem('user')).username
this.$refs.preFormData.validate(valid =>{
if(valid){
... ... @@ -1343,6 +1372,7 @@
'reason' : reason,
'contactName': contactName,
'contactTel': contactTel,
'username': username,
}
sendUpdateMt2201(map).then(res =>{
if(res.data.count >0){
... ... @@ -1370,7 +1400,8 @@
awba: undefined,
customCode: undefined,
flightDate: undefined,
awbh: ''
awbh: '',
username: JSON.parse(sessionStorage.getItem('user')).username,
}
this.rows = row;
this.dialogDeleteVisble = true
... ... @@ -1587,6 +1618,23 @@
handelBackStep() {
this.preQuery.messageType = 'MT2201'
this.$router.push({name: '出港航班信息', params: {scopeRow: this.preQuery}})
},
// 导入excel
fileExceed(){
this.$message.error('别贪心!一次只能上传一个哦~');
},
// 自定义上传
uploadFile (item) {
const form = new FormData()
form.append('file', item.file)
uploadFileExcel(form).then(res =>{
if(res.data.count >0){
Message.success(res.data.respMessage)
this.getList();
}else {
Message.error(res.data.respMessage)
}
})
}
}
}
... ...
... ... @@ -87,12 +87,13 @@
</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 ==='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>
... ... @@ -323,7 +324,7 @@
</el-table-column>
<el-table-column label="操作人" width="100">
<template slot-scope="scope">
{{scope.row.operusername}}
{{scope.row.opersystemname}}
</template>
</el-table-column>
</el-table>
... ... @@ -466,6 +467,9 @@
awbpiece: undefined,
awbweight: undefined,
rcfdep: 'MT5202',
user: {
username : JSON.parse(sessionStorage.getItem('user')).username
}
},
respModel : {
uuid: undefined,
... ... @@ -646,7 +650,9 @@
cancelButtonText: '取消'
}).then(() => {
console.log(row)
row.user = {
username : JSON.parse(sessionStorage.getItem('user')).username
}
sendCreateMt5202(row).then(res => {
if (res.data.count > 0) {
Message.success(res.data.respMessage)
... ... @@ -707,6 +713,7 @@
flightDate: undefined,
awbh: undefined,
rcfdep: 'MT5202',
username: JSON.parse(sessionStorage.getItem('user')).username,
}
this.dialogDeleteVisible = true
this.respModel.carrier = row.carrier
... ... @@ -824,6 +831,9 @@
awbpiece: undefined,
awbweight: undefined,
rcfdep: 'MT5202',
user: {
username: JSON.parse(sessionStorage.getItem('user')).username
}
}
},
// 新增出港理货弹框
... ... @@ -846,6 +856,7 @@
// 新增出港理货请求
createData() {
this.$refs.tidyFormData.validate(valid => {
console.log(this.tidyModel)
if (valid) {
addMt520X(this.tidyModel).then(res => {
if (res.data.count > 0) {
... ... @@ -875,10 +886,16 @@
},
// 更新出港理货请求
updateData() {
let _this = this;
this.$refs.tidyFormData.validate(valid => {
if (valid) {
delete this.tidyModel.parent
delete this.tidyModel.children
_this.tidyModel.user= {
username : JSON.parse(sessionStorage.getItem('user')).username
}
updateMt520X(this.tidyModel).then(res => {
console.log(res.data)
if (res.data.count > 0) {
... ...