From 399eb07af584e1e2f1f7dafcfbb3b2a386cfbf3c Mon Sep 17 00:00:00 2001
From: wxw <Administrator@DESKTOP-5BIMHQ3>
Date: 星期二, 02 九月 2025 16:58:38 +0800
Subject: [PATCH] 修改问题
---
Pda/View/AsnSetting/productEnterQuantity.html | 122 +++++++++++++++++++++++++++++++---------
1 files changed, 94 insertions(+), 28 deletions(-)
diff --git a/Pda/View/AsnSetting/productEnterQuantity.html b/Pda/View/AsnSetting/productEnterQuantity.html
index ed63d72..5c3f2d4 100644
--- a/Pda/View/AsnSetting/productEnterQuantity.html
+++ b/Pda/View/AsnSetting/productEnterQuantity.html
@@ -295,11 +295,25 @@
</div>
<div id="" class="layui-form-item layout-input">
- <label class="layui-form-label" lang>鐗╂枡鏁伴噺锛�</label>
+ <!-- <label class="layui-form-label" lang>鐗╂枡鏁伴噺锛�</label>
<div class="layui-input-block">
<input id="SkuQty" type="number" lay-verify="stock" lang langholder
placeholder="璇疯緭鍏ョ墿鏂欐暟閲�" autocomplete="off" class="layui-input"
oninput="value=value.replace(/^(0+)|[^\d]+/g,'')">
+ </div> -->
+
+ <!-- <div class="layui-input-block">
+ <input id="SkuQty" type="number" lay-verify="stock" lay-affix="number" lang langholder
+ placeholder="璇疯緭鍏ョ墿鏂欐暟閲�" step="0.0001"
+ autocomplete="off" class="layui-input"
+ oninput="value=value.replace(/^(0+)|[^\d]+/g,'')">
+ </div> -->
+ <label class="layui-form-label" lang>鐗╂枡鏁伴噺锛�</label>
+ <div class="layui-input-block">
+ <!-- 鍏佽鏁板瓧銆佸皬鏁扮偣鍙婃渶澶�4浣嶅皬鏁� -->
+ <input id="SkuQty" type="number" lay-verify="stock" placeholder="璇疯緭鍏ョ墿鏂欐暟閲�"
+ autocomplete="off" class="layui-input"
+ oninput="value=value.replace(/^(0+)(?=\d)|[^\d.]/g,'').replace(/(\.\d{4})\d+/g, '$1')">
</div>
</div>
@@ -482,7 +496,7 @@
initLanguage()
setLanguage()
-
+
//鏄惁杩炵画缁勬墭
isContinue = "0";
@@ -568,8 +582,20 @@
checkBoxInfo()
}
});
+ //绠辩爜澶卞幓鐒︾偣浜嬩欢
+ $("#BOXCODE").blur(function(){
+ if ($("#BOXCODE").val() == "") {
+ layer.msg('璇峰厛鎵弿绠辩爜', {
+ icon: 2,
+ time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+ });
+ return
+ }
-
+ checkBoxInfo()
+ })
+
+
//鐐瑰嚮鍏ュ簱鍗曟嵁涓嬫媺妗嗕簨浠�
$("#selectDiv").click(function () {
if (xianshiyemian == 0) {
@@ -610,7 +636,7 @@
sendData(IP + "/PdaAsn/GetPasteAsnNoStrList", param, 'post', function (res) {
if (res.code == 0) { //鎴愬姛
for (var i = 0; i < res.data.length; i++) {
- $("#bar").append('<option value =' + res.data[i] + '>' + res.data[i] +'</option>');
+ $("#bar").append('<option value =' + res.data[i] + '>' + res.data[i] + '</option>');
}
form.render('select');
@@ -684,7 +710,7 @@
}, function () { });
}
})
-
+
//閫変腑鍏ュ簱鍗曚簨浠�
form.on('select(getbar)', function (data) {
updateGoodList()
@@ -737,7 +763,7 @@
'</option>');
} else {
$("#goodSelect").append('<option value =' + res.data[i].Id + '-' + i + ' selected>' + res.data[i]
- .SkuName + "-" + res.data[i].LotNo +
+ .SkuName + "=>" + res.data[i].LotNo +
'</option>');
}
} else {
@@ -748,7 +774,7 @@
'</option>');
} else {
$("#goodSelect").append('<option value =' + res.data[i].Id + '-' + i + ' selected>' + res.data[i]
- .SkuName + "-" + res.data[i].LotNo +
+ .SkuName + "=>" + res.data[i].LotNo +
'</option>');
}
@@ -759,7 +785,7 @@
'</option>');
} else {
$("#goodSelect").append('<option value =' + res.data[i].Id + '-' + i + '>' + res.data[i]
- .SkuName + "-" + res.data[i].LotNo +
+ .SkuName + "=>" + res.data[i].LotNo +
'</option>');
}
}
@@ -811,7 +837,7 @@
.SkuName);
}
if (res.data[i].LotNo != null) {
- $("#goodSelect1").append("-" + res.data[i].LotNo +
+ $("#goodSelect1").append("=>" + res.data[i].LotNo +
'</option>');
}
} else {
@@ -821,7 +847,7 @@
'</option>');
} else {
$("#goodSelect1").append('<option value =' + res.data[i].Id + ' selected>' + res.data[i]
- .SkuName + "-" + res.data[i].LotNo +
+ .SkuName + "=>" + res.data[i].LotNo +
'</option>');
}
}
@@ -981,12 +1007,17 @@
});
return;
}
+ // 鑾峰彇杈撳叆鐨勫�煎苟澶勭悊
+ var skuQty = parseFloat($("#SkuQty").val()) || 0;
+ // 纭繚鏄剧ず鏃朵繚鐣�4浣嶅皬鏁�
+ var formattedQty = skuQty.toFixed(4);
+
var param = {
AsnNo: $("#bar1").val(), //鍑哄簱鍗曟嵁
PalletNo: $("#STOCKCODE1").val(), //鎵樼洏鏉$爜
AsnDetailId: parseInt($("#goodSelect1").val()), //鍏ュ簱鍗曟槑缁咺D
LotNo: $("#goodSelect1").find("option:selected").text(), //鐗╂枡鎵规
- SkuQty: parseInt($("#SkuQty").val()), //鐗╂枡鏁伴噺
+ SkuQty: Number(skuQty), //鐗╂枡鏁伴噺
Demo: $("#NoticeDemo").val(), //鐗╂枡鏁伴噺
Origin: "PDA",
TableType: xianshiyemian,
@@ -1051,13 +1082,13 @@
function checkBoxInfo() {
var param = {
"BoxNo": $("#BOXCODE").val(),
- "ASNNo":$("#bar").val()
+ "ASNNo": $("#bar").val()
}
sendData(IP + "/PdaAsn/GetBindBoxInfos", param, 'post', function (res) {
-
-
+
+
if (res.code == 0) { //鎴愬姛
-
+
var bl = false;
if (res.data.length == 0) {
layer.msg("鏈煡璇㈠埌姝ょ鐗╂枡淇℃伅锛岃鏍稿疄!", {
@@ -1086,21 +1117,21 @@
}
}
asnDetails.forEach(element => {
- console.log(element.SkuNo );
- console.log( res.data[0].SkuNo);
+ console.log(element.SkuNo);
+ console.log(res.data[0].SkuNo);
console.log(element.SkuNo == res.data[0].SkuNo);
- console.log(element.LotNo == res.data[0].LotNo);
+ console.log(element.LotNo == res.data[0].LotNo);
if (element.SkuNo == res.data[0].SkuNo && element.LotNo == res.data[0].LotNo) {
console.log("asdfasdfsadf");
-
+
var sel = 'dd[lay-value=' + element.id + ']';
$('#goodSelect').siblings("div.layui-form-select").find('dl').find(sel).addClass('layui-this');
bl = true;
}
});
console.log(bl);
-
+
if (!bl) {
layer.msg("姝ょ鐗╂枡涓嶇鍚堣鍏ュ簱鍗曪紝璇锋牳瀹�!", {
icon: 2,
@@ -1109,19 +1140,19 @@
} else {
$("#BoxQty").val(res.data[0].Qty);
}
-
+
} else { //涓嶆垚鍔�
layer.msg(res.msg, {
- icon: 2,
- time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
- });
+ icon: 2,
+ time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+ });
//绠辩爜涓嶅瓨鍦紝璋冪敤璧嬬爜鎺ュ彛鑾峰彇绠变俊鎭�
//getFMBoxinfo();
}
});
}
- function getFMBoxinfo(){
+ function getFMBoxinfo() {
var param = {
"BoxNo": $("#BOXCODE").val(),
}
@@ -1186,9 +1217,44 @@
form.on('switch(IsLianXu)', function (obj) {
if (obj.elem.checked) {
- $('#BOX2').attr("style", "display:block")
- $('#zongDiv').attr("style", "height: 315px;")
- isContinue = "1";
+ if ($("#bar").val() == "") {
+ $('#IsLianXu').prop('checked',false);
+ layui.form.render();
+ layer.msg('璇烽�夋嫨鍏ュ簱鍗�', {
+ icon: 2,
+ time: 1000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+ });
+ return;
+ }
+ var param = {
+ ASNNo: $("#bar").val()
+ };
+ sendData(IP + "/PdaAsn/GetArrivalNotice", param, 'post', function (res) {
+ if (res.code == 0) { //鎴愬姛
+ if(res.data[0].Type=="0"){
+ $('#IsLianXu').prop('checked',false);
+ layui.form.render();
+ layer.msg('鎴愬搧鍏ュ簱鍗曚笉鑳藉紑鍚繛缁勶紒', {
+ icon: 2,
+ time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+ });
+ return;
+ }else{
+ $('#BOX2').attr("style", "display:block")
+ $('#zongDiv').attr("style", "height: 315px;")
+ isContinue = "1";
+ }
+ } else { //涓嶆垚鍔�
+ layer.msg('鍏ュ簱鍗曚俊鎭笉瀛樺湪', {
+ icon: 2,
+ time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+ }, function() {
+ $('#IsLianXu').prop('checked',false);
+ layui.form.render();
+ });
+ }
+ });
+
} else {
$('#BOX2').attr("style", "display:none")
$('#zongDiv').attr("style", "height: 285px;")
--
Gitblit v1.8.0