|
@@ -2,22 +2,44 @@
|
|
|
<div class="page-content">
|
|
|
<div class="search-header">
|
|
|
<div class="search-header-left">
|
|
|
- <div class="search-header-left-item" v-if="searchType=='1'">
|
|
|
+ <div v-if="searchType == '1'" class="search-header-left-item">
|
|
|
<a-form-item label="航班号">
|
|
|
- <a-input v-model="formState.flight.flightNo" />
|
|
|
+ <a-input
|
|
|
+ v-model="flyParam.fltNoPrefix"
|
|
|
+ allow-clear
|
|
|
+ class="mr-5 w-24"
|
|
|
+ @input="commonUpperCase('fltNoPrefix')"
|
|
|
+ />
|
|
|
+ <a-input
|
|
|
+ v-model="flyParam.fltNoSuffix"
|
|
|
+ allow-clear
|
|
|
+ class="mr-5 w-36"
|
|
|
+ @input="commonUpperCase('fltNoSuffix')"
|
|
|
+ />
|
|
|
</a-form-item>
|
|
|
</div>
|
|
|
- <div class="search-header-left-item" v-if="searchType=='3'">
|
|
|
- <a-select ref="select" :options="timeTypeOptions" v-model="timeType" style="width: 120px"
|
|
|
- @change="timeTypeChange()">
|
|
|
+ <div v-if="searchType == '3'" class="search-header-left-item">
|
|
|
+ <a-select
|
|
|
+ ref="select"
|
|
|
+ v-model="timeType"
|
|
|
+ :allow-clear="false"
|
|
|
+ :options="timeTypeOptions"
|
|
|
+ style="width: 120px"
|
|
|
+ @change="timeTypeChange()"
|
|
|
+ >
|
|
|
</a-select>
|
|
|
+ <a-range-picker v-model="timeDate" />
|
|
|
</div>
|
|
|
- <div class="search-header-left-item" v-if="searchType!='2'">
|
|
|
+ <div v-if="searchType == '1'" class="search-header-left-item">
|
|
|
<a-form-item label="航班日期">
|
|
|
- <a-range-picker v-model="formState.flight.flightDate" />
|
|
|
+ <a-range-picker
|
|
|
+ v-model="formState.flight.flightDate"
|
|
|
+ :allow-clear="false"
|
|
|
+ style="width: 250px"
|
|
|
+ />
|
|
|
</a-form-item>
|
|
|
</div>
|
|
|
- <div class="search-header-left-item" v-if="searchType=='2'">
|
|
|
+ <div v-if="searchType == '2'" class="search-header-left-item">
|
|
|
<a-form-item label="运单号">
|
|
|
<a-input v-model="formState.flight.billNo" />
|
|
|
</a-form-item>
|
|
@@ -25,8 +47,22 @@
|
|
|
</div>
|
|
|
<div class="search-header-right">
|
|
|
<div class="search-header-right-item">
|
|
|
- <a-radio-group v-model="searchType" name="radioGroup" :options="searchTypeOption"
|
|
|
- @change="searchTypeChange()">
|
|
|
+ <a-radio-group
|
|
|
+ v-model="searchType"
|
|
|
+ :options="searchTypeOption"
|
|
|
+ name="radioGroup"
|
|
|
+ size="mini"
|
|
|
+ @change="searchTypeChange"
|
|
|
+ >
|
|
|
+ </a-radio-group>
|
|
|
+ </div>
|
|
|
+ <div class="search-header-right-item">
|
|
|
+ <a-radio-group
|
|
|
+ v-model="formState.flight.orderType"
|
|
|
+ :options="orderTypeOption"
|
|
|
+ name="radioGroup"
|
|
|
+ size="mini"
|
|
|
+ >
|
|
|
</a-radio-group>
|
|
|
</div>
|
|
|
<div class="search-header-right-item">
|
|
@@ -38,270 +74,776 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="search-select">
|
|
|
- <div class="search-select-title">
|
|
|
- 筛选条件
|
|
|
- </div>
|
|
|
+ <div class="search-select-title"> 筛选条件</div>
|
|
|
<div class="search-select-item">
|
|
|
- <a-checkbox-group v-model="formState.flight.pickOrder" :options="pickOrderOptions" />
|
|
|
+ <a-checkbox-group
|
|
|
+ v-model="formState.flight.pickOrder"
|
|
|
+ :options="pickOrderOptions"
|
|
|
+ />
|
|
|
</div>
|
|
|
<div class="search-select-item">
|
|
|
- <a-checkbox-group v-model="formState.flight.takeGoods" :options="takeGoodsOptions" />
|
|
|
+ <a-checkbox-group
|
|
|
+ v-model="formState.flight.takeGoods"
|
|
|
+ :options="takeGoodsOptions"
|
|
|
+ />
|
|
|
</div>
|
|
|
<div class="search-select-item">
|
|
|
- <a-checkbox-group v-model="formState.flight.damaged" :options="damagedOptions" />
|
|
|
+ <a-checkbox-group
|
|
|
+ v-model="formState.flight.damaged"
|
|
|
+ :options="damagedOptions"
|
|
|
+ />
|
|
|
</div>
|
|
|
<div class="search-select-item">
|
|
|
- <a-checkbox-group v-model="formState.flight.release" :options="releaseOptions" />
|
|
|
+ <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" />
|
|
|
+ <a-checkbox-group
|
|
|
+ v-model="formState.flight.partType"
|
|
|
+ :options="partTypeOptions"
|
|
|
+ />
|
|
|
</div>
|
|
|
<div class="search-select-item2">
|
|
|
<div>
|
|
|
- <a-radio-group v-model="formState.flight.orderType" name="radioGroup" :options="orderTypeOption" @change="">
|
|
|
- </a-radio-group>
|
|
|
- </div>
|
|
|
- <div>
|
|
|
- <a-radio-group v-model="formState.flight.goodsType" name="radioGroup" :options="goodsTypeOption" @change="">
|
|
|
+ <a-radio-group
|
|
|
+ v-model="formState.flight.goodsType"
|
|
|
+ :options="goodsTypeOption"
|
|
|
+ name="radioGroup"
|
|
|
+ >
|
|
|
</a-radio-group>
|
|
|
</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>合计:<span style="margin-right: 20px;">30159/894T</span><span>30159/894T</span></template>
|
|
|
- </a-table>
|
|
|
+ <a-spin :loading="loading" style="width: 100%; margin-top: 20px">
|
|
|
+ <a-table
|
|
|
+ :data="dataSource"
|
|
|
+ :pagination="false"
|
|
|
+ :stripe="true"
|
|
|
+ :summary="summary"
|
|
|
+ :v-loading="loading"
|
|
|
+ bordered
|
|
|
+ >
|
|
|
+ <template #columns>
|
|
|
+ <a-table-column title="序号">
|
|
|
+ <template
|
|
|
+ #cell="{
|
|
|
+ /* eslint-disable-next-line vue/no-unused-vars */
|
|
|
+ record,
|
|
|
+ /* eslint-disable-next-line vue/no-unused-vars */
|
|
|
+ column,
|
|
|
+ rowIndex,
|
|
|
+ }"
|
|
|
+ >{{ rowIndex + 1 }}</template
|
|
|
+ >
|
|
|
+ </a-table-column>
|
|
|
+ <a-table-column title="FWB信息">
|
|
|
+ <template #cell="{ record }">
|
|
|
+ <a-button type="text" @click="fwbClick(record)">
|
|
|
+ {{ record.fwb === '1' ? '正常' : '缺失' }}
|
|
|
+ </a-button>
|
|
|
+ </template>
|
|
|
+ </a-table-column>
|
|
|
+ <a-table-column
|
|
|
+ data-index="mawbNo"
|
|
|
+ title="运单信息"
|
|
|
+ ></a-table-column>
|
|
|
+ <a-table-column data-index="fltNo" title="航班号">
|
|
|
+ <template #cell="{ record }">
|
|
|
+ <span>
|
|
|
+ {{ contactStr(record.fltNo, record.fltDate) }}
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ </a-table-column>
|
|
|
+ <a-table-column data-index="pcsDec" title="运单件重">
|
|
|
+ <!-- 申报件数/申报重量-->
|
|
|
+ <template #cell="{ record }">
|
|
|
+ <span>
|
|
|
+ {{ contactStr(record.pcsDec, record.wtDec) }}
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ </a-table-column>
|
|
|
+ <a-table-column data-index="wtDec" title="理货件重">
|
|
|
+ <!-- 理货件重 = 理货时间为空值为空字符串, 如果有时间,那么就是运单件重-->
|
|
|
+ <template #cell="{ record }">
|
|
|
+ <span>
|
|
|
+ {{
|
|
|
+ record.talCfmDate
|
|
|
+ ? contactStr(record.pcsDec, record.wtDec)
|
|
|
+ : ''
|
|
|
+ }}
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ </a-table-column>
|
|
|
+ <a-table-column title="始发/目的地">
|
|
|
+ <template #cell="{ record }">
|
|
|
+ <span>
|
|
|
+ {{ contactStr(record.orgnNo, record.destNo) }}
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ </a-table-column>
|
|
|
+ <a-table-column
|
|
|
+ data-index="iwsCfmDate"
|
|
|
+ title="抵港时间"
|
|
|
+ ></a-table-column>
|
|
|
+ <a-table-column
|
|
|
+ data-index="talCfmDate"
|
|
|
+ title="理货时间"
|
|
|
+ ></a-table-column>
|
|
|
+ <a-table-column
|
|
|
+ data-index="awdCfmDate"
|
|
|
+ title="取单时间"
|
|
|
+ ></a-table-column>
|
|
|
+ <a-table-column
|
|
|
+ data-index="dlvCfmDate"
|
|
|
+ title="提货时间"
|
|
|
+ ></a-table-column>
|
|
|
+ <a-table-column title="海关放行">
|
|
|
+ <template #cell="{ record }">
|
|
|
+ <span>{{ record.relStatus === 'Y' ? '是' : '否' }}</span>
|
|
|
+ </template>
|
|
|
+ </a-table-column>
|
|
|
+ <a-table-column title="破损">
|
|
|
+ <template #cell="{ record }">
|
|
|
+ <a-button type="text" @click="dmgClick"
|
|
|
+ >{{ record.dmgCount > 0 ? '有' : '无' }}
|
|
|
+ </a-button>
|
|
|
+ </template>
|
|
|
+ </a-table-column>
|
|
|
+ </template>
|
|
|
+ <template #summary-cell="{ column, record }">
|
|
|
+ <div>{{ record[column.dataIndex] }}</div>
|
|
|
+ </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"
|
|
|
+ />
|
|
|
+ </a-spin>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <a-modal
|
|
|
+ v-model:visible="showDetail"
|
|
|
+ :hide-cancel="true"
|
|
|
+ :ok-text="'关闭'"
|
|
|
+ title="FWB报文信息"
|
|
|
+ @ok="showDetail = false"
|
|
|
+ >
|
|
|
+ <!-- <a-radio default-checked>发货人信息</a-radio>-->
|
|
|
+ <a-space direction="vertical" fill size="large">
|
|
|
+ <a-descriptions :size="'large'">
|
|
|
+ <a-descriptions-item :label="'运单号'">
|
|
|
+ {{ fwbData.mawbNo ? fwbData.mawbNo : '' }}
|
|
|
+ </a-descriptions-item>
|
|
|
+ </a-descriptions>
|
|
|
+ <a-descriptions
|
|
|
+ :column="{ xs: 1, md: 3, lg: 4 }"
|
|
|
+ :size="'large'"
|
|
|
+ title="发货人信息"
|
|
|
+ >
|
|
|
+ <a-descriptions-item :label="'发货人'" :span="6">
|
|
|
+ {{ fwbData.shpName }}
|
|
|
+ </a-descriptions-item>
|
|
|
+ <!-- <a-descriptions-item :label="'代码'" :span="6">-->
|
|
|
+ <!-- {{ fwbData.shipperInfo.code }}-->
|
|
|
+ <!-- </a-descriptions-item>-->
|
|
|
+ <a-descriptions-item :label="'国家地区'" :span="3">
|
|
|
+ {{ fwbData.shpCont }}
|
|
|
+ </a-descriptions-item>
|
|
|
+ <a-descriptions-item :label="'通讯号码'" :span="3">
|
|
|
+ {{ fwbData.shpTelNo }}
|
|
|
+ </a-descriptions-item>
|
|
|
+ <a-descriptions-item :label="'发货地址'" :span="6">
|
|
|
+ {{ fwbData.shpAddr }}
|
|
|
+ </a-descriptions-item>
|
|
|
+ </a-descriptions>
|
|
|
+ <a-descriptions
|
|
|
+ :column="{ xs: 1, md: 3, lg: 4 }"
|
|
|
+ :size="'large'"
|
|
|
+ title="收货人信息"
|
|
|
+ >
|
|
|
+ <a-descriptions-item :label="'收货人'" :span="6">
|
|
|
+ {{ fwbData.cneName }}
|
|
|
+ </a-descriptions-item>
|
|
|
+ <!-- <a-descriptions-item :label="'代码'" :span="6">-->
|
|
|
+ <!-- {{ fwbData.recipientInfo.code }}-->
|
|
|
+ <!-- </a-descriptions-item>-->
|
|
|
+ <a-descriptions-item :label="'国家地区'" :span="3">
|
|
|
+ {{ fwbData.cneCont }}
|
|
|
+ </a-descriptions-item>
|
|
|
+ <a-descriptions-item :label="'通讯号码'" :span="3">
|
|
|
+ {{ fwbData.cneTelNo }}
|
|
|
+ </a-descriptions-item>
|
|
|
+ <a-descriptions-item :label="'收货地址'" :span="6">
|
|
|
+ {{ fwbData.cneAddr }}
|
|
|
+ </a-descriptions-item>
|
|
|
+ </a-descriptions>
|
|
|
+ </a-space>
|
|
|
+ </a-modal>
|
|
|
+ <a-modal
|
|
|
+ v-model:visible="showPictureDetail"
|
|
|
+ :cancel-text="'关闭'"
|
|
|
+ :hide-cancel="false"
|
|
|
+ :ok-text="'导出'"
|
|
|
+ title="破损照片"
|
|
|
+ @cancel="showDetail = false"
|
|
|
+ @ok="exportPicture"
|
|
|
+ >
|
|
|
+ <a-descriptions :size="'large'">
|
|
|
+ <a-descriptions-item :label="'运单号'">
|
|
|
+ {{ fwbData.mawbNo ? fwbData.mawbNo : '' }}
|
|
|
+ </a-descriptions-item>
|
|
|
+ </a-descriptions>
|
|
|
+ <a-descriptions :size="'large'" :title="'预览'" layout="inline-horizontal">
|
|
|
+ <a-descriptions-item>
|
|
|
+ <a-image
|
|
|
+ v-for="(item, index) in imgList"
|
|
|
+ :key="index"
|
|
|
+ :src="item"
|
|
|
+ height="50px"
|
|
|
+ style="padding: 3px"
|
|
|
+ width="auto"
|
|
|
+ ></a-image>
|
|
|
+ </a-descriptions-item>
|
|
|
+ </a-descriptions>
|
|
|
+ <!-- <div
|
|
|
+ v-for="(item, index) in imgList"
|
|
|
+ :key="index"
|
|
|
+ style="display: inline-block"
|
|
|
+ >
|
|
|
+ <a-image
|
|
|
+ :src="item"
|
|
|
+ height="50px"
|
|
|
+ style="padding: 3px"
|
|
|
+ width="auto"
|
|
|
+ ></a-image>
|
|
|
+ </div>-->
|
|
|
+ <a-descriptions :size="'large'" :title="'大图'" layout="inline-horizontal">
|
|
|
+ <a-descriptions-item>
|
|
|
+ <a-image :src="imgList[0]" height="auto" width="100%"></a-image>
|
|
|
+ </a-descriptions-item>
|
|
|
+ </a-descriptions>
|
|
|
+ <!-- <a-row>
|
|
|
+ <a-col :span="24">
|
|
|
+ <a-image :src="imgList[0]" height="auto" width="100%"></a-image>
|
|
|
+ </a-col>
|
|
|
+ </a-row>-->
|
|
|
+ </a-modal>
|
|
|
</template>
|
|
|
+
|
|
|
<script lang="ts" setup>
|
|
|
- const timeType = ref('1');
|
|
|
- const searchType = ref<string>('1');
|
|
|
- const timeTypeOptions = ref<SelectProps['options']>([
|
|
|
- {
|
|
|
- value: '1',
|
|
|
- label: '理货时间',
|
|
|
- },
|
|
|
- {
|
|
|
- value: '2',
|
|
|
- label: '放行时间',
|
|
|
- },
|
|
|
- {
|
|
|
- value: '3',
|
|
|
- label: '抵港时间',
|
|
|
- },
|
|
|
- ]);
|
|
|
- const searchTypeOption = ref<RadioGroupProps['options']>([
|
|
|
- {
|
|
|
- value: '1',
|
|
|
- label: '按航班',
|
|
|
- },
|
|
|
- {
|
|
|
- value: '2',
|
|
|
- label: '按运单',
|
|
|
- },
|
|
|
- {
|
|
|
- value: '3',
|
|
|
- label: '按时间',
|
|
|
- },
|
|
|
- ]);
|
|
|
+import { SelectProps } from '@arco-design/web-vue';
|
|
|
+import { ref, watch, reactive } from 'vue';
|
|
|
+import { dayjs } from '@arco-design/web-vue/es/_utils/date';
|
|
|
+import { values } from 'lodash-es';
|
|
|
+import { useUserStore } from '@/store';
|
|
|
+import ApiObj from './api/CurrentPageApi';
|
|
|
+// import data from './data.json';
|
|
|
|
|
|
- const pickOrderOptions = [
|
|
|
- { label: '已取单', value: '1' },
|
|
|
- { label: '未取单', value: '2' },
|
|
|
- ];
|
|
|
+// 定义 flight 下的各个字段类型
|
|
|
+interface FlightState {
|
|
|
+ flightNo: string; // 航班号
|
|
|
+ flightDate: string[]; // 航班日期,字符串数组
|
|
|
+ billNo: string; // 运单号
|
|
|
+ pickOrder: string[]; // 取单状态,字符串数组
|
|
|
+ takeGoods: string[]; // 提货状态,字符串数组
|
|
|
+ damaged: string[]; // 破损状态,字符串数组
|
|
|
+ release: string[]; // 海关放行,字符串数组
|
|
|
+ partType: string[]; // 寄件类型,字符串数组
|
|
|
+ orderType: string; // 运单类型
|
|
|
+ goodsType: string; // 商品类型
|
|
|
+ tallyTime: string[]; // 理货时间,字符串数组
|
|
|
+ releaseTime: string[]; // 放行时间,字符串数组
|
|
|
+ arrivalTime: string[]; // 抵港时间,字符串数组
|
|
|
+}
|
|
|
+interface SummaryData {
|
|
|
+ salary: number;
|
|
|
+ data1: number;
|
|
|
+ data2: number;
|
|
|
+}
|
|
|
+interface Record {
|
|
|
+ key: string;
|
|
|
+ name: string;
|
|
|
+ salary: number;
|
|
|
+ data1: number;
|
|
|
+ data2: number;
|
|
|
+}
|
|
|
+// 定义记录项的接口
|
|
|
+interface RecordItem {
|
|
|
+ id: number;
|
|
|
+ mawbNo: string;
|
|
|
+ fltNo: string;
|
|
|
+ fltDate: string;
|
|
|
+ pcsDec: number;
|
|
|
+ wtDec: number;
|
|
|
+ orgnNo: string;
|
|
|
+ destNo: string;
|
|
|
+ goodsType: string;
|
|
|
+ agtNo: string;
|
|
|
+ dmgCount: number;
|
|
|
+}
|
|
|
|
|
|
- const takeGoodsOptions = [
|
|
|
- { label: '已提货', value: '1' },
|
|
|
- { label: '未提货', value: '2' },
|
|
|
- ];
|
|
|
+// 定义 API 返回的整体数据结构
|
|
|
+interface ApiResponse {
|
|
|
+ code: number;
|
|
|
+ message: string;
|
|
|
+ data: {
|
|
|
+ current: number;
|
|
|
+ total: number;
|
|
|
+ size: number;
|
|
|
+ records: RecordItem[];
|
|
|
+ };
|
|
|
+}
|
|
|
|
|
|
- const damagedOptions = [
|
|
|
- { label: '有破损', value: '1' },
|
|
|
- { label: '未破损', value: '2' },
|
|
|
- ];
|
|
|
+// 定义整个 formState 的类型
|
|
|
+interface FormStateItem {
|
|
|
+ flight: FlightState;
|
|
|
+ page: number;
|
|
|
+ size: number;
|
|
|
+}
|
|
|
+const imgList = ref<string[]>([
|
|
|
+ 'https://p1-arco.byteimg.com/tos-cn-i-uwbnlip3yd/cd7a1aaea8e1c5e3d26fe2591e561798.png~tplv-uwbnlip3yd-webp.webp',
|
|
|
+ 'https://p1-arco.byteimg.com/tos-cn-i-uwbnlip3yd/6480dbc69be1b5de95010289787d64f1.png~tplv-uwbnlip3yd-webp.webp',
|
|
|
+ 'https://p1-arco.byteimg.com/tos-cn-i-uwbnlip3yd/0265a04fddbd77a19602a15d9d55d797.png~tplv-uwbnlip3yd-webp.webp',
|
|
|
+]);
|
|
|
+const showPictureDetail = ref<boolean>(false);
|
|
|
+const timeType = ref<string>('1');
|
|
|
+const showDetail = ref<boolean>(false);
|
|
|
+const total = ref<number>(0);
|
|
|
+const timeDate = ref<string[]>([]);
|
|
|
+const searchType = ref<string>('1');
|
|
|
+const timeTypeOptions = ref<SelectProps['options']>([
|
|
|
+ {
|
|
|
+ value: '1',
|
|
|
+ label: '理货时间',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: '2',
|
|
|
+ label: '放行时间',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: '3',
|
|
|
+ label: '抵港时间',
|
|
|
+ },
|
|
|
+]);
|
|
|
+const searchTypeOption = ref<any['options']>([
|
|
|
+ {
|
|
|
+ value: '1',
|
|
|
+ label: '按航班',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: '2',
|
|
|
+ label: '按运单',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: '3',
|
|
|
+ label: '按时间',
|
|
|
+ },
|
|
|
+]);
|
|
|
|
|
|
- const releaseOptions = [
|
|
|
- { label: '海关放行', value: '1' },
|
|
|
- { label: '未放行', value: '2' },
|
|
|
- ];
|
|
|
+const pickOrderOptions = [
|
|
|
+ { label: '已取单', value: 'Y' },
|
|
|
+ { label: '未取单', value: 'N' },
|
|
|
+];
|
|
|
|
|
|
- const partTypeOptions = [
|
|
|
- { label: '普件', value: '1' },
|
|
|
- { label: '快件', value: '2' },
|
|
|
- ];
|
|
|
+const takeGoodsOptions = [
|
|
|
+ { label: '已提货', value: 'Y' },
|
|
|
+ { label: '未提货', value: 'N' },
|
|
|
+];
|
|
|
|
|
|
- const orderTypeOption = [
|
|
|
- { label: '含分运单', value: '1' },
|
|
|
- { label: '只含运单(不含主单)', value: '2' },
|
|
|
- ];
|
|
|
+const damagedOptions = [
|
|
|
+ { label: '有破损', value: 'Y' },
|
|
|
+ { label: '未破损', value: 'N' },
|
|
|
+];
|
|
|
|
|
|
- const goodsTypeOption = [
|
|
|
- { label: '鲜活易腐', value: '1' },
|
|
|
- { label: '生鲜', value: '2' },
|
|
|
- { label: '危险品', value: '3' },
|
|
|
- { label: '锂电池', value: '4' },
|
|
|
- { label: '冷藏冷冻', value: '5' },
|
|
|
- { label: '高价值', value: '6' },
|
|
|
- { label: '药品', value: '7' },
|
|
|
- { label: '提前报关', value: '8' },
|
|
|
- ];
|
|
|
+const releaseOptions = [
|
|
|
+ { label: '海关放行', value: 'Y' },
|
|
|
+ { label: '未放行', value: 'N' },
|
|
|
+];
|
|
|
|
|
|
- const formState = reactive({
|
|
|
- flight: {
|
|
|
- flightNo: '',
|
|
|
- flightDate: '',
|
|
|
- billNo: '',
|
|
|
- pickOrder: [],
|
|
|
- takeGoods: [],
|
|
|
- damaged: [],
|
|
|
- release: [],
|
|
|
- partType: [],
|
|
|
- orderType: '',
|
|
|
- goodsType: ''
|
|
|
- },
|
|
|
- });
|
|
|
+const partTypeOptions = [
|
|
|
+ { label: '普件', value: '1' },
|
|
|
+ { label: '快件', value: '2' },
|
|
|
+ { label: '邮件', value: '3' },
|
|
|
+];
|
|
|
|
|
|
- const columns = [
|
|
|
- {
|
|
|
- title: '序号',
|
|
|
- dataIndex: 'order',
|
|
|
- },
|
|
|
- {
|
|
|
- title: 'FWB信息',
|
|
|
- dataIndex: 'fwb',
|
|
|
- },
|
|
|
- {
|
|
|
- title: '运单信息',
|
|
|
- dataIndex: 'orderinfo',
|
|
|
- },
|
|
|
- {
|
|
|
- title: '航班号',
|
|
|
- dataIndex: 'flightNo',
|
|
|
- },
|
|
|
- {
|
|
|
- title: '运单件数',
|
|
|
- dataIndex: 'orderCount',
|
|
|
- },
|
|
|
- ];
|
|
|
+const orderTypeOption = [
|
|
|
+ { label: '含分运单', value: '1' },
|
|
|
+ { label: '主分运单', value: '2' },
|
|
|
+ { label: '分运单', value: '3' },
|
|
|
+];
|
|
|
|
|
|
- const dataSource = [
|
|
|
- {
|
|
|
- order: '1',
|
|
|
- fwb: '正常',
|
|
|
- orderinfo: '300,000.00',
|
|
|
- flightNo: 'CA123',
|
|
|
- orderCount: '1000',
|
|
|
- },
|
|
|
- {
|
|
|
- order: '2',
|
|
|
- fwb: '缺失',
|
|
|
- orderinfo: '300,000.00',
|
|
|
- flightNo: 'CA123',
|
|
|
- orderCount: '1000',
|
|
|
- },
|
|
|
- {
|
|
|
- order: '3',
|
|
|
- fwb: '正常',
|
|
|
- orderinfo: '300,000.00',
|
|
|
- flightNo: 'CA123',
|
|
|
- orderCount: '1000',
|
|
|
- }
|
|
|
- ];
|
|
|
-
|
|
|
- const timeTypeChange = function () {
|
|
|
- console.log(timeType.value)
|
|
|
+const goodsTypeOption = [
|
|
|
+ { label: '鲜活易腐', value: '1' },
|
|
|
+ { label: '生鲜', value: '2' },
|
|
|
+ { label: '危险品', value: '3' },
|
|
|
+ { label: '锂电池', value: '4' },
|
|
|
+ { label: '冷藏冷冻', value: '5' },
|
|
|
+ { label: '高价值', value: '6' },
|
|
|
+ { label: '药品', value: '7' },
|
|
|
+ { label: '提前报关', value: '8' },
|
|
|
+];
|
|
|
+type flyParamItem = {
|
|
|
+ fltNoPrefix: string;
|
|
|
+ fltNoSuffix: string;
|
|
|
+ [key: string]: string; // 索引签名:允许任何字符串作为键,值为 string
|
|
|
+};
|
|
|
+const flyParam = reactive<flyParamItem>({
|
|
|
+ fltNoPrefix: '',
|
|
|
+ fltNoSuffix: '',
|
|
|
+});
|
|
|
+const userStore = useUserStore();
|
|
|
+const formState: FormStateItem = reactive({
|
|
|
+ flight: {
|
|
|
+ flightNo: '', // 航班号
|
|
|
+ flightDate: [], // 航班日期
|
|
|
+ billNo: '', // 运单号
|
|
|
+ pickOrder: [], // 取单状态
|
|
|
+ takeGoods: [], // 提货状态
|
|
|
+ damaged: [], // 破损状态
|
|
|
+ release: [], // 海关放行
|
|
|
+ partType: [], // 寄件类型
|
|
|
+ orderType: '', // 运单类型
|
|
|
+ goodsType: '', // 商品类型
|
|
|
+ tallyTime: [], // 理货时间
|
|
|
+ releaseTime: [], // 放行时间
|
|
|
+ arrivalTime: [], // 抵港时间
|
|
|
+ },
|
|
|
+ page: 1,
|
|
|
+ size: 10,
|
|
|
+ agtNo: userStore.userInfo?.tenant?.threeCode,
|
|
|
+});
|
|
|
+const dataSource = ref<any[]>([]);
|
|
|
+const loading = ref<boolean>(false);
|
|
|
+interface shipperInfoItem {
|
|
|
+ consignor: string;
|
|
|
+ code: string;
|
|
|
+ countryRegion: string;
|
|
|
+ shippingAddress: string;
|
|
|
+ communicationNumber: string;
|
|
|
+}
|
|
|
+interface recipientInfoItem {
|
|
|
+ consignee: string;
|
|
|
+ code: string;
|
|
|
+ countryRegion: string;
|
|
|
+ communicationNumber: string;
|
|
|
+ receivingAddress: string;
|
|
|
+}
|
|
|
+interface fwbItem {
|
|
|
+ mawbNo?: string;
|
|
|
+ shpName: string;
|
|
|
+ shpCont: string;
|
|
|
+ shpTelNo: string;
|
|
|
+ shpAddr: string;
|
|
|
+ cneName: string;
|
|
|
+ cneCont: string;
|
|
|
+ cneTelNo: string;
|
|
|
+ cneAddr: string;
|
|
|
+}
|
|
|
+const fwbData = ref<fwbItem>({
|
|
|
+ mawbNo: '',
|
|
|
+ shpName: '',
|
|
|
+ shpCont: '',
|
|
|
+ shpTelNo: '',
|
|
|
+ shpAddr: '',
|
|
|
+ cneName: '',
|
|
|
+ cneCont: '',
|
|
|
+ cneTelNo: '',
|
|
|
+ cneAddr: '',
|
|
|
+});
|
|
|
+const contactStr = (str1: string, str2: string): string => {
|
|
|
+ if (str1 && str2) {
|
|
|
+ return `${str1}/${str2}`;
|
|
|
+ }
|
|
|
+ if (str1 && !str2) {
|
|
|
+ return str1;
|
|
|
+ }
|
|
|
+ if (str2 && !str1) {
|
|
|
+ return str2;
|
|
|
}
|
|
|
+ return '';
|
|
|
+};
|
|
|
|
|
|
- const searchTypeChange = function () {
|
|
|
- console.log(searchType.value)
|
|
|
+/**
|
|
|
+ * 时间类型
|
|
|
+ */
|
|
|
+const timeTypeChange = () => {};
|
|
|
+/**
|
|
|
+ * 破损列按钮
|
|
|
+ */
|
|
|
+const dmgClick = () => {
|
|
|
+ showPictureDetail.value = true;
|
|
|
+};
|
|
|
+/**
|
|
|
+ * fwb信息列按钮
|
|
|
+ * @param record
|
|
|
+ */
|
|
|
+const fwbClick = async (record: any) => {
|
|
|
+ showDetail.value = true;
|
|
|
+ // 清空表单
|
|
|
+ fwbData.value.mawbNo = '';
|
|
|
+ fwbData.value.shpName = '';
|
|
|
+ fwbData.value.shpCont = '';
|
|
|
+ fwbData.value.shpTelNo = '';
|
|
|
+ fwbData.value.shpAddr = '';
|
|
|
+ fwbData.value.cneName = '';
|
|
|
+ fwbData.value.cneCont = '';
|
|
|
+ fwbData.value.cneTelNo = '';
|
|
|
+ fwbData.value.cneAddr = '';
|
|
|
+ // 根据运单号获取数据
|
|
|
+ const newVar = await ApiObj.get(record.id);
|
|
|
+ if (newVar && newVar.data) {
|
|
|
+ fwbData.value = newVar.data;
|
|
|
}
|
|
|
+ fwbData.value.mawbNo = record.mawbNo;
|
|
|
+};
|
|
|
+/**
|
|
|
+ * 切换查询类型
|
|
|
+ * @param value
|
|
|
+ */
|
|
|
+const searchTypeChange = (value: string) => {
|
|
|
+ clearForm();
|
|
|
+ setDefaultTime();
|
|
|
+};
|
|
|
+/**
|
|
|
+ * 点击查询按钮
|
|
|
+ */
|
|
|
+const search = async () => {
|
|
|
+ loading.value = true;
|
|
|
+ try {
|
|
|
+ const res = await ApiObj.page(formState);
|
|
|
+ // const resCount = await ApiObj.getMawbCount(formState);
|
|
|
+ // console.log(resCount)
|
|
|
+ dataSource.value = res.data.records;
|
|
|
+ total.value = res.data.total;
|
|
|
+ } catch (e) {
|
|
|
+ console.log('异常');
|
|
|
+ } finally {
|
|
|
+ loading.value = false;
|
|
|
+ }
|
|
|
+};
|
|
|
+/**
|
|
|
+ * 清空查询条件
|
|
|
+ */
|
|
|
+const clearForm = () => {
|
|
|
+ // 清空飞行航班控件
|
|
|
+ flyParam.fltNoPrefix = '';
|
|
|
+ flyParam.fltNoSuffix = '';
|
|
|
+
|
|
|
+ // 清除会被类型隐藏的表单 内容
|
|
|
+ formState.flight.flightNo = '';
|
|
|
+ formState.flight.flightDate = [];
|
|
|
+ formState.flight.billNo = '';
|
|
|
+ formState.flight.tallyTime = [];
|
|
|
+ formState.flight.releaseTime = [];
|
|
|
+ formState.flight.arrivalTime = [];
|
|
|
+};
|
|
|
+const downLoad = () => {};
|
|
|
|
|
|
- const search = function () {
|
|
|
+/**
|
|
|
+ * 转换大写
|
|
|
+ * @param str
|
|
|
+ */
|
|
|
+const commonUpperCase = (str: string): void => {
|
|
|
+ flyParam[str] = flyParam[str].toLocaleUpperCase();
|
|
|
+};
|
|
|
|
|
|
+const setDefaultTime = () => {
|
|
|
+ if (searchType.value === '1') {
|
|
|
+ // 按航班
|
|
|
+ // 设置航班日期默认值
|
|
|
+ formState.flight.flightDate = [
|
|
|
+ dayjs().format('YYYY-MM-DD'),
|
|
|
+ dayjs().format('YYYY-MM-DD'),
|
|
|
+ ];
|
|
|
+ }
|
|
|
+ if (searchType.value === '2') {
|
|
|
+ // 设置timeDate日期默认值
|
|
|
+ timeDate.value = [
|
|
|
+ dayjs().format('YYYY-MM-DD'),
|
|
|
+ dayjs().format('YYYY-MM-DD'),
|
|
|
+ ];
|
|
|
}
|
|
|
+};
|
|
|
|
|
|
- const downLoad = function () {
|
|
|
+/**
|
|
|
+ * 页面初始化
|
|
|
+ */
|
|
|
+onMounted(() => {
|
|
|
+ setDefaultTime();
|
|
|
+ search();
|
|
|
+});
|
|
|
|
|
|
+// 使用 watch 来监听 fltNoPrefix 和 fltNoSuffix 的变化,并更新 flightNo
|
|
|
+watch(
|
|
|
+ () =>
|
|
|
+ (flyParam.fltNoPrefix !== undefined ? flyParam.fltNoPrefix : '') +
|
|
|
+ (flyParam.fltNoSuffix !== undefined ? flyParam.fltNoSuffix : ''),
|
|
|
+ (newValue) => {
|
|
|
+ if (newValue === undefined || newValue === null) {
|
|
|
+ formState.flight.flightNo = '';
|
|
|
+ } else {
|
|
|
+ formState.flight.flightNo = newValue;
|
|
|
+ }
|
|
|
+ }
|
|
|
+);
|
|
|
+// 监听时间类型
|
|
|
+watch(
|
|
|
+ () => timeType.value,
|
|
|
+ (newVar) => {
|
|
|
+ changeTimeValue();
|
|
|
}
|
|
|
+);
|
|
|
+// 监听时间
|
|
|
+watch(
|
|
|
+ () => timeDate.value,
|
|
|
+ (newVar) => {
|
|
|
+ changeTimeValue();
|
|
|
+ }
|
|
|
+);
|
|
|
+/**
|
|
|
+ * 给对应时间赋值
|
|
|
+ */
|
|
|
+const changeTimeValue = () => {
|
|
|
+ if (searchType.value === '3') {
|
|
|
+ // 先清空
|
|
|
+ formState.flight.tallyTime = [];
|
|
|
+ formState.flight.releaseTime = [];
|
|
|
+ formState.flight.arrivalTime = [];
|
|
|
+ // 再赋值
|
|
|
+ if (timeType.value === '1') {
|
|
|
+ formState.flight.tallyTime = timeDate.value;
|
|
|
+ }
|
|
|
+ if (timeType.value === '2') {
|
|
|
+ formState.flight.releaseTime = timeDate.value;
|
|
|
+ }
|
|
|
+ if (timeType.value === '3') {
|
|
|
+ formState.flight.arrivalTime = timeDate.value;
|
|
|
+ }
|
|
|
+ }
|
|
|
+};
|
|
|
+const exportPicture = () => {
|
|
|
+ console.log('图片导出');
|
|
|
+};
|
|
|
+const pageChange = (value: number) => {
|
|
|
+ console.log(`切换页码${value}`);
|
|
|
+ formState.page = value;
|
|
|
+ search();
|
|
|
+};
|
|
|
+const pageSizeChange = (value: number) => {
|
|
|
+ console.log(`改变当前表格记录条数${value}`);
|
|
|
+ formState.size = value;
|
|
|
+ search();
|
|
|
+};
|
|
|
+const summary = ({ data }: { data: any[] }) => {
|
|
|
+ const label = '合计';
|
|
|
+ const value1 = `${10000}/${20}`;
|
|
|
+ const value2 = `${10000}/${20}`;
|
|
|
+ return [
|
|
|
+ // 返回的就是表尾合计列
|
|
|
+ {
|
|
|
+ fltNo: label,
|
|
|
+ pcsDec: value1,
|
|
|
+ wtDec: value2,
|
|
|
+ },
|
|
|
+ ];
|
|
|
+};
|
|
|
</script>
|
|
|
+
|
|
|
<style lang="less" scoped>
|
|
|
- .page-content {
|
|
|
+.page-content {
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ padding: 20px;
|
|
|
+
|
|
|
+ .search-header {
|
|
|
width: 100%;
|
|
|
- height: 100%;
|
|
|
- padding: 20px;
|
|
|
+ height: 65px;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row;
|
|
|
+ justify-content: space-between;
|
|
|
|
|
|
- .search-header {
|
|
|
- width: 100%;
|
|
|
+ .search-header-left {
|
|
|
display: flex;
|
|
|
flex-direction: row;
|
|
|
- justify-content: space-between;
|
|
|
+ justify-content: flex-start;
|
|
|
+ align-items: center;
|
|
|
|
|
|
- .search-header-left {
|
|
|
- display: flex;
|
|
|
- flex-direction: row;
|
|
|
- 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;
|
|
|
+ .search-header-left-item {
|
|
|
+ .arco-form-item {
|
|
|
+ margin-bottom: 0px;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- .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;
|
|
|
+ justify-content: flex-start;
|
|
|
+ align-items: center;
|
|
|
|
|
|
- .search-select-title {
|
|
|
- padding: 0 10px;
|
|
|
- position: absolute;
|
|
|
- left: 400px;
|
|
|
- top: -12px;
|
|
|
- background: #fff;
|
|
|
- color: rgb(79, 89, 105);
|
|
|
+ .search-header-right-item {
|
|
|
+ margin-right: 10px;
|
|
|
}
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
- .search-select-item {
|
|
|
- border: 1px solid #e5e7eb;
|
|
|
- width: 125px;
|
|
|
- padding: 10px;
|
|
|
- box-sizing: border-box;
|
|
|
- }
|
|
|
+ .search-select {
|
|
|
+ width: 100%;
|
|
|
+ border: 1px solid #e5e7eb;
|
|
|
+ padding: 20px 0;
|
|
|
+ position: relative;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row;
|
|
|
+ justify-content: space-around;
|
|
|
|
|
|
- .search-select-item2 {
|
|
|
- border: 1px solid #e5e7eb;
|
|
|
- padding: 10px;
|
|
|
- box-sizing: border-box;
|
|
|
- }
|
|
|
+ .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: 125px;
|
|
|
+ padding: 10px;
|
|
|
+ box-sizing: border-box;
|
|
|
+ }
|
|
|
+
|
|
|
+ .search-select-item2 {
|
|
|
+ border: 1px solid #e5e7eb;
|
|
|
+ padding: 10px;
|
|
|
+ box-sizing: border-box;
|
|
|
+ }
|
|
|
}
|
|
|
- [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);
|
|
|
+
|
|
|
+ .search-body {
|
|
|
+ .pagination {
|
|
|
+ float: right;
|
|
|
+ padding: 20px 0px 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>
|