Browse Source

1. 回家做

PTD
Ray 3 years ago
parent
commit
2e2135aaa2
  1. 23
      AMESCoreStudio.WebApi/Controllers/AMES/FqcInhouseMasterController.cs
  2. BIN
      其他專案資料/AMES_AP/.vs/AMES_AP/v16/.suo
  3. 1
      其他專案資料/AMES_AP/AMES_AP/AMES_AP.csproj
  4. 157
      其他專案資料/AMES_AP/AMES_AP/InHouse.Designer.cs
  5. 34
      其他專案資料/AMES_AP/AMES_AP/InHouse.cs
  6. 59
      其他專案資料/AMES_AP/AMES_AP/Models/QcQuot.cs
  7. 37
      其他專案資料/AMES_AP/AMES_AP/StockControlForm.Designer.cs
  8. 3
      其他專案資料/AMES_AP/AMES_AP/StockControlForm.cs
  9. BIN
      其他專案資料/AMES_AP/AMES_AP/bin/Debug/AMES_AP.exe
  10. BIN
      其他專案資料/AMES_AP/AMES_AP/bin/Debug/AMES_AP.pdb
  11. 2
      其他專案資料/AMES_AP/AMES_AP/obj/Debug/AMES_AP.csproj.CoreCompileInputs.cache
  12. BIN
      其他專案資料/AMES_AP/AMES_AP/obj/Debug/AMES_AP.csproj.GenerateResource.cache
  13. BIN
      其他專案資料/AMES_AP/AMES_AP/obj/Debug/AMES_AP.exe
  14. BIN
      其他專案資料/AMES_AP/AMES_AP/obj/Debug/AMES_AP.pdb

23
AMESCoreStudio.WebApi/Controllers/AMES/FqcInhouseMasterController.cs

@ -45,7 +45,7 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES
// GET: api/FqcInhouseMaster/5 // GET: api/FqcInhouseMaster/5
[HttpGet("{inhouseNo}/{seqID}")] [HttpGet("{inhouseNo}/{seqID}")]
public async Task<ActionResult<FqcInhouseMaster>> GetFqcInhouseMaster(string inhouseNo,int seqID) public async Task<ActionResult<FqcInhouseMaster>> GetFqcInhouseMaster(string inhouseNo, int seqID)
{ {
var fqcInhouseMaster = await _context.FqcInhouseMasters.FindAsync(inhouseNo, seqID); var fqcInhouseMaster = await _context.FqcInhouseMasters.FindAsync(inhouseNo, seqID);
@ -57,6 +57,27 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES
return fqcInhouseMaster; return fqcInhouseMaster;
} }
/// <summary>
/// 取最新入庫單號
/// </summary>
/// <param name="inhouseNo"></param>
/// <returns></returns>
[HttpGet("NewInhouseNo/{inhouseNo}")]
public async Task<ActionResult<string>> GetFqcInhouseMasterNewInhouseNo(string inhouseNo)
{
var fqcInhouseMaster = await _context.FqcInhouseMasters.Where(w => w.InhouseNo.StartsWith(inhouseNo)).ToListAsync();
string NowInhouseNo = string.Empty;
if (fqcInhouseMaster.Count() == 0)
return inhouseNo + "001";
NowInhouseNo = fqcInhouseMaster.OrderByDescending(o => o.InhouseNo).FirstOrDefault().InhouseNo;
inhouseNo += (int.Parse(NowInhouseNo.Substring(NowInhouseNo.Length - 3, 3)) + 1).ToString().PadLeft(3, '0');
return inhouseNo;
}
/// <summary> /// <summary>
/// FQC查詢 by Table /// FQC查詢 by Table
/// </summary> /// </summary>

BIN
其他專案資料/AMES_AP/.vs/AMES_AP/v16/.suo

Binary file not shown.

1
其他專案資料/AMES_AP/AMES_AP/AMES_AP.csproj

@ -82,6 +82,7 @@
<Compile Include="Models\FqcInhouseDetail.cs" /> <Compile Include="Models\FqcInhouseDetail.cs" />
<Compile Include="Models\FqcInhouseMaster.cs" /> <Compile Include="Models\FqcInhouseMaster.cs" />
<Compile Include="Models\LineInfo.cs" /> <Compile Include="Models\LineInfo.cs" />
<Compile Include="Models\QcQuot.cs" />
<Compile Include="Models\Stations.cs" /> <Compile Include="Models\Stations.cs" />
<Compile Include="Models\WipAtt.cs" /> <Compile Include="Models\WipAtt.cs" />
<Compile Include="Models\WipBox.cs" /> <Compile Include="Models\WipBox.cs" />

