2023-05-23 16:13:17 +08:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.ComponentModel;
|
|
|
|
|
using System.Data;
|
|
|
|
|
using System.Drawing;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Windows.Forms;
|
|
|
|
|
using DevExpress.XtraBars;
|
|
|
|
|
using DevExpress.XtraGrid.Views.Base;
|
|
|
|
|
//using DeiNiu.wms.Logical;
|
|
|
|
|
using DeiNiu.wms.Data;
|
|
|
|
|
using DevExpress.XtraGrid.Columns;
|
|
|
|
|
|
|
|
|
|
using System.Threading;
|
|
|
|
|
using DevExpress.XtraGrid.Views.Grid;
|
|
|
|
|
using DevExpress.XtraEditors.DXErrorProvider;
|
|
|
|
|
using DeiNiu.wms.Data.Model;
|
|
|
|
|
using DevExpress.XtraEditors;
|
|
|
|
|
using DevExpress.XtraEditors.Controls;
|
|
|
|
|
using DeiNiu.Utils;
|
|
|
|
|
using DeiNiu.wms.win.ServiceReferenceStockOutPickRequest;
|
|
|
|
|
using System.ServiceModel;
|
|
|
|
|
using DeiNiu.wms.win.utils.print;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
namespace DeiNiu.wms.win
|
|
|
|
|
{
|
|
|
|
|
public partial class GoodsOutSeedsPackForm : BasicRibbonForm
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// lWmsStock ls = new lWmsStock();
|
|
|
|
|
//lWmsOutPickRequest lgt = new lWmsOutPickRequest();
|
|
|
|
|
//lWmsOutRequest lgOutReq = new lWmsOutRequest();
|
|
|
|
|
// lWmsOutPickRequest outPickRequest = new lWmsOutPickRequest();
|
|
|
|
|
private string lastQuery = "";
|
|
|
|
|
DataSet dsPickOrders;
|
|
|
|
|
|
|
|
|
|
private DataTable dtPickOrders;
|
|
|
|
|
private DataTable dtPickOrdersDetail;
|
|
|
|
|
private DataTable dtGoods;
|
|
|
|
|
|
|
|
|
|
private int selectedRowIndex = -1;
|
|
|
|
|
// private WmsOutPickDetail_tmp currentDetail;
|
|
|
|
|
string lastScanBarcode = "";
|
|
|
|
|
|
|
|
|
|
// Thread threadPreProcess;
|
|
|
|
|
bool autoOrder;
|
|
|
|
|
string currentPickOrder = "";
|
|
|
|
|
string currentWaveNo = "";
|
|
|
|
|
public GoodsOutSeedsPackForm()
|
|
|
|
|
{
|
|
|
|
|
InitializeComponent();
|
|
|
|
|
initialControls();
|
|
|
|
|
initialBackGroundTasks();
|
|
|
|
|
// initialTimer();
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
#region initialControls
|
|
|
|
|
private void initialControls()
|
|
|
|
|
{
|
|
|
|
|
initialComboBoxes();
|
|
|
|
|
// initialPagerControls();
|
|
|
|
|
initialDataGrid();
|
|
|
|
|
initialQueryInput();
|
|
|
|
|
setValidationRule();
|
|
|
|
|
textEditPickOrderNo.GotFocus += new EventHandler(textEditBarcode_GotFocus);
|
|
|
|
|
textEditPickOrderNo.MouseUp += new MouseEventHandler(textEditBarcode_MouseUp);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
private void initialBackGroundTasks()
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
swAutoOrder.IsOn = WmsConstants.AUTO_PICK_BULK_VALIDATION_ORDER;
|
|
|
|
|
autoOrder = swAutoOrder.IsOn;
|
|
|
|
|
// lgOutReq.UpdateUIDelegate += updateValidationList;
|
|
|
|
|
|
|
|
|
|
if (autoOrder)
|
|
|
|
|
{
|
|
|
|
|
this.getValidationOrders();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
string oldDesk = "-1";
|
|
|
|
|
private int desk
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
if (combColors.SelectedIndex == -1)
|
|
|
|
|
{
|
|
|
|
|
showErrorMsg(null, "请选择控制台");
|
|
|
|
|
|
|
|
|
|
combColors.Focus();
|
|
|
|
|
return -1;
|
|
|
|
|
}
|
2023-09-04 22:41:19 +08:00
|
|
|
|
// return Convert.ToInt32( ((Node)combColors.SelectedItem).name);
|
2023-05-23 16:13:17 +08:00
|
|
|
|
if (oldDesk != combColors.Text)
|
|
|
|
|
{
|
|
|
|
|
writeConfig("Desk", combColors.Text);
|
|
|
|
|
}
|
2023-09-04 22:41:19 +08:00
|
|
|
|
return Convert.ToInt32(combColors.Text);
|
2023-05-23 16:13:17 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
private void initialComboBoxes()
|
|
|
|
|
{
|
|
|
|
|
DataTable dtDesk = pickClient.getDeskList((int)enumDeskType.播种);
|
|
|
|
|
|
|
|
|
|
List<string> desks = new List<string>();
|
|
|
|
|
foreach (DataRow dr in dtDesk.Rows)
|
|
|
|
|
{
|
|
|
|
|
desks.Add(dr["color"].ToString());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
initialComboBoxs(this.combColors, desks.ToArray());
|
|
|
|
|
oldDesk = System.Configuration.ConfigurationManager.AppSettings["Desk"];
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
int i = 0;
|
|
|
|
|
foreach (string desk in desks)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
if (!string.IsNullOrEmpty(oldDesk) && oldDesk == desk)
|
|
|
|
|
{
|
|
|
|
|
combColors.SelectedIndex = i;
|
|
|
|
|
}
|
|
|
|
|
i++;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
catch
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void setValidationRule()
|
|
|
|
|
{
|
|
|
|
|
// dxValidationProvider.SetValidationRule(comWarehouse, ValidationRules.notEmptyValidationRule);
|
|
|
|
|
//txtGoodType.Properties.MaxLength = 40;
|
|
|
|
|
//txtGoodDesc.Properties.MaxLength = 250;
|
|
|
|
|
//textEdit1.Properties.MaxLength = txtGoodType.Properties.MaxLength;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void initialQueryInput()
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void initialDataGridColumns()
|
|
|
|
|
{
|
|
|
|
|
setupGridView(gridViewPickOrders,false);
|
|
|
|
|
//setupGridView(gridView2, false,false);
|
|
|
|
|
//setupGridView(gridView3, false,false);
|
|
|
|
|
// gridviewGoodsType.PopulateColumns();
|
|
|
|
|
gridViewPickOrders.Columns.Clear();
|
|
|
|
|
// gridviewGoodsType.Columns.Remove(gridviewGoodsType.Columns["DealerPrice"]);
|
|
|
|
|
GridColumn myCol0 = new GridColumn() { Caption = "ID", Visible = true, FieldName = "id" };
|
|
|
|
|
myCol0.Visible = false;
|
|
|
|
|
this.gridViewPickOrders.Columns.Add(myCol0);
|
|
|
|
|
GridColumn myCol1 = new GridColumn() { Caption = "单号", Visible = true, FieldName = WmsOutPickRequest.fields.pickOrderNo.ToString() };
|
|
|
|
|
// GridColumn myCol2 = new GridColumn() { Caption = "类别", Visible = true, FieldName = WmsOutPickRequest.fields.orderTypeName.ToString() };
|
|
|
|
|
GridColumn myCol3 = new GridColumn() { Caption = "分播状态", Visible = true, FieldName = "orderState" };
|
|
|
|
|
|
|
|
|
|
GridColumn myCol4 = new GridColumn() { Caption = "客户", Visible = true, FieldName = WmsOutPickRequest.fields.customerName. ToString() };
|
|
|
|
|
GridColumn myCol5 = new GridColumn() { Caption = "备注", Visible = true, FieldName = WmsOutPickRequest.fields.description.ToString() };
|
|
|
|
|
//GridColumn myCol6 = new GridColumn() { Caption = "日期", Visible = true, FieldName = WmsOutPickRequest.fields.orderDate.ToString() };
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.gridViewPickOrders.Columns.Add(myCol1);
|
|
|
|
|
// this.gridView1.Columns.Add(myCol6);
|
|
|
|
|
this.gridViewPickOrders.Columns.Add(myCol3);
|
|
|
|
|
this.gridViewPickOrders.Columns.Add(myCol4);
|
|
|
|
|
this.gridViewPickOrders.Columns.Add(myCol5);
|
|
|
|
|
|
|
|
|
|
//to show bottom scroll bar
|
|
|
|
|
gridViewPickOrders.OptionsView.ColumnAutoWidth = false;
|
|
|
|
|
gridViewPickOrders.BestFitColumns();
|
|
|
|
|
// gridView1.Focus();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// initialGridView2Columns();
|
|
|
|
|
//gridControl2.DataSource = null;
|
|
|
|
|
}
|
|
|
|
|
private void initialGridView2Columns(GridView gridview)
|
|
|
|
|
{
|
|
|
|
|
setupGridView(gridview, false, true, false);
|
|
|
|
|
gridview.FocusRectStyle = DrawFocusRectStyle.None;
|
|
|
|
|
// gridviewGoodsType.PopulateColumns();
|
|
|
|
|
gridview.Columns.Clear();
|
|
|
|
|
// gridviewGoodsType.Columns.Remove(gridviewGoodsType.Columns["DealerPrice"]);
|
|
|
|
|
GridColumn myCol0 = new GridColumn() { Caption = "ID", Visible = true, FieldName = "id" };
|
|
|
|
|
myCol0.Visible = false;
|
|
|
|
|
gridview.Columns.Add(myCol0);
|
|
|
|
|
GridColumn myCol1 = new GridColumn() { Caption = "商品编码", Visible = true, FieldName = WmsGoods.fields.goodsId.ToString() };
|
|
|
|
|
GridColumn myCol2 = new GridColumn() { Caption = "商品名称", Visible = true, FieldName = WmsGoods.exfields.goodsName.ToString() };
|
|
|
|
|
GridColumn myCol3 = new GridColumn() { Caption = "厂家", Visible = true, FieldName = WmsGoods.exfields.manufacturer.ToString() };
|
|
|
|
|
GridColumn myCol4 = new GridColumn() { Caption = "规格", Visible = true, FieldName = WmsGoods.exfields.spec.ToString() };
|
|
|
|
|
GridColumn myCol5 = new GridColumn() { Caption = "单位", Visible = true, FieldName = WmsGoods.exfields.unit.ToString() };
|
|
|
|
|
GridColumn myCol6 = new GridColumn() { Caption = "大包装数量", Visible = true, FieldName = WmsGoods.exfields.bigCount.ToString() };
|
|
|
|
|
GridColumn myCol7 = new GridColumn() { Caption = "剂型", Visible = true, FieldName = WmsGoods.exfields.type.ToString() };
|
|
|
|
|
GridColumn myCol8 = new GridColumn() { Caption = "商品类型", Visible = true, FieldName = WmsGoods.exfields.goodsTypeName.ToString() };
|
|
|
|
|
// GridColumn myCol9 = new GridColumn() { Caption = "大零", Visible = true, FieldName = WmsGoods.fields.bulkMax.ToString() };
|
|
|
|
|
// GridColumn myCol10 = new GridColumn() { Caption = "小整", Visible = true, FieldName = WmsGoods.fields.batchMax1.ToString() };
|
|
|
|
|
// GridColumn myCol11 = new GridColumn() { Caption = "大整", Visible = true, FieldName = WmsGoods.fields.batchMax2.ToString() };
|
|
|
|
|
GridColumn myCol12 = new GridColumn() { Caption = "国药准字", Visible = true, FieldName = WmsGoods.exfields.regeditCode.ToString() };
|
|
|
|
|
|
|
|
|
|
GridColumn myCol100 = new GridColumn() { Caption = "数量", Visible = true, FieldName = WmsOutDetail.fields.count.ToString() };
|
|
|
|
|
GridColumn myCol101 = new GridColumn() { Caption = "零货", Visible = true, FieldName = WmsOutDetail.fields.bulkCount.ToString() };
|
|
|
|
|
// GridColumn myCol102 = new GridColumn() { Caption = "小整", Visible = true, FieldName = WmsOutDetail.fields.batch1Count.ToString() };
|
|
|
|
|
// GridColumn myCol103 = new GridColumn() { Caption = "大整", Visible = true, FieldName = WmsOutDetail.fields.batch2Count.ToString() };
|
|
|
|
|
// GridColumn myCol104 = new GridColumn() { Caption = "箱", Visible = true, FieldName = WmsOutDetail.fields.boxcnt.ToString() };
|
|
|
|
|
GridColumn myCol14 = new GridColumn() { Caption = "批号", Visible = true, FieldName = WmsOutDetail.fields.batch.ToString() };
|
|
|
|
|
GridColumn myCol15 = new GridColumn() { Caption = "生产日期", Visible = true, FieldName = WmsOutDetail.fields.productDate.ToString() };
|
|
|
|
|
GridColumn myCol16 = new GridColumn() { Caption = "有效期", Visible = true, FieldName = WmsOutDetail.fields.validDate.ToString() };
|
|
|
|
|
GridColumn myCol161 = new GridColumn() { Caption = "分播状态", Visible = true, FieldName = "orderState" };
|
|
|
|
|
GridColumn myCol17 = new GridColumn() { Caption = "状态", Visible = true, FieldName = WmsOutDetail.fields.state.ToString() };
|
|
|
|
|
GridColumn myCol18 = new GridColumn() { Caption = "说明", Visible = true, FieldName = WmsOutDetail.fields.description.ToString() };
|
|
|
|
|
|
|
|
|
|
GridColumn myCol25 = new GridColumn() { Caption = "订单", Visible = true, FieldName = WmsOutRequest.fields.orderNo.ToString() };
|
|
|
|
|
GridColumn myCol26 = new GridColumn() { Caption = "条码", Visible = true, FieldName = "barCode" };
|
|
|
|
|
|
|
|
|
|
GridColumn myCol29 = new GridColumn() { Caption = "复核结果", Visible = true, FieldName = "validResult" };
|
|
|
|
|
GridColumn myCol27 = new GridColumn() { Caption = "异常回馈", Visible = true, FieldName = "solution" };
|
|
|
|
|
GridColumn myCol28 = new GridColumn() { Caption = "回馈说明", Visible = true, FieldName = WmsOutPickDetail.fields.solutionRemark.ToString() };
|
|
|
|
|
GridColumn myCol30 = new GridColumn() { Caption = "复核数量", Visible = true, FieldName = WmsOutPickDetail.fields.confirmedCount.ToString() };
|
|
|
|
|
|
|
|
|
|
if (gridview == gridViewSaleOrders)
|
|
|
|
|
{
|
|
|
|
|
gridview.Columns.Add(myCol25);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
gridview.Columns.Add(myCol26);
|
|
|
|
|
gridview.Columns.Add(myCol101);
|
|
|
|
|
}
|
|
|
|
|
gridview.Columns.Add(myCol2);
|
|
|
|
|
gridview.Columns.Add(myCol14);
|
|
|
|
|
gridview.Columns.Add(myCol161);
|
|
|
|
|
gridview.Columns.Add(myCol100);
|
|
|
|
|
// gridview.Columns.Add(myCol101);
|
|
|
|
|
// gridview.Columns.Add(myCol102);
|
|
|
|
|
// gridview.Columns.Add(myCol103);
|
|
|
|
|
// gridview.Columns.Add(myCol104);
|
|
|
|
|
gridview.Columns.Add(myCol6);
|
|
|
|
|
gridview.Columns.Add(myCol5);
|
|
|
|
|
|
|
|
|
|
gridview.Columns.Add(myCol15);
|
|
|
|
|
gridview.Columns.Add(myCol16);
|
|
|
|
|
gridview.Columns.Add(myCol3);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
gridview.Columns.Add(myCol3);
|
|
|
|
|
|
|
|
|
|
gridview.Columns.Add(myCol8);
|
|
|
|
|
//gridview.Columns.Add(myCol9);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
gridview.Columns.Add(myCol2);
|
|
|
|
|
// gridview.Columns.Add(myCol6);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
gridview.Columns.Add(myCol4);
|
|
|
|
|
gridview.Columns.Add(myCol7);
|
|
|
|
|
|
|
|
|
|
gridview.Columns.Add(myCol12);
|
|
|
|
|
gridview.Columns.Add(myCol1);
|
|
|
|
|
// gridview.Columns.Add(myCol17);
|
|
|
|
|
gridview.Columns.Add(myCol18);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//to show bottom scroll bar
|
|
|
|
|
gridview.OptionsView.ColumnAutoWidth = false;
|
|
|
|
|
gridview.BestFitColumns();
|
|
|
|
|
// gridView2.Focus();
|
|
|
|
|
if (dtGoods !=null && dtGoods.Rows.Count > 0)
|
|
|
|
|
{
|
|
|
|
|
switchGridViewRowSelection(gridViewGoods, true);
|
|
|
|
|
|
|
|
|
|
if (gridViewGoods.IsFocusedView)
|
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
gridViewGoods.Focus();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void initialGridView3Columns(GridView gridview)
|
|
|
|
|
{
|
|
|
|
|
setupGridView(gridview, false, true, false);
|
|
|
|
|
gridview.FocusRectStyle = DrawFocusRectStyle.None;
|
|
|
|
|
// gridviewGoodsType.PopulateColumns();
|
|
|
|
|
gridview.Columns.Clear();
|
|
|
|
|
// gridviewGoodsType.Columns.Remove(gridviewGoodsType.Columns["DealerPrice"]);
|
|
|
|
|
GridColumn myCol0 = new GridColumn() { Caption = "ID", Visible = true, FieldName = "id" };
|
|
|
|
|
myCol0.Visible = false;
|
|
|
|
|
gridview.Columns.Add(myCol0);
|
|
|
|
|
GridColumn myCol1 = new GridColumn() { Caption = "商品编码", Visible = true, FieldName = WmsGoods.fields.goodsId.ToString() };
|
|
|
|
|
GridColumn myCol2 = new GridColumn() { Caption = "商品名称", Visible = true, FieldName = WmsGoods.exfields.goodsName.ToString() };
|
|
|
|
|
GridColumn myCol3 = new GridColumn() { Caption = "厂家", Visible = true, FieldName = WmsGoods.exfields.manufacturer.ToString() };
|
|
|
|
|
GridColumn myCol4 = new GridColumn() { Caption = "规格", Visible = true, FieldName = WmsGoods.exfields.spec.ToString() };
|
|
|
|
|
GridColumn myCol5 = new GridColumn() { Caption = "单位", Visible = true, FieldName = WmsGoods.exfields.unit.ToString() };
|
|
|
|
|
// GridColumn myCol6 = new GridColumn() { Caption = "大包装数量", Visible = true, FieldName = WmsGoods.exfields.bigCount.ToString() };
|
|
|
|
|
GridColumn myCol7 = new GridColumn() { Caption = "剂型", Visible = true, FieldName = WmsGoods.exfields.type.ToString() };
|
|
|
|
|
GridColumn myCol8 = new GridColumn() { Caption = "商品类型", Visible = true, FieldName = WmsGoods.exfields.goodsTypeName.ToString() };
|
|
|
|
|
// GridColumn myCol9 = new GridColumn() { Caption = "大零", Visible = true, FieldName = WmsGoods.fields.bulkMax.ToString() };
|
|
|
|
|
// GridColumn myCol10 = new GridColumn() { Caption = "小整", Visible = true, FieldName = WmsGoods.fields.batchMax1.ToString() };
|
|
|
|
|
// GridColumn myCol11 = new GridColumn() { Caption = "大整", Visible = true, FieldName = WmsGoods.fields.batchMax2.ToString() };
|
|
|
|
|
GridColumn myCol12 = new GridColumn() { Caption = "国药准字", Visible = true, FieldName = WmsGoods.exfields.regeditCode.ToString() };
|
|
|
|
|
|
|
|
|
|
GridColumn myCol100 = new GridColumn() { Caption = "数量", Visible = true, FieldName = WmsOutDetail.fields.count.ToString() };
|
|
|
|
|
// GridColumn myCol101 = new GridColumn() { Caption = "零货", Visible = true, FieldName = WmsOutDetail.fields.count.ToString() };
|
|
|
|
|
// GridColumn myCol102 = new GridColumn() { Caption = "整货", Visible = true, FieldName = WmsOutDetail.fields.batch1Count.ToString() };
|
|
|
|
|
// GridColumn myCol103 = new GridColumn() { Caption = "大整", Visible = true, FieldName = WmsOutDetail.fields.batch2Count.ToString() };
|
|
|
|
|
// GridColumn myCol104 = new GridColumn() { Caption = "箱", Visible = true, FieldName = WmsOutDetail.fields.boxcnt.ToString() };
|
|
|
|
|
GridColumn myCol14 = new GridColumn() { Caption = "批号", Visible = true, FieldName = WmsOutDetail.fields.batch.ToString() };
|
|
|
|
|
GridColumn myCol15 = new GridColumn() { Caption = "生产日期", Visible = true, FieldName = WmsOutDetail.fields.productDate.ToString() };
|
|
|
|
|
GridColumn myCol16 = new GridColumn() { Caption = "有效期", Visible = true, FieldName = WmsOutDetail.fields.validDate.ToString() };
|
|
|
|
|
|
|
|
|
|
GridColumn myCol17 = new GridColumn() { Caption = "状态", Visible = true, FieldName = WmsOutDetail.fields.state.ToString() };
|
|
|
|
|
GridColumn myCol18 = new GridColumn() { Caption = "说明", Visible = true, FieldName = WmsOutDetail.fields.description.ToString() };
|
|
|
|
|
GridColumn myCol19 = new GridColumn() { Caption = "分拣状态", Visible = true, FieldName = WmsOutPickDetail.fields.bulkPickState.ToString() };
|
|
|
|
|
|
|
|
|
|
GridColumn myCol20 = new GridColumn() { Caption = "波次", Visible = true, FieldName = WmsOutPickLable.fields.dpsOrder.ToString() };
|
|
|
|
|
GridColumn myCol21 = new GridColumn() { Caption = "颜色", Visible = true, FieldName = WmsOutPickLable.fields.color.ToString() };
|
|
|
|
|
GridColumn myCol22 = new GridColumn() { Caption = "货位", Visible = true, FieldName = WmsOutPickLable.fields.locationId.ToString() };
|
|
|
|
|
GridColumn myCol23 = new GridColumn() { Caption = "标签", Visible = true, FieldName = WmsOutPickLable.fields.elabId.ToString() };
|
|
|
|
|
GridColumn myCol24 = new GridColumn() { Caption = "客户", Visible = true, FieldName = WmsOutPickRequest.fields.customerName.ToString() };
|
|
|
|
|
GridColumn myCol25 = new GridColumn() { Caption = "订单", Visible = true, FieldName = WmsOutPickDetail.fields.pickOrderNo.ToString() };
|
|
|
|
|
|
|
|
|
|
GridColumn myCol26 = new GridColumn() { Caption = "异常回馈", Visible = true, FieldName = "solution" };
|
|
|
|
|
GridColumn myCol27 = new GridColumn() { Caption = "回馈说明", Visible = true, FieldName = WmsOutPickDetail.fields.solutionRemark.ToString() };
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// gridview.Columns.Add(myCol25);
|
|
|
|
|
gridview.Columns.Add(myCol2);
|
|
|
|
|
gridview.Columns.Add(myCol14);
|
|
|
|
|
// gridview.Columns.Add(myCol21);
|
|
|
|
|
gridview.Columns.Add(myCol100);
|
|
|
|
|
gridview.Columns.Add(myCol22);
|
|
|
|
|
gridview.Columns.Add(myCol23);
|
|
|
|
|
gridview.Columns.Add(myCol19);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//to show bottom scroll bar
|
|
|
|
|
gridview.OptionsView.ColumnAutoWidth = false;
|
|
|
|
|
gridview.BestFitColumns();
|
|
|
|
|
// gridView2.Focus();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 预处理,按客户分拆订单,生成分拣单,并出库
|
|
|
|
|
/// </summary>
|
|
|
|
|
private void getValidationOrders()
|
|
|
|
|
{
|
|
|
|
|
this.getPickOrders4Validation();
|
|
|
|
|
//threadPreProcess = new Thread(this.getPickOrders4Validation);
|
|
|
|
|
//threadPreProcess.IsBackground = true;
|
|
|
|
|
//threadPreProcess.Start();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void getPickOrders4Validation()
|
|
|
|
|
{
|
|
|
|
|
clearDetails();
|
|
|
|
|
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
dtPickOrdersDetail = pickClient.getSeedsPackingData(desk);
|
|
|
|
|
|
|
|
|
|
closeClient();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
catch (Exception e)
|
|
|
|
|
{
|
|
|
|
|
showErrorMsg(e.Message);
|
|
|
|
|
LogHelper.WriteLog(this.GetType(), e);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
DataView dv = dtPickOrdersDetail.DefaultView;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dtPickOrders = dv.ToTable(true, "pickOrderNo","customerName","orderState","bulkBox","bulkBag");
|
|
|
|
|
|
|
|
|
|
dtPickOrders.PrimaryKey = new DataColumn[] { dtPickOrders.Columns["pickOrderNo"] };
|
|
|
|
|
dtPickOrdersDetail.PrimaryKey = new DataColumn[] { dtPickOrdersDetail.Columns["id"] };
|
|
|
|
|
// updateValidationList(null,null);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (InvokeRequired)
|
|
|
|
|
{
|
|
|
|
|
this.Invoke(new loadNewPickOrders(delegate()
|
|
|
|
|
{
|
|
|
|
|
swAutoOrder.Enabled = true;
|
|
|
|
|
btnPickOrders.Enabled = !autoOrder;
|
|
|
|
|
this.loadPickOrders();
|
|
|
|
|
}));
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
swAutoOrder.Enabled = true;
|
|
|
|
|
btnPickOrders.Enabled = !autoOrder;
|
|
|
|
|
this.loadPickOrders();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// getValidationOrders();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DateTime lastRefreshTime;
|
|
|
|
|
int refreshInterval = 5;
|
|
|
|
|
//完成任务时需要调用
|
|
|
|
|
delegate void loadNewPickOrders();
|
|
|
|
|
private void updateValidationList(object source, System.Timers.ElapsedEventArgs e)
|
|
|
|
|
{
|
|
|
|
|
//还可以进行其他的一些完任务完成之后的逻辑处理
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
closeWaitForm();
|
|
|
|
|
if (autoOrder)
|
|
|
|
|
{
|
|
|
|
|
TimeSpan ts = DateTime.Now - lastRefreshTime;
|
|
|
|
|
|
|
|
|
|
if ( ts.TotalSeconds < refreshInterval)
|
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
lastRefreshTime = DateTime.Now;
|
|
|
|
|
|
|
|
|
|
refreshInterval = Convert.ToInt32( spinOrder.Value * 60);
|
|
|
|
|
|
|
|
|
|
getValidationOrders();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
System.Timers.Timer timer = new System.Timers.Timer();//实例化Timer类
|
|
|
|
|
|
|
|
|
|
private void timeCnt()
|
|
|
|
|
{
|
|
|
|
|
timer.Start(); ;
|
|
|
|
|
}
|
|
|
|
|
private void initialTimer()
|
|
|
|
|
{
|
|
|
|
|
int intTime = 10000;
|
|
|
|
|
timer.Interval = intTime;//设置间隔时间,为毫秒;
|
|
|
|
|
timer.Elapsed += new System.Timers.ElapsedEventHandler(updateValidationList);//到达时间的时候执行事件;
|
|
|
|
|
timer.AutoReset = true;//设置是执行一次(false)还是一直执行(true);
|
|
|
|
|
timer.Enabled = true;//是否执行System.Timers.Timer.Elapsed事件;
|
|
|
|
|
timer.Start();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void bindDetail()
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
private void setDataBack()
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
private bool validData()
|
|
|
|
|
{
|
|
|
|
|
bool isvalid = dxValidationProvider1.Validate();
|
|
|
|
|
|
|
|
|
|
// MessageBox.Show("goodtype is " + txtGoodType.Text +", is valid ? " + isvalid);
|
|
|
|
|
|
|
|
|
|
return isvalid;
|
|
|
|
|
//String gdtype = txtGoodType.Text.Trim();
|
|
|
|
|
//if (gdtype.Length == 0)
|
|
|
|
|
//{
|
|
|
|
|
|
|
|
|
|
// dxValidationProvider.Validate();
|
|
|
|
|
// return false;
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
//return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void gridView1_FocusedRowObjectChanged(object sender, FocusedRowObjectChangedEventArgs e)
|
|
|
|
|
{
|
|
|
|
|
if (gridViewPickOrders.FocusedRowHandle < 0 || gridViewPickOrders.FocusedRowHandle == selectedRowIndex || isDataSourceChanged && selectedRowIndex >0)
|
|
|
|
|
{
|
|
|
|
|
if (gridViewPickOrders.IsGroupRow(e.RowHandle)) //set first row of group selected
|
|
|
|
|
{
|
|
|
|
|
selectedRowIndex = gridViewPickOrders.GetChildRowHandle(e.RowHandle, 0);
|
|
|
|
|
setCurrentRequestDetail();
|
|
|
|
|
}
|
|
|
|
|
isDataSourceChanged = false;
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
isDataSourceChanged = false;
|
|
|
|
|
selectedRowIndex = gridViewPickOrders.FocusedRowHandle ;
|
|
|
|
|
// showErrorMsg("selection:"+ selectedRowIndex);
|
|
|
|
|
setCurrentRequestDetail();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool isDataSourceChanged = false;
|
|
|
|
|
private void gridView1_DataSourceChanged(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
isDataSourceChanged = true;
|
|
|
|
|
if (selectedRowIndex >= 0 && dtPickOrders.Rows.Count > selectedRowIndex)
|
|
|
|
|
{
|
|
|
|
|
gridViewPickOrders.FocusedRowHandle = selectedRowIndex;
|
|
|
|
|
gridViewPickOrders.MakeRowVisible(selectedRowIndex);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protected void query()
|
|
|
|
|
{
|
|
|
|
|
// pager1.Bind();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void loadPickOrders()
|
|
|
|
|
{
|
|
|
|
|
closeWaitForm();
|
|
|
|
|
// showWaitForm();
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
bool firstLoad = this.gridPickOrders.DataSource == null;
|
|
|
|
|
gridPickOrders.DataSource = dtPickOrders;
|
|
|
|
|
|
|
|
|
|
//dt = lgt.Query(query, start, end); //string.IsNullOrEmpty(query) ? lgt.GetGoodType.getAllData(start, end) : lgt.g;
|
|
|
|
|
|
|
|
|
|
dtPickOrders.PrimaryKey = new DataColumn[] { dtPickOrders.Columns["pickOrderNo"] };
|
|
|
|
|
// DataRow drx = dtPickOrders.Rows.Find(currentPickOrder);
|
|
|
|
|
|
|
|
|
|
this.gridPickOrders.DataSource = dtPickOrders.DefaultView;
|
|
|
|
|
|
|
|
|
|
//update selected row index to the last updated one.
|
|
|
|
|
|
|
|
|
|
if (!string.IsNullOrEmpty(currentPickOrder) )
|
|
|
|
|
{
|
|
|
|
|
selectedRowIndex = -1;
|
|
|
|
|
DataRow dr = dtPickOrders.Rows.Find(currentPickOrder);
|
|
|
|
|
if (dr != null)
|
|
|
|
|
{
|
|
|
|
|
// selectedRowIndex = dtPickOrders.Rows.IndexOf(dr);
|
|
|
|
|
selectedRowIndex = 0;
|
|
|
|
|
foreach (DataRowView drv in GetGridViewFilteredAndSortedData(gridViewPickOrders))
|
|
|
|
|
{
|
|
|
|
|
if (drv["pickOrderNo"].ToString().Equals(currentPickOrder))
|
|
|
|
|
{
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
selectedRowIndex++;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
selectedRowIndex = 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (selectedRowIndex >= 0 && dtPickOrders.Rows.Count > selectedRowIndex)
|
|
|
|
|
{
|
|
|
|
|
// gridView1.SelectRow(selectedRowIndex);
|
|
|
|
|
gridViewPickOrders.FocusedRowHandle = selectedRowIndex;
|
|
|
|
|
// gridView1.MakeRowVisible(selectedRowIndex);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//gridView1.FocusedRowHandle = selectedRowIndex;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
// if (firstLoad)
|
|
|
|
|
{
|
|
|
|
|
gridViewPickOrders.FocusedRowHandle = 0;
|
|
|
|
|
|
|
|
|
|
gridViewPickOrders.SelectRow(0);
|
|
|
|
|
// setCurrentRequestDetail();
|
|
|
|
|
}
|
|
|
|
|
if (firstLoad && dtPickOrders.Rows.Count > 0)
|
|
|
|
|
{
|
|
|
|
|
selectedRowIndex =0;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
setCurrentRequestDetail();
|
|
|
|
|
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
initialDataGridColumns();
|
|
|
|
|
}
|
|
|
|
|
catch { }
|
|
|
|
|
if (firstLoad)
|
|
|
|
|
{
|
|
|
|
|
textEditPickOrderNo.Focus();
|
|
|
|
|
textEditPickOrderNo.SelectAll();
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
catch (Exception e)
|
|
|
|
|
{
|
|
|
|
|
showErrorMsg(e.Message);
|
|
|
|
|
}
|
|
|
|
|
finally
|
|
|
|
|
{
|
|
|
|
|
// WaitFormService.Close();
|
|
|
|
|
// closeWaitForm();
|
|
|
|
|
bbQuery.Enabled = true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void bbQuery_ItemClick_1(object sender, ItemClickEventArgs e)
|
|
|
|
|
{
|
|
|
|
|
this.bbQuery.Enabled = false;
|
|
|
|
|
loadPickOrders();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void updateObjects(List<WmsGoods> goods)
|
|
|
|
|
{
|
|
|
|
|
showWaitForm();
|
|
|
|
|
//WaitFormService.Show(this);
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
// lgt.update(goods);
|
|
|
|
|
|
|
|
|
|
//get updated data
|
|
|
|
|
query();
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
catch (Exception e)
|
|
|
|
|
{
|
|
|
|
|
showErrorMsg(e,e.Message);
|
|
|
|
|
}
|
|
|
|
|
finally
|
|
|
|
|
{
|
|
|
|
|
// WaitFormService.Close();
|
|
|
|
|
closeWaitForm();
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private bool getCurrentObject()
|
|
|
|
|
{
|
|
|
|
|
if (selectedRowIndex <0 || selectedRowIndex >= dtPickOrders.Rows.Count)
|
|
|
|
|
{
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//clearDetails();
|
|
|
|
|
int cnt = GetGridViewFilteredAndSortedData(gridViewPickOrders).Count;
|
|
|
|
|
if (selectedRowIndex + 1 > cnt)
|
|
|
|
|
{
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
// DataRow currentRow = dtPickOrders.Rows[selectedRowIndex];
|
|
|
|
|
DataRowView currentRow = (DataRowView)(GetGridViewFilteredAndSortedData(gridViewPickOrders)[selectedRowIndex]);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// selectedRequest = new WmsOutPickRequest(currentRow);
|
|
|
|
|
currentPickOrder = currentRow["pickOrderNo"].ToString();
|
|
|
|
|
lbCustmer.Text = currentRow["customerName"].ToString();
|
|
|
|
|
// currentWaveNo = currentRow["dpsOrder"].ToString();
|
|
|
|
|
this.spinBulkBox.Text = currentRow["bulkBox"].ToString();
|
|
|
|
|
this.spinBulkBag.Text = currentRow["bulkBag"].ToString();
|
2023-09-04 22:41:19 +08:00
|
|
|
|
btnOk.Enabled =Convert.ToInt32( currentRow["orderState"].ToString())<(int)enumOutStockPickStatus.打包完成;
|
2023-05-23 16:13:17 +08:00
|
|
|
|
btnPrint.Enabled = !btnOk.Enabled;
|
|
|
|
|
return true;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void btnQuery_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
clearDetails();
|
|
|
|
|
loadPickOrders();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void gridView1_SelectionChanged(object sender, DevExpress.Data.SelectionChangedEventArgs e)
|
|
|
|
|
{
|
|
|
|
|
if (gridViewPickOrders.FocusedRowHandle <0 || gridViewPickOrders.FocusedRowHandle == selectedRowIndex)
|
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
selectedRowIndex = gridViewPickOrders.FocusedRowHandle;
|
|
|
|
|
// showErrorMsg("selection:"+ selectedRowIndex);
|
|
|
|
|
setCurrentRequestDetail();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void initialDataGrid()
|
|
|
|
|
{
|
|
|
|
|
gridViewPickOrders.OptionsSelection.MultiSelect = false;//按shift / control 多选
|
|
|
|
|
this.gridViewPickOrders.OptionsBehavior.AutoPopulateColumns = false;
|
|
|
|
|
this.gridViewPickOrders.FocusRectStyle = DevExpress.XtraGrid.Views.Grid.DrawFocusRectStyle.RowFocus;
|
|
|
|
|
this.gridViewPickOrders.FocusRectStyle = DevExpress.XtraGrid.Views.Grid.DrawFocusRectStyle.CellFocus;
|
|
|
|
|
this.gridViewPickOrders.OptionsBehavior.Editable = false;
|
|
|
|
|
this.gridViewPickOrders.OptionsSelection.EnableAppearanceFocusedCell = false;
|
|
|
|
|
|
|
|
|
|
this.gridViewPickOrders.FocusedRowObjectChanged += new DevExpress.XtraGrid.Views.Base.FocusedRowObjectChangedEventHandler(this.gridView1_FocusedRowObjectChanged);
|
|
|
|
|
this.gridViewPickOrders.DataSourceChanged += new System.EventHandler(this.gridView1_DataSourceChanged);
|
|
|
|
|
|
|
|
|
|
//show line number
|
|
|
|
|
this.gridViewPickOrders.IndicatorWidth = 20;
|
|
|
|
|
this.gridViewPickOrders.CustomDrawRowIndicator += new DevExpress.XtraGrid.Views.Grid.RowIndicatorCustomDrawEventHandler(gridView_CustomDrawRowIndicator);
|
|
|
|
|
gridViewPickOrders.CustomColumnDisplayText += gridView2_CustomColumnDisplayText;
|
|
|
|
|
gridViewPickOrders.RowCellStyle += gridView_RowCellStyle;
|
|
|
|
|
|
|
|
|
|
this.gridViewSaleOrders .IndicatorWidth = 20;
|
|
|
|
|
this.gridViewSaleOrders.CustomDrawRowIndicator += new DevExpress.XtraGrid.Views.Grid.RowIndicatorCustomDrawEventHandler(gridView_CustomDrawRowIndicator);
|
|
|
|
|
gridViewSaleOrders.OptionsSelection.EnableAppearanceFocusedCell = false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.gridViewGoods.IndicatorWidth = 20;
|
|
|
|
|
this.gridViewGoods.CustomDrawRowIndicator += new DevExpress.XtraGrid.Views.Grid.RowIndicatorCustomDrawEventHandler(gridView_CustomDrawRowIndicator);
|
|
|
|
|
gridViewGoods.OptionsSelection.MultiSelect = false;
|
|
|
|
|
gridViewGoods.FocusRectStyle = DevExpress.XtraGrid.Views.Grid.DrawFocusRectStyle.RowFocus;
|
|
|
|
|
gridViewGoods.OptionsSelection.EnableAppearanceFocusedCell = false;
|
|
|
|
|
gridViewGoods.RowCellStyle += gridView_RowCellStyle;
|
|
|
|
|
gridViewGoods.CustomColumnDisplayText += gridView2_CustomColumnDisplayText;
|
|
|
|
|
|
|
|
|
|
this.gridViewGoods.CustomDrawRowIndicator += new DevExpress.XtraGrid.Views.Grid.RowIndicatorCustomDrawEventHandler(gridView_CustomDrawRowIndicator);
|
|
|
|
|
|
|
|
|
|
gridViewGoods.GotFocus += new EventHandler(gridview_GotFocus);
|
|
|
|
|
|
|
|
|
|
switchGridViewRowSelection(gridViewSaleOrders, false);
|
|
|
|
|
|
|
|
|
|
gridViewSaleOrders.LostFocus += new EventHandler(gridview_LostFocus);
|
|
|
|
|
gridViewSaleOrders.GotFocus += new EventHandler(gridview_GotFocus);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void gridView2_CustomColumnDisplayText(object sender, DevExpress.XtraGrid.Views.Base.CustomColumnDisplayTextEventArgs e)
|
|
|
|
|
{
|
|
|
|
|
//if (sender == gridViewValidated)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (e.Column.FieldName == "state" )
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
if (!pickDetailStatus.ContainsValue(e.DisplayText))
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
int display = -100;
|
|
|
|
|
string disTxt = e.DisplayText;
|
|
|
|
|
|
|
|
|
|
try
|
|
|
|
|
{
|
2023-09-04 22:41:19 +08:00
|
|
|
|
display = Convert.ToInt32(e.DisplayText);
|
2023-05-23 16:13:17 +08:00
|
|
|
|
|
|
|
|
|
e.DisplayText = pickDetailStatus[display];
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
catch
|
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}else
|
|
|
|
|
if (e.Column.FieldName == "bulkPickState" || e.Column.FieldName == "orderState")
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
if (!pickStatus.ContainsValue(e.DisplayText))
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
int display = -100;
|
|
|
|
|
string disTxt = e.DisplayText;
|
|
|
|
|
|
|
|
|
|
try
|
|
|
|
|
{
|
2023-09-04 22:41:19 +08:00
|
|
|
|
display = Convert.ToInt32(e.DisplayText);
|
2023-05-23 16:13:17 +08:00
|
|
|
|
|
|
|
|
|
e.DisplayText = pickStatus[display];
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
catch
|
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
void gridView_CustomDrawCell(object sender, DevExpress.XtraGrid.Views.Base.RowCellCustomDrawEventArgs e)
|
|
|
|
|
{
|
|
|
|
|
//var currentView = sender as GridView;
|
|
|
|
|
//if (currentView != null && e.RowHandle == currentView.FocusedRowHandle) return;
|
|
|
|
|
Rectangle r = e.Bounds;
|
|
|
|
|
if (e.Column.FieldName == "state")
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void gridView_RowCellStyle(object sender,DevExpress.XtraGrid.Views.Grid.RowCellStyleEventArgs e)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
var currentView = sender as GridView;
|
|
|
|
|
// if( currentView != null){return;}
|
|
|
|
|
string state = currentView.GetDataRow(e.RowHandle)["orderState"].ToString().Trim();
|
|
|
|
|
|
|
|
|
|
if (string.IsNullOrEmpty(state))
|
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
2023-09-04 22:41:19 +08:00
|
|
|
|
enumOutStockPickStatus status = (enumOutStockPickStatus)Convert.ToInt32(state);
|
2023-05-23 16:13:17 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool isFocused = e.RowHandle == currentView.FocusedRowHandle;
|
|
|
|
|
DevExpress.Utils.AppearanceDefault rowStyle = null;
|
|
|
|
|
DevExpress.Utils.AppearanceDefault appBlueRed =
|
|
|
|
|
new DevExpress.Utils.AppearanceDefault (Color.White, Color.Red, Color.Empty, Color.Blue, System.Drawing.Drawing2D.LinearGradientMode.Horizontal);
|
|
|
|
|
DevExpress.Utils.AppearanceDefault appYB =
|
|
|
|
|
new DevExpress.Utils.AppearanceDefault(Color.White, Color.Red, Color.Green);
|
|
|
|
|
|
|
|
|
|
//DevExpress.Utils.AppearanceDefault alertFocus = new DevExpress.Utils.AppearanceDefault(Color.White, Color.Red, Color.Green, Color.Yellow);
|
|
|
|
|
DevExpress.Utils.AppearanceDefault alertFocus = new DevExpress.Utils.AppearanceDefault(Color.White,Color.Red);
|
|
|
|
|
DevExpress.Utils.AppearanceDefault alert = new DevExpress.Utils.AppearanceDefault(Color.Red, Color.White );
|
|
|
|
|
|
|
|
|
|
DevExpress.Utils.AppearanceDefault passedFocus = new DevExpress.Utils.AppearanceDefault(Color.Gray, Color.WhiteSmoke);
|
|
|
|
|
DevExpress.Utils.AppearanceDefault passed = new DevExpress.Utils.AppearanceDefault(Color.Gray,Color.White);
|
|
|
|
|
|
|
|
|
|
DevExpress.Utils.AppearanceDefault solutionFocus = new DevExpress.Utils.AppearanceDefault(Color.Green, Color.Yellow);
|
|
|
|
|
DevExpress.Utils.AppearanceDefault solution = new DevExpress.Utils.AppearanceDefault(Color.Green, Color.White);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (status == enumOutStockPickStatus.打包完成)
|
|
|
|
|
{
|
|
|
|
|
rowStyle = isFocused ? passedFocus : passed;
|
|
|
|
|
}
|
|
|
|
|
else if (status == enumOutStockPickStatus.复核异常)
|
|
|
|
|
{
|
|
|
|
|
rowStyle = isFocused ? alertFocus : alert;
|
|
|
|
|
}
|
|
|
|
|
else if (status == enumOutStockPickStatus.复核异常处理)
|
|
|
|
|
{
|
|
|
|
|
rowStyle = isFocused ? solutionFocus : solution;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DevExpress.Utils.AppearanceHelper.Apply(e.Appearance, rowStyle);
|
|
|
|
|
/*
|
|
|
|
|
if (sender == this.gridView2)
|
|
|
|
|
{
|
|
|
|
|
if (this.gridView2.GetDataRow(e.RowHandle)["state"].ToString().Trim() == "2")
|
|
|
|
|
{
|
|
|
|
|
DevExpress.Utils.AppearanceHelper.Apply(e.Appearance, alert);
|
|
|
|
|
}
|
|
|
|
|
}else if(sender == this.gridView1){
|
|
|
|
|
|
|
|
|
|
if ( state == "2")
|
|
|
|
|
{
|
|
|
|
|
if (currentView != null && e.RowHandle == currentView.FocusedRowHandle)
|
|
|
|
|
{
|
|
|
|
|
DevExpress.Utils.AppearanceHelper.Apply(e.Appearance, alertFocus);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
DevExpress.Utils.AppearanceHelper.Apply(e.Appearance, alert);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if (state == "1")
|
|
|
|
|
{
|
|
|
|
|
DevExpress.Utils.AppearanceHelper.Apply(e.Appearance, passed);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
*/
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void setCurrentRequestDetail()
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
if (!getCurrentObject() || string.IsNullOrEmpty( currentPickOrder))
|
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// showWaitForm();
|
|
|
|
|
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
bindGoodsDetail();
|
|
|
|
|
|
|
|
|
|
if (lgOutPickDetail.Expanded)
|
|
|
|
|
{
|
|
|
|
|
showOrderPickDetail();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
textEditPickOrderNo.Focus();
|
|
|
|
|
textEditPickOrderNo.SelectAll();
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
catch (Exception e)
|
|
|
|
|
{
|
|
|
|
|
showErrorMsg(e,e.Message);
|
|
|
|
|
}
|
|
|
|
|
// closeWaitForm();
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void showOrderPickDetail()
|
|
|
|
|
{
|
|
|
|
|
if (string.IsNullOrEmpty(currentPickOrder))
|
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
this.gridSaleOrders.DataSource = pickClient.getOutRequestDetail(currentPickOrder).DefaultView;
|
|
|
|
|
closeClient();
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
showErrorMsg(ex.Message);
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
initialGridView2Columns(gridViewSaleOrders);
|
|
|
|
|
//set pick details
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
private void bindGoodsDetail()
|
|
|
|
|
{
|
|
|
|
|
resetValidationDetails();
|
|
|
|
|
//set sales order details
|
|
|
|
|
DataView dv = dtPickOrdersDetail.DefaultView;
|
|
|
|
|
// dv.Sort = "orderNo ASC";
|
|
|
|
|
dv.RowFilter = string.Format("pickOrderNo ='{0}'", currentPickOrder);
|
|
|
|
|
|
|
|
|
|
dtGoods = dv.ToTable();
|
|
|
|
|
|
|
|
|
|
DataView dv1 = dtGoods.DefaultView;
|
|
|
|
|
dtGoods.PrimaryKey = new DataColumn[] { dtGoods.Columns["id"] };
|
|
|
|
|
this.gridGoods.DataSource = dv1;
|
|
|
|
|
initialGridView2Columns(gridViewGoods);
|
|
|
|
|
|
|
|
|
|
textEditPickOrderNo.Text = currentPickOrder;
|
|
|
|
|
textEditPickOrderNo.SelectAll();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void clearDetails()
|
|
|
|
|
{
|
|
|
|
|
btnPrint.Enabled = btnOk.Enabled = false;
|
|
|
|
|
resetValidationDetails();
|
|
|
|
|
this.gridGoods.DataSource = null;
|
|
|
|
|
lbCustmer.Text = "";
|
|
|
|
|
spinBulkBox.Value = 0;
|
|
|
|
|
spinBulkBag.Value = 0;
|
|
|
|
|
currentPickOrder = "";
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void btnPickOrders_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
getValidationOrders();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void swAutoOrder_Toggled(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
autoOrder = swAutoOrder.IsOn;
|
|
|
|
|
btnPickOrders.Enabled = !autoOrder;
|
|
|
|
|
if (autoOrder)
|
|
|
|
|
{
|
|
|
|
|
getValidationOrders();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void resetValidationDetails()
|
|
|
|
|
{
|
|
|
|
|
lastScanBarcode = "";
|
|
|
|
|
|
|
|
|
|
textEditPickOrderNo.Text = "";
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void textEditBarcode_EditValueChanged(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protected new void gridview_GotFocus(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
if (sender == gridViewGoods)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
switchGridViewRowSelection(gridViewGoods,true);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
switchGridViewRowSelection((GridView)sender, true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void textEditBarcode_MouseUp(object sender, MouseEventArgs e)
|
|
|
|
|
{
|
|
|
|
|
//如果鼠标左键操作并且标记存在,则执行全选
|
|
|
|
|
if (e.Button == MouseButtons.Left &&textEditPickOrderNo.Tag!=null&& (bool)textEditPickOrderNo.Tag == true)
|
|
|
|
|
{
|
|
|
|
|
textEditPickOrderNo.SelectAll();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//取消全选标记
|
|
|
|
|
textEditPickOrderNo.Tag = false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void textEditBarcode_GotFocus(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
textEditPickOrderNo.Tag = true; //设置标记
|
|
|
|
|
textEditPickOrderNo.SelectAll(); //注意1
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void textEditBarcode_KeyDown(object sender, KeyEventArgs e)
|
|
|
|
|
{
|
|
|
|
|
if (e.KeyCode != Keys.Enter)
|
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
string pickOrderNo = textEditPickOrderNo.Text;
|
|
|
|
|
|
|
|
|
|
if (string.IsNullOrEmpty(pickOrderNo))
|
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lastScanBarcode = pickOrderNo;
|
|
|
|
|
// textEditBarcode.BackColor = textEditValidCount.BackColor; ;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dtPickOrdersDetail = pickClient.getPackingDataByPickOrderNo(pickOrderNo);
|
|
|
|
|
clearDetails();
|
|
|
|
|
|
|
|
|
|
foreach(DataRow currentRow in dtPickOrdersDetail.Rows)
|
|
|
|
|
{
|
|
|
|
|
currentPickOrder = currentRow["pickOrderNo"].ToString();
|
|
|
|
|
lbCustmer.Text = currentRow["customerName"].ToString();
|
|
|
|
|
// currentWaveNo = currentRow["dpsOrder"].ToString();
|
|
|
|
|
this.spinBulkBox.Text = currentRow["bulkBox"].ToString();
|
|
|
|
|
this.spinBulkBag.Text = currentRow["bulkBag"].ToString();
|
2023-09-04 22:41:19 +08:00
|
|
|
|
btnOk.Enabled = Convert.ToInt32(currentRow["orderState"].ToString()) < (int)enumOutStockPickStatus.打包完成;
|
2023-05-23 16:13:17 +08:00
|
|
|
|
btnPrint.Enabled = !btnOk.Enabled;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
resetValidationDetails();
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
bindGoodsDetail();
|
|
|
|
|
this.gridSaleOrders.DataSource = null;
|
|
|
|
|
if (lgOutPickDetail.Expanded)
|
|
|
|
|
{
|
|
|
|
|
showOrderPickDetail();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
textEditPickOrderNo.Focus();
|
|
|
|
|
textEditPickOrderNo.SelectAll();
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
catch (Exception er)
|
|
|
|
|
{
|
|
|
|
|
showErrorMsg(er, er.Message);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
DataRow[] drs = dtPickOrders.Select(string.Format("pickOrderNo ='{0}'", pickOrderNo));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (drs.Length == 0)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
currentPickOrder = pickOrderNo;
|
|
|
|
|
if (!string.IsNullOrEmpty(currentPickOrder))
|
|
|
|
|
{
|
|
|
|
|
selectedRowIndex = -1;
|
|
|
|
|
DataRow dr = dtPickOrders.Rows.Find(currentPickOrder);
|
|
|
|
|
if (dr != null)
|
|
|
|
|
{
|
|
|
|
|
// selectedRowIndex = dtPickOrders.Rows.IndexOf(dr);
|
|
|
|
|
selectedRowIndex = 0;
|
|
|
|
|
foreach (DataRowView drv in GetGridViewFilteredAndSortedData(gridViewPickOrders))
|
|
|
|
|
{
|
|
|
|
|
if (drv["pickOrderNo"].ToString().Equals(currentPickOrder))
|
|
|
|
|
{
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
selectedRowIndex++;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
selectedRowIndex = 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (selectedRowIndex >= 0 && dtPickOrders.Rows.Count > selectedRowIndex)
|
|
|
|
|
{
|
|
|
|
|
// gridView1.SelectRow(selectedRowIndex);
|
|
|
|
|
int i = selectedRowIndex;
|
|
|
|
|
selectedRowIndex = 0;
|
|
|
|
|
gridViewPickOrders.FocusedRowHandle = i;
|
|
|
|
|
// gridView1.MakeRowVisible(selectedRowIndex);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//gridView1.FocusedRowHandle = selectedRowIndex;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
gridViewGoods.Focus();
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
string tmpOrder = string.Empty;
|
|
|
|
|
int boxcnt =0;
|
|
|
|
|
int bagcnt = 0;
|
|
|
|
|
|
|
|
|
|
private void btnPrint_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
printCodes(currentPickOrder);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
showErrorMsg(ex.Message);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
printIn reqportPrint = new printIn();
|
|
|
|
|
void completeValidation()
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
//pickClient.completeBulkValidation(tmpOrder, boxcnt, bagcnt, dtGoods);
|
|
|
|
|
pickClient.completeSeedsPack(tmpOrder, boxcnt, bagcnt);
|
|
|
|
|
// closeClient();
|
|
|
|
|
|
|
|
|
|
//TODO: print bulk boxs\bags label
|
|
|
|
|
//t_tmsStock
|
|
|
|
|
printCodes(tmpOrder);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
closeClient();
|
|
|
|
|
showErrorMsg(ex.Message);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// lgt.completeBulkValidation(currentPickOrder, dtPickOrdersValidated);
|
|
|
|
|
|
|
|
|
|
// currentPickOrder = null;
|
|
|
|
|
}
|
|
|
|
|
private void printCodes(string orderNo)
|
|
|
|
|
{
|
|
|
|
|
DataTable dt = tmsClient.getTmsStockBulkDetail(orderNo);
|
|
|
|
|
reqportPrint.printBulkPacking(dt);
|
|
|
|
|
//closeClient();
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
private void textEditValidCount_EditValueChanged(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void GoodsOutValidationForm_FormClosing(object sender, FormClosingEventArgs e)
|
|
|
|
|
{
|
|
|
|
|
timer.Stop();
|
|
|
|
|
timer.Close();
|
|
|
|
|
closeClient();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void lgOutPickDetail_CustomButtonChecked(object sender, DevExpress.XtraBars.Docking2010.BaseButtonEventArgs e)
|
|
|
|
|
{
|
|
|
|
|
this.gridSaleOrders.DataSource = null;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void lgOutPickDetail_CustomButtonUnchecked(object sender, DevExpress.XtraBars.Docking2010.BaseButtonEventArgs e)
|
|
|
|
|
{
|
|
|
|
|
showOrderPickDetail();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void combColors_SelectedIndexChanged(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
if (oldDesk == "-1")
|
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
showWaitForm();
|
|
|
|
|
this.refreshInterval = 0;
|
|
|
|
|
clearDetails();
|
|
|
|
|
getValidationOrders();
|
|
|
|
|
closeWaitForm();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void spinOrder_EditValueChanged(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
refreshInterval = Convert.ToInt32(spinOrder.Value * 60);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void btnOk_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
2023-09-04 22:41:19 +08:00
|
|
|
|
boxcnt = Convert.ToInt32(spinBulkBox.Value);
|
|
|
|
|
bagcnt = Convert.ToInt32(spinBulkBag.Value);
|
2023-05-23 16:13:17 +08:00
|
|
|
|
|
|
|
|
|
if (boxcnt + bagcnt == 0)
|
|
|
|
|
{
|
|
|
|
|
showErrorMsg("请设置零货拼箱、拼袋数量");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//save the box/bag info
|
|
|
|
|
|
|
|
|
|
//handle tran system
|
|
|
|
|
|
|
|
|
|
//print
|
|
|
|
|
|
|
|
|
|
//close current order
|
|
|
|
|
getCurrentObject();
|
|
|
|
|
tmpOrder = currentPickOrder;
|
|
|
|
|
Thread completeThread = new Thread(completeValidation);
|
|
|
|
|
completeThread.IsBackground = true;
|
|
|
|
|
completeThread.Start();
|
|
|
|
|
//remove the order from pickorder list
|
|
|
|
|
clearDetails();
|
2024-11-15 23:52:43 +08:00
|
|
|
|
return;
|
2023-05-23 16:13:17 +08:00
|
|
|
|
if (dtPickOrders.Rows.Count < 2)
|
|
|
|
|
{
|
|
|
|
|
showWaitForm();
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
getPickOrders4Validation();
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ee)
|
|
|
|
|
{
|
|
|
|
|
LogHelper.WriteLog(typeof(GoodsOutSeedsPackForm), ee);
|
|
|
|
|
closeWaitForm();
|
|
|
|
|
}
|
|
|
|
|
closeWaitForm();
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
DataRow dr = dtPickOrders.Rows.Find(currentPickOrder);
|
|
|
|
|
if (dr != null)
|
|
|
|
|
{
|
|
|
|
|
dtPickOrders.Rows.Remove(dr);
|
|
|
|
|
}
|
|
|
|
|
currentPickOrder = null;
|
|
|
|
|
this.selectedRowIndex = 0;
|
|
|
|
|
loadPickOrders();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|