Browse Source

修改系统审批功能

lwx_dev
erdanergou 3 years ago
parent
commit
07ce471c00
  1. 73
      target/classes/templates/pages/application/application-out_temporaryValue.html

73
target/classes/templates/pages/application/application-out_temporaryValue.html

@ -558,6 +558,16 @@
barCode.empty(); 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); layer.close(loading2);
} }
} }
@ -655,6 +665,15 @@
barCode.empty(); 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(); form.render();
layer.close(loading2); layer.close(loading2);
} }
@ -747,6 +766,16 @@
barCode.empty(); 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; materialName.value = material.mname;
materialId.value = material.id; materialId.value = material.id;
codeValue.value = material.code; codeValue.value = material.code;
@ -818,6 +847,15 @@
for (let i = 0; i < unitList.length; i++) { for (let i = 0; i < unitList.length; i++) {
$("#unit" + idNumber).append(new Option(unitList[i].newUnit, unitList[i].newUnit)); $("#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(); form.render();
layer.close(loading2); layer.close(loading2);
} else { } else {
@ -932,6 +970,15 @@
$.each(data.splitInfoList, function (index, item) { $.each(data.splitInfoList, function (index, item) {
$("#unit" + idNumber).append(new Option(item.newUnit, item.newUnit)); $("#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(); form.render();
materialName.value = data.mname; materialName.value = data.mname;
materialId.value = data.id; materialId.value = data.id;
@ -961,6 +1008,9 @@
req.quantity = val; req.quantity = val;
req.unit = unit; req.unit = unit;
req.placeId = -1; 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}); let loading2 = layer.open({type: 3, shade: [0.25, '#000'], icon: 2, speed: 0});
$.ajax({ $.ajax({
url: "/material/MaterialQuantityIsTrue", url: "/material/MaterialQuantityIsTrue",
@ -1061,10 +1111,22 @@
}; };
form.on('select()', function (data) { form.on('select()', function (data) {
let unit = data.value;
let id = data.elem.id; let id = data.elem.id;
let idNum = id.split("unit")[1]; 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) { if (mcode === "" || mcode === undefined || mcode === null) {
layer.msg("请输入物料的正确编码!", {icon: 0, time: 500}, function () { layer.msg("请输入物料的正确编码!", {icon: 0, time: 500}, function () {
$("#quantity" + idNum).val("") $("#quantity" + idNum).val("")
@ -1077,6 +1139,9 @@
req.quantity = val; req.quantity = val;
req.unit = unit; req.unit = unit;
req.placeId = -1; req.placeId = -1;
if (depositoryId !== "-1") {
req.depositoryId = depositoryId;
}
let loading2 = layer.open({type: 3, shade: [0.25, '#000'], icon: 2, speed: 0}); let loading2 = layer.open({type: 3, shade: [0.25, '#000'], icon: 2, speed: 0});
$.ajax({ $.ajax({
url: "/material/MaterialQuantityIsTrue", url: "/material/MaterialQuantityIsTrue",
@ -1101,11 +1166,9 @@
} }
} }
}); });
$('body').on('click', '[data-refresh]', function () {
location.reload();
})
}) })
</script> </script>

Loading…
Cancel
Save