Browse Source

富维订单页面添加,control添加方法

master
TML 4 years ago
parent
commit
4bc6892bd4
  1. 226
      Controller/SCP_PO_CONTROLLER.cs
  2. 16
      SCP/SCP.csproj
  3. 206
      SCP/Views/富维冲插件/SCP_PO_EXTEND.aspx
  4. 310
      SCP/Views/富维冲插件/SCP_PO_EXTEND.aspx.cs
  5. 377
      SCP/Views/富维冲插件/SCP_PO_EXTEND.aspx.designer.cs
  6. 43
      SCP/Views/富维冲插件/SCP_PO_EXTEND_DETAIL.aspx
  7. 35
      SCP/Views/富维冲插件/SCP_PO_EXTEND_DETAIL.aspx.cs
  8. 143
      SCP/Views/富维冲插件/SCP_PO_EXTEND_DETAIL.aspx.designer.cs

226
Controller/SCP_PO_CONTROLLER.cs

@ -729,6 +729,7 @@ namespace CK.SCP.Controller
_ask.Site = site; _ask.Site = site;
_ask.ReceivedPort = "";//交货口 _ask.ReceivedPort = "";//交货口
_ask.State = (int)AskState.New; _ask.State = (int)AskState.New;
// _ask.State = (int)AskState.Release;
_ask.Remark = _entity.; _ask.Remark = _entity.;
_ask.ModType = (int)p_modtype; _ask.ModType = (int)p_modtype;
_ask.ErpBillNum = _po.PoBillNum; _ask.ErpBillNum = _po.PoBillNum;
@ -883,7 +884,205 @@ namespace CK.SCP.Controller
return _ret; return _ret;
} }
public static ResultObject<bool> Save_EXCEL_PO_MOD1(List<SCP_PO_EXPORT_IMPORT_MODEL> p_order_list, string site, string p_creator, DateTime p_time, string subsite, string p_chineseName, string p_buyerPhone,string CreateTime,string EN,string EndTime,string PartCode,string PoBillNum,string Remark, string Time,string VendId,string PoUnit)
{
ResultObject<bool> _ret = new ResultObject<bool>();
try
{
using (ScpEntities db = EntitiesFactory.CreateScpInstance())
{
int _num = 1;
var _lst = p_order_list;
string _polist = "";
var OrderList = _lst.GroupBy(p => PoBillNum).ToList();
OrderList.ForEach((p) =>
{
var list = p.ToList();
if (list.Count>0)
{
TB_PO _po = new TB_PO();
_po.GUID = Guid.NewGuid();
_po.PoBillNum = SCP_BILLCODE_CONTROLLER.MakePoNum(_num);
_po.State = (int)PoState.Open;
_po.Site = site;
_po.SubSite = subsite;
_po.VendId = VendId;
_po.ErpBillNum = _po.PoBillNum;
_po.ModType = 2;
_po.Contacter = p_chineseName;// _entity.联系人;
_po.Buyer = p_chineseName;// _entity.联系人;
_po.BuyerPhone = p_buyerPhone;
_po.Site = site;
_po.Remark = Remark;
_po.IsDeleted = false;
_po.CreateTime = DateTime.Parse(CreateTime);
_po.CreateUser = p_creator;
_po.BeginTime = DateTime.Parse(EndTime);
_po.EndTime = DateTime.Parse(Time);
db.TB_PO.AddOrUpdate(_po);
TB_ASK _ask = new TB_ASK();
_ask.AskBillNum = SCP_BILLCODE_CONTROLLER.MakeASKCodeByNum(_num);
_ask.GUID = Guid.NewGuid();
_ask.PoBillNum = _po.PoBillNum;
_ask.VendId = VendId;
_ask.IsDeleted = false;
_ask.CreateTime = DateTime.Now;
_ask.CreateUser = p_creator;
_ask.Site = site;
_ask.ReceivedPort = "";//交货口
_ask.State = (int)AskState.Release;
_ask.Remark = Remark;
_ask.ModType = 2;
_ask.ErpBillNum = _po.PoBillNum;
_ask.BeginTime = p_time;
_ask.EndTime = DateTime.Parse(EndTime);
_ask.Buyer = p_chineseName;
_ask.BuyerPhone = p_buyerPhone;
_ask.SubSite = subsite;
db.TB_ASK.Add(_ask);
int _number = 1;
list.ForEach((itm) =>
{
TB_PO_DETAIL _PO_Detail = new TB_PO_DETAIL();
_PO_Detail.GUID = Guid.NewGuid();
_PO_Detail.PartCode = PartCode;
_PO_Detail.PoLine = _number;
_PO_Detail.PoBillNum = _po.PoBillNum;
_PO_Detail.State = (int)PoState.Open;
_PO_Detail.Site = site;
_PO_Detail.SubSite = subsite;
_PO_Detail.Currency = "CNY";
_PO_Detail.PoUnit = PoUnit;
_PO_Detail.CreateTime = DateTime.Parse(CreateTime);
_PO_Detail.CreateUser = p_creator;
_PO_Detail.BeginTime = string.IsNullOrEmpty(CreateTime) ? DateTime.Now : DateTime.Parse(CreateTime);
_PO_Detail.EndTime = string.IsNullOrEmpty(EndTime) ? DateTime.Now.AddYears(30) : DateTime.Parse(EndTime);
_PO_Detail.PlanQty = decimal.Parse(EN);
_PO_Detail.IsDeleted = false;
_PO_Detail.LocUnit = PoUnit;
_PO_Detail.PoUnit = PoUnit;
_PO_Detail.UnConv = 1;
//_PO_Detail.Price = string.IsNullOrEmpty(itm.单价) ? 0 : decimal.Parse(itm.单价);
_PO_Detail.TempQty = decimal.Parse(EN);
TB_ASK_DETAIL _tDetail = new TB_ASK_DETAIL();
_tDetail.Remark = Remark;
_tDetail.PoBillNum = _po.PoBillNum;
_tDetail.AskBillNum = _ask.AskBillNum;
_tDetail.PoLine = _number;
_tDetail.PoUnit = PoUnit;
_tDetail.CreateTime = DateTime.Now;
_tDetail.CreateUser = p_creator;
_tDetail.PartCode = PartCode;
_tDetail.ReceivedPort = "";
_tDetail.BeginTime = p_time;
_tDetail.EndTime = Convert.ToDateTime(EndTime);
_tDetail.TempQty = 0;
_tDetail.AskQty = Decimal.Parse(EN);
_tDetail.IsDeleted = false;
_tDetail.LocUnit = PoUnit;
_tDetail.UnConv = 1;
_tDetail.State = (int)PoState.Open;
_tDetail.SubSite = subsite;
_tDetail.Site = site;
//_tDetail.Price = Decimal.Parse(itm.单价);
_tDetail.GUID = Guid.NewGuid();
_tDetail.Currency = "CNY";
db.TB_ASK_DETAIL.Add(_tDetail);
db.TB_PO_DETAIL.AddOrUpdate(_PO_Detail);
//_number++;
});
}
else
{
_ret.MessageList.Add("订单信息输入有误");
return;
}
}
);
if (_ret.MessageList.Count == 0)
{
int state = db.SaveChanges();
if (state != -1)
{
_ret.State = ReturnStatus.Succeed;
_ret.Result = true;
_ret.Message = _polist;
}
else
{
_ret.State = ReturnStatus.Failed;
_ret.Result = false;
}
}
else
{
_ret.State = ReturnStatus.Failed;
_ret.Result = false;
}
}
}
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.Result = false;
_ret.ErrorList.Add(dbEx);
LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "EXCEL_PO_MOD", sb.ToString());
throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString());
}
catch (OptimisticConcurrencyException ex)//并发冲突异常
{
_ret.State = ReturnStatus.Failed;
_ret.Result = false;
_ret.ErrorList.Add(ex);
LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "EXCEL_PO_MOD", ex.ToString());
throw new ScpException(ResultCode.Exception, "9999", ex.ToString());
}
catch (ScpException ex)
{
_ret.State = ReturnStatus.Failed;
_ret.Result = false;
_ret.ErrorList.Add(ex);
LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "EXCEL_PO_MOD", 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;
LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_PO_CONTROLLER), "EXCEL_PO_MOD", e.Message);
_ret.Result = false;
_ret.ErrorList.Add(e);
throw e;
}
return _ret;
}
public static ResultObject<bool> Check_EXCEL_PO_MOD(List<SCP_PO_EXPORT_IMPORT_MODEL> p_order_list, BillModType p_modtype, string site, string subsite) public static ResultObject<bool> Check_EXCEL_PO_MOD(List<SCP_PO_EXPORT_IMPORT_MODEL> p_order_list, BillModType p_modtype, string site, string subsite)
{ {
ResultObject<bool> _ret = new ResultObject<bool>(); ResultObject<bool> _ret = new ResultObject<bool>();
@ -1176,6 +1375,11 @@ namespace CK.SCP.Controller
} }
else else
{ {
var ls = db.TA_VENDER.SingleOrDefault(p => p.VendId == p_excel.);
if (ls == null)
{
ErrorList.Add(string.Format("订单编号【{1}】零件名称【{0}】的供应商编号不存在", p_excel., p_excel.));
}
decimal a = decimal.Parse(p_excel.); decimal a = decimal.Parse(p_excel.);
if (a <= 0) if (a <= 0)
{ {
@ -1197,17 +1401,17 @@ namespace CK.SCP.Controller
ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】的订单截止日期必须大于等于2049年!", p_excel., p_excel., p_excel.)); ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】的订单截止日期必须大于等于2049年!", p_excel., p_excel., p_excel.));
} }
} }
var checkcount = db.TB_PRICE.Where(p => p.PartCode == p_excel. && p.Site == site&& p.VendId == p_excel. && p.StartTime <= DateTime.Now && DateTime.Now <= p.EndTime).ToList(); //var checkcount = db.TB_PRICE.Where(p => p.PartCode == p_excel.零件号 && p.Site == site&& p.VendId == p_excel.供应商编号 && p.StartTime <= DateTime.Now && DateTime.Now <= p.EndTime).ToList();
if (checkcount.Count == 0) //if (checkcount.Count == 0)
{ //{
ErrorList.Add(string.Format("零件名称【{0}】供应编码【{1}】价格表没有维护信息!", p_excel., p_excel.)); // ErrorList.Add(string.Format("零件名称【{0}】供应编码【{1}】价格表没有维护信息!", p_excel.零件号, p_excel.供应商编号));
} //}
else //else
{ //{
p_excel. = checkcount[0].Amt.ToString(); // p_excel.单价 = checkcount[0].Amt.ToString();
p_excel. = checkcount[0].Unit; // p_excel.单位 = checkcount[0].Unit;
p_excel. = checkcount[0].Curr; // p_excel.币种 = checkcount[0].Curr;
} //}
//if (!Regex.IsMatch(p_excel.税率, "^[0-9]{1,2}$")) //if (!Regex.IsMatch(p_excel.税率, "^[0-9]{1,2}$"))
//{ //{
// ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】税率最大2位整数!", p_excel.零件号, p_excel.供应商编号, p_excel.订单编号)); // ErrorList.Add(string.Format("订单编号【{2}】零件名称【{0}】供应编码【{1}】税率最大2位整数!", p_excel.零件号, p_excel.供应商编号, p_excel.订单编号));

