<table id="CodeGoodsTable" data-mobile-responsive="true" data-click-to-select="true" lay-filter="demoEvent>
<thead>
<tr>
<th data-field="selectItem" data-checkbox="true"></th>
</tr>
</thead>
</table>
<script>
var CodeGoods = {id: "CodeGoodsTable",seItem: null,table: null,layerIndex: -1};
CodeGoods.initColumn = function () {
return [
{field: 'selectItem', checkbox: true},
{title: '编号', field: 'rmid', visible: true, align: 'center', valign: 'middle'},
{title: '名称', field: 'rwname', visible: true, align: 'center', valign: 'middle'},
{title: '手机号', field: 'utel1', visible: true, align: 'center', valign: 'middle'},
{title: '分配状态', field: 'ufpcnt', visible: true, align: 'center', valign: 'middle',formatter:CodeGoods.ufpcntFormatter},
];
};
//双击事件
$('#CodeGoodsTable').on('dbl-click-row.bs.table', function (e, row, element){
alert(row.utel1);
return false;
//parent.$("#param").val(row.utel1)
// alert(parent.$("#param").val());
});
//单击事件
$('#CodeGoodsTable').on('click-row.bs.table', function (e, row, element){
alert(row.utel1);
//parent.$("#param").val(row.utel1)
// alert(parent.$("#param").val());
});
CodeGoods.ufpcntFormatter = function(value,row,index) {
if(value !== null){
if(value > 0){
return '已分配';
}else{
return '未分配';
}
}
}
</script>