From 187db2c9b74f4908b143f73874cf72e4b2bd03e1 Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期二, 29 十月 2024 10:09:15 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-LayUI
---
WebTM/views/车间管理/产线/MES_ProductionLinePackaging.html | 242 +++++++++++++++++++++++++++++++-----------------
1 files changed, 155 insertions(+), 87 deletions(-)
diff --git "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\344\272\247\347\272\277/MES_ProductionLinePackaging.html" "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\344\272\247\347\272\277/MES_ProductionLinePackaging.html"
index 9112a7d..fc5861a 100644
--- "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\344\272\247\347\272\277/MES_ProductionLinePackaging.html"
+++ "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\344\272\247\347\272\277/MES_ProductionLinePackaging.html"
@@ -39,6 +39,7 @@
</div>
</div>
<button type="button" lay-submit="" lay-filter="Print" id="Print" class="layui-btn layui-btn-radius">鎵撳嵃</button>
+ <button type="button" lay-submit="" lay-filter="Print2" id="Print2" hidden="hidden" ></button>
<div class="layui-inline" style="width: 200px;">
<div class="layui-input-block">
<select name="PrintName" lay-verify="required" id="PrintName">
@@ -52,6 +53,7 @@
<select name="LDM" lay-verify="required" id="LDM">
<option value="DU3" selected>DU3</option>
<option value="QDR">QDR</option>
+ <option value="AAA">15杞﹂棿</option>
<option value="鍏朵粬">鍏朵粬</option>
</select>
</div>
@@ -64,6 +66,8 @@
<option value="1607222-00-B">1607222-00-B</option>
<option value="1943600-00-B">1943600-00-B</option>
<option value="1941600-00-B">1941600-00-B</option>
+ <option value="1941600-00-C">1941600-00-C</option>
+ <option value="1943600-00-C">1943600-00-C</option>
<option value="鍏朵粬" selected>鍏朵粬</option>
</select>
</div>
@@ -96,6 +100,12 @@
<label class="layui-inline" style="width:60px;">瀛愪欢鏉$爜</label>
<div class="layui-inline">
<input type="text" style="border-radius: 50px;width: 140%;" name="瀛愪欢鏉$爜" id="SubBarcode" autocomplete="off" placeholder="璇疯緭鍏ュ瓙浠舵潯鐮�" class="layui-input">
+ </div>
+ </div>
+ <div class="">
+ <label class="layui-inline" style="width:60px;">鏄惁娣风</label>
+ <div class="layui-inline">
+ <input type="checkbox" id="HMixedBox" name="HMixedBox" lay-skin="primary" value="" lay-filter="HMixedBox">
</div>
</div>
</div>
@@ -437,6 +447,7 @@
return util.toDateString(time, "yyyy-MM-dd");
}
}
+ //, { field: 'HBarCode_Pack', title: '鏉″舰鐮�', width: 145 }
, { field: 'HSourceBillNo', title: '鏉″舰鐮�', width: 145 }
, { field: 'HBillNo', title: '婧愬崟鍗曞彿', width: 125 }
, { field: 'HBarCode', title: '鍞竴鐮�', width: 125 }
@@ -522,7 +533,7 @@
return;
}
//鍒ゆ柇瑁呯鏁伴噺涓嶈兘澶т簬鍓╀綑鏁伴噺
- if (zxQty > icmoQtyNow) {
+ if (zxQty > icmoQtyNow && $("#HMixedBox").val()=="") {
playSound();
layer.msg("瑁呯鏁伴噺涓嶅厑璁稿ぇ浜庢祦杞崱鍓╀綑鏁伴噺锛佸墿浣欐暟閲忎负" + icmoQtyNow, { icon: 5, btn: ['閫�鍑�'], time: 100000, offset: 't' });
return;
@@ -581,6 +592,24 @@
}
});
+
+ form.on('checkbox(HMixedBox)', function (obj) {
+ if (icmoQtyNow == 0) {
+ playSound();
+ layer.msg("鍓╀綑鏁伴噺涓�" + icmoQtyNow + ",涓嶅厑璁告贩绠憋紒", { icon: 5, btn: ['閫�鍑�'], time: 100000, offset: 't' });
+ $("input[name='HMixedBox']").prop("checked", false);
+ form.render('checkbox');
+ return;
+ }
+ if (obj.value == "") {
+ $("#HMixedBox").val("1");
+ } else {
+ $("#HMixedBox").val("");
+ }
+
+ });
+
+
//瀛愪欢鏉$爜鍥炶溅鏂规硶
$('#SubBarcode').on('keydown', function (event) { //鎵潯褰㈢爜
@@ -602,16 +631,30 @@
return;
}
+ if (LDM == "AAA" && SubBarcode.length != 50) {
+ playSound();
+ layer.alert("瀛愪欢鏉$爜闀垮害涓嶄负50浣�!", { icon: 5, btn: ['閫�鍑�'], time: 100000, offset: 't' });
+ return;
+ }
+
if (SubBarcode.match(/[^\x00-\xff]/g) != null) {
playSound();
layer.alert("蹇呴』鏄崐瑙掑瓧绗�!", { icon: 5, btn: ['閫�鍑�'], time: 100000, offset: 't' });
return;
}
- if (LDM != "鍏朵粬" && BBM != "鍏朵粬" && reg.test(SubBarcode)) {
- playSound();
- layer.alert("璇锋煡鐪嬪瓙浠舵潯鐮佸ぇ鍐欐槸鍚︽纭�!", { icon: 5, btn: ['閫�鍑�'], time: 100000, offset: 't' });
- return;
+ if (SubBarcode.length == 50) {
+ if (LDM != "鍏朵粬" && reg.test(SubBarcode)) {
+ playSound();
+ layer.alert("璇锋煡鐪嬪瓙浠舵潯鐮佸ぇ鍐欐槸鍚︽纭�!", { icon: 5, btn: ['閫�鍑�'], time: 100000, offset: 't' });
+ return;
+ }
+ } else {
+ if (LDM != "鍏朵粬" && BBM != "鍏朵粬" && reg.test(SubBarcode)) {
+ playSound();
+ layer.alert("璇锋煡鐪嬪瓙浠舵潯鐮佸ぇ鍐欐槸鍚︽纭�!", { icon: 5, btn: ['閫�鍑�'], time: 100000, offset: 't' });
+ return;
+ }
}
if (LDM != "鍏朵粬" && BBM != "鍏朵粬" && SubBarcode.indexOf(BBM) == -1) {
@@ -670,7 +713,7 @@
url: GetWEBURL() + "/LEMS/SNBarcodeProcCtrl",
type: "GET",
async: false,
- data: { "SubBarcode": SubBarcode, "HProcExchBillNo": HProcExchBillNo },
+ data: { "SubBarcode": SubBarcode, "HProcExchBillNo": HProcExchBillNo, "HMixedBox": $("#HMixedBox").val(), "HBillNo": HBillNo2 },
success: function (result) {
if (result.count == 0) {
a = 1;
@@ -712,86 +755,93 @@
layer.alert("鍖呰鏁伴噺宸茬瓑浜庢祦杞崱鏁伴噺锛佷笉鍏佽鎵爜锛�", { icon: 1 });
return;
} else {
- $.ajax({//琛ㄤ綋瀛榯emp琛�
- url: GetWEBURL() + "/LEMS/SaveSubBarcode_Json",
- type: "GET",
- async: false,
- data: {
- "HBillNo": HBillNo
- , "SubBarcode": SubBarcode
- , "HInterID": HInterID
- , "HBillNo2": HBillNo2
- , "HBillType": HBillType
- , "sMaker": sMaker
- , "HBarCode": $("#HBarCode_wym").val()
- , "HNumber": $("#HNumber").val()
- , "HName": $("#HMaterName").val()
- , "HModel": $("#HModel").val()
- },
- success: function (result) {
- var data = result.data;
- if (result.Message == "璇ュ瓙浠舵潯鐮佸凡瀛樺湪") {
- playSound();
- layer.alert("璇ュ瓙浠舵潯鐮佸凡瀛樺湪", { icon: 5, btn: ['閫�鍑�'], time: 100000, offset: 't' });
- } else {
- if (data[0].Column1 == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
- $('#SubBarcode').val("");
- $("#SubBarcode").focus();
- table.reload('smjl-table', {
- url: GetWEBURL1() + '/LEMS/Update_HBillNo_SubBarcodeList_Json'
- , where: {
- HBillNo: HBillNo2
- , HBarCode: HBillNo
- }
- });
- zxQtyFlag++;
- pcmQtyFlag++
- $("#zxQty").val("" + zxQtyFlag + "/" + zxQty + "");
- $("#pcmQty").val("" + pcmQtyFlag + "/" + pcmQty + "");
- layer.msg("鎵弿鎴愬姛", { time: 5000, icon: 6 });
- $.ajax({//鏌ヨ鏉$爜妗f琛ㄩ噷鐨勯暛闆曟潯鐮佺殑鍚堣鏁伴噺鏂规硶
- url: GetWEBURL() + "/LEMS/Select_Gy_BarCodeBill_HQty",
- type: "GET",
- async: false,
- data: {
- "HBarCode": $("#HBarCode_wym").val()
- },
- success: function (result) {
- var HQty = result.data[0].HQty;
- HQty++;
- $.ajax({//鏇存柊鏉$爜妗f琛ㄩ噷鐨勯暛闆曟潯鐮佺殑鍚堣鏁伴噺鏂规硶
- url: GetWEBURL() + "/LEMS/Update_Gy_BarCodeBill_HQty",
- type: "GET",
- async: false,
- data: {
- "HBarCode": $("#HBarCode_wym").val(),
- "HQty": HQty
- },
- success: function (result) {
- var HQty = result.data;
- ZJTMFlag = true;
- }, error: function () {
- playSound();
- layer.alert("鏇存柊鏉$爜妗f琛ㄩ噷鐨勯暛闆曟潯鐮佺殑鍚堣鏁伴噺鏂规硶鍙戠敓閿欒!", { icon: 5 });
- }
- });
- }, error: function () {
- playSound();
- layer.alert("鏌ヨ鏉$爜妗f琛ㄩ噷鐨勯暛闆曟潯鐮佺殑鍚堣鏁伴噺鏂规硶鍙戠敓閿欒!", { icon: 5 });
- }
- });
- } else {
+ //鍒ゆ柇瑁呯鏁伴噺涓嶈兘澶т簬鍓╀綑鏁伴噺
+ if (AllHqty > icmoQtyNow && $("#HMixedBox").val() == "") {
+ playSound();
+ layer.msg("瑁呯鏁伴噺涓嶅厑璁稿ぇ浜庢祦杞崱鍓╀綑鏁伴噺锛佸墿浣欐暟閲忎负" + icmoQtyNow, { icon: 5, btn: ['閫�鍑�'], time: 100000, offset: 't' });
+ return;
+ } else {
+ $.ajax({//琛ㄤ綋瀛榯emp琛�
+ url: GetWEBURL() + "/LEMS/SaveSubBarcode_Json",
+ type: "GET",
+ async: false,
+ data: {
+ "HBillNo": HBillNo
+ , "SubBarcode": SubBarcode
+ , "HInterID": HInterID
+ , "HBillNo2": HBillNo2
+ , "HBillType": HBillType
+ , "sMaker": sMaker
+ , "HBarCode": $("#HBarCode_wym").val()
+ , "HNumber": $("#HNumber").val()
+ , "HName": $("#HMaterName").val()
+ , "HModel": $("#HModel").val()
+ },
+ success: function (result) {
+ var data = result.data;
+ if (result.Message == "璇ュ瓙浠舵潯鐮佸凡瀛樺湪") {
playSound();
- // $("#verifycode").click();
- //layer.msg(result.Message, { icon: 5 });
- layer.alert("鎻掑叆缂撳瓨琛ㄥけ璐�", { icon: 5, btn: ['閫�鍑�'], time: 100000, offset: 't' });
+ layer.alert("璇ュ瓙浠舵潯鐮佸凡瀛樺湪", { icon: 5, btn: ['閫�鍑�'], time: 100000, offset: 't' });
+ } else {
+ if (data[0].Column1 == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+ $('#SubBarcode').val("");
+ $("#SubBarcode").focus();
+ table.reload('smjl-table', {
+ url: GetWEBURL1() + '/LEMS/Update_HBillNo_SubBarcodeList_Json'
+ , where: {
+ HBillNo: HBillNo2
+ , HBarCode: HBillNo
+ }
+ });
+ zxQtyFlag++;
+ pcmQtyFlag++
+ $("#zxQty").val("" + zxQtyFlag + "/" + zxQty + "");
+ $("#pcmQty").val("" + pcmQtyFlag + "/" + pcmQty + "");
+ layer.msg("鎵弿鎴愬姛", { time: 5000, icon: 6 });
+ $.ajax({//鏌ヨ鏉$爜妗f琛ㄩ噷鐨勯暛闆曟潯鐮佺殑鍚堣鏁伴噺鏂规硶
+ url: GetWEBURL() + "/LEMS/Select_Gy_BarCodeBill_HQty",
+ type: "GET",
+ async: false,
+ data: {
+ "HBarCode": $("#HBarCode_wym").val()
+ },
+ success: function (result) {
+ var HQty = result.data[0].HQty;
+ HQty++;
+ $.ajax({//鏇存柊鏉$爜妗f琛ㄩ噷鐨勯暛闆曟潯鐮佺殑鍚堣鏁伴噺鏂规硶
+ url: GetWEBURL() + "/LEMS/Update_Gy_BarCodeBill_HQty",
+ type: "GET",
+ async: false,
+ data: {
+ "HBarCode": $("#HBarCode_wym").val(),
+ "HQty": HQty
+ },
+ success: function (result) {
+ var HQty = result.data;
+ ZJTMFlag = true;
+ }, error: function () {
+ playSound();
+ layer.alert("鏇存柊鏉$爜妗f琛ㄩ噷鐨勯暛闆曟潯鐮佺殑鍚堣鏁伴噺鏂规硶鍙戠敓閿欒!", { icon: 5 });
+ }
+ });
+ }, error: function () {
+ playSound();
+ layer.alert("鏌ヨ鏉$爜妗f琛ㄩ噷鐨勯暛闆曟潯鐮佺殑鍚堣鏁伴噺鏂规硶鍙戠敓閿欒!", { icon: 5 });
+ }
+ });
+ } else {
+ playSound();
+ // $("#verifycode").click();
+ //layer.msg(result.Message, { icon: 5 });
+ layer.alert("鎻掑叆缂撳瓨琛ㄥけ璐�", { icon: 5, btn: ['閫�鍑�'], time: 100000, offset: 't' });
+ }
}
+ }, error: function () {
+ playSound();
+ layer.alert("瀛愪欢鏉$爜鏂规硶鍙戠敓閿欒!", { icon: 5 });
}
- }, error: function () {
- playSound();
- layer.alert("瀛愪欢鏉$爜鏂规硶鍙戠敓閿欒!", { icon: 5 });
- }
- });
+ });
+ }
}
}, error: function () {
playSound();
@@ -950,7 +1000,11 @@
}
});
}
- $("#Print").click();
+ if (LDM == "AAA") {
+ $("#Print2").click();
+ } else {
+ $("#Print").click();
+ }
$("#HBarCode_White").val("");
//瀛愪欢鏉$爜鏁伴噺宸叉壂瀹� 鏉$爜鎵畬鍚�
if (pcmQty == pcmQtyFlag) {
@@ -972,6 +1026,9 @@
//娓呯┖鎵弿璁板綍鐨勮绠辨暟閲�
zxQtyFlag = 0;
pcmQtyFlag = 0;
+ $("#HMixedBox").val("");
+ $("input[name='HMixedBox']").prop("checked", false);
+ form.render('checkbox');
//鑾峰彇鍗曟嵁鍙�
getBillno();
//鎵弿鏉$爜
@@ -1028,7 +1085,7 @@
});
//鎵撳嵃鎸夐挳
- form.on('submit(Print)', function (data) {//閫�鍑�
+ form.on('submit(Print2)', function (data) {//閫�鍑�
//鎵撳紑鎵撳嵃妯℃澘
var linterid = $("#HInterID").val();
//var linterid = "28973";
@@ -1058,9 +1115,9 @@
var report1 = "";
var parintName = $("#PrintName").val();
if (parintName == "鏂帿灏�") {
- report1 = urlAddRandomNo("../../views/grf/鍖呰鍗曠墿鏂欐爣璇嗗崱(缃戦〉鐗�).grf");
+ report1 = urlAddRandomNo("../../grf/鍖呰鍗曠墿鏂欐爣璇嗗崱(缃戦〉鐗�).grf");
} else {
- report1 = urlAddRandomNo("../../views/grf/鍖呰鍗曠墿鏂欐爣璇嗗崱(缃戦〉鐗�)2.grf");
+ report1 = urlAddRandomNo("../../grf/鍖呰鍗曠墿鏂欐爣璇嗗崱(缃戦〉鐗�)2.grf");
}
var args = {
@@ -1089,6 +1146,17 @@
})
});
+ //鎵撳嵃鎸夐挳
+ form.on('submit(Print)', function (data) {//閫�鍑�
+ //鎵撳紑鎵撳嵃妯℃澘
+ var linterid = $("#HInterID").val();
+ var Type = "HBarCodePrint";
+ var OpenTmp = "鐧芥爣鎵撳嵃1";
+ //var ReportViewer = document.getElementById("ReportViewer");
+ window.open("../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/HBarPlanPrint.html?linterid=" + linterid.toString() + "&Type=" + Type.toString() + "&OpenTmp=" + OpenTmp.toString());
+ $("#Print2").click();
+ });
+
//鐩戝惉琛ㄦ牸涓宸ュ叿浜嬩欢
table.on('tool(smjl-table)', function (obj) { //娉細tool 鏄伐鍏锋潯浜嬩欢鍚嶏紝test 鏄� table 鍘熷瀹瑰櫒鐨勫睘鎬� lay-filter="瀵瑰簲鐨勫��"
var data = obj.data //鑾峰緱褰撳墠琛屾暟鎹�
--
Gitblit v1.9.1