|
@ -46,8 +46,9 @@ namespace SCP.SupplierData |
|
|
{ |
|
|
{ |
|
|
V_TB_ASN_DETAIL _entity = new V_TB_ASN_DETAIL(); |
|
|
V_TB_ASN_DETAIL _entity = new V_TB_ASN_DETAIL(); |
|
|
_entity.UserInAddress = CurrentUser.FactoryList; |
|
|
_entity.UserInAddress = CurrentUser.FactoryList; |
|
|
_entity.AsnBillNum= Request["AsnBillNum"]; |
|
|
_entity.AsnBillNum = Request["AsnBillNum"]; |
|
|
SCP_ASN_CONTROLLER.Get_V_TB_ASN_DETAIL_List(_entity, (_ret) => { |
|
|
SCP_ASN_CONTROLLER.Get_V_TB_ASN_DETAIL_List(_entity, (_ret) => |
|
|
|
|
|
{ |
|
|
if (_ret.State == ReturnStatus.Succeed) |
|
|
if (_ret.State == ReturnStatus.Succeed) |
|
|
{ |
|
|
{ |
|
|
p_action(_ret.Result); |
|
|
p_action(_ret.Result); |
|
@ -60,7 +61,7 @@ namespace SCP.SupplierData |
|
|
V_TB_ASN _entity = new V_TB_ASN(); |
|
|
V_TB_ASN _entity = new V_TB_ASN(); |
|
|
_entity.AsnBillNum = Request["AsnBillNum"]; |
|
|
_entity.AsnBillNum = Request["AsnBillNum"]; |
|
|
_entity.UserInVendIds = CurrentUser.VenderList; |
|
|
_entity.UserInVendIds = CurrentUser.VenderList; |
|
|
_entity.UserInAddress= CurrentUser.FactoryList; |
|
|
_entity.UserInAddress = CurrentUser.FactoryList; |
|
|
SCP_ASN_CONTROLLER.Get_V_TB_ASN_List(_entity, (_ret) => |
|
|
SCP_ASN_CONTROLLER.Get_V_TB_ASN_List(_entity, (_ret) => |
|
|
{ |
|
|
{ |
|
|
if (_ret.State == ReturnStatus.Succeed) |
|
|
if (_ret.State == ReturnStatus.Succeed) |
|
@ -76,7 +77,7 @@ namespace SCP.SupplierData |
|
|
TXT_VendName.Text = _result.VendName; |
|
|
TXT_VendName.Text = _result.VendName; |
|
|
DP_ReceiveTime.SelectedDate = _result.ReceiveTime; |
|
|
DP_ReceiveTime.SelectedDate = _result.ReceiveTime; |
|
|
DP_ShipTime.SelectedDate = _result.ShipTime; |
|
|
DP_ShipTime.SelectedDate = _result.ShipTime; |
|
|
TXT_StateDesc.Text = _result.State_DESC; |
|
|
TXT_StateDesc.Text = GetResourceKey(_result.State_DESC); |
|
|
if (_result.State == (int)AsnState.Ship) |
|
|
if (_result.State == (int)AsnState.Ship) |
|
|
{ |
|
|
{ |
|
|
string la = GetCurrentLanguage(); |
|
|
string la = GetCurrentLanguage(); |
|
@ -99,7 +100,8 @@ namespace SCP.SupplierData |
|
|
btnException2.Hidden = true; |
|
|
btnException2.Hidden = true; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
SCP_BARCODE_CONTROLLER.Get_TS_BARCODE_List(new TS_BARCODE() { BillNum= TXT_AsnBillNum.Text.Trim() }, retobj => { |
|
|
SCP_BARCODE_CONTROLLER.Get_TS_BARCODE_List(new TS_BARCODE() { BillNum = TXT_AsnBillNum.Text.Trim() }, retobj => |
|
|
|
|
|
{ |
|
|
if (retobj.State == ReturnStatus.Succeed) |
|
|
if (retobj.State == ReturnStatus.Succeed) |
|
|
{ |
|
|
{ |
|
|
if (retobj.Result.Count() > 0) |
|
|
if (retobj.Result.Count() > 0) |
|
@ -118,7 +120,7 @@ namespace SCP.SupplierData |
|
|
public void BindDetail() |
|
|
public void BindDetail() |
|
|
{ |
|
|
{ |
|
|
string la = GetCurrentLanguage(); |
|
|
string la = GetCurrentLanguage(); |
|
|
if (la =="CH") |
|
|
if (la == "CH") |
|
|
{ |
|
|
{ |
|
|
Button1.Hidden = true; |
|
|
Button1.Hidden = true; |
|
|
btnCance2.Hidden = true; |
|
|
btnCance2.Hidden = true; |
|
@ -128,7 +130,8 @@ namespace SCP.SupplierData |
|
|
btnSend.Hidden = true; |
|
|
btnSend.Hidden = true; |
|
|
btnCancel.Hidden = true; |
|
|
btnCancel.Hidden = true; |
|
|
} |
|
|
} |
|
|
SearchV_TB_ASN_DETAILData((ret) => { |
|
|
SearchV_TB_ASN_DETAILData((ret) => |
|
|
|
|
|
{ |
|
|
Grid_V_TB_ASN_DETAIL.RecordCount = ret.Count(); |
|
|
Grid_V_TB_ASN_DETAIL.RecordCount = ret.Count(); |
|
|
var list = SortAndPage<V_TB_ASN_DETAIL>(ret, Grid_V_TB_ASN_DETAIL); |
|
|
var list = SortAndPage<V_TB_ASN_DETAIL>(ret, Grid_V_TB_ASN_DETAIL); |
|
|
Grid_V_TB_ASN_DETAIL.DataSource = list; |
|
|
Grid_V_TB_ASN_DETAIL.DataSource = list; |
|
@ -220,7 +223,7 @@ namespace SCP.SupplierData |
|
|
|
|
|
|
|
|
protected void btnEdit_Click(object sender, EventArgs e) |
|
|
protected void btnEdit_Click(object sender, EventArgs e) |
|
|
{ |
|
|
{ |
|
|
var _asn=Session["Asn"] as V_TB_ASN; |
|
|
var _asn = Session["Asn"] as V_TB_ASN; |
|
|
if (_asn == null) |
|
|
if (_asn == null) |
|
|
{ |
|
|
{ |
|
|
Alert.Show(GetResourceKey("发货订单信息不能为空!")); |
|
|
Alert.Show(GetResourceKey("发货订单信息不能为空!")); |
|
@ -264,7 +267,7 @@ namespace SCP.SupplierData |
|
|
System.Web.UI.WebControls.TextBox TXT_PackQty = (System.Web.UI.WebControls.TextBox)row.FindControl("TXT_PackQty"); |
|
|
System.Web.UI.WebControls.TextBox TXT_PackQty = (System.Web.UI.WebControls.TextBox)row.FindControl("TXT_PackQty"); |
|
|
System.Web.UI.WebControls.TextBox TXT_Qty = (System.Web.UI.WebControls.TextBox)row.FindControl("TXT_Qty"); |
|
|
System.Web.UI.WebControls.TextBox TXT_Qty = (System.Web.UI.WebControls.TextBox)row.FindControl("TXT_Qty"); |
|
|
System.Web.UI.WebControls.TextBox TXT_ProduceDate = (System.Web.UI.WebControls.TextBox)row.FindControl("TXT_ProduceDate"); |
|
|
System.Web.UI.WebControls.TextBox TXT_ProduceDate = (System.Web.UI.WebControls.TextBox)row.FindControl("TXT_ProduceDate"); |
|
|
_entity.VendBatch= TXT_VenBatch.Text; |
|
|
_entity.VendBatch = TXT_VenBatch.Text; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (string.IsNullOrEmpty(TXT_ProduceDate.Text)) |
|
|
if (string.IsNullOrEmpty(TXT_ProduceDate.Text)) |
|
@ -274,7 +277,7 @@ namespace SCP.SupplierData |
|
|
} |
|
|
} |
|
|
else |
|
|
else |
|
|
{ |
|
|
{ |
|
|
_entity.ProduceDate =DateTime.Parse(TXT_ProduceDate.Text); |
|
|
_entity.ProduceDate = DateTime.Parse(TXT_ProduceDate.Text); |
|
|
} |
|
|
} |
|
|
_list.Add(_entity); |
|
|
_list.Add(_entity); |
|
|
} |
|
|
} |
|
@ -335,7 +338,7 @@ namespace SCP.SupplierData |
|
|
_entity.ProduceDate = ConvertHelper.To<DateTime>(rowDataKeys[27]); |
|
|
_entity.ProduceDate = ConvertHelper.To<DateTime>(rowDataKeys[27]); |
|
|
_entity.Batch = rowDataKeys[28] as string; |
|
|
_entity.Batch = rowDataKeys[28] as string; |
|
|
_entity.VendId = rowDataKeys[29] as string; |
|
|
_entity.VendId = rowDataKeys[29] as string; |
|
|
_entity.Guid=ConvertHelper.To<Guid>(rowDataKeys[29]); |
|
|
_entity.Guid = ConvertHelper.To<Guid>(rowDataKeys[29]); |
|
|
|
|
|
|
|
|
_list.Add(_entity); |
|
|
_list.Add(_entity); |
|
|
} |
|
|
} |
|
@ -360,7 +363,7 @@ namespace SCP.SupplierData |
|
|
} |
|
|
} |
|
|
else |
|
|
else |
|
|
{ |
|
|
{ |
|
|
var result=SCP_BARCODE_CONTROLLER.Get_TB_PRINT_COUNT_List(new TB_PRINT_COUNT() { BillNo=_asn.AsnBillNum }); |
|
|
var result = SCP_BARCODE_CONTROLLER.Get_TB_PRINT_COUNT_List(new TB_PRINT_COUNT() { BillNo = _asn.AsnBillNum }); |
|
|
if (result.State == ReturnStatus.Succeed) |
|
|
if (result.State == ReturnStatus.Succeed) |
|
|
{ |
|
|
{ |
|
|
//if (result.Result.Count(p => p.PrintType == (int)PrintType.ASN) == 0)
|
|
|
//if (result.Result.Count(p => p.PrintType == (int)PrintType.ASN) == 0)
|
|
@ -376,7 +379,7 @@ namespace SCP.SupplierData |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
var check = SCP_ASN_CONTROLLER.Get_TS_UNI_API(_asn); |
|
|
var check = SCP_ASN_CONTROLLER.Get_TS_UNI_API(_asn); |
|
|
if(check.State == ReturnStatus.Failed) |
|
|
if (check.State == ReturnStatus.Failed) |
|
|
{ |
|
|
{ |
|
|
Alert.Show(_asn.AsnBillNum + GetResourceKey("请勿重复提交数据!")); |
|
|
Alert.Show(_asn.AsnBillNum + GetResourceKey("请勿重复提交数据!")); |
|
|
return; |
|
|
return; |
|
@ -415,7 +418,7 @@ namespace SCP.SupplierData |
|
|
if (Session["Asn"] != null) |
|
|
if (Session["Asn"] != null) |
|
|
{ |
|
|
{ |
|
|
var _ask = Session["Asn"] as V_TB_ASN; |
|
|
var _ask = Session["Asn"] as V_TB_ASN; |
|
|
var ret = SCP_ASN_CONTROLLER.Save_TB_ASN_STATE(new List<string>() { _ask.AsnBillNum },p_state); |
|
|
var ret = SCP_ASN_CONTROLLER.Save_TB_ASN_STATE(new List<string>() { _ask.AsnBillNum }, p_state); |
|
|
if (ret.State == ReturnStatus.Succeed) |
|
|
if (ret.State == ReturnStatus.Succeed) |
|
|
{ |
|
|
{ |
|
|
Alert.Show(GetResourceKey(p_msg)); |
|
|
Alert.Show(GetResourceKey(p_msg)); |
|
@ -448,10 +451,10 @@ namespace SCP.SupplierData |
|
|
protected void CreateBarCode_Click(object sender, EventArgs e) |
|
|
protected void CreateBarCode_Click(object sender, EventArgs e) |
|
|
{ |
|
|
{ |
|
|
btnCreateBarCode.Enabled = false; |
|
|
btnCreateBarCode.Enabled = false; |
|
|
var _list=GetSelectedList(); |
|
|
var _list = GetSelectedList(); |
|
|
if (_list.Count > 0) |
|
|
if (_list.Count > 0) |
|
|
{ |
|
|
{ |
|
|
var ret=SCP_ASN_CONTROLLER.Save_TB_CREATE_BARCODE(_list); |
|
|
var ret = SCP_ASN_CONTROLLER.Save_TB_CREATE_BARCODE(_list); |
|
|
if (ret.State == ReturnStatus.Succeed) |
|
|
if (ret.State == ReturnStatus.Succeed) |
|
|
{ |
|
|
{ |
|
|
Alert.Show(GetResourceKey("条码创建成功!")); |
|
|
Alert.Show(GetResourceKey("条码创建成功!")); |
|
@ -518,20 +521,20 @@ namespace SCP.SupplierData |
|
|
PageContext.RegisterStartupScript(str); |
|
|
PageContext.RegisterStartupScript(str); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
SCP_BARCODE_CONTROLLER.Save_TB_PRINT_COUNT(new TB_PRINT_COUNT() { BillNo = AsnBillNum, PrintType = (int)PrintType.ASN}); |
|
|
SCP_BARCODE_CONTROLLER.Save_TB_PRINT_COUNT(new TB_PRINT_COUNT() { BillNo = AsnBillNum, PrintType = (int)PrintType.ASN }); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
protected void btnSelectedBarCode_Click(object sender, EventArgs e) |
|
|
protected void btnSelectedBarCode_Click(object sender, EventArgs e) |
|
|
{ |
|
|
{ |
|
|
string AsnBillNum = Request["AsnBillNum"]; |
|
|
string AsnBillNum = Request["AsnBillNum"]; |
|
|
var bacode= SCP_BARCODE_CONTROLLER.GetBacode(AsnBillNum); |
|
|
var bacode = SCP_BARCODE_CONTROLLER.GetBacode(AsnBillNum); |
|
|
if (bacode.Count() == 0) |
|
|
if (bacode.Count() == 0) |
|
|
{ |
|
|
{ |
|
|
Alert.Show(AsnBillNum + GetResourceKey("标签未创建!")); |
|
|
Alert.Show(AsnBillNum + GetResourceKey("标签未创建!")); |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
var SubSite = SCP_BARCODE_CONTROLLER.GetBillNum(AsnBillNum); |
|
|
var SubSite = SCP_BARCODE_CONTROLLER.GetBillNum(AsnBillNum); |
|
|
if (!string.IsNullOrEmpty(AsnBillNum)&&SubSite.Site=="CQBMPT") |
|
|
if (!string.IsNullOrEmpty(AsnBillNum) && SubSite.Site == "CQBMPT") |
|
|
{ |
|
|
{ |
|
|
var str = string.Format("window.open(\"../../Handlers/GenerateReport.ashx?report=Material_CQ&data=101&type=pdf&filename=标签.pdf&AsnBillNum={0}&open=\")", AsnBillNum); |
|
|
var str = string.Format("window.open(\"../../Handlers/GenerateReport.ashx?report=Material_CQ&data=101&type=pdf&filename=标签.pdf&AsnBillNum={0}&open=\")", AsnBillNum); |
|
|
PageContext.RegisterStartupScript(str); |
|
|
PageContext.RegisterStartupScript(str); |
|
@ -550,7 +553,8 @@ namespace SCP.SupplierData |
|
|
|
|
|
|
|
|
#region 计算托盘数量和发货数量是否相等
|
|
|
#region 计算托盘数量和发货数量是否相等
|
|
|
|
|
|
|
|
|
SearchV_TB_ASN_DETAILData((ret) => { |
|
|
SearchV_TB_ASN_DETAILData((ret) => |
|
|
|
|
|
{ |
|
|
|
|
|
|
|
|
var _asn = Session["Asn"] as V_TB_ASN; |
|
|
var _asn = Session["Asn"] as V_TB_ASN; |
|
|
if (_asn == null) |
|
|
if (_asn == null) |
|
@ -560,12 +564,13 @@ namespace SCP.SupplierData |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var _ls=SCP_ASN_CONTROLLER.Get_CAN_PALLET_QTY(ret.ToList()); |
|
|
var _ls = SCP_ASN_CONTROLLER.Get_CAN_PALLET_QTY(ret.ToList()); |
|
|
var _errList = new List<string>(); |
|
|
var _errList = new List<string>(); |
|
|
_ls.ForEach(p => { |
|
|
_ls.ForEach(p => |
|
|
if(p.CanQty>0) |
|
|
{ |
|
|
|
|
|
if (p.CanQty > 0) |
|
|
{ |
|
|
{ |
|
|
_errList.Add(string.Format("编号:{0}名称:{1},托盘数量总和小于发货单数量",p.PartCode,(p.PartDesc1+p.PartDesc2))); |
|
|
_errList.Add(string.Format("编号:{0}名称:{1},托盘数量总和小于发货单数量", p.PartCode, (p.PartDesc1 + p.PartDesc2))); |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
if (_errList.Count > 0) |
|
|
if (_errList.Count > 0) |
|
@ -681,7 +686,7 @@ namespace SCP.SupplierData |
|
|
} |
|
|
} |
|
|
else |
|
|
else |
|
|
{ |
|
|
{ |
|
|
Alert.Show(GetResourceKey( string.Join("\n\r", ret.MessageList.ToArray()))); |
|
|
Alert.Show(GetResourceKey(string.Join("\n\r", ret.MessageList.ToArray()))); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|