<template>
  <div class="fxOrderProfitLossList">
    <div class="el-card__header">
      <span>损益核算</span>
      <div style="display: flex; flex-direction: row; align-items: center">
        <!---->
        <el-button type="primary" class="el-button--small" @click="Export"
          >导出全部</el-button
        >
      </div>
    </div>

    <div class="content">
      <div style="display: flex; flex-direction: row; align-items: center">
        <span>供应商</span>
        <el-select
          class="w150"
          style="margin-left: 10px"
          v-model="msg.SupplierId"
          filterable
          size="small"
          placeholder="请选择"
          @change="(msg.pageIndex = 1), getTotalOrderProfitLoss()"
        >
          <el-option :key="0" :value="0" label="全部"></el-option>
          <el-option
            v-for="item in options"
            :key="item.ID"
            :label="item.Name"
            :value="item.ID"
          >
          </el-option>
        </el-select>
        <div class="block" style="margin-left: 10px">
          <el-date-picker
            style="padding: 3px 10px; width: 380px; height: 32px"
            v-model="value"
            type="daterange"
            range-separator="至"
            start-placeholder="开始日期"
            end-placeholder="结束日期"
            value-format="yyyy-MM-dd"
            @change="change"
            align="right"
          >
          </el-date-picker>
        </div>
        <span style="margin: 0 10px">订单号</span>
        <el-input
          v-model="msg.OrderNo"
          placeholder="请输入订单号"
          style="width: 200px"
          @keyup.enter.native="(msg.pageIndex = 1), getTotalOrderProfitLoss()"
          clearable
          @clear="(msg.pageIndex = 1), getTotalOrderProfitLoss()"
        ></el-input>
        <!-- ------------ -->
        <span style="margin: 0 10px">单价</span>
        <el-input
          v-model.number="msg.Unit_Price"
          placeholder="请输入单价"
          style="width: 100px"
          type="number"
          :step="0.01"
          @keyup.enter.native="(msg.pageIndex = 1), getTotalOrderProfitLoss()"
          @clear="(msg.pageIndex = 1), getTotalOrderProfitLoss()"
        ></el-input
        >-
        <el-input
          v-model.number="msg.EndUnit_Price"
          placeholder="请输入单价"
          style="width: 100px"
          type="number"
          :step="0.01"
          @keyup.enter.native="(msg.pageIndex = 1), getTotalOrderProfitLoss()"
          @clear="(msg.pageIndex = 1), getTotalOrderProfitLoss()"
        ></el-input>
        <span style="margin: 0 10px">商品名称</span>
        <el-autocomplete
          style="width: 350px"
          v-model="GoodsIDs"
          :fetch-suggestions="remoteMethod"
          placeholder="请输入"
          @select="forceUpdate"
          @blur="spget()"
          :trigger-on-focus="false"
        ></el-autocomplete>
      </div>
      <div style="margin: 10px 0">
        <span style="margin: 0 10px">代理</span>
        <el-autocomplete
          v-model="OneUserId"
          :fetch-suggestions="querySearchAsync"
          placeholder="请输入"
          @select="handleSelect"
          @blur="dlget()"
          :trigger-on-focus="false"
        ></el-autocomplete>
        <span>公司名称</span>
        <el-select
          size="small"
          v-model="msg.CompanyId"
          :filter-method="ChangeListName"
          filterable
          placeholder="请选择"
          @change="(msg.pageIndex = 1), getTotalOrderProfitLoss()"
        >
          <el-option label="不限" :value="0"></el-option>
          <el-option
            v-for="item in companyData"
            :key="item.Id"
            :label="item.Name"
            :value="item.Id"
          >
          </el-option>
        </el-select>
        <div style="float: right">
          <span style="margin: 0 10px">平均毛利:</span>
          <span style="color: #f00">{{ OrderProfitLoss.AvgGrossProfit }}</span>
        </div>
      </div>
    </div>
    <div style="padding: 10px 20px; background: #fff; margin-top: 10px">
      <!--      <div class="Subtotal">-->

      <!--        <div class="Subtotal_item" style="margin:15px">-->
      <!--          <div style='width:100%;border-bottom:1px solid #f2f2f2'>-->
      <!--            <i class="iconfont icon-qian groupTourOrder_count_green" style="font-size:12px"></i>-->
      <!--            <span class='Subtotal_t'>营业收入</span>-->
      <!--          </div>-->
      <!--          <div><span class='Subtotal_t'>结算款:</span>¥{{OrderProfitLoss.TotalFinal_Price}}</div>-->
      <!--          <div><span class='Subtotal_t'>运费收入:</span>¥{{OrderProfitLoss.TotalFreightMoney }}</div>-->
      <!--          <div><span class='Subtotal_t'>已收:</span>¥{{OrderProfitLoss.TotalAllPrice}}</div>-->
      <!--          <div><span class='Subtotal_t'>未收款:</span>¥{{OrderProfitLoss.TotalNoAllPrice }}</div>-->
      <!--          <div><span class='Subtotal_t'>合计数:</span>¥{{OrderProfitLoss.TotalPay}}</div>-->
      <!--        </div>-->
      <!--        <div class="Subtotal_item" style="margin:15px">-->
      <!--          <div style='width:100%;border-bottom:1px solid #f2f2f2'>-->
      <!--            <i class="iconfont icon-qian groupTourOrder_count_green" style="font-size:12px"></i>-->
      <!--            <span class='Subtotal_t'>营业成本</span>-->
      <!--          </div>-->
      <!--          <div class="ProfitLoss">-->
      <!--            <div class="ProfitLoss_xbox">-->
      <!--              <div><span class='Subtotal_t'>采购成本:</span>¥{{OrderProfitLoss.TotalCostMoney }}</div>-->
      <!--&lt;!&ndash;              <div><span class='Subtotal_t'>包装费摊销:</span>¥{{OrderProfitLoss.TotalPackingMoney }}</div>&ndash;&gt;-->
      <!--              <div><span class='Subtotal_t'>运费支出:</span>¥{{OrderProfitLoss.TotalGoodsFreight }}</div>-->
      <!--&lt;!&ndash;              <div><span class='Subtotal_t'>商品运费摊销:</span>¥{{OrderProfitLoss.TotalGoodsFreight }}</div>&ndash;&gt;-->
      <!--             <div><span class='Subtotal_t'>其他:</span>¥{{OrderProfitLoss.TotalOneOtherPrice }}</div>-->
      <!--            </div>-->
      <!--            <div class="ProfitLoss_xbox" style="margin-left:60px">-->
      <!--              <div><span class='Subtotal_t'>合计:</span>¥{{OrderProfitLoss.TotalALLCommission }}</div>-->
      <!--              <div><span class='Subtotal_t'>已付:</span>¥{{OrderProfitLoss.TotalPaid }}</div>-->
      <!--              <div><span class='Subtotal_t'>未付:</span>¥{{OrderProfitLoss.TotalNoPaid }}</div>-->
      <!--              <div><span class='Subtotal_t'>毛利:</span>¥{{OrderProfitLoss.TotalGrossProfit }}</div>-->
      <!--              <div><span class='Subtotal_t'>总返佣:</span>¥{{OrderProfitLoss.TotalFXCommission }}</div>-->
      <!--            </div>-->
      <!--             <div class="ProfitLoss_xbox" style="margin-left:60px">-->
      <!--              <div><span class='Subtotal_t'>已返佣金额:</span>¥{{OrderProfitLoss.TotalRemitFXCommission }}</div>-->
      <!--              <div><span class='Subtotal_t'>已付成本:</span>¥{{OrderProfitLoss.TotalPaidCostMoney }}</div>-->
      <!--              <div><span class='Subtotal_t'>其他实收:</span>¥{{OrderProfitLoss.TotalRealMoney }}</div>-->
      <!--              <div><span class='Subtotal_t'>其他实付:</span>¥{{OrderProfitLoss.TotalPayMoney }}</div>-->
      <!--              <div><span class='Subtotal_t'>优惠金额:</span>¥{{OrderProfitLoss.TotalCouponMoney }}</div>-->

      <!--            </div>-->
      <!--            <div class="ProfitLoss_xbox" style="margin-left:60px">-->

      <!--&lt;!&ndash;              <div><span class='Subtotal_t'>公司结算金额:</span>¥{{OrderProfitLoss.TotalCompanyProfit }}</div>&ndash;&gt;-->

      <!--            </div>-->
      <!--          </div>-->
      <!--        </div>-->

      <!--      </div>-->
    </div>
    <el-table
      :data="tableData"
      v-loading="loading"
      header-cell-class-name="headClass"
      style="width: 100%"
      border
    >
      <el-table-column label="商品信息" align="center">
        <el-table-column
          label="订单号"
          prop="OrderNo"
          width="200"
          :show-overflow-tooltip="true"
        >
          <template slot-scope="scope">
            {{ scope.row.OrderNo }}
            <el-tooltip
              class="item"
              effect="dark"
              content="已取消"
              placement="top"
              v-if="scope.row.OrderStatus == 7"
              style=""
            >
              <i class="el-tooltip el-icon-info" style="color: #ff4048"></i>
            </el-tooltip>
          </template>
        </el-table-column>
        <el-table-column label="规格" width="200" :show-overflow-tooltip="true">
          <template slot-scope="scope">
            {{ scope.row.GoodsName }}{{ scope.row.Specification }}
            <!--<p v-for="(item,index) in scope.row.Specification " :key="index">{{item}}</p>-->
          </template>
        </el-table-column>
        <el-table-column label="单价" prop="Unit_Price"></el-table-column>
        <el-table-column label="数量" prop="Number"></el-table-column>
        <el-table-column
          label="供应商"
          prop="SupplierName"
          width="120"
          :show-overflow-tooltip="true"
        ></el-table-column>
      </el-table-column>

      <el-table-column label="营业收入" align="center">
        <el-table-column label="结算款" prop="Final_Price"></el-table-column>
        <el-table-column label="运费收入" prop="FreightMoney"></el-table-column>
        <el-table-column
          label="保险收入"
          prop="InsuranceMoney"
        ></el-table-column>
        <el-table-column label="已收" prop="AllPrice"></el-table-column>
        <!--结算款-已收-->
        <!--暂时写为0-->
        <!--<p>{{scope.row.Final_Price - scope.row.FreightMoney}}</p>-->
        <!-- <el-table-column label="未收款" >
          <template slot-scope="scope">
            <p>0</p>
          </template>
        </el-table-column> -->
        <el-table-column
          label="其他收入"
          prop="YSMoney"
          width="80"
        ></el-table-column>
        <el-table-column label="合计收入">
          <template slot-scope="scope">
            {{ scope.row.AllPrice + scope.row.YSMoney }}
          </template>
        </el-table-column>
      </el-table-column>

      <el-table-column label="营业成本" align="center">
        <el-table-column label="手续费" prop="ServiceCharge" width="80">
          <template slot-scope="scope">
            <span v-if="scope.row.OrderNo == '小计'"
              >{{
                (
                  scope.row.ServiceCharge - scope.row.ReturnServiceCharge
                ).toFixed(2)
              }}
            </span>
            <span v-else
              >{{ scope.row.ServiceCharge
              }}<span
                style="color: #ff4544"
                v-if="scope.row.ReturnServiceCharge > 0"
                >-{{ scope.row.ReturnServiceCharge }}</span
              >
            </span>
          </template>
        </el-table-column>
        <el-table-column label="采购成本" prop="CostMoney"></el-table-column>

        <el-table-column label="运费支出" prop="GoodsFreight"></el-table-column>
        <el-table-column
          label="保险支出"
          prop="InsuranceCostMoney"
        ></el-table-column>
        <!-- <el-table-column label="已付成本" prop="PaidCostMoney" ></el-table-column> -->
        <el-table-column label="总返佣" prop="FXCommission">
          <template slot-scope="scope">
            <span
              v-if="scope.row.OrderNo == '小计' || scope.row.OrderStatus == 7"
              >{{ scope.row.FXCommission }}</span
            >
            <span
              v-else
              @click="showFXCommission(scope.row)"
              style="color: #409eff; cursor: pointer"
              >{{ scope.row.FXCommission }}</span
            >
          </template>
        </el-table-column>
        <el-table-column
          label="已返佣"
          prop="RemitFXCommission"
          width="70"
        ></el-table-column>
        <el-table-column
          label="订单优惠金额"
          prop="CouponMoney"
          width="70"
        ></el-table-column>
        <el-table-column
          label="退款金额"
          prop="RefundActual"
          width="80"
        ></el-table-column>
        <el-table-column
          label="其他支出"
          prop="YFMoney"
          width="80"
        ></el-table-column>
        <!-- <el-table-column label="其他" prop="OtherPrice" width="70"></el-table-column>
        <el-table-column label="合计" prop="ALLCommission" width="70"></el-table-column> -->
        <el-table-column prop="NoPaid" label="应付"></el-table-column>
        <el-table-column prop="Paid" label="已付"></el-table-column>
      </el-table-column>
      <!-- <el-table-column label="其他" align="center">
        <el-table-column label="其他收入" prop="YSMoney" width="70"></el-table-column>
        <el-table-column label="实收" prop="RealMoney" width="70"></el-table-column>
        <el-table-column label="其他支出" prop="YFMoney" width="70"></el-table-column>
        <el-table-column label="实付" prop="PayMoney" width="70"></el-table-column>
      </el-table-column> -->

      <el-table-column
        prop="TotalDepositMoney"
        label="储值卡抵扣"
      ></el-table-column>
      <el-table-column
        prop="CompanyName"
        label="公司名称"
        width="120"
      ></el-table-column>

      <el-table-column prop="GrossProfit" label="毛利"></el-table-column>
      <!--      <el-table-column label="分公司结算" >-->
      <!--        <template slot-scope="scope">-->
      <!--          <span >{{((scope.row.GrossProfit *scope.row.CompanyProfitRate)/100).toFixed(2)}}</span>-->
      <!--        </template>-->
      <!--      </el-table-column>-->
      <el-table-column prop="GrossProfitRate" label="毛利率" width="100">
        <template slot-scope="scope">
          {{ scope.row.GrossProfitRate }}%
        </template>
      </el-table-column>
    </el-table>
    <el-pagination
      style="text-align: right"
      background
      @current-change="handleCurrentChange"
      :page-size="msg.pageSize"
      :current-page.sync="msg.pageIndex"
      layout="prev, pager, next"
      :total="count"
    >
    </el-pagination>
    <el-dialog title="查看返佣" :visible.sync="czjfDig" width="900px">
      <div class="diaBox" style="">
        <div v-if="itemData.LiveCommission > 0">
          <span>直播总人数:{{ itemData.LivePeopleNum }}人</span>
          <span style="margin-left: 30px"
            >直播总佣金:{{ itemData.LiveCommission }}元</span
          >
        </div>
        <div class="diaBox" style="margin-top: 15px">
          <el-table border :data="CommissionList" style="width: 800px">
            <el-table-column prop="Commission" label="返佣类型">
              <template slot-scope="scope">
                <span v-if="scope.row.CommissionType == 1"
                  >订单返佣:{{ scope.row.Commission }}</span
                >
                <span v-if="scope.row.CommissionType == 2"
                  >供应商返佣:{{ scope.row.Commission }}</span
                >
                <span v-if="scope.row.CommissionType == 3"
                  >微店返佣:{{ scope.row.Commission }}</span
                >
                <span v-if="scope.row.CommissionType == 4"
                  >vip购买返佣:{{ scope.row.Commission }}</span
                >
              </template>
            </el-table-column>
            <el-table-column prop="UserName" label="昵称"> </el-table-column>
            <el-table-column prop="Name" label="名称"> </el-table-column>
          </el-table>
        </div>
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button type="primary" size="small" @click="czjfDig = false"
          >我知道了</el-button
        >
      </span>
    </el-dialog>
  </div>
