代码无效引用清理,试压包资料界面看板修改

This commit is contained in:
2025-10-10 14:33:21 +08:00
parent 87fb529521
commit 55b798135c
933 changed files with 5897 additions and 7541 deletions
@@ -1,18 +1,14 @@
using System;
using System.Collections.Generic;
using BLL;
using System;
using System.Linq;
using System.Security.Policy;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BLL;
using Org.BouncyCastle.Asn1.Ocsp;
namespace FineUIPro.Web.PHTGL.InvoiceManage
{
public partial class InvoiceOrderDetail : PageBase
{
public string InvoiceId {
public string InvoiceId
{
get
{
return (string)ViewState["InvoiceId"];
@@ -47,41 +43,41 @@ namespace FineUIPro.Web.PHTGL.InvoiceManage
Type = HttpUtility.ParseQueryString(uri.Query).Get("Type");
}
Model.PHTGL_Invoice table = new Model.PHTGL_Invoice();
table.ProjectId = this.CurrUser.LoginProjectId;
table.InvoiceId=InvoiceId;
table.ProjectId = this.CurrUser.LoginProjectId;
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;
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")
if (Type == "0")
{
Grid1.Title = "入库单列表";
PanelOrderIn.Hidden = false;
}
else if (Type=="1")
else if (Type == "1")
{
PanelOrderOut.Hidden = false;
Grid1.Title = "出库单列表";
}
if (invoiceModel.CreateUser== this.CurrUser.PersonId) //创建人
if (invoiceModel.CreateUser == this.CurrUser.PersonId) //创建人
{
TbCreate.Hidden = false;
if (invoiceModel.State> PhtglInvoiceService.StateCreate)
if (invoiceModel.State > PhtglInvoiceService.StateCreate)
{
Form_approve.Hidden = false;
}
@@ -91,14 +87,14 @@ namespace FineUIPro.Web.PHTGL.InvoiceManage
{
TbApprove.Hidden = false;
Form_approve.Hidden = false;
}
}
}
}
public void BindApproveData()
{
var approveModel = PHTGL_ApproveService.GetAllApproveData(InvoiceId, Type=="0"? "Invoice_Input" : "Invoice_Output");
{
var approveModel = PHTGL_ApproveService.GetAllApproveData(InvoiceId, Type == "0" ? "Invoice_Input" : "Invoice_Output");
if (approveModel != null)
{
Grid2.DataSource = approveModel;
@@ -110,16 +106,16 @@ namespace FineUIPro.Web.PHTGL.InvoiceManage
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);
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")
if (e.CommandName == "delete")
{
PhtglInvoicedetailService.DeletePHTGL_InvoiceDetailById(e.RowID);
BindGrid();
@@ -128,7 +124,7 @@ namespace FineUIPro.Web.PHTGL.InvoiceManage
protected void Grid1_RowDataBound(object sender, GridRowEventArgs e)
{
if (Type=="1")
if (Type == "1")
{
Grid1.FindColumn("btnDelete").Hidden = true;
}
@@ -136,26 +132,26 @@ namespace FineUIPro.Web.PHTGL.InvoiceManage
protected string GetTaxRate(object eval)
{
string result="";
if (eval!=null)
string result = "";
if (eval != null)
{
decimal taxRate = Convert.ToDecimal(eval);
string percentage = string.Format("{0:P0}", taxRate);
result= percentage.Replace("%", "");
}
result = percentage.Replace("%", "");
}
return result;
}
protected string GetNoTaxPrice(object amount, object tax)
{
//获取amount-tax 的值
string result="";
string result = "";
if (amount != null && tax != null)
{
decimal amountValue = Convert.ToDecimal(amount);
decimal taxValue = Convert.ToDecimal(tax);
decimal noTaxPrice = amountValue - taxValue;
result= noTaxPrice.ToString();
result = noTaxPrice.ToString();
}
return result;
}
@@ -163,12 +159,12 @@ namespace FineUIPro.Web.PHTGL.InvoiceManage
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;
invoiceModel.OrderInDate = txtOrderInDate.SelectedDate;
invoiceModel.OrderOutDate = txtOrderOutDate.SelectedDate;
invoiceModel.OrderCode = txtOrderCode.Text;
invoiceModel.MaterialRequisitionUnit = txtMaterialRequisitionUnit.Text;
BLL.PhtglInvoiceService.UpdatePHTGL_Invoice(invoiceModel);
ShowNotify("保存成功!" ,MessageBoxIcon.Success);
ShowNotify("保存成功!", MessageBoxIcon.Success);
}
protected void btnEditProcess_Click(object sender, EventArgs e)
@@ -187,7 +183,7 @@ namespace FineUIPro.Web.PHTGL.InvoiceManage
protected void btnAgree_Click(object sender, EventArgs e)
{
PhtglInvoiceService.Approve(InvoiceId, int.Parse(Type),this.CurrUser.PersonId,true, txtApproveIdea.Text);
PhtglInvoiceService.Approve(InvoiceId, int.Parse(Type), this.CurrUser.PersonId, true, txtApproveIdea.Text);
ShowNotify("审批成功!", MessageBoxIcon.Success);
if (!string.IsNullOrEmpty(Request.Params["PHTUrl"]))
{