DigitalArrangeFormMain.cs 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Windows.Forms;
  9. using System.Collections;
  10. using LYFZ.ComponentLibrary;
  11. namespace LYFZ.Software.MainBusiness.DoorCityProcess
  12. {
  13. public partial class DigitalArrangeFormMain : LYFZ.Software.UI.DoorCityProcess.DigitalArrangeFormMain
  14. {
  15. public DigitalArrangeFormMain()
  16. {
  17. this.Shown += DigitalArrangeFormMain_Shown;
  18. this.Load += DigitalArrangeFormMain_Load;
  19. this.cmbQueryText.KeyDown += cmbQueryText_KeyDown;
  20. this.btnQuery.Click += btnQuery_Click;
  21. this.btnConditionQuery.Click += btnConditionQuery_Click;
  22. this.btnAnPaiWork.Click += btnAnPaiWork_Click;
  23. this.btnViewAnPai.Click += btnViewAnPai_Click;
  24. this.btnIWork.Click += btnIWork_Click;
  25. this.btnClose.Click += btnClose_Click;
  26. this.chkDressVersion.Click += chkDressVersion_Click;
  27. this.chkKidsVersion.Click += chkKidsVersion_Click;
  28. this.chkPortraitVersion.Click += chkPortraitVersion_Click;
  29. this.chkShowCompleteOrder.Click += chkShowCompleteOrder_Click;
  30. this.Resize += DigitalArrangeFormMain_Resize;
  31. this.cmbtreevStoreName.ComboBoxTree_NodeMouseClick += cmbtreevStoreName_ComboBoxTree_NodeMouseClick;
  32. this.dgvData.ColumnHeaderMouseClick += dgvData_ColumnHeaderMouseClick;
  33. this.dgvData.CellMouseDown += dgvData_CellMouseDown;
  34. this.dgvData.CellClick += dgvData_CellClick;
  35. this.dgvData.CellMouseDoubleClick += dgvData_CellMouseDoubleClick;
  36. this.dgvData.MouseDoubleClick += dgvData_MouseDoubleClick;
  37. this.flowLayoutPanel1.Height = 34;
  38. this.ucPagerEx1.EventPaging += ucPagerEx1_EventPaging;
  39. }
  40. int ucPagerEx1_EventPaging(UCPager.EventPagingArg e)
  41. {
  42. //pageData.PageSize = LYFZ.BLL.BLL_SystemGlobalSetting.SysTemGlobalSetMoel.ReportFormPageSize;
  43. this.ucPagerEx1.PageSize = LYFZ.BLL.BLL_SystemGlobalSetting.SysTemGlobalSetMoel.ReportFormPageSize;
  44. PublicFunctionRows();
  45. return ucPagerEx1.NMax;
  46. }
  47. public void BindPageData(int pageIndx, int pageSize, int totalCount)
  48. {
  49. ucPagerEx1.NMax = totalCount;
  50. ucPagerEx1.CurrentPageCount = (pageSize);
  51. ucPagerEx1.PageCurrent = pageIndx;
  52. }
  53. /// <summary>
  54. /// 是否首次运行
  55. /// </summary>
  56. bool IsFirstRun = true;
  57. /// <summary>
  58. /// 查询条件
  59. /// </summary>
  60. private Dictionary<string, string> DictData = new Dictionary<string, string>();
  61. /// <summary>
  62. /// 员工编号
  63. /// </summary>
  64. string StrUserID = LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.LoginUserModel.User_EmployeeID;
  65. /// <summary>
  66. /// 窗体加载事件
  67. /// </summary>
  68. /// <param name="sender"></param>
  69. /// <param name="e"></param>
  70. void DigitalArrangeFormMain_Shown(object sender, EventArgs e)
  71. {
  72. LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.BindGroupStoreName(this.cmbtreevStoreName, StrGroupKeyCode: "retailProcess", StrKeyCode: "st014");
  73. this.PublicFunctionRights();
  74. //this.PublicFunctionRows();
  75. this.ucPagerEx1.PageCurrent = 1;
  76. this.ucPagerEx1.Bind();
  77. this.IsFirstRun = false;
  78. this.DigitalArrangeFormMain_Resize(this, null);
  79. //数码安排版本权限
  80. bool b = LYFZ.Software.MainBusiness.VersionControl.StaticVersion.UIFunctionVersion(
  81. VersionControl.VersionFunctionEnum.订单数码安排数码安排);
  82. if(!b)
  83. {
  84. this.Close();
  85. }
  86. }
  87. /// <summary>
  88. /// 窗体加载事件
  89. /// </summary>
  90. /// <param name="sender"></param>
  91. /// <param name="e"></param>
  92. void DigitalArrangeFormMain_Load(object sender, EventArgs e)
  93. {
  94. LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetSystemVersion(this.chkPortraitVersion, this.chkDressVersion, this.chkKidsVersion);
  95. }
  96. /// <summary>
  97. /// 选择分店获取权限
  98. /// </summary>
  99. void PublicFunctionRights()
  100. {
  101. this.btnAnPaiWork.Enabled = LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetGroupStoreRights(this.cmbtreevStoreName, "StoresDigital", LYFZ.CustomAttributes.OperatingAuthority.AnPaiWork);
  102. this.btnViewAnPai.Enabled = LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetGroupStoreRights(this.cmbtreevStoreName, "StoresDigital", LYFZ.CustomAttributes.OperatingAuthority.SeeAnPaiWork);
  103. }
  104. /// <summary>
  105. /// 分店选择查询数据
  106. /// </summary>
  107. /// <param name="sender"></param>
  108. /// <param name="e"></param>
  109. void cmbtreevStoreName_ComboBoxTree_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e)
  110. {
  111. this.PublicFunctionRights();
  112. //this.PublicFunctionRows();
  113. this.ucPagerEx1.PageCurrent = 1;
  114. this.ucPagerEx1.Bind();
  115. }
  116. /// <summary>
  117. /// 回车
  118. /// </summary>
  119. /// <param name="sender"></param>
  120. /// <param name="e"></param>
  121. void cmbQueryText_KeyDown(object sender, KeyEventArgs e)
  122. {
  123. if (e.KeyCode == Keys.Enter)
  124. { this.btnQuery_Click(this, null); }
  125. }
  126. /// <summary>
  127. /// 查询
  128. /// </summary>
  129. /// <param name="sender"></param>
  130. /// <param name="e"></param>
  131. void btnQuery_Click(object sender, EventArgs e)
  132. {
  133. this.DictData.Clear();
  134. //this.PublicFunctionRows();
  135. this.ucPagerEx1.PageCurrent = 1;
  136. this.ucPagerEx1.Bind();
  137. }
  138. /// <summary>
  139. /// 条件查询
  140. /// </summary>
  141. /// <param name="sender"></param>
  142. /// <param name="e"></param>
  143. void btnConditionQuery_Click(object sender, EventArgs e)
  144. {
  145. LYFZ.Software.MainBusiness.DoorCityProcess.SetSmallForm.ConditionQueryDigitalSamllForm frm = new SetSmallForm.ConditionQueryDigitalSamllForm();
  146. frm.ShowDialog();
  147. if (frm.DictDataArray.Count > 0)
  148. {
  149. this.DictData = frm.DictDataArray;
  150. //this.PublicFunctionRows();
  151. this.ucPagerEx1.PageCurrent = 1;
  152. this.ucPagerEx1.Bind();
  153. }
  154. }
  155. /// <summary>
  156. /// 安排工作
  157. /// </summary>
  158. /// <param name="sender"></param>
  159. /// <param name="e"></param>
  160. void btnAnPaiWork_Click(object sender, EventArgs e)
  161. {
  162. if (this.dgvData.Rows.Count > 0)
  163. {
  164. if (dgvData.SelectedRows.Count > 0)
  165. {
  166. try
  167. {
  168. if (this.dgvData.CurrentRow.Cells["拍摄状态"].Value.ToString().Trim() != "OK")
  169. { MessageBoxCustom.Show("拍照流程未完成"); return; }
  170. }
  171. catch { }
  172. string strVid = "";
  173. for (int i = 0; i < dgvData.SelectedRows.Count; i++)
  174. {
  175. if (i == 0) { strVid += "'" + dgvData.SelectedRows[i].Cells["Ordv_ViceNumber"].Value.ToString().Trim() + "'"; }
  176. else
  177. { strVid += ",'" + dgvData.SelectedRows[i].Cells["Ordv_ViceNumber"].Value.ToString().Trim() + "'"; }
  178. }
  179. LYFZ.Software.MainBusiness.DoorCityProcess.SetSmallForm.AnPaiWorkSmallForm frm = new SetSmallForm.AnPaiWorkSmallForm();
  180. frm.StrViceNumber = strVid;
  181. frm.ShowDialog();
  182. if (frm.IsSave == true)
  183. {
  184. //this.PublicFunctionRows();
  185. this.ucPagerEx1.PageCurrent = 1;
  186. this.ucPagerEx1.Bind();
  187. }
  188. }
  189. else { MessageBoxCustom.Show("请选择订单"); }
  190. }
  191. }
  192. /// <summary>
  193. /// 查看安排
  194. /// </summary>
  195. /// <param name="sender"></param>
  196. /// <param name="e"></param>
  197. void btnViewAnPai_Click(object sender, EventArgs e)
  198. {
  199. LYFZ.Software.MainBusiness.DoorCityProcess.SetSmallForm.AnPaiWorkDigitalSmallForm frm = new SetSmallForm.AnPaiWorkDigitalSmallForm();
  200. frm.Text = "数码部工作安排";
  201. frm.ShowDialog();
  202. }
  203. /// <summary>
  204. /// 我的工作
  205. /// </summary>
  206. /// <param name="sender"></param>
  207. /// <param name="e"></param>
  208. void btnIWork_Click(object sender, EventArgs e)
  209. {
  210. LYFZ.Software.MainBusiness.DoorCityProcess.SetSmallForm.AnPaiWorkDigitalSmallForm frm = new SetSmallForm.AnPaiWorkDigitalSmallForm();
  211. frm.Text = "我的工作";
  212. frm.ShowDialog();
  213. }
  214. /// <summary>
  215. /// 关闭
  216. /// </summary>
  217. /// <param name="sender"></param>
  218. /// <param name="e"></param>
  219. void btnClose_Click(object sender, EventArgs e)
  220. { this.Close(); }
  221. /// <summary>
  222. /// 数据列表列双击事件
  223. /// </summary>
  224. /// <param name="sender"></param>
  225. /// <param name="e"></param>
  226. void dgvData_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e)
  227. {
  228. if (this.dgvData.Rows.Count > 0)
  229. {
  230. if (e.RowIndex != -1 && e.ColumnIndex != -1)
  231. {
  232. if (LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetGroupStoreRights(this.cmbtreevStoreName, "StoresDigital", LYFZ.CustomAttributes.OperatingAuthority.AnPaiWork))
  233. { this.btnAnPaiWork_Click(null, null); }
  234. }
  235. }
  236. }
  237. /// <summary>
  238. /// 儿童版
  239. /// </summary>
  240. /// <param name="sender"></param>
  241. /// <param name="e"></param>
  242. void chkKidsVersion_Click(object sender, EventArgs e)
  243. {
  244. if (this.chkKidsVersion.Checked)
  245. { this.chkPortraitVersion.Checked = false; this.chkKidsVersion.Checked = true; this.chkDressVersion.Checked = false; }
  246. this.cmbQueryText.Text = "";
  247. //this.PublicFunctionRows();
  248. this.ucPagerEx1.PageCurrent = 1;
  249. this.ucPagerEx1.Bind();
  250. }
  251. /// <summary>
  252. /// 婚纱版
  253. /// </summary>
  254. /// <param name="sender"></param>
  255. /// <param name="e"></param>
  256. void chkDressVersion_Click(object sender, EventArgs e)
  257. {
  258. if (this.chkDressVersion.Checked)
  259. { this.chkPortraitVersion.Checked = false; this.chkDressVersion.Checked = true; this.chkKidsVersion.Checked = false; }
  260. this.cmbQueryText.Text = "";
  261. //this.PublicFunctionRows();
  262. this.ucPagerEx1.PageCurrent = 1;
  263. this.ucPagerEx1.Bind();
  264. }
  265. /// <summary>
  266. /// 写真版
  267. /// </summary>
  268. /// <param name="sender"></param>
  269. /// <param name="e"></param>
  270. void chkPortraitVersion_Click(object sender, EventArgs e)
  271. {
  272. if (this.chkPortraitVersion.Checked)
  273. { this.chkPortraitVersion.Checked = true; this.chkDressVersion.Checked = false; this.chkKidsVersion.Checked = false; }
  274. this.cmbQueryText.Text = "";
  275. //this.PublicFunctionRows();
  276. this.ucPagerEx1.PageCurrent = 1;
  277. this.ucPagerEx1.Bind();
  278. }
  279. /// <summary>
  280. /// 完成订单
  281. /// </summary>
  282. /// <param name="sender"></param>
  283. /// <param name="e"></param>
  284. void chkShowCompleteOrder_Click(object sender, EventArgs e)
  285. {
  286. //this.PublicFunctionRows();
  287. this.ucPagerEx1.PageCurrent = 1;
  288. this.ucPagerEx1.Bind();
  289. }
  290. /// <summary>
  291. /// 窗体大小发生改变事件
  292. /// </summary>
  293. /// <param name="sender"></param>
  294. /// <param name="e"></param>
  295. void DigitalArrangeFormMain_Resize(object sender, EventArgs e)
  296. {
  297. if (!this.IsFirstRun)
  298. {
  299. switch (this.chkShowCompleteOrder.Location.Y)
  300. {
  301. case 4: this.flowLayoutPanel1.Height = 36; break;
  302. case 36: this.flowLayoutPanel1.Height = 68; break;
  303. }
  304. }
  305. }
  306. /// <summary>
  307. /// 右键菜单
  308. /// </summary>
  309. /// <param name="sender"></param>
  310. /// <param name="e"></param>
  311. void dgvData_CellMouseDown(object sender, DataGridViewCellMouseEventArgs e)
  312. {
  313. if (e.Button == MouseButtons.Right)
  314. {
  315. if (e.RowIndex >= 0 && e.ColumnIndex >= 0)
  316. {
  317. ToolStripMenuItem item = new ToolStripMenuItem();
  318. Hashtable htData = new Hashtable();
  319. htData["StrNumber"] = this.dgvData.Rows[e.RowIndex].Cells["Ord_Number"].Value.ToString().Trim();
  320. htData["StrViceNumber"] = this.dgvData.Rows[e.RowIndex].Cells["Ordv_ViceNumber"].Value.ToString().Trim();
  321. item.Text = "订单备注";
  322. item.Tag = htData;
  323. item.Name = "OrderRemark";
  324. this.dgvData.conMenu.Items.Add(item);
  325. // this.dgvData.conMenu.Show(MousePosition.X, MousePosition.Y);//弹出操作菜单
  326. this.dgvData.conMenu.ItemClicked -= dgvData_DataGridViewConMenu_ItemClicked;
  327. this.dgvData.conMenu.ItemClicked += dgvData_DataGridViewConMenu_ItemClicked;
  328. // this.dgvData.conMenu.Show();
  329. if (!this.dgvData.conMenu.Visible)
  330. {
  331. this.dgvData.conMenu.Show(MousePosition.X, MousePosition.Y);//弹出操作菜单
  332. }
  333. }
  334. else
  335. {
  336. this.dgvData.conMenu.Items.Clear();
  337. ToolStripMenuItem item = new ToolStripMenuItem();
  338. item.Text = "设置标题";
  339. item.Tag = "SetColumnShow";
  340. item.Name = "SetColumnShow";
  341. this.dgvData.conMenu.Items.Add(item);
  342. // this.dgvData.conMenu.Show(MousePosition.X, MousePosition.Y);//弹出操作菜单
  343. this.dgvData.conMenu.ItemClicked -= dgvData_DataGridViewConMenu_ItemClicked;
  344. this.dgvData.conMenu.ItemClicked += dgvData_DataGridViewConMenu_ItemClicked;
  345. //this.dgvData.conMenu.Show();
  346. if (!this.dgvData.conMenu.Visible)
  347. {
  348. this.dgvData.conMenu.Show(MousePosition.X, MousePosition.Y);//弹出操作菜单
  349. }
  350. }
  351. }
  352. }
  353. /// <summary>
  354. /// 列表单击事件
  355. /// </summary>
  356. /// <param name="sender"></param>
  357. /// <param name="e"></param>
  358. void dgvData_CellClick(object sender, DataGridViewCellEventArgs e)
  359. {
  360. try
  361. {
  362. string StrNumber = this.dgvData.CurrentRow.Cells["订单号"].Value.ToString().Trim();
  363. if (string.IsNullOrEmpty(StrNumber) || StrNumber.Trim() == "(取件OK)")
  364. {
  365. bool IsFind = false;
  366. int i = this.dgvData.CurrentRow.Index;
  367. while (!IsFind)
  368. {
  369. i = i - 1;
  370. if (!string.IsNullOrEmpty(this.dgvData.Rows[i].Cells["订单号"].Value.ToString().Trim()))
  371. { StrNumber = this.dgvData.Rows[i].Cells["订单号"].Value.ToString().Trim(); IsFind = true; }
  372. }
  373. }
  374. LYFZ.BLL.BLL_ErpOrder.CurrentSelectedOrderNumber = StrNumber;
  375. }
  376. catch
  377. { }
  378. }
  379. /// <summary>
  380. /// 对列表控件双击事件
  381. /// </summary>
  382. /// <param name="sender"></param>
  383. /// <param name="e"></param>
  384. void dgvData_MouseDoubleClick(object sender, MouseEventArgs e)
  385. {
  386. Point hit = this.dgvData.PointToClient(Cursor.Position);
  387. DataGridView.HitTestInfo hitTest = this.dgvData.HitTest(hit.X, hit.Y);
  388. if (hitTest.RowIndex < 0 && hitTest.ColumnIndex < 0)
  389. {
  390. if (!string.IsNullOrEmpty(this.cmbQueryText.Text.Trim()))
  391. {
  392. LYFZ.BLL.BLL_ErpOrder.CurrentSelectedOrderNumber = "";
  393. this.cmbQueryText.Text = "";
  394. //this.PublicFunctionRows();
  395. this.ucPagerEx1.PageCurrent = 1;
  396. this.ucPagerEx1.Bind();
  397. }
  398. }
  399. }
  400. /// <summary>
  401. /// 右键菜单选择项事件
  402. /// </summary>
  403. /// <param name="sender"></param>
  404. /// <param name="e"></param>
  405. void dgvData_DataGridViewConMenu_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
  406. {
  407. ToolStripItem item = e.ClickedItem;
  408. if (item.Name.Trim() == "SetColumnShow")
  409. {
  410. if (LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ShowDataGridViewSetColumn(this.dgvData))
  411. {
  412. //this.PublicFunctionRows();
  413. this.ucPagerEx1.PageCurrent = 1;
  414. this.ucPagerEx1.Bind();
  415. }
  416. }
  417. else if (item.Name.ToString().Trim() == "OrderRemark")
  418. {
  419. Hashtable htData = (Hashtable)item.Tag;
  420. LYFZ.Software.MainBusiness.DoorCityProcess.SuperSmallForm.OrderRemarkRecordAddSuperSmallForm frm = new SuperSmallForm.OrderRemarkRecordAddSuperSmallForm();
  421. frm.StrOrderNumber = htData["StrNumber"].ToString().Trim();
  422. frm.StrOrdViceNumber = htData["StrViceNumber"].ToString().Trim();
  423. frm.StrOrdModuleName = LYFZ.EnumPublic.EnumOrderRemarkModule.数码安排.ToString().Trim();
  424. frm.ShowDialog();
  425. }
  426. }
  427. /// <summary>
  428. /// 点击列标头排序
  429. /// </summary>
  430. /// <param name="sender"></param>
  431. /// <param name="e"></param>
  432. void dgvData_ColumnHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e)
  433. {
  434. if (e.Button == MouseButtons.Left)
  435. {
  436. string StrColumnName = GetOrderByName(this.dgvData.Columns[e.ColumnIndex].Name.Trim());
  437. if (StrColumnName == this.StrCurrentClickField || string.IsNullOrEmpty(this.StrCurrentClickField))
  438. {
  439. if (this.StrSortOrder == "ASC")
  440. { this.StrSortOrder = "DESC"; }
  441. else
  442. { this.StrSortOrder = "ASC"; }
  443. }
  444. else
  445. { this.StrSortOrder = "DESC"; }
  446. if (this.dgvData.StrValueNullColumn.Trim().IndexOf(StrColumnName) == -1 || StrColumnName.Trim() == "欠款" || StrColumnName.Trim() == "套系金额")
  447. { this.StrSortField = StrColumnName + " " + this.StrSortOrder + ",Ord_CreateDateTime,Ordv_DigitalNumber"; }
  448. else
  449. { this.StrSortField = "Ord_CreateDateTime " + this.StrSortOrder + ",Ordv_DigitalNumber"; }
  450. this.StrCurrentClickField = StrColumnName;
  451. //this.PublicFunctionRows();
  452. this.ucPagerEx1.PageCurrent = 1;
  453. this.ucPagerEx1.Bind();
  454. }
  455. }
  456. string GetOrderByName(string StrColumnName)
  457. {
  458. switch (StrColumnName)
  459. {
  460. case "订单号": return "Ord_SinceOrderNumber";
  461. case "客户姓名": return "Cus_Name";
  462. case "客户性别": return "Cus_Sex_cs";
  463. case "客户电话": return "Cus_Telephone";
  464. case "订单类型": return "Ord_Type";
  465. case "接单人": return "Ord_OrderPersonName";
  466. case "套系名称": return "Ord_SeriesName";
  467. case "套系价格": return "Ord_SeriesPrice";
  468. case "加急": return "IsExpedited";
  469. case "加急日期": return "ExpeditedTime";
  470. case "拍摄名称": return "Ordpg_Sights";
  471. case "初修状态": return "Ordv_EarlyRepairStatus";
  472. case "选片状态": return "Ordv_FilmSelectionStatus";
  473. case "精修状态": return "Ordv_RefinementStatus";
  474. case "精修日期": return "Ordv_RefinementTime";
  475. case "设计状态": return "Ordv_DesignerStatus";
  476. case "设计师": return "Ordv_DesignerName";
  477. case "设计日期": return "Ordv_DesignerTime";
  478. case "看版师": return "Ordv_LookDesignName";
  479. case "看版日期": return "Ordv_LookDesignTime";
  480. case "看版状态": return "Ordv_LookDesignStatus";
  481. case "看版要求": return "Ordv_LookDesignClaim";
  482. case "取件状态": return "Ords_ProductPickupIntStatus";
  483. case "会员卡号": return "Mc_CradNumber";
  484. case "拍照状态": return "Ordpg_PhotographyStatus";
  485. case "选片时间": return "Ordv_FilmSelectionTime";
  486. case "拍摄时间": return "Ordpg_PhotographyTime";
  487. case "是否完成": return "Ords_ProductCompletedIntStatus";
  488. case "商品名称": return "OPlist_ProdName";
  489. case "预约取件日期": return "OPlist_ReservationTakeTime";
  490. case "商品取走日期": return "OPlist_PickupTime";
  491. case "是否发出": return "OPlist_SendVendor";
  492. case "商品完成状态": return "OPlist_CompletedStatus";
  493. case "是否取走": return "OPlist_PickupStatus";
  494. default: return "";
  495. }
  496. }
  497. /// <summary>
  498. /// 当前点击的字段
  499. /// </summary>
  500. string StrCurrentClickField = "";
  501. /// <summary>
  502. /// 排序字段
  503. /// </summary>
  504. string StrSortField = "Ord_CreateDateTime DESC,Ordv_DigitalNumber";
  505. /// <summary>
  506. /// 排序顺序
  507. /// </summary>
  508. string StrSortOrder = "DESC";
  509. /// <summary>
  510. /// 创建行
  511. /// </summary>
  512. void PublicFunctionRows()
  513. {
  514. this.dgvData.dgvCurrentColumnOriginalSet = "Ord_Number,Ordv_ViceNumber,订单号,客户姓名,客户性别,客户电话,婚期,订单类型,接单人,套系名称,套系价格,加急,加急日期,拍摄名称,拍照状态,初修状态,初修日期,选片状态,选片日期,精修状态,精修日期,设计状态,设计日期,看版状态,看版日期,取件状态,会员卡号";
  515. string StrGuidName = LYFZ.EnumPublic.dgvGuidName.E_FormAll_A0009.ToString().Trim();
  516. if ((LYFZ.BLL.BLL_SystemGlobalSetting.SysTemGlobalSetMoel.MemberCardShowHide))
  517. {
  518. this.dgvData.dgvFixedHideColumn = "Ord_Number,Ordv_ViceNumber,会员卡号";
  519. }
  520. else
  521. {
  522. this.dgvData.dgvFixedHideColumn = "Ord_Number,Ordv_ViceNumber";
  523. }
  524. this.dgvData.dgvGuidName = StrGuidName;
  525. this.dgvData.dgvUserEmployeeID = this.StrUserID;
  526. this.dgvData.StrValueNullColumn = "订单号,客户姓名,客户性别,客户电话,婚期,订单类型,接单人,套系名称,套系价格,加急,加急日期,会员卡号";
  527. this.dgvData.DataColumns(this.dgvData.dgvCurrentColumnOriginalSet, strHideField: this.dgvData.dgvFixedHideColumn);
  528. Dictionary<string, string> dictColumns = LYFZ.DAL.DAL_GridViewDisplayIndex.GetGridViewShowColumns(this.StrUserID, StrGuidName, this.dgvData.dgvCurrentColumnOriginalSet);
  529. this.dgvData.dictShowColumName = dictColumns;
  530. string StrQueryCondition = "";
  531. if (IsFirstRun && !string.IsNullOrEmpty(LYFZ.BLL.BLL_ErpOrder.CurrentSelectedOrderNumber))
  532. {
  533. string StrWhere = " Where (Ordpg_PhotographyStatus in (1,2) or Ordv_EarlyRepairStatus in ('1','2')) And Ord_Class = '1' And Ord_SinceOrderNumber = '" + LYFZ.BLL.BLL_ErpOrder.CurrentSelectedOrderNumber + "'" + LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetVersionQuerySQL(this.chkPortraitVersion, this.chkDressVersion, this.chkKidsVersion, StrOrdType: "0,1,2");
  534. this.cmbQueryText.Text = LYFZ.BLL.BLL_ErpOrder.CurrentSelectedOrderNumber;
  535. StrQueryCondition = StrWhere + LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetGroupQueryOrderClickWhere(this.cmbtreevStoreName, "Ord_DividedShop");
  536. }
  537. else
  538. { StrQueryCondition = this.GetWhereStr(); }
  539. int intTopCount = LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.GetPageSize();
  540. Hashtable htData = LYFZ.ComponentLibrary.DataGridOrderView.GetData_OrderDigitalArrange(this.dgvData, dictColumns, StrQueryCondition, intTopCount, this.StrSortField, ucPagerEx1.PageCurrent);
  541. this.dataGridViewStatisticsCount1.LocationX = this.dgvData.RowHeadersWidth;
  542. this.dataGridViewStatisticsCount1.CurrenQuantity = Convert.ToInt32(htData["CurrentCount"]);
  543. this.dataGridViewStatisticsCount1.TotalQuantity = Convert.ToInt32(htData["TotalCount"]);
  544. BindPageData(ucPagerEx1.PageCurrent, Convert.ToInt32(htData["CurrentCount"]), Convert.ToInt32(htData["TotalCount"]));
  545. }
  546. /// <summary>
  547. /// 返回要操作的条件
  548. /// </summary>
  549. /// <returns></returns>
  550. string GetWhereStr()
  551. {
  552. string StrWhere = " Where (Ordpg_PhotographyStatus in (1,2) or Ordv_EarlyRepairStatus in ('1','2')) And Ord_Class = '1' " + LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetGroupQueryWhere(this.cmbtreevStoreName, "Ord_DividedShop");
  553. if (this.cmbQueryText.Text.Trim().Length > 0)
  554. { StrWhere += LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetQueryTextQueryCondition(this.cmbQueryText.Text.Trim()); }
  555. else
  556. {
  557. if (DictData.ContainsKey("PhotographyStatus") && DictData["PhotographyStatus"].Trim().Length > 0)
  558. { StrWhere += " and Ordpg_PhotographyStatus = '" + DictData["PhotographyStatus"].Trim() + "'"; }
  559. if (DictData.ContainsKey("EarlyRepairStatus") && DictData["EarlyRepairStatus"].Trim().Length > 0)
  560. { StrWhere += " and Ordv_EarlyRepairStatus = '" + DictData["EarlyRepairStatus"].Trim() + "'"; }
  561. if (DictData.ContainsKey("FilmSelectionStatus") && DictData["FilmSelectionStatus"].Trim().Length > 0)
  562. { StrWhere += " and Ordv_FilmSelectionStatus = '" + DictData["FilmSelectionStatus"].Trim() + "'"; }
  563. if (DictData.ContainsKey("RefinementStatus") && DictData["RefinementStatus"].Trim().Length > 0)
  564. { StrWhere += " and Ordv_RefinementStatus = '" + DictData["RefinementStatus"].Trim() + "'"; }
  565. if (DictData.ContainsKey("DesignStatus") && DictData["DesignStatus"].Trim().Length > 0)
  566. { StrWhere += " and Ordv_DesignerStatus = '" + DictData["DesignStatus"].Trim() + "'"; }
  567. if (DictData.ContainsKey("LookDesignStatus") && DictData["LookDesignStatus"].Trim().Length > 0)
  568. { StrWhere += " and Ordv_LookDesignStatus = '" + DictData["LookDesignStatus"].Trim() + "'"; }
  569. if (this.chkShowCompleteOrder.Checked)
  570. { StrWhere += " And Ords_ProductPickupIntStatus = 2"; }
  571. else
  572. { StrWhere += " And Ords_ProductPickupIntStatus in (0,1)"; }
  573. StrWhere += LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetVersionQuerySQL(this.chkPortraitVersion, this.chkDressVersion, this.chkKidsVersion, StrOrdType: "0,1,2");
  574. if (DictData.ContainsKey("FilmSelectionStartDateTime") && DictData["FilmSelectionStartDateTime"].Length > 0 && DictData.ContainsKey("FilmSelectionEndDateTime") && DictData["FilmSelectionEndDateTime"].Length > 0)
  575. { StrWhere += LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetDateTime("isnull(Ordv_FilmSelectionTime,Ordv_ReservationFilmSelectionTime)", DictData["FilmSelectionStartDateTime"], DictData["FilmSelectionEndDateTime"]); }
  576. if (DictData.ContainsKey("LookDesignStartDateTime") && DictData["LookDesignStartDateTime"].Length > 0 && DictData.ContainsKey("LookDesignEndDateTime") && DictData["LookDesignEndDateTime"].Length > 0)
  577. { StrWhere += LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetDateTime("isnull(Ordv_LookDesignTime,Ordv_ReservationLookDesignTime)", DictData["LookDesignStartDateTime"].Trim(), DictData["LookDesignEndDateTime"].Trim()); }
  578. }
  579. return StrWhere;
  580. }
  581. }
  582. }