|
|
@@ -1,43 +1,51 @@
|
|
|
<template>
|
|
|
<!-- 提货 -->
|
|
|
- <section>
|
|
|
- <a-table :columns="columns"
|
|
|
- class="srcollYTable expandLeftTable"
|
|
|
- :scroll="{ x: '100%', y: '190px' }"
|
|
|
- :pagination="false"
|
|
|
- :loading="loading"
|
|
|
- :expandedRowKeys="expandedRowKeys"
|
|
|
- :customRow="Rowclick"
|
|
|
- :expandIcon="expandIcon"
|
|
|
- :expandIconAsCell="false"
|
|
|
- rowKey="key"
|
|
|
- :data-source="tableList">
|
|
|
- <!-- 额外的展开行 -->
|
|
|
- <template #expandedRowRender="{ record }">
|
|
|
- <BtnList :btnList="handleBtnList(btnList, record)"
|
|
|
- :record="record"
|
|
|
- class="btn-list-sticky"
|
|
|
- @click="openComponent" />
|
|
|
- </template>
|
|
|
+ <mtp-table-scroll>
|
|
|
+ <template #default="{ scroll }">
|
|
|
+ <a-table
|
|
|
+ :columns="columns"
|
|
|
+ class="srcollYTable"
|
|
|
+ :scroll="scroll"
|
|
|
+ :pagination="false"
|
|
|
+ :loading="loading"
|
|
|
+ :expandedRowKeys="expandedRowKeys"
|
|
|
+ :customRow="Rowclick"
|
|
|
+ :expandIcon="expandIcon"
|
|
|
+ :expandIconAsCell="false"
|
|
|
+ :rowKey="(record, index) => index"
|
|
|
+ :data-source="tableList"
|
|
|
+ >
|
|
|
+ <!-- 额外的展开行 -->
|
|
|
+ <template #expandedRowRender="{ record }">
|
|
|
+ <BtnList
|
|
|
+ :btnList="handleBtnList(btnList, record)"
|
|
|
+ :record="record"
|
|
|
+ class="btn-list-sticky"
|
|
|
+ @click="openComponent"
|
|
|
+ />
|
|
|
+ </template>
|
|
|
|
|
|
- <!-- applytype 类型-->
|
|
|
- <template #applytype="{ record }">
|
|
|
- <span>{{ getPickUpStatusName(record.applytype) }}</span>
|
|
|
- </template>
|
|
|
- <template #expresscompany="{ record, text }">
|
|
|
- <span>{{ (text && text !== '--') ? text + record.expressnum : '--' }}</span>
|
|
|
- </template>
|
|
|
+ <!-- applytype 类型-->
|
|
|
+ <template #applytype="{ record }">
|
|
|
+ <span>{{ getPickUpStatusName(record.applytype) }}</span>
|
|
|
+ </template>
|
|
|
+ <template #expresscompany="{ record, text }">
|
|
|
+ <span>{{ (text && text !== '--') ? text + record.expressnum : '--' }}</span>
|
|
|
+ </template>
|
|
|
|
|
|
- <!-- applystatus 状态 -->
|
|
|
- <template #applystatus="{ record }">
|
|
|
- <span>{{ getPickUpTypeName(record.applystatus) }}</span>
|
|
|
- </template>
|
|
|
- </a-table>
|
|
|
- <component :is="componentId"
|
|
|
- v-if="componentId"
|
|
|
- :selectedRow="selectedRow"
|
|
|
- @cancel="closeComponent"></component>
|
|
|
- </section>
|
|
|
+ <!-- applystatus 状态 -->
|
|
|
+ <template #applystatus="{ record }">
|
|
|
+ <span>{{ getPickUpTypeName(record.applystatus) }}</span>
|
|
|
+ </template>
|
|
|
+ </a-table>
|
|
|
+ </template>
|
|
|
+ </mtp-table-scroll>
|
|
|
+ <component
|
|
|
+ :is="componentId"
|
|
|
+ v-if="componentId"
|
|
|
+ :selectedRow="selectedRow"
|
|
|
+ @cancel="closeComponent"
|
|
|
+ ></component>
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts">
|
|
|
@@ -51,47 +59,49 @@ import { ComposeOrderTableParam } from '@/common/setup/table/interface';
|
|
|
import { expandIcon } from '@/common/setup/table/clolumn';
|
|
|
import { BtnListType } from '@/common/components/btnList/interface';
|
|
|
import { getPickUpStatusName, getPickUpTypeName } from '@/common/constants/enumsName';
|
|
|
+import MtpTableScroll from '@/common/components/tableScroll/index.vue';
|
|
|
|
|
|
export default defineComponent({
|
|
|
- name: enumOrderComponents.spot_warrant_in_and_out_warehouse,
|
|
|
- components: {
|
|
|
- BtnList,
|
|
|
- [ModalEnum.spot_warrant_in_and_out_warehouse_sure_pick_up]: defineAsyncComponent(() => import('./components/pick_up/index.vue')),
|
|
|
- [ModalEnum.spot_warrant_in_and_out_warehouse_revoke]: defineAsyncComponent(() => import('./components/cancel/index.vue')),
|
|
|
- },
|
|
|
- setup() {
|
|
|
- // 表格列表数据
|
|
|
- const { loading, tableList, queryTable } = queryTableList<WrOutInApply>();
|
|
|
- // 获取列表数据
|
|
|
- const queryTableAction = () => {
|
|
|
- queryTable(queryWrOutInApply);
|
|
|
- };
|
|
|
- // 表格通用逻辑
|
|
|
- const param: ComposeOrderTableParam = {
|
|
|
- queryFn: queryTableAction,
|
|
|
- tableName: 'table_pcweb_spot_trade_bottom_spot_warrant_pick_up',
|
|
|
- recordList: getRecordItemTab(),
|
|
|
- };
|
|
|
- function handleBtnList(btnList: BtnListType[], item: WrOutInApply) {
|
|
|
- const { applystatus, applytype } = item;
|
|
|
- if (applystatus === 0 && applytype === 4) {
|
|
|
- return btnList.filter((e) => e.code === ModalEnum.spot_warrant_in_and_out_warehouse_sure_pick_up);
|
|
|
- } else if (applystatus === 1 && applytype === 2) {
|
|
|
- return btnList.filter((e) => e.code === ModalEnum.spot_warrant_in_and_out_warehouse_revoke);
|
|
|
- } else {
|
|
|
- return [];
|
|
|
- }
|
|
|
- }
|
|
|
- return {
|
|
|
- ...handleComposeOrderTable<WrOutInApply>(param),
|
|
|
- loading,
|
|
|
- tableList,
|
|
|
- expandIcon,
|
|
|
- handleBtnList,
|
|
|
- getPickUpStatusName,
|
|
|
- getPickUpTypeName,
|
|
|
- };
|
|
|
- },
|
|
|
+ name: enumOrderComponents.spot_warrant_in_and_out_warehouse,
|
|
|
+ components: {
|
|
|
+ BtnList,
|
|
|
+ MtpTableScroll,
|
|
|
+ pick_up: defineAsyncComponent(() => import('./components/pick_up/index.vue')),
|
|
|
+ cacel: defineAsyncComponent(() => import('./components/cancel/index.vue')),
|
|
|
+ },
|
|
|
+ setup() {
|
|
|
+ // 表格列表数据
|
|
|
+ const { loading, tableList, queryTable } = queryTableList<WrOutInApply>();
|
|
|
+ // 获取列表数据
|
|
|
+ const queryTableAction = () => {
|
|
|
+ queryTable(queryWrOutInApply);
|
|
|
+ };
|
|
|
+ // 表格通用逻辑
|
|
|
+ const param: ComposeOrderTableParam = {
|
|
|
+ queryFn: queryTableAction,
|
|
|
+ tableName: 'table_pcweb_spot_trade_bottom_spot_warrant_pick_up',
|
|
|
+ recordList: getRecordItemTab(),
|
|
|
+ };
|
|
|
+ function handleBtnList(btnList: BtnListType[], item: WrOutInApply) {
|
|
|
+ const { applystatus, applytype } = item;
|
|
|
+ if (applystatus === 0 && applytype === 4) {
|
|
|
+ return btnList.filter((e) => e.code === ModalEnum.spot_warrant_in_and_out_warehouse_sure_pick_up);
|
|
|
+ } else if (applystatus === 1 && applytype === 2) {
|
|
|
+ return btnList.filter((e) => e.code === ModalEnum.spot_warrant_in_and_out_warehouse_revoke);
|
|
|
+ } else {
|
|
|
+ return [];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return {
|
|
|
+ ...handleComposeOrderTable<WrOutInApply>(param),
|
|
|
+ loading,
|
|
|
+ tableList,
|
|
|
+ expandIcon,
|
|
|
+ handleBtnList,
|
|
|
+ getPickUpStatusName,
|
|
|
+ getPickUpTypeName,
|
|
|
+ };
|
|
|
+ },
|
|
|
});
|
|
|
</script>
|
|
|
|