<template>
  <el-dialog :close-on-click-modal="false" v-dialogDrag rechargeTypeId="form" width="75vw" title="明细" :visible.sync="dialogFormVisible" :before-close="handleClose">
    <el-form :model="form" inline ref="form" label-width="100px">
      <el-form-item label="转出手机号：" prop="rollOutMobilePhone">
        <div class="form-width-ms">
          {{form.rollOutMobilePhone}}
        </div>
      </el-form-item>
      <el-form-item label="转出会员：" prop="rollOutMemberName">
        <div class="form-width-ms">
          {{form.rollOutMemberName}}
        </div>
      </el-form-item>
      <el-form-item label="转入手机号：" prop="rollInMobilePhone">
        <div class="form-width-ms">
          {{form.rollInMobilePhone}}
        </div>
      </el-form-item>
      <el-form-item label="转入会员：" prop="rollInMemberName">
        <div class="form-width-ms">
          {{form.rollInMemberName}}
        </div>
      </el-form-item>
      <el-table border :data="list" max-height="500" ref="list" :header-cell-style="{background: 'linear-gradient(#6cb3ff, #1873d4)',color:'#eeeeee'}">
        <el-table-column show-overflow-tooltip min-width="120" align="left" prop="rechargeOrProjectNum" label="编码"></el-table-column>
        <el-table-column show-overflow-tooltip min-width="120" align="left" prop="rechargeOrProjectName" label="名称"></el-table-column>
        <el-table-column show-overflow-tooltip min-width="80" align="left" prop="type" label="类型">
          <template slot-scope="scope">
            {{scope.row.type==0?'充值卡':'疗程卡'}}
          </template>
        </el-table-column>
        <!-- <el-table-column show-overflow-tooltip min-width="75" align="center" label="剩余金额">
          <template slot-scope="scope">
            <div>{{scope.row.type==0?scope.row.cardRestMoney:scope.row.courseRestPrice}}</div>
          </template>
        </el-table-column> -->
        <el-table-column show-overflow-tooltip min-width="75" align="center" label="可用金额">
          <template slot-scope="scope">
            <div>{{scope.row.type==0?scope.row.cardConsumeMoney:scope.row.courseConsumePrice}}</div>
          </template>
        </el-table-column>
        <el-table-column show-overflow-tooltip min-width="80" align="center" prop="cardGiftMoney" label="赠送金额"></el-table-column>
        <!-- <el-table-column show-overflow-tooltip min-width="75" align="center" prop="courseRestCount" label="剩余次数"></el-table-column> -->
        <el-table-column show-overflow-tooltip min-width="75" align="center" prop="courseConsumeCount" label="可用次数"></el-table-column>
        <el-table-column show-overflow-tooltip min-width="100" align="center" prop="outCardRestMoney" label="转出金额">

        </el-table-column>
        <el-table-column show-overflow-tooltip min-width="100" align="center" prop="outGiftConsumeMoney" label="转出赠送">

        </el-table-column>
        <el-table-column show-overflow-tooltip min-width="100" align="center" prop="outCourseRestCount" label="转出次数">

        </el-table-column>
      </el-table>

    </el-form>
    <div slot="footer" class="dialog-footer">
      <el-button size="mini" type="primary" plain @click="handleClose">关闭</el-button>
    </div>
  </el-dialog>
</template>
<script>
export default {
  data() {
    return {
      form: {},
      list: [],
      dialogFormVisible: false, //弹窗开关
    };
  },
  methods: {
    //组件传值
    show(form) {
      this.form = { ...form };
      this.list = form.turnMembershipCardMxList;
      this.dialogFormVisible = true;
    },
    //关闭弹窗前的回调方法
    handleClose() {
      this.form = {};
      this.dialogFormVisible = false;
      this.$refs.form.clearValidate();
    },
  },
};
</script>

<style>
</style>
