Browse Source

修改bug

lwx_dev
erdanergou 3 years ago
parent
commit
e3fe621b5f
  1. 2
      src/main/java/com/dreamchaser/depository_manage/controller/GroupController.java
  2. 43
      src/main/resources/templates/pages/application/application-out.html
  3. 43
      src/main/resources/templates/pages/applicationForStorageCenter/application-out.html
  4. 44
      src/main/resources/templates/pages/applicationForStorageCenter/application-out_back.html
  5. 3
      src/test/java/com/dreamchaser/depository_manage/TestForOther.java
  6. 43
      target/classes/templates/pages/application/application-out.html

2
src/main/java/com/dreamchaser/depository_manage/controller/GroupController.java

@ -550,7 +550,7 @@ public class GroupController {
// 执行结果
Integer integer = 0;
// 实际结果
Integer result = 0;
int result = 0;
Integer gid = ObjectFormatUtil.toInteger(map.get("gid"));
List<GroupInfo> groupInfoByGid = groupService.findGroupInfoByGid(gid);
if (groupInfoByGid != null) {

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

@ -1566,8 +1566,51 @@
});
}
}
};
form.on('select()', function (data) {
let unit = data.value;
let id = data.elem.id;
let idNum = id.split("unit")[1];
let mcode = $("#code" + idNum).val();
if (mcode === "" || mcode === undefined || mcode === null) {
layer.msg("请输入物料的正确编码!", {icon: 0, time: 500}, function () {
$("#quantity" + idNum).val("")
});
} else {
let val = $("#quantity" + idNum).val();
if (val !== null && val !== undefined && val !== '') {
var req = {};
req.mcode = mcode;
req.quantity = val;
req.unit = unit;
req.placeId = -1;
let loading2 = layer.open({type: 3, shade: [0.25, '#000'], icon: 2, speed: 0});
$.ajax({
url: "/material/MaterialQuantityIsTrue",
type: "post",
data: JSON.stringify(req),
dataType: 'json',
contentType: "application/json;charset=utf-8",
success: function (res) {
var flag = res.data;
if (!flag) { // 如果当前数目不合适
layer.msg("当前单个仓库中物料数量不足", {icon: 0, time: 500}, function () {
layer.close(loading2);
$("#quantity" + idNum).val("");
},
);
} else {
layer.close(loading2)
}
}
});
}
}
});
})
</script>

43
src/main/resources/templates/pages/applicationForStorageCenter/application-out.html

@ -1719,8 +1719,51 @@
iframeChildren.css('height', '100%');
}
});
};
form.on('select()', function (data) {
let unit = data.value;
let id = data.elem.id;
let idNum = id.split("unit")[1];
let mcode = $("#code" + idNum).val();
if (mcode === "" || mcode === undefined || mcode === null) {
layer.msg("请输入物料的正确编码!", {icon: 0, time: 500}, function () {
$("#quantity" + idNum).val("")
});
} else {
let val = $("#quantity" + idNum).val();
if (val !== null && val !== undefined && val !== '') {
var req = {};
req.mcode = mcode;
req.quantity = val;
req.unit = unit;
req.placeId = -1;
let loading2 = layer.open({type: 3, shade: [0.25, '#000'], icon: 2, speed: 0});
$.ajax({
url: "/material/MaterialQuantityIsTrue",
type: "post",
data: JSON.stringify(req),
dataType: 'json',
contentType: "application/json;charset=utf-8",
success: function (res) {
var flag = res.data;
if (!flag) { // 如果当前数目不合适
layer.msg("当前单个仓库中物料数量不足", {icon: 0, time: 500}, function () {
layer.close(loading2);
$("#quantity" + idNum).val("");
},
);
} else {
layer.close(loading2)
}
}
});
}
}
});
})
</script>

44
src/main/resources/templates/pages/applicationForStorageCenter/application-out_back.html

@ -443,6 +443,8 @@
layer.close(loading2);
});
}else{
layer.close(loading2);
}
}
});
@ -450,6 +452,48 @@
}
};
form.on('select()', function (data) {
let unit = data.value;
let id = data.elem.id;
let mcode = $("#code").val();
if (mcode === "" || mcode === undefined || mcode === null) {
layer.msg("请输入物料的正确编码!", {icon: 0, time: 500}, function () {
$("#quantity" ).val("")
});
} else {
let val = $("#quantity").val();
if (val !== null && val !== undefined && val !== '') {
var req = {};
req.mcode = mcode;
req.quantity = val;
req.unit = unit;
req.placeId = -1;
let loading2 = layer.open({type: 3, shade: [0.25, '#000'], icon: 2, speed: 0});
$.ajax({
url: "/material/MaterialQuantityIsTrue",
type: "post",
data: JSON.stringify(req),
dataType: 'json',
contentType: "application/json;charset=utf-8",
success: function (res) {
var flag = res.data;
if (!flag) { // 如果当前数目不合适
layer.msg("当前单个仓库中物料数量不足", {icon: 0, time: 500}, function () {
layer.close(loading2);
$("#quantity").val("");
},
);
} else {
layer.close(loading2)
}
}
});
}
}
});
selectPost = function (obj) {
let id = obj.id;

3
src/test/java/com/dreamchaser/depository_manage/TestForOther.java

@ -53,7 +53,8 @@ public class TestForOther {
ApprovalInfo_Details_Approver approver = new ApprovalInfo_Details_Approver();
approver.setUserId("PangFuZhen");
approvalInfo.setApprover(approver);
depositoryRecordService.reviewByQyWxApprovalOut("1",approvalInfo,"460f46eaefb46bb0c171029f62e2cea6","2","202303210016", false,2);
// depositoryRecordService.reviewByQyWxApprovalOut("1",approvalInfo,"460f46eaefb46bb0c171029f62e2cea6","2","202303210016", false,2);
depositoryRecordService.reviewByQyWxApprovalIn("[1]",approvalInfo,"460f46eaefb46bb0c171029f62e2cea6","2","202303220009");
// UserByPort userByPort = LinkInterfaceUtil.FindUserById(78, null);
// List<String> s = excelService.writeExcelForPrint(2, 4,userByPort);
}

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

@ -1566,8 +1566,51 @@
});
}
}
};
form.on('select()', function (data) {
let unit = data.value;
let id = data.elem.id;
let idNum = id.split("unit")[1];
let mcode = $("#code" + idNum).val();
if (mcode === "" || mcode === undefined || mcode === null) {
layer.msg("请输入物料的正确编码!", {icon: 0, time: 500}, function () {
$("#quantity" + idNum).val("")
});
} else {
let val = $("#quantity" + idNum).val();
if (val !== null && val !== undefined && val !== '') {
var req = {};
req.mcode = mcode;
req.quantity = val;
req.unit = unit;
req.placeId = -1;
let loading2 = layer.open({type: 3, shade: [0.25, '#000'], icon: 2, speed: 0});
$.ajax({
url: "/material/MaterialQuantityIsTrue",
type: "post",
data: JSON.stringify(req),
dataType: 'json',
contentType: "application/json;charset=utf-8",
success: function (res) {
var flag = res.data;
if (!flag) { // 如果当前数目不合适
layer.msg("当前单个仓库中物料数量不足", {icon: 0, time: 500}, function () {
layer.close(loading2);
$("#quantity" + idNum).val("");
},
);
} else {
layer.close(loading2)
}
}
});
}
}
});
})
</script>

Loading…
Cancel
Save