<template>
  <info-con title="销售信息：" class="sale-info-con">
    <div class="item">
      <label class="label">销售价格：</label>
      <Input v-model="data.originalPrice" :readonly='isDetail' type="number" style="width: 400px;">
      </Input>
    </div>
    <!-- <div class="item">
      <label class="label">商品重量：</label>
      <Input v-model="data.weight" :readonly='isDetail' type="number" style="width: 400px;">
      </Input>
    </div> -->
    <div class="item">
      <label class="label">NFT销售方式：</label>
      <RadioGroup v-model="data.nftSalesType">
        <Radio :label="1" style="width:200px" :disabled="isDetail || isEdit || isAgain">原商品销售</Radio>
        <Radio :label="2" style="width:200px" :disabled="isDetail || isEdit || isAgain">使用权销售</Radio>
      </RadioGroup>
    </div>
    <div class="item" v-if="data.nftSalesType==2">
      <label class="label">拷贝数量：</label>
        <Input v-model="data.stock" :readonly='isDetail || isEdit|| isAgain' style="width: 400px;">
      </Input>
    </div>
  </info-con>
</template>

<script>
import InfoCon from './info-con'
import FileUpload from '_c/file-upload'
import config from '@/config'
// import { deepCopy } from '@/utils/common'
import axios from 'axios'
const baseUrl =
  process.env.NODE_ENV === 'development'
    ? config.baseUrl.dev
    : config.baseUrl.pro
export default {
  props: {
    data: {
      type: Object,
      default: { sku: [] },
      commodityPass: 3,
      originalPrice: '',
      // weight: '',
      nftSalesType: '',
      stock: ''
    },
    isDetail: {
      type: Boolean,
      default: false
    },
    isEdit: {
      type: Boolean,
      default: false
    },
    // isSelf: {
    //   type: Boolean,
    //   default: false
    // },
    isAgain: {
      type: Boolean,
      default: false
    },
    status: ''

  },
  watch: {
    // salesType (val) {
    //   // console.log('111', val)
    //   if (val == 2) {
    //     this.propList = [{ outToken: '', valList: [{ val: '' }] }]
    //   }
    // },
    // status (val) {
    //   // console.log('111', val)
    //   if (val == 3 || val == 2) {
    //     this.data.salesType = 1
    //   }
    // }
  },
  components: {
    InfoCon,
    FileUpload
  },
  data () {
    return {
      propList: [{ outToken: '', valList: [{ val: '' }] }],
      showTable: false,
      columns: []
    }
  },
  computed: {
    platform () {
      return this.$store.state.admin.type == 1 || this.$store.state.admin.type == 4
    }
  },
  mounted () {
    this.showTable = true
    setTimeout(() => {
    })
  },
  methods: {
  }
}
</script>

<style lang="less">
.sale-info-con {
  .item {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
  }
  .item .label {
    width: 140px;
    margin-right: 10px;
    text-align: right;
  }
  .item .property-con {
    flex: 1;
    padding: 20px;
    border: 1px solid #dcdee2;
    border-radius: 5px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
  }
  .item .property-con .add-btn {
    width: 100%;
  }
  .del-con {
    margin-left: 5px;
    cursor: pointer;
  }
  .item .property-item {
    width: 240px;
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    padding-right: 30px;
    .prop-val {
      flex: 1;
    }
  }
  .item .pack-con {
    width: 800px;
    // flex: 1;
    padding: 20px;
    border: 1px solid #dcdee2;
    border-radius: 5px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
  }
  .item .pack-con .add-btn {
    width: 100%;
  }
  .item .pack-item {
    // width: 240px;
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    padding-right: 30px;
    .prop-val {
      flex: 1;
    }
  }

  .item .empty {
    width: 150px;
  }
  .item .opt-btn {
    flex: 1;
    display: flex;
    justify-content: space-between;
  }
  .tip {
    color: #ed4014;
    font-size: 12px;
    margin: 20px 0 5px 0;
  }
  .token-label {
    font-size: 14px;
  }

  .item .time{
    display: flex;
    justify-content: space-around;
  }

}
</style>
