<template>
  <div>
    <tableLayout :layout="tablecols" :data="list" :custom="true" height="300px" >
      <template v-slot:customcol="scope">
        <p >{{scope.column.data[scope.column.columnname]}}</p>
      </template>
    </tableLayout>
  </div>
</template>

<script>
export default {
  name: "productPrice",
  data(){
    return {
      tablecols:[],
      list:[],
      param:{
        "id": 20221216134102,
        "content": {
          "itemid": '',
          "pageNumber": 1,
          "pageSize": 20,
          "where": {
            "condition": ""
          }
        },
      }
    }
  },
  methods:{
    async listData(){
      this.param.content.itemid = this.$route.query.id
      const res = await this.$api.requested(this.param)
      this.list = res.data
    }
  },
  mounted() {
    this.listData()
  },
  created() {
    this.tablecols = this.tool.tabelCol(this.$route.name)['commodityPriceGradeTable'].tablecols
  }
}
</script>

<style scoped>

</style>