From c4e556a509b7fd8084a4aee8f4221158bac6cd3a Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期一, 25 三月 2024 13:11:56 +0800
Subject: [PATCH] 设备负荷分析表
---
WebTM/views/采购管理/采购订单/Cg_POOrderBillList.html | 195 +++++++++++++++++++++++++++++++++++++++++++-----
1 files changed, 172 insertions(+), 23 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_POOrderBillList.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_POOrderBillList.html"
index 544b683..f48d4e7 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_POOrderBillList.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_POOrderBillList.html"
@@ -226,10 +226,13 @@
<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-view" id="view"><i class="layui-icon layui-icon-tips"></i>棰勮</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-print" id="print"><i class="layui-icon layui-icon-print"></i>鎵撳嵃</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="get_Refresh" id="Refresh"><i class="layui-icon layui-icon-refresh-3"></i>鍒锋柊</button>
- <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Audit" id="CheckBill"><i class="layui-icon layui-icon-radio"></i>瀹℃牳</button>
- <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-DeAudit" id="AbandonCheck"><i class="layui-icon layui-icon-circle"></i>鍙嶅鏍�</button>
+ <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="btn-PushPOInStockBills" id="btn-PushPOInStockBills"><i class="layui-icon layui-icon-delete"></i>澶氳涓嬫帹(鏀舵枡閫氱煡鍗�)</button>
+ <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_CheckBill" id="CheckBill"><i class="layui-icon layui-icon-form"></i>瀹℃牳</button>
+ <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_AbandonCheck" id="AbandonCheck"><i class="layui-icon layui-icon-form"></i>鍙嶅鏍�</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Close" id="Close"><i class="layui-icon layui-icon-radio"></i>鍏抽棴</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-DeClose" id="DeClose"><i class="layui-icon layui-icon-radio"></i>鍙嶅叧闂�</button>
+ <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>
+ <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_CancelCloseRow" id="set_CancelCloseRow"><i class="layui-icon layui-icon-form"></i>琛屽弽鍏抽棴</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Drop" id="Drop"><i class="layui-icon layui-icon-radio"></i>浣滃簾</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-DeDrop" id="DeDrop"><i class="layui-icon layui-icon-radio"></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>
@@ -266,6 +269,7 @@
var option = [];
var Name = "MouldProdInHouseCellWidth";
var HModName = "Cg_POOrderBillList";
+ var HBillType = "1102";
//#region 銆愬姩鎬佽幏鍙栨ā鍧楀悕绉般��
var HModuleType = "1102";
@@ -275,7 +279,7 @@
//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
var titleData = ["hmainid","HBillType", "HSupID", "HPSStyleID", "HSSID", "HCurID", "HDeptID", "HManagerID", "HEmpID", "hsubid", "HMaterID", "HUnitID",
- "HFeedback", "HPriority", "HUserID"];
+ "HFeedback", "HPriority", "HUserID","甯佸埆浠g爜","閲囪喘鏂瑰紡浠g爜","缁撶畻鏂瑰紡浠g爜","閮ㄩ棬浠g爜","涓荤浠g爜","涓氬姟鍛樹唬鐮�","璁¢噺鍗曚綅浠g爜"];
//#endregion
//#region 銆愯繃婊ゆ柟妗堛��
@@ -290,6 +294,8 @@
window.HInterID_Choose = 0;
//#endregion
+
+
//#region 杩涘叆椤甸潰鏃㈠姞杞�
set_ClearBill();
@@ -319,13 +325,15 @@
//鍒锋柊
case 'get_Refresh': set_Refresh();
break;
- //瀹℃牳鎸夐挳
- case 'btn-Audit':
- set_CheckBill(1);
+ //澶氳涓嬫帹(鏀舵枡閫氱煡鍗�)
+ case 'btn-PushPOInStockBills':
+ set_PushPOInStockBills();
break;
- //鍙嶅鏍告寜閽�
- case 'btn-DeAudit':
- set_CheckBill(2);
+ //瀹℃牳
+ case 'set_CheckBill': set_CheckBill(0);
+ break;
+ //鍙嶅鏍�
+ case 'set_AbandonCheck': set_CheckBill(1);
break;
//鍏抽棴鎸夐挳 锛�1:鍏抽棴銆�2:鍙嶅叧闂級
case 'btn-Close':
@@ -334,6 +342,12 @@
//鍙嶅叧闂寜閽�
case 'btn-DeClose':
set_CloseBill(2);
+ break;
+ //琛屽叧闂�
+ case 'set_CloseRow': set_CloseRow(0);
+ break;
+ //琛屽弽鍏抽棴
+ case 'set_CancelCloseRow': set_CloseRow(1);
break;
//浣滃簾鎸夐挳 锛�1:浣滃簾銆�2:鍙嶄綔搴燂級
case 'btn-Drop':
@@ -486,6 +500,7 @@
, { 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 }
@@ -517,7 +532,7 @@
, { field: 'HUnitID', title: 'HUnitID', hide: true }
, { field: '瑙勬牸鍨嬪彿', title: '瑙勬牸鍨嬪彿', width: 100 }
//, { field: 'HUnitID', title: 'HUnitID', hide: true } 閲嶅
- , { field: '璁¢噺鍗曚綅浠g爜', title: '璁¢噺鍗曚綅浠g爜', width: 120 }
+ , { field: '璁¢噺鍗曚綅浠g爜', title: '璁¢噺鍗曚綅浠g爜', width: 120 , hide: true }
, { field: '璁¢噺鍗曚綅', title: '璁¢噺鍗曚綅', width: 100 }
, { field: '鎵瑰彿', title: '鎵瑰彿', width: 100 }
, { field: '鏁伴噺', title: '鏁伴噺', width: 100, totalRow: true }
@@ -528,21 +543,21 @@
, { field: '浼樺厛绾�', title: '浼樺厛绾�', width: 100 }
, { field: '浜よ揣鍦扮偣', title: '浜よ揣鍦扮偣', width: 100}
, { field: 'HPSStyleID', title: 'HPSStyleID', hide: true }
- , { field: '閲囪喘鏂瑰紡浠g爜', title: '閲囪喘鏂瑰紡浠g爜', width: 120}
+ , { 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}
+ , { 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}
+ , { field: '閮ㄩ棬浠g爜', title: '閮ㄩ棬浠g爜', width: 100, hide: true }
, { field: '閮ㄩ棬', title: '閮ㄩ棬', width: 100}
, { field: 'HManagerID', title: 'HManagerID', hide: true }
- , { field: '涓荤浠g爜', title: '涓荤浠g爜', width: 100}
+ , { field: '涓荤浠g爜', title: '涓荤浠g爜', width: 100, hide: true }
, { field: '涓荤', title: '涓荤', width: 100}
, { field: 'HEmpID', title: 'HEmpID', hide: true }
, { field: '鎽樿', title: '鎽樿', width: 100}
@@ -553,20 +568,23 @@
, { 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: 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: 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')}}</div>" }
+ , { 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')}}</div>" }
+ , { 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')}}</div>" }
+ , { 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')}}</div>" }
+ , { field: '浣滃簾鏃ユ湡', title: '浣滃簾鏃ユ湡', width: 120, templet: "<div>{{d.浣滃簾鏃ユ湡 ==null ?'':layui.util.toDateString(d.浣滃簾鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
]]
@@ -614,7 +632,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 + " ==null ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd')}}</div>", width: 200 });
+ 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 HH:mm:ss')}}</div>", width: 200 });
break;
default:
col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200 });
@@ -797,7 +815,69 @@
}
}
- //#region 鍙嶅鏍�/瀹℃牳鏁版嵁
+ //#region 澶氳涓嬫帹锛堟敹鏂欓�氱煡鍗曪級
+ function set_PushPOInStockBills() {
+ var checkStatus = table.checkStatus('mainTable')
+ , data = checkStatus.data;
+ if (data.length > 0) {
+ var dataArray = [];
+ var HCusName = data[0].瀹㈡埛;
+ var HEmpName = data[0].涓氬姟鍛�;
+ for (var i = 0; i < data.length; i++) {
+ var temp = {
+ "hmainid": data[i].hmainid
+ , "hsubid": data[i].hsubid
+ , "HBillStatus": data[i].鐘舵��
+ , "HSourceBillType": "1102"
+ }
+ dataArray.push(temp);
+ if (data[i].鐘舵�� != "宸插鏍�") {
+ var err = "涓嬫帹澶辫触!鍗曟嵁銆�" + data[i].鍗曟嵁鍙� + "銆戠殑鐘舵�佷负鈥�" + data[0].鐘舵�� + "鈥�,涓嶅厑璁镐笅鎺紒";
+ layer.alert(err, { icon: 5 });
+ return;
+ }
+
+ if (data[i].琛岀姸鎬� == "宸插叧闂�") {
+ layer.msg("涓嬫帹澶辫触!鍗曟嵁鍙枫��" + data[i].鍗曟嵁鍙� + "銆戜笅閫変腑鐨勮褰曚腑瀛樺湪宸插叧闂姸鎬佺殑璁板綍!");
+ return;
+ }
+
+ if (data[i].瀹㈡埛 != HCusName) {
+ layer.msg("涓嬫帹澶辫触!宸茬粡閫変腑鐨勮褰曚腑瀛樺湪涓嶅悓瀹㈡埛!");
+ return;
+ }
+ if (data[i].涓氬姟鍛� != HEmpName) {
+ layer.msg("涓嬫帹澶辫触!宸茬粡閫変腑鐨勮褰曚腑瀛樺湪涓嶅悓涓氬姟鍛�!");
+ return;
+ }
+ }
+
+ var datajson = {
+ "data": dataArray
+ };
+
+ var url = encodeURI('../../閲囪喘绠$悊/鏀舵枡閫氱煡鍗�/Add_Edit_Cg_POInStockBillList.html?OperationType=4&linterid=0&HSouceBillType=1102&res=' + JSON.stringify(datajson))
+ layer.open({
+ type: 2
+ , area: ['100%', '100%']
+ , title: '閲囪喘璁㈠崟-澶氳涓嬫帹鏀舵枡閫氱煡鍗�'
+ , shift: 0//寮瑰嚭鍔ㄧ敾
+ , content: url
+ , btn: [],
+ // 鎸夐挳1 鐨勫洖璋�
+ end: function (index, layero, that) {
+ //鍒锋柊椤甸潰
+ $("#btnSearch").trigger('click');
+ }
+ })
+ } else {
+ layer.msg('璇烽�夋嫨鏁版嵁涓嬫帹锛�');
+ }
+ }
+ //#endregion
+
+
+ //#region 鍙嶅鏍�/瀹℃牳鏁版嵁
function set_CheckBill(num) {
var checkStatus = table.checkStatus('mainTable')
, data = checkStatus.data;
@@ -807,7 +887,7 @@
$.ajax({
type: "GET",
url: GetWEBURL() + "/Cg_POOrderBill/AuditCg_POOrderBill", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
- data: { "HInterID": InterID, "Type": num, "user": sessionStorage["HUserName"] },
+ data: { "HInterID": InterID, "IsAudit": num, "CurUserName": sessionStorage["HUserName"] },
success: function (result) {
if (result.count == 1) {
layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () {
@@ -832,6 +912,7 @@
}
}
//#endregion
+
//#region 鍙嶅叧闂�/鍏抽棴鏁版嵁
function set_CloseBill(num) {
@@ -865,6 +946,43 @@
}
else {
layer.msg('璇烽�夋嫨涓�琛屾暟鎹鏍革紒');
+ }
+ }
+ //#endregion
+
+ //#region 琛屽弽鍏抽棴/琛屽叧闂暟鎹�
+ function set_CloseRow(num) {
+ var checkStatus = table.checkStatus('mainTable')
+ , data = checkStatus.data;
+ if (checkStatus.data.length === 1) {
+ var InterID = data[0].hmainid.toString();
+ var hsubid = data[0].hsubid.toString();
+ //閫昏緫瀹℃牳鏂规硶
+ $.ajax({
+ type: "GET",
+ url: GetWEBURL() + "/Cg_POOrderBill/CloseRowCg_POOrderBill", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+ data: { "HInterID": InterID, "HEntryID": hsubid, "IsAudit": num, "CurUserName": sessionStorage["HUserName"] },
+ success: function (result) {
+ if (result.count == 1) {
+ layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () {
+ // 寰楀埌frame绱㈠紩
+ var index = layer.getFrameIndex(window.name);
+ //鍏抽棴褰撳墠frame
+ layer.close(index);
+ //淇敼涓哄姛鍚庡埛鏂扮晫闈�
+ $("#btnSearch").trigger('click');
+ });
+
+ } else {
+ layer.alert(result.code + result.Message, { icon: 5 });
+ }
+ }, error: function () {
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ }
+ });
+ }
+ else {
+ layer.msg('璇烽�夋嫨涓�琛屾暟鎹叧闂紒');
}
}
//#endregion
@@ -1355,6 +1473,8 @@
sWhere += " and 瀹屾垚鐘舵�� like '%" + HFinishStatus + "%'";
}
+
+ sWhere += addSWhereByOpenType();
//娣诲姞鏌ヨ鏉′欢锛屾牴鎹綋鍓嶇櫥褰曠敤鎴峰叧鑱旇亴鍛樿繑鍥炴暟鎹�
//sWhere += " and HUserID =" + sessionStorage["Czybm"]
var index = layer.load(0);
@@ -1795,6 +1915,35 @@
//#endregion
+
+ //#region 鑾峰彇鍙傛暟
+ function getUrlVars() {
+ var vars = [], hash;
+ var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
+ for (var i = 0; i < hashes.length; i++) {
+ hash = hashes[i].split('=');
+ vars.push(hash[0]);
+ vars[hash[0]] = hash[1];
+ }
+ return vars;
+ }
+ //#endregion
+ //#region 鍒ゆ柇鏄洿鎺ユ墦寮�椤甸潰杩樻槸鍏跺畠椤甸潰閫氳繃閫夋嫨鎸夐挳鎵撳紑锛屽苟鏄剧ず鐩稿簲鏁版嵁
+ function addSWhereByOpenType() {
+ //鑾峰彇鍙傛暟
+ var params = getUrlVars();
+ var openType = params[params[0]]; //浠庡弬鏁颁腑鑾峰彇 鎵撳紑鏂瑰紡 1鐩存帴鎵撳紑 2鍏跺畠椤甸潰閫氳繃閫夋嫨鎸夐挳鎵撳紑
+ var HOrgID = params[params[1]];
+
+ var addSWhere = "";
+
+ if (openType == 2) {
+ addSWhere = " and 鐘舵�� = '宸插鏍�' and 琛岀姸鎬� = '' and HOrgID = " + HOrgID;
+ }
+ return addSWhere;
+ }
+ //#endregion
+
//浠ヤ笂鏄痩ayui妯″潡
});
--
Gitblit v1.9.1