diff --git a/src/views/operation/seaexport/index.vue b/src/views/operation/seaexport/index.vue index 6cc21192..60826574 100644 --- a/src/views/operation/seaexport/index.vue +++ b/src/views/operation/seaexport/index.vue @@ -111,6 +111,7 @@ import { formatParams } from '/@/hooks/web/common' const appStore = useAppStore() const { createMessage } = useMessage() const go = useGo() +const tableData = ref([]) // 合计列 const calcColumns = [ { @@ -201,88 +202,91 @@ const calcColumns = [ ] // 合计数据 const calcData = ref([{}]) -const [registerTable, { reload, getForm, setLoading, getSelectRows, setColumns }] = useTable({ - title: '', - api: async (p) => { - // 如果存在改变的列,设置列 - updateTableField(setColumns) - const res: API.DataResult = await PageDataByBooking(p) - calcData.value = [res.data?.dataTotal] - return new Promise((resolve) => { - res.data?.list.forEach((item) => { - item.stlDate = formatTableData(item.stlDate) - item.etd = formatTableData(item.etd) - item.closingDate = formatTableData(item.closingDate) - item.eta = formatTableData(item.eta) - item.issueDate = formatTableData(item.issueDate) - item.customDate = formatTableData(item.customDate) - item.inspectionDate = formatTableData(item.inspectionDate) - const bookstatus = [ - { statusCode: 'status_cangdan', isChecked: false, statusName: '舱单' }, - { statusCode: 'status_haifang', isChecked: false, statusName: '海放' }, - { statusCode: 'status_zhuangzai', isChecked: false, statusName: '装载' }, - { statusCode: 'status_mafang', isChecked: false, statusName: '码放' }, - { statusCode: 'status_zhuangchuan', isChecked: false, statusName: '装船' }, - { statusCode: 'status_atd', isChecked: false, statusName: '离港' } - ] - if (item.bookingStatus && item.bookingStatus.length > 0) { - bookstatus.map((book, bindex) => { - item.bookingStatus.map((ite, index) => { - if (ite.statusCode == book.statusCode) { - bookstatus[bindex] = ite - bookstatus[bindex].isChecked = true - } - }) - }) - } - item.bookingStatus = bookstatus - }) - if (res?.data?.list) { - const ids = res.data.list.map((item) => { - return item.id - }) - appStore.setIds(ids, 'hyck') - } - resolve({ data: [...res.data.list], total: res.data.totalCount }) - }) - }, - // 请求前的参数格式化 - beforeFetch: (p) => { - return formatParams(p) - }, - afterFetch: () => { - isAdvancedQuery.value = false - moreNumVisible.value = false - moreNumVal.value = '' - }, - columns, - formConfig: { - labelWidth: 120, - // 表格表单需要的过滤字段集合 - schemas: searchFormSchema, - // 是否显示高级查询(默认否) - useAdvancedSearch: true, - }, - isTreeTable: false, - pagination: true, - striped: true, - useSearchForm: true, - showTableSetting: true, - bordered: true, - showIndexColumn: true, - indexColumnProps: { - width: 60, - }, - canResize: true, - resizeHeightOffset: 75, - immediate: false, - actionColumn: { - width: 60, - title: '操作', - dataIndex: 'action', - fixed: 'right' - } -}) +// const [registerTable, { reload, getForm, setLoading, getSelectRows, setColumns }] = useTable({ +// title: '', +// api: async (p) => { +// // 如果存在改变的列,设置列 +// updateTableField(setColumns) +// const res: API.DataResult = await PageDataByBooking(p) +// calcData.value = [res.data?.dataTotal] +// return new Promise((resolve) => { +// res.data?.list.forEach((item) => { +// item.stlDate = formatTableData(item.stlDate) +// item.etd = formatTableData(item.etd) +// item.closingDate = formatTableData(item.closingDate) +// item.eta = formatTableData(item.eta) +// item.issueDate = formatTableData(item.issueDate) +// item.customDate = formatTableData(item.customDate) +// item.inspectionDate = formatTableData(item.inspectionDate) +// const bookstatus = [ +// { statusCode: 'status_cangdan', isChecked: false, statusName: '舱单' }, +// { statusCode: 'status_haifang', isChecked: false, statusName: '海放' }, +// { statusCode: 'status_zhuangzai', isChecked: false, statusName: '装载' }, +// { statusCode: 'status_mafang', isChecked: false, statusName: '码放' }, +// { statusCode: 'status_zhuangchuan', isChecked: false, statusName: '装船' }, +// { statusCode: 'status_atd', isChecked: false, statusName: '离港' } +// ] +// if (item.bookingStatus && item.bookingStatus.length > 0) { +// bookstatus.map((book, bindex) => { +// item.bookingStatus.map((ite, index) => { +// if (ite.statusCode == book.statusCode) { +// bookstatus[bindex] = ite +// bookstatus[bindex].isChecked = true +// } +// }) +// }) +// } +// item.bookingStatus = bookstatus +// }) +// if (res?.data?.list) { +// const ids = res.data.list.map((item) => { +// return item.id +// }) +// appStore.setIds(ids, 'hyck') +// } +// resolve({ data: [...res.data.list], total: res.data.totalCount }) +// }) +// }, +// // 请求前的参数格式化 +// beforeFetch: (p) => { +// return formatParams(p) +// }, +// afterFetch: () => { +// isAdvancedQuery.value = false +// moreNumVisible.value = false +// moreNumVal.value = '' +// }, +// columns, +// formConfig: { +// labelWidth: 120, +// // 表格表单需要的过滤字段集合 +// schemas: searchFormSchema, +// // 是否显示高级查询(默认否) +// useAdvancedSearch: true, +// }, +// isTreeTable: false, +// pagination: true, +// striped: true, +// useSearchForm: true, +// showTableSetting: true, +// bordered: true, +// showIndexColumn: true, +// indexColumnProps: { +// width: 60, +// }, +// canResize: true, +// resizeHeightOffset: 75, +// immediate: false, +// actionColumn: { +// width: 60, +// title: '操作', +// dataIndex: 'action', +// fixed: 'right' +// } +// }) +const init = () => { + +} function editColumns(row) { if (row.mblno) { go(`/BookingDetail?id=${row.id}&source=edit&mblno=${row.mblno}`)