12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658 |
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Windows.Forms;
- using System.Collections;
- using System.IO;
- using LYFZ.ComponentLibrary;
- using LYFZ.Helper;
- using System.Diagnostics;
- using LYFZ.Model;
- namespace LYFZ.Software.MainBusiness.DoorCityProcess
- {
- public partial class DesignFormMain : LYFZ.Software.UI.DoorCityProcess.DesignFormMain
- {
- LYFZ.BLL.BLL_ErpOrder obll = new BLL.BLL_ErpOrder();
- LYFZ.BLL.BLL_ErpSystemLogs systbll = new BLL.BLL_ErpSystemLogs();
- LYFZ.BLL.BLL_ErpOrderDigital dbll = new LYFZ.BLL.BLL_ErpOrderDigital();
- LYFZ.BLL.BLL_ErpOrderOutSendDesignList outbll = new BLL.BLL_ErpOrderOutSendDesignList();
- #region OSS云传片
- bool useOss = false;
- List<AliyunOssLibrary.Model.SimplifyBranch> listbranch = null;
- #endregion
- #region N8选版开启、程序路径属性
- public bool IsUserN8ViewGo
- {
- get; set;
- }
- public string N8ViewGoPath
- {
- get; set;
- }
- #endregion
- #region 2017-03-18 杨云奕 添加 获取门店配置的ftp情况
- BLL.BaseBLL.BaseBLL_FTPServiceUserAccount ftpbll = new BLL.BaseBLL.BaseBLL_FTPServiceUserAccount();
- DataSet ftpData;
- #endregion
- #region 2017-03-18 杨云奕 添加 如果有定义ftp则将上传功能显示
- /// <summary>
- /// 右键添加上传功能
- /// </summary>
- /// <param name="orNumber"></param>
- void BindContextMenu( DataGridViewRow dataGridViewRow )
- {
- #region 获取OSS信息;
- //if (LYFZ.Network.OssOperation.OssProcess.GetOssBranchList(LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.TcpClient.Client, out this.listbranch, ref this.useOss))
- if ( LYFZ.Network.OssOperation.OssProcess.GetOssStatus( LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.TcpClient.Client, ref this.useOss ) )
- {
- if ( this.useOss )
- {
- Network.OssOperation.OssProcess.GetOssBranchList( out this.listbranch, ref this.useOss );
- }
- }
- #endregion
- if ( this.useOss )
- {
- ToolStripMenuItem item = new ToolStripMenuItem();
- item.Text = "上传订单:" + dataGridViewRow.Cells["Ord_Number"].Value.ToString();
- item.Name = "UpFtp";
- item.Tag = dataGridViewRow;
- item.Click += item_Click;
- this.dgvData.conMenu.Items.Add( item );
- }
- else
- {
- if ( ftpData.Tables[0].Rows.Count > 0 )
- {
- ToolStripMenuItem item = new ToolStripMenuItem();
- item.Text = "上传订单:" + dataGridViewRow.Cells["Ord_Number"].Value.ToString();
- item.Name = "UpFtp";
- item.Tag = dataGridViewRow;
- item.Click += item_Click;
- //ToolStripMenuItem[] subItem = new ToolStripMenuItem[ftpData.Tables[0].Rows.Count];
- //for (int i = 0; i < ftpData.Tables[0].Rows.Count; i++)
- //{
- // DataRow dr = ftpData.Tables[0].Rows[i];
- // subItem[i] = new ToolStripMenuItem();
- // subItem[i].Text = "至" + dr["Company_Name"].ToString() + "(" + dr["FTP_Name"].ToString() + ")账户";
- // dataGridViewRow.Tag = dr;
- // subItem[i].Tag = dataGridViewRow;
- // subItem[i].Click += ToolStripMenuItem_Click;
- //}
- //item
- this.dgvData.conMenu.Items.AddRange( new ToolStripItem[] { item } );
- //List<ToolStripItem> dropDownList = new List<ToolStripItem>();
- //for (int i = 0; i < subItem.Length; i++)
- //{
- // dropDownList.Add(subItem[i]);
- //}
- //item.DropDownItems.AddRange(dropDownList.ToArray());
- }
- }
- if ( BLL.N8Process.BLL_N8Process.IsN8ModelValid() )
- {
- ToolStripMenuItem menuItem = new ToolStripMenuItem();
- menuItem.Text = "上传N8选版:" + dataGridViewRow.Cells["Ord_Number"].Value.ToString();
- menuItem.Name = "NemoInfo";
- menuItem.Tag = dataGridViewRow;
- menuItem.Click += item_Click; ;
- this.dgvData.conMenu.Items.Add( menuItem );
- }
- }
- void item_Click( object sender, EventArgs e )
- {
- ToolStripMenuItem menuItem = (ToolStripMenuItem)sender;
- FTPUpFileForm ftpForm = new FTPUpFileForm( menuItem.Name == "NemoInfo" ? 0 : -1 );
- if ( this.useOss )
- {
- ftpForm.Text = "云传片";
- ftpForm.UseOss = true;
- ftpForm.ListBranch = this.listbranch;
- }
- DataGridViewRow dgvr = (DataGridViewRow)((ToolStripMenuItem)sender).Tag;
- LYFZ.BLL.BLL_ErpOrdersPhotography pbll = new BLL.BLL_ErpOrdersPhotography();
- //拍摄景点
- DataTable tbl = pbll.GetList( "Ordpg_Number='" + dgvr.Cells["Ord_Number"].Value.ToString() + "'" ).Tables[0];
- string _Type = dgvr.Cells["Ord_Type"].Value.ToString();
- string LoadType = "设计";
- string signName = "";
- string SightsName = "";
- if ( _Type == "1" )
- {
- if ( tbl.Rows.Count > 0 )
- {
- for ( int i = 0; i < tbl.Rows.Count; i++ )
- {
- SightsName += tbl.Rows[i]["Ordpg_Sights"].ToString() + ",";
- }
- }
- signName = SightsName.TrimEnd( ',' );
- }
- else if ( _Type != "1" )
- {
- if ( tbl.Rows.Count > 0 )
- {
- for ( int i = 0; i < tbl.Rows.Count; i++ )
- {
- SightsName += tbl.Rows[i]["Ordpg_Sights"].ToString() + (LoadType == "原片" ? "," : ",");
- }
- }
- signName = SightsName.TrimEnd( ',' );
- }
- else
- {
- signName = dgvr.Cells["拍摄名称"].Value.ToString();
- }
- string[] str = signName.Split( ',' );
- foreach ( var item in str )
- {
- CheckBoxEx cb = new CheckBoxEx();
- cb.Text = item;
- ftpForm.AddCheckBoxModel( cb );
- cb.Checked = true;
- }
- ftpForm.BindData( dgvr.Cells["Ord_Number"].Value.ToString(), dgvr.Cells["Ordv_ViceNumber"].Value.ToString(),
- _Type, "设计", "" );
- ftpForm.AddCheckBoxByFtpInfo( null );
- if ( ftpForm.ShowDialog() == System.Windows.Forms.DialogResult.OK )
- {
- }
- //throw new NotImplementedException();
- }
- /// <summary>
- /// 上传项点击事件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void ToolStripMenuItem_Click( object sender, EventArgs e )
- {
- FTPUpFileForm ftpForm = new FTPUpFileForm();
- DataGridViewRow dataRow = (DataGridViewRow)((ToolStripMenuItem)sender).Tag;
- bool findR = false;
- for ( int i = 0; i < this.dgvData.Rows.Count; i++ )
- {
- DataGridViewRow dgvr = this.dgvData.Rows[i];
- if ( this.dgvData.Rows[i].Cells["Ord_Number"].Value.ToString() == dataRow.Cells["Ord_Number"].Value.ToString() )
- {
- findR = true;
- }
- else
- {
- if ( findR )
- {
- break;
- }
- }
- if ( findR )
- {
- ftpForm.AddCheckBoxModel( new CheckBoxEx()
- {
- Text = this.dgvData.Rows[i].Cells["拍摄名称"].Value.ToString(),
- Tag = dataRow,
- Checked = (dataRow.Cells["拍摄名称"].Value.ToString() == this.dgvData.Rows[i].Cells["拍摄名称"].Value.ToString())
- } );
- }
- }
- DataRow dr = ((DataRow)dataRow.Tag);
- ftpForm.BindData( dataRow, "设计", dr["Company_Name"].ToString() + "(" + dr["FTP_Name"].ToString() + ")账户" );
- if ( ftpForm.ShowDialog() == System.Windows.Forms.DialogResult.OK )
- {
- }
- }
- #endregion
- public DesignFormMain()
- {
- this.Shown += DesignFormMain_Shown;
- this.Load += DesignFormMain_Load;
- //this.cbxDesignNoBack.Click += cbxDesignNoBack_Click;
- this.cmbtreevStoreName.ComboBoxTree_NodeMouseClick += cmbtreevStoreName_ComboBoxTree_NodeMouseClick;
- this.cmbQueryText.KeyDown += cmbQueryText_KeyDown;
- this.btnQuery.Click += btnQuery_Click;
- this.btnHasSelectionNoDesign.Click += btnHasSelectionNoDesign_Click;
- this.btnConditionQuery.Click += btnConditionQuery_Click;
- this.btnExportRefinementGoodPiece.Click += btnExportRefinementGoodPiece_Click;
- this.btnImportDesignVersion.Click += btnImportDesignVersion_Click;
- this.btnExporting.Click += btnExporting_Click;
- this.btnLookDesignVersion.Click += btnLookDesignVersion_Click;
- this.btnLookOver.Click += btnLookOver_Click;
- this.btnClose.Click += btnClose_Click;
- this.chkDressVersion.Click += chkDressVersion_Click;
- this.chkKidsVersion.Click += chkKidsVersion_Click;
- this.chkPortraitVersion.Click += chkPortraitVersion_Click;
- this.Resize += DesignFormMain_Resize;
- this.dgvData.CellMouseDoubleClick += dgvData_CellMouseDoubleClick;
- this.dgvData.CellMouseDown += dgvData_CellMouseDown;
- this.dgvData.CellClick += dgvData_CellClick;
- this.dgvData.MouseDoubleClick += dgvData_MouseDoubleClick;
- this.dgvData.ColumnHeaderMouseClick += dgvData_ColumnHeaderMouseClick;
- this.btnOutSendDesign.Click += btnOutSendDesign_Click;
- this.btnOutSendStatistic.Click += btnOutSendStatistic_Click;
- this.btnYunLookDesign.Click += btnYunLookDesign_Click;
- this.btnYunLookDesignResult.Click += btnYunLookDesignResult_Click;
- this.flowLayoutPanel1.Height = 34;
- ///获取门店ftp账户
- ftpData = ftpbll.GetList2( "" );
- #region 获取是否N8选版
- if ( BLL.BLL_N8ClientConfig.N8ViewGoEnable )
- {
- // 显示N8导片按钮;
- this.btn_ImportN8.Visible = this.btn_ExportN8.Visible = true;
- // 获取本机是否启动N8选版信息;
- IsUserN8ViewGo = true;
- N8ViewGoPath = BLL.BLL_N8ClientConfig.N8ViewGoPath;
- // 获取N8服务器地址;
- if ( LYFZ.Network.PlatinumClientProcess.N8SvrConfig == null )
- LYFZ.Network.PlatinumClientProcess.GetN8ServerConfig();
- }
- // 导入N8选版;
- this.btn_ImportN8.Click += Btn_ImportN8_Click;
- // 导出N8选版;
- this.btn_ExportN8.Click += Btn_ExportN8_Click;
- #endregion
- ucPagerEx1.EventPaging += ucPagerEx1_EventPaging;
- chkCompleteOrder.Click += ChkCompleteOrder_Click;
- this.btn_CusOssUpload.Click += Btn_CusOssUpload_Click;
- this.btn_CusOssUpload.Visible = false;
- }
- /// <summary>
- /// 客照云传;
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void Btn_CusOssUpload_Click( object sender, EventArgs e )
- {
- LYFZ.ComponentLibrary.FrmLoadHandling.LoadDoWorkMethod( delegate ( object obj, BackgroundWorker backgroundWorker )
- {
- backgroundWorker.ReportProgress( 0, "正在上传中,请稍等..." );
- // 选中行;
- if ( this.dgvData.SelectedRows.Count == 0 )
- {
- MessageBoxCustom.Show( "请选择要上传的客照" );
- return;
- }
- // 是否有企业ID;
- if ( !OssTask.frmOssTask.IsExistsEnterpriseID() )
- {
- MessageBoxCustom.Show( "未注册企业ID,请联系服务商注册" );
- return;
- }
- // 选择os type;
- /*OssTask.frmChooseOsType dlg = new OssTask.frmChooseOsType();
- if ( DialogResult.OK != dlg.ShowDialog() )
- {
- return;
- }*/
- // 选择第一行;
- DataGridViewRow row = this.dgvData.SelectedRows[0];
- // 订单号;
- string strOrderNumber = row.Cells["Ord_Number"].Value.ToString();
- // 订单类型;
- string strOrderType = row.Cells["订单类型"].Value.ToString();
- // 副订单号;
- string strViceOrderNumber = row.Cells["Ordv_ViceNumber"].Value.ToString();
- // 客户姓名;
- string strCusNames = row.Cells["客户姓名"].Value.ToString();
- // 客户性别;
- string strCusGenders = row.Cells["客户性别"].Value.ToString();
- // 客户电话;
- string strCusPhones = row.Cells["客户电话"].Value.ToString();
- // 相片类型;
- string strPhotosType = "设计";
- // 拍摄名称;
- string strScenery = "";
- if ( this.dgvData.CurrentRow.Cells["Ord_Type"].Value.ToString().Trim() == Convert.ToInt32( LYFZ.EnumPublic.OrderType.儿童订单 ).ToString().Trim() )
- {
- try
- {
- strScenery = this.dgvData.CurrentRow.Cells["拍摄名称"].Value.ToString().Trim();
- }
- catch { }
- }
- // 上传的相片;
- List<string> listPhotos = null;
- if ( !LYFZ.BLL.BLL_SystemGlobalSetting.SysTemGlobalSetMoel.UseBaiduShareUrl )
- {
- BLL.SelectPhotoHandling photoHandling = new BLL.SelectPhotoHandling( obll.GetModel( "Ord_Number", strOrderNumber ), dbll.GetModel( "Ordv_ViceNumber", strViceOrderNumber ) );
- listPhotos = photoHandling.GetSpecifyTypePhotoList( Model.Model_ErpOrder.DirectoryType.DesignPiece, BLL.SelectPhotoHandling.PhotoType.Original, strScenery );
- // 生成任务;
- if ( listPhotos == null || listPhotos.Count == 0 )
- {
- MessageBoxCustom.Show( "该订单没有相片,不生成任务" );
- return;
- }
- }
- /*if (LYFZ.Software.MainBusiness.OssTask.frmOssTask.GenerateOssTaskEx(
- dlg.cb_baidu.Checked ? 2 : -1,
- dlg.dtp_expire.Value.ToString("yyyy-MM-dd 00:00:00"),
- Convert.ToInt32(dlg.dup_times.SelectedItem),
- strOrderNumber, strOrderType, strCusNames, strCusGenders, strCusPhones, strPhotosType, strScenery, listPhotos))
- {
- MessageBoxCustom.Show("任务生成成功!");
- }*/
- OssTask.JsonOssTask jsonOssTask = LYFZ.Software.MainBusiness.OssTask.frmOssTask.GenerateOssTask(
- //dlg.cb_baidu.Checked ? 2 : -1,
- LYFZ.BLL.BLL_SystemGlobalSetting.SysTemGlobalSetMoel.UseBaiduShareUrl ? 2 : -1,
- //dlg.dtp_expire.Value.ToString( "yyyy-MM-dd 00:00:00" ),
- DateTime.Now.AddMonths( 1 ).ToString( "yyyy-MM-dd 00:00:00" ),
- //Convert.ToInt32( dlg.dup_times.SelectedItem ),
- 1,
- strOrderNumber, "子订单号", strOrderType, strCusNames, strCusGenders, strCusPhones, strPhotosType, strScenery, listPhotos );
- if ( jsonOssTask != null )
- {
- // 如果任务列表空,加载任务;
- //if ( OssTask.frmOssTask.IsTaskListNullOrEmpty() )
- /*if ( false )
- {
- // 从服务器加载文件数据;
- List<string> listJson;
- if ( LYFZ.Network.PlatinumClientProcess.GetOssTaskInfoFromSvr( out listJson ) )
- {
- OssTask.frmOssTask.LoadOssTask2( listJson );
- }
- }*/
- // 是否存在;
- //if ( OssTask.frmOssTask.IsTaskExists( jsonOssTask ) )
- string strJson;
- if ( LYFZ.Network.PlatinumClientProcess.IsOssTaskInfoExists( jsonOssTask.TaskID, out strJson ) )
- {// 任务已存在;
- MessageBoxCustom.Show( "任务已存在, 若要重新上传, 请到服务端删除任务再上传!" );
- }
- else
- {// 新增任务;
- if ( LYFZ.BLL.BLL_SystemGlobalSetting.SysTemGlobalSetMoel.UseBaiduShareUrl )
- {
- LYFZ.Software.MainBusiness.OssTask.frmBaiduShareUrl frm = new OssTask.frmBaiduShareUrl();
- frm.ShowDialog();
- if ( frm.DialogResult == DialogResult.OK )
- {
- jsonOssTask.BaiduExtrCode = frm.tx_code.Text;
- jsonOssTask.BaiduShareUrl = frm.tx_url.Text;
- OssTask.frmOssTask.SendBaiduShare2WebSrv( jsonOssTask );
- }
- else
- {
- return;
- }
- }
- else
- {
- if ( OssTask.frmOssTask.SendOssTask2Svr( jsonOssTask ) )
- {
- OssTask.frmOssTask.PushTask( jsonOssTask );
- MessageBoxCustom.Show( "任务生成成功!" );
- }
- else
- {
- MessageBoxCustom.Show( "任务生成失败!" );
- }
- }
- }
- }
- } );
- }
- private void ChkCompleteOrder_Click( object sender, EventArgs e )
- {
- this.ucPagerEx1.PageCurrent = 1;
- this.ucPagerEx1.Bind();
- }
- int ucPagerEx1_EventPaging( UCPager.EventPagingArg e )
- {
- //pageData.PageSize = LYFZ.BLL.BLL_SystemGlobalSetting.SysTemGlobalSetMoel.ReportFormPageSize;
- this.ucPagerEx1.PageSize = LYFZ.BLL.BLL_SystemGlobalSetting.SysTemGlobalSetMoel.ReportFormPageSize;
- PublicFunctionRows();
- return ucPagerEx1.NMax;
- }
- public void BindPageData( int pageIndx, int pageSize, int totalCount )
- {
- ucPagerEx1.NMax = totalCount;
- ucPagerEx1.CurrentPageCount = (pageSize);
- ucPagerEx1.PageCurrent = pageIndx;
- }
- private void Btn_ExportN8_Click( object sender, EventArgs e )
- {
- if ( this.dgvData.Rows.Count > 0 )
- {
- if ( this.dgvData.SelectedRows.Count > 0 )
- {
- string SightsName = "";
- if ( this.dgvData.CurrentRow.Cells["Ord_Type"].Value.ToString().Trim() == Convert.ToInt32( LYFZ.EnumPublic.OrderType.儿童订单 ).ToString().Trim() )
- {
- if ( this.dgvData.Columns["拍摄名称"] != null )
- {
- SightsName = this.dgvData.CurrentRow.Cells["拍摄名称"].Value.ToString().Trim();
- }
- }
- if ( BLL.BLL_N8ClientConfig.N8ViewGoEnable )
- {
- LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ExportN8Piece( this.dgvData.CurrentRow.Cells["Ord_Number"].Value.ToString().Trim(), this.dgvData.CurrentRow.Cells["Ordv_ViceNumber"].Value.ToString().Trim(), SightsName );
- }
- }
- else
- {
- MessageBoxCustom.Show( "请选择要导出的订单" );
- return;
- }
- }
- }
- private void Btn_ImportN8_Click( object sender, EventArgs e )
- {
- if ( this.dgvData.Rows.Count > 0 )
- {
- if ( this.dgvData.SelectedRows.Count > 0 )
- {
- string ViceName = "";
- if ( this.dgvData.CurrentRow.Cells["Ord_Type"].Value.ToString().Trim() == Convert.ToInt32( LYFZ.EnumPublic.OrderType.儿童订单 ).ToString().Trim() )
- {
- if ( this.dgvData.Columns["拍摄名称"] != null )
- {
- ViceName = this.dgvData.CurrentRow.Cells["拍摄名称"].Value.ToString().Trim();
- }
- }
- if ( BLL.BLL_N8ClientConfig.N8ViewGoEnable )
- {
- if ( LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ImportN8UserPiece( this.dgvData.CurrentRow.Cells["Ord_Number"].Value.ToString().Trim(), this.dgvData.CurrentRow.Cells["Ordv_ViceNumber"].Value.ToString().Trim(), ViceName ) )
- {
- //this.PublicFunctionRows();
- this.ucPagerEx1.PageCurrent = 1;
- ucPagerEx1.Bind();
- }
- }
- }
- else
- {
- MessageBoxCustom.Show( "请选择要导入的订单" ); return;
- }
- }
- }
- void cbxDesignNoBack_Click( object sender, EventArgs e )
- {
- //throw new NotImplementedException();
- }
- /// <summary>
- /// 订单号(用于开单处跳转过来)
- /// </summary>
- public string StrOrdNumber = "";
- /// <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;
- /// <summary>
- /// 员工姓名
- /// </summary>
- string StrUserName = LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.LoginUserModel.User_Name;
- /// <summary>
- /// 窗体加载事件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void DesignFormMain_Shown( object sender, EventArgs e )
- {
- ///保存意向订单的版本权限
- List<Control> hideControl = new List<Control>();
- //LYFZSS.SystemSpecterPossessed.ISystemSpecterPossessed.GetMySystemSpecter = LYFZSS.SystemSpecterType.SST_D;
- hideControl.Add( this.btnOutSendDesign );
- hideControl.Add( this.btnOutSendStatistic );
- LYFZ.Software.MainBusiness.VersionControl.StaticVersion.BindVersionShowHideControl(
- VersionControl.VersionFunctionEnum.订单设计外发设计, hideControl, null, null );
- hideControl = new List<Control>();
- //LYFZSS.SystemSpecterPossessed.ISystemSpecterPossessed.GetMySystemSpecter = LYFZSS.SystemSpecterType.SST_D;
- hideControl.Add( this.btnYunLookDesign );
- hideControl.Add( this.btnYunLookDesignResult );
- LYFZ.Software.MainBusiness.VersionControl.StaticVersion.BindVersionShowHideControl(
- VersionControl.VersionFunctionEnum.订单设计云看版, hideControl, null, null );
- LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.BindGroupStoreName( this.cmbtreevStoreName, StrGroupKeyCode: "retailProcess", StrKeyCode: "st010" );
- this.PublicFunctionRights();
- //this.PublicFunctionRows();
- ucPagerEx1.Bind();
- this.IsFirstRun = false;
- this.DesignFormMain_Resize( this, null );
- }
- /// <summary>
- /// 窗体加载事件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void DesignFormMain_Load( object sender, EventArgs e )
- {
- LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetSystemVersion( this.chkPortraitVersion, this.chkDressVersion, this.chkKidsVersion );
- this.cmbQueryText.Text = this.StrOrdNumber;
- }
- /// <summary>
- /// 选择分店获取权限
- /// </summary>
- void PublicFunctionRights()
- {
- this.btnExportRefinementGoodPiece.Enabled = LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetGroupStoreRights( this.cmbtreevStoreName, "StoresRefinedRepair", LYFZ.CustomAttributes.OperatingAuthority.PhotoExport );
- this.btnImportDesignVersion.Enabled = LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetGroupStoreRights( this.cmbtreevStoreName, "StoresDesign", LYFZ.CustomAttributes.OperatingAuthority.PhotoImport );
- this.btnExporting.Enabled = LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetGroupStoreRights( this.cmbtreevStoreName, "StoresDesign", LYFZ.CustomAttributes.OperatingAuthority.PhotoExport );
- this.btnLookOver.Enabled = LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetGroupStoreRights( this.cmbtreevStoreName, "StoresDesign", LYFZ.CustomAttributes.OperatingAuthority.PhotoView );
- this.btnLookDesignVersion.Enabled = LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetGroupStoreRights( this.cmbtreevStoreName, "StoresDesign", LYFZ.CustomAttributes.OperatingAuthority.LookDesign );
- this.btnYunLookDesign.Enabled = LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetGroupStoreRights( this.cmbtreevStoreName, "StoresDesign", LYFZ.CustomAttributes.OperatingAuthority.YunLookDesign );
- this.btnYunLookDesignResult.Enabled = LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetGroupStoreRights( this.cmbtreevStoreName, "StoresDesign", LYFZ.CustomAttributes.OperatingAuthority.YunLookDesignResult );
- this.btnOutSendDesign.Enabled = LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetGroupStoreRights( this.cmbtreevStoreName, "StoresRefinedRepair", LYFZ.CustomAttributes.OperatingAuthority.PhotoExport );
- }
- /// <summary>
- /// 分店选择查询数据
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void cmbtreevStoreName_ComboBoxTree_NodeMouseClick( object sender, TreeNodeMouseClickEventArgs e )
- {
- this.PublicFunctionRights();
- //this.PublicFunctionRows();
- this.ucPagerEx1.PageCurrent = 1;
- ucPagerEx1.Bind();
- }
- /// <summary>
- /// 回车
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void cmbQueryText_KeyDown( object sender, KeyEventArgs e )
- {
- if ( e.KeyCode == Keys.Enter )
- {
- this.btnQuery_Click( this, null );
- }
- }
- /// <summary>
- /// 查询
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void btnQuery_Click( object sender, EventArgs e )
- {
- this.DictData.Clear();
- //this.PublicFunctionRows();
- this.ucPagerEx1.PageCurrent = 1;
- ucPagerEx1.Bind();
- }
- /// <summary>
- /// 已精修未设计
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void btnHasSelectionNoDesign_Click( object sender, EventArgs e )
- {
- this.DictData.Clear();
- this.DictData["RefinementStatus"] = "OK";
- this.DictData["DesignerStatus"] = "未设计,设计中";
- //this.PublicFunctionRows();
- this.ucPagerEx1.PageCurrent = 1;
- ucPagerEx1.Bind();
- }
- /// <summary>
- /// 条件查询
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void btnConditionQuery_Click( object sender, EventArgs e )
- {
- this.DictData.Clear();
- LYFZ.Software.MainBusiness.DoorCityProcess.SetSmallForm.ConditionQuerySamllForm frm = new SetSmallForm.ConditionQuerySamllForm();
- frm.LoadType = "设计";
- frm.ShowDialog();
- if ( frm.DictDataArray.Count > 0 )
- {
- Dictionary<string, string> DictDataArray = frm.DictDataArray;
- //设计师
- if ( DictDataArray.ContainsKey( "DesignerName" ) && DictDataArray["DesignerName"].Length > 0 )
- {
- this.DictData["DesignerName"] = DictDataArray["DesignerName"].Trim();
- }
- //设计开始时间
- if ( DictDataArray.ContainsKey( "QueryDateTimeStart" ) && DictDataArray["QueryDateTimeStart"].Length > 0 )
- {
- this.DictData["QueryDateTimeStart"] = DictDataArray["QueryDateTimeStart"].Trim();
- }
- //设计结束时间
- if ( DictDataArray.ContainsKey( "QueryDateTimeEnd" ) && DictDataArray["QueryDateTimeEnd"].Length > 0 )
- {
- this.DictData["QueryDateTimeEnd"] = DictDataArray["QueryDateTimeEnd"].Trim();
- }
- //欠款
- if ( DictDataArray.ContainsKey( "OrderArrears" ) && DictDataArray["OrderArrears"].Length > 0 )
- {
- this.DictData["OrderArrears"] = DictDataArray["OrderArrears"].Trim();
- }
- //this.PublicFunctionRows();
- this.ucPagerEx1.PageCurrent = 1;
- ucPagerEx1.Bind();
- }
- }
- /// <summary>
- /// 导出精修好的片
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void btnExportRefinementGoodPiece_Click( object sender, EventArgs e )
- {
- if ( this.dgvData.Rows.Count > 0 )
- {
- if ( this.dgvData.SelectedRows.Count > 0 )
- {
- try
- {
- string ViceOrderNumber = this.dgvData.CurrentRow.Cells["Ordv_ViceNumber"].Value.ToString().Trim();
- LYFZ.Model.Model_ErpOrder model = obll.GetModel( "Ord_Number", this.dgvData.CurrentRow.Cells["Ord_Number"].Value );
- LYFZ.Model.Model_ErpOrderDigital vmodel = dbll.GetModel( "Ordv_ViceNumber", ViceOrderNumber );
- LYFZ.BLL.SelectPhotoHandling sPh = new BLL.SelectPhotoHandling( model, vmodel );
- string ViceName = "";
- if ( this.dgvData.CurrentRow.Cells["Ord_Type"].Value.ToString().Trim() == Convert.ToInt32( LYFZ.EnumPublic.OrderType.儿童订单 ).ToString().Trim() )
- {
- try
- {
- ViceName = this.dgvData.CurrentRow.Cells["拍摄名称"].Value.ToString().Trim();
- }
- catch
- {
- }
- }
- if ( PublicCodeClasses.defaultImportFilePath != "" )
- {
- if ( Directory.Exists( PublicCodeClasses.defaultImportFilePath ) ) //设置此次默认目录为上一次选中目录
- {
- fbd.SelectedPath = PublicCodeClasses.defaultImportFilePath;
- }
- }
- if ( !LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.IsEnterPassword( ViceOrderNumber ) )
- {
- return;
- }
- frmIntensiveExport intensiveExport = new frmIntensiveExport();
- if ( intensiveExport.ShowDialog() == System.Windows.Forms.DialogResult.OK )
- {
- switch ( intensiveExport.ExportType )
- {
- case 0:
- //导出全部精修片
- List<string> sPhotoList = sPh.GetSpecifyTypePhotoList( Model.Model_ErpOrder.DirectoryType.FineRetouch, BLL.SelectPhotoHandling.PhotoType.Original, ViceName );
- if ( sPhotoList.Count == 0 )
- {
- MessageBoxCustom.Show( "此单未导片" ); return;
- }
- PublicCodeClasses.defaultImportFilePath = fbd.SelectedPath;//记录选中的目录
- if ( fbd.ShowDialog() == DialogResult.OK )
- {
- bool IsImp = false;
- LYFZ.ComponentLibrary.FrmLoadHandling.ExecutionDoWorkMethod( delegate ( object obj, BackgroundWorker backgroundWorker )
- {
- LYFZ.PhotoSelectSystem.PhotoImportExport pe = new PhotoSelectSystem.PhotoImportExport( model, vmodel );
- IsImp = pe.ExportFineRetouchFilm( fbd.SelectedPath.ToString().Trim(), backgroundWorker );
- }, width: 500 );
- if ( !IsImp )
- {
- return;
- }
- else
- {
- if ( vmodel.Ordv_DesignerStatus.Trim() == "0" )
- {
- vmodel.Ordv_DesignerStatus = "1";
- vmodel.Ordv_UpdateDateTime = SDateTime.Now;
- vmodel.Ordv_UpdateName = this.StrUserID;
- if ( dbll.Update( vmodel ) )
- {
- MessageBoxCustom.Show( "导出完毕!" );
- this.dgvData.CurrentRow.Cells["设计状态"].Value = "设计中";
- }
- else
- {
- MessageBoxCustom.Show( "导出相片完成,但修改设计状态为'设计中'失败!" );
- }
- }
- else
- {
- MessageBoxCustom.Show( "导出完毕!" );
- }
- return;
- }
- }
- break;
- case 1:
- //导出选好精修片
- // FolderBrowserDialog fbd = new FolderBrowserDialog();
- if ( fbd.ShowDialog() == DialogResult.OK )
- {
- PublicCodeClasses.defaultImportFilePath = fbd.SelectedPath;//记录选中的目录
- LYFZ.ComponentLibrary.FrmLoadHandling.ExecutionDoWorkMethod( delegate ( object obj, BackgroundWorker backgroundWorker )
- {
- LYFZ.PhotoSelectSystem.PhotoImportExport pe = new PhotoSelectSystem.PhotoImportExport( model, vmodel );
- bool IsSaveed = pe.ExportSelectedFineRetouchPhotoFile( fbd.SelectedPath.ToString().Trim(), Model.Model_ErpOrder.DirectoryType.FineRetouch, backgroundWorker, true, false, isbarode: intensiveExport.chkExportbarcode.Checked, isExportRaw: true );
- if ( IsSaveed )
- {
- LYFZ.BLL.BLL_ErpSystemLogs.WriteSystemLog( LYFZ.EnumPublic.SystemLogsType.相片导入导出, LYFZ.BLL.BLL_ErpUser.UsersModel.User_Name + "导出选好精修片,订单号:" + StrOrdNumber + "场景编号:" + ViceOrderNumber, LYFZ.BLL.BLL_ErpUser.UsersModel.User_EmployeeID, LYFZ.BLL.BLL_ErpUser.UsersModel.User_Name );
- }
- }, width: 500 );
- }
- break;
- case 2:
- //选好的初修片
- if ( fbd.ShowDialog() == DialogResult.OK )
- {
- PublicCodeClasses.defaultImportFilePath = fbd.SelectedPath;//记录选中的目录
- LYFZ.ComponentLibrary.FrmLoadHandling.ExecutionDoWorkMethod( delegate ( object obj, BackgroundWorker backgroundWorker )
- {
- LYFZ.PhotoSelectSystem.PhotoImportExport pe = new PhotoSelectSystem.PhotoImportExport( model, vmodel );
- bool IsSaveed = pe.ExportSelectedFineRetouchPhotoFile( fbd.SelectedPath.ToString().Trim(), Model.Model_ErpOrder.DirectoryType.EarlyRetouch, backgroundWorker, true, false, isbarode: intensiveExport.chkExportbarcode.Checked, isExportRaw: true );
- if ( IsSaveed )
- {
- LYFZ.BLL.BLL_ErpSystemLogs.WriteSystemLog( LYFZ.EnumPublic.SystemLogsType.相片导入导出, LYFZ.BLL.BLL_ErpUser.UsersModel.User_Name + "导出选好的初修片,订单号:" + StrOrdNumber + "场景编号:" + ViceOrderNumber, LYFZ.BLL.BLL_ErpUser.UsersModel.User_EmployeeID, LYFZ.BLL.BLL_ErpUser.UsersModel.User_Name );
- }
- }, width: 500 );
- }
- break;
- case 3:
- //选好的原片
- if ( fbd.ShowDialog() == DialogResult.OK )
- {
- PublicCodeClasses.defaultImportFilePath = fbd.SelectedPath;//记录选中的目录
- LYFZ.ComponentLibrary.FrmLoadHandling.ExecutionDoWorkMethod( delegate ( object obj, BackgroundWorker backgroundWorker )
- {
- LYFZ.PhotoSelectSystem.PhotoImportExport pe = new PhotoSelectSystem.PhotoImportExport( model, vmodel );
- bool IsSaveed = pe.ExportSelectedFineRetouchPhotoFile( fbd.SelectedPath.ToString().Trim(), Model.Model_ErpOrder.DirectoryType.PrimitivePicture, backgroundWorker, true, false, isbarode: intensiveExport.chkExportbarcode.Checked, isExportRaw: true );
- if ( IsSaveed )
- {
- LYFZ.BLL.BLL_ErpSystemLogs.WriteSystemLog( LYFZ.EnumPublic.SystemLogsType.相片导入导出, LYFZ.BLL.BLL_ErpUser.UsersModel.User_Name + "导出选好的原片,订单号:" + StrOrdNumber + "场景编号:" + ViceOrderNumber, LYFZ.BLL.BLL_ErpUser.UsersModel.User_EmployeeID, LYFZ.BLL.BLL_ErpUser.UsersModel.User_Name );
- }
- }, width: 500 );
- }
- break;
- }
- }
- }
- catch
- {
- MessageBoxCustom.Show( "导片出错!" );
- }
- }
- else
- {
- MessageBoxCustom.Show( "请选择要导出的订单" ); return;
- }
- }
- }
- /// <summary>
- /// 导入设计片
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void btnImportDesignVersion_Click( object sender, EventArgs e )
- {
- if ( this.dgvData.Rows.Count > 0 )
- {
- if ( this.dgvData.SelectedRows.Count > 0 )
- {
- string ViceName = "";
- if ( this.dgvData.CurrentRow.Cells["Ord_Type"].Value.ToString().Trim() == Convert.ToInt32( LYFZ.EnumPublic.OrderType.儿童订单 ).ToString().Trim() )
- {
- if ( this.dgvData.Columns["拍摄名称"] != null )
- {
- ViceName = this.dgvData.CurrentRow.Cells["拍摄名称"].Value.ToString().Trim();
- }
- }
- if ( this.dgvData.CurrentRow.Cells["取件状态"].Value.ToString().Trim() == "OK" )
- {
- MessageBoxCustom.Show( "已取件,不能导片!" );
- }
- LYFZ.Model.Model_ErpOrderDigital _modelDigital = null;
- if ( LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ImportDesignPiece(
- this.dgvData.CurrentRow.Cells["Ord_Number"].Value.ToString().Trim(),
- this.dgvData.CurrentRow.Cells["Ordv_ViceNumber"].Value.ToString().Trim(),
- ViceName,ref _modelDigital,
- this.dgvData.CurrentRow.Cells["取件状态"].Value.ToString().Trim() ) )
- {
- //this.PublicFunctionRows();
- this.ucPagerEx1.PageCurrent = 1;
- ucPagerEx1.Bind();
- }
- }
- else
- {
- MessageBoxCustom.Show( "请选择要导入的订单" ); return;
- }
- }
- }
- /// <summary>
- /// 查看设计
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void btnLookOver_Click( object sender, EventArgs e )
- {
- if ( this.dgvData.Rows.Count > 0 )
- {
- if ( this.dgvData.SelectedRows.Count > 0 )
- {
- string MainOrderNumber = this.dgvData.CurrentRow.Cells["Ord_Number"].Value.ToString().Trim();//主订单号
- string ViceOrderNumber = this.dgvData.CurrentRow.Cells["Ordv_ViceNumber"].Value.ToString().Trim();//数码编号
- string SightsName = "";
- if ( this.dgvData.CurrentRow.Cells["Ord_Type"].Value.ToString().Trim() == Convert.ToInt32( LYFZ.EnumPublic.OrderType.儿童订单 ).ToString().Trim() )
- {
- try { SightsName = this.dgvData.CurrentRow.Cells["拍摄名称"].Value.ToString().Trim(); }
- catch { }
- }
- if ( !LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.IsEnterPassword( ViceOrderNumber ) )
- {
- return;
- }
- LYFZ.Software.MainBusiness.DoorCityProcess.SetSmallForm.CustomerPhotosViewSmallForm frm = new SetSmallForm.CustomerPhotosViewSmallForm();
- frm.LoadType = "设计片";
- frm.MainOrderNumber = MainOrderNumber;
- frm.ViceOrderNumber = ViceOrderNumber;
- frm.DirType = Model.Model_ErpOrder.DirectoryType.DesignPiece;
- frm.StrSightsName = SightsName;
- frm.Show();
- }
- else { MessageBoxCustom.Show( "请选择订单" ); return; }
- }
- }
- /// <summary>
- /// 导出设计
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void btnExporting_Click( object sender, EventArgs e )
- {
- if ( this.dgvData.Rows.Count > 0 )
- {
- if ( this.dgvData.SelectedRows.Count > 0 )
- {
- string SightsName = "";
- if ( this.dgvData.CurrentRow.Cells["Ord_Type"].Value.ToString().Trim() == Convert.ToInt32( LYFZ.EnumPublic.OrderType.儿童订单 ).ToString().Trim() )
- {
- if ( this.dgvData.Columns["拍摄名称"] != null )
- {
- SightsName = this.dgvData.CurrentRow.Cells["拍摄名称"].Value.ToString().Trim();
- }
- }
- LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ExportDesignPiece( this.dgvData.CurrentRow.Cells["Ord_Number"].Value.ToString().Trim(), this.dgvData.CurrentRow.Cells["Ordv_ViceNumber"].Value.ToString().Trim(), SightsName );
- }
- else
- {
- MessageBoxCustom.Show( "请选择要导出的订单" );
- return;
- }
- }
- }
- /// <summary>
- /// 看设计版
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void btnLookDesignVersion_Click( object sender, EventArgs e )
- {
- if ( this.dgvData.Rows.Count > 0 )
- {
- if ( this.dgvData.SelectedRows.Count > 0 )
- {
- string StrViceNumber = this.dgvData.CurrentRow.Cells["Ordv_ViceNumber"].Value.ToString().Trim();
- if ( !LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.IsEnterPassword( StrViceNumber ) )
- {
- return;
- }
- LYFZ.Model.Model_ErpOrder model = obll.GetModel( "Ord_Number", this.dgvData.CurrentRow.Cells["Ord_Number"].Value );
- LYFZ.Model.Model_ErpOrderDigital vmodel = dbll.GetModel( "Ordv_ViceNumber", this.dgvData.CurrentRow.Cells["Ordv_ViceNumber"].Value );
- LYFZ.PhotoSelectSystem.LookDesign frm = new PhotoSelectSystem.LookDesign( model, vmodel );
- if ( !frm.IsDisposed )
- {
- frm.ShowDialog();
- //this.PublicFunctionRows();
- this.ucPagerEx1.PageCurrent = 1;
- ucPagerEx1.Bind();
- }
- }
- }
- }
- /// <summary>
- /// 外发设计
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void btnOutSendDesign_Click( object sender, EventArgs e )
- {
- if ( this.dgvData.Rows.Count > 0 )
- {
- if ( this.dgvData.SelectedRows.Count > 0 )
- {
- string StrViceNumber = this.dgvData.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.dgvData.CurrentRow.Cells["Ord_Number"].Value.ToString().Trim();
- frm.StrOrdViceNumber = this.dgvData.CurrentRow.Cells["Ordv_ViceNumber"].Value.ToString().Trim();
- frm.ShowDialog();
- if ( frm.IsSaveed )
- {
- //this.PublicFunctionRows();
- this.ucPagerEx1.PageCurrent = 1;
- ucPagerEx1.Bind();
- }
- }
- else
- {
- MessageBoxCustom.Show( "请选择你要操作的订单" ); return;
- }
- }
- }
- /// <summary>
- /// 外发统计
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void btnOutSendStatistic_Click( object sender, EventArgs e )
- {
- LYFZ.Software.MainBusiness.DoorCityProcess.SetSmallForm.OutSendDesignStatisticSmallForm frm = new SetSmallForm.OutSendDesignStatisticSmallForm();
- frm.ShowDialog();
- }
- /// <summary>
- /// 云看样
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void btnYunLookDesign_Click( object sender, EventArgs e )
- {
- if ( this.dgvData.Rows.Count > 0 )
- {
- if ( this.dgvData.SelectedRows != null && this.dgvData.SelectedRows.Count > 0 )
- {
- string MainOrderNumber = this.dgvData.CurrentRow.Cells["Ord_Number"].Value.ToString().Trim();//主订单号
- string StrViceNumber = this.dgvData.CurrentRow.Cells["Ordv_ViceNumber"].Value.ToString().Trim();//副订单号
- if ( !LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.IsEnterPassword( StrViceNumber ) )
- {
- return;
- }
- ShowCloudSelection( MainOrderNumber, StrViceNumber, 0, 1 );
- }
- else
- {
- MessageBoxCustom.Show( "请选择要上传的订单" );
- }
- }
- }
- /// <summary>
- /// 云看样结果
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void btnYunLookDesignResult_Click( object sender, EventArgs e )
- {
- ShowCloudSelection( "", "", 1, 1 );
- }
- /// <summary>
- /// 显示云选功能
- /// </summary>
- /// <param name="MainOrderNumber"></param>
- /// <param name="ViceOrderNumber"></param>
- /// <param name="showtype"></param>
- /// <param name="cloudType"></param>
- public static void ShowCloudSelection( string MainOrderNumber, string ViceOrderNumber, int showtype, int cloudType )
- {
- LYFZ.Software.MainBusiness.DoorCityProcess.frmCloudSelectionFilm frm = new frmCloudSelectionFilm();
- frm.MainOrderNumber = MainOrderNumber;
- frm.ViceOrderNumber = ViceOrderNumber;
- frm.CloudType = cloudType;
- frm.ShowType = showtype;
- if ( !frm.IsDisposed )
- {
- if ( frm.ShowDialog() == DialogResult.OK )
- {
- }
- }
- }
- /// <summary>
- /// 关闭
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void btnClose_Click( object sender, EventArgs e )
- {
- this.Close();
- }
- /// <summary>
- /// 儿童版
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void chkKidsVersion_Click( object sender, EventArgs e )
- {
- if ( this.chkKidsVersion.Checked )
- {
- this.chkPortraitVersion.Checked = false; this.chkKidsVersion.Checked = true; this.chkDressVersion.Checked = false;
- }
- this.cmbQueryText.Text = "";
- //this.PublicFunctionRows();
- this.ucPagerEx1.PageCurrent = 1;
- ucPagerEx1.Bind();
- }
- /// <summary>
- /// 婚纱版
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void chkDressVersion_Click( object sender, EventArgs e )
- {
- if ( this.chkDressVersion.Checked )
- {
- this.chkPortraitVersion.Checked = false; this.chkDressVersion.Checked = true; this.chkKidsVersion.Checked = false;
- }
- this.cmbQueryText.Text = "";
- //this.PublicFunctionRows();
- this.ucPagerEx1.PageCurrent = 1;
- ucPagerEx1.Bind();
- }
- /// <summary>
- /// 写真版
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void chkPortraitVersion_Click( object sender, EventArgs e )
- {
- if ( this.chkPortraitVersion.Checked )
- {
- this.chkPortraitVersion.Checked = true; this.chkDressVersion.Checked = false; this.chkKidsVersion.Checked = false;
- }
- this.cmbQueryText.Text = "";
- //this.PublicFunctionRows();
- this.ucPagerEx1.PageCurrent = 1;
- ucPagerEx1.Bind();
- }
- /// <summary>
- /// 窗体大小发生改变事件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void DesignFormMain_Resize( object sender, EventArgs e )
- {
- if ( !this.IsFirstRun )
- {
- switch ( this.panelPortraitVersion.Location.Y )
- {
- case 4: this.flowLayoutPanel1.Height = 36; break;
- case 36: this.flowLayoutPanel1.Height = 68; break;
- case 68: this.flowLayoutPanel1.Height = 98; break;
- }
- }
- }
- /// <summary>
- /// 列表双击事件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void dgvData_CellMouseDoubleClick( object sender, DataGridViewCellMouseEventArgs e )
- {
- if ( this.dgvData.Rows.Count > 0 )
- {
- if ( e.RowIndex >= 0 && e.ColumnIndex >= 0 )
- {
- if ( LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetGroupStoreRights( this.cmbtreevStoreName, "StoresDesign", LYFZ.CustomAttributes.OperatingAuthority.PhotoView ) )
- {
- this.btnLookOver_Click( this, null );
- }
- }
- }
- }
- /// <summary>
- /// 点击事件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void dgvData_CellMouseDown( object sender, DataGridViewCellMouseEventArgs e )
- {
- if ( e.Button == MouseButtons.Right )
- {
- if ( e.RowIndex >= 0 && e.ColumnIndex >= 0 )
- {
- if ( this.dgvData.CurrentRow != null )
- {
- bool IsFind = false;
- Hashtable htData = null;
- ToolStripMenuItem item = null;
- if ( this.dgvData.Columns[e.ColumnIndex].Name.Trim() == "设计状态" )
- {
- if ( LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetGroupStoreRights( this.cmbtreevStoreName, "StoresDesign", LYFZ.CustomAttributes.OperatingAuthority.ProcessStatusResetDesign ) )
- {
- this.dgvData.conMenu.Items.Clear();
- htData = new Hashtable();
- htData["StrNumber"] = this.dgvData.Rows[e.RowIndex].Cells["Ord_Number"].Value.ToString().Trim();
- htData["StrStatusName"] = this.dgvData.Columns[e.ColumnIndex].Name.Trim() + ":";
- htData["StrStatusType"] = "4";
- htData["StrViceNumber"] = this.dgvData.Rows[e.RowIndex].Cells["Ordv_ViceNumber"].Value.ToString().Trim();
- item = new ToolStripMenuItem();
- item.Text = "重置" + this.dgvData.Columns[e.ColumnIndex].Name.Trim();
- item.Tag = htData;
- item.Name = "ResetStatus";
- this.dgvData.conMenu.Items.Add( item );
- IsFind = true;
- }
- }
- else if ( this.dgvData.Columns[e.ColumnIndex].Name.Trim() == "看版状态" )
- {
- if ( LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetGroupStoreRights( this.cmbtreevStoreName, "StoresDesign", LYFZ.CustomAttributes.OperatingAuthority.ProcessStatusResetLookDesign ) )
- {
- this.dgvData.conMenu.Items.Clear();
- htData = new Hashtable();
- htData["StrNumber"] = this.dgvData.Rows[e.RowIndex].Cells["Ord_Number"].Value.ToString().Trim();
- htData["StrStatusName"] = this.dgvData.Columns[e.ColumnIndex].Name.Trim() + ":";
- htData["StrStatusType"] = "5";
- htData["StrViceNumber"] = this.dgvData.Rows[e.RowIndex].Cells["Ordv_ViceNumber"].Value.ToString().Trim();
- item = new ToolStripMenuItem();
- item.Text = "重置" + this.dgvData.Columns[e.ColumnIndex].Name.Trim();
- item.Tag = htData;
- item.Name = "ResetStatus";
- this.dgvData.conMenu.Items.Add( item );
- IsFind = true;
- }
- }
- else if ( this.dgvData.Columns[e.ColumnIndex].Name.Trim() == "设计日期" && this.dgvData.Rows[e.RowIndex].Cells["设计日期"].Value.ToString().Trim() != "" )
- {
- if ( LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetGroupStoreRights( this.cmbtreevStoreName, "StoresDesign", LYFZ.CustomAttributes.OperatingAuthority.ProcessDateReset ) )
- {
- this.dgvData.conMenu.Items.Clear();
- htData = new Hashtable();
- htData["StrNumber"] = this.dgvData.Rows[e.RowIndex].Cells["Ord_Number"].Value.ToString().Trim();
- htData["StrViceNumber"] = this.dgvData.Rows[e.RowIndex].Cells["Ordv_ViceNumber"].Value.ToString().Trim();
- htData["StrOldDate"] = this.dgvData.Rows[e.RowIndex].Cells["设计日期"].Value.ToString().Trim();
- item = new ToolStripMenuItem();
- item.Text = "重置" + this.dgvData.Columns[e.ColumnIndex].Name.Trim();
- item.Tag = htData;
- item.Name = "ResetDateDesign";
- this.dgvData.conMenu.Items.Add( item );
- IsFind = true;
- }
- }
- else if ( this.dgvData.Columns[e.ColumnIndex].Name.Trim() == "看版日期" && this.dgvData.Rows[e.RowIndex].Cells["看版日期"].Value.ToString().Trim() != "" )
- {
- if ( LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetGroupStoreRights( this.cmbtreevStoreName, "StoresDesign", LYFZ.CustomAttributes.OperatingAuthority.ProcessDateReset ) )
- {
- this.dgvData.conMenu.Items.Clear();
- htData = new Hashtable();
- htData["StrNumber"] = this.dgvData.Rows[e.RowIndex].Cells["Ord_Number"].Value.ToString().Trim();
- htData["StrViceNumber"] = this.dgvData.Rows[e.RowIndex].Cells["Ordv_ViceNumber"].Value.ToString().Trim();
- htData["StrOldDate"] = this.dgvData.Rows[e.RowIndex].Cells["看版日期"].Value.ToString().Trim();
- item = new ToolStripMenuItem();
- item.Text = "重置" + this.dgvData.Columns[e.ColumnIndex].Name.Trim();
- item.Tag = htData;
- item.Name = "ResetDateLookDesign";
- this.dgvData.conMenu.Items.Add( item );
- IsFind = true;
- }
- }
- item = new ToolStripMenuItem();
- htData = new Hashtable();
- htData["StrNumber"] = this.dgvData.Rows[e.RowIndex].Cells["Ord_Number"].Value.ToString().Trim();
- htData["StrViceNumber"] = this.dgvData.Rows[e.RowIndex].Cells["Ordv_ViceNumber"].Value.ToString().Trim();
- item.Text = "订单备注";
- item.Tag = htData;
- item.Name = "OrderRemark";
- this.dgvData.conMenu.Items.Add( item );
- IsFind = true;
- if ( IsFind )
- {
- // this.dgvData.conMenu.Show( MousePosition.X, MousePosition.Y );//弹出操作菜单
- this.dgvData.conMenu.ItemClicked -= dgvData_DataGridViewConMenu_ItemClicked;
- this.dgvData.conMenu.ItemClicked += dgvData_DataGridViewConMenu_ItemClicked;
- // this.dgvData.conMenu.Show();
- if (!this.dgvData.conMenu.Visible)
- {
- this.dgvData.conMenu.Show(MousePosition.X, MousePosition.Y);//弹出操作菜单
- }
- }
- if ( htData != null )
- {
- BindContextMenu( this.dgvData.Rows[e.RowIndex] );
- }
- }
- }
- else
- {
- this.dgvData.conMenu.Items.Clear();
- ToolStripMenuItem item = new ToolStripMenuItem();
- item.Text = "设置标题";
- item.Tag = "SetColumnShow";
- item.Name = "SetColumnShow";
- this.dgvData.conMenu.Items.Add( item );
- // this.dgvData.conMenu.Show( MousePosition.X, MousePosition.Y );//弹出操作菜单
- this.dgvData.conMenu.ItemClicked -= dgvData_DataGridViewConMenu_ItemClicked;
- this.dgvData.conMenu.ItemClicked += dgvData_DataGridViewConMenu_ItemClicked;
- // this.dgvData.conMenu.Show();
- if (!this.dgvData.conMenu.Visible)
- {
- this.dgvData.conMenu.Show(MousePosition.X, MousePosition.Y);//弹出操作菜单
- }
- }
- }
- }
- /// <summary>
- /// 列表单击事件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void dgvData_CellClick( object sender, DataGridViewCellEventArgs e )
- {
- try
- {
- string StrNumber = this.dgvData.CurrentRow.Cells["订单号"].Value.ToString().Trim();
- if ( string.IsNullOrEmpty( StrNumber ) || StrNumber.Trim() == "(取件OK)" )
- {
- bool IsFind = false;
- int i = this.dgvData.CurrentRow.Index;
- while ( !IsFind )
- {
- i = i - 1;
- if ( !string.IsNullOrEmpty( this.dgvData.Rows[i].Cells["订单号"].Value.ToString().Trim() ) )
- {
- StrNumber = this.dgvData.Rows[i].Cells["订单号"].Value.ToString().Trim(); IsFind = true;
- }
- }
- }
- LYFZ.BLL.BLL_ErpOrder.CurrentSelectedOrderNumber = StrNumber;
- }
- catch
- {
- }
- }
- /// <summary>
- /// 对列表控件双击事件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void dgvData_MouseDoubleClick( object sender, MouseEventArgs e )
- {
- Point hit = this.dgvData.PointToClient( Cursor.Position );
- DataGridView.HitTestInfo hitTest = this.dgvData.HitTest( hit.X, hit.Y );
- if ( hitTest.RowIndex < 0 && hitTest.ColumnIndex < 0 )
- {
- if ( !string.IsNullOrEmpty( this.cmbQueryText.Text.Trim() ) )
- {
- LYFZ.BLL.BLL_ErpOrder.CurrentSelectedOrderNumber = "";
- this.cmbQueryText.Text = "";
- //this.PublicFunctionRows();
- this.ucPagerEx1.PageCurrent = 1;
- ucPagerEx1.Bind();
- }
- }
- }
- /// <summary>
- /// 右键菜单选择项事件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void dgvData_DataGridViewConMenu_ItemClicked( object sender, ToolStripItemClickedEventArgs e )
- {
- ToolStripItem item = e.ClickedItem;
- if ( item.Name.Trim() == "SetColumnShow" )
- {
- if ( LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ShowDataGridViewSetColumn( this.dgvData ) )
- {
- //this.PublicFunctionRows();
- this.ucPagerEx1.PageCurrent = 1;
- ucPagerEx1.Bind();
- }
- }
- else if ( item.Name.ToString().Trim() == "OrderRemark" )
- {
- Hashtable htData = (Hashtable)item.Tag;
- LYFZ.Software.MainBusiness.DoorCityProcess.SuperSmallForm.OrderRemarkRecordAddSuperSmallForm frm = new SuperSmallForm.OrderRemarkRecordAddSuperSmallForm();
- frm.StrOrderNumber = htData["StrNumber"].ToString().Trim();
- frm.StrOrdViceNumber = htData["StrViceNumber"].ToString().Trim();
- frm.StrOrdModuleName = LYFZ.EnumPublic.EnumOrderRemarkModule.订单设计.ToString().Trim();
- frm.ShowDialog();
- }
- else if ( item.Name.ToString().Trim() == "ResetStatus" || item.Name.ToString().Trim() == "ResetDateDesign" || item.Name.ToString().Trim() == "ResetDateLookDesign" )
- {
- DateTime strTime = SDateTime.Now;
- string StrContent = "";
- List<Helper.CommandInfo> clist = new List<CommandInfo>();
- if ( item.Name.ToString().Trim() == "ResetStatus" )
- {
- Hashtable htData = (Hashtable)item.Tag;
- LYFZ.Software.MainBusiness.DoorCityProcess.SetSmallForm.OrderStatusResetSmallForm frm = new SetSmallForm.OrderStatusResetSmallForm();
- frm.StrNumber = htData["StrNumber"].ToString();
- frm.StrStatusName = htData["StrStatusName"].ToString();
- frm.StrStatusType = htData["StrStatusType"].ToString();
- frm.StrViceNumber = htData["StrViceNumber"].ToString();
- frm.ShowDialog();
- if ( frm.IsSaveed )
- {
- //PublicFunctionRows();
- this.ucPagerEx1.PageCurrent = 1;
- ucPagerEx1.Bind();
- }
- return;
- }
- else if ( item.Name.ToString().Trim() == "ResetDateDesign" )
- {
- LYFZ.Software.MainBusiness.CameraControlBook.SuperSmallForm.GetDateSuperSmallForm frm = new CameraControlBook.SuperSmallForm.GetDateSuperSmallForm();
- frm.IsValueNull = false;
- frm.ShowDialog();
- if ( !frm.IsOK )
- {
- return;
- }
- if ( MessageBoxCustom.Show( "您确定要重置设计日期吗?", "温馨提示", MessageBoxButtons.YesNo ) == DialogResult.No )
- {
- return;
- }
- Hashtable htData = (Hashtable)item.Tag;
- LYFZ.Model.Model_ErpOrderDigital model = dbll.GetModel( "Ordv_ViceNumber", htData["StrViceNumber"] );
- model.Ordv_DesignerTime = Convert.ToDateTime( frm.StrValue );
- model.Ordv_UpdateDateTime = strTime;
- model.Ordv_UpdateName = StrUserID;
- clist.Add( dbll.GetUpdateCommandInfo( model ) );
- StrContent = "[重置设置日期] 数码编号为:" + htData["StrViceNumber"] + ",设计日期由" + htData["StrOldDate"] + "改为" + frm.StrValue;
- }
- else if ( item.Name.ToString().Trim() == "ResetDateLookDesign" )
- {
- LYFZ.Software.MainBusiness.CameraControlBook.SuperSmallForm.GetDateSuperSmallForm frm = new CameraControlBook.SuperSmallForm.GetDateSuperSmallForm();
- frm.IsValueNull = false;
- frm.ShowDialog();
- if ( !frm.IsOK )
- {
- return;
- }
- if ( MessageBoxCustom.Show( "您确定要重看置设计日期吗?", "温馨提示", MessageBoxButtons.YesNo ) == DialogResult.No )
- {
- return;
- }
- Hashtable htData = (Hashtable)item.Tag;
- LYFZ.Model.Model_ErpOrderDigital model = dbll.GetModel( "Ordv_ViceNumber", htData["StrViceNumber"] );
- model.Ordv_LookDesignTime = Convert.ToDateTime( frm.StrValue );
- model.Ordv_UpdateDateTime = strTime;
- model.Ordv_UpdateName = StrUserID;
- clist.Add( dbll.GetUpdateCommandInfo( model ) );
- StrContent = "[重置看版日期] 数码编号为:" + htData["StrViceNumber"] + ",看版日期由" + htData["StrOldDate"] + "改为" + frm.StrValue;
- }
- clist.Add( systbll.GetAddCommandInfo( BLL.BLL_ErpSystemLogs.GetWriteLogModel( LYFZ.EnumPublic.SystemLogsType.订单流程重置, StrContent, StrUserID, StrUserName, LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.User_IP ) ) );
- if ( clist.Count > 0 )
- {
- if ( LYFZ.BLL.BaseBllOperate.ExecuteSqlTran( clist ) > 0 )
- {
- //this.PublicFunctionRows();
- this.ucPagerEx1.PageCurrent = 1;
- ucPagerEx1.Bind();
- MessageBoxCustom.Show( "重置成功!" );
- }
- else
- {
- MessageBoxCustom.Show( "重置失败!" );
- }
- }
- }
- }
- /// <summary>
- /// 点击列标头排序
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void dgvData_ColumnHeaderMouseClick( object sender, DataGridViewCellMouseEventArgs e )
- {
- if ( e.Button == MouseButtons.Left )
- {
- string StrColumnName = GetOrderByName( this.dgvData.Columns[e.ColumnIndex].Name.Trim() );
- if ( StrColumnName == this.StrCurrentClickField || string.IsNullOrEmpty( this.StrCurrentClickField ) )
- {
- if ( this.StrSortOrder == "ASC" )
- {
- this.StrSortOrder = "DESC";
- }
- else
- {
- this.StrSortOrder = "ASC";
- }
- }
- else
- {
- this.StrSortOrder = "DESC";
- }
- if ( this.dgvData.StrValueNullColumn.Trim().IndexOf( StrColumnName ) == -1 || StrColumnName.Trim() == "欠款" || StrColumnName.Trim() == "套系金额" )
- {
- this.StrSortField = StrColumnName + " " + this.StrSortOrder + ",Ord_CreateDateTime,Ordv_DigitalNumber";
- }
- else
- {
- this.StrSortField = "Ord_CreateDateTime " + this.StrSortOrder + ",Ordv_DigitalNumber";
- }
- this.StrCurrentClickField = StrColumnName;
- //this.PublicFunctionRows();
- this.ucPagerEx1.PageCurrent = 1;
- ucPagerEx1.Bind();
- }
- }
- string GetOrderByName( string StrColumnName )
- {
- switch ( StrColumnName )
- {
- case "订单号": return "Ord_SinceOrderNumber";
- case "客户姓名": return "Cus_Name";
- case "客户性别": return "Cus_Sex_cs";
- case "客户电话": return "Cus_Telephone";
- case "订单类型": return "Ord_Type";
- case "接单人": return "Ord_OrderPersonName";
- case "套系名称": return "Ord_SeriesName";
- case "套系价格": return "Ord_SeriesPrice";
- case "加急": return "IsExpedited";
- case "加急日期": return "ExpeditedTime";
- case "拍摄名称": return "Ordpg_Sights";
- case "初修状态": return "Ordv_EarlyRepairStatus";
- case "选片状态": return "Ordv_FilmSelectionStatus";
- case "精修状态": return "Ordv_RefinementStatus";
- case "精修日期": return "Ordv_RefinementTime";
- case "设计状态": return "Ordv_DesignerStatus";
- case "设计师": return "Ordv_DesignerName";
- case "设计日期": return "Ordv_DesignerTime";
- case "看版师": return "Ordv_LookDesignName";
- case "看版日期": return "Ordv_LookDesignTime";
- case "看版状态": return "Ordv_LookDesignStatus";
- case "看版要求": return "Ordv_LookDesignClaim";
- case "取件状态": return "Ords_ProductPickupIntStatus";
- case "会员卡号": return "Mc_CradNumber";
- default: return "";
- }
- }
- /// <summary>
- /// 当前点击的字段
- /// </summary>
- string StrCurrentClickField = "";
- /// <summary>
- /// 排序字段
- /// </summary>
- string StrSortField = "Ord_CreateDateTime DESC,Ordv_DigitalNumber";
- /// <summary>
- /// 排序顺序
- /// </summary>
- string StrSortOrder = "DESC";
- /// <summary>
- /// 创建行
- /// </summary>
- void PublicFunctionRows()
- {
- this.dgvData.dgvCurrentColumnOriginalSet = "Ord_Number,Ord_Type,Ordv_ViceNumber,订单号,客户姓名,客户性别,客户电话,订单类型,接单人,套系名称,套系价格,加急,加急日期,是否导出,欠款,拍摄名称,初修状态,选片状态,精修状态,精修日期,设计是否外发,设计状态,设计师,设计日期,看版师,看版日期,看版状态,看版要求,取件状态,会员卡号";
- string StrGuidName = LYFZ.EnumPublic.dgvGuidName.E_FormAll_A0005.ToString().Trim();
- if ( (LYFZ.BLL.BLL_SystemGlobalSetting.SysTemGlobalSetMoel.MemberCardShowHide) )
- {
- this.dgvData.dgvFixedHideColumn = "Ord_Number,Ordv_ViceNumber,Ord_Type,会员卡号";
- }
- else
- {
- this.dgvData.dgvFixedHideColumn = "Ord_Number,Ordv_ViceNumber,Ord_Type";
- }
- this.dgvData.dgvGuidName = StrGuidName;
- this.dgvData.dgvUserEmployeeID = this.StrUserID;
- this.dgvData.StrValueNullColumn = "订单号,客户姓名,客户性别,客户电话,订单类型,接单人,套系名称,套系价格,加急,加急日期,欠款,会员卡号";
- this.dgvData.DataColumns( this.dgvData.dgvCurrentColumnOriginalSet, strHideField: this.dgvData.dgvFixedHideColumn );
- Dictionary<string, string> dictColumns = LYFZ.DAL.DAL_GridViewDisplayIndex.GetGridViewShowColumns( this.StrUserID, StrGuidName, this.dgvData.dgvCurrentColumnOriginalSet );
- this.dgvData.dictShowColumName = dictColumns;
- string StrQueryCondition = "";
- if ( IsFirstRun && !string.IsNullOrEmpty( LYFZ.BLL.BLL_ErpOrder.CurrentSelectedOrderNumber ) )
- {
- string StrWhere = " Where Ord_SinceOrderNumber = '" + LYFZ.BLL.BLL_ErpOrder.CurrentSelectedOrderNumber + "'" + LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetVersionQuerySQL( this.chkPortraitVersion, this.chkDressVersion, this.chkKidsVersion, StrOrdType: "0,1,2" );
- this.cmbQueryText.Text = LYFZ.BLL.BLL_ErpOrder.CurrentSelectedOrderNumber;
- StrQueryCondition = StrWhere + LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetGroupQueryOrderClickWhere( this.cmbtreevStoreName, "Ord_DividedShop" );
- }
- else
- {
- StrQueryCondition = this.GetWhereStr();
- }
- int intTopCount = LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.GetPageSize();
- Hashtable htData = LYFZ.ComponentLibrary.DataGridOrderView.GetData_OrderDesign( this.dgvData, dictColumns, StrQueryCondition, intTopCount, this.StrSortField, ucPagerEx1.PageCurrent );
- this.dataGridViewStatisticsCount1.LocationX = this.dgvData.RowHeadersWidth;
- this.dataGridViewStatisticsCount1.CurrenQuantity = Convert.ToInt32( htData["CurrentCount"] );
- this.dataGridViewStatisticsCount1.TotalQuantity = Convert.ToInt32( htData["TotalCount"] );
- BindPageData( ucPagerEx1.PageCurrent, Convert.ToInt32( htData["CurrentCount"] ), Convert.ToInt32( htData["TotalCount"] ) );
- foreach (DataGridViewRow row in dgvData.Rows)
- {
- if (row.Cells["加急"].Value!=null&&row.Cells["加急"].Value.ToString().Trim() == "是")
- {
- //row.DefaultCellStyle.BackColor = Color.Red;
- row.DefaultCellStyle.Font = new Font("黑体", 10, FontStyle.Bold);
- row.DefaultCellStyle.ForeColor = Color.Red;
- }
- }
- dgvData.Refresh();
- }
- /// <summary>
- /// 返回要操作的条件
- /// </summary>
- /// <returns></returns>
- string GetWhereStr()
- {
- string StrWhere = " Where Ord_Class = '1' " + LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetGroupQueryWhere( this.cmbtreevStoreName, "Ord_DividedShop" );
- StrWhere += LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetQueryTextQueryCondition( this.cmbQueryText.Text.Trim() );
- if ( chkCompleteOrder.Checked )
- {
- StrWhere += " and ( (Ords_ServiceIntStatus = 2 or ServiceCount=0 ) and (Ords_ProductPickupIntStatus = 2 or productCount=0 ) and (ServiceCount>0 or productCount>0) ) ";
- }
- else
- {
- if ( BLL.BLL_SystemGlobalSetting.SysTemGlobalSetMoel.HidePickUpOrder && !this.chkCompleteOrder.Checked && string.IsNullOrEmpty( this.cmbQueryText.Text ) )
- {
- StrWhere += " and (Ords_ProductPickupIntStatus in (0,1) and productCount>0 ) ";
- }
- else
- {
- StrWhere += " and ( (Ords_ServiceIntStatus in (0,1) and ServiceCount>0 ) or (Ords_ProductPickupIntStatus in (0,1) and productCount>0 ) or ( ServiceCount = 0 and productCount = 0 ) ) ";
- }
- }
- if ( DictData.ContainsKey( "OrderArrears" ) && DictData["OrderArrears"].Trim().Length > 0 )
- {
- StrWhere += " and (套系金额 + isnull(加挑金额,0) - isnull(收款金额,0)) > 0 ";
- }
- if ( DictData.ContainsKey( "RefinementStatus" ) && DictData["RefinementStatus"].Trim().Length > 0 )
- {
- StrWhere += " and Ordv_RefinementStatus = '2'";
- }
- if ( DictData.ContainsKey( "DesignerStatus" ) && DictData["DesignerStatus"].Trim().Length > 0 )
- {
- StrWhere += " and Ordv_DesignerStatus in('0','1')";
- }
- if ( DictData.ContainsKey( "DesignerName" ) && DictData["DesignerName"].Trim().Length > 0 )
- {
- StrWhere += " and Ordv_DesignerName = '" + DictData["DesignerName"].Trim() + "'";
- }
- if ( DictData.ContainsKey( "QueryDateTimeStart" ) && DictData["QueryDateTimeStart"].Trim().Length > 0 && DictData.ContainsKey( "QueryDateTimeEnd" ) && DictData["QueryDateTimeEnd"].Trim().Length > 0 )
- {
- StrWhere += LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetDateTime( "Ordv_DesignerTime", DictData["QueryDateTimeStart"], DictData["QueryDateTimeEnd"] );
- }
- StrWhere += LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetVersionQuerySQL( this.chkPortraitVersion, this.chkDressVersion, this.chkKidsVersion, StrOrdType: "0,1,2" );
- return StrWhere;
- }
- }
- }
|