Browse Source

添加质量录入功能

master
lvzb 4 years ago
parent
commit
1e9b2ed655
  1. 7
      Controller/SCP_INVOICE_CONTROLLER.cs
  2. 24
      SCP/SCP.csproj
  3. 2
      SCP/Views/PlanData/SCP_ASK.aspx
  4. 88
      SCP/Views/Quality/SCP_QUALITY_CREATE.aspx
  5. 109
      SCP/Views/Quality/SCP_QUALITY_CREATE.aspx.cs
  6. 107
      SCP/Views/Quality/SCP_QUALITY_CREATE.aspx.designer.cs
  7. 107
      SCP/Views/Quality/SCP_QUALITY_MANAGER.aspx
  8. 143
      SCP/Views/Quality/SCP_QUALITY_MANAGER.aspx.cs
  9. 251
      SCP/Views/Quality/SCP_QUALITY_MANAGER.aspx.designer.cs
  10. 59
      SCP/Views/Quality/SCP_SQE.aspx
  11. 96
      SCP/Views/Quality/SCP_SQE.aspx.cs
  12. 98
      SCP/Views/Quality/SCP_SQE.aspx.designer.cs
  13. 3
      SCP/Views/SupplierData/SCP_INVOICE.aspx
  14. 20
      SCP/Views/SupplierData/SCP_INVOICE.aspx.cs
  15. 2
      SCP/Views/SupplierData/SCP_INVOICE_CREATE.aspx
  16. 9
      SCP/Views/WarehouseData/SCP_INVOICE.aspx.cs

7
Controller/SCP_INVOICE_CONTROLLER.cs

