TotakePieceFormMain.cs 47 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971
  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. using LYFZ.Software.MainBusiness.DoorCityProcess.SetSmallForm;
  12. namespace LYFZ.Software.MainBusiness.DoorCityProcess
  13. {
  14. public partial class TotakePieceFormMain : LYFZ.Software.UI.DoorCityProcess.TotakePieceFormMain
  15. {
  16. public TotakePieceFormMain()
  17. {
  18. this.Shown += TotakePieceFormMain_Shown;
  19. this.Load += TotakePieceFormMain_Load;
  20. this.cmbtreevStoreName.ComboBoxTree_NodeMouseClick += cmbtreevStoreName_ComboBoxTree_NodeMouseClick;
  21. this.cmbQueryText.KeyDown += cmbQueryText_KeyDown;
  22. this.btnQuery.Click += btnQuery_Click;
  23. this.btnQueryCompleted.Click += btnQueryCompleted_Click;
  24. this.btnRecentPickup.Click += btnRecentPickup_Click;
  25. this.btnHairPiecePickData.Click += btnHairPiecePickData_Click;
  26. this.btnMonthPieces.Click += btnMonthPieces_Click;
  27. this.btnNotAlreadySentBack.Click += btnNotAlreadySentBack_Click;
  28. this.btnMonthRework.Click += btnMonthRework_Click;
  29. this.btnClose.Click += btnClose_Click;
  30. this.chkDressVersion.Click += chkDressVersion_Click;
  31. this.chkKidsVersion.Click += chkKidsVersion_Click;
  32. this.chkPortraitVersion.Click += chkPortraitVersion_Click;
  33. this.Resize += TotakePieceFormMain_Resize;
  34. this.btnByVendorSendOutProduct.Click += btnByVendorSendOutProduct_Click;
  35. this.btnByVendorBackPieceProduct.Click += btnByVendorBackPieceProduct_Click;
  36. this.btnPrintBarcode.Click += btnPrintBarcode_Click;
  37. this.btnScanCodeBackPiece.Click += btnScanCodeBackPiece_Click;
  38. this.btnScanCodeTakePickup.Click += btnScanCodeTakePickup_Click;
  39. this.chkWeddingCelebration.Click += chkWeddingCelebration_Click;
  40. this.dgvData.CellMouseDown += dgvData_CellMouseDown;
  41. this.dgvData.CellClick += dgvData_CellClick;
  42. this.dgvData.CellMouseDoubleClick += dgvData_CellMouseDoubleClick;
  43. this.dgvData.MouseDoubleClick += dgvData_MouseDoubleClick;
  44. this.dgvData.ColumnHeaderMouseClick += dgvData_ColumnHeaderMouseClick;
  45. this.chkShowCompleteOrder.Click += chkShowCompleteOrder_Click;
  46. this.flowLayoutPanel1.Height = 34;
  47. this.cbxDesignNotProduct.Click += cbxDesignNotProduct_Click;
  48. this.btn_ExportData.Click += btn_ExportData_Click;
  49. // 部分取件;
  50. this.cb_PartTaken.CheckedChanged += Cb_PartTaken_CheckedChanged;
  51. this.ucPagerEx1.EventPaging += ucPagerEx1_EventPaging;
  52. }
  53. int ucPagerEx1_EventPaging(UCPager.EventPagingArg e)
  54. {
  55. //pageData.PageSize = LYFZ.BLL.BLL_SystemGlobalSetting.SysTemGlobalSetMoel.ReportFormPageSize;
  56. this.ucPagerEx1.PageSize = LYFZ.BLL.BLL_SystemGlobalSetting.SysTemGlobalSetMoel.ReportFormPageSize;
  57. if (cbxDesignNotProduct.Checked)
  58. {
  59. PublicFunctionRows(" Ordv_DesignerStatus=2 and ( OPlist_SendVendor is null or OPlist_SendVendor = '' ) ");
  60. }
  61. else
  62. {
  63. PublicFunctionRows();
  64. }
  65. return ucPagerEx1.NMax;
  66. }
  67. public void BindPageData(int pageIndx, int pageSize, int totalCount)
  68. {
  69. ucPagerEx1.NMax = totalCount;
  70. ucPagerEx1.CurrentPageCount = (pageSize);
  71. ucPagerEx1.PageCurrent = pageIndx;
  72. }
  73. private void Cb_PartTaken_CheckedChanged(object sender, EventArgs e)
  74. {
  75. if ( this.cb_PartTaken.Checked == true )
  76. {
  77. // 完成取件和设计未发片 checkbox禁用;
  78. this.cbxDesignNotProduct.Checked = this.chkShowCompleteOrder.Checked = false;
  79. this.cbxDesignNotProduct.Enabled = this.chkShowCompleteOrder.Enabled = false;
  80. }
  81. else
  82. {
  83. // 完成取件和设计未发片 checkbox启用;
  84. this.cbxDesignNotProduct.Enabled = this.chkShowCompleteOrder.Enabled = true;
  85. }
  86. //PublicFunctionRows();
  87. this.ucPagerEx1.PageCurrent = 1;
  88. this.ucPagerEx1.Bind();
  89. }
  90. void btn_ExportData_Click(object sender, EventArgs e)
  91. {
  92. //throw new NotImplementedException();Ord_Number,Ordv_ViceNumber,Ord_Type,
  93. TotakePieceFormExportData exportForm = new TotakePieceFormExportData();
  94. if(exportForm.ShowDialog()== System.Windows.Forms.DialogResult.OK)
  95. {
  96. string exportType = exportForm.ExportType;
  97. switch(exportType)
  98. {
  99. case "ExportPage":
  100. this.dgvData.ExportDataTable();
  101. //MessageBoxCustom.Show("导出成功!");
  102. break;
  103. case "ExportAllData":
  104. DataTable dtData = GetPublicFunctionData();
  105. dtData.Columns.Remove("Ord_Number");
  106. dtData.Columns.Remove("Ordv_ViceNumber");
  107. dtData.Columns.Remove("Ord_Type");
  108. this.dgvData.ExportDataTable(dtData);
  109. PublicFunctionRows();
  110. //MessageBoxCustom.Show("导出成功!");
  111. break;
  112. }
  113. }
  114. }
  115. void cbxDesignNotProduct_Click(object sender, EventArgs e)
  116. {
  117. //if(cbxDesignNotProduct.Checked)
  118. //{
  119. // PublicFunctionRows(" Ordv_DesignerStatus=2 and ( OPlist_SendVendor is null or OPlist_SendVendor = '' ) ");
  120. //}
  121. //else
  122. //{
  123. // PublicFunctionRows();
  124. //}
  125. this.ucPagerEx1.PageCurrent = 1;
  126. this.ucPagerEx1.Bind();
  127. }
  128. /// <summary>
  129. /// 订单号(用于开单处跳转过来)
  130. /// </summary>
  131. public string StrOrdNumber = "";
  132. /// <summary>
  133. /// 公共查询的where语句;
  134. /// </summary>
  135. public string strPublicQueryString = "";
  136. /// <summary>
  137. /// 是否首次运行
  138. /// </summary>
  139. bool IsFirstRun = true;
  140. /// <summary>
  141. /// 查询条件
  142. /// </summary>
  143. private Dictionary<string, string> DictData = new Dictionary<string, string>();
  144. /// <summary>
  145. /// 员工编号
  146. /// </summary>
  147. string StrUserID = LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.LoginUserModel.User_EmployeeID;
  148. /// <summary>
  149. /// 窗体加载事件
  150. /// </summary>
  151. /// <param name="sender"></param>
  152. /// <param name="e"></param>
  153. void TotakePieceFormMain_Shown(object sender, EventArgs e)
  154. {
  155. ///保存意向订单的版本权限
  156. List<Control> hideControl = new List<Control>();
  157. //LYFZSS.SystemSpecterPossessed.ISystemSpecterPossessed.GetMySystemSpecter = LYFZSS.SystemSpecterType.SST_D;
  158. hideControl.Add(this.btnScanCodeBackPiece);
  159. hideControl.Add(this.btnScanCodeTakePickup);
  160. hideControl.Add(this.btnPrintBarcode);
  161. LYFZ.Software.MainBusiness.VersionControl.StaticVersion.BindVersionShowHideControl(
  162. VersionControl.VersionFunctionEnum.订单发片取件扫码回件取件, hideControl, null, null);
  163. ///保存意向订单的版本权限
  164. hideControl = new List<Control>();
  165. //LYFZSS.SystemSpecterPossessed.ISystemSpecterPossessed.GetMySystemSpecter = LYFZSS.SystemSpecterType.SST_D;
  166. hideControl.Add(this.btnByVendorSendOutProduct);
  167. hideControl.Add(this.btnByVendorBackPieceProduct);
  168. LYFZ.Software.MainBusiness.VersionControl.StaticVersion.BindVersionShowHideControl(
  169. VersionControl.VersionFunctionEnum.订单发片取件按厂家发片回件, hideControl, null, null);
  170. LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.BindGroupStoreName(this.cmbtreevStoreName, StrGroupKeyCode: "retailProcess", StrKeyCode: "st013");
  171. this.PublicFunctionRights();
  172. //this.PublicFunctionRows();
  173. this.ucPagerEx1.PageCurrent = 1;
  174. this.ucPagerEx1.Bind();
  175. this.IsFirstRun = false;
  176. this.TotakePieceFormMain_Resize(this, null);
  177. }
  178. /// <summary>
  179. /// 窗体加载事件
  180. /// </summary>
  181. /// <param name="sender"></param>
  182. /// <param name="e"></param>
  183. void TotakePieceFormMain_Load(object sender, EventArgs e)
  184. {
  185. LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetSystemVersion(this.chkPortraitVersion, this.chkDressVersion, this.chkKidsVersion);
  186. this.cmbQueryText.Text = this.StrOrdNumber;
  187. }
  188. /// <summary>
  189. /// 选择分店获取权限
  190. /// </summary>
  191. void PublicFunctionRights()
  192. {
  193. this.btnMonthPieces.Enabled = LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetGroupStoreRights(this.cmbtreevStoreName, "StoresTotakePiece", LYFZ.CustomAttributes.OperatingAuthority.TotakePiece);
  194. this.btnNotAlreadySentBack.Enabled = LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetGroupStoreRights(this.cmbtreevStoreName, "StoresTotakePiece", LYFZ.CustomAttributes.OperatingAuthority.TotakePieceSentNotBack);
  195. this.btnMonthRework.Enabled = LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetGroupStoreRights(this.cmbtreevStoreName, "StoresTotakePiece", LYFZ.CustomAttributes.OperatingAuthority.TotakePieceMonthRework);
  196. }
  197. /// <summary>
  198. /// 分店选择查询数据
  199. /// </summary>
  200. /// <param name="sender"></param>
  201. /// <param name="e"></param>
  202. void cmbtreevStoreName_ComboBoxTree_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e)
  203. {
  204. this.PublicFunctionRights();
  205. //this.PublicFunctionRows();
  206. this.ucPagerEx1.PageCurrent = 1;
  207. this.ucPagerEx1.Bind();
  208. }
  209. /// <summary>
  210. /// 回车
  211. /// </summary>
  212. /// <param name="sender"></param>
  213. /// <param name="e"></param>
  214. void cmbQueryText_KeyDown(object sender, KeyEventArgs e)
  215. {
  216. if (e.KeyCode == Keys.Enter)
  217. { this.btnQuery_Click(this, null); }
  218. }
  219. /// <summary>
  220. /// 查询
  221. /// </summary>
  222. /// <param name="sender"></param>
  223. /// <param name="e"></param>
  224. void btnQuery_Click(object sender, EventArgs e)
  225. {
  226. this.DictData.Clear();
  227. //this.PublicFunctionRows();
  228. this.ucPagerEx1.PageCurrent = 1;
  229. this.ucPagerEx1.Bind();
  230. }
  231. /// <summary>
  232. /// 查询完成
  233. /// </summary>
  234. /// <param name="sender"></param>
  235. /// <param name="e"></param>
  236. void btnQueryCompleted_Click(object sender, EventArgs e)
  237. {
  238. this.DictData.Clear();
  239. this.DictData["IsComplete"] = "True";
  240. //this.PublicFunctionRows();
  241. this.ucPagerEx1.PageCurrent = 1;
  242. this.ucPagerEx1.Bind();
  243. }
  244. /// <summary>
  245. /// 条件查询
  246. /// </summary>
  247. /// <param name="sender"></param>
  248. /// <param name="e"></param>
  249. void btnRecentPickup_Click(object sender, EventArgs e)
  250. {
  251. this.DictData.Clear();
  252. LYFZ.Software.MainBusiness.DoorCityProcess.SetSmallForm.ConditionQueryTotakePieceSamllForm frm = new SetSmallForm.ConditionQueryTotakePieceSamllForm();
  253. frm.ShowDialog();
  254. if (frm.IsSaveed)
  255. {
  256. this.DictData = frm.DictDataArray;
  257. //this.PublicFunctionRows();
  258. this.ucPagerEx1.PageCurrent = 1;
  259. this.ucPagerEx1.Bind();
  260. }
  261. }
  262. /// <summary>
  263. /// 按厂家发片
  264. /// </summary>
  265. /// <param name="sender"></param>
  266. /// <param name="e"></param>
  267. void btnByVendorSendOutProduct_Click(object sender, EventArgs e)
  268. {
  269. LYFZ.Software.MainBusiness.DoorCityProcess.SetSmallForm.ByVendorHairPieceSetSmallForm frm = new SetSmallForm.ByVendorHairPieceSetSmallForm();
  270. frm.ShowDialog();
  271. if (frm.IsSaveed)
  272. {
  273. //this.PublicFunctionRows();
  274. this.ucPagerEx1.PageCurrent = 1;
  275. this.ucPagerEx1.Bind();
  276. }
  277. }
  278. /// <summary>
  279. /// 按厂家回片
  280. /// </summary>
  281. /// <param name="sender"></param>
  282. /// <param name="e"></param>
  283. void btnByVendorBackPieceProduct_Click(object sender, EventArgs e)
  284. {
  285. LYFZ.Software.MainBusiness.DoorCityProcess.SetSmallForm.ByVendorBackPieceSetSmallForm frm = new SetSmallForm.ByVendorBackPieceSetSmallForm();
  286. frm.ShowDialog();
  287. if (frm.IsSaveed)
  288. {
  289. //this.PublicFunctionRows();
  290. this.ucPagerEx1.PageCurrent = 1;
  291. this.ucPagerEx1.Bind();
  292. }
  293. }
  294. /// <summary>
  295. /// 打印条形码
  296. /// </summary>
  297. /// <param name="sender"></param>
  298. /// <param name="e"></param>
  299. void btnPrintBarcode_Click(object sender, EventArgs e)
  300. {
  301. LYFZ.Software.MainBusiness.DoorCityProcess.SetSmallForm.ByVendorPrintBarcodeSetSmallForm frm = new SetSmallForm.ByVendorPrintBarcodeSetSmallForm();
  302. frm.ShowDialog();
  303. }
  304. /// <summary>
  305. /// 扫码回件
  306. /// </summary>
  307. /// <param name="sender"></param>
  308. /// <param name="e"></param>
  309. void btnScanCodeBackPiece_Click(object sender, EventArgs e)
  310. {
  311. LYFZ.Software.MainBusiness.DoorCityProcess.SetSmallForm.ByVendorScanCodeSetSmallForm frm = new SetSmallForm.ByVendorScanCodeSetSmallForm();
  312. frm.ScanCodeType = 1;
  313. frm.ShowDialog();
  314. if (frm.IsSaveed)
  315. {
  316. //this.PublicFunctionRows();
  317. this.ucPagerEx1.PageCurrent = 1;
  318. this.ucPagerEx1.Bind();
  319. }
  320. }
  321. /// <summary>
  322. /// 扫码取件
  323. /// </summary>
  324. /// <param name="sender"></param>
  325. /// <param name="e"></param>
  326. void btnScanCodeTakePickup_Click(object sender, EventArgs e)
  327. {
  328. LYFZ.Software.MainBusiness.DoorCityProcess.SetSmallForm.ByVendorScanCodeSetSmallForm frm = new SetSmallForm.ByVendorScanCodeSetSmallForm();
  329. frm.ScanCodeType = 2;
  330. frm.ShowDialog();
  331. if (frm.IsSaveed)
  332. {
  333. //this.PublicFunctionRows();
  334. this.ucPagerEx1.PageCurrent = 1;
  335. this.ucPagerEx1.Bind();
  336. }
  337. }
  338. /// <summary>
  339. /// 发片取件资料
  340. /// </summary>
  341. /// <param name="sender"></param>
  342. /// <param name="e"></param>
  343. void btnHairPiecePickData_Click(object sender, EventArgs e)
  344. {
  345. if (this.dgvData.Rows.Count > 0)
  346. {
  347. if (this.dgvData.SelectedRows.Count > 0)
  348. {
  349. LYFZ.Software.MainBusiness.DoorCityProcess.SetSmallForm.HairPieceSingleSmallForm frm = new SetSmallForm.HairPieceSingleSmallForm();
  350. frm.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
  351. frm.Location = new Point(LYFZ.EnumPublic.FormLocation_X, LYFZ.EnumPublic.FormLocation_Y);
  352. frm.Size = new Size(LYFZ.EnumPublic.FormSize_Width, LYFZ.EnumPublic.FormSize_Height);
  353. Dictionary<string, string> DictDataArray = new Dictionary<string, string>();
  354. DictDataArray["ViceNumber"] = this.dgvData.CurrentRow.Cells["Ordv_ViceNumber"].Value.ToString().Trim();
  355. DictDataArray["OrdNumber"] = this.dgvData.CurrentRow.Cells["Ord_Number"].Value.ToString().Trim();
  356. DictDataArray["OrdType"] = this.dgvData.CurrentRow.Cells["Ord_Type"].Value.ToString().Trim();
  357. frm.DictDataArray = DictDataArray;
  358. frm.ShowDialog();
  359. if (frm.IsSave)
  360. {
  361. //this.PublicFunctionRows();
  362. this.ucPagerEx1.PageCurrent = 1;
  363. this.ucPagerEx1.Bind();
  364. }
  365. }
  366. else { MessageBoxCustom.Show("请选择订单"); return; }
  367. }
  368. }
  369. /// <summary>
  370. /// 数据列表双击事件-(进入发片取件资料)
  371. /// </summary>
  372. /// <param name="sender"></param>
  373. /// <param name="e"></param>
  374. void dgvData_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e)
  375. {
  376. if (this.dgvData.Rows.Count > 0)
  377. {
  378. if (e.RowIndex != -1 && e.ColumnIndex != -1)
  379. { this.btnHairPiecePickData_Click(null, null); }
  380. }
  381. }
  382. /// <summary>
  383. /// 列表单击事件
  384. /// </summary>
  385. /// <param name="sender"></param>
  386. /// <param name="e"></param>
  387. void dgvData_CellClick(object sender, DataGridViewCellEventArgs e)
  388. {
  389. try
  390. {
  391. string StrNumber = this.dgvData.CurrentRow.Cells["订单号"].Value.ToString().Trim();
  392. if (string.IsNullOrEmpty(StrNumber))
  393. {
  394. bool IsFind = false;
  395. int i = this.dgvData.CurrentRow.Index;
  396. while (!IsFind)
  397. {
  398. i = i - 1;
  399. if (!string.IsNullOrEmpty(this.dgvData.Rows[i].Cells["订单号"].Value.ToString().Trim()))
  400. { StrNumber = this.dgvData.Rows[i].Cells["订单号"].Value.ToString().Trim(); IsFind = true; }
  401. }
  402. }
  403. LYFZ.BLL.BLL_ErpOrder.CurrentSelectedOrderNumber = StrNumber;
  404. }
  405. catch
  406. { }
  407. }
  408. /// <summary>
  409. /// 对列表控件双击事件
  410. /// </summary>
  411. /// <param name="sender"></param>
  412. /// <param name="e"></param>
  413. void dgvData_MouseDoubleClick(object sender, MouseEventArgs e)
  414. {
  415. Point hit = this.dgvData.PointToClient(Cursor.Position);
  416. DataGridView.HitTestInfo hitTest = this.dgvData.HitTest(hit.X, hit.Y);
  417. if (hitTest.RowIndex < 0 && hitTest.ColumnIndex < 0)
  418. {
  419. if (!string.IsNullOrEmpty(this.cmbQueryText.Text.Trim()))
  420. {
  421. LYFZ.BLL.BLL_ErpOrder.CurrentSelectedOrderNumber = "";
  422. this.cmbQueryText.Text = "";
  423. //this.PublicFunctionRows();
  424. this.ucPagerEx1.PageCurrent = 1;
  425. this.ucPagerEx1.Bind();
  426. }
  427. }
  428. }
  429. /// <summary>
  430. /// 本月出件
  431. /// </summary>
  432. /// <param name="sender"></param>
  433. /// <param name="e"></param>
  434. void btnMonthPieces_Click(object sender, EventArgs e)
  435. {
  436. LYFZ.Software.MainBusiness.DoorCityProcess.SetSmallForm.MonthPiecesSmallForm frm = new SetSmallForm.MonthPiecesSmallForm();
  437. frm.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
  438. frm.Location = new Point(LYFZ.EnumPublic.FormLocation_X, LYFZ.EnumPublic.FormLocation_Y);
  439. frm.Size = new Size(LYFZ.EnumPublic.FormSize_Width, LYFZ.EnumPublic.FormSize_Height);
  440. frm.ShowDialog();
  441. }
  442. /// <summary>
  443. /// 已发未回
  444. /// </summary>
  445. /// <param name="sender"></param>
  446. /// <param name="e"></param>
  447. void btnNotAlreadySentBack_Click(object sender, EventArgs e)
  448. {
  449. LYFZ.Software.MainBusiness.DoorCityProcess.SetSmallForm.MonthPiecesNotBackSmallForm frm = new SetSmallForm.MonthPiecesNotBackSmallForm();
  450. frm.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
  451. frm.Location = new Point(LYFZ.EnumPublic.FormLocation_X, LYFZ.EnumPublic.FormLocation_Y);
  452. frm.Size = new Size(LYFZ.EnumPublic.FormSize_Width, LYFZ.EnumPublic.FormSize_Height);
  453. frm.Text = "已发未回";
  454. frm.ShowDialog();
  455. }
  456. /// <summary>
  457. /// 本月返工
  458. /// </summary>
  459. /// <param name="sender"></param>
  460. /// <param name="e"></param>
  461. void btnMonthRework_Click(object sender, EventArgs e)
  462. {
  463. LYFZ.Software.MainBusiness.DoorCityProcess.SetSmallForm.MonthReworkStatisticSmallForm frm = new SetSmallForm.MonthReworkStatisticSmallForm();
  464. frm.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
  465. frm.Location = new Point(LYFZ.EnumPublic.FormLocation_X, LYFZ.EnumPublic.FormLocation_Y);
  466. frm.Size = new Size(LYFZ.EnumPublic.FormSize_Width, LYFZ.EnumPublic.FormSize_Height);
  467. frm.ShowDialog();
  468. }
  469. /// <summary>
  470. /// 关闭
  471. /// </summary>
  472. /// <param name="sender"></param>
  473. /// <param name="e"></param>
  474. void btnClose_Click(object sender, EventArgs e)
  475. { this.Close(); }
  476. /// <summary>
  477. /// 儿童版
  478. /// </summary>
  479. /// <param name="sender"></param>
  480. /// <param name="e"></param>
  481. void chkKidsVersion_Click(object sender, EventArgs e)
  482. {
  483. if (this.chkKidsVersion.Checked)
  484. { this.chkPortraitVersion.Checked = false; this.chkDressVersion.Checked = false; this.chkWeddingCelebration.Checked = false; }
  485. this.cmbQueryText.Text = "";
  486. //this.PublicFunctionRows();
  487. this.ucPagerEx1.PageCurrent = 1;
  488. this.ucPagerEx1.Bind();
  489. }
  490. /// <summary>
  491. /// 婚纱版
  492. /// </summary>
  493. /// <param name="sender"></param>
  494. /// <param name="e"></param>
  495. void chkDressVersion_Click(object sender, EventArgs e)
  496. {
  497. if (this.chkDressVersion.Checked)
  498. { this.chkPortraitVersion.Checked = false; this.chkKidsVersion.Checked = false; this.chkWeddingCelebration.Checked = false; }
  499. this.cmbQueryText.Text = "";
  500. //this.PublicFunctionRows();
  501. this.ucPagerEx1.PageCurrent = 1;
  502. this.ucPagerEx1.Bind();
  503. }
  504. /// <summary>
  505. /// 写真版
  506. /// </summary>
  507. /// <param name="sender"></param>
  508. /// <param name="e"></param>
  509. void chkPortraitVersion_Click(object sender, EventArgs e)
  510. {
  511. if (this.chkPortraitVersion.Checked)
  512. { this.chkDressVersion.Checked = false; this.chkKidsVersion.Checked = false; this.chkWeddingCelebration.Checked = false; }
  513. this.cmbQueryText.Text = "";
  514. //this.PublicFunctionRows();
  515. this.ucPagerEx1.PageCurrent = 1;
  516. this.ucPagerEx1.Bind();
  517. }
  518. /// <summary>
  519. /// 婚庆
  520. /// </summary>
  521. /// <param name="sender"></param>
  522. /// <param name="e"></param>
  523. void chkWeddingCelebration_Click(object sender, EventArgs e)
  524. {
  525. if (this.chkWeddingCelebration.Checked)
  526. { this.chkPortraitVersion.Checked = false; this.chkDressVersion.Checked = false; this.chkKidsVersion.Checked = false; }
  527. this.cmbQueryText.Text = "";
  528. //this.PublicFunctionRows();
  529. this.ucPagerEx1.PageCurrent = 1;
  530. this.ucPagerEx1.Bind();
  531. }
  532. /// <summary>
  533. /// 显示已取订单
  534. /// </summary>
  535. /// <param name="sender"></param>
  536. /// <param name="e"></param>
  537. void chkShowCompleteOrder_Click(object sender, EventArgs e)
  538. {
  539. //this.PublicFunctionRows();
  540. this.ucPagerEx1.PageCurrent = 1;
  541. this.ucPagerEx1.Bind();
  542. }
  543. /// <summary>
  544. /// 窗体大小发生改变事件
  545. /// </summary>
  546. /// <param name="sender"></param>
  547. /// <param name="e"></param>
  548. void TotakePieceFormMain_Resize(object sender, EventArgs e)
  549. {
  550. if (!this.IsFirstRun)
  551. {
  552. switch (this.panelShowCompleteOrder.Location.Y)
  553. {
  554. case 4: this.flowLayoutPanel1.Height = 37; break;
  555. case 36: this.flowLayoutPanel1.Height = 68; break;
  556. case 68: this.flowLayoutPanel1.Height = 98; break;
  557. }
  558. }
  559. }
  560. /// <summary>
  561. /// 右键菜单
  562. /// </summary>
  563. /// <param name="sender"></param>
  564. /// <param name="e"></param>
  565. void dgvData_CellMouseDown(object sender, DataGridViewCellMouseEventArgs e)
  566. {
  567. if (e.Button == MouseButtons.Right)
  568. {
  569. if (e.RowIndex >= 0 && e.ColumnIndex >= 0)
  570. {
  571. ToolStripMenuItem item = new ToolStripMenuItem();
  572. Hashtable htData = new Hashtable();
  573. htData["StrNumber"] = this.dgvData.Rows[e.RowIndex].Cells["Ord_Number"].Value.ToString().Trim();
  574. htData["StrViceNumber"] = this.dgvData.Rows[e.RowIndex].Cells["Ordv_ViceNumber"].Value.ToString().Trim();
  575. item.Text = "订单备注";
  576. item.Tag = htData;
  577. item.Name = "OrderRemark";
  578. this.dgvData.conMenu.Items.Add(item);
  579. // this.dgvData.conMenu.Show(MousePosition.X, MousePosition.Y);//弹出操作菜单
  580. this.dgvData.conMenu.ItemClicked -= dgvData_DataGridViewConMenu_ItemClicked;
  581. this.dgvData.conMenu.ItemClicked += dgvData_DataGridViewConMenu_ItemClicked;
  582. // this.dgvData.conMenu.Show();
  583. if (!this.dgvData.conMenu.Visible)
  584. {
  585. this.dgvData.conMenu.Show(MousePosition.X, MousePosition.Y);//弹出操作菜单
  586. }
  587. }
  588. else
  589. {
  590. this.dgvData.conMenu.Items.Clear();
  591. ToolStripMenuItem item = new ToolStripMenuItem();
  592. item.Text = "设置标题";
  593. item.Tag = "SetColumnShow";
  594. item.Name = "SetColumnShow";
  595. this.dgvData.conMenu.Items.Add(item);
  596. //this.dgvData.conMenu.Show(MousePosition.X, MousePosition.Y);//弹出操作菜单
  597. this.dgvData.conMenu.ItemClicked -= dgvData_DataGridViewConMenu_ItemClicked;
  598. this.dgvData.conMenu.ItemClicked += dgvData_DataGridViewConMenu_ItemClicked;
  599. // this.dgvData.conMenu.Show();
  600. if (!this.dgvData.conMenu.Visible)
  601. {
  602. this.dgvData.conMenu.Show(MousePosition.X, MousePosition.Y);//弹出操作菜单
  603. }
  604. }
  605. }
  606. }
  607. /// <summary>
  608. /// 右键菜单选择项事件
  609. /// </summary>
  610. /// <param name="sender"></param>
  611. /// <param name="e"></param>
  612. void dgvData_DataGridViewConMenu_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
  613. {
  614. ToolStripItem item = e.ClickedItem;
  615. if (item.Name.Trim() == "SetColumnShow")
  616. {
  617. if (LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.ShowDataGridViewSetColumn(this.dgvData))
  618. {
  619. //this.PublicFunctionRows();
  620. this.ucPagerEx1.PageCurrent = 1;
  621. this.ucPagerEx1.Bind();
  622. }
  623. }
  624. else if (item.Name.ToString().Trim() == "OrderRemark")
  625. {
  626. Hashtable htData = (Hashtable)item.Tag;
  627. LYFZ.Software.MainBusiness.DoorCityProcess.SuperSmallForm.OrderRemarkRecordAddSuperSmallForm frm = new SuperSmallForm.OrderRemarkRecordAddSuperSmallForm();
  628. frm.StrOrderNumber = htData["StrNumber"].ToString().Trim();
  629. frm.StrOrdViceNumber = htData["StrViceNumber"].ToString().Trim();
  630. frm.StrOrdModuleName = LYFZ.EnumPublic.EnumOrderRemarkModule.发片取件.ToString().Trim();
  631. frm.ShowDialog();
  632. }
  633. }
  634. /// <summary>
  635. /// 点击列标头排序
  636. /// </summary>
  637. /// <param name="sender"></param>
  638. /// <param name="e"></param>
  639. void dgvData_ColumnHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e)
  640. {
  641. if (e.Button == MouseButtons.Left)
  642. {
  643. string StrColumnName = GetOrderByName(this.dgvData.Columns[e.ColumnIndex].Name.Trim());
  644. if (StrColumnName == this.StrCurrentClickField || string.IsNullOrEmpty(this.StrCurrentClickField))
  645. {
  646. if (this.StrSortOrder == "ASC")
  647. { this.StrSortOrder = "DESC"; }
  648. else
  649. { this.StrSortOrder = "ASC"; }
  650. }
  651. else
  652. { this.StrSortOrder = "DESC"; }
  653. if (this.dgvData.StrValueNullColumn.Trim().IndexOf(StrColumnName) == -1 || StrColumnName.Trim() == "欠款" || StrColumnName.Trim() == "套系金额")
  654. { this.StrSortField = StrColumnName + " " + this.StrSortOrder + ",Ord_CreateDateTime,Ordv_DigitalNumber,tb_ErpOrderProductList.ID"; }
  655. else
  656. { this.StrSortField = "Ord_CreateDateTime " + this.StrSortOrder + ",Ordv_DigitalNumber,tb_ErpOrderProductList.ID"; }
  657. this.StrCurrentClickField = StrColumnName;
  658. //this.PublicFunctionRows();
  659. this.ucPagerEx1.PageCurrent = 1;
  660. this.ucPagerEx1.Bind();
  661. }
  662. }
  663. string GetOrderByName(string StrColumnName)
  664. {
  665. switch (StrColumnName)
  666. {
  667. case "订单号": return "Ord_SinceOrderNumber";
  668. case "客户姓名": return "Cus_Name";
  669. case "客户性别": return "Cus_Sex_cs";
  670. case "客户电话": return "Cus_Telephone";
  671. case "订单类型": return "Ord_Type";
  672. case "接单人": return "Ord_OrderPersonName";
  673. case "套系名称": return "Ord_SeriesName";
  674. case "套系价格": return "Ord_SeriesPrice";
  675. case "加急": return "IsExpedited";
  676. case "加急日期": return "ExpeditedTime";
  677. case "拍摄名称": return "Ordpg_Sights";
  678. case "初修状态": return "Ordv_EarlyRepairStatus";
  679. case "选片状态": return "Ordv_FilmSelectionStatus";
  680. case "精修状态": return "Ordv_RefinementStatus";
  681. case "精修日期": return "Ordv_RefinementTime";
  682. case "设计状态": return "Ordv_DesignerStatus";
  683. case "设计师": return "Ordv_DesignerName";
  684. case "设计日期": return "Ordv_DesignerTime";
  685. case "看版师": return "Ordv_LookDesignName";
  686. case "看版日期": return "Ordv_LookDesignTime";
  687. case "看版状态": return "Ordv_LookDesignStatus";
  688. case "看版要求": return "Ordv_LookDesignClaim";
  689. case "取件状态": return "Ords_ProductPickupIntStatus";
  690. case "会员卡号": return "Mc_CradNumber";
  691. case "拍照状态": return "Ordpg_PhotographyStatus";
  692. case "选片时间": return "Ordv_FilmSelectionTime";
  693. case "拍摄时间": return "Ordpg_PhotographyTime";
  694. case "是否完成": return "Ords_ProductCompletedIntStatus";
  695. case "商品名称": return "OPlist_ProdName";
  696. case "预约取件日期": return "OPlist_ReservationTakeTime";
  697. case "商品取走日期": return "OPlist_PickupTime";
  698. case "是否发出": return "OPlist_SendVendor";
  699. case "商品完成状态": return "OPlist_CompletedStatus";
  700. case "是否取走": return "OPlist_PickupStatus";
  701. default: return "";
  702. }
  703. }
  704. /// <summary>
  705. /// 当前点击的字段
  706. /// </summary>
  707. string StrCurrentClickField = "";
  708. /// <summary>
  709. /// 排序字段
  710. /// </summary>
  711. string StrSortField = "Ord_CreateDateTime DESC,Ordv_DigitalNumber,tb_ErpOrderProductList.ID";
  712. /// <summary>
  713. /// 排序顺序
  714. /// </summary>
  715. string StrSortOrder = "DESC";
  716. /// <summary>
  717. /// 创建行
  718. /// </summary>
  719. void PublicFunctionRows(string sqlWhere="")
  720. {
  721. this.dgvData.dgvCurrentColumnOriginalSet = "Ord_Number,Ordv_ViceNumber,Ord_Type,订单号,客户姓名,客户性别,客户电话,订单类型,接单人,套系名称,套系价格,欠款,拍摄名称,拍摄时间,选片时间,取件状态,拍照状态,设计状态,设计师,设计日期,看版状态,看版师,看版日期,是否完成,商品名称,加急,预约取件日期,商品取走日期,是否发出,是否返工,商品完成状态,是否取走,会员卡号";
  722. string StrGuidName = LYFZ.EnumPublic.dgvGuidName.E_FormAll_A0008.ToString().Trim();
  723. if ((LYFZ.BLL.BLL_SystemGlobalSetting.SysTemGlobalSetMoel.MemberCardShowHide))
  724. {
  725. this.dgvData.dgvFixedHideColumn = "Ord_Number,Ordv_ViceNumber,会员卡号,Ord_Type";
  726. }
  727. else
  728. {
  729. this.dgvData.dgvFixedHideColumn = "Ord_Number,Ordv_ViceNumber,Ord_Type";
  730. }
  731. this.dgvData.dgvGuidName = StrGuidName;
  732. this.dgvData.dgvUserEmployeeID = this.StrUserID;
  733. this.dgvData.StrValueNullColumn = "订单号,客户姓名,客户性别,客户电话,订单类型,接单人,套系名称,套系价格,欠款,会员卡号";
  734. this.dgvData.StrSecondStageNull = "拍摄名称,取件状态,拍照状态,设计状态,设计师,设计日期,看版状态,看版师,看版日期,是否完成,拍摄时间,选片时间";
  735. this.dgvData.DataColumns(this.dgvData.dgvCurrentColumnOriginalSet, strHideField: this.dgvData.dgvFixedHideColumn);
  736. Dictionary<string, string> dictColumns = LYFZ.DAL.DAL_GridViewDisplayIndex.GetGridViewShowColumns(this.StrUserID, StrGuidName, this.dgvData.dgvCurrentColumnOriginalSet);
  737. if (!dictColumns.ContainsKey("Ord_Type"))
  738. {
  739. dictColumns.Add("Ord_Type", "100");
  740. }
  741. this.dgvData.dictShowColumName = dictColumns;
  742. string StrQueryCondition = "";
  743. if (IsFirstRun && !string.IsNullOrEmpty(LYFZ.BLL.BLL_ErpOrder.CurrentSelectedOrderNumber))
  744. {
  745. string StrWhere = " Where Ord_SinceOrderNumber = '" +
  746. LYFZ.BLL.BLL_ErpOrder.CurrentSelectedOrderNumber +
  747. "' and Ords_ProductPickupIntStatus != '2' " +
  748. LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetVersionQuerySQL(
  749. this.chkPortraitVersion,
  750. this.chkDressVersion,
  751. this.chkKidsVersion,
  752. chkWeddingCelebration: this.chkWeddingCelebration,
  753. StrOrdType: "0,1,2,3,4");
  754. this.cmbQueryText.Text = LYFZ.BLL.BLL_ErpOrder.CurrentSelectedOrderNumber;
  755. StrQueryCondition = StrWhere + LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetGroupQueryOrderClickWhere(this.cmbtreevStoreName, "Ord_DividedShop");
  756. }
  757. else
  758. {
  759. StrQueryCondition = this.GetWhereStr();
  760. }
  761. if (!string.IsNullOrEmpty(sqlWhere))
  762. {
  763. if (!string.IsNullOrEmpty(StrQueryCondition))
  764. {
  765. StrQueryCondition += " and " + sqlWhere;
  766. }
  767. else
  768. {
  769. StrQueryCondition += " where " + sqlWhere;
  770. }
  771. }
  772. int intTopCount = LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.GetPageSize();
  773. List<string> listColumns = new List<string>(StrSortField.Replace(" DESC", "").Replace(" ASC", "").Split(','));
  774. if (this.cb_PartTaken.Checked == true)
  775. {
  776. Hashtable htData = LYFZ.ComponentLibrary.DataGridOrderView.GetData_OrderPartTakenPiece(this.dgvData, dictColumns, listColumns, StrQueryCondition, strPublicQueryString, intTopCount, this.StrSortField, ucPagerEx1.PageCurrent);
  777. this.dataGridViewStatisticsCount1.LocationX = this.dgvData.RowHeadersWidth;
  778. this.dataGridViewStatisticsCount1.CurrenQuantity = Convert.ToInt32(htData["CurrentCount"]);
  779. this.dataGridViewStatisticsCount1.TotalQuantity = Convert.ToInt32(htData["TotalCount"]);
  780. //BindPageData(ucPagerEx1.PageCurrent, Convert.ToInt32(htData["CurrentCount"]), Convert.ToInt32(htData["TotalCount"]));
  781. }
  782. else
  783. {
  784. Hashtable htData = LYFZ.ComponentLibrary.DataGridOrderView.GetData_OrderTotakePiece(this.dgvData, dictColumns, listColumns, StrQueryCondition, intTopCount, this.StrSortField, ucPagerEx1.PageCurrent);
  785. this.dataGridViewStatisticsCount1.LocationX = this.dgvData.RowHeadersWidth;
  786. this.dataGridViewStatisticsCount1.CurrenQuantity = Convert.ToInt32(htData["CurrentCount"]);
  787. this.dataGridViewStatisticsCount1.TotalQuantity = Convert.ToInt32(htData["TotalCount"]);
  788. BindPageData(ucPagerEx1.PageCurrent, Convert.ToInt32(htData["CurrentCount"]), Convert.ToInt32(htData["TotalCount"]));
  789. }
  790. }
  791. DataTable GetPublicFunctionData(string sqlWhere = "")
  792. {
  793. this.dgvData.dgvCurrentColumnOriginalSet = "Ord_Number,Ordv_ViceNumber,Ord_Type,订单号,客户姓名,客户性别,客户电话,订单类型,接单人,套系名称,套系价格,欠款,拍摄名称,拍摄时间,选片时间,取件状态,拍照状态,设计状态,设计师,设计日期,看版状态,看版师,看版日期,是否完成,商品名称,加急,预约取件日期,商品取走日期,是否发出,是否返工,商品完成状态,是否取走,会员卡号";
  794. string StrGuidName = LYFZ.EnumPublic.dgvGuidName.E_FormAll_A0008.ToString().Trim();
  795. if ((LYFZ.BLL.BLL_SystemGlobalSetting.SysTemGlobalSetMoel.MemberCardShowHide))
  796. {
  797. this.dgvData.dgvFixedHideColumn = "Ord_Number,Ordv_ViceNumber,会员卡号,Ord_Type";
  798. }
  799. else
  800. {
  801. this.dgvData.dgvFixedHideColumn = "Ord_Number,Ordv_ViceNumber,Ord_Type";
  802. }
  803. this.dgvData.dgvGuidName = StrGuidName;
  804. this.dgvData.dgvUserEmployeeID = this.StrUserID;
  805. this.dgvData.StrValueNullColumn = "订单号,客户姓名,客户性别,客户电话,订单类型,接单人,套系名称,套系价格,欠款,会员卡号";
  806. this.dgvData.StrSecondStageNull = "拍摄名称,取件状态,拍照状态,设计状态,设计师,设计日期,看版状态,看版师,看版日期,是否完成,,拍摄时间,选片时间";
  807. this.dgvData.DataColumns(this.dgvData.dgvCurrentColumnOriginalSet, strHideField: this.dgvData.dgvFixedHideColumn);
  808. Dictionary<string, string> dictColumns = LYFZ.DAL.DAL_GridViewDisplayIndex.GetGridViewShowColumns(this.StrUserID, StrGuidName, this.dgvData.dgvCurrentColumnOriginalSet);
  809. if (!dictColumns.ContainsKey("Ord_Type"))
  810. {
  811. dictColumns.Add("Ord_Type", "100");
  812. }
  813. this.dgvData.dictShowColumName = dictColumns;
  814. string StrQueryCondition = "";
  815. if (IsFirstRun && !string.IsNullOrEmpty(LYFZ.BLL.BLL_ErpOrder.CurrentSelectedOrderNumber))
  816. {
  817. string StrWhere = " Where Ord_SinceOrderNumber = '" + LYFZ.BLL.BLL_ErpOrder.CurrentSelectedOrderNumber + "' and Ords_ProductPickupStatus != 'OK' " + LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetVersionQuerySQL(this.chkPortraitVersion, this.chkDressVersion, this.chkKidsVersion, chkWeddingCelebration: this.chkWeddingCelebration, StrOrdType: "0,1,2,3,4");
  818. this.cmbQueryText.Text = LYFZ.BLL.BLL_ErpOrder.CurrentSelectedOrderNumber;
  819. StrQueryCondition = StrWhere + LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetGroupQueryOrderClickWhere(this.cmbtreevStoreName, "Ord_DividedShop");
  820. }
  821. else
  822. { StrQueryCondition = this.GetWhereStr(); }
  823. if (!string.IsNullOrEmpty(sqlWhere))
  824. {
  825. if (!string.IsNullOrEmpty(StrQueryCondition))
  826. {
  827. StrQueryCondition += " and " + sqlWhere;
  828. }
  829. else
  830. {
  831. StrQueryCondition += " where " + sqlWhere;
  832. }
  833. }
  834. int intTopCount = 10000;
  835. List<string> listColumns = new List<string>(StrSortField.Replace(" DESC", "").Replace(" ASC", "").Split(','));
  836. Hashtable htData = LYFZ.ComponentLibrary.DataGridOrderView.GetData_OrderTotakePiece(dictColumns, listColumns, StrQueryCondition, intTopCount, this.StrSortField);
  837. //BindPageData(ucPagerEx1.PageCurrent, Convert.ToInt32(htData["CurrentCount"]), Convert.ToInt32(htData["TotalCount"]));
  838. return htData["DataTable"] as DataTable;
  839. }
  840. /// <summary>
  841. /// 返回要操作的条件
  842. /// </summary>
  843. /// <returns></returns>
  844. string GetWhereStr()
  845. {
  846. string StrWhere = " Where Ord_Class = '1' " + LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetGroupQueryWhere(this.cmbtreevStoreName, "Ord_DividedShop");
  847. strPublicQueryString = StrWhere;
  848. bool IsQuery = false;
  849. if (!string.IsNullOrEmpty(this.cmbQueryText.Text.Trim()))
  850. {
  851. IsQuery = true;
  852. StrWhere += LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetQueryTextQueryCondition(this.cmbQueryText.Text.Trim());
  853. }
  854. // 完成状态
  855. if (this.DictData.ContainsKey("IsComplete") && this.DictData["IsComplete"].Trim().Length > 0)
  856. {
  857. if (Convert.ToBoolean(this.DictData["IsComplete"]))
  858. {
  859. IsQuery = true;
  860. StrWhere += " and Ords_ProductCompletedIntStatus = '2'";
  861. }
  862. }
  863. // 欠款
  864. if (this.DictData.ContainsKey("IsArrears") && this.DictData["IsArrears"].Trim().Length > 0)
  865. {
  866. if (Convert.ToBoolean(this.DictData["IsArrears"]))
  867. {
  868. IsQuery = true;
  869. StrWhere += " and (套系金额 + isnull(加挑金额,0) - isnull(收款金额,0)) > 0 ";
  870. }
  871. }
  872. // 取件OK
  873. if (this.DictData.ContainsKey("IsTotakePickupOK") && this.DictData["IsTotakePickupOK"].Trim().Length > 0)
  874. {
  875. if (Convert.ToBoolean(this.DictData["IsTotakePickupOK"]))
  876. {
  877. IsQuery = true;
  878. StrWhere += " and OPlist_PickupStatus = '1' ";
  879. }
  880. }
  881. // 取件人
  882. if (this.DictData.ContainsKey("TotakePickupName") && this.DictData["TotakePickupName"].Trim().Length > 0)
  883. {
  884. IsQuery = true;
  885. StrWhere += " and OPlist_PickupName = '" + this.DictData["TotakePickupName"].Trim() + "' ";
  886. }
  887. // 接单人
  888. if (this.DictData.ContainsKey("StoreNmae") && this.DictData["StoreNmae"].Trim().Length > 0)
  889. {
  890. IsQuery = true;
  891. StrWhere += " and Ord_OrderPersonName like '%" + this.DictData["StoreNmae"].Trim() + "%' ";
  892. }
  893. ///已完成日期
  894. if (this.DictData.ContainsKey("CompleteStartDate") && this.DictData["CompleteStartDate"].Trim().Length > 0 && this.DictData.ContainsKey("CompleteEndDate") && this.DictData["CompleteEndDate"].Trim().Length > 0)
  895. {
  896. IsQuery = true;
  897. StrWhere += LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetDateTime("Ords_ProductCompletedTime", this.DictData["CompleteStartDate"].Trim(), this.DictData["CompleteEndDate"].Trim());
  898. StrWhere += " and Ords_ProductCompletedIntStatus = '2' ";
  899. }
  900. ///已取件日期
  901. if (this.DictData.ContainsKey("PickUpStartDate") && this.DictData["PickUpStartDate"].Trim().Length > 0 && this.DictData.ContainsKey("PickUpEndDate") && this.DictData["PickUpEndDate"].Trim().Length > 0)
  902. {
  903. IsQuery = true;
  904. StrWhere += LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetDateTime("Ords_ProductPickupTime", this.DictData["PickUpStartDate"].Trim(), this.DictData["PickUpEndDate"].Trim());
  905. StrWhere += " and Ords_ProductPickupIntStatus = '2' ";
  906. }
  907. // 商品取走日期
  908. if (this.DictData.ContainsKey("TotakePieceStartDate") && this.DictData["TotakePieceStartDate"].Trim().Length > 0 && this.DictData.ContainsKey("TotakePieceEndDate") && this.DictData["TotakePieceEndDate"].Trim().Length > 0)
  909. {
  910. IsQuery = true;
  911. StrWhere += LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetDateTime("OPlist_PickupTime", this.DictData["TotakePieceStartDate"].Trim(), this.DictData["TotakePieceEndDate"].Trim());
  912. }
  913. // 预约取件日期
  914. if (this.DictData.ContainsKey("ReservationStartDate") && this.DictData["ReservationStartDate"].Trim().Length > 0 && this.DictData.ContainsKey("ReservationEndDate") && this.DictData["ReservationEndDate"].Trim().Length > 0)
  915. {
  916. IsQuery = true;
  917. StrWhere += LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetDateTime("OPlist_ReservationTakeTime", this.DictData["ReservationStartDate"].Trim(), this.DictData["ReservationEndDate"].Trim());
  918. }
  919. if (this.DictData.ContainsKey("IsExpedited") && this.DictData["IsExpedited"].Trim().Length > 0 && Convert.ToBoolean(this.DictData["IsExpedited"].Trim()))
  920. {
  921. IsQuery = true;
  922. StrWhere += " and OPlist_IsExpedited = 1";
  923. }
  924. if (!this.DictData.ContainsKey("PickUpStartDate"))
  925. {
  926. if (!this.chkShowCompleteOrder.Checked)
  927. { StrWhere += " and ( Ords_ProductPickupIntStatus != '2' )"; }
  928. else
  929. { StrWhere += " and ( Ords_ProductPickupIntStatus = '2' ) "; }
  930. }
  931. StrWhere += LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetVersionQuerySQL(this.chkPortraitVersion, this.chkDressVersion, this.chkKidsVersion, chkWeddingCelebration: this.chkWeddingCelebration, StrOrdType: "0,1,2,3,4");
  932. strPublicQueryString += LYFZ.Software.MainBusiness.DoorCityProcess.PublicCodeClasses.GetVersionQuerySQL(this.chkPortraitVersion, this.chkDressVersion, this.chkKidsVersion, chkWeddingCelebration: this.chkWeddingCelebration, StrOrdType: "0,1,2,3,4"); ;
  933. return StrWhere;
  934. }
  935. }
  936. }