diff --git a/.env.development b/.env.development index 4967fcb..99b24ba 100644 --- a/.env.development +++ b/.env.development @@ -9,4 +9,4 @@ NODE_ENV = 'development' # 如果没有跨域问题,直接在这里配置即可 # VITE_APP_BASE_API = 'http://192.168.1.116:8080' # VITE_APP_BASE_API = 'http://121.41.36.72:8080' -VITE_APP_BASE_API = 'http://www.cvlip.com' +VITE_APP_BASE_API = 'http://www.cvlip.com:8080' diff --git a/src/api/Boat/info.ts b/src/api/Boat/info.ts index 6e0460d..465f11e 100644 --- a/src/api/Boat/info.ts +++ b/src/api/Boat/info.ts @@ -15,6 +15,8 @@ const api = { receiveHistoryList: '/cargo/sail_schedule/history/receive/page', // 我接受的历史数据 vinSearch: '/cargo/sail_schedule/vin/query', // 车架号查询 shipList: '/cargo/sail_schedule/ship/list', // 订阅的船期列表 + sailScheduleUpdate: '/cargo/sail_schedule/status/update', // 更新船期状态 + subscribePage: '/cargo/sail_schedule/subscribe/page', // 订阅的船期列表-船舶信息里 }; /** @@ -122,3 +124,21 @@ export function getVinSearchAPI(data: { vin: string }) { export function postSaleShipListAPI(data: dictionaryType) { return http.get(api.shipList, data); } + +/** + * 更新船期状态 + * @param {BoatInfoPageType} data 信息 + * @return 返回请求分页列表接口的结果 + */ +export function getSailScheduleUpdateAPI(data: { id: number; status: string }) { + return http.postParams(api.sailScheduleUpdate, data); +} + +/** + * 订阅的船期列表-船舶信息里 + * @param {BoatInfoPageType} data 信息 + * @return 返回请求分页列表接口的结果 + */ +export function getSubscribePageAPI(data: Partial) { + return http.post>(api.subscribePage, data); +} diff --git a/src/api/Manifest/detail.ts b/src/api/Manifest/detail.ts index 2be4794..2705868 100644 --- a/src/api/Manifest/detail.ts +++ b/src/api/Manifest/detail.ts @@ -7,9 +7,11 @@ const api = { manifestDel: '/cargo/manifest/detail/delete', // 删除 manifestGet: '/cargo/manifest/detail/get', // 获取 manifestPage: '/cargo/manifest/detail/page', // 分页列表 + manifestList: '/cargo/manifest/detail/list', // 非分页列表 manifestSave: '/cargo/manifest/detail/save', // 保存 manifestImport: '/cargo/manifest/detail/import', // 舱单导入 manifestExport: '/cargo/manifest/detail/tmp/export', // 下载模版 + manifestFileExport: '/cargo/manifest/detail/export', // 舱单导出 }; /** @@ -39,6 +41,15 @@ export function getManifestDetailPageAPI(data: Partial) return http.post>(api.manifestPage, data); } +/** + * 舱单明细列表 + * @param {ManifestDetailPageType} data 查询参数 + * @return 返回请求分页列表接口的结果 + */ +export function getManifestDetailListAPI(data: Partial) { + return http.post(api.manifestList, data); +} + /** * 舱单明细保存 * @param {ManifestDetailType} data 参数 @@ -70,3 +81,13 @@ export function getManifestDetailTmpExportAPI() { } ); } + +/** + * 舱单明细导出 + * @return 返回请求下载接口的结果 + */ +export function getManifestDetailFileExportAPI(data: Partial) { + return http.get(api.manifestFileExport, data, { + responseType: 'arraybuffer', + }); +} diff --git a/src/api/Subscription/index.ts b/src/api/Subscription/index.ts index 6466e54..3db6f4c 100644 --- a/src/api/Subscription/index.ts +++ b/src/api/Subscription/index.ts @@ -11,6 +11,7 @@ const api = { receivePage: '/cargo/subscribe/receive/page', // 我接受订阅分页列表 subscriptionSave: '/cargo/subscribe/save', // 保存 editStatus: '/cargo/subscribe/update', // 修改状态 + subscriptionCount: '/cargo/subscribe/count', // 待处理的订阅数 }; /** @@ -75,3 +76,11 @@ export function subscriptionSaveAPI(data: SubscriptionType) { export function editStatusAPI(data: { id: string | number; status: string }) { return http.get(api.editStatus, data); } + +/** + * 待处理的订阅数 + * @return 返回请求保存接口的结果 + */ +export function subscriptionCountAPI() { + return http.get(api.subscriptionCount); +} diff --git a/src/store/modules/setting.ts b/src/store/modules/setting.ts index 09176dd..20409ed 100644 --- a/src/store/modules/setting.ts +++ b/src/store/modules/setting.ts @@ -2,6 +2,7 @@ import { defineStore } from 'pinia'; interface settingsStateType { noticeCount: number; + receiveCount: number; } export const useSettingStore = defineStore({ @@ -11,6 +12,7 @@ export const useSettingStore = defineStore({ // state: 返回对象的函数 state: (): settingsStateType => ({ noticeCount: 0, + receiveCount: 0, }), // actions: 可以同步 也可以异步 @@ -19,5 +21,9 @@ export const useSettingStore = defineStore({ setNoticeCount(value: number) { this.noticeCount = value; }, + // 设置未读消息数量 + setReceiveCount(value: number) { + this.receiveCount = value; + }, }, }); diff --git a/src/types/index.ts b/src/types/index.ts index 2ff4a16..787f745 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -22,7 +22,7 @@ export interface PageRowsResult { */ export interface dictionaryType { q?: string; - ref?: string; + ref?: string | number; } /** diff --git a/src/types/manifest.ts b/src/types/manifest.ts index fdf2a58..6fbbdc2 100644 --- a/src/types/manifest.ts +++ b/src/types/manifest.ts @@ -91,7 +91,7 @@ export interface ManifestDetailType { * 舱单明细分页参数类型 */ export interface ManifestDetailPageType extends PageRowsType { - manifestId: number; + manifestId: number[]; billNo: string; } diff --git a/src/types/user.ts b/src/types/user.ts index 48a37f5..5b91fd0 100644 --- a/src/types/user.ts +++ b/src/types/user.ts @@ -37,8 +37,10 @@ export interface userInfoType { openId: string; enterpriseId: string | number; enterpriseName: string; - wharfId: string; + wharfId: string | number; wharfName: string | number; + portId: string | number; + portName: string; } /** diff --git a/src/views/Boat/components/BoatTable.vue b/src/views/Boat/components/BoatTable.vue index 3b6ae46..c5dc436 100644 --- a/src/views/Boat/components/BoatTable.vue +++ b/src/views/Boat/components/BoatTable.vue @@ -69,7 +69,7 @@ import dayjs from 'dayjs'; import { ElMessage, ElMessageBox } from 'element-plus'; import { computed, ref } from 'vue'; -import { getSailScheduleExportAPI, getSailSchedulePageAPI } from '@/api/Boat/info'; +import { getSailScheduleExportAPI, getSubscribePageAPI } from '@/api/Boat/info'; import { BoatInfoType } from '@/types/boatInfo'; import BoatDialog from './BoatDialog.vue'; @@ -97,7 +97,7 @@ const disabled = computed(() => loadMoreState.value === 'finished'); const getTableDataList = async () => { loadMoreState.value = 'loading'; - const { data } = await getSailSchedulePageAPI({ + const { data } = await getSubscribePageAPI({ page: currentPage.value, rows: 10, }); diff --git a/src/views/History/components/HistoryTable.vue b/src/views/History/components/HistoryTable.vue new file mode 100644 index 0000000..a993883 --- /dev/null +++ b/src/views/History/components/HistoryTable.vue @@ -0,0 +1,172 @@ + + + + + diff --git a/src/views/History/components/PublishTable.vue b/src/views/History/components/PublishTable.vue index 0fefc4b..718ad89 100644 --- a/src/views/History/components/PublishTable.vue +++ b/src/views/History/components/PublishTable.vue @@ -16,37 +16,31 @@ max-height="400px" v-el-table-infinite-scroll="tableDataLoad" :infinite-scroll-disabled="disabled" + @row-click="onClickCellOpenDetail" > - - - - - - - - - + + + + + + + + - - + @@ -67,6 +61,7 @@ const handleTableData = (data: BoatInfoType[]) => { for (const item of data) { item.departureDatePlan = dayjs(item.departureDatePlan).format('YYYY-MM-DD HH:mm'); item.departureDateActual = dayjs(item.departureDateActual).format('YYYY-MM-DD HH:mm'); + item.createDate = dayjs(item.createDate).format('YYYY-MM-DD HH:mm'); } return data; }; @@ -105,6 +100,14 @@ const getTableDataList = async () => { const tableDataLoad = async () => { await getTableDataList(); }; + +// 触发父组件方法 +const emits = defineEmits(['openDetail']); + +// 点击历史数据查看当前数据 +const onClickCellOpenDetail = (row: BoatInfoType) => { + emits('openDetail', row); +}; diff --git a/src/views/Manifest/components/ManifestDetailTable.vue b/src/views/Manifest/components/ManifestDetailTable.vue index c62729c..c8dd719 100644 --- a/src/views/Manifest/components/ManifestDetailTable.vue +++ b/src/views/Manifest/components/ManifestDetailTable.vue @@ -1,89 +1,131 @@ diff --git a/src/views/Send/components/SendDialog.vue b/src/views/Send/components/SendDialog.vue new file mode 100644 index 0000000..a0276f8 --- /dev/null +++ b/src/views/Send/components/SendDialog.vue @@ -0,0 +1,251 @@ + + + + + diff --git a/src/views/Send/components/SendTable.vue b/src/views/Send/components/SendTable.vue index 0af7c11..8f95fb7 100644 --- a/src/views/Send/components/SendTable.vue +++ b/src/views/Send/components/SendTable.vue @@ -12,48 +12,46 @@ max-height="400px" v-el-table-infinite-scroll="tableDataLoad" :infinite-scroll-disabled="disabled" + @row-click="onClickCellOpenDetail" > - - - - - - - - - + + + + + + + + + + - @@ -66,19 +64,24 @@ + + @@ -167,6 +186,25 @@ const onClickOpenDetail = async (row: BoatInfoType) => { .footer-table { position: relative; flex: 1; + .update-btn { + display: flex; + align-items: center; + justify-content: center; + width: 100%; + height: 100%; + .btn { + width: 135px; + height: 40px; + font-size: 18px; + line-height: 40px; + background-color: rgb(0 191 191 / 100%); + border-radius: 26px; + } + .btn:hover { + color: #fff; + background-color: rgb(109 0 14 / 100%); + } + } } .footer-pagination { box-sizing: border-box; diff --git a/src/views/Send/index.vue b/src/views/Send/index.vue index 6ef9cea..f3ae774 100644 --- a/src/views/Send/index.vue +++ b/src/views/Send/index.vue @@ -2,12 +2,17 @@
-
发布船货信息
+
{{ isViewHistory ? '船期信息' : '发布船货信息' }}
- + +
@@ -16,6 +21,8 @@ + diff --git a/src/views/Subscription/components/PublishTable.vue b/src/views/Subscription/components/PublishTable.vue index fe8b71f..608cf6b 100644 --- a/src/views/Subscription/components/PublishTable.vue +++ b/src/views/Subscription/components/PublishTable.vue @@ -6,62 +6,64 @@ - - - - - - - - - - - - - -