修改BUG

dev
lilu 2 years ago
parent e3b2a6e666
commit 0bcc51678a

@ -378,6 +378,17 @@ export function SendLetterYard(parameter) {
})
}
/**
* 删除放舱
*/
export function DeleteLetterYard(parameter) {
return axios({
url: '/BookingLetteryard/LetterYardDelete',
method: 'post',
data: parameter
})
}
/**
* 样单
*/
@ -493,9 +504,9 @@ export function DjyCustomerdetail(parameter) {
* 批量保存关系人同时新增删除修改
* @params Name
*/
export function BookingOrderContactSavebatch(parameter) {
export function BookingOrderContactSavebatch(id, parameter) {
return axios({
url: '/BookingOrderContact/savebatch',
url: `/BookingOrderContact/savebatch?bookingId=${id}`,
method: 'post',
data: parameter
})

@ -268,7 +268,6 @@ export default {
watch: {
details: {
handler(nval, oval) {
// console.log('', nval)
this.$emit('changeDetail', {
detail: nval,
type: 'ediMore'

@ -111,7 +111,6 @@ export default {
sedOrderList: {
handler (nval, oval) {
if (nval.length > 0) {
console.log(nval)
if (!nval[this.editIndex].bookingEDIExt) {
nval[this.editIndex].bookingEDIExt = {
weiTuoFang: '',
@ -141,6 +140,7 @@ export default {
},
created() {
if (this.sedOrderList.length > 0) {
console.log('=== 分单加载 created ===')
const data = JSON.parse(JSON.stringify(this.sedOrderList[0]))
if (!data.bookingEDIExt) {
data.bookingEDIExt = {
@ -153,6 +153,11 @@ export default {
this.editDetails = data
}
},
mounted() {
// setTimeout(() => {
// this.$message.destroy()
// }, 1500)
},
methods: {
addSedOrder () {
if (this.isAdd) {
@ -206,7 +211,6 @@ export default {
},
bookingOrderUpdate () {
console.log('保存', this.editDetails)
if (!this.editDetails.hblno) {
this.$message.error('请输入分提单号')
return false
@ -231,7 +235,6 @@ export default {
},
bookingOrderAdd () {
console.log('新增', this.editDetails)
if (!this.editDetails.hblno) {
this.$message.error('请输入分提单号')
return false

@ -2,7 +2,7 @@
<div class="booking-detail">
<a-tabs
size="large"
:class="Showtabs ? 'Showtabs' : ''"
:class="!Showtabs ? 'Showtabs' : ''"
:tabBarStyle="tabBarStyle"
:activeKey="tabActiveKey"
@change="changeTab"
@ -75,7 +75,7 @@
</a-col>
</a-row>
</a-tab-pane>
<a-tab-pane key="2" tab="分单信息" v-if="bookingDetails.hbList && bookingDetails.hbList.length > 0">
<a-tab-pane key="2" tab="分单信息" v-show="bookingDetails.hbList && bookingDetails.hbList.length > 0">
<sedOrder
ref="sedOrder"
:details="bookingDetails"
@ -244,19 +244,20 @@ export default {
moreStr: '',
tabActiveKey: '1',
historyData: {},
Showtabs: false
}
},
computed: {
...mapGetters(['bookingList', 'needSavePages']),
Showtabs() {
let Rdata = true
if (this.bookingDetails.hbList && this.bookingDetails.hbList.length) {
Rdata = false
} else {
Rdata = true
}
return Rdata
}
// Showtabs() {
// let Rdata = true
// if (this.bookingDetails.hbList && this.bookingDetails.hbList.length) {
// Rdata = false
// } else {
// Rdata = true
// }
// return Rdata
// }
},
watch: {
bookingDetails: {
@ -335,114 +336,12 @@ export default {
this.bookingDetails = initDetail
this.excuteRules = []
this.excuteRulesType = ''
this.Showtabs = false
if (this.id) {
this.isAdd = false
this.getDetail()
} else {
this.isAdd = true
// this.bookingDetails = {
// id: 0,
// parentId: 0,
// //
// customername: '',
// customerid: '',
// carrier: '',
// carrierid: this.type,
// forwarder: '',
// pono: '',
// mblno: '',
// hblno: '',
// bookingno: '',
// contractno: '',
// vessel: '',
// voyno: '',
// voynoinner: '',
// lanecode: '',
// etd: '',
// atd: '',
// lanename: '',
// shipagency: '',
// sale: '',
// op: '',
// doc: '',
// custservice: '',
// //
// shipper: '',
// consignee: '',
// notifyparty: '',
// yard: '',
// customser: '',
// trucker: '',
// agentid: '',
// eta: '',
// closingdate: '',
// closedocdate: '',
// closevgmdate: '',
// portload: '',
// portloadid: '',
// transport: '',
// transportid: '',
// portdischarge: '',
// portdischargeid: '',
// destination: '',
// destinationid: '',
// placedelivery: '',
// placedeliveryid: '',
// placereceipt: '',
// placereceiptid: '',
// pkgs: 0,
// kindpkgs: '',
// kgs: 0,
// cbm: 0,
// //
// marks: '',
// cargoid: '',
// hscode: '',
// description: '',
// totalno: '',
// //
// issuetype: '',
// issuedate: '',
// issueplace: '',
// issueplaceid: '',
// nobill: 'THREE',
// copynobilll: 'THREE',
// prepardat: '',
// payableat: '',
// blfrt: '',
// thirdpayaddr: '',
// service: '',
// reeferf: '',
// tempset: '',
// tempid: '',
// tempmin: '',
// tempmax: '',
// humidity: '',
// dclass: '',
// dunno: '',
// dpage: '',
// dlabel: '',
// linkman: '',
// //
// soremark: '',
// siremark: '',
// //
// ctnInputs: [],
// // edi (edi)
// weituo: '',
// freightpayer: '',
// scaccode: '',
// itncode: '',
// iscontainersoc: 0,
// bookingEDIExt: {
// weiTuoFang: '',
// ediAttn: '',
// ediAttnTel: '',
// ediAttnMail: ''
// },
// //
// hbList: []
// }
this.bookingDetails.carrierid = this.type
this.bookingDetails.carrier = this.enmuCarrier(this.type)
}
@ -489,6 +388,9 @@ export default {
res.data.mblno = ''
this.isAdd = true
}
if (res.data.hbList && res.data.hbList.length > 0) {
this.Showtabs = true
}
if (!res.data.bookingEDIExt) {
res.data.bookingEDIExt = {
weiTuoFang: '',
@ -526,7 +428,15 @@ export default {
this.isCopy = false
this.isAdd = false
this.$message.success('保存成功')
this.init()
if (this.$route.query.mblno === this.bookingDetails.mblno) {
this.init()
} else {
this.$router.replace({
name: 'BookingDetail',
query: { id: this.id, type: this.bookingDetails.carrierid, noOpenTab: true, mblno: this.bookingDetails.mblno }
})
}
// this.init()
this.$forceUpdate()
} else {
this.$message.error(res.message)
@ -552,7 +462,7 @@ export default {
this.$message.success('保存成功')
this.$router.replace({
name: 'BookingDetail',
query: { id: res.data, type: this.bookingDetails.carrierid, noOpenTab: true }
query: { id: res.data, type: this.bookingDetails.carrierid, noOpenTab: true, mblno: this.bookingDetails.mblno }
})
this.$forceUpdate()
} else {
@ -650,6 +560,7 @@ export default {
this.$message.error('请先保存主单')
return false
}
// this.$message.loading('...')
const data = JSON.parse(JSON.stringify(this.bookingDetails))
data.isNoSave = true
data.hblno = ''
@ -658,6 +569,7 @@ export default {
data.notifyparty = ''
this.bookingDetails.hbList = [data]
this.tabActiveKey = '2'
this.Showtabs = true
},
changeHBFun (data) {
const arr = data.map((item, index) => {
@ -668,7 +580,6 @@ export default {
} else {
this.checkSaveFun({ type: 'hbList', hasChange: false })
}
},
checkSaveFun (data) {
const lastPages = this.needSavePages
@ -682,7 +593,6 @@ export default {
const key = this.$route.fullPath
this.$set(lastPages, key, $data)
this.setNeedSavePages(lastPages)
console.log(' ==== > 父组件监听到总数据改变: ', key, $data, lastPages, this.needSavePages)
}
}
}

@ -31,7 +31,6 @@
:allowClear="true"
:data-source="carrierDataArr"
v-model="details.carrier"
@select="carrierSelect"
@change="carrierChange"
/> -->
@ -100,16 +99,16 @@
<a-input :allowClear="true" v-model="details.bookingno" />
</a-form-item>
</a-col>
<template v-if="type === 'CMA' || type === 'MSC'">
<template v-if="details.carrierid === 'ESL'">
<a-col :xs="12" :sm="12" :md="12" :lg="8" :xl="6">
<a-form-item class="from-label" label="号" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-form-item class="from-label" label="EP号" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input :allowClear="true" v-model="details.contractno" />
</a-form-item>
</a-col>
</template>
<template v-else-if="type === 'ESL'">
<template v-else>
<a-col :xs="12" :sm="12" :md="12" :lg="8" :xl="6">
<a-form-item class="from-label" label="EP号" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-form-item class="from-label" label="号" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input :allowClear="true" v-model="details.contractno" />
</a-form-item>
</a-col>
@ -141,37 +140,37 @@
<a-input :allowClear="true" v-model="details.voyno" />
</a-form-item>
</a-col>
<template v-if="type === 'CMA' || type === 'MSC'">
<template v-if="details.carrierid === 'ESL'">
<a-col :xs="12" :sm="12" :md="12" :lg="8" :xl="6">
<a-form-item
class="from-label"
label="内部航次"
label="航线代码"
:labelCol="labelCol"
:wrapperCol="wrapperCol"
has-feedback
>
<auto-complete
:allowClear="true"
class="customer-input"
v-model="details.voynoinner"
:data-source="voynoinnerDataArr"
@select="voynoinnerSelect"
@change="voynoinnerChange"
@focus="voynoinnerChange"
/>
<a-input :allowClear="true" v-model="details.lanecode" />
</a-form-item>
</a-col>
</template>
<template v-else-if="type === 'ESL'">
<template v-else>
<a-col :xs="12" :sm="12" :md="12" :lg="8" :xl="6">
<a-form-item
class="from-label"
label="航线代码"
label="内部航次"
:labelCol="labelCol"
:wrapperCol="wrapperCol"
has-feedback
>
<a-input :allowClear="true" v-model="details.lanecode" />
<auto-complete
:allowClear="true"
class="customer-input"
v-model="details.voynoinner"
:data-source="voynoinnerDataArr"
@select="voynoinnerSelect"
@change="voynoinnerChange"
@focus="voynoinnerChange"
/>
</a-form-item>
</a-col>
</template>
@ -234,7 +233,7 @@
/>
</a-form-item>
</a-col>
<template v-if="type === 'ESL'">
<template v-if="details.carrierid === 'ESL'">
<a-col :xs="12" :sm="12" :md="12" :lg="8" :xl="6">
<a-form-item
class="from-label"
@ -808,7 +807,8 @@ export default {
item.roleCode = item.WroleCode
// }
})
BookingOrderContactSavebatch(data).then(res => {
debugger
BookingOrderContactSavebatch(this.$route.query.id, data).then(res => {
if (res.success) {
this.$message.success('保存成功')
} else {
@ -860,7 +860,6 @@ export default {
this.details.customerid = this.customerData[index].id
},
customerChange(value) {
console.log(value)
// this.getCustomer(value)
this.getDjyCustomerpage(value, 'customer', 'consignor')
},
@ -893,7 +892,6 @@ export default {
this.carrierSelectData = arr
this.$forceUpdate()
}
console.log(this.carrierSelectData)
})
.catch(err => {
console.log(err)
@ -907,13 +905,11 @@ export default {
},
//
carrierChange(value) {
console.log(value)
// this.getCarrier(value)
},
handleCarrierChange(data) {
this.carrierSelectData.forEach(item => {
if (item.code == data) {
console.log(item)
this.details.carrier = item.cnName
}
})
@ -1074,7 +1070,6 @@ export default {
if (this.details.customerid) {
this.customerType = type
this.customerVisible = true
DjyCustomerdetail({ id: this.details.customerid }).then(res => {
console.log(res.data.contacts)
this.customerContactsData = res.data.contacts

@ -147,6 +147,7 @@
<a-select
class="customer-input"
:default-value="details.yard"
v-model="details.yard"
@change="handleYardChange"
show-search
:filter-option="filterOption"
@ -305,7 +306,7 @@
@select="portloadSelect"
@change="portloadChange"
@focus="portloadChange"
/>
></auto-complete>
</a-form-item>
</a-col>
<a-col :span="12">
@ -455,7 +456,7 @@
@select="placereceiptSelect"
@change="placereceiptChange"
@focus="placereceiptChange"
/>
></auto-complete>
</a-form-item>
</a-col>
<a-col :span="12">
@ -1025,6 +1026,7 @@ export default {
.then(res => {
if (res.code === 200) {
this[`${type}Data`] = res.data
console.log('== 装货港/收货地 ==', type, this[`${type}Data`])
this.$forceUpdate()
}
})

@ -257,7 +257,7 @@
has-feedback
>
<div class="box-flex">
<a-input style="width:1000px !important;" :allowClear="true" v-model="initCabinFrom.orderUrl.urlVgm" />
<a-input style="width:1000px !important; text-align: left;" :allowClear="true" v-model="initCabinFrom.orderUrl.urlVgm" />
<span style="margin-left:7px;"><i class="iconfont icon-fuzhi2"><!--复制--></i></span>
</div>
</a-form-item>
@ -384,12 +384,13 @@
has-feedback
>
<div class="box-flex">
<a-input style="width:1000px !important;" :allowClear="true" v-model="initCabinFrom.remark" />
<a-input style="width:1000px !important; text-align: left;" :allowClear="true" v-model="initCabinFrom.remark" />
</div>
</a-form-item>
</a-col>
</div>
</template>
<!-- ==== -->
<template v-if="modelType === 'ladingBill'">
<iframe class="pdf-view" src="billPdf" width="100%" height="100%" v-if="hsaBillPdf"></iframe>
<div class="no-pdf" v-else>{{ billPdfTip }}</div>
@ -403,7 +404,7 @@
type="primary"
@click="removeModel"
:loading="DelLoading"
v-if="['initCabin', 'vgmlink'].includes(modelType)"
v-if="['initCabin'].includes(modelType)"
>
删除
</a-button>
@ -504,7 +505,8 @@ import {
BookingOrderOcrGetImg,
BookingOrderOcrGetText,
BookingOrderPrintTemplateList,
DownloadBookingOrClosingEDI
DownloadBookingOrClosingEDI,
DeleteLetterYard
} from '@/api/modular/main/BookingLedger'
export default {
@ -760,6 +762,23 @@ export default {
} else if (['vgm', 'paper'].includes(type)) {
this.openDialog(type)
}
if (['initCabin', 'ladingBill', 'vgmlink'].includes(type)) {
this.initCabinFrom = {
toName: '',
attn: '',
attnTel: '',
attnMail: '',
fromName: '',
fromTel: '',
fromMail: '',
orderUrl: {
urlTxxp: '',
urlVgm: '',
urlVgmSi: ''
},
remark: ''
}
}
if (type === 'initCabin') {
this.getLetterYard()
} else if (type === 'ladingBill') {
@ -947,10 +966,20 @@ export default {
// VGM
getVgmLink() {
VgmLink(this.id)
LetterYard(this.id)
.then(res => {
if (res.success) {
// this.initCabinFrom = res.data
this.initCabinFrom = { ...this.initCabinFrom, ...res.data }
// VgmLink(this.id)
// .then(oRes => {
// if (oRes.success) {
// } else {
// this.$message.error(oRes.message)
// }
// })
// .catch(oErr => {
// console.log(oErr)
// })
} else {
this.$message.error(res.message)
}
@ -1032,7 +1061,21 @@ export default {
removeModel() {
if (this.modelType === 'initCabin') {
//
console.log('暂无接口')
debugger
this.DelLoading = true
DeleteLetterYard(this.id)
.then(res => {
if (res.success) {
this.$message.success('删除成功')
this.handleModelCancel()
} else {
this.$message.error(res.message)
}
this.DelLoading = false
})
.catch(() => {
this.DelLoading = false
})
} else if (this.modelType === 'vgmlink') {
// VGM
console.log('暂无接口')

@ -210,6 +210,7 @@
>
<a-button> <a-icon type="upload" /> 选择文件 </a-button>
</a-upload>
<span class="format">支持格式xlsxlsxpdftxtpms</span>
</div>
<div class="uplad-bg uplad-type">
<span class="tip">2. 选择文件类型</span>
@ -425,7 +426,7 @@ export default {
},
handleUpload() {
const { upFileList, attachCode, attachName } = this
if (!upFileList) {
if (upFileList.length === 0) {
this.$message.error('请上传文件')
return false
}
@ -1040,10 +1041,22 @@ export default {
border: 1px dashed #ccc;
padding: 15px;
display: flex;
position: relative;
.tip {
width: 140px;
line-height: 32px;
}
.format{
color: #999;
// color: @primary-color;
// opacity: .8;
font-size: 12px;
float: right;
margin-right: 20px;
position: absolute;
top: 24px;
right: 0;
}
}
.uplad-type {
margin-top: 20px;

Loading…
Cancel
Save