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.Model;
|
using CY.Infrastructure.Query;
|
using CY.Infrastructure.Common;
|
using CY.BLL.Sys;
|
using CY.BLL.OA;
|
using CY.BLL.EC;
|
using CY.BLL.Inquiry;
|
using CY.Model.Inquiry;
|
using System.Drawing;
|
|
namespace CY.WebForm.Pages.business
|
{
|
public partial class OrderProdactionListchejian : BasePage
|
{
|
Sys_CitySiteBLL bll_Sys_CitySiteBLL = null;
|
EC_OrderBasicBLL _eC_OrderBasicBLL = null;
|
OA_StaffBLL bll_OA_StaffBLL = null;
|
AfterParameterInfoBLL _afterParameterInfoBLL = null;
|
|
//初始化
|
public OrderProdactionListchejian()
|
{
|
bll_Sys_CitySiteBLL = new Sys_CitySiteBLL();
|
_eC_OrderBasicBLL = new EC_OrderBasicBLL();
|
bll_OA_StaffBLL = new OA_StaffBLL();
|
_afterParameterInfoBLL = new AfterParameterInfoBLL();
|
}
|
protected void Page_Load(object sender, EventArgs e)
|
{
|
|
// UCPager1.AspNetPager.PageChanged += AspNetPager1_PageChanged;
|
if (!IsPostBack)
|
{
|
InitialSelectData();
|
BindList();
|
|
}
|
|
}
|
|
|
|
|
|
|
|
//分页事件
|
protected void AspNetPager1_PageChanged(object src, EventArgs e)
|
{
|
BindList();
|
}
|
|
//查询事件
|
protected void btn_Search_Click(object sender, EventArgs e)
|
{
|
BindList();
|
}
|
|
protected void btn_Search_Click1(object sender, EventArgs e)
|
{
|
|
this.txtDeliveryTime.Value = this.Button1.Text;
|
|
BindList();
|
}
|
protected void btn_Search_Click2(object sender, EventArgs e)
|
{
|
|
this.txtDeliveryTime.Value = this.Button2.Text;
|
|
BindList();
|
}
|
protected void btn_Search_Click3(object sender, EventArgs e)
|
{
|
|
this.txtDeliveryTime.Value = this.Button3.Text;
|
|
BindList();
|
}
|
protected void btn_Search_Click4(object sender, EventArgs e)
|
{
|
|
this.txtDeliveryTime.Value = this.Button4.Text;
|
|
BindList();
|
}
|
protected void btn_Search_Click5(object sender, EventArgs e)
|
{
|
|
this.txtDeliveryTime.Value = this.Button5.Text;
|
|
BindList();
|
}
|
protected void btn_Search_Click6(object sender, EventArgs e)
|
{
|
|
this.txtDeliveryTime.Value = this.Button6.Text;
|
|
BindList();
|
}
|
protected void btn_Search_Click7(object sender, EventArgs e)
|
{
|
|
this.txtDeliveryTime.Value = this.Button7.Text;
|
|
BindList();
|
}
|
protected void btn_Search_Click8(object sender, EventArgs e)
|
{
|
|
this.txtDeliveryTime.Value = this.Button8.Text;
|
|
BindList();
|
}
|
|
|
//加载查询条件
|
protected void InitialSelectData()
|
{
|
this.selBusinessManager.DataSource = bll_OA_StaffBLL.SelectListByFirmId(CurrentUser.MemberId, true, false);
|
this.selBusinessManager.DataTextField = "Name";
|
this.selBusinessManager.DataValueField = "Keyid";
|
this.selBusinessManager.DataBind();
|
this.selBusinessManager.Items.Insert(0, new ListItem("全部", ""));
|
|
this.Button1.Text = "明天";
|
this.Button2.Text = "后天";
|
this.Button3.Text = "3天";
|
this.Button4.Text = "4天";
|
this.Button5.Text = "5天";
|
this.Button6.Text = "6天";
|
this.Button7.Text = "7天";
|
this.Button8.Text = "一周后";
|
}
|
|
//绑定列表
|
private void BindList()
|
{
|
if (this.txtDeliveryTime.Value == "")
|
{
|
this.txtDeliveryTime.Value = this.Button1.Text;
|
}
|
|
if (this.txtDeliveryTime.Value == this.Button1.Text)
|
{
|
this.Button1.BorderColor = Color.Black;
|
this.Button2.BorderColor = Color.LightBlue;
|
this.Button3.BorderColor = Color.LightBlue;
|
this.Button4.BorderColor = Color.LightBlue;
|
this.Button5.BorderColor = Color.LightBlue;
|
this.Button6.BorderColor = Color.LightBlue;
|
this.Button7.BorderColor = Color.LightBlue;
|
this.Button8.BorderColor = Color.LightBlue;
|
}
|
else if (this.txtDeliveryTime.Value == this.Button2.Text)
|
{
|
this.Button2.BorderColor = Color.Black;
|
this.Button1.BorderColor = Color.LightBlue;
|
this.Button3.BorderColor = Color.LightBlue;
|
this.Button4.BorderColor = Color.LightBlue;
|
this.Button5.BorderColor = Color.LightBlue;
|
this.Button6.BorderColor = Color.LightBlue;
|
this.Button7.BorderColor = Color.LightBlue;
|
this.Button8.BorderColor = Color.LightBlue;
|
}
|
else if (this.txtDeliveryTime.Value == this.Button3.Text)
|
{
|
this.Button3.BorderColor = Color.Black;
|
this.Button2.BorderColor = Color.LightBlue;
|
this.Button1.BorderColor = Color.LightBlue;
|
this.Button4.BorderColor = Color.LightBlue;
|
this.Button5.BorderColor = Color.LightBlue;
|
this.Button6.BorderColor = Color.LightBlue;
|
this.Button7.BorderColor = Color.LightBlue;
|
this.Button8.BorderColor = Color.LightBlue;
|
}
|
else if (this.txtDeliveryTime.Value == this.Button4.Text)
|
{
|
this.Button4.BorderColor = Color.Black;
|
this.Button2.BorderColor = Color.LightBlue;
|
this.Button3.BorderColor = Color.LightBlue;
|
this.Button1.BorderColor = Color.LightBlue;
|
this.Button5.BorderColor = Color.LightBlue;
|
this.Button6.BorderColor = Color.LightBlue;
|
this.Button7.BorderColor = Color.LightBlue;
|
this.Button8.BorderColor = Color.LightBlue;
|
}
|
else if (this.txtDeliveryTime.Value == this.Button5.Text)
|
{
|
this.Button5.BorderColor = Color.Black;
|
this.Button2.BorderColor = Color.LightBlue;
|
this.Button3.BorderColor = Color.LightBlue;
|
this.Button4.BorderColor = Color.LightBlue;
|
this.Button1.BorderColor = Color.LightBlue;
|
this.Button6.BorderColor = Color.LightBlue;
|
this.Button7.BorderColor = Color.LightBlue;
|
this.Button8.BorderColor = Color.LightBlue;
|
}
|
else if (this.txtDeliveryTime.Value == this.Button6.Text)
|
{
|
this.Button6.BorderColor = Color.Black;
|
this.Button2.BorderColor = Color.LightBlue;
|
this.Button3.BorderColor = Color.LightBlue;
|
this.Button4.BorderColor = Color.LightBlue;
|
this.Button5.BorderColor = Color.LightBlue;
|
this.Button1.BorderColor = Color.LightBlue;
|
this.Button7.BorderColor = Color.LightBlue;
|
this.Button8.BorderColor = Color.LightBlue;
|
}
|
else if (this.txtDeliveryTime.Value == this.Button7.Text)
|
{
|
this.Button7.BorderColor = Color.Black;
|
this.Button2.BorderColor = Color.LightBlue;
|
this.Button3.BorderColor = Color.LightBlue;
|
this.Button4.BorderColor = Color.LightBlue;
|
this.Button5.BorderColor = Color.LightBlue;
|
this.Button6.BorderColor = Color.LightBlue;
|
this.Button1.BorderColor = Color.LightBlue;
|
this.Button8.BorderColor = Color.LightBlue;
|
}
|
else if (this.txtDeliveryTime.Value == this.Button8.Text)
|
{
|
this.Button8.BorderColor = Color.Black;
|
this.Button2.BorderColor = Color.LightBlue;
|
this.Button3.BorderColor = Color.LightBlue;
|
this.Button4.BorderColor = Color.LightBlue;
|
this.Button5.BorderColor = Color.LightBlue;
|
this.Button6.BorderColor = Color.LightBlue;
|
this.Button1.BorderColor = Color.LightBlue;
|
this.Button7.BorderColor = Color.LightBlue;
|
}
|
|
|
DateTime? beginTime = null;
|
DateTime? endTime = null;
|
Pagination pa = new Pagination();
|
pa.PageSize = 1000;// UCPager1.AspNetPager.PageSize;
|
pa.PageIndex = 1;// UCPager1.AspNetPager.CurrentPageIndex;
|
|
IEnumerable<EC_OrderBasic> eC_OrderBasics = _eC_OrderBasicBLL.GetModelPageListForPrepayments(pa,
|
|
this.txtDeliveryTime.Value,
|
"",
|
"",
|
"",
|
this.txtCustormerName.Value,
|
this.selBusinessManager.Value,
|
this.txtSellerOrderId.Value,
|
this.txtDocumentName.Value,
|
CurrentUser.MemberId);
|
IList<SysInquiry_AfterParameterInfo> afterInfos = _afterParameterInfoBLL.GetModelList();
|
|
foreach (EC_OrderBasic eC_OrderBasic in eC_OrderBasics)
|
{
|
string Productionprogress = "";
|
|
if (string.IsNullOrEmpty(eC_OrderBasic.Productionprogress))
|
{
|
if (eC_OrderBasic.OrderState == 2)
|
{
|
Productionprogress += "施工单</span> ";
|
}
|
// Productionprogress += "<span class='a_under' onclick='outAfterWorks(\"施工单\","+ eC_OrderBasic .Keyid+ "," + eC_OrderBasic.SellerOrderId + ")'>施工单</span> ";
|
Productionprogress += "<span class='a_under' onclick='outAfterWorks(\"制版\"," + eC_OrderBasic.Keyid + "," + eC_OrderBasic.SellerOrderId + ")'>制版</span> ";
|
Productionprogress += "<span class='a_under' onclick='outAfterWorks(\"印刷\"," + eC_OrderBasic.Keyid + "," + eC_OrderBasic.SellerOrderId + ")'>印刷</span> ";
|
InquiryCommonModel _inquiryCommonModel = null;
|
if (null != eC_OrderBasic.PrintParameter)
|
{
|
_inquiryCommonModel = SerializationHelper.DeSerialize(typeof(InquiryCommonModel), eC_OrderBasic.PrintParameter) as InquiryCommonModel;
|
List<int> works = _inquiryCommonModel.AfterWorkList;
|
if (works != null && works.Count > 0)
|
{
|
foreach (int work in works)
|
{
|
SysInquiry_AfterParameterInfo sysInquiry_AfterParameterInfo = afterInfos.Where(x => x.KeyId == work).FirstOrDefault();
|
if (sysInquiry_AfterParameterInfo != null)
|
{
|
Productionprogress += "<span class='a_under' onclick='outAfterWorks(\"" + sysInquiry_AfterParameterInfo.ParameterName + "\"," + eC_OrderBasic.Keyid + "," + eC_OrderBasic.SellerOrderId + ")'>" + sysInquiry_AfterParameterInfo.ParameterName + "</span> ";
|
}
|
|
|
}
|
}
|
|
List<InquiryInsideModel> InquiryInsideList = _inquiryCommonModel.InquiryInsideList;
|
|
if (InquiryInsideList != null && InquiryInsideList.Count > 0)
|
{
|
int i = 1;
|
foreach (InquiryInsideModel inquiryInsideModel in InquiryInsideList)
|
{
|
List<int> worksins = inquiryInsideModel.AfterWorkList;
|
if (worksins != null && worksins.Count > 0)
|
{
|
foreach (int worksin in worksins)
|
{
|
SysInquiry_AfterParameterInfo sysInquiry_AfterParameterInfo = afterInfos.Where(x => x.KeyId == worksin).FirstOrDefault();
|
if (sysInquiry_AfterParameterInfo != null)
|
{
|
Productionprogress += "<span class='a_under' onclick='outAfterWorks(\"内页"+ i+":" + sysInquiry_AfterParameterInfo.ParameterName + "\"," + eC_OrderBasic.Keyid + "," + eC_OrderBasic.SellerOrderId + ")'>内页" + i + ":" + sysInquiry_AfterParameterInfo.ParameterName + "</span> ";
|
}
|
}
|
}
|
i += 1;
|
}
|
}
|
|
}
|
Productionprogress += "<span class='a_under' onclick='outAfterWorks(\"装订\"," + eC_OrderBasic.Keyid + "," + eC_OrderBasic.SellerOrderId + ")'>装订</span> ";
|
Productionprogress += "<span class='a_under' onclick='outAfterWorks(\"包装\"," + eC_OrderBasic.Keyid + "," + eC_OrderBasic.SellerOrderId + ")'>包装</span> ";
|
eC_OrderBasic.Productionprogress = Productionprogress;
|
}
|
else
|
{
|
if (eC_OrderBasic.OrderState == 2)
|
{
|
Productionprogress += "施工单</span> ";
|
}
|
string[] productprogs = eC_OrderBasic.Productionprogress.Split(',');
|
if (productprogs != null && productprogs.Length > 0)
|
{
|
foreach (var productprog in productprogs)
|
{
|
if (!string.IsNullOrEmpty(productprog))
|
{
|
Productionprogress += "<span class='a_under' onclick='outAfterWorks(\"" + productprog + "\"," + eC_OrderBasic.Keyid + "," + eC_OrderBasic.SellerOrderId + ")'>" + productprog + "</span> ";
|
}
|
|
}
|
}
|
|
eC_OrderBasic.Productionprogress = Productionprogress;
|
}
|
|
|
|
}
|
this.RepClientList.DataSource = eC_OrderBasics;
|
|
|
|
this.RepClientList.DataBind();
|
// UCPager1.AspNetPager.RecordCount = pa.RecordCount;
|
}
|
|
}
|
}
|