| | |
| | | .custom-tree-item-clicked { |
| | | color: #FC9003 |
| | | } |
| | | .layui-form-label { |
| | | width: 40px; |
| | | padding: 9px 5px; |
| | | } |
| | | |
| | | .layui-input-block { |
| | | margin-left: 50px; |
| | | } |
| | | </style> |
| | | </head> |
| | | <body> |
| | |
| | | |
| | | <div class="layui-form-item" style="border-top: solid 1px #F6F6F6;"> |
| | | <div class="layui-row" style="padding:10px 0"> |
| | | <div class="layui-col-xs3 layui-inline" style="width: 23%;"> |
| | | <div class="layui-col-xs3 layui-inline" style="width: 23%;display:none;"> |
| | | <div id="treeCheckItem" lay-filter="treeCheckItem" class="demo-tree demo-tree-box" style="height: 520px; overflow: scroll;"></div> |
| | | </div> |
| | | <div class="layui-col-xs9 layui-inline"> |
| | | <div class="layui-col-xs12 layui-inline"> |
| | | <div class="layui-row"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">代ç </label> |
| | |
| | | var option = []; |
| | | let that = this; |
| | | //#endregion |
| | | |
| | | |
| | | //#region è¿å
¥é¡µé¢å³å è½½ |
| | | //åå§åå è½½æ å |
| | | tree.render({ |
| | | elem: '#treeCheckItem', |
| | | data: getData(sWhere), |
| | | showCheckbox: false, //æ¯å¦æ¾ç¤ºå¤éæ¡ |
| | | id: 'demoId', |
| | | isJump: false, //æ¯å¦å
许ç¹å»èç¹æ¶å¼¹åºæ°çªå£è·³è½¬ |
| | | showLine: true,//æ¯å¦å¼å¯è¿æ¥çº¿ |
| | | onlyIconControl: true, //ç¹å»å䏿¶ç¼© |
| | | click: function (obj) { |
| | | //ç¹å»é«å
|
| | | if (obj.data.id !== treeCkData.id) { |
| | | $('div[data-id="' + obj.data.id + '"] span').eq(1).last().addClass("custom-tree-item-clicked"); |
| | | $('div[data-id="' + treeCkData.id + '"] span').eq(1).last().removeClass('custom-tree-item-clicked'); |
| | | treeCkData = obj.data; |
| | | TagId = obj.data.id; |
| | | TagParentId = obj.data.ParentID; |
| | | Level = obj.data.HLevel + 1; |
| | | } |
| | | else { |
| | | $('div[data-id="' + treeCkData.id + '"] span').eq(1).last().removeClass('custom-tree-item-clicked'); |
| | | treeCkData = { id: 0 }; |
| | | TagId = ""; |
| | | TagParentId = ""; |
| | | Level = "1"; |
| | | } |
| | | //tree.render({ |
| | | // elem: '#treeCheckItem', |
| | | // data: getData(sWhere), |
| | | // showCheckbox: false, //æ¯å¦æ¾ç¤ºå¤éæ¡ |
| | | // id: 'demoId', |
| | | // isJump: false, //æ¯å¦å
许ç¹å»èç¹æ¶å¼¹åºæ°çªå£è·³è½¬ |
| | | // showLine: true,//æ¯å¦å¼å¯è¿æ¥çº¿ |
| | | // onlyIconControl: true, //ç¹å»å䏿¶ç¼© |
| | | // click: function (obj) { |
| | | // //ç¹å»é«å
|
| | | // if (obj.data.id !== treeCkData.id) { |
| | | // $('div[data-id="' + obj.data.id + '"] span').eq(1).last().addClass("custom-tree-item-clicked"); |
| | | // $('div[data-id="' + treeCkData.id + '"] span').eq(1).last().removeClass('custom-tree-item-clicked'); |
| | | // treeCkData = obj.data; |
| | | // TagId = obj.data.id; |
| | | // TagParentId = obj.data.ParentID; |
| | | // Level = obj.data.HLevel + 1; |
| | | // } |
| | | // else { |
| | | // $('div[data-id="' + treeCkData.id + '"] span').eq(1).last().removeClass('custom-tree-item-clicked'); |
| | | // treeCkData = { id: 0 }; |
| | | // TagId = ""; |
| | | // TagParentId = ""; |
| | | // Level = "1"; |
| | | // } |
| | | |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Gy_ModelType/cx', |
| | | type: "GET", |
| | | data: { "HInterID": obj.data.id }, |
| | | success: function (data1) { |
| | | if (data1.count == 1) { |
| | | option.data = data1.data; |
| | | table.render(option); |
| | | layer.close(index); |
| | | } else { |
| | | layer.close(index); |
| | | layer.alert(data1.code + data1.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.close(index); |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | // $.ajax({ |
| | | // url: GetWEBURL() + '/Gy_ModelType/cx', |
| | | // type: "GET", |
| | | // data: { "HInterID": obj.data.id }, |
| | | // success: function (data1) { |
| | | // if (data1.count == 1) { |
| | | // option.data = data1.data; |
| | | // table.render(option); |
| | | // layer.close(index); |
| | | // } else { |
| | | // layer.close(index); |
| | | // layer.alert(data1.code + data1.Message, { icon: 5 }); |
| | | // } |
| | | // }, error: function () { |
| | | // layer.close(index); |
| | | // layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | // } |
| | | // }); |
| | | // } |
| | | //}); |
| | | |
| | | //åå§åè¡¨æ ¼ |
| | | set_ClearBill(); |
| | |
| | | option = { |
| | | elem: '#mainTable' |
| | | //, toolbar: '#toolbarDemo' |
| | | , height: '500' |
| | | , height: 'full-50' |
| | | , page: true |
| | | , cellMinWidth: 90 |
| | | , cols: [[ |