@ -1097,6 +1097,7 @@ namespace CK.SCP.Controller
{ {
ResultObject<bool> _ret = new ResultObject<bool>(); ResultObject<bool> _ret = new ResultObject<bool>();
List<string> _list = new List<string>(); List<string> _list = new List<string>();
List<string> _listpartcode = new List<string>();//超过分摊零件集合
try try
{ {
using (ScpEntities db = EntitiesFactory.CreateScpInstance()) using (ScpEntities db = EntitiesFactory.CreateScpInstance())
@ -1151,9 +1152,13 @@ namespace CK.SCP.Controller
var _num = _moldsharing.Count + p.Qty; var _num = _moldsharing.Count + p.Qty;
if (_moldsharing.Qty < _num) if (_moldsharing.Qty < _num)
{ {
string _str ="供应商"+ _moldsharing .VendId+ "零件名称"+ _moldsharing.PartCode+"超过分摊数量"+ (_num- _moldsharing.Qty).ToString(); string _str = "供应商" + _moldsharing.VendId + "零件名称" + _moldsharing.PartCode + "超过分摊数量,分摊数量剩余" + (_moldsharing.Qty - _moldsharing.Count).ToString();
if (!_listpartcode.Contains(_moldsharing.PartCode))
{
_listpartcode.Add(_moldsharing.PartCode);
_list.Add(_str); _list.Add(_str);
} }
}
else else
{ {
_moldsharing.Count = _num; _moldsharing.Count = _num;

24
SCP/SCP.csproj

@ -2933,6 +2933,9 @@
<Content Include="Views\PlanData\SCP_RECEIVE_EXTEND.aspx" /> <Content Include="Views\PlanData\SCP_RECEIVE_EXTEND.aspx" />
<Content Include="Views\PlanData\SCP_ASK_UNCOMPLETE.aspx" /> <Content Include="Views\PlanData\SCP_ASK_UNCOMPLETE.aspx" />
<Content Include="Views\PlanData\SCP_UNI_API.aspx" /> <Content Include="Views\PlanData\SCP_UNI_API.aspx" />
<Content Include="Views\Quality\SCP_QUALITY_CREATE.aspx" />
<Content Include="Views\Quality\SCP_QUALITY_MANAGER.aspx" />
<Content Include="Views\Quality\SCP_SQE.aspx" />
<Content Include="Views\Report\SCP_ARRIVE_REPORT.aspx" /> <Content Include="Views\Report\SCP_ARRIVE_REPORT.aspx" />
<Content Include="Views\Report\SCP_OTD_REPORT.aspx" /> <Content Include="Views\Report\SCP_OTD_REPORT.aspx" />
<Content Include="Views\Report\SCP_RECVICE_YEAR_REPORT.aspx" /> <Content Include="Views\Report\SCP_RECVICE_YEAR_REPORT.aspx" />
@ -5264,6 +5267,27 @@
<Compile Include="Views\PlanData\SCP_UNI_API.aspx.designer.cs"> <Compile Include="Views\PlanData\SCP_UNI_API.aspx.designer.cs">
<DependentUpon>SCP_UNI_API.aspx</DependentUpon> <DependentUpon>SCP_UNI_API.aspx</DependentUpon>
</Compile> </Compile>
<Compile Include="Views\Quality\SCP_QUALITY_CREATE.aspx.cs">
<DependentUpon>SCP_QUALITY_CREATE.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Views\Quality\SCP_QUALITY_CREATE.aspx.designer.cs">
<DependentUpon>SCP_QUALITY_CREATE.aspx</DependentUpon>
</Compile>
<Compile Include="Views\Quality\SCP_QUALITY_MANAGER.aspx.cs">
<DependentUpon>SCP_QUALITY_MANAGER.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Views\Quality\SCP_QUALITY_MANAGER.aspx.designer.cs">
<DependentUpon>SCP_QUALITY_MANAGER.aspx</DependentUpon>
</Compile>
<Compile Include="Views\Quality\SCP_SQE.aspx.cs">
<DependentUpon>SCP_SQE.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Views\Quality\SCP_SQE.aspx.designer.cs">
<DependentUpon>SCP_SQE.aspx</DependentUpon>
</Compile>
<Compile Include="Views\Report\SCP_ARRIVE_REPORT.aspx.cs"> <Compile Include="Views\Report\SCP_ARRIVE_REPORT.aspx.cs">
<DependentUpon>SCP_ARRIVE_REPORT.aspx</DependentUpon> <DependentUpon>SCP_ARRIVE_REPORT.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType> <SubType>ASPXCodeBehind</SubType>

2
SCP/Views/PlanData/SCP_ASK.aspx

@ -114,7 +114,7 @@
</Items> </Items>
</f:GroupPanel> </f:GroupPanel>
<f:Grid ID = "Grid_V_TB_ASK" EnableCollapse = "true" ShowBorder = "true" ShowHeader = "true" runat ="server" EnableCheckBoxSelect="true" EnableTextSelection="true" <f:Grid ID = "Grid_V_TB_ASK" EnableCollapse = "true" ShowBorder = "true" ShowHeader = "true" runat ="server" EnableColumnLines="true" EnableCheckBoxSelect="true" EnableTextSelection="true"
DataKeyNames = "UID,PoBillNum,AskBillNum,VendId,Site,Buyer,BuyerPhone,State,Remark,VendName,State_DESC,ModType_DESC,CreateTime,CreateUser,UpdateTime,UpdateUser,UpdateInfo,IsDeleted,GUID,ModType" DataKeyNames = "UID,PoBillNum,AskBillNum,VendId,Site,Buyer,BuyerPhone,State,Remark,VendName,State_DESC,ModType_DESC,CreateTime,CreateUser,UpdateTime,UpdateUser,UpdateInfo,IsDeleted,GUID,ModType"
AllowSorting="true" BoxFlex="1" AllowSorting="true" BoxFlex="1"
PageSize="100" PageSize="100"

88
SCP/Views/Quality/SCP_QUALITY_CREATE.aspx

@ -0,0 +1,88 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SCP_QUALITY_CREATE.aspx.cs" Inherits="SCP.Views.Quality.SCP_QUALITY_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">
<Toolbars>
<f:Toolbar ID="Toolbar2" runat="server">
<Items>
<f:Button ID="btnRelease" runat="server" EnablePostBack="True" OnClick="btnRelease_Click" Text="生成不合格记录" Icon="CssAdd" OnClientClick="if(!confirm('是否要生成不合格单据?'))return false;">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
<Items>
<f:Form runat="server" Title="" Margin="5">
<Items>
<f:FormRow runat="server" ColumnWidths="100%">
<Items>
<f:TextBox runat = "server" Label = "发货单号" EmptyText = "" ID = "TXT_AsnBillNum" />
</Items>
</f:FormRow>
<f:FormRow runat="server" ColumnWidths="33% 33% 33%">
<Items>
<f:Button runat="server" ID="btnQuery" Text="查询" OnClick="btnQuery_Click"></f:Button>
</Items>
</f:FormRow>
</Items>
</f:Form>
<f:Grid ID="Grid_V_TB_ASN_DETAIL" ShowBorder="true" ShowHeader="true" PageSize="1000" BoxFlex="1" CssClass="maingrid"
runat="server" DataKeyNames="UID,PoBillNum,PoLine,PartCode,AsnBillNum,Batch,VendId"
IsDatabasePaging="True" AllowPaging="True"
EnableRowSelectEvent="True" AutoScroll="True"
SortField="PartCode" SortDirection="DESC"
AllowCellEditing="true" ClicksToEdit="2"
OnPageIndexChange="Grid_V_TB_ASN_DETAIL_PageIndexChange">
<Columns>
<f:BoundField Width = "80px" DataField = "AsnBillNum" DataFormatString = "{0}" HeaderText = "发货单号" />
<f:BoundField Width = "80px" DataField = "PackQty" DataFormatString = "{0:F}" HeaderText = "标包数量" />
<f:BoundField Width = "100px" DataField = "PartCode" DataFormatString = "{0}" HeaderText = "零件编号" />
<f:BoundField Width = "100px" DataField = "PartDesc1" DataFormatString = "{0}" HeaderText = "零件名称" />
<f:BoundField Width = "100px" DataField = "Batch" DataFormatString = "{0}" HeaderText = "供应商批次" />
<f:BoundField Width = "100px" DataField = "VendBatch" DataFormatString = "{0}" HeaderText = "批次" />
<f:BoundField Width = "50px" DataField = "PoUnit" DataFormatString = "{0}" HeaderText = "单位" />
<f:RenderField Width="100px" ColumnID="Failqty" DataField="Failqty" FieldType="Float"
HeaderText="不合格数量">
<Editor>
<f:NumberBox ID="NB_PublishNum" runat="server" MinValue="0"
MaxValue="99999999" DecimalPrecision="3" >
</f:NumberBox>
</Editor>
</f:RenderField>
<f:RenderField Width="100px" ColumnID="FailReason" DataField="FailReason" FieldType="String" HeaderText="不合格原因">
<Editor>
<f:DropDownList ID="fail" Required="true" runat="server" EnableMultiSelect="true">
<f:ListItem Text="成分" Value="成分" />
<f:ListItem Text="颜色" Value="颜色" />
<f:ListItem Text="新能" Value="新能" />
<f:ListItem Text="包装" Value="包装" />
<f:ListItem Text="其他" Value="其他" />
</f:DropDownList>
</Editor>
</f:RenderField>
</Columns>
</f:Grid>
</Items>
</f:Panel>
<f:HiddenField ID="highlightRows" runat="server">
</f:HiddenField>
</form>
</body>
</html>

109
SCP/Views/Quality/SCP_QUALITY_CREATE.aspx.cs

@ -0,0 +1,109 @@
using CK.SCP.Controller;
using CK.SCP.Models.ScpEntity;
using CK.SCP.Utils;
using FineUI;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace SCP.Views.Quality
{
public partial class SCP_QUALITY_CREATE : PageBase
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
BindDetail();
}
}
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.AskBillNum = "";
_entity.AsnBillNum = !string.IsNullOrEmpty(TXT_AsnBillNum.Text) ? TXT_AsnBillNum.Text : "9999999";
SCP_ASN_CONTROLLER.Get_V_TB_ASN_DETAIL_List(_entity, (_ret) => {
if (_ret.State == ReturnStatus.Succeed)
{
p_action(_ret.Result);
}
});
}
/// <summary>
/// 绑定明细
/// </summary>
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);
var ls = list.ToList();
Grid_V_TB_ASN_DETAIL.DataSource = ls;
Grid_V_TB_ASN_DETAIL.DataBind();
});
}
protected void Grid_V_TB_ASN_DETAIL_PageIndexChange(object sender, FineUI.GridPageEventArgs e)
{
BindDetail();
}
protected void ddlGridPageSize_SelectedIndexChanged(object sender, EventArgs e)
{
BindDetail();
}
protected void btnRelease_Click(object sender, EventArgs e)
{
List<V_TB_ASN_DETAIL> _list = new List<V_TB_ASN_DETAIL>();
Dictionary<int, Dictionary<string, object>> modifiedDict = Grid_V_TB_ASN_DETAIL.GetModifiedDict();
for (int i = 0, count = Grid_V_TB_ASN_DETAIL.Rows.Count; i < count; i++)
{
V_TB_ASN_DETAIL _entity = new V_TB_ASN_DETAIL();
object[] rowDataKeys = Grid_V_TB_ASN_DETAIL.DataKeys[i];
_entity.UID = ConvertHelper.To<long>(rowDataKeys[0]);
_entity.PoBillNum = rowDataKeys[1] as string;
_entity.PoLine = ConvertHelper.To<Int32>(rowDataKeys[2]);
_entity.PartCode = rowDataKeys[3] as string;
_entity.AsnBillNum = rowDataKeys[4] as string;
_entity.Batch = rowDataKeys[5] as string;
_entity.VendId = rowDataKeys[6] as string;
if (modifiedDict.Keys.Contains(i))
{
var modifyValue = modifiedDict[i];
var _FailQty = modifyValue.Keys.Contains("Failqty") ? modifyValue["Failqty"] : 0;
var _FailReason = modifyValue.Keys.Contains("FailReason") ? modifyValue["FailReason"] : string.Empty;
_entity.FailQty = ConvertHelper.To<decimal>(_FailQty);
_entity.FailReason = _FailReason.ToString();
_list.Add(_entity);
}
}
var ret = SCP_QUALITY_CONTROLLER.Save_ASN_TO_QUALITY(_list, CurrentUser.ChineseName);
if (ret.Result == true)
{
Alert.Show("添加不合格品信息成功!");
}
//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();
//}
}
protected void btnQuery_Click(object sender, EventArgs e)
{
BindDetail();
}
}
}

