ソースを参照

修改实时敞口

huangbin 4 年 前
コミット
661c461f1e

+ 5 - 12
src/views/business/exposure/list/realTime/index.vue

@@ -89,17 +89,14 @@
                :data-source="detailTableList"
                :scroll="{ x: '100%', y: 'calc(100vh - 163px)' }">
         <!-- 套保品种/代码 -->
-        <template #middlegoodsname="{ record }">
+        <template #middlegoodsname="{ record }"
+                  v-if="!isPingAnOem()">
           <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>
@@ -189,7 +186,7 @@ export default defineComponent({
             Rowclick, // 表格事件
             tabList,
         } = handleComposeTable_detail<ErmcpRealExposureModel>(param);
-        const { listColumns, spotColumns, futureColumns } = pingan_realTime_columns();
+        const { listColumns, spotColumns } = pingan_realTime_columns();
         initData(() => {
             if (isPingAnOem()) {
                 columns.value = listColumns;
@@ -215,12 +212,8 @@ export default defineComponent({
                 });
             } else if (code === 'exposure_realtime_futures_details') {
                 // 期货明细
-                if (isPingAnOem()) {
-                    columnsDetail.value = futureColumns;
-                } else {
-                    // 注册表头
-                    registerColumnDetail('table_pcweb_exposure_futures_detail', []);
-                }
+                // 注册表头
+                registerColumnDetail('table_pcweb_exposure_futures_detail', []);
 
                 fn = QueryAutualExposurePosition;
                 queryResultLoadingAndInfo(fn, loading, { middleGoodsId: selectedRow.value?.MiddleGoodsID }).then((res) => {

+ 13 - 106
src/views/business/exposure/list/realTime/setup.ts

@@ -24,31 +24,31 @@ export function pingan_realTime_columns() {
         },
         {
             key: '1th',
-            dataIndex: 'MiddleGoodsCode',
+            dataIndex: 'TotalSpotQty',
             title: '采销定价净值',
             align: 'center',
             slots: {
-                customRender: 'MiddleGoodsCode',
+                customRender: 'TotalSpotQty',
             },
             width: 120,
         },
         {
             key: '21th',
-            dataIndex: 'MiddleGoodsCode',
+            dataIndex: 'TotalFutureQty',
             title: '采销定价净值今日变动',
             align: 'center',
             slots: {
-                customRender: 'MiddleGoodsCode',
+                customRender: 'TotalFutureQty',
             },
             width: 200,
         },
         {
             key: '12th',
-            dataIndex: 'TotalNeedHedgeQty',
+            dataIndex: 'needhedgeqty',
             title: '应套保量',
             align: 'center',
             slots: {
-                customRender: 'TotalNeedHedgeQty',
+                customRender: 'needhedgeqty',
             },
             width: 200,
         },
@@ -64,11 +64,11 @@ export function pingan_realTime_columns() {
         },
         {
             key: '123th',
-            dataIndex: 'DiffSpotHedgeQty',
+            dataIndex: 'TotalFutureQty',
             title: '保值净持仓量',
             align: 'center',
             slots: {
-                customRender: 'DiffSpotHedgeQty',
+                customRender: 'TotalFutureQty',
             },
             width: 200,
         },
@@ -94,11 +94,11 @@ export function pingan_realTime_columns() {
         // },
         {
             key: '153th',
-            dataIndex: 'DiffSpotHedgeQty',
+            dataIndex: 'TotalExposure',
             title: '净敞口',
             align: 'center',
             slots: {
-                customRender: 'DiffSpotHedgeQty',
+                customRender: 'TotalExposure',
             },
             width: 200,
         },
@@ -117,11 +117,11 @@ export function pingan_realTime_columns() {
         },
         {
             key: '0th',
-            dataIndex: 'MiddleGoodsName',
+            dataIndex: 'middleGoodsName',
             title: '套保品种',
             align: 'center',
             slots: {
-                customRender: 'MiddleGoodsName',
+                customRender: 'middleGoodsName',
             },
             width: 250,
         },
@@ -186,98 +186,5 @@ export function pingan_realTime_columns() {
             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 }
+    return { listColumns, spotColumns }
 }