</template>

<script>
export default {
  name: "fxOrderProfitLossList",
  data() {
    return {
      value: [],
      msg: {
        pageIndex: 1,
        pageSize: 15,
        SupplierId: 0,
        StartDate: "",
        EndDate: "",
        OrderNo: "", //订单号
        GoodsID: 0,
        OneUserId: 0,
        IsFxCommission: 1,
        CompanyId: 0,
        Unit_Price: 0, //单价
        EndUnit_Price: 0, //单价
      },
      CommissionList: [],
      czjfDig: false,
      options: [],
      tableData: [],
      searchList: [],
      companyData: [], //公司列表
      count: 0,
      loading: false,
      GoodsIDs: "", //商品id
      OneUserId: "", //代理
      OrderProfitLoss: {}, //小计
      itemData: {},
    };
  },
  created() {
    if (this.$route.query.year && this.$route.query.month) {
      this.msg.StartDate =
        this.$route.query.year + "-" + this.$route.query.month + "-01";
      var d1 = new Date(this.msg.StartDate);
      var d2 = new Date(d1);
      d2.setMonth(d2.getMonth() + 1);
      d2.setDate(d2.getDate() - 1);
      var month = d2.getMonth() + 1;
      var day = d2.getDate();
      this.msg.EndDate = d2.getFullYear() + "-" + month + "-" + day;
      this.value[0] = this.msg.StartDate;
      this.value[1] = this.msg.EndDate;
    }
    this.getTotalOrderProfitLoss();
    this.getSupplierList();
    this.getCompanyUserList("");
  },
  methods: {
    getDateList() {
      if (this.value != "" && this.value != null) {
        this.msg.StartDate = this.value[0];
        this.msg.EndDate = this.value[1];
      }
      if (!this.msg.Unit_Price || this.msg.Unit_Price == "") {
        this.msg.Unit_Price = 0;
      }
      if (!this.msg.EndUnit_Price || this.msg.EndUnit_Price == "") {
        this.msg.EndUnit_Price = 0;
      }
      this.loading = true;
      this.mallapipost(
        "/api/LiveHouse/GetOrderProfitLossList",
        this.msg,
        (res) => {
          this.loading = false;
          if (res.data.resultCode == 1) {
            if (res.data.data.pageData.length > 0) {
              res.data.data.pageData.push(this.OrderProfitLoss);
            }
            this.tableData = res.data.data.pageData;
            this.count = res.data.data.count;
          } else {
            this.Info(res.data.message);
          }
        }
      );
    },
    getSupplierList() {
      //获取供应商接口
      this.mallapipost("/api/LiveHouse/GetSupplierAllList", {}, (res) => {
        this.loading = false;
        if (res.data.resultCode == 1) {
          this.options = res.data.data;
        }
      });
    },
    showFXCommission(row) {
      this.itemData = row;
      this.mallapipost(
        "/api/LiveHouse/GetOrderCommissionList",
        { TenantId: 1, MallBaseId: 1, OrderDetailId: row.Id },
        (res) => {
          this.loading = false;
          if (res.data.resultCode == 1) {
            this.CommissionList = res.data.data;
          }
        }
      );
      this.czjfDig = true;
    },
    getTotalOrderProfitLoss() {
      if (this.value != "" && this.value != null) {
        this.msg.StartDate = this.value[0];
        this.msg.EndDate = this.value[1];
      }
      if (!this.msg.Unit_Price || this.msg.Unit_Price == "") {
        this.msg.Unit_Price = 0;
      }
      if (!this.msg.EndUnit_Price || this.msg.EndUnit_Price == "") {
        this.msg.EndUnit_Price = 0;
      }
      // this.mallapipost("/api/LiveHouse/GetTotalOrderProfitLoss", this.msg, res => {
      this.mallapipost(
        "/api/LiveHouse/GetTotalOrderProfitLoss_V2",
        this.msg,
        (res) => {
          this.loading = false;
          if (res.data.resultCode == 1) {
            this.OrderProfitLoss = res.data.data;
            this.OrderProfitLoss.OrderNo = "小计";
            this.getDateList();
          }
        }
      );
    },
    getCompanyUserList(Name) {
      this.mallapipost(
        "/api/LiveHouse/GetCompanyUserList",
        { Name: Name },
        (res) => {
          this.loading = false;
          if (res.data.resultCode == 1) {
            this.companyData = res.data.data;
          }
        }
      );
    },
    Export() {
      let msg = this.msg;
      msg = JSON.parse(JSON.stringify(msg));
      this.GetMallLocalFile(
        "/api/LiveHouse/GetFXOrderProfitLossExcel",
        msg,
        "粉象损益核算.xls"
      );
    },
    remoteMethod(query, cb) {
      let results = [];
      if (query !== "" && query.length >= 2) {
        this.mallapipost(
          "/api/LiveHouse/GetGoodsList",
          {
            Name: query,
          },
          (res) => {
            if (res.data.resultCode == 1) {
              res.data.data.forEach((x) => {
                let obj = {
                  value: x.Name,
                  Id: x.Id,
                };
                results.push(obj);
              });
            }
          },
          (err) => {}
        );
      } else {
        this.msg.GoodsID = 0;
        this.msg.pageIndex = 1;
        this.getTotalOrderProfitLoss();
      }
      cb(results);
    },
    forceUpdate(item) {
      if (item) {
        this.msg.GoodsID = item.Id;
      } else {
        this.msg.GoodsID = 0;
      }
      this.msg.pageIndex = 1;
      this.getTotalOrderProfitLoss();
    },
    spget() {
      if (this.GoodsIDs == "") {
        this.msg.GoodsID = 0;
        this.msg.pageIndex = 1;
        this.getTotalOrderProfitLoss();
      }
    },
    querySearchAsync(queryString, cb) {
      let results = [];
      if (queryString !== "" && queryString.length >= 1) {
        this.mallapipost(
          "/api/LiveHouse/GetDistributorInfoList",
          {
            Name: queryString,
          },
          (res) => {
            if (res.data.resultCode == 1) {
              res.data.data.forEach((x) => {
                let obj = {
                  value: x.Name,
                  UserId: x.UserId,
                };
                results.push(obj);
              });
            }
          },
          (err) => {}
        );
      } else {
        this.msg.OneUserId = 0;
        this.msg.pageIndex = 1;
        this.getTotalOrderProfitLoss();
      }
      cb(results);
    },
    handleSelect(item) {
      if (item) {
        this.msg.OneUserId = item.UserId;
      } else {
        this.msg.OneUserId = 0;
      }
      this.msg.pageIndex = 1;
      this.getTotalOrderProfitLoss();
    },
    dlget() {
      if (this.OneUserId == "") {
        this.msg.OneUserId = 0;
        this.msg.pageIndex = 1;
        this.getTotalOrderProfitLoss();
      }
    },
    handleCurrentChange(val) {
      this.msg.pageIndex = val;
      this.getDateList();
    },
    change(val) {
      if (val == null) {
        this.value = "";
        this.msg.StartDate = "";
        this.msg.EndDate = "";
      }
      this.msg.pageIndex = 1;
      this.getTotalOrderProfitLoss();
    },
    ChangeListName(val) {
      this.getCompanyUserList(val);
    },
  },
};
</script>

