li.shaoyi há 3 anos atrás
pai
commit
5d277e49d5

+ 2 - 2
src/@next/components/modules/echarts-kline/index.less

@@ -20,7 +20,7 @@
             color          : #7a8a94;
             font-size      : 12px;
             list-style-type: none;
-            padding        : 4px 4%;
+            padding        : 5px 10px;
             margin         : 0;
 
             &-item {
@@ -56,6 +56,6 @@
     }
 
     .mtp-tabbar {
-        padding: 4px 4%;
+        padding: 5px 10px;
     }
 }

+ 1 - 1
src/@next/components/modules/echarts-kline/index.vue

@@ -20,6 +20,7 @@
         <app-echarts :option="options.candlestick" v-model:dataIndex="dataIndex" @ready="mainReady" />
       </div>
       <template v-if="showIndicator">
+        <mtp-tabbar theme="menu" :data="chartSeriesTypeList" @change="tabChange" />
         <div class="app-echats-kline__container indicator">
           <!-- MACD -->
           <section class="section" v-if="activeSeriesType === ChartSeriesType.MACD">
@@ -54,7 +55,6 @@
             <app-echarts :option="options.cci" v-model:dataIndex="dataIndex" @ready="indicatorReady" />
           </section>
         </div>
-        <mtp-tabbar theme="menu" :data="chartSeriesTypeList" @change="tabChange" />
       </template>
     </template>
   </div>

+ 1 - 1
src/@next/components/modules/echarts-timeline/index.less

@@ -12,7 +12,7 @@
         color          : #7a8a94;
         font-size      : 12px;
         list-style-type: none;
