|
|
|
@ -24,6 +24,9 @@ $(function(){ |
|
|
|
var workData = $.cookie("transFer"); |
|
|
|
if(workData != null && workData !==""){ |
|
|
|
currentData = JSON.parse(workData); |
|
|
|
if (currentData.preLotSize){ |
|
|
|
currentData.lotSize = currentData.preLotSize |
|
|
|
} |
|
|
|
$("#warehouseQty").val(currentData.lotSize); |
|
|
|
if(currentData.weightFactor!='0'&¤tData.weightFactor!=''&¤tData.weightFactor!=null){ |
|
|
|
$("#warehouseQtyKG").val((currentData.lotSize*currentData.weightFactor).toFixed(1)); |
|
|
|
@ -54,6 +57,7 @@ function initPageProp(preDate){ |
|
|
|
$("#partDesc").val(preDate.partDescription) |
|
|
|
$("#scanQty").val(0) |
|
|
|
$("#scanWeight").val(0) |
|
|
|
console.log(preDate) |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -66,7 +70,8 @@ function queryQrCode(){ |
|
|
|
|
|
|
|
var jsonData = { |
|
|
|
qrCodeContent:qrCode, |
|
|
|
orderNo:currentData.orderNo |
|
|
|
orderNo:currentData.orderNo, |
|
|
|
seqNo: currentData.seqNo |
|
|
|
} |
|
|
|
$.ajax({ |
|
|
|
url: "/pad/checkScanLabelByTransfer", |
|
|
|
@ -129,36 +134,54 @@ function onPushScanTable(){ |
|
|
|
return |
|
|
|
} |
|
|
|
labelList.push(print) |
|
|
|
|
|
|
|
onloadTable(); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function onloadTable(){ |
|
|
|
// 操作dom,为dom
|
|
|
|
let domStr = ""; |
|
|
|
|
|
|
|
// 获得总数和总重量
|
|
|
|
let totalQty = 0; |
|
|
|
for (let i = 0; i < labelList.length; i++) { |
|
|
|
let row = labelList[i]; |
|
|
|
if (totalQty + currentData.finishedQty + row.qty > currentData.lotSize){ |
|
|
|
layer.msg("入库数量超出通知单数量") |
|
|
|
labelList.splice(i,1) |
|
|
|
continue |
|
|
|
} |
|
|
|
totalQty += row.qty |
|
|
|
domStr += `<tr id="${print.seqNo}_${print.itemNo}">
|
|
|
|
domStr += `<tr id="${row.seqNo}_${row.itemNo}">
|
|
|
|
<th class="" style="text-align:center;background-color: #ffff;width: 5%;"> |
|
|
|
<span>${i+1}</span> |
|
|
|
</th> |
|
|
|
<th class="" style="text-align:center;background-color: #ffff;width: 15%;"> |
|
|
|
<span>${print.partNo}</span> |
|
|
|
<span>${row.partNo}</span> |
|
|
|
</th> |
|
|
|
<th class="" style="text-align:center;background-color: #ffff;width: 10%;"> |
|
|
|
<span>${row.qty}</span> |
|
|
|
</th> |
|
|
|
<th class="" style="text-align:center;background-color: #ffff;width: 10%;"> |
|
|
|
<span>${print.qty}</span> |
|
|
|
<span>${row.qtyWeight}</span> |
|
|
|
</th> |
|
|
|
<th class="" style="text-align:center;background-color: #ffff;width: 10%;"> |
|
|
|
<span>${print.qtyWeight}</span> |
|
|
|
<span onclick="removeLabel(${i})">删除</span> |
|
|
|
</th> |
|
|
|
</tr>` |
|
|
|
} |
|
|
|
|
|
|
|
$("#issue_table").html("").append(domStr); |
|
|
|
$("#scanQty").val(totalQty) |
|
|
|
$("#scanWeight").val((totalQty * parseFloat(currentData.weightFactor)).toFixed(1)) |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function removeLabel(index){ |
|
|
|
labelList.splice(index,1) |
|
|
|
onloadTable(); |
|
|
|
layer.msg("操作成功") |
|
|
|
} |
|
|
|
|
|
|
|
//下级界面页面跳转
|
|
|
|
function pageJump(){ |
|
|
|
if(currentData == null){ |
|
|
|
@ -173,6 +196,7 @@ function pageJump(){ |
|
|
|
layer.msg("未扫描标签") |
|
|
|
return |
|
|
|
} |
|
|
|
currentData.preLotSize = currentData.lotSize |
|
|
|
currentData.lotSize = parseFloat($("#scanQty").val()) |
|
|
|
if (currentData.lotSize === 0){ |
|
|
|
layer.msg("扫描数量为0") |
|
|
|
|