diff --git a/.gitignore b/.gitignore index c9f2b1b..96d0132 100644 --- a/.gitignore +++ b/.gitignore @@ -265,3 +265,4 @@ __pycache__/ /SCP/exportfiles/收货审核明细-20180530142542391.xls /SCP/exportfiles /SCP/grf +/SCP/uploadfiles diff --git a/Controller/SCP_EXCEL_CONTROLLER.cs b/Controller/SCP_EXCEL_CONTROLLER.cs index 5c261b7..cb77c5a 100644 --- a/Controller/SCP_EXCEL_CONTROLLER.cs +++ b/Controller/SCP_EXCEL_CONTROLLER.cs @@ -337,7 +337,7 @@ namespace CK.SCP.Controller _entity.单价 = itm.Price.ToString(); _entity.采购价 = itm.PurCost==null?"0":itm.PurCost.Value.ToString(); _entity.成本价= itm.StdCost == null ? "0" : itm.StdCost.Value.ToString(); - // _entity.要货日期 = itm.BeginTime == null ? string.Empty : itm.BeginTime.Value.ToString("yyyyMMdd"); + _entity.收货日期 = itm.UpdateTime == null ? string.Empty : itm.UpdateTime.Value.ToString("yyyyMMdd"); //_entity.折扣价格 = itm.DiscountPrice.ToString(); //_entity.折扣备注 = itm.DiscountRemark; diff --git a/Controller/SCP_REPORT_CONTROLLER.cs b/Controller/SCP_REPORT_CONTROLLER.cs index 4755dca..5b01e33 100644 --- a/Controller/SCP_REPORT_CONTROLLER.cs +++ b/Controller/SCP_REPORT_CONTROLLER.cs @@ -1796,5 +1796,99 @@ namespace CK.SCP.Controller _buffer.Append(" GROUP BY Site, ProjectId, RecTime, flag"); return _buffer.ToString(); } + public static void Get_V_ARRIVE_PO_REPORT(V_ARRIVE_PO_REPORT p_entity, Action>> p_action) + { + ResultObject> _ret = new ResultObject>(); + try + { + using (ScpEntities db = EntitiesFactory.CreateScpInstance()) + { + IQueryable q = db.V_ARRIVE_PO_REPORT; + if (!string.IsNullOrEmpty(p_entity.PoBillNum)) + { + q = q.Where(p => p.PoBillNum.Contains(p_entity.PoBillNum)); + } + if (!string.IsNullOrEmpty(p_entity.PartCode)) + { + q = q.Where(p => p.PartCode.Contains(p_entity.PartCode)); + } + if (!string.IsNullOrEmpty(p_entity.PartDesc1)) + { + q = q.Where(p => p.PartDesc1.Contains(p_entity.PartDesc1)); + } + if (!string.IsNullOrEmpty(p_entity.PartDesc1)) + { + q = q.Where(p => p.PartDesc1.Contains(p_entity.PartDesc1)); + } + if (!string.IsNullOrEmpty(p_entity.VendName)) + { + q = q.Where(p => p.VendName.Contains(p_entity.VendName)); + } + if (p_entity.BeginTime != null) + { + q = q.Where(p => p.BeginTime >= p_entity.BeginTime); + } + if (p_entity.BeginTimeEnd != null) + { + q = q.Where(p => p.BeginTime <= p_entity.BeginTimeEnd); + } + if (p_entity.ShipTime != null) + { + q = q.Where(p => p.ShipTime >= p_entity.ShipTime); + } + if (p_entity.ShipTimeEnd != null) + { + q = q.Where(p => p.ShipTime <= p_entity.ShipTimeEnd); + } + _ret.State = ReturnStatus.Succeed; + _ret.Result = q; + p_action(_ret); + } + } + catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 + { + var sb = new StringBuilder(); + foreach (var error in dbEx.EntityValidationErrors.ToList()) + { + error.ValidationErrors.ToList().ForEach(i => + { + sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); + }); + } + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(dbEx); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_REPORT_CONTROLLER), "Get_V_ARRIVE_PO_REPORT", sb.ToString()); + throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); + } + catch (OptimisticConcurrencyException ex)//并发冲突异常 + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_REPORT_CONTROLLER), "Get_V_ARRIVE_PO_REPORT", ex.ToString()); + throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); + } + catch (ScpException ex) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(ex); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_REPORT_CONTROLLER), "Get_V_ARRIVE_PO_REPORT", ex.ToString()); + if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) + { + var inner = (UpdateException)ex.InnerException; + throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); + } + else + { + if (ex.InnerException != null) throw ex.InnerException; + } + } + catch (Exception e) + { + _ret.State = ReturnStatus.Failed; + _ret.ErrorList.Add(e); + LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_REPORT_CONTROLLER), "Get_V_ARRIVE_PO_REPORT", e.Message); + throw e; + } + } } } diff --git a/Models/CK.SCP.Models.csproj b/Models/CK.SCP.Models.csproj index de1bb5e..cec1a00 100644 --- a/Models/CK.SCP.Models.csproj +++ b/Models/CK.SCP.Models.csproj @@ -378,6 +378,7 @@ + diff --git a/Models/ScpCache.cs b/Models/ScpCache.cs index 54bdce4..feb222c 100644 --- a/Models/ScpCache.cs +++ b/Models/ScpCache.cs @@ -315,5 +315,6 @@ namespace CK.SCP.Models public string 二维码格式 { get; set; } = "1"; public string 条码序列号格式 { get; set; } = "000000"; public string 小包装条码序列号格式 { get; set; } = "600000"; + public bool 负数发票 { get; set; } = false; } } \ No newline at end of file diff --git a/Models/ScpEntities.cs b/Models/ScpEntities.cs index 35b4ec1..e567092 100644 --- a/Models/ScpEntities.cs +++ b/Models/ScpEntities.cs @@ -106,6 +106,7 @@ namespace CK.SCP.Models public virtual DbSet V_TA_VENDER { get; set; } public virtual DbSet V_TB_INCOMPLETE_ASK { get; set; } + public virtual DbSet V_ARRIVE_PO_REPORT { get; set; } public virtual DbSet V_TB_PALLET_DETAIL { get; set; } public virtual DbSet V_TB_PALLET { get; set; } public virtual DbSet TB_PALLET_DETAIL { get; set; } diff --git a/Models/ScpEntity/ExcelExportEnttity/SCP_INVOICE_DETAIL_EXPORT.cs b/Models/ScpEntity/ExcelExportEnttity/SCP_INVOICE_DETAIL_EXPORT.cs index 12be3d8..645520b 100644 --- a/Models/ScpEntity/ExcelExportEnttity/SCP_INVOICE_DETAIL_EXPORT.cs +++ b/Models/ScpEntity/ExcelExportEnttity/SCP_INVOICE_DETAIL_EXPORT.cs @@ -26,7 +26,7 @@ namespace CK.SCP.Models.ScpEntity.ExcelExportEnttity public string 采购价 { get; set; } public string 成本价 { get; set; } - public string 要货日期 { get; set; }//BeginTime + public string 收货日期 { get; set; } public string 开票数量 { get; set; }//Qty public string 备注 { get; set; }//Remark diff --git a/Models/ScpEntity/V_ARRIVE_PO_REPORT.cs b/Models/ScpEntity/V_ARRIVE_PO_REPORT.cs new file mode 100644 index 0000000..611d75b --- /dev/null +++ b/Models/ScpEntity/V_ARRIVE_PO_REPORT.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +namespace CK.SCP.Models.ScpEntity +{ + public partial class V_ARRIVE_PO_REPORT + { + [Key ] + [Column(Order = 1)] + [StringLength(50)] + public string PoBillNum { get; set; } + [Key] + [Column(Order = 2)] + public int PoLine { get; set; } + [Key] + [Column(Order = 3)] + [StringLength(50)] + public string PartCode { get; set; } + [StringLength(50)] + public string PartDesc1 { get; set; } + [StringLength(50)] + public string VendName { get; set; } + public decimal PlanQty { get; set; } + public DateTime BeginTime { get; set; } + public decimal CanQty { get; set; } + public decimal AskQty { get; set; } + public decimal AsnQty { get; set; } + public decimal OnRoadQty { get; set; } + public decimal ArriveQty { get; set; } + [Key] + [Column(Order = 4)] + public DateTime ShipTime { get; set; } + [NotMapped] + public DateTime? BeginTimeEnd { get; set; } + [NotMapped] + public DateTime? ShipTimeEnd { get; set; } + } +} diff --git a/Models/UniApiEntity/xxqad_pt_mstr.cs b/Models/UniApiEntity/xxqad_pt_mstr.cs index 311fba1..4a65a29 100644 --- a/Models/UniApiEntity/xxqad_pt_mstr.cs +++ b/Models/UniApiEntity/xxqad_pt_mstr.cs @@ -25,7 +25,7 @@ namespace CK.SCP.Models.UniApiEntity public string xxqad_pt_site { get; set; } [Required(AllowEmptyStrings = true)] - [StringLength(2)] + [StringLength(4)] public string xxqad_pt_um { get; set; } [Required(AllowEmptyStrings = true)] diff --git a/Models/UniApiEntity/xxwms_rc_det.cs b/Models/UniApiEntity/xxwms_rc_det.cs index 282b8cd..cd7ddd8 100644 --- a/Models/UniApiEntity/xxwms_rc_det.cs +++ b/Models/UniApiEntity/xxwms_rc_det.cs @@ -20,7 +20,7 @@ namespace CK.SCP.Models.UniApiEntity public string xxwms_rc_ps_nbr { get; set; } [Required(AllowEmptyStrings = true)] - [StringLength(8)] + [StringLength(50)] public string xxwms_rc_po_nbr { get; set; } public int xxwms_rc_po_line { get; set; } @@ -38,7 +38,7 @@ namespace CK.SCP.Models.UniApiEntity public string xxwms_rc_site { get; set; } [Required(AllowEmptyStrings = true)] - [StringLength(8)] + [StringLength(50)] public string xxwms_rc_vend { get; set; } [StringLength(20)] diff --git a/SCP/SCP.csproj b/SCP/SCP.csproj index 6900504..03451e8 100644 --- a/SCP/SCP.csproj +++ b/SCP/SCP.csproj @@ -2933,6 +2933,7 @@ + @@ -5263,6 +5264,13 @@ SCP_UNI_API.aspx + + SCP_ARRIVE_REPORT.aspx + ASPXCodeBehind + + + SCP_ARRIVE_REPORT.aspx + SCP_OTD_REPORT.aspx ASPXCodeBehind diff --git a/SCP/Views/Report/SCP_ARRIVE_REPORT.aspx b/SCP/Views/Report/SCP_ARRIVE_REPORT.aspx new file mode 100644 index 0000000..6a7be91 --- /dev/null +++ b/SCP/Views/Report/SCP_ARRIVE_REPORT.aspx @@ -0,0 +1,95 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SCP_ARRIVE_REPORT.aspx.cs" Inherits="SCP.Views.Report.SCP_ARRIVE_REPORT" %> + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SCP/Views/Report/SCP_ARRIVE_REPORT.aspx.cs b/SCP/Views/Report/SCP_ARRIVE_REPORT.aspx.cs new file mode 100644 index 0000000..86a3964 --- /dev/null +++ b/SCP/Views/Report/SCP_ARRIVE_REPORT.aspx.cs @@ -0,0 +1,161 @@ +using CK.SCP.Controller; +using CK.SCP.Models.ScpEntity; +using FineUI; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace SCP.Views.Report +{ + public partial class SCP_ARRIVE_REPORT : PageBase + { + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + LoadData(); + } + } + public void LoadData() + { + BindData(); + } + public void BindData() + { + SearchV_TB_INCOMPLETE_ASKData((result) => { + GridView.RecordCount = result.Count(); + var list = SortAndPage(result, GridView); + GridView.DataSource = list; + GridView.DataBind(); + }); + } + public void SearchV_TB_INCOMPLETE_ASKData(Action> p_action) + { + V_ARRIVE_PO_REPORT _entity = new V_ARRIVE_PO_REPORT(); + if (TextPoBillNum.Text != null) + { + _entity.PoBillNum = TextPoBillNum.Text; + } + if (TextPartCode.Text != null) + { + _entity.PartCode = TextPartCode.Text; + } + if (TextPartDesc1.Text != null) + { + _entity.PartDesc1 = TextPartDesc1.Text; + } + if (TextVendName.Text != null) + { + _entity.VendName = TextVendName.Text; + } + if (DateBeginTimeB.SelectedDate != null) + { + _entity.BeginTime = (DateTime)DateBeginTimeB.SelectedDate; + } + if (DateBeginTimeE.SelectedDate != null) + { + _entity.BeginTimeEnd = (DateTime)DateBeginTimeE.SelectedDate; + } + if (DateShipTimeB.SelectedDate != null) + { + _entity.ShipTime = (DateTime)DateShipTimeB.SelectedDate; + } + if (DateShipTimeE.SelectedDate != null) + { + _entity.ShipTimeEnd = (DateTime)DateShipTimeE.SelectedDate; + } + SCP_REPORT_CONTROLLER.Get_V_ARRIVE_PO_REPORT(_entity, (_ret) => + { + if (_ret.State == ReturnStatus.Succeed) + { + p_action(_ret.Result); + } + }); + } + protected void ddlGridPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + GridView.PageSize = Convert.ToInt32(ddlGridPageSize.SelectedValue); + BindData(); + } + protected void Grid_V_ARRIVE_PO_REPORT_PageIndexChange(object sender, GridPageEventArgs e) + { + GridView.PageSize = Convert.ToInt32(ddlGridPageSize.SelectedValue); + BindData(); + } + protected void btnSearch_Click(object sender, EventArgs e) + { + BindData(); + } + protected void GridView_Sort(object sender, GridSortEventArgs e) + { + GridView.SortDirection = e.SortDirection; + GridView.SortField = e.SortField; + BindData(); + } + protected void btnOutput_Click(object sender, EventArgs e) + { + var _entity = new V_ARRIVE_PO_REPORT(); + if (TextPoBillNum.Text != null) + { + _entity.PoBillNum = TextPoBillNum.Text; + } + if (TextPartCode.Text != null) + { + _entity.PartCode = TextPartCode.Text; + } + if (TextPartDesc1.Text != null) + { + _entity.PartDesc1 = TextPartDesc1.Text; + } + if (TextVendName.Text != null) + { + _entity.VendName = TextVendName.Text; + } + if (DateBeginTimeB.SelectedDate != null) + { + _entity.BeginTime = (DateTime)DateBeginTimeB.SelectedDate; + } + if (DateBeginTimeE.SelectedDate != null) + { + _entity.BeginTimeEnd = (DateTime)DateBeginTimeE.SelectedDate; + } + if (DateShipTimeB.SelectedDate != null) + { + _entity.ShipTime = (DateTime)DateShipTimeB.SelectedDate; + } + if (DateShipTimeE.SelectedDate != null) + { + _entity.ShipTimeEnd = (DateTime)DateShipTimeE.SelectedDate; + } + SCP_REPORT_CONTROLLER.Get_V_ARRIVE_PO_REPORT(_entity, (ret) => + { + if (ret.State == ReturnStatus.Succeed) + { + Dictionary cellheader = new Dictionary + { + { "PoBillNum", "订单号" }, + { "PartCode", "零件编号" }, + { "PartDesc1", "零件名称" }, + { "PoLine", "订单行号" }, + { "VendName", "厂家名称" }, + { "PlanQty", "订单需求数量" }, + { "BeginTime", "订单需求日期" }, + { "CanQty", "订单未完成数量" }, + { "AskQty", "要货数量" }, + { "AsnQty", "发货数量" }, + { "OnRoadQty", "在途数量" }, + { "ArriveQty", "收货数量" }, + { "ShipTime", "实际收货日期" }, + + }; + + string url = EntityListToExcel2003(cellheader, ret.Result.ToList(), "未完成订单明细"); + } + }); + + } + } +} \ No newline at end of file diff --git a/SCP/Views/Report/SCP_ARRIVE_REPORT.aspx.designer.cs b/SCP/Views/Report/SCP_ARRIVE_REPORT.aspx.designer.cs new file mode 100644 index 0000000..e264aee --- /dev/null +++ b/SCP/Views/Report/SCP_ARRIVE_REPORT.aspx.designer.cs @@ -0,0 +1,224 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace SCP.Views.Report +{ + + + public partial class SCP_ARRIVE_REPORT + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.Panel Panel1; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.Toolbar Toolbar1; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.ToolbarSeparator ToolbarSeparator1; + + /// + /// btnRefresh 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.Button btnRefresh; + + /// + /// btnOutput 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.Button btnOutput; + + /// + /// extForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.Form extForm1; + + /// + /// FormRow_1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.FormRow FormRow_1; + + /// + /// TextPoBillNum 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.TextBox TextPoBillNum; + + /// + /// TextPartCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.TextBox TextPartCode; + + /// + /// TextPartDesc1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.TextBox TextPartDesc1; + + /// + /// TextVendName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.TextBox TextVendName; + + /// + /// FormRow2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.FormRow FormRow2; + + /// + /// DateBeginTimeB 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.DatePicker DateBeginTimeB; + + /// + /// DateBeginTimeE 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.DatePicker DateBeginTimeE; + + /// + /// DateShipTimeB 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.DatePicker DateShipTimeB; + + /// + /// DateShipTimeE 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.DatePicker DateShipTimeE; + + /// + /// FormRow_3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.FormRow FormRow_3; + + /// + /// btnQuery 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.Button btnQuery; + + /// + /// GridView 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.Grid GridView; + + /// + /// ToolbarSeparator2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.ToolbarSeparator ToolbarSeparator2; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.ToolbarText ToolbarText1; + + /// + /// ddlGridPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUI.DropDownList ddlGridPageSize; + } +} diff --git a/SCP/Views/SupplierData/SCP_RECEIVE_LIST.aspx b/SCP/Views/SupplierData/SCP_RECEIVE_LIST.aspx index a557aea..96913e9 100644 --- a/SCP/Views/SupplierData/SCP_RECEIVE_LIST.aspx +++ b/SCP/Views/SupplierData/SCP_RECEIVE_LIST.aspx @@ -119,12 +119,8 @@ - - - - - @@ -132,10 +128,10 @@ - + @@ -146,15 +142,15 @@ --%> - - - - - - - - - + + + + + + + + + @@ -166,15 +162,15 @@ - - - - + + + + - diff --git a/SCP/Views/SupplierData/SCP_RECEIVE_LIST.aspx.cs b/SCP/Views/SupplierData/SCP_RECEIVE_LIST.aspx.cs index d6a1a66..78e223e 100644 --- a/SCP/Views/SupplierData/SCP_RECEIVE_LIST.aspx.cs +++ b/SCP/Views/SupplierData/SCP_RECEIVE_LIST.aspx.cs @@ -13,6 +13,7 @@ using FineUI; using SCP.Code; using System.Drawing; using CK.SCP.Models.Enums; +using CK.SCP.Models; namespace SCP.SupplierData { @@ -302,20 +303,24 @@ namespace SCP.SupplierData } + if(!ScpCache.Config.负数发票) + { if (_total < 0) { Alert.Show("不允许开负数发票!退货、索赔零件数量有问题,请联系工厂库房和质量解决!"); return; } + } - if (IdList.Count > 200) - { - Alert.Show("选择零件记录超过,发票允许条数!"); - return; - } - if (_list.Distinct().Count() > 1) + if (IdList.Count > 1000) + { + Alert.Show("选择发票条数"+ IdList.Count + "超过1000条,发票允许条数!"); + return; + } + + if (_list.Distinct().Count() > 1) { Alert.Show("请选择的记录不是同一个供应商,请选择供应商!"); return; @@ -325,7 +330,7 @@ namespace SCP.SupplierData if (IDS != "") IDS = IDS.Substring(0, IDS.Length - 1); - if (CurrentUser.FactoryList.FirstOrDefault() != "BJCIAI") + if (CurrentUser.FactoryList.FirstOrDefault() != "BJCIAI"&& CurrentUser.FactoryList.FirstOrDefault() != "JZ1") { var _ls = GetIsAllChecked(vender, IDS); if (_ls.Count > 0) @@ -506,7 +511,12 @@ namespace SCP.SupplierData Session["InvoiceCreateQueryParm"] = null; BindData(); } - + protected void Grid1_Sort(object sender, GridSortEventArgs e) + { + Grid_V_TB_RECEIVE_LIST.SortDirection = e.SortDirection; + Grid_V_TB_RECEIVE_LIST.SortField = e.SortField; + BindData(); + } protected void btnCreateAll_Click(object sender, EventArgs e) { CreateInvoice("1"); diff --git a/SCP/Views/锦州锦恒/SupplierData/SCP_INVOICE_EDIT.aspx b/SCP/Views/锦州锦恒/SupplierData/SCP_INVOICE_EDIT.aspx index 7d46f94..44a4903 100644 --- a/SCP/Views/锦州锦恒/SupplierData/SCP_INVOICE_EDIT.aspx +++ b/SCP/Views/锦州锦恒/SupplierData/SCP_INVOICE_EDIT.aspx @@ -68,14 +68,14 @@ - + - + diff --git a/SCP/Views/锦州锦恒/WarehouseData/SCP_INVOICE_CONFIRM.aspx.cs b/SCP/Views/锦州锦恒/WarehouseData/SCP_INVOICE_CONFIRM.aspx.cs index e903ba6..efd3e1e 100644 --- a/SCP/Views/锦州锦恒/WarehouseData/SCP_INVOICE_CONFIRM.aspx.cs +++ b/SCP/Views/锦州锦恒/WarehouseData/SCP_INVOICE_CONFIRM.aspx.cs @@ -73,10 +73,10 @@ namespace SCP.Views.锦州锦恒.WarehouseData _entity.VendId = ddl_Vender.SelectedValue; _entity.InvoiceNum = TXT_InvoiceNum.Text; - - - _entity.InvoiceList = SCP_INVOICE_CONTROLLER.Get_V_TB_INVOICE_BY_TIME(DP_CreateTime1.Text, DP_CreateTime2.Text, TXT_PO.Text, TXT_ASN.Text); - + if (DP_CreateTime1.SelectedDate != null || DP_CreateTime2.SelectedDate != null || !string.IsNullOrEmpty(TXT_PO.Text) || !string.IsNullOrEmpty(TXT_ASN.Text)) + { + _entity.InvoiceList = SCP_INVOICE_CONTROLLER.Get_V_TB_INVOICE_BY_TIME(DP_CreateTime1.Text, DP_CreateTime2.Text, TXT_PO.Text, TXT_ASN.Text); + } _entity.UserInVendIds = CurrentUser.VenderList; _entity.UserInAddress = CurrentUser.FactoryList; _entity.BillStateList = GetStateList(); @@ -85,10 +85,6 @@ namespace SCP.Views.锦州锦恒.WarehouseData { if (ret.State == ReturnStatus.Succeed) { - if (_entity.InvoiceList == null || _entity.InvoiceList.Count == 0) - { - Alert.Show("未查询到符合条件的发票!"); - } p_action(ret.Result); } }); diff --git a/SCP/Views/锦州锦恒/WarehouseData/SCP_INVOICE_CONFIRM_DETAIL.aspx b/SCP/Views/锦州锦恒/WarehouseData/SCP_INVOICE_CONFIRM_DETAIL.aspx index 30e0a4e..f5ce191 100644 --- a/SCP/Views/锦州锦恒/WarehouseData/SCP_INVOICE_CONFIRM_DETAIL.aspx +++ b/SCP/Views/锦州锦恒/WarehouseData/SCP_INVOICE_CONFIRM_DETAIL.aspx @@ -63,7 +63,7 @@ - + diff --git a/SCP/Views/锦州锦恒/WarehouseData/SCP_INVOICE_DELTAIL.aspx b/SCP/Views/锦州锦恒/WarehouseData/SCP_INVOICE_DELTAIL.aspx index 1b39a10..9814301 100644 --- a/SCP/Views/锦州锦恒/WarehouseData/SCP_INVOICE_DELTAIL.aspx +++ b/SCP/Views/锦州锦恒/WarehouseData/SCP_INVOICE_DELTAIL.aspx @@ -56,7 +56,7 @@ - + diff --git a/SCP/Views/青岛一汽法雷奥/PlanData/SCP_ASK.aspx.cs b/SCP/Views/青岛一汽法雷奥/PlanData/SCP_ASK.aspx.cs index 2035a3d..82681cc 100644 --- a/SCP/Views/青岛一汽法雷奥/PlanData/SCP_ASK.aspx.cs +++ b/SCP/Views/青岛一汽法雷奥/PlanData/SCP_ASK.aspx.cs @@ -107,7 +107,6 @@ namespace SCP.Views.青岛一汽法雷奥.PlanData } if (!string.IsNullOrEmpty(CurrentUser.Name)) { - _entity.CreateUser = CurrentUser.Name; if (CurrentUser.Name != "admin") { if (CurrentUser.FactoryList != null && CurrentUser.FactoryList.Count > 0) diff --git a/SCP/Views/青岛一汽法雷奥/PlanData/SCP_PO.aspx b/SCP/Views/青岛一汽法雷奥/PlanData/SCP_PO.aspx index c8a31e6..2e10531 100644 --- a/SCP/Views/青岛一汽法雷奥/PlanData/SCP_PO.aspx +++ b/SCP/Views/青岛一汽法雷奥/PlanData/SCP_PO.aspx @@ -104,10 +104,9 @@ - diff --git a/SCP/Views/青岛一汽法雷奥/SupplierData/SCP_ASN_CREATE.aspx.cs b/SCP/Views/青岛一汽法雷奥/SupplierData/SCP_ASN_CREATE.aspx.cs index 8df060e..4ca44e0 100644 --- a/SCP/Views/青岛一汽法雷奥/SupplierData/SCP_ASN_CREATE.aspx.cs +++ b/SCP/Views/青岛一汽法雷奥/SupplierData/SCP_ASN_CREATE.aspx.cs @@ -230,7 +230,7 @@ namespace SCP.青岛一汽法雷奥.SupplierData Alert.Show("日期填写错误!"); return; } - if (_Batch1.ToString().Trim() != "" && ConvertHelper.To(_Qty1) > 0) + // if (_Batch1.ToString().Trim() != "" && ConvertHelper.To(_Qty1) > 0) if (ConvertHelper.To(_Qty1) > 0) { V_TB_ASK_DETAIL _detail = ConvertHelper.GetObjectClone(_entity); diff --git a/SCP/default.aspx b/SCP/default.aspx index beef335..9af5c3e 100644 --- a/SCP/default.aspx +++ b/SCP/default.aspx @@ -111,10 +111,10 @@ for (var i = 0; obj.options.length; i++) { - if ('JZ1' == obj.options[i].value) { + if ('QDVALEO' == obj.options[i].value) { obj.options[i].selected = true; _factory = document.getElementById(_factoryValue); - _factory.value = 'JZ1'; + _factory.value = 'QDVALEO'; } } } diff --git a/UniApiGroup/Controller/OdbcApiScpController.cs b/UniApiGroup/Controller/OdbcApiScpController.cs index 8f75c12..e5d5cca 100644 --- a/UniApiGroup/Controller/OdbcApiScpController.cs +++ b/UniApiGroup/Controller/OdbcApiScpController.cs @@ -30,7 +30,7 @@ namespace CK.SCP.GrupUniApi.Controller xxscm_wms = ((int)UniApiState.待执行).ToString(), xxscm_rmks = "", xxscm_domain =p_domain, - xxscm_site = p_site, + xxscm_site = (!string.IsNullOrEmpty(p_site))?p_site: p_domain, //xxscm_create_time = DateTime.Now, }; idb.xxscm_ctrl.Add(wmsCtrl);