|
|
@@ -31,53 +31,53 @@ import { getTableButton } from '@/common/setup/table/button';
|
|
|
import { useRoute } from 'vue-router';
|
|
|
|
|
|
export default defineComponent({
|
|
|
- name: EnumRouterName.plan_audit,
|
|
|
- components: {
|
|
|
- contextMenu,
|
|
|
- MtpTableButton,
|
|
|
- Filter,
|
|
|
- detail: defineAsyncComponent(() => import('../../components/detail/index.vue')),
|
|
|
- cancel: defineAsyncComponent(() => import('../../components/cancel/index.vue')),
|
|
|
- check: defineAsyncComponent(() => import('../../components/audit/index.vue')),
|
|
|
- },
|
|
|
- setup() {
|
|
|
- const { name: routeName } = useRoute();
|
|
|
- // 权限按钮
|
|
|
- const buttons = getTableButton();
|
|
|
+ name: EnumRouterName.plan_audit,
|
|
|
+ components: {
|
|
|
+ contextMenu,
|
|
|
+ MtpTableButton,
|
|
|
+ Filter,
|
|
|
+ detail: defineAsyncComponent(() => import('../../components/detail/index.vue')),
|
|
|
+ cancel: defineAsyncComponent(() => import('../../components/cancel/index.vue')),
|
|
|
+ check: defineAsyncComponent(() => import('../../components/audit/index.vue')),
|
|
|
+ },
|
|
|
+ setup() {
|
|
|
+ const { name: routeName } = useRoute();
|
|
|
+ // 权限按钮
|
|
|
+ const buttons = getTableButton();
|
|
|
|
|
|
- // 表格列表数据
|
|
|
- const { loading, tableList, queryTable } = queryTableList<Ermcp3HedgePlan>();
|
|
|
+ // 表格列表数据
|
|
|
+ const { loading, tableList, queryTable } = queryTableList<Ermcp3HedgePlan>();
|
|
|
|
|
|
- // 获取列表数据
|
|
|
- const queryTableAction = () => {
|
|
|
- switch (routeName) {
|
|
|
- case 'plan_checkpending':
|
|
|
- queryTable(QueryHedgePlan, '1');
|
|
|
- break;
|
|
|
- case 'plan_performance':
|
|
|
- queryTable(QueryHedgePlan, '2,4');
|
|
|
- break;
|
|
|
- }
|
|
|
- };
|
|
|
+ // 获取列表数据
|
|
|
+ const queryTableAction = () => {
|
|
|
+ switch (routeName) {
|
|
|
+ case 'plan_checkpending':
|
|
|
+ queryTable(QueryHedgePlan, '1');
|
|
|
+ break;
|
|
|
+ case 'plan_performance':
|
|
|
+ queryTable(QueryHedgePlan, '2,4');
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ };
|
|
|
|
|
|
- // 表格通用逻辑
|
|
|
- const param: ComposeTableParam = {
|
|
|
- queryFn: queryTableAction,
|
|
|
- menuType: EnumRouterName.plan_audit,
|
|
|
- tableName: 'table_pcweb_hedging_plan',
|
|
|
- tableFilterKey: ['contracttype', 'hedgeplanno', 'deliverygoodsname'],
|
|
|
- isDetail: true,
|
|
|
- };
|
|
|
+ // 表格通用逻辑
|
|
|
+ const param: ComposeTableParam = {
|
|
|
+ queryFn: queryTableAction,
|
|
|
+ menuType: EnumRouterName.plan_audit,
|
|
|
+ tableName: 'table_pcweb_hedging_plan',
|
|
|
+ tableFilterKey: ['contracttype', 'hedgeplanstatus', 'hedgeplanno', 'deliverygoodsname'],
|
|
|
+ isDetail: true,
|
|
|
+ };
|
|
|
|
|
|
- return {
|
|
|
- ...handleComposeTable<Ermcp3HedgePlan>(param),
|
|
|
- loading,
|
|
|
- tableList,
|
|
|
- getPlanStatusName,
|
|
|
- getPlanContractType,
|
|
|
- queryTable,
|
|
|
- buttons,
|
|
|
- };
|
|
|
- },
|
|
|
+ return {
|
|
|
+ ...handleComposeTable<Ermcp3HedgePlan>(param),
|
|
|
+ loading,
|
|
|
+ tableList,
|
|
|
+ getPlanStatusName,
|
|
|
+ getPlanContractType,
|
|
|
+ queryTable,
|
|
|
+ buttons,
|
|
|
+ };
|
|
|
+ },
|
|
|
});
|
|
|
</script>
|