From 7df042662e1929abdd667cfd7b037f4e10e8c2ad Mon Sep 17 00:00:00 2001
From: zrg <z18737863051@163.com>
Date: 星期四, 14 三月 2024 11:27:56 +0800
Subject: [PATCH] 其他应付单 增加子表保存,目录放到采购管理,其他入库单编辑模块 并完善 其他出库单 列表功能;( 常规 功能, 新增,修改,删除,审核,作废,关闭,自定义过滤,源单类型列表(源单 手工录入), 合计行,保存控制,审核控制,删除控制,关联数回填 等等 ) (注: 基础资料选择, 均用 基础资料列表 的方式)
---
WebTM/views/采购管理/委外订单/WW_EntrustOrderBillList.html | 346 +++++++++++++++++++++++++++++++++++++++++++--------------
1 files changed, 260 insertions(+), 86 deletions(-)
diff --git "a/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\345\247\224\345\244\226\350\256\242\345\215\225/WW_EntrustOrderBillList.html" "b/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\345\247\224\345\244\226\350\256\242\345\215\225/WW_EntrustOrderBillList.html"
index 5f832d2..69b0ffa 100644
--- "a/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\345\247\224\345\244\226\350\256\242\345\215\225/WW_EntrustOrderBillList.html"
+++ "b/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\345\247\224\345\244\226\350\256\242\345\215\225/WW_EntrustOrderBillList.html"
@@ -15,7 +15,9 @@
<script src="../../../layuiadmin/Scripts/webConfig.js"></script>
<script src="../../../layuiadmin/PubCustom.js"></script>
<script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script>
-
+ <script src="../../../layuiadmin/HideButton.js"></script>
+ <script src="../../../layuiadmin/soulTable.slim.js"></script>
+ <script src="../../../layuiadmin/PageTitle.js"></script>
</head>
<body>
<div class="layui-fluid">
@@ -153,17 +155,19 @@
<table class="" id="mainTable" lay-filter="mainTable"></table>
<script type="text/html" id="toolbarDemo">
<div class="layui-btn-container">
- <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-getCheckData"><i class="layui-icon layui-icon-tips"></i>棰勮</button>-->
- <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-fp"><i class="layui-icon layui-icon-tips"></i>鍒嗛厤</button>
- <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-fb"><i class="layui-icon layui-icon-tips"></i>鍙戝竷</button>
- <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-back"><i class="layui-icon layui-icon-close-fill"></i>鎾ら攢</button>
- <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-yxj"><i class="layui-icon layui-icon-tips"></i>浼樺厛绾�</button>
- <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Refresh"><i class="layui-icon layui-icon-refresh"></i>鍒锋柊</button>
- <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-confirm" id="btn_confirm"><i class="layui-icon layui-icon-ok-circle"></i>纭</button>
+ <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-getCheckData" id="getCheckData"><i class="layui-icon layui-icon-tips"></i>棰勮</button>-->
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-fp" id="fp"><i class="layui-icon layui-icon-tips"></i>鍒嗛厤</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-fb" id="fb"><i class="layui-icon layui-icon-tips"></i>鍙戝竷</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-back" id="back"><i class="layui-icon layui-icon-close-fill"></i>鎾ら攢</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-yxj" id="yxj"><i class="layui-icon layui-icon-tips"></i>浼樺厛绾�</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Refresh" id="Refresh"><i class="layui-icon layui-icon-refresh"></i>鍒锋柊</button>
+ <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-confirm" id="btn_confirm" id="HideButton"><i class="layui-icon layui-icon-ok-circle"></i>纭</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-back" id="btn_back"><i class="layui-icon layui-icon-close-fill"></i>椹冲洖</button>
- <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-details"><i class="layui-icon layui-icon-form"></i>璇︽儏</button>
- <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-generate"><i class="layui-icon layui-icon-file"></i>鐢熸垚閫佽揣鍗�</button>-->
- <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Exit"><i class="layui-icon layui-icon-return"></i>閫�鍑�</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-details" id="details"><i class="layui-icon layui-icon-form"></i>璇︽儏</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-generate" id="generate"><i class="layui-icon layui-icon-file"></i>鐢熸垚閫佽揣鍗�</button>-->
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="set_HideColumn" id="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="get_Exit" id="Exit"><i class="layui-icon layui-icon-return"></i>閫�鍑�</button>
<!--<button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnResCnz" id="btnReSearch" style="padding:0 5px">閲嶆柊鍚屾</button>-->
</div>
@@ -178,7 +182,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
@@ -189,11 +193,20 @@
, laypage = layui.laypage
, laydate = layui.laydate
, util = layui.util
+ , soulTable = layui.soulTable
//鏌ヨ鏉′欢
var sWhere = "";
var option = [];
var Name = "MouldProdInHouseCellWidth";
+ var HModName = "WW_EntrustOrderBillList";
//#endregion
+
+ //#region 銆愬姩鎬佽幏鍙栨ā鍧楀悕绉般��
+ var HModuleType = "1601";
+ //閫氳繃鍗曟嵁绫诲瀷锛屼粠鏁版嵁搴撳姩鎬佽幏鍙栧崟鎹ā鍧楀懡鍚�,寮曠敤js鏂囦欢 PageTitle.js
+ var HPageTitle = get_PageTitle(HModuleType) == "" ? document.title : get_PageTitle(HModuleType);
+ //#endregion
+
//#region 杩涘叆椤甸潰鏃㈠姞杞�
set_ClearBill();
@@ -236,6 +249,15 @@
case 'btn-yxj': set_Yxj();
break;
case 'btn-back': set_Back();
+ break;
+ //鍒楄缃�
+ case 'set_HideColumn': get_HideColumn();
+ break;
+ //鎸夐挳璁剧疆
+ case 'set_HideButton':
+ var btns = document.getElementsByTagName("button"); //鑾峰彇鏈〉鎵�鏈夋寜閽璞�
+ var HBillType = "1601";
+ get_HideButton(btns, HBillType, HModName, sessionStorage["HUserName"]);
break;
};
});
@@ -298,84 +320,86 @@
get_FastQuery(table, option)
//鍔犺浇涓氬姟鍛�
get_HEmpName();
+ //闅愯棌鍕鹃�夊瓧娈�
+ DisPlay_HideColumn();
}
//鍒濆鍖栬〃鏍�
function set_InitGrid() {
$("#HBeginDate").val("2022-03-14");
$("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));
var columns = [
- { type: 'checkbox', fixed: 'left', totalRowText: '鍚堣' }
+ { type: 'checkbox', fixed: 'left', totalRowText: '鍚堣'}
, { field: 'hmainid', title: 'hmainid', sort: true, hide: true }
- , { field: '鏃ユ湡', title: '鏃ユ湡', width: 120, templet: "<div>{{d.鏃ユ湡 ==null ?'':layui.util.toDateString(d.鏃ユ湡, 'yyyy-MM-dd')}}</div>" }
- , { field: '鍗曟嵁鍙�', title: '鍗曟嵁鍙�', width: 150 }
- , { field: '渚涘簲鍟�', title: '渚涘簲鍟�', width: 150 }
- , { field: '涓氬姟鍛�', title: '涓氬姟鍛�', width: 100 }
- , { field: 'HBillType', title: 'HBillType', hide: true }
- , { field: 'HSupID', title: 'HSupID', hide: true }
- , { field: '涓氬姟鐘舵��', title: '涓氬姟鐘舵��', width: 100 , hide: true }
- , { field: '鍒嗛厤鐘舵��', title: '鍒嗛厤鐘舵��', width: 100 }
- , { field: '鍙戝竷鐘舵��', title: '鍙戝竷鐘舵��', width: 100 }
- , { field: '渚涘簲鍟嗗崗鍚岀姸鎬�', title: '渚涘簲鍟嗗崗鍚岀姸鎬�', width: 135 }/*鐗╂枡浠g爜锛岀墿鏂欏悕绉帮紝瑙勬牸鍨嬪彿锛屾壒鍙凤紝鏁伴噺锛屽崟浣嶏紝婧愬崟鍗曞彿*/
- , { field: '鍙嶉鐘舵��', title: '渚涘簲鍟嗗弽棣堢姸鎬�', width: 135 }
- , { field: '鐗╂枡缂栫爜', title: '鐗╂枡缂栫爜', width: 130 }
- , { field: '鐗╂枡浠g爜', title: '鐗╂枡浠g爜', width: 130 }
- , { field: '鐗╂枡鍚嶇О', title: '鐗╂枡鍚嶇О', width: 120 }
- , { field: '鏁伴噺', title: '璁㈠崟鏁伴噺', width: 100}
- , { field: '鎵撳嵃鏉$爜鏁伴噺', title: '鎵撳嵃鏉$爜鏁伴噺', width: 120}
- , { field: '鍏宠仈鏁伴噺', title: '宸插彂璐ф暟閲�', width: 120 }
- , { field: '鏈叧鑱旀暟閲�', title: '鏈凡鍙戣揣鏁伴噺', width: 120 }
- , { field: '瀹屾垚鐘舵��', title: '瀹屾垚鐘舵��', width: 100 }
- , { field: 'HUnitID', title: 'HUnitID', hide: true }
- , { field: '璁¢噺鍗曚綅浠g爜', title: '璁¢噺鍗曚綅浠g爜', width: 120 }
- , { field: '璁¢噺鍗曚綅', title: '璁¢噺鍗曚綅', width: 100 }
- , { field: '瑙勬牸鍨嬪彿', title: '瑙勬牸鍨嬪彿', width: 100 }
- , { field: '鎵瑰彿', title: '鎵瑰彿', width: 100 }
- , { field: '婧愬崟鍗曞彿', title: '婧愬崟鍗曞彿', width: 100 }
- , { field: '渚涘簲鍟嗕唬鐮�', title: '渚涘簲鍟嗕唬鐮�', width: 120, hide: true}
- , { field: '涓氬姟鍛樹唬鐮�', title: '涓氬姟鍛樹唬鐮�', width: 100, hide: true }
- , { field: 'HPriority', title: 'HPriority', width: 100, hide: true }
- , { field: '浼樺厛绾�', title: '浼樺厛绾�', width: 100 }
- , { field: '浜よ揣鍦扮偣', title: '浜よ揣鍦扮偣', width: 100 }
- , { field: 'HPSStyleID', title: 'HPSStyleID', hide: true }
- , { field: '閲囪喘鏂瑰紡浠g爜', title: '閲囪喘鏂瑰紡浠g爜', width: 120 }
- , { field: '閲囪喘鏂瑰紡', title: '閲囪喘鏂瑰紡', width: 100 }
- , { field: 'HSSID', title: 'HSSID', hide: true }
- , { field: '缁撶畻鏂瑰紡浠g爜', title: '缁撶畻鏂瑰紡浠g爜', width: 120 }
- , { field: '缁撶畻鏂瑰紡', title: '缁撶畻鏂瑰紡', width: 100 }
- , { field: '缁撶畻鏃ユ湡', title: '缁撶畻鏃ユ湡', width: 120, templet: "<div>{{d.鏃ユ湡 ==null ?'':layui.util.toDateString(d.缁撶畻鏃ユ湡, 'yyyy-MM-dd')}}</div>" }
- , { field: 'HCurID', title: 'HCurID', hide: true }
- , { field: '甯佸埆浠g爜', title: '甯佸埆浠g爜', width: 100 }
- , { field: '甯佸埆', title: '甯佸埆', width: 100 }
- , { field: '姹囩巼', title: '姹囩巼', width: 100 }
- , { field: 'HDeptID', title: 'HDeptID', hide: true }
- , { field: '閮ㄩ棬浠g爜', title: '閮ㄩ棬浠g爜', width: 100 }
- , { field: '閮ㄩ棬', title: '閮ㄩ棬', width: 100 }
- , { field: 'HManagerID', title: 'HManagerID', hide: true }
- , { field: '涓荤浠g爜', title: '涓荤浠g爜', width: 100 }
- , { field: '涓荤', title: '涓荤', width: 100 }
- , { field: 'HEmpID', title: 'HEmpID', hide: true }
- , { field: '鎽樿', title: '鎽樿', width: 100 }
- , { field: '琛ㄥご澶囨敞', title: '琛ㄥご澶囨敞', width: 100 }
- , { field: 'hsubid', title: 'hsubid', hide: true }
- , { field: 'HMaterID', title: 'HMaterID', hide: true }
- , { field: '鍗曚环', title: '鍗曚环', width: 100 }
- , { field: '閲戦', title: '閲戦', width: 100 }
- , { field: '绋庣巼', title: '绋庣巼', width: 100 }
- , { field: '绋庨', title: '绋庨', width: 100 }
- , { field: '浠风◣鍚堣', title: '浠风◣鍚堣', width: 100 }
- , { field: '浜よ揣鏃ユ湡', title: '浜よ揣鏃ユ湡', width: 120, templet: "<div>{{d.鏃ユ湡 ==null ?'':layui.util.toDateString(d.浜よ揣鏃ユ湡, 'yyyy-MM-dd')}}</div>" }
- , { field: '璁″垝璺熻釜鍙�', title: '璁″垝璺熻釜鍙�', width: 100 }
- , { field: '琛ㄤ綋澶囨敞', title: '琛ㄤ綋澶囨敞', width: 100 }
- , { field: '鍒跺崟浜�', title: '鍒跺崟浜�', width: 100 }
- , { field: '鍒跺崟鏃ユ湡', title: '鍒跺崟鏃ユ湡', width: 120, templet: "<div>{{d.鏃ユ湡 ==null ?'':layui.util.toDateString(d.鍒跺崟鏃ユ湡, 'yyyy-MM-dd')}}</div>" }
- , { field: '瀹℃牳浜�', title: '瀹℃牳浜�', width: 100 }
- , { field: '瀹℃牳鏃ユ湡', title: '瀹℃牳鏃ユ湡', width: 120, templet: "<div>{{d.鏃ユ湡 ==null ?'':layui.util.toDateString(d.瀹℃牳鏃ユ湡, 'yyyy-MM-dd')}}</div>" }
- , { field: '淇敼浜�', title: '淇敼浜�', width: 100 }
- , { field: '淇敼鏃ユ湡', title: '淇敼鏃ユ湡', width: 120, templet: "<div>{{d.鏃ユ湡 ==null ?'':layui.util.toDateString(d.淇敼鏃ユ湡, 'yyyy-MM-dd')}}</div>" }
- , { field: '鍏抽棴浜�', title: '鍏抽棴浜�', width: 100 }
- , { field: '鍏抽棴鏃ユ湡', title: '鍏抽棴鏃ユ湡', width: 120, templet: "<div>{{d.鏃ユ湡 ==null ?'':layui.util.toDateString(d.鍏抽棴鏃ユ湡, 'yyyy-MM-dd')}}</div>" }
- , { field: '浣滃簾浜�', title: '浣滃簾浜�', width: 100 }
- , { field: '浣滃簾鏃ユ湡', title: '浣滃簾鏃ユ湡', width: 120, templet: "<div>{{d.鏃ユ湡 ==null ?'':layui.util.toDateString(d.浣滃簾鏃ユ湡, 'yyyy-MM-dd')}}</div>" }
+ , { field: '鏃ユ湡', title: '鏃ユ湡', width: 120, sort: true, templet: "<div>{{d.鏃ユ湡 ==null ?'':layui.util.toDateString(d.鏃ユ湡, 'yyyy-MM-dd')}}</div>" }
+ , { field: '鍗曟嵁鍙�', title: '鍗曟嵁鍙�', width: 150, sort: true}
+ , { field: '渚涘簲鍟�', title: '渚涘簲鍟�', width: 150, sort: true}
+ , { field: '涓氬姟鍛�', title: '涓氬姟鍛�', width: 100, sort: true }
+ , { field: 'HBillType', title: 'HBillType', hide: true, sort: true}
+ , { field: 'HSupID', title: 'HSupID', hide: true, sort: true }
+ , { field: '涓氬姟鐘舵��', title: '涓氬姟鐘舵��', width: 100, hide: true, sort: true}
+ , { field: '鍒嗛厤鐘舵��', title: '鍒嗛厤鐘舵��', width: 100, sort: true }
+ , { field: '鍙戝竷鐘舵��', title: '鍙戝竷鐘舵��', width: 100, sort: true }
+ , { field: '渚涘簲鍟嗗崗鍚岀姸鎬�', title: '渚涘簲鍟嗗崗鍚岀姸鎬�', width: 135, sort: true }/*鐗╂枡浠g爜锛岀墿鏂欏悕绉帮紝瑙勬牸鍨嬪彿锛屾壒鍙凤紝鏁伴噺锛屽崟浣嶏紝婧愬崟鍗曞彿*/
+ , { field: '鍙嶉鐘舵��', title: '渚涘簲鍟嗗弽棣堢姸鎬�', width: 135, sort: true}
+ , { field: '鐗╂枡缂栫爜', title: '鐗╂枡缂栫爜', width: 130, sort: true }
+ , { field: '鐗╂枡浠g爜', title: '鐗╂枡浠g爜', width: 130, sort: true}
+ , { field: '鐗╂枡鍚嶇О', title: '鐗╂枡鍚嶇О', width: 120, sort: true}
+ , { field: '鏁伴噺', title: '璁㈠崟鏁伴噺', width: 100, sort: true, totalRow: true}
+ , { field: '鎵撳嵃鏉$爜鏁伴噺', title: '鎵撳嵃鏉$爜鏁伴噺', width: 120, sort: true, totalRow: true}
+ , { field: '鍏宠仈鏁伴噺', title: '宸插彂璐ф暟閲�', width: 120, sort: true, totalRow: true}
+ , { field: '鏈叧鑱旀暟閲�', title: '鏈凡鍙戣揣鏁伴噺', width: 120, sort: true, totalRow: true}
+ , { field: '瀹屾垚鐘舵��', title: '瀹屾垚鐘舵��', width: 100, sort: true}
+ , { field: 'HUnitID', title: 'HUnitID', hide: true, sort: true}
+ , { field: '璁¢噺鍗曚綅浠g爜', title: '璁¢噺鍗曚綅浠g爜', width: 120, sort: true}
+ , { field: '璁¢噺鍗曚綅', title: '璁¢噺鍗曚綅', width: 100, sort: true}
+ , { field: '瑙勬牸鍨嬪彿', title: '瑙勬牸鍨嬪彿', width: 100, sort: true}
+ , { field: '鎵瑰彿', title: '鎵瑰彿', width: 100, sort: true}
+ , { field: '婧愬崟鍗曞彿', title: '婧愬崟鍗曞彿', width: 100, sort: true }
+ //, { field: '渚涘簲鍟嗕唬鐮�', title: '渚涘簲鍟嗕唬鐮�', width: 120, hide: true}
+ //, { field: '涓氬姟鍛樹唬鐮�', title: '涓氬姟鍛樹唬鐮�', width: 100, hide: true }
+ //, { field: 'HPriority', title: 'HPriority', width: 100, hide: true }
+ , { field: '浼樺厛绾�', title: '浼樺厛绾�', width: 100, sort: true}
+ , { field: '浜よ揣鍦扮偣', title: '浜よ揣鍦扮偣', width: 100, sort: true}
+ //, { field: 'HPSStyleID', title: 'HPSStyleID', hide: true }
+ , { field: '閲囪喘鏂瑰紡浠g爜', title: '閲囪喘鏂瑰紡浠g爜', width: 120, sort: true}
+ , { field: '閲囪喘鏂瑰紡', title: '閲囪喘鏂瑰紡', width: 100, sort: true}
+ //, { field: 'HSSID', title: 'HSSID', hide: true }
+ , { field: '缁撶畻鏂瑰紡浠g爜', title: '缁撶畻鏂瑰紡浠g爜', width: 120, sort: true}
+ , { field: '缁撶畻鏂瑰紡', title: '缁撶畻鏂瑰紡', width: 100, sort: true}
+ , { field: '缁撶畻鏃ユ湡', title: '缁撶畻鏃ユ湡', width: 120, sort: true, templet: "<div>{{d.鏃ユ湡 ==null ?'':layui.util.toDateString(d.缁撶畻鏃ユ湡, 'yyyy-MM-dd')}}</div>" }
+ //, { field: 'HCurID', title: 'HCurID', hide: true }
+ , { field: '甯佸埆浠g爜', title: '甯佸埆浠g爜', width: 100, sort: true}
+ , { field: '甯佸埆', title: '甯佸埆', width: 100, sort: true}
+ , { field: '姹囩巼', title: '姹囩巼', width: 100, sort: true}
+ //, { field: 'HDeptID', title: 'HDeptID', hide: true }
+ , { field: '閮ㄩ棬浠g爜', title: '閮ㄩ棬浠g爜', width: 100, sort: true}
+ , { field: '閮ㄩ棬', title: '閮ㄩ棬', width: 100, sort: true}
+ //, { field: 'HManagerID', title: 'HManagerID', hide: true }
+ , { field: '涓荤浠g爜', title: '涓荤浠g爜', width: 100, sort: true}
+ , { field: '涓荤', title: '涓荤', width: 100, sort: true}
+ //, { field: 'HEmpID', title: 'HEmpID', hide: true }
+ , { field: '鎽樿', title: '鎽樿', width: 100, sort: true}
+ , { field: '琛ㄥご澶囨敞', title: '琛ㄥご澶囨敞', width: 100, sort: true}
+ //, { field: 'hsubid', title: 'hsubid', hide: true }
+ //, { field: 'HMaterID', title: 'HMaterID', hide: true }
+ , { field: '鍗曚环', title: '鍗曚环', width: 100, sort: true}
+ , { field: '閲戦', title: '閲戦', width: 100, sort: true, totalRow: true}
+ , { field: '绋庣巼', title: '绋庣巼', width: 100, sort: true}
+ , { field: '绋庨', title: '绋庨', width: 100, sort: true}
+ , { field: '浠风◣鍚堣', title: '浠风◣鍚堣', width: 100, sort: true}
+ , { field: '浜よ揣鏃ユ湡', title: '浜よ揣鏃ユ湡', width: 120, sort: true, templet: "<div>{{d.鏃ユ湡 ==null ?'':layui.util.toDateString(d.浜よ揣鏃ユ湡, 'yyyy-MM-dd')}}</div>" }
+ , { field: '璁″垝璺熻釜鍙�', title: '璁″垝璺熻釜鍙�', width: 100, sort: true}
+ , { field: '琛ㄤ綋澶囨敞', title: '琛ㄤ綋澶囨敞', width: 100, sort: true}
+ , { field: '鍒跺崟浜�', title: '鍒跺崟浜�', width: 100, sort: true}
+ , { field: '鍒跺崟鏃ユ湡', title: '鍒跺崟鏃ユ湡', width: 120, sort: true, templet: "<div>{{d.鏃ユ湡 ==null ?'':layui.util.toDateString(d.鍒跺崟鏃ユ湡, 'yyyy-MM-dd')}}</div>" }
+ , { field: '瀹℃牳浜�', title: '瀹℃牳浜�', width: 100, sort: true}
+ , { field: '瀹℃牳鏃ユ湡', title: '瀹℃牳鏃ユ湡', width: 120, sort: true, templet: "<div>{{d.鏃ユ湡 ==null ?'':layui.util.toDateString(d.瀹℃牳鏃ユ湡, 'yyyy-MM-dd')}}</div>" }
+ , { field: '淇敼浜�', title: '淇敼浜�', width: 100, sort: true}
+ , { field: '淇敼鏃ユ湡', title: '淇敼鏃ユ湡', width: 120, sort: true, templet: "<div>{{d.鏃ユ湡 ==null ?'':layui.util.toDateString(d.淇敼鏃ユ湡, 'yyyy-MM-dd')}}</div>" }
+ , { field: '鍏抽棴浜�', title: '鍏抽棴浜�', width: 100, sort: true}
+ , { field: '鍏抽棴鏃ユ湡', title: '鍏抽棴鏃ユ湡', width: 120, sort: true, templet: "<div>{{d.鏃ユ湡 ==null ?'':layui.util.toDateString(d.鍏抽棴鏃ユ湡, 'yyyy-MM-dd')}}</div>" }
+ , { field: '浣滃簾浜�', title: '浣滃簾浜�', width: 100, sort: true}
+ , { field: '浣滃簾鏃ユ湡', title: '浣滃簾鏃ユ湡', width: 120, sort: true, templet: "<div>{{d.鏃ユ湡 ==null ?'':layui.util.toDateString(d.浣滃簾鏃ユ湡, 'yyyy-MM-dd')}}</div>" }
];
option = {
@@ -389,7 +413,7 @@
, cols: [columns]
, limits: [500, 5000, 20000]
, done: function (res, curr, count) {
-
+ soulTable.render(this);
}
};
////璁剧疆鍒楀
@@ -427,6 +451,12 @@
DataList = data1.data;
option.data = data1.data;
table.render(option);
+
+ //鍒锋柊鎸夐挳鏄剧ず
+ var btns = document.getElementsByTagName("button"); //鑾峰彇鏈〉鎵�鏈夋寜閽璞�
+ var HBillType = "1601";
+ Display_HideButton(btns, HBillType, HModName, sessionStorage["HUserName"]);
+
layer.close(wait);
} else {
layer.close(wait);
@@ -443,7 +473,7 @@
layer.open({
type: 2,
skin: 'layui-layer-rim', //鍔犱笂杈规
- title: '鏂板鍣ㄥ叿閲囪喘鍏ュ簱鍗�',
+ title: '鏂板' + HPageTitle,
closeBtn: 1,
shift: 2,
area: ['100%', '100%'],
@@ -468,7 +498,7 @@
layer.open({
type: 2
, area: ['100%', '100%']
- , title: '缂栬緫鍣ㄥ叿閲囪喘鍏ュ簱鍗�'
+ , title: '缂栬緫' + HPageTitle
, closeBtn: 1
, shade: 0.6 //閬僵閫忔槑搴�
, maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
@@ -525,6 +555,27 @@
layer.msg('璇烽�夋嫨涓�琛屾暟鎹垹闄わ紒');
}
}
+
+ //#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
//棰勮
function get_ViewReport() {
@@ -1103,6 +1154,129 @@
}
})
}
+
+ //闅愯棌鍒楄缃�
+ function get_HideColumn() {
+ var colName = "";
+ var contentUrl = "";
+ for (var i = 1; i < option.cols[0].length - 1; 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);//鍏抽棴寮圭獥
+ }
+ })
+ }
+
+ //鏄剧ず鍒楁暟鎹�
+ 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 = ["hmainid", "HBillType", "HSupID", "涓氬姟鐘舵��", "HUnitID", "渚涘簲鍟嗕唬鐮�", "涓氬姟鍛樹唬鐮�", "HPriority", "HPSStyleID", "HSSID", "HCurID", "HDeptID", "HManagerID", "HEmpID", "hsubid","HMaterID"];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
+
+ dataCol = data1.data[0].HGridString.split(',');
+
+ for (var i = 0; i < option.cols[0].length - 2; 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 (data1.data[0].HColumnWidth != 0) {
+ // option.cols[0][i + 1]["width"] = data1.data[0].HColumnWidth + "px;";
+ //} else {
+ // option.cols[0][i + 1]["width"] = "";
+ //}
+ //鏄剧ず鍒�
+ 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);
+ }
+
+ var btns = document.getElementsByTagName("button"); //鑾峰彇鏈〉鎵�鏈夋寜閽璞�
+ var HBillType = "1601";
+ Display_HideButton(btns, HBillType, HModName, sessionStorage["HUserName"]);
+
+ }, error: function () {
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ }
+ })
+ }
//浠ヤ笂鏄痩ayui妯″潡
});
</script>
--
Gitblit v1.9.1