|
|
@ -413,6 +413,7 @@ |
|
|
var req = {}; |
|
|
var req = {}; |
|
|
req.qrCode = result; |
|
|
req.qrCode = result; |
|
|
req.codeFlag = 1; |
|
|
req.codeFlag = 1; |
|
|
|
|
|
let loading2 = layer.open({ type: 3, shade: [0.25, '#000'], icon: 2, speed: 0}); |
|
|
$.ajax({ |
|
|
$.ajax({ |
|
|
url: "/material/qywxApplicationInScanBarCode", |
|
|
url: "/material/qywxApplicationInScanBarCode", |
|
|
type: "post", |
|
|
type: "post", |
|
|
@ -454,12 +455,14 @@ |
|
|
$("#unit" + idNumber).append(new Option(unitList[i].newUnit, unitList[i].newUnit)); |
|
|
$("#unit" + idNumber).append(new Option(unitList[i].newUnit, unitList[i].newUnit)); |
|
|
} |
|
|
} |
|
|
form.render(); |
|
|
form.render(); |
|
|
|
|
|
layer.close(loading2); |
|
|
} else { |
|
|
} else { |
|
|
// 如果没有对应关系 |
|
|
// 如果没有对应关系 |
|
|
layer.msg("对于编码:" + result + ",并未发现对应的物料", { |
|
|
layer.msg("对于编码:" + result + ",并未发现对应的物料", { |
|
|
icon: 0, |
|
|
icon: 0, |
|
|
time: 1000 //0.5秒关闭(如果不配置,默认是3秒) |
|
|
time: 1000 //0.5秒关闭(如果不配置,默认是3秒) |
|
|
}, function () { |
|
|
}, function () { |
|
|
|
|
|
layer.close(loading2); |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ -490,6 +493,7 @@ |
|
|
var req = {}; |
|
|
var req = {}; |
|
|
req.qrCode = result; |
|
|
req.qrCode = result; |
|
|
req.codeFlag = 2; |
|
|
req.codeFlag = 2; |
|
|
|
|
|
let loading2 = layer.open({ type: 3, shade: [0.25, '#000'], icon: 2, speed: 0}); |
|
|
$.ajax({ |
|
|
$.ajax({ |
|
|
url: "/material/qywxApplicationInScanQrCode", |
|
|
url: "/material/qywxApplicationInScanQrCode", |
|
|
type: "post", |
|
|
type: "post", |
|
|
@ -558,6 +562,7 @@ |
|
|
materialName.value = data.mname; |
|
|
materialName.value = data.mname; |
|
|
materialId.value = data.mid; |
|
|
materialId.value = data.mid; |
|
|
materialCode.value = data.code; |
|
|
materialCode.value = data.code; |
|
|
|
|
|
layer.close(loading2); |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
@ -601,6 +606,7 @@ |
|
|
}, |
|
|
}, |
|
|
end: function () { |
|
|
end: function () { |
|
|
var mid = materialId.value; |
|
|
var mid = materialId.value; |
|
|
|
|
|
let loading2 = layer.open({ type: 3, shade: [0.25, '#000'], icon: 2, speed: 0}); |
|
|
if (mid !== '') { |
|
|
if (mid !== '') { |
|
|
$.ajax({ |
|
|
$.ajax({ |
|
|
url: "/material/findMatrialById?mid=" + mid, |
|
|
url: "/material/findMatrialById?mid=" + mid, |
|
|
@ -652,6 +658,7 @@ |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
form.render(); |
|
|
form.render(); |
|
|
|
|
|
layer.close(loading2); |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
@ -678,6 +685,7 @@ |
|
|
req.code = code; |
|
|
req.code = code; |
|
|
req.type = "in"; |
|
|
req.type = "in"; |
|
|
if (code !== "") { |
|
|
if (code !== "") { |
|
|
|
|
|
let loading2 = layer.open({ type: 3, shade: [0.25, '#000'], icon: 2, speed: 0}); |
|
|
$.ajax({ |
|
|
$.ajax({ |
|
|
url: "/material/findMatrialByCode", |
|
|
url: "/material/findMatrialByCode", |
|
|
type: "get", |
|
|
type: "get", |
|
|
@ -687,11 +695,13 @@ |
|
|
success: function (d) { |
|
|
success: function (d) { |
|
|
var d = d.data; |
|
|
var d = d.data; |
|
|
if (d == null) { |
|
|
if (d == null) { |
|
|
layer.msg("仓库中暂无该物料"); |
|
|
layer.msg("仓库中暂无该物料",{icon:0,time:500},function () { |
|
|
|
|
|
layer.close(loading2); |
|
|
materialName.value = ""; |
|
|
materialName.value = ""; |
|
|
materialId.value = ""; |
|
|
materialId.value = ""; |
|
|
obj.value = ""; |
|
|
obj.value = ""; |
|
|
$('#place' + objId).empty(); |
|
|
$('#place' + objId).empty(); |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
} else { |
|
|
} else { |
|
|
materialName.value = d.mname; |
|
|
materialName.value = d.mname; |
|
|
@ -734,6 +744,7 @@ |
|
|
barCode.empty(); |
|
|
barCode.empty(); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
layer.close(loading2); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
@ -759,6 +770,7 @@ |
|
|
data = data.split(",")[0]; |
|
|
data = data.split(",")[0]; |
|
|
if (data !== "") { |
|
|
if (data !== "") { |
|
|
req.mname = data; |
|
|
req.mname = data; |
|
|
|
|
|
let loading2 = layer.open({ type: 3, shade: [0.25, '#000'], icon: 2, speed: 0}); |
|
|
$.ajax({ |
|
|
$.ajax({ |
|
|
url: "/material/findMaterialByCondition", |
|
|
url: "/material/findMaterialByCondition", |
|
|
type: "post", |
|
|
type: "post", |
|
|
@ -767,15 +779,20 @@ |
|
|
contentType: "application/json;charset=utf-8", |
|
|
contentType: "application/json;charset=utf-8", |
|
|
success: function (d) { |
|
|
success: function (d) { |
|
|
if (d.count > 1) { |
|
|
if (d.count > 1) { |
|
|
layer.msg("请点击右侧搜索确定物品"); |
|
|
layer.msg("请点击右侧搜索确定物品",{icon:0,time:500},function () { |
|
|
materialId.value = ""; |
|
|
materialId.value = ""; |
|
|
codeValue.value = ""; |
|
|
codeValue.value = ""; |
|
|
|
|
|
layer.close(loading2); |
|
|
|
|
|
}); |
|
|
return false; |
|
|
return false; |
|
|
} else if (d.count === 0) { |
|
|
} else if (d.count === 0) { |
|
|
layer.msg("没有该物品,请确认输入是否正确"); |
|
|
layer.msg("没有该物品,请确认输入是否正确",{icon:5,time:500},function () { |
|
|
materialId.value = ""; |
|
|
materialId.value = ""; |
|
|
codeValue.value = ""; |
|
|
codeValue.value = ""; |
|
|
materialName.value = ""; |
|
|
materialName.value = ""; |
|
|
|
|
|
layer.close(loading2); |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
return false; |
|
|
return false; |
|
|
} else { |
|
|
} else { |
|
|
var idNumber = materialId.name.split("mid")[1]; |
|
|
var idNumber = materialId.name.split("mid")[1]; |
|
|
@ -821,6 +838,7 @@ |
|
|
materialName.value = material.mname; |
|
|
materialName.value = material.mname; |
|
|
materialId.value = material.id; |
|
|
materialId.value = material.id; |
|
|
codeValue.value = material.code; |
|
|
codeValue.value = material.code; |
|
|
|
|
|
layer.close(loading2); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
|