li.shaoyi 4 vuotta sitten
vanhempi
commit
385a29df94

+ 37 - 0
src/views/business/search/components/filter/index.vue

@@ -0,0 +1,37 @@
+<template>
+    <div class="filterTable">
+        <FilterOption :selectList="selectList" :inputList="inputList" :fixedBtnList="fixedBtnList" />
+        <slot></slot>
+    </div>
+</template>
+
+<script lang="ts">
+import FilterOption from '@/common/components/filter/index.vue';
+import { defineComponent } from 'vue';
+import { handleFilter, InputList, SelectList } from '@/common/setup/filter';
+export default defineComponent({
+    name: 'filter-spot-contract-search',
+    components: { FilterOption },
+    setup(props, context) {
+        const select: SelectList[] = [
+            {
+                value: undefined,
+                key: 'pricetype',
+                placeholder: '全部定价类型',
+                list: [
+                    { value: 1, lable: '固定价' },
+                    { value: 2, lable: '点价' },
+                    { value: 3, lable: '暂定价' },
+                ],
+            },
+        ];
+        const input: InputList[] = [
+            { value: '', placeholder: '模糊搜索合同编号', key: 'contractno' },
+            { value: '', placeholder: '模糊搜索对手方', key: 'negative' },
+        ];
+        return {
+            ...handleFilter(select, input, context),
+        };
+    },
+});
+</script>

+ 76 - 0
src/views/business/search/list/purchase/index.vue

@@ -0,0 +1,76 @@
+<template>
+    <!-- 现货查询: 采购合同-销售合同-->
+    <div class="spot-contract-search" :loading="loading">
+        <filterCustomTable @search="updateColumn"></filterCustomTable>
+        <a-table :columns="columns" class="srcollYTable" :pagination="false" rowKey="key" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :data-source="tableList" :scroll="{ x: 'calc(100% - 160px)', y: 'calc(100vh - 163px)' }">
+            <template #index="{ index }">
+                <span>{{ index + 1 }}</span>
+            </template>
+        </a-table>
+        <!-- 右键 -->
+        <contextMenu :contextMenu="contextMenu" @cancel="closeContext" :list="buttons"> </contextMenu>
+        <component :is="componentId" v-if="componentId" :selectedRow="selectedRow" @cancel="closeComponent"></component>
+    </div>
+</template>
+
+<script lang="ts">
+import { queryTableList, MtpTableButton, contextMenu, defineComponent, handleComposeTable, ComposeTableParam } from '@/common/export/commonTable';
+import filterCustomTable from '../../components/filter/index.vue';
+import { formatTime, formatValue } from '@/common/methods';
+import { columns } from './setup';
+import { Ermcp3SellBuyContract } from '@/services/go/ermcp/purchase/interface';
+import { QueryPurchase } from '@/services/go/ermcp/purchase';
+import { QueryWareHouse } from '@/services/go/ermcp/sell';
+import { EnumRouterName } from '@/common/constants/enumRouterName';
+import { getTableButton } from '@/common/setup/table/button';
+import { useRoute } from 'vue-router';
+
+export default defineComponent({
+    name: 'spot-contract-search',
+    components: {
+        filterCustomTable,
+        contextMenu,
+        MtpTableButton,
+    },
+    setup() {
+        const { name: routeName } = useRoute();
+        // 权限按钮
+        const buttons = getTableButton();
+
+        // 表格列表数据
+        const { loading, tableList, queryTable } = queryTableList<Ermcp3SellBuyContract>();
+
+        // 获取列表数据
+        const queryTableAction = () => {
+            switch (routeName) {
+                case 'search_purchase':
+                    queryTable(QueryPurchase, { querytype: 1 });
+                    break;
+                case 'search_sell':
+                    queryTable(QueryWareHouse, { querytype: 1 });
+                    break;
+            }
+        };
+
+        // 表格通用逻辑
+        const param: ComposeTableParam = {
+            queryFn: queryTableAction,
+            menuType: EnumRouterName.spot_contract_checkpending,
+            tableName: 'table_pcweb_delivery',
+            tableFilterKey: ['contracttype', 'pricetype', 'contractno'],
+            isDetail: true,
+        };
+
+        return {
+            ...handleComposeTable<Ermcp3SellBuyContract>(param),
+            loading,
+            tableList,
+            queryTable,
+            formatTime,
+            formatValue,
+            columns,
+            buttons,
+        };
+    },
+});
+</script>

+ 174 - 0
src/views/business/search/list/purchase/setup.ts

