生成条码优化
This commit is contained in:
@ -21,14 +21,17 @@ namespace WCS.BLL.Manager
|
||||
public static List<TCPClient> TCPClients = new List<TCPClient>();
|
||||
public static void InitTcpClient()
|
||||
{
|
||||
var ips = DbHelp.db.Queryable<ShelfInfo>().Where(t => t.ShelfCode.Contains("C")).Select(t => t.ClientIp).ToList();
|
||||
var ips = DbHelp.db.Queryable<ShelfInfo>()
|
||||
//.Where(t => t.ShelfCode.Contains("C"))
|
||||
.Select(t => t.ClientIp)
|
||||
.Distinct()
|
||||
.ToList();
|
||||
foreach (var ip in ips)
|
||||
{
|
||||
var tcpCleint = new TCPClient(ip, "192.168.9.183:20003");
|
||||
//配置断线重连
|
||||
tcpCleint.tcpClient.Received += (client, e) =>
|
||||
{
|
||||
|
||||
var clientIpHost = client.IP + ":" + client.Port;
|
||||
var TcpCleint = TCPClientManager.GetTCPClientByIPHost(clientIpHost);
|
||||
if (TcpCleint == null)
|
||||
@ -99,26 +102,27 @@ namespace WCS.BLL.Manager
|
||||
Logs.Write("协议处理完毕!");
|
||||
return EasyTask.CompletedTask;
|
||||
};
|
||||
|
||||
TCPClients.Add(tcpCleint);
|
||||
tcpCleint.Connect();
|
||||
}
|
||||
}
|
||||
|
||||
//后台启动时给所有板子、警示灯发送复位操作 保持状态一致
|
||||
public static void InitStatus()
|
||||
{
|
||||
Task.Run(() =>
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
|
||||
Thread.Sleep(1000);
|
||||
//给所有板子发复位
|
||||
TCPClients.ForEach(tcpClient =>
|
||||
{
|
||||
//板子复位
|
||||
new SmartShelfModule() { BoardId = 2047 }.Reset(tcpClient);
|
||||
new SmartShelfModule()
|
||||
{
|
||||
BoardId = 2047
|
||||
}.Reset(tcpClient);
|
||||
//报警灯复位
|
||||
new WarningLight().CloseLight(tcpClient);
|
||||
});
|
||||
|
@ -69,7 +69,7 @@ namespace WCS.BLL.Services.Service
|
||||
MatSn = GetMatSn(matBaseInfo, startNumber + i),
|
||||
MatCode = matBaseInfo.MatCode,
|
||||
MatName = matBaseInfo.MatName,
|
||||
MatBatch = matBaseInfo.MatBatch,
|
||||
MatBatch = request.MatBatch,
|
||||
MatSpec = matBaseInfo.MatSpec,
|
||||
MatUnit = matBaseInfo.MatUnit,
|
||||
MatSupplier = matBaseInfo.MatSupplier,
|
||||
@ -107,11 +107,9 @@ namespace WCS.BLL.Services.Service
|
||||
private string GetMatSn(MatBaseInfo matBaseInfo, int serialNumber)
|
||||
{
|
||||
var gongshi = "=A1&\"-\"&A2&A3";
|
||||
|
||||
//var matSn = matBaseInfo.MatCode + matBaseInfo.MatBatch + serialNumber.ToString().PadLeft(6, '0');
|
||||
Dictionary<string, string> keyValuePairs = new Dictionary<string, string>();
|
||||
keyValuePairs.Add("A1", matBaseInfo.MatCode);
|
||||
keyValuePairs.Add("A2", matBaseInfo.MatName);
|
||||
keyValuePairs.Add("A2", string.IsNullOrEmpty(matBaseInfo.MatBatch) ? "" : matBaseInfo.MatBatch);
|
||||
keyValuePairs.Add("A3", serialNumber.ToString().PadLeft(6, '0'));
|
||||
var matSn = PnHelp.Jx(gongshi, keyValuePairs);
|
||||
return matSn;
|
||||
|
@ -1,11 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Runtime;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
using System.Text.RegularExpressions;
|
||||
using WCS.BLL.Config;
|
||||
using WCS.BLL.DbModels;
|
||||
using WCS.BLL.HardWare;
|
||||
@ -15,8 +8,6 @@ using WCS.BLL.Tool;
|
||||
using WCS.BLL.Tool.Api.ApiModel;
|
||||
using WCS.DAL.Db;
|
||||
using WCS.Model;
|
||||
using WCS.Model.ApiModel.MatBaseInfo;
|
||||
using static Dm.net.buffer.ByteArrayBuffer;
|
||||
|
||||
namespace WCS.BLL.Services.Service
|
||||
{
|
||||
|
@ -30,7 +30,7 @@ namespace WCS.BLL.Services.Service
|
||||
return new ResponseBase()
|
||||
{
|
||||
Code = 201,
|
||||
Message = "单据同步失败:缺少需要出库的物料类型!"
|
||||
Message = "出库单据同步失败:缺少需要出库的物料类型!"
|
||||
};
|
||||
}
|
||||
//保存数据
|
||||
@ -65,7 +65,7 @@ namespace WCS.BLL.Services.Service
|
||||
return new ResponseCommon()
|
||||
{
|
||||
Code = 200,
|
||||
Message = "单据同步成功!"
|
||||
Message = $"出库单据同步成功!\r\n出库单据号为{request.OrderNumber}",
|
||||
}; ;
|
||||
}
|
||||
catch (Exception ex)
|
||||
@ -75,7 +75,7 @@ namespace WCS.BLL.Services.Service
|
||||
return new ResponseBase()
|
||||
{
|
||||
Code = 200,
|
||||
Message = $"单据同步失败:{ex.Message}"
|
||||
Message = $"出库单据同步失败:{ex.Message}"
|
||||
};
|
||||
}
|
||||
}
|
||||
@ -89,7 +89,7 @@ namespace WCS.BLL.Services.Service
|
||||
return new ResponseBase()
|
||||
{
|
||||
Code = 201,
|
||||
Message = "单据同步失败:缺少物料明细!"
|
||||
Message = "出库单据同步失败:缺少物料明细!"
|
||||
};
|
||||
}
|
||||
//库存有无校验 & 库存已锁校验
|
||||
@ -109,7 +109,7 @@ namespace WCS.BLL.Services.Service
|
||||
return new ResponseCommon()
|
||||
{
|
||||
Code = 201,
|
||||
Message = "单据同步失败:存在物料不在库存中!",
|
||||
Message = "出库单据同步失败:存在物料不在库存中!",
|
||||
Data = request.SnList
|
||||
|
||||
};
|
||||
@ -121,7 +121,7 @@ namespace WCS.BLL.Services.Service
|
||||
return new ResponseCommon()
|
||||
{
|
||||
Code = 201,
|
||||
Message = "单据同步失败:存在物料被锁定!",
|
||||
Message = "出库单据同步失败:存在物料被锁定!",
|
||||
Data = inventoryDetails.Where(t => t.IsLocked).Select(t => t.MatSN).ToList()
|
||||
};
|
||||
}
|
||||
@ -176,7 +176,7 @@ namespace WCS.BLL.Services.Service
|
||||
return new ResponseCommon()
|
||||
{
|
||||
Code = 200,
|
||||
Message = $"单据同步成功!",
|
||||
Message = $"出库单据同步成功!\r\n出库单据号为{request.OrderNumber}",
|
||||
Data = order.Id
|
||||
};
|
||||
#endregion
|
||||
@ -187,7 +187,7 @@ namespace WCS.BLL.Services.Service
|
||||
return new ResponseBase()
|
||||
{
|
||||
Code = 201,
|
||||
Message = $"单据同步失败:{ex.Message}"
|
||||
Message = $"出库单据同步失败:{ex.Message}"
|
||||
};
|
||||
}
|
||||
|
||||
@ -288,7 +288,7 @@ namespace WCS.BLL.Services.Service
|
||||
return new ResponseCommon()
|
||||
{
|
||||
Code = 201,
|
||||
Message = $"查询失败:不存在单据号为{request.OrderNumber}的出库单!",
|
||||
Message = $"查询失败:不存在出库单据号为{request.OrderNumber}的出库单!",
|
||||
};
|
||||
}
|
||||
}
|
||||
@ -348,7 +348,7 @@ namespace WCS.BLL.Services.Service
|
||||
return new ResponseCommon()
|
||||
{
|
||||
Code = 201,
|
||||
Message = $"查询失败:不存在单据号为{request.OrderNumber}的出库单!",
|
||||
Message = $"查询失败:不存在出库单据号为{request.OrderNumber}的出库单!",
|
||||
};
|
||||
}
|
||||
}
|
||||
@ -406,7 +406,7 @@ namespace WCS.BLL.Services.Service
|
||||
//如果是按物料编码出库 需要计算物料明细、并进行物料锁定
|
||||
if (order.SyncType == SyncTypeEnum.ByMatCode)
|
||||
{
|
||||
var result = CaculateOutOrderMatDetails(order);
|
||||
var result = CaculateOutOrderMatDetails(order, request.UserName);
|
||||
if (result.Code != 200)
|
||||
{
|
||||
return result;
|
||||
@ -465,13 +465,13 @@ namespace WCS.BLL.Services.Service
|
||||
var matCode = outOrderDetailCount.First().bb.Key;
|
||||
outOrderMatDetails = outOrderMatDetails.Where(t => t.MatCode == matCode)
|
||||
.ToList();
|
||||
Logs.Write($"发料单{order.OrderNumber},本次亮灯物料{matCode}!");
|
||||
Logs.Write($"出库单{order.OrderNumber},本次亮灯物料{matCode}!");
|
||||
}
|
||||
//相同物料不存在盘数超过n的情况,剩余物料全部亮灯
|
||||
else
|
||||
{
|
||||
//剩余物料全出
|
||||
Logs.Write($"发料单{order.OrderNumber},剩余物料灯全亮!");
|
||||
Logs.Write($"出库单{order.OrderNumber},剩余物料灯全亮!");
|
||||
}
|
||||
}
|
||||
|
||||
@ -500,7 +500,7 @@ namespace WCS.BLL.Services.Service
|
||||
}
|
||||
}
|
||||
//计算、加锁
|
||||
private ResponseBase CaculateOutOrderMatDetails(OutOrder order)
|
||||
private ResponseBase CaculateOutOrderMatDetails(OutOrder order, string createUser = "")
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -514,7 +514,7 @@ namespace WCS.BLL.Services.Service
|
||||
return new ResponseCommon()
|
||||
{
|
||||
Code = 201,
|
||||
Message = $"计算物料失败,{order.OrderNumber}没有单据明细!"
|
||||
Message = $"计算物料失败,{order.OrderNumber}没有出库单据明细!"
|
||||
};
|
||||
}
|
||||
//第二步 开始计算物料
|
||||
@ -527,7 +527,7 @@ namespace WCS.BLL.Services.Service
|
||||
.WhereIF(!string.IsNullOrEmpty(outOrderDetail.MatBatch), t => t.MatBatch == outOrderDetail.MatBatch)
|
||||
.Where(t => t.IsLocked == false)//未锁定的物料
|
||||
.OrderBy(t => t.MatBatch)//先进先出
|
||||
.OrderBy(t => t.MatQty)//零散料先出
|
||||
//(t => t.MatQty)//零散料先出
|
||||
.ToList();
|
||||
|
||||
//2.2按照搜索出来的库存和当前未出的数量 计算需要出的SN
|
||||
@ -552,7 +552,7 @@ namespace WCS.BLL.Services.Service
|
||||
MatSupplier = matInventoryDetails[i].MatSupplier,
|
||||
MatCustomer = matInventoryDetails[i].MatCustomer,
|
||||
IsSended = false,
|
||||
CreateUser = "待定",
|
||||
CreateUser = createUser,
|
||||
});
|
||||
outOrderDetail.ReqQty = 0;
|
||||
|
||||
@ -580,7 +580,7 @@ namespace WCS.BLL.Services.Service
|
||||
MatSupplier = matInventoryDetails[i].MatSupplier,
|
||||
MatCustomer = matInventoryDetails[i].MatCustomer,
|
||||
IsSended = false,
|
||||
CreateUser = "待定",
|
||||
CreateUser = createUser,
|
||||
});
|
||||
|
||||
matInventoryDetails[i].IsLocked = true;
|
||||
@ -590,6 +590,16 @@ namespace WCS.BLL.Services.Service
|
||||
}
|
||||
DbHelp.db.Insertable(outOrderMatDetails).ExecuteCommand();
|
||||
DbHelp.db.CommitTran();
|
||||
if (outOrderMatDetails.Count == 0)
|
||||
{
|
||||
return new ResponseCommon()
|
||||
{
|
||||
Code = 201,
|
||||
Message = $"计算物料失败,没有满足条件的物料进行出库!(请检查对应物料是否已被锁定)"
|
||||
};
|
||||
}
|
||||
else
|
||||
|
||||
return new ResponseCommon()
|
||||
{
|
||||
Code = 200,
|
||||
@ -607,7 +617,7 @@ namespace WCS.BLL.Services.Service
|
||||
}
|
||||
}
|
||||
|
||||
//解锁
|
||||
//删除 解锁
|
||||
private ResponseBase CancelOutOrderMatDetails(OutOrder order)
|
||||
{
|
||||
try
|
||||
@ -618,7 +628,7 @@ namespace WCS.BLL.Services.Service
|
||||
.Where(t => t.IsSended == false)
|
||||
.ToList();
|
||||
|
||||
var inventoryIds = outOrderMatDetails.Select(t => t.Id).ToList();
|
||||
var inventoryIds = outOrderMatDetails.Select(t => t.InventoryDetailId).ToList();
|
||||
var inventoryDetails = DbHelp.db.Queryable<InventoryDetail>()
|
||||
.Where(t => inventoryIds.Contains(t.Id))
|
||||
.ToList();
|
||||
@ -639,7 +649,7 @@ namespace WCS.BLL.Services.Service
|
||||
return new ResponseCommon()
|
||||
{
|
||||
Code = 300,
|
||||
Message = $"发生异常:{ex.Message}"
|
||||
Message = $"解锁物料时发生异常:{ex.Message}"
|
||||
};
|
||||
}
|
||||
}
|
||||
@ -679,7 +689,7 @@ namespace WCS.BLL.Services.Service
|
||||
return new ResponseCommon()
|
||||
{
|
||||
Code = 201,
|
||||
Message = $"单据【{request.OrderNumber}】不在出库中!",
|
||||
Message = $"出库单据【{request.OrderNumber}】不在出库中!",
|
||||
Data = null
|
||||
};
|
||||
}
|
||||
@ -694,8 +704,6 @@ namespace WCS.BLL.Services.Service
|
||||
if (order.SyncType == SyncTypeEnum.ByMatCode)
|
||||
CancelOutOrderMatDetails(order);
|
||||
|
||||
|
||||
|
||||
return new ResponseCommon()
|
||||
{
|
||||
Code = 200,
|
||||
|
@ -296,7 +296,7 @@ namespace WCS.BLL.Services.Service
|
||||
{
|
||||
Data = new SysStockTakingOrderData() { StocktakingOrderNumber = request.StocktakingOrderNumber },
|
||||
Code = 200,
|
||||
Message = $"Success"
|
||||
Message = $"生成盘点单据成功!\r\n单据号为:{request.StocktakingOrderNumber}"
|
||||
};
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
@ -9,6 +9,11 @@ namespace WCS.Model.ApiModel.MatBaseInfo
|
||||
{
|
||||
public MatBaseInfoModel MatBaseInfo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 本次生成的批次号
|
||||
/// </summary>
|
||||
public string MatBatch { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 每盘数量
|
||||
/// </summary>
|
||||
|
@ -25,14 +25,6 @@ namespace WCS.Model.ApiModel.Stocktaking
|
||||
#endregion
|
||||
|
||||
public bool IsStocktaking { get; set; }
|
||||
public string IsStocktakingStr
|
||||
{
|
||||
get
|
||||
{
|
||||
return
|
||||
IsStocktaking ? "是" : "否";
|
||||
}
|
||||
}
|
||||
public int StocktakingQty { get; set; }
|
||||
public DateTime UpdateTime { get; set; }
|
||||
public string UpdateUser { get; set; }
|
||||
|
@ -311,6 +311,7 @@ namespace 货架标准上位机.ViewModel
|
||||
if (matBaseInfo == null)
|
||||
{
|
||||
Growl.Warning("请选择需要修改的数据!");
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -395,20 +396,10 @@ namespace 货架标准上位机.ViewModel
|
||||
if (matBaseInfo == null)
|
||||
{
|
||||
Growl.Warning("请勾选数据!");
|
||||
return;
|
||||
}
|
||||
var generateWindow = new MatBaseInoGenarateMatInfoView(matBaseInfo);
|
||||
var result = generateWindow.ShowDialog();
|
||||
|
||||
//PrintTender.PrintTag(new PrintClass()
|
||||
//{
|
||||
// MatQty = "123",
|
||||
// MatCode = "123",
|
||||
// MatBatch = "123",
|
||||
// MatName = "123",
|
||||
// MatSn = "123",
|
||||
// MatSpec = "123",
|
||||
|
||||
//});
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
@ -326,7 +326,12 @@ namespace 货架标准上位机.ViewModel
|
||||
var Result1 = ApiHelp.GetDataFromHttp<ResponseCommon>(LocalFile.Config.ApiIpHost + "outstore/sysOutOrderByMatSn", body1, "POST");
|
||||
if (Result1 != null && Result1.Code == 200)
|
||||
{
|
||||
Growl.Success(Result1.Message);
|
||||
App.Current.Dispatcher.Invoke(() =>
|
||||
{
|
||||
dia.Close();
|
||||
dia.Collapse();
|
||||
HandyControl.Controls.MessageBox.Show(Result1.Message);
|
||||
});
|
||||
}
|
||||
else if (Result1 != null)
|
||||
{
|
||||
@ -419,7 +424,12 @@ namespace 货架标准上位机.ViewModel
|
||||
var Result1 = ApiHelp.GetDataFromHttp<ResponseCommon>(LocalFile.Config.ApiIpHost + "stockTaking/sysStockTakingOrder", body1, "POST");
|
||||
if (Result1 != null && Result1.Code == 200)
|
||||
{
|
||||
Growl.Success(Result1.Message);
|
||||
App.Current.Dispatcher.Invoke(() =>
|
||||
{
|
||||
dia.Close();
|
||||
dia.Collapse();
|
||||
HandyControl.Controls.MessageBox.Show(Result1.Message);
|
||||
});
|
||||
}
|
||||
else if (Result1 != null)
|
||||
{
|
||||
|
@ -75,12 +75,15 @@ namespace 货架标准上位机.ViewModels
|
||||
}
|
||||
|
||||
// 定义一个事件,当需要关闭窗口时触发
|
||||
public event Action RequestClose;
|
||||
|
||||
public event Action TrueClose;
|
||||
public event Action FalseClose;
|
||||
// 一个方法,当满足某些条件时调用,以触发关闭窗口
|
||||
protected virtual void OnRequestClose()
|
||||
protected virtual void OnRequestClose(bool IsTrue)
|
||||
{
|
||||
RequestClose?.Invoke();
|
||||
if (IsTrue)
|
||||
TrueClose?.Invoke();
|
||||
else
|
||||
FalseClose?.Invoke();
|
||||
}
|
||||
public ICommand GenerateOutOrderCommand { get => new DelegateCommand(GenerateOutOrder); }
|
||||
public void GenerateOutOrder()
|
||||
@ -128,11 +131,12 @@ namespace 货架标准上位机.ViewModels
|
||||
if (Result != null && Result.Code == 200)
|
||||
{
|
||||
Growl.Success(Result.Message);
|
||||
OnRequestClose();
|
||||
OnRequestClose(true);
|
||||
}
|
||||
else if (Result != null)
|
||||
{
|
||||
Growl.Warning(Result.Message);
|
||||
return;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
@ -134,6 +134,16 @@ namespace 货架标准上位机.ViewModels
|
||||
|
||||
//}
|
||||
|
||||
public ICommand BtnOutOrderCommand { get => new DelegateCommand(BtnOutOrder); }
|
||||
public void BtnOutOrder()
|
||||
{
|
||||
var window = new OutInventoryAddDucumentView();
|
||||
window.Owner = Application.Current.MainWindow;
|
||||
var result = window.ShowDialog();
|
||||
if (result == true)
|
||||
BtnSearch(true);
|
||||
}
|
||||
|
||||
public ICommand BtnOrderDetailCommand { get => new DelegateCommand(BtnOrderDetail); }
|
||||
public void BtnOrderDetail()
|
||||
{
|
||||
|
@ -160,12 +160,12 @@
|
||||
</DataGridTemplateColumn.HeaderTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<DataGridTextColumn IsReadOnly="True" Header="序号" Binding="{Binding RowNumber}"></DataGridTextColumn>
|
||||
<DataGridTextColumn IsReadOnly="True" Header="物料编码" Binding="{Binding MatCode}"></DataGridTextColumn>
|
||||
<DataGridTextColumn IsReadOnly="True" Header="名称" Binding="{Binding MatName}"></DataGridTextColumn>
|
||||
<DataGridTextColumn IsReadOnly="True" Header="规格" Binding="{Binding MatSpec}"></DataGridTextColumn>
|
||||
<DataGridTextColumn IsReadOnly="True" Header="单位" Binding="{Binding MatUnit}"></DataGridTextColumn>
|
||||
<DataGridTextColumn Header="物料编码" Binding="{Binding MatCode}"></DataGridTextColumn>
|
||||
<DataGridTextColumn Header="名称" MaxWidth="150" Binding="{Binding MatName}"></DataGridTextColumn>
|
||||
<DataGridTextColumn Header="规格" MaxWidth="150" Binding="{Binding MatSpec}"></DataGridTextColumn>
|
||||
<DataGridTextColumn Header="单位" Binding="{Binding MatUnit}"></DataGridTextColumn>
|
||||
|
||||
<DataGridTextColumn IsReadOnly="True" Header="客户" Binding="{Binding MatCustomer}"></DataGridTextColumn>
|
||||
<DataGridTextColumn Header="客户" Binding="{Binding MatCustomer}"></DataGridTextColumn>
|
||||
<DataGridTextColumn IsReadOnly="True" Header="状态" Binding="{Binding IsEnableStr}"></DataGridTextColumn>
|
||||
<DataGridTextColumn IsReadOnly="True" Header="更新人" Binding="{Binding ModifyUser}"></DataGridTextColumn>
|
||||
<DataGridTextColumn IsReadOnly="True" Header="更新时间" Binding="{Binding ModifyTime ,StringFormat='yyyy-MM-dd HH:mm:ss'}"></DataGridTextColumn>
|
||||
|
@ -42,18 +42,29 @@
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Orientation="Horizontal" Margin="5">
|
||||
<TextBlock Text="单盘数量:" FontSize="15" VerticalAlignment="Center" HorizontalAlignment="Right"></TextBlock>
|
||||
<TextBox Name="txtMatQty" MinWidth="200" Grid.Row="0" Grid.Column="1" FontSize="15"
|
||||
<TextBlock Text="物料批次:" FontSize="15" VerticalAlignment="Center" HorizontalAlignment="Right"></TextBlock>
|
||||
<TextBox Name="txtMatBatch" MinWidth="200" MaxWidth="200" FontSize="15"
|
||||
VerticalAlignment="Center" HorizontalAlignment="Stretch"
|
||||
InputScope="Number"
|
||||
PreviewTextInput="txtMatBatch_PreviewTextInput"
|
||||
Style="{StaticResource TextBoxExtend}">
|
||||
</TextBox>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Orientation="Horizontal" Margin="5">
|
||||
<TextBlock Text="单盘数量:" FontSize="15" VerticalAlignment="Center" HorizontalAlignment="Right"></TextBlock>
|
||||
<TextBox Name="txtMatQty" MinWidth="200" MaxWidth="200" FontSize="15"
|
||||
VerticalAlignment="Center" HorizontalAlignment="Stretch"
|
||||
PreviewTextInput="txtMatBatch_PreviewTextInput"
|
||||
Style="{StaticResource TextBoxExtend}">
|
||||
</TextBox>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Orientation="Horizontal" Margin="5">
|
||||
<TextBlock Text="物料盘数:" FontSize="15" VerticalAlignment="Center" HorizontalAlignment="Right"></TextBlock>
|
||||
<TextBox Name="txtTotalCount" MinWidth="200" Grid.Row="0" Grid.Column="1" FontSize="15"
|
||||
<TextBox Name="txtTotalCount" MinWidth="200" MaxWidth="200" FontSize="15"
|
||||
VerticalAlignment="Center" HorizontalAlignment="Stretch"
|
||||
InputScope="Number"
|
||||
PreviewTextInput="txtMatBatch_PreviewTextInput"
|
||||
Style="{StaticResource TextBoxExtend}">
|
||||
</TextBox>
|
||||
</StackPanel>
|
||||
|
@ -2,7 +2,9 @@
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Windows;
|
||||
using System.Windows.Input;
|
||||
using WCS.BLL.DbModels;
|
||||
using WCS.Model;
|
||||
using WCS.Model.ApiModel.MatBaseInfo;
|
||||
@ -34,14 +36,52 @@ namespace 货架标准上位机
|
||||
|
||||
private void btnOk_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
#region 数据校验
|
||||
if (string.IsNullOrEmpty(txtMatBatch.Text.Trim()))
|
||||
{
|
||||
Growl.Warning("请输入物料批次后进行操作!");
|
||||
txtMatBatch.Focus();
|
||||
return;
|
||||
}
|
||||
var matBatch = txtMatBatch.Text.Trim();
|
||||
if (!IsInputNumberAllowed(matBatch))
|
||||
{
|
||||
Growl.Warning("【物料批次】请输入数字!");
|
||||
txtMatBatch.Focus();
|
||||
return;
|
||||
//正则表达式
|
||||
//匹配年周
|
||||
//^\d{ 4}\d{ 1,2}$
|
||||
//匹配年月日
|
||||
//^\d{ 4} (0[1 - 9] | 1[0 - 2])(0[1 - 9] | [12]\d | 3[01])$
|
||||
}
|
||||
|
||||
var matQty = txtMatQty.Text.Trim();
|
||||
if (!IsInputNumberAllowed(matQty))
|
||||
{
|
||||
Growl.Warning("【单盘数量】请输入数字!");
|
||||
txtMatQty.Focus();
|
||||
return;
|
||||
}
|
||||
|
||||
var totalCount = txtTotalCount.Text.Trim();
|
||||
if (!IsInputNumberAllowed(totalCount))
|
||||
{
|
||||
Growl.Warning("【物料盘数】请输入数字!");
|
||||
txtTotalCount.Focus();
|
||||
return;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 调用接口生成条码
|
||||
try
|
||||
{
|
||||
var body = new GenerateMatInfoRequest()
|
||||
{
|
||||
MatBaseInfo = matBaseInfo,
|
||||
TotalCount = Convert.ToInt32(txtTotalCount.Text),
|
||||
MatQty = Convert.ToInt32(txtMatQty.Text),
|
||||
MatBatch = matBatch,
|
||||
TotalCount = Convert.ToInt32(txtTotalCount.Text.Trim()),
|
||||
MatQty = Convert.ToInt32(txtMatQty.Text.Trim()),
|
||||
UserName = LocalStatic.CurrentUser,
|
||||
DeviceType = LocalFile.Config.DeviceType,
|
||||
};
|
||||
@ -54,6 +94,7 @@ namespace 货架标准上位机
|
||||
catch (Exception ex)
|
||||
{
|
||||
Growl.Error("加载数据失败:" + ex.Message);
|
||||
return;
|
||||
}
|
||||
#endregion
|
||||
|
||||
@ -66,5 +107,16 @@ namespace 货架标准上位机
|
||||
this.DialogResult = false;
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private void txtMatBatch_PreviewTextInput(object sender, System.Windows.Input.TextCompositionEventArgs e)
|
||||
{
|
||||
e.Handled = !IsInputNumberAllowed(e.Text);
|
||||
}
|
||||
|
||||
private bool IsInputNumberAllowed(string text)
|
||||
{
|
||||
Regex regex = new Regex("^[0-9]+$"); // 只允许数字
|
||||
return regex.IsMatch(text);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -101,11 +101,13 @@
|
||||
|
||||
</StackPanel>
|
||||
|
||||
<DataGrid Grid.Row="1"
|
||||
<DataGrid
|
||||
Grid.Row="1"
|
||||
SelectionChanged="DataGrid_SelectionChanged"
|
||||
MouseLeftButtonDown="DataGrid_MouseLeftButtonDown"
|
||||
SelectedItem="{Binding SelectedataGridItem}"
|
||||
Name="dataGrid"
|
||||
SelectedCellsChanged="DataGrid_SelectedCellsChanged"
|
||||
SelectionMode="Extended"
|
||||
ItemsSource="{Binding DataGridItemSource}"
|
||||
RowHeight="39"
|
||||
AutoGenerateColumns="False" FontSize="13">
|
||||
@ -123,13 +125,14 @@
|
||||
</DataGridTemplateColumn.HeaderTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<DataGridTextColumn IsReadOnly="True" Header="序号" Binding="{Binding RowNumber}"></DataGridTextColumn>
|
||||
<DataGridTextColumn IsReadOnly="True" Header="物料编码" Binding="{Binding MatCode}"></DataGridTextColumn>
|
||||
<DataGridTextColumn IsReadOnly="True" Header="物料名称" Binding="{Binding MatName}"></DataGridTextColumn>
|
||||
<DataGridTextColumn IsReadOnly="True" Header="物料规格" Binding="{Binding MatSpec}"></DataGridTextColumn>
|
||||
|
||||
<DataGridTextColumn IsReadOnly="True" Header="客户" Binding="{Binding MatCustomer}"></DataGridTextColumn>
|
||||
<DataGridTextColumn IsReadOnly="True" Header="供应商" Binding="{Binding MatSupplier}"></DataGridTextColumn>
|
||||
<DataGridTextColumn IsReadOnly="True" Header="物料条码" Binding="{Binding MatSN}"></DataGridTextColumn>
|
||||
<DataGridTextColumn Header="物料编码" Binding="{Binding MatCode}"></DataGridTextColumn>
|
||||
<DataGridTextColumn Header="物料名称" MaxWidth="150" Binding="{Binding MatName}"></DataGridTextColumn>
|
||||
<DataGridTextColumn Header="物料规格" MaxWidth="150" Binding="{Binding MatSpec}"></DataGridTextColumn>
|
||||
<DataGridTextColumn Header="物料批次" MaxWidth="150" Binding="{Binding MatBatch}"></DataGridTextColumn>
|
||||
<DataGridTextColumn Header="物料数量" MaxWidth="150" Binding="{Binding MatQty}"></DataGridTextColumn>
|
||||
<DataGridTextColumn Header="供应商" MaxWidth="150" Binding="{Binding MatSupplier}"></DataGridTextColumn>
|
||||
<DataGridTextColumn Header="客户" MaxWidth="150" Binding="{Binding MatCustomer}"></DataGridTextColumn>
|
||||
<DataGridTextColumn Header="物料SN" Binding="{Binding MatSN}"></DataGridTextColumn>
|
||||
<DataGridTextColumn IsReadOnly="True" Header="打印次数" Binding="{Binding PrintTimes}"></DataGridTextColumn>
|
||||
<DataGridTextColumn IsReadOnly="True" Header="更新人" Binding="{Binding ModifyUser}"></DataGridTextColumn>
|
||||
<DataGridTextColumn IsReadOnly="True" Header="更新时间" Binding="{Binding ModifyTime ,StringFormat='yyyy-MM-dd HH:mm:ss'}"></DataGridTextColumn>
|
||||
@ -190,95 +193,6 @@
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Border>
|
||||
<!--<Border Grid.Row="1" Margin="3" Background="AliceBlue" CornerRadius="3" Padding="0">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.8*"></RowDefinition>
|
||||
<RowDefinition Height="8*"></RowDefinition>
|
||||
<RowDefinition Height="0.7*"></RowDefinition>
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel Grid.Row="0" Orientation="Horizontal">
|
||||
<Button MinHeight="40" FontSize="18" Margin="5" Command="{Binding BtnExportCommand}"
|
||||
Content=" 导 出" FontFamily="{StaticResource IconFont}"
|
||||
Style="{StaticResource ButtonWarning}" Background="DarkOrange">
|
||||
</Button>
|
||||
</StackPanel>
|
||||
<DataGrid Grid.Row="1"
|
||||
SelectedCellsChanged="DataGrid_SelectedCellsChanged"
|
||||
ItemsSource="{Binding DataGridItemSource}"
|
||||
RowHeight="39"
|
||||
AutoGenerateColumns="False"
|
||||
FontSize="13">
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn Header="序号" Binding="{Binding RowNumber}"></DataGridTextColumn>
|
||||
<DataGridTextColumn Header="接口地址" Binding="{Binding RequestUrl}"></DataGridTextColumn>
|
||||
<DataGridTextColumn Header="设备IP" Binding="{Binding DeviceIp}"></DataGridTextColumn>
|
||||
<DataGridTextColumn Header="请求参数" Binding="{Binding RequestBody}" MaxWidth="100"></DataGridTextColumn>
|
||||
<DataGridTextColumn Header="QueryString" Binding="{Binding QueryString}" MaxWidth="100"></DataGridTextColumn>
|
||||
<DataGridTextColumn Header="请求时间" Binding="{Binding RequestTime,StringFormat='yyyy-MM-dd HH:mm:ss'}"></DataGridTextColumn>
|
||||
<DataGridTextColumn Header="返回参数" Binding="{Binding ResponseJson}" MaxWidth="100"></DataGridTextColumn>
|
||||
<DataGridTextColumn Header="返回时间" Binding="{Binding ResponseTime,StringFormat='yyyy-MM-dd HH:mm:ss'}"></DataGridTextColumn>
|
||||
<DataGridTextColumn Header="耗时(ms)" Binding="{Binding ExecutionTime}"></DataGridTextColumn>
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
|
||||
<Grid Grid.Row="2">
|
||||
<Border CornerRadius="3" Background="Transparent" VerticalAlignment="Center" >
|
||||
<Grid HorizontalAlignment="Stretch" Margin="0" VerticalAlignment="Top" Width="Auto" MinHeight="26">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="5*"></ColumnDefinition>
|
||||
<ColumnDefinition Width="5*"></ColumnDefinition>
|
||||
<ColumnDefinition Width="5*"></ColumnDefinition>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<StackPanel Orientation="Horizontal" Margin="5">
|
||||
<TextBlock FontSize="14" Text="共"></TextBlock>
|
||||
<TextBlock FontSize="14" Text="{Binding TotalCount ,FallbackValue=0}"></TextBlock>
|
||||
<TextBlock FontSize="14" Text="条记录 "></TextBlock>
|
||||
<TextBlock FontSize="14" Text="第"></TextBlock>
|
||||
<TextBlock FontSize="14" Text="{Binding CurrentPage,FallbackValue=0}"></TextBlock>
|
||||
<TextBlock FontSize="14" Text="/"></TextBlock>
|
||||
<TextBlock FontSize="14" Text="{Binding MaxPage,FallbackValue=0}"></TextBlock>
|
||||
<TextBlock FontSize="14" Text="页"></TextBlock>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Grid.Column="1">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions >
|
||||
<RowDefinition Height="30"></RowDefinition>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="auto"/>
|
||||
<ColumnDefinition Width="auto"/>
|
||||
<ColumnDefinition Width="auto"/>
|
||||
<ColumnDefinition Width="auto"/>
|
||||
<ColumnDefinition Width="auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button BorderBrush="Transparent" Background="Transparent" Grid.Column="0" Name="btnFirst" Content="首页" Foreground="Black" FontSize="14"
|
||||
Command="{Binding BtnFirstPageCommand}"/>
|
||||
<Button BorderBrush="Transparent" Background="Transparent" Grid.Column="1" Name="btnPrev" Content="上一页" FontSize="14"
|
||||
Command="{Binding BtnPrePageCommand}"/>
|
||||
<TextBox BorderBrush="Transparent" Grid.Column="2" FontSize="14" MinWidth="50" HorizontalAlignment="Center" VerticalAlignment="Center" Cursor="IBeam" IsEnabled="False"
|
||||
Text ="{Binding CurrentPage}" TextAlignment="Center"
|
||||
|
||||
/>
|
||||
<Button BorderBrush="Transparent" Background="Transparent" Grid.Column="3" Name="btnNext" Content="下一页" FontSize="14"
|
||||
Command="{Binding BtnNextPageCommand}"/>
|
||||
<Button BorderBrush="Transparent" Background="Transparent" Grid.Column="4" Name="btnLast" Content="末页" FontSize="14"
|
||||
Command="{Binding BtnLastPageCommand}"/>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
|
||||
</Grid>
|
||||
</Border>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Border>-->
|
||||
|
||||
</Grid>
|
||||
</Border>
|
||||
</pi:UserControlBase>
|
||||
|
@ -4,6 +4,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
@ -37,7 +38,7 @@ namespace 货架标准上位机
|
||||
if (viewModel.SelectedataGridItem != null)
|
||||
{
|
||||
viewModel.SelectedataGridItem.IsSelected = !viewModel.SelectedataGridItem.IsSelected;
|
||||
dataGrid.UnselectAllCells();//取消选中 避免手动点击check选项时反选失败 和重新点击该项时反选失败
|
||||
//dataGrid.UnselectAllCells();
|
||||
}
|
||||
|
||||
}
|
||||
@ -73,5 +74,20 @@ namespace 货架标准上位机
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void DataGrid_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
// 获取点击的 DataGridRow
|
||||
var hitTestInfo = VisualTreeHelper.HitTest(dataGrid, e.GetPosition(dataGrid));
|
||||
if (hitTestInfo.VisualHit is DataGridRow row)
|
||||
{
|
||||
// 现在你可以根据 row 做一些事情,比如选中它(如果它还没有被选中)
|
||||
if (!row.IsSelected)
|
||||
{
|
||||
row.IsSelected = true;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -79,7 +79,7 @@
|
||||
Text=" 库 位 :" FontSize="18" ></TextBlock>
|
||||
<TextBox Grid.Row="2" Grid.Column="1" Text="{Binding StoreCode}"
|
||||
VerticalAlignment="Center" HorizontalAlignment="Left"
|
||||
FontSize="18" MinWidth="160" ></TextBox>
|
||||
FontSize="18" MinWidth="120" ></TextBox>
|
||||
|
||||
<Button Style="{StaticResource ButtonSuccess}"
|
||||
Command="{Binding BtnSearchCommand}"
|
||||
|
@ -24,7 +24,9 @@ namespace 货架标准上位机
|
||||
{
|
||||
InitializeComponent();
|
||||
this.DataContext = viewModel;
|
||||
viewModel.RequestClose += OnRequestClose;
|
||||
|
||||
viewModel.TrueClose += OnTrueClose;
|
||||
viewModel.FalseClose += OnFalseClose;
|
||||
}
|
||||
|
||||
private void closeClick(object sender, RoutedEventArgs e)
|
||||
@ -46,10 +48,16 @@ namespace 货架标准上位机
|
||||
}
|
||||
}
|
||||
|
||||
private void OnRequestClose()
|
||||
private void OnTrueClose()
|
||||
{
|
||||
this.DialogResult = true;
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private void OnFalseClose()
|
||||
{
|
||||
this.DialogResult = false;
|
||||
this.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -70,6 +70,7 @@
|
||||
hc:BorderElement.CornerRadius="15"
|
||||
Grid.Column="7" MinHeight="40" FontSize="18" Content=" 重置" FontFamily="{StaticResource IconFont}" Margin="0,0,0,-10" >
|
||||
</Button>
|
||||
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
@ -95,6 +96,12 @@
|
||||
<Button MinHeight="40" FontSize="18" Margin="5" Command="{Binding BtnPauseCommand}"
|
||||
Content="暂停发料" FontFamily="{StaticResource IconFont}" Background="CadetBlue" Foreground="White">
|
||||
</Button>
|
||||
<Button hc:BorderElement.CornerRadius="10"
|
||||
HorizontalAlignment="Right"
|
||||
Background="Green" Foreground="White"
|
||||
Grid.Column="1" MinHeight="40" FontSize="22" Content="按物料发料" FontFamily="{StaticResource IconFont}"
|
||||
Command="{Binding BtnOutOrderCommand}">
|
||||
</Button>
|
||||
</StackPanel>
|
||||
<DataGrid Grid.Row="1" SelectedCellsChanged="DataGrid_SelectedCellsChanged"
|
||||
SelectedItem="{Binding SelectedataGridItem}"
|
||||
|
@ -55,12 +55,12 @@
|
||||
<RowDefinition></RowDefinition>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Button
|
||||
<!--<Button
|
||||
hc:BorderElement.CornerRadius="15"
|
||||
Background="Green" Foreground="White"
|
||||
Grid.Column="1" MinHeight="45" FontSize="28" Content=" 发 料 单" FontFamily="{StaticResource IconFont}"
|
||||
Command="{Binding BtnOutOrderCommand}">
|
||||
</Button>
|
||||
</Button>-->
|
||||
<StackPanel Grid.Column="2" VerticalAlignment="Center" Orientation="Horizontal">
|
||||
<TextBlock FontSize="26" Text="发料单号:">
|
||||
</TextBlock>
|
||||
@ -127,24 +127,34 @@
|
||||
ItemsSource="{Binding DataGridItemSource}"
|
||||
RowHeight="40"
|
||||
AutoGenerateColumns="False" FontSize="15">
|
||||
<DataGrid.Resources>
|
||||
<!--<DataGrid.Resources>
|
||||
<货架标准上位机:WorkItemBackgroundConverter x:Key="converter"/>
|
||||
</DataGrid.Resources>
|
||||
<DataGrid.RowStyle>
|
||||
<Style TargetType="DataGridRow">
|
||||
<Setter Property="Background" Value="{Binding Path=IsSended, Converter={StaticResource converter}}"/>
|
||||
</Style>
|
||||
</DataGrid.RowStyle>
|
||||
|
||||
</DataGrid.RowStyle>-->
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn IsReadOnly="True" Header="序号" Binding="{Binding RowNumber}"></DataGridTextColumn>
|
||||
<DataGridTextColumn IsReadOnly="True" Header="库位" Binding="{Binding StoreCode}"></DataGridTextColumn>
|
||||
<DataGridTextColumn IsReadOnly="True" Header="物料编码" Binding="{Binding MatCode}"></DataGridTextColumn>
|
||||
<DataGridTextColumn IsReadOnly="True" Header="物料名称" Binding="{Binding MatName}"></DataGridTextColumn>
|
||||
<DataGridTextColumn IsReadOnly="True" Header="数量" Binding="{Binding MatQty}"></DataGridTextColumn>
|
||||
<DataGridTextColumn IsReadOnly="True" Header="规格" Binding="{Binding MatSpec}"></DataGridTextColumn>
|
||||
<DataGridTextColumn IsReadOnly="True" Header="批次" Binding="{Binding MatBatch}"></DataGridTextColumn>
|
||||
<DataGridTextColumn IsReadOnly="True" Header="已取料" Binding="{Binding IsSendedStr}"></DataGridTextColumn>
|
||||
<DataGridTemplateColumn Header="" CanUserResize="False" Width="50">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel>
|
||||
<Ellipse Width="20" Height="20" Fill="LightGreen" Visibility="{Binding IsSended,Converter={StaticResource Boolean2VisibilityConverter}}"></Ellipse>
|
||||
<Ellipse Width="20" Height="20" Fill="Gray" Visibility="{Binding IsSended,Converter={StaticResource Boolean2VisibilityReConverter}}"></Ellipse>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<DataGridTextColumn IsReadOnly="True" Header="已取料" Binding="{Binding IsSended,Converter={StaticResource Boolean2StringConverter},ConverterParameter=否;是}"></DataGridTextColumn>
|
||||
<DataGridTextColumn MaxWidth="100" IsReadOnly="True" Header="序号" Binding="{Binding RowNumber}"></DataGridTextColumn>
|
||||
<DataGridTextColumn Header="库位" Binding="{Binding StoreCode}"></DataGridTextColumn>
|
||||
<DataGridTextColumn MaxWidth="150" Header="物料编码" Binding="{Binding MatCode}"></DataGridTextColumn>
|
||||
<DataGridTextColumn MaxWidth="150" Header="物料名称" Binding="{Binding MatName}"></DataGridTextColumn>
|
||||
<DataGridTextColumn MaxWidth="150" Header="数量" Binding="{Binding MatQty}"></DataGridTextColumn>
|
||||
<DataGridTextColumn MaxWidth="150" Header="规格" Binding="{Binding MatSpec}"></DataGridTextColumn>
|
||||
<DataGridTextColumn MaxWidth="150" Header="批次" Binding="{Binding MatBatch}"></DataGridTextColumn>
|
||||
|
||||
<DataGridTextColumn IsReadOnly="False" Header="物料SN" Binding="{Binding MatSN}"></DataGridTextColumn>
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
|
@ -112,25 +112,36 @@
|
||||
ItemsSource="{Binding DataGridItemSource}"
|
||||
RowHeight="40"
|
||||
AutoGenerateColumns="False" FontSize="15">
|
||||
<DataGrid.Resources>
|
||||
<!--<DataGrid.Resources>
|
||||
<货架标准上位机:WorkItemBackgroundConverter x:Key="converter"/>
|
||||
</DataGrid.Resources>
|
||||
<DataGrid.RowStyle>
|
||||
<Style TargetType="DataGridRow">
|
||||
<Setter Property="Background" Value="{Binding Path=IsStocktaking, Converter={StaticResource converter}}"/>
|
||||
</Style>
|
||||
</DataGrid.RowStyle>
|
||||
</DataGrid.RowStyle>-->
|
||||
|
||||
<DataGrid.Columns>
|
||||
<DataGridTemplateColumn Header="" CanUserResize="False" Width="50">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel>
|
||||
<Ellipse Width="20" Height="20" Fill="LightGreen" Visibility="{Binding IsStocktaking,Converter={StaticResource Boolean2VisibilityConverter}}"></Ellipse>
|
||||
<Ellipse Width="20" Height="20" Fill="Gray" Visibility="{Binding IsStocktaking,Converter={StaticResource Boolean2VisibilityReConverter}}"></Ellipse>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<DataGridTextColumn IsReadOnly="True" Header="已盘点" Binding="{Binding IsStocktaking,Converter={StaticResource Boolean2StringConverter},ConverterParameter=否;是}"></DataGridTextColumn>
|
||||
<DataGridTextColumn IsReadOnly="True" Header="序号" Binding="{Binding RowNumber}"></DataGridTextColumn>
|
||||
<DataGridTextColumn IsReadOnly="True" Header="库位" Binding="{Binding StoreCode}"></DataGridTextColumn>
|
||||
<DataGridTextColumn IsReadOnly="True" Header="物料编码" Binding="{Binding MatCode}"></DataGridTextColumn>
|
||||
<DataGridTextColumn IsReadOnly="True" Header="物料名称" Binding="{Binding MatName}"></DataGridTextColumn>
|
||||
<DataGridTextColumn IsReadOnly="True" Header="数量" Binding="{Binding MatQty}"></DataGridTextColumn>
|
||||
<DataGridTextColumn IsReadOnly="True" Header="规格" Binding="{Binding MatSpec}"></DataGridTextColumn>
|
||||
<DataGridTextColumn IsReadOnly="True" Header="批次" Binding="{Binding MatBatch}"></DataGridTextColumn>
|
||||
<DataGridTextColumn IsReadOnly="True" Header="已取料" Binding="{Binding IsStocktakingStr}"></DataGridTextColumn>
|
||||
<DataGridTextColumn IsReadOnly="False" Header="物料SN" Binding="{Binding MatSN}"></DataGridTextColumn>
|
||||
<DataGridTextColumn MaxWidth="150" Header="物料编码" Binding="{Binding MatCode}"></DataGridTextColumn>
|
||||
<DataGridTextColumn MaxWidth="150" Header="物料名称" Binding="{Binding MatName}"></DataGridTextColumn>
|
||||
<DataGridTextColumn MaxWidth="150" Header="物料数量" Binding="{Binding MatQty}"></DataGridTextColumn>
|
||||
<DataGridTextColumn MaxWidth="150" Header="盘点数量" Binding="{Binding StocktakingQty}"></DataGridTextColumn>
|
||||
<DataGridTextColumn MaxWidth="150" Header="规格" Binding="{Binding MatSpec}"></DataGridTextColumn>
|
||||
<DataGridTextColumn MaxWidth="150" Header="批次" Binding="{Binding MatBatch}"></DataGridTextColumn>
|
||||
<DataGridTextColumn Header="物料SN" Binding="{Binding MatSN}"></DataGridTextColumn>
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
</Grid>
|
||||
|
Reference in New Issue
Block a user