交易所前端蓝色ui 4.5 jiem
jhzh
2025-05-19 c5487881d04780e03f4dd86ed1606c587f2c7952
修改: 保证金 、 手续费 字段展示
2 files modified
30 ■■■■ changed files
src/components/constract/PerpetualContract/createOrder.vue 21 ●●●●● patch | view | raw | blame | history
src/components/constract/PerpetualContract/positionCom/currentPosition.vue 9 ●●●● patch | view | raw | blame | history
src/components/constract/PerpetualContract/createOrder.vue
@@ -144,7 +144,7 @@
            <!-- 保证金 -->
            <div class="submit-info-item">
              <div>{{ $t("message.home.baozhengjin") }}:</div>
              <div>{{ getMargin }} {{ unit }}</div>
              <div>{{ getMargins }} {{ unit }}</div>
            </div>
            <!-- 手续费 -->
            <div class="submit-info-item">
@@ -313,6 +313,23 @@
      }
      return bigDecimal.round(data, 2);
    },
    getMargins: function () {
      const amount = this.inputAmount;
      let data = "0.00";
      if (
        this.isActive === 0 &&
        amount != undefined &&
        this.lever_rate.length != undefined &&
        this.sessionObj.amount
      ) {
        if (this.lever_rate.length > 0) {
          data = this.sessionObj.amount * amount ;
        } else if (this.lever_rate.length == 0) {
          data = this.sessionObj.amount * amount * 1;
        }
      }
      return bigDecimal.round(data, 2);
    },
    // 获取保证金,开仓才需要
    getMargin: function () {
      const amount = this.inputAmount;
@@ -337,7 +354,7 @@
      let data = "0.00";
      if (amount && this.isActive == 0) {
        // 每手的数量*多少手(张)*每手的手续费
        data = amount * this.sessionObj.fee;
        data = amount * this.current_lever_rate_num * this.sessionObj.fee;
      }
      return bigDecimal.round(data, 2);
    },
src/components/constract/PerpetualContract/positionCom/currentPosition.vue
@@ -108,9 +108,9 @@
          label: "message.home.baozhengjin",
        },
        {
          prop: "profit",
          prop: "change_ratio",
          label: "message.user.weishixianyingkui(shouyilv)",
          formatter: this.formatterData,
          formatter: this.formatterDatas,
        },
      ],
      tableData: [],
@@ -146,6 +146,11 @@
      const profit = Number(row.profit).toFixed(4);
      return `${profit}(${ratio})`;
    },
    formatterDatas(row) {
      const ratio = row.change_ratio+'%' ;
      const profit = Number(row.profit).toFixed(4);
      return `${profit}(${ratio})`;
    },
    //设置单个单元格样式   行下标:rowIndex    列下标:columnIndex
    cellStyle({ row, column, rowIndex, columnIndex }) {
      if (columnIndex == 6) {