Bläddra i källkod

新增现货合同页面

huangbin 4 år sedan
förälder
incheckning
7c1200f5ad

+ 35 - 0
src/router/index.ts

@@ -117,6 +117,41 @@ const routes: Array<RouteRecordRaw> = [
                 meta: {
                     requireAuth: true
                 },
+                redirect: to => { return { name: 'spot_contract-not-commit' } },
+                children: [
+                    {
+                        path: '/spot_contract/not-commit',
+                        name: 'spot_contract-not-commit',
+                        component: () => import('@/views/information/spot-contract/list/not-commit/index.vue'),
+                        meta: {
+                            requireAuth: true
+                        },
+                    },
+                    {
+                        path: '/spot_contract/done',
+                        name: 'spot_contract-done',
+                        component: () => import('@/views/information/spot-contract/list/done/index.vue'),
+                        meta: {
+                            requireAuth: true
+                        },
+                    },
+                    {
+                        path: '/spot_contract/peddding',
+                        name: 'spot_contract-peddding',
+                        component: () => import('@/views/information/spot-contract/list/peddding/index.vue'),
+                        meta: {
+                            requireAuth: true
+                        },
+                    },
+                    {
+                        path: '/spot_contract/performance',
+                        name: 'spot_contract-performance',
+                        component: () => import('@/views/information/spot-contract/list/performance/index.vue'),
+                        meta: {
+                            requireAuth: true
+                        },
+                    },
+                ]
             },
             {
                 path: '/warehouse_info',

+ 26 - 3
src/views/information/spot-contract/index.vue

@@ -1,18 +1,41 @@
 <template>
   <!-- 现货合同 -->
   <div class="spot-contract">
-    "现货合同"
+    <firstMenu :list="list"
+               :value="'value'"
+               @selectMenu="selectMenu" />
+    <router-view />
   </div>
 </template>
 
 <script lang="ts">
 import { defineComponent } from 'vue';
+import firstMenu from '@/components/firstMenu/index.vue';
+import { useRouter } from 'vue-router';
+
+// 处理菜单
+function handleMenu() {
+    const router = useRouter();
+    const list = [
+        { key: 'spot_contract-not-commit', value: '未提交' },
+        { key: 'spot_contract-peddding', value: '待审核' },
+        { key: 'spot_contract-performance', value: '履约中' },
+        { key: 'spot_contract-done', value: '已完成' },
+    ];
+    function selectMenu(item: any) {
+        router.push({ name: item.key });
+    }
+    return { list, selectMenu };
+}
 
 export default defineComponent({
     name: 'spot-contract',
-    components: {},
+    components: {
+        firstMenu,
+    },
     setup() {
-        return {};
+        const { list, selectMenu } = handleMenu();
+        return { list, selectMenu };
     },
 });
 </script>

+ 83 - 0
src/views/information/spot-contract/list/done/index.vue

@@ -0,0 +1,83 @@
+<template>
+  <!-- 现货合同: 已完成-->
+  <div class="spot-contract-done">
+    客户信息: 已完成
+  </div>
+</template>
+
+<script lang="ts">
+import { defineComponent, ref } from 'vue';
+import { QueryCustomInfo } from '@/goServiceAPI/ermcp/customInfo/index';
+import { QueryCustomInfoType } from '@/goServiceAPI/ermcp/customInfo/interface';
+import { message } from 'ant-design-vue';
+import { initData } from '@/setup/methods/index';
+
+// 查询客户资料列表
+function getCustomList() {
+    // const filteredInfo = ref();
+    // const sortedInfo = ref();
+    // const columns = computed(() => {
+    //     const filtered = filteredInfo.value || {};
+    //     const sorted = sortedInfo.value || {};
+    //     return [
+    //         {
+    //             title: '序号',
+    //             dataIndex: 'index',
+    //             key: 'index',
+    //             align: 'center',
+    //             width: 50,
+    //             customRender: (param: any) => `${param.index + 1}`,
+    //         },
+    //         {
+    //             title: 'Age',
+    //             dataIndex: 'age',
+    //             key: 'age',
+    //             sorter: (a: DataItem, b: DataItem) => a.age - b.age,
+    //             sortOrder: sorted.columnKey === 'age' && sorted.order,
+    //         },
+    //         {
+    //             title: 'Address',
+    //             dataIndex: 'address',
+    //             key: 'address',
+    //             filters: [
+    //                 { text: 'London', value: 'London' },
+    //                 { text: 'New York', value: 'New York' },
+    //             ],
+    //             filteredValue: filtered.address || null,
+    //             onFilter: (value: string, record: DataItem) => record.address.includes(value),
+    //             sorter: (a: DataItem, b: DataItem) => a.address.length - b.address.length,
+    //             sortOrder: sorted.columnKey === 'address' && sorted.order,
+    //             ellipsis: true,
+    //         },
+    //     ];
+    // });
+    const customList = ref<QueryCustomInfoType[]>([]);
+    function actionQuery() {
+        QueryCustomInfo(4)
+            .then((res) => {
+                console.log('L', res);
+            })
+            .catch((err) => message.error(err));
+    }
+
+    return { customList, actionQuery };
+}
+
+export default defineComponent({
+    name: 'spot-contract-done',
+    components: {},
+    setup() {
+        const { customList, actionQuery } = getCustomList();
+        initData(() => {
+            actionQuery();
+            // 加载数据在这里
+        });
+        return { customList };
+    },
+});
+</script>
+
+<style lang="less">
+.spot-contract-done {
+}
+</style>;

+ 83 - 0
src/views/information/spot-contract/list/not-commit/index.vue

@@ -0,0 +1,83 @@
+<template>
+  <!-- 现货合同: 未提交-->
+  <div class="spot-contract-not-commit">
+    现货合同: 未提交
+  </div>
+</template>
+
+<script lang="ts">
+import { defineComponent, ref } from 'vue';
+import { QueryCustomInfo } from '@/goServiceAPI/ermcp/customInfo/index';
+import { QueryCustomInfoType } from '@/goServiceAPI/ermcp/customInfo/interface';
+import { message } from 'ant-design-vue';
+import { initData } from '@/setup/methods/index';
+
+// 查询客户资料列表
+function getCustomList() {
+    // const filteredInfo = ref();
+    // const sortedInfo = ref();
+    // const columns = computed(() => {
+    //     const filtered = filteredInfo.value || {};
+    //     const sorted = sortedInfo.value || {};
+    //     return [
+    //         {
+    //             title: '序号',
+    //             dataIndex: 'index',
+    //             key: 'index',
+    //             align: 'center',
+    //             width: 50,
+    //             customRender: (param: any) => `${param.index + 1}`,
+    //         },
+    //         {
+    //             title: 'Age',
+    //             dataIndex: 'age',
+    //             key: 'age',
+    //             sorter: (a: DataItem, b: DataItem) => a.age - b.age,
+    //             sortOrder: sorted.columnKey === 'age' && sorted.order,
+    //         },
+    //         {
+    //             title: 'Address',
+    //             dataIndex: 'address',
+    //             key: 'address',
+    //             filters: [
+    //                 { text: 'London', value: 'London' },
+    //                 { text: 'New York', value: 'New York' },
+    //             ],
+    //             filteredValue: filtered.address || null,
+    //             onFilter: (value: string, record: DataItem) => record.address.includes(value),
+    //             sorter: (a: DataItem, b: DataItem) => a.address.length - b.address.length,
+    //             sortOrder: sorted.columnKey === 'address' && sorted.order,
+    //             ellipsis: true,
+    //         },
+    //     ];
+    // });
+    const customList = ref<QueryCustomInfoType[]>([]);
+    function actionQuery() {
+        QueryCustomInfo(4)
+            .then((res) => {
+                console.log('L', res);
+            })
+            .catch((err) => message.error(err));
+    }
+
+    return { customList, actionQuery };
+}
+
+export default defineComponent({
+    name: 'spot-contract-not-commit',
+    components: {},
+    setup() {
+        const { customList, actionQuery } = getCustomList();
+        initData(() => {
+            actionQuery();
+            // 加载数据在这里
+        });
+        return { customList };
+    },
+});
+</script>
+
+<style lang="less">
+.spot-contract-not-commit {
+}
+</style>;

+ 83 - 0
src/views/information/spot-contract/list/peddding/index.vue

@@ -0,0 +1,83 @@
+<template>
+  <!-- 现货合同: 待审核-->
+  <div class="spot-contract-peddding">
+    现货合同: 待审核
+  </div>
+</template>
+
+<script lang="ts">
+import { defineComponent, ref } from 'vue';
+import { QueryCustomInfo } from '@/goServiceAPI/ermcp/customInfo/index';
+import { QueryCustomInfoType } from '@/goServiceAPI/ermcp/customInfo/interface';
+import { message } from 'ant-design-vue';
+import { initData } from '@/setup/methods/index';
+
+// 查询客户资料列表
+function getCustomList() {
+    // const filteredInfo = ref();
+    // const sortedInfo = ref();
+    // const columns = computed(() => {
+    //     const filtered = filteredInfo.value || {};
+    //     const sorted = sortedInfo.value || {};
+    //     return [
+    //         {
+    //             title: '序号',
+    //             dataIndex: 'index',
+    //             key: 'index',
+    //             align: 'center',
+    //             width: 50,
+    //             customRender: (param: any) => `${param.index + 1}`,
+    //         },
+    //         {
+    //             title: 'Age',
+    //             dataIndex: 'age',
+    //             key: 'age',
+    //             sorter: (a: DataItem, b: DataItem) => a.age - b.age,
+    //             sortOrder: sorted.columnKey === 'age' && sorted.order,
+    //         },
+    //         {
+    //             title: 'Address',
+    //             dataIndex: 'address',
+    //             key: 'address',
+    //             filters: [
+    //                 { text: 'London', value: 'London' },
+    //                 { text: 'New York', value: 'New York' },
+    //             ],
+    //             filteredValue: filtered.address || null,
+    //             onFilter: (value: string, record: DataItem) => record.address.includes(value),
+    //             sorter: (a: DataItem, b: DataItem) => a.address.length - b.address.length,
+    //             sortOrder: sorted.columnKey === 'address' && sorted.order,
+    //             ellipsis: true,
+    //         },
+    //     ];
+    // });
+    const customList = ref<QueryCustomInfoType[]>([]);
+    function actionQuery() {
+        QueryCustomInfo(4)
+            .then((res) => {
+                console.log('L', res);
+            })
+            .catch((err) => message.error(err));
+    }
+
+    return { customList, actionQuery };
+}
+
+export default defineComponent({
+    name: 'spot-contract-peddding',
+    components: {},
+    setup() {
+        const { customList, actionQuery } = getCustomList();
+        initData(() => {
+            actionQuery();
+            // 加载数据在这里
+        });
+        return { customList };
+    },
+});
+</script>
+
+<style lang="less">
+.spot-contract-peddding {
+}
+</style>;

+ 83 - 0
src/views/information/spot-contract/list/performance/index.vue

@@ -0,0 +1,83 @@
+<template>
+  <!-- 现货合同: 履约中-->
+  <div class="spot-contract-performance">
+    客户信息: 履约中
+  </div>
+</template>
+
+<script lang="ts">
+import { defineComponent, ref } from 'vue';
+import { QueryCustomInfo } from '@/goServiceAPI/ermcp/customInfo/index';
+import { QueryCustomInfoType } from '@/goServiceAPI/ermcp/customInfo/interface';
+import { message } from 'ant-design-vue';
+import { initData } from '@/setup/methods/index';
+
+// 查询客户资料列表
+function getCustomList() {
+    // const filteredInfo = ref();
+    // const sortedInfo = ref();
+    // const columns = computed(() => {
+    //     const filtered = filteredInfo.value || {};
+    //     const sorted = sortedInfo.value || {};
+    //     return [
+    //         {
+    //             title: '序号',
+    //             dataIndex: 'index',
+    //             key: 'index',
+    //             align: 'center',
+    //             width: 50,
+    //             customRender: (param: any) => `${param.index + 1}`,
+    //         },
+    //         {
+    //             title: 'Age',
+    //             dataIndex: 'age',
+    //             key: 'age',
+    //             sorter: (a: DataItem, b: DataItem) => a.age - b.age,
+    //             sortOrder: sorted.columnKey === 'age' && sorted.order,
+    //         },
+    //         {
+    //             title: 'Address',
+    //             dataIndex: 'address',
+    //             key: 'address',
+    //             filters: [
+    //                 { text: 'London', value: 'London' },
+    //                 { text: 'New York', value: 'New York' },
+    //             ],
+    //             filteredValue: filtered.address || null,
+    //             onFilter: (value: string, record: DataItem) => record.address.includes(value),
+    //             sorter: (a: DataItem, b: DataItem) => a.address.length - b.address.length,
+    //             sortOrder: sorted.columnKey === 'address' && sorted.order,
+    //             ellipsis: true,
+    //         },
+    //     ];
+    // });
+    const customList = ref<QueryCustomInfoType[]>([]);
+    function actionQuery() {
+        QueryCustomInfo(4)
+            .then((res) => {
+                console.log('L', res);
+            })
+            .catch((err) => message.error(err));
+    }
+
+    return { customList, actionQuery };
+}
+
+export default defineComponent({
+    name: 'spot-contract-performance',
+    components: {},
+    setup() {
+        const { customList, actionQuery } = getCustomList();
+        initData(() => {
+            actionQuery();
+            // 加载数据在这里
+        });
+        return { customList };
+    },
+});
+</script>
+
+<style lang="less">
+.spot-contract-performance {
+}
+</style>;