Commit 35d87eae 张东亮

料架打印添加站别

1 个父辈 20ca437b
......@@ -81,6 +81,7 @@ namespace ShelfPrinter
text.Add("jt", label_LZ.station);
text.Add("xb", label_LZ.line);
text.Add("sj", label_LZ.shijian);
text.Add("zb", label_LZ.slot);
pictureBox1.Image = print.Print(text);
}
Dictionary<string, string> printview(Label_LZ label_LZ)
......@@ -91,6 +92,7 @@ namespace ShelfPrinter
text.Add("jt", label_LZ.station);
text.Add("xb", label_LZ.line);
text.Add("sj", label_LZ.shijian);
text.Add("zb", label_LZ.slot);
if (pictureBox1.Image != null)
{
pictureBox1.Image.Dispose();
......@@ -116,7 +118,7 @@ namespace ShelfPrinter
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();
private void timer1_Tick(object sender, EventArgs e)
......
......@@ -11,12 +11,13 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
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.side = $"{mianbie}";
this.line = $"线 别:{line} /{this.side}";
this.station = $"机 台:{jitai}";
this.slot = $"站 别:{slot}{subslot}";
this.shijian = $"时 间:{DateTime.Now.ToString()}";
}
public Label_LZ() { }
......@@ -24,6 +25,14 @@ namespace OnlineStore.DeviceLibrary
public string pn { get; set; } = "";
public string line { get; set; } = "";
/// <summary>
/// 站位
/// </summary>
public string slot { get; set; }
/// <summary>
/// 点位
/// </summary>
public string subslot { get; set; }
/// <summary>
/// 线别
/// </summary>
public string side { get; set; } = "";
......@@ -42,7 +51,21 @@ namespace OnlineStore.DeviceLibrary
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
return null;
}
#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()
{
try
......@@ -237,7 +237,7 @@ namespace OnlineStore.DeviceLibrary
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()
{
try
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!