Browse Source

分割

master
wugang 8 years ago
parent
commit
0b38682fd8
30 changed files with 3367 additions and 897 deletions
  1. +2
    -0
      BO/BO.csproj
  2. +41
    -0
      BO/DropDownSets.cs
  3. +2
    -0
      BO/LocalDmoSession.cs
  4. +3
    -1
      BO/SyncToServerBase.cs
  5. +4
    -1
      BO/Utils/AfterLoginUtil.cs
  6. +38
    -0
      BO/Utils/LogUtil.cs
  7. +19
    -2
      BO/Utils/UrlUtil.cs
  8. +4
    -0
      ButcherManageClient/ButcherManageClient.csproj
  9. +2
    -1
      ButcherManageClient/Login.cs
  10. +1
    -0
      ButcherManageClient/SettingForm.cs
  11. +16
    -0
      SegmentationInStore/Rpc/Dto/Ext.cs
  12. +38
    -0
      SegmentationInStore/Rpc/Dto/SegmentationInStoreRecord.cs
  13. +8
    -5
      SegmentationInStore/Rpc/Dto/SegmentationInStoreRecordDto.cs
  14. +3
    -7
      SegmentationInStore/Rpc/Dto/SegmentationWeightRecordDto.cs
  15. +0
    -23
      SegmentationInStore/Rpc/Ext.cs
  16. +63
    -13
      SegmentationInStore/Rpc/SegmentationInStoreRpc.cs
  17. +15
    -3
      SegmentationInStore/SegmentationInStore.csproj
  18. +376
    -262
      SegmentationInStore/SegmentationInStoreForm.Designer.cs
  19. +436
    -73
      SegmentationInStore/SegmentationInStoreForm.cs
  20. +19
    -19
      SegmentationInStore/SegmentationInStoreForm.resx
  21. +0
    -1
      SegmentationWeight/SegmentationWeight.csproj
  22. +269
    -194
      SegmentationWeight/SegmentationWeightForm.Designer.cs
  23. +201
    -60
      SegmentationWeight/SegmentationWeightForm.cs
  24. +15
    -0
      SegmentationWeight/SegmentationWeightGoodsSetForm.cs
  25. +29
    -6
      SegmentationWeight/SegmentationWeightPrint.cs
  26. +2
    -2
      SegmentationWeight/WeightSettingFrom.cs
  27. BIN
      Setup/Release/Setup.msi
  28. BIN
      Setup/Release/setup.exe
  29. +1759
    -223
      Setup/Setup.vdproj
  30. +2
    -1
      WeighAndGrading/GradeFrom.cs

+ 2
- 0
BO/BO.csproj View File

@ -95,6 +95,7 @@
<Compile Include="BO\LocalSyncBase.cs" />
<Compile Include="BO\SyncBase.cs" />
<Compile Include="CTuple.cs" />
<Compile Include="DropDownSets.cs" />
<Compile Include="LocalDmoSession.cs" />
<Compile Include="LocalForSyncList.cs" />
<Compile Include="SyncToServerBase.cs" />
@ -119,6 +120,7 @@
<Compile Include="Utils\ConvertUtil.cs" />
<Compile Include="Utils\LoginRpcUtil.cs" />
<Compile Include="Utils\LoginUserInfo.cs" />
<Compile Include="Utils\LogUtil.cs" />
<Compile Include="Utils\ServerUrlConfig.cs" />
<Compile Include="Utils\UrlUtil.cs" />
<Compile Include="Utils\XmlUtil.cs" />


+ 41
- 0
BO/DropDownSets.cs View File

@ -0,0 +1,41 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BO
{
public class DropDownSets
{
public static readonly string = "车间";
public static readonly string = "单元";
public static readonly string = "批次";
public static readonly string = "仓库";
public DropDownSets()
{
Details = new List<DropDownSet>();
}
public List<DropDownSet> Details { get; set; }
}
public class DropDownSet
{
public DropDownSet()
{
Details = new List<DropDownSet_Detail>();
}
public string Name { get; set; }
public List<DropDownSet_Detail> Details { get; set; }
}
public class DropDownSet_Detail
{
public long ID { get; set; }
public string Name { get; set; }
public string Code { get; set; }
}
}

+ 2
- 0
BO/LocalDmoSession.cs View File

@ -38,6 +38,8 @@ namespace BO
}
}
}
/// <summary>
/// 新增
/// </summary>


+ 3
- 1
BO/SyncToServerBase.cs View File

@ -4,6 +4,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
using BO.BO;
using BO.Utils;
using Forks.JsonRpc.Client;
using Newtonsoft.Json;
@ -35,6 +36,7 @@ namespace BO
}
catch (Exception e)
{
LogUtil.Error(e);
return false;
}
}
@ -64,7 +66,7 @@ namespace BO
}
catch (Exception e)
{
LogUtil.Error(e);
}
}
}


+ 4
- 1
BO/Utils/AfterLoginUtil.cs View File

@ -27,7 +27,8 @@ namespace BO.Utils
new Tuple<string,string>("胴体白条出入库",@"C:\B3\src\B3ButcherManageClient\TrunksIousOutInStore\bin\Debug\TrunksIousOutInStore"),
new Tuple<string,string>("掉猪处理员",@"C:\BwpB3Project\src\B3ButcherManageClient\DropPigReOrder\bin\Debug\DropPigReOrder"),
new Tuple<string,string>("配货员",@"D:\BWP\BWPB3\src\B3ButcherManageClient\Distribution\bin\Debug\Distribution"),
new Tuple<string,string>("分割称重",@"C:\B3\src\B3ButcherManageClient\SegmentationWeight\bin\Debug\SegmentationWeight")
new Tuple<string,string>("分割称重",@"C:\B3\src\B3ButcherManageClient\SegmentationWeight\bin\Debug\SegmentationWeight"),
new Tuple<string,string>("分割入库",@"C:\B3\src\B3ButcherManageClient\SegmentationInStore\bin\Debug\SegmentationInStore")
};
#else
static List<Tuple<string, string>> roleToAssemblies = new List<Tuple<string, string>>()
@ -38,6 +39,8 @@ namespace BO.Utils
new Tuple<string,string>("定级员",@"WeighAndGrading"),
new Tuple<string,string>("窒晕员",@"OrderConfirm"),
new Tuple<string,string>("掉猪处理员",@"DropPigReOrder"),
new Tuple<string,string>("分割称重",@"SegmentationWeight"),
new Tuple<string,string>("分割入库",@"SegmentationInStore"),
};
#endif


+ 38
- 0
BO/Utils/LogUtil.cs View File

@ -0,0 +1,38 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BO.Utils
{
public class LogUtil
{
private static readonly string LogFilePath = "log";
private static readonly object lockobj=new object();
public static void Error(Exception e)
{
Error(e.ToString());
}
public static void Error(string error)
{
lock (lockobj)
{
if (!Directory.Exists(LogFilePath))
{
Directory.CreateDirectory(LogFilePath);
}
var date = DateTime.Today.ToString("yyyyMMdd");
var fileName = LogFilePath+ "/" + date + ".txt";
using (var sw = new StreamWriter(fileName, true))
{
sw.WriteLine(DateTime.Now.ToString("yyyyMMdd HH:mm:ss----") + error);
}
}
}
}
}

+ 19
- 2
BO/Utils/UrlUtil.cs View File

@ -24,6 +24,7 @@ namespace BO.Utils
return barCode.Trim();
}
public static string GetGoodsName(string barCode)
{
//如果是链接
@ -48,9 +49,19 @@ namespace BO.Utils
}
public static string GetValueByKey(string key, string queryString)
{
var namevalue = GetQueryString(queryString);
if (namevalue.AllKeys.ToList().Contains(key))
{
return namevalue[key];
}
return "";
}
private static NameValueCollection GetQueryString(string queryString)
{
return GetQueryString(queryString, null, true);
return GetQueryString(queryString, Encoding.UTF8, true);
}
private static NameValueCollection GetQueryString(string queryString, Encoding encoding, bool isEncoded)
@ -108,7 +119,13 @@ namespace BO.Utils
return result;
}
private static string MyUrlDeCode(string str, Encoding encoding)
public static string UrlEncoding(string str)
{
string encode = HttpUtility.UrlEncode(str, Encoding.UTF8);
return encode;
}
public static string MyUrlDeCode(string str, Encoding encoding)
{
if (encoding == null)
{


+ 4
- 0
ButcherManageClient/ButcherManageClient.csproj View File

@ -118,6 +118,10 @@
<Project>{a782b23e-be6d-4f51-b5cb-5cd259ba97cc}</Project>
<Name>BWP.WinFormControl</Name>
</ProjectReference>
<ProjectReference Include="..\SegmentationInStore\SegmentationInStore.csproj">
<Project>{7528b945-c2cc-4266-83bd-d2214140c4bd}</Project>
<Name>SegmentationInStore</Name>
</ProjectReference>
<ProjectReference Include="..\SegmentationWeight\SegmentationWeight.csproj">
<Project>{f06032a9-bc6c-4123-947b-ef078fab7a74}</Project>
<Name>SegmentationWeight</Name>


+ 2
- 1
ButcherManageClient/Login.cs View File

@ -66,6 +66,7 @@ namespace ButcherManageClient
ButcherAppContext.Context.UserConfig.Connection = false;
}
// var form = AfterLoginUtil.CreateForm(ButcherAppContext.Context.UserConfig.Role);
// var form = AfterLoginUtil.CreateForm("分割入库");
var form = AfterLoginUtil.CreateForm("分割称重");
if (form == null)
throw new Exception("权限不符");
@ -142,7 +143,7 @@ namespace ButcherManageClient
private void Login_Load(object sender, EventArgs e)
{
#if !DEBUG
AutoUpdate();
//AutoUpdate();
#endif
}
}


+ 1
- 0
ButcherManageClient/SettingForm.cs View File

@ -67,6 +67,7 @@ namespace ButcherManageClient
var list=new List<string>();
list.Add("SegmentationWeight.dll");
list.Add("TrunksIousOutInStore.dll");
list.Add("SegmentationInStore.dll");
return list;
}


+ 16
- 0
SegmentationInStore/Rpc/Dto/Ext.cs View File

@ -0,0 +1,16 @@
namespace SegmentationInStore.Rpc.Dto
{
public static class Ext
{
public static SegmentationInStoreRecordDto EToSegmentationInStore(this SegmentationWeightRecordDto record)
{
var instore=new SegmentationInStoreRecordDto();
instore.BarCode = record.BarCode;
instore.Goods_ID = record.Goods_ID;
instore.Goods_Name = record.Goods_Name;
instore.Goods_Spec = record.Goods_Spec;
instore.Weight = record.Weight;
return instore;
}
}
}

+ 38
- 0
SegmentationInStore/Rpc/Dto/SegmentationInStoreRecord.cs View File

@ -0,0 +1,38 @@
using System;
using AutoMapper;
using BO.BO;
using Forks.EnterpriseServices.DataForm;
using Forks.EnterpriseServices.DomainObjects2;
using Newtonsoft.Json;
namespace SegmentationInStore.Rpc.Dto
{
[Serializable]
[MapToTable("SegmentationInStoreRecord")]
[DFClass]
public class SegmentationInStoreRecord : LocalSyncBase
{
public string BarCode { get; set; }
public long Goods_ID { get; set; }
public string Goods_Name { get; set; }
public string Goods_Spec { get; set; }
public decimal Weight { get; set; }
// public DateTime CreateTime { get; set; }
public long? Store_ID { get; set; }
public string Store_Name { get; set; }
public string ProductBatch { get; set; }
public string BiaoShi { get; set; }
public string CardBarCode { get; set; }//放产品的车的条码
public override string GetDtoJson()
{
var config = new MapperConfiguration(cfg => {
cfg.CreateMap<SegmentationInStoreRecord, SegmentationInStoreRecordDto>();
});
var mapper = config.CreateMapper();
var dto = mapper.Map<SegmentationInStoreRecordDto>(this);
dto.Client_ID = this.ID;
return JsonConvert.SerializeObject(dto);
}
}
}

SegmentationInStore/Rpc/Dto/SegmentationInStoreDto.cs → SegmentationInStore/Rpc/Dto/SegmentationInStoreRecordDto.cs View File

@ -1,19 +1,22 @@
using System;
using BO.BO.Dtos;
using Forks.EnterpriseServices.DataForm;
namespace SegmentationInStore.Rpc.Dto
{
public class SegmentationInStoreDto
[DFClass]
public class SegmentationInStoreRecordDto : SyncBaseDto
{
public long ID { get; set; }
public string BarCode { get; set; }
public long Goods_ID { get; set; }
public string Goods_Name { get; set; }
public string Goods_Spec { get; set; }
public decimal Weight { get; set; }
public DateTime CreateTime { get; set; }
// public DateTime CreateTime { get; set; }
public long? Store_ID { get; set; }
public string Store_Name { get; set; }
public string ProductBatch { get; set; }
public string BiaoShi { get; set; }
public string CardBarCode { get; set; }//放产品的车的条码
}
}

SegmentationInStore/Rpc/Dto/SegmentationWeightRecord.cs → SegmentationInStore/Rpc/Dto/SegmentationWeightRecordDto.cs View File

