li.shaoyi il y a 3 ans
Parent
commit
3ad11d76af

+ 12 - 0
src/common/components/tableScroll/index.less

@@ -13,4 +13,16 @@
         flex      : 1;
         overflow-y: auto;
     }
+
+    .ant-table-wrapper,
+    .ant-table-content,
+    .ant-table-scroll,
+    .ant-table-body {
+        height          : 100%;
+        background-color: transparent !important;
+    }
+
+    .ant-table {
+        background-color: transparent;
+    }
 }

+ 1 - 1
src/common/components/tableScroll/index.vue

@@ -57,6 +57,6 @@ export default defineComponent({
 })
 </script>
 
-<style lang="less" scoped>
+<style lang="less">
 @import './index.less';
 </style>

+ 6 - 0
src/layout/components/bottom.vue

@@ -4,6 +4,7 @@
     <main :class="[isCapitalLeft ? 'main-some' : 'main-all']">
       <firstMenu :list="orderList" :value="'title'" @selectMenu="selectMenu">
         <div class="right-menu-content">
+          <a-button class="operBtn" @click="getTradeAccountList">刷新</a-button>
           <!-- 资金信息 -->
           <a-select class="capitalSelect" style="width: 180px" placeholder="请选择账户" @change="tradeAccountChange" v-model:value="selectedAccountId">
             <a-select-option v-for="item in tradeAccountList" :value="item.accountid" :key="item.accountid">{{item.accountid}}</a-select-option>
@@ -71,6 +72,7 @@ export default defineComponent({
       componentId.value = value.code;
     }
     return {
+      getTradeAccountList,
       selectMenu,
       componentId,
       orderList,
@@ -88,6 +90,7 @@ export default defineComponent({
 <style lang="less">
 .right-menu-content {
     display: flex;
+    align-items: center;
     .capitalSelect {
         margin-top: 2px;
         margin-right: 10px;
@@ -118,6 +121,9 @@ export default defineComponent({
     width: 100%;
     transition: height 300ms;
     overflow: hidden;
+    .operBtn {
+        margin-right: 8px;
+    }
     .capital-info-container {
         border-right: 1px solid @m-black2;
     }

+ 5 - 13
src/views/report/sum_pl_report/list/sum_pl_report/index.vue

@@ -3,11 +3,11 @@
   <!-- 汇总损益报表 -->
   <mtp-table-scroll>
     <template #default="{ scroll }">
-      <a-table :columns="getColumns()" class="srcollYTable" :scroll="scroll" :pagination="false" :expandedRowKeys="expandedRowKeys" :customRow="customRow" :rowKey="(record,index)=>index" :data-source="tableList"></a-table>
+      <a-table :columns="getColumns()" class="srcollYTable" :scroll="scroll" :pagination="false" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :rowKey="(record,index)=>index" :data-source="tableList"></a-table>
     </template>
   </mtp-table-scroll>
-  <!-- 明细 -->
-  <mtp-table-detail :columns="columnsDetail" :data-source="detailTableList" :tabs="tabList" v-model:visible="visible" @change="changeTab">
+  <!-- 明细,日报表不显示“损益明细“标签页 -->
+  <mtp-table-detail :columns="columnsDetail" :data-source="detailTableList" :tabs="tabList" v-model:visible="visible" @change="changeTab" v-show="cycletype > 0">
     <!-- 出现浮点失真  强行处理 * 2-->
     <template #spotactualpl="{ record }">
       <span>{{ record.spotactualpl.toFixed(2) }}</span>
@@ -96,15 +96,6 @@ export default defineComponent({
     // 当前选中的标签
     const tabIndex = ref(0);
 
-    // 自定义表格事件
-    const customRow = (record: Ermcp3ArealSumPL, index: number) => {
-      // 日报表不显示“损益明细“标签页
-      if (cycletype.value === 0) {
-        return {};
-      }
-      return Rowclick(record, index);
-    };
-
     // 切换明细
     function changeTab(index: number) {
       tabIndex.value = index;
@@ -163,9 +154,10 @@ export default defineComponent({
       detailTableList,
       expandedRowKeys,
       selectedRow,
-      customRow,
+      Rowclick,
       tabList,
       changeTab,
+      cycletype,
     };
   },
 });