This commit is contained in:
2025-02-14 16:48:50 +08:00
parent 86b1e8b3da
commit 6d4a7e82a7
51 changed files with 1888 additions and 339 deletions
@@ -39,10 +39,12 @@ namespace FineUIPro.Web.WeldMat.Stock
string strSql = @"SELECT StockIn.StockInId,StockIn.WeldId,StockIn.Amount,StockIn.Weight,Users.UserName AS Materialman,StockIn.InStockDate,
ReviewDate,Weld.WeldCode,Weld.WeldName,Weld.WeldSpec,StockIn.Warrantybook, StockIn.HeartNo,
WeldType.WeldTypeName,WeldType.WeldUnit,(unit.UnitName+'('+store.UnitStoreName+')') AS UnitStoreName,
(CASE WHEN (StockIn.AttachUrl!='' AND StockIn.AttachUrl IS NOT NULL) THEN '是' ELSE '否' END) IsUploadAttach
(CASE WHEN (StockIn.AttachUrl!='' AND StockIn.AttachUrl IS NOT NULL) THEN '是' ELSE '否' END) IsUploadAttach,
StockIn.IsSure ,sureUser.UserName AS SureMan
FROM dbo.Weld_StockIn AS StockIn
LEFT JOIN dbo.Weld_WeldInfo AS Weld ON Weld.WeldId=StockIn.WeldId
LEFT JOIN dbo.Sys_User AS Users ON Users.UserId=StockIn.Materialman
LEFT JOIN dbo.Sys_User AS sureUser ON sureUser.UserId=StockIn.SureMan
LEFT JOIN dbo.Weld_WeldType AS WeldType ON WeldType.WeldTypeId = Weld.WeldTypeId
LEFT JOIN dbo.Weld_UnitStore store ON store.UnitStoreId=StockIn.UnitStoreId
LEFT JOIN dbo.Base_Unit unit ON unit.UnitId=store.UnitId
@@ -192,6 +194,72 @@ namespace FineUIPro.Web.WeldMat.Stock
}
}
/// <summary>
/// 质保书自编号确认
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnMenuSure_Click(object sender, EventArgs e)
{
if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.CLGL_StockInMenuId, BLL.Const.BtnCheck))
{
if (Grid1.SelectedRowIndexArray.Length == 0)
{
Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
return;
}
string id = Grid1.SelectedRowID;
if (!string.IsNullOrEmpty(id))
{
var q = BLL.StockInService.GetStockInById(id);
if (q.UnitStoreId != null)
{
var s = BLL.UnitStoreService.GetUnitStoreById(q.UnitStoreId);
if (s != null && s.UnitId == CurrUser.UnitId)
{
if (s.IsUse == true)
{
if (q.IsSure == true)
{
btnMenuSure.ConfirmText = "是否取消质保书自编号确认?";
BLL.StockInService.WarrantybookSure(id, null, null);
}
else
{
btnMenuSure.ConfirmText = "是否确认质保书自编号正确?";
string sureMan = this.CurrUser.UserId;
BLL.StockInService.WarrantybookSure(id, true, sureMan);
}
this.BindGrid();
ShowNotify("质保书自编号确认成功!", MessageBoxIcon.Success);
BLL.Sys_LogService.AddLog(BLL.Const.System_7, this.CurrUser.LoginProjectId, this.CurrUser.UserId, "质保书自编号确认");
}
else
{
Alert.ShowInTop("该仓库已停用,不能进行质保书自编号确认!", MessageBoxIcon.Warning);
return;
}
}
else
{
Alert.ShowInTop("非本单位的数据,不能进行质保书自编号确认!", MessageBoxIcon.Warning);
return;
}
}
}
}
else
{
Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
return;
}
}
#region
/// <summary>
/// 双击Grid事件