From 64c180b977d8b88417a060082d0315f0e173202d Mon Sep 17 00:00:00 2001 From: lvzb <35200379@qq.com> Date: Thu, 14 Jan 2021 12:38:47 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=98=E7=9B=98=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Controller/SCP_BARCODE_CONTROLLER.cs | 4 ++-- Controller/SCP_V_TA_VEND_PART_CONTROLLER.cs | 9 ++++++++- Models/ScpCache.cs | 3 ++- Models/ScpEntity/V_TA_VEND_PART.cs | 6 ++++++ SCP/Views/BasicData/SCP_TA_VEND_PART.aspx.cs | 5 +++++ 5 files changed, 23 insertions(+), 4 deletions(-) diff --git a/Controller/SCP_BARCODE_CONTROLLER.cs b/Controller/SCP_BARCODE_CONTROLLER.cs index bd80073..41741c6 100644 --- a/Controller/SCP_BARCODE_CONTROLLER.cs +++ b/Controller/SCP_BARCODE_CONTROLLER.cs @@ -1203,7 +1203,7 @@ namespace CK.SCP.Controller private static string GetLastPalletsBarCode(string partcode, string batch, int lastnum) { - var barcode = "G."; + var barcode = string.Empty; barcode += partcode + ScpCache.Config.条码分隔符; if (ScpCache.Config.条码包含供应商简称) @@ -1214,7 +1214,7 @@ namespace CK.SCP.Controller { barcode += batch + ScpCache.Config.条码分隔符; } - barcode += lastnum.ToString(ScpCache.Config.条码序列号格式); + barcode += lastnum.ToString(ScpCache.Config.托码序列号格式); return barcode; } private static string GetLastSmallBarCode(string partcode, string batch, int lastnum) diff --git a/Controller/SCP_V_TA_VEND_PART_CONTROLLER.cs b/Controller/SCP_V_TA_VEND_PART_CONTROLLER.cs index 6db144a..0a2d5c7 100644 --- a/Controller/SCP_V_TA_VEND_PART_CONTROLLER.cs +++ b/Controller/SCP_V_TA_VEND_PART_CONTROLLER.cs @@ -71,7 +71,14 @@ namespace CK.SCP.Controller { q = q.Where(p => p.PartDesc.Contains(p_entity.PartDesc)); } - + if (p_entity.UserInAddress != null && p_entity.UserInAddress.Count > 0) + { + q = q.Where(p => p_entity.UserInAddress.Contains(p.Site)); + } + if (p_entity.UserInVendIds != null && p_entity.UserInVendIds.Count > 0) + { + q = q.Where(p => p_entity.UserInVendIds.Contains(p.VendId)); + } _ret.State = ReturnStatus.Succeed; _ret.Result = q; diff --git a/Models/ScpCache.cs b/Models/ScpCache.cs index 2719b9e..6d305f3 100644 --- a/Models/ScpCache.cs +++ b/Models/ScpCache.cs @@ -313,7 +313,8 @@ namespace CK.SCP.Models public bool 鏉$爜鍖呭惈渚涘簲鍟嗙畝绉 { get; set; } = false; public string 浜岀淮鐮佹牸寮 { get; set; } = "1"; - public string 鏉$爜搴忓垪鍙锋牸寮 { get; set; } = "000000"; + public string 鏉$爜搴忓垪鍙锋牸寮 { get; set; } = "000000"; + public string 鎵樼爜搴忓垪鍙锋牸寮 { get; set; } = "700000"; public string 灏忓寘瑁呮潯鐮佸簭鍒楀彿鏍煎紡 { get; set; } = "600000"; public bool 璐熸暟鍙戠エ { get; set; } = false; } diff --git a/Models/ScpEntity/V_TA_VEND_PART.cs b/Models/ScpEntity/V_TA_VEND_PART.cs index 56e93dc..415288c 100644 --- a/Models/ScpEntity/V_TA_VEND_PART.cs +++ b/Models/ScpEntity/V_TA_VEND_PART.cs @@ -36,5 +36,11 @@ namespace CK.SCP.Models.ScpEntity public string ProjectId { get; set; } [NotMapped] public string PartDesc { get; set; } + [NotMapped] + public List UserInAddress { set; get; } + + [NotMapped] + public List UserInVendIds { set; get; } + } } diff --git a/SCP/Views/BasicData/SCP_TA_VEND_PART.aspx.cs b/SCP/Views/BasicData/SCP_TA_VEND_PART.aspx.cs index 097851b..ae146ea 100644 --- a/SCP/Views/BasicData/SCP_TA_VEND_PART.aspx.cs +++ b/SCP/Views/BasicData/SCP_TA_VEND_PART.aspx.cs @@ -44,6 +44,11 @@ namespace SCP.Views.BasicData _entity.VendId = txtVendId.Text; _entity.PartCode = txtPartCode.Text; _entity.ProjectId = txtVendId.Text; + if (!CurrentUser.RoleList.Contains("绠$悊鍛")) + { + _entity.UserInAddress = CurrentUser.FactoryList; + _entity.UserInVendIds = CurrentUser.VenderList; + } SCP_V_TA_VEND_PART_CONTROLLER.Get_V_TA_VEND_PART_List(_entity, (rs) => { if (rs.State == ReturnStatus.Succeed) {