diff --git a/src/main/resources/templates/pages/application/application-out_back.html b/src/main/resources/templates/pages/application/application-out_back.html
index 2da960e9..b492e817 100644
--- a/src/main/resources/templates/pages/application/application-out_back.html
+++ b/src/main/resources/templates/pages/application/application-out_back.html
@@ -117,7 +117,6 @@
提交申请成功
-
+
@@ -418,7 +449,11 @@
// 获取祖父节点
var reparent = parent.parentNode;
var height = parseInt(($("#stepForm").css('height')).split("px")[0]);
- $("#stepForm").css("height", height - 387 + 'px');
+ if (depositoryDisplay === "none") {
+ $("#stepForm").css("height", height + 390 + 'px');
+ } else {
+ $("#stepForm").css("height", height + 435 + 'px');
+ }
params = remove(params, parentId);
reparent.removeChild(parent);
// 当前节点的id值
@@ -426,7 +461,7 @@
$.ajax({
url: "/material/delTemporaryValue",
type: 'post',
- data:JSON.stringify({"id":value,"type":"Out"}),
+ data: JSON.stringify({"id": value, "type": "Out"}),
dataType: 'json',
contentType: "application/json;charset=utf-8"
})
@@ -523,6 +558,16 @@
barCode.empty();
}
}
+ if (depositoryDisplay !== "none") {
+ $("#showDepository" + idNumber).empty();
+ let depositoryList = d.depositoryList;
+ if(depositoryList !== null) {
+ for (let i = 0; i < depositoryList.length; i++) {
+ $("#showDepository" + idNumber).append(new Option(depositoryList[i].dname, depositoryList[i].id));
+ }
+ }
+ form.render();
+ }
layer.close(loading2);
}
}
@@ -620,6 +665,15 @@
barCode.empty();
}
}
+ if (depositoryDisplay !== "none") {
+ $("#showDepository" + idNumber).empty();
+ let depositoryList = material.depositoryList;
+ if(depositoryList !== null) {
+ for (let i = 0; i < depositoryList.length; i++) {
+ $("#showDepository" + idNumber).append(new Option(depositoryList[i].dname, depositoryList[i].id));
+ }
+ }
+ }
form.render();
layer.close(loading2);
}
@@ -712,6 +766,16 @@
barCode.empty();
}
}
+ if (depositoryDisplay !== "none") {
+ $("#showDepository" + idNumber).empty();
+ let depositoryList = material.depositoryList;
+ if(depositoryList !== null){
+ for (let i = 0; i < depositoryList.length; i++) {
+ $("#showDepository" + idNumber).append(new Option(depositoryList[i].dname, depositoryList[i].id));
+ }
+ }
+ form.render();
+ }
materialName.value = material.mname;
materialId.value = material.id;
codeValue.value = material.code;
@@ -783,6 +847,15 @@
for (let i = 0; i < unitList.length; i++) {
$("#unit" + idNumber).append(new Option(unitList[i].newUnit, unitList[i].newUnit));
}
+ if (depositoryDisplay !== "none") {
+ $("#showDepository" + idNumber).empty();
+ let depositoryList = data.depositoryList;
+ if(depositoryList !== null) {
+ for (let i = 0; i < depositoryList.length; i++) {
+ $("#showDepository" + idNumber).append(new Option(depositoryList[i].dname, depositoryList[i].id));
+ }
+ }
+ }
form.render();
layer.close(loading2);
} else {
@@ -897,6 +970,15 @@
$.each(data.splitInfoList, function (index, item) {
$("#unit" + idNumber).append(new Option(item.newUnit, item.newUnit));
});
+ if (depositoryDisplay !== "none") {
+ $("#showDepository" + idNumber).empty();
+ let depositoryList = data.depositoryList;
+ if(depositoryList !== null) {
+ for (let i = 0; i < depositoryList.length; i++) {
+ $("#showDepository" + idNumber).append(new Option(depositoryList[i].dname, depositoryList[i].id));
+ }
+ }
+ }
form.render();
materialName.value = data.mname;
materialId.value = data.id;
@@ -926,6 +1008,9 @@
req.quantity = val;
req.unit = unit;
req.placeId = -1;
+ if (depositoryDisplay !== "none") {
+ req.depositoryId = $("#showDepository" + id).val();
+ }
let loading2 = layer.open({type: 3, shade: [0.25, '#000'], icon: 2, speed: 0});
$.ajax({
url: "/material/MaterialQuantityIsTrue",
@@ -992,29 +1077,29 @@
content.css('height', '100%');
iframeChildren.css('height', '100%');
},
- end:function () {
- let val = $("#"+id).val();
- if(val !== ""){
- if(id.indexOf("ForGroup") !== -1){
+ end: function () {
+ let val = $("#" + id).val();
+ if (val !== "") {
+ if (id.indexOf("ForGroup") !== -1) {
// 如果是组合
$("#stepForm2").find('input[id*="project"]').each(function () {
- $(this).attr("lay-verify","required")
+ $(this).attr("lay-verify", "required")
})
- }else{
+ } else {
// 如果是物料
$("#stepForm").find('input[id*="project"]').each(function () {
- $(this).attr("lay-verify","required")
+ $(this).attr("lay-verify", "required")
})
}
- }else{
- if(id.indexOf("ForGroup") !== -1){
+ } else {
+ if (id.indexOf("ForGroup") !== -1) {
// 如果是组合
$("#stepForm2").find('input[id*="project"]').each(function () {
$(this).removeAttr("lay-verify")
})
- }else{
+ } else {
// 如果是物料
$("#stepForm").find('input[id*="project"]').each(function () {
$(this).removeAttr("lay-verify")
@@ -1026,10 +1111,22 @@
};
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();
+ let unit = "";
+ let mcode = "";
+ let depositoryId = "-1";
+ if (id.indexOf('unit') !== -1) {
+ unit = data.value;
+ } else {
+ // 获取当前选中的仓库id
+ depositoryId = data.value;
+ idNum = id.split('showDepository')[1];
+ unit = $("#unit" + idNum).val();
+
+ }
+ mcode = $("#code" + idNum).val();
if (mcode === "" || mcode === undefined || mcode === null) {
layer.msg("请输入物料的正确编码!", {icon: 0, time: 500}, function () {
$("#quantity" + idNum).val("")
@@ -1042,6 +1139,9 @@
req.quantity = val;
req.unit = unit;
req.placeId = -1;
+ if (depositoryId !== "-1") {
+ req.depositoryId = depositoryId;
+ }
let loading2 = layer.open({type: 3, shade: [0.25, '#000'], icon: 2, speed: 0});
$.ajax({
url: "/material/MaterialQuantityIsTrue",
@@ -1066,11 +1166,9 @@
}
}
+
});
- $('body').on('click', '[data-refresh]', function () {
- location.reload();
- })
})
diff --git a/src/main/resources/templates/pages/applicationForStorageCenter/application-out_temporaryValue.html b/src/main/resources/templates/pages/applicationForStorageCenter/application-out_temporaryValue.html
index 4ce116b8..c32f6765 100644
--- a/src/main/resources/templates/pages/applicationForStorageCenter/application-out_temporaryValue.html
+++ b/src/main/resources/templates/pages/applicationForStorageCenter/application-out_temporaryValue.html
@@ -306,7 +306,13 @@
if (NewIdNumber !== "") {
params.push(NewIdNumber)
}
- $("#stepForm").css("height", height + 390 + 'px');
+ if(depositoryDisplay === "none"){
+
+ $("#stepForm").css("height", height + 390 + 'px');
+ } else {
+ $("#stepForm").css("height", height + 435 + 'px');
+
+ }
var materialItem = firstItem + lastItem;
$("#btn_sub").prepend(materialItem);
form.render();
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 7c543c29..ddc886ee 100644
--- a/target/classes/templates/pages/application/application-out_min-mobile.html
+++ b/target/classes/templates/pages/application/application-out_min-mobile.html
@@ -12,7 +12,7 @@
-
+
@@ -31,7 +31,8 @@