{
  template: '${tmpl}',
    data: function() {
      return {
        multipleSelection: [],
        isSingleSelect: false,
        bizCode: 'mytradetransferdiliver',
        showUploadform: false,
        f1: "",
        trackVisable:false,
        trackContent:"",
        trackRecords:[
    
        ]
      }
    },
  mounted: function() {



  },
  created: function() {
    /* if(this.codePath.indexOf("appuser")>=0){
       this.bizCode="appuser";
     }else{
       this.bizCode="allusers";
     }*/
  },
  methods: {
    validateformmethod(rule, value, cbk){
      return cbk();
    },
    onDlgFormClick(k, model){
      var that=this;
      if (k = "alisubmit") {
        debugger;
        if(model.transfer_status=="PAY_OVER" || model.transfer_status=="MATERIAL_PROVIDE"){
          that.$message.warning("状态不可修改");
          return;
        }
        this.$root.postReq("/web/transfer/tradetransferCtl/submit", model).then(function (d) {
          if (d.status > -1) {
            $("[name='grdid']").show();
            $("[name='frmid']").hide();
            that.$message({
              type: 'success',
              message: '提交成功!'
            });
          }else{
            $("[name='grdid']").show();
            $("[name='frmid']").hide();
            that.$message.warning("提交失败");
          }
        })
      }
    },
    onColFormater(row, column, cellvalue, index){
      /*这里解析跟进字段，解析为数组，取最后一条*/
      console.log(column);
      return cellvalue;
    },
    handleSelectionChange: function(val) {
      this.multipleSelection = val;
      console.log(val);
    },
    fetchData: function() {

    },
    onRowClick(row, key, e){
      if (key == "upfiles") {
        console.log(this.$router);
        this.$router.push({ path: "/tansfersupplymaterail", query: { ali_bizid: row.ali_bizid } });

      }
      if (key == "notar") {
        console.log(this.$router);
        this.$router.push({ path: "/mynotarizationflow", query: { ali_bizid: row.ali_bizid } });
      }
      if(key=="tracks"){
        this.trackVisable=true;
        if(this.trackRecords.length==0){
          this.trackRecords.push({"trackDate":"暂无跟进","trackContent":"请联系客户，进行跟进"});
        }
      }
    },
    upsuccess(result){
      console.log(result);
    },
    showdetail(){
      alert("track.......details");
    },
    cancelClick(){
      this.trackVisable=false;
    },
    saveClick(){
      let pushData={"pushData":{"trackDate":new Date().toLocaleString(),"trackContent":this.trackContent}};
      var self=this;
      this.$root.postReq("/web/transfer/tradetransferCtl/track", pushData).then(function (d) {
        /*返回整个跟进字段，解析为数组*/
         self.trackRecords.push(d.data);
        
      })
      
    }
  },
  computed: Vuex.mapState({
    headStyle: function () {
      return { "background-color": "white" };
    }
  }),
    vname: "gsb-tradetransferdiliver"
}
