From b37e3d0cdece7e15f6de9a2e441d7ab73c1ccd6a Mon Sep 17 00:00:00 2001 From: sunzehua Date: Tue, 14 May 2024 09:47:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/modular/main/TaskmanageList.js | 1 + src/components/generation/index.vue | 201 +++++++++++++--- src/store/modules/user.js | 4 + src/views/ServiceItems/index.vue | 3 + src/views/main/CabinInventory/index.vue | 177 +++++++++++--- src/views/main/CabinManagement/details.vue | 215 ++++++++++++++--- src/views/main/CabinManagement/index.vue | 256 ++++++++++++--------- src/views/main/Taskmanage/draft/index.vue | 3 + src/views/main/mskOrderList/index.vue | 2 + 9 files changed, 657 insertions(+), 205 deletions(-) diff --git a/src/api/modular/main/TaskmanageList.js b/src/api/modular/main/TaskmanageList.js index 21063d3..58d7a39 100644 --- a/src/api/modular/main/TaskmanageList.js +++ b/src/api/modular/main/TaskmanageList.js @@ -514,6 +514,7 @@ export function DraftDownloadFile(parameter) { return axios({ url: '/TaskManageDRAFT/DownloadFile', method: 'get', + responseType: 'arraybuffer', params: parameter }) } diff --git a/src/components/generation/index.vue b/src/components/generation/index.vue index 225d626..bdb45c6 100644 --- a/src/components/generation/index.vue +++ b/src/components/generation/index.vue @@ -49,8 +49,13 @@ :show-arrow="false" :filter-option="false" :not-found-content="null" - @change="handleChangeUser" - @search="SearchUser"> + @change="handleChangeUser"> +
+
+ 全选 + +
+
{{ item.name }} @@ -74,9 +79,10 @@ :show-arrow="false" :filter-option="false" :not-found-content="null" - @search="SearchUser" + allowClear + @search="SearchUser($event, 0)" @change="e => { - ChangeUser(e, 'saleName') + ChangeUser(e, 'saleName', 0) } "> @@ -92,14 +98,15 @@ v-model="CreateData.opId" :default-active-first-option="false" :show-arrow="false" + allowClear :filter-option="false" :not-found-content="null" - @search="SearchUser" + @search="SearchUser($event, 1)" @change="e => { - ChangeUser(e, 'opName') + ChangeUser(e, 'opName', 1) } "> - + {{ item.name }} @@ -110,16 +117,17 @@ - + {{ item.name }} @@ -136,12 +144,13 @@ :show-arrow="false" :filter-option="false" :not-found-content="null" - @search="SearchUser" + allowClear + @search="SearchUser($event, 3)" @change="e => { - ChangeUser(e, 'custserviceName') + ChangeUser(e, 'custserviceName', 3) } "> - + {{ item.name }} @@ -155,13 +164,14 @@ :default-active-first-option="false" :show-arrow="false" :filter-option="false" + allowClear :not-found-content="null" - @search="SearchUser" + @search="SearchUser($event, 4)" @change="e => { - ChangeUser(e, 'route') + ChangeUser(e, 'route', 4) } "> - + {{ item.name }} @@ -174,14 +184,15 @@ v-model="CreateData.lineManageID" :default-active-first-option="false" :show-arrow="false" + allowClear :filter-option="false" :not-found-content="null" - @search="SearchUser" + @search="SearchUser($event, 5)" @change="e => { - ChangeUser(e, 'lineManage') + ChangeUser(e, 'lineManage', 5) } "> - + {{ item.name }} @@ -228,7 +239,14 @@ import { DjyCustomerSuggest, GetSysUserPage, DjyCustomerContacts, DjyCustomerdet import { GetProjectList, CreateBookingAndSlot, GetBookingOrder } from '@/api/modular/main/TaskmanageList' import { mapGetters } from 'vuex' import { ValidateCreateBookingOrder, CreateBooking0rder } from '@/api/modular/main/CompanySiteaccount' +let timer export default { + components: { + VNodes: { + functional: true, + render: (h, ctx) => ctx.props.vnodes + } + }, data() { return { SlotVisible: false, @@ -254,10 +272,16 @@ export default { }, CustomerList: [], UserList: [], + UserList1: [], + UserList2: [], + UserList3: [], + UserList4: [], + UserList5: [], fetching: false, spinning: false, customerByList: [], type: '', + UserListAll: [], userInfoList: [], slotEdit: {}, bookingServiceItem: [] @@ -279,7 +303,12 @@ export default { this.bookingServiceItem = res.data }) GetSysUserPage().then(res => { - this.UserList = res.data + this.UserList = JSON.parse(JSON.stringify(res.data)) + this.UserList1 = JSON.parse(JSON.stringify(res.data)) + this.UserList2 = JSON.parse(JSON.stringify(res.data)) + this.UserList3 = JSON.parse(JSON.stringify(res.data)) + this.UserList4 = JSON.parse(JSON.stringify(res.data)) + this.UserListAll = JSON.parse(JSON.stringify(res.data)) }) }, methods: { @@ -293,12 +322,12 @@ export default { projectList.push(item.serviceProjectCode) } }) - const ApiData = { slotId: this.slotEdit.id, projectList, ...this.CreateData } + ApiData.customerList = ApiData.customerContactId this.spinning = true CreateBooking0rder(ApiData).then(res => { if (res.success) { @@ -347,6 +376,17 @@ export default { this.spinning = false }) }, + handleAllSelect() { + const arr = [] + const arr1 = [] + this.customerByList.forEach(item => { + arr.push(item.id) + arr1.push(item) + }) + this.$set(this.CreateData, 'customerContactId', arr) + this.userInfoList = arr1 + this.$forceUpdate() + }, init2() { this.SlotVisible = true this.spinning = true @@ -384,6 +424,7 @@ export default { projectList, ...this.CreateData } + ApiData.customerList = ApiData.customerContactId if (this.CreateData.customerList.length > 0) { const arr = [] this.customerByList.forEach(item => { @@ -426,17 +467,101 @@ export default { }) this.userInfoList = arr }, - SearchUser(e) { - GetSysUserPage({ name: e }).then(res => { - this.UserList = res.data - }) + debounce(func, wait, ...args) { + if (timer) clearTimeout(timer) + timer = setTimeout(() => { + func.apply(this, args) + }, wait) }, - ChangeUser(e, Tname) { - this.UserList.forEach(item => { - if (item.id == e) { - this.CreateData[Tname] = item.name + SearchUser(e, type) { + if (e) { + GetSysUserPage({ name: e }).then(res => { + if (type === 0) { + this.UserList = res.data + } + if (type === 1) { + this.UserList1 = res.data + } + if (type === 2) { + this.UserList2 = res.data + } + if (type === 3) { + this.UserList3 = res.data + } + if (type === 4) { + this.UserList4 = res.data + } + if (type === 5) { + this.UserList5 = res.data + } + }) + } + }, + ChangeUser(e, Tname, type) { + if (e) { + if (type === 0) { + this.UserList.forEach(item => { + if (item.id == e) { + this.CreateData[Tname] = item.name + } + }) } - }) + if (type === 1) { + this.UserList1.forEach(item => { + if (item.id == e) { + this.CreateData[Tname] = item.name + } + }) + } + if (type === 2) { + this.UserList2.forEach(item => { + if (item.id == e) { + this.CreateData[Tname] = item.name + } + }) + } + if (type === 3) { + this.UserList3.forEach(item => { + if (item.id == e) { + this.CreateData[Tname] = item.name + } + }) + } + if (type === 4) { + this.UserList4.forEach(item => { + if (item.id == e) { + this.CreateData[Tname] = item.name + } + }) + } + if (type === 5) { + this.UserList5.forEach(item => { + if (item.id == e) { + this.CreateData[Tname] = item.name + } + }) + } + } else { + if (type === 0) { + this.UserList = JSON.parse(JSON.stringify(this.UserListAll)) + } + if (type === 1) { + this.UserList1 = JSON.parse(JSON.stringify(this.UserListAll)) + } + if (type === 2) { + this.UserList2 = JSON.parse(JSON.stringify(this.UserListAll)) + } + if (type === 3) { + this.UserList3 = JSON.parse(JSON.stringify(this.UserListAll)) + } + if (type === 4) { + this.UserList4 = JSON.parse(JSON.stringify(this.UserListAll)) + } + if (type === 5) { + this.UserList5 = JSON.parse(JSON.stringify(this.UserListAll)) + } + } + this.$forceUpdate() }, ChangeCustomer(e) { this.customerByList = [] @@ -462,29 +587,29 @@ export default { this.CreateData.custserviceId = Number(res.data.custserviceid) this.CreateData.custserviceName = res.data.doc } else { - this.CreateData.custserviceId = '' - this.CreateData.custserviceName = '' + this.$set(this.CreateData, 'custserviceId', '') + this.$set(this.CreateData, 'custserviceName', '') } if (res.data.docid) { this.CreateData.docId = Number(res.data.docid) this.CreateData.docName = res.data.custservice } else { - this.CreateData.docId = '' - this.CreateData.docName = '' + this.$set(this.CreateData, 'docId', '') + this.$set(this.CreateData, 'docName', '') } if (res.data.opid) { this.CreateData.opId = Number(res.data.opid) this.CreateData.opName = res.data.op } else { - this.CreateData.opId = '' - this.CreateData.opName = '' + this.$set(this.CreateData, 'opId', '') + this.$set(this.CreateData, 'opName', '') } if (res.data.saleid) { this.CreateData.saleId = Number(res.data.saleid) this.CreateData.saleName = res.data.sale } else { - this.CreateData.saleId = '' - this.CreateData.saleName = '' + this.$set(this.CreateData, 'saleId', '') + this.$set(this.CreateData, 'saleName', '') } this.$forceUpdate() } else { diff --git a/src/store/modules/user.js b/src/store/modules/user.js index b09e8cf..4c63c25 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -231,6 +231,8 @@ const user = { localStorage.removeItem('booking_form_yard'); localStorage.removeItem('vesselinfoSetting'); localStorage.removeItem('mskOrderSetting'); + localStorage.removeItem('CabinSetting'); + localStorage.removeItem('CabinInventorySetting'); }) }) }, @@ -254,6 +256,8 @@ const user = { localStorage.removeItem('booking_form_yard'); localStorage.removeItem('vesselinfoSetting'); localStorage.removeItem('mskOrderSetting'); + localStorage.removeItem('CabinSetting'); + localStorage.removeItem('CabinInventorySetting'); Vue.ls.set(ACCESS_TOKEN, token, 7 * 24 * 60 * 60 * 1000) commit('SET_TOKEN', token) store.dispatch('dictTypeData') diff --git a/src/views/ServiceItems/index.vue b/src/views/ServiceItems/index.vue index 7799dcb..ccf5bc1 100644 --- a/src/views/ServiceItems/index.vue +++ b/src/views/ServiceItems/index.vue @@ -47,6 +47,9 @@ +
+ +
diff --git a/src/views/main/CabinInventory/index.vue b/src/views/main/CabinInventory/index.vue index ed77879..2023c4f 100644 --- a/src/views/main/CabinInventory/index.vue +++ b/src/views/main/CabinInventory/index.vue @@ -2,63 +2,107 @@
- + - + - + - + - + - + - - + + + + + {{ + item.enName }} + + + + + {{ advanced ? '收起' : '展开' }} - + - + - - {{ item.name }} + + {{ item.name + }} - + - + - + + + + + + {{ + item.enName }} + + + + + + + + {{ + item.cnName }} + + +
@@ -118,6 +162,7 @@ import { BookingSlotPageStock, BookingSlotRefreshStock } from '@/api/modular/main/CompanySiteaccount' +import { GetPortloadlist, GetPortlist, CodeCountryList } from '@/api/modular/main/BookingLedger' import { mapGetters } from 'vuex' import columnSetting from '@/components/tableColumnSetting' import tableSort from '@/components/tableSort' @@ -129,12 +174,14 @@ export default { mixins: [sortMixin], computed: { ...mapGetters([ - 'ctnallList' + 'ctnallList', 'bookingInitData', 'countryList' ]) }, data() { return { TypeData: [], + portdischargeidInitList: [], + portloadidInitList: [], // 高级搜索 展开/关闭 advanced: false, loading: false, @@ -146,6 +193,8 @@ export default { totalCount: 1 }, form: {}, + firstFlag: false, + country:[], sortMixinForm: { column: 'CabinInventory_list_column', setting: 'CabinInventorySetting', @@ -154,6 +203,7 @@ export default { type: 'CabinInventory', sortField: 'etd' }, + fetching: false, ColumnsQuery: [], columns: [ { @@ -201,16 +251,28 @@ export default { field: 'portdischarge' }, { - title: '发货地', + title: '收货地', align: 'center', width: '100', - field: 'placedelivery' + field: 'placereceipt' }, { - title: '收货地', + title: '交货地', align: 'center', width: '100', - field: 'placereceipt' + field: 'portload' + }, + { + title: '装货港', + align: 'center', + width: '100', + field: 'portdischarge' + }, + { + title: '卸货港', + align: 'center', + width: '100', + field: 'placedelivery' }, { title: 'WEEK', @@ -311,16 +373,28 @@ export default { field: 'portdischarge' }, { - title: '发货地', + title: '收货地', align: 'center', width: '100', - field: 'placedelivery' + field: 'placereceipt' }, { - title: '收货地', + title: '交货地', align: 'center', width: '100', - field: 'placereceipt' + field: 'portload' + }, + { + title: '装货港', + align: 'center', + width: '100', + field: 'portdischarge' + }, + { + title: '卸货港', + align: 'center', + width: '100', + field: 'placedelivery' }, { title: 'WEEK', @@ -380,7 +454,8 @@ export default { loadData: [] } }, - created() { }, + created() { + }, mounted() { this.getConfigStart() }, @@ -394,17 +469,53 @@ export default { }) return Rdata }, + getSelectFirst() { + if (!this.firstFlag) { + this.portloadidInitList = this.bookingInitData.portloadidInitList + this.portdischargeidInitList = this.bookingInitData.portdischargeidInitList + this.country = this.countryList + this.firstFlag = true + } + }, toggleAdvanced() { this.advanced = !this.advanced }, init() { this.form = {} + this.firstFlag = false }, handlePageChange({ currentPage, pageSize }) { this.queryParam.currentPage = currentPage this.queryParam.pageSize = pageSize this.getList() }, + handleSearch(e) { + this.fetching = true + GetPortloadlist({ KeyWord: e }).then(res => { + this.portloadidInitList = res.data + this.fetching = false + }) + }, + handleSearch2(e) { + this.fetching = true + CodeCountryList({ Name: e }).then(res => { + this.country = res.data + this.fetching = false + }) + }, + handleSearch1(e) { + this.fetching = true + GetPortlist({ KeyWord: e }).then(res => { + const uniqueArray = res.data.reduce((accumulator, currentValue) => { + if (accumulator.findIndex(obj => obj.ediCode === currentValue.ediCode) === -1) { + accumulator.push(currentValue); + } + return accumulator; + }, []); + this.portdischargeidInitList = uniqueArray + this.fetching = false + }) + }, getList() { this.loading = true this.form.pageSize = this.queryParam.pageSize @@ -428,12 +539,16 @@ export default { const obj = JSON.parse(JSON.stringify(this.queryParam)) return obj }, + filterOption(input, option) { + return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0 + }, handleRefsh(row) { const data = { vessel: row.vessel, voyno: row.voyno, contracT_NO: row.contracT_NO, - placereceipt: row.placereceipt, + portloadid: row.portloadid, + portdischargeid: row.portdischargeid, placedelivery: row.placedelivery, bookinG_SLOT_TYPE: row.bookinG_SLOT_TYPE, carrierid: row.carrierid diff --git a/src/views/main/CabinManagement/details.vue b/src/views/main/CabinManagement/details.vue index a23ad64..20bcded 100644 --- a/src/views/main/CabinManagement/details.vue +++ b/src/views/main/CabinManagement/details.vue @@ -2,7 +2,6 @@
-
{{ type === 'Add' ? '舱位新增' : '舱位修改' }}
保存 提交 @@ -13,6 +12,97 @@
+
关联订舱
+
+
+ + + + + + {{ item1.shortName }} + + + + + + + + + {{ item1.name }} + + + + + + + + + {{ item1.name }} + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
{{ type === 'Add' ? '舱位新增' : '舱位修改' }}
@@ -99,16 +189,6 @@ - - - - - - - - - - @@ -122,6 +202,16 @@ + + + + + + + + + + @@ -147,7 +237,8 @@ - {{ item.cnName + {{ + item.cnName }} @@ -161,18 +252,23 @@ - - + + - - + + - - + + + + + + + @@ -218,7 +314,8 @@
{{ item.ctnall }} - + +
费用
@@ -365,7 +462,7 @@ import { mapGetters } from 'vuex' import events from '@/components/MultiTab/events' import { AutoComplete } from 'ant-design-vue' import { - getVesselInfoService, BookingOrderDownload + getVesselInfoService, BookingOrderDownload, DjyCustomerSuggest, GetSysUserPage } from '@/api/modular/main/BookingLedger' import { BookingSlotSave, BookingSlotDetail, BookingSlotDelete, BookingSlotGetFile @@ -400,7 +497,10 @@ export default { portloadidInitList: [], portdischargeidInitList: [], boxList: [], + CustomerList: [], type: '', + UserList1: [], + UserList: [], id: 0, dataSource: [], columns: [ @@ -590,6 +690,13 @@ export default { created() { this.type = this.$route.query.type this.id = this.$route.query.id ? this.$route.query.id : '' + DjyCustomerSuggest({ keyword: '' }).then(res => { + this.CustomerList = res.data.rows + }) + GetSysUserPage().then(res => { + this.UserList = JSON.parse(JSON.stringify(res.data)) + this.UserList1 = JSON.parse(JSON.stringify(res.data)) + }) if (this.type === 'Edit') { this.getDetail() } @@ -602,6 +709,11 @@ export default { return '' } }, + SearchCustomer(e) { + DjyCustomerSuggest({ keyword: e }).then(res => { + this.CustomerList = res.data.rows + }) + }, getFileList() { BookingSlotGetFile({ id: this.id }).then(res => { if (res.success) { @@ -676,6 +788,32 @@ export default { this.loading = false }) }, + ChangeUser(e, Tname, type, index) { + if (e) { + if (type === 0) { + this.UserList.forEach(item => { + if (item.id == e) { + this.form.bookingSlotSaleInfoList[index][Tname] = item.name + } + }) + } + if (type === 1) { + this.UserList1.forEach(item => { + if (item.id == e) { + this.form.bookingSlotSaleInfoList[index][Tname] = item.name + } + }) + } + } else { + if (type === 0) { + this.UserList = JSON.parse(JSON.stringify(this.UserListAll)) + } + if (type === 1) { + this.UserList1 = JSON.parse(JSON.stringify(this.UserListAll)) + } + } + this.$forceUpdate() + }, handleSave() { console.log(this.form) if (this.form.bookinG_SLOT_TYPE === 'CONTRACT_ORDER') { @@ -697,7 +835,7 @@ export default { } }) } - this.form.weeK_AT = 'W' + this.etdWeek + // this.form.weeK_AT = 'W' + this.etdWeek this.form.ctN_STAT = this.boxTotal this.loading = true BookingSlotSave(this.form).then(res => { @@ -712,6 +850,18 @@ export default { } }) }, + SearchUser(e, type) { + if (e) { + GetSysUserPage({ name: e }).then(res => { + if (type === 0) { + this.UserList = res.data + } + if (type === 1) { + this.UserList1 = res.data + } + }) + } + }, handleClick(item) { item.flag = !item.flag const arr = [] @@ -752,6 +902,7 @@ export default { /deep/ .ant-input-number-handler-wrap { opacity: 1; } + .main { display: flex; } @@ -814,13 +965,13 @@ export default { .item-left { background: #f59a23; - color: white; - text-align: center; - height: 24px; - line-height: 24px; - display: inline-block; - padding: 0 5px; - font-size: 12px; + color: white; + text-align: center; + height: 24px; + line-height: 24px; + display: inline-block; + padding: 0 5px; + font-size: 12px; } } } @@ -1107,5 +1258,11 @@ export default { } } } - +.line-bootm{ + border-bottom: 1px dashed #696767; + margin-bottom: 10px; +} +/deep/ .ant-form-item{ + margin-bottom: 10px !important; +} diff --git a/src/views/main/CabinManagement/index.vue b/src/views/main/CabinManagement/index.vue index d628e5e..4d01fd3 100644 --- a/src/views/main/CabinManagement/index.vue +++ b/src/views/main/CabinManagement/index.vue @@ -9,6 +9,21 @@ + + + + + 全部 + + + 未取消 + + + 已取消 + + + + @@ -20,18 +35,13 @@ - - - - - - - + + - - + + @@ -43,18 +53,13 @@ - - - - - - - + + - - + + @@ -68,47 +73,25 @@ - - + + - - - + + + - - - - 直达 - - - 中转 - - - - - - - - - 合约订舱 - - - SPOT订舱 - - + + - - - {{ item.name - }} - + + @@ -135,11 +118,48 @@ + + + + + 直达 + + + 中转 + + + + + + + + + 合约订舱 + + + SPOT订舱 + + + + - - + + + + + + + + + + + + + {{ item.name + }} + @@ -179,12 +199,32 @@ @cell-dblclick="handledbclick" @sort-change="tableSortChange" @resizable-change="resizableChange" + :expand-config="{visibleMethod: expandVisibleMethod}" @checkbox-change="checkboxChangeEvent" - height="600px" + :height="tableHeight" empty-text="没有更多数据了!"> + +