|
@ -37,7 +37,7 @@ namespace SCP.WarehouseData |
|
|
public void LoadData() |
|
|
public void LoadData() |
|
|
{ |
|
|
{ |
|
|
var _receive = new V_TB_RECEIVE(); |
|
|
var _receive = new V_TB_RECEIVE(); |
|
|
_receive.RecvBillNum = GetQueryValue("ID"); |
|
|
_receive.ErpRecvBillNum = GetQueryValue("ID"); |
|
|
_receive.UserInAddress = CurrentUser.FactoryList; |
|
|
_receive.UserInAddress = CurrentUser.FactoryList; |
|
|
if (GetQueryValue("STATE") != null) |
|
|
if (GetQueryValue("STATE") != null) |
|
|
{ |
|
|
{ |
|
@ -50,6 +50,7 @@ namespace SCP.WarehouseData |
|
|
var _rec = ret.Result.FirstOrDefault(); |
|
|
var _rec = ret.Result.FirstOrDefault(); |
|
|
txtState.Text = _rec.State_DESC; |
|
|
txtState.Text = _rec.State_DESC; |
|
|
txtBillNo.Text = _rec.RecvBillNum; |
|
|
txtBillNo.Text = _rec.RecvBillNum; |
|
|
|
|
|
txtErpBillNo.Text = _rec.ErpRecvBillNum; |
|
|
txtReceiveTime.Text = Convert.ToDateTime(_rec.ShipTime).ToString("yyyy-MM-dd"); |
|
|
txtReceiveTime.Text = Convert.ToDateTime(_rec.ShipTime).ToString("yyyy-MM-dd"); |
|
|
txtShipBillNo.Text = _rec.AsnBillNum; |
|
|
txtShipBillNo.Text = _rec.AsnBillNum; |
|
|
txtPlanBillNo.Text = _rec.PoBillNum; |
|
|
txtPlanBillNo.Text = _rec.PoBillNum; |
|
@ -65,7 +66,7 @@ namespace SCP.WarehouseData |
|
|
{ |
|
|
{ |
|
|
var _receive = new V_TB_RECEIVE_DETAIL(); |
|
|
var _receive = new V_TB_RECEIVE_DETAIL(); |
|
|
_receive.Site =CurrentUser.UsedDomain; |
|
|
_receive.Site =CurrentUser.UsedDomain; |
|
|
_receive.RecvBillNum = GetQueryValue("ID"); |
|
|
_receive.ErpRecvBillNum = GetQueryValue("ID"); |
|
|
|
|
|
|
|
|
SCP_RECIVECE_CONTROLLER.Get_V_TB_RECEIVE_DETAIL_List(_receive, (ret) => |
|
|
SCP_RECIVECE_CONTROLLER.Get_V_TB_RECEIVE_DETAIL_List(_receive, (ret) => |
|
|
{ |
|
|
{ |
|
@ -83,7 +84,7 @@ namespace SCP.WarehouseData |
|
|
public void BindData_View() |
|
|
public void BindData_View() |
|
|
{ |
|
|
{ |
|
|
var _receive = new V_TB_RECEIVE_DETAIL(); |
|
|
var _receive = new V_TB_RECEIVE_DETAIL(); |
|
|
_receive.RecvBillNum = GetQueryValue("ID"); |
|
|
_receive.ErpRecvBillNum = GetQueryValue("ID"); |
|
|
if (string.IsNullOrEmpty(Request["ID"].Trim())) |
|
|
if (string.IsNullOrEmpty(Request["ID"].Trim())) |
|
|
{ |
|
|
{ |
|
|
if (!string.IsNullOrEmpty("PartCode")) |
|
|
if (!string.IsNullOrEmpty("PartCode")) |
|
@ -127,7 +128,7 @@ namespace SCP.WarehouseData |
|
|
protected void btnOutput_OnClick(object sender, EventArgs e) |
|
|
protected void btnOutput_OnClick(object sender, EventArgs e) |
|
|
{ |
|
|
{ |
|
|
var _receive = new V_TB_RECEIVE_DETAIL(); |
|
|
var _receive = new V_TB_RECEIVE_DETAIL(); |
|
|
_receive.RecvBillNum = GetQueryValue("ID"); |
|
|
_receive.ErpRecvBillNum = GetQueryValue("ID"); |
|
|
_receive.Site = CurrentUser.UsedDomain; |
|
|
_receive.Site = CurrentUser.UsedDomain; |
|
|
SCP_RECIVECE_CONTROLLER.Get_V_TB_RECEIVE_DETAIL_List(_receive, (ret) => |
|
|
SCP_RECIVECE_CONTROLLER.Get_V_TB_RECEIVE_DETAIL_List(_receive, (ret) => |
|
|
{ |
|
|
{ |
|
@ -161,7 +162,7 @@ namespace SCP.WarehouseData |
|
|
{ |
|
|
{ |
|
|
|
|
|
|
|
|
var _receive = new V_TB_RECEIVE(); |
|
|
var _receive = new V_TB_RECEIVE(); |
|
|
_receive.RecvBillNum = GetQueryValue("ID"); |
|
|
_receive.ErpRecvBillNum = GetQueryValue("ID"); |
|
|
_receive.Site = GetQueryValue("Site"); |
|
|
_receive.Site = GetQueryValue("Site"); |
|
|
if (GetQueryValue("STATE") != null) |
|
|
if (GetQueryValue("STATE") != null) |
|
|
{ |
|
|
{ |
|
@ -203,7 +204,7 @@ namespace SCP.WarehouseData |
|
|
protected void btnBack_Click(object sender, EventArgs e) |
|
|
protected void btnBack_Click(object sender, EventArgs e) |
|
|
{ |
|
|
{ |
|
|
var _receive = new V_TB_RECEIVE(); |
|
|
var _receive = new V_TB_RECEIVE(); |
|
|
_receive.RecvBillNum = GetQueryValue("ID"); |
|
|
_receive.ErpRecvBillNum = GetQueryValue("ID"); |
|
|
_receive.Site =GetQueryValue("Site"); |
|
|
_receive.Site =GetQueryValue("Site"); |
|
|
_receive.State = 1; |
|
|
_receive.State = 1; |
|
|
SCP_RECIVECE_CONTROLLER.Get_V_TB_RECEIVE_List(_receive, (ret) => |
|
|
SCP_RECIVECE_CONTROLLER.Get_V_TB_RECEIVE_List(_receive, (ret) => |
|
@ -215,14 +216,14 @@ namespace SCP.WarehouseData |
|
|
{ |
|
|
{ |
|
|
if (_rec != null) |
|
|
if (_rec != null) |
|
|
{ |
|
|
{ |
|
|
int _count=SCPDB.TB_INVOICE_DETAIL.Where(p => p.RecvBillNum == _rec.RecvBillNum && p.PoBillNum == _rec.PoBillNum).Count(); |
|
|
int _count=SCPDB.TB_INVOICE_DETAIL.Where(p => p.ErpRecvBillNum == _rec.ErpRecvBillNum && p.PoBillNum == _rec.PoBillNum).Count(); |
|
|
if (_count > 0) |
|
|
if (_count > 0) |
|
|
{ |
|
|
{ |
|
|
Alert.Show("不能取消已经开票!"); |
|
|
Alert.Show("不能取消已经开票!"); |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
var rec = SCPDB.TB_RECEIVE_QAD.Where(p => p.RecvBillNum == _rec.RecvBillNum && p.Site == _rec.Site).FirstOrDefault(); |
|
|
var rec = SCPDB.TB_RECEIVE_QAD.Where(p => p.ErpRecvBillNum == _rec.ErpRecvBillNum && p.Site == _rec.Site).FirstOrDefault(); |
|
|
var detail = SCPDB.TB_RECEIVE_DETAIL_QAD.Where(p => p.RecvBillNum == _rec.RecvBillNum && p.Remark == _rec.Site).ToArray(); |
|
|
var detail = SCPDB.TB_RECEIVE_DETAIL_QAD.Where(p => p.ErpRecvBillNum == _rec.ErpRecvBillNum && p.Site == _rec.Site).ToArray(); |
|
|
if (rec != null) |
|
|
if (rec != null) |
|
|
{ |
|
|
{ |
|
|
rec.State = 0; |
|
|
rec.State = 0; |
|
|