feat:增加焊前管理,材料管理条码扫码接口,材料信息导入支持无炉批号/有炉批号 多种导入方式
This commit is contained in:
@@ -0,0 +1,92 @@
|
||||
using BLL;
|
||||
using System;
|
||||
using System.Linq;
|
||||
|
||||
namespace FineUIPro.Web.HJGL.PreWeld
|
||||
{
|
||||
public partial class CuttingCheckEdit : PageBase
|
||||
{
|
||||
public string CuttingCheckId
|
||||
{
|
||||
get { return (string)ViewState["CuttingCheckId"]; }
|
||||
set { ViewState["CuttingCheckId"] = value; }
|
||||
}
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
||||
CuttingCheckId = Request.Params["CuttingCheckId"];
|
||||
BindWeldJoint();
|
||||
if (!string.IsNullOrEmpty(CuttingCheckId))
|
||||
{
|
||||
BindData();
|
||||
}
|
||||
else
|
||||
{
|
||||
dpCheckTime.SelectedDate = DateTime.Now;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void BindWeldJoint()
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
var data = (from x in db.HJGL_WeldJoint
|
||||
where x.ProjectId == CurrUser.LoginProjectId
|
||||
orderby x.PipelineCode, x.WeldJointCode
|
||||
select new
|
||||
{
|
||||
x.WeldJointId,
|
||||
WeldJointName = x.PipelineCode + " / " + x.WeldJointCode
|
||||
}).ToList();
|
||||
drpWeldJoint.DataTextField = "WeldJointName";
|
||||
drpWeldJoint.DataValueField = "WeldJointId";
|
||||
drpWeldJoint.DataSource = data;
|
||||
drpWeldJoint.DataBind();
|
||||
}
|
||||
}
|
||||
|
||||
private void BindData()
|
||||
{
|
||||
var model = PreWeldInspectionService.GetCuttingCheckById(CuttingCheckId);
|
||||
if (model == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
drpWeldJoint.SelectedValue = model.WeldJointId;
|
||||
chkMaterialCodeBatchNo.Checked = model.IsMaterialCodeBatchNoAccurate;
|
||||
chkMaterialQuantity.Checked = model.IsMaterialQuantityAccurate;
|
||||
dpCheckTime.SelectedDate = model.CheckTime;
|
||||
txtRemark.Text = model.Remark;
|
||||
}
|
||||
|
||||
protected void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!CommonService.GetAllButtonPowerList(CurrUser.LoginProjectId, CurrUser.PersonId, Const.HJGL_PreWeldCuttingCheckMenuId, Const.BtnSave))
|
||||
{
|
||||
Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
var item = new Model.PreWeldCuttingCheckItem
|
||||
{
|
||||
ProjectId = CurrUser.LoginProjectId,
|
||||
WeldJointId = drpWeldJoint.SelectedValue,
|
||||
IsMaterialCodeBatchNoAccurate = chkMaterialCodeBatchNo.Checked,
|
||||
IsMaterialQuantityAccurate = chkMaterialQuantity.Checked,
|
||||
CheckPerson = CurrUser.PersonId,
|
||||
CheckTime = dpCheckTime.SelectedDate ?? DateTime.Now,
|
||||
CreateUser = CurrUser.PersonId,
|
||||
Remark = txtRemark.Text.Trim()
|
||||
};
|
||||
|
||||
APIPreWeldInspectionService.SaveCuttingCheck(item);
|
||||
ShowNotify("保存成功!", MessageBoxIcon.Success);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user