From b48913d79bfacee79b65da8555073e650e3ff276 Mon Sep 17 00:00:00 2001 From: lilu Date: Thu, 16 Mar 2023 11:43:23 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E5=88=86=E9=A1=B5=E9=A1=B5?= =?UTF-8?q?=E7=A0=81=E8=AE=B0=E5=BD=95=EF=BC=8C=E5=88=86=E9=A1=B5=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E8=B0=83=E7=94=A8=E4=B8=80=E6=AC=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/main/BookingLedger/detail/index.vue | 6 ++- .../detail/modules/rightContent.vue | 1 + src/views/main/BookingLedger/list/index.vue | 54 ++++++++++--------- 3 files changed, 35 insertions(+), 26 deletions(-) diff --git a/src/views/main/BookingLedger/detail/index.vue b/src/views/main/BookingLedger/detail/index.vue index 4b684ca..c909a33 100644 --- a/src/views/main/BookingLedger/detail/index.vue +++ b/src/views/main/BookingLedger/detail/index.vue @@ -252,7 +252,8 @@ const initDetail = { weiTuoFang: '', ediAttn: '', ediAttnTel: '', - ediAttnMail: '' + ediAttnMail: '', + sendCode: '' }, // 分单信息未添加 hbList: [], @@ -728,7 +729,8 @@ export default { weiTuoFang: '', ediAttn: '', ediAttnTel: '', - ediAttnMail: '' + ediAttnMail: '', + sendCode: '' } } // 初始化箱型 累加 称重总重 diff --git a/src/views/main/BookingLedger/detail/modules/rightContent.vue b/src/views/main/BookingLedger/detail/modules/rightContent.vue index 46bd7e3..cdaa045 100644 --- a/src/views/main/BookingLedger/detail/modules/rightContent.vue +++ b/src/views/main/BookingLedger/detail/modules/rightContent.vue @@ -284,6 +284,7 @@ export default { }, computed: { locaService () { + if (!this.details) { return [] } return this.details.item.map((item, index) => { return item.code }) diff --git a/src/views/main/BookingLedger/list/index.vue b/src/views/main/BookingLedger/list/index.vue index 64c1144..46e62f0 100644 --- a/src/views/main/BookingLedger/list/index.vue +++ b/src/views/main/BookingLedger/list/index.vue @@ -528,7 +528,7 @@ export default { pagerConfig: { total: 0, currentPage: 1, - pageSize: 10, + pageSize: 50, pageSizes: [10, 20, 50, 100, 200, 500] }, columns: JSON.parse(JSON.stringify(initData.columns)), @@ -628,8 +628,9 @@ export default { this.formAllData = JSON.parse(JSON.stringify(initData.condAllData)) this.fromTableAllData = JSON.parse(JSON.stringify(initData.columnsAllData)) this.tableHeight = document.body.clientHeight - 300 + this.getList({}, true) + this.getConfigUser(true) this.getCarrier() - this.getConfigUser() }, onresize () { window.onresize = () => { @@ -758,23 +759,23 @@ export default { this.getList(queryParam) }, // 批量获取自定义数据 - getConfigUser() { + getConfigUser(isInit = false) { // 请求自定义: 查询表单 表头 页码 const query = { - typeArr: ['booking_list_cond', 'booking_list_column', 'booking_list_page'] + typeArr: ['booking_list_cond', 'booking_list_column'] } DjyUserConfigMulti(this.$qs.stringify(query, { arrayFormat: 'repeat' })).then(res => { res.data.map((item, index) => { switch (item.type) { case 'booking_list_cond': - this.setFormData(item) + this.setFormData(item, false, true) break case 'booking_list_column': this.setTableList(item) break - case 'booking_list_page': - this.setPageSize(item) - break + // case 'booking_list_page': + // this.setPageSize(item) + // break } }) }) @@ -839,7 +840,7 @@ export default { console.log(err) }) }, - setFormData (data, isReset = false) { + setFormData (data, isReset = false, isInit = false) { if (data && JSON.parse(data.configJson).length) { const arr = JSON.parse(data.configJson) const nowData = [] @@ -882,8 +883,8 @@ export default { } } }) - if (!isReset) { - this.getList(this.formRes, true) + if (!isReset && !isInit) { + this.getList(this.formRes) } const len = this.formData.length % 4 if (this.formData.length === 4 || this.formData.length > 4) { @@ -962,24 +963,24 @@ export default { }) }, handlePageChange({ currentPage, pageSize }) { - if (this.gridOptions.pagerConfig.pageSize !== pageSize) { - this.editPageSizeSave(pageSize) - } + // if (this.gridOptions.pagerConfig.pageSize !== pageSize) { + // this.editPageSizeSave(pageSize) + // } this.gridOptions.pagerConfig.currentPage = currentPage this.gridOptions.pagerConfig.pageSize = pageSize this.getList(this.formRes) }, editPageSizeSave(pageSize = 10) { - const data = { - pageSize: pageSize - } - DjyUserConfigAdd({ - type: 'booking_list_page', - configJson: JSON.stringify(data) - }).then(res => { - console.log('页码设置成功') - }) + // const data = { + // pageSize: pageSize + // } + // DjyUserConfigAdd({ + // type: 'booking_list_page', + // configJson: JSON.stringify(data) + // }).then(res => { + // console.log('页码设置成功') + // }) }, // form @@ -1159,9 +1160,14 @@ export default { const arr = this.formRes.MBLNO.split(/,|,/) query.MBLNO = arr.toString() } + if (isInit) { + console.log('这里新增初始化字段 - 等后台接口修改') + // 这里新增初始化字段 - 等后台接口修改 + query.firstFlag = true + } BookingOrderPage(query) .then(res => { - if (isInit) { this.getList(this.formRes) } + // if (isInit) { this.getList(this.formRes) } if (res.success) { let newBookingList = {} if (query.PageNo !== 1) {