Browse Source

提交审核

master
学 赵 4 years ago
parent
commit
a2cff9fff4
  1. 2
      SCP/Views/SupplierData/SCP_INVOICE_CREATE.aspx
  2. 56
      SCP/Views/SupplierData/SCP_INVOICE_CREATE.aspx.cs
  3. 7
      SCP/Views/SupplierData/SCP_INVOICE_EDIT.aspx.cs

2
SCP/Views/SupplierData/SCP_INVOICE_CREATE.aspx

@ -33,7 +33,7 @@
<f:Grid ID="Grid_SCP_INVOICE_CREATE" runat="server" <f:Grid ID="Grid_SCP_INVOICE_CREATE" runat="server"
ShowBorder ="true" ShowBorder ="true"
ShowHeader="true" ShowHeader="true"
PageSize="100" PageSize="1000"
BoxFlex="1" BoxFlex="1"
CssClass="maingrid" CssClass="maingrid"
DataKeyNames="UID,RecvBillNum,PoLine,PartCode,Batch,Qty,DockCode,Remark,CreateTime,CreateUser,IsDeleted,GUID,AsnBillNum,Site,VendId,ShipTime,OperName,PartDesc1,State,PoBillNum,VendName,Site_Desc,PoUnit,LocUnit,Price,VendBatch,Currency,BillType_DESC,ErpRecvBillNum,PurCost,StdCost" DataKeyNames="UID,RecvBillNum,PoLine,PartCode,Batch,Qty,DockCode,Remark,CreateTime,CreateUser,IsDeleted,GUID,AsnBillNum,Site,VendId,ShipTime,OperName,PartDesc1,State,PoBillNum,VendName,Site_Desc,PoUnit,LocUnit,Price,VendBatch,Currency,BillType_DESC,ErpRecvBillNum,PurCost,StdCost"

56
SCP/Views/SupplierData/SCP_INVOICE_CREATE.aspx.cs

