diff --git a/src/main/java/com/dreamchaser/depository_manage/controller/DepositoryRecordController.java b/src/main/java/com/dreamchaser/depository_manage/controller/DepositoryRecordController.java index 6cc52540..0c07e644 100644 --- a/src/main/java/com/dreamchaser/depository_manage/controller/DepositoryRecordController.java +++ b/src/main/java/com/dreamchaser/depository_manage/controller/DepositoryRecordController.java @@ -501,6 +501,18 @@ public class DepositoryRecordController { SimpleApplicationOutMinRecordP simpleApplicationOutMinRecordP = new SimpleApplicationOutMinRecordP(applicationOutMinById); // 获取申请的物料信息 Material materialById = materialService.findMaterialById(applicationOutMinById.getMid()); + // 获取当前物料所存在的库位 + List placeByMidAndDid = placeService.findPlaceByMidAndDid(materialById.getId(), applicationOutMinById.getDepositoryId()); + // 获取库位编码 + StringBuffer sb = new StringBuffer(); + for (int j = 0; j < placeByMidAndDid.size(); j++) { + PlaceP placeP = placeByMidAndDid.get(j); + String code = placeP.getCode(); + if("0000".equals(code)){ + code = "默认库位"; + } + sb.append(code).append(","); + } // 获取当前出库库位 Place placeByDid = placeService.findPlaceById(applicationOutMinById.getPlaceId()); // 获取当前子订单处理人编号 @@ -510,6 +522,7 @@ public class DepositoryRecordController { // 获取处理人 UserByPort checker = LinkInterfaceUtil.FindUserById(checkId,userToken); simpleApplicationOutMinRecordP.setCheckerName(checker.getName()); + simpleApplicationOutMinRecordP.setPcode(placeByDid.getCode()); } List materialAndProducedDateByMid = materialService.findMaterialAndProducedDateByMid(materialById.getId()); if (materialAndProducedDateByMid.size() > 0) { @@ -523,7 +536,6 @@ public class DepositoryRecordController { } } } - simpleApplicationOutMinRecordP.setApplicantTime(DateUtil.TimeStampToDateTime(Long.valueOf(applicationOutRecordPById.getApplicantTime()))); simpleApplicationOutMinRecordP.setApplyRemark(applicationOutRecordPById.getApplyRemark()); simpleApplicationOutMinRecordP.setDepositoryId(depositoryRecordById.getId()); @@ -532,7 +544,7 @@ public class DepositoryRecordController { simpleApplicationOutMinRecordP.setMcode(materialById.getCode()); simpleApplicationOutMinRecordP.setApplicantName(userByPort.getName()); simpleApplicationOutMinRecordP.setCode(applicationOutRecordPById.getCode()); - simpleApplicationOutMinRecordP.setPcode(placeByDid.getCode()); + simpleApplicationOutMinRecordP.setPcode(sb.toString()); simpleApplicationOutMinRecordP.setPid(placeByDid.getId()); simpleApplicationOutMinRecordP.setState(state); diff --git a/src/main/java/com/dreamchaser/depository_manage/controller/MaterialController.java b/src/main/java/com/dreamchaser/depository_manage/controller/MaterialController.java index 77790b3f..20296f9c 100644 --- a/src/main/java/com/dreamchaser/depository_manage/controller/MaterialController.java +++ b/src/main/java/com/dreamchaser/depository_manage/controller/MaterialController.java @@ -1435,7 +1435,6 @@ public class MaterialController { PidOrDidAndCode locationByQrCode = placeService.findLocationByQrCode(qrCode); if (locationByQrCode != null) { // 如果不为空,则是库位码 - // 1为库位2为仓库 Integer locationFlag = locationByQrCode.getFlag(); if (Integer.compare(locationFlag, 1) == 0) { diff --git a/src/main/java/com/dreamchaser/depository_manage/entity/ApplicationOutRecordMin.java b/src/main/java/com/dreamchaser/depository_manage/entity/ApplicationOutRecordMin.java index c5c4364d..e2dcda39 100644 --- a/src/main/java/com/dreamchaser/depository_manage/entity/ApplicationOutRecordMin.java +++ b/src/main/java/com/dreamchaser/depository_manage/entity/ApplicationOutRecordMin.java @@ -54,4 +54,9 @@ public class ApplicationOutRecordMin { */ private Integer transferId; + /** + * 已经出库的数量 + */ + private Integer trueOut; + } diff --git a/src/main/java/com/dreamchaser/depository_manage/mapper/DepositoryRecordMapper.xml b/src/main/java/com/dreamchaser/depository_manage/mapper/DepositoryRecordMapper.xml index e5c56d61..c1d019d5 100644 --- a/src/main/java/com/dreamchaser/depository_manage/mapper/DepositoryRecordMapper.xml +++ b/src/main/java/com/dreamchaser/depository_manage/mapper/DepositoryRecordMapper.xml @@ -142,7 +142,7 @@ - aorm.id,aorm.mid,aorm.depositoryId,aorm.placeId,aorm.quantity,aorm.code,aorm.checkId,aorm.parentId,aorm.transferId + aorm.id,aorm.mid,aorm.depositoryId,aorm.placeId,aorm.quantity,aorm.code,aorm.checkId,aorm.parentId,aorm.transferId,aorm.trueOut @@ -918,7 +922,10 @@ checkId = #{checkId}, - parentId = #{parentId} + parentId = #{parentId}, + + + trueOut = #{trueOut} where id = #{id} diff --git a/src/main/java/com/dreamchaser/depository_manage/pojo/SimpleApplicationOutMinRecordP.java b/src/main/java/com/dreamchaser/depository_manage/pojo/SimpleApplicationOutMinRecordP.java index 80ed641a..d19f01bb 100644 --- a/src/main/java/com/dreamchaser/depository_manage/pojo/SimpleApplicationOutMinRecordP.java +++ b/src/main/java/com/dreamchaser/depository_manage/pojo/SimpleApplicationOutMinRecordP.java @@ -76,9 +76,16 @@ public class SimpleApplicationOutMinRecordP { */ private String producedDate; + + /** + * 已经出库的数量 + */ + private Integer trueOut; + public SimpleApplicationOutMinRecordP(ApplicationOutRecordMin applicationOutRecordMin) { this.id = applicationOutRecordMin.getId(); this.parentId = applicationOutRecordMin.getParentId(); this.quantity = applicationOutRecordMin.getQuantity(); + this.trueOut = applicationOutRecordMin.getTrueOut(); } } diff --git a/src/main/java/com/dreamchaser/depository_manage/service/impl/DepositoryRecordServiceImpl.java b/src/main/java/com/dreamchaser/depository_manage/service/impl/DepositoryRecordServiceImpl.java index d1af1408..968090f8 100644 --- a/src/main/java/com/dreamchaser/depository_manage/service/impl/DepositoryRecordServiceImpl.java +++ b/src/main/java/com/dreamchaser/depository_manage/service/impl/DepositoryRecordServiceImpl.java @@ -669,6 +669,7 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { Integer mid = ObjectFormatUtil.toInteger(map.get("mid")); Material materialById = materialMapper.findMaterialById(mid); map.put("depositoryId", materialById.getDepositoryId()); + map.put("trueOut",0); return depositoryRecordMapper.insertApplicationOutRecordMin(map); } diff --git a/src/main/resources/templates/pages/application/application-in.html b/src/main/resources/templates/pages/application/application-in.html index fa67ef38..2d90dc23 100644 --- a/src/main/resources/templates/pages/application/application-in.html +++ b/src/main/resources/templates/pages/application/application-in.html @@ -717,7 +717,6 @@ contentType: "application/json;charset=utf-8", success: function (d) { var data = d.data; - var parent = obj.parentNode.parentNode.parentNode.parentNode; var codeChildren = parent.childNodes[7]; var priceChildren = parent.childNodes[13]; @@ -804,44 +803,54 @@ var data = d.data; var material = data["material"]; var parent = obj.parentNode.parentNode.parentNode.parentNode; - var codeChildren = parent.childNodes[7]; - var priceChildren = parent.childNodes[13]; - var materialChildren = parent.childNodes[5]; // 条形码 var barCodeChildren = parent.childNodes[9]; - var codeItem = codeChildren.childNodes[3].childNodes[1]; - var codeValue = codeItem.childNodes[1]; - var materialItem = materialChildren.childNodes[3].childNodes[1].childNodes; - var materialName = materialItem[1]; - var materialId = materialName.parentNode.parentNode.childNodes[3]; - var mname = materialName.value; - // 单价条目 - var priceItem = priceChildren.childNodes[3].childNodes; - var priceValue = priceItem[1]; - // 条形码条码 - var barCodeItem = barCodeChildren.childNodes[3]; - var code = material.mcode; - if (code === undefined) { - code = ""; - } - materialName.value = material.mname; - materialId.value = material.mid; - codeValue.value = code; - priceValue.value = material.price; var barCodeInput = barCodeItem.childNodes[1].childNodes[1]; - barCodeInput.value = result; - var idNumber = materialId.name.split("mid")[1]; - var shelfLife = material.shelfLife; - if (shelfLife !== null && shelfLife !== undefined) { - $("#" + "producedDateItem" + idNumber).show(); - $("#" + "producedDate" + idNumber).attr("lay-verify", "required"); - } - else{ - $("#" + "producedDateItem" + idNumber).hide(); + if (material !== null) { + // 如果发现对应关系 + + var codeChildren = parent.childNodes[7]; + var priceChildren = parent.childNodes[13]; + var materialChildren = parent.childNodes[5]; + + var codeItem = codeChildren.childNodes[3].childNodes[1]; + var codeValue = codeItem.childNodes[1]; + var materialItem = materialChildren.childNodes[3].childNodes[1].childNodes; + var materialName = materialItem[1]; + var materialId = materialName.parentNode.parentNode.childNodes[3]; + var mname = materialName.value; + // 单价条目 + var priceItem = priceChildren.childNodes[3].childNodes; + var priceValue = priceItem[1]; + // 条形码条码 + var code = material.mcode; + if (code === undefined) { + code = ""; + } + materialName.value = material.mname; + materialId.value = material.mid; + codeValue.value = code; + priceValue.value = material.price; + barCodeInput.value = result; + var idNumber = materialId.name.split("mid")[1]; + var shelfLife = material.shelfLife; + if (shelfLife !== null && shelfLife !== undefined) { + $("#" + "producedDateItem" + idNumber).show(); + $("#" + "producedDate" + idNumber).attr("lay-verify", "required"); + } else { + $("#" + "producedDateItem" + idNumber).hide(); + form.render(); + } form.render(); + } else { + // 如果没有对应关系 + layer.msg("对于编码:" + result + ",并未发现对应的物料", { + icon: 0, + time: 1000 //0.5秒关闭(如果不配置,默认是3秒) + }, function () { + }) } - form.render(); } }) diff --git a/src/main/resources/templates/pages/application/application-out.html b/src/main/resources/templates/pages/application/application-out.html index cfc16ba5..78a758c3 100644 --- a/src/main/resources/templates/pages/application/application-out.html +++ b/src/main/resources/templates/pages/application/application-out.html @@ -695,6 +695,13 @@ materialCode.value = data.mcode; var barCodeInput = barCodeItem.childNodes[1].childNodes[1]; barCodeInput.value = result; + }else{ + // 如果没有对应关系 + layer.msg("对于编码:" + result + ",并未发现对应的物料", { + icon: 0, + time: 1000 //0.5秒关闭(如果不配置,默认是3秒) + }, function () { + }) } } diff --git a/src/main/resources/templates/pages/application/application-out_min-mobile.html b/src/main/resources/templates/pages/application/application-out_min-mobile.html index 07fd7204..ab36f625 100644 --- a/src/main/resources/templates/pages/application/application-out_min-mobile.html +++ b/src/main/resources/templates/pages/application/application-out_min-mobile.html @@ -59,6 +59,7 @@ var data = d.data; if(state === "0") { for (let i = 0; i < data.length; i++) { + console.log(data[i]); let producedDate = data[i].producedDate === null?"":data[i].producedDate; // 头部信息 lis.push('
  • ' + @@ -71,7 +72,8 @@ '

    物料名称:' + data[i].mname + '

    ' + '

    物料编码:' + data[i].mcode + '

    ' + '

    出库数量:' + data[i].quantity + '

    ' + - '

    生产日期:' + producedDate + '

    ' + + '

    生产日期:' + producedDate + '

    ' + + '

    所处库位:' + data[i].pcode + '

    ' + '
    备注:

    ' + data[i].applyRemark + '

    ' + ''); // 底部信息 @@ -93,6 +95,7 @@ '

    出库数量:' + data[i].quantity + '

    ' + '

    处理人:' + data[i].checkerName + '

    ' + '

    生产日期:' + producedDate+ '

    ' + + '

    所处库位:' + data[i].pcode + '

    ' + '
    备注:

    ' + data[i].applyRemark + '

    ' + ''); // 底部信息 diff --git a/src/main/resources/templates/pages/application/application-transfer.html b/src/main/resources/templates/pages/application/application-transfer.html index e4193498..f1821170 100644 --- a/src/main/resources/templates/pages/application/application-transfer.html +++ b/src/main/resources/templates/pages/application/application-transfer.html @@ -435,7 +435,12 @@ $('#place' + codeId).append(new Option(item.depositoryName + "-" + item.code, item.id));//往下拉菜单里添加元素 }); form.render(); - } + }// 如果没有对应关系 + layer.msg("对于编码:" + result + ",并未发现对应的物料", { + icon: 0, + time: 1000 //0.5秒关闭(如果不配置,默认是3秒) + }, function () { + }) } }); diff --git a/src/main/resources/templates/pages/scanQrCode/ScanBarOrQrCodeOut.html b/src/main/resources/templates/pages/scanQrCode/ScanBarOrQrCodeOut.html index 41b9da66..cd02d887 100644 --- a/src/main/resources/templates/pages/scanQrCode/ScanBarOrQrCodeOut.html +++ b/src/main/resources/templates/pages/scanQrCode/ScanBarOrQrCodeOut.html @@ -37,6 +37,9 @@ // 先定义,用于弹出确定框 function isOutTrue() { + } + function outQuantityCheck() { + } // 用于判断是否包含字母 @@ -74,8 +77,8 @@ isOutTrue = function (req) { var confirmIndex = layer.confirm("确定出库?", { btn: ["确定", "取消"] - }, function () { // 如果确定出库 - + }, + function () { // 如果确定出库 layui.$.ajax({ url: "/depositoryRecord/isCheckOut", type: "post", @@ -98,7 +101,6 @@ }); } else { // 如果出库失败 - layer.msg(res.statusInfo.detail + ",请重试"); depository = null; material = null; @@ -110,7 +112,8 @@ } }) - }, function () { + }, + function () { // 如果取消 depository = null; material = null; @@ -118,7 +121,8 @@ layer.close(layer.index); var index = parent.layer.getFrameIndex(window.name); parent.layer.close(index); - }) + } + ) }; // 具体出库逻辑 @@ -160,7 +164,6 @@ // 如果是物料 material = data.material; if (mcode !== material.code && Number(mcode) !== material.code && mcode !== material.code.toString()) { - layer.confirm("出库物料不正确,请重新扫描", { btn: ["确定","取消"] }, function(){ @@ -184,7 +187,6 @@ parent.layer.close(index); }) - // 继续扫描 } else { if (depository !== null) { // 如果已经扫描仓库 @@ -205,7 +207,7 @@ param.qrCode = qrCode; param.barCode = barCode; // 弹出确定框 - isOutTrue(param); + outQuantityCheck(param); } } else if (place != null) { @@ -239,7 +241,7 @@ param.qrCode = qrCode; param.barCode = barCode; // 弹出确定框 - isOutTrue(param); + outQuantityCheck(param); } } else { @@ -332,7 +334,7 @@ param.qrCode = qrCode; param.barCode = barCode; // 弹出确定框 - isOutTrue(param); + outQuantityCheck(param); } } @@ -388,7 +390,7 @@ param.qrCode = qrCode; param.barCode = barCode; // 弹出确定框 - isOutTrue(param); + outQuantityCheck(param); } } @@ -396,8 +398,30 @@ } }) - } + }; + + outQuantityCheck = function (req) { + layer.prompt({ + formType: 0, + value: quantity, + title: '请输入出库数量', + }, function(value, index, elem){ + if(value > quantity){ + layer.msg("非法值,重新输入!",{ + icon: 0, + time: 500 + }, + function () { + outQuantityCheck(req); + }) + }else{ + req.quantity = value; + layer.close(index); + isOutTrue(req); + } + }); + } diff --git a/target/classes/templates/pages/application/application-in.html b/target/classes/templates/pages/application/application-in.html index fa67ef38..2d90dc23 100644 --- a/target/classes/templates/pages/application/application-in.html +++ b/target/classes/templates/pages/application/application-in.html @@ -717,7 +717,6 @@ contentType: "application/json;charset=utf-8", success: function (d) { var data = d.data; - var parent = obj.parentNode.parentNode.parentNode.parentNode; var codeChildren = parent.childNodes[7]; var priceChildren = parent.childNodes[13]; @@ -804,44 +803,54 @@ var data = d.data; var material = data["material"]; var parent = obj.parentNode.parentNode.parentNode.parentNode; - var codeChildren = parent.childNodes[7]; - var priceChildren = parent.childNodes[13]; - var materialChildren = parent.childNodes[5]; // 条形码 var barCodeChildren = parent.childNodes[9]; - var codeItem = codeChildren.childNodes[3].childNodes[1]; - var codeValue = codeItem.childNodes[1]; - var materialItem = materialChildren.childNodes[3].childNodes[1].childNodes; - var materialName = materialItem[1]; - var materialId = materialName.parentNode.parentNode.childNodes[3]; - var mname = materialName.value; - // 单价条目 - var priceItem = priceChildren.childNodes[3].childNodes; - var priceValue = priceItem[1]; - // 条形码条码 - var barCodeItem = barCodeChildren.childNodes[3]; - var code = material.mcode; - if (code === undefined) { - code = ""; - } - materialName.value = material.mname; - materialId.value = material.mid; - codeValue.value = code; - priceValue.value = material.price; var barCodeInput = barCodeItem.childNodes[1].childNodes[1]; - barCodeInput.value = result; - var idNumber = materialId.name.split("mid")[1]; - var shelfLife = material.shelfLife; - if (shelfLife !== null && shelfLife !== undefined) { - $("#" + "producedDateItem" + idNumber).show(); - $("#" + "producedDate" + idNumber).attr("lay-verify", "required"); - } - else{ - $("#" + "producedDateItem" + idNumber).hide(); + if (material !== null) { + // 如果发现对应关系 + + var codeChildren = parent.childNodes[7]; + var priceChildren = parent.childNodes[13]; + var materialChildren = parent.childNodes[5]; + + var codeItem = codeChildren.childNodes[3].childNodes[1]; + var codeValue = codeItem.childNodes[1]; + var materialItem = materialChildren.childNodes[3].childNodes[1].childNodes; + var materialName = materialItem[1]; + var materialId = materialName.parentNode.parentNode.childNodes[3]; + var mname = materialName.value; + // 单价条目 + var priceItem = priceChildren.childNodes[3].childNodes; + var priceValue = priceItem[1]; + // 条形码条码 + var code = material.mcode; + if (code === undefined) { + code = ""; + } + materialName.value = material.mname; + materialId.value = material.mid; + codeValue.value = code; + priceValue.value = material.price; + barCodeInput.value = result; + var idNumber = materialId.name.split("mid")[1]; + var shelfLife = material.shelfLife; + if (shelfLife !== null && shelfLife !== undefined) { + $("#" + "producedDateItem" + idNumber).show(); + $("#" + "producedDate" + idNumber).attr("lay-verify", "required"); + } else { + $("#" + "producedDateItem" + idNumber).hide(); + form.render(); + } form.render(); + } else { + // 如果没有对应关系 + layer.msg("对于编码:" + result + ",并未发现对应的物料", { + icon: 0, + time: 1000 //0.5秒关闭(如果不配置,默认是3秒) + }, function () { + }) } - form.render(); } }) diff --git a/target/classes/templates/pages/application/application-out.html b/target/classes/templates/pages/application/application-out.html index cfc16ba5..78a758c3 100644 --- a/target/classes/templates/pages/application/application-out.html +++ b/target/classes/templates/pages/application/application-out.html @@ -695,6 +695,13 @@ materialCode.value = data.mcode; var barCodeInput = barCodeItem.childNodes[1].childNodes[1]; barCodeInput.value = result; + }else{ + // 如果没有对应关系 + layer.msg("对于编码:" + result + ",并未发现对应的物料", { + icon: 0, + time: 1000 //0.5秒关闭(如果不配置,默认是3秒) + }, function () { + }) } } diff --git a/target/classes/templates/pages/application/application-out_min-mobile.html b/target/classes/templates/pages/application/application-out_min-mobile.html index 07fd7204..ab36f625 100644 --- a/target/classes/templates/pages/application/application-out_min-mobile.html +++ b/target/classes/templates/pages/application/application-out_min-mobile.html @@ -59,6 +59,7 @@ var data = d.data; if(state === "0") { for (let i = 0; i < data.length; i++) { + console.log(data[i]); let producedDate = data[i].producedDate === null?"":data[i].producedDate; // 头部信息 lis.push('
  • ' + @@ -71,7 +72,8 @@ '

    物料名称:' + data[i].mname + '

    ' + '

    物料编码:' + data[i].mcode + '

    ' + '

    出库数量:' + data[i].quantity + '

    ' + - '

    生产日期:' + producedDate + '

    ' + + '

    生产日期:' + producedDate + '

    ' + + '

    所处库位:' + data[i].pcode + '

    ' + '
    备注:

    ' + data[i].applyRemark + '

    ' + ''); // 底部信息 @@ -93,6 +95,7 @@ '

    出库数量:' + data[i].quantity + '

    ' + '

    处理人:' + data[i].checkerName + '

    ' + '

    生产日期:' + producedDate+ '

    ' + + '

    所处库位:' + data[i].pcode + '

    ' + '
    备注:

    ' + data[i].applyRemark + '

    ' + ''); // 底部信息 diff --git a/target/classes/templates/pages/application/application-transfer.html b/target/classes/templates/pages/application/application-transfer.html index e4193498..f1821170 100644 --- a/target/classes/templates/pages/application/application-transfer.html +++ b/target/classes/templates/pages/application/application-transfer.html @@ -435,7 +435,12 @@ $('#place' + codeId).append(new Option(item.depositoryName + "-" + item.code, item.id));//往下拉菜单里添加元素 }); form.render(); - } + }// 如果没有对应关系 + layer.msg("对于编码:" + result + ",并未发现对应的物料", { + icon: 0, + time: 1000 //0.5秒关闭(如果不配置,默认是3秒) + }, function () { + }) } }); diff --git a/target/classes/templates/pages/scanQrCode/ScanBarOrQrCodeOut.html b/target/classes/templates/pages/scanQrCode/ScanBarOrQrCodeOut.html index 41b9da66..cd02d887 100644 --- a/target/classes/templates/pages/scanQrCode/ScanBarOrQrCodeOut.html +++ b/target/classes/templates/pages/scanQrCode/ScanBarOrQrCodeOut.html @@ -37,6 +37,9 @@ // 先定义,用于弹出确定框 function isOutTrue() { + } + function outQuantityCheck() { + } // 用于判断是否包含字母 @@ -74,8 +77,8 @@ isOutTrue = function (req) { var confirmIndex = layer.confirm("确定出库?", { btn: ["确定", "取消"] - }, function () { // 如果确定出库 - + }, + function () { // 如果确定出库 layui.$.ajax({ url: "/depositoryRecord/isCheckOut", type: "post", @@ -98,7 +101,6 @@ }); } else { // 如果出库失败 - layer.msg(res.statusInfo.detail + ",请重试"); depository = null; material = null; @@ -110,7 +112,8 @@ } }) - }, function () { + }, + function () { // 如果取消 depository = null; material = null; @@ -118,7 +121,8 @@ layer.close(layer.index); var index = parent.layer.getFrameIndex(window.name); parent.layer.close(index); - }) + } + ) }; // 具体出库逻辑 @@ -160,7 +164,6 @@ // 如果是物料 material = data.material; if (mcode !== material.code && Number(mcode) !== material.code && mcode !== material.code.toString()) { - layer.confirm("出库物料不正确,请重新扫描", { btn: ["确定","取消"] }, function(){ @@ -184,7 +187,6 @@ parent.layer.close(index); }) - // 继续扫描 } else { if (depository !== null) { // 如果已经扫描仓库 @@ -205,7 +207,7 @@ param.qrCode = qrCode; param.barCode = barCode; // 弹出确定框 - isOutTrue(param); + outQuantityCheck(param); } } else if (place != null) { @@ -239,7 +241,7 @@ param.qrCode = qrCode; param.barCode = barCode; // 弹出确定框 - isOutTrue(param); + outQuantityCheck(param); } } else { @@ -332,7 +334,7 @@ param.qrCode = qrCode; param.barCode = barCode; // 弹出确定框 - isOutTrue(param); + outQuantityCheck(param); } } @@ -388,7 +390,7 @@ param.qrCode = qrCode; param.barCode = barCode; // 弹出确定框 - isOutTrue(param); + outQuantityCheck(param); } } @@ -396,8 +398,30 @@ } }) - } + }; + + outQuantityCheck = function (req) { + layer.prompt({ + formType: 0, + value: quantity, + title: '请输入出库数量', + }, function(value, index, elem){ + if(value > quantity){ + layer.msg("非法值,重新输入!",{ + icon: 0, + time: 500 + }, + function () { + outQuantityCheck(req); + }) + }else{ + req.quantity = value; + layer.close(index); + isOutTrue(req); + } + }); + }