Browse Source

优化物料选择页面

lwx_dev
erdanergou 3 years ago
parent
commit
57e48de6ad
  1. 3
      target/classes/templates/pages/application/application-in_scanQrCode.html
  2. 33
      target/classes/templates/pages/application/application-out.html
  3. 3
      target/classes/templates/pages/application/application-out_scanQrCode.html
  4. 34
      target/classes/templates/pages/application/application-transfer.html
  5. 3
      target/classes/templates/pages/application/application-transfer_back.html
  6. 3
      target/classes/templates/pages/stockTaking/stockTaking.html

3
target/classes/templates/pages/application/application-in_scanQrCode.html

@ -668,7 +668,8 @@
maxmin: true, maxmin: true,
shadeClose: true, //点击遮罩关闭层 shadeClose: true, //点击遮罩关闭层
area: ['70%', '70%'], area: ['70%', '70%'],
content: '/selectMaterialByCard?mname=' + mname + '&type=1&clickObj=' + parentId, // content: '/selectMaterialByCard?mname=' + mname + '&type=1&clickObj=' + parentId,
content: '/getMaterialAll?mname=' + mname + '&type=1&clickObj=' + parentId,
move: '.layui-layer-title', move: '.layui-layer-title',
fixed: false, fixed: false,
end: function () { end: function () {

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

@ -575,6 +575,9 @@
var materialName = materialItem[1]; var materialName = materialItem[1];
var materialId = materialName.parentNode.parentNode.childNodes[3]; var materialId = materialName.parentNode.parentNode.childNodes[3];
var mname = materialName.value; var mname = materialName.value;
var barCodeChildren = parent.childNodes[9];
// 条形码条码
var barCodeItem = barCodeChildren.childNodes[3];
layer.open({ layer.open({
type: 2, type: 2,
title: '弹窗内容', title: '弹窗内容',
@ -600,6 +603,36 @@
code = ""; code = "";
} }
codeValue.value = code; codeValue.value = code;
var materialAndBarCodeList = material["materialAndBarCodeList"];
var idNumber = materialId.name.split("mid")[1];
if (materialAndBarCodeList.length > 0) {
// 如果有对应的条形码
var barCodeInput = barCodeItem.childNodes[1].childNodes[1];
var barCodeImg = barCodeItem.childNodes[1].childNodes[3];
var id = barCodeInput.id;
$("#" + id).remove();
$("#barCode" + idNumber).empty();
var barCode = $("#barCode" + idNumber);
if (barCode.length > 0) {
barCode.empty();
} else {
var barCodeSelect = `
<select id=` + "barCode" + idNumber + ` name=` + "barCode" + idNumber + `>
</select>`;
$("#" + barCodeImg.id).before(barCodeSelect);
}
form.render();
$.each(materialAndBarCodeList, function (index, item) {
$("#barCode" + idNumber).append(new Option(item.bmcode, item.id));//往下拉菜单里添加元素
});
form.render();
}
else{
var barCode = $("#barCode" + idNumber);
if (barCode.length > 0) {
barCode.empty();
}
}
form.render(); form.render();
} }
}); });

3
target/classes/templates/pages/application/application-out_scanQrCode.html

