学 赵
4 years ago
29 changed files with 7759 additions and 8 deletions
@ -0,0 +1,161 @@ |
|||||
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SCP_INVOICE.aspx.cs" Inherits="SCP.Views.SupplierData.SupplierFinance.SCP_INVOICE" %> |
||||
|
|
||||
|
<!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" 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="Toolbar1" runat="server"> |
||||
|
<Items> |
||||
|
|
||||
|
<f:Button ID="Button3" runat="server" EnablePostBack="True" Text="刷新" Icon="Reload" OnClientClick="location.reload();"> |
||||
|
</f:Button> |
||||
|
<f:Button ID="btnView" runat="server" EnablePostBack="True" Text="查看发票" Icon="Zoom" OnClick="btnView_OnClick"> |
||||
|
</f:Button> |
||||
|
<f:ToolbarSeparator runat="server" /> |
||||
|
<f:Button ID="btnOutput" runat="server" Text="导出" Icon="PageExcel" OnClick="btnOutput_OnClick"> |
||||
|
</f:Button> |
||||
|
<f:Button ID="btnShow" runat="server" Text="显示查询面板" Icon="Find" OnClick="btnShow_OnClick"> |
||||
|
</f:Button> |
||||
|
<f:DropDownList ID="DDL_VEND_LIST" DataValueField="VendId" DataTextField="VendName" runat="server" Label="供应商编码" EnableEdit="true" EnableMultiSelect="false" Hidden="true"/> |
||||
|
<f:Button ID="BTN_INV" runat="server" EnablePostBack="True" Text="确认供应商发票管理" OnClick="BTN_INV_Click" Hidden="true"></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" ID="FormRow_1"> |
||||
|
<Items> |
||||
|
<f:CheckBoxList runat="server" ID="ckb" Label="状态"> |
||||
|
<%--<f:CheckItem Text="新建" Value="0" Selected="True" /> |
||||
|
<f:CheckItem Text="供应商申请" Value="1" /> |
||||
|
<f:CheckItem Text="采购审核退回" Value="2" /> |
||||
|
<f:CheckItem Text="采购审核通过" Value="3" /> |
||||
|
<f:CheckItem Text="发票寄出" Value="4" /> |
||||
|
<f:CheckItem Text="财务退回" Value="5" /> |
||||
|
<f:CheckItem Text="财务收票" Value="6" /> |
||||
|
<f:CheckItem Text="发票作废" Value="-1" />--%> |
||||
|
|
||||
|
</f:CheckBoxList> |
||||
|
</Items> |
||||
|
</f:FormRow> |
||||
|
<f:FormRow runat="server" ID="FormRow_2"> |
||||
|
<Items> |
||||
|
|
||||
|
<f:TextBox ID="TXT_InvcBillNum" runat="server" Label="发票单号"/> |
||||
|
|
||||
|
<f:TextBox ID="TXT_VendName" runat="server" Label="供应商"/> |
||||
|
|
||||
|
<f:TextBox ID="TXT_InvoiceNum" runat="server" Label="金税票号" MaxLength="22"/> |
||||
|
|
||||
|
<f:TextBox ID="TXT_PO" runat="server" Label="订单编号"/> |
||||
|
</Items> |
||||
|
</f:FormRow> |
||||
|
<f:FormRow runat="server" ID="FormRow_3"> |
||||
|
<Items> |
||||
|
|
||||
|
<f:TextBox ID="TXT_Site" runat="server" Label="收货地点"/> |
||||
|
|
||||
|
<f:TextBox ID="TXT_ASN" runat="server" Label="发货单号"/> |
||||
|
|
||||
|
<f:DatePicker ID="DP_CreateTime1" runat="server" Required="true" Label="收货时间" /> |
||||
|
|
||||
|
<f:DatePicker ID="DP_CreateTime2" runat="server" Required="true" Label="至" /> |
||||
|
</Items> |
||||
|
</f:FormRow> |
||||
|
<f:FormRow runat="server" ID="FormRow_4"> |
||||
|
<Items> |
||||
|
<f:Button runat="server" Text="关闭" OnClick="OnClick"></f:Button> |
||||
|
<f:Button ID="BTN_SEARCH" runat="server" OnClick="BTN_SEARCH_Click" Text="快速查找"> |
||||
|
</f:Button> |
||||
|
</Items> |
||||
|
</f:FormRow> |
||||
|
</Rows> |
||||
|
</f:Form> |
||||
|
|
||||
|
</Items> |
||||
|
</f:GroupPanel> |
||||
|
|
||||
|
<f:Grid ID="Grid_V_TB_INVOICE" runat="server" EnableCheckBoxSelect="true" ShowHeader="False" |
||||
|
AllowPaging="True" PageSize="10" OnPageIndexChange="Grid_V_TB_INVOICE_PageIndexChange" |
||||
|
ShowBorder="False" OnRowDoubleClick="Grid_V_TB_INVOICE_RowDoubleClick" BoxFlex="1" |
||||
|
DataKeyNames="UID, InvcBillNum" AllowSorting="true" IsDatabasePaging="true" SortField="State" OnRowDataBound="Grid_V_TB_INVOICE_RowDataBound" > |
||||
|
<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="20" Value="20" /> |
||||
|
<f:ListItem Text="50" Value="50" /> |
||||
|
<f:ListItem Text="100" Value="100" /> |
||||
|
<f:ListItem Text="200" Value="200" /> |
||||
|
</f:DropDownList> |
||||
|
</PageItems> |
||||
|
<Columns> |
||||
|
<f:BoundField runat="server" HeaderText="状态" ColumnID="" DataField="State_DESC" /> |
||||
|
<f:BoundField runat="server" HeaderText="发票单号" ColumnID="" DataField="InvcBillNum" /> |
||||
|
<f:BoundField runat="server" HeaderText="金税票号" ColumnID="" DataField="InvoiceNum" /> |
||||
|
<f:BoundField runat="server" HeaderText="快递单号" ColumnID="" DataField="ExpressNum" /> |
||||
|
<f:BoundField runat="server" HeaderText="供应商" ColumnID="" DataField="VendName" /> |
||||
|
<f:BoundField runat="server" HeaderText="供应商编码" ColumnID="" DataField="VendId" /> |
||||
|
<f:BoundField runat="server" HeaderText="金额" ColumnID="" DataField="Amount" DataFormatString = "{0:F}"/> |
||||
|
<f:BoundField runat="server" HeaderText="采购金额" ColumnID="" DataField="PurCost" DataFormatString = "{0:F}" /> |
||||
|
<f:BoundField runat="server" HeaderText="成本金额" ColumnID="" DataField="StdCost" DataFormatString = "{0:F}"/> |
||||
|
<f:BoundField runat="server" HeaderText="税率" ColumnID="" DataField="Tax" DataFormatString = "{0:F}"/> |
||||
|
<f:BoundField runat="server" HeaderText="税额" ColumnID="" DataField="TaxAmount" DataFormatString = "{0:F}"/> |
||||
|
|
||||
|
|
||||
|
|
||||
|
<%-- <f:BoundField runat="server" HeaderText="开票金额" ColumnID="" DataField="Total" />--%> |
||||
|
<f:TemplateField HeaderText="税后金额" Width="70px" ColumnID="Total"> |
||||
|
<ItemTemplate> |
||||
|
<asp:label ID="Total1" runat="server" Width="60px" Text='<%# Eval("Total") %>' ></asp:label> |
||||
|
</ItemTemplate> |
||||
|
</f:TemplateField> |
||||
|
|
||||
|
<f:BoundField runat="server" HeaderText="折扣金额" ColumnID="" DataField="DiscountPrice" DataFormatString = "{0:F}"/> |
||||
|
<f:BoundField runat="server" HeaderText="索赔金额" ColumnID="" DataField="ContractPrice" DataFormatString = "{0:F}"/> |
||||
|
<f:BoundField runat="server" HeaderText="调整税额" ColumnID="" DataField="BlancePrice" DataFormatString = "{0:F}"/> |
||||
|
|
||||
|
<%--<f:BoundField runat="server" HeaderText="创建时间" ColumnID="" DataField="CreateTime" />--%> |
||||
|
<f:BoundField runat="server" HeaderText="备注" ColumnID="" DataField="Remark" /> |
||||
|
</Columns> |
||||
|
</f:Grid> |
||||
|
</Items> |
||||
|
</f:Panel> |
||||
|
<f:Window ID="Window1" runat="server" Hidden="True" AutoScroll="True" |
||||
|
WindowPosition="Center" IsModal="true" Title="发票编辑" Target="Parent" EnableIFrame="true" OnClose="Window1_Close" |
||||
|
IFrameUrl="about:blank" Height="550px" Width="1024px"> |
||||
|
</f:Window> |
||||
|
<f:Window ID="Window2" runat="server" Hidden="True" AutoScroll="True" |
||||
|
WindowPosition="Center" IsModal="true" Title="Popup Window 1" Target="Parent" EnableIFrame="true" |
||||
|
IFrameUrl="about:blank" Height="300px" Width="400px"> |
||||
|
</f:Window> |
||||
|
<f:Window ID="WindowUpload" runat="server" Hidden="True" AutoScroll="True" |
||||
|
WindowPosition="Center" IsModal="true" Title="Popup Window 1" Target="Parent" EnableIFrame="true" |
||||
|
IFrameUrl="about:blank" Height="200px" Width="400px" OnClose="WindowUpload_Close" > |
||||
|
</f:Window> |
||||
|
<script type="text/javascript"> |
||||
|
|
||||
|
|
||||
|
</script> |
||||
|
|
||||
|
</form> |
||||
|
</body> |
||||
|
</html> |
@ -0,0 +1,225 @@ |
|||||
|
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.Controller; |
||||
|
using FineUI; |
||||
|
using System.Data; |
||||
|
using System.Drawing; |
||||
|
|
||||
|
namespace SCP.Views.SupplierData.SupplierFinance |
||||
|
{ |
||||
|
public partial class SCP_INVOICE :PageBase |
||||
|
{ |
||||
|
|
||||
|
public void Page_Load(object sender, EventArgs e) |
||||
|
{ |
||||
|
IsRoleRight(); |
||||
|
|
||||
|
if (!IsPostBack) |
||||
|
{ |
||||
|
TranslatorAgents(Toolbar1); |
||||
|
TranslatorAgent(Grid_V_TB_INVOICE); |
||||
|
TranslatorAgents(FormRow_1); |
||||
|
TranslatorAgents(FormRow_2); |
||||
|
TranslatorAgents(FormRow_3); |
||||
|
TranslatorAgents(FormRow_4); |
||||
|
BindInvoice(); |
||||
|
BindVender(DDL_VEND_LIST); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
public void IsRoleRight() |
||||
|
{ |
||||
|
if (CurrentUser.RoleList.Contains("采购人员")) |
||||
|
{ |
||||
|
DDL_VEND_LIST.Hidden = false; |
||||
|
BTN_INV.Hidden = false; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
public void BindInvoice() |
||||
|
{ |
||||
|
SearchInvoice(ret => { |
||||
|
Grid_V_TB_INVOICE.RecordCount = ret.Count(); |
||||
|
ret = SortAndPage(ret, Grid_V_TB_INVOICE); |
||||
|
|
||||
|
var _ls=ret.ToList(); |
||||
|
|
||||
|
Grid_V_TB_INVOICE.DataSource = ret; |
||||
|
Grid_V_TB_INVOICE.DataBind(); |
||||
|
}); |
||||
|
} |
||||
|
public void SearchInvoice(Action<IQueryable<V_TB_INVOICE>> p_action) |
||||
|
{ |
||||
|
V_TB_INVOICE _entity = new V_TB_INVOICE(); |
||||
|
_entity.InvcBillNum = TXT_InvcBillNum.Text; |
||||
|
_entity.VendName = TXT_VendName.Text; |
||||
|
_entity.InvoiceNum = TXT_InvoiceNum.Text; |
||||
|
_entity.UserInVendIds = CurrentUser.VenderList; |
||||
|
|
||||
|
if (CurrentUser.RoleList.Contains("采购人员")) |
||||
|
{ |
||||
|
if (string.IsNullOrEmpty(DDL_VEND_LIST.SelectedValue)) |
||||
|
{ |
||||
|
Alert.Show("选择开票的供应商,并点击确认!"); |
||||
|
return; |
||||
|
} |
||||
|
var _venderId = DDL_VEND_LIST.SelectedValue; |
||||
|
_entity.VendId = _venderId; |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
if (CurrentUser.VenderList != null && CurrentUser.VenderList.Count > 0) |
||||
|
{ |
||||
|
_entity.VendId = CurrentUser.VenderList[0]; |
||||
|
} |
||||
|
} |
||||
|
if (CurrentUser.FactoryList != null && CurrentUser.FactoryList.Count > 0) |
||||
|
{ |
||||
|
_entity.Site = CurrentUser.FactoryList[0]; |
||||
|
} |
||||
|
if (string.IsNullOrEmpty(_entity.VendId)) |
||||
|
{ |
||||
|
return; |
||||
|
} |
||||
|
if (DP_CreateTime1.SelectedDate != null || DP_CreateTime2.SelectedDate != null || !string.IsNullOrEmpty(TXT_PO.Text) || !string.IsNullOrEmpty(TXT_ASN.Text)) |
||||
|
{ |
||||
|
_entity.InvoiceList = SCP_INVOICE_CONTROLLER.Get_V_TB_INVOICE_BY_TIME(DP_CreateTime1.Text, DP_CreateTime2.Text, TXT_PO.Text, TXT_ASN.Text); |
||||
|
} |
||||
|
SCP_INVOICE_CONTROLLER.Get_V_TB_INVOICE_List(_entity, (ret) => |
||||
|
{ |
||||
|
if (ret.State == ReturnStatus.Succeed) |
||||
|
{ |
||||
|
//if (_entity.InvoiceList == null || _entity.InvoiceList.Count == 0)
|
||||
|
//{
|
||||
|
// Alert.Show("未查询到符合条件的发票!");
|
||||
|
//}
|
||||
|
p_action(ret.Result); |
||||
|
} |
||||
|
}); |
||||
|
} |
||||
|
protected void btnView_OnClick(object sender, EventArgs e) |
||||
|
{ |
||||
|
if (Grid_V_TB_INVOICE.SelectedRowIndexArray.Length != 1) |
||||
|
{ |
||||
|
Alert.Show("请选择一行要操作的记录!"); |
||||
|
return; |
||||
|
} |
||||
|
string roleID = GetSelectedDataKey(Grid_V_TB_INVOICE, 1); |
||||
|
string url = String.Format("../SupplierData/SupplierFinance/SCP_INVOICE_EDIT.aspx?ID={0}", roleID); |
||||
|
PageContext.RegisterStartupScript(Window1.GetShowReference(url)); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
//显示面板
|
||||
|
protected void btnShow_OnClick(object sender, EventArgs e) |
||||
|
{ |
||||
|
gp1.Hidden = false; |
||||
|
} |
||||
|
//关闭面板
|
||||
|
protected void OnClick(object sender, EventArgs e) |
||||
|
{ |
||||
|
gp1.Hidden = true; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
protected void Grid_V_TB_INVOICE_PageIndexChange(object sender, FineUI.GridPageEventArgs e) |
||||
|
{ |
||||
|
BindInvoice(); |
||||
|
} |
||||
|
|
||||
|
protected void Grid_V_TB_INVOICE_RowDoubleClick(object sender, FineUI.GridRowClickEventArgs e) |
||||
|
{ |
||||
|
//string roleID = GetSelectedDataKey(Grid1, 1);
|
||||
|
//string url = String.Format("../SupplierData/InvoiceDetail.aspx?ID={0}", roleID);
|
||||
|
//PageContext.RegisterStartupScript(Window1.GetShowReference(url));
|
||||
|
} |
||||
|
|
||||
|
protected void ddlGridPageSize_SelectedIndexChanged(object sender, EventArgs e) |
||||
|
{ |
||||
|
Grid_V_TB_INVOICE.PageSize = Convert.ToInt32(ddlGridPageSize.SelectedValue); |
||||
|
BindInvoice(); |
||||
|
} |
||||
|
protected void BTN_SEARCH_Click(object sender, EventArgs e) |
||||
|
{ |
||||
|
BindInvoice(); |
||||
|
} |
||||
|
//导出
|
||||
|
protected void btnOutput_OnClick(object sender, EventArgs e) |
||||
|
{ |
||||
|
//List<string> _ls = new List<string>();
|
||||
|
//for (int i = 0, count = Grid_V_TB_INVOICE.Rows.Count; i < count; i++)
|
||||
|
//{
|
||||
|
// object[] rowDataKeys = Grid_V_TB_INVOICE.DataKeys[i];
|
||||
|
// _ls.Add(rowDataKeys[1] as string);
|
||||
|
//}
|
||||
|
//DataSet ds = SCP_EXCEL_CONTROLLER.GET_INVOICE_EXECEL(_ls);
|
||||
|
//PageBase.DataSetToExcel(ds, "财务确认");
|
||||
|
|
||||
|
int[] _selections = Grid_V_TB_INVOICE.SelectedRowIndexArray; |
||||
|
if (_selections.Count() == 0) |
||||
|
{ |
||||
|
Alert.Show("请选择发票记录导出!"); |
||||
|
} |
||||
|
List<string> _ls = new List<string>(); |
||||
|
for (int i = 0, count = Grid_V_TB_INVOICE.Rows.Count; i < count; i++) |
||||
|
{ |
||||
|
if (_selections.Contains(i)) |
||||
|
{ |
||||
|
|
||||
|
object[] rowDataKeys = Grid_V_TB_INVOICE.DataKeys[i]; |
||||
|
_ls.Add(rowDataKeys[1] as string); |
||||
|
} |
||||
|
} |
||||
|
if (_ls.Count == 0) |
||||
|
{ |
||||
|
Alert.Show("请选择记录导出!"); |
||||
|
return; |
||||
|
} |
||||
|
DataSet ds = SCP_EXCEL_CONTROLLER.GET_INVOICE_EXECEL(_ls); |
||||
|
ds.Tables[1].Columns.Remove("成本价"); |
||||
|
PageBase.DataSetToExcel(ds, "导出发票"); |
||||
|
|
||||
|
|
||||
|
|
||||
|
} |
||||
|
|
||||
|
protected void Grid_V_TB_INVOICE_RowDataBound(object sender, GridRowEventArgs e) |
||||
|
{ |
||||
|
int i = 0; |
||||
|
System.Web.UI.WebControls.Label _label = (System.Web.UI.WebControls.Label)Grid_V_TB_INVOICE.Rows[e.RowIndex].FindControl("Total1"); |
||||
|
if (!string.IsNullOrEmpty(_label.Text)) |
||||
|
{ |
||||
|
try |
||||
|
{ |
||||
|
if (decimal.Parse(_label.Text) < 0) |
||||
|
{ |
||||
|
_label.ForeColor = Color.Red; |
||||
|
i++; |
||||
|
} |
||||
|
} |
||||
|
catch |
||||
|
{ } |
||||
|
} |
||||
|
//if (i > 0)
|
||||
|
//{
|
||||
|
// Alert.Show("请尽快处理索赔和退货数据,如果不处理新建发票将")
|
||||
|
//}
|
||||
|
} |
||||
|
|
||||
|
protected void BTN_INV_Click(object sender, EventArgs e) |
||||
|
{ |
||||
|
BindInvoice(); |
||||
|
} |
||||
|
|
||||
|
protected void Window1_Close(object sender, WindowCloseEventArgs e) |
||||
|
{ |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
@ -0,0 +1,314 @@ |
|||||
|
//------------------------------------------------------------------------------
|
||||
|
// <自动生成>
|
||||
|
// 此代码由工具生成。
|
||||
|
//
|
||||
|
// 对此文件的更改可能导致不正确的行为,如果
|
||||
|
// 重新生成代码,则所做更改将丢失。
|
||||
|
// </自动生成>
|
||||
|
//------------------------------------------------------------------------------
|
||||
|
|
||||
|
namespace SCP.Views.SupplierData.SupplierFinance |
||||
|
{ |
||||
|
|
||||
|
|
||||
|
public partial class SCP_INVOICE |
||||
|
{ |
||||
|
|
||||
|
/// <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>
|
||||
|
/// Toolbar1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Toolbar Toolbar1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Button3 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Button Button3; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// btnView 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Button btnView; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// btnOutput 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Button btnOutput; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// btnShow 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Button btnShow; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// DDL_VEND_LIST 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.DropDownList DDL_VEND_LIST; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// BTN_INV 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Button BTN_INV; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// gp1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.GroupPanel gp1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// FormRow_1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.FormRow FormRow_1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// ckb 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.CheckBoxList ckb; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// FormRow_2 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.FormRow FormRow_2; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TXT_InvcBillNum 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox TXT_InvcBillNum; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TXT_VendName 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox TXT_VendName; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TXT_InvoiceNum 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox TXT_InvoiceNum; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TXT_PO 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox TXT_PO; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// FormRow_3 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.FormRow FormRow_3; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TXT_Site 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox TXT_Site; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TXT_ASN 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox TXT_ASN; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// DP_CreateTime1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.DatePicker DP_CreateTime1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// DP_CreateTime2 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.DatePicker DP_CreateTime2; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// FormRow_4 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.FormRow FormRow_4; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// BTN_SEARCH 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Button BTN_SEARCH; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Grid_V_TB_INVOICE 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Grid Grid_V_TB_INVOICE; |
||||
|
|
||||
|
/// <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>
|
||||
|
/// Total1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::System.Web.UI.WebControls.Label Total1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Window1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Window Window1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Window2 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Window Window2; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// WindowUpload 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Window WindowUpload; |
||||
|
} |
||||
|
} |
@ -0,0 +1,103 @@ |
|||||
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SCP_INVOICE_CREATE.aspx.cs" Inherits="SCP.Views.SupplierData.SupplierFinance.SCP_INVOICE_CREATE" %> |
||||
|
|
||||
|
<!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="" AutoScroll="True"> |
||||
|
<Items> |
||||
|
<f:Form runat="server"> |
||||
|
<Toolbars> |
||||
|
<f:Toolbar ID="Toolbar2" runat="server"> |
||||
|
<Items> |
||||
|
<f:Button ID="btnOk" runat="server" EnablePostBack="True" Text="确认创建发票" Icon="Add" OnClick="btnOk_OnClick"> |
||||
|
</f:Button> |
||||
|
|
||||
|
</Items> |
||||
|
</f:Toolbar> |
||||
|
</Toolbars> |
||||
|
<Rows> |
||||
|
<f:FormRow runat="server" ID="FormRow_1"> |
||||
|
<Items> |
||||
|
<f:TextArea runat="server" Label="备注" Text="" MaxLength="100" AutoGrowHeight="True" ID="txtRemark"/> |
||||
|
</Items> |
||||
|
</f:FormRow> |
||||
|
</Rows> |
||||
|
</f:Form> |
||||
|
<f:Grid ID="Grid_SCP_INVOICE_CREATE" runat="server" |
||||
|
ShowBorder ="true" |
||||
|
ShowHeader="true" |
||||
|
PageSize="1000" |
||||
|
BoxFlex="1" |
||||
|
CssClass="maingrid" |
||||
|
DataKeyNames="UID,RecvBillNum,PoLine,PartCode,Batch,Qty,DockCode,Remark,CreateTime,CreateUser,IsDeleted,GUID,AsnBillNum,Site,VendId,ShipTime,OperName,PartDesc1,State,PoBillNum,VendName,Site_Desc,PoUnit,LocUnit,Price,VendBatch,Currency,BillType_DESC,ErpRecvBillNum,PurCost,StdCost" |
||||
|
IsDatabasePaging="True" |
||||
|
AllowPaging="True" |
||||
|
SortDirection="DESC" |
||||
|
SortField="CreateTime" |
||||
|
EnableRowSelectEvent="True" AutoScroll="True" OnRowDataBound="Grid_SCP_INVOICE_CREATE_RowDataBound"> |
||||
|
<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="20" Value="20" /> |
||||
|
<f:ListItem Text="50" Value="50" /> |
||||
|
<f:ListItem Text="100" Value="100" /> |
||||
|
<f:ListItem Text="200" Value="200" /> |
||||
|
</f:DropDownList> |
||||
|
</PageItems> |
||||
|
<Columns> |
||||
|
<f:BoundField runat="server" HeaderText="项目编码" ColumnID="" DataField="ProjectId" /> |
||||
|
<f:BoundField runat="server" HeaderText="订单" ColumnID="" DataField="PoBillNum" /> |
||||
|
<f:BoundField runat="server" HeaderText="订单行" ColumnID="" DataField="PoLine" /> |
||||
|
<f:BoundField runat="server" HeaderText="WMS收货单" ColumnID="" DataField="RecvBillNum" /> |
||||
|
<f:BoundField runat="server" HeaderText="ERP收货单" ColumnID="" DataField="ErpRecvBillNum" /> |
||||
|
<f:BoundField runat="server" HeaderText="发货单" ColumnID="" DataField="AsnBillNum" /> |
||||
|
<f:BoundField runat="server" HeaderText="零件号" ColumnID="" DataField="PartCode" /> |
||||
|
<f:BoundField runat="server" HeaderText="零件名称" ColumnID="" DataField="PartDesc1" /> |
||||
|
<f:BoundField runat="server" HeaderText="币种" ColumnID="" DataField="Currency" /> |
||||
|
<f:TemplateField Width="90px" HeaderText="单价"> |
||||
|
<ItemTemplate> |
||||
|
<asp:TextBox ID="txtPrice" runat="server" Width="80px" onkeyup="if(isNaN(value))execCommand('undo')" onafterpaste="if(isNaN(value))execCommand('undo')" |
||||
|
Text='<%# Eval("Price") %>' MaxLength="12" ></asp:TextBox> |
||||
|
</ItemTemplate> |
||||
|
</f:TemplateField> |
||||
|
<f:TemplateField HeaderText="可用开票数量" Width="70px" ColumnID="Total"> |
||||
|
<ItemTemplate> |
||||
|
<asp:label ID="Total1" runat="server" Width="60px" Text='<%# Eval("CanQty") %>' ></asp:label> |
||||
|
</ItemTemplate> |
||||
|
</f:TemplateField> |
||||
|
|
||||
|
<%--<f:BoundField runat="server" HeaderText="可用开票数量" ColumnID="CanQty" DataField="CanQty" />--%> |
||||
|
<f:TemplateField Width="90px" HeaderText="开票数量"> |
||||
|
<ItemTemplate> |
||||
|
<asp:TextBox ID="txtQty" runat="server" Width="80px" onkeyup="this.value=this.value.replace(/,'')" onafterpaste="this.value=this.value.replace(/-?\D/g,'')" |
||||
|
MaxLength="12" Text='<%# Eval("InputQty") %>' ></asp:TextBox> |
||||
|
</ItemTemplate> |
||||
|
</f:TemplateField> |
||||
|
<f:BoundField runat="server" HeaderText="合同价格" ColumnID="" DataField="ContractPrice" Hidden="true" /> |
||||
|
<f:BoundField runat="server" HeaderText="合同差额" ColumnID="" DataField="BlancePrice" Hidden="true" /> |
||||
|
<f:BoundField runat="server" HeaderText="要货日期" ColumnID="" DataField="BeginTime" Hidden="true" /> |
||||
|
<f:TemplateField Width="100px" HeaderText="备注"> |
||||
|
<ItemTemplate> |
||||
|
<asp:TextBox ID="txtLineMemo" runat="server" Width="100px" |
||||
|
Text='' MaxLength="50"></asp:TextBox> |
||||
|
</ItemTemplate> |
||||
|
</f:TemplateField> |
||||
|
</Columns> |
||||
|
</f:Grid> |
||||
|
</Items> |
||||
|
</f:Panel> |
||||
|
</form> |
||||
|
</body> |
||||
|
</html> |
@ -0,0 +1,416 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Data.Entity.Migrations; |
||||
|
using System.Linq; |
||||
|
using System.Web; |
||||
|
using System.Web.UI; |
||||
|
using System.Web.UI.WebControls; |
||||
|
using CK.SCP.Controller; |
||||
|
using CK.SCP.Models.AppBoxEntity; |
||||
|
using CK.SCP.Models.Enums; |
||||
|
using CK.SCP.Models.ScpEntity; |
||||
|
using CK.SCP.Utils; |
||||
|
using FineUI; |
||||
|
using NPOI.OpenXmlFormats.Dml; |
||||
|
using SCP.Code; |
||||
|
using SCP.WarehouseData; |
||||
|
using System.Drawing; |
||||
|
|
||||
|
namespace SCP.Views.SupplierData.SupplierFinance |
||||
|
{ |
||||
|
public partial class SCP_INVOICE_CREATE : PageBase |
||||
|
{ |
||||
|
protected void Page_Load(object sender, EventArgs e) |
||||
|
{ |
||||
|
IsRoleRight(); |
||||
|
if (!IsPostBack) |
||||
|
{ |
||||
|
TranslatorAgents(Toolbar2); |
||||
|
TranslatorAgent(Grid_SCP_INVOICE_CREATE); |
||||
|
TranslatorAgents(FormRow_1); |
||||
|
LoadData(); |
||||
|
SetRoleRule(); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
public void IsRoleRight() |
||||
|
{ |
||||
|
//if (!CurrentUser.RoleList.Contains("供应商"))
|
||||
|
//{
|
||||
|
// Alert.Show("当前用户角色不能操作该模块!");
|
||||
|
// return;
|
||||
|
//}
|
||||
|
//if (CurrentUser.VenderList == null || CurrentUser.VenderList.Count == 0)
|
||||
|
//{
|
||||
|
// Alert.Show("当前用户未选择地点!");
|
||||
|
// return;
|
||||
|
//}
|
||||
|
} |
||||
|
private void SetRoleRule() |
||||
|
{ |
||||
|
//IsPriceVisible(Grid_SCP_INVOICE_CREATE, "合同价格");
|
||||
|
//IsPriceVisible(Grid_SCP_INVOICE_CREATE, "合同差额");
|
||||
|
IsPriceVisible(Grid_SCP_INVOICE_CREATE, "要货日期"); |
||||
|
} |
||||
|
|
||||
|
public void LoadData() |
||||
|
{ |
||||
|
BindData(); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
private void SearchData(Action<IQueryable<V_TB_RECEIVE_LIST>> p_action) |
||||
|
{ |
||||
|
V_TB_RECEIVE_LIST _entity = new V_TB_RECEIVE_LIST(); |
||||
|
|
||||
|
|
||||
|
if (Session["InvoiceCreateQueryParm"] != null) |
||||
|
{ |
||||
|
InvoiceCreateQueryParm parm = Session["InvoiceCreateQueryParm"] as InvoiceCreateQueryParm; |
||||
|
|
||||
|
if (string.IsNullOrEmpty(parm.ReceiveID)) |
||||
|
|
||||
|
{ Alert.Show("参数不正确!"); return; } |
||||
|
var ary = parm.ReceiveID.Split(','); |
||||
|
if (ary != null && ary.Length > 0) |
||||
|
{ |
||||
|
_entity.UIDList = new List<long>(); |
||||
|
foreach (var itm in ary) |
||||
|
{ |
||||
|
_entity.UIDList.Add(long.Parse(itm)); |
||||
|
} |
||||
|
_entity.State = 1; |
||||
|
_entity.UserInVendIds = CurrentUser.VenderList; |
||||
|
SCP_RECIVECE_CONTROLLER.Get_V_TB_RECEIVE_LIST_List(_entity, (ret) => |
||||
|
{ |
||||
|
if (ret.State == ReturnStatus.Succeed) |
||||
|
{ |
||||
|
p_action(ret.Result); |
||||
|
} |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
Alert.Show("操作超时!"); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
} |
||||
|
|
||||
|
public void BindData() |
||||
|
{ |
||||
|
SearchData(q => |
||||
|
{ |
||||
|
|
||||
|
InvoiceCreateQueryParm parm = Session["InvoiceCreateQueryParm"] as InvoiceCreateQueryParm; |
||||
|
Grid_SCP_INVOICE_CREATE.RecordCount = q.Count(); |
||||
|
q = SortAndPage<V_TB_RECEIVE_LIST>(q, Grid_SCP_INVOICE_CREATE); |
||||
|
// List<V_TB_RECEIVE_LIST> temp = SCP_RECIVECE_CONTROLLER.Get_V_TB_RECEIVE_LIST(q.ToList());
|
||||
|
List<V_TB_RECEIVE_LIST> temp = SCP_CONTRACT_CONTROLLER.GET_CONTRACT_PRICE_LIST(q.ToList()); |
||||
|
|
||||
|
foreach (V_TB_RECEIVE_LIST rec in temp) |
||||
|
{ |
||||
|
rec.Qty = ToDecimal(rec.Qty, 2); |
||||
|
rec.CanQty = ToDecimal(rec.CanQty, 2); |
||||
|
} |
||||
|
|
||||
|
string _vendId = string.Empty; |
||||
|
if (CurrentUser.RoleList.Contains("采购人员")) |
||||
|
{ |
||||
|
|
||||
|
_vendId = parm.VendId; |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
_vendId = CurrentUser.VenderList[0]; |
||||
|
} |
||||
|
//SCP_RECIVECE_CONTROLLER.Get_V_TB_RECEIVE_LIST_PRICE(_vendId, temp, (rs) =>
|
||||
|
//{
|
||||
|
|
||||
|
// if (rs.State == ReturnStatus.Succeed)
|
||||
|
// {
|
||||
|
// temp.ForEach(itm =>
|
||||
|
// {
|
||||
|
// var _entityList = rs.Result.ToList().Where(p => p.PartCode == itm.PartCode && itm.CreateTime >= p.StartTime && itm.CreateTime <= p.EndTime).ToList();
|
||||
|
// if (_entityList.Count > 0)
|
||||
|
// {
|
||||
|
// var _max = _entityList.Select(p => p.UID).Max();
|
||||
|
// var _entity = _entityList.Where(p => p.UID == _max).FirstOrDefault();
|
||||
|
// if (itm.ModType == (int)BillModType.Contract)
|
||||
|
// {
|
||||
|
// if (CurrentUser.FactoryList.FirstOrDefault() == "CNS")
|
||||
|
// {
|
||||
|
// itm.Price = _entity.Amt;
|
||||
|
// }
|
||||
|
// else
|
||||
|
// {
|
||||
|
// itm.Price = itm.Price > 0 ? itm.Price : _entity.Amt;
|
||||
|
// }
|
||||
|
// }
|
||||
|
// else
|
||||
|
// {
|
||||
|
// itm.Price = itm.Price > 0 ? itm.Price : _entity.Amt;
|
||||
|
// }
|
||||
|
// }
|
||||
|
// });
|
||||
|
// }
|
||||
|
//});
|
||||
|
|
||||
|
var _isall=parm.IsAll; |
||||
|
if(_isall=="0") |
||||
|
{ |
||||
|
temp.ForEach(p => { |
||||
|
p.InputQty =0; |
||||
|
if (p.CanQty < 0) |
||||
|
{ |
||||
|
p.InputQty = p.CanQty; |
||||
|
} |
||||
|
}); |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
temp.ForEach(p => { p.InputQty = p.CanQty; }); |
||||
|
} |
||||
|
|
||||
|
Grid_SCP_INVOICE_CREATE.DataSource = temp; |
||||
|
Grid_SCP_INVOICE_CREATE.DataBind(); |
||||
|
|
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
public decimal ToDecimal(decimal num, int scale) |
||||
|
{ |
||||
|
decimal tempOdds = Math.Round(num, scale); |
||||
|
|
||||
|
return tempOdds; |
||||
|
} |
||||
|
|
||||
|
protected void ddlGridPageSize_SelectedIndexChanged(object sender, EventArgs e) |
||||
|
{ |
||||
|
Grid_SCP_INVOICE_CREATE.PageSize = Convert.ToInt32(ddlGridPageSize.SelectedValue); |
||||
|
BindData(); |
||||
|
} |
||||
|
//确认创建发票
|
||||
|
protected void btnOk_OnClick(object sender, EventArgs e) |
||||
|
{ |
||||
|
if (Session["InvoiceCreateQueryParm"] != null) |
||||
|
{ |
||||
|
|
||||
|
|
||||
|
InvoiceCreateQueryParm parm = Session["InvoiceCreateQueryParm"] as InvoiceCreateQueryParm; |
||||
|
|
||||
|
V_TB_INVOICE invoice = new V_TB_INVOICE(); |
||||
|
invoice.InvcBillNum = SCP_BILLCODE_CONTROLLER.MakeInvoiceCode(); |
||||
|
invoice.CreateTime = DateTime.Now; |
||||
|
invoice.InvoiceNum = ""; |
||||
|
invoice.Remark = txtRemark.Text; |
||||
|
invoice.CreateUser = CurrentUser.Name; |
||||
|
|
||||
|
string _VendId = parm.VendId; |
||||
|
string _tax = parm.Tax; |
||||
|
invoice.VendId = _VendId; |
||||
|
invoice.State = (int)InvoiceState.New; |
||||
|
invoice.Tax = decimal.Parse(_tax); |
||||
|
string _cj = parm.CJ; |
||||
|
string _tz = parm.TZ; |
||||
|
invoice.BlancePrice = decimal.Parse(_tz); |
||||
|
invoice.ContractPrice = decimal.Parse(_cj); |
||||
|
|
||||
|
int num = 0; |
||||
|
List<V_TB_RECEIVE_LIST> _list = new List<V_TB_RECEIVE_LIST>(); |
||||
|
for (int i = 0; i < Grid_SCP_INVOICE_CREATE.Rows.Count; i++) |
||||
|
{ |
||||
|
object[] rowDataKeys = Grid_SCP_INVOICE_CREATE.DataKeys[i]; |
||||
|
string uid = rowDataKeys[0].ToString(); |
||||
|
var _entity = new V_TB_RECEIVE_LIST(); |
||||
|
_entity.UID = ConvertHelper.To<Int32>(rowDataKeys[0]); |
||||
|
_entity.RecvBillNum = rowDataKeys[1] as string; |
||||
|
_entity.PoLine = ConvertHelper.To<Int32>(rowDataKeys[2]); |
||||
|
_entity.PartCode = rowDataKeys[3] as string; |
||||
|
_entity.Batch = rowDataKeys[4] as string; |
||||
|
_entity.Qty = ConvertHelper.To<Decimal>(rowDataKeys[5]); |
||||
|
_entity.DockCode = rowDataKeys[6] as string; |
||||
|
_entity.Remark = rowDataKeys[7] as string; |
||||
|
_entity.CreateTime = ConvertHelper.To<DateTime>(rowDataKeys[8]); |
||||
|
_entity.CreateUser = rowDataKeys[9] as string; |
||||
|
if (string.IsNullOrEmpty(_entity.CreateUser)) |
||||
|
{ |
||||
|
_entity.CreateUser = CurrentUser.Name; |
||||
|
} |
||||
|
_entity.IsDeleted = ConvertHelper.To<Boolean>(rowDataKeys[10]); |
||||
|
_entity.AsnBillNum = rowDataKeys[12] as string; |
||||
|
_entity.Site = rowDataKeys[13] as string; |
||||
|
invoice.Site = rowDataKeys[13] as string; |
||||
|
_entity.VendId = rowDataKeys[14] as string; |
||||
|
_entity.ShipTime = ConvertHelper.To<DateTime?>(rowDataKeys[15]); |
||||
|
_entity.OperName = rowDataKeys[16] as string; |
||||
|
_entity.PartDesc1 = rowDataKeys[17] as string; |
||||
|
_entity.State = ConvertHelper.To<Int32>(rowDataKeys[18]); |
||||
|
_entity.PoBillNum = rowDataKeys[19] as string; |
||||
|
_entity.VendName = rowDataKeys[20] as string; |
||||
|
_entity.Site_Desc = rowDataKeys[21] as string; |
||||
|
_entity.PoUnit = rowDataKeys[22] as string; |
||||
|
_entity.LocUnit = rowDataKeys[23] as string; |
||||
|
_entity.Price = ConvertHelper.To<Decimal>(rowDataKeys[24]); |
||||
|
_entity.VendBatch = rowDataKeys[25] as string; |
||||
|
_entity.Currency = rowDataKeys[26] as string; |
||||
|
_entity.BillType_DESC = rowDataKeys[27] as string; |
||||
|
_entity.ErpRecvBillNum= rowDataKeys[28] as string; |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
System.Web.UI.WebControls.Label _label = (System.Web.UI.WebControls.Label)Grid_SCP_INVOICE_CREATE.Rows[i].FindControl("Total1"); |
||||
|
_entity.CanQty = ConvertHelper.To<Decimal>(_label.Text);//ConvertHelper.To < Int32 >(rowDataKeys[2]);
|
||||
|
GridRow row = Grid_SCP_INVOICE_CREATE.Rows[i]; |
||||
|
System.Web.UI.WebControls.TextBox txtQty = (System.Web.UI.WebControls.TextBox)row.FindControl("txtQty"); |
||||
|
System.Web.UI.WebControls.TextBox txtPrice = (System.Web.UI.WebControls.TextBox)row.FindControl("txtPrice"); |
||||
|
System.Web.UI.WebControls.TextBox txtLineMemo = (System.Web.UI.WebControls.TextBox)row.FindControl("txtLineMemo"); |
||||
|
|
||||
|
decimal Qty = 0; |
||||
|
try |
||||
|
{ |
||||
|
if (txtQty.Text.Trim() != "") |
||||
|
{ |
||||
|
Qty = Convert.ToDecimal(txtQty.Text.Trim()); |
||||
|
} |
||||
|
} |
||||
|
catch |
||||
|
{ |
||||
|
PageContext.RegisterStartupScript(Alert.GetShowInTopReference("开票数量输入不正确")); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
decimal Price = 0; |
||||
|
try |
||||
|
{ |
||||
|
if (txtPrice.Text.Trim() != "") |
||||
|
{ |
||||
|
Price = Convert.ToDecimal(txtPrice.Text.Trim()); |
||||
|
} |
||||
|
} |
||||
|
catch |
||||
|
{ |
||||
|
PageContext.RegisterStartupScript(Alert.GetShowInTopReference("单价输入不正确")); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
if (Qty == 0) |
||||
|
{ |
||||
|
continue; |
||||
|
} |
||||
|
if (Qty > _entity.CanQty) |
||||
|
{ |
||||
|
PageContext.RegisterStartupScript(Alert.GetShowInTopReference("开票数量不能大于可用开票数量")); |
||||
|
return; |
||||
|
} |
||||
|
_entity.Qty = Qty; |
||||
|
_entity.Price = Price; |
||||
|
_entity.Remark = txtLineMemo.Text; |
||||
|
_list.Add(_entity); |
||||
|
num++; |
||||
|
} |
||||
|
if (num == 0) |
||||
|
{ |
||||
|
PageContext.RegisterStartupScript(Alert.GetShowInTopReference("没有可用的开票记录")); |
||||
|
return; |
||||
|
} |
||||
|
int _number = 0; |
||||
|
_list.ForEach(p => |
||||
|
{ |
||||
|
if (p.Qty > 0) |
||||
|
{ |
||||
|
_number++; |
||||
|
} |
||||
|
}); |
||||
|
if (_number == _list.Count) |
||||
|
{ |
||||
|
string _modify = parm.Modify; |
||||
|
if (_modify == "1") |
||||
|
{ |
||||
|
Alert.Show("有退货单未处理!"); |
||||
|
return; |
||||
|
} |
||||
|
} |
||||
|
var ret = SCP_INVOICE_CONTROLLER.CREATE_TB_INVOICE(invoice, _list); |
||||
|
if (ret.State == ReturnStatus.Succeed) |
||||
|
{ |
||||
|
string script = $"alert(\'发票 {invoice.InvcBillNum} 生成成功\');"; |
||||
|
script += ActiveWindow.GetHidePostBackReference(); |
||||
|
PageContext.RegisterStartupScript(script); |
||||
|
} |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
Alert.Show("操作超时"); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
} |
||||
|
|
||||
|
protected void Grid_SCP_INVOICE_CREATE_RowDataBound(object sender, GridRowEventArgs e) |
||||
|
{ |
||||
|
object[] rowDataKeys = Grid_SCP_INVOICE_CREATE.DataKeys[e.RowIndex]; |
||||
|
|
||||
|
|
||||
|
System.Web.UI.WebControls.Label _label = (System.Web.UI.WebControls.Label)Grid_SCP_INVOICE_CREATE.Rows[e.RowIndex].FindControl("Total1"); |
||||
|
|
||||
|
var _number = ConvertHelper.To<Decimal>(_label.Text); |
||||
|
if (_number<= 0) |
||||
|
{ |
||||
|
GridRow row = Grid_SCP_INVOICE_CREATE.Rows[e.RowIndex]; |
||||
|
System.Web.UI.WebControls.TextBox txtQty = (System.Web.UI.WebControls.TextBox)row.FindControl("txtQty"); |
||||
|
txtQty.ReadOnly = true; |
||||
|
txtQty.Enabled = false; |
||||
|
if (_number < 0) |
||||
|
{ |
||||
|
|
||||
|
if (!string.IsNullOrEmpty(_label.Text)) |
||||
|
{ |
||||
|
if (decimal.Parse(_label.Text) < 0) |
||||
|
{ |
||||
|
_label.ForeColor = Color.Red; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
private decimal? GetTax() |
||||
|
{ |
||||
|
decimal? strTax = null; |
||||
|
string name = GetIdentityName(); |
||||
|
User modelUsers = DB.Users.SingleOrDefault(p => p.Name == name); |
||||
|
VenderUsers vu = null; |
||||
|
TA_VENDER tv = null; |
||||
|
|
||||
|
if (modelUsers != null) |
||||
|
{ |
||||
|
vu = DB.VenderUsers.SingleOrDefault(p => p.UserId == modelUsers.ID); |
||||
|
if (vu != null) |
||||
|
{ |
||||
|
tv = SCPDB.TA_VENDER.SingleOrDefault(p => p.VendId == vu.VenderId); |
||||
|
|
||||
|
if (tv != null) |
||||
|
{ |
||||
|
strTax = tv.Tax; |
||||
|
} |
||||
|
} |
||||
|
//_info.SupplierCode = vu.VenderId;
|
||||
|
} |
||||
|
Session["InvoiceCreateQueryParm"] = null; |
||||
|
return strTax; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
} |
@ -0,0 +1,143 @@ |
|||||
|
//------------------------------------------------------------------------------
|
||||
|
// <自动生成>
|
||||
|
// 此代码由工具生成。
|
||||
|
//
|
||||
|
// 对此文件的更改可能导致不正确的行为,如果
|
||||
|
// 重新生成代码,则所做更改将丢失。
|
||||
|
// </自动生成>
|
||||
|
//------------------------------------------------------------------------------
|
||||
|
|
||||
|
namespace SCP.Views.SupplierData.SupplierFinance |
||||
|
{ |
||||
|
|
||||
|
|
||||
|
public partial class SCP_INVOICE_CREATE |
||||
|
{ |
||||
|
|
||||
|
/// <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>
|
||||
|
/// btnOk 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Button btnOk; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// FormRow_1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.FormRow FormRow_1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// txtRemark 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextArea txtRemark; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Grid_SCP_INVOICE_CREATE 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Grid Grid_SCP_INVOICE_CREATE; |
||||
|
|
||||
|
/// <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>
|
||||
|
/// txtPrice 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::System.Web.UI.WebControls.TextBox txtPrice; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Total1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::System.Web.UI.WebControls.Label Total1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// txtQty 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::System.Web.UI.WebControls.TextBox txtQty; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// txtLineMemo 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::System.Web.UI.WebControls.TextBox txtLineMemo; |
||||
|
} |
||||
|
} |
@ -0,0 +1,152 @@ |
|||||
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SCP_INVOICE_EDIT.aspx.cs" Inherits="SCP.Views.SupplierData.SupplierFinance.SCP_INVOICE_EDIT" %> |
||||
|
|
||||
|
<!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="" AutoScroll="True"> |
||||
|
<Items> |
||||
|
<f:Form runat="server" Title=""> |
||||
|
<Toolbars> |
||||
|
<f:Toolbar ID="Toolbar2" runat="server"> |
||||
|
<Items> |
||||
|
<f:ToolbarSeparator ID="ToolbarSeparator3" runat="server"> |
||||
|
</f:ToolbarSeparator> |
||||
|
|
||||
|
<f:Button ID="btnOK" runat="server" Text="修改数据" Hidden="true" OnClientClick="if(!confirm('是否要修改发票?'))return false;" Icon="ApplicationEdit" OnClick="btnOK_Click"> |
||||
|
</f:Button> |
||||
|
|
||||
|
<f:Button ID="btnApply" runat="server" Text="提交申请" Hidden="true" OnClientClick="if(!confirm('是否要提交申请?'))return false;" Icon="Accept" OnClick="btnApply_Click"> |
||||
|
</f:Button> |
||||
|
|
||||
|
<f:Button ID="btnMail" runat="server" Text="寄出发票" Hidden="true" OnClientClick="if(!confirm('是否寄出发票?寄出前请检查发票时间和纸质发票时间是否一致!'))return false;" Icon="Mail" OnClick="btnMail_Click" ValidateForms="extForm1"> |
||||
|
</f:Button> |
||||
|
|
||||
|
<f:Button ID="btnReject" runat="server" Text="发票作废" Hidden="true" OnClientClick="if(!confirm('是否要作废收票?'))return false;" Icon="Exclamation" OnClick="btnReject_Click"> |
||||
|
</f:Button> |
||||
|
<f:Button ID="btnRed" runat="server" Hidden="true" Text="添加红字发票" OnClientClick="if(!confirm('是否要添加红字发票?'))return false;" Icon="Exclamation" OnClick="btnRed_Click"> |
||||
|
</f:Button> |
||||
|
</Items> |
||||
|
</f:Toolbar> |
||||
|
</Toolbars> |
||||
|
</f:Form> |
||||
|
<f:GroupPanel runat="server" ID="gp1" Layout="HBox" > |
||||
|
<Items> |
||||
|
<f:Form runat="server"> |
||||
|
<Rows> |
||||
|
<f:FormRow runat="server" ColumnWidths="20% 20% 20% 20% 20%" ID="FormRow_1"> |
||||
|
<Items> |
||||
|
<f:TextBox ID="txtBillNo" runat="server" Label="发票单号" Text="" MaxLength="100" Readonly="true" Enabled="false"> |
||||
|
</f:TextBox> |
||||
|
<f:TextBox ID="txtState" runat="server" Label="状态" Text="" MaxLength="100" Readonly="true" Enabled="false"> |
||||
|
</f:TextBox> |
||||
|
<f:TextBox ID="txtBillTime" runat="server" Label="创建时间" Text="" MaxLength="100" Readonly="true" Enabled="false" /> |
||||
|
<f:TextBox ID="txtSupplierName" runat="server" Label="供应商" Text="" MaxLength="100" Readonly="true" Enabled="false" /> |
||||
|
<f:Label runat="server" ID="Label3" /> |
||||
|
</Items> |
||||
|
</f:FormRow> |
||||
|
<f:FormRow runat="server" ColumnWidths="20% 20% 20% 20% 20%" ID="FormRow_2"> |
||||
|
<Items> |
||||
|
<f:TextBox ID="txtAmount" runat="server" Label="金额" Text="" Readonly="true" Enabled="false" /> |
||||
|
<f:Label runat="server" ID="Label1" Text="税率" /><f:DropDownList runat="server" Label="税率" ID="txtTax" AutoPostBack="true" > |
||||
|
<f:ListItem Text="0.16" Value="0.16" /> |
||||
|
<f:ListItem Text="0.13" Value="0.13" /> |
||||
|
<f:ListItem Text="0" Value="0" /> |
||||
|
</f:DropDownList> |
||||
|
<f:TextBox ID="txtTaxAmount" runat="server" Label="税额" Text="" Readonly="true" Enabled="false"> |
||||
|
</f:TextBox> |
||||
|
<f:TextBox ID="txtTotal" runat="server" Label="税后金额" Text="" Readonly="true" Enabled="false" /> |
||||
|
|
||||
|
</Items> |
||||
|
</f:FormRow> |
||||
|
<f:FormRow runat="server" ColumnWidths="20% 20% 20% 20% 20%" ID="FormRow_3"> |
||||
|
<Items> |
||||
|
<f:NumberBox ID="txtContractPrice1" runat="server" Label="索赔金额" Readonly="true"/> |
||||
|
<f:NumberBox ID="txtDiscountPrice" runat="server" Label="折扣金额" /> |
||||
|
<f:NumberBox ID="txtBlancePrice1" runat="server" Label="调整税额" MaxValue="1" /> |
||||
|
|
||||
|
<f:TextBox ID="txtInvoiceNumber" runat="server" Label="金税票号" Text="" MaxLength="22" Readonly="true"> |
||||
|
</f:TextBox> |
||||
|
|
||||
|
</Items> |
||||
|
</f:FormRow> |
||||
|
<f:FormRow runat="server" ColumnWidths="20% 20% 20% 20% 20%" ID="FormRow_4"> |
||||
|
<Items> |
||||
|
<f:TextBox ID="txtExpressNumber" runat="server" Label="快递单号" Text="" MaxLength="100" Readonly="true"> |
||||
|
</f:TextBox> |
||||
|
<f:DatePicker runat="server" ID ="dpUpdateTime" Label="发票时间"></f:DatePicker> |
||||
|
<f:TextBox ID="txtMemo" runat="server" Label="备注" Text="" MaxLength="100"> |
||||
|
</f:TextBox> |
||||
|
<f:Label runat="server" ID="l1" /> |
||||
|
|
||||
|
</Items> |
||||
|
</f:FormRow> |
||||
|
</Rows> |
||||
|
</f:Form> |
||||
|
</Items> |
||||
|
</f:GroupPanel> |
||||
|
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="true" PageSize="500" BoxFlex="1" CssClass="maingrid" |
||||
|
runat="server" DataKeyNames="UID,InvcBillNum,Qty,CanQty,State" IsDatabasePaging="True" AllowPaging="True" |
||||
|
EnableRowSelectEvent="True" AutoScroll="True" SortField="PoBillNum" OnRowDataBound="Grid1_RowDataBound"> |
||||
|
<Columns> |
||||
|
|
||||
|
<f:BoundField DataField="ID" HeaderText="ID" ColumnID="ID" Hidden="true" /> |
||||
|
<f:BoundField SortField="ProjectId" DataField="ProjectId" HeaderText="项目编号" ColumnID="ProjectId" Width="100px" /> |
||||
|
<f:BoundField SortField="PoBillNum" DataField="PoBillNum" HeaderText="订单" ColumnID="Line" Width="100px" /> |
||||
|
<f:BoundField SortField="PoLineNum" DataField="PoLineNum" HeaderText="订单行" ColumnID="ProductCode" Width="80px" /> |
||||
|
<%--<f:BoundField SortField="ProductName" DataField="AsnBillNum" HeaderText="收货单" ColumnID="ProductName" Width="100px" />--%> |
||||
|
<f:BoundField SortField="AsnBillNum" DataField="AsnBillNum" HeaderText="发货单" ColumnID="UnitCode" Width="120px" /> |
||||
|
<f:BoundField SortField="PartCode" DataField="PartCode" HeaderText="零件号" ColumnID="PackageQty" Width="80px" /> |
||||
|
<f:BoundField SortField="PartDesc1" DataField="PartDesc1" HeaderText="零件名称" ColumnID="CurrencyCode" Width="300px" /> |
||||
|
<f:BoundField SortField="Currency" DataField="Currency" HeaderText="币种" ColumnID="Price" Width="80px" /> |
||||
|
<f:TemplateField Width="90px" HeaderText="单价"> |
||||
|
<ItemTemplate> |
||||
|
<asp:TextBox ID="txtPrice" runat="server" Width="80px" onkeyup="if(isNaN(value))execCommand('undo')" onafterpaste="if(isNaN(value))execCommand('undo')" |
||||
|
Text='<%# Eval("Price") %>' MaxLength="12" ></asp:TextBox> |
||||
|
</ItemTemplate> |
||||
|
</f:TemplateField> |
||||
|
|
||||
|
|
||||
|
<f:BoundField SortField="PurCost" runat="server" HeaderText="采购价格" ColumnID="" DataField="PurCost" /> |
||||
|
|
||||
|
|
||||
|
<f:BoundField SortField="UpdateTime" runat="server" HeaderText="收货日期" ColumnID="" DataField="UpdateTime" /> |
||||
|
<f:BoundField SortField="CanQty" DataField="CanQty" HeaderText="可开票数量" ColumnID="OpenQty" Width="80px" /> |
||||
|
|
||||
|
<f:TemplateField HeaderText="开票数量" Width="90px"> |
||||
|
<ItemTemplate> |
||||
|
<asp:TextBox ID="txtQty" runat="server" Width="80px" |
||||
|
Text='<%# Eval("Qty") %>' MaxLength="12"></asp:TextBox> |
||||
|
</ItemTemplate> |
||||
|
</f:TemplateField> |
||||
|
|
||||
|
<f:TemplateField HeaderText="备注" Width="100px"> |
||||
|
<ItemTemplate> |
||||
|
<asp:TextBox ID="txtLineMemo" runat="server" Width="300px" |
||||
|
Text='<%# Eval("Remark") %>' MaxLength="200" ></asp:TextBox> |
||||
|
</ItemTemplate> |
||||
|
</f:TemplateField> |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
</Columns> |
||||
|
</f:Grid> |
||||
|
</Items> |
||||
|
</f:Panel> |
||||
|
<f:Window runat="server" ID="Window1" Hidden="True" |
||||
|
WindowPosition="Center" IsModal="true" Title="Popup Window 1" Target="Parent" EnableIFrame="true" |
||||
|
IFrameUrl="about:blank" Height="640px" Width="700px" OnClose="Window1_OnClose"/> |
||||
|
<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> |
||||
|
</form> |
||||
|
</body> |
||||
|
</html> |
@ -0,0 +1,560 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
|
using System.Web; |
||||
|
using System.Web.UI; |
||||
|
using System.Web.UI.WebControls; |
||||
|
using CK.SCP.Common; |
||||
|
using CK.SCP.Controller; |
||||
|
using CK.SCP.Models.Enums; |
||||
|
using CK.SCP.Models.ScpEntity; |
||||
|
using CK.SCP.Utils; |
||||
|
using FineUI; |
||||
|
using System.Drawing; |
||||
|
|
||||
|
namespace SCP.Views.SupplierData.SupplierFinance |
||||
|
{ |
||||
|
public partial class SCP_INVOICE_EDIT : PageBase |
||||
|
{ |
||||
|
protected void Page_Load(object sender, EventArgs e) |
||||
|
{ |
||||
|
IsRoleRight(); |
||||
|
|
||||
|
if (!IsPostBack) |
||||
|
{ |
||||
|
TranslatorAgents(Toolbar2); |
||||
|
TranslatorAgent(Grid1); |
||||
|
TranslatorAgents(FormRow_1); |
||||
|
TranslatorAgents(FormRow_2); |
||||
|
TranslatorAgents(FormRow_3); |
||||
|
TranslatorAgents(FormRow_4); |
||||
|
BindData(); |
||||
|
GetInvoice(); |
||||
|
SetRoleRule(); |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
|
||||
|
public void IsRoleRight() |
||||
|
{ |
||||
|
//if (!CurrentUser.RoleList.Contains("供应商"))
|
||||
|
//{
|
||||
|
// Alert.Show("当前用户角色不能操作该模块!");
|
||||
|
// return;
|
||||
|
//}
|
||||
|
//if (CurrentUser.VenderList == null || CurrentUser.VenderList.Count == 0)
|
||||
|
//{
|
||||
|
// Alert.Show("当前用户未选择地点!");
|
||||
|
// return;
|
||||
|
//}
|
||||
|
} |
||||
|
|
||||
|
private void SetRoleRule() |
||||
|
{ |
||||
|
//IsPriceVisible(Grid1, "合同价格");
|
||||
|
//IsPriceVisible(Grid1, "合同差额");
|
||||
|
IsPriceVisible(Grid1, "要货日期"); |
||||
|
} |
||||
|
|
||||
|
public decimal ToDecimal(decimal num, int scale) |
||||
|
{ |
||||
|
decimal tempOdds = Math.Round(num, scale); |
||||
|
//if (tempOdds > num)
|
||||
|
//{
|
||||
|
// num = (decimal)((double)(tempOdds - (decimal)Math.Pow(10, -scale)));
|
||||
|
//}
|
||||
|
//else
|
||||
|
//{
|
||||
|
// num = (decimal)((double)tempOdds);
|
||||
|
//}
|
||||
|
//return num;
|
||||
|
return tempOdds; |
||||
|
} |
||||
|
|
||||
|
private void Search(Action<IQueryable<V_TB_INVOICE_DETAIL>> p_list) |
||||
|
{ |
||||
|
|
||||
|
string id = GetQueryValue("ID"); |
||||
|
V_TB_INVOICE_DETAIL _tb = new V_TB_INVOICE_DETAIL(); |
||||
|
_tb.InvcBillNum = id; |
||||
|
SCP_INVOICE_CONTROLLER.Get_V_TB_INVOICE_DETAIL_List(_tb, (ret) => { |
||||
|
|
||||
|
if (ret.State == ReturnStatus.Succeed) |
||||
|
{ |
||||
|
p_list(ret.Result); |
||||
|
} |
||||
|
|
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
public void BindData() |
||||
|
{ |
||||
|
Search(ret => |
||||
|
{ |
||||
|
Grid1.RecordCount = ret.Count(); |
||||
|
var list = SortAndPage(ret, Grid1); |
||||
|
//Grid1.DataSource =SCP_RECIVECE_CONTROLLER.Get_V_TB_INVOICE_LIST(list.ToList());
|
||||
|
List<V_TB_INVOICE_DETAIL> temp = SCP_RECIVECE_CONTROLLER.Get_V_TB_INVOICE_LIST(list.ToList()); |
||||
|
temp = SCP_CONTRACT_CONTROLLER.GET_CONTRACT_PRICE_LIST(temp); |
||||
|
|
||||
|
//decimal htjgSum = 0;//合同总价
|
||||
|
//decimal htceSum = 0;//合同差额
|
||||
|
//foreach (V_TB_INVOICE_DETAIL rec in temp)
|
||||
|
//{
|
||||
|
// rec.Qty = ToDecimal(rec.Qty, 2);
|
||||
|
// rec.CanQty = ToDecimal(rec.CanQty, 2);
|
||||
|
|
||||
|
// htjgSum += rec.Qty * (rec.ContractPrice == null ? 0 : Convert.ToDecimal(rec.ContractPrice));//开票数量*合同价格
|
||||
|
// htceSum += rec.Qty * (rec.BlancePrice == null ? 0 : Convert.ToDecimal(rec.BlancePrice));//开票数量*合同差额
|
||||
|
//}
|
||||
|
|
||||
|
//txtContractPrice1.Text = htjgSum.ToString();
|
||||
|
//txtBlancePrice1.Text = htceSum.ToString();
|
||||
|
GetInvoice(); |
||||
|
Grid1.DataSource = temp; |
||||
|
Grid1.DataBind(); |
||||
|
}); |
||||
|
|
||||
|
|
||||
|
} |
||||
|
|
||||
|
private void GetInvoice() |
||||
|
{ |
||||
|
string id = GetQueryValue("ID"); |
||||
|
string vendid = ""; |
||||
|
if (CurrentUser.VenderList != null && CurrentUser.VenderList.Count > 0) |
||||
|
{ |
||||
|
vendid = CurrentUser.VenderList[0]; |
||||
|
} |
||||
|
|
||||
|
SCP_INVOICE_CONTROLLER.Get_V_TB_INVOICE_List(new V_TB_INVOICE { InvcBillNum = id, VendId = vendid }, (ret) => { |
||||
|
|
||||
|
if (ret.State == ReturnStatus.Succeed) |
||||
|
{ |
||||
|
var _ls = ret.Result.ToList(); |
||||
|
if (_ls != null && _ls.Count > 0) |
||||
|
{ |
||||
|
var _Model = _ls[0]; |
||||
|
Session["Invoice"] = _Model; |
||||
|
txtState.Text = _Model.State_DESC; |
||||
|
txtBillNo.Text = _Model.InvcBillNum; |
||||
|
txtBillTime.Text = Convert.ToDateTime(_Model.CreateTime).ToString("yyyy-MM-dd"); |
||||
|
txtSupplierName.Text = _Model.VendName; |
||||
|
txtInvoiceNumber.Text = _Model.InvoiceNum; |
||||
|
txtExpressNumber.Text = _Model.ExpressNum; |
||||
|
|
||||
|
dpUpdateTime.SelectedDate = _Model.UpdateTime; |
||||
|
txtTax.SelectedValue = _Model.Tax != null ? _Model.Tax.Value.ToString() : "0"; |
||||
|
txtTaxAmount.Text = _Model.TaxAmount!=null?_Model.TaxAmount.Value.ToString():"0"; |
||||
|
txtDiscountPrice.Text = _Model.DiscountPrice != null ? _Model.DiscountPrice.Value.ToString() : "0"; |
||||
|
//if (_Model.State != (int)InvoiceState.New)
|
||||
|
//{
|
||||
|
txtContractPrice1.Text = _Model.ContractPrice != null ? _Model.ContractPrice.ToString() : string.Empty; |
||||
|
txtBlancePrice1.Text = _Model.BlancePrice != null ? _Model.BlancePrice.ToString() : string.Empty; |
||||
|
//}
|
||||
|
txtAmount.Text = _Model.Amount.ToString(); |
||||
|
txtTotal.Text = _Model.Total != null ? _Model.Total.ToString() : string.Empty; |
||||
|
txtMemo.Text = _Model.Remark; |
||||
|
if (_Model.State == (int)InvoiceState.New || _Model.State == (int)InvoiceState.CheckFail) |
||||
|
{ |
||||
|
this.btnOK.Hidden = false; |
||||
|
this.btnApply.Hidden = false; |
||||
|
this.btnReject.Hidden = false; |
||||
|
} |
||||
|
|
||||
|
if (_Model.State == (int)InvoiceState.Reject) |
||||
|
{ |
||||
|
this.btnReject.Hidden = true; |
||||
|
this.btnOK.Hidden = false; |
||||
|
} |
||||
|
|
||||
|
//提交之后不能作废
|
||||
|
if (_Model.State == (int)InvoiceState.New) |
||||
|
{ |
||||
|
this.btnOK.Hidden = false; |
||||
|
this.btnReject.Hidden = false; |
||||
|
} |
||||
|
|
||||
|
if (_Model.State == (int)InvoiceState.Apply) |
||||
|
{ |
||||
|
this.btnOK.Hidden = false; |
||||
|
this.btnApply.Hidden = true;//提交申请
|
||||
|
this.btnReject.Hidden = true;//发票作废
|
||||
|
this.btnMail.Hidden = true;//寄出发票
|
||||
|
} |
||||
|
|
||||
|
if (_Model.State == (int)InvoiceState.Mail) |
||||
|
{ |
||||
|
this.btnOK.Hidden = true;//确定修改
|
||||
|
this.btnApply.Hidden = true;//提交申请
|
||||
|
this.btnReject.Hidden = true;//发票作废
|
||||
|
this.btnMail.Hidden = true;//寄出发票
|
||||
|
|
||||
|
txtInvoiceNumber.Readonly = true; |
||||
|
txtInvoiceNumber.Required = false; |
||||
|
|
||||
|
txtExpressNumber.Readonly = true; |
||||
|
txtExpressNumber.Required = false; |
||||
|
|
||||
|
txtContractPrice1.Readonly = true; |
||||
|
txtContractPrice1.Required = false; |
||||
|
|
||||
|
txtBlancePrice1.Readonly = true; |
||||
|
txtBlancePrice1.Required = false; |
||||
|
} |
||||
|
|
||||
|
if ( _Model.State == (int)InvoiceState.FinanceFail || _Model.State == (int)InvoiceState.CheckSuccess ) |
||||
|
{ |
||||
|
txtInvoiceNumber.Readonly = false; |
||||
|
txtInvoiceNumber.Required = true; |
||||
|
txtExpressNumber.Readonly = false; |
||||
|
txtContractPrice1.Readonly = false; |
||||
|
txtContractPrice1.Required = false; |
||||
|
txtBlancePrice1.Readonly = true; |
||||
|
txtBlancePrice1.Required = false; |
||||
|
this.btnMail.Hidden = false; |
||||
|
this.btnReject.Hidden = false; |
||||
|
this.btnOK.Hidden = false; |
||||
|
txtContractPrice1.Readonly = true; |
||||
|
txtContractPrice1.Required = false; |
||||
|
txtContractPrice1.Enabled = false; |
||||
|
txtBlancePrice1.Readonly = false; |
||||
|
} |
||||
|
if (_Model.State ==(int) InvoiceState.CheckSuccess) |
||||
|
{ |
||||
|
this.btnOK.Hidden = true; |
||||
|
txtMemo.Enabled = false; |
||||
|
|
||||
|
for (int i = 0, count = Grid1.Rows.Count; i < count; i++) |
||||
|
{ |
||||
|
object[] rowDataKeys = Grid1.DataKeys[i]; |
||||
|
GridRow row = Grid1.Rows[i]; |
||||
|
|
||||
|
var txtPrice = (System.Web.UI.WebControls.TextBox)row.FindControl("txtPrice"); |
||||
|
var txtQty = (System.Web.UI.WebControls.TextBox)row.FindControl("txtQty"); |
||||
|
var txtLineMemo = (System.Web.UI.WebControls.TextBox)row.FindControl("txtLineMemo"); |
||||
|
|
||||
|
|
||||
|
txtPrice.ReadOnly = true; |
||||
|
txtPrice.Enabled = false; |
||||
|
txtQty.ReadOnly = true; |
||||
|
txtQty.Enabled = false; |
||||
|
txtLineMemo.ReadOnly = true; |
||||
|
txtLineMemo.Enabled = false; |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
}); |
||||
|
|
||||
|
|
||||
|
} |
||||
|
|
||||
|
|
||||
|
protected void btnOK_Click(object sender, EventArgs e) |
||||
|
{ |
||||
|
|
||||
|
var _invoice = Session["Invoice"] as V_TB_INVOICE; |
||||
|
|
||||
|
string InvoiceNumber = MyWebString.GetString(this.txtInvoiceNumber.Text.Trim()); |
||||
|
string Memo = MyWebString.GetString(this.txtMemo.Text.Trim()); |
||||
|
string ExpressNumber = MyWebString.GetString(this.txtExpressNumber.Text.Trim()); |
||||
|
string ContractPrice1 = MyWebString.GetString(this.txtContractPrice1.Text.Trim());//合同价格
|
||||
|
string BlancePrice1 = MyWebString.GetString(this.txtBlancePrice1.Text.Trim());//合同差额
|
||||
|
string DiscountPrice1 = MyWebString.GetString(this.txtDiscountPrice.Text.Trim()); |
||||
|
//if (_invoice.State != (int)InvoiceState.New &&
|
||||
|
// _invoice.State != (int)InvoiceState.CheckFail)
|
||||
|
//{
|
||||
|
// Alert.Show(_invoice.InvcBillNum + " 不允许修改,只有状态为 " + "新建" + " 或 " +
|
||||
|
// "采购退回" + " 才能修改");
|
||||
|
// return;
|
||||
|
//}
|
||||
|
if (!string.IsNullOrEmpty(txtTax.SelectedValue)) |
||||
|
{ |
||||
|
_invoice.Tax = decimal.Parse(txtTax.SelectedValue); |
||||
|
} |
||||
|
_invoice.InvoiceNum = InvoiceNumber; |
||||
|
_invoice.Remark = Memo; |
||||
|
_invoice.ExpressNum = ExpressNumber; |
||||
|
|
||||
|
//_invoice.UpdateTime = dpUpdateTime.SelectedDate.Value;
|
||||
|
//_invoice.State = (int)InvoiceState.Apply;
|
||||
|
|
||||
|
if (string.IsNullOrEmpty(ContractPrice1)) |
||||
|
{ |
||||
|
_invoice.ContractPrice = 0; |
||||
|
} |
||||
|
|
||||
|
if (string.IsNullOrEmpty(BlancePrice1)) |
||||
|
{ |
||||
|
_invoice.BlancePrice = 0; |
||||
|
} |
||||
|
if (string.IsNullOrEmpty(DiscountPrice1)) |
||||
|
{ |
||||
|
_invoice.DiscountPrice = 0; |
||||
|
} |
||||
|
if (_invoice.State == (int)InvoiceState.CheckSuccess) |
||||
|
{ |
||||
|
|
||||
|
if (dpUpdateTime.SelectedDate == null) |
||||
|
{ |
||||
|
Alert.Show("发票时间必须填写,时间为纸质发票开票时间"); |
||||
|
return; |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
_invoice.UpdateTime = dpUpdateTime.SelectedDate.Value; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
decimal c1; |
||||
|
decimal b1; |
||||
|
decimal d1; |
||||
|
if (decimal.TryParse(ContractPrice1, out c1)) |
||||
|
{ |
||||
|
_invoice.ContractPrice = c1; |
||||
|
} |
||||
|
//else
|
||||
|
//{
|
||||
|
// Alert.Show("折扣金额请填写数字!");
|
||||
|
// return;
|
||||
|
//}
|
||||
|
|
||||
|
if (decimal.TryParse(BlancePrice1, out b1)) |
||||
|
{ |
||||
|
_invoice.BlancePrice = b1; |
||||
|
} |
||||
|
if (decimal.TryParse(DiscountPrice1, out d1)) |
||||
|
{ |
||||
|
_invoice.DiscountPrice = d1; |
||||
|
} |
||||
|
//else
|
||||
|
//{
|
||||
|
// Alert.Show("调整请填写数字!");
|
||||
|
// return;
|
||||
|
//}
|
||||
|
|
||||
|
|
||||
|
List<V_TB_INVOICE_DETAIL> _ls = new List<V_TB_INVOICE_DETAIL>(); |
||||
|
if (this.txtQty.ReadOnly == false) |
||||
|
{ |
||||
|
|
||||
|
for (int i = 0, count = Grid1.Rows.Count; i < count; i++) |
||||
|
{ |
||||
|
object[] rowDataKeys = Grid1.DataKeys[i]; |
||||
|
GridRow row = Grid1.Rows[i]; |
||||
|
|
||||
|
V_TB_INVOICE_DETAIL _entity = new V_TB_INVOICE_DETAIL(); |
||||
|
_entity.UID = ConvertHelper.To<Int32>(rowDataKeys[0]); |
||||
|
_entity.InvcBillNum = rowDataKeys[1] as string; |
||||
|
_entity.Qty = ConvertHelper.To<Decimal>(rowDataKeys[2]); |
||||
|
_entity.CanQty = ConvertHelper.To<Decimal>(rowDataKeys[3]); |
||||
|
_entity.State = ConvertHelper.To<Int32>(rowDataKeys[4]); |
||||
|
var txtQty = (System.Web.UI.WebControls.TextBox)row.FindControl("txtQty"); |
||||
|
var txtPrice = (System.Web.UI.WebControls.TextBox)row.FindControl("txtPrice"); |
||||
|
var txtLineMemo = (System.Web.UI.WebControls.TextBox)row.FindControl("txtLineMemo"); |
||||
|
//var txtContractPrice = (System.Web.UI.WebControls.TextBox)row.FindControl("txtContractPrice");
|
||||
|
//var txtBlancePrice = (System.Web.UI.WebControls.TextBox)row.FindControl("txtBlancePrice");
|
||||
|
|
||||
|
decimal QtyNew = 0; |
||||
|
try |
||||
|
{ |
||||
|
if (txtQty.Text.Trim() != "") |
||||
|
{ |
||||
|
QtyNew = Convert.ToDecimal(txtQty.Text.Trim()); |
||||
|
} |
||||
|
} |
||||
|
catch |
||||
|
{ |
||||
|
Alert.Show("开票数量输入不正确"); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
if (QtyNew > _entity.CanQty + _entity.Qty) |
||||
|
{ |
||||
|
Alert.Show("开票数量不能大于可用开数票"); |
||||
|
return; |
||||
|
|
||||
|
} |
||||
|
|
||||
|
decimal PriceNew = 0; |
||||
|
try |
||||
|
{ |
||||
|
if (txtPrice.Text.Trim() != "") |
||||
|
{ |
||||
|
PriceNew = Convert.ToDecimal(txtPrice.Text.Trim()); |
||||
|
} |
||||
|
} |
||||
|
catch |
||||
|
{ |
||||
|
Alert.Show("单价输入不正确"); |
||||
|
return; |
||||
|
} |
||||
|
_entity.Remark = txtLineMemo.Text; |
||||
|
_entity.Price = PriceNew; |
||||
|
_entity.Qty = QtyNew; |
||||
|
_ls.Add(_entity); |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
|
||||
|
// SCPDB.Database.SqlQuery<V_TB_INVOICE>("select * from V_TB_INVOICE WHERE STATE==0 AND ").ToArray
|
||||
|
|
||||
|
if (_ls.Count > 0) |
||||
|
{ |
||||
|
var ret = SCP_INVOICE_CONTROLLER.SAVE_TB_INVOICE_APPLY(_invoice,_ls); |
||||
|
if (ret.State == ReturnStatus.Succeed) |
||||
|
{ |
||||
|
|
||||
|
Alert.Show("发票明细修改成功!"); |
||||
|
|
||||
|
BindData(); |
||||
|
} |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
Alert.Show("更改记录数为零"); |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
private void SET_INVOICE_STATE(string p_msg, InvoiceState p_state) |
||||
|
{ |
||||
|
if (Session["Invoice"] != null) |
||||
|
{ |
||||
|
var _Invoice = Session["Invoice"] as V_TB_INVOICE; |
||||
|
|
||||
|
string InvoiceNumber = MyWebString.GetString(this.txtInvoiceNumber.Text.Trim());//金税票号
|
||||
|
string ExpressNumber = MyWebString.GetString(this.txtExpressNumber.Text.Trim());//快递单号
|
||||
|
|
||||
|
string ContractPrice1 = MyWebString.GetString(this.txtContractPrice1.Text.Trim());//合同价格
|
||||
|
string BlancePrice1 = MyWebString.GetString(this.txtBlancePrice1.Text.Trim());//合同差额
|
||||
|
string DiscountPrice1 = MyWebString.GetString(this.txtDiscountPrice.Text.Trim()); |
||||
|
_Invoice.InvoiceNum = InvoiceNumber; |
||||
|
_Invoice.ExpressNum = ExpressNumber; |
||||
|
_Invoice.UpdateTime = dpUpdateTime.SelectedDate; |
||||
|
if (string.IsNullOrEmpty(ContractPrice1)) |
||||
|
{ |
||||
|
_Invoice.ContractPrice = 0; |
||||
|
} |
||||
|
if (string.IsNullOrEmpty(BlancePrice1)) |
||||
|
{ |
||||
|
_Invoice.BlancePrice = 0; |
||||
|
} |
||||
|
|
||||
|
decimal c1; |
||||
|
decimal b1; |
||||
|
decimal d1; |
||||
|
if (decimal.TryParse(ContractPrice1, out c1)) |
||||
|
{ |
||||
|
_Invoice.ContractPrice = c1; |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
_Invoice.ContractPrice = 0; |
||||
|
} |
||||
|
|
||||
|
if (decimal.TryParse(BlancePrice1, out b1)) |
||||
|
{ |
||||
|
_Invoice.BlancePrice = b1; |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
_Invoice.BlancePrice = 0; |
||||
|
} |
||||
|
if (decimal.TryParse(DiscountPrice1, out d1)) |
||||
|
{ |
||||
|
_Invoice.DiscountPrice = d1; |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
_Invoice.DiscountPrice = 0; |
||||
|
} |
||||
|
if (p_state == InvoiceState.Mail) |
||||
|
{ |
||||
|
if (string.IsNullOrEmpty(InvoiceNumber)) |
||||
|
{ |
||||
|
Alert.Show("请填写金税票号!"); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
if (string.IsNullOrEmpty(ExpressNumber)) |
||||
|
{ |
||||
|
Alert.Show("请填写快递单号!"); |
||||
|
return; |
||||
|
} |
||||
|
if (dpUpdateTime.SelectedDate == null) |
||||
|
{ |
||||
|
Alert.Show("发票时间必须填写,时间为纸质发票开票时间"); |
||||
|
return; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
var ret = SCP_INVOICE_CONTROLLER.SAVE_TB_INVOICE_STATE(_Invoice, p_state,CurrentUser.ChineseName); |
||||
|
if (ret.State == ReturnStatus.Succeed) |
||||
|
{ |
||||
|
Alert.Show(p_msg); |
||||
|
|
||||
|
BindData(); |
||||
|
GetInvoice(); |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
Alert.Show(ret.Message); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
protected void btnApply_Click(object sender, EventArgs e) |
||||
|
{ |
||||
|
|
||||
|
SET_INVOICE_STATE("发票申请成功!", InvoiceState.Apply); |
||||
|
|
||||
|
} |
||||
|
|
||||
|
protected void btnMail_Click(object sender, EventArgs e) |
||||
|
{ |
||||
|
SET_INVOICE_STATE("发票已经寄出!", InvoiceState.Mail); |
||||
|
} |
||||
|
|
||||
|
protected void btnReject_Click(object sender, EventArgs e) |
||||
|
{ |
||||
|
SET_INVOICE_STATE("发票已经作废!", InvoiceState.Reject); |
||||
|
} |
||||
|
|
||||
|
protected void Window1_OnClose(object sender, WindowCloseEventArgs e) |
||||
|
{ |
||||
|
//string id = GetQueryValue("ID");
|
||||
|
|
||||
|
//TB_INVOICE model = InvoiceController.GetDataByBillInvoiceBillNum(id);
|
||||
|
//InvoiceController.UpdateDataRemark(e.CloseArgument, model);
|
||||
|
|
||||
|
} |
||||
|
|
||||
|
protected void btnRed_Click(object sender, EventArgs e) |
||||
|
{ |
||||
|
string id = GetQueryValue("ID"); |
||||
|
V_TB_INVOICE _tb = new V_TB_INVOICE(); |
||||
|
_tb.InvcBillNum = id; |
||||
|
var ret = SCP_INVOICE_CONTROLLER.Add_New_Red_Invoice(_tb); |
||||
|
|
||||
|
if (ret.State == ReturnStatus.Succeed) |
||||
|
{ |
||||
|
BindData(); |
||||
|
GetInvoice(); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
protected void Grid1_RowDataBound(object sender, GridRowEventArgs e) |
||||
|
{ |
||||
|
System.Web.UI.WebControls.TextBox _label = (System.Web.UI.WebControls.TextBox)Grid1.Rows[e.RowIndex].FindControl("txtQty"); |
||||
|
if (!string.IsNullOrEmpty(_label.Text)) |
||||
|
{ |
||||
|
if (decimal.Parse(_label.Text) < 0) |
||||
|
{ |
||||
|
_label.ForeColor = Color.Red; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,359 @@ |
|||||
|
//------------------------------------------------------------------------------
|
||||
|
// <自动生成>
|
||||
|
// 此代码由工具生成。
|
||||
|
//
|
||||
|
// 对此文件的更改可能导致不正确的行为,如果
|
||||
|
// 重新生成代码,则所做更改将丢失。
|
||||
|
// </自动生成>
|
||||
|
//------------------------------------------------------------------------------
|
||||
|
|
||||
|
namespace SCP.Views.SupplierData.SupplierFinance |
||||
|
{ |
||||
|
|
||||
|
|
||||
|
public partial class SCP_INVOICE_EDIT |
||||
|
{ |
||||
|
|
||||
|
/// <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>
|
||||
|
/// ToolbarSeparator3 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.ToolbarSeparator ToolbarSeparator3; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// btnOK 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Button btnOK; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// btnApply 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Button btnApply; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// btnMail 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Button btnMail; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// btnReject 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Button btnReject; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// btnRed 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Button btnRed; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// gp1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.GroupPanel gp1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// FormRow_1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.FormRow FormRow_1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// txtBillNo 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox txtBillNo; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// txtState 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox txtState; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// txtBillTime 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox txtBillTime; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// txtSupplierName 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox txtSupplierName; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Label3 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Label Label3; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// FormRow_2 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.FormRow FormRow_2; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// txtAmount 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox txtAmount; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Label1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Label Label1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// txtTax 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.DropDownList txtTax; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// txtTaxAmount 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox txtTaxAmount; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// txtTotal 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox txtTotal; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// FormRow_3 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.FormRow FormRow_3; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// txtContractPrice1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.NumberBox txtContractPrice1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// txtDiscountPrice 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.NumberBox txtDiscountPrice; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// txtBlancePrice1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.NumberBox txtBlancePrice1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// txtInvoiceNumber 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox txtInvoiceNumber; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// FormRow_4 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.FormRow FormRow_4; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// txtExpressNumber 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox txtExpressNumber; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// dpUpdateTime 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.DatePicker dpUpdateTime; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// txtMemo 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox txtMemo; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// l1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Label l1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Grid1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Grid Grid1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// txtPrice 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::System.Web.UI.WebControls.TextBox txtPrice; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// txtQty 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::System.Web.UI.WebControls.TextBox txtQty; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// txtLineMemo 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::System.Web.UI.WebControls.TextBox txtLineMemo; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Window1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Window Window1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// WindowUpload 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Window WindowUpload; |
||||
|
} |
||||
|
} |
@ -0,0 +1,250 @@ |
|||||
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SCP_RECEIVE_LIST.aspx.cs" Inherits="SCP.SupplierData.SupplierFinance.ReceiveList" %> |
||||
|
|
||||
|
<%@ Register Assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Namespace="System.Web.UI.DataVisualization.Charting" TagPrefix="asp" %> |
||||
|
|
||||
|
<%@ Import Namespace="CK.SCP.Utils" %> |
||||
|
<%@ Import Namespace="CK.SCP.Models.Enums" %> |
||||
|
|
||||
|
<!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> |
||||
|
<style> |
||||
|
.totalpanel .x-panel-body { |
||||
|
border-top-width: 0 !important; |
||||
|
} |
||||
|
</style> |
||||
|
</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:Button ID="Button1" runat="server" EnablePostBack="True" Text="刷新" Icon="Reload" OnClientClick="location.reload();"> |
||||
|
</f:Button> |
||||
|
<f:Button ID="btnCreate" runat="server" EnablePostBack="True" Text="生成发票" OnClick="btnCreate_OnClick" Icon="Add" Hidden="true"> |
||||
|
</f:Button> |
||||
|
<f:Button ID="btnCreateAll" runat="server" EnablePostBack="True" Text="生成发票" Icon="Add" OnClick="btnCreateAll_Click" OnClientClick="if(!confirm('生成发票时请先处理退货数量,如发现收票时还有退货数量未处理,造成不能收票自行负责!'))return false;"> |
||||
|
</f:Button> |
||||
|
<f:Button ID="btn" runat="server" EnablePostBack="True" Text="补开发票" Icon="Add" Hidden="true"> |
||||
|
</f:Button> |
||||
|
<f:Button ID="Button2" runat="server" EnablePostBack="True" Text="导出" Icon="PageExcel" OnClick="btnOutput_OnClick"> |
||||
|
</f:Button> |
||||
|
<f:Button ID="btnCanIn" runat="server" EnablePostBack="True" Text="只看可开票零件" Icon="Zoom" OnClick="btnCanIn_Click" Hidden="true"> |
||||
|
</f:Button> |
||||
|
<f:Button ID="btnShow" runat="server" Text="查询面板" Icon="Zoom" OnClick="btnShow_Click"> |
||||
|
</f:Button> |
||||
|
<f:ToolbarFill runat="server" Hidden="true"/> |
||||
|
<f:TextBox ID="tb_RecvBillNum" runat="server" Label="单据号" Hidden="true"/> |
||||
|
<f:Button ID="btn_Search" runat="server" EnablePostBack="True" Text="快速查找" OnClick="btnSearch_Click" Hidden="true"></f:Button> |
||||
|
|
||||
|
<f:DropDownList ID="DDL_VEND_LIST" DataValueField="VendId" DataTextField="VendName" runat="server" Label="供应商编码" EnableEdit="true" EnableMultiSelect="false" Hidden="true"/> |
||||
|
<f:Button ID="BTN_INV" runat="server" EnablePostBack="True" Text="确认" OnClick="BTN_INV_Click" Hidden="true" Icon="Accept" ></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" ID="FormRow_1"> |
||||
|
<Items> |
||||
|
|
||||
|
<f:TextBox runat = "server" Label = "订单编号" EmptyText = "" ID = "TXT_BillNo" /> |
||||
|
<f:TextBox runat = "server" Label = "发货单号" EmptyText = "" ID = "TXT_ASNBill" /> |
||||
|
<f:TextBox runat = "server" Label = "供应商名称" EmptyText = "" ID = "TXT_VendName" /> |
||||
|
<f:TextBox runat = "server" Label = "供应商编号" EmptyText = "" ID = "TXT_VendId" /> |
||||
|
<f:DropDownList runat="server" ID="DDL_State" Label="单据类型" Hidden="true"> |
||||
|
<f:ListItem Text="-" Value=""/> |
||||
|
<f:ListItem Text="退货单" Value="退货单" /> |
||||
|
<f:ListItem Text="收货单" Value="收货单" /> |
||||
|
</f:DropDownList> |
||||
|
</Items> |
||||
|
</f:FormRow> |
||||
|
|
||||
|
<f:FormRow runat="server" ID="FormRow_2"> |
||||
|
<Items> |
||||
|
<f:TextBox runat = "server" Label = "项目编号" EmptyText = "" ID = "TXT_ProjectId" /> |
||||
|
<f:TextBox runat = "server" Label = "零件编号" EmptyText = "" ID = "TXT_PartCode" /> |
||||
|
<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" EmptyText="请选择日期" Label="至" ID="Date_EndDate" /> |
||||
|
</Items> |
||||
|
</f:FormRow> |
||||
|
<f:FormRow runat="server" ID="FormRow_3"> |
||||
|
<Items> |
||||
|
<f:TextBox runat = "server" Label = "收(退)货单号" EmptyText = "" ID = "TXT_RECEIVE" /> |
||||
|
<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:Form runat="server" Title=""> |
||||
|
<Items> |
||||
|
<f:FormRow runat="server" ColumnWidths="33% 33% 33%" ID="FormRow1"> |
||||
|
<Items> |
||||
|
<f:NumberBox ID="txtContractPrice1" runat="server" Label="折扣金额" Hidden="true" /> |
||||
|
<f:NumberBox ID="txtBlancePrice1" runat="server" Label="调整税额" MaxValue="1" Hidden="true" /> |
||||
|
<f:Label runat="server"></f:Label> |
||||
|
<f:Label runat="server"></f:Label> |
||||
|
</Items> |
||||
|
</f:FormRow> |
||||
|
<f:FormRow runat="server" ColumnWidths="33% 33% 33%" ID="FormRow2"> |
||||
|
<Items> |
||||
|
<f:DropDownList runat="server" Label="供应商税率" ID="lbTaxRate" AutoPostBack="true" > |
||||
|
<f:ListItem Text="0.16" Value="0.16" /> |
||||
|
<f:ListItem Text="0.13" Value="0.13" /> |
||||
|
<f:ListItem Text="0" Value="0" /> |
||||
|
</f:DropDownList> |
||||
|
<f:Button ID="btnTax" runat="server" Text="使用税率" OnClientClick="updateTotal();" Icon="Accept" ></f:Button> |
||||
|
<f:Label runat="server"></f:Label> |
||||
|
<f:Label runat="server"></f:Label> |
||||
|
</Items> |
||||
|
</f:FormRow> |
||||
|
</Items> |
||||
|
</f:Form> |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
<f:Grid ID="Grid_V_TB_RECEIVE_LIST" ShowBorder="true" ShowHeader="true" PageSize="100" BoxFlex="1" CssClass="maingrid" |
||||
|
runat="server" DataKeyNames="UID,ProjectId,RecvBillNum,PartCode,PoLine,Qty,Price" IsDatabasePaging="true" AllowPaging="True" SortField="RecvBillNum" |
||||
|
AutoScroll="True" OnPageIndexChange="Grid_V_TB_RECEIVE_LIST_PageIndexChange" EnableCheckBoxSelect = "true" OnRowDataBound="Grid_V_TB_RECEIVE_LIST_RowDataBound" > |
||||
|
<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_OnSelectedIndexChanged" runat="server"> |
||||
|
<f:ListItem Text="100" Value="100" /> |
||||
|
<f:ListItem Text="200" Value="200" /> |
||||
|
<f:ListItem Text="500" Value="500" /> |
||||
|
<f:ListItem Text="1000" Value="1000" /> |
||||
|
</f:DropDownList> |
||||
|
</PageItems> |
||||
|
<Columns> |
||||
|
<%-- <f:RowNumberField runat="server" ID="chb" HeaderText="行号" />--%> |
||||
|
<%-- <f:TemplateField HeaderText="否可开票" Width="120px" ColumnID="IsCheck"> |
||||
|
<ItemTemplate> |
||||
|
<asp:Label runat="server" DataField="Qty" ID="Label1" Text='<%# Eval("IsCheck") %>'></asp:Label> |
||||
|
</ItemTemplate> |
||||
|
</f:TemplateField>--%> |
||||
|
|
||||
|
<f:BoundField runat="server" HeaderText="项目编码" DataField="ProjectId" width="80"/> |
||||
|
<f:BoundField runat="server" HeaderText="单据类型" ColumnID="BillType_DESC" DataField="BillType_DESC" width="80"/> |
||||
|
<f:BoundField runat="server" HeaderText="ERP单据号" ColumnID="ErpRecvBillNum" DataField="ErpRecvBillNum" width="80" /> |
||||
|
<f:BoundField runat="server" HeaderText="WMS单据号" ColumnID="RecvBillNum" DataField="RecvBillNum" width="80" /> |
||||
|
<f:BoundField runat="server" HeaderText="发货单号" ColumnID="AsnBillNum" DataField="AsnBillNum" width="80"/> |
||||
|
<f:BoundField runat="server" HeaderText="供应商" ColumnID="VendName" DataField="VendName" /> |
||||
|
<f:BoundField runat="server" HeaderText="供应商编码" DataField="VendId" width="80"/> |
||||
|
<f:BoundField runat="server" HeaderText="订单号" ColumnID="" DataField="PoBillNum" width="80"/> |
||||
|
<f:BoundField runat="server" HeaderText="订单行" ColumnID="" DataField="PoLine" width="50" /> |
||||
|
<f:BoundField runat="server" HeaderText="单价" ColumnID="" DataField="Price" width="80"/> |
||||
|
|
||||
|
<f:BoundField runat="server" HeaderText="采购价格" ColumnID="" DataField="PurPrice" width="80"/> |
||||
|
|
||||
|
<f:TemplateField HeaderText="可开票数量" ColumnID="Qty" width="100"> |
||||
|
<ItemTemplate> |
||||
|
<input type="hidden" class="price" runat="server" value='<%# Eval("Price") %>' /> |
||||
|
<input type="hidden" class="number" runat="server" value='<%# Eval("CanQty") %>' /> |
||||
|
<asp:Label runat="server" DataField="Qty" ID="Qty1" Text='<%# Eval("CanQty") %>'></asp:Label> |
||||
|
</ItemTemplate> |
||||
|
</f:TemplateField> |
||||
|
<f:BoundField runat="server" HeaderText="零件号" ColumnID="" DataField="PartCode" width="80"/> |
||||
|
<f:BoundField runat="server" HeaderText="零件名称" ColumnID="" DataField="PartDesc1" /> |
||||
|
<f:BoundField runat="server" HeaderText="单位" ColumnID="LocUnit" DataField="LocUnit" width="50"/> |
||||
|
<f:BoundField runat="server" HeaderText="币种" ColumnID="Currency" DataField="Currency" width="50"/> |
||||
|
|
||||
|
<f:BoundField runat="server" HeaderText="Erp收货单税率" ColumnID="Tax" DataField="Tax" width="50" Hidden="true"/> |
||||
|
|
||||
|
<f:BoundField runat="server" HeaderText="要货日期" ColumnID="BeginTime" DataField="BeginTime" Hidden="true"/> |
||||
|
<f:BoundField runat="server" HeaderText="收货时间" ColumnID="CreateTime" DataField="CreateTime" DataFormatString="{0:yyyy-MM-dd}" /> |
||||
|
<f:BoundField runat="server" HeaderText="备注" ColumnID="Remark" DataField="Remark" /> |
||||
|
</Columns> |
||||
|
</f:Grid> |
||||
|
<f:ContentPanel runat="server" CssClass="totalpanel" ShowBorder="true" ShowHeader="false" ColumnWidth="50%"> |
||||
|
<div style="margin-bottom: 10px; "> |
||||
|
<input type="hidden" id="TOTAL_PRICE" name="TOTAL_PRICE" /> |
||||
|
总计:<span id="totalPrice" style="color: red; font-size: 1.5em; font-weight: bold;" ></span> |
||||
|
<input type="hidden" id="TOTAL_PRICE1" name="TOTAL_PRICE1" /> |
||||
|
<input type="hidden" id="TOTAL_PRICE_TAX" name="TOTAL_PRICE_TAX" /> |
||||
|
税额:<span id="totalPriceTax" style="color: red; font-size: 1.5em; font-weight: bold;" ></span> |
||||
|
税后金额:<span id="totalPrice1" style="color: red; font-size: 1.5em; font-weight: bold;" ></span> |
||||
|
</div> |
||||
|
<%--<div style="margin-bottom: 10px;"> |
||||
|
</div> |
||||
|
<div style="margin-bottom: 10px;"> |
||||
|
</div>--%> |
||||
|
|
||||
|
|
||||
|
</f:ContentPanel> |
||||
|
</Items> |
||||
|
</f:Panel> |
||||
|
<f:Window runat="server" ID="Window1" Hidden="True" Height="600px" Width="1024px" AutoScroll="True" OnClose="Window1_Close" |
||||
|
WindowPosition="Center" IsModal="true" Title="明细详情" Target="Parent" EnableIFrame="true" |
||||
|
IFrameUrl="about:blank" /> |
||||
|
</form> |
||||
|
<script src="../../res/js/jquery.min.js"></script> |
||||
|
<script type="text/javascript"> |
||||
|
var gridClientID = '<%= Grid_V_TB_RECEIVE_LIST.ClientID %>'; |
||||
|
var taxRateClientID = '<%= lbTaxRate.ClientID %>'; |
||||
|
var priceSelector = '.f-grid-tpl input.price'; |
||||
|
var numberSelector = '.f-grid-tpl input.number'; |
||||
|
function getRowPrice(row) { |
||||
|
return parseFloat(row.find(priceSelector).val()); |
||||
|
} |
||||
|
function getRowNumber(row) { |
||||
|
var num = parseFloat(row.find(numberSelector).val(), 10); |
||||
|
return num; |
||||
|
} |
||||
|
function updateTotal() { |
||||
|
var grid = F(gridClientID); |
||||
|
var tax = F(taxRateClientID); |
||||
|
var selection = grid.getSelectionModel().getSelection(); |
||||
|
var store = grid.getStore(); |
||||
|
var total = 0; |
||||
|
$.each(selection, function (index, item) { |
||||
|
var rowIndex = store.indexOf(item); |
||||
|
var row = $(grid.body.el.dom).find('.x-grid-item').eq(rowIndex); |
||||
|
total += getRowNumber(row) * getRowPrice(row); |
||||
|
}); |
||||
|
$('#totalPrice').text( total.toFixed(4)); |
||||
|
$('#TOTAL_PRICE').val(total.toFixed(4)); |
||||
|
var _tax = total.toFixed(4) * parseFloat(tax.value); |
||||
|
var _totalPrice1 =parseFloat(total) + parseFloat(_tax); |
||||
|
$('#totalPriceTax').text( _tax.toFixed(4)); |
||||
|
$('#TOTAL_PRICE_TAX').val(_tax.toFixed(4)); |
||||
|
$('#totalPrice1').text( _totalPrice1.toFixed(4)); |
||||
|
$('#TOTAL_PRICE1').val(_totalPrice1); |
||||
|
|
||||
|
} |
||||
|
function registerSelectionChangeEvents() { |
||||
|
var grid = F(gridClientID); |
||||
|
|
||||
|
grid.on('selectionchange', function (cmp, selected) { |
||||
|
updateTotal(); |
||||
|
}); |
||||
|
} |
||||
|
// 页面第一次加载完成后调用的函数 |
||||
|
F.ready(function () { |
||||
|
registerSelectionChangeEvents(); |
||||
|
updateTotal(); |
||||
|
}); |
||||
|
|
||||
|
</script> |
||||
|
</body> |
||||
|
</html> |
@ -0,0 +1,512 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
|
using System.Linq.Expressions; |
||||
|
using System.Web; |
||||
|
using System.Web.Security; |
||||
|
using System.Web.UI; |
||||
|
using System.Web.UI.WebControls; |
||||
|
using CK.SCP.Models.AppBoxEntity; |
||||
|
using CK.SCP.Models.ScpEntity; |
||||
|
using CK.SCP.Controller; |
||||
|
using FineUI; |
||||
|
using SCP.Code; |
||||
|
using System.Drawing; |
||||
|
using CK.SCP.Models.Enums; |
||||
|
|
||||
|
namespace SCP.SupplierData.SupplierFinance |
||||
|
{ |
||||
|
|
||||
|
public partial class ReceiveList : PageBase |
||||
|
{ |
||||
|
protected void Page_Load(object sender, EventArgs e) |
||||
|
{ |
||||
|
IsRoleRight(); |
||||
|
|
||||
|
if (!IsPostBack) |
||||
|
{ |
||||
|
TranslatorAgents(Toolbar2); |
||||
|
TranslatorAgent(Grid_V_TB_RECEIVE_LIST); |
||||
|
TranslatorAgents(FormRow_1); |
||||
|
TranslatorAgents(FormRow_2); |
||||
|
TranslatorAgents(FormRow_3); |
||||
|
LoadData(); |
||||
|
SetRoleRule(); |
||||
|
BindVender(DDL_VEND_LIST); |
||||
|
} |
||||
|
} |
||||
|
public void IsRoleRight() |
||||
|
{ |
||||
|
|
||||
|
//if (!CurrentUser.RoleList.Contains("供应商"))
|
||||
|
//{
|
||||
|
// Alert.Show("当前用户角色不能操作该模块!");
|
||||
|
// return;
|
||||
|
//}
|
||||
|
//else
|
||||
|
//{
|
||||
|
|
||||
|
//}
|
||||
|
//if (CurrentUser.VenderList == null || CurrentUser.VenderList.Count == 0)
|
||||
|
//{
|
||||
|
// Alert.Show("当前用户未选择地点!");
|
||||
|
// return;
|
||||
|
//}
|
||||
|
} |
||||
|
private void SetRoleRule() |
||||
|
{ |
||||
|
if (CurrentUser.RoleList.Contains("采购人员")) |
||||
|
{ |
||||
|
DDL_VEND_LIST.Hidden = false; |
||||
|
BTN_INV.Hidden = false; |
||||
|
if( CurrentUser.FactoryList!=null && CurrentUser.FactoryList.Count>0) |
||||
|
{ |
||||
|
var _site= CurrentUser.FactoryList.FirstOrDefault(); |
||||
|
if(_site=="CNS") |
||||
|
{ |
||||
|
txtContractPrice1.Enabled = false; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
public void LoadData() |
||||
|
{ |
||||
|
// 每页记录数
|
||||
|
//Grid_V_TB_RECEIVE_LIST.PageSize = ConfigHelper.PageSize;
|
||||
|
//ddlGridPageSize.SelectedValue = ConfigHelper.PageSize.ToString();
|
||||
|
//BindData();
|
||||
|
} |
||||
|
private void SearchData(Action<IQueryable<V_TB_RECEIVE_LIST>> p_action) |
||||
|
{ |
||||
|
V_TB_RECEIVE_LIST _ls = new V_TB_RECEIVE_LIST(); |
||||
|
_ls.PoBillNum = TXT_BillNo.Text; |
||||
|
_ls.VendName = TXT_VendName.Text; |
||||
|
|
||||
|
_ls.AsnBillNum = TXT_ASNBill.Text; |
||||
|
_ls.PartCode = TXT_PartCode.Text; |
||||
|
_ls.VendId = TXT_VendId.Text; |
||||
|
_ls.ProjectId = TXT_ProjectId.Text; |
||||
|
if (DP_StartDate.SelectedDate != null) |
||||
|
{ |
||||
|
_ls.BeginTime = DP_StartDate.SelectedDate; |
||||
|
} |
||||
|
if (Date_EndDate.SelectedDate != null) |
||||
|
{ |
||||
|
_ls.ShipTime = Date_EndDate.SelectedDate; |
||||
|
} |
||||
|
if (!string.IsNullOrEmpty(DDL_State.SelectedValue)) |
||||
|
{ |
||||
|
_ls.BillType_DESC = DDL_State.SelectedValue; |
||||
|
} |
||||
|
if (CurrentUser.FactoryList != null && CurrentUser.FactoryList.Count > 0) |
||||
|
{ |
||||
|
_ls.Site = CurrentUser.FactoryList[0]; |
||||
|
} |
||||
|
_ls.State = 1; |
||||
|
if (CurrentUser.RoleList.Contains("采购人员")) |
||||
|
{ |
||||
|
if (string.IsNullOrEmpty(DDL_VEND_LIST.SelectedValue)) |
||||
|
{ |
||||
|
Alert.Show("请在工具栏里选择要开票的供应商,并点击确认!"); |
||||
|
return; |
||||
|
} |
||||
|
var _venderId = DDL_VEND_LIST.SelectedValue; |
||||
|
_ls.VendId = DDL_VEND_LIST.SelectedValue; |
||||
|
if (!string.IsNullOrEmpty(_ls.Site) && !string.IsNullOrEmpty(_venderId)) |
||||
|
{ |
||||
|
var _vender = SCP_TB_VENDER_CONTROLLER.GetVender(_venderId, _ls.Site); |
||||
|
if (_vender.Tax != null) |
||||
|
{ |
||||
|
lbTaxRate.SelectedValue = _vender.Tax.ToString(); |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
lbTaxRate.SelectedValue = "0"; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
if (CurrentUser.VenderList != null && CurrentUser.VenderList.Count > 0) |
||||
|
{ |
||||
|
var _venderId = CurrentUser.VenderList.FirstOrDefault(); |
||||
|
_ls.VendId = _venderId; |
||||
|
if (!string.IsNullOrEmpty(_ls.Site) && !string.IsNullOrEmpty(_venderId)) |
||||
|
{ |
||||
|
var _vender = SCP_TB_VENDER_CONTROLLER.GetVender(_venderId, _ls.Site); |
||||
|
if (_vender.Tax != null) |
||||
|
{ |
||||
|
lbTaxRate.SelectedValue = _vender.Tax.ToString(); |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
lbTaxRate.SelectedValue = _vender.Tax.ToString(); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
if (string.IsNullOrEmpty(_ls.VendId)) |
||||
|
{ |
||||
|
return; |
||||
|
} |
||||
|
SCP_RECIVECE_CONTROLLER.Get_V_TB_RECEIVE_LIST_List(_ls, (ret) => |
||||
|
{ |
||||
|
if (ret.State == ReturnStatus.Succeed) |
||||
|
{ |
||||
|
p_action(ret.Result); |
||||
|
} |
||||
|
}); |
||||
|
} |
||||
|
public void BindData() |
||||
|
{ |
||||
|
SearchData(ret => |
||||
|
{ |
||||
|
if (CurrentUser.RoleList.Contains("采购人员")) |
||||
|
{ |
||||
|
Grid_V_TB_RECEIVE_LIST.RecordCount = ret.Count(); |
||||
|
ret = SortAndPage(ret, Grid_V_TB_RECEIVE_LIST,"DESC"); |
||||
|
|
||||
|
List<V_TB_RECEIVE_LIST> temp = ret.ToList(); |
||||
|
if (string.IsNullOrEmpty(DDL_VEND_LIST.SelectedValue)) |
||||
|
{ |
||||
|
Alert.Show("请在工具栏里选择要开票的供应商,并点击确认!"); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
Grid_V_TB_RECEIVE_LIST.DataSource = temp; |
||||
|
Grid_V_TB_RECEIVE_LIST.DataBind(); |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
|
||||
|
Grid_V_TB_RECEIVE_LIST.RecordCount = ret.Count(); |
||||
|
ret = SortAndPage(ret, Grid_V_TB_RECEIVE_LIST,"DESC"); |
||||
|
List<V_TB_RECEIVE_LIST> temp = ret.ToList(); |
||||
|
|
||||
|
Grid_V_TB_RECEIVE_LIST.DataSource = temp; |
||||
|
Grid_V_TB_RECEIVE_LIST.DataBind(); |
||||
|
} |
||||
|
}); |
||||
|
// 排列和数据库分页
|
||||
|
} |
||||
|
protected void Grid1_OnPageIndexChange(object sender, GridPageEventArgs e) |
||||
|
{ |
||||
|
Grid_V_TB_RECEIVE_LIST.PageIndex = e.NewPageIndex; |
||||
|
BindData(); |
||||
|
} |
||||
|
|
||||
|
protected void ddlGridPageSize_OnSelectedIndexChanged(object sender, EventArgs e) |
||||
|
{ |
||||
|
Grid_V_TB_RECEIVE_LIST.PageSize = Convert.ToInt32(ddlGridPageSize.SelectedValue); |
||||
|
BindData(); |
||||
|
} |
||||
|
//生成发票
|
||||
|
protected void btnCreate_OnClick(object sender, EventArgs e) |
||||
|
{ |
||||
|
CreateInvoice("0"); |
||||
|
} |
||||
|
private void CreateInvoice(string p_all) |
||||
|
{ |
||||
|
try |
||||
|
{ |
||||
|
|
||||
|
string vender = string.Empty; |
||||
|
if (CurrentUser.RoleList.Contains("采购人员")) |
||||
|
{ |
||||
|
if (string.IsNullOrEmpty(DDL_VEND_LIST.SelectedValue)) |
||||
|
{ |
||||
|
Alert.Show("请在工具栏里选择要开票的供应商,并点击确认!"); |
||||
|
return; |
||||
|
} |
||||
|
vender = DDL_VEND_LIST.SelectedValue; |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
vender = CurrentUser.VenderList[0]; |
||||
|
} |
||||
|
|
||||
|
TM_HYANTOLIN_REVIEW _entity = new TM_HYANTOLIN_REVIEW(); |
||||
|
_entity.UltimateName = vender; |
||||
|
_entity.State = 0; |
||||
|
var _state = 0; |
||||
|
SCP_QUALITY_CONTROLLER.Get_TM_HYANTOLIN_REVIEW_List(_entity, (rs) => |
||||
|
{ |
||||
|
if (rs.State == ReturnStatus.Succeed) |
||||
|
{ |
||||
|
var _ls = rs.Result.ToList(); |
||||
|
if (_ls != null && _ls.Count > 0) |
||||
|
{ |
||||
|
var _sum = _ls.Sum(p => p.ClaimAmount); |
||||
|
var _ary = _ls.Select(p => p.ReviewBillNum).ToList(); |
||||
|
_state = 1; |
||||
|
if (_sum == 0) |
||||
|
{ |
||||
|
_state = 0; |
||||
|
} |
||||
|
if (_sum > 0) |
||||
|
{ |
||||
|
Alert.Show(string.Format("索赔金额合计{0}供应商存在未处理索赔单{1}!", _sum.ToString(), string.Join(",", _ary.ToArray())), "索赔管理查看"); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
}); |
||||
|
if (_state == 1) |
||||
|
{ |
||||
|
return; |
||||
|
} |
||||
|
var _tax = lbTaxRate.SelectedValue; |
||||
|
var _cj = string.IsNullOrEmpty(txtContractPrice1.Text) ? "0" : txtContractPrice1.Text; |
||||
|
var _tz = string.IsNullOrEmpty(txtBlancePrice1.Text) ? "0" : txtBlancePrice1.Text; |
||||
|
|
||||
|
string IsCreate = "0"; |
||||
|
|
||||
|
if (Grid_V_TB_RECEIVE_LIST.SelectedRowIndexArray.Length == 0) |
||||
|
{ |
||||
|
Alert.Show("请选择要创建发票的记录!"); |
||||
|
return; |
||||
|
} |
||||
|
string IDS = ""; |
||||
|
List<string> _list = new List<string>(); |
||||
|
List<string> _projectList = new List<string>(); |
||||
|
List<string> _rejList = new List<string>(); |
||||
|
string _projectId = string.Empty; |
||||
|
List<string> _recList = new List<string>(); |
||||
|
List<int> IdList = new List<int>(); |
||||
|
decimal _total = 0; |
||||
|
|
||||
|
for (int i = 0; i < Grid_V_TB_RECEIVE_LIST.SelectedRowIndexArray.Length; i++) |
||||
|
{ |
||||
|
int rowIndex = Grid_V_TB_RECEIVE_LIST.SelectedRowIndexArray[i]; |
||||
|
int ID = Convert.ToInt32(Grid_V_TB_RECEIVE_LIST.DataKeys[rowIndex][0]); |
||||
|
|
||||
|
decimal _qty = decimal.Parse(Grid_V_TB_RECEIVE_LIST.DataKeys[rowIndex][5].ToString()); |
||||
|
|
||||
|
decimal _price = decimal.Parse(Grid_V_TB_RECEIVE_LIST.DataKeys[rowIndex][6].ToString()); |
||||
|
|
||||
|
_total += (_qty * _price); |
||||
|
IDS += ID + ","; |
||||
|
_projectId = Grid_V_TB_RECEIVE_LIST.DataKeys[rowIndex][1].ToString(); |
||||
|
_projectList.Add(_projectId); |
||||
|
var _recbill = Grid_V_TB_RECEIVE_LIST.DataKeys[rowIndex][2].ToString(); |
||||
|
if (!string.IsNullOrEmpty(_recbill) && _recbill.IndexOf("R.") > 0) |
||||
|
{ |
||||
|
_rejList.Add(_projectId); |
||||
|
} |
||||
|
IdList.Add(ID); |
||||
|
|
||||
|
|
||||
|
} |
||||
|
if (_total < 0) |
||||
|
{ |
||||
|
Alert.Show("不允许开负数发票!退货、索赔零件数量有问题,请联系工厂库房和质量解决!"); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
if (IdList.Count > 200) |
||||
|
{ |
||||
|
Alert.Show("选择零件记录超过,发票允许条数!"); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
if (_list.Distinct().Count() > 1) |
||||
|
{ |
||||
|
Alert.Show("请选择的记录不是同一个供应商,请选择供应商!"); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
if (IDS != "") IDS = IDS.Substring(0, IDS.Length - 1); |
||||
|
|
||||
|
if (CurrentUser.FactoryList.FirstOrDefault() != "BJCIAI") |
||||
|
{ |
||||
|
var _ls = GetIsAllChecked(vender, IDS); |
||||
|
if (_ls.Count > 0) |
||||
|
{ |
||||
|
Alert.Show(string.Format("退货或索赔单{0}未开票!", string.Join(",", _ls.ToArray()))); |
||||
|
return; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
|
||||
|
InvoiceCreateQueryParm parm = new InvoiceCreateQueryParm(); |
||||
|
parm.ReceiveID = IDS; |
||||
|
parm.VendId = vender; |
||||
|
parm.Modify = IsCreate; |
||||
|
parm.IsAll = p_all; |
||||
|
parm.Tax = _tax; |
||||
|
parm.CJ = _cj; |
||||
|
parm.TZ = _tz; |
||||
|
|
||||
|
Session["InvoiceCreateQueryParm"] = parm; |
||||
|
string ret = Window1.GetShowReference("../../Views/SupplierData/SCP_INVOICE_CREATE.aspx", "生成发票"); |
||||
|
PageContext.RegisterStartupScript(ret); |
||||
|
} |
||||
|
catch (Exception ex) |
||||
|
{ |
||||
|
Alert.Show(ex.Message); |
||||
|
} |
||||
|
} |
||||
|
private List<string> GetIsAllChecked(string p_VendId,string p_VendIds) |
||||
|
{ |
||||
|
|
||||
|
List<string> unSelected = new List<string>(); |
||||
|
|
||||
|
var _ls = SCPDB.V_TB_RECEIVE_LIST.Where(p => p.VendId == p_VendId && p.State == 1 && (p.BillType_DESC == "索赔单" || p.BillType_DESC == "退货单")).Select(p => new { p.UID, p.RecvBillNum }).ToList(); |
||||
|
|
||||
|
//SCP_RECIVECE_CONTROLLER.Get_V_TB_RECEIVE_LIST_List(_ent, (ret) =>
|
||||
|
//{
|
||||
|
// if (ret.State == ReturnStatus.Succeed)
|
||||
|
// {
|
||||
|
var _lsCompare = p_VendIds.Split(new char[] { ',' }); |
||||
|
// var _ls = ret.Result.Select(p => new { p.UID, p.RecvBillNum }).ToList();
|
||||
|
foreach (var itm in _ls) |
||||
|
{ |
||||
|
if (!_lsCompare.Contains(itm.UID.ToString())) |
||||
|
{ |
||||
|
unSelected.Add(itm.RecvBillNum); |
||||
|
} |
||||
|
} |
||||
|
// }
|
||||
|
//});
|
||||
|
return unSelected.Distinct().ToList(); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
protected void Grid_V_TB_RECEIVE_LIST_PageIndexChange(object sender, GridPageEventArgs e) |
||||
|
{ |
||||
|
BindData(); |
||||
|
} |
||||
|
|
||||
|
//导出
|
||||
|
protected void btnOutput_OnClick(object sender, EventArgs e) |
||||
|
{ |
||||
|
V_TB_RECEIVE_LIST _ls = new V_TB_RECEIVE_LIST(); |
||||
|
_ls.PoBillNum = TXT_BillNo.Text; |
||||
|
_ls.VendName = TXT_VendName.Text; |
||||
|
_ls.UserInVendIds = CurrentUser.VenderList; |
||||
|
_ls.AsnBillNum = TXT_ASNBill.Text; |
||||
|
_ls.PartCode = TXT_PartCode.Text; |
||||
|
_ls.VendId = TXT_VendId.Text; |
||||
|
_ls.ProjectId = TXT_ProjectId.Text; |
||||
|
_ls.RecvBillNum = TXT_RECEIVE.Text; |
||||
|
if (DP_StartDate.SelectedDate != null) |
||||
|
{ |
||||
|
_ls.BeginTime = DP_StartDate.SelectedDate; |
||||
|
} |
||||
|
if (Date_EndDate.SelectedDate != null) |
||||
|
{ |
||||
|
_ls.ShipTime = Date_EndDate.SelectedDate; |
||||
|
} |
||||
|
if (!string.IsNullOrEmpty(DDL_State.SelectedValue)) |
||||
|
{ |
||||
|
_ls.BillType_DESC = DDL_State.SelectedValue; |
||||
|
} |
||||
|
if (CurrentUser.FactoryList != null && CurrentUser.FactoryList.Count > 0) |
||||
|
{ |
||||
|
_ls.Site = CurrentUser.FactoryList[0]; |
||||
|
} |
||||
|
_ls.State = 1; |
||||
|
if (CurrentUser.VenderList != null && CurrentUser.VenderList.Count > 0) |
||||
|
{ |
||||
|
var _venderId = CurrentUser.VenderList.FirstOrDefault(); |
||||
|
if (!string.IsNullOrEmpty(_ls.Site) && !string.IsNullOrEmpty(_venderId)) |
||||
|
{ |
||||
|
var _vender = SCP_TB_VENDER_CONTROLLER.GetVender(_venderId, _ls.Site); |
||||
|
if (_vender.Tax != null) |
||||
|
{ |
||||
|
lbTaxRate.SelectedValue = _vender.Tax.ToString(); |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
lbTaxRate.Text = "0"; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
SCP_RECIVECE_CONTROLLER.Get_V_TB_RECEIVE_LIST_List(_ls, (ret) => |
||||
|
{ |
||||
|
if (ret.State == ReturnStatus.Succeed) |
||||
|
{ |
||||
|
var _lst = ret.Result.ToList(); |
||||
|
|
||||
|
Dictionary<string, string> cellheader = new Dictionary<string, string> |
||||
|
{ |
||||
|
{ "ProjectId", "项目编号" }, |
||||
|
{ "BillType_DESC", "单据类型" }, |
||||
|
{ "RecvBillNum", "单据编号" }, |
||||
|
{ "AsnBillNum", "发货单号" }, |
||||
|
{ "VendName", "供应商" }, |
||||
|
{ "VendId", "供应商编码" }, |
||||
|
{ "PoBillNum", "订单号" }, |
||||
|
{ "PoLine", "订单行" }, |
||||
|
{ "PartCode", "零件号" }, |
||||
|
{ "PartDesc1", "零件名称" }, |
||||
|
{ "LocUnit", "单位" }, |
||||
|
{ "Currency", "币种" }, |
||||
|
{ "CanQty", "可开票数量" }, |
||||
|
{ "Price", "单价" }, |
||||
|
{ "CreateTime", "创建时间" } |
||||
|
}; |
||||
|
string url = EntityListToExcel2003(cellheader,_lst , "审核明细"); |
||||
|
} |
||||
|
}); |
||||
|
} |
||||
|
//快速查找
|
||||
|
protected void btnSearch_Click(object sender, EventArgs e) |
||||
|
{ |
||||
|
|
||||
|
} |
||||
|
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) |
||||
|
{ |
||||
|
BindData(); |
||||
|
} |
||||
|
|
||||
|
protected void Grid_V_TB_RECEIVE_LIST_RowDataBound(object sender, GridRowEventArgs e) |
||||
|
{ |
||||
|
System.Web.UI.WebControls.Label _label= (System.Web.UI.WebControls.Label)Grid_V_TB_RECEIVE_LIST.Rows[e.RowIndex].FindControl("Qty1"); |
||||
|
if (!string.IsNullOrEmpty(_label.Text)) |
||||
|
{ |
||||
|
if (decimal.Parse(_label.Text) < 0) |
||||
|
{ |
||||
|
_label.ForeColor = Color.Red; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
protected void btnCanIn_Click(object sender, EventArgs e) |
||||
|
{ |
||||
|
|
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
protected void BTN_INV_Click(object sender, EventArgs e) |
||||
|
{ |
||||
|
BindData(); |
||||
|
} |
||||
|
|
||||
|
protected void Window1_Close(object sender, WindowCloseEventArgs e) |
||||
|
{ |
||||
|
Session["InvoiceCreateQueryParm"] = null; |
||||
|
BindData(); |
||||
|
} |
||||
|
|
||||
|
protected void btnCreateAll_Click(object sender, EventArgs e) |
||||
|
{ |
||||
|
CreateInvoice("1"); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
} |
||||
|
} |
@ -0,0 +1,395 @@ |
|||||
|
//------------------------------------------------------------------------------
|
||||
|
// <自动生成>
|
||||
|
// 此代码由工具生成。
|
||||
|
//
|
||||
|
// 对此文件的更改可能导致不正确的行为,如果
|
||||
|
// 重新生成代码,则所做更改将丢失。
|
||||
|
// </自动生成>
|
||||
|
//------------------------------------------------------------------------------
|
||||
|
|
||||
|
namespace SCP.SupplierData.SupplierFinance |
||||
|
{ |
||||
|
|
||||
|
|
||||
|
public partial class ReceiveList |
||||
|
{ |
||||
|
|
||||
|
/// <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>
|
||||
|
/// Button1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Button Button1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// btnCreate 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Button btnCreate; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// btnCreateAll 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Button btnCreateAll; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// btn 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Button btn; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Button2 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Button Button2; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// btnCanIn 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Button btnCanIn; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// btnShow 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Button btnShow; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// tb_RecvBillNum 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox tb_RecvBillNum; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// btn_Search 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Button btn_Search; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// DDL_VEND_LIST 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.DropDownList DDL_VEND_LIST; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// BTN_INV 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Button BTN_INV; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// gp1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.GroupPanel gp1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// FormRow_1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.FormRow FormRow_1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TXT_BillNo 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox TXT_BillNo; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TXT_ASNBill 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox TXT_ASNBill; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TXT_VendName 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox TXT_VendName; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TXT_VendId 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox TXT_VendId; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// DDL_State 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.DropDownList DDL_State; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// FormRow_2 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.FormRow FormRow_2; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TXT_ProjectId 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox TXT_ProjectId; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TXT_PartCode 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox TXT_PartCode; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// DP_StartDate 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.DatePicker DP_StartDate; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Date_EndDate 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.DatePicker Date_EndDate; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// FormRow_3 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.FormRow FormRow_3; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TXT_RECEIVE 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox TXT_RECEIVE; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// BtnClose 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Button BtnClose; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// BtnSearch 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Button BtnSearch; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// FormRow1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.FormRow FormRow1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// txtContractPrice1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.NumberBox txtContractPrice1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// txtBlancePrice1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.NumberBox txtBlancePrice1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// FormRow2 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.FormRow FormRow2; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// lbTaxRate 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.DropDownList lbTaxRate; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// btnTax 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Button btnTax; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Grid_V_TB_RECEIVE_LIST 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Grid Grid_V_TB_RECEIVE_LIST; |
||||
|
|
||||
|
/// <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>
|
||||
|
/// Qty1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::System.Web.UI.WebControls.Label Qty1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Window1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Window Window1; |
||||
|
} |
||||
|
} |
@ -0,0 +1,154 @@ |
|||||
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SCP_ASK.aspx.cs" Inherits="SCP.Views.SupplierData.SupplierLogistics.SCP_ASK" %> |
||||
|
|
||||
|
<!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="Find" OnClick="btnDetail_Click"> |
||||
|
</f:Button> |
||||
|
<f:Button ID="btnAsn" runat="server" Text="生成发货单" Icon="Add" OnClick="btnAsn_Click"> |
||||
|
</f:Button> |
||||
|
<f:Button ID="btn" runat="server" Text="生成发货单(默认全发)" Icon="Add" OnClick="btn_Click" OnClientClick="if(!confirm('是否要将剩余零件,全部生成到发货单,请确认标包数量是否准确,发货数量必须与物料实际数量一致?'))return false;" > |
||||
|
</f:Button> |
||||
|
<f:Button ID="btnShow" runat="server" Text="查询面板" Icon="Zoom" OnClick="btnShow_Click"> |
||||
|
</f:Button> |
||||
|
<f:Button ID="Button6" runat="server" Text="全部" Icon="Reload" OnClick="Button6_Click" > |
||||
|
</f:Button> |
||||
|
<%-- <f:Button ID="Button1" runat="server" Text="新建" Icon="Reload" OnClick="Button1_Click" > |
||||
|
</f:Button>--%> |
||||
|
<f:Button ID="Button2" runat="server" Text="发布" Icon="Reload" OnClick="Button2_Click" > |
||||
|
</f:Button> |
||||
|
<f:Button ID="Button4" runat="server" Text="已确认" Icon="Reload" OnClick="Button4_Click" > |
||||
|
</f:Button> |
||||
|
<f:Button ID="Button5" runat="server" Text="已发货" Icon="Reload" OnClick="Button5_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" ID="FormRow_1"> |
||||
|
<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_Extend1" Hidden="true" /> |
||||
|
<f:TextBox runat = "server" Label = "子网站" EmptyText = "" ID = "TXT_Extend2" Hidden="true" /> |
||||
|
<f:TextBox runat = "server" Label = "子网站" EmptyText = "" ID = "TXT_Extend3" Hidden="true" /> |
||||
|
<f:TextBox runat = "server" Label = "看板编号" EmptyText = "" ID = "TXT_AskBillNo" /> |
||||
|
<f:TextBox runat = "server" Label = "供应商编码" EmptyText = "" ID = "TXT_VendId" /> |
||||
|
<f:TextBox runat = "server" Label = "送货地点" EmptyText = "" ID = "TXT_Site_Desc" /> |
||||
|
</Items> |
||||
|
</f:FormRow> |
||||
|
|
||||
|
<f:FormRow runat="server" ID="FormRow_2"> |
||||
|
<Items> |
||||
|
<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:ListItem Text="已确认" Value="2" /> |
||||
|
<f:ListItem Text="已发货" Value="3" /> |
||||
|
<f:ListItem Text="已收货" Value="4" /> |
||||
|
|
||||
|
</f:DropDownList> |
||||
|
<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="至" ID="Date_EndDate" /> |
||||
|
</Items> |
||||
|
</f:FormRow> |
||||
|
<f:FormRow runat="server" ID="FormRow_3"> |
||||
|
<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_ASK" PageSize="50" EnableCollapse = "true" ShowBorder = "true" ShowHeader = "true" runat ="server" EnableCheckBoxSelect="true" |
||||
|
DataKeyNames = "UID,PoBillNum,AskBillNum,VendId,Site,Buyer,BuyerPhone,State,Remark,VendName,State_DESC,ModType_DESC,CreateTime,CreateUser,UpdateTime,UpdateUser,UpdateInfo,IsDeleted,GUID" |
||||
|
CssClass="maingrid" EnableRowDoubleClickEvent="True" OnSort="Grid_V_TB_ASK_Sort" SortField="CreateTime" |
||||
|
IsDatabasePaging="True" AllowPaging="True" OnRowDoubleClick="Grid_V_TB_ASK_RowDoubleClick" |
||||
|
AutoScroll="True" SortDirection="DESC" OnPageIndexChange="Grid_V_TB_ASK_PageIndexChange" OnRowDataBound="Grid_V_TB_ASK_RowDataBound" 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:DropDownList> |
||||
|
</PageItems> |
||||
|
<Columns> |
||||
|
|
||||
|
<f:TemplateField HeaderText="状态" Width="70px" ColumnID="State_DESC1"> |
||||
|
<ItemTemplate> |
||||
|
<asp:label ID="State_DESC" runat="server" Width="65px" Text='<%# Eval("State_DESC") %>' ></asp:label> |
||||
|
</ItemTemplate> |
||||
|
</f:TemplateField> |
||||
|
|
||||
|
|
||||
|
|
||||
|
<f:BoundField Width = "80px" DataField = "ModType_DESC" DataFormatString = "{0}" HeaderText = "单据类型" /> |
||||
|
<f:BoundField Width = "100px" DataField = "AskBillNum" DataFormatString = "{0}" HeaderText = "要货看板号" /> |
||||
|
<f:BoundField Width = "100px" DataField = "PoBillNum" DataFormatString = "{0}" HeaderText = "订单编号" /> |
||||
|
<f:BoundField Width = "100px" DataField = "ErpBillNum" DataFormatString = "{0}" HeaderText ="ERP订单号" /> |
||||
|
<f:BoundField Width = "100px" DataField = "VendName" 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 = "EndTime" 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:HiddenField ID="highlightRows" runat="server"> |
||||
|
</f:HiddenField> |
||||
|
<f:Window runat="server" ID="Window1" Hidden="True" AutoScroll="True" Width="1024px" Height="600px" CloseAction="HidePostBack" |
||||
|
WindowPosition="Center" IsModal="true" Title="明细详情" Target="Parent" EnableIFrame="true" OnClose="Window1_Close" |
||||
|
IFrameUrl="about:blank" /> |
||||
|
<f:Window ID="WindowUpload" runat="server" Hidden="True" OnClose="WindowUpload_Close" |
||||
|
WindowPosition="Center" IsModal="true" Title="Popup Window 1" Target="Parent" EnableIFrame="true" |
||||
|
IFrameUrl="about:blank" Height="200px" Width="400px"> |
||||
|
</f:Window> |
||||
|
</form> |
||||
|
|
||||
|
|
||||
|
|
||||
|
</body> |
||||
|
</html> |
@ -0,0 +1,351 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.ComponentModel; |
||||
|
using System.Data; |
||||
|
using System.Linq; |
||||
|
using System.Linq.Expressions; |
||||
|
using System.Web; |
||||
|
using System.Web.UI; |
||||
|
using System.Web.UI.WebControls; |
||||
|
using CK.SCP.Models; |
||||
|
using CK.SCP.Models.AppBoxEntity; |
||||
|
using CK.SCP.Models.Enums; |
||||
|
using CK.SCP.Models.ScpEntity; |
||||
|
using CK.SCP.Utils; |
||||
|
using CK.SCP.Common; |
||||
|
using CK.SCP.Controller; |
||||
|
using EntityFramework.Audit; |
||||
|
using FineUI; |
||||
|
using Microsoft.Diagnostics.Instrumentation.Extensions.Intercept; |
||||
|
using SCP.Code; |
||||
|
using EntitiesHelper = CK.SCP.Controller.EntitiesHelper; |
||||
|
using System.IO; |
||||
|
using CK.SCP.Models.ScpEntity.ExcelImportEntity; |
||||
|
using System.Drawing; |
||||
|
|
||||
|
namespace SCP.Views.SupplierData.SupplierLogistics |
||||
|
{ |
||||
|
public partial class SCP_ASK : PageBase |
||||
|
{ |
||||
|
protected void Page_Load(object sender, EventArgs e) |
||||
|
{ |
||||
|
if (!IsPostBack) |
||||
|
{ |
||||
|
BindAsk(); |
||||
|
CheckRolesMenu(); |
||||
|
TranslatorAgents(FormRow_1); |
||||
|
TranslatorAgents(FormRow_2); |
||||
|
TranslatorAgents(FormRow_3); |
||||
|
TranslatorAgent(Grid_V_TB_ASK); |
||||
|
TranslatorAgents(Toolbar2); |
||||
|
} |
||||
|
} |
||||
|
//public void LoadData()
|
||||
|
//{
|
||||
|
// BindAsk();
|
||||
|
//}
|
||||
|
public void BindAsk() |
||||
|
{ |
||||
|
SearchV_TB_ASKData((result) => { |
||||
|
Grid_V_TB_ASK.RecordCount = result.Count(); |
||||
|
var list = SortAndPage<V_TB_ASK>(result, Grid_V_TB_ASK); |
||||
|
var ls=SCP_ASK_CONTROLLER.GET_IS_COMPLETED_SEND(list.ToList()); |
||||
|
|
||||
|
Grid_V_TB_ASK.DataSource = ls; |
||||
|
Grid_V_TB_ASK.DataBind(); |
||||
|
|
||||
|
}); |
||||
|
|
||||
|
} |
||||
|
private void CheckRolesMenu() |
||||
|
{ |
||||
|
if (CurrentUser.RoleList.Contains("采购人员")) |
||||
|
{ |
||||
|
btnOutput.Hidden = false; |
||||
|
btnDetail.Hidden = false; |
||||
|
this.BtnSearch.Hidden = false; |
||||
|
//this.btnEdit.Hidden = true;
|
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
foreach (var itm in Grid_V_TB_ASK.Columns) |
||||
|
{ |
||||
|
if (itm.HeaderText == "要货数量") |
||||
|
{ |
||||
|
itm.Enabled = false; |
||||
|
} |
||||
|
} |
||||
|
btnOutput.Hidden = false; |
||||
|
btnDetail.Hidden = true; |
||||
|
this.BtnSearch.Hidden = true; |
||||
|
this.btnShow.Hidden = true; |
||||
|
} |
||||
|
} |
||||
|
public void SearchV_TB_ASKData(Action<IQueryable<V_TB_ASK>> p_action) |
||||
|
{ |
||||
|
var ls = SCPDB.TB_FACTORY.Where(p => p.ErpDomain == CurrentUser.UsedDomain).ToList(); |
||||
|
DropDownList1.DataSource = ls; |
||||
|
DropDownList1.DataBind(); |
||||
|
V_TB_ASK _entity = new V_TB_ASK(); |
||||
|
_entity.IsDeleted = false; |
||||
|
_entity.PoBillNum = TXT_BillNo.Text; |
||||
|
_entity.VendId = TXT_VendId.Text; |
||||
|
_entity.State_DESC = TXT_Site_Desc.Text; |
||||
|
_entity.AskBillNum = TXT_AskBillNo.Text; |
||||
|
_entity.ErpBillNum = TXT_ProjectId.Text; |
||||
|
_entity.SubSite = DropDownList1.SelectedValue; |
||||
|
_entity.Extend1 = TXT_Extend1.Text; |
||||
|
_entity.Extend2 = TXT_Extend2.Text; |
||||
|
_entity.Extend3 = TXT_Extend3.Text; |
||||
|
if (DP_StartDate.SelectedDate != null) |
||||
|
{ |
||||
|
_entity.BeginTime = DP_StartDate.SelectedDate; |
||||
|
} |
||||
|
if (DP_StartDate.SelectedDate != null) |
||||
|
{ |
||||
|
_entity.EndTime = DP_StartDate.SelectedDate; |
||||
|
} |
||||
|
if (!string.IsNullOrEmpty(DDL_State.SelectedValue)) |
||||
|
{ |
||||
|
_entity.BillStateList = new List<int>() { int.Parse(DDL_State.SelectedValue) }; |
||||
|
} |
||||
|
_entity.UserInAddress = CurrentUser.FactoryList; |
||||
|
|
||||
|
if (CurrentUser.RoleList.Contains("供应商")) |
||||
|
{ |
||||
|
if (CurrentUser.VenderList == null && CurrentUser.VenderList.Count == 0) |
||||
|
{ |
||||
|
CurrentUser.VenderList = new List<string>() { "00000000000" }; |
||||
|
} |
||||
|
_entity.UserInVendIds = CurrentUser.VenderList; |
||||
|
} |
||||
|
//if (CurrentUser.RoleList.Contains("供应商"))
|
||||
|
//{
|
||||
|
// _entity.BillStateList = new List<int> { (int)AskState.Confirm, (int)AskState.Release, (int)AskState.Ship, (int)AskState.Receive };
|
||||
|
//}
|
||||
|
|
||||
|
SCP_ASK_CONTROLLER.Get_V_TB_ASK_List(_entity, (_ret) => { |
||||
|
if (_ret.State == ReturnStatus.Succeed) |
||||
|
{ |
||||
|
p_action(_ret.Result); |
||||
|
} |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
protected void Grid_V_TB_ASK_RowDoubleClick(object sender, FineUI.GridRowClickEventArgs e) |
||||
|
{ |
||||
|
object[] rowDataKeys = Grid_V_TB_ASK.DataKeys[e.RowIndex]; |
||||
|
string AskBillNum = rowDataKeys[2] as string; |
||||
|
PageContext.RegisterStartupScript(Window1.GetShowReference(string.Format("../SupplierData/SCP_ASK_DETAIL.aspx?AskBillNum={0}", AskBillNum))); |
||||
|
} |
||||
|
|
||||
|
protected void Grid_V_TB_ASK_Sort(object sender, GridSortEventArgs e) |
||||
|
{ |
||||
|
|
||||
|
} |
||||
|
|
||||
|
|
||||
|
protected void Grid_V_TB_ASK_PageIndexChange(object sender, GridPageEventArgs e) |
||||
|
{ |
||||
|
BindAsk(); |
||||
|
} |
||||
|
|
||||
|
protected void btnOutput_Click(object sender, EventArgs e) |
||||
|
{ |
||||
|
if (Grid_V_TB_ASK.SelectedRowIndexArray.Count() == 0) |
||||
|
{ |
||||
|
PageContext.RegisterStartupScript(Alert.GetShowInTopReference("没有选择数据!")); |
||||
|
return; |
||||
|
} |
||||
|
List<string> _ls = new List<string>(); |
||||
|
for (int i = 0, count = Grid_V_TB_ASK.Rows.Count; i < count; i++) |
||||
|
{ |
||||
|
if (Grid_V_TB_ASK.SelectedRowIndexArray.Contains(i)) |
||||
|
{ |
||||
|
object[] rowDataKeys = Grid_V_TB_ASK.DataKeys[i]; |
||||
|
_ls.Add(rowDataKeys[2] as string); |
||||
|
} |
||||
|
} |
||||
|
DataSet ds = SCP_EXCEL_CONTROLLER.GET_ASK_EXECEL(_ls); |
||||
|
PageBase.DataSetToExcel(ds, "要货看板"); |
||||
|
} |
||||
|
|
||||
|
protected void btnDetail_Click(object sender, EventArgs e) |
||||
|
{ |
||||
|
if (Grid_V_TB_ASK.SelectedRowIndexArray.Count() == 0) |
||||
|
{ |
||||
|
PageContext.RegisterStartupScript(Alert.GetShowInTopReference("没有选择数据!")); |
||||
|
return; |
||||
|
} |
||||
|
object[] rowDataKeys = Grid_V_TB_ASK.DataKeys[Grid_V_TB_ASK.SelectedRowIndex]; |
||||
|
|
||||
|
string AskBillNum = rowDataKeys[2] as string; |
||||
|
|
||||
|
PageContext.RegisterStartupScript(Window1.GetShowReference(string.Format("../SupplierData/SCP_ASK_DETAIL.aspx?AskBillNum={0}", AskBillNum))); |
||||
|
} |
||||
|
|
||||
|
protected void BtnPublish_Click(object sender, EventArgs e) |
||||
|
{ |
||||
|
int[] _selections = Grid_V_TB_ASK.SelectedRowIndexArray; |
||||
|
List<string> _AskList = new List<string>(); |
||||
|
for (int i = 0, count = Grid_V_TB_ASK.Rows.Count; i < count; i++) |
||||
|
{ |
||||
|
if (_selections.Contains(i)) |
||||
|
{ |
||||
|
object[] rowDataKeys = Grid_V_TB_ASK.DataKeys[i]; |
||||
|
if (!string.IsNullOrEmpty(rowDataKeys[2].ToString())) |
||||
|
{ |
||||
|
_AskList.Add(rowDataKeys[2].ToString()); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
var ret = SCP_ASK_CONTROLLER.Save_TB_ASK_STATE(_AskList, AskState.Release); |
||||
|
if (ret.State == ReturnStatus.Succeed) |
||||
|
{ |
||||
|
BindAsk(); |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
Alert.Show(ret.Message); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
protected void BtnCanclePublish_Click(object sender, EventArgs e) |
||||
|
{ |
||||
|
int[] _selections = Grid_V_TB_ASK.SelectedRowIndexArray; |
||||
|
List<string> _AskList = new List<string>(); |
||||
|
for (int i = 0, count = Grid_V_TB_ASK.Rows.Count; i < count; i++) |
||||
|
{ |
||||
|
if (_selections.Contains(i)) |
||||
|
{ |
||||
|
object[] rowDataKeys = Grid_V_TB_ASK.DataKeys[i]; |
||||
|
if (!string.IsNullOrEmpty(rowDataKeys[2].ToString())) |
||||
|
{ |
||||
|
_AskList.Add(rowDataKeys[2].ToString()); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
var ret = SCP_ASK_CONTROLLER.Save_TB_ASK_STATE(_AskList, AskState.Confirm); |
||||
|
if (ret.State == ReturnStatus.Succeed) |
||||
|
{ |
||||
|
BindAsk(); |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
Alert.Show(ret.Message); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
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) |
||||
|
{ |
||||
|
BindAsk(); |
||||
|
} |
||||
|
protected void btnAsn_Click(object sender, EventArgs e) |
||||
|
{ |
||||
|
|
||||
|
if (Grid_V_TB_ASK.SelectedRowIndexArray.Count() == 0) |
||||
|
{ |
||||
|
PageContext.RegisterStartupScript(Alert.GetShowInTopReference("没有选择数据!")); |
||||
|
return; |
||||
|
} |
||||
|
object[] rowDataKeys = Grid_V_TB_ASK.DataKeys[Grid_V_TB_ASK.SelectedRowIndex]; |
||||
|
if (rowDataKeys.Count() > 0) |
||||
|
{ |
||||
|
if (ConvertHelper.To<Int32>(rowDataKeys[7]) == (int)AskState.New || ConvertHelper.To<Int32>(rowDataKeys[7]) == (int)AskState.Release) |
||||
|
{ |
||||
|
PageContext.RegisterStartupScript(Alert.GetShowInTopReference("选择记录不是供应商确认单据")); |
||||
|
return; |
||||
|
} |
||||
|
string AskBillNum = rowDataKeys[2] as string; |
||||
|
|
||||
|
|
||||
|
PageContext.RegisterStartupScript(Window1.GetShowReference(string.Format("../SupplierData/SCP_ASN_CREATE.aspx?AskBillNum={0}", AskBillNum))); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
protected void ddlGridPageSize_SelectedIndexChanged(object sender, EventArgs e) |
||||
|
{ |
||||
|
Grid_V_TB_ASK.PageSize = Convert.ToInt32(ddlGridPageSize.SelectedValue); |
||||
|
BindAsk(); |
||||
|
} |
||||
|
|
||||
|
protected void Window1_Close(object sender, WindowCloseEventArgs e) |
||||
|
{ |
||||
|
if (Session["Ask"] != null) |
||||
|
{ |
||||
|
Session["Ask"] = null; |
||||
|
} |
||||
|
BindAsk(); |
||||
|
} |
||||
|
|
||||
|
protected void Grid_V_TB_ASK_RowDataBound(object sender, GridRowEventArgs e) |
||||
|
{ |
||||
|
var itm = e.DataItem as V_TB_ASK; |
||||
|
if (itm.IsComplete==false) |
||||
|
{ |
||||
|
System.Web.UI.WebControls.Label _label = (System.Web.UI.WebControls.Label)Grid_V_TB_ASK.Rows[e.RowIndex].FindControl("State_DESC"); |
||||
|
// _label.Text = "发货未完";
|
||||
|
_label.ForeColor = Color.Red; |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
||||
|
protected void btn_Click(object sender, EventArgs e) |
||||
|
{ |
||||
|
if (Grid_V_TB_ASK.SelectedRowIndexArray.Count() == 0) |
||||
|
{ |
||||
|
PageContext.RegisterStartupScript(Alert.GetShowInTopReference("没有选择数据!")); |
||||
|
return; |
||||
|
} |
||||
|
object[] rowDataKeys = Grid_V_TB_ASK.DataKeys[Grid_V_TB_ASK.SelectedRowIndex]; |
||||
|
if (rowDataKeys.Count() > 0) |
||||
|
{ |
||||
|
if (ConvertHelper.To<Int32>(rowDataKeys[7]) == (int)AskState.New || ConvertHelper.To<Int32>(rowDataKeys[7]) == (int)AskState.Release) |
||||
|
{ |
||||
|
PageContext.RegisterStartupScript(Alert.GetShowInTopReference("选择记录不是供应商确认单据")); |
||||
|
return; |
||||
|
} |
||||
|
string AskBillNum = rowDataKeys[2] as string; |
||||
|
PageContext.RegisterStartupScript(Window1.GetShowReference(string.Format("../SupplierData/SCP_ASN_CREATE.aspx?AskBillNum={0}&State=1", AskBillNum))); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
protected void Button1_Click(object sender, EventArgs e) |
||||
|
{ |
||||
|
DDL_State.SelectedValue = "0"; |
||||
|
BindAsk(); |
||||
|
} |
||||
|
|
||||
|
protected void Button2_Click(object sender, EventArgs e) |
||||
|
{ |
||||
|
DDL_State.SelectedValue = "1"; |
||||
|
BindAsk(); |
||||
|
} |
||||
|
|
||||
|
protected void Button4_Click(object sender, EventArgs e) |
||||
|
{ |
||||
|
DDL_State.SelectedValue = "2"; |
||||
|
BindAsk(); |
||||
|
} |
||||
|
|
||||
|
protected void Button6_Click(object sender, EventArgs e) |
||||
|
{ |
||||
|
DDL_State.SelectedValue = string.Empty; |
||||
|
BindAsk(); |
||||
|
} |
||||
|
|
||||
|
protected void Button5_Click(object sender, EventArgs e) |
||||
|
{ |
||||
|
DDL_State.SelectedValue = "3"; |
||||
|
BindAsk(); |
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,368 @@ |
|||||
|
//------------------------------------------------------------------------------
|
||||
|
// <自动生成>
|
||||
|
// 此代码由工具生成。
|
||||
|
//
|
||||
|
// 对此文件的更改可能导致不正确的行为,如果
|
||||
|
// 重新生成代码,则所做更改将丢失。
|
||||
|
// </自动生成>
|
||||
|
//------------------------------------------------------------------------------
|
||||
|
|
||||
|
namespace SCP.Views.SupplierData.SupplierLogistics |
||||
|
{ |
||||
|
|
||||
|
|
||||
|
public partial class SCP_ASK |
||||
|
{ |
||||
|
|
||||
|
/// <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>
|
||||
|
/// btnAsn 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Button btnAsn; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// btn 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Button btn; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// btnShow 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Button btnShow; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Button6 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Button Button6; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Button2 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Button Button2; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Button4 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Button Button4; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Button5 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Button Button5; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// gp1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.GroupPanel gp1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// FormRow_1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.FormRow FormRow_1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TXT_BillNo 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox TXT_BillNo; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// DropDownList1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.DropDownList DropDownList1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TXT_Extend1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox TXT_Extend1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TXT_Extend2 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox TXT_Extend2; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TXT_Extend3 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox TXT_Extend3; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TXT_AskBillNo 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox TXT_AskBillNo; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TXT_VendId 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox TXT_VendId; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TXT_Site_Desc 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox TXT_Site_Desc; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// FormRow_2 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.FormRow FormRow_2; |
||||
|
|
||||
|
/// <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>
|
||||
|
/// Date_EndDate 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.DatePicker Date_EndDate; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// FormRow_3 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.FormRow FormRow_3; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// BtnClose 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Button BtnClose; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// BtnSearch 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Button BtnSearch; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Grid_V_TB_ASK 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Grid Grid_V_TB_ASK; |
||||
|
|
||||
|
/// <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>
|
||||
|
/// State_DESC 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::System.Web.UI.WebControls.Label State_DESC; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// highlightRows 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.HiddenField highlightRows; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Window1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Window Window1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// WindowUpload 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Window WindowUpload; |
||||
|
} |
||||
|
} |
@ -0,0 +1,119 @@ |
|||||
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SCP_ASK_DETAIL.aspx.cs" Inherits="SCP.SupplierData.SupplierLogistics.SCP_ASK_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="" AutoScroll="True"> |
||||
|
<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="btnConfirm" runat="server" EnablePostBack="True" OnClick="btnConfirm_Click" Text="确认订单" Icon="CssAdd"> |
||||
|
</f:Button> |
||||
|
|
||||
|
<f:Button ID="btnNoConfirm" runat="server" EnablePostBack="True" OnClick="btnNoConfirm_Click" Text="取消确认" Icon="CssAdd"> |
||||
|
</f:Button> |
||||
|
</Items> |
||||
|
</f:Toolbar> |
||||
|
</Toolbars> |
||||
|
<Items> |
||||
|
<f:Form runat="server" Title=""> |
||||
|
<Items> |
||||
|
<f:FormRow runat="server" ColumnWidths="33% 33% 33%" ID="FormRow_1"> |
||||
|
<Items> |
||||
|
|
||||
|
<f:TextBox runat = "server" Label = "单据状态" EmptyText = "" Readonly="true" ID = "TXT_State_DESC" /> |
||||
|
<f:TextBox runat = "server" Label = "订单编号" EmptyText = "" ID = "TXT_PoBillNum" /> |
||||
|
<f:TextBox runat = "server" Label = "供应商" EmptyText = "" ID = "TXT_VendName" /> |
||||
|
</Items> |
||||
|
</f:FormRow> |
||||
|
<f:FormRow runat="server" ColumnWidths="33% 33% 33%" ID="FormRow_2"> |
||||
|
<Items> |
||||
|
<f:TextBox runat = "server" Label = "发往地点" EmptyText = "" ID = "TXT_Site" /> |
||||
|
<f:DatePicker runat="server" Required ="true" DateFormatString="yyyy-MM-dd" Label="订货日期" EmptyText="请选择日期" ID="DP_BeginTime" /> |
||||
|
<%-- <f:DatePicker runat="server" ID="DP_EndTime" Label="截止日期" Text="" DateFormatString="yyyy-MM-dd" />--%> |
||||
|
</Items> |
||||
|
</f:FormRow> |
||||
|
<f:FormRow runat="server" ID="FormRow_3"> |
||||
|
<Items> |
||||
|
<f:TextBox ID="txtRemark" runat="server" Label="备注" Text=""> |
||||
|
</f:TextBox> |
||||
|
</Items> |
||||
|
</f:FormRow> |
||||
|
</Items> |
||||
|
</f:Form> |
||||
|
|
||||
|
<f:Grid runat="server" ID="Grid_V_TB_ASK_DETAIL" |
||||
|
DataKeyNames ="UID,PoBillNum,PoLine,PartCode,ShippedQty,ReceivedQty,BeginTime,EndTime,PoUnit,LocUnit,Price,Currency,PackQty,UnConv,DockCode,State,Remark,CreateTime,CreateUser,UpdateTime,UpdateUser,UpdateInfo,IsDeleted,PartDesc1,CurrencyDesc,Site,VendName,PartDesc2,AskBillNum,AskQty,TempQty,ReceivedPort" |
||||
|
IsDatabasePaging="True" AllowPaging="True" PageSize="10" OnPageIndexChange="Grid_V_TB_ASK_DETAIL_PageIndexChange" |
||||
|
EnableRowSelectEvent="True" AutoScroll="True" SortField="PoLine" SortDirection="DESC" > |
||||
|
<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 SortField="State" DataField="State" HeaderText="状态" ColumnID="State" Width="50px" Hidden="true" /> |
||||
|
<f:BoundField SortField="Line" DataField="PoLine" HeaderText="行号" ColumnID="Line" Width="40px" /> |
||||
|
<f:BoundField SortField="PartDesc1" DataField="PartDesc1" HeaderText="零件名称" ColumnID="PartDesc1" Width="200px" /> |
||||
|
<f:BoundField SortField="PartCode" DataField="PartCode" HeaderText="零件号" ColumnID="ProductCode" Width="80px" /> |
||||
|
<f:BoundField SortField="PoUnit" DataField="PoUnit" HeaderText="单位" ColumnID="PoUnit" Width="40px" /> |
||||
|
<f:BoundField SortField="PackQty" DataField="PackQty" HeaderText="标包数量" ColumnID="PackQty" Width="80px" DataFormatString = "{0:F}"/> |
||||
|
<f:BoundField SortField="CurrencyDesc" DataField="CurrencyDesc" HeaderText="币种" ColumnID="CurrencyDesc" Width="40px" /> |
||||
|
|
||||
|
<f:BoundField SortField="Price" DataField="Price" HeaderText="价格" ColumnID="Price" Width="80px" Hidden="true" /> |
||||
|
<f:BoundField SortField="AskQty" DataField="AskQty" HeaderText="要货数量" ColumnID="AskQty" Width="80px" DataFormatString = "{0:F}" /> |
||||
|
<f:BoundField SortField="EndTime" DataField="EndTime" HeaderText="截止日期" ColumnID="EndTime" Width="100px" /> |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
<f:BoundField SortField="ReduceQty" DataField="ReduceQty" HeaderText="减产数量" ColumnID="ReduceQty" Width="100px" Hidden="true"/> |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
<%--<f:BoundField SortField="TempQty" DataField="TempQty" HeaderText="待发数" ColumnID="TempQty" Width="60px" /> |
||||
|
<f:BoundField SortField="ShipQty" DataField="ShippedQty" HeaderText="发货数" ColumnID="ShipQty" Width="60px" /> |
||||
|
<f:BoundField SortField="ReceiveQty" DataField="ReceiveQty" HeaderText="收货数" ColumnID="ReceiveQty" Width="60px" />--%> |
||||
|
<f:BoundField SortField="Remrk" DataField="Remark" HeaderText="说明" ColumnID="RejectQty" /> |
||||
|
<f:BoundField SortField="ReceivedPort_Desc" DataField="ReceivedPort_Desc" HeaderText="收货口" ColumnID="ReceivedPort_Desc" /> |
||||
|
<f:BoundField SortField="OneMonth" DataField="OneMonth" HeaderText="预测一" ColumnID="OneMonth" /> |
||||
|
<f:BoundField SortField="TwoMonth" DataField="TwoMonth" HeaderText="预测二" ColumnID="TwoMonth" /> |
||||
|
<f:BoundField SortField="ThreeMonth" DataField="ThreeMonth" HeaderText="预测三" ColumnID="ThreeMonth" /> |
||||
|
</Columns> |
||||
|
</f:Grid> |
||||
|
|
||||
|
<f:HiddenField runat="server" ID="TXT_ModType"></f:HiddenField> |
||||
|
<f:HiddenField runat="server" ID="TXT_State"></f:HiddenField> |
||||
|
</Items> |
||||
|
|
||||
|
</f:Panel> |
||||
|
<f:Window runat="server" ID="Window1" Hidden="True" |
||||
|
WindowPosition="Center" IsModal="true" Title="Popup Window 1" Target="Parent" EnableIFrame="true" |
||||
|
IFrameUrl="about:blank" Height="840px" Width="700px" /> |
||||
|
<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> |
||||
|
</form> |
||||
|
</body> |
||||
|
</html> |
@ -0,0 +1,144 @@ |
|||||
|
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.Enums; |
||||
|
using CK.SCP.Models.ScpEntity; |
||||
|
using CK.SCP.Utils; |
||||
|
using CK.SCP.Controller; |
||||
|
using FineUI; |
||||
|
using SCP.Code; |
||||
|
|
||||
|
namespace SCP.SupplierData.SupplierLogistics |
||||
|
{ |
||||
|
public partial class SCP_ASK_DETAIL : PageBase |
||||
|
{ |
||||
|
protected void Page_Load(object sender, EventArgs e) |
||||
|
{ |
||||
|
if (!IsPostBack) |
||||
|
{ |
||||
|
GetV_TB_POData(); |
||||
|
BindDetail(); |
||||
|
//SetRoleRule();
|
||||
|
TranslatorAgents(Toolbar2); |
||||
|
TranslatorAgent(Grid_V_TB_ASK_DETAIL); |
||||
|
TranslatorAgents(FormRow_1); |
||||
|
TranslatorAgents(FormRow_2); |
||||
|
TranslatorAgents(FormRow_3); |
||||
|
} |
||||
|
} |
||||
|
private void SetRoleRule() |
||||
|
{ |
||||
|
IsPriceVisible(Grid_V_TB_ASK_DETAIL, "价格"); |
||||
|
} |
||||
|
private void BindResource() |
||||
|
{ |
||||
|
BTN_refresh.Text = GetNameByKey(BTN_refresh.Text); |
||||
|
TXT_PoBillNum.Label = GetNameByKey(TXT_PoBillNum.Label); |
||||
|
TXT_Site.Label = GetNameByKey(TXT_Site.Label); |
||||
|
TXT_State_DESC.Label = GetNameByKey(TXT_State_DESC.Label); |
||||
|
TXT_VendName.Label = GetNameByKey(TXT_VendName.Label); |
||||
|
DP_BeginTime.Label = GetNameByKey(DP_BeginTime.Label); |
||||
|
//DP_EndTime.Label = GetNameByKey(DP_EndTime.Label);
|
||||
|
foreach (var itm in Grid_V_TB_ASK_DETAIL.Columns) |
||||
|
{ |
||||
|
GetNameByKey(itm.HeaderText); |
||||
|
} |
||||
|
} |
||||
|
public void SearchV_TB_ASK_DETAILData(Action<IQueryable<V_TB_ASK_DETAIL>> p_action) |
||||
|
{ |
||||
|
V_TB_ASK_DETAIL _entity = new V_TB_ASK_DETAIL(); |
||||
|
_entity.AskBillNum= Request["AskBillNum"]; |
||||
|
SCP_ASK_CONTROLLER.Get_V_TB_ASK_DETAIL_List(_entity, (_ret) => { |
||||
|
if (_ret.State == ReturnStatus.Succeed) |
||||
|
{ |
||||
|
p_action(_ret.Result); |
||||
|
} |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
public void GetV_TB_POData() |
||||
|
{ |
||||
|
V_TB_ASK _entity = new V_TB_ASK(); |
||||
|
_entity.AskBillNum = Request["AskBillNum"]; |
||||
|
//_entity.UserInAddress = CurrentUser.FactoryList;
|
||||
|
_entity.UserInVendIds = CurrentUser.VenderList; |
||||
|
SCP_ASK_CONTROLLER.Get_V_TB_ASK_List(_entity, (_ret) => |
||||
|
{ |
||||
|
if (_ret.State == ReturnStatus.Succeed) |
||||
|
{ |
||||
|
var _result = _ret.Result.FirstOrDefault(); |
||||
|
Session["Ask"] = _result; |
||||
|
this.TXT_PoBillNum.Text = _result.PoBillNum; |
||||
|
this.TXT_Site.Text = _result.Site_Desc; |
||||
|
this.TXT_State_DESC.Text = _result.State_DESC; |
||||
|
TXT_ModType.Text = _result.ModType.ToString(); |
||||
|
this.TXT_VendName.Text = _result.VendName; |
||||
|
this.txtRemark.Text = _result.Remark; |
||||
|
DP_BeginTime.SelectedDate = _result.BeginTime; |
||||
|
|
||||
|
} |
||||
|
}); |
||||
|
} |
||||
|
public void BindDetail() |
||||
|
{ |
||||
|
SearchV_TB_ASK_DETAILData((ret) => { |
||||
|
Grid_V_TB_ASK_DETAIL.RecordCount = ret.Count(); |
||||
|
var list = SortAndPage<V_TB_ASK_DETAIL>(ret, Grid_V_TB_ASK_DETAIL); |
||||
|
Grid_V_TB_ASK_DETAIL.DataSource = list; |
||||
|
Grid_V_TB_ASK_DETAIL.DataBind(); |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
protected void btnOutput_Click(object sender, EventArgs e) |
||||
|
{ |
||||
|
|
||||
|
} |
||||
|
|
||||
|
protected void btnConfirm_Click(object sender, EventArgs e) |
||||
|
{ |
||||
|
SET_ASK_STATE("供应商确认成功!", AskState.Confirm); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
private void SET_ASK_STATE(string p_msg,AskState p_state) |
||||
|
{ |
||||
|
if (Session["Ask"] != null) |
||||
|
{ |
||||
|
var _ask = Session["Ask"] as V_TB_ASK; |
||||
|
var ret = SCP_ASK_CONTROLLER.Save_TB_ASK_STATE(new List<string>() { _ask.AskBillNum },p_state); |
||||
|
if (ret.State == ReturnStatus.Succeed) |
||||
|
{ |
||||
|
Alert.Show(p_msg); |
||||
|
GetV_TB_POData(); |
||||
|
BindDetail(); |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
Alert.Show(ret.Message); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
protected void Grid_V_TB_ASK_DETAIL_PageIndexChange(object sender, GridPageEventArgs e) |
||||
|
{ |
||||
|
BindDetail(); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
protected void ddlGridPageSize_SelectedIndexChanged(object sender, EventArgs e) |
||||
|
{ |
||||
|
Grid_V_TB_ASK_DETAIL.PageSize = Convert.ToInt32(ddlGridPageSize.SelectedValue); |
||||
|
|
||||
|
BindDetail(); |
||||
|
} |
||||
|
|
||||
|
protected void btnNoConfirm_Click(object sender, EventArgs e) |
||||
|
{ |
||||
|
SET_ASK_STATE("取消确认成功!", AskState.NoConfirm); |
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,224 @@ |
|||||
|
//------------------------------------------------------------------------------
|
||||
|
// <自动生成>
|
||||
|
// 此代码由工具生成。
|
||||
|
//
|
||||
|
// 对此文件的更改可能导致不正确的行为,如果
|
||||
|
// 重新生成代码,则所做更改将丢失。
|
||||
|
// </自动生成>
|
||||
|
//------------------------------------------------------------------------------
|
||||
|
|
||||
|
namespace SCP.SupplierData.SupplierLogistics |
||||
|
{ |
||||
|
|
||||
|
|
||||
|
public partial class SCP_ASK_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>
|
||||
|
/// btnConfirm 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Button btnConfirm; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// btnNoConfirm 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Button btnNoConfirm; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// FormRow_1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.FormRow FormRow_1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TXT_State_DESC 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox TXT_State_DESC; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TXT_PoBillNum 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox TXT_PoBillNum; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TXT_VendName 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox TXT_VendName; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// FormRow_2 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.FormRow FormRow_2; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TXT_Site 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox TXT_Site; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// DP_BeginTime 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.DatePicker DP_BeginTime; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// FormRow_3 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.FormRow FormRow_3; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// txtRemark 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox txtRemark; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Grid_V_TB_ASK_DETAIL 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Grid Grid_V_TB_ASK_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; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TXT_ModType 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.HiddenField TXT_ModType; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TXT_State 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.HiddenField TXT_State; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Window1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Window Window1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// WindowUpload 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Window WindowUpload; |
||||
|
} |
||||
|
} |
@ -0,0 +1,129 @@ |
|||||
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SCP_ASN.aspx.cs" Inherits="SCP.SupplierData.SupplierLogistics.SCP_ASN" %> |
||||
|
|
||||
|
<!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:Button ID="Button1" runat="server" EnablePostBack="True" Text="刷新" Icon="Reload" OnClientClick="location.reload();"> |
||||
|
</f:Button> |
||||
|
<f:Button ID="BtnOutPut" runat="server" EnablePostBack="True" Text="导出" Icon="PageExcel" OnClick="BtnOutPut_Click"> |
||||
|
</f:Button> |
||||
|
<f:Button ID="btnDetail" runat="server" EnablePostBack="True" Text="明细" Icon="Find" OnClick="btnDetail_Click"> |
||||
|
</f:Button> |
||||
|
<f:Button ID="btnNew" runat="server" EnablePostBack="True" Text="新建发货单" Icon="Add" OnClick="btnNew_Click"> |
||||
|
</f:Button> |
||||
|
<%--<f:Button ID="btnDelete" runat="server" EnablePostBack="True" Text="删除" Icon="Add" OnClick="btnDelete_Click" Hidden="True"> |
||||
|
</f:Button>--%> |
||||
|
<f:Button ID="btnShow" runat="server" Icon="Find" Text="显示查询面板" OnClick="btnShow_Click"> |
||||
|
</f:Button> |
||||
|
<f:Button ID="btnPallet" runat="server" Icon="Add" Text="创建托盘" OnClick="btnPallet_Click" > |
||||
|
</f:Button> |
||||
|
<f:Button ID="btnPalletDetail" runat="server" Icon=" Zoom" Text="查看托盘" OnClick="btnPalletDetail_Click" > |
||||
|
</f:Button> |
||||
|
</Items> |
||||
|
</f:Toolbar> |
||||
|
</Toolbars> |
||||
|
</f:Form> |
||||
|
<f:Label runat="server" Label="物料发出前,请确认发货单是【已发货】状态,如果是发货单是【新建】状态请进入明细,点击【确认发货】按钮。" LabelWidth="800" ColumnWidth="800" Width="800" /> |
||||
|
<f:GroupPanel runat="server" ID="gp1" Hidden="True" Layout="HBox"> |
||||
|
<Items> |
||||
|
<f:Form runat="server"> |
||||
|
<Rows> |
||||
|
<f:FormRow runat="server" ID="FormRow_1" Hidden="true"> |
||||
|
<Items> |
||||
|
<f:DropDownList runat="server" ID="ddl" Label="状态"> |
||||
|
<f:ListItem Text="-" Value=""/> |
||||
|
<f:ListItem Text="新建" Value="0" /> |
||||
|
<f:ListItem Text="已发货" Value="1" /> |
||||
|
<f:ListItem Text="已收货" Value="2" /> |
||||
|
<f:ListItem Text="已作废" Value="-1" /> |
||||
|
</f:DropDownList> |
||||
|
</Items> |
||||
|
</f:FormRow> |
||||
|
<f:FormRow runat="server" ID="FormRow_2"> |
||||
|
<Items> |
||||
|
<f:TextBox ID="txtBill" runat="server" Label="发货单号"/> |
||||
|
<f:TextBox ID="TXT_VenderName" runat="server" Label="供应商"/> |
||||
|
<f:TextBox ID="TXT_ASK" runat="server" Label="看板编号" /> |
||||
|
<f:TextBox ID="txtPO" runat="server" Label="订单编号" /> |
||||
|
<f:DropDownList runat="server" ID="DropDownList1" Label="地点" DataTextField="FactoryName" DataValueField=" ErpDomain"> |
||||
|
</f:DropDownList> |
||||
|
<f:TextBox ID="TXT_Extend1" runat="server" Label="子网站" Hidden="true" /> |
||||
|
<f:TextBox ID="TXT_Extend2" runat="server" Label="子网站" Hidden="true" /> |
||||
|
<f:TextBox ID="TXT_Extend3" runat="server" Label="子网站" Hidden="true" /> |
||||
|
</Items> |
||||
|
</f:FormRow> |
||||
|
<f:FormRow runat="server" ID="FormRow_3" Hidden="true"> |
||||
|
<Items> |
||||
|
<f:Label runat="server" Label="发往地点" /> |
||||
|
<f:TextBox ID="txtShipTosite" runat="server" /> |
||||
|
<f:DatePicker ID="dateShip" runat="server" Required="True" Label="发货时间" /> |
||||
|
<f:Label runat="server" Label="发货时间" /> |
||||
|
<f:DatePicker ID="dateReceive" runat="server" Required="true" /> |
||||
|
</Items> |
||||
|
</f:FormRow> |
||||
|
<f:FormRow runat="server" ID="FormRow_4"> |
||||
|
<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_ASN" ShowBorder="true" ShowHeader="true" PageSize="20" BoxFlex="1" CssClass="maingrid" |
||||
|
runat="server" DataKeyNames="UID,AsnBillNum,AskBillNum,PoBillNum,VendId,State,Remark,ShipTime,ShipUser,ReceiveTime,ReceiveUser,ErpBillNum,ModType,Contacter,Buyer,BuyerPhone,VendName,Site,State_DESC,ModType_DESC,CreateTime,CreateUser,UpdateTime,UpdateUser,UpdateInfo,IsDeleted,GUID" |
||||
|
IsDatabasePaging="true" AllowPaging="true" SortDirection="DESC" SortField="ShipTime" |
||||
|
AutoScroll="True" EnableRowDoubleClickEvent="True" OnRowDoubleClick="Grid_V_TB_ASN_RowDoubleClick" OnPageIndexChange="Grid_V_TB_ASN_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="20" Value="10" /> |
||||
|
<f:ListItem Text="40" Value="40" /> |
||||
|
<f:ListItem Text="80" Value="80" /> |
||||
|
<f:ListItem Text="100" Value="100" /> |
||||
|
</f:DropDownList> |
||||
|
</PageItems> |
||||
|
<Columns> |
||||
|
<f:BoundField Width = "100px" DataField = "State_DESC" DataFormatString = "{0}" HeaderText = "状态" /> |
||||
|
<f:BoundField runat="server" HeaderText="发货单号" ColumnID="" DataField="AsnBillNum" /> |
||||
|
<f:BoundField runat="server" HeaderText="要货单号" ColumnID="" DataField="AskBillNum" /> |
||||
|
<f:BoundField runat="server" HeaderText="车牌号" ColumnID="" DataField="PlateNumber" Hidden="false"></f:BoundField> |
||||
|
<f:BoundField runat="server" HeaderText="供应商" ColumnID="" DataField="VendName" /> |
||||
|
<f:BoundField runat="server" HeaderText="订单号" ColumnID="" DataField="PoBillNum" /> |
||||
|
<f:BoundField Width = "100px" DataField = "ShipTime" DataFormatString = "{0:yyyy-MM-dd}" HeaderText = "发货时间" Hidden="true" /> |
||||
|
<f:BoundField Width = "100px" DataField = "ShipUser" DataFormatString = "{0}" HeaderText = "发货人" /> |
||||
|
<f:BoundField Width = "100px" DataField = "ReceiveTime" DataFormatString = "{0:yyyy-MM-dd}" HeaderText = "收货时间" Hidden="true" /> |
||||
|
<f:BoundField Width = "100px" DataField = "ReceiveUser" DataFormatString = "{0}" HeaderText = "收货人" /> |
||||
|
<f:BoundField runat="server" HeaderText="发往地点" ColumnID="" DataField="Site_Desc" /> |
||||
|
<f:BoundField runat="server" HeaderText="备注" ColumnID="" DataField="Remark" Hidden="true" /> |
||||
|
</Columns> |
||||
|
</f:Grid> |
||||
|
</Items> |
||||
|
</f:Panel> |
||||
|
<f:Window runat="server" ID="Window1" Hidden="True" |
||||
|
WindowPosition="Center" IsModal="true" Title="发货明细" Target="Parent" EnableIFrame="true" CloseAction="HidePostBack" |
||||
|
IFrameUrl="about:blank" Height="600px" Width="1024px" AutoScroll="True" OnClose="Window1_Close" /> |
||||
|
</form> |
||||
|
</body> |
||||
|
</html> |
@ -0,0 +1,175 @@ |
|||||
|
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.Controller; |
||||
|
using FineUI; |
||||
|
using System.Data; |
||||
|
|
||||
|
namespace SCP.SupplierData.SupplierLogistics |
||||
|
{ |
||||
|
public partial class SCP_ASN : PageBase |
||||
|
{ |
||||
|
protected void Page_Load(object sender, EventArgs e) |
||||
|
{ |
||||
|
if (!IsPostBack) |
||||
|
{ |
||||
|
LoadData(); |
||||
|
TranslatorAgents(Toolbar2); |
||||
|
TranslatorAgent(Grid_V_TB_ASN); |
||||
|
TranslatorAgents(FormRow_1); |
||||
|
TranslatorAgents(FormRow_2); |
||||
|
TranslatorAgents(FormRow_3); |
||||
|
TranslatorAgents(FormRow_4); |
||||
|
} |
||||
|
} |
||||
|
public void LoadData() |
||||
|
{ |
||||
|
//if (!CurrentUser.RoleList.Contains("供应商"))
|
||||
|
//{
|
||||
|
// Alert.Show("当前用户角色不能操作模块!");
|
||||
|
// return;
|
||||
|
//}
|
||||
|
if (CurrentUser.VenderList.Count == 0 && CurrentUser.Name!="admin") |
||||
|
{ |
||||
|
if (CurrentUser.RoleList.Contains("分厂管理员")) |
||||
|
{ |
||||
|
BindASN(); |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
Alert.Show("当前用户未分配供应商!"); |
||||
|
return; |
||||
|
} |
||||
|
; |
||||
|
} |
||||
|
BindASN(); |
||||
|
} |
||||
|
|
||||
|
public void BindASN() |
||||
|
{ |
||||
|
SearchV_TB_ASN((result) => { |
||||
|
Grid_V_TB_ASN.RecordCount = result.Count(); |
||||
|
var list = SortAndPage<V_TB_ASN>(result, Grid_V_TB_ASN); |
||||
|
Grid_V_TB_ASN.DataSource = list; |
||||
|
Grid_V_TB_ASN.DataBind(); |
||||
|
}); |
||||
|
} |
||||
|
public void SearchV_TB_ASN(Action<IQueryable<V_TB_ASN>> p_action) |
||||
|
{ |
||||
|
var ls = SCPDB.TB_FACTORY.Where(p => p.ErpDomain == CurrentUser.UsedDomain).ToList(); |
||||
|
DropDownList1.DataSource = ls; |
||||
|
DropDownList1.DataBind(); |
||||
|
V_TB_ASN _entity = new V_TB_ASN(); |
||||
|
_entity.IsDeleted = false; |
||||
|
_entity.VendId = TXT_VenderName.Text; |
||||
|
_entity.PoBillNum = txtPO.Text; |
||||
|
_entity.AsnBillNum = txtBill.Text; |
||||
|
_entity.AskBillNum = TXT_ASK.Text; |
||||
|
_entity.UserInVendIds = CurrentUser.VenderList; |
||||
|
_entity.UserInAddress = CurrentUser.FactoryList; |
||||
|
_entity.SubSite = DropDownList1.SelectedValue; |
||||
|
_entity.Extend1 = TXT_Extend1.Text; |
||||
|
_entity.Extend2 = TXT_Extend2.Text; |
||||
|
_entity.Extend3 = TXT_Extend3.Text; |
||||
|
SCP_ASN_CONTROLLER.Get_V_TB_ASN_List(_entity, (_ret) => { |
||||
|
if (_ret.State == ReturnStatus.Succeed) |
||||
|
{ |
||||
|
p_action(_ret.Result); |
||||
|
} |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
protected void Grid_V_TB_ASN_RowDoubleClick(object sender, FineUI.GridRowClickEventArgs e) |
||||
|
{ |
||||
|
object[] rowDataKeys = Grid_V_TB_ASN.DataKeys[e.RowIndex]; |
||||
|
string AsnBillNum = rowDataKeys[1] as string; |
||||
|
PageContext.RegisterStartupScript(Window1.GetShowReference(string.Format("../SupplierData/SCP_ASN_DETAIL.aspx?AsnBillNum={0}", AsnBillNum))); |
||||
|
} |
||||
|
|
||||
|
protected void BtnOutPut_Click(object sender, EventArgs e) |
||||
|
{ |
||||
|
List<string> _ls = new List<string>(); |
||||
|
SearchV_TB_ASN(rs => { |
||||
|
_ls=rs.Select(p => p.AsnBillNum).ToList(); |
||||
|
DataSet ds = SCP_EXCEL_CONTROLLER.GET_ASN_EXECEL(_ls); |
||||
|
PageBase.DataSetToExcel(ds, "发货单"); |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
protected void btnDetail_Click(object sender, EventArgs e) |
||||
|
{ |
||||
|
if (Grid_V_TB_ASN.SelectedRowIndexArray.Count() == 0) |
||||
|
{ |
||||
|
PageContext.RegisterStartupScript(Alert.GetShowInTopReference("没有选择数据!")); |
||||
|
return; |
||||
|
} |
||||
|
object[] rowDataKeys = Grid_V_TB_ASN.DataKeys[Grid_V_TB_ASN.SelectedRowIndex]; |
||||
|
string AsnBillNum = rowDataKeys[1] as string; |
||||
|
PageContext.RegisterStartupScript(Window1.GetShowReference(string.Format("../SupplierData/SCP_ASN_DETAIL.aspx?AsnBillNum={0}", AsnBillNum))); |
||||
|
} |
||||
|
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) |
||||
|
{ |
||||
|
BindASN(); |
||||
|
} |
||||
|
protected void Grid_V_TB_ASN_PageIndexChange(object sender, GridPageEventArgs e) |
||||
|
{ |
||||
|
BindASN(); |
||||
|
} |
||||
|
protected void ddlGridPageSize_SelectedIndexChanged(object sender, EventArgs e) |
||||
|
{ |
||||
|
Grid_V_TB_ASN.PageSize = Convert.ToInt32(ddlGridPageSize.SelectedValue); |
||||
|
BindASN(); |
||||
|
} |
||||
|
protected void BtnOutPut_Click1(object sender, EventArgs e) |
||||
|
{ |
||||
|
|
||||
|
} |
||||
|
protected void btnNew_Click(object sender, EventArgs e) |
||||
|
{ |
||||
|
PageContext.RegisterStartupScript(Window1.GetShowReference("../SupplierData/SCP_ASK.aspx")); |
||||
|
} |
||||
|
|
||||
|
protected void Window1_Close(object sender, WindowCloseEventArgs e) |
||||
|
{ |
||||
|
BindASN(); |
||||
|
} |
||||
|
|
||||
|
protected void btnPallet_Click(object sender, EventArgs e) |
||||
|
{ |
||||
|
if (Grid_V_TB_ASN.SelectedRowIndexArray.Count() == 0 ) |
||||
|
{ |
||||
|
PageContext.RegisterStartupScript(Alert.GetShowInTopReference("没有选择数据!")); |
||||
|
return; |
||||
|
} |
||||
|
object[] rowDataKeys = Grid_V_TB_ASN.DataKeys[Grid_V_TB_ASN.SelectedRowIndex]; |
||||
|
string AsnBillNum = rowDataKeys[1] as string; |
||||
|
PageContext.RegisterStartupScript(Window1.GetShowReference(string.Format("../SupplierData/SCP_PALLET_CREATE.aspx?AsnBillNum={0}", AsnBillNum))); |
||||
|
|
||||
|
} |
||||
|
|
||||
|
protected void btnPalletDetail_Click(object sender, EventArgs e) |
||||
|
{ |
||||
|
if (Grid_V_TB_ASN.SelectedRowIndexArray.Count() == 0) |
||||
|
{ |
||||
|
PageContext.RegisterStartupScript(Alert.GetShowInTopReference("没有选择数据!")); |
||||
|
return; |
||||
|
} |
||||
|
object[] rowDataKeys = Grid_V_TB_ASN.DataKeys[Grid_V_TB_ASN.SelectedRowIndex]; |
||||
|
string AsnBillNum = rowDataKeys[1] as string; |
||||
|
PageContext.RegisterStartupScript(Window1.GetShowReference(string.Format("../SupplierData/SCP_PALLET.aspx?AsnBillNum={0}", AsnBillNum))); |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,323 @@ |
|||||
|
//------------------------------------------------------------------------------
|
||||
|
// <自动生成>
|
||||
|
// 此代码由工具生成。
|
||||
|
//
|
||||
|
// 对此文件的更改可能导致不正确的行为,如果
|
||||
|
// 重新生成代码,则所做更改将丢失。
|
||||
|
// </自动生成>
|
||||
|
//------------------------------------------------------------------------------
|
||||
|
|
||||
|
namespace SCP.SupplierData.SupplierLogistics |
||||
|
{ |
||||
|
|
||||
|
|
||||
|
public partial class SCP_ASN |
||||
|
{ |
||||
|
|
||||
|
/// <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>
|
||||
|
/// Button1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Button Button1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// BtnOutPut 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Button BtnOutPut; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// btnDetail 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Button btnDetail; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// btnNew 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Button btnNew; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// btnShow 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Button btnShow; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// btnPallet 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Button btnPallet; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// btnPalletDetail 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Button btnPalletDetail; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// gp1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.GroupPanel gp1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// FormRow_1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.FormRow FormRow_1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// ddl 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.DropDownList ddl; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// FormRow_2 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.FormRow FormRow_2; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// txtBill 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox txtBill; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TXT_VenderName 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox TXT_VenderName; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TXT_ASK 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox TXT_ASK; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// txtPO 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox txtPO; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// DropDownList1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.DropDownList DropDownList1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TXT_Extend1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox TXT_Extend1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TXT_Extend2 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox TXT_Extend2; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TXT_Extend3 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox TXT_Extend3; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// FormRow_3 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.FormRow FormRow_3; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// txtShipTosite 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox txtShipTosite; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// dateShip 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.DatePicker dateShip; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// dateReceive 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.DatePicker dateReceive; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// FormRow_4 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.FormRow FormRow_4; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// btnClose 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Button btnClose; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// BtnSearch 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Button BtnSearch; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Grid_V_TB_ASN 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Grid Grid_V_TB_ASN; |
||||
|
|
||||
|
/// <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,217 @@ |
|||||
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SCP_ASN_CREATE.aspx.cs" Inherits="SCP.SupplierData.SupplierLogistics.SCP_ASN_CREATE" %> |
||||
|
|
||||
|
<!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" ID="pmg1" /> |
||||
|
<f:Panel ID="Panel1" runat="server" Title="" AutoScroll="True"> |
||||
|
<Items> |
||||
|
|
||||
|
<f:Toolbar runat="server" ID="Toolbar1"> |
||||
|
<Items> |
||||
|
<f:Button ID="btnCreate" runat="server" EnablePostBack="True" OnClick="btnCreate_Click" Text="生成发货单" Icon="CssAdd"> |
||||
|
</f:Button> |
||||
|
|
||||
|
<f:ToolbarFill runat="server" /> |
||||
|
</Items> |
||||
|
</f:Toolbar> |
||||
|
<f:Form runat="server" Title=""> |
||||
|
<Items> |
||||
|
|
||||
|
<f:FormRow runat="server" ColumnWidths="25% 25% 25% 25%" ID="FormRow_1"> |
||||
|
<Items> |
||||
|
<f:TextBox runat = "server" Label = "单据状态" Enabled="false" EmptyText = "" ID = "TXT_State_Desc" /> |
||||
|
<f:TextBox runat = "server" Label = "要货看板编号" Enabled="false" EmptyText = "" ID = "TXT_AskBillNum" /> |
||||
|
<f:TextBox runat = "server" Label = "供应商" Enabled="false" EmptyText = "" ID = "TXT_VendName" /> |
||||
|
<f:TextBox runat = "server" Enabled="false" Label = "发往地点" EmptyText = "" ID = "TXT_Site" /> |
||||
|
</Items> |
||||
|
</f:FormRow> |
||||
|
<f:FormRow runat="server" ColumnWidths="25% 25% 25% 25%"> |
||||
|
<Items> |
||||
|
<f:TextBox runat = "server" Label = "子网站" EmptyText = "" ID = "TXT_SubSite" Hidden="true" /> |
||||
|
<f:TextBox runat = "server" Label = "子网站" EmptyText = "" ID = "TXT_Extend1" Hidden="true"/> |
||||
|
<f:TextBox runat = "server" Label = "子网站" EmptyText = "" ID = "TXT_Extend2" Hidden="true" /> |
||||
|
<f:TextBox runat = "server" Label = "子网站" EmptyText = "" ID = "TXT_Extend3" Hidden="true" /> |
||||
|
</Items> |
||||
|
</f:FormRow> |
||||
|
<f:FormRow runat="server" ColumnWidths="25% 25% 25% 25%" ID="FormRow_2"> |
||||
|
<Items> |
||||
|
<f:TextBox ID="TXT_PlateNumber" runat="server" Label="车牌/快递单号" /> |
||||
|
<f:TextBox runat = "server" Label = "发货人" EmptyText = "" ID = "TXT_ShipUser" /> |
||||
|
<f:DatePicker runat="server" Required ="true" DateFormatString="yyyy-MM-dd" Label="发货日期" EmptyText="请选择日期" ID="DP_ShipTime" /> |
||||
|
<f:DatePicker runat="server" Required ="true" Label="承诺到货日期" EmptyText="请选择日期" ID="DP_ReceiveTime" Readonly="false" CompareControl="DP_ShipTime" DateFormatString="yyyy-MM-dd HH:mm" |
||||
|
CompareOperator="GreaterThan" CompareMessage="到货日期应该大于发货日期" |
||||
|
ShowRedStar="True" /> |
||||
|
</Items> |
||||
|
</f:FormRow> |
||||
|
<f:FormRow runat="server" ColumnWidths="33% 33% 33%" ID="FormRow_3" Hidden="true"> |
||||
|
<Items> |
||||
|
<f:DropDownList ID="DDL_PORT" DataTextField="PORT_DESCRIPTION" DataValueField="PORT_NO" Required="true" runat="server" Label="收货口"> |
||||
|
</f:DropDownList> |
||||
|
<f:TextBox ID="TXT_Remark" runat="server" Label="备注" Text=""> |
||||
|
</f:TextBox> |
||||
|
</Items> |
||||
|
</f:FormRow> |
||||
|
</Items> |
||||
|
</f:Form> |
||||
|
<f:Grid runat="server" ID="Grid_V_TB_ASK_DETAIL" |
||||
|
DataKeyNames ="UID,PoBillNum,PoLine,PartCode,ShippedQty,ReceivedQty,BeginTime,EndTime,PoUnit,LocUnit,Price,Currency,PackQty,UnConv,DockCode,State,Remark,CreateTime,CreateUser,UpdateTime,UpdateUser,UpdateInfo,IsDeleted,PartDesc1,CurrencyDesc,Site,VendName,PartDesc2,AskBillNum,AskQty,TempQty,ReceivedPort,ProduceDate,ReduceQty,ValidityDays,Batch,SubSite,Extend1,Extend2,Extend3" |
||||
|
IsDatabasePaging="True" AllowPaging="True" OnPageIndexChange="Grid_V_TB_ASK_DETAIL_PageIndexChange" OnRowDataBound="Grid_V_TB_ASK_DETAIL_RowDataBound" |
||||
|
EnableRowSelectEvent="True" PageSize="500" AutoScroll="True" SortField="PoLine" SortDirection="DESC" AllowCellEditing="true" ClicksToEdit="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="100" Value="500" /> |
||||
|
<f:ListItem Text="200" Value="1000" /> |
||||
|
</f:DropDownList> |
||||
|
</PageItems> |
||||
|
|
||||
|
<Columns> |
||||
|
|
||||
|
<f:BoundField SortField="PartDesc1" DataField="PartDesc1" HeaderText="零件名称" ColumnID="PartDesc1" Width="100px" ToolTip='<%# Eval("PartDesc1") %>'/> |
||||
|
<f:BoundField SortField="PartCode" DataField="PartCode" HeaderText="零件号" ColumnID="ProductCode" Width="100px" /> |
||||
|
|
||||
|
<f:BoundField SortField="VendPartCode" DataField="VendPartCode" HeaderText="供应商零件号" ColumnID="VendPartCode" Width="100px" /> |
||||
|
|
||||
|
<f:RenderField Width="80px" ColumnID="PackQty" DataField="PackQty" FieldType="Float" |
||||
|
HeaderText="标包数量"> |
||||
|
<Editor> |
||||
|
<f:NumberBox ID="TXT_PackQty" runat="server" MinValue="0" |
||||
|
MaxValue="99999999" DecimalPrecision="2" > |
||||
|
</f:NumberBox> |
||||
|
</Editor> |
||||
|
</f:RenderField> |
||||
|
<f:RenderField Width="100px" ColumnID="Batch" DataField="Batch" FieldType="String" HeaderText="发货批次"> |
||||
|
<Editor> |
||||
|
<f:TextBox ID="txtBatch1" Text="" runat="server" Regex="\d{6}" ></f:TextBox> |
||||
|
</Editor> |
||||
|
</f:RenderField> |
||||
|
<%--<f:BoundField SortField="Batch1" DataField="Batch" HeaderText="发货批次" ColumnID="Batch1" Width="100px" /> --%> |
||||
|
|
||||
|
<f:RenderField Width="100px" ColumnID="TempQty" FieldType="Float" DataField="TempQty" |
||||
|
HeaderText="发货数量"> |
||||
|
<Editor> |
||||
|
<f:NumberBox ID="NumberBox1" runat="server" MinValue="0" |
||||
|
MaxValue="99999999" DecimalPrecision="3" > |
||||
|
</f:NumberBox> |
||||
|
</Editor> |
||||
|
</f:RenderField> |
||||
|
<f:RenderField Width="120px" ColumnID="ProduceDate" DataField="ProduceDate" FieldType="Date" |
||||
|
Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderText="生产日期"> |
||||
|
<Editor> |
||||
|
<f:DatePicker ID="DatePicker1" EnableBlurEvent="true" Required="true" runat="server" > |
||||
|
</f:DatePicker> |
||||
|
</Editor> |
||||
|
</f:RenderField> |
||||
|
<f:RenderField Width="100px" ColumnID="Batch2" Hidden="true" |
||||
|
HeaderText="发货批次"> |
||||
|
<Editor> |
||||
|
<f:TextBox ID="TextBox1" runat="server" MaxLength="6" > |
||||
|
</f:TextBox> |
||||
|
</Editor> |
||||
|
</f:RenderField> |
||||
|
<f:RenderField Width="100px" ColumnID="Qty2" FieldType="Float" Hidden="true" |
||||
|
HeaderText="发货数量"> |
||||
|
<Editor> |
||||
|
<f:NumberBox ID="NumberBox2" runat="server" MinValue="0" |
||||
|
MaxValue="99999999" DecimalPrecision="3" > |
||||
|
</f:NumberBox> |
||||
|
</Editor> |
||||
|
</f:RenderField> |
||||
|
<f:RenderField Width="100px" ColumnID="Batch3" Hidden="true" |
||||
|
HeaderText="发货批次"> |
||||
|
<Editor> |
||||
|
<f:TextBox ID="TextBox2" runat="server" MaxLength="6" > |
||||
|
</f:TextBox> |
||||
|
</Editor> |
||||
|
</f:RenderField> |
||||
|
<f:RenderField Width="100px" ColumnID="Qty3" FieldType="Float" Hidden="true" |
||||
|
HeaderText="发货数量"> |
||||
|
<Editor> |
||||
|
<f:NumberBox ID="NumberBox4" runat="server" MinValue="0" |
||||
|
MaxValue="99999999" DecimalPrecision="3" > |
||||
|
</f:NumberBox> |
||||
|
</Editor> |
||||
|
</f:RenderField> |
||||
|
|
||||
|
<f:RenderField Width="150px" ColumnID="VendBatch" Hidden="true" |
||||
|
HeaderText="供应商批次(YYMMDD)"> |
||||
|
<Editor> |
||||
|
<f:TextBox ID="TXT_VendBatch" runat="server" > |
||||
|
</f:TextBox> |
||||
|
</Editor> |
||||
|
</f:RenderField> |
||||
|
|
||||
|
<f:BoundField SortField="PoUnit" DataField="PoUnit" HeaderText="单位" ColumnID="PoUnit" Width="40px" /> |
||||
|
<f:BoundField SortField="CanQty" DataField="CanQty" HeaderText="可发数量" ColumnID="CanQty" Width="70px" DataFormatString = "{0:F}"/> |
||||
|
<f:BoundField SortField="EndTime" DataField="EndTime" HeaderText="到货截至日期" ColumnID="EndTime" Width="100px" /> |
||||
|
<f:BoundField SortField="SubSite" DataField="SubSite" HeaderText="子网站" ColumnID="SubSite" Width="100px" Hidden="true"/> |
||||
|
<f:BoundField SortField="Extend1" DataField="Extend1" HeaderText="子网站" ColumnID="Extend1" Width="100px" Hidden="true" /> |
||||
|
<f:BoundField SortField="Extend2" DataField="Extend2" HeaderText="子网站" ColumnID="Extend2" Width="100px" Hidden="true"/> |
||||
|
<f:BoundField SortField="Extend3" DataField="Extend3" HeaderText="子网站" ColumnID="Extend3" Width="100px" Hidden="true"/> |
||||
|
<f:BoundField SortField="AskQty" DataField="AskQty" HeaderText="要货数量" ColumnID="AskQty" Width="70px" Hidden="true" DataFormatString = "{0:F}"/> |
||||
|
<f:BoundField SortField="ReduceQty" Hidden="true" DataField="ReduceQty" HeaderText="减产数量" ColumnID="ReduceQty" Width="70px" DataFormatString = "{0:F}"/> |
||||
|
<f:BoundField SortField="ShipQty" DataField="ShippedQty" HeaderText="发货数量" ColumnID="ShippedQty" Width="70px" Hidden="true" /> |
||||
|
<f:BoundField SortField="ReceiveQty" DataField="ReceiveQty" HeaderText="收货数量" ColumnID="ReceiveQty" Width="70px" Hidden="true" /> |
||||
|
<f:BoundField SortField="Price" DataField="Price" HeaderText="价格" ColumnID="Price" Width="50px" Hidden="true" /> |
||||
|
<f:BoundField SortField="CurrencyDesc" DataField="CurrencyDesc" HeaderText="币种" ColumnID="CurrencyDesc" Width="40px" Hidden="true" /> |
||||
|
<f:BoundField SortField="UpdateInfo" DataField="UpdateInfo" HeaderText="备注" Hidden="true" /> |
||||
|
<f:BoundField SortField="ReceivedPort" DataField="ReceivedPort" HeaderText="收货口" ColumnID="ReceivedPort" Hidden="true" /> |
||||
|
|
||||
|
</Columns> |
||||
|
<Listeners> |
||||
|
<f:Listener Event="afteredit" Handler="f_onAfterEdit" /> |
||||
|
</Listeners> |
||||
|
</f:Grid> |
||||
|
</Items> |
||||
|
</f:Panel> |
||||
|
<f:Window runat="server" ID="Window1" Hidden="True" |
||||
|
WindowPosition="Center" IsModal="true" Title="Popup Window 1" Target="Parent" EnableIFrame="true" |
||||
|
IFrameUrl="about:blank" Height="640px" Width="700px" /> |
||||
|
<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:HiddenField runat="server" ID ="TXT_State"></f:HiddenField> |
||||
|
</form> |
||||
|
<script> |
||||
|
//function onGridAfterEdit(event, value, params) { |
||||
|
// var me = this, columnId = params.columnId, rowId = params.rowId; |
||||
|
// alert("me:" + me) |
||||
|
// alert("columnId:" + columnId); |
||||
|
// alert("rowValue:" + value.value); |
||||
|
// alert("params:" + rowId); |
||||
|
// if (columnId == undefined) { |
||||
|
// alert("22:"); |
||||
|
// //var chineseScore = me.getCellValue(rowId, 'ProduceDate'); |
||||
|
// //alert("chineseScore:"+chineseScore); |
||||
|
// me.updateCellValue('1', 'Batch1', "180712"); |
||||
|
|
||||
|
// } |
||||
|
//} |
||||
|
function f_onAfterEdit(event, value, params) |
||||
|
{ |
||||
|
alert("11:"); |
||||
|
var me = this, rowId = params.rowId; |
||||
|
if (params.columnId === 'ProduceDate') { |
||||
|
|
||||
|
me.updateCellValue(rowId, 'Batch1', value); |
||||
|
} |
||||
|
alert("33:"); |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
</body> |
||||
|
</html> |
@ -0,0 +1,491 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
|
using System.Linq.Expressions; |
||||
|
using System.Web; |
||||
|
using System.Web.UI; |
||||
|
using System.Web.UI.WebControls; |
||||
|
using CK.SCP.Models; |
||||
|
using CK.SCP.Models.ScpEntity; |
||||
|
using CK.SCP.Utils; |
||||
|
using CK.SCP.Controller; |
||||
|
using FineUI; |
||||
|
using SCP.Code; |
||||
|
using CK.SCP.Models.Enums; |
||||
|
|
||||
|
namespace SCP.SupplierData.SupplierLogistics |
||||
|
{ |
||||
|
public partial class SCP_ASN_CREATE : PageBase |
||||
|
{ |
||||
|
|
||||
|
protected void Page_Load(object sender, EventArgs e) |
||||
|
{ |
||||
|
if (!IsPostBack) |
||||
|
{ |
||||
|
|
||||
|
GetV_TB_POData(); |
||||
|
if (Request.QueryString["State"] != null) |
||||
|
{ |
||||
|
if (Request.QueryString["State"] == "1") |
||||
|
{ |
||||
|
BindDetail(true); |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
BindDetail(); |
||||
|
} |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
BindDetail(); |
||||
|
} |
||||
|
SetRoleRule(); |
||||
|
TranslatorAgents(Toolbar1); |
||||
|
TranslatorAgent(Grid_V_TB_ASK_DETAIL); |
||||
|
TranslatorAgents(FormRow_1); |
||||
|
TranslatorAgents(FormRow_2); |
||||
|
TranslatorAgents(FormRow_3); |
||||
|
} |
||||
|
} |
||||
|
private void SetRoleRule() |
||||
|
{ |
||||
|
IsPriceVisible(Grid_V_TB_ASK_DETAIL, "价格"); |
||||
|
|
||||
|
} |
||||
|
public void SearchV_TB_ASK_DETAILData(Action<IQueryable<V_TB_ASK_DETAIL>> p_action) |
||||
|
{ |
||||
|
V_TB_ASK_DETAIL _entity = new V_TB_ASK_DETAIL(); |
||||
|
_entity.AskBillNum = Request["AskBillNum"]; |
||||
|
SCP_ASK_CONTROLLER.Get_V_TB_ASK_DETAIL_List(_entity, (_ret) => { |
||||
|
if (_ret.State == ReturnStatus.Succeed) |
||||
|
{ |
||||
|
p_action(_ret.Result); |
||||
|
} |
||||
|
}); |
||||
|
} |
||||
|
public void GetV_TB_POData() |
||||
|
{ |
||||
|
V_TB_ASK _entity = new V_TB_ASK(); |
||||
|
_entity.AskBillNum = Request["AskBillNum"]; |
||||
|
_entity.UserInAddress = CurrentUser.FactoryList; |
||||
|
_entity.UserInVendIds = CurrentUser.VenderList; |
||||
|
SCP_ASK_CONTROLLER.Get_V_TB_ASK_List(_entity, (_ret) => |
||||
|
{ |
||||
|
if (_ret.State == ReturnStatus.Succeed) |
||||
|
{ |
||||
|
var _result = _ret.Result.FirstOrDefault(); |
||||
|
Session["Ask"] = _result; |
||||
|
this.TXT_AskBillNum.Text = _result.AskBillNum; |
||||
|
this.TXT_State.Text = _result.State.ToString(); |
||||
|
this.TXT_Site.Text = _result.Site_Desc; |
||||
|
this.TXT_State_Desc.Text = _result.State_DESC; |
||||
|
this.TXT_VendName.Text = _result.VendName; |
||||
|
this.TXT_Remark.Text = _result.Remark; |
||||
|
this.TXT_SubSite.Text = _result.SubSite; |
||||
|
this.TXT_Extend1.Text = _result.Extend1; |
||||
|
this.TXT_Extend2.Text = _result.Extend2; |
||||
|
this.TXT_Extend3.Text = _result.Extend3; |
||||
|
DP_ShipTime.SelectedDate = DateTime.Now; |
||||
|
DDL_PORT.DataSource = ScpCache.PortList.Where(p => CurrentUser.FactoryList.Contains(p.FACTORY_ID)); |
||||
|
DDL_PORT.DataBind(); |
||||
|
DDL_PORT.SelectedValue = _result.ReceivedPort; |
||||
|
|
||||
|
#region 按钮控制
|
||||
|
|
||||
|
|
||||
|
#endregion
|
||||
|
} |
||||
|
}); |
||||
|
} |
||||
|
public void BindDetail(bool p_state=false) |
||||
|
{ |
||||
|
|
||||
|
|
||||
|
SearchV_TB_ASK_DETAILData((ret) => { |
||||
|
Grid_V_TB_ASK_DETAIL.RecordCount = ret.Count(); |
||||
|
var list = SortAndPage<V_TB_ASK_DETAIL>(ret, Grid_V_TB_ASK_DETAIL); |
||||
|
var _ls = SCP_ASK_CONTROLLER.Get_CAN_SHIPQTY(list.ToList()); |
||||
|
var _notifyList = new List<string>(); |
||||
|
_ls.ForEach(p => |
||||
|
{ |
||||
|
if (p.PackQty == 1 || p.PackQty == 0) |
||||
|
{ |
||||
|
_notifyList.Add(string.Format("请注意零件编号{0}行号{1}标包数为1是否填写正确,如果不正确请修改", p.PartCode, p.PoLine)); |
||||
|
|
||||
|
} |
||||
|
|
||||
|
p.Batch = DateTime.Now.ToString("yyMMdd"); |
||||
|
p.ProduceDate = DateTime.Now; |
||||
|
if (p_state == true) |
||||
|
{ |
||||
|
p.TempQty = p.CanQty; |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
p.TempQty = 0; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
); |
||||
|
|
||||
|
Grid_V_TB_ASK_DETAIL.DataSource = _ls; |
||||
|
Grid_V_TB_ASK_DETAIL.DataBind(); |
||||
|
if (_notifyList.Count > 0) |
||||
|
{ |
||||
|
Alert.Show(string.Join("<br>", _notifyList)); |
||||
|
|
||||
|
} |
||||
|
|
||||
|
}); |
||||
|
|
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
private void IsBatch(string batch) |
||||
|
{ |
||||
|
try |
||||
|
{ |
||||
|
batch = batch.Trim(); |
||||
|
if (batch.Length != 6) |
||||
|
{ |
||||
|
Alert.Show($"批次号【{batch}】必需是6位,格式为 YYMMDD"); |
||||
|
} |
||||
|
|
||||
|
int y = Convert.ToInt32(batch.Substring(0, 2)); |
||||
|
int m = Convert.ToInt32(batch.Substring(2, 2)); |
||||
|
int d = Convert.ToInt32(batch.Substring(4, 2)); |
||||
|
|
||||
|
var date = new DateTime(y, m, d); |
||||
|
if (date.Date > DateTime.Now.Date) |
||||
|
{ |
||||
|
Alert.Show($"批次号【{batch}】错误,不应大于发货日期"); |
||||
|
} |
||||
|
} |
||||
|
catch |
||||
|
{ |
||||
|
Alert.Show($"批次号【{batch}】错误,批次必需是 YYMMDD "); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
} |
||||
|
List<V_TB_ASK_DETAIL> _askDetaillist = new List<V_TB_ASK_DETAIL>(); |
||||
|
protected void btnCreate_Click(object sender, EventArgs e) |
||||
|
{ |
||||
|
if (string.IsNullOrEmpty(TXT_AskBillNum.Text) || string.IsNullOrEmpty(TXT_ShipUser.Text) || DP_ReceiveTime.SelectedDate==null || DP_ShipTime.SelectedDate==null) |
||||
|
{ |
||||
|
|
||||
|
PageContext.RegisterStartupScript(Alert.GetShowInTopReference("要货看板单据编号、发货人、到货时间、收货时间不能为空")); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
var _model=Session["Ask"] as V_TB_ASK; |
||||
|
|
||||
|
if (_model == null) |
||||
|
{ |
||||
|
PageContext.RegisterStartupScript(Alert.GetShowInTopReference("编辑的数据不正确")); |
||||
|
return; |
||||
|
} |
||||
|
if (_model.State != (int)AskState.Confirm && _model.State != (int)AskState.Receive && _model.State != (int)AskState.Ship) |
||||
|
{ |
||||
|
Alert.Show("要货看板必须为确认后状态"); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
Dictionary<int, Dictionary<string, object>> modifiedDict = Grid_V_TB_ASK_DETAIL.GetModifiedDict(); |
||||
|
|
||||
|
for (int i = 0, count = Grid_V_TB_ASK_DETAIL.Rows.Count; i < count; i++) |
||||
|
{ |
||||
|
|
||||
|
V_TB_ASK_DETAIL _entity = new V_TB_ASK_DETAIL(); |
||||
|
object[] rowDataKeys = Grid_V_TB_ASK_DETAIL.DataKeys[i]; |
||||
|
_entity.UID = ConvertHelper.To<Int32>(rowDataKeys[0]); |
||||
|
_entity.PoBillNum = rowDataKeys[1] as string; |
||||
|
_entity.PoLine = ConvertHelper.To<Int32>(rowDataKeys[2]); |
||||
|
_entity.PartCode = rowDataKeys[3] as string; |
||||
|
_entity.ShippedQty = ConvertHelper.To<Decimal>(rowDataKeys[4]); |
||||
|
_entity.ReceivedQty = ConvertHelper.To<Decimal>(rowDataKeys[5]); |
||||
|
_entity.BeginTime = ConvertHelper.To<DateTime>(rowDataKeys[6]); |
||||
|
_entity.EndTime = ConvertHelper.To<DateTime>(rowDataKeys[7]); |
||||
|
_entity.PoUnit = rowDataKeys[8] as string; |
||||
|
_entity.LocUnit = rowDataKeys[9] as string; |
||||
|
_entity.Price = ConvertHelper.To<Decimal>(rowDataKeys[10]); |
||||
|
_entity.Currency = rowDataKeys[11] as string; |
||||
|
_entity.PackQty = ConvertHelper.To<Decimal>(rowDataKeys[12]); |
||||
|
_entity.UnConv = ConvertHelper.To<Decimal>(rowDataKeys[13]); |
||||
|
_entity.DockCode = rowDataKeys[14] as string; |
||||
|
_entity.State = ConvertHelper.To<Int32>(rowDataKeys[15]); |
||||
|
_entity.Remark = rowDataKeys[21] as string; //把用户信息传给备注
|
||||
|
_entity.CreateTime = ConvertHelper.To<DateTime>(rowDataKeys[17]); |
||||
|
_entity.CreateUser = rowDataKeys[18] as string; |
||||
|
_entity.UpdateTime = ConvertHelper.To<DateTime?>(rowDataKeys[19]); |
||||
|
_entity.UpdateUser = rowDataKeys[20] as string; |
||||
|
_entity.UpdateInfo = rowDataKeys[21] as string; |
||||
|
_entity.IsDeleted = ConvertHelper.To<Boolean>(rowDataKeys[22]); |
||||
|
_entity.PartDesc1 = rowDataKeys[23] as string; |
||||
|
_entity.CurrencyDesc = rowDataKeys[24] as string; |
||||
|
_entity.Site = rowDataKeys[25] as string; |
||||
|
_entity.VendName = rowDataKeys[26] as string; |
||||
|
_entity.PartDesc2 = rowDataKeys[27] as string; |
||||
|
_entity.AskBillNum = rowDataKeys[28] as string; |
||||
|
_entity.AskQty = ConvertHelper.To<Decimal>(rowDataKeys[29]); |
||||
|
_entity.TempQty = ConvertHelper.To<decimal>(rowDataKeys[30]); |
||||
|
_entity.ReceivedPort = rowDataKeys[31] as string; |
||||
|
_entity.ReduceQty = ConvertHelper.To<decimal>(rowDataKeys[33]); |
||||
|
_entity.ValidityDays = ConvertHelper.To<int>(rowDataKeys[34]); |
||||
|
_entity.Batch = ConvertHelper.To<string>(rowDataKeys[35]); |
||||
|
|
||||
|
_entity.ProduceDate = DateTime.Now; |
||||
|
if (Convert.ToDecimal(_entity.AskQty) == 0) |
||||
|
{ |
||||
|
PageContext.RegisterStartupScript(Alert.GetShowInTopReference("要货看板数量不能为 0")); |
||||
|
return; |
||||
|
} |
||||
|
if (modifiedDict.Keys.Contains(i)) |
||||
|
{ |
||||
|
var modifyValue = modifiedDict[i]; |
||||
|
var _Qty1 = modifyValue.Keys.Contains("TempQty") ? modifyValue["TempQty"] : _entity.TempQty; |
||||
|
var _Batch1 = modifyValue.Keys.Contains("Batch") ? modifyValue["Batch"] : _entity.Batch; |
||||
|
var _VendBatch = modifyValue.Keys.Contains("VendBatch") ? modifyValue["VendBatch"].ToString() : _entity.Batch; |
||||
|
var _ProduceDate = modifyValue.Keys.Contains("ProduceDate") ? modifyValue["ProduceDate"].ToString() : _entity.ProduceDate.ToString(); |
||||
|
if (modifyValue.Keys.Contains("SubSite")) |
||||
|
{ |
||||
|
_entity.SubSite = modifyValue["SubSite"].ToString(); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
if (modifyValue.Keys.Contains("Extend1")) |
||||
|
{ |
||||
|
_entity.Extend1 = modifyValue["Extend1"].ToString(); |
||||
|
} |
||||
|
|
||||
|
if (modifyValue.Keys.Contains("Extend2")) |
||||
|
{ |
||||
|
_entity.Extend2 = modifyValue["Extend2"].ToString(); |
||||
|
} |
||||
|
|
||||
|
if (modifyValue.Keys.Contains("Extend3")) |
||||
|
{ |
||||
|
_entity.Extend3 = modifyValue["Extend3"].ToString(); |
||||
|
} |
||||
|
|
||||
|
if (string.IsNullOrEmpty(_VendBatch) || string.IsNullOrEmpty(_ProduceDate)) |
||||
|
{ |
||||
|
Alert.Show("供应商批次和生产日期不能为空!"); |
||||
|
return; |
||||
|
} |
||||
|
object _PackQty = 0; |
||||
|
if (modifyValue.Keys.Contains("PackQty")) |
||||
|
{ |
||||
|
_PackQty = modifyValue["PackQty"]; |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
_PackQty = _entity.PackQty; |
||||
|
} |
||||
|
decimal QtyAll = 0; |
||||
|
if (ConvertHelper.To<decimal>(_Qty1) > 0) |
||||
|
{ |
||||
|
V_TB_ASK_DETAIL _detail = ConvertHelper.GetObjectClone<V_TB_ASK_DETAIL>(_entity); |
||||
|
var number = ConvertHelper.To<decimal>(_Qty1); |
||||
|
QtyAll += number; |
||||
|
if (QtyAll > 0) |
||||
|
{ |
||||
|
DateTime _d = DateTime.Now; |
||||
|
if (_ProduceDate == null && DateTime.TryParse(_ProduceDate.ToString(), out _d) == false) |
||||
|
{ |
||||
|
Alert.Show("日期填写错误!"); |
||||
|
return; |
||||
|
} |
||||
|
DateTime dt = DateTime.Parse(_ProduceDate.ToString()); |
||||
|
_detail.Batch = _Batch1.ToString().Trim(); |
||||
|
_detail.TempQty = number; |
||||
|
_detail.PackQty = ConvertHelper.To<decimal>(_PackQty); |
||||
|
_detail.VendBatch = _VendBatch.ToString(); |
||||
|
_detail.ProduceDate = dt; |
||||
|
_askDetaillist.Add(_detail); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
if (modifyValue.Keys.Contains("Qty2") && modifyValue.Keys.Contains("Batch2")) |
||||
|
{ |
||||
|
var _Qty2 = modifyValue["Qty2"]; |
||||
|
var _Batch2 = modifyValue["Batch2"]; |
||||
|
|
||||
|
if (_Batch2.ToString().Trim() != "" && ConvertHelper.To<decimal>(_Qty2) > 0) |
||||
|
{ |
||||
|
V_TB_ASK_DETAIL _detail = ConvertHelper.GetObjectClone<V_TB_ASK_DETAIL>(_entity); |
||||
|
IsBatch(_Batch2.ToString().Trim()); |
||||
|
var number = ConvertHelper.To<decimal>(_Qty2); |
||||
|
QtyAll += number; |
||||
|
if (QtyAll > 0) |
||||
|
{ |
||||
|
_detail.Batch = _Batch2.ToString().Trim(); |
||||
|
_detail.TempQty = number; |
||||
|
_detail.PackQty = ConvertHelper.To<decimal>(_PackQty); |
||||
|
_detail.VendBatch = _VendBatch.ToString(); |
||||
|
_detail.ProduceDate = DateTime.Parse(_ProduceDate.ToString()); |
||||
|
_askDetaillist.Add(_detail); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
if (modifyValue.Keys.Contains("Qty3") && modifyValue.Keys.Contains("Batch3")) |
||||
|
{ |
||||
|
var _Qty3 = modifyValue["Qty3"]; |
||||
|
var _Batch3 = modifyValue["Batch3"]; |
||||
|
if (_Batch3.ToString().Trim() != "" && ConvertHelper.To<decimal>(_Qty3) > 0) |
||||
|
{ |
||||
|
V_TB_ASK_DETAIL _detail = ConvertHelper.GetObjectClone<V_TB_ASK_DETAIL>(_entity); |
||||
|
IsBatch(_Batch3.ToString().Trim()); |
||||
|
var number = ConvertHelper.To<decimal>(_Qty3); |
||||
|
QtyAll += number; |
||||
|
if (QtyAll > 0) |
||||
|
{ |
||||
|
_detail.Batch = _Batch3.ToString().Trim(); |
||||
|
_detail.TempQty = number; |
||||
|
_detail.PackQty = ConvertHelper.To<decimal>(_PackQty); |
||||
|
_detail.VendBatch = _VendBatch.ToString(); |
||||
|
_detail.ProduceDate = DateTime.Parse(_ProduceDate.ToString()); |
||||
|
_askDetaillist.Add(_detail); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
if (QtyAll > _entity.AskQty - _entity.ShippedQty - _entity.ReduceQty) |
||||
|
{ |
||||
|
PageContext.RegisterStartupScript(Alert.GetShowInTopReference(_entity.PartCode + "发货数量>可发数量-减产数量")); |
||||
|
return; |
||||
|
} |
||||
|
_entity.ShippedQty = _entity.ShippedQty + QtyAll; |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
if (_entity.TempQty > 0) |
||||
|
{ |
||||
|
V_TB_ASK_DETAIL _detail = ConvertHelper.GetObjectClone<V_TB_ASK_DETAIL>(_entity); |
||||
|
_entity.Batch = DateTime.Now.ToString("yyMMdd"); |
||||
|
_entity.VendBatch = DateTime.Now.ToString("yyMMdd"); |
||||
|
_entity.ShippedQty = _entity.TempQty; |
||||
|
_entity.ProduceDate = DateTime.Now; |
||||
|
_entity.PackQty = _entity.PackQty; |
||||
|
_askDetaillist.Add(_detail); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
_model.ShipTime = DP_ShipTime.SelectedDate; |
||||
|
_model.ShipUser = TXT_ShipUser.Text; |
||||
|
_model.ReceiveTime = DP_ReceiveTime.SelectedDate; |
||||
|
_model.ReceiveUser = _model.Buyer; |
||||
|
List<string> _ls = new List<string>(); |
||||
|
if (_askDetaillist.Count == 0) |
||||
|
{ |
||||
|
Alert.Show("发货数量未填写"); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
if (CurrentUser.FactoryList.Count > 0) |
||||
|
{ |
||||
|
if (CurrentUser.FactoryList.FirstOrDefault()== "CNS" || CurrentUser.FactoryList.FirstOrDefault() == "BJCIAI") |
||||
|
{ |
||||
|
_askDetaillist.ForEach(p => |
||||
|
{ |
||||
|
p.VendBatch = p.Batch; |
||||
|
|
||||
|
}); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
var ret=SCP_ASK_CONTROLLER.Save_ASK_TO_ASN(_model, _askDetaillist, TXT_PlateNumber.Text, CurrentUser.ChineseName ,CurrentUser.CellPhone); |
||||
|
if (ret.State == ReturnStatus.Succeed) |
||||
|
{ |
||||
|
Alert.Show("生成发货单成功!"); |
||||
|
GetV_TB_POData(); |
||||
|
BindDetail(); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
private string GetBatch(DateTime dt) |
||||
|
{ |
||||
|
string strResult = ""; |
||||
|
|
||||
|
if (dt != null) |
||||
|
{ |
||||
|
string strYear = dt.Year.ToString().Substring(2, 2); |
||||
|
string strMonth = ""; |
||||
|
int iMonth = dt.Month; |
||||
|
|
||||
|
if (iMonth.ToString().Length == 1) |
||||
|
{ |
||||
|
strMonth = "0" + iMonth.ToString(); |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
strMonth = iMonth.ToString(); |
||||
|
} |
||||
|
string strDay = dt.Day.ToString(); |
||||
|
if (strDay.Length == 1) |
||||
|
{ |
||||
|
strDay = "0" + strDay; |
||||
|
} |
||||
|
|
||||
|
strResult = strYear + strMonth + strDay; |
||||
|
} |
||||
|
|
||||
|
return strResult; |
||||
|
} |
||||
|
protected void Grid_V_TB_ASK_DETAIL_PageIndexChange(object sender, GridPageEventArgs e) |
||||
|
{ |
||||
|
BindDetail(); |
||||
|
} |
||||
|
|
||||
|
protected void ddlGridPageSize_SelectedIndexChanged(object sender, EventArgs e) |
||||
|
{ |
||||
|
Grid_V_TB_ASK_DETAIL.PageSize = Convert.ToInt32(ddlGridPageSize.SelectedValue); |
||||
|
BindDetail(); |
||||
|
} |
||||
|
|
||||
|
protected void Grid_V_TB_ASK_DETAIL_RowDataBound(object sender, GridRowEventArgs e) |
||||
|
{ |
||||
|
|
||||
|
//GridRow row = Grid_V_TB_ASK_DETAIL.Rows[e.RowIndex];
|
||||
|
//object[] rowDataKeys = Grid_V_TB_ASK_DETAIL.DataKeys[e.RowIndex];
|
||||
|
|
||||
|
////var TXT_PackQty = (NumberBox)row.FindControl("TXT_PackQty");
|
||||
|
////var txtBatch1 = (System.Web.UI.WebControls.TextBox)row.FindControl("txtBatch1");
|
||||
|
////var txtBatch2 = (System.Web.UI.WebControls.TextBox)row.FindControl("txtBatch2");
|
||||
|
////var txtBatch3 = (System.Web.UI.WebControls.TextBox)row.FindControl("txtBatch3");
|
||||
|
////var txtQty1 = (System.Web.UI.WebControls.TextBox)row.FindControl("txtQty1");
|
||||
|
////var txtQty2 = (System.Web.UI.WebControls.TextBox)row.FindControl("txtQty2");
|
||||
|
////var txtQty3 = (System.Web.UI.WebControls.TextBox)row.FindControl("txtQty3");
|
||||
|
//var _shippedQty = ConvertHelper.To<Decimal>(rowDataKeys[4]);
|
||||
|
//var _askQty = ConvertHelper.To<Decimal>(rowDataKeys[29]);
|
||||
|
//var a = row.TemplateContainers;
|
||||
|
//if (_shippedQty >= _askQty)
|
||||
|
//{
|
||||
|
|
||||
|
// //foreach (GridColumn column in Grid_V_TB_ASK_DETAIL.Columns)
|
||||
|
// //{
|
||||
|
// // e
|
||||
|
// // e.CellCssClasses[column.ColumnIndex] = "f-grid-cell-uneditable";
|
||||
|
// //}
|
||||
|
//}
|
||||
|
//else
|
||||
|
//{
|
||||
|
// //txtQty1.Text = "0";
|
||||
|
|
||||
|
// //txtBatch1.Text = DateTime.Now.ToString("yyMMdd");
|
||||
|
//}
|
||||
|
} |
||||
|
|
||||
|
protected void btnAll_Click(object sender, EventArgs e) |
||||
|
{ |
||||
|
BindDetail(true); |
||||
|
} |
||||
|
|
||||
|
//protected void btnSet_Click(object sender, EventArgs e)
|
||||
|
//{
|
||||
|
|
||||
|
//}
|
||||
|
} |
||||
|
} |
@ -0,0 +1,359 @@ |
|||||
|
//------------------------------------------------------------------------------
|
||||
|
// <自动生成>
|
||||
|
// 此代码由工具生成。
|
||||
|
//
|
||||
|
// 对此文件的更改可能导致不正确的行为,如果
|
||||
|
// 重新生成代码,则所做更改将丢失。
|
||||
|
// </自动生成>
|
||||
|
//------------------------------------------------------------------------------
|
||||
|
|
||||
|
namespace SCP.SupplierData.SupplierLogistics |
||||
|
{ |
||||
|
|
||||
|
|
||||
|
public partial class SCP_ASN_CREATE |
||||
|
{ |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// form1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::System.Web.UI.HtmlControls.HtmlForm form1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// pmg1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.PageManager pmg1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Panel1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Panel Panel1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Toolbar1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Toolbar Toolbar1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// btnCreate 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Button btnCreate; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// FormRow_1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.FormRow FormRow_1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TXT_State_Desc 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox TXT_State_Desc; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TXT_AskBillNum 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox TXT_AskBillNum; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TXT_VendName 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox TXT_VendName; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TXT_Site 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox TXT_Site; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TXT_SubSite 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox TXT_SubSite; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TXT_Extend1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox TXT_Extend1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TXT_Extend2 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox TXT_Extend2; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TXT_Extend3 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox TXT_Extend3; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// FormRow_2 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.FormRow FormRow_2; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TXT_PlateNumber 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox TXT_PlateNumber; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TXT_ShipUser 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox TXT_ShipUser; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// DP_ShipTime 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.DatePicker DP_ShipTime; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// DP_ReceiveTime 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.DatePicker DP_ReceiveTime; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// FormRow_3 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.FormRow FormRow_3; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// DDL_PORT 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.DropDownList DDL_PORT; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TXT_Remark 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox TXT_Remark; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Grid_V_TB_ASK_DETAIL 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Grid Grid_V_TB_ASK_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; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TXT_PackQty 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.NumberBox TXT_PackQty; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// txtBatch1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox txtBatch1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// NumberBox1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.NumberBox NumberBox1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// DatePicker1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.DatePicker DatePicker1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TextBox1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox TextBox1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// NumberBox2 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.NumberBox NumberBox2; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TextBox2 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox TextBox2; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// NumberBox4 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.NumberBox NumberBox4; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TXT_VendBatch 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox TXT_VendBatch; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Window1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Window Window1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// WindowUpload 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Window WindowUpload; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TXT_State 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.HiddenField TXT_State; |
||||
|
} |
||||
|
} |
@ -0,0 +1,183 @@ |
|||||
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SCP_ASN_DETAIL.aspx.cs" Inherits="SCP.SupplierData.SupplierLogistics.SCP_ASN_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="" AutoScroll="True"> |
||||
|
<Toolbars> |
||||
|
<f:Toolbar ID="Toolbar2" runat="server"> |
||||
|
<Items> |
||||
|
<f:Button ID="btnRefresh" runat="server" EnablePostBack="True" Text="刷新" Icon="Add" OnClientClick="location.reload();"> |
||||
|
</f:Button> |
||||
|
<f:Button ID="btnSend" runat="server" EnablePostBack="True" Text="确认已发货" Icon="Car" OnClick="btnSend_Click" OnClientClick="send();if(!confirm('是否要发货?一旦发货,就将不能删除和修改此发货单!'))return false;"> |
||||
|
</f:Button> |
||||
|
<f:Button ID="btnPrint" runat="server" EnablePostBack="true" Text="打印发货单" Icon="Printer" OnClick="btnPrint_Click"> |
||||
|
</f:Button> |
||||
|
<f:Button ID="btnPackage" runat="server" EnablePostBack="true" Text="小包裝条码" Icon="Printer" OnClick="btnPackage_Click" OnClientClick="if(!confirm('是否已经生成条码!'))return false;" /> |
||||
|
<f:Button ID="btnCancel" runat="server" EnablePostBack="true" Text="作废发货单(新建状态)" Icon="Printer" OnClick="btnCancel_Click" OnClientClick="if(!confirm('是否要作废?新建状态作废,数量批次填写错误可以作废,如果作废单据再用之前送货单发货,一律按退货处理!'))return false;"/> |
||||
|
</Items> |
||||
|
</f:Toolbar> |
||||
|
</Toolbars> |
||||
|
<Items> |
||||
|
<f:Form runat="server" Title=""> |
||||
|
<Items> |
||||
|
<f:FormRow runat="server" ColumnWidths="25% 25% 25% 25%" ID="FormRow_1"> |
||||
|
<Items> |
||||
|
|
||||
|
<f:TextBox runat = "server" Label = "单据状态" EmptyText = "" ID = "TXT_StateDesc" /> |
||||
|
<f:TextBox runat = "server" Label = "发货单号" EmptyText = "" ID = "TXT_AsnBillNum" /> |
||||
|
<f:TextBox runat = "server" Label = "供应商" EmptyText = "" ID = "TXT_VendName" /> |
||||
|
<f:TextBox runat = "server" Label = "收货地点" EmptyText = "" ID = "TXT_Site" /> |
||||
|
|
||||
|
</Items> |
||||
|
</f:FormRow> |
||||
|
<f:FormRow runat="server" ColumnWidths="25% 25% 25% 25%" ID="FormRow_2"> |
||||
|
<Items> |
||||
|
<f:DatePicker runat="server" Required ="true" DateFormatString="yyyy-MM-dd" Label="发货日期" EmptyText="请选择日期" ID="DP_ShipTime" /> |
||||
|
<f:TextBox runat = "server" Label = "发货人" EmptyText = "" ID = "TXT_ShipUser" /> |
||||
|
<f:DatePicker runat="server" Required ="true" DateFormatString="yyyy-MM-dd" Label="到货日期" EmptyText="请选择日期" ID="DP_ReceiveTime" /> |
||||
|
<f:TextBox runat = "server" Label = "收货人" EmptyText = "" ID = "TXT_ReceiveUser" /> |
||||
|
</Items> |
||||
|
</f:FormRow> |
||||
|
<f:FormRow runat="server" ID="FormRow_3"> |
||||
|
<Items> |
||||
|
<f:TextBox runat = "server" Label = "车牌号" EmptyText = "" ID = "TXT_PlateNumber" /> |
||||
|
<f:TextBox runat = "server" Label = "备注" EmptyText = "" ID = "TXT_Remark" /> |
||||
|
</Items> |
||||
|
</f:FormRow> |
||||
|
</Items> |
||||
|
</f:Form> |
||||
|
<f:Toolbar runat="server"> |
||||
|
<Items> |
||||
|
<f:Toolbar runat="server" ID="Toolbar1"> |
||||
|
<Items> |
||||
|
<%-- <f:Button runat="server" ID="btnEdit" Text="修改" Icon="ApplicationEdit" OnClick="btnEdit_Click"></f:Button> |
||||
|
<f:Button runat="server" ID="btnDel" Text="删除" Icon="ApplicationDelete" OnClick="btnDel_OnClick"></f:Button>--%> |
||||
|
<f:Button runat="server" ID="btnCreateBarCode" Text="创建条码" Icon="Printer" OnClick="CreateBarCode_Click"></f:Button> |
||||
|
<f:Button runat="server" ID="btnSelectedBarCode" Text="打印全部条码" Icon="Printer" OnClick="btnSelectedBarCode_Click"></f:Button> |
||||
|
<f:Button runat="server" ID="btnOutputPallet" Text="导出或打印托盘" Icon="Printer" OnClick="btnOutputPallet_Click"></f:Button> |
||||
|
<f:Button runat="server" ID="btnBarCodeList" Text="显示条码列表" Icon="Layers" OnClick="btnBarCodeList_Click"></f:Button> |
||||
|
<f:Button runat="server" ID="btnOutPut" Text="导出明细" Icon="PageExcel" OnClick="btnOutput_Click"></f:Button> |
||||
|
</Items> |
||||
|
</f:Toolbar> |
||||
|
</Items> |
||||
|
</f:Toolbar> |
||||
|
<f:Grid ID="Grid_V_TB_ASN_DETAIL" ShowBorder="true" ShowHeader="true" PageSize="500" BoxFlex="1" CssClass="maingrid" |
||||
|
runat="server" DataKeyNames="UID,PoBillNum,PoLine,PartCode,PoUnit,LocUnit,Price,Currency,PackQty,UnConv,DockCode,State,Remark,CreateTime,CreateUser,UpdateTime,UpdateUser,UpdateInfo,IsDeleted,PartDesc1,CurrencyDesc,Site,VendName,PartDesc2,AsnBillNum,Qty,VendBatch,ProduceDate,Batch,VendId,AskBillNum,CanQty,Guid,ReceivedPort" |
||||
|
IsDatabasePaging="True" AllowPaging="True" |
||||
|
EnableRowSelectEvent="True" AutoScroll="True" |
||||
|
SortField="PartCode" SortDirection="DESC" |
||||
|
OnPageIndexChange="Grid_V_TB_ASN_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="1000" Value="1000" /> |
||||
|
</f:DropDownList> |
||||
|
</PageItems> |
||||
|
<Columns> |
||||
|
|
||||
|
<f:BoundField Width = "80px" DataField = "AsnBillNum" DataFormatString = "{0}" HeaderText = "发货单号" /> |
||||
|
|
||||
|
<%-- <f:TemplateField HeaderText="标包数量" Width="80px"> |
||||
|
<ItemTemplate> |
||||
|
<asp:TextBox ID="TXT_PackQty" runat="server" Width="60px" onkeyup="this.value=this.value.replace(/\D/g,'')" onafterpaste="this.value=this.value.replace(/\D/g,'')" |
||||
|
Text='<%# Eval("PackQty") %>' MaxLength="6"></asp:TextBox> |
||||
|
</ItemTemplate> |
||||
|
</f:TemplateField> |
||||
|
<f:TemplateField HeaderText="发货数量" Width="80px"> |
||||
|
<ItemTemplate> |
||||
|
<asp:TextBox ID="TXT_Qty" runat="server" Width="60px" onkeyup="this.value=this.value.replace(/\D/g,'')" onafterpaste="this.value=this.value.replace(/\D/g,'')" |
||||
|
Text='<%# Eval("Qty") %>' MaxLength="6"></asp:TextBox> |
||||
|
</ItemTemplate> |
||||
|
</f:TemplateField> --%> |
||||
|
<f:BoundField Width = "100px" DataField = "PackQty" DataFormatString = "{0:F}" HeaderText = "标包数量" /> |
||||
|
<f:BoundField Width = "100px" DataField = "Qty" DataFormatString = "{0:F}" HeaderText = "发货数量" /> |
||||
|
<f:BoundField Width = "100px" DataField = "PartCode" DataFormatString = "{0}" HeaderText = "零件编号" /> |
||||
|
<f:BoundField Width = "100px" DataField = "VendPartCode" DataFormatString = "{0}" HeaderText = "供应商零件编号" /> |
||||
|
<f:BoundField Width = "100px" DataField = "PartDesc1" DataFormatString = "{0}" HeaderText = "零件名称" /> |
||||
|
|
||||
|
<f:BoundField Width = "50px" DataField = "CurrencyDesc" DataFormatString = "{0}" HeaderText = "币种" /> |
||||
|
<%--<f:BoundField Width = "100px" DataField = "Site" DataFormatString = "{0}" HeaderText = "收货地点" />--%> |
||||
|
<f:BoundField Width = "100px" DataField = "Batch" DataFormatString = "{0}" HeaderText = "批次" /> |
||||
|
<f:BoundField Width = "100px" DataField = "VendBatch" DataFormatString = "{0}" HeaderText = "供应商批次" /> |
||||
|
<f:BoundField Width = "100px" DataField = "ProduceDate" DataFormatString = "{0}" HeaderText = "生产日期" /> |
||||
|
<f:BoundField Width = "100px" DataField = "EndTime" DataFormatString = "{0}" HeaderText = "到货截至日期" /> |
||||
|
<f:BoundField Width = "50px" DataField = "PoUnit" DataFormatString = "{0}" HeaderText = "单位" /> |
||||
|
<f:BoundField Width = "80px" DataField = "Price" DataFormatString = "{0}" HeaderText = "价格" Hidden="true"/> |
||||
|
<%-- <f:TemplateField HeaderText="供应商批次" Width="110px"> |
||||
|
<ItemTemplate> |
||||
|
<asp:TextBox ID="TXT_VenBatch" runat="server" Width="100px" |
||||
|
Text='<%# Eval("VendBatch") %>' MaxLength="20"></asp:TextBox> |
||||
|
</ItemTemplate> |
||||
|
</f:TemplateField> |
||||
|
|
||||
|
|
||||
|
<f:TemplateField HeaderText="生产日期" Width="110px"> |
||||
|
<ItemTemplate> |
||||
|
<asp:TextBox ID="TXT_ProduceDate" runat="server" Width="100px" |
||||
|
Text='<%# Eval("ProduceDate") %>' MaxLength="30"></asp:TextBox> |
||||
|
</ItemTemplate> |
||||
|
</f:TemplateField>--%> |
||||
|
|
||||
|
<f:BoundField Width = "100px" DataField = "State" DataFormatString = "{0}" HeaderText = "" Hidden="true" /> |
||||
|
<f:BoundField SortField="ReceivedPort" DataField="ReceivedPort" HeaderText="收货口" ColumnID="ReceivedPort_Desc" /> |
||||
|
<f:BoundField Width = "100px" DataField = "Remark" DataFormatString = "{0}" HeaderText = "备注" /> |
||||
|
</Columns> |
||||
|
</f:Grid> |
||||
|
</Items> |
||||
|
</f:Panel> |
||||
|
<f:Window runat="server" ID="Window1" Hidden="True" |
||||
|
WindowPosition="Center" IsModal="true" Title="明细" Target="Parent" EnableIFrame="true" |
||||
|
IFrameUrl="about:blank" Height="500px" Width="1000px" /> |
||||
|
<f:Window ID="WindowUpload" runat="server" Hidden="True" |
||||
|
WindowPosition="Center" IsModal="true" Title="明细" Target="Parent" EnableIFrame="true" |
||||
|
IFrameUrl="about:blank" Height="200px" Width="400px"> |
||||
|
</f:Window> |
||||
|
</form> |
||||
|
<script> |
||||
|
var _btnSend = '<%= btnSend.ClientID %>'; |
||||
|
function update(num) { |
||||
|
var secs = 60 * 5; |
||||
|
if (num == secs) { |
||||
|
$("#"+_btnSend).val("发货"); |
||||
|
$("#"+_btnSend).attr("disabled", false); |
||||
|
} |
||||
|
else { |
||||
|
printnr = secs - num; |
||||
|
$("#" + _btnSend).val("发货中" + printnr + "秒"); |
||||
|
$("#" + _btnSend).attr("disabled", true); |
||||
|
} |
||||
|
alert('3434'); |
||||
|
} |
||||
|
function send() |
||||
|
{ |
||||
|
|
||||
|
for (i = 1; i <= 60 * 5; i++) { |
||||
|
window.setTimeout("update( " + i + ") ", i * 1000); |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
||||
|
|
||||
|
</script> |
||||
|
|
||||
|
|
||||
|
</body> |
||||
|
</html> |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
@ -0,0 +1,540 @@ |
|||||
|
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.Controller; |
||||
|
using System.Data; |
||||
|
using CK.SCP.Models.Enums; |
||||
|
using FineUI; |
||||
|
using CK.SCP.Utils; |
||||
|
using System.Data.Entity.Migrations; |
||||
|
|
||||
|
namespace SCP.SupplierData.SupplierLogistics |
||||
|
{ |
||||
|
public partial class SCP_ASN_DETAIL : PageBase |
||||
|
{ |
||||
|
|
||||
|
protected void Page_Load(object sender, EventArgs e) |
||||
|
{ |
||||
|
if (!IsPostBack) |
||||
|
{ |
||||
|
GetV_TB_ASNData(); |
||||
|
BindDetail(); |
||||
|
SetRoleRule(); |
||||
|
TranslatorAgents(Toolbar2); |
||||
|
TranslatorAgents(Toolbar1); |
||||
|
TranslatorAgent(Grid_V_TB_ASN_DETAIL); |
||||
|
TranslatorAgents(FormRow_1); |
||||
|
TranslatorAgents(FormRow_2); |
||||
|
TranslatorAgents(FormRow_3); |
||||
|
} |
||||
|
} |
||||
|
private void SetRoleRule() |
||||
|
{ |
||||
|
IsPriceVisible(Grid_V_TB_ASN_DETAIL, "价格"); |
||||
|
} |
||||
|
|
||||
|
public void SearchV_TB_ASN_DETAILData(Action<IQueryable<V_TB_ASN_DETAIL>> p_action) |
||||
|
{ |
||||
|
V_TB_ASN_DETAIL _entity = new V_TB_ASN_DETAIL(); |
||||
|
_entity.AsnBillNum= Request["AsnBillNum"]; |
||||
|
SCP_ASN_CONTROLLER.Get_V_TB_ASN_DETAIL_List(_entity, (_ret) => |
||||
|
{ |
||||
|
if (_ret.State == ReturnStatus.Succeed) |
||||
|
{ |
||||
|
p_action(_ret.Result); |
||||
|
} |
||||
|
}); |
||||
|
|
||||
|
} |
||||
|
public void GetV_TB_ASNData() |
||||
|
{ |
||||
|
V_TB_ASN _entity = new V_TB_ASN(); |
||||
|
_entity.AsnBillNum = Request["AsnBillNum"]; |
||||
|
_entity.UserInVendIds = CurrentUser.VenderList; |
||||
|
_entity.UserInAddress= CurrentUser.FactoryList; |
||||
|
SCP_ASN_CONTROLLER.Get_V_TB_ASN_List(_entity, (_ret) => |
||||
|
{ |
||||
|
if (_ret.State == ReturnStatus.Succeed) |
||||
|
{ |
||||
|
var _result = _ret.Result.FirstOrDefault(); |
||||
|
Session["Asn"] = _result; |
||||
|
TXT_AsnBillNum.Text = _result.AsnBillNum; |
||||
|
TXT_PlateNumber.Text = _result.PlateNumber; |
||||
|
TXT_ReceiveUser.Text = _result.ReceiveUser; |
||||
|
TXT_ShipUser.Text = _result.ShipUser; |
||||
|
TXT_Site.Text = _result.Site_Desc; |
||||
|
TXT_Remark.Text = _result.Remark; |
||||
|
TXT_VendName.Text = _result.VendName; |
||||
|
DP_ReceiveTime.SelectedDate = _result.ReceiveTime; |
||||
|
DP_ShipTime.SelectedDate = _result.ShipTime; |
||||
|
TXT_StateDesc.Text = _result.State_DESC; |
||||
|
} |
||||
|
SCP_BARCODE_CONTROLLER.Get_TS_BARCODE_List(new TS_BARCODE() { BillNum = TXT_AsnBillNum.Text.Trim() }, retobj => |
||||
|
{ |
||||
|
if (retobj.State == ReturnStatus.Succeed) |
||||
|
{ |
||||
|
if (retobj.Result.Count() > 0) |
||||
|
{ |
||||
|
this.btnCreateBarCode.Enabled = false; |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
this.btnCreateBarCode.Enabled = true; |
||||
|
} |
||||
|
} |
||||
|
}); |
||||
|
}); |
||||
|
} |
||||
|
public void BindDetail() |
||||
|
{ |
||||
|
SearchV_TB_ASN_DETAILData((ret) => |
||||
|
{ |
||||
|
Grid_V_TB_ASN_DETAIL.RecordCount = ret.Count(); |
||||
|
var list = SortAndPage<V_TB_ASN_DETAIL>(ret, Grid_V_TB_ASN_DETAIL); |
||||
|
Grid_V_TB_ASN_DETAIL.DataSource = list; |
||||
|
Grid_V_TB_ASN_DETAIL.DataBind(); |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
protected void btnOutput_Click(object sender, EventArgs e) |
||||
|
{ |
||||
|
List<V_TB_ASN_DETAIL> _ls = new List<V_TB_ASN_DETAIL>(); |
||||
|
for (int i = 0, count = Grid_V_TB_ASN_DETAIL.Rows.Count; i < count; i++) |
||||
|
{ |
||||
|
V_TB_ASN_DETAIL inv = new V_TB_ASN_DETAIL(); |
||||
|
object[] rowDataKeys = Grid_V_TB_ASN_DETAIL.DataKeys[i]; |
||||
|
|
||||
|
if (rowDataKeys[24] != null) |
||||
|
{ |
||||
|
inv.AsnBillNum = rowDataKeys[24].ToString();//发货单号
|
||||
|
} |
||||
|
if (rowDataKeys[8] != null) |
||||
|
{ |
||||
|
inv.PackQty = decimal.Parse(rowDataKeys[8].ToString());//标包数量
|
||||
|
} |
||||
|
if (rowDataKeys[25] != null) |
||||
|
{ |
||||
|
inv.Qty = decimal.Parse(rowDataKeys[25].ToString());//发货数量
|
||||
|
} |
||||
|
inv.PartCode = rowDataKeys[3].ToString();//零件编号
|
||||
|
if (rowDataKeys[19] != null) |
||||
|
{ |
||||
|
inv.PartDesc1 = rowDataKeys[19].ToString();//零件名称
|
||||
|
} |
||||
|
if (rowDataKeys[20] != null) |
||||
|
{ |
||||
|
inv.CurrencyDesc = rowDataKeys[20].ToString();//货种
|
||||
|
} |
||||
|
if (rowDataKeys[28] != null) |
||||
|
{ |
||||
|
inv.Batch = rowDataKeys[28].ToString();//批次
|
||||
|
} |
||||
|
if (rowDataKeys[26] != null) |
||||
|
{ |
||||
|
inv.VendBatch = rowDataKeys[26].ToString();//供应商批次
|
||||
|
} |
||||
|
if (rowDataKeys[27] != null) |
||||
|
{ |
||||
|
inv.ProduceDate = DateTime.Parse(rowDataKeys[27].ToString());//生产日期
|
||||
|
} |
||||
|
//if (rowDataKeys[26] != null)
|
||||
|
//{
|
||||
|
// inv.EndTime = DateTime.Parse(rowDataKeys[34].ToString());//到货截至日期
|
||||
|
//}
|
||||
|
inv.PoUnit = rowDataKeys[4].ToString();//采购单位
|
||||
|
// if (rowDataKeys[6] != null)
|
||||
|
// {
|
||||
|
// inv.Price = decimal.Parse(rowDataKeys[6].ToString());//价格
|
||||
|
// }
|
||||
|
// if (rowDataKeys[34] != null)
|
||||
|
//{
|
||||
|
// inv.ReceivedPort_Desc = rowDataKeys[34].ToString();//收货口
|
||||
|
//}
|
||||
|
_ls.Add(inv); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
Dictionary<string, string> cellheader = new Dictionary<string, string> |
||||
|
{ |
||||
|
{ "AsnBillNum", "发货单号" }, |
||||
|
{ "PackQty", "标包数量" }, |
||||
|
{ "Qty", "发货数量" }, |
||||
|
{ "PartCode", "零件编号" }, |
||||
|
{ "PartDesc1", "零件名称" }, |
||||
|
{ "Batch", "批次" }, |
||||
|
{ "VendBatch", "供应商批次" }, |
||||
|
{ "ProduceDate", "生产日期" }, |
||||
|
{ "EndTime", "到货截至日期" }, |
||||
|
{ "PoUnit", "单位" } |
||||
|
}; |
||||
|
|
||||
|
string url = EntityListToExcel2003(cellheader, _ls, "发货明细"); |
||||
|
} |
||||
|
|
||||
|
protected void btnCreate_Click(object sender, EventArgs e) |
||||
|
{ |
||||
|
|
||||
|
|
||||
|
BindDetail(); |
||||
|
} |
||||
|
|
||||
|
protected void btnEdit_Click(object sender, EventArgs e) |
||||
|
{ |
||||
|
var _asn=Session["Asn"] as V_TB_ASN; |
||||
|
if (_asn == null) |
||||
|
{ |
||||
|
Alert.Show("发货订单信息不能为空!"); |
||||
|
} |
||||
|
List<V_TB_ASN_DETAIL> _list = new List<V_TB_ASN_DETAIL>(); |
||||
|
for (int i = 0, count = Grid_V_TB_ASN_DETAIL.Rows.Count; i < count; i++) |
||||
|
{ |
||||
|
GridRow row = Grid_V_TB_ASN_DETAIL.Rows[i]; |
||||
|
V_TB_ASN_DETAIL _entity = new V_TB_ASN_DETAIL(); |
||||
|
object[] rowDataKeys = Grid_V_TB_ASN_DETAIL.DataKeys[i]; |
||||
|
_entity.UID = ConvertHelper.To<Int32>(rowDataKeys[0]); |
||||
|
_entity.PoBillNum = rowDataKeys[1] as string; |
||||
|
_entity.PoLine = ConvertHelper.To<Int32>(rowDataKeys[2]); |
||||
|
_entity.PartCode = rowDataKeys[3] as string; |
||||
|
_entity.PoUnit = rowDataKeys[4] as string; |
||||
|
_entity.LocUnit = rowDataKeys[5] as string; |
||||
|
_entity.Price = ConvertHelper.To<Decimal>(rowDataKeys[6]); |
||||
|
_entity.Currency = rowDataKeys[7] as string; |
||||
|
_entity.PackQty = ConvertHelper.To<Decimal>(rowDataKeys[8]); |
||||
|
_entity.UnConv = ConvertHelper.To<Decimal>(rowDataKeys[9]); |
||||
|
_entity.DockCode = rowDataKeys[10] as string; |
||||
|
_entity.State = ConvertHelper.To<int?>(rowDataKeys[11]); |
||||
|
_entity.Remark = rowDataKeys[12] as string; |
||||
|
_entity.CreateTime = ConvertHelper.To<DateTime>(rowDataKeys[13]); |
||||
|
_entity.CreateUser = rowDataKeys[14] as string; |
||||
|
_entity.UpdateTime = ConvertHelper.To<DateTime>(rowDataKeys[15]); |
||||
|
_entity.UpdateUser = rowDataKeys[16] as string; |
||||
|
_entity.UpdateInfo = rowDataKeys[17] as string; |
||||
|
_entity.IsDeleted = ConvertHelper.To<Boolean>(rowDataKeys[18]); |
||||
|
_entity.PartDesc1 = rowDataKeys[19] as string; |
||||
|
_entity.CurrencyDesc = rowDataKeys[20] as string; |
||||
|
_entity.Site = rowDataKeys[21] as string; |
||||
|
_entity.VendName = rowDataKeys[22] as string; |
||||
|
_entity.PartDesc2 = rowDataKeys[23] as string; |
||||
|
_entity.AsnBillNum = rowDataKeys[24] as string; |
||||
|
_entity.Qty = ConvertHelper.To<Decimal>(rowDataKeys[25]); |
||||
|
_entity.VendBatch = rowDataKeys[26] as string; |
||||
|
_entity.Batch = rowDataKeys[28] as string; |
||||
|
_entity.VendId = rowDataKeys[29] as string; |
||||
|
System.Web.UI.WebControls.TextBox TXT_VenBatch = (System.Web.UI.WebControls.TextBox)row.FindControl("TXT_VenBatch"); |
||||
|
System.Web.UI.WebControls.TextBox TXT_PackQty = (System.Web.UI.WebControls.TextBox)row.FindControl("TXT_PackQty"); |
||||
|
System.Web.UI.WebControls.TextBox TXT_Qty = (System.Web.UI.WebControls.TextBox)row.FindControl("TXT_Qty"); |
||||
|
System.Web.UI.WebControls.TextBox TXT_ProduceDate = (System.Web.UI.WebControls.TextBox)row.FindControl("TXT_ProduceDate"); |
||||
|
_entity.VendBatch= TXT_VenBatch.Text; |
||||
|
|
||||
|
|
||||
|
if (string.IsNullOrEmpty(TXT_ProduceDate.Text)) |
||||
|
{ |
||||
|
Alert.Show("包装量填写错误!"); |
||||
|
return; |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
_entity.ProduceDate =DateTime.Parse(TXT_ProduceDate.Text); |
||||
|
} |
||||
|
_list.Add(_entity); |
||||
|
} |
||||
|
if (_list.Count > 0) |
||||
|
{ |
||||
|
var _first = _list.FirstOrDefault(); |
||||
|
if (_first.State != (int)AsnState.New) |
||||
|
{ |
||||
|
Alert.Show("不是新建状态,不能保存信息!"); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
protected void btnRefresh_Click(object sender, EventArgs e) |
||||
|
{ |
||||
|
|
||||
|
} |
||||
|
private List<V_TB_ASN_DETAIL> GetSelectedList() |
||||
|
{ |
||||
|
List<V_TB_ASN_DETAIL> _list = new List<V_TB_ASN_DETAIL>(); |
||||
|
int _flag = 0; |
||||
|
for (int i = 0, count = Grid_V_TB_ASN_DETAIL.Rows.Count; i < count; i++) |
||||
|
{ |
||||
|
GridRow row = Grid_V_TB_ASN_DETAIL.Rows[i]; |
||||
|
V_TB_ASN_DETAIL _entity = new V_TB_ASN_DETAIL(); |
||||
|
object[] rowDataKeys = Grid_V_TB_ASN_DETAIL.DataKeys[i]; |
||||
|
_entity.UID = ConvertHelper.To<Int32>(rowDataKeys[0]); |
||||
|
_entity.PoBillNum = rowDataKeys[1] as string; |
||||
|
_entity.PoLine = ConvertHelper.To<Int32>(rowDataKeys[2]); |
||||
|
_entity.PartCode = rowDataKeys[3] as string; |
||||
|
_entity.PoUnit = rowDataKeys[4] as string; |
||||
|
_entity.LocUnit = rowDataKeys[5] as string; |
||||
|
_entity.Price = ConvertHelper.To<Decimal>(rowDataKeys[6]); |
||||
|
_entity.Currency = rowDataKeys[7] as string; |
||||
|
_entity.PackQty = ConvertHelper.To<Decimal>(rowDataKeys[8]); |
||||
|
_entity.UnConv = ConvertHelper.To<Decimal>(rowDataKeys[9]); |
||||
|
_entity.DockCode = rowDataKeys[10] as string; |
||||
|
_entity.State = ConvertHelper.To<int>(rowDataKeys[11]); |
||||
|
_entity.Remark = rowDataKeys[12] as string; |
||||
|
_entity.CreateTime = ConvertHelper.To<DateTime>(rowDataKeys[13]); |
||||
|
_entity.CreateUser = rowDataKeys[14] as string; |
||||
|
_entity.UpdateTime = ConvertHelper.To<DateTime?>(rowDataKeys[15]); |
||||
|
_entity.UpdateUser = rowDataKeys[16] as string; |
||||
|
_entity.UpdateInfo = rowDataKeys[17] as string; |
||||
|
_entity.IsDeleted = ConvertHelper.To<Boolean>(rowDataKeys[18]); |
||||
|
_entity.PartDesc1 = rowDataKeys[19] as string; |
||||
|
_entity.CurrencyDesc = rowDataKeys[20] as string; |
||||
|
_entity.Site = rowDataKeys[21] as string; |
||||
|
_entity.VendName = rowDataKeys[22] as string; |
||||
|
_entity.PartDesc2 = rowDataKeys[23] as string; |
||||
|
_entity.AsnBillNum = rowDataKeys[24] as string; |
||||
|
_entity.Qty = ConvertHelper.To<Decimal>(rowDataKeys[25]); |
||||
|
_entity.VendBatch = rowDataKeys[26] as string; |
||||
|
_entity.ProduceDate = ConvertHelper.To<DateTime>(rowDataKeys[27]); |
||||
|
_entity.Batch = rowDataKeys[28] as string; |
||||
|
_entity.VendId = rowDataKeys[29] as string; |
||||
|
_entity.Guid=ConvertHelper.To<Guid>(rowDataKeys[29]); |
||||
|
|
||||
|
_list.Add(_entity); |
||||
|
} |
||||
|
if (_flag == 1) |
||||
|
{ _list = new List<V_TB_ASN_DETAIL>(); } |
||||
|
return _list; |
||||
|
} |
||||
|
protected void btnSend_Click(object sender, EventArgs e) |
||||
|
{ |
||||
|
var _asn = Session["Asn"] as V_TB_ASN; |
||||
|
if (_asn == null) |
||||
|
{ |
||||
|
Alert.Show("发货订单信息不能为空!"); |
||||
|
} |
||||
|
var _list = GetSelectedList(); |
||||
|
if (_list.Count > 0) |
||||
|
{ |
||||
|
var _first = _list.FirstOrDefault(); |
||||
|
if (_first.State != (int)AsnState.New) |
||||
|
{ |
||||
|
Alert.Show("不是新建状态,不能保存信息!"); |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
var result=SCP_BARCODE_CONTROLLER.Get_TB_PRINT_COUNT_List(new TB_PRINT_COUNT() { BillNo=_asn.AsnBillNum }); |
||||
|
if (result.State == ReturnStatus.Succeed) |
||||
|
{ |
||||
|
if (result.Result.Count(p => p.PrintType == (int)PrintType.ASN) == 0) |
||||
|
{ |
||||
|
Alert.Show(_asn.AsnBillNum + "发货单未打印!"); |
||||
|
return; |
||||
|
} |
||||
|
if (result.Result.Count(p => p.PrintType == (int)PrintType.BAR_CODE) == 0) |
||||
|
{ |
||||
|
Alert.Show(_asn.AsnBillNum + "标签未打印!"); |
||||
|
return; |
||||
|
} |
||||
|
} |
||||
|
var check = SCP_ASN_CONTROLLER.Get_TS_UNI_API(_asn); |
||||
|
if(check.State == ReturnStatus.Failed) |
||||
|
{ |
||||
|
Alert.Show(_asn.AsnBillNum + "请勿重复提交数据!"); |
||||
|
return; |
||||
|
} |
||||
|
var ret = SCP_ASN_CONTROLLER.Save_TB_ASN_DETAIL(_asn, _list); |
||||
|
if (ret.State == ReturnStatus.Succeed) |
||||
|
{ |
||||
|
SET_ASN_STATE("发货成功", AsnState.Ship); |
||||
|
GetV_TB_ASNData(); |
||||
|
BindDetail(); |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
Alert.Show(string.Join("\n\r", ret.MessageList.ToArray())); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
private void SET_ASN_STATE(string p_msg, AsnState p_state) |
||||
|
{ |
||||
|
if (Session["Asn"] != null) |
||||
|
{ |
||||
|
|
||||
|
if (CurrentUser.Name == "admin"|| CurrentUser.RoleList.Contains("分厂管理员")) |
||||
|
{ |
||||
|
if (p_state == AsnState.Reject) |
||||
|
{ |
||||
|
var _asn = Session["Asn"] as V_TB_ASN; |
||||
|
|
||||
|
|
||||
|
var asn = SCPDB.TB_ASN.Where(p => p.AsnBillNum == _asn.AsnBillNum).FirstOrDefault(); |
||||
|
var detail = SCPDB.TB_ASN_DETAIL.Where(p => p.AsnBillNum == _asn.AsnBillNum).ToArray(); |
||||
|
if (asn != null) |
||||
|
{ |
||||
|
asn.State = -1; |
||||
|
asn.IsDeleted = true; |
||||
|
SCPDB.TB_ASN.AddOrUpdate(asn); |
||||
|
} |
||||
|
if (detail.Count() > 0) |
||||
|
{ |
||||
|
foreach (var itm in detail) |
||||
|
{ |
||||
|
itm.IsDeleted = true; |
||||
|
itm.State = -1; |
||||
|
|
||||
|
} |
||||
|
SCPDB.TB_ASN_DETAIL.AddOrUpdate(detail); |
||||
|
} |
||||
|
if (SCPDB.SaveChanges() != -1) |
||||
|
{ |
||||
|
Alert.Show("发货单删除成功"); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
var _ask = Session["Asn"] as V_TB_ASN; |
||||
|
var ret = SCP_ASN_CONTROLLER.Save_TB_ASN_STATE(new List<string>() { _ask.AsnBillNum }, p_state); |
||||
|
if (ret.State == ReturnStatus.Succeed) |
||||
|
{ |
||||
|
Alert.Show(p_msg); |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
Alert.Show(ret.Message); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
protected void btnCancel_Click(object sender, EventArgs e) |
||||
|
{ |
||||
|
|
||||
|
SET_ASN_STATE("发货单作废成功", AsnState.Reject); |
||||
|
|
||||
|
} |
||||
|
|
||||
|
protected void ddlGridPageSize_SelectedIndexChanged(object sender, EventArgs e) |
||||
|
{ |
||||
|
Grid_V_TB_ASN_DETAIL.PageSize = Convert.ToInt32(ddlGridPageSize.SelectedValue); |
||||
|
|
||||
|
BindDetail(); |
||||
|
} |
||||
|
|
||||
|
protected void Grid_V_TB_ASN_DETAIL_PageIndexChange(object sender, GridPageEventArgs e) |
||||
|
{ |
||||
|
BindDetail(); |
||||
|
} |
||||
|
|
||||
|
protected void CreateBarCode_Click(object sender, EventArgs e) |
||||
|
{ |
||||
|
|
||||
|
var _list=GetSelectedList(); |
||||
|
if (_list.Count > 0) |
||||
|
{ |
||||
|
btnCreateBarCode.Enabled = false; |
||||
|
var ret=SCP_ASN_CONTROLLER.Save_TB_CREATE_BARCODE(_list); |
||||
|
if (ret.State == ReturnStatus.Succeed) |
||||
|
{ |
||||
|
Alert.Show("条码创建成功!"); |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
btnCreateBarCode.Enabled = true; |
||||
|
Alert.Show(string.Join("<BR>", ret.MessageList.ToArray())); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
protected void btnBarCodeList_Click(object sender, EventArgs e) |
||||
|
{ |
||||
|
try |
||||
|
{ |
||||
|
string AsnBillNum = Request["AsnBillNum"]; |
||||
|
string script = Window1.GetShowReference("SCP_SHIP_DETAIL_BARCODE.aspx?BillNo=" + AsnBillNum, "条码列表"); |
||||
|
PageContext.RegisterStartupScript(script); |
||||
|
|
||||
|
} |
||||
|
catch (Exception ex) |
||||
|
{ |
||||
|
Alert.Show(ex.Message); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
|
||||
|
protected void btnPrint_Click(object sender, EventArgs e) |
||||
|
{ |
||||
|
string AsnBillNum = Request["AsnBillNum"]; |
||||
|
var str = string.Format("window.open(\"../../Handlers/GenerateReport.ashx?report=SendBill&data=102&type=pdf&filename=SendBill.pdf&AsnBillNum={0}&open=\")", AsnBillNum); |
||||
|
PageContext.RegisterStartupScript(str); |
||||
|
SCP_BARCODE_CONTROLLER.Save_TB_PRINT_COUNT(new TB_PRINT_COUNT() { BillNo = AsnBillNum, PrintType = (int)PrintType.ASN}); |
||||
|
} |
||||
|
|
||||
|
protected void btnSelectedBarCode_Click(object sender, EventArgs e) |
||||
|
{ |
||||
|
string AsnBillNum = Request["AsnBillNum"]; |
||||
|
if (!string.IsNullOrEmpty(AsnBillNum)) |
||||
|
{ |
||||
|
var str = string.Format("window.open(\"../../Handlers/GenerateReport.ashx?report=Material&data=101&type=pdf&filename=标签.pdf&AsnBillNum={0}&open=\")",AsnBillNum); |
||||
|
PageContext.RegisterStartupScript(str); |
||||
|
} |
||||
|
SCP_BARCODE_CONTROLLER.Save_TB_PRINT_COUNT(new TB_PRINT_COUNT() { BillNo = AsnBillNum, PrintType = (int)PrintType.BAR_CODE }); |
||||
|
|
||||
|
} |
||||
|
|
||||
|
protected void btnOutputPallet_Click(object sender, EventArgs e) |
||||
|
{ |
||||
|
|
||||
|
#region 计算托盘数量和发货数量是否相等
|
||||
|
|
||||
|
SearchV_TB_ASN_DETAILData((ret) => { |
||||
|
|
||||
|
var _asn = Session["Asn"] as V_TB_ASN; |
||||
|
if (_asn == null) |
||||
|
{ |
||||
|
Alert.Show("发货单不存在!"); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
var _ls=SCP_ASN_CONTROLLER.Get_CAN_PALLET_QTY(ret.ToList()); |
||||
|
var _errList = new List<string>(); |
||||
|
_ls.ForEach(p => { |
||||
|
if(p.CanQty>0) |
||||
|
{ |
||||
|
_errList.Add(string.Format("编号:{0}名称:{1},托盘数量总和小于发货单数量",p.PartCode,(p.PartDesc1+p.PartDesc2))); |
||||
|
} |
||||
|
}); |
||||
|
if (_errList.Count > 0) |
||||
|
{ |
||||
|
Alert.Show(string.Join("<BR>", _errList.ToArray())); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
List<string> _list = new List<string>(); |
||||
|
_list.Add(_asn.AsnBillNum); |
||||
|
DataSet ds = SCP_EXCEL_CONTROLLER.GET_PALLET_EXECEL(_list); |
||||
|
PageBase.DataSetToExcel(ds, "打印导出托盘!"); |
||||
|
|
||||
|
}); |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
#endregion
|
||||
|
|
||||
|
|
||||
|
} |
||||
|
|
||||
|
protected void btnPackage_Click(object sender, EventArgs e) |
||||
|
{ |
||||
|
string AsnBillNum = Request["AsnBillNum"]; |
||||
|
PageContext.RegisterStartupScript(Window1.GetShowReference(string.Format("../SupplierData/SCP_MAKE_PAGE_BARCODE.aspx?AsnBillNum={0}",AsnBillNum))); |
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,314 @@ |
|||||
|
//------------------------------------------------------------------------------
|
||||
|
// <自动生成>
|
||||
|
// 此代码由工具生成。
|
||||
|
//
|
||||
|
// 对此文件的更改可能导致不正确的行为,如果
|
||||
|
// 重新生成代码,则所做更改将丢失。
|
||||
|
// </自动生成>
|
||||
|
//------------------------------------------------------------------------------
|
||||
|
|
||||
|
namespace SCP.SupplierData.SupplierLogistics |
||||
|
{ |
||||
|
|
||||
|
|
||||
|
public partial class SCP_ASN_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>
|
||||
|
/// btnRefresh 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Button btnRefresh; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// btnSend 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Button btnSend; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// btnPrint 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Button btnPrint; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// btnPackage 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Button btnPackage; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// btnCancel 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Button btnCancel; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// FormRow_1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.FormRow FormRow_1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TXT_StateDesc 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox TXT_StateDesc; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TXT_AsnBillNum 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox TXT_AsnBillNum; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TXT_VendName 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox TXT_VendName; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TXT_Site 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox TXT_Site; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// FormRow_2 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.FormRow FormRow_2; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// DP_ShipTime 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.DatePicker DP_ShipTime; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TXT_ShipUser 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox TXT_ShipUser; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// DP_ReceiveTime 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.DatePicker DP_ReceiveTime; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TXT_ReceiveUser 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox TXT_ReceiveUser; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// FormRow_3 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.FormRow FormRow_3; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TXT_PlateNumber 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox TXT_PlateNumber; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TXT_Remark 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox TXT_Remark; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Toolbar1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Toolbar Toolbar1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// btnCreateBarCode 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Button btnCreateBarCode; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// btnSelectedBarCode 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Button btnSelectedBarCode; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// btnOutputPallet 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Button btnOutputPallet; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// btnBarCodeList 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Button btnBarCodeList; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// btnOutPut 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Button btnOutPut; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Grid_V_TB_ASN_DETAIL 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Grid Grid_V_TB_ASN_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; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Window1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Window Window1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// WindowUpload 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Window WindowUpload; |
||||
|
} |
||||
|
} |
Loading…
Reference in new issue