From 6b2cbdf62df49152552c555c5182fd5f34923f51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=90=8C=E6=B5=B7?= <963808678@qq.com> Date: Mon, 20 Feb 2023 10:02:34 +0800 Subject: [PATCH] 2/20 --- src/views/main/BookingLedger/list/index.vue | 99 ++++++++--- .../BookingLedger/list/modules/initData.js | 158 ++++++++++++++++-- src/views/main/Printing/index.vue | 20 +-- 3 files changed, 228 insertions(+), 49 deletions(-) diff --git a/src/views/main/BookingLedger/list/index.vue b/src/views/main/BookingLedger/list/index.vue index 073a3ed..26d00b7 100644 --- a/src/views/main/BookingLedger/list/index.vue +++ b/src/views/main/BookingLedger/list/index.vue @@ -24,9 +24,7 @@ v-if="(findex < 4 && !advanced) || advanced" class="from-label" > - + - - + +
-
+ + + {{ item.cnName }} + +
@@ -457,14 +459,14 @@ import { SendTrace, GetVessellist, GetPortlist, - BookingOrderBachUpdate + BookingOrderBachUpdate, + GetCarrierlist } from '@/api/modular/main/BookingLedger' import columnSetting from '@/components/tableColumnSetting' import formLabel from './modules/formLabel' import initData from './modules/initData' import { DjyUserConfigGet, DjyUserConfigAdd } from '@/api/modular/main/DjyUserConfig' import { mapActions } from 'vuex' - const formInitData = [ { title: '主提单号', align: 'center', width: '90', label: 'MBLNO', type: 'input' }, { title: '分提单号', align: 'center', width: '90', label: 'HBLNO', type: 'input' }, @@ -561,7 +563,8 @@ export default { vesselData: [], WebVessel: '', portDischargeData: [], - destinationData: [] + destinationData: [], + carrierData: [] } }, created() { @@ -573,6 +576,7 @@ export default { this.getFormData() this.getTableList() this.getPageSize() + this.getCarrier() }, mounted() { console.log('=== 列表 mounted ===') @@ -691,7 +695,37 @@ export default { } this.getTableList() }, - + // 船公司 - start + getCarrier() { + GetCarrierlist() + .then(res => { + if (res.code === 200) { + DjyUserConfigGet({ type: 'booking_memory' }) + .then(e => { + console.log(e) + if (e.data) { + let data = [] + JSON.parse(e.data.configJson).forEach(item => { + res.data.forEach(item2 => { + if (item == item2.code) { + data.push(item2) + } + }) + }) + this.carrierData = data + } else { + this.carrierData = res.data + } + }) + .catch(() => { + this.carrierData = res.data + }) + } + }) + .catch(err => { + console.log(err) + }) + }, getFormData(isReset = false) { DjyUserConfigGet({ type: 'booking_list_cond' }).then(res => { if (res.data && JSON.parse(res.data.configJson).length) { @@ -779,7 +813,7 @@ export default { this.getList(this.formRes) }, - editPageSizeSave (pageSize = 10) { + editPageSizeSave(pageSize = 10) { const data = { pageSize: pageSize } @@ -791,7 +825,7 @@ export default { }) }, - getPageSize () { + 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 @@ -1055,9 +1089,22 @@ export default { // }) }, addSubmit() { - this.addVisible = false - this.addNum = Math.round(Math.random() * 1000) - this.$router.push({ name: 'BookingDetail', query: { type: this.carrierRadio, addNum: this.addNum } }) + let data = [] + data.push(this.carrierRadio) + this.carrierData.forEach(item => { + if (item.code != this.carrierRadio) { + data.push(item.code) + } + }) + DjyUserConfigAdd({ + type: 'booking_memory', + configJson: JSON.stringify(data) + }).then(res => { + this.getCarrier() + this.addVisible = false + this.addNum = Math.round(Math.random() * 1000) + this.$router.push({ name: 'BookingDetail', query: { type: this.carrierRadio, addNum: this.addNum } }) + }) }, addCancel() { this.addVisible = false @@ -1474,14 +1521,22 @@ export default { height: 40px; display: inline-block; } - -.group-label { - width: 500px; - display: flex; - .label-flex { - flex: 1; +.group-label-box { + width: 100%; + .group-label { + width: 100%; + display: flex; + flex-wrap: wrap; + .ant-radio-wrapper { + width: 20%; + margin: 0; + } + // .label-flex { + // flex: 1; + // } } } + /*查询区日期默认颜色 */ /deep/ .ant-calendar-today { .ant-calendar-date { diff --git a/src/views/main/BookingLedger/list/modules/initData.js b/src/views/main/BookingLedger/list/modules/initData.js index 5a32f63..298748b 100644 --- a/src/views/main/BookingLedger/list/modules/initData.js +++ b/src/views/main/BookingLedger/list/modules/initData.js @@ -22,16 +22,53 @@ export default { sortable: true, slots: { default: 'vessel' } }, - { field: 'etd', label: 'ETD', width: 110, title: '开船日期', showHeaderOverflow: true, sortable: true, slots: { default: 'etd' } }, + { + field: 'etd', + label: 'ETD', + width: 110, + title: '开船日期', + showHeaderOverflow: true, + sortable: true, + slots: { default: 'etd' } + }, { field: 'voyno', label: 'VOYNO', width: 120, title: '海关航次', showHeaderOverflow: true }, { field: 'bookingStatus', label: 'BOOKINGSTATUS', width: 120, title: '订舱状态', showHeaderOverflow: true }, { field: 'vgm', label: 'VGM', width: 120, title: 'VGM', showHeaderOverflow: true }, { field: 'billStatus', label: 'BILLSTATUS', width: 120, title: '提单状态', showHeaderOverflow: true }, - { field: 'portdischarge', label: 'PORTDISCHARGE', width: 120, title: '卸货港', showHeaderOverflow: true, sortable: true }, - { field: 'createdUserName', label: 'CREATEDUSERNAME', width: 120, title: '创建人', showHeaderOverflow: true, sortable: true }, - { field: 'createdTime', label: 'CREATEDTIME', width: 160, title: '创建时间', showHeaderOverflow: true, sortable: true }, + { + field: 'portdischarge', + label: 'PORTDISCHARGE', + width: 120, + title: '卸货港', + showHeaderOverflow: true, + sortable: true + }, + { + field: 'createdUserName', + label: 'CREATEDUSERNAME', + width: 120, + title: '创建人', + showHeaderOverflow: true, + sortable: true + }, + { + field: 'createdTime', + label: 'CREATEDTIME', + width: 160, + title: '创建时间', + showHeaderOverflow: true, + sortable: true + }, { field: 'cntrtotal', label: 'CNTRTOTAL', width: 120, title: '箱型箱量', showHeaderOverflow: true, sortable: true }, - { field: 'operate', title: '操作', width: 80, noDraggable: true, slots: { default: 'operate' }, fixed: 'right', resizable: false } + { + field: 'operate', + title: '操作', + width: 80, + noDraggable: true, + slots: { default: 'operate' }, + fixed: 'right', + resizable: false + } ], columnsAllData: [ { field: 'carrier', width: 120, title: '船公司', showHeaderOverflow: true, sortable: true }, @@ -55,43 +92,130 @@ export default { sortable: true, slots: { default: 'vessel' } }, - { field: 'etd', label: 'ETD', width: 110, title: '开船日期', showHeaderOverflow: true, sortable: true, slots: { default: 'etd' } }, + { + field: 'etd', + label: 'ETD', + width: 110, + title: '开船日期', + showHeaderOverflow: true, + sortable: true, + slots: { default: 'etd' } + }, { field: 'voyno', label: 'VOYNO', width: 120, title: '海关航次', showHeaderOverflow: true }, - { field: 'bookremark', label: 'BOOKREMARK', width: 120, title: '备注', className: 'book-remark-box', showOverflow: false, slots: { default: 'bookremark' } }, + { + field: 'bookremark', + label: 'BOOKREMARK', + width: 120, + title: '备注', + className: 'book-remark-box', + showOverflow: false, + slots: { default: 'bookremark' } + }, { field: 'bookingStatus', label: 'BOOKINGSTATUS', width: 120, title: '订舱状态', showHeaderOverflow: true }, { field: 'vgm', label: 'VGM', width: 120, title: 'VGM', showHeaderOverflow: true }, { field: 'billStatus', label: 'BILLSTATUS', width: 120, title: '提单状态', showHeaderOverflow: true }, - { field: 'portdischarge', label: 'PORTDISCHARGE', width: 120, title: '卸货港', showHeaderOverflow: true, sortable: true }, - { field: 'createdUserName', label: 'CREATEDUSERNAME', width: 120, title: '创建人', showHeaderOverflow: true, sortable: true }, - { field: 'createdTime', label: 'CREATEDTIME', width: 160, title: '创建时间', showHeaderOverflow: true, sortable: true }, + { + field: 'portdischarge', + label: 'PORTDISCHARGE', + width: 120, + title: '卸货港', + showHeaderOverflow: true, + sortable: true + }, + { + field: 'createdUserName', + label: 'CREATEDUSERNAME', + width: 120, + title: '创建人', + showHeaderOverflow: true, + sortable: true + }, + { + field: 'createdTime', + label: 'CREATEDTIME', + width: 160, + title: '创建时间', + showHeaderOverflow: true, + sortable: true + }, { field: 'cntrtotal', label: 'CNTRTOTAL', width: 120, title: '箱型箱量', showHeaderOverflow: true, sortable: true }, - { field: 'atd', label: 'ATD', width: 160, title: '实际开船日期', showHeaderOverflow: true, sortable: true, slots: { default: 'atd' } }, + { + field: 'atd', + label: 'ATD', + width: 160, + title: '实际开船日期', + showHeaderOverflow: true, + sortable: true, + slots: { default: 'atd' } + }, { field: 'blfrt', label: 'BLFRT', width: 120, title: '付费方式', showHeaderOverflow: true, sortable: true }, { field: 'cargoid', label: 'CARGOID', width: 120, title: '货物标识', showHeaderOverflow: true, sortable: true }, { field: 'cbm', label: 'CBM', width: 90, title: '尺码', showHeaderOverflow: true, sortable: true }, { field: 'consignee', label: 'CONSIGNEE', width: 120, title: '收货人', showHeaderOverflow: true, sortable: true }, { field: 'contractno', label: 'CONTRACTNO', width: 120, title: '合约号', showHeaderOverflow: true, sortable: true }, - { field: 'customername', label: 'CUSTOMERNAME', width: 120, title: '客户', showHeaderOverflow: true, sortable: true }, + { + field: 'customername', + label: 'CUSTOMERNAME', + width: 120, + title: '客户', + showHeaderOverflow: true, + sortable: true + }, { field: 'customser', label: 'CUSTOMSER', width: 120, title: '报关行', showHeaderOverflow: true, sortable: true }, { field: 'custservice', label: 'CUSTSERVICE', width: 120, title: '客服', showHeaderOverflow: true, sortable: true }, { field: 'doc', label: 'DOC', width: 120, title: '单证', showHeaderOverflow: true, sortable: true }, { field: 'dunno', label: 'DUNNO', width: 120, title: '危险品编号', showHeaderOverflow: true, sortable: true }, { field: 'forwarder', label: 'FORWARDER', width: 120, title: '订舱代理', showHeaderOverflow: true, sortable: true }, - { field: 'freightpayer', label: 'FREIGHTPAYER', width: 120, title: '付款方', showHeaderOverflow: true, sortable: true }, + { + field: 'freightpayer', + label: 'FREIGHTPAYER', + width: 120, + title: '付款方', + showHeaderOverflow: true, + sortable: true + }, { field: 'hblno', label: 'HBLNO', width: 120, title: '分提单号', showHeaderOverflow: true, sortable: true }, { field: 'hscode', label: 'HSCODE', width: 120, title: 'HS代码', showHeaderOverflow: true, sortable: true }, - { field: 'issueplace', label: 'ISSUEPLACE', width: 120, title: '签单地点', showHeaderOverflow: true, sortable: true }, + { + field: 'issueplace', + label: 'ISSUEPLACE', + width: 120, + title: '签单地点', + showHeaderOverflow: true, + sortable: true + }, { field: 'issuetype', label: 'ISSUETYPE', width: 120, title: '签单方式', showHeaderOverflow: true, sortable: true }, { field: 'kgs', label: 'KGS', width: 120, title: '毛重', showHeaderOverflow: true, sortable: true }, { field: 'kindpkgs', label: 'KINDPKGS', width: 120, title: '包装', showHeaderOverflow: true, sortable: true }, { field: 'pkgs', label: 'PKGS', width: 120, title: '件数', showHeaderOverflow: true, sortable: true }, { field: 'marks', label: 'MARKS', width: 120, title: '唛头', showHeaderOverflow: true, sortable: true }, { field: 'nobill', label: 'NOBILL', width: 120, title: '提单分数', showHeaderOverflow: true, sortable: true }, - { field: 'notifyparty', label: 'NOTIFYPARTY', width: 120, title: '通知人', showHeaderOverflow: true, sortable: true }, + { + field: 'notifyparty', + label: 'NOTIFYPARTY', + width: 120, + title: '通知人', + showHeaderOverflow: true, + sortable: true + }, { field: 'op', label: 'OP', width: 120, title: '操作人', showHeaderOverflow: true, sortable: true }, { field: 'payableat', label: 'PAYABLEAT', width: 120, title: '到付地点', showHeaderOverflow: true, sortable: true }, - { field: 'placedelivery', label: 'PLACEDELIVERY', width: 120, title: '交货地', showHeaderOverflow: true, sortable: true }, - { field: 'bookstatus', label: 'BOOKSTATUS', minWidth: 140, title: '运踪', showHeaderOverflow: true, slots: { default: 'bookstatus' } } + { + field: 'placedelivery', + label: 'PLACEDELIVERY', + width: 120, + title: '交货地', + showHeaderOverflow: true, + sortable: true + }, + { + field: 'bookstatus', + label: 'BOOKSTATUS', + minWidth: 140, + title: '运踪', + showHeaderOverflow: true, + slots: { default: 'bookstatus' } + } // { field: 'book_sta_cate_billtrace', label: 'book_sta_cate_billtrace', width: 120, title: '运踪状态', showHeaderOverflow: true, sortable: true }, // { field: 'book_sta_cate_vgm', label: 'book_sta_cate_vgm', width: 120, title: 'VGM状态', showHeaderOverflow: true, sortable: true }, // { field: 'book_sta_cate_si', label: 'book_sta_cate_si', width: 120, title: '提单状态', showHeaderOverflow: true, sortable: true }, diff --git a/src/views/main/Printing/index.vue b/src/views/main/Printing/index.vue index dbbade8..a8b04ff 100644 --- a/src/views/main/Printing/index.vue +++ b/src/views/main/Printing/index.vue @@ -41,15 +41,6 @@ - - - - - 123 - - - - @@ -62,6 +53,15 @@ + + + + + {{ item.name }} + + + + @@ -293,7 +293,7 @@ export default { currentPage: 1, pageSize: 10, totalResult: 1, - type: 'ExcelTemplate' + type: '' }, ColumnsQuery: [], TableColumns: [],