Browse Source

修改扫码功能

lwx_dev
erdanergou 3 years ago
parent
commit
43814f1dea
  1. 16
      src/main/java/com/dreamchaser/depository_manage/controller/MaterialController.java
  2. 13
      src/main/java/com/dreamchaser/depository_manage/controller/PageController.java
  3. 4
      src/main/java/com/dreamchaser/depository_manage/mapper/GroupMapper.java
  4. 22
      src/main/java/com/dreamchaser/depository_manage/mapper/MaterialMapper.xml
  5. 8
      src/main/java/com/dreamchaser/depository_manage/mapper/QrCodeMapper.java
  6. 30
      src/main/java/com/dreamchaser/depository_manage/mapper/QrCodeMapper.xml
  7. 1
      src/main/java/com/dreamchaser/depository_manage/service/impl/MaterialServiceImpl.java
  8. 40
      src/main/resources/static/js/JcPrinter/index_Demo.js
  9. 2
      src/main/resources/static/js/application-out/application-out.js
  10. 7
      src/main/resources/templates/pages/application/application-in.html
  11. 2
      src/main/resources/templates/pages/application/application-out.html
  12. 2
      src/main/resources/templates/pages/application/application-transfer.html
  13. 2
      src/main/resources/templates/pages/group/group-add_back.html
  14. 2
      src/main/resources/templates/pages/split/split_add.html
  15. 2
      src/main/resources/templates/pages/split/split_edit.html
  16. 3
      src/main/resources/templates/pages/stockTaking/stockTaking.html
  17. 22
      target/classes/com/dreamchaser/depository_manage/mapper/MaterialMapper.xml
  18. 30
      target/classes/com/dreamchaser/depository_manage/mapper/QrCodeMapper.xml
  19. 40
      target/classes/static/js/JcPrinter/index_Demo.js
  20. 2
      target/classes/static/js/application-out/application-out.js
  21. 7
      target/classes/templates/pages/application/application-in.html
  22. 2
      target/classes/templates/pages/application/application-out.html
  23. 2
      target/classes/templates/pages/application/application-transfer.html
  24. 2
      target/classes/templates/pages/group/group-add_back.html
  25. 2
      target/classes/templates/pages/split/split_add.html
  26. 2
      target/classes/templates/pages/split/split_edit.html
  27. 3
      target/classes/templates/pages/stockTaking/stockTaking.html

16
src/main/java/com/dreamchaser/depository_manage/controller/MaterialController.java

