diff --git a/src/api/modular/main/BookingLedger.js b/src/api/modular/main/BookingLedger.js index ee41f6b..e670de7 100644 --- a/src/api/modular/main/BookingLedger.js +++ b/src/api/modular/main/BookingLedger.js @@ -715,9 +715,8 @@ export function DjyCustomerContacts(parameter) { // 删除备注 export function BookingOrderDeleteRemark(parameter) { return axios({ - url: '/BookingOrder/DeleteRemark', - method: 'post', - data: parameter + url: '/BookingOrder/DeleteRemark?Id=' + parameter, + method: 'post' }) } @@ -746,3 +745,12 @@ export function DjyUserConfigMulti(parameter) { method: 'get' }) } + +// 获取多个自定义消息 +export function GetAllData(parameter) { + return axios({ + url: '/BookingOrder/GetAllData', + method: 'get', + params: parameter + }) +} diff --git a/src/views/main/BookingLedger/detail/index.vue b/src/views/main/BookingLedger/detail/index.vue index 06b8902..5eaeaf4 100644 --- a/src/views/main/BookingLedger/detail/index.vue +++ b/src/views/main/BookingLedger/detail/index.vue @@ -110,6 +110,7 @@ :excuteRulesType="excuteRulesType" @changeDetail="changeDetailFun" @rules="getRules" + @upDateRight="upDateRightFun" > @@ -146,7 +147,8 @@ import { // BookingOrderAdd, // BookingOrderAddOrUpdate, BookingOrderSave, - getDjyTenantConfig + getDjyTenantConfig, + GetAllData } from '@/api/modular/main/BookingLedger' import { mapActions, mapGetters } from 'vuex' import rules from './rules' @@ -253,7 +255,13 @@ const initDetail = { ediAttnMail: '' }, // 分单信息未添加 - hbList: [] + hbList: [], + // 新增右侧内容 + remark: [], + file: [], + log: [], + item: [], + statuslog: [] } export default { name: 'BookingDetail', @@ -314,11 +322,9 @@ export default { ...mapGetters(['bookingList', 'needSavePages', 'hasbookingDetail']) }, created() { - // console.log('== 详情页 - created ==') this.init() }, mounted() { - // console.log('== 详情页 - mounted ==') window.addEventListener( 'scroll', () => { @@ -584,6 +590,7 @@ export default { if (this.id) { this.isAdd = false this.getDetail() + this.getRightAll() } else { this.isAdd = true this.bookingDetails.carrierid = this.type @@ -704,62 +711,85 @@ export default { setDeatilsFun(res) { if (this.$route.query.isCopy) { - res.data.mblno = '' - delete res.data.id - this.isAdd = true - res.data.ctnInputs.map((item, index) => { - delete item.id - }) - } - // debugger - if (res.data.hbList && res.data.hbList.length > 0) { - this.Showtabs = true + res.data.mblno = '' + delete res.data.id + this.isAdd = true + res.data.ctnInputs.map((item, index) => { + delete item.id + }) + } + // debugger + if (res.data.hbList && res.data.hbList.length > 0) { + this.Showtabs = true + } + if (!res.data.bookingEDIExt) { + res.data.bookingEDIExt = { + weiTuoFang: '', + ediAttn: '', + ediAttnTel: '', + ediAttnMail: '' } - if (!res.data.bookingEDIExt) { - res.data.bookingEDIExt = { - weiTuoFang: '', - ediAttn: '', - ediAttnTel: '', - ediAttnMail: '' + } + // 初始化箱型 累加 称重总重 + if (res.data.ctnInputs.length > 0) { + res.data.ctnInputs.map((item, index) => { + if (item.weightype === '累加') { + item.weighkgs = this.calc(Number(item['kgs']), Number(item['tareweight']), '+') } + }) + } + if (res.data.ctnInputs.length > 0) { + res.data.ctnInputs.map((item, index) => { + item.pkgs = item.pkgs ? item.pkgs : '' + item.kgs = item.kgs ? item.kgs : '' + item.cbm = item.cbm ? item.cbm : '' + item.tareweight = item.tareweight ? item.tareweight : '' + item.weighkgs = item.weighkgs ? item.weighkgs : '' + }) + } + if (res.data.hbList.length > 0) { + res.data.hbList.map((item, index) => { + if (item.ctnInputs.length > 0) { + item.ctnInputs.map((citem, cindex) => { + citem.pkgs = citem.pkgs ? citem.pkgs : '' + citem.kgs = citem.kgs ? citem.kgs : '' + citem.cbm = citem.cbm ? citem.cbm : '' + citem.tareweight = citem.tareweight ? citem.tareweight : '' + citem.weighkgs = citem.weighkgs ? citem.weighkgs : '' + }) + } + }) + } + res.data.feeself = !!res.data.feeself + this.$set(this, 'bookingDetails', { ...this.bookingDetails, ...res.data }) + console.log('== 获取订舱详情 ==', this.bookingDetails) + // this.getRightAll() + setTimeout(() => { + this.inChildLoading = false + this.checkSaveFun({ type: 'details', hasChange: false }) + }, 1500) + this.$forceUpdate() + }, + + getRightAll () { + GetAllData({ + bookingId: this.id + }) + .then(res => { + if (res.success) { + this.$set(this, 'bookingDetails', { ...this.bookingDetails, ...res.data }) + console.log('== 修改订舱右侧内容 ==', this.bookingDetails) + } else { + console.log(res.message) } - // 初始化箱型 累加 称重总重 - if (res.data.ctnInputs.length > 0) { - res.data.ctnInputs.map((item, index) => { - if (item.weightype === '累加') { - item.weighkgs = this.calc(Number(item['kgs']), Number(item['tareweight']), '+') - } - }) - } - if (res.data.ctnInputs.length > 0) { - res.data.ctnInputs.map((item, index) => { - item.pkgs = item.pkgs ? item.pkgs : '' - item.kgs = item.kgs ? item.kgs : '' - item.cbm = item.cbm ? item.cbm : '' - item.tareweight = item.tareweight ? item.tareweight : '' - item.weighkgs = item.weighkgs ? item.weighkgs : '' - }) - } - if (res.data.hbList.length > 0) { - res.data.hbList.map((item, index) => { - if (item.ctnInputs.length > 0) { - item.ctnInputs.map((citem, cindex) => { - citem.pkgs = citem.pkgs ? citem.pkgs : '' - citem.kgs = citem.kgs ? citem.kgs : '' - citem.cbm = citem.cbm ? citem.cbm : '' - citem.tareweight = citem.tareweight ? citem.tareweight : '' - citem.weighkgs = citem.weighkgs ? citem.weighkgs : '' - }) - } - }) - } - res.data.feeself = !!res.data.feeself - this.$set(this, 'bookingDetails', res.data) - setTimeout(() => { - this.inChildLoading = false - this.checkSaveFun({ type: 'details', hasChange: false }) - }, 1500) - this.$forceUpdate() + }) + .catch(err => { + console.log(err) + }) + }, + + upDateRightFun () { + this.getRightAll() }, changeDetailFun(data) { diff --git a/src/views/main/BookingLedger/detail/modules/rightContent.vue b/src/views/main/BookingLedger/detail/modules/rightContent.vue index e8f2c2c..6386396 100644 --- a/src/views/main/BookingLedger/detail/modules/rightContent.vue +++ b/src/views/main/BookingLedger/detail/modules/rightContent.vue @@ -47,7 +47,7 @@ 新增备注