{
  template: '${tmpl}',
    data: function() {
      return {
        supplymaterail: {
          user_type: 'person',

        }
      }
    },
  mounted: function() {
    var that = this;
    var obj = this.$router.history.current.query;
    this.$root.postReq("/web/transfer/tradetransferCtl/findone", obj).then(function (d) {
      if (d.status > -1) {
        debugger;
        that.supplymaterail = d.data;
        if (!that.supplymaterail.user_type) {
          that.supplymaterail.user_type = "ent";
        }
      }
    })


  },
  created: function() {
    /* if(this.codePath.indexOf("appuser")>=0){
       this.bizCode="appuser";
     }else{
       this.bizCode="allusers";
     }*/
  },
  methods: {
    validateformmethod(rule, value, cbk){
      return cbk();
    },
    onDlgFormClick(key){
      debugger;
      var self=this;
       if(key=='mysave'){
        this.$root.postReq("/web/transfer/tradetransferCtl/update", this.supplymaterail).then(function (d) {
          if (d.status > -1) {
            history.go(-1)
          }
        })
       }
       if(key=='alisubmit'){
        /* 如果当前状态等于 待服务商重新提交资料 ，审核驳回后服务商修改资料后重新提交接口*/
        if(this.supplymaterail.transfer_status != 'MATERIALS_TO_BE_SUBMITTED'){
           this.supplymaterail.transfer_status="PROVIDE_MATERIAL";
           this.$root.postReq("/web/transfer/tradetransferCtl/submit", this.supplymaterail).then(function (d) {
               if (d.status > -1) {
                   history.go(-1);
               }else{
                   if(d.msg){
                       self.$message.warning("提交失败:"+d.msg);
                   }else {
                       self.$message.warning("提交失败。");
                   }
               }
           })
        }else{
           this.$root.postReq("/web/transfer/tradetransferCtl/submit", this.supplymaterail).then(function (d) {
               if (d.status > -1) {
                   history.go(-1);
               }else{
                   if(d.msg){
                       self.$message.warning("提交失败:"+d.msg);
                   }else {
                       self.$message.warning("提交失败。");
                   }
               }
           })
        }
       }
    },
    onColFormater(row, column, cellvalue, index){


      return cellvalue;
    },

  

    handleSelectionChange: function(val) {
      this.multipleSelection = val;
      console.log(val);
    },
    fetchData: function() {

    },
    onRowClick(row, key, e){
      if (key == "upfiles") {
        this.showUploadform = true;
      }
    },
    upsuccess(result){
      console.log(result);
    }
  },
  computed: Vuex.mapState({
    headStyle: function () {
      return { "background-color": "white" };
    }
  }),
    vname: "gsb-mynotarizationflow"
}
