Browse Source

1、修改報工工作站 敘述 改為報工站別

2、修改報工站別、報工線別、報工生產單位修改資料時 Working_unit_id 不見的問題
3、標準工時備註改為非必填
master
yiru 3 months ago
parent
commit
4e9a3fd3f8
  1. 2
      AMESCoreStudio.Web/Controllers/WHSController.cs
  2. 2
      AMESCoreStudio.Web/HttpApis/AMES/IWHS.cs
  3. 1
      AMESCoreStudio.Web/ViewModels/WHS/WHS025ViewModel.cs
  4. 1
      AMESCoreStudio.Web/Views/WHS/WHS022U.cshtml
  5. 1
      AMESCoreStudio.Web/Views/WHS/WHS023U.cshtml
  6. 16
      AMESCoreStudio.Web/Views/WHS/WHS024.cshtml
  7. 1
      AMESCoreStudio.Web/Views/WHS/WHS024U.cshtml
  8. 1
      AMESCoreStudio.Web/Views/WHS/WHS025U.cshtml
  9. 14
      AMESCoreStudio.WebApi/Models/AMES/WorkingStation.cs

2
AMESCoreStudio.Web/Controllers/WHSController.cs

@ -3338,7 +3338,7 @@ namespace AMESCoreStudio.Web.Controllers
#endregion #endregion
#region WHS024報工工作站基本資料相關 #region WHS024報工站基本資料相關
public async Task<IActionResult> WHS024() public async Task<IActionResult> WHS024()
{ {

2
AMESCoreStudio.Web/HttpApis/AMES/IWHS.cs

@ -785,7 +785,7 @@ namespace AMESCoreStudio.Web
#endregion #endregion
#region WHS024 報工工作站基本資料 #region WHS024 報工站基本資料
/// <summary> /// <summary>
/// 新增報工線別基本資料 /// 新增報工線別基本資料
/// </summary> /// </summary>

1
AMESCoreStudio.Web/ViewModels/WHS/WHS025ViewModel.cs

@ -50,7 +50,6 @@ namespace AMESCoreStudio.Web.ViewModels.WHS
[Display(Name = "作業機台數")] [Display(Name = "作業機台數")]
public int MachineCnt { get; set; } public int MachineCnt { get; set; }
[Required(ErrorMessage = "{0},不能空白")]
[Display(Name = "備註")] [Display(Name = "備註")]
public string Remark { get; set; } public string Remark { get; set; }

1
AMESCoreStudio.Web/Views/WHS/WHS022U.cshtml

@ -33,6 +33,7 @@
<div class="form-group form-inline my-sm-1"> <div class="form-group form-inline my-sm-1">
<label asp-for="UnitNo" class="control-label col-sm-3"></label> <label asp-for="UnitNo" class="control-label col-sm-3"></label>
<select asp-for="UnitNo" asp-items="@ViewBag.FactoryUnit" class="custom-select col-sm-9" disabled></select> <select asp-for="UnitNo" asp-items="@ViewBag.FactoryUnit" class="custom-select col-sm-9" disabled></select>
<input type="hidden" asp-for="UnitNo" />
<span asp-validation-for="UnitNo" class="text-danger offset-sm-3 my-sm-1"></span> <span asp-validation-for="UnitNo" class="text-danger offset-sm-3 my-sm-1"></span>
</div> </div>
<span style="color: firebrick;word-break: break-all;" class="text-danger offset-sm-3">@Html.ValidationMessage("error")</span> <span style="color: firebrick;word-break: break-all;" class="text-danger offset-sm-3">@Html.ValidationMessage("error")</span>

1
AMESCoreStudio.Web/Views/WHS/WHS023U.cshtml

@ -16,6 +16,7 @@
<form enctype="multipart/form-data" method="post" asp-action="WHS023USave"> <form enctype="multipart/form-data" method="post" asp-action="WHS023USave">
<div asp-validation-summary="ModelOnly" class="text-danger"></div> <div asp-validation-summary="ModelOnly" class="text-danger"></div>
<input type="hidden" asp-for="WorkingLineID" /> <input type="hidden" asp-for="WorkingLineID" />
<input type="hidden" asp-for="WorkingUnitID" />
<input type="hidden" asp-for="StatusNo" /> <input type="hidden" asp-for="StatusNo" />
<input type="hidden" asp-for="CreateDate" /> <input type="hidden" asp-for="CreateDate" />
<input type="hidden" asp-for="CreateUserID" /> <input type="hidden" asp-for="CreateUserID" />

16
AMESCoreStudio.Web/Views/WHS/WHS024.cshtml

@ -1,5 +1,5 @@
@{ @{
ViewData["Title"] = "報工工作站基本資料"; ViewData["Title"] = "報工站基本資料";
Layout = "~/Views/Shared/_AMESLayout.cshtml"; Layout = "~/Views/Shared/_AMESLayout.cshtml";
} }
@ -49,11 +49,11 @@
{ {
field: 'workingStationName', field: 'workingStationName',
width: 300, width: 300,
title: '報工工作站別名稱' title: '報工站別名稱'
}, },
{ {
field: 'workingStationDesc', field: 'workingStationDesc',
title: '報工工作站敘述', title: '報工站敘述',
}, },
{ {
field: 'typeNo', field: 'typeNo',
@ -86,7 +86,7 @@
//通过行tool編輯,lay-event="edit" //通过行tool編輯,lay-event="edit"
function edit(obj) { function edit(obj) {
if (obj.data.workingStationID) { if (obj.data.workingStationID) {
hg.open('修改報工工作站', '/WHS/WHS024U/' + obj.data.workingStationID, 640,480); hg.open('修改報工站', '/WHS/WHS024U/' + obj.data.workingStationID, 640,480);
} }
} }
@ -96,7 +96,7 @@
str = '停用'; str = '停用';
else else
str = '啟用'; str = '啟用';
hg.confirm("報工工作站別名稱:" + obj.data.workingStationName + ",確定要" + str + "嗎?", function () { hg.confirm("報工站別名稱:" + obj.data.workingStationName + ",確定要" + str + "嗎?", function () {
$.ajax({ $.ajax({
url: '/WHS/WHS024D', url: '/WHS/WHS024D',
data: { id: obj.data.workingStationID }, data: { id: obj.data.workingStationID },
@ -124,7 +124,7 @@
layuiicon: '&#xe608;', layuiicon: '&#xe608;',
class: 'layui-btn-normal', class: 'layui-btn-normal',
handler: function () { handler: function () {
hg.open('新增報工工作站別', '/WHS/WHS024C', 640, 480); hg.open('新增報工站別', '/WHS/WHS024C', 640, 480);
} }
} }
@ -143,9 +143,9 @@
//基本資料表格 //基本資料表格
function tt() { function tt() {
var unit = $("#unitNo").val(); var unit = $("#unitNo").val();
table = hg.table.datatable('test', '報工工作站別維護', '/WHS/GetWorkingStations?id=' + unit table = hg.table.datatable('test', '報工站別維護', '/WHS/GetWorkingStations?id=' + unit
, {}, tableCols, toolbar, true, 'full-100', ['filter', 'print', 'exports']); , {}, tableCols, toolbar, true, 'full-100', ['filter', 'print', 'exports']);
} }
// var table = hg.table.datatable('test', '報工工作站別維護', '/WHS/GetWorkingStations', {}, tableCols, toolbar, true, 'full-100', ['filter', 'print', 'exports']); // var table = hg.table.datatable('test', '報工站別維護', '/WHS/GetWorkingStations', {}, tableCols, toolbar, true, 'full-100', ['filter', 'print', 'exports']);
</script> </script>
} }

1
AMESCoreStudio.Web/Views/WHS/WHS024U.cshtml

@ -16,6 +16,7 @@
<form enctype="multipart/form-data" method="post" asp-action="WHS024USave"> <form enctype="multipart/form-data" method="post" asp-action="WHS024USave">
<div asp-validation-summary="ModelOnly" class="text-danger"></div> <div asp-validation-summary="ModelOnly" class="text-danger"></div>
<input type="hidden" asp-for="WorkingStationID" /> <input type="hidden" asp-for="WorkingStationID" />
<input type="hidden" asp-for="WorkingUnitID" />
<input type="hidden" asp-for="StatusNo" /> <input type="hidden" asp-for="StatusNo" />
<input type="hidden" asp-for="CreateUserID" /> <input type="hidden" asp-for="CreateUserID" />
<input type="hidden" asp-for="CreateDate" /> <input type="hidden" asp-for="CreateDate" />

1
AMESCoreStudio.Web/Views/WHS/WHS025U.cshtml

@ -15,6 +15,7 @@
<form enctype="multipart/form-data" method="post" asp-action="WHS025USave"> <form enctype="multipart/form-data" method="post" asp-action="WHS025USave">
<div asp-validation-summary="ModelOnly" class="text-danger"></div> <div asp-validation-summary="ModelOnly" class="text-danger"></div>
<input type="hidden" asp-for="WorkingStandardID" /> <input type="hidden" asp-for="WorkingStandardID" />
<input type="hidden" asp-for="WorkingUnitID" />
<input type="hidden" asp-for="CreateUserID" /> <input type="hidden" asp-for="CreateUserID" />
<input type="hidden" asp-for="UpdateUserID" value="0" /> <input type="hidden" asp-for="UpdateUserID" value="0" />
<input type="hidden" asp-for="CreateDate" /> <input type="hidden" asp-for="CreateDate" />

14
AMESCoreStudio.WebApi/Models/AMES/WorkingStation.cs

@ -5,35 +5,35 @@ using System.Runtime.Serialization;
namespace AMESCoreStudio.WebApi.Models.AMES namespace AMESCoreStudio.WebApi.Models.AMES
{ {
/// <summary> /// <summary>
/// 報工工作站基本資料 /// 報工站基本資料
/// </summary> /// </summary>
[Table("WORKING_STATIONS", Schema = "JHAMES")] [Table("WORKING_STATIONS", Schema = "JHAMES")]
public class WorkingStation public class WorkingStation
{ {
/// <summary> /// <summary>
/// 報工工作站ID /// 報工站ID
/// </summary> /// </summary>
[Key] [Key]
[Column("WORKING_STATION_ID")] [Column("WORKING_STATION_ID")]
[DataMember] [DataMember]
[Display(Name = "報工工作站ID")] [Display(Name = "報工站ID")]
public int WorkingStationID { get; set; } public int WorkingStationID { get; set; }
/// <summary> /// <summary>
/// 報工工作站名稱 /// 報工站名稱
/// </summary> /// </summary>
[Column("WORKING_STATION_NAME")] [Column("WORKING_STATION_NAME")]
[DataMember] [DataMember]
[Required(ErrorMessage = "{0} 不能空白")] [Required(ErrorMessage = "{0} 不能空白")]
[Display(Name = "報工工作站名稱")] [Display(Name = "報工站名稱")]
public string WorkingStationName { get; set; } public string WorkingStationName { get; set; }
/// <summary> /// <summary>
/// 報工工作站敘述 /// 報工站敘述
/// </summary> /// </summary>
[Column("WORKING_STATION_DESC")] [Column("WORKING_STATION_DESC")]
[DataMember] [DataMember]
[Required(ErrorMessage = "{0} 不能空白")] [Required(ErrorMessage = "{0} 不能空白")]
[Display(Name = "報工工作站敘述")] [Display(Name = "報工站敘述")]
public string WorkingStationDesc { get; set; } public string WorkingStationDesc { get; set; }
/// <summary> /// <summary>
/// 報工生產單位代碼 /// 報工生產單位代碼

Loading…
Cancel
Save