547 lines
17 KiB
C#
547 lines
17 KiB
C#
|
|
using System;
|
|||
|
|
using System.Collections.Generic;
|
|||
|
|
using System.ComponentModel;
|
|||
|
|
using System.Data;
|
|||
|
|
using System.Drawing;
|
|||
|
|
using System.Linq;
|
|||
|
|
using System.Text;
|
|||
|
|
using System.Windows.Forms;
|
|||
|
|
using WMS.Frm.Base;
|
|||
|
|
using WMS.Model.RK;
|
|||
|
|
|
|||
|
|
using WMS.Common;
|
|||
|
|
using DevExpress.XtraGrid.Columns;
|
|||
|
|
using DevExpress.XtraEditors.Repository;
|
|||
|
|
using WMS.Ctrl;
|
|||
|
|
using WMS.Model.Base;
|
|||
|
|
|
|||
|
|
using WMS.FrmBaseData;
|
|||
|
|
using WMS.Business;
|
|||
|
|
using WMS.Business.Base;
|
|||
|
|
|
|||
|
|
namespace WMS.FrmRK
|
|||
|
|
{
|
|||
|
|
/// <summary>
|
|||
|
|
/// 窗体:上架确认
|
|||
|
|
/// </summary>
|
|||
|
|
public partial class FrmUpConfirm : FormBase
|
|||
|
|
{
|
|||
|
|
#region 定义变量
|
|||
|
|
|
|||
|
|
private AutoRkGoodsInfo onshlefGoods = new AutoRkGoodsInfo();
|
|||
|
|
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// 上架单集合
|
|||
|
|
/// </summary>
|
|||
|
|
List<AutoRkGoodsInfo> listUpShelfGoodsModel = new List<AutoRkGoodsInfo>();
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// 上架单明细
|
|||
|
|
/// </summary>
|
|||
|
|
List<AutoRkGoodsInfo> listOnShelfGoodsModel = new List<AutoRkGoodsInfo>();
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
public FrmUpConfirm()
|
|||
|
|
{
|
|||
|
|
InitializeComponent();
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
#region 绑定单据状态
|
|||
|
|
/// <summary>
|
|||
|
|
/// 绑定单据状态
|
|||
|
|
/// </summary>
|
|||
|
|
private void BindStatus()
|
|||
|
|
{
|
|||
|
|
DataTable dt = new DataTable();
|
|||
|
|
dt.Columns.Add("ID", typeof(string));
|
|||
|
|
dt.Columns.Add("Status", typeof(string));
|
|||
|
|
|
|||
|
|
DataRow dr = dt.NewRow();
|
|||
|
|
dr["ID"] = "0";
|
|||
|
|
dr["Status"] = "未 打印";
|
|||
|
|
dt.Rows.Add(dr);
|
|||
|
|
|
|||
|
|
dr = dt.NewRow();
|
|||
|
|
dr["ID"] = "1";
|
|||
|
|
dr["Status"] = "已打印";
|
|||
|
|
dt.Rows.Add(dr);
|
|||
|
|
|
|||
|
|
dr = dt.NewRow();
|
|||
|
|
dr["ID"] = "2";
|
|||
|
|
dr["Status"] = "已上架";
|
|||
|
|
dt.Rows.Add(dr);
|
|||
|
|
|
|||
|
|
dr = dt.NewRow();
|
|||
|
|
dr["ID"] = "3";
|
|||
|
|
dr["Status"] = "已作废";
|
|||
|
|
dt.Rows.Add(dr);
|
|||
|
|
|
|||
|
|
dr = dt.NewRow();
|
|||
|
|
dr["ID"] = "4";
|
|||
|
|
dr["Status"] = "全部";
|
|||
|
|
dt.Rows.Add(dr);
|
|||
|
|
|
|||
|
|
lue_Status.Properties.DataSource = dt;
|
|||
|
|
lue_Status.ItemIndex = 1;
|
|||
|
|
}
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
private void FrmUpConfirm_Load(object sender, EventArgs e)
|
|||
|
|
{
|
|||
|
|
|
|||
|
|
UpShelfGoodsBind();
|
|||
|
|
BindStatus();//绑定状态
|
|||
|
|
|
|||
|
|
#region 绑定仓库 库区 库位
|
|||
|
|
|
|||
|
|
//绑定库区
|
|||
|
|
StorageAreaModel are_model = new StorageAreaModel();
|
|||
|
|
|
|||
|
|
|
|||
|
|
//List<StorageAreaModel> li_StorageAreaModel = IBussFactory<BussStorageArea>.Instance().GetAreaInfoDS(are_model);
|
|||
|
|
|
|||
|
|
//lue_Area.DisplayMember = "STORAGE_AREA_NAME";
|
|||
|
|
//lue_Area.ValueMember = "STORAGE_AREA_ID";
|
|||
|
|
//lue_Area.DataSource = li_StorageAreaModel;
|
|||
|
|
|
|||
|
|
//绑定仓库
|
|||
|
|
StorageInfoModel storageInfoModel = new StorageInfoModel();
|
|||
|
|
|
|||
|
|
List<StorageInfoModel> li_StorageInfoModel = IBussFactory<BussStorageInfo>.Instance().GetStorageInfoDS(storageInfoModel);
|
|||
|
|
lue_Status.Properties.DisplayMember = "STORAGE_NAME";
|
|||
|
|
lue_Status.Properties.ValueMember = "STORAGE_ID";
|
|||
|
|
lue_Status.Properties.DataSource = li_StorageInfoModel;
|
|||
|
|
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
#region 绑定数据
|
|||
|
|
/// <summary>
|
|||
|
|
/// 绑定数据
|
|||
|
|
/// </summary>
|
|||
|
|
private void UpShelfGoodsBind()
|
|||
|
|
{
|
|||
|
|
string errText = string.Empty;
|
|||
|
|
|
|||
|
|
listUpShelfGoodsModel = IBussFactory<BussAutoRk>.Instance().GetRkData("RF");
|
|||
|
|
|
|||
|
|
if (listUpShelfGoodsModel!=null)
|
|||
|
|
{
|
|||
|
|
onShelfGoodsInfoBindingSource.DataSource = listUpShelfGoodsModel;
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
private void GvUpShelf_DoubleClick(object sender, EventArgs e)
|
|||
|
|
{
|
|||
|
|
//if (upShelfGoodsModel.STATUS == "1")
|
|||
|
|
//{
|
|||
|
|
// frmButtonItem["Edit"].Enabled = true;
|
|||
|
|
//}
|
|||
|
|
//else
|
|||
|
|
//{
|
|||
|
|
// frmButtonItem["Edit"].Enabled = false;
|
|||
|
|
//}
|
|||
|
|
|
|||
|
|
//Edit();
|
|||
|
|
xtraTabControl1.SelectedTabPageIndex = 1;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
#region 焦点行变化
|
|||
|
|
/// <summary>
|
|||
|
|
/// 焦点行变化
|
|||
|
|
/// </summary>
|
|||
|
|
/// <param name="sender"></param>
|
|||
|
|
/// <param name="e"></param>
|
|||
|
|
private void GvUpShelf_FocusedRowChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventArgs e)
|
|||
|
|
{
|
|||
|
|
int rowIndex = e.FocusedRowHandle;
|
|||
|
|
if (rowIndex < 0)
|
|||
|
|
{
|
|||
|
|
// xtraTabPage2.Text = "上架单明细";
|
|||
|
|
return;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
#region 查询条件下的上架单
|
|||
|
|
/// <summary>
|
|||
|
|
/// 查询条件下的上架单
|
|||
|
|
/// </summary>
|
|||
|
|
private void SearchData()
|
|||
|
|
{
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
//string str_upGoods = Newtonsoft.Json.JsonConvert.SerializeObject(upShelfGoodsModel);
|
|||
|
|
string str_list = "";
|
|||
|
|
string errText = "";
|
|||
|
|
try
|
|||
|
|
{
|
|||
|
|
// str_list = WebLockConfig.Instance.WebOnGoodShelf.GetUpShelfGoodsData(strSql, ref errText);
|
|||
|
|
}
|
|||
|
|
catch (Exception ex)
|
|||
|
|
{
|
|||
|
|
SystemCommon.ShowInfoMessageBox("网络连接错误!");
|
|||
|
|
return;
|
|||
|
|
}
|
|||
|
|
onShelfGoodsInfoBindingSource.DataSource = listUpShelfGoodsModel;
|
|||
|
|
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
#region 按钮事件
|
|||
|
|
|
|||
|
|
#region 刷新
|
|||
|
|
/// <summary>
|
|||
|
|
/// 刷新
|
|||
|
|
/// </summary>
|
|||
|
|
public void Refresh()
|
|||
|
|
{
|
|||
|
|
UpShelfGoodsBind();
|
|||
|
|
}
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
#region 编辑
|
|||
|
|
/// <summary>
|
|||
|
|
/// 编辑
|
|||
|
|
/// </summary>
|
|||
|
|
public void Edit()
|
|||
|
|
{
|
|||
|
|
xtraTabControl1.SelectedTabPageIndex = 1;
|
|||
|
|
if (frmButtonItem.ContainsKey("Confirm"))
|
|||
|
|
{
|
|||
|
|
colLOCATION_ID.OptionsColumn.AllowEdit = true;
|
|||
|
|
colLOT_ID.OptionsColumn.AllowEdit = true;
|
|||
|
|
colSTOCK_NUM.OptionsColumn.AllowEdit = true;
|
|||
|
|
frmButtonItem["Confirm"].Enabled = true;
|
|||
|
|
frmButtonItem["Edit"].Enabled = false;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
#region 上架入库
|
|||
|
|
/// <summary>
|
|||
|
|
/// 上架入库
|
|||
|
|
/// </summary>
|
|||
|
|
public void Confirm()
|
|||
|
|
{
|
|||
|
|
xtraTabControl1.Focus();
|
|||
|
|
//判断上架单集合是否存在数据
|
|||
|
|
if (listUpShelfGoodsModel.Count < 1)
|
|||
|
|
{
|
|||
|
|
SystemCommon.ShowErrorMessageBox("不存在上架确认数据!");
|
|||
|
|
return;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
////上架单明细
|
|||
|
|
//for (int i = 0; i < listOnShelfGoodsModel.Count; i++)
|
|||
|
|
//{
|
|||
|
|
// if (listOnShelfGoodsModel[i].STOCK_NUM <= 0)
|
|||
|
|
// {
|
|||
|
|
// SystemCommon.ShowErrorMessageBox("请填写实际上架数量!");
|
|||
|
|
// return;
|
|||
|
|
// }
|
|||
|
|
// if (string.IsNullOrEmpty(listOnShelfGoodsModel[i].LOCATION_ID))
|
|||
|
|
// {
|
|||
|
|
// SystemCommon.ShowErrorMessageBox("请选择库位!");
|
|||
|
|
// return;
|
|||
|
|
// }
|
|||
|
|
//}
|
|||
|
|
|
|||
|
|
if (ctl_Loc.TextBoxValue.Trim().Length==0)
|
|||
|
|
{
|
|||
|
|
SystemCommon.ShowErrorMessageBox("请选择库位!");
|
|||
|
|
return;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
string errText = string.Empty;
|
|||
|
|
string barCode = t_barCode.Text;
|
|||
|
|
string psLoc = tx_lc.Text;
|
|||
|
|
decimal num = decimal.Parse(t_Onsjsl.Text);
|
|||
|
|
string ctl = t_ctl.Text;
|
|||
|
|
string loc = ctl_Loc.TextBoxValue;
|
|||
|
|
decimal psNum = decimal.Parse(tx_ps.Text);
|
|||
|
|
IBussFactory<BussAutoRk>.Instance().UpadateTaskData(ctl,loc, barCode,psLoc, num,psNum);
|
|||
|
|
|
|||
|
|
if (errText != "")
|
|||
|
|
{
|
|||
|
|
SystemCommon.ShowErrorMessageBox(errText);
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
{
|
|||
|
|
SystemCommon.ShowInfoMessageBox("上架确认完成!");
|
|||
|
|
UpShelfGoodsBind();
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
#region 查询
|
|||
|
|
/// <summary>
|
|||
|
|
/// 查询
|
|||
|
|
/// </summary>
|
|||
|
|
public void Search()
|
|||
|
|
{
|
|||
|
|
SearchData();
|
|||
|
|
}
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
#region 读取商品资料
|
|||
|
|
/// <summary>
|
|||
|
|
/// 读取商品资料
|
|||
|
|
/// </summary>
|
|||
|
|
/// <param name="sender"></param>
|
|||
|
|
/// <param name="e"></param>
|
|||
|
|
private void repositoryItemHyperLinkEdit1_Click(object sender, EventArgs e)
|
|||
|
|
{
|
|||
|
|
AutoRkGoodsInfo model = GvOnShelf.GetFocusedRow() as AutoRkGoodsInfo;
|
|||
|
|
if (model != null && !string.IsNullOrEmpty(model.GOODSID))
|
|||
|
|
{
|
|||
|
|
FrmGoodsInfoDet.IFlag = 2;
|
|||
|
|
FrmGoodsInfoDet.StrGoodsID = model.GOODSID;
|
|||
|
|
LoadForm load = new LoadForm();
|
|||
|
|
DevExpress.XtraSplashScreen.SplashScreenManager.ShowForm(load, load.GetType(), false, true, false, 0);
|
|||
|
|
DevExpress.XtraSplashScreen.SplashScreenManager.Default.SetWaitFormDescription("正在读取商品信息....");
|
|||
|
|
FrmGoodsInfoDet.GetInstance().Show();
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
#region 仓库变动查询库区
|
|||
|
|
/// <summary>
|
|||
|
|
/// 仓库变动查询库区
|
|||
|
|
/// </summary>
|
|||
|
|
/// <param name="sender"></param>
|
|||
|
|
/// <param name="e"></param>
|
|||
|
|
private void lue_Stprage_EditValueChanged(object sender, EventArgs e)
|
|||
|
|
{
|
|||
|
|
if (listOnShelfGoodsModel.Count < 0)
|
|||
|
|
{
|
|||
|
|
return;
|
|||
|
|
}
|
|||
|
|
LoadLocalStorageAreaData(GvOnShelf.FocusedRowHandle);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// 查询库区
|
|||
|
|
/// </summary>
|
|||
|
|
/// <param name="index"></param>
|
|||
|
|
private void LoadLocalStorageAreaData(int index)
|
|||
|
|
{
|
|||
|
|
try
|
|||
|
|
{
|
|||
|
|
string storageID = GvOnShelf.GetRowCellValue(index, colSTORAGE_ID).ToString();
|
|||
|
|
|
|||
|
|
StorageAreaModel areaInfoModel = new StorageAreaModel();
|
|||
|
|
areaInfoModel.STORAGE_ID = storageID;
|
|||
|
|
string errText = "";
|
|||
|
|
//string str_model = Newtonsoft.Json.JsonConvert.SerializeObject(areaInfoModel);
|
|||
|
|
//string str_list = WebLockConfig.Instance.StorageArea.GetAreaInfoDS(str_model, ref errText);
|
|||
|
|
//List<StorageAreaModel> list_area = Newtonsoft.Json.JsonConvert.DeserializeObject<List<StorageAreaModel>>(str_list);
|
|||
|
|
// bgsStorageArea.DataSource = list_area;
|
|||
|
|
}
|
|||
|
|
catch (Exception ex)
|
|||
|
|
{
|
|||
|
|
SystemCommon.ShowInfoMessageBox("系统出现异常!" + ex.Message.ToString());
|
|||
|
|
return;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
#region 库区变动查库位
|
|||
|
|
/// <summary>
|
|||
|
|
/// 库区变动查库位
|
|||
|
|
/// </summary>
|
|||
|
|
/// <param name="sender"></param>
|
|||
|
|
/// <param name="e"></param>
|
|||
|
|
private void lue_Area_EditValueChanged(object sender, EventArgs e)
|
|||
|
|
{
|
|||
|
|
LoadLocalStorageLocData(GvOnShelf.FocusedRowHandle);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// 查询库位
|
|||
|
|
/// </summary>
|
|||
|
|
private void LoadLocalStorageLocData(int index)
|
|||
|
|
{
|
|||
|
|
try
|
|||
|
|
{
|
|||
|
|
string strogId = string.Empty;
|
|||
|
|
string areagId = string.Empty;
|
|||
|
|
|
|||
|
|
if (GvOnShelf.RowCount <= 0)
|
|||
|
|
{
|
|||
|
|
|
|||
|
|
return;
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
//strogId = GvOnShelf.GetRowCellValue(index, colSTORAGE_AREA_ID).ToString();//库区
|
|||
|
|
//areagId = GvOnShelf.GetRowCellValue(index, colSTORAGE_ID).ToString();//仓库
|
|||
|
|
//string localData = WebLockConfig.Instance.StorageAreaLocation.GetLocationInfoBeginEnd(areagId, strogId.ToString());
|
|||
|
|
|
|||
|
|
//List<StorageAreaLocationModel> listLotInfo = Newtonsoft.Json.JsonConvert.DeserializeObject<List<StorageAreaLocationModel>>(localData);
|
|||
|
|
|
|||
|
|
//if (listLotInfo.Count > 0)
|
|||
|
|
//{
|
|||
|
|
// bgsStorageLocal.DataSource = listLotInfo;
|
|||
|
|
|
|||
|
|
//}
|
|||
|
|
}
|
|||
|
|
catch (Exception ex)
|
|||
|
|
{
|
|||
|
|
SystemCommon.ShowInfoMessageBox("系统出现异常!" + ex.Message.ToString());
|
|||
|
|
return;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
#region 输入上架明细
|
|||
|
|
|
|||
|
|
AutoRkGoodsInfo _goods = new AutoRkGoodsInfo();//临时
|
|||
|
|
private decimal old_count = 0;
|
|||
|
|
/// <summary>
|
|||
|
|
/// 输入上架明细
|
|||
|
|
/// </summary>
|
|||
|
|
/// <param name="sender"></param>
|
|||
|
|
/// <param name="e"></param>
|
|||
|
|
private void GvOnShelf_CellValueChanged(object sender, DevExpress.XtraGrid.Views.Base.CellValueChangedEventArgs e)
|
|||
|
|
{
|
|||
|
|
if (e.Column.Name == "colSTOCK_NUM")
|
|||
|
|
{
|
|||
|
|
onshlefGoods = GvOnShelf.GetFocusedRow() as AutoRkGoodsInfo;
|
|||
|
|
if (onshlefGoods != null)
|
|||
|
|
{
|
|||
|
|
if (onshlefGoods.LOCATION_ID == "")
|
|||
|
|
{
|
|||
|
|
SystemCommon.ShowInfoMessageBox("请选择库位!");
|
|||
|
|
GvOnShelf.SetFocusedRowCellValue(colSTOCK_NUM, onshlefGoods.STO_NUM);
|
|||
|
|
return;
|
|||
|
|
}
|
|||
|
|
old_count = onshlefGoods.STO_NUM;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
decimal new_count = Convert.ToDecimal(GvOnShelf.GetFocusedRowCellValue(colSTOCK_NUM).ToString());
|
|||
|
|
|
|||
|
|
if (new_count == 0)
|
|||
|
|
{
|
|||
|
|
return;
|
|||
|
|
}
|
|||
|
|
if (new_count > old_count)
|
|||
|
|
{
|
|||
|
|
SystemCommon.ShowInfoMessageBox("上架总数量不能超过 " + (int)old_count);
|
|||
|
|
GvOnShelf.SetFocusedRowCellValue(colSTOCK_NUM, 0);
|
|||
|
|
return;
|
|||
|
|
}
|
|||
|
|
listOnShelfGoodsModel = onShelfGoodsInfoBindingSource.DataSource as List<AutoRkGoodsInfo>;
|
|||
|
|
decimal sum = listOnShelfGoodsModel.FindAll(r => r.GOODSID == onshlefGoods.GOODSID).Sum(x => x.STOCK_NUM);
|
|||
|
|
|
|||
|
|
if (sum == old_count)
|
|||
|
|
{
|
|||
|
|
return;
|
|||
|
|
}
|
|||
|
|
if (sum > old_count)
|
|||
|
|
{
|
|||
|
|
SystemCommon.ShowInfoMessageBox("上架总数量不能超过 " + (int)old_count);
|
|||
|
|
GvOnShelf.SetFocusedRowCellValue(colSTOCK_NUM, 0);
|
|||
|
|
return;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
listOnShelfGoodsModel = onShelfGoodsInfoBindingSource.DataSource as List<AutoRkGoodsInfo>;
|
|||
|
|
if (listOnShelfGoodsModel.Count <= 0)
|
|||
|
|
{
|
|||
|
|
return;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
if (new_count > old_count)
|
|||
|
|
{
|
|||
|
|
SystemCommon.ShowInfoMessageBox("上架总数量不能超过 " + (int)old_count);
|
|||
|
|
GvOnShelf.SetFocusedRowCellValue(colSTOCK_NUM, 0);
|
|||
|
|
return;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
decimal _newcount = old_count - sum;
|
|||
|
|
|
|||
|
|
_goods.SHELF_NUM = onshlefGoods.SHELF_NUM;
|
|||
|
|
_goods.STORAGE_AREA_ID = onshlefGoods.STORAGE_AREA_ID;
|
|||
|
|
_goods.PROVIDER_NAME = onshlefGoods.PROVIDER_NAME;
|
|||
|
|
_goods.PROVIDER_ID = onshlefGoods.PROVIDER_ID;
|
|||
|
|
_goods.STORAGE_AREA_ID = onshlefGoods.STORAGE_AREA_ID;
|
|||
|
|
_goods.STORAGE_AREA_NAME = onshlefGoods.STORAGE_AREA_NAME;
|
|||
|
|
_goods.LOCATION_ID = onshlefGoods.LOCATION_ID;
|
|||
|
|
_goods.STORAGE_MODE = onshlefGoods.STORAGE_MODE;
|
|||
|
|
_goods.UPGOODS_ID = onshlefGoods.UPGOODS_ID;
|
|||
|
|
_goods.STORAGE_ID = onshlefGoods.STORAGE_ID;
|
|||
|
|
_goods.STO_NUM = onshlefGoods.STO_NUM;
|
|||
|
|
_goods.STOCK_NUM = _newcount;
|
|||
|
|
_goods.STORAGE_NAME = onshlefGoods.STORAGE_NAME;
|
|||
|
|
_goods.GOODSID = onshlefGoods.GOODSID;
|
|||
|
|
_goods.GOODSNAME = onshlefGoods.GOODSNAME;
|
|||
|
|
_goods.LOT_ID = onshlefGoods.LOT_ID;
|
|||
|
|
|
|||
|
|
|
|||
|
|
listOnShelfGoodsModel.Add(_goods);
|
|||
|
|
GvOnShelf.RefreshData();
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
private void GvOnShelf_RowClick(object sender, DevExpress.XtraGrid.Views.Grid.RowClickEventArgs e)
|
|||
|
|
{
|
|||
|
|
if(GvOnShelf.RowCount==0)
|
|||
|
|
{
|
|||
|
|
return;
|
|||
|
|
}
|
|||
|
|
onshlefGoods = GvOnShelf.GetFocusedRow() as AutoRkGoodsInfo;
|
|||
|
|
txt_upgoods_ID.Text = onshlefGoods.UPGOODS_ID;
|
|||
|
|
txt_LotID.Text = onshlefGoods.LOT_ID;
|
|||
|
|
lue_Status.Text = onshlefGoods.STORAGE_ID;
|
|||
|
|
ctl_Loc.Text = onshlefGoods.LOCATION_ID;
|
|||
|
|
lue_Status.EditValue = onshlefGoods.STORAGE_ID;
|
|||
|
|
t_ctl.Text = onshlefGoods.CTL.ToString();
|
|||
|
|
t_sjsl.Text = onshlefGoods.ACC_NUM.ToString();
|
|||
|
|
t_Onsjsl.Text = onshlefGoods.SHELF_NUM.ToString();
|
|||
|
|
tx_ps.Text = onshlefGoods.DAMAGE_NUM.ToString();
|
|||
|
|
txt_upgoods_ID.Tag = onshlefGoods.GOODSID;
|
|||
|
|
t_barCode.Text = onshlefGoods.BarCode;
|
|||
|
|
t_goodsId.Text = onshlefGoods.GOODSNAME;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
private void checkBox1_CheckedChanged(object sender, EventArgs e)
|
|||
|
|
{
|
|||
|
|
tx_ps.Text = "0";
|
|||
|
|
tx_lc.Text = "";
|
|||
|
|
if (checkBox1.Checked)
|
|||
|
|
{
|
|||
|
|
tx_ps.ReadOnly = true;
|
|||
|
|
tx_lc.Enabled = true;
|
|||
|
|
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
{
|
|||
|
|
tx_lc.Enabled = false;
|
|||
|
|
tx_ps.ReadOnly = false ;
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|