...
|
...
|
@@ -27,7 +27,28 @@ var promotionEdit={ |
|
|
return _checkBox;
|
|
|
},
|
|
|
getParam:function(){
|
|
|
var batchIds=this.batchIds;
|
|
|
|
|
|
var _buildCheckboxHtml =
|
|
|
function (item) {
|
|
|
var htmlContent = "";
|
|
|
var _class="wqt_checkbox";
|
|
|
if(this.batchIds.length === 0 ){
|
|
|
//htmlContent = "<input type='checkbox' class='wqt_checkbox' data-index='"+item.__index+"'>";
|
|
|
htmlContent = this.buildCheckboxHtml(_class,item.__index);
|
|
|
}else{
|
|
|
$.each(this.batchIds,function(n,value) {
|
|
|
if(item.id == value){
|
|
|
//htmlContent = "<input type='checkbox' checked='checked' class='wqt_checkbox' data-index='"+item.__index+"'>";
|
|
|
htmlContent = this.buildCheckboxHtml(_class,item.__index,"checked");
|
|
|
return false
|
|
|
}else{
|
|
|
htmlContent = "<input type='checkbox' class='wqt_checkbox' data-index='"+item.__index+"'>";
|
|
|
htmlContent = this.buildCheckboxHtml(_class,item.__index);
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
return htmlContent;
|
|
|
};
|
|
|
var param={
|
|
|
el: '#basicTable_promotion',
|
|
|
size: 10,
|
...
|
...
|
@@ -43,24 +64,7 @@ var promotionEdit={ |
|
|
display: '',
|
|
|
type: 'checkbox',
|
|
|
render: function (item) {
|
|
|
var htmlContent = "";
|
|
|
var _class="wqt_checkbox";
|
|
|
if(batchIds.length == 0 ){
|
|
|
htmlContent = "<input type='checkbox' class='wqt_checkbox' data-index='"+item.__index+"'>";
|
|
|
//htmlContent = this.buildCheckboxHtml(_class,item.__index);
|
|
|
}else{
|
|
|
$.each(batchIds,function(n,value) {
|
|
|
if(item.id == value){
|
|
|
htmlContent = "<input type='checkbox' checked='checked' class='wqt_checkbox' data-index='"+item.__index+"'>";
|
|
|
//htmlContent = this.buildCheckboxHtml(_class,item.__index,"checked");
|
|
|
return false
|
|
|
}else{
|
|
|
htmlContent = "<input type='checkbox' class='wqt_checkbox' data-index='"+item.__index+"'>";
|
|
|
//htmlContent = this.buildCheckboxHtml(_class,item.__index);
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
return htmlContent;
|
|
|
return _buildCheckboxHtml(item);
|
|
|
}
|
|
|
},{
|
|
|
display: "ID",
|
...
|
...
|
|