change-修改样式等

master
liuwf 1 month ago
parent 5c309283a0
commit ecd91252f5

@ -31,6 +31,7 @@ namespace SlnMesnac.RfidUpload.Model
/// </summary> /// </summary>
public class TransferOrderInfo public class TransferOrderInfo
{ {
public string dbdh { get; set; } public string dbdh { get; set; }
public string jsdw{get;set;} public string jsdw{get;set;}
public string ffjhNo{get;set;} public string ffjhNo{get;set;}

@ -54,6 +54,9 @@
<Button Content="拉取调拨单" Command="{Binding GetTransferOrderCommand}" Style="{StaticResource BUTTON_AGREE}" Width="80" Height="30" Background="#007DFA" BorderBrush="#007DFA" Margin="10,0,10,0"/> <Button Content="拉取调拨单" Command="{Binding GetTransferOrderCommand}" Style="{StaticResource BUTTON_AGREE}" Width="80" Height="30" Background="#007DFA" BorderBrush="#007DFA" Margin="10,0,10,0"/>
<Label Content="记录总数 :" FontSize="20" FontWeight="Black" Foreground="#00CC33" Margin="50,0,0,0"/>
<Label Content="{Binding TotalAmount}" FontSize="20" FontWeight="Black" Foreground="#00CC33" Margin="5,0,10,0"/>
</StackPanel> </StackPanel>
</Grid> </Grid>
@ -65,7 +68,7 @@
Foreground="#0288d1" > Foreground="#0288d1" >
<!--resourceStyle 399行修改选中字体颜色--> <!--resourceStyle 399行修改选中字体颜色-->
<DataGrid.Columns> <DataGrid.Columns>
<DataGridTextColumn Binding="{Binding no}" Header="序号" Width="50" IsReadOnly="True"/> <DataGridTextColumn Binding="{Binding no}" Header="序号" Width="50" IsReadOnly="True" Visibility="Collapsed"/>
<DataGridTextColumn Binding="{Binding dbdh}" Header="调拨单号" Width="200" IsReadOnly="True"/> <DataGridTextColumn Binding="{Binding dbdh}" Header="调拨单号" Width="200" IsReadOnly="True"/>
<DataGridTextColumn Binding="{Binding jsdw}" Header="调入局" Width="100" IsReadOnly="True"/> <DataGridTextColumn Binding="{Binding jsdw}" Header="调入局" Width="100" IsReadOnly="True"/>
<DataGridTextColumn Binding="{Binding ffjhNo}" Header="封发计划编号" Width="150" IsReadOnly="True"/> <DataGridTextColumn Binding="{Binding ffjhNo}" Header="封发计划编号" Width="150" IsReadOnly="True"/>

@ -149,6 +149,8 @@
<Label Content="{Binding LabelCountParam}" FontSize="20" FontWeight="Black" Foreground="#00CC33" Margin="5,0,10,0"/> <Label Content="{Binding LabelCountParam}" FontSize="20" FontWeight="Black" Foreground="#00CC33" Margin="5,0,10,0"/>
<Label Content="调拨单号 :" FontSize="20" FontWeight="Black" Foreground="#00CC33" Margin="20,0,0,0"/> <Label Content="调拨单号 :" FontSize="20" FontWeight="Black" Foreground="#00CC33" Margin="20,0,0,0"/>
<Label Content="{Binding MainPageDbdh}" FontSize="20" FontWeight="Black" Foreground="#00CC33" Margin="5,0,10,0"/> <Label Content="{Binding MainPageDbdh}" FontSize="20" FontWeight="Black" Foreground="#00CC33" Margin="5,0,10,0"/>
<Label Content="封发计划编号 :" FontSize="20" FontWeight="Black" Foreground="#00CC33" Margin="20,0,0,0"/>
<Label Content="{Binding MainPageFfjhNo}" FontSize="20" FontWeight="Black" Foreground="#00CC33" Margin="5,0,10,0"/>
</StackPanel> </StackPanel>
</Border> </Border>
<Border Grid.Row="2" BorderThickness="2" CornerRadius="5" Background="White" Margin="5"> <Border Grid.Row="2" BorderThickness="2" CornerRadius="5" Background="White" Margin="5">

@ -113,7 +113,7 @@ namespace SlnMesnac.RfidUpload.UI
string opBatch = Guid.NewGuid().ToString("N").Substring(0, 20); string opBatch = Guid.NewGuid().ToString("N").Substring(0, 20);
CsbResult res = csbHandleBusiness.tranPlanCheckByCsb(_transferOrderInfo.ffjhNo,opBatch,"",""); CsbResult res = csbHandleBusiness.tranPlanCheckByCsb(_transferOrderInfo.ffjhNo,opBatch,"","");
MessageBox.Show(res.message); MessageBox.Show($"封发配发 6.12.容器直连配发-校验发运计划 可不指定机构直接完成容器封发配发 :{res.message}");
if (res.code == "200") if (res.code == "200")
{ {
@ -132,7 +132,8 @@ namespace SlnMesnac.RfidUpload.UI
{ {
string opBatch = Guid.NewGuid().ToString("N").Substring(0, 20); string opBatch = Guid.NewGuid().ToString("N").Substring(0, 20);
CsbResult res = csbHandleBusiness.tranPlanCheckByCsb(_transferOrderInfo.ffjhNo, opBatch, institution.stationOrgCode,institution.stationOrgName); CsbResult res = csbHandleBusiness.tranPlanCheckByCsb(_transferOrderInfo.ffjhNo, opBatch, institution.stationOrgCode,institution.stationOrgName);
if(res.code == "200") MessageBox.Show($"执行配发 6.12.容器直连配发-校验发运计划 容器封发完毕后直接向指定机构进行容器配发 :{res.message}");
if (res.code == "200")
{ {
RefreshSubmitVerifyEvent?.Invoke(3, res.message, _transferOrderInfo); RefreshSubmitVerifyEvent?.Invoke(3, res.message, _transferOrderInfo);
this.Close(); this.Close();

@ -54,6 +54,9 @@
<Button Content="拉取调拨单" Command="{Binding GetTransferOrderCommand}" Style="{StaticResource BUTTON_AGREE}" Width="80" Height="30" Background="#007DFA" BorderBrush="#007DFA" Margin="10,0,10,0"/> <Button Content="拉取调拨单" Command="{Binding GetTransferOrderCommand}" Style="{StaticResource BUTTON_AGREE}" Width="80" Height="30" Background="#007DFA" BorderBrush="#007DFA" Margin="10,0,10,0"/>
<Label Content="记录总数 :" FontSize="20" FontWeight="Black" Foreground="#00CC33" Margin="50,0,0,0"/>
<Label Content="{Binding TotalAmount}" FontSize="20" FontWeight="Black" Foreground="#00CC33" Margin="5,0,10,0"/>
</StackPanel> </StackPanel>
</Grid> </Grid>
@ -65,7 +68,8 @@
Foreground="#0288d1" > Foreground="#0288d1" >
<!--resourceStyle 399行修改选中字体颜色--> <!--resourceStyle 399行修改选中字体颜色-->
<DataGrid.Columns> <DataGrid.Columns>
<DataGridTextColumn Binding="{Binding no}" Header="序号" Width="50" IsReadOnly="True"/> <DataGridTextColumn Binding="{Binding no}" Header="序号" Visibility="Collapsed" Width="50" IsReadOnly="True"/>
<DataGridTextColumn Binding="{Binding dbdh}" Header="调拨单号" Width="200" IsReadOnly="True"/> <DataGridTextColumn Binding="{Binding dbdh}" Header="调拨单号" Width="200" IsReadOnly="True"/>
<DataGridTextColumn Binding="{Binding jsdw}" Header="调入局" Width="100" IsReadOnly="True"/> <DataGridTextColumn Binding="{Binding jsdw}" Header="调入局" Width="100" IsReadOnly="True"/>
<DataGridTextColumn Binding="{Binding ffjhNo}" Header="封发计划编号" Width="150" IsReadOnly="True"/> <DataGridTextColumn Binding="{Binding ffjhNo}" Header="封发计划编号" Width="150" IsReadOnly="True"/>

@ -31,5 +31,7 @@ namespace SlnMesnac.RfidUpload.UI
this.Close(); this.Close();
}; };
} }
} }
} }