-        padding        : 4px 4%;
+        padding        : 5px 10px;
         margin         : 0;
 
         &-item {

+ 38 - 11
src/@next/hooks/echarts/candlestick/options.ts

@@ -10,10 +10,10 @@ const theme = getTheme();
 function getColors() {
     // 默认主题色配置
     const defaultColors: Colors = {
-        upColor: '#eb5454',
-        downColor: '#47b262',
-        xAxisLineColor: '#171b1d',
-        yAxisLineColor: '#171b1d',
+        upColor: '#ff3333',
+        downColor: '#0aab62',
+        xAxisLineColor: 'rgba(128,128,128,.1)',
+        yAxisLineColor: 'rgba(128,128,128,.1)',
     }
 
     const colors = {
@@ -45,6 +45,13 @@ export function useOptions(dataset: EchartsDataset) {
         const { xAxisLineColor } = options.colors;
 
         return {
+            grid: {
+                left: '10px',
+                right: '10px',
+                top: '15px',
+                bottom: '10px',
+                containLabel: true,
+            },
             dataZoom: {
                 type: 'inside',
                 startValue: source.length - 120, // 起始显示K线条数(最新120条)
@@ -52,12 +59,25 @@ export function useOptions(dataset: EchartsDataset) {
                 minValueSpan: 50, // 限制窗口缩放显示最少数据条数
                 maxValueSpan: 400, // 限制窗口缩放显示最大数据条数
             },
+            axisPointer: {
+                label: {
+                    backgroundColor: 'rgba(128,128,128,.75)'
+                }
+            },
             xAxis: {
                 type: 'category',
                 axisLabel: {
                     formatter: (val: string) => moment(val).format('YYYY/MM/DD'),
                     margin: 12,
                 },
+                axisPointer: {
+                    label: {
+                        formatter: (params) => moment(params.value).format('YYYY/MM/DD HH:mm:ss'),
+                    }
+                },
+                axisTick: {
+                    show: false,
+                }
             },
             yAxis: {
                 scale: true,
@@ -74,6 +94,8 @@ export function useOptions(dataset: EchartsDataset) {
     // K线配置项
     const setCandlestickOption = () => {
         const { dimensions, source } = dataset.candlestick;
+        const { upColor, downColor } = options.colors;
+
         options.candlestick = {
             ...getDefaultOption(),
             dataset: {
@@ -84,22 +106,27 @@ export function useOptions(dataset: EchartsDataset) {
                 {
                     name: 'K线',
                     type: 'candlestick',
+                    itemStyle: {
+                        color: upColor,
+                        color0: downColor,
+                        borderColor: upColor,
+                        borderColor0: downColor,
+                    },
                     // 最新价标线
                     markLine: {
-                        // 标线两端图标
-                        symbol: 'none',
+                        symbolSize: 6,
                         // 标线标签样式
                         label: {
-                            color: '#444',
-                            fontWeight: 'bold',
-                            backgroundColor: 'rgba(255,255,255,.75)',
+                            color: '#fff',
+                            backgroundColor: 'rgba(128,128,128,.75)',
                             padding: 5,
-                            borderRadius: 3
+                            borderRadius: 3,
+                            position: 'insideStartBottom',
                         },
                         // 标线样式
                         lineStyle: {
                             type: 'dashed',
-                            color: 'rgba(255,255,255,.3)'
+                            color: 'rgba(102,102,102,.6)'
                         },
                         data: [
                             {

+ 34 - 20
src/@next/hooks/echarts/timeline/options.ts

@@ -9,26 +9,26 @@ const theme = getTheme();
 function getColors() {
     // 默认主题色配置
     const defaultColors: Colors = {
-        upColor: '#FF2B2B',
-        downColor: '#1FF195',
-        xAxisLineColor: '#171B1D',
-        yAxisLineColor: '#171B1D',
-        seriesLineColor: '#39afe6',
-        seriesMarkLabelColor: '#3C454B',
-        seriesMarkLineColor: '#666',
+        upColor: '#ff3333',
+        downColor: '#0aab62',
+        xAxisLineColor: 'rgba(128,128,128,.1)',
+        yAxisLineColor: 'rgba(128,128,128,.1)',
+        seriesLineColor: '#50b4eb',
         seriesAreaGradients: new echarts.graphic.LinearGradient(0, 0, 0, 1,
             [
                 {
                     offset: 0,
-                    color: 'rgba(0, 136, 212, 0.3)',
+                    color: 'rgba(80, 180, 235, .2)',
                 },
                 {
                     offset: 1,
-                    color: 'rgba(0, 136, 212, 0.3)',
+                    color: 'rgba(80, 180, 235, .15)',
                 },
             ],
             false
         ),
+        seriesMarkLabelColor: '#fff',
+        seriesMarkLineColor: 'rgba(102,102,102,.6)'
     }
 
     const colors = {
@@ -76,10 +76,17 @@ export function useOptions(dataset: EchartsDataset) {
 
         options.timeline = {
             dataset: timeline,
+            grid: {
+                left: '10px',
+                right: '10px',
+                top: '15px',
+                bottom: '10px',
+                containLabel: true,
+            },
             axisPointer: {
                 label: {
-                    // 小数点精度
-                    precision: decimal,
+                    precision: decimal, // 小数点精度
+                    backgroundColor: 'rgba(128,128,128,.75)',
                 }
             },
             xAxis: {
@@ -89,6 +96,9 @@ export function useOptions(dataset: EchartsDataset) {
                     showMaxLabel: true,
                     margin: 12,
                 },
+                axisTick: {
+                    show: false,
+                }
             },
             yAxis: [
                 {
@@ -153,30 +163,33 @@ export function useOptions(dataset: EchartsDataset) {
                     },
                     areaStyle: {
                         color: colors.seriesAreaGradients,
-                        shadowColor: 'rgba(0, 0, 0, 0.1)',
-                        shadowBlur: 10,
+                        opacity: 1,
                     },
                     // 标线
                     markLine: {
-                        // 标线两端图标
-                        symbol: 'none',
+                        symbolSize: 6,
                         // 标线标签样式
                         label: {
-                            color: colors.seriesMarkLabelColor,
-                            fontWeight: 'bold',
-                            backgroundColor: 'rgba(255,255,255,.75)',
+                            show: false,
+                            backgroundColor: 'rgba(128,128,128,.75)',
                             padding: 5,
-                            borderRadius: 3
+                            borderRadius: 3,
+                            position: 'insideStartBottom',
                         },
                         // 标线样式
                         lineStyle: {
                             type: 'dashed',
+                            color: 'rgba(128,128,128,.3)'
                         },
                         data: [
                             {
                                 yAxis: timeline.source.close[timeline.source.close.length - 1] ?? '--', // 最新价
+                                label: {
+                                    show: true,
+                                    color: colors.seriesMarkLabelColor,
+                                },
                                 lineStyle: {
-                                    color: colors.seriesMarkLineColor
+                                    color: colors.seriesMarkLineColor,
                                 },
                             },
                             {
@@ -194,6 +207,7 @@ export function useOptions(dataset: EchartsDataset) {
                     lineStyle: {
                         width: 1,
                         opacity: 0.8,
+                        color: '#ffcc00',
                     },
                 },
             ],

+ 2 - 3
src/common/components/echarts/index.less

@@ -8,11 +8,10 @@
     flex            : 1;
     height          : 100%;
     background-color: var(--bgcolor, #0e0e0f);
-    padding         : 10px 0;
+    padding         : 10px 15px;
 
     &__tab {
-        padding      : 0 4%;
-        margin-bottom: 10px;
+        padding: 5px 10px;
     }
 
     &__content {

+ 1 - 1
src/hooks/account/index.ts

@@ -146,7 +146,7 @@ function calcPositionValue(position: QueryErmcpTradePositionRsp) {
     // 计算盈亏比例
     const positionProfitAndLossRate = computed(() => {
         const { opencost } = position
-        if (opencost > 0) {
+        if (opencost > 0 && positionProfitAndLoss.value > 0) {
             // 持仓盈亏 ÷ 开仓成本
             return positionProfitAndLoss.value / opencost * 100
         }

+ 1 - 0
src/services/go/ermcp/report/interface.ts

@@ -268,6 +268,7 @@ export interface QryAreaSumPLReq {
     cycletype: number // 周期类型 - 0:日 1:月 2:季 3:年 4:周 5:全报表【原值】
     cycletime: string // 周期时间 日(YYYYMMDD) 月(YYYYMM) 季(YYYYQ) 年(YYYY) 周(YYYYMMDD周内任意一天) 全(0)【原值】
     currencyid?: number // 币种id(明细必填)
+    middlegoodsid?: number // 套保品种ID, 查询类型为2时起效
 }
 
 /**

+ 1 - 1
src/views/information/spot-contract/components/add/index.vue

@@ -236,7 +236,7 @@
         <legend>其他信息</legend>
         <a-row :gutter="24">
           <a-col :span="12">
-            <a-form-item label="保证金" name="ContractMargin">
+            <a-form-item label="初始保证金" name="ContractMargin">
               <a-input class="dialogInput suffixGrey" placeholder="请输入保证金" v-model:value="formState.ContractMargin"
                 style="width: 200px" :suffix="payCurrencyUnit" />
             </a-form-item>

+ 1 - 1
src/views/information/spot-contract/components/infoDetail/index.vue

@@ -37,7 +37,7 @@ export default defineComponent({
 
         const { contractmargin, saleuserid, meruserid, tradeusername, remark } = res[0];
         const list = [
-          { label: '保证金', value: formatValue(contractmargin) },
+          { label: '初始保证金', value: formatValue(contractmargin) },
           { label: '业务员', value: formatValue(findManagerName(saleuserid, businessManager.value)) },
           { label: '跟单员', value: formatValue(findManagerName(meruserid, businessManager.value)) },
           //{ label: '交易用户', value: formatValue(tradeusername) },

+ 1 - 1
src/views/information/spot-contract/components/modify/index.vue

@@ -217,7 +217,7 @@
         <legend>其他信息</legend>
         <a-row :gutter="24">
           <a-col :span="12">
-            <a-form-item label="保证金" name="ContractMargin">
+            <a-form-item label="初始保证金" name="ContractMargin">
               <a-input class="dialogInput suffixGrey" placeholder="请输入保证金" v-model:value="formState.ContractMargin"
                 style="width: 200px" :suffix="payCurrencyUnit" />
             </a-form-item>

+ 16 - 14
src/views/report/exposure-report/list/exposure_report/index.vue

@@ -57,20 +57,22 @@ export default defineComponent({
     // 获取列表数据
     const queryTableAction = () => {
       const { getInitTime, getInitType } = handleInitTypeAndTime();
-      cycletime = getInitTime();
-      const param: AreaExpourseReportReq = {
-        cycletype: getInitType(),
-        cycletime,
-        querytype: 1,
-      };
-      // 获取列表数据
-      queryTable(qryAreaExpourseReport, param).then((res) => {
-        if (res.length) {
-          selectedRow.value = res[0];
-        } else {
-          changeTab(tabIndex.value)
-        }
-      });
+      getInitTime().then((res) => {
+        cycletime = res;
+        const param: AreaExpourseReportReq = {
+          cycletype: getInitType(),
+          cycletime,
+          querytype: 1,
+        };
+        // 获取列表数据
+        queryTable(qryAreaExpourseReport, param).then((res) => {
+          if (res.length) {
+            selectedRow.value = res[0];
+          } else {
+            changeTab(tabIndex.value)
+          }
+        });
+      })
     };
     const param: ComposeTableDetailParam = {
       queryFn: queryTableAction, // 查询表格数据

+ 16 - 14
src/views/report/finance-report/list/finance_report_finance/index.vue

@@ -44,20 +44,22 @@ export default defineComponent({
     // 获取列表数据
     const queryTableAction = () => {
       const { getInitTime, getInitType } = handleInitTypeAndTime();
-      cycletime = getInitTime();
-      const param: FinanceReportReq = {
-        cycletype: getInitType(),
-        cycletime,
-        querytype: 1,
-      };
-      // 获取列表数据
-      queryTable(qryFinanceReport, param).then((res) => {
-        if (res.length) {
-          selectedRow.value = res[0];
-        } else {
-          changeTab(tabIndex.value)
-        }
-      });
+      getInitTime().then((res) => {
+        cycletime = res;
+        const param: FinanceReportReq = {
+          cycletype: getInitType(),
+          cycletime,
+          querytype: 1,
+        };
+        // 获取列表数据
+        queryTable(qryFinanceReport, param).then((res) => {
+          if (res.length) {
+            selectedRow.value = res[0];
+          } else {
+            changeTab(tabIndex.value)
+          }
+        });
+      })
     };
     const param: ComposeTableDetailParam = {
       queryFn: queryTableAction, // 查询表格数据

+ 17 - 15
src/views/report/future_report/list/future_report/index.vue

@@ -4,7 +4,7 @@
   <mtp-table-scroll>
     <template #default="{ scroll }">
       <a-table :columns="columns" class="srcollYTable" :scroll="scroll" :pagination="false" :rowClassName="rowClassName"
-        :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :rowKey="(record,index)=>index"
+        :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :rowKey="(record, index) => index"
         :data-source="tableList">
         <!-- 持仓方向 -->
         <template #buyorsell="{ record }">
@@ -54,20 +54,22 @@ export default defineComponent({
     // 获取列表数据
     const queryTableAction = () => {
       const { getInitTime, getInitType } = handleInitTypeAndTime();
-      cycletime = getInitTime();
-      const param: QryTaFutureDataReportReq = {
-        cycletype: getInitType(),
-        cycletime,
-        querytype: 1,
-      };
-      // 获取列表数据
-      queryTable(qryTaFutureDataReport, param).then((res) => {
-        if (res.length) {
-          selectedRow.value = res[0];
-        } else {
-          changeTab(tabIndex.value)
-        }
-      });
+      getInitTime().then((res) => {
+        cycletime = res;
+        const param: QryTaFutureDataReportReq = {
+          cycletype: getInitType(),
+          cycletime,
+          querytype: 1,
+        };
+        // 获取列表数据
+        queryTable(qryTaFutureDataReport, param).then((res) => {
+          if (res.length) {
+            selectedRow.value = res[0];
+          } else {
+            changeTab(tabIndex.value)
+          }
+        });
+      })
     };
     const param: ComposeTableDetailParam = {
       queryFn: queryTableAction, // 查询表格数据

+ 9 - 7
src/views/report/hedgeditem/list/hedgeditem/index.vue

@@ -39,6 +39,7 @@ export default defineComponent({
         Filter
     },
     setup() {
+        const { getInitTime, getInitType } = handleInitTypeAndTime();
         const { loading, tableList, queryTable } = queryTableList<Ermcp8HedgeditemReportRsp>(true, 2); // 表格列表数据
         const cycletime = ref('');
         const cycletype = ref(0);
@@ -53,13 +54,14 @@ export default defineComponent({
         }
 
         const queryFn = () => {
-            const { getInitTime, getInitType } = handleInitTypeAndTime();
-            const param: Ermcp8HedgeditemReportReq = {
-                userid: getUserId(),
-                cycletype: getInitType(),
-                cycletime: getInitTime()
-            }
-            queryTable(queryErmcp8HedgeditemReport, param);
+            getInitTime().then((cycletime) => {
+                const param: Ermcp8HedgeditemReportReq = {
+                    userid: getUserId(),
+                    cycletype: getInitType(),
+                    cycletime,
+                }
+                queryTable(queryErmcp8HedgeditemReport, param);
+            })
         }
 
         // 表格通用逻辑

+ 17 - 15
src/views/report/inventory-report/list/category/index.vue

@@ -45,21 +45,23 @@ export default defineComponent({
     // 获取列表数据
     const queryTableAction = () => {
       const { getInitTime, getInitType } = handleInitTypeAndTime();
-      cycletime = getInitTime();
-      const param: AreaStockReportReq = {
-        cycletype: getInitType(),
-        cycletime,
-        querytype: 1,
-        sumfields: '1,2',
-      };
-      // 获取列表数据
-      queryTable(qryAreaStockReport, param).then((res) => {
-        if (res.length) {
-          selectedRow.value = res[0];
-        } else {
-          changeTab(tabIndex.value)
-        }
-      });
+      getInitTime().then((res) => {
+        cycletime = res;
+        const param: AreaStockReportReq = {
+          cycletype: getInitType(),
+          cycletime,
+          querytype: 1,
+          sumfields: '1,2',
+        };
+        // 获取列表数据
+        queryTable(qryAreaStockReport, param).then((res) => {
+          if (res.length) {
+            selectedRow.value = res[0];
+          } else {
+            changeTab(tabIndex.value)
+          }
+        });
+      })
     };
     const param: ComposeTableDetailParam = {
       queryFn: queryTableAction, // 查询表格数据

+ 17 - 15
src/views/report/inventory-report/list/warehouse/index.vue

@@ -44,21 +44,23 @@ export default defineComponent({
     // 获取列表数据
     const queryTableAction = () => {
       const { getInitTime, getInitType } = handleInitTypeAndTime();
-      cycletime = getInitTime();
-      const param: AreaStockReportReq = {
-        cycletype: getInitType(),
-        cycletime,
-        querytype: 1,
-        sumfields: '1,2,4',
-      };
-      // 获取列表数据
-      queryTable(qryAreaStockReport, param).then((res) => {
-        if (res.length) {
-          selectedRow.value = res[0];
-        } else {
-          changeTab(tabIndex.value)
-        }
-      });
+      getInitTime().then((res) => {
+        cycletime = res;
+        const param: AreaStockReportReq = {
+          cycletype: getInitType(),
+          cycletime,
+          querytype: 1,
+          sumfields: '1,2,4',
+        };
+        // 获取列表数据
+        queryTable(qryAreaStockReport, param).then((res) => {
+          if (res.length) {
+            selectedRow.value = res[0];
+          } else {
+            changeTab(tabIndex.value)
+          }
+        });
+      })
     };
     const param: ComposeTableDetailParam = {
       queryFn: queryTableAction, // 查询表格数据

+ 23 - 9
src/views/report/setup.ts

@@ -15,7 +15,7 @@ export function handleReprotType(context: SetupContext) {
     // 时间格式化类型
     const dateFormat = ref<reportCyleTimeType>(reportCyleTimeType.day)
     // 时间
-    const time = ref<Moment>(getInitTime());
+    const time = ref<Moment>();
     // 交易用户
     const selectedUser = ref<Value>({ key: getUserId() })
     // 周期类型与时间类型 一对一的关系
@@ -33,8 +33,14 @@ export function handleReprotType(context: SetupContext) {
     ])
     // 初始化时间
     function getInitTime() {
-        const yesterday = moment().add(-1, 'days')
-        return moment(yesterday, dateFormat.value)
+        return new Promise<void>((resolve) => {
+            initData(() => {
+                const marketInfo = APP.get('marketRun').find((e: { marketid: number }) => e.marketid === 0)
+                const yesterday = marketInfo?.pretradedate || moment().add(-1, 'days')
+                time.value = moment(yesterday, dateFormat.value)
+                resolve()
+            })
+        })
     }
     function getFomateType(): reportCyleTimeType {
         const { key } = selectedReportType.value
@@ -43,10 +49,10 @@ export function handleReprotType(context: SetupContext) {
     }
     // 周期类型变更
     function reportTypeChange() {
-        time.value = getInitTime()
-        dateFormat.value = getFomateType()
-        update()
-
+        getInitTime().then(() => {
+            dateFormat.value = getFomateType()
+            update()
+        })
     }
     // 时间变更
     function timeChange() {
@@ -69,14 +75,22 @@ export function handleReprotType(context: SetupContext) {
         const param = { cycletype: selectedReportType.value.key, cycletime: formateTime(), userid: selectedUser.value.key }
         context.emit('update', param)
     }
+
+    getInitTime()
+
     return { selectedReportType, reportType, isMonth, reportTypeChange, dateFormat, time, timeChange, selectedUser, userChange }
 }
 
 export function handleInitTypeAndTime() {
     // 初始化时间
     function getInitTime() {
-        const yesterday = moment().add(-1, 'days')
-        return moment(yesterday).format(reportCyleTimeType.day)
+        return new Promise<string>((resolve) => {
+            initData(() => {
+                const marketInfo = APP.get('marketRun').find((e: { marketid: number }) => e.marketid === 0)
+                const yesterday = marketInfo?.pretradedate || moment().add(-1, 'days')
+                resolve(moment(yesterday).format(reportCyleTimeType.day))
+            })
+        })
     }
     // 初始化类型
     function getInitType() {

+ 17 - 15
src/views/report/spot-report/list/spot_report/index.vue

@@ -106,21 +106,23 @@ export default defineComponent({
     // 获取列表数据
     const queryTableAction = () => {
       const { getInitTime, getInitType } = handleInitTypeAndTime();
-      cycletime = getInitTime();
-      const param: AreaSpotplReportReq = {
-        cycletype: getInitType(),
-        cycletime,
-        querytype: 1,
-        sumflag: 1,
-      };
-      // 获取列表数据
-      queryTable(QryAreaSpotplReport, param).then((res) => {
-        if (res.length) {
-          selectedRow.value = res[0];
-        } else {
-          changeTab(tabIndex.value)
-        }
-      });
+      getInitTime().then((res) => {
+        cycletime = res;
+        const param: AreaSpotplReportReq = {
+          cycletype: getInitType(),
+          cycletime,
+          querytype: 1,
+          sumflag: 1,
+        };
+        // 获取列表数据
+        queryTable(QryAreaSpotplReport, param).then((res) => {
+          if (res.length) {
+            selectedRow.value = res[0];
+          } else {
+            changeTab(tabIndex.value)
+          }
+        });
+      })
     };
     const param: ComposeTableDetailParam = {
       queryFn: queryTableAction, // 查询表格数据

+ 28 - 19
src/views/report/sum_pl_report/list/sum_pl_report/index.vue

@@ -4,16 +4,20 @@
   <mtp-table-scroll>
     <template #default="{ scroll }">
       <a-table :columns="columns" class="srcollYTable" :scroll="scroll" :pagination="false" :rowClassName="rowClassName"
-        :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :rowKey="(record,index)=>index"
+        :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" v-show="cycletype > 0">
-    <!-- 期现比例 -->
-    <template #futurespotratio="{ record }">
-      <span>{{ (record.futurespotratio * 100) + '%' }}</span>
+    <!-- 现货浮动损益 -->
+    <template #spotfloatpl="{ text }">
+      <span>{{ getDecimalsNum(text) }}</span>
+    </template>
+    <!-- 汇总损益 -->
+    <template #sumpl="{ text }">
+      <span>{{ getDecimalsNum(text) }}</span>
     </template>
   </mtp-table-detail>
 </template>
@@ -32,6 +36,7 @@ import { handleInitTypeAndTime } from '@/views/report/setup';
 import { ref, watch } from 'vue';
 import Filter from '../../components/filterTable/index.vue';
 import MtpTableDetail from '@/common/components/tableDetail/index.vue';
+import { getDecimalsNum } from '@/utils/number';
 
 export default defineComponent({
   name: 'sum_pl_report',
@@ -51,20 +56,22 @@ export default defineComponent({
     // 获取列表数据
     const queryTableAction = () => {
       const { getInitTime, getInitType } = handleInitTypeAndTime();
-      cycletime = getInitTime();
-      const param: QryAreaSumPLReq = {
-        cycletype: getInitType(),
-        cycletime,
-        querytype: 1,
-      };
-      // 获取列表数据
-      queryTable(qryAreaSumPL, param).then((res) => {
-        if (res.length) {
-          selectedRow.value = res[0];
-        } else {
-          changeTab(tabIndex.value)
-        }
-      });
+      getInitTime().then((res) => {
+        cycletime = res;
+        const param: QryAreaSumPLReq = {
+          cycletype: getInitType(),
+          cycletime,
+          querytype: 1,
+        };
+        // 获取列表数据
+        queryTable(qryAreaSumPL, param).then((res) => {
+          if (res.length) {
+            selectedRow.value = res[0];
+          } else {
+            changeTab(tabIndex.value)
+          }
+        });
+      })
     };
     const param: ComposeTableDetailParam = {
       queryFn: queryTableAction, // 查询表格数据
@@ -107,13 +114,14 @@ export default defineComponent({
 
       if (selectedRow.value) {
         const data = selectedRow.value as Ermcp3ArealSumPL;
-        const { cycletype, currencyid } = data;
+        const { cycletype, currencyid, middlegoodsid } = data;
         const param: QryAreaSumPLReq = {
           querytype: 2,
           cycletype,
           cycletime,
           currencyid,
           userid: chaceSearchValue.value?.userid,
+          middlegoodsid,
         };
         // 查询明细数据
         queryResultLoadingAndInfo(qryAreaSumPL, loading, param).then((res) => {
@@ -149,6 +157,7 @@ export default defineComponent({
       expandedRowKeys,
       selectedRow,
       rowClassName,
+      getDecimalsNum,
       Rowclick,
       tabList,
       changeTab,