| | |
| | | <div class="layui-card-body" style="padding: 1px;"> |
| | | <form class="layui-form" action="" lay-filter="formData" style="background-color:white;"> |
| | | <div style="padding: 10px; "> |
| | | <!--<button class="layui-btn layui-btn-normal" type="button" lay-submit="" lay-filter="CheckAll" id="CheckAll">å
¨é</button> |
| | | <button class="layui-btn layui-btn-normal" type="button" lay-submit="" lay-filter="ClearBill" id="ClearBill">å
¨æ¸
</button> |
| | | <button class="layui-btn layui-btn-normal" type="button" lay-submit="" lay-filter="btnSave" id="btnSave">ä¿å</button> |
| | | <button class="layui-btn layui-btn-normal" type="button" lay-submit="" lay-filter="Exit" id="Exit">éåº</button>--> |
| | | <button class="layui-btn layui-btn-normal" type="button" lay-submit="" lay-filter="Exit" id="Exit">éåº</button> |
| | | </div> |
| | | <div class="layui-collapse"> |
| | | <div class="layui-colla-item"> |
| | |
| | | //è·ååæ° |
| | | var params = getUrlVars(); |
| | | var HSetMainModName = params[params[0]]; //表头å 载模ååç§° |
| | | HSetMainModName = "PM_WorkTaskBill"; |
| | | var HTableName = ""; //主表å |
| | | var HDataViewName = params[params[1]]; //è§å¾å |
| | | var HDataProcName = params[params[2]]; //åå¨è¿ç¨å |
| | | var HRowElementCount = params[params[3]]; //æ¯è¡å
ç´ æ° |
| | | var HTableName = params[params[1]]; //主表å |
| | | var HDataViewName = params[params[2]]; //è§å¾å |
| | | var HDataProcName = params[params[3]]; //åå¨è¿ç¨å |
| | | var HRowElementCount = params[params[4]]; //æ¯è¡å
ç´ æ° |
| | | |
| | | var HUserName = sessionStorage["HUserName"]; //ç¨æ·å |
| | | |
| | | var HInterID = 0; |
| | | //å
ç´ IDä¸å
ç´ æ°æ®ç±»å对ç
§å表 |
| | | var HFieldDataTypeForElementID = []; |
| | | |
| | |
| | | //#endregion |
| | | //#endregion |
| | | |
| | | //#region 䏿æ¡è§¦åäºä»¶ç¸å
³çå¬ |
| | | //#region è¡¨æ ¼è¡éæ©å¤çï¼å
ç´ IDï¼ |
| | | form.on('select(HElementID)', function (data) { |
| | | //è·å䏿æ¡éä¸çå¼ |
| | | var elem = data.othis.parents('tr'); |
| | | var dataindex = elem.attr("data-index"); |
| | | $.each(option.data, function (index, value) { |
| | | if (index == dataindex) { |
| | | value.HElementID = data.value;//æéä¸ä¸ææ¡idå¼èµå¼ç»è¡¨æ ¼ç¼å |
| | | for (var i = 0; i < HFieldDataTypeForElementID.length; i++) { |
| | | if (value.HElementID == HFieldDataTypeForElementID[i].HElementID) { |
| | | value.HFieldDataType = HFieldDataTypeForElementID[i].HFieldDataType; |
| | | value.HElementIDAdditionalName = value.HElementID; |
| | | $('#HFieldDataType' + (index+1) + '').val(value.HFieldDataType); |
| | | form.render('select'); |
| | | table.render(option); |
| | | //æ ¹æ®optionä¸çæ°æ®ï¼è®¾ç½®å表ä¸ç䏿å表ãå¤éæ¡ |
| | | setSelectByTableRender(); |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | }); |
| | | }); |
| | | //#endregion |
| | | |
| | | //#region è¡¨æ ¼è¡éæ©å¤çï¼ç¶çº§å
ç´ IDï¼ |
| | | form.on('select(HParentElementID)', function (data) { |
| | | //è·å䏿æ¡éä¸çå¼ |
| | | var elem = data.othis.parents('tr'); |
| | | var dataindex = elem.attr("data-index"); |
| | | $.each(option.data, function (index, value) { |
| | | if (index == dataindex) { |
| | | value.HParentElementID = data.value;//æéä¸ä¸ææ¡idå¼èµå¼ç»è¡¨æ ¼ç¼å |
| | | } |
| | | }); |
| | | }); |
| | | //#endregion |
| | | |
| | | //#region è¡¨æ ¼è¡éæ©å¤çï¼ç»ä»¶ç±»åï¼ |
| | | form.on('select(HElementType)', function (data) { |
| | | //è·å䏿æ¡éä¸çå¼ |
| | | var elem = data.othis.parents('tr'); |
| | | var dataindex = elem.attr("data-index"); |
| | | $.each(option.data, function (index, value) { |
| | | if (index == dataindex) { |
| | | value.HElementType = data.value;//æéä¸ä¸ææ¡idå¼èµå¼ç»è¡¨æ ¼ç¼å |
| | | } |
| | | }); |
| | | }); |
| | | //#endregion |
| | | |
| | | //#region è¡¨æ ¼è¡éæ©å¤çï¼å段åï¼ |
| | | form.on('select(HFieldName)', function (data) { |
| | | //è·å䏿æ¡éä¸çå¼ |
| | | var elem = data.othis.parents('tr'); |
| | | var dataindex = elem.attr("data-index"); |
| | | $.each(option.data, function (index, value) { |
| | | if (index == dataindex) { |
| | | value.HFieldName = data.value;//æéä¸ä¸ææ¡idå¼èµå¼ç»è¡¨æ ¼ç¼å |
| | | } |
| | | }); |
| | | }); |
| | | //#endregion |
| | | |
| | | //#region è¡¨æ ¼è¡éæ©å¤çï¼æ°æ®ç±»åï¼ |
| | | form.on('select(HFieldDataType)', function (data) { |
| | | //è·å䏿æ¡éä¸çå¼ |
| | | var elem = data.othis.parents('tr'); |
| | | var dataindex = elem.attr("data-index"); |
| | | $.each(option.data, function (index, value) { |
| | | if (index == dataindex) { |
| | | value.HFieldDataType = data.value;//æéä¸ä¸ææ¡idå¼èµå¼ç»è¡¨æ ¼ç¼å |
| | | } |
| | | }); |
| | | }); |
| | | //#endregion |
| | | //#endregion |
| | | |
| | | //#region æä½æé®ç¸å
³çå¬ |
| | | //#region ä¿åæäº¤ |
| | | form.on('submit(btnSave)', function (data) {//æäº¤ |
| | |
| | | "HIsDisabled": false, |
| | | "HIsMust": false, |
| | | "HElementID": "", |
| | | "HElementIDAdditionalName": "", |
| | | "HElementLabel": "", |
| | | "HElementType": "", |
| | | "HFieldMaxLength": "0", |
| | |
| | | |
| | | //#region åå§åçé¢ |
| | | function set_ClearBill() { |
| | | getBaseDataByURLParams(); |
| | | ////æ ¹æ®urlåæ°è·åå 载页é¢çæ°æ®[主表åãè§å¾åãåå¨è¿ç¨å] |
| | | //getBaseDataByURLParams(); |
| | | |
| | | //åå§åå表 |
| | | set_InitGrid(); |
| | | |
| | | setSelectInit(); |
| | | //æ¥è¯¢åå²è®¾ç½®è®°å½ï¼è®¾ç½®å表 |
| | | if (RoadBillMain() == true) { |
| | | |
| | | } else { |
| | | //åå§åå表ä¸ç䏿å表 |
| | | setSelectInit(); |
| | | } |
| | | } |
| | | //#endregion |
| | | |
| | |
| | | , { type: 'numbers', title: 'åºå·', width: 100 } |
| | | , { field: 'HArrangeOrder', title: 'ä¸çº§æ¬¡åº', width: 100, edit: true } |
| | | , { field: 'HArrangeOrderSub', title: 'äºçº§æ¬¡åº', width: 100, edit: true } |
| | | , { field: 'HParentElementID', title: 'ç¶çº§å
ç´ ID', width: 100, edit: true } |
| | | , { field: 'HParentElementID', title: 'ç¶çº§å
ç´ ID', width: 100, templet: '#HParentElementID' } |
| | | , { field: 'HIsHide', title: 'éè', width: 100, templet: '#HIsHide' } |
| | | , { field: 'HIsDisabled', title: 'ç¦ç¨', width: 100, templet: '#HIsDisabled' } |
| | | , { field: 'HIsMust', title: 'å¿
å¡«', width: 100, templet: '#HIsMust' } |
| | | , { field: 'HElementID', title: 'å
ç´ ID', width: 100, templet: '#HElementID' } |
| | | , { field: 'HElementLabel', title: 'å
ç´ æ ç¾', width: 100, templet: '#HElementLabel' } |
| | | , { field: 'HElementIDAdditionalName', title: 'å
ç´ IDéå åæ®µ', width: 100, edit: true, event:"HElementIDAdditionalName" } |
| | | , { field: 'HElementLabel', title: 'å
ç´ æ ç¾', width: 100, edit: true } |
| | | , { field: 'HElementType', title: 'å
ç´ ç±»å', width: 100, templet: '#HElementType' } |
| | | , { field: 'HFieldMaxLength', title: 'æå¤§é¿åº¦', width: 100, edit: true } |
| | | , { field: 'HDefaultValue', title: 'é»è®¤å¼', width: 100, edit: true } |
| | |
| | | "HIsDisabled": false, |
| | | "HIsMust": false, |
| | | "HElementID": "", |
| | | "HElementIDAdditionalName": "", |
| | | "HElementLabel": "", |
| | | "HElementType": "", |
| | | "HFieldMaxLength": "0", |
| | |
| | | option.data = rowdata; |
| | | table.render(option); |
| | | |
| | | //è®¾ç½®ä¸æå表åå¤éæ¡ |
| | | //æ ¹æ®optionä¸çæ°æ®ï¼è®¾ç½®å表ä¸ç䏿å表ãå¤éæ¡ |
| | | setSelectByTableRender(); |
| | | } |
| | | //#endregion |
| | |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | //#endregion |
| | | |
| | | //#region æ¥è¯¢åå²è®¾ç½®è®°å½ï¼è®¾ç½®å表 |
| | | function RoadBillMain() { |
| | | var returnResult = false; |
| | | var ajaxLoad = layer.load(); |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Xt_DefineBillMainSet/getDefineBillMainSet', |
| | | type: "GET", |
| | | async: false, |
| | | data: { "HModName": HSetMainModName, "user": sessionStorage["HUserName"] }, |
| | | success: function (data1) { |
| | | if (data1.count == 1) { |
| | | var data = data1.data; |
| | | |
| | | if (data.length > 0) { |
| | | for (var i = 0; i < data.length; i++) { |
| | | if (data[i].HUser == sessionStorage["HUserName"]) { |
| | | HInterID = data[i].HInterID; |
| | | } |
| | | |
| | | data[i].HElementIDAdditionalName = data[i].HElementID; |
| | | } |
| | | } |
| | | |
| | | option.data = data; |
| | | table.render(option); |
| | | |
| | | |
| | | |
| | | //æ ¹æ®optionä¸çæ°æ®ï¼è®¾ç½®å表ä¸ç䏿å表ãå¤éæ¡ |
| | | setSelectByTableRender(); |
| | | layer.close(ajaxLoad); |
| | | |
| | | DisPlay_HideColumn(); |
| | | |
| | | returnResult = true; |
| | | } else { |
| | | layer.close(ajaxLoad); |
| | | } |
| | | }, error: function () { |
| | | layer.close(ajaxLoad); |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }); |
| | | return returnResult; |
| | | } |
| | | //#endregion |
| | | |
| | |
| | | //è·å䏿å表çåè¡¨æ°æ® |
| | | for (var key in data1.list) { |
| | | if ($.inArray(data1.list[key].ColmCols, HElementIDList) == -1) { |
| | | HElementIDList.push(data1.list[key].ColmCols); |
| | | } |
| | | |
| | | if ($.inArray(data1.list[key].ColmType, HFieldDataTypeList) == -1) { |
| | | HFieldDataTypeList.push(data1.list[key].ColmType); |
| | | |
| | | HFieldDataTypeForElementID.push({ |
| | | "HElementID": data1.list[key].ColmCols |
| | | , "HFieldDataType": data1.list[key].ColmType |
| | | }) |
| | | |
| | | HElementIDList.push(data1.list[key].ColmCols); |
| | | if ($.inArray(data1.list[key].ColmType, HFieldDataTypeList) == -1) { |
| | | HFieldDataTypeList.push(data1.list[key].ColmType); |
| | | } |
| | | } |
| | | } |
| | | //æ ¹æ®ä¸æå表çåè¡¨æ°æ®ï¼è®¾ç½®ä¸æå表çå表 |
| | |
| | | |
| | | //#region ç¶çº§å
ç´ ID |
| | | function setSelectInit_HParentElementID() { |
| | | |
| | | var HElementIDList = ["HBaseInfo", "HFileInfo","HOtherInfo"]; |
| | | var HProTypeList = ["åºæ¬ä¿¡æ¯","éä»¶ä¿¡æ¯","å
¶ä»ä¿¡æ¯"]; |
| | | for (var i = 0; i < option.data.length; i++) { |
| | | var Organization = ""; |
| | | Organization += '<option style="color:blue;" selected="selected" value=""></option>'; |
| | | for (var j = 0; j < HProTypeList.length; j++) { |
| | | Organization += '<option style="color:blue;" value="' + HElementIDList[j] + '">' + HProTypeList[j] + '</option>'; |
| | | } |
| | | $('#HParentElementID' + (i + 1) + '').empty(); |
| | | $('#HParentElementID' + (i + 1) + '').append(Organization); |
| | | } |
| | | form.render('select'); |
| | | } |
| | | //#endregion |
| | | |
| | |
| | | |
| | | //#region åæ®µå |
| | | function setSelectInit_HFieldName() { |
| | | $.ajax({ |
| | | type: "get", |
| | | async: false, |
| | | url: GetWEBURL() + "/Xt_DefineBillMainSet/getColsListByName", |
| | | data: { "HName": HDataViewName }, |
| | | success: function (data1) { |
| | | if (data1.count == 1) { // 说æéªè¯æåäºï¼ |
| | | var HFieldNameList = []; //åæ®µå䏿åè¡¨æ°æ® |
| | | //è·å䏿å表çåè¡¨æ°æ® |
| | | for (var key in data1.list) { |
| | | if ($.inArray(data1.list[key].ColmCols, HFieldNameList) == -1) { |
| | | HFieldNameList.push(data1.list[key].ColmCols); |
| | | } |
| | | } |
| | | |
| | | //æ ¹æ®ä¸æå表çåè¡¨æ°æ®ï¼è®¾ç½®ä¸æå表çå表 |
| | | for (var i = 0; i < option.data.length; i++) { |
| | | var Organization = ""; |
| | | Organization += '<option style="color:blue;" selected="selected" value=""></option>'; |
| | | for (var j = 0; j < HFieldNameList.length; j++) { |
| | | Organization += '<option style="color:blue;" value="' + HFieldNameList[j] + '">' + HFieldNameList[j] + '</option>'; |
| | | } |
| | | $('#HFieldName' + (i + 1) + '').empty(); |
| | | $('#HFieldName' + (i + 1) + '').append(Organization); |
| | | } |
| | | |
| | | form.render('select'); |
| | | } else { |
| | | |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | //#endregion |
| | | |
| | |
| | | //#region æ¤é¡µé¢ææçæ¹æ³ |
| | | |
| | | //#region æä½æé®è°ç¨æ¹æ³ |
| | | //#region æ¥è¯¢ |
| | | function get_Display() { |
| | | var ajaxLoad = layer.load(); |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Xt_ModuleButtonSet_WMES/moduleButtonSetWMESList', |
| | | type: "GET", |
| | | data: { "HModName": HModName, "HBillType": HBillType, "HUserName": HUserName }, |
| | | success: function (data1) { |
| | | var btnIdLists = btnIdList.split(','); //ç¸å¯¹åæ®ä¼ è¿æ¥çæé®id |
| | | var btnNameLists = btnNameList.split(','); //ç¸å¯¹åæ®ä¼ è¿æ¥çæé®åç§° |
| | | var btnOrderLists = btnOrderList.split(','); //ç¸å¯¹åæ®ä¼ è¿æ¥çæé®æ¬¡åº |
| | | var data = []; //éè¦ä¼ è¿è¡¨æ ¼çæ°æ® |
| | | |
| | | no_edit = []; //æ¸
空ä¸å¯ç¼è¾æé®çä¿¡æ¯å表 |
| | | |
| | | for (var i = 0; i < btnIdLists.length; i++) { |
| | | for (var j = 0; j < data1.count; j++) { |
| | | if (btnIdLists[i] == data1.data[j]["HButtonID"]) { |
| | | if (data1.data[j]["HEditFlag"] == false) { |
| | | no_edit.push({ "HBillType": data1.data[j]["HBillType"], "HModuleName": data1.data[j]["HModuleName"], "HButtonID": data1.data[j]["HButtonID"], "HButtonName": data1.data[j]["HButtonName"], "HOrder": data1.data[j]["HOrder"], "HHideFlag": data1.data[j]["HHideFlag"], "HEditFlag": data1.data[j]["HEditFlag"], "HOtherName": data1.data[j]["HOtherName"] }); |
| | | } else { |
| | | data.push({ "BtnID": btnIdLists[i], "BtnName": btnNameLists[i], "IsHide": data1.data[j]["HHideFlag"], "HOrder": btnOrderLists[i], "HOtherName": data1.data[j]["HOtherName"] }); |
| | | } |
| | | break; |
| | | } |
| | | } |
| | | if (data.length + no_edit.length == i) { |
| | | data.push({ "BtnID": btnIdLists[i], "BtnName": btnNameLists[i], "IsHide": false, "HOrder": btnOrderLists[i], "HOtherName": "" }); |
| | | } |
| | | } |
| | | option.data = data; |
| | | table.render(option); |
| | | |
| | | //页é¢å¤éæ¡ éæ°æ¸²æ |
| | | for (var i = 0; i < btnIdLists.length; i++) { |
| | | for (var j = 0; j < data1.count; j++) { |
| | | if (btnIdLists[i] == data1.data[j]["HButtonID"] && data1.data[j]["HHideFlag"] == true) { |
| | | $("#IsHide" + (i + 1)).attr("checked", true); |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | form.render('checkbox'); |
| | | layer.close(ajaxLoad); |
| | | }, error: function () { |
| | | layer.close(ajaxLoad); |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }); |
| | | } |
| | | //#endregion |
| | | |
| | | //#region ä¿å |
| | | //#region ä¿åæ¹æ³ |
| | | function set_AddNew(data) { |
| | | data.field.HInterID = HInterID; |
| | | data.field.HModName = HSetMainModName; |
| | | data.field.HUser = sessionStorage["HUserName"]; |
| | | data.field.HTableName = HTableName; |
| | | data.field.HDataViewName = HDataViewName; |
| | | data.field.HDataProcName = HDataProcName; |
| | | data.field.HRowElementCount = HRowElementCount; |
| | | |
| | | var tableData = []; //è·åè¡¨æ ¼æ°æ® |
| | | var btnIdLists = btnIdList.split(','); //ç¸å¯¹åæ®ä¼ è¿æ¥çæé®id |
| | | var btnNameLists = btnNameList.split(','); //ç¸å¯¹åæ®ä¼ è¿æ¥çæé®åç§° |
| | | var btnOrderLists = btnOrderList.split(',');//ç¸å¯¹åæ®ä¼ è¿æ¥çæé®æ¬¡åº |
| | | //è·åè¡¨æ ¼æ°æ® |
| | | for (var i = 0; i < table.cache["mainTable"].length; i++) { |
| | | if (table.cache["mainTable"][i] != "") { |
| | | table.cache["mainTable"][i].LAY_TABLE_INDEX = i; |
| | | tableData.push(table.cache["mainTable"][i]) |
| | | //åºåå表头信æ¯ååè¡¨ä¿¡æ¯ |
| | | var sMainStr = JSON.stringify(data.field); |
| | | var sSubStr = JSON.stringify(option.data); |
| | | //æ¼æ¥åæ° |
| | | var sMainSub = sMainStr + ';' + sSubStr + ";" + sessionStorage["HUserName"]; |
| | | |
| | | |
| | | //æ´æ°æ¬¡åºå表 |
| | | var index_temp = $.inArray(table.cache["mainTable"][i].BtnID, btnIdLists); |
| | | if (index_temp != -1) { |
| | | btnOrderLists[index_temp] = (table.cache["mainTable"][i].HOrder == "" ? 0 : table.cache["mainTable"][i].HOrder); |
| | | } |
| | | } |
| | | } |
| | | |
| | | //å°æ°ç»åºåå为å符串ï¼ä¼ éç»å端 |
| | | var sTableData = JSON.stringify(tableData); |
| | | var sBtnIdLists = JSON.stringify(btnIdLists); |
| | | var sBtnNameLists = JSON.stringify(btnNameLists); |
| | | var sBtnOrderLists = JSON.stringify(btnOrderLists); |
| | | var sNo_EditLists = JSON.stringify(no_edit); |
| | | |
| | | |
| | | //æ¼æ¥éè¦ä¼ éçåæ° |
| | | var sMainSub = sTableData + ';' + sBtnIdLists + ';' + sBtnNameLists + ';' + sBtnOrderLists + ';' + HModName + ';' + HBillType + ";" + sNo_EditLists + ";" + HUserName; |
| | | var index = layer.load(); |
| | | $.ajax({ |
| | | type: "POST", |
| | | url: GetWEBURL() + "/Xt_ModuleButtonSet_WMES/AddModuleButtonSetWMES", |
| | | url: GetWEBURL() + "/Xt_DefineBillMainSet/SaveXt_DefineBillMainSet", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | | async: true, |
| | | data: { "sMainSub": sMainSub }, |
| | | data: { "msg": sMainSub }, |
| | | dataType: "json", |
| | | success: function (data) { |
| | | if (data.count == 1) { |
| | | if (data.count == 1) { // 说æéªè¯æåäºï¼ |
| | | layer.msg(data.Message, { icon: 1 }); |
| | | layer.close(index); |
| | | layer.msg("æäº¤æå"); |
| | | } |
| | | else { |
| | | layer.alert(data.Message, { icon: 5 }); |
| | | layer.close(index); |
| | | layer.msg(data.Message, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | } |
| | | }, |
| | | error: function (err) { |
| | | layer.alert("é误:" + err, { icon: 5 }); |
| | | layer.close(index); |
| | | layer.msg("é误:" + err, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨æç¤º" }); |
| | | } |
| | | }); |
| | | } |
| | |
| | | //#endregion |
| | | |
| | | //#region å表ç¸å
³æ¹æ³ |
| | | //#region æ ¹æ®optionä¸çæ°æ®ï¼è®¾ç½®å表ä¸ç䏿å表 |
| | | //#region æ ¹æ®optionä¸çæ°æ®ï¼è®¾ç½®å表ä¸ç䏿å表ãå¤éæ¡ |
| | | function setSelectByTableRender() { |
| | | //䏿æ¡å表åå§å |
| | | setSelectInit(); |
| | | |
| | | for (var i = 1; i <= option.data.length; i++) { |
| | | $('#HElementID' + i + '').val(option.data[i - 1].HElementID); |
| | | $('#HParentElementID' + i + '').val(option.data[i - 1].HParentElementID); |
| | |
| | | option.data[i - 1] = data[0]; |
| | | option.data[i] = tables[0]; |
| | | table.render(option); |
| | | |
| | | //æ ¹æ®optionä¸çæ°æ®ï¼è®¾ç½®å表ä¸ç䏿å表ãå¤éæ¡ |
| | | setSelectByTableRender(); |
| | | |
| | | break; |
| | | } |
| | | } |
| | |
| | | option.data[i + 1] = data[0]; |
| | | option.data[i] = tables[0]; |
| | | table.render(option); |
| | | |
| | | //æ ¹æ®optionä¸çæ°æ®ï¼è®¾ç½®å表ä¸ç䏿å表ãå¤éæ¡ |
| | | setSelectByTableRender(); |
| | | break; |
| | | } |
| | | } |
| | |
| | | table.cache["mainTable"].push(NewRow); |
| | | option.data = table.cache["mainTable"]; |
| | | table.render(option); |
| | | |
| | | //æ ¹æ®optionä¸çæ°æ®ï¼è®¾ç½®å表ä¸ç䏿å表ãå¤éæ¡ |
| | | setSelectByTableRender(); |
| | | //rows++; |
| | | layer.msg('å¢å ä¸è¡æé®ï¼') |
| | | //layer.msg('å¢å ä¸è¡æé®ï¼') |
| | | } |
| | | //#endregion |
| | | |
| | |
| | | } |
| | | option.data = tables; |
| | | table.render(option); |
| | | |
| | | //æ ¹æ®optionä¸çæ°æ®ï¼è®¾ç½®å表ä¸ç䏿å表ãå¤éæ¡ |
| | | setSelectByTableRender(); |
| | | } else { |
| | | layer.msg('è¯·éæ©ä¸è¡æ°æ®ç¼è¾ï¼'); |
| | | } |
| | |
| | | option.data[option.data.length - 1].HWeight = "0"; |
| | | |
| | | table.render(option);//å°æ°æ®æ¸²æå°è¡¨æ ¼ä¸ |
| | | |
| | | //æ ¹æ®optionä¸çæ°æ®ï¼è®¾ç½®å表ä¸ç䏿å表ãå¤éæ¡ |
| | | setSelectByTableRender(); |
| | | } |
| | | } |
| | | //#endregion |
| | |
| | | } |
| | | }) |
| | | } |
| | | //#endregion |
| | | |
| | | //#region çå¬åå
æ ¼ç¼è¾ åå
æ ¼ç¼è¾å åæ´ |
| | | table.on('edit(mainTable)', function (obj) { |
| | | //æ°å¼æ ¼å¼æ ¡éªå·¥å
· |
| | | var ref = /^\d+(\.\d+)?$/; //éè´æ°æ£åè¡¨è¾¾å¼ |
| | | var temp = ""; |
| | | |
| | | // åå
æ ¼ç¼è¾ä¹åçå¼ |
| | | var oldText = $(this).prev().text(); |
| | | var value = obj.value //å¾å°ä¿®æ¹åçå¼ |
| | | , data = obj.data //å¾å°æå¨è¡ææé®å¼ |
| | | , field = obj.field; //å¾å°å段 |
| | | |
| | | switch (field) { |
| | | case "HElementIDAdditionalName": //å
ç´ IDéå åæ®µ |
| | | obj.update({ |
| | | HElementID: "" |
| | | , HFieldDataType: "" |
| | | }); |
| | | table.render(option); |
| | | //æ ¹æ®optionä¸çæ°æ®ï¼è®¾ç½®å表ä¸ç䏿å表ãå¤éæ¡ |
| | | setSelectByTableRender(); |
| | | break; |
| | | default: |
| | | } |
| | | }); |
| | | //#endregion |
| | | |
| | | //#region å表1ï¼éèå设置 |
| | |
| | | } |
| | | } |
| | | table.render(option); |
| | | |
| | | //æ ¹æ®optionä¸çæ°æ®ï¼è®¾ç½®å表ä¸ç䏿å表ãå¤éæ¡ |
| | | setSelectByTableRender(); |
| | | } else { |
| | | table.render(option); |
| | | |
| | | //æ ¹æ®optionä¸çæ°æ®ï¼è®¾ç½®å表ä¸ç䏿å表ãå¤éæ¡ |
| | | setSelectByTableRender(); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |