huangbin 4 rokov pred
rodič
commit
4aa157e2cf

+ 1 - 1
public/config/app.config.json

@@ -1,3 +1,3 @@
 {
-    "apiUrl": "http://103.40.249.123:8280/cfg?key=mtp_20"
+    "apiUrl": "http://103.40.249.123:28280/cfg?key=mtp_20"
 }

+ 4 - 0
public/config/readMe.txt

@@ -19,6 +19,10 @@ http://192.168.30.211:8080/cfg?key=test_211
 // 千海金 客户环境 "apiUrl":"http://103.40.249.123:8280/cfg?key=mtp_20"
 账号: qhjadmin 密码:123456
 
+// 云融Go:http://103.40.249.123:28280/cfg?key=mtp_20
+
+
+
 31.175 账号
     110000000001
     199990000012

+ 3 - 1
src/common/setup/table/compose.ts

@@ -102,7 +102,9 @@ export function handleComposeTable_detail<T>({ queryFn, tableName, tableFilterKe
 
     initData(() => {
         queryFn();
-        registerColumn(tableName, tableFilterKey);
+        if (tableName) {
+            registerColumn(tableName, tableFilterKey);
+        }
     });
     return {
         visible, openDrawer, closeDrawer,   // 控制 drawer 组件是否显示

+ 1 - 1
src/common/setup/table/interface.ts

@@ -32,7 +32,7 @@ export interface ComposeTableParam {
 
 export interface ComposeTableDetailParam {
     queryFn: Function,  // 查询表格数据
-    tableName: keyof TableKey, // 表头key
+    tableName?: keyof TableKey, // 表头key
     tableFilterKey: string[], // 表格过滤字段
     menuType: EnumRouterName
 }

+ 43 - 9
src/views/business/exposure/list/realTime/index.vue

@@ -6,7 +6,7 @@
     <div class="real-time-header"
          v-if="isPingAnOem()">
       <span class="dialogSpan">每隔</span>
-      <a-select class="typeSelect"
+      <a-select class="typeSelect real-time-select"
                 style="width: 100px"
                 v-model:value="timer"
                 @change="timerChange"
@@ -33,6 +33,10 @@
              rowKey="key"
              :data-source="tableList"
              :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }">
+      <template v-if="isPingAnOem()"
+                #index="{ index }">
+        <span>{{ index + 1 }}</span>
+      </template>
       <!-- <template #DiffSpotQty="{ record }">
         <span>{{ record.DiffSpotQty.toFixed(2) + " " + record.ENUMDICNAME }}</span>
       </template> -->
@@ -88,7 +92,14 @@
         <template #middlegoodsname="{ record }">
           <span>{{ record.middlegoodsname + "/" +  record.middlegoodscode}}</span>
         </template>
-
+        <template v-if="isPingAnOem()"
+                  #index="{ index }">
+          <span>{{ index + 1 }}</span>
+        </template>
+        <template v-if="isPingAnOem()"
+                  #goodsname="{ text, record }">
+          <span>{{ text }}/{{record.goodscode}}</span>
+        </template>
         <!-- 类型 -->
         <template #contracttype="{ record }">
           <span>{{ getPlanContractType(record.contracttype) }}</span>
@@ -110,12 +121,13 @@ import { TabList } from '@/common/components/description/interface';
 import { handleComposeTable_detail } from '@/common/setup/table/compose';
 import { queryResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
 import { EnumRouterName } from '@/common/constants/enumRouterName';
-import { formatValue } from '@/common/methods';
+import { formatValue, initData } from '@/common/methods';
 import { formatNumber } from '@/common/methods/format';
 import { getBizTypeName, getContractTypeName, getLogType } from '@/common/constants/enumsName';
 import { getPlanContractType } from '@/views/business/plan/setup';
 import timerUtil from '@/utils/timer/timerUtil';
 import { isPingAnOem } from '@/common/config/projectName';
+import { pingan_realTime_columns } from './setup';
 
 export default defineComponent({
     name: EnumRouterName.exposure_realtime,
@@ -137,10 +149,13 @@ export default defineComponent({
         const queryTableAction = () => queryTable(QueryActualExposure);
         const param: ComposeTableDetailParam = {
             queryFn: queryTableAction, // 查询表格数据
-            tableName: 'table_pcweb_exposure', // 表头key
+            // tableName: 'table_pcweb_exposure', // 表头key
             tableFilterKey: ['MiddleGoodsName'], // 表格过滤字段
             menuType: EnumRouterName.exposure_realtime, // 当前tab页对应的code
         };
+        if (!isPingAnOem()) {
+            param.tableName = 'table_pcweb_exposure';
+        }
         // 切换间隔时间
         function timerChange() {
             setTimer();
@@ -174,15 +189,25 @@ export default defineComponent({
             Rowclick, // 表格事件
             tabList,
         } = handleComposeTable_detail<ErmcpRealExposureModel>(param);
-
+        const { listColumns, spotColumns, futureColumns } = pingan_realTime_columns();
+        initData(() => {
+            if (isPingAnOem()) {
+                columns.value = listColumns;
+            }
+        });
         // 切换明细
         function changeTab(index: number, current: TabList) {
             const { code, lable } = current;
             let fn = null;
             if (code === 'exposure_realtime_spot_details') {
                 // 现货明细信息
-                // 注册表头
-                registerColumnDetail('table_pcweb_exposure_detail', []);
+                if (isPingAnOem()) {
+                    columnsDetail.value = spotColumns;
+                } else {
+                    // 注册表头
+                    registerColumnDetail('table_pcweb_exposure_detail', []);
+                }
+
                 fn = QueryActualExposureDetail;
 
                 queryResultLoadingAndInfo(fn, loading, { middlegoodsid: selectedRow.value?.MiddleGoodsID }).then((res) => {
@@ -190,8 +215,13 @@ export default defineComponent({
                 });
             } else if (code === 'exposure_realtime_futures_details') {
                 // 期货明细
-                // 注册表头
-                registerColumnDetail('table_pcweb_exposure_futures_detail', []);
+                if (isPingAnOem()) {
+                    columnsDetail.value = futureColumns;
+                } else {
+                    // 注册表头
+                    registerColumnDetail('table_pcweb_exposure_futures_detail', []);
+                }
+
                 fn = QueryAutualExposurePosition;
                 queryResultLoadingAndInfo(fn, loading, { middleGoodsId: selectedRow.value?.MiddleGoodsID }).then((res) => {
                     detailTableList.value = res;
@@ -234,4 +264,8 @@ export default defineComponent({
     padding: 5px 0 5px 5px;
     text-align: left;
 }
+.real-time-select {
+    margin-left: 5px;
+    margin-right: 5px;
+}
 </style>;

+ 283 - 0
src/views/business/exposure/list/realTime/setup.ts

@@ -0,0 +1,283 @@
+export function pingan_realTime_columns() {
+    // 实时敞口监控 表头
+    const listColumns = [
+        {
+            key: '9th',
+            dataIndex: 'index',
+            title: '序号',
+            align: 'center',
+            slots: {
+                customRender: 'index',
+            },
+            width: 80,
+        },
+        {
+            key: '0th',
+            dataIndex: 'MiddleGoodsName',
+            title: '套保品种',
+            align: 'center',
+            slots: {
+                customRender: 'MiddleGoodsName',
+            },
+            width: 120,
+            filteredValue: null,
+        },
+        {
+            key: '1th',
+            dataIndex: 'MiddleGoodsCode',
+            title: '采销定价净值',
+            align: 'center',
+            slots: {
+                customRender: 'MiddleGoodsCode',
+            },
+            width: 120,
+        },
+        {
+            key: '21th',
+            dataIndex: 'MiddleGoodsCode',
+            title: '采销定价净值今日变动',
+            align: 'center',
+            slots: {
+                customRender: 'MiddleGoodsCode',
+            },
+            width: 200,
+        },
+        {
+            key: '12th',
+            dataIndex: 'TotalNeedHedgeQty',
+            title: '应套保量',
+            align: 'center',
+            slots: {
+                customRender: 'TotalNeedHedgeQty',
+            },
+            width: 200,
+        },
+        {
+            key: '13th',
+            dataIndex: 'DiffSpotHedgeQty',
+            title: '应套保量今日变动',
+            align: 'center',
+            slots: {
+                customRender: 'DiffSpotHedgeQty',
+            },
+            width: 200,
+        },
+        {
+            key: '123th',
+            dataIndex: 'DiffSpotHedgeQty',
+            title: '保值净持仓量',
+            align: 'center',
+            slots: {
+                customRender: 'DiffSpotHedgeQty',
+            },
+            width: 200,
+        },
+        {
+            key: '1223th',
+            dataIndex: 'NeedHedgeExposoure',
+            title: '套保敞口',
+            align: 'center',
+            slots: {
+                customRender: 'NeedHedgeExposoure',
+            },
+            width: 200,
+        },
+        // {
+        //     key: '323th',
+        //     dataIndex: 'DiffSpotHedgeQty',
+        //     title: '期货账单净持仓',
+        //     align: 'center',
+        //     slots: {
+        //         customRender: 'DiffSpotHedgeQty',
+        //     },
+        //     width: 200,
+        // },
+        {
+            key: '153th',
+            dataIndex: 'DiffSpotHedgeQty',
+            title: '净敞口',
+            align: 'center',
+            slots: {
+                customRender: 'DiffSpotHedgeQty',
+            },
+            width: 200,
+        },
+    ];
+    // 采购明细 表头
+    const spotColumns = [
+        {
+            key: '922th',
+            dataIndex: 'index',
+            title: '序号',
+            align: 'center',
+            slots: {
+                customRender: 'index',
+            },
+            width: 80,
+        },
+        {
+            key: '0th',
+            dataIndex: 'MiddleGoodsName',
+            title: '套保品种',
+            align: 'center',
+            slots: {
+                customRender: 'MiddleGoodsName',
+            },
+            width: 250,
+        },
+        {
+            key: '1th',
+            dataIndex: 'createtime',
+            title: '时间',
+            align: 'center',
+            slots: {
+                customRender: 'createtime',
+            },
+            width: 200,
+        },
+        {
+            key: '2th',
+            dataIndex: 'contracttype',
+            title: '采销类型',
+            align: 'center',
+            slots: {
+                customRender: 'contracttype',
+            },
+            width: 120,
+        },
+        {
+            key: '3th',
+            dataIndex: 'deliverygoodsname',
+            title: '现货品种',
+            align: 'center',
+            slots: {
+                customRender: 'deliverygoodsname',
+            },
+            width: 120,
+        },
+        {
+            key: '4th',
+            dataIndex: 'qty',
+            title: '现货品种数量',
+            align: 'center',
+            slots: {
+                customRender: 'qty',
+            },
+            width: 140,
+        },
+        {
+            key: '5th',
+            dataIndex: 'changeQty',
+            title: '套保品种变动量',
+            align: 'center',
+            slots: {
+                customRender: 'changeQty',
+            },
+            width: 150,
+        },
+        {
+            key: '7th',
+            dataIndex: 'convertfactor',
+            title: '折算系数',
+            align: 'center',
+            slots: {
+                customRender: 'convertfactor',
+            },
+            width: 120,
+        },
+    ];
+    // 期货明细 表头
+    const futureColumns = [
+        {
+            key: '922th',
+            dataIndex: 'index',
+            title: '序号',
+            align: 'center',
+            slots: {
+                customRender: 'index',
+            },
+            width: 80,
+        },
+        {
+            key: '0th',
+            dataIndex: 'goodsname',
+            title: '期货合约/代码 ',
+            align: 'center',
+            slots: {
+                customRender: 'goodsname',
+            },
+            width: 130,
+        },
+        {
+            key: '1th',
+            dataIndex: 'goodscode',
+            title: '时间 ',
+            align: 'center',
+            slots: {
+                customRender: 'goodscode',
+            },
+            width: 120,
+        },
+        {
+            key: '2th',
+            dataIndex: 'ydqty',
+            title: '昨日持仓',
+            align: 'center',
+            slots: {
+                customRender: 'ydqty',
+            },
+            width: 120,
+        },
+        {
+            key: '3th',
+            dataIndex: 'diffqty',
+            title: '持仓变动量',
+            align: 'center',
+            slots: {
+                customRender: 'diffqty',
+            },
+            width: 130,
+        },
+        {
+            key: '4th',
+            dataIndex: 'curqty',
+            title: '当前持仓',
+            align: 'center',
+            slots: {
+                customRender: 'curqty',
+            },
+            width: 120,
+        },
+        {
+            key: '5th',
+            dataIndex: 'diffhedgeqty',
+            title: '套保品种变动量',
+            align: 'center',
+            slots: {
+                customRender: 'diffhedgeqty',
+            },
+            width: 150,
+        },
+        {
+            key: '6th',
+            dataIndex: 'agreeunit',
+            title: '合约单位',
+            align: 'center',
+            slots: {
+                customRender: 'agreeunit',
+            },
+            width: 120,
+        },
+        {
+            key: '7th',
+            dataIndex: 'convertratio',
+            title: '期货品种系数 ',
+            align: 'center',
+            slots: {
+                customRender: 'convertratio',
+            },
+            width: 150,
+        },
+    ];
+    return { listColumns, spotColumns, futureColumns }
+}