Coder Social home page Coder Social logo

easyui-datagird-'s People

easyui-datagird-'s Issues

easyui datagrid 复选框批量

function selectRow(index, row) {
var btnApproveObj = $("#btnBatchOutApprove");
if($("#datagridMsgpkg").datagrid('getChecked').length > 0) {
btnApproveObj.linkbutton("enable");
}
else {
btnApproveObj.linkbutton("disable");
}
}

function batchOutApprove(){
	var selRows = $("#datagridMsgpkg").datagrid('getChecked');
	if(outerBatchApproveCheck(selRows[0].msgpkgCode,selRows[0].msgpkgUid)){
		for(var i=0;i<selRows.length;i++){
			postUrl("msgpkg/auditApprove?msgpkgUid=" + selRows[i].msgpkgUid);
		}
		$.messager.alert("提示", "操作成功");
		execDraftQuery();
	}
	
}
$("#datagridMsgpkg").datagrid({
	onLoadSuccess:function (row){
		for(var i=0;i<row.rows.length;i++){
			if(row.rows[i].mpDataStatus !='2'){
				$(".datagrid-row[datagrid-row-index=" + i + "] input[type='checkbox']")[0].disabled = true;
			}
		}
	},  
    onClickRow : function(rowIndex, rowData) {  
        if (rowData.mpDataStatus != '2') {  
            $(this).datagrid('uncheckRow', rowIndex);  
           
        }
    }, 
    onCheckAll: function(rows) {  
    	var _this=this;
        $("input[type='checkbox']").each(function(index, el) {  
            if (el.disabled) {  
                $(_this).datagrid('uncheckRow', index - 1);
            }  
        });  
        selectRow();
     }
});	

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.