107
SCP/Views/Quality/SCP_QUALITY_CREATE.aspx.designer.cs

@ -0,0 +1,107 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace SCP.Views.Quality
{
public partial class SCP_QUALITY_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>
/// btnRelease 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button btnRelease;
/// <summary>
/// TXT_AsnBillNum 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_AsnBillNum;
/// <summary>
/// btnQuery 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button btnQuery;
/// <summary>
/// Grid_V_TB_ASN_DETAIL 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Grid Grid_V_TB_ASN_DETAIL;
/// <summary>
/// NB_PublishNum 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.NumberBox NB_PublishNum;
/// <summary>
/// fail 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.DropDownList fail;
/// <summary>
/// highlightRows 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.HiddenField highlightRows;
}
}

107
SCP/Views/Quality/SCP_QUALITY_MANAGER.aspx

@ -0,0 +1,107 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SCP_QUALITY_MANAGER.aspx.cs" Inherits="SCP.Views.Quality.SCP_QUALITY_MANAGER" %>
<!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">
<Toolbars>
<f:Toolbar ID="Toolbar2" runat="server">
<Items>
<f:Button runat="server" ID="btnNew" Text="新建" OnClick="btnNew_Click" Icon="Add"></f:Button>
<f:Button ID="btnOutput" runat="server" Text="导出" OnClick="btnOutput_Click" Icon="PageExcel">
</f:Button>
<f:Button runat="server" ID="btnDelete" Text="删除" OnClick="btnDelete_Click" Icon="Delete"></f:Button>
<f:Button runat="server" ID="btnSQE" Text="供应商质量统计" OnClick="btnSQE_Click" Icon="Report"></f:Button>
</Items>
</f:Toolbar>
</Toolbars>
<Items>
<f:Form runat="server" Title="">
<Items>
<f:FormRow runat="server" ColumnWidths="25% 25% 25% 25%" ID="FormRow1">
<Items>
<f:TextBox ID="TXT_Code" runat="server" Label="质检单号"/>
<f:TextBox ID="TXT_AsnBill" runat="server" Label="发货单号"/>
<f:TextBox ID="TXT_PoBillNum" runat="server" Label="订单编号"/>
<f:TextBox ID="TXT_PageCode" runat="server" Label="包装箱号"/>
</Items>
</f:FormRow>
<f:FormRow runat="server" ColumnWidths="25% 25% 25% 25%" ID="FormRow_1">
<Items>
<f:DropDownList ID="TXT_Vendid" runat="server" Label="供应商编码" EnableMultiSelect="false" EnableEdit="true"></f:DropDownList>
<f:TextBox ID="TXT_PartCode" runat="server" Label="零件编号" />
<f:TextBox ID="TXT_Batch" runat="server" Label="批次" />
</Items>
</f:FormRow>
<f:FormRow runat="server" ColumnWidths="33% 33% 33%" ID="FormRow_3" >
<Items>
<f:Button runat="server" ID="btnQuery" Text="查询" OnClick="btnQuery_Click"></f:Button>
</Items>
</f:FormRow>
</Items>
</f:Form>
<f:Grid ID = "Grid_TB_QUALITY" Title = "质量列表"
EnableCollapse = "true"
ShowBorder = "true"
ShowHeader = "true"
runat ="server"
EnableCheckBoxSelect = "true"
DataKeyNames = "UID,Type,Barcode,Loccode,Pobillnum,Poline,Inspecttype,Partcode,Batch,ReceiveQty,SampleQty,Inspqty,Passqty,Failqty,Crackqty,Inspresult,Failreason,Vendid,Vendbatch,state,Billtime,Domain,Site,By1,By2,By3,CreateTime,CreateUser,UpdateTime,UpdateUser,UpdateInfo,IsDeleted,GUID,UserInAddress,UserInVendIds,BillStateList"
PageSize="100"
IsDatabasePaging="true" AllowPaging="true"
AutoScroll="True"
SortDirection="DESC" SortField="Billtime"
>
<PageItems>
<f:ToolbarSeparator ID="ToolbarSeparator2" 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="100" />
<f:ListItem Text="200" Value="200" />
</f:DropDownList>
</PageItems>
<Columns>
<f:BoundField Width = "100px" DataField = "UID" HeaderText = "" Hidden="true"/>
<f:BoundField Width = "100px" DataField = "QualityNo" HeaderText = "检验单据号" />
<f:BoundField Width = "100px" DataField = "By1" HeaderText = "发货单号" />
<f:BoundField Width = "100px" DataField = "Barcode" HeaderText = "箱码" />
<f:BoundField Width = "100px" DataField = "Pobillnum" HeaderText = "订单号" />
<f:BoundField Width = "100px" DataField = "Poline" HeaderText = "订单行" />
<f:BoundField Width = "100px" DataField = "Partcode" HeaderText = "零件编号" />
<f:BoundField Width = "100px" DataField = "VendName" HeaderText = "供应商名称" />
<f:BoundField Width = "100px" DataField = "PartDesc1" HeaderText = "零件名称" />
<f:BoundField Width = "100px" DataField = "PartDesc2" HeaderText = "零件名称" />
<f:BoundField Width = "100px" DataField = "Batch" DataFormatString = "{0}" HeaderText = "批次" />
<f:BoundField Width = "100px" DataField = "Failqty" DataFormatString = "{0:F}" HeaderText = "不合格数" />
<f:BoundField Width = "100px" DataField = "Failreason" 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" CloseAction="HidePostBack"
IFrameUrl="about:blank" Height="600px" Width="1024px" AutoScroll="True" OnClose="Window1_Close" />
<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>
</body>
</html>

