From d4c3ce363eef2474b9ece4505d9ba2ab26ca9f8b Mon Sep 17 00:00:00 2001 From: "vick_wang419@hotmail.com.tw" Date: Thu, 25 Jan 2024 00:55:29 +0800 Subject: [PATCH] =?UTF-8?q?PTD=20=E8=A2=AB=E8=B2=A8=E3=80=81=E6=89=A3?= =?UTF-8?q?=E5=B8=B3=E3=80=81=E4=B8=80=E6=AE=B5=E5=BC=8F=20=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E5=8D=A1=E6=8E=A7=E9=82=8F=E8=BC=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AMESCoreStudio.Web/Views/PTD/PTD002.cshtml | 14 ++++++-- AMESCoreStudio.Web/Views/PTD/PTD006.cshtml | 34 +++++++++++-------- AMESCoreStudio.Web/Views/PTD/PTD007.cshtml | 11 +++--- .../Controllers/AMES/WipInfosController.cs | 4 +-- 4 files changed, 40 insertions(+), 23 deletions(-) diff --git a/AMESCoreStudio.Web/Views/PTD/PTD002.cshtml b/AMESCoreStudio.Web/Views/PTD/PTD002.cshtml index a42dc808..fa3368ff 100644 --- a/AMESCoreStudio.Web/Views/PTD/PTD002.cshtml +++ b/AMESCoreStudio.Web/Views/PTD/PTD002.cshtml @@ -192,7 +192,6 @@ var elem = data.elem; // 获得 radio 原始 DOM 对象 var checked = elem.checked; // 获得 radio 选中状态 var value = elem.value; // 获得 radio 值 - var othis = data.othis; // 获得 radio 元素被替换后的 jQuery 对象 var checkboxElem = layui.$('input[lay-filter="check-filter"]'); if (value == 0 && checked) { checkboxElem.prop('disabled', false); @@ -372,9 +371,21 @@ var recordDate = document.getElementById('recordDate').value; var location = document.getElementById('Location').value; var customer = document.getElementById('Customer').value; + var material = document.getElementById('PartNumber').value; var tableData = layui.table.cache['query']; + + if (customer === "") { + hg.msg('Customer不得為空!'); + return; // Do not add the row + } + if (material === "") { + hg.msg('料號不得為空!'); + return; // Do not add the row + } + + var postData = { recordType: recordType, workCenter: workCenter, @@ -470,7 +481,6 @@ hg.table.addRow = function (tableId, rowData) { // Get the table instance var table = layui.table; - console.log(table); if (isSNAlreadyExist(tableId, rowData.sn)) { // Handle the case where SN already exists layer.msg('SN 已存在!', { icon: 2 }); diff --git a/AMESCoreStudio.Web/Views/PTD/PTD006.cshtml b/AMESCoreStudio.Web/Views/PTD/PTD006.cshtml index 5a25b3ac..cc792b47 100644 --- a/AMESCoreStudio.Web/Views/PTD/PTD006.cshtml +++ b/AMESCoreStudio.Web/Views/PTD/PTD006.cshtml @@ -167,13 +167,6 @@