From 727ee25aeb5fcaf84e2cf009b2eacd3a86bcb3ca Mon Sep 17 00:00:00 2001
From: zrg <z18737863051@163.com>
Date: 星期四, 28 十一月 2024 12:55:23 +0800
Subject: [PATCH] 新增 环境检测方案,环境检测单
---
WebTM/views/采购管理/采购订单/Cg_POOrderBillQuery.html | 177 +++++++++++++++-------------------------------------------
1 files changed, 47 insertions(+), 130 deletions(-)
diff --git "a/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\351\207\207\350\264\255\350\256\242\345\215\225/Cg_POOrderBillQuery.html" "b/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\351\207\207\350\264\255\350\256\242\345\215\225/Cg_POOrderBillQuery.html"
index ae329bf..76e1570 100644
--- "a/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\351\207\207\350\264\255\350\256\242\345\215\225/Cg_POOrderBillQuery.html"
+++ "b/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\351\207\207\350\264\255\350\256\242\345\215\225/Cg_POOrderBillQuery.html"
@@ -23,6 +23,7 @@
background: #ceedfa;
color: black
}
+
</style>
</head>
@@ -210,7 +211,7 @@
<button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_ReadScheme" id="set_ReadScheme"><i class="layui-icon layui-icon-set"></i>璇诲彇鏂规</button>
</div>
</script>
- <table class="" id="mainTableSub" lay-filter="mainTableSub"></table>
+ <table class="" id="mainTableSub" lay-filter="mainTableSub" style="margin-top:35px"></table>
<script type="text/html" id="toolbarDemoSub">
<div class="layui-btn-container">
<button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_CloseRow" id="set_CloseRow"><i class="layui-icon layui-icon-form"></i>琛屽叧闂�</button>
@@ -291,8 +292,8 @@
case 'btn-Delete': set_DeleteBill();
break;
//娴忚
- case 'btn-view': get_ViewReport();
- break;
+ //case 'btn-view': get_ViewReport();
+ // break;
//鎵撳嵃
case 'btn-print': get_PrintReport();
break;
@@ -452,7 +453,7 @@
$("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));
//鍒濆鍖栬〃鏍�
set_InitGrid();
- //鐩存帴鎵ц鍒楄〃绛涢�� 鍔犺浇鏁版嵁鍒扮綉鏍�
+ ////鐩存帴鎵ц鍒楄〃绛涢�� 鍔犺浇鏁版嵁鍒扮綉鏍�
get_FastQuery(table, option,1)
//鏌ヨ褰撳墠鐧诲綍鐢ㄦ埛鏈夋病鏈夊湪褰撳墠妯″潡璁剧疆榛樿杩囨护鏂规
@@ -463,108 +464,13 @@
option = {
elem: '#mainTable'
, toolbar: '#toolbarDemo'
- , height: 'full-330'
+ , height: 'full-300'
, page: true
, totalRow: true
, cellMinWidth: 90
, limit: 50
, limits: [50, 500, 5000, 20000]
- , cols: [[
- { 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: 100, sort: true }
- , { field: 'HBillType', title: 'HBillType', hide: true, sort: true }
- , { field: '琛岀姸鎬�', title: '琛岀姸鎬�', width: 125, sort: true }
- , { 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: 120 }
- , { field: '鐗╂枡浠g爜', title: '鐗╂枡浠g爜', width: 130 }
- , { field: '鏃х墿鏂欑紪鐮�', title: '鏃х墿鏂欑紪鐮�', width: 130 }
- , { field: '鐗╂枡鍚嶇О', title: '鐗╂枡鍚嶇О', width: 130 }
- , { field: '鏁伴噺', title: '璁㈠崟鏁伴噺', width: 100, totalRow: true }
- , { field: '鎵撳嵃鏉$爜鏁伴噺', title: '鎵撳嵃鏉$爜鏁伴噺', width: 120, totalRow: true }
- /* 瀹夌憺鏂板瀛楁 begin */
- , { field: '鍙墦鍗版潯鐮佹暟閲�', title: '鍙墦鍗版潯鐮佹暟閲�', width: 120, totalRow: true}
- /* 瀹夌憺鏂板瀛楁 end */
- , { field: '鍏宠仈鏁伴噺', title: '宸插彂璐ф暟閲�', width: 120, totalRow: true}
- , { field: '鏈叧鑱旀暟閲�', title: '鍙彂璐ф暟閲�', width: 120, totalRow: true}
- /* 瀹夌憺鏂板瀛楁 begin */
- , { field: '閫�鏂欐暟閲�', title: '閫�鏂欐暟閲�', width: 120, totalRow: true}
- , { field: '瀹炴敹鏁伴噺', title: '瀹炴敹鏁伴噺', width: 120, totalRow: true}
- , { field: '鍏ュ簱鏁伴噺', title: '鍏ュ簱鏁伴噺', width: 120, totalRow: true}
- , { field: '鍓╀綑鍏ュ簱鏁伴噺', title: '鍓╀綑鍏ュ簱鏁伴噺', width: 120, totalRow: true}
- , { field: '鍓╀綑鏀舵枡鏁伴噺', title: '鍓╀綑鏀舵枡鏁伴噺', width: 120, totalRow: true}
- /* 瀹夌憺鏂板瀛楁 end */
- , { field: '瀹屾垚鐘舵��', title: '瀹屾垚鐘舵��', width: 100 }
- , { field: 'HUnitID', title: 'HUnitID', hide: true }
- , { field: '瑙勬牸鍨嬪彿', title: '瑙勬牸鍨嬪彿', width: 100 }
- //, { field: 'HUnitID', title: 'HUnitID', hide: true } 閲嶅
- , { field: '璁¢噺鍗曚綅浠g爜', title: '璁¢噺鍗曚綅浠g爜', width: 120 , hide: true }
- , { field: '璁¢噺鍗曚綅', title: '璁¢噺鍗曚綅', width: 100 }
- , { field: '鎵瑰彿', title: '鎵瑰彿', width: 100 }
- , { field: '鏁伴噺', title: '鏁伴噺', width: 100, totalRow: true }
- , { 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, hide: true }
- , { 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, hide: true }
- , { field: '甯佸埆', title: '甯佸埆', width: 100}
- , { field: '姹囩巼', title: '姹囩巼', width: 100}
- , { field: 'HDeptID', title: 'HDeptID', hide: true }
- , { field: '閮ㄩ棬浠g爜', title: '閮ㄩ棬浠g爜', width: 100, hide: true }
- , { field: '閮ㄩ棬', title: '閮ㄩ棬', width: 100}
- , { field: 'HManagerID', title: 'HManagerID', hide: true }
- , { field: '涓荤浠g爜', title: '涓荤浠g爜', width: 100, hide: true }
- , { field: '涓荤', title: '涓荤', width: 100}
- , { field: 'HEmpID', title: 'HEmpID', hide: true }
- , { field: '鎽樿', title: '鎽樿', width: 100 }
- , { field: 'HWHID', title: '涓昏〃浠撳簱ID', width: 120, hide: true}
- , { field: '浠撳簱', title: '涓昏〃浠撳簱', width: 100, hide: true}
- , { field: '琛ㄥご澶囨敞', title: '琛ㄥご澶囨敞', width: 100}
- , { field: 'hsubid', title: 'hsubid', hide: true }
- , { field: 'HMaterID', title: 'HMaterID', hide: true }
- , { field: '鍗曚环', title: '鍗曚环', width: 100}
- , { field: '閲戦', title: '閲戦', width: 100, totalRow: true }
- , { 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: 200, templet: "<div>{{d.鍒跺崟鏃ユ湡 ==null ?'':layui.util.toDateString(d.鍒跺崟鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>", sort: true }
- , { field: '瀹℃牳浜�', title: '瀹℃牳浜�', width: 100}
- , { field: '瀹℃牳鏃ユ湡', title: '瀹℃牳鏃ユ湡', width: 120, templet: "<div>{{d.瀹℃牳鏃ユ湡 ==null ?'':layui.util.toDateString(d.瀹℃牳鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
- , { field: '淇敼浜�', title: '淇敼浜�', width: 100}
- , { field: '淇敼鏃ユ湡', title: '淇敼鏃ユ湡', width: 120, templet: "<div>{{d.淇敼鏃ユ湡 ==null ?'':layui.util.toDateString(d.淇敼鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
- , { field: '鍏抽棴浜�', title: '鍏抽棴浜�', width: 100}
- , { field: '鍏抽棴鏃ユ湡', title: '鍏抽棴鏃ユ湡', width: 120, templet: "<div>{{d.鍏抽棴鏃ユ湡 ==null ?'':layui.util.toDateString(d.鍏抽棴鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
- , { field: '琛屽叧闂汉', title: '琛屽叧闂汉', width: 125, sort: true }
- , { field: '琛屽叧闂棩鏈�', title: '琛屽叧闂棩鏈�', width: 200, templet: "<div>{{d.琛屽叧闂汉 == ''?'':layui.util.toDateString(d.琛屽叧闂棩鏈�, 'yyyy-MM-dd HH:mm:ss')}}</div>", sort: true }
- , { field: '浣滃簾浜�', title: '浣滃簾浜�', width: 100}
- , { field: '浣滃簾鏃ユ湡', title: '浣滃簾鏃ユ湡', width: 120, templet: "<div>{{d.浣滃簾鏃ユ湡 ==null ?'':layui.util.toDateString(d.浣滃簾鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
-
- ]]
+ , cols: [[]]
, done: function (res, curr, count) {
soulTable.render(this);
@@ -574,8 +480,8 @@
optionSub = {
elem: '#mainTableSub'
, toolbar: '#toolbarDemoSub'
- , height: 'full-500'
- , page: true
+ //, height: 'full-500'
+ , page: false
, totalRow: true
, cellMinWidth: 90
, limit: 50
@@ -593,6 +499,7 @@
$.ajax({
url: GetWEBURL() + '/Cg_POOrderBill/QueryList',
type: "GET",
+ async: false,
data: { "sWhere": sWhere , "user": sessionStorage["HUserName"]},
success: function (data1) {
if (data1.count == 1) {
@@ -611,7 +518,7 @@
}
}
//鍦ㄥ垪琛ㄥ乏杈规坊鍔犲嬀閫夋
- col.push({ type: 'radio', fixed: 'left', totalRowText: '鍚堣'});
+ col.push({ type: 'checkbox', fixed: 'left', totalRowText: '鍚堣'});
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) {
@@ -635,7 +542,7 @@
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=="琛屽叧闂棩鏈�"?"琛屽叧闂汉":data[i].name) + " ==''?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd HH:mm:ss')}}</div>", width: 200 });
+ col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, templet: "<div>{{layui.util.toDateString(d." + (data[i].name != "鏃ユ湡" ? data[i].name + ", 'yyyy-MM-dd HH:mm:ss'" : data[i].name +", 'yyyy-MM-dd'")+")}}</div>", width: 200 });
break;
default:
col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200 });
@@ -800,7 +707,7 @@
//閫昏緫鍒犻櫎鏂规硶
layer.confirm("纭瑕佸垹闄ゅ悧锛屽垹闄ゅ悗涓嶈兘鎭㈠", { title: "鍒犻櫎纭" }, function (index) {
- if (data[0].鐘舵�� == "鍒涘缓") {
+ /*if (data[0].鐘舵�� == "鍒涘缓") {*/
$.ajax({
type: "GET",
url: GetWEBURL() + "/Cg_POOrderBill/DeltetCg_POOrderBill", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
@@ -825,10 +732,10 @@
layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
}
});
- } else {
- layer.msg('璇ユ潯鏁版嵁涓嶆槸鍒涘缓鐘舵��,鏃犳硶鍒犻櫎锛�');
+ //} else {
+ // layer.msg('璇ユ潯鏁版嵁涓嶆槸鍒涘缓鐘舵��,鏃犳硶鍒犻櫎锛�');
- }
+ //}
})
}
@@ -847,10 +754,7 @@
}
else {
- var hmainid = [];
- for (var i = 0; i < checkStatus.data.length; i++) {
- hmainid.push((data[i].hmainid * (10 ** 8)) + data[i].hsubid)
- }
+ var hmainid = data[0].hmainid.toString();
layer.open({
type: 2
@@ -859,7 +763,7 @@
, shade: 0.6 //閬僵閫忔槑搴�
, maxmin: false //鍏佽鍏ㄥ睆鏈�灏忓寲
, anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
- , content: ['../../BaseSet/SRM_OpenTmpList.html?linterid=' + hmainid.toString() + '&MyMsg=' + hmainid.toString() + '&Type=HPOOrderBill', 'yes']
+ , content: ['../../BaseSet/SRM_OpenTmpList.html?linterid=' + hmainid.toString() + '&MyMsg=' + hmainid.toString() + '&Type=HPOOrderBillByID', 'yes']
, resize: false
})
}
@@ -1279,15 +1183,10 @@
var HInitTimeCycle = $("#HInitTimeCycle").val() * 1;
$("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * HInitTimeCycle), "yyyy-MM-dd")); //寮�濮嬫棩鏈�
$("#HEndDate").val(Format(new Date(), "yyyy-MM-dd")); //缁撴潫鏃ユ湡
- $('#HStatus').find("option[value='-1']").attr("selected", true);
$("#HBillNo").val("");
$("#HEmpName").val("");
- $("#HMaterNumber").val("");
- $("#HOldMaterNumber").val("");
- $("#HMaterShortNumber").val("");
- $("#HMaterName").val("");
$("#HSupName").val("");
- $("#HOrgID").val(sessionStorage["OrganizationID"]);
+ /*$("#HOrgID").val(sessionStorage["OrganizationID"]);*/
$("#ColContent").val("");
$("#ColName").val("0");
$("#Comparator").val("0");
@@ -1417,6 +1316,10 @@
if (dataCols[4] != null && dataCols[4] != "") {
option.cols[0][i + 1]["title"] = dataCols[4];
}
+ //缁熻鍒�
+ if (dataCols[6] == 1) {
+ option.cols[0][i + 1]["totalRow"] = true;
+ }
}
@@ -1534,7 +1437,10 @@
if (dataCols[4] != null && dataCols[4] != "") {
optionSub.cols[0][i + 1]["title"] = dataCols[4];
}
-
+ //缁熻鍒�
+ if (dataCols[6] == 1) {
+ optionSub.cols[0][i + 1]["totalRow"] = true;
+ }
}
//鍙栨秷鍐荤粨鍒�
@@ -1576,15 +1482,26 @@
//#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;
+ }
+ });
//鏄剧ず瀛愯〃
get_DisplaySub(obj.data);
- //鍒ゆ柇鏄惁宸茬粡琚�変腑
- if (obj.tr.find('.layui-form-radioed').length == 0) {
- //瑙﹀彂鍗曢�夋閫変腑浜嬩欢
- obj.tr.find('i[class="layui-anim layui-icon"]').trigger("click");
- }
-
-
+
})
//瀛愯〃鍗曢��
table.on('row(mainTableSub)', function (obj) {
@@ -1691,7 +1608,7 @@
//闅愯棌鏄剧ず杩囨护鏂规鐨勬爣绛句俊鎭�
document.getElementById("HFilterScheme_Now").style.display = "none";
////鎵ц鏌ヨ鏂规硶
- //get_FastQuery()
+ get_FastQuery()
//form.render("select");
}
}, error: function () {
@@ -1885,7 +1802,7 @@
var addSWhere = "";
if (openType == 2) {
- addSWhere = " and 鐘舵�� = '宸插鏍�' and 琛岀姸鎬� = '' and HOrgID = " + HOrgID;
+ addSWhere = " and 瀹℃牳浜�! = '' and 鍏抽棴浜� = ''";
}
return addSWhere;
}
--
Gitblit v1.9.1