From 7bb3ffb383e41f66ea9e89b8b0f8182726e77d1b Mon Sep 17 00:00:00 2001
From: chenhaozhe <cgz@hz-kingdee.com>
Date: 星期二, 27 一月 2026 15:14:07 +0800
Subject: [PATCH] 华舟 新增 器具保养规程 器具点检规程 设备点检规程 设备保养规程 的默认结果选择
---
WebTM/views/WMS扫码模块/产量汇报/Sc_ICMOBillWorkQtyStatus_PDA.html | 198 ++++++++++++++++++++++++++++---------------------
1 files changed, 113 insertions(+), 85 deletions(-)
diff --git "a/WebTM/views/WMS\346\211\253\347\240\201\346\250\241\345\235\227/\344\272\247\351\207\217\346\261\207\346\212\245/Sc_ICMOBillWorkQtyStatus_PDA.html" "b/WebTM/views/WMS\346\211\253\347\240\201\346\250\241\345\235\227/\344\272\247\351\207\217\346\261\207\346\212\245/Sc_ICMOBillWorkQtyStatus_PDA.html"
index 0740185..5020134 100644
--- "a/WebTM/views/WMS\346\211\253\347\240\201\346\250\241\345\235\227/\344\272\247\351\207\217\346\261\207\346\212\245/Sc_ICMOBillWorkQtyStatus_PDA.html"
+++ "b/WebTM/views/WMS\346\211\253\347\240\201\346\250\241\345\235\227/\344\272\247\351\207\217\346\261\207\346\212\245/Sc_ICMOBillWorkQtyStatus_PDA.html"
@@ -272,7 +272,7 @@
if (sessionStorage.login != "login") {
layer.confirm("鐧诲綍澶辨晥锛岃閲嶆柊鐧诲綍锛�", {
icon: 4, skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず", closeBtn: 0, btn: ['閲嶆柊鐧诲綍']
- }, function () { window.location.href = "../../user/login_pda.html"; });
+ }, function () { window.location.href = "../../user/login.html"; });
}
//澶辫触鎻愮ず闊�
@@ -844,80 +844,96 @@
if (sBarCode != "") {
$('#HBarCode').val("");
}
- $.ajax({
- type: "GET",
- url: GetWEBURL() + "/Sc_MESBeginStepWorkBill/Get_Gy_BarCodeBill_CusList",
- async: false, //async鐢ㄤ簬鎺у埗锛坒alse锛夊悓姝ュ拰锛坱rue锛夊紓姝ワ紝榛樿鐨勬槸true锛屽嵆璇锋眰榛樿鐨勬槸寮傛璇锋眰
- data: { "HBarCode": sBarCode, "user": HMaker },
- success: function (result) {
- if (result.count == 1) {
- if ($("#HSourceBillNo").val() != result.data[0].HSourceBillNo) {
- playSound();
- layer.msg("鏉$爜瀵瑰簲鐨勭敓浜ц鍗曚笌褰撳墠璁㈠崟涓嶄竴鑷�", {
- icon: 5, time: 100000, offset: 'auto', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず", btn: ['纭']
- }, function () {
- $("#HBarCode").select();
- $("#HBarCode").focus();
- });
- }
- else {
- var exists = BarCodelistOption.data.some(function (item) {
- return item.HBarCode === sBarCode;
- });
- if (exists) {
- playSound();
- layer.msg("璇ユ潯鐮佸凡琚壂鎻忥紝涓嶈兘閲嶅鎵弿", {
- icon: 5, time: 3000, offset: 'auto', skin: 'layui-layer-lan', title: "鎻愮ず"
- }, function () {
- $("#HBarCode").select();
- $("#HBarCode").focus();
- });
- return; // 閫�鍑猴紝涓嶅啀鎵ц鍚庣画娣诲姞閫昏緫
- }
- var saveSuccess = save_sub($('#HInterID').val(), sBarCode, $('#HSourceID').val());
- if (!saveSuccess) {
- // 濡傛灉淇濆瓨澶辫触锛岀洿鎺ラ��鍑猴紝涓嶆墽琛屽悗闈换浣曢�昏緫
- return;
- }
- var subarr = BarCodelistOption.data;
- subarr.push({
- "HQty": 1, "HBarCode": sBarCode, "HMaterID": result.data[0].HItemID, "HMaterNumber": result.data[0].HNumber, "HMaterName": result.data[0].HName, "HMaterModel": result.data[0].HModel,
- "HSourceBillNo": result.data[0].HSourceBillNo, "HSourceInterID": result.data[0].HSourceInterID,
- "HSourceEntryID": result.data[0].HSourceEntryID, "HInterID": $("#HInterID").val()
- });
-
- BarCodelistOption.data = subarr;
- table.render(BarCodelistOption);
- listOption.data.forEach(function (item) {
- item.鏁伴噺 = (parseFloat(item.鏁伴噺) || 0) + 1;
- item.鏉$爜涓暟 = (parseFloat(item.鏉$爜涓暟) || 0) + 1;
- });
- table.render(listOption);
- $("#HQty").val((parseFloat($("#HQty").val()) || 0) + 1);
- }
- }
- else {
- playSound();
- layer.msg(result.Message, {
- icon: 5, time: 100000, offset: 'auto', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず", btn: ['纭']
- }, function () {
- $("#HBarCode").select();
- $("#HBarCode").focus();
- });
- }
- },
- complete: function (XHR, TS) { XHR = null },//鍥炴敹璧勬簮
- error: function (err) {
- playSound();
- layer.msg("閿欒锛�" + err, {
- icon: 5, time: 100000, offset: 'auto', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず", btn: ['纭']
- }, function () {
- $("#HBarCode").select();
- $("#HBarCode").focus();
- });
- }
+ var exists = BarCodelistOption.data.some(function (item) {
+ return item.HBarCode === sBarCode;
});
- layer.closeAll("loading");
+ if (exists) {
+ playSound();
+ layer.msg("璇ユ潯鐮佸凡琚壂鎻忥紝涓嶈兘閲嶅鎵弿", {
+ icon: 5, time: 3000, offset: 'auto', skin: 'layui-layer-lan', title: "鎻愮ず"
+ }, function () {
+ $("#HBarCode").select();
+ $("#HBarCode").focus();
+ });
+ return; // 閫�鍑猴紝涓嶅啀鎵ц鍚庣画娣诲姞閫昏緫
+ }
+ save_sub($('#HInterID').val(), sBarCode, $('#HSourceID').val());
+
+ //$.ajax({
+ // type: "GET",
+ // url: GetWEBURL() + "/Sc_MESBeginStepWorkBill/Get_Gy_BarCodeBill_CusList",
+ // async: false, //async鐢ㄤ簬鎺у埗锛坒alse锛夊悓姝ュ拰锛坱rue锛夊紓姝ワ紝榛樿鐨勬槸true锛屽嵆璇锋眰榛樿鐨勬槸寮傛璇锋眰
+ // data: { "HBarCode": sBarCode, "user": HMaker },
+ // success: function (result) {
+ // if (result.count == 1) {
+ // if ($("#HSourceBillNo").val() != result.data[0].HSourceBillNo) {
+ // playSound();
+ // layer.msg("鏉$爜瀵瑰簲鐨勭敓浜ц鍗曚笌褰撳墠璁㈠崟涓嶄竴鑷�", {
+ // icon: 5, time: 100000, offset: 'auto', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず", btn: ['纭']
+ // }, function () {
+ // $("#HBarCode").select();
+ // $("#HBarCode").focus();
+ // });
+ // }
+ // else {
+ // var exists = BarCodelistOption.data.some(function (item) {
+ // return item.HBarCode === sBarCode;
+ // });
+ // if (exists) {
+ // playSound();
+ // layer.msg("璇ユ潯鐮佸凡琚壂鎻忥紝涓嶈兘閲嶅鎵弿", {
+ // icon: 5, time: 3000, offset: 'auto', skin: 'layui-layer-lan', title: "鎻愮ず"
+ // }, function () {
+ // $("#HBarCode").select();
+ // $("#HBarCode").focus();
+ // });
+ // return; // 閫�鍑猴紝涓嶅啀鎵ц鍚庣画娣诲姞閫昏緫
+ // }
+ // var saveSuccess = save_sub($('#HInterID').val(), sBarCode, $('#HSourceID').val());
+ // if (!saveSuccess) {
+ // // 濡傛灉淇濆瓨澶辫触锛岀洿鎺ラ��鍑猴紝涓嶆墽琛屽悗闈换浣曢�昏緫
+ // return;
+ // }
+ // var subarr = BarCodelistOption.data;
+ // subarr.push({
+ // "HQty": 1, "HBarCode": sBarCode, "HMaterID": result.data[0].HItemID, "HMaterNumber": result.data[0].HNumber, "HMaterName": result.data[0].HName, "HMaterModel": result.data[0].HModel,
+ // "HSourceBillNo": result.data[0].HSourceBillNo, "HSourceInterID": result.data[0].HSourceInterID,
+ // "HSourceEntryID": result.data[0].HSourceEntryID, "HInterID": $("#HInterID").val()
+ // });
+
+ // BarCodelistOption.data = subarr;
+ // table.render(BarCodelistOption);
+ // listOption.data.forEach(function (item) {
+ // item.鏁伴噺 = (parseFloat(item.鏁伴噺) || 0) + 1;
+ // item.鏉$爜涓暟 = (parseFloat(item.鏉$爜涓暟) || 0) + 1;
+ // });
+ // table.render(listOption);
+ // $("#HQty").val((parseFloat($("#HQty").val()) || 0) + 1);
+ // }
+ // }
+ // else {
+ // playSound();
+ // layer.msg(result.Message, {
+ // icon: 5, time: 100000, offset: 'auto', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず", btn: ['纭']
+ // }, function () {
+ // $("#HBarCode").select();
+ // $("#HBarCode").focus();
+ // });
+ // }
+ // },
+ // complete: function (XHR, TS) { XHR = null },//鍥炴敹璧勬簮
+ // error: function (err) {
+ // playSound();
+ // layer.msg("閿欒锛�" + err, {
+ // icon: 5, time: 100000, offset: 'auto', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず", btn: ['纭']
+ // }, function () {
+ // $("#HBarCode").select();
+ // $("#HBarCode").focus();
+ // });
+ // }
+ //});
+
+ //layer.closeAll("loading");
}
@@ -961,9 +977,7 @@
}
//鎵弿鏉$爜淇濆瓨鏁版嵁鍒颁复鏃惰〃
function save_sub(HInterID, HBarCode, HSourceID) {
- var index = layer.load();
- var isSuccess = false; // 榛樿澶辫触
-
+ var index = layer.load();
$.ajax({
type: "GET",
url: GetWEBURL() + "Sc_MESBeginStepWorkBill/savrSc_ICMOBillWorkQtyStatus_Tmp_Sub",
@@ -976,27 +990,41 @@
},
success: function (data) {
if (data.count == 1) {
+
+ var subarr = BarCodelistOption.data;
+ subarr.push({
+ "HQty": 1, "HBarCode": HBarCode, "HMaterID": data.data[0].HItemID, "HMaterNumber": data.data[0].HNumber, "HMaterName": data.data[0].HName, "HMaterModel": data.data[0].HModel,
+ "HSourceBillNo": data.data[0].HICMOBillNo, "HSourceInterID": data.data[0].HICMOEntryID,
+ "HSourceEntryID": data.data[0].HICMOInterID, "HInterID": $("#HInterID").val()
+ });
+
+ BarCodelistOption.data = subarr;
+ table.render(BarCodelistOption);
+ listOption.data.forEach(function (item) {
+ item.鏁伴噺 = (parseFloat(item.鏁伴噺) || 0) + 1;
+ item.鏉$爜涓暟 = (parseFloat(item.鏉$爜涓暟) || 0) + 1;
+ });
+ table.render(listOption);
+ $("#HQty").val((parseFloat($("#HQty").val()) || 0) + 1);
+ $("#HBarCode").select();
+ $("#HBarCode").focus();
+
layer.close(index);
- layer.msg("鎵弿鎴愬姛", { icon: 1, time: 1500 });
- isSuccess = true;
+ layer.msg("鎵弿鎴愬姛", { icon: 1, time: 1500 });
} else {
layer.close(index);
layer.msg(data.Message, {
icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず"
- });
- isSuccess = false;
+ });
}
},
error: function (err) {
layer.close(index);
layer.msg("淇濆瓨鏉$爜澶辫触锛�" + err.statusText, {
icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "绯荤粺閿欒"
- });
- isSuccess = false;
+ });
}
});
-
- return isSuccess; // 鍚屾杩斿洖缁撴灉
}
//#endregion
--
Gitblit v1.9.1