This commit is contained in:
高飞 2024-05-16 09:15:29 +08:00
commit 493f1a5ab5
23 changed files with 1959 additions and 41 deletions

Binary file not shown.

View File

@ -1214,6 +1214,31 @@ namespace BLL
} }
return list; return list;
} }
public static DataTable ToDataTable<T>(this T[] entities)
{
DataTable dataTable = new DataTable(typeof(T).Name);
PropertyInfo[] properties = typeof(T).GetProperties(BindingFlags.Public | BindingFlags.Instance);
foreach (PropertyInfo propInfo in properties)
{
dataTable.Columns.Add(propInfo.Name, propInfo.PropertyType);
}
foreach (T entity in entities)
{
object[] values = new object[properties.Length];
for (int i = 0; i < properties.Length; i++)
{
values[i] = properties[i].GetValue(entity);
}
dataTable.Rows.Add(values);
}
return dataTable;
}
/// <summary> /// <summary>
/// 在设定的数值内产生随机数的数量 /// 在设定的数值内产生随机数的数量
/// </summary> /// </summary>

View File

@ -17,6 +17,8 @@ namespace BLL
public const string SetSubReview = "SetSubReview"; public const string SetSubReview = "SetSubReview";
public const string ContractReview = "ContractReview"; public const string ContractReview = "ContractReview";
public const string ContractReview_Countersign = "ContractReview_Countersign"; public const string ContractReview_Countersign = "ContractReview_Countersign";
public const string Invoice_Input = "Invoice_Input";
public const string Invoice_Output = "Invoice_Output";
public static Model.PHTGL_Approve GetPHTGL_ApproveById(string ApproveId) public static Model.PHTGL_Approve GetPHTGL_ApproveById(string ApproveId)
{ {
@ -170,7 +172,7 @@ namespace BLL
/// <returns></returns> /// <returns></returns>
public static List<Model.PHTGL_Approve> GetApproves_NopushOa() public static List<Model.PHTGL_Approve> GetApproves_NopushOa()
{ {
var q = (from x in Funs.DB.PHTGL_Approve where x.IsPushOa == 0 && x.ApproveMan != "" select x).ToList(); var q = (from x in Funs.DB.PHTGL_Approve where x.IsPushOa == 0 && x.ApproveMan != "" && x.State==0 select x).ToList();
return q; return q;
} }
/// <summary> /// <summary>

View File

@ -3,13 +3,16 @@ using FineUIPro;
using MiniExcelLibs; using MiniExcelLibs;
using MiniExcelLibs.Attributes; using MiniExcelLibs.Attributes;
using Model; using Model;
using NPOI.SS.Formula.Eval;
using NPOI.SS.Formula.Functions; using NPOI.SS.Formula.Functions;
using Org.BouncyCastle.Security;
using System; using System;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using System.Diagnostics.Contracts; using System.Diagnostics.Contracts;
using System.Linq; using System.Linq;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using System.Security.Cryptography;
using System.Text; using System.Text;
using WIA; using WIA;
@ -108,7 +111,7 @@ namespace BLL
where where
(string.IsNullOrEmpty(table.InvoiceId) || x.InvoiceId.Contains(table.InvoiceId)) && (string.IsNullOrEmpty(table.InvoiceId) || x.InvoiceId.Contains(table.InvoiceId)) &&
(string.IsNullOrEmpty(table.ProjectId) || x.ProjectId.Contains(table.ProjectId)) && (string.IsNullOrEmpty(table.ProjectId) || x.ProjectId.Contains(table.ProjectId)) &&
(string.IsNullOrEmpty(table.ContractId) || x.ProjectId.Contains(table.ContractId)) && (string.IsNullOrEmpty(table.ContractId) || x.ContractId.Contains(table.ContractId)) &&
(string.IsNullOrEmpty(table.InvoiceCode) || x.InvoiceCode.Contains(table.InvoiceCode)) && (string.IsNullOrEmpty(table.InvoiceCode) || x.InvoiceCode.Contains(table.InvoiceCode)) &&
(string.IsNullOrEmpty(table.InvoiceNumber) || x.InvoiceNumber.Contains(table.InvoiceNumber)) && (string.IsNullOrEmpty(table.InvoiceNumber) || x.InvoiceNumber.Contains(table.InvoiceNumber)) &&
(string.IsNullOrEmpty(table.SellerName) || x.SellerName.Contains(table.SellerName)) && (string.IsNullOrEmpty(table.SellerName) || x.SellerName.Contains(table.SellerName)) &&
@ -174,9 +177,29 @@ namespace BLL
}); });
} }
public static IEnumerable GetOrderInListData(Model.PHTGL_Invoice table, Grid grid1)
public static IEnumerable GetOrderInListData(Model.PHTGL_Invoice table, Grid grid1,string state)
{ {
var q = GetPHTGL_InvoiceByModle(table); var q = GetPHTGL_InvoiceByModle(table);
switch (state)
{
case "0": q = q.Where(x => x.State > StateDataIn); //全部
break;
case "1":
q = q.Where(x => x.State > StateDataIn &&x.State< StateInPutApproveSuccess); //未入库
break;
case "2":
q = q.Where(x => x.State >= StateInPutApproveSuccess ); //已入库
break;
case "3":
q = q.Where(x => x.State >=StateInPutApproveSuccess && x.State < StateOutPutApproveSuccess);//未出库
break;
case "4":
q = q.Where(x => x.State == StateOutPutApproveSuccess);//已出库
break;
}
Count = q.Count(); Count = q.Count();
if (Count == 0) if (Count == 0)
{ {
@ -224,6 +247,60 @@ namespace BLL
return Funs.DB.PHTGL_Invoice.FirstOrDefault(x => x.InvoiceId == InvoiceId); return Funs.DB.PHTGL_Invoice.FirstOrDefault(x => x.InvoiceId == InvoiceId);
} }
public static PHTGL_InvoicePrintModel GetPHTGL_InvoicePrintModel(string InvoiceId)
{
var result = new PHTGL_InvoicePrintModel();
Order order = new Order();
List<OrderDetail> orderDetails = new List<OrderDetail>();
OrderApproveIn orderApproveIn = new OrderApproveIn();
OrderApproveOut orderApproveOut = new OrderApproveOut();
var invoiceModel = GetPHTGL_InvoiceById(InvoiceId);
var invoiceDetail = PhtglInvoicedetailService.GetPHTGL_InvoiceDetailByInvoiceId(InvoiceId);
var approveManModels = GetInvoiceApproveManEntity(InvoiceId);
//将invoiceModel 映射到order
var mapper = EmitMapper.ObjectMapperManager.DefaultInstance.GetMapper<PHTGL_Invoice, Order>();
order=mapper.Map(invoiceModel);
order.ProjectName=ProjectService.GetProjectNameByProjectId(invoiceModel.ProjectId);
order.ContractCode=ContractService.GetContractById(invoiceModel.ContractId)?.ContractNum;
//invoiceDetail 映射到orderDetails
var mapper2 = EmitMapper.ObjectMapperManager.DefaultInstance.GetMapper<List<PHTGL_InvoiceDetail>, List<OrderDetail>>();
orderDetails = mapper2.Map(invoiceDetail);
orderDetails= orderDetails.Select(x => new OrderDetail
{
GoodsOrServicesName = x.GoodsOrServicesName,
SpecificationModel = x.SpecificationModel,
Unit = x.Unit,
Quantity = x.Quantity,
UnitPrice = x.UnitPrice,
NoTaxPrice = x.Amount - x.Tax,
TaxRate = string.Format("{0:P0}", Convert.ToDecimal(x.TaxRate) ),
Tax =x.Tax ,
Amount = x.Amount,
}).ToList();
if (approveManModels!=null)
{
orderApproveIn.ProjectManager = !string.IsNullOrEmpty(approveManModels.InputApproveMan.ProjectManager) ? BLL.Person_PersonsService.getSignatureUrl(approveManModels.InputApproveMan.ProjectManager) : "";
orderApproveIn.ControlManager = !string.IsNullOrEmpty(approveManModels.InputApproveMan.ControlManager) ? BLL.Person_PersonsService.getSignatureUrl(approveManModels.InputApproveMan.ControlManager) : "";
orderApproveIn.ConstructionManager = !string.IsNullOrEmpty(approveManModels.InputApproveMan.ConstructionManager) ? BLL.Person_PersonsService.getSignatureUrl(approveManModels.InputApproveMan.ConstructionManager) : "";
orderApproveIn.ProfessionalEngineer = !string.IsNullOrEmpty(approveManModels.InputApproveMan.ProfessionalEngineer) ? BLL.Person_PersonsService.getSignatureUrl(approveManModels.InputApproveMan.ProfessionalEngineer) : "";
orderApproveOut.ProjectManager = !string.IsNullOrEmpty(approveManModels.OutputApproveMan.ProjectManager) ? BLL.Person_PersonsService.getSignatureUrl(approveManModels.OutputApproveMan.ProjectManager) : "";
orderApproveOut.ControlManager = !string.IsNullOrEmpty(approveManModels.OutputApproveMan.ControlManager) ? BLL.Person_PersonsService.getSignatureUrl(approveManModels.OutputApproveMan.ControlManager) : "";
orderApproveOut.PurchasingMan = !string.IsNullOrEmpty(approveManModels.OutputApproveMan.PurchasingMan) ? BLL.Person_PersonsService.getSignatureUrl(approveManModels.OutputApproveMan.PurchasingMan) : "";
orderApproveOut.ConUnitMaterialOfficer = !string.IsNullOrEmpty(approveManModels.OutputApproveMan.ConUnitMaterialOfficer) ? BLL.Person_PersonsService.getSignatureUrl(approveManModels.OutputApproveMan.ConUnitMaterialOfficer) : "";
orderApproveOut.ConUnitProjectManager = !string.IsNullOrEmpty(approveManModels.OutputApproveMan.ConUnitProjectManager) ? BLL.Person_PersonsService.getSignatureUrl(approveManModels.OutputApproveMan.ConUnitProjectManager) : "";
}
result.Order = order;
result.Data = orderDetails;
result.ApproveIn = orderApproveIn;
result.ApproveOut = orderApproveOut;
return result;
}
/// <summary> /// <summary>
/// 添加实体 /// 添加实体
/// </summary> /// </summary>
@ -518,6 +595,7 @@ namespace BLL
_Approve.State = 0; _Approve.State = 0;
_Approve.IsAgree = 0; _Approve.IsAgree = 0;
_Approve.ApproveIdea = ""; _Approve.ApproveIdea = "";
_Approve.IsPushOa = 0;
_Approve.ApproveType = approveManModels.Rolename; _Approve.ApproveType = approveManModels.Rolename;
_Approve.ApproveForm =(type==0? "Invoice_Input": "Invoice_Output"); _Approve.ApproveForm =(type==0? "Invoice_Input": "Invoice_Output");
BLL.PHTGL_ApproveService.AddPHTGL_Approve(_Approve); BLL.PHTGL_ApproveService.AddPHTGL_Approve(_Approve);
@ -580,6 +658,8 @@ namespace BLL
model.State = (type == 0 ? StateInPutApproveRefuse : StateOutPutApproveRefuse); model.State = (type == 0 ? StateInPutApproveRefuse : StateOutPutApproveRefuse);
UpdatePHTGL_Invoice(model); UpdatePHTGL_Invoice(model);
} }
OAWebSevice.Pushoa();
OAWebSevice.DoneRequest(thisApprovemodel.ApproveId);
} }
} }

