From ccc23c8701d13180e0e68a648e53e1c9d66284a6 Mon Sep 17 00:00:00 2001 From: lilu Date: Thu, 6 Apr 2023 17:23:30 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=B0=E8=B4=A6=EF=BC=8C=E5=A4=8D=E5=88=B6?= =?UTF-8?q?=EF=BC=8C=E8=88=AA=E7=BA=BF=E7=AE=A1=E7=90=86=E7=AD=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/modules/booking.js | 2 + .../detail/components/selectView.vue | 7 +- src/views/main/BookingLedger/detail/index.vue | 41 +++++---- .../detail/modules/basicInfo.vue | 88 +++++++++++++++---- .../detail/modules/mailingInfo.vue | 24 ++++- .../BookingLedger/detail/modules/sedOrder.vue | 28 +++--- .../BookingLedger/detail/style/basicInfo.less | 4 + .../detail/style/mailingInfo.less | 1 + src/views/main/BookingLedger/list/index.vue | 58 ++++++------ 9 files changed, 184 insertions(+), 69 deletions(-) diff --git a/src/store/modules/booking.js b/src/store/modules/booking.js index 33066a9..2b6e88f 100644 --- a/src/store/modules/booking.js +++ b/src/store/modules/booking.js @@ -34,6 +34,7 @@ const booking = { docInitList: [], // 单证 custserviceInitList: [], // 客服 routeInitList: [], // 航线操作 + lineManageInitList: [], // 收发通信息 customserInitList: [], // 报关行 truckerInitList: [], // 车队 @@ -293,6 +294,7 @@ const booking = { allData['docInitList'] = $data.result allData['custserviceInitList'] = $data.result allData['routeInitList'] = $data.result + allData['lineManageInitList'] = $data.result break case 'contractno': allData['contractnoInitList'] = $data diff --git a/src/views/main/BookingLedger/detail/components/selectView.vue b/src/views/main/BookingLedger/detail/components/selectView.vue index 9695a85..1df04a1 100644 --- a/src/views/main/BookingLedger/detail/components/selectView.vue +++ b/src/views/main/BookingLedger/detail/components/selectView.vue @@ -359,6 +359,9 @@ export default { return this.blfrtList case 'lineName': return this.lineList + case 'shippingMethod': + const arr = this.$options.filters['dictData']('ShippingMethod') || [] + return arr } }, filterOption(input, option) { @@ -413,7 +416,7 @@ export default { this.$refs.selectView.$refs.vcSelect.focus() } this.open = true - if (['cargoid', 'nobill', 'copynobill', 'carrierid', 'yard', 'kindpkgs', 'issuetype', 'blfrt', 'masterBolIndicator', 'salerCode'].includes(this.type)) { + if (['cargoid', 'nobill', 'copynobill', 'carrierid', 'yard', 'kindpkgs', 'issuetype', 'blfrt', 'masterBolIndicator', 'salerCode', 'shippingMethod'].includes(this.type)) { this.selectList = this.emnuData(this.type) this.inLoading = false return false @@ -583,7 +586,7 @@ export default { } } .copy-btn{ - width: 30px; + width: 24px; text-align: center; color: #bbb; font-size: 13px; diff --git a/src/views/main/BookingLedger/detail/index.vue b/src/views/main/BookingLedger/detail/index.vue index cc022ed..c92e42a 100644 --- a/src/views/main/BookingLedger/detail/index.vue +++ b/src/views/main/BookingLedger/detail/index.vue @@ -310,13 +310,17 @@ const initDetail = { exRemark4: '', // == 以下为太平 == consigneeEdiCode: '', - shipperEdiCode: 'CN218868', + shipperEdiCode: '', notifyCdoe: '', - salerCode: 'CN087', - salerCodeName: 'GRACE SUN', + // salerCode: 'CN087', + // salerCodeName: 'GRACE SUN', + salerCode: '', + salerCodeName: '', emanifestHbl: '', - masterBolIndicator: '3', - masterBolIndicatorName: 'Not Applicable/Straight bl | 无HBL', + // masterBolIndicator: '3', + // masterBolIndicatorName: 'Not Applicable/Straight bl | 无HBL', + masterBolIndicator: '', + masterBolIndicatorName: '', s0CC0C: '', ckhi: '', cncm: '', @@ -353,13 +357,17 @@ const bookingEDIExt = { exRemark4: '', // == 以下为太平 == consigneeEdiCode: '', - shipperEdiCode: 'CN218868', + shipperEdiCode: '', notifyCdoe: '', - salerCode: 'CN087', - salerCodeName: 'GRACE SUN', + // salerCode: 'CN087', + // salerCodeName: 'GRACE SUN', + salerCode: '', + salerCodeName: '', emanifestHbl: '', - masterBolIndicator: '3', - masterBolIndicatorName: 'Not Applicable/Straight bl | 无HBL', + // masterBolIndicator: '3', + // masterBolIndicatorName: 'Not Applicable/Straight bl | 无HBL', + masterBolIndicator: '', + masterBolIndicatorName: '', s0CC0C: '', ckhi: '', cncm: '', @@ -740,7 +748,7 @@ export default { this.detailsLoadOver = false this.bookingDetails.carrierid = this.type this.bookingDetails.carrier = this.type - // this.getDefaultVal() + this.getDefaultVal() setTimeout(() => { if (Object.keys(this.$refs).includes('sedOrder')) { this.$refs.sedOrder.init([]) @@ -760,7 +768,7 @@ export default { }).then(res => { const defaultData = JSON.parse(res.data.configJson) this.defaultData = defaultData - console.log(defaultData) + console.log('==== 获取默认值设置 ====', defaultData) defaultData.map((item, index) => { const field = item.field.split('.') let label = field[1].toLowerCase() @@ -946,7 +954,6 @@ export default { delete item.id }) } - if (!res.data.bookingEDIExt) { res.data.bookingEDIExt = bookingEDIExt } @@ -969,7 +976,6 @@ export default { } if (res.data.hbList.length > 0) { res.data.hbList.map((item, index) => { - // item.bookingEDIExt.shipperEdiCode = item.bookingEDIExt.shipperEdiCode ? item.bookingEDIExt.shipperEdiCode : 'CN218868' const newBookingEDIExt = { ...JSON.parse(JSON.stringify(bookingEDIExt)), ...item.bookingEDIExt } item = { ...JSON.parse(JSON.stringify(initDetail)), ...item, ...{ bookingEDIExt: newBookingEDIExt } } if (item.ctnInputs.length > 0) { @@ -985,11 +991,10 @@ export default { }) } res.data.feeself = !!res.data.feeself - // res.data.bookingEDIExt.shipperEdiCode = res.data.bookingEDIExt.shipperEdiCode ? res.data.bookingEDIExt.shipperEdiCode : 'CN218868' const $BookingEDIExt = { ...JSON.parse(JSON.stringify(bookingEDIExt)), ...res.data.bookingEDIExt } this.$set(this, 'bookingDetails', { ...this.bookingDetails, ...res.data, ...{ bookingEDIExt: $BookingEDIExt } }) this.inPageLoading = false - // this.getDefaultVal() + this.getDefaultVal() setTimeout(() => { // console.log('== 5. 设置主单保存数据 - false ==') this.checkSaveFun({ type: 'details', hasChange: false }) @@ -1124,7 +1129,11 @@ export default { let FnOk = () => { const _data = JSON.parse(JSON.stringify(that.bookingDetails)) delete _data.hbList + if (this.isCopy) { + delete _data.bookingno + } this.$message.loading({ content: '保存中...' }) + BookingOrderSave(_data) .then(res => { if (res.success) { diff --git a/src/views/main/BookingLedger/detail/modules/basicInfo.vue b/src/views/main/BookingLedger/detail/modules/basicInfo.vue index 1cfe4cd..03d5d73 100644 --- a/src/views/main/BookingLedger/detail/modules/basicInfo.vue +++ b/src/views/main/BookingLedger/detail/modules/basicInfo.vue @@ -198,6 +198,20 @@ +
@@ -388,12 +402,12 @@
- + @@ -412,8 +426,8 @@ @@ -432,8 +446,8 @@ @@ -452,8 +466,8 @@ @@ -468,12 +482,12 @@ > - + @@ -488,6 +502,26 @@ > + + + + + @@ -651,6 +685,26 @@ export default { sm: { span: 19 }, md: { span: 19 } }, + userLabelCol: { + xs: { span: 24 }, + sm: { span: 8 }, + md: { span: 8 } + }, + userWrapperCol: { + xs: { span: 24 }, + sm: { span: 16 }, + md: { span: 16 } + }, + userLabelCol1: { + xs: { span: 24 }, + sm: { span: 8 }, + md: { span: 6 } + }, + userWrapperCol1: { + xs: { span: 24 }, + sm: { span: 16 }, + md: { span: 18 } + }, form: this.$form.createForm(this), // 选择委托单位 / 关系人弹窗 - start customerType: '', @@ -795,7 +849,7 @@ export default { // 选择委托单位 / 关系人弹窗 - end customerContactsData: [], ContactType: [], - customerContactsDataList: [], + customerContactsDataList: [] } }, watch: { @@ -1118,9 +1172,13 @@ export default { } else if (type === 'shipagency') { this.details.shipagency = res.name || '' this.details.shipagencyid = res.code || '' - } else if (['sale', 'op', 'doc', 'custservice', 'route'].includes(type)) { + } else if (['sale', 'op', 'doc', 'custservice', 'route', 'lineManage'].includes(type)) { this.details[type] = res.name || '' - this.details[`${type}id`] = res.id || '' + if (type === 'lineManage') { + this.details.lineManageID = res.id || '' + } else { + this.details[`${type}id`] = res.id || '' + } } else if (type === 'lineName') { this.details[type] = res.name || '' this.$emit('editLineName', true) diff --git a/src/views/main/BookingLedger/detail/modules/mailingInfo.vue b/src/views/main/BookingLedger/detail/modules/mailingInfo.vue index 2adf1a2..a100c6d 100644 --- a/src/views/main/BookingLedger/detail/modules/mailingInfo.vue +++ b/src/views/main/BookingLedger/detail/modules/mailingInfo.vue @@ -246,7 +246,6 @@ - + + + + + @@ -1453,6 +1472,9 @@ export default { this.details.kindpkgs = res['name'] || '' const enCapitalRes = this.SetTOTALNO(this.details.pkgs) this.$emit('pkgsEnCapital', enCapitalRes) + } else if (['shippingMethod'].includes(type)) { + // 装运方式 + this.details.shippingMethod = res['name'] || '' } }, dateChangeFun ({ type, value }) { diff --git a/src/views/main/BookingLedger/detail/modules/sedOrder.vue b/src/views/main/BookingLedger/detail/modules/sedOrder.vue index 7cce539..0235f20 100644 --- a/src/views/main/BookingLedger/detail/modules/sedOrder.vue +++ b/src/views/main/BookingLedger/detail/modules/sedOrder.vue @@ -302,13 +302,17 @@ const sedDetail = { exRemark4: '', // == 以下为太平 == consigneeEdiCode: '', - shipperEdiCode: 'CN218868', + shipperEdiCode: '', notifyCdoe: '', - salerCode: 'CN087', - salerCodeName: 'GRACE SUN', + // salerCode: 'CN087', + // salerCodeName: 'GRACE SUN', + salerCode: '', + salerCodeName: '', emanifestHbl: '', - masterBolIndicator: '3', - masterBolIndicatorName: 'Not Applicable/Straight bl | 无HBL', + // masterBolIndicator: '3', + // masterBolIndicatorName: 'Not Applicable/Straight bl | 无HBL', + masterBolIndicator: '', + masterBolIndicatorName: '', s0CC0C: '', ckhi: '', cncm: '', @@ -346,13 +350,17 @@ const bookingEDIExt = { exRemark4: '', // == 以下为太平 == consigneeEdiCode: '', - shipperEdiCode: 'CN218868', + shipperEdiCode: '', notifyCdoe: '', - salerCode: 'CN087', - salerCodeName: 'GRACE SUN', + // salerCode: 'CN087', + // salerCodeName: 'GRACE SUN', + salerCode: '', + salerCodeName: '', emanifestHbl: '', - masterBolIndicator: '3', - masterBolIndicatorName: 'Not Applicable/Straight bl | 无HBL', + // masterBolIndicator: '3', + // masterBolIndicatorName: 'Not Applicable/Straight bl | 无HBL', + masterBolIndicator: '', + masterBolIndicatorName: '', s0CC0C: '', ckhi: '', cncm: '', diff --git a/src/views/main/BookingLedger/detail/style/basicInfo.less b/src/views/main/BookingLedger/detail/style/basicInfo.less index 1ee3640..6b89830 100644 --- a/src/views/main/BookingLedger/detail/style/basicInfo.less +++ b/src/views/main/BookingLedger/detail/style/basicInfo.less @@ -263,5 +263,9 @@ /deep/ .ant-form-item-label{ margin-top: 2px; } + /deep/ .ant-col{ + padding-left: 0 !important; + // padding-right: 0 !important; + } } \ No newline at end of file diff --git a/src/views/main/BookingLedger/detail/style/mailingInfo.less b/src/views/main/BookingLedger/detail/style/mailingInfo.less index a9329cb..7353548 100644 --- a/src/views/main/BookingLedger/detail/style/mailingInfo.less +++ b/src/views/main/BookingLedger/detail/style/mailingInfo.less @@ -466,6 +466,7 @@ } .right-content{ + padding-bottom: 5px; /deep/ .ant-form-item-label { height:36px !important; line-height: 36px !important; diff --git a/src/views/main/BookingLedger/list/index.vue b/src/views/main/BookingLedger/list/index.vue index 386b19e..275699c 100644 --- a/src/views/main/BookingLedger/list/index.vue +++ b/src/views/main/BookingLedger/list/index.vue @@ -675,30 +675,30 @@ export default { ...mapGetters(['bookingList', 'bookingGridOptions']) }, beforeRouteLeave (to, from, next) { - const copyArr = JSON.parse(JSON.stringify(this.gridOptions.data)) - const first = copyArr.splice(0, 20) + // const copyArr = JSON.parse(JSON.stringify(this.gridOptions.data)) + // const first = copyArr.splice(0, 20) this.setBookingGridOptions(this.gridOptions) - this.gridOptions = { - border: false, - resizable: true, - showOverflow: true, - loading: false, - stripe: true, - round: true, - autoResize: true, - align: 'left', - columnConfig: { resizable: true }, - importConfig: {}, - exportConfig: {}, - pagerConfig: { - total: 0, - currentPage: 1, - pageSize: 10, - pageSizes: [10, 20, 50, 100, 200, 500] - }, - columns: this.gridOptions.columns, - data: first - } + // this.gridOptions = { + // border: false, + // resizable: true, + // showOverflow: true, + // loading: false, + // stripe: true, + // round: true, + // autoResize: true, + // align: 'left', + // columnConfig: { resizable: true }, + // importConfig: {}, + // exportConfig: {}, + // pagerConfig: { + // total: 0, + // currentPage: 1, + // pageSize: 10, + // pageSizes: [10, 20, 50, 100, 200, 500] + // }, + // columns: this.gridOptions.columns, + // data: first + // } next() }, beforeRouteEnter (to, from, next) { @@ -730,7 +730,16 @@ export default { }, upDate () { if (Object.keys(this.gridOptions).length > 0) { - if (Object.keys(this.bookingGridOptions) === 0) { return false } + if (Object.keys(this.bookingGridOptions).length === 0) { return false } + const newData = JSON.parse(JSON.stringify(this.bookingGridOptions)) + if (newData && newData.data.length > this.gridOptions.data.length) { + console.log('这里插入最新舱单', newData.data.length, this.gridOptions.data.length) + } + } + }, + upDate1 () { + if (Object.keys(this.gridOptions).length > 0) { + if (Object.keys(this.bookingGridOptions).length === 0) { return false } const newData = JSON.parse(JSON.stringify(this.bookingGridOptions)) // 默认取前十条或者前N条,暂时屏蔽 if (this.bookingGridOptions.data && this.bookingGridOptions.data.length > 0) { @@ -746,7 +755,6 @@ export default { }, 600) }, 10) } - // 默认获取全部数据 // if (this.bookingGridOptions.data && this.bookingGridOptions.data.length > 0) { // console.log(this.gridOptions.loading)