|
@@ -15,20 +15,20 @@
|
|
|
<!-- 额外的展开行 -->
|
|
<!-- 额外的展开行 -->
|
|
|
<template v-if="btnList.length"
|
|
<template v-if="btnList.length"
|
|
|
#expandedRowRender="{ record }">
|
|
#expandedRowRender="{ record }">
|
|
|
- <BtnList :btnList="btnList"
|
|
|
|
|
|
|
+ <BtnList :btnList="handleBtnList(btnList, record)"
|
|
|
:record="record"
|
|
:record="record"
|
|
|
class="btn-list-sticky"
|
|
class="btn-list-sticky"
|
|
|
@click="openComponent" />
|
|
@click="openComponent" />
|
|
|
</template>
|
|
</template>
|
|
|
- <!-- 类型 -->
|
|
|
|
|
- <template #financetype="{ text }">
|
|
|
|
|
- <a>{{ getFinanceTypeName(record.financetype) }}</a>
|
|
|
|
|
- </template>
|
|
|
|
|
|
|
+ <!-- 类型 -->
|
|
|
|
|
+ <template #financetype="{ record }">
|
|
|
|
|
+ <a>{{ getFinanceTypeName(record.financetype) }}</a>
|
|
|
|
|
+ </template>
|
|
|
|
|
|
|
|
- <!-- 状态 -->
|
|
|
|
|
- <template #scfcontractstatus="{ text }">
|
|
|
|
|
- <a>{{ getContractName(text) }}</a>
|
|
|
|
|
- </template>
|
|
|
|
|
|
|
+ <!-- 状态 -->
|
|
|
|
|
+ <template #scfcontractstatus="{ text }">
|
|
|
|
|
+ <a>{{ getContractName(text) }}</a>
|
|
|
|
|
+ </template>
|
|
|
<template #createtime="{ record }">
|
|
<template #createtime="{ record }">
|
|
|
<a>{{ formatTime(record.createtime) }}</a>
|
|
<a>{{ formatTime(record.createtime) }}</a>
|
|
|
</template>
|
|
</template>
|
|
@@ -50,7 +50,8 @@ import { handleComposeOrderTable } from '@/common/setup/table/compose';
|
|
|
import { ComposeOrderTableParam } from '@/common/setup/table/interface';
|
|
import { ComposeOrderTableParam } from '@/common/setup/table/interface';
|
|
|
import { formatTime } from '@/common/methods';
|
|
import { formatTime } from '@/common/methods';
|
|
|
import { expandIcon } from '@/common/setup/table/clolumn';
|
|
import { expandIcon } from '@/common/setup/table/clolumn';
|
|
|
-import {getContractName, getFinanceTypeName} from "@/common/constants/enumsName";
|
|
|
|
|
|
|
+import { getContractName, getFinanceTypeName } from '@/common/constants/enumsName';
|
|
|
|
|
+import { BtnList as BtnListType } from '@/common/components/btnList/interface';
|
|
|
|
|
|
|
|
export default defineComponent({
|
|
export default defineComponent({
|
|
|
name: enumOrderComponents.financing_manager_contract,
|
|
name: enumOrderComponents.financing_manager_contract,
|
|
@@ -72,6 +73,18 @@ export default defineComponent({
|
|
|
tableName: 'table_pcweb_financing_manage_bottom_contract',
|
|
tableName: 'table_pcweb_financing_manage_bottom_contract',
|
|
|
recordList: getRecordItemTab(),
|
|
recordList: getRecordItemTab(),
|
|
|
};
|
|
};
|
|
|
|
|
+ function handleBtnList(btnList: BtnListType[], item: WrScfContract) {
|
|
|
|
|
+ const { remainwrpositionqty, interestdebt } = item;
|
|
|
|
|
+ let result: BtnListType[] = btnList;
|
|
|
|
|
+ if (interestdebt === 0) {
|
|
|
|
|
+ // 费用欠款”不为0时出现“支付欠款”按钮
|
|
|
|
|
+ result = btnList.filter((e) => e.code !== ModalEnum.financing_manager_contract_pay_arrears);
|
|
|
|
|
+ } else if (remainwrpositionqty === 0) {
|
|
|
|
|
+ // “剩余数量”不为0时出现“回购仓单”按钮
|
|
|
|
|
+ result = btnList.filter((e) => e.code !== ModalEnum.financing_manager_contract_repurchase_warrant);
|
|
|
|
|
+ }
|
|
|
|
|
+ return result;
|
|
|
|
|
+ }
|
|
|
return {
|
|
return {
|
|
|
...handleComposeOrderTable<WrScfContract>(param),
|
|
...handleComposeOrderTable<WrScfContract>(param),
|
|
|
loading,
|
|
loading,
|
|
@@ -80,6 +93,7 @@ export default defineComponent({
|
|
|
expandIcon,
|
|
expandIcon,
|
|
|
getContractName,
|
|
getContractName,
|
|
|
getFinanceTypeName,
|
|
getFinanceTypeName,
|
|
|
|
|
+ handleBtnList,
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
});
|
|
});
|