16
SCP/SCP.csproj

@ -4537,6 +4537,8 @@
<Content Include="Views\WarehouseData\SCP_RECEIVE_DETAIL_VIEW.aspx" /> <Content Include="Views\WarehouseData\SCP_RECEIVE_DETAIL_VIEW.aspx" />
<Content Include="Views\WarehouseData\SCP_RECEIVE.aspx" /> <Content Include="Views\WarehouseData\SCP_RECEIVE.aspx" />
<Content Include="Views\WarehouseData\SCP_RECEIVE_DETAIL.aspx" /> <Content Include="Views\WarehouseData\SCP_RECEIVE_DETAIL.aspx" />
<Content Include="Views\富维冲插件\SCP_PO_EXTEND.aspx" />
<Content Include="Views\富维冲插件\SCP_PO_EXTEND_DETAIL.aspx" />
<Content Include="Views\沈阳金杯\PlanData\SCP_ASK.aspx" /> <Content Include="Views\沈阳金杯\PlanData\SCP_ASK.aspx" />
<Content Include="Views\沈阳金杯\PlanData\SCP_ASK_DETAIL.aspx" /> <Content Include="Views\沈阳金杯\PlanData\SCP_ASK_DETAIL.aspx" />
<Content Include="Views\沈阳金杯\PlanData\SCP_ASK_DETAIL_PARTCODE.aspx" /> <Content Include="Views\沈阳金杯\PlanData\SCP_ASK_DETAIL_PARTCODE.aspx" />
@ -5847,6 +5849,20 @@
<Compile Include="Views\WarehouseData\SCP_RECEIVE_DETAIL.aspx.designer.cs"> <Compile Include="Views\WarehouseData\SCP_RECEIVE_DETAIL.aspx.designer.cs">
<DependentUpon>SCP_RECEIVE_DETAIL.aspx</DependentUpon> <DependentUpon>SCP_RECEIVE_DETAIL.aspx</DependentUpon>
</Compile> </Compile>
<Compile Include="Views\富维冲插件\SCP_PO_EXTEND.aspx.cs">
<DependentUpon>SCP_PO_EXTEND.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Views\富维冲插件\SCP_PO_EXTEND.aspx.designer.cs">
<DependentUpon>SCP_PO_EXTEND.aspx</DependentUpon>
</Compile>
<Compile Include="Views\富维冲插件\SCP_PO_EXTEND_DETAIL.aspx.cs">
<DependentUpon>SCP_PO_EXTEND_DETAIL.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Views\富维冲插件\SCP_PO_EXTEND_DETAIL.aspx.designer.cs">
<DependentUpon>SCP_PO_EXTEND_DETAIL.aspx</DependentUpon>
</Compile>
<Compile Include="Views\沈阳金杯\PlanData\SCP_ASK.aspx.cs"> <Compile Include="Views\沈阳金杯\PlanData\SCP_ASK.aspx.cs">
<DependentUpon>SCP_ASK.aspx</DependentUpon> <DependentUpon>SCP_ASK.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType> <SubType>ASPXCodeBehind</SubType>

