dev
张同海 2 years ago
parent e5a8bd4e8a
commit 19c1d72877

@ -1,7 +1,7 @@
NODE_ENV=development
VUE_APP_PREVIEW=true
//VUE_APP_API_BASE_URL=http://60.209.125.238:25805
//VUE_APP_SOCKET_BASE_URL=http://60.209.125.238:25805
VUE_APP_API_BASE_URL=http://60.209.125.238:25805
VUE_APP_SOCKET_BASE_URL=http://60.209.125.238:25805
VUE_APP_API_BASE_URL=http://127.0.0.1:5000
VUE_APP_SOCKET_BASE_URL=http://127.0.0.1:5000
//VUE_APP_API_BASE_URL=http://127.0.0.1:5000
//VUE_APP_SOCKET_BASE_URL=http://127.0.0.1:5000

@ -742,22 +742,37 @@ export default {
// ---------- ----------
async insertEvent(row) {
const $table = this.$refs.xTable
const record = {
sex: '1',
date12: '2021-01-01'
}
const record = {}
const { row: newRow } = await $table.insertAt(record, row)
await $table.setActiveCell(newRow, 'name')
},
// ---------- ----------
saveEvent() {
// const $table = this.$refs.xTable
// const { insertRecords, removeRecords, updateRecords } = $table.getRecordset()
// console.log(
// `insertRecords=${insertRecords.length} removeRecords=${removeRecords.length} updateRecords=${updateRecords.length}`
// )
console.log(this.tableData)
BookingOrderContactSavebatch(this.tableData).then(res => {
const $table = this.$refs.xTable
const { fullData } = $table.getTableData()
fullData.forEach(item => {
item.WroleCode = ''
if (item.roleCode) {
item.roleCode.forEach(e => {
this.ContactType.forEach(item2 => {
if (e == item2.name) {
if (item.WroleCode) {
item.WroleCode = `${item.WroleCode}[${item2.code}]`
} else {
item.WroleCode = `[${item2.code}]`
}
}
})
})
}
})
let data = JSON.parse(JSON.stringify(fullData))
data.forEach(item => {
// if (item.WroleCode) {
item.roleCode = item.WroleCode
// }
})
BookingOrderContactSavebatch(data).then(res => {
console.log(res)
})
},
@ -1004,12 +1019,31 @@ export default {
if (this.details.customerid) {
this.customerType = type
this.customerVisible = true
console.log(this.details)
DjyCustomerdetail({ id: this.details.customerid }).then(res => {
console.log(res.data.contacts)
this.customerContactsData = res.data.contacts
})
BookingOrderContactPage({ id: this.details.customerid, pageSize: 999 }).then(res => {
res.data.rows.forEach(item => {
let WroleCode = []
if (item.roleCode) {
item.roleCode.split(']').forEach(e => {
if (e) {
e.split('[').forEach(i => {
if (i) {
this.ContactType.forEach(item2 => {
if (item2.code == i) {
WroleCode.push(item2.name)
}
})
}
})
}
})
}
item.roleCode = WroleCode
})
this.tableData = res.data.rows
})
} else {

@ -101,7 +101,7 @@
<template slot="footer">
<a-button @click="handleModelCancel"></a-button>
<a-button type="primary" @click="handleModelSubmit('save')">EDI</a-button>
<a-button type="primary" @click="handleModelSubmit('send')">EDT</a-button>
<a-button type="primary" @click="handleModelSubmit('send')">EDI</a-button>
</template>
</template>
@ -419,7 +419,7 @@ import {
SampleBillPdf,
TxxpLink,
ExcuteRulesOceanBooking,
BookingOrderPrint,
BookingOrderPrint
} from '@/api/modular/main/BookingLedger'
export default {
@ -428,8 +428,8 @@ export default {
type: Object,
default: () => {
return {}
},
},
}
}
},
data() {
return {
@ -444,14 +444,14 @@ export default {
useForwarderCode: false,
forwarderCode: '',
forwarderName: '',
fileRole: '',
fileRole: 9,
sendType: 'B',
send: false,
send: false
},
radioStyle: {
display: 'block',
height: '30px',
lineHeight: '30px',
lineHeight: '30px'
},
//
initCabinFrom: {
@ -465,15 +465,15 @@ export default {
orderUrl: {
urlTxxp: '',
urlVgm: '',
urlVgmSi: '',
urlVgmSi: ''
},
remark: '',
remark: ''
},
//
hsaBillPdf: false,
billPdf: '',
billPdfTip: '',
templateType: [],
templateType: []
}
},
mounted() {
@ -486,14 +486,14 @@ export default {
// ========== ==========
FnCilckTemplateType(type) {
BookingOrderPrint({ type, bookingId: this.id })
.then((res) => {
.then(res => {
if (res.success) {
this.$message.success('打印成功')
} else {
this.$message.error(res.message)
}
})
.catch((err) => {
.catch(err => {
console.log(err)
})
},
@ -551,7 +551,7 @@ export default {
this.bookingModelFrom.send = type === 'send'
this.bookingModelFrom.orderNo = this.details.mblno
SendBookingOrClosingEDI(this.bookingModelFrom)
.then((res) => {
.then(res => {
//
if (res.success) {
this.$message.success(`${type === 'send' ? '发送' : '保存'}成功`)
@ -560,7 +560,7 @@ export default {
this.$message.error(res.message)
}
})
.catch((err) => {
.catch(err => {
console.log(err)
})
},
@ -573,9 +573,9 @@ export default {
useForwarderCode: false,
forwarderCode: '',
forwarderName: '',
fileRole: '',
fileRole: 9,
sendType: 'B',
send: false,
send: false
}
},
// vgm /
@ -583,9 +583,9 @@ export default {
let content = null
const _this = this
if (type === 'vgm') {
content = (h) => <div>确认发送VGM吗?</div>
content = h => <div>确认发送VGM吗?</div>
} else if (type === 'paper') {
content = (h) => <div>确认发送下货纸吗?</div>
content = h => <div>确认发送下货纸吗?</div>
}
this.$confirm({
title: '温馨提示',
@ -601,34 +601,34 @@ export default {
onCancel() {
console.log('Cancel')
},
class: 'test',
class: 'test'
})
},
sendXHZ() {
SendXHZ(this.id)
.then((res) => {
.then(res => {
if (res.success) {
this.$message.success(`下货纸发送成功`)
} else {
this.$message.error(res.message)
}
})
.catch((err) => {
.catch(err => {
console.log(err)
})
},
vgmSend() {
VgmSend(this.id)
.then((res) => {
.then(res => {
if (res.success) {
this.$message.success(`VGM发送成功`)
} else {
this.$message.error(res.message)
}
})
.catch((err) => {
.catch(err => {
console.log(err)
})
},
@ -636,7 +636,7 @@ export default {
//
getLetterYard() {
LetterYard(this.id)
.then((res) => {
.then(res => {
console.log('== 放舱信息 ==', res.data)
if (res.success) {
this.initCabinFrom = res.data
@ -644,7 +644,7 @@ export default {
this.$message.error(res.message)
}
})
.catch((err) => {
.catch(err => {
console.log(err)
})
},
@ -652,7 +652,7 @@ export default {
//
getSampleBill() {
SampleBill(this.id)
.then((res) => {
.then(res => {
console.log('== 样单信息 ==', res.data)
if (res.success) {
this.initCabinFrom = res.data
@ -660,7 +660,7 @@ export default {
this.$message.error(res.message)
}
})
.catch((err) => {
.catch(err => {
console.log(err)
})
},
@ -668,7 +668,7 @@ export default {
// VGM
getVgmLink() {
VgmLink(this.id)
.then((res) => {
.then(res => {
console.log('== VGM信息 ==', res.data)
if (res.success) {
// this.initCabinFrom = res.data
@ -676,14 +676,14 @@ export default {
this.$message.error(res.message)
}
})
.catch((err) => {
.catch(err => {
console.log(err)
})
},
sampleBillPdf() {
SampleBillPdf(this.id)
.then((res) => {
.then(res => {
if (res.success) {
this.hsaBillPdf = true
this.billPdf = res.data.description
@ -692,7 +692,7 @@ export default {
this.billPdfTip = res.message
}
})
.catch((err) => {
.catch(err => {
console.log(err)
})
},
@ -767,12 +767,12 @@ export default {
...{
closeDocTime: this.details.closedocdate,
closingTime: this.details.closingdate,
vgmTime: this.details.closevgmdate,
},
vgmTime: this.details.closevgmdate
}
}
}
SaveBookingLetteryard(this.initCabinFrom)
.then((res) => {
.then(res => {
if (res.success) {
this.$message.success('保存成功')
// this.initCabinFrom = res.data
@ -780,7 +780,7 @@ export default {
this.$message.error(res.message)
}
})
.catch((err) => {
.catch(err => {
console.log(err)
})
},
@ -788,14 +788,14 @@ export default {
// /
saveBookingSampleBill() {
SaveBookingSampleBill(this.initCabinFrom)
.then((res) => {
.then(res => {
if (res.success) {
this.$message.success('保存成功')
} else {
this.$message.error(res.message)
}
})
.catch((err) => {
.catch(err => {
console.log(err)
})
},
@ -803,21 +803,21 @@ export default {
//
sendLetterYard() {
SendLetterYard(this.id)
.then((res) => {
.then(res => {
if (res.success) {
this.$message.success('发送成功')
} else {
this.$message.error(res.message)
}
})
.catch((err) => {
.catch(err => {
console.log(err)
})
},
TxxpLink() {
TxxpLink(this.id)
.then((res) => {
.then(res => {
if (res.success) {
console.log(res.data)
this.copyFun(res.data)
@ -825,25 +825,25 @@ export default {
this.$message.error(res.message)
}
})
.catch((err) => {
.catch(err => {
console.log(err)
})
},
checkFun() {
ExcuteRulesOceanBooking(this.id)
.then((res) => {
.then(res => {
if (res.success) {
this.$emit('rules', res.data.rows)
} else {
this.$message.error(res.message)
}
})
.catch((err) => {
.catch(err => {
console.log(err)
})
},
},
}
}
}
</script>
<style lang="less" scoped>

Loading…
Cancel
Save