| | |
| | | <input type="date" class="layui-input" id="HEndDate" style="width:190px;"> |
| | | </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> |
| | | <div class="layui-row" style="margin-top:5px;margin-left:82px;margin-bottom:5px;"> |
| | | <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="HProcName" id="HProcName"> |
| | | </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="HEquipName" id="HEquipName"> |
| | | </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="HBactNo" id="HBactNo"> |
| | | </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> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <table class="" id="mainTable" lay-filter="mainTable"></table> |
| | |
| | | elem: '#mainTable' |
| | | , toolbar: '#toolbarDemo' |
| | | , height: 'full-50' |
| | | , totalRow: true |
| | | , page: true |
| | | , limits: [50, 500, 5000, 50000] |
| | | , limit: 50 |
| | |
| | | //å¨å表左边添å å¾éæ¡ |
| | | col.push({ type: 'checkbox', fixed: 'left' }); |
| | | for (var i = 0; i < data.length; i++) { |
| | | // if (data[i].name == 'HInterID' || data[i].name == 'HBillType' || data[i].name == 'hmainid') { |
| | | if ($.inArray(data[i].name, titleData) > -1) { |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //éèidå |
| | | } |
| | | 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 }); |
| | |
| | | , cols: [col] |
| | | , data: data1.data |
| | | , height: 'full-80' |
| | | , totalRow: true |
| | | , page: true |
| | | , limits: [50, 500, 5000, 50000] |
| | | , limit: 50 |
| | |
| | | var HBeginDate = $("#HBeginDate").val(); |
| | | var HEndDate = $("#HEndDate").val(); |
| | | var HNumber = $("#HNumber").val(); |
| | | var HName = $("#HName").val(); |
| | | var HName = $("#HName").val(); |
| | | var HProcName = $("#HProcName").val(); |
| | | var HEquipName = $("#HEquipName").val(); |
| | | var HBactNo = $("#HBactNo").val(); |
| | | |
| | | sWhere = { |
| | | HBeginDate: HBeginDate |
| | | , HEndDate: HEndDate |
| | | , HNumber: HNumber |
| | | , HName: HName |
| | | , HProcName: HProcName |
| | | , HEquipName: HEquipName |
| | | , HBactNo: HBactNo |
| | | } |
| | | get_Display(JSON.stringify(sWhere)); |
| | | sWhere = "";//è°ç¨æ¥å£åæ¸
空sWhereç¼å |
| | |
| | | |
| | | //#region 导åºExecel |
| | | function get_Export() { |
| | | var ModRightNameCheck = "Gy_ProjectMoney_ExportExcel"; |
| | | |
| | | //é»è¾å®¡æ ¸æ¹æ³ |
| | | $.ajax({ |
| | | type: "GET", |
| | | url: GetWEBURL() + "/LMES/getReportByModRightNameCheck", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | | data: { "ModRightNameCheck": ModRightNameCheck, "user": sessionStorage["HUserName"] }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | table.exportFile(ins.config.id, option.data, "xls"); |
| | | } else { |
| | | layer.alert("å½åæ¨¡åæ²¡æå¯¼åºæé!", { icon: 5 }); |
| | | var data = option.data; |
| | | data.forEach((item) => { |
| | | for (let itemobj in item) { |
| | | if (item[itemobj] == null) { |
| | | item[itemobj] = ""; |
| | | } |
| | | }, error: function () { |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | if (item[itemobj].length > 0) { // åè®¾åæ®µå为field |
| | | item[itemobj] = item[itemobj].toString().replace(/[\r\n]+/g, ''); // å°æ¢è¡ç¬¦æ¿æ¢ä¸ºç©ºå符串 |
| | | } |
| | | } |
| | | }); |
| | | table.exportFile(ins.config.id, data, "xls"); |
| | | } |
| | | //#endregion |
| | | |