206
SCP/Views/富维冲插件/SCP_PO_EXTEND.aspx

@ -0,0 +1,206 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SCP_PO_EXTEND.aspx.cs" Inherits="SCP.Views.富维冲插件.SCP_PO_EXTEND" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
<%--<script src="../../Scripts/ajaxfileupload.js"></script>
<script>
function ajaxFileUpLoad() {
$.ajaxFileUpload(
{
url: '../../Handlers/FileUpload.ashx?method=ajaxFileUpload',
secureuri: false,
fileElementId: 'fileToUpload',
dataType: 'json',
success: function (data, status) {
$('#img1').attr("src", data.imgurl);
if (typeof (data.error) != 'undefined') {
if (data.error != '') {
alert(data.error);
} else {
alert(data.msg);
}
}
},
error: function (data, status, e) {
alert(e);
}
}
)
return false;
}
</script>--%>
</head>
<body>
<form id="form1" runat="server">
<f:PageManager runat="server" AutoSizePanelID="Panel1" />
<f:Panel ID="Panel1" runat="server" Title="" AutoScroll="True" Layout="VBox" >
<Toolbars>
<f:Toolbar ID="Toolbar2" runat="server">
<Items>
<f:ToolbarSeparator runat="server" />
<f:Button ID="Button3" runat="server" EnablePostBack="false" Text="刷新" Icon="Reload" OnClientClick="location.reload();">
</f:Button>
<f:ToolbarSeparator runat="server" />
<f:Button ID="btnOutput" runat="server" Text="导出" Icon="PageExcel" OnClick="btnOutput_Click" >
</f:Button>
<f:Button ID="btnDetail" runat="server" Text="明细" Icon="Zoom" OnClick="btnDetail_Click">
</f:Button>
<f:ToolbarSeparator runat="server" />
<f:Button ID="BTN_CREATE" runat="server" EnablePostBack="True" Text="创建看板" Icon="Add" OnClick="BTN_CREATE_Click" >
</f:Button>
<f:Button ID="Button1" runat="server" EnablePostBack="True" Text="创建订单" Icon="Add" OnClick="BTN_CREATE_Click1" >
</f:Button>
<f:Button ID="btnShow" runat="server" Text="显示查询面板" Icon="Find" OnClick="btnShow_Click">
</f:Button>
<f:Button ID="btnModeType1" runat="server" Text="日程单" Icon="Reload" OnClick="btnModeType1_Click" >
</f:Button>
<f:Button ID="btnModeType2" runat="server" Text="离散单" Icon="Reload" OnClick="btnModeType2_Click" >
</f:Button>
<f:RadioButtonList runat="server" Label="订单类型" ID="rblist" Hidden="true" >
<f:RadioItem Text="日程单" Value="1" />
<f:RadioItem Text="离散单" Value="2"/>
</f:RadioButtonList>
<f:ToolbarSeparator runat="server" />
<f:FileUpload runat="server" ID="FileUp" EmptyText="请选择要货单据" Required="true" Width="200" ButtonIcon="Add" ShowRedStar="true"> </f:FileUpload>
<f:Button ID="btnInput_Contract" runat="server" Text="日程单导入" Icon="PageExcel" OnClick="btnInput_Click_Contract" >
</f:Button>
<f:Button ID="btnInput_Non_Contract" runat="server" Text="离散单导入" Icon="PageExcel" OnClick="btnInput_Click_Non_Contract" >
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
<Items>
<f:Form runat="server" Margin="5" ID="gp1" Hidden="true" BodyPadding ="5">
<Rows>
<f:FormRow runat="server" ColumnWidths="33% 33% 33%">
<Items>
<f:TextBox runat = "server" Label = "订单编号" EmptyText = "" ID = "TXT_BillNo" />
<f:DropDownList runat="server" ID="DropDownList1" Label="地点" DataTextField="FactoryName" DataValueField=" ErpDomain">
</f:DropDownList>
<f:TextBox runat = "server" Label = "供应商编码" EmptyText = "" ID = "TXT_Vendid" />
</Items>
</f:FormRow>
<f:FormRow runat="server" ColumnWidths="33% 33% 33%">
<Items>
<f:TextBox runat = "server" Label = "供应商名称" EmptyText = "" ID = "TXT_VendName" />
<f:TextBox runat = "server" Label = "项目编码" EmptyText = "" ID = "TXT_ProjectId" />
<f:DropDownList runat="server" ID="DDL_State" Label="状态">
<f:ListItem Text="-" Value=""/>
<f:ListItem Text="关闭" Value="0" />
<f:ListItem Text="开放" Value="1" />
</f:DropDownList>
</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_StartDate" />
<f:DatePicker runat="server" Required ="true" DateFormatString="yyyy-MM-dd" Label="至" EmptyText="请选择日期" ID="DP_EndDate" />
<f:TextBox runat="server" Required ="true" Label="零件编号" EmptyText="查询请填写零件编号" ID="TXT_PartCode" />
</Items>
</f:FormRow>
<f:FormRow runat="server" >
<Items>
<f:Panel ID="Panel5" runat="server" ShowBorder="false" CssClass="mypanel" ShowHeader="false">
<Items>
<f:Button runat="server" Text="关闭" ID="BtnClose" OnClick="BtnClose_Click" Margin="5" ></f:Button>
<f:Button ID="BtnSearch" runat="server" OnClick="BtnSearch_Click" Text="快速查找订单" Margin="5" >
</f:Button>
<f:Button ID="BtnSearchDetail" runat="server" OnClick="BtnSearchDetail_Click" Text="快速查找订单明细" Margin="5" >
</f:Button>
</Items>
</f:Panel>
</Items>
</f:FormRow>
</Rows>
</f:Form>
<f:Panel ID="Panel2"
runat="server" BodyPadding="0px" ShowBorder="true" BoxFlex="1" ShowHeader="false" Layout="HBox" AutoScroll="True">
<Items>
<f:Panel ID="Panel3"
runat="server" BodyPadding="0px" ShowBorder="true" ShowHeader="false" BoxFlex="1" Layout="VBox" AutoScroll="True" >
<Items>
<f:Grid ID = "Grid_V_TB_PO" ColumnWidth="45%" PageSize="50" ShowBorder = "true" ShowHeader = "true" runat ="server" EnableCheckBoxSelect = "true" DataKeyNames = "UID,PoBillNum,ErpBillNum,VendId,ModType,Contacter,Site,Buyer,BuyerPhone,State,Remark,CreateTime,CreateUser,UpdateTime,UpdateUser,UpdateInfo,IsDeleted,VendName,State_DESC,ModType_DESC"
CssClass="maingrid" EnableRowDoubleClickEvent="True" OnSort="Grid_V_TB_PO_Sort" SortField="BeginTime"
IsDatabasePaging="True" AllowPaging="True" OnRowSelect="Grid_V_TB_PO_RowSelect" EnableRowSelectEvent="true"
AutoScroll="True" SortDirection="DESC" OnPageIndexChange="Grid_V_TB_PO_PageIndexChange" BoxFlex="1" >
<PageItems>
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
</f:ToolbarSeparator>
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:">
</f:ToolbarText>
<f:DropDownList ID="ddlGridPageSize" Width="80px" AutoPostBack="true" OnSelectedIndexChanged="ddlGridPageSize_SelectedIndexChanged"
runat="server">
<f:ListItem Text="50" Value="50" />
<f:ListItem Text="100" Value="100" />
<f:ListItem Text="200" Value="200" />
</f:DropDownList>
</PageItems>
<Columns>
<f:BoundField Width = "60px" DataField = "State" DataFormatString = "{0}" HeaderText = "状态" Hidden="true" />
<f:BoundField Width = "60px" DataField = "State_DESC" DataFormatString = "{0}" HeaderText = "状态" />
<f:BoundField Width = "80px" DataField = "ModType_DESC" DataFormatString = "{0}" HeaderText = "单据类型" />
<f:BoundField Width = "100px" DataField = "PoBillNum" DataFormatString = "{0}" HeaderText = "订单号" />
<f:BoundField Width = "100px" DataField = "ErpBillNum" DataFormatString = "{0}" HeaderText ="项目编号" />
<f:BoundField Width = "100px" DataField = "VendName" DataFormatString = "{0}" HeaderText = "供应商" />
<f:BoundField Width = "100px" DataField = "VendId" DataFormatString = "{0}" HeaderText = "供应商编码" />
<%--<f:BoundField Width = "100px" DataField = "Contacter" DataFormatString = "{0}" HeaderText = "发布人" />--%>
<f:BoundField Width = "100px" DataField = "BeginTime" DataFormatString = "{0:yyyy-MM-dd}" HeaderText = "订货日期" />
<%--<f:BoundField Width = "100px" DataField = "Site_Desc" DataFormatString = "{0}" HeaderText = "地点" />--%>
<f:BoundField Width = "100px" DataField = "Buyer" DataFormatString = "{0}" HeaderText = "收货人" />
<%--<f:BoundField Width = "100px" DataField = "BuyerPhone" DataFormatString = "{0}" HeaderText = "收货电话" />--%>
</Columns>
</f:Grid>
</Items>
</f:Panel>
<f:Panel ID="Panel4"
runat="server" BodyPadding="0px" ShowBorder="true" ShowHeader="false" Layout="VBox" BoxFlex="1" >
<Items>
<f:Grid ID = "Grid_V_TB_PO_DETAIL" ShowBorder = "true" EnableMultiSelect="true" ShowHeader = "true" runat ="server"
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"
SortField="PoLine"
AllowPaging="True"
ColumnWidth="55%" SortDirection="DESC"
PageSize="500" BoxFlex="1" >
<Columns>
<f:BoundField Width = "80px" DataField="ProjectId" HeaderText="项目编号"></f:BoundField>
<f:BoundField Width = "40px" DataField = "PoLine" DataFormatString = "{0}" HeaderText = "行号" />
<f:BoundField Width = "150px" DataField = "PartDesc1" DataFormatString = "{0}" HeaderText = "零件名称" />
<f:BoundField Width = "100px" DataField = "PartCode" DataFormatString = "{0}" HeaderText = "零件编码" />
<f:BoundField Width = "80px" DataField = "PlanQty" DataFormatString = "{0:F}" HeaderText = "订单数量" />
<f:BoundField Width = "80px" DataField = "TempQty" DataFormatString = "{0:F}" HeaderText = "已要数量" />
<f:BoundField Width = "80px" DataField = "ShippedQty" DataFormatString = "{0:F}" HeaderText = "发货数量" />
<f:BoundField Width = "80px" DataField = "ReceivedQty" DataFormatString = "{0:F}" HeaderText = "收货数量" />
<f:BoundField Width = "80px" DataField = "RejectQty" DataFormatString = "{0:F}" HeaderText = "退货数量" />
<f:BoundField Width = "100px" DataField = "EndTime" DataFormatString = "{0:yyyy-MM-dd}" HeaderText = "到货日期" />
<f:BoundField Width = "50px" DataField = "PoUnit" DataFormatString = "{0}" Hidden="true" HeaderText = "单位" />
</Columns>
</f:Grid>
</Items>
</f:Panel>
</Items>
</f:Panel>
</Items>
</f:Panel>
<f:Window runat="server" ID="Window1" Hidden="True" Height="600px" Width="950px" AutoScroll="True" OnClose="Window1_Close"
WindowPosition="Center" IsModal="true" Title="明细详情" Target="Parent" EnableIFrame="true"
IFrameUrl="about:blank" />
<f:Window ID="WindowUpload" runat="server" Hidden="True"
WindowPosition="Center" IsModal="true" Title="Popup Window 1" Target="Parent" EnableIFrame="true"
IFrameUrl="about:blank" Height="200px" Width="400px">
</f:Window>
<f:Window runat="server" ID="Window2" Hidden="True" AutoScroll="false" Width="800px" Height="350px" CloseAction="HidePostBack"
WindowPosition="Center" IsModal="true" Title="增加离散订单" Target="Parent" EnableIFrame="true"
IFrameUrl="about:blank" />
</form>
</body>
</html>

