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

@ -1,7 +1,7 @@
NODE_ENV=development NODE_ENV=development
VUE_APP_PREVIEW=true VUE_APP_PREVIEW=true
//VUE_APP_API_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_SOCKET_BASE_URL=http://60.209.125.238:25805
VUE_APP_API_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 //VUE_APP_SOCKET_BASE_URL=http://127.0.0.1:5000

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

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

Loading…
Cancel
Save