diff --git a/ButcherFactory.BO/LocalBL/CarcassSaleOutBL.cs b/ButcherFactory.BO/LocalBL/CarcassSaleOutBL.cs index 4bc637e..b03521b 100644 --- a/ButcherFactory.BO/LocalBL/CarcassSaleOutBL.cs +++ b/ButcherFactory.BO/LocalBL/CarcassSaleOutBL.cs @@ -196,7 +196,7 @@ namespace ButcherFactory.BO.LocalBL public static void SubmitDetails(IEnumerable details, SaleOutStore_Detail detail) { - var arr = details.Select(x => new WeightRecord { Flag = x.BarCode.StartsWith("P") ? -1 : 0, ID = x.ID, WeightTime = x.Time, MainUnitNum = x.Weight, SecondNumber = x.Number, ProductBatch_ID = x.ProductBatch_ID, BarCode = x.BarCode }); + var arr = details.Select(x => new WeightRecord { Flag = (!string.IsNullOrEmpty(x.BarCode) && x.BarCode.StartsWith("P")) ? -1 : 0, ID = x.ID, WeightTime = x.Time, MainUnitNum = x.Weight, SecondNumber = x.Number, ProductBatch_ID = x.ProductBatch_ID, BarCode = x.BarCode }); var json = RpcFacade.Call(RpcPath + "SaleOutStoreRpc/SaveWeightRecord", JsonConvert.SerializeObject(arr), detail.ID); var back = JsonConvert.DeserializeObject>(json); using (var session = DmoSession.New()) diff --git a/ButcherFactory.BO/LocalBL/SegmentProductionBL.cs b/ButcherFactory.BO/LocalBL/SegmentProductionBL.cs index c35b3e0..19bca65 100644 --- a/ButcherFactory.BO/LocalBL/SegmentProductionBL.cs +++ b/ButcherFactory.BO/LocalBL/SegmentProductionBL.cs @@ -69,7 +69,7 @@ namespace ButcherFactory.BO.LocalBL entity.WorkUnit_ID = workUnitID; entity.ProductBatch_ID = productBatchID; entity.RowIndex = GenerateRowIndex(productBatchID, session); - entity.BarCode = string.Format("260912011{0:yyyyMMdd}{1:00000}", batchDate, entity.RowIndex); + entity.BarCode = string.Format("260912011{0:yyyyMMdd}{1}{2:00000}", batchDate,AppContext.ConnectInfo.ClientCode, entity.RowIndex); session.Insert(entity); session.Commit(); return entity; @@ -87,7 +87,7 @@ namespace ButcherFactory.BO.LocalBL entity.WorkUnit_ID = workUnitID; entity.ProductBatch_ID = productBatchID; entity.RowIndex = GenerateRowIndex(productBatchID, session); - entity.BarCode = string.Format("260912011{0:yyyyMMdd}{1:00000}", batchDate, entity.RowIndex); + entity.BarCode = string.Format("260912011{0:yyyyMMdd}{1}{2:00000}", batchDate, AppContext.ConnectInfo.ClientCode, entity.RowIndex); entity.Submited = true; session.Insert(entity); FillGroupIDAsID(session, entity.ID); diff --git a/ButcherFactory.BO/Utils/AppContext.cs b/ButcherFactory.BO/Utils/AppContext.cs index dab3934..f5784bc 100644 --- a/ButcherFactory.BO/Utils/AppContext.cs +++ b/ButcherFactory.BO/Utils/AppContext.cs @@ -44,6 +44,8 @@ namespace ButcherFactory.BO.Utils [XmlIgnore] public string SecondUrl { get { return ServerMode == 0 ? B3Url : MESUrl; } } + public string ClientCode { get; set; } + public string SqlConnection { get; set; } private string _traceBackUrl = "default"; diff --git a/ButcherFactory.Form/CarcassSaleOut2_/CarcassSaleOutForm.Designer.cs b/ButcherFactory.Form/CarcassSaleOut2_/CarcassSaleOutForm.Designer.cs index 7bdc38b..1cdb3ac 100644 --- a/ButcherFactory.Form/CarcassSaleOut2_/CarcassSaleOutForm.Designer.cs +++ b/ButcherFactory.Form/CarcassSaleOut2_/CarcassSaleOutForm.Designer.cs @@ -1069,7 +1069,7 @@ this.scanCodeBtn.Size = new System.Drawing.Size(84, 35); this.scanCodeBtn.StateHold = true; this.scanCodeBtn.TabIndex = 30; - this.scanCodeBtn.Text = "自动发货"; + this.scanCodeBtn.Text = "扫码发货"; this.scanCodeBtn.UseVisualStyleBackColor = false; this.scanCodeBtn.Click += new System.EventHandler(this.scanCodeBtn_Click); // diff --git a/ButcherFactory.Form/Dialogs/ClientGoodsSetDialog.Designer.cs b/ButcherFactory.Form/Dialogs/ClientGoodsSetDialog.Designer.cs index b40ec7c..8fac257 100644 --- a/ButcherFactory.Form/Dialogs/ClientGoodsSetDialog.Designer.cs +++ b/ButcherFactory.Form/Dialogs/ClientGoodsSetDialog.Designer.cs @@ -38,20 +38,22 @@ this.flowLayoutPanel2.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.flowLayoutPanel2.AutoScroll = true; this.flowLayoutPanel2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.flowLayoutPanel2.Location = new System.Drawing.Point(10, 130); + this.flowLayoutPanel2.Location = new System.Drawing.Point(10, 215); this.flowLayoutPanel2.Name = "flowLayoutPanel2"; - this.flowLayoutPanel2.Size = new System.Drawing.Size(797, 384); + this.flowLayoutPanel2.Size = new System.Drawing.Size(797, 299); this.flowLayoutPanel2.TabIndex = 24; // // flowLayoutPanel1 // this.flowLayoutPanel1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); + this.flowLayoutPanel1.AutoScroll = true; this.flowLayoutPanel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.flowLayoutPanel1.Location = new System.Drawing.Point(10, 52); this.flowLayoutPanel1.Name = "flowLayoutPanel1"; - this.flowLayoutPanel1.Size = new System.Drawing.Size(797, 70); + this.flowLayoutPanel1.Size = new System.Drawing.Size(797, 157); this.flowLayoutPanel1.TabIndex = 22; // // colseBtn diff --git a/ButcherFactory.Form/Dialogs/ClientGoodsSetDialog.cs b/ButcherFactory.Form/Dialogs/ClientGoodsSetDialog.cs index 508443b..d2fff4f 100644 --- a/ButcherFactory.Form/Dialogs/ClientGoodsSetDialog.cs +++ b/ButcherFactory.Form/Dialogs/ClientGoodsSetDialog.cs @@ -28,7 +28,7 @@ namespace ButcherFactory.Dialogs foreach (var item in goodsSetDic) { - var btn = new ColorButton() { Width = 100, Height = 62, Text = item.Key, Font = new Font("宋体", 15), Margin = new Padding(15, 3, 15, 0), EnableGroup = true }; + var btn = new ColorButton() { Width = 100, Height = 62, Text = item.Key, Font = new Font("宋体", 15), Margin = new Padding(15, 5, 15, 5), EnableGroup = true }; btn.Click += GroupBtnClick; flowLayoutPanel1.Controls.Add(btn); } diff --git a/ButcherFactory.Form/SegmentProduction_/SegmentProductionPrint.cs b/ButcherFactory.Form/SegmentProduction_/SegmentProductionPrint.cs index f252d38..c552952 100644 --- a/ButcherFactory.Form/SegmentProduction_/SegmentProductionPrint.cs +++ b/ButcherFactory.Form/SegmentProduction_/SegmentProductionPrint.cs @@ -27,7 +27,7 @@ namespace ButcherFactory.SegmentProduction_ dic.Add("$Date", dt.Value.ToString("yyyy/MM/dd")); var imgUrl = string.Format(IMGFILE, id); var url = string.Format(AppContext.ConnectInfo.TraceBackUrl + "?code={0}", entity.BarCode); - BwpClientPrint.BwpClientWebPrint.Create2DPic(url, imgUrl, 100); + BwpClientPrint.BwpClientWebPrint.Create2DPic(url, imgUrl, 80); dic.Add("$ImageUrl", imgUrl); BwpClientPrint.BwpClientWebPrint.Print(PRINTFILE, dic); AfterPrint(); diff --git a/ButcherFactory.Form/SegmentProduction_/SegmentProductionPrint.html b/ButcherFactory.Form/SegmentProduction_/SegmentProductionPrint.html index 0afdeaf..4dda980 100644 --- a/ButcherFactory.Form/SegmentProduction_/SegmentProductionPrint.html +++ b/ButcherFactory.Form/SegmentProduction_/SegmentProductionPrint.html @@ -1,29 +1,28 @@  - - - - - -
-
品名:$Goods_Name
-
规格:$Goods_Spec   生产日期:$Date
-
- - - - - - -
执行标准:GB/T9959.2-2008
储存条件:-18℃以下保存
保 质 期:18个月
生产厂家:青岛万福集团股份有限公司
生产厂址:青岛莱西市珠海路五号
- + + + + + +
品名:$Goods_Name
+
规格:$Goods_Spec   生产日期:$Date
+ + + + + + +
执行标准:GB/T9959.2-2008
储存条件:-18℃以下保存
保 质 期:18个月
生产厂家:青岛万福集团股份有限公司
生产厂址:青岛莱西市珠海路五号
+ \ No newline at end of file diff --git a/ButcherFactory.Form/SegmentSaleOut_/DiscontSetDialog.Designer.cs b/ButcherFactory.Form/SegmentSaleOut_/DiscontSetDialog.Designer.cs index dc653ba..2c07a6d 100644 --- a/ButcherFactory.Form/SegmentSaleOut_/DiscontSetDialog.Designer.cs +++ b/ButcherFactory.Form/SegmentSaleOut_/DiscontSetDialog.Designer.cs @@ -57,7 +57,7 @@ this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(56, 16); this.label2.TabIndex = 1; - this.label2.Text = "扣重一"; + this.label2.Text = "扣重二"; // // label3 // @@ -67,7 +67,7 @@ this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(56, 16); this.label3.TabIndex = 2; - this.label3.Text = "扣重一"; + this.label3.Text = "扣重三"; // // label4 // @@ -77,7 +77,7 @@ this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(56, 16); this.label4.TabIndex = 3; - this.label4.Text = "扣重一"; + this.label4.Text = "扣重四"; // // lbl1 // diff --git a/ButcherFactory.Tools/MainWindow.xaml b/ButcherFactory.Tools/MainWindow.xaml index 57b6499..24b1f68 100644 --- a/ButcherFactory.Tools/MainWindow.xaml +++ b/ButcherFactory.Tools/MainWindow.xaml @@ -1,18 +1,21 @@ - + xmlns:local="clr-namespace:ButcherFactory.Tools" x:Class="ButcherFactory.Tools.MainWindow" + Title="BWP_Tools" Height="500" Width="525" ResizeMode="NoResize" >