diff --git a/src/main/resources/templates/pages/stockTaking/stockTaking.html b/src/main/resources/templates/pages/stockTaking/stockTaking.html
index b8d90844..31fe5587 100644
--- a/src/main/resources/templates/pages/stockTaking/stockTaking.html
+++ b/src/main/resources/templates/pages/stockTaking/stockTaking.html
@@ -95,7 +95,7 @@
+ onclick="scanCodeForMaterial(this)">
@@ -290,6 +290,12 @@
function selectCode(obj) {
}
+
+ // 用于扫描物料码
+ function scanCodeForMaterial() {
+
+ }
+
// 用于计算盘点结果
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();
+ }
+ }
+ })
+ }
+ })
+ };
+
+
+
// 通过位置盘点物料页面
diff --git a/target/classes/templates/pages/stockTaking/stockTaking.html b/target/classes/templates/pages/stockTaking/stockTaking.html
index b8d90844..31fe5587 100644
--- a/target/classes/templates/pages/stockTaking/stockTaking.html
+++ b/target/classes/templates/pages/stockTaking/stockTaking.html
@@ -95,7 +95,7 @@
+ onclick="scanCodeForMaterial(this)">
@@ -290,6 +290,12 @@
function selectCode(obj) {
}
+
+ // 用于扫描物料码
+ function scanCodeForMaterial() {
+
+ }
+
// 用于计算盘点结果
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();
+ }
+ }
+ })
+ }
+ })
+ };
+
+
+
// 通过位置盘点物料页面