@ -90,6 +90,17 @@ namespace SlnMesnac.RfidUpload.UI.viewModel
} }
} }
/// <summary>
/// 调拨单总数
/// </summary>
public string _totalCount = string.Empty;
public string TotalAmount
{
get => _totalCount;
set => SetProperty(ref _totalCount, value);
}
private DateTime? _endDate; private DateTime? _endDate;
public DateTime? EndDate public DateTime? EndDate
{ {
@ -134,15 +145,17 @@ namespace SlnMesnac.RfidUpload.UI.viewModel
MessageBox.Show("开始日期不能大于结束日期"); MessageBox.Show("开始日期不能大于结束日期");
return; return;
} }
_endDate = _endDate.Value.AddDays(1);
#region 正式启用 #region 正式启用
CsbResult res = csbHandleBusiness.transferOrderFfjhByCsb("", _startDate.Value.ToString(), _endDate.Value.ToString()); CsbResult res = csbHandleBusiness.transferOrderFfjhByCsb("", _startDate.Value.ToString(), _endDate.Value.ToString());
MessageBox.Show(res.message); MessageBox.Show("容器封发-获取调拨单和封发计划:"+res.message);
if (res.code == "200") if (res.code == "200")
{ {
if (res.IsSuccess) if (res.IsSuccess)
{ {
List<TransferOrderInfo> institutionList = res.ToObjectList<TransferOrderInfo>(); List<TransferOrderInfo> institutionList = res.ToObjectList<TransferOrderInfo>();
TransferOrderInfoItems = new ObservableCollection<TransferOrderInfo>(institutionList); TransferOrderInfoItems = new ObservableCollection<TransferOrderInfo>(institutionList);
TotalAmount = TransferOrderInfoItems.Count.ToString();
} }
} }
#endregion #endregion