@@ -0,0 +1,174 @@
+import { Ermcp3SellBuyContract } from '@/services/go/ermcp/purchase/interface';
+import { ColumnType } from '@/common/methods/table';
+import { getBizTypeName, getContractStatusName, getContractTypeName, getPriceTypeName } from '@/common/constants/enumsName';
+
+/**
+ * 表头对应字段
+ */
+export const columns: ColumnType[] = [
+    {
+        key: '0th',
+        dataIndex: 'index',
+        title: '序号',
+        align: 'center',
+        slots: {
+            customRender: 'index',
+        },
+        width: 120,
+    },
+    {
+        title: '状态',
+        dataIndex: 'contracctstatus',
+        key: 'contracctstatus',
+        align: 'center',
+        width: 120,
+        customRender: ({ text }: { text: number }) => {
+            return getContractStatusName(text);
+        },
+    },
+    {
+        title: '合同编号',
+        dataIndex: 'contractno',
+        key: 'contractno',
+        align: 'center',
+        width: 120,
+    },
+    {
+        title: '类型',
+        dataIndex: 'contracttype',
+        key: 'contracttype',
+        align: 'center',
+        width: 120,
+        customRender: ({ text }: { text: number }) => {
+            return getContractTypeName(text);
+        },
+    },
+    {
+        title: '对手方',
+        dataIndex: '--',
+        key: '--',
+        align: 'center',
+        width: 120,
+        customRender: ({ text, record }: { text: number, record: Ermcp3SellBuyContract }) => {
+            return text;
+        }
+    },
+    {
+        title: '合同量',
+        dataIndex: 'qty',
+        key: 'qty',
+        align: 'center',
+        width: 120,
+    },
+    {
+        title: '现货品种',
+        dataIndex: 'deliverygoodsname',
+        key: 'deliverygoodsname',
+        align: 'center',
+        width: 120,
+    },
+    {
+        title: '商品',
+        dataIndex: 'goodsname',
+        key: 'goodsname',
+        align: 'center',
+        width: 120,
+    },
+    {
+        title: '业务类型',
+        dataIndex: 'biztype',
+        key: 'biztype',
+        align: 'center',
+        width: 120,
+        customRender: ({ text }: { text: number }) => {
+            return getBizTypeName(text);
+        },
+    },
+    {
+        title: '定价类型',
+        dataIndex: 'pricetype',
+        key: 'pricetype',
+        align: 'center',
+        width: 120,
+        customRender: ({ text }: { text: number }) => {
+            return getPriceTypeName(text);
+        },
+    },
+    {
+        title: '点价合约',
+        dataIndex: '--',
+        key: '--',
+        align: 'center',
+        width: 120,
+    },
+    {
+        title: '价格',
+        dataIndex: 'price',
+        key: 'price',
+        align: 'center',
+        width: 120,
+    },
+    {
+        title: '升贴水',
+        dataIndex: 'pricemove',
+        key: 'pricemove',
+        align: 'center',
+        width: 120,
+    },
+    {
+        title: '金额',
+        dataIndex: '--',
+        key: '--',
+        align: 'center',
+        width: 120,
+    },
+    {
+        title: '保证金',
+        dataIndex: 'margin',
+        key: 'margin',
+        align: 'center',
+        width: 120,
+    },
+    {
+        title: '点价期',
+        dataIndex: '--',
+        key: 'contractno',
+        align: 'center',
+        width: 120,
+    },
+    {
+        title: '交收期',
+        dataIndex: '--',
+        key: 'contractno',
+        align: 'center',
+        width: 120,
+    },
+    {
+        title: '业务员',
+        dataIndex: 'saleusername',
+        key: 'saleusername',
+        align: 'center',
+        width: 120,
+    },
+    {
+        title: '跟单员',
+        dataIndex: 'merusername',
+        key: 'merusername',
+        align: 'center',
+        width: 120,
+    },
+    {
+        title: '交易用户',
+        dataIndex: 'tradeusername',
+        key: 'tradeusername',
+        align: 'center',
+        width: 120,
+    },
+    {
+        title: '结算币种',
+        dataIndex: 'currencyname',
+        key: 'currencyname',
+        align: 'center',
+        width: 120,
+    },
+];

+ 0 - 0
src/views/business/search/plan/index.vue


+ 1 - 1
src/views/business/spotmarket/list/price/index.vue

@@ -30,7 +30,7 @@ export default defineComponent({
         MtpTableFilter,
         MtpTableButton,
         detail: defineAsyncComponent(() => import('../../components/detail/index.vue')), // 详情
-        spotmarket_price_modify: defineAsyncComponent(() => import('../../components/modify/index.vue')), // 修改
+        modify: defineAsyncComponent(() => import('../../components/modify/index.vue')), // 修改
     },
     setup() {
         // 权限按钮

+ 6 - 11
src/views/information/spot-contract/components/filterTable/index.vue

@@ -1,11 +1,9 @@
 <template>
-  <!-- 过滤客户资料表格 -->
-  <div class="filterTable">
-    <FilterOption :selectList="selectList"
-                  :inputList="inputList"
-                  :fixedBtnList="fixedBtnList" />
-    <slot></slot>
-  </div>
+    <!-- 过滤客户资料表格 -->
+    <div class="filterTable">
+        <FilterOption :selectList="selectList" :inputList="inputList" :fixedBtnList="fixedBtnList" />
+        <slot></slot>
+    </div>
 </template>
 
 <script lang="ts">
@@ -46,7 +44,4 @@ export default defineComponent({
         };
     },
 });
-</script>
-
-<style lang="less">
-</style>;
+</script>

+ 1 - 1
src/views/information/spot-contract/list/purchase/index.vue

@@ -4,7 +4,7 @@
         <filterCustomTable @search="updateColumn">
             <mtp-table-button :buttons="firstBtn" @click="openComponent" />
         </filterCustomTable>
-        <a-table :columns="columns" class="topOrderTable" :pagination="false" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" rowKey="key" :data-source="tableList" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }">
+        <a-table :columns="columns" class="srcollYTable" :pagination="false" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" rowKey="key" :data-source="tableList" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }">
             <!-- 额外的展开行 -->
             <!-- 额外的展开行 -->
             <template #expandedRowRender="{ record }">

+ 1 - 1
src/views/information/spot-contract/list/sell/index.vue

@@ -4,7 +4,7 @@
         <filterCustomTable @search="updateColumn">
             <mtp-table-button :buttons="firstBtn" @click="openComponent" />
         </filterCustomTable>
-        <a-table :columns="columns" class="topOrderTable" :pagination="false" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" rowKey="key" :data-source="tableList" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }">
+        <a-table :columns="columns" class="srcollYTable" :pagination="false" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" rowKey="key" :data-source="tableList" :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }">
             <!-- 额外的展开行 -->
             <!-- 额外的展开行 -->
             <template #expandedRowRender="{ record }">