143
SCP/Views/Quality/SCP_QUALITY_MANAGER.aspx.cs

@ -0,0 +1,143 @@
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;
namespace SCP.Views.Quality
{
public partial class SCP_QUALITY_MANAGER : PageBase
{
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
Bind();
BindVender(TXT_Vendid);
}
}
public void Bind()
{
Search((result) => {
Grid_TB_QUALITY.RecordCount = result.Count();
var list = SortAndPage<V_TB_QUALITY>(result, Grid_TB_QUALITY);
Grid_TB_QUALITY.DataSource = list;
Grid_TB_QUALITY.DataBind();
});
}
public void Search(Action<IQueryable<V_TB_QUALITY>> p_action)
{
V_TB_QUALITY _entity = new V_TB_QUALITY();
_entity.Pobillnum = TXT_PoBillNum.Text;
_entity.Barcode = TXT_PageCode.Text;
_entity.Partcode = TXT_PartCode.Text;
_entity.By1 = TXT_AsnBill.Text;
_entity.Vendid = TXT_Vendid.SelectedValue;
_entity.Batch = TXT_Batch.Text;
_entity.IsDeleted = false;
_entity.UserInAddress = CurrentUser.FactoryList;
_entity.UserInVendIds = CurrentUser.VenderList;
SCP_QUALITY_CONTROLLER.Get_TB_QUALITY_List(_entity, (_ret) => {
if (_ret.State == ReturnStatus.Succeed)
{
p_action(_ret.Result);
}
});
}
protected void btnOutput_Click(object sender, EventArgs e)
{
Search((rs) => {
Dictionary<string, string> cellheader = new Dictionary<string, string>();
cellheader.Add("Type_Desc", "检验类型");
cellheader.Add("Barcode", "箱码");
cellheader.Add("Pobillnum", "订单编号");
cellheader.Add("Poline", "订单行号");
cellheader.Add("Partcode", "零件编码");
cellheader.Add("Batch", "发货批次");
cellheader.Add("Failqty", "不合格数");
cellheader.Add("Failreason", "不合格原因");
cellheader.Add("Vendbatch", "供应商批次");
cellheader.Add("Billtime", "检查日期");
cellheader.Add("PartDesc1", "零件名1");
cellheader.Add("PartDesc2", "零件名2");
cellheader.Add("ProjectId", "项目名称");
cellheader.Add("Qlevel", "质检等级");
cellheader.Add("VendName", "供应商名称");
string url = EntityListToExcel2003(cellheader, rs.ToList(), "质量不合格零件导出");
});
}
protected void btnQuery_Click(object sender, EventArgs e)
{
Bind();
}
protected void ddlGridPageSize_SelectedIndexChanged(object sender, EventArgs e)
{
Bind();
}
protected void btnSave_Click(object sender, EventArgs e)
{
}
protected void btnDelete_Click(object sender, EventArgs e)
{
if (Grid_TB_QUALITY.SelectedRowIndexArray.Count() == 0)
{
PageContext.RegisterStartupScript(Alert.GetShowInTopReference("没有选择数据!"));
return;
}
List<TB_QUALITY> _ls = new List<TB_QUALITY>();
for (int i = 0, count = Grid_TB_QUALITY.Rows.Count; i < count; i++)
{
if (Grid_TB_QUALITY.SelectedRowIndexArray.Contains(i))
{
object[] rowDataKeys = Grid_TB_QUALITY.DataKeys[i];
var _entity = new TB_QUALITY();
_entity.UID = long.Parse(rowDataKeys[0].ToString());
_ls.Add(_entity);
}
}
var _ret = SCP_QUALITY_CONTROLLER.Del_TB_QUALITY(_ls);
if (_ret.State == ReturnStatus.Succeed)
{
Bind();
Alert.Show("删除不合格评审成功!");
}
}
protected void btnNew_Click(object sender, EventArgs e)
{
PageContext.RegisterStartupScript(Window1.GetShowReference("../Quality/SCP_QUALITY_CREATE.aspx"));
}
protected void Window1_Close(object sender, WindowCloseEventArgs e)
{
Bind();
}
protected void btnSQE_Click(object sender, EventArgs e)
{
PageContext.RegisterStartupScript(Window1.GetShowReference("../Quality/SCP_SQE.aspx"));
}
}
}

