Browse Source

1. 修正過站判斷組件數量

2. 工單資料修正 各項目刪除失效
PTD
Ray 3 years ago
parent
commit
c8ca8b602d
  1. 7
      AMESCoreStudio.Web/Controllers/PCSController.cs
  2. 17
      AMESCoreStudio.Web/Views/PCS/PCS003.cshtml
  3. 2
      AMESCoreStudio.Web/Views/PCS/PCS021.cshtml

7
AMESCoreStudio.Web/Controllers/PCSController.cs

@ -3482,7 +3482,12 @@ namespace AMESCoreStudio.Web.Controllers
int i = 0;
foreach (var KeyPartItem in model.Inputs)
{
if (i + KpItemQty > model.WipKps.Count())
{
Msg = "已刷超過組件數量";
Success = false;
return Json(new Result() { success = Success, msg = Msg, data = Data });
}
keyParts.Add(new BarCodeCheckDto.inputItem
{
inputType = KeyPartItem.Contains("$") ? "NG" : model.WipKps[i + KpItemQty].KpNo,

17
AMESCoreStudio.Web/Views/PCS/PCS003.cshtml

@ -1374,7 +1374,8 @@
});
SelectKPNo += '</select>';
var contactdiv = '<tr>' +
'<td><input onkeypress="if( event.keyCode == 13 ) { return false; }" class="layui-input" name="WipKps[' + No + '].KpName" /></td>' +
'<td><input type="hidden" value="" name="WipKps[' + No + '].WipKpID" />' +
'<input onkeypress="if( event.keyCode == 13 ) { return false; }" class="layui-input" name="WipKps[' + No + '].KpName" /></td>' +
'<td>'+SelectKPNo+'</td>' +
'<td><input onkeypress="if( event.keyCode == 13 ) { return false; }" class="layui-input" name="WipKps[' + No + '].KpSeq" /></td>' +
'<td><input onkeypress="if( event.keyCode == 13 ) { return false; }" class="layui-input" name="WipKps[' + No + '].Title" /></td>' +
@ -1400,7 +1401,8 @@
});
Select += '</select>';
var contactdiv = '<tr>' +
'<td><input onkeypress="if( event.keyCode == 13 ) { return false; }" class="layui-input" name="WipOutfits[' + No + '].OutfitNo" /></td>' +
'<td><input type="hidden" value="" name="WipOutfits[' + No + '].WipOutfitID" />' +
'<input onkeypress="if( event.keyCode == 13 ) { return false; }" class="layui-input" name="WipOutfits[' + No + '].OutfitNo" /></td>' +
'<td><input onkeypress="if( event.keyCode == 13 ) { return false; }" class="layui-input" name="WipOutfits[' + No + '].PartNo" /></td>' +
'<td>' + Select + '</td>' +
'<td><a class="layui-btn layui-btn-danger layui-btn-xs layui-icon layui-icon-delete" onclick="Remove(this);">刪除</a></td>' +
@ -1428,7 +1430,8 @@
});
SelectSOPType += '</select>';
var contactdiv = '<tr>' +
'<td><input onkeypress="if( event.keyCode == 13 ) { return false; }" class="layui-input" name="WipSops[' + No + '].SOPName" /></td>' +
'<td><input type="hidden" value="" name="WipSops[' + No + '].WipSOPID" />' +
'<input onkeypress="if( event.keyCode == 13 ) { return false; }" class="layui-input" name="WipSops[' + No + '].SOPName" /></td>' +
'<td><input onkeypress="if( event.keyCode == 13 ) { return false; }" class="layui-input" name="WipSops[' + No + '].SOPPath" /></td>' +
'<td>' + SelectSOPType + '</td>' +
'<td>' + Select + '</td>' +
@ -1442,9 +1445,15 @@
// Table 刪除
function Remove(button) {
//Determine the reference of the Row using the Button.
hg.confirm("確認要刪除此筆資料嗎?", function () {
var row = $(button).closest("TR");
var id = $(button).closest("TR").find('input[type=hidden]').val();
var table = $(button).closest("TABLE")[0]; //$("#KPTable")[0];
table.deleteRow(row[0].rowIndex);
$(button).closest("TR").find('input[type=hidden]').val(id + "_");
alert($(button).closest("TR").find('input[type=hidden]').val());
row.hide();
});
//table.deleteRow(row[0].rowIndex);
};
//生產單位選單

2
AMESCoreStudio.Web/Views/PCS/PCS021.cshtml

@ -217,7 +217,7 @@
<input type="text" asp-for="@index.KpName" name="WipKps[@j].KpName" style="width:100px" readonly="readonly" />
</td>
<td>
<select asp-for="@index.KpNo" name="WipKps[@j].KpNo" asp-items="@ViewBag.ItemsList" class=""></select>
<select disabled asp-for="@index.KpNo" name="WipKps[@j].KpNo" asp-items="@ViewBag.ItemsList" class=""></select>
</td>
<td>
<input type="text" asp-for="@index.KpSeq" name="WipKps[@j].KpSeq" style="width:30px" readonly="readonly" />

Loading…
Cancel
Save