@ -1,19 +1,15 @@
namespace SegmentationInStore.Rpc.Dto
{
public class SegmentationWeightRecord
public class SegmentationWeightRecordDto
{
public long ID { get; set; }
public string BarCode { get; set; }//条码
public long Goods_ID { get; set; }
public string Goods_Name { get; set; }
public string Goods_Spec { get; set; }
public decimal PiWeight { get; set; }//皮重
public decimal MaoWeight { get; set; }//毛重
public decimal JingWeight { get; set; }//净重
public decimal Weight { get; set; }//净重
public string CardBarCode{ get; set; }//放产品的车的条码
public string ProductBatch { get; set; }
public string BiaoShi { get; set; }//用来记录那个工作台或者哪台触摸屏做的
}

+ 0
- 23
SegmentationInStore/Rpc/Ext.cs View File

@ -1,23 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using SegmentationInStore.Rpc.Dto;
namespace SegmentationInStore.Rpc
{
public static class Ext
{
public static SegmentationInStoreDto EToSegmentationInStore(this SegmentationWeightRecord record)
{
var instore=new SegmentationInStoreDto();
instore.BarCode = record.BarCode;
instore.Goods_ID = record.Goods_ID;
instore.Goods_Name = record.Goods_Name;
instore.Goods_Spec = record.Goods_Spec;
instore.Weight = record.JingWeight;
return instore;
}
}
}

+ 63
- 13
SegmentationInStore/Rpc/SegmentationInStoreRpc.cs View File

@ -1,20 +1,78 @@
using System.Collections.Generic;
using BO;
using Forks.JsonRpc.Client;
using Newtonsoft.Json;
using SegmentationInStore.Rpc.Dto;
namespace SegmentationInStore.Rpc
{
public class SegmentationInStoreRpc
public class SegmentationInStoreRpc : SyncToServerBase<SegmentationInStoreRecord>
{
// 定义一个静态变量来保存类的实例
private static SegmentationInStoreRpc uniqueInstance;
// 定义一个标识确保线程同步
private static readonly object locker = new object();
// 定义私有构造函数,使外界不能创建该类实例
private SegmentationInStoreRpc()
{
}
/// <summary>
/// 定义公有方法提供一个全局访问点,同时你也可以定义公有属性来提供全局访问点
/// </summary>
/// <returns></returns>
public static SegmentationInStoreRpc GetInstance()
{
// 当第一个线程运行到这里时,此时会对locker对象 "加锁",
// 当第二个线程运行该方法时,首先检测到locker对象为"加锁"状态,该线程就会挂起等待第一个线程解锁
// lock语句运行完之后(即线程运行完之后)会对该对象"解锁"
// 双重锁定只需要一句判断就可以了
if (uniqueInstance == null)
{
lock (locker)
{
// 如果类的实例不存在则创建,否则直接返回
if (uniqueInstance == null)
{
uniqueInstance = new SegmentationInStoreRpc();
}
}
}
return uniqueInstance;
}
protected override string InsertRpcUrl
{
get { return "/MainSystem/B3ClientService/Rpcs/BillRpc/SegmentationInStoreRecordRpc/Insert"; }
}
protected override string UpdateRpcUrl
{
get { return "/MainSystem/B3ClientService/Rpcs/BillRpc/SegmentationInStoreRecordRpc/Update"; }
}
protected override string DeleteRpcUrl
{
get { return "/MainSystem/B3ClientService/Rpcs/BillRpc/SegmentationInStoreRecordRpc/Delete"; }
}
/// <summary>
/// 获取所有未扫码的
/// </summary>
/// <returns></returns>
public static List<SegmentationWeightRecord> GetNotInStoreList()
public static List<SegmentationWeightRecordDto> GetNotInStoreList()
{
var json = RpcFacade.Call<string>("/MainSystem/B3ClientService/Rpcs/BillRpc/SegmentationWeightRecordRpc/GetNotInStoreList");
var list= JsonConvert.DeserializeObject<List<SegmentationWeightRecord>>(json);
var list= JsonConvert.DeserializeObject<List<SegmentationWeightRecordDto>>(json);
return list;
}
@ -22,19 +80,11 @@ namespace SegmentationInStore.Rpc
/// 获取所有未扫码的
/// </summary>
/// <returns></returns>
public static List<SegmentationWeightRecord> GetNotInStoreListByMaxId(long id)
public static List<SegmentationWeightRecordDto> GetNotInStoreListByMaxId(long id)
{
var json = RpcFacade.Call<string>("/MainSystem/B3ClientService/Rpcs/BillRpc/SegmentationWeightRecordRpc/GetNotInStoreListByMaxId",id);
var list= JsonConvert.DeserializeObject<List<SegmentationWeightRecord>>(json);
var list= JsonConvert.DeserializeObject<List<SegmentationWeightRecordDto>>(json);
return list;
}
/// <summary>
/// 添加入库记录
/// </summary>
public static long Insert(SegmentationInStoreDto instore)
{
var json = JsonConvert.SerializeObject(instore);
return RpcFacade.Call<long>("/MainSystem/B3ClientService/Rpcs/BillRpc/SegmentationInStoreRecordRpc/Insert", json);
}
}
}

+ 15
- 3
SegmentationInStore/SegmentationInStore.csproj View File

@ -30,7 +30,18 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="AutoMapper">
<HintPath>..\TrunksIousOutInStore\bin\Debug\AutoMapper.dll</HintPath>
</Reference>
<Reference Include="Forks.EnterpriseServices, Version=3.1.0.0, Culture=neutral, PublicKeyToken=7254430f49d10aae, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\tsref\Debug\Forks.EnterpriseServices.dll</HintPath>
</Reference>
<Reference Include="Forks.JsonRpc.Client, Version=1.0.0.0, Culture=neutral, PublicKeyToken=7254430f49d10aae, processorArchitecture=MSIL" />
<Reference Include="Forks.Utils, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7254430f49d10aae, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\tsref\Debug\Forks.Utils.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=4.0.3.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\tsref\Debug\Newtonsoft.Json.dll</HintPath>
@ -51,9 +62,10 @@
<Reference Include="WindowsBase" />
</ItemGroup>
<ItemGroup>
<Compile Include="Rpc\Dto\SegmentationInStoreDto.cs" />
<Compile Include="Rpc\Dto\SegmentationWeightRecord.cs" />
<Compile Include="Rpc\Ext.cs" />
<Compile Include="Rpc\Dto\SegmentationInStoreRecordDto.cs" />
<Compile Include="Rpc\Dto\SegmentationWeightRecordDto.cs" />
<Compile Include="Rpc\Dto\Ext.cs" />
<Compile Include="Rpc\Dto\SegmentationInStoreRecord.cs" />
<Compile Include="Rpc\SegmentationInStoreRpc.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="SegmentationInStoreForm.cs">


+ 376
- 262
SegmentationInStore/SegmentationInStoreForm.Designer.cs View File

@ -28,63 +28,74 @@
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle14 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle15 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle13 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle14 = new System.Windows.Forms.DataGridViewCellStyle();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.gridUnSubmit = new BWP.WinFormControl.UDataGridView();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.gridUnScan = new BWP.WinFormControl.UDataGridView();
this.cbxStore = new System.Windows.Forms.ComboBox();
this.txtBarCode = new System.Windows.Forms.TextBox();
this.groupBox4 = new System.Windows.Forms.GroupBox();
this.groupBox3 = new System.Windows.Forms.GroupBox();
this.gridSubmited = new BWP.WinFormControl.UDataGridView();
this.richTextBox1 = new System.Windows.Forms.RichTextBox();
this.label2 = new System.Windows.Forms.Label();
this.picSyncStatus = new System.Windows.Forms.PictureBox();
this.label11 = new System.Windows.Forms.Label();
this.button1 = new System.Windows.Forms.Button();
this.uComboBox1 = new BWP.WinFormControl.UComboBox();
this.picNetStatus = new System.Windows.Forms.PictureBox();
this.label1 = new System.Windows.Forms.Label();
this.timerSyncUnScan = new System.Windows.Forms.Timer(this.components);
this.timerUpload = new System.Windows.Forms.Timer(this.components);
this.label10 = new System.Windows.Forms.Label();
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
this.groupBox3 = new System.Windows.Forms.GroupBox();
this.gridSubmited = new BWP.WinFormControl.UDataGridView();
this.submited序号 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.submited条码 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.submited产品 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.submited重量 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.submited仓库 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.submited日期 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.uDataGridView1 = new BWP.WinFormControl.UDataGridView();
this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn5 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.button2 = new System.Windows.Forms.Button();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.gridUnScan = new BWP.WinFormControl.UDataGridView();
this.unscan序号 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.unscan条码 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.unscan产品 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.unscan重量 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.unscan日期 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.unsubmit条码 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.unsubmit产品 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.unsubmit重量 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.unsubmit仓库 = new System.Windows.Forms.DataGridViewTextBoxColumn();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
this.groupBox4.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.picSyncStatus)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.picNetStatus)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit();
this.splitContainer2.Panel1.SuspendLayout();
this.splitContainer2.Panel2.SuspendLayout();
this.splitContainer2.SuspendLayout();
this.groupBox3.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.gridSubmited)).BeginInit();
this.groupBox2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.gridUnSubmit)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.uDataGridView1)).BeginInit();
this.groupBox1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.gridUnScan)).BeginInit();
this.groupBox3.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.gridSubmited)).BeginInit();
this.SuspendLayout();
//
// splitContainer1
@ -95,145 +106,152 @@
this.splitContainer1.Name = "splitContainer1";
this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.Controls.Add(this.cbxStore);
this.splitContainer1.Panel1.Controls.Add(this.txtBarCode);
this.splitContainer1.Panel1.Controls.Add(this.groupBox4);
this.splitContainer1.Panel1.Controls.Add(this.label2);
this.splitContainer1.Panel1.Controls.Add(this.picSyncStatus);
this.splitContainer1.Panel1.Controls.Add(this.label11);
this.splitContainer1.Panel1.Controls.Add(this.button1);
this.splitContainer1.Panel1.Controls.Add(this.picNetStatus);
this.splitContainer1.Panel1.Controls.Add(this.label1);
this.splitContainer1.Panel1.Controls.Add(this.label10);
//
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.Controls.Add(this.splitContainer2);
this.splitContainer1.Size = new System.Drawing.Size(1031, 558);
this.splitContainer1.SplitterDistance = 25;
this.splitContainer1.Size = new System.Drawing.Size(1098, 594);
this.splitContainer1.SplitterDistance = 102;
this.splitContainer1.TabIndex = 0;
//
// splitContainer2
// cbxStore
//
this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer2.Location = new System.Drawing.Point(0, 0);
this.splitContainer2.Name = "splitContainer2";
this.cbxStore.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cbxStore.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.cbxStore.FormattingEnabled = true;
this.cbxStore.Location = new System.Drawing.Point(83, 55);
this.cbxStore.Name = "cbxStore";
this.cbxStore.Size = new System.Drawing.Size(226, 24);
this.cbxStore.TabIndex = 46;
//
// splitContainer2.Panel1
// txtBarCode
//
this.splitContainer2.Panel1.Controls.Add(this.groupBox2);
this.splitContainer2.Panel1.Controls.Add(this.groupBox1);
this.txtBarCode.Enabled = false;
this.txtBarCode.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtBarCode.Location = new System.Drawing.Point(83, 10);
this.txtBarCode.Name = "txtBarCode";
this.txtBarCode.Size = new System.Drawing.Size(227, 26);
this.txtBarCode.TabIndex = 45;
//
// splitContainer2.Panel2
// groupBox4
//
this.splitContainer2.Panel2.Controls.Add(this.groupBox4);
this.splitContainer2.Panel2.Controls.Add(this.groupBox3);
this.splitContainer2.Panel2.Controls.Add(this.button1);
this.splitContainer2.Panel2.Controls.Add(this.uComboBox1);
this.splitContainer2.Panel2.Controls.Add(this.label1);
this.splitContainer2.Size = new System.Drawing.Size(1031, 529);
this.splitContainer2.SplitterDistance = 467;
this.splitContainer2.TabIndex = 0;
this.groupBox4.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBox4.Controls.Add(this.richTextBox1);
this.groupBox4.Location = new System.Drawing.Point(755, 3);
this.groupBox4.Name = "groupBox4";
this.groupBox4.Size = new System.Drawing.Size(331, 94);
this.groupBox4.TabIndex = 4;
this.groupBox4.TabStop = false;
this.groupBox4.Text = "最近异常记录";
//
// groupBox2
// richTextBox1
//
this.richTextBox1.Dock = System.Windows.Forms.DockStyle.Fill;
this.richTextBox1.Enabled = false;
this.richTextBox1.Location = new System.Drawing.Point(3, 17);
this.richTextBox1.Name = "richTextBox1";
this.richTextBox1.Size = new System.Drawing.Size(325, 74);
this.richTextBox1.TabIndex = 0;
this.richTextBox1.Text = "";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label2.Location = new System.Drawing.Point(21, 13);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(56, 16);
this.label2.TabIndex = 44;
this.label2.Text = "条码:";
//
// picSyncStatus
//
this.picSyncStatus.ErrorImage = null;
this.picSyncStatus.InitialImage = null;
this.picSyncStatus.Location = new System.Drawing.Point(387, 55);
this.picSyncStatus.Name = "picSyncStatus";
this.picSyncStatus.Size = new System.Drawing.Size(30, 30);
this.picSyncStatus.TabIndex = 43;
this.picSyncStatus.TabStop = false;
//
// label11
//
this.label11.AutoSize = true;
this.label11.Location = new System.Drawing.Point(352, 63);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(29, 12);
this.label11.TabIndex = 42;
this.label11.Text = "同步";
//
this.groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBox2.Controls.Add(this.gridUnSubmit);
this.groupBox2.Location = new System.Drawing.Point(4, 313);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(460, 213);
this.groupBox2.TabIndex = 1;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "等待提交产品";
// button1
//
// gridUnSubmit
this.button1.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.button1.Location = new System.Drawing.Point(524, 18);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(89, 46);
this.button1.TabIndex = 2;
this.button1.Text = "提交";
this.button1.UseVisualStyleBackColor = true;
//
this.gridUnSubmit.AllowUserToAddRows = false;
this.gridUnSubmit.AllowUserToDeleteRows = false;
this.gridUnSubmit.AllowUserToResizeColumns = false;
this.gridUnSubmit.AllowUserToResizeRows = false;
dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.gridUnSubmit.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
this.gridUnSubmit.BackgroundColor = System.Drawing.Color.White;
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle2.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.gridUnSubmit.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
this.gridUnSubmit.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.gridUnSubmit.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.unsubmit条码,
this.unsubmit产品,
this.unsubmit重量,
this.unsubmit仓库});
this.gridUnSubmit.Dock = System.Windows.Forms.DockStyle.Fill;
this.gridUnSubmit.Location = new System.Drawing.Point(3, 17);
this.gridUnSubmit.MultiSelect = false;
this.gridUnSubmit.Name = "gridUnSubmit";
this.gridUnSubmit.ReadOnly = true;
this.gridUnSubmit.RowHeadersVisible = false;
dataGridViewCellStyle4.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle4.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
this.gridUnSubmit.RowsDefaultCellStyle = dataGridViewCellStyle4;
this.gridUnSubmit.RowTemplate.Height = 23;
this.gridUnSubmit.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.gridUnSubmit.Size = new System.Drawing.Size(454, 193);
this.gridUnSubmit.TabIndex = 1;
// picNetStatus
//
// groupBox1
this.picNetStatus.ErrorImage = null;
this.picNetStatus.InitialImage = null;
this.picNetStatus.Location = new System.Drawing.Point(387, 10);
this.picNetStatus.Name = "picNetStatus";
this.picNetStatus.Size = new System.Drawing.Size(30, 30);
this.picNetStatus.TabIndex = 41;
this.picNetStatus.TabStop = false;
//
this.groupBox1.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.groupBox1.Controls.Add(this.gridUnScan);
this.groupBox1.Location = new System.Drawing.Point(4, 4);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(460, 302);
this.groupBox1.TabIndex = 0;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "未扫码产品";
// label1
//
// gridUnScan
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label1.Location = new System.Drawing.Point(21, 60);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(56, 16);
this.label1.TabIndex = 0;
this.label1.Text = "仓库:";
//
this.gridUnScan.AllowUserToAddRows = false;
this.gridUnScan.AllowUserToDeleteRows = false;
this.gridUnScan.AllowUserToResizeColumns = false;
this.gridUnScan.AllowUserToResizeRows = false;
dataGridViewCellStyle5.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.gridUnScan.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle5;
this.gridUnScan.BackgroundColor = System.Drawing.Color.White;
dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle6.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle6.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle6.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle6.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle6.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.gridUnScan.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle6;
this.gridUnScan.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.gridUnScan.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.unscan序号,
this.unscan条码,
this.unscan产品,
this.unscan重量,
this.unscan日期});
this.gridUnScan.Dock = System.Windows.Forms.DockStyle.Fill;
this.gridUnScan.Location = new System.Drawing.Point(3, 17);
this.gridUnScan.MultiSelect = false;
this.gridUnScan.Name = "gridUnScan";
this.gridUnScan.ReadOnly = true;
this.gridUnScan.RowHeadersVisible = false;
dataGridViewCellStyle9.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle9.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
this.gridUnScan.RowsDefaultCellStyle = dataGridViewCellStyle9;
this.gridUnScan.RowTemplate.Height = 23;
this.gridUnScan.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.gridUnScan.Size = new System.Drawing.Size(454, 282);
this.gridUnScan.TabIndex = 0;
// label10
//
// groupBox4
this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(352, 18);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(29, 12);
this.label10.TabIndex = 40;
this.label10.Text = "网络";
//
this.groupBox4.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBox4.Location = new System.Drawing.Point(4, 324);
this.groupBox4.Name = "groupBox4";
this.groupBox4.Size = new System.Drawing.Size(553, 205);
this.groupBox4.TabIndex = 4;
this.groupBox4.TabStop = false;
this.groupBox4.Text = "最近异常记录";
// splitContainer2
//
this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer2.Location = new System.Drawing.Point(0, 0);
this.splitContainer2.Name = "splitContainer2";
//
// splitContainer2.Panel1
//
this.splitContainer2.Panel1.Controls.Add(this.groupBox3);
//
// splitContainer2.Panel2
//
this.splitContainer2.Panel2.Controls.Add(this.groupBox2);
this.splitContainer2.Panel2.Controls.Add(this.groupBox1);
this.splitContainer2.Size = new System.Drawing.Size(1098, 488);
this.splitContainer2.SplitterDistance = 578;
this.splitContainer2.TabIndex = 0;
//
// groupBox3
//
@ -241,12 +259,12 @@
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBox3.Controls.Add(this.gridSubmited);
this.groupBox3.Location = new System.Drawing.Point(4, 47);
this.groupBox3.Location = new System.Drawing.Point(3, 3);
this.groupBox3.Name = "groupBox3";
this.groupBox3.Size = new System.Drawing.Size(553, 259);
this.groupBox3.Size = new System.Drawing.Size(572, 482);
this.groupBox3.TabIndex = 3;
this.groupBox3.TabStop = false;
this.groupBox3.Text = "已提交产品";
this.groupBox3.Text = "已扫码产品";
//
// gridSubmited
//
@ -254,17 +272,17 @@
this.gridSubmited.AllowUserToDeleteRows = false;
this.gridSubmited.AllowUserToResizeColumns = false;
this.gridSubmited.AllowUserToResizeRows = false;
dataGridViewCellStyle10.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.gridSubmited.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle10;
dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.gridSubmited.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
this.gridSubmited.BackgroundColor = System.Drawing.Color.White;
dataGridViewCellStyle11.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle11.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle11.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle11.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle11.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle11.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle11.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.gridSubmited.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle11;
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle2.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.gridSubmited.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
this.gridSubmited.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.gridSubmited.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.submited序号,
@ -279,56 +297,14 @@
this.gridSubmited.Name = "gridSubmited";
this.gridSubmited.ReadOnly = true;
this.gridSubmited.RowHeadersVisible = false;
dataGridViewCellStyle14.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle14.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
this.gridSubmited.RowsDefaultCellStyle = dataGridViewCellStyle14;
dataGridViewCellStyle5.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle5.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
this.gridSubmited.RowsDefaultCellStyle = dataGridViewCellStyle5;
this.gridSubmited.RowTemplate.Height = 23;
this.gridSubmited.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.gridSubmited.Size = new System.Drawing.Size(547, 239);
this.gridSubmited.Size = new System.Drawing.Size(566, 462);
this.gridSubmited.TabIndex = 1;
//
// button1
//
this.button1.Location = new System.Drawing.Point(262, 14);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(89, 23);
this.button1.TabIndex = 2;
this.button1.Text = "同步数据";
this.button1.UseVisualStyleBackColor = true;
//
// uComboBox1
//
this.uComboBox1.CodeArgs = null;
this.uComboBox1.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
this.uComboBox1.EnableTopItem = true;
this.uComboBox1.FormattingEnabled = true;
this.uComboBox1.Location = new System.Drawing.Point(97, 14);
this.uComboBox1.Name = "uComboBox1";
this.uComboBox1.Range = 10;
this.uComboBox1.Size = new System.Drawing.Size(140, 22);
this.uComboBox1.TabIndex = 1;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(26, 19);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(65, 12);
this.label1.TabIndex = 0;
this.label1.Text = "入库仓库:";
//
// timerSyncUnScan
//
this.timerSyncUnScan.Enabled = true;
this.timerSyncUnScan.Interval = 1000;
this.timerSyncUnScan.Tick += new System.EventHandler(this.timerSyncUnScan_Tick);
//
// timerUpload
//
this.timerUpload.Enabled = true;
this.timerUpload.Interval = 1000;
this.timerUpload.Tick += new System.EventHandler(this.timerUpload_Tick);
//
// submited序号
//
this.submited序号.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
@ -349,18 +325,19 @@
//
// submited产品
//
this.submited产品.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.submited产品.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
this.submited产品.DataPropertyName = "Goods_Name";
this.submited产品.HeaderText = "产品";
this.submited产品.Name = "submited产品";
this.submited产品.ReadOnly = true;
this.submited产品.Width = 65;
//
// submited重量
//
this.submited重量.DataPropertyName = "Weight";
dataGridViewCellStyle12.Format = "N2";
dataGridViewCellStyle12.NullValue = null;
this.submited重量.DefaultCellStyle = dataGridViewCellStyle12;
dataGridViewCellStyle3.Format = "N2";
dataGridViewCellStyle3.NullValue = null;
this.submited重量.DefaultCellStyle = dataGridViewCellStyle3;
this.submited重量.HeaderText = "重量";
this.submited重量.Name = "submited重量";
this.submited重量.ReadOnly = true;
@ -375,12 +352,169 @@
// submited日期
//
this.submited日期.DataPropertyName = "CreateTime";
dataGridViewCellStyle13.Format = "F";
dataGridViewCellStyle13.NullValue = null;
this.submited日期.DefaultCellStyle = dataGridViewCellStyle13;
dataGridViewCellStyle4.Format = "F";
dataGridViewCellStyle4.NullValue = null;
this.submited日期.DefaultCellStyle = dataGridViewCellStyle4;
this.submited日期.HeaderText = "日期";
this.submited日期.Name = "submited日期";
this.submited日期.ReadOnly = true;
this.submited日期.Visible = false;
//
// groupBox2
//
this.groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBox2.Controls.Add(this.uDataGridView1);
this.groupBox2.Controls.Add(this.button2);
this.groupBox2.Location = new System.Drawing.Point(7, 3);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(506, 181);
this.groupBox2.TabIndex = 1;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "退库";
//
// uDataGridView1
//
this.uDataGridView1.AllowUserToAddRows = false;
this.uDataGridView1.AllowUserToDeleteRows = false;
this.uDataGridView1.AllowUserToResizeColumns = false;
this.uDataGridView1.AllowUserToResizeRows = false;
dataGridViewCellStyle6.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.uDataGridView1.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle6;
this.uDataGridView1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.uDataGridView1.BackgroundColor = System.Drawing.Color.White;
dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle7.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle7.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle7.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle7.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle7.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.uDataGridView1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle7;
this.uDataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.uDataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.dataGridViewTextBoxColumn1,
this.dataGridViewTextBoxColumn2,
this.dataGridViewTextBoxColumn3,
this.dataGridViewTextBoxColumn4,
this.dataGridViewTextBoxColumn5});
this.uDataGridView1.Location = new System.Drawing.Point(3, 55);
this.uDataGridView1.MultiSelect = false;
this.uDataGridView1.Name = "uDataGridView1";
this.uDataGridView1.ReadOnly = true;
this.uDataGridView1.RowHeadersVisible = false;
dataGridViewCellStyle10.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle10.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
this.uDataGridView1.RowsDefaultCellStyle = dataGridViewCellStyle10;
this.uDataGridView1.RowTemplate.Height = 23;
this.uDataGridView1.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.uDataGridView1.Size = new System.Drawing.Size(503, 126);
this.uDataGridView1.TabIndex = 3;
//
// dataGridViewTextBoxColumn1
//
this.dataGridViewTextBoxColumn1.DataPropertyName = "ID";
this.dataGridViewTextBoxColumn1.HeaderText = "序号";
this.dataGridViewTextBoxColumn1.Name = "dataGridViewTextBoxColumn1";
this.dataGridViewTextBoxColumn1.ReadOnly = true;
//
// dataGridViewTextBoxColumn2
//
this.dataGridViewTextBoxColumn2.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.dataGridViewTextBoxColumn2.DataPropertyName = "BarCode";
this.dataGridViewTextBoxColumn2.HeaderText = "条码";
this.dataGridViewTextBoxColumn2.Name = "dataGridViewTextBoxColumn2";
this.dataGridViewTextBoxColumn2.ReadOnly = true;
//
// dataGridViewTextBoxColumn3
//
this.dataGridViewTextBoxColumn3.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
this.dataGridViewTextBoxColumn3.DataPropertyName = "Goods_Name";
this.dataGridViewTextBoxColumn3.HeaderText = "产品";
this.dataGridViewTextBoxColumn3.Name = "dataGridViewTextBoxColumn3";
this.dataGridViewTextBoxColumn3.ReadOnly = true;
this.dataGridViewTextBoxColumn3.Width = 60;
//
// dataGridViewTextBoxColumn4
//
this.dataGridViewTextBoxColumn4.DataPropertyName = "JingWeight";
dataGridViewCellStyle8.Format = "N2";
this.dataGridViewTextBoxColumn4.DefaultCellStyle = dataGridViewCellStyle8;
this.dataGridViewTextBoxColumn4.HeaderText = "重量";
this.dataGridViewTextBoxColumn4.Name = "dataGridViewTextBoxColumn4";
this.dataGridViewTextBoxColumn4.ReadOnly = true;
//
// dataGridViewTextBoxColumn5
//
this.dataGridViewTextBoxColumn5.DataPropertyName = "CreateTime";
dataGridViewCellStyle9.Format = "F";
dataGridViewCellStyle9.NullValue = null;
this.dataGridViewTextBoxColumn5.DefaultCellStyle = dataGridViewCellStyle9;
this.dataGridViewTextBoxColumn5.HeaderText = "日期";
this.dataGridViewTextBoxColumn5.Name = "dataGridViewTextBoxColumn5";
this.dataGridViewTextBoxColumn5.ReadOnly = true;
//
// button2
//
this.button2.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.button2.Location = new System.Drawing.Point(6, 17);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(58, 32);
this.button2.TabIndex = 2;
this.button2.Text = "退货";
this.button2.UseVisualStyleBackColor = true;
//
// groupBox1
//
this.groupBox1.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.groupBox1.Controls.Add(this.gridUnScan);
this.groupBox1.Location = new System.Drawing.Point(7, 190);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(509, 295);
this.groupBox1.TabIndex = 0;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "未扫码产品";
//
// gridUnScan
//
this.gridUnScan.AllowUserToAddRows = false;
this.gridUnScan.AllowUserToDeleteRows = false;
this.gridUnScan.AllowUserToResizeColumns = false;
this.gridUnScan.AllowUserToResizeRows = false;
dataGridViewCellStyle11.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.gridUnScan.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle11;
this.gridUnScan.BackgroundColor = System.Drawing.Color.White;
dataGridViewCellStyle12.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle12.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle12.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle12.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle12.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle12.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle12.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.gridUnScan.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle12;
this.gridUnScan.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.gridUnScan.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.unscan序号,
this.unscan条码,
this.unscan产品,
this.unscan重量,
this.unscan日期});
this.gridUnScan.Dock = System.Windows.Forms.DockStyle.Fill;
this.gridUnScan.Location = new System.Drawing.Point(3, 17);
this.gridUnScan.MultiSelect = false;
this.gridUnScan.Name = "gridUnScan";
this.gridUnScan.ReadOnly = true;
this.gridUnScan.RowHeadersVisible = false;
dataGridViewCellStyle15.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle15.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
this.gridUnScan.RowsDefaultCellStyle = dataGridViewCellStyle15;
this.gridUnScan.RowTemplate.Height = 23;
this.gridUnScan.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.gridUnScan.Size = new System.Drawing.Size(503, 275);
this.gridUnScan.TabIndex = 0;
//
// unscan序号
//
@ -404,13 +538,13 @@
this.unscan产品.HeaderText = "产品";
this.unscan产品.Name = "unscan产品";
this.unscan产品.ReadOnly = true;
this.unscan产品.Width = 65;
this.unscan产品.Width = 60;
//
// unscan重量
//
this.unscan重量.DataPropertyName = "JingWeight";
dataGridViewCellStyle7.Format = "N2";
this.unscan重量.DefaultCellStyle = dataGridViewCellStyle7;
dataGridViewCellStyle13.Format = "N2";
this.unscan重量.DefaultCellStyle = dataGridViewCellStyle13;
this.unscan重量.HeaderText = "重量";
this.unscan重量.Name = "unscan重量";
this.unscan重量.ReadOnly = true;
@ -418,52 +552,20 @@
// unscan日期
//
this.unscan日期.DataPropertyName = "CreateTime";
dataGridViewCellStyle8.Format = "F";
dataGridViewCellStyle8.NullValue = null;
this.unscan日期.DefaultCellStyle = dataGridViewCellStyle8;
dataGridViewCellStyle14.Format = "F";
dataGridViewCellStyle14.NullValue = null;
this.unscan日期.DefaultCellStyle = dataGridViewCellStyle14;
this.unscan日期.HeaderText = "日期";
this.unscan日期.Name = "unscan日期";
this.unscan日期.ReadOnly = true;
//
// unsubmit条码
//
this.unsubmit条码.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
this.unsubmit条码.DataPropertyName = "BarCode";
this.unsubmit条码.HeaderText = "条码";
this.unsubmit条码.Name = "unsubmit条码";
this.unsubmit条码.ReadOnly = true;
this.unsubmit条码.Width = 65;
//
// unsubmit产品
//
this.unsubmit产品.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.unsubmit产品.DataPropertyName = "Goods_Name";
this.unsubmit产品.HeaderText = "产品";
this.unsubmit产品.Name = "unsubmit产品";
this.unsubmit产品.ReadOnly = true;
//
// unsubmit重量
//
this.unsubmit重量.DataPropertyName = "Weight";
dataGridViewCellStyle3.Format = "N2";
this.unsubmit重量.DefaultCellStyle = dataGridViewCellStyle3;
this.unsubmit重量.HeaderText = "重量";
this.unsubmit重量.Name = "unsubmit重量";
this.unsubmit重量.ReadOnly = true;
//
// unsubmit仓库
//
this.unsubmit仓库.DataPropertyName = "Store_Name";
this.unsubmit仓库.HeaderText = "仓库";
this.unsubmit仓库.Name = "unsubmit仓库";
this.unsubmit仓库.ReadOnly = true;
//
// SegmentationInStoreForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1031, 558);
this.ClientSize = new System.Drawing.Size(1098, 594);
this.Controls.Add(this.splitContainer1);
this.KeyPreview = true;
this.MinimizeBox = false;
this.Name = "SegmentationInStoreForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
@ -471,20 +573,25 @@
this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.SegmentationInStoreForm_FormClosed);
this.Load += new System.EventHandler(this.SegmentationInStoreForm_Load);
this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.SegmentationInStoreForm_KeyDown);
this.splitContainer1.Panel1.ResumeLayout(false);
this.splitContainer1.Panel1.PerformLayout();
this.splitContainer1.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
this.splitContainer1.ResumeLayout(false);
this.groupBox4.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.picSyncStatus)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.picNetStatus)).EndInit();
this.splitContainer2.Panel1.ResumeLayout(false);
this.splitContainer2.Panel2.ResumeLayout(false);
this.splitContainer2.Panel2.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit();
this.splitContainer2.ResumeLayout(false);
this.groupBox3.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.gridSubmited)).EndInit();
this.groupBox2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.gridUnSubmit)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.uDataGridView1)).EndInit();
this.groupBox1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.gridUnScan)).EndInit();
this.groupBox3.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.gridSubmited)).EndInit();
this.ResumeLayout(false);
}
@ -493,27 +600,34 @@
private System.Windows.Forms.SplitContainer splitContainer1;
private System.Windows.Forms.SplitContainer splitContainer2;
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.GroupBox groupBox1;
private BWP.WinFormControl.UComboBox uComboBox1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.GroupBox groupBox3;
private System.Windows.Forms.GroupBox groupBox4;
private System.Windows.Forms.Timer timerSyncUnScan;
private BWP.WinFormControl.UDataGridView gridUnSubmit;
private BWP.WinFormControl.UDataGridView gridUnScan;
private BWP.WinFormControl.UDataGridView gridSubmited;
private System.Windows.Forms.Timer timerUpload;
private System.Windows.Forms.DataGridViewTextBoxColumn unsubmit条码;
private System.Windows.Forms.DataGridViewTextBoxColumn unsubmit产品;
private System.Windows.Forms.DataGridViewTextBoxColumn unsubmit重量;
private System.Windows.Forms.DataGridViewTextBoxColumn unsubmit仓库;
private System.Windows.Forms.DataGridViewTextBoxColumn unscan序号;
private System.Windows.Forms.DataGridViewTextBoxColumn unscan条码;
private System.Windows.Forms.DataGridViewTextBoxColumn unscan产品;
private System.Windows.Forms.DataGridViewTextBoxColumn unscan重量;
private System.Windows.Forms.DataGridViewTextBoxColumn unscan日期;
private System.Windows.Forms.PictureBox picNetStatus;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.PictureBox picSyncStatus;
private System.Windows.Forms.Label label11;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox txtBarCode;
private System.Windows.Forms.RichTextBox richTextBox1;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.GroupBox groupBox2;
private BWP.WinFormControl.UDataGridView uDataGridView1;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn1;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn2;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn3;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn4;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn5;
private System.Windows.Forms.ComboBox cbxStore;
private System.Windows.Forms.DataGridViewTextBoxColumn submited序号;
private System.Windows.Forms.DataGridViewTextBoxColumn submited条码;
private System.Windows.Forms.DataGridViewTextBoxColumn submited产品;


