|
|
@ -95,7 +95,7 @@ |
|
|
<img src="/static/images/search.ico" height="16" width="16" |
|
|
<img src="/static/images/search.ico" height="16" width="16" |
|
|
id="qrCodeImg" |
|
|
id="qrCodeImg" |
|
|
style="margin-top: 10px" |
|
|
style="margin-top: 10px" |
|
|
onclick="scanCodeInStorage(this)"> |
|
|
onclick="scanCodeForMaterial(this)"> |
|
|
<input id="qrCode" name="qrCode" type="text" |
|
|
<input id="qrCode" name="qrCode" type="text" |
|
|
style="display:none;"> |
|
|
style="display:none;"> |
|
|
</div> |
|
|
</div> |
|
|
@ -290,6 +290,12 @@ |
|
|
function selectCode(obj) { |
|
|
function selectCode(obj) { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 用于扫描物料码 |
|
|
|
|
|
function scanCodeForMaterial() { |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// 用于计算盘点结果 |
|
|
// 用于计算盘点结果 |
|
|
function calculateForMaterial(obj) { |
|
|
function calculateForMaterial(obj) { |
|
|
|
|
|
|
|
|
@ -726,6 +732,57 @@ |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
scanCodeForMaterial = function (obj) { |
|
|
|
|
|
let wxScan = parent; |
|
|
|
|
|
|
|
|
|
|
|
if(wxScan.wx === undefined){ |
|
|
|
|
|
wxScan = wxScan.parent.wx; |
|
|
|
|
|
} |
|
|
|
|
|
else{ |
|
|
|
|
|
wxScan = wxScan.wx; |
|
|
|
|
|
} |
|
|
|
|
|
wxScan.scanQRCode({ |
|
|
|
|
|
desc: 'scanQRCode desc', |
|
|
|
|
|
needResult: 1, // 默认为0,扫描结果由企业微信处理,1则直接返回扫描结果, |
|
|
|
|
|
scanType: ["qrCode","barCode"], // 可以指定扫二维码还是条形码(一维码),默认二者都有 |
|
|
|
|
|
success: function (res) { |
|
|
|
|
|
// 回调 |
|
|
|
|
|
var result = res.resultStr;//当needResult为1时返回处理结果 |
|
|
|
|
|
var req = {}; |
|
|
|
|
|
req.qrCode = result; |
|
|
|
|
|
req.codeFlag = 2; |
|
|
|
|
|
$.ajax({ |
|
|
|
|
|
url: "/material/qywxApplicationOutScanQrCode", |
|
|
|
|
|
type: "post", |
|
|
|
|
|
dataType: 'json', |
|
|
|
|
|
data: JSON.stringify(req), |
|
|
|
|
|
contentType: "application/json;charset=utf-8", |
|
|
|
|
|
success: function (d) { |
|
|
|
|
|
var data = d.data; |
|
|
|
|
|
if (data === null) { |
|
|
|
|
|
layer.msg("对于编码:" + result + ",并未发现仓库中存在对应的物料", { |
|
|
|
|
|
icon: 0, |
|
|
|
|
|
time: 1000 //0.5秒关闭(如果不配置,默认是3秒) |
|
|
|
|
|
}, function () { |
|
|
|
|
|
$("#openSonByMaterial").val(""); |
|
|
|
|
|
$("#mid").val(""); |
|
|
|
|
|
$("#code").val(""); |
|
|
|
|
|
updateTableShowForMaterial(); |
|
|
|
|
|
}) |
|
|
|
|
|
} else { |
|
|
|
|
|
$("#openSonByMaterial").val( data.mname); |
|
|
|
|
|
$("#mid").val( data.id); |
|
|
|
|
|
$("#code").val( data.code); |
|
|
|
|
|
updateTableShowForMaterial(); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 通过位置盘点物料页面 |
|
|
// 通过位置盘点物料页面 |
|
|
|