1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237 |
- using System;
- using System.Collections;
- using System.Collections.Generic;
- using System.Data;
- using System.Dynamic;
- using System.Linq;
- using System.Text;
- namespace LYFZ.Software.MainBusiness.DoorCityProcess
- {
- public class frmDigitalArrangement : LYFZ.Software.UI.DoorCityProcess.frmDigitalArrangement
- {
- /// <summary>
- /// 是否首次运行
- /// </summary>
- bool IsFirstRun = true;
- /// <summary>
- /// 查询条件
- /// </summary>
- private Dictionary<string, string> DictData = new Dictionary<string, string>();
- /// <summary>
- /// 员工编号
- /// </summary>
- string StrUserID = LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.LoginUserModel.User_EmployeeID;
- Hashtable htData;
- Dictionary<string, string> dictColumns;
- List<string> earlyRepairColumns = new List<string>();
- List<string> refinementColumns = new List<string>();
- List<string> designColumns = new List<string>();
- List<string> sendColumns = new List<string>();
- LYFZ.Model.Model_ErpOrderDigital vmodel=null;
- LYFZ.Model.Model_ErpOrder model = null;
- System.Windows.Forms.DataGridViewRow selectRow;
- string StrSightsName = "";
- BLL.BLL_ErpOrdersPhotography bllPhotography = new BLL.BLL_ErpOrdersPhotography();
- LYFZ.BLL.BLL_ErpOrder orbll = new BLL.BLL_ErpOrder();
- LYFZ.BLL.BLL_ErpOrderDigital orvbll = new BLL.BLL_ErpOrderDigital();
- LYFZ.BLL.BLL_ErpOrderDigitalStatus orsbll = new BLL.BLL_ErpOrderDigitalStatus();
-
- /// <summary>
- /// 显示相片集合
- /// </summary>
- System.Windows.Forms.ImageList ImageList1 = new System.Windows.Forms.ImageList();
- public frmDigitalArrangement()
- {
- this.Shown += frmDigitalArrangement_Shown;
- this.Load += frmDigitalArrangement_Load;
- this.cbxDropDownList.ComboBoxTreeViewEx_TextChanged += cbxDropDownList_ComboBoxTreeViewEx_TextChanged;
- //this.PublicFunctionRights();
- //this.PublicFunctionRows();
- cbxPhotoType.SelectedIndex = 0;
- labDesign.Click += labDesign_Click;
- labEarlyRepair.Click += labDesign_Click;
- labRefineRepair.Click += labDesign_Click;
- labSendData.Click += labDesign_Click;
- this.dgvOrderList.CellDoubleClick += dgvOrderList_CellContentDoubleClick;
- this.dgvOrderList.MouseDoubleClick += dgvOrderList_MouseDoubleClick;
- /// 查看工作安排
- this.btn_ArrangeWork.Click += btn_ArrangeWork_Click;
- /// 安排工作
- this.btn_ViewPai.Click += btn_ViewPai_Click;
- ///导入原片
- this.btnImportOriginalFilm.Click += btnImportOriginalFilm_Click;
- ///导出原片
- this.btnExportOriginalFilm.Click += btnExportOriginalFilm_Click;
- ///分片
- this.btnSlice.Click += btnSlice_Click;
- ///导出初修
- this.btnExportRepair.Click +=btnExportRepair_Click;
- ///导入初修
- this.btnImportRepairFilm.Click += btnImportRepairFilm_Click;
- ///外发初修
- this.btnSendOutRepair.Click += btnSendOutRepair_Click;
- ///导出选好的片
- this.btnExportSelectFilm.Click += btnExportSelectFilm_Click;
- ///导入精修
- this.btnImportRefine.Click += btnImportRefine_Click;
- ///导出精修
- this.btnExportRefine.Click += btnExportRefine_Click;
- ///外发精修
- this.btnSendOutRefine.Click += btnSendOutRefine_Click;
- ///导出设计
- this.btnExportDesign.Click += btnExportDesign_Click;
- ///导入设计
- this.btnImportDesign.Click += btnImportDesign_Click;
- ///外发统计
- this.btnOutDesignStatistics.Click += btnOutDesignStatistics_Click;
- ///外发设计
- this.btnOutDesign.Click += btnOutDesign_Click;
- this.cbxMyJob.Click += cbxMyJob_Click;
- this.btn_Query.Click += btn_Query_Click;
- }
- void btn_Query_Click(object sender, EventArgs e)
- {
- labDesign_Click(null, null);
- }
- public void BindPostionSize()
- {
- this.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
- this.Location = new System.Drawing.Point(LYFZ.EnumPublic.FormLocation_X, LYFZ.EnumPublic.FormLocation_Y);
- this.Size = new System.Drawing.Size(LYFZ.EnumPublic.FormSize_Width, LYFZ.EnumPublic.FormSize_Height);
- }
- void cbxMyJob_Click(object sender, EventArgs e)
- {
- this.PublicFunctionRights();
- this.PublicFunctionRows();
- }
- ///外发设计
- void btnOutDesign_Click(object sender, EventArgs e)
- {
- if (this.dgvOrderList.Rows.Count > 0)
- {
- if (this.dgvOrderList.SelectedRows.Count > 0)
- {
- string StrViceNumber = this.dgvOrderList.CurrentRow.Cells["Ordv_ViceNumber"].Value.ToString().Trim();
- if (!LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.IsEnterPassword(StrViceNumber))
- { return; }
- LYFZ.Software.MainBusiness.DoorCityProcess.SetSmallForm.OutSendDesignSingleSmallForm frm = new SetSmallForm.OutSendDesignSingleSmallForm();
- frm.StrOrdNumber = this.dgvOrderList.CurrentRow.Cells["Ord_Number"].Value.ToString().Trim();
- frm.StrOrdViceNumber = this.dgvOrderList.CurrentRow.Cells["Ordv_ViceNumber"].Value.ToString().Trim();
- frm.ShowDialog();
- if (frm.IsSaveed)
- { this.PublicFunctionRows(); }
- }
- else
- { MessageBoxCustom.Show("请选择你要操作的订单"); return; }
- }
- }
- ///外发统计
- void btnOutDesignStatistics_Click(object sender, EventArgs e)
- {
- LYFZ.Software.MainBusiness.DoorCityProcess.SetSmallForm.OutSendDesignStatisticSmallForm frm = new SetSmallForm.OutSendDesignStatisticSmallForm();
- frm.ShowDialog();
- }
- ///导入设计
- void btnImportDesign_Click(object sender, EventArgs e)
- {
- if (this.dgvOrderList.Rows.Count > 0)
- {
- if (this.dgvOrderList.SelectedRows.Count > 0)
- {
- string ViceName = "";
- if (this.dgvOrderList.CurrentRow.Cells["订单类型"].Value.ToString().Trim() == Convert.ToInt32(LYFZ.EnumPublic.OrderType.儿童订单).ToString().Trim())
- {
- if (this.dgvOrderList.Columns["拍摄名称"] != null)
- {
- ViceName = this.dgvOrderList.CurrentRow.Cells["拍摄名称"].Value.ToString().Trim();
- }
- }
- if (BLL.BLL_N8ClientConfig.N8ViewGoEnable)
- {
- if (LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ImportN8UserPiece(
- this.dgvOrderList.CurrentRow.Cells["Ord_Number"].Value.ToString().Trim(),
- this.dgvOrderList.CurrentRow.Cells["Ordv_ViceNumber"].Value.ToString().Trim(), ViceName)
- )
- {
- this.PublicFunctionRows();
- }
- }
- else
- {
- if (this.dgvOrderList.CurrentRow.Cells["取件状态"].Value.ToString().Trim() == "OK")
- {
- MessageBoxCustom.Show("已取件,不能导片!");
- }
- LYFZ.Model.Model_ErpOrderDigital _modelDigital = null;
- if (LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ImportDesignPiece(
- this.dgvOrderList.CurrentRow.Cells["Ord_Number"].Value.ToString().Trim(),
- this.dgvOrderList.CurrentRow.Cells["Ordv_ViceNumber"].Value.ToString().Trim(),
- ViceName,ref _modelDigital,
- this.dgvOrderList.CurrentRow.Cells["取件状态"].Value.ToString().Trim()))
- {
- this.PublicFunctionRows();
- }
- }
- }
- else
- {
- MessageBoxCustom.Show("请选择要导入的订单"); return;
- }
- }
- }
- ///导出设计
- void btnExportDesign_Click(object sender, EventArgs e)
- {
- if (this.dgvOrderList.Rows.Count > 0)
- {
- if (this.dgvOrderList.SelectedRows.Count > 0)
- {
- string SightsName = "";
- if (this.dgvOrderList.CurrentRow.Cells["订单类型"].Value.ToString().Trim() == Convert.ToInt32(LYFZ.EnumPublic.OrderType.儿童订单).ToString().Trim())
- {
- if (this.dgvOrderList.Columns["拍摄名称"] != null)
- {
- SightsName = this.dgvOrderList.CurrentRow.Cells["拍摄名称"].Value.ToString().Trim();
- }
- }
- if (BLL.BLL_N8ClientConfig.N8ViewGoEnable)
- {
- LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ExportN8Piece(
- this.dgvOrderList.CurrentRow.Cells["Ord_Number"].Value.ToString().Trim(),
- this.dgvOrderList.CurrentRow.Cells["Ordv_ViceNumber"].Value.ToString().Trim(), SightsName
- );
- }
- else
- {
- LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ExportDesignPiece(
- this.dgvOrderList.CurrentRow.Cells["Ord_Number"].Value.ToString().Trim(),
- this.dgvOrderList.CurrentRow.Cells["Ordv_ViceNumber"].Value.ToString().Trim(), SightsName
- );
- }
- }
- else
- {
- MessageBoxCustom.Show("请选择要导出的订单");
- return;
- }
- }
- }
- ///外发精修
- void btnSendOutRefine_Click(object sender, EventArgs e)
- {
- if (MessageBoxCustom.Show("你确定要外发精修片吗?", "温馨提示", System.Windows.Forms.MessageBoxButtons.YesNo) == System.Windows.Forms.DialogResult.Yes)
- {
- string StrOrdNumber = this.dgvOrderList.CurrentRow.Cells["Ord_Number"].Value.ToString().Trim();
- string StrOrdViceNumber = this.dgvOrderList.CurrentRow.Cells["Ordv_ViceNumber"].Value.ToString().Trim();
- if (!LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.IsEnterPassword(StrOrdViceNumber))
- { return; }
- LYFZ.Software.MainBusiness.DoorCityProcess.SuperSmallForm.ChooseNameSuperSmallForm frm = new SuperSmallForm.ChooseNameSuperSmallForm();
- frm.StrOrdNumber = StrOrdNumber;
- frm.StrOrdViceNumber = StrOrdViceNumber;
- frm.orderProcess = EnumPublic.OrderProcessEnum.精修;
- frm.ShowDialog();
- if (frm.IsSaveed)
- {
- DateTime strTime = SDateTime.Now;
- List<Helper.CommandInfo> clist = new List<Helper.CommandInfo>();
- DataTable dt = orbll.GetView_Custom("tb_ErpOrderDigitalStatus", StrWhere: "Ords_OrdNumber = '" + StrOrdNumber + "' And Ords_ViceNumber = '" + StrOrdViceNumber + "'", ShowColumnName: "*").Tables[0];
- LYFZ.Model.Model_ErpOrderDigitalStatus modelStatus = null;
- if (dt.Rows.Count > 0)
- {
- modelStatus = orsbll.DataRowToModel(dt.Rows[0]);
- modelStatus.Ords_OutSendRefineRepairName = this.StrUserID;
- modelStatus.Ords_OutSendRefineRepairStatus = "已发";
- modelStatus.Ords_OutSendRefineRepairTime = strTime;
- modelStatus.Ords_OutSendRefineRepairVendor = frm.htData["StrVendor"].ToString().Trim();
- modelStatus.Ords_OutSendRefineRepairVendorQQ = frm.htData["StrQQ"].ToString().Trim();
- clist.Add(orsbll.GetUpdateCommandInfo(modelStatus));
- }
- if (clist.Count > 0)
- {
- if (LYFZ.BLL.BaseBllOperate.ExecuteSqlTran(clist) > 0)
- {
- if (Convert.ToBoolean(frm.htData["StrIsOutSend"]) && frm.htData["StrQQ"].ToString().Trim().Length > 0)
- { LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.QQCall(frm.htData["StrQQ"].ToString().Trim()); }
- }
- else
- { MessageBoxCustom.Show("操作选择供应商发出失败!"); }
- }
- else
- { MessageBoxCustom.Show("外发失败,可能数码状态表不存在!"); }
- }
- }
- }
- ///导出精修
- void btnExportRefine_Click(object sender, EventArgs e)
- {
- if (this.dgvOrderList.Rows.Count > 0)
- {
- if (this.dgvOrderList.SelectedRows.Count > 0)
- {
- string ViceName = "";
- if (this.dgvOrderList.CurrentRow.Cells["订单类型"].Value.ToString().Trim() == Convert.ToInt32(LYFZ.EnumPublic.OrderType.儿童订单).ToString().Trim())
- {
- if (this.dgvOrderList.Columns["拍摄名称"] != null)
- { ViceName = this.dgvOrderList.CurrentRow.Cells["拍摄名称"].Value.ToString().Trim(); }
- }
- string ViceOrderNumber = this.dgvOrderList.CurrentRow.Cells["Ordv_ViceNumber"].Value.ToString().Trim();
- LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ExportRefinedRepairPiece(this.dgvOrderList.CurrentRow.Cells["Ord_Number"].Value.ToString().Trim(), ViceOrderNumber, ViceName);
- }
- else { MessageBoxCustom.Show("请选择订单"); return; }
- }
- }
- ///导入精修
- void btnImportRefine_Click(object sender, EventArgs e)
- {
- if (this.dgvOrderList.Rows.Count > 0)
- {
- if (this.dgvOrderList.SelectedRows.Count > 0)
- {
- string SightsName = "";
- if (this.dgvOrderList.CurrentRow.Cells["订单类型"].Value.ToString().Trim() == Convert.ToInt32(LYFZ.EnumPublic.OrderType.儿童订单).ToString().Trim())
- {
- if (this.dgvOrderList.Columns["拍摄名称"] != null)
- { SightsName = this.dgvOrderList.CurrentRow.Cells["拍摄名称"].Value.ToString().Trim(); }
- }
- if (this.dgvOrderList.CurrentRow.Cells["取件状态"].Value.ToString().Trim() == "OK")
- {
- MessageBoxCustom.Show("已取件,不能导片!");
- }
- LYFZ.Model.Model_ErpOrderDigital _modelDigital=null;
- if (LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ImportRefinedRepairPiece(
- this.dgvOrderList.CurrentRow.Cells["Ord_Number"].Value.ToString().Trim(),
- this.dgvOrderList.CurrentRow.Cells["Ordv_ViceNumber"].Value.ToString().Trim(),
- SightsName,ref _modelDigital,
- this.dgvOrderList.CurrentRow.Cells["取件状态"].Value.ToString().Trim()))
- { this.PublicFunctionRows(); }
- }
- else
- { MessageBoxCustom.Show("请选择订单"); return; }
- }
- }
- void btnExportSelectFilm_Click(object sender, EventArgs e)
- {
- if (this.dgvOrderList.Rows.Count > 0)
- {
- if (this.dgvOrderList.SelectedRows.Count > 0)
- {
- string ViceOrderNumber = this.dgvOrderList.CurrentRow.Cells["Ordv_ViceNumber"].Value.ToString().Trim();
- LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ExportSelectionPiece(this.dgvOrderList.CurrentRow.Cells["Ord_Number"].Value.ToString().Trim(), ViceOrderNumber);
- }
- else
- { MessageBoxCustom.Show("请选择订单"); return; }
- }
- }
- void btnSendOutRepair_Click(object sender, EventArgs e)
- {
- if (this.dgvOrderList.Rows.Count > 0)
- {
- if (this.dgvOrderList.SelectedRows.Count > 0)
- {
- string StrOrdViceNumber = this.dgvOrderList.CurrentRow.Cells["Ordv_ViceNumber"].Value.ToString().Trim();
- if (!LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.IsEnterPassword(StrOrdViceNumber))
- { return; }
- if (MessageBoxCustom.Show("你确定要外发初修片吗?", "温馨提示", System.Windows.Forms.MessageBoxButtons.YesNo) == System.Windows.Forms.DialogResult.Yes)
- {
- string StrOrdNumber = this.dgvOrderList.CurrentRow.Cells["Ord_Number"].Value.ToString().Trim();
- LYFZ.Software.MainBusiness.DoorCityProcess.SuperSmallForm.ChooseNameSuperSmallForm frm = new SuperSmallForm.ChooseNameSuperSmallForm();
- frm.StrOrdNumber = StrOrdNumber;
- frm.StrOrdViceNumber = StrOrdViceNumber;
- frm.orderProcess = EnumPublic.OrderProcessEnum.初修;
- frm.ShowDialog();
- if (frm.IsSaveed)
- {
- DateTime strTime = SDateTime.Now;
- List<Helper.CommandInfo> clist = new List<Helper.CommandInfo>();
- DataTable dt = orbll.GetView_Custom("tb_ErpOrderDigitalStatus", StrWhere: "Ords_OrdNumber = '" + StrOrdNumber + "' And Ords_ViceNumber = '" + StrOrdViceNumber + "'", ShowColumnName: "*").Tables[0];
- LYFZ.Model.Model_ErpOrderDigitalStatus modelStatus = null;
- if (dt.Rows.Count > 0)
- {
- modelStatus = orsbll.DataRowToModel(dt.Rows[0]);
- modelStatus.Ords_OutSendEarlyRepairName = this.StrUserID;
- modelStatus.Ords_OutSendEarlyRepairStatus = "已发";
- modelStatus.Ords_OutSendEarlyRepairTime = strTime;
- modelStatus.Ords_OutSendEarlyRepairVendor = frm.htData["StrVendor"].ToString().Trim();
- modelStatus.Ords_OutSendEarlyRepairVendorQQ = frm.htData["StrQQ"].ToString().Trim();
- clist.Add(orsbll.GetUpdateCommandInfo(modelStatus));
- }
- if (clist.Count > 0)
- {
- if (LYFZ.BLL.BaseBllOperate.ExecuteSqlTran(clist) > 0)
- {
- if (Convert.ToBoolean(frm.htData["StrIsOutSend"]) && frm.htData["StrQQ"].ToString().Trim().Length > 0)
- { LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.QQCall(frm.htData["StrQQ"].ToString().Trim()); }
- }
- else
- { MessageBoxCustom.Show("操作选择供应商发出失败!"); }
- }
- else
- { MessageBoxCustom.Show("外发失败,可能数码状态表不存在!"); }
- }
- }
- }
- }
- }
- void btnImportRepairFilm_Click(object sender, EventArgs e)
- {
- if (this.dgvOrderList.Rows.Count > 0)
- {
- if (this.dgvOrderList.SelectedRows.Count > 0)
- {
- string SightsName = "";
- if (this.dgvOrderList.CurrentRow.Cells["订单类型"].Value.ToString().Trim() == Convert.ToInt32(LYFZ.EnumPublic.OrderType.儿童订单).ToString().Trim())
- {
- if (this.dgvOrderList.Columns["拍摄名称"] != null)
- { SightsName = this.dgvOrderList.CurrentRow.Cells["拍摄名称"].Value.ToString().Trim(); }
- }
- if (this.dgvOrderList.CurrentRow.Cells["取件状态"].Value.ToString().Trim() == "OK")
- {
- MessageBoxCustom.Show("已取件,不能导片!");
- }
- LYFZ.Model.Model_ErpOrderDigital _modelDigital = null;
- if (LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ImportRepairPiece(
- this.dgvOrderList.CurrentRow.Cells["Ord_Number"].Value.ToString().Trim(),
- this.dgvOrderList.CurrentRow.Cells["Ordv_ViceNumber"].Value.ToString().Trim(),
- SightsName,
- ref _modelDigital,
- this.dgvOrderList.CurrentRow.Cells["取件状态"].Value.ToString().Trim()))
- { this.PublicFunctionRows(); }
- }
- else
- { MessageBoxCustom.Show("请选择订单"); return; }
- }
- }
- /// <summary>
- /// 熬出修片
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void btnExportRepair_Click(object sender, EventArgs e)
- {
- if (this.dgvOrderList.Rows.Count > 0)
- {
- if (this.dgvOrderList.SelectedRows.Count > 0)
- {
- try
- {
- System.Windows.Forms.FolderBrowserDialog fbd = new System.Windows.Forms.FolderBrowserDialog();
- string ViceOrderNumber = this.dgvOrderList.CurrentRow.Cells["Ordv_ViceNumber"].Value.ToString().Trim();//数码编号
- LYFZ.Model.Model_ErpOrder ord_model = orbll.GetModel("Ord_Number", this.dgvOrderList.CurrentRow.Cells["Ord_Number"].Value);
- LYFZ.Model.Model_ErpOrderDigital vmodel = orvbll.GetModel("Ordv_ViceNumber", ViceOrderNumber);//
- LYFZ.BLL.SelectPhotoHandling sPh = new BLL.SelectPhotoHandling(ord_model, vmodel);
- string ViceName = "";
- if (this.dgvOrderList.CurrentRow.Cells["订单类型"].Value.ToString().Trim() == Convert.ToInt32(LYFZ.EnumPublic.OrderType.儿童订单).ToString().Trim())
- {
- try
- { ViceName = this.dgvOrderList.CurrentRow.Cells["拍摄名称"].Value.ToString().Trim(); }
- catch { }
- }
- List<string> sPhotoList = sPh.GetSpecifyTypePhotoList(Model.Model_ErpOrder.DirectoryType.EarlyRetouch, BLL.SelectPhotoHandling.PhotoType.Original, ViceName);
- if (sPhotoList.Count == 0)
- { MessageBoxCustom.Show("此单未导片"); return; }
- if (!LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.IsEnterPassword(ViceOrderNumber))
- { return; }
- //显示对话框
- if (fbd.ShowDialog() == System.Windows.Forms.DialogResult.OK)
- {
- bool IsImp = false;
- LYFZ.ComponentLibrary.FrmLoadHandling.ExecutionDoWorkMethod(delegate(object obj, System.ComponentModel.BackgroundWorker backgroundWorker)
- {
- LYFZ.PhotoSelectSystem.PhotoImportExport pe = new PhotoSelectSystem.PhotoImportExport(ord_model, vmodel);
- IsImp = pe.ExportEarlyRetouchFilm(fbd.SelectedPath.ToString().Trim(), backgroundWorker);
- }, width: 500);
- if (!IsImp)
- { return; }
- else { MessageBoxCustom.Show("导出完毕"); return; }
- }
- }
- catch { MessageBoxCustom.Show("导片出错"); }
- }
- else { MessageBoxCustom.Show("请选择订单"); return; }
- }
- }
- /// <summary>
- /// 分片
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void btnSlice_Click(object sender, EventArgs e)
- {
- if (this.dgvOrderList.Rows.Count > 0)
- {
- if (this.dgvOrderList.SelectedRows.Count > 0)
- {
- string ViceOrderNumber = this.dgvOrderList.CurrentRow.Cells["Ordv_ViceNumber"].Value.ToString().Trim();//数码编号
- if (!LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.IsEnterPassword(ViceOrderNumber))
- { return; }
- LYFZ.Model.Model_ErpOrder model = orbll.GetModel("Ord_Number", this.dgvOrderList.CurrentRow.Cells["Ord_Number"].Value);
- LYFZ.Model.Model_ErpOrderDigital vmodel = orvbll.GetModel("Ordv_ViceNumber", ViceOrderNumber);//
- LYFZ.PhotoSelectSystem.PhotoCategory frm = new PhotoSelectSystem.PhotoCategory(model, vmodel);
- if (!frm.IsDisposed)
- { frm.ShowDialog(); }
- }
- }
- else { MessageBoxCustom.Show("请选择订单"); }
- }
- ///导出初修
- void btnExportOriginalFilm_Click(object sender, EventArgs e)
- {
- if (this.dgvOrderList.Rows.Count > 0)
- {
- if (this.dgvOrderList.SelectedRows.Count > 0)
- {
- string StrSightsName = "";
- string ViceOrderNumber = this.dgvOrderList.CurrentRow.Cells["Ordv_ViceNumber"].Value.ToString().Trim();
- if (this.dgvOrderList.CurrentRow.Cells["订单类型"].Value.ToString().Trim() == Convert.ToInt32(LYFZ.EnumPublic.OrderType.儿童订单).ToString().Trim())
- {
- if (this.dgvOrderList.Columns["拍摄名称"] != null)
- { StrSightsName = this.dgvOrderList.CurrentRow.Cells["拍摄名称"].Value.ToString().Trim(); }
- }
- LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ExportOriginalPiece(this.dgvOrderList.CurrentRow.Cells["Ord_Number"].Value.ToString().Trim(), ViceOrderNumber, StrSightsName);
- }
- else
- { MessageBoxCustom.Show("请选择订单"); return; }
- }
- }
- ///导入原片
- void btnImportOriginalFilm_Click(object sender, EventArgs e)
- {
- if (this.dgvOrderList.Rows.Count > 0)
- {
- string JID = "";
- string MainOrderNumber = this.dgvOrderList.CurrentRow.Cells["Ord_Number"].Value.ToString().Trim();//主订单号
- string ViceOrderNumber = this.dgvOrderList.CurrentRow.Cells["Ordv_ViceNumber"].Value.ToString().Trim();//副订单号
- DataTable photographyDt = bllPhotography.GetPhotographySightByViceNumber(ViceOrderNumber);
- if (photographyDt.Rows.Count>0)
- {
- JID = photographyDt.Rows[0]["ID"].ToString_s();
- }
- #region 抓数据
- if (this.dgvOrderList.SelectedRows.Count <= 0)
- { MessageBoxCustom.Show("请选择要导入的景点"); return; }
- if (string.IsNullOrEmpty(JID))
- { MessageBoxCustom.Show("此单无景点,不能导片!"); return; }
- #endregion
- //选择拍摄相关人员
- LYFZ.Software.MainBusiness.DoorCityProcess.SuperSmallForm.OfficersConfirmSuperSmallForm frm = new SuperSmallForm.OfficersConfirmSuperSmallForm();
- frm.OrdNumber = MainOrderNumber;
- frm.OrdViceNumber = ViceOrderNumber;
- frm.JID = JID;
- frm.SightsName = this.dgvOrderList.CurrentRow.Cells["拍摄名称"].Value.ToString().Trim();
- if (this.dgvOrderList.CurrentRow.Cells["取件状态"].Value.ToString().Trim() == "OK")
- {
- MessageBoxCustom.Show("已取件,不能导片!");
- frm.rdoYes1.Enabled = false;
- frm.rdoNo1.Checked = true;
- }
- frm.ShowDialog();
-
- this.PublicFunctionRows();
- }
- }
- /// <summary>
- /// 查看工作安排
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void btn_ViewPai_Click(object sender, EventArgs e)
- {
- LYFZ.Software.MainBusiness.DoorCityProcess.SetSmallForm.AnPaiWorkDigitalSmallForm frm = new SetSmallForm.AnPaiWorkDigitalSmallForm();
- frm.Text = "数码部工作安排";
- frm.ShowDialog();
- }
- /// <summary>
- /// 安排工作
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void btn_ArrangeWork_Click(object sender, EventArgs e)
- {
- if (this.dgvOrderList.Rows.Count > 0)
- {
- if (dgvOrderList.SelectedRows.Count > 0)
- {
- try
- {
- if (this.dgvOrderList.CurrentRow.Cells["拍摄状态"].Value.ToString().Trim() != "OK")
- { MessageBoxCustom.Show("拍照流程未完成"); return; }
- }
- catch { }
- string strVid = "";
- for (int i = 0; i < dgvOrderList.SelectedRows.Count; i++)
- {
- if (i == 0) { strVid += "'" + dgvOrderList.SelectedRows[i].Cells["Ordv_ViceNumber"].Value.ToString().Trim() + "'"; }
- else
- { strVid += ",'" + dgvOrderList.SelectedRows[i].Cells["Ordv_ViceNumber"].Value.ToString().Trim() + "'"; }
- }
- LYFZ.Software.MainBusiness.DoorCityProcess.SetSmallForm.AnPaiWorkSmallForm frm = new SetSmallForm.AnPaiWorkSmallForm();
- frm.StrViceNumber = strVid;
- frm.ShowDialog();
- if (frm.IsSave == true)
- { this.PublicFunctionRows(); }
- }
- else { MessageBoxCustom.Show("请选择订单"); }
- }
- }
- void dgvOrderList_MouseDoubleClick(object sender, System.Windows.Forms.MouseEventArgs e)
- {
- System.Drawing.Point hit = this.dgvOrderList.PointToClient(System.Windows.Forms.Cursor.Position);
- System.Windows.Forms.DataGridView.HitTestInfo hitTest = this.dgvOrderList.HitTest(hit.X, hit.Y);
- if (hitTest.RowIndex < 0 && hitTest.ColumnIndex < 0)
- {
- if (!string.IsNullOrEmpty(LYFZ.BLL.BLL_ErpOrder.CurrentSelectedOrderNumber))
- {
- LYFZ.BLL.BLL_ErpOrder.CurrentSelectedOrderNumber = "";
- PublicFunctionRows();
- }
- }
- }
- void frmDigitalArrangement_Load(object sender, EventArgs e)
- {
- this.ImageList1.Images.Clear();
- this.ImageList1.ColorDepth = System.Windows.Forms.ColorDepth.Depth32Bit;
- this.ImageList1.ImageSize = new System.Drawing.Size(95, 100);
- this.ImageList1.Images.Add(LYFZ.PhotoSelectSystem.MainPhotoSelect.ImageJPGE);
- this.PhotoListView.LargeImageList = ImageList1;
- this.PhotoListView.View = System.Windows.Forms.View.LargeIcon;
- this.cbxPhotoType.SelectedIndexChanged += cbxPhotoType_SelectedIndexChanged;
- gbDesign.Enabled = true;
- gbPhoto.Enabled = true;
- gbRefine.Enabled = true;
- gbRepair.Enabled = true;
- //this.dgvOrderList.VirtualMode = true;
- //this.dgvOrderList.CellValueNeeded += dgvOrderList_CellValueNeeded;
- }
- void dgvOrderList_CellValueNeeded(object sender, System.Windows.Forms.DataGridViewCellValueEventArgs e)
- {
- //throw new NotImplementedException();
- }
- void cbxPhotoType_SelectedIndexChanged(object sender, EventArgs e)
- {
- SelectPhotoTypeGetPhotoData();
- }
- void dgvOrderList_CellContentDoubleClick(object sender, System.Windows.Forms.DataGridViewCellEventArgs e)
- {
- if(e.RowIndex<0)
- {
- return;
- }
- string ViceOrderNumber = this.dgvOrderList.Rows[e.RowIndex].Cells["Ordv_ViceNumber"].Value.ToString();
- string MainOrderNumber = this.dgvOrderList.Rows[e.RowIndex].Cells["Ord_Number"].Value.ToString();
- StrSightsName = this.dgvOrderList.Rows[e.RowIndex].Cells["拍摄名称"].Value.ToString();
- selectRow = this.dgvOrderList.Rows[e.RowIndex];
-
- LYFZ.PhotoSelectSystem.EventSelectPhotoPrint eventSelectPhotoPrint = null;
- LYFZ.BLL.BLL_ErpOrderDigital mydbll = new LYFZ.BLL.BLL_ErpOrderDigital();
- LYFZ.BLL.BLL_ErpOrder obll = new BLL.BLL_ErpOrder();
- LYFZ.ComponentLibrary.FrmLoadHandling.LoadDoWorkMethod(delegate(object obj, System.ComponentModel.BackgroundWorker backgroundWorker)
- {
- backgroundWorker.ReportProgress(0, "正在获取相应数据....");
- vmodel = mydbll.GetModel("Ordv_ViceNumber", ViceOrderNumber);
- model = obll.GetModel("Ord_Number", MainOrderNumber);
- eventSelectPhotoPrint = LYFZ.PhotoSelectSystem.frmSaveSelectPhotoInfo.GetStaticSelectPhotoPrint(model, vmodel);
- });
- this.dgvPackage.Rows.Clear();
- List<LYFZ.PhotoSelectSystem.MakingProduct> ptlist = eventSelectPhotoPrint.MakingProductList;
- if (ptlist.Count > 0)
- {
- for (int i = 0; i < ptlist.Count; i++)
- {
- LYFZ.PhotoSelectSystem.MakingProduct mpdt = ptlist[i];
- LYFZ.Model.Model_ErpOrderProductList mdl = mpdt.OrderProduct;
- System.Windows.Forms.DataGridViewRow row = new System.Windows.Forms.DataGridViewRow();
- System.Windows.Forms.DataGridViewTextBoxCell cell = new System.Windows.Forms.DataGridViewTextBoxCell();
- cell.Value = mdl.OPlist_ProdName;
- row.Cells.Add(cell);
- cell = new System.Windows.Forms.DataGridViewTextBoxCell();
- cell.Value = mdl.OPlist_Batch.ToString().Trim();
- row.Cells.Add(cell);
- cell = new System.Windows.Forms.DataGridViewTextBoxCell();
- cell.Value = mdl.OPlist_ProdQuantity.ToString().Trim();
- row.Cells.Add(cell);
- cell = new System.Windows.Forms.DataGridViewTextBoxCell();
- cell.Value = mdl.OPlist_IsExpedited ? "加急件" : "普通件"; ;
- row.Cells.Add(cell);
- cell = new System.Windows.Forms.DataGridViewTextBoxCell();
- cell.Value = mdl.OPlist_PickupTime == null ? "" : mdl.OPlist_PickupTime.Value.ToString("yyyy-MM-dd");
- row.Cells.Add(cell);
- cell = new System.Windows.Forms.DataGridViewTextBoxCell();
- cell.Value = mdl.OPlist_PickUpType;
- row.Cells.Add(cell);
- cell = new System.Windows.Forms.DataGridViewTextBoxCell();
- cell.Value = mdl.OPlist_Remark;
- row.Cells.Add(cell);
- int photoCount = 0;
- string StrPhoto = eventSelectPhotoPrint.GetSelectProductPhotoNameString(mdl.OPlist_UniquelyIdentity.ToString(), ref photoCount);//所用照片
- cell = new System.Windows.Forms.DataGridViewTextBoxCell();
- cell.Value = StrPhoto;
- row.Cells.Add(cell);
- this.dgvPackage.Rows.Add(row);
- }
- }
- SelectPhotoTypeGetPhotoData();
- //SetFunctionButton();
- }
- void SetFunctionButton()
- {
- if(!selectRow.Cells["拍照状态"].Value.ToString().Contains("OK"))
- {
- this.gbPhoto.Enabled = true;
- }
- else
- {
- this.gbPhoto.Enabled = false;
- }
- if (!selectRow.Cells["初修状态"].Value.ToString().Contains("OK"))
- {
- this.gbRepair.Enabled = true;
- }
- else
- {
- this.gbRepair.Enabled = false;
- }
- if (!selectRow.Cells["精修状态"].Value.ToString().Contains("OK"))
- {
-
- this.gbRefine.Enabled = true;
- }
- else
- {
- this.gbRefine.Enabled = false;
- }
- if (!selectRow.Cells["设计状态"].Value.ToString().Contains("OK"))
- {
- this.gbDesign.Enabled = true;
- }
- else
- {
- this.gbDesign.Enabled = false;
- }
- }
- public void SelectPhotoTypeGetPhotoData()
- {
- this.ImageList1.Images.Clear();
- this.PhotoListView.Items.Clear();
- LYFZ.Model.Model_ErpOrder.DirectoryType _dirType = Model.Model_ErpOrder.DirectoryType.PrimitivePicture;
- switch (cbxPhotoType.Text.Replace(" ",""))
- {
- case "原片":
- _dirType = Model.Model_ErpOrder.DirectoryType.PrimitivePicture;
- break;
- case "初修":
- _dirType = Model.Model_ErpOrder.DirectoryType.EarlyRetouch;
- break;
- case "精修":
- _dirType = Model.Model_ErpOrder.DirectoryType.FineRetouch;
- break;
- case "设计":
- _dirType = Model.Model_ErpOrder.DirectoryType.DesignPiece;
- break;
- }
- if(vmodel!=null&&model!=null)
- {
- GetPhotoData(model, vmodel, _dirType, StrSightsName);
- }
- }
- public void GetPhotoData(LYFZ.Model.Model_ErpOrder _model, LYFZ.Model.Model_ErpOrderDigital _vmodel, LYFZ.Model.Model_ErpOrder.DirectoryType _dirType, string _StrSightsName)
- {
- LYFZ.ComponentLibrary.FrmLoadHandling.LoadDoWorkMethod(delegate(object obj, System.ComponentModel.BackgroundWorker backgroundWorker)
- {
- backgroundWorker.ReportProgress(0, "正在获取照片信息....");
- LYFZ.BLL.SelectPhotoHandling sPh = new BLL.SelectPhotoHandling(_model, _vmodel);
- if (model.Ord_Type != "1")
- {
- StrSightsName = "";
- }
- List<string> photoList = sPh.GetSpecifyTypePhotoList(_dirType, BLL.SelectPhotoHandling.PhotoType.Small, _StrSightsName);
- for (int i = 0; i < photoList.Count; i++)
- {
- string PhotoPath = photoList[i].Trim();
- string PreviewPath = LYFZ.BLL.SelectPhotoHandling.SmallPathToPreviewPath(PhotoPath);
- if (!this.ImageList1.Images.ContainsKey(PreviewPath))
- {
- System.Drawing.Image smallImage = LYFZ.ImageFunction.ImageOperation.GetNewBitmap(PhotoPath);
- this.Invoke(new LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.UpdateControl(delegate()
- {
- this.ImageList1.Images.Add(PreviewPath, smallImage);
- this.PhotoListView.Items.Add(System.IO.Path.GetFileName(PreviewPath).Replace("Preview_", ""), i);
- //RefreshShowPhotoImageList();
- }));
- }
- }
- });
-
- }
- void labDesign_Click(object sender, EventArgs e)
- {
- //Dictionary<string, string> tempColumns = new Dictionary<string, string>();
- List<DataRow> drList = new List<DataRow>();
- DataTable orderDataList = htData["DTable"] as DataTable;
- List<string> tempOrdValue = new List<string>();
- if(labSendData.Checked)
- {
- //DataRow[] tempDrList = orderDataList.Select(" Ord_Number in ('" + string.Join("','", sendColumns.Keys.ToArray()) + "') ");
- //foreach(string key in sendColumns)
- //{
- // if(!tempColumns.ContainsKey(key))
- // {
- // tempColumns.Add(key,"");
- // }
- //}
- if (sendColumns.Count == 0)
- {
- tempOrdValue.Add("-1");
- }
- else
- {
- tempOrdValue.AddRange(sendColumns);
- }
- //drList.AddRange(tempDrList);
- }
- if (labDesign.Checked)
- {
- //DataRow[] tempDrList = orderDataList.Select(" Ord_Number in ('" + string.Join("','", designColumns.Keys.ToArray()) + "') ");
- //drList.AddRange(tempDrList);
- //foreach (string key in designColumns)
- //{
- // if (!tempColumns.ContainsKey(key))
- // {
- // tempColumns.Add(key, "");
- // }
- //}
- if (designColumns.Count == 0)
- {
- tempOrdValue.Add("-1");
- }
- else
- {
- tempOrdValue.AddRange(designColumns);
- }
- }
- if (this.labRefineRepair.Checked)
- {
- //DataRow[] tempDrList = orderDataList.Select(" Ord_Number in ('" + string.Join("','", refinementColumns.Keys.ToArray()) + "') ");
- //drList.AddRange(tempDrList);
- //foreach (string key in refinementColumns)
- //{
- // if (!tempColumns.ContainsKey(key))
- // {
- // tempColumns.Add(key, "");
- // }
- //}
- //if (tempColumns.Count == 0)
- //{
- // tempColumns.Add("-1", "");
- //}
- if (refinementColumns.Count == 0)
- {
- tempOrdValue.Add("-1");
- }
- else
- {
- tempOrdValue.AddRange(refinementColumns);
- }
- }
- if (labEarlyRepair.Checked)
- {
- //DataRow[] tempDrList = orderDataList.Select(" Ord_Number in ('" + string.Join("','", earlyRepairColumns.Keys.ToArray()) + "') ");
- //drList.AddRange(tempDrList);
- //foreach (string key in earlyRepairColumns)
- //{
- // if (!tempColumns.ContainsKey(key))
- // {
- // tempColumns.Add(key, "");
- // }
- //}
- //if (tempColumns.Count == 0)
- //{
- // tempColumns.Add("-1", "");
- //}
- if (earlyRepairColumns.Count == 0)
- {
- tempOrdValue.Add("-1");
- }
- else
- {
- tempOrdValue.AddRange(earlyRepairColumns);
- }
- }
- tempOrdValue = tempOrdValue.GroupBy(t => t).Select(t => t.First()).ToList();
- if (orderDataList.Rows.Count > 0 && (tempOrdValue.Count > 0 || !string.IsNullOrEmpty(txt_QueryText.Text)))
- {
- DataTable dtList = new DataTable();
- LYFZ.ComponentLibrary.FrmLoadHandling.LoadDoWorkMethod(delegate(object obj, System.ComponentModel.BackgroundWorker backgroundWorker)
- {
- //DataRow[] tempDrList = orderDataList.Select(" Ord_Number in ('" + string.Join("','", tempColumns.Keys.ToArray()) + "') ");
- if (tempOrdValue.Count > 0 && string.IsNullOrEmpty(txt_QueryText.Text))
- {
- dtList = orderDataList.AsEnumerable().Where(p => tempOrdValue.Contains(p.Field<string>("Ord_Number"))).CopyToDataTable<DataRow>();
- }
- else
- {
- dtList = orderDataList.AsEnumerable().Where(p => (p.Field<string>("Ord_Number") == txt_QueryText.Text || p.Field<string>("客户电话").IndexOf(txt_QueryText.Text) != -1 || p.Field<string>("客户姓名").IndexOf(txt_QueryText.Text) != -1)).CopyToDataTable<DataRow>();
- }
- });
- if (dtList.Rows.Count > 0)
- {
- //foreach (DataColumn colum in tempDrList[0].Table.Columns)
- //{
- // dtList.Columns.Add(colum.ColumnName);
- //}
- //foreach (DataRow dr in tempDrList)
- //{
- // DataRow tempDr = dtList.NewRow();
- // foreach (DataColumn colum in dtList.Columns)
- // {
- // tempDr[colum.ColumnName] = dr[colum.ColumnName];
- // }
- // dtList.Rows.Add(tempDr);
- //}
- LYFZ.ComponentLibrary.DataGridOrderView.GetData_ReplaceDigitalArrange(dgvOrderList, dictColumns, dtList, dtList.Rows.Count);
- }
- else
- {
- dgvOrderList.Rows.Clear();
- }
- }
- else
- {
- LYFZ.ComponentLibrary.DataGridOrderView.GetData_ReplaceDigitalArrange(dgvOrderList, dictColumns, orderDataList, orderDataList.Rows.Count);
- }
- }
- void cbxDropDownList_ComboBoxTreeViewEx_TextChanged(object sender, System.Windows.Forms.TreeViewEventArgs e)
- {
- this.PublicFunctionRights();
- this.PublicFunctionRows();
- }
- void frmDigitalArrangement_Shown(object sender, EventArgs e)
- {
- LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.BindGroupStoreName(this.cbxDropDownList, StrGroupKeyCode: "retailProcess", StrKeyCode: "st014");
- PublicFunctionRights();
- this.PublicFunctionRows();
- }
- /// <summary>
- /// 选择分店获取权限
- /// </summary>
- void PublicFunctionRights()
- {
- ///我的工作权限
- this.btn_ArrangeWork.Enabled = LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetGroupStoreRights(this.cbxDropDownList, "StoresDigital", LYFZ.CustomAttributes.OperatingAuthority.AnPaiWork);
- this.btn_ViewPai.Enabled = LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetGroupStoreRights(this.cbxDropDownList, "StoresDigital", LYFZ.CustomAttributes.OperatingAuthority.SeeAnPaiWork);
- ///设计权限
- this.btnImportDesign.Enabled = LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetGroupStoreRights(this.cbxDropDownList, "StoresDesign", LYFZ.CustomAttributes.OperatingAuthority.PhotoImport);
- this.btnExportDesign.Enabled = LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetGroupStoreRights(this.cbxDropDownList, "StoresDesign", LYFZ.CustomAttributes.OperatingAuthority.PhotoExport);
- ///拍照
- this.btnImportOriginalFilm.Enabled = LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetGroupStoreRights(this.cbxDropDownList, "StoresPhotograph", LYFZ.CustomAttributes.OperatingAuthority.PhotoImport);
- ///初修
- this.btnExportOriginalFilm.Enabled = LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetGroupStoreRights(this.cbxDropDownList, "StoresPhotograph", LYFZ.CustomAttributes.OperatingAuthority.PhotoExport);
- this.btnImportRepairFilm.Enabled = LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetGroupStoreRights(this.cbxDropDownList, "StoresRepairPiece", LYFZ.CustomAttributes.OperatingAuthority.PhotoImport);
- this.btnExportRepair.Enabled = LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetGroupStoreRights(this.cbxDropDownList, "StoresRepairPiece", LYFZ.CustomAttributes.OperatingAuthority.PhotoExport);
- //this.btnViewRepairedPiece.Enabled = LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetGroupStoreRights(this.cbxDropDownList, "StoresRepairPiece", LYFZ.CustomAttributes.OperatingAuthority.PhotoView);
- this.btnSlice.Enabled = LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetGroupStoreRights(this.cbxDropDownList, "StoresRepairPiece", LYFZ.CustomAttributes.OperatingAuthority.RepairPieceSeparatePhoto);
- ///精修
- this.btnExportSelectFilm.Enabled = LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetGroupStoreRights(this.cbxDropDownList, "StoresFilmSelection", LYFZ.CustomAttributes.OperatingAuthority.PhotoExport);
- this.btnImportRefine.Enabled = LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetGroupStoreRights(this.cbxDropDownList, "StoresRefinedRepair", LYFZ.CustomAttributes.OperatingAuthority.PhotoImport);
- this.btnExportRefine.Enabled = LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetGroupStoreRights(this.cbxDropDownList, "StoresRefinedRepair", LYFZ.CustomAttributes.OperatingAuthority.PhotoExport);
- //this.btnViewRefinedPiece.Enabled = LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetGroupStoreRights(this.cbxDropDownList, "StoresRefinedRepair", LYFZ.CustomAttributes.OperatingAuthority.PhotoView);
- }
- /// <summary>
- /// 当前点击的字段
- /// </summary>
- string StrCurrentClickField = "";
- /// <summary>
- /// 排序字段
- /// </summary>
- string StrSortField = "Ord_CreateDateTime DESC,Ordv_DigitalNumber";
- /// <summary>
- /// 排序顺序
- /// </summary>
- string StrSortOrder = "DESC";
- /// <summary>
- /// 创建行
- /// </summary>
- void PublicFunctionRows()
- {
- this.dgvOrderList.Rows.Clear();
- this.dgvPackage.Rows.Clear();
- this.ImageList1.Images.Clear();
- this.PhotoListView.Items.Clear();
- this.dgvOrderList.dgvCurrentColumnOriginalSet = "Ord_Number,Ordv_ViceNumber,Ordv_EarlyRepairStatus,Ordv_RefinementStatus,Ordv_DesignerStatus,订单号,客户姓名,客户性别,客户电话,婚期,订单类型,接单人,套系名称,套系价格,加急,加急日期,拍摄名称,拍照状态,初修状态,初修日期,选片状态,选片日期,精修状态,精修日期,设计状态,设计日期,看版状态,看版日期,取件状态,会员卡号,发片状态";
- string StrGuidName = "";
- if ((LYFZ.BLL.BLL_SystemGlobalSetting.SysTemGlobalSetMoel.MemberCardShowHide))
- {
- this.dgvOrderList.dgvFixedHideColumn = "Ord_Number,Ordv_ViceNumber,会员卡号,发片状态,Ordv_EarlyRepairStatus,Ordv_RefinementStatus,Ordv_DesignerStatus";
- }
- else
- {
- this.dgvOrderList.dgvFixedHideColumn = "Ord_Number,Ordv_ViceNumber,发片状态,Ordv_EarlyRepairStatus,Ordv_RefinementStatus,Ordv_DesignerStatus";
- }
- this.dgvOrderList.dgvGuidName = StrGuidName;
- this.dgvOrderList.dgvUserEmployeeID = this.StrUserID;
- this.dgvOrderList.StrValueNullColumn = "订单号,客户姓名,客户性别,客户电话,婚期,订单类型,接单人,套系名称,套系价格,加急,加急日期,会员卡号";
- this.dgvOrderList.DataColumns(this.dgvOrderList.dgvCurrentColumnOriginalSet, strHideField: this.dgvOrderList.dgvFixedHideColumn);
- dictColumns = LYFZ.DAL.DAL_GridViewDisplayIndex.GetGridViewShowColumns(this.StrUserID, StrGuidName, this.dgvOrderList.dgvCurrentColumnOriginalSet);
- this.dgvOrderList.dictShowColumName = dictColumns;
- string StrQueryCondition = "";
- LYFZ.ComponentLibrary.CheckBoxEx checkBox = new ComponentLibrary.CheckBoxEx() { Checked = false };
- if (IsFirstRun && !string.IsNullOrEmpty(LYFZ.BLL.BLL_ErpOrder.CurrentSelectedOrderNumber))
- {
- string StrWhere = " Where (Ords_PhotographIntStatus in (1,2)) And Ord_Class = '1' And Ord_SinceOrderNumber = '" + LYFZ.BLL.BLL_ErpOrder.CurrentSelectedOrderNumber + "'" + LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetVersionQuerySQL(checkBox, checkBox, checkBox, StrOrdType: "0,1,2");
-
- StrQueryCondition = StrWhere + (this.cbxDropDownList.Tag.ToString()==""?"": LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetGroupQueryOrderClickWhere(this.cbxDropDownList, "Ord_DividedShop"));
- }
- else
- { StrQueryCondition = this.GetWhereStr(); }
- int intTopCount =10000;
- htData = LYFZ.ComponentLibrary.DataGridOrderView.GetData_OrderDigitalArrange(this.dgvOrderList, dictColumns, StrQueryCondition, intTopCount, StrSortField,1);
- BindPublicFunction();
- }
-
- void BindPublicFunction()
- {
- int earlyRepairCount = 0;
- int refinementCount = 0;
- int designCount = 0;
- int sendCount = 0;
- earlyRepairColumns.Clear();
- refinementColumns.Clear();
- designColumns.Clear();
- sendColumns.Clear();
- this.tempPanelEx1.Visible = true;
- System.Threading.Thread thread = new System.Threading.Thread(new System.Threading.ParameterizedThreadStart(delegate(object obj)
- {
- DataTable orderDataList = htData["DTable"] as DataTable;
- earlyRepairColumns = orderDataList.AsEnumerable().Where(p => p.Field<string>("Ordv_EarlyRepairStatus") == "0" || p.Field<string>("Ordv_EarlyRepairStatus") == "1").Select(p => p.Field<string>("Ord_Number")).ToList<string>();
- refinementColumns = orderDataList.AsEnumerable().Where(p => p.Field<string>("Ordv_RefinementStatus") == "0" || p.Field<string>("Ordv_RefinementStatus") == "1").Select(p => p.Field<string>("Ord_Number")).ToList<string>();
- designColumns = orderDataList.AsEnumerable().Where(p => p.Field<string>("Ordv_DesignerStatus") == "0" || p.Field<string>("Ordv_DesignerStatus") == "1").Select(p => p.Field<string>("Ord_Number")).ToList<string>();
- sendColumns = orderDataList.AsEnumerable().Where(p => p.Field<int>("发片状态") == 1).Select(p => p.Field<string>("Ord_Number")).ToList<string>();
- //foreach (DataRow dr in orderDataList.Rows)
- //{
- // string ordNumber = dr["Ord_Number"].ToString_s();
- // if (!earlyRepairColumns.ContainsKey(ordNumber))
- // {
- // DataRow[] dtList = orderDataList.Select(" Ord_Number = '" + ordNumber + "' and Ordv_EarlyRepairStatus in ('0','1') ");
- // if (dtList.Length > 0)
- // {
- // if (!earlyRepairColumns.ContainsKey(ordNumber))
- // {
- // earlyRepairColumns.Add(ordNumber, "1");
- // }
- // }
- // }
- // if (!refinementColumns.ContainsKey(ordNumber))
- // {
- // DataRow[] dtList = orderDataList.Select(" Ord_Number = '" + ordNumber + "' and Ordv_RefinementStatus in ('0','1') ");
- // if (dtList.Length > 0)
- // {
- // if (!refinementColumns.ContainsKey(ordNumber))
- // {
- // refinementColumns.Add(ordNumber, "1");
- // }
- // }
- // }
- // if (!designColumns.ContainsKey(ordNumber))
- // {
- // DataRow[] dtList = orderDataList.Select(" Ord_Number = '" + ordNumber + "' and Ordv_DesignerStatus in ('0','1') ");
- // if (dtList.Length > 0)
- // {
- // if (!designColumns.ContainsKey(ordNumber))
- // {
- // designColumns.Add(ordNumber, "1");
- // }
- // }
- // }
- // if (!sendColumns.ContainsKey(ordNumber))
- // {
- // DataRow[] dtList = orderDataList.Select(" Ord_Number = '" + ordNumber + "' and 发片状态 in ('1') ");
- // if (dtList.Length > 0)
- // {
- // if (!sendColumns.ContainsKey(ordNumber))
- // {
- // sendColumns.Add(ordNumber, "1");
- // }
- // }
- // }
- //}
- labEarlyRepair.Text = "初修(" + earlyRepairColumns.Count + ")";
- labDesign.Text = "设计(" + designColumns.Count + ")";
- labRefineRepair.Text = "精修(" + refinementColumns.Count + ")";
- labSendData.Text = "发片(" + sendColumns.Count + ")";
- }));
- thread.Start();
-
-
- }
- /// <summary>
- /// 返回要操作的条件
- /// </summary>
- /// <returns></returns>
- string GetWhereStr()
- {
- LYFZ.ComponentLibrary.CheckBoxEx checkBox = new ComponentLibrary.CheckBoxEx() { Checked = false };
- string StrWhere = " Where (Ords_PhotographIntStatus in (1,2) or Ordv_EarlyRepairStatus in ('1','2')) And Ord_Class = '1' " + LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetGroupQueryWhere(this.cbxDropDownList, "Ord_DividedShop");
- if (DictData.ContainsKey("PhotographyStatus") && DictData["PhotographyStatus"].Trim().Length > 0)
- { StrWhere += " and Ords_PhotographStatus = '" + DictData["PhotographyStatus"].Trim() + "'"; }
- if (DictData.ContainsKey("EarlyRepairStatus") && DictData["EarlyRepairStatus"].Trim().Length > 0)
- { StrWhere += " and Ordv_EarlyRepairStatus = '" + DictData["EarlyRepairStatus"].Trim() + "'"; }
- if (DictData.ContainsKey("FilmSelectionStatus") && DictData["FilmSelectionStatus"].Trim().Length > 0)
- { StrWhere += " and Ordv_FilmSelectionStatus = '" + DictData["FilmSelectionStatus"].Trim() + "'"; }
- if (DictData.ContainsKey("RefinementStatus") && DictData["RefinementStatus"].Trim().Length > 0)
- { StrWhere += " and Ordv_RefinementStatus = '" + DictData["RefinementStatus"].Trim() + "'"; }
- if (DictData.ContainsKey("DesignStatus") && DictData["DesignStatus"].Trim().Length > 0)
- { StrWhere += " and Ordv_DesignerStatus = '" + DictData["DesignStatus"].Trim() + "'"; }
- if (DictData.ContainsKey("LookDesignStatus") && DictData["LookDesignStatus"].Trim().Length > 0)
- { StrWhere += " and Ordv_LookDesignStatus = '" + DictData["LookDesignStatus"].Trim() + "'"; }
-
- StrWhere += " And Ords_ProductPickupIntStatus in (0,1)";
- StrWhere += LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetVersionQuerySQL(
- checkBox,
- checkBox,
- checkBox, StrOrdType: "0,1,2");
- if (DictData.ContainsKey("FilmSelectionStartDateTime") && DictData["FilmSelectionStartDateTime"].Length > 0 && DictData.ContainsKey("FilmSelectionEndDateTime") && DictData["FilmSelectionEndDateTime"].Length > 0)
- { StrWhere += LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetDateTime("isnull(Ordv_FilmSelectionTime,Ordv_ReservationFilmSelectionTime)", DictData["FilmSelectionStartDateTime"], DictData["FilmSelectionEndDateTime"]); }
- if (DictData.ContainsKey("LookDesignStartDateTime") && DictData["LookDesignStartDateTime"].Length > 0 && DictData.ContainsKey("LookDesignEndDateTime") && DictData["LookDesignEndDateTime"].Length > 0)
- { StrWhere += LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetDateTime("isnull(Ordv_LookDesignTime,Ordv_ReservationLookDesignTime)", DictData["LookDesignStartDateTime"].Trim(), DictData["LookDesignEndDateTime"].Trim()); }
- if (cbxMyJob.Checked)
- {
- string tempStrWhere = "";
- if (!labEarlyRepair.Checked && !labRefineRepair.Checked && !labDesign.Checked && !labSendData.Checked)
- {
- tempStrWhere += " Ordv_ReservationEarlyRepairName = '" + StrUserID + "' ";
- tempStrWhere += " or ";
- tempStrWhere += " Ordv_ReservationRefinementName = '" + StrUserID + "' ";
- tempStrWhere += " or ";
- tempStrWhere += " Ordv_ReservationDesignerName = '" + StrUserID + "' ";
- tempStrWhere += " or ";
- tempStrWhere += " Ordv_ReservationSendPhotoName = '" + StrUserID + "' ";
- }
-
- if (labEarlyRepair.Checked)
- {
- if (!string.IsNullOrEmpty(tempStrWhere))
- {
- tempStrWhere += " or ";
- }
- tempStrWhere += " Ordv_ReservationEarlyRepairName = '" + StrUserID + "' ";
- }
- if (labRefineRepair.Checked)
- {
- if (!string.IsNullOrEmpty(tempStrWhere))
- {
- tempStrWhere += " or ";
- }
- tempStrWhere += " Ordv_ReservationRefinementName = '" + StrUserID + "' ";
- }
- if (labDesign.Checked)
- {
- if (!string.IsNullOrEmpty(tempStrWhere))
- {
- tempStrWhere += " or ";
- }
- tempStrWhere += " Ordv_ReservationDesignerName = '" + StrUserID + "' ";
- }
- if(labSendData.Checked)
- {
- if (!string.IsNullOrEmpty(tempStrWhere))
- {
- tempStrWhere += " or ";
- }
- tempStrWhere += " Ordv_ReservationSendPhotoName = '" + StrUserID + "' ";
- }
- if (!string.IsNullOrEmpty(tempStrWhere))
- {
- if (!string.IsNullOrEmpty(StrWhere))
- {
- StrWhere += " and ";
- }
- StrWhere += "( " + tempStrWhere + " )";
- }
-
- }
- return StrWhere;
- }
-
-
- }
- }
|