View File

@ -5,7 +5,14 @@ namespace BLL
{ {
public static class OAWebSevice public static class OAWebSevice
{ {
/// <summary>
/// 获取推送OA的PCurl
/// </summary>
/// <param name="projectid"></param>
/// <param name="formname"></param>
/// <param name="ID"></param>
/// <param name="personId"></param>
/// <returns></returns>
public static string geturl(string projectid, string formname, string ID, string personId) public static string geturl(string projectid, string formname, string ID, string personId)
{ {
//string SGGLUrl = Funs.SGGLUrl.Substring(Funs.SGGLUrl.IndexOf("//")+2); //string SGGLUrl = Funs.SGGLUrl.Substring(Funs.SGGLUrl.IndexOf("//")+2);
@ -37,12 +44,26 @@ namespace BLL
case ActionPlanListApproveService.ActionPlanListEdit: case ActionPlanListApproveService.ActionPlanListEdit:
PHTUrl = string.Format("PHTUrl=ZHGL/Plan/ActionPlanListEdit.aspx?ActionPlanListId={0}", ID); PHTUrl = string.Format("PHTUrl=ZHGL/Plan/ActionPlanListEdit.aspx?ActionPlanListId={0}", ID);
break; break;
case PHTGL_ApproveService.Invoice_Input:
PHTUrl = string.Format("PHTUrl=PHTGL/InvoiceManage/InvoiceOrderDetail.aspx?InvoiceId={0}&Type=0", ID);
break;
case PHTGL_ApproveService.Invoice_Output:
PHTUrl = string.Format("PHTUrl=PHTGL/InvoiceManage/InvoiceOrderDetail.aspx?InvoiceId={0}&Type=1", ID);
break;
} }
url = url + PHTUrl; url = url + PHTUrl;
//LogService.AddSys_Log(Person_PersonsService.GetPerson_PersonsById(personId),"", ID, "ActionPlanListEdit",url); //LogService.AddSys_Log(Person_PersonsService.GetPerson_PersonsById(personId),"", ID, "ActionPlanListEdit",url);
return url; return url;
} }
/// <summary>
/// 获取推送OA的Appurl
/// </summary>
/// <param name="projectid"></param>
/// <param name="formname"></param>
/// <param name="ID"></param>
/// <param name="userid"></param>
/// <returns></returns>
public static string getAppurl(string projectid, string formname, string ID, string userid) public static string getAppurl(string projectid, string formname, string ID, string userid)
{ {
string mobileWebUrl = Funs.MobileWebUrl; string mobileWebUrl = Funs.MobileWebUrl;
@ -65,12 +86,18 @@ namespace BLL
case PHTGL_ApproveService.ContractReview: case PHTGL_ApproveService.ContractReview:
PHTUrl = string.Format("PHTGL/ContractCompile/{0}Detail.aspx?ContractReviewId={1}&PersonId={2}", formname, ID, userid); PHTUrl = string.Format("PHTGL/ContractCompile/{0}Detail.aspx?ContractReviewId={1}&PersonId={2}", formname, ID, userid);
break; break;
case PHTGL_ApproveService.Invoice_Input:
PHTUrl = string.Format("PHTGL/InvoiceManage/InvoiceOrderDetail.aspx?InvoiceId={0}&Type=0&PersonId={1}", ID, userid);
break;
case PHTGL_ApproveService.Invoice_Output:
PHTUrl = string.Format("PHTGL/InvoiceManage/InvoiceOrderDetail.aspx?InvoiceId={0}&Type=1&PersonId={1}", ID, userid);
break;
} }
url = url + PHTUrl; url = url + PHTUrl;
return url; return url;
} }
/// <summary> /// <summary>
/// 获取审批表单主界面 /// 获取审批表单主界面(用于推送给创建者)
/// </summary> /// </summary>
/// <param name="projectid"></param> /// <param name="projectid"></param>
/// <param name="formname"></param> /// <param name="formname"></param>
@ -103,6 +130,12 @@ namespace BLL
case PHTGL_ApproveService.ContractReview_Countersign: case PHTGL_ApproveService.ContractReview_Countersign:
PHTUrl = string.Format("PHTUrl=PHTGL/ContractCompile/{0}.aspx", formname); PHTUrl = string.Format("PHTUrl=PHTGL/ContractCompile/{0}.aspx", formname);
break; break;
case PHTGL_ApproveService.Invoice_Input:
PHTUrl = string.Format("PHTUrl=PHTGL/InvoiceManage/InvoiceOrder.aspx");
break;
case PHTGL_ApproveService.Invoice_Output:
PHTUrl = string.Format("PHTUrl=PHTGL/InvoiceManage/InvoiceOrder.aspx");
break;
} }
url = url + PHTUrl; url = url + PHTUrl;
return url; return url;
@ -226,6 +259,38 @@ namespace BLL
} }
break; break;
case PHTGL_ApproveService.Invoice_Input:
var invoice = BLL.PhtglInvoiceService.GetPHTGL_InvoiceById(users.ContractId);
if (invoice != null)
{
var gereceiver = BLL.Person_PersonsService.GetPerson_PersonsById(invoice.CreateUser);
var geCreatUser = BLL.Person_PersonsService.GetPerson_PersonsById(users.ApproveMan);
var project = BLL.ProjectService.GetProjectByProjectId(invoice.ProjectId);
webJson.flowid = users.ApproveId;
webJson.requestname = "入库单审批(被拒) " + project.ProjectName;
webJson.nodename = users.ApproveType;
webJson.creator = geCreatUser.JobNum;
webJson.receiver = gereceiver.JobNum;
webJson.pcurl = geturl_Form(invoice.ProjectId, PHTGL_ApproveService.Invoice_Input, gereceiver.PersonId);
webJson.appurl = getAppurl(invoice.ProjectId, PHTGL_ApproveService.Invoice_Input, invoice.InvoiceId, gereceiver.PersonId);
}
break;
case PHTGL_ApproveService.Invoice_Output:
var invoice_output = BLL.PhtglInvoiceService.GetPHTGL_InvoiceById(users.ContractId);
if (invoice_output != null)
{
var gereceiver = BLL.Person_PersonsService.GetPerson_PersonsById(invoice_output.CreateUser);
var geCreatUser = BLL.Person_PersonsService.GetPerson_PersonsById(users.ApproveMan);
var project = BLL.ProjectService.GetProjectByProjectId(invoice_output.ProjectId);
webJson.flowid = users.ApproveId;
webJson.requestname = "出库单审批(被拒) " + project.ProjectName;
webJson.nodename = users.ApproveType;
webJson.creator = geCreatUser.JobNum;
webJson.receiver = gereceiver.JobNum;
webJson.pcurl = geturl_Form(invoice_output.ProjectId, PHTGL_ApproveService.Invoice_Output, gereceiver.PersonId);
webJson.appurl = getAppurl(invoice_output.ProjectId, PHTGL_ApproveService.Invoice_Output, invoice_output.InvoiceId, gereceiver.PersonId);
}
break;
} }
strjson = JsonConvert.SerializeObject(webJson); strjson = JsonConvert.SerializeObject(webJson);
returnjson = OAWeb.receiveTodoRequestByJson(strjson); returnjson = OAWeb.receiveTodoRequestByJson(strjson);
@ -368,6 +433,38 @@ namespace BLL
webJson.appurl = getAppurl(Con_Co.ProjectId, PHTGL_ApproveService.ContractReview, Ctr_Co.ContractReviewId, users[i].ApproveMan); webJson.appurl = getAppurl(Con_Co.ProjectId, PHTGL_ApproveService.ContractReview, Ctr_Co.ContractReviewId, users[i].ApproveMan);
} }
break; break;
case PHTGL_ApproveService.Invoice_Input:
var invoice = BLL.PhtglInvoiceService.GetPHTGL_InvoiceById(users[i].ContractId);
if (invoice != null)
{
var geCreatUser = BLL.Person_PersonsService.GetPerson_PersonsById(invoice.CreateUser);
var gereceiver = BLL.Person_PersonsService.GetPerson_PersonsById(users[i].ApproveMan);
var project = BLL.ProjectService.GetProjectByProjectId(invoice.ProjectId);
webJson.flowid = users[i].ApproveId;
webJson.requestname = "入库单审批 " + project.ProjectName;
webJson.nodename = users[i].ApproveType;
webJson.creator = geCreatUser.JobNum;
webJson.receiver = gereceiver.JobNum;
webJson.pcurl = geturl(invoice.ProjectId, PHTGL_ApproveService.Invoice_Input, invoice.InvoiceId, users[i].ApproveMan);
webJson.appurl = getAppurl(invoice.ProjectId, PHTGL_ApproveService.Invoice_Input, invoice.InvoiceId, users[i].ApproveMan);
}
break;
case PHTGL_ApproveService.Invoice_Output:
var invoice_output = BLL.PhtglInvoiceService.GetPHTGL_InvoiceById(users[i].ContractId);
if (invoice_output != null)
{
var geCreatUser = BLL.Person_PersonsService.GetPerson_PersonsById(invoice_output.CreateUser);
var gereceiver = BLL.Person_PersonsService.GetPerson_PersonsById(users[i].ApproveMan);
var project = BLL.ProjectService.GetProjectByProjectId(invoice_output.ProjectId);
webJson.flowid = users[i].ApproveId;
webJson.requestname = "出库单审批 " + project.ProjectName;
webJson.nodename = users[i].ApproveType;
webJson.creator = geCreatUser.JobNum;
webJson.receiver = gereceiver.JobNum;
webJson.pcurl = geturl(invoice_output.ProjectId, PHTGL_ApproveService.Invoice_Output, invoice_output.InvoiceId, users[i].ApproveMan);
webJson.appurl = getAppurl(invoice_output.ProjectId, PHTGL_ApproveService.Invoice_Output, invoice_output.InvoiceId, users[i].ApproveMan);
}
break;
} }
strjson = JsonConvert.SerializeObject(webJson); strjson = JsonConvert.SerializeObject(webJson);
returnjson = OAWeb.receiveTodoRequestByJson(strjson); returnjson = OAWeb.receiveTodoRequestByJson(strjson);
@ -497,6 +594,12 @@ namespace BLL
case PHTGL_ApproveService.ContractReview: case PHTGL_ApproveService.ContractReview:
webJson.requestname = "合同审批"; webJson.requestname = "合同审批";
break; break;
case PHTGL_ApproveService.Invoice_Input:
webJson.requestname = "入库单审批";
break;
case PHTGL_ApproveService.Invoice_Output:
webJson.requestname = "出库单审批";
break;
} }
string strjson = JsonConvert.SerializeObject(webJson); string strjson = JsonConvert.SerializeObject(webJson);
var returnjson = OAWeb.processDoneRequestByJson(strjson); var returnjson = OAWeb.processDoneRequestByJson(strjson);

