Commit c7937a15 LN

1

2 个父辈 76a05e6f a360d0cc
......@@ -35,6 +35,7 @@
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.grpBoxLog = new System.Windows.Forms.GroupBox();
this.grpBoxOperation = new System.Windows.Forms.GroupBox();
this.comboBoxSize = new System.Windows.Forms.ComboBox();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.btnOut4 = new System.Windows.Forms.Button();
this.btnOut3 = new System.Windows.Forms.Button();
......@@ -56,10 +57,10 @@
//
this.lstBoxInOK.Dock = System.Windows.Forms.DockStyle.Fill;
this.lstBoxInOK.FormattingEnabled = true;
this.lstBoxInOK.ItemHeight = 20;
this.lstBoxInOK.Location = new System.Drawing.Point(3, 23);
this.lstBoxInOK.ItemHeight = 17;
this.lstBoxInOK.Location = new System.Drawing.Point(3, 19);
this.lstBoxInOK.Name = "lstBoxInOK";
this.lstBoxInOK.Size = new System.Drawing.Size(253, 589);
this.lstBoxInOK.Size = new System.Drawing.Size(253, 593);
this.lstBoxInOK.TabIndex = 0;
//
// grpBoxOKList
......@@ -76,9 +77,9 @@
// richTextBox1
//
this.richTextBox1.Dock = System.Windows.Forms.DockStyle.Fill;
this.richTextBox1.Location = new System.Drawing.Point(3, 23);
this.richTextBox1.Location = new System.Drawing.Point(3, 19);
this.richTextBox1.Name = "richTextBox1";
this.richTextBox1.Size = new System.Drawing.Size(510, 589);
this.richTextBox1.Size = new System.Drawing.Size(510, 593);
this.richTextBox1.TabIndex = 2;
this.richTextBox1.Text = "";
//
......@@ -112,6 +113,7 @@
//
// grpBoxOperation
//
this.grpBoxOperation.Controls.Add(this.comboBoxSize);
this.grpBoxOperation.Controls.Add(this.groupBox1);
this.grpBoxOperation.Controls.Add(this.btnOutStore);
this.grpBoxOperation.Controls.Add(this.cmbPosition);
......@@ -125,6 +127,15 @@
this.grpBoxOperation.TabStop = false;
this.grpBoxOperation.Text = "料仓操作";
//
// comboBoxSize
//
this.comboBoxSize.FormattingEnabled = true;
this.comboBoxSize.Location = new System.Drawing.Point(15, 112);
this.comboBoxSize.Name = "comboBoxSize";
this.comboBoxSize.Size = new System.Drawing.Size(150, 25);
this.comboBoxSize.TabIndex = 5;
this.comboBoxSize.SelectedIndexChanged += new System.EventHandler(this.comboBoxSize_SelectedIndexChanged);
//
// groupBox1
//
this.groupBox1.Controls.Add(this.btnOut4);
......@@ -191,14 +202,14 @@
// cmbPosition
//
this.cmbPosition.FormattingEnabled = true;
this.cmbPosition.Location = new System.Drawing.Point(15, 114);
this.cmbPosition.Location = new System.Drawing.Point(15, 152);
this.cmbPosition.Name = "cmbPosition";
this.cmbPosition.Size = new System.Drawing.Size(150, 28);
this.cmbPosition.Size = new System.Drawing.Size(150, 25);
this.cmbPosition.TabIndex = 2;
//
// btnStartAuto
//
this.btnStartAuto.Location = new System.Drawing.Point(15, 170);
this.btnStartAuto.Location = new System.Drawing.Point(15, 196);
this.btnStartAuto.Name = "btnStartAuto";
this.btnStartAuto.Size = new System.Drawing.Size(150, 47);
this.btnStartAuto.TabIndex = 1;
......@@ -218,7 +229,7 @@
//
// FrmInOutStore
//
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F);
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1003, 621);
this.Controls.Add(this.tableLayoutPanel1);
......@@ -253,5 +264,6 @@
private System.Windows.Forms.Button btnOut3;
private System.Windows.Forms.Button btnOut2;
private System.Windows.Forms.Button btnOut1;
private System.Windows.Forms.ComboBox comboBoxSize;
}
}
\ No newline at end of file
......@@ -109,6 +109,7 @@ namespace OnlineStore.ACSingleStore
LastStageInOutStep lastStageInOutStep;
GeneralInOutStep generalInOutStep;
public List<int> curState; //料盘所在位置
private PositionInfo PositionInfo;
private List<string> PositionNumList;//需要跑位的所有信息
public FrmInOutStore(BoxBean store)
{
......@@ -118,6 +119,8 @@ namespace OnlineStore.ACSingleStore
generalInOutStep = new GeneralInOutStep();
moveToStartPosStep = new MoveToStartPosStep();
needToInStoreNumList = new List<string>();
PositionInfo = new PositionInfo(store);
PositionInfo.IniPosition();
PositionNumList = new List<string>();
curState = new List<int>();
iniPositionStep = new IniPositionStep();
......@@ -132,11 +135,16 @@ namespace OnlineStore.ACSingleStore
LogUtil.logBox = this.richTextBox1;
btnStartAuto.Text = StartAuto;
mainTimer.Tick += MainTimer_Tick;
if (store.PositionNumList.Count > 0)
if (PositionInfo.PositionDic.Count > 0)
{
cmbPosition.DataSource = store.PositionNumList;
cmbPosition.SelectedIndex = 0;
comboBoxSize.DataSource = PositionInfo.PositionDic.Keys.ToList<string>();
comboBoxSize.SelectedIndex = 0;
}
cmbPosition.DataSource = PositionInfo.PositionDic[comboBoxSize.SelectedItem.ToString()];
PositionNumList = PositionInfo.PositionDic[comboBoxSize.SelectedItem.ToString()];
cmbPosition.SelectedIndex = 0;
}
/// <summary>
......@@ -1178,7 +1186,7 @@ namespace OnlineStore.ACSingleStore
/// <param name="fromPositionIdx"></param>
public void OutStoreExecution(int fromPositionIdx)
{
string selectPositionNum =PositionNumList[fromPositionIdx];
string selectPositionNum = PositionNumList[fromPositionIdx];
store.StartOutStoreMove(new InOutParam(new InOutPosInfo("AUTOINOUT", selectPositionNum)));
//LogUtil.info(LOGGER, selectPositionNum + "出库");
}
......@@ -1196,5 +1204,46 @@ namespace OnlineStore.ACSingleStore
}
private void comboBoxSize_SelectedIndexChanged(object sender, EventArgs e)
{
cmbPosition.DataSource = PositionInfo.PositionDic[comboBoxSize.SelectedItem.ToString()];
PositionNumList=PositionInfo.PositionDic[comboBoxSize.SelectedItem.ToString()];
cmbPosition.SelectedIndex = 0;
}
}
class PositionInfo
{
public Dictionary<string, List<string>> PositionDic;
private BoxBean boxBean;
public PositionInfo(BoxBean boxBean)
{
this.boxBean = boxBean;
PositionDic = new Dictionary<string, List<string>>();
}
public void IniPosition()
{
List<ACStorePosition> positionList = CSVPositionReader<ACStorePosition>.getPositionList();
string size = "";
foreach (ACStorePosition position in positionList)
{
bool result = ACStorePosition.CheckPosition(position, boxBean.Config);
if (result && position.StoreId.Equals(boxBean.Config.GetStoreId()))
{
size = position.BagHigh + "*" + position.BagWidth;
if (PositionDic.ContainsKey(size))
{
PositionDic[size].Add(position.PositionNum);
}
else
{
PositionDic.Add(size, new List<string>() { position.PositionNum });
}
}
}
}
}
}
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!