| | |
| | | <script src="../../../layuiadmin/PubCustom.js"></script> |
| | | <script src="../../../layuiadmin/soulTable.slim.js"></script> |
| | | <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script> |
| | | |
| | | <script src="../../../layuiadmin/HideButton_New.js"></script> |
| | | <script src="../../../layuiadmin/SetColumn.js"></script> |
| | | |
| | | </head> |
| | | <body> |
| | |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">å¼å§æ¥æ</label> |
| | | <div class="layui-input-block"> |
| | | <input type="date" class="layui-input" id="HBeginDate" style="width:190px;"> |
| | | <input type="date" class="layui-input ForFilteringSchemes" id="HBeginDate" style="width:190px;"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">ç»ææ¥æ</label> |
| | | <div class="layui-input-block"> |
| | | <input type="date" class="layui-input" id="HEndDate" style="width:190px;"> |
| | | <input type="date" class="layui-input ForFilteringSchemes" id="HEndDate" style="width:190px;"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">åæ®å·</label> |
| | | <div class="layui-input-block" style="margin-left: 120px;"> |
| | | <input type="text" class="layui-input ForFilteringSchemes" name="HBillNo" id="HBillNo"> |
| | | <div class="layui-row" style="margin-top:10px;margin-left:5%;"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">åæ®å·</label> |
| | | <div class="layui-input-block" style="margin-left: 120px;"> |
| | | <input type="text" class="layui-input ForFilteringSchemes" name="HBillNo" id="HBillNo"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">ç©æä»£ç </label> |
| | | <div class="layui-input-block" style="margin-left: 120px;"> |
| | | <input type="text" class="layui-input ForFilteringSchemes" name="HProNumber" id="HProNumber"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">ç©æä»£ç </label> |
| | | <div class="layui-input-block" style="margin-left: 120px;"> |
| | | <input type="text" class="layui-input ForFilteringSchemes" name="HProNumber" id="HProNumber"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">ç©æåç§°</label> |
| | | <div class="layui-input-block" style="margin-left: 120px;"> |
| | | <input type="text" class="layui-input ForFilteringSchemes" name="HName" id="HName"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">ç©æåç§°</label> |
| | | <div class="layui-input-block" style="margin-left: 120px;"> |
| | | <input type="text" class="layui-input ForFilteringSchemes" name="HName" id="HName"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i> |
| | | </button> |
| | | <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnReSearch" id="btnReSearch" style="padding:0 5px">éç½®</button> |
| | | <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i> |
| | | </button> |
| | | <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnReSearch" id="btnReSearch" style="padding:0 5px">éç½®</button> |
| | | </div> |
| | | <!--æ¾ç¤ºå½åè¿æ»¤æ¹æ¡--> |
| | | <div class="layui-inline" style="margin-left:5px;"> |
| | | <div style="text-align:center;font-size:15px;font-weight:bold;color:#fc9393" id="HFilterScheme_Now"></div> |
| | |
| | | <input type="text" class="layui-input ForFilteringSchemes" value="" name="ColContent1" id="ColContent1"> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="layui-row" style=" margin-top: 10px; margin-left: 70px;"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">è¿æ»¤</label> |
| | |
| | | </div> |
| | | </div> |
| | | <table class="" id="mainTable" lay-filter="mainTable"></table> |
| | | <div id="page" style="position: relative; bottom: 0;"></div> |
| | | <script type="text/html" id="toolbarDemo"> |
| | | <div class="layui-btn-container"> |
| | | <div class="layui-btn-container" id="toolbarDemo_ButtonSet"> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn_Export" id="btn_Export"><i class="layui-icon layui-icon-export"></i>导åº</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="set_AddNew"><i class="layui-icon layui-icon-file-b"></i>æ°å¢</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="set_ShowBill"><i class="layui-icon layui-icon-form"></i>ç¼è¾</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="set_DeleteBill"><i class="layui-icon layui-icon-delete"></i>å é¤</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Refresh"><i class="layui-icon layui-icon-refresh-3"></i>å·æ°</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Audit"><i class="layui-icon layui-icon-radio"></i>å®¡æ ¸</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-DeAudit"><i class="layui-icon layui-icon-circle"></i>åå®¡æ ¸</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Close"><i class="layui-icon layui-icon-radio"></i>å
³é</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-DeClose"><i class="layui-icon layui-icon-radio"></i>åå
³é</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Drop"><i class="layui-icon layui-icon-radio"></i>ä½åº</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-DeDrop"><i class="layui-icon layui-icon-radio"></i>åä½åº</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Exit"><i class="layui-icon layui-icon-logout"></i>éåº</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="set_HideColumn"><i class="layui-icon layui-icon-form"></i>å设置</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="set_AddNew" id="set_AddNew"><i class="layui-icon layui-icon-file-b"></i>æ°å¢</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="set_ShowBill" id="set_ShowBill"><i class="layui-icon layui-icon-form"></i>ç¼è¾</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="set_DeleteBill" id="set_DeleteBill"><i class="layui-icon layui-icon-delete"></i>å é¤</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Audit" id="btn-Audit"><i class="layui-icon layui-icon-radio"></i>å®¡æ ¸</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-DeAudit" id="btn-DeAudit"><i class="layui-icon layui-icon-circle"></i>åå®¡æ ¸</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Close" id="btn-Close"><i class="layui-icon layui-icon-radio"></i>å
³é</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-DeClose" id="btn-DeClose"><i class="layui-icon layui-icon-radio"></i>åå
³é</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Drop" id="btn-Drop"><i class="layui-icon layui-icon-radio"></i>ä½åº</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-DeDrop" id="btn-DeDrop"><i class="layui-icon layui-icon-radio"></i>åä½åº</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="set_HideColumn" id="set_HideColumn"><i class="layui-icon layui-icon-form"></i>å设置</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="set_HideButton" id="HideButton"><i class="layui-icon layui-icon-form"></i>æé®è®¾ç½®</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="set_SaveScheme" id="set_SaveScheme"><i class="layui-icon layui-icon-template"></i>ä¿åæ¹æ¡</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="set_ReadScheme" id="set_ReadScheme"><i class="layui-icon layui-icon-set"></i>è¯»åæ¹æ¡</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Refresh" id="get_Refresh"><i class="layui-icon layui-icon-refresh-3"></i>å·æ°</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Exit" id="get_Exit"><i class="layui-icon layui-icon-logout"></i>éåº</button> |
| | | </div> |
| | | </script> |
| | | </form> |
| | |
| | | |
| | | var option = []; |
| | | var sWhere = ""; |
| | | var page = 1;//åé¡µæ°æ® |
| | | var size = 50; |
| | | var HModName = "Sc_WorkBeginDotCheckBillList"; |
| | | var HBillType = "Sc_WorkBeginDotCheckBillList"; |
| | | var set_HideButton_ID = "toolbarDemo_ButtonSet";//éè¦è®¾ç½®çæé®çç¶çº§èç¹çid |
| | | var ins; //ç¨äºå¯¼åºexcel |
| | | //ä¸éè¦æ¾ç¤ºçåæ®µ 坿©å± |
| | | var titleData = ["HInterID", "HEntryID", "HBillStatus", "HICMOInterID", "HICMOEntryID", "HProcExchInterID", "HProcExchEntryID", "HMaterID", "HSourceID", "HCheckEmpID", "HGroupID", "HGroupLeaderID", "HCheckNoteItemID","HCheckPostID"]; |
| | |
| | | case 'get_Exit': Pub_Close(2); |
| | | break; |
| | | //å设置 |
| | | case 'set_HideColumn': get_HideColumn(); |
| | | case 'set_HideColumn': get_HideColumn(HModName, sessionStorage["HUserName"], option, optionPage, get_FastQuery); |
| | | break; |
| | | //æé®è®¾ç½® |
| | | case 'set_HideButton': |
| | | get_HideButton(set_HideButton_ID, HBillType, HModName, sessionStorage["HUserName"]); |
| | | break; |
| | | //ä¿åæ¹æ¡ |
| | | case 'set_SaveScheme': set_SaveScheme(); |
| | |
| | | //#region éç½®æé® |
| | | form.on('submit(btnReSearch)', function (data) { |
| | | set_ClearQuery(); |
| | | if (page != 1) { |
| | | $("#page a:eq(1)").get(0).click();//ç¹å»å页æ 第ä¸é¡µ |
| | | } else { |
| | | get_FastQuery(); |
| | | } |
| | | }); |
| | | //#endregion |
| | | |
| | | //#region æ¥è¯¢æé® |
| | | form.on('submit(btnSearch)', function (data) { |
| | | get_FastQuery(2); |
| | | form.on('submit(btnSearch)', function (data) { |
| | | if (page != 1) { |
| | | $("#page a:eq(1)").get(0).click();//ç¹å»å页æ 第ä¸é¡µ |
| | | } else { |
| | | get_FastQuery(); |
| | | } |
| | | }); |
| | | //#endregion |
| | | |
| | |
| | | |
| | | //åå§åè¡¨æ ¼ |
| | | set_InitGrid(); |
| | | |
| | | //æ¥è¯¢ |
| | | if (addSWhereByOpenType()) { //addSWhereByOpenType()æ¹æ³å¤ææ¯å¦å
¶å®é¡µé¢æå¼æ¬é¡µé¢ï¼è¥æ¯åå¤çè¿æ»¤æ¡ä»¶ï¼å¹¶è¿åtrue |
| | | get_FastQuery(2); |
| | | |
| | | } else { |
| | | get_FastQuery(1); |
| | | } |
| | | |
| | | //æ¥è¯¢å½åç»å½ç¨æ·ææ²¡æå¨å½å模å设置é»è®¤è¿æ»¤æ¹æ¡ |
| | | get_DefaultModule(); |
| | | |
| | |
| | | elem: '#mainTable' |
| | | , toolbar: '#toolbarDemo' |
| | | , height: 'full-50' |
| | | , page: true |
| | | , page: false |
| | | , totalRow: true |
| | | //, cellMinWidth: 90 |
| | | , limit: 50 |
| | |
| | | soulTable.render(this); |
| | | } |
| | | }; |
| | | optionPage = { |
| | | elem: 'page', //注æï¼è¿éç page æ¯ IDï¼ä¸ç¨å # å· |
| | | count: 10000, //æ°æ®æ»æ°ï¼ä»æå¡ç«¯å¾å° |
| | | limit: 50, |
| | | limits: [50, 500, 5000, 50000], |
| | | layout: ['count', 'prev', 'page', 'next', 'limit', 'skip'], |
| | | jump: function (obj, first) { |
| | | |
| | | //馿¬¡ä¸æ§è¡ |
| | | if (!first) { |
| | | //do something |
| | | page = obj.curr; |
| | | size = obj.limit; |
| | | get_FastQuery(); |
| | | } |
| | | } |
| | | } |
| | | laypage.render(optionPage); |
| | | } |
| | | //#endregion |
| | | |
| | |
| | | } |
| | | }) |
| | | } |
| | | }); |
| | | //#region æ¥è¯¢ |
| | | function get_Display(sWhere) { |
| | | var ajaxLoad = layer.load(); |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Sc_WorkBeginDotCheckBill/getSc_WorkBeginDotCheckBillMainList', |
| | | type: "GET", |
| | | async: false, |
| | | data: { "sWhere": sWhere, "user": sessionStorage["HUserName"]}, |
| | | success: function (data1) { |
| | | if (data1.count == 1) { |
| | | var totalArray = ["å¬ä¿æ¬¡æ°"]; |
| | | var data = []; |
| | | var col = []; |
| | | //ç»ç©ºçæ°ç»èµå¼ |
| | | for (var key in data1.list) { |
| | | data.push({ "id": data1.list[key].ColmCols, "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType }); |
| | | } |
| | | //å¨å表左边添å å¾éæ¡ |
| | | col.push({ type: 'checkbox', fixed: 'left' }); |
| | | for (var i = 0; i < data.length; i++) { |
| | | if ($.inArray(data[i].name, titleData) > -1) { |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //éèidå |
| | | } |
| | | else if ($.inArray(data[i].name, totalArray) > -1) { |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, totalRow: true, width: 120 }); |
| | | } else if (data[i].name == 'åæ®å·') { |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200, event: 'åæ®å·' }); |
| | | } |
| | | else { |
| | | switch (data[i].Type) { |
| | | //int |
| | | case 'DateTime': |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, templet: "<div>{{d." + data[i].name + " ==null ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd')}}</div>", width: 200 }); |
| | | break; |
| | | case 'long': |
| | | case 'Int32': |
| | | case 'Int64': |
| | | case 'double': |
| | | case 'Decimal': |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 120, totalRow: true }); |
| | | break; |
| | | default: |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200 }); |
| | | } |
| | | } |
| | | } |
| | | |
| | | option.cols = [col]; |
| | | option.data = data1.data; |
| | | table.render(option); |
| | | ins = table.render(option); |
| | | //å·æ°è¡¨æ ¼æ°æ® |
| | | DisPlay_HideColumn(); |
| | | |
| | | layer.close(ajaxLoad); |
| | | |
| | | if ($("#Comparator").val() == 0 && $("#ColContent").val() == "") { |
| | | ColFilter(); |
| | | } |
| | | |
| | | //layer.alert("æ¥è¯¢æå", { icon: 1 }); |
| | | } else { |
| | | layer.close(ajaxLoad); |
| | | layer.alert(data1.code + data1.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.close(ajaxLoad); |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }); |
| | | |
| | | } |
| | | //#endregion |
| | | }); |
| | | |
| | | //#region å¿«éè¿æ»¤ |
| | | function get_FastQuery(number) { |
| | |
| | | sWhere += " and ç©æåç§° like '%" + HName + "%'"; |
| | | } |
| | | |
| | | get_Display(sWhere); |
| | | //get_Display(sWhere); |
| | | get_DisplayPage(sWhere); |
| | | sWhere = "";//è°ç¨æ¥å£åæ¸
空sWhereç¼å |
| | | } |
| | | //#endregion |
| | |
| | | form.render('select'); |
| | | |
| | | sWhere = ""; |
| | | } |
| | | //#endregion |
| | | |
| | | //#region æ¥è¯¢ |
| | | function get_Display(sWhere) { |
| | | var ajaxLoad = layer.load(); |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Sc_WorkBeginDotCheckBill/getSc_WorkBeginDotCheckBillMainList', |
| | | type: "GET", |
| | | async: false, |
| | | data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] }, |
| | | success: function (data1) { |
| | | if (data1.count == 1) { |
| | | var totalArray = ["å¬ä¿æ¬¡æ°"]; |
| | | var data = []; |
| | | var col = []; |
| | | //ç»ç©ºçæ°ç»èµå¼ |
| | | for (var key in data1.list) { |
| | | data.push({ "id": data1.list[key].ColmCols, "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType }); |
| | | } |
| | | //å¨å表左边添å å¾éæ¡ |
| | | col.push({ type: 'checkbox', fixed: 'left' }); |
| | | for (var i = 0; i < data.length; i++) { |
| | | if ($.inArray(data[i].name, titleData) > -1) { |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //éèidå |
| | | } |
| | | else if ($.inArray(data[i].name, totalArray) > -1) { |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, totalRow: true, width: 120 }); |
| | | } else if (data[i].name == 'åæ®å·') { |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200, event: 'åæ®å·' }); |
| | | } |
| | | else { |
| | | switch (data[i].Type) { |
| | | //int |
| | | case 'DateTime': |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, templet: "<div>{{d." + data[i].name + " ==null ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd')}}</div>", width: 200 }); |
| | | break; |
| | | case 'long': |
| | | case 'Int32': |
| | | case 'Int64': |
| | | case 'double': |
| | | case 'Decimal': |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 120, totalRow: true }); |
| | | break; |
| | | default: |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200 }); |
| | | } |
| | | } |
| | | } |
| | | |
| | | option.cols = [col]; |
| | | option.data = data1.data; |
| | | //å·æ°è¡¨æ ¼æ°æ® |
| | | DisPlay_HideColumn(HModName, sessionStorage["HUserName"], option, titleData) |
| | | laypage.render(optionPage); |
| | | ins = table.render(option); |
| | | //å·æ°æé®æ¾ç¤º |
| | | Display_HideButton(set_HideButton_ID, HBillType, HModName, sessionStorage["HUserName"]); |
| | | layer.close(ajaxLoad); |
| | | |
| | | if ($("#Comparator").val() == 0 && $("#ColContent").val() == "") { |
| | | ColFilter(); |
| | | } |
| | | |
| | | } else { |
| | | layer.close(ajaxLoad); |
| | | layer.alert(data1.code + data1.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.close(ajaxLoad); |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }); |
| | | |
| | | } |
| | | //#endregion |
| | | |
| | | //#region å页æ¥è¯¢ |
| | | function get_DisplayPage(sWhere) { |
| | | var ajaxLoad = layer.load(); |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Sc_WorkBeginDotCheckBill/getSc_WorkBeginDotCheckBillListPage', |
| | | type: "GET", |
| | | data: { "sWhere": sWhere, "user": sessionStorage["HUserName"], "page": page, "size": size }, |
| | | success: function (data1) { |
| | | option.limit = size;//æ¹åè¡¨æ ¼é¡µå¤§å° |
| | | if (data1.code == 1) { |
| | | optionPage.count = data1.count;//æ¹ååè¡¨æ°æ®æ»æ° |
| | | var data = []; |
| | | var col = []; |
| | | //ç»ç©ºçæ°ç»èµå¼ |
| | | for (var key in data1.list) { |
| | | //卿è·åå表ææåå |
| | | data.push({ "id": data1.list[key].ColmCols, "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType }); |
| | | //è·åä¸éè¦æ¾ç¤ºçåï¼Hå¼å¤´çå䏿¾ç¤ºï¼ |
| | | var patrn = new RegExp(/^h/i); |
| | | if (patrn.test(data1.list[key].ColmCols)) { |
| | | titleData[key] = data1.list[key].ColmCols; |
| | | } |
| | | } |
| | | //å¨å表左边添å å¾éæ¡ |
| | | col.push({ type: 'checkbox', fixed: 'left' }); |
| | | for (var i = 0; i < data.length; i++) { |
| | | if ($.inArray(data[i].name, titleData) > -1) { |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //éèidå |
| | | } else if (data[i].name == 'åæ®å·') { |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200, event: 'åæ®å·' }); |
| | | } |
| | | else { |
| | | switch (data[i].Type) { |
| | | //int |
| | | case 'DateTime': |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, templet: "<div>{{d." + data[i].name + " ==null ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd')}}</div>", width: 200 }); |
| | | break; |
| | | case 'long': |
| | | case 'Int32': |
| | | case 'Int64': |
| | | case 'double': |
| | | case 'Decimal': |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 120, totalRow: true }); |
| | | break; |
| | | default: |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200 }); |
| | | } |
| | | } |
| | | } |
| | | option.cols = [col]; |
| | | option.data = data1.data; |
| | | option.totalRow = true; |
| | | //å·æ°è¡¨æ ¼æ°æ® |
| | | DisPlay_HideColumn(HModName, sessionStorage["HUserName"], option, titleData) |
| | | ins = table.render(option); |
| | | laypage.render(optionPage); |
| | | |
| | | //å·æ°æé®æ¾ç¤º |
| | | Display_HideButton(set_HideButton_ID, HBillType, HModName, sessionStorage["HUserName"]); |
| | | |
| | | layer.close(ajaxLoad); |
| | | if ($("#Comparator").val() == 0 && $("#ColContent").val() == "") { |
| | | ColFilter(); |
| | | } |
| | | } else { |
| | | layer.close(ajaxLoad); |
| | | layer.alert(data1.code + data1.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.close(ajaxLoad); |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }); |
| | | } |
| | | //#endregion |
| | | |
| | |
| | | |
| | | //#region 导åºExecel |
| | | function btn_Export() { |
| | | option.data.forEach((item) => { |
| | | for (let itemobj in item) { |
| | | if (item[itemobj] == null) { |
| | | item[itemobj] = ""; |
| | | } |
| | | if (item[itemobj].length > 0) { // åè®¾åæ®µå为field |
| | | item[itemobj] = item[itemobj].toString().replaceAll(/[\r\n]+/g, ''); // å°æ¢è¡ç¬¦æ¿æ¢ä¸ºç©ºå符串 |
| | | } |
| | | } |
| | | }); |
| | | |
| | | table.exportFile(ins.config.id, option.data, "xls"); |
| | | } |
| | | //#endregion |
| | |
| | | data: { "HInterID": InterID, "Type": nums, "user": sessionStorage["HUserName"] }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | layer.msg(result.Message, { icon: 1 }); |
| | | layer.close(wait); |
| | | layer.msg(result.Message, { icon: 1 }); |
| | | get_FastQuery(); |
| | | } else { |
| | | layer.alert(result.code + result.Message, { icon: 5 }); |
| | |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | |
| | | layer.msg(result.Message, { icon: 1 }); |
| | | layer.close(wait); |
| | | layer.msg(result.Message, { icon: 1 }); |
| | | get_FastQuery(); |
| | | } else { |
| | | layer.alert(result.code + result.Message, { icon: 5 }); |
| | |
| | | data: { "HInterID": InterID, "Type": nums, "user": sessionStorage["HUserName"] }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | |
| | | layer.msg(result.Message, { icon: 1 }); |
| | | layer.close(wait); |
| | | layer.msg(result.Message, { icon: 1 }); |
| | | get_FastQuery(); |
| | | } else { |
| | | layer.alert(result.code + result.Message, { icon: 5 }); |
| | |
| | | //#endregion |
| | | |
| | | |
| | | //#region éèå设置 |
| | | function get_HideColumn() { |
| | | var colName = ""; |
| | | var contentUrl = ""; |
| | | for (var i = 1; i < option.cols[0].length; i++) { |
| | | colName += option.cols[0][i]["title"] + ","; |
| | | } |
| | | var urlStr = window.document.location.pathname;//è·åæä»¶è·¯å¾ |
| | | var urlLen = urlStr.split('/'); |
| | | for (var i = 0; i < urlLen.length - 4; i++) { |
| | | contentUrl += "../"; |
| | | } |
| | | colName = encodeURI(colName.substring(0, colName.length - 1));//对 URI è¿è¡ç¼ç |
| | | |
| | | contentUrl += 'åºç¡èµæ/éèå设置/Gy_GridView_Hide.html?HModName=' + HModName + '&colName=' + colName; |
| | | |
| | | layer.open({ |
| | | type: 2 |
| | | , skin: "layui-layer-rim" //å ä¸è¾¹æ¡ |
| | | , title: "éèå设置" //æ é¢ |
| | | , closeBtn: 1 //çªä½å³ä¸è§å
³é ç æ ·å¼ |
| | | , shift: 2 //å¼¹åºå¨ç» |
| | | , area: ["50%", "90%"] //çªä½å¤§å° |
| | | , maxmin: true //设置æå¤§æå°æé®æ¯å¦æ¾ç¤º |
| | | , content: [contentUrl, "yes"] |
| | | , btn: ["ç¡®å®", "åæ¶"] |
| | | , btn1: function (index, laero) { |
| | | //å·æ°è¡¨æ ¼æ°æ® |
| | | DisPlay_HideColumn(); |
| | | //æ´æ°è¡¨æ ¼ç¼åçæ°æ® |
| | | layer.close(index);//å
³éå¼¹çª |
| | | } |
| | | }) |
| | | } |
| | | //#endregion |
| | | |
| | | //#region æ¾ç¤ºåæ°æ® |
| | | function DisPlay_HideColumn() { |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList', |
| | | type: "GET", |
| | | data: { "HModName": HModName, "user": sessionStorage["HUserName"] }, |
| | | success: function (data1) { |
| | | if (data1.data.length != 0) { |
| | | |
| | | var dataCol = [];//æ°æ®åºæ¥è¯¢åºçåæ°æ® |
| | | //var titleData = ["åæ®ID", "HMouldID", "hsubid", "HManagerID", "æºå主å
ç ", "æºååå
ç "];//ä¸éè¦æ¾ç¤ºçåæ®µ 坿©å± |
| | | //ä¸éè¦æ¾ç¤ºçåæ®µ 坿©å± |
| | | var titleData = ["HInterID", "HEntryID", "HBillStatus", "HICMOInterID", "HICMOEntryID", "HProcExchInterID", "HProcExchEntryID", "HMaterID", "HSourceID", "HCheckEmpID", "HGroupID", "HGroupLeaderID", "HCheckNoteItemID", "HCheckPostID"]; |
| | | dataCol = data1.data[0].HGridString.split(','); |
| | | |
| | | for (var i = 0; i < option.cols[0].length - 1; i++) { |
| | | var dataCols = dataCol[i].split('|'); |
| | | //éèå |
| | | if (dataCols[1] == 1) { |
| | | option.cols[0][i + 1]["hide"] = true; |
| | | } |
| | | //设置å宽 |
| | | if (dataCols[3] > 0) { |
| | | option.cols[0][i + 1]["width"] = dataCols[3]; |
| | | } |
| | | //设置å
容åä½å¤§å° |
| | | if (data1.data[0].HFontSize != 0) { |
| | | option.cols[0][i + 1]["style"] = "font-size:" + data1.data[0].HFontSize + "px;"; |
| | | } else { |
| | | option.cols[0][i + 1]["style"] = "font-size:100%"; |
| | | } |
| | | //æ¾ç¤ºå |
| | | if (dataCols[1] == 0 && $.inArray(option.cols[0][i + 1]["title"], titleData) == -1) { |
| | | option.cols[0][i + 1]["hide"] = false; |
| | | } |
| | | //å使å¨ä½ç½®(å·¦ å±
ä¸ å³) |
| | | switch (dataCols[2]) { |
| | | case "L": |
| | | option.cols[0][i + 1]["align"] = "left"; |
| | | break; |
| | | case "M": |
| | | option.cols[0][i + 1]["align"] = "center"; |
| | | break; |
| | | case "R": |
| | | option.cols[0][i + 1]["align"] = "right"; |
| | | break; |
| | | } |
| | | } |
| | | |
| | | //åæ¶å»ç»å |
| | | for (var i = 1; i < option.cols[0].length - 1; i++) { |
| | | if (option.cols[0][i]["fixed"] != null) { |
| | | option.cols[0][i]["fixed"] = null; |
| | | } |
| | | else { |
| | | break; |
| | | } |
| | | } |
| | | //å»ç»å |
| | | if (data1.data[0].HFixCols != 0) { |
| | | for (var i = 0; i < data1.data[0].HFixCols; i++) { |
| | | if ($.inArray(option.cols[0][i + 1]["title"], titleData) != -1) { |
| | | data1.data[0].HFixCols += 1; |
| | | } |
| | | option.cols[0][i + 1]["fixed"] = "left"; |
| | | } |
| | | } |
| | | table.render(option); |
| | | } else { |
| | | table.render(option); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }) |
| | | } |
| | | //#endregion |
| | | |
| | | |
| | | //#region ä»»æåæ®µè¿æ»¤ï¼ååæ¾ç¤ºä¸ææ¡ |
| | | function ColFilter() { |
| | |
| | | form.render('select'); |
| | | } |
| | | //#endregion |
| | | |
| | | //#region åå§æ¥æé´é 䏿å表 |
| | | function setSelect_HInitTimeCycle() { |
| | | var valueList = [0, 1, 2, 3, 4, 5, 6, 29]; //valuelistæ°ç»å
å«ä¸æ¶é´ç¸å
³çæ´æ°å¼ |
| | |
| | | var params = getUrlVars(); |
| | | var openType = params[params[0]]; //ä»åæ°ä¸è·å æå¼æ¹å¼ 1ç´æ¥æå¼ 2å
¶å®é¡µé¢éè¿éæ©æé®æå¼ |
| | | var HOrgID = params[params[1]]; |
| | | if (openType == 2) { |
| | | if (typeof (openType) != "undefined") { |
| | | sWhere += " and HBillStatus=2 "; |
| | | $("#HOrgID").val(HOrgID); |
| | | form.render("select"); |