157
其他專案資料/AMES_AP/AMES_AP/InHouse.Designer.cs

@ -38,6 +38,7 @@ namespace AMES_AP
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle15 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle15 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle16 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle16 = new System.Windows.Forms.DataGridViewCellStyle();
this.groupBox1 = new System.Windows.Forms.GroupBox(); this.groupBox1 = new System.Windows.Forms.GroupBox();
this.InHouseNo = new MaterialSkin.Controls.MaterialTextBox();
this.WipNo = new MaterialSkin.Controls.MaterialTextBox(); this.WipNo = new MaterialSkin.Controls.MaterialTextBox();
this.materialButton5 = new MaterialSkin.Controls.MaterialButton(); this.materialButton5 = new MaterialSkin.Controls.MaterialButton();
this.btnAddInHouse = new MaterialSkin.Controls.MaterialButton(); this.btnAddInHouse = new MaterialSkin.Controls.MaterialButton();
@ -46,7 +47,7 @@ namespace AMES_AP
this.materialLabel3 = new MaterialSkin.Controls.MaterialLabel(); this.materialLabel3 = new MaterialSkin.Controls.MaterialLabel();
this.materialComboBox2 = new MaterialSkin.Controls.MaterialComboBox(); this.materialComboBox2 = new MaterialSkin.Controls.MaterialComboBox();
this.materialLabel4 = new MaterialSkin.Controls.MaterialLabel(); this.materialLabel4 = new MaterialSkin.Controls.MaterialLabel();
this.materialComboBox1 = new MaterialSkin.Controls.MaterialComboBox(); this.QcquotSelect = new MaterialSkin.Controls.MaterialComboBox();
this.dataGridView2 = new System.Windows.Forms.DataGridView(); this.dataGridView2 = new System.Windows.Forms.DataGridView();
this.dataGridViewCheckBoxColumn1 = new System.Windows.Forms.DataGridViewCheckBoxColumn(); this.dataGridViewCheckBoxColumn1 = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
@ -61,7 +62,10 @@ namespace AMES_AP
this.QueryWipNo = new MaterialSkin.Controls.MaterialButton(); this.QueryWipNo = new MaterialSkin.Controls.MaterialButton();
this.materialLabel2 = new MaterialSkin.Controls.MaterialLabel(); this.materialLabel2 = new MaterialSkin.Controls.MaterialLabel();
this.materialLabel1 = new MaterialSkin.Controls.MaterialLabel(); this.materialLabel1 = new MaterialSkin.Controls.MaterialLabel();
this.InHouseNo = new MaterialSkin.Controls.MaterialTextBox(); this.materialLabel5 = new MaterialSkin.Controls.MaterialLabel();
this.materialLabel6 = new MaterialSkin.Controls.MaterialLabel();
this.FromQty = new System.Windows.Forms.TextBox();
this.ToQty = new System.Windows.Forms.TextBox();
this.groupBox1.SuspendLayout(); this.groupBox1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGridView2)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.dataGridView2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
@ -69,6 +73,11 @@ namespace AMES_AP
// //
// groupBox1 // groupBox1
// //
this.groupBox1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.groupBox1.Controls.Add(this.ToQty);
this.groupBox1.Controls.Add(this.FromQty);
this.groupBox1.Controls.Add(this.materialLabel6);
this.groupBox1.Controls.Add(this.materialLabel5);
this.groupBox1.Controls.Add(this.InHouseNo); this.groupBox1.Controls.Add(this.InHouseNo);
this.groupBox1.Controls.Add(this.WipNo); this.groupBox1.Controls.Add(this.WipNo);
this.groupBox1.Controls.Add(this.materialButton5); this.groupBox1.Controls.Add(this.materialButton5);
@ -78,7 +87,7 @@ namespace AMES_AP
this.groupBox1.Controls.Add(this.materialLabel3); this.groupBox1.Controls.Add(this.materialLabel3);
this.groupBox1.Controls.Add(this.materialComboBox2); this.groupBox1.Controls.Add(this.materialComboBox2);
this.groupBox1.Controls.Add(this.materialLabel4); this.groupBox1.Controls.Add(this.materialLabel4);
this.groupBox1.Controls.Add(this.materialComboBox1); this.groupBox1.Controls.Add(this.QcquotSelect);
this.groupBox1.Controls.Add(this.dataGridView2); this.groupBox1.Controls.Add(this.dataGridView2);
this.groupBox1.Controls.Add(this.dataGridView1); this.groupBox1.Controls.Add(this.dataGridView1);
this.groupBox1.Controls.Add(this.materialButton1); this.groupBox1.Controls.Add(this.materialButton1);
@ -92,6 +101,25 @@ namespace AMES_AP
this.groupBox1.TabIndex = 0; this.groupBox1.TabIndex = 0;
this.groupBox1.TabStop = false; this.groupBox1.TabStop = false;
// //
// InHouseNo
//
this.InHouseNo.AnimateReadOnly = false;
this.InHouseNo.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.InHouseNo.Depth = 0;
this.InHouseNo.Font = new System.Drawing.Font("Roboto", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
this.InHouseNo.Hint = "入庫單號碼";
this.InHouseNo.LeadingIcon = null;
this.InHouseNo.Location = new System.Drawing.Point(729, 35);
this.InHouseNo.MaxLength = 50;
this.InHouseNo.MouseState = MaterialSkin.MouseState.OUT;
this.InHouseNo.Multiline = false;
this.InHouseNo.Name = "InHouseNo";
this.InHouseNo.Size = new System.Drawing.Size(161, 50);
this.InHouseNo.TabIndex = 23;
this.InHouseNo.TabStop = false;
this.InHouseNo.Text = "";
this.InHouseNo.TrailingIcon = null;
//
// WipNo // WipNo
// //
this.WipNo.AnimateReadOnly = false; this.WipNo.AnimateReadOnly = false;
@ -105,7 +133,7 @@ namespace AMES_AP
this.WipNo.MouseState = MaterialSkin.MouseState.OUT; this.WipNo.MouseState = MaterialSkin.MouseState.OUT;
this.WipNo.Multiline = false; this.WipNo.Multiline = false;
this.WipNo.Name = "WipNo"; this.WipNo.Name = "WipNo";
this.WipNo.Size = new System.Drawing.Size(136, 50); this.WipNo.Size = new System.Drawing.Size(170, 50);
this.WipNo.TabIndex = 22; this.WipNo.TabIndex = 22;
this.WipNo.TabStop = false; this.WipNo.TabStop = false;
this.WipNo.Text = ""; this.WipNo.Text = "";
@ -240,30 +268,27 @@ namespace AMES_AP
this.materialLabel4.TabIndex = 14; this.materialLabel4.TabIndex = 14;
this.materialLabel4.Text = "抽驗標準:"; this.materialLabel4.Text = "抽驗標準:";
// //
// materialComboBox1 // QcquotSelect
// //
this.materialComboBox1.AutoResize = false; this.QcquotSelect.AutoResize = false;
this.materialComboBox1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); this.QcquotSelect.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
this.materialComboBox1.Depth = 0; this.QcquotSelect.Depth = 0;
this.materialComboBox1.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawVariable; this.QcquotSelect.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawVariable;
this.materialComboBox1.DropDownHeight = 174; this.QcquotSelect.DropDownHeight = 174;
this.materialComboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.QcquotSelect.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.materialComboBox1.DropDownWidth = 121; this.QcquotSelect.DropDownWidth = 121;
this.materialComboBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 14F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Pixel); this.QcquotSelect.Font = new System.Drawing.Font("Microsoft Sans Serif", 14F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Pixel);
this.materialComboBox1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(222)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); this.QcquotSelect.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(222)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
this.materialComboBox1.FormattingEnabled = true; this.QcquotSelect.FormattingEnabled = true;
this.materialComboBox1.IntegralHeight = false; this.QcquotSelect.IntegralHeight = false;
this.materialComboBox1.ItemHeight = 43; this.QcquotSelect.ItemHeight = 43;
this.materialComboBox1.Items.AddRange(new object[] { this.QcquotSelect.Location = new System.Drawing.Point(101, 442);
"A", this.QcquotSelect.MaxDropDownItems = 4;
"B"}); this.QcquotSelect.MouseState = MaterialSkin.MouseState.OUT;
this.materialComboBox1.Location = new System.Drawing.Point(101, 442); this.QcquotSelect.Name = "QcquotSelect";
this.materialComboBox1.MaxDropDownItems = 4; this.QcquotSelect.Size = new System.Drawing.Size(207, 49);
this.materialComboBox1.MouseState = MaterialSkin.MouseState.OUT; this.QcquotSelect.StartIndex = 0;
this.materialComboBox1.Name = "materialComboBox1"; this.QcquotSelect.TabIndex = 12;
this.materialComboBox1.Size = new System.Drawing.Size(207, 49);
this.materialComboBox1.StartIndex = 0;
this.materialComboBox1.TabIndex = 12;
// //
// dataGridView2 // dataGridView2
// //
@ -474,24 +499,58 @@ namespace AMES_AP
this.materialLabel1.TabIndex = 3; this.materialLabel1.TabIndex = 3;
this.materialLabel1.Text = "工單號碼:"; this.materialLabel1.Text = "工單號碼:";
// //
// InHouseNo // materialLabel5
// //
this.InHouseNo.AnimateReadOnly = false; this.materialLabel5.AutoSize = true;
this.InHouseNo.BorderStyle = System.Windows.Forms.BorderStyle.None; this.materialLabel5.Depth = 0;
this.InHouseNo.Depth = 0; this.materialLabel5.Font = new System.Drawing.Font("Roboto", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
this.InHouseNo.Font = new System.Drawing.Font("Microsoft Sans Serif", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel); this.materialLabel5.Location = new System.Drawing.Point(24, 118);
this.InHouseNo.Hint = "入庫單號碼"; this.materialLabel5.MouseState = MaterialSkin.MouseState.HOVER;
this.InHouseNo.LeadingIcon = null; this.materialLabel5.Name = "materialLabel5";
this.InHouseNo.Location = new System.Drawing.Point(729, 35); this.materialLabel5.Size = new System.Drawing.Size(54, 19);
this.InHouseNo.MaxLength = 50; this.materialLabel5.TabIndex = 24;
this.InHouseNo.MouseState = MaterialSkin.MouseState.OUT; this.materialLabel5.Text = "From:";
this.InHouseNo.Multiline = false; //
this.InHouseNo.Name = "InHouseNo"; // materialLabel6
this.InHouseNo.Size = new System.Drawing.Size(136, 50); //
this.InHouseNo.TabIndex = 23; this.materialLabel6.AutoSize = true;
this.InHouseNo.TabStop = false; this.materialLabel6.Depth = 0;
this.InHouseNo.Text = ""; this.materialLabel6.Font = new System.Drawing.Font("Roboto", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
this.InHouseNo.TrailingIcon = null; this.materialLabel6.Location = new System.Drawing.Point(636, 118);
this.materialLabel6.MouseState = MaterialSkin.MouseState.HOVER;
this.materialLabel6.Name = "materialLabel6";
this.materialLabel6.Size = new System.Drawing.Size(35, 19);
this.materialLabel6.TabIndex = 25;
this.materialLabel6.Text = "To:";
//
// FromQty
//
this.FromQty.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.FromQty.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Append;
this.FromQty.BackColor = System.Drawing.Color.BlanchedAlmond;
this.FromQty.Location = new System.Drawing.Point(75, 117);
this.FromQty.Name = "FromQty";
this.FromQty.ReadOnly = true;
this.FromQty.Size = new System.Drawing.Size(42, 22);
this.FromQty.TabIndex = 26;
this.FromQty.TabStop = false;
this.FromQty.Text = "0";
this.FromQty.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// ToQty
//
this.ToQty.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Append;
this.ToQty.BackColor = System.Drawing.Color.BlanchedAlmond;
this.ToQty.Location = new System.Drawing.Point(668, 117);
this.ToQty.Name = "ToQty";
this.ToQty.ReadOnly = true;
this.ToQty.Size = new System.Drawing.Size(42, 22);
this.ToQty.TabIndex = 27;
this.ToQty.TabStop = false;
this.ToQty.Text = "0";
this.ToQty.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
// //
// InHouse // InHouse
// //
@ -524,7 +583,7 @@ namespace AMES_AP
private MaterialSkin.Controls.MaterialLabel materialLabel2; private MaterialSkin.Controls.MaterialLabel materialLabel2;
private MaterialSkin.Controls.MaterialLabel materialLabel1; private MaterialSkin.Controls.MaterialLabel materialLabel1;
private System.Windows.Forms.DataGridView dataGridView1; private System.Windows.Forms.DataGridView dataGridView1;
private MaterialSkin.Controls.MaterialComboBox materialComboBox1; private MaterialSkin.Controls.MaterialComboBox QcquotSelect;
private System.Windows.Forms.DataGridView dataGridView2; private System.Windows.Forms.DataGridView dataGridView2;
private MaterialSkin.Controls.MaterialButton DataToLeft; private MaterialSkin.Controls.MaterialButton DataToLeft;
private MaterialSkin.Controls.MaterialButton DataToRight; private MaterialSkin.Controls.MaterialButton DataToRight;
@ -543,5 +602,9 @@ namespace AMES_AP
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn3; private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn3;
private MaterialSkin.Controls.MaterialTextBox WipNo; private MaterialSkin.Controls.MaterialTextBox WipNo;
private MaterialSkin.Controls.MaterialTextBox InHouseNo; private MaterialSkin.Controls.MaterialTextBox InHouseNo;
private MaterialSkin.Controls.MaterialLabel materialLabel6;
private MaterialSkin.Controls.MaterialLabel materialLabel5;
private System.Windows.Forms.TextBox ToQty;
private System.Windows.Forms.TextBox FromQty;
} }
} }

