Browse Source

fix PrintPosBill

HuiZhou
fajiao 2 years ago
parent
commit
b10daf4972
  1. 13
      AutoWeightServer/Center/DeviceCenter.cs
  2. 2
      AutoWeightServer/UI/FrmBill.cs
  3. 2
      AutoWeightServer/UI/UC/UCCarOut.cs

13
AutoWeightServer/Center/DeviceCenter.cs

@ -5,6 +5,7 @@ using EC.AutoWeightServer.IfManager.Pos;
using EC.AutoWeightServer.IfManager.Scales; using EC.AutoWeightServer.IfManager.Scales;
using EC.AutoWeightServer.IfManager.YkPos; using EC.AutoWeightServer.IfManager.YkPos;
using EC.AutoWeightServer.Model.Config; using EC.AutoWeightServer.Model.Config;
using EC.AutoWeightServer.Model.State;
using EC.AutoWeightServer.UI; using EC.AutoWeightServer.UI;
using EC.AutoWeightServer.UI.UC; using EC.AutoWeightServer.UI.UC;
using EC.Entity.Transport; using EC.Entity.Transport;
@ -321,7 +322,7 @@ namespace EC.AutoWeightServer.Center
/// 打印运单 /// 打印运单
/// </summary> /// </summary>
/// <param name="billEntity"></param> /// <param name="billEntity"></param>
public void PrintBill(TransportBillEntity billEntity) public void PrintYkPosBill(TransportBillEntity billEntity)
{ {
if (billEntity == null) if (billEntity == null)
return; return;
@ -377,7 +378,7 @@ namespace EC.AutoWeightServer.Center
content.Append($"达标率:\t{billEntity.StandardRate}%\n"); content.Append($"达标率:\t{billEntity.StandardRate}%\n");
content.Append($"入场时间:\t{billEntity.InStartTime:yyyy/MM/dd HH:mm:ss}\n"); content.Append($"入场时间:\t{billEntity.InStartTime:yyyy/MM/dd HH:mm:ss}\n");
content.Append($"出场时间:\t{billEntity.OutFinishTime:yyyy/MM/dd HH:mm:ss}\n"); content.Append($"出场时间:\t{billEntity.OutFinishTime:yyyy/MM/dd HH:mm:ss}\n");
//content.Append($"运单状态:\t{BillStateExt.GetBillStateDesc(billEntity.State)}\n"); content.Append($"运单状态:\t{BillStateExt.GetBillStateDesc(billEntity.State)}\n");
YkPosManager.PrintStr(content);//打印内容 YkPosManager.PrintStr(content);//打印内容
YkPosManager.InitPrinter();//重置 YkPosManager.InitPrinter();//重置
@ -409,11 +410,11 @@ namespace EC.AutoWeightServer.Center
PosManager = null; PosManager = null;
} }
public void PrintBIll(TransportBillEntity billEntity) public void PrintPosBill(TransportBillEntity billEntity)
{ {
if (PosManager == null || billEntity == null) if (PosManager == null || billEntity == null || !PosManager.IsConnected())
return; return;
if (!PosManager.IsConnected() || PosManager.IsPaperExhaust()) if (PosManager.IsPaperExhaust())
{ {
var msg = "打印接口纸尽,请联系管理人员"; var msg = "打印接口纸尽,请联系管理人员";
_mainServer?.SetScrollLabelText(msg); _mainServer?.SetScrollLabelText(msg);
@ -469,7 +470,7 @@ namespace EC.AutoWeightServer.Center
content.Append($"达标率:\t{billEntity.StandardRate}%\n"); content.Append($"达标率:\t{billEntity.StandardRate}%\n");
content.Append($"入场时间:\t{billEntity.InStartTime:yyyy/MM/dd HH:mm:ss}\n"); content.Append($"入场时间:\t{billEntity.InStartTime:yyyy/MM/dd HH:mm:ss}\n");
content.Append($"出场时间:\t{billEntity.OutFinishTime:yyyy/MM/dd HH:mm:ss}\n"); content.Append($"出场时间:\t{billEntity.OutFinishTime:yyyy/MM/dd HH:mm:ss}\n");
//content.Append($"运单状态:\t{BillStateExt.GetBillStateDesc(billEntity.State)}\n"); content.Append($"运单状态:\t{BillStateExt.GetBillStateDesc(billEntity.State)}\n");
PosManager.PrintStr(0, 0, 0, 0, 0, content.ToString()); PosManager.PrintStr(0, 0, 0, 0, 0, content.ToString());
//打印分隔符 //打印分隔符
PosManager.SetAlign(1); PosManager.SetAlign(1);

2
AutoWeightServer/UI/FrmBill.cs

@ -62,7 +62,7 @@ namespace EC.AutoWeightServer.UI
if (_mainServer == null) return; if (_mainServer == null) return;
var cell = dataGridView.CurrentRow.Cells; var cell = dataGridView.CurrentRow.Cells;
var billEntity = ServiceCenter.BillService.GetBillBySerialNumber(cell[0].Value.ToString()); var billEntity = ServiceCenter.BillService.GetBillBySerialNumber(cell[0].Value.ToString());
_mainServer.DeviceCenter.PrintBill(billEntity); _mainServer.DeviceCenter.PrintPosBill(billEntity);
} }
} }
} }

2
AutoWeightServer/UI/UC/UCCarOut.cs

@ -392,7 +392,7 @@ namespace EC.AutoWeightServer.UI.UC
} }
btnConfirm.Enabled = false; btnConfirm.Enabled = false;
_mainServer.DeviceCenter.PrintBill(billEntity);//打印运输小票 _mainServer.DeviceCenter.PrintPosBill(billEntity);//打印运输小票
//_mainServer.DeviceCenter.PrintBill(billEntity);//打印存根小票 //_mainServer.DeviceCenter.PrintBill(billEntity);//打印存根小票
_mainServer.SetOutFinishState(plate);//离开出场界面 _mainServer.SetOutFinishState(plate);//离开出场界面
} }

Loading…
Cancel
Save