| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100 | 
							- /// <reference path="../../easyui/jquery.easyui.min.js" />
 
- function initAddFun() {
 
-     $("#hid_UserType").val("add");
 
-     $("#cFunctionID").textbox("readonly",false);
 
-     $('#cNames').textbox("setValue", "");
 
-     $("#cURL").textbox("setValue", "");
 
-     //$("#labCreateUser2").html("");
 
-     //$("#labCreateDate2").html("");
 
-     $("#txtPageName").val("");
 
-     $("#lsIsFront").switchbutton('uncheck');
 
-     $("#lsIsBack").switchbutton('uncheck');
 
-     $("#lsIsBrower").switchbutton('uncheck');
 
-     $("#lsIsAdd").switchbutton('uncheck');
 
-     $("#lsIsDelete").switchbutton('uncheck');
 
-     $("#lsIsUpdate").switchbutton('uncheck');
 
-     $("#lsIsPrint").switchbutton('uncheck');
 
-     $("#lsIsOwner").switchbutton('uncheck');
 
-     $('#winSetFunInfo').window('open');
 
- }
 
- function myformatter(date) {
 
-     var y = date.getFullYear();
 
-     var m = date.getMonth() + 1;
 
-     var d = date.getDate();
 
-     return y + '-' + (m < 10 ? ('0' + m) : m) + '-' + (d < 10 ? ('0' + d) : d);
 
- }
 
- function initEditFun(row) {
 
-     $("#hid_UserType").val("modify");
 
-     $("#cFunctionID").textbox("readonly", true);
 
-     $("#cNames").textbox("setValue", row.FunctionName);
 
-     $("#cFunctionID").textbox("setValue", row.FunctionID);
 
-   
 
-     $.ajax({
 
-         url: "/SystemModule/GetFunctionByID?ran=" + Math.random(),
 
-         type: "POST",
 
-         dataType: "json",
 
-         data: { FunctionID: row.FunctionID },
 
-         success: function (msg) {
 
-             if (CheckAajxData(msg) === false) return;
 
-             $("#cURL").textbox("setValue", msg[0].URL);
 
-             $("#txtPageName").val(msg[0].PageName);
 
-             //$("#labCreateDate2").html(msg[0].TimeLastMod);
 
-             //$("#labCreateUser2").html(msg[0].UserIDLastMod);
 
-             $("#lsIsFront").switchbutton(msg[0].IsFront == 'Y' ? 'check' : 'uncheck');
 
-             $("#lsIsBack").switchbutton(msg[0].IsBack == 'Y' ? 'check' : 'uncheck');
 
-             $("#lsIsBrower").switchbutton(msg[0].IsBrowse == 'Y' ? 'check' : 'uncheck');
 
-             $("#lsIsAdd").switchbutton(msg[0].IsAdd == 'Y' ? 'check' : 'uncheck');
 
-             $("#lsIsDelete").switchbutton(msg[0].IsDelete == 'Y' ? 'check' : 'uncheck');
 
-             $("#lsIsUpdate").switchbutton(msg[0].IsUpdate == 'Y' ? 'check' : 'uncheck');
 
-             $("#lsIsPrint").switchbutton(msg[0].IsPrint == 'Y' ? 'check' : 'uncheck');
 
-             $("#lsIsOwner").switchbutton(msg[0].IsAudit == 'Y' ? 'check' : 'uncheck');
 
-         }
 
-     })
 
-     
 
-     $('#winSetFunInfo').window('open');
 
- }
 
- function submit() {
 
-     if (!$('#cFunctionID').val().trim()) {
 
-         $.messager.alert('提醒', '功能菜单编号不能为空', 'error');
 
-         return;
 
-     }
 
-     if (!$('#cNames').val().trim()) {
 
-         $.messager.alert('提醒', '功能菜单名称不能为空', 'error');
 
-         return;
 
-     }
 
-     var PFunctionID;
 
-     if ($('#hid_UserType').val() == "add") {
 
-         var node = $('#tg').treegrid('getSelected');
 
-         if (node) {
 
-             //f_add(node.FunctionID);
 
-             PFunctionID = node.FunctionID;
 
-         }
 
-     }
 
-     $.post("/SystemModule/SysFunctionEditAjax", { PFunctionID: PFunctionID, FunctionID: $('#cFunctionID').val().trim(), Type: $('#hid_UserType').val(), cNames: $('#cNames').val(),
 
-         cURL: $('#cURL').val(), PageName: $('#txtPageName').val(), IsFront: $("#lsIsFront").prop('checked') ? 'Y' : 'N',
 
-         IsBack: $("#lsIsBack").prop('checked') ? 'Y' : 'N',
 
-         IsBrowse: $("#lsIsBrower").prop('checked') ? 'Y' : 'N',
 
-         IsAdd: $("#lsIsAdd").prop('checked') ?'Y': 'N',
 
-         IsDelete: $("#lsIsDelete").prop('checked') ?'Y': 'N',
 
-         IsUpdate: $("#lsIsUpdate").prop('checked') ? 'Y' : 'N',
 
-         IsPrint: $("#lsIsPrint").prop('checked') ?'Y': 'N',
 
-         IsAudit: $("#lsIsOwner").prop('checked') ? 'Y' : 'N'
 
-     }, function (data) {
 
-         if (CheckAajxData(data) === false) return;
 
-         var msg = JSON.parse(data);
 
-         if (msg != null && msg.Success === true) {
 
-             f_Sumbit();
 
-             $('#winSetFunInfo').window('close');
 
-             layer.alert("操作成功!", { title: '提示信息' });
 
-         } else {
 
-             layer.alert(msg.ErrorInfo, { title: '提示信息' });
 
-         }
 
-     })
 
- }
 
 
  |