@ -764,8 +764,9 @@ public class MaterialController {
UserByPort userByPort = (UserByPort) request.getAttribute("userToken");
// 获取当前用户所在部门拥有的仓库
List<Depository> depositoryByAdminorg = depositoryService.findDepositoryByAdminorg(userByPort.getMaindeparment().toString());
// 获取当前扫描的二维
// 获取当前扫描的码
String qrCode = (String) map.get("qrCode");
int codeFlag = ObjectFormatUtil.toInteger(map.get("codeFlag"));
// 根据扫描的二维码获取对应的物料编码
String mcode = materialService.findMaterialCodeByQrCode(qrCode);
// 根据物料编码获取物料
@ -774,11 +775,11 @@ public class MaterialController {
Map<String, Object> param = new HashMap<>();
List<PlaceP> placePList = new ArrayList<>();
param.put("mcode", mcode);
param.put("codeFlag",1);
InventoryP ip = null;
// 获取物料与条形码的对应关系
List<MaterialAndBarCode> materialByBarCodeByCondition = materialService.findMaterialByBarCodeByCondition(param);
for (int j = 0; j < depositoryByAdminorg.size(); j++) {
Depository depository = depositoryByAdminorg.get(j);
for (Depository depository : depositoryByAdminorg) {
param.put("mcode", material.getCode());
param.put("depositoryId", depository.getId());
// 获取当前仓库下是否有当前物料的库存
@ -805,7 +806,8 @@ public class MaterialController {
mp.setSplitInfoList(splitInfoByMid);
return new RestResponse(mp);
}
}else{
}
else{
return new RestResponse(null);
}
@ -1085,6 +1087,7 @@ public class MaterialController {
public RestResponse qywxApplicationInScanBarCode(@RequestBody Map<String, Object> map, HttpServletRequest request) {
UserByPort userToken = (UserByPort) request.getAttribute("userToken");
String qrCode = (String) map.get("qrCode");
int codeFlag = ObjectFormatUtil.toInteger(map.get("codeFlag"));
Map<String, Object> result = new HashMap<>();
List<Object> materialList = new ArrayList<>();
// 获取当前用户所在部门拥有的仓库
@ -1092,9 +1095,10 @@ public class MaterialController {
Map<String, Object> param = new HashMap<>();
// 获取条形码与物料的映射
MaterialAndBarCode materialByBarCode = null;
for (int j = 0; j < depositoryByAdminorg.size(); j++) {
param.put("depositoryId", depositoryByAdminorg.get(j).getId());
for (Depository depository : depositoryByAdminorg) {
param.put("depositoryId", depository.getId());
param.put("barCode", qrCode);
param.put("codeFlag", codeFlag);
// 通过仓库与条形码获取对应关系
materialByBarCode = materialService.findMaterialByBarCodeByBarCodeAndDepositoryId(param);
if (materialByBarCode != null) {

13
src/main/java/com/dreamchaser/depository_manage/controller/PageController.java

@ -1559,6 +1559,19 @@ public class PageController {
return mv;
}
@GetMapping("applicationInForGroup")
public ModelAndView applicationInForGroup(Integer gid,String type){
ModelAndView mv = new ModelAndView();
List<Integer> gidList = new ArrayList<>();
if ("one".equals(type)) {
gidList.add(gid);
} else if ("more".equals(type)) {
}
mv.addObject("gidList", gidList);
mv.setViewName("pages/group/applicationInForGroup");
return mv;
}
@GetMapping("/StockTakingReview")
public ModelAndView StockTakingReview(Integer id, HttpServletRequest request) {

4
src/main/java/com/dreamchaser/depository_manage/mapper/GroupMapper.java

@ -64,6 +64,10 @@ public interface GroupMapper {
*/
List<GroupInfo> findGroupByCondition(Map<String,Object> map);
/**
* 根据组合id批量获取组合信息(不包含其他数据)
* @param list 组合id列表

22
src/main/java/com/dreamchaser/depository_manage/mapper/MaterialMapper.xml

@ -557,6 +557,9 @@
<if test="remark != '' and remark != null">
and remark LIKE CONCAT('%', #{remark}, '%')
</if>
<if test="codeFlag != '' and codeFlag != null">
and codeFlag = #{codeFlag}
</if>
group by bmcode
</select>
@ -569,12 +572,13 @@
<if test="mcode != null and mcode != ''">
and mcode = #{mcode}
</if>
and codeFlag = 2
group by mcode
</select>
<select id="findMaterialByBarCodeCountByCondition" resultType="int" parameterType="map">
select count(*)
from barcodeandmaterial
from qrcodeandmaterial
where 1 = 1
<if test="barCode != null and barCode != ''">
and barCode = #{barCode}
@ -582,6 +586,7 @@
<if test="mcode != null and mcode != ''">
and mcode = #{mcode}
</if>
and flag = 1
</select>
@ -754,22 +759,24 @@
</insert>
<insert id="addBarCodeAndMcode" parameterType="map">
insert into barcodeandmaterial(id,barCode,mcode)
insert into qrcodeandmaterial(id,barCode,mcode,flag)
values (
#{id},
#{barCode},
#{code}
#{code},
1
)
</insert>
<insert id="addBarCodeAndMaterialForMoreOne" parameterType="map">
insert into barcodeandmaterial(id,mcode,barCode)
insert into qrcodeandmaterial(id,mcode,barCode,1)
values
<foreach collection="list" index="index" item="item" separator=",">
(#{id},
#{code},
#{item})
#{item},
1)
</foreach>
</insert>
@ -800,7 +807,7 @@
<!-- 删除映射-->
<delete id="deleteBarCodeAndMaterial" parameterType="map">
delete
from barcodeandmaterial
from qrcodeandmaterial
where 1 = 1
<if test="barCode != null and barCode != ''">
and barCode = #{barCode}
@ -811,10 +818,13 @@
<if test="id != null and id != ''">
and id = #{id}
</if>
and flag = 1
</delete>
<update id="updateMaterialAndProducedDate">
update materialandproduceddate
<set>

8
src/main/java/com/dreamchaser/depository_manage/mapper/QrCodeMapper.java

@ -71,4 +71,12 @@ public interface QrCodeMapper {
* @return
*/
List<PidOrDidAndCode> findLocationByCondition(Map<String,Object> map);
/**
* 用于修改当前编码类型
* @param map 待修改数据
* @return
*/
Integer updateQrCodeType(Map<String,Object> map);
}

30
src/main/java/com/dreamchaser/depository_manage/mapper/QrCodeMapper.xml

@ -47,36 +47,39 @@
</select>
<insert id="addQrCodeAndMaterial" parameterType="map">
insert into qrcodeandmaterial(id,qrcode,mcode)
insert into qrcodeandmaterial(id,barCode,mcode,flag)
values (
#{id},
#{qrCode},
#{mcode}
#{mcode},
2
)
</insert>
<insert id="addQrCodeAndMaterialForMoreOne" parameterType="map">
insert into qrcodeandmaterial(id,mcode,qrcode)
insert into qrcodeandmaterial(id,mcode,barCode,flag)
values
<foreach collection="list" index="index" item="item" separator=",">
(#{id},
#{code},
#{item})
#{item},
2
)
</foreach>
</insert>
<select id="selectQrCodeByMcode" parameterType="string" resultType="string">
select qrcode
select barCode
from qrcodeandmaterial
where mcode = #{mcode}
where mcode = #{mcode} and flag = 2
</select>
<select id="findMaterialCodeByQrCode" parameterType="string" resultType="string">
select mcode
from qrcodeandmaterial
where qrcode = #{qrcode}
where barCode = #{qrcode} and flag = 2
</select>
@ -94,10 +97,23 @@
<if test="id != null and id != ''">
and id = #{id}
</if>
<if test="codeFlag != null and codeFlag != ''">
and flag = #{codeFlag}
</if>
</delete>
<update id="updateQrCodeType">
update qrcodeandmaterial
<set>
<if test="codeFlag != null and codeFlag != ''">
flag = #{codeFlag}
</if>
</set>
where id = #{id}
</update>
<select id="selectQrCodeByDepositoryOrPlace" parameterType="map" resultType="string">
select code
from pidordidandcode

1
src/main/java/com/dreamchaser/depository_manage/service/impl/MaterialServiceImpl.java

@ -962,6 +962,7 @@ public class MaterialServiceImpl implements MaterialService {
public MaterialAndBarCode findMaterialByBarCode(String barCode) {
Map<String, Object> map = new HashMap<>();
map.put("barCode", barCode);
map.put("codeFlag",1);
List<MaterialAndBarCode> materialByBarCodeByCondition = materialMapper.findMaterialByBarCodeByCondition(map);
if (materialByBarCodeByCondition.size() > 0) {
return materialByBarCodeByCondition.get(0);

40
src/main/resources/static/js/JcPrinter/index_Demo.js

@ -387,6 +387,9 @@ var app = new Vue({
DrawLableBarCodeApiDemo(drawLableBarCodeParamDemo, callableFunction) {
DrawLableBarCode(drawLableBarCodeParamDemo, callableFunction)
},
DrawLableQrCodeApiDemo(drawLableQrCodeParamDemo,callableFunction){
DrawLableQrCode(drawLableQrCodeParamDemo,callableFunction)
},
/**
* 开始打印任务
@ -434,9 +437,14 @@ var app = new Vue({
}
// 为了防止打印时未生成对应图像
// 初始化画板
InitDrawingBoard(this.InitDrawingBoardParam, (data1 => {
// 添加文字
if(this.dialogDrawLableBarCodeParam){
this.DrawLableBarCodeApiDemo(this.DrawLableBarCodeParam, (data => {
// 提交数据
var totalCount = parseInt(pageCount) * parseInt(quantityCount);
@ -455,6 +463,27 @@ var app = new Vue({
self.sendCommitJob(self.DrawLableTextParamDemo, pageIndex, intPageCount, intQuantityCount);
});
}))
}else{
this.DrawLableQrCodeApiDemo(this.DrawLableBarCodeParam, (data => {
// 提交数据
var totalCount = parseInt(pageCount) * parseInt(quantityCount);
startJob(parseInt(density), parseInt(paperType), parseInt(printMode), totalCount, function (data) {
bCanclePrint = false;
var arrParse = JSON.parse(JSON.stringify(data));
if (arrParse.resultAck.result !== 0) {
self.$message({
message: '打印失败!',
type: 'warning'
});
return;
}
var intPageCount = parseInt(pageCount);
var intQuantityCount = parseInt(quantityCount);
self.sendCommitJob(self.DrawLableTextParamDemo, pageIndex, intPageCount, intQuantityCount);
});
}))
}
}))
@ -506,10 +535,19 @@ var app = new Vue({
setTimeout(function () {
// 初始化画板
InitDrawingBoard(self.InitDrawingBoardParam, (data1 => {
if(this.dialogDrawLableBarCodeParam){
// 添加文字
self.DrawLableBarCodeApiDemo(self.DrawLableBarCodeParam, (data => {
self.sendCommitJob(self.DrawLableTextParamDemo, pageIndex, pageCount, quantityCount);
}))
}else{
// 添加文字
self.DrawLableQrCodeApiDemo(self.DrawLableQrCodeParam, (data => {
self.sendCommitJob(self.DrawLableTextParamDemo, pageIndex, pageCount, quantityCount);
}))
}
}))// 提交数据
}, 500);

2
src/main/resources/static/js/application-out/application-out.js

@ -866,6 +866,7 @@ layui.use(['form', 'step', 'layer', 'jquery', 'element'], function () {
var result = res.resultStr;//当needResult为1时返回处理结果
var req = {};
req.qrCode = result;
req.codeFlag = 1;
$.ajax({
url: "/material/qywxApplicationOutScanBarCode",
type: "post",
@ -924,6 +925,7 @@ layui.use(['form', 'step', 'layer', 'jquery', 'element'], function () {
var result = res.resultStr;//当needResult为1时返回处理结果
var req = {};
req.qrCode = result;
req.codeFlag = 2;
$.ajax({
url: "/material/qywxApplicationOutScanQrCode",
type: "post",

7
src/main/resources/templates/pages/application/application-in.html

@ -951,16 +951,16 @@
};
// 用于扫码入库
scanCodeInStorage = function (obj) {
var objIdNumber = obj.id.split("qrCodeImg")[1];
parent.wx.scanQRCode({
desc: 'scanQRCode desc',
needResult: 1, // 默认为0,扫描结果由企业微信处理,1则直接返回扫描结果,
scanType: ["qrCode"], // 可以指定扫二维码还是条形码(一维码),默认二者都有
scanType: ["qrCode,barCode"], // 可以指定扫二维码还是条形码(一维码),默认二者都有
success: function (res) {
// 回调
var result = res.resultStr;//当needResult为1时返回处理结果
var req = {};
req.qrCode = result;
req.codeFlag = 2;
$("#qrCode" + objIdNumber).val(result);
$.ajax({
url: "/material/qywxApplicationInScanQrCode",
@ -1052,6 +1052,8 @@
}
})
};
// 用于扫描条形码
scanBarCode = function (obj) {
parent.wx.scanQRCode({
@ -1063,6 +1065,7 @@
var result = res.resultStr;//当needResult为1时返回处理结果
var req = {};
req.qrCode = result;
req.codeFlag = 1;
$.ajax({
url: "/material/qywxApplicationInScanBarCode",
type: "post",

2
src/main/resources/templates/pages/application/application-out.html

@ -1263,6 +1263,7 @@
var result = res.resultStr;//当needResult为1时返回处理结果
var req = {};
req.qrCode = result;
req.codeFlag = 1;
$.ajax({
url: "/material/qywxApplicationOutScanBarCode",
type: "post",
@ -1330,6 +1331,7 @@
var result = res.resultStr;//当needResult为1时返回处理结果
var req = {};
req.qrCode = result;
req.codeFlag = 2;
$.ajax({
url: "/material/qywxApplicationOutScanQrCode",
type: "post",

2
src/main/resources/templates/pages/application/application-transfer.html

@ -416,6 +416,7 @@
var result = res.resultStr;//当needResult为1时返回处理结果
var req = {};
req.qrCode = result;
req.codeFlag = 1;
$.ajax({
url: "/material/qywxApplicationTransferScanBarCode",
type: "post",
@ -507,6 +508,7 @@
var result = res.resultStr;//当needResult为1时返回处理结果
var req = {};
req.qrCode = result;
req.codeFlag = 2;
$.ajax({
url: "/material/qywxApplicationTransferScanQrCode",
type: "post",

2
src/main/resources/templates/pages/group/group-add_back.html

@ -394,6 +394,7 @@
var result = res.resultStr;//当needResult为1时返回处理结果
var req = {};
req.qrCode = result;
req.codeFlag = 1;
$.ajax({
url: "/material/qywxApplicationInScanBarCode",
type: "post",
@ -461,6 +462,7 @@
var result = res.resultStr;//当needResult为1时返回处理结果
var req = {};
req.qrCode = result;
req.codeFlag = 2;
$.ajax({
url: "/material/qywxApplicationInScanQrCode",
type: "post",

2
src/main/resources/templates/pages/split/split_add.html

@ -366,6 +366,7 @@
var result = res.resultStr;//当needResult为1时返回处理结果
var req = {};
req.qrCode = result;
req.codeFlag = 2;
$.ajax({
url: "/material/qywxApplicationInScanQrCode",
type: "post",
@ -440,6 +441,7 @@
var result = res.resultStr;//当needResult为1时返回处理结果
var req = {};
req.qrCode = result;
req.codeFlag = 1;
let barCode = $("#barCode");
barCode.empty();
barCode.append(new Option(result, result));

2
src/main/resources/templates/pages/split/split_edit.html

@ -338,6 +338,7 @@
var result = res.resultStr;//当needResult为1时返回处理结果
var req = {};
req.qrCode = result;
req.codeFlag = 2;
$("#qrCode" + objIdNumber).val(result);
$.ajax({
url: "/material/qywxApplicationInScanQrCode",
@ -364,6 +365,7 @@
var result = res.resultStr;//当needResult为1时返回处理结果
var req = {};
req.qrCode = result;
req.codeFlag = 1;
$.ajax({
url: "/material/qywxApplicationInScanBarCode",
type: "post",

3
src/main/resources/templates/pages/stockTaking/stockTaking.html

@ -613,6 +613,7 @@
var result = res.resultStr;//当needResult为1时返回处理结果
var req = {};
req.qrCode = result;
req.codeFlag = 2;
$.ajax({
url: "/place/qywxApplicationInScanQrCode",
type: "post",
@ -1201,6 +1202,7 @@
req.qrCode = result;
req.placeId = placeId;
req.depositoryId = depositoryId;
req.codeFlag = 2;
$.ajax({
url: "/material/qywxStockTakingScanQrCode",
type: "post",
@ -1322,6 +1324,7 @@
req.qrCode = result;
req.depositoryId = depositoryId;
req.placeId = placeId;
req.codeFlag = 1;
$.ajax({
url: "/material/qywxStockTakingScanBarCode",
type: "post",

22
target/classes/com/dreamchaser/depository_manage/mapper/MaterialMapper.xml

@ -557,6 +557,9 @@
<if test="remark != '' and remark != null">
and remark LIKE CONCAT('%', #{remark}, '%')
</if>
<if test="codeFlag != '' and codeFlag != null">
and codeFlag = #{codeFlag}
</if>
group by bmcode
</select>
@ -569,12 +572,13 @@
<if test="mcode != null and mcode != ''">
and mcode = #{mcode}
</if>
and codeFlag = 2
group by mcode
</select>
<select id="findMaterialByBarCodeCountByCondition" resultType="int" parameterType="map">
select count(*)
from barcodeandmaterial
from qrcodeandmaterial
where 1 = 1
<if test="barCode != null and barCode != ''">
and barCode = #{barCode}
@ -582,6 +586,7 @@
<if test="mcode != null and mcode != ''">
and mcode = #{mcode}
</if>
and flag = 1
</select>
@ -754,22 +759,24 @@
</insert>
<insert id="addBarCodeAndMcode" parameterType="map">
insert into barcodeandmaterial(id,barCode,mcode)
insert into qrcodeandmaterial(id,barCode,mcode,flag)
values (
#{id},
#{barCode},
#{code}
#{code},
1
)
</insert>
<insert id="addBarCodeAndMaterialForMoreOne" parameterType="map">
insert into barcodeandmaterial(id,mcode,barCode)
insert into qrcodeandmaterial(id,mcode,barCode,1)
values
<foreach collection="list" index="index" item="item" separator=",">
(#{id},
#{code},
#{item})
#{item},
1)
</foreach>
</insert>
@ -800,7 +807,7 @@
<!-- 删除映射-->
<delete id="deleteBarCodeAndMaterial" parameterType="map">
delete
from barcodeandmaterial
from qrcodeandmaterial
where 1 = 1
<if test="barCode != null and barCode != ''">
and barCode = #{barCode}
@ -811,10 +818,13 @@
<if test="id != null and id != ''">
and id = #{id}
</if>
and flag = 1
</delete>
<update id="updateMaterialAndProducedDate">
update materialandproduceddate
<set>

30
target/classes/com/dreamchaser/depository_manage/mapper/QrCodeMapper.xml

@ -47,36 +47,39 @@
</select>
<insert id="addQrCodeAndMaterial" parameterType="map">
insert into qrcodeandmaterial(id,qrcode,mcode)
insert into qrcodeandmaterial(id,barCode,mcode,flag)
values (
#{id},
#{qrCode},
#{mcode}
#{mcode},
2
)
</insert>
<insert id="addQrCodeAndMaterialForMoreOne" parameterType="map">
insert into qrcodeandmaterial(id,mcode,qrcode)
insert into qrcodeandmaterial(id,mcode,barCode,flag)
values
<foreach collection="list" index="index" item="item" separator=",">
(#{id},
#{code},
#{item})
#{item},
2
)
</foreach>
</insert>
<select id="selectQrCodeByMcode" parameterType="string" resultType="string">
select qrcode
select barCode
from qrcodeandmaterial
where mcode = #{mcode}
where mcode = #{mcode} and flag = 2
</select>
<select id="findMaterialCodeByQrCode" parameterType="string" resultType="string">
select mcode
from qrcodeandmaterial
where qrcode = #{qrcode}
where barCode = #{qrcode} and flag = 2
</select>
@ -94,10 +97,23 @@
<if test="id != null and id != ''">
and id = #{id}
</if>
<if test="codeFlag != null and codeFlag != ''">
and flag = #{codeFlag}
</if>
</delete>
<update id="updateQrCodeType">
update qrcodeandmaterial
<set>
<if test="codeFlag != null and codeFlag != ''">
flag = #{codeFlag}
</if>
</set>
where id = #{id}
</update>
<select id="selectQrCodeByDepositoryOrPlace" parameterType="map" resultType="string">
select code
from pidordidandcode

40
target/classes/static/js/JcPrinter/index_Demo.js

@ -387,6 +387,9 @@ var app = new Vue({
DrawLableBarCodeApiDemo(drawLableBarCodeParamDemo, callableFunction) {
DrawLableBarCode(drawLableBarCodeParamDemo, callableFunction)
},
DrawLableQrCodeApiDemo(drawLableQrCodeParamDemo,callableFunction){
DrawLableQrCode(drawLableQrCodeParamDemo,callableFunction)
},
/**
* 开始打印任务
@ -434,9 +437,14 @@ var app = new Vue({
}
// 为了防止打印时未生成对应图像
// 初始化画板
InitDrawingBoard(this.InitDrawingBoardParam, (data1 => {
// 添加文字
if(this.dialogDrawLableBarCodeParam){
this.DrawLableBarCodeApiDemo(this.DrawLableBarCodeParam, (data => {
// 提交数据
var totalCount = parseInt(pageCount) * parseInt(quantityCount);
@ -455,6 +463,27 @@ var app = new Vue({
self.sendCommitJob(self.DrawLableTextParamDemo, pageIndex, intPageCount, intQuantityCount);
});
}))
}else{
this.DrawLableQrCodeApiDemo(this.DrawLableBarCodeParam, (data => {
// 提交数据
var totalCount = parseInt(pageCount) * parseInt(quantityCount);
startJob(parseInt(density), parseInt(paperType), parseInt(printMode), totalCount, function (data) {
bCanclePrint = false;
var arrParse = JSON.parse(JSON.stringify(data));
if (arrParse.resultAck.result !== 0) {
self.$message({
message: '打印失败!',
type: 'warning'
});
return;
}
var intPageCount = parseInt(pageCount);
var intQuantityCount = parseInt(quantityCount);
self.sendCommitJob(self.DrawLableTextParamDemo, pageIndex, intPageCount, intQuantityCount);
});
}))
}
}))
@ -506,10 +535,19 @@ var app = new Vue({
setTimeout(function () {
// 初始化画板
InitDrawingBoard(self.InitDrawingBoardParam, (data1 => {
if(this.dialogDrawLableBarCodeParam){
// 添加文字
self.DrawLableBarCodeApiDemo(self.DrawLableBarCodeParam, (data => {
self.sendCommitJob(self.DrawLableTextParamDemo, pageIndex, pageCount, quantityCount);
}))
}else{
// 添加文字
self.DrawLableQrCodeApiDemo(self.DrawLableQrCodeParam, (data => {
self.sendCommitJob(self.DrawLableTextParamDemo, pageIndex, pageCount, quantityCount);
}))
}
}))// 提交数据
}, 500);

2
target/classes/static/js/application-out/application-out.js

@ -866,6 +866,7 @@ layui.use(['form', 'step', 'layer', 'jquery', 'element'], function () {
var result = res.resultStr;//当needResult为1时返回处理结果
var req = {};
req.qrCode = result;
req.codeFlag = 1;
$.ajax({
url: "/material/qywxApplicationOutScanBarCode",
type: "post",
@ -924,6 +925,7 @@ layui.use(['form', 'step', 'layer', 'jquery', 'element'], function () {
var result = res.resultStr;//当needResult为1时返回处理结果
var req = {};
req.qrCode = result;
req.codeFlag = 2;
$.ajax({
url: "/material/qywxApplicationOutScanQrCode",
type: "post",

7
target/classes/templates/pages/application/application-in.html

@ -951,16 +951,16 @@
};
// 用于扫码入库
scanCodeInStorage = function (obj) {
var objIdNumber = obj.id.split("qrCodeImg")[1];
parent.wx.scanQRCode({
desc: 'scanQRCode desc',
needResult: 1, // 默认为0,扫描结果由企业微信处理,1则直接返回扫描结果,
scanType: ["qrCode"], // 可以指定扫二维码还是条形码(一维码),默认二者都有
scanType: ["qrCode,barCode"], // 可以指定扫二维码还是条形码(一维码),默认二者都有
success: function (res) {
// 回调
var result = res.resultStr;//当needResult为1时返回处理结果
var req = {};
req.qrCode = result;
req.codeFlag = 2;
$("#qrCode" + objIdNumber).val(result);
$.ajax({
url: "/material/qywxApplicationInScanQrCode",
@ -1052,6 +1052,8 @@
}
})
};
// 用于扫描条形码
scanBarCode = function (obj) {
parent.wx.scanQRCode({
@ -1063,6 +1065,7 @@
var result = res.resultStr;//当needResult为1时返回处理结果
var req = {};
req.qrCode = result;
req.codeFlag = 1;
$.ajax({
url: "/material/qywxApplicationInScanBarCode",
type: "post",

2
target/classes/templates/pages/application/application-out.html

@ -1263,6 +1263,7 @@
var result = res.resultStr;//当needResult为1时返回处理结果
var req = {};
req.qrCode = result;
req.codeFlag = 1;
$.ajax({
url: "/material/qywxApplicationOutScanBarCode",
type: "post",
@ -1330,6 +1331,7 @@
var result = res.resultStr;//当needResult为1时返回处理结果
var req = {};
req.qrCode = result;
req.codeFlag = 2;
$.ajax({
url: "/material/qywxApplicationOutScanQrCode",
type: "post",

2
target/classes/templates/pages/application/application-transfer.html

@ -416,6 +416,7 @@
var result = res.resultStr;//当needResult为1时返回处理结果
var req = {};
req.qrCode = result;
req.codeFlag = 1;
$.ajax({
url: "/material/qywxApplicationTransferScanBarCode",
type: "post",
@ -507,6 +508,7 @@
var result = res.resultStr;//当needResult为1时返回处理结果
var req = {};
req.qrCode = result;
req.codeFlag = 2;
$.ajax({
url: "/material/qywxApplicationTransferScanQrCode",
type: "post",

2
target/classes/templates/pages/group/group-add_back.html

@ -394,6 +394,7 @@
var result = res.resultStr;//当needResult为1时返回处理结果
var req = {};
req.qrCode = result;
req.codeFlag = 1;
$.ajax({
url: "/material/qywxApplicationInScanBarCode",
type: "post",
@ -461,6 +462,7 @@
var result = res.resultStr;//当needResult为1时返回处理结果
var req = {};
req.qrCode = result;
req.codeFlag = 2;
$.ajax({
url: "/material/qywxApplicationInScanQrCode",
type: "post",

2
target/classes/templates/pages/split/split_add.html

@ -366,6 +366,7 @@
var result = res.resultStr;//当needResult为1时返回处理结果
var req = {};
req.qrCode = result;
req.codeFlag = 2;
$.ajax({
url: "/material/qywxApplicationInScanQrCode",
type: "post",
@ -440,6 +441,7 @@
var result = res.resultStr;//当needResult为1时返回处理结果
var req = {};
req.qrCode = result;
req.codeFlag = 1;
let barCode = $("#barCode");
barCode.empty();
barCode.append(new Option(result, result));

2
target/classes/templates/pages/split/split_edit.html

@ -338,6 +338,7 @@
var result = res.resultStr;//当needResult为1时返回处理结果
var req = {};
req.qrCode = result;
req.codeFlag = 2;
$("#qrCode" + objIdNumber).val(result);
$.ajax({
url: "/material/qywxApplicationInScanQrCode",
@ -364,6 +365,7 @@
var result = res.resultStr;//当needResult为1时返回处理结果
var req = {};
req.qrCode = result;
req.codeFlag = 1;
$.ajax({
url: "/material/qywxApplicationInScanBarCode",
type: "post",

3
target/classes/templates/pages/stockTaking/stockTaking.html

@ -613,6 +613,7 @@
var result = res.resultStr;//当needResult为1时返回处理结果
var req = {};
req.qrCode = result;
req.codeFlag = 2;
$.ajax({
url: "/place/qywxApplicationInScanQrCode",
type: "post",
@ -1201,6 +1202,7 @@
req.qrCode = result;
req.placeId = placeId;
req.depositoryId = depositoryId;
req.codeFlag = 2;
$.ajax({
url: "/material/qywxStockTakingScanQrCode",
type: "post",
@ -1322,6 +1324,7 @@
req.qrCode = result;
req.depositoryId = depositoryId;
req.placeId = placeId;
req.codeFlag = 1;
$.ajax({
url: "/material/qywxStockTakingScanBarCode",
type: "post",

Loading…
Cancel
Save