Browse Source

修改IPQC表單新增時輸入框Enter後邏輯順序

PTD
Shani 3 years ago
parent
commit
592034f205
  1. 84
      AMESCoreStudio.Web/Views/SPC/SPC005C.cshtml
  2. 30
      AMESCoreStudio.Web/Views/SPC/SPC005U.cshtml
  3. BIN
      AMESCoreStudio.Web/bin/Debug/netcoreapp3.1/AMESCoreStudio.Web.Views.dll
  4. BIN
      AMESCoreStudio.Web/bin/Debug/netcoreapp3.1/AMESCoreStudio.Web.Views.pdb
  5. BIN
      AMESCoreStudio.Web/bin/Debug/netcoreapp3.1/AMESCoreStudio.Web.dll
  6. BIN
      AMESCoreStudio.Web/bin/Debug/netcoreapp3.1/AMESCoreStudio.Web.pdb

84
AMESCoreStudio.Web/Views/SPC/SPC005C.cshtml

@ -121,15 +121,12 @@
var ItemNo = $("#ItemNo").val();
var BarcodeNo = $("#BarcodeNo").val();
if (!WipNo) {
alert('請填寫工單!!');
return false;
}
else if (!ItemNo) {
alert('請填寫料號!!');
return false;
}
else if (!BarcodeNo) {
alert('請填寫生產序號!!');
return false;
}
else
@ -141,15 +138,12 @@
var ItemNo = $("#ItemNo").val();
var BarcodeNo = $("#BarcodeNo").val();
if (!WipNo) {
alert('請填寫工單!!');
return false;
}
else if (!ItemNo) {
alert('請填寫料號!!');
return false;
}
else if (!BarcodeNo) {
alert('請填寫生產序號!!');
return false;
}
else
@ -302,9 +296,42 @@
}
}
}
$('#WipNo').focusout(function () {
//$('#WipNo').focusout(function () {
// var data = $("#WipNo").val();
// if (data) {
// $.ajax({
// url: "/SPC/GetWipAtt",
// dataType: 'json',
// data: { id: data },
// contentType: "application/json",
// type: 'get',
// success: function (result) {
// if (result.data) {
// //console.info(result.data);//確認itemNO/modelNO
// $("#ItemNo").val(result.data.itemNO);
// }
// else {
// alert("查無資料,請確認工單是否正確!");
// }
// },
// error: function () {
// alert("查無資料,請確認工單是否正確!");
// }
// });
// } else {
// alert("請填寫工單!");
// }
//
//});
//BarcodeNo
$("#WipNo").keypress(function (e) {
if (code == 13) {
var data = $("#WipNo").val();
if (data) {
console.log("data=" + data);
$.ajax({
url: "/SPC/GetWipAtt",
dataType: 'json',
@ -315,20 +342,63 @@
if (result.data) {
//console.info(result.data);//確認itemNO/modelNO
$("#ItemNo").val(result.data.itemNO);
//BarcodeNo
$('#BarcodeNo').focus();
}
else {
alert("查無資料,請確認工單是否正確!");
$("#WipNo").val("");
$('#WipNo').focus();
return false;
}
},
error: function () {
alert("查無資料,請確認工單是否正確!");
return false;
}
});
} else {
alert("請填寫工單!");
return false;
}
}
});
$("#ItemNo").keypress(function (e) {
if (code == 13) {
var data = $("#WipNo").val();
if (data) {
$('#BarcodeNo').focus();
} else {
alert("請填寫工單!");
$('#WipNo').focus();
return false;
}
}
});
$("#BarcodeNo").keypress(function (e) {
if (code == 13) {
var data = $("#WipNo").val();
if (!data) {
alert("請填寫工單!");
$('#WipNo').focus();
return false;
}
}
});
layui.use(['form', 'layer', 'table', 'laytpl', 'laydate'], function () {
var layer = layui.layer,
$ = layui.jquery,

30
AMESCoreStudio.Web/Views/SPC/SPC005U.cshtml

@ -108,15 +108,12 @@
var ItemNo = $("#ItemNo").val();
var BarcodeNo = $("#BarcodeNo").val();
if (!WipNo) {
alert('請填寫工單!!');
return false;
}
else if (!ItemNo) {
alert('請填寫料號!!');
return false;
}
else if (!BarcodeNo) {
alert('請填寫生產序號!!');
return false;
}
else
@ -129,15 +126,12 @@
var BarcodeNo = $("#BarcodeNo").val();
if (!WipNo) {
alert('請填寫工單!!');
return false;
}
else if (!ItemNo) {
alert('請填寫料號!!');
return false;
}
else if (!BarcodeNo) {
alert('請填寫生產序號!!');
return false;
}
else
@ -280,29 +274,7 @@
}
}
}
//$('#WipNo').focusout(function () {
// var data = $("#WipNo").val();
// if (data) {
// $.ajax({
// url: "/WHS/GetWipAtt",
// dataType: 'json',
// data: { id: data },
// contentType: "application/json",
// type: 'get',
// success: function (result) {
// if (result.data) {
// $("#ItemNo").val(result.data.modelNO);
// }
// else {
// alert("查無資料,請確認工單是否正確!");
// }
// }
// });
// } else {
// alert("請填寫工單!");
// }
//
//});
layui.use(['form', 'layer', 'table', 'laytpl', 'laydate'], function () {
var layer = layui.layer,
$ = layui.jquery,

BIN
AMESCoreStudio.Web/bin/Debug/netcoreapp3.1/AMESCoreStudio.Web.Views.dll

Binary file not shown.

BIN
AMESCoreStudio.Web/bin/Debug/netcoreapp3.1/AMESCoreStudio.Web.Views.pdb

Binary file not shown.

BIN
AMESCoreStudio.Web/bin/Debug/netcoreapp3.1/AMESCoreStudio.Web.dll

Binary file not shown.

BIN
AMESCoreStudio.Web/bin/Debug/netcoreapp3.1/AMESCoreStudio.Web.pdb

Binary file not shown.
Loading…
Cancel
Save