领料出库修改
This commit is contained in:
parent
3652eed44e
commit
fc3b62d426
|
|
@ -127,7 +127,7 @@
|
|||
<div class="machinesInfo" style="margin-top:5px;margin-bottom:5px;" id="machinesInfoNum">
|
||||
|
||||
</div>
|
||||
<div class="machinesInfo" id="machinesInfo"></div>
|
||||
<div class="machinesInfo" id="machinesInfos"></div>
|
||||
<div class="machinesInfoOutStock" id="machinesInfoOutStock" style="margin-top:10px"></div>
|
||||
</div>
|
||||
<div class="mui-bar mui-bar-footer" style="padding: 0px;">
|
||||
|
|
|
|||
|
|
@ -84,12 +84,12 @@ function showCounts(type,num){
|
|||
var notOutNum = (preOutNum - alOutNum);
|
||||
html += "<div class='countInfo'>"
|
||||
html += " <span class='preCount' id='preCount'>总数:"+preOutNum+"</span> <span class='preCount' id='preCount'>未出库数:"+notOutNum+"</span></div>";
|
||||
$("#machinesInfoCounts").append(html);
|
||||
$("#machinesInfoCounts").html(html);
|
||||
}else{
|
||||
var notOutNum = (preOutNum - num);
|
||||
html += "<div class='countInfo'>"
|
||||
html += " <span class='preCount' id='preCount'>总数:"+preOutNum+"</span> <span class='preCount' id='preCount'>未出库数:"+notOutNum+"</span></div>";
|
||||
$("#machinesInfoCounts").append(html);
|
||||
$("#machinesInfoCounts").html(html);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -109,7 +109,7 @@ function sureSerch() {
|
|||
}
|
||||
var notOutNum = (preOutNum - alOutNum);
|
||||
|
||||
$("#machinesInfo").html("");
|
||||
$("#machinesInfos").html("");
|
||||
$("#machinesInfoNum").html("");
|
||||
var deviceCode = $("#deviceCode").val();
|
||||
// alert(typeId,deviceCode);
|
||||
|
|
@ -119,7 +119,7 @@ function sureSerch() {
|
|||
});
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: bnsUrl + "/backstage/machine/findByLikeCode",
|
||||
url: bnsUrl + "/backstage/machine/findByLikeCodeNew",
|
||||
data: {
|
||||
typeId:typeId,
|
||||
deviceCode: deviceCode,
|
||||
|
|
@ -164,14 +164,14 @@ function sureSerch() {
|
|||
html += "</div>";
|
||||
html += "<input type='checkbox' class='device-checkbox' data-id='" + id + "' style='margin-left:120px;' />";
|
||||
html += "</div>";
|
||||
$("#machinesInfo").append(html);
|
||||
$("#machinesInfos").append(html);
|
||||
}
|
||||
|
||||
} else {
|
||||
html = "";
|
||||
html += "<div class='inclode'>"
|
||||
html += "<span class='noneData' id='noneData'>请输入设备编码</span><br /></div>";
|
||||
$("#machinesInfo").append(html);
|
||||
$("#machinesInfos").append(html);
|
||||
}
|
||||
},
|
||||
error: function(XMLHttpRequest, textStatus, errorThrown) {
|
||||
|
|
@ -207,10 +207,55 @@ function confirmOutTaskList() {
|
|||
|
||||
var completedRequests = 0;
|
||||
var totalRequests = selectedDevices.length;
|
||||
|
||||
var deviceList = [];
|
||||
selectedDevices.forEach(function(device) {
|
||||
completedRequests++;
|
||||
doOutBydeviceCode(device.deviceCode, device.batchStatus, device.maId,completedRequests,totalRequests);
|
||||
deviceList.push({
|
||||
id:id,
|
||||
taskId: taskId,
|
||||
typeId: typeId,
|
||||
maId: device.maId,
|
||||
deviceCode: device.deviceCode,
|
||||
machineStatus: device.batchStatus,
|
||||
outPersonId:outPersonId,
|
||||
preOutNum:preOutNum,
|
||||
thisOutNum:1
|
||||
|
||||
});
|
||||
// doOutBydeviceCode(device.deviceCode, device.batchStatus, device.maId,completedRequests,totalRequests);
|
||||
});
|
||||
doOutBydeviceCodeNew(deviceList,completedRequests);
|
||||
|
||||
}
|
||||
|
||||
function doOutBydeviceCodeNew(deviceList,completedRequests) {
|
||||
layer.open({
|
||||
type: 2,
|
||||
content: '加载中'
|
||||
});
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: bnsUrl + '/backstage/app/out/doOutBydeviceCodeNew',
|
||||
contentType: "application/json",
|
||||
data: JSON.stringify(deviceList),
|
||||
dataType: "json",
|
||||
success: function(data) {
|
||||
layer.closeAll('loading');
|
||||
if(data == "1" || data == 1){
|
||||
refreshData(completedRequests)
|
||||
}
|
||||
else if(data == "-3"){
|
||||
alert("机具编码重复");
|
||||
}
|
||||
else if(data == "2" || data == '2') {
|
||||
alert("已达到出库数量");
|
||||
} else {
|
||||
alert("出库失败");
|
||||
}
|
||||
},
|
||||
error: function(XMLHttpRequest, textStatus, errorThrown) {
|
||||
alert("未连接到服务器,请检查网络!");
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
|
@ -269,7 +314,8 @@ var alOutNumNew = parseInt(alOutNum) + completedRequests;
|
|||
function refreshData(completedRequests) {
|
||||
alert("全部出库成功");
|
||||
alOutNum = parseInt(alOutNum) + completedRequests;
|
||||
sureSerch()
|
||||
sureSerch();
|
||||
showAlOutInfo();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue