Browse Source

北汽优化

master
qian 9 months ago
parent
commit
dfce31029c
  1. 30
      北京北汽/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. 200
      北京北汽/SCP/Views/PlanData/SCP_PO_CREATE_ASK.aspx
  5. 91
      北京北汽/SCP/Views/PlanData/SCP_PO_CREATE_ASK.aspx.cs
  6. 9
      北京北汽/SCP/Views/PlanData/SCP_PO_CREATE_ASK.aspx.designer.cs

30
北京北汽/Controller/SCP_ASK_CONTROLLER.cs

@ -1532,26 +1532,36 @@ namespace CK.SCP.Controller
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();
var groupList = list.GroupBy(p => new { p.PoBillNum, p.PoLine, p.PartCode, p.AskBillNum }).Select(
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(
p => new
{
ShipSum = p.Sum(itm => itm.Qty),
ShipSum = p.Sum(itm2 => itm2.Qty),
PoLine = p.Key.PoLine,
PoBillNum = p.Key.PoBillNum,
PartCode = p.Key.PartCode,
AskBillNum = p.Key.AskBillNum
}).ToList();
p_list.ForEach(itm =>
{
groupList.ForEach(p =>
{
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;
}
});
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 =>
{
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;
DDL_Site.DataSource = _ls;
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()
{

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

@ -36,7 +36,8 @@ namespace SCP.PlanData
{
Grid_V_TB_ASK_DETAIL.RecordCount = ret.Count();
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();
});
}

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

@ -4,11 +4,11 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<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>
</head>
<body>
<form id="form1" runat="server">
<form id="form1" runat="server">
<f:PageManager runat="server" AutoSizePanelID="Panel1" />
<f:Panel ID="Panel1" runat="server" Title="" AutoScroll="True">
<Toolbars>
@ -17,16 +17,16 @@
<f:Button ID="BTN_REFRESH" runat="server" EnablePostBack="True" Text="刷新" Icon="box">
</f:Button>
<f:Button ID="btnRelease" runat="server" EnablePostBack="True" OnClick="btnRelease_Click" Text="生成要货看板" Icon="CssAdd" OnClientClick="if(!confirm('是否要发布?'))return false;">
<f:Button ID="btnRelease" runat="server" EnablePostBack="True" OnClick="btnRelease_Click" Text="生成要货看板" Icon="CssAdd" OnClientClick="if(!confirm('是否要发布?'))return false;">
</f:Button>
<%-- <f:Button ID="btnCancel" runat="server" EnablePostBack="True" OnClick="btnCancel_Click" Text="取消发布" Icon="CssAdd" OnClientClick="if(!confirm('是否要发布?'))return false;">
<%-- <f:Button ID="btnCancel" runat="server" EnablePostBack="True" OnClick="btnCancel_Click" Text="取消发布" Icon="CssAdd" OnClientClick="if(!confirm('是否要发布?'))return false;">
</f:Button>--%>
<%-- <f:Button ID="btnReject" runat="server" EnablePostBack="True" OnClick="btnReject_Click" Text="作废" Icon="CssAdd" OnClientClick="if(!confirm('是否作废该订单?'))return false;">
<%-- <f:Button ID="btnReject" runat="server" EnablePostBack="True" OnClick="btnReject_Click" Text="作废" Icon="CssAdd" OnClientClick="if(!confirm('是否作废该订单?'))return false;">
</f:Button>--%>
<%-- <f:Button ID="btnContract" runat="server" EnablePostBack="True" OnClick="btnContract_Click" Text="合同校验" Icon="CssAdd" OnClientClick="if(!confirm('是否作废该订单?'))return false;">
<%-- <f:Button ID="btnContract" runat="server" EnablePostBack="True" OnClick="btnContract_Click" Text="合同校验" Icon="CssAdd" OnClientClick="if(!confirm('是否作废该订单?'))return false;">
</f:Button> --%>
<f:Button ID="btnShow" runat="server" Text="显示查询面板" OnClick="btnShow_Click">
</f:Button>
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
@ -35,70 +35,69 @@
<Items>
<f:FormRow runat="server" ColumnWidths="25% 25% 25% 25%">
<Items>
<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_VendName" />
<f:TextBox runat = "server" Label = "供应商编号" EmptyText = "" ID = "TXT_VendId" />
<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_VendName" />
<f:TextBox runat="server" Label="供应商编号" EmptyText="" ID="TXT_VendId" />
</Items>
</f:FormRow>
<f:FormRow runat="server" ColumnWidths="33% 33% 33%">
<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:DropDownList runat="server" ID="DDL_Site" Label="送货地址" Hidden="true" DataTextField="Address" DataValueField ="Address">
<%--<f:ListItem Text="重庆市渝北区石香路5号(重庆厂内)" Value="重庆市渝北区石香路5号(重庆厂内)" />
<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:ListItem Text="重庆市渝北区石香路5号(重庆厂内)" Value="重庆市渝北区石香路5号(重庆厂内)" />
<f:ListItem Text="合肥市包河区卧云路68号宝供物流再包装基地" Value="合肥市包河区卧云路68号宝供物流再包装基地"/>
<f:ListItem Text="重庆市渝北区石香路(重庆外库)" Value="重庆市渝北区石香路(重庆外库)" />
<f:ListItem Text="成都市龙泉驿区经开区车城大道668号" Value="成都市龙泉驿区经开区车城大道668号" />
<f:ListItem Text="四川省成都市龙泉驿区龙安路199号" Value="四川省成都市龙泉驿区龙安路199号" />--%>
</f:DropDownList>
</f:DropDownList>
<%-- <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:TextBox ID="txtRemark" runat="server" Label="备注" Text="">
</f:TextBox>
<f:TextBox ID="txtRemark" runat="server" Label="备注" Text="" />
<f:DatePicker runat="server" Required="true" DateFormatString="yyyy-MM-dd" Label="到货日期" EmptyText="请选择日期" ID="DatePicker2" />
</Items>
</f:FormRow>
</Items>
</f:Form>
<f:GroupPanel runat="server" ID="gp1" Hidden="true" Layout="HBox" >
<f:GroupPanel runat="server" ID="gp1" Hidden="true" Layout="HBox">
<Items>
<f:Form runat="server" BodyPadding="5px" Width="900px">
<Rows>
<f:FormRow runat="server" ColumnWidths="100%">
<Items>
<f:TextArea LabelAlign="Top" ID="TextArea_PartCode" Label="零件编码 (零件编码之间请用 , 号隔开)" runat="server" Height="100px">
</f:TextArea>
</Items>
<f:TextArea LabelAlign="Top" ID="TextArea_PartCode" Label="零件编码 (零件编码之间请用 , 号隔开)" runat="server" Height="100px">
</f:TextArea>
</Items>
</f:FormRow>
<f:FormRow runat="server">
<f:FormRow runat="server">
<Items>
<f:Button runat="server" Text="关闭" ID="BtnClose" OnClick="BtnClose_Click"></f:Button>
<f:Button ID="BtnSearch" runat="server" OnClick="BtnSearch_Click" Text="查找">
</f:Button>
</Items>
</f:FormRow>
</f:FormRow>
</Rows>
</f:Form>
</Items>
</f:GroupPanel>
<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"
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"
AllowPaging="True"
AllowCellEditing="true" ClicksToEdit="2"
IsDatabasePaging="true" PageSize="100" OnPageIndexChange="Grid_V_TB_PO_DETAIL_PageIndexChange"
OnRowDataBound="Grid_V_TB_PO_DETAIL_RowDataBound"
>
<PageItems>
<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"
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"
AllowPaging="True"
AllowCellEditing="true" ClicksToEdit="2"
IsDatabasePaging="true" PageSize="100" OnPageIndexChange="Grid_V_TB_PO_DETAIL_PageIndexChange"
OnRowDataBound="Grid_V_TB_PO_DETAIL_RowDataBound">
<PageItems>
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
</f:ToolbarSeparator>
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:">
@ -108,77 +107,76 @@
<f:ListItem Text="100" Value="100" />
<f:ListItem Text="500" Value="500" />
<f:ListItem Text="800" Value="800" />
<f:ListItem Text="1000" Value="1000" />
<f:ListItem Text="800" Value="800" />
<f:ListItem Text="1000" Value="1000" />
</f:DropDownList>
</PageItems>
<Columns>
<%--<f:BoundField Width = "100px" DataField = "PoBillNum" DataFormatString = "{0}" HeaderText = "订单号" />--%>
<f:BoundField Width="50px" DataField="State_DESC" HeaderText="状态"></f:BoundField>
<f:BoundField Width="80px" DataField="ProjectId" HeaderText="项目编号"></f:BoundField>
<f:BoundField Width = "50px" DataField = "PoLine" DataFormatString = "{0}" HeaderText = "行号" />
<f:BoundField Width = "100px" DataField = "PartDesc1" DataFormatString = "{0}" HeaderText = "零件名称" />
<f:BoundField Width = "80px" DataField = "PartCode" DataFormatString = "{0}" HeaderText = "零件编码" />
<%--<f:TemplateField HeaderText="要货数量" Width="70px">
</PageItems>
<Columns>
<%--<f:BoundField Width = "100px" DataField = "PoBillNum" DataFormatString = "{0}" HeaderText = "订单号" />--%>
<f:BoundField Width="50px" DataField="State_DESC" HeaderText="状态"></f:BoundField>
<f:BoundField Width="80px" DataField="ProjectId" HeaderText="项目编号"></f:BoundField>
<f:BoundField Width="50px" DataField="PoLine" DataFormatString="{0}" HeaderText="行号" />
<f:BoundField Width="100px" DataField="PartDesc1" DataFormatString="{0}" HeaderText="零件名称" />
<f:BoundField Width="80px" DataField="PartCode" DataFormatString="{0}" HeaderText="零件编码" />
<%--<f:TemplateField HeaderText="要货数量" Width="70px">
<ItemTemplate>
<asp:TextBox ID="NB_PublishNum" runat="server" Width="60px" Text="0"></asp:TextBox>
</ItemTemplate>
</f:TemplateField>--%>
<f:RenderField Width="100px" ColumnID="PublishQty" DataField="PublishQty" FieldType="Float"
HeaderText="要货数量">
<Editor>
<f:NumberBox ID="NB_PublishNum" runat="server" MinValue="0"
MaxValue="99999999" DecimalPrecision="3" >
</f:NumberBox>
</Editor>
</f:RenderField>
<f:BoundField Width = "80px" DataField = "PlanQty" 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"
RendererFunction="renderPort" HeaderText="收货口" Hidden="true">
<Editor>
<f:DropDownList ID="DDL_ReceivedPort" DataTextField="PORT_DESCRIPTION" DataValueField="PORT_NO" Required="true" runat="server">
</f:DropDownList>
</Editor>
</f:RenderField>
<f:RenderField Width="120px" ColumnID="EndTime" DataField="EndTime" FieldType="Date"
Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderText="到货日期">
<Editor>
<f:DatePicker ID="DatePicker1" Required="true" runat="server">
</f:DatePicker>
</Editor>
</f:RenderField>
<f:BoundField Width = "50px" DataField = "PoUnit" DataFormatString = "{0}" Hidden="true" HeaderText = "单位" />
<%-- <f:BoundField Width = "80px" DataField = "Price" DataFormatString = "{0}" HeaderText = "价格" Hidden="true"/> --%>
<f:RenderField Width="100px" ColumnID="Price" DataField = "Price" FieldType="Float" Hidden="true"
HeaderText="价格">
<Editor>
<f:NumberBox ID="NumberBox1" runat="server" MinValue="0"
MaxValue="99999999" DecimalPrecision="3" >
</f:NumberBox>
</Editor>
</f:RenderField>
<f:BoundField Width = "100px" DataField = "CurrencyDesc" DataFormatString = "{0}" HeaderText = "币种" Hidden="true" />
<f:RenderField Width = "150px" ColumnID="Remark" DataField="Remark" HeaderText="备注" >
<Editor>
<f:TextBox ID="TextBox1" runat="server" MaxLength="20" >
</f:TextBox>
</Editor>
</f:RenderField>
</Columns>
</f:Grid>
<f:RenderField Width="100px" ColumnID="PublishQty" DataField="PublishQty" FieldType="Float"
HeaderText="要货数量">
<Editor>
<f:NumberBox ID="NB_PublishNum" runat="server" MinValue="0"
MaxValue="99999999" DecimalPrecision="3">
</f:NumberBox>
</Editor>
</f:RenderField>
<f:BoundField Width="80px" DataField="PlanQty" 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"
RendererFunction="renderPort" HeaderText="收货口" Hidden="true">
<Editor>
<f:DropDownList ID="DDL_ReceivedPort" DataTextField="PORT_DESCRIPTION" DataValueField="PORT_NO" Required="true" runat="server">
</f:DropDownList>
</Editor>
</f:RenderField>
<f:RenderField Width="120px" ColumnID="EndTime" DataField="EndTime" FieldType="Date"
Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderText="到货日期">
<Editor>
<f:DatePicker ID="DatePicker1" Required="true" runat="server">
</f:DatePicker>
</Editor>
</f:RenderField>
<f:BoundField Width="50px" DataField="PoUnit" DataFormatString="{0}" Hidden="true" HeaderText="单位" />
<%-- <f:BoundField Width = "80px" DataField = "Price" DataFormatString = "{0}" HeaderText = "价格" Hidden="true"/> --%>
<f:RenderField Width="100px" ColumnID="Price" DataField="Price" FieldType="Float" Hidden="true"
HeaderText="价格">
<Editor>
<f:NumberBox ID="NumberBox1" runat="server" MinValue="0"
MaxValue="99999999" DecimalPrecision="3">
</f:NumberBox>
</Editor>
</f:RenderField>
<f:BoundField Width="100px" DataField="CurrencyDesc" DataFormatString="{0}" HeaderText="币种" Hidden="true" />
<f:RenderField Width="150px" ColumnID="Remark" DataField="Remark" HeaderText="备注">
<Editor>
<f:TextBox ID="TextBox1" runat="server" MaxLength="20">
</f:TextBox>
</Editor>
</f:RenderField>
</Columns>
</f:Grid>
</Items>
</f:Panel>
<f:Window runat="server" ID="Window1" Hidden="True"

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

@ -35,12 +35,29 @@ namespace SCP.PlanData
var _ls = ScpCache.ADRESSList;
DDL_Site.DataSource = _ls;
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()
{
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();
}
@ -56,7 +73,7 @@ namespace SCP.PlanData
TXT_Site.Hidden = false;
}
}
protected void BtnClose_Click(object sender, EventArgs e)
protected void BtnClose_Click(object sender, EventArgs e)
{
gp1.Hidden = true;
}
@ -67,14 +84,15 @@ namespace SCP.PlanData
public void SearchV_TB_PO_DETAIL(Action<IQueryable<V_TB_PO_DETAIL>> p_action)
{
V_TB_PO_DETAIL _entity = new V_TB_PO_DETAIL();
_entity.PoBillNum=Request["PoBillNum"];
SCP_PO_CONTROLLER.Get_V_TB_PO_DETAIL_List(_entity,(_ret)=> {
_entity.PoBillNum = Request["PoBillNum"];
SCP_PO_CONTROLLER.Get_V_TB_PO_DETAIL_List(_entity, (_ret) =>
{
if (_ret.State == ReturnStatus.Succeed)
{
p_action(_ret.Result);
}
});
if (_ret.State == ReturnStatus.Succeed)
{
p_action(_ret.Result);
}
});
}
public void GetV_TB_POData()
@ -114,7 +132,8 @@ namespace SCP.PlanData
public void BindDetail()
{
var qadOrder = Session["order"] as V_TB_PO;
SearchV_TB_PO_DETAIL((ret)=> {
SearchV_TB_PO_DETAIL((ret) =>
{
if (!string.IsNullOrEmpty(TextArea_PartCode.Text))
{
List<string> _strlist = new List<string>();
@ -125,9 +144,9 @@ namespace SCP.PlanData
}
ret = ret.Where(p => _strlist.Contains(p.PartCode));
}
this.Grid_V_TB_PO_DETAIL.RecordCount = ret.Count();
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()));
this.Grid_V_TB_PO_DETAIL.RecordCount = ret.Count();
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()));
if (qadOrder != null)
{
if (qadOrder.ModType == (int)BillModType.Non_Contract)
@ -151,14 +170,14 @@ namespace SCP.PlanData
}
}
//_ls.ForEach(p => p.EndTime = qadOrder.EndTime);
//_ls.ForEach(p => p.EndTime = qadOrder.EndTime);
Grid_V_TB_PO_DETAIL.DataSource = _ls;
Grid_V_TB_PO_DETAIL.DataBind();
Grid_V_TB_PO_DETAIL.DataSource = _ls;
Grid_V_TB_PO_DETAIL.DataBind();
if (CurrentUser.FactoryList != null && CurrentUser.FactoryList.Count > 0)
{
if(CurrentUser.FactoryList.FirstOrDefault()== "CNS")
if (CurrentUser.FactoryList.FirstOrDefault() == "CNS")
{
if (qadOrder != null)
{
@ -173,7 +192,7 @@ namespace SCP.PlanData
}
});
});
}
protected void Grid_V_TB_PO_DETAIL_PageIndexChange(object sender, GridPageEventArgs e)
{
@ -197,7 +216,7 @@ namespace SCP.PlanData
{
var qadOrder = Session["order"] as V_TB_PO;
//qadOrder.ReceivedPort = DDL_PORT.SelectedValue;
if (DP_BeginTime.SelectedDate == null )
if (DP_BeginTime.SelectedDate == null)
{
Alert.Show("要货日期没有填写!");
return;
@ -267,8 +286,8 @@ namespace SCP.PlanData
if (modifiedDict.Keys.Contains(i))
{
var modifyValue = modifiedDict[i];
var Remark = modifyValue.Keys.Contains("Remark") ? modifyValue["Remark"] :_entity.Remark;
if (Remark!=null)
var Remark = modifyValue.Keys.Contains("Remark") ? modifyValue["Remark"] : _entity.Remark;
if (Remark != null)
{
_entity.Remark = Remark.ToString();
}
@ -313,7 +332,12 @@ namespace SCP.PlanData
{
_lineList.Add(string.Format("产品名称:{0}截至日期:{1}", _entity.PartDesc1, _endTime.ToString()));
}
_entity.EndTime = _date;
else
{
_entity.EndTime = _date;
}
}
else
@ -325,6 +349,10 @@ namespace SCP.PlanData
}
}
}
if (DatePicker2.SelectedDate != null)
{
_entity.EndTime = DatePicker2.SelectedDate;
}
if (_entity.PublishQty != null && _entity.PublishQty > 0)
{
qadOrderList.Add(_entity);
@ -351,7 +379,7 @@ namespace SCP.PlanData
}
if (p.PartState.ToUpper() == "SP")
{
_lineList.Add("(" + p.PartCode + ")" +"状态为SP不可以生成要货看板!");
_lineList.Add("(" + p.PartCode + ")" + "状态为SP不可以生成要货看板!");
}
});
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)
{
int i = 0;
qadOrderList.ForEach(p => {
qadOrderList.ForEach(p =>
{
if (p.PlanQty != p.PublishQty)
{
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)
{
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 + "零件不存在!";
Alert.Show(_str);
return;
@ -424,14 +453,14 @@ namespace SCP.PlanData
qadOrderList.ForEach(p => { p.Remark = string.Empty; });
}
}
string Ssite="";
string Ssite = "";
if (CurrentUser.FactoryList.Contains("CQBMPT"))
{
Ssite = DDL_Site.SelectedValue;
Ssite = DDL_Site.SelectedValue;
}
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.MessageList.Count > 0)

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

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

Loading…
Cancel
Save