| | |
| | | |
| | | //#endregion |
| | | |
| | | table.on('row(mainTable)', function (obj) { |
| | | //éä¸è¡æ¹åé¢è² |
| | | var flag = !obj.tr.find(':checkbox:first').prop('checked'); |
| | | obj.tr.find(':checkbox').prop('checked', flag); |
| | | if (flag) { |
| | | obj.tr.find('.layui-form-checkbox').addClass('layui-form-checked'); //设置å¤éæ¡é䏿 ·å¼ |
| | | $(obj.tr.selector).attr({ "style": "background:#ceedfa;color:black" });//æ¹åå½åtrèæ¯é¢è²ååä½é¢è² |
| | | } else { |
| | | obj.tr.find('.layui-form-checkbox').removeClass('layui-form-checked');//åæ¶å¤éæ¡é䏿 ·å¼ |
| | | $(obj.tr.selector).attr({ "style": "background:" });//åæ¶å½åtré¢è² |
| | | } |
| | | //mainTable ä¸ºè¡¨æ ¼ID æ³¨ææ¤å¤å¦æID䏿£ç¡®å°å¯¼è´ä½ å¨çå¬å¤éæ¡æ¶è·åä¸å°ä½ éæ©çæ°æ®ï¼åé¢çåªæ¯æ·»å æå é¤é䏿ªé䏿 ·å¼ä»¥åè®¾ç½®èæ¯è²ï¼åä½é¢è² |
| | | layui.each(table.cache.mainTable, function (i, l) { |
| | | if (obj.tr.index() == l.LAY_TABLE_INDEX) { |
| | | l.LAY_CHECKED = flag; |
| | | } |
| | | }); |
| | | }) |
| | | |
| | | //#region æ¬é¡µé¢ææè¢«è°ç¨çæ¹æ³ |
| | | |
| | | //åå§åè¡¨æ ¼ |
| | |
| | | elem: '#mainTable' |
| | | , height: 'full-50' |
| | | , page: true |
| | | , limit:500 |
| | | , totalRow: true |
| | | , limits: [100, 500, 1000, 2000] |
| | | , cellMinWidth: 90 |
| | | , cols: [[ |
| | | { type: 'checkbox', fixed: 'left' } |
| | | { type: 'checkbox', fixed: 'left', totalRowText: 'å计' } |
| | | , { field: 'HInterID', title: 'HInterID', sort: true, hide: true, width: 200 } |
| | | , { field: 'HDate', title: 'æ¥æ', width: 200, templet: "<div>{{d.HDate ==null ?'':layui.util.toDateString(d.HDate, 'yyyy-MM-dd HH:mm:ss')}}</div>" } |
| | | , { field: 'HBillNo', title: 'åæ®å·', width: 200 } |
| | |
| | | , { field: 'HMaterCode', title: '产å代ç ', width: 200 } |
| | | , { field: 'HMaterName', title: '产ååç§°', width: 200 } |
| | | , { field: 'HMaterSpec', title: '产åè§æ ¼', width: 200 } |
| | | , { field: 'HQty', title: 'æ±æ¥æ°é', width: 200 } |
| | | , { field: 'HQty', title: 'æ±æ¥æ°é', width: 200, totalRow: true } |
| | | , { field: 'HSourceID', title: 'çäº§èµæºID', width: 200, hide: true } |
| | | , { field: 'HSourceCode', title: 'çäº§èµæºä»£ç ', width: 200 } |
| | | , { field: 'HSourceName', title: 'çäº§èµæº', width: 200 } |