310
SCP/Views/富维冲插件/SCP_PO_EXTEND.aspx.cs

@ -0,0 +1,310 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using CK.SCP.Models.ScpEntity;
using CK.SCP.Utils;
using CK.SCP.Controller;
using FineUI;
using System.IO;
using System.Data;
using CK.SCP.Models.ScpEntity.ExcelImportEntity;
using CK.SCP.Models.Enums;
using CK.SCP.Common;
using CK.SCP.Models;
using System.Text;
using CK.SCP.Models.ScpEntity.ExcelExportEnttity;
namespace SCP.Views.
{
public partial class SCP_PO_EXTEND : PageBase
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
LoadData();
}
}
public void LoadData()
{
if (CurrentUser.FactoryList
== null || CurrentUser.FactoryList.Count == 0)
{
Alert.Show("当前用户未选择地点");
return;
}
BindOrder();
}
public void BindOrder()
{
SearchV_TB_PO((result) => {
Grid_V_TB_PO.RecordCount = result.Count();
var list = SortAndPage<V_TB_PO>(result, Grid_V_TB_PO);
Grid_V_TB_PO.DataSource = list;
Grid_V_TB_PO.DataBind();
});
}
public void SearchV_TB_PO(Action<IQueryable<V_TB_PO>> p_action)
{
var ls = SCPDB.TB_FACTORY.Where(p => p.ErpDomain == CurrentUser.UsedDomain).ToList();
DropDownList1.DataSource = ls;
DropDownList1.DataBind();
V_TB_PO _entity = new V_TB_PO();
_entity.IsDeleted = false;
if (this.DP_StartDate.SelectedDate != null)
{
_entity.BeginTime = DP_StartDate.SelectedDate;
}
if (DP_EndDate.SelectedDate != null)
{
_entity.BeginTime = DP_EndDate.SelectedDate;
}
if (!string.IsNullOrEmpty(DDL_State.SelectedValue))
{
_entity.State = int.Parse(DDL_State.SelectedValue);
}
_entity.VendId = TXT_Vendid.Text;
_entity.PoBillNum = TXT_BillNo.Text;
_entity.VendName = TXT_VendName.Text;
if (!string.IsNullOrEmpty(rblist.SelectedValue))
{
_entity.ModType = ConvertHelper.To<int>(rblist.SelectedValue);
}
_entity.ErpBillNum = TXT_ProjectId.Text;
_entity.SubSite = DropDownList1.SelectedValue;
_entity.IsDeleted = false;
_entity.UserInAddress = CurrentUser.FactoryList;
_entity.UserInVendIds = CurrentUser.VenderList;
SCP_PO_CONTROLLER.Get_V_TB_PO_List(_entity, (_ret) => {
if (_ret.State == ReturnStatus.Succeed)
{
p_action(_ret.Result);
}
});
}
protected void Grid_V_TB_PO_RowDoubleClick(object sender, FineUI.GridRowClickEventArgs e)
{
//object[] rowDataKeys = Grid_V_TB_PO.DataKeys[e.RowIndex];
//string PoBillNum = rowDataKeys[1] as string;
//string VendID = rowDataKeys[3] as string;
//PageContext.RegisterStartupScript(Window1.GetShowReference(string.Format("../PlanData/SCP_PO_DETAIL.aspx?PoBillNum={0}", PoBillNum)));
}
protected void Grid_V_TB_PO_PageIndexChange(object sender, FineUI.GridPageEventArgs e)
{
BindOrder();
}
protected void Grid_V_TB_PO_Sort(object sender, FineUI.GridSortEventArgs e)
{
}
protected void btnOutput_Click(object sender, EventArgs e)
{
int[] _selections = Grid_V_TB_PO.SelectedRowIndexArray;
if (_selections.Count() == 0)
{
Alert.Show("请选择订单记录导出!");
}
List<string> _ls = new List<string>();
for (int i = 0, count = Grid_V_TB_PO.Rows.Count; i < count; i++)
{
if (_selections.Contains(i))
{
object[] rowDataKeys = Grid_V_TB_PO.DataKeys[i];
_ls.Add(rowDataKeys[1] as string);
}
}
if (_ls.Count == 0)
{
Alert.Show("请选择记录导出!");
return;
}
//List<string> _ls = new List<string>();
//for (int i = 0, count = Grid_V_TB_PO.Rows.Count; i < count; i++)
//{
// object[] rowDataKeys = Grid_V_TB_PO.DataKeys[i];
// _ls.Add(rowDataKeys[1] as string);
//}
DataSet ds = SCP_EXCEL_CONTROLLER.GET_PO_EXECEL(_ls);
PageBase.DataSetToExcel(ds, "采购订单");
}
protected void btnDetail_Click(object sender, EventArgs e)
{
if (Grid_V_TB_PO.SelectedRowIndexArray.Count() == 0)
{
PageContext.RegisterStartupScript(Alert.GetShowInTopReference("没有选择数据!"));
return;
}
object[] rowDataKeys = Grid_V_TB_PO.DataKeys[Grid_V_TB_PO.SelectedRowIndex];
if (rowDataKeys != null)
{
string PoBillNum = rowDataKeys[1] as string;
string VendID = rowDataKeys[3] as string;
PageContext.RegisterStartupScript(Window1.GetShowReference(string.Format("../PlanData/SCP_PO_DETAIL.aspx?PoBillNum={0}", PoBillNum)));
}
}
protected void btnShow_Click(object sender, EventArgs e)
{
gp1.Hidden = false;
}
protected void BtnClose_Click(object sender, EventArgs e)
{
gp1.Hidden = true;
}
protected void BtnSearch_Click(object sender, EventArgs e)
{
BindOrder();
}
protected void ddlGridPageSize_SelectedIndexChanged(object sender, EventArgs e)
{
Grid_V_TB_PO.PageSize = Convert.ToInt32(ddlGridPageSize.SelectedValue);
BindOrder();
}
protected void Window1_Close(object sender, WindowCloseEventArgs e)
{
BindOrder();
}
protected void BTN_CREATE_Click(object sender, EventArgs e)
{
if (Grid_V_TB_PO.SelectedRowIndexArray.Count() == 0)
{
PageContext.RegisterStartupScript(Alert.GetShowInTopReference("没有选择数据!"));
return;
}
object[] rowDataKeys = Grid_V_TB_PO.DataKeys[Grid_V_TB_PO.SelectedRowIndex];
if (ConvertHelper.To<int>(rowDataKeys[9]) == 0)
{
PageContext.RegisterStartupScript(Alert.GetShowInTopReference("当前订单处于关闭状态,不能创建要货看板!"));
return;
}
if (rowDataKeys != null)
{
string PoBillNum = rowDataKeys[1] as string;
string VendID = rowDataKeys[3] as string;
PageContext.RegisterStartupScript(Window1.GetShowReference(string.Format("../PlanData/SCP_PO_CREATE_ASK.aspx?PoBillNum={0}", PoBillNum)));
}
}
protected void BTN_CREATE_Click1(object sender, EventArgs e)
{
PageContext.RegisterStartupScript(Window2.GetShowReference(string.Format("../PlanData/富维冲插件/SCP_PO_EXTEND_DETAIL.aspx?")));
}
protected void BtnSearchDetail_Click(object sender, EventArgs e)
{
string PoBillNum = TXT_BillNo.Text;
string VendName = TXT_VendName.Text;
string State = DDL_State.SelectedValue;
string PartCode = TXT_PartCode.Text;
PageContext.RegisterStartupScript(Window1.GetShowReference(string.Format("../PlanData/SCP_PO_DETAIL.aspx?PoBillNum={0}&&VendName={1}&&State={2}&&PartCode={3}", PoBillNum, VendName, State, PartCode)));
}
protected void btnModeType1_Click(object sender, EventArgs e)
{
rblist.SelectedValue = "1";
BindOrder();
}
protected void btnModeType2_Click(object sender, EventArgs e)
{
rblist.SelectedValue = "2";
BindOrder();
}
protected void Grid_V_TB_PO_RowSelect(object sender, GridRowSelectEventArgs e)
{
object[] rowDataKeys = Grid_V_TB_PO.DataKeys[e.RowIndex];
string PoBillNum = rowDataKeys[1] as string;
V_TB_PO_DETAIL _detail = new V_TB_PO_DETAIL();
_detail.PoBillNum = PoBillNum;
SCP_PO_CONTROLLER.Get_V_TB_PO_DETAIL_List(_detail, (_ret) =>
{
if (_ret.State == ReturnStatus.Succeed)
{
Grid_V_TB_PO_DETAIL.DataSource = SCP_CONTRACT_CONTROLLER.GET_CONTRACT_PRICE_LIST(SCP_PO_CONTROLLER.LOAD_PO_DETAIL_SUM(_ret.Result.ToList()));
Grid_V_TB_PO_DETAIL.DataBind();
}
});
}
protected void btnInput_Click_Contract(object sender, EventArgs e)
{
Excel_Input(BillModType.Contract);
}
protected void btnInput_Click_Non_Contract(object sender, EventArgs e)
{
Excel_Input(BillModType.Non_Contract);
}
protected void Excel_Input(BillModType p_modtype)
{
ResultObject<bool> saveret = new ResultObject<bool>();
string _fileName = FileUp.FileName;
if (string.IsNullOrEmpty(_fileName))
{
Alert.Show("选择文件为空!");
return;
}
string _lx = _fileName.Split('.')[1];
Stream _stream = FileUp.PostedFile.InputStream;
DataTable _dt = new DataTable();
if (_lx == "xls")
{
_dt = ExcelHelper.GetDataTable(_stream);
}
else
{
_dt = ExcelHelper.GetDataTableOfXlsx(_stream);
}
var list = ConvertHelper.ToList<SCP_PO_EXPORT_IMPORT_MODEL>(ExcelHelper.RemoveEmpty(_dt)).ToList();
var checkret = SCP_PO_CONTROLLER.Check_EXCEL_PO_MOD(list, p_modtype, CurrentUser.FactoryList[0], CurrentUser.SubSiteList[0]);
if (checkret.State == ReturnStatus.Failed && checkret.Result == false)
{
Alert.Show(string.Join("<br>", checkret.MessageList));
return;
}
if (ScpCache.Config.)
{
saveret = SCP_DC_UNI_CONTROLLER.WritePo(list, CurrentUser.FactoryList[0], CurrentUser.Name, DateTime.Now, p_modtype, CurrentUser.SubSiteList[0], CurrentUser.ChineseName, CurrentUser.CellPhone);
}
else
{
saveret = SCP_PO_CONTROLLER.Save_EXCEL_PO_MOD(list, CurrentUser.FactoryList[0], CurrentUser.Name, DateTime.Now, p_modtype, CurrentUser.SubSiteList[0], CurrentUser.ChineseName, CurrentUser.CellPhone);
}
if (saveret.State == ReturnStatus.Succeed && saveret.Result == true)
{
BindOrder();
Alert.Show("订单编号" + saveret.Message + "导入成功!");
return;
}
else
{
//Alert.Show(string.Join("<br>", saveret.MessageList));
Alert.Show(saveret.Message);
return;
}
}
}
}

