Browse Source

1. FQC007修改 抽驗不離開頁面,Input 按Enter不執行submit

2. 未結工單修正數字顯示
PTD
Ray 3 years ago
parent
commit
59bd88ddce
  1. 5
      AMESCoreStudio.Web/Controllers/FQCController.cs
  2. 6
      AMESCoreStudio.Web/Controllers/PCSController.cs
  3. 22
      AMESCoreStudio.Web/Views/FQC/FQC007.cshtml
  4. 10
      AMESCoreStudio.Web/Views/FQC/FQC007C.cshtml

5
AMESCoreStudio.Web/Controllers/FQCController.cs

@ -934,8 +934,9 @@ namespace AMESCoreStudio.Web.Controllers
if (result_detail.Success) if (result_detail.Success)
{ {
var _msg = "新增成功!"; ModelState.AddModelError("error", "新增成功!");
return RedirectToAction("WindowReload", "Home", new { msg = _msg }); //return RedirectToAction("WindowReload", "Home", new { msg = _msg });
return View("FQC007C", model);
} }
else else
{ {

6
AMESCoreStudio.Web/Controllers/PCSController.cs

@ -3493,6 +3493,7 @@ namespace AMESCoreStudio.Web.Controllers
string ct1 = ""; string ct1 = "";
if (standardWorkTimes.Count > 0) if (standardWorkTimes.Count > 0)
{ {
if (standardWorkTimes.Where(w => w.LineID == line_id).FirstOrDefault() != null)
ct1 = standardWorkTimes.Where(w => w.LineID == line_id).FirstOrDefault().CT.ToString(); ct1 = standardWorkTimes.Where(w => w.LineID == line_id).FirstOrDefault().CT.ToString();
} }
@ -3551,6 +3552,11 @@ namespace AMESCoreStudio.Web.Controllers
double rate = ((okQty * 1.0) / (okQty + ngQty)) * 100; double rate = ((okQty * 1.0) / (okQty + ngQty)) * 100;
if (okQty + ngQty == 0)
{
rate = 100;
}
if (j == rule_sation.Count - 2) if (j == rule_sation.Count - 2)
{ {
if (rate <= 90) if (rate <= 90)

22
AMESCoreStudio.Web/Views/FQC/FQC007.cshtml

@ -449,7 +449,10 @@
maxmin: false, maxmin: false,
scrollbar: true, scrollbar: true,
moveOut:true, moveOut:true,
content: '/FQC/FQC007C?inhouseNo=@Model.h_InhouseNo&seq=@Model.h_SeqID' content: '/FQC/FQC007C?inhouseNo=@Model.h_InhouseNo&seq=@Model.h_SeqID',
end: function () {
window.location.reload();
}
}); });
}); });
//hg.open('抽驗', '/FQC/FQC007C?inhouseNo=@Model.h_InhouseNo&seq=@Model.h_SeqID', 600, 600); //hg.open('抽驗', '/FQC/FQC007C?inhouseNo=@Model.h_InhouseNo&seq=@Model.h_SeqID', 600, 600);
@ -514,18 +517,33 @@
var error = '@Html.ValidationMessage("error")'; var error = '@Html.ValidationMessage("error")';
$("#CustomerMedical").attr("disabled", "disabled"); $("#CustomerMedical").attr("disabled", "disabled");
$("#CustomerVIP").attr("disabled", "disabled"); $("#CustomerVIP").attr("disabled", "disabled");
if ($(error).text() != '') { if ($(error).text() != '') {
parent.hg.msg(error); parent.hg.msg(error);
}; };
let InhouseNo = $("#hInhouseNo").val().trim(); let InhouseNo = $("#hInhouseNo").val().trim();
let SeqID = $("#hSeqID").val().trim(); let SeqID = $("#hSeqID").val().trim();
let Result = '@Model.StatusName'; let Result = '@Model.StatusName';
if (InhouseNo.length != 0 && SeqID.length != 0 && Result == 'A') { if (InhouseNo.length != 0 && SeqID.length != 0 && Result == 'A') {
$("#click").show(); $("#click").show();
} }
setupEnterToNext();
}); });
function setupEnterToNext() {
// add keydown event for all inputs
$(':input').keydown(function (e) {
if (e.keyCode == 13 /*Enter*/) {
// focus next input elements
$(':input:visible:enabled:eq(' + ($(':input:visible:enabled').index(this) + 1) + ')').focus();
e.preventDefault();
}
});
}
</script> </script>
} }

10
AMESCoreStudio.Web/Views/FQC/FQC007C.cshtml

@ -164,9 +164,19 @@
$(document).ready(function () { $(document).ready(function () {
var error = '@Html.ValidationMessage("error")'; var error = '@Html.ValidationMessage("error")';
if ($(error).text() != '') { if ($(error).text() != '') {
if ($(error).text() == '新增成功!') {
add();
}
else
parent.hg.msg(error); parent.hg.msg(error);
} }
}); });
function add() {
$("#BarcodeNo").val('');
$("#BarcodeNo").focus();
}
</script> </script>

Loading…
Cancel
Save