From 579582f3b657d96a30918de455477056a95f76e7 Mon Sep 17 00:00:00 2001 From: lvzb <35200379@qq.com> Date: Tue, 13 Oct 2020 08:20:09 +0800 Subject: [PATCH] =?UTF-8?q?=E9=94=A6=E5=B7=9E=E5=90=88=E5=B9=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + Controller/SCP_EXCEL_CONTROLLER.cs | 2 +- Controller/SCP_RECEIVE_CONTROLLER.cs | 20 +++-- Models/ScpEntity/V_TB_INVOICE.cs | 2 +- SCP/Views/SupplierData/SCP_ASK.aspx.cs | 6 +- .../SupplierData/SCP_RECEIVE_LIST.aspx.cs | 6 +- SCP/Views/WarehouseData/SCP_RECEIVE.aspx.cs | 4 +- .../WarehouseData/SCP_RECEIVE_DETAIL.aspx | 33 ++++---- .../WarehouseData/SCP_RECEIVE_DETAIL.aspx.cs | 19 +++-- .../SCP_RECEIVE_DETAIL.aspx.designer.cs | 82 ++++++++++++------- .../SupplierData/SCP_ASN_DETAIL.aspx | 2 +- .../SupplierData/SCP_ASN_DETAIL.aspx.cs | 4 +- .../SCP_SHIP_DETAIL_BARCODE.aspx.cs | 2 +- SCP/default.aspx | 5 +- 14 files changed, 102 insertions(+), 86 deletions(-) diff --git a/.gitignore b/.gitignore index 9ffdc7b..c9f2b1b 100644 --- a/.gitignore +++ b/.gitignore @@ -264,3 +264,4 @@ __pycache__/ /SCP/exportfiles/收货审核明细-20180530142739101.xls /SCP/exportfiles/收货审核明细-20180530142542391.xls /SCP/exportfiles +/SCP/grf diff --git a/Controller/SCP_EXCEL_CONTROLLER.cs b/Controller/SCP_EXCEL_CONTROLLER.cs index 013aca5..5c261b7 100644 --- a/Controller/SCP_EXCEL_CONTROLLER.cs +++ b/Controller/SCP_EXCEL_CONTROLLER.cs @@ -133,7 +133,7 @@ namespace CK.SCP.Controller po_detail.到货日期 = DateTime.Now.ToShortDateString(); po_detail.单位 = itm.PoUnit; po_detail.域名 = _po.Site; - po_detail.站点 = _po.Remark; + po_detail.站点 = _po.SubSite==null? _po.Site: _po.SubSite; po_detail.计划员 = _po.Buyer; po_detail.计划员电话 = _po.BuyerPhone; po_detail.价格 = itm.Price.ToString(); diff --git a/Controller/SCP_RECEIVE_CONTROLLER.cs b/Controller/SCP_RECEIVE_CONTROLLER.cs index ea6c4c7..0ea3505 100644 --- a/Controller/SCP_RECEIVE_CONTROLLER.cs +++ b/Controller/SCP_RECEIVE_CONTROLLER.cs @@ -183,6 +183,10 @@ namespace CK.SCP.Controller { q = q.Where(p => p.RecvBillNum.Contains(p_entity.RecvBillNum)); } + if (!string.IsNullOrEmpty(p_entity.ErpRecvBillNum)) + { + q = q.Where(p => p.ErpRecvBillNum.Contains(p_entity.ErpRecvBillNum)); + } if (!string.IsNullOrEmpty(p_entity.PoBillNum)) { q = q.Where(p => p.PoBillNum.Contains(p_entity.PoBillNum)); @@ -518,6 +522,10 @@ namespace CK.SCP.Controller { q = q.Where(p => p.RecvBillNum == p_entity.RecvBillNum); } + if (!string.IsNullOrEmpty(p_entity.ErpRecvBillNum)) + { + q = q.Where(p => p.ErpRecvBillNum == p_entity.ErpRecvBillNum); + } if (p_entity.PoLine != 0) { q = q.Where(p => p.PoLine == p_entity.PoLine); @@ -526,10 +534,6 @@ namespace CK.SCP.Controller { q = q.Where(p => p.PartCode.Contains(p_entity.PartCode)); } - if (!string.IsNullOrEmpty(p_entity.Site)) - { - q = q.Where(p => p.PartCode.Contains(p_entity.Site)); - } if (!string.IsNullOrEmpty(p_entity.Batch)) { q = q.Where(p => p.Batch.Contains(p_entity.Batch)); @@ -658,7 +662,7 @@ namespace CK.SCP.Controller if (p_state == ReceiveState.Check) { - var _ls = db.V_TB_RECEIVE.Where(p => p_list.Contains(p.RecvBillNum) && p.Site==p_site).ToList(); + var _ls = db.V_TB_RECEIVE.Where(p => p_list.Contains(p.ErpRecvBillNum) && p.Site==p_site).ToList(); int count = _ls.Count(p => p.State == (int)ReceiveState.Receive); if (count == _ls.Count && _ls.Count > 0) { @@ -666,7 +670,7 @@ namespace CK.SCP.Controller { p.OperName = userName; p.State = (int)ReceiveState.Check; - var _list = db.TB_RECEIVE_DETAIL_QAD.Where(itm => itm.RecvBillNum == p.RecvBillNum && itm.Site == p_site).ToList(); + var _list = db.TB_RECEIVE_DETAIL_QAD.Where(itm => itm.ErpRecvBillNum == p.ErpRecvBillNum && itm.Site == p_site).ToList(); _list.ForEach(itm => itm.State = (int)ReceiveState.Check); db.TB_RECEIVE_DETAIL_QAD.AddOrUpdate(itm => itm.UID, _list.ToArray()); #region 收货审核提醒供应商提起发票申请 @@ -707,7 +711,7 @@ namespace CK.SCP.Controller } if (p_state == ReceiveState.Reject) { - var _ls = db.V_TB_RECEIVE.Where(p => p_list.Contains(p.RecvBillNum) && p.Site == p_site).ToList(); + var _ls = db.V_TB_RECEIVE.Where(p => p_list.Contains(p.ErpRecvBillNum) && p.Site == p_site).ToList(); int count = _ls.Count(p => p.State == (int)ReceiveState.Receive); if (count == _ls.Count && _ls.Count > 0) { @@ -716,7 +720,7 @@ namespace CK.SCP.Controller p.OperName = userName; p.State = (int)ReceiveState.Reject; p.IsDeleted = true; - var _list = db.TB_RECEIVE_DETAIL_QAD.Where(itm => itm.RecvBillNum == p.RecvBillNum && p.Site == p_site).ToList(); + var _list = db.TB_RECEIVE_DETAIL_QAD.Where(itm => itm.ErpRecvBillNum == p.ErpRecvBillNum && p.Site == p_site).ToList(); _list.ForEach(itm => { itm.State = (int)ReceiveState.Reject; diff --git a/Models/ScpEntity/V_TB_INVOICE.cs b/Models/ScpEntity/V_TB_INVOICE.cs index 35bb58d..88d7193 100644 --- a/Models/ScpEntity/V_TB_INVOICE.cs +++ b/Models/ScpEntity/V_TB_INVOICE.cs @@ -66,7 +66,7 @@ namespace CK.SCP.Models.ScpEntity [StringLength(50)] public string DiscountRemark { get; set; } public bool IsRed { get; set; } - public decimal? MoldSharingPrice { get; set; } //分摊价格 + //public decimal? MoldSharingPrice { get; set; } //分摊价格 public string AskCreateUser { get; set; } //要货看板创建人 /// /// 采购价 diff --git a/SCP/Views/SupplierData/SCP_ASK.aspx.cs b/SCP/Views/SupplierData/SCP_ASK.aspx.cs index 59b57af..4e1ff19 100644 --- a/SCP/Views/SupplierData/SCP_ASK.aspx.cs +++ b/SCP/Views/SupplierData/SCP_ASK.aspx.cs @@ -118,12 +118,8 @@ namespace SCP.Views.SupplierData CurrentUser.VenderList = new List() { "00000000000" }; } _entity.UserInVendIds = CurrentUser.VenderList; + _entity.BillStateList = new List { (int)AskState.Confirm, (int)AskState.Release, (int)AskState.Ship, (int)AskState.Receive }; } - //if (CurrentUser.RoleList.Contains("供应商")) - //{ - // _entity.BillStateList = new List { (int)AskState.Confirm, (int)AskState.Release, (int)AskState.Ship, (int)AskState.Receive }; - //} - SCP_ASK_CONTROLLER.Get_V_TB_ASK_List(_entity, (_ret) => { if (_ret.State == ReturnStatus.Succeed) { diff --git a/SCP/Views/SupplierData/SCP_RECEIVE_LIST.aspx.cs b/SCP/Views/SupplierData/SCP_RECEIVE_LIST.aspx.cs index 3dd9145..f4024e1 100644 --- a/SCP/Views/SupplierData/SCP_RECEIVE_LIST.aspx.cs +++ b/SCP/Views/SupplierData/SCP_RECEIVE_LIST.aspx.cs @@ -73,9 +73,9 @@ namespace SCP.SupplierData public void LoadData() { // 每页记录数 - //Grid_V_TB_RECEIVE_LIST.PageSize = ConfigHelper.PageSize; - //ddlGridPageSize.SelectedValue = ConfigHelper.PageSize.ToString(); - //BindData(); + Grid_V_TB_RECEIVE_LIST.PageSize = ConfigHelper.PageSize; + ddlGridPageSize.SelectedValue = ConfigHelper.PageSize.ToString(); + BindData(); } private void SearchData(Action> p_action) { diff --git a/SCP/Views/WarehouseData/SCP_RECEIVE.aspx.cs b/SCP/Views/WarehouseData/SCP_RECEIVE.aspx.cs index 6d31c56..44d2d62 100644 --- a/SCP/Views/WarehouseData/SCP_RECEIVE.aspx.cs +++ b/SCP/Views/WarehouseData/SCP_RECEIVE.aspx.cs @@ -126,7 +126,7 @@ namespace SCP.WarehouseData } protected void Grid1_OnRowDoubleClick(object sender, GridRowClickEventArgs e) { - string ID = GetSelectedDataKey(Grid_V_TB_RECEIVE, 1); + string ID = GetSelectedDataKey(Grid_V_TB_RECEIVE, 2); string Site = GetSelectedDataKey(Grid_V_TB_RECEIVE, 4); string STATE = Grid_V_TB_RECEIVE.Rows[e.RowIndex].Values[0].ToString(); @@ -219,7 +219,7 @@ namespace SCP.WarehouseData return; } } - _ls.Add(rowDataKeys[1] as string); + _ls.Add(rowDataKeys[2] as string); var erpRec = rowDataKeys[2] as string; if (string.IsNullOrEmpty(erpRec)) { diff --git a/SCP/Views/WarehouseData/SCP_RECEIVE_DETAIL.aspx b/SCP/Views/WarehouseData/SCP_RECEIVE_DETAIL.aspx index 20c0e40..35dd935 100644 --- a/SCP/Views/WarehouseData/SCP_RECEIVE_DETAIL.aspx +++ b/SCP/Views/WarehouseData/SCP_RECEIVE_DETAIL.aspx @@ -18,7 +18,7 @@ - + @@ -28,37 +28,32 @@ - - - - - + + + - - - - + + + - - - - + + + + diff --git a/SCP/Views/WarehouseData/SCP_RECEIVE_DETAIL.aspx.cs b/SCP/Views/WarehouseData/SCP_RECEIVE_DETAIL.aspx.cs index 8e023f5..ea5b405 100644 --- a/SCP/Views/WarehouseData/SCP_RECEIVE_DETAIL.aspx.cs +++ b/SCP/Views/WarehouseData/SCP_RECEIVE_DETAIL.aspx.cs @@ -37,7 +37,7 @@ namespace SCP.WarehouseData public void LoadData() { var _receive = new V_TB_RECEIVE(); - _receive.RecvBillNum = GetQueryValue("ID"); + _receive.ErpRecvBillNum = GetQueryValue("ID"); _receive.UserInAddress = CurrentUser.FactoryList; if (GetQueryValue("STATE") != null) { @@ -50,6 +50,7 @@ namespace SCP.WarehouseData var _rec = ret.Result.FirstOrDefault(); txtState.Text = _rec.State_DESC; txtBillNo.Text = _rec.RecvBillNum; + txtErpBillNo.Text = _rec.ErpRecvBillNum; txtReceiveTime.Text = Convert.ToDateTime(_rec.ShipTime).ToString("yyyy-MM-dd"); txtShipBillNo.Text = _rec.AsnBillNum; txtPlanBillNo.Text = _rec.PoBillNum; @@ -65,7 +66,7 @@ namespace SCP.WarehouseData { var _receive = new V_TB_RECEIVE_DETAIL(); _receive.Site =CurrentUser.UsedDomain; - _receive.RecvBillNum = GetQueryValue("ID"); + _receive.ErpRecvBillNum = GetQueryValue("ID"); SCP_RECIVECE_CONTROLLER.Get_V_TB_RECEIVE_DETAIL_List(_receive, (ret) => { @@ -83,7 +84,7 @@ namespace SCP.WarehouseData public void BindData_View() { var _receive = new V_TB_RECEIVE_DETAIL(); - _receive.RecvBillNum = GetQueryValue("ID"); + _receive.ErpRecvBillNum = GetQueryValue("ID"); if (string.IsNullOrEmpty(Request["ID"].Trim())) { if (!string.IsNullOrEmpty("PartCode")) @@ -127,7 +128,7 @@ namespace SCP.WarehouseData protected void btnOutput_OnClick(object sender, EventArgs e) { var _receive = new V_TB_RECEIVE_DETAIL(); - _receive.RecvBillNum = GetQueryValue("ID"); + _receive.ErpRecvBillNum = GetQueryValue("ID"); _receive.Site = CurrentUser.UsedDomain; SCP_RECIVECE_CONTROLLER.Get_V_TB_RECEIVE_DETAIL_List(_receive, (ret) => { @@ -161,7 +162,7 @@ namespace SCP.WarehouseData { var _receive = new V_TB_RECEIVE(); - _receive.RecvBillNum = GetQueryValue("ID"); + _receive.ErpRecvBillNum = GetQueryValue("ID"); _receive.Site = GetQueryValue("Site"); if (GetQueryValue("STATE") != null) { @@ -203,7 +204,7 @@ namespace SCP.WarehouseData protected void btnBack_Click(object sender, EventArgs e) { var _receive = new V_TB_RECEIVE(); - _receive.RecvBillNum = GetQueryValue("ID"); + _receive.ErpRecvBillNum = GetQueryValue("ID"); _receive.Site =GetQueryValue("Site"); _receive.State = 1; SCP_RECIVECE_CONTROLLER.Get_V_TB_RECEIVE_List(_receive, (ret) => @@ -215,14 +216,14 @@ namespace SCP.WarehouseData { if (_rec != null) { - int _count=SCPDB.TB_INVOICE_DETAIL.Where(p => p.RecvBillNum == _rec.RecvBillNum && p.PoBillNum == _rec.PoBillNum).Count(); + int _count=SCPDB.TB_INVOICE_DETAIL.Where(p => p.ErpRecvBillNum == _rec.ErpRecvBillNum && p.PoBillNum == _rec.PoBillNum).Count(); if (_count > 0) { Alert.Show("不能取消已经开票!"); return; } - var rec = SCPDB.TB_RECEIVE_QAD.Where(p => p.RecvBillNum == _rec.RecvBillNum && p.Site == _rec.Site).FirstOrDefault(); - var detail = SCPDB.TB_RECEIVE_DETAIL_QAD.Where(p => p.RecvBillNum == _rec.RecvBillNum && p.Remark == _rec.Site).ToArray(); + var rec = SCPDB.TB_RECEIVE_QAD.Where(p => p.ErpRecvBillNum == _rec.ErpRecvBillNum && p.Site == _rec.Site).FirstOrDefault(); + var detail = SCPDB.TB_RECEIVE_DETAIL_QAD.Where(p => p.ErpRecvBillNum == _rec.ErpRecvBillNum && p.Site == _rec.Site).ToArray(); if (rec != null) { rec.State = 0; diff --git a/SCP/Views/WarehouseData/SCP_RECEIVE_DETAIL.aspx.designer.cs b/SCP/Views/WarehouseData/SCP_RECEIVE_DETAIL.aspx.designer.cs index 2c83222..bca9dce 100644 --- a/SCP/Views/WarehouseData/SCP_RECEIVE_DETAIL.aspx.designer.cs +++ b/SCP/Views/WarehouseData/SCP_RECEIVE_DETAIL.aspx.designer.cs @@ -7,11 +7,13 @@ // //------------------------------------------------------------------------------ -namespace SCP.WarehouseData { - - - public partial class SCP_RECEIVE_DETAIL { - +namespace SCP.WarehouseData +{ + + + public partial class SCP_RECEIVE_DETAIL + { + /// /// form1 控件。 /// @@ -20,7 +22,7 @@ namespace SCP.WarehouseData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// /// Panel1 控件。 /// @@ -29,7 +31,7 @@ namespace SCP.WarehouseData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.Panel Panel1; - + /// /// Toolbar2 控件。 /// @@ -38,7 +40,7 @@ namespace SCP.WarehouseData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.Toolbar Toolbar2; - + /// /// Button1 控件。 /// @@ -47,7 +49,7 @@ namespace SCP.WarehouseData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.Button Button1; - + /// /// btnDelete 控件。 /// @@ -56,7 +58,7 @@ namespace SCP.WarehouseData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.Button btnDelete; - + /// /// btnBack 控件。 /// @@ -65,7 +67,7 @@ namespace SCP.WarehouseData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.Button btnBack; - + /// /// F_PO_DETAIL 控件。 /// @@ -74,25 +76,34 @@ namespace SCP.WarehouseData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.FormRow F_PO_DETAIL; - + /// - /// txtBillNo 控件。 + /// txtState 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUI.TextBox txtBillNo; - + protected global::FineUI.TextBox txtState; + /// - /// txtShipBillNo 控件。 + /// txtErpBillNo 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUI.TextBox txtShipBillNo; - + protected global::FineUI.TextBox txtErpBillNo; + + /// + /// txtBillNo 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.TextBox txtBillNo; + /// /// txtPlanBillNo 控件。 /// @@ -101,16 +112,16 @@ namespace SCP.WarehouseData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.TextBox txtPlanBillNo; - + /// - /// txtState 控件。 + /// txtShipBillNo 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUI.TextBox txtState; - + protected global::FineUI.TextBox txtShipBillNo; + /// /// txtSupplierName 控件。 /// @@ -119,7 +130,7 @@ namespace SCP.WarehouseData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.TextBox txtSupplierName; - + /// /// txtDeliveryAddress 控件。 /// @@ -128,7 +139,7 @@ namespace SCP.WarehouseData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.TextBox txtDeliveryAddress; - + /// /// txtReceiveTime 控件。 /// @@ -137,7 +148,7 @@ namespace SCP.WarehouseData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.TextBox txtReceiveTime; - + /// /// txtUserName 控件。 /// @@ -146,7 +157,7 @@ namespace SCP.WarehouseData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.TextBox txtUserName; - + /// /// txtMemo 控件。 /// @@ -155,7 +166,7 @@ namespace SCP.WarehouseData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.TextBox txtMemo; - + /// /// TextBox2 控件。 /// @@ -164,7 +175,16 @@ namespace SCP.WarehouseData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.Label TextBox2; - + + /// + /// TextBox3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.Label TextBox3; + /// /// btnOutput 控件。 /// @@ -173,7 +193,7 @@ namespace SCP.WarehouseData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.Button btnOutput; - + /// /// Grid_V_TB_RECEIVE_DETAIL 控件。 /// @@ -182,7 +202,7 @@ namespace SCP.WarehouseData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.Grid Grid_V_TB_RECEIVE_DETAIL; - + /// /// Window1 控件。 /// @@ -191,7 +211,7 @@ namespace SCP.WarehouseData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUI.Window Window1; - + /// /// WindowUpload 控件。 /// diff --git a/SCP/Views/锦州锦恒/SupplierData/SCP_ASN_DETAIL.aspx b/SCP/Views/锦州锦恒/SupplierData/SCP_ASN_DETAIL.aspx index 735b8c9..5a71f43 100644 --- a/SCP/Views/锦州锦恒/SupplierData/SCP_ASN_DETAIL.aspx +++ b/SCP/Views/锦州锦恒/SupplierData/SCP_ASN_DETAIL.aspx @@ -65,7 +65,7 @@ - +