{
    template:'${tmpl}',
    data:function(){
        return {
          multipleSelection: [],
          isSingleSelect:false,
          cc:"ddddfsdfsd",
        }
    },
    mounted:function(){
      /*var msg={
        cls:"testCtl",
        method:"test",
        data:"hello",
      };
      this.socketClient.socketReplyReq(msg,function(rtn){
        console.log("rtn socket**************************************888888...................................................");
        console.log(rtn);
      });*/
    },
    created:function(){

    },
    methods:{
       handleSelectionChange:function(val){
         this.multipleSelection = val;
         console.log(this.cc);
       },
       headerCellStyle:function(){
         return {"background-color":"red"};
       },
       onColFormater(row,column,cellvalue,index){
         if(column.property=="isEnabled"){
           if(row["isEnabled"]){
             return "是";
           }else{
             return "否";
           }
         }

         if(column.property=="isOrderReceiving"){
           if(row["isOrderReceiving"]){
             return "是";
           }else{
             return "否";
           }
         }
         return cellvalue;
       },
       onDlgFormClick(k, model){
         if(k=="mysave"){
           var that=this;
           that.$refs.channelmanageallotGrid.$refs.dlgform.validate((valid)=>{
              if(valid){
                this.$root.postReq("/web/channelmanageallotCtl/mysave", model).then(rd=>{
                  if(rd.status==0){
                      that.$message({
                        type: 'success',
                        message: '保存成功!'
                      });
                      that.$refs.channelmanageallotGrid.showLeft();
                      that.$refs.channelmanageallotGrid.status="common";
                      that.$refs.channelmanageallotGrid.fetchData();
                  } else {
                    console.log(rd);
                    this.$message({
                      type: 'success',
                      message: rd.msg+',保存失败!'
                    });
                  }
                });
              }else{
                console.log("表单验证不过......");
              }
           });
         }
       },
       vfmethod:function(rule, value, callback) {
         var model = this.$refs.channelmanageallotGrid.getFormModel();
         if(rule.field=="mobile"){
           if(/^1[23456789]\d{9}$/.test(value) == false){
              return callback(new Error("请输入正确的手机号"));
           }
         }

         if(rule.field=="leaderMobile"){
           if(/^1[23456789]\d{9}$/.test(value) == false){
              return callback(new Error("请输入正确的手机号"));
           }
         }
         return callback();
       },
    },
    computed:{
      headStyle:function(){
        return {"background-color":"white"};
      }
    },
    vname:"gsb-channelmanageallotGrid"
}