@ -500,7 +500,8 @@
maxmin: true, maxmin: true,
shadeClose: true, //点击遮罩关闭层 shadeClose: true, //点击遮罩关闭层
area: ['70%', '70%'], area: ['70%', '70%'],
content: '/selectMaterialByCard?mname='+mname+'&type=2&clickObj='+parentId, // content: '/selectMaterialByCard?mname='+mname+'&type=2&clickObj='+parentId,
content: '/getMaterialAll?mname='+mname+'&type=2&clickObj='+parentId,
move : '.layui-layer-title', move : '.layui-layer-title',
fixed:false, fixed:false,
end: function () { end: function () {

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

@ -576,7 +576,6 @@
contentType: "application/json;charset=utf-8", contentType: "application/json;charset=utf-8",
success:function (res) { success:function (res) {
var idNumber = materialId.name.split("mid")[1]; var idNumber = materialId.name.split("mid")[1];
console.log(idNumber)
// 获取物料与条形码的对应关系 // 获取物料与条形码的对应关系
var materialAndBarCodeList = d["materialAndBarCodeList"]; var materialAndBarCodeList = d["materialAndBarCodeList"];
var barCode = $("#barCode" + idNumber); var barCode = $("#barCode" + idNumber);
@ -631,6 +630,8 @@
var materialName = materialItem[1]; var materialName = materialItem[1];
var materialId = materialName.parentNode.parentNode.childNodes[3]; var materialId = materialName.parentNode.parentNode.childNodes[3];
var mname = materialName.value; var mname = materialName.value;
var barCodeChildren = parent.childNodes[9];
var barCodeItem = barCodeChildren.childNodes[3];
layer.open({ layer.open({
type: 2, type: 2,
title: '弹窗内容', title: '弹窗内容',
@ -638,7 +639,8 @@
maxmin: true, maxmin: true,
shadeClose: true, //点击遮罩关闭层 shadeClose: true, //点击遮罩关闭层
area: ['70%', '70%'], area: ['70%', '70%'],
content: '/selectMaterialByCard?mname='+mname+'&type=2&clickObj='+parentId, // content: '/selectMaterialByCard?mname='+mname+'&type=2&clickObj='+parentId,
content: '/getMaterialAll?mname='+mname+'&type=2&clickObj='+parentId,
move : '.layui-layer-title', move : '.layui-layer-title',
fixed:false, fixed:false,
end: function () { end: function () {
@ -660,6 +662,34 @@
$.each(placeList, function (index, item) { $.each(placeList, function (index, item) {
$('#place').append(new Option(item.depositoryName+"-"+item.code, item.id));//往下拉菜单里添加元素 $('#place').append(new Option(item.depositoryName+"-"+item.code, item.id));//往下拉菜单里添加元素
}); });
var barCode = $("#barCode" + idNumber);
if (barCode.length > 0) {
barCode.empty();
}
var idNumber = materialId.name.split("mid")[1];
var materialAndBarCodeList = material["materialAndBarCodeList"];
if (materialAndBarCodeList.length > 0) {
// 如果有对应的条形码
var barCodeInput = barCodeItem.childNodes[1].childNodes[1];
var barCodeImg = barCodeItem.childNodes[1].childNodes[3];
var id = barCodeInput.id;
$("#" + id).remove();
var barCode = $("#barCode" + idNumber);
if (barCode.length > 0) {
barCode.empty();
} else {
var barCodeSelect = `
<select id=` + "barCode" + idNumber + ` name=` + "barCode" + idNumber + `>
</select>`;
$("#" + barCodeImg.id).before(barCodeSelect);
}
form.render();
$.each(materialAndBarCodeList, function (index, item) {
$("#barCode" + idNumber).append(new Option(item.bmcode, item.id));//往下拉菜单里添加元素
});
form.render();
}
form.render(); form.render();
} }
}); });

3
target/classes/templates/pages/application/application-transfer_back.html

@ -382,7 +382,8 @@
maxmin: true, maxmin: true,
shadeClose: true, //点击遮罩关闭层 shadeClose: true, //点击遮罩关闭层
area: ['70%', '70%'], area: ['70%', '70%'],
content: '/selectMaterialByCard?mname='+mname+'&type=2&clickObj='+parentId, // content: '/selectMaterialByCard?mname='+mname+'&type=2&clickObj='+parentId,
content: '/getMaterialAll?mname='+mname+'&type=2&clickObj='+parentId,
move : '.layui-layer-title', move : '.layui-layer-title',
fixed:false, fixed:false,
end: function () { end: function () {

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

@ -665,7 +665,8 @@
area: ['70%', '70%'], area: ['70%', '70%'],
move: '.layui-layer-title', move: '.layui-layer-title',
fixed: false, fixed: false,
content: '/selectMaterialByCardForTaking?mname=' + mname + '&type=3&clickObj=' + parentId + '&placeId=' + placeId + '&depositoryId=' + depositoryId, content: '/getMaterialAll?mname=' + mname + '&type=3&clickObj=' + parentId + '&placeId=' + placeId + '&depositoryId=' + depositoryId,
// content: '/selectMaterialByCardForTaking?mname=' + mname + '&type=3&clickObj=' + parentId + '&placeId=' + placeId + '&depositoryId=' + depositoryId,
end: function () { end: function () {
var mid = materialId.value; var mid = materialId.value;
$.ajax({ $.ajax({

Loading…
Cancel
Save