From ac780c7ff49aa03a24fbd29d32b5210658013f83 Mon Sep 17 00:00:00 2001 From: "BB.Wang" Date: Thu, 2 Feb 2023 09:49:44 +0800 Subject: [PATCH] =?UTF-8?q?1.=20Yiru=E5=A2=9E=E5=8A=A0TE=E6=89=80=E9=9C=80?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E4=B9=8BWEBAPI=20(POWER=20CORD)=202.=20Yiru?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=85=A5=E5=BA=AB=E5=96=AE=E5=8F=8A=E5=AE=8C?= =?UTF-8?q?=E5=B7=A5=E5=85=A5=E5=BA=AB=E5=BA=AB=E5=88=A5=E5=8F=AF=E8=BC=B8?= =?UTF-8?q?=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AMESCoreStudio.Web/Views/PCS/PCS031.cshtml | 19 +++++++++++++++++-- .../AMES/FqcInhouseMasterController.cs | 3 ++- .../DTO/AMES/FqcInhouseMaster_WareDto.cs | 8 ++++++++ .../Models/AMES/FqcInhouseMaster.cs | 9 +++++++++ .../Models/AMES/WareHouseing.cs | 11 ++++++++++- AMESCoreStudio.WebApi/Models/AMESContext.cs | 8 +++++++- 6 files changed, 53 insertions(+), 5 deletions(-) diff --git a/AMESCoreStudio.Web/Views/PCS/PCS031.cshtml b/AMESCoreStudio.Web/Views/PCS/PCS031.cshtml index 7bf437a8..026a7ece 100644 --- a/AMESCoreStudio.Web/Views/PCS/PCS031.cshtml +++ b/AMESCoreStudio.Web/Views/PCS/PCS031.cshtml @@ -68,6 +68,7 @@
+
@@ -187,6 +188,20 @@ sort: true, templet: '
{{ layui.util.toDateString(d.endTime, "yyyy/MM/dd") }}
' }, + { + field: 'locationNo', + width: 150, + title: '庫別', + fixed: 'right', + edit: 'text', + templet: function (d) { + var txt = '
'; + if (d.locationNo != null) + txt = d.locationNo; + return txt; + } + + }, { field: 'recordNumber', width: 150, @@ -255,7 +270,7 @@ hg.confirm("送驗單號_箱號:【" + obj.data.inhouseNo + "_" + obj.data.serialNo+ "】,確定要入庫嗎?", function () { $.ajax({ url: '/PCS/PCS031inhouse', - data: { InhouseNo: obj.data.inhouseNo, boxNo: obj.data.serialNo, seq: obj.data.seqID, recordNumber: obj.data.recordNumber }, + data: { InhouseNo: obj.data.inhouseNo, boxNo: obj.data.serialNo, seq: obj.data.seqID, recordNumber: obj.data.recordNumber, locationNo: obj.data.locationNo }, type: 'POST', success: function (data) { if (data.success) { @@ -285,7 +300,7 @@ hg.confirm("批量入庫所有选中的数据,確定要入庫吗?", function () { $.ajax({ url: '/PCS/PCS031inhouse_all', - data: { ids: obj.checkstatus.data.map(function (x) { return x.inhouseNo + "," + x.serialNo + "," + x.seqID + "," + x.recordNumber }) }, + data: { ids: obj.checkstatus.data.map(function (x) { return x.inhouseNo + "," + x.serialNo + "," + x.seqID + "," + x.recordNumber + "," + x.locationNO }) }, type: 'POST', success: function (data) { if (data.success) { diff --git a/AMESCoreStudio.WebApi/Controllers/AMES/FqcInhouseMasterController.cs b/AMESCoreStudio.WebApi/Controllers/AMES/FqcInhouseMasterController.cs index 165107cd..46c0702a 100644 --- a/AMESCoreStudio.WebApi/Controllers/AMES/FqcInhouseMasterController.cs +++ b/AMESCoreStudio.WebApi/Controllers/AMES/FqcInhouseMasterController.cs @@ -518,7 +518,8 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES CreateDate = q1.CreateDate, EndTime = q3.EndTime, RecordNumber = q402.RecordNumber, - RecordDate = q402.Create_Date + RecordDate = q402.Create_Date, + LocationNo = q1.LocationNo }; //q1.Status == "P" ? "允收" : q1.Status == "R" ? "批退" : "未驗收完成", //IQueryable q1 = _context.FqcInhouseDetails; diff --git a/AMESCoreStudio.WebApi/DTO/AMES/FqcInhouseMaster_WareDto.cs b/AMESCoreStudio.WebApi/DTO/AMES/FqcInhouseMaster_WareDto.cs index b550ac13..0fce225c 100644 --- a/AMESCoreStudio.WebApi/DTO/AMES/FqcInhouseMaster_WareDto.cs +++ b/AMESCoreStudio.WebApi/DTO/AMES/FqcInhouseMaster_WareDto.cs @@ -123,5 +123,13 @@ namespace AMESCoreStudio.WebApi.DTO.AMES [DataMember] [Display(Name = "Record日期")] public DateTime? RecordDate { get; set; } + + /// + /// 庫別 + /// + [DataMember] + [Display(Name = "入庫單號")] + public string LocationNo { get; set; } + } } diff --git a/AMESCoreStudio.WebApi/Models/AMES/FqcInhouseMaster.cs b/AMESCoreStudio.WebApi/Models/AMES/FqcInhouseMaster.cs index 04f7e3d3..9172450e 100644 --- a/AMESCoreStudio.WebApi/Models/AMES/FqcInhouseMaster.cs +++ b/AMESCoreStudio.WebApi/Models/AMES/FqcInhouseMaster.cs @@ -211,5 +211,14 @@ namespace AMESCoreStudio.WebApi.Models.AMES [DataMember] public DateTime? UpdateDate { get; set; } = DateTime.Now; + /// + /// 庫別 + /// + [DataMember] + [Display(Name = "庫別")] + [Column("LOCATION_NO")] + [StringLength(5)] + public string LocationNo { get; set; } + } } diff --git a/AMESCoreStudio.WebApi/Models/AMES/WareHouseing.cs b/AMESCoreStudio.WebApi/Models/AMES/WareHouseing.cs index 724a0979..7f59e1cb 100644 --- a/AMESCoreStudio.WebApi/Models/AMES/WareHouseing.cs +++ b/AMESCoreStudio.WebApi/Models/AMES/WareHouseing.cs @@ -69,12 +69,21 @@ namespace AMESCoreStudio.WebApi.Models.AMES public decimal Create_UserID { get; set; } - + /// + /// + /// [Column("CREATE_DATE")] [DataMember] [Display(Name = "建立日期")] public DateTime Create_Date { get; set; } = DateTime.Now; + /// + /// + /// + [Column("LOCATION_NO")] + [DataMember] + [Display(Name = "庫別")] + public string LocationNo { get; set; } } } diff --git a/AMESCoreStudio.WebApi/Models/AMESContext.cs b/AMESCoreStudio.WebApi/Models/AMESContext.cs index 4021420e..f28e4435 100644 --- a/AMESCoreStudio.WebApi/Models/AMESContext.cs +++ b/AMESCoreStudio.WebApi/Models/AMESContext.cs @@ -132,7 +132,8 @@ namespace AMESCoreStudio.WebApi modelBuilder.Entity().HasKey(c => new { c.InhouseNo, c.SeqID, c.SerialNo }); modelBuilder.Entity().HasKey(c => new { c.OutfitFactoryID }); modelBuilder.Entity().HasKey(c => new { c.OutfitID }); - modelBuilder.Entity().HasKey(c => new { c.SerialNumber,c.ReprintTime}); + modelBuilder.Entity().HasKey(c => new { c.SerialNumber,c.ReprintTime}); + modelBuilder.Entity().HasNoKey(); //Yiru End --------------------------------------------------------------------------------------------------------------------------- @@ -912,6 +913,11 @@ namespace AMESCoreStudio.WebApi /// SOP資訊 - SOP類型為暫行文件 /// public virtual DbSet CTempSops { get; set; } + + /// yiru add + /// 工單發料資料 + /// + public DbSet CZmomaterialLists { get; set; } } }