@ -138,6 +138,15 @@ namespace SlnMesnac.RfidUpload.UI.viewModel
set { _mainPageDbdh = value; RaisePropertyChanged(() => MainPageDbdh); } set { _mainPageDbdh = value; RaisePropertyChanged(() => MainPageDbdh); }
} }
/// <summary>
/// 主界面当前封发计划
/// </summary>
private string _mainPageFfjhNo = "";
public string MainPageFfjhNo
{
get { return _mainPageFfjhNo; }
set { _mainPageFfjhNo = value; RaisePropertyChanged(() => MainPageFfjhNo); }
}
/// <summary> /// <summary>
/// 工作模式 /// 工作模式
@ -315,7 +324,7 @@ namespace SlnMesnac.RfidUpload.UI.viewModel
{ {
try try
{ {
LabelTest(); // LabelTest();
//_serialPortBusiness.OpenSerialPort(); //_serialPortBusiness.OpenSerialPort();
this.GetParity(out int parity); this.GetParity(out int parity);
@ -399,7 +408,7 @@ namespace SlnMesnac.RfidUpload.UI.viewModel
else else
{ {
CsbResult res = csbHandleBusiness.scanAnyContainerCodeByCsb(palletInfo.result); CsbResult res = csbHandleBusiness.scanAnyContainerCodeByCsb(palletInfo.result);
MessageBox.Show(res.message); MessageBox.Show("新容器入库"+res.message);
} }
} }
else if (workModelParam == 2) //封发-按调拨单 else if (workModelParam == 2) //封发-按调拨单
@ -408,28 +417,29 @@ namespace SlnMesnac.RfidUpload.UI.viewModel
var strList = info.Select(x => x.result).ToList(); var strList = info.Select(x => x.result).ToList();
string opBatch = Guid.NewGuid().ToString("N").Substring(0, 20); string opBatch = Guid.NewGuid().ToString("N").Substring(0, 20);
CsbResult res = csbHandleBusiness.containerScanSealByCsb(TransferOrderInfoItem.ffjhNo, System.Guid.NewGuid().ToString("N").Substring(0, 20), TransferOrderInfoItem.ffjhscrq, opBatch, jsonChange.ModeToJson(strList)); CsbResult res = csbHandleBusiness.containerScanSealByCsb(TransferOrderInfoItem.ffjhNo, System.Guid.NewGuid().ToString("N").Substring(0, 20), TransferOrderInfoItem.ffjhscrq, opBatch, jsonChange.ModeToJson(strList));
MessageBox.Show(res.message); MessageBox.Show("封发-按调拨单"+res.message);
Task.Run(() => Task.Run(() =>
{ //若干秒以后调反馈接口,确认是否和实际相符 { //若干秒以后调反馈接口,确认是否和实际相符
Thread.Sleep(3000); Thread.Sleep(3000);
string opBatch = Guid.NewGuid().ToString("N").Substring(0, 20); string opBatch = Guid.NewGuid().ToString("N").Substring(0, 20);
CsbResult res = csbHandleBusiness.containerScanSealResultByCsb(TransferOrderInfoItem.ffjhNo, opBatch); CsbResult res = csbHandleBusiness.containerScanSealResultByCsb(TransferOrderInfoItem.ffjhNo, opBatch);
MessageBox.Show(res.message); MessageBox.Show("封发-按调拨单--若干秒以后调反馈接口,确认是否和实际相符" + res.message);
}); });
}else if(WorkModelParam == 3) //库存容器封发配发 -- 6.13.容器直连配发-开始配发 }else if(WorkModelParam == 3) //库存容器封发配发 -- 6.13.容器直连配发-开始配发
{ {
string opBatch = Guid.NewGuid().ToString("N").Substring(0, 20); string opBatch = Guid.NewGuid().ToString("N").Substring(0, 20);
csbHandleBusiness.containerAllotByCsb(TransferOrderInfoItem.ffjhNo,opBatch); CsbResult res = csbHandleBusiness.containerAllotByCsb(TransferOrderInfoItem.ffjhNo,opBatch);
MessageBox.Show("库存容器封发配发 -- 6.13.容器直连配发-开始配发" + res.message);
Task.Run(() => Task.Run(() =>
{ {
Thread.Sleep(3000); Thread.Sleep(3000);
//若干秒以后调反馈接口,确认是否和实际相符 //若干秒以后调反馈接口,确认是否和实际相符
string opBatch = Guid.NewGuid().ToString("N").Substring(0, 20); string opBatch = Guid.NewGuid().ToString("N").Substring(0, 20);
CsbResult res = csbHandleBusiness.containerAllotResultByCsb(TransferOrderInfoItem.ffjhNo, opBatch); CsbResult res = csbHandleBusiness.containerAllotResultByCsb(TransferOrderInfoItem.ffjhNo, opBatch);
MessageBox.Show(res.message); MessageBox.Show("库存容器封发配发--若干秒以后调反馈接口,确认是否和实际相符" + res.message);
}); });
} }
@ -505,13 +515,13 @@ namespace SlnMesnac.RfidUpload.UI.viewModel
if (instructionInfo == null) return; if (instructionInfo == null) return;
App.Current.Dispatcher.BeginInvoke((Action)(() => App.Current.Dispatcher.BeginInvoke((Action)(() =>
{ {
instructionInfo.no = No++; int no =labelItems.Count;
DataGridEnt dataGridEnt = new DataGridEnt(); DataGridEnt dataGridEnt = new DataGridEnt();
dataGridEnt.no = ++no;
dataGridEnt.dbdh = _transferOrderInfo.dbdh; dataGridEnt.dbdh = _transferOrderInfo.dbdh;
dataGridEnt.result = instructionInfo.data; dataGridEnt.result = instructionInfo.data;
dataGridEnt.recordtime = DateTime.Now;
labelItems.Add(dataGridEnt); labelItems.Add(dataGridEnt);
LabelInfoDataGrid = labelItems; LabelInfoDataGrid = labelItems;
LabelCountParam += 1; LabelCountParam += 1;
@ -623,6 +633,7 @@ namespace SlnMesnac.RfidUpload.UI.viewModel
if (transferOrderInfo != null) if (transferOrderInfo != null)
{ {
MainPageDbdh = transferOrderInfo.dbdh; MainPageDbdh = transferOrderInfo.dbdh;
MainPageFfjhNo = transferOrderInfo.ffjhNo;
TransferOrderInfoItem = transferOrderInfo; TransferOrderInfoItem = transferOrderInfo;
} }
} }

@ -82,6 +82,17 @@ namespace SlnMesnac.RfidUpload.UI.viewModel
set => SetProperty(ref _drj, value); set => SetProperty(ref _drj, value);
} }
/// <summary>
/// 调拨单总数
/// </summary>
public string _totalCount = string.Empty;
public string TotalAmount
{
get => _totalCount;
set => SetProperty(ref _totalCount, value);
}
private DateTime? _startDate; private DateTime? _startDate;
public DateTime? StartDate public DateTime? StartDate
{ {
@ -136,13 +147,13 @@ namespace SlnMesnac.RfidUpload.UI.viewModel
MessageBox.Show("开始日期不能大于结束日期"); MessageBox.Show("开始日期不能大于结束日期");
return; return;
} }
_endDate = _endDate.Value.AddDays(1);
#region 正式启用 #region 正式启用
CsbResult res = csbHandleBusiness.transferOrderFfjhByCsb(_drj, _startDate.Value.ToString(), _endDate.Value.ToString()); CsbResult res = csbHandleBusiness.transferOrderFfjhByCsb(_drj, _startDate.Value.ToString(), _endDate.Value.ToString());
MessageBox.Show(res.message); MessageBox.Show("容器封发-获取调拨单和封发计划:" + res.message);
if (res.code == "200") if (res.code == "200")
{ {
JObject job = JObject.Parse(res.body); JObject job = JObject.Parse(res.body);
string str = job["retBody"]?["object"]?.ToString(); string str = job["retBody"]?["object"]?.ToString();
if (!str.IsNullOrEmpty()) if (!str.IsNullOrEmpty())
@ -150,8 +161,9 @@ namespace SlnMesnac.RfidUpload.UI.viewModel
List<TransferOrderInfo> institutionList = JsonConvert.DeserializeObject<List<TransferOrderInfo>>(str); List<TransferOrderInfo> institutionList = JsonConvert.DeserializeObject<List<TransferOrderInfo>>(str);
TransferOrderInfoItems = new ObservableCollection<TransferOrderInfo>(institutionList);
TransferOrderInfoItems = new ObservableCollection<TransferOrderInfo>(institutionList);
TotalAmount = TransferOrderInfoItems.Count.ToString();
} }
} }
#endregion #endregion

Loading…
Cancel
Save