<template>
  <div style="padding:0 20px 20px 20px;">
      <div style="font-size:16px;">订单利润核算表</div>
      <div class="Team_Content" v-loading="loading">
          <el-row :gutter="12" v-if="d">
            <el-col :span="5">
              <div class="Team_DList">
                <div class="Team_firstTitle">
                  <span class="Team_comCoinType Team_shou">
                    <i class="iconfont icon-qian"></i>
                  </span>团费收入
                </div>
                <div class="Team_Incontent">
                  <div>应收：<span>￥{{DataList.TeamBalance.ShouldReceive}}</span></div>
                  <div>实收：<span class="Team_Coins">￥{{DataList.TeamBalance.ActualReceive}}</span></div>
                  <div>待收：<span class="Team_Coins">￥{{DataList.TeamBalance.WaitRecive}}</span></div>
                  <div>
                    注：应收=订单应收总额，实收=订单实收总额
                  </div>
                </div>
              </div>
            </el-col>
            <el-col :span="4">
              <div class="Team_DList">
                <div class="Team_firstTitle">
                  <span class="Team_comCoinType Team_shou">
                    <i class="iconfont icon-qian"></i>
                  </span>其他
                </div>
                <div class="Team_Incontent">
                  <div>应收：<span>￥{{moneyFormat(moneyAll.otheryTotalyf)}}</span></div>
                  <div>实收：<span class="Team_Coins">￥{{moneyFormat(moneyAll.otheryTotalsf)}}</span></div>
                   <div>待收：<span class="Team_Coins">￥{{moneyFormat(moneyAll.otheryTotalyf-moneyAll.otheryTotalsf)}}</span></div> 
                  <div>
                    注：此处不进入'利润'计算，单纯只统计除团费外的其他总收入
                  </div>
                </div>
              </div>
            </el-col>
            <el-col :span="5">
              <div class="Team_DList">
                <div class="Team_firstTitle">
                  <span class="Team_comCoinType Team_zhichu">
                    <i class="iconfont icon-qian"></i>
                  </span>支出
                </div>
                <div class="Team_Incontent">
                  <div>应付：<span>￥{{DataList.TeamBalance.ShouldPay}}</span></div>
                  <div>实付：<span class="Team_Coins">￥{{DataList.TeamBalance.ActualPay}}</span></div>
                  <div>待付：<span class="Team_Coins">￥{{DataList.TeamBalance.WaitPay}}</span></div>
                  <div>
                    注：成本单据总额(包含退款)+提成-小费收入-地接收入
                  </div>
                </div>
              </div>
            </el-col>
            <el-col :span="5">
              <div class="Team_DList">
                <div class="Team_firstTitle">
                  <span class="Team_comCoinType Team_lirun">
                    <i class="iconfont icon-qian"></i>
                  </span>利润（计算规则请看注解）
                </div>
                <div class="Team_Incontent">
                  <div>实际利润：<span>￥{{DataList.TeamBalance.ExpectedProfit}}</span></div>
                  <div>当前利润：<span class="Team_Coins">￥{{DataList.TeamBalance.ActualProfit}}</span></div>
                  <div>
                    注：实收-(应付/实付)+佣金收入+自费收入+其他收入
                    -联运成本+挂账总收入-挂账总支出+冲抵总收入-冲抵总支出
                  </div>
                </div>
              </div>
            </el-col>
            <el-col :span="4">
              <div class="Team_DList">
                <div class="Team_firstTitle">
                  <span class="Team_comCoinType Team_lirun">
                    <i class="iconfont icon-qian"></i>
                  </span>提成
                </div>
                <div class="Team_Incontent" style="margin-bottom:0;">
                    <div class="TeamExpectList">
                      <template v-for="subItem in DataList.ExpectedCutList">
                        <div style="margin-bottom:5px;">{{subItem.BranchName}} ￥{{subItem.expectedCut}} </div>
                      </template>
                    </div>
                  </div>
                  <div>联运成本：<span>￥{{DataList.LYCB}}</span></div>
                  <div>额外返佣：<span>￥{{DataList.EWFY}}</span></div>
                  <div>OP提成：<span>￥{{DataList.OpCommMoney}}</span></div>
                  <div>票务提成：<span>￥{{DataList.AirCommMoney}}</span></div>
              </div>
            </el-col>
          </el-row>
        </div>
  </div>
</template>

<script>
export default {
  props: ["orderId"],
  data() {
    return {
      loading: true,
      d: null,
    };
  },
  methods: {
    init() {
      this.apipost2(
        "crm_post_GetCRMGuestOrderCheck",
        { OrderId: this.orderId },
        (res) => {
          if (res.data.resultCode == 1) {
            this.d = res.data.data;
            console.log(d);
          }
        },
        (err) => {}
      );
    },
  },
};
</script>

<style>
</style>