251
SCP/Views/Quality/SCP_QUALITY_MANAGER.aspx.designer.cs

@ -0,0 +1,251 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace SCP.Views.Quality
{
public partial class SCP_QUALITY_MANAGER
{
/// <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>
/// Toolbar2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Toolbar Toolbar2;
/// <summary>
/// btnNew 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button btnNew;
/// <summary>
/// btnOutput 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button btnOutput;
/// <summary>
/// btnDelete 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button btnDelete;
/// <summary>
/// btnSQE 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button btnSQE;
/// <summary>
/// FormRow1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.FormRow FormRow1;
/// <summary>
/// TXT_Code 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_Code;
/// <summary>
/// TXT_AsnBill 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_AsnBill;
/// <summary>
/// TXT_PoBillNum 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_PoBillNum;
/// <summary>
/// TXT_PageCode 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_PageCode;
/// <summary>
/// FormRow_1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.FormRow FormRow_1;
/// <summary>
/// TXT_Vendid 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.DropDownList TXT_Vendid;
/// <summary>
/// TXT_PartCode 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_PartCode;
/// <summary>
/// TXT_Batch 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.TextBox TXT_Batch;
/// <summary>
/// FormRow_3 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.FormRow FormRow_3;
/// <summary>
/// btnQuery 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button btnQuery;
/// <summary>
/// Grid_TB_QUALITY 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Grid Grid_TB_QUALITY;
/// <summary>
/// ToolbarSeparator2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.ToolbarSeparator ToolbarSeparator2;
/// <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;
/// <summary>
/// TXT_State 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.HiddenField TXT_State;
}
}

