Commit d09d4bda by 任天宇

优化

parent d42f2593
......@@ -91,6 +91,8 @@
this.btnClearCurrentPackage = new System.Windows.Forms.Button();
this.lbSetPackage = new System.Windows.Forms.Label();
this.tbSetCurrentPackage = new System.Windows.Forms.TextBox();
this.lbAssignOperatorName = new System.Windows.Forms.Label();
this.cbAssignOperatorName = new System.Windows.Forms.ComboBox();
this.plLeft.SuspendLayout();
this.gbInfo.SuspendLayout();
this.gbLogin.SuspendLayout();
......@@ -118,9 +120,9 @@
//
this.gbInfo.Controls.Add(this.rtbMessage);
this.gbInfo.Dock = System.Windows.Forms.DockStyle.Fill;
this.gbInfo.Location = new System.Drawing.Point(0, 447);
this.gbInfo.Location = new System.Drawing.Point(0, 458);
this.gbInfo.Name = "gbInfo";
this.gbInfo.Size = new System.Drawing.Size(211, 201);
this.gbInfo.Size = new System.Drawing.Size(211, 190);
this.gbInfo.TabIndex = 2;
this.gbInfo.TabStop = false;
this.gbInfo.Text = "信息";
......@@ -130,12 +132,14 @@
this.rtbMessage.Dock = System.Windows.Forms.DockStyle.Fill;
this.rtbMessage.Location = new System.Drawing.Point(3, 17);
this.rtbMessage.Name = "rtbMessage";
this.rtbMessage.Size = new System.Drawing.Size(205, 181);
this.rtbMessage.Size = new System.Drawing.Size(205, 170);
this.rtbMessage.TabIndex = 0;
this.rtbMessage.Text = "";
//
// gbLogin
//
this.gbLogin.Controls.Add(this.cbAssignOperatorName);
this.gbLogin.Controls.Add(this.lbAssignOperatorName);
this.gbLogin.Controls.Add(this.cbSetCurrentPackageOwner);
this.gbLogin.Controls.Add(this.tbCurrentPackage);
this.gbLogin.Controls.Add(this.lbCurrentPackage);
......@@ -153,7 +157,7 @@
this.gbLogin.Dock = System.Windows.Forms.DockStyle.Top;
this.gbLogin.Location = new System.Drawing.Point(0, 0);
this.gbLogin.Name = "gbLogin";
this.gbLogin.Size = new System.Drawing.Size(211, 447);
this.gbLogin.Size = new System.Drawing.Size(211, 458);
this.gbLogin.TabIndex = 1;
this.gbLogin.TabStop = false;
this.gbLogin.Text = "登录";
......@@ -163,7 +167,7 @@
this.cbSetCurrentPackageOwner.Enabled = false;
this.cbSetCurrentPackageOwner.Font = new System.Drawing.Font("宋体", 20F);
this.cbSetCurrentPackageOwner.FormattingEnabled = true;
this.cbSetCurrentPackageOwner.Location = new System.Drawing.Point(12, 389);
this.cbSetCurrentPackageOwner.Location = new System.Drawing.Point(11, 364);
this.cbSetCurrentPackageOwner.Name = "cbSetCurrentPackageOwner";
this.cbSetCurrentPackageOwner.Size = new System.Drawing.Size(187, 35);
this.cbSetCurrentPackageOwner.TabIndex = 31;
......@@ -173,7 +177,7 @@
//
this.tbCurrentPackage.Enabled = false;
this.tbCurrentPackage.Font = new System.Drawing.Font("宋体", 18F);
this.tbCurrentPackage.Location = new System.Drawing.Point(12, 332);
this.tbCurrentPackage.Location = new System.Drawing.Point(11, 307);
this.tbCurrentPackage.Name = "tbCurrentPackage";
this.tbCurrentPackage.ReadOnly = true;
this.tbCurrentPackage.Size = new System.Drawing.Size(187, 35);
......@@ -183,7 +187,7 @@
//
this.lbCurrentPackage.AutoSize = true;
this.lbCurrentPackage.Font = new System.Drawing.Font("宋体", 12F);
this.lbCurrentPackage.Location = new System.Drawing.Point(9, 313);
this.lbCurrentPackage.Location = new System.Drawing.Point(8, 288);
this.lbCurrentPackage.Name = "lbCurrentPackage";
this.lbCurrentPackage.Size = new System.Drawing.Size(80, 16);
this.lbCurrentPackage.TabIndex = 6;
......@@ -194,7 +198,7 @@
this.btnLogout.BackColor = System.Drawing.Color.LavenderBlush;
this.btnLogout.Font = new System.Drawing.Font("宋体", 15F);
this.btnLogout.ForeColor = System.Drawing.Color.Crimson;
this.btnLogout.Location = new System.Drawing.Point(109, 213);
this.btnLogout.Location = new System.Drawing.Point(108, 188);
this.btnLogout.Name = "btnLogout";
this.btnLogout.Size = new System.Drawing.Size(90, 40);
this.btnLogout.TabIndex = 28;
......@@ -206,7 +210,7 @@
//
this.lbCurrentLocation.AutoSize = true;
this.lbCurrentLocation.Font = new System.Drawing.Font("宋体", 12F);
this.lbCurrentLocation.Location = new System.Drawing.Point(12, 256);
this.lbCurrentLocation.Location = new System.Drawing.Point(8, 231);
this.lbCurrentLocation.Name = "lbCurrentLocation";
this.lbCurrentLocation.Size = new System.Drawing.Size(80, 16);
this.lbCurrentLocation.TabIndex = 5;
......@@ -217,7 +221,7 @@
this.btnLogin.BackColor = System.Drawing.Color.MintCream;
this.btnLogin.Font = new System.Drawing.Font("宋体", 15F);
this.btnLogin.ForeColor = System.Drawing.Color.DarkGreen;
this.btnLogin.Location = new System.Drawing.Point(12, 213);
this.btnLogin.Location = new System.Drawing.Point(11, 188);
this.btnLogin.Name = "btnLogin";
this.btnLogin.Size = new System.Drawing.Size(90, 40);
this.btnLogin.TabIndex = 27;
......@@ -229,7 +233,7 @@
//
this.lbPackageDepartment.AutoSize = true;
this.lbPackageDepartment.Font = new System.Drawing.Font("宋体", 12F);
this.lbPackageDepartment.Location = new System.Drawing.Point(9, 370);
this.lbPackageDepartment.Location = new System.Drawing.Point(8, 345);
this.lbPackageDepartment.Name = "lbPackageDepartment";
this.lbPackageDepartment.Size = new System.Drawing.Size(112, 16);
this.lbPackageDepartment.TabIndex = 4;
......@@ -239,7 +243,7 @@
//
this.tbCurrentLocation.Enabled = false;
this.tbCurrentLocation.Font = new System.Drawing.Font("宋体", 18F);
this.tbCurrentLocation.Location = new System.Drawing.Point(12, 275);
this.tbCurrentLocation.Location = new System.Drawing.Point(11, 250);
this.tbCurrentLocation.Name = "tbCurrentLocation";
this.tbCurrentLocation.ReadOnly = true;
this.tbCurrentLocation.Size = new System.Drawing.Size(187, 35);
......@@ -248,37 +252,37 @@
// lblUrl
//
this.lblUrl.AutoSize = true;
this.lblUrl.Font = new System.Drawing.Font("宋体", 18F);
this.lblUrl.Font = new System.Drawing.Font("宋体", 12F);
this.lblUrl.Location = new System.Drawing.Point(8, 15);
this.lblUrl.Name = "lblUrl";
this.lblUrl.Size = new System.Drawing.Size(94, 24);
this.lblUrl.Size = new System.Drawing.Size(64, 16);
this.lblUrl.TabIndex = 21;
this.lblUrl.Text = "地 址:";
//
// lblUser
//
this.lblUser.AutoSize = true;
this.lblUser.Font = new System.Drawing.Font("宋体", 18F);
this.lblUser.Location = new System.Drawing.Point(8, 80);
this.lblUser.Font = new System.Drawing.Font("宋体", 12F);
this.lblUser.Location = new System.Drawing.Point(8, 72);
this.lblUser.Name = "lblUser";
this.lblUser.Size = new System.Drawing.Size(94, 24);
this.lblUser.Size = new System.Drawing.Size(64, 16);
this.lblUser.TabIndex = 22;
this.lblUser.Text = "用户名:";
//
// lblPassword
//
this.lblPassword.AutoSize = true;
this.lblPassword.Font = new System.Drawing.Font("宋体", 18F);
this.lblPassword.Location = new System.Drawing.Point(8, 145);
this.lblPassword.Font = new System.Drawing.Font("宋体", 12F);
this.lblPassword.Location = new System.Drawing.Point(8, 128);
this.lblPassword.Name = "lblPassword";
this.lblPassword.Size = new System.Drawing.Size(94, 24);
this.lblPassword.Size = new System.Drawing.Size(64, 16);
this.lblPassword.TabIndex = 23;
this.lblPassword.Text = "密 码:";
//
// tbxPassword
//
this.tbxPassword.Font = new System.Drawing.Font("宋体", 18F);
this.tbxPassword.Location = new System.Drawing.Point(12, 172);
this.tbxPassword.Location = new System.Drawing.Point(11, 147);
this.tbxPassword.Name = "tbxPassword";
this.tbxPassword.PasswordChar = '*';
this.tbxPassword.Size = new System.Drawing.Size(187, 35);
......@@ -289,7 +293,7 @@
//
this.tbxServiceUrl.BackColor = System.Drawing.SystemColors.Window;
this.tbxServiceUrl.Font = new System.Drawing.Font("宋体", 18F);
this.tbxServiceUrl.Location = new System.Drawing.Point(12, 42);
this.tbxServiceUrl.Location = new System.Drawing.Point(11, 34);
this.tbxServiceUrl.Name = "tbxServiceUrl";
this.tbxServiceUrl.Size = new System.Drawing.Size(187, 35);
this.tbxServiceUrl.TabIndex = 24;
......@@ -297,7 +301,7 @@
// tbxUserName
//
this.tbxUserName.Font = new System.Drawing.Font("宋体", 18F);
this.tbxUserName.Location = new System.Drawing.Point(12, 107);
this.tbxUserName.Location = new System.Drawing.Point(11, 90);
this.tbxUserName.Name = "tbxUserName";
this.tbxUserName.Size = new System.Drawing.Size(187, 35);
this.tbxUserName.TabIndex = 25;
......@@ -766,6 +770,27 @@
this.tbSetCurrentPackage.TabIndex = 78;
this.tbSetCurrentPackage.KeyDown += new System.Windows.Forms.KeyEventHandler(this.tbSetCurrentPackage_KeyDown);
//
// lbAssignOperatorName
//
this.lbAssignOperatorName.AutoSize = true;
this.lbAssignOperatorName.Font = new System.Drawing.Font("宋体", 12F);
this.lbAssignOperatorName.Location = new System.Drawing.Point(8, 402);
this.lbAssignOperatorName.Name = "lbAssignOperatorName";
this.lbAssignOperatorName.Size = new System.Drawing.Size(72, 16);
this.lbAssignOperatorName.TabIndex = 32;
this.lbAssignOperatorName.Text = "交接人:";
//
// cbAssignOperatorName
//
this.cbAssignOperatorName.Enabled = false;
this.cbAssignOperatorName.Font = new System.Drawing.Font("宋体", 20F);
this.cbAssignOperatorName.FormattingEnabled = true;
this.cbAssignOperatorName.Location = new System.Drawing.Point(11, 421);
this.cbAssignOperatorName.Name = "cbAssignOperatorName";
this.cbAssignOperatorName.Size = new System.Drawing.Size(187, 35);
this.cbAssignOperatorName.TabIndex = 33;
this.cbAssignOperatorName.KeyDown += new System.Windows.Forms.KeyEventHandler(this.cbAssignOperatorName_KeyDown);
//
// FrmMain
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
......@@ -860,6 +885,8 @@
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn6;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn7;
private System.Windows.Forms.CheckBox ckbSelectAll;
private System.Windows.Forms.Label lbAssignOperatorName;
private System.Windows.Forms.ComboBox cbAssignOperatorName;
}
}
......@@ -77,6 +77,8 @@ namespace Kivii.Client.SampleInbounds
btnClearCurrentPackage.Enabled = false;
tbCurrentLocation.Text = "";
lbCurrentPackageStatus.Text = "";
cbAssignOperatorName.Enabled = false;
cbAssignOperatorName.DataSource = null;
cbSetCurrentPackageOwner.DataSource = null;
cbSetCurrentPackageOwner.DisplayMember = "FullName";
cbSetCurrentPackageOwner.ValueMember = "Kvid";
......@@ -321,6 +323,7 @@ namespace Kivii.Client.SampleInbounds
int indexWuli = _currentOrgs.FindIndex(o => o.FullName.Contains("物理"));
this.Invoke(new Action(delegate
{
cbAssignOperatorName.Enabled = true;
cbSetCurrentPackageOwner.Enabled = true;
cbSetCurrentPackageOwner.DataSource = _currentOrgs;
if (indexWuli != -1) cbSetCurrentPackageOwner.SelectedIndex = indexWuli;
......@@ -564,6 +567,8 @@ namespace Kivii.Client.SampleInbounds
record.IsMatched = true;
}
}
_currentPackageSamples = _currentPackageSamples.OrderBy(o => o.IsMatched).ThenBy(o => o.BizId).ToList();
this.Invoke(new Action(delegate
{
dgvSamples.DataSource = _currentPackageSamples;
......@@ -638,6 +643,8 @@ namespace Kivii.Client.SampleInbounds
var request = new SampleAssign();
request.Kvids = kvids;
request.Location = _currentLocation;
request.Route = new Route();
request.Route.OperatorName = cbAssignOperatorName.Text;
//var task = _client.PostAsync(request);
try
{
......@@ -931,6 +938,11 @@ namespace Kivii.Client.SampleInbounds
private void btnSampleAssign_Click(object sender, EventArgs e)
{
if (cbAssignOperatorName.Text.IsNullOrEmpty())
{
MessageBox.Show("请先设置好交接人信息", "设置");
return;
}
if (_currentScanSamples.IsNullOrEmpty()) return;
var assignSamples = _currentScanSamples.ToList();//new一个list不影响原来的数组
preSampleAssigning(assignSamples);
......@@ -975,5 +987,13 @@ namespace Kivii.Client.SampleInbounds
dgvRfidSamples.DataSource = _currentScanSamples;
}));
}
private void cbAssignOperatorName_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Enter)
{
}
}
}
}
......@@ -44,6 +44,8 @@ namespace Kivii.Samples.Transforms
{
public List<Guid> Kvids { get; set; }//要流转样品信息
public Location Location { get; set; }//地点位置信息,只需要InternalCode
public Route Route { get; set; }//自定义路由信息,可不填写
}
[Route(Configs.RouteSamplePackaging)]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment