From e57b2edbffff5a653ba9eda65eae100ceb2e7822 Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期一, 01 九月 2025 16:16:41 +0800
Subject: [PATCH] 乔一:客户物料即时库存报表、客户手工抄包报表
---
WebTM/views/生产管理/报工平台_PDA/IpadIndex_PDA.html | 260 ++++++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 251 insertions(+), 9 deletions(-)
diff --git "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\271\263\345\217\260_PDA/IpadIndex_PDA.html" "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\271\263\345\217\260_PDA/IpadIndex_PDA.html"
index bfca832..839553f 100644
--- "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\271\263\345\217\260_PDA/IpadIndex_PDA.html"
+++ "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\271\263\345\217\260_PDA/IpadIndex_PDA.html"
@@ -239,7 +239,9 @@
var HBadQty = []; //涓嶈壇鏁伴噺
var HBadReason = []; //涓嶈壇鍘熷洜
var HEmpName = ""; //鎿嶄綔鍛�
+ var HManagerID = 0;
var HManagerName = ""; //璐熻矗浜�
+ var HGroupID = 0; //鐝粍ID
var HGroupName = ""; //鐝粍
var HProcID = 0; //宸ュ簭
var HSBName = ""; //璁惧鍚嶇О
@@ -265,12 +267,11 @@
} else {
OperationType = params[params[0]];//鎿嶄綔绫诲瀷
linterid = params[params[1]];//婧愬崟id
+ HGroupID = params[params[2]];//鐝粍ID
}
fetchButtonsData();
fetchListData(linterid);
});
- var HManagerID = 0;
- var HGroupID = 0;
//鍔犺浇褰撳墠鐢ㄦ埛鎸夐挳
function fetchButtonsData() {
@@ -354,6 +355,7 @@
function fetchListData(HSourceID) {
if (HSourceID != "0" && HSourceID != null && HSourceID!="") {
$('.ctop').removeClass('check'); //鍒犻櫎涓嶅悓鐖剁骇clss鏍峰紡鐩稿悓鐨勬墍鏈夊厓绱�
+ HSourceID1 = HSourceID;
//鎵ц鑱斿姩浜嬩欢
$.ajax({
url: GetWEBURL() + "/ReportPlatForm/SearchGetWorkBillList",
@@ -645,7 +647,8 @@
"HSourceInterID": HSourceInterID,
"HSourceEntryID": HSourceEntryID,
"HSourceBillNo": HSourceBillNo,
- "HSourceBillType": HSourceBillType
+ "HSourceBillType": HSourceBillType,
+ "HGroupID": HGroupID
});
//閫氳繃绱㈠紩鑾峰彇鍒板綋鍓峣frame寮瑰嚭灞�
@@ -653,6 +656,156 @@
//璋冪敤iframe寮瑰嚭灞傚唴鐨勬柟娉�
iframe.edit(data);
},
+ });
+ }
+
+ //蹇嵎寮�宸�
+ function OpenFastWork(event, obj) {
+ if (wktag == 0) {
+ layer.alert("璇烽�夋嫨宸ュ崟鍒楄〃", { icon: 5 });
+ return false;
+ }
+ if (!WorkStaus(HSourceID1, workcode, HSourceInterID, "蹇嵎寮�宸�")) {
+ layer.alert("鍗曟嵁鐘舵�佷笉婊¤冻寮�宸ユ潯浠�!", { icon: 5 });
+ return false;
+ }
+ var indexOpen = layer.open({
+ type: 1
+ , title: "纭寮�宸ュ悧?"
+ , closeBtn: false
+ , area: '300px;'
+ , shade: 0.8
+ , id: 'LAY_layuipro' //璁惧畾涓�涓猧d锛岄槻姝㈤噸澶嶅脊鍑�
+ , btn: ['纭畾', '鍙栨秷']
+ , btnAlign: 'c'
+ , moveType: 1 //鎷栨嫿妯″紡锛�0鎴栬��1
+ , content: '<div style="padding: 50px; line-height: 22px; font-weight: 300;text-align:center;">璁惧缂栧彿:' + HSourceName1 + '<br>宸ュ崟鍙�:' + workcode + '<br>浜у搧鍚嶇О:' + HMaterName + '<br></div>'
+ , btn1: function (index, layero, e) {
+
+ //鏂板寮�宸ュ崟
+ $.ajax({
+ type: "GET",
+ url: GetWEBURL() + "/Sc_MESBeginWorkBill/FastBeginWorkBill", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+ data: { "HBillType": HBillType, "HSourceInterID": HSourceInterID, "HSourceEntryID": HSourceEntryID, "HSourceBillNo": HSourceBillNo, "HSourceBillType": HSourceBillType, "user": 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);
+ //淇敼涓哄姛鍚庡埛鏂扮晫闈�
+ window.location.reload();
+ });
+ layer.close(indexOpen);
+ } else {
+ layer.alert(result.code + result.Message, { icon: 5 });
+ }
+ }, error: function () {
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ }
+ });
+ }
+ });
+ }
+
+ //蹇嵎瀹屽伐
+ function OpenFastEnd(event, obj) {
+ if (wktag == 0) {
+ layer.alert("璇烽�夋嫨宸ュ崟鍒楄〃", { icon: 5 });
+ return false;
+ }
+ if (!WorkStaus(HSourceID1, workcode, HSourceInterID, "蹇嵎瀹屽伐")) {
+ layer.alert("鍗曟嵁鐘舵�佷笉婊¤冻瀹屽伐鏉′欢!", { icon: 5 });
+ return false;
+ }
+ var indexOpen = layer.open({
+ type: 1
+ , title: "纭瀹屽伐鍚�?"
+ , closeBtn: false
+ , area: '300px;'
+ , shade: 0.8
+ , id: 'LAY_layuipro' //璁惧畾涓�涓猧d锛岄槻姝㈤噸澶嶅脊鍑�
+ , btn: ['纭畾', '鍙栨秷']
+ , btnAlign: 'c'
+ , moveType: 1 //鎷栨嫿妯″紡锛�0鎴栬��1
+ , content: '<div style="padding: 50px; line-height: 22px; font-weight: 300;text-align:center;">璁惧缂栧彿:' + HSourceName1 + '<br>宸ュ崟鍙�:' + workcode + '<br>浜у搧鍚嶇О:' + HMaterName + '<br></div>'
+ , btn1: function (index, layero, e) {
+
+ //鏂板寮�宸ュ崟
+ $.ajax({
+ type: "GET",
+ url: GetWEBURL() + "/Sc_MESEndWorkBill/FastEndWorkBill", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+ data: { "HBillType": HBillType, "HSourceInterID": HSourceInterID, "HSourceEntryID": HSourceEntryID, "HSourceBillNo": HSourceBillNo, "HSourceBillType": HSourceBillType, "user": 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);
+ //淇敼涓哄姛鍚庡埛鏂扮晫闈�
+ window.location.reload();
+ });
+ layer.close(indexOpen);
+ } else {
+ layer.alert(result.code + result.Message, { icon: 5 });
+ }
+ }, error: function () {
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ }
+ });
+ }
+ });
+ }
+
+ //蹇嵎鍋滃伐
+ function OpenFastStop(event, obj) {
+ if (wktag == 0) {
+ layer.alert("璇烽�夋嫨宸ュ崟鍒楄〃", { icon: 5 });
+ return false;
+ }
+ if (!WorkStaus(HSourceID1, workcode, HSourceInterID, "蹇嵎鍋滃伐")) {
+ layer.alert("鍗曟嵁鐘舵�佷笉婊¤冻鍋滃伐鏉′欢!", { icon: 5 });
+ return false;
+ }
+ var indexOpen = layer.open({
+ type: 1
+ , title: "纭鍋滃伐鍚�?"
+ , closeBtn: false
+ , area: '300px;'
+ , shade: 0.8
+ , id: 'LAY_layuipro' //璁惧畾涓�涓猧d锛岄槻姝㈤噸澶嶅脊鍑�
+ , btn: ['纭畾', '鍙栨秷']
+ , btnAlign: 'c'
+ , moveType: 1 //鎷栨嫿妯″紡锛�0鎴栬��1
+ , content: '<div style="padding: 50px; line-height: 22px; font-weight: 300;text-align:center;">璁惧缂栧彿:' + HSourceName1 + '<br>宸ュ崟鍙�:' + workcode + '<br>浜у搧鍚嶇О:' + HMaterName + '<br></div>'
+ , btn1: function (index, layero, e) {
+
+ //鏂板寮�宸ュ崟
+ $.ajax({
+ type: "GET",
+ url: GetWEBURL() + "/Sc_MESStopWorkBill/FastStopWorkBill", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+ data: { "HBillType": HBillType, "HSourceInterID": HSourceInterID, "HSourceEntryID": HSourceEntryID, "HSourceBillNo": HSourceBillNo, "HSourceBillType": HSourceBillType, "user": 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);
+ //淇敼涓哄姛鍚庡埛鏂扮晫闈�
+ window.location.reload();
+ });
+ layer.close(indexOpen);
+ } else {
+ layer.alert(result.code + result.Message, { icon: 5 });
+ }
+ }, error: function () {
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ }
+ });
+ }
});
}
@@ -759,7 +912,8 @@
"HSourceInterID": HSourceInterID,
"HSourceEntryID": HSourceEntryID,
"HSourceBillNo": HSourceBillNo,
- "HSourceBillType": HSourceBillType
+ "HSourceBillType": HSourceBillType,
+ "HGroupID": HGroupID
});
//閫氳繃绱㈠紩鑾峰彇鍒板綋鍓峣frame寮瑰嚭灞�
@@ -798,7 +952,8 @@
"HSourceInterID": HSourceInterID,
"HSourceEntryID": HSourceEntryID,
"HSourceBillNo": HSourceBillNo,
- "HSourceBillType": HSourceBillType
+ "HSourceBillType": HSourceBillType,
+ "HGroupID": HGroupID
});
//閫氳繃绱㈠紩鑾峰彇鍒板綋鍓峣frame寮瑰嚭灞�
@@ -837,7 +992,8 @@
"HSourceInterID": HSourceInterID,
"HSourceEntryID": HSourceEntryID,
"HSourceBillNo": HSourceBillNo,
- "HSourceBillType": HSourceBillType
+ "HSourceBillType": HSourceBillType,
+ "HGroupID": HGroupID
});
//閫氳繃绱㈠紩鑾峰彇鍒板綋鍓峣frame寮瑰嚭灞�
@@ -1041,11 +1197,25 @@
, content: ['../../鐢熶骇绠$悊/鎶ュ伐骞冲彴_PDA/璐ㄩ噺姹囨姤/Sc_QualityReportBill_PDA.html?OperationType=2&linterid=' + HSourceInterID + '&HSouceBillType=' + HBillType + '&HICMOEntryID=' + HSourceEntryID, 'yes']
, resize: false
, cancel: function () {
-
}
, end: function () {
-
}
+ ,success: function (dom, index) {
+ var data = [];
+ data.push({
+ "HBillType": HBillType,
+ "HSourceInterID": HSourceInterID,
+ "HSourceEntryID": HSourceEntryID,
+ "HSourceBillNo": HSourceBillNo,
+ "HSourceBillType": HSourceBillType,
+ "HGroupID": HGroupID
+ });
+
+ //閫氳繃绱㈠紩鑾峰彇鍒板綋鍓峣frame寮瑰嚭灞�
+ var iframe = window['layui-layer-iframe' + index];
+ //璋冪敤iframe寮瑰嚭灞傚唴鐨勬柟娉�
+ iframe.edit(data);
+ },
})
}
@@ -1221,7 +1391,7 @@
shift: 2,
area: ['100%', '100%'],
maxmin: true,
- content: '鐢熶骇绠$悊/寮傚父鍙嶉鍗�/Sc_MESExecptFeedBackBillType.html',
+ content: '../../鐢熶骇绠$悊/寮傚父鍙嶉鍗�/Sc_MESExecptFeedBackBillType.html',
end: function () {
},
@@ -1446,6 +1616,78 @@
});
return flag;
+ case "蹇嵎寮�宸�":
+ sWhere = { "HSourceID": HSourceID1, "HICMOBillNo": workcode, "HInterID": HSourceInterID,"type":"寮�宸�"}
+ $.ajax({
+ url: GetWEBURL() + "/Sc_MESBeginWorkBill/GetMESBeginWorkBillStaus",
+ type: "GET",
+ data: { "sWhere": JSON.stringify(sWhere) },
+ dataType: "json",//鏁版嵁绫诲瀷鍙互涓� text xml json script jsonp
+ async: false,
+ success: function (data) {
+
+ if (data.count > 0) {
+ flag = true;
+
+ }
+ else {
+ flag = false;
+ }
+ },
+ error: function (err) {
+ flag = false;
+ }
+ });
+
+ return flag;
+ case "蹇嵎鍋滃伐":
+ sWhere = { "HSourceID": HSourceID1, "HICMOBillNo": workcode, "HInterID": HSourceInterID, "type": "鍋滃伐" }
+ $.ajax({
+ url: GetWEBURL() + "/Sc_MESBeginWorkBill/GetMESBeginWorkBillStaus",
+ type: "GET",
+ data: { "sWhere": JSON.stringify(sWhere) },
+ dataType: "json",//鏁版嵁绫诲瀷鍙互涓� text xml json script jsonp
+ async: false,
+ success: function (data) {
+
+ if (data.count > 0) {
+ flag = true;
+
+ }
+ else {
+ flag = false;
+ }
+ },
+ error: function (err) {
+ flag = false;
+ }
+ });
+
+ return flag;
+ case "蹇嵎瀹屽伐":
+ sWhere = { "HSourceID": HSourceID1, "HICMOBillNo": workcode, "HInterID": HSourceInterID, "type": "瀹屽伐" }
+ $.ajax({
+ url: GetWEBURL() + "/Sc_MESBeginWorkBill/GetMESBeginWorkBillStaus",
+ type: "GET",
+ data: { "sWhere": JSON.stringify(sWhere) },
+ dataType: "json",//鏁版嵁绫诲瀷鍙互涓� text xml json script jsonp
+ async: false,
+ success: function (data) {
+
+ if (data.count > 0) {
+ flag = true;
+
+ }
+ else {
+ flag = false;
+ }
+ },
+ error: function (err) {
+ flag = false;
+ }
+ });
+
+ return flag;
}
}
</script>
--
Gitblit v1.9.1