View File

@ -457,6 +457,21 @@ namespace BLL
} }
return userName; return userName;
} }
public static string getSignatureUrl(string personId)
{
string Url = string.Empty;
var getUser = Person_PersonsService.GetPerson_PersonsById(personId);
if (getUser != null)
{
Url = getUser.PersonName;
if (!string.IsNullOrEmpty(getUser.SignatureUrl))
{
Url = Funs.RootPath + getUser.SignatureUrl;
}
}
return Url;
}
#endregion #endregion
#region ID单位ID #region ID单位ID

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

View File

@ -143,6 +143,7 @@
<Content Include="PHTGL\BiddingManagement\BidDocumentsReviewDetail.aspx" /> <Content Include="PHTGL\BiddingManagement\BidDocumentsReviewDetail.aspx" />
<Content Include="PHTGL\BiddingManagement\SetSubReviewDetail.aspx" /> <Content Include="PHTGL\BiddingManagement\SetSubReviewDetail.aspx" />
<Content Include="PHTGL\ContractCompile\ContractReviewDetail.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.psd" />
<Content Include="res\images\logo\logo_127.psd" /> <Content Include="res\images\logo\logo_127.psd" />
<Content Include="res\index\css\font\digifacewide.ttf" /> <Content Include="res\index\css\font\digifacewide.ttf" />
@ -3385,6 +3386,13 @@
<Compile Include="PHTGL\ContractCompile\ContractReviewDetail.aspx.designer.cs"> <Compile Include="PHTGL\ContractCompile\ContractReviewDetail.aspx.designer.cs">
<DependentUpon>ContractReviewDetail.aspx</DependentUpon> <DependentUpon>ContractReviewDetail.aspx</DependentUpon>
</Compile> </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="Properties\AssemblyInfo.cs" />
<Compile Include="res\umeditor\net\imageUp.ashx.cs"> <Compile Include="res\umeditor\net\imageUp.ashx.cs">
<DependentUpon>imageUp.ashx</DependentUpon> <DependentUpon>imageUp.ashx</DependentUpon>