<style>
.fxOrderProfitLossList .el-card__header {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  padding: 18px 20px;
}

.fxOrderProfitLossList .el-button--small {
  padding: 9px 15px;
}

.fxOrderProfitLossList .content .searchInput {
  border: 1px solid #dcdfe6;
  border-radius: 4px;
  margin-left: 20px;
}

.fxOrderProfitLossList .content .searchInput .el-input__inner {
  border: none;
  outline: none;
  height: 30px;
  line-height: 30px;
}

.fxOrderProfitLossList .content .searchInput {
  line-height: normal;
  display: inline-table;
  border-collapse: separate;
  border-spacing: 0;
  width: 250px;
  margin-right: 20px;
}

.fxOrderProfitLossList .content {
  background: #fff;
  margin-top: 10px;
  padding: 15px;
  box-sizing: border-box;
}

.fxOrderProfitLossList .el-icon-date {
  line-height: 24px;
}

.fxOrderProfitLossList .el-range-separator {
  line-height: 24px;
}

.fxOrderProfitLossList .just {
  color: rgb(104, 207, 61);
}

.fxOrderProfitLossList .negative {
  color: red;
}

.fxOrderProfitLossList .el-input__icon {
  line-height: 24px;
}

.fxOrderProfitLossList .el-table td,
.el-table th {
  padding: 3px 0;
}

.fxOrderProfitLossList .el-table {
  font-size: 13px;
}

.fxOrderProfitLossList .el-select__tags-text {
  display: inline-block;
  width: 40px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fxOrderProfitLossList .el-select__tags {
  max-width: 400px;
}

.fxOrderProfitLossList .Subtotal {
  width: 100%;
  margin: 10px 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  background: #f2f2f2;
  font-size: 12px;
}

.fxOrderProfitLossList .Subtotal_item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-left: 50px;
  background: #fff;
  padding: 20px;
}

.fxOrderProfitLossList .Subtotal_item .Subtotal_t {
  margin: 3px 0;
  font-size: 12px;
  width: 90px;
  display: inline-block;
}

.fxOrderProfitLossList .ProfitLoss {
  display: flex;
  flex-direction: row;
  align-items: center;
  background: #fff;
}

.fxOrderProfitLossList .ProfitLoss_xbox {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  background: #fff;
}
.fxOrderProfitLossList .diaBox {
  display: flex;
  flex-direction: column;
  align-items: center;
}
</style>