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 @@ 新增备注
-
+
{{ remark.remark }}
{{ remark.updatedTime || remark.createdTime }} {{ remark.updatedUserName }}
@@ -57,7 +57,7 @@
-
+
暂无内容
@@ -67,7 +67,7 @@
附件
新增附件 -
+
@@ -89,7 +89,7 @@ {{ file.createdTime }}
-
+
暂无附件
@@ -100,10 +100,10 @@ 订单及货运动态
-
+
{{ bookingLog.opTime }} @@ -116,25 +116,12 @@
{{ child.opTime }} - {{ child.status }} 箱号:{{ child.cntrno }} + {{ child.status }} 箱号:{{ child.cntrno }}
- -
+
暂无动态
@@ -150,7 +137,7 @@ 修改人 修改时间
-
+
{{ log.createdUserName }} @@ -237,17 +224,11 @@ diff --git a/src/views/main/BookingLedger/list/index.vue b/src/views/main/BookingLedger/list/index.vue index c4b9c6f..8664bed 100644 --- a/src/views/main/BookingLedger/list/index.vue +++ b/src/views/main/BookingLedger/list/index.vue @@ -627,15 +627,10 @@ export default { this.formAllData = JSON.parse(JSON.stringify(initData.condAllData)) this.fromTableAllData = JSON.parse(JSON.stringify(initData.columnsAllData)) this.tableHeight = document.body.clientHeight - 300 - // console.log('=== 列表创建 ===') - this.getFormData() - this.getTableList() - this.getPageSize() this.getCarrier() - // this.getConfigUser() + this.getConfigUser() }, onresize () { - // console.log('=== 列表加载完成 ===') window.onresize = () => { this.screenWidth = document.body.clientWidth } @@ -745,10 +740,6 @@ export default { this.tableOrderType = '' this.gridOptions.data = [] this.getList(queryParam) - if (Object.keys(queryParam).length === 0) { - this.getFormData() - } - this.getTableList() }, // 批量获取自定义数据 getConfigUser() { @@ -1009,38 +1000,6 @@ export default { }) }) }, - // 添加获取表单下拉列表数据 - getTableList() { - DjyUserConfigGet({ type: 'booking_list_column' }).then(res => { - if (res.data && JSON.parse(res.data.configJson).length) { - this.gridOptions.columns = JSON.parse(res.data.configJson) - this.formTableData = JSON.parse(res.data.configJson) - const nowTableArr = this.formTableData.map((item, index) => { - return item.field - }) - const moreTableArr = [] - this.fromTableAllData.map((item, index) => { - if (!nowTableArr.includes(item.field)) { - moreTableArr.push(item) - } - }) - this.formMoreTableData = moreTableArr - this.$forceUpdate() - } else { - const nowTableArr = this.formTableData.map((item, index) => { - return item.field - }) - const moreTableArr = [] - this.fromTableAllData.map((item, index) => { - if (!nowTableArr.includes(item.field)) { - moreTableArr.push(item) - } - }) - this.formMoreTableData = moreTableArr - this.$forceUpdate() - } - }) - }, handlePageChange({ currentPage, pageSize }) { if (this.gridOptions.pagerConfig.pageSize !== pageSize) { this.editPageSizeSave(pageSize) @@ -1062,16 +1021,6 @@ export default { }) }, - getPageSize() { - DjyUserConfigGet({ type: 'booking_list_page' }).then(res => { - if (res.data && JSON.parse(res.data.configJson)) { - this.gridOptions.pagerConfig.pageSize = JSON.parse(res.data.configJson).pageSize - this.getList(this.formRes) - this.$forceUpdate() - } - }) - }, - // form toggleAdvanced() { this.advanced = !this.advanced diff --git a/src/views/main/Customer/index.vue b/src/views/main/Customer/index.vue index 762d45c..c641740 100644 --- a/src/views/main/Customer/index.vue +++ b/src/views/main/Customer/index.vue @@ -516,6 +516,11 @@ export default { } } +