View File

@ -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>

View File

@ -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());
}
}
}
}

View File

@ -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;
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -30,31 +30,44 @@
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" /> <f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false" AutoScroll="true" <f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false" AutoScroll="true"
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch"> ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
<items> <Items>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" EnableCollapse="true" ForceFit="True" <f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" EnableCollapse="true" ForceFit="True"
runat="server" BoxFlex="1" DataKeyNames="InvoiceId" AllowCellEditing="true" runat="server" BoxFlex="1" DataKeyNames="InvoiceId" AllowCellEditing="true"
ClicksToEdit="2" DataIDField="InvoiceId" AllowSorting="true" SortField="InvoiceId" ClicksToEdit="2" DataIDField="InvoiceId" AllowSorting="true" SortField="InvoiceId"
SortDirection="DESC" OnSort="Grid1_Sort" EnableColumnLines="true" SortDirection="DESC" OnSort="Grid1_Sort" EnableColumnLines="true"
AllowPaging="true" IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange" AllowPaging="true" IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange"
EnableRowDoubleClickEvent="true" OnRowCommand="Grid1_RowCommand" OnRowDataBound="Grid1_RowDataBound"> EnableRowDoubleClickEvent="true" OnRowCommand="Grid1_RowCommand" OnRowDataBound="Grid1_RowDataBound">
<toolbars> <Toolbars>
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Right"> <f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Left">
<items> <Items>
<%-- <f:Button ID="btnOrderInDetail" ToolTip="入库详情" Text="入库详情" Icon="ApplicationEdit" runat="server" <%-- <f:Button ID="btnOrderInDetail" ToolTip="入库详情" Text="入库详情" Icon="ApplicationEdit" runat="server"
OnClick="btnOrderInDetail_OnClick"> OnClick="btnOrderInDetail_OnClick">
</f:Button> </f:Button>
<f:Button ID="btnOrderOutDetail" ToolTip="出库详情" Text="出库详情" Icon="ApplicationEdit" runat="server" <f:Button ID="btnOrderOutDetail" ToolTip="出库详情" Text="出库详情" Icon="ApplicationEdit" runat="server"
OnClick="btnOrderOutDetail_OnClick"> OnClick="btnOrderOutDetail_OnClick">
</f:Button>--%> </f:Button>--%>
</items> <f:DropDownList ID="DropContractCode" runat="server" Label="施工分包合同编号" AutoSelectFirstItem="true" LabelAlign="Right" LabelWidth="140px"></f:DropDownList>
<f:DropDownList ID="drpStates" runat="server" Label="状态"
LabelWidth="70px" LabelAlign="Right" Width="170px">
<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:ToolbarFill runat="server"></f:ToolbarFill>
<f:Button ID="btnSearch" ToolTip="查询" Icon="SystemSearch" runat="server" Text="查询" OnClick="btnSearch_Click">
</f:Button>
</Items>
</f:Toolbar> </f:Toolbar>
</toolbars> </Toolbars>
<columns> <Columns>
<f:TemplateField ColumnID="tfNumber" Width="50px" HeaderText="序号" HeaderTextAlign="Center" <f:TemplateField ColumnID="tfNumber" Width="50px" HeaderText="序号" HeaderTextAlign="Center"
TextAlign="Center"> TextAlign="Center">
<itemtemplate> <ItemTemplate>
<asp:Label ID="lblNumber" runat="server" Text='<%# Grid1.PageIndex * Grid1.PageSize + Container.DataItemIndex + 1 %>'></asp:Label> <asp:Label ID="lblNumber" runat="server" Text='<%# Grid1.PageIndex * Grid1.PageSize + Container.DataItemIndex + 1 %>'></asp:Label>
</itemtemplate> </ItemTemplate>
</f:TemplateField> </f:TemplateField>
<f:RenderField Width="150px" ColumnID="ContractName" DataField="ContractName" SortField="ContractName" Hidden="True" <f:RenderField Width="150px" ColumnID="ContractName" DataField="ContractName" SortField="ContractName" Hidden="True"
FieldType="String" HeaderText="合同名称" TextAlign="Left" HeaderTextAlign="Center"> FieldType="String" HeaderText="合同名称" TextAlign="Left" HeaderTextAlign="Center">
@ -75,21 +88,23 @@
FieldType="String" HeaderText="税额(元)" TextAlign="Left" HeaderTextAlign="Center"> FieldType="String" HeaderText="税额(元)" TextAlign="Left" HeaderTextAlign="Center">
</f:RenderField> </f:RenderField>
<f:RenderField Width="150px" ColumnID="InvoiceAmount" DataField="InvoiceAmount" SortField="InvoiceAmount" <f:RenderField Width="150px" ColumnID="InvoiceAmount" DataField="InvoiceAmount" SortField="InvoiceAmount"
FieldType="String" HeaderText="价税合计(元" TextAlign="Left" HeaderTextAlign="Center"> FieldType="String" HeaderText="价税合计(元" TextAlign="Left" HeaderTextAlign="Center">
</f:RenderField> </f:RenderField>
<f:TemplateField ColumnID="tfState" Width="150px" HeaderText="出入库状态" HeaderTextAlign="Center" <f:TemplateField ColumnID="tfState" Width="150px" HeaderText="出入库状态" HeaderTextAlign="Center"
TextAlign="Center"> TextAlign="Center">
<itemtemplate> <ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# BLL.PhtglInvoiceService.GetState(Eval("InvoiceId"))%>'></asp:Label> <asp:Label ID="Label1" runat="server" Text='<%# BLL.PhtglInvoiceService.GetState(Eval("InvoiceId"))%>'></asp:Label>
</itemtemplate> </ItemTemplate>
</f:TemplateField> </f:TemplateField>
<f:LinkButtonField Width="150px" ColumnID="btnOrderInDetail" TextAlign="Center" CommandName="OrderInDetail" Text="入库详情" Hidden="True"/> <f:LinkButtonField Width="150px" ColumnID="btnOrderInDetail" TextAlign="Center" CommandName="OrderInDetail" Text="入库详情" Hidden="True" />
<f:LinkButtonField Width="150px" ColumnID="btnOrderOutDetail" TextAlign="Center" CommandName="OrderOutDetail" Text="出库详情" Hidden="True"/> <f:LinkButtonField Width="150px" ColumnID="btnOrderInDetailPrint" TextAlign="Center" CommandName="OrderInDetailPrint" Text="入库打印" Hidden="True" />
</columns> <f:LinkButtonField Width="150px" ColumnID="btnOrderOutDetail" TextAlign="Center" CommandName="OrderOutDetail" Text="出库详情" Hidden="True" />
<%-- <listeners> <f:LinkButtonField Width="150px" ColumnID="btnOrderOutDetailPrint" TextAlign="Center" CommandName="OrderOutDetailPrint" Text="出库打印" Hidden="True" />
</Columns>
<%-- <listeners>
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" /> <f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
</listeners>--%> </listeners>--%>
<pageitems> <PageItems>
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server"> <f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
</f:ToolbarSeparator> </f:ToolbarSeparator>
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:"> <f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:">
@ -102,15 +117,19 @@
<f:ListItem Text="25" Value="25" /> <f:ListItem Text="25" Value="25" />
<f:ListItem Text="所有行" Value="100000" /> <f:ListItem Text="所有行" Value="100000" />
</f:DropDownList> </f:DropDownList>
</pageitems> </PageItems>
</f:Grid> </f:Grid>
</items> </Items>
</f:Panel> </f:Panel>
<f:Window ID="Window1" runat="server" Hidden="true" ShowHeader="true" <f:Window ID="Window1" runat="server" Hidden="true" ShowHeader="true"
IsModal="true" Target="Parent" EnableMaximize="true" EnableResize="true" OnClose="Window1_Close" IsModal="true" Target="Parent" EnableMaximize="true" EnableResize="true" OnClose="Window1_Close"
Title="编辑" EnableIFrame="true" Height="650px" Title="编辑" EnableIFrame="true" Height="650px"
Width="1200px"> Width="1200px">
</f:Window> </f:Window>
<f:Window ID="Window2" Title="打印" Hidden="true" EnableIFrame="true"
EnableMaximize="true" Target="Top" EnableResize="false" runat="server"
IsModal="true" Width="1010px" Height="660px">
</f:Window>
</form> </form>
<script type="text/javascript"> <script type="text/javascript">
<%-- var menuID = '<%= Menu1.ClientID %>'; <%-- var menuID = '<%= Menu1.ClientID %>';

