TML
4 years ago
211 changed files with 16984 additions and 5904 deletions
@ -0,0 +1,524 @@ |
|||||
|
using System; |
||||
|
using System.Linq; |
||||
|
using CK.SCP.Models.Enums; |
||||
|
using CK.SCP.Models.ScpEntity; |
||||
|
using CK.SCP.Utils; |
||||
|
using CK.SCP.Models; |
||||
|
using System.Data; |
||||
|
using System.Data.Entity.Core; |
||||
|
using System.Text; |
||||
|
using CK.SCP.Models.ScpEntity.ExcelExportEnttity; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Data.Entity.Migrations; |
||||
|
|
||||
|
namespace CK.SCP.Controller |
||||
|
{ |
||||
|
public class SCP_MoldSharing_Controller |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 获取模具分摊列表
|
||||
|
/// </summary>
|
||||
|
/// <param name="p_entity"></param>
|
||||
|
/// <param name="p_action"></param>
|
||||
|
public static void Get_V_TA_MoldSharing_List(TA_MOLDSHARING p_entity, Action<ResultObject<IQueryable<TA_MOLDSHARING>>> p_action) |
||||
|
{ |
||||
|
ResultObject<IQueryable<TA_MOLDSHARING>> _ret = new ResultObject<IQueryable<TA_MOLDSHARING>>(); |
||||
|
try |
||||
|
{ |
||||
|
using (ScpEntities db = EntitiesFactory.CreateScpInstance()) |
||||
|
{ |
||||
|
IQueryable<TA_MOLDSHARING> q = db.TA_MoldSharing; |
||||
|
if (p_entity.UID!=0) |
||||
|
{ |
||||
|
q = q.Where(p => p.UID == p_entity.UID); |
||||
|
} |
||||
|
if (!string.IsNullOrEmpty(p_entity.PartCode)) |
||||
|
{ |
||||
|
q = q.Where(p => p.PartCode == p_entity.PartCode); |
||||
|
} |
||||
|
if (!string.IsNullOrEmpty(p_entity.VendId)) |
||||
|
{ |
||||
|
q = q.Where(p => p.VendId == p_entity.VendId); |
||||
|
} |
||||
|
q = q.Where(p => p.IsDeleted == p_entity.IsDeleted); |
||||
|
_ret.State = ReturnStatus.Succeed; |
||||
|
_ret.Result = q; |
||||
|
p_action(_ret); |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常
|
||||
|
{ |
||||
|
var sb = new StringBuilder(); |
||||
|
foreach (var error in dbEx.EntityValidationErrors.ToList()) |
||||
|
{ |
||||
|
error.ValidationErrors.ToList().ForEach(i => |
||||
|
{ |
||||
|
sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); |
||||
|
}); |
||||
|
} |
||||
|
_ret.State = ReturnStatus.Failed; |
||||
|
_ret.ErrorList.Add(dbEx); |
||||
|
LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_MoldSharing_Controller), "Get_V_TA_MoldSharing_List", sb.ToString()); |
||||
|
throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); |
||||
|
} |
||||
|
catch (OptimisticConcurrencyException ex)//并发冲突异常
|
||||
|
{ |
||||
|
|
||||
|
_ret.State = ReturnStatus.Failed; |
||||
|
_ret.ErrorList.Add(ex); |
||||
|
LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_MoldSharing_Controller), "Get_V_TA_MoldSharing_List", ex.ToString()); |
||||
|
throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); |
||||
|
} |
||||
|
catch (ScpException ex) |
||||
|
{ |
||||
|
_ret.State = ReturnStatus.Failed; |
||||
|
_ret.ErrorList.Add(ex); |
||||
|
LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_MoldSharing_Controller), "Get_V_TA_MoldSharing_List", ex.ToString()); |
||||
|
|
||||
|
if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) |
||||
|
{ |
||||
|
var inner = (UpdateException)ex.InnerException; |
||||
|
|
||||
|
|
||||
|
throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
if (ex.InnerException != null) throw ex.InnerException; |
||||
|
} |
||||
|
} |
||||
|
catch (Exception e) |
||||
|
{ |
||||
|
_ret.State = ReturnStatus.Failed; |
||||
|
_ret.ErrorList.Add(e); |
||||
|
LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_MoldSharing_Controller), "Get_V_TA_MoldSharing_List", e.Message); |
||||
|
throw e; |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
||||
|
|
||||
|
public static void Get_V_TA_MOLDSHARING_INVOICE_List(TA_MOLDSHARING_INVOICE p_entity, Action<ResultObject<IQueryable<TA_MOLDSHARING_INVOICE>>> p_action) |
||||
|
{ |
||||
|
ResultObject<IQueryable<TA_MOLDSHARING_INVOICE>> _ret = new ResultObject<IQueryable<TA_MOLDSHARING_INVOICE>>(); |
||||
|
try |
||||
|
{ |
||||
|
using (ScpEntities db = EntitiesFactory.CreateScpInstance()) |
||||
|
{ |
||||
|
IQueryable<TA_MOLDSHARING_INVOICE> q = db.TA_MoldSharing_Invoice; |
||||
|
if (p_entity.MoldSharingId != 0) |
||||
|
{ |
||||
|
q = q.Where(p => p.MoldSharingId == p_entity.MoldSharingId); |
||||
|
} |
||||
|
if (!string.IsNullOrEmpty(p_entity.PartCode)) |
||||
|
{ |
||||
|
q = q.Where(p => p.PartCode == p_entity.PartCode); |
||||
|
} |
||||
|
_ret.State = ReturnStatus.Succeed; |
||||
|
_ret.Result = q; |
||||
|
p_action(_ret); |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常
|
||||
|
{ |
||||
|
var sb = new StringBuilder(); |
||||
|
foreach (var error in dbEx.EntityValidationErrors.ToList()) |
||||
|
{ |
||||
|
error.ValidationErrors.ToList().ForEach(i => |
||||
|
{ |
||||
|
sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); |
||||
|
}); |
||||
|
} |
||||
|
_ret.State = ReturnStatus.Failed; |
||||
|
_ret.ErrorList.Add(dbEx); |
||||
|
LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_MoldSharing_Controller), "Get_V_TA_MOLDSHARING_INVOICE_List", sb.ToString()); |
||||
|
throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); |
||||
|
} |
||||
|
catch (OptimisticConcurrencyException ex)//并发冲突异常
|
||||
|
{ |
||||
|
|
||||
|
_ret.State = ReturnStatus.Failed; |
||||
|
_ret.ErrorList.Add(ex); |
||||
|
LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_MoldSharing_Controller), "Get_V_TA_MOLDSHARING_INVOICE_List", ex.ToString()); |
||||
|
throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); |
||||
|
} |
||||
|
catch (ScpException ex) |
||||
|
{ |
||||
|
_ret.State = ReturnStatus.Failed; |
||||
|
_ret.ErrorList.Add(ex); |
||||
|
LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_MoldSharing_Controller), "Get_V_TA_MOLDSHARING_INVOICE_List", ex.ToString()); |
||||
|
|
||||
|
if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) |
||||
|
{ |
||||
|
var inner = (UpdateException)ex.InnerException; |
||||
|
|
||||
|
|
||||
|
throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
if (ex.InnerException != null) throw ex.InnerException; |
||||
|
} |
||||
|
} |
||||
|
catch (Exception e) |
||||
|
{ |
||||
|
_ret.State = ReturnStatus.Failed; |
||||
|
_ret.ErrorList.Add(e); |
||||
|
LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_MoldSharing_Controller), "Get_V_TA_MOLDSHARING_INVOICE_List", e.Message); |
||||
|
throw e; |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
/// <summary>
|
||||
|
/// 模具分摊导入
|
||||
|
/// </summary>
|
||||
|
/// <param name="p_order_list"></param>
|
||||
|
/// <param name="site"></param>
|
||||
|
/// <param name="p_creator"></param>
|
||||
|
/// <returns></returns>
|
||||
|
public static ResultObject<bool> EXCEL_MOLDSHARING_MOD(List<SCP_MOLDSHARING_EXPORT> p_order_list, string site, string p_creator) |
||||
|
{ |
||||
|
ResultObject<bool> _ret = new ResultObject<bool>(); |
||||
|
try |
||||
|
{ |
||||
|
using (ScpEntities db = EntitiesFactory.CreateScpInstance()) |
||||
|
{ |
||||
|
int number = 1; |
||||
|
List<string> lineError = new List<string>(); |
||||
|
List<string> ErrorList = new List<string>(); |
||||
|
var _lst = p_order_list; |
||||
|
_lst.ForEach(p => |
||||
|
{ |
||||
|
var _ls = CheckExcelMode_MoldSharing(db, p, site); |
||||
|
if (_ls.Count > 0) |
||||
|
{ |
||||
|
lineError.Add(number.ToString()); |
||||
|
ErrorList.Add(string.Join("<br>", _ls.ToArray())); |
||||
|
} |
||||
|
number++; |
||||
|
}); |
||||
|
if (lineError.Count > 0) |
||||
|
{ |
||||
|
_ret.State = ReturnStatus.Failed; |
||||
|
_ret.MessageList.AddRange(ErrorList); |
||||
|
_ret.Result = false; |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
_lst.ForEach(p => |
||||
|
{ |
||||
|
var _moldsharing = db.TA_MoldSharing.SingleOrDefault(t => t.VendId == p.供应商编码.ToUpper() && t.PartCode == p.零件编码.ToUpper()) ?? |
||||
|
new TA_MOLDSHARING |
||||
|
{ |
||||
|
VendId = p.供应商编码.ToUpper(), |
||||
|
PartCode = p.零件编码.ToUpper(), |
||||
|
CreateTime = DateTime.Now, |
||||
|
CreateUser = p_creator, |
||||
|
IsDeleted = false, |
||||
|
Count = 0, |
||||
|
}; |
||||
|
_moldsharing.Price = decimal.Parse(p.价格); |
||||
|
_moldsharing.TotalCount = decimal.Parse(p.分摊总量); |
||||
|
_moldsharing.InitialQty = decimal.Parse(p.初始已分摊数量); |
||||
|
_moldsharing.Qty = (_moldsharing.TotalCount - _moldsharing.InitialQty); |
||||
|
_moldsharing.UpdateTime = DateTime.Now; |
||||
|
_moldsharing.UpdateUser = p_creator; |
||||
|
_moldsharing.Site = site; |
||||
|
if(_moldsharing.Qty< _moldsharing.Count) |
||||
|
{ |
||||
|
_ret.MessageList.Add(string.Format("零件号{0}(分摊总量-初始已分摊数量)小于已累计数量!", _moldsharing.PartCode)); |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
db.TA_MoldSharing.AddOrUpdate(_moldsharing); |
||||
|
} |
||||
|
}); |
||||
|
if (_ret.MessageList.Count == 0) |
||||
|
{ |
||||
|
int state = db.SaveChanges(); |
||||
|
if (state != -1) |
||||
|
{ |
||||
|
_ret.State = ReturnStatus.Succeed; |
||||
|
_ret.Result = true; |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
_ret.State = ReturnStatus.Failed; |
||||
|
_ret.Result = false; |
||||
|
} |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
_ret.State = ReturnStatus.Failed; |
||||
|
_ret.Result = false; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常
|
||||
|
{ |
||||
|
var sb = new StringBuilder(); |
||||
|
|
||||
|
foreach (var error in dbEx.EntityValidationErrors.ToList()) |
||||
|
{ |
||||
|
|
||||
|
error.ValidationErrors.ToList().ForEach(i => |
||||
|
{ |
||||
|
sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); |
||||
|
}); |
||||
|
} |
||||
|
_ret.State = ReturnStatus.Failed; |
||||
|
_ret.Result = false; |
||||
|
_ret.ErrorList.Add(dbEx); |
||||
|
LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_MoldSharing_Controller), "EXCEL_MOLDSHARING_MOD", sb.ToString()); |
||||
|
throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); |
||||
|
} |
||||
|
catch (OptimisticConcurrencyException ex)//并发冲突异常
|
||||
|
{ |
||||
|
|
||||
|
_ret.State = ReturnStatus.Failed; |
||||
|
_ret.Result = false; |
||||
|
_ret.ErrorList.Add(ex); |
||||
|
LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_MoldSharing_Controller), "EXCEL_MOLDSHARING_MOD", ex.ToString()); |
||||
|
throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); |
||||
|
} |
||||
|
catch (ScpException ex) |
||||
|
{ |
||||
|
|
||||
|
|
||||
|
_ret.State = ReturnStatus.Failed; |
||||
|
_ret.Result = false; |
||||
|
_ret.ErrorList.Add(ex); |
||||
|
LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_MoldSharing_Controller), "EXCEL_MOLDSHARING_MOD", ex.ToString()); |
||||
|
|
||||
|
if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) |
||||
|
{ |
||||
|
var inner = (UpdateException)ex.InnerException; |
||||
|
|
||||
|
|
||||
|
throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
if (ex.InnerException != null) throw ex.InnerException; |
||||
|
} |
||||
|
} |
||||
|
catch (Exception e) |
||||
|
{ |
||||
|
_ret.State = ReturnStatus.Failed; |
||||
|
LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_MoldSharing_Controller), "EXCEL_MOLDSHARING_MOD", e.Message); |
||||
|
_ret.Result = false; |
||||
|
_ret.ErrorList.Add(e); |
||||
|
throw e; |
||||
|
} |
||||
|
return _ret; |
||||
|
} |
||||
|
/// <summary>
|
||||
|
/// 数据检验
|
||||
|
/// </summary>
|
||||
|
/// <param name="db"></param>
|
||||
|
/// <param name="p_excel"></param>
|
||||
|
/// <param name="site"></param>
|
||||
|
/// <returns></returns>
|
||||
|
public static List<string> CheckExcelMode_MoldSharing(ScpEntities db, SCP_MOLDSHARING_EXPORT p_excel, string site) |
||||
|
{ |
||||
|
List<string> ErrorList = new List<string>(); |
||||
|
if (!string.IsNullOrEmpty(p_excel.供应商编码)) |
||||
|
{ |
||||
|
int count = db.TA_VENDER.Count(p => p.VendId == p_excel.供应商编码 && p.Site == site); |
||||
|
if (count <= 0) |
||||
|
{ |
||||
|
ErrorList.Add(string.Format("供应商{0}不存在!", p_excel.供应商编码)); |
||||
|
} |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
ErrorList.Add(string.Format("供应商代码为空!")); |
||||
|
} |
||||
|
if (!string.IsNullOrEmpty(p_excel.零件编码)) |
||||
|
{ |
||||
|
int count = db.TA_PART.Count(p => p.PartCode == p_excel.零件编码 && p.Site == site); |
||||
|
if (count <= 0) |
||||
|
{ |
||||
|
ErrorList.Add(string.Format("零件编号{0}不存在!", p_excel.零件编码)); |
||||
|
} |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
ErrorList.Add(string.Format("零件号为空!")); |
||||
|
} |
||||
|
if ( |
||||
|
string.IsNullOrEmpty(p_excel.供应商编码) || |
||||
|
string.IsNullOrEmpty(p_excel.零件编码) || |
||||
|
string.IsNullOrEmpty(p_excel.价格) || |
||||
|
string.IsNullOrEmpty(p_excel.分摊总量)|| |
||||
|
string.IsNullOrEmpty(p_excel.初始已分摊数量)) |
||||
|
{ |
||||
|
ErrorList.Add(string.Format("供应商代码【{0}】零件编号【{1}】有填写为空!", p_excel.供应商编码, p_excel.零件编码)); |
||||
|
} |
||||
|
return ErrorList; |
||||
|
} |
||||
|
/// <summary>
|
||||
|
/// 获取模具分摊价格(沈阳模具分摊)
|
||||
|
/// </summary>
|
||||
|
/// <param name="p_list"></param>
|
||||
|
/// <returns></returns>
|
||||
|
public static List<V_TB_RECEIVE_LIST> GET_MoldSharing_LIST_SYJB(List<V_TB_RECEIVE_LIST> p_list) |
||||
|
{ |
||||
|
using (ScpEntities db = EntitiesFactory.CreateScpInstance()) |
||||
|
{ |
||||
|
if (p_list.Count > 0) |
||||
|
{ |
||||
|
p_list.ForEach(p => |
||||
|
{ |
||||
|
//var entity_price = db.V_TB_PRICE.Where(t => t.VendId == p.VendId && t.PartCode == p.PartCode && t.StartTime <= DateTime.Now).FirstOrDefault();
|
||||
|
//if (entity_price != null)
|
||||
|
//{
|
||||
|
// p.Price = entity_price.Amt;
|
||||
|
//}
|
||||
|
var _entity = db.TA_MoldSharing.Where(itm => itm.Qty!= itm.Count && itm.PartCode == p.PartCode && itm.VendId == p.VendId &&itm.IsDeleted==false).FirstOrDefault(); |
||||
|
if (_entity != null) |
||||
|
{ |
||||
|
p.Price += decimal.Parse(_entity.Price.ToString()); |
||||
|
} |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
|
return p_list; |
||||
|
} |
||||
|
/// <summary>
|
||||
|
/// 获取模具分摊价格
|
||||
|
/// </summary>
|
||||
|
/// <param name="p_list"></param>
|
||||
|
/// <returns></returns>
|
||||
|
public static List<V_TB_RECEIVE_LIST> GET_MoldSharing_LIST(List<V_TB_RECEIVE_LIST> p_list) |
||||
|
{ |
||||
|
using (ScpEntities db = EntitiesFactory.CreateScpInstance()) |
||||
|
{ |
||||
|
if (p_list.Count > 0) |
||||
|
{ |
||||
|
p_list.ForEach(p => |
||||
|
{ |
||||
|
var _entity = db.TA_MoldSharing.Where(itm => itm.Qty > itm.Count && itm.PartCode == p.PartCode && itm.VendId == p.VendId &&itm.IsDeleted==false).FirstOrDefault(); |
||||
|
if (_entity != null) |
||||
|
{ |
||||
|
p.BlancePrice = decimal.Parse(_entity.Price.ToString()); |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
p.BlancePrice = 0; |
||||
|
} |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
|
return p_list; |
||||
|
} |
||||
|
public static ResultObject<bool> Save_TA_MOLDSHARING_STATE (List<long> p_list, string p_user, bool p_isdelete) |
||||
|
{ |
||||
|
ResultObject<bool> _ret = new ResultObject<bool>(); |
||||
|
try |
||||
|
{ |
||||
|
using (ScpEntities db = EntitiesFactory.CreateScpInstance()) |
||||
|
{ |
||||
|
|
||||
|
if (p_isdelete == true) |
||||
|
{ |
||||
|
var _ls = db.TA_MoldSharing.Where(p => p_list.Contains(p.UID)&& p.Count <= 0).ToList(); |
||||
|
if (_ls.Count > 0) |
||||
|
{ |
||||
|
_ls.ForEach(p => |
||||
|
{ |
||||
|
p.IsDeleted = true; |
||||
|
p.UpdateTime = DateTime.Now; |
||||
|
p.UpdateUser = p_user; |
||||
|
} |
||||
|
); |
||||
|
db.TA_MoldSharing.AddOrUpdate(p => p.UID, _ls.ToArray()); |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
_ret.State = ReturnStatus.Failed; |
||||
|
_ret.Result = false; |
||||
|
_ret.Message = "选择的记录,已经开始计数不能删除!"; |
||||
|
} |
||||
|
} |
||||
|
if (string.IsNullOrEmpty(_ret.Message)) |
||||
|
{ |
||||
|
if (db.SaveChanges() != -1) |
||||
|
{ |
||||
|
_ret.State = ReturnStatus.Succeed; |
||||
|
_ret.Result = true; |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
_ret.State = ReturnStatus.Failed; |
||||
|
_ret.Result = false; |
||||
|
_ret.Message = "数据更新失败!"; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常
|
||||
|
{ |
||||
|
var sb = new StringBuilder(); |
||||
|
|
||||
|
foreach (var error in dbEx.EntityValidationErrors.ToList()) |
||||
|
{ |
||||
|
|
||||
|
error.ValidationErrors.ToList().ForEach(i => |
||||
|
{ |
||||
|
sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); |
||||
|
}); |
||||
|
} |
||||
|
_ret.State = ReturnStatus.Failed; |
||||
|
_ret.Result = false; |
||||
|
_ret.ErrorList.Add(dbEx); |
||||
|
LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_MoldSharing_Controller), "Save_TA_MOLDSHARING_STATE", sb.ToString()); |
||||
|
throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "字段验证失败" + sb.ToString()); |
||||
|
} |
||||
|
catch (OptimisticConcurrencyException ex)//并发冲突异常
|
||||
|
{ |
||||
|
|
||||
|
_ret.State = ReturnStatus.Failed; |
||||
|
_ret.Result = false; |
||||
|
_ret.ErrorList.Add(ex); |
||||
|
LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_MoldSharing_Controller), "Save_TA_MOLDSHARING_STATE", ex.ToString()); |
||||
|
throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); |
||||
|
} |
||||
|
catch (ScpException ex) |
||||
|
{ |
||||
|
|
||||
|
|
||||
|
_ret.State = ReturnStatus.Failed; |
||||
|
_ret.Result = false; |
||||
|
_ret.ErrorList.Add(ex); |
||||
|
LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_MoldSharing_Controller), "Save_TA_MOLDSHARING_STATE", ex.ToString()); |
||||
|
|
||||
|
if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) |
||||
|
{ |
||||
|
var inner = (UpdateException)ex.InnerException; |
||||
|
|
||||
|
|
||||
|
throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
if (ex.InnerException != null) throw ex.InnerException; |
||||
|
} |
||||
|
} |
||||
|
catch (Exception e) |
||||
|
{ |
||||
|
_ret.State = ReturnStatus.Failed; |
||||
|
LogHelper.Writlog(LogHelper.LogType.Error, typeof(SCP_MoldSharing_Controller), "Save_TA_MOLDSHARING_STATE", e.Message); |
||||
|
_ret.Result = false; |
||||
|
_ret.ErrorList.Add(e); |
||||
|
throw e; |
||||
|
} |
||||
|
|
||||
|
return _ret; |
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,17 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
|
using System.Text; |
||||
|
using System.Threading.Tasks; |
||||
|
|
||||
|
namespace CK.SCP.Models.ScpEntity.ExcelExportEnttity |
||||
|
{ |
||||
|
public class SCP_MOLDSHARING_EXPORT |
||||
|
{ |
||||
|
public string 供应商编码 { get; set; } |
||||
|
public string 零件编码 { get; set; } |
||||
|
public string 价格 { get; set; } |
||||
|
public string 分摊总量 { get; set; } |
||||
|
public string 初始已分摊数量 { get; set; } |
||||
|
} |
||||
|
} |
@ -0,0 +1,22 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
|
using System.Text; |
||||
|
using System.Threading.Tasks; |
||||
|
|
||||
|
namespace CK.SCP.Models.ScpEntity.ExcelExportEnttity |
||||
|
{ |
||||
|
public class SCP_OTD_VendId_REPORT_EXPORT |
||||
|
{ |
||||
|
public string 要货看板号 { get; set; } |
||||
|
public string 供应商编号 { get; set; } //VendId
|
||||
|
public string 供应商名称 { get; set; } //VendName
|
||||
|
public string 要求到货时间 { get; set; }//endtime
|
||||
|
public string 订单要货数量 { get; set; } //AskQty
|
||||
|
public string 到货数量 { get; set; } //ArriveQty
|
||||
|
public string 差额 { get; set; } //Qty
|
||||
|
public string 及时数量 { get; set; } //NntimelyQty
|
||||
|
public string 及时率 { get; set; }//OTD
|
||||
|
public string 到货率 { get; set; }//ArriveOTD
|
||||
|
} |
||||
|
} |
@ -0,0 +1,23 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
|
using System.Text; |
||||
|
using System.Threading.Tasks; |
||||
|
|
||||
|
namespace CK.SCP.Models.ScpEntity.ExcelImportEntity |
||||
|
{ |
||||
|
public class SCP_ASN_EXCEL |
||||
|
{ |
||||
|
public string 采购订单号 { get; set; } |
||||
|
public string 收货单号 { get; set; } |
||||
|
public string 零件编号 { get; set; } |
||||
|
public string 行号 { get; set; } |
||||
|
public string 供应商编码 { get; set; } |
||||
|
public string 批次 { get; set; } |
||||
|
public string 供应商批次 { get; set; } |
||||
|
public string 数量 { get; set; } |
||||
|
public string 单位 { get; set; } |
||||
|
public string 标包数 { get; set; } |
||||
|
public string 价格 { get; set; } |
||||
|
} |
||||
|
} |
@ -0,0 +1,31 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.ComponentModel.DataAnnotations; |
||||
|
using System.ComponentModel.DataAnnotations.Schema; |
||||
|
using System.Linq; |
||||
|
using System.Text; |
||||
|
using System.Threading.Tasks; |
||||
|
|
||||
|
namespace CK.SCP.Models.ScpEntity |
||||
|
{ |
||||
|
public class TA_MOLDSHARING_INVOICE |
||||
|
{ |
||||
|
[Key] |
||||
|
public long UID { set; get; } |
||||
|
public long MoldSharingId { set; get; } |
||||
|
public System.Guid InvcGUID { get; set; } |
||||
|
[Required, StringLength(50)] |
||||
|
public string InvcBillNum { set; get; } |
||||
|
public int PoLineNum { get; set; } |
||||
|
[StringLength(50)] |
||||
|
public string PartCode { get; set; } |
||||
|
[StringLength(50)] |
||||
|
public string Batch { get; set; } |
||||
|
public string RecvBillNum { get; set; } |
||||
|
[StringLength(50)] |
||||
|
public string ErpRecvBillNum { get; set; } |
||||
|
public decimal Price { get; set; } |
||||
|
[Column(TypeName = "money")] |
||||
|
public decimal Qty { get; set; } |
||||
|
} |
||||
|
} |
@ -0,0 +1,34 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.ComponentModel.DataAnnotations; |
||||
|
using System.ComponentModel.DataAnnotations.Schema; |
||||
|
|
||||
|
namespace CK.SCP.Models.ScpEntity |
||||
|
{ |
||||
|
public partial class TA_MOLDSHARING |
||||
|
{ |
||||
|
[DatabaseGenerated(DatabaseGeneratedOption.Identity)] |
||||
|
[Key] |
||||
|
public long UID { get; set; } |
||||
|
[StringLength(50)] |
||||
|
public string VendId { get; set; } |
||||
|
[StringLength(50)] |
||||
|
public string PartCode { get; set; } |
||||
|
[StringLength(50)] |
||||
|
public string Site { get; set; } |
||||
|
public System.DateTime CreateTime { get; set; } |
||||
|
[StringLength(50)] |
||||
|
public string CreateUser { get; set; } |
||||
|
public Nullable<System.DateTime> UpdateTime { get; set; } |
||||
|
[StringLength(50)] |
||||
|
public string UpdateUser { get; set; } |
||||
|
public decimal? TotalCount { get; set; }//分摊总数(已分摊期初数+分摊数量)
|
||||
|
public decimal? InitialQty { get; set; }//已分摊期初数
|
||||
|
public decimal? Qty { get; set; }//分摊数量
|
||||
|
public decimal? Count { get; set; }//累计分摊数量
|
||||
|
// [Column(TypeName = "money")]
|
||||
|
public decimal? Price { get; set; } |
||||
|
public bool IsDeleted { get; set; } |
||||
|
|
||||
|
} |
||||
|
} |
@ -0,0 +1,48 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.ComponentModel; |
||||
|
using System.ComponentModel.DataAnnotations; |
||||
|
using System.ComponentModel.DataAnnotations.Schema; |
||||
|
|
||||
|
namespace CK.SCP.Models.ScpEntity |
||||
|
{ |
||||
|
public partial class V_TS_BARCODE |
||||
|
{ |
||||
|
[Key] |
||||
|
[DatabaseGenerated(DatabaseGeneratedOption.Identity)] |
||||
|
public long UID { get; set; } |
||||
|
|
||||
|
|
||||
|
[StringLength(50)] |
||||
|
public string BarCode { get; set; } |
||||
|
[Required] |
||||
|
[StringLength(50)] |
||||
|
public string PartCode { get; set; } |
||||
|
[Required] |
||||
|
[StringLength(50)] |
||||
|
public string Batch { get; set; } |
||||
|
[Column(TypeName = "money")] |
||||
|
public decimal Qty { get; set; } |
||||
|
[Required] |
||||
|
[StringLength(50)] |
||||
|
public string BillNum { get; set; } |
||||
|
public int PoBillLine { get; set; } |
||||
|
[StringLength(50)] |
||||
|
public string VendId { get; set; } |
||||
|
[StringLength(50)] |
||||
|
public string VendBatch { get; set; } |
||||
|
[DisplayName("是否扫描")] |
||||
|
public bool IsScanned { get; set; } |
||||
|
[DisplayName("是否描述")] |
||||
|
public string IsScanned_Desc { get; set; } |
||||
|
[Column(TypeName = "money")] |
||||
|
public decimal PackQty { get; set; } |
||||
|
public string Site { get; set; } |
||||
|
[NotMapped] |
||||
|
public List<string> UserInVendIds { set; get; } |
||||
|
|
||||
|
|
||||
|
[NotMapped] |
||||
|
public List<string> UserInAddress { set; get; } |
||||
|
} |
||||
|
} |
@ -0,0 +1,37 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.ComponentModel.DataAnnotations; |
||||
|
using System.ComponentModel.DataAnnotations.Schema; |
||||
|
using System.Linq; |
||||
|
using System.Text; |
||||
|
using System.Threading.Tasks; |
||||
|
|
||||
|
namespace ChangKeTec.Wms.Models.Wms |
||||
|
{ |
||||
|
public partial class VIEW_STOCK_REPORT |
||||
|
{ |
||||
|
[Key] |
||||
|
[Column(Order = 0)] |
||||
|
[StringLength(50)] |
||||
|
public string PartCode { get; set; } |
||||
|
|
||||
|
[Key] |
||||
|
[Column(Order = 2)] |
||||
|
public string VendId { get; set; } |
||||
|
/// <summary>
|
||||
|
/// WMS待检验数量
|
||||
|
/// </summary>
|
||||
|
public decimal InspectQty { get; set; } |
||||
|
/// <summary>
|
||||
|
/// WMS合格数量
|
||||
|
/// </summary>
|
||||
|
public decimal QualifiedQty { get; set; } |
||||
|
/// <summary>
|
||||
|
/// SCP待开票数量
|
||||
|
/// </summary>
|
||||
|
[NotMapped] |
||||
|
public decimal InvoiceQty { get; set; } |
||||
|
[NotMapped] |
||||
|
public List<string> UserInVendIds { set; get; } |
||||
|
} |
||||
|
} |
@ -0,0 +1,57 @@ |
|||||
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="UNIAPI.aspx.cs" Inherits="SCP.Admin.UNIAPI" %> |
||||
|
|
||||
|
<!DOCTYPE html> |
||||
|
|
||||
|
<!DOCTYPE html> |
||||
|
|
||||
|
<html xmlns="http://www.w3.org/1999/xhtml"> |
||||
|
<head runat="server"> |
||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> |
||||
|
<title></title> |
||||
|
</head> |
||||
|
<body> |
||||
|
|
||||
|
|
||||
|
<form id="form1" runat="server"> |
||||
|
<f:PageManager runat="server" AutoSizePanelID="Panel1" /> |
||||
|
<f:Panel ID="Panel1" runat="server" Title="" Layout="VBox" BoxConfigAlign="Stretch" BoxConfigPosition="Start"> |
||||
|
<Items> |
||||
|
<f:Form runat="server"> |
||||
|
<Toolbars> |
||||
|
<f:Toolbar ID="Toolbar1" runat="server"> |
||||
|
<Items> |
||||
|
<f:DropDownList runat="server" ID="DDL_State" Label="查询接口" LabelWidth="60px" > |
||||
|
<f:ListItem Text="订单接口" Value="xxqad_pod_det"/> |
||||
|
<f:ListItem Text="QAD收货单接口" Value="xxqad_prh_det" /> |
||||
|
<f:ListItem Text="WMS收货单接口" Value="xxwms_rc_det" /> |
||||
|
<f:ListItem Text="发货单接口" Value="xxscm_tx_mstr" /> |
||||
|
<f:ListItem Text="发票接口" Value="xxscm_inv_det" /> |
||||
|
</f:DropDownList> |
||||
|
<f:Button ID="BtnSearch" runat="server" OnClick="BtnSearch_Click" Text="快速查找" Icon="Zoom"> |
||||
|
</f:Button> |
||||
|
</Items> |
||||
|
</f:Toolbar> |
||||
|
<f:Toolbar ID="Toolbar2" runat="server"> |
||||
|
<Items> |
||||
|
<f:TextArea runat="server" Label="单据号" ID="TXT_billnum" Width="600" LabelWidth="60px" EmptyText="填写单据号(可多单号查询用 , 号隔开)" ></f:TextArea> |
||||
|
</Items> |
||||
|
</f:Toolbar> |
||||
|
</Toolbars> |
||||
|
</f:Form> |
||||
|
|
||||
|
|
||||
|
<f:Grid ID="Grid" EnableCollapse="true" ShowBorder="true" ShowHeader="true" runat="server"> |
||||
|
|
||||
|
<Columns> |
||||
|
|
||||
|
</Columns> |
||||
|
</f:Grid> |
||||
|
</Items> |
||||
|
</f:Panel> |
||||
|
|
||||
|
</form> |
||||
|
|
||||
|
|
||||
|
</body> |
||||
|
</html> |
||||
|
|
@ -0,0 +1,74 @@ |
|||||
|
using CK.SCP.Controller; |
||||
|
using FineUI; |
||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Data; |
||||
|
using System.Linq; |
||||
|
using System.Text; |
||||
|
using System.Web; |
||||
|
using System.Web.UI; |
||||
|
using System.Web.UI.WebControls; |
||||
|
|
||||
|
namespace SCP.Admin |
||||
|
{ |
||||
|
public partial class UNIAPI : PageBase |
||||
|
{ |
||||
|
protected void Page_Load(object sender, EventArgs e) |
||||
|
{ |
||||
|
if (!Page.IsPostBack) |
||||
|
{ |
||||
|
Bind(); |
||||
|
} |
||||
|
} |
||||
|
private void Bind() |
||||
|
{ |
||||
|
var _domain = Request["Domain"]; |
||||
|
var _billNum =TXT_billnum.Text= Request.Params["BillNum"]; |
||||
|
var _tableName=DDL_State.SelectedValue= Request.Params["TableName"]; |
||||
|
if (!string.IsNullOrEmpty(_billNum) && !string.IsNullOrEmpty(_domain) && !string.IsNullOrEmpty(_tableName)) |
||||
|
{ |
||||
|
var _ary = _billNum.Split(new char[] { ',' }).ToList(); |
||||
|
var sqlstr = string.Empty; |
||||
|
_ary.ForEach(p => |
||||
|
{ |
||||
|
sqlstr += string.Format("'{0}',", p); |
||||
|
}); |
||||
|
sqlstr = sqlstr.Substring(0, sqlstr.Length - 1); |
||||
|
DataTable _dt = UniApiController.FindUniapi(_tableName, sqlstr, _domain); |
||||
|
foreach (DataColumn column in _dt.Columns) |
||||
|
{ |
||||
|
FineUI.BoundField bf; |
||||
|
bf = new FineUI.BoundField(); |
||||
|
bf.DataField = column.ColumnName; |
||||
|
bf.SortField = column.ColumnName; |
||||
|
bf.HeaderText = column.ColumnName; |
||||
|
Grid.Columns.Add(bf); |
||||
|
} |
||||
|
Grid.DataSource = _dt; |
||||
|
Grid.DataBind(); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
protected void BtnSearch_Click(object sender, EventArgs e) |
||||
|
{ |
||||
|
StringBuilder _buffer = new StringBuilder(); |
||||
|
if (!string.IsNullOrEmpty(DDL_State.SelectedValue)) |
||||
|
{ |
||||
|
_buffer.AppendFormat("TableName={0}&&", DDL_State.SelectedValue); |
||||
|
} |
||||
|
if (!string.IsNullOrEmpty(TXT_billnum.Text)) |
||||
|
{ |
||||
|
_buffer.AppendFormat("BillNum={0}&&", TXT_billnum.Text); |
||||
|
} |
||||
|
if (!string.IsNullOrEmpty(CurrentUser.UsedDomain)) |
||||
|
{ |
||||
|
_buffer.AppendFormat("Domain={0}",CurrentUser.UsedDomain); |
||||
|
} |
||||
|
string s = _buffer.ToString(); |
||||
|
PageContext.Redirect(string.Format("UNIAPI.aspx?{0}", s)); |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
|
@ -0,0 +1,78 @@ |
|||||
|
//------------------------------------------------------------------------------
|
||||
|
// <自动生成>
|
||||
|
// 此代码由工具生成。
|
||||
|
//
|
||||
|
// 对此文件的更改可能导致不正确的行为,如果
|
||||
|
// 重新生成代码,则所做更改将丢失。
|
||||
|
// </自动生成>
|
||||
|
//------------------------------------------------------------------------------
|
||||
|
|
||||
|
namespace SCP.Admin { |
||||
|
|
||||
|
|
||||
|
public partial class UNIAPI { |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// form1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::System.Web.UI.HtmlControls.HtmlForm form1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Panel1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Panel Panel1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Toolbar2 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Toolbar Toolbar2; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// DDL_State 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.DropDownList DDL_State; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TXT_billnum 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextArea TXT_billnum; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// BtnSearch 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Button BtnSearch; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Grid 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Grid Grid; |
||||
|
} |
||||
|
} |
@ -0,0 +1,76 @@ |
|||||
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SCP_MOLDSHARING_DETAIL.aspx.cs" Inherits="SCP.Views.BasicData.SCP_MOLDSHARING_DETAIL" %> |
||||
|
|
||||
|
<!DOCTYPE html> |
||||
|
|
||||
|
<html xmlns="http://www.w3.org/1999/xhtml"> |
||||
|
<head runat="server"> |
||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
||||
|
<title></title> |
||||
|
</head> |
||||
|
<body> |
||||
|
<form id="form1" runat="server"> |
||||
|
<f:PageManager runat="server" AutoSizePanelID="Panel1" /> |
||||
|
<f:Panel ID="Panel1" runat="server" Title="" AutoScroll="True"> |
||||
|
<Items> |
||||
|
<f:Form runat="server" Title=""> |
||||
|
<Items> |
||||
|
<f:FormRow runat="server" ColumnWidths="33% 33% 33%"> |
||||
|
<Items> |
||||
|
<f:TextBox ID="TextVendId" runat="server" Label="供应商" Text="" Width="600" Readonly="true"> |
||||
|
</f:TextBox> |
||||
|
<f:TextBox ID="TextPartCode" runat="server" Label="零件编号" Text="" Width="600" Readonly="true"> |
||||
|
</f:TextBox> |
||||
|
<f:TextBox ID="TextPrice" runat="server" Label="价格" Text="" Width="600" Readonly="true" /> |
||||
|
</Items> |
||||
|
</f:FormRow> |
||||
|
<f:FormRow runat="server" ColumnWidths="33% 33% 33%"> |
||||
|
<Items> |
||||
|
<f:TextBox ID="TextTotal" runat="server" Label="分摊总量" Text="" Width="600" Readonly="true"> |
||||
|
</f:TextBox> |
||||
|
<f:TextBox ID="TexInitialQty" runat="server" Label="初始已分摊数量" Text="" Width="600" Readonly="true"> |
||||
|
</f:TextBox> |
||||
|
<f:TextBox ID="TextCount" runat="server" Label="已累计数量" Text="" Width="600" Readonly="true" /> |
||||
|
</Items> |
||||
|
</f:FormRow> |
||||
|
</Items> |
||||
|
</f:Form> |
||||
|
<f:Toolbar runat="server"> |
||||
|
<Items> |
||||
|
<f:ToolbarSeparator runat="server" /> |
||||
|
<f:Button ID="btnOutput" runat="server" Text="导出" Icon="PageExcel" OnClick="btnOutput_OnClick"> |
||||
|
</f:Button> |
||||
|
<f:ToolbarFill runat="server" /> |
||||
|
</Items> |
||||
|
</f:Toolbar> |
||||
|
<f:Grid ID="Grid_MOLDSHARING_DETAIL" ShowBorder="true" ShowHeader="true" PageSize="100" BoxFlex="1" CssClass="maingrid" |
||||
|
runat="server" DataKeyNames="" IsDatabasePaging="True" AllowPaging="True" SortField="PartCode" SortDirection="DESC" |
||||
|
EnableRowSelectEvent="False" AutoScroll="True" OnPageIndexChange="Grid1_OnPageIndexChange"> |
||||
|
<PageItems> |
||||
|
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server"> |
||||
|
</f:ToolbarSeparator> |
||||
|
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:"> |
||||
|
</f:ToolbarText> |
||||
|
<f:DropDownList ID="ddlGridPageSize" Width="80px" AutoPostBack="true" OnSelectedIndexChanged="ddlGridPageSize_OnSelectedIndexChanged" |
||||
|
runat="server"> |
||||
|
<f:ListItem Text="100" Value="100" /> |
||||
|
<f:ListItem Text="200" Value="200" /> |
||||
|
<f:ListItem Text="1000" Value="1000" /> |
||||
|
</f:DropDownList> |
||||
|
</PageItems> |
||||
|
<Columns> |
||||
|
<f:BoundField DataField="ID" HeaderText="ID" ColumnID="ID" Hidden="true" /> |
||||
|
<f:BoundField SortField="InvcBillNum" DataField="InvcBillNum" HeaderText="发票号" ColumnID="InvcBillNum" Width="100px" /> |
||||
|
<f:BoundField SortField="PartCode" DataField="PartCode" HeaderText="零件编号" ColumnID="PartCode" Width="120px" /> |
||||
|
<f:BoundField SortField="PoLineNum" DataField="PoLineNum" HeaderText="订单行" ColumnID="PoLineNum" Width="60px" /> |
||||
|
<f:BoundField SortField="Qty" DataField="Qty" HeaderText="数量" ColumnID="Qty" Width="60px" /> |
||||
|
<f:BoundField SortField="Price" DataField="Price" HeaderText="价格" ColumnID="Price" Width="60px" /> |
||||
|
<f:BoundField SortField="RecvBillNum" DataField="RecvBillNum" HeaderText="WM单号" ColumnID="RecvBillNum" Width="80px" /> |
||||
|
<f:BoundField SortField="ErpRecvBillNum" DataField="ErpRecvBillNum" HeaderText="ERP单号" ColumnID="ErpRecvBillNum" Width="80px" /> |
||||
|
</Columns> |
||||
|
</f:Grid> |
||||
|
</Items> |
||||
|
</f:Panel> |
||||
|
|
||||
|
</form> |
||||
|
</body> |
||||
|
</html> |
@ -0,0 +1,88 @@ |
|||||
|
using CK.SCP.Controller; |
||||
|
using CK.SCP.Models.ScpEntity; |
||||
|
using FineUI; |
||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
|
using System.Web; |
||||
|
using System.Web.UI; |
||||
|
using System.Web.UI.WebControls; |
||||
|
|
||||
|
namespace SCP.Views.BasicData |
||||
|
{ |
||||
|
public partial class SCP_MOLDSHARING_DETAIL : PageBase |
||||
|
{ |
||||
|
protected void Page_Load(object sender, EventArgs e) |
||||
|
{ |
||||
|
if (!IsPostBack) |
||||
|
{ |
||||
|
LoadData(); |
||||
|
BindData(); |
||||
|
} |
||||
|
} |
||||
|
public void LoadData() |
||||
|
{ |
||||
|
var item = new TA_MOLDSHARING(); |
||||
|
item.UID =long.Parse( GetQueryValue("ID")); |
||||
|
SCP_MoldSharing_Controller.Get_V_TA_MoldSharing_List(item, (_ret) => |
||||
|
{ |
||||
|
if (_ret.State == ReturnStatus.Succeed) |
||||
|
{ |
||||
|
var _rec = _ret.Result.FirstOrDefault(); |
||||
|
TextVendId.Text = _rec.VendId; |
||||
|
TextPartCode.Text = _rec.PartCode; |
||||
|
TextPrice.Text = _rec.Price.ToString(); |
||||
|
TextTotal.Text = _rec.TotalCount.ToString(); |
||||
|
TexInitialQty.Text = _rec.InitialQty.ToString(); |
||||
|
TextCount.Text = _rec.Count.ToString(); |
||||
|
} |
||||
|
}); |
||||
|
} |
||||
|
public void BindData() |
||||
|
{ |
||||
|
var _entity = new TA_MOLDSHARING_INVOICE(); |
||||
|
_entity.MoldSharingId = long.Parse(GetQueryValue("ID")); |
||||
|
SCP_MoldSharing_Controller.Get_V_TA_MOLDSHARING_INVOICE_List(_entity, (ret) => |
||||
|
{ |
||||
|
if (ret.State == ReturnStatus.Succeed) |
||||
|
{ |
||||
|
Grid_MOLDSHARING_DETAIL.RecordCount = ret.Result.Count(); |
||||
|
var _ls = SortAndPage(ret.Result, Grid_MOLDSHARING_DETAIL); |
||||
|
Grid_MOLDSHARING_DETAIL.DataSource = _ls; |
||||
|
Grid_MOLDSHARING_DETAIL.DataBind(); |
||||
|
} |
||||
|
}); |
||||
|
} |
||||
|
protected void ddlGridPageSize_OnSelectedIndexChanged(object sender, EventArgs e) |
||||
|
{ |
||||
|
Grid_MOLDSHARING_DETAIL.PageSize = Convert.ToInt32(ddlGridPageSize.SelectedValue); |
||||
|
BindData(); |
||||
|
} |
||||
|
protected void Grid1_OnPageIndexChange(object sender, GridPageEventArgs e) |
||||
|
{ |
||||
|
Grid_MOLDSHARING_DETAIL.PageSize = Convert.ToInt32(ddlGridPageSize.SelectedValue); |
||||
|
BindData(); |
||||
|
} |
||||
|
protected void btnOutput_OnClick(object sender, EventArgs e) |
||||
|
{ |
||||
|
var _entity = new TA_MOLDSHARING_INVOICE(); |
||||
|
_entity.MoldSharingId= long.Parse(GetQueryValue("ID")); |
||||
|
SCP_MoldSharing_Controller.Get_V_TA_MOLDSHARING_INVOICE_List(_entity, (ret) => |
||||
|
{ |
||||
|
if (ret.State == ReturnStatus.Succeed) |
||||
|
{ |
||||
|
Dictionary<string, string> cellheader = new Dictionary<string, string> { |
||||
|
{ "InvcBillNum", "发票号" }, |
||||
|
{ "PartCode", "零件编号" }, |
||||
|
{ "PoLineNum", "订单行" }, |
||||
|
{ "Qty", "数量" }, |
||||
|
{ "Price", "价格" }, |
||||
|
}; |
||||
|
string url = EntityListToExcel2003(cellheader, ret.Result.ToList(), "分摊明细"); |
||||
|
} |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
} |
||||
|
} |
@ -0,0 +1,134 @@ |
|||||
|
//------------------------------------------------------------------------------
|
||||
|
// <自动生成>
|
||||
|
// 此代码由工具生成。
|
||||
|
//
|
||||
|
// 对此文件的更改可能导致不正确的行为,如果
|
||||
|
// 重新生成代码,则所做更改将丢失。
|
||||
|
// </自动生成>
|
||||
|
//------------------------------------------------------------------------------
|
||||
|
|
||||
|
namespace SCP.Views.BasicData |
||||
|
{ |
||||
|
|
||||
|
|
||||
|
public partial class SCP_MOLDSHARING_DETAIL |
||||
|
{ |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// form1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::System.Web.UI.HtmlControls.HtmlForm form1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Panel1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Panel Panel1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TextVendId 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox TextVendId; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TextPartCode 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox TextPartCode; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TextPrice 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox TextPrice; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TextTotal 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox TextTotal; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TexInitialQty 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox TexInitialQty; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TextCount 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox TextCount; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// btnOutput 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Button btnOutput; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Grid_MOLDSHARING_DETAIL 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Grid Grid_MOLDSHARING_DETAIL; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// ToolbarSeparator1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.ToolbarSeparator ToolbarSeparator1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// ToolbarText1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.ToolbarText ToolbarText1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// ddlGridPageSize 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.DropDownList ddlGridPageSize; |
||||
|
} |
||||
|
} |
@ -0,0 +1,92 @@ |
|||||
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SCP_MoldSharing.aspx.cs" Inherits="SCP.Views.BasicData.SCP_MoldSharing" %> |
||||
|
|
||||
|
<!DOCTYPE html> |
||||
|
|
||||
|
<html xmlns="http://www.w3.org/1999/xhtml"> |
||||
|
<head runat="server"> |
||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
||||
|
<title></title> |
||||
|
</head> |
||||
|
<body> |
||||
|
<form id="form1" runat="server"> |
||||
|
<f:PageManager runat="server" AutoSizePanelID="Panel1" /> |
||||
|
<f:Panel ID="Panel1" runat="server" Title="" Layout="VBox" BoxConfigAlign="Stretch" BoxConfigPosition="Start"> |
||||
|
<Items> |
||||
|
<f:Form runat="server"> |
||||
|
<Toolbars> |
||||
|
<f:Toolbar ID="Toolbar2" runat="server"> |
||||
|
<Items> |
||||
|
<f:Button ID="BtnRefersh" runat="server" EnablePostBack="True" Text="刷新" Icon="Reload" OnClientClick="location.reload();"> |
||||
|
</f:Button> |
||||
|
<f:Button ID="btnDelete" runat="server" Text="删除" Icon="CssDelete" OnClick="btnDelete_Click" OnClientClick="if(!confirm('是否删除?'))return false;" ></f:Button> |
||||
|
<f:ToolbarSeparator runat="server" /> |
||||
|
<f:Button ID="BtnOutPut" runat="server" EnablePostBack="True" Text="导出" Icon="Add" Hidden="true"> |
||||
|
</f:Button> |
||||
|
<f:Button ID="btnShow" runat="server" Text="显示查询面板" OnClick="btnShow_OnClick"> |
||||
|
</f:Button> |
||||
|
<f:ToolbarSeparator runat="server" /> |
||||
|
<f:FileUpload runat="server" ID="FileUp" EmptyText="请选择要货单据" Required="true" Width="200" ButtonIcon="Add" ShowRedStar="true"></f:FileUpload> |
||||
|
<f:Button ID="btnInput" runat="server" Text="导入" Icon="PageExcel" OnClick="btnInput_Click"> |
||||
|
</f:Button> |
||||
|
</Items> |
||||
|
</f:Toolbar> |
||||
|
</Toolbars> |
||||
|
</f:Form> |
||||
|
<f:GroupPanel runat="server" ID="gp1" Hidden="True" Layout="HBox"> |
||||
|
<Items> |
||||
|
<f:Form runat="server" BodyPadding="10px"> |
||||
|
<Rows> |
||||
|
<f:FormRow runat="server" ColumnWidths="50% 50%"> |
||||
|
<Items> |
||||
|
<f:Label runat="server" Label="供应商编号" /> |
||||
|
<f:TextBox ID="textVendId" runat="server" /> |
||||
|
<f:Label runat="server" Label="零件编码" /> |
||||
|
<f:TextBox ID="textPartCode" runat="server" /> |
||||
|
</Items> |
||||
|
</f:FormRow> |
||||
|
<f:FormRow runat="server"> |
||||
|
<Items> |
||||
|
<f:Button runat="server" ID="btnClose" Text="关闭" OnClick="btnClose_OnClick"></f:Button> |
||||
|
<f:Button ID="btnSearch" runat="server" OnClick="btnSearch_OnClick" Text="快速查找"> |
||||
|
</f:Button> |
||||
|
</Items> |
||||
|
</f:FormRow> |
||||
|
</Rows> |
||||
|
</f:Form> |
||||
|
</Items> |
||||
|
</f:GroupPanel> |
||||
|
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="true" PageSize="100" BoxFlex="1" CssClass="maingrid" EnableRowDoubleClickEvent="True" |
||||
|
runat="server" DataKeyNames="UID,VendId" IsDatabasePaging="true" AllowPaging="True" OnPageIndexChange="Grid1_OnPageIndexChange" |
||||
|
EnableRowSelectEvent="True" AutoScroll="True" SortField="VendId" SortDirection="ASC" AllowSorting="True" OnRowDoubleClick="Grid1_RowDoubleClick"> |
||||
|
<PageItems> |
||||
|
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server"> |
||||
|
</f:ToolbarSeparator> |
||||
|
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:"> |
||||
|
</f:ToolbarText> |
||||
|
<f:DropDownList ID="ddlGridPageSize" Width="80px" AutoPostBack="true" OnSelectedIndexChanged="ddlGridPageSize_OnSelectedIndexChanged" |
||||
|
runat="server"> |
||||
|
<f:ListItem Text="100" Value="100" /> |
||||
|
<f:ListItem Text="200" Value="200" /> |
||||
|
<f:ListItem Text="1000" Value="1000" /> |
||||
|
</f:DropDownList> |
||||
|
</PageItems> |
||||
|
<Columns> |
||||
|
<f:BoundField runat="server" HeaderText="供应商编号" ColumnID="" DataField="VendId" SortField="VendId" /> |
||||
|
<f:BoundField runat="server" HeaderText="零件编码" ColumnID="" DataField="PartCode" SortField="PartCode" /> |
||||
|
<f:BoundField runat="server" HeaderText="价格" ColumnID="" DataField="Price" SortField="Price" /> |
||||
|
<f:BoundField runat="server" HeaderText="分摊总量" DataFormatString="{0:F0}" ColumnID="" DataField="TotalCount" SortField="TotalCount" /> |
||||
|
<f:BoundField runat="server" HeaderText="初始已分摊数量" DataFormatString="{0:F0}" ColumnID="" DataField="InitialQty" SortField="InitialQty" /> |
||||
|
<f:BoundField runat="server" HeaderText="分摊数量" DataFormatString="{0:F0}" ColumnID="" DataField="Qty" SortField="Qty" /> |
||||
|
<f:BoundField runat="server" HeaderText="已累计数量" DataFormatString="{0:F0}" ColumnID="" DataField="Count" SortField="Count" /> |
||||
|
<f:BoundField runat="server" HeaderText="创建人" ColumnID="" DataField="CreateUser" SortField="CreateUser" /> |
||||
|
<f:BoundField runat="server" HeaderText="创建时间" ColumnID="" DataField="CreateTime" SortField="CreateTime" /> |
||||
|
</Columns> |
||||
|
</f:Grid> |
||||
|
</Items> |
||||
|
</f:Panel> |
||||
|
<f:Window runat="server" ID="Window1" Hidden="True" Height="600px" Width="1024px" AutoScroll="True" |
||||
|
WindowPosition="Center" IsModal="true" Title="明细详情" Target="Parent" EnableIFrame="true" OnClose="Window1_Close" CloseAction="HidePostBack" |
||||
|
IFrameUrl="about:blank" /> |
||||
|
</form> |
||||
|
</body> |
||||
|
</html> |
@ -0,0 +1,175 @@ |
|||||
|
using CK.SCP.Controller; |
||||
|
using CK.SCP.Models.ScpEntity; |
||||
|
using CK.SCP.Models.ScpEntity.ExcelExportEnttity; |
||||
|
using CK.SCP.Utils; |
||||
|
using FineUI; |
||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Data; |
||||
|
using System.IO; |
||||
|
using System.Linq; |
||||
|
using System.Web; |
||||
|
using System.Web.UI; |
||||
|
using System.Web.UI.WebControls; |
||||
|
|
||||
|
namespace SCP.Views.BasicData |
||||
|
{ |
||||
|
public partial class SCP_MoldSharing : PageBase |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 页面加载
|
||||
|
/// </summary>
|
||||
|
/// <param name="sender"></param>
|
||||
|
/// <param name="e"></param>
|
||||
|
protected void Page_Load(object sender, EventArgs e) |
||||
|
{ |
||||
|
if (!IsPostBack) |
||||
|
{ |
||||
|
BindData(); |
||||
|
} |
||||
|
} |
||||
|
/// <summary>
|
||||
|
/// 数据绑定
|
||||
|
/// </summary>
|
||||
|
public void BindData() |
||||
|
{ |
||||
|
SearchV_TA_MoldSharingData((result) => |
||||
|
{ |
||||
|
Grid1.RecordCount = result.Count(); |
||||
|
var list = SortAndPage<TA_MOLDSHARING>(result, Grid1); |
||||
|
Grid1.DataSource = list; |
||||
|
Grid1.DataBind(); |
||||
|
}); |
||||
|
} |
||||
|
/// <summary>
|
||||
|
/// 获取数据
|
||||
|
/// </summary>
|
||||
|
/// <param name="p_action"></param>
|
||||
|
public void SearchV_TA_MoldSharingData(Action<IQueryable<TA_MOLDSHARING>> p_action) |
||||
|
{ |
||||
|
TA_MOLDSHARING _entity = new TA_MOLDSHARING(); |
||||
|
_entity.PartCode = textPartCode.Text; |
||||
|
_entity.VendId = textVendId.Text; |
||||
|
SCP_MoldSharing_Controller.Get_V_TA_MoldSharing_List(_entity, (_ret) => |
||||
|
{ |
||||
|
if (_ret.State == ReturnStatus.Succeed) |
||||
|
{ |
||||
|
p_action(_ret.Result); |
||||
|
} |
||||
|
}); |
||||
|
} |
||||
|
/// <summary>
|
||||
|
/// 显示查询面板事件
|
||||
|
/// </summary>
|
||||
|
/// <param name="sender"></param>
|
||||
|
/// <param name="e"></param>
|
||||
|
protected void btnShow_OnClick(object sender, EventArgs e) |
||||
|
{ |
||||
|
gp1.Hidden = false; |
||||
|
} |
||||
|
/// <summary>
|
||||
|
/// 关闭显示查询面板事件
|
||||
|
/// </summary>
|
||||
|
/// <param name="sender"></param>
|
||||
|
/// <param name="e"></param>
|
||||
|
protected void btnClose_OnClick(object sender, EventArgs e) |
||||
|
{ |
||||
|
gp1.Hidden = true; |
||||
|
} |
||||
|
/// <summary>
|
||||
|
/// 查询事件
|
||||
|
/// </summary>
|
||||
|
/// <param name="sender"></param>
|
||||
|
/// <param name="e"></param>
|
||||
|
public void btnSearch_OnClick(object sender, EventArgs e) |
||||
|
{ |
||||
|
BindData(); |
||||
|
} |
||||
|
/// <summary>
|
||||
|
/// 导入
|
||||
|
/// </summary>
|
||||
|
/// <param name="sender"></param>
|
||||
|
/// <param name="e"></param>
|
||||
|
public void btnInput_Click(object sender, EventArgs e) |
||||
|
{ |
||||
|
string _fileName = FileUp.FileName; |
||||
|
if (string.IsNullOrEmpty(_fileName)) |
||||
|
{ |
||||
|
Alert.Show("选择文件为空!"); |
||||
|
return; |
||||
|
} |
||||
|
string _lx = _fileName.Split('.')[1]; |
||||
|
Stream _stream = FileUp.PostedFile.InputStream; |
||||
|
DataTable _dt = new DataTable(); |
||||
|
if (_lx == "xls") |
||||
|
{ |
||||
|
_dt = ExcelHelper.GetDataTable(_stream); |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
_dt = ExcelHelper.GetDataTableOfXlsx(_stream); |
||||
|
} |
||||
|
var list = ConvertHelper.ToList<SCP_MOLDSHARING_EXPORT>(ExcelHelper.RemoveEmpty(_dt)).ToList(); |
||||
|
var ret = SCP_MoldSharing_Controller.EXCEL_MOLDSHARING_MOD(list, CurrentUser.FactoryList[0], CurrentUser.Name); |
||||
|
if (ret.State == ReturnStatus.Succeed && ret.Result == true) |
||||
|
{ |
||||
|
BindData(); |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
Alert.Show(string.Join("<br>", ret.MessageList)); |
||||
|
} |
||||
|
} |
||||
|
/// <summary>
|
||||
|
/// 删除数据
|
||||
|
/// </summary>
|
||||
|
/// <param name="sender"></param>
|
||||
|
/// <param name="e"></param>
|
||||
|
protected void btnDelete_Click(object sender, EventArgs e) |
||||
|
{ |
||||
|
int[] _selections = Grid1.SelectedRowIndexArray; |
||||
|
List<long> _UidList = new List<long>(); |
||||
|
for (int i = 0, count = Grid1.Rows.Count; i < count; i++) |
||||
|
{ |
||||
|
if (_selections.Contains(i)) |
||||
|
{ |
||||
|
object[] rowDataKeys = Grid1.DataKeys[i]; |
||||
|
if (!string.IsNullOrEmpty(rowDataKeys[0].ToString())) |
||||
|
{ |
||||
|
_UidList.Add(long.Parse(rowDataKeys[0].ToString())); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
var ret = SCP_MoldSharing_Controller.Save_TA_MOLDSHARING_STATE(_UidList, CurrentUser.Name, true); |
||||
|
if (ret.State == ReturnStatus.Succeed) |
||||
|
{ |
||||
|
BindData(); |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
Alert.Show(ret.Message); |
||||
|
} |
||||
|
} |
||||
|
protected void ddlGridPageSize_OnSelectedIndexChanged(object sender, EventArgs e) |
||||
|
{ |
||||
|
Grid1.PageSize = Convert.ToInt32(ddlGridPageSize.SelectedValue); |
||||
|
BindData(); |
||||
|
} |
||||
|
protected void Grid1_OnPageIndexChange(object sender, GridPageEventArgs e) |
||||
|
{ |
||||
|
Grid1.PageSize = Convert.ToInt32(ddlGridPageSize.SelectedValue); |
||||
|
BindData(); |
||||
|
} |
||||
|
|
||||
|
protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e) |
||||
|
{ |
||||
|
object[] rowDataKeys = Grid1.DataKeys[e.RowIndex]; |
||||
|
string UID = rowDataKeys[0].ToString(); |
||||
|
PageContext.RegisterStartupScript(Window1.GetShowReference(string.Format("../BasicData/SCP_MOLDSHARING_DETAIL.aspx?ID={0}", UID))); |
||||
|
} |
||||
|
protected void Window1_Close(object sender, WindowCloseEventArgs e) |
||||
|
{ |
||||
|
BindData(); |
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,161 @@ |
|||||
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SCP_INVOICE.aspx.cs" Inherits="SCP.Views.SupplierData.SupplierFinance.SCP_INVOICE" %> |
||||
|
|
||||
|
<!DOCTYPE html> |
||||
|
|
||||
|
<html xmlns="http://www.w3.org/1999/xhtml"> |
||||
|
<head runat="server"> |
||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> |
||||
|
<title></title> |
||||
|
</head> |
||||
|
<body> |
||||
|
<form id="form1" runat="server"> |
||||
|
<f:PageManager ID="PageManager1" runat="server" AutoSizePanelID="Panel1"/> |
||||
|
<f:Panel ID="Panel1" runat="server" Title="" Layout="VBox" BoxConfigAlign="Stretch" BoxConfigPosition="Start"> |
||||
|
<Items> |
||||
|
<f:Form runat="server"> |
||||
|
<Toolbars> |
||||
|
<f:Toolbar ID="Toolbar1" runat="server"> |
||||
|
<Items> |
||||
|
|
||||
|
<f:Button ID="Button3" runat="server" EnablePostBack="True" Text="刷新" Icon="Reload" OnClientClick="location.reload();"> |
||||
|
</f:Button> |
||||
|
<f:Button ID="btnView" runat="server" EnablePostBack="True" Text="查看发票" Icon="Zoom" OnClick="btnView_OnClick"> |
||||
|
</f:Button> |
||||
|
<f:ToolbarSeparator runat="server" /> |
||||
|
<f:Button ID="btnOutput" runat="server" Text="导出" Icon="PageExcel" OnClick="btnOutput_OnClick"> |
||||
|
</f:Button> |
||||
|
<f:Button ID="btnShow" runat="server" Text="显示查询面板" Icon="Find" OnClick="btnShow_OnClick"> |
||||
|
</f:Button> |
||||
|
<f:DropDownList ID="DDL_VEND_LIST" DataValueField="VendId" DataTextField="VendName" runat="server" Label="供应商编码" EnableEdit="true" EnableMultiSelect="false" Hidden="true"/> |
||||
|
<f:Button ID="BTN_INV" runat="server" EnablePostBack="True" Text="确认供应商发票管理" OnClick="BTN_INV_Click" Hidden="true"></f:Button> |
||||
|
|
||||
|
</Items> |
||||
|
</f:Toolbar> |
||||
|
</Toolbars> |
||||
|
</f:Form> |
||||
|
<f:GroupPanel runat="server" ID="gp1" Hidden="True" Layout="HBox"> |
||||
|
<Items> |
||||
|
<f:Form runat="server"> |
||||
|
<Rows> |
||||
|
<f:FormRow runat="server" ID="FormRow_1"> |
||||
|
<Items> |
||||
|
<f:CheckBoxList runat="server" ID="ckb" Label="状态"> |
||||
|
<%--<f:CheckItem Text="新建" Value="0" Selected="True" /> |
||||
|
<f:CheckItem Text="供应商申请" Value="1" /> |
||||
|
<f:CheckItem Text="采购审核退回" Value="2" /> |
||||
|
<f:CheckItem Text="采购审核通过" Value="3" /> |
||||
|
<f:CheckItem Text="发票寄出" Value="4" /> |
||||
|
<f:CheckItem Text="财务退回" Value="5" /> |
||||
|
<f:CheckItem Text="财务收票" Value="6" /> |
||||
|
<f:CheckItem Text="发票作废" Value="-1" />--%> |
||||
|
|
||||
|
</f:CheckBoxList> |
||||
|
</Items> |
||||
|
</f:FormRow> |
||||
|
<f:FormRow runat="server" ID="FormRow_2"> |
||||
|
<Items> |
||||
|
|
||||
|
<f:TextBox ID="TXT_InvcBillNum" runat="server" Label="发票单号"/> |
||||
|
|
||||
|
<f:TextBox ID="TXT_VendName" runat="server" Label="供应商"/> |
||||
|
|
||||
|
<f:TextBox ID="TXT_InvoiceNum" runat="server" Label="金税票号" MaxLength="22"/> |
||||
|
|
||||
|
<f:TextBox ID="TXT_PO" runat="server" Label="订单编号"/> |
||||
|
</Items> |
||||
|
</f:FormRow> |
||||
|
<f:FormRow runat="server" ID="FormRow_3"> |
||||
|
<Items> |
||||
|
|
||||
|
<f:TextBox ID="TXT_Site" runat="server" Label="收货地点"/> |
||||
|
|
||||
|
<f:TextBox ID="TXT_ASN" runat="server" Label="发货单号"/> |
||||
|
|
||||
|
<f:DatePicker ID="DP_CreateTime1" runat="server" Required="true" Label="收货时间" /> |
||||
|
|
||||
|
<f:DatePicker ID="DP_CreateTime2" runat="server" Required="true" Label="至" /> |
||||
|
</Items> |
||||
|
</f:FormRow> |
||||
|
<f:FormRow runat="server" ID="FormRow_4"> |
||||
|
<Items> |
||||
|
<f:Button runat="server" Text="关闭" OnClick="OnClick"></f:Button> |
||||
|
<f:Button ID="BTN_SEARCH" runat="server" OnClick="BTN_SEARCH_Click" Text="快速查找"> |
||||
|
</f:Button> |
||||
|
</Items> |
||||
|
</f:FormRow> |
||||
|
</Rows> |
||||
|
</f:Form> |
||||
|
|
||||
|
</Items> |
||||
|
</f:GroupPanel> |
||||
|
|
||||
|
<f:Grid ID="Grid_V_TB_INVOICE" runat="server" EnableCheckBoxSelect="true" ShowHeader="False" |
||||
|
AllowPaging="True" PageSize="10" OnPageIndexChange="Grid_V_TB_INVOICE_PageIndexChange" |
||||
|
ShowBorder="False" OnRowDoubleClick="Grid_V_TB_INVOICE_RowDoubleClick" BoxFlex="1" |
||||
|
DataKeyNames="UID, InvcBillNum" AllowSorting="true" IsDatabasePaging="true" SortField="State" OnRowDataBound="Grid_V_TB_INVOICE_RowDataBound" > |
||||
|
<PageItems> |
||||
|
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server"> |
||||
|
</f:ToolbarSeparator> |
||||
|
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:"> |
||||
|
</f:ToolbarText> |
||||
|
<f:DropDownList ID="ddlGridPageSize" Width="80px" AutoPostBack="true" OnSelectedIndexChanged="ddlGridPageSize_SelectedIndexChanged" |
||||
|
runat="server"> |
||||
|
<f:ListItem Text="10" Value="10" /> |
||||
|
<f:ListItem Text="20" Value="20" /> |
||||
|
<f:ListItem Text="50" Value="50" /> |
||||
|
<f:ListItem Text="100" Value="100" /> |
||||
|
<f:ListItem Text="200" Value="200" /> |
||||
|
</f:DropDownList> |
||||
|
</PageItems> |
||||
|
<Columns> |
||||
|
<f:BoundField runat="server" HeaderText="状态" ColumnID="" DataField="State_DESC" /> |
||||
|
<f:BoundField runat="server" HeaderText="发票单号" ColumnID="" DataField="InvcBillNum" /> |
||||
|
<f:BoundField runat="server" HeaderText="金税票号" ColumnID="" DataField="InvoiceNum" /> |
||||
|
<f:BoundField runat="server" HeaderText="快递单号" ColumnID="" DataField="ExpressNum" /> |
||||
|
<f:BoundField runat="server" HeaderText="供应商" ColumnID="" DataField="VendName" /> |
||||
|
<f:BoundField runat="server" HeaderText="供应商编码" ColumnID="" DataField="VendId" /> |
||||
|
<f:BoundField runat="server" HeaderText="金额" ColumnID="" DataField="Amount" DataFormatString = "{0:F}"/> |
||||
|
<f:BoundField runat="server" HeaderText="采购金额" ColumnID="" DataField="PurCost" DataFormatString = "{0:F}" /> |
||||
|
<f:BoundField runat="server" HeaderText="成本金额" ColumnID="" DataField="StdCost" DataFormatString = "{0:F}"/> |
||||
|
<f:BoundField runat="server" HeaderText="税率" ColumnID="" DataField="Tax" DataFormatString = "{0:F}"/> |
||||
|
<f:BoundField runat="server" HeaderText="税额" ColumnID="" DataField="TaxAmount" DataFormatString = "{0:F}"/> |
||||
|
|
||||
|
|
||||
|
|
||||
|
<%-- <f:BoundField runat="server" HeaderText="开票金额" ColumnID="" DataField="Total" />--%> |
||||
|
<f:TemplateField HeaderText="税后金额" Width="70px" ColumnID="Total"> |
||||
|
<ItemTemplate> |
||||
|
<asp:label ID="Total1" runat="server" Width="60px" Text='<%# Eval("Total") %>' ></asp:label> |
||||
|
</ItemTemplate> |
||||
|
</f:TemplateField> |
||||
|
|
||||
|
<f:BoundField runat="server" HeaderText="折扣金额" ColumnID="" DataField="DiscountPrice" DataFormatString = "{0:F}"/> |
||||
|
<f:BoundField runat="server" HeaderText="索赔金额" ColumnID="" DataField="ContractPrice" DataFormatString = "{0:F}"/> |
||||
|
<f:BoundField runat="server" HeaderText="调整税额" ColumnID="" DataField="BlancePrice" DataFormatString = "{0:F}"/> |
||||
|
|
||||
|
<%--<f:BoundField runat="server" HeaderText="创建时间" ColumnID="" DataField="CreateTime" />--%> |
||||
|
<f:BoundField runat="server" HeaderText="备注" ColumnID="" DataField="Remark" /> |
||||
|
</Columns> |
||||
|
</f:Grid> |
||||
|
</Items> |
||||
|
</f:Panel> |
||||
|
<f:Window ID="Window1" runat="server" Hidden="True" AutoScroll="True" |
||||
|
WindowPosition="Center" IsModal="true" Title="发票编辑" Target="Parent" EnableIFrame="true" OnClose="Window1_Close" |
||||
|
IFrameUrl="about:blank" Height="550px" Width="1024px"> |
||||
|
</f:Window> |
||||
|
<f:Window ID="Window2" runat="server" Hidden="True" AutoScroll="True" |
||||
|
WindowPosition="Center" IsModal="true" Title="Popup Window 1" Target="Parent" EnableIFrame="true" |
||||
|
IFrameUrl="about:blank" Height="300px" Width="400px"> |
||||
|
</f:Window> |
||||
|
<f:Window ID="WindowUpload" runat="server" Hidden="True" AutoScroll="True" |
||||
|
WindowPosition="Center" IsModal="true" Title="Popup Window 1" Target="Parent" EnableIFrame="true" |
||||
|
IFrameUrl="about:blank" Height="200px" Width="400px" OnClose="WindowUpload_Close" > |
||||
|
</f:Window> |
||||
|
<script type="text/javascript"> |
||||
|
|
||||
|
|
||||
|
</script> |
||||
|
|
||||
|
</form> |
||||
|
</body> |
||||
|
</html> |
@ -0,0 +1,225 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
|
using System.Web; |
||||
|
using System.Web.UI; |
||||
|
using System.Web.UI.WebControls; |
||||
|
using CK.SCP.Models.ScpEntity; |
||||
|
using CK.SCP.Controller; |
||||
|
using FineUI; |
||||
|
using System.Data; |
||||
|
using System.Drawing; |
||||
|
|
||||
|
namespace SCP.Views.SupplierData.SupplierFinance |
||||
|
{ |
||||
|
public partial class SCP_INVOICE :PageBase |
||||
|
{ |
||||
|
|
||||
|
public void Page_Load(object sender, EventArgs e) |
||||
|
{ |
||||
|
IsRoleRight(); |
||||
|
|
||||
|
if (!IsPostBack) |
||||
|
{ |
||||
|
TranslatorAgents(Toolbar1); |
||||
|
TranslatorAgent(Grid_V_TB_INVOICE); |
||||
|
TranslatorAgents(FormRow_1); |
||||
|
TranslatorAgents(FormRow_2); |
||||
|
TranslatorAgents(FormRow_3); |
||||
|
TranslatorAgents(FormRow_4); |
||||
|
BindInvoice(); |
||||
|
BindVender(DDL_VEND_LIST); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
public void IsRoleRight() |
||||
|
{ |
||||
|
if (CurrentUser.RoleList.Contains("采购人员")) |
||||
|
{ |
||||
|
DDL_VEND_LIST.Hidden = false; |
||||
|
BTN_INV.Hidden = false; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
public void BindInvoice() |
||||
|
{ |
||||
|
SearchInvoice(ret => { |
||||
|
Grid_V_TB_INVOICE.RecordCount = ret.Count(); |
||||
|
ret = SortAndPage(ret, Grid_V_TB_INVOICE); |
||||
|
|
||||
|
var _ls=ret.ToList(); |
||||
|
|
||||
|
Grid_V_TB_INVOICE.DataSource = ret; |
||||
|
Grid_V_TB_INVOICE.DataBind(); |
||||
|
}); |
||||
|
} |
||||
|
public void SearchInvoice(Action<IQueryable<V_TB_INVOICE>> p_action) |
||||
|
{ |
||||
|
V_TB_INVOICE _entity = new V_TB_INVOICE(); |
||||
|
_entity.InvcBillNum = TXT_InvcBillNum.Text; |
||||
|
_entity.VendName = TXT_VendName.Text; |
||||
|
_entity.InvoiceNum = TXT_InvoiceNum.Text; |
||||
|
_entity.UserInVendIds = CurrentUser.VenderList; |
||||
|
|
||||
|
if (CurrentUser.RoleList.Contains("采购人员")) |
||||
|
{ |
||||
|
if (string.IsNullOrEmpty(DDL_VEND_LIST.SelectedValue)) |
||||
|
{ |
||||
|
Alert.Show("选择开票的供应商,并点击确认!"); |
||||
|
return; |
||||
|
} |
||||
|
var _venderId = DDL_VEND_LIST.SelectedValue; |
||||
|
_entity.VendId = _venderId; |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
if (CurrentUser.VenderList != null && CurrentUser.VenderList.Count > 0) |
||||
|
{ |
||||
|
_entity.VendId = CurrentUser.VenderList[0]; |
||||
|
} |
||||
|
} |
||||
|
if (CurrentUser.FactoryList != null && CurrentUser.FactoryList.Count > 0) |
||||
|
{ |
||||
|
_entity.Site = CurrentUser.FactoryList[0]; |
||||
|
} |
||||
|
if (string.IsNullOrEmpty(_entity.VendId)) |
||||
|
{ |
||||
|
return; |
||||
|
} |
||||
|
if (DP_CreateTime1.SelectedDate != null || DP_CreateTime2.SelectedDate != null || !string.IsNullOrEmpty(TXT_PO.Text) || !string.IsNullOrEmpty(TXT_ASN.Text)) |
||||
|
{ |
||||
|
_entity.InvoiceList = SCP_INVOICE_CONTROLLER.Get_V_TB_INVOICE_BY_TIME(DP_CreateTime1.Text, DP_CreateTime2.Text, TXT_PO.Text, TXT_ASN.Text); |
||||
|
} |
||||
|
SCP_INVOICE_CONTROLLER.Get_V_TB_INVOICE_List(_entity, (ret) => |
||||
|
{ |
||||
|
if (ret.State == ReturnStatus.Succeed) |
||||
|
{ |
||||
|
//if (_entity.InvoiceList == null || _entity.InvoiceList.Count == 0)
|
||||
|
//{
|
||||
|
// Alert.Show("未查询到符合条件的发票!");
|
||||
|
//}
|
||||
|
p_action(ret.Result); |
||||
|
} |
||||
|
}); |
||||
|
} |
||||
|
protected void btnView_OnClick(object sender, EventArgs e) |
||||
|
{ |
||||
|
if (Grid_V_TB_INVOICE.SelectedRowIndexArray.Length != 1) |
||||
|
{ |
||||
|
Alert.Show("请选择一行要操作的记录!"); |
||||
|
return; |
||||
|
} |
||||
|
string roleID = GetSelectedDataKey(Grid_V_TB_INVOICE, 1); |
||||
|
string url = String.Format("../SupplierData/SupplierFinance/SCP_INVOICE_EDIT.aspx?ID={0}", roleID); |
||||
|
PageContext.RegisterStartupScript(Window1.GetShowReference(url)); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
//显示面板
|
||||
|
protected void btnShow_OnClick(object sender, EventArgs e) |
||||
|
{ |
||||
|
gp1.Hidden = false; |
||||
|
} |
||||
|
//关闭面板
|
||||
|
protected void OnClick(object sender, EventArgs e) |
||||
|
{ |
||||
|
gp1.Hidden = true; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
protected void Grid_V_TB_INVOICE_PageIndexChange(object sender, FineUI.GridPageEventArgs e) |
||||
|
{ |
||||
|
BindInvoice(); |
||||
|
} |
||||
|
|
||||
|
protected void Grid_V_TB_INVOICE_RowDoubleClick(object sender, FineUI.GridRowClickEventArgs e) |
||||
|
{ |
||||
|
//string roleID = GetSelectedDataKey(Grid1, 1);
|
||||
|
//string url = String.Format("../SupplierData/InvoiceDetail.aspx?ID={0}", roleID);
|
||||
|
//PageContext.RegisterStartupScript(Window1.GetShowReference(url));
|
||||
|
} |
||||
|
|
||||
|
protected void ddlGridPageSize_SelectedIndexChanged(object sender, EventArgs e) |
||||
|
{ |
||||
|
Grid_V_TB_INVOICE.PageSize = Convert.ToInt32(ddlGridPageSize.SelectedValue); |
||||
|
BindInvoice(); |
||||
|
} |
||||
|
protected void BTN_SEARCH_Click(object sender, EventArgs e) |
||||
|
{ |
||||
|
BindInvoice(); |
||||
|
} |
||||
|
//导出
|
||||
|
protected void btnOutput_OnClick(object sender, EventArgs e) |
||||
|
{ |
||||
|
//List<string> _ls = new List<string>();
|
||||
|
//for (int i = 0, count = Grid_V_TB_INVOICE.Rows.Count; i < count; i++)
|
||||
|
//{
|
||||
|
// object[] rowDataKeys = Grid_V_TB_INVOICE.DataKeys[i];
|
||||
|
// _ls.Add(rowDataKeys[1] as string);
|
||||
|
//}
|
||||
|
//DataSet ds = SCP_EXCEL_CONTROLLER.GET_INVOICE_EXECEL(_ls);
|
||||
|
//PageBase.DataSetToExcel(ds, "财务确认");
|
||||
|
|
||||
|
int[] _selections = Grid_V_TB_INVOICE.SelectedRowIndexArray; |
||||
|
if (_selections.Count() == 0) |
||||
|
{ |
||||
|
Alert.Show("请选择发票记录导出!"); |
||||
|
} |
||||
|
List<string> _ls = new List<string>(); |
||||
|
for (int i = 0, count = Grid_V_TB_INVOICE.Rows.Count; i < count; i++) |
||||
|
{ |
||||
|
if (_selections.Contains(i)) |
||||
|
{ |
||||
|
|
||||
|
object[] rowDataKeys = Grid_V_TB_INVOICE.DataKeys[i]; |
||||
|
_ls.Add(rowDataKeys[1] as string); |
||||
|
} |
||||
|
} |
||||
|
if (_ls.Count == 0) |
||||
|
{ |
||||
|
Alert.Show("请选择记录导出!"); |
||||
|
return; |
||||
|
} |
||||
|
DataSet ds = SCP_EXCEL_CONTROLLER.GET_INVOICE_EXECEL(_ls); |
||||
|
ds.Tables[1].Columns.Remove("成本价"); |
||||
|
PageBase.DataSetToExcel(ds, "导出发票"); |
||||
|
|
||||
|
|
||||
|
|
||||
|
} |
||||
|
|
||||
|
protected void Grid_V_TB_INVOICE_RowDataBound(object sender, GridRowEventArgs e) |
||||
|
{ |
||||
|
int i = 0; |
||||
|
System.Web.UI.WebControls.Label _label = (System.Web.UI.WebControls.Label)Grid_V_TB_INVOICE.Rows[e.RowIndex].FindControl("Total1"); |
||||
|
if (!string.IsNullOrEmpty(_label.Text)) |
||||
|
{ |
||||
|
try |
||||
|
{ |
||||
|
if (decimal.Parse(_label.Text) < 0) |
||||
|
{ |
||||
|
_label.ForeColor = Color.Red; |
||||
|
i++; |
||||
|
} |
||||
|
} |
||||
|
catch |
||||
|
{ } |
||||
|
} |
||||
|
//if (i > 0)
|
||||
|
//{
|
||||
|
// Alert.Show("请尽快处理索赔和退货数据,如果不处理新建发票将")
|
||||
|
//}
|
||||
|
} |
||||
|
|
||||
|
protected void BTN_INV_Click(object sender, EventArgs e) |
||||
|
{ |
||||
|
BindInvoice(); |
||||
|
} |
||||
|
|
||||
|
protected void Window1_Close(object sender, WindowCloseEventArgs e) |
||||
|
{ |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
@ -0,0 +1,103 @@ |
|||||
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SCP_INVOICE_CREATE.aspx.cs" Inherits="SCP.Views.SupplierData.SupplierFinance.SCP_INVOICE_CREATE" %> |
||||
|
|
||||
|
<!DOCTYPE html> |
||||
|
|
||||
|
<html xmlns="http://www.w3.org/1999/xhtml"> |
||||
|
<head runat="server"> |
||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> |
||||
|
<title></title> |
||||
|
</head> |
||||
|
<body> |
||||
|
<form id="form1" runat="server"> |
||||
|
<f:PageManager runat="server" AutoSizePanelID="Panel1" /> |
||||
|
<f:Panel ID="Panel1" runat="server" Title="" AutoScroll="True"> |
||||
|
<Items> |
||||
|
<f:Form runat="server"> |
||||
|
<Toolbars> |
||||
|
<f:Toolbar ID="Toolbar2" runat="server"> |
||||
|
<Items> |
||||
|
<f:Button ID="btnOk" runat="server" EnablePostBack="True" Text="确认创建发票" Icon="Add" OnClick="btnOk_OnClick"> |
||||
|
</f:Button> |
||||
|
|
||||
|
</Items> |
||||
|
</f:Toolbar> |
||||
|
</Toolbars> |
||||
|
<Rows> |
||||
|
<f:FormRow runat="server" ID="FormRow_1"> |
||||
|
<Items> |
||||
|
<f:TextArea runat="server" Label="备注" Text="" MaxLength="100" AutoGrowHeight="True" ID="txtRemark"/> |
||||
|
</Items> |
||||
|
</f:FormRow> |
||||
|
</Rows> |
||||
|
</f:Form> |
||||
|
<f:Grid ID="Grid_SCP_INVOICE_CREATE" runat="server" |
||||
|
ShowBorder ="true" |
||||
|
ShowHeader="true" |
||||
|
PageSize="1000" |
||||
|
BoxFlex="1" |
||||
|
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" |
||||
|
IsDatabasePaging="True" |
||||
|
AllowPaging="True" |
||||
|
SortDirection="DESC" |
||||
|
SortField="CreateTime" |
||||
|
EnableRowSelectEvent="True" AutoScroll="True" OnRowDataBound="Grid_SCP_INVOICE_CREATE_RowDataBound"> |
||||
|
<PageItems> |
||||
|
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server"> |
||||
|
</f:ToolbarSeparator> |
||||
|
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:"> |
||||
|
</f:ToolbarText> |
||||
|
<f:DropDownList ID="ddlGridPageSize" Width="80px" AutoPostBack="true" OnSelectedIndexChanged="ddlGridPageSize_SelectedIndexChanged" |
||||
|
runat="server"> |
||||
|
<f:ListItem Text="10" Value="10" /> |
||||
|
<f:ListItem Text="20" Value="20" /> |
||||
|
<f:ListItem Text="50" Value="50" /> |
||||
|
<f:ListItem Text="100" Value="100" /> |
||||
|
<f:ListItem Text="200" Value="200" /> |
||||
|
</f:DropDownList> |
||||
|
</PageItems> |
||||
|
<Columns> |
||||
|
<f:BoundField runat="server" HeaderText="项目编码" ColumnID="" DataField="ProjectId" /> |
||||
|
<f:BoundField runat="server" HeaderText="订单" ColumnID="" DataField="PoBillNum" /> |
||||
|
<f:BoundField runat="server" HeaderText="订单行" ColumnID="" DataField="PoLine" /> |
||||
|
<f:BoundField runat="server" HeaderText="WMS收货单" ColumnID="" DataField="RecvBillNum" /> |
||||
|
<f:BoundField runat="server" HeaderText="ERP收货单" ColumnID="" DataField="ErpRecvBillNum" /> |
||||
|
<f:BoundField runat="server" HeaderText="发货单" ColumnID="" DataField="AsnBillNum" /> |
||||
|
<f:BoundField runat="server" HeaderText="零件号" ColumnID="" DataField="PartCode" /> |
||||
|
<f:BoundField runat="server" HeaderText="零件名称" ColumnID="" DataField="PartDesc1" /> |
||||
|
<f:BoundField runat="server" HeaderText="币种" ColumnID="" DataField="Currency" /> |
||||
|
<f:TemplateField Width="90px" HeaderText="单价"> |
||||
|
<ItemTemplate> |
||||
|
<asp:TextBox ID="txtPrice" runat="server" Width="80px" onkeyup="if(isNaN(value))execCommand('undo')" onafterpaste="if(isNaN(value))execCommand('undo')" |
||||
|
Text='<%# Eval("Price") %>' MaxLength="12" ></asp:TextBox> |
||||
|
</ItemTemplate> |
||||
|
</f:TemplateField> |
||||
|
<f:TemplateField HeaderText="可用开票数量" Width="70px" ColumnID="Total"> |
||||
|
<ItemTemplate> |
||||
|
<asp:label ID="Total1" runat="server" Width="60px" Text='<%# Eval("CanQty") %>' ></asp:label> |
||||
|
</ItemTemplate> |
||||
|
</f:TemplateField> |
||||
|
|
||||
|
<%--<f:BoundField runat="server" HeaderText="可用开票数量" ColumnID="CanQty" DataField="CanQty" />--%> |
||||
|
<f:TemplateField Width="90px" HeaderText="开票数量"> |
||||
|
<ItemTemplate> |
||||
|
<asp:TextBox ID="txtQty" runat="server" Width="80px" onkeyup="this.value=this.value.replace(/,'')" onafterpaste="this.value=this.value.replace(/-?\D/g,'')" |
||||
|
MaxLength="12" Text='<%# Eval("InputQty") %>' ></asp:TextBox> |
||||
|
</ItemTemplate> |
||||
|
</f:TemplateField> |
||||
|
<f:BoundField runat="server" HeaderText="合同价格" ColumnID="" DataField="ContractPrice" Hidden="true" /> |
||||
|
<f:BoundField runat="server" HeaderText="合同差额" ColumnID="" DataField="BlancePrice" Hidden="true" /> |
||||
|
<f:BoundField runat="server" HeaderText="要货日期" ColumnID="" DataField="BeginTime" Hidden="true" /> |
||||
|
<f:TemplateField Width="100px" HeaderText="备注"> |
||||
|
<ItemTemplate> |
||||
|
<asp:TextBox ID="txtLineMemo" runat="server" Width="100px" |
||||
|
Text='' MaxLength="50"></asp:TextBox> |
||||
|
</ItemTemplate> |
||||
|
</f:TemplateField> |
||||
|
</Columns> |
||||
|
</f:Grid> |
||||
|
</Items> |
||||
|
</f:Panel> |
||||
|
</form> |
||||
|
</body> |
||||
|
</html> |
@ -0,0 +1,416 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Data.Entity.Migrations; |
||||
|
using System.Linq; |
||||
|
using System.Web; |
||||
|
using System.Web.UI; |
||||
|
using System.Web.UI.WebControls; |
||||
|
using CK.SCP.Controller; |
||||
|
using CK.SCP.Models.AppBoxEntity; |
||||
|
using CK.SCP.Models.Enums; |
||||
|
using CK.SCP.Models.ScpEntity; |
||||
|
using CK.SCP.Utils; |
||||
|
using FineUI; |
||||
|
using NPOI.OpenXmlFormats.Dml; |
||||
|
using SCP.Code; |
||||
|
using SCP.WarehouseData; |
||||
|
using System.Drawing; |
||||
|
|
||||
|
namespace SCP.Views.SupplierData.SupplierFinance |
||||
|
{ |
||||
|
public partial class SCP_INVOICE_CREATE : PageBase |
||||
|
{ |
||||
|
protected void Page_Load(object sender, EventArgs e) |
||||
|
{ |
||||
|
IsRoleRight(); |
||||
|
if (!IsPostBack) |
||||
|
{ |
||||
|
TranslatorAgents(Toolbar2); |
||||
|
TranslatorAgent(Grid_SCP_INVOICE_CREATE); |
||||
|
TranslatorAgents(FormRow_1); |
||||
|
LoadData(); |
||||
|
SetRoleRule(); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
public void IsRoleRight() |
||||
|
{ |
||||
|
//if (!CurrentUser.RoleList.Contains("供应商"))
|
||||
|
//{
|
||||
|
// Alert.Show("当前用户角色不能操作该模块!");
|
||||
|
// return;
|
||||
|
//}
|
||||
|
//if (CurrentUser.VenderList == null || CurrentUser.VenderList.Count == 0)
|
||||
|
//{
|
||||
|
// Alert.Show("当前用户未选择地点!");
|
||||
|
// return;
|
||||
|
//}
|
||||
|
} |
||||
|
private void SetRoleRule() |
||||
|
{ |
||||
|
//IsPriceVisible(Grid_SCP_INVOICE_CREATE, "合同价格");
|
||||
|
//IsPriceVisible(Grid_SCP_INVOICE_CREATE, "合同差额");
|
||||
|
IsPriceVisible(Grid_SCP_INVOICE_CREATE, "要货日期"); |
||||
|
} |
||||
|
|
||||
|
public void LoadData() |
||||
|
{ |
||||
|
BindData(); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
private void SearchData(Action<IQueryable<V_TB_RECEIVE_LIST>> p_action) |
||||
|
{ |
||||
|
V_TB_RECEIVE_LIST _entity = new V_TB_RECEIVE_LIST(); |
||||
|
|
||||
|
|
||||
|
if (Session["InvoiceCreateQueryParm"] != null) |
||||
|
{ |
||||
|
InvoiceCreateQueryParm parm = Session["InvoiceCreateQueryParm"] as InvoiceCreateQueryParm; |
||||
|
|
||||
|
if (string.IsNullOrEmpty(parm.ReceiveID)) |
||||
|
|
||||
|
{ Alert.Show("参数不正确!"); return; } |
||||
|
var ary = parm.ReceiveID.Split(','); |
||||
|
if (ary != null && ary.Length > 0) |
||||
|
{ |
||||
|
_entity.UIDList = new List<long>(); |
||||
|
foreach (var itm in ary) |
||||
|
{ |
||||
|
_entity.UIDList.Add(long.Parse(itm)); |
||||
|
} |
||||
|
_entity.State = 1; |
||||
|
_entity.UserInVendIds = CurrentUser.VenderList; |
||||
|
SCP_RECIVECE_CONTROLLER.Get_V_TB_RECEIVE_LIST_List(_entity, (ret) => |
||||
|
{ |
||||
|
if (ret.State == ReturnStatus.Succeed) |
||||
|
{ |
||||
|
p_action(ret.Result); |
||||
|
} |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
Alert.Show("操作超时!"); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
} |
||||
|
|
||||
|
public void BindData() |
||||
|
{ |
||||
|
SearchData(q => |
||||
|
{ |
||||
|
|
||||
|
InvoiceCreateQueryParm parm = Session["InvoiceCreateQueryParm"] as InvoiceCreateQueryParm; |
||||
|
Grid_SCP_INVOICE_CREATE.RecordCount = q.Count(); |
||||
|
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_CONTRACT_CONTROLLER.GET_CONTRACT_PRICE_LIST(q.ToList()); |
||||
|
|
||||
|
foreach (V_TB_RECEIVE_LIST rec in temp) |
||||
|
{ |
||||
|
rec.Qty = ToDecimal(rec.Qty, 2); |
||||
|
rec.CanQty = ToDecimal(rec.CanQty, 2); |
||||
|
} |
||||
|
|
||||
|
string _vendId = string.Empty; |
||||
|
if (CurrentUser.RoleList.Contains("采购人员")) |
||||
|
{ |
||||
|
|
||||
|
_vendId = parm.VendId; |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
_vendId = CurrentUser.VenderList[0]; |
||||
|
} |
||||
|
//SCP_RECIVECE_CONTROLLER.Get_V_TB_RECEIVE_LIST_PRICE(_vendId, temp, (rs) =>
|
||||
|
//{
|
||||
|
|
||||
|
// if (rs.State == ReturnStatus.Succeed)
|
||||
|
// {
|
||||
|
// temp.ForEach(itm =>
|
||||
|
// {
|
||||
|
// var _entityList = rs.Result.ToList().Where(p => p.PartCode == itm.PartCode && itm.CreateTime >= p.StartTime && itm.CreateTime <= p.EndTime).ToList();
|
||||
|
// if (_entityList.Count > 0)
|
||||
|
// {
|
||||
|
// var _max = _entityList.Select(p => p.UID).Max();
|
||||
|
// var _entity = _entityList.Where(p => p.UID == _max).FirstOrDefault();
|
||||
|
// if (itm.ModType == (int)BillModType.Contract)
|
||||
|
// {
|
||||
|
// if (CurrentUser.FactoryList.FirstOrDefault() == "CNS")
|
||||
|
// {
|
||||
|
// itm.Price = _entity.Amt;
|
||||
|
// }
|
||||
|
// else
|
||||
|
// {
|
||||
|
// itm.Price = itm.Price > 0 ? itm.Price : _entity.Amt;
|
||||
|
// }
|
||||
|
// }
|
||||
|
// else
|
||||
|
// {
|
||||
|
// itm.Price = itm.Price > 0 ? itm.Price : _entity.Amt;
|
||||
|
// }
|
||||
|
// }
|
||||
|
// });
|
||||
|
// }
|
||||
|
//});
|
||||
|
|
||||
|
var _isall=parm.IsAll; |
||||
|
if(_isall=="0") |
||||
|
{ |
||||
|
temp.ForEach(p => { |
||||
|
p.InputQty =0; |
||||
|
if (p.CanQty < 0) |
||||
|
{ |
||||
|
p.InputQty = p.CanQty; |
||||
|
} |
||||
|
}); |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
temp.ForEach(p => { p.InputQty = p.CanQty; }); |
||||
|
} |
||||
|
|
||||
|
Grid_SCP_INVOICE_CREATE.DataSource = temp; |
||||
|
Grid_SCP_INVOICE_CREATE.DataBind(); |
||||
|
|
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
public decimal ToDecimal(decimal num, int scale) |
||||
|
{ |
||||
|
decimal tempOdds = Math.Round(num, scale); |
||||
|
|
||||
|
return tempOdds; |
||||
|
} |
||||
|
|
||||
|
protected void ddlGridPageSize_SelectedIndexChanged(object sender, EventArgs e) |
||||
|
{ |
||||
|
Grid_SCP_INVOICE_CREATE.PageSize = Convert.ToInt32(ddlGridPageSize.SelectedValue); |
||||
|
BindData(); |
||||
|
} |
||||
|
//确认创建发票
|
||||
|
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(); |
||||
|
invoice.InvcBillNum = SCP_BILLCODE_CONTROLLER.MakeInvoiceCode(); |
||||
|
invoice.CreateTime = DateTime.Now; |
||||
|
invoice.InvoiceNum = ""; |
||||
|
invoice.Remark = txtRemark.Text; |
||||
|
invoice.CreateUser = CurrentUser.Name; |
||||
|
|
||||
|
string _VendId = parm.VendId; |
||||
|
string _tax = parm.Tax; |
||||
|
invoice.VendId = _VendId; |
||||
|
invoice.State = (int)InvoiceState.New; |
||||
|
invoice.Tax = decimal.Parse(_tax); |
||||
|
string _cj = parm.CJ; |
||||
|
string _tz = parm.TZ; |
||||
|
invoice.BlancePrice = decimal.Parse(_tz); |
||||
|
invoice.ContractPrice = decimal.Parse(_cj); |
||||
|
|
||||
|
int num = 0; |
||||
|
List<V_TB_RECEIVE_LIST> _list = new List<V_TB_RECEIVE_LIST>(); |
||||
|
for (int i = 0; i < Grid_SCP_INVOICE_CREATE.Rows.Count; i++) |
||||
|
{ |
||||
|
object[] rowDataKeys = Grid_SCP_INVOICE_CREATE.DataKeys[i]; |
||||
|
string uid = rowDataKeys[0].ToString(); |
||||
|
var _entity = new V_TB_RECEIVE_LIST(); |
||||
|
_entity.UID = ConvertHelper.To<Int32>(rowDataKeys[0]); |
||||
|
_entity.RecvBillNum = rowDataKeys[1] as string; |
||||
|
_entity.PoLine = ConvertHelper.To<Int32>(rowDataKeys[2]); |
||||
|
_entity.PartCode = rowDataKeys[3] as string; |
||||
|
_entity.Batch = rowDataKeys[4] as string; |
||||
|
_entity.Qty = ConvertHelper.To<Decimal>(rowDataKeys[5]); |
||||
|
_entity.DockCode = rowDataKeys[6] as string; |
||||
|
_entity.Remark = rowDataKeys[7] as string; |
||||
|
_entity.CreateTime = ConvertHelper.To<DateTime>(rowDataKeys[8]); |
||||
|
_entity.CreateUser = rowDataKeys[9] as string; |
||||
|
if (string.IsNullOrEmpty(_entity.CreateUser)) |
||||
|
{ |
||||
|
_entity.CreateUser = CurrentUser.Name; |
||||
|
} |
||||
|
_entity.IsDeleted = ConvertHelper.To<Boolean>(rowDataKeys[10]); |
||||
|
_entity.AsnBillNum = rowDataKeys[12] as string; |
||||
|
_entity.Site = rowDataKeys[13] as string; |
||||
|
invoice.Site = rowDataKeys[13] as string; |
||||
|
_entity.VendId = rowDataKeys[14] as string; |
||||
|
_entity.ShipTime = ConvertHelper.To<DateTime?>(rowDataKeys[15]); |
||||
|
_entity.OperName = rowDataKeys[16] as string; |
||||
|
_entity.PartDesc1 = rowDataKeys[17] as string; |
||||
|
_entity.State = ConvertHelper.To<Int32>(rowDataKeys[18]); |
||||
|
_entity.PoBillNum = rowDataKeys[19] as string; |
||||
|
_entity.VendName = rowDataKeys[20] as string; |
||||
|
_entity.Site_Desc = rowDataKeys[21] as string; |
||||
|
_entity.PoUnit = rowDataKeys[22] as string; |
||||
|
_entity.LocUnit = rowDataKeys[23] as string; |
||||
|
_entity.Price = ConvertHelper.To<Decimal>(rowDataKeys[24]); |
||||
|
_entity.VendBatch = rowDataKeys[25] as string; |
||||
|
_entity.Currency = rowDataKeys[26] as string; |
||||
|
_entity.BillType_DESC = rowDataKeys[27] as string; |
||||
|
_entity.ErpRecvBillNum= rowDataKeys[28] as string; |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
System.Web.UI.WebControls.Label _label = (System.Web.UI.WebControls.Label)Grid_SCP_INVOICE_CREATE.Rows[i].FindControl("Total1"); |
||||
|
_entity.CanQty = ConvertHelper.To<Decimal>(_label.Text);//ConvertHelper.To < Int32 >(rowDataKeys[2]);
|
||||
|
GridRow row = Grid_SCP_INVOICE_CREATE.Rows[i]; |
||||
|
System.Web.UI.WebControls.TextBox txtQty = (System.Web.UI.WebControls.TextBox)row.FindControl("txtQty"); |
||||
|
System.Web.UI.WebControls.TextBox txtPrice = (System.Web.UI.WebControls.TextBox)row.FindControl("txtPrice"); |
||||
|
System.Web.UI.WebControls.TextBox txtLineMemo = (System.Web.UI.WebControls.TextBox)row.FindControl("txtLineMemo"); |
||||
|
|
||||
|
decimal Qty = 0; |
||||
|
try |
||||
|
{ |
||||
|
if (txtQty.Text.Trim() != "") |
||||
|
{ |
||||
|
Qty = Convert.ToDecimal(txtQty.Text.Trim()); |
||||
|
} |
||||
|
} |
||||
|
catch |
||||
|
{ |
||||
|
PageContext.RegisterStartupScript(Alert.GetShowInTopReference("开票数量输入不正确")); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
decimal Price = 0; |
||||
|
try |
||||
|
{ |
||||
|
if (txtPrice.Text.Trim() != "") |
||||
|
{ |
||||
|
Price = Convert.ToDecimal(txtPrice.Text.Trim()); |
||||
|
} |
||||
|
} |
||||
|
catch |
||||
|
{ |
||||
|
PageContext.RegisterStartupScript(Alert.GetShowInTopReference("单价输入不正确")); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
if (Qty == 0) |
||||
|
{ |
||||
|
continue; |
||||
|
} |
||||
|
if (Qty > _entity.CanQty) |
||||
|
{ |
||||
|
PageContext.RegisterStartupScript(Alert.GetShowInTopReference("开票数量不能大于可用开票数量")); |
||||
|
return; |
||||
|
} |
||||
|
_entity.Qty = Qty; |
||||
|
_entity.Price = Price; |
||||
|
_entity.Remark = txtLineMemo.Text; |
||||
|
_list.Add(_entity); |
||||
|
num++; |
||||
|
} |
||||
|
if (num == 0) |
||||
|
{ |
||||
|
PageContext.RegisterStartupScript(Alert.GetShowInTopReference("没有可用的开票记录")); |
||||
|
return; |
||||
|
} |
||||
|
int _number = 0; |
||||
|
_list.ForEach(p => |
||||
|
{ |
||||
|
if (p.Qty > 0) |
||||
|
{ |
||||
|
_number++; |
||||
|
} |
||||
|
}); |
||||
|
if (_number == _list.Count) |
||||
|
{ |
||||
|
string _modify = parm.Modify; |
||||
|
if (_modify == "1") |
||||
|
{ |
||||
|
Alert.Show("有退货单未处理!"); |
||||
|
return; |
||||
|
} |
||||
|
} |
||||
|
var ret = SCP_INVOICE_CONTROLLER.CREATE_TB_INVOICE(invoice, _list); |
||||
|
if (ret.State == ReturnStatus.Succeed) |
||||
|
{ |
||||
|
string script = $"alert(\'发票 {invoice.InvcBillNum} 生成成功\');"; |
||||
|
script += ActiveWindow.GetHidePostBackReference(); |
||||
|
PageContext.RegisterStartupScript(script); |
||||
|
} |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
Alert.Show("操作超时"); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
} |
||||
|
|
||||
|
protected void Grid_SCP_INVOICE_CREATE_RowDataBound(object sender, GridRowEventArgs e) |
||||
|
{ |
||||
|
object[] rowDataKeys = Grid_SCP_INVOICE_CREATE.DataKeys[e.RowIndex]; |
||||
|
|
||||
|
|
||||
|
System.Web.UI.WebControls.Label _label = (System.Web.UI.WebControls.Label)Grid_SCP_INVOICE_CREATE.Rows[e.RowIndex].FindControl("Total1"); |
||||
|
|
||||
|
var _number = ConvertHelper.To<Decimal>(_label.Text); |
||||
|
if (_number<= 0) |
||||
|
{ |
||||
|
GridRow row = Grid_SCP_INVOICE_CREATE.Rows[e.RowIndex]; |
||||
|
System.Web.UI.WebControls.TextBox txtQty = (System.Web.UI.WebControls.TextBox)row.FindControl("txtQty"); |
||||
|
txtQty.ReadOnly = true; |
||||
|
txtQty.Enabled = false; |
||||
|
if (_number < 0) |
||||
|
{ |
||||
|
|
||||
|
if (!string.IsNullOrEmpty(_label.Text)) |
||||
|
{ |
||||
|
if (decimal.Parse(_label.Text) < 0) |
||||
|
{ |
||||
|
_label.ForeColor = Color.Red; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
private decimal? GetTax() |
||||
|
{ |
||||
|
decimal? strTax = null; |
||||
|
string name = GetIdentityName(); |
||||
|
User modelUsers = DB.Users.SingleOrDefault(p => p.Name == name); |
||||
|
VenderUsers vu = null; |
||||
|
TA_VENDER tv = null; |
||||
|
|
||||
|
if (modelUsers != null) |
||||
|
{ |
||||
|
vu = DB.VenderUsers.SingleOrDefault(p => p.UserId == modelUsers.ID); |
||||
|
if (vu != null) |
||||
|
{ |
||||
|
tv = SCPDB.TA_VENDER.SingleOrDefault(p => p.VendId == vu.VenderId); |
||||
|
|
||||
|
if (tv != null) |
||||
|
{ |
||||
|
strTax = tv.Tax; |
||||
|
} |
||||
|
} |
||||
|
//_info.SupplierCode = vu.VenderId;
|
||||
|
} |
||||
|
Session["InvoiceCreateQueryParm"] = null; |
||||
|
return strTax; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
} |
@ -0,0 +1,143 @@ |
|||||
|
//------------------------------------------------------------------------------
|
||||
|
// <自动生成>
|
||||
|
// 此代码由工具生成。
|
||||
|
//
|
||||
|
// 对此文件的更改可能导致不正确的行为,如果
|
||||
|
// 重新生成代码,则所做更改将丢失。
|
||||
|
// </自动生成>
|
||||
|
//------------------------------------------------------------------------------
|
||||
|
|
||||
|
namespace SCP.Views.SupplierData.SupplierFinance |
||||
|
{ |
||||
|
|
||||
|
|
||||
|
public partial class SCP_INVOICE_CREATE |
||||
|
{ |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// form1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::System.Web.UI.HtmlControls.HtmlForm form1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Panel1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Panel Panel1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Toolbar2 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Toolbar Toolbar2; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// btnOk 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Button btnOk; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// FormRow_1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.FormRow FormRow_1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// txtRemark 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextArea txtRemark; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Grid_SCP_INVOICE_CREATE 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Grid Grid_SCP_INVOICE_CREATE; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// ToolbarSeparator1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.ToolbarSeparator ToolbarSeparator1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// ToolbarText1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.ToolbarText ToolbarText1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// ddlGridPageSize 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.DropDownList ddlGridPageSize; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// txtPrice 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::System.Web.UI.WebControls.TextBox txtPrice; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Total1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::System.Web.UI.WebControls.Label Total1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// txtQty 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::System.Web.UI.WebControls.TextBox txtQty; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// txtLineMemo 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::System.Web.UI.WebControls.TextBox txtLineMemo; |
||||
|
} |
||||
|
} |
@ -0,0 +1,560 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
|
using System.Web; |
||||
|
using System.Web.UI; |
||||
|
using System.Web.UI.WebControls; |
||||
|
using CK.SCP.Common; |
||||
|
using CK.SCP.Controller; |
||||
|
using CK.SCP.Models.Enums; |
||||
|
using CK.SCP.Models.ScpEntity; |
||||
|
using CK.SCP.Utils; |
||||
|
using FineUI; |
||||
|
using System.Drawing; |
||||
|
|
||||
|
namespace SCP.Views.SupplierData.SupplierFinance |
||||
|
{ |
||||
|
public partial class SCP_INVOICE_EDIT : PageBase |
||||
|
{ |
||||
|
protected void Page_Load(object sender, EventArgs e) |
||||
|
{ |
||||
|
IsRoleRight(); |
||||
|
|
||||
|
if (!IsPostBack) |
||||
|
{ |
||||
|
TranslatorAgents(Toolbar2); |
||||
|
TranslatorAgent(Grid1); |
||||
|
TranslatorAgents(FormRow_1); |
||||
|
TranslatorAgents(FormRow_2); |
||||
|
TranslatorAgents(FormRow_3); |
||||
|
TranslatorAgents(FormRow_4); |
||||
|
BindData(); |
||||
|
GetInvoice(); |
||||
|
SetRoleRule(); |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
|
||||
|
public void IsRoleRight() |
||||
|
{ |
||||
|
//if (!CurrentUser.RoleList.Contains("供应商"))
|
||||
|
//{
|
||||
|
// Alert.Show("当前用户角色不能操作该模块!");
|
||||
|
// return;
|
||||
|
//}
|
||||
|
//if (CurrentUser.VenderList == null || CurrentUser.VenderList.Count == 0)
|
||||
|
//{
|
||||
|
// Alert.Show("当前用户未选择地点!");
|
||||
|
// return;
|
||||
|
//}
|
||||
|
} |
||||
|
|
||||
|
private void SetRoleRule() |
||||
|
{ |
||||
|
//IsPriceVisible(Grid1, "合同价格");
|
||||
|
//IsPriceVisible(Grid1, "合同差额");
|
||||
|
IsPriceVisible(Grid1, "要货日期"); |
||||
|
} |
||||
|
|
||||
|
public decimal ToDecimal(decimal num, int scale) |
||||
|
{ |
||||
|
decimal tempOdds = Math.Round(num, scale); |
||||
|
//if (tempOdds > num)
|
||||
|
//{
|
||||
|
// num = (decimal)((double)(tempOdds - (decimal)Math.Pow(10, -scale)));
|
||||
|
//}
|
||||
|
//else
|
||||
|
//{
|
||||
|
// num = (decimal)((double)tempOdds);
|
||||
|
//}
|
||||
|
//return num;
|
||||
|
return tempOdds; |
||||
|
} |
||||
|
|
||||
|
private void Search(Action<IQueryable<V_TB_INVOICE_DETAIL>> p_list) |
||||
|
{ |
||||
|
|
||||
|
string id = GetQueryValue("ID"); |
||||
|
V_TB_INVOICE_DETAIL _tb = new V_TB_INVOICE_DETAIL(); |
||||
|
_tb.InvcBillNum = id; |
||||
|
SCP_INVOICE_CONTROLLER.Get_V_TB_INVOICE_DETAIL_List(_tb, (ret) => { |
||||
|
|
||||
|
if (ret.State == ReturnStatus.Succeed) |
||||
|
{ |
||||
|
p_list(ret.Result); |
||||
|
} |
||||
|
|
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
public void BindData() |
||||
|
{ |
||||
|
Search(ret => |
||||
|
{ |
||||
|
Grid1.RecordCount = ret.Count(); |
||||
|
var list = SortAndPage(ret, Grid1); |
||||
|
//Grid1.DataSource =SCP_RECIVECE_CONTROLLER.Get_V_TB_INVOICE_LIST(list.ToList());
|
||||
|
List<V_TB_INVOICE_DETAIL> temp = SCP_RECIVECE_CONTROLLER.Get_V_TB_INVOICE_LIST(list.ToList()); |
||||
|
temp = SCP_CONTRACT_CONTROLLER.GET_CONTRACT_PRICE_LIST(temp); |
||||
|
|
||||
|
//decimal htjgSum = 0;//合同总价
|
||||
|
//decimal htceSum = 0;//合同差额
|
||||
|
//foreach (V_TB_INVOICE_DETAIL rec in temp)
|
||||
|
//{
|
||||
|
// rec.Qty = ToDecimal(rec.Qty, 2);
|
||||
|
// rec.CanQty = ToDecimal(rec.CanQty, 2);
|
||||
|
|
||||
|
// htjgSum += rec.Qty * (rec.ContractPrice == null ? 0 : Convert.ToDecimal(rec.ContractPrice));//开票数量*合同价格
|
||||
|
// htceSum += rec.Qty * (rec.BlancePrice == null ? 0 : Convert.ToDecimal(rec.BlancePrice));//开票数量*合同差额
|
||||
|
//}
|
||||
|
|
||||
|
//txtContractPrice1.Text = htjgSum.ToString();
|
||||
|
//txtBlancePrice1.Text = htceSum.ToString();
|
||||
|
GetInvoice(); |
||||
|
Grid1.DataSource = temp; |
||||
|
Grid1.DataBind(); |
||||
|
}); |
||||
|
|
||||
|
|
||||
|
} |
||||
|
|
||||
|
private void GetInvoice() |
||||
|
{ |
||||
|
string id = GetQueryValue("ID"); |
||||
|
string vendid = ""; |
||||
|
if (CurrentUser.VenderList != null && CurrentUser.VenderList.Count > 0) |
||||
|
{ |
||||
|
vendid = CurrentUser.VenderList[0]; |
||||
|
} |
||||
|
|
||||
|
SCP_INVOICE_CONTROLLER.Get_V_TB_INVOICE_List(new V_TB_INVOICE { InvcBillNum = id, VendId = vendid }, (ret) => { |
||||
|
|
||||
|
if (ret.State == ReturnStatus.Succeed) |
||||
|
{ |
||||
|
var _ls = ret.Result.ToList(); |
||||
|
if (_ls != null && _ls.Count > 0) |
||||
|
{ |
||||
|
var _Model = _ls[0]; |
||||
|
Session["Invoice"] = _Model; |
||||
|
txtState.Text = _Model.State_DESC; |
||||
|
txtBillNo.Text = _Model.InvcBillNum; |
||||
|
txtBillTime.Text = Convert.ToDateTime(_Model.CreateTime).ToString("yyyy-MM-dd"); |
||||
|
txtSupplierName.Text = _Model.VendName; |
||||
|
txtInvoiceNumber.Text = _Model.InvoiceNum; |
||||
|
txtExpressNumber.Text = _Model.ExpressNum; |
||||
|
|
||||
|
dpUpdateTime.SelectedDate = _Model.UpdateTime; |
||||
|
txtTax.SelectedValue = _Model.Tax != null ? _Model.Tax.Value.ToString() : "0"; |
||||
|
txtTaxAmount.Text = _Model.TaxAmount!=null?_Model.TaxAmount.Value.ToString():"0"; |
||||
|
txtDiscountPrice.Text = _Model.DiscountPrice != null ? _Model.DiscountPrice.Value.ToString() : "0"; |
||||
|
//if (_Model.State != (int)InvoiceState.New)
|
||||
|
//{
|
||||
|
txtContractPrice1.Text = _Model.ContractPrice != null ? _Model.ContractPrice.ToString() : string.Empty; |
||||
|
txtBlancePrice1.Text = _Model.BlancePrice != null ? _Model.BlancePrice.ToString() : string.Empty; |
||||
|
//}
|
||||
|
txtAmount.Text = _Model.Amount.ToString(); |
||||
|
txtTotal.Text = _Model.Total != null ? _Model.Total.ToString() : string.Empty; |
||||
|
txtMemo.Text = _Model.Remark; |
||||
|
if (_Model.State == (int)InvoiceState.New || _Model.State == (int)InvoiceState.CheckFail) |
||||
|
{ |
||||
|
this.btnOK.Hidden = false; |
||||
|
this.btnApply.Hidden = false; |
||||
|
this.btnReject.Hidden = false; |
||||
|
} |
||||
|
|
||||
|
if (_Model.State == (int)InvoiceState.Reject) |
||||
|
{ |
||||
|
this.btnReject.Hidden = true; |
||||
|
this.btnOK.Hidden = false; |
||||
|
} |
||||
|
|
||||
|
//提交之后不能作废
|
||||
|
if (_Model.State == (int)InvoiceState.New) |
||||
|
{ |
||||
|
this.btnOK.Hidden = false; |
||||
|
this.btnReject.Hidden = false; |
||||
|
} |
||||
|
|
||||
|
if (_Model.State == (int)InvoiceState.Apply) |
||||
|
{ |
||||
|
this.btnOK.Hidden = false; |
||||
|
this.btnApply.Hidden = true;//提交申请
|
||||
|
this.btnReject.Hidden = true;//发票作废
|
||||
|
this.btnMail.Hidden = true;//寄出发票
|
||||
|
} |
||||
|
|
||||
|
if (_Model.State == (int)InvoiceState.Mail) |
||||
|
{ |
||||
|
this.btnOK.Hidden = true;//确定修改
|
||||
|
this.btnApply.Hidden = true;//提交申请
|
||||
|
this.btnReject.Hidden = true;//发票作废
|
||||
|
this.btnMail.Hidden = true;//寄出发票
|
||||
|
|
||||
|
txtInvoiceNumber.Readonly = true; |
||||
|
txtInvoiceNumber.Required = false; |
||||
|
|
||||
|
txtExpressNumber.Readonly = true; |
||||
|
txtExpressNumber.Required = false; |
||||
|
|
||||
|
txtContractPrice1.Readonly = true; |
||||
|
txtContractPrice1.Required = false; |
||||
|
|
||||
|
txtBlancePrice1.Readonly = true; |
||||
|
txtBlancePrice1.Required = false; |
||||
|
} |
||||
|
|
||||
|
if ( _Model.State == (int)InvoiceState.FinanceFail || _Model.State == (int)InvoiceState.CheckSuccess ) |
||||
|
{ |
||||
|
txtInvoiceNumber.Readonly = false; |
||||
|
txtInvoiceNumber.Required = true; |
||||
|
txtExpressNumber.Readonly = false; |
||||
|
txtContractPrice1.Readonly = false; |
||||
|
txtContractPrice1.Required = false; |
||||
|
txtBlancePrice1.Readonly = true; |
||||
|
txtBlancePrice1.Required = false; |
||||
|
this.btnMail.Hidden = false; |
||||
|
this.btnReject.Hidden = false; |
||||
|
this.btnOK.Hidden = false; |
||||
|
txtContractPrice1.Readonly = true; |
||||
|
txtContractPrice1.Required = false; |
||||
|
txtContractPrice1.Enabled = false; |
||||
|
txtBlancePrice1.Readonly = false; |
||||
|
} |
||||
|
if (_Model.State ==(int) InvoiceState.CheckSuccess) |
||||
|
{ |
||||
|
this.btnOK.Hidden = true; |
||||
|
txtMemo.Enabled = false; |
||||
|
|
||||
|
for (int i = 0, count = Grid1.Rows.Count; i < count; i++) |
||||
|
{ |
||||
|
object[] rowDataKeys = Grid1.DataKeys[i]; |
||||
|
GridRow row = Grid1.Rows[i]; |
||||
|
|
||||
|
var txtPrice = (System.Web.UI.WebControls.TextBox)row.FindControl("txtPrice"); |
||||
|
var txtQty = (System.Web.UI.WebControls.TextBox)row.FindControl("txtQty"); |
||||
|
var txtLineMemo = (System.Web.UI.WebControls.TextBox)row.FindControl("txtLineMemo"); |
||||
|
|
||||
|
|
||||
|
txtPrice.ReadOnly = true; |
||||
|
txtPrice.Enabled = false; |
||||
|
txtQty.ReadOnly = true; |
||||
|
txtQty.Enabled = false; |
||||
|
txtLineMemo.ReadOnly = true; |
||||
|
txtLineMemo.Enabled = false; |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
}); |
||||
|
|
||||
|
|
||||
|
} |
||||
|
|
||||
|
|
||||
|
protected void btnOK_Click(object sender, EventArgs e) |
||||
|
{ |
||||
|
|
||||
|
var _invoice = Session["Invoice"] as V_TB_INVOICE; |
||||
|
|
||||
|
string InvoiceNumber = MyWebString.GetString(this.txtInvoiceNumber.Text.Trim()); |
||||
|
string Memo = MyWebString.GetString(this.txtMemo.Text.Trim()); |
||||
|
string ExpressNumber = MyWebString.GetString(this.txtExpressNumber.Text.Trim()); |
||||
|
string ContractPrice1 = MyWebString.GetString(this.txtContractPrice1.Text.Trim());//合同价格
|
||||
|
string BlancePrice1 = MyWebString.GetString(this.txtBlancePrice1.Text.Trim());//合同差额
|
||||
|
string DiscountPrice1 = MyWebString.GetString(this.txtDiscountPrice.Text.Trim()); |
||||
|
//if (_invoice.State != (int)InvoiceState.New &&
|
||||
|
// _invoice.State != (int)InvoiceState.CheckFail)
|
||||
|
//{
|
||||
|
// Alert.Show(_invoice.InvcBillNum + " 不允许修改,只有状态为 " + "新建" + " 或 " +
|
||||
|
// "采购退回" + " 才能修改");
|
||||
|
// return;
|
||||
|
//}
|
||||
|
if (!string.IsNullOrEmpty(txtTax.SelectedValue)) |
||||
|
{ |
||||
|
_invoice.Tax = decimal.Parse(txtTax.SelectedValue); |
||||
|
} |
||||
|
_invoice.InvoiceNum = InvoiceNumber; |
||||
|
_invoice.Remark = Memo; |
||||
|
_invoice.ExpressNum = ExpressNumber; |
||||
|
|
||||
|
//_invoice.UpdateTime = dpUpdateTime.SelectedDate.Value;
|
||||
|
//_invoice.State = (int)InvoiceState.Apply;
|
||||
|
|
||||
|
if (string.IsNullOrEmpty(ContractPrice1)) |
||||
|
{ |
||||
|
_invoice.ContractPrice = 0; |
||||
|
} |
||||
|
|
||||
|
if (string.IsNullOrEmpty(BlancePrice1)) |
||||
|
{ |
||||
|
_invoice.BlancePrice = 0; |
||||
|
} |
||||
|
if (string.IsNullOrEmpty(DiscountPrice1)) |
||||
|
{ |
||||
|
_invoice.DiscountPrice = 0; |
||||
|
} |
||||
|
if (_invoice.State == (int)InvoiceState.CheckSuccess) |
||||
|
{ |
||||
|
|
||||
|
if (dpUpdateTime.SelectedDate == null) |
||||
|
{ |
||||
|
Alert.Show("发票时间必须填写,时间为纸质发票开票时间"); |
||||
|
return; |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
_invoice.UpdateTime = dpUpdateTime.SelectedDate.Value; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
decimal c1; |
||||
|
decimal b1; |
||||
|
decimal d1; |
||||
|
if (decimal.TryParse(ContractPrice1, out c1)) |
||||
|
{ |
||||
|
_invoice.ContractPrice = c1; |
||||
|
} |
||||
|
//else
|
||||
|
//{
|
||||
|
// Alert.Show("折扣金额请填写数字!");
|
||||
|
// return;
|
||||
|
//}
|
||||
|
|
||||
|
if (decimal.TryParse(BlancePrice1, out b1)) |
||||
|
{ |
||||
|
_invoice.BlancePrice = b1; |
||||
|
} |
||||
|
if (decimal.TryParse(DiscountPrice1, out d1)) |
||||
|
{ |
||||
|
_invoice.DiscountPrice = d1; |
||||
|
} |
||||
|
//else
|
||||
|
//{
|
||||
|
// Alert.Show("调整请填写数字!");
|
||||
|
// return;
|
||||
|
//}
|
||||
|
|
||||
|
|
||||
|
List<V_TB_INVOICE_DETAIL> _ls = new List<V_TB_INVOICE_DETAIL>(); |
||||
|
if (this.txtQty.ReadOnly == false) |
||||
|
{ |
||||
|
|
||||
|
for (int i = 0, count = Grid1.Rows.Count; i < count; i++) |
||||
|
{ |
||||
|
object[] rowDataKeys = Grid1.DataKeys[i]; |
||||
|
GridRow row = Grid1.Rows[i]; |
||||
|
|
||||
|
V_TB_INVOICE_DETAIL _entity = new V_TB_INVOICE_DETAIL(); |
||||
|
_entity.UID = ConvertHelper.To<Int32>(rowDataKeys[0]); |
||||
|
_entity.InvcBillNum = rowDataKeys[1] as string; |
||||
|
_entity.Qty = ConvertHelper.To<Decimal>(rowDataKeys[2]); |
||||
|
_entity.CanQty = ConvertHelper.To<Decimal>(rowDataKeys[3]); |
||||
|
_entity.State = ConvertHelper.To<Int32>(rowDataKeys[4]); |
||||
|
var txtQty = (System.Web.UI.WebControls.TextBox)row.FindControl("txtQty"); |
||||
|
var txtPrice = (System.Web.UI.WebControls.TextBox)row.FindControl("txtPrice"); |
||||
|
var txtLineMemo = (System.Web.UI.WebControls.TextBox)row.FindControl("txtLineMemo"); |
||||
|
//var txtContractPrice = (System.Web.UI.WebControls.TextBox)row.FindControl("txtContractPrice");
|
||||
|
//var txtBlancePrice = (System.Web.UI.WebControls.TextBox)row.FindControl("txtBlancePrice");
|
||||
|
|
||||
|
decimal QtyNew = 0; |
||||
|
try |
||||
|
{ |
||||
|
if (txtQty.Text.Trim() != "") |
||||
|
{ |
||||
|
QtyNew = Convert.ToDecimal(txtQty.Text.Trim()); |
||||
|
} |
||||
|
} |
||||
|
catch |
||||
|
{ |
||||
|
Alert.Show("开票数量输入不正确"); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
if (QtyNew > _entity.CanQty + _entity.Qty) |
||||
|
{ |
||||
|
Alert.Show("开票数量不能大于可用开数票"); |
||||
|
return; |
||||
|
|
||||
|
} |
||||
|
|
||||
|
decimal PriceNew = 0; |
||||
|
try |
||||
|
{ |
||||
|
if (txtPrice.Text.Trim() != "") |
||||
|
{ |
||||
|
PriceNew = Convert.ToDecimal(txtPrice.Text.Trim()); |
||||
|
} |
||||
|
} |
||||
|
catch |
||||
|
{ |
||||
|
Alert.Show("单价输入不正确"); |
||||
|
return; |
||||
|
} |
||||
|
_entity.Remark = txtLineMemo.Text; |
||||
|
_entity.Price = PriceNew; |
||||
|
_entity.Qty = QtyNew; |
||||
|
_ls.Add(_entity); |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
|
||||
|
// SCPDB.Database.SqlQuery<V_TB_INVOICE>("select * from V_TB_INVOICE WHERE STATE==0 AND ").ToArray
|
||||
|
|
||||
|
if (_ls.Count > 0) |
||||
|
{ |
||||
|
var ret = SCP_INVOICE_CONTROLLER.SAVE_TB_INVOICE_APPLY(_invoice,_ls); |
||||
|
if (ret.State == ReturnStatus.Succeed) |
||||
|
{ |
||||
|
|
||||
|
Alert.Show("发票明细修改成功!"); |
||||
|
|
||||
|
BindData(); |
||||
|
} |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
Alert.Show("更改记录数为零"); |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
private void SET_INVOICE_STATE(string p_msg, InvoiceState p_state) |
||||
|
{ |
||||
|
if (Session["Invoice"] != null) |
||||
|
{ |
||||
|
var _Invoice = Session["Invoice"] as V_TB_INVOICE; |
||||
|
|
||||
|
string InvoiceNumber = MyWebString.GetString(this.txtInvoiceNumber.Text.Trim());//金税票号
|
||||
|
string ExpressNumber = MyWebString.GetString(this.txtExpressNumber.Text.Trim());//快递单号
|
||||
|
|
||||
|
string ContractPrice1 = MyWebString.GetString(this.txtContractPrice1.Text.Trim());//合同价格
|
||||
|
string BlancePrice1 = MyWebString.GetString(this.txtBlancePrice1.Text.Trim());//合同差额
|
||||
|
string DiscountPrice1 = MyWebString.GetString(this.txtDiscountPrice.Text.Trim()); |
||||
|
_Invoice.InvoiceNum = InvoiceNumber; |
||||
|
_Invoice.ExpressNum = ExpressNumber; |
||||
|
_Invoice.UpdateTime = dpUpdateTime.SelectedDate; |
||||
|
if (string.IsNullOrEmpty(ContractPrice1)) |
||||
|
{ |
||||
|
_Invoice.ContractPrice = 0; |
||||
|
} |
||||
|
if (string.IsNullOrEmpty(BlancePrice1)) |
||||
|
{ |
||||
|
_Invoice.BlancePrice = 0; |
||||
|
} |
||||
|
|
||||
|
decimal c1; |
||||
|
decimal b1; |
||||
|
decimal d1; |
||||
|
if (decimal.TryParse(ContractPrice1, out c1)) |
||||
|
{ |
||||
|
_Invoice.ContractPrice = c1; |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
_Invoice.ContractPrice = 0; |
||||
|
} |
||||
|
|
||||
|
if (decimal.TryParse(BlancePrice1, out b1)) |
||||
|
{ |
||||
|
_Invoice.BlancePrice = b1; |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
_Invoice.BlancePrice = 0; |
||||
|
} |
||||
|
if (decimal.TryParse(DiscountPrice1, out d1)) |
||||
|
{ |
||||
|
_Invoice.DiscountPrice = d1; |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
_Invoice.DiscountPrice = 0; |
||||
|
} |
||||
|
if (p_state == InvoiceState.Mail) |
||||
|
{ |
||||
|
if (string.IsNullOrEmpty(InvoiceNumber)) |
||||
|
{ |
||||
|
Alert.Show("请填写金税票号!"); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
if (string.IsNullOrEmpty(ExpressNumber)) |
||||
|
{ |
||||
|
Alert.Show("请填写快递单号!"); |
||||
|
return; |
||||
|
} |
||||
|
if (dpUpdateTime.SelectedDate == null) |
||||
|
{ |
||||
|
Alert.Show("发票时间必须填写,时间为纸质发票开票时间"); |
||||
|
return; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
var ret = SCP_INVOICE_CONTROLLER.SAVE_TB_INVOICE_STATE(_Invoice, p_state,CurrentUser.ChineseName); |
||||
|
if (ret.State == ReturnStatus.Succeed) |
||||
|
{ |
||||
|
Alert.Show(p_msg); |
||||
|
|
||||
|
BindData(); |
||||
|
GetInvoice(); |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
Alert.Show(ret.Message); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
protected void btnApply_Click(object sender, EventArgs e) |
||||
|
{ |
||||
|
|
||||
|
SET_INVOICE_STATE("发票申请成功!", InvoiceState.Apply); |
||||
|
|
||||
|
} |
||||
|
|
||||
|
protected void btnMail_Click(object sender, EventArgs e) |
||||
|
{ |
||||
|
SET_INVOICE_STATE("发票已经寄出!", InvoiceState.Mail); |
||||
|
} |
||||
|
|
||||
|
protected void btnReject_Click(object sender, EventArgs e) |
||||
|
{ |
||||
|
SET_INVOICE_STATE("发票已经作废!", InvoiceState.Reject); |
||||
|
} |
||||
|
|
||||
|
protected void Window1_OnClose(object sender, WindowCloseEventArgs e) |
||||
|
{ |
||||
|
//string id = GetQueryValue("ID");
|
||||
|
|
||||
|
//TB_INVOICE model = InvoiceController.GetDataByBillInvoiceBillNum(id);
|
||||
|
//InvoiceController.UpdateDataRemark(e.CloseArgument, model);
|
||||
|
|
||||
|
} |
||||
|
|
||||
|
protected void btnRed_Click(object sender, EventArgs e) |
||||
|
{ |
||||
|
string id = GetQueryValue("ID"); |
||||
|
V_TB_INVOICE _tb = new V_TB_INVOICE(); |
||||
|
_tb.InvcBillNum = id; |
||||
|
var ret = SCP_INVOICE_CONTROLLER.Add_New_Red_Invoice(_tb); |
||||
|
|
||||
|
if (ret.State == ReturnStatus.Succeed) |
||||
|
{ |
||||
|
BindData(); |
||||
|
GetInvoice(); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
protected void Grid1_RowDataBound(object sender, GridRowEventArgs e) |
||||
|
{ |
||||
|
System.Web.UI.WebControls.TextBox _label = (System.Web.UI.WebControls.TextBox)Grid1.Rows[e.RowIndex].FindControl("txtQty"); |
||||
|
if (!string.IsNullOrEmpty(_label.Text)) |
||||
|
{ |
||||
|
if (decimal.Parse(_label.Text) < 0) |
||||
|
{ |
||||
|
_label.ForeColor = Color.Red; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,250 @@ |
|||||
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SCP_RECEIVE_LIST.aspx.cs" Inherits="SCP.SupplierData.SupplierFinance.ReceiveList" %> |
||||
|
|
||||
|
<%@ Register Assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Namespace="System.Web.UI.DataVisualization.Charting" TagPrefix="asp" %> |
||||
|
|
||||
|
<%@ Import Namespace="CK.SCP.Utils" %> |
||||
|
<%@ Import Namespace="CK.SCP.Models.Enums" %> |
||||
|
|
||||
|
<!DOCTYPE html> |
||||
|
|
||||
|
<html xmlns="http://www.w3.org/1999/xhtml"> |
||||
|
<head runat="server"> |
||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
||||
|
<title></title> |
||||
|
<style> |
||||
|
.totalpanel .x-panel-body { |
||||
|
border-top-width: 0 !important; |
||||
|
} |
||||
|
</style> |
||||
|
</head> |
||||
|
<body> |
||||
|
<form id="form1" runat="server"> |
||||
|
<f:PageManager runat="server" AutoSizePanelID="Panel1" /> |
||||
|
<f:Panel ID="Panel1" runat="server" Title="" Layout="VBox" BoxConfigAlign="Stretch" BoxConfigPosition="Start"> |
||||
|
<Items> |
||||
|
<f:Form runat="server"> |
||||
|
<Toolbars> |
||||
|
<f:Toolbar ID="Toolbar2" runat="server"> |
||||
|
<Items> |
||||
|
<f:Button ID="Button1" runat="server" EnablePostBack="True" Text="刷新" Icon="Reload" OnClientClick="location.reload();"> |
||||
|
</f:Button> |
||||
|
<f:Button ID="btnCreate" runat="server" EnablePostBack="True" Text="生成发票" OnClick="btnCreate_OnClick" Icon="Add" Hidden="true"> |
||||
|
</f:Button> |
||||
|
<f:Button ID="btnCreateAll" runat="server" EnablePostBack="True" Text="生成发票" Icon="Add" OnClick="btnCreateAll_Click" OnClientClick="if(!confirm('生成发票时请先处理退货数量,如发现收票时还有退货数量未处理,造成不能收票自行负责!'))return false;"> |
||||
|
</f:Button> |
||||
|
<f:Button ID="btn" runat="server" EnablePostBack="True" Text="补开发票" Icon="Add" Hidden="true"> |
||||
|
</f:Button> |
||||
|
<f:Button ID="Button2" runat="server" EnablePostBack="True" Text="导出" Icon="PageExcel" OnClick="btnOutput_OnClick"> |
||||
|
</f:Button> |
||||
|
<f:Button ID="btnCanIn" runat="server" EnablePostBack="True" Text="只看可开票零件" Icon="Zoom" OnClick="btnCanIn_Click" Hidden="true"> |
||||
|
</f:Button> |
||||
|
<f:Button ID="btnShow" runat="server" Text="查询面板" Icon="Zoom" OnClick="btnShow_Click"> |
||||
|
</f:Button> |
||||
|
<f:ToolbarFill runat="server" Hidden="true"/> |
||||
|
<f:TextBox ID="tb_RecvBillNum" runat="server" Label="单据号" Hidden="true"/> |
||||
|
<f:Button ID="btn_Search" runat="server" EnablePostBack="True" Text="快速查找" OnClick="btnSearch_Click" Hidden="true"></f:Button> |
||||
|
|
||||
|
<f:DropDownList ID="DDL_VEND_LIST" DataValueField="VendId" DataTextField="VendName" runat="server" Label="供应商编码" EnableEdit="true" EnableMultiSelect="false" Hidden="true"/> |
||||
|
<f:Button ID="BTN_INV" runat="server" EnablePostBack="True" Text="确认" OnClick="BTN_INV_Click" Hidden="true" Icon="Accept" ></f:Button> |
||||
|
</Items> |
||||
|
</f:Toolbar> |
||||
|
</Toolbars> |
||||
|
</f:Form> |
||||
|
|
||||
|
|
||||
|
|
||||
|
<f:GroupPanel runat="server" ID="gp1" Hidden="true" Layout="HBox" > |
||||
|
<Items> |
||||
|
<f:Form runat="server" > |
||||
|
<Rows> |
||||
|
<f:FormRow runat="server" ID="FormRow_1"> |
||||
|
<Items> |
||||
|
|
||||
|
<f:TextBox runat = "server" Label = "订单编号" EmptyText = "" ID = "TXT_BillNo" /> |
||||
|
<f:TextBox runat = "server" Label = "发货单号" EmptyText = "" ID = "TXT_ASNBill" /> |
||||
|
<f:TextBox runat = "server" Label = "供应商名称" EmptyText = "" ID = "TXT_VendName" /> |
||||
|
<f:TextBox runat = "server" Label = "供应商编号" EmptyText = "" ID = "TXT_VendId" /> |
||||
|
<f:DropDownList runat="server" ID="DDL_State" Label="单据类型" Hidden="true"> |
||||
|
<f:ListItem Text="-" Value=""/> |
||||
|
<f:ListItem Text="退货单" Value="退货单" /> |
||||
|
<f:ListItem Text="收货单" Value="收货单" /> |
||||
|
</f:DropDownList> |
||||
|
</Items> |
||||
|
</f:FormRow> |
||||
|
|
||||
|
<f:FormRow runat="server" ID="FormRow_2"> |
||||
|
<Items> |
||||
|
<f:TextBox runat = "server" Label = "项目编号" EmptyText = "" ID = "TXT_ProjectId" /> |
||||
|
<f:TextBox runat = "server" Label = "零件编号" EmptyText = "" ID = "TXT_PartCode" /> |
||||
|
<f:DatePicker runat="server" Required ="true" DateFormatString="yyyy-MM-dd" Label="收货日期" EmptyText="请选择日期" ID="DP_StartDate" /> |
||||
|
<f:DatePicker runat="server" Required ="true" DateFormatString="yyyy-MM-dd" EmptyText="请选择日期" Label="至" ID="Date_EndDate" /> |
||||
|
</Items> |
||||
|
</f:FormRow> |
||||
|
<f:FormRow runat="server" ID="FormRow_3"> |
||||
|
<Items> |
||||
|
<f:TextBox runat = "server" Label = "收(退)货单号" EmptyText = "" ID = "TXT_RECEIVE" /> |
||||
|
<f:Button runat="server" Text="关闭" ID="BtnClose" OnClick="BtnClose_Click"></f:Button> |
||||
|
<f:Button ID="BtnSearch" runat="server" OnClick="BtnSearch_Click" Text="快速查找"> |
||||
|
</f:Button> |
||||
|
</Items> |
||||
|
</f:FormRow> |
||||
|
</Rows> |
||||
|
</f:Form> |
||||
|
|
||||
|
</Items> |
||||
|
</f:GroupPanel> |
||||
|
<f:Form runat="server" Title=""> |
||||
|
<Items> |
||||
|
<f:FormRow runat="server" ColumnWidths="33% 33% 33%" ID="FormRow1"> |
||||
|
<Items> |
||||
|
<f:NumberBox ID="txtContractPrice1" runat="server" Label="折扣金额" Hidden="true" /> |
||||
|
<f:NumberBox ID="txtBlancePrice1" runat="server" Label="调整税额" MaxValue="1" Hidden="true" /> |
||||
|
<f:Label runat="server"></f:Label> |
||||
|
<f:Label runat="server"></f:Label> |
||||
|
</Items> |
||||
|
</f:FormRow> |
||||
|
<f:FormRow runat="server" ColumnWidths="33% 33% 33%" ID="FormRow2"> |
||||
|
<Items> |
||||
|
<f:DropDownList runat="server" Label="供应商税率" ID="lbTaxRate" AutoPostBack="true" > |
||||
|
<f:ListItem Text="0.16" Value="0.16" /> |
||||
|
<f:ListItem Text="0.13" Value="0.13" /> |
||||
|
<f:ListItem Text="0" Value="0" /> |
||||
|
</f:DropDownList> |
||||
|
<f:Button ID="btnTax" runat="server" Text="使用税率" OnClientClick="updateTotal();" Icon="Accept" ></f:Button> |
||||
|
<f:Label runat="server"></f:Label> |
||||
|
<f:Label runat="server"></f:Label> |
||||
|
</Items> |
||||
|
</f:FormRow> |
||||
|
</Items> |
||||
|
</f:Form> |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
<f:Grid ID="Grid_V_TB_RECEIVE_LIST" ShowBorder="true" ShowHeader="true" PageSize="100" BoxFlex="1" CssClass="maingrid" |
||||
|
runat="server" DataKeyNames="UID,ProjectId,RecvBillNum,PartCode,PoLine,Qty,Price" IsDatabasePaging="true" AllowPaging="True" SortField="RecvBillNum" |
||||
|
AutoScroll="True" OnPageIndexChange="Grid_V_TB_RECEIVE_LIST_PageIndexChange" EnableCheckBoxSelect = "true" OnRowDataBound="Grid_V_TB_RECEIVE_LIST_RowDataBound" > |
||||
|
<PageItems> |
||||
|
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server"> |
||||
|
</f:ToolbarSeparator> |
||||
|
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:"> |
||||
|
</f:ToolbarText> |
||||
|
<f:DropDownList ID="ddlGridPageSize" Width="80px" AutoPostBack="true" OnSelectedIndexChanged="ddlGridPageSize_OnSelectedIndexChanged" runat="server"> |
||||
|
<f:ListItem Text="100" Value="100" /> |
||||
|
<f:ListItem Text="200" Value="200" /> |
||||
|
<f:ListItem Text="500" Value="500" /> |
||||
|
<f:ListItem Text="1000" Value="1000" /> |
||||
|
</f:DropDownList> |
||||
|
</PageItems> |
||||
|
<Columns> |
||||
|
<%-- <f:RowNumberField runat="server" ID="chb" HeaderText="行号" />--%> |
||||
|
<%-- <f:TemplateField HeaderText="否可开票" Width="120px" ColumnID="IsCheck"> |
||||
|
<ItemTemplate> |
||||
|
<asp:Label runat="server" DataField="Qty" ID="Label1" Text='<%# Eval("IsCheck") %>'></asp:Label> |
||||
|
</ItemTemplate> |
||||
|
</f:TemplateField>--%> |
||||
|
|
||||
|
<f:BoundField runat="server" HeaderText="项目编码" DataField="ProjectId" width="80"/> |
||||
|
<f:BoundField runat="server" HeaderText="单据类型" ColumnID="BillType_DESC" DataField="BillType_DESC" width="80"/> |
||||
|
<f:BoundField runat="server" HeaderText="ERP单据号" ColumnID="ErpRecvBillNum" DataField="ErpRecvBillNum" width="80" /> |
||||
|
<f:BoundField runat="server" HeaderText="WMS单据号" ColumnID="RecvBillNum" DataField="RecvBillNum" width="80" /> |
||||
|
<f:BoundField runat="server" HeaderText="发货单号" ColumnID="AsnBillNum" DataField="AsnBillNum" width="80"/> |
||||
|
<f:BoundField runat="server" HeaderText="供应商" ColumnID="VendName" DataField="VendName" /> |
||||
|
<f:BoundField runat="server" HeaderText="供应商编码" DataField="VendId" width="80"/> |
||||
|
<f:BoundField runat="server" HeaderText="订单号" ColumnID="" DataField="PoBillNum" width="80"/> |
||||
|
<f:BoundField runat="server" HeaderText="订单行" ColumnID="" DataField="PoLine" width="50" /> |
||||
|
<f:BoundField runat="server" HeaderText="单价" ColumnID="" DataField="Price" width="80"/> |
||||
|
|
||||
|
<f:BoundField runat="server" HeaderText="采购价格" ColumnID="" DataField="PurPrice" width="80"/> |
||||
|
|
||||
|
<f:TemplateField HeaderText="可开票数量" ColumnID="Qty" width="100"> |
||||
|
<ItemTemplate> |
||||
|
<input type="hidden" class="price" runat="server" value='<%# Eval("Price") %>' /> |
||||
|
<input type="hidden" class="number" runat="server" value='<%# Eval("CanQty") %>' /> |
||||
|
<asp:Label runat="server" DataField="Qty" ID="Qty1" Text='<%# Eval("CanQty") %>'></asp:Label> |
||||
|
</ItemTemplate> |
||||
|
</f:TemplateField> |
||||
|
<f:BoundField runat="server" HeaderText="零件号" ColumnID="" DataField="PartCode" width="80"/> |
||||
|
<f:BoundField runat="server" HeaderText="零件名称" ColumnID="" DataField="PartDesc1" /> |
||||
|
<f:BoundField runat="server" HeaderText="单位" ColumnID="LocUnit" DataField="LocUnit" width="50"/> |
||||
|
<f:BoundField runat="server" HeaderText="币种" ColumnID="Currency" DataField="Currency" width="50"/> |
||||
|
|
||||
|
<f:BoundField runat="server" HeaderText="Erp收货单税率" ColumnID="Tax" DataField="Tax" width="50" Hidden="true"/> |
||||
|
|
||||
|
<f:BoundField runat="server" HeaderText="要货日期" ColumnID="BeginTime" DataField="BeginTime" Hidden="true"/> |
||||
|
<f:BoundField runat="server" HeaderText="收货时间" ColumnID="CreateTime" DataField="CreateTime" DataFormatString="{0:yyyy-MM-dd}" /> |
||||
|
<f:BoundField runat="server" HeaderText="备注" ColumnID="Remark" DataField="Remark" /> |
||||
|
</Columns> |
||||
|
</f:Grid> |
||||
|
<f:ContentPanel runat="server" CssClass="totalpanel" ShowBorder="true" ShowHeader="false" ColumnWidth="50%"> |
||||
|
<div style="margin-bottom: 10px; "> |
||||
|
<input type="hidden" id="TOTAL_PRICE" name="TOTAL_PRICE" /> |
||||
|
总计:<span id="totalPrice" style="color: red; font-size: 1.5em; font-weight: bold;" ></span> |
||||
|
<input type="hidden" id="TOTAL_PRICE1" name="TOTAL_PRICE1" /> |
||||
|
<input type="hidden" id="TOTAL_PRICE_TAX" name="TOTAL_PRICE_TAX" /> |
||||
|
税额:<span id="totalPriceTax" style="color: red; font-size: 1.5em; font-weight: bold;" ></span> |
||||
|
税后金额:<span id="totalPrice1" style="color: red; font-size: 1.5em; font-weight: bold;" ></span> |
||||
|
</div> |
||||
|
<%--<div style="margin-bottom: 10px;"> |
||||
|
</div> |
||||
|
<div style="margin-bottom: 10px;"> |
||||
|
</div>--%> |
||||
|
|
||||
|
|
||||
|
</f:ContentPanel> |
||||
|
</Items> |
||||
|
</f:Panel> |
||||
|
<f:Window runat="server" ID="Window1" Hidden="True" Height="600px" Width="1024px" AutoScroll="True" OnClose="Window1_Close" |
||||
|
WindowPosition="Center" IsModal="true" Title="明细详情" Target="Parent" EnableIFrame="true" |
||||
|
IFrameUrl="about:blank" /> |
||||
|
</form> |
||||
|
<script src="../../res/js/jquery.min.js"></script> |
||||
|
<script type="text/javascript"> |
||||
|
var gridClientID = '<%= Grid_V_TB_RECEIVE_LIST.ClientID %>'; |
||||
|
var taxRateClientID = '<%= lbTaxRate.ClientID %>'; |
||||
|
var priceSelector = '.f-grid-tpl input.price'; |
||||
|
var numberSelector = '.f-grid-tpl input.number'; |
||||
|
function getRowPrice(row) { |
||||
|
return parseFloat(row.find(priceSelector).val()); |
||||
|
} |
||||
|
function getRowNumber(row) { |
||||
|
var num = parseFloat(row.find(numberSelector).val(), 10); |
||||
|
return num; |
||||
|
} |
||||
|
function updateTotal() { |
||||
|
var grid = F(gridClientID); |
||||
|
var tax = F(taxRateClientID); |
||||
|
var selection = grid.getSelectionModel().getSelection(); |
||||
|
var store = grid.getStore(); |
||||
|
var total = 0; |
||||
|
$.each(selection, function (index, item) { |
||||
|
var rowIndex = store.indexOf(item); |
||||
|
var row = $(grid.body.el.dom).find('.x-grid-item').eq(rowIndex); |
||||
|
total += getRowNumber(row) * getRowPrice(row); |
||||
|
}); |
||||
|
$('#totalPrice').text( total.toFixed(4)); |
||||
|
$('#TOTAL_PRICE').val(total.toFixed(4)); |
||||
|
var _tax = total.toFixed(4) * parseFloat(tax.value); |
||||
|
var _totalPrice1 =parseFloat(total) + parseFloat(_tax); |
||||
|
$('#totalPriceTax').text( _tax.toFixed(4)); |
||||
|
$('#TOTAL_PRICE_TAX').val(_tax.toFixed(4)); |
||||
|
$('#totalPrice1').text( _totalPrice1.toFixed(4)); |
||||
|
$('#TOTAL_PRICE1').val(_totalPrice1); |
||||
|
|
||||
|
} |
||||
|
function registerSelectionChangeEvents() { |
||||
|
var grid = F(gridClientID); |
||||
|
|
||||
|
grid.on('selectionchange', function (cmp, selected) { |
||||
|
updateTotal(); |
||||
|
}); |
||||
|
} |
||||
|
// 页面第一次加载完成后调用的函数 |
||||
|
F.ready(function () { |
||||
|
registerSelectionChangeEvents(); |
||||
|
updateTotal(); |
||||
|
}); |
||||
|
|
||||
|
</script> |
||||
|
</body> |
||||
|
</html> |
@ -0,0 +1,512 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
|
using System.Linq.Expressions; |
||||
|
using System.Web; |
||||
|
using System.Web.Security; |
||||
|
using System.Web.UI; |
||||
|
using System.Web.UI.WebControls; |
||||
|
using CK.SCP.Models.AppBoxEntity; |
||||
|
using CK.SCP.Models.ScpEntity; |
||||
|
using CK.SCP.Controller; |
||||
|
using FineUI; |
||||
|
using SCP.Code; |
||||
|
using System.Drawing; |
||||
|
using CK.SCP.Models.Enums; |
||||
|
|
||||
|
namespace SCP.SupplierData.SupplierFinance |
||||
|
{ |
||||
|
|
||||
|
public partial class ReceiveList : PageBase |
||||
|
{ |
||||
|
protected void Page_Load(object sender, EventArgs e) |
||||
|
{ |
||||
|
IsRoleRight(); |
||||
|
|
||||
|
if (!IsPostBack) |
||||
|
{ |
||||
|
TranslatorAgents(Toolbar2); |
||||
|
TranslatorAgent(Grid_V_TB_RECEIVE_LIST); |
||||
|
TranslatorAgents(FormRow_1); |
||||
|
TranslatorAgents(FormRow_2); |
||||
|
TranslatorAgents(FormRow_3); |
||||
|
LoadData(); |
||||
|
SetRoleRule(); |
||||
|
BindVender(DDL_VEND_LIST); |
||||
|
} |
||||
|
} |
||||
|
public void IsRoleRight() |
||||
|
{ |
||||
|
|
||||
|
//if (!CurrentUser.RoleList.Contains("供应商"))
|
||||
|
//{
|
||||
|
// Alert.Show("当前用户角色不能操作该模块!");
|
||||
|
// return;
|
||||
|
//}
|
||||
|
//else
|
||||
|
//{
|
||||
|
|
||||
|
//}
|
||||
|
//if (CurrentUser.VenderList == null || CurrentUser.VenderList.Count == 0)
|
||||
|
//{
|
||||
|
// Alert.Show("当前用户未选择地点!");
|
||||
|
// return;
|
||||
|
//}
|
||||
|
} |
||||
|
private void SetRoleRule() |
||||
|
{ |
||||
|
if (CurrentUser.RoleList.Contains("采购人员")) |
||||
|
{ |
||||
|
DDL_VEND_LIST.Hidden = false; |
||||
|
BTN_INV.Hidden = false; |
||||
|
if( CurrentUser.FactoryList!=null && CurrentUser.FactoryList.Count>0) |
||||
|
{ |
||||
|
var _site= CurrentUser.FactoryList.FirstOrDefault(); |
||||
|
if(_site=="CNS") |
||||
|
{ |
||||
|
txtContractPrice1.Enabled = false; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
public void LoadData() |
||||
|
{ |
||||
|
// 每页记录数
|
||||
|
//Grid_V_TB_RECEIVE_LIST.PageSize = ConfigHelper.PageSize;
|
||||
|
//ddlGridPageSize.SelectedValue = ConfigHelper.PageSize.ToString();
|
||||
|
//BindData();
|
||||
|
} |
||||
|
private void SearchData(Action<IQueryable<V_TB_RECEIVE_LIST>> p_action) |
||||
|
{ |
||||
|
V_TB_RECEIVE_LIST _ls = new V_TB_RECEIVE_LIST(); |
||||
|
_ls.PoBillNum = TXT_BillNo.Text; |
||||
|
_ls.VendName = TXT_VendName.Text; |
||||
|
|
||||
|
_ls.AsnBillNum = TXT_ASNBill.Text; |
||||
|
_ls.PartCode = TXT_PartCode.Text; |
||||
|
_ls.VendId = TXT_VendId.Text; |
||||
|
_ls.ProjectId = TXT_ProjectId.Text; |
||||
|
if (DP_StartDate.SelectedDate != null) |
||||
|
{ |
||||
|
_ls.BeginTime = DP_StartDate.SelectedDate; |
||||
|
} |
||||
|
if (Date_EndDate.SelectedDate != null) |
||||
|
{ |
||||
|
_ls.ShipTime = Date_EndDate.SelectedDate; |
||||
|
} |
||||
|
if (!string.IsNullOrEmpty(DDL_State.SelectedValue)) |
||||
|
{ |
||||
|
_ls.BillType_DESC = DDL_State.SelectedValue; |
||||
|
} |
||||
|
if (CurrentUser.FactoryList != null && CurrentUser.FactoryList.Count > 0) |
||||
|
{ |
||||
|
_ls.Site = CurrentUser.FactoryList[0]; |
||||
|
} |
||||
|
_ls.State = 1; |
||||
|
if (CurrentUser.RoleList.Contains("采购人员")) |
||||
|
{ |
||||
|
if (string.IsNullOrEmpty(DDL_VEND_LIST.SelectedValue)) |
||||
|
{ |
||||
|
Alert.Show("请在工具栏里选择要开票的供应商,并点击确认!"); |
||||
|
return; |
||||
|
} |
||||
|
var _venderId = DDL_VEND_LIST.SelectedValue; |
||||
|
_ls.VendId = DDL_VEND_LIST.SelectedValue; |
||||
|
if (!string.IsNullOrEmpty(_ls.Site) && !string.IsNullOrEmpty(_venderId)) |
||||
|
{ |
||||
|
var _vender = SCP_TB_VENDER_CONTROLLER.GetVender(_venderId, _ls.Site); |
||||
|
if (_vender.Tax != null) |
||||
|
{ |
||||
|
lbTaxRate.SelectedValue = _vender.Tax.ToString(); |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
lbTaxRate.SelectedValue = "0"; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
if (CurrentUser.VenderList != null && CurrentUser.VenderList.Count > 0) |
||||
|
{ |
||||
|
var _venderId = CurrentUser.VenderList.FirstOrDefault(); |
||||
|
_ls.VendId = _venderId; |
||||
|
if (!string.IsNullOrEmpty(_ls.Site) && !string.IsNullOrEmpty(_venderId)) |
||||
|
{ |
||||
|
var _vender = SCP_TB_VENDER_CONTROLLER.GetVender(_venderId, _ls.Site); |
||||
|
if (_vender.Tax != null) |
||||
|
{ |
||||
|
lbTaxRate.SelectedValue = _vender.Tax.ToString(); |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
lbTaxRate.SelectedValue = _vender.Tax.ToString(); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
if (string.IsNullOrEmpty(_ls.VendId)) |
||||
|
{ |
||||
|
return; |
||||
|
} |
||||
|
SCP_RECIVECE_CONTROLLER.Get_V_TB_RECEIVE_LIST_List(_ls, (ret) => |
||||
|
{ |
||||
|
if (ret.State == ReturnStatus.Succeed) |
||||
|
{ |
||||
|
p_action(ret.Result); |
||||
|
} |
||||
|
}); |
||||
|
} |
||||
|
public void BindData() |
||||
|
{ |
||||
|
SearchData(ret => |
||||
|
{ |
||||
|
if (CurrentUser.RoleList.Contains("采购人员")) |
||||
|
{ |
||||
|
Grid_V_TB_RECEIVE_LIST.RecordCount = ret.Count(); |
||||
|
ret = SortAndPage(ret, Grid_V_TB_RECEIVE_LIST,"DESC"); |
||||
|
|
||||
|
List<V_TB_RECEIVE_LIST> temp = ret.ToList(); |
||||
|
if (string.IsNullOrEmpty(DDL_VEND_LIST.SelectedValue)) |
||||
|
{ |
||||
|
Alert.Show("请在工具栏里选择要开票的供应商,并点击确认!"); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
Grid_V_TB_RECEIVE_LIST.DataSource = temp; |
||||
|
Grid_V_TB_RECEIVE_LIST.DataBind(); |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
|
||||
|
Grid_V_TB_RECEIVE_LIST.RecordCount = ret.Count(); |
||||
|
ret = SortAndPage(ret, Grid_V_TB_RECEIVE_LIST,"DESC"); |
||||
|
List<V_TB_RECEIVE_LIST> temp = ret.ToList(); |
||||
|
|
||||
|
Grid_V_TB_RECEIVE_LIST.DataSource = temp; |
||||
|
Grid_V_TB_RECEIVE_LIST.DataBind(); |
||||
|
} |
||||
|
}); |
||||
|
// 排列和数据库分页
|
||||
|
} |
||||
|
protected void Grid1_OnPageIndexChange(object sender, GridPageEventArgs e) |
||||
|
{ |
||||
|
Grid_V_TB_RECEIVE_LIST.PageIndex = e.NewPageIndex; |
||||
|
BindData(); |
||||
|
} |
||||
|
|
||||
|
protected void ddlGridPageSize_OnSelectedIndexChanged(object sender, EventArgs e) |
||||
|
{ |
||||
|
Grid_V_TB_RECEIVE_LIST.PageSize = Convert.ToInt32(ddlGridPageSize.SelectedValue); |
||||
|
BindData(); |
||||
|
} |
||||
|
//生成发票
|
||||
|
protected void btnCreate_OnClick(object sender, EventArgs e) |
||||
|
{ |
||||
|
CreateInvoice("0"); |
||||
|
} |
||||
|
private void CreateInvoice(string p_all) |
||||
|
{ |
||||
|
try |
||||
|
{ |
||||
|
|
||||
|
string vender = string.Empty; |
||||
|
if (CurrentUser.RoleList.Contains("采购人员")) |
||||
|
{ |
||||
|
if (string.IsNullOrEmpty(DDL_VEND_LIST.SelectedValue)) |
||||
|
{ |
||||
|
Alert.Show("请在工具栏里选择要开票的供应商,并点击确认!"); |
||||
|
return; |
||||
|
} |
||||
|
vender = DDL_VEND_LIST.SelectedValue; |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
vender = CurrentUser.VenderList[0]; |
||||
|
} |
||||
|
|
||||
|
TM_HYANTOLIN_REVIEW _entity = new TM_HYANTOLIN_REVIEW(); |
||||
|
_entity.UltimateName = vender; |
||||
|
_entity.State = 0; |
||||
|
var _state = 0; |
||||
|
SCP_QUALITY_CONTROLLER.Get_TM_HYANTOLIN_REVIEW_List(_entity, (rs) => |
||||
|
{ |
||||
|
if (rs.State == ReturnStatus.Succeed) |
||||
|
{ |
||||
|
var _ls = rs.Result.ToList(); |
||||
|
if (_ls != null && _ls.Count > 0) |
||||
|
{ |
||||
|
var _sum = _ls.Sum(p => p.ClaimAmount); |
||||
|
var _ary = _ls.Select(p => p.ReviewBillNum).ToList(); |
||||
|
_state = 1; |
||||
|
if (_sum == 0) |
||||
|
{ |
||||
|
_state = 0; |
||||
|
} |
||||
|
if (_sum > 0) |
||||
|
{ |
||||
|
Alert.Show(string.Format("索赔金额合计{0}供应商存在未处理索赔单{1}!", _sum.ToString(), string.Join(",", _ary.ToArray())), "索赔管理查看"); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
}); |
||||
|
if (_state == 1) |
||||
|
{ |
||||
|
return; |
||||
|
} |
||||
|
var _tax = lbTaxRate.SelectedValue; |
||||
|
var _cj = string.IsNullOrEmpty(txtContractPrice1.Text) ? "0" : txtContractPrice1.Text; |
||||
|
var _tz = string.IsNullOrEmpty(txtBlancePrice1.Text) ? "0" : txtBlancePrice1.Text; |
||||
|
|
||||
|
string IsCreate = "0"; |
||||
|
|
||||
|
if (Grid_V_TB_RECEIVE_LIST.SelectedRowIndexArray.Length == 0) |
||||
|
{ |
||||
|
Alert.Show("请选择要创建发票的记录!"); |
||||
|
return; |
||||
|
} |
||||
|
string IDS = ""; |
||||
|
List<string> _list = new List<string>(); |
||||
|
List<string> _projectList = new List<string>(); |
||||
|
List<string> _rejList = new List<string>(); |
||||
|
string _projectId = string.Empty; |
||||
|
List<string> _recList = new List<string>(); |
||||
|
List<int> IdList = new List<int>(); |
||||
|
decimal _total = 0; |
||||
|
|
||||
|
for (int i = 0; i < Grid_V_TB_RECEIVE_LIST.SelectedRowIndexArray.Length; i++) |
||||
|
{ |
||||
|
int rowIndex = Grid_V_TB_RECEIVE_LIST.SelectedRowIndexArray[i]; |
||||
|
int ID = Convert.ToInt32(Grid_V_TB_RECEIVE_LIST.DataKeys[rowIndex][0]); |
||||
|
|
||||
|
decimal _qty = decimal.Parse(Grid_V_TB_RECEIVE_LIST.DataKeys[rowIndex][5].ToString()); |
||||
|
|
||||
|
decimal _price = decimal.Parse(Grid_V_TB_RECEIVE_LIST.DataKeys[rowIndex][6].ToString()); |
||||
|
|
||||
|
_total += (_qty * _price); |
||||
|
IDS += ID + ","; |
||||
|
_projectId = Grid_V_TB_RECEIVE_LIST.DataKeys[rowIndex][1].ToString(); |
||||
|
_projectList.Add(_projectId); |
||||
|
var _recbill = Grid_V_TB_RECEIVE_LIST.DataKeys[rowIndex][2].ToString(); |
||||
|
if (!string.IsNullOrEmpty(_recbill) && _recbill.IndexOf("R.") > 0) |
||||
|
{ |
||||
|
_rejList.Add(_projectId); |
||||
|
} |
||||
|
IdList.Add(ID); |
||||
|
|
||||
|
|
||||
|
} |
||||
|
if (_total < 0) |
||||
|
{ |
||||
|
Alert.Show("不允许开负数发票!退货、索赔零件数量有问题,请联系工厂库房和质量解决!"); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
if (IdList.Count > 200) |
||||
|
{ |
||||
|
Alert.Show("选择零件记录超过,发票允许条数!"); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
if (_list.Distinct().Count() > 1) |
||||
|
{ |
||||
|
Alert.Show("请选择的记录不是同一个供应商,请选择供应商!"); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
if (IDS != "") IDS = IDS.Substring(0, IDS.Length - 1); |
||||
|
|
||||
|
if (CurrentUser.FactoryList.FirstOrDefault() != "BJCIAI") |
||||
|
{ |
||||
|
var _ls = GetIsAllChecked(vender, IDS); |
||||
|
if (_ls.Count > 0) |
||||
|
{ |
||||
|
Alert.Show(string.Format("退货或索赔单{0}未开票!", string.Join(",", _ls.ToArray()))); |
||||
|
return; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
|
||||
|
InvoiceCreateQueryParm parm = new InvoiceCreateQueryParm(); |
||||
|
parm.ReceiveID = IDS; |
||||
|
parm.VendId = vender; |
||||
|
parm.Modify = IsCreate; |
||||
|
parm.IsAll = p_all; |
||||
|
parm.Tax = _tax; |
||||
|
parm.CJ = _cj; |
||||
|
parm.TZ = _tz; |
||||
|
|
||||
|
Session["InvoiceCreateQueryParm"] = parm; |
||||
|
string ret = Window1.GetShowReference("../../Views/SupplierData/SCP_INVOICE_CREATE.aspx", "生成发票"); |
||||
|
PageContext.RegisterStartupScript(ret); |
||||
|
} |
||||
|
catch (Exception ex) |
||||
|
{ |
||||
|
Alert.Show(ex.Message); |
||||
|
} |
||||
|
} |
||||
|
private List<string> GetIsAllChecked(string p_VendId,string p_VendIds) |
||||
|
{ |
||||
|
|
||||
|
List<string> unSelected = new List<string>(); |
||||
|
|
||||
|
var _ls = SCPDB.V_TB_RECEIVE_LIST.Where(p => p.VendId == p_VendId && p.State == 1 && (p.BillType_DESC == "索赔单" || p.BillType_DESC == "退货单")).Select(p => new { p.UID, p.RecvBillNum }).ToList(); |
||||
|
|
||||
|
//SCP_RECIVECE_CONTROLLER.Get_V_TB_RECEIVE_LIST_List(_ent, (ret) =>
|
||||
|
//{
|
||||
|
// if (ret.State == ReturnStatus.Succeed)
|
||||
|
// {
|
||||
|
var _lsCompare = p_VendIds.Split(new char[] { ',' }); |
||||
|
// var _ls = ret.Result.Select(p => new { p.UID, p.RecvBillNum }).ToList();
|
||||
|
foreach (var itm in _ls) |
||||
|
{ |
||||
|
if (!_lsCompare.Contains(itm.UID.ToString())) |
||||
|
{ |
||||
|
unSelected.Add(itm.RecvBillNum); |
||||
|
} |
||||
|
} |
||||
|
// }
|
||||
|
//});
|
||||
|
return unSelected.Distinct().ToList(); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
protected void Grid_V_TB_RECEIVE_LIST_PageIndexChange(object sender, GridPageEventArgs e) |
||||
|
{ |
||||
|
BindData(); |
||||
|
} |
||||
|
|
||||
|
//导出
|
||||
|
protected void btnOutput_OnClick(object sender, EventArgs e) |
||||
|
{ |
||||
|
V_TB_RECEIVE_LIST _ls = new V_TB_RECEIVE_LIST(); |
||||
|
_ls.PoBillNum = TXT_BillNo.Text; |
||||
|
_ls.VendName = TXT_VendName.Text; |
||||
|
_ls.UserInVendIds = CurrentUser.VenderList; |
||||
|
_ls.AsnBillNum = TXT_ASNBill.Text; |
||||
|
_ls.PartCode = TXT_PartCode.Text; |
||||
|
_ls.VendId = TXT_VendId.Text; |
||||
|
_ls.ProjectId = TXT_ProjectId.Text; |
||||
|
_ls.RecvBillNum = TXT_RECEIVE.Text; |
||||
|
if (DP_StartDate.SelectedDate != null) |
||||
|
{ |
||||
|
_ls.BeginTime = DP_StartDate.SelectedDate; |
||||
|
} |
||||
|
if (Date_EndDate.SelectedDate != null) |
||||
|
{ |
||||
|
_ls.ShipTime = Date_EndDate.SelectedDate; |
||||
|
} |
||||
|
if (!string.IsNullOrEmpty(DDL_State.SelectedValue)) |
||||
|
{ |
||||
|
_ls.BillType_DESC = DDL_State.SelectedValue; |
||||
|
} |
||||
|
if (CurrentUser.FactoryList != null && CurrentUser.FactoryList.Count > 0) |
||||
|
{ |
||||
|
_ls.Site = CurrentUser.FactoryList[0]; |
||||
|
} |
||||
|
_ls.State = 1; |
||||
|
if (CurrentUser.VenderList != null && CurrentUser.VenderList.Count > 0) |
||||
|
{ |
||||
|
var _venderId = CurrentUser.VenderList.FirstOrDefault(); |
||||
|
if (!string.IsNullOrEmpty(_ls.Site) && !string.IsNullOrEmpty(_venderId)) |
||||
|
{ |
||||
|
var _vender = SCP_TB_VENDER_CONTROLLER.GetVender(_venderId, _ls.Site); |
||||
|
if (_vender.Tax != null) |
||||
|
{ |
||||
|
lbTaxRate.SelectedValue = _vender.Tax.ToString(); |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
lbTaxRate.Text = "0"; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
SCP_RECIVECE_CONTROLLER.Get_V_TB_RECEIVE_LIST_List(_ls, (ret) => |
||||
|
{ |
||||
|
if (ret.State == ReturnStatus.Succeed) |
||||
|
{ |
||||
|
var _lst = ret.Result.ToList(); |
||||
|
|
||||
|
Dictionary<string, string> cellheader = new Dictionary<string, string> |
||||
|
{ |
||||
|
{ "ProjectId", "项目编号" }, |
||||
|
{ "BillType_DESC", "单据类型" }, |
||||
|
{ "RecvBillNum", "单据编号" }, |
||||
|
{ "AsnBillNum", "发货单号" }, |
||||
|
{ "VendName", "供应商" }, |
||||
|
{ "VendId", "供应商编码" }, |
||||
|
{ "PoBillNum", "订单号" }, |
||||
|
{ "PoLine", "订单行" }, |
||||
|
{ "PartCode", "零件号" }, |
||||
|
{ "PartDesc1", "零件名称" }, |
||||
|
{ "LocUnit", "单位" }, |
||||
|
{ "Currency", "币种" }, |
||||
|
{ "CanQty", "可开票数量" }, |
||||
|
{ "Price", "单价" }, |
||||
|
{ "CreateTime", "创建时间" } |
||||
|
}; |
||||
|
string url = EntityListToExcel2003(cellheader,_lst , "审核明细"); |
||||
|
} |
||||
|
}); |
||||
|
} |
||||
|
//快速查找
|
||||
|
protected void btnSearch_Click(object sender, EventArgs e) |
||||
|
{ |
||||
|
|
||||
|
} |
||||
|
protected void btnShow_Click(object sender, EventArgs e) |
||||
|
{ |
||||
|
gp1.Hidden = false; |
||||
|
} |
||||
|
protected void BtnClose_Click(object sender, EventArgs e) |
||||
|
{ |
||||
|
gp1.Hidden = true; |
||||
|
} |
||||
|
protected void BtnSearch_Click(object sender, EventArgs e) |
||||
|
{ |
||||
|
BindData(); |
||||
|
} |
||||
|
|
||||
|
protected void Grid_V_TB_RECEIVE_LIST_RowDataBound(object sender, GridRowEventArgs e) |
||||
|
{ |
||||
|
System.Web.UI.WebControls.Label _label= (System.Web.UI.WebControls.Label)Grid_V_TB_RECEIVE_LIST.Rows[e.RowIndex].FindControl("Qty1"); |
||||
|
if (!string.IsNullOrEmpty(_label.Text)) |
||||
|
{ |
||||
|
if (decimal.Parse(_label.Text) < 0) |
||||
|
{ |
||||
|
_label.ForeColor = Color.Red; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
protected void btnCanIn_Click(object sender, EventArgs e) |
||||
|
{ |
||||
|
|
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
protected void BTN_INV_Click(object sender, EventArgs e) |
||||
|
{ |
||||
|
BindData(); |
||||
|
} |
||||
|
|
||||
|
protected void Window1_Close(object sender, WindowCloseEventArgs e) |
||||
|
{ |
||||
|
Session["InvoiceCreateQueryParm"] = null; |
||||
|
BindData(); |
||||
|
} |
||||
|
|
||||
|
protected void btnCreateAll_Click(object sender, EventArgs e) |
||||
|
{ |
||||
|
CreateInvoice("1"); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
} |
||||
|
} |
@ -0,0 +1,395 @@ |
|||||
|
//------------------------------------------------------------------------------
|
||||
|
// <自动生成>
|
||||
|
// 此代码由工具生成。
|
||||
|
//
|
||||
|
// 对此文件的更改可能导致不正确的行为,如果
|
||||
|
// 重新生成代码,则所做更改将丢失。
|
||||
|
// </自动生成>
|
||||
|
//------------------------------------------------------------------------------
|
||||
|
|
||||
|
namespace SCP.SupplierData.SupplierFinance |
||||
|
{ |
||||
|
|
||||
|
|
||||
|
public partial class ReceiveList |
||||
|
{ |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// form1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::System.Web.UI.HtmlControls.HtmlForm form1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Panel1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Panel Panel1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Toolbar2 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Toolbar Toolbar2; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Button1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Button Button1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// btnCreate 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Button btnCreate; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// btnCreateAll 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Button btnCreateAll; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// btn 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Button btn; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Button2 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Button Button2; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// btnCanIn 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Button btnCanIn; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// btnShow 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Button btnShow; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// tb_RecvBillNum 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox tb_RecvBillNum; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// btn_Search 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Button btn_Search; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// DDL_VEND_LIST 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.DropDownList DDL_VEND_LIST; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// BTN_INV 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Button BTN_INV; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// gp1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.GroupPanel gp1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// FormRow_1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.FormRow FormRow_1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TXT_BillNo 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox TXT_BillNo; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TXT_ASNBill 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox TXT_ASNBill; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TXT_VendName 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox TXT_VendName; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TXT_VendId 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox TXT_VendId; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// DDL_State 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.DropDownList DDL_State; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// FormRow_2 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.FormRow FormRow_2; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TXT_ProjectId 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox TXT_ProjectId; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TXT_PartCode 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox TXT_PartCode; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// DP_StartDate 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.DatePicker DP_StartDate; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Date_EndDate 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.DatePicker Date_EndDate; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// FormRow_3 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.FormRow FormRow_3; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TXT_RECEIVE 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox TXT_RECEIVE; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// BtnClose 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Button BtnClose; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// BtnSearch 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Button BtnSearch; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// FormRow1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.FormRow FormRow1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// txtContractPrice1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.NumberBox txtContractPrice1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// txtBlancePrice1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.NumberBox txtBlancePrice1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// FormRow2 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.FormRow FormRow2; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// lbTaxRate 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.DropDownList lbTaxRate; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// btnTax 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Button btnTax; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Grid_V_TB_RECEIVE_LIST 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Grid Grid_V_TB_RECEIVE_LIST; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// ToolbarSeparator1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.ToolbarSeparator ToolbarSeparator1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// ToolbarText1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.ToolbarText ToolbarText1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// ddlGridPageSize 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.DropDownList ddlGridPageSize; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Qty1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::System.Web.UI.WebControls.Label Qty1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Window1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Window Window1; |
||||
|
} |
||||
|
} |
@ -0,0 +1,154 @@ |
|||||
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SCP_ASK.aspx.cs" Inherits="SCP.Views.SupplierData.SupplierLogistics.SCP_ASK" %> |
||||
|
|
||||
|
<!DOCTYPE html> |
||||
|
|
||||
|
<html xmlns="http://www.w3.org/1999/xhtml"> |
||||
|
<head runat="server"> |
||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> |
||||
|
<title></title> |
||||
|
|
||||
|
|
||||
|
</head> |
||||
|
<body> |
||||
|
<form id="form1" runat="server"> |
||||
|
<f:PageManager runat="server" AutoSizePanelID="Panel1" /> |
||||
|
<f:Panel ID="Panel1" runat="server" Title="" Layout="VBox" BoxConfigAlign="Stretch" BoxConfigPosition="Start"> |
||||
|
<Items> |
||||
|
<f:Form runat="server"> |
||||
|
<Toolbars> |
||||
|
|
||||
|
<f:Toolbar ID="Toolbar2" runat="server"> |
||||
|
<Items> |
||||
|
<f:ToolbarSeparator runat="server" /> |
||||
|
<f:Button ID="button3" runat="server" EnablePostBack="false" Text="刷新" Icon="Reload" OnClientClick="location.reload();"> |
||||
|
</f:Button> |
||||
|
<f:ToolbarSeparator runat="server" /> |
||||
|
<f:Button ID="btnOutput" runat="server" Text="导出" Icon="PageExcel" OnClick="btnOutput_Click" > |
||||
|
</f:Button> |
||||
|
<f:Button ID="btnDetail" runat="server" Text="明细" Icon="Find" OnClick="btnDetail_Click"> |
||||
|
</f:Button> |
||||
|
<f:Button ID="btnAsn" runat="server" Text="生成发货单" Icon="Add" OnClick="btnAsn_Click"> |
||||
|
</f:Button> |
||||
|
<f:Button ID="btn" runat="server" Text="生成发货单(默认全发)" Icon="Add" OnClick="btn_Click" OnClientClick="if(!confirm('是否要将剩余零件,全部生成到发货单,请确认标包数量是否准确,发货数量必须与物料实际数量一致?'))return false;" > |
||||
|
</f:Button> |
||||
|
<f:Button ID="btnShow" runat="server" Text="查询面板" Icon="Zoom" OnClick="btnShow_Click"> |
||||
|
</f:Button> |
||||
|
<f:Button ID="Button6" runat="server" Text="全部" Icon="Reload" OnClick="Button6_Click" > |
||||
|
</f:Button> |
||||
|
<%-- <f:Button ID="Button1" runat="server" Text="新建" Icon="Reload" OnClick="Button1_Click" > |
||||
|
</f:Button>--%> |
||||
|
<f:Button ID="Button2" runat="server" Text="发布" Icon="Reload" OnClick="Button2_Click" > |
||||
|
</f:Button> |
||||
|
<f:Button ID="Button4" runat="server" Text="已确认" Icon="Reload" OnClick="Button4_Click" > |
||||
|
</f:Button> |
||||
|
<f:Button ID="Button5" runat="server" Text="已发货" Icon="Reload" OnClick="Button5_Click" > |
||||
|
</f:Button> |
||||
|
|
||||
|
<f:ToolbarSeparator runat="server" /> |
||||
|
|
||||
|
</Items> |
||||
|
</f:Toolbar> |
||||
|
</Toolbars> |
||||
|
</f:Form> |
||||
|
<f:GroupPanel runat="server" ID="gp1" Hidden="true" Layout="HBox" > |
||||
|
<Items> |
||||
|
<f:Form runat="server" > |
||||
|
<Rows> |
||||
|
<f:FormRow runat="server" ID="FormRow_1"> |
||||
|
<Items> |
||||
|
<f:TextBox runat = "server" Label = "订单编号" EmptyText = "" ID = "TXT_BillNo" /> |
||||
|
<f:DropDownList runat="server" ID="DropDownList1" Label="地点" DataTextField="FactoryName" DataValueField=" ErpDomain"> |
||||
|
</f:DropDownList> |
||||
|
<f:TextBox runat = "server" Label = "子网站" EmptyText = "" ID = "TXT_Extend1" Hidden="true" /> |
||||
|
<f:TextBox runat = "server" Label = "子网站" EmptyText = "" ID = "TXT_Extend2" Hidden="true" /> |
||||
|
<f:TextBox runat = "server" Label = "子网站" EmptyText = "" ID = "TXT_Extend3" Hidden="true" /> |
||||
|
<f:TextBox runat = "server" Label = "看板编号" EmptyText = "" ID = "TXT_AskBillNo" /> |
||||
|
<f:TextBox runat = "server" Label = "供应商编码" EmptyText = "" ID = "TXT_VendId" /> |
||||
|
<f:TextBox runat = "server" Label = "送货地点" EmptyText = "" ID = "TXT_Site_Desc" /> |
||||
|
</Items> |
||||
|
</f:FormRow> |
||||
|
|
||||
|
<f:FormRow runat="server" ID="FormRow_2"> |
||||
|
<Items> |
||||
|
<f:TextBox runat = "server" Label = "项目编码" EmptyText = "" ID = "TXT_ProjectId" /> |
||||
|
<f:DropDownList runat="server" ID="DDL_State" Label="状态"> |
||||
|
<f:ListItem Text="-" Value=""/> |
||||
|
<f:ListItem Text="新建" Value="0" /> |
||||
|
<f:ListItem Text="发布" Value="1" /> |
||||
|
<f:ListItem Text="已确认" Value="2" /> |
||||
|
<f:ListItem Text="已发货" Value="3" /> |
||||
|
<f:ListItem Text="已收货" Value="4" /> |
||||
|
|
||||
|
</f:DropDownList> |
||||
|
<f:DatePicker runat="server" Required ="true" DateFormatString="yyyy-MM-dd" Label="订货日期" EmptyText="请选择日期" ID="DP_StartDate" /> |
||||
|
<f:DatePicker runat="server" Required ="true" DateFormatString="yyyy-MM-dd" Label="至" ID="Date_EndDate" /> |
||||
|
</Items> |
||||
|
</f:FormRow> |
||||
|
<f:FormRow runat="server" ID="FormRow_3"> |
||||
|
<Items> |
||||
|
<f:Button runat="server" Text="关闭" ID="BtnClose" OnClick="BtnClose_Click"></f:Button> |
||||
|
<f:Button ID="BtnSearch" runat="server" OnClick="BtnSearch_Click" Text="快速查找"> |
||||
|
</f:Button> |
||||
|
</Items> |
||||
|
</f:FormRow> |
||||
|
</Rows> |
||||
|
</f:Form> |
||||
|
</Items> |
||||
|
</f:GroupPanel> |
||||
|
|
||||
|
<f:Grid ID = "Grid_V_TB_ASK" PageSize="50" EnableCollapse = "true" ShowBorder = "true" ShowHeader = "true" runat ="server" EnableCheckBoxSelect="true" |
||||
|
DataKeyNames = "UID,PoBillNum,AskBillNum,VendId,Site,Buyer,BuyerPhone,State,Remark,VendName,State_DESC,ModType_DESC,CreateTime,CreateUser,UpdateTime,UpdateUser,UpdateInfo,IsDeleted,GUID" |
||||
|
CssClass="maingrid" EnableRowDoubleClickEvent="True" OnSort="Grid_V_TB_ASK_Sort" SortField="CreateTime" |
||||
|
IsDatabasePaging="True" AllowPaging="True" OnRowDoubleClick="Grid_V_TB_ASK_RowDoubleClick" |
||||
|
AutoScroll="True" SortDirection="DESC" OnPageIndexChange="Grid_V_TB_ASK_PageIndexChange" OnRowDataBound="Grid_V_TB_ASK_RowDataBound" BoxFlex="1"> |
||||
|
<PageItems> |
||||
|
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server"> |
||||
|
</f:ToolbarSeparator> |
||||
|
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:"> |
||||
|
</f:ToolbarText> |
||||
|
<f:DropDownList ID="ddlGridPageSize" Width="80px" AutoPostBack="true" OnSelectedIndexChanged="ddlGridPageSize_SelectedIndexChanged" |
||||
|
runat="server"> |
||||
|
<f:ListItem Text="50" Value="50" /> |
||||
|
<f:ListItem Text="100" Value="100" /> |
||||
|
</f:DropDownList> |
||||
|
</PageItems> |
||||
|
<Columns> |
||||
|
|
||||
|
<f:TemplateField HeaderText="状态" Width="70px" ColumnID="State_DESC1"> |
||||
|
<ItemTemplate> |
||||
|
<asp:label ID="State_DESC" runat="server" Width="65px" Text='<%# Eval("State_DESC") %>' ></asp:label> |
||||
|
</ItemTemplate> |
||||
|
</f:TemplateField> |
||||
|
|
||||
|
|
||||
|
|
||||
|
<f:BoundField Width = "80px" DataField = "ModType_DESC" DataFormatString = "{0}" HeaderText = "单据类型" /> |
||||
|
<f:BoundField Width = "100px" DataField = "AskBillNum" DataFormatString = "{0}" HeaderText = "要货看板号" /> |
||||
|
<f:BoundField Width = "100px" DataField = "PoBillNum" DataFormatString = "{0}" HeaderText = "订单编号" /> |
||||
|
<f:BoundField Width = "100px" DataField = "ErpBillNum" DataFormatString = "{0}" HeaderText ="ERP订单号" /> |
||||
|
<f:BoundField Width = "100px" DataField = "VendName" DataFormatString = "{0}" HeaderText = "供应商" /> |
||||
|
<%--<f:BoundField Width = "100px" DataField = "Contacter" DataFormatString = "{0}" HeaderText = "发布人" />--%> |
||||
|
<f:BoundField Width = "100px" DataField = "BeginTime" DataFormatString = "{0:yyyy-MM-dd}" HeaderText = "开始日期" /> |
||||
|
<f:BoundField Width = "100px" DataField = "EndTime" DataFormatString = "{0:yyyy-MM-dd}" HeaderText = "交货日期" /> |
||||
|
<f:BoundField Width = "100px" DataField = "Site_Desc" DataFormatString = "{0}" HeaderText = "地点" /> |
||||
|
<f:BoundField Width = "100px" DataField = "Buyer" DataFormatString = "{0}" HeaderText = "收货人" /> |
||||
|
<f:BoundField Width = "100px" DataField = "BuyerPhone" DataFormatString = "{0}" HeaderText = "收货电话" /> |
||||
|
</Columns> |
||||
|
</f:Grid> |
||||
|
</Items> |
||||
|
</f:Panel> |
||||
|
<f:HiddenField ID="highlightRows" runat="server"> |
||||
|
</f:HiddenField> |
||||
|
<f:Window runat="server" ID="Window1" Hidden="True" AutoScroll="True" Width="1024px" Height="600px" CloseAction="HidePostBack" |
||||
|
WindowPosition="Center" IsModal="true" Title="明细详情" Target="Parent" EnableIFrame="true" OnClose="Window1_Close" |
||||
|
IFrameUrl="about:blank" /> |
||||
|
<f:Window ID="WindowUpload" runat="server" Hidden="True" OnClose="WindowUpload_Close" |
||||
|
WindowPosition="Center" IsModal="true" Title="Popup Window 1" Target="Parent" EnableIFrame="true" |
||||
|
IFrameUrl="about:blank" Height="200px" Width="400px"> |
||||
|
</f:Window> |
||||
|
</form> |
||||
|
|
||||
|
|
||||
|
|
||||
|
</body> |
||||
|
</html> |
@ -0,0 +1,351 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.ComponentModel; |
||||
|
using System.Data; |
||||
|
using System.Linq; |
||||
|
using System.Linq.Expressions; |
||||
|
using System.Web; |
||||
|
using System.Web.UI; |
||||
|
using System.Web.UI.WebControls; |
||||
|
using CK.SCP.Models; |
||||
|
using CK.SCP.Models.AppBoxEntity; |
||||
|
using CK.SCP.Models.Enums; |
||||
|
using CK.SCP.Models.ScpEntity; |
||||
|
using CK.SCP.Utils; |
||||
|
using CK.SCP.Common; |
||||
|
using CK.SCP.Controller; |
||||
|
using EntityFramework.Audit; |
||||
|
using FineUI; |
||||
|
using Microsoft.Diagnostics.Instrumentation.Extensions.Intercept; |
||||
|
using SCP.Code; |
||||
|
using EntitiesHelper = CK.SCP.Controller.EntitiesHelper; |
||||
|
using System.IO; |
||||
|
using CK.SCP.Models.ScpEntity.ExcelImportEntity; |
||||
|
using System.Drawing; |
||||
|
|
||||
|
namespace SCP.Views.SupplierData.SupplierLogistics |
||||
|
{ |
||||
|
public partial class SCP_ASK : PageBase |
||||
|
{ |
||||
|
protected void Page_Load(object sender, EventArgs e) |
||||
|
{ |
||||
|
if (!IsPostBack) |
||||
|
{ |
||||
|
BindAsk(); |
||||
|
CheckRolesMenu(); |
||||
|
TranslatorAgents(FormRow_1); |
||||
|
TranslatorAgents(FormRow_2); |
||||
|
TranslatorAgents(FormRow_3); |
||||
|
TranslatorAgent(Grid_V_TB_ASK); |
||||
|
TranslatorAgents(Toolbar2); |
||||
|
} |
||||
|
} |
||||
|
//public void LoadData()
|
||||
|
//{
|
||||
|
// BindAsk();
|
||||
|
//}
|
||||
|
public void BindAsk() |
||||
|
{ |
||||
|
SearchV_TB_ASKData((result) => { |
||||
|
Grid_V_TB_ASK.RecordCount = result.Count(); |
||||
|
var list = SortAndPage<V_TB_ASK>(result, Grid_V_TB_ASK); |
||||
|
var ls=SCP_ASK_CONTROLLER.GET_IS_COMPLETED_SEND(list.ToList()); |
||||
|
|
||||
|
Grid_V_TB_ASK.DataSource = ls; |
||||
|
Grid_V_TB_ASK.DataBind(); |
||||
|
|
||||
|
}); |
||||
|
|
||||
|
} |
||||
|
private void CheckRolesMenu() |
||||
|
{ |
||||
|
if (CurrentUser.RoleList.Contains("采购人员")) |
||||
|
{ |
||||
|
btnOutput.Hidden = false; |
||||
|
btnDetail.Hidden = false; |
||||
|
this.BtnSearch.Hidden = false; |
||||
|
//this.btnEdit.Hidden = true;
|
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
foreach (var itm in Grid_V_TB_ASK.Columns) |
||||
|
{ |
||||
|
if (itm.HeaderText == "要货数量") |
||||
|
{ |
||||
|
itm.Enabled = false; |
||||
|
} |
||||
|
} |
||||
|
btnOutput.Hidden = false; |
||||
|
btnDetail.Hidden = true; |
||||
|
this.BtnSearch.Hidden = true; |
||||
|
this.btnShow.Hidden = true; |
||||
|
} |
||||
|
} |
||||
|
public void SearchV_TB_ASKData(Action<IQueryable<V_TB_ASK>> p_action) |
||||
|
{ |
||||
|
var ls = SCPDB.TB_FACTORY.Where(p => p.ErpDomain == CurrentUser.UsedDomain).ToList(); |
||||
|
DropDownList1.DataSource = ls; |
||||
|
DropDownList1.DataBind(); |
||||
|
V_TB_ASK _entity = new V_TB_ASK(); |
||||
|
_entity.IsDeleted = false; |
||||
|
_entity.PoBillNum = TXT_BillNo.Text; |
||||
|
_entity.VendId = TXT_VendId.Text; |
||||
|
_entity.State_DESC = TXT_Site_Desc.Text; |
||||
|
_entity.AskBillNum = TXT_AskBillNo.Text; |
||||
|
_entity.ErpBillNum = TXT_ProjectId.Text; |
||||
|
_entity.SubSite = DropDownList1.SelectedValue; |
||||
|
_entity.Extend1 = TXT_Extend1.Text; |
||||
|
_entity.Extend2 = TXT_Extend2.Text; |
||||
|
_entity.Extend3 = TXT_Extend3.Text; |
||||
|
if (DP_StartDate.SelectedDate != null) |
||||
|
{ |
||||
|
_entity.BeginTime = DP_StartDate.SelectedDate; |
||||
|
} |
||||
|
if (DP_StartDate.SelectedDate != null) |
||||
|
{ |
||||
|
_entity.EndTime = DP_StartDate.SelectedDate; |
||||
|
} |
||||
|
if (!string.IsNullOrEmpty(DDL_State.SelectedValue)) |
||||
|
{ |
||||
|
_entity.BillStateList = new List<int>() { int.Parse(DDL_State.SelectedValue) }; |
||||
|
} |
||||
|
_entity.UserInAddress = CurrentUser.FactoryList; |
||||
|
|
||||
|
if (CurrentUser.RoleList.Contains("供应商")) |
||||
|
{ |
||||
|
if (CurrentUser.VenderList == null && CurrentUser.VenderList.Count == 0) |
||||
|
{ |
||||
|
CurrentUser.VenderList = new List<string>() { "00000000000" }; |
||||
|
} |
||||
|
_entity.UserInVendIds = CurrentUser.VenderList; |
||||
|
} |
||||
|
//if (CurrentUser.RoleList.Contains("供应商"))
|
||||
|
//{
|
||||
|
// _entity.BillStateList = new List<int> { (int)AskState.Confirm, (int)AskState.Release, (int)AskState.Ship, (int)AskState.Receive };
|
||||
|
//}
|
||||
|
|
||||
|
SCP_ASK_CONTROLLER.Get_V_TB_ASK_List(_entity, (_ret) => { |
||||
|
if (_ret.State == ReturnStatus.Succeed) |
||||
|
{ |
||||
|
p_action(_ret.Result); |
||||
|
} |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
protected void Grid_V_TB_ASK_RowDoubleClick(object sender, FineUI.GridRowClickEventArgs e) |
||||
|
{ |
||||
|
object[] rowDataKeys = Grid_V_TB_ASK.DataKeys[e.RowIndex]; |
||||
|
string AskBillNum = rowDataKeys[2] as string; |
||||
|
PageContext.RegisterStartupScript(Window1.GetShowReference(string.Format("../SupplierData/SCP_ASK_DETAIL.aspx?AskBillNum={0}", AskBillNum))); |
||||
|
} |
||||
|
|
||||
|
protected void Grid_V_TB_ASK_Sort(object sender, GridSortEventArgs e) |
||||
|
{ |
||||
|
|
||||
|
} |
||||
|
|
||||
|
|
||||
|
protected void Grid_V_TB_ASK_PageIndexChange(object sender, GridPageEventArgs e) |
||||
|
{ |
||||
|
BindAsk(); |
||||
|
} |
||||
|
|
||||
|
protected void btnOutput_Click(object sender, EventArgs e) |
||||
|
{ |
||||
|
if (Grid_V_TB_ASK.SelectedRowIndexArray.Count() == 0) |
||||
|
{ |
||||
|
PageContext.RegisterStartupScript(Alert.GetShowInTopReference("没有选择数据!")); |
||||
|
return; |
||||
|
} |
||||
|
List<string> _ls = new List<string>(); |
||||
|
for (int i = 0, count = Grid_V_TB_ASK.Rows.Count; i < count; i++) |
||||
|
{ |
||||
|
if (Grid_V_TB_ASK.SelectedRowIndexArray.Contains(i)) |
||||
|
{ |
||||
|
object[] rowDataKeys = Grid_V_TB_ASK.DataKeys[i]; |
||||
|
_ls.Add(rowDataKeys[2] as string); |
||||
|
} |
||||
|
} |
||||
|
DataSet ds = SCP_EXCEL_CONTROLLER.GET_ASK_EXECEL(_ls); |
||||
|
PageBase.DataSetToExcel(ds, "要货看板"); |
||||
|
} |
||||
|
|
||||
|
protected void btnDetail_Click(object sender, EventArgs e) |
||||
|
{ |
||||
|
if (Grid_V_TB_ASK.SelectedRowIndexArray.Count() == 0) |
||||
|
{ |
||||
|
PageContext.RegisterStartupScript(Alert.GetShowInTopReference("没有选择数据!")); |
||||
|
return; |
||||
|
} |
||||
|
object[] rowDataKeys = Grid_V_TB_ASK.DataKeys[Grid_V_TB_ASK.SelectedRowIndex]; |
||||
|
|
||||
|
string AskBillNum = rowDataKeys[2] as string; |
||||
|
|
||||
|
PageContext.RegisterStartupScript(Window1.GetShowReference(string.Format("../SupplierData/SCP_ASK_DETAIL.aspx?AskBillNum={0}", AskBillNum))); |
||||
|
} |
||||
|
|
||||
|
protected void BtnPublish_Click(object sender, EventArgs e) |
||||
|
{ |
||||
|
int[] _selections = Grid_V_TB_ASK.SelectedRowIndexArray; |
||||
|
List<string> _AskList = new List<string>(); |
||||
|
for (int i = 0, count = Grid_V_TB_ASK.Rows.Count; i < count; i++) |
||||
|
{ |
||||
|
if (_selections.Contains(i)) |
||||
|
{ |
||||
|
object[] rowDataKeys = Grid_V_TB_ASK.DataKeys[i]; |
||||
|
if (!string.IsNullOrEmpty(rowDataKeys[2].ToString())) |
||||
|
{ |
||||
|
_AskList.Add(rowDataKeys[2].ToString()); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
var ret = SCP_ASK_CONTROLLER.Save_TB_ASK_STATE(_AskList, AskState.Release); |
||||
|
if (ret.State == ReturnStatus.Succeed) |
||||
|
{ |
||||
|
BindAsk(); |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
Alert.Show(ret.Message); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
protected void BtnCanclePublish_Click(object sender, EventArgs e) |
||||
|
{ |
||||
|
int[] _selections = Grid_V_TB_ASK.SelectedRowIndexArray; |
||||
|
List<string> _AskList = new List<string>(); |
||||
|
for (int i = 0, count = Grid_V_TB_ASK.Rows.Count; i < count; i++) |
||||
|
{ |
||||
|
if (_selections.Contains(i)) |
||||
|
{ |
||||
|
object[] rowDataKeys = Grid_V_TB_ASK.DataKeys[i]; |
||||
|
if (!string.IsNullOrEmpty(rowDataKeys[2].ToString())) |
||||
|
{ |
||||
|
_AskList.Add(rowDataKeys[2].ToString()); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
var ret = SCP_ASK_CONTROLLER.Save_TB_ASK_STATE(_AskList, AskState.Confirm); |
||||
|
if (ret.State == ReturnStatus.Succeed) |
||||
|
{ |
||||
|
BindAsk(); |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
Alert.Show(ret.Message); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
protected void btnShow_Click(object sender, EventArgs e) |
||||
|
{ |
||||
|
gp1.Hidden = false; |
||||
|
} |
||||
|
protected void BtnClose_Click(object sender, EventArgs e) |
||||
|
{ |
||||
|
gp1.Hidden = true; |
||||
|
} |
||||
|
protected void BtnSearch_Click(object sender, EventArgs e) |
||||
|
{ |
||||
|
BindAsk(); |
||||
|
} |
||||
|
protected void btnAsn_Click(object sender, EventArgs e) |
||||
|
{ |
||||
|
|
||||
|
if (Grid_V_TB_ASK.SelectedRowIndexArray.Count() == 0) |
||||
|
{ |
||||
|
PageContext.RegisterStartupScript(Alert.GetShowInTopReference("没有选择数据!")); |
||||
|
return; |
||||
|
} |
||||
|
object[] rowDataKeys = Grid_V_TB_ASK.DataKeys[Grid_V_TB_ASK.SelectedRowIndex]; |
||||
|
if (rowDataKeys.Count() > 0) |
||||
|
{ |
||||
|
if (ConvertHelper.To<Int32>(rowDataKeys[7]) == (int)AskState.New || ConvertHelper.To<Int32>(rowDataKeys[7]) == (int)AskState.Release) |
||||
|
{ |
||||
|
PageContext.RegisterStartupScript(Alert.GetShowInTopReference("选择记录不是供应商确认单据")); |
||||
|
return; |
||||
|
} |
||||
|
string AskBillNum = rowDataKeys[2] as string; |
||||
|
|
||||
|
|
||||
|
PageContext.RegisterStartupScript(Window1.GetShowReference(string.Format("../SupplierData/SCP_ASN_CREATE.aspx?AskBillNum={0}", AskBillNum))); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
protected void ddlGridPageSize_SelectedIndexChanged(object sender, EventArgs e) |
||||
|
{ |
||||
|
Grid_V_TB_ASK.PageSize = Convert.ToInt32(ddlGridPageSize.SelectedValue); |
||||
|
BindAsk(); |
||||
|
} |
||||
|
|
||||
|
protected void Window1_Close(object sender, WindowCloseEventArgs e) |
||||
|
{ |
||||
|
if (Session["Ask"] != null) |
||||
|
{ |
||||
|
Session["Ask"] = null; |
||||
|
} |
||||
|
BindAsk(); |
||||
|
} |
||||
|
|
||||
|
protected void Grid_V_TB_ASK_RowDataBound(object sender, GridRowEventArgs e) |
||||
|
{ |
||||
|
var itm = e.DataItem as V_TB_ASK; |
||||
|
if (itm.IsComplete==false) |
||||
|
{ |
||||
|
System.Web.UI.WebControls.Label _label = (System.Web.UI.WebControls.Label)Grid_V_TB_ASK.Rows[e.RowIndex].FindControl("State_DESC"); |
||||
|
// _label.Text = "发货未完";
|
||||
|
_label.ForeColor = Color.Red; |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
||||
|
protected void btn_Click(object sender, EventArgs e) |
||||
|
{ |
||||
|
if (Grid_V_TB_ASK.SelectedRowIndexArray.Count() == 0) |
||||
|
{ |
||||
|
PageContext.RegisterStartupScript(Alert.GetShowInTopReference("没有选择数据!")); |
||||
|
return; |
||||
|
} |
||||
|
object[] rowDataKeys = Grid_V_TB_ASK.DataKeys[Grid_V_TB_ASK.SelectedRowIndex]; |
||||
|
if (rowDataKeys.Count() > 0) |
||||
|
{ |
||||
|
if (ConvertHelper.To<Int32>(rowDataKeys[7]) == (int)AskState.New || ConvertHelper.To<Int32>(rowDataKeys[7]) == (int)AskState.Release) |
||||
|
{ |
||||
|
PageContext.RegisterStartupScript(Alert.GetShowInTopReference("选择记录不是供应商确认单据")); |
||||
|
return; |
||||
|
} |
||||
|
string AskBillNum = rowDataKeys[2] as string; |
||||
|
PageContext.RegisterStartupScript(Window1.GetShowReference(string.Format("../SupplierData/SCP_ASN_CREATE.aspx?AskBillNum={0}&State=1", AskBillNum))); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
protected void Button1_Click(object sender, EventArgs e) |
||||
|
{ |
||||
|
DDL_State.SelectedValue = "0"; |
||||
|
BindAsk(); |
||||
|
} |
||||
|
|
||||
|
protected void Button2_Click(object sender, EventArgs e) |
||||
|
{ |
||||
|
DDL_State.SelectedValue = "1"; |
||||
|
BindAsk(); |
||||
|
} |
||||
|
|
||||
|
protected void Button4_Click(object sender, EventArgs e) |
||||
|
{ |
||||
|
DDL_State.SelectedValue = "2"; |
||||
|
BindAsk(); |
||||
|
} |
||||
|
|
||||
|
protected void Button6_Click(object sender, EventArgs e) |
||||
|
{ |
||||
|
DDL_State.SelectedValue = string.Empty; |
||||
|
BindAsk(); |
||||
|
} |
||||
|
|
||||
|
protected void Button5_Click(object sender, EventArgs e) |
||||
|
{ |
||||
|
DDL_State.SelectedValue = "3"; |
||||
|
BindAsk(); |
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,368 @@ |
|||||
|
//------------------------------------------------------------------------------
|
||||
|
// <自动生成>
|
||||
|
// 此代码由工具生成。
|
||||
|
//
|
||||
|
// 对此文件的更改可能导致不正确的行为,如果
|
||||
|
// 重新生成代码,则所做更改将丢失。
|
||||
|
// </自动生成>
|
||||
|
//------------------------------------------------------------------------------
|
||||
|
|
||||
|
namespace SCP.Views.SupplierData.SupplierLogistics |
||||
|
{ |
||||
|
|
||||
|
|
||||
|
public partial class SCP_ASK |
||||
|
{ |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// form1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::System.Web.UI.HtmlControls.HtmlForm form1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Panel1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Panel Panel1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Toolbar2 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Toolbar Toolbar2; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// button3 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Button button3; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// btnOutput 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Button btnOutput; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// btnDetail 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Button btnDetail; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// btnAsn 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Button btnAsn; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// btn 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Button btn; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// btnShow 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Button btnShow; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Button6 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Button Button6; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Button2 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Button Button2; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Button4 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Button Button4; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Button5 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Button Button5; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// gp1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.GroupPanel gp1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// FormRow_1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.FormRow FormRow_1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TXT_BillNo 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox TXT_BillNo; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// DropDownList1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.DropDownList DropDownList1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TXT_Extend1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox TXT_Extend1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TXT_Extend2 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox TXT_Extend2; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TXT_Extend3 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox TXT_Extend3; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TXT_AskBillNo 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox TXT_AskBillNo; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TXT_VendId 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox TXT_VendId; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TXT_Site_Desc 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox TXT_Site_Desc; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// FormRow_2 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.FormRow FormRow_2; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TXT_ProjectId 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox TXT_ProjectId; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// DDL_State 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.DropDownList DDL_State; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// DP_StartDate 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.DatePicker DP_StartDate; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Date_EndDate 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.DatePicker Date_EndDate; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// FormRow_3 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.FormRow FormRow_3; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// BtnClose 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Button BtnClose; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// BtnSearch 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Button BtnSearch; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Grid_V_TB_ASK 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Grid Grid_V_TB_ASK; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// ToolbarSeparator1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.ToolbarSeparator ToolbarSeparator1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// ToolbarText1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.ToolbarText ToolbarText1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// ddlGridPageSize 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.DropDownList ddlGridPageSize; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// State_DESC 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::System.Web.UI.WebControls.Label State_DESC; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// highlightRows 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.HiddenField highlightRows; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Window1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Window Window1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// WindowUpload 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Window WindowUpload; |
||||
|
} |
||||
|
} |
@ -0,0 +1,116 @@ |
|||||
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SCP_ASK_DETAIL.aspx.cs" Inherits="SCP.SupplierData.SupplierLogistics.SCP_ASK_DETAIL" %> |
||||
|
|
||||
|
<!DOCTYPE html> |
||||
|
|
||||
|
<html xmlns="http://www.w3.org/1999/xhtml"> |
||||
|
<head runat="server"> |
||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> |
||||
|
<title></title> |
||||
|
</head> |
||||
|
<body> |
||||
|
<form id="form1" runat="server"> |
||||
|
<f:PageManager runat="server" AutoSizePanelID="Panel1" /> |
||||
|
<f:Panel ID="Panel1" runat="server" Title="" AutoScroll="True"> |
||||
|
<Toolbars> |
||||
|
<f:Toolbar ID="Toolbar2" runat="server"> |
||||
|
<Items> |
||||
|
<f:Button ID="BTN_refresh" runat="server" EnablePostBack="True" Text="刷新" Icon="box"> |
||||
|
</f:Button> |
||||
|
<f:Button ID="btnConfirm" runat="server" EnablePostBack="True" OnClick="btnConfirm_Click" Text="确认订单" Icon="CssAdd"> |
||||
|
</f:Button> |
||||
|
|
||||
|
<f:Button ID="btnNoConfirm" runat="server" EnablePostBack="True" OnClick="btnNoConfirm_Click" Text="取消确认" Icon="CssAdd"> |
||||
|
</f:Button> |
||||
|
</Items> |
||||
|
</f:Toolbar> |
||||
|
</Toolbars> |
||||
|
<Items> |
||||
|
<f:Form runat="server" Title=""> |
||||
|
<Items> |
||||
|
<f:FormRow runat="server" ColumnWidths="33% 33% 33%" ID="FormRow_1"> |
||||
|
<Items> |
||||
|
|
||||
|
<f:TextBox runat = "server" Label = "单据状态" EmptyText = "" Readonly="true" ID = "TXT_State_DESC" /> |
||||
|
<f:TextBox runat = "server" Label = "订单编号" EmptyText = "" ID = "TXT_PoBillNum" /> |
||||
|
<f:TextBox runat = "server" Label = "供应商" EmptyText = "" ID = "TXT_VendName" /> |
||||
|
</Items> |
||||
|
</f:FormRow> |
||||
|
<f:FormRow runat="server" ColumnWidths="33% 33% 33%" ID="FormRow_2"> |
||||
|
<Items> |
||||
|
<f:TextBox runat = "server" Label = "发往地点" EmptyText = "" ID = "TXT_Site" /> |
||||
|
<f:DatePicker runat="server" Required ="true" DateFormatString="yyyy-MM-dd" Label="订货日期" EmptyText="请选择日期" ID="DP_BeginTime" /> |
||||
|
<%-- <f:DatePicker runat="server" ID="DP_EndTime" Label="截止日期" Text="" DateFormatString="yyyy-MM-dd" />--%> |
||||
|
</Items> |
||||
|
</f:FormRow> |
||||
|
<f:FormRow runat="server" ID="FormRow_3"> |
||||
|
<Items> |
||||
|
<f:TextBox ID="txtRemark" runat="server" Label="备注" Text=""> |
||||
|
</f:TextBox> |
||||
|
</Items> |
||||
|
</f:FormRow> |
||||
|
</Items> |
||||
|
</f:Form> |
||||
|
|
||||
|
<f:Grid runat="server" ID="Grid_V_TB_ASK_DETAIL" |
||||
|
DataKeyNames ="UID,PoBillNum,PoLine,PartCode,ShippedQty,ReceivedQty,BeginTime,EndTime,PoUnit,LocUnit,Price,Currency,PackQty,UnConv,DockCode,State,Remark,CreateTime,CreateUser,UpdateTime,UpdateUser,UpdateInfo,IsDeleted,PartDesc1,CurrencyDesc,Site,VendName,PartDesc2,AskBillNum,AskQty,TempQty,ReceivedPort" |
||||
|
IsDatabasePaging="True" AllowPaging="True" PageSize="10" OnPageIndexChange="Grid_V_TB_ASK_DETAIL_PageIndexChange" |
||||
|
EnableRowSelectEvent="True" AutoScroll="True" SortField="PoLine" SortDirection="DESC" > |
||||
|
<PageItems> |
||||
|
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server"> |
||||
|
</f:ToolbarSeparator> |
||||
|
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:"> |
||||
|
</f:ToolbarText> |
||||
|
<f:DropDownList ID="ddlGridPageSize" Width="80px" AutoPostBack="true" OnSelectedIndexChanged="ddlGridPageSize_SelectedIndexChanged" |
||||
|
runat="server"> |
||||
|
<f:ListItem Text="10" Value="10" /> |
||||
|
<f:ListItem Text="40" Value="40" /> |
||||
|
<f:ListItem Text="80" Value="80" /> |
||||
|
<f:ListItem Text="100" Value="100" /> |
||||
|
<f:ListItem Text="200" Value="200" /> |
||||
|
</f:DropDownList> |
||||
|
</PageItems> |
||||
|
<Columns> |
||||
|
<f:BoundField SortField="State" DataField="State" HeaderText="状态" ColumnID="State" Width="50px" Hidden="true" /> |
||||
|
<f:BoundField SortField="Line" DataField="PoLine" HeaderText="行号" ColumnID="Line" Width="40px" /> |
||||
|
<f:BoundField SortField="PartDesc1" DataField="PartDesc1" HeaderText="零件名称" ColumnID="PartDesc1" Width="200px" /> |
||||
|
<f:BoundField SortField="PartCode" DataField="PartCode" HeaderText="零件号" ColumnID="ProductCode" Width="80px" /> |
||||
|
<f:BoundField SortField="PoUnit" DataField="PoUnit" HeaderText="单位" ColumnID="PoUnit" Width="40px" /> |
||||
|
<f:BoundField SortField="PackQty" DataField="PackQty" HeaderText="标包数量" ColumnID="PackQty" Width="80px" DataFormatString = "{0:F}"/> |
||||
|
<f:BoundField SortField="CurrencyDesc" DataField="CurrencyDesc" HeaderText="币种" ColumnID="CurrencyDesc" Width="40px" /> |
||||
|
|
||||
|
<f:BoundField SortField="Price" DataField="Price" HeaderText="价格" ColumnID="Price" Width="80px" Hidden="true" /> |
||||
|
<f:BoundField SortField="AskQty" DataField="AskQty" HeaderText="要货数量" ColumnID="AskQty" Width="80px" DataFormatString = "{0:F}" /> |
||||
|
<f:BoundField SortField="EndTime" DataField="EndTime" HeaderText="截止日期" ColumnID="EndTime" Width="100px" /> |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
<f:BoundField SortField="ReduceQty" DataField="ReduceQty" HeaderText="减产数量" ColumnID="ReduceQty" Width="100px" Hidden="true"/> |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
<%--<f:BoundField SortField="TempQty" DataField="TempQty" HeaderText="待发数" ColumnID="TempQty" Width="60px" /> |
||||
|
<f:BoundField SortField="ShipQty" DataField="ShippedQty" HeaderText="发货数" ColumnID="ShipQty" Width="60px" /> |
||||
|
<f:BoundField SortField="ReceiveQty" DataField="ReceiveQty" HeaderText="收货数" ColumnID="ReceiveQty" Width="60px" />--%> |
||||
|
<f:BoundField SortField="Remrk" DataField="Remark" HeaderText="说明" ColumnID="RejectQty" /> |
||||
|
<f:BoundField SortField="ReceivedPort_Desc" DataField="ReceivedPort_Desc" HeaderText="收货口" ColumnID="ReceivedPort_Desc" /> |
||||
|
</Columns> |
||||
|
</f:Grid> |
||||
|
|
||||
|
<f:HiddenField runat="server" ID="TXT_ModType"></f:HiddenField> |
||||
|
<f:HiddenField runat="server" ID="TXT_State"></f:HiddenField> |
||||
|
</Items> |
||||
|
|
||||
|
</f:Panel> |
||||
|
<f:Window runat="server" ID="Window1" Hidden="True" |
||||
|
WindowPosition="Center" IsModal="true" Title="Popup Window 1" Target="Parent" EnableIFrame="true" |
||||
|
IFrameUrl="about:blank" Height="840px" Width="700px" /> |
||||
|
<f:Window ID="WindowUpload" runat="server" Hidden="True" |
||||
|
WindowPosition="Center" IsModal="true" Title="Popup Window 1" Target="Parent" EnableIFrame="true" |
||||
|
IFrameUrl="about:blank" Height="200px" Width="400px"> |
||||
|
</f:Window> |
||||
|
</form> |
||||
|
</body> |
||||
|
</html> |
@ -0,0 +1,144 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
|
using System.Web; |
||||
|
using System.Web.UI; |
||||
|
using System.Web.UI.WebControls; |
||||
|
using CK.SCP.Models.Enums; |
||||
|
using CK.SCP.Models.ScpEntity; |
||||
|
using CK.SCP.Utils; |
||||
|
using CK.SCP.Controller; |
||||
|
using FineUI; |
||||
|
using SCP.Code; |
||||
|
|
||||
|
namespace SCP.SupplierData.SupplierLogistics |
||||
|
{ |
||||
|
public partial class SCP_ASK_DETAIL : PageBase |
||||
|
{ |
||||
|
protected void Page_Load(object sender, EventArgs e) |
||||
|
{ |
||||
|
if (!IsPostBack) |
||||
|
{ |
||||
|
GetV_TB_POData(); |
||||
|
BindDetail(); |
||||
|
//SetRoleRule();
|
||||
|
TranslatorAgents(Toolbar2); |
||||
|
TranslatorAgent(Grid_V_TB_ASK_DETAIL); |
||||
|
TranslatorAgents(FormRow_1); |
||||
|
TranslatorAgents(FormRow_2); |
||||
|
TranslatorAgents(FormRow_3); |
||||
|
} |
||||
|
} |
||||
|
private void SetRoleRule() |
||||
|
{ |
||||
|
IsPriceVisible(Grid_V_TB_ASK_DETAIL, "价格"); |
||||
|
} |
||||
|
private void BindResource() |
||||
|
{ |
||||
|
BTN_refresh.Text = GetNameByKey(BTN_refresh.Text); |
||||
|
TXT_PoBillNum.Label = GetNameByKey(TXT_PoBillNum.Label); |
||||
|
TXT_Site.Label = GetNameByKey(TXT_Site.Label); |
||||
|
TXT_State_DESC.Label = GetNameByKey(TXT_State_DESC.Label); |
||||
|
TXT_VendName.Label = GetNameByKey(TXT_VendName.Label); |
||||
|
DP_BeginTime.Label = GetNameByKey(DP_BeginTime.Label); |
||||
|
//DP_EndTime.Label = GetNameByKey(DP_EndTime.Label);
|
||||
|
foreach (var itm in Grid_V_TB_ASK_DETAIL.Columns) |
||||
|
{ |
||||
|
GetNameByKey(itm.HeaderText); |
||||
|
} |
||||
|
} |
||||
|
public void SearchV_TB_ASK_DETAILData(Action<IQueryable<V_TB_ASK_DETAIL>> p_action) |
||||
|
{ |
||||
|
V_TB_ASK_DETAIL _entity = new V_TB_ASK_DETAIL(); |
||||
|
_entity.AskBillNum= Request["AskBillNum"]; |
||||
|
SCP_ASK_CONTROLLER.Get_V_TB_ASK_DETAIL_List(_entity, (_ret) => { |
||||
|
if (_ret.State == ReturnStatus.Succeed) |
||||
|
{ |
||||
|
p_action(_ret.Result); |
||||
|
} |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
public void GetV_TB_POData() |
||||
|
{ |
||||
|
V_TB_ASK _entity = new V_TB_ASK(); |
||||
|
_entity.AskBillNum = Request["AskBillNum"]; |
||||
|
//_entity.UserInAddress = CurrentUser.FactoryList;
|
||||
|
_entity.UserInVendIds = CurrentUser.VenderList; |
||||
|
SCP_ASK_CONTROLLER.Get_V_TB_ASK_List(_entity, (_ret) => |
||||
|
{ |
||||
|
if (_ret.State == ReturnStatus.Succeed) |
||||
|
{ |
||||
|
var _result = _ret.Result.FirstOrDefault(); |
||||
|
Session["Ask"] = _result; |
||||
|
this.TXT_PoBillNum.Text = _result.PoBillNum; |
||||
|
this.TXT_Site.Text = _result.Site_Desc; |
||||
|
this.TXT_State_DESC.Text = _result.State_DESC; |
||||
|
TXT_ModType.Text = _result.ModType.ToString(); |
||||
|
this.TXT_VendName.Text = _result.VendName; |
||||
|
this.txtRemark.Text = _result.Remark; |
||||
|
DP_BeginTime.SelectedDate = _result.BeginTime; |
||||
|
|
||||
|
} |
||||
|
}); |
||||
|
} |
||||
|
public void BindDetail() |
||||
|
{ |
||||
|
SearchV_TB_ASK_DETAILData((ret) => { |
||||
|
Grid_V_TB_ASK_DETAIL.RecordCount = ret.Count(); |
||||
|
var list = SortAndPage<V_TB_ASK_DETAIL>(ret, Grid_V_TB_ASK_DETAIL); |
||||
|
Grid_V_TB_ASK_DETAIL.DataSource = list; |
||||
|
Grid_V_TB_ASK_DETAIL.DataBind(); |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
protected void btnOutput_Click(object sender, EventArgs e) |
||||
|
{ |
||||
|
|
||||
|
} |
||||
|
|
||||
|
protected void btnConfirm_Click(object sender, EventArgs e) |
||||
|
{ |
||||
|
SET_ASK_STATE("供应商确认成功!", AskState.Confirm); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
private void SET_ASK_STATE(string p_msg,AskState p_state) |
||||
|
{ |
||||
|
if (Session["Ask"] != null) |
||||
|
{ |
||||
|
var _ask = Session["Ask"] as V_TB_ASK; |
||||
|
var ret = SCP_ASK_CONTROLLER.Save_TB_ASK_STATE(new List<string>() { _ask.AskBillNum },p_state); |
||||
|
if (ret.State == ReturnStatus.Succeed) |
||||
|
{ |
||||
|
Alert.Show(p_msg); |
||||
|
GetV_TB_POData(); |
||||
|
BindDetail(); |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
Alert.Show(ret.Message); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
protected void Grid_V_TB_ASK_DETAIL_PageIndexChange(object sender, GridPageEventArgs e) |
||||
|
{ |
||||
|
BindDetail(); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
protected void ddlGridPageSize_SelectedIndexChanged(object sender, EventArgs e) |
||||
|
{ |
||||
|
Grid_V_TB_ASK_DETAIL.PageSize = Convert.ToInt32(ddlGridPageSize.SelectedValue); |
||||
|
|
||||
|
BindDetail(); |
||||
|
} |
||||
|
|
||||
|
protected void btnNoConfirm_Click(object sender, EventArgs e) |
||||
|
{ |
||||
|
SET_ASK_STATE("取消确认成功!", AskState.NoConfirm); |
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,129 @@ |
|||||
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SCP_ASN.aspx.cs" Inherits="SCP.SupplierData.SupplierLogistics.SCP_ASN" %> |
||||
|
|
||||
|
<!DOCTYPE html> |
||||
|
|
||||
|
<html xmlns="http://www.w3.org/1999/xhtml"> |
||||
|
<head runat="server"> |
||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> |
||||
|
<title></title> |
||||
|
</head> |
||||
|
<body> |
||||
|
<form id="form1" runat="server"> |
||||
|
<f:PageManager runat="server" AutoSizePanelID="Panel1" /> |
||||
|
<f:Panel ID="Panel1" runat="server" Title="" Layout="VBox" BoxConfigAlign="Stretch" BoxConfigPosition="Start"> |
||||
|
<Items> |
||||
|
<f:Form runat="server"> |
||||
|
<Toolbars> |
||||
|
<f:Toolbar ID="Toolbar2" runat="server"> |
||||
|
<Items> |
||||
|
<f:Button ID="Button1" runat="server" EnablePostBack="True" Text="刷新" Icon="Reload" OnClientClick="location.reload();"> |
||||
|
</f:Button> |
||||
|
<f:Button ID="BtnOutPut" runat="server" EnablePostBack="True" Text="导出" Icon="PageExcel" OnClick="BtnOutPut_Click"> |
||||
|
</f:Button> |
||||
|
<f:Button ID="btnDetail" runat="server" EnablePostBack="True" Text="明细" Icon="Find" OnClick="btnDetail_Click"> |
||||
|
</f:Button> |
||||
|
<f:Button ID="btnNew" runat="server" EnablePostBack="True" Text="新建发货单" Icon="Add" OnClick="btnNew_Click"> |
||||
|
</f:Button> |
||||
|
<%--<f:Button ID="btnDelete" runat="server" EnablePostBack="True" Text="删除" Icon="Add" OnClick="btnDelete_Click" Hidden="True"> |
||||
|
</f:Button>--%> |
||||
|
<f:Button ID="btnShow" runat="server" Icon="Find" Text="显示查询面板" OnClick="btnShow_Click"> |
||||
|
</f:Button> |
||||
|
<f:Button ID="btnPallet" runat="server" Icon="Add" Text="创建托盘" OnClick="btnPallet_Click" > |
||||
|
</f:Button> |
||||
|
<f:Button ID="btnPalletDetail" runat="server" Icon=" Zoom" Text="查看托盘" OnClick="btnPalletDetail_Click" > |
||||
|
</f:Button> |
||||
|
</Items> |
||||
|
</f:Toolbar> |
||||
|
</Toolbars> |
||||
|
</f:Form> |
||||
|
<f:Label runat="server" Label="物料发出前,请确认发货单是【已发货】状态,如果是发货单是【新建】状态请进入明细,点击【确认发货】按钮。" LabelWidth="800" ColumnWidth="800" Width="800" /> |
||||
|
<f:GroupPanel runat="server" ID="gp1" Hidden="True" Layout="HBox"> |
||||
|
<Items> |
||||
|
<f:Form runat="server"> |
||||
|
<Rows> |
||||
|
<f:FormRow runat="server" ID="FormRow_1" Hidden="true"> |
||||
|
<Items> |
||||
|
<f:DropDownList runat="server" ID="ddl" Label="状态"> |
||||
|
<f:ListItem Text="-" Value=""/> |
||||
|
<f:ListItem Text="新建" Value="0" /> |
||||
|
<f:ListItem Text="已发货" Value="1" /> |
||||
|
<f:ListItem Text="已收货" Value="2" /> |
||||
|
<f:ListItem Text="已作废" Value="-1" /> |
||||
|
</f:DropDownList> |
||||
|
</Items> |
||||
|
</f:FormRow> |
||||
|
<f:FormRow runat="server" ID="FormRow_2"> |
||||
|
<Items> |
||||
|
<f:TextBox ID="txtBill" runat="server" Label="发货单号"/> |
||||
|
<f:TextBox ID="TXT_VenderName" runat="server" Label="供应商"/> |
||||
|
<f:TextBox ID="TXT_ASK" runat="server" Label="看板编号" /> |
||||
|
<f:TextBox ID="txtPO" runat="server" Label="订单编号" /> |
||||
|
<f:DropDownList runat="server" ID="DropDownList1" Label="地点" DataTextField="FactoryName" DataValueField=" ErpDomain"> |
||||
|
</f:DropDownList> |
||||
|
<f:TextBox ID="TXT_Extend1" runat="server" Label="子网站" Hidden="true" /> |
||||
|
<f:TextBox ID="TXT_Extend2" runat="server" Label="子网站" Hidden="true" /> |
||||
|
<f:TextBox ID="TXT_Extend3" runat="server" Label="子网站" Hidden="true" /> |
||||
|
</Items> |
||||
|
</f:FormRow> |
||||
|
<f:FormRow runat="server" ID="FormRow_3" Hidden="true"> |
||||
|
<Items> |
||||
|
<f:Label runat="server" Label="发往地点" /> |
||||
|
<f:TextBox ID="txtShipTosite" runat="server" /> |
||||
|
<f:DatePicker ID="dateShip" runat="server" Required="True" Label="发货时间" /> |
||||
|
<f:Label runat="server" Label="发货时间" /> |
||||
|
<f:DatePicker ID="dateReceive" runat="server" Required="true" /> |
||||
|
</Items> |
||||
|
</f:FormRow> |
||||
|
<f:FormRow runat="server" ID="FormRow_4"> |
||||
|
<Items> |
||||
|
<f:Button runat="server" Text="关闭" ID="btnClose" OnClick="btnClose_Click"></f:Button> |
||||
|
<f:Button ID="BtnSearch" runat="server" OnClick="BtnSearch_Click" Text="快速查找"> |
||||
|
</f:Button> |
||||
|
</Items> |
||||
|
</f:FormRow> |
||||
|
</Rows> |
||||
|
</f:Form> |
||||
|
</Items> |
||||
|
</f:GroupPanel> |
||||
|
|
||||
|
|
||||
|
<f:Grid ID="Grid_V_TB_ASN" ShowBorder="true" ShowHeader="true" PageSize="20" BoxFlex="1" CssClass="maingrid" |
||||
|
runat="server" DataKeyNames="UID,AsnBillNum,AskBillNum,PoBillNum,VendId,State,Remark,ShipTime,ShipUser,ReceiveTime,ReceiveUser,ErpBillNum,ModType,Contacter,Buyer,BuyerPhone,VendName,Site,State_DESC,ModType_DESC,CreateTime,CreateUser,UpdateTime,UpdateUser,UpdateInfo,IsDeleted,GUID" |
||||
|
IsDatabasePaging="true" AllowPaging="true" SortDirection="DESC" SortField="ShipTime" |
||||
|
AutoScroll="True" EnableRowDoubleClickEvent="True" OnRowDoubleClick="Grid_V_TB_ASN_RowDoubleClick" OnPageIndexChange="Grid_V_TB_ASN_PageIndexChange"> |
||||
|
<PageItems> |
||||
|
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server"> |
||||
|
</f:ToolbarSeparator> |
||||
|
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:"> |
||||
|
</f:ToolbarText> |
||||
|
<f:DropDownList ID="ddlGridPageSize" Width="80px" AutoPostBack="true" OnSelectedIndexChanged="ddlGridPageSize_SelectedIndexChanged" |
||||
|
runat="server"> |
||||
|
<f:ListItem Text="20" Value="10" /> |
||||
|
<f:ListItem Text="40" Value="40" /> |
||||
|
<f:ListItem Text="80" Value="80" /> |
||||
|
<f:ListItem Text="100" Value="100" /> |
||||
|
</f:DropDownList> |
||||
|
</PageItems> |
||||
|
<Columns> |
||||
|
<f:BoundField Width = "100px" DataField = "State_DESC" DataFormatString = "{0}" HeaderText = "状态" /> |
||||
|
<f:BoundField runat="server" HeaderText="发货单号" ColumnID="" DataField="AsnBillNum" /> |
||||
|
<f:BoundField runat="server" HeaderText="要货单号" ColumnID="" DataField="AskBillNum" /> |
||||
|
<f:BoundField runat="server" HeaderText="车牌号" ColumnID="" DataField="PlateNumber" Hidden="false"></f:BoundField> |
||||
|
<f:BoundField runat="server" HeaderText="供应商" ColumnID="" DataField="VendName" /> |
||||
|
<f:BoundField runat="server" HeaderText="订单号" ColumnID="" DataField="PoBillNum" /> |
||||
|
<f:BoundField Width = "100px" DataField = "ShipTime" DataFormatString = "{0:yyyy-MM-dd}" HeaderText = "发货时间" Hidden="true" /> |
||||
|
<f:BoundField Width = "100px" DataField = "ShipUser" DataFormatString = "{0}" HeaderText = "发货人" /> |
||||
|
<f:BoundField Width = "100px" DataField = "ReceiveTime" DataFormatString = "{0:yyyy-MM-dd}" HeaderText = "收货时间" Hidden="true" /> |
||||
|
<f:BoundField Width = "100px" DataField = "ReceiveUser" DataFormatString = "{0}" HeaderText = "收货人" /> |
||||
|
<f:BoundField runat="server" HeaderText="发往地点" ColumnID="" DataField="Site_Desc" /> |
||||
|
<f:BoundField runat="server" HeaderText="备注" ColumnID="" DataField="Remark" Hidden="true" /> |
||||
|
</Columns> |
||||
|
</f:Grid> |
||||
|
</Items> |
||||
|
</f:Panel> |
||||
|
<f:Window runat="server" ID="Window1" Hidden="True" |
||||
|
WindowPosition="Center" IsModal="true" Title="发货明细" Target="Parent" EnableIFrame="true" CloseAction="HidePostBack" |
||||
|
IFrameUrl="about:blank" Height="600px" Width="1024px" AutoScroll="True" OnClose="Window1_Close" /> |
||||
|
</form> |
||||
|
</body> |
||||
|
</html> |
@ -0,0 +1,175 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
|
using System.Web; |
||||
|
using System.Web.UI; |
||||
|
using System.Web.UI.WebControls; |
||||
|
using CK.SCP.Models.ScpEntity; |
||||
|
using CK.SCP.Controller; |
||||
|
using FineUI; |
||||
|
using System.Data; |
||||
|
|
||||
|
namespace SCP.SupplierData.SupplierLogistics |
||||
|
{ |
||||
|
public partial class SCP_ASN : PageBase |
||||
|
{ |
||||
|
protected void Page_Load(object sender, EventArgs e) |
||||
|
{ |
||||
|
if (!IsPostBack) |
||||
|
{ |
||||
|
LoadData(); |
||||
|
TranslatorAgents(Toolbar2); |
||||
|
TranslatorAgent(Grid_V_TB_ASN); |
||||
|
TranslatorAgents(FormRow_1); |
||||
|
TranslatorAgents(FormRow_2); |
||||
|
TranslatorAgents(FormRow_3); |
||||
|
TranslatorAgents(FormRow_4); |
||||
|
} |
||||
|
} |
||||
|
public void LoadData() |
||||
|
{ |
||||
|
//if (!CurrentUser.RoleList.Contains("供应商"))
|
||||
|
//{
|
||||
|
// Alert.Show("当前用户角色不能操作模块!");
|
||||
|
// return;
|
||||
|
//}
|
||||
|
if (CurrentUser.VenderList.Count == 0 && CurrentUser.Name!="admin") |
||||
|
{ |
||||
|
if (CurrentUser.RoleList.Contains("分厂管理员")) |
||||
|
{ |
||||
|
BindASN(); |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
Alert.Show("当前用户未分配供应商!"); |
||||
|
return; |
||||
|
} |
||||
|
; |
||||
|
} |
||||
|
BindASN(); |
||||
|
} |
||||
|
|
||||
|
public void BindASN() |
||||
|
{ |
||||
|
SearchV_TB_ASN((result) => { |
||||
|
Grid_V_TB_ASN.RecordCount = result.Count(); |
||||
|
var list = SortAndPage<V_TB_ASN>(result, Grid_V_TB_ASN); |
||||
|
Grid_V_TB_ASN.DataSource = list; |
||||
|
Grid_V_TB_ASN.DataBind(); |
||||
|
}); |
||||
|
} |
||||
|
public void SearchV_TB_ASN(Action<IQueryable<V_TB_ASN>> p_action) |
||||
|
{ |
||||
|
var ls = SCPDB.TB_FACTORY.Where(p => p.ErpDomain == CurrentUser.UsedDomain).ToList(); |
||||
|
DropDownList1.DataSource = ls; |
||||
|
DropDownList1.DataBind(); |
||||
|
V_TB_ASN _entity = new V_TB_ASN(); |
||||
|
_entity.IsDeleted = false; |
||||
|
_entity.VendId = TXT_VenderName.Text; |
||||
|
_entity.PoBillNum = txtPO.Text; |
||||
|
_entity.AsnBillNum = txtBill.Text; |
||||
|
_entity.AskBillNum = TXT_ASK.Text; |
||||
|
_entity.UserInVendIds = CurrentUser.VenderList; |
||||
|
_entity.UserInAddress = CurrentUser.FactoryList; |
||||
|
_entity.SubSite = DropDownList1.SelectedValue; |
||||
|
_entity.Extend1 = TXT_Extend1.Text; |
||||
|
_entity.Extend2 = TXT_Extend2.Text; |
||||
|
_entity.Extend3 = TXT_Extend3.Text; |
||||
|
SCP_ASN_CONTROLLER.Get_V_TB_ASN_List(_entity, (_ret) => { |
||||
|
if (_ret.State == ReturnStatus.Succeed) |
||||
|
{ |
||||
|
p_action(_ret.Result); |
||||
|
} |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
protected void Grid_V_TB_ASN_RowDoubleClick(object sender, FineUI.GridRowClickEventArgs e) |
||||
|
{ |
||||
|
object[] rowDataKeys = Grid_V_TB_ASN.DataKeys[e.RowIndex]; |
||||
|
string AsnBillNum = rowDataKeys[1] as string; |
||||
|
PageContext.RegisterStartupScript(Window1.GetShowReference(string.Format("../SupplierData/SCP_ASN_DETAIL.aspx?AsnBillNum={0}", AsnBillNum))); |
||||
|
} |
||||
|
|
||||
|
protected void BtnOutPut_Click(object sender, EventArgs e) |
||||
|
{ |
||||
|
List<string> _ls = new List<string>(); |
||||
|
SearchV_TB_ASN(rs => { |
||||
|
_ls=rs.Select(p => p.AsnBillNum).ToList(); |
||||
|
DataSet ds = SCP_EXCEL_CONTROLLER.GET_ASN_EXECEL(_ls); |
||||
|
PageBase.DataSetToExcel(ds, "发货单"); |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
protected void btnDetail_Click(object sender, EventArgs e) |
||||
|
{ |
||||
|
if (Grid_V_TB_ASN.SelectedRowIndexArray.Count() == 0) |
||||
|
{ |
||||
|
PageContext.RegisterStartupScript(Alert.GetShowInTopReference("没有选择数据!")); |
||||
|
return; |
||||
|
} |
||||
|
object[] rowDataKeys = Grid_V_TB_ASN.DataKeys[Grid_V_TB_ASN.SelectedRowIndex]; |
||||
|
string AsnBillNum = rowDataKeys[1] as string; |
||||
|
PageContext.RegisterStartupScript(Window1.GetShowReference(string.Format("../SupplierData/SCP_ASN_DETAIL.aspx?AsnBillNum={0}", AsnBillNum))); |
||||
|
} |
||||
|
protected void btnShow_Click(object sender, EventArgs e) |
||||
|
{ |
||||
|
gp1.Hidden = false; |
||||
|
} |
||||
|
protected void btnClose_Click(object sender, EventArgs e) |
||||
|
{ |
||||
|
gp1.Hidden = true; |
||||
|
} |
||||
|
protected void BtnSearch_Click(object sender, EventArgs e) |
||||
|
{ |
||||
|
BindASN(); |
||||
|
} |
||||
|
protected void Grid_V_TB_ASN_PageIndexChange(object sender, GridPageEventArgs e) |
||||
|
{ |
||||
|
BindASN(); |
||||
|
} |
||||
|
protected void ddlGridPageSize_SelectedIndexChanged(object sender, EventArgs e) |
||||
|
{ |
||||
|
Grid_V_TB_ASN.PageSize = Convert.ToInt32(ddlGridPageSize.SelectedValue); |
||||
|
BindASN(); |
||||
|
} |
||||
|
protected void BtnOutPut_Click1(object sender, EventArgs e) |
||||
|
{ |
||||
|
|
||||
|
} |
||||
|
protected void btnNew_Click(object sender, EventArgs e) |
||||
|
{ |
||||
|
PageContext.RegisterStartupScript(Window1.GetShowReference("../SupplierData/SCP_ASK.aspx")); |
||||
|
} |
||||
|
|
||||
|
protected void Window1_Close(object sender, WindowCloseEventArgs e) |
||||
|
{ |
||||
|
BindASN(); |
||||
|
} |
||||
|
|
||||
|
protected void btnPallet_Click(object sender, EventArgs e) |
||||
|
{ |
||||
|
if (Grid_V_TB_ASN.SelectedRowIndexArray.Count() == 0 ) |
||||
|
{ |
||||
|
PageContext.RegisterStartupScript(Alert.GetShowInTopReference("没有选择数据!")); |
||||
|
return; |
||||
|
} |
||||
|
object[] rowDataKeys = Grid_V_TB_ASN.DataKeys[Grid_V_TB_ASN.SelectedRowIndex]; |
||||
|
string AsnBillNum = rowDataKeys[1] as string; |
||||
|
PageContext.RegisterStartupScript(Window1.GetShowReference(string.Format("../SupplierData/SCP_PALLET_CREATE.aspx?AsnBillNum={0}", AsnBillNum))); |
||||
|
|
||||
|
} |
||||
|
|
||||
|
protected void btnPalletDetail_Click(object sender, EventArgs e) |
||||
|
{ |
||||
|
if (Grid_V_TB_ASN.SelectedRowIndexArray.Count() == 0) |
||||
|
{ |
||||
|
PageContext.RegisterStartupScript(Alert.GetShowInTopReference("没有选择数据!")); |
||||
|
return; |
||||
|
} |
||||
|
object[] rowDataKeys = Grid_V_TB_ASN.DataKeys[Grid_V_TB_ASN.SelectedRowIndex]; |
||||
|
string AsnBillNum = rowDataKeys[1] as string; |
||||
|
PageContext.RegisterStartupScript(Window1.GetShowReference(string.Format("../SupplierData/SCP_PALLET.aspx?AsnBillNum={0}", AsnBillNum))); |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,323 @@ |
|||||
|
//------------------------------------------------------------------------------
|
||||
|
// <自动生成>
|
||||
|
// 此代码由工具生成。
|
||||
|
//
|
||||
|
// 对此文件的更改可能导致不正确的行为,如果
|
||||
|
// 重新生成代码,则所做更改将丢失。
|
||||
|
// </自动生成>
|
||||
|
//------------------------------------------------------------------------------
|
||||
|
|
||||
|
namespace SCP.SupplierData.SupplierLogistics |
||||
|
{ |
||||
|
|
||||
|
|
||||
|
public partial class SCP_ASN |
||||
|
{ |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// form1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::System.Web.UI.HtmlControls.HtmlForm form1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Panel1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Panel Panel1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Toolbar2 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Toolbar Toolbar2; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Button1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Button Button1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// BtnOutPut 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Button BtnOutPut; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// btnDetail 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Button btnDetail; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// btnNew 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Button btnNew; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// btnShow 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Button btnShow; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// btnPallet 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Button btnPallet; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// btnPalletDetail 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Button btnPalletDetail; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// gp1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.GroupPanel gp1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// FormRow_1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.FormRow FormRow_1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// ddl 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.DropDownList ddl; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// FormRow_2 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.FormRow FormRow_2; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// txtBill 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox txtBill; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TXT_VenderName 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox TXT_VenderName; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TXT_ASK 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox TXT_ASK; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// txtPO 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox txtPO; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// DropDownList1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.DropDownList DropDownList1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TXT_Extend1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox TXT_Extend1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TXT_Extend2 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox TXT_Extend2; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TXT_Extend3 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox TXT_Extend3; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// FormRow_3 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.FormRow FormRow_3; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// txtShipTosite 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox txtShipTosite; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// dateShip 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.DatePicker dateShip; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// dateReceive 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.DatePicker dateReceive; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// FormRow_4 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.FormRow FormRow_4; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// btnClose 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Button btnClose; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// BtnSearch 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Button BtnSearch; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Grid_V_TB_ASN 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Grid Grid_V_TB_ASN; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// ToolbarSeparator1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.ToolbarSeparator ToolbarSeparator1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// ToolbarText1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.ToolbarText ToolbarText1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// ddlGridPageSize 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.DropDownList ddlGridPageSize; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Window1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Window Window1; |
||||
|
} |
||||
|
} |
@ -0,0 +1,217 @@ |
|||||
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SCP_ASN_CREATE.aspx.cs" Inherits="SCP.SupplierData.SupplierLogistics.SCP_ASN_CREATE" %> |
||||
|
|
||||
|
<!DOCTYPE html> |
||||
|
|
||||
|
<html xmlns="http://www.w3.org/1999/xhtml"> |
||||
|
<head runat="server"> |
||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> |
||||
|
<title></title> |
||||
|
</head> |
||||
|
<body> |
||||
|
<form id="form1" runat="server"> |
||||
|
<f:PageManager runat="server" AutoSizePanelID="Panel1" ID="pmg1" /> |
||||
|
<f:Panel ID="Panel1" runat="server" Title="" AutoScroll="True"> |
||||
|
<Items> |
||||
|
|
||||
|
<f:Toolbar runat="server" ID="Toolbar1"> |
||||
|
<Items> |
||||
|
<f:Button ID="btnCreate" runat="server" EnablePostBack="True" OnClick="btnCreate_Click" Text="生成发货单" Icon="CssAdd"> |
||||
|
</f:Button> |
||||
|
|
||||
|
<f:ToolbarFill runat="server" /> |
||||
|
</Items> |
||||
|
</f:Toolbar> |
||||
|
<f:Form runat="server" Title=""> |
||||
|
<Items> |
||||
|
|
||||
|
<f:FormRow runat="server" ColumnWidths="25% 25% 25% 25%" ID="FormRow_1"> |
||||
|
<Items> |
||||
|
<f:TextBox runat = "server" Label = "单据状态" Enabled="false" EmptyText = "" ID = "TXT_State_Desc" /> |
||||
|
<f:TextBox runat = "server" Label = "要货看板编号" Enabled="false" EmptyText = "" ID = "TXT_AskBillNum" /> |
||||
|
<f:TextBox runat = "server" Label = "供应商" Enabled="false" EmptyText = "" ID = "TXT_VendName" /> |
||||
|
<f:TextBox runat = "server" Enabled="false" Label = "发往地点" EmptyText = "" ID = "TXT_Site" /> |
||||
|
</Items> |
||||
|
</f:FormRow> |
||||
|
<f:FormRow runat="server" ColumnWidths="25% 25% 25% 25%"> |
||||
|
<Items> |
||||
|
<f:TextBox runat = "server" Label = "子网站" EmptyText = "" ID = "TXT_SubSite" Hidden="true" /> |
||||
|
<f:TextBox runat = "server" Label = "子网站" EmptyText = "" ID = "TXT_Extend1" Hidden="true"/> |
||||
|
<f:TextBox runat = "server" Label = "子网站" EmptyText = "" ID = "TXT_Extend2" Hidden="true" /> |
||||
|
<f:TextBox runat = "server" Label = "子网站" EmptyText = "" ID = "TXT_Extend3" Hidden="true" /> |
||||
|
</Items> |
||||
|
</f:FormRow> |
||||
|
<f:FormRow runat="server" ColumnWidths="25% 25% 25% 25%" ID="FormRow_2"> |
||||
|
<Items> |
||||
|
<f:TextBox ID="TXT_PlateNumber" runat="server" Label="车牌/快递单号" /> |
||||
|
<f:TextBox runat = "server" Label = "发货人" EmptyText = "" ID = "TXT_ShipUser" /> |
||||
|
<f:DatePicker runat="server" Required ="true" DateFormatString="yyyy-MM-dd" Label="发货日期" EmptyText="请选择日期" ID="DP_ShipTime" /> |
||||
|
<f:DatePicker runat="server" Required ="true" Label="承诺到货日期" EmptyText="请选择日期" ID="DP_ReceiveTime" Readonly="false" CompareControl="DP_ShipTime" DateFormatString="yyyy-MM-dd HH:mm" |
||||
|
CompareOperator="GreaterThan" CompareMessage="到货日期应该大于发货日期" |
||||
|
ShowRedStar="True" /> |
||||
|
</Items> |
||||
|
</f:FormRow> |
||||
|
<f:FormRow runat="server" ColumnWidths="33% 33% 33%" ID="FormRow_3" Hidden="true"> |
||||
|
<Items> |
||||
|
<f:DropDownList ID="DDL_PORT" DataTextField="PORT_DESCRIPTION" DataValueField="PORT_NO" Required="true" runat="server" Label="收货口"> |
||||
|
</f:DropDownList> |
||||
|
<f:TextBox ID="TXT_Remark" runat="server" Label="备注" Text=""> |
||||
|
</f:TextBox> |
||||
|
</Items> |
||||
|
</f:FormRow> |
||||
|
</Items> |
||||
|
</f:Form> |
||||
|
<f:Grid runat="server" ID="Grid_V_TB_ASK_DETAIL" |
||||
|
DataKeyNames ="UID,PoBillNum,PoLine,PartCode,ShippedQty,ReceivedQty,BeginTime,EndTime,PoUnit,LocUnit,Price,Currency,PackQty,UnConv,DockCode,State,Remark,CreateTime,CreateUser,UpdateTime,UpdateUser,UpdateInfo,IsDeleted,PartDesc1,CurrencyDesc,Site,VendName,PartDesc2,AskBillNum,AskQty,TempQty,ReceivedPort,ProduceDate,ReduceQty,ValidityDays,Batch,SubSite,Extend1,Extend2,Extend3" |
||||
|
IsDatabasePaging="True" AllowPaging="True" OnPageIndexChange="Grid_V_TB_ASK_DETAIL_PageIndexChange" OnRowDataBound="Grid_V_TB_ASK_DETAIL_RowDataBound" |
||||
|
EnableRowSelectEvent="True" PageSize="500" AutoScroll="True" SortField="PoLine" SortDirection="DESC" AllowCellEditing="true" ClicksToEdit="1" > |
||||
|
<PageItems> |
||||
|
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server"> |
||||
|
</f:ToolbarSeparator> |
||||
|
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:"> |
||||
|
</f:ToolbarText> |
||||
|
<f:DropDownList ID="ddlGridPageSize" Width="80px" AutoPostBack="true" OnSelectedIndexChanged="ddlGridPageSize_SelectedIndexChanged" |
||||
|
runat="server"> |
||||
|
|
||||
|
<f:ListItem Text="100" Value="500" /> |
||||
|
<f:ListItem Text="200" Value="1000" /> |
||||
|
</f:DropDownList> |
||||
|
</PageItems> |
||||
|
|
||||
|
<Columns> |
||||
|
|
||||
|
<f:BoundField SortField="PartDesc1" DataField="PartDesc1" HeaderText="零件名称" ColumnID="PartDesc1" Width="100px" ToolTip='<%# Eval("PartDesc1") %>'/> |
||||
|
<f:BoundField SortField="PartCode" DataField="PartCode" HeaderText="零件号" ColumnID="ProductCode" Width="100px" /> |
||||
|
|
||||
|
<f:BoundField SortField="VendPartCode" DataField="VendPartCode" HeaderText="供应商零件号" ColumnID="VendPartCode" Width="100px" /> |
||||
|
|
||||
|
<f:RenderField Width="80px" ColumnID="PackQty" DataField="PackQty" FieldType="Float" |
||||
|
HeaderText="标包数量"> |
||||
|
<Editor> |
||||
|
<f:NumberBox ID="TXT_PackQty" runat="server" MinValue="0" |
||||
|
MaxValue="99999999" DecimalPrecision="2" > |
||||
|
</f:NumberBox> |
||||
|
</Editor> |
||||
|
</f:RenderField> |
||||
|
<f:RenderField Width="100px" ColumnID="Batch" DataField="Batch" FieldType="String" HeaderText="发货批次"> |
||||
|
<Editor> |
||||
|
<f:TextBox ID="txtBatch1" Text="" runat="server" Regex="\d{6}" ></f:TextBox> |
||||
|
</Editor> |
||||
|
</f:RenderField> |
||||
|
<%--<f:BoundField SortField="Batch1" DataField="Batch" HeaderText="发货批次" ColumnID="Batch1" Width="100px" /> --%> |
||||
|
|
||||
|
<f:RenderField Width="100px" ColumnID="TempQty" FieldType="Float" DataField="TempQty" |
||||
|
HeaderText="发货数量"> |
||||
|
<Editor> |
||||
|
<f:NumberBox ID="NumberBox1" runat="server" MinValue="0" |
||||
|
MaxValue="99999999" DecimalPrecision="3" > |
||||
|
</f:NumberBox> |
||||
|
</Editor> |
||||
|
</f:RenderField> |
||||
|
<f:RenderField Width="120px" ColumnID="ProduceDate" DataField="ProduceDate" FieldType="Date" |
||||
|
Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderText="生产日期"> |
||||
|
<Editor> |
||||
|
<f:DatePicker ID="DatePicker1" EnableBlurEvent="true" Required="true" runat="server" > |
||||
|
</f:DatePicker> |
||||
|
</Editor> |
||||
|
</f:RenderField> |
||||
|
<f:RenderField Width="100px" ColumnID="Batch2" Hidden="true" |
||||
|
HeaderText="发货批次"> |
||||
|
<Editor> |
||||
|
<f:TextBox ID="TextBox1" runat="server" MaxLength="6" > |
||||
|
</f:TextBox> |
||||
|
</Editor> |
||||
|
</f:RenderField> |
||||
|
<f:RenderField Width="100px" ColumnID="Qty2" FieldType="Float" Hidden="true" |
||||
|
HeaderText="发货数量"> |
||||
|
<Editor> |
||||
|
<f:NumberBox ID="NumberBox2" runat="server" MinValue="0" |
||||
|
MaxValue="99999999" DecimalPrecision="3" > |
||||
|
</f:NumberBox> |
||||
|
</Editor> |
||||
|
</f:RenderField> |
||||
|
<f:RenderField Width="100px" ColumnID="Batch3" Hidden="true" |
||||
|
HeaderText="发货批次"> |
||||
|
<Editor> |
||||
|
<f:TextBox ID="TextBox2" runat="server" MaxLength="6" > |
||||
|
</f:TextBox> |
||||
|
</Editor> |
||||
|
</f:RenderField> |
||||
|
<f:RenderField Width="100px" ColumnID="Qty3" FieldType="Float" Hidden="true" |
||||
|
HeaderText="发货数量"> |
||||
|
<Editor> |
||||
|
<f:NumberBox ID="NumberBox4" runat="server" MinValue="0" |
||||
|
MaxValue="99999999" DecimalPrecision="3" > |
||||
|
</f:NumberBox> |
||||
|
</Editor> |
||||
|
</f:RenderField> |
||||
|
|
||||
|
<f:RenderField Width="150px" ColumnID="VendBatch" Hidden="true" |
||||
|
HeaderText="供应商批次(YYMMDD)"> |
||||
|
<Editor> |
||||
|
<f:TextBox ID="TXT_VendBatch" runat="server" > |
||||
|
</f:TextBox> |
||||
|
</Editor> |
||||
|
</f:RenderField> |
||||
|
|
||||
|
<f:BoundField SortField="PoUnit" DataField="PoUnit" HeaderText="单位" ColumnID="PoUnit" Width="40px" /> |
||||
|
<f:BoundField SortField="CanQty" DataField="CanQty" HeaderText="可发数量" ColumnID="CanQty" Width="70px" DataFormatString = "{0:F}"/> |
||||
|
<f:BoundField SortField="EndTime" DataField="EndTime" HeaderText="到货截至日期" ColumnID="EndTime" Width="100px" /> |
||||
|
<f:BoundField SortField="SubSite" DataField="SubSite" HeaderText="子网站" ColumnID="SubSite" Width="100px" Hidden="true"/> |
||||
|
<f:BoundField SortField="Extend1" DataField="Extend1" HeaderText="子网站" ColumnID="Extend1" Width="100px" Hidden="true" /> |
||||
|
<f:BoundField SortField="Extend2" DataField="Extend2" HeaderText="子网站" ColumnID="Extend2" Width="100px" Hidden="true"/> |
||||
|
<f:BoundField SortField="Extend3" DataField="Extend3" HeaderText="子网站" ColumnID="Extend3" Width="100px" Hidden="true"/> |
||||
|
<f:BoundField SortField="AskQty" DataField="AskQty" HeaderText="要货数量" ColumnID="AskQty" Width="70px" Hidden="true" DataFormatString = "{0:F}"/> |
||||
|
<f:BoundField SortField="ReduceQty" Hidden="true" DataField="ReduceQty" HeaderText="减产数量" ColumnID="ReduceQty" Width="70px" DataFormatString = "{0:F}"/> |
||||
|
<f:BoundField SortField="ShipQty" DataField="ShippedQty" HeaderText="发货数量" ColumnID="ShippedQty" Width="70px" Hidden="true" /> |
||||
|
<f:BoundField SortField="ReceiveQty" DataField="ReceiveQty" HeaderText="收货数量" ColumnID="ReceiveQty" Width="70px" Hidden="true" /> |
||||
|
<f:BoundField SortField="Price" DataField="Price" HeaderText="价格" ColumnID="Price" Width="50px" Hidden="true" /> |
||||
|
<f:BoundField SortField="CurrencyDesc" DataField="CurrencyDesc" HeaderText="币种" ColumnID="CurrencyDesc" Width="40px" Hidden="true" /> |
||||
|
<f:BoundField SortField="UpdateInfo" DataField="UpdateInfo" HeaderText="备注" Hidden="true" /> |
||||
|
<f:BoundField SortField="ReceivedPort" DataField="ReceivedPort" HeaderText="收货口" ColumnID="ReceivedPort" Hidden="true" /> |
||||
|
|
||||
|
</Columns> |
||||
|
<Listeners> |
||||
|
<f:Listener Event="afteredit" Handler="f_onAfterEdit" /> |
||||
|
</Listeners> |
||||
|
</f:Grid> |
||||
|
</Items> |
||||
|
</f:Panel> |
||||
|
<f:Window runat="server" ID="Window1" Hidden="True" |
||||
|
WindowPosition="Center" IsModal="true" Title="Popup Window 1" Target="Parent" EnableIFrame="true" |
||||
|
IFrameUrl="about:blank" Height="640px" Width="700px" /> |
||||
|
<f:Window ID="WindowUpload" runat="server" Hidden="True" |
||||
|
WindowPosition="Center" IsModal="true" Title="Popup Window 1" Target="Parent" EnableIFrame="true" |
||||
|
IFrameUrl="about:blank" Height="200px" Width="400px"> |
||||
|
|
||||
|
</f:Window> |
||||
|
<f:HiddenField runat="server" ID ="TXT_State"></f:HiddenField> |
||||
|
</form> |
||||
|
<script> |
||||
|
//function onGridAfterEdit(event, value, params) { |
||||
|
// var me = this, columnId = params.columnId, rowId = params.rowId; |
||||
|
// alert("me:" + me) |
||||
|
// alert("columnId:" + columnId); |
||||
|
// alert("rowValue:" + value.value); |
||||
|
// alert("params:" + rowId); |
||||
|
// if (columnId == undefined) { |
||||
|
// alert("22:"); |
||||
|
// //var chineseScore = me.getCellValue(rowId, 'ProduceDate'); |
||||
|
// //alert("chineseScore:"+chineseScore); |
||||
|
// me.updateCellValue('1', 'Batch1', "180712"); |
||||
|
|
||||
|
// } |
||||
|
//} |
||||
|
function f_onAfterEdit(event, value, params) |
||||
|
{ |
||||
|
alert("11:"); |
||||
|
var me = this, rowId = params.rowId; |
||||
|
if (params.columnId === 'ProduceDate') { |
||||
|
|
||||
|
me.updateCellValue(rowId, 'Batch1', value); |
||||
|
} |
||||
|
alert("33:"); |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
</body> |
||||
|
</html> |
@ -0,0 +1,491 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
|
using System.Linq.Expressions; |
||||
|
using System.Web; |
||||
|
using System.Web.UI; |
||||
|
using System.Web.UI.WebControls; |
||||
|
using CK.SCP.Models; |
||||
|
using CK.SCP.Models.ScpEntity; |
||||
|
using CK.SCP.Utils; |
||||
|
using CK.SCP.Controller; |
||||
|
using FineUI; |
||||
|
using SCP.Code; |
||||
|
using CK.SCP.Models.Enums; |
||||
|
|
||||
|
namespace SCP.SupplierData.SupplierLogistics |
||||
|
{ |
||||
|
public partial class SCP_ASN_CREATE : PageBase |
||||
|
{ |
||||
|
|
||||
|
protected void Page_Load(object sender, EventArgs e) |
||||
|
{ |
||||
|
if (!IsPostBack) |
||||
|
{ |
||||
|
|
||||
|
GetV_TB_POData(); |
||||
|
if (Request.QueryString["State"] != null) |
||||
|
{ |
||||
|
if (Request.QueryString["State"] == "1") |
||||
|
{ |
||||
|
BindDetail(true); |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
BindDetail(); |
||||
|
} |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
BindDetail(); |
||||
|
} |
||||
|
SetRoleRule(); |
||||
|
TranslatorAgents(Toolbar1); |
||||
|
TranslatorAgent(Grid_V_TB_ASK_DETAIL); |
||||
|
TranslatorAgents(FormRow_1); |
||||
|
TranslatorAgents(FormRow_2); |
||||
|
TranslatorAgents(FormRow_3); |
||||
|
} |
||||
|
} |
||||
|
private void SetRoleRule() |
||||
|
{ |
||||
|
IsPriceVisible(Grid_V_TB_ASK_DETAIL, "价格"); |
||||
|
|
||||
|
} |
||||
|
public void SearchV_TB_ASK_DETAILData(Action<IQueryable<V_TB_ASK_DETAIL>> p_action) |
||||
|
{ |
||||
|
V_TB_ASK_DETAIL _entity = new V_TB_ASK_DETAIL(); |
||||
|
_entity.AskBillNum = Request["AskBillNum"]; |
||||
|
SCP_ASK_CONTROLLER.Get_V_TB_ASK_DETAIL_List(_entity, (_ret) => { |
||||
|
if (_ret.State == ReturnStatus.Succeed) |
||||
|
{ |
||||
|
p_action(_ret.Result); |
||||
|
} |
||||
|
}); |
||||
|
} |
||||
|
public void GetV_TB_POData() |
||||
|
{ |
||||
|
V_TB_ASK _entity = new V_TB_ASK(); |
||||
|
_entity.AskBillNum = Request["AskBillNum"]; |
||||
|
_entity.UserInAddress = CurrentUser.FactoryList; |
||||
|
_entity.UserInVendIds = CurrentUser.VenderList; |
||||
|
SCP_ASK_CONTROLLER.Get_V_TB_ASK_List(_entity, (_ret) => |
||||
|
{ |
||||
|
if (_ret.State == ReturnStatus.Succeed) |
||||
|
{ |
||||
|
var _result = _ret.Result.FirstOrDefault(); |
||||
|
Session["Ask"] = _result; |
||||
|
this.TXT_AskBillNum.Text = _result.AskBillNum; |
||||
|
this.TXT_State.Text = _result.State.ToString(); |
||||
|
this.TXT_Site.Text = _result.Site_Desc; |
||||
|
this.TXT_State_Desc.Text = _result.State_DESC; |
||||
|
this.TXT_VendName.Text = _result.VendName; |
||||
|
this.TXT_Remark.Text = _result.Remark; |
||||
|
this.TXT_SubSite.Text = _result.SubSite; |
||||
|
this.TXT_Extend1.Text = _result.Extend1; |
||||
|
this.TXT_Extend2.Text = _result.Extend2; |
||||
|
this.TXT_Extend3.Text = _result.Extend3; |
||||
|
DP_ShipTime.SelectedDate = DateTime.Now; |
||||
|
DDL_PORT.DataSource = ScpCache.PortList.Where(p => CurrentUser.FactoryList.Contains(p.FACTORY_ID)); |
||||
|
DDL_PORT.DataBind(); |
||||
|
DDL_PORT.SelectedValue = _result.ReceivedPort; |
||||
|
|
||||
|
#region 按钮控制
|
||||
|
|
||||
|
|
||||
|
#endregion
|
||||
|
} |
||||
|
}); |
||||
|
} |
||||
|
public void BindDetail(bool p_state=false) |
||||
|
{ |
||||
|
|
||||
|
|
||||
|
SearchV_TB_ASK_DETAILData((ret) => { |
||||
|
Grid_V_TB_ASK_DETAIL.RecordCount = ret.Count(); |
||||
|
var list = SortAndPage<V_TB_ASK_DETAIL>(ret, Grid_V_TB_ASK_DETAIL); |
||||
|
var _ls = SCP_ASK_CONTROLLER.Get_CAN_SHIPQTY(list.ToList()); |
||||
|
var _notifyList = new List<string>(); |
||||
|
_ls.ForEach(p => |
||||
|
{ |
||||
|
if (p.PackQty == 1 || p.PackQty == 0) |
||||
|
{ |
||||
|
_notifyList.Add(string.Format("请注意零件编号{0}行号{1}标包数为1是否填写正确,如果不正确请修改", p.PartCode, p.PoLine)); |
||||
|
|
||||
|
} |
||||
|
|
||||
|
p.Batch = DateTime.Now.ToString("yyMMdd"); |
||||
|
p.ProduceDate = DateTime.Now; |
||||
|
if (p_state == true) |
||||
|
{ |
||||
|
p.TempQty = p.CanQty; |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
p.TempQty = 0; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
); |
||||
|
|
||||
|
Grid_V_TB_ASK_DETAIL.DataSource = _ls; |
||||
|
Grid_V_TB_ASK_DETAIL.DataBind(); |
||||
|
if (_notifyList.Count > 0) |
||||
|
{ |
||||
|
Alert.Show(string.Join("<br>", _notifyList)); |
||||
|
|
||||
|
} |
||||
|
|
||||
|
}); |
||||
|
|
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
private void IsBatch(string batch) |
||||
|
{ |
||||
|
try |
||||
|
{ |
||||
|
batch = batch.Trim(); |
||||
|
if (batch.Length != 6) |
||||
|
{ |
||||
|
Alert.Show($"批次号【{batch}】必需是6位,格式为 YYMMDD"); |
||||
|
} |
||||
|
|
||||
|
int y = Convert.ToInt32(batch.Substring(0, 2)); |
||||
|
int m = Convert.ToInt32(batch.Substring(2, 2)); |
||||
|
int d = Convert.ToInt32(batch.Substring(4, 2)); |
||||
|
|
||||
|
var date = new DateTime(y, m, d); |
||||
|
if (date.Date > DateTime.Now.Date) |
||||
|
{ |
||||
|
Alert.Show($"批次号【{batch}】错误,不应大于发货日期"); |
||||
|
} |
||||
|
} |
||||
|
catch |
||||
|
{ |
||||
|
Alert.Show($"批次号【{batch}】错误,批次必需是 YYMMDD "); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
} |
||||
|
List<V_TB_ASK_DETAIL> _askDetaillist = new List<V_TB_ASK_DETAIL>(); |
||||
|
protected void btnCreate_Click(object sender, EventArgs e) |
||||
|
{ |
||||
|
if (string.IsNullOrEmpty(TXT_AskBillNum.Text) || string.IsNullOrEmpty(TXT_ShipUser.Text) || DP_ReceiveTime.SelectedDate==null || DP_ShipTime.SelectedDate==null) |
||||
|
{ |
||||
|
|
||||
|
PageContext.RegisterStartupScript(Alert.GetShowInTopReference("要货看板单据编号、发货人、到货时间、收货时间不能为空")); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
var _model=Session["Ask"] as V_TB_ASK; |
||||
|
|
||||
|
if (_model == null) |
||||
|
{ |
||||
|
PageContext.RegisterStartupScript(Alert.GetShowInTopReference("编辑的数据不正确")); |
||||
|
return; |
||||
|
} |
||||
|
if (_model.State != (int)AskState.Confirm && _model.State != (int)AskState.Receive && _model.State != (int)AskState.Ship) |
||||
|
{ |
||||
|
Alert.Show("要货看板必须为确认后状态"); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
Dictionary<int, Dictionary<string, object>> modifiedDict = Grid_V_TB_ASK_DETAIL.GetModifiedDict(); |
||||
|
|
||||
|
for (int i = 0, count = Grid_V_TB_ASK_DETAIL.Rows.Count; i < count; i++) |
||||
|
{ |
||||
|
|
||||
|
V_TB_ASK_DETAIL _entity = new V_TB_ASK_DETAIL(); |
||||
|
object[] rowDataKeys = Grid_V_TB_ASK_DETAIL.DataKeys[i]; |
||||
|
_entity.UID = ConvertHelper.To<Int32>(rowDataKeys[0]); |
||||
|
_entity.PoBillNum = rowDataKeys[1] as string; |
||||
|
_entity.PoLine = ConvertHelper.To<Int32>(rowDataKeys[2]); |
||||
|
_entity.PartCode = rowDataKeys[3] as string; |
||||
|
_entity.ShippedQty = ConvertHelper.To<Decimal>(rowDataKeys[4]); |
||||
|
_entity.ReceivedQty = ConvertHelper.To<Decimal>(rowDataKeys[5]); |
||||
|
_entity.BeginTime = ConvertHelper.To<DateTime>(rowDataKeys[6]); |
||||
|
_entity.EndTime = ConvertHelper.To<DateTime>(rowDataKeys[7]); |
||||
|
_entity.PoUnit = rowDataKeys[8] as string; |
||||
|
_entity.LocUnit = rowDataKeys[9] as string; |
||||
|
_entity.Price = ConvertHelper.To<Decimal>(rowDataKeys[10]); |
||||
|
_entity.Currency = rowDataKeys[11] as string; |
||||
|
_entity.PackQty = ConvertHelper.To<Decimal>(rowDataKeys[12]); |
||||
|
_entity.UnConv = ConvertHelper.To<Decimal>(rowDataKeys[13]); |
||||
|
_entity.DockCode = rowDataKeys[14] as string; |
||||
|
_entity.State = ConvertHelper.To<Int32>(rowDataKeys[15]); |
||||
|
_entity.Remark = rowDataKeys[21] as string; //把用户信息传给备注
|
||||
|
_entity.CreateTime = ConvertHelper.To<DateTime>(rowDataKeys[17]); |
||||
|
_entity.CreateUser = rowDataKeys[18] as string; |
||||
|
_entity.UpdateTime = ConvertHelper.To<DateTime?>(rowDataKeys[19]); |
||||
|
_entity.UpdateUser = rowDataKeys[20] as string; |
||||
|
_entity.UpdateInfo = rowDataKeys[21] as string; |
||||
|
_entity.IsDeleted = ConvertHelper.To<Boolean>(rowDataKeys[22]); |
||||
|
_entity.PartDesc1 = rowDataKeys[23] as string; |
||||
|
_entity.CurrencyDesc = rowDataKeys[24] as string; |
||||
|
_entity.Site = rowDataKeys[25] as string; |
||||
|
_entity.VendName = rowDataKeys[26] as string; |
||||
|
_entity.PartDesc2 = rowDataKeys[27] as string; |
||||
|
_entity.AskBillNum = rowDataKeys[28] as string; |
||||
|
_entity.AskQty = ConvertHelper.To<Decimal>(rowDataKeys[29]); |
||||
|
_entity.TempQty = ConvertHelper.To<decimal>(rowDataKeys[30]); |
||||
|
_entity.ReceivedPort = rowDataKeys[31] as string; |
||||
|
_entity.ReduceQty = ConvertHelper.To<decimal>(rowDataKeys[33]); |
||||
|
_entity.ValidityDays = ConvertHelper.To<int>(rowDataKeys[34]); |
||||
|
_entity.Batch = ConvertHelper.To<string>(rowDataKeys[35]); |
||||
|
|
||||
|
_entity.ProduceDate = DateTime.Now; |
||||
|
if (Convert.ToDecimal(_entity.AskQty) == 0) |
||||
|
{ |
||||
|
PageContext.RegisterStartupScript(Alert.GetShowInTopReference("要货看板数量不能为 0")); |
||||
|
return; |
||||
|
} |
||||
|
if (modifiedDict.Keys.Contains(i)) |
||||
|
{ |
||||
|
var modifyValue = modifiedDict[i]; |
||||
|
var _Qty1 = modifyValue.Keys.Contains("TempQty") ? modifyValue["TempQty"] : _entity.TempQty; |
||||
|
var _Batch1 = modifyValue.Keys.Contains("Batch") ? modifyValue["Batch"] : _entity.Batch; |
||||
|
var _VendBatch = modifyValue.Keys.Contains("VendBatch") ? modifyValue["VendBatch"].ToString() : _entity.Batch; |
||||
|
var _ProduceDate = modifyValue.Keys.Contains("ProduceDate") ? modifyValue["ProduceDate"].ToString() : _entity.ProduceDate.ToString(); |
||||
|
if (modifyValue.Keys.Contains("SubSite")) |
||||
|
{ |
||||
|
_entity.SubSite = modifyValue["SubSite"].ToString(); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
if (modifyValue.Keys.Contains("Extend1")) |
||||
|
{ |
||||
|
_entity.Extend1 = modifyValue["Extend1"].ToString(); |
||||
|
} |
||||
|
|
||||
|
if (modifyValue.Keys.Contains("Extend2")) |
||||
|
{ |
||||
|
_entity.Extend2 = modifyValue["Extend2"].ToString(); |
||||
|
} |
||||
|
|
||||
|
if (modifyValue.Keys.Contains("Extend3")) |
||||
|
{ |
||||
|
_entity.Extend3 = modifyValue["Extend3"].ToString(); |
||||
|
} |
||||
|
|
||||
|
if (string.IsNullOrEmpty(_VendBatch) || string.IsNullOrEmpty(_ProduceDate)) |
||||
|
{ |
||||
|
Alert.Show("供应商批次和生产日期不能为空!"); |
||||
|
return; |
||||
|
} |
||||
|
object _PackQty = 0; |
||||
|
if (modifyValue.Keys.Contains("PackQty")) |
||||
|
{ |
||||
|
_PackQty = modifyValue["PackQty"]; |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
_PackQty = _entity.PackQty; |
||||
|
} |
||||
|
decimal QtyAll = 0; |
||||
|
if (ConvertHelper.To<decimal>(_Qty1) > 0) |
||||
|
{ |
||||
|
V_TB_ASK_DETAIL _detail = ConvertHelper.GetObjectClone<V_TB_ASK_DETAIL>(_entity); |
||||
|
var number = ConvertHelper.To<decimal>(_Qty1); |
||||
|
QtyAll += number; |
||||
|
if (QtyAll > 0) |
||||
|
{ |
||||
|
DateTime _d = DateTime.Now; |
||||
|
if (_ProduceDate == null && DateTime.TryParse(_ProduceDate.ToString(), out _d) == false) |
||||
|
{ |
||||
|
Alert.Show("日期填写错误!"); |
||||
|
return; |
||||
|
} |
||||
|
DateTime dt = DateTime.Parse(_ProduceDate.ToString()); |
||||
|
_detail.Batch = _Batch1.ToString().Trim(); |
||||
|
_detail.TempQty = number; |
||||
|
_detail.PackQty = ConvertHelper.To<decimal>(_PackQty); |
||||
|
_detail.VendBatch = _VendBatch.ToString(); |
||||
|
_detail.ProduceDate = dt; |
||||
|
_askDetaillist.Add(_detail); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
if (modifyValue.Keys.Contains("Qty2") && modifyValue.Keys.Contains("Batch2")) |
||||
|
{ |
||||
|
var _Qty2 = modifyValue["Qty2"]; |
||||
|
var _Batch2 = modifyValue["Batch2"]; |
||||
|
|
||||
|
if (_Batch2.ToString().Trim() != "" && ConvertHelper.To<decimal>(_Qty2) > 0) |
||||
|
{ |
||||
|
V_TB_ASK_DETAIL _detail = ConvertHelper.GetObjectClone<V_TB_ASK_DETAIL>(_entity); |
||||
|
IsBatch(_Batch2.ToString().Trim()); |
||||
|
var number = ConvertHelper.To<decimal>(_Qty2); |
||||
|
QtyAll += number; |
||||
|
if (QtyAll > 0) |
||||
|
{ |
||||
|
_detail.Batch = _Batch2.ToString().Trim(); |
||||
|
_detail.TempQty = number; |
||||
|
_detail.PackQty = ConvertHelper.To<decimal>(_PackQty); |
||||
|
_detail.VendBatch = _VendBatch.ToString(); |
||||
|
_detail.ProduceDate = DateTime.Parse(_ProduceDate.ToString()); |
||||
|
_askDetaillist.Add(_detail); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
if (modifyValue.Keys.Contains("Qty3") && modifyValue.Keys.Contains("Batch3")) |
||||
|
{ |
||||
|
var _Qty3 = modifyValue["Qty3"]; |
||||
|
var _Batch3 = modifyValue["Batch3"]; |
||||
|
if (_Batch3.ToString().Trim() != "" && ConvertHelper.To<decimal>(_Qty3) > 0) |
||||
|
{ |
||||
|
V_TB_ASK_DETAIL _detail = ConvertHelper.GetObjectClone<V_TB_ASK_DETAIL>(_entity); |
||||
|
IsBatch(_Batch3.ToString().Trim()); |
||||
|
var number = ConvertHelper.To<decimal>(_Qty3); |
||||
|
QtyAll += number; |
||||
|
if (QtyAll > 0) |
||||
|
{ |
||||
|
_detail.Batch = _Batch3.ToString().Trim(); |
||||
|
_detail.TempQty = number; |
||||
|
_detail.PackQty = ConvertHelper.To<decimal>(_PackQty); |
||||
|
_detail.VendBatch = _VendBatch.ToString(); |
||||
|
_detail.ProduceDate = DateTime.Parse(_ProduceDate.ToString()); |
||||
|
_askDetaillist.Add(_detail); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
if (QtyAll > _entity.AskQty - _entity.ShippedQty - _entity.ReduceQty) |
||||
|
{ |
||||
|
PageContext.RegisterStartupScript(Alert.GetShowInTopReference(_entity.PartCode + "发货数量>可发数量-减产数量")); |
||||
|
return; |
||||
|
} |
||||
|
_entity.ShippedQty = _entity.ShippedQty + QtyAll; |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
if (_entity.TempQty > 0) |
||||
|
{ |
||||
|
V_TB_ASK_DETAIL _detail = ConvertHelper.GetObjectClone<V_TB_ASK_DETAIL>(_entity); |
||||
|
_entity.Batch = DateTime.Now.ToString("yyMMdd"); |
||||
|
_entity.VendBatch = DateTime.Now.ToString("yyMMdd"); |
||||
|
_entity.ShippedQty = _entity.TempQty; |
||||
|
_entity.ProduceDate = DateTime.Now; |
||||
|
_entity.PackQty = _entity.PackQty; |
||||
|
_askDetaillist.Add(_detail); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
_model.ShipTime = DP_ShipTime.SelectedDate; |
||||
|
_model.ShipUser = TXT_ShipUser.Text; |
||||
|
_model.ReceiveTime = DP_ReceiveTime.SelectedDate; |
||||
|
_model.ReceiveUser = _model.Buyer; |
||||
|
List<string> _ls = new List<string>(); |
||||
|
if (_askDetaillist.Count == 0) |
||||
|
{ |
||||
|
Alert.Show("发货数量未填写"); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
if (CurrentUser.FactoryList.Count > 0) |
||||
|
{ |
||||
|
if (CurrentUser.FactoryList.FirstOrDefault()== "CNS" || CurrentUser.FactoryList.FirstOrDefault() == "BJCIAI") |
||||
|
{ |
||||
|
_askDetaillist.ForEach(p => |
||||
|
{ |
||||
|
p.VendBatch = p.Batch; |
||||
|
|
||||
|
}); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
var ret=SCP_ASK_CONTROLLER.Save_ASK_TO_ASN(_model, _askDetaillist, TXT_PlateNumber.Text, CurrentUser.ChineseName ,CurrentUser.CellPhone); |
||||
|
if (ret.State == ReturnStatus.Succeed) |
||||
|
{ |
||||
|
Alert.Show("生成发货单成功!"); |
||||
|
GetV_TB_POData(); |
||||
|
BindDetail(); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
private string GetBatch(DateTime dt) |
||||
|
{ |
||||
|
string strResult = ""; |
||||
|
|
||||
|
if (dt != null) |
||||
|
{ |
||||
|
string strYear = dt.Year.ToString().Substring(2, 2); |
||||
|
string strMonth = ""; |
||||
|
int iMonth = dt.Month; |
||||
|
|
||||
|
if (iMonth.ToString().Length == 1) |
||||
|
{ |
||||
|
strMonth = "0" + iMonth.ToString(); |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
strMonth = iMonth.ToString(); |
||||
|
} |
||||
|
string strDay = dt.Day.ToString(); |
||||
|
if (strDay.Length == 1) |
||||
|
{ |
||||
|
strDay = "0" + strDay; |
||||
|
} |
||||
|
|
||||
|
strResult = strYear + strMonth + strDay; |
||||
|
} |
||||
|
|
||||
|
return strResult; |
||||
|
} |
||||
|
protected void Grid_V_TB_ASK_DETAIL_PageIndexChange(object sender, GridPageEventArgs e) |
||||
|
{ |
||||
|
BindDetail(); |
||||
|
} |
||||
|
|
||||
|
protected void ddlGridPageSize_SelectedIndexChanged(object sender, EventArgs e) |
||||
|
{ |
||||
|
Grid_V_TB_ASK_DETAIL.PageSize = Convert.ToInt32(ddlGridPageSize.SelectedValue); |
||||
|
BindDetail(); |
||||
|
} |
||||
|
|
||||
|
protected void Grid_V_TB_ASK_DETAIL_RowDataBound(object sender, GridRowEventArgs e) |
||||
|
{ |
||||
|
|
||||
|
//GridRow row = Grid_V_TB_ASK_DETAIL.Rows[e.RowIndex];
|
||||
|
//object[] rowDataKeys = Grid_V_TB_ASK_DETAIL.DataKeys[e.RowIndex];
|
||||
|
|
||||
|
////var TXT_PackQty = (NumberBox)row.FindControl("TXT_PackQty");
|
||||
|
////var txtBatch1 = (System.Web.UI.WebControls.TextBox)row.FindControl("txtBatch1");
|
||||
|
////var txtBatch2 = (System.Web.UI.WebControls.TextBox)row.FindControl("txtBatch2");
|
||||
|
////var txtBatch3 = (System.Web.UI.WebControls.TextBox)row.FindControl("txtBatch3");
|
||||
|
////var txtQty1 = (System.Web.UI.WebControls.TextBox)row.FindControl("txtQty1");
|
||||
|
////var txtQty2 = (System.Web.UI.WebControls.TextBox)row.FindControl("txtQty2");
|
||||
|
////var txtQty3 = (System.Web.UI.WebControls.TextBox)row.FindControl("txtQty3");
|
||||
|
//var _shippedQty = ConvertHelper.To<Decimal>(rowDataKeys[4]);
|
||||
|
//var _askQty = ConvertHelper.To<Decimal>(rowDataKeys[29]);
|
||||
|
//var a = row.TemplateContainers;
|
||||
|
//if (_shippedQty >= _askQty)
|
||||
|
//{
|
||||
|
|
||||
|
// //foreach (GridColumn column in Grid_V_TB_ASK_DETAIL.Columns)
|
||||
|
// //{
|
||||
|
// // e
|
||||
|
// // e.CellCssClasses[column.ColumnIndex] = "f-grid-cell-uneditable";
|
||||
|
// //}
|
||||
|
//}
|
||||
|
//else
|
||||
|
//{
|
||||
|
// //txtQty1.Text = "0";
|
||||
|
|
||||
|
// //txtBatch1.Text = DateTime.Now.ToString("yyMMdd");
|
||||
|
//}
|
||||
|
} |
||||
|
|
||||
|
protected void btnAll_Click(object sender, EventArgs e) |
||||
|
{ |
||||
|
BindDetail(true); |
||||
|
} |
||||
|
|
||||
|
//protected void btnSet_Click(object sender, EventArgs e)
|
||||
|
//{
|
||||
|
|
||||
|
//}
|
||||
|
} |
||||
|
} |
@ -0,0 +1,359 @@ |
|||||
|
//------------------------------------------------------------------------------
|
||||
|
// <自动生成>
|
||||
|
// 此代码由工具生成。
|
||||
|
//
|
||||
|
// 对此文件的更改可能导致不正确的行为,如果
|
||||
|
// 重新生成代码,则所做更改将丢失。
|
||||
|
// </自动生成>
|
||||
|
//------------------------------------------------------------------------------
|
||||
|
|
||||
|
namespace SCP.SupplierData.SupplierLogistics |
||||
|
{ |
||||
|
|
||||
|
|
||||
|
public partial class SCP_ASN_CREATE |
||||
|
{ |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// form1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::System.Web.UI.HtmlControls.HtmlForm form1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// pmg1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.PageManager pmg1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Panel1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Panel Panel1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Toolbar1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Toolbar Toolbar1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// btnCreate 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Button btnCreate; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// FormRow_1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.FormRow FormRow_1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TXT_State_Desc 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox TXT_State_Desc; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TXT_AskBillNum 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox TXT_AskBillNum; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TXT_VendName 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox TXT_VendName; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TXT_Site 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox TXT_Site; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TXT_SubSite 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox TXT_SubSite; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TXT_Extend1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox TXT_Extend1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TXT_Extend2 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox TXT_Extend2; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TXT_Extend3 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox TXT_Extend3; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// FormRow_2 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.FormRow FormRow_2; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TXT_PlateNumber 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox TXT_PlateNumber; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TXT_ShipUser 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox TXT_ShipUser; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// DP_ShipTime 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.DatePicker DP_ShipTime; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// DP_ReceiveTime 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.DatePicker DP_ReceiveTime; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// FormRow_3 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.FormRow FormRow_3; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// DDL_PORT 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.DropDownList DDL_PORT; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TXT_Remark 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox TXT_Remark; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Grid_V_TB_ASK_DETAIL 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Grid Grid_V_TB_ASK_DETAIL; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// ToolbarSeparator1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.ToolbarSeparator ToolbarSeparator1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// ToolbarText1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.ToolbarText ToolbarText1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// ddlGridPageSize 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.DropDownList ddlGridPageSize; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TXT_PackQty 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.NumberBox TXT_PackQty; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// txtBatch1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox txtBatch1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// NumberBox1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.NumberBox NumberBox1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// DatePicker1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.DatePicker DatePicker1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TextBox1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox TextBox1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// NumberBox2 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.NumberBox NumberBox2; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TextBox2 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox TextBox2; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// NumberBox4 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.NumberBox NumberBox4; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TXT_VendBatch 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.TextBox TXT_VendBatch; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Window1 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Window Window1; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// WindowUpload 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.Window WindowUpload; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// TXT_State 控件。
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 自动生成的字段。
|
||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
|
/// </remarks>
|
||||
|
protected global::FineUI.HiddenField TXT_State; |
||||
|
} |
||||
|
} |
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue