|
@@ -1,101 +1,115 @@
|
|
|
<template>
|
|
<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="(record,index)=>index" :data-source="tableList">
|
|
|
|
|
- <!-- 额外的展开行 -->
|
|
|
|
|
- <template #expandedRowRender="{ record }">
|
|
|
|
|
- <BtnList :btnList="handleBtn(btnList, record)" :record="record" class="btn-list-sticky" @click="openComponent" />
|
|
|
|
|
- </template>
|
|
|
|
|
- <!-- 履约类型 -->
|
|
|
|
|
- <template #performancetype="{ record }">
|
|
|
|
|
- <a>{{ getPerformanceTypeName(record.performancetype, record.haswr) }}</a>
|
|
|
|
|
- </template>
|
|
|
|
|
-
|
|
|
|
|
- <!-- 付款方式 -->
|
|
|
|
|
- <template #paymenttype="{ record }">
|
|
|
|
|
- <a>{{ getPaymentTypeName(record.paymenttype) }}</a>
|
|
|
|
|
- </template>
|
|
|
|
|
-
|
|
|
|
|
- <!-- 履约状态 -->
|
|
|
|
|
- <template #performancestatus="{ record }">
|
|
|
|
|
- <a>{{ getPerformanceStatusName(record.performancestatus) }}</a>
|
|
|
|
|
- </template>
|
|
|
|
|
-
|
|
|
|
|
- <!-- 当前步骤 -->
|
|
|
|
|
- <template #curstepname="{ record }">
|
|
|
|
|
- <a>{{ record.curstepname }}</a>
|
|
|
|
|
- </template>
|
|
|
|
|
- </a-table>
|
|
|
|
|
|
|
+ <!-- 履约信息-买履约 -->
|
|
|
|
|
+ <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="handleBtn(buttons, record)" :record="record" class="btn-list-sticky" @click="openComponent" />
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <!-- 履约类型 -->
|
|
|
|
|
+ <template #performancetype="{ record }">
|
|
|
|
|
+ <a>{{ getPerformanceTypeName(record.performancetype, record.haswr) }}</a>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <!-- 付款方式 -->
|
|
|
|
|
+ <template #paymenttype="{ record }">
|
|
|
|
|
+ <a>{{ getPaymentTypeName(record.paymenttype) }}</a>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <!-- 履约状态 -->
|
|
|
|
|
+ <template #performancestatus="{ record }">
|
|
|
|
|
+ <a>{{ getPerformanceStatusName(record.performancestatus) }}</a>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <!-- 当前步骤 -->
|
|
|
|
|
+ <template #curstepname="{ record }">
|
|
|
|
|
+ <a>{{ record.curstepname }}</a>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </a-table>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </mtp-table-scroll>
|
|
|
<component :is="componentId" v-if="componentId" :selectedRow="selectedRow" :buyOrSell="BuyOrSell.buy" @cancel="closeComponent"></component>
|
|
<component :is="componentId" v-if="componentId" :selectedRow="selectedRow" :buyOrSell="BuyOrSell.buy" @cancel="closeComponent"></component>
|
|
|
- </section>
|
|
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
<script lang="ts">
|
|
|
-import { enumOrderComponents } from '@/common/constants/enumOrderComponents';
|
|
|
|
|
|
|
+import { PropType } from 'vue';
|
|
|
|
|
+import { DynamicComponent } from '@/@next/hooks/common/interface';
|
|
|
|
|
+import MtpTableScroll from '@/common/components/tableScroll/index.vue';
|
|
|
import { queryTableList, BtnList, defineAsyncComponent, defineComponent, ModalEnum } from '@/common/export/commonTable';
|
|
import { queryTableList, BtnList, defineAsyncComponent, defineComponent, ModalEnum } from '@/common/export/commonTable';
|
|
|
-import { QueryPerformancePlan, queryWrTradeDetail } from '@/services/go/wrtrade';
|
|
|
|
|
|
|
+import { QueryPerformancePlan } from '@/services/go/wrtrade';
|
|
|
import { QueryPerformancePlanReq, WrPerformancePlan } from '@/services/go/wrtrade/interface';
|
|
import { QueryPerformancePlanReq, WrPerformancePlan } from '@/services/go/wrtrade/interface';
|
|
|
-import { getRecordItemTab } from '@/common/setup/order/orderData';
|
|
|
|
|
import { handleComposeOrderTable } from '@/common/setup/table/compose';
|
|
import { handleComposeOrderTable } from '@/common/setup/table/compose';
|
|
|
import { ComposeOrderTableParam } from '@/common/setup/table/interface';
|
|
import { ComposeOrderTableParam } from '@/common/setup/table/interface';
|
|
|
import { expandIcon } from '@/common/setup/table/clolumn';
|
|
import { expandIcon } from '@/common/setup/table/clolumn';
|
|
|
import { BtnListType } from '@/common/components/btnList/interface';
|
|
import { BtnListType } from '@/common/components/btnList/interface';
|
|
|
import { BuyOrSell } from '@/common/constants/enumCommon';
|
|
import { BuyOrSell } from '@/common/constants/enumCommon';
|
|
|
import { getPaymentTypeName, getPerformanceStatusName, getPerformanceTypeName } from '@/common/constants/enumsName';
|
|
import { getPaymentTypeName, getPerformanceStatusName, getPerformanceTypeName } from '@/common/constants/enumsName';
|
|
|
|
|
+
|
|
|
export default defineComponent({
|
|
export default defineComponent({
|
|
|
- name: enumOrderComponents.performance_information_buy_performance,
|
|
|
|
|
- components: {
|
|
|
|
|
- BtnList,
|
|
|
|
|
- [ModalEnum.performance_information_buy_performance_pay]: defineAsyncComponent(() => import('../components/pay/index.vue')),
|
|
|
|
|
- [ModalEnum.performance_information_buy_performance_extension]: defineAsyncComponent(() => import('../components/extension/index.vue')),
|
|
|
|
|
- [ModalEnum.performance_information_buy_performance_breach_contract]: defineAsyncComponent(() => import('../components/breach_contract/index.vue')),
|
|
|
|
|
- [ModalEnum.performance_information_buy_performance_detail]: defineAsyncComponent(() => import('../components/detail/index.vue')),
|
|
|
|
|
- [ModalEnum.performance_information_buy_performance_settlement]: defineAsyncComponent(() => import('../components/settlement/index.vue')),
|
|
|
|
|
- },
|
|
|
|
|
- setup() {
|
|
|
|
|
- // 表格列表数据
|
|
|
|
|
- const { loading, tableList, queryTable } = queryTableList<WrPerformancePlan>();
|
|
|
|
|
- // 获取列表数据
|
|
|
|
|
- const queryTableAction = () => {
|
|
|
|
|
- const param: QueryPerformancePlanReq = {
|
|
|
|
|
- buyorsell: 0,
|
|
|
|
|
- };
|
|
|
|
|
- queryTable(QueryPerformancePlan, param);
|
|
|
|
|
- };
|
|
|
|
|
- // 表格通用逻辑
|
|
|
|
|
- const param: ComposeOrderTableParam = {
|
|
|
|
|
- queryFn: queryTableAction,
|
|
|
|
|
- tableName: 'table_pcweb_spot_trade_bottom_performance_info_buy',
|
|
|
|
|
- recordList: getRecordItemTab(),
|
|
|
|
|
- };
|
|
|
|
|
- function handleBtn(btnList: BtnListType[], record: WrPerformancePlan): BtnListType[] {
|
|
|
|
|
- // performancestatus: number;//履约状态 - 1:初始化 2:正常 3:处理错误 4:违约待处理 5:违约处理中 6:完成 7.违约已完成 8:释放冻结失败 9:超时待处理 1number;
|
|
|
|
|
- const { curstepname, performancestatus } = record;
|
|
|
|
|
- let result: ModalEnum[] = [];
|
|
|
|
|
- if (performancestatus === 1) {
|
|
|
|
|
- result = [ModalEnum.performance_information_buy_performance_breach_contract, ModalEnum.performance_information_buy_performance_settlement];
|
|
|
|
|
- } else if (performancestatus === 2) {
|
|
|
|
|
- if (curstepname === '买方支付') {
|
|
|
|
|
- result = [ModalEnum.performance_information_buy_performance_pay, ModalEnum.performance_information_buy_performance_extension, ModalEnum.performance_information_buy_performance_breach_contract, ModalEnum.performance_information_buy_performance_detail];
|
|
|
|
|
- } else if (curstepname === '货款溢短') {
|
|
|
|
|
- result = [ModalEnum.performance_information_buy_performance_extension, ModalEnum.performance_information_buy_performance_breach_contract, ModalEnum.performance_information_buy_performance_detail];
|
|
|
|
|
- } else if (curstepname === '卖方发票') {
|
|
|
|
|
- result = [ModalEnum.performance_information_buy_performance_extension, ModalEnum.performance_information_buy_performance_breach_contract, ModalEnum.performance_information_buy_performance_detail];
|
|
|
|
|
|
|
+ props: {
|
|
|
|
|
+ parentComponent: {
|
|
|
|
|
+ type: Object as PropType<DynamicComponent>,
|
|
|
|
|
+ required: true,
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
|
|
+ components: {
|
|
|
|
|
+ MtpTableScroll,
|
|
|
|
|
+ BtnList,
|
|
|
|
|
+ pay: defineAsyncComponent(() => import('../components/pay/index.vue')), // 付款
|
|
|
|
|
+ extension: defineAsyncComponent(() => import('../components/extension/index.vue')), // 延期
|
|
|
|
|
+ breach: defineAsyncComponent(() => import('../components/breach_contract/index.vue')), // 违约
|
|
|
|
|
+ detail: defineAsyncComponent(() => import('../components/detail/index.vue')), // 详情
|
|
|
|
|
+ settlement: defineAsyncComponent(() => import('../components/settlement/index.vue')), // 交收
|
|
|
|
|
+ },
|
|
|
|
|
+ setup(props) {
|
|
|
|
|
+ const { buttons } = props.parentComponent;
|
|
|
|
|
+ // 表格列表数据
|
|
|
|
|
+ const { loading, tableList, queryTable } = queryTableList<WrPerformancePlan>();
|
|
|
|
|
+
|
|
|
|
|
+ // 获取列表数据
|
|
|
|
|
+ const queryTableAction = () => {
|
|
|
|
|
+ const param: QueryPerformancePlanReq = {
|
|
|
|
|
+ buyorsell: 0,
|
|
|
|
|
+ };
|
|
|
|
|
+ queryTable(QueryPerformancePlan, param);
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ // 表格通用逻辑
|
|
|
|
|
+ const param: ComposeOrderTableParam = {
|
|
|
|
|
+ queryFn: queryTableAction,
|
|
|
|
|
+ tableName: 'table_pcweb_spot_trade_bottom_performance_info_buy',
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ function handleBtn(btnList: BtnListType[], record: WrPerformancePlan): BtnListType[] {
|
|
|
|
|
+ // performancestatus: number;//履约状态 - 1:初始化 2:正常 3:处理错误 4:违约待处理 5:违约处理中 6:完成 7.违约已完成 8:释放冻结失败 9:超时待处理 1number;
|
|
|
|
|
+ const { curstepname, performancestatus } = record;
|
|
|
|
|
+ let result: string[] = [];
|
|
|
|
|
+ if (performancestatus === 1) {
|
|
|
|
|
+ result = ['breach', 'settlement'];
|
|
|
|
|
+ } else if (performancestatus === 2) {
|
|
|
|
|
+ switch (curstepname) {
|
|
|
|
|
+ case '买方支付': {
|
|
|
|
|
+ result = ['pay', 'extension', 'breach', 'detail'];
|
|
|
|
|
+ }
|
|
|
|
|
+ case '货款溢短':
|
|
|
|
|
+ case '卖方发票': {
|
|
|
|
|
+ result = ['extension', 'breach', 'detail'];
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ return btnList.filter((e) => result.includes(e.code));
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
- return btnList.filter((e) => result.includes(e.code as ModalEnum));
|
|
|
|
|
- }
|
|
|
|
|
- return {
|
|
|
|
|
- ...handleComposeOrderTable<WrPerformancePlan>(param),
|
|
|
|
|
- loading,
|
|
|
|
|
- tableList,
|
|
|
|
|
- getPerformanceTypeName,
|
|
|
|
|
- getPerformanceStatusName,
|
|
|
|
|
- getPaymentTypeName,
|
|
|
|
|
- expandIcon,
|
|
|
|
|
- handleBtn,
|
|
|
|
|
- BuyOrSell,
|
|
|
|
|
- };
|
|
|
|
|
- },
|
|
|
|
|
|
|
+
|
|
|
|
|
+ return {
|
|
|
|
|
+ ...handleComposeOrderTable<WrPerformancePlan>(param),
|
|
|
|
|
+ loading,
|
|
|
|
|
+ tableList,
|
|
|
|
|
+ buttons,
|
|
|
|
|
+ getPerformanceTypeName,
|
|
|
|
|
+ getPerformanceStatusName,
|
|
|
|
|
+ getPaymentTypeName,
|
|
|
|
|
+ expandIcon,
|
|
|
|
|
+ handleBtn,
|
|
|
|
|
+ BuyOrSell,
|
|
|
|
|
+ };
|
|
|
|
|
+ },
|
|
|
});
|
|
});
|
|
|
</script>
|
|
</script>
|