+ 436
- 73
SegmentationInStore/SegmentationInStoreForm.cs View File

@ -1,37 +1,205 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading;
using System.Windows.Forms;
using BO;
using BO.BarCodeScan;
using BO.Utils;
using Forks.EnterpriseServices.DomainObjects2;
using Forks.EnterpriseServices.DomainObjects2.DQuery;
using Forks.JsonRpc.Client;
using Newtonsoft.Json;
using SegmentationInStore.Rpc;
using SegmentationInStore.Rpc.Dto;
namespace SegmentationInStore
{
public partial class SegmentationInStoreForm : Form,IAfterLogin
public partial class SegmentationInStoreForm : Form, IAfterLogin
{
private static readonly Object lockOjbUnScan = new object();
private static readonly Object lockOjbUnSubmit = new object();
private static readonly Object lockOjbSubmited = new object();
private readonly string mDropDownSetsFileName = "SegmentationInStore_DropDownSets.xml";
private DropDownSets mDropDownSets;
private BindingList<SegmentationWeightRecord> mUnScanList;
private BindingList<SegmentationInStoreDto> mUnSubmitList;
private BindingList<SegmentationInStoreDto> mSubmitedList;
private static readonly object lockOjbUnScan = new object();
private static readonly object lockOjbSubmited = new object();
private BindingList<SegmentationWeightRecordDto> mUnScanList;
private BindingList<SegmentationInStoreRecord> mRecordList;
BardCodeHooK BarCode = new BardCodeHooK();
private readonly Thread _tdSyncLocalToMiddleDb;
private readonly Thread _tcCheckNetStatus;
private readonly Thread _tcCheckSyncStatus;
// BardCodeHooK BarCode = new BardCodeHooK();
public SegmentationInStoreForm()
{
InitializeComponent();
gridUnScan.AutoGenerateColumns = false;
gridUnSubmit.AutoGenerateColumns = false;
gridSubmited.AutoGenerateColumns = false;
mUnScanList=new BindingList<SegmentationWeightRecord>();
mUnSubmitList = new BindingList<SegmentationInStoreDto>();
mSubmitedList = new BindingList<SegmentationInStoreDto>();
BarCode.BarCodeEvent += new BardCodeHooK.BardCodeDeletegate(BarCode_BarCodeEvent);
mUnScanList = new BindingList<SegmentationWeightRecordDto>();
mRecordList = new BindingList<SegmentationInStoreRecord>();
// Control.CheckForIllegalCrossThreadCalls = false;
// cbxStore.CheckForIllegalCrossThreadCalls = false
// BarCode.BarCodeEvent += new BardCodeHooK.BardCodeDeletegate(BarCode_BarCodeEvent);
InitCombox();
this.FormClosing += delegate
{
if (_tdSyncLocalToMiddleDb != null && _tdSyncLocalToMiddleDb.IsAlive)
{
_tdSyncLocalToMiddleDb.Abort();
}
if (_tcCheckNetStatus != null && _tcCheckNetStatus.IsAlive)
{
_tcCheckNetStatus.Abort();
}
if (_tcCheckSyncStatus != null && _tcCheckSyncStatus.IsAlive)
{
_tcCheckSyncStatus.Abort();
}
};
_tdSyncLocalToMiddleDb = new Thread(SyncLocalToMiddleDb);
_tdSyncLocalToMiddleDb.Start();
_tcCheckNetStatus = new Thread(CheckNetStatus);
_tcCheckNetStatus.Start();
_tcCheckSyncStatus = new Thread(CheckSyncStatus);
_tcCheckSyncStatus.Start();
}
private void CheckSyncStatus()
{
while (true)
{
var syncSuccessed = SegmentationInStoreRpc.GetInstance().IsSyncSucessed();
var png = "stop.png";
if (syncSuccessed)
png = "working.png";
var imgPath = Path.Combine(Application.StartupPath, "BWP.WinFormControl.dll");
var s = Assembly.LoadFile(imgPath).GetManifestResourceStream("BWP.WinFormControl.Images." + png);
if (this.InvokeRequired)
{
this.BeginInvoke(new Action(() =>
{
picSyncStatus.Image = Image.FromStream(s);
picSyncStatus.Refresh();
}));
}
else
{
picSyncStatus.Image = Image.FromStream(s);
picSyncStatus.Refresh();
}
Thread.Sleep(1000);
}
}
private bool laseConnection = false;
private void CheckNetStatus()
{
while (true)
{
try
{
var newConnection = LoginRpcUtil.TestConnection(500);
if (newConnection && laseConnection)
{
Thread.Sleep(1000);
continue;
}
var png = "stop.png";
if (newConnection)
png = "working.png";
var imgPath = Path.Combine(Application.StartupPath, "BWP.WinFormControl.dll");
var s = Assembly.LoadFile(imgPath).GetManifestResourceStream("BWP.WinFormControl.Images." + png);
if (this.InvokeRequired)
{
this.BeginInvoke(new Action(() =>
{
picNetStatus.Image = Image.FromStream(s);
picNetStatus.Refresh();
}));
}
else
{
picNetStatus.Image = Image.FromStream(s);
picNetStatus.Refresh();
}
laseConnection = newConnection;
}
catch (Exception e)
{
//LogUtil.Error(e.ToString());
}
Thread.Sleep(1000);
}
}
private void SyncLocalToMiddleDb()
{
while (true)
{
if (laseConnection)
{
this.BeginInvoke(new Action(() =>
{
SegmentationInStoreRpc.GetInstance().SyncToServer();
}));
}
Thread.Sleep(1000);
}
}
private void InitCombox()
{
if (LoginRpcUtil.TestConnection(500))
{
mDropDownSets = GetmDropDownSets();
XmlUtil.SerializerObjToFile(mDropDownSets, mDropDownSetsFileName);
}
else
{
mDropDownSets = XmlUtil.DeserializeFromFile<DropDownSets>(mDropDownSetsFileName);
}
var store = mDropDownSets.Details.FirstOrDefault(x => x.Name == DropDownSets.);
if (store != null)
{
cbxStore.DataSource = store.Details;
cbxStore.DisplayMember = "Name";
cbxStore.ValueMember = "ID";
}
}
private DropDownSets GetmDropDownSets()
{
var sets = new DropDownSets();
var storeSet = GetStoreSet();
sets.Details.Add(storeSet);
return sets;
}
private DropDownSet GetStoreSet()
{
var json = RpcFacade.Call<string>("/MainSystem/B3ClientService/Rpcs/BaseInfoRpc/GetStoreList");
var set = new DropDownSet();
set.Name = DropDownSets.;
foreach (var detail in JsonConvert.DeserializeObject<List<DropDownSet_Detail>>(json))
{
set.Details.Add(detail);
}
return set;
}
void BarCode_BarCodeEvent(BardCodeHooK.BarCodes barCode)
@ -52,26 +220,26 @@ namespace SegmentationInStore
{
if (!string.IsNullOrWhiteSpace(barCode.BarCode))
{
doInsertUnSubmit(barCode.BarCode);
// doInsertUnSubmit(barCode.BarCode);
}
}
}
}
private void doInsertUnSubmit(string barCode)
{
var fd = mUnScanList.FirstOrDefault(x => x.BarCode == barCode);
if (fd == null)
{
//todo 放到错误信息里
}
mUnScanList.Remove(fd);
var inStoreDto = fd.EToSegmentationInStore();
inStoreDto.Store_ID = 0;
inStoreDto.Store_Name = "仓库";
mUnSubmitList.Insert(0, inStoreDto);
BindUnSubmitGrid();
}
// private void doInsertUnSubmit(string barCode)
// {
// var fd = mUnScanList.FirstOrDefault(x => x.BarCode == barCode);
// if (fd == null)
// {
// //todo 放到错误信息里
// }
// mUnScanList.Remove(fd);
// var inStoreDto = fd.EToSegmentationInStore();
// inStoreDto.Store_ID = 0;
// inStoreDto.Store_Name = "仓库";
// mUnSubmitList.Insert(0, inStoreDto);
// BindUnSubmitGrid();
// }
void BindUnScanGrid()
{
@ -80,18 +248,12 @@ namespace SegmentationInStore
gridUnScan.DataSource = mUnScanList;
}
}
void BindUnSubmitGrid()
{
lock (lockOjbUnSubmit)
{
gridUnSubmit.DataSource = mUnSubmitList;
}
}
void BindSubmitedGrid()
{
lock (lockOjbSubmited)
{
gridSubmited.DataSource = mSubmitedList;
gridSubmited.DataSource = mRecordList;
}
}
@ -99,70 +261,271 @@ namespace SegmentationInStore
private void SegmentationInStoreForm_Load(object sender, EventArgs e)
{
var enable=BarCode.Start();
if (!enable)
{
MessageBox.Show("注册扫码失败,联系管理员");
}
// var enable=BarCode.Start();
// if (!enable)
// {
// MessageBox.Show("注册扫码失败,联系管理员");
// }
// txtBarCode.Focus();
cbxStore.SelectedIndex = 0;
}
public string RoleName { get { return "分割入库"; } }
public Form Generate()
{
return this;
}
private void SegmentationInStoreForm_FormClosed(object sender, FormClosedEventArgs e)
{
// BarCode.Stop();
}
//同步未扫码
private void timerSyncUnScan_Tick(object sender, EventArgs e)
BwpBarCodes barCodes = new BwpBarCodes();
private bool isFirstScanKey = true;//第一次扫码不判断50毫秒
private void SegmentationInStoreForm_KeyDown(object sender, KeyEventArgs e)
{
if (mUnScanList.Count < 1)
gridSubmited.Focus();
if (e.KeyData == (Keys.ShiftKey | Keys.Shift))
{
var list = SegmentationInStoreRpc.GetNotInStoreList();
foreach (SegmentationWeightRecord record in list)
return;
}
TimeSpan ts = DateTime.Now.Subtract(barCodes.Time);
var str = BwpBarCodeUtil.GetStringByKeyKeyEventArgs(e);
if (isFirstScanKey || ts.TotalMilliseconds < 50)
{
isFirstScanKey = false;
barCodes.StringBuilder.Append(str);
if (e.KeyData == Keys.Enter && barCodes.BarCode.Length > 0)
{
mUnScanList.Insert(0,record);
//回车
barCodes.IsValid = true;
barCodes.StringBuilder.Remove(barCodes.StringBuilder.Length - 1, 1);
}
}
else
try
{
var maxid = mUnScanList.Max(x => x.ID);
var list = SegmentationInStoreRpc.GetNotInStoreListByMaxId(maxid);
foreach (SegmentationWeightRecord record in list)
if (barCodes.IsValid)
{
mUnScanList.Insert(0,record);
isFirstScanKey = true;
txtBarCode.Text = barCodes.BarCode;
try
{
DoEventByBarCode(barCodes.BarCode);
}
catch (Exception exception)
{
MessageBox.Show(exception.ToString());
LogUtil.Error(exception);
}
finally
{
barCodes.StringBuilder = new StringBuilder();
}
}
}
BindUnScanGrid();
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}
finally
{
barCodes.IsValid = false; //最后一定要 设置barCode无效
barCodes.Time = DateTime.Now;
}
}
//扫到的 未提交的提交
private void timerUpload_Tick(object sender, EventArgs e)
void DoEventByBarCode(string barCodesBarCode)
{
var unSubmitList = mUnSubmitList.ToList();
for (int i = unSubmitList.Count-1; i >=0 ; i--)
//如果是扫码汇总码
if (barCodesBarCode.ToLower().Contains("end"))
{
try
if (!LoginRpcUtil.TestConnection(1000))
{
var dto = unSubmitList[i];
dto.CreateTime = DateTime.Now;
dto.ID=SegmentationInStoreRpc.Insert(dto);
mSubmitedList.Insert(0,dto);
mUnSubmitList.Remove(dto);
MessageBox.Show("扫汇总码必须在线");
//todo 记录异常
return;
}
catch (Exception ex)
//添加多条记录
var listStr = RpcFacade.Call<string>("/MainSystem/B3ClientService/Rpcs/BillRpc/SegmentationInStoreRecordRpc/GetWeightRecordList", barCodesBarCode.ToLower());// 转换小写 跟打印要一直
var list = JsonConvert.DeserializeObject<List<SegmentationInStoreRecord>>(listStr);
if (list.Count < 1)
{
MessageBox.Show("没有查询到该汇总码");
return;
//todo 记录异常
}
foreach (SegmentationInStoreRecord dmo in list)
{
var recrod = doInsertAndBack(dmo);
if (recrod.ID > 0)
{
mRecordList.Insert(0, recrod);
}
}
RefreshRecordUi();
}
else
{
var barCode = barCodesBarCode.Replace(ButcherAppContext.Context.UrlConfig.OutAddress + "?", "");
barCode = barCodesBarCode.Replace(ButcherAppContext.Context.UrlConfig.OutAddress.ToUpper() + "?", "");
var code = UrlUtil.GetValueByKey("code", barCode);
if (string.IsNullOrWhiteSpace(code))
{
code = UrlUtil.GetValueByKey("CODE", barCode);
}
if (string.IsNullOrWhiteSpace(code))
{
code = barCodesBarCode;
}
var goodsId = UrlUtil.GetValueByKey("gid", barCode);
if (string.IsNullOrWhiteSpace(goodsId))
{
goodsId = UrlUtil.GetValueByKey("GID", barCode);
}
if (string.IsNullOrWhiteSpace(code))
{
MessageBox.Show("条码错误"+ barCodesBarCode);
//todo
return;
}
var bg = new BackgroundWorker();
var record = new SegmentationInStoreRecord();
bg.DoWork += delegate
{
record = doInsertAndBack(code, goodsId);
};
bg.RunWorkerCompleted += delegate
{
if (record.ID > 0)
{
mRecordList.Insert(0, record);
RefreshRecordUi();
}
};
bg.RunWorkerAsync();
}
//把成功的从未提交记录中移除
BindUnSubmitGrid();
BindSubmitedGrid();
}
public string RoleName { get { return "分割入库"; } }
public Form Generate()
private void RefreshRecordUi()
{
return this;
if (mRecordList.Count < 1)
{
return;
}
gridSubmited.DataSource = mRecordList;
}
private void SegmentationInStoreForm_FormClosed(object sender, FormClosedEventArgs e)
bool IsExist(string barcode)
{
//#if DEBUG
// return false;
//#endif
using (var session = LocalDmoSession.New())
{
var query = new DQueryDom(new JoinAlias(typeof(SegmentationInStoreRecord)));
query.Columns.Add(DQSelectColumn.Field("ID"));
query.Where.Conditions.Add(DQCondition.EQ("BarCode", barcode));
var res = session.ExecuteScalar(query);
return res != null;
}
}
void SetStoreInfo(SegmentationInStoreRecord record)
{
BarCode.Stop();
this.Invoke(new Action(() =>
{
var storeid = Convert.ToInt64(cbxStore.SelectedValue);
var storename = cbxStore.Text;
if (!string.IsNullOrWhiteSpace(storename))
{
record.Store_ID = storeid;
record.Store_Name = storename;
}
}));
}
private static readonly object _insertObj = new object();
SegmentationInStoreRecord doInsertAndBack(string code, string goodsId)
{
lock (_insertObj)
{
var record = new SegmentationInStoreRecord();
var isExist = IsExist(code);
if (isExist)
{
//todo 重复扫码
return record;
}
else
{
//添加记录
record.BarCode = code;
SetStoreInfo(record);
if (LoginRpcUtil.TestConnection(1000))
{
var weightStr = RpcFacade.Call<string>("/MainSystem/B3ClientService/Rpcs/BillRpc/SegmentationInStoreRecordRpc/GetWeightRecord", code);
var weight = JsonConvert.DeserializeObject<SegmentationWeightRecordDto>(weightStr);
record.Goods_ID = weight.Goods_ID;
record.Goods_Name = weight.Goods_Name;
record.Goods_Spec = weight.Goods_Spec;
record.Weight = weight.Weight;
record.ProductBatch = weight.ProductBatch;
record.BiaoShi = weight.BiaoShi;
record.CardBarCode = weight.CardBarCode;
}
else
{
record.Goods_ID = long.Parse(goodsId);
}
var id = LocalDmoSession.Insert(record);
return record;
}
}
}
SegmentationInStoreRecord doInsertAndBack(SegmentationInStoreRecord dmo)
{
lock (_insertObj)
{
var record = new SegmentationInStoreRecord();
var isExist = IsExist(dmo.BarCode);
if (isExist)
{
//todo 重复扫码
return record;
}
else
{
//添加记录
record.BarCode = dmo.BarCode;
SetStoreInfo(record);
record.Goods_ID = dmo.Goods_ID;
record.Goods_Name = dmo.Goods_Name;
record.Goods_Spec = dmo.Goods_Spec;
record.Weight = dmo.Weight;
record.ProductBatch = dmo.ProductBatch;
record.BiaoShi = dmo.BiaoShi;
record.CardBarCode = dmo.CardBarCode;
var id = LocalDmoSession.Insert(record);
return record;
}
}
}
}
}

