Commit 35d87eae 张东亮

料架打印添加站别

1 个父辈 20ca437b
...@@ -81,6 +81,7 @@ namespace ShelfPrinter ...@@ -81,6 +81,7 @@ namespace ShelfPrinter
text.Add("jt", label_LZ.station); text.Add("jt", label_LZ.station);
text.Add("xb", label_LZ.line); text.Add("xb", label_LZ.line);
text.Add("sj", label_LZ.shijian); text.Add("sj", label_LZ.shijian);
text.Add("zb", label_LZ.slot);
pictureBox1.Image = print.Print(text); pictureBox1.Image = print.Print(text);
} }
Dictionary<string, string> printview(Label_LZ label_LZ) Dictionary<string, string> printview(Label_LZ label_LZ)
...@@ -91,6 +92,7 @@ namespace ShelfPrinter ...@@ -91,6 +92,7 @@ namespace ShelfPrinter
text.Add("jt", label_LZ.station); text.Add("jt", label_LZ.station);
text.Add("xb", label_LZ.line); text.Add("xb", label_LZ.line);
text.Add("sj", label_LZ.shijian); text.Add("sj", label_LZ.shijian);
text.Add("zb", label_LZ.slot);
if (pictureBox1.Image != null) if (pictureBox1.Image != null)
{ {
pictureBox1.Image.Dispose(); pictureBox1.Image.Dispose();
...@@ -116,7 +118,7 @@ namespace ShelfPrinter ...@@ -116,7 +118,7 @@ namespace ShelfPrinter
private void button2_Click(object sender, EventArgs e) private void button2_Click(object sender, EventArgs e)
{ {
printLabel(new Label_LZ(textBox1.Text, textBox3.Text, textBox4.Text, textBox2.Text)); printLabel(new Label_LZ(textBox1.Text, textBox3.Text, textBox4.Text, textBox2.Text,textBox5.Text,textBox6.Text));
} }
object handleObj = new object(); object handleObj = new object();
private void timer1_Tick(object sender, EventArgs e) private void timer1_Tick(object sender, EventArgs e)
......
...@@ -11,12 +11,13 @@ namespace OnlineStore.DeviceLibrary ...@@ -11,12 +11,13 @@ namespace OnlineStore.DeviceLibrary
/// </summary> /// </summary>
public class Label_LZ public class Label_LZ
{ {
public Label_LZ(string liaohao, string mianbie, string jitai,string line) public Label_LZ(string liaohao, string mianbie, string jitai, string line, string slot = "slot", string subslot = "subslot")
{ {
this.pn = $"料 号:{liaohao}"; this.pn = $"料 号:{liaohao}";
this.side = $"{mianbie}"; this.side = $"{mianbie}";
this.line = $"线 别:{line} /{this.side}"; this.line = $"线 别:{line} /{this.side}";
this.station = $"机 台:{jitai}"; this.station = $"机 台:{jitai}";
this.slot = $"站 别:{slot}{subslot}";
this.shijian = $"时 间:{DateTime.Now.ToString()}"; this.shijian = $"时 间:{DateTime.Now.ToString()}";
} }
public Label_LZ() { } public Label_LZ() { }
...@@ -24,6 +25,14 @@ namespace OnlineStore.DeviceLibrary ...@@ -24,6 +25,14 @@ namespace OnlineStore.DeviceLibrary
public string pn { get; set; } = ""; public string pn { get; set; } = "";
public string line { get; set; } = ""; public string line { get; set; } = "";
/// <summary> /// <summary>
/// 站位
/// </summary>
public string slot { get; set; }
/// <summary>
/// 点位
/// </summary>
public string subslot { get; set; }
/// <summary>
/// 线别 /// 线别
/// </summary> /// </summary>
public string side { get; set; } = ""; public string side { get; set; } = "";
...@@ -42,7 +51,21 @@ namespace OnlineStore.DeviceLibrary ...@@ -42,7 +51,21 @@ namespace OnlineStore.DeviceLibrary
public string ToStr() public string ToStr()
{ {
return $"二维码:{barcode},需求单:{hSerial},料号:{pn},机台:{station},面别:{side},线别:{line}"; return $"二维码:{barcode},需求单:{hSerial},料号:{pn},机台:{station},面别:{side},线别:{line},站位:{slot},点位:{subslot}";
}
/// <summary>
/// 拷贝一个新的实例
/// </summary>
/// <returns></returns>
public Label_LZ ToCopy()
{
Label_LZ posInfo = new Label_LZ();
System.Reflection.PropertyInfo[] info1 = posInfo.GetType().GetProperties();
System.Reflection.PropertyInfo[] info2 = this.GetType().GetProperties();
for (int i = 0; i < info1.Length; i++)
info1[i].SetValue(posInfo, info2[i].GetValue(this));
return posInfo;
} }
} }
} }
...@@ -199,7 +199,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -199,7 +199,7 @@ namespace OnlineStore.DeviceLibrary
return null; return null;
} }
#region 料架打印机接口 #region 料架打印机接口
static string Addr_GetPrintInfo = "/service/store/innerBox/rack/getPrintInfo"; static string Addr_GetPrintInfo = ConfigAppSettings.GetValue("Addr_GetPrintInfo", "/service/store/innerBox/rack/getPrintInfo");
public static Label_LZ GetPrintInfo() public static Label_LZ GetPrintInfo()
{ {
try try
...@@ -237,7 +237,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -237,7 +237,7 @@ namespace OnlineStore.DeviceLibrary
return null; return null;
} }
static string Addr_FinishPrint = "/service/store/innerBox/rack/finishPrint"; static string Addr_FinishPrint = ConfigAppSettings.GetValue("Addr_FinishPrint", "/service/store/innerBox/rack/finishPrint");
public static bool FinishPrint() public static bool FinishPrint()
{ {
try try
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!