59
SCP/Views/Quality/SCP_SQE.aspx

@ -0,0 +1,59 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SCP_SQE.aspx.cs" Inherits="SCP.Views.Quality.SCP_SQE" %>
<!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="" Margin="5">
<Items>
<f:FormRow runat="server" ColumnWidths="100%">
<Items>
<f:DropDownList ID="ddl_Vender" runat="server" Label="供应商" EnableEdit="true" ></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" ColumnWidths="33% 33% 33%">
<Items>
<f:Button runat="server" ID="btnQuery" Text="查询" OnClick="btnQuery_Click"></f:Button>
<f:Button runat="server" ID="btnExcel" Text="导出" OnClick="btnExcel_Click"></f:Button>
</Items>
</f:FormRow>
</Items>
</f:Form>
<f:Grid ID="Grid_SQE" ShowBorder="true" ShowHeader="true" PageSize="1000" BoxFlex="1" CssClass="maingrid"
runat="server"
IsDatabasePaging="True" AllowPaging="True"
EnableRowSelectEvent="True" AutoScroll="True"
SortField="VendId" SortDirection="DESC"
OnPageIndexChange="Grid_SQE_PageIndexChange">
<Columns>
<f:BoundField Width = "100px" DataField = "VendId" DataFormatString = "{0}" HeaderText = "供应商编码" />
<f:BoundField Width = "200px" DataField = "VendName" DataFormatString = "{0:F}" HeaderText = "供应商名称" />
<f:BoundField Width = "100px" DataField ="FailQty" DataFormatString = "{0}" HeaderText = "不合格数量" />
<f:BoundField Width = "100px" DataField ="RecQty" DataFormatString = "{0}" HeaderText = "收货数量" />
</Columns>
</f:Grid>
</Items>
</f:Panel>
<f:HiddenField ID="highlightRows" runat="server">
</f:HiddenField>
</form>
</body>
</html>

96
SCP/Views/Quality/SCP_SQE.aspx.cs