View File

@ -1,6 +1,9 @@
using BLL; using BLL;
using Model;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Data;
using System.IO;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Web; using System.Web;
@ -18,6 +21,11 @@ namespace FineUIPro.Web.PHTGL.InvoiceManage
{ {
this.GetButtonPower(); this.GetButtonPower();
this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString(); this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString();
this.DropContractCode.DataTextField = "ContractNum";
this.DropContractCode.DataValueField = "ContractId";
this.DropContractCode.DataSource = BLL.PHTGL_ContractReviewService.GetContractReview_CompleteData(this.CurrUser.LoginProjectId);
this.DropContractCode.DataBind();
Funs.FineUIPleaseSelect(DropContractCode);
// 绑定表格 // 绑定表格
this.BindGrid(); this.BindGrid();
} }
@ -31,7 +39,11 @@ namespace FineUIPro.Web.PHTGL.InvoiceManage
{ {
Model.PHTGL_Invoice table = new Model.PHTGL_Invoice(); Model.PHTGL_Invoice table = new Model.PHTGL_Invoice();
table.ProjectId = this.CurrUser.LoginProjectId; table.ProjectId = this.CurrUser.LoginProjectId;
var tb = BLL.PhtglInvoiceService.GetOrderInListData(table, Grid1); if( DropContractCode.SelectedValue!=Const._Null)
{
table.ContractId = this.DropContractCode.SelectedValue;
}
var tb = BLL.PhtglInvoiceService.GetOrderInListData(table, Grid1,drpStates.SelectedValue);
Grid1.RecordCount = PhtglInvoiceService.Count; Grid1.RecordCount = PhtglInvoiceService.Count;
//tb = GetFilteredTable(Grid1.FilteredData, tb); //tb = GetFilteredTable(Grid1.FilteredData, tb);
Grid1.DataSource = tb; Grid1.DataSource = tb;
@ -194,6 +206,14 @@ namespace FineUIPro.Web.PHTGL.InvoiceManage
Window1.Title = "出库单详情"; Window1.Title = "出库单详情";
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("InvoiceOrderDetail.aspx?InvoiceId={0}&&Type={1}", e.RowID, "1", "编辑 - "))); PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("InvoiceOrderDetail.aspx?InvoiceId={0}&&Type={1}", e.RowID, "1", "编辑 - ")));
} }
else if (e.CommandName == "OrderInDetailPrint")
{
Print(e.RowID,"0");
}
else if (e.CommandName == "OrderOutDetailPrint")
{
Print(e.RowID, "1");
}
} }
protected void Grid1_RowDataBound(object sender, GridRowEventArgs e) protected void Grid1_RowDataBound(object sender, GridRowEventArgs e)
@ -203,13 +223,92 @@ namespace FineUIPro.Web.PHTGL.InvoiceManage
if (model.State> PhtglInvoiceService.StateDataIn) if (model.State> PhtglInvoiceService.StateDataIn)
{ {
Grid1.FindColumn("btnOrderInDetail").Hidden = false; Grid1.FindColumn("btnOrderInDetail").Hidden = false;
Grid1.FindColumn("btnOrderInDetailPrint").Hidden = false;
} }
if (model.State >= PhtglInvoiceService.StateInPutApproveSuccess) if (model.State >= PhtglInvoiceService.StateInPutApproveSuccess)
{ {
Grid1.FindColumn("btnOrderOutDetail").Hidden = false; Grid1.FindColumn("btnOrderOutDetail").Hidden = false;
Grid1.FindColumn("btnOrderOutDetailPrint").Hidden = false;
} }
} }
private void Print(string Id,string Type)
{
BLL.FastReportService.ResetData();
if (string.IsNullOrEmpty(Id))
{
ShowNotify("请选择要打印的项", MessageBoxIcon.Warning);
return;
}
var printModel= PhtglInvoiceService.GetPHTGL_InvoicePrintModel(Id);
List<Order> orders = new List<Order>();
orders.Add(printModel.Order);
DataTable Table1 = LINQToDataTable(orders);
if (Table1 != null)
{
Table1.TableName = "Table1";
}
DataTable Data = LINQToDataTable(printModel.Data);
if (Data != null)
{
Data.TableName = "Data";
}
List<OrderApproveIn> orderApproveIns = new List<OrderApproveIn>();
orderApproveIns.Add(printModel.ApproveIn);
DataTable ApproveInData = LINQToDataTable(orderApproveIns);
if (ApproveInData != null)
{
ApproveInData.TableName = "ApproveInData";
}
List<OrderApproveOut> orderApproveOuts = new List<OrderApproveOut>();
orderApproveOuts.Add(printModel.ApproveOut);
DataTable ApproveOutData = LINQToDataTable(orderApproveOuts);
if (ApproveOutData != null)
{
ApproveOutData.TableName = "ApproveOutData";
}
Dictionary<string, string> keyValuePairs = new Dictionary<string, string>();
keyValuePairs.Add("AmountInWords", Funs.NumericCapitalization(printModel.Data.Sum(p => p.Amount)));
BLL.FastReportService.AddFastreportTable(Table1);
BLL.FastReportService.AddFastreportTable(Data);
BLL.FastReportService.AddFastreportTable(ApproveInData);
BLL.FastReportService.AddFastreportTable(ApproveOutData);
BLL.FastReportService.AddFastreportParameter(keyValuePairs);
string initTemplatePath = "";
string rootPath = Server.MapPath("~/");
if (Type=="0")
{
initTemplatePath = "File\\Fastreport\\发票存货入库单.frx";
}
else
{
initTemplatePath = "File\\Fastreport\\发票存货出库单.frx";
}
if (File.Exists(rootPath + initTemplatePath))
{
PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("~/Controls/Fastreport.aspx?ReportPath={0}", rootPath + initTemplatePath)));
}
}
#region
/// <summary>
/// 查询按钮
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnSearch_Click(object sender, EventArgs e)
{
BindGrid();
}
#endregion
} }
} }

