作业本送货变二级菜单
三级菜单 作业本送货不变,
增加 送货安排
送货计划
送货情况
菜单
送货管理=》作业本送货 02
作业本送货 =》 作业本送货 01
有权限 管理员 业务员/客户经理 行政 库管 财务经理 生产管理
能修改 管理员 行政 财务经理 生产管理
作业本送货 =》 送货计划 /Pages/business/DeliverWorkBookAnPaiList.aspx 02
修改 case_onEdit 撤销 case_onDele
作业本送货 =》 送货情况 /Pages/business/DeliverWorkBookLiShiAnPaiList.aspx 03
注意修改数据库的数据
工作内容要多条合成一条
ALTER TABLE [dbo].[CoreDeliverOrder] ADD DriverId [int] NULL ;
GO
| | |
| | | OBJECT_PATH.Add(DALInterface.ICoreCmsPlanOrderDAL, "CoreCmsPlanOrderDAL"); |
| | | OBJECT_PATH.Add(DALInterface.ICoreCmsPlanOrderItemDAL, "CoreCmsPlanOrderItemDAL"); |
| | | OBJECT_PATH.Add(DALInterface.IOA_YujihuikuanDAL, "OA_YujihuikuanDAL"); |
| | | OBJECT_PATH.Add(DALInterface.IOA_CuikuanjiluDAL, "OA_CuikuanjiluDAL"); |
| | | OBJECT_PATH.Add(DALInterface.IOA_CuikuanjiluDAL, "OA_CuikuanjiluDAL"); |
| | | OBJECT_PATH.Add(DALInterface.ICoreDeliverOrderItemDAL, "CoreDeliverOrderItemDAL"); |
| | | OBJECT_PATH.Add(DALInterface.ICoreDeliverOrderDAL, "CoreDeliverOrderDAL"); |
| | | #endregion |
| | | |
| | | #region Pay |
| | |
| | | /// 工作内容 |
| | | /// </summary> |
| | | IOA_GongzuoneirongDAL = 1952, |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// 工作内容 |
| | | /// </summary> |
| | | ICoreDeliverOrderItemDAL = 1953, |
| | | |
| | | /// <summary> |
| | | /// 工作内容 |
| | | /// </summary> |
| | | ICoreDeliverOrderDAL = 1954, |
| | | |
| | | /// <summary> |
| | | /// 开票申请 |
| | | /// </summary> |
| | | IOA_KaipiaonewDAL = 1932, |
| | |
| | | <Compile Include="OA\CoreCmsPlanOrderBLL.cs" /> |
| | | <Compile Include="OA\CoreCmsPlanOrderFahuoBLL.cs" /> |
| | | <Compile Include="OA\CoreCmsPlanOrderItemBLL.cs" /> |
| | | <Compile Include="OA\CoreDeliverOrderBLL.cs" /> |
| | | <Compile Include="OA\CoreDeliverOrderItemBLL.cs" /> |
| | | <Compile Include="OA\OA_BaozhengjinBLL.cs" /> |
| | | <Compile Include="OA\OA_BaozhengjincuishouBLL.cs" /> |
| | | <Compile Include="OA\OA_CarDictionaryBLL.cs" /> |
| | |
| | | /// <summary> |
| | | /// 获取全部合作客户 |
| | | /// </summary> |
| | | /// <param name="orderkeyid">主键id</param> |
| | | /// <returns></returns> |
| | | public IEnumerable<CoreDeliverOrderItem> GetDeliverModelsByplanOrderid(int planorderkeyid) |
| | | { |
| | | Query query = new Query(); |
| | | return _ICoreCmsPlanOrderItemDAL.GetDeliverModelsByplanOrderid(planorderkeyid); |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 获取全部合作客户 |
| | | /// </summary> |
| | | /// <param name="Keyid">主键id</param> |
| | | /// <returns></returns> |
| | | public CoreCmsPlanOrderItem GetModelByKeyid(int keyid) |
| New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using CY.IDAL; |
| | | using CY.Model; |
| | | using AbstractFactory; |
| | | using CY.IBaseDAL; |
| | | using CY.Infrastructure.DESEncrypt; |
| | | using CY.Infrastructure.Query; |
| | | |
| | | namespace CY.BLL |
| | | { |
| | | public class CoreDeliverOrderBLL |
| | | { |
| | | ICoreDeliverOrderDAL _ICoreDeliverOrderDAL = null; |
| | | OA_StaffBLL staffBLL = null; |
| | | |
| | | /// <summary> |
| | | /// 初始化构造 |
| | | /// </summary> |
| | | public CoreDeliverOrderBLL() |
| | | { |
| | | //获取CoreDeliverOrder DAL实现 |
| | | _ICoreDeliverOrderDAL = Factory.GetDALByInterfaceName(DALInterface.ICoreDeliverOrderDAL) as ICoreDeliverOrderDAL; |
| | | staffBLL = new OA_StaffBLL(); |
| | | |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 新增送货安排 |
| | | /// </summary> |
| | | /// <param name="rType"></param> |
| | | /// <param name="m_OA_CustomerCommunications"></param> |
| | | /// <param name="m_EC_AcceptWayByCustomers"></param> |
| | | /// <returns></returns> |
| | | public bool InsertModel(CY.Model.CoreDeliverOrder m_CoreDeliverOrder) |
| | | { |
| | | try |
| | | { |
| | | |
| | | return _ICoreDeliverOrderDAL.InserModel(m_CoreDeliverOrder); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | throw ex; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 新增送货安排 |
| | | /// </summary> |
| | | /// <param name="rType"></param> |
| | | /// <param name="m_OA_CustomerCommunications"></param> |
| | | /// <param name="m_EC_AcceptWayByCustomers"></param> |
| | | /// <returns></returns> |
| | | public int InsertModelIden(CY.Model.CoreDeliverOrder m_CoreDeliverOrder) |
| | | { |
| | | try |
| | | { |
| | | |
| | | return _ICoreDeliverOrderDAL.InsertModelIden(m_CoreDeliverOrder); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | throw ex; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// 修改送货安排 |
| | | /// </summary> |
| | | /// <param name="rType"></param> |
| | | /// <returns></returns> |
| | | public bool UpdateModel(CY.Model.CoreDeliverOrder m_CoreDeliverOrder) |
| | | { |
| | | try |
| | | { |
| | | return _ICoreDeliverOrderDAL.UpdateModel(m_CoreDeliverOrder); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | throw ex; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// 获取全部合作客户 |
| | | /// </summary> |
| | | /// <param name="Keyid">主键id</param> |
| | | /// <returns></returns> |
| | | public IEnumerable<CoreDeliverOrder> GetModelList() |
| | | { |
| | | Query query = new Query(); |
| | | return _ICoreDeliverOrderDAL.SelectAllModel(query); |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 根据formid获得信息 |
| | | /// </summary> |
| | | /// <param name="Keyid">编号</param> |
| | | /// <returns></returns> |
| | | public IEnumerable<Model.CoreDeliverOrder> GetModelByformid(Guid formid) |
| | | { |
| | | |
| | | return _ICoreDeliverOrderDAL.GetModelByformid(formid); |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 根据formid获得信息 |
| | | /// </summary> |
| | | /// <param name="Keyid">编号</param> |
| | | /// <returns></returns> |
| | | public IEnumerable<Model.CoreDeliverOrder> GetModelByorderid(int orderid) |
| | | { |
| | | |
| | | return _ICoreDeliverOrderDAL.GetModelByorderid(orderid); |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 获取全部合作客户 |
| | | /// </summary> |
| | | /// <param name="Keyid">主键id</param> |
| | | /// <returns></returns> |
| | | public CoreDeliverOrder GetModelByKeyid(string keyid) |
| | | { |
| | | |
| | | return _ICoreDeliverOrderDAL.GetModelByKeyid(keyid); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 删除合作客户 |
| | | /// </summary> |
| | | /// <param name="rType"></param> |
| | | /// <returns></returns> |
| | | public bool DeleteModel(CY.Model.CoreDeliverOrder rType) |
| | | { |
| | | try |
| | | { |
| | | _ICoreDeliverOrderDAL.DeleteModel(rType); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | throw ex; |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 查询合作客户分页列表 |
| | | /// </summary> |
| | | /// <param name="pa"></param> |
| | | /// <returns></returns> |
| | | public IEnumerable<CoreDeliverOrder> SelectModelPage(Pagination pa, Guid FirmId, int? DriverId, string shipAddress, |
| | | string BuyerName, string createTimeStart, string createTimeEnd) |
| | | { |
| | | string Condition = " and b.FirmId ='" + FirmId + "' and a.OrderState = 0 "; |
| | | if (DriverId.HasValue) |
| | | { |
| | | var oA_Staff = staffBLL.GetModelByKeyid(DriverId); |
| | | Condition += " and ( a.DeliveryMoble = '" + oA_Staff.MobieNum + "' or a.DriverId = '" + DriverId + "' )"; |
| | | } |
| | | |
| | | if (!string.IsNullOrEmpty(shipAddress)) |
| | | Condition += " and b.shipAddress = '" + shipAddress + "'"; |
| | | |
| | | if (!string.IsNullOrEmpty(BuyerName)) |
| | | Condition += " and c.BuyerName like '%" + BuyerName + "%'"; |
| | | |
| | | |
| | | if (!string.IsNullOrEmpty(createTimeStart)) |
| | | Condition += " and DATEDIFF(day,a.[MakeTime],'" + createTimeStart + "')<=0 "; |
| | | |
| | | if (!string.IsNullOrEmpty(createTimeEnd)) |
| | | Condition += " and DATEDIFF(day,a.[MakeTime],'" + createTimeEnd + "')>=0 "; |
| | | |
| | | |
| | | |
| | | Query query = new Query(); |
| | | IList<Criterion> criterias = new List<Criterion>() |
| | | { |
| | | new Criterion("", Condition), |
| | | |
| | | new Criterion("orderBy"," MakeTime desc ") |
| | | }; |
| | | query.Criteria = criterias; |
| | | return _ICoreDeliverOrderDAL.SelectModelPage(query, pa); |
| | | } |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// 查询合作客户分页列表 |
| | | /// </summary> |
| | | /// <param name="pa"></param> |
| | | /// <returns></returns> |
| | | public IEnumerable<CoreDeliverOrder> SelectModelPageLishi(Pagination pa, Guid FirmId, int? DriverId, string shipAddress, |
| | | string BuyerName, string createTimeStart, string createTimeEnd,string OrderState) |
| | | { |
| | | string Condition = " and b.FirmId ='" + FirmId + "' "; |
| | | |
| | | if (!string.IsNullOrEmpty(OrderState)) |
| | | { |
| | | Condition += " and a.OrderState = " + OrderState + " "; |
| | | } |
| | | else |
| | | { |
| | | Condition += " and a.OrderState in( 0,1,2 ) "; |
| | | } |
| | | if (DriverId.HasValue) |
| | | { |
| | | var oA_Staff = staffBLL.GetModelByKeyid(DriverId); |
| | | Condition += " and ( a.DeliveryMoble = '" + oA_Staff.MobieNum + "' or a.DriverId = '" + DriverId + "' )"; |
| | | } |
| | | |
| | | if (!string.IsNullOrEmpty(shipAddress)) |
| | | Condition += " and b.shipAddress = '" + shipAddress + "'"; |
| | | |
| | | if (!string.IsNullOrEmpty(BuyerName)) |
| | | Condition += " and c.BuyerName like '%" + BuyerName + "%'"; |
| | | |
| | | |
| | | if (!string.IsNullOrEmpty(createTimeStart)) |
| | | Condition += " and DATEDIFF(day,a.[MakeTime],'" + createTimeStart + "')<=0 "; |
| | | |
| | | if (!string.IsNullOrEmpty(createTimeEnd)) |
| | | Condition += " and DATEDIFF(day,a.[MakeTime],'" + createTimeEnd + "')>=0 "; |
| | | |
| | | |
| | | |
| | | Query query = new Query(); |
| | | IList<Criterion> criterias = new List<Criterion>() |
| | | { |
| | | new Criterion("", Condition), |
| | | |
| | | new Criterion("orderBy"," MakeTime desc ") |
| | | }; |
| | | query.Criteria = criterias; |
| | | return _ICoreDeliverOrderDAL.SelectModelPage(query, pa); |
| | | } |
| | | |
| | | |
| | | } |
| | | } |
| New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using CY.IDAL; |
| | | using CY.Model; |
| | | using AbstractFactory; |
| | | using CY.IBaseDAL; |
| | | using CY.Infrastructure.DESEncrypt; |
| | | using CY.Infrastructure.Query; |
| | | |
| | | namespace CY.BLL |
| | | { |
| | | public class CoreDeliverOrderItemBLL |
| | | { |
| | | ICoreDeliverOrderItemDAL _ICoreDeliverOrderItemDAL = null; |
| | | |
| | | /// <summary> |
| | | /// 初始化构造 |
| | | /// </summary> |
| | | public CoreDeliverOrderItemBLL() |
| | | { |
| | | //获取CoreDeliverOrderItem DAL实现 |
| | | _ICoreDeliverOrderItemDAL = Factory.GetDALByInterfaceName(DALInterface.ICoreDeliverOrderItemDAL) as ICoreDeliverOrderItemDAL; |
| | | |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 新增送货安排 |
| | | /// </summary> |
| | | /// <param name="rType"></param> |
| | | /// <param name="m_OA_CustomerCommunications"></param> |
| | | /// <param name="m_EC_AcceptWayByCustomers"></param> |
| | | /// <returns></returns> |
| | | public bool InsertModel(CY.Model.CoreDeliverOrderItem m_CoreDeliverOrderItem) |
| | | { |
| | | try |
| | | { |
| | | |
| | | return _ICoreDeliverOrderItemDAL.InserModel(m_CoreDeliverOrderItem); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | throw ex; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 修改送货安排 |
| | | /// </summary> |
| | | /// <param name="rType"></param> |
| | | /// <returns></returns> |
| | | public bool UpdateModel(CY.Model.CoreDeliverOrderItem m_CoreDeliverOrderItem) |
| | | { |
| | | try |
| | | { |
| | | return _ICoreDeliverOrderItemDAL.UpdateModel(m_CoreDeliverOrderItem); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | throw ex; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取全部合作客户 |
| | | /// </summary> |
| | | /// <param name="Keyid">主键id</param> |
| | | /// <returns></returns> |
| | | public IEnumerable<CoreDeliverOrderItem> GetModelList() |
| | | { |
| | | Query query = new Query(); |
| | | return _ICoreDeliverOrderItemDAL.SelectAllModel(query); |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 获取全部合作客户 |
| | | /// </summary> |
| | | /// <param name="orderid">主键id</param> |
| | | /// <returns></returns> |
| | | public IEnumerable<CoreDeliverOrderItem> GetModelsByOrderid(string orderid) |
| | | { |
| | | Query query = new Query(); |
| | | return _ICoreDeliverOrderItemDAL.GetModelsByOrderid(orderid); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// 获取全部合作客户 |
| | | /// </summary> |
| | | /// <param name="Keyid">主键id</param> |
| | | /// <returns></returns> |
| | | public CoreDeliverOrderItem GetModelByKeyid(int keyid) |
| | | { |
| | | |
| | | return _ICoreDeliverOrderItemDAL.getCoreDeliverOrderItem(keyid); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 删除合作客户 |
| | | /// </summary> |
| | | /// <param name="rType"></param> |
| | | /// <returns></returns> |
| | | public bool DeleteModel(CY.Model.CoreDeliverOrderItem rType) |
| | | { |
| | | try |
| | | { |
| | | _ICoreDeliverOrderItemDAL.DeleteModel(rType); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | throw ex; |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | } |
| | |
| | | /// <param name="pa"></param> |
| | | /// <returns></returns> |
| | | public IEnumerable<OA_Kaipiaoshenqing> SelectModelPage(Pagination pa, Guid FirmId, string CreateTimeStart, string CreateTimeEnd, |
| | | string Kaipiaoshenqing, string Kehuqianshou, string BusinessManagerId, string CustormerName, string PayStates, string HuikuanStates) |
| | | string Kaipiaoshenqing, string Kehuqianshou, string BusinessManagerId, string CustormerName, string PayStates, string HuikuanStates,string Fapiaohao) |
| | | { |
| | | string Condition = " and ok.FirmId ='" + FirmId + "' and ok.ApprovalStatus = 1 "; |
| | | |
| | |
| | | Condition += " and ( ( ok.Shenqingleixing ='订单开票' and EXISTS ( select eoe.[KaipiaoshenqingId] from [EC_OrderExtend] eoe inner join [EC_OrderBasic] eob on eob.Keyid = eoe.Keyid where ok.Keyid = eoe.[KaipiaoshenqingId] and eob.PayState !=-1 ) ) or ( ok.Shenqingleixing ='预付款开票' and ok.[Kehumoney] < ok.[kpmoney] ) )"; |
| | | } |
| | | } |
| | | |
| | | if (!string.IsNullOrEmpty(Fapiaohao)) |
| | | Condition += " and ok.Fapiaohao like '%" + Fapiaohao + "%'"; |
| | | |
| | | Query query = new Query(); |
| | | IList<Criterion> criterias = new List<Criterion>() |
| | |
| | | <Compile Include="OA\ICoreCmsPlanOrderDAL.cs" /> |
| | | <Compile Include="OA\ICoreCmsPlanOrderFahuoDAL.cs" /> |
| | | <Compile Include="OA\ICoreCmsPlanOrderItemDAL.cs" /> |
| | | <Compile Include="OA\ICoreDeliverOrderDAL.cs" /> |
| | | <Compile Include="OA\ICoreDeliverOrderItemDAL.cs" /> |
| | | <Compile Include="OA\IOA_BaozhengjincuishouDAL.cs" /> |
| | | <Compile Include="OA\IOA_BaozhengjinDAL.cs" /> |
| | | <Compile Include="OA\IOA_CarrepairDAL.cs" /> |
| | |
| | | /// <returns></returns> |
| | | IEnumerable<CoreDeliverOrderItem> GetDeliverModelsByZongOrderid(int orderkeyid); |
| | | |
| | | |
| | | /// <summary> |
| | | /// 根据总orderid获得信息 |
| | | /// </summary> |
| | | /// <param name="orderkeyid">编号</param> |
| | | /// <returns></returns> |
| | | IEnumerable<CoreDeliverOrderItem> GetDeliverModelsByplanOrderid(int planorderkeyid); |
| | | |
| | | } |
| | | } |
| New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Data; |
| | | using System.Data.SqlClient; |
| | | using CY.IBaseDAL; |
| | | using CY.Model; |
| | | |
| | | namespace CY.IDAL |
| | | { |
| | | public interface ICoreDeliverOrderDAL : ICommonDAL, IPaging<CoreDeliverOrder>, IGetAllModel<CoreDeliverOrder> |
| | | { |
| | | /// <summary> |
| | | /// 根据编号获得信息 |
| | | /// </summary> |
| | | /// <param name="Keyid">编号</param> |
| | | /// <returns></returns> |
| | | CoreDeliverOrder GetModelByKeyid(string keyid); |
| | | |
| | | /// <summary> |
| | | /// 根据formid获得信息 |
| | | /// </summary> |
| | | /// <param name="Keyid">编号</param> |
| | | /// <returns></returns> |
| | | IEnumerable<CoreDeliverOrder> GetModelByformid(Guid formid); |
| | | |
| | | /// <summary> |
| | | /// 根据orderid获得信息 |
| | | /// </summary> |
| | | /// <param name="Keyid">编号</param> |
| | | /// <returns></returns> |
| | | IEnumerable<CoreDeliverOrder> GetModelByorderid(int orderid); |
| | | |
| | | //增加实体 |
| | | int InsertModelIden(CY.Model.CoreDeliverOrder model); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | } |
| New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Data; |
| | | using System.Data.SqlClient; |
| | | using CY.IBaseDAL; |
| | | using CY.Model; |
| | | |
| | | namespace CY.IDAL |
| | | { |
| | | public interface ICoreDeliverOrderItemDAL : ICommonDAL, IPaging<CoreDeliverOrderItem>, IGetAllModel<CoreDeliverOrderItem> |
| | | { |
| | | /// <summary> |
| | | /// 根据编号获得信息 |
| | | /// </summary> |
| | | /// <param name="Keyid">编号</param> |
| | | /// <returns></returns> |
| | | CoreDeliverOrderItem getCoreDeliverOrderItem(int keyid); |
| | | |
| | | /// <summary> |
| | | /// 根据orderid获得信息 |
| | | /// </summary> |
| | | /// <param name="Keyid">编号</param> |
| | | /// <returns></returns> |
| | | IEnumerable<CoreDeliverOrderItem> GetModelsByOrderid(string orderid); |
| | | |
| | | |
| | | } |
| | | } |
| | |
| | | <Compile Include="OA\CoreCmsPlanOrder.cs" /> |
| | | <Compile Include="OA\CoreCmsPlanOrderFahuo.cs" /> |
| | | <Compile Include="OA\CoreCmsPlanOrderItem.cs" /> |
| | | <Compile Include="OA\CoreDeliverOrder.cs" /> |
| | | <Compile Include="OA\CoreDeliverOrderItem.cs" /> |
| | | <Compile Include="OA\EC_OrderLiuyang.cs" /> |
| | | <Compile Include="OA\OA_attachment.cs" /> |
| New file |
| | |
| | | using System; |
| | | using CY.Infrastructure.Domain; |
| | | using CY.Infrastructure.Common; |
| | | |
| | | namespace CY.Model |
| | | { |
| | | /// <summary> |
| | | /// 计划订单表 |
| | | /// </summary> |
| | | [Serializable] |
| | | public partial class CoreDeliverOrder : IAggregateRoot |
| | | { |
| | | public CoreDeliverOrder() |
| | | { |
| | | } |
| | | |
| | | #region Model |
| | | |
| | | /// <summary> |
| | | /// 序号 |
| | | /// </summary> |
| | | public Guid id { get; set; } |
| | | /// <summary> |
| | | /// 订单ID 关联order.id |
| | | /// </summary> |
| | | public int? OrderId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 司机电话 |
| | | /// </summary> |
| | | public System.String DeliveryMoble { get; set; } |
| | | |
| | | /// <summary> |
| | | ///司机id |
| | | /// </summary> |
| | | public int? DriverId { get; set; } |
| | | |
| | | |
| | | public System.String CreateBy { get; set; } |
| | | |
| | | public System.String UpDataBy { get; set; } |
| | | |
| | | public DateTime? CreateTime { get; set; } |
| | | |
| | | public DateTime? UpdataTime { get; set; } |
| | | |
| | | |
| | | |
| | | public System.String ContactName { get; set; } |
| | | |
| | | public System.String ContactPhone { get; set; } |
| | | |
| | | public System.String pianqu { get; set; } |
| | | public System.String shipAddress { get; set; } |
| | | public System.String DriverName { get; set; } |
| | | |
| | | public System.String BuyerName { get; set; } |
| | | public int OrderState { get; set; } |
| | | |
| | | |
| | | public string OrderStateName { get |
| | | { |
| | | if(OrderState == 0) |
| | | { |
| | | return "未送"; |
| | | } |
| | | else if(OrderState == 1) |
| | | { |
| | | return "配送中"; |
| | | } |
| | | else if (OrderState == 2) |
| | | { |
| | | return "已送"; |
| | | } |
| | | return "未送"; |
| | | |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 送货时间 |
| | | /// </summary> |
| | | public System.DateTime? MakeTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 送货时间 |
| | | /// </summary> |
| | | public System.DateTime? StartTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 送货时间 |
| | | /// </summary> |
| | | public System.DateTime? OverTime { get; set; } |
| | | |
| | | |
| | | public System.String Remarke { get; set; } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | #endregion Model |
| | | |
| | | #region Visiter |
| | | |
| | | /// <summary> |
| | | /// 属性访问器 |
| | | /// </summary> |
| | | /// <param name="name">属性名</param> |
| | | /// <param name="index">索引</param> |
| | | /// <param name="isChange">是否将指定属性设置为传入值</param> |
| | | /// <param name="value">需要赋予的值</param> |
| | | /// <returns>与名称对应的属性值</returns> |
| | | public object Visiter(string name, int? index = -1, bool isChange = false, object value = null) |
| | | { |
| | | object theValue = null; |
| | | |
| | | |
| | | if ("id".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 1) |
| | | { |
| | | this.id = isChange ? MyConvert.ConvertToGuid(value) : id; |
| | | theValue = this.id; |
| | | } |
| | | else if ("OrderId".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 2) |
| | | { |
| | | this.OrderId = isChange ? MyConvert.ConvertToInt32(value) : OrderId; |
| | | theValue = this.OrderId; |
| | | } |
| | | else if ("DeliveryMoble".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 3) |
| | | { |
| | | this.DeliveryMoble = isChange ? MyConvert.ConvertToString(value) : DeliveryMoble; |
| | | theValue = this.DeliveryMoble; |
| | | } |
| | | |
| | | else if ("MakeTime".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 8) |
| | | { |
| | | this.MakeTime = isChange ? MyConvert.ConvertToDateTime(value) : MakeTime; |
| | | theValue = this.MakeTime; |
| | | } |
| | | else if ("OrderState".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 9) |
| | | { |
| | | this.OrderState = isChange ? MyConvert.ConvertToInt32(value).Value : OrderState; |
| | | theValue = this.OrderState; |
| | | } |
| | | |
| | | else if ("CreateBy".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 10) |
| | | { |
| | | this.CreateBy = isChange ? MyConvert.ConvertToString(value) : CreateBy; |
| | | theValue = this.CreateBy; |
| | | } |
| | | else if ("UpDataBy".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 11) |
| | | { |
| | | this.UpDataBy = isChange ? MyConvert.ConvertToString(value) : UpDataBy; |
| | | theValue = this.UpDataBy; |
| | | } |
| | | else if ("CreateTime".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 12) |
| | | { |
| | | this.CreateTime = isChange ? MyConvert.ConvertToDateTime(value) : CreateTime; |
| | | theValue = this.CreateTime; |
| | | } |
| | | else if ("UpdataTime".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 13) |
| | | { |
| | | this.UpdataTime = isChange ? MyConvert.ConvertToDateTime(value) : UpdataTime; |
| | | theValue = this.UpdataTime; |
| | | } |
| | | |
| | | else if ("StartTime".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 14) |
| | | { |
| | | this.StartTime = isChange ? MyConvert.ConvertToDateTime(value) : StartTime; |
| | | theValue = this.StartTime; |
| | | } |
| | | else if ("OverTime".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 15) |
| | | { |
| | | this.OverTime = isChange ? MyConvert.ConvertToDateTime(value) : OverTime; |
| | | theValue = this.OverTime; |
| | | } |
| | | |
| | | else if ("Remarke".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 16) |
| | | { |
| | | this.Remarke = isChange ? MyConvert.ConvertToString(value) : Remarke; |
| | | theValue = this.Remarke; |
| | | } |
| | | |
| | | else if ("ContactName".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 17) |
| | | { |
| | | this.ContactName = isChange ? MyConvert.ConvertToString(value) : ContactName; |
| | | theValue = this.ContactName; |
| | | } |
| | | |
| | | else if ("ContactPhone".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 18) |
| | | { |
| | | this.ContactPhone = isChange ? MyConvert.ConvertToString(value) : ContactPhone; |
| | | theValue = this.ContactPhone; |
| | | } |
| | | |
| | | else if ("DriverId".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 19) |
| | | { |
| | | this.DriverId = isChange ? MyConvert.ConvertToInt32(value) : DriverId; |
| | | theValue = this.DriverId; |
| | | } |
| | | else if ("pianqu".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 20) |
| | | { |
| | | this.pianqu = isChange ? MyConvert.ConvertToString(value) : pianqu; |
| | | theValue = this.pianqu; |
| | | } |
| | | else if ("shipAddress".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 21) |
| | | { |
| | | this.shipAddress = isChange ? MyConvert.ConvertToString(value) : shipAddress; |
| | | theValue = this.shipAddress; |
| | | } |
| | | else if ("DriverName".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 22) |
| | | { |
| | | this.DriverName = isChange ? MyConvert.ConvertToString(value) : DriverName; |
| | | theValue = this.DriverName; |
| | | } |
| | | else if ("BuyerName".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 23) |
| | | { |
| | | this.BuyerName = isChange ? MyConvert.ConvertToString(value) : BuyerName; |
| | | theValue = this.BuyerName; |
| | | } |
| | | |
| | | return theValue; |
| | | } |
| | | |
| | | #endregion |
| | | } |
| | | } |
| | |
| | | public System.DateTime? OverTime { get; set; } |
| | | |
| | | |
| | | |
| | | public System.String CreateBy { get; set; } |
| | | |
| | | public System.String UpDataBy { get; set; } |
| | | |
| | | public DateTime? CreateTime { get; set; } |
| | | |
| | | public DateTime? UpdataTime { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 送货数量 |
| | | /// </summary> |
| | | public System.Int32 DingdanNumber { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 送货数量 |
| | | /// </summary> |
| | | public System.Int32 WeisongNumber { get; set; } |
| | | |
| | | #endregion Model |
| | | |
| | | #region Visiter |
| | |
| | | } |
| | | |
| | | |
| | | else if ("CreateBy".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 10) |
| | | { |
| | | this.CreateBy = isChange ? MyConvert.ConvertToString(value) : CreateBy; |
| | | theValue = this.CreateBy; |
| | | } |
| | | else if ("UpDataBy".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 11) |
| | | { |
| | | this.UpDataBy = isChange ? MyConvert.ConvertToString(value) : UpDataBy; |
| | | theValue = this.UpDataBy; |
| | | } |
| | | else if ("CreateTime".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 12) |
| | | { |
| | | this.CreateTime = isChange ? MyConvert.ConvertToDateTime(value) : CreateTime; |
| | | theValue = this.CreateTime; |
| | | } |
| | | else if ("UpdataTime".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 13) |
| | | { |
| | | this.UpdataTime = isChange ? MyConvert.ConvertToDateTime(value) : UpdataTime; |
| | | theValue = this.UpdataTime; |
| | | } |
| | | |
| | | |
| | | return theValue; |
| | | } |
| | | |
| | |
| | | |
| | | public string ZerenrenName { get; set; } |
| | | |
| | | public string DepartmentName { get; set; } |
| | | |
| | | public DateTime? LastUpdateTime { get; set; } |
| | | |
| | | |
| | |
| | | <Compile Include="OA\CoreCmsPlanOrderDAL.cs" /> |
| | | <Compile Include="OA\CoreCmsPlanOrderFahuoDAL.cs" /> |
| | | <Compile Include="OA\CoreCmsPlanOrderItemDAL.cs" /> |
| | | <Compile Include="OA\CoreDeliverOrderDAL.cs" /> |
| | | <Compile Include="OA\CoreDeliverOrderItemDAL.cs" /> |
| | | <Compile Include="OA\OA_BaozhengjincuishouDAL.cs" /> |
| | | <Compile Include="OA\OA_BaozhengjinDAL.cs" /> |
| | | <Compile Include="OA\OA_CarDictionaryDAL.cs" /> |
| | |
| | | condition += " and a.CreateTime >= '" + StartCreatTime.Value + "' "; |
| | | |
| | | if (EndCreatTime != null) |
| | | condition += " and a.CreateTime =< '" + EndCreatTime.Value.AddDays(1) + "' "; |
| | | condition += " and a.CreateTime <= '" + EndCreatTime.Value.AddDays(1) + "' "; |
| | | |
| | | if (StartReturnTime != null) |
| | | condition += " and d.DeliverTime >= '" + StartReturnTime.Value + "' "; |
| | |
| | | |
| | | |
| | | /// <summary> |
| | | /// 全部查询 |
| | | /// </summary> |
| | | /// <param name="query"></param> |
| | | /// <returns></returns> |
| | | public IEnumerable<Model.CoreDeliverOrderItem> GetDeliverModelsByplanOrderid(int planorderkeyid) |
| | | { |
| | | return _dataBase.SelectModel<Model.CoreDeliverOrderItem>(" a.*,b.[OrderId] as PlanOrderId,b.[MakeTime],b.[OrderState] ", " [CoreDeliverOrderItem] a Inner Join [CoreDeliverOrder] as b On(a.[OrderID]=b.[id] ) Inner Join [CoreCmsPlanOrder] as c On(b.[OrderID]=c.[id] ) ", " c.[id] = " + planorderkeyid + " and b.[OrderState] in (0,1) ") as IList<Model.CoreDeliverOrderItem>;//执行查询 |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 分页查询 |
| | | /// </summary> |
| | | /// <param name="query"></param> |
| New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using CY.IDAL; |
| | | using System.Data.SqlClient; |
| | | using System.Data; |
| | | using CY.Model; |
| | | using System.Transactions; |
| | | |
| | | |
| | | namespace CY.SQLDAL |
| | | { |
| | | public class CoreDeliverOrderDAL : ICoreDeliverOrderDAL |
| | | { |
| | | private Database _dataBase = null; |
| | | #region 常量 |
| | | /// <summary> |
| | | /// 查询目标 |
| | | /// </summary> |
| | | const string SELECTTARGET = " t.* "; |
| | | /// <summary> |
| | | /// 查询来源 |
| | | /// </summary> |
| | | const string FROMSOUCEBEFORE = " ( select a.*,b.pianqu,b.shipAddress,c.BuyerName " + |
| | | " from [CoreDeliverOrder] a inner join CoreCmsPlanOrder b on a.OrderId = b.id inner join [EC_OrderBasic] c on b.orderkeyid = c.Keyid where 0=0 "; |
| | | const string FROMSOUCEEND = ") as t "; |
| | | /// <summary> |
| | | /// 分页默认排序字段 |
| | | /// </summary> |
| | | const string ORDERBY = " MakeTime desc "; |
| | | #endregion |
| | | public CoreDeliverOrderDAL() |
| | | { |
| | | _dataBase = new Database(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 新增 |
| | | /// </summary> |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | public bool InserModel(Infrastructure.Domain.IAggregateRoot model) |
| | | { |
| | | Model.CoreDeliverOrder trueModel = model as Model.CoreDeliverOrder; |
| | | if (trueModel == null) |
| | | { |
| | | return false; |
| | | } |
| | | |
| | | SqlParameter MakeTime = null; |
| | | if (trueModel.MakeTime.HasValue) |
| | | { |
| | | MakeTime = new SqlParameter("@MakeTime", trueModel.MakeTime.Value); |
| | | } |
| | | else |
| | | { |
| | | MakeTime = new SqlParameter("@MakeTime", DBNull.Value); |
| | | } |
| | | |
| | | SqlParameter StartTime = null; |
| | | if (trueModel.StartTime.HasValue) |
| | | { |
| | | StartTime = new SqlParameter("@StartTime", trueModel.StartTime.Value); |
| | | } |
| | | else |
| | | { |
| | | StartTime = new SqlParameter("@StartTime", DBNull.Value); |
| | | } |
| | | |
| | | SqlParameter OverTime = null; |
| | | if (trueModel.OverTime.HasValue) |
| | | { |
| | | OverTime = new SqlParameter("@OverTime", trueModel.OverTime.Value); |
| | | } |
| | | else |
| | | { |
| | | OverTime = new SqlParameter("@OverTime", DBNull.Value); |
| | | } |
| | | |
| | | |
| | | IList<SqlParameter> sqlParms = new List<SqlParameter>() |
| | | { |
| | | new SqlParameter("@id",trueModel.id), |
| | | new SqlParameter("@OrderId",trueModel.OrderId), |
| | | new SqlParameter("@DeliveryMoble",trueModel.DeliveryMoble), |
| | | new SqlParameter("@ContactName",string.IsNullOrEmpty(trueModel.ContactName)?"":trueModel.ContactName), |
| | | new SqlParameter("@ContactPhone",string.IsNullOrEmpty(trueModel.ContactPhone)?"":trueModel.ContactPhone), |
| | | new SqlParameter("@OrderState",trueModel.OrderState), |
| | | MakeTime, |
| | | StartTime, |
| | | OverTime, |
| | | new SqlParameter("@Remarke",string.IsNullOrEmpty(trueModel.Remarke)?"":trueModel.Remarke), |
| | | new SqlParameter("@DriverId",trueModel.DriverId.HasValue? trueModel.DriverId.Value:0), |
| | | |
| | | new SqlParameter("@CreateTime",trueModel.CreateTime), |
| | | |
| | | new SqlParameter("@CreateBy",trueModel.CreateBy), |
| | | |
| | | |
| | | |
| | | }; |
| | | string sql = "Insert Into CoreDeliverOrder ([id],[OrderId],[DeliveryMoble],[ContactName],[ContactPhone], [OrderState], [MakeTime],[StartTime], [OverTime],[Remarke], [DriverId],[CreateTime],[CreateBy] )" |
| | | + " Values (@id,@OrderId,@DeliveryMoble,@ContactName, @ContactPhone, @OrderState, @MakeTime, @StartTime, @OverTime, @Remarke, @DriverId,@CreateTime,@CreateBy )"; |
| | | try |
| | | { |
| | | _dataBase.ExecuteSql(sql, sqlParms.ToArray<SqlParameter>()); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | throw ex; |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// 新增 |
| | | /// </summary> |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | public int InsertModelIden(CY.Model.CoreDeliverOrder trueModel) |
| | | { |
| | | //Model.CoreDeliverOrder trueModel = model as Model.CoreDeliverOrder; |
| | | if (trueModel == null) |
| | | { |
| | | return 0; |
| | | } |
| | | SqlParameter MakeTime = null; |
| | | if (trueModel.MakeTime.HasValue) |
| | | { |
| | | MakeTime = new SqlParameter("@MakeTime", trueModel.MakeTime.Value); |
| | | } |
| | | else |
| | | { |
| | | MakeTime = new SqlParameter("@MakeTime", DBNull.Value); |
| | | } |
| | | |
| | | SqlParameter StartTime = null; |
| | | if (trueModel.StartTime.HasValue) |
| | | { |
| | | StartTime = new SqlParameter("@StartTime", trueModel.StartTime.Value); |
| | | } |
| | | else |
| | | { |
| | | StartTime = new SqlParameter("@StartTime", DBNull.Value); |
| | | } |
| | | |
| | | SqlParameter OverTime = null; |
| | | if (trueModel.OverTime.HasValue) |
| | | { |
| | | OverTime = new SqlParameter("@OverTime", trueModel.OverTime.Value); |
| | | } |
| | | else |
| | | { |
| | | OverTime = new SqlParameter("@OverTime", DBNull.Value); |
| | | } |
| | | |
| | | IList<SqlParameter> sqlParms = new List<SqlParameter>() |
| | | { |
| | | new SqlParameter("@id",trueModel.id), |
| | | new SqlParameter("@OrderId",trueModel.OrderId), |
| | | new SqlParameter("@DeliveryMoble",trueModel.DeliveryMoble), |
| | | new SqlParameter("@ContactName",string.IsNullOrEmpty(trueModel.ContactName)?"":trueModel.ContactName), |
| | | new SqlParameter("@ContactPhone",string.IsNullOrEmpty(trueModel.ContactPhone)?"":trueModel.ContactPhone), |
| | | new SqlParameter("@OrderState",trueModel.OrderState), |
| | | MakeTime, |
| | | StartTime, |
| | | OverTime, |
| | | new SqlParameter("@Remarke",string.IsNullOrEmpty(trueModel.Remarke)?"":trueModel.Remarke), |
| | | new SqlParameter("@DriverId",trueModel.DriverId.HasValue? trueModel.DriverId.Value:0), |
| | | |
| | | new SqlParameter("@CreateTime",trueModel.CreateTime), |
| | | |
| | | new SqlParameter("@CreateBy",trueModel.CreateBy), |
| | | |
| | | |
| | | }; |
| | | string sql = "Insert Into CoreDeliverOrder ([id],[OrderId],[DeliveryMoble],[ContactName],[ContactPhone], [OrderState], [MakeTime],[StartTime], [OverTime],[Remarke], [DriverId],[CreateTime],[CreateBy] )" |
| | | + " Values (@id,@OrderId,@DeliveryMoble,@ContactName, @ContactPhone, @OrderState, @MakeTime, @StartTime, @OverTime, @Remarke, @DriverId,@CreateTime,@CreateBy )"; |
| | | |
| | | int id = 0; |
| | | try |
| | | { |
| | | id = _dataBase.InsertDataAndGetId(sql, sqlParms.ToArray<SqlParameter>()); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | throw ex; |
| | | } |
| | | return id; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 修改 |
| | | /// </summary> |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | public bool UpdateModel(Infrastructure.Domain.IAggregateRoot model) |
| | | { |
| | | Model.CoreDeliverOrder trueModel = model as Model.CoreDeliverOrder; |
| | | if (trueModel == null) |
| | | { |
| | | return false; |
| | | } |
| | | |
| | | SqlParameter MakeTime = null; |
| | | if (trueModel.MakeTime.HasValue) |
| | | { |
| | | MakeTime = new SqlParameter("@MakeTime", trueModel.MakeTime.Value); |
| | | } |
| | | else |
| | | { |
| | | MakeTime = new SqlParameter("@MakeTime", DBNull.Value); |
| | | } |
| | | |
| | | SqlParameter StartTime = null; |
| | | if (trueModel.StartTime.HasValue) |
| | | { |
| | | StartTime = new SqlParameter("@StartTime", trueModel.StartTime.Value); |
| | | } |
| | | else |
| | | { |
| | | StartTime = new SqlParameter("@StartTime", DBNull.Value); |
| | | } |
| | | |
| | | SqlParameter OverTime = null; |
| | | if (trueModel.OverTime.HasValue) |
| | | { |
| | | OverTime = new SqlParameter("@OverTime", trueModel.OverTime.Value); |
| | | } |
| | | else |
| | | { |
| | | OverTime = new SqlParameter("@OverTime", DBNull.Value); |
| | | } |
| | | IList<SqlParameter> sqlParms = new List<SqlParameter>() |
| | | { |
| | | new SqlParameter("@id",trueModel.id), |
| | | new SqlParameter("@OrderId",trueModel.OrderId), |
| | | new SqlParameter("@DeliveryMoble",trueModel.DeliveryMoble), |
| | | new SqlParameter("@ContactName",string.IsNullOrEmpty(trueModel.ContactName)?"":trueModel.ContactName), |
| | | new SqlParameter("@ContactPhone",string.IsNullOrEmpty(trueModel.ContactPhone)?"":trueModel.ContactPhone), |
| | | new SqlParameter("@OrderState",trueModel.OrderState), |
| | | MakeTime, |
| | | StartTime, |
| | | OverTime, |
| | | new SqlParameter("@Remarke",string.IsNullOrEmpty(trueModel.Remarke)?"":trueModel.Remarke), |
| | | new SqlParameter("@DriverId",trueModel.DriverId.HasValue? trueModel.DriverId.Value:0), |
| | | |
| | | |
| | | new SqlParameter("@UpdataTime",trueModel.UpdataTime), |
| | | |
| | | new SqlParameter("@UpDataBy",trueModel.UpDataBy), |
| | | |
| | | }; |
| | | string sql = "Update CoreDeliverOrder Set [OrderId]=@OrderId,[DeliveryMoble]=@DeliveryMoble,[ContactName]=@ContactName,[ContactPhone]=@ContactPhone, [OrderState]=@OrderState, [MakeTime]=@MakeTime,[StartTime]=@StartTime, [OverTime]=@OverTime,[Remarke]=@Remarke, [DriverId]=@DriverId,[UpdataTime]=@UpdataTime,[UpDataBy]=@UpDataBy where [id] =@id "; |
| | | |
| | | try |
| | | { |
| | | _dataBase.ExecuteSql(sql, sqlParms.ToArray<SqlParameter>()); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | throw ex; |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 根据编号获得信息 |
| | | /// </summary> |
| | | /// <param name="Keyid">编号</param> |
| | | /// <returns></returns> |
| | | public CoreDeliverOrder GetModelByKeyid(string keyid) |
| | | { |
| | | try |
| | | { |
| | | string condition = " "; |
| | | if (!keyid.Equals(Guid.Empty)) |
| | | { |
| | | condition = " id='" + keyid + "'"; |
| | | } |
| | | else |
| | | { |
| | | return null; |
| | | } |
| | | |
| | | // return null;//错误数据返会空 |
| | | |
| | | IList<CoreDeliverOrder> result = _dataBase.SelectModel<CoreDeliverOrder>("*", "CoreDeliverOrder", condition) as IList<CoreDeliverOrder>;//执行查询 |
| | | |
| | | return (null == result || result.Count == 0) ? null : result[0];//返回结果 |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | throw ex; |
| | | } |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 全部查询 |
| | | /// </summary> |
| | | /// <param name="query"></param> |
| | | /// <returns></returns> |
| | | public IEnumerable<Model.CoreDeliverOrder> SelectAllModel(Infrastructure.Query.Query query) |
| | | { |
| | | return _dataBase.SelectModel<Model.CoreDeliverOrder>(" * ", " CoreDeliverOrder ") as IList<Model.CoreDeliverOrder>;//执行查询 |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 全部查询 |
| | | /// </summary> |
| | | /// <param name="query"></param> |
| | | /// <returns></returns> |
| | | public IEnumerable<Model.CoreDeliverOrder> GetModelByformid(Guid FirmId) |
| | | { |
| | | return _dataBase.SelectModel<Model.CoreDeliverOrder>(" * ", " CoreDeliverOrder ", " FirmId = '" + FirmId + "'") as IList<Model.CoreDeliverOrder>;//执行查询 |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 全部查询 |
| | | /// </summary> |
| | | /// <param name="query"></param> |
| | | /// <returns></returns> |
| | | public IEnumerable<Model.CoreDeliverOrder> GetModelByorderid(int orderid) |
| | | { |
| | | return _dataBase.SelectModel<Model.CoreDeliverOrder>(" * ", " CoreDeliverOrder ", " OrderId = " + orderid + " order by MakeTime desc ") as IList<Model.CoreDeliverOrder>;//执行查询 |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 全部查询 |
| | | /// </summary> |
| | | /// <param name="query"></param> |
| | | /// <returns></returns> |
| | | public IEnumerable<Model.CoreDeliverOrder> GetModelByids(string ids) |
| | | { |
| | | return _dataBase.SelectModel<Model.CoreDeliverOrder>(" * ", " CoreDeliverOrder ", " [id] in ( " + ids + ")") as IList<Model.CoreDeliverOrder>;//执行查询 |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// 分页查询 |
| | | /// </summary> |
| | | /// <param name="query"></param> |
| | | /// <param name="pagination"></param> |
| | | /// <returns></returns> |
| | | public IEnumerable<Model.CoreDeliverOrder> SelectModelPage(Infrastructure.Query.Query query, Infrastructure.Query.Pagination pagination) |
| | | { |
| | | if (null == pagination || null == query || null == query.Criteria || 1 > query.Criteria.Count) |
| | | return null; |
| | | //query.Criteria 首个元素必须是排序字段,其值为结果排序字段 |
| | | |
| | | int maxParamIndex = query.Criteria.Count - 1;//最大索引 |
| | | |
| | | string[] orderbys = new string[] { ORDERBY }; |
| | | string resultOrderBy = "";//结果集排序方式 |
| | | |
| | | if ("@orderBy".Equals(query.Criteria[maxParamIndex].PropertyName)) |
| | | { |
| | | orderbys = string.Format("{0}", query.Criteria[maxParamIndex].Value).Split(','); |
| | | resultOrderBy = query.Criteria[maxParamIndex].Value.ToString();//= 1 == orderbys.Length ? resultOrderBy : orderbys[1]; |
| | | } |
| | | string fromSouce = string.Format("{0}{1}{2}", FROMSOUCEBEFORE, query.Criteria[0].Value, FROMSOUCEEND);//拼装条件 |
| | | return _dataBase.SelectModelPage<Model.CoreDeliverOrder>(pagination, SELECTTARGET, fromSouce, orderbys[0], resultOrderBy); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 删除 |
| | | /// </summary> |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | public bool DeleteModel(Infrastructure.Domain.IAggregateRoot model) |
| | | { |
| | | Model.CoreDeliverOrder trueModel = model as Model.CoreDeliverOrder; |
| | | if (trueModel == null) |
| | | { |
| | | return false; |
| | | } |
| | | IList<SqlParameter> sqlParms = new List<SqlParameter>() |
| | | { |
| | | new SqlParameter("@Keyid",trueModel.id), |
| | | }; |
| | | string sql = "Delete CoreDeliverOrder Where [id] = @Keyid;Delete [CoreDeliverOrderItem] Where [OrderID] = @Keyid; "; |
| | | |
| | | |
| | | try |
| | | { |
| | | _dataBase.ExecuteSql(sql, sqlParms.ToArray<SqlParameter>()); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | throw ex; |
| | | } |
| | | return true; |
| | | } |
| | | } |
| | | } |
| New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using CY.IDAL; |
| | | using System.Data.SqlClient; |
| | | using System.Data; |
| | | using CY.Model; |
| | | using System.Transactions; |
| | | |
| | | |
| | | namespace CY.SQLDAL |
| | | { |
| | | public class CoreDeliverOrderItemDAL : ICoreDeliverOrderItemDAL |
| | | { |
| | | private Database _dataBase = null; |
| | | #region 常量 |
| | | /// <summary> |
| | | /// 查询目标 |
| | | /// </summary> |
| | | const string SELECTTARGET = " "; |
| | | /// <summary> |
| | | /// 查询来源 |
| | | /// </summary> |
| | | const string FROMSOUCEBEFORE = " "; |
| | | const string FROMSOUCEEND = " "; |
| | | /// <summary> |
| | | /// 分页默认排序字段 |
| | | /// </summary> |
| | | const string ORDERBY = " SellerOrderId desc "; |
| | | #endregion |
| | | public CoreDeliverOrderItemDAL() |
| | | { |
| | | _dataBase = new Database(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 新增 |
| | | /// </summary> |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | public bool InserModel(Infrastructure.Domain.IAggregateRoot model) |
| | | { |
| | | Model.CoreDeliverOrderItem trueModel = model as Model.CoreDeliverOrderItem; |
| | | if (trueModel == null) |
| | | { |
| | | return false; |
| | | } |
| | | |
| | | |
| | | |
| | | IList<SqlParameter> sqlParms = new List<SqlParameter>() |
| | | { |
| | | new SqlParameter("@id",trueModel.id), |
| | | new SqlParameter("@OrderID",trueModel.OrderID), |
| | | new SqlParameter("@ZYBName",trueModel.ZYBName), |
| | | new SqlParameter("@ZYBSpecification",trueModel.ZYBSpecification), |
| | | new SqlParameter("@Number",trueModel.Number), |
| | | new SqlParameter("@LessNumber",trueModel.LessNumber), |
| | | new SqlParameter("@CreateTime",trueModel.CreateTime), |
| | | new SqlParameter("@CreateBy",trueModel.CreateBy), |
| | | |
| | | |
| | | }; |
| | | string sql = "Insert Into CoreDeliverOrderItem ([id],[OrderID],[ZYBName],[ZYBSpecification],[Number], [LessNumber], [CreateTime],[CreateBy] )" |
| | | + " Values (@id, @OrderID,@ZYBName,@ZYBSpecification, @Number, @LessNumber, @CreateTime,@CreateBy)"; |
| | | try |
| | | { |
| | | _dataBase.ExecuteSql(sql, sqlParms.ToArray<SqlParameter>()); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | throw ex; |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 修改 |
| | | /// </summary> |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | public bool UpdateModel(Infrastructure.Domain.IAggregateRoot model) |
| | | { |
| | | Model.CoreDeliverOrderItem trueModel = model as Model.CoreDeliverOrderItem; |
| | | if (trueModel == null) |
| | | { |
| | | return false; |
| | | } |
| | | |
| | | |
| | | IList<SqlParameter> sqlParms = new List<SqlParameter>() |
| | | { |
| | | |
| | | new SqlParameter("@id",trueModel.id), |
| | | new SqlParameter("@OrderID",trueModel.OrderID), |
| | | new SqlParameter("@ZYBName",trueModel.ZYBName), |
| | | new SqlParameter("@ZYBSpecification",trueModel.ZYBSpecification), |
| | | new SqlParameter("@Number",trueModel.Number), |
| | | new SqlParameter("@LessNumber",trueModel.LessNumber), |
| | | new SqlParameter("@UpdataTime",trueModel.UpdataTime), |
| | | new SqlParameter("@UpDataBy",trueModel.UpDataBy), |
| | | |
| | | }; |
| | | string sql = "Update CoreDeliverOrderItem Set [OrderID]=@OrderID,[ZYBName]=@ZYBName,[ZYBSpecification]=@ZYBSpecification,[Number]=@Number, [LessNumber]=@LessNumber , [UpdataTime]=@UpdataTime,[UpDataBy]=@UpDataBy where [id] =@id "; |
| | | |
| | | try |
| | | { |
| | | _dataBase.ExecuteSql(sql, sqlParms.ToArray<SqlParameter>()); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | throw ex; |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 根据编号获得信息 |
| | | /// </summary> |
| | | /// <param name="Keyid">编号</param> |
| | | /// <returns></returns> |
| | | public CoreDeliverOrderItem getCoreDeliverOrderItem(int keyid) |
| | | { |
| | | try |
| | | { |
| | | string condition = " "; |
| | | if (!keyid.Equals(Guid.Empty)) |
| | | { |
| | | condition = " id='" + keyid + "'"; |
| | | } |
| | | else |
| | | { |
| | | return null; |
| | | } |
| | | |
| | | // return null;//错误数据返会空 |
| | | |
| | | IList<CoreDeliverOrderItem> result = _dataBase.SelectModel<CoreDeliverOrderItem>("*", "CoreDeliverOrderItem", condition) as IList<CoreDeliverOrderItem>;//执行查询 |
| | | |
| | | return (null == result || result.Count == 0) ? null : result[0];//返回结果 |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | throw ex; |
| | | } |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 全部查询 |
| | | /// </summary> |
| | | /// <param name="query"></param> |
| | | /// <returns></returns> |
| | | public IEnumerable<Model.CoreDeliverOrderItem> SelectAllModel(Infrastructure.Query.Query query) |
| | | { |
| | | return _dataBase.SelectModel<Model.CoreDeliverOrderItem>(" * ", " CoreDeliverOrderItem ") as IList<Model.CoreDeliverOrderItem>;//执行查询 |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 全部查询 |
| | | /// </summary> |
| | | /// <param name="query"></param> |
| | | /// <returns></returns> |
| | | public IEnumerable<Model.CoreDeliverOrderItem> GetModelsByOrderid(string orderid) |
| | | { |
| | | return _dataBase.SelectModel<Model.CoreDeliverOrderItem>(" * ", " CoreDeliverOrderItem ", " OrderID = '" + orderid + "' ") as IList<Model.CoreDeliverOrderItem>;//执行查询 |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// 分页查询 |
| | | /// </summary> |
| | | /// <param name="query"></param> |
| | | /// <param name="pagination"></param> |
| | | /// <returns></returns> |
| | | public IEnumerable<Model.CoreDeliverOrderItem> SelectModelPage(Infrastructure.Query.Query query, Infrastructure.Query.Pagination pagination) |
| | | { |
| | | |
| | | return null; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 删除 |
| | | /// </summary> |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | public bool DeleteModel(Infrastructure.Domain.IAggregateRoot model) |
| | | { |
| | | Model.CoreDeliverOrderItem trueModel = model as Model.CoreDeliverOrderItem; |
| | | if (trueModel == null) |
| | | { |
| | | return false; |
| | | } |
| | | IList<SqlParameter> sqlParms = new List<SqlParameter>() |
| | | { |
| | | new SqlParameter("@Keyid",trueModel.id) |
| | | }; |
| | | string sql = "Delete CoreDeliverOrderItem Where [id] = @Keyid "; |
| | | |
| | | |
| | | try |
| | | { |
| | | _dataBase.ExecuteSql(sql, sqlParms.ToArray<SqlParameter>()); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | throw ex; |
| | | } |
| | | return true; |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | try |
| | | { |
| | | string where = " Zerenren = " + Zerenren + " and Gongzuozhize='"+ neirong + "'"; |
| | | string where = " Zerenren = " + Zerenren /*+ " and Gongzuozhize='"+ neirong + "'"*/; |
| | | |
| | | if (Keyid.HasValue) |
| | | { |
| | |
| | | <Content Include="Pages\business\Baozhengjinfukuan.aspx" /> |
| | | <Content Include="Pages\business\BaozhengjinCuishou.aspx" /> |
| | | <Content Include="Pages\business\DeliverPlanDakaList.aspx" /> |
| | | <Content Include="Pages\business\DeliverWorkBookAnPaiEdit.aspx" /> |
| | | <Content Include="Pages\business\DeliverWorkBookAnPai.aspx" /> |
| | | <Content Include="Pages\business\DeliverPlanWentiOrder.aspx" /> |
| | | <Content Include="Pages\business\DeliverPlanWentiAdd.aspx" /> |
| | | <Content Include="Pages\business\DeliverPlanWentiEdit.aspx" /> |
| | |
| | | <Content Include="Pages\business\DeliverPlanLishiPrint.aspx" /> |
| | | <Content Include="Pages\business\DeliverPlanPaicheZhuyishixiang.aspx" /> |
| | | <Content Include="Pages\business\DeliverPlanTimeEdit.aspx" /> |
| | | <Content Include="Pages\business\DeliverWorkBookLiShiAnPaiList.aspx" /> |
| | | <Content Include="Pages\business\DeliverWorkBookAnPaiList.aspx" /> |
| | | <Content Include="Pages\business\DeliverWorkBookAnPaiDetail.aspx" /> |
| | | <Content Include="Pages\business\DeliverWorkBookPandian.aspx" /> |
| | | <Content Include="Pages\business\DeliverWorkBookFahuo.aspx" /> |
| | | <Content Include="Pages\business\DeliverWorkBookfahuoqingkuang.aspx" /> |
| | |
| | | <Compile Include="Pages\business\DeliverPlanDakaList.aspx.designer.cs"> |
| | | <DependentUpon>DeliverPlanDakaList.aspx</DependentUpon> |
| | | </Compile> |
| | | <Compile Include="Pages\business\DeliverWorkBookAnPaiEdit.aspx.cs"> |
| | | <DependentUpon>DeliverWorkBookAnPaiEdit.aspx</DependentUpon> |
| | | <SubType>ASPXCodeBehind</SubType> |
| | | </Compile> |
| | | <Compile Include="Pages\business\DeliverWorkBookAnPaiEdit.aspx.designer.cs"> |
| | | <DependentUpon>DeliverWorkBookAnPaiEdit.aspx</DependentUpon> |
| | | </Compile> |
| | | <Compile Include="Pages\business\DeliverWorkBookAnPai.aspx.cs"> |
| | | <DependentUpon>DeliverWorkBookAnPai.aspx</DependentUpon> |
| | | <SubType>ASPXCodeBehind</SubType> |
| | | </Compile> |
| | | <Compile Include="Pages\business\DeliverWorkBookAnPai.aspx.designer.cs"> |
| | | <DependentUpon>DeliverWorkBookAnPai.aspx</DependentUpon> |
| | | </Compile> |
| | | <Compile Include="Pages\business\DeliverPlanWentiOrder.aspx.cs"> |
| | | <DependentUpon>DeliverPlanWentiOrder.aspx</DependentUpon> |
| | | <SubType>ASPXCodeBehind</SubType> |
| | |
| | | <Compile Include="Pages\business\DeliverPlanTimeEdit.aspx.designer.cs"> |
| | | <DependentUpon>DeliverPlanTimeEdit.aspx</DependentUpon> |
| | | </Compile> |
| | | <Compile Include="Pages\business\DeliverWorkBookLiShiAnPaiList.aspx.cs"> |
| | | <DependentUpon>DeliverWorkBookLiShiAnPaiList.aspx</DependentUpon> |
| | | <SubType>ASPXCodeBehind</SubType> |
| | | </Compile> |
| | | <Compile Include="Pages\business\DeliverWorkBookLiShiAnPaiList.aspx.designer.cs"> |
| | | <DependentUpon>DeliverWorkBookLiShiAnPaiList.aspx</DependentUpon> |
| | | </Compile> |
| | | <Compile Include="Pages\business\DeliverWorkBookAnPaiList.aspx.cs"> |
| | | <DependentUpon>DeliverWorkBookAnPaiList.aspx</DependentUpon> |
| | | <SubType>ASPXCodeBehind</SubType> |
| | | </Compile> |
| | | <Compile Include="Pages\business\DeliverWorkBookAnPaiList.aspx.designer.cs"> |
| | | <DependentUpon>DeliverWorkBookAnPaiList.aspx</DependentUpon> |
| | | </Compile> |
| | | <Compile Include="Pages\business\DeliverWorkBookAnPaiDetail.aspx.cs"> |
| | | <DependentUpon>DeliverWorkBookAnPaiDetail.aspx</DependentUpon> |
| | | <SubType>ASPXCodeBehind</SubType> |
| | | </Compile> |
| | | <Compile Include="Pages\business\DeliverWorkBookAnPaiDetail.aspx.designer.cs"> |
| | | <DependentUpon>DeliverWorkBookAnPaiDetail.aspx</DependentUpon> |
| | | </Compile> |
| | | <Compile Include="Pages\business\DeliverWorkBookPandian.aspx.cs"> |
| | | <DependentUpon>DeliverWorkBookPandian.aspx</DependentUpon> |
| | | <SubType>ASPXCodeBehind</SubType> |
| New file |
| | |
| | | <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DeliverWorkBookAnPai.aspx.cs" Inherits="CY.WebForm.Pages.business.DeliverWorkBookAnPai" %> |
| | | |
| | | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| | | <html xmlns="http://www.w3.org/1999/xhtml"> |
| | | <head id="Head1" runat="server"> |
| | | <title>订单编辑</title> |
| | | <uc:CMSHead ID="CMSHead1" runat="server" /> |
| | | <!--前台页面start--> |
| | | <link rel="stylesheet" type="text/css" href="../../Styles/base.css" /> |
| | | <link href="../../Styles/changes.css" rel="stylesheet" type="text/css" /> |
| | | <link href="../../Styles/ParticularWQJ.css" rel="stylesheet" type="text/css" /> |
| | | <!--前台页面end--> |
| | | <script type="text/javascript" language="javascript"> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | </script> |
| | | |
| | | </head> |
| | | <body style='padding: 0; margin: 0;'> |
| | | <form id="form1" runat="server" style='padding: 0; margin: 0;' class='form2'> |
| | | |
| | | |
| | | <table class="table2" id="tbBasic"> |
| | | <thead> |
| | | <tr> |
| | | <th colspan="8"> |
| | | 基本信息 |
| | | </th> |
| | | </tr> |
| | | </thead> |
| | | <tr style=" height:1px;"> |
| | | <td style="border:none;width: 100px;"> |
| | | </td> |
| | | <td style="border:none; width:300px;"> |
| | | </td> |
| | | |
| | | |
| | | </tr> |
| | | <tr> |
| | | <td class="ali03 "> |
| | | 时间: |
| | | </td> |
| | | <td align="left"> |
| | | <input id="txtDeliverTime" type="text" runat="server" class='date req' datefmt="yyyy-MM-dd HH:mm" maxlength='20' /> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="ali03 "> |
| | | 司机: |
| | | </td> |
| | | <td align="left"> |
| | | |
| | | <select keepdefaultstyle='true' id='selCarId' runat="server" datatextfield='Name' datavaluefield='Keyid' class="Sreq"> |
| | | </select> |
| | | |
| | | </td> |
| | | </tr> |
| | | |
| | | |
| | | |
| | | <tr> |
| | | <td class="contentLeft" colspan="2" style=" padding-left:300px;"> |
| | | <asp:Button ID="btnSaves" runat="server" Text="提交" OnClick="btnSave_ServerClick" /> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | </td> |
| | | </tr> |
| | | </table> |
| | | |
| | | |
| | | |
| | | </form> |
| | | |
| | | </body> |
| | | <script type="text/javascript" language="javascript"> |
| | | |
| | | |
| | | |
| | | </script> |
| | | </html> |
| New file |
| | |
| | | /** |
| | | * OrderEdit.aspx.cs |
| | | * |
| | | * 功 能: 订单列表 |
| | | * 类 名: OrderEdit |
| | | * |
| | | * Ver 变更日期 负责人 变更内容 |
| | | * ─────────────────────────────────── |
| | | * V0.01 2013-5-8 13:55 吴崎均 初版 |
| | | * V0.02 2013-5-8 15:47 吴崎均 实现下拉数据绑定与数据级联 |
| | | * V0.03 2013-5-8 18:00 吴崎均 初步完成新增线下订单(未调试) |
| | | * |
| | | */ |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Web; |
| | | using System.Web.UI; |
| | | using System.Web.UI.WebControls; |
| | | using CY.BLL.Sys; |
| | | using CY.BLL; |
| | | using CY.Model; |
| | | using CY.Infrastructure.Common; |
| | | using CY.WebForm.Pages.common; |
| | | using CY.BLL.EC; |
| | | using CY.Model.Inquiry; |
| | | using System.Transactions; |
| | | |
| | | namespace CY.WebForm.Pages.business |
| | | { |
| | | public partial class DeliverWorkBookAnPai : BasePage |
| | | { |
| | | |
| | | CoreCmsPlanOrderBLL _CoreCmsPlanOrderBLL = null; |
| | | CoreCmsPlanOrderItemBLL _CoreCmsPlanOrderItemBLL = null; |
| | | OA_StaffBLL bll_OA_StaffBLL = null; |
| | | OA_CarManageBll _OA_CarManageBll = null; |
| | | CoreDeliverOrderBLL _CoreDeliverOrderBLL = null; |
| | | CoreDeliverOrderItemBLL _CoreDeliverOrderItemBLL = null; |
| | | |
| | | //初始化 |
| | | public DeliverWorkBookAnPai() |
| | | { |
| | | |
| | | _CoreCmsPlanOrderBLL = new CoreCmsPlanOrderBLL(); |
| | | bll_OA_StaffBLL = new OA_StaffBLL(); |
| | | _OA_CarManageBll = new OA_CarManageBll(); |
| | | _CoreDeliverOrderBLL = new CoreDeliverOrderBLL(); |
| | | _CoreDeliverOrderItemBLL = new CoreDeliverOrderItemBLL(); |
| | | _CoreCmsPlanOrderItemBLL = new CoreCmsPlanOrderItemBLL(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 页面加载事件 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | | protected void Page_Load(object sender, EventArgs e) |
| | | { |
| | | try |
| | | { |
| | | switch (Request["Target"]) |
| | | { |
| | | case "GetCommunication": |
| | | LoadCommunication(); |
| | | break; |
| | | case "ReBindClients": |
| | | Response.Write(ReLoadClients()); |
| | | break; |
| | | |
| | | default: |
| | | Page_Load_Default(); |
| | | return; |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | PAGEHandleException(ex); |
| | | Response.Clear(); |
| | | //Response.Write("-1"); |
| | | Response.Write(ex.Message); |
| | | } |
| | | Response.End(); |
| | | } |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// 默认执行方法 |
| | | /// </summary> |
| | | private void Page_Load_Default() |
| | | { |
| | | |
| | | |
| | | |
| | | if (!IsPostBack && !IsCallback) |
| | | { |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | this.selCarId.DataSource = bll_OA_StaffBLL.SelectListByFirmId(CurrentUser.MemberId, false, false).Where(x => x.SM_Post == "司机"); |
| | | this.selCarId.DataTextField = "Name"; |
| | | this.selCarId.DataValueField = "Keyid"; |
| | | this.selCarId.DataBind(); |
| | | this.selCarId.Items.Insert(0, new ListItem("请选择", "")); |
| | | DateTime now = DateTime.Now; |
| | | DateTime tomorrowMorning = now.AddDays(1).Date.Add(new TimeSpan(9, 0, 0)); // 9:00 AM |
| | | |
| | | |
| | | this.txtDeliverTime.Value = tomorrowMorning.ToString("yyyy-MM-dd HH:mm"); |
| | | |
| | | var ids = Request["ids"].ToString().Trim(',').Split(','); |
| | | for (int i = 0; i < ids.Length; i++) |
| | | { |
| | | var coreCmsPlanOrder = _CoreCmsPlanOrderBLL.GetModelByKeyid(ids[i].ToInt32().Value); |
| | | |
| | | if (coreCmsPlanOrder.DeliverState.HasValue && coreCmsPlanOrder.DeliverState.Value == 2) |
| | | { |
| | | //操作成功 |
| | | JavaScript.MessageBox("已经送货完成的计划订单不能安排", this, true, false); |
| | | return; |
| | | } |
| | | var coreDeliverOrderItems = _CoreCmsPlanOrderItemBLL.GetDeliverModelsByplanOrderid(coreCmsPlanOrder.id).ToList(); |
| | | if (coreDeliverOrderItems != null && coreDeliverOrderItems.Count > 0) |
| | | { |
| | | //操作成功 |
| | | JavaScript.MessageBox("已有未完成的送货安排不能安排", this, true, false); |
| | | return; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 保存点击事件 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | | protected void btnSave_ServerClick(object sender, EventArgs e) |
| | | { |
| | | |
| | | if (SaveOrder()) |
| | | { |
| | | //操作成功 |
| | | JavaScript.MessageBoxCloseAndRefreshparent("操作成功", this); |
| | | } |
| | | else |
| | | { |
| | | //操作失败 |
| | | JavaScript.MessageBox("操作失败", this); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// 加载客户联系方式 |
| | | /// </summary> |
| | | private void LoadCommunication() |
| | | { |
| | | Response.Clear(); |
| | | string id = Request["id"]; |
| | | if (string.IsNullOrEmpty(id)) |
| | | { |
| | | Response.Write("-2"); |
| | | return; |
| | | } |
| | | |
| | | OA_CorporateClientsBLL _oA_CorporateClientsBLL = new OA_CorporateClientsBLL(); |
| | | OA_CorporateClients m_OA_CorporateClients = _oA_CorporateClientsBLL.SelectModelByFirmIdandMemberId(CurrentUser.MemberId, id.ToGuid2()); |
| | | OA_CustomerCommunications _oA_CustomerCommunications = _oA_CorporateClientsBLL.GetModel_CustomerCommunications(m_OA_CorporateClients.Keyid); |
| | | _oA_CustomerCommunications.DegreeImportanId = m_OA_CorporateClients.DegreeImportanId; |
| | | _oA_CustomerCommunications.AccountManagerId = m_OA_CorporateClients.AccountManagerId; |
| | | _oA_CustomerCommunications.BusinessManagerId = m_OA_CorporateClients.BusinessManagerId; |
| | | _oA_CustomerCommunications.CompanyName = m_OA_CorporateClients.CompanyName; |
| | | Response.Write(null == _oA_CustomerCommunications ? "" : JsonHelper.GetJsonStringByObject(_oA_CustomerCommunications)); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// 保存订单 |
| | | /// </summary> |
| | | private bool SaveOrder() |
| | | { |
| | | |
| | | |
| | | bool isWin = false; |
| | | using (TransactionScope scope = new TransactionScope(TransactionScopeOption.Required, |
| | | new TransactionOptions |
| | | { |
| | | IsolationLevel = System.Transactions.IsolationLevel.ReadCommitted, |
| | | Timeout = TransactionManager.MaximumTimeout |
| | | } |
| | | ) |
| | | ) |
| | | { |
| | | try |
| | | { |
| | | |
| | | var ids = Request["ids"].ToString().Trim(',').Split(','); |
| | | |
| | | |
| | | var shijian = this.txtDeliverTime.Value.ToDateTime2(); |
| | | |
| | | |
| | | var datenow = DateTime.Now; |
| | | var oA_Staff = bll_OA_StaffBLL.GetModelByKeyid(CurrentUser.StaffId); |
| | | foreach (var keyid in ids) |
| | | { |
| | | CoreDeliverOrder coreDeliverOrder = new CoreDeliverOrder(); |
| | | coreDeliverOrder.id = Guid.NewGuid(); |
| | | coreDeliverOrder.DriverId = this.selCarId.Value.ToInt32(); |
| | | var i = 0; |
| | | var carManage = bll_OA_StaffBLL.GetModelByKeyid(this.selCarId.Value.ToInt32()); |
| | | if (carManage != null) |
| | | { |
| | | coreDeliverOrder.DeliveryMoble = carManage.MobieNum; |
| | | } |
| | | coreDeliverOrder.OrderId = keyid.ToInt32(); |
| | | coreDeliverOrder.CreateBy = oA_Staff.MobieNum; |
| | | coreDeliverOrder.CreateTime = datenow; |
| | | |
| | | var coreCmsPlanOrder = _CoreCmsPlanOrderBLL.GetModelByKeyid(keyid.ToInt32().Value); |
| | | if (coreCmsPlanOrder != null) |
| | | { |
| | | coreDeliverOrder.ContactName = coreCmsPlanOrder.shipName; |
| | | coreDeliverOrder.ContactPhone = coreCmsPlanOrder.shipMobile; |
| | | } |
| | | coreDeliverOrder.OrderState = 0; |
| | | coreDeliverOrder.MakeTime = shijian; |
| | | coreDeliverOrder.Remarke = ""; |
| | | isWin = _CoreDeliverOrderBLL.InsertModel(coreDeliverOrder); |
| | | var cmsPlanOrderItems =_CoreCmsPlanOrderItemBLL.GetModelsByOrderid(keyid.ToInt32().Value); |
| | | var coreDeliverOrderItems =_CoreCmsPlanOrderItemBLL.GetDeliverModelsByZongOrderid(coreCmsPlanOrder.orderkeyid.Value).Where(x => x.PlanOrderId == keyid.ToInt32().Value); ; |
| | | //送货数量统计 |
| | | var coreDeliverOrderItemsgroup = coreDeliverOrderItems.GroupBy(p => new { p.ZYBName, p.ZYBSpecification }) // 多个字段作为匿名类型分组键 |
| | | .Select(g => new CoreDeliverOrderItem |
| | | { |
| | | // 分组字段 |
| | | ZYBName = g.Key.ZYBName, |
| | | ZYBSpecification = g.Key.ZYBSpecification, |
| | | // 统计结果 |
| | | //Count = g.Count(), // 每组人数 |
| | | //AverageSalary = g.Average(p => p.Salary), // 平均工资 |
| | | Number = g.Sum(p => p.Number), // 工资总和 |
| | | LessNumber = g.Sum(p => p.LessNumber) |
| | | }).ToList(); |
| | | foreach ( var cmsPlanOrderItem in cmsPlanOrderItems) |
| | | { |
| | | var coreDeliverOrderItem1 = new CoreDeliverOrderItem(); |
| | | coreDeliverOrderItem1.id = Guid.NewGuid(); |
| | | coreDeliverOrderItem1.OrderID = coreDeliverOrder.id; |
| | | coreDeliverOrderItem1.ZYBName = cmsPlanOrderItem.name; |
| | | coreDeliverOrderItem1.ZYBSpecification = cmsPlanOrderItem.specification; |
| | | //需要计算已经发货的数量 |
| | | coreDeliverOrderItem1.Number = cmsPlanOrderItem.nums; |
| | | var coreDeliverOrderItem = coreDeliverOrderItemsgroup.FirstOrDefault(x => x.ZYBName == cmsPlanOrderItem.name && x.ZYBSpecification == cmsPlanOrderItem.specification); |
| | | if (coreDeliverOrderItem != null) |
| | | { |
| | | |
| | | coreDeliverOrderItem1.Number = coreDeliverOrderItem1.Number - (coreDeliverOrderItem.Number + coreDeliverOrderItem.LessNumber); |
| | | if (coreDeliverOrderItem1.Number < 0) |
| | | { |
| | | coreDeliverOrderItem1.Number = 0; |
| | | } |
| | | } |
| | | |
| | | coreDeliverOrderItem1.CreateBy = oA_Staff.MobieNum; |
| | | coreDeliverOrderItem1.CreateTime = datenow; |
| | | coreDeliverOrderItem1.LessNumber = 0; |
| | | isWin = _CoreDeliverOrderItemBLL.InsertModel(coreDeliverOrderItem1); |
| | | } |
| | | } |
| | | |
| | | |
| | | scope.Complete(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | |
| | | PAGEHandleException(ex); |
| | | JavaScript.MessageBox("操作失败", this); |
| | | } |
| | | finally |
| | | { |
| | | // 释放资源 |
| | | scope.Dispose(); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | return isWin; |
| | | } |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// 重新加载客户列表 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | private string ReLoadClients() |
| | | { |
| | | try |
| | | { |
| | | string res = "<option value=''>请选择</option>"; |
| | | OA_CorporateClientsBLL bll_OA_CorporateClientsBLL = new OA_CorporateClientsBLL(); |
| | | IList<OA_CorporateClients> m_OA_CorporateClientsList = bll_OA_CorporateClientsBLL.SelectListByFirmId(CurrentUser.MemberId) as IList<OA_CorporateClients>; |
| | | if (null != m_OA_CorporateClientsList) |
| | | { |
| | | m_OA_CorporateClientsList.Where(cc => CurrentUser.MemberId.Equals(cc.MemberId) && m_OA_CorporateClientsList.Remove(cc)); |
| | | if (m_OA_CorporateClientsList.Count > 0) |
| | | { |
| | | foreach (var m_OA_CorporateClients in m_OA_CorporateClientsList) |
| | | { |
| | | res = res + ("<option value='" + m_OA_CorporateClients.MemberId + "'>" + m_OA_CorporateClients.CompanyName + "</option>"); |
| | | } |
| | | } |
| | | } |
| | | return res; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | PAGEHandleException(ex); |
| | | return ""; |
| | | } |
| | | } |
| | | } |
| | | } |
| New file |
| | |
| | | //------------------------------------------------------------------------------ |
| | | // <自动生成> |
| | | // 此代码由工具生成。 |
| | | // |
| | | // 对此文件的更改可能导致不正确的行为,如果 |
| | | // 重新生成代码,则所做更改将丢失。 |
| | | // </自动生成> |
| | | //------------------------------------------------------------------------------ |
| | | |
| | | namespace CY.WebForm.Pages.business |
| | | { |
| | | |
| | | |
| | | public partial class DeliverWorkBookAnPai |
| | | { |
| | | |
| | | /// <summary> |
| | | /// Head1 控件。 |
| | | /// </summary> |
| | | /// <remarks> |
| | | /// 自动生成的字段。 |
| | | /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 |
| | | /// </remarks> |
| | | protected global::System.Web.UI.HtmlControls.HtmlHead Head1; |
| | | |
| | | /// <summary> |
| | | /// CMSHead1 控件。 |
| | | /// </summary> |
| | | /// <remarks> |
| | | /// 自动生成的字段。 |
| | | /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 |
| | | /// </remarks> |
| | | protected global::CY.WebForm.Pages.common.CMSHead CMSHead1; |
| | | |
| | | /// <summary> |
| | | /// form1 控件。 |
| | | /// </summary> |
| | | /// <remarks> |
| | | /// 自动生成的字段。 |
| | | /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 |
| | | /// </remarks> |
| | | protected global::System.Web.UI.HtmlControls.HtmlForm form1; |
| | | |
| | | /// <summary> |
| | | /// txtDeliverTime 控件。 |
| | | /// </summary> |
| | | /// <remarks> |
| | | /// 自动生成的字段。 |
| | | /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 |
| | | /// </remarks> |
| | | protected global::System.Web.UI.HtmlControls.HtmlInputText txtDeliverTime; |
| | | |
| | | /// <summary> |
| | | /// selCarId 控件。 |
| | | /// </summary> |
| | | /// <remarks> |
| | | /// 自动生成的字段。 |
| | | /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 |
| | | /// </remarks> |
| | | protected global::System.Web.UI.HtmlControls.HtmlSelect selCarId; |
| | | |
| | | /// <summary> |
| | | /// btnSaves 控件。 |
| | | /// </summary> |
| | | /// <remarks> |
| | | /// 自动生成的字段。 |
| | | /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 |
| | | /// </remarks> |
| | | protected global::System.Web.UI.WebControls.Button btnSaves; |
| | | } |
| | | } |
| New file |
| | |
| | | <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DeliverWorkBookAnPaiDetail.aspx.cs" Inherits="CY.WebForm.Pages.business.DeliverWorkBookAnPaiDetail" %> |
| | | |
| | | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| | | <html xmlns="http://www.w3.org/1999/xhtml"> |
| | | <head id="Head1" runat="server"> |
| | | <title>车辆管理</title> |
| | | <uc:CMSHead ID="CMSHead1" runat="server" /> |
| | | <script type="text/javascript"> |
| | | //违章 |
| | | function onViewCarViolation(keyid) { |
| | | top.Dialog.open({ URL: "/Pages/business/CarViolationList.aspx?carid=" + keyid, Title: "违章管理", Width: 1000, Height: 660 }); |
| | | } |
| | | |
| | | //保养 |
| | | function onViewCarMaintenance(keyid) { |
| | | top.Dialog.open({ URL: "/Pages/business/CarMaintenanceList.aspx?carid=" + keyid, Title: "保养管理", Width: 1000, Height: 660 }); |
| | | } |
| | | //维修 |
| | | function onViewCarrepair(keyid) { |
| | | top.Dialog.open({ URL: "/Pages/business/CarrepairList.aspx?carid=" + keyid, Title: "维修管理", Width: 1000, Height: 660 }); |
| | | } |
| | | |
| | | //年检 |
| | | function onViewCarExamined(keyid) { |
| | | top.Dialog.open({ URL: "/Pages/business/CarExaminedList.aspx?carid=" + keyid, Title: "年检管理", Width: 1000, Height: 660 }); |
| | | } |
| | | |
| | | //保险 |
| | | function onViewCarInsurance(keyid) { |
| | | top.Dialog.open({ URL: "/Pages/business/CarInsuranceList.aspx?carid=" + keyid, Title: "保险管理", Width: 1000, Height: 660 }); |
| | | } |
| | | |
| | | //修改 |
| | | function onEdit(keyid) { |
| | | top.Dialog.open({ URL: "/Pages/business/CarManageAdd.aspx?keyid=" + keyid, Title: "车辆信息", Width: 1000, Height: 660 }); |
| | | } |
| | | |
| | | //添加 |
| | | function addModel() { |
| | | top.Dialog.open({ URL: "/Pages/business/CarManageAdd.aspx", Title: "新增车辆", Width: 1000, Height: 660}); |
| | | } |
| | | |
| | | //删除 |
| | | function onDele(keyid) { |
| | | top.Dialog.confirm("确定要删除该记录吗?", function () { |
| | | window.location = "/Pages/business/DeliverWorkBookAnPaiDetail.aspx?delete=" + keyid; |
| | | }); |
| | | } |
| | | |
| | | //批量删除 |
| | | function onAllDelete() { |
| | | var deleteKeyIds = ""; |
| | | $(":checkbox").each( |
| | | function () { |
| | | if ($(this).is(":checked")) { |
| | | deleteKeyIds += $(this).val() + ","; |
| | | } |
| | | } |
| | | ) |
| | | if (deleteKeyIds == "") { |
| | | top.Dialog.alert("请选择要删除的记录", function () { |
| | | }); |
| | | return; |
| | | } |
| | | else { |
| | | deleteKeyIds = deleteKeyIds.substring(0, deleteKeyIds.length - 1); |
| | | top.Dialog.confirm("确定要删除所选记录吗?", function () { |
| | | window.location = "/Pages/business/DeliverWorkBookAnPaiDetail.aspx?deleteKeyIds=" + deleteKeyIds; |
| | | }); |
| | | } |
| | | } |
| | | $(function () { |
| | | $(".AlreadyReply").remove(); |
| | | }); |
| | | </script> |
| | | <style type="text/css"> |
| | | .AlreadyReply { display: none; } |
| | | </style> |
| | | </head> |
| | | <body> |
| | | <form id="form1" runat="server"> |
| | | <div id="scrollContent"> |
| | | <div class="box1" paneltitle="功能面板" roller="false"> |
| | | <table class="TableNewStyle"> |
| | | <tr> |
| | | |
| | | <td class="ali03"> |
| | | 片区: |
| | | </td> |
| | | <td> |
| | | <span id="spanpianqu" runat="server" ></span> |
| | | |
| | | </td> |
| | | |
| | | <td class="ali03"> |
| | | 学校: |
| | | </td> |
| | | <td> |
| | | <span id="spanxuexiao" runat="server" ></span> |
| | | |
| | | </td> |
| | | |
| | | |
| | | |
| | | |
| | | </tr> |
| | | <tr> |
| | | |
| | | <td class="ali03"> |
| | | 收货地址: |
| | | </td> |
| | | <td> |
| | | <span id="spanDizhi" runat="server" ></span> |
| | | |
| | | </td> |
| | | |
| | | <td class="ali03"> |
| | | 联系人: |
| | | </td> |
| | | <td> |
| | | <span id="spanLianxiren" runat="server" ></span> |
| | | |
| | | </td> |
| | | |
| | | |
| | | |
| | | |
| | | </tr> |
| | | <tr> |
| | | |
| | | <td class="ali03"> |
| | | 联系电话: |
| | | </td> |
| | | <td> |
| | | <span id="spanDianhua" runat="server" ></span> |
| | | |
| | | </td> |
| | | |
| | | <td class="ali03"> |
| | | 送货时间: |
| | | </td> |
| | | <td> |
| | | <span id="spanShijian" runat="server" ></span> |
| | | |
| | | </td> |
| | | |
| | | |
| | | |
| | | |
| | | </tr> |
| | | <tr> |
| | | |
| | | <td class="ali03"> |
| | | 状态: |
| | | </td> |
| | | <td> |
| | | <span id="spanZhuangtai" runat="server" ></span> |
| | | |
| | | </td> |
| | | |
| | | <td class="ali03"> |
| | | |
| | | </td> |
| | | <td> |
| | | |
| | | |
| | | </td> |
| | | |
| | | |
| | | |
| | | |
| | | </tr> |
| | | </table> |
| | | </div> |
| | | |
| | | <div> |
| | | <asp:Repeater ID="RepClientList" runat="server"> |
| | | <HeaderTemplate> |
| | | <table class="tableStyle"> |
| | | <tr> |
| | | <th style="text-align: center"> |
| | | 品种 |
| | | </th> |
| | | <th style="text-align: center"> |
| | | 征订数量 |
| | | </th> |
| | | |
| | | <th style="text-align: center"> |
| | | 未送数量 |
| | | </th> |
| | | <th style="text-align: center"> |
| | | 本次送货数量 |
| | | </th> |
| | | |
| | | <th style="text-align: center"> |
| | | 本次节约数量 |
| | | </th> |
| | | |
| | | </tr> |
| | | </HeaderTemplate> |
| | | <ItemTemplate> |
| | | <tr> |
| | | |
| | | <td style="text-align: center" > |
| | | <%#Eval("ZYBSpecification")%> <%#Eval("ZYBName")%> |
| | | </td> |
| | | <td style="text-align: center" > |
| | | <%#Eval("DingdanNumber")%> |
| | | </td> |
| | | <td style="text-align: center" > |
| | | <%#Eval("WeisongNumber")%> |
| | | </td> |
| | | <td style="text-align: center" > |
| | | <%#Eval("Number")%> |
| | | </td> |
| | | <td style="text-align: center" > |
| | | <%#Eval("LessNumber")%> |
| | | </td> |
| | | |
| | | </tr> |
| | | </ItemTemplate> |
| | | <FooterTemplate> |
| | | |
| | | </table> |
| | | </FooterTemplate> |
| | | </asp:Repeater> |
| | | |
| | | </div> |
| | | </div> |
| | | </form> |
| | | </body> |
| | | </html> |
| New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Web; |
| | | using System.Web.UI; |
| | | using System.Web.UI.WebControls; |
| | | using CY.BLL; |
| | | using CY.BLL.Sys; |
| | | using CY.Model; |
| | | using CY.Infrastructure.Query; |
| | | using CY.Infrastructure.Common; |
| | | using CY.BLL.EC; |
| | | using CY.Model.Inquiry; |
| | | |
| | | namespace CY.WebForm.Pages.business |
| | | { |
| | | //吴辉 |
| | | //行政管理 |
| | | public partial class DeliverWorkBookAnPaiDetail : BasePage |
| | | { |
| | | CoreCmsPlanOrderBLL _CoreCmsPlanOrderBLL = null; |
| | | CoreCmsPlanOrderItemBLL _CoreCmsPlanOrderItemBLL = null; |
| | | OA_StaffBLL bll_OA_StaffBLL = null; |
| | | OA_CarManageBll _OA_CarManageBll = null; |
| | | CoreDeliverOrderBLL _CoreDeliverOrderBLL = null; |
| | | CoreDeliverOrderItemBLL _CoreDeliverOrderItemBLL = null; |
| | | |
| | | |
| | | |
| | | //初始化 |
| | | public DeliverWorkBookAnPaiDetail() |
| | | { |
| | | _CoreCmsPlanOrderBLL = new CoreCmsPlanOrderBLL(); |
| | | bll_OA_StaffBLL = new OA_StaffBLL(); |
| | | _OA_CarManageBll = new OA_CarManageBll(); |
| | | _CoreDeliverOrderBLL = new CoreDeliverOrderBLL(); |
| | | _CoreDeliverOrderItemBLL = new CoreDeliverOrderItemBLL(); |
| | | _CoreCmsPlanOrderItemBLL = new CoreCmsPlanOrderItemBLL(); |
| | | } |
| | | |
| | | //页面加载 |
| | | protected void Page_Load(object sender, EventArgs e) |
| | | { |
| | | |
| | | if (!IsPostBack) |
| | | { |
| | | |
| | | |
| | | BindList(); |
| | | } |
| | | |
| | | } |
| | | |
| | | //绑定数据 |
| | | private void BindList() |
| | | { |
| | | string orderIdStr = Request["orderId"]; |
| | | |
| | | |
| | | var coreDeliverOrder = _CoreDeliverOrderBLL.GetModelByKeyid(orderIdStr); |
| | | var coreCmsPlanOrder = _CoreCmsPlanOrderBLL.GetModelByKeyid(coreDeliverOrder.OrderId.Value); |
| | | var cmsPlanOrderItems = _CoreCmsPlanOrderItemBLL.GetModelsByOrderid(coreDeliverOrder.OrderId.Value); |
| | | var coreDeliverOrderItems = _CoreDeliverOrderItemBLL.GetModelsByOrderid(orderIdStr); |
| | | |
| | | |
| | | |
| | | //已经送货数量 |
| | | var coreDeliverOrderItemssonghuo = _CoreCmsPlanOrderItemBLL.GetDeliverModelsByZongOrderid(coreCmsPlanOrder.orderkeyid.Value).Where(x=>x.PlanOrderId == coreCmsPlanOrder.id ); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | //送货数量统计 |
| | | var coreDeliverOrderItemsgroup = coreDeliverOrderItemssonghuo.GroupBy(p => new { p.ZYBName, p.ZYBSpecification }) // 多个字段作为匿名类型分组键 |
| | | .Select(g => new CoreDeliverOrderItem |
| | | { |
| | | // 分组字段 |
| | | ZYBName = g.Key.ZYBName, |
| | | ZYBSpecification = g.Key.ZYBSpecification, |
| | | // 统计结果 |
| | | //Count = g.Count(), // 每组人数 |
| | | //AverageSalary = g.Average(p => p.Salary), // 平均工资 |
| | | Number = g.Sum(p => p.Number), // 工资总和 |
| | | LessNumber = g.Sum(p => p.LessNumber) |
| | | }).ToList(); |
| | | |
| | | |
| | | |
| | | this.spanpianqu.InnerText = coreCmsPlanOrder.pianqu; |
| | | this.spanxuexiao.InnerText = coreCmsPlanOrder.shipAddress; |
| | | this.spanDizhi.InnerText = coreCmsPlanOrder.shouhuoAddress; |
| | | this.spanLianxiren.InnerText = coreCmsPlanOrder.shipName; |
| | | this.spanDianhua.InnerText = coreCmsPlanOrder.shipMobile; |
| | | this.spanShijian.InnerText = coreDeliverOrder.MakeTime.Value.ToString("yyyy-MM-dd HH:mm:ss"); |
| | | this.spanZhuangtai.InnerText = coreDeliverOrder.OrderStateName; |
| | | |
| | | |
| | | |
| | | foreach (var coreDeliverOrderItem in coreDeliverOrderItems) |
| | | { |
| | | var deliverOrderItem = coreDeliverOrderItemsgroup.Where(x => x.ZYBName == coreDeliverOrderItem.ZYBName && x.ZYBSpecification == coreDeliverOrderItem.ZYBSpecification).FirstOrDefault(); |
| | | |
| | | var cmsPlanOrderItem = cmsPlanOrderItems.Where(x => x.name == coreDeliverOrderItem.ZYBName && x.specification == coreDeliverOrderItem.ZYBSpecification).FirstOrDefault(); |
| | | if (cmsPlanOrderItem != null) |
| | | { |
| | | coreDeliverOrderItem.DingdanNumber = cmsPlanOrderItem.nums; |
| | | if (deliverOrderItem != null) |
| | | { |
| | | var weisong = cmsPlanOrderItem.nums - (deliverOrderItem.Number + deliverOrderItem.LessNumber); |
| | | coreDeliverOrderItem.WeisongNumber = (weisong > 0 ? weisong : 0); |
| | | } |
| | | else |
| | | { |
| | | coreDeliverOrderItem.WeisongNumber = cmsPlanOrderItem.nums ; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | this.RepClientList.DataSource = coreDeliverOrderItems; |
| | | this.RepClientList.DataBind(); |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | } |
| New file |
| | |
| | | //------------------------------------------------------------------------------ |
| | | // <自动生成> |
| | | // 此代码由工具生成。 |
| | | // |
| | | // 对此文件的更改可能导致不正确的行为,如果 |
| | | // 重新生成代码,则所做更改将丢失。 |
| | | // </自动生成> |
| | | //------------------------------------------------------------------------------ |
| | | |
| | | namespace CY.WebForm.Pages.business |
| | | { |
| | | |
| | | |
| | | public partial class DeliverWorkBookAnPaiDetail |
| | | { |
| | | |
| | | /// <summary> |
| | | /// Head1 控件。 |
| | | /// </summary> |
| | | /// <remarks> |
| | | /// 自动生成的字段。 |
| | | /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 |
| | | /// </remarks> |
| | | protected global::System.Web.UI.HtmlControls.HtmlHead Head1; |
| | | |
| | | /// <summary> |
| | | /// CMSHead1 控件。 |
| | | /// </summary> |
| | | /// <remarks> |
| | | /// 自动生成的字段。 |
| | | /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 |
| | | /// </remarks> |
| | | protected global::CY.WebForm.Pages.common.CMSHead CMSHead1; |
| | | |
| | | /// <summary> |
| | | /// form1 控件。 |
| | | /// </summary> |
| | | /// <remarks> |
| | | /// 自动生成的字段。 |
| | | /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 |
| | | /// </remarks> |
| | | protected global::System.Web.UI.HtmlControls.HtmlForm form1; |
| | | |
| | | /// <summary> |
| | | /// spanpianqu 控件。 |
| | | /// </summary> |
| | | /// <remarks> |
| | | /// 自动生成的字段。 |
| | | /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 |
| | | /// </remarks> |
| | | protected global::System.Web.UI.HtmlControls.HtmlGenericControl spanpianqu; |
| | | |
| | | /// <summary> |
| | | /// spanxuexiao 控件。 |
| | | /// </summary> |
| | | /// <remarks> |
| | | /// 自动生成的字段。 |
| | | /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 |
| | | /// </remarks> |
| | | protected global::System.Web.UI.HtmlControls.HtmlGenericControl spanxuexiao; |
| | | |
| | | /// <summary> |
| | | /// spanDizhi 控件。 |
| | | /// </summary> |
| | | /// <remarks> |
| | | /// 自动生成的字段。 |
| | | /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 |
| | | /// </remarks> |
| | | protected global::System.Web.UI.HtmlControls.HtmlGenericControl spanDizhi; |
| | | |
| | | /// <summary> |
| | | /// spanLianxiren 控件。 |
| | | /// </summary> |
| | | /// <remarks> |
| | | /// 自动生成的字段。 |
| | | /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 |
| | | /// </remarks> |
| | | protected global::System.Web.UI.HtmlControls.HtmlGenericControl spanLianxiren; |
| | | |
| | | /// <summary> |
| | | /// spanDianhua 控件。 |
| | | /// </summary> |
| | | /// <remarks> |
| | | /// 自动生成的字段。 |
| | | /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 |
| | | /// </remarks> |
| | | protected global::System.Web.UI.HtmlControls.HtmlGenericControl spanDianhua; |
| | | |
| | | /// <summary> |
| | | /// spanShijian 控件。 |
| | | /// </summary> |
| | | /// <remarks> |
| | | /// 自动生成的字段。 |
| | | /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 |
| | | /// </remarks> |
| | | protected global::System.Web.UI.HtmlControls.HtmlGenericControl spanShijian; |
| | | |
| | | /// <summary> |
| | | /// spanZhuangtai 控件。 |
| | | /// </summary> |
| | | /// <remarks> |
| | | /// 自动生成的字段。 |
| | | /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 |
| | | /// </remarks> |
| | | protected global::System.Web.UI.HtmlControls.HtmlGenericControl spanZhuangtai; |
| | | |
| | | /// <summary> |
| | | /// RepClientList 控件。 |
| | | /// </summary> |
| | | /// <remarks> |
| | | /// 自动生成的字段。 |
| | | /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 |
| | | /// </remarks> |
| | | protected global::System.Web.UI.WebControls.Repeater RepClientList; |
| | | } |
| | | } |
| New file |
| | |
| | | <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DeliverWorkBookAnPaiEdit.aspx.cs" Inherits="CY.WebForm.Pages.business.DeliverWorkBookAnPaiEdit" %> |
| | | |
| | | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| | | <html xmlns="http://www.w3.org/1999/xhtml"> |
| | | <head id="Head1" runat="server"> |
| | | <title>订单编辑</title> |
| | | <uc:CMSHead ID="CMSHead1" runat="server" /> |
| | | <!--前台页面start--> |
| | | <link rel="stylesheet" type="text/css" href="../../Styles/base.css" /> |
| | | <link href="../../Styles/changes.css" rel="stylesheet" type="text/css" /> |
| | | <link href="../../Styles/ParticularWQJ.css" rel="stylesheet" type="text/css" /> |
| | | <!--前台页面end--> |
| | | <script type="text/javascript" language="javascript"> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | </script> |
| | | |
| | | </head> |
| | | <body style='padding: 0; margin: 0;'> |
| | | <form id="form1" runat="server" style='padding: 0; margin: 0;' class='form2'> |
| | | |
| | | |
| | | <table class="table2" id="tbBasic"> |
| | | <thead> |
| | | <tr> |
| | | <th colspan="8"> |
| | | 基本信息 |
| | | </th> |
| | | </tr> |
| | | </thead> |
| | | <tr style=" height:1px;"> |
| | | <td style="border:none;width: 100px;"> |
| | | </td> |
| | | <td style="border:none; width:300px;"> |
| | | </td> |
| | | |
| | | |
| | | </tr> |
| | | <tr> |
| | | <td class="ali03 "> |
| | | 时间: |
| | | </td> |
| | | <td align="left"> |
| | | <input id="txtDeliverTime" type="text" runat="server" class='date req' datefmt="yyyy-MM-dd HH:mm" maxlength='20' /> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="ali03 "> |
| | | 司机: |
| | | </td> |
| | | <td align="left"> |
| | | |
| | | <select keepdefaultstyle='true' id='selCarId' runat="server" datatextfield='Name' datavaluefield='Keyid' class="Sreq"> |
| | | </select> |
| | | |
| | | </td> |
| | | </tr> |
| | | |
| | | |
| | | |
| | | <tr> |
| | | <td class="contentLeft" colspan="2" style=" padding-left:300px;"> |
| | | <asp:Button ID="btnSaves" runat="server" Text="提交" OnClick="btnSave_ServerClick" /> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | </td> |
| | | </tr> |
| | | </table> |
| | | |
| | | |
| | | |
| | | </form> |
| | | |
| | | </body> |
| | | <script type="text/javascript" language="javascript"> |
| | | |
| | | |
| | | |
| | | </script> |
| | | </html> |
| New file |
| | |
| | | /** |
| | | * OrderEdit.aspx.cs |
| | | * |
| | | * 功 能: 订单列表 |
| | | * 类 名: OrderEdit |
| | | * |
| | | * Ver 变更日期 负责人 变更内容 |
| | | * ─────────────────────────────────── |
| | | * V0.01 2013-5-8 13:55 吴崎均 初版 |
| | | * V0.02 2013-5-8 15:47 吴崎均 实现下拉数据绑定与数据级联 |
| | | * V0.03 2013-5-8 18:00 吴崎均 初步完成新增线下订单(未调试) |
| | | * |
| | | */ |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Web; |
| | | using System.Web.UI; |
| | | using System.Web.UI.WebControls; |
| | | using CY.BLL.Sys; |
| | | using CY.BLL; |
| | | using CY.Model; |
| | | using CY.Infrastructure.Common; |
| | | using CY.WebForm.Pages.common; |
| | | using CY.BLL.EC; |
| | | using CY.Model.Inquiry; |
| | | using System.Transactions; |
| | | |
| | | namespace CY.WebForm.Pages.business |
| | | { |
| | | public partial class DeliverWorkBookAnPaiEdit : BasePage |
| | | { |
| | | |
| | | CoreCmsPlanOrderBLL _CoreCmsPlanOrderBLL = null; |
| | | CoreCmsPlanOrderItemBLL _CoreCmsPlanOrderItemBLL = null; |
| | | OA_StaffBLL bll_OA_StaffBLL = null; |
| | | OA_CarManageBll _OA_CarManageBll = null; |
| | | CoreDeliverOrderBLL _CoreDeliverOrderBLL = null; |
| | | CoreDeliverOrderItemBLL _CoreDeliverOrderItemBLL = null; |
| | | |
| | | //初始化 |
| | | public DeliverWorkBookAnPaiEdit() |
| | | { |
| | | |
| | | _CoreCmsPlanOrderBLL = new CoreCmsPlanOrderBLL(); |
| | | bll_OA_StaffBLL = new OA_StaffBLL(); |
| | | _OA_CarManageBll = new OA_CarManageBll(); |
| | | _CoreDeliverOrderBLL = new CoreDeliverOrderBLL(); |
| | | _CoreDeliverOrderItemBLL = new CoreDeliverOrderItemBLL(); |
| | | _CoreCmsPlanOrderItemBLL = new CoreCmsPlanOrderItemBLL(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 页面加载事件 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | | protected void Page_Load(object sender, EventArgs e) |
| | | { |
| | | try |
| | | { |
| | | switch (Request["Target"]) |
| | | { |
| | | case "Chexiao": |
| | | LoadCommunication(); |
| | | return; |
| | | case "ReBindClients": |
| | | Response.Write(ReLoadClients()); |
| | | break; |
| | | |
| | | default: |
| | | Page_Load_Default(); |
| | | return; |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | PAGEHandleException(ex); |
| | | Response.Clear(); |
| | | //Response.Write("-1"); |
| | | Response.Write(ex.Message); |
| | | } |
| | | Response.End(); |
| | | } |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// 默认执行方法 |
| | | /// </summary> |
| | | private void Page_Load_Default() |
| | | { |
| | | |
| | | |
| | | |
| | | if (!IsPostBack && !IsCallback) |
| | | { |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | this.selCarId.DataSource = bll_OA_StaffBLL.SelectListByFirmId(CurrentUser.MemberId, false, false).Where(x => x.SM_Post == "司机"); |
| | | this.selCarId.DataTextField = "Name"; |
| | | this.selCarId.DataValueField = "Keyid"; |
| | | this.selCarId.DataBind(); |
| | | this.selCarId.Items.Insert(0, new ListItem("请选择", "")); |
| | | |
| | | |
| | | var orderId = Request["orderId"]; |
| | | var coreDeliverOrder = _CoreDeliverOrderBLL.GetModelByKeyid(orderId); |
| | | |
| | | if (coreDeliverOrder.OrderState != 0) |
| | | { |
| | | //操作成功 |
| | | JavaScript.MessageBox("已经开始送货不能安排", this, true, false); |
| | | return; |
| | | } |
| | | |
| | | if (coreDeliverOrder.DriverId.HasValue && coreDeliverOrder.DriverId.Value > 0) |
| | | { |
| | | var oA_Staff = bll_OA_StaffBLL.GetModelByKeyid(coreDeliverOrder.DriverId); |
| | | if (oA_Staff != null) |
| | | { |
| | | this.selCarId.Value = oA_Staff.Keyid.Value.ToString(); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | var oA_Staff = bll_OA_StaffBLL.SelectListByFirmId(CurrentUser.MemberId,false,false).Where(x=>x.MobieNum == coreDeliverOrder.DeliveryMoble).FirstOrDefault(); |
| | | if (oA_Staff != null) |
| | | { |
| | | this.selCarId.Value = oA_Staff.Keyid.Value.ToString(); |
| | | } |
| | | } |
| | | this.txtDeliverTime.Value = coreDeliverOrder.MakeTime.Value.ToString("yyyy-MM-dd HH:mm"); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 保存点击事件 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | | protected void btnSave_ServerClick(object sender, EventArgs e) |
| | | { |
| | | |
| | | if (SaveOrder()) |
| | | { |
| | | //操作成功 |
| | | JavaScript.MessageBox("操作成功", this,true,true); |
| | | } |
| | | else |
| | | { |
| | | //操作失败 |
| | | JavaScript.MessageBox("操作失败", this); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// 加载客户联系方式 |
| | | /// </summary> |
| | | private void LoadCommunication() |
| | | { |
| | | if (!IsPostBack && !IsCallback) |
| | | { |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | var orderId = Request["orderId"]; |
| | | var coreDeliverOrder = _CoreDeliverOrderBLL.GetModelByKeyid(orderId); |
| | | if (coreDeliverOrder.OrderState != 0) |
| | | { |
| | | //操作成功 |
| | | JavaScript.MessageBox("已经开始送货不能撤销", this, true, false); |
| | | return; |
| | | } |
| | | coreDeliverOrder.OrderState = 5; |
| | | var oA_Staff = bll_OA_StaffBLL.GetModelByKeyid(CurrentUser.StaffId); |
| | | coreDeliverOrder.UpDataBy = string.IsNullOrEmpty(oA_Staff.MobieNum)?"": oA_Staff.MobieNum; |
| | | coreDeliverOrder.UpdataTime = DateTime.Now; |
| | | var sss = _CoreDeliverOrderBLL.UpdateModel(coreDeliverOrder); |
| | | |
| | | //操作成功 |
| | | JavaScript.MessageBox("撤销成功", this, true, true); |
| | | return; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// 保存订单 |
| | | /// </summary> |
| | | private bool SaveOrder() |
| | | { |
| | | |
| | | |
| | | bool isWin = false; |
| | | using (TransactionScope scope = new TransactionScope(TransactionScopeOption.Required, |
| | | new TransactionOptions |
| | | { |
| | | IsolationLevel = System.Transactions.IsolationLevel.ReadCommitted, |
| | | Timeout = TransactionManager.MaximumTimeout |
| | | } |
| | | ) |
| | | ) |
| | | { |
| | | try |
| | | { |
| | | |
| | | var orderId = Request["orderId"]; |
| | | var coreDeliverOrder = _CoreDeliverOrderBLL.GetModelByKeyid(orderId); |
| | | |
| | | var oA_Staff = bll_OA_StaffBLL.GetModelByKeyid(CurrentUser.StaffId); |
| | | var shijian = this.txtDeliverTime.Value.ToDateTime2(); |
| | | |
| | | |
| | | var datenow = DateTime.Now; |
| | | |
| | | // coreDeliverOrder.id = Guid.NewGuid(); |
| | | coreDeliverOrder.DriverId = this.selCarId.Value.ToInt32(); |
| | | var i = 0; |
| | | var carManage = bll_OA_StaffBLL.GetModelByKeyid(this.selCarId.Value.ToInt32()); |
| | | if (carManage != null) |
| | | { |
| | | coreDeliverOrder.DeliveryMoble = carManage.MobieNum; |
| | | } |
| | | // coreDeliverOrder.OrderId = keyid.ToInt32(); |
| | | coreDeliverOrder.UpDataBy = string.IsNullOrEmpty(oA_Staff.MobieNum) ? "" : oA_Staff.MobieNum; |
| | | coreDeliverOrder.UpdataTime = datenow; |
| | | |
| | | var coreCmsPlanOrder = _CoreCmsPlanOrderBLL.GetModelByKeyid(coreDeliverOrder.OrderId.Value); |
| | | if (coreCmsPlanOrder != null) |
| | | { |
| | | coreDeliverOrder.ContactName = coreCmsPlanOrder.shipName; |
| | | coreDeliverOrder.ContactPhone = coreCmsPlanOrder.shipMobile; |
| | | } |
| | | coreDeliverOrder.OrderState = 0; |
| | | coreDeliverOrder.MakeTime = shijian; |
| | | coreDeliverOrder.Remarke = ""; |
| | | isWin = _CoreDeliverOrderBLL.UpdateModel(coreDeliverOrder); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | scope.Complete(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | |
| | | PAGEHandleException(ex); |
| | | JavaScript.MessageBox("操作失败", this); |
| | | } |
| | | finally |
| | | { |
| | | // 释放资源 |
| | | scope.Dispose(); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | return isWin; |
| | | } |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// 重新加载客户列表 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | private string ReLoadClients() |
| | | { |
| | | try |
| | | { |
| | | string res = "<option value=''>请选择</option>"; |
| | | OA_CorporateClientsBLL bll_OA_CorporateClientsBLL = new OA_CorporateClientsBLL(); |
| | | IList<OA_CorporateClients> m_OA_CorporateClientsList = bll_OA_CorporateClientsBLL.SelectListByFirmId(CurrentUser.MemberId) as IList<OA_CorporateClients>; |
| | | if (null != m_OA_CorporateClientsList) |
| | | { |
| | | m_OA_CorporateClientsList.Where(cc => CurrentUser.MemberId.Equals(cc.MemberId) && m_OA_CorporateClientsList.Remove(cc)); |
| | | if (m_OA_CorporateClientsList.Count > 0) |
| | | { |
| | | foreach (var m_OA_CorporateClients in m_OA_CorporateClientsList) |
| | | { |
| | | res = res + ("<option value='" + m_OA_CorporateClients.MemberId + "'>" + m_OA_CorporateClients.CompanyName + "</option>"); |
| | | } |
| | | } |
| | | } |
| | | return res; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | PAGEHandleException(ex); |
| | | return ""; |
| | | } |
| | | } |
| | | } |
| | | } |
| New file |
| | |
| | | //------------------------------------------------------------------------------ |
| | | // <自动生成> |
| | | // 此代码由工具生成。 |
| | | // |
| | | // 对此文件的更改可能导致不正确的行为,如果 |
| | | // 重新生成代码,则所做更改将丢失。 |
| | | // </自动生成> |
| | | //------------------------------------------------------------------------------ |
| | | |
| | | namespace CY.WebForm.Pages.business |
| | | { |
| | | |
| | | |
| | | public partial class DeliverWorkBookAnPaiEdit |
| | | { |
| | | |
| | | /// <summary> |
| | | /// Head1 控件。 |
| | | /// </summary> |
| | | /// <remarks> |
| | | /// 自动生成的字段。 |
| | | /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 |
| | | /// </remarks> |
| | | protected global::System.Web.UI.HtmlControls.HtmlHead Head1; |
| | | |
| | | /// <summary> |
| | | /// CMSHead1 控件。 |
| | | /// </summary> |
| | | /// <remarks> |
| | | /// 自动生成的字段。 |
| | | /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 |
| | | /// </remarks> |
| | | protected global::CY.WebForm.Pages.common.CMSHead CMSHead1; |
| | | |
| | | /// <summary> |
| | | /// form1 控件。 |
| | | /// </summary> |
| | | /// <remarks> |
| | | /// 自动生成的字段。 |
| | | /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 |
| | | /// </remarks> |
| | | protected global::System.Web.UI.HtmlControls.HtmlForm form1; |
| | | |
| | | /// <summary> |
| | | /// txtDeliverTime 控件。 |
| | | /// </summary> |
| | | /// <remarks> |
| | | /// 自动生成的字段。 |
| | | /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 |
| | | /// </remarks> |
| | | protected global::System.Web.UI.HtmlControls.HtmlInputText txtDeliverTime; |
| | | |
| | | /// <summary> |
| | | /// selCarId 控件。 |
| | | /// </summary> |
| | | /// <remarks> |
| | | /// 自动生成的字段。 |
| | | /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 |
| | | /// </remarks> |
| | | protected global::System.Web.UI.HtmlControls.HtmlSelect selCarId; |
| | | |
| | | /// <summary> |
| | | /// btnSaves 控件。 |
| | | /// </summary> |
| | | /// <remarks> |
| | | /// 自动生成的字段。 |
| | | /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 |
| | | /// </remarks> |
| | | protected global::System.Web.UI.WebControls.Button btnSaves; |
| | | } |
| | | } |
| New file |
| | |
| | | <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DeliverWorkBookAnPaiList.aspx.cs" Inherits="CY.WebForm.Pages.business.DeliverWorkBookAnPaiList" %> |
| | | |
| | | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| | | <html xmlns="http://www.w3.org/1999/xhtml"> |
| | | <head id="Head1" runat="server"> |
| | | <title>车辆管理</title> |
| | | <uc:CMSHead ID="CMSHead1" runat="server" /> |
| | | <script type="text/javascript"> |
| | | //违章 |
| | | function onViewCarViolation(keyid) { |
| | | top.Dialog.open({ URL: "/Pages/business/CarViolationList.aspx?carid=" + keyid, Title: "违章管理", Width: 1000, Height: 660 }); |
| | | } |
| | | //查看客户资料 |
| | | function View(personId) { |
| | | top.Dialog.open({ URL: "/Pages/business/CorporateClientsDetail.aspx?keyid=" + personId, Title: "查看客户", Width: 900, Height: 580 }); |
| | | } |
| | | //保养 |
| | | function onViewCarMaintenance(keyid) { |
| | | top.Dialog.open({ URL: "/Pages/business/CarMaintenanceList.aspx?carid=" + keyid, Title: "保养管理", Width: 1000, Height: 660 }); |
| | | } |
| | | //维修 |
| | | function onViewCarrepair(keyid) { |
| | | top.Dialog.open({ URL: "/Pages/business/CarrepairList.aspx?carid=" + keyid, Title: "维修管理", Width: 1000, Height: 660 }); |
| | | } |
| | | |
| | | //年检 |
| | | function onViewCarExamined(keyid) { |
| | | top.Dialog.open({ URL: "/Pages/business/CarExaminedList.aspx?carid=" + keyid, Title: "年检管理", Width: 1000, Height: 660 }); |
| | | } |
| | | |
| | | //查看明细 |
| | | function onViewCarInsurance(keyid) { |
| | | top.Dialog.open({ URL: "/Pages/business/DeliverWorkBookAnPaiDetail.aspx?orderId=" + keyid, Title: "查看明细", Width: 900, Height: 900 }); |
| | | } |
| | | //保险 |
| | | function onViewfahuo(keyid) { |
| | | top.Dialog.open({ URL: "/Pages/business/DeliverWorkBookfahuoqingkuang.aspx?orderId=" + keyid, Title: "查看发货情况", Width: 1800, Height: 900 }); |
| | | } |
| | | |
| | | |
| | | //修改 |
| | | function onEdit(keyid) { |
| | | top.Dialog.open({ URL: "/Pages/business/DeliverWorkBookAnPaiEdit.aspx?orderId=" + keyid, Title: "修改计划", Width: 600, Height: 300 }); |
| | | } |
| | | //新增发货 |
| | | function onViewXinzengsonghuo(keyid) { |
| | | top.Dialog.open({ URL: "/Pages/business/DeliverWorkBookFahuo.aspx?orderId=" + keyid, Title: "新增修改发货", Width: 1500, Height: 900 }); |
| | | } |
| | | //库存盘点 |
| | | function onViewKucunpandian(keyid) { |
| | | top.Dialog.open({ URL: "/Pages/business/DeliverWorkBookPandian.aspx?orderId=" + keyid, Title: "库存盘点", Width: 1500, Height: 900 }); |
| | | } |
| | | |
| | | //添加 |
| | | function addModel() { |
| | | top.Dialog.open({ URL: "/Pages/business/CarManageAdd.aspx", Title: "新增车辆", Width: 1000, Height: 660}); |
| | | } |
| | | |
| | | //删除 |
| | | function onDele(keyid) { |
| | | |
| | | top.Dialog.confirm("确定要撤销记录吗?", function () { |
| | | top.Dialog.open({ URL: "/Pages/business/DeliverWorkBookAnPaiEdit.aspx?Target=Chexiao&orderId=" + keyid, Title: "撤销计划", Width: 600, Height: 300 }); |
| | | }); |
| | | |
| | | } |
| | | |
| | | //批量删除 |
| | | function onAllDelete() { |
| | | var deleteKeyIds = ""; |
| | | $(":checkbox").each( |
| | | function () { |
| | | if ($(this).is(":checked")) { |
| | | deleteKeyIds += $(this).val() + ","; |
| | | } |
| | | } |
| | | ) |
| | | if (deleteKeyIds == "") { |
| | | top.Dialog.alert("请选择要删除的记录", function () { |
| | | }); |
| | | return; |
| | | } |
| | | else { |
| | | deleteKeyIds = deleteKeyIds.substring(0, deleteKeyIds.length - 1); |
| | | top.Dialog.confirm("确定要删除所选记录吗?", function () { |
| | | window.location = "/Pages/business/DeliverWorkBookAnPaiList.aspx?deleteKeyIds=" + deleteKeyIds; |
| | | }); |
| | | } |
| | | } |
| | | $(function () { |
| | | $(".AlreadyReply").remove(); |
| | | }); |
| | | </script> |
| | | <style type="text/css"> |
| | | .AlreadyReply { display: none; } |
| | | </style> |
| | | </head> |
| | | <body> |
| | | <form id="form1" runat="server"> |
| | | <div id="scrollContent"> |
| | | <div class="box1" paneltitle="功能面板" roller="false"> |
| | | <table class="TableNewStyle"> |
| | | <tr> |
| | | <td class="ali03"> |
| | | 客户名称: |
| | | </td> |
| | | <td> |
| | | <input id='txtBuyerName' runat="server" maxlength='100' /> |
| | | </td> |
| | | <td class="ali03"> |
| | | 送货时间: |
| | | </td> |
| | | <td style="width: 215px"> |
| | | <input id="txtBeginDate" type="text" runat="server" class='date w80px' maxlength='10' />-<input id="txtEndDate" type="text" runat="server" class='date w80px' maxlength='10' /> |
| | | </td> |
| | | |
| | | |
| | | <td class="ali03"> |
| | | 司机: |
| | | </td> |
| | | <td> |
| | | <select keepdefaultstyle='true' id='selDriver' runat="server" datatextfield='Name' datavaluefield='Keyid'> |
| | | </select> |
| | | </td> |
| | | <td class="ali03"> |
| | | 学校: |
| | | </td> |
| | | <td> |
| | | <input id='txtXuexiao' runat="server" maxlength='50' /> |
| | | </td> |
| | | |
| | | |
| | | <td > |
| | | <asp:Button ID="btn_Submit" Text="查询" runat="server" OnClick="btn_Search_Click" /> <input type="button" value='重置' onclick='document.body.innerHTML="";window.location=window.location;' /> |
| | | </td> |
| | | </tr> |
| | | </table> |
| | | </div> |
| | | |
| | | <div> |
| | | <asp:Repeater ID="RepClientList" runat="server"> |
| | | <HeaderTemplate> |
| | | <table class="tableStyle"> |
| | | <tr> |
| | | <th width="30" style="text-align: center"> |
| | | 编号 |
| | | </th> |
| | | <th style="text-align: center"> |
| | | 日期 |
| | | </th> |
| | | <th style="text-align: center"> |
| | | 客户名称 |
| | | </th> |
| | | <th style="text-align: center"> |
| | | 片区 |
| | | </th> |
| | | <th style="text-align: center"> |
| | | 学校 |
| | | </th> |
| | | <th style="text-align: center"> |
| | | 司机 |
| | | </th> |
| | | |
| | | |
| | | |
| | | <th style="text-align: center"> |
| | | 操作 |
| | | </th> |
| | | </tr> |
| | | </HeaderTemplate> |
| | | <ItemTemplate> |
| | | <tr> |
| | | |
| | | <td style="text-align: center"> |
| | | <%#Container.ItemIndex + 1+ this.UCPager1.PageSize * (this.UCPager1.PageIndex - 1)%> |
| | | </td> |
| | | <td style="text-align: center"> |
| | | <%#Eval("MakeTime", "{0:yyyy-MM-dd HH:mm}")%> |
| | | </td> |
| | | |
| | | <td style="text-align: center"> |
| | | <%#Eval("BuyerName")%> |
| | | </td> |
| | | <td style="text-align: center"> |
| | | <%#Eval("pianqu")%> |
| | | </td> |
| | | <td style="text-align: center"> |
| | | <%#Eval("shipAddress")%> |
| | | </td> |
| | | |
| | | <td style="text-align: center"> |
| | | <%#Eval("DriverName")%> |
| | | </td> |
| | | |
| | | <td class="Operate " style="text-align: center"> |
| | | <span onclick="onViewCarInsurance('<%#Eval("id")%>')">查看明细</span> |
| | | <span menu_member_case_id="case_onEdit" menu_member_case_name="修改" onclick="onEdit('<%#Eval("id")%>')">修改</span> |
| | | <span menu_member_case_id="case_onDele" menu_member_case_name="撤销" onclick="onDele('<%#Eval("id")%>')">撤销</span> |
| | | |
| | | |
| | | |
| | | </td> |
| | | </tr> |
| | | </ItemTemplate> |
| | | <FooterTemplate> |
| | | </table> |
| | | </FooterTemplate> |
| | | </asp:Repeater> |
| | | <div id="page"> |
| | | <uc:UCPager ID="UCPager1" runat="server" /> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </form> |
| | | </body> |
| | | </html> |
| New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Web; |
| | | using System.Web.UI; |
| | | using System.Web.UI.WebControls; |
| | | using CY.BLL; |
| | | using CY.BLL.Sys; |
| | | using CY.Model; |
| | | using CY.Infrastructure.Query; |
| | | using CY.Infrastructure.Common; |
| | | using CY.BLL.EC; |
| | | using CY.Model.Inquiry; |
| | | |
| | | namespace CY.WebForm.Pages.business |
| | | { |
| | | //吴辉 |
| | | //行政管理 |
| | | public partial class DeliverWorkBookAnPaiList : BasePage |
| | | { |
| | | CoreDeliverOrderBLL _CoreDeliverOrderBLL = null; |
| | | OA_StaffBLL bll_OA_StaffBLL = null; |
| | | |
| | | //初始化 |
| | | public DeliverWorkBookAnPaiList() |
| | | { |
| | | |
| | | bll_OA_StaffBLL = new OA_StaffBLL(); |
| | | _CoreDeliverOrderBLL = new CoreDeliverOrderBLL(); |
| | | } |
| | | |
| | | //页面加载 |
| | | protected void Page_Load(object sender, EventArgs e) |
| | | { |
| | | UCPager1.AspNetPager.PageChanged += AspNetPager1_PageChanged; |
| | | if (!IsPostBack) |
| | | { |
| | | this.selDriver.DataSource = bll_OA_StaffBLL.SelectListByFirmId(CurrentUser.MemberId, false, false).Where(x => x.SM_Post == "司机"); ; |
| | | this.selDriver.DataTextField = "Name"; |
| | | this.selDriver.DataValueField = "Keyid"; |
| | | this.selDriver.DataBind(); |
| | | this.selDriver.Items.Insert(0, new ListItem("全部", "")); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | BindList(); |
| | | } |
| | | |
| | | } |
| | | |
| | | //绑定数据 |
| | | private void BindList() |
| | | { |
| | | Pagination pa = new Pagination(); |
| | | pa.PageSize = UCPager1.AspNetPager.PageSize; |
| | | pa.PageIndex = UCPager1.AspNetPager.CurrentPageIndex; |
| | | |
| | | var coreDeliverOrders = _CoreDeliverOrderBLL.SelectModelPage(pa, CurrentUser.MemberId, this.selDriver.Value.ToInt32(),this.txtXuexiao.Value.Trim(),this.txtBuyerName.Value.Trim(), this.txtBeginDate.Value.Trim(), this.txtEndDate.Value.Trim()); ; |
| | | foreach (var coreDeliverOrder in coreDeliverOrders) |
| | | { |
| | | if (coreDeliverOrder.DriverId.HasValue) |
| | | { |
| | | var oA_Staff = bll_OA_StaffBLL.GetModelByKeyid(coreDeliverOrder.DriverId); |
| | | if (oA_Staff != null) |
| | | { |
| | | coreDeliverOrder.DriverName = oA_Staff.Name; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | var oA_Staff1 = bll_OA_StaffBLL.SelectListByFirmId(CurrentUser.MemberId, false, false).Where(x => x.MobieNum == coreDeliverOrder.DeliveryMoble).FirstOrDefault(); |
| | | if (oA_Staff1 != null) |
| | | { |
| | | coreDeliverOrder.DriverName = oA_Staff1.Name; |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | this.RepClientList.DataSource = coreDeliverOrders; |
| | | this.RepClientList.DataBind(); |
| | | UCPager1.AspNetPager.RecordCount = pa.RecordCount; |
| | | } |
| | | |
| | | //分页事件 |
| | | protected void AspNetPager1_PageChanged(object src, EventArgs e) |
| | | { |
| | | BindList(); |
| | | } |
| | | |
| | | //查询事件 |
| | | protected void btn_Search_Click(object src, EventArgs e) |
| | | { |
| | | BindList(); |
| | | } |
| | | } |
| | | } |
| New file |
| | |
| | | //------------------------------------------------------------------------------ |
| | | // <自动生成> |
| | | // 此代码由工具生成。 |
| | | // |
| | | // 对此文件的更改可能导致不正确的行为,如果 |
| | | // 重新生成代码,则所做更改将丢失。 |
| | | // </自动生成> |
| | | //------------------------------------------------------------------------------ |
| | | |
| | | namespace CY.WebForm.Pages.business |
| | | { |
| | | |
| | | |
| | | public partial class DeliverWorkBookAnPaiList |
| | | { |
| | | |
| | | /// <summary> |
| | | /// Head1 控件。 |
| | | /// </summary> |
| | | /// <remarks> |
| | | /// 自动生成的字段。 |
| | | /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 |
| | | /// </remarks> |
| | | protected global::System.Web.UI.HtmlControls.HtmlHead Head1; |
| | | |
| | | /// <summary> |
| | | /// CMSHead1 控件。 |
| | | /// </summary> |
| | | /// <remarks> |
| | | /// 自动生成的字段。 |
| | | /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 |
| | | /// </remarks> |
| | | protected global::CY.WebForm.Pages.common.CMSHead CMSHead1; |
| | | |
| | | /// <summary> |
| | | /// form1 控件。 |
| | | /// </summary> |
| | | /// <remarks> |
| | | /// 自动生成的字段。 |
| | | /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 |
| | | /// </remarks> |
| | | protected global::System.Web.UI.HtmlControls.HtmlForm form1; |
| | | |
| | | /// <summary> |
| | | /// txtBuyerName 控件。 |
| | | /// </summary> |
| | | /// <remarks> |
| | | /// 自动生成的字段。 |
| | | /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 |
| | | /// </remarks> |
| | | protected global::System.Web.UI.HtmlControls.HtmlInputText txtBuyerName; |
| | | |
| | | /// <summary> |
| | | /// txtBeginDate 控件。 |
| | | /// </summary> |
| | | /// <remarks> |
| | | /// 自动生成的字段。 |
| | | /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 |
| | | /// </remarks> |
| | | protected global::System.Web.UI.HtmlControls.HtmlInputText txtBeginDate; |
| | | |
| | | /// <summary> |
| | | /// txtEndDate 控件。 |
| | | /// </summary> |
| | | /// <remarks> |
| | | /// 自动生成的字段。 |
| | | /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 |
| | | /// </remarks> |
| | | protected global::System.Web.UI.HtmlControls.HtmlInputText txtEndDate; |
| | | |
| | | /// <summary> |
| | | /// selDriver 控件。 |
| | | /// </summary> |
| | | /// <remarks> |
| | | /// 自动生成的字段。 |
| | | /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 |
| | | /// </remarks> |
| | | protected global::System.Web.UI.HtmlControls.HtmlSelect selDriver; |
| | | |
| | | /// <summary> |
| | | /// txtXuexiao 控件。 |
| | | /// </summary> |
| | | /// <remarks> |
| | | /// 自动生成的字段。 |
| | | /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 |
| | | /// </remarks> |
| | | protected global::System.Web.UI.HtmlControls.HtmlInputText txtXuexiao; |
| | | |
| | | /// <summary> |
| | | /// btn_Submit 控件。 |
| | | /// </summary> |
| | | /// <remarks> |
| | | /// 自动生成的字段。 |
| | | /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 |
| | | /// </remarks> |
| | | protected global::System.Web.UI.WebControls.Button btn_Submit; |
| | | |
| | | /// <summary> |
| | | /// RepClientList 控件。 |
| | | /// </summary> |
| | | /// <remarks> |
| | | /// 自动生成的字段。 |
| | | /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 |
| | | /// </remarks> |
| | | protected global::System.Web.UI.WebControls.Repeater RepClientList; |
| | | |
| | | /// <summary> |
| | | /// UCPager1 控件。 |
| | | /// </summary> |
| | | /// <remarks> |
| | | /// 自动生成的字段。 |
| | | /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 |
| | | /// </remarks> |
| | | protected global::CY.WebForm.Pages.common.UCPager UCPager1; |
| | | } |
| | | } |
| New file |
| | |
| | | <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DeliverWorkBookLiShiAnPaiList.aspx.cs" Inherits="CY.WebForm.Pages.business.DeliverWorkBookLiShiAnPaiList" %> |
| | | |
| | | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| | | <html xmlns="http://www.w3.org/1999/xhtml"> |
| | | <head id="Head1" runat="server"> |
| | | <title>车辆管理</title> |
| | | <uc:CMSHead ID="CMSHead1" runat="server" /> |
| | | <script type="text/javascript"> |
| | | //违章 |
| | | function onViewCarViolation(keyid) { |
| | | top.Dialog.open({ URL: "/Pages/business/CarViolationList.aspx?carid=" + keyid, Title: "违章管理", Width: 1000, Height: 660 }); |
| | | } |
| | | //查看客户资料 |
| | | function View(personId) { |
| | | top.Dialog.open({ URL: "/Pages/business/CorporateClientsDetail.aspx?keyid=" + personId, Title: "查看客户", Width: 900, Height: 580 }); |
| | | } |
| | | //保养 |
| | | function onViewCarMaintenance(keyid) { |
| | | top.Dialog.open({ URL: "/Pages/business/CarMaintenanceList.aspx?carid=" + keyid, Title: "保养管理", Width: 1000, Height: 660 }); |
| | | } |
| | | //维修 |
| | | function onViewCarrepair(keyid) { |
| | | top.Dialog.open({ URL: "/Pages/business/CarrepairList.aspx?carid=" + keyid, Title: "维修管理", Width: 1000, Height: 660 }); |
| | | } |
| | | |
| | | //年检 |
| | | function onViewCarExamined(keyid) { |
| | | top.Dialog.open({ URL: "/Pages/business/CarExaminedList.aspx?carid=" + keyid, Title: "年检管理", Width: 1000, Height: 660 }); |
| | | } |
| | | |
| | | //查看明细 |
| | | function onViewCarInsurance(keyid) { |
| | | top.Dialog.open({ URL: "/Pages/business/DeliverWorkBookAnPaiDetail.aspx?orderId=" + keyid, Title: "查看明细", Width: 900, Height: 900 }); |
| | | } |
| | | //保险 |
| | | function onViewfahuo(keyid) { |
| | | top.Dialog.open({ URL: "/Pages/business/DeliverWorkBookfahuoqingkuang.aspx?orderId=" + keyid, Title: "查看发货情况", Width: 1800, Height: 900 }); |
| | | } |
| | | |
| | | |
| | | //修改 |
| | | function onEdit(keyid) { |
| | | top.Dialog.open({ URL: "/Pages/business/DeliverWorkBookAnPaiEdit.aspx?orderId=" + keyid, Title: "修改计划", Width: 600, Height: 300 }); |
| | | } |
| | | //新增发货 |
| | | function onViewXinzengsonghuo(keyid) { |
| | | top.Dialog.open({ URL: "/Pages/business/DeliverWorkBookFahuo.aspx?orderId=" + keyid, Title: "新增修改发货", Width: 1500, Height: 900 }); |
| | | } |
| | | //库存盘点 |
| | | function onViewKucunpandian(keyid) { |
| | | top.Dialog.open({ URL: "/Pages/business/DeliverWorkBookPandian.aspx?orderId=" + keyid, Title: "库存盘点", Width: 1500, Height: 900 }); |
| | | } |
| | | |
| | | //添加 |
| | | function addModel() { |
| | | top.Dialog.open({ URL: "/Pages/business/CarManageAdd.aspx", Title: "新增车辆", Width: 1000, Height: 660}); |
| | | } |
| | | |
| | | //删除 |
| | | function onDele(keyid) { |
| | | |
| | | top.Dialog.confirm("确定要撤销记录吗?", function () { |
| | | top.Dialog.open({ URL: "/Pages/business/DeliverWorkBookAnPaiEdit.aspx?Target=Chexiao&orderId=" + keyid, Title: "撤销计划", Width: 600, Height: 300 }); |
| | | }); |
| | | |
| | | } |
| | | |
| | | //批量删除 |
| | | function onAllDelete() { |
| | | var deleteKeyIds = ""; |
| | | $(":checkbox").each( |
| | | function () { |
| | | if ($(this).is(":checked")) { |
| | | deleteKeyIds += $(this).val() + ","; |
| | | } |
| | | } |
| | | ) |
| | | if (deleteKeyIds == "") { |
| | | top.Dialog.alert("请选择要删除的记录", function () { |
| | | }); |
| | | return; |
| | | } |
| | | else { |
| | | deleteKeyIds = deleteKeyIds.substring(0, deleteKeyIds.length - 1); |
| | | top.Dialog.confirm("确定要删除所选记录吗?", function () { |
| | | window.location = "/Pages/business/DeliverWorkBookLiShiAnPaiList.aspx?deleteKeyIds=" + deleteKeyIds; |
| | | }); |
| | | } |
| | | } |
| | | $(function () { |
| | | $(".AlreadyReply").remove(); |
| | | }); |
| | | </script> |
| | | <style type="text/css"> |
| | | .AlreadyReply { display: none; } |
| | | </style> |
| | | </head> |
| | | <body> |
| | | <form id="form1" runat="server"> |
| | | <div id="scrollContent"> |
| | | <div class="box1" paneltitle="功能面板" roller="false"> |
| | | <table class="TableNewStyle"> |
| | | <tr> |
| | | <td class="ali03"> |
| | | 客户名称: |
| | | </td> |
| | | <td> |
| | | <input id='txtBuyerName' runat="server" maxlength='100' /> |
| | | </td> |
| | | <td class="ali03"> |
| | | 送货时间: |
| | | </td> |
| | | <td style="width: 215px"> |
| | | <input id="txtBeginDate" type="text" runat="server" class='date w80px' maxlength='10' />-<input id="txtEndDate" type="text" runat="server" class='date w80px' maxlength='10' /> |
| | | </td> |
| | | |
| | | |
| | | <td class="ali03"> |
| | | 司机: |
| | | </td> |
| | | <td> |
| | | <select keepdefaultstyle='true' id='selDriver' runat="server" datatextfield='Name' datavaluefield='Keyid'> |
| | | </select> |
| | | </td> |
| | | <td class="ali03"> |
| | | 学校: |
| | | </td> |
| | | <td> |
| | | <input id='txtXuexiao' runat="server" maxlength='50' /> |
| | | </td> |
| | | <td class="ali03"> |
| | | 送货状态: |
| | | </td> |
| | | <td> |
| | | <select keepdefaultstyle='true' id='selOrderState' runat="server" > |
| | | <option value="">请选择</option> |
| | | <option value="0">未送</option> |
| | | <option value="1">配送中</option> |
| | | <option value="2">已送</option> |
| | | </select> |
| | | </td> |
| | | |
| | | <td > |
| | | <asp:Button ID="btn_Submit" Text="查询" runat="server" OnClick="btn_Search_Click" /> <input type="button" value='重置' onclick='document.body.innerHTML="";window.location=window.location;' /> |
| | | </td> |
| | | </tr> |
| | | </table> |
| | | </div> |
| | | |
| | | <div> |
| | | <asp:Repeater ID="RepClientList" runat="server"> |
| | | <HeaderTemplate> |
| | | <table class="tableStyle"> |
| | | <tr> |
| | | <th width="30" style="text-align: center"> |
| | | 编号 |
| | | </th> |
| | | <th style="text-align: center"> |
| | | 日期 |
| | | </th> |
| | | <th style="text-align: center"> |
| | | 客户名称 |
| | | </th> |
| | | <th style="text-align: center"> |
| | | 片区 |
| | | </th> |
| | | <th style="text-align: center"> |
| | | 学校 |
| | | </th> |
| | | <th style="text-align: center"> |
| | | 司机 |
| | | </th> |
| | | <th style="text-align: center"> |
| | | 送货状态 |
| | | </th> |
| | | |
| | | |
| | | <th style="text-align: center"> |
| | | 操作 |
| | | </th> |
| | | </tr> |
| | | </HeaderTemplate> |
| | | <ItemTemplate> |
| | | <tr> |
| | | |
| | | <td style="text-align: center"> |
| | | <%#Container.ItemIndex + 1+ this.UCPager1.PageSize * (this.UCPager1.PageIndex - 1)%> |
| | | </td> |
| | | <td style="text-align: center"> |
| | | <%#Eval("MakeTime", "{0:yyyy-MM-dd HH:mm}")%> |
| | | </td> |
| | | |
| | | <td style="text-align: center"> |
| | | <%#Eval("BuyerName")%> |
| | | </td> |
| | | <td style="text-align: center"> |
| | | <%#Eval("pianqu")%> |
| | | </td> |
| | | <td style="text-align: center"> |
| | | <%#Eval("shipAddress")%> |
| | | </td> |
| | | |
| | | <td style="text-align: center"> |
| | | <%#Eval("DriverName")%> |
| | | </td> |
| | | <td style="text-align: center"> |
| | | <%#Eval("OrderStateName")%> |
| | | </td> |
| | | |
| | | <td class="Operate " style="text-align: center"> |
| | | <span onclick="onViewCarInsurance('<%#Eval("id")%>')">查看明细</span> |
| | | |
| | | |
| | | |
| | | |
| | | </td> |
| | | </tr> |
| | | </ItemTemplate> |
| | | <FooterTemplate> |
| | | </table> |
| | | </FooterTemplate> |
| | | </asp:Repeater> |
| | | <div id="page"> |
| | | <uc:UCPager ID="UCPager1" runat="server" /> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </form> |
| | | </body> |
| | | </html> |
| New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Web; |
| | | using System.Web.UI; |
| | | using System.Web.UI.WebControls; |
| | | using CY.BLL; |
| | | using CY.BLL.Sys; |
| | | using CY.Model; |
| | | using CY.Infrastructure.Query; |
| | | using CY.Infrastructure.Common; |
| | | using CY.BLL.EC; |
| | | using CY.Model.Inquiry; |
| | | |
| | | namespace CY.WebForm.Pages.business |
| | | { |
| | | //吴辉 |
| | | //行政管理 |
| | | public partial class DeliverWorkBookLiShiAnPaiList : BasePage |
| | | { |
| | | CoreDeliverOrderBLL _CoreDeliverOrderBLL = null; |
| | | OA_StaffBLL bll_OA_StaffBLL = null; |
| | | |
| | | //初始化 |
| | | public DeliverWorkBookLiShiAnPaiList() |
| | | { |
| | | |
| | | bll_OA_StaffBLL = new OA_StaffBLL(); |
| | | _CoreDeliverOrderBLL = new CoreDeliverOrderBLL(); |
| | | } |
| | | |
| | | //页面加载 |
| | | protected void Page_Load(object sender, EventArgs e) |
| | | { |
| | | UCPager1.AspNetPager.PageChanged += AspNetPager1_PageChanged; |
| | | if (!IsPostBack) |
| | | { |
| | | this.selDriver.DataSource = bll_OA_StaffBLL.SelectListByFirmId(CurrentUser.MemberId, false, false).Where(x => x.SM_Post == "司机"); ; |
| | | this.selDriver.DataTextField = "Name"; |
| | | this.selDriver.DataValueField = "Keyid"; |
| | | this.selDriver.DataBind(); |
| | | this.selDriver.Items.Insert(0, new ListItem("全部", "")); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | BindList(); |
| | | } |
| | | |
| | | } |
| | | |
| | | //绑定数据 |
| | | private void BindList() |
| | | { |
| | | Pagination pa = new Pagination(); |
| | | pa.PageSize = UCPager1.AspNetPager.PageSize; |
| | | pa.PageIndex = UCPager1.AspNetPager.CurrentPageIndex; |
| | | |
| | | var coreDeliverOrders = _CoreDeliverOrderBLL.SelectModelPageLishi(pa, CurrentUser.MemberId, this.selDriver.Value.ToInt32(),this.txtXuexiao.Value.Trim(),this.txtBuyerName.Value.Trim(), this.txtBeginDate.Value.Trim(), this.txtEndDate.Value.Trim(),this.selOrderState.Value); |
| | | foreach (var coreDeliverOrder in coreDeliverOrders) |
| | | { |
| | | if (coreDeliverOrder.DriverId.HasValue) |
| | | { |
| | | var oA_Staff = bll_OA_StaffBLL.GetModelByKeyid(coreDeliverOrder.DriverId); |
| | | if (oA_Staff != null) |
| | | { |
| | | coreDeliverOrder.DriverName = oA_Staff.Name; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | var oA_Staff1 = bll_OA_StaffBLL.SelectListByFirmId(CurrentUser.MemberId, false, false).Where(x => x.MobieNum == coreDeliverOrder.DeliveryMoble).FirstOrDefault(); |
| | | if (oA_Staff1 != null) |
| | | { |
| | | coreDeliverOrder.DriverName = oA_Staff1.Name; |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | this.RepClientList.DataSource = coreDeliverOrders; |
| | | this.RepClientList.DataBind(); |
| | | UCPager1.AspNetPager.RecordCount = pa.RecordCount; |
| | | } |
| | | |
| | | //分页事件 |
| | | protected void AspNetPager1_PageChanged(object src, EventArgs e) |
| | | { |
| | | BindList(); |
| | | } |
| | | |
| | | //查询事件 |
| | | protected void btn_Search_Click(object src, EventArgs e) |
| | | { |
| | | BindList(); |
| | | } |
| | | } |
| | | } |
| New file |
| | |
| | | //------------------------------------------------------------------------------ |
| | | // <自动生成> |
| | | // 此代码由工具生成。 |
| | | // |
| | | // 对此文件的更改可能导致不正确的行为,如果 |
| | | // 重新生成代码,则所做更改将丢失。 |
| | | // </自动生成> |
| | | //------------------------------------------------------------------------------ |
| | | |
| | | namespace CY.WebForm.Pages.business |
| | | { |
| | | |
| | | |
| | | public partial class DeliverWorkBookLiShiAnPaiList |
| | | { |
| | | |
| | | /// <summary> |
| | | /// Head1 控件。 |
| | | /// </summary> |
| | | /// <remarks> |
| | | /// 自动生成的字段。 |
| | | /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 |
| | | /// </remarks> |
| | | protected global::System.Web.UI.HtmlControls.HtmlHead Head1; |
| | | |
| | | /// <summary> |
| | | /// CMSHead1 控件。 |
| | | /// </summary> |
| | | /// <remarks> |
| | | /// 自动生成的字段。 |
| | | /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 |
| | | /// </remarks> |
| | | protected global::CY.WebForm.Pages.common.CMSHead CMSHead1; |
| | | |
| | | /// <summary> |
| | | /// form1 控件。 |
| | | /// </summary> |
| | | /// <remarks> |
| | | /// 自动生成的字段。 |
| | | /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 |
| | | /// </remarks> |
| | | protected global::System.Web.UI.HtmlControls.HtmlForm form1; |
| | | |
| | | /// <summary> |
| | | /// txtBuyerName 控件。 |
| | | /// </summary> |
| | | /// <remarks> |
| | | /// 自动生成的字段。 |
| | | /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 |
| | | /// </remarks> |
| | | protected global::System.Web.UI.HtmlControls.HtmlInputText txtBuyerName; |
| | | |
| | | /// <summary> |
| | | /// txtBeginDate 控件。 |
| | | /// </summary> |
| | | /// <remarks> |
| | | /// 自动生成的字段。 |
| | | /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 |
| | | /// </remarks> |
| | | protected global::System.Web.UI.HtmlControls.HtmlInputText txtBeginDate; |
| | | |
| | | /// <summary> |
| | | /// txtEndDate 控件。 |
| | | /// </summary> |
| | | /// <remarks> |
| | | /// 自动生成的字段。 |
| | | /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 |
| | | /// </remarks> |
| | | protected global::System.Web.UI.HtmlControls.HtmlInputText txtEndDate; |
| | | |
| | | /// <summary> |
| | | /// selDriver 控件。 |
| | | /// </summary> |
| | | /// <remarks> |
| | | /// 自动生成的字段。 |
| | | /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 |
| | | /// </remarks> |
| | | protected global::System.Web.UI.HtmlControls.HtmlSelect selDriver; |
| | | |
| | | /// <summary> |
| | | /// txtXuexiao 控件。 |
| | | /// </summary> |
| | | /// <remarks> |
| | | /// 自动生成的字段。 |
| | | /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 |
| | | /// </remarks> |
| | | protected global::System.Web.UI.HtmlControls.HtmlInputText txtXuexiao; |
| | | |
| | | /// <summary> |
| | | /// selOrderState 控件。 |
| | | /// </summary> |
| | | /// <remarks> |
| | | /// 自动生成的字段。 |
| | | /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 |
| | | /// </remarks> |
| | | protected global::System.Web.UI.HtmlControls.HtmlSelect selOrderState; |
| | | |
| | | /// <summary> |
| | | /// btn_Submit 控件。 |
| | | /// </summary> |
| | | /// <remarks> |
| | | /// 自动生成的字段。 |
| | | /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 |
| | | /// </remarks> |
| | | protected global::System.Web.UI.WebControls.Button btn_Submit; |
| | | |
| | | /// <summary> |
| | | /// RepClientList 控件。 |
| | | /// </summary> |
| | | /// <remarks> |
| | | /// 自动生成的字段。 |
| | | /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 |
| | | /// </remarks> |
| | | protected global::System.Web.UI.WebControls.Repeater RepClientList; |
| | | |
| | | /// <summary> |
| | | /// UCPager1 控件。 |
| | | /// </summary> |
| | | /// <remarks> |
| | | /// 自动生成的字段。 |
| | | /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 |
| | | /// </remarks> |
| | | protected global::CY.WebForm.Pages.common.UCPager UCPager1; |
| | | } |
| | | } |
| | |
| | | } |
| | | ) |
| | | if (deleteKeyIds == "") { |
| | | top.Dialog.alert("请选择要删除的记录", function () { |
| | | top.Dialog.alert("请选择要安排的记录", function () { |
| | | }); |
| | | return; |
| | | } |
| | | else { |
| | | deleteKeyIds = deleteKeyIds.substring(0, deleteKeyIds.length - 1); |
| | | top.Dialog.confirm("确定要删除所选记录吗?", function () { |
| | | window.location = "/Pages/business/DeliverWorkBookSonghuo.aspx?deleteKeyIds=" + deleteKeyIds; |
| | | }); |
| | | top.Dialog.open({ URL: "/Pages/business/DeliverWorkBookAnPai.aspx?ids=" + deleteKeyIds, Title: "送货安排", Width: 600, Height: 300 }); |
| | | //top.Dialog.confirm("确定要安排所选记录吗?", function () { |
| | | // window.location = "/Pages/business/DeliverWorkBookSonghuo.aspx?deleteKeyIds=" + deleteKeyIds; |
| | | //}); |
| | | } |
| | | } |
| | | $(function () { |
| | |
| | | <td colspan="8"> |
| | | <asp:Button ID="btn_Submit" Text="查询" runat="server" OnClick="btn_Search_Click" /> <input type="button" value='重置' onclick='document.body.innerHTML="";window.location=window.location;' /> |
| | | <input type="hidden" runat="server" id="hideOrderId" /> |
| | | |
| | | <input type="button" value='送货安排' onclick="onAllDelete()"/> |
| | | |
| | | </td> |
| | | </tr> |
| | | </table> |
| | |
| | | <HeaderTemplate> |
| | | <table class="tableStyle"> |
| | | <tr> |
| | | <th width="25" > |
| | | |
| | | </th> |
| | | <th width="30" style="text-align: center" > |
| | | 编号 |
| | | </th> |
| | |
| | | </HeaderTemplate> |
| | | <ItemTemplate> |
| | | <tr> |
| | | |
| | | <td> |
| | | <input type="checkbox" value='<%#Eval("id")%>' /> |
| | | </td> |
| | | <td style="text-align: center"> |
| | | <%#Eval("Bianhao")%> <%--<%#Container.ItemIndex + 1%>--%> |
| | | </td> |
| | |
| | | |
| | | if (string.IsNullOrEmpty(biaotou)) |
| | | { |
| | | string biaotou2 = " <th style=\"text-align:center\" > </th> <th style=\"text-align:center\" > </th> <th style=\"text-align:center\" > </th>"; |
| | | string biaotou2 = "<th style=\"text-align:center\" > </th> <th style=\"text-align:center\" > </th> <th style=\"text-align:center\" > </th> <th style=\"text-align:center\" > </th>"; |
| | | foreach (var inquiryWorkBookModel in inquiryWorkBookModels) |
| | | { |
| | | biaotou += " <th style=\"text-align:center\" colspan=\"2\"> " + inquiryWorkBookModel.WorkBookSizeTxt + inquiryWorkBookModel.WorkBookNameTxt + " </th> "; |
| | |
| | | |
| | | |
| | | |
| | | biaowei = " <td style=\"color: grey;text-align: center;\" > " + PlanOrderid.Count +" </td><td style=\"text-align:center\"> </td> <td style=\"text-align:center\"> </td> "; |
| | | biaowei = " <td></td> <td style=\"color: grey;text-align: center;\" > " + PlanOrderid.Count +" </td><td style=\"text-align:center\"> </td> <td style=\"text-align:center\"> </td> "; |
| | | foreach (var inquiryWorkBookModel in inquiryWorkBookModels) |
| | | { |
| | | var nums = cmsPlanOrderItems.Where(x => x.name == inquiryWorkBookModel.WorkBookNameTxt && x.specification == inquiryWorkBookModel.WorkBookSizeTxt && PlanOrderid.Contains(x.orderId)).Sum(x => x.nums); |
| | |
| | | PageSize = UCPager1.AspNetPager.PageSize, |
| | | PageIndex = UCPager1.AspNetPager.CurrentPageIndex |
| | | }; |
| | | IEnumerable<OA_Kaipiaoshenqing> result = oA_KaipiaoshenqingBLL.SelectModelPage(pagination, CurrentUser.MemberId,this.txtSQBeginDate.Value, this.txtSQEndDate.Value,this.selKaipiaoshenqing.Value, this.selKehuqianshou.Value,this.selBusinessManager.Value,this.txtCustormerName.Value,"",""); |
| | | IEnumerable<OA_Kaipiaoshenqing> result = oA_KaipiaoshenqingBLL.SelectModelPage(pagination, CurrentUser.MemberId,this.txtSQBeginDate.Value, this.txtSQEndDate.Value,this.selKaipiaoshenqing.Value, this.selKehuqianshou.Value,this.selBusinessManager.Value,this.txtCustormerName.Value,"","", ""); |
| | | rptData.DataSource = result; |
| | | rptData.DataBind(); |
| | | |
| | |
| | | PageSize = 1000, |
| | | PageIndex = 1 |
| | | }; |
| | | IEnumerable<OA_Kaipiaoshenqing> result = oA_KaipiaoshenqingBLL.SelectModelPage(pagination, CurrentUser.MemberId, SQBeginDate, SQEndDate, Kaipiaoshenqing, Kehuqianshou, BusinessManager, CustormerName,"",""); |
| | | IEnumerable<OA_Kaipiaoshenqing> result = oA_KaipiaoshenqingBLL.SelectModelPage(pagination, CurrentUser.MemberId, SQBeginDate, SQEndDate, Kaipiaoshenqing, Kehuqianshou, BusinessManager, CustormerName,"","", ""); |
| | | //IEnumerable<EC_OrderBasic> result = _eC_OrderBasicBLL.SelectModelPage_Seller(pagination, SearchParam); |
| | | |
| | | |
| | |
| | | <select keepdefaultstyle='true' class=' firstfocus' id='selKaipiaoshenqing' runat="server" datatextfield="Name" datavaluefield="MeanValue"> |
| | | </select> |
| | | </td> |
| | | |
| | | <td > |
| | | |
| | | </td> |
| | | |
| | | |
| | | |
| | |
| | | </td> |
| | | |
| | | |
| | | <td > |
| | | |
| | | |
| | | <td class="ali03"> |
| | | 发票号: |
| | | </td> |
| | | <td> |
| | | <input id='txtFapiaohao' runat="server" /> |
| | | </td> |
| | | |
| | | <td > |
| | | <asp:button id="btn_Search" text="查询" runat="server" /> <input type="button" value='重置' onclick='document.body.innerHTML="";window.location=window.location;' /> |
| | | <asp:Button ID="Button1" Text="导出" OnClientClick="showProgress();return true;" runat="server" OnClick="btn_Daochu_Click" /> |
| | |
| | | PageSize = UCPager1.AspNetPager.PageSize, |
| | | PageIndex = UCPager1.AspNetPager.CurrentPageIndex |
| | | }; |
| | | IEnumerable<OA_Kaipiaoshenqing> result = oA_KaipiaoshenqingBLL.SelectModelPage(pagination, CurrentUser.MemberId, this.txtSQBeginDate.Value, this.txtSQEndDate.Value, this.selKaipiaoshenqing.Value, this.selKehuqianshou.Value, this.selBusinessManager.Value, this.txtCustormerName.Value, this.selPayStates.Value, this.selHuikuanStates.Value ); |
| | | IEnumerable<OA_Kaipiaoshenqing> result = oA_KaipiaoshenqingBLL.SelectModelPage(pagination, CurrentUser.MemberId, this.txtSQBeginDate.Value, this.txtSQEndDate.Value, this.selKaipiaoshenqing.Value, this.selKehuqianshou.Value, this.selBusinessManager.Value, this.txtCustormerName.Value.Trim(), this.selPayStates.Value, this.selHuikuanStates.Value,this.txtFapiaohao.Value.Trim() ); |
| | | rptData.DataSource = result; |
| | | rptData.DataBind(); |
| | | |
| | |
| | | |
| | | |
| | | |
| | | IEnumerable<OA_Kaipiaoshenqing> results = oA_KaipiaoshenqingBLL.SelectModelPage(pa, CurrentUser.MemberId, this.txtSQBeginDate.Value, this.txtSQEndDate.Value, this.selKaipiaoshenqing.Value, this.selKehuqianshou.Value, this.selBusinessManager.Value, this.txtCustormerName.Value, this.selPayStates.Value, this.selHuikuanStates.Value); |
| | | IEnumerable<OA_Kaipiaoshenqing> results = oA_KaipiaoshenqingBLL.SelectModelPage(pa, CurrentUser.MemberId, this.txtSQBeginDate.Value, this.txtSQEndDate.Value, this.selKaipiaoshenqing.Value, this.selKehuqianshou.Value, this.selBusinessManager.Value, this.txtCustormerName.Value.Trim(), this.selPayStates.Value, this.selHuikuanStates.Value, this.txtFapiaohao.Value.Trim()); |
| | | |
| | | |
| | | // 创建工作簿 |
| | |
| | | protected global::System.Web.UI.HtmlControls.HtmlSelect selHuikuanStates; |
| | | |
| | | /// <summary> |
| | | /// txtFapiaohao 控件。 |
| | | /// </summary> |
| | | /// <remarks> |
| | | /// 自动生成的字段。 |
| | | /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 |
| | | /// </remarks> |
| | | protected global::System.Web.UI.HtmlControls.HtmlInputText txtFapiaohao; |
| | | |
| | | /// <summary> |
| | | /// btn_Search 控件。 |
| | | /// </summary> |
| | | /// <remarks> |
| | |
| | | |
| | | function changeselCateId(obj) { |
| | | if ($(obj).val() == "") { |
| | | $("#txtCarNumbera").val(""); |
| | | //$("#txtCarNumbera").val(""); |
| | | } else { |
| | | $("#txtCarNumbera").val($(obj).find("option:selected").text()); |
| | | if ($("#txtCarNumbera").val() == "") { |
| | | $("#txtCarNumbera").val( $(obj).find("option:selected").text()); |
| | | } else { |
| | | $("#txtCarNumbera").val($("#txtCarNumbera").val() + "," + $(obj).find("option:selected").text()); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | <th width="30" style="text-align: center"> |
| | | 编号 |
| | | </th> |
| | | |
| | | <th style="text-align: center" width="60"> |
| | | 部门 |
| | | </th> |
| | | <th style="text-align: center" width="60"> |
| | | 姓名 |
| | | </th> |
| | | <th style="text-align: center"> |
| | | 工作内容 |
| | | </th> |
| | | |
| | | |
| | | <th style="text-align: center" width="60"> |
| | | 责任人 |
| | | </th> |
| | | |
| | | |
| | | |
| | | <th style="text-align: center" width="100"> |
| | |
| | | <td style="text-align: center"> |
| | | <%#Container.ItemIndex + 1+ this.UCPager1.PageSize * (this.UCPager1.PageIndex - 1)%> |
| | | </td> |
| | | |
| | | <td style="text-align: center"> |
| | | <%#Eval("DepartmentName")%> |
| | | </td> |
| | | <td style="text-align: center"> |
| | | <%#Eval("ZerenrenName")%> |
| | | </td> |
| | | <td title=" <%#Eval("Gongzuozhize")%> " > |
| | | <%#Eval("Gongzuozhize")%> |
| | | </td> |
| | | |
| | | <td style="text-align: center"> |
| | | <%#Eval("ZerenrenName")%> |
| | | </td> |
| | | |
| | | |
| | | <td class="Operate " style="text-align: center"> |
| | | <span menu_member_case_id="case_CarEdit" menu_member_case_name="修改" onclick="onEdit('<%#Eval("Keyid")%>')">修改</span> |
| | |
| | | |
| | | OA_GongzuoneirongBLL bll_OA_GongzuoneirongBLL = null; |
| | | OA_StaffBLL bll_OA_StaffBLL = null; |
| | | |
| | | OA_DepartmentBll bll_departmentBll = null; |
| | | |
| | | //初始化 |
| | | public GongzuoneirongList() |
| | | { |
| | | |
| | | bll_OA_GongzuoneirongBLL = new OA_GongzuoneirongBLL(); |
| | | bll_OA_StaffBLL = new OA_StaffBLL(); |
| | | |
| | | bll_departmentBll = new OA_DepartmentBll(); |
| | | |
| | | |
| | | } |
| | | |
| | | //页面加载 |
| | |
| | | Pagination pa = new Pagination(); |
| | | pa.PageSize = 50; |
| | | pa.PageIndex = UCPager1.AspNetPager.CurrentPageIndex; |
| | | var Gongzuoneirongs = bll_OA_GongzuoneirongBLL.SelectModelPage(pa, CurrentUser.MemberId, this.txtName.Value, this.selZerenren.Value.ToInt32()); |
| | | |
| | | |
| | | var oA_Gongzuoneirongs = bll_OA_GongzuoneirongBLL.SelectModelPage(pa, CurrentUser.MemberId, this.txtName.Value, this.selZerenren.Value.ToInt32()); |
| | | foreach (var oA_Gongzuoneirong in oA_Gongzuoneirongs) |
| | | { |
| | | var staff = bll_OA_StaffBLL.GetModelByKeyid(oA_Gongzuoneirong.Zerenren); |
| | | if (staff != null) |
| | | { |
| | | var department = bll_departmentBll.GetModelByKeyid(staff.DepartmentId); |
| | | if (department != null) |
| | | { |
| | | oA_Gongzuoneirong.DepartmentName = department.Name; |
| | | } |
| | | } |
| | | } |
| | | var Gongzuoneirongs = oA_Gongzuoneirongs; |
| | | |
| | | |
| | | |
| | | this.RepClientList.DataSource = Gongzuoneirongs; |
| | | this.RepClientList.DataBind(); |
| | | UCPager1.AspNetPager.RecordCount = pa.RecordCount; |
| | |
| | | <th width="30" style="text-align: center"> |
| | | 编号 |
| | | </th> |
| | | |
| | | <th style="text-align: center" width="60"> |
| | | 责任人 |
| | | </th> |
| | | <th style="text-align: center"> |
| | | 工作职责 |
| | | </th> |
| | | |
| | | |
| | | <th style="text-align: center" width="60"> |
| | | 责任人 |
| | | </th> |
| | | |
| | | |
| | | |
| | | <th style="text-align: center" width="100"> |
| | |
| | | <td style="text-align: center"> |
| | | <%#Container.ItemIndex + 1+ this.UCPager1.PageSize * (this.UCPager1.PageIndex - 1)%> |
| | | </td> |
| | | |
| | | <td style="text-align: center"> |
| | | <%#Eval("ZerenrenName")%> |
| | | </td> |
| | | <td title=" <%#Eval("Gongzuozhize")%> " > |
| | | <%#Eval("Gongzuozhize")%> |
| | | </td> |
| | | |
| | | <td style="text-align: center"> |
| | | <%#Eval("ZerenrenName")%> |
| | | </td> |
| | | |
| | | |
| | | <td class="Operate " style="text-align: center"> |
| | | <span menu_member_case_id="case_CarEdit" menu_member_case_name="修改" onclick="onEdit('<%#Eval("Keyid")%>')">修改</span> |