From b3d657ca8d32bc56846732753a9def205ee53b2e Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期一, 03 十一月 2025 16:25:33 +0800
Subject: [PATCH] 单品过站批次绑定,彩盒生成校验开发
---
WebTM/views/车间管理/单品过站_小卫/Cj_ProcessItemStationPlatform_batch.html | 155 +++++++++++++++++++++++++++++++++++++++++++--------
1 files changed, 129 insertions(+), 26 deletions(-)
diff --git "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\215\225\345\223\201\350\277\207\347\253\231_\345\260\217\345\215\253/Cj_ProcessItemStationPlatform_batch.html" "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\215\225\345\223\201\350\277\207\347\253\231_\345\260\217\345\215\253/Cj_ProcessItemStationPlatform_batch.html"
index f775c17..1138f26 100644
--- "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\215\225\345\223\201\350\277\207\347\253\231_\345\260\217\345\215\253/Cj_ProcessItemStationPlatform_batch.html"
+++ "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\215\225\345\223\201\350\277\207\347\253\231_\345\260\217\345\215\253/Cj_ProcessItemStationPlatform_batch.html"
@@ -83,7 +83,7 @@
<label class="layui-form-label" style="width: 85px;" id="BT_HMaterNumber">鐗╂枡缂栫爜</label>
<div class="layui-input-block" style="margin-left: 120px;">
<input type="text" class="layui-input" lay-verify="HMaterNumber" name="HMaterNumber" id="HMaterNumber" style="background-color:#efefef4d;" readonly>
- <input type="hidden" class="layui-input" lay-verify="HMaterID" name="HMaterID" id="HMaterID">
+ <input type="hidden" class="layui-input" lay-verify="HMaterID" name="HMaterID" id="HMaterID" value="0">
</div>
</div>
<div class="layui-inline">
@@ -207,6 +207,7 @@
<div class="layui-btn-container">
<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Delete"><i class="layui-icon layui-icon-form"></i>瑙g粦</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="refresh" id="refresh"><i class="layui-icon layui-icon-form"></i>鍒锋柊</button>
</div>
</script>
</form>
@@ -251,10 +252,13 @@
table.on('toolbar(mainTable)', function (obj) {
switch (obj.event) {
//鍒犻櫎鎸夐挳
- case 'btn-Delete': set_DeleteBill();
+ case 'btn-Delete': btn_Delete();
break;
//鍒楄缃�
case 'set_HideColumn': get_HideColumnNoPage(HModName, sessionStorage["HUserName"], option, get_Display);
+ break;
+ //鍒锋柊
+ case 'refresh': get_Display();
break;
};
});
@@ -262,30 +266,27 @@
$('#HBarCode_Batch').on('keydown', function (event) {
var HBarCode = $('#HBarCode_Batch').val();
if (event.keyCode == 13) {
- txtHBarCode_KeyDown(HBarCode);
+ //濡傛灉闀洉鐮佷笉涓虹┖
+ if (HBarCode) {
+ txtHBarCode_KeyDown(HBarCode);
+ }
+
}
});
//闀洉鐮佸洖杞︽柟娉�
$('#HBarCode_SN').on('keydown', function (event) {
- var HBarCode = $('#HBardCodeProcExchBillNo').val();
+ var HBarCode_SN = $('#HBarCode_SN').val();
if (event.keyCode == 13) {
- if (!HBarCode) {
- layer.msg(get_MessageError("[0000-1-057]娴佽浆鍗′笉鑳戒负绌猴紒", sessionStorage["HTranSlate"]))
- return;
+ if ($("#HBarCode_Batch").val() == "" || $("#HBarCode_Batch").val() == null) {
+ layer.msg("鏈壂鎵规鐮佽鍏堟壂鐮�");
+ $("#HBarCode_Batch").focus();
+ return
}
- setIntervalIndex = setInterval(setIntervalList, 30000);
- get_BomList(HBarCode);
- //if (option.data != 0) {
- // //淇濆瓨鍒颁复鏃惰〃
- // get_AddBomTempList();
- //}
- //鏌ヨ涓嶈壇璁板綍
- get_BadRecords();
- //鏌ヨ鍚堟牸璁板綍
- get_HGRecords();
-
-
+ if (HBarCode_SN) {
+ txtHBarCodeSN_KeyDown(HBarCode_SN);
+ }
+
}
});
@@ -346,7 +347,7 @@
//鍒濆鍖栫晫闈�
function set_ClearBill() {
//杩涘叆椤甸潰榛樿鍏夋爣鍦ㄦ祦杞崱涓�
- $("#HBardCodeProcExchBillNo").focus();
+ $("#HBarCode_Batch").focus();
//鍒跺崟浜�
$("#HMaker").val(sessionStorage["HUserName"]);
$("#HMakeDate").val(Format(new Date(), "yyyy-MM-dd"));
@@ -355,7 +356,7 @@
//鍒濆鍖栬〃鏍�
set_InitGrid();
//
- //get_Display();
+ get_Display();
}
//#region 閫氳繃鐧诲綍鐢ㄦ埛鑾峰彇榛樿鍊�
@@ -425,7 +426,10 @@
table.render(option);
}
-
+ /**
+ * 鎵壒娆$爜
+ * @param HBarCode
+ */
//鏉$爜鍥炶溅鏌ヨ
function txtHBarCode_KeyDown(HBarCode) {
@@ -442,16 +446,20 @@
$("#HBarCode_BatchSec").val(HBarCode);
const parts = HBarCode.split('@');
$("#HBatchNo").val(parts[2]);
+
$("#HMaterNumber").val(data1.data[0]["HMaterNumber"])
$("#HMaterName").val(data1.data[0]["HMaterName"])
$("#HMaterModel").val(data1.data[0]["HMaterModel"])
$("#HSupID").val(data1.data[0]["HSupID"])
$("#HSupName").val(data1.data[0]["HSupName"])
$("#HBarCode_Batch").prop("readonly", true);
+
+ //鍏夋爣鍦ㄩ暛闆曠爜涓�
+ $("#HBarCode_SN").focus();
}
else {
layer.close(indexs);
- layer.msg(get_MessageError(data1.Message, sessionStorage["HTranSlate"]));
+ layer.msg(data1.Message);
}
},
@@ -461,15 +469,110 @@
}
});
}
+ /**
+ * 鎵暛闆曠爜
+ * @param HBarCode
+ */
+ //闀洉鐮佸洖杞︽煡璇�
+ function txtHBarCodeSN_KeyDown(HBarCode) {
+
+ //var data = {
+ // "field": {
+ // "HMaterID": $("#HMaterID").val(), "HProcID": $("#HProcID").val(), "HBatchNo": $("#HBarCode_Batch").val(),
+ // "HGroupID": $("#HGroupID").val(), "HSourceID": $("#HSourceID").val(),
+ // "HICMOInterID": $("#HICMOInterID").val(), "HICMOEntryID": $("#HICMOEntryID").val(),
+ // "HICMOBillNo": $("#HICMOBillNo").val(),
+ // "HProdOrgID": sessionStorage["OrganizationID"],
+ // "HEmpID": $("#HEmpID").val(), "HProcExchBillNo": $("#HProcExchBillNo").val(),
+ // "HProcExchInterID": $("#HProcExchInterID").val(), "HProcExchEntryID": $("#HProcExchEntryID").val(),
+ // "HDeptID": $("#HDeptID").val()
+ // }
+ //};
+ var data = {
+ "field": {
+ "HProcID": $("#HProcID").val(), "HBatchNo": $("#HBarCode_Batch").val(),
+ "HGroupID": $("#HGroupID").val(), "HSourceID": $("#HSourceID").val(),
+ "HProdOrgID": sessionStorage["OrganizationID"],
+ "HEmpID": $("#HEmpID").val(), "HDeptID": $("#HDeptID").val()
+ }
+ };
+ var sMainStr = JSON.stringify(data.field);
+ var sSubStr = HBarCode;
+ var sMainSub = sMainStr + ';' + sSubStr + ';' + sessionStorage["HUserName"] ;
+ var indexs = layer.load();
+ $.ajax({
+ type: "POST",
+ url: GetWEBURL() + "/Cj_SingleStation/AddStationOutBillList",
+ async: false,
+ data: { "sMainSub": sMainSub },
+ dataType: "json",
+ success: function (data1) {
+ if (data1.count == 1) {
+ layer.close(indexs);
+ //鍏夋爣鍦ㄩ暛闆曠爜涓�
+ $("#HBarCode_SN").val("");
+ $("#HBarCode_SN").focus();
+ $("#HReturnMessage").text("鎴愬姛鎵爜涓�涓�:" + HBarCode);
+ get_Display();
+ }
+ else {
+ $("#HBarCode_SN").val("");
+ layer.close(indexs);
+ layer.msg(data1.Message, { icon: 5, btn: ["纭"], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "鍑虹幇閿欒" });
+ }
+
+ },
+ error: function (err) {
+ $("#HBarCode_SN").val("");
+ layer.close(indexs);
+ layer.msg(get_MessageError("閿欒:" + err, sessionStorage["HTranSlate"]), { icon: 5, btn: [get_MessageError('[0000-2-008]纭', sessionStorage["HTranSlate"])], time: 100000, offset: 't', skin: 'layui-layer-lan', title: get_MessageError("[0000-2-009]娓╅Θ鎻愮ず", sessionStorage["HTranSlate"]) });
+ }
+ });
+ }
+
+ //鍒犻櫎鍗曟嵁
+ function btn_Delete() {
+ var checkStatus = table.checkStatus('mainTable')
+ , data = checkStatus.data;
+ if (checkStatus.data.length === 1) {
+ layer.confirm(get_MessageError('[0000-1-003]纭畾鍒犻櫎' + data[0].鍗曟嵁鍙� + '鍚楋紵', sessionStorage["HTranSlate"]), function (index) {
+ var ajaxLoad = layer.load();
+ //閫昏緫鍒犻櫎鏂规硶
+ $.ajax({
+ url: GetWEBURL() + '/Cj_StationOutBill/del_StationOutBill',
+ type: "GET",
+ data: { "HInterID": data[0].hmainid, "HDeleteMan": sessionStorage["HUserName"], "HBillSubType": "3791" },
+ success: function (result) {
+ if (result.count == 1) {
+ get_Display();
+ layer.close(ajaxLoad);
+ } else {
+ layer.close(ajaxLoad);
+ layer.alert(get_MessageError(result.Message, sessionStorage["HTranSlate"]) + result.Message, { icon: 5 });
+ }
+ }, error: function () {
+ layer.close(ajaxLoad);
+ layer.alert(get_MessageError("[0000-1-002]鎺ュ彛璇锋眰澶辫触!", sessionStorage["HTranSlate"]), { icon: 5 });
+ }
+ });
+ layer.close(index);
+ });
+ } else {
+ layer.msg(get_MessageError('[0000-1-001]璇烽�夋嫨涓�琛屾暟鎹紪杈戯紒', sessionStorage["HTranSlate"]));
+ }
+ }
//鍔犺浇缃戞牸
- function get_Display() {
+ function get_Display(sWhere='') {
var ajaxLoad = layer.load();
+ var HProcID = $("#HProcID").val();
+ var HSourceID = $("#HSourceID").val();
+ sWhere += ` and HProcID = ${HProcID} and HSourceID = ${HSourceID}`
$.ajax({
- url: GetWEBURL() + '/Cg_POOrderBill/list',
+ url: GetWEBURL() + '/Cj_SingleStation/SingleStationOutBillList',
async: false,
type: "GET",
- data: { "sWhere": '', "user": sessionStorage["HUserName"] },
+ data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] },
success: function (data1) {
if (data1.count == 1) {
var data = [];//鍒楀瓧娈垫暟鎹�
--
Gitblit v1.9.1