@ -0,0 +1,96 @@
using CK.SCP.Controller;
using CK.SCP.Models.ScpEntity;
using CK.SCP.Utils;
using FineUI;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace SCP.Views.Quality
{
public partial class SCP_SQE : PageBase
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
BindDetail();
BindVender(ddl_Vender);
}
}
public void SearchData(Action<IQueryable<SCP_TB_SQE>> p_action)
{
V_TB_ASN_DETAIL _entity = new V_TB_ASN_DETAIL();
if (!string.IsNullOrEmpty(DP_StartDate.Text))
{
_entity.SQE_BeginTime = DP_StartDate.SelectedDate.Value.ToShortDateString();
}
if (!string.IsNullOrEmpty(Date_EndDate.Text))
{
_entity.SQE_EndTime = Date_EndDate.SelectedDate.Value.ToShortDateString();
}
_entity.VendId = ddl_Vender.SelectedValue;
SCP_REPORT_CONTROLLER.Get_SQE(_entity, (_ret) => {
if (_ret.State == ReturnStatus.Succeed)
{
p_action(_ret.Result);
}
});
}
/// <summary>
/// 绑定明细
/// </summary>
public void BindDetail()
{
SearchData((ret) => {
Grid_SQE.RecordCount = ret.Count();
var list = SortAndPage<SCP_TB_SQE>(ret, Grid_SQE);
var ls = list.ToList();
Grid_SQE.DataSource = ls;
Grid_SQE.DataBind();
});
}
protected void Grid_V_TB_ASN_DETAIL_PageIndexChange(object sender, FineUI.GridPageEventArgs e)
{
BindDetail();
}
protected void ddlGridPageSize_SelectedIndexChanged(object sender, EventArgs e)
{
BindDetail();
}
protected void btnQuery_Click(object sender, EventArgs e)
{
BindDetail();
}
protected void Grid_SQE_PageIndexChange(object sender, GridPageEventArgs e)
{
BindDetail();
}
protected void btnExcel_Click(object sender, EventArgs e)
{
SearchData((ret) => {
Dictionary<string, string> cellheader = new Dictionary<string, string>(){
{"VendId" , "供应商编码" },
{"VendName" , "供应商名称" },
{ "FailQty" , "不合格数量" },
{ "RecQty" , "收货数量" },
};
string url = EntityListToExcel2003(cellheader, ret.ToList(), "SQE导出");
});
}
}
}

98
SCP/Views/Quality/SCP_SQE.aspx.designer.cs

@ -0,0 +1,98 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace SCP.Views.Quality
{
public partial class SCP_SQE
{
/// <summary>
/// form1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// Panel1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Panel Panel1;
/// <summary>
/// ddl_Vender 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.DropDownList ddl_Vender;
/// <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>
/// btnQuery 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button btnQuery;
/// <summary>
/// btnExcel 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Button btnExcel;
/// <summary>
/// Grid_SQE 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Grid Grid_SQE;
/// <summary>
/// highlightRows 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.HiddenField highlightRows;
}
}

3
SCP/Views/SupplierData/SCP_INVOICE.aspx

@ -129,8 +129,11 @@
</f:TemplateField> </f:TemplateField>
<f:BoundField runat="server" HeaderText="折扣金额" ColumnID="" DataField="DiscountPrice" DataFormatString = "{0:F}"/> <f:BoundField runat="server" HeaderText="折扣金额" ColumnID="" DataField="DiscountPrice" DataFormatString = "{0:F}"/>
<%-- <f:BoundField runat="server" HeaderText="折扣税额" ColumnID="" DataField="DiscountPriceTax" DataFormatString = "{0:F}"/> --%>
<f:BoundField runat="server" HeaderText="索赔金额" ColumnID="" DataField="ContractPrice" DataFormatString = "{0:F}"/> <f:BoundField runat="server" HeaderText="索赔金额" ColumnID="" DataField="ContractPrice" DataFormatString = "{0:F}"/>
<%-- <f:BoundField runat="server" HeaderText="索赔税额" ColumnID="" DataField="ContractPriceTax" DataFormatString = "{0:F}"/>--%>
<f:BoundField runat="server" HeaderText="调整税额" ColumnID="" DataField="BlancePrice" DataFormatString = "{0:F}"/> <f:BoundField runat="server" HeaderText="调整税额" ColumnID="" DataField="BlancePrice" DataFormatString = "{0:F}"/>
<%-- <f:BoundField runat="server" HeaderText="开票金额" ColumnID="" DataField="RealTotal" DataFormatString = "{0:F}"/> --%>
<%--<f:BoundField runat="server" HeaderText="创建时间" ColumnID="" DataField="CreateTime" />--%> <%--<f:BoundField runat="server" HeaderText="创建时间" ColumnID="" DataField="CreateTime" />--%>
<f:BoundField runat="server" HeaderText="备注" ColumnID="" DataField="Remark" /> <f:BoundField runat="server" HeaderText="备注" ColumnID="" DataField="Remark" />

20
SCP/Views/SupplierData/SCP_INVOICE.aspx.cs

