|
|
|
@ -41,29 +41,52 @@ function getPickingList() { |
|
|
|
$("#roll_table").html(''); |
|
|
|
if (data.code == 0) { |
|
|
|
pick = data.data; |
|
|
|
var bool = true |
|
|
|
if (pick) { |
|
|
|
pick.forEach((item, index) => { |
|
|
|
var str = '<tr id = ' + item.partNo + '>' + |
|
|
|
'<th class="" style="text-align:center;background-color: #ffff;">' + |
|
|
|
'<button onclick="boxingModal(\'' + item.orderNo + ',' + item.partNo + '\')" data-toggle="modal" style="padding: 3px 10px;">' + |
|
|
|
'装箱</button>' + |
|
|
|
'<th class="" style="text-align:center;background-color: #ffff;">' + |
|
|
|
'<span>' + item.orderNo + '</span></th>' + |
|
|
|
'<th class="" style="text-align:center;background-color: #ffff;">' + |
|
|
|
'<span>' + item.partNo + '</span></th>' + |
|
|
|
'<th class="" style="text-align:center;background-color: #ffff;">' + |
|
|
|
'<span>' + item.orderQty + '</span></th>' + |
|
|
|
'<th class="" style="text-align:center;background-color: #ffff;">' + |
|
|
|
'<span>' + item.pickedQty + '</span></th>' + |
|
|
|
'</tr>'; |
|
|
|
var str = '' |
|
|
|
if (item.orderQty == item.pickedQty) { |
|
|
|
if (partCss == item.partNo) { |
|
|
|
bool = false |
|
|
|
} |
|
|
|
str = '<tr id = ' + item.partNo + '>' + |
|
|
|
'<th class="" style="text-align:center;background-color: #4FE50FFF;">' + |
|
|
|
'<button onclick="boxingModal(\'' + item.orderNo + ',' + item.partNo + '\')" data-toggle="modal" style="padding: 3px 10px;">' + |
|
|
|
'装箱</button>' + |
|
|
|
'<th class="" style="text-align:center;background-color: #4FE50FFF;">' + |
|
|
|
'<span>' + item.orderNo + '</span></th>' + |
|
|
|
'<th class="" style="text-align:center;background-color: #4FE50FFF;">' + |
|
|
|
'<span>' + item.partNo + '</span></th>' + |
|
|
|
'<th class="" style="text-align:center;background-color: #4FE50FFF;">' + |
|
|
|
'<span>' + item.orderQty + '</span></th>' + |
|
|
|
'<th class="" style="text-align:center;background-color: #4FE50FFF;">' + |
|
|
|
'<span>' + item.pickedQty + '</span></th>' + |
|
|
|
'</tr>'; |
|
|
|
} else { |
|
|
|
str = '<tr id = ' + item.partNo + '>' + |
|
|
|
'<th class="" style="text-align:center;background-color: #ffff;">' + |
|
|
|
'<button onclick="boxingModal(\'' + item.orderNo + ',' + item.partNo + '\')" data-toggle="modal" style="padding: 3px 10px;">' + |
|
|
|
'装箱</button>' + |
|
|
|
'<th class="" style="text-align:center;background-color: #ffff;">' + |
|
|
|
'<span>' + item.orderNo + '</span></th>' + |
|
|
|
'<th class="" style="text-align:center;background-color: #ffff;">' + |
|
|
|
'<span>' + item.partNo + '</span></th>' + |
|
|
|
'<th class="" style="text-align:center;background-color: #ffff;">' + |
|
|
|
'<span>' + item.orderQty + '</span></th>' + |
|
|
|
'<th class="" style="text-align:center;background-color: #ffff;">' + |
|
|
|
'<span>' + item.pickedQty + '</span></th>' + |
|
|
|
'</tr>'; |
|
|
|
} |
|
|
|
$("#roll_table").append(str); |
|
|
|
}) |
|
|
|
$("#rollNo").focus(); |
|
|
|
if (data.msg != 'success'){ |
|
|
|
if (data.msg != 'success') { |
|
|
|
layer.alert(data.msg); |
|
|
|
|
|
|
|
} |
|
|
|
if (partCss){ |
|
|
|
$('#'+partCss+ ' th').css("background-color","#99CC9AFF") |
|
|
|
if (partCss && bool) { |
|
|
|
|
|
|
|
$('#' + partCss + ' th').css("background-color", "#99CC9AFF") |
|
|
|
} |
|
|
|
} else { |
|
|
|
layer.alert('该卷不存在'); |
|
|
|
@ -80,13 +103,14 @@ function getPickingList() { |
|
|
|
if (data.code == 500) { |
|
|
|
layer.alert(data.msg); |
|
|
|
} |
|
|
|
if (data.code == 300){ |
|
|
|
if (data.code == 300) { |
|
|
|
layer.confirm(data.msg + '<br>是否前往拆箱页面', { |
|
|
|
btn: ['确定', '取消'] |
|
|
|
// 按钮
|
|
|
|
}, ()=> { |
|
|
|
window.location.href = "/pda/productwarehouse/boxingManage?menuId=188&token="+$.cookie("token")+"&superiorId=121" |
|
|
|
},()=>{}) |
|
|
|
}, () => { |
|
|
|
window.location.href = "/pda/productwarehouse/boxingManage?menuId=188&token=" + $.cookie("token") + "&superiorId=121" |
|
|
|
}, () => { |
|
|
|
}) |
|
|
|
} |
|
|
|
if (data.code == 401) { |
|
|
|
layer.alert('用户身份已过期'); |
|
|
|
@ -96,11 +120,8 @@ function getPickingList() { |
|
|
|
error: function (data) { |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function getRollInfo(rollNo) { |
|
|
|
let roll = { |
|
|
|
"rollNo": rollNo, |
|
|
|
@ -118,8 +139,8 @@ function getRollInfo(rollNo) { |
|
|
|
}, |
|
|
|
success: function (data) { |
|
|
|
if (data.code == 0) { |
|
|
|
if (lastTimeRoll){ |
|
|
|
if (lastTimeRoll.partno != data.roll.partno){ |
|
|
|
if (lastTimeRoll) { |
|
|
|
if (lastTimeRoll.partno != data.roll.partno) { |
|
|
|
layer.alert("友情提示: 本次扫描卷,料号与上次不是同一料号") |
|
|
|
} |
|
|
|
} |
|
|
|
@ -218,10 +239,10 @@ function boxing() { |
|
|
|
}, |
|
|
|
success: function (data) { |
|
|
|
if (data.code == 0) { |
|
|
|
if (data.sealingNumber == 0 ) { |
|
|
|
if (data.sealingNumber == 0) { |
|
|
|
layer.alert('请扫入卷再装箱'); |
|
|
|
} else { |
|
|
|
pickingPrint(data.sealingNumber,data.boxNo) |
|
|
|
pickingPrint(data.sealingNumber, data.boxNo) |
|
|
|
} |
|
|
|
} |
|
|
|
if (data.code == 500) { |
|
|
|
@ -310,7 +331,7 @@ function getPrintFile(customerId) { |
|
|
|
} |
|
|
|
|
|
|
|
// 装箱完成调用打印
|
|
|
|
function pickingPrint(pickingNumber,boxNo) { |
|
|
|
function pickingPrint(pickingNumber, boxNo) { |
|
|
|
var reoprt = $('#reoprtId').val(); |
|
|
|
console.log(reoprt) |
|
|
|
var split = reoprt.split(":"); |
|
|
|
@ -326,7 +347,7 @@ function pickingPrint(pickingNumber,boxNo) { |
|
|
|
partNo: partNo1, |
|
|
|
pickingNumber: pickingNumber, |
|
|
|
isCustomer: isCustomer, |
|
|
|
boxNo:boxNo |
|
|
|
boxNo: boxNo |
|
|
|
} |
|
|
|
$.ajax({ |
|
|
|
url: "/packing/printPacking", |
|
|
|
@ -395,7 +416,7 @@ function delivery() { |
|
|
|
} |
|
|
|
|
|
|
|
// 打印卷标签
|
|
|
|
function print(val){ |
|
|
|
function print(val) { |
|
|
|
var rollPrintList = val |
|
|
|
if (rollPrintList.length <= 0) { |
|
|
|
return; |
|
|
|
|