From b35d85d61548cdd9a32923c2869b4832a38e00aa Mon Sep 17 00:00:00 2001 From: sunzehua Date: Thu, 22 Feb 2024 18:05:34 +0800 Subject: [PATCH] =?UTF-8?q?=E8=88=B9=E6=9C=9F=E7=BB=B4=E6=8A=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/modular/main/TaskmanageList.js | 32 + src/components/tableSort/index.vue | 239 +++ src/store/modules/user.js | 19 + src/utils/socket.js | 66 +- src/views/main/BookingLedger/detail/index.vue | 17 +- .../detail/modules/goodsTable.vue | 2 +- src/views/main/BookingLedger/list/index.vue | 7 +- .../main/BookingLedger/list/indexTest.vue | 141 +- .../BookingLedger/list/modules/formLabel.vue | 4 + .../BookingLedger/list/modules/initData.js | 2 +- .../main/Taskmanage/notifications/index.vue | 1757 +++++++---------- .../Taskmanage/rollingNomination/index.vue | 133 +- src/views/main/fee/feeTemplate.vue | 1 + src/views/main/vesselinfo/index.vue | 298 ++- src/views/userLoginReg/Login.vue | 1 + vue.config.js | 3 +- 16 files changed, 1443 insertions(+), 1279 deletions(-) create mode 100644 src/components/tableSort/index.vue diff --git a/src/api/modular/main/TaskmanageList.js b/src/api/modular/main/TaskmanageList.js index a448f22..a648128 100644 --- a/src/api/modular/main/TaskmanageList.js +++ b/src/api/modular/main/TaskmanageList.js @@ -414,6 +414,14 @@ export function SaveDetai1Container(parameter) { }) } +export function GenShareLink(parameter) { + return axios({ + url: '/TaskManageRollingNomination/GenShareLink', + method: 'post', + data: parameter + }) +} + export function PushShareLink(parameter) { return axios({ url: '/TaskManageRollingNomination/PushShareLink', @@ -421,3 +429,27 @@ export function PushShareLink(parameter) { data: parameter }) } + +export function shareGetinfo(parameter) { + return axios({ + url: '/TaskManageShareLink/GetInfo', + method: 'get', + params: parameter + }) +} + +export function PushShareLinkFeedBack(parameter) { + return axios({ + url: '/TaskManageShareLink/PushShareLinkFeedBack', + method: 'post', + data: parameter + }) +} + +export function GetUserFeedBack(parameter) { + return axios({ + url: '/TaskManageRollingNomination/GetUserFeedBack', + method: 'post', + params: parameter + }) +} \ No newline at end of file diff --git a/src/components/tableSort/index.vue b/src/components/tableSort/index.vue new file mode 100644 index 0000000..e94bb7e --- /dev/null +++ b/src/components/tableSort/index.vue @@ -0,0 +1,239 @@ + + + + diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 3a2bbcd..3650224 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -4,7 +4,9 @@ import { sysDictTypeTree } from '@/api/modular/system/dictManage' import { sysMenuChange } from '@/api/modular/system/menuManage' import { ACCESS_TOKEN, ALL_APPS_MENU, DICT_TYPE_TREE_DATA, NOTICE_RECEIVED } from '@/store/mutation-types' import { sysFileInfoPreview } from '@/api/modular/system/fileManage' +import { getVesselInfoService } from '@/api/modular/main/BookingLedger' import { unReadNotice } from '@/api/modular/system/noticeReceivedManage' +import moment from 'moment' import { welcome, dateFormat } from '@/utils/util' import store from '../index' import router from '../../router' @@ -213,6 +215,23 @@ const user = { }) }, + getVesselinfo() { + const etdStart = moment().subtract(3, 'days').format('YYYY-MM-DD'); + const etdEnd = moment().add(3, 'days').format('YYYY-MM-DD'); + const query = { + sortField: 'etd', + descSort: true, + etdStart: etdStart, + etdEnd: etdEnd, + limit: 1000 + } + getVesselInfoService(query).then(res => { + if (res.success) { + localStorage.setItem('vesselInfo', JSON.stringify(res.data)) + } + }) + }, + // 加载所有字典数据 dictTypeData() { return new Promise((resolve, reject) => { diff --git a/src/utils/socket.js b/src/utils/socket.js index d71915e..05b84da 100644 --- a/src/utils/socket.js +++ b/src/utils/socket.js @@ -48,39 +48,39 @@ class SocketConnection extends EventEmitter { async start(token) { // 组件重新加载时, 如果 socket 存在, 不需要新建 - // if (!this.socket) { - // this.socket = new SignalR.HubConnectionBuilder() - // .configureLogging(SignalR.LogLevel.Information) - // .withUrl(`/hubs/chathub`, { - // accessTokenFactory: () => token, - // skipNegotiation: true, - // transport: SignalR.HttpTransportType.WebSockets - // }) - // .build() - // this.socket.on('ForceExist', () => { - // //可以做相关业务逻辑 - // store - // .dispatch('Logout') - // .then(() => { - // window.location.reload() - // }) - // .catch(err => { - // this.$message.error({ - // title: '错误', - // description: err.message - // }) - // }) - // }) - // this.socket.on('AppendNotice', notice => { - // store.commit('APPEND_NOTICE', notice) - // }) - // this.socket.onclose(async () => { - // this.offline = true - // this.emit('onclose') - // await this._initialize() - // }) - // await this._initialize() - // } + if (!this.socket) { + this.socket = new SignalR.HubConnectionBuilder() + .configureLogging(SignalR.LogLevel.Information) + .withUrl(`/hubs/chathub`, { + accessTokenFactory: () => token, + skipNegotiation: true, + transport: SignalR.HttpTransportType.WebSockets + }) + .build() + this.socket.on('ForceExist', () => { + store + .dispatch('Logout') + .then(() => { + window.location.reload() + }) + .catch(err => { + this.$message.error({ + title: '错误', + description: err.message + }) + }) + }) + this.socket.on('NotifyVesselChange', () => { + store.dispatch('getVesselinfo') + }) + + this.socket.onclose(async () => { + this.offline = true + this.emit('onclose') + await this._initialize() + }) + await this._initialize() + } } async authenticate(token) { diff --git a/src/views/main/BookingLedger/detail/index.vue b/src/views/main/BookingLedger/detail/index.vue index dfbc9dd..7da457d 100644 --- a/src/views/main/BookingLedger/detail/index.vue +++ b/src/views/main/BookingLedger/detail/index.vue @@ -120,7 +120,7 @@ ref="iframe" @load="handleIframeLoad" style="width: 100%;height: 1400px;" - src="http://localhost:8080/#/index" + src="http://60.209.125.238:35103/#/index" frameborder="0"> @@ -1833,8 +1833,19 @@ export default { return diffRes; }, refreshPage() { - this.init() - this.$refs.rightContent.init() + if (this.feeShow) { + const mapFrame = this.$refs['iframe'] + const iframeWin = mapFrame.contentWindow + iframeWin.postMessage( + { + id: this.bookingDetails.id, + type: 'empty' + }, '*') + } + setTimeout(() => { + this.init() + this.$refs.rightContent.init() + }, 100); }, getRules(data) { const { rows, type } = data diff --git a/src/views/main/BookingLedger/detail/modules/goodsTable.vue b/src/views/main/BookingLedger/detail/modules/goodsTable.vue index 84c3872..8dc71d9 100644 --- a/src/views/main/BookingLedger/detail/modules/goodsTable.vue +++ b/src/views/main/BookingLedger/detail/modules/goodsTable.vue @@ -2159,7 +2159,7 @@ export default { .left { text-align: left; - width: 660px; + width: 715px; float: left; .btn { diff --git a/src/views/main/BookingLedger/list/index.vue b/src/views/main/BookingLedger/list/index.vue index 9f37e16..8b09b9b 100644 --- a/src/views/main/BookingLedger/list/index.vue +++ b/src/views/main/BookingLedger/list/index.vue @@ -1310,7 +1310,7 @@ const formInitData = [ { title: '订舱编号', align: 'center', width: '90', label: 'CUSTNO', type: 'input' }, { title: '开船日期', align: 'center', width: 160, label: 'ETD', type: 'dateRange', resLabel: ['BETD', 'EETD'] }, { title: '实际开船日期', align: 'center', width: 160, label: 'ATD', type: 'dateRange', resLabel: ['BATD', 'EATD'] }, - { title: '船名', align: 'center', width: '90', label: 'VESSEL', type: 'input' } + { title: '船名', align: 'center', width: '90', label: 'VESSEL', type: 'select' } ] export default { name: 'BookingLedger', @@ -2176,6 +2176,9 @@ export default { const moreData = [] arr.map((item, index) => { this.formAllData.map((fitem, findex) => { + if (fitem.label === 'VESSEL') { + fitem.type = 'select' + } if (fitem.label === item) { nowData.push(fitem) } @@ -3252,7 +3255,7 @@ export default { } } else if (form.label === 'VESSEL') { const etdStart = moment().subtract(3, 'days').format('YYYY-MM-DD'); - const etdEnd = moment().add(7, 'days').format('YYYY-MM-DD'); + const etdEnd = moment().add(3, 'days').format('YYYY-MM-DD'); query = { KeyWord: value, sortField: 'etd', diff --git a/src/views/main/BookingLedger/list/indexTest.vue b/src/views/main/BookingLedger/list/indexTest.vue index 815f670..471777a 100644 --- a/src/views/main/BookingLedger/list/indexTest.vue +++ b/src/views/main/BookingLedger/list/indexTest.vue @@ -144,13 +144,11 @@ @@ -345,19 +343,13 @@ @@ -1263,10 +1255,13 @@ - +} + diff --git a/src/views/main/Taskmanage/rollingNomination/index.vue b/src/views/main/Taskmanage/rollingNomination/index.vue index 732acbb..cdca66c 100644 --- a/src/views/main/Taskmanage/rollingNomination/index.vue +++ b/src/views/main/Taskmanage/rollingNomination/index.vue @@ -61,12 +61,14 @@ 预甩明细 发送通知 刷新订舱对应 + 刷新
{{ text }} - {{ text }} + {{ text }}
@@ -337,7 +342,7 @@
-
{{ userRow.userOpinionTxt }}
+
{{ userRow }}
- + - - - {{ item.name }} + + + {{ item.name + }} - + + + @@ -415,7 +407,9 @@ import { CreateShareLink, GetPreBillDetailList, SaveDetai1Container, - PushShareLink + PushShareLink, + GenShareLink, + GetUserFeedBack } from '@/api/modular/main/TaskmanageList' import { mapGetters } from 'vuex' import { DjyCustomerSuggest, GetSysUserPage, DjyCustomerContacts } from '@/api/modular/main/BookingLedger' @@ -425,14 +419,17 @@ export default { CustomerList: [], CreateData: {}, ctnCode: '', + manualDeadLineDate: '', ctnChangeFlag: false, UserId: '', confirmDeadLine: '', + dateFlag: false, selectedRowKeys: [], carrierId: '', value: '', selectedRowKeysTable: [], getloadDetailList: [], + tableLoad: false, data: [], confirmLoading: false, ctnList: [{ shipment: '123' }], @@ -704,9 +701,12 @@ export default { this.handleCopy(row)} style={{ marginRight: '5px' }} >复制 this.handleChange(row)}>改配 -
+
this.handleAgain(row)}>重新生成
+
+ this.handleShare(row)}>生成 +
, attrs: {} }; @@ -770,6 +770,7 @@ export default { rollingPlanList: [], nominationId: '', toData: {}, + dateRow: {}, openRow: {}, getLoad: false, rollingTouchDoubleRollRemark: '', @@ -806,8 +807,31 @@ export default { this.$message.success('复制成功') }, handleLook(row) { - TaskManageRolingWominationGetUrl({ batchId: row.batchId }).then(res => { - + this.tableLoad = true + TaskManageRolingWominationGetUrl({ dispatchBatchId: row.batchId }).then(res => { + if (res.data.succ) { + const href = 'http://' + window.location.host + '/notifications?key=' + res.data.ext + window.open(href, '_blank') + } else { + this.$message.error(res.data.msg) + } + this.tableLoad = false + }) + }, + handleShare(row) { + this.tableLoad = true + const data = { + dispatchBatchId: row.batchId, + isRenew: false + } + GenShareLink(data).then(res => { + if (res.data.succ) { + this.$message.success('操作成功') + this.getList() + } else { + this.$message.error(res.data.msg) + } + this.tableLoad = false }) }, handleSendNotice() { @@ -821,6 +845,9 @@ export default { } }) }, + handleRefshPage() { + this.getList() + }, handleSaveCtn() { const data = { detailPKId: this.editCtn.pkId, @@ -845,19 +872,34 @@ export default { ); }, handleAgain(row) { - this.spinning = true - CreateShareLink([row.batchId]).then(res => { + this.dateFlag = true + this.dateRow = row + }, + onSelectChangeTable(selectedRowKeys) { + this.selectedRowKeysTable = selectedRowKeys; + }, + handleSaveDate() { + if (!this.manualDeadLineDate) { + this.$message.warning('请先选择') + return false + } + this.tableLoad = true + const data = { + dispatchBatchId: this.dateRow.batchId, + isRenew: true, + manualDeadLineDate: this.manualDeadLineDate + } + GenShareLink(data).then(res => { if (res.data.succ) { this.$message.success('操作成功') + this.dateFlag = false + this.getList() } else { this.$message.error(res.data.msg) } - this.spinning = false + this.tableLoad = false }) }, - onSelectChangeTable(selectedRowKeys) { - this.selectedRowKeysTable = selectedRowKeys; - }, mergeCells(text, data, key, index) { // 上一行该列数据是否一样 if (index !== 0 && text === data[index - 1][key]) { @@ -875,7 +917,13 @@ export default { }, handleOpenUser(row) { this.userFlag = true - this.userRow = row + GetUserFeedBack({ dispatchBatchId: row.batchId }).then(res => { + if (res.data.succ) { + this.userRow = res.data.ext + } else { + this.$message.error(res.data.msg) + } + }) }, ChangeFileRadio() { this.spinning = true @@ -1029,8 +1077,21 @@ export default { }) }, handleCopy(row) { - TaskManageRolingWominationGetUrl({ batchId: row.batchId }).then(res => { - + this.tableLoad = true + TaskManageRolingWominationGetUrl({ dispatchBatchId: row.batchId }).then(res => { + if (res.data.succ) { + const inputDom = document.createElement('textarea') + document.body.appendChild(inputDom) + inputDom.value = 'http://' + window.location.host + '/notifications?key=' + res.data.ext + inputDom.select() + inputDom.focus() + document.execCommand('copy') + document.body.removeChild(inputDom) + this.$message.success('复制成功') + } else { + this.$message.error(res.data.msg) + } + this.tableLoad = false }) }, handleOpenCtn(row) { diff --git a/src/views/main/fee/feeTemplate.vue b/src/views/main/fee/feeTemplate.vue index 0679772..2abde01 100644 --- a/src/views/main/fee/feeTemplate.vue +++ b/src/views/main/fee/feeTemplate.vue @@ -793,6 +793,7 @@ export default { this.GetFeeUnit() this.getFeeCurrencyList() document.onkeydown = (event) => { + console.log(this.$refs['tableRef'].getRangeCellSelection()) if (event.key === 'Backspace') { const index = this.$refs['tableRef'].getRangeCellSelection().selectionRangeKeys.startRowKey const val = document diff --git a/src/views/main/vesselinfo/index.vue b/src/views/main/vesselinfo/index.vue index b36692f..fb7da0d 100644 --- a/src/views/main/vesselinfo/index.vue +++ b/src/views/main/vesselinfo/index.vue @@ -22,8 +22,7 @@ :default-active-first-option="false" :show-arrow="false" :filter-option="false" - :not-found-content="null" - > + :not-found-content="null"> {{ item.cnName }} @@ -66,15 +65,13 @@ :style="{ width: '48%' }" placeholder="开始日期" v-model="queryParam.StartETD" - valueFormat="YYYY-MM-DD" - /> + valueFormat="YYYY-MM-DD" /> - + valueFormat="YYYY-MM-DD" /> @@ -94,54 +91,45 @@ - - - - + + + + - - - - - + + + @@ -149,13 +137,16 @@