<template>
  <div class="app-container">


    <!-- 评论回复 -->
    <el-dialog :visible.sync="isShow"  width='1000px' title="SKU详情">
      <el-table  :data="list"  >
        <el-table-column property="id" width="100" label="SKUID" />
        <el-table-column property="value" label="货品规格">
          <template slot-scope="scope1">

            <el-tag>
              {{ scope1.row.specifications[0] }}
            </el-tag>
          </template>
        </el-table-column>
        <el-table-column property="price" width="100" label="实际售卖价" />
        <el-table-column property="counterPrice" width="100" label="市场售价" />
        <el-table-column property="number" width="100" label="货品数量" />
 
 
        <el-table-column property="salesNumber" label="已售库存" />
        <el-table-column property="serviceTimes" label="服务次数" />
        <el-table-column property="serviceDuration" label="服务时长" />
        <el-table-column property="timeRange" label="服务时段" width="130px">
          <template slot-scope="scope1">
            <div v-for="(item, index) in scope1.row.timeRange" :key="index">
              {{ item }}</div>
          </template>
        </el-table-column>
        <!-- <el-table-column property="url" width="100" label="货品图片">
          <template slot-scope="scope1">
            <img v-if="scope1.row.url" :src="scope1.row.url" width="40">
          </template>
        </el-table-column> -->
        <el-table-column property="disType" label="是否显示">
          <template slot-scope="scope1">
            <el-tag>{{ scope1.row.deleted ? '否' : '是' }}</el-tag>
          </template>
        </el-table-column>
      </el-table>
      <div slot="footer" class="dialog-footer">
        <el-button @click="isShow = false">关闭</el-button> 
      </div>
    </el-dialog>

  </div>
</template>

<script>
import { getProduct } from '@/api/goods'
import Pagination from '@/components/Pagination' // Secondary package based on el-pagination

export default {
  name: 'Comment',
  components: { Pagination },
  data() {
    return {
      list: [],
      isShow: false
    }
  },
  created() {

  },
  methods: {
    showDetail(goodsId) { 
      this.isShow=true;
      getProduct({ goodsId: goodsId }).then(response => {
        this.list = response.data.data; 
      }).catch(() => {
        this.list = []
        this.total = 0

      })
    },


  }
}
</script>