+ 19
- 19
SegmentationInStore/SegmentationInStoreForm.resx View File

@ -117,55 +117,55 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="unsubmit条码.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="submited序号.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="unsubmit产品.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="submited条码.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="unsubmit重量.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="submited产品.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="unsubmit仓库.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="submited重量.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="unscan序号.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="submited仓库.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="unscan条码.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="submited日期.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="unscan产品.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="dataGridViewTextBoxColumn1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="unscan重量.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="dataGridViewTextBoxColumn2.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="unscan日期.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="dataGridViewTextBoxColumn3.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="submited序号.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="dataGridViewTextBoxColumn4.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="submited条码.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="dataGridViewTextBoxColumn5.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="submited产品.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="unscan序号.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="submited重量.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="unscan条码.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="submited仓库.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="unscan产品.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="submited日期.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="unscan重量.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="timerSyncUnScan.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
<metadata name="unscan日期.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="timerUpload.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>159, 18</value>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>29</value>
</metadata>
</root>

+ 0
- 1
SegmentationWeight/SegmentationWeight.csproj View File

@ -61,7 +61,6 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="DropDownSets.cs" />
<Compile Include="ProductTask.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Rpc\Dto\SegmentationWeightRecord.cs" />


+ 269
- 194
SegmentationWeight/SegmentationWeightForm.Designer.cs View File

