From d9d78499cf3aaa6165bb1bc9fe3d8a9537e4d26a Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期四, 30 十月 2025 17:03:29 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-LayUI
---
WebTM/views/设备管理/设备档案/Gy_EquipFileBillResume.html | 418 ++++++++++++++++++++++++++++++++++++++++++++++++----------
1 files changed, 342 insertions(+), 76 deletions(-)
diff --git "a/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/\350\256\276\345\244\207\346\241\243\346\241\210/Gy_EquipFileBillResume.html" "b/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/\350\256\276\345\244\207\346\241\243\346\241\210/Gy_EquipFileBillResume.html"
index b0040ff..95851eb 100644
--- "a/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/\350\256\276\345\244\207\346\241\243\346\241\210/Gy_EquipFileBillResume.html"
+++ "b/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/\350\256\276\345\244\207\346\241\243\346\241\210/Gy_EquipFileBillResume.html"
@@ -9,6 +9,8 @@
<link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all">
<link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all">
<script src="../../../layuiadmin/layui/layui.js"></script>
+ <script src="../../../layuiadmin/soulTable.slim.js"></script>
+
<style type="text/css">
input.layui-input.layui-unselect {
padding-right: 0;
@@ -56,10 +58,87 @@
<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-colla-content">
- <div class="layui-inline">
+ <div class="layui-colla-content" style="padding: 0px; margin-left: 6%;">
+ <!--鑷畾涔夎繃婊�-->
+ <div class="layui-row" style="margin-top:5px">
<div class="layui-inline">
- <span>鍏朵粬鏉′欢></span>
+ <label class="layui-form-label">杩囨护</label>
+ <div class="layui-input-block">
+ <select name="ColName" id="ColName" class=" ForFilteringSchemes" lay-filter="ColName" style="width:190px;">
+ </select>
+ </div>
+ </div>
+ <div class="layui-inline">
+ <select name="Comparator" id="Comparator" class=" ForFilteringSchemes" lay-filter="Comparator" style="width:190px;">
+ <option value="0" selected="selected"></option>
+ <option value="=">=</option>
+ <option value=">=">>=</option>
+ <option value=">">></option>
+ <option value="<="><=</option>
+ <option value="<"><</option>
+ <option value="<>"><></option>
+ <option value="7">鍖呭惈</option>
+ <option value="8">宸﹀寘鍚�</option>
+ <option value="9">鍙冲寘鍚�</option>
+ <option value="10">涓嶅寘鍚�</option>
+ </select>
+ </div>
+ <div class="layui-inline">
+ <input type="text" class="layui-input ForFilteringSchemes" value="" name="ColContent" id="ColContent">
+ </div>
+ </div>
+ <div class="layui-row" style=" margin-top: 10px;">
+ <div class="layui-inline">
+ <label class="layui-form-label">杩囨护</label>
+ <div class="layui-input-block">
+ <select name="ColName1" id="ColName1" class="ForFilteringSchemes" lay-filter="ColName1" style="width:190px;">
+ </select>
+ </div>
+ </div>
+ <div class="layui-inline">
+ <select name="Comparator1" id="Comparator1" class="ForFilteringSchemes" lay-filter="Comparator1" style="width:190px;">
+ <option value="0" selected="selected"></option>
+ <option value="=">=</option>
+ <option value=">=">>=</option>
+ <option value=">">></option>
+ <option value="<="><=</option>
+ <option value="<"><</option>
+ <option value="<>"><></option>
+ <option value="7">鍖呭惈</option>
+ <option value="8">宸﹀寘鍚�</option>
+ <option value="9">鍙冲寘鍚�</option>
+ <option value="10">涓嶅寘鍚�</option>
+ </select>
+ </div>
+ <div class="layui-inline">
+ <input type="text" class="layui-input ForFilteringSchemes" value="" name="ColContent1" id="ColContent1">
+ </div>
+ </div>
+ <div class="layui-row" style=" margin-top: 10px; ">
+ <div class="layui-inline">
+ <label class="layui-form-label">杩囨护</label>
+ <div class="layui-input-block">
+ <select name="ColName2" id="ColName2" class="ForFilteringSchemes" lay-filter="ColName2" style="width:190px;">
+ </select>
+ </div>
+ </div>
+ <div class="layui-inline">
+ <select name="Comparator2" id="Comparator2" class="ForFilteringSchemes" lay-filter="Comparator2" style="width:190px;">
+ <option value="0" selected="selected"></option>
+ <option value="=">=</option>
+ <option value=">=">>=</option>
+ <option value=">">></option>
+ <option value="<="><=</option>
+ <option value="<"><</option>
+ <option value="<>"><></option>
+ <option value="7">鍖呭惈</option>
+ <option value="8">宸﹀寘鍚�</option>
+ <option value="9">鍙冲寘鍚�</option>
+ <option value="10">涓嶅寘鍚�</option>
+ </select>
+ </div>
+ <div class="layui-inline">
+ <input type="text" class="layui-input ForFilteringSchemes" value="" name="ColContent2" id="ColContent2">
</div>
</div>
</div>
@@ -67,11 +146,12 @@
</div>
<table class="" id="mainTable" lay-filter="mainTable"></table>
-
+
<div class="layui-tab layui-tab-card">
<ul class="layui-tab-title">
<li class="layui-this">鏃ュ父璁板綍</li>
<li>缁翠慨璁板綍</li>
+ <li>閰嶄欢鏇存崲娓呭崟</li>
</ul>
<div class="layui-tab-content">
<div class="layui-tab-item layui-show">
@@ -79,6 +159,9 @@
</div>
<div class="layui-tab-item">
<table class="layui-hide" id="mainTable2" lay-filter="mainTable2"></table>
+ </div>
+ <div class="layui-tab-item">
+ <table class="layui-hide" id="mainTable3" lay-filter="mainTable3"></table>
</div>
</div>
</div>
@@ -95,6 +178,9 @@
{{d.LAY_TABLE_INDEX+1}}
</script>
<script type="text/html" id="xuhao1">
+ {{d.LAY_TABLE_INDEX+1}}
+ </script>
+ <script type="text/html" id="xuhao2">
{{d.LAY_TABLE_INDEX+1}}
</script>
@@ -116,7 +202,7 @@
base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
}).extend({
index: 'lib/index', //涓诲叆鍙fā鍧�
- }).use(['index', 'form', 'table', 'element', 'laypage', 'laydate'], function () {
+ }).use(['index', 'form', 'table', 'element', 'laypage', 'laydate','soulTable'], function () {
//#region 鍏叡鍙橀噺
var $ = layui.$
, admin = layui.admin
@@ -124,16 +210,20 @@
, table = layui.table
, table1 = layui.table
, table2 = layui.table
+ , table3 = layui.table
, form = layui.form
, element = layui.element
, laypage = layui.laypage
, laydate = layui.laydate
, util = layui.util
+ , soulTable = layui.soulTable
+
//鏌ヨ鏉′欢
var sWhere = "";
var option = [];
var option1 = [];
var option2 = [];
+ var option3 = [];
//#endregion
@@ -168,7 +258,7 @@
var datas = obj.data; //鑾峰緱褰撳墠琛屾暟鎹�
var linterid = datas.hmainid;
$.ajax({
- url: GetWEBURL() + 'Sb_EquipMaintainBill/Sb_EquipMaintainBillListProjectDetaiNew',
+ url: GetWEBURL() + 'Gy_EquipFileMain/Sb_EquipFileBillResumeDate',
type: "GET",
data: { "HInterID": linterid },
success: function (data1) {
@@ -177,6 +267,8 @@
table1.render(option1);
option2.data = data1.list[1];
table2.render(option2);
+ option3.data = data1.list[2];
+ table3.render(option3);
} else {
layer.alert("鑾峰彇澶辫触", { icon: 5 });
}
@@ -185,6 +277,27 @@
}
});
});
+ //#region 鐐瑰嚮琛岄�変腑楂樹寒
+ table.on('row(mainTable)', function (obj) {
+ //閫変腑琛屾敼鍙橀鑹�
+ var flag = !obj.tr.find(':checkbox:first').prop('checked');
+ obj.tr.find(':checkbox').prop('checked', flag);
+ if (flag) {
+ obj.tr.find('.layui-form-checkbox').addClass('layui-form-checked'); //璁剧疆澶嶉�夋閫変腑鏍峰紡
+ $(obj.tr.selector).attr({ "style": "background:#ceedfa;color:black" });//鏀瑰彉褰撳墠tr鑳屾櫙棰滆壊鍜屽瓧浣撻鑹�
+ } else {
+ obj.tr.find('.layui-form-checkbox').removeClass('layui-form-checked');//鍙栨秷澶嶉�夋閫変腑鏍峰紡
+ $(obj.tr.selector).attr({ "style": "background:" });//鍙栨秷褰撳墠tr棰滆壊
+ }
+ //mainTable 涓鸿〃鏍糏D 娉ㄦ剰姝ゅ濡傛灉ID涓嶆纭皢瀵艰嚧浣犲湪鐩戝惉澶嶉�夋鏃惰幏鍙栦笉鍒颁綘閫夋嫨鐨勬暟鎹紝鍓嶉潰鐨勫彧鏄坊鍔犳垨鍒犻櫎閫変腑鏈�変腑鏍峰紡浠ュ強璁剧疆鑳屾櫙鑹诧紝瀛椾綋棰滆壊
+ layui.each(table.cache.mainTable, function (i, l) {
+ if (obj.tr.index() == l.LAY_TABLE_INDEX) {
+ l.LAY_CHECKED = flag;
+ }
+ });
+ })
+ //#endregion
+
//閲嶇疆鎸夐挳
form.on('submit(btnReSearch)', function (data) {
@@ -198,12 +311,16 @@
//#region 姝ら〉闈㈡墍鏈夋柟娉�
function set_ClearBill() {
+ $("#BenginHCreateDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd"));//寮�濮嬫棩鏈�
+ $("#EndHCreateDate").val(Format(new Date(), "yyyy-MM-dd"));//缁撴潫鏃ユ湡
//鍒濆鍖栬〃鏍�(涓昏〃)
set_InitGrid();
//鍒濆鍖栬〃鏍�(瀛愯〃1)
set_InitGrid1();
//鍒濆鍖栬〃鏍�(瀛愯〃2)
set_InitGrid2();
+ //鍒濆鍖栬〃鏍�(瀛愯〃3)
+ set_InitGrid3();
//鏌ヨ
get_Display(sWhere);
}
@@ -214,57 +331,61 @@
, toolbar: '#toolbarDemo'
, height: '400'
, page: true
+ , totalRow: true
, cellMinWidth: 90
, limit: 50
, limits: [50, 500, 5000, 20000]
+ , done: function (res, curr, count) {
+ soulTable.render(this);
+ }
, cols: [[
- { type: 'checkbox', fixed: 'left' }
+ { type: 'checkbox', fixed: 'left', totalRowText: '鍚堣琛�'}
, { field: 'hmainid', title: 'hmainid', sort: true, hide: true }
- , { field: '鍗曟嵁鍙�', title: '鍗曟嵁鍙�' }
- , { field: '鏃ユ湡', title: '鏃ユ湡', templet: "<div>{{d.鏃ユ湡 ==null ?'':layui.util.toDateString(d.鏃ユ湡, 'yyyy-MM-dd')}}</div>" }
- , { field: '鏉″舰鐮�', title: '鏉$爜缂栧彿' }
- , { field: 'HMaterID', title: 'HMaterID', hide: true }
- , { field: '鐗╂枡鍚嶇О', title: '鐗╂枡鍚嶇О' }
- , { field: '璁惧绫诲瀷', title: '璁惧鍒嗙被' }
- , { field: '璁惧浠g爜', title: '璁惧浠g爜' }
- , { field: '璁惧缂栫爜', title: '璁惧缂栫爜' }
- , { field: '璁惧鍚嶇О', title: '璁惧鍚嶇О' }
- , { field: '璁惧瑙勬牸', title: '璁惧瑙勬牸' }
- , { field: '璁惧鍨嬪彿', title: '璁惧鍨嬪彿' }
- , { field: 'HUnitID', title: 'HUnitID', hide: true }
- , { field: '鍗曚綅', title: '鍗曚綅' }
- , { field: '璁惧鍑哄巶鏃ユ湡', title: '璁惧鍑哄巶鏃ユ湡', templet: "<div>{{d.璁惧鍑哄巶鏃ユ湡 ==null ?'':layui.util.toDateString(d.璁惧鍑哄巶鏃ユ湡, 'yyyy-MM-dd')}}</div>" }
- , { field: '璁惧鍑哄巶缂栧彿', title: '璁惧鍑哄巶缂栧彿' }
- , { field: 'HDeptID', title: 'HDeptID', hide: true }
- , { field: '浣跨敤閮ㄩ棬', title: '浣跨敤閮ㄩ棬' }
- , { field: 'HUseEmpID', title: 'HUseEmpID', hide: true }
- , { field: '浣跨敤璐熻矗浜�', title: '浣跨敤璐熻矗浜�' }
- , { field: 'HRepairEmpID', title: 'HRepairEmpID', hide: true }
- , { field: '缁存姢璐熻矗浜�', title: '缁存姢璐熻矗浜�' }
- , { field: '瀹夎鍦扮偣', title: '瀹夎鍦扮偣' }
- , { field: '瀹夎鏃ユ湡', title: '瀹夎鏃ユ湡', templet: "<div>{{d.瀹夎鏃ユ湡 ==null ?'':layui.util.toDateString(d.瀹夎鏃ユ湡, 'yyyy-MM-dd')}}</div>" }
- , { field: '杩愯寮�濮嬫棩鏈�', title: '杩愯寮�濮嬫棩鏈�', templet: "<div>{{d.杩愯寮�濮嬫棩鏈� ==null ?'':layui.util.toDateString(d.杩愯寮�濮嬫棩鏈�, 'yyyy-MM-dd')}}</div>" }
- , { field: '褰撳墠鐘舵��', title: '褰撳墠鐘舵��' }
- , { field: 'HEquipFileTypeID', title: 'HEquipFileTypeID', hide: true }
- , { field: '宸ョ▼缂栫爜', title: '宸ョ▼缂栫爜' }
- , { field: '浜у搧', title: '浜у搧' }
- , { field: '鍝佺墝', title: '鍝佺墝' }
- , { field: 'HSellSupID', title: 'HSellSupID', hide: true }
- , { field: '渚涘簲鍟�', title: '渚涘簲鍟�' }
- , { field: 'HMakeSupID', title: 'HMakeSupID', hide: true }
- , { field: '鍒堕�犲晢', title: '鍒堕�犲晢' }
- , { field: '鍒跺崟浜�', title: '鍒跺崟浜�' }
- , { field: '鍒跺崟鏃ユ湡', title: '鍒跺崟鏃ユ湡', templet: "<div>{{d.鍒跺崟鏃ユ湡 ==null ?'':layui.util.toDateString(d.鍒跺崟鏃ユ湡, 'yyyy-MM-dd')}}</div>" }
- , { field: '瀹℃牳浜�', title: '瀹℃牳浜�' }
- , { field: '瀹℃牳鏃ユ湡', title: '瀹℃牳鏃ユ湡', templet: "<div>{{d.瀹℃牳鏃ユ湡 ==null ?'':layui.util.toDateString(d.瀹℃牳鏃ユ湡, 'yyyy-MM-dd')}}</div>" }
- , { field: '淇敼浜�', title: '淇敼浜�' }
- , { field: '淇敼鏃ユ湡', title: '淇敼鏃ユ湡', templet: "<div>{{d.淇敼鏃ユ湡 ==null ?'':layui.util.toDateString(d.淇敼鏃ユ湡, 'yyyy-MM-dd')}}</div>" }
- , { field: '鍏抽棴浜�', title: '鍏抽棴浜�' }
- , { field: '鍏抽棴鏃ユ湡', title: '鍏抽棴鏃ユ湡', templet: "<div>{{d.鍏抽棴鏃ユ湡 ==null ?'':layui.util.toDateString(d.鍏抽棴鏃ユ湡, 'yyyy-MM-dd')}}</div>" }
- , { field: 'hbilltype', title: 'hbilltype', hide: true }
- , { field: '鍗曟嵁绫诲瀷', title: '鍗曟嵁绫诲瀷' }
- , { field: 'HMoudType', title: 'HMoudType', hide: true }
- , { field: 'hsubid', title: 'hsubid', hide: true }
+ , { field: '鍗曟嵁鍙�', title: '鍗曟嵁鍙�', sort: true}
+ , { field: '鏃ユ湡', title: '鏃ユ湡', templet: "<div>{{d.鏃ユ湡 ==null ?'':layui.util.toDateString(d.鏃ユ湡, 'yyyy-MM-dd')}}</div>", sort: true}
+ , { field: '鏉″舰鐮�', title: '鏉$爜缂栧彿', sort: true }
+ , { field: 'HMaterID', title: 'HMaterID', hide: true, sort: true }
+ , { field: '鐗╂枡鍚嶇О', title: '鐗╂枡鍚嶇О', sort: true }
+ , { field: '璁惧绫诲瀷', title: '璁惧鍒嗙被', sort: true }
+ , { field: '璁惧浠g爜', title: '璁惧浠g爜', sort: true }
+ , { field: '璁惧缂栫爜', title: '璁惧缂栫爜', sort: true }
+ , { field: '璁惧鍚嶇О', title: '璁惧鍚嶇О', sort: true }
+ , { field: '璁惧瑙勬牸', title: '璁惧瑙勬牸', sort: true }
+ , { field: '璁惧鍨嬪彿', title: '璁惧鍨嬪彿', sort: true }
+ , { field: 'HUnitID', title: 'HUnitID', hide: true, sort: true }
+ , { field: '鍗曚綅', title: '鍗曚綅', sort: true }
+ , { field: '璁惧鍑哄巶鏃ユ湡', title: '璁惧鍑哄巶鏃ユ湡', templet: "<div>{{d.璁惧鍑哄巶鏃ユ湡 ==null ?'':layui.util.toDateString(d.璁惧鍑哄巶鏃ユ湡, 'yyyy-MM-dd')}}</div>", sort: true }
+ , { field: '璁惧鍑哄巶缂栧彿', title: '璁惧鍑哄巶缂栧彿', sort: true }
+ , { field: 'HDeptID', title: 'HDeptID', hide: true, sort: true }
+ , { field: '浣跨敤閮ㄩ棬', title: '浣跨敤閮ㄩ棬', sort: true }
+ , { field: 'HUseEmpID', title: 'HUseEmpID', hide: true, sort: true }
+ , { field: '浣跨敤璐熻矗浜�', title: '浣跨敤璐熻矗浜�', sort: true }
+ , { field: 'HRepairEmpID', title: 'HRepairEmpID', hide: true, sort: true }
+ , { field: '缁存姢璐熻矗浜�', title: '缁存姢璐熻矗浜�', sort: true }
+ , { field: '瀹夎鍦扮偣', title: '瀹夎鍦扮偣', sort: true }
+ , { field: '瀹夎鏃ユ湡', title: '瀹夎鏃ユ湡', templet: "<div>{{d.瀹夎鏃ユ湡 ==null ?'':layui.util.toDateString(d.瀹夎鏃ユ湡, 'yyyy-MM-dd')}}</div>", sort: true }
+ , { field: '杩愯寮�濮嬫棩鏈�', title: '杩愯寮�濮嬫棩鏈�', templet: "<div>{{d.杩愯寮�濮嬫棩鏈� ==null ?'':layui.util.toDateString(d.杩愯寮�濮嬫棩鏈�, 'yyyy-MM-dd')}}</div>", sort: true }
+ , { field: '褰撳墠鐘舵��', title: '褰撳墠鐘舵��', sort: true }
+ , { field: 'HEquipFileTypeID', title: 'HEquipFileTypeID', hide: true, sort: true }
+ , { field: '宸ョ▼缂栫爜', title: '宸ョ▼缂栫爜', sort: true }
+ , { field: '浜у搧', title: '浜у搧', sort: true }
+ , { field: '鍝佺墝', title: '鍝佺墝', sort: true }
+ , { field: 'HSellSupID', title: 'HSellSupID', hide: true, sort: true }
+ , { field: '渚涘簲鍟�', title: '渚涘簲鍟�', sort: true }
+ , { field: 'HMakeSupID', title: 'HMakeSupID', hide: true, sort: true }
+ , { field: '鍒堕�犲晢', title: '鍒堕�犲晢', sort: true }
+ , { field: '鍒跺崟浜�', title: '鍒跺崟浜�', sort: true }
+ , { field: '鍒跺崟鏃ユ湡', title: '鍒跺崟鏃ユ湡', templet: "<div>{{d.鍒跺崟鏃ユ湡 ==null ?'':layui.util.toDateString(d.鍒跺崟鏃ユ湡, 'yyyy-MM-dd')}}</div>", sort: true }
+ , { field: '瀹℃牳浜�', title: '瀹℃牳浜�', sort: true }
+ , { field: '瀹℃牳鏃ユ湡', title: '瀹℃牳鏃ユ湡', templet: "<div>{{d.瀹℃牳鏃ユ湡 ==null ?'':layui.util.toDateString(d.瀹℃牳鏃ユ湡, 'yyyy-MM-dd')}}</div>", sort: true }
+ , { field: '淇敼浜�', title: '淇敼浜�', sort: true }
+ , { field: '淇敼鏃ユ湡', title: '淇敼鏃ユ湡', templet: "<div>{{d.淇敼鏃ユ湡 ==null ?'':layui.util.toDateString(d.淇敼鏃ユ湡, 'yyyy-MM-dd')}}</div>", sort: true }
+ , { field: '鍏抽棴浜�', title: '鍏抽棴浜�', sort: true }
+ , { field: '鍏抽棴鏃ユ湡', title: '鍏抽棴鏃ユ湡', templet: "<div>{{d.鍏抽棴鏃ユ湡 ==null ?'':layui.util.toDateString(d.鍏抽棴鏃ユ湡, 'yyyy-MM-dd')}}</div>", sort: true }
+ , { field: 'hbilltype', title: 'hbilltype', hide: true, sort: true }
+ , { field: '鍗曟嵁绫诲瀷', title: '鍗曟嵁绫诲瀷', sort: true }
+ , { field: 'HMoudType', title: 'HMoudType', hide: true, sort: true }
+ , { field: 'hsubid', title: 'hsubid', hide: true, sort: true }
]]
}
}
@@ -276,21 +397,22 @@
//, toolbar: '#toolbarDemo'
, height: '350'
, page: true
+ , totalRow: true
, cellMinWidth: 90
, limit: 50
, limits: [50, 500, 5000, 20000]
, cols: [[
//{ type: 'checkbox', fixed: 'left' }
, { templet: '#xuhao', title: '搴忓彿', sort: true, fixed: 'left', event: "qwe" }
- , { field: 'HMaintainItemID', title: '鏃ユ湡', width: 200}
- , { field: 'HMaintainItemNumber', title: '鍗曟嵁绫诲瀷', width: 200 }
- , { field: 'HMaintainItem', title: '鍗曟嵁鍙�', width: 200 }
- , { field: 'HMaintainPart', title: '璁惧鍒嗙被', width: 200 }
- , { field: 'HClaim', title: '璁惧鏉$爜', width: 200 }
- , { field: 'HManagerID', title: '璁惧缂栫爜', width: 200, hide: true }
- , { field: 'HManagerNumber', title: '璁惧鍚嶇О', width: 200 }
- , { field: 'HManagerName', title: '璁惧瑙勬牸', width: 200 }
- , { field: 'HRemark', title: '璁惧鍨嬪彿', width: 200 }
+ , { field: '鏃ユ湡', title: '鏃ユ湡', width: 200}
+ , { field: '鍗曟嵁绫诲瀷', title: '鍗曟嵁绫诲瀷', width: 200 }
+ , { field: '鍗曟嵁鍙�', title: '鍗曟嵁鍙�', width: 200 }
+ , { field: '璁惧鍒嗙被', title: '璁惧鍒嗙被', width: 200 }
+ , { field: '璁惧鏉$爜', title: '璁惧鏉$爜', width: 200 }
+ , { field: '璁惧缂栫爜', title: '璁惧缂栫爜', width: 200, hide: true }
+ , { field: '璁惧鍚嶇О', title: '璁惧鍚嶇О', width: 200 }
+ , { field: '璁惧瑙勬牸', title: '璁惧瑙勬牸', width: 200 }
+ , { field: '璁惧鍨嬪彿', title: '璁惧鍨嬪彿', width: 200 }
, { field: '鍒跺崟浜�', title: '鍒跺崟浜�' }
, { field: '鍒跺崟鏃ユ湡', title: '鍒跺崟鏃ユ湡', templet: "<div>{{d.鍒跺崟鏃ユ湡 ==null ?'':layui.util.toDateString(d.鍒跺崟鏃ユ湡, 'yyyy-MM-dd')}}</div>" }
, { field: '瀹℃牳浜�', title: '瀹℃牳浜�' }
@@ -310,21 +432,22 @@
//, toolbar: '#toolbarDemo'
, height: '350'
, page: true
+ , totalRow: true
, cellMinWidth: 90
, limit: 50
, limits: [50, 500, 5000, 20000]
, cols: [[
//{ type: 'checkbox', fixed: 'left' }
- , { templet: '#xuhao', title: '搴忓彿', sort: true, fixed: 'left', event: "qwe" }
- , { field: 'HMaintainItemID', title: '鏃ユ湡', width: 200 }
- , { field: 'HMaintainItemNumber', title: '鍗曟嵁绫诲瀷', width: 200 }
- , { field: 'HMaintainItem', title: '鍗曟嵁鍙�', width: 200 }
- , { field: 'HMaintainPart', title: '璁惧鍒嗙被', width: 200 }
- , { field: 'HClaim', title: '璁惧鏉$爜', width: 200 }
- , { field: 'HManagerID', title: '璁惧缂栫爜', width: 200, hide: true }
- , { field: 'HManagerNumber', title: '璁惧鍚嶇О', width: 200 }
- , { field: 'HManagerName', title: '璁惧瑙勬牸', width: 200 }
- , { field: 'HRemark', title: '璁惧鍨嬪彿', width: 200 }
+ , { templet: '#xuhao1', title: '搴忓彿', sort: true, fixed: 'left', event: "qwe" }
+ , { field: '鏃ユ湡', title: '鏃ユ湡', width: 200 }
+ , { field: '鍗曟嵁绫诲瀷', title: '鍗曟嵁绫诲瀷', width: 200 }
+ , { field: '鍗曟嵁鍙�', title: '鍗曟嵁鍙�', width: 200 }
+ , { field: '璁惧鍒嗙被', title: '璁惧鍒嗙被', width: 200 }
+ , { field: '璁惧鏉$爜', title: '璁惧鏉$爜', width: 200 }
+ , { field: '璁惧缂栫爜', title: '璁惧缂栫爜', width: 200, hide: true }
+ , { field: '璁惧鍚嶇О', title: '璁惧鍚嶇О', width: 200 }
+ , { field: '璁惧瑙勬牸', title: '璁惧瑙勬牸', width: 200 }
+ , { field: '璁惧鍨嬪彿', title: '璁惧鍨嬪彿', width: 200 }
, { field: '鍒跺崟浜�', title: '鍒跺崟浜�' }
, { field: '鍒跺崟鏃ユ湡', title: '鍒跺崟鏃ユ湡', templet: "<div>{{d.鍒跺崟鏃ユ湡 ==null ?'':layui.util.toDateString(d.鍒跺崟鏃ユ湡, 'yyyy-MM-dd')}}</div>" }
, { field: '瀹℃牳浜�', title: '瀹℃牳浜�' }
@@ -334,6 +457,43 @@
};
option2.data = [];
table2.render(option2);
+ layer.close(ajaxLoad);
+ }
+ //鍒濆鍖栬〃鏍�(瀛愯〃3)
+ function set_InitGrid3() {
+ var ajaxLoad = layer.load();
+ option3 = {
+ elem: '#mainTable3'
+ //, toolbar: '#toolbarDemo'
+ , height: '350'
+ , page: true
+ , totalRow: true
+ , cellMinWidth: 90
+ , limit: 50
+ , limits: [50, 500, 5000, 20000]
+ , cols: [[
+ //{ type: 'checkbox', fixed: 'left' }
+ , { templet: '#xuhao2', title: '搴忓彿', sort: true, fixed: 'left', event: "qwe" }
+ , { field: '鏃ユ湡', title: '鏃ユ湡', width: 200 }
+ , { field: '鍗曟嵁绫诲瀷', title: '鍗曟嵁绫诲瀷', width: 200 }
+ , { field: '鍗曟嵁鍙�', title: '鍗曟嵁鍙�', width: 200 }
+ , { field: '璁惧鍒嗙被', title: '璁惧鍒嗙被', width: 200 }
+ , { field: '璁惧鏉$爜', title: '璁惧鏉$爜', width: 200 }
+ , { field: '璁惧缂栫爜', title: '璁惧缂栫爜', width: 200, hide: true }
+ , { field: '璁惧鍚嶇О', title: '璁惧鍚嶇О', width: 200 }
+ , { field: '璁惧瑙勬牸', title: '璁惧瑙勬牸', width: 200 }
+ , { field: '璁惧鍨嬪彿', title: '璁惧鍨嬪彿', width: 200 }
+ , { field: '閰嶄欢浠g爜', title: '閰嶄欢浠g爜', width: 200 }
+ , { field: '閰嶄欢鍚嶇О', title: '閰嶄欢鍚嶇О', width: 200 }
+ , { field: '鍒跺崟浜�', title: '鍒跺崟浜�' }
+ , { field: '鍒跺崟鏃ユ湡', title: '鍒跺崟鏃ユ湡', templet: "<div>{{d.鍒跺崟鏃ユ湡 ==null ?'':layui.util.toDateString(d.鍒跺崟鏃ユ湡, 'yyyy-MM-dd')}}</div>" }
+ , { field: '瀹℃牳浜�', title: '瀹℃牳浜�' }
+ , { field: '瀹℃牳鏃ユ湡', title: '瀹℃牳鏃ユ湡', templet: "<div>{{d.瀹℃牳鏃ユ湡 ==null ?'':layui.util.toDateString(d.瀹℃牳鏃ユ湡, 'yyyy-MM-dd')}}</div>" }
+
+ ]]
+ };
+ option3.data = [];
+ table3.render(option3);
layer.close(ajaxLoad);
}
//鍔犺浇缃戞牸
@@ -348,6 +508,9 @@
option.data = data1.data;
table.render(option);
layer.close(index);
+ if ($("#ColName option").length < 1) {
+ ColFilter();
+ }
} else {
layer.close(index);
layer.alert("娌℃湁鏁版嵁璁板綍!", { icon: 5 });
@@ -384,7 +547,83 @@
var HBillNo = $("#HBillNo").val();//鍗曟嵁鍙�
var HEquipType = $("#HEquipType").val();//鍒跺崟浜�
var BenginHCreateDate = $("#BenginHCreateDate").val();//寮�濮嬪埗鍗曟椂闂�
- var EndHCreateDate = $("#EndHCreateDate").val();//缁撴潫鍒跺崟鏃堕棿
+ var EndHCreateDate = $("#EndHCreateDate").val();//
+
+ //浠绘剰瀛楁杩囨护
+ var ColName = $("#ColName").val();//澶嶉�夋
+ var Comparator = $("#Comparator").val()
+ var ColContent = $("#ColContent").val();
+ var ColName1 = $("#ColName1").val();//澶嶉�夋
+ var Comparator1 = $("#Comparator1").val()
+ var ColContent1 = $("#ColContent1").val();
+ var ColName2 = $("#ColName2").val();//澶嶉�夋
+ var Comparator2 = $("#Comparator2").val()
+ var ColContent2 = $("#ColContent2").val();
+
+ if (ColName != 0 && Comparator != 0) {
+ var com = "";
+ switch (Comparator) {
+ case "7":
+ com = "like'%" + ColContent + "%'";
+ break;
+ case "8":
+ com = "like'%" + ColContent + "'";
+ break;
+ case "9":
+ com = "like'" + ColContent + "%'";
+ break;
+ case "10":
+ com = "not like'%" + ColContent + "%'";
+ break;
+ default:
+ com = "" + Comparator + "'" + ColContent + "'";
+ break;
+ }
+ sWhere += " and " + ColName + " " + com;
+ }
+ if (ColName1 != 0 && Comparator1 != 0) {
+ var com1 = "";
+ switch (Comparator1) {
+ case "7":
+ com1 = "like'%" + ColContent1 + "%'";
+ break;
+ case "8":
+ com1 = "like'%" + ColContent1 + "'";
+ break;
+ case "9":
+ com1 = "like'" + ColContent1 + "%'";
+ break;
+ case "10":
+ com1 = "not like'%" + ColContent1 + "%'";
+ break;
+ default:
+ com1 = "" + Comparator1 + "'" + ColContent1 + "'";
+ break;
+ }
+ sWhere += " and " + ColName1 + " " + com1;
+ }
+ if (ColName2 != 0 && Comparator2 != 0) {
+ var com2 = "";
+ switch (Comparator2) {
+ case "7":
+ com2 = "like'%" + ColContent2 + "%'";
+ break;
+ case "8":
+ com2 = "like'%" + ColContent2 + "'";
+ break;
+ case "9":
+ com2 = "like'" + ColContent2 + "%'";
+ break;
+ case "10":
+ com2 = "not like'%" + ColContent2 + "%'";
+ break;
+ default:
+ com2 = "" + Comparator2 + "'" + ColContent2 + "'";
+ break;
+ }
+ sWhere += " and " + ColName2 + " " + com2;
+ }
+
if (HBillNo) {
sWhere += " and 鍗曟嵁鍙� like '%" + HBillNo + "%'";
}
@@ -395,7 +634,7 @@
sWhere += " and CONVERT(varchar(100),鏃ユ湡, 23) >= '" + BenginHCreateDate + "'";
}
if (EndHCreateDate) {
- sWhere += " and CONVERT(varchar(100),鏃ユ湡, 23) >= '" + EndHCreateDate + "'";
+ sWhere += " and CONVERT(varchar(100),鏃ユ湡, 23) <= '" + EndHCreateDate + "'";
}
get_Display(sWhere);
sWhere = "";//璋冪敤鎺ュ彛鍚庢竻绌簊Where缂撳瓨
@@ -405,13 +644,40 @@
//$("#HBillType").val("");//鍗曟嵁绫诲瀷
$("#HBillNo").val("");//鍗曟嵁鍙�
$("#HEquipType").val("");//璁惧绫诲瀷
- $("#BenginHCreateDate").val("");//寮�濮嬪埗鍗曟椂闂�
- $("#EndHCreateDate").val("");//缁撴潫鍒跺崟鏃堕棿
+ $("#BenginHCreateDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd"));//寮�濮嬫棩鏈�
+ $("#EndHCreateDate").val(Format(new Date(), "yyyy-MM-dd"));//缁撴潫鏃ユ湡
+ $("#ColContent").val("");
+ $("#ColName").val("0");
+ $("#Comparator").val("0");
+ $("#ColContent1").val("");
+ $("#ColName1").val("0");
+ $("#Comparator1").val("0");
+ $("#ColContent2").val("");
+ $("#ColName2").val("0");
+ $("#Comparator2").val("0");
+ form.render('select');
+
sWhere = "";
$("#btnSearch").click();
}
-
+ //#region 浠绘剰瀛楁杩囨护锛氬垪鍚嶆樉绀轰笅鎷夋
+ function ColFilter() {
+ var Organization = '<option value="0" selected="selected" ></option>';
+ for (var i = 1; i < option.cols[0].length; i++) {
+ if (option.cols[0][i].hide != true) {
+ Organization += '<option style="color:blue;" value="' + option.cols[0][i].field + '">' + option.cols[0][i].field + '</option>';
+ }
+ }
+ $("#ColName").empty();
+ $("#ColName").append(Organization);
+ $("#ColName1").empty();
+ $("#ColName1").append(Organization);
+ $("#ColName2").empty();
+ $("#ColName2").append(Organization);
+ form.render('select');
+ }
+ //#endregion
//#endregion
});
--
Gitblit v1.9.1