@ -62,11 +62,16 @@ namespace SCP.Views.SupplierData
private void SearchData(Action<IQueryable<V_TB_RECEIVE_LIST>> p_action) private void SearchData(Action<IQueryable<V_TB_RECEIVE_LIST>> p_action)
{ {
V_TB_RECEIVE_LIST _entity = new V_TB_RECEIVE_LIST(); V_TB_RECEIVE_LIST _entity = new V_TB_RECEIVE_LIST();
MyQueryStringDeCode de = new MyQueryStringDeCode();
string ReceiveID = de.QueryString("ReceiveID");
if (ReceiveID == "") if (Session["InvoiceCreateQueryParm"] != null)
{
InvoiceCreateQueryParm parm = Session["InvoiceCreateQueryParm"] as InvoiceCreateQueryParm;
if (string.IsNullOrEmpty(parm.ReceiveID))
{ Alert.Show("参数不正确!"); return; } { Alert.Show("参数不正确!"); return; }
var ary = ReceiveID.Split(','); var ary = parm.ReceiveID.Split(',');
if (ary != null && ary.Length > 0) if (ary != null && ary.Length > 0)
{ {
_entity.UIDList = new List<long>(); _entity.UIDList = new List<long>();
@ -84,13 +89,23 @@ namespace SCP.Views.SupplierData
} }
}); });
} }
}
else
{
Alert.Show("操作超时!");
}
} }
public void BindData() public void BindData()
{ {
SearchData(q => SearchData(q =>
{ {
MyQueryStringDeCode de = new MyQueryStringDeCode();
InvoiceCreateQueryParm parm = Session["InvoiceCreateQueryParm"] as InvoiceCreateQueryParm;
Grid_SCP_INVOICE_CREATE.RecordCount = q.Count(); Grid_SCP_INVOICE_CREATE.RecordCount = q.Count();
q = SortAndPage<V_TB_RECEIVE_LIST>(q, Grid_SCP_INVOICE_CREATE); q = SortAndPage<V_TB_RECEIVE_LIST>(q, Grid_SCP_INVOICE_CREATE);
List<V_TB_RECEIVE_LIST> temp = SCP_RECIVECE_CONTROLLER.Get_V_TB_RECEIVE_LIST(q.ToList()); List<V_TB_RECEIVE_LIST> temp = SCP_RECIVECE_CONTROLLER.Get_V_TB_RECEIVE_LIST(q.ToList());
@ -106,7 +121,7 @@ namespace SCP.Views.SupplierData
if (CurrentUser.RoleList.Contains("采购人员")) if (CurrentUser.RoleList.Contains("采购人员"))
{ {
_vendId = de.QueryString("VendId"); _vendId = parm.VendId;
} }
else else
{ {
@ -144,7 +159,7 @@ namespace SCP.Views.SupplierData
// } // }
//}); //});
var _isall=de.QueryString("IsAll"); var _isall=parm.IsAll;
if(_isall=="0") if(_isall=="0")
{ {
temp.ForEach(p => { temp.ForEach(p => {
@ -181,22 +196,27 @@ namespace SCP.Views.SupplierData
} }
//确认创建发票 //确认创建发票
protected void btnOk_OnClick(object sender, EventArgs e) protected void btnOk_OnClick(object sender, EventArgs e)
{
if (Session["InvoiceCreateQueryParm"] != null)
{ {
InvoiceCreateQueryParm parm = Session["InvoiceCreateQueryParm"] as InvoiceCreateQueryParm;
V_TB_INVOICE invoice = new V_TB_INVOICE(); V_TB_INVOICE invoice = new V_TB_INVOICE();
invoice.InvcBillNum = SCP_BILLCODE_CONTROLLER.MakeInvoiceCode(); invoice.InvcBillNum = SCP_BILLCODE_CONTROLLER.MakeInvoiceCode();
invoice.CreateTime = DateTime.Now; invoice.CreateTime = DateTime.Now;
invoice.InvoiceNum = ""; invoice.InvoiceNum = "";
invoice.Remark = txtRemark.Text; invoice.Remark = txtRemark.Text;
invoice.CreateUser = CurrentUser.Name; invoice.CreateUser = CurrentUser.Name;
MyQueryStringDeCode de = new MyQueryStringDeCode();
string _VendId= de.QueryString("VendId"); string _VendId = parm.VendId;
string _tax = de.QueryString("Tax"); string _tax = parm.Tax;
invoice.VendId = _VendId; invoice.VendId = _VendId;
invoice.State = (int)InvoiceState.New; invoice.State = (int)InvoiceState.New;
invoice.Tax = decimal.Parse(_tax); invoice.Tax = decimal.Parse(_tax);
string _cj = de.QueryString("CJ"); string _cj = parm.CJ;
string _tz= de.QueryString("TZ"); string _tz = parm.TZ;
invoice.BlancePrice = decimal.Parse(_tz); invoice.BlancePrice = decimal.Parse(_tz);
invoice.ContractPrice = decimal.Parse(_cj); invoice.ContractPrice = decimal.Parse(_cj);
@ -302,7 +322,8 @@ namespace SCP.Views.SupplierData
return; return;
} }
int _number = 0; int _number = 0;
_list.ForEach(p =>{ _list.ForEach(p =>
{
if (p.Qty > 0) if (p.Qty > 0)
{ {
_number++; _number++;
@ -310,7 +331,7 @@ namespace SCP.Views.SupplierData
}); });
if (_number == _list.Count) if (_number == _list.Count)
{ {
string _modify = de.QueryString("Modify"); string _modify = parm.Modify;
if (_modify == "1") if (_modify == "1")
{ {
Alert.Show("有退货单未处理!"); Alert.Show("有退货单未处理!");
@ -324,6 +345,11 @@ namespace SCP.Views.SupplierData
script += ActiveWindow.GetHidePostBackReference(); script += ActiveWindow.GetHidePostBackReference();
PageContext.RegisterStartupScript(script); PageContext.RegisterStartupScript(script);
} }
}
else
{
Alert.Show("操作超时");
}
} }
@ -378,7 +404,7 @@ namespace SCP.Views.SupplierData
} }
//_info.SupplierCode = vu.VenderId; //_info.SupplierCode = vu.VenderId;
} }
Session["InvoiceCreateQueryParm"] = null;
return strTax; return strTax;
} }

7
SCP/Views/SupplierData/SCP_INVOICE_EDIT.aspx.cs

@ -391,19 +391,16 @@ namespace SCP.Views.SupplierData
Alert.Show("单价输入不正确"); Alert.Show("单价输入不正确");
return; return;
} }
_entity.Remark = txtLineMemo.Text; _entity.Remark = txtLineMemo.Text;
_entity.Price = PriceNew; _entity.Price = PriceNew;
_entity.Qty = QtyNew; _entity.Qty = QtyNew;
_ls.Add(_entity); _ls.Add(_entity);
} }
} }
// SCPDB.Database.SqlQuery<V_TB_INVOICE>("select * from V_TB_INVOICE WHERE STATE==0 AND ").ToArray
if (_ls.Count > 0) if (_ls.Count > 0)
{ {
var ret = SCP_INVOICE_CONTROLLER.SAVE_TB_INVOICE_APPLY(_invoice,_ls); var ret = SCP_INVOICE_CONTROLLER.SAVE_TB_INVOICE_APPLY(_invoice,_ls);

Loading…
Cancel
Save