@ -28,11 +28,18 @@
/// </summary>
private void InitializeComponent()
{
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.panel1 = new System.Windows.Forms.Panel();
this.btnEnableWeight = new System.Windows.Forms.Button();
this.btnEnd = new System.Windows.Forms.Button();
this.btnStart = new System.Windows.Forms.Button();
this.picSyncStatus = new System.Windows.Forms.PictureBox();
this.picNetStatus = new System.Windows.Forms.PictureBox();
this.label11 = new System.Windows.Forms.Label();
this.label10 = new System.Windows.Forms.Label();
this.panel3 = new System.Windows.Forms.Panel();
this.cbxBatch = new System.Windows.Forms.ComboBox();
this.cbxWorkUnit = new System.Windows.Forms.ComboBox();
@ -40,7 +47,6 @@
this.label5 = new System.Windows.Forms.Label();
this.cbxWorkShop = new System.Windows.Forms.ComboBox();
this.label4 = new System.Windows.Forms.Label();
this.enableWeight = new System.Windows.Forms.CheckBox();
this.panel2 = new System.Windows.Forms.Panel();
this.lblChengZhong = new System.Windows.Forms.Label();
this.btnWeightSet = new System.Windows.Forms.Button();
@ -54,28 +60,28 @@
this. = new System.Windows.Forms.DataGridViewTextBoxColumn();
this. = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.label2 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.lblGoodsName = new System.Windows.Forms.Label();
this.label8 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label7 = new System.Windows.Forms.Label();
this.label9 = new System.Windows.Forms.Label();
this.lblPlanWeight = new System.Windows.Forms.Label();
this.lblNumber = new System.Windows.Forms.Label();
this.lblWeight = new System.Windows.Forms.Label();
this.label7 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.label8 = new System.Windows.Forms.Label();
this.lblPlanNumber = new System.Windows.Forms.Label();
this.lblPlanWeight = new System.Windows.Forms.Label();
this.label9 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.lblLeftWeight = new System.Windows.Forms.Label();
this.lblLeftNumber = new System.Windows.Forms.Label();
this.label10 = new System.Windows.Forms.Label();
this.label11 = new System.Windows.Forms.Label();
this.picNetStatus = new System.Windows.Forms.PictureBox();
this.picSyncStatus = new System.Windows.Forms.PictureBox();
this.lblGoodsSpec = new System.Windows.Forms.Label();
this.btnEnablePrint = new System.Windows.Forms.Button();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.picSyncStatus)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.picNetStatus)).BeginInit();
this.panel3.SuspendLayout();
this.panel2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit();
@ -84,8 +90,6 @@
this.splitContainer2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.uDataGridView1)).BeginInit();
this.tableLayoutPanel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.picNetStatus)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.picSyncStatus)).BeginInit();
this.SuspendLayout();
//
// splitContainer1
@ -104,64 +108,144 @@
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.Controls.Add(this.splitContainer2);
this.splitContainer1.Size = new System.Drawing.Size(1041, 587);
this.splitContainer1.SplitterDistance = 110;
this.splitContainer1.Size = new System.Drawing.Size(1117, 587);
this.splitContainer1.SplitterDistance = 125;
this.splitContainer1.SplitterWidth = 1;
this.splitContainer1.TabIndex = 0;
//
// panel1
//
this.panel1.Controls.Add(this.btnEnablePrint);
this.panel1.Controls.Add(this.btnEnableWeight);
this.panel1.Controls.Add(this.btnEnd);
this.panel1.Controls.Add(this.btnStart);
this.panel1.Controls.Add(this.picSyncStatus);
this.panel1.Controls.Add(this.picNetStatus);
this.panel1.Controls.Add(this.label11);
this.panel1.Controls.Add(this.label10);
this.panel1.Controls.Add(this.panel3);
this.panel1.Controls.Add(this.enableWeight);
this.panel1.Controls.Add(this.panel2);
this.panel1.Controls.Add(this.btnWeightSet);
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(1039, 108);
this.panel1.Size = new System.Drawing.Size(1115, 123);
this.panel1.TabIndex = 2;
//
// btnEnableWeight
//
this.btnEnableWeight.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnEnableWeight.Location = new System.Drawing.Point(247, 16);
this.btnEnableWeight.Name = "btnEnableWeight";
this.btnEnableWeight.Size = new System.Drawing.Size(111, 34);
this.btnEnableWeight.TabIndex = 41;
this.btnEnableWeight.Text = "启用称重";
this.btnEnableWeight.UseVisualStyleBackColor = true;
this.btnEnableWeight.Click += new System.EventHandler(this.btnEnableWeight_Click);
//
// btnEnd
//
this.btnEnd.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnEnd.Enabled = false;
this.btnEnd.Font = new System.Drawing.Font("宋体", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnEnd.Location = new System.Drawing.Point(689, 28);
this.btnEnd.Name = "btnEnd";
this.btnEnd.Size = new System.Drawing.Size(75, 60);
this.btnEnd.TabIndex = 40;
this.btnEnd.Text = "结束";
this.btnEnd.UseVisualStyleBackColor = true;
this.btnEnd.Click += new System.EventHandler(this.btnEnd_Click);
//
// btnStart
//
this.btnStart.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnStart.Font = new System.Drawing.Font("宋体", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnStart.Location = new System.Drawing.Point(585, 28);
this.btnStart.Name = "btnStart";
this.btnStart.Size = new System.Drawing.Size(75, 60);
this.btnStart.TabIndex = 40;
this.btnStart.Text = "开始";
this.btnStart.UseVisualStyleBackColor = true;
this.btnStart.Click += new System.EventHandler(this.btnStart_Click);
//
// picSyncStatus
//
this.picSyncStatus.ErrorImage = null;
this.picSyncStatus.InitialImage = null;
this.picSyncStatus.Location = new System.Drawing.Point(415, 65);
this.picSyncStatus.Name = "picSyncStatus";
this.picSyncStatus.Size = new System.Drawing.Size(30, 30);
this.picSyncStatus.TabIndex = 39;
this.picSyncStatus.TabStop = false;
//
// picNetStatus
//
this.picNetStatus.ErrorImage = null;
this.picNetStatus.InitialImage = null;
this.picNetStatus.Location = new System.Drawing.Point(415, 20);
this.picNetStatus.Name = "picNetStatus";
this.picNetStatus.Size = new System.Drawing.Size(30, 30);
this.picNetStatus.TabIndex = 39;
this.picNetStatus.TabStop = false;
//
// label11
//
this.label11.AutoSize = true;
this.label11.Location = new System.Drawing.Point(380, 76);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(29, 12);
this.label11.TabIndex = 35;
this.label11.Text = "同步";
//
// label10
//
this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(380, 28);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(29, 12);
this.label10.TabIndex = 35;
this.label10.Text = "网络";
//
// panel3
//
this.panel3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.panel3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panel3.Controls.Add(this.cbxBatch);
this.panel3.Controls.Add(this.cbxWorkUnit);
this.panel3.Controls.Add(this.label6);
this.panel3.Controls.Add(this.label5);
this.panel3.Controls.Add(this.cbxWorkShop);
this.panel3.Controls.Add(this.label4);
this.panel3.Location = new System.Drawing.Point(805, 4);
this.panel3.Location = new System.Drawing.Point(797, 5);
this.panel3.Name = "panel3";
this.panel3.Size = new System.Drawing.Size(231, 100);
this.panel3.Size = new System.Drawing.Size(191, 114);
this.panel3.TabIndex = 34;
//
// cbxBatch
//
this.cbxBatch.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cbxBatch.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.cbxBatch.FormattingEnabled = true;
this.cbxBatch.Location = new System.Drawing.Point(78, 73);
this.cbxBatch.Location = new System.Drawing.Point(56, 85);
this.cbxBatch.Name = "cbxBatch";
this.cbxBatch.Size = new System.Drawing.Size(121, 20);
this.cbxBatch.Size = new System.Drawing.Size(121, 24);
this.cbxBatch.TabIndex = 39;
this.cbxBatch.SelectedIndexChanged += new System.EventHandler(this.cbxBatch_SelectedIndexChanged);
//
// cbxWorkUnit
//
this.cbxWorkUnit.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cbxWorkUnit.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.cbxWorkUnit.FormattingEnabled = true;
this.cbxWorkUnit.Location = new System.Drawing.Point(78, 40);
this.cbxWorkUnit.Location = new System.Drawing.Point(57, 48);
this.cbxWorkUnit.Name = "cbxWorkUnit";
this.cbxWorkUnit.Size = new System.Drawing.Size(121, 20);
this.cbxWorkUnit.Size = new System.Drawing.Size(121, 24);
this.cbxWorkUnit.TabIndex = 40;
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(31, 77);
this.label6.Location = new System.Drawing.Point(9, 91);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(41, 12);
this.label6.TabIndex = 36;
@ -170,7 +254,7 @@
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(31, 43);
this.label5.Location = new System.Drawing.Point(9, 55);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(41, 12);
this.label5.TabIndex = 37;
@ -179,41 +263,29 @@
// cbxWorkShop
//
this.cbxWorkShop.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cbxWorkShop.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.cbxWorkShop.FormattingEnabled = true;
this.cbxWorkShop.Location = new System.Drawing.Point(79, 7);
this.cbxWorkShop.Location = new System.Drawing.Point(57, 7);
this.cbxWorkShop.Name = "cbxWorkShop";
this.cbxWorkShop.Size = new System.Drawing.Size(121, 20);
this.cbxWorkShop.Size = new System.Drawing.Size(121, 24);
this.cbxWorkShop.TabIndex = 41;
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(31, 11);
this.label4.Location = new System.Drawing.Point(9, 11);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(41, 12);
this.label4.TabIndex = 38;
this.label4.Text = "车间:";
//
// enableWeight
//
this.enableWeight.AutoCheck = false;
this.enableWeight.AutoSize = true;
this.enableWeight.Font = new System.Drawing.Font("宋体", 18F);
this.enableWeight.Location = new System.Drawing.Point(249, 8);
this.enableWeight.Name = "enableWeight";
this.enableWeight.Size = new System.Drawing.Size(125, 28);
this.enableWeight.TabIndex = 33;
this.enableWeight.Text = "启用称重";
this.enableWeight.UseVisualStyleBackColor = true;
this.enableWeight.Click += new System.EventHandler(this.enableWeight_Click);
//
// panel2
//
this.panel2.BackColor = System.Drawing.Color.Black;
this.panel2.Controls.Add(this.lblChengZhong);
this.panel2.Location = new System.Drawing.Point(3, 8);
this.panel2.Location = new System.Drawing.Point(4, 19);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(237, 78);
this.panel2.Size = new System.Drawing.Size(224, 78);
this.panel2.TabIndex = 32;
//
// lblChengZhong
@ -229,8 +301,8 @@
//
// btnWeightSet
//
this.btnWeightSet.Font = new System.Drawing.Font("宋体", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnWeightSet.Location = new System.Drawing.Point(249, 53);
this.btnWeightSet.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnWeightSet.Location = new System.Drawing.Point(247, 62);
this.btnWeightSet.Name = "btnWeightSet";
this.btnWeightSet.Size = new System.Drawing.Size(111, 33);
this.btnWeightSet.TabIndex = 0;
@ -255,8 +327,8 @@
//
this.splitContainer2.Panel2.Controls.Add(this.uDataGridView1);
this.splitContainer2.Panel2.Controls.Add(this.tableLayoutPanel1);
this.splitContainer2.Size = new System.Drawing.Size(1041, 476);
this.splitContainer2.SplitterDistance = 517;
this.splitContainer2.Size = new System.Drawing.Size(1117, 461);
this.splitContainer2.SplitterDistance = 729;
this.splitContainer2.SplitterWidth = 1;
this.splitContainer2.TabIndex = 0;
//
@ -264,7 +336,7 @@
//
this.btnGoodsSet.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnGoodsSet.Font = new System.Drawing.Font("宋体", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnGoodsSet.Location = new System.Drawing.Point(416, 16);
this.btnGoodsSet.Location = new System.Drawing.Point(628, 16);
this.btnGoodsSet.Name = "btnGoodsSet";
this.btnGoodsSet.Size = new System.Drawing.Size(95, 50);
this.btnGoodsSet.TabIndex = 34;
@ -280,7 +352,7 @@
this.flpGoods.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.flpGoods.Location = new System.Drawing.Point(4, 87);
this.flpGoods.Name = "flpGoods";
this.flpGoods.Size = new System.Drawing.Size(507, 384);
this.flpGoods.Size = new System.Drawing.Size(719, 369);
this.flpGoods.TabIndex = 1;
//
// flpClass
@ -290,7 +362,7 @@
this.flpClass.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.flpClass.Location = new System.Drawing.Point(4, 4);
this.flpClass.Name = "flpClass";
this.flpClass.Size = new System.Drawing.Size(392, 76);
this.flpClass.Size = new System.Drawing.Size(604, 76);
this.flpClass.TabIndex = 0;
//
// uDataGridView1
@ -299,20 +371,20 @@
this.uDataGridView1.AllowUserToDeleteRows = false;
this.uDataGridView1.AllowUserToResizeColumns = false;
this.uDataGridView1.AllowUserToResizeRows = false;
dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.uDataGridView1.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
dataGridViewCellStyle4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.uDataGridView1.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle4;
this.uDataGridView1.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.uDataGridView1.BackgroundColor = System.Drawing.Color.White;
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle2.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.uDataGridView1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle5.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle5.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle5.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle5.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle5.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.uDataGridView1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle5;
this.uDataGridView1.ColumnHeadersHeight = 40;
this.uDataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
this.uDataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
@ -325,12 +397,12 @@
this.uDataGridView1.Name = "uDataGridView1";
this.uDataGridView1.ReadOnly = true;
this.uDataGridView1.RowHeadersVisible = false;
dataGridViewCellStyle3.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
this.uDataGridView1.RowsDefaultCellStyle = dataGridViewCellStyle3;
dataGridViewCellStyle6.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle6.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
this.uDataGridView1.RowsDefaultCellStyle = dataGridViewCellStyle6;
this.uDataGridView1.RowTemplate.Height = 23;
this.uDataGridView1.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.uDataGridView1.Size = new System.Drawing.Size(518, 363);
this.uDataGridView1.Size = new System.Drawing.Size(391, 348);
this.uDataGridView1.TabIndex = 1;
//
// 序号
@ -373,11 +445,11 @@
| System.Windows.Forms.AnchorStyles.Right)));
this.tableLayoutPanel1.CellBorderStyle = System.Windows.Forms.TableLayoutPanelCellBorderStyle.Single;
this.tableLayoutPanel1.ColumnCount = 5;
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 75.76792F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 24.23208F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 82F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 67F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 71F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 58.22785F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 41.77215F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 68F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 58F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 81F));
this.tableLayoutPanel1.Controls.Add(this.lblGoodsName, 0, 1);
this.tableLayoutPanel1.Controls.Add(this.label8, 0, 0);
this.tableLayoutPanel1.Controls.Add(this.label3, 1, 1);
@ -391,150 +463,163 @@
this.tableLayoutPanel1.Controls.Add(this.label1, 2, 0);
this.tableLayoutPanel1.Controls.Add(this.lblLeftWeight, 4, 1);
this.tableLayoutPanel1.Controls.Add(this.lblLeftNumber, 4, 2);
this.tableLayoutPanel1.Controls.Add(this.lblGoodsSpec, 0, 2);
this.tableLayoutPanel1.Location = new System.Drawing.Point(3, 4);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RowCount = 3;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33.33333F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33.33333F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33.33333F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(518, 98);
this.tableLayoutPanel1.Size = new System.Drawing.Size(392, 98);
this.tableLayoutPanel1.TabIndex = 0;
//
// label2
// lblGoodsName
//
this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
this.lblGoodsName.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.label2.Location = new System.Drawing.Point(226, 65);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(64, 32);
this.label2.TabIndex = 0;
this.label2.Text = "数量";
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.lblGoodsName.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblGoodsName.Location = new System.Drawing.Point(4, 33);
this.lblGoodsName.Name = "lblGoodsName";
this.lblGoodsName.Size = new System.Drawing.Size(98, 31);
this.lblGoodsName.TabIndex = 0;
this.lblGoodsName.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// label8
//
this.label8.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.label8.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label8.Location = new System.Drawing.Point(4, 1);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(98, 31);
this.label8.TabIndex = 0;
this.label8.Text = "产品";
this.label8.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// label3
//
this.label3.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.label3.Location = new System.Drawing.Point(226, 33);
this.label3.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label3.Location = new System.Drawing.Point(109, 33);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(64, 31);
this.label3.Size = new System.Drawing.Size(68, 31);
this.label3.TabIndex = 0;
this.label3.Text = "重量";
this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// lblGoodsName
// label2
//
this.lblGoodsName.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
this.label2.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.lblGoodsName.Location = new System.Drawing.Point(4, 33);
this.lblGoodsName.Name = "lblGoodsName";
this.lblGoodsName.Size = new System.Drawing.Size(215, 31);
this.lblGoodsName.TabIndex = 0;
this.lblGoodsName.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.label2.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label2.Location = new System.Drawing.Point(109, 65);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(68, 32);
this.label2.TabIndex = 0;
this.label2.Text = "数量";
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// lblNumber
// label7
//
this.lblNumber.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
this.label7.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.lblNumber.Location = new System.Drawing.Point(380, 65);
this.lblNumber.Name = "lblNumber";
this.lblNumber.Size = new System.Drawing.Size(61, 32);
this.lblNumber.TabIndex = 0;
this.lblNumber.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.label7.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label7.Location = new System.Drawing.Point(312, 1);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(76, 31);
this.label7.TabIndex = 0;
this.label7.Text = "剩余";
this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// lblWeight
// label9
//
this.lblWeight.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
this.label9.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.lblWeight.Location = new System.Drawing.Point(380, 33);
this.lblWeight.Name = "lblWeight";
this.lblWeight.Size = new System.Drawing.Size(61, 31);
this.lblWeight.TabIndex = 0;
this.lblWeight.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.label9.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label9.Location = new System.Drawing.Point(253, 1);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(52, 31);
this.label9.TabIndex = 0;
this.label9.Text = "完工";
this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// label7
// lblPlanWeight
//
this.label7.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
this.lblPlanWeight.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.label7.Location = new System.Drawing.Point(448, 1);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(66, 31);
this.label7.TabIndex = 0;
this.label7.Text = "剩余";
this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.lblPlanWeight.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblPlanWeight.Location = new System.Drawing.Point(184, 33);
this.lblPlanWeight.Name = "lblPlanWeight";
this.lblPlanWeight.Size = new System.Drawing.Size(62, 31);
this.lblPlanWeight.TabIndex = 0;
this.lblPlanWeight.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// label1
// lblNumber
//
this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
this.lblNumber.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.label1.Location = new System.Drawing.Point(297, 1);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(76, 31);
this.label1.TabIndex = 0;
this.label1.Text = "订货";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.lblNumber.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblNumber.Location = new System.Drawing.Point(253, 65);
this.lblNumber.Name = "lblNumber";
this.lblNumber.Size = new System.Drawing.Size(52, 32);
this.lblNumber.TabIndex = 0;
this.lblNumber.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// label8
// lblWeight
//
this.label8.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
this.lblWeight.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.label8.Location = new System.Drawing.Point(4, 1);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(215, 31);
this.label8.TabIndex = 0;
this.label8.Text = "产品";
this.label8.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.lblWeight.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblWeight.Location = new System.Drawing.Point(253, 33);
this.lblWeight.Name = "lblWeight";
this.lblWeight.Size = new System.Drawing.Size(52, 31);
this.lblWeight.TabIndex = 0;
this.lblWeight.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// lblPlanNumber
//
this.lblPlanNumber.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.lblPlanNumber.Location = new System.Drawing.Point(297, 65);
this.lblPlanNumber.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblPlanNumber.Location = new System.Drawing.Point(184, 65);
this.lblPlanNumber.Name = "lblPlanNumber";
this.lblPlanNumber.Size = new System.Drawing.Size(76, 32);
this.lblPlanNumber.Size = new System.Drawing.Size(62, 32);
this.lblPlanNumber.TabIndex = 0;
this.lblPlanNumber.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// lblPlanWeight
//
this.lblPlanWeight.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.lblPlanWeight.Location = new System.Drawing.Point(297, 33);
this.lblPlanWeight.Name = "lblPlanWeight";
this.lblPlanWeight.Size = new System.Drawing.Size(76, 31);
this.lblPlanWeight.TabIndex = 0;
this.lblPlanWeight.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// label9
// label1
//
this.label9.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
this.label1.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.label9.Location = new System.Drawing.Point(380, 1);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(61, 31);
this.label9.TabIndex = 0;
this.label9.Text = "完工";
this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.label1.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label1.Location = new System.Drawing.Point(184, 1);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(62, 31);
this.label1.TabIndex = 0;
this.label1.Text = "订货";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// lblLeftWeight
//
this.lblLeftWeight.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.lblLeftWeight.Location = new System.Drawing.Point(448, 33);
this.lblLeftWeight.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblLeftWeight.Location = new System.Drawing.Point(312, 33);
this.lblLeftWeight.Name = "lblLeftWeight";
this.lblLeftWeight.Size = new System.Drawing.Size(66, 31);
this.lblLeftWeight.Size = new System.Drawing.Size(76, 31);
this.lblLeftWeight.TabIndex = 0;
this.lblLeftWeight.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
@ -543,55 +628,41 @@
this.lblLeftNumber.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.lblLeftNumber.Location = new System.Drawing.Point(448, 65);
this.lblLeftNumber.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblLeftNumber.Location = new System.Drawing.Point(312, 65);
this.lblLeftNumber.Name = "lblLeftNumber";
this.lblLeftNumber.Size = new System.Drawing.Size(66, 32);
this.lblLeftNumber.Size = new System.Drawing.Size(76, 32);
this.lblLeftNumber.TabIndex = 0;
this.lblLeftNumber.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// label10
// lblGoodsSpec
//
this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(424, 19);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(29, 12);
this.label10.TabIndex = 35;
this.label10.Text = "网络";
//
// label11
//
this.label11.AutoSize = true;
this.label11.Location = new System.Drawing.Point(424, 67);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(29, 12);
this.label11.TabIndex = 35;
this.label11.Text = "同步";
//
// picNetStatus
//
this.picNetStatus.ErrorImage = null;
this.picNetStatus.InitialImage = null;
this.picNetStatus.Location = new System.Drawing.Point(459, 11);
this.picNetStatus.Name = "picNetStatus";
this.picNetStatus.Size = new System.Drawing.Size(30, 30);
this.picNetStatus.TabIndex = 39;
this.picNetStatus.TabStop = false;
//
// picSyncStatus
//
this.picSyncStatus.ErrorImage = null;
this.picSyncStatus.InitialImage = null;
this.picSyncStatus.Location = new System.Drawing.Point(459, 56);
this.picSyncStatus.Name = "picSyncStatus";
this.picSyncStatus.Size = new System.Drawing.Size(30, 30);
this.picSyncStatus.TabIndex = 39;
this.picSyncStatus.TabStop = false;
this.lblGoodsSpec.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.lblGoodsSpec.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblGoodsSpec.Location = new System.Drawing.Point(4, 65);
this.lblGoodsSpec.Name = "lblGoodsSpec";
this.lblGoodsSpec.Size = new System.Drawing.Size(98, 32);
this.lblGoodsSpec.TabIndex = 0;
this.lblGoodsSpec.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// btnEnablePrint
//
this.btnEnablePrint.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnEnablePrint.Location = new System.Drawing.Point(468, 17);
this.btnEnablePrint.Name = "btnEnablePrint";
this.btnEnablePrint.Size = new System.Drawing.Size(111, 34);
this.btnEnablePrint.TabIndex = 41;
this.btnEnablePrint.Text = "启用打码";
this.btnEnablePrint.UseVisualStyleBackColor = true;
this.btnEnablePrint.Click += new System.EventHandler(this.btnEnablePrint_Click);
//
// SegmentationWeightForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1041, 587);
this.ClientSize = new System.Drawing.Size(1117, 587);
this.Controls.Add(this.splitContainer1);
this.MinimizeBox = false;
this.Name = "SegmentationWeightForm";
@ -605,6 +676,8 @@
this.splitContainer1.ResumeLayout(false);
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.picSyncStatus)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.picNetStatus)).EndInit();
this.panel3.ResumeLayout(false);
this.panel3.PerformLayout();
this.panel2.ResumeLayout(false);
@ -615,8 +688,6 @@
this.splitContainer2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.uDataGridView1)).EndInit();
this.tableLayoutPanel1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.picNetStatus)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.picSyncStatus)).EndInit();
this.ResumeLayout(false);
}
@ -625,7 +696,6 @@
private System.Windows.Forms.SplitContainer splitContainer1;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.CheckBox enableWeight;
private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.Label lblChengZhong;
private System.Windows.Forms.Button btnWeightSet;
@ -663,5 +733,10 @@
private System.Windows.Forms.Label label10;
private System.Windows.Forms.PictureBox picSyncStatus;
private System.Windows.Forms.PictureBox picNetStatus;
private System.Windows.Forms.Button btnEnd;
private System.Windows.Forms.Button btnStart;
private System.Windows.Forms.Label lblGoodsSpec;
private System.Windows.Forms.Button btnEnableWeight;
private System.Windows.Forms.Button btnEnablePrint;
}
}

