学 赵
4 years ago
7 changed files with 881 additions and 350 deletions
@ -1,127 +0,0 @@ |
|||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SCP_RECEIVE_LIST.aspx.cs" Inherits="SCP.WarehouseData.ReceiveList" %> |
|||
|
|||
<%@ 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:Grid ID="Grid_V_TB_RECEIVE_LIST" ShowBorder="true" ShowHeader="true" PageSize="1000" BoxFlex="1" CssClass="maingrid" |
|||
runat="server" DataKeyNames="UID,ProjectId,RecvBillNum,PartCode,PoLine" 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="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="单据号" 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("Qty") %>' /> |
|||
<asp:Label runat="server" DataField="Qty" ID="Qty1" Text='<%# Eval("Qty") %>'></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> |
|||
|
|||
</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> |
@ -1,109 +0,0 @@ |
|||
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.WarehouseData |
|||
{ |
|||
public partial class ReceiveList : PageBase |
|||
{ |
|||
protected void Page_Load(object sender, EventArgs e) |
|||
{ |
|||
if (!IsPostBack) |
|||
{ |
|||
LoadData(); |
|||
} |
|||
} |
|||
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.VendId = Request.Params["VendId"]; |
|||
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 => |
|||
{ |
|||
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 Grid_V_TB_RECEIVE_LIST_PageIndexChange(object sender, GridPageEventArgs e) |
|||
{ |
|||
BindData(); |
|||
} |
|||
|
|||
//导出
|
|||
|
|||
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 BTN_INV_Click(object sender, EventArgs e) |
|||
{ |
|||
BindData(); |
|||
} |
|||
|
|||
protected void Window1_Close(object sender, WindowCloseEventArgs e) |
|||
{ |
|||
BindData(); |
|||
} |
|||
} |
|||
} |
@ -1,87 +0,0 @@ |
|||
//------------------------------------------------------------------------------
|
|||
// <自动生成>
|
|||
// 此代码由工具生成。
|
|||
//
|
|||
// 对此文件的更改可能导致不正确的行为,如果
|
|||
// 重新生成代码,则所做更改将丢失。
|
|||
// </自动生成>
|
|||
//------------------------------------------------------------------------------
|
|||
|
|||
namespace SCP.WarehouseData { |
|||
|
|||
|
|||
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>
|
|||
/// 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; |
|||
} |
|||
} |
Loading…
Reference in new issue