From 4e82ecbe27527e65b70b55841b87f0e7f1a0f953 Mon Sep 17 00:00:00 2001
From: ch <37327@LLOOCCY>
Date: 星期五, 16 四月 2021 10:32:03 +0800
Subject: [PATCH] 新增了LAYUI出入库单据、调拨单、条码档案列表
---
WebTM/views/验收入库/产品入库/Kf_ProductInBill_Fast.html | 164 ++++++++++++++++++++++++++++++++++++++++++------------
1 files changed, 126 insertions(+), 38 deletions(-)
diff --git "a/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\344\272\247\345\223\201\345\205\245\345\272\223/Kf_ProductInBill_Fast.html" "b/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\344\272\247\345\223\201\345\205\245\345\272\223/Kf_ProductInBill_Fast.html"
index 4e3c566..e89cab8 100644
--- "a/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\344\272\247\345\223\201\345\205\245\345\272\223/Kf_ProductInBill_Fast.html"
+++ "b/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\344\272\247\345\223\201\345\205\245\345\272\223/Kf_ProductInBill_Fast.html"
@@ -21,7 +21,17 @@
<div class="layui-form-item" style="padding:15px;margin:0px">
<div class="layui-row">
<div class="layui-col-xs3">
- <label class="layui-form-label" style="width:40px;padding-left:0px;">鏉$爜</label>
+ <label class="layui-form-label" style="width:60px;padding-left:0px;">MES搴撲綅</label>
+ </div>
+ <div class="layui-col-xs8">
+ <input type="text" name="HMESSPName" id="HMESSPName" autocomplete="off" class="layui-input">
+ <input type="hidden" name="HMESSPID" id="HMESSPID" value="0" autocomplete="off" class="layui-input">
+ <input type="hidden" name="HExplanation" id="HExplanation" autocomplete="off" class="layui-input">
+ </div>
+ </div>
+ <div class="layui-row">
+ <div class="layui-col-xs3">
+ <label class="layui-form-label" style="width:60px;padding-left:0px;">鏉$爜</label>
</div>
<div class="layui-col-xs8">
<input type="text" name="HBarCode" id="HBarCode" lay-verify="HBarCode" autocomplete="off" class="layui-input">
@@ -70,7 +80,7 @@
<label class="layui-form-label" style="width:30px;padding-left:0px;">浠撳簱</label>
</div>
<div class="layui-col-xs6">
- <input type="text" name="HWHNAME" id="HWHNAME" lay-verify="HWHNAME" autocomplete="off" class="layui-input">
+ <input type="text" name="HWHNAME" id="HWHNAME" lay-verify="HWHNAME" autocomplete="off" class="layui-input" readonly>
<input type="hidden" name="HWHID" id="HWHID" lay-verify="HWHID" value="0" autocomplete="off" class="layui-input">
</div>
<div class="layui-col-xs3">
@@ -84,11 +94,11 @@
<label class="layui-form-label" style="width:30px;padding-left:0px;">浠撲綅</label>
</div>
<div class="layui-col-xs6">
- <input type="text" name="HStockPlaceName" id="HStockPlaceName" lay-verify="HStockPlaceName" autocomplete="off" class="layui-input">
- <input type="hidden" name="HStockPlaceID" id="HStockPlaceID" lay-verify="HStockPlaceID" value="0" autocomplete="off" class="layui-input">
+ <input type="text" name="HStockPlaceName" id="HStockPlaceName" autocomplete="off" class="layui-input" style="background-color:#efefef4d;" readonly>
+ <input type="hidden" name="HStockPlaceID" id="HStockPlaceID" value="0" autocomplete="off" class="layui-input">
</div>
<div class="layui-col-xs3">
- <button type="button" lay-submit="" class="layui-btn" lay-filter="HSpID-BT">...</button>
+ <button type="button" lay-submit="" class="layui-btn" lay-filter="HSpID-BT" style="display:none">...</button>
</div>
</div>
</div>
@@ -253,6 +263,7 @@
$("#HMakerID").hide();
$("#HBillerID").val(sessionStorage["HBillerID"]);
$("#HBillerID").hide();
+ var HSourceFlag = sessionStorage["SourceFlag"];
//榛樿甯﹀叆鐨勪粨搴擄紝濡傛灉鍚敤浠撲綅鍒欎粨浣嶆湁鏁堬紝濡傛灉娌℃湁鍚敤鍒欎粨浣嶇伆搴� new
$("#HBarCode").focus();
@@ -268,6 +279,14 @@
}
return vars;
}
+
+ //鍒ゆ柇鏄惁鐧诲綍 鏈櫥褰曞垯璺冲埌鐧诲綍椤�
+ if (sessionStorage.login != "login") {
+ layer.confirm("鐧诲綍澶辨晥锛岃閲嶆柊鐧诲綍锛�", {
+ icon: 4, skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず", closeBtn: 0, btn: ['閲嶆柊鐧诲綍']
+ }, function () { window.location.href = "../../user/login.html"; });
+ }
+
var params = getUrlVars();
var linterid = params[params[0]]; //浠庡弬鏁颁腑鑾峰彇 鍗曟嵁鍐呯爜
var lSourceBillType = params[params[2]]; //浠庡崟鎹幏鍙� 婧愬崟绫诲瀷
@@ -299,7 +318,7 @@
{
table.render({
elem: '#wl-table'
- , url: GetWEBURL1() + '/ProductIn/DisBillEntryList_Webs_Json'
+ , url: GetWEBURL() + '/ProductIn/DisBillEntryList_Webs_Json'
, cellMinWidth: 80
, toolbar: '#toolbarDemo'
, where: { HBillID: linterid, HBillType: '1202', sWhere: '' }
@@ -369,6 +388,8 @@
//}
//
//
+
+ //閫夋嫨浠撳簱
form.on('submit(HWHID-BT)', function () {//閫夋嫨浠撳簱
layer.open({
type: 2
@@ -384,6 +405,8 @@
}
})
});
+
+ //閫夋嫨浠撲綅
form.on('submit(HSpID-BT)', function () {//閫夋嫨浠撲綅
layer.open({
type: 2
@@ -399,6 +422,8 @@
}
})
});
+
+ //閫夋嫨淇濈
form.on('submit(HKeeperID-BT)', function () {//閫夋嫨淇濈
layer.open({
type: 2
@@ -414,6 +439,8 @@
}
})
});
+
+ //閫夋嫨楠屾敹
form.on('submit(HSecManagerID-BT)', function (data) {//閫夋嫨楠屾敹
var sMainStr = JSON.stringify(data.field);
layer.open({
@@ -430,6 +457,8 @@
}
})
});
+
+ //閫夋嫨閮ㄩ棬
form.on('submit(HDeptID-BT)', function () {//閫夋嫨閮ㄩ棬
layer.open({
type: 2
@@ -445,6 +474,8 @@
}
})
});
+
+ //缂栬緫
form.on('submit(cmdModify)', function () {//缂栬緫
var sSubStr = table.cache['wl-table'];
//if (AllowLoadData(sSubStr) != false) {//闈炵┖楠岃瘉
@@ -465,7 +496,7 @@
});
form.on('submit(Cancel)', function () {
- sessionStorage["SourceFlag"] = false;
+ //sessionStorage["SourceFlag"] = false;
parent.location.href = "../../../views/index.html"
//window.close();//鍏抽棴褰撳墠椤�
})
@@ -495,7 +526,7 @@
table.render({
elem: '#wl-table'
//, url: 'http://61.130.49.162:9090/WMSAPI///ProductIn/DisBillEntryList_Mate_Webs_Json'
- , url: GetWEBURL1() + '/ProductIn/DisBillEntryList_Webs_Json'
+ , url: GetWEBURL() + '/ProductIn/DisBillEntryList_Webs_Json'
, cellMinWidth: 80
, toolbar: '#toolbarDemo'
, where: { HBillID: sInterID, HBillType: '1202', sWhere: '' }
@@ -530,6 +561,18 @@
//鎻愪氦
form.on('submit(Saver)', function (data) {//鎻愪氦
//debugger;
+ if ($("#HExplanation").val() == "") {
+ if ($("#HWHNAME").val() == "瀹藉箙鎴愬搧浠揘EW" || $("#HWHNAME").val() == "鏍锋湰浠揘EW") {
+ $("#HWHNAME").val("");
+ $("#HWHID").val("");
+ layer.msg("璇锋壂MES搴撲綅鐮侊紒", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+ return;
+ }
+ else
+ {
+ $("#HExplanation").val($("#HWHNAME").val());
+ }
+ }
var sMainStr = JSON.stringify(data.field);
var sSubStr = table.cache['wl-table'];
//var sSourceType = $("#HBillType").val();
@@ -621,9 +664,9 @@
//url: "http://61.130.49.162:9090/WMSAPI///ProductIn/get_CheckTypeByBarCode_Json",
url: GetWEBURL() + "/ProductIn/get_CheckTypeByBarCode_Json",
type: "GET",
- data: { "sCode": sBarCode, "sInterID": sInterID, "sBillNo": sBillNo, "sBillType": sBillType, "sMaker": sessionStorage["HUserName"], "WhID": sHWHID, "SPID": sHSPID, "sQty": sQty, "sRedBlue": false, "SourceFlag": sessionStorage["SourceFlag"], "sSourceBillNo": sSourceBillNo, "sSourceType": sHBillType, "HOWNERID": 0 },
+ data: { "sCode": sBarCode, "sInterID": sInterID, "sBillNo": sBillNo, "sBillType": sBillType, "sMaker": sessionStorage["HUserName"], "WhID": sHWHID, "SPID": sHSPID, "sQty": sQty, "sRedBlue": false, "SourceFlag": HSourceFlag, "sSourceBillNo": sSourceBillNo, "sSourceType": sHBillType, "HOWNERID": 0 },
success: function (result) {
- debugger;
+ //debugger;
if (result.count == 1) {
if (result.data.HBarType == '浠撳簱鏉$爜') {
$("#HWHNAME").val(result.data.HWhName);
@@ -652,7 +695,7 @@
$("#HDeptName").val(result.data.HDeptName);
$("#HDeptID").val(result.data.HDeptID);
$("#HSourceBillNo").val(result.data.HSourceBillNo);
- sessionStorage["SourceFlag"] = true;
+ HSourceFlag = true;
//鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
//if (result.data.HSourceBillType == "3711") {
// $("#HBillType").val("3711");
@@ -664,7 +707,7 @@
element.tabChange('tab-ProductlnBill', '3');
}
else {
- if (sessionStorage["SourceFlag"] == "true") {
+ if (HSourceFlag == "true") {
element.tabChange('tab-ProductlnBill', '3');
}
else {
@@ -673,7 +716,7 @@
//$("#HDeptName").val(result.data.HDept);
//$("#HDeptID").val(result.data.HDeptID);
$("#HSourceBillNo").val(result.data.HSourceBillNo);
- sessionStorage["SourceFlag"] = true;
+ HSourceFlag = true;
//鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
//if (result.data.HSourceBillType == "3711") {
// $("#HBillType").val("3711");
@@ -694,28 +737,28 @@
layer.load(3)
table.render({
elem: '#wl-table'
- //, url: 'http://61.130.49.162:9090/WMSAPI///ProductIn/DisBillEntryList_Webs_Json'
- , url: GetWEBURL1() + '/ProductIn/DisBillEntryList_Webs_Json'
- , toolbar: '#toolbarDemo'
- , where: { HBillID: sInterID, HBillType: '1202', sWhere: '' }
- , cols: [[
- { type: 'radio' }
- , { field: 'HQty', title: '鏁伴噺', width: 150 }
- , { field: 'HQtyMust', title: '搴旀敹鏁伴噺', width: 150 }
- , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 150 }
- , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 150 }
- , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 150 }
- , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 150 }
- , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 150 }
- , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 150 }
- , { field: 'HBatchNo', title: '鎵规', width: 150 }
- ]]
- // , data: [linterid]
- // , page: true
- , height: 500
- , done: function () {
- layer.closeAll("loading");
- }
+ //, url: 'http://61.130.49.162:9090/WMSAPI///ProductIn/DisBillEntryList_Webs_Json'
+ , url: GetWEBURL() + '/ProductIn/DisBillEntryList_Webs_Json'
+ , toolbar: '#toolbarDemo'
+ , where: { HBillID: sInterID, HBillType: '1202', sWhere: '' }
+ , cols: [[
+ { type: 'radio' }
+ , { field: 'HQty', title: '鏁伴噺', width: 150 }
+ , { field: 'HQtyMust', title: '搴旀敹鏁伴噺', width: 150 }
+ , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 150 }
+ , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 150 }
+ , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 150 }
+ , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 150 }
+ , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 150 }
+ , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 150 }
+ , { field: 'HBatchNo', title: '鎵规', width: 150 }
+ ]]
+ // , data: [linterid]
+ // , page: true
+ , height: 500
+ , done: function () {
+ layer.closeAll("loading");
+ }
});
}
else {
@@ -736,6 +779,8 @@
//layer.closeAll("loading");
//}
});
+
+ //鎵簮鍗�
$('#HSourceBillNo').on('keydown', function (event) { //鎵簮鍗�
var HSourceBillNo = $('#HSourceBillNo').val()
var sInterID = $("#HInterID").val()
@@ -755,13 +800,13 @@
data: { "HSourceBillType": HSourceBillType, "HSourceBillNo": HSourceBillNo, "sInterID": sInterID, "sBillNo": sBillNo },
success: function (result) {
if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
- sessionStorage["SourceFlag"] = true;
+ HSourceFlag = true;
layer.load(3)
element.tabChange('tab-ProductlnBill', '2');
table.render({
elem: '#wl-table'
//, url: 'http://61.130.49.162:9090/WMSAPI///ProductIn/DisBillEntryList_Webs_Json'
- , url: GetWEBURL1() + '/ProductIn/DisBillEntryList_Webs_Json'
+ , url: GetWEBURL() + '/ProductIn/DisBillEntryList_Webs_Json'
, toolbar: '#toolbarDemo'
, where: { HBillID: sInterID, HBillType: '1202', sWhere: '' }
, cols: [[
@@ -793,12 +838,13 @@
}
});
+ //鎵粨浣�
$('#HStockPlaceName').on('keydown', function (event) { //鎵粨浣�
var HBarCode = $('#HStockPlaceName').val()
if (event.keyCode == 13) {
//鍒ゆ柇鏂囨湰妗嗘槸鍚︽湁鏁版嵁 new
$.ajax({
- url: GetWEBURL() + "/Web/GetSpName_Json",
+ url: GetWEBURL() + "/LookingFor/getSpName_Json",
type: "GET",
data: { "HBarCode": HBarCode },
success: function (result) {
@@ -819,6 +865,48 @@
});
}
});
+
+ //鎵玀ES浠撲綅
+ $('#HMESSPName').on('keydown', function (event) { //鎵粨浣�
+ var HBarCode = $('#HMESSPName').val();
+ if (event.keyCode == 13) {
+ //鍒ゆ柇鏂囨湰妗嗘槸鍚︽湁鏁版嵁 new
+ $.ajax({
+ url: GetWEBURL() + "/LookingFor/getSpName_Json",
+ type: "GET",
+ data: { "HBarCode": HBarCode },
+ success: function (result) {
+ if (result.count == 1) {
+ $("#HMESSPID").val(result.data[0].HWHID);
+ $("#HMESSPName").val(result.data[0].HWhName + "-" + result.data[0].HName);
+ $("#HExplanation").val(result.data[0].HName + "-" + result.data[0].HWhName);
+ $.ajax({
+ url: GetWEBURL() + "/LookingFor/GetSpNameMES_Json",
+ type: "GET",
+ data: { "HERPWHID": result.data[0].HWHID },
+ success: function (result) {
+ if (result.count == 1) {
+ $("#HWHID").val(result.data[0].HMESWHID);
+ $("#HWHNAME").val(result.data[0].HMESWHNAME);
+ $("#HMESSPName").attr("readonly", "readonly");//MES浠撲綅鍙HExplanation
+ $("#HMESSPName").css("background-color", "#efefef4d");
+ }
+ else {
+ layer.msg(result.Message, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+ }
+ layer.closeAll("loading");
+ }
+ });
+ }
+ else {
+ layer.msg(result.Message, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+ }
+ layer.closeAll("loading");
+ }
+ });
+ }
+ });
+
//鍒锋柊鏄庣粏椤电
table.render({
elem: '#mx-table'
--
Gitblit v1.9.1