|
@@ -31,7 +31,7 @@
|
|
|
</el-button>
|
|
|
<ColumnSet
|
|
|
class="button-sqaure"
|
|
|
- :table-columns="tableColumns"
|
|
|
+ :table-columns="isDeparture ? pullTableColumns : tableColumns"
|
|
|
@checked-submit="columnChecked"
|
|
|
/>
|
|
|
</div>
|
|
@@ -79,6 +79,16 @@
|
|
|
</div>
|
|
|
<div class="goods-list">
|
|
|
<SimpleTable
|
|
|
+ v-if="isDeparture"
|
|
|
+ ref="tableRef"
|
|
|
+ :data="pullTableData"
|
|
|
+ :columns="pullTableColumns"
|
|
|
+ sequence
|
|
|
+ scrollbar-always-on
|
|
|
+ :column-props="{ formatter }"
|
|
|
+ />
|
|
|
+ <SimpleTable
|
|
|
+ v-else
|
|
|
ref="tableRef"
|
|
|
:data="tableData"
|
|
|
:columns="tableColumns"
|
|
@@ -115,6 +125,8 @@ const props = defineProps({
|
|
|
},
|
|
|
})
|
|
|
|
|
|
+const isDeparture = computed(() => props.name.includes('Departure'))
|
|
|
+
|
|
|
const route = useRoute()
|
|
|
const { flightDate, waybillNO } = route.query
|
|
|
const dataContent = [flightDate, waybillNO] as string[]
|
|
@@ -131,10 +143,16 @@ const { tableColumns, tableData: trackData, getTableData } = useTable(
|
|
|
dataContent
|
|
|
)
|
|
|
|
|
|
+const {
|
|
|
+ tableColumns: pullTableColumns,
|
|
|
+ tableData: pullTableData,
|
|
|
+ getTableData: getPullTableData,
|
|
|
+} = useTable(`${props.name}Pull`, dataContent)
|
|
|
+
|
|
|
// 判断是否有另外一个机场的节点信息,没有则隐藏那些列
|
|
|
watch(trackData, data => {
|
|
|
let anotherAirportNodeFlag = ''
|
|
|
- if (props.name.includes('Departure')) {
|
|
|
+ if (isDeparture.value) {
|
|
|
anotherAirportNodeFlag = 'node-arrival'
|
|
|
} else {
|
|
|
anotherAirportNodeFlag = 'node-departure'
|
|
@@ -161,7 +179,11 @@ watch(trackData, data => {
|
|
|
})
|
|
|
})
|
|
|
|
|
|
-useLoop([getWaybillInfo, getTableData], 'waybill')
|
|
|
+const loopFuncs = [getWaybillInfo, getTableData]
|
|
|
+if (isDeparture.value) {
|
|
|
+ loopFuncs.push(getPullTableData)
|
|
|
+}
|
|
|
+useLoop(loopFuncs, 'waybill')
|
|
|
|
|
|
const { trackAirlines, trackBoxStyle } = useTrackData(props.name, trackData)
|
|
|
|
|
@@ -243,6 +265,12 @@ const tableData = computed(() => {
|
|
|
})
|
|
|
|
|
|
const formatter: CommonTableFormatter = (row, column, cellValue, index) => {
|
|
|
+ if (column.property === 'wholePull') {
|
|
|
+ return cellValue === 1 ? '是' : '否'
|
|
|
+ }
|
|
|
+ if (column.property === 'pullTime') {
|
|
|
+ return datetimeToTime(cellValue, flightDate as CommonValue)
|
|
|
+ }
|
|
|
const value = String(cellValue ?? '').split('\n')
|
|
|
if (value[2]) {
|
|
|
value[2] = datetimeToTime(value[2], flightDate as CommonValue)
|
|
@@ -262,7 +290,9 @@ const exportHandler = () => {
|
|
|
exportToExcel({ table })
|
|
|
}
|
|
|
|
|
|
-const { columnChecked } = useTableColumnSet(tableColumns)
|
|
|
+const { columnChecked } = useTableColumnSet(
|
|
|
+ isDeparture.value ? pullTableColumns : tableColumns
|
|
|
+)
|
|
|
|
|
|
const { rowClass, cellClass } = useTableStyle(`${props.name}Goods`)
|
|
|
|