34
其他專案資料/AMES_AP/AMES_AP/InHouse.cs

@ -28,6 +28,22 @@ namespace AMES_AP
{ {
this.dataGridView1.AutoGenerateColumns = false; this.dataGridView1.AutoGenerateColumns = false;
this.dataGridView2.AutoGenerateColumns = false; this.dataGridView2.AutoGenerateColumns = false;
var query = ApiHelper.GetMethod("api/QcQuot");
if (query == "error" || query == "無法連線WebAPI")
{
MessageBox.Show(query);
return;
}
var result = JsonConvert.DeserializeObject<List<QcQuot>>(query);
ArrayList myline = new ArrayList();
foreach (var item in result)
{
myline.Add(new DictionaryEntry(item.QuotID, item.QuotName));
}
QcquotSelect.DataSource = new BindingSource(myline, null);
QcquotSelect.DisplayMember = "Value";
QcquotSelect.ValueMember = "Key";
} }
private void cbHeader_CheckedChanged(object sender, EventArgs e) private void cbHeader_CheckedChanged(object sender, EventArgs e)
@ -56,6 +72,8 @@ namespace AMES_AP
} }
var barcodeInfos = JsonConvert.DeserializeObject<List<BarcodeInfo>>(query_extraNo); var barcodeInfos = JsonConvert.DeserializeObject<List<BarcodeInfo>>(query_extraNo);
// 抓入庫單未批退的包裝箱號
//建立個矩形,等下計算 CheckBox 嵌入 GridView 的位置 //建立個矩形,等下計算 CheckBox 嵌入 GridView 的位置
Rectangle rect = dataGridView1.GetCellDisplayRectangle(0, -1, true); Rectangle rect = dataGridView1.GetCellDisplayRectangle(0, -1, true);
rect.X = rect.Location.X + rect.Width / 4 - 9; rect.X = rect.Location.X + rect.Width / 4 - 9;
@ -71,7 +89,7 @@ namespace AMES_AP
//將 CheckBox 加入到 dataGridView //將 CheckBox 加入到 dataGridView
dataGridView1.Controls.Add(cbHeader); dataGridView1.Controls.Add(cbHeader);
DataLeft = barcodeInfos.Select(s => new DataBarcodeInfo DataLeft = barcodeInfos.Where(w => !string.IsNullOrWhiteSpace(w.BoxNo)).Select(s => new DataBarcodeInfo
{ {
BarcodeNo = s.BarcodeNo, BarcodeNo = s.BarcodeNo,
BoxNo = s.BoxNo, BoxNo = s.BoxNo,
@ -79,6 +97,7 @@ namespace AMES_AP
}).ToList(); }).ToList();
dataGridView1.DataSource = DataLeft; dataGridView1.DataSource = DataLeft;
FromQty.Text = DataLeft.Count().ToString();
} }
private void DataToRight_Click(object sender, EventArgs e) private void DataToRight_Click(object sender, EventArgs e)
@ -168,6 +187,9 @@ namespace AMES_AP
dataGridView1.DataSource = DataLeft; dataGridView1.DataSource = DataLeft;
dataGridView2.DataSource = DataRight; dataGridView2.DataSource = DataRight;
FromQty.Text = DataLeft.Count().ToString();
ToQty.Text = DataRight.Count().ToString();
} }
private void btnAddInHouse_Click(object sender, EventArgs e) private void btnAddInHouse_Click(object sender, EventArgs e)
@ -187,11 +209,13 @@ namespace AMES_AP
return; return;
} }
string InhouseNo = ApiHelper.GetMethod($"api/FqcInhouseMaster/NewInhouseNo/Q{WipNo.Text}");
var wipInfos = JsonConvert.DeserializeObject<List<WipInfo>>(query); var wipInfos = JsonConvert.DeserializeObject<List<WipInfo>>(query);
var InhouseM = new FqcInhouseMaster var InhouseM = new FqcInhouseMaster
{ {
InhouseNo = "Q" + WipNo.Text + "001", InhouseNo = InhouseNo,
SeqID = 1, SeqID = 1,
ItemNo = wipInfos.FirstOrDefault().GetWipAtt.ItemNO, ItemNo = wipInfos.FirstOrDefault().GetWipAtt.ItemNO,
Plant = materialComboBox2.SelectedItem.ToString(), Plant = materialComboBox2.SelectedItem.ToString(),
@ -199,7 +223,7 @@ namespace AMES_AP
ModelNo = wipInfos.FirstOrDefault().GetWipAtt.ModelNO, ModelNo = wipInfos.FirstOrDefault().GetWipAtt.ModelNO,
WipNo = WipNo.Text.ToUpper(), WipNo = WipNo.Text.ToUpper(),
WipQty = wipInfos.FirstOrDefault().PlanQTY, WipQty = wipInfos.FirstOrDefault().PlanQTY,
InhouseQty = 0, InhouseQty = int.Parse(ToQty.Text)
}; };
var InhouseD = new List<FqcInhouseDetail>(); var InhouseD = new List<FqcInhouseDetail>();
@ -207,7 +231,7 @@ namespace AMES_AP
{ {
InhouseD.Add(new FqcInhouseDetail InhouseD.Add(new FqcInhouseDetail
{ {
InhouseNo = "Q" + WipNo.Text + "001", InhouseNo = InhouseNo,
SeqID = 1, SeqID = 1,
SerialNo = item, SerialNo = item,
SerialType = "B" SerialType = "B"
@ -222,7 +246,7 @@ namespace AMES_AP
ApiHelper.PostInsertMethod("api/FqcInhouseDetail", JsonConvert.SerializeObject(item)); ApiHelper.PostInsertMethod("api/FqcInhouseDetail", JsonConvert.SerializeObject(item));
} }
InHouseNo.Text = "Q" + WipNo.Text + "001"; InHouseNo.Text = InhouseNo;
MessageBox.Show("入庫單號:" + InHouseNo.Text); MessageBox.Show("入庫單號:" + InHouseNo.Text);
} }
DataRight.Clear(); DataRight.Clear();

59
其他專案資料/AMES_AP/AMES_AP/Models/QcQuot.cs

@ -0,0 +1,59 @@
using System;
namespace AMES_AP.Models
{
/// <summary>
/// 抽驗係數資料檔
/// </summary>
public partial class QcQuot
{
/// <summary>
/// 抽驗係数ID
/// </summary>
public int QuotID { get; set; }
/// <summary>
/// 抽驗係数名稱
/// </summary>
public string QuotName { get; set; }
/// <summary>
/// 是否AQL標準
/// </summary>
public string AqlFlag { get; set; } = "N";
/// <summary>
/// AQL類型
/// </summary>
public string AqlType { get; set; }
/// <summary>
/// 建立UserID
/// </summary>
public int CreateUserID { get; set; } = 0;
/// <summary>
/// 建立日期
/// </summary>
public DateTime CreateDate { get; set; } = DateTime.Now;
/// <summary>
/// 更新UserID
/// </summary>
public int UpdateUserID { get; set; } = 0;
/// <summary>
/// 更新日期
/// </summary>
public DateTime? UpdateDate { get; set; } = DateTime.Now;
}
}

37
其他專案資料/AMES_AP/AMES_AP/StockControlForm.Designer.cs

@ -52,6 +52,7 @@
this.materialLabel3 = new MaterialSkin.Controls.MaterialLabel(); this.materialLabel3 = new MaterialSkin.Controls.MaterialLabel();
this.materialLabel2 = new MaterialSkin.Controls.MaterialLabel(); this.materialLabel2 = new MaterialSkin.Controls.MaterialLabel();
this.groupBox3 = new System.Windows.Forms.GroupBox(); this.groupBox3 = new System.Windows.Forms.GroupBox();
this.materialCheckedListBox1 = new MaterialSkin.Controls.MaterialCheckedListBox();
this.groupBox1 = new System.Windows.Forms.GroupBox(); this.groupBox1 = new System.Windows.Forms.GroupBox();
this.comboBox1 = new System.Windows.Forms.ComboBox(); this.comboBox1 = new System.Windows.Forms.ComboBox();
this.materialCheckBox4 = new MaterialSkin.Controls.MaterialCheckbox(); this.materialCheckBox4 = new MaterialSkin.Controls.MaterialCheckbox();
@ -73,7 +74,6 @@
this.txtWipNo = new System.Windows.Forms.TextBox(); this.txtWipNo = new System.Windows.Forms.TextBox();
this.materialLabel17 = new MaterialSkin.Controls.MaterialLabel(); this.materialLabel17 = new MaterialSkin.Controls.MaterialLabel();
this.materialLabel16 = new MaterialSkin.Controls.MaterialLabel(); this.materialLabel16 = new MaterialSkin.Controls.MaterialLabel();
this.materialCheckedListBox1 = new MaterialSkin.Controls.MaterialCheckedListBox();
this.groupBox5.SuspendLayout(); this.groupBox5.SuspendLayout();
this.groupBox4.SuspendLayout(); this.groupBox4.SuspendLayout();
this.groupBox3.SuspendLayout(); this.groupBox3.SuspendLayout();
@ -393,6 +393,19 @@
this.groupBox3.TabStop = false; this.groupBox3.TabStop = false;
this.groupBox3.Text = "可選項"; this.groupBox3.Text = "可選項";
// //
// materialCheckedListBox1
//
this.materialCheckedListBox1.AutoScroll = true;
this.materialCheckedListBox1.BackColor = System.Drawing.SystemColors.Control;
this.materialCheckedListBox1.Depth = 0;
this.materialCheckedListBox1.Location = new System.Drawing.Point(4, 14);
this.materialCheckedListBox1.MouseState = MaterialSkin.MouseState.HOVER;
this.materialCheckedListBox1.Name = "materialCheckedListBox1";
this.materialCheckedListBox1.Size = new System.Drawing.Size(432, 91);
this.materialCheckedListBox1.Striped = false;
this.materialCheckedListBox1.StripeDarkColor = System.Drawing.Color.Empty;
this.materialCheckedListBox1.TabIndex = 0;
//
// groupBox1 // groupBox1
// //
this.groupBox1.Controls.Add(this.comboBox1); this.groupBox1.Controls.Add(this.comboBox1);
@ -524,11 +537,12 @@
// //
// StationSelect // StationSelect
// //
this.StationSelect.FormattingEnabled = true; this.StationSelect.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.StationSelect.Location = new System.Drawing.Point(92, 110); this.StationSelect.Location = new System.Drawing.Point(92, 110);
this.StationSelect.Name = "StationSelect"; this.StationSelect.Name = "StationSelect";
this.StationSelect.Size = new System.Drawing.Size(124, 20); this.StationSelect.Size = new System.Drawing.Size(124, 20);
this.StationSelect.TabIndex = 17; this.StationSelect.TabIndex = 17;
this.StationSelect.TabStop = false;
// //
// materialLabel22 // materialLabel22
// //
@ -545,6 +559,7 @@
// //
// LineSelect // LineSelect
// //
this.LineSelect.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.LineSelect.FormattingEnabled = true; this.LineSelect.FormattingEnabled = true;
this.LineSelect.Location = new System.Drawing.Point(92, 47); this.LineSelect.Location = new System.Drawing.Point(92, 47);
this.LineSelect.Name = "LineSelect"; this.LineSelect.Name = "LineSelect";
@ -607,11 +622,13 @@
// //
// UnitSelect // UnitSelect
// //
this.UnitSelect.FormattingEnabled = true; this.UnitSelect.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.UnitSelect.Location = new System.Drawing.Point(92, 19); this.UnitSelect.Location = new System.Drawing.Point(92, 19);
this.UnitSelect.Name = "UnitSelect"; this.UnitSelect.Name = "UnitSelect";
this.UnitSelect.Size = new System.Drawing.Size(124, 20); this.UnitSelect.Size = new System.Drawing.Size(124, 20);
this.UnitSelect.TabIndex = 9; this.UnitSelect.TabIndex = 9;
this.UnitSelect.TabStop = false;
this.UnitSelect.SelectionChangeCommitted += new System.EventHandler(this.UnitSelect_SelectionChangeCommitted);
// //
// txtWipNo // txtWipNo
// //
@ -647,20 +664,6 @@
this.materialLabel16.Size = new System.Drawing.Size(69, 19); this.materialLabel16.Size = new System.Drawing.Size(69, 19);
this.materialLabel16.TabIndex = 6; this.materialLabel16.TabIndex = 6;
this.materialLabel16.Text = "製 程:"; this.materialLabel16.Text = "製 程:";
//
// materialCheckedListBox1
//
this.materialCheckedListBox1.AutoScroll = true;
this.materialCheckedListBox1.BackColor = System.Drawing.SystemColors.Control;
this.materialCheckedListBox1.Depth = 0;
this.materialCheckedListBox1.Location = new System.Drawing.Point(4, 14);
this.materialCheckedListBox1.MouseState = MaterialSkin.MouseState.HOVER;
this.materialCheckedListBox1.Name = "materialCheckedListBox1";
this.materialCheckedListBox1.Size = new System.Drawing.Size(432, 91);
this.materialCheckedListBox1.Striped = false;
this.materialCheckedListBox1.StripeDarkColor = System.Drawing.Color.Empty;
this.materialCheckedListBox1.TabIndex = 0;
// //
// StockControlForm // StockControlForm
// //

3
其他專案資料/AMES_AP/AMES_AP/StockControlForm.cs

@ -201,7 +201,7 @@ namespace AMES_AP
return; return;
} }
if (!string.IsNullOrWhiteSpace(barcodeInfos.BarcodeNo)) if (!string.IsNullOrWhiteSpace(barcodeInfos.BoxNo))
{ {
MessageBox.Show($"內部序號【{BarCodeNo.Text}】已裝箱過"); MessageBox.Show($"內部序號【{BarCodeNo.Text}】已裝箱過");
return; return;
@ -397,5 +397,6 @@ namespace AMES_AP
ApiHelper.PostInsertMethod("api/WipBox", JsonConvert.SerializeObject(wipBox)); ApiHelper.PostInsertMethod("api/WipBox", JsonConvert.SerializeObject(wipBox));
GetBoxData(); GetBoxData();
} }
} }
} }

BIN
其他專案資料/AMES_AP/AMES_AP/bin/Debug/AMES_AP.exe

Binary file not shown.

BIN
其他專案資料/AMES_AP/AMES_AP/bin/Debug/AMES_AP.pdb

Binary file not shown.

2
其他專案資料/AMES_AP/AMES_AP/obj/Debug/AMES_AP.csproj.CoreCompileInputs.cache

@ -1 +1 @@
d07028157cf87768b972228036dee67e5502361c 2911a070cfcbab9b421c605adc4621bd70e2d537

BIN
其他專案資料/AMES_AP/AMES_AP/obj/Debug/AMES_AP.csproj.GenerateResource.cache

Binary file not shown.

BIN
其他專案資料/AMES_AP/AMES_AP/obj/Debug/AMES_AP.exe

Binary file not shown.

BIN
其他專案資料/AMES_AP/AMES_AP/obj/Debug/AMES_AP.pdb

Binary file not shown.
Loading…
Cancel
Save