|
|
@@ -1,7 +1,8 @@
|
|
|
<template>
|
|
|
<!-- 现货合同: 已完成-->
|
|
|
<div class="spot-contract-done">
|
|
|
- <filterCustomTable @search="search">
|
|
|
+ <filterCustomTable @search="search"
|
|
|
+ :loading="loading">
|
|
|
<a-button class="operBtn"
|
|
|
v-if="hasPermission('spot_contract_btn_add')"
|
|
|
@click="addAction">新增</a-button>
|
|
|
@@ -22,17 +23,12 @@
|
|
|
<AddSpotContract />
|
|
|
<!-- 现货合同: 详情 -->
|
|
|
<SpotContractDeatil />
|
|
|
- <!-- 现货合同: 修改 -->
|
|
|
- <ModifySpotContract />
|
|
|
- <!-- 现货合同: 删除 -->
|
|
|
- <DeleteSpotContract />
|
|
|
- <!-- 现货合同: 重新提交 -->
|
|
|
- <ResubmitSpotContract />
|
|
|
+
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts">
|
|
|
-import { defineComponent, onUnmounted, ref, watchEffect } from 'vue';
|
|
|
+import { defineComponent, ref } from 'vue';
|
|
|
import { initData } from '@/common/methods';
|
|
|
import filterCustomTable from '@/views/information/spot-contract/components/filterTable/index.vue';
|
|
|
import { getCustomList } from '../setup';
|
|
|
@@ -40,11 +36,8 @@ import { openModal } from '@/common/setup/modal/index';
|
|
|
import contextMenu from '@/common/components/contextMenu/index.vue';
|
|
|
import { MenuItem } from '@/common/components/contextMenu/interface';
|
|
|
import AddSpotContract from '@/views/information/spot-contract/components/add/index.vue';
|
|
|
-import { detailButton, permissionButton, handlePermission } from '@/common/setup/buttonPermission/index';
|
|
|
+import { detailButton, handlePermission } from '@/common/setup/buttonPermission/index';
|
|
|
import SpotContractDeatil from '@/views/information/spot-contract/components/detail/index.vue';
|
|
|
-import ModifySpotContract from '@/views/information/spot-contract/components/modify/index.vue';
|
|
|
-import DeleteSpotContract from '@/views/information/spot-contract/components/delete/index.vue';
|
|
|
-import ResubmitSpotContract from '@/views/information/spot-contract/components/resubmit/index.vue';
|
|
|
|
|
|
export default defineComponent({
|
|
|
name: 'spot-contract-done',
|
|
|
@@ -53,30 +46,17 @@ export default defineComponent({
|
|
|
contextMenu,
|
|
|
AddSpotContract,
|
|
|
SpotContractDeatil,
|
|
|
- ModifySpotContract,
|
|
|
- DeleteSpotContract,
|
|
|
- ResubmitSpotContract,
|
|
|
},
|
|
|
setup() {
|
|
|
const contextMenuList = ref<MenuItem[]>([]);
|
|
|
const { spotContractList, actionQuery, columns, getColumns, search, loading } = getCustomList();
|
|
|
- const { hasPermission } = handlePermission('spot_contract_unsubmitted');
|
|
|
+ const { hasPermission } = handlePermission('spot_contract_finished');
|
|
|
const { openAction: addAction } = openModal('addSpotContract');
|
|
|
|
|
|
detailButton('spotContractDetail', contextMenuList);
|
|
|
- const { action: modifyAction } = permissionButton('modifySpotContract', '修改', contextMenuList);
|
|
|
- const { action: deleteAction } = permissionButton('deleteSpotContract', '删除', contextMenuList);
|
|
|
- const { action: resubmitAction } = permissionButton('resubmitSpotContract', '重新提交', contextMenuList);
|
|
|
- const stop = watchEffect(() => {
|
|
|
- hasPermission('spot_contract_btn_modify') && modifyAction();
|
|
|
- hasPermission('spot_contract_btn_delete') && deleteAction();
|
|
|
- hasPermission('spot_contract_btn_resubmit') && resubmitAction();
|
|
|
- });
|
|
|
- onUnmounted(() => {
|
|
|
- stop();
|
|
|
- });
|
|
|
+
|
|
|
initData(() => {
|
|
|
- actionQuery(2);
|
|
|
+ actionQuery(4);
|
|
|
getColumns();
|
|
|
});
|
|
|
return { spotContractList, columns, search, contextMenuList, addAction, loading, hasPermission };
|