const util = require('../../../utils/util.js');
Component({
  properties: {
    info:{
      type: Object,
      obserover:function(newVal){
        this.setData({ info: newVal });
      }
    },
    show:{
      type: Boolean,
      obserover: function (newVal){
        this.setData({ show: newVal });
      }
    },
    status:{
      type: Number,
      obserover: function (newVal){
        this.setData({ status: newVal });
      }
    },
    presellOpen:{
      type: Number,
      obserover: function (newVal){
        this.setData({ presellOpen: newVal });
      }
    },
    gdiscount:{
      type: Object,
      obserover:function(newVal){
        this.setData({ gdiscount: newVal });
      }
    }
  },
  data: {
    show:false,
    height:'85%',
    FixHeight:'85%',
    info:{
      createGroup: 0,
      otype: 0,
      price: 0.00
    },
    presellOpen:0,
    status:0,
    gdiscount:{
      items:[],
      type:0
    }
  },
  methods: {
    submit(){
      this.setData({ show: false });
      this.triggerEvent("close",{show:this.data.show,pop:true});
    },
    salesReminder(){
      this.setData({ show: false });
      this.triggerEvent("salesReminder",false);
    }
  }
})
