发票管理增加打印,和推送oa

This commit is contained in:
2024-05-12 20:12:30 +08:00
parent 251422813e
commit 8634720b08
23 changed files with 1959 additions and 41 deletions
+156
View File
@@ -0,0 +1,156 @@
错误信息开始=====>
错误类型:NullReferenceException
错误信息:未将对象引用设置到对象的实例。
错误堆栈:
在 FineUIPro.Mobile.PHTGL.InvoiceManage.InvoiceOrderDetail.Page_Load(Object sender, EventArgs e) 位置 D:\数据\诺必达\赛鼎\SGGL_SeDin\SGGL\FineUIPro.Mobile\PHTGL\InvoiceManage\InvoiceOrderDetail.aspx.cs:行号 55
在 System.EventHandler.Invoke(Object sender, EventArgs e)
在 System.Web.UI.Control.OnLoad(EventArgs e)
在 System.Web.UI.Control.LoadRecursive()
在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
出错时间:05/12/2024 15:53:48
出错文件:http://localhost:60276/PHTGL/InvoiceManage/InvoiceOrderDetail.aspx?InvoiceId=f8087626-f2e5-4cee-8765-54a1a942aac8&Type=0&PersonId=406007bf-c852-4e4d-aa32-060445fc26c4
IP地址:::1
出错时间:05/12/2024 15:53:48
System.ServiceModel.EndpointNotFoundException: 没有终结点在侦听可以接受消息的 http://172.25.0.43/services/OfsTodoDataWebService。这通常是由于不正确的地址或者 SOAP 操作导致的。如果存在此情况,请参见 InnerException 以了解详细信息。 ---> System.Net.WebException: 无法连接到远程服务器 ---> System.Net.Sockets.SocketException: 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。 172.25.0.43:80
在 System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
在 System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception)
--- 内部异常堆栈跟踪的结尾 ---
在 System.Net.HttpWebRequest.GetRequestStream(TransportContext& context)
在 System.Net.HttpWebRequest.GetRequestStream()
在 System.ServiceModel.Channels.HttpOutput.WebRequestHttpOutput.GetOutputStream()
--- 内部异常堆栈跟踪的结尾 ---
Server stack trace:
在 System.ServiceModel.Channels.HttpOutput.WebRequestHttpOutput.GetOutputStream()
在 System.ServiceModel.Channels.HttpOutput.Send(TimeSpan timeout)
在 System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.SendRequest(Message message, TimeSpan timeout)
在 System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
在 System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)
在 System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
在 System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
在 System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
Exception rethrown at [0]:
在 System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
在 System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
在 BLL.OAWebService.OfsTodoDataWebServicePortType.receiveTodoRequestByJson(String in0)
在 BLL.OAWebService.OfsTodoDataWebServicePortTypeClient.receiveTodoRequestByJson(String in0) 位置 D:\数据\诺必达\赛鼎\SGGL_SeDin\SGGL\BLL\Service References\OAWebService\Reference.cs:行号 478
在 BLL.OAWebSevice.Pushoa() 位置 D:\数据\诺必达\赛鼎\SGGL_SeDin\SGGL\BLL\PHTGL\OAWebSevice.cs:行号 470
System.ServiceModel.EndpointNotFoundException: 没有终结点在侦听可以接受消息的 http://172.25.0.43/services/OfsTodoDataWebService。这通常是由于不正确的地址或者 SOAP 操作导致的。如果存在此情况,请参见 InnerException 以了解详细信息。 ---> System.Net.WebException: 无法连接到远程服务器 ---> System.Net.Sockets.SocketException: 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。 172.25.0.43:80
在 System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
在 System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception)
--- 内部异常堆栈跟踪的结尾 ---
在 System.Net.HttpWebRequest.GetRequestStream(TransportContext& context)
在 System.Net.HttpWebRequest.GetRequestStream()
在 System.ServiceModel.Channels.HttpOutput.WebRequestHttpOutput.GetOutputStream()
--- 内部异常堆栈跟踪的结尾 ---
Server stack trace:
在 System.ServiceModel.Channels.HttpOutput.WebRequestHttpOutput.GetOutputStream()
在 System.ServiceModel.Channels.HttpOutput.Send(TimeSpan timeout)
在 System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.SendRequest(Message message, TimeSpan timeout)
在 System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
在 System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)
在 System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
在 System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
在 System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
Exception rethrown at [0]:
在 System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
在 System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
在 BLL.OAWebService.OfsTodoDataWebServicePortType.receiveTodoRequestByJson(String in0)
在 BLL.OAWebService.OfsTodoDataWebServicePortTypeClient.receiveTodoRequestByJson(String in0) 位置 D:\数据\诺必达\赛鼎\SGGL_SeDin\SGGL\BLL\Service References\OAWebService\Reference.cs:行号 478
在 BLL.OAWebSevice.Pushoa() 位置 D:\数据\诺必达\赛鼎\SGGL_SeDin\SGGL\BLL\PHTGL\OAWebSevice.cs:行号 470
错误信息开始=====>
错误类型:EndpointNotFoundException
错误信息:没有终结点在侦听可以接受消息的 http://172.25.0.43/services/OfsTodoDataWebService。这通常是由于不正确的地址或者 SOAP 操作导致的。如果存在此情况,请参见 InnerException 以了解详细信息。
错误堆栈:
Server stack trace:
在 System.ServiceModel.Channels.HttpOutput.WebRequestHttpOutput.GetOutputStream()
在 System.ServiceModel.Channels.HttpOutput.Send(TimeSpan timeout)
在 System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.SendRequest(Message message, TimeSpan timeout)
在 System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
在 System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)
在 System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
在 System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
在 System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
Exception rethrown at [0]:
在 System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
在 System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
在 BLL.OAWebService.OfsTodoDataWebServicePortType.processDoneRequestByJson(String in0)
在 BLL.OAWebService.OfsTodoDataWebServicePortTypeClient.processDoneRequestByJson(String in0) 位置 D:\数据\诺必达\赛鼎\SGGL_SeDin\SGGL\BLL\Service References\OAWebService\Reference.cs:行号 406
在 BLL.OAWebSevice.DoneRequest(String id) 位置 D:\数据\诺必达\赛鼎\SGGL_SeDin\SGGL\BLL\PHTGL\OAWebSevice.cs:行号 605
在 BLL.PhtglInvoiceService.Approve(String invoiceId, Int32 type, String userid, Boolean isAgree, String idea) 位置 D:\数据\诺必达\赛鼎\SGGL_SeDin\SGGL\BLL\PHTGL\InvoiceManage\PhtglInvoiceService .cs:行号 662
在 FineUIPro.Mobile.PHTGL.InvoiceManage.InvoiceOrderDetail.btnAgree_Click(Object sender, EventArgs e) 位置 D:\数据\诺必达\赛鼎\SGGL_SeDin\SGGL\FineUIPro.Mobile\PHTGL\InvoiceManage\InvoiceOrderDetail.aspx.cs:行号 194
在 FineUIPro.Button.OnClick(EventArgs e)
在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
----错误类型:WebException
----错误信息:
----无法连接到远程服务器
----错误堆栈:
在 System.Net.HttpWebRequest.GetRequestStream(TransportContext& context)
在 System.Net.HttpWebRequest.GetRequestStream()
在 System.ServiceModel.Channels.HttpOutput.WebRequestHttpOutput.GetOutputStream()
--------错误类型:SocketException
--------错误信息:
--------由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。 172.25.0.43:80
--------错误堆栈:
在 System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
在 System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception)
出错时间:05/12/2024 15:57:50
出错文件:http://localhost:60276/PHTGL/InvoiceManage/InvoiceOrderDetail.aspx?InvoiceId=f8087626-f2e5-4cee-8765-54a1a942aac8&Type=0&PersonId=406007bf-c852-4e4d-aa32-060445fc26c4
IP地址:::1
出错时间:05/12/2024 15:57:50
错误信息开始=====>
错误类型:EndpointNotFoundException
错误信息:没有终结点在侦听可以接受消息的 http://172.25.0.43/services/OfsTodoDataWebService。这通常是由于不正确的地址或者 SOAP 操作导致的。如果存在此情况,请参见 InnerException 以了解详细信息。
错误堆栈:
Server stack trace:
在 System.ServiceModel.Channels.HttpOutput.WebRequestHttpOutput.GetOutputStream()
在 System.ServiceModel.Channels.HttpOutput.Send(TimeSpan timeout)
在 System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.SendRequest(Message message, TimeSpan timeout)
在 System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
在 System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)
在 System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
在 System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
在 System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
Exception rethrown at [0]:
在 System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
在 System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
在 BLL.OAWebService.OfsTodoDataWebServicePortType.processDoneRequestByJson(String in0)
在 BLL.OAWebService.OfsTodoDataWebServicePortTypeClient.processDoneRequestByJson(String in0)
在 BLL.OAWebSevice.DoneRequest(String id)
在 BLL.PhtglInvoiceService.Approve(String invoiceId, Int32 type, String userid, Boolean isAgree, String idea)
在 FineUIPro.Mobile.PHTGL.InvoiceManage.InvoiceOrderDetail.btnDisgree_Click(Object sender, EventArgs e) 位置 D:\数据\诺必达\赛鼎\SGGL_SeDin\SGGL\FineUIPro.Mobile\PHTGL\InvoiceManage\InvoiceOrderDetail.aspx.cs:行号 212
在 FineUIPro.Button.OnClick(EventArgs e)
在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
----错误类型:WebException
----错误信息:
----无法连接到远程服务器
----错误堆栈:
在 System.Net.HttpWebRequest.GetRequestStream(TransportContext& context)
在 System.Net.HttpWebRequest.GetRequestStream()
在 System.ServiceModel.Channels.HttpOutput.WebRequestHttpOutput.GetOutputStream()
--------错误类型:SocketException
--------错误信息:
--------由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。 172.25.0.43:80
--------错误堆栈:
在 System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
在 System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception)
出错时间:05/12/2024 20:10:23
出错文件:http://localhost:60276/PHTGL/InvoiceManage/InvoiceOrderDetail.aspx?InvoiceId=f8087626-f2e5-4cee-8765-54a1a942aac8&Type=0&PersonId=e79671b9-6ea9-46c3-8aa1-b5ea057bd4bc
IP地址:::1
出错时间:05/12/2024 20:10:23
@@ -143,6 +143,7 @@
<Content Include="PHTGL\BiddingManagement\BidDocumentsReviewDetail.aspx" />
<Content Include="PHTGL\BiddingManagement\SetSubReviewDetail.aspx" />
<Content Include="PHTGL\ContractCompile\ContractReviewDetail.aspx" />
<Content Include="PHTGL\InvoiceManage\InvoiceOrderDetail.aspx" />
<Content Include="res\images\logo\logo.psd" />
<Content Include="res\images\logo\logo_127.psd" />
<Content Include="res\index\css\font\digifacewide.ttf" />
@@ -3385,6 +3386,13 @@
<Compile Include="PHTGL\ContractCompile\ContractReviewDetail.aspx.designer.cs">
<DependentUpon>ContractReviewDetail.aspx</DependentUpon>
</Compile>
<Compile Include="PHTGL\InvoiceManage\InvoiceOrderDetail.aspx.cs">
<DependentUpon>InvoiceOrderDetail.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="PHTGL\InvoiceManage\InvoiceOrderDetail.aspx.designer.cs">
<DependentUpon>InvoiceOrderDetail.aspx</DependentUpon>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="res\umeditor\net\imageUp.ashx.cs">
<DependentUpon>imageUp.ashx</DependentUpon>
@@ -0,0 +1,179 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="InvoiceOrderDetail.aspx.cs" Inherits="FineUIPro.Mobile.PHTGL.InvoiceManage.InvoiceOrderDetail" %>
<!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 type="text/css">
.f-readonly {
opacity: .5;
filter: alpha(opacity=50);
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div>
<f:PageManager runat="server" AutoSizePanelID="Form2" />
<f:Form ID="Form2" ShowBorder="false" ShowHeader="false" AutoScroll="true" Title="入库单详情"
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
<Toolbars>
<%--<f:Toolbar ID="TbCreate" Position="Top" ToolbarAlign="Right" runat="server" Hidden="True">
<Items>
<f:Button ID="btnSave" ToolTip="保存" Text="保存" Icon="SystemSave" OnClick="btnSave_Click"
EnablePostBack="true" runat="server">
</f:Button>
<f:Button ID="btnEditProcess" ToolTip="编辑流程" Text="编辑流程" Icon="ApplicationEdit" OnClick="btnEditProcess_Click"
EnablePostBack="true" runat="server">
</f:Button>
</Items>
</f:Toolbar>--%>
<f:Toolbar ID="TbApprove" Position="Top" ToolbarAlign="Right" runat="server" Hidden="True">
<items>
<f:Button ID="btnAgree" Icon="SystemSave" runat="server" ToolTip="同意" Text="同意" ValidateForms="SimpleForm1"
OnClick="btnAgree_Click" ConfirmText="请确认是否同意!" Size="Medium">
</f:Button>
<f:Button ID="btnDisgree" Icon="SystemSave" runat="server" ToolTip="不同意" Text="不同意" ValidateForms="SimpleForm1"
OnClick="btnDisgree_Click" ConfirmText="请确认是否不同意!" Size="Medium">
</f:Button>
</items>
</f:Toolbar>
</Toolbars>
<Items>
<f:Panel ID="Panel4" Layout="Column" ShowHeader="false" ShowBorder="false" runat="server">
<Items>
<f:TextBox ID="txtProjectName" Label="项目名称" Readonly="true" ColumnWidth="40%" runat="server">
</f:TextBox>
<f:TextBox ID="txtContractNum" Label="合同编号" Readonly="true" ColumnWidth="30%" runat="server">
</f:TextBox>
<f:TextBox ID="txtSellerName" Label="供应商名称" Readonly="true" ColumnWidth="30%" runat="server">
</f:TextBox>
</Items>
</f:Panel>
<f:Panel ID="PanelOrderIn" Layout="Column" ShowHeader="false" ShowBorder="false" runat="server" Hidden="True">
<Items>
<f:DatePicker ID="txtOrderInDate" Label="入库日期" ColumnWidth="40%" runat="server"></f:DatePicker>
<f:TextBox ID="txtInvoiceDate" Label="发票日期" Readonly="true" ColumnWidth="30%" runat="server"></f:TextBox>
<f:TextBox ID="txtOrderCode" Label="入库单编号" ColumnWidth="30%" runat="server">
</f:TextBox>
</Items>
</f:Panel>
<f:Panel ID="PanelOrderOut" Layout="Column" ShowHeader="false" ShowBorder="false" runat="server" Hidden="True">
<Items>
<f:DatePicker ID="txtOrderOutDate" Label="出库日期" ColumnWidth="40%" runat="server"></f:DatePicker>
<f:TextBox ID="txtMaterialRequisitionUnit" Label="领料单位" ColumnWidth="30%" runat="server"></f:TextBox>
</Items>
</f:Panel>
<f:TextBox ID="txtInvoiceNumber" Label="发票号码" Readonly="true" ColumnWidth="40%" runat="server">
</f:TextBox>
<f:Grid ID="Grid1" ShowBorder="true" EnableAjax="false" ShowHeader="true" Title="入库单列表"
runat="server" BoxFlex="1" DataKeyNames="InvoiceDetailId" AllowCellEditing="true" ForceFit="true"
DataIDField="InvoiceDetailId" EnableColumnLines="true" Height="400" EnableBigData="true" OnRowCommand="Grid1_OnRowCommand" OnRowDataBound="Grid1_RowDataBound"
EnableTextSelection="True">
<Columns>
<f:TemplateField ColumnID="tfPageIndex" Width="100px" HeaderText="序号" HeaderTextAlign="Center" TextAlign="Center"
EnableLock="true" Locked="False">
<ItemTemplate>
<asp:Label ID="lblPageIndex" runat="server" Text='<%# Grid1.PageIndex * Grid1.PageSize + Container.DataItemIndex + 1 %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:RenderField Width="300px" ColumnID="GoodsOrServicesName" DataField="GoodsOrServicesName" SortField="GoodsOrServicesName"
FieldType="String" HeaderText="产品名称" TextAlign="Center" HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="150px" ColumnID="SpecificationModel" DataField="SpecificationModel" SortField="SpecificationModel"
FieldType="String" HeaderText="产品规格" TextAlign="Center" HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="150px" ColumnID="Unit" DataField="Unit" SortField="Unit"
FieldType="String" HeaderText="计量单位" TextAlign="Center" HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="150px" ColumnID="Quantity" DataField="Quantity" SortField="Quantity"
FieldType="String" HeaderText="数量" TextAlign="Center" HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="230px" ColumnID="UnitPrice" DataField="UnitPrice" SortField="UnitPrice"
FieldType="String" HeaderText="未含税单价(元)" TextAlign="Center" HeaderTextAlign="Center">
</f:RenderField>
<f:TemplateField Width="200px" EnableColumnHide="false" ColumnID="NoTaxPrice" HeaderText="未税金额(元)" TextAlign="Center">
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# GetNoTaxPrice(Eval("Amount"),Eval("Tax")) %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:TemplateField Width="150px" EnableColumnHide="false" ColumnID="TaxRate" HeaderText="税率(%)" TextAlign="Center">
<ItemTemplate>
<asp:Label ID="Label2" runat="server" Text='<%# GetTaxRate(Eval("TaxRate")) %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:RenderField Width="150px" ColumnID="Tax" DataField="Tax" SortField="Tax"
FieldType="String" HeaderText="税额(元)" TextAlign="Center" HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="200px" ColumnID="Amount" DataField="Amount" SortField="Amount"
FieldType="String" HeaderText="价税合计(元)" TextAlign="Center" HeaderTextAlign="Center">
</f:RenderField>
<f:LinkButtonField Width="100px" ColumnID="btnDelete" TextAlign="Center" CommandName="delete" Icon="Delete" ConfirmText="确定要删除本行?" ConfirmTarget="Top" />
</Columns>
</f:Grid>
<f:Panel ID="Panel1" Layout="Column" ShowHeader="True" ShowBorder="False" Margin="10 10 0 0" Title="统计信息" runat="server">
<Items>
<f:TextBox ID="txtSumUnitPrice" Label="未税金额(元)" Readonly="True" ColumnWidth="25%" runat="server"></f:TextBox>
<f:TextBox ID="txtSumTax" Label="税额(元)" Readonly="True" ColumnWidth="25%" runat="server"></f:TextBox>
<f:TextBox ID="txtSumAmount" Label="价税合计(元)" Readonly="True" ColumnWidth="25%" runat="server"></f:TextBox>
<f:TextBox ID="txtAmountInWords" Label="金额大写" Readonly="True" ColumnWidth="25%" runat="server"></f:TextBox>
</Items>
</f:Panel>
<f:Form ID="Form_approve" ShowBorder="false" ShowHeader="false" AutoScroll="true" Title="审批流程" Hidden="True"
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
<Items>
<f:TextArea ID="txtApproveIdea" Height="100px" Required="true" Label="审批意见" ShowRedStar="true" runat="server" Text="">
</f:TextArea>
<f:Grid ID="Grid2" ShowBorder="true" EnableAjax="false" ShowHeader="true" Title="审批记录"
runat="server" BoxFlex="1" DataKeyNames="ApproveId" AllowCellEditing="true" ForceFit="true"
ClicksToEdit="2" DataIDField="ApproveId" EnableColumnLines="true" Height="400" EnableBigData="true"
EnableTextSelection="True">
<Columns>
<f:TemplateField ColumnID="tfPageIndex" Width="55px" HeaderText="序号" HeaderTextAlign="Center" TextAlign="Center"
EnableLock="true" Locked="False">
<ItemTemplate>
<asp:Label ID="Label3" runat="server" Text='<%# Grid1.PageIndex * Grid1.PageSize + Container.DataItemIndex + 1 %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:RenderField ColumnID="ApproveMan" DataField="ApproveMan" Width="150px" FieldType="String" HeaderText="审批人" TextAlign="Center"
HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField ColumnID="IsAgree" DataField="IsAgree" Width="150px" FieldType="String" HeaderText="是否同意" TextAlign="Center"
HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField ColumnID="ApproveIdea" DataField="ApproveIdea" Width="320px" FieldType="String" HeaderText="审批意见" TextAlign="Left"
HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField ColumnID="ApproveDate" DataField="ApproveDate" Width="320px" FieldType="String" HeaderText="审批时间" TextAlign="Left"
HeaderTextAlign="Center">
</f:RenderField>
</Columns>
</f:Grid>
</Items>
</f:Form>
</Items>
</f:Form>
</div>
<f:Window ID="Window1" runat="server" Hidden="true" ShowHeader="true"
IsModal="true" Target="Parent" EnableMaximize="true" EnableResize="true"
Title="编辑" EnableIFrame="true" Height="650px"
Width="1200px">
</f:Window>
</form>
</body>
</html>
@@ -0,0 +1,228 @@
using BLL;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace FineUIPro.Mobile.PHTGL.InvoiceManage
{
public partial class InvoiceOrderDetail : PageBase
{
public string InvoiceId
{
get
{
return (string)ViewState["InvoiceId"];
}
set
{
ViewState["InvoiceId"] = value;
}
}
public string Type
{
get
{
return (string)ViewState["Type"];
}
set
{
ViewState["Type"] = value;
}
}
public string PersonId
{
get
{
PersonId = Request.Params["PersonId"];
return (string)ViewState["PersonId"];
}
set
{
ViewState["PersonId"] = value;
}
}
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
InvoiceId = Request.QueryString["InvoiceId"];
Type = Request.QueryString["Type"];
Model.PHTGL_Invoice table = new Model.PHTGL_Invoice();
table.InvoiceId = InvoiceId;
var invoiceModel = BLL.PhtglInvoiceService.GetPHTGL_InvoiceById(InvoiceId);
var ContractModel = BLL.ContractService.GetContractById(invoiceModel.ContractId);
if (invoiceModel != null)
{
txtProjectName.Text = ProjectService.GetProjectNameByProjectId(invoiceModel.ProjectId);
txtContractNum.Text = ContractModel?.ContractNum;
txtSellerName.Text = invoiceModel.SellerName;
txtOrderInDate.SelectedDate = invoiceModel.OrderInDate;
txtInvoiceDate.Text = invoiceModel.InvoiceDate;
txtOrderCode.Text = invoiceModel.OrderCode;
txtInvoiceNumber.Text = invoiceModel.InvoiceNumber;
txtOrderOutDate.SelectedDate = invoiceModel.OrderOutDate;
txtMaterialRequisitionUnit.Text = invoiceModel.MaterialRequisitionUnit;
}
BindGrid();
BindApproveData();
if (Type == "0")
{
Grid1.Title = "入库单列表";
PanelOrderIn.Hidden = false;
}
else if (Type == "1")
{
PanelOrderOut.Hidden = false;
Grid1.Title = "出库单列表";
}
if (invoiceModel.CreateUser == PersonId) //创建人
{
// TbCreate.Hidden = false;
if (invoiceModel.State > PhtglInvoiceService.StateCreate)
{
Form_approve.Hidden = false;
}
}
if (PHTGL_ApproveService.IsApprovingMan(InvoiceId, PersonId)) //判断当前人是否审批人
{
TbApprove.Hidden = false;
Form_approve.Hidden = false;
}
}
}
public void BindApproveData()
{
var approveModel = PHTGL_ApproveService.GetAllApproveData(InvoiceId, Type == "0" ? "Invoice_Input" : "Invoice_Output");
if (approveModel != null)
{
Grid2.DataSource = approveModel;
Grid2.DataBind();
}
}
public void BindGrid()
{
var invoiceDetail = PhtglInvoicedetailService.GetPHTGL_InvoiceDetailByInvoiceId(InvoiceId);
Grid1.DataSource = invoiceDetail;
Grid1.DataBind();
txtSumUnitPrice.Text = invoiceDetail.Sum(p => p.UnitPrice).ToString();
txtSumTax.Text = invoiceDetail.Sum(p => p.Tax).ToString();
txtSumAmount.Text = invoiceDetail.Sum(p => p.Amount).ToString();
txtAmountInWords.Text = Funs.NumericCapitalization(invoiceDetail.Sum(p => p.Amount) ?? 0);
}
protected void Grid1_OnRowCommand(object sender, GridCommandEventArgs e)
{
if (e.CommandName == "delete")
{
PhtglInvoicedetailService.DeletePHTGL_InvoiceDetailById(e.RowID);
BindGrid();
}
}
protected void Grid1_RowDataBound(object sender, GridRowEventArgs e)
{
if (Type == "1")
{
Grid1.FindColumn("btnDelete").Hidden = true;
}
}
protected string GetTaxRate(object eval)
{
string result = "";
if (eval != null)
{
decimal taxRate = Convert.ToDecimal(eval);
string percentage = string.Format("{0:P0}", taxRate);
result = percentage.Replace("%", "");
}
return result;
}
protected string GetNoTaxPrice(object amount, object tax)
{
//获取amount-tax 的值
string result = "";
if (amount != null && tax != null)
{
decimal amountValue = Convert.ToDecimal(amount);
decimal taxValue = Convert.ToDecimal(tax);
decimal noTaxPrice = amountValue - taxValue;
result = noTaxPrice.ToString();
}
return result;
}
protected void btnSave_Click(object sender, EventArgs e)
{
var invoiceModel = BLL.PhtglInvoiceService.GetPHTGL_InvoiceById(InvoiceId);
invoiceModel.OrderInDate = txtOrderInDate.SelectedDate;
invoiceModel.OrderOutDate = txtOrderOutDate.SelectedDate;
invoiceModel.OrderCode = txtOrderCode.Text;
invoiceModel.MaterialRequisitionUnit = txtMaterialRequisitionUnit.Text;
BLL.PhtglInvoiceService.UpdatePHTGL_Invoice(invoiceModel);
ShowNotify("保存成功!", MessageBoxIcon.Success);
}
protected void btnEditProcess_Click(object sender, EventArgs e)
{
if (Type == "0")
{
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("InvoiceOrderReviewEdit.aspx?InvoiceId={0}&&Type={1}", InvoiceId, "0", "编辑 - ")));
}
else if (Type == "1")
{
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("InvoiceOrderReviewEdit.aspx?InvoiceId={0}&&Type={1}", InvoiceId, "1", "编辑 - ")));
}
}
protected void btnAgree_Click(object sender, EventArgs e)
{
PhtglInvoiceService.Approve(InvoiceId, int.Parse(Type), PersonId, true, txtApproveIdea.Text);
ShowNotify("审批成功!", MessageBoxIcon.Success);
if (!string.IsNullOrEmpty(Request.Params["PHTUrl"]))
{
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
PageContext.RegisterStartupScript("closeActiveTab();");
}
else
{
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
}
}
protected void btnDisgree_Click(object sender, EventArgs e)
{
PhtglInvoiceService.Approve(InvoiceId, int.Parse(Type), PersonId, false, txtApproveIdea.Text);
ShowNotify("审批成功!", MessageBoxIcon.Success);
if (!string.IsNullOrEmpty(Request.Params["PHTUrl"]))
{
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
PageContext.RegisterStartupScript("closeActiveTab();");
}
else
{
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
}
}
}
}
@@ -0,0 +1,296 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Mobile.PHTGL.InvoiceManage
{
public partial class InvoiceOrderDetail
{
/// <summary>
/// form1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// Form2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Form Form2;
/// <summary>
/// TbApprove 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar TbApprove;
/// <summary>
/// btnAgree 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnAgree;
/// <summary>
/// btnDisgree 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnDisgree;
/// <summary>
/// Panel4 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel Panel4;
/// <summary>
/// txtProjectName 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtProjectName;
/// <summary>
/// txtContractNum 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtContractNum;
/// <summary>
/// txtSellerName 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtSellerName;
/// <summary>
/// PanelOrderIn 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel PanelOrderIn;
/// <summary>
/// txtOrderInDate 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtOrderInDate;
/// <summary>
/// txtInvoiceDate 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtInvoiceDate;
/// <summary>
/// txtOrderCode 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtOrderCode;
/// <summary>
/// PanelOrderOut 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel PanelOrderOut;
/// <summary>
/// txtOrderOutDate 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtOrderOutDate;
/// <summary>
/// txtMaterialRequisitionUnit 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtMaterialRequisitionUnit;
/// <summary>
/// txtInvoiceNumber 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtInvoiceNumber;
/// <summary>
/// Grid1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Grid Grid1;
/// <summary>
/// lblPageIndex 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblPageIndex;
/// <summary>
/// Label1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label1;
/// <summary>
/// Label2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label2;
/// <summary>
/// Panel1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel Panel1;
/// <summary>
/// txtSumUnitPrice 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtSumUnitPrice;
/// <summary>
/// txtSumTax 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtSumTax;
/// <summary>
/// txtSumAmount 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtSumAmount;
/// <summary>
/// txtAmountInWords 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtAmountInWords;
/// <summary>
/// Form_approve 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Form Form_approve;
/// <summary>
/// txtApproveIdea 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextArea txtApproveIdea;
/// <summary>
/// Grid2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Grid Grid2;
/// <summary>
/// Label3 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label3;
/// <summary>
/// Window1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window Window1;
}
}