| | |
| | | return true; |
| | | } |
| | | } |
| | | //#region ç¹å»è¡éä¸é«äº® |
| | | 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; |
| | | } |
| | | }); |
| | | }) |
| | | //#endregion |
| | | |
| | | //#region ç¡®å®æé® |
| | | form.on('submit(ToolSure)', function (data) {// |
| | |
| | | { type: 'checkbox', fixed: 'left' } |
| | | , { templet: '#xuhao', title: 'åºå·', sort: true, fixed: 'left', event: "qwe", width: 75 } |
| | | , { field: 'HBarCode', title: 'æ¡ç ç¼å·', width: 200 } |
| | | , { field: 'HQty', title: 'æ¡ç æ°é', width: 200 } |
| | | , { field: 'HSplitNum', title: 'æåæ°é', width: 200, edit: 'text' } |
| | | , { field: 'HQty', title: 'æ¡ç æ°é', width: 200, totalRow: true } |
| | | , { field: 'HSplitNum', title: 'æåæ°é', width: 200, edit: 'text', totalRow: true } |
| | | , { field: 'HNumber', title: 'ç©æä»£ç ', width: 200 } |
| | | , { field: 'HName', title: 'ç©æåç§°', width: 200 } |
| | | , { field: 'HModel', title: 'è§æ ¼åå·', width: 200 } |
| | |
| | | , elem: '#mainTable' |
| | | , toolbar: '#toolbarDemo' |
| | | , page: false |
| | | , totalRow: true |
| | | , cellMinWidth: 75 |
| | | , height: 'full-255' |
| | | , cols: [columns] |
| | |
| | | { type: 'checkbox', fixed: 'left' } |
| | | , { templet: '#xuhao', title: 'åºå·', sort: true, fixed: 'left', event: "qwe", width: 75 } |
| | | , { field: 'HBarCode', title: 'æ¡ç ç¼å·', width: 200 } |
| | | , { field: 'HQty', title: 'æ¡ç æ°é', width: 200 } |
| | | , { field: 'HSplitNum', title: 'æåæ°é', width: 200, edit: 'text' } |
| | | , { field: 'HQty', title: 'æ¡ç æ°é', width: 200, totalRow: true} |
| | | , { field: 'HSplitNum', title: 'æåæ°é', width: 200, edit: 'text', totalRow: true} |
| | | , { field: 'HNumber', title: 'ç©æä»£ç ', width: 200 } |
| | | , { field: 'HName', title: 'ç©æåç§°', width: 200 } |
| | | , { field: 'HModel', title: 'è§æ ¼åå·', width: 200 } |
| | |
| | | , elem: '#mainTable_New' |
| | | , toolbar: '#toolbarDemo_New' |
| | | , page: false |
| | | , totalRow: true |
| | | , cellMinWidth: 75 |
| | | , height: 'full-255' |
| | | , cols: [columns] |