377
SCP/Views/富维冲插件/SCP_PO_EXTEND.aspx.designer.cs

@ -0,0 +1,377 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace SCP.Views.
{
public partial class SCP_PO_EXTEND
{
/// <summary>
/// form1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// Panel1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Panel Panel1;
/// <summary>
/// Toolbar2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Toolbar Toolbar2;
/// <summary>
/// Button3 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button Button3;
/// <summary>
/// btnOutput 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button btnOutput;
/// <summary>
/// btnDetail 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button btnDetail;
/// <summary>
/// BTN_CREATE 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button BTN_CREATE;
/// <summary>
/// Button1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button Button1;
/// <summary>
/// btnShow 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button btnShow;
/// <summary>
/// btnModeType1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button btnModeType1;
/// <summary>
/// btnModeType2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button btnModeType2;
/// <summary>
/// rblist 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.RadioButtonList rblist;
/// <summary>
/// FileUp 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.FileUpload FileUp;
/// <summary>
/// btnInput_Contract 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button btnInput_Contract;
/// <summary>
/// btnInput_Non_Contract 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button btnInput_Non_Contract;
/// <summary>
/// gp1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Form gp1;
/// <summary>
/// TXT_BillNo 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_BillNo;
/// <summary>
/// DropDownList1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.DropDownList DropDownList1;
/// <summary>
/// TXT_Vendid 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_Vendid;
/// <summary>
/// TXT_VendName 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_VendName;
/// <summary>
/// TXT_ProjectId 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_ProjectId;
/// <summary>
/// DDL_State 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.DropDownList DDL_State;
/// <summary>
/// DP_StartDate 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.DatePicker DP_StartDate;
/// <summary>
/// DP_EndDate 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.DatePicker DP_EndDate;
/// <summary>
/// TXT_PartCode 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_PartCode;
/// <summary>
/// Panel5 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Panel Panel5;
/// <summary>
/// BtnClose 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button BtnClose;
/// <summary>
/// BtnSearch 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button BtnSearch;
/// <summary>
/// BtnSearchDetail 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button BtnSearchDetail;
/// <summary>
/// Panel2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Panel Panel2;
/// <summary>
/// Panel3 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Panel Panel3;
/// <summary>
/// Grid_V_TB_PO 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Grid Grid_V_TB_PO;
/// <summary>
/// ToolbarSeparator1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.ToolbarSeparator ToolbarSeparator1;
/// <summary>
/// ToolbarText1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.ToolbarText ToolbarText1;
/// <summary>
/// ddlGridPageSize 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.DropDownList ddlGridPageSize;
/// <summary>
/// Panel4 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Panel Panel4;
/// <summary>
/// Grid_V_TB_PO_DETAIL 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Grid Grid_V_TB_PO_DETAIL;
/// <summary>
/// Window1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Window Window1;
/// <summary>
/// WindowUpload 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Window WindowUpload;
/// <summary>
/// Window2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Window Window2;
}
}

