This commit is contained in:
2024-09-25 15:13:49 +08:00
parent 5d5bc5598d
commit 5d70e1689a
16 changed files with 372 additions and 419 deletions
@@ -1,4 +1,5 @@
using BLL;
using FastReport.Utils;
using FineUIPro.Web.DataShow;
using FineUIPro.Web.HJGL.WeldingManage;
using FineUIPro.Web.ProjectData;
@@ -48,18 +49,35 @@ namespace FineUIPro.Web.CLGL
if (!IsPostBack)
{
InitDrpList();
UnitWorkId = Request.QueryString["UnitWorkId"];
Id = Request.QueryString["Id"];
UnitWorkId = Request.Params["UnitWorkId"];
Id = Request.Params["Id"];
if (!string.IsNullOrEmpty(Id))
{
var queryModel = new Model.Tw_InOutMasterOutput()
{
Id=Id,
};
var result = BLL.TwInOutplanmasterService.GetListData(queryModel).FirstOrDefault();
if (!string .IsNullOrEmpty(result.WeldTaskId) && result.WeldTaskId.Contains("|"))
{
UnitWorkId = result.WeldTaskId.Split('|')[0];
}
else
{
UnitWorkId = result.WeldTaskId;
}
txtCreateMan.Text = result.CreateManName;
txtCreateDate.Text =result.CreateDate.Value.ToString("yyyy-MM-dd");
drpReqUnit.SelectedValue = result.ReqUnitId;
drpTypeInt.SelectedValue = result.TypeInt.ToString();
drpWarehouse.SelectedValue = result.WarehouseCode;
drpCategory.SelectedValue = result.Category.ToString();
txtRemark.Text = result.Remark;
txtCusBillCode.Text = result.CusBillCode;
drpCategory.Readonly = true;
BindGrid(Id);
}
else
@@ -78,15 +96,18 @@ namespace FineUIPro.Web.CLGL
drpWarehouse.DataTextField = "Text";
drpWarehouse.DataValueField = "Value";
drpWarehouse.DataSource = BLL.DropListService.HJGL_WarehouseCode();
drpWarehouse.DataBind();
Funs.FineUIPleaseSelect(this.drpWarehouse);
drpWarehouse.DataBind();
drpTypeInt.DataTextField = "Key";
drpTypeInt.DataValueField = "Value";
drpTypeInt.DataSource = BLL.TwConst.TypeIntMap.Where(x => x.Key.Contains("出库")); ;
drpTypeInt.DataBind();
Funs.FineUIPleaseSelect(this.drpTypeInt);
drpTypeInt.DataSource = BLL.TwConst.TypeIntMap.Where(x => x.Key.Contains("散件出库")); ;
drpTypeInt.DataBind();
UnitService.InitUnitDropDownList(drpReqUnit, this.CurrUser.LoginProjectId, true);
drpCategory.DataTextField = "Key";
drpCategory.DataValueField = "Value";
drpCategory.DataSource = BLL.TwConst.CategoryMap;
drpCategory.DataBind();
}
private void BindGrid(string inOutPlanMasterId)
{
@@ -105,7 +126,8 @@ namespace FineUIPro.Web.CLGL
/// <param name="e"></param>
protected void btnSelect_Click(object sender, EventArgs e)
{
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("OutPlanMasterSelect.aspx", "选择- ")));
Save(Const.BtnSave);
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("OutPlanMasterSelect.aspx?UnitWorkId={0}&Id={1}",UnitWorkId,Id, "选择- ")));
}
#endregion
@@ -153,18 +175,17 @@ namespace FineUIPro.Web.CLGL
TypeInt = int.Parse( drpTypeInt.SelectedValue),
Remark = txtRemark.Text,
InOutType=(int)TwConst.InOutType.,
Category= (int)TwConst.Category.,
Category= int.Parse(drpCategory.SelectedValue),
State=state
};
TwInOutplanmasterService.Add(model);
}
else
{
var model = TwInOutplanmasterService.GetById(Id);
model.ProjectId = this.CurrUser.LoginProjectId;
var model = TwInOutplanmasterService.GetById(Id);
model.CusBillCode = txtCusBillCode.Text;
model.WarehouseCode = drpWarehouse.SelectedValue;
model.WeldTaskId = UnitWorkId;
// model.WeldTaskId = UnitWorkId;
model.Source = 1;
model.CreateDate = DateTime.Now;
model.CreateMan = this.CurrUser.PersonId;
@@ -172,11 +193,11 @@ namespace FineUIPro.Web.CLGL
model.TypeInt = int.Parse(drpTypeInt.SelectedValue);
model.Remark = txtRemark.Text;
model.InOutType = (int)TwConst.InOutType.;
model.Category = (int)TwConst.Category.;
model.Category = int.Parse(drpCategory.SelectedValue);
model.State = state;
TwInOutplanmasterService.Update(model);
}
}
SaveDetail();
}
/// <summary>
@@ -192,8 +213,9 @@ namespace FineUIPro.Web.CLGL
{
JObject values = teamGroupRow.Value<JObject>("values");
int rowIndex = teamGroupRow.Value<int>("index");
string id = teamGroupRow.Value<string>("id");
var mdoel=TwInoutplandetailRelationService.GetById(values.Value<string>("Id"));
var mdoel=TwInoutplandetailRelationService.GetById(id);
if (mdoel != null)
{
mdoel.Number= values.Value<decimal>("Number");
@@ -214,5 +236,10 @@ namespace FineUIPro.Web.CLGL
BindGrid(Id);
}
}
protected void Window1_Close(object sender, WindowCloseEventArgs e)
{
BindGrid(Id);
}
}
}