Browse Source

北汽优化

master
qian 9 months ago
parent
commit
dfce31029c
  1. 28
      北京北汽/Controller/SCP_ASK_CONTROLLER.cs
  2. 17
      北京北汽/SCP/Views/PlanData/SCP_ASK.aspx.cs
  3. 3
      北京北汽/SCP/Views/PlanData/SCP_ASK_DETAIL.aspx.cs
  4. 56
      北京北汽/SCP/Views/PlanData/SCP_PO_CREATE_ASK.aspx
  5. 63
      北京北汽/SCP/Views/PlanData/SCP_PO_CREATE_ASK.aspx.cs
  6. 9
      北京北汽/SCP/Views/PlanData/SCP_PO_CREATE_ASK.aspx.designer.cs

28
北京北汽/Controller/SCP_ASK_CONTROLLER.cs

@ -1532,26 +1532,36 @@ namespace CK.SCP.Controller
if (p_list.Count > 0) if (p_list.Count > 0)
{ {
//List<V_TB_ASN_DETAIL> list = new List<V_TB_ASN_DETAIL>();
//var detail = p_list[0];
//foreach (var item in p_list)
//{
// var list1 = db.V_TB_ASN_DETAIL.Where(p => p.IsDeleted == false && item.AskBillNum == p.AskBillNum).ToList();
// if (list1!= null)
// {
// list.AddRange(list1);
// }
//}
//list = db.V_TB_ASN_DETAIL.Where(p => p.IsDeleted == false && detail.AskBillNum == p.AskBillNum).ToList();
var detail = p_list[0];
var list = db.V_TB_ASN_DETAIL.Where(p => p.IsDeleted == false && detail.AskBillNum == p.AskBillNum).ToList();
var list_back = db.TB_ARRIVE_DETAIL.Where(p => p.Remark == detail.AskBillNum && p.IsDeleted == false && p.State == (int)ArriveState.OK && p.Qty < 0 && p.BillType == 3).GroupBy(p => new { p.Remark, p.PoLine, p.PartCode, p.PoBillNum }).Select(p => new { BackSum = p.Sum(itm => itm.Qty), PoLine = p.Key.PoLine, Remark = p.Key.Remark, PartCode = p.Key.PartCode, PoBillNum = p.Key.PoBillNum }).ToList();
p_list.ForEach(itm =>
{
var list = db.V_TB_ASN_DETAIL.Where(p => p.IsDeleted == false && itm.AskBillNum == p.AskBillNum).ToList();
var groupList = list.GroupBy(p => new { p.PoBillNum, p.PoLine, p.PartCode, p.AskBillNum }).Select( var groupList = list.GroupBy(p => new { p.PoBillNum, p.PoLine, p.PartCode, p.AskBillNum }).Select(
p => new p => new
{ {
ShipSum = p.Sum(itm => itm.Qty), ShipSum = p.Sum(itm2 => itm2.Qty),
PoLine = p.Key.PoLine, PoLine = p.Key.PoLine,
PoBillNum = p.Key.PoBillNum, PoBillNum = p.Key.PoBillNum,
PartCode = p.Key.PartCode, PartCode = p.Key.PartCode,
AskBillNum = p.Key.AskBillNum AskBillNum = p.Key.AskBillNum
}).ToList(); }).ToList();
p_list.ForEach(itm =>
{
groupList.ForEach(p => groupList.ForEach(p =>
{ {
if (p.PoBillNum == itm.PoBillNum && p.PoLine == itm.PoLine && p.PartCode == itm.PartCode) if (p.PoBillNum == itm.PoBillNum && p.PoLine == itm.PoLine && p.PartCode == itm.PartCode)
@ -1559,6 +1569,8 @@ namespace CK.SCP.Controller
itm.ShippedQty = p.ShipSum; itm.ShippedQty = p.ShipSum;
} }
}); });
var list_back = db.TB_ARRIVE_DETAIL.Where(p => p.Remark == itm.AskBillNum && p.IsDeleted == false && p.State == (int)ArriveState.OK && p.Qty < 0 && p.BillType == 3).GroupBy(p => new { p.Remark, p.PoLine, p.PartCode, p.PoBillNum }).Select(p => new { BackSum = p.Sum(itm1 => itm1.Qty), PoLine = p.Key.PoLine, Remark = p.Key.Remark, PartCode = p.Key.PartCode, PoBillNum = p.Key.PoBillNum }).ToList();
list_back.ForEach(p => list_back.ForEach(p =>
{ {
if (p.PoBillNum == itm.PoBillNum && p.PoLine == itm.PoLine && p.PartCode == itm.PartCode) if (p.PoBillNum == itm.PoBillNum && p.PoLine == itm.PoLine && p.PartCode == itm.PartCode)

17
北京北汽/SCP/Views/PlanData/SCP_ASK.aspx.cs

@ -45,6 +45,23 @@ namespace SCP.PlanData
var _ls = ScpCache.ADRESSList; var _ls = ScpCache.ADRESSList;
DDL_Site.DataSource = _ls; DDL_Site.DataSource = _ls;
DDL_Site.DataBind(); DDL_Site.DataBind();
List<string> stinglist = new List<string>();
var list = _ls.Select(q => q.NamePone).ToList();
if (list != null)
{
list.ForEach(q =>
{
if (q.Contains(' '))
{
stinglist.Add(q.Substring(0, q.IndexOf(' ')));
}
});
}
if (stinglist != null)
{
DDL_Site.SelectedIndex = stinglist.IndexOf(CurrentUser.ChineseName) == -1 ? 0 : stinglist.IndexOf(CurrentUser.ChineseName);
}
} }
public void LoadData() public void LoadData()
{ {

3
北京北汽/SCP/Views/PlanData/SCP_ASK_DETAIL.aspx.cs

@ -36,7 +36,8 @@ namespace SCP.PlanData
{ {
Grid_V_TB_ASK_DETAIL.RecordCount = ret.Count(); Grid_V_TB_ASK_DETAIL.RecordCount = ret.Count();
var list = SortAndPage<V_TB_ASK_DETAIL>(ret, Grid_V_TB_ASK_DETAIL); var list = SortAndPage<V_TB_ASK_DETAIL>(ret, Grid_V_TB_ASK_DETAIL);
Grid_V_TB_ASK_DETAIL.DataSource = SCP_CONTRACT_CONTROLLER.GET_CONTRACT_PRICE_LIST(list.ToList()); var _ls = SCP_CONTRACT_CONTROLLER.GET_CONTRACT_PRICE_LIST(list.ToList());
Grid_V_TB_ASK_DETAIL.DataSource = SCP_ASK_CONTROLLER.Get_CAN_SHIPQTY(_ls); ;
Grid_V_TB_ASK_DETAIL.DataBind(); Grid_V_TB_ASK_DETAIL.DataBind();
}); });
} }

56
北京北汽/SCP/Views/PlanData/SCP_PO_CREATE_ASK.aspx

@ -4,7 +4,7 @@
<html xmlns="http://www.w3.org/1999/xhtml"> <html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server"> <head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title> <title></title>
</head> </head>
<body> <body>
@ -35,19 +35,19 @@
<Items> <Items>
<f:FormRow runat="server" ColumnWidths="25% 25% 25% 25%"> <f:FormRow runat="server" ColumnWidths="25% 25% 25% 25%">
<Items> <Items>
<f:TextBox runat = "server" Label = "订单状态" EmptyText = "" ID = "TXT_State_DESC" /> <f:TextBox runat="server" Label="订单状态" EmptyText="" ID="TXT_State_DESC" />
<f:TextBox runat = "server" Label = "订单编号" EmptyText = "" ID = "TXT_PoBillNum" /> <f:TextBox runat="server" Label="订单编号" EmptyText="" ID="TXT_PoBillNum" />
<f:TextBox runat = "server" Label = "供应商" EmptyText = "" ID = "TXT_VendName" /> <f:TextBox runat="server" Label="供应商" EmptyText="" ID="TXT_VendName" />
<f:TextBox runat = "server" Label = "供应商编号" EmptyText = "" ID = "TXT_VendId" /> <f:TextBox runat="server" Label="供应商编号" EmptyText="" ID="TXT_VendId" />
</Items> </Items>
</f:FormRow> </f:FormRow>
<f:FormRow runat="server" ColumnWidths="33% 33% 33%"> <f:FormRow runat="server" ColumnWidths="33% 33% 33%">
<Items> <Items>
<f:DatePicker runat="server" Required ="true" DateFormatString="yyyy-MM-dd" Label="要货日期" EmptyText="请选择日期" ID="DP_BeginTime" /> <f:DatePicker runat="server" Required="true" DateFormatString="yyyy-MM-dd" Label="要货日期" EmptyText="请选择日期" ID="DP_BeginTime" />
<f:TextBox runat = "server" Label = "发往地点" EmptyText = "" ID = "TXT_Site" Hidden="true" /> <f:TextBox runat="server" Label="发往地点" EmptyText="" ID="TXT_Site" Hidden="true" />
<f:DropDownList runat="server" ID="DDL_Site" Label="送货地址" Hidden="true" DataTextField="Address" DataValueField ="Address"> <f:DropDownList runat="server" ID="DDL_Site" Label="送货地址" Hidden="true" DataTextField="Address" DataValueField="Address">
<%--<f:ListItem Text="重庆市渝北区石香路5号(重庆厂内)" Value="重庆市渝北区石香路5号(重庆厂内)" /> <%--<f:ListItem Text="重庆市渝北区石香路5号(重庆厂内)" Value="重庆市渝北区石香路5号(重庆厂内)" />
<f:ListItem Text="合肥市包河区卧云路68号宝供物流再包装基地" Value="合肥市包河区卧云路68号宝供物流再包装基地"/> <f:ListItem Text="合肥市包河区卧云路68号宝供物流再包装基地" Value="合肥市包河区卧云路68号宝供物流再包装基地"/>
<f:ListItem Text="重庆市渝北区石香路(重庆外库)" Value="重庆市渝北区石香路(重庆外库)" /> <f:ListItem Text="重庆市渝北区石香路(重庆外库)" Value="重庆市渝北区石香路(重庆外库)" />
@ -58,15 +58,16 @@
<%-- <f:DropDownList ID="DDL_PORT" DataTextField="PORT_DESCRIPTION" DataValueField="PORT_NO" Required="true" runat="server" Label="收货口"> <%-- <f:DropDownList ID="DDL_PORT" DataTextField="PORT_DESCRIPTION" DataValueField="PORT_NO" Required="true" runat="server" Label="收货口">
</f:DropDownList>--%> </f:DropDownList>--%>
<f:TextBox ID="txtRemark" runat="server" Label="备注" Text=""> <f:TextBox ID="txtRemark" runat="server" Label="备注" Text="" />
</f:TextBox> <f:DatePicker runat="server" Required="true" DateFormatString="yyyy-MM-dd" Label="到货日期" EmptyText="请选择日期" ID="DatePicker2" />
</Items> </Items>
</f:FormRow> </f:FormRow>
</Items> </Items>
</f:Form> </f:Form>
<f:GroupPanel runat="server" ID="gp1" Hidden="true" Layout="HBox" > <f:GroupPanel runat="server" ID="gp1" Hidden="true" Layout="HBox">
<Items> <Items>
<f:Form runat="server" BodyPadding="5px" Width="900px"> <f:Form runat="server" BodyPadding="5px" Width="900px">
<Rows> <Rows>
@ -89,15 +90,13 @@
</Items> </Items>
</f:GroupPanel> </f:GroupPanel>
<f:HiddenField ID="HF_GRID_INDEX" runat="server"></f:HiddenField> <f:HiddenField ID="HF_GRID_INDEX" runat="server"></f:HiddenField>
<f:Grid ID = "Grid_V_TB_PO_DETAIL" EnableCollapse = "true" ShowBorder = "true" EnableMultiSelect="true" ShowHeader = "true" runat ="server" EnableCheckBoxSelect = "true" EnableTextSelection="true" <f:Grid ID="Grid_V_TB_PO_DETAIL" EnableCollapse="true" ShowBorder="true" EnableMultiSelect="true" ShowHeader="true" runat="server" EnableCheckBoxSelect="true" EnableTextSelection="true"
DataKeyNames = "UID,PoBillNum,PoLine,PartCode,PlanQty,ShippedQty,ReceivedQty,RejectQty,BeginTime,EndTime,PoUnit,LocUnit,Price,Currency,PackQty,UnConv,DockCode,State,Remark,CreateTime,CreateUser,UpdateTime,UpdateUser,UpdateInfo,IsDeleted,PartDesc1,CurrencyDesc,ErpBillNum,ModType,Contacter,Site,Buyer,BuyerPhone,VendName,PartDesc2,TempQty,PublishQty,ReceivedPort,PartState" DataKeyNames="UID,PoBillNum,PoLine,PartCode,PlanQty,ShippedQty,ReceivedQty,RejectQty,BeginTime,EndTime,PoUnit,LocUnit,Price,Currency,PackQty,UnConv,DockCode,State,Remark,CreateTime,CreateUser,UpdateTime,UpdateUser,UpdateInfo,IsDeleted,PartDesc1,CurrencyDesc,ErpBillNum,ModType,Contacter,Site,Buyer,BuyerPhone,VendName,PartDesc2,TempQty,PublishQty,ReceivedPort,PartState"
SortField="PoLine" SortField="PoLine"
AllowPaging="True" AllowPaging="True"
AllowCellEditing="true" ClicksToEdit="2" AllowCellEditing="true" ClicksToEdit="2"
IsDatabasePaging="true" PageSize="100" OnPageIndexChange="Grid_V_TB_PO_DETAIL_PageIndexChange" IsDatabasePaging="true" PageSize="100" OnPageIndexChange="Grid_V_TB_PO_DETAIL_PageIndexChange"
OnRowDataBound="Grid_V_TB_PO_DETAIL_RowDataBound" OnRowDataBound="Grid_V_TB_PO_DETAIL_RowDataBound">
>
<PageItems> <PageItems>
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server"> <f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
</f:ToolbarSeparator> </f:ToolbarSeparator>
@ -117,9 +116,9 @@
<%--<f:BoundField Width = "100px" DataField = "PoBillNum" DataFormatString = "{0}" HeaderText = "订单号" />--%> <%--<f:BoundField Width = "100px" DataField = "PoBillNum" DataFormatString = "{0}" HeaderText = "订单号" />--%>
<f:BoundField Width="50px" DataField="State_DESC" HeaderText="状态"></f:BoundField> <f:BoundField Width="50px" DataField="State_DESC" HeaderText="状态"></f:BoundField>
<f:BoundField Width="80px" DataField="ProjectId" HeaderText="项目编号"></f:BoundField> <f:BoundField Width="80px" DataField="ProjectId" HeaderText="项目编号"></f:BoundField>
<f:BoundField Width = "50px" DataField = "PoLine" DataFormatString = "{0}" HeaderText = "行号" /> <f:BoundField Width="50px" DataField="PoLine" DataFormatString="{0}" HeaderText="行号" />
<f:BoundField Width = "100px" DataField = "PartDesc1" DataFormatString = "{0}" HeaderText = "零件名称" /> <f:BoundField Width="100px" DataField="PartDesc1" DataFormatString="{0}" HeaderText="零件名称" />
<f:BoundField Width = "80px" DataField = "PartCode" DataFormatString = "{0}" HeaderText = "零件编码" /> <f:BoundField Width="80px" DataField="PartCode" DataFormatString="{0}" HeaderText="零件编码" />
<%--<f:TemplateField HeaderText="要货数量" Width="70px"> <%--<f:TemplateField HeaderText="要货数量" Width="70px">
<ItemTemplate> <ItemTemplate>
<asp:TextBox ID="NB_PublishNum" runat="server" Width="60px" Text="0"></asp:TextBox> <asp:TextBox ID="NB_PublishNum" runat="server" Width="60px" Text="0"></asp:TextBox>
@ -130,21 +129,20 @@
HeaderText="要货数量"> HeaderText="要货数量">
<Editor> <Editor>
<f:NumberBox ID="NB_PublishNum" runat="server" MinValue="0" <f:NumberBox ID="NB_PublishNum" runat="server" MinValue="0"
MaxValue="99999999" DecimalPrecision="3" > MaxValue="99999999" DecimalPrecision="3">
</f:NumberBox> </f:NumberBox>
</Editor> </Editor>
</f:RenderField> </f:RenderField>
<f:BoundField Width = "80px" DataField = "PlanQty" DataFormatString = "{0:F}" HeaderText = "订单数量" /> <f:BoundField Width="80px" DataField="PlanQty" DataFormatString="{0:F}" HeaderText="订单数量" />
<f:BoundField Width = "100px" DataField = "TempQty" DataFormatString = "{0:F}" HeaderText = "已要数量" /> <f:BoundField Width="100px" DataField="TempQty" DataFormatString="{0:F}" HeaderText="已要数量" />
<f:RenderField Width="100px" ColumnID="ReceivedPort" DataField="ReceivedPort_Desc" FieldType="String" <f:RenderField Width="100px" ColumnID="ReceivedPort" DataField="ReceivedPort_Desc" FieldType="String"
RendererFunction="renderPort" HeaderText="收货口" Hidden="true"> RendererFunction="renderPort" HeaderText="收货口" Hidden="true">
<Editor> <Editor>
<f:DropDownList ID="DDL_ReceivedPort" DataTextField="PORT_DESCRIPTION" DataValueField="PORT_NO" Required="true" runat="server"> <f:DropDownList ID="DDL_ReceivedPort" DataTextField="PORT_DESCRIPTION" DataValueField="PORT_NO" Required="true" runat="server">
</f:DropDownList> </f:DropDownList>
</Editor> </Editor>
</f:RenderField> </f:RenderField>
@ -156,24 +154,24 @@
</f:DatePicker> </f:DatePicker>
</Editor> </Editor>
</f:RenderField> </f:RenderField>
<f:BoundField Width = "50px" DataField = "PoUnit" DataFormatString = "{0}" Hidden="true" HeaderText = "单位" /> <f:BoundField Width="50px" DataField="PoUnit" DataFormatString="{0}" Hidden="true" HeaderText="单位" />
<%-- <f:BoundField Width = "80px" DataField = "Price" DataFormatString = "{0}" HeaderText = "价格" Hidden="true"/> --%> <%-- <f:BoundField Width = "80px" DataField = "Price" DataFormatString = "{0}" HeaderText = "价格" Hidden="true"/> --%>
<f:RenderField Width="100px" ColumnID="Price" DataField = "Price" FieldType="Float" Hidden="true" <f:RenderField Width="100px" ColumnID="Price" DataField="Price" FieldType="Float" Hidden="true"
HeaderText="价格"> HeaderText="价格">
<Editor> <Editor>
<f:NumberBox ID="NumberBox1" runat="server" MinValue="0" <f:NumberBox ID="NumberBox1" runat="server" MinValue="0"
MaxValue="99999999" DecimalPrecision="3" > MaxValue="99999999" DecimalPrecision="3">
</f:NumberBox> </f:NumberBox>
</Editor> </Editor>
</f:RenderField> </f:RenderField>
<f:BoundField Width = "100px" DataField = "CurrencyDesc" DataFormatString = "{0}" HeaderText = "币种" Hidden="true" /> <f:BoundField Width="100px" DataField="CurrencyDesc" DataFormatString="{0}" HeaderText="币种" Hidden="true" />
<f:RenderField Width = "150px" ColumnID="Remark" DataField="Remark" HeaderText="备注" > <f:RenderField Width="150px" ColumnID="Remark" DataField="Remark" HeaderText="备注">
<Editor> <Editor>
<f:TextBox ID="TextBox1" runat="server" MaxLength="20" > <f:TextBox ID="TextBox1" runat="server" MaxLength="20">
</f:TextBox> </f:TextBox>
</Editor> </Editor>
</f:RenderField> </f:RenderField>

63
北京北汽/SCP/Views/PlanData/SCP_PO_CREATE_ASK.aspx.cs

@ -35,12 +35,29 @@ namespace SCP.PlanData
var _ls = ScpCache.ADRESSList; var _ls = ScpCache.ADRESSList;
DDL_Site.DataSource = _ls; DDL_Site.DataSource = _ls;
DDL_Site.DataBind(); DDL_Site.DataBind();
List<string> stinglist = new List<string>();
var list = _ls.Select(q => q.NamePone).ToList();
if (list != null)
{
list.ForEach(q =>
{
if (q.Contains(' '))
{
stinglist.Add(q.Substring(0, q.IndexOf(' ')));
}
});
}
if (stinglist != null)
{
DDL_Site.SelectedIndex = stinglist.IndexOf(CurrentUser.ChineseName) == -1?0: stinglist.IndexOf(CurrentUser.ChineseName);
}
} }
private void SetRoleRule() private void SetRoleRule()
{ {
IsPriceVisible(Grid_V_TB_PO_DETAIL, "价格"); IsPriceVisible(Grid_V_TB_PO_DETAIL, "价格");
DDL_ReceivedPort.DataSource = ScpCache.PortList.Where(p=>CurrentUser.FactoryList.Contains(p.FACTORY_ID)); DDL_ReceivedPort.DataSource = ScpCache.PortList.Where(p => CurrentUser.FactoryList.Contains(p.FACTORY_ID));
DDL_ReceivedPort.DataBind(); DDL_ReceivedPort.DataBind();
} }
@ -67,8 +84,9 @@ namespace SCP.PlanData
public void SearchV_TB_PO_DETAIL(Action<IQueryable<V_TB_PO_DETAIL>> p_action) public void SearchV_TB_PO_DETAIL(Action<IQueryable<V_TB_PO_DETAIL>> p_action)
{ {
V_TB_PO_DETAIL _entity = new V_TB_PO_DETAIL(); V_TB_PO_DETAIL _entity = new V_TB_PO_DETAIL();
_entity.PoBillNum=Request["PoBillNum"]; _entity.PoBillNum = Request["PoBillNum"];
SCP_PO_CONTROLLER.Get_V_TB_PO_DETAIL_List(_entity,(_ret)=> { SCP_PO_CONTROLLER.Get_V_TB_PO_DETAIL_List(_entity, (_ret) =>
{
if (_ret.State == ReturnStatus.Succeed) if (_ret.State == ReturnStatus.Succeed)
{ {
@ -114,7 +132,8 @@ namespace SCP.PlanData
public void BindDetail() public void BindDetail()
{ {
var qadOrder = Session["order"] as V_TB_PO; var qadOrder = Session["order"] as V_TB_PO;
SearchV_TB_PO_DETAIL((ret)=> { SearchV_TB_PO_DETAIL((ret) =>
{
if (!string.IsNullOrEmpty(TextArea_PartCode.Text)) if (!string.IsNullOrEmpty(TextArea_PartCode.Text))
{ {
List<string> _strlist = new List<string>(); List<string> _strlist = new List<string>();
@ -127,7 +146,7 @@ namespace SCP.PlanData
} }
this.Grid_V_TB_PO_DETAIL.RecordCount = ret.Count(); this.Grid_V_TB_PO_DETAIL.RecordCount = ret.Count();
var list = SortAndPage<V_TB_PO_DETAIL>(ret, Grid_V_TB_PO_DETAIL); var list = SortAndPage<V_TB_PO_DETAIL>(ret, Grid_V_TB_PO_DETAIL);
var _ls= SCP_CONTRACT_CONTROLLER.GET_CONTRACT_PRICE_LIST(SCP_PO_CONTROLLER.LOAD_PO_DETAIL_SUM_ASK(list.ToList())); var _ls = SCP_CONTRACT_CONTROLLER.GET_CONTRACT_PRICE_LIST(SCP_PO_CONTROLLER.LOAD_PO_DETAIL_SUM_ASK(list.ToList()));
if (qadOrder != null) if (qadOrder != null)
{ {
if (qadOrder.ModType == (int)BillModType.Non_Contract) if (qadOrder.ModType == (int)BillModType.Non_Contract)
@ -158,7 +177,7 @@ namespace SCP.PlanData
if (CurrentUser.FactoryList != null && CurrentUser.FactoryList.Count > 0) if (CurrentUser.FactoryList != null && CurrentUser.FactoryList.Count > 0)
{ {
if(CurrentUser.FactoryList.FirstOrDefault()== "CNS") if (CurrentUser.FactoryList.FirstOrDefault() == "CNS")
{ {
if (qadOrder != null) if (qadOrder != null)
{ {
@ -197,7 +216,7 @@ namespace SCP.PlanData
{ {
var qadOrder = Session["order"] as V_TB_PO; var qadOrder = Session["order"] as V_TB_PO;
//qadOrder.ReceivedPort = DDL_PORT.SelectedValue; //qadOrder.ReceivedPort = DDL_PORT.SelectedValue;
if (DP_BeginTime.SelectedDate == null ) if (DP_BeginTime.SelectedDate == null)
{ {
Alert.Show("要货日期没有填写!"); Alert.Show("要货日期没有填写!");
return; return;
@ -267,8 +286,8 @@ namespace SCP.PlanData
if (modifiedDict.Keys.Contains(i)) if (modifiedDict.Keys.Contains(i))
{ {
var modifyValue = modifiedDict[i]; var modifyValue = modifiedDict[i];
var Remark = modifyValue.Keys.Contains("Remark") ? modifyValue["Remark"] :_entity.Remark; var Remark = modifyValue.Keys.Contains("Remark") ? modifyValue["Remark"] : _entity.Remark;
if (Remark!=null) if (Remark != null)
{ {
_entity.Remark = Remark.ToString(); _entity.Remark = Remark.ToString();
} }
@ -313,7 +332,12 @@ namespace SCP.PlanData
{ {
_lineList.Add(string.Format("产品名称:{0}截至日期:{1}", _entity.PartDesc1, _endTime.ToString())); _lineList.Add(string.Format("产品名称:{0}截至日期:{1}", _entity.PartDesc1, _endTime.ToString()));
} }
else
{
_entity.EndTime = _date; _entity.EndTime = _date;
}
} }
else else
@ -325,6 +349,10 @@ namespace SCP.PlanData
} }
} }
} }
if (DatePicker2.SelectedDate != null)
{
_entity.EndTime = DatePicker2.SelectedDate;
}
if (_entity.PublishQty != null && _entity.PublishQty > 0) if (_entity.PublishQty != null && _entity.PublishQty > 0)
{ {
qadOrderList.Add(_entity); qadOrderList.Add(_entity);
@ -351,7 +379,7 @@ namespace SCP.PlanData
} }
if (p.PartState.ToUpper() == "SP") if (p.PartState.ToUpper() == "SP")
{ {
_lineList.Add("(" + p.PartCode + ")" +"状态为SP不可以生成要货看板!"); _lineList.Add("(" + p.PartCode + ")" + "状态为SP不可以生成要货看板!");
} }
}); });
if (_lineList.Count > 0) if (_lineList.Count > 0)
@ -383,14 +411,15 @@ namespace SCP.PlanData
} }
} }
if(CurrentUser.FactoryList!=null && CurrentUser.FactoryList.Count>0) if (CurrentUser.FactoryList != null && CurrentUser.FactoryList.Count > 0)
{ {
if(CurrentUser.FactoryList.FirstOrDefault()=="CNS") if (CurrentUser.FactoryList.FirstOrDefault() == "CNS")
{ {
if (qadOrder.ModType == 2) if (qadOrder.ModType == 2)
{ {
int i = 0; int i = 0;
qadOrderList.ForEach(p => { qadOrderList.ForEach(p =>
{
if (p.PlanQty != p.PublishQty) if (p.PlanQty != p.PublishQty)
{ {
i = 1; i = 1;
@ -406,12 +435,12 @@ namespace SCP.PlanData
} }
} }
var _ls=qadOrderList.Where(itm => string.IsNullOrEmpty(itm.PartDesc1) && string.IsNullOrEmpty(itm.PartDesc2)).ToList(); var _ls = qadOrderList.Where(itm => string.IsNullOrEmpty(itm.PartDesc1) && string.IsNullOrEmpty(itm.PartDesc2)).ToList();
if (_ls.Count > 0) if (_ls.Count > 0)
{ {
string _str = "不能生成要货看板原因\n\r"; string _str = "不能生成要货看板原因\n\r";
_str=_str+string.Join("\n\r", _ls.Select(itm => itm.PartCode).ToArray()); _str = _str + string.Join("\n\r", _ls.Select(itm => itm.PartCode).ToArray());
_str = _str + "零件不存在!"; _str = _str + "零件不存在!";
Alert.Show(_str); Alert.Show(_str);
return; return;
@ -424,14 +453,14 @@ namespace SCP.PlanData
qadOrderList.ForEach(p => { p.Remark = string.Empty; }); qadOrderList.ForEach(p => { p.Remark = string.Empty; });
} }
} }
string Ssite=""; string Ssite = "";
if (CurrentUser.FactoryList.Contains("CQBMPT")) if (CurrentUser.FactoryList.Contains("CQBMPT"))
{ {
Ssite = DDL_Site.SelectedValue; Ssite = DDL_Site.SelectedValue;
} }
string Stremark = txtRemark.Text; string Stremark = txtRemark.Text;
var ret = SCP_PO_CONTROLLER.Save_PO_TO_ASK_CQ(qadOrder, qadOrderList, CurrentUser.ChineseName, str,CurrentUser.Name, Stremark, Ssite); var ret = SCP_PO_CONTROLLER.Save_PO_TO_ASK_CQ(qadOrder, qadOrderList, CurrentUser.ChineseName, str, CurrentUser.Name, Stremark, Ssite);
if (ret.Result == true) if (ret.Result == true)
{ {
if (ret.MessageList.Count > 0) if (ret.MessageList.Count > 0)

9
北京北汽/SCP/Views/PlanData/SCP_PO_CREATE_ASK.aspx.designer.cs

@ -140,6 +140,15 @@ namespace SCP.PlanData
/// </remarks> /// </remarks>
protected global::FineUI.TextBox txtRemark; protected global::FineUI.TextBox txtRemark;
/// <summary>
/// DatePicker2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.DatePicker DatePicker2;
/// <summary> /// <summary>
/// gp1 控件。 /// gp1 控件。
/// </summary> /// </summary>

Loading…
Cancel
Save