|
@@ -1,287 +1,847 @@
|
|
|
<template>
|
|
|
<div class="page-content">
|
|
|
- <div class="search-header">
|
|
|
- <div class="search-header-left">
|
|
|
- <div class="search-header-left-item">
|
|
|
- <a-form-item label="航班号">
|
|
|
- <a-input v-model="formState.flight.flightNo" />
|
|
|
- </a-form-item>
|
|
|
- </div>
|
|
|
- <div class="search-header-left-item">
|
|
|
- <a-form-item label="航班日期">
|
|
|
- <a-range-picker v-model="formState.flight.flightDate" />
|
|
|
- </a-form-item>
|
|
|
+ <a-spin :loading="loading" style="width: 100%">
|
|
|
+ <div class="search-header">
|
|
|
+ <div class="search-header-left">
|
|
|
+ <div v-if="searchType == '1'" class="search-header-left-item">
|
|
|
+ <a-form-item label="航班号">
|
|
|
+ <a-input
|
|
|
+ v-model="formState.flight.flightNo"
|
|
|
+ allow-clear
|
|
|
+ placeholder="请输入航班号"
|
|
|
+ @input="commonUpperCase('flightNo')"
|
|
|
+ />
|
|
|
+ </a-form-item>
|
|
|
+ </div>
|
|
|
+ <div v-if="searchType != '2'" class="search-header-left-item">
|
|
|
+ <a-form-item label="航班日期" style="width: 450px">
|
|
|
+ <a-range-picker
|
|
|
+ v-model="formState.flight.flightDate"
|
|
|
+ :allow-clear="false"
|
|
|
+ />
|
|
|
+ <span style="color: #0066ff; font-size: 12px"
|
|
|
+ >(最大查询时间,一个月)</span
|
|
|
+ >
|
|
|
+ </a-form-item>
|
|
|
+ </div>
|
|
|
+ <div v-if="searchType == '2'" class="search-header-left-item">
|
|
|
+ <a-form-item label="运单号">
|
|
|
+ <a-input
|
|
|
+ v-model="formState.flight.mawbNo"
|
|
|
+ :max-length="12"
|
|
|
+ allow-clear
|
|
|
+ placeholder="请输入运单号"
|
|
|
+ @keydown="mawbNoAddG"
|
|
|
+ />
|
|
|
+ </a-form-item>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- <div class="search-header-left-item w120" v-if="searchType == '1'">
|
|
|
- <a-form-item label="始发地">
|
|
|
- <a-input v-model="formState.flight.startCity" />
|
|
|
- </a-form-item>
|
|
|
+ <div class="search-header-right">
|
|
|
+ <div
|
|
|
+ class="search-header-right-item search-header-right-item-box searchType"
|
|
|
+ >
|
|
|
+ <a-radio-group
|
|
|
+ v-model="searchType"
|
|
|
+ :options="searchTypeOption"
|
|
|
+ name="radioGroup"
|
|
|
+ @change="searchTypeChange()"
|
|
|
+ >
|
|
|
+ </a-radio-group>
|
|
|
+ </div>
|
|
|
+ <!-- <div class="search-header-right-item search-header-right-item-box">
|
|
|
+ <a-radio-group
|
|
|
+ v-model="formState.flight.orderType"
|
|
|
+ :options="orderTypeOption"
|
|
|
+ name="radioGroup"
|
|
|
+ @change="searchTypeChange()"
|
|
|
+ >
|
|
|
+ </a-radio-group>
|
|
|
+ </div>-->
|
|
|
+ <div class="search-header-right-item search-header-right-item-box">
|
|
|
+ <a-radio-group
|
|
|
+ v-model="formState.flight.flightType"
|
|
|
+ :options="flightTypeOption"
|
|
|
+ name="radioGroup"
|
|
|
+ >
|
|
|
+ </a-radio-group>
|
|
|
+ </div>
|
|
|
+ <div class="search-header-right-item">
|
|
|
+ <a-button type="primary" @click="search()">查询</a-button>
|
|
|
+ </div>
|
|
|
+ <div class="search-header-right-item">
|
|
|
+ <a-button :loading="btnLoading" type="primary" @click="downLoad()"
|
|
|
+ >导出CSV</a-button
|
|
|
+ >
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- <div class="search-header-left-item w120" v-if="searchType == '1'">
|
|
|
- <a-form-item label="始发国">
|
|
|
- <a-input v-model="formState.flight.startCountry" />
|
|
|
- </a-form-item>
|
|
|
+ </div>
|
|
|
+ <div class="search-select">
|
|
|
+ <div class="search-select-title"> 筛选条件 </div>
|
|
|
+ <div class="mr-3 ml-3 mt-1">
|
|
|
+ <a-select
|
|
|
+ v-model="formState.flight.pickOrder"
|
|
|
+ :style="{ width: '240px', height: '30px' }"
|
|
|
+ allow-clear
|
|
|
+ allow-search
|
|
|
+ multiple
|
|
|
+ placeholder="请选择是否已交单"
|
|
|
+ tag-nowrap
|
|
|
+ >
|
|
|
+ <a-option
|
|
|
+ v-for="item in pickOrderOptions"
|
|
|
+ :key="item.value"
|
|
|
+ :value="item.value"
|
|
|
+ >{{ item.label }}</a-option
|
|
|
+ >
|
|
|
+ </a-select>
|
|
|
</div>
|
|
|
- <div class="search-header-left-item w120" v-if="searchType == '2'">
|
|
|
- <a-form-item label="目的地">
|
|
|
- <a-input v-model="formState.flight.endCity" />
|
|
|
- </a-form-item>
|
|
|
+ <div class="mr-3 ml-3 mt-1">
|
|
|
+ <a-select
|
|
|
+ v-model="formState.flight.takeGoods"
|
|
|
+ :style="{ width: '240px', height: '30px' }"
|
|
|
+ allow-clear
|
|
|
+ allow-search
|
|
|
+ multiple
|
|
|
+ placeholder="请选择是否已安检"
|
|
|
+ tag-nowrap
|
|
|
+ >
|
|
|
+ <a-option
|
|
|
+ v-for="item in takeGoodsOptions"
|
|
|
+ :key="item.value"
|
|
|
+ :value="item.value"
|
|
|
+ >{{ item.label }}</a-option
|
|
|
+ >
|
|
|
+ </a-select>
|
|
|
</div>
|
|
|
- <div class="search-header-left-item w120" v-if="searchType == '2'">
|
|
|
- <a-form-item label="目的国">
|
|
|
- <a-input v-model="formState.flight.endCountry" />
|
|
|
- </a-form-item>
|
|
|
+ <div class="mr-3 ml-3 mt-1">
|
|
|
+ <a-select
|
|
|
+ v-model="formState.flight.release"
|
|
|
+ :style="{ width: '240px', height: '30px' }"
|
|
|
+ allow-clear
|
|
|
+ allow-search
|
|
|
+ multiple
|
|
|
+ placeholder="请选择海关是已否放行"
|
|
|
+ tag-nowrap
|
|
|
+ >
|
|
|
+ <a-option
|
|
|
+ v-for="item in releaseOptions"
|
|
|
+ :key="item.value"
|
|
|
+ :value="item.value"
|
|
|
+ >{{ item.label }}</a-option
|
|
|
+ >
|
|
|
+ </a-select>
|
|
|
</div>
|
|
|
- <div class="search-header-left-item">
|
|
|
- <a-form-item label="操作">
|
|
|
- <a-select ref="select" placeholder="请选择" :options="timeTypeOptions" v-model="timeType" style="width: 120px"
|
|
|
- @change="timeTypeChange()">
|
|
|
- </a-select>
|
|
|
- </a-form-item>
|
|
|
+ <div class="mr-3 ml-3 mt-1">
|
|
|
+ <a-select
|
|
|
+ v-model="formState.flight.partType"
|
|
|
+ :style="{ width: '240px', height: '30px' }"
|
|
|
+ allow-clear
|
|
|
+ allow-search
|
|
|
+ multiple
|
|
|
+ placeholder="请选择运单类型"
|
|
|
+ tag-nowrap
|
|
|
+ >
|
|
|
+ <a-option
|
|
|
+ v-for="item in partTypeOptions"
|
|
|
+ :key="item.value"
|
|
|
+ :value="item.value"
|
|
|
+ >{{ item.label }}</a-option
|
|
|
+ >
|
|
|
+ </a-select>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div class="search-header-right">
|
|
|
- <div class="search-header-right-item">
|
|
|
- <a-radio-group v-model="searchType" name="radioGroup" :options="searchTypeOption"
|
|
|
- @change="searchTypeChange()">
|
|
|
+ <!-- <div class="search-header-right-item search-header-right-item-box">
|
|
|
+ <a-radio-group
|
|
|
+ v-model="formState.flight.orderType"
|
|
|
+ :options="orderTypeOption"
|
|
|
+ name="radioGroup"
|
|
|
+ @change="searchTypeChange()"
|
|
|
+ >
|
|
|
</a-radio-group>
|
|
|
+ </div>-->
|
|
|
+ <div class="mr-3 ml-3 mt-1">
|
|
|
+ <a-select
|
|
|
+ v-model="formState.flight.orderType"
|
|
|
+ :style="{ width: '240px', height: '30px' }"
|
|
|
+ allow-clear
|
|
|
+ allow-search
|
|
|
+ multiple
|
|
|
+ placeholder="请选择整单/分批离港"
|
|
|
+ tag-nowrap
|
|
|
+ >
|
|
|
+ <a-option
|
|
|
+ v-for="item in orderTypeOption"
|
|
|
+ :key="item.value"
|
|
|
+ :value="item.value"
|
|
|
+ >{{ item.label }}</a-option
|
|
|
+ >
|
|
|
+ </a-select>
|
|
|
+ </div>
|
|
|
+ <!-- <div class="search-select-item">
|
|
|
+ <a-checkbox-group
|
|
|
+ v-model="formState.flight.pickOrder"
|
|
|
+ :options="pickOrderOptions"
|
|
|
+ />
|
|
|
</div>
|
|
|
- <div class="search-header-right-item">
|
|
|
- <a-button type="primary" @click="search()">查询</a-button>
|
|
|
+ <div class="search-select-item">
|
|
|
+ <a-checkbox-group
|
|
|
+ v-model="formState.flight.takeGoods"
|
|
|
+ :options="takeGoodsOptions"
|
|
|
+ />
|
|
|
</div>
|
|
|
- <div class="search-header-right-item">
|
|
|
- <a-button type="primary" @click="downLoad()">导出CSV</a-button>
|
|
|
+ <div class="search-select-item">
|
|
|
+ <a-checkbox-group
|
|
|
+ v-model="formState.flight.release"
|
|
|
+ :options="releaseOptions"
|
|
|
+ />
|
|
|
</div>
|
|
|
+ <div class="search-select-item">
|
|
|
+ <a-checkbox-group
|
|
|
+ v-model="formState.flight.partType"
|
|
|
+ :options="partTypeOptions"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ <div v-if="false" class="search-select-item2">
|
|
|
+ <div>
|
|
|
+ <a-radio-group
|
|
|
+ v-model="formState.flight.goodsType"
|
|
|
+ :options="goodsTypeOption"
|
|
|
+ name="radioGroup"
|
|
|
+ >
|
|
|
+ </a-radio-group>
|
|
|
+ </div>
|
|
|
+ </div>-->
|
|
|
</div>
|
|
|
- </div>
|
|
|
|
|
|
- <div class="search-body">
|
|
|
- <a-table :columns="columns" :data="dataSource" :stripe="true" bordered>
|
|
|
- <!-- <template #fwb="{ rowIndex }">
|
|
|
- <a-input v-model="dataSource[rowIndex].fwb" />
|
|
|
- </template> -->
|
|
|
- <template #footer>
|
|
|
- <div class="foot" style="margin-left: 710px;display: flex;flex-direction: row;text-align: center;">
|
|
|
- 合计:<div style="width:127px">0</div>
|
|
|
- <div style="width:127px">0</div>
|
|
|
- <div style="width:135px">0/0T </div>
|
|
|
- <div style="width:155px">0/0T </div>
|
|
|
- <div style="width:155px">0/0T </div>
|
|
|
- <div style="width:155px">0/0T </div>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- </a-table>
|
|
|
- </div>
|
|
|
+ <div class="search-body">
|
|
|
+ <a-table
|
|
|
+ :columns="columns"
|
|
|
+ :data="dataSource"
|
|
|
+ :pagination="false"
|
|
|
+ :scroll="scroll"
|
|
|
+ :scrollbar="true"
|
|
|
+ :stripe="true"
|
|
|
+ :summary="summary"
|
|
|
+ bordered
|
|
|
+ >
|
|
|
+ <template #summary-cell="{ column, record }">
|
|
|
+ {{ record[column.dataIndex] }}
|
|
|
+ </template>
|
|
|
+ </a-table>
|
|
|
+ <a-pagination
|
|
|
+ :page-number="formState.page"
|
|
|
+ :page-size="formState.size"
|
|
|
+ :page-size-options="[10, 20, 30, 40, 50, 100]"
|
|
|
+ :total="total"
|
|
|
+ class="pagination"
|
|
|
+ show-jumper
|
|
|
+ show-page-size
|
|
|
+ show-total
|
|
|
+ @change="pageChange"
|
|
|
+ @page-size-change="pageSizeChange"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </a-spin>
|
|
|
</div>
|
|
|
</template>
|
|
|
+
|
|
|
<script lang="ts" setup>
|
|
|
- const timeType = ref('');
|
|
|
- const searchType = ref<string>('1');
|
|
|
- const timeTypeOptions = ref<SelectProps['options']>([
|
|
|
- {
|
|
|
- value: '1',
|
|
|
- label: '一部',
|
|
|
- },
|
|
|
- {
|
|
|
- value: '2',
|
|
|
- label: '二部',
|
|
|
- },
|
|
|
- ]);
|
|
|
- const searchTypeOption = ref<RadioGroupProps['options']>([
|
|
|
- {
|
|
|
- value: '1',
|
|
|
- label: '进港',
|
|
|
- },
|
|
|
- {
|
|
|
- value: '2',
|
|
|
- label: '出港',
|
|
|
- }
|
|
|
- ]);
|
|
|
+import { useUserStore } from '@/store';
|
|
|
+import { Message } from '@arco-design/web-vue';
|
|
|
+import { ref } from 'vue';
|
|
|
+import { dayjs } from '@arco-design/web-vue/es/_utils/date';
|
|
|
+import ApiObj from './api/CurrentPageApi';
|
|
|
|
|
|
- const formState = {
|
|
|
- flight: {
|
|
|
- flightNo: '',
|
|
|
- flightDate: '',
|
|
|
- startCity: '',
|
|
|
- startCountry: '',
|
|
|
- endCity: '',
|
|
|
- endCountry: '',
|
|
|
- pickOrder: [],
|
|
|
- takeGoods: [],
|
|
|
- damaged: [],
|
|
|
- release: [],
|
|
|
- partType: [],
|
|
|
- orderType: '',
|
|
|
- goodsType: ''
|
|
|
- },
|
|
|
- };
|
|
|
+const scroll = {
|
|
|
+ x: '100%',
|
|
|
+ y: '550px',
|
|
|
+};
|
|
|
+const btnLoading = ref<boolean>(false);
|
|
|
+const total = ref<number>(0);
|
|
|
+const loading = ref<boolean>(false);
|
|
|
+const searchType = ref<string>('1');
|
|
|
+const userStore = useUserStore();
|
|
|
+const searchTypeOption = ref([
|
|
|
+ {
|
|
|
+ value: '1',
|
|
|
+ label: '按航班',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: '2',
|
|
|
+ label: '按运单',
|
|
|
+ },
|
|
|
+]);
|
|
|
|
|
|
- const columns = [
|
|
|
- {
|
|
|
- title: '航班时间',
|
|
|
- dataIndex: 'order',
|
|
|
- },
|
|
|
- {
|
|
|
- title: '航班关闭时间',
|
|
|
- dataIndex: 'fwb',
|
|
|
- },
|
|
|
- {
|
|
|
- title: '航班号',
|
|
|
- dataIndex: 'orderinfo',
|
|
|
- },
|
|
|
- {
|
|
|
- title: '目的地/国',
|
|
|
- dataIndex: 'flightNo',
|
|
|
- },
|
|
|
- {
|
|
|
- title: '航段',
|
|
|
- dataIndex: 'orderCount',
|
|
|
- },
|
|
|
- {
|
|
|
- title: '总票数',
|
|
|
- dataIndex: 'orderCount',
|
|
|
- },
|
|
|
- {
|
|
|
- title: '板箱数',
|
|
|
- dataIndex: 'orderCount',
|
|
|
- },
|
|
|
- {
|
|
|
- title: '总件/重',
|
|
|
- dataIndex: 'orderCount',
|
|
|
- },
|
|
|
- {
|
|
|
- title: '普货件/重',
|
|
|
- dataIndex: 'orderCount',
|
|
|
- },
|
|
|
+const orderTypeOption = ref([
|
|
|
+ {
|
|
|
+ value: '1',
|
|
|
+ label: '整单离港',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: '2',
|
|
|
+ label: '分批离港',
|
|
|
+ },
|
|
|
+]);
|
|
|
+
|
|
|
+const flightTypeOption = ref([
|
|
|
+ {
|
|
|
+ value: 'Y',
|
|
|
+ label: '已配航班',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: 'N',
|
|
|
+ label: '未配航班',
|
|
|
+ },
|
|
|
+]);
|
|
|
+
|
|
|
+const pickOrderOptions = [
|
|
|
+ { label: '代理已交单', value: 'Y' },
|
|
|
+ { label: '代理未交单', value: 'N' },
|
|
|
+];
|
|
|
+
|
|
|
+const takeGoodsOptions = [
|
|
|
+ { label: '已安检', value: 'Y' },
|
|
|
+ { label: '未安检', value: 'N' },
|
|
|
+];
|
|
|
+
|
|
|
+const releaseOptions = [
|
|
|
+ { label: '海关放行', value: 'Y' },
|
|
|
+ { label: '未放行', value: 'N' },
|
|
|
+];
|
|
|
+
|
|
|
+const partTypeOptions = ref([
|
|
|
+ {
|
|
|
+ label: '普货',
|
|
|
+ value: 'C',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '快件',
|
|
|
+ value: 'E',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '邮件',
|
|
|
+ value: 'M',
|
|
|
+ },
|
|
|
+]);
|
|
|
+
|
|
|
+const goodsTypeOption = [
|
|
|
+ {
|
|
|
+ label: '鲜活易腐',
|
|
|
+ value: 'PV',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '锂电',
|
|
|
+ value: 'LI',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '冷藏冷冻',
|
|
|
+ value: 'CL',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '其他',
|
|
|
+ value: 'EL',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '药品',
|
|
|
+ value: 'MD',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '高价值',
|
|
|
+ value: 'VL',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '危险类',
|
|
|
+ value: 'ALL',
|
|
|
+ },
|
|
|
+];
|
|
|
+
|
|
|
+const rendTimeCol = (col: string) => {
|
|
|
+ if (col !== null && col !== '' && col !== undefined && col.length > 0) {
|
|
|
+ return dayjs(col).format('YYYY-MM-DD HH:mm');
|
|
|
+ }
|
|
|
+ return '';
|
|
|
+};
|
|
|
+
|
|
|
+/**
|
|
|
+ * 转换大写
|
|
|
+ * @param str
|
|
|
+ */
|
|
|
+const commonUpperCase = (str: string) => {
|
|
|
+ formState.flight[str] = formState.flight[str].toLocaleUpperCase();
|
|
|
+};
|
|
|
+
|
|
|
+const summary = () => {
|
|
|
+ return [
|
|
|
+ // 返回的就是表尾合计列
|
|
|
{
|
|
|
- title: '快件件/重',
|
|
|
- dataIndex: 'orderCount',
|
|
|
+ /// /
|
|
|
+ mawbNo: '件数合计(件)',
|
|
|
+ pcsCba: concat(numberFormatter(summerData.value.pcsCba), ''),
|
|
|
+ pcs: concat(numberFormatter(summerData.value.pcs), ''),
|
|
|
+ pcsSpl: concat(numberFormatter(summerData.value.pcsSpl), ''),
|
|
|
+ pcsBup: concat(numberFormatter(summerData.value.pcsBup), ''),
|
|
|
},
|
|
|
{
|
|
|
- title: '中转件/重',
|
|
|
- dataIndex: 'orderCount',
|
|
|
+ mawbNo: '重量合计(吨)',
|
|
|
+ pcsCba: concat('', numberFormatter(chu(summerData.value.wtCba))),
|
|
|
+ pcs: concat('', numberFormatter(chu(summerData.value.wt))),
|
|
|
+ pcsSpl: concat('', numberFormatter(chu(summerData.value.wtSpl))),
|
|
|
+ pcsBup: concat('', numberFormatter(chu(summerData.value.wtBup))),
|
|
|
},
|
|
|
];
|
|
|
-
|
|
|
- const dataSource = [
|
|
|
- {
|
|
|
- order: '1',
|
|
|
- fwb: '正常',
|
|
|
- orderinfo: '300,000.00',
|
|
|
- flightNo: 'CA123',
|
|
|
- orderCount: '1000',
|
|
|
+};
|
|
|
+const chu = (value: any) => {
|
|
|
+ if (value !== null && value !== undefined) {
|
|
|
+ return Math.round((value / 1000) * 10) / 10;
|
|
|
+ }
|
|
|
+ return value;
|
|
|
+};
|
|
|
+const numberFormatter = (value: any) => {
|
|
|
+ if (value !== null && value !== undefined) {
|
|
|
+ return value.toLocaleString();
|
|
|
+ }
|
|
|
+ return value;
|
|
|
+};
|
|
|
+const formState = reactive({
|
|
|
+ flight: {
|
|
|
+ flightNo: '', // 航班号
|
|
|
+ flightDate: ['', ''], // 航班日期
|
|
|
+ mawbNo: '', // 运单号
|
|
|
+ pickOrder: [], // 是否交单
|
|
|
+ takeGoods: [], // 是否安检
|
|
|
+ flightType: 'Y', // Y 已配 N 未配
|
|
|
+ release: [], // 是否放行
|
|
|
+ partType: [], // 快件 邮件 普件
|
|
|
+ orderType: '', // 离岗类型 1:整单离港, 2: 分批离港
|
|
|
+ goodsType: [], // 鲜活易腐
|
|
|
+ agtNo: userStore.isSuperAdmin ? '' : userStore.userInfo?.tenant?.threeCode, // 代理
|
|
|
+ page: 1,
|
|
|
+ size: 10,
|
|
|
+ },
|
|
|
+});
|
|
|
+function formatDate(input: string): string {
|
|
|
+ try {
|
|
|
+ if (input === null || input === undefined || input === '') {
|
|
|
+ return '';
|
|
|
+ }
|
|
|
+ const date = new Date(input);
|
|
|
+ const options: Intl.DateTimeFormatOptions = {
|
|
|
+ month: '2-digit',
|
|
|
+ day: '2-digit',
|
|
|
+ };
|
|
|
+ const tmp = date.toLocaleDateString('en-US', options).replace('/', '-');
|
|
|
+ if (tmp === 'Invalid Date') {
|
|
|
+ return '';
|
|
|
+ }
|
|
|
+ return tmp;
|
|
|
+ } catch (err) {
|
|
|
+ return '';
|
|
|
+ }
|
|
|
+}
|
|
|
+const columns = [
|
|
|
+ // {
|
|
|
+ // title: '序号',
|
|
|
+ // dataIndex: 'order',
|
|
|
+ // render: (row: any) => row.rowIndex + 1,
|
|
|
+ // },
|
|
|
+ {
|
|
|
+ title: '航班号',
|
|
|
+ dataIndex: 'fltNo',
|
|
|
+ width: 135,
|
|
|
+ render: (row: any) =>
|
|
|
+ concat(row.record.fltNo, formatDate(row.record.fltDate)),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '代理',
|
|
|
+ dataIndex: 'agtNo',
|
|
|
+ width: 70,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '运单信息',
|
|
|
+ dataIndex: 'mawbNo',
|
|
|
+ width: 130,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '订舱件重',
|
|
|
+ width: 100,
|
|
|
+ dataIndex: 'pcsCba',
|
|
|
+ render: (row: any) => concat(row.record.pcsCba, row.record.wtCba),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '收货件重',
|
|
|
+ width: 100,
|
|
|
+ dataIndex: 'pcs',
|
|
|
+ render: (row: any) => concat(row.record.pcs, row.record.wt),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '库存件重',
|
|
|
+ width: 100,
|
|
|
+ dataIndex: 'pcsSpl',
|
|
|
+ render: (row: any) => concat(row.record.pcsSpl, row.record.wtSpl),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '上舱件重',
|
|
|
+ width: 100,
|
|
|
+ dataIndex: 'pcsBup',
|
|
|
+ render: (row: any) => concat(row.record.pcsBup, row.record.wtBup),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '始发/目的地',
|
|
|
+ // dataIndex: 'orderCount',
|
|
|
+ width: 108,
|
|
|
+ render: (row: any) => concat(row.record.orgnNo, row.record.destNo),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '到场时间',
|
|
|
+ dataIndex: 'iwsDate',
|
|
|
+ width: 153,
|
|
|
+ render: (row: any) => rendTimeCol(row.record.iwsDate),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '收单时间',
|
|
|
+ dataIndex: 'wbcDate',
|
|
|
+ width: 153,
|
|
|
+ render: (row: any) => rendTimeCol(row.record.wbcDate),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '离港时间',
|
|
|
+ dataIndex: 'owsDate',
|
|
|
+ width: 153,
|
|
|
+ render: (row: any) => rendTimeCol(row.record.owsDate),
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '安检放行',
|
|
|
+ dataIndex: 'sckStatus',
|
|
|
+ width: 88,
|
|
|
+ render: (row: any) => {
|
|
|
+ if (row.record.sckStatus !== undefined && row.record.sckStatus !== null) {
|
|
|
+ if (row.record.sckStatus === 'N') {
|
|
|
+ return '是';
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return '否';
|
|
|
},
|
|
|
- {
|
|
|
- order: '2',
|
|
|
- fwb: '缺失',
|
|
|
- orderinfo: '300,000.00',
|
|
|
- flightNo: 'CA123',
|
|
|
- orderCount: '1000',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '海关放行',
|
|
|
+ width: 88,
|
|
|
+ dataIndex: 'relStatus',
|
|
|
+ render: (row: any) => {
|
|
|
+ if (row.record.relStatus !== undefined && row.record.relStatus !== null) {
|
|
|
+ if (row.record.relStatus === 'Y') return '是';
|
|
|
+ if (row.record.relStatus === 'N') return '否';
|
|
|
+ }
|
|
|
+ return '';
|
|
|
},
|
|
|
- {
|
|
|
- order: '3',
|
|
|
- fwb: '正常',
|
|
|
- orderinfo: '300,000.00',
|
|
|
- flightNo: 'CA123',
|
|
|
- orderCount: '1000',
|
|
|
- }
|
|
|
- ];
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '特货代码',
|
|
|
+ dataIndex: 'shCodes',
|
|
|
+ ellipsis: true,
|
|
|
+ width: 90,
|
|
|
+ tooltip: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '舱单备注',
|
|
|
+ dataIndex: 'remark',
|
|
|
+ ellipsis: true,
|
|
|
+ tooltip: true,
|
|
|
+ },
|
|
|
+];
|
|
|
+
|
|
|
+const dataSource = ref([]);
|
|
|
|
|
|
- const timeTypeChange = function () {
|
|
|
- console.log(timeType.value)
|
|
|
+const concat = (a: any, b: any): string => {
|
|
|
+ if (
|
|
|
+ a !== null &&
|
|
|
+ a !== undefined &&
|
|
|
+ a !== '' &&
|
|
|
+ b !== null &&
|
|
|
+ b !== '' &&
|
|
|
+ b !== undefined
|
|
|
+ ) {
|
|
|
+ return `${a}/${b}`;
|
|
|
+ }
|
|
|
+ if (
|
|
|
+ a !== null &&
|
|
|
+ a !== undefined &&
|
|
|
+ a !== '' &&
|
|
|
+ (b === '' || b === null || b === undefined)
|
|
|
+ ) {
|
|
|
+ return a;
|
|
|
}
|
|
|
|
|
|
- const searchTypeChange = function () {
|
|
|
- console.log(searchType.value)
|
|
|
+ if (
|
|
|
+ b !== null &&
|
|
|
+ b !== undefined &&
|
|
|
+ b !== '' &&
|
|
|
+ (a === '' || a === null || a === undefined)
|
|
|
+ ) {
|
|
|
+ return b;
|
|
|
}
|
|
|
+ return '';
|
|
|
+};
|
|
|
|
|
|
- const search = function () {
|
|
|
+const mawbNoAddG = (ev: KeyboardEvent) => {
|
|
|
+ if (
|
|
|
+ formState.flight.mawbNo !== null &&
|
|
|
+ formState.flight.mawbNo !== undefined &&
|
|
|
+ formState.flight.mawbNo !== ''
|
|
|
+ ) {
|
|
|
+ if (ev.code === 'NumpadSubtract' && formState.flight.mawbNo.length === 3)
|
|
|
+ return;
|
|
|
+ if (formState.flight.mawbNo.length >= 3) {
|
|
|
+ // 判断按下的键是否为删除键
|
|
|
+ const isDeleteKey = ev.key === 'Backspace' || ev.key === 'Delete';
|
|
|
+ if (formState.flight.mawbNo.charAt(3) !== '-' && !isDeleteKey) {
|
|
|
+ formState.flight.mawbNo = `${formState.flight.mawbNo.slice(
|
|
|
+ 0,
|
|
|
+ 3
|
|
|
+ )}-${formState.flight.mawbNo.slice(3)}`;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+};
|
|
|
|
|
|
+const searchTypeChange = () => {
|
|
|
+ // 切换查询类型时清空其它查询类型参数
|
|
|
+ if (searchType.value === '1') {
|
|
|
+ // 按航班查询
|
|
|
+ formState.flight.mawbNo = '';
|
|
|
+ // 设置航班日期默认值
|
|
|
+ formState.flight.flightDate = [
|
|
|
+ dayjs().add(-3, 'day').format('YYYY-MM-DD'),
|
|
|
+ dayjs().format('YYYY-MM-DD'),
|
|
|
+ ];
|
|
|
}
|
|
|
|
|
|
- const downLoad = function () {
|
|
|
+ if (searchType.value === '2') {
|
|
|
+ // 按运单号查询
|
|
|
+ formState.flight.flightDate = [];
|
|
|
+ formState.flight.flightNo = '';
|
|
|
+ }
|
|
|
+};
|
|
|
+interface summerDataItem {
|
|
|
+ pcsCba: number | null;
|
|
|
+ wtCba: number | null;
|
|
|
+ pcsBup: number | null;
|
|
|
+ wtBup: number | null;
|
|
|
+ pcs: number | null;
|
|
|
+ wt: number | null;
|
|
|
+ pcsSpl: number | null;
|
|
|
+ wtSpl: number | null;
|
|
|
+}
|
|
|
+const summerData = ref<summerDataItem>({
|
|
|
+ pcsCba: 0,
|
|
|
+ wtCba: 0,
|
|
|
+ pcsBup: 0,
|
|
|
+ wtBup: 0,
|
|
|
+ pcs: 0,
|
|
|
+ wt: 0,
|
|
|
+ pcsSpl: 0,
|
|
|
+ wtSpl: 0,
|
|
|
+});
|
|
|
+const search = async () => {
|
|
|
+ if (
|
|
|
+ searchType.value === '2' &&
|
|
|
+ (formState.flight.mawbNo === '' ||
|
|
|
+ formState.flight.mawbNo === undefined ||
|
|
|
+ formState.flight.mawbNo === null ||
|
|
|
+ formState.flight.mawbNo.length !== 12)
|
|
|
+ ) {
|
|
|
+ Message.error('按运单查询必须输入完整运单号12位');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ try {
|
|
|
+ loading.value = true;
|
|
|
+ await ApiObj.page(formState.flight).then((res) => {
|
|
|
+ dataSource.value = res.data.records;
|
|
|
+ total.value = res.data.total;
|
|
|
+ });
|
|
|
+ await ApiObj.summary(formState.flight).then((res) => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ if (res.data) {
|
|
|
+ summerData.value = res.data;
|
|
|
+ summerData.value = {
|
|
|
+ pcsCba:
|
|
|
+ summerData.value.pcsCba !== null &&
|
|
|
+ summerData.value.pcsCba !== undefined
|
|
|
+ ? Math.round(summerData.value.pcsCba)
|
|
|
+ : null,
|
|
|
+ wtCba:
|
|
|
+ summerData.value.wtCba !== null &&
|
|
|
+ summerData.value.wtCba !== undefined
|
|
|
+ ? Math.round(summerData.value.wtCba)
|
|
|
+ : null,
|
|
|
+ pcsBup:
|
|
|
+ summerData.value.pcsBup !== null &&
|
|
|
+ summerData.value.pcsBup !== undefined
|
|
|
+ ? Math.round(summerData.value.pcsBup)
|
|
|
+ : null,
|
|
|
+ wtBup:
|
|
|
+ summerData.value.wtBup !== null &&
|
|
|
+ summerData.value.wtBup !== undefined
|
|
|
+ ? Math.round(summerData.value.wtBup)
|
|
|
+ : null,
|
|
|
+ pcs:
|
|
|
+ summerData.value.pcs !== null &&
|
|
|
+ summerData.value.pcs !== undefined
|
|
|
+ ? Math.round(summerData.value.pcs)
|
|
|
+ : null,
|
|
|
+ wt:
|
|
|
+ summerData.value.wt !== null && summerData.value.wt !== undefined
|
|
|
+ ? Math.round(summerData.value.wt)
|
|
|
+ : null,
|
|
|
+ pcsSpl:
|
|
|
+ summerData.value.pcsSpl !== null &&
|
|
|
+ summerData.value.pcsSpl !== undefined
|
|
|
+ ? Math.round(summerData.value.pcsSpl)
|
|
|
+ : null,
|
|
|
+ wtSpl:
|
|
|
+ summerData.value.wtSpl !== null &&
|
|
|
+ summerData.value.wtSpl !== undefined
|
|
|
+ ? Math.round(summerData.value.wtSpl)
|
|
|
+ : null,
|
|
|
+ };
|
|
|
+ } else {
|
|
|
+ // 解决后端data传null的前端显示未刷新的问题
|
|
|
+ summerData.value = {
|
|
|
+ pcsCba: null,
|
|
|
+ wtCba: null,
|
|
|
+ pcsBup: null,
|
|
|
+ wtBup: null,
|
|
|
+ pcs: null,
|
|
|
+ wt: null,
|
|
|
+ pcsSpl: null,
|
|
|
+ wtSpl: null,
|
|
|
+ };
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ } catch (error) {
|
|
|
+ console.log(error);
|
|
|
+ } finally {
|
|
|
+ loading.value = false;
|
|
|
+ }
|
|
|
+};
|
|
|
+
|
|
|
+const downLoad = async () => {
|
|
|
+ try {
|
|
|
+ btnLoading.value = true;
|
|
|
|
|
|
+ await ApiObj.export(formState.flight);
|
|
|
+ } catch (e) {
|
|
|
+ Message.error('数据导出异常');
|
|
|
+ } finally {
|
|
|
+ btnLoading.value = false;
|
|
|
}
|
|
|
+};
|
|
|
+
|
|
|
+onMounted(async () => {
|
|
|
+ formState.flight.flightDate = [
|
|
|
+ dayjs().add(-3, 'day').format('YYYY-MM-DD'),
|
|
|
+ dayjs().format('YYYY-MM-DD'),
|
|
|
+ ];
|
|
|
+ // const typeOptions = await ApiObj.selectOption('goods.type');
|
|
|
+ // partTypeOptions.value = typeOptions.data;
|
|
|
+ search();
|
|
|
+});
|
|
|
+
|
|
|
+const pageChange = (value: number) => {
|
|
|
+ formState.flight.page = value;
|
|
|
+ search();
|
|
|
+};
|
|
|
+const pageSizeChange = (value: number) => {
|
|
|
+ formState.flight.size = value;
|
|
|
+ search();
|
|
|
+};
|
|
|
</script>
|
|
|
+
|
|
|
<style lang="less" scoped>
|
|
|
- .page-content {
|
|
|
+.page-content {
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ padding: 15px 20px 0 20px;
|
|
|
+ .search-header {
|
|
|
width: 100%;
|
|
|
- height: 100%;
|
|
|
- padding: 20px;
|
|
|
-
|
|
|
- .search-header {
|
|
|
- width: 100%;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row;
|
|
|
+ justify-content: space-between;
|
|
|
+ .search-header-left {
|
|
|
display: flex;
|
|
|
flex-direction: row;
|
|
|
- justify-content: space-between;
|
|
|
-
|
|
|
- .search-header-left {
|
|
|
- display: flex;
|
|
|
- flex-direction: row;
|
|
|
- justify-content: flex-start;
|
|
|
- align-items: center;
|
|
|
-
|
|
|
- .search-header-left-item {
|
|
|
- margin-right: 30px;
|
|
|
- }
|
|
|
-
|
|
|
- .w120 {
|
|
|
- width: 130px;
|
|
|
- }
|
|
|
+ justify-content: flex-start;
|
|
|
+ align-items: center;
|
|
|
+ .search-header-left-item {
|
|
|
+ margin-right: 30px;
|
|
|
}
|
|
|
-
|
|
|
- .search-header-right {
|
|
|
- display: flex;
|
|
|
- flex-direction: row;
|
|
|
- justify-content: flex-start;
|
|
|
- align-items: center;
|
|
|
-
|
|
|
- .search-header-right-item {
|
|
|
- margin-right: 30px;
|
|
|
- padding-bottom: 20px;
|
|
|
- }
|
|
|
+ .searchType {
|
|
|
+ padding-bottom: 10px;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- .search-select {
|
|
|
- width: 100%;
|
|
|
- border: 1px solid #e5e7eb;
|
|
|
- padding: 20px 0;
|
|
|
- position: relative;
|
|
|
+ .search-header-right {
|
|
|
display: flex;
|
|
|
flex-direction: row;
|
|
|
- justify-content: space-around;
|
|
|
-
|
|
|
- .search-select-title {
|
|
|
- padding: 0 10px;
|
|
|
- position: absolute;
|
|
|
- left: 400px;
|
|
|
- top: -12px;
|
|
|
- background: #fff;
|
|
|
- color: rgb(79, 89, 105);
|
|
|
+ justify-content: flex-start;
|
|
|
+ align-items: center;
|
|
|
+ .search-header-right-item {
|
|
|
+ margin-right: 10px;
|
|
|
+ padding-bottom: 20px;
|
|
|
}
|
|
|
-
|
|
|
- .search-select-item {
|
|
|
+ .search-header-right-item-box {
|
|
|
+ padding: 10px 0 10px 0;
|
|
|
+ margin-top: -20px;
|
|
|
border: 1px solid #e5e7eb;
|
|
|
- width: 125px;
|
|
|
- padding: 10px;
|
|
|
- box-sizing: border-box;
|
|
|
}
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
- .search-select-item2 {
|
|
|
- border: 1px solid #e5e7eb;
|
|
|
- padding: 10px;
|
|
|
- box-sizing: border-box;
|
|
|
- }
|
|
|
+ .search-select {
|
|
|
+ width: 100%;
|
|
|
+ border: 1px solid #e5e7eb;
|
|
|
+ padding: 5px 0;
|
|
|
+ position: relative;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row;
|
|
|
+ //justify-content: space-around;
|
|
|
+ justify-content: flex-start; /* 左对齐 */
|
|
|
+ .search-select-title {
|
|
|
+ padding: 0 10px;
|
|
|
+ position: absolute;
|
|
|
+ left: 400px;
|
|
|
+ top: -12px;
|
|
|
+ background: #fff;
|
|
|
+ color: rgb(79, 89, 105);
|
|
|
}
|
|
|
|
|
|
- }
|
|
|
+ .search-select-item {
|
|
|
+ border: 1px solid #e5e7eb;
|
|
|
+ width: 155px;
|
|
|
+ padding: 10px;
|
|
|
+ box-sizing: border-box;
|
|
|
+ margin: 0 10px;
|
|
|
+ }
|
|
|
|
|
|
- [data-doc-theme='light'] .ant-table-striped :deep(.table-striped) td {
|
|
|
- background-color: #fafafa;
|
|
|
+ .search-select-item2 {
|
|
|
+ border: 1px solid #e5e7eb;
|
|
|
+ padding: 10px;
|
|
|
+ box-sizing: border-box;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row;
|
|
|
+ align-items: center;
|
|
|
+ }
|
|
|
}
|
|
|
-
|
|
|
- [data-doc-theme='dark'] .ant-table-striped :deep(.table-striped) td {
|
|
|
- background-color: rgb(29, 29, 29);
|
|
|
+ .search-body {
|
|
|
+ .pagination {
|
|
|
+ float: right;
|
|
|
+ padding: 20px 0 0 0;
|
|
|
+ }
|
|
|
}
|
|
|
+}
|
|
|
+[data-doc-theme='light'] .ant-table-striped :deep(.table-striped) td {
|
|
|
+ background-color: #fafafa;
|
|
|
+}
|
|
|
+[data-doc-theme='dark'] .ant-table-striped :deep(.table-striped) td {
|
|
|
+ background-color: rgb(29, 29, 29);
|
|
|
+}
|
|
|
</style>
|