li.shaoyi 4 年之前
父节点
当前提交
fab0a99960

+ 1 - 1
src/views/business/plan/components/audit/index.vue

@@ -6,7 +6,7 @@
       <a-button key="submit" type="primary" :loading="loading" @click="pass">审核通过</a-button>
       <a-button key="submit" type="primary" :loading="loading" @click="refuse">审核拒绝</a-button>
     </template>
-    <a-form class="inlineForm" :form="form" @submit="handleSearch">
+    <a-form class="inlineForm" @submit="handleSearch">
       <fieldset class="formFieldSet">
         <legend>套保计划</legend>
         <a-row :gutter="24">

+ 1 - 1
src/views/business/plan/components/cancel/index.vue

@@ -5,7 +5,7 @@
       <a-button key="submit" class="cancelBtn" @click="cancel">取消 </a-button>
       <a-button key="submit" type="primary" :loading="loading" @click="submit">确认撤销 </a-button>
     </template>
-    <a-form class="inlineForm" :form="form" @submit="handleSearch">
+    <a-form class="inlineForm" @submit="handleSearch">
       <fieldset class="formFieldSet">
         <legend>基本信息</legend>
         <a-row :gutter="24">

+ 1 - 1
src/views/business/plan/components/detail/index.vue

@@ -5,7 +5,7 @@
       <a-button key="submit" type="primary" :loading="loading" @click="submit">关闭
       </a-button>
     </template>
-    <a-form class="inlineForm" :form="form" @submit="handleSearch">
+    <a-form class="inlineForm" @submit="handleSearch">
       <fieldset class="formFieldSet">
         <legend>套保计划</legend>
         <a-row :gutter="24">

+ 45 - 22
src/views/business/plan/components/filterTable/index.vue

@@ -10,29 +10,52 @@
 import FilterOption from '@/common/components/filter/index.vue';
 import { defineComponent } from 'vue';
 import { handleFilter, InputList, SelectList } from '@/common/setup/filter';
+import { useRoute } from 'vue-router';
 
 export default defineComponent({
-    name: 'filter-plan-table',
-    components: { FilterOption },
-    setup(props, context) {
-        const select: SelectList[] = [
-            {
-                value: undefined,
-                key: 'contracttype',
-                placeholder: '全部计划类型',
-                list: [
-                    { value: 1, lable: '采购' },
-                    { value: -1, lable: '销售' },
-                ],
-            },
-        ];
-        const input: InputList[] = [
-            { value: '', placeholder: '模糊搜索计划', key: 'hedgeplanno' },
-            { value: '', placeholder: '模糊搜索现货品种', key: 'deliverygoodsname' },
-        ];
-        return {
-            ...handleFilter(select, input, context),
-        };
-    },
+  name: 'filter-plan-table',
+  components: {
+    FilterOption
+  },
+  setup(props, context) {
+    const { name: routeName } = useRoute();
+
+    const select: SelectList[] = [
+      {
+        value: undefined,
+        key: 'contracttype',
+        placeholder: '全部计划类型',
+        list: [
+          { value: 1, lable: '采购' },
+          { value: -1, lable: '销售' },
+        ],
+      },
+    ];
+
+    const input: InputList[] = [
+      { value: '', placeholder: '模糊搜索计划', key: 'hedgeplanno' },
+      { value: '', placeholder: '模糊搜索现货品种', key: 'deliverygoodsname' },
+    ];
+
+    if (routeName === 'plan_performance') {
+      select.push({
+        value: undefined,
+        key: 'hedgeplanstatus',
+        placeholder: '全部状态',
+        list: [
+          { value: 1, lable: '待审核' },
+          { value: 2, lable: '执行中' },
+          { value: 3, lable: '正常完结' },
+          { value: 4, lable: '审核拒绝' },
+          { value: 5, lable: '异常完结' },
+          { value: 6, lable: '已撤回' },
+        ],
+      })
+    }
+
+    return {
+      ...handleFilter(select, input, context),
+    };
+  },
 });
 </script>

+ 44 - 44
src/views/business/plan/list/audit/index.vue

@@ -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>

+ 0 - 1
src/views/business/plan/list/uncommitted/index.vue

@@ -26,7 +26,6 @@
 import { queryTableList, MtpTableButton, contextMenu, defineAsyncComponent, defineComponent, handleComposeTable, ComposeTableParam } from '@/common/export/commonTable';
 import { Filter } from '../../components';
 import { getPlanContractType, getPlanStatusName } from '@/views/business/plan/setup';
-import { BtnListType } from '@/common/components/btnList/interface';
 import { Ermcp3HedgePlan } from '@/services/go/ermcp/plan/interface';
 import { QueryHedgePlan } from '@/services/go/ermcp/plan';
 import { EnumRouterName } from '@/common/constants/enumRouterName';