<template>
  <div>
    <el-drawer :visible.sync="drawer" append-to-body size="60%" :show-close="false" title="促销方案详情">
      <div class="drawer__panel" style="margin-bottom:0;padding:0">
        <el-descriptions :title="data.promname" :column="2" style="padding:20px">
            <el-descriptions-item label="活动开始时间">{{data.begdate}}</el-descriptions-item>
            <el-descriptions-item label="活动结束时间">{{data.enddate}}</el-descriptions-item>
            <!-- <el-descriptions-item label="起订数量">{{data.orderminqty}}</el-descriptions-item>
            <el-descriptions-item label="起订金额">{{data.orderminamount}}</el-descriptions-item>
            <el-descriptions-item label="订单增量">{{data.orderaddqty}}</el-descriptions-item> -->
        </el-descriptions>
        <div class="table">
          <promotionModel v-if="drawer" :data="data" ref="model">
            <template v-slot:product="scope">
                  <productDetail :data="scope.data" ref="productDetail">
                    <template v-slot:promotionPrice="scope">
                        <promotion-price :data="scope.data" ref="promotionPrice">
                          <!-- <template v-slot:editPrice="scope2">
                              <el-button type="text" size="mini" @click="$refs.promotionPrice.currentProduct = scope2.data">编 辑</el-button>
                          </template> -->
                        </promotion-price>
                    </template>
                  </productDetail>
            </template>
          </promotionModel>
        </div>
      </div>
    </el-drawer>
  </div>
</template>

<script>
import promotionModel from '../components/productModel'
import productDetail from '../components/productDetail'
import promotionPrice from '../components/promotionPrice'

export default {
  components:{promotionModel,productDetail,promotionPrice},
  props:['data'],
  name: '',
  data() {
    return {
      drawer:false
    };
  },
  computed:{
  },
  watch:{
  },
  methods: {},
};
</script>

<style scoped>
  .table {
    border-top: 10px solid #FAFAFA;
    padding:20px;
  }
</style>