+ 201
- 60
SegmentationWeight/SegmentationWeightForm.cs View File

@ -25,10 +25,10 @@ namespace SegmentationWeight
{
public partial class SegmentationWeightForm : Form, IAfterLogin
{
private readonly string mDropDownSetsFileName = "DropDownSets.xml";
private readonly string mDropDownSetsFileName = "SegmentationWeight_DropDownSets.xml";
private DropDownSets mDropDownSets;
private List<ProductTask> mProductTasks;
private readonly string mProductTasksFileName = "ProductTasks.xml";
private readonly string mProductTasksFileName = "SegmentationWeight_ProductTasks.xml";
#region weightNeed
SerialPort weightPort;
@ -125,31 +125,39 @@ namespace SegmentationWeight
{
while (true)
{
var newConnection = LoginRpcUtil.TestConnection(500);
if (newConnection && laseConnection)
{
Thread.Sleep(1000);
continue;
}
var png = "stop.png";
if (newConnection)
png = "working.png";
var imgPath = Path.Combine(Application.StartupPath, "BWP.WinFormControl.dll");
var s = Assembly.LoadFile(imgPath).GetManifestResourceStream("BWP.WinFormControl.Images." + png);
if (this.InvokeRequired)
try
{
this.BeginInvoke(new Action(() =>
var newConnection = LoginRpcUtil.TestConnection(500);
if (newConnection && laseConnection)
{
Thread.Sleep(1000);
continue;
}
var png = "stop.png";
if (newConnection)
png = "working.png";
var imgPath = Path.Combine(Application.StartupPath, "BWP.WinFormControl.dll");
var s = Assembly.LoadFile(imgPath).GetManifestResourceStream("BWP.WinFormControl.Images." + png);
if (this.InvokeRequired)
{
this.BeginInvoke(new Action(() =>
{
picNetStatus.Image = Image.FromStream(s);
picNetStatus.Refresh();
}));
}
else
{
picNetStatus.Image = Image.FromStream(s);
picNetStatus.Refresh();
}));
}
laseConnection = newConnection;
}
else
catch (Exception e)
{
picNetStatus.Image = Image.FromStream(s);
picNetStatus.Refresh();
//LogUtil.Error(e.ToString());
}
laseConnection = newConnection;
Thread.Sleep(1000);
}
}
@ -178,7 +186,11 @@ namespace SegmentationWeight
private void InitPlanGoodsNumber()
{
if (laseConnection)
if (cbxBatch.Text == "SegmentationWeight.DropDownSet_Detail")
{
return;
}
if (LoginRpcUtil.TestConnection(1000))
{
var json = RpcFacade.Call<string>("/MainSystem/B3ClientService/Rpcs/BillRpc/ProductTaskRpc/GetListByBatch", cbxBatch.Text);
mProductTasks = JsonConvert.DeserializeObject<List<ProductTask>>(json);
@ -278,7 +290,7 @@ namespace SegmentationWeight
#region weightNeed
void OpenSerialPort()
{
if (enableWeight.Checked)
if (_enableWeight)
return;
if (SegmentationWeightContext.Config.RateSet == null)
throw new Exception("请先配置称相关信息");
@ -296,6 +308,7 @@ namespace SegmentationWeight
_dataFormat = new IND560DataFormat();
break;
case "Xk3124":
case "IND231":
_dataFormat = new Xk3124DataFormat();
break;
case "Xk3190A9":
@ -468,7 +481,7 @@ namespace SegmentationWeight
public void enableWeight_Click(object sender, EventArgs e)
{
if (!enableWeight.Checked)
if (!_enableWeight)
{
OpenSerialPort();
_mainProcessIsRun = true;
@ -478,7 +491,6 @@ namespace SegmentationWeight
{
DisableWeight();
}
enableWeight.CheckState = enableWeight.Checked ? CheckState.Unchecked : CheckState.Checked;
}
#endregion
@ -493,9 +505,13 @@ namespace SegmentationWeight
private void SegmentationWeightForm_Load(object sender, EventArgs e)
{
InitPlanGoodsNumber();
mWeightRecords = new BindingList<SegmentationWeightRecord>();//以后可能取数据库中没做完的,比如做着做着突然断点
RefreshUi();
InitControl();
btnEnd.BackColor = SystemColors.Control;
btnStart.BackColor = Color.Green;
}
private void InitControl()
{
@ -516,6 +532,8 @@ namespace SegmentationWeight
var btn = new Button();
btn.Text = text;
btn.Click += Btn_Click;
btn.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
btn.BackColor = SystemColors.Control;
btn.Width = 100;
btn.Height = 60;
return btn;
@ -547,8 +565,10 @@ namespace SegmentationWeight
var btn = new Button();
btn.Text = set.Goods_Name;
btn.Tag = set;
btn.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
btn.Click += BtnGoods_Click;
btn.Width = 100;
btn.BackColor = SystemColors.Control;
btn.Width = 120;
btn.Height = 60;
return btn;
}
@ -556,33 +576,60 @@ namespace SegmentationWeight
//点击存货
private void BtnGoods_Click(object sender, EventArgs e)
{
if (!_alreadyStart)
{
MessageBox.Show("先点击开始按钮");
return;
}
var btn = sender as Button;
btn.BackColor = Color.Green;
Application.DoEvents();
var set = btn.Tag as SegmentationWeightGoodSet;
if (mWeightRecords.Count > 0)
{
var oldText = mWeightRecords.First().Goods_Name;
if (set.Goods_Name != oldText)
{
MessageBox.Show("跟上次不是同一个存货");
return;
}
}
// if (mWeightRecords.Count > 0)
// {
// var oldText = mWeightRecords.First().Goods_Name;
// if (set.Goods_Name != oldText)
// {
// MessageBox.Show("跟上次不是同一个存货");
// return;
// }
// }
lblGoodsName.Text = set.Goods_Name;
selectGoodsID= set.Goods_ID;
lblGoodsSpec.Text = set.Goods_Spec;
_selectGoodsID = set.Goods_ID;
mIsNeedRefreshPlan = true;//todo 这里可以完善
//添加记录
var record = GetRecordBySet(set);
var id = LocalDmoSession.Insert(record);
record.ID = id;
mWeightRecords.Add(record);
mWeightRecords.Insert(0, record);
// mWeightRecords.Add(record);
RefreshUi();
var entity = CreatePrintEntity(record);
SegmentationWeightPrint.Print(entity);
if (_enablePrint)
{
var entity = CreatePrintEntity(record);
SegmentationWeightPrint.Print(entity);
}
btn.BackColor = SystemColors.Control;
Application.DoEvents();
}
PrintEntity CreatePrintEntity(SegmentationWeightRecord record)
{
var entity = new PrintEntity();
entity.AccountingUnit_Name = "青岛万福集团股份有限公司";
entity.Goods_Name = record.Goods_Name;
entity.Date = DateTime.Today;
entity.Checker = "001";
entity.StoreCondition = "0-4℃ 4日";
entity.Place = "青岛莱西市珠海路5号";
entity.TelNumber = "0532-88488888";
entity.BarCode = record.BarCode;
entity._2DQRCode = string.Format(ButcherAppContext.Context.UrlConfig.OutAddress + "?code={0}&&gid={1}", entity.BarCode, record.Goods_ID);
entity.Weight = record.Weight.ToString();
return entity;
}
void RefreshUi()
{
@ -592,8 +639,8 @@ namespace SegmentationWeight
//lblWeight.Text = mWeightRecords.Sum(x => x.Weight).ToString();
if (mIsNeedRefreshPlan)
{
lblPlanWeight.Text = mProductTasks.Where(x => x.Goods_Name == lblGoodsName.Text).Sum(x => x.Number).ToString();
lblPlanNumber.Text = mProductTasks.Where(x => x.Goods_Name == lblGoodsName.Text).Sum(x => x.SecondNumber).ToString();
lblPlanWeight.Text = mProductTasks.Where(x => x.Goods_Name == lblGoodsName.Text).Sum(x => x.Number).ToString("#0.##");
lblPlanNumber.Text = mProductTasks.Where(x => x.Goods_Name == lblGoodsName.Text).Sum(x => x.SecondNumber).ToString("#0.##");
}
if (mWeightRecords.Count < 1)
{
@ -602,43 +649,50 @@ namespace SegmentationWeight
uDataGridView1.DataSource = mWeightRecords;
}
private long selectGoodsID=0;
private long _selectGoodsID = 0;
private void SyncAlreadyFromMiddleDb()
{
while (true)
{
if (!string.IsNullOrWhiteSpace(lblGoodsName.Text))
{
if (this.IsHandleCreated)
{
this.BeginInvoke(new Action(() =>
{
var res=RpcFacade.Call<string>("/MainSystem/B3ClientService/Rpcs/BillRpc/SegmentationWeightRecordRpc/GetCountByNameAndBatch",
selectGoodsID, cbxBatch.Text);
lblNumber.Text = res.Split(',')[0];
lblWeight.Text = res.Split(',')[1];
try
{
var res = RpcFacade.Call<string>("/MainSystem/B3ClientService/Rpcs/BillRpc/SegmentationWeightRecordRpc/GetCountByNameAndBatch",
_selectGoodsID, cbxBatch.Text);
lblNumber.Text = res.Split(',')[0];
lblWeight.Text = res.Split(',')[1];
lblLeftNumber.Text = (GetDecimal(lblPlanNumber.Text) - GetDecimal(lblNumber.Text)).ToString();
lblLeftWeight.Text = (GetDecimal(lblPlanWeight.Text) - GetDecimal(lblWeight.Text)).ToString();
}
catch (Exception e)
{
LogUtil.Error(e.ToString());
}
}));
}
}
Thread.Sleep(2000);
}
}
PrintEntity CreatePrintEntity(SegmentationWeightRecord record)
decimal GetDecimal(string value)
{
var entity = new PrintEntity();
entity.AccountingUnit_Name = "青岛万福集团股份有限公司";
entity.Goods_Name = record.Goods_Name;
entity.Date = DateTime.Today;
entity.Checker = "001";
entity.StoreCondition = "0-4℃ 4日";
entity.Place = "青岛莱西市珠海路5号";
entity.TelNumber = "0532-88488888";
entity.BarCode = record.BarCode;
entity._2DQRCode = string.Format(ButcherAppContext.Context.UrlConfig.OutAddress + "?code=", entity.BarCode);
entity.Weight = record.Weight.ToString();
return entity;
if (value == "")
{
return 0m;
}
return decimal.Parse(value);
}
private SegmentationWeightRecord GetRecordBySet(SegmentationWeightGoodSet set)
{
var unitValue = cbxWorkUnit.SelectedValue.ToString();
@ -688,6 +742,93 @@ namespace SegmentationWeight
form.ShowDialog();
}
private bool _alreadyStart = false;
private void btnStart_Click(object sender, EventArgs e)
{
_alreadyStart = true;
btnStart.Enabled = false;
btnEnd.Enabled = true;
btnStart.BackColor = SystemColors.Control;
btnEnd.BackColor = Color.ForestGreen;
}
private void btnEnd_Click(object sender, EventArgs e)
{
_alreadyStart = false;
_selectGoodsID = 0;
lblGoodsName.Text = "";
lblPlanWeight.Text = "";
lblPlanNumber.Text = "";
lblLeftNumber.Text = "";
lblLeftWeight.Text = "";
if (mWeightRecords.Count > 0)
{
var endBarcode = GetEndBarCode();
foreach (SegmentationWeightRecord record in mWeightRecords)
{
record.CardBarCode = endBarcode;
LocalDmoSession.Update(record, "CardBarCode");
}
PrintEnd(endBarcode);
//清空记录
mWeightRecords.Clear();
}
btnStart.Enabled = true;
btnEnd.Enabled = false;
btnEnd.BackColor = SystemColors.Control;
btnStart.BackColor = Color.ForestGreen;
}
private void PrintEnd(string barcode)
{
var entity = new PrintEntity();
entity.Weight = mWeightRecords.Sum(x => x.Weight).ToString();
entity.Number = mWeightRecords.Count.ToString();
entity.BarCode = barcode;
entity.AccountingUnit_Name = "青岛万福集团股份有限公司";
SegmentationWeightPrint.PrintEnd(entity);
}
private string GetEndBarCode()
{
var barcode = "fgend" + cbxWorkUnit.SelectedValue + DateTime.Now.ToString("yyyyMMddHHmmss");
return barcode;
}
private bool _enableWeight = false;
private void btnEnableWeight_Click(object sender, EventArgs e)
{
_enableWeight = !_enableWeight;
if (_enableWeight)
{
btnEnableWeight.Text = "停止称重";
btnEnableWeight.BackColor = Color.ForestGreen;
}
else
{
btnEnableWeight.Text = "开始称重";
btnEnableWeight.BackColor = SystemColors.Control;
}
}
private bool _enablePrint = false;
private void btnEnablePrint_Click(object sender, EventArgs e)
{
_enablePrint = !_enablePrint;
if (_enablePrint)
{
btnEnablePrint.Text = "停止打码";
btnEnablePrint.BackColor = Color.ForestGreen;
}
else
{
btnEnablePrint.Text = "开始打码";
btnEnablePrint.BackColor = SystemColors.Control;
}
}
}
}

+ 15
- 0
SegmentationWeight/SegmentationWeightGoodsSetForm.cs View File

@ -53,6 +53,21 @@ namespace SegmentationWeight
mLocaList.Add(set);
}
}
var localist = mLocaList.ToList();
var removeList=new List<SegmentationWeightGoodSet>();
foreach (SegmentationWeightGoodSet segmentationWeightGoodSet in localist)
{
if (fromRpclist.All(x => x.Goods_ID != segmentationWeightGoodSet.Goods_ID))
{
removeList.Add(segmentationWeightGoodSet);
}
}
foreach (SegmentationWeightGoodSet set in removeList)
{
mLocaList.Remove(set);
}
XmlUtil.SerializerObjToFile(mLocaList, SegmentationWeightGoodsSetFileName);
InitControl();


+ 29
- 6
SegmentationWeight/SegmentationWeightPrint.cs View File

@ -9,6 +9,27 @@ namespace SegmentationWeight
{
public class SegmentationWeightPrint
{
public static void PrintEnd(PrintEntity entity)
{
PrintAPI.B_GetUSBBufferLen();
PrintAPI.B_EnumUSB(new byte[128]);
PrintAPI.B_CreateUSBPort(1);
PrintAPI.B_Prn_Text_TrueType(110, 26, 31, "宋体", 1, 700, 0, 0, 0, "C1", entity.AccountingUnit_Name);
PrintAPI.B_Prn_Text_TrueType(42, 120, 27, "宋体", 1, 400, 0, 0, 0, "C4", string.Format("总重量:{0}", entity.Weight));
PrintAPI.B_Prn_Text_TrueType(42, 200, 27, "宋体", 1, 400, 0, 0, 0, "C6", string.Format("总数量:{0}", entity.Number));
PrintAPI.B_Prn_Barcode(42, 320, 0, "1", 3, 22, 35, 'N', entity.BarCode);
PrintAPI.B_Prn_Text_TrueType(173, 360, 25, "宋体", 1, 500, 0, 0, 0, "C9", entity.BarCode);
PrintAPI.B_Bar2d_QR(430, 105, 2, 6, 'M', 'A', 0, 0, 0, entity.BarCode);
PrintAPI.B_Set_Direction('B');
PrintAPI.B_Print_Out(1);
PrintAPI.B_ClosePrn();
}
public static void Print(PrintEntity entity)
{
PrintAPI.B_GetUSBBufferLen();
@ -16,17 +37,17 @@ namespace SegmentationWeight
PrintAPI.B_CreateUSBPort(1);
PrintAPI.B_Prn_Text_TrueType(110, 26, 31, "宋体", 1, 700, 0, 0, 0, "C1", entity.AccountingUnit_Name);
PrintAPI.B_Prn_Text_TrueType(42, 70, 31, "体", 1, 400, 0, 0, 0, "C2", string.Format("产品重量:{0}",entity.Weight));
PrintAPI.B_Prn_Text_TrueType(400, 70, 31, "体", 1, 700, 0, 0, 0, "C3", entity.Goods_Name);
PrintAPI.B_Prn_Text_TrueType(42, 70, 31, "体", 1, 400, 0, 0, 0, "C2", string.Format("产品重量:{0}",entity.Weight));
PrintAPI.B_Prn_Text_TrueType(300, 70, 31, "体", 1, 700, 0, 0, 0, "C3", entity.Goods_Name);
PrintAPI.B_Prn_Text_TrueType(42, 120, 27, "宋体", 1, 400, 0, 0, 0, "C4", string.Format("生产日期:{0}", entity.Date.ToString("yyyy/MM/dd")));
PrintAPI.B_Prn_Text_TrueType(42, 160, 27, "宋体", 1, 400, 0, 0, 0, "C5", string.Format("检 验 员:{0}", entity.Checker));
PrintAPI.B_Prn_Text_TrueType(42, 200, 27, "宋体", 1, 400, 0, 0, 0, "C6", string.Format("保 质 期:{0}", entity.StoreCondition));
PrintAPI.B_Prn_Text_TrueType(42, 120, 23, "宋体", 1, 400, 0, 0, 0, "C4", string.Format("生产日期:{0}", entity.Date.ToString("yyyy/MM/dd")));
PrintAPI.B_Prn_Text_TrueType(42, 160, 23, "宋体", 1, 400, 0, 0, 0, "C5", string.Format("检 验 员:{0}", entity.Checker));
PrintAPI.B_Prn_Text_TrueType(42, 200, 23, "宋体", 1, 400, 0, 0, 0, "C6", string.Format("保 质 期:{0}", entity.StoreCondition));
PrintAPI.B_Prn_Text_TrueType(42, 240, 23, "宋体", 1, 400, 0, 0, 0, "C7", string.Format("电话:{0}", entity.TelNumber));
PrintAPI.B_Prn_Text_TrueType(42, 280, 23, "宋体", 1, 400, 0, 0, 0, "C8", string.Format("产地:{0}", entity.Place));
PrintAPI.B_Prn_Barcode(42, 320, 0, "1", 3, 22, 35, 'N', entity.BarCode);
PrintAPI.B_Prn_Barcode(30, 320, 0, "1", 3, 22, 35, 'N', entity.BarCode);
PrintAPI.B_Prn_Text_TrueType(173, 360, 25, "宋体", 1, 500, 0, 0, 0, "C9", entity.BarCode);
PrintAPI.B_Bar2d_QR(430, 105, 2, 6, 'M', 'A', 0, 0, 0, entity._2DQRCode);
@ -57,5 +78,7 @@ namespace SegmentationWeight
public string _2DQRCode { get; set; }
public string Weight { get; set; }
public string Number { get; set; }
}
}

+ 2
- 2
SegmentationWeight/WeightSettingFrom.cs View File

@ -12,9 +12,9 @@ namespace SegmentationWeight
{
public partial class WeightSettingFrom : Form
{
List<string> weight = new List<string> { "IND560", "Xk3124", "Xk3190A9", "Xk3190D10" };
List<string> weight = new List<string> { "IND560", "Xk3124", "Xk3190A9", "Xk3190D10", "IND231" };
List<string> com = new List<string> { "COM1", "COM2", "COM3", "COM4", "COM5" };
List<string> rate = new List<string> { "4800", "7200", "9600" };
List<string> rate = new List<string> { "1200","2400","4800", "7200", "9600" };
List<string> bit = new List<string> { "5", "6", "7", "8" };
List<string> weightRead = new List<string> { "稳定读取", "连续发送" };
public WeightSettingFrom()


BIN
Setup/Release/Setup.msi View File


BIN
Setup/Release/setup.exe View File


+ 1759
- 223
Setup/Setup.vdproj
File diff suppressed because it is too large
View File


+ 2
- 1
WeighAndGrading/GradeFrom.cs View File

@ -465,7 +465,8 @@ namespace WeighAndGrading
string indexCode = maxindex.ToString("D6");
entity.BarCode = string.Format("WF{0}{1:00000}", DateTime.Today.ToString("yyyyMMdd"), indexCode);
entity._2DQRCode = string.Format(ButcherAppContext.Context.UrlConfig.OutAddress+"?code={0}&name={1}", entity.BarCode, goodsName);
// entity._2DQRCode = string.Format(ButcherAppContext.Context.UrlConfig.OutAddress+"?code={0}&name={1}", entity.BarCode, goodsName);
entity._2DQRCode = string.Format(ButcherAppContext.Context.UrlConfig.OutAddress+"?code={0}", entity.BarCode);
return entity;
}


Loading…
Cancel
Save