View File

@ -59,6 +59,33 @@ namespace FineUIPro.Web.PHTGL.InvoiceManage
/// </remarks> /// </remarks>
protected global::FineUIPro.Toolbar Toolbar2; protected global::FineUIPro.Toolbar Toolbar2;
/// <summary>
/// DropContractCode 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList DropContractCode;
/// <summary>
/// drpStates 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpStates;
/// <summary>
/// btnSearch 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSearch;
/// <summary> /// <summary>
/// lblNumber 控件。 /// lblNumber 控件。
/// </summary> /// </summary>
@ -112,5 +139,14 @@ namespace FineUIPro.Web.PHTGL.InvoiceManage
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.Window Window1; protected global::FineUIPro.Window Window1;
/// <summary>
/// Window2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window Window2;
} }
} }

View File

@ -98,9 +98,6 @@
<f:RenderField Width="230px" ColumnID="UnitPrice" DataField="UnitPrice" SortField="UnitPrice" <f:RenderField Width="230px" ColumnID="UnitPrice" DataField="UnitPrice" SortField="UnitPrice"
FieldType="String" HeaderText="未含税单价(元)" TextAlign="Center" HeaderTextAlign="Center"> FieldType="String" HeaderText="未含税单价(元)" TextAlign="Center" HeaderTextAlign="Center">
</f:RenderField> </f:RenderField>
<f:RenderField Width="200px" 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"> <f:TemplateField Width="200px" EnableColumnHide="false" ColumnID="NoTaxPrice" HeaderText="未税金额(元)" TextAlign="Center">
<ItemTemplate> <ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# GetNoTaxPrice(Eval("Amount"),Eval("Tax")) %>'></asp:Label> <asp:Label ID="Label1" runat="server" Text='<%# GetNoTaxPrice(Eval("Amount"),Eval("Tax")) %>'></asp:Label>

