散件出库
This commit is contained in:
parent
1ce9e37872
commit
553defbc94
|
|
@ -599,7 +599,7 @@ namespace BLL
|
|||
}
|
||||
|
||||
|
||||
public static string GetDataInCusBillCode(string projectid, string unitcode,string typeString)
|
||||
public static string GetDataInCusBillCode(string projectid, string unitcode,string typeString,string unitWorkCode="",string Category = "")
|
||||
{
|
||||
if (typeString == TwConst.TypeInt.退料入库.ToString())
|
||||
{
|
||||
|
|
@ -614,6 +614,29 @@ namespace BLL
|
|||
cusBillCode = cusBillCode + (queryAllresult + 1).ToString().PadLeft(2, '0');
|
||||
return cusBillCode;
|
||||
}
|
||||
else if (typeString == TwConst.TypeInt.散件出库.ToString())
|
||||
{
|
||||
//生成规则是20240919-unitcode-AP-GR01
|
||||
string cusBillCode = string.Format("{0:yyyyMMdd}", DateTime.Now) + unitcode+"-" + unitWorkCode +"-";
|
||||
var queryAll = new Tw_InOutMasterOutput()
|
||||
{
|
||||
ProjectId = projectid,
|
||||
CusBillCode = cusBillCode,
|
||||
Category = Category == TwConst.Category.管段.ToString() ? (int)TwConst.Category.管段 : (int)TwConst.Category.管件
|
||||
|
||||
};
|
||||
var queryAllresult = GetModle(queryAll).Count();
|
||||
if (Category == TwConst.Category.管段.ToString())
|
||||
{
|
||||
cusBillCode = cusBillCode + (queryAllresult + 1).ToString().PadLeft(2, '0') + "-GI-P01";
|
||||
}
|
||||
else
|
||||
{
|
||||
cusBillCode = cusBillCode + (queryAllresult + 1).ToString().PadLeft(2, '0') + "-GI-PF01";
|
||||
|
||||
}
|
||||
return cusBillCode;
|
||||
}
|
||||
else
|
||||
{
|
||||
//生成规则是20240919-unitcode-AP-GR01
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@
|
|||
<f:DropDownList ID="drpTypeInt" runat="server" Label="类型" ColumnWidth="20%" OnSelectedIndexChanged="drpTypeInt_SelectedIndexChanged" AutoPostBack="true"
|
||||
LabelWidth="70px" LabelAlign="Right" Width="170px">
|
||||
</f:DropDownList>
|
||||
<f:DropDownList ID="drpCategory" runat="server" Label="类别" ColumnWidth="30%"
|
||||
<f:DropDownList ID="drpCategory" runat="server" Label="类别" ColumnWidth="30%" OnSelectedIndexChanged="drpTypeInt_SelectedIndexChanged" AutoPostBack="true"
|
||||
LabelWidth="70px" LabelAlign="Right" Width="170px">
|
||||
</f:DropDownList>
|
||||
<f:TextBox ID="txtCusBillCode" Label="编号" ColumnWidth="30%" runat="server" ShowRedStar="true" Required="true">
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ namespace FineUIPro.Web.CLGL
|
|||
txtCreateMan.Text = this.CurrUser.PersonName;
|
||||
txtCreateDate.Text = DateTime.Now.ToString("yyyy-MM-dd");
|
||||
drpReqUnit.SelectedValue = this.CurrUser.UnitId;
|
||||
txtCusBillCode.Text = TwInOutplanmasterService.GetDataInCusBillCode(this.CurrUser.LoginProjectId, UnitService.GetUnitByUnitId(this.CurrUser.UnitId)?.UnitCode, drpTypeInt.SelectedText);
|
||||
txtCusBillCode.Text = TwInOutplanmasterService.GetDataInCusBillCode(this.CurrUser.LoginProjectId, UnitService.GetUnitByUnitId(drpReqUnit.SelectedValue)?.UnitCode, UnitWorkService.getUnitWorkByUnitWorkId(UnitWorkId)?.UnitWorkCode,drpTypeInt.SelectedText, drpCategory.SelectedText);
|
||||
}
|
||||
|
||||
drpTypeInt_SelectedIndexChanged(null, null);
|
||||
|
|
@ -302,6 +302,10 @@ namespace FineUIPro.Web.CLGL
|
|||
|
||||
protected void drpTypeInt_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (string.IsNullOrEmpty(Id))
|
||||
{
|
||||
txtCusBillCode.Text = TwInOutplanmasterService.GetDataInCusBillCode(this.CurrUser.LoginProjectId, UnitService.GetUnitByUnitId(drpReqUnit.SelectedValue)?.UnitCode, drpTypeInt.SelectedText, UnitWorkService.getUnitWorkByUnitWorkId(UnitWorkId)?.UnitWorkCode, drpCategory.SelectedText);
|
||||
}
|
||||
if (drpTypeInt.SelectedValue ==((int)TwConst.TypeInt.散件出库).ToString())
|
||||
{
|
||||
Grid1.Hidden=false;
|
||||
|
|
|
|||
Loading…
Reference in New Issue