From 157abc191c34e57c1b958ae74fc3de6518ca8a30 Mon Sep 17 00:00:00 2001
From: zhaowc <526854230@qq.com>
Date: 星期五, 28 二月 2025 11:06:36 +0800
Subject: [PATCH] 修改客户需求
---
Pda/View/HouseDataSetting/stockCheck.html | 185 +++++++++++++++++++++++++++++++++-------------
1 files changed, 133 insertions(+), 52 deletions(-)
diff --git a/Pda/View/HouseDataSetting/stockCheck.html b/Pda/View/HouseDataSetting/stockCheck.html
index 387d64c..e849861 100644
--- a/Pda/View/HouseDataSetting/stockCheck.html
+++ b/Pda/View/HouseDataSetting/stockCheck.html
@@ -7,7 +7,7 @@
<!-- <meta name="viewport" content="width=device-width, initial-scale=0.665, minimum-scale=0.5, maximum-scale=1, user-scalable=no" /> -->
<!-- <meta name="viewport" content="width=device-width, initial-scale=0.665" /> -->
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
- <title>Boxline PDA</title>
+ <title>搴撳瓨鐩樼偣</title>
<link rel="stylesheet" href="/layui/css/layui.css" />
<link rel="stylesheet" href="/css/style.css" />
@@ -158,15 +158,22 @@
.cut-line {
margin-top: 10px;
}
- .show{
+
+ .show {
display: block;
}
- .noshow{
+
+ .noshow {
display: none;
}
+
td {
word-break: break-all;
word-wrap: break-word;
+ }
+
+ .layui-form-switch {
+ margin-top: 0;
}
</style>
<link rel="stylesheet" href="/css/adapter.css" />
@@ -220,18 +227,25 @@
</div>
<div class="layout-tab-page">
- <div class="layui-form-item layout-input" style="margin-top: 10px;">
+ <div id="" class="layui-form-item layout-input">
+ <label class="layui-form-label">鏄惁鏁伴噺鐩樼偣锛�</label>
+ <div class="layui-input-block" style="position: absolute;top: 100;">
+ <input type="checkbox" name="IsZhengTuo" id="IsZhengTuo" lay-skin="switch"
+ lay-text="鏄瘄鍚�" lay-filter="IsZhengTuo" class="layui-input">
+ </div>
+ </div>
+ <div id="boxno1" class="layui-form-item layout-input" style="margin-top: 10px;">
<label class="layui-form-label">绠辩爜锛�</label>
<div class="layui-input-block">
<input id="boxNo" type="text" lay-verify="boxNo" placeholder="璇锋壂鎻忓绠辨潯鐮�"
- autocomplete="off" class="layui-input">
+ autocomplete="off" class="layui-input">
</div>
</div>
<div id="boxno3" class="layui-form-item layout-input noshow" style="margin-top: 10px;">
<label class="layui-form-label">鏀爜锛�</label>
<div class="layui-input-block">
<input id="boxNo3" type="text" lay-verify="boxNo3" placeholder="璇锋壂鎻忔敮鐮�"
- autocomplete="off" class="layui-input">
+ autocomplete="off" class="layui-input">
</div>
</div>
<div class="layui-form-item layout-dropdownlist" style="margin-top: 10px;">
@@ -239,7 +253,7 @@
<div class="layui-input-block">
<select id="Result" lay-filter="Result" lay-search>
<!-- <option value=""></option> -->
- <option value="0" selected>姝e父</option>
+ <option value="0">姝e父</option>
<option value="1">鐩樹簭</option>
<option value="2">鐩樼泩</option>
</select>
@@ -276,13 +290,21 @@
</form>
</div>
- <div id="" class="layout-tbl-paging">
+ <div id="tableid" class="layout-tbl-paging">
<table id="tableBoxList" class="tbl-box-list" border="" cellspacing="" cellpadding="">
<tr>
- <th style="width: 40%;">绠辩爜</th>
- <th style="width: 30%;">鏀爜</th>
- <th style="width: 15%;">绠卞唴鏁伴噺</th>
- <th style="width: 15%;">缁撴灉</th>
+ <th style="width: 40%;">
+ <p id="a">绠辩爜</p>
+ </th>
+ <th style="width: 30%;">
+ <p id="b">鏀爜</p>
+ </th>
+ <th style="width: 15%;">
+ <p id="c">绠卞唴鏁伴噺</p>
+ </th>
+ <th style="width: 15%;">
+ <p id="d">缁撴灉</p>
+ </th>
</tr>
<tr id="boxCell" style="display: none;">
<td name="boxNo"></td>
@@ -291,7 +313,7 @@
<td name="result"></td>
</tr>
</table>
-
+
</div>
</div>
</div>
@@ -305,11 +327,56 @@
layui.use(['form', 'jquery'], function () {
var form = layui.form
-
+
var tableData = null;
var canPickBox = true;
$("#palletNo").focus();
+ //鏄惁鏁伴噺鐩樼偣
+ var isContinue = "0";
+
+ form.on('switch(IsZhengTuo)', function (obj) {
+ $("#a").html('');
+ $("#b").html('');
+ $("#c").html('');
+
+ if (obj.elem.checked) {
+ $('#boxno1').attr("style", "display:none")
+ $('#boxno3').attr("style", "display:none")
+ isContinue = "1";
+
+ $("#a").html('鐗╂枡缂栫爜');
+ $("#b").html('鎵樼洏鏉$爜');
+ $("#c").html('鎵樼洏鏁伴噺');
+
+ } else {
+ $('#boxno1').attr("style", "display:block")
+ $('#boxno3').attr("style", "display:block")
+ isContinue = "0";
+
+ $("#a").html('绠辩爜');
+ $("#b").html('鏀爜');
+ $("#c").html('绠卞唴鏁伴噺');
+
+ if ($("#Result").val() != "0") {
+ $('#boxno3').addClass("show");
+ $('#boxno3').removeClass("noshow");
+ } else {
+ $('#boxno3').addClass("noshow");
+ $('#boxno3').removeClass("show");
+ }
+ if ($("#Result").val() == "2") {
+ $('#factNum').removeAttr("disabled");
+ }
+ else {
+ $('#factNum').attr("disabled", "disabled");
+ }
+ }
+ $('#boxNo').val("");
+ $('#boxNo3').val("");
+ refreshTable()
+ checkPalletState()
+ });
$("#menuImg").click(function (e) {
//console.log("menuImg")
@@ -326,7 +393,7 @@
$("#menuList").hide()
})
- // //褰撴墭鐩樻潯鐮佽緭鍏ユ澶卞幓鐒︾偣鏃�,妫�鏌ヤ竴涓嬫墭鐩樼姸鎬�
+ //褰撴墭鐩樻潯鐮佽緭鍏ユ澶卞幓鐒︾偣鏃�,妫�鏌ヤ竴涓嬫墭鐩樼姸鎬�
// $("#palletNo").blur(function () {
// //console.log("0000000000000")
// if ($("#palletNo").val() == "") {
@@ -335,7 +402,7 @@
// checkPalletState()
// })
//褰撴墭鐩樻潯鐮佽緭鍏ュ簱鍥炶溅鏃�
- $("#palletNo").keydown(function(e) {
+ $("#palletNo").keydown(function (e) {
if (e.keyCode === 13) {
//妫�鏌ユ墭鐩樼姸鎬�
checkPalletState();
@@ -364,7 +431,7 @@
if (res.code == 0) { //鎴愬姛
updateBillList();
- updateGoodList();
+ updateGoodList();
GetOutInfo();
} else { //涓嶆垚鍔�
layer.msg("鏃犳晥鎵樼洏", {
@@ -375,9 +442,9 @@
});
}
-
+
//鏇存柊鐩樼偣鍗�
- function updateBillList() {
+ function updateBillList() {
$("#bar").empty()
$("#bar").append('<option value =>' + '</option>');
form.render('select');
@@ -386,7 +453,7 @@
PalletNo: $("#palletNo").val(),
};
synData(IP + "/PdaCr/GetStockCheckNoList", param, 'post', function (res) {
-
+
if (res.code == 0) { //鎴愬姛
for (var i = 0; i < res.data.length; i++) {
if (i == 0) {
@@ -397,7 +464,7 @@
+ res.data[i] + '</option>');
}
}
- form.render('select');
+ form.render('select');
} else { //涓嶆垚鍔�
layer.msg(res.msg, {
icon: 2,
@@ -408,7 +475,7 @@
}
//鍒濆鍖栨覆鏌撶墿鏂�
function updateGoodList() {
-
+
$("#skuLotNo").empty()
$("#skuLotNo").append('<option value =>' + '</option>');
form.render('select');
@@ -420,16 +487,16 @@
synData(IP + "/PdaCr/GetStockCheckDetailList", param, 'post', function (res) {
if (res.code == 0) { //鎴愬姛
for (var i = 0; i < res.data.length; i++) {
- var vl = res.data[i].SkuNo+'-'+ res.data[i].LotNo;
- var vl2 = res.data[i].SkuName+'-'+ res.data[i].LotNo;
+ var vl = res.data[i].SkuNo + '-' + res.data[i].LotNo;
+ var vl2 = res.data[i].SkuName + '-' + res.data[i].LotNo;
if (i == 0) {
- $("#skuLotNo").append('<option value =' + vl + ' selected>'+ vl2 + '</option>');
+ $("#skuLotNo").append('<option value =' + vl + ' selected>' + vl2 + '</option>');
} else {
- $("#skuLotNo").append('<option value =' + vl + '>'+ vl2 + '</option>');
+ $("#skuLotNo").append('<option value =' + vl + '>' + vl2 + '</option>');
}
}
form.render('select');
-
+
} else { //涓嶆垚鍔�
// layer.msg(res.msg, {
// icon: 2,
@@ -447,7 +514,9 @@
"CrDetail": $("#skuLotNo").val(),
"PalletNo": $("#palletNo").val(),
"BoxNo": $("#boxNo").val(),
+ "isContinue": isContinue,
}
+ console.log(param)
synData(IP + "/PdaCr/GetStockCheckLogList", param, 'post', function (res) {
console.log(res)
if (res.code == 0) { //鎴愬姛
@@ -482,15 +551,15 @@
}, function () { });
return
}
- if ($("#Result").val() == "2") {
- if ($("#boxNo").val() == "" ||$("#boxNo3").val() == "") {
+ if ($("#Result").val() == "2" && isContinue == "0") {
+ if ($("#boxNo").val() == "" || $("#boxNo3").val() == "") {
layer.msg("璇锋壂鎻忓绠辨潯鐮佸拰鏀爜", {
icon: 2,
time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
});
return;
- }
- if($("#factNum").val()<=0){
+ }
+ if ($("#factNum").val() <= 0) {
layer.msg("鐩樼泩鏃舵暟閲忎笉鑳戒负绌轰笖闇�澶т簬0", {
icon: 2,
time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
@@ -498,9 +567,9 @@
return;
}
}
-
+
if (canPickBox == true) {
- canPickBox = false;
+ canPickBox = false;
var param = {
"CrNo": $("#bar").val(),
"CrDetail": $("#skuLotNo").val(),
@@ -509,9 +578,10 @@
"BoxNo3": $("#boxNo3").val(),
"Result": $("#Result").val(),
"Qty": parseInt($("#factNum").val()),
+ "isContinue": isContinue,
}
sendData(IP + "/PdaCr/CrSetCheck", param, 'post', function (res) {
-
+
if (res.code == 0) { //鎴愬姛
layer.msg(res.msg, {
icon: 1,
@@ -523,6 +593,7 @@
$("#boxNo3").val('')
$("#Result").val('0')
refreshTable()
+ GetOutInfo()
canPickBox = true
});
@@ -541,21 +612,21 @@
}
return false; //闃绘琛ㄥ崟璺宠浆銆傚鏋滈渶瑕佽〃鍗曡烦杞紝鍘绘帀杩欐鍗冲彲銆�
});
-
+
//閫変腑缁撴灉涓嬫媺浜嬩欢
form.on('select(Result)', function (data) {
if (data.value != "0") {
$('#boxno3').addClass("show");
$('#boxno3').removeClass("noshow");
- }else{
+ } else {
$('#boxno3').addClass("noshow");
$('#boxno3').removeClass("show");
}
- if(data.value == "2"){
+ if (data.value == "2" || isContinue == "1") {
$('#factNum').removeAttr("disabled");
}
- else{
- $('#factNum').attr("disabled","disabled");
+ else if (isContinue != "1") {
+ $('#factNum').attr("disabled", "disabled");
}
$('#boxNo3').val("");
});
@@ -564,7 +635,7 @@
let data = tableData
//鍏堟竻绌轰竴涓嬬瀛愬垪琛�
let trs = $("#tableBoxList tr")
- let len = trs.length ;
+ let len = trs.length;
for (i = len - 1; i >= 2; i--) {
trs[i].remove();
}
@@ -574,7 +645,7 @@
}
- if (data.length > 0) { //鎴愬姛
+ if (data.length > 0 || isContinue == "1") { //鎴愬姛
$("#boxNum").val(data.length)
var list = data
var arrTrs = new Array()
@@ -586,19 +657,29 @@
tr.appendTo("#tableBoxList");
idx++;
tr.attr('index', idx)
- tr.find("td[name='boxNo']").html(list[i].BoxNo);
- tr.find("td[name='boxNo3']").html(list[i].BoxNo3);
+ //鍒ゆ柇鏄惁涓烘暟閲�
+ if (isContinue == "1") {
+ tr.find("td[name='boxNo']").html(list[i].SkuNo);
+ tr.find("td[name='boxNo3']").html(list[i].PalletNo);
+ }
+ else {
+ tr.find("td[name='boxNo']").html(list[i].BoxNo);
+ tr.find("td[name='boxNo3']").html(list[i].BoxNo3);
+ }
tr.find("td[name='qty']").html(list[i].Qty);
- var CheckResultStr='';
- if(list[i].CheckResult=='0'){
- CheckResultStr='姝e父';
- } else if(list[i].CheckResult=='1'){
- CheckResultStr='鐩樹簭';
- }else if(list[i].CheckResult=='2'){
- CheckResultStr='鐩樼泩';
- }else if(list[i].CheckResult=='3'){
- CheckResultStr='瀹炵墿涓嶇';
+
+ var CheckResultStr = '';
+ if (list[i].CheckResult == '0') {
+ CheckResultStr = '姝e父';
+ } else if (list[i].CheckResult == '1') {
+ CheckResultStr = '鐩樹簭';
+ } else if (list[i].CheckResult == '2') {
+ CheckResultStr = '鐩樼泩';
+ } else if (list[i].CheckResult == '3') {
+ CheckResultStr = '瀹炵墿涓嶇';
+ } else if (list[i].CheckResult == '4') {
+ CheckResultStr = '鏁伴噺鐩樼偣';
}
tr.find("td[name='result']").html(CheckResultStr);
--
Gitblit v1.8.0