|
|
@@ -0,0 +1,101 @@
|
|
|
+<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 v-if="btnList.length"
|
|
|
+ #expandedRowRender="{ record }">
|
|
|
+ <BtnList :btnList="btnList"
|
|
|
+ :record="record"
|
|
|
+ class="btn-list-sticky"
|
|
|
+ @click="openComponent" />
|
|
|
+ </template>
|
|
|
+ <template #createtime="{ record }">
|
|
|
+ <a>{{ formatTime(record.createtime) }}</a>
|
|
|
+ </template>
|
|
|
+ </a-table>
|
|
|
+ <component :is="componentId"
|
|
|
+ v-if="componentId"
|
|
|
+ :selectedRow="selectedRow"
|
|
|
+ :tableList="tableList"
|
|
|
+ @cancel="closeComponent"></component>
|
|
|
+ </section>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script lang="ts">
|
|
|
+import { enumOrderComponents } from '@/common/constants/enumOrderComponents';
|
|
|
+import { queryTableList, BtnList, defineAsyncComponent, defineComponent, ModalEnum } from '@/common/export/commonTable';
|
|
|
+import { getRecordItemTab } from '@/common/setup/order/orderData';
|
|
|
+import { handleComposeOrderTable } from '@/common/setup/table/compose';
|
|
|
+import { ComposeOrderTableParam } from '@/common/setup/table/interface';
|
|
|
+import { formatTime } from '@/common/methods';
|
|
|
+import { expandIcon } from '@/common/setup/table/clolumn';
|
|
|
+import { queryTradePosition } from '@/services/go/ermcp/order';
|
|
|
+import { QueryTradePositionRsp } from '@/services/go/ermcp/order/interface';
|
|
|
+import { handleSubcriteQuote } from '@/common/setup/table/tableQuote';
|
|
|
+import { findGoodsTradeModeById, getQuoteDayInfoByCode } from '@/services/bus/goods';
|
|
|
+import { handleDeliveryRelation } from '@/common/setup/deliveryRelation';
|
|
|
+import { TradeMode } from '@/common/constants/enumCommon';
|
|
|
+import { BtnListType } from '@/common/components/btnList/interface';
|
|
|
+import { columns } from './setup';
|
|
|
+import { queryTjmdTransferApply } from '@/services/go/Tjmd';
|
|
|
+import { QueryTjmdTransferApplyReq } from '@/services/go/Tjmd/interface';
|
|
|
+
|
|
|
+export default defineComponent({
|
|
|
+ name: 'commodity_contract_bargain',
|
|
|
+ components: {
|
|
|
+ BtnList,
|
|
|
+ // [ModalEnum.commodity_contract_summary_settlement]: defineAsyncComponent(() => import('./components/commodity_contract_summary_settlement/index.vue')),
|
|
|
+ // [ModalEnum.commodity_contract_summary_transfer]: defineAsyncComponent(() => import('./components/commodity_contract_summary_transfer/index.vue')),
|
|
|
+ // commodity_contract_summary_deal_closed: defineAsyncComponent(() => import('./components/commodity_contract_summary_deal_closed/index.vue')),
|
|
|
+ },
|
|
|
+ setup() {
|
|
|
+ // 表格列表数据
|
|
|
+ const { loading, tableList, queryTable } = queryTableList<QueryTradePositionRsp>();
|
|
|
+ // 交割商品
|
|
|
+ handleDeliveryRelation();
|
|
|
+ // 获取列表数据
|
|
|
+ const queryTableAction = (applytype: 1 | 2) => {
|
|
|
+ const param: QueryTjmdTransferApplyReq = {
|
|
|
+ applytype,
|
|
|
+ };
|
|
|
+ queryTable(queryTjmdTransferApply, param);
|
|
|
+ };
|
|
|
+ // 表格通用逻辑
|
|
|
+ const param: ComposeOrderTableParam = {
|
|
|
+ queryFn: () => queryTableAction(1),
|
|
|
+ recordList: getRecordItemTab(),
|
|
|
+ };
|
|
|
+
|
|
|
+ function handleBtnList(record: QueryTradePositionRsp, btnList: BtnListType[]) {
|
|
|
+ if (findGoodsTradeModeById(record.goodsid) === TradeMode.DiaoQi) {
|
|
|
+ return btnList.filter((e) => e.code === 'commodity_contract_summary_deal_closed');
|
|
|
+ } else {
|
|
|
+ return btnList.filter((e) => e.code !== 'commodity_contract_summary_deal_closed');
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return {
|
|
|
+ ...handleComposeOrderTable<QueryTradePositionRsp>(param),
|
|
|
+ columns,
|
|
|
+ loading,
|
|
|
+ tableList,
|
|
|
+ formatTime,
|
|
|
+ expandIcon,
|
|
|
+ handleBtnList,
|
|
|
+ };
|
|
|
+ },
|
|
|
+});
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="less">
|
|
|
+</style>;
|