qian
6 months ago
25 changed files with 2055 additions and 41 deletions
@ -0,0 +1,42 @@ |
|||
using CK.SCP.Utils; |
|||
using MailKit.Security; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
|
|||
namespace CK.SCP.Common |
|||
{ |
|||
public class MailManager |
|||
{ |
|||
/// <summary>
|
|||
/// 发送邮件
|
|||
/// </summary>
|
|||
/// <param name="mails"></param>
|
|||
/// <param name="mailbody"></param>
|
|||
/// <param name="p_MailTitle"></param>
|
|||
public static void SendMailOrders(string mails = "", string mailbody = "", string p_MailTitle = "") |
|||
{ |
|||
try |
|||
{ |
|||
List<EmailAddress> toList = new List<EmailAddress>(); |
|||
EmailAddress add = new EmailAddress(mails, mails); |
|||
toList.Add(add); |
|||
var smtpMailSender = new MailKitMailSender(SecureSocketOptions.StartTls); |
|||
smtpMailSender.BuildOrderMessage( |
|||
toList, |
|||
p_MailTitle, |
|||
mailbody, |
|||
"BBC" |
|||
); |
|||
smtpMailSender.SendOrder(); |
|||
} |
|||
catch (Exception e) |
|||
{ |
|||
LogHelper.Writlog(LogHelper.LogType.Error, typeof(MailManager), "MailManager", e.Message + e.InnerException?.Message); |
|||
throw e; |
|||
} |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,71 @@ |
|||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SCP_MPO_DETAIL.aspx.cs" Inherits="SCP.Views.PlanData.SCP_MPO_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 runat="server" AutoSizePanelID="Panel1" /> |
|||
<f:Panel ID="Panel1" runat="server" Title="" Layout="VBox" BoxConfigAlign="Stretch" BoxConfigPosition="Start"> |
|||
<Toolbars> |
|||
<f:Toolbar ID="Toolbar2" runat="server"> |
|||
<Items> |
|||
<f:Button ID="BTN_REFRESH" runat="server" EnablePostBack="True" Text="刷新" Icon="box"> |
|||
</f:Button> |
|||
</Items> |
|||
</f:Toolbar> |
|||
</Toolbars> |
|||
<Items> |
|||
<f:HiddenField ID="HF_GRID_INDEX" runat="server"></f:HiddenField> |
|||
<f:Grid ID="Grid_V_TB_MPO_DETAIL" EnableCollapse="true" ShowBorder="true" EnableMultiSelect="true" ShowHeader="false" runat="server" EnableCheckBoxSelect="true" |
|||
DataKeyNames="UID,PurdocNO,PurchaseReqNO,AcceptStatus,Ctype" |
|||
SortField="PurdocNO" AllowSorting="true" BoxFlex="1" SortDirection="ASC" |
|||
AllowPaging="True" |
|||
IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid_V_TB_PO_DETAIL_PageIndexChange"> |
|||
<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="10" Value="10" /> |
|||
<f:ListItem Text="40" Value="40" /> |
|||
<f:ListItem Text="80" Value="80" /> |
|||
<f:ListItem Text="100" Value="100" /> |
|||
<f:ListItem Text="200" Value="200" /> |
|||
</f:DropDownList> |
|||
</PageItems> |
|||
<Columns> |
|||
<f:BoundField Width="70px" DataField="CType_DESC" DataFormatString="{0}" HeaderText="是否作废" /> |
|||
<f:BoundField Width="100px" DataField="PurdocNO" HeaderText="订单号" DataFormatString="{0}"/> |
|||
<f:BoundField Width="100px" DataField="PurchaseReqNO" HeaderText="申请单号" DataFormatString="{0}"/> |
|||
<f:BoundField Width="100px" DataField="State_DESC" HeaderText="状态" DataFormatString="{0}"/> |
|||
<f:BoundField Width="80px" DataField="ProposerDesc" HeaderText="申请人" DataFormatString="{0}"/> |
|||
<f:BoundField Width="100px" DataField="MtlNO" HeaderText="物料号" DataFormatString="{0}"/> |
|||
<f:BoundField Width="150px" DataField="Shorttext" DataFormatString="{0}" HeaderText="物料描述" /> |
|||
<f:BoundField Width="80px" DataField="SizeCol" DataFormatString="{0}" HeaderText="型号规格" /> |
|||
<f:BoundField Width="80px" DataField="Unitdes" DataFormatString="{0}" HeaderText="单位" /> |
|||
<f:BoundField Width="100px" DataField="Quantity" DataFormatString="{0:F6}" HeaderText="数量" /> |
|||
<f:BoundField Width="80px" DataField="PRICE" DataFormatString="{0:F8}" HeaderText="价格" /> |
|||
<f:BoundField Width="80px" DataField="NetValue" DataFormatString="{0:F8}" HeaderText="金额" /> |
|||
<f:BoundField Width="100px" DataField="PurinfoReCord" DataFormatString="{0}" HeaderText="采购信息" /> |
|||
<f:BoundField Width="100px" DataField="ItemDeliveryDate" DataFormatString="{0:yyyy-MM-dd}" HeaderText="要求到货日期" /> |
|||
<f:BoundField Width="80px" DataField="Glaccnum" DataFormatString="{0}" HeaderText="科目" /> |
|||
<f:BoundField Width="80px" DataField="CostCenterDes" DataFormatString="{0}" HeaderText="成本中心" /> |
|||
<f:BoundField Width="80px" DataField="StoreLocation" DataFormatString="{0}" HeaderText="存储地点" /> |
|||
<f:BoundField Width="80px" DataField="AcceptStatus" DataFormatString="{0}" Hidden="true" /> |
|||
</Columns> |
|||
</f:Grid> |
|||
</Items> |
|||
</f:Panel> |
|||
|
|||
</form> |
|||
</body> |
|||
</html> |
@ -0,0 +1,169 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Web.UI.WebControls; |
|||
using CK.SCP.Models.ScpEntity; |
|||
using CK.SCP.Controller; |
|||
using FineUI; |
|||
using CK.SCP.Models.Enums; |
|||
|
|||
namespace SCP.Views.PlanData |
|||
{ |
|||
public partial class SCP_MPO_DETAIL : PageBase |
|||
{ |
|||
|
|||
protected void Page_Load(object sender, EventArgs e) |
|||
{ |
|||
if (!IsPostBack) |
|||
{ |
|||
if (!string.IsNullOrEmpty(Request["PurdocNO"])) |
|||
{ |
|||
BindDetail(); |
|||
} |
|||
else |
|||
{ |
|||
Alert.Show("请选择数据后再查看明细!"); |
|||
return; |
|||
} |
|||
} |
|||
} |
|||
|
|||
public void SearchV_TB_PO_DETAIL(Action<IQueryable<V_TB_MPO_DETAIL>> p_action) |
|||
{ |
|||
V_TB_MPO_DETAIL _entity = new V_TB_MPO_DETAIL(); |
|||
string purdocnolist =Request["PurdocNO"]; |
|||
_entity.purdocnolist = purdocnolist.Split(',').ToList(); |
|||
SCP_MPO_CONTROLLER.Get_V_TB_MPO_DETAIL_List(_entity,(_ret)=> { |
|||
if (_ret.State == ReturnStatus.Succeed) |
|||
{ |
|||
p_action(_ret.Result); |
|||
} |
|||
}); |
|||
} |
|||
|
|||
|
|||
public void BindDetail() |
|||
{ |
|||
SearchV_TB_PO_DETAIL((ret)=>{ |
|||
this.Grid_V_TB_MPO_DETAIL.RecordCount = ret.Count(); |
|||
var list = SortAndPage<V_TB_MPO_DETAIL>(ret, Grid_V_TB_MPO_DETAIL); |
|||
Grid_V_TB_MPO_DETAIL.DataSource = list.ToList(); |
|||
Grid_V_TB_MPO_DETAIL.DataBind(); |
|||
}); |
|||
} |
|||
|
|||
protected void Grid_V_TB_PO_DETAIL_PageIndexChange(object sender, GridPageEventArgs e) |
|||
{ |
|||
BindDetail(); |
|||
} |
|||
protected void ddlGridPageSize_SelectedIndexChanged(object sender, EventArgs e) |
|||
{ |
|||
Grid_V_TB_MPO_DETAIL.PageSize = Convert.ToInt32(ddlGridPageSize.SelectedValue); |
|||
|
|||
BindDetail(); |
|||
} |
|||
///// <summary>
|
|||
///// 审批通过
|
|||
///// </summary>
|
|||
///// <param name="sender"></param>
|
|||
///// <param name="e"></param>
|
|||
//protected void btnAccept_Click(object sender, EventArgs e)
|
|||
//{
|
|||
// int[] selections = Grid_V_TB_MPO_DETAIL.SelectedRowIndexArray;
|
|||
// List<string> NOList = new List<string>();
|
|||
// //List<string> ctylist = new List<string>();
|
|||
// List<int> AcceptStatusList = new List<int>();
|
|||
// if (selections.Count() ==0 )
|
|||
// {
|
|||
// Alert.Show("您未选择数据进行审批");
|
|||
// return;
|
|||
// }
|
|||
// else
|
|||
// {
|
|||
// foreach (int rowIndex in selections)
|
|||
// {
|
|||
// NOList.Add(Grid_V_TB_MPO_DETAIL.DataKeys[rowIndex][1] as string);
|
|||
// //ctylist.Add(Grid_V_TB_MPO_DETAIL.DataKeys[rowIndex][4] as string);
|
|||
// var app = Grid_V_TB_MPO_DETAIL.DataKeys[rowIndex][3].ToString();
|
|||
// AcceptStatusList.Add(int.Parse(app));
|
|||
// }
|
|||
// NOList = NOList.Distinct().ToList();
|
|||
// //if (ctylist.Contains("D"))
|
|||
// //{
|
|||
// // Alert.Show("选择的数据包含已经作废的数据");
|
|||
// // return;
|
|||
// //}
|
|||
// if (AcceptStatusList.Contains((int)GeneralMaterialOrderState.Finish))
|
|||
// {
|
|||
// Alert.Show("选择的数据包含已确认的数据");
|
|||
// return;
|
|||
// }
|
|||
|
|||
// var ret = SCP_MPO_CONTROLLER.Save_MPO_STATE(NOList, GeneralMaterialOrderState.Finish);
|
|||
|
|||
// if (ret.State == ReturnStatus.Succeed)
|
|||
// {
|
|||
// Alert.Show("确认成功");
|
|||
// BindDetail();
|
|||
// }
|
|||
// else
|
|||
// {
|
|||
// Alert.Show(string.Join("<br>", ret.MessageList));
|
|||
// return;
|
|||
// }
|
|||
// }
|
|||
|
|||
|
|||
//}
|
|||
///// <summary>
|
|||
///// 取消审批
|
|||
///// </summary>
|
|||
///// <param name="sender"></param>
|
|||
///// <param name="e"></param>
|
|||
//protected void btnCancel_Click(object sender, EventArgs e)
|
|||
//{
|
|||
// int[] selections = Grid_V_TB_MPO_DETAIL.SelectedRowIndexArray;
|
|||
// List<string> NOList = new List<string>();
|
|||
// List<string> ctylist = new List<string>();
|
|||
// List<int> AcceptStatusList = new List<int>();
|
|||
// if (selections.Count() == 0)
|
|||
// {
|
|||
// Alert.Show("您未选择数据进行取消审批");
|
|||
// return;
|
|||
// }
|
|||
// else
|
|||
// {
|
|||
// foreach (int rowIndex in selections)
|
|||
// {
|
|||
// NOList.Add(Grid_V_TB_MPO_DETAIL.DataKeys[rowIndex][1] as string);
|
|||
// ctylist.Add(Grid_V_TB_MPO_DETAIL.DataKeys[rowIndex][4] as string);
|
|||
// AcceptStatusList.Add(int.Parse(Grid_V_TB_MPO_DETAIL.DataKeys[rowIndex][3].ToString()));
|
|||
// }
|
|||
// NOList = NOList.Distinct().ToList();
|
|||
// if (ctylist.Contains("D"))
|
|||
// {
|
|||
// Alert.Show("选择的数据包含已经作废的数据");
|
|||
// return;
|
|||
// }
|
|||
// if (AcceptStatusList.Contains((int)GeneralMaterialOrderState.New))
|
|||
// {
|
|||
// Alert.Show("选择的数据包含新建的数据");
|
|||
// return;
|
|||
// }
|
|||
// var ret = SCP_MPO_CONTROLLER.Save_MPO_STATE(NOList, GeneralMaterialOrderState.New);
|
|||
|
|||
// if (ret.State == ReturnStatus.Succeed)
|
|||
// {
|
|||
// Alert.Show("取消成功");
|
|||
// BindDetail();
|
|||
// }
|
|||
// else
|
|||
// {
|
|||
// Alert.Show(string.Join("<br>", ret.MessageList));
|
|||
// return;
|
|||
// }
|
|||
// }
|
|||
//}
|
|||
|
|||
} |
|||
} |
@ -0,0 +1,98 @@ |
|||
//------------------------------------------------------------------------------
|
|||
// <自动生成>
|
|||
// 此代码由工具生成。
|
|||
//
|
|||
// 对此文件的更改可能导致不正确的行为,如果
|
|||
// 重新生成代码,则所做更改将丢失。
|
|||
// </自动生成>
|
|||
//------------------------------------------------------------------------------
|
|||
|
|||
namespace SCP.Views.PlanData |
|||
{ |
|||
|
|||
|
|||
public partial class SCP_MPO_DETAIL |
|||
{ |
|||
|
|||
/// <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>
|
|||
/// BTN_REFRESH 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Button BTN_REFRESH; |
|||
|
|||
/// <summary>
|
|||
/// HF_GRID_INDEX 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.HiddenField HF_GRID_INDEX; |
|||
|
|||
/// <summary>
|
|||
/// Grid_V_TB_MPO_DETAIL 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Grid Grid_V_TB_MPO_DETAIL; |
|||
|
|||
/// <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; |
|||
} |
|||
} |
@ -0,0 +1,119 @@ |
|||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SCP_PO_MATERIAL.aspx.cs" Inherits="SCP.Views.PlanData.SCP_PO_MATERIAL" %> |
|||
|
|||
<!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 runat="server" AutoSizePanelID="Panel1" /> |
|||
<f:Panel ID="Panel1" runat="server" Title="" Layout="VBox" BoxConfigAlign="Stretch" BoxConfigPosition="Start"> |
|||
<Items> |
|||
<f:Form runat="server"> |
|||
<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="btnShow" runat="server" Text="显示查询面板" OnClick="btnShow_Click"> |
|||
</f:Button> |
|||
|
|||
<f:ToolbarSeparator runat="server" /> |
|||
|
|||
</Items> |
|||
</f:Toolbar> |
|||
</Toolbars> |
|||
</f:Form> |
|||
|
|||
<f:GroupPanel runat="server" ID="gp1" Hidden="true" Layout="HBox"> |
|||
<Items> |
|||
<f:Form runat="server"> |
|||
<Rows> |
|||
|
|||
<f:FormRow runat="server" ColumnWidths="25% 25% 25% 25%"> |
|||
<Items> |
|||
<f:TextBox runat="server" Label="订单号" EmptyText="" ID="TXT_PurdocNO" /> |
|||
<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" /> |
|||
</Items> |
|||
</f:FormRow> |
|||
<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> |
|||
|
|||
|
|||
</Rows> |
|||
</f:Form> |
|||
|
|||
</Items> |
|||
</f:GroupPanel> |
|||
|
|||
<f:Grid ID="Grid_V_TB_MPO" EnableCollapse="true" ShowBorder="true" ShowHeader="true" runat="server" EnableCheckBoxSelect="true" EnableTextSelection="true" |
|||
DataKeyNames="UID,PurdocNO,BuyListStrdes,DocDate,VendorNO,VendorDesc,PurgrpDesc,AcceptStatus,ItemdeliveryDate,CreatedByDesc,CreatedBy,CreatedByPhone,Ctype,FIRSTTELNO" |
|||
CssClass="maingrid" EnableRowDoubleClickEvent="True" SortField="ApprovalStatus" |
|||
IsDatabasePaging="True" AllowPaging="True" OnRowDoubleClick="Grid_V_TB_MPO_RowDoubleClick" BoxFlex="1" |
|||
AutoScroll="True" PageSize="50" SortDirection="DESC" OnPageIndexChange="Grid_V_TB_MPO_PageIndexChange"> |
|||
<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="10" Value="10" /> |
|||
<f:ListItem Text="100" Value="100" /> |
|||
<f:ListItem Text="500" Value="500" /> |
|||
<f:ListItem Text="1000" Value="1000" /> |
|||
<f:ListItem Text="5000" Value="5000" /> |
|||
<f:ListItem Text="10000" Value="10000" /> |
|||
</f:DropDownList> |
|||
</PageItems> |
|||
|
|||
|
|||
<Columns> |
|||
<f:BoundField Width="90px" DataField="State_DESC" DataFormatString="{0}" HeaderText="状态" /> |
|||
<f:BoundField Width="80px" DataField="OASTATUS" DataFormatString="{0}" HeaderText="OA状态" /> |
|||
<f:BoundField Width="100px" DataField="PurdocNO" DataFormatString="{0}" HeaderText="订单号" /> |
|||
<f:BoundField Width="100px" DataField="BuyListStrdes" DataFormatString="{0}" HeaderText="凭证类型" /> |
|||
<f:BoundField Width="100px" SortField="DocDate" DataField="DocDate" DataFormatString="{0:yyyy-MM-dd}" HeaderText="订货日期" /> |
|||
<f:BoundField Width="100px" DataField="VendorNO" DataFormatString="{0}" HeaderText="供应商编码" /> |
|||
<f:BoundField Width="100px" DataField="VendorDesc" HeaderText="供应商描述" /> |
|||
<f:BoundField Width="100px" DataField="PurgrpDesc" DataFormatString="{0}" HeaderText="收货人" /> |
|||
<f:BoundField Width="100px" DataField="ItemdeliveryDate" DataFormatString="{0:yyyy-MM-dd}" HeaderText="交货日程日期" /> |
|||
<f:BoundField Width="100px" DataField="CreatedByDesc" DataFormatString="{0}" HeaderText="创建人" /> |
|||
<f:BoundField Width="100px" DataField="CreatedByPhone" DataFormatString="{0}" HeaderText="创建人电话" /> |
|||
<f:BoundField Width="100px" DataField="FIRSTTELNO" DataFormatString="{0}" HeaderText="供应商联系电话" /> |
|||
<f:BoundField Width="100px" DataField="CType_DESC" DataFormatString="{0}" HeaderText="是否已作废" /> |
|||
</Columns> |
|||
|
|||
|
|||
</f:Grid> |
|||
</Items> |
|||
</f:Panel> |
|||
<f:Window runat="server" ID="Window1" Hidden="True" Height="600px" Width="1000px" AutoScroll="True" OnClose="Window1_Close" CloseAction="HidePostBack" |
|||
WindowPosition="Center" IsModal="true" Title="明细详情" Target="Parent" EnableIFrame="true" |
|||
IFrameUrl="about:blank" /> |
|||
</form> |
|||
</body> |
|||
</html> |
@ -0,0 +1,246 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Web.UI.WebControls; |
|||
using CK.SCP.Models.ScpEntity; |
|||
using CK.SCP.Controller; |
|||
using FineUI; |
|||
using System.Text; |
|||
using CK.SCP.Models.Enums; |
|||
|
|||
namespace SCP.Views.PlanData |
|||
{ |
|||
public partial class SCP_PO_MATERIAL : 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_MPO((result) => |
|||
{ |
|||
Grid_V_TB_MPO.RecordCount = result.Count(); |
|||
var list = SortAndPage<V_TB_MPO>(result, Grid_V_TB_MPO); |
|||
Grid_V_TB_MPO.DataSource = list; |
|||
Grid_V_TB_MPO.DataBind(); |
|||
}); |
|||
|
|||
} |
|||
|
|||
public void SearchV_TB_MPO(Action<IQueryable<V_TB_MPO>> p_action) |
|||
{ |
|||
|
|||
V_TB_MPO _entity = new V_TB_MPO(); |
|||
|
|||
if (this.DP_StartDate.SelectedDate != null) |
|||
{ |
|||
_entity.DocDateBegin = Convert.ToDateTime(DP_StartDate.SelectedDate); |
|||
} |
|||
if (DP_EndDate.SelectedDate != null) |
|||
{ |
|||
_entity.DocDateEnd = Convert.ToDateTime(DP_EndDate.SelectedDate); |
|||
} |
|||
_entity.PurdocNO = TXT_PurdocNO.Text; |
|||
_entity.UserInVendIds = CurrentUser.VenderList; |
|||
SCP_MPO_CONTROLLER.Get_V_TB_MPO_List(_entity, (_ret) => |
|||
{ |
|||
if (_ret.State == ReturnStatus.Succeed) |
|||
{ |
|||
p_action(_ret.Result); |
|||
} |
|||
}); |
|||
} |
|||
|
|||
protected void Grid_V_TB_MPO_RowDoubleClick(object sender, FineUI.GridRowClickEventArgs e) |
|||
{ |
|||
int[] selections = Grid_V_TB_MPO.SelectedRowIndexArray; |
|||
List<string> NOList = new List<string>(); |
|||
if (selections.Count() > 0) |
|||
{ |
|||
foreach (int rowIndex in selections) |
|||
{ |
|||
NOList.Add(Grid_V_TB_MPO.DataKeys[rowIndex][1] as string); |
|||
} |
|||
string BillNum = String.Join(",", NOList); |
|||
string url = string.Format("../PlanData/SCP_MPO_DETAIL.aspx?PurdocNO={0}", BillNum); |
|||
PageContext.RegisterStartupScript(Window1.GetShowReference(url)); |
|||
} |
|||
else |
|||
{ |
|||
Alert.Show("请选择数据后再进行查看明细"); |
|||
return; |
|||
} |
|||
|
|||
} |
|||
|
|||
protected void Grid_V_TB_MPO_PageIndexChange(object sender, FineUI.GridPageEventArgs e) |
|||
{ |
|||
BindOrder(); |
|||
} |
|||
|
|||
|
|||
/// <summary>
|
|||
/// 导出
|
|||
/// </summary>
|
|||
/// <param name="sender"></param>
|
|||
/// <param name="e"></param>
|
|||
protected void btnOutput_Click(object sender, EventArgs e) |
|||
{ |
|||
int[] selections = Grid_V_TB_MPO.SelectedRowIndexArray; |
|||
List<string> NOList = new List<string>(); |
|||
if (selections.Count() > 0) |
|||
{ |
|||
foreach (int rowIndex in selections) |
|||
{ |
|||
var ctypesta = Grid_V_TB_MPO.DataKeys[rowIndex][13] as string; |
|||
if (ctypesta == "D") |
|||
{ |
|||
PageContext.RegisterStartupScript(Alert.GetShowInTopReference("选中的数据包含作废信息,请重新选择!")); |
|||
return; |
|||
} |
|||
NOList.Add(Grid_V_TB_MPO.DataKeys[rowIndex][1] as string); |
|||
} |
|||
} |
|||
else |
|||
{ |
|||
PageContext.RegisterStartupScript(Alert.GetShowInTopReference("没有选择数据!")); |
|||
return; |
|||
} |
|||
NOList = NOList.Distinct().ToList(); |
|||
var ret = SCP_MPO_CONTROLLER.GetMPODetailList(NOList); |
|||
Dictionary<string, string> cellheader = new Dictionary<string, string> |
|||
{ |
|||
{ "PurdocNO", "订单号" }, |
|||
{ "PurchaseReqNO", "申请单号" }, |
|||
{ "ProposerDesc", "申请人" }, |
|||
{ "OASTATUS", "OA审批状态" }, |
|||
{ "MtlNO", "物料号" }, |
|||
{ "Shorttext", "物料描述" }, |
|||
{ "SizeCol", "型号规格" }, |
|||
{ "Matbrand", "材料牌号" }, |
|||
{ "Unitdes", "单位" }, |
|||
{ "Quantity", "数量" }, |
|||
{ "PRICE", "价格" }, |
|||
{ "NetValue", "金额" }, |
|||
{ "PurinfoReCord", "采购信息" }, |
|||
{ "ItemDeliveryDate", "要求到货日期" }, |
|||
{ "Glaccnum", "科目" }, |
|||
{ "CostCenterDes", "成本中心" }, |
|||
{ "StoreLocation", "存储地点" }, |
|||
{ "CType_DESC","是否已作废"}, |
|||
}; |
|||
string url = EntityListToExcel2003(cellheader, ret.ToList(), "一般材料采购订单明细"); |
|||
|
|||
} |
|||
|
|||
protected void btnDetail_Click(object sender, EventArgs e) |
|||
{ |
|||
int[] selections = Grid_V_TB_MPO.SelectedRowIndexArray; |
|||
List<string> NOList = new List<string>(); |
|||
if (selections.Count() > 0) |
|||
{ |
|||
foreach (int rowIndex in selections) |
|||
{ |
|||
NOList.Add(Grid_V_TB_MPO.DataKeys[rowIndex][1] as string); |
|||
} |
|||
string BillNum = String.Join(",", NOList); |
|||
string url = string.Format("../PlanData/SCP_MPO_DETAIL.aspx?PurdocNO={0}", BillNum); |
|||
PageContext.RegisterStartupScript(Window1.GetShowReference(url)); |
|||
} |
|||
else |
|||
{ |
|||
Alert.Show("请选择数据后再进行查看明细"); |
|||
return; |
|||
} |
|||
} |
|||
|
|||
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_MPO.PageSize = Convert.ToInt32(ddlGridPageSize.SelectedValue); |
|||
|
|||
BindOrder(); |
|||
} |
|||
|
|||
protected void Window1_Close(object sender, WindowCloseEventArgs e) |
|||
{ |
|||
BindOrder(); |
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
///// <summary>
|
|||
///// 打印
|
|||
///// </summary>
|
|||
///// <param name="sender"></param>
|
|||
///// <param name="e"></param>
|
|||
//protected void btnPrinter_Click(object sender, EventArgs e)
|
|||
//{
|
|||
// int[] selections = Grid_V_TB_MPO.SelectedRowIndexArray;
|
|||
// string PurdocNO = "";
|
|||
// int acc = 0;
|
|||
// string status = "";
|
|||
// if (selections.Count() == 0)
|
|||
// {
|
|||
// Alert.Show("请选择要打印的数据");
|
|||
// return;
|
|||
// }
|
|||
// else if (selections.Count() > 1)
|
|||
// {
|
|||
// Alert.Show("只能选择一条数据进行打印");
|
|||
// return;
|
|||
// }
|
|||
// else
|
|||
// {
|
|||
// foreach (int rowIndex in selections)
|
|||
// {
|
|||
// PurdocNO = Grid_V_TB_MPO.DataKeys[rowIndex][1] as string;
|
|||
// acc = int.Parse(Grid_V_TB_MPO.DataKeys[rowIndex][7].ToString());
|
|||
// status = Grid_V_TB_MPO.DataKeys[rowIndex][12] as string;
|
|||
// if (status =="D")
|
|||
// {
|
|||
// Alert.Show("已作废的数据不可以进行打印");
|
|||
// return;
|
|||
// }
|
|||
// }
|
|||
// if (acc == (int)GeneralMaterialOrderState.New)
|
|||
// {
|
|||
// Alert.Show("供应商确认过的数据才可以打印");
|
|||
// return;
|
|||
// }
|
|||
// var str = string.Format("window.open(\"../../Handlers/GenerateReport.ashx?report=GeneralMaterialOrder&data=131&type=pdf&filename=标签.pdf&PurdocNO={0}&open=\")", PurdocNO);
|
|||
// PageContext.RegisterStartupScript(str);
|
|||
// }
|
|||
//}
|
|||
} |
|||
} |
@ -0,0 +1,179 @@ |
|||
//------------------------------------------------------------------------------
|
|||
// <自动生成>
|
|||
// 此代码由工具生成。
|
|||
//
|
|||
// 对此文件的更改可能导致不正确的行为,如果
|
|||
// 重新生成代码,则所做更改将丢失。
|
|||
// </自动生成>
|
|||
//------------------------------------------------------------------------------
|
|||
|
|||
namespace SCP.Views.PlanData |
|||
{ |
|||
|
|||
|
|||
public partial class SCP_PO_MATERIAL |
|||
{ |
|||
|
|||
/// <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>
|
|||
/// btnShow 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Button btnShow; |
|||
|
|||
/// <summary>
|
|||
/// gp1 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.GroupPanel gp1; |
|||
|
|||
/// <summary>
|
|||
/// TXT_PurdocNO 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.TextBox TXT_PurdocNO; |
|||
|
|||
/// <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>
|
|||
/// BtnClose 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Button BtnClose; |
|||
|
|||
/// <summary>
|
|||
/// BtnSearch 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Button BtnSearch; |
|||
|
|||
/// <summary>
|
|||
/// Grid_V_TB_MPO 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Grid Grid_V_TB_MPO; |
|||
|
|||
/// <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>
|
|||
/// Window1 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Window Window1; |
|||
} |
|||
} |
@ -0,0 +1,75 @@ |
|||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SCP_MPO_DETAIL.aspx.cs" Inherits="SCP.Views.SupplierData.SCP_MPO_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 runat="server" AutoSizePanelID="Panel1" /> |
|||
<f:Panel ID="Panel1" runat="server" Title="" Layout="VBox" BoxConfigAlign="Stretch" BoxConfigPosition="Start"> |
|||
<Toolbars> |
|||
<f:Toolbar ID="Toolbar2" runat="server"> |
|||
<Items> |
|||
<f:Button ID="BTN_REFRESH" runat="server" EnablePostBack="True" Text="刷新" Icon="box"> |
|||
</f:Button> |
|||
<f:Button ID="btnAccept" runat="server" Text="确认订单" Icon="Accept" OnClick="btnAccept_Click" > |
|||
</f:Button> |
|||
<f:Button ID="btnCancel" runat="server" Text="取消订单" Icon="Cancel" OnClick="btnCancel_Click" > |
|||
</f:Button> |
|||
</Items> |
|||
</f:Toolbar> |
|||
</Toolbars> |
|||
<Items> |
|||
<f:HiddenField ID="HF_GRID_INDEX" runat="server"></f:HiddenField> |
|||
<f:Grid ID="Grid_V_TB_MPO_DETAIL" EnableCollapse="true" ShowBorder="true" EnableMultiSelect="true" ShowHeader="false" runat="server" EnableCheckBoxSelect="true" |
|||
DataKeyNames="UID,PurdocNO,PurchaseReqNO,AcceptStatus,Ctype" |
|||
SortField="PurdocNO" AllowSorting="true" BoxFlex="1" SortDirection="ASC" |
|||
AllowPaging="True" |
|||
IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid_V_TB_PO_DETAIL_PageIndexChange"> |
|||
<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="10" Value="10" /> |
|||
<f:ListItem Text="40" Value="40" /> |
|||
<f:ListItem Text="80" Value="80" /> |
|||
<f:ListItem Text="100" Value="100" /> |
|||
<f:ListItem Text="200" Value="200" /> |
|||
</f:DropDownList> |
|||
</PageItems> |
|||
<Columns> |
|||
<f:BoundField Width="70px" DataField="CType_DESC" DataFormatString="{0}" HeaderText="是否作废" /> |
|||
<f:BoundField Width="100px" DataField="PurdocNO" HeaderText="订单号" DataFormatString="{0}"/> |
|||
<f:BoundField Width="100px" DataField="PurchaseReqNO" HeaderText="申请单号" DataFormatString="{0}"/> |
|||
<f:BoundField Width="100px" DataField="State_DESC" HeaderText="状态" DataFormatString="{0}"/> |
|||
<f:BoundField Width="80px" DataField="ProposerDesc" HeaderText="申请人" DataFormatString="{0}"/> |
|||
<f:BoundField Width="100px" DataField="MtlNO" HeaderText="物料号" DataFormatString="{0}"/> |
|||
<f:BoundField Width="150px" DataField="Shorttext" DataFormatString="{0}" HeaderText="物料描述" /> |
|||
<f:BoundField Width="80px" DataField="SizeCol" DataFormatString="{0}" HeaderText="型号规格" /> |
|||
<f:BoundField Width="80px" DataField="Unitdes" DataFormatString="{0}" HeaderText="单位" /> |
|||
<f:BoundField Width="100px" DataField="Quantity" DataFormatString="{0:F6}" HeaderText="数量" /> |
|||
<f:BoundField Width="80px" DataField="PRICE" DataFormatString="{0:F8}" HeaderText="价格" /> |
|||
<f:BoundField Width="80px" DataField="NetValue" DataFormatString="{0:F8}" HeaderText="金额" /> |
|||
<f:BoundField Width="100px" DataField="PurinfoReCord" DataFormatString="{0}" HeaderText="采购信息" /> |
|||
<f:BoundField Width="100px" DataField="ItemDeliveryDate" DataFormatString="{0:yyyy-MM-dd}" HeaderText="要求到货日期" /> |
|||
<f:BoundField Width="80px" DataField="Glaccnum" DataFormatString="{0}" HeaderText="科目" /> |
|||
<f:BoundField Width="80px" DataField="CostCenterDes" DataFormatString="{0}" HeaderText="成本中心" /> |
|||
<f:BoundField Width="80px" DataField="StoreLocation" DataFormatString="{0}" HeaderText="存储地点" /> |
|||
<f:BoundField Width="80px" DataField="AcceptStatus" DataFormatString="{0}" Hidden="true" /> |
|||
</Columns> |
|||
</f:Grid> |
|||
</Items> |
|||
</f:Panel> |
|||
|
|||
</form> |
|||
</body> |
|||
</html> |
@ -0,0 +1,169 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Web.UI.WebControls; |
|||
using CK.SCP.Models.ScpEntity; |
|||
using CK.SCP.Controller; |
|||
using FineUI; |
|||
using CK.SCP.Models.Enums; |
|||
|
|||
namespace SCP.Views.SupplierData |
|||
{ |
|||
public partial class SCP_MPO_DETAIL : PageBase |
|||
{ |
|||
|
|||
protected void Page_Load(object sender, EventArgs e) |
|||
{ |
|||
if (!IsPostBack) |
|||
{ |
|||
if (!string.IsNullOrEmpty(Request["PurdocNO"])) |
|||
{ |
|||
BindDetail(); |
|||
} |
|||
else |
|||
{ |
|||
Alert.Show("请选择数据后再查看明细!"); |
|||
return; |
|||
} |
|||
} |
|||
} |
|||
|
|||
public void SearchV_TB_PO_DETAIL(Action<IQueryable<V_TB_MPO_DETAIL>> p_action) |
|||
{ |
|||
V_TB_MPO_DETAIL _entity = new V_TB_MPO_DETAIL(); |
|||
string purdocnolist =Request["PurdocNO"]; |
|||
_entity.purdocnolist = purdocnolist.Split(',').ToList(); |
|||
SCP_MPO_CONTROLLER.Get_V_TB_MPO_DETAIL_List(_entity,(_ret)=> { |
|||
if (_ret.State == ReturnStatus.Succeed) |
|||
{ |
|||
p_action(_ret.Result); |
|||
} |
|||
}); |
|||
} |
|||
|
|||
|
|||
public void BindDetail() |
|||
{ |
|||
SearchV_TB_PO_DETAIL((ret)=>{ |
|||
this.Grid_V_TB_MPO_DETAIL.RecordCount = ret.Count(); |
|||
var list = SortAndPage<V_TB_MPO_DETAIL>(ret, Grid_V_TB_MPO_DETAIL); |
|||
Grid_V_TB_MPO_DETAIL.DataSource = list.ToList(); |
|||
Grid_V_TB_MPO_DETAIL.DataBind(); |
|||
}); |
|||
} |
|||
|
|||
protected void Grid_V_TB_PO_DETAIL_PageIndexChange(object sender, GridPageEventArgs e) |
|||
{ |
|||
BindDetail(); |
|||
} |
|||
protected void ddlGridPageSize_SelectedIndexChanged(object sender, EventArgs e) |
|||
{ |
|||
Grid_V_TB_MPO_DETAIL.PageSize = Convert.ToInt32(ddlGridPageSize.SelectedValue); |
|||
|
|||
BindDetail(); |
|||
} |
|||
/// <summary>
|
|||
/// 审批通过
|
|||
/// </summary>
|
|||
/// <param name="sender"></param>
|
|||
/// <param name="e"></param>
|
|||
protected void btnAccept_Click(object sender, EventArgs e) |
|||
{ |
|||
int[] selections = Grid_V_TB_MPO_DETAIL.SelectedRowIndexArray; |
|||
List<string> NOList = new List<string>(); |
|||
//List<string> ctylist = new List<string>();
|
|||
List<int> AcceptStatusList = new List<int>(); |
|||
if (selections.Count() ==0 ) |
|||
{ |
|||
Alert.Show("您未选择数据进行审批"); |
|||
return; |
|||
} |
|||
else |
|||
{ |
|||
foreach (int rowIndex in selections) |
|||
{ |
|||
NOList.Add(Grid_V_TB_MPO_DETAIL.DataKeys[rowIndex][1] as string); |
|||
//ctylist.Add(Grid_V_TB_MPO_DETAIL.DataKeys[rowIndex][4] as string);
|
|||
var app = Grid_V_TB_MPO_DETAIL.DataKeys[rowIndex][3].ToString(); |
|||
AcceptStatusList.Add(int.Parse(app)); |
|||
} |
|||
NOList = NOList.Distinct().ToList(); |
|||
//if (ctylist.Contains("D"))
|
|||
//{
|
|||
// Alert.Show("选择的数据包含已经作废的数据");
|
|||
// return;
|
|||
//}
|
|||
if (AcceptStatusList.Contains((int)GeneralMaterialOrderState.Finish)) |
|||
{ |
|||
Alert.Show("选择的数据包含已确认的数据"); |
|||
return; |
|||
} |
|||
|
|||
var ret = SCP_MPO_CONTROLLER.Save_MPO_STATE(NOList, GeneralMaterialOrderState.Finish); |
|||
|
|||
if (ret.State == ReturnStatus.Succeed) |
|||
{ |
|||
Alert.Show("确认成功"); |
|||
BindDetail(); |
|||
} |
|||
else |
|||
{ |
|||
Alert.Show(string.Join("<br>", ret.MessageList)); |
|||
return; |
|||
} |
|||
} |
|||
|
|||
|
|||
} |
|||
/// <summary>
|
|||
/// 取消审批
|
|||
/// </summary>
|
|||
/// <param name="sender"></param>
|
|||
/// <param name="e"></param>
|
|||
protected void btnCancel_Click(object sender, EventArgs e) |
|||
{ |
|||
int[] selections = Grid_V_TB_MPO_DETAIL.SelectedRowIndexArray; |
|||
List<string> NOList = new List<string>(); |
|||
List<string> ctylist = new List<string>(); |
|||
List<int> AcceptStatusList = new List<int>(); |
|||
if (selections.Count() == 0) |
|||
{ |
|||
Alert.Show("您未选择数据进行取消审批"); |
|||
return; |
|||
} |
|||
else |
|||
{ |
|||
foreach (int rowIndex in selections) |
|||
{ |
|||
NOList.Add(Grid_V_TB_MPO_DETAIL.DataKeys[rowIndex][1] as string); |
|||
ctylist.Add(Grid_V_TB_MPO_DETAIL.DataKeys[rowIndex][4] as string); |
|||
AcceptStatusList.Add(int.Parse(Grid_V_TB_MPO_DETAIL.DataKeys[rowIndex][3].ToString())); |
|||
} |
|||
NOList = NOList.Distinct().ToList(); |
|||
//if (ctylist.Contains("D"))
|
|||
//{
|
|||
// Alert.Show("选择的数据包含已经作废的数据");
|
|||
// return;
|
|||
//}
|
|||
if (AcceptStatusList.Contains((int)GeneralMaterialOrderState.New)) |
|||
{ |
|||
Alert.Show("选择的数据包含新建的数据"); |
|||
return; |
|||
} |
|||
var ret = SCP_MPO_CONTROLLER.Save_MPO_STATE(NOList, GeneralMaterialOrderState.New); |
|||
|
|||
if (ret.State == ReturnStatus.Succeed) |
|||
{ |
|||
Alert.Show("取消成功"); |
|||
BindDetail(); |
|||
} |
|||
else |
|||
{ |
|||
Alert.Show(string.Join("<br>", ret.MessageList)); |
|||
return; |
|||
} |
|||
} |
|||
} |
|||
|
|||
} |
|||
} |
@ -0,0 +1,116 @@ |
|||
//------------------------------------------------------------------------------
|
|||
// <自动生成>
|
|||
// 此代码由工具生成。
|
|||
//
|
|||
// 对此文件的更改可能导致不正确的行为,如果
|
|||
// 重新生成代码,则所做更改将丢失。
|
|||
// </自动生成>
|
|||
//------------------------------------------------------------------------------
|
|||
|
|||
namespace SCP.Views.SupplierData |
|||
{ |
|||
|
|||
|
|||
public partial class SCP_MPO_DETAIL |
|||
{ |
|||
|
|||
/// <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>
|
|||
/// BTN_REFRESH 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Button BTN_REFRESH; |
|||
|
|||
/// <summary>
|
|||
/// btnAccept 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Button btnAccept; |
|||
|
|||
/// <summary>
|
|||
/// btnCancel 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Button btnCancel; |
|||
|
|||
/// <summary>
|
|||
/// HF_GRID_INDEX 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.HiddenField HF_GRID_INDEX; |
|||
|
|||
/// <summary>
|
|||
/// Grid_V_TB_MPO_DETAIL 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Grid Grid_V_TB_MPO_DETAIL; |
|||
|
|||
/// <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; |
|||
} |
|||
} |
@ -0,0 +1,119 @@ |
|||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SCP_PO_MATERIAL.aspx.cs" Inherits="SCP.Views.SupplierData.SCP_PO_MATERIAL" %> |
|||
|
|||
<!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 runat="server" AutoSizePanelID="Panel1" /> |
|||
<f:Panel ID="Panel1" runat="server" Title="" Layout="VBox" BoxConfigAlign="Stretch" BoxConfigPosition="Start"> |
|||
<Items> |
|||
<f:Form runat="server"> |
|||
<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="btnShow" runat="server" Text="显示查询面板" OnClick="btnShow_Click"> |
|||
</f:Button> |
|||
|
|||
<f:ToolbarSeparator runat="server" /> |
|||
<f:Button ID="btnPrinter" runat="server" Text="打印" Icon="Printer" OnClick="btnPrinter_Click"></f:Button> |
|||
</Items> |
|||
</f:Toolbar> |
|||
</Toolbars> |
|||
</f:Form> |
|||
|
|||
<f:GroupPanel runat="server" ID="gp1" Hidden="true" Layout="HBox"> |
|||
<Items> |
|||
<f:Form runat="server"> |
|||
<Rows> |
|||
|
|||
<f:FormRow runat="server" ColumnWidths="25% 25% 25% 25%"> |
|||
<Items> |
|||
<f:TextBox runat="server" Label="订单号" EmptyText="" ID="TXT_PurdocNO" /> |
|||
<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" /> |
|||
</Items> |
|||
</f:FormRow> |
|||
<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> |
|||
|
|||
|
|||
</Rows> |
|||
</f:Form> |
|||
|
|||
</Items> |
|||
</f:GroupPanel> |
|||
|
|||
<f:Grid ID="Grid_V_TB_MPO" EnableCollapse="true" ShowBorder="true" ShowHeader="true" runat="server" EnableCheckBoxSelect="true" EnableTextSelection="true" |
|||
DataKeyNames="UID,PurdocNO,BuyListStrdes,DocDate,VendorNO,VendorDesc,PurgrpDesc,AcceptStatus,ItemdeliveryDate,CreatedByDesc,CreatedBy,CreatedByPhone,Ctype,FIRSTTELNO" |
|||
CssClass="maingrid" EnableRowDoubleClickEvent="True" SortField="ApprovalStatus" |
|||
IsDatabasePaging="True" AllowPaging="True" OnRowDoubleClick="Grid_V_TB_MPO_RowDoubleClick" BoxFlex="1" |
|||
AutoScroll="True" PageSize="50" SortDirection="DESC" OnPageIndexChange="Grid_V_TB_MPO_PageIndexChange"> |
|||
<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="10" Value="10" /> |
|||
<f:ListItem Text="100" Value="100" /> |
|||
<f:ListItem Text="500" Value="500" /> |
|||
<f:ListItem Text="1000" Value="1000" /> |
|||
<f:ListItem Text="5000" Value="5000" /> |
|||
<f:ListItem Text="10000" Value="10000" /> |
|||
</f:DropDownList> |
|||
</PageItems> |
|||
|
|||
|
|||
<Columns> |
|||
<f:BoundField Width="90px" DataField="State_DESC" DataFormatString="{0}" HeaderText="状态" /> |
|||
<f:BoundField Width="80px" DataField="OASTATUS" DataFormatString="{0}" HeaderText="OA状态" /> |
|||
<f:BoundField Width="100px" DataField="PurdocNO" DataFormatString="{0}" HeaderText="订单号" /> |
|||
<f:BoundField Width="100px" DataField="BuyListStrdes" DataFormatString="{0}" HeaderText="凭证类型" /> |
|||
<f:BoundField Width="100px" SortField="DocDate" DataField="DocDate" DataFormatString="{0:yyyy-MM-dd}" HeaderText="订货日期" /> |
|||
<f:BoundField Width="100px" DataField="VendorNO" DataFormatString="{0}" HeaderText="供应商编码" /> |
|||
<f:BoundField Width="100px" DataField="VendorDesc" HeaderText="供应商描述" /> |
|||
<f:BoundField Width="100px" DataField="PurgrpDesc" DataFormatString="{0}" HeaderText="收货人" /> |
|||
<f:BoundField Width="100px" DataField="ItemdeliveryDate" DataFormatString="{0:yyyy-MM-dd}" HeaderText="交货日程日期" /> |
|||
<f:BoundField Width="100px" DataField="CreatedByDesc" DataFormatString="{0}" HeaderText="创建人" /> |
|||
<f:BoundField Width="100px" DataField="CreatedByPhone" DataFormatString="{0}" HeaderText="创建人电话" /> |
|||
<f:BoundField Width="100px" DataField="FIRSTTELNO" DataFormatString="{0}" HeaderText="供应商联系电话" /> |
|||
<f:BoundField Width="100px" DataField="CType_DESC" DataFormatString="{0}" HeaderText="是否已作废" /> |
|||
</Columns> |
|||
|
|||
|
|||
</f:Grid> |
|||
</Items> |
|||
</f:Panel> |
|||
<f:Window runat="server" ID="Window1" Hidden="True" Height="600px" Width="1000px" AutoScroll="True" OnClose="Window1_Close" CloseAction="HidePostBack" |
|||
WindowPosition="Center" IsModal="true" Title="明细详情" Target="Parent" EnableIFrame="true" |
|||
IFrameUrl="about:blank" /> |
|||
</form> |
|||
</body> |
|||
</html> |
@ -0,0 +1,246 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Web.UI.WebControls; |
|||
using CK.SCP.Models.ScpEntity; |
|||
using CK.SCP.Controller; |
|||
using FineUI; |
|||
using System.Text; |
|||
using CK.SCP.Models.Enums; |
|||
|
|||
namespace SCP.Views.SupplierData |
|||
{ |
|||
public partial class SCP_PO_MATERIAL : 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_MPO((result) => |
|||
{ |
|||
Grid_V_TB_MPO.RecordCount = result.Count(); |
|||
var list = SortAndPage<V_TB_MPO>(result, Grid_V_TB_MPO); |
|||
Grid_V_TB_MPO.DataSource = list; |
|||
Grid_V_TB_MPO.DataBind(); |
|||
}); |
|||
|
|||
} |
|||
|
|||
public void SearchV_TB_MPO(Action<IQueryable<V_TB_MPO>> p_action) |
|||
{ |
|||
|
|||
V_TB_MPO _entity = new V_TB_MPO(); |
|||
|
|||
if (this.DP_StartDate.SelectedDate != null) |
|||
{ |
|||
_entity.DocDateBegin = Convert.ToDateTime(DP_StartDate.SelectedDate); |
|||
} |
|||
if (DP_EndDate.SelectedDate != null) |
|||
{ |
|||
_entity.DocDateEnd = Convert.ToDateTime(DP_EndDate.SelectedDate); |
|||
} |
|||
_entity.PurdocNO = TXT_PurdocNO.Text; |
|||
_entity.UserInVendIds = CurrentUser.VenderList; |
|||
SCP_MPO_CONTROLLER.Get_V_TB_MPO_List(_entity, (_ret) => |
|||
{ |
|||
if (_ret.State == ReturnStatus.Succeed) |
|||
{ |
|||
p_action(_ret.Result); |
|||
} |
|||
}); |
|||
} |
|||
|
|||
protected void Grid_V_TB_MPO_RowDoubleClick(object sender, FineUI.GridRowClickEventArgs e) |
|||
{ |
|||
int[] selections = Grid_V_TB_MPO.SelectedRowIndexArray; |
|||
List<string> NOList = new List<string>(); |
|||
if (selections.Count() > 0) |
|||
{ |
|||
foreach (int rowIndex in selections) |
|||
{ |
|||
NOList.Add(Grid_V_TB_MPO.DataKeys[rowIndex][1] as string); |
|||
} |
|||
string BillNum = String.Join(",", NOList); |
|||
string url = string.Format("../SupplierData/SCP_MPO_DETAIL.aspx?PurdocNO={0}", BillNum); |
|||
PageContext.RegisterStartupScript(Window1.GetShowReference(url)); |
|||
} |
|||
else |
|||
{ |
|||
Alert.Show("请选择数据后再进行查看明细"); |
|||
return; |
|||
} |
|||
|
|||
} |
|||
|
|||
protected void Grid_V_TB_MPO_PageIndexChange(object sender, FineUI.GridPageEventArgs e) |
|||
{ |
|||
BindOrder(); |
|||
} |
|||
|
|||
|
|||
/// <summary>
|
|||
/// 导出
|
|||
/// </summary>
|
|||
/// <param name="sender"></param>
|
|||
/// <param name="e"></param>
|
|||
protected void btnOutput_Click(object sender, EventArgs e) |
|||
{ |
|||
int[] selections = Grid_V_TB_MPO.SelectedRowIndexArray; |
|||
List<string> NOList = new List<string>(); |
|||
if (selections.Count() > 0) |
|||
{ |
|||
foreach (int rowIndex in selections) |
|||
{ |
|||
var ctypesta = Grid_V_TB_MPO.DataKeys[rowIndex][13] as string; |
|||
if (ctypesta == "D") |
|||
{ |
|||
PageContext.RegisterStartupScript(Alert.GetShowInTopReference("选中的数据包含作废信息,请重新选择!")); |
|||
return; |
|||
} |
|||
NOList.Add(Grid_V_TB_MPO.DataKeys[rowIndex][1] as string); |
|||
} |
|||
} |
|||
else |
|||
{ |
|||
PageContext.RegisterStartupScript(Alert.GetShowInTopReference("没有选择数据!")); |
|||
return; |
|||
} |
|||
NOList = NOList.Distinct().ToList(); |
|||
var ret = SCP_MPO_CONTROLLER.GetMPODetailList(NOList); |
|||
Dictionary<string, string> cellheader = new Dictionary<string, string> |
|||
{ |
|||
{ "PurdocNO", "订单号" }, |
|||
{ "PurchaseReqNO", "申请单号" }, |
|||
{ "ProposerDesc", "申请人" }, |
|||
{ "OASTATUS", "OA审批状态" }, |
|||
{ "MtlNO", "物料号" }, |
|||
{ "Shorttext", "物料描述" }, |
|||
{ "SizeCol", "型号规格" }, |
|||
{ "Matbrand", "材料牌号" }, |
|||
{ "Unitdes", "单位" }, |
|||
{ "Quantity", "数量" }, |
|||
{ "PRICE", "价格" }, |
|||
{ "NetValue", "金额" }, |
|||
{ "PurinfoReCord", "采购信息" }, |
|||
{ "ItemDeliveryDate", "要求到货日期" }, |
|||
{ "Glaccnum", "科目" }, |
|||
{ "CostCenterDes", "成本中心" }, |
|||
{ "StoreLocation", "存储地点" }, |
|||
{ "CType_DESC","是否已作废"}, |
|||
}; |
|||
string url = EntityListToExcel2003(cellheader, ret.ToList(), "一般材料采购订单明细"); |
|||
|
|||
} |
|||
|
|||
protected void btnDetail_Click(object sender, EventArgs e) |
|||
{ |
|||
int[] selections = Grid_V_TB_MPO.SelectedRowIndexArray; |
|||
List<string> NOList = new List<string>(); |
|||
if (selections.Count() > 0) |
|||
{ |
|||
foreach (int rowIndex in selections) |
|||
{ |
|||
NOList.Add(Grid_V_TB_MPO.DataKeys[rowIndex][1] as string); |
|||
} |
|||
string BillNum = String.Join(",", NOList); |
|||
string url = string.Format("../SupplierData/SCP_MPO_DETAIL.aspx?PurdocNO={0}", BillNum); |
|||
PageContext.RegisterStartupScript(Window1.GetShowReference(url)); |
|||
} |
|||
else |
|||
{ |
|||
Alert.Show("请选择数据后再进行查看明细"); |
|||
return; |
|||
} |
|||
} |
|||
|
|||
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_MPO.PageSize = Convert.ToInt32(ddlGridPageSize.SelectedValue); |
|||
|
|||
BindOrder(); |
|||
} |
|||
|
|||
protected void Window1_Close(object sender, WindowCloseEventArgs e) |
|||
{ |
|||
BindOrder(); |
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
/// <summary>
|
|||
/// 打印
|
|||
/// </summary>
|
|||
/// <param name="sender"></param>
|
|||
/// <param name="e"></param>
|
|||
protected void btnPrinter_Click(object sender, EventArgs e) |
|||
{ |
|||
int[] selections = Grid_V_TB_MPO.SelectedRowIndexArray; |
|||
string PurdocNO = ""; |
|||
int acc = 0; |
|||
string status = ""; |
|||
if (selections.Count() == 0) |
|||
{ |
|||
Alert.Show("请选择要打印的数据"); |
|||
return; |
|||
} |
|||
else if (selections.Count() > 1) |
|||
{ |
|||
Alert.Show("只能选择一条数据进行打印"); |
|||
return; |
|||
} |
|||
else |
|||
{ |
|||
foreach (int rowIndex in selections) |
|||
{ |
|||
PurdocNO = Grid_V_TB_MPO.DataKeys[rowIndex][1] as string; |
|||
acc = int.Parse(Grid_V_TB_MPO.DataKeys[rowIndex][7].ToString()); |
|||
status = Grid_V_TB_MPO.DataKeys[rowIndex][12] as string; |
|||
if (status =="D") |
|||
{ |
|||
Alert.Show("已作废的数据不可以进行打印"); |
|||
return; |
|||
} |
|||
} |
|||
if (acc == (int)GeneralMaterialOrderState.New) |
|||
{ |
|||
Alert.Show("供应商确认过的数据才可以打印"); |
|||
return; |
|||
} |
|||
var str = string.Format("window.open(\"../../Handlers/GenerateReport.ashx?report=GeneralMaterialOrder&data=131&type=pdf&filename=标签.pdf&PurdocNO={0}&open=\")", PurdocNO); |
|||
PageContext.RegisterStartupScript(str); |
|||
} |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,188 @@ |
|||
//------------------------------------------------------------------------------
|
|||
// <自动生成>
|
|||
// 此代码由工具生成。
|
|||
//
|
|||
// 对此文件的更改可能导致不正确的行为,如果
|
|||
// 重新生成代码,则所做更改将丢失。
|
|||
// </自动生成>
|
|||
//------------------------------------------------------------------------------
|
|||
|
|||
namespace SCP.Views.SupplierData |
|||
{ |
|||
|
|||
|
|||
public partial class SCP_PO_MATERIAL |
|||
{ |
|||
|
|||
/// <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>
|
|||
/// btnShow 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Button btnShow; |
|||
|
|||
/// <summary>
|
|||
/// btnPrinter 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Button btnPrinter; |
|||
|
|||
/// <summary>
|
|||
/// gp1 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.GroupPanel gp1; |
|||
|
|||
/// <summary>
|
|||
/// TXT_PurdocNO 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.TextBox TXT_PurdocNO; |
|||
|
|||
/// <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>
|
|||
/// BtnClose 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Button BtnClose; |
|||
|
|||
/// <summary>
|
|||
/// BtnSearch 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Button BtnSearch; |
|||
|
|||
/// <summary>
|
|||
/// Grid_V_TB_MPO 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Grid Grid_V_TB_MPO; |
|||
|
|||
/// <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>
|
|||
/// Window1 控件。
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 自动生成的字段。
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|||
/// </remarks>
|
|||
protected global::FineUI.Window Window1; |
|||
} |
|||
} |
Loading…
Reference in new issue