View File

@ -1,10 +1,12 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Security.Policy;
using System.Web; using System.Web;
using System.Web.UI; using System.Web.UI;
using System.Web.UI.WebControls; using System.Web.UI.WebControls;
using BLL; using BLL;
using Org.BouncyCastle.Asn1.Ocsp;
namespace FineUIPro.Web.PHTGL.InvoiceManage namespace FineUIPro.Web.PHTGL.InvoiceManage
{ {
@ -37,7 +39,13 @@ namespace FineUIPro.Web.PHTGL.InvoiceManage
{ {
InvoiceId = Request.QueryString["InvoiceId"]; InvoiceId = Request.QueryString["InvoiceId"];
Type = Request.QueryString["Type"]; Type = Request.QueryString["Type"];
if (string.IsNullOrEmpty(Type)) //用于取出Type参数的值OA跳转
{
Uri uri = new Uri(Request.UrlReferrer.ToString());
// 获取Type参数的值
Type = HttpUtility.ParseQueryString(uri.Query).Get("Type");
}
Model.PHTGL_Invoice table = new Model.PHTGL_Invoice(); Model.PHTGL_Invoice table = new Model.PHTGL_Invoice();
table.ProjectId = this.CurrUser.LoginProjectId; table.ProjectId = this.CurrUser.LoginProjectId;
table.InvoiceId=InvoiceId; table.InvoiceId=InvoiceId;

View File

@ -147,7 +147,7 @@ namespace FineUIPro.Web.PHTGL.InvoiceManage
{ {
Save(); Save();
PhtglInvoiceService.StartApprovalProcess(InvoiceId); PhtglInvoiceService.StartApprovalProcess(InvoiceId);
OAWebSevice.Pushoa();
ShowNotify("提交成功!",MessageBoxIcon.Success); ShowNotify("提交成功!",MessageBoxIcon.Success);
PageContext.RegisterStartupScript(ActiveWindow.GetHideReference()); PageContext.RegisterStartupScript(ActiveWindow.GetHideReference());
} }

View File

@ -61,8 +61,8 @@ namespace FineUIPro.Web
bool IsSafeReferer = ConstValue.drpConstItemList(ConstValue.Group_SafeReferer).FirstOrDefault(x => x.ConstValue == url) != null; bool IsSafeReferer = ConstValue.drpConstItemList(ConstValue.Group_SafeReferer).FirstOrDefault(x => x.ConstValue == url) != null;
if (!IsDataShowPage && !IsSafeReferer) if (!IsDataShowPage && !IsSafeReferer)
{ {
if (this.Page.Request.AppRelativeCurrentExecutionFilePath != "~/Login.aspx") // if (this.Page.Request.AppRelativeCurrentExecutionFilePath != "~/Login.aspx")
Response.Redirect("~/Login.aspx"); // Response.Redirect("~/Login.aspx");
return; return;
} }

View File

@ -213,6 +213,7 @@
<Compile Include="PHTGL\PHTGL_ContractTrackDtoIn.cs" /> <Compile Include="PHTGL\PHTGL_ContractTrackDtoIn.cs" />
<Compile Include="PHTGL\PHTGL_InvoiceApproveManEntity.cs" /> <Compile Include="PHTGL\PHTGL_InvoiceApproveManEntity.cs" />
<Compile Include="PHTGL\PHTGL_InvoiceDtoIn.cs" /> <Compile Include="PHTGL\PHTGL_InvoiceDtoIn.cs" />
<Compile Include="PHTGL\PHTGL_InvoicePrintModel.cs" />
<Compile Include="PHTGL\PrintModel.cs" /> <Compile Include="PHTGL\PrintModel.cs" />
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="SingleSerie.cs" /> <Compile Include="SingleSerie.cs" />

View File

@ -0,0 +1,83 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Model
{
public class PHTGL_InvoicePrintModel
{
public Order Order { get; set; }
public List<OrderDetail> Data { get; set; }
public OrderApproveIn ApproveIn { get; set; }
public OrderApproveOut ApproveOut { get; set; }
}
public class Order
{
public string InvoiceCode { get; set; }
public string InvoiceNumber { get; set; }
public string SellerName { get; set; }
public DateTime InvoiceDate { get; set; }
public DateTime OrderInDate { get; set; }
public string OrderCode { get; set; }
public DateTime OrderOutDate { get; set; }
public string MaterialRequisitionUnit { get; set; }
public string ProjectName { get; set; }
public string ContractCode { get; set; }
}
public class OrderDetail
{
public string GoodsOrServicesName { get; set; }
public string SpecificationModel { get; set; }
public string Unit { get; set; }
public decimal Quantity { get; set; }
public decimal UnitPrice { get; set; }
public decimal NoTaxPrice { get; set; }
public string TaxRate { get; set; }
public decimal Tax { get; set; }
public decimal Amount { get; set; }
}
public class OrderApproveIn
{ /// <summary>
/// 专业工程师
/// </summary>
public string ProfessionalEngineer { get; set; }
/// <summary>
/// 施工经理
/// </summary>
public string ConstructionManager { get; set; }
/// <summary>
/// 控制经理
/// </summary>
public string ControlManager { get; set; }
/// <summary>
/// 项目经理
/// </summary>
public string ProjectManager { get; set; }
}
public class OrderApproveOut
{ /// <summary>
/// 采购员
/// </summary>
public string PurchasingMan { get; set; }
/// <summary>
/// 控制经理
/// </summary>
public string ControlManager { get; set; }
/// <summary>
/// 项目经理
/// </summary>
public string ProjectManager { get; set; }
/// <summary>
/// 施工单位材料经理
/// </summary>
public string ConUnitMaterialOfficer { get; set; }
/// <summary>
/// 施工单位项目经理
/// </summary>
public string ConUnitProjectManager { get; set; }
}
}