|
|
@@ -1,47 +1,62 @@
|
|
|
<template>
|
|
|
- <!-- 计划: 未提交-->
|
|
|
- <div class="plan-uncommitted"
|
|
|
- :loading="loading">
|
|
|
- <Filter @search="search">
|
|
|
- <BtnList :btnList="commonBtn" />
|
|
|
- </Filter>
|
|
|
- <contextMenu :contextMenuList="forDataBtn">
|
|
|
- <a-table :columns="columns"
|
|
|
- class="topTable hiddenFirstCol"
|
|
|
- :pagination="false"
|
|
|
- :expandedRowKeys="expandedRowKeys"
|
|
|
- :customRow="Rowclick"
|
|
|
- rowKey="key"
|
|
|
- :data-source="tableList">
|
|
|
- <!-- 额外的展开行 -->
|
|
|
- <template #expandedRowRender="{ }">
|
|
|
- <BtnList :btnList="forDataBtn" />
|
|
|
- </template>
|
|
|
- <!-- <template #warehousetype="{ text }">
|
|
|
- <span>{{ getWareHouseType(text) }}</span>
|
|
|
- </template>
|
|
|
- <template #warehousestatus="{ text }">
|
|
|
- <span>{{ getWareHouseStatus(text) }}</span>
|
|
|
- </template> -->
|
|
|
- </a-table>
|
|
|
- </contextMenu>
|
|
|
- <!-- 详情 -->
|
|
|
- <Detail />
|
|
|
- <!-- 新增 -->
|
|
|
- <Add />
|
|
|
- <!-- 修改 -->
|
|
|
- <Modfiy />
|
|
|
- <!-- 重新提交 -->
|
|
|
- <Recommit />
|
|
|
- <!-- 删除-->
|
|
|
- <Delete />
|
|
|
- </div>
|
|
|
+ <!-- 计划: 未提交-->
|
|
|
+ <div class="plan-uncommitted"
|
|
|
+ :loading="loading">
|
|
|
+ <Filter @search="search">
|
|
|
+ <BtnList :btnList="commonBtn"/>
|
|
|
+ </Filter>
|
|
|
+ <contextMenu :contextMenuList="forDataBtn">
|
|
|
+ <a-table :columns="columns"
|
|
|
+ class="topTable hiddenFirstCol"
|
|
|
+ :pagination="false"
|
|
|
+ :expandedRowKeys="expandedRowKeys"
|
|
|
+ :customRow="Rowclick"
|
|
|
+ rowKey="key"
|
|
|
+ :data-source="tableList">
|
|
|
+ <!-- 额外的展开行 -->
|
|
|
+ <template #expandedRowRender="{ }">
|
|
|
+ <BtnList :btnList="forDataBtn"/>
|
|
|
+ </template>
|
|
|
+ <template #contracttype="{ text }">
|
|
|
+ <a>{{ getPlanContractType(text) }}</a>
|
|
|
+ </template>
|
|
|
+ <template #hedgeplanstatus="{ text }">
|
|
|
+ <a>{{ getPlanStatusName(text) }}</a>
|
|
|
+ </template>
|
|
|
+ <!-- <template #warehousetype="{ text }">
|
|
|
+ <span>{{ getWareHouseType(text) }}</span>
|
|
|
+ </template>
|
|
|
+ <template #warehousestatus="{ text }">
|
|
|
+ <span>{{ getWareHouseStatus(text) }}</span>
|
|
|
+ </template> -->
|
|
|
+ </a-table>
|
|
|
+ </contextMenu>
|
|
|
+ <!-- 详情 -->
|
|
|
+ <Detail :selectedRow="selectedRow" @refresh="queryTable"/>
|
|
|
+ <!-- 新增 -->
|
|
|
+ <Add :selectedRow="selectedRow" @refresh="queryTable"/>
|
|
|
+ <!-- 修改 -->
|
|
|
+ <Modfiy :selectedRow="selectedRow" @refresh="queryTable"/>
|
|
|
+ <!-- 重新提交 -->
|
|
|
+ <Recommit :selectedRow="selectedRow" @refresh="queryTable"/>
|
|
|
+ <!-- 删除-->
|
|
|
+ <Delete :selectedRow="selectedRow" @refresh="queryTable"/>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts">
|
|
|
-import { defineComponent, initData, getTableColumns, getTableEvent, getBtnList, contextMenu, BtnList } from '@/common/export/table';
|
|
|
-import { getFilterTableCB, queryTableList, Ermcp3HedgePlan } from '../index';
|
|
|
-import { Add, Delete, Detail, Filter, Modfiy, Recommit } from '../../components';
|
|
|
+import {
|
|
|
+ defineComponent,
|
|
|
+ initData,
|
|
|
+ getTableColumns,
|
|
|
+ getTableEvent,
|
|
|
+ getBtnList,
|
|
|
+ contextMenu,
|
|
|
+ BtnList
|
|
|
+} from '@/common/export/table';
|
|
|
+import {getFilterTableCB, queryTableList, Ermcp3HedgePlan} from '../index';
|
|
|
+import {Add, Delete, Detail, Filter, Modfiy, Recommit} from '../../components';
|
|
|
+import {getPlanContractType, getPlanStatusName} from "@/views/business/plan/setup";
|
|
|
|
|
|
export default defineComponent({
|
|
|
name: 'plan-uncommitted',
|
|
|
@@ -57,19 +72,21 @@ export default defineComponent({
|
|
|
},
|
|
|
setup() {
|
|
|
// 表头数据
|
|
|
- const { columns, registerColumn, updateColumn, filteredInfo } = getTableColumns();
|
|
|
+ const {columns, registerColumn, updateColumn, filteredInfo} = getTableColumns();
|
|
|
// 表格事件
|
|
|
- const { expandedRowKeys, selectedRow, Rowclick } = getTableEvent<Ermcp3HedgePlan>({});
|
|
|
+ const {expandedRowKeys, selectedRow, Rowclick} = getTableEvent<Ermcp3HedgePlan>({});
|
|
|
// 表格操作按钮列表
|
|
|
- const { commonBtn, forDataBtn } = getBtnList('plan_uncommitted', true);
|
|
|
+ const {commonBtn, forDataBtn} = getBtnList('plan_uncommitted', true);
|
|
|
// 表格列表数据
|
|
|
- const { loading, tableList, queryTable } = queryTableList('0');
|
|
|
+ const {loading, tableList, queryTable} = queryTableList('0');
|
|
|
+
|
|
|
// 查询
|
|
|
function search(value: any) {
|
|
|
filteredInfo.value = value;
|
|
|
// 更新表信息
|
|
|
updateColumn();
|
|
|
}
|
|
|
+
|
|
|
initData(() => {
|
|
|
// 获取列表数据
|
|
|
queryTable();
|
|
|
@@ -87,6 +104,9 @@ export default defineComponent({
|
|
|
loading,
|
|
|
tableList,
|
|
|
search,
|
|
|
+ getPlanStatusName,
|
|
|
+ getPlanContractType,
|
|
|
+ queryTable,
|
|
|
};
|
|
|
},
|
|
|
});
|