43
SCP/Views/富维冲插件/SCP_PO_EXTEND_DETAIL.aspx

@ -0,0 +1,43 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SCP_PO_EXTEND_DETAIL.aspx.cs" Inherits="SCP.Views.富维冲插件.SCP_PO_EXTEND_DETAIL" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
</head>
<body>
<form id="form1" runat="server" >
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server"/>
<f:Panel ID="Panel1" CssClass="blockpanel" runat="server" ShowBorder="true" ShowHeader="true" Layout="Region">
<Toolbars>
<f:Toolbar ID="Toolbar2" runat="server">
<Items>
<f:Button ID="Btn_Save" runat="server" EnablePostBack="True" Text="保存" Icon="SystemSave" OnClick="Btn_Save_Click">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
<Items>
<f:Form runat="server" Width="550px" BodyPadding="25 25 30 25">
<Items>
<f:TextBox runat = "server" Label = "订单编号" EmptyText = "" ID = "TXT_PoBillNum" Hidden="true"/>
<f:TextBox runat = "server" Label = "零件号" EmptyText = "" ID = "TXT_PartCode" />
<f:TextBox runat = "server" Label = "数量" EmptyText = "" ID = "TXT_EN" />
<f:TextBox runat = "server" Label = "供应商编码" EmptyText = "" ID = "TXT_VendId" />
<f:TextBox runat = "server" Label = "订单创建时间" EmptyText = "" ID = "TXT_CreateTime" />
<f:TextBox runat = "server" Label = "要求到货日期" EmptyText = "" ID = "TXT_EndTime" />
<f:TextBox runat = "server" Label = "订单截止日期" EmptyText = "" ID = "TXT_Time" />
<f:TextBox runat = "server" Label = "单位" EmptyText = "" ID = "TXT_PoUnit" />
<f:TextBox runat = "server" Label = "备注" EmptyText = "" ID = "TXT_Remark" />
</Items>
</f:Form>
</Items>
</f:Panel>
</form>
</body>
</html>