@ -21,12 +21,12 @@ namespace SCP.Views.SupplierData
if (!IsPostBack) if (!IsPostBack)
{ {
TranslatorAgents(Toolbar1); //TranslatorAgents(Toolbar1);
TranslatorAgent(Grid_V_TB_INVOICE); //TranslatorAgent(Grid_V_TB_INVOICE);
TranslatorAgents(FormRow_1); //TranslatorAgents(FormRow_1);
TranslatorAgents(FormRow_2); //TranslatorAgents(FormRow_2);
TranslatorAgents(FormRow_3); //TranslatorAgents(FormRow_3);
TranslatorAgents(FormRow_4); //TranslatorAgents(FormRow_4);
BindInvoice(); BindInvoice();
BindVender(DDL_VEND_LIST); BindVender(DDL_VEND_LIST);
} }
@ -46,7 +46,13 @@ namespace SCP.Views.SupplierData
SearchInvoice(ret => { SearchInvoice(ret => {
Grid_V_TB_INVOICE.RecordCount = ret.Count(); Grid_V_TB_INVOICE.RecordCount = ret.Count();
ret = SortAndPage(ret, Grid_V_TB_INVOICE); ret = SortAndPage(ret, Grid_V_TB_INVOICE);
Grid_V_TB_INVOICE.DataSource = ret; var _ls=ret.ToList();
// _ls.ForEach(p => {
// p.ContractPriceTax = (p.ContractPrice != null) ? decimal.Round((p.ContractPrice.Value * p.Tax.Value), 2) : 0;
// p.DiscountPriceTax = (p.DiscountPriceTax != null) ? decimal.Round((p.DiscountPriceTax.Value * p.Tax.Value), 2) : 0;
// p.RealTotal =( (p.Total!=null)?p.Total.Value:0) + ((p.ContractPrice!=null)?p.ContractPrice.Value:0) + p.ContractPriceTax.Value + ((p.DiscountPrice != null) ? p.DiscountPrice.Value : 0) + p.DiscountPriceTax.Value + ((p.BlancePrice!=null)?p.BlancePrice.Value:0);
// });
Grid_V_TB_INVOICE.DataSource = _ls;
Grid_V_TB_INVOICE.DataBind(); Grid_V_TB_INVOICE.DataBind();
}); });
} }

2
SCP/Views/SupplierData/SCP_INVOICE_CREATE.aspx

@ -16,7 +16,7 @@
<Toolbars> <Toolbars>
<f:Toolbar ID="Toolbar2" runat="server"> <f:Toolbar ID="Toolbar2" runat="server">
<Items> <Items>
<f:Button ID="btnOk" runat="server" EnablePostBack="True" Text="确认创建发票" Icon="Add" OnClick="btnOk_OnClick"> <f:Button ID="btnOk" runat="server" EnablePostBack="True" Text="确认创建发票" Icon="Add" OnClick="btnOk_OnClick" OnClientClick="if(!confirm('是否生成发票?'))return false;" >
</f:Button> </f:Button>
</Items> </Items>

9
SCP/Views/WarehouseData/SCP_INVOICE.aspx.cs

@ -54,11 +54,14 @@ namespace SCP.WarehouseData
Grid_V_TB_INVOICE.RecordCount = result.Count(); Grid_V_TB_INVOICE.RecordCount = result.Count();
var list = SortAndPage<V_TB_INVOICE>(result, Grid_V_TB_INVOICE,"ASC"); var list = SortAndPage<V_TB_INVOICE>(result, Grid_V_TB_INVOICE,"ASC");
var _ls =list.ToList(); var _ls =list.ToList();
_ls.ForEach(p => { //_ls.ForEach(p => {
// p.ContractPriceTax = (p.ContractPrice != null) ? decimal.Round((p.ContractPrice.Value * p.Tax.Value), 2) : 0;
//p.RealTotal = p.Total + p.BlancePrice + p.ContractPrice; // p.DiscountPriceTax = (p.DiscountPriceTax != null) ? decimal.Round((p.DiscountPriceTax.Value * p.Tax.Value), 2) : 0;
// //p.RealTotal = p.Total + p.BlancePrice + p.ContractPrice;
}); // p.RealTotal = ((p.Total != null) ? p.Total.Value : 0) + ((p.ContractPrice != null) ? p.ContractPrice.Value : 0) + p.ContractPriceTax.Value + ((p.DiscountPrice != null) ? p.DiscountPrice.Value : 0) + p.DiscountPriceTax.Value + ((p.BlancePrice != null) ? p.BlancePrice.Value : 0);
//});
Grid_V_TB_INVOICE.DataSource = list; Grid_V_TB_INVOICE.DataSource = list;
Grid_V_TB_INVOICE.DataBind(); Grid_V_TB_INVOICE.DataBind();
}); });

Loading…
Cancel
Save