diff --git a/.env b/.env index 99f2e07..c84d1c6 100644 --- a/.env +++ b/.env @@ -7,12 +7,12 @@ VUE_APP_TYPE = 'hechuan' # 打包部署的三个端 客户端customer 和川端hechuan 运营端djy # 和川大简云正式 -VUE_APP_API_BASE_URL=http://47.104.85.216:12345/api -VUE_APP_SOCKET_BASE_URL=http://47.104.85.216:12345 +# VUE_APP_API_BASE_URL=http://47.104.85.216:12345/api +# VUE_APP_SOCKET_BASE_URL=http://47.104.85.216:12345 # 和川大简云测试 -# VUE_APP_API_BASE_URL=http://60.209.125.238:35100 -# VUE_APP_SOCKET_BASE_URL=http://60.209.125.238:35100 +VUE_APP_API_BASE_URL=http://60.209.125.238:35100 +VUE_APP_SOCKET_BASE_URL=http://60.209.125.238:35100 # 客户端测试 # VUE_APP_API_BASE_URL=http://60.209.125.238:30813 diff --git a/src/api/modular/main/CompanySiteaccount.js b/src/api/modular/main/CompanySiteaccount.js index 7ddc6ba..3a95ede 100644 --- a/src/api/modular/main/CompanySiteaccount.js +++ b/src/api/modular/main/CompanySiteaccount.js @@ -78,9 +78,8 @@ export function BookingSlotDetail(parameter) { export function BookingSlotDelete(parameter) { return axios({ - url: '/BookingSlot/delete', - method: 'post', - params: parameter + url: '/BookingSlot/delete?ids=' + parameter, + method: 'post' }) } @@ -185,3 +184,19 @@ export function BookingLabelBind(parameter) { data: parameter }) } + +export function SaveDataInList(parameter) { + return axios({ + url: 'BookingSlot/SaveDataInList', + method: 'post', + data: parameter + }) +} + +export function PrintOrder(parameter) { + return axios({ + url: 'BookingSlot/PrintOrder', + method: 'post', + data: parameter + }) +} \ No newline at end of file diff --git a/src/components/generation/index.vue b/src/components/generation/index.vue index 3f8fa22..d18cf26 100644 --- a/src/components/generation/index.vue +++ b/src/components/generation/index.vue @@ -147,14 +147,14 @@ - + - + @@ -253,6 +253,22 @@ + + + +
+
+ {{ item.ctnall }} + +
+
+
+ 已选箱型:{{ boxTotal }} + 剩余箱型:{{ boxRemaining }} +
+
+
+
@@ -272,9 +288,43 @@ export default { render: (h, ctx) => ctx.props.vnodes } }, + watch: { + 'CreateData.CtnList': { + handler(nval, oval) { + if (nval && nval.length > 0) { + let str = '' + let str1 = '' + nval.forEach(item => { + if (item.ctnnum > 0) { + str += item.ctnall + '*' + ' ' + item.ctnnum + ' ' + } + }) + this.ctnListCopy.forEach(ite => { + nval.forEach(item => { + if (item.ctnall === ite.ctnall) { + if (item.ctnnum < ite.ctnnum) { + const num = ite.ctnnum - item.ctnnum + str1 += item.ctnall + '*' + ' ' + num + ' ' + } + } + }) + }) + this.boxTotal = str + this.boxRemaining = str1 + } else { + this.boxTotal = '' + this.boxRemaining = '' + } + }, + deep: true + } + }, data() { return { SlotVisible: false, + boxTotal: '', + boxRemaining: '', + ctnListCopy: [], formItemLayout: { labelCol1: { span: 6 }, wrapperCol1: { span: 18 }, @@ -293,7 +343,8 @@ export default { saleId: '', opId: '', docId: '', - custserviceId: '' + custserviceId: '', + CtnList: [] }, CustomerList: [], UserList: [], @@ -347,6 +398,21 @@ export default { projectList.push(item.serviceProjectCode) } }) + if (this.CreateData.CtnList.length > 0) { + const arr = [] + this.CreateData.CtnList.forEach(item => { + if (item.ctnnum > 0) { + arr.push(1) + } + }) + if (arr.length === 0) { + this.$message.error('至少选择1个箱子') + return false + } + } else { + this.$message.error('至少选择1个箱子') + return false + } const ApiData = { slotId: this.slotEdit.id, projectList, @@ -396,6 +462,17 @@ export default { getAvailableCtnsBySlot({ slotId: row.id }).then(res => { if (res.success) { this.slotEdit = row + if (res.data.length > 0) { + res.data.forEach(item => { + item.maxnum = item.ctnnum + }) + this.$set(this.CreateData, 'CtnList', res.data) + this.ctnListCopy = JSON.parse(JSON.stringify(res.data)) + } else { + this.$message.error('可用箱子为空,请选择其它舱位生成订舱') + this.$set(this.CreateData, 'CtnList', []) + } + this.$forceUpdate() } else { this.$message.error(res.message) } @@ -654,4 +731,26 @@ export default { /deep/ .ant-form-item { margin-bottom: 0px !important; } +.tear-list { + display: flex; + flex-wrap: wrap; + margin-top: 10px; + + .item { + margin-right: 20px; + margin-bottom: 10px; + display: flex; + align-items: flex-start; + + .item-left { + background: #f59a23; + color: white; + text-align: center; + height: 31px; + line-height: 31px; + display: inline-block; + padding: 0 5px; + } + } +} diff --git a/src/router/generator-routers.js b/src/router/generator-routers.js index 228449d..9da35e4 100644 --- a/src/router/generator-routers.js +++ b/src/router/generator-routers.js @@ -305,7 +305,7 @@ const userAccount = [ pid: 0, id: 183191, meta: { - title: 'rollingNomination', + title: 'RollingNomination', show: false }, component: 'rollingNomination' diff --git a/src/views/main/BookingGangjie/detail/index.vue b/src/views/main/BookingGangjie/detail/index.vue index eece876..2eb68cf 100644 --- a/src/views/main/BookingGangjie/detail/index.vue +++ b/src/views/main/BookingGangjie/detail/index.vue @@ -523,7 +523,11 @@ export default { const secActive = this.$refs.sedOrder.$data.editIndex hisData.secActive = secActive } - this.$set(this.historyData, `copy-${this.id}`, hisData) + if (!this.$route.query.copyId) { + this.$set(this.historyData, `copy-${this.id}`, hisData) + } else { + this.$set(this.historyData, `copy-${this.id}-${this.$route.query.copyId}`, hisData) + } } else if (this.$route.query.addNum) { const hisData = { bookingDetails: this.bookingDetails, @@ -748,8 +752,7 @@ export default { getRouterHis() { this.inChildLoading = true const newId = this.$route.query.id ? this.$route.query.id.toString() : '' - if ((Object.keys(this.historyData).includes(`copy-${newId}`) || Object.keys(this.historyData).includes(`copy-${newId}-${this.$route.query.copyId}`)) && - this.$route.query.isCopy === 'true') { + if ((Object.keys(this.historyData).includes(`copy-${newId}`)) && this.$route.query.isCopy === 'true' && !this.$route.query.copyId) { if (!this.$route.query.copyId) { const $data = JSON.parse(JSON.stringify(this.historyData[`copy-${newId}`])) this.bookingDetails = $data.bookingDetails @@ -759,15 +762,6 @@ export default { this.isAdd = $data.isAdd this.tabActiveKey = $data.tabActiveKey this.mainOrderActiveKey = $data.mainOrderActiveKey - } else { - const $data = JSON.parse(JSON.stringify(this.historyData[`copy-${newId}-${this.$route.query.copyId}`])) - this.bookingDetails = $data.bookingDetails - this.oldBookingDetails = JSON.parse(JSON.stringify(this.bookingDetails)) - this.excuteRules = $data.excuteRules - this.excuteRulesType = $data.excuteRulesType - this.isAdd = $data.isAdd - this.tabActiveKey = $data.tabActiveKey - this.mainOrderActiveKey = $data.mainOrderActiveKey } this.id = this.$route.query.id this.isCopy = this.$route.query.isCopy @@ -802,6 +796,48 @@ export default { this.isLockBooking = false this.getFilter() this.$forceUpdate() + } else if (this.$route.query.isCopy === 'true' && this.$route.query.copyId && Object.keys(this.historyData).includes(`copy-${newId}-${this.$route.query.copyId}`)) { + const $data = JSON.parse(JSON.stringify(this.historyData[`copy-${newId}-${this.$route.query.copyId}`])) + this.bookingDetails = $data.bookingDetails + this.oldBookingDetails = JSON.parse(JSON.stringify(this.bookingDetails)) + this.excuteRules = $data.excuteRules + this.excuteRulesType = $data.excuteRulesType + this.isAdd = $data.isAdd + this.tabActiveKey = $data.tabActiveKey + this.mainOrderActiveKey = $data.mainOrderActiveKey + this.id = this.$route.query.id + this.isCopy = this.$route.query.isCopy + this.inPageLoading = false + setTimeout(() => { + if (this.bookingDetails.hbList && this.bookingDetails.hbList.length > 0) { + this.Showtabs = true + if (Object.keys(this.$refs).includes('sedOrder')) { + this.$refs.sedOrder.init(this.bookingDetails.hbList) + } + } else { + this.Showtabs = false + if (Object.keys(this.$refs).includes('sedOrder')) { + this.$refs.sedOrder.init([]) + } + } + if (Object.keys(this.$refs).includes('goodsTable')) { + this.$refs.goodsTable.init() + } + }, 200) + setTimeout(() => { + const key = this.$route.fullPath + const detailsChange = Object.keys(this.needSavePages).includes(key) + ? !!this.needSavePages[key].details + : false + this.checkSaveFun({ type: 'details', hasChange: detailsChange }) + + const hbListChange = !!this.needSavePages[key].hbList + this.checkSaveFun({ type: 'hbList', hasChange: hbListChange }) + this.inChildLoading = false + }, 500) + this.isLockBooking = false + this.getFilter() + this.$forceUpdate() } else if ( Object.keys(this.historyData).includes(`add-${this.$route.query.addNum}`) && this.$route.query.addNum @@ -956,6 +992,7 @@ export default { this.$refs.basicInfo.$refs.basicFrom.clearValidate() this.$refs.mailingInfo.$refs.mailingFrom.clearValidate() this.$refs.cargoInfo.$refs.cargoFrom.clearValidate() + console.log(this.historyData) }, init() { this.bookingDetails = JSON.parse(JSON.stringify(initDetail)) diff --git a/src/views/main/BookingGangjie/detail/modules/basicInfo.vue b/src/views/main/BookingGangjie/detail/modules/basicInfo.vue index 4b6cc97..fdc2e29 100644 --- a/src/views/main/BookingGangjie/detail/modules/basicInfo.vue +++ b/src/views/main/BookingGangjie/detail/modules/basicInfo.vue @@ -341,11 +341,14 @@ type="vesselGangjie" :disabled="BookingLockOrder['vessel'] && isLockBooking" :defaultVal="details.vessel" - searchApi="GetVessellist" + searchApi="getVesselInfoService" :searchQuery="{ KeyWord: '', + PortDischargeId: this.details.portdischargeid || '', + CarrierID: this.details.carrierid || 'CMA', + ETD: this.details.etd || '' }" - :showLabel="['name']" + :showLabel="['vessel']" v-if="!vesselFrom" :openSearch="true" @change="getSelectViewRes"> diff --git a/src/views/main/BookingGangjie/list/index.vue b/src/views/main/BookingGangjie/list/index.vue index 5e5e8e2..d0bbb58 100644 --- a/src/views/main/BookingGangjie/list/index.vue +++ b/src/views/main/BookingGangjie/list/index.vue @@ -2430,14 +2430,6 @@ export default { const moreData = [] arr.map((item, index) => { this.formAllData.map((fitem, findex) => { - if (fitem.label === 'VESSEL') { - if (this.vesselFrom) { - fitem.type = 'select' - } else { - fitem.type = 'complete' - fitem.showLabel = 'name' - } - } if (fitem.label === item) { nowData.push(fitem) } @@ -2463,6 +2455,14 @@ export default { this.formMoreData = moreData } this.formData.map((item, index) => { + if (item.label === 'VESSEL') { + if (this.vesselFrom) { + item.type = 'select' + } else { + item.type = 'complete' + item.showLabel = 'name' + } + } this.$set(this.formRes, item.label, this.formRes[item.label] || '') // select 船公司 等获取下拉列表 if (item.type === 'select') { diff --git a/src/views/main/BookingLedger/detail/index.vue b/src/views/main/BookingLedger/detail/index.vue index 8021501..d7f34d2 100644 --- a/src/views/main/BookingLedger/detail/index.vue +++ b/src/views/main/BookingLedger/detail/index.vue @@ -524,11 +524,7 @@ export default { const secActive = this.$refs.sedOrder.$data.editIndex hisData.secActive = secActive } - if (!this.$route.query.copyId) { - this.$set(this.historyData, `copy-${this.id}`, hisData) - } else { - this.$set(this.historyData, `copy-${this.id}-${this.$route.query.copyId}`, hisData) - } + this.$set(this.historyData, `copy-${this.id}`, hisData) } else if (this.$route.query.addNum) { const hisData = { bookingDetails: this.bookingDetails, @@ -602,7 +598,7 @@ export default { this.$set(this.historyData, `copy-${this.id}`, hisData) } else { this.$set(this.historyData, `copy-${this.id}-${this.$route.query.copyId}`, hisData) - console.log(this.historyData,this.$route.query.copyId) + console.log(this.historyData, this.$route.query.copyId) } } else if (this.$route.query.addNum) { const hisData = { @@ -751,7 +747,8 @@ export default { getRouterHis() { this.inChildLoading = true const newId = this.$route.query.id ? this.$route.query.id.toString() : '' - if ((Object.keys(this.historyData).includes(`copy-${newId}`)) && this.$route.query.isCopy === 'true' && !this.$route.query.copyId) { + if ((Object.keys(this.historyData).includes(`copy-${newId}`) || Object.keys(this.historyData).includes(`copy-${newId}-${this.$route.query.copyId}`)) && + this.$route.query.isCopy === 'true') { if (!this.$route.query.copyId) { const $data = JSON.parse(JSON.stringify(this.historyData[`copy-${newId}`])) this.bookingDetails = $data.bookingDetails @@ -761,6 +758,15 @@ export default { this.isAdd = $data.isAdd this.tabActiveKey = $data.tabActiveKey this.mainOrderActiveKey = $data.mainOrderActiveKey + } else { + const $data = JSON.parse(JSON.stringify(this.historyData[`copy-${newId}-${this.$route.query.copyId}`])) + this.bookingDetails = $data.bookingDetails + this.oldBookingDetails = JSON.parse(JSON.stringify(this.bookingDetails)) + this.excuteRules = $data.excuteRules + this.excuteRulesType = $data.excuteRulesType + this.isAdd = $data.isAdd + this.tabActiveKey = $data.tabActiveKey + this.mainOrderActiveKey = $data.mainOrderActiveKey } this.id = this.$route.query.id this.isCopy = this.$route.query.isCopy @@ -795,48 +801,6 @@ export default { this.isLockBooking = false this.getFilter() this.$forceUpdate() - } else if (this.$route.query.isCopy === 'true' && this.$route.query.copyId && Object.keys(this.historyData).includes(`copy-${newId}-${this.$route.query.copyId}`)) { - const $data = JSON.parse(JSON.stringify(this.historyData[`copy-${newId}-${this.$route.query.copyId}`])) - this.bookingDetails = $data.bookingDetails - this.oldBookingDetails = JSON.parse(JSON.stringify(this.bookingDetails)) - this.excuteRules = $data.excuteRules - this.excuteRulesType = $data.excuteRulesType - this.isAdd = $data.isAdd - this.tabActiveKey = $data.tabActiveKey - this.mainOrderActiveKey = $data.mainOrderActiveKey - this.id = this.$route.query.id - this.isCopy = this.$route.query.isCopy - this.inPageLoading = false - setTimeout(() => { - if (this.bookingDetails.hbList && this.bookingDetails.hbList.length > 0) { - this.Showtabs = true - if (Object.keys(this.$refs).includes('sedOrder')) { - this.$refs.sedOrder.init(this.bookingDetails.hbList) - } - } else { - this.Showtabs = false - if (Object.keys(this.$refs).includes('sedOrder')) { - this.$refs.sedOrder.init([]) - } - } - if (Object.keys(this.$refs).includes('goodsTable')) { - this.$refs.goodsTable.init() - } - }, 200) - setTimeout(() => { - const key = this.$route.fullPath - const detailsChange = Object.keys(this.needSavePages).includes(key) - ? !!this.needSavePages[key].details - : false - this.checkSaveFun({ type: 'details', hasChange: detailsChange }) - - const hbListChange = !!this.needSavePages[key].hbList - this.checkSaveFun({ type: 'hbList', hasChange: hbListChange }) - this.inChildLoading = false - }, 500) - this.isLockBooking = false - this.getFilter() - this.$forceUpdate() } else if ( Object.keys(this.historyData).includes(`add-${this.$route.query.addNum}`) && this.$route.query.addNum @@ -991,7 +955,6 @@ export default { this.$refs.basicInfo.$refs.basicFrom.clearValidate() this.$refs.mailingInfo.$refs.mailingFrom.clearValidate() this.$refs.cargoInfo.$refs.cargoFrom.clearValidate() - console.log(this.historyData) }, init() { this.bookingDetails = JSON.parse(JSON.stringify(initDetail)) @@ -1513,6 +1476,15 @@ export default { this.bookingDetails.etd = slots[0].etd this.bookingDetails.cntrtotal = slots[0].ctN_STAT this.bookingDetails.startETA = slots[0].eta + this.bookingDetails.contractno = slots[0].contracT_NO + this.bookingDetails.closingdate = slots[0].cY_CUT_DATE + this.bookingDetails.closedocdate = slots[0].manifesT_CUT_DATE + this.bookingDetails.closevgmdate = slots[0].vgM_SUBMISSION_CUT_DATE + + this.bookingDetails.portloadid = slots[0].portloadid + this.bookingDetails.portload = slots[0].portload + this.bookingDetails.portdischargeid = slots[0].portdischargeid + this.bookingDetails.portdischarge = slots[0].portdischarge this.$forceUpdate() this.$refs.goodsTable.refsh() }, diff --git a/src/views/main/BookingLedger/detail/modules/basicInfo.vue b/src/views/main/BookingLedger/detail/modules/basicInfo.vue index 90b9143..dbd0066 100644 --- a/src/views/main/BookingLedger/detail/modules/basicInfo.vue +++ b/src/views/main/BookingLedger/detail/modules/basicInfo.vue @@ -558,25 +558,6 @@ - - - - - - + + + + + + diff --git a/src/views/main/BookingLedger/detail/modules/operationArea.vue b/src/views/main/BookingLedger/detail/modules/operationArea.vue index 0273b7a..4f07fed 100644 --- a/src/views/main/BookingLedger/detail/modules/operationArea.vue +++ b/src/views/main/BookingLedger/detail/modules/operationArea.vue @@ -2246,7 +2246,6 @@ export default { } }); } - this.cabinSpaceFlag = false }, handlePushBC() { diff --git a/src/views/main/CabinInventory/index.vue b/src/views/main/CabinInventory/index.vue index 2576769..93edfb6 100644 --- a/src/views/main/CabinInventory/index.vue +++ b/src/views/main/CabinInventory/index.vue @@ -26,18 +26,7 @@ - - - {{ - item.enName }} - + @@ -54,8 +43,8 @@ - - + + {{ item.name }} @@ -73,19 +62,7 @@ - - - {{ - item.enName }} - + @@ -260,19 +237,19 @@ export default { title: '交货地', align: 'center', width: '100', - field: 'portload' + field: 'placedelivery' }, { title: '装货港', align: 'center', width: '100', - field: 'portdischarge' + field: 'portload' }, { title: '卸货港', align: 'center', width: '100', - field: 'placedelivery' + field: 'portdischarge' }, { title: '卸货港国家', @@ -280,12 +257,6 @@ export default { width: '100', field: 'portdischargE_COUNTRY' }, - { - title: 'WEEK', - align: 'center', - width: '150', - field: 'weeK_AT' - }, { title: '航线', align: 'center', @@ -388,19 +359,19 @@ export default { title: '交货地', align: 'center', width: '100', - field: 'portload' + field: 'placedelivery' }, { title: '装货港', align: 'center', width: '100', - field: 'portdischarge' + field: 'portload' }, { title: '卸货港', align: 'center', width: '100', - field: 'placedelivery' + field: 'portdischarge' }, { title: '卸货港国家', @@ -408,12 +379,6 @@ export default { width: '100', field: 'portdischargE_COUNTRY' }, - { - title: 'WEEK', - align: 'center', - width: '150', - field: 'weeK_AT' - }, { title: '航线', align: 'center', diff --git a/src/views/main/CabinManagement/details.vue b/src/views/main/CabinManagement/details.vue index f10fde2..fe6cf04 100644 --- a/src/views/main/CabinManagement/details.vue +++ b/src/views/main/CabinManagement/details.vue @@ -12,7 +12,7 @@ -
关联订舱
+
关联订舱
- + @@ -260,7 +260,7 @@ - + @@ -275,6 +275,43 @@ + + + + + + {{ + item.enName }} + + + + + + + + {{ + item.enName }} + + + +
截止时间
@@ -395,28 +432,27 @@
+
- 修改人 - 修改时间 + 修改人 + 修改时间
- {{ log.createdUserName }} - + {{ log.createdUserName }} + {{ log.createdTime }} - -
@@ -465,7 +501,7 @@ import { mapGetters } from 'vuex' import events from '@/components/MultiTab/events' import { AutoComplete } from 'ant-design-vue' import { - getVesselInfoService, BookingOrderDownload, DjyCustomerSuggest, GetSysUserPage + getVesselInfoService, BookingOrderDownload, DjyCustomerSuggest, GetSysUserPage, GetPortloadlist, GetPortlist } from '@/api/modular/main/BookingLedger' import { BookingSlotSave, BookingSlotDetail, BookingSlotDelete, BookingSlotGetFile @@ -503,6 +539,7 @@ export default { boxList: [], CustomerList: [], type: '', + fetching: false, UserList1: [], UserList: [], id: 0, @@ -714,6 +751,13 @@ export default { return '' } }, + handleSearch(e) { + this.fetching = true + GetPortloadlist({ KeyWord: e }).then(res => { + this.portloadidInitList = res.data + this.fetching = false + }) + }, SearchCustomer(e) { DjyCustomerSuggest({ keyword: e }).then(res => { this.CustomerList = res.data.rows @@ -784,7 +828,7 @@ export default { }, handleDelete() { this.loading = true - BookingSlotDelete({ id: this.id }).then(res => { + BookingSlotDelete(this.id).then(res => { if (res.success) { this.$router.push({ name: 'CabinManagement' @@ -796,6 +840,13 @@ export default { this.loading = false }) }, + getSelectFirst() { + if (!this.firstFlag) { + this.portloadidInitList = this.bookingInitData.portloadidInitList + this.portdischargeidInitList = this.bookingInitData.portdischargeidInitList + this.firstFlag = true + } + }, ChangeUser(e, Tname, type, index) { if (e) { if (type === 0) { @@ -822,6 +873,20 @@ export default { } this.$forceUpdate() }, + handleChange1(val) { + this.portloadidInitList.forEach(item => { + if (item.ediCode === val) { + this.form.PORTLOAD = item.enName + } + }) + }, + handleChange2(val) { + this.portdischargeidInitList.forEach(item => { + if (item.ediCode === val) { + this.form.PORTDISCHARGE = item.enName + } + }) + }, handleSave() { if (this.form.bookinG_SLOT_TYPE === 'CONTRACT_ORDER') { this.form.bookinG_SLOT_TYPE_NAME = '合约订舱' @@ -844,11 +909,13 @@ export default { } this.form.ctN_STAT = this.boxTotal this.loading = true - for (let i = 0; i < this.form.bookingSlotSaleInfoList.length; i++) { - this.form.bookingSlotSaleInfoList[i].updateFlag = false - const change = this.compareObjects(this.form.bookingSlotSaleInfoList[i], this.oldBook[i]) - if (Object.keys(change).length > 0) { - this.form.bookingSlotSaleInfoList[i].updateFlag = true + if (this.form.bookingSlotSaleInfoList && this.form.bookingSlotSaleInfoList.length > 0) { + for (let i = 0; i < this.form.bookingSlotSaleInfoList.length; i++) { + this.form.bookingSlotSaleInfoList[i].updateFlag = false + const change = this.compareObjects(this.form.bookingSlotSaleInfoList[i], this.oldBook[i]) + if (Object.keys(change).length > 0) { + this.form.bookingSlotSaleInfoList[i].updateFlag = true + } } } BookingSlotSave(this.form).then(res => { @@ -920,6 +987,19 @@ export default { } return differences; }, + 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 + }) + }, getWeek(dateTime) { // eslint-disable-next-line camelcase const temp_ms = new Date(dateTime).getTime() @@ -1187,121 +1267,170 @@ export default { } .collapse-box { - background: #fff; - padding-top: 0; - padding-bottom: 0; - border: none; - - .title { + background: #fff; + padding-top: 0; + padding-bottom: 0; border: none; - } - - .cargo-info { - max-height: 800px; - overflow: scroll; - - .info-header { - display: flex; - background: #f4f4f4; - height: 40px; - line-height: 40px; - text-align: center; - - span { - display: inline-block; - border: 1px solid #eee; - flex: 1; - - &:nth-of-type(1) { - border-right: none; + .title { + border: none; + } + .cargo-info { + max-height: 1015px; + overflow-x: scroll; + .info-header { + display: flex; + background: #f4f4f4; + height: 40px; + line-height: 40px; + text-align: center; + span { + display: inline-block; + border: 1px solid #eee; + &:nth-of-type(1) { + border-right: none; + } } } - } - - .list { - display: flex; - background: #fff; - height: 40px; - line-height: 40px; - text-align: center; - - .btn { - display: inline-block; - flex: 1; - border: 1px solid #eee; - border-top: none; - padding: 0 8px; - overflow: hidden; - - &:nth-of-type(1) { - padding: 0 19px; - border-right: none; + .list { + display: flex; + background: #fff; + min-height: 30px; + // line-height: 40px; + text-align: center; + .btn { + display: inline-block; + // flex: 1; + border: 1px solid #eee; + border-top: none; + padding: 0 8px; + font-size: 12px; + overflow: hidden; + &:nth-of-type(1) { + padding: 0 2px; + border-right: none; + line-height: 30px; + } + &:nth-of-type(2) { + padding-right: 5px; + position: relative; + line-height: 30px; + } } - - &:nth-of-type(2) { - padding-right: 30px; - position: relative; + .more { + width: 30px; + text-align: center; + transition: 0.5s all; + position: absolute; + top: 0; + right: 4px; + color: #999; + &.show { + transform: rotate(180deg); + } } } - - .more { - width: 30px; - text-align: center; - transition: 0.5s all; - position: absolute; - top: 0; - right: 4px; - color: #999; - - &.show { - transform: rotate(180deg); + .more-detail { + border-left: 1px solid #eee; + border-right: 1px solid #eee; + border-bottom: 1px solid #eee; + background: #f4f4f4; + padding: 0 14px; + .detail-single { + border-bottom: 1px dashed #ccc; + font-size: 12px; + color: #999; + padding: 4px 0; + &:nth-last-of-type(1) { + border: none; + } + .old { + // height: 26px; + line-height: 26px; + color: #666; + } + .new { + // height: 26px; + line-height: 26px; + color: #f9a629; + } + .o-title { + font-size: 12px; + font-weight: 600; + margin-right: 8px; + } + .line { + height: 26px; + line-height: 26px; + } } } } + } + /*日志加滚动条 */ + ::-webkit-scrollbar { + width: 5px; + height: 10px; + } + // ::-webkit-scrollbar:hover { + // width: 6px; + // height: 10px; + // } - .more-detail { - border-left: 1px solid #eee; - border-right: 1px solid #eee; - border-bottom: 1px solid #eee; - background: #f4f4f4; - padding: 0 14px; + // 滚动条两端的按钮 + ::-webkit-scrollbar-button { + display: none; + background-color: transparent; + width: 100px; + height: 10px; + } - .detail-single { - border-bottom: 1px dashed #ccc; - font-size: 12px; - color: #999; - padding: 4px 0; + // 滚动条的滑块部分 + ::-webkit-scrollbar-thumb { + background: #aaa; + border: 0px none #ffffff; + border-radius: 50px; + } - &:nth-last-of-type(1) { - border: none; - } + // 滚动条滑块的hover样式 - .old { - // height: 26px; - line-height: 26px; - color: #666; - } + // ::-webkit-scrollbar-thumb:hover { + // background: #2b6cb0; + // } - .new { - // height: 26px; - line-height: 26px; - color: #f9a629; - } + // 滚动条滑块的激活样式 + ::-webkit-scrollbar-thumb:active { + background: #aaa; + } - .o-title { - font-size: 12px; - font-weight: 600; - margin-right: 8px; - } + // 滚动条的外层轨道 + ::-webkit-scrollbar-track { + background: transparent; + border: 0px none #ffffff; + border-radius: 50px; + } - .line { - height: 26px; - line-height: 26px; - } - } - } + // ::-webkit-scrollbar-track:hover { + // background: #666666; + // } + + ::-webkit-scrollbar-track:active { + background: #fff; + } + + // 滚动条的外层轨道-可见部分 + ::-webkit-scrollbar-track-piece { + background: transparent; + } + + // 滚动条边角 + ::-webkit-scrollbar-corner { + background: transparent; + } + + // 滚动条右下角拖动块 + ::-webkit-resizer { + background-color: transparent; } -} .line-bootm { border-bottom: 1px dashed #cccbcb; diff --git a/src/views/main/CabinManagement/index.vue b/src/views/main/CabinManagement/index.vue index 8927edb..4df667a 100644 --- a/src/views/main/CabinManagement/index.vue +++ b/src/views/main/CabinManagement/index.vue @@ -155,8 +155,8 @@ - - + + {{ item.name }} @@ -164,12 +164,7 @@ - + {{ item.name }} @@ -184,16 +179,18 @@
新增 + 作废 + 分配标签 导入 - 作废 - 分配标签 + 导出
@@ -244,6 +241,24 @@ + @@ -304,6 +308,103 @@ export default { console.log(this.form.getFieldsValue()) }, 100) }, + handleCopySave() { + const { + form: { validateFields } + } = this + this.confirmLoading = true + validateFields((errors, values) => { + console.log(errors, values) + if (!errors) { + for (const key in values) { + console.log(key, 1) + if (typeof values[key] === 'object' && !(values[key] === null)) { + values[key] = JSON.stringify(values[key]) + } + } + if (!values.carrier) { + values.carrier = this.data.carrier + } + values.id = this.data.id + if (this.portLoadingData.length) { + this.portLoadingData.forEach(item => { + if (item.code == values.portLoadingId) { + values.portLoading = item.enName + } + }) + } + if (this.portTransitData.length) { + this.portTransitData.forEach(item => { + if (item.code == values.portTransitId) { + values.portTransit = item.enName + } + }) + } + if (this.portDischargeData.length) { + this.portDischargeData.forEach(item => { + if (item.code == values.portDischargeId) { + values.portDischarge = item.enName + } + }) + } + if (this.carrierData.length) { + this.carrierData.forEach(item => { + if (item.code == values.carrierid) { + values.carrier = item.cnName + } + }) + } + if (this.yardData.length) { + this.yardData.forEach(item => { + if (item.code == values.yardCode) { + values.yard = item.name + } + }) + } + DjyVesselInfoServiceAddOrUpdate(values) + .then(res => { + if (res.success) { + this.$message.success('编辑成功') + this.confirmLoading = false + this.$emit('ok', values) + this.editRow(values) + } else { + this.$message.error(`编辑失败,${res.message}`) + } + }) + .finally(res => { + this.confirmLoading = false + }) + } else { + this.confirmLoading = false + } + }) + }, + editRow(record) { + this.data = record + setTimeout(() => { + this.form.setFieldsValue({ + vessel: record.vessel, + voyno: record.voyno, + portTransitId: record.portTransitId, + portDischargeId: record.portDischargeId, + portTransit: record.portTransit, + portLoadingId: '', + portLoading: '', + portDischarge: record.portDischarge, + etd: record.etd, + closingDate: record.closingDate, + eta: record.eta, + yard: record.yard, + ygtETD: record.ygtETD, + yardCode: record.yardCode, + atd: record.atd, + carrierid: record.carrierid, + voynoInside: record.voynoInside, + closeDocTime: record.closeDocTime + }) + }, 100) + }, // tenantSearch(data) { // SysTenantPage({ Name: data }).then(res => { // this.tenantData = res.data.rows