35
SCP/Views/富维冲插件/SCP_PO_EXTEND_DETAIL.aspx.cs

@ -0,0 +1,35 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using CK.SCP.Models.ScpEntity;
using CK.SCP.Utils;
using CK.SCP.Common;
using CK.SCP.Controller;
using CK.SCP.Models.ScpEntity.ExcelExportEnttity;
using System.Data;
using FineUI;
namespace SCP.Views.
{
public partial class SCP_PO_EXTEND_DETAIL : PageBase
{
protected void Page_Load(object sender, EventArgs e)
{
TXT_PoBillNum.Text = "1";
}
protected void Btn_Save_Click(object sender, EventArgs e)
{
ResultObject<bool> saveret = new ResultObject<bool>();
DataTable _dt = new DataTable();
var list = ConvertHelper.ToList<SCP_PO_EXPORT_IMPORT_MODEL>(ExcelHelper.RemoveEmpty(_dt)).ToList();
var ls = SCP_PO_CONTROLLER.Save_EXCEL_PO_MOD1(list, CurrentUser.FactoryList[0], CurrentUser.Name, DateTime.Now, CurrentUser.SubSiteList[0], CurrentUser.ChineseName, CurrentUser.CellPhone, TXT_CreateTime.Text, TXT_EN.Text, TXT_EndTime.Text, TXT_PartCode.Text,
TXT_PoBillNum.Text, TXT_Remark.Text, TXT_Time.Text, TXT_VendId.Text, TXT_PoUnit.Text);
}
}
}

143
SCP/Views/富维冲插件/SCP_PO_EXTEND_DETAIL.aspx.designer.cs

@ -0,0 +1,143 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace SCP.Views.
{
public partial class SCP_PO_EXTEND_DETAIL
{
/// <summary>
/// form1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.PageManager PageManager1;
/// <summary>
/// Panel1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Panel Panel1;
/// <summary>
/// Toolbar2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Toolbar Toolbar2;
/// <summary>
/// Btn_Save 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button Btn_Save;
/// <summary>
/// TXT_PoBillNum 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_PoBillNum;
/// <summary>
/// TXT_PartCode 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_PartCode;
/// <summary>
/// TXT_EN 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_EN;
/// <summary>
/// TXT_VendId 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_VendId;
/// <summary>
/// TXT_CreateTime 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_CreateTime;
/// <summary>
/// TXT_EndTime 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_EndTime;
/// <summary>
/// TXT_Time 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_Time;
/// <summary>
/// TXT_PoUnit 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_PoUnit;
/// <summary>
/// TXT_Remark 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_Remark;
}
}
Loading…
Cancel
Save