parent
9f8c3344df
commit
9dff42b945
@ -0,0 +1,16 @@
|
||||
using SlnMesnac.Model.domain;
|
||||
using SlnMesnac.Repository.service.@base;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SlnMesnac.Repository.service
|
||||
{
|
||||
public interface Idata3_TableService: IBaseService<data3_Table>
|
||||
{
|
||||
Task<List<data3_Table>> GetTableListAsync(DateTime start, DateTime end);
|
||||
|
||||
Task<bool> UpdateAsync(data3_Table record);
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
using SlnMesnac.Model.domain;
|
||||
using SlnMesnac.Repository.service.@base;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SlnMesnac.Repository.service
|
||||
{
|
||||
public interface Idata4_TableService: IBaseService<data4_Table>
|
||||
{
|
||||
Task<List<data4_Table>> GetTableListAsync(DateTime start, DateTime end);
|
||||
|
||||
Task<bool> UpdateAsync(data4_Table record);
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
using ATC_MaterialBind.Entity;
|
||||
using SlnMesnac.Model.domain;
|
||||
using SlnMesnac.Repository.service.@base;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SlnMesnac.Repository.service
|
||||
{
|
||||
public interface IStationQualityInfoService : IBaseService<StationQualityInfo>
|
||||
{
|
||||
Task<List<StationQualityInfo>> GetProductQuality(string P_Bar_Code, string P_StationCode);
|
||||
string GetNewMainBarcode();
|
||||
}
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
using SlnMesnac.Model.domain;
|
||||
using SlnMesnac.Repository.service.@base;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SlnMesnac.Repository.service
|
||||
{
|
||||
public interface Isys_dict_dataService: IBaseService<sys_dict_data>
|
||||
{
|
||||
Task<List<sys_dict_data>> GetProductType();
|
||||
}
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
using SlnMesnac.Model.domain;
|
||||
using SlnMesnac.Repository.service.@base;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace SlnMesnac.Repository.service
|
||||
{
|
||||
public interface IT_RP_ProductChangeInfoService: IBaseService<T_RP_ProductChangeInfo>
|
||||
{
|
||||
T_RP_ProductChangeInfo GetProductType();
|
||||
}
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
using SlnMesnac.Model.domain;
|
||||
using SlnMesnac.Repository.service.@base;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SlnMesnac.Repository.service
|
||||
{
|
||||
public interface IT_RP_StationPara_130Service: IBaseService<T_RP_StationPara_130>
|
||||
{
|
||||
Task<bool> AddTaskAsync(List<T_RP_StationPara_130> record);
|
||||
Task<T_RP_StationPara_130> GetResultAsync(string jpcode );
|
||||
Task<bool> UpdateResultAsync(T_RP_StationPara_130 T_RP_StationPara_130);
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
using SlnMesnac.Model.domain;
|
||||
using SlnMesnac.Repository.service.@base;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SlnMesnac.Repository.service
|
||||
{
|
||||
public interface IT_RP_StationPara_160_1Service: IBaseService<T_RP_StationPara_160_1>
|
||||
{
|
||||
Task<bool> AddTaskAsync(List<T_RP_StationPara_160_1> record);
|
||||
Task<T_RP_StationPara_160_1> GetResultAsync(string jpcode);
|
||||
Task<bool> UpdateResultAsync(T_RP_StationPara_160_1 T_RP_StationPara_130);
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
using SlnMesnac.Model.domain;
|
||||
using SlnMesnac.Repository.service.@base;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SlnMesnac.Repository.service
|
||||
{
|
||||
public interface IT_SY_TraceStateService: IBaseService<T_SY_TraceState>
|
||||
{
|
||||
T_SY_TraceState GetByProductCode(string ProductCode);
|
||||
Task<bool> InsertAsync(T_SY_TraceState record);
|
||||
|
||||
Task<bool> UpdateAsync(T_SY_TraceState record);
|
||||
|
||||
T_SY_TraceState GetRelationShipByProductCodeAndIsdis(string ProductCode, string MaterialType, string StationCode);
|
||||
}
|
||||
}
|
@ -0,0 +1,53 @@
|
||||
using Microsoft.Extensions.Logging;
|
||||
using SlnMesnac.Common;
|
||||
using SlnMesnac.Model.domain;
|
||||
using SlnMesnac.Repository.service.@base;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq.Expressions;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SlnMesnac.Repository.service.Impl
|
||||
{
|
||||
public class data3_TableServiceImpl : BaseServiceImpl<data3_Table>, Idata3_TableService
|
||||
{
|
||||
private Repository<data3_Table> _repository;
|
||||
private ILogger<data3_TableServiceImpl> _logger;
|
||||
public data3_TableServiceImpl(Repository<data3_Table> repository, ILogger<data3_TableServiceImpl> logger) :base(repository)
|
||||
{
|
||||
_repository = repository;
|
||||
_logger = logger;
|
||||
}
|
||||
public async Task<List<data3_Table>> GetTableListAsync(DateTime start,DateTime end)
|
||||
{
|
||||
List<data3_Table> list = null;
|
||||
try
|
||||
{
|
||||
Expression<Func<data3_Table, bool>> exp = x => true;
|
||||
exp = exp.And(x =>
|
||||
(x.flag != "F" && x.time >= start && x.time < end)
|
||||
);
|
||||
list = _repository.GetList(exp);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError($"量仪数据获取错误:{ex.Message}");
|
||||
}
|
||||
return list;
|
||||
}
|
||||
public async Task<bool> UpdateAsync(data3_Table record)
|
||||
{
|
||||
try
|
||||
{
|
||||
bool result = await _rep.UpdateAsync(record);
|
||||
return result;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError($"量仪数据获取错误:{ex.Message}");
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,54 @@
|
||||
using Microsoft.Extensions.Logging;
|
||||
using SlnMesnac.Common;
|
||||
using SlnMesnac.Model.domain;
|
||||
using SlnMesnac.Repository.service.@base;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq.Expressions;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SlnMesnac.Repository.service.Impl
|
||||
{
|
||||
public class data4_TableServiceImpl : BaseServiceImpl<data4_Table>, Idata4_TableService
|
||||
{
|
||||
private Repository<data4_Table> _repository;
|
||||
private ILogger<data4_TableServiceImpl> _logger;
|
||||
public data4_TableServiceImpl(Repository<data4_Table> repository, ILogger<data4_TableServiceImpl> logger) :base(repository)
|
||||
{
|
||||
_repository = repository;
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
public async Task<List<data4_Table>> GetTableListAsync(DateTime start ,DateTime end)
|
||||
{
|
||||
List<data4_Table> list = null;
|
||||
try
|
||||
{
|
||||
Expression<Func<data4_Table, bool>> exp = x => true;
|
||||
exp = exp.And(x =>
|
||||
(x.flag != "F" && x.time >= start && x.time < end)
|
||||
);
|
||||
list = _repository.GetList(exp);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError($"量仪数据获取错误:{ex.Message}");
|
||||
}
|
||||
return list;
|
||||
}
|
||||
public async Task<bool> UpdateAsync(data4_Table record)
|
||||
{
|
||||
try
|
||||
{
|
||||
bool result = await _rep.UpdateAsync(record);
|
||||
return result;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError($"量仪数据获取错误:{ex.Message}");
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,50 @@
|
||||
using ATC_MaterialBind.Entity;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using SlnMesnac.Model.domain;
|
||||
using SlnMesnac.Repository.service.@base;
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SlnMesnac.Repository.service.Impl
|
||||
{
|
||||
public class StationQualityInfoServiceImpl : BaseServiceImpl<StationQualityInfo>, IStationQualityInfoService
|
||||
{
|
||||
private Repository<StationQualityInfo> _repository;
|
||||
public StationQualityInfoServiceImpl(Repository<StationQualityInfo> repository ):base(repository)
|
||||
{
|
||||
_repository = repository;
|
||||
}
|
||||
|
||||
public async Task<List<StationQualityInfo>> GetProductQuality(string P_Bar_Code, string P_StationCode)
|
||||
{
|
||||
List<StationQualityInfo> stationQualityList = null;
|
||||
try
|
||||
{
|
||||
var parameter1 = new SugarParameter("@BarCode", P_Bar_Code);
|
||||
var parameter2 = new SugarParameter("@StationCode", P_StationCode);//ÉèÖÃΪoutput
|
||||
stationQualityList = _repository.Context.Ado.UseStoredProcedure().SqlQuery<StationQualityInfo>("pro_AllProductionQualityInfo", parameter1, parameter2);
|
||||
return stationQualityList;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return stationQualityList;
|
||||
}
|
||||
}
|
||||
public string GetNewMainBarcode()
|
||||
{
|
||||
try
|
||||
{
|
||||
var parameter1 = new SugarParameter("@Head", "M");
|
||||
var dt = _rep.Context.Ado.UseStoredProcedure().GetString("SP_Pro_GetNewMainBarcode", parameter1);
|
||||
return dt;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
throw;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
using ATC_MaterialBind.Entity;
|
||||
using SlnMesnac.Model.domain;
|
||||
using SlnMesnac.Repository.service.@base;
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SlnMesnac.Repository.service.Impl
|
||||
{
|
||||
public class sys_dict_dataServiceImpl : BaseServiceImpl<sys_dict_data>, Isys_dict_dataService
|
||||
{
|
||||
public sys_dict_dataServiceImpl(Repository<sys_dict_data> repository):base(repository)
|
||||
{
|
||||
}
|
||||
public async Task<List<sys_dict_data>> GetProductType()
|
||||
{
|
||||
List<sys_dict_data> ProductTypeList = null;
|
||||
try
|
||||
{
|
||||
ProductTypeList = _rep.GetList(x=>x.dictType == "productType");
|
||||
return ProductTypeList;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return ProductTypeList;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
using SlnMesnac.Model.domain;
|
||||
using SlnMesnac.Repository.service.@base;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SlnMesnac.Repository.service.Impl
|
||||
{
|
||||
public class T_RP_ProductChangeInfoServiceImpl : BaseServiceImpl<T_RP_ProductChangeInfo>, IT_RP_ProductChangeInfoService
|
||||
{
|
||||
public T_RP_ProductChangeInfoServiceImpl(Repository<T_RP_ProductChangeInfo> repository):base(repository)
|
||||
{
|
||||
|
||||
}
|
||||
public T_RP_ProductChangeInfo GetProductType()
|
||||
{
|
||||
T_RP_ProductChangeInfo t_RP_Product = null;
|
||||
t_RP_Product = _rep.GetFirst(x => x.id == 1);
|
||||
return t_RP_Product;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,67 @@
|
||||
using Microsoft.Extensions.Logging;
|
||||
using SlnMesnac.Common;
|
||||
using SlnMesnac.Model.domain;
|
||||
using SlnMesnac.Repository.service.@base;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq.Expressions;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SlnMesnac.Repository.service.Impl
|
||||
{
|
||||
|
||||
public class T_RP_StationPara_130ServiceImpl : BaseServiceImpl<T_RP_StationPara_130>, IT_RP_StationPara_130Service
|
||||
{
|
||||
private Repository<T_RP_StationPara_130> _repository;
|
||||
private ILogger<T_RP_StationPara_130ServiceImpl> _logger;
|
||||
public T_RP_StationPara_130ServiceImpl(Repository<T_RP_StationPara_130> repository, ILogger<T_RP_StationPara_130ServiceImpl> logger) :base(repository)
|
||||
{
|
||||
_repository = repository;
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
|
||||
public async Task<bool> AddTaskAsync(List<T_RP_StationPara_130> record)
|
||||
{
|
||||
try
|
||||
{
|
||||
bool result = await _repository.InsertRangeAsync(record);
|
||||
return result;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
public async Task<T_RP_StationPara_130> GetResultAsync(string jpcode)
|
||||
{
|
||||
try
|
||||
{
|
||||
Expression<Func<T_RP_StationPara_130, bool>> exp = x => true;
|
||||
exp = exp.And(x =>
|
||||
(x.scanbarcode == jpcode)
|
||||
);
|
||||
var result = await _repository.GetFirstAsync(exp);
|
||||
return result;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public async Task<bool> UpdateResultAsync(T_RP_StationPara_130 t_RP_StationPara_110_1)
|
||||
{
|
||||
try
|
||||
{
|
||||
bool result = await _repository.UpdateAsync(t_RP_StationPara_110_1);
|
||||
return result;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,65 @@
|
||||
using Microsoft.Extensions.Logging;
|
||||
using SlnMesnac.Common;
|
||||
using SlnMesnac.Model.domain;
|
||||
using SlnMesnac.Repository.service.@base;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq.Expressions;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SlnMesnac.Repository.service.Impl
|
||||
{
|
||||
public class T_RP_StationPara_160_1ServiceImpl : BaseServiceImpl<T_RP_StationPara_160_1>, IT_RP_StationPara_160_1Service
|
||||
{
|
||||
private Repository<T_RP_StationPara_160_1> _repository;
|
||||
private ILogger<T_RP_StationPara_160_1ServiceImpl> _logger;
|
||||
public T_RP_StationPara_160_1ServiceImpl(Repository<T_RP_StationPara_160_1> repository, ILogger<T_RP_StationPara_160_1ServiceImpl> logger) :base(repository)
|
||||
{
|
||||
_repository = repository;
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
public async Task<bool> AddTaskAsync(List<T_RP_StationPara_160_1> record)
|
||||
{
|
||||
try
|
||||
{
|
||||
bool result = await _repository.InsertRangeAsync(record);
|
||||
return result;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
public async Task<T_RP_StationPara_160_1> GetResultAsync(string jpcode)
|
||||
{
|
||||
try
|
||||
{
|
||||
Expression<Func<T_RP_StationPara_160_1, bool>> exp = x => true;
|
||||
exp = exp.And(x =>
|
||||
(x.scanbarcode == jpcode)
|
||||
);
|
||||
var result = await _repository.GetFirstAsync(exp);
|
||||
return result;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public async Task<bool> UpdateResultAsync(T_RP_StationPara_160_1 t_RP_StationPara_110_1)
|
||||
{
|
||||
try
|
||||
{
|
||||
bool result = await _repository.UpdateAsync(t_RP_StationPara_110_1);
|
||||
return result;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,92 @@
|
||||
using SlnMesnac.Model.domain;
|
||||
using SlnMesnac.Repository.service.@base;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SlnMesnac.Repository.service.Impl
|
||||
{
|
||||
public class T_SY_TraceStateServiceImpl : BaseServiceImpl<T_SY_TraceState>, IT_SY_TraceStateService
|
||||
{
|
||||
public T_SY_TraceStateServiceImpl(Repository<T_SY_TraceState> repository):base(repository)
|
||||
{
|
||||
}
|
||||
/// <summary>
|
||||
/// 根据条码查询实体
|
||||
/// </summary>
|
||||
/// <param name="ProductCode"></param>
|
||||
/// <returns></returns>
|
||||
public T_SY_TraceState GetByProductCode(string ProductCode)
|
||||
{
|
||||
T_SY_TraceState traceState = null;
|
||||
traceState = _rep.GetFirst(x => x.productbarcode == ProductCode);
|
||||
return traceState;
|
||||
}
|
||||
public T_SY_TraceState GetRelationShipByProductCodeAndIsdis(string ProductCode,string MaterialType,string StationCode)
|
||||
{
|
||||
T_SY_TraceState traceState = null;
|
||||
//控制器
|
||||
if (MaterialType == "0")
|
||||
{
|
||||
traceState = _rep.GetFirst(x => x.semibarcode2 == ProductCode && x.isdis == "0");
|
||||
}
|
||||
//壳体
|
||||
else if (MaterialType == "1")
|
||||
{
|
||||
if (StationCode == "80_3")
|
||||
{
|
||||
traceState = _rep.GetFirst(x => x.productbarcode == ProductCode && x.semibarcodeA != null && x.isdis == "0");
|
||||
}
|
||||
else if (StationCode == "120_2")
|
||||
{
|
||||
traceState = _rep.GetFirst(x => x.productbarcode == ProductCode && x.semibarcodeB != null && x.isdis == "0");
|
||||
}
|
||||
else if (StationCode == "150")
|
||||
{
|
||||
traceState = _rep.GetFirst(x => x.productbarcode == ProductCode && x.semibarcodeC != null && x.isdis == "0");
|
||||
}
|
||||
else
|
||||
{
|
||||
traceState = _rep.GetFirst(x => x.productbarcode == ProductCode && x.semibarcode2 != null && x.isdis == "0");
|
||||
}
|
||||
}
|
||||
//前盖
|
||||
else if (MaterialType == "2")
|
||||
{
|
||||
traceState = _rep.GetFirst(x => x.semibarcodeA == ProductCode && x.isdis == "0");
|
||||
}
|
||||
//静盘
|
||||
else if (MaterialType == "3")
|
||||
{
|
||||
traceState = _rep.GetFirst(x => x.semibarcodeB == ProductCode && x.isdis == "0");
|
||||
}
|
||||
//后盖
|
||||
else if (MaterialType == "4")
|
||||
{
|
||||
traceState = _rep.GetFirst(x => x.semibarcodeC == ProductCode && x.isdis == "0");
|
||||
}
|
||||
return traceState;
|
||||
}
|
||||
/// <summary>
|
||||
/// 修改
|
||||
/// </summary>
|
||||
/// <param name="record"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<bool> UpdateAsync(T_SY_TraceState record)
|
||||
{
|
||||
bool result = await _rep.UpdateAsync(record);
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 新增
|
||||
/// </summary>
|
||||
/// <param name="record"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<bool> InsertAsync(T_SY_TraceState record)
|
||||
{
|
||||
bool result = await _rep.InsertAsync(record);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,155 @@
|
||||
<UserControl x:Class="SlnMesnac.WPF.Page.IndexPage.ChangeType"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:SlnMesnac.WPF.Page.IndexPage"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="900" d:DesignWidth="1620" Background="#FF031B3D">
|
||||
<UserControl.Resources>
|
||||
|
||||
<!--<converters:IsCheckedConverter x:Key="IsCheckedConverter"/>-->
|
||||
|
||||
|
||||
<Style x:Key="DataGridTextColumnCenterSytle" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
<Setter Property="FontSize" Value="18"/>
|
||||
</Style>
|
||||
<Style TargetType="DataGrid">
|
||||
<!--网格线颜色-->
|
||||
<Setter Property="CanUserResizeColumns" Value="false"/>
|
||||
<Setter Property="Background" Value="#1152AC" />
|
||||
<Setter Property="BorderBrush" Value="#4285DE" />
|
||||
<Setter Property="Foreground" Value="White"/>
|
||||
<Setter Property="HorizontalGridLinesBrush">
|
||||
<Setter.Value>
|
||||
<SolidColorBrush Color="#4285DE"/>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Setter Property="VerticalGridLinesBrush">
|
||||
<Setter.Value>
|
||||
<SolidColorBrush Color="#1152AC"/>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
<!--列头标题栏样式-->
|
||||
<Style TargetType="DataGridColumnHeader">
|
||||
|
||||
<Setter Property="HorizontalContentAlignment" Value="Center" />
|
||||
<Setter Property="BorderBrush" Value="#dddddd" />
|
||||
<Setter Property="Height" Value="40"/>
|
||||
<Setter Property="FontSize" Value="18"/>
|
||||
<Setter Property="Background" Value="#4285DE"/>
|
||||
<Setter Property="Foreground" Value="White"/>
|
||||
</Style>
|
||||
|
||||
<!--单元格样式-->
|
||||
<Style TargetType="DataGridCell">
|
||||
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
|
||||
<Setter Property="BorderThickness" Value="0" />
|
||||
<Setter Property="BorderBrush" Value="#4285DE" />
|
||||
<Setter Property="Height" Value="40"/>
|
||||
<Setter Property="FontSize" Value="12"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type DataGridCell}">
|
||||
<Grid Background="{TemplateBinding Background}" >
|
||||
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsSelected" Value="True">
|
||||
<Setter Property="Background" Value="#4285DE"/>
|
||||
<Setter Property="Foreground" Value="#dddddd"/>
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
|
||||
</Style>
|
||||
</UserControl.Resources>
|
||||
|
||||
|
||||
<Border Grid.Row="1" Grid.Column="1" BorderBrush="#0288d1" BorderThickness="2" CornerRadius="5" Background="Transparent" Margin="5">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.8*"/>
|
||||
<RowDefinition Height="9*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Border Grid.Row="0" BorderBrush="#0288d1" BorderThickness="0,0,0,1" CornerRadius="0" Background="#1157b9" Margin="1,1,5,5" >
|
||||
<TextBlock Text="型号配置" FontSize="25" FontWeight="Bold" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"/>
|
||||
</Border>
|
||||
<Border Grid.Row="1" BorderBrush="Green" BorderThickness="0" CornerRadius="5" Background="Transparent" Margin="1,1,5,5">
|
||||
<Grid Margin="10,5">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="4*"/>
|
||||
<RowDefinition Height="4*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel Orientation="horizontal" Grid.Row="0" HorizontalAlignment="Left" VerticalAlignment="Center">
|
||||
<Label Content="组件型号:" FontSize="20" Foreground="White"/>
|
||||
<TextBox Text="{Binding ProductType,Mode=TwoWay}" Width="250" FontSize="20" Foreground="White" Margin="0 0 30 0" />
|
||||
<Label Content="壳体型号:" FontSize="20" Foreground="White"/>
|
||||
<TextBox Text="{Binding KTProductType,Mode=TwoWay}" Width="250" FontSize="20" Foreground="White" Margin="0 0 30 0" />
|
||||
<!--<Button
|
||||
Content="查 询" Command="{Binding QueryCommand}"
|
||||
Style="{StaticResource MaterialDesignRaisedSecondaryDarkButton}" Background="Green" Margin="0 0 100 0"/>
|
||||
<Button
|
||||
Content="同步型号" Command="{Binding SyncCommand}" Margin="40 0 0 0"
|
||||
Style="{StaticResource MaterialDesignRaisedSecondaryDarkButton}" Background="#FF1CC57B"/>-->
|
||||
</StackPanel>
|
||||
<UniformGrid Grid.Row="1">
|
||||
<DataGrid x:Name="listDataGrid" Grid.Row="0" ItemsSource="{Binding ChangeTypePanel}" Background="#00000000"
|
||||
ColumnHeaderHeight="35" Height="{Binding Path=ActualHeight, ElementName=ScanPanel}"
|
||||
RowHeight="50" AutoGenerateColumns="False" RowHeaderWidth="0" FontSize="20"
|
||||
GridLinesVisibility="None" ScrollViewer.HorizontalScrollBarVisibility="Auto"
|
||||
ScrollViewer.VerticalScrollBarVisibility="Auto" BorderThickness="0" CanUserAddRows="False" SelectionMode="Single" IsReadOnly="True"
|
||||
Foreground="White" >
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn Binding="{Binding dictValue}" Header="组件型号编号" Width="2*" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
|
||||
<DataGridTextColumn Binding="{Binding dictLabel}" Header="组件型号" Width="1*" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}" />
|
||||
<DataGridTemplateColumn Header="操作" Width="1.5*">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Button Content="切换" Height="40" Width="100" Command="{Binding DataContext.UpdateCommand, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"
|
||||
CommandParameter="{Binding dictLabel}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
|
||||
|
||||
</UniformGrid>
|
||||
<UniformGrid Grid.Row="2">
|
||||
<DataGrid x:Name="listDataGrid1" Grid.Row="0" ItemsSource="{Binding ChangeTypePanel}" Background="#00000000"
|
||||
ColumnHeaderHeight="35" Height="{Binding Path=ActualHeight, ElementName=ScanPanel}"
|
||||
RowHeight="50" AutoGenerateColumns="False" RowHeaderWidth="0" FontSize="20"
|
||||
GridLinesVisibility="None" ScrollViewer.HorizontalScrollBarVisibility="Auto"
|
||||
ScrollViewer.VerticalScrollBarVisibility="Auto" BorderThickness="0" CanUserAddRows="False" SelectionMode="Single" IsReadOnly="True"
|
||||
Foreground="White" >
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn Binding="{Binding dictValue}" Header="壳体型号编号" Width="2*" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
|
||||
<DataGridTextColumn Binding="{Binding dictLabel}" Header="壳体型号" Width="1*" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}" />
|
||||
<DataGridTemplateColumn Header="操作" Width="1.5*">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Button Content="切换" Height="40" Width="100" Command="{Binding DataContext.UpdateCommand, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"
|
||||
CommandParameter="{Binding dictLabel}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
|
||||
|
||||
</UniformGrid>
|
||||
|
||||
</Grid>
|
||||
</Border>
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
|
||||
</UserControl>
|
@ -0,0 +1,198 @@
|
||||
<UserControl x:Class="SlnMesnac.WPF.Page.IndexPage.MaterialBind"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:SlnMesnac.WPF.Page.IndexPage" xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
|
||||
xmlns:converters="clr-namespace:SlnMesnac.WPF.Converter.Generate"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="1080" d:DesignWidth="1920" Background="#FF031B3D">
|
||||
|
||||
<UserControl.Resources>
|
||||
<converters:ConfigToDynamicGridViewConverter x:Key="ConfigToDynamicGridViewConverter"/>
|
||||
<DataTemplate x:Key="LogMsgTemplate">
|
||||
<TextBlock Text="{Binding}" FontSize="20" Foreground="White" TextWrapping="Wrap" MaxWidth="800"/>
|
||||
</DataTemplate>
|
||||
<DataTemplate x:Key="FlightTemplate">
|
||||
<StackPanel Margin="10,0,0,0">
|
||||
<Button Content="{Binding StationName}" Foreground="Black"/>
|
||||
</StackPanel>
|
||||
|
||||
</DataTemplate>
|
||||
</UserControl.Resources>
|
||||
<Grid Margin="1 5 1 0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<Border Grid.Row="0" Grid.Column="0" BorderBrush="#0288d1" BorderThickness="1" CornerRadius="5" Background="Transparent" Margin="3,1,5,5">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="9*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Border Grid.Row="0" BorderBrush="#0288d1" BorderThickness="0,0,0,1" CornerRadius="0" Background="#1157b9" Margin="1,1,3,5" >
|
||||
<TextBlock Text="扫描信息" FontSize="20" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center" FontWeight="Bold"/>
|
||||
</Border>
|
||||
<!--扫描信息-->
|
||||
<Border Grid.Row="1" BorderBrush="#0288d1" BorderThickness="0" CornerRadius="5" Background="Transparent" Margin="1,1,3,5">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="6*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
|
||||
<Border BorderThickness="0" Background="Transparent" CornerRadius="5" Margin="10,10,0,0" Grid.ColumnSpan="2">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.7*"/>
|
||||
|
||||
<RowDefinition Height="1.7*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel Grid.Row="0" Grid.Column="0" Orientation="Horizontal" VerticalAlignment="Center" >
|
||||
<TextBlock Text="壳体条码" FontSize="22" Foreground="White" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="0 0 30 0"/>
|
||||
<TextBox FontSize="20" Text="{Binding KTBoxCode,Mode=TwoWay}" BorderBrush="White" Foreground="White" Width="250" IsReadOnly="True" Margin="0 0 10 0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" />
|
||||
<TextBox FontSize="20" Text="{Binding KTBoxTime,Mode=TwoWay}" BorderBrush="White" Foreground="White" Width="200" IsReadOnly="True" Margin="10 0 0 0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"/>
|
||||
<TextBlock Visibility="{Binding OKIsVis}" Grid.Row="0" Text="OK" FontSize="30" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="10 0 0 0" FontWeight="Bold" Foreground="LightGreen"></TextBlock>
|
||||
<TextBox FontSize="20" Text="{Binding OKCount,Mode=TwoWay}" BorderBrush="White" Foreground="White" Width="60" IsReadOnly="True" Margin="10 0 0 0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"/>
|
||||
<Button Content="清 空" Command="{Binding ResetCommand}" Background="#FF1CC57B" Width="50" Margin="5 0 0 0"/>
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Row="1" Grid.Column="0" Orientation="Horizontal" VerticalAlignment="Center" >
|
||||
<TextBlock x:Name="tb_MaterialCode" Text="组件条码" FontSize="22" Foreground="White" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="0 0 30 0"/>
|
||||
<TextBox FontSize="20" Text="{Binding ZJBoxCode,Mode=TwoWay}" BorderBrush="White" Foreground="White" Width="250" IsReadOnly="True" Margin="0 0 10 0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" />
|
||||
<TextBox FontSize="20" Text="{Binding ZJBoxTime,Mode=TwoWay}" BorderBrush="White" Foreground="White" Width="200" IsReadOnly="True" Margin="10 0 0 0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"/>
|
||||
<TextBlock Visibility="{Binding NGIsVis}" Grid.Row="1" Text="NG" FontSize="30" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="10 0 0 0" FontWeight="Bold" Foreground="OrangeRed"></TextBlock>
|
||||
<TextBox FontSize="20" Text="{Binding NGCount,Mode=TwoWay}" BorderBrush="White" Foreground="White" Width="60" IsReadOnly="True" Margin="10 0 0 0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"/>
|
||||
|
||||
</StackPanel>
|
||||
|
||||
<Border Grid.Row="2" BorderBrush="#1254AB" BorderThickness="2" Margin="0,10,0,0">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="2*"/>
|
||||
<RowDefinition Height="9*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Grid.Row="0" Text="日志信息" FontSize="18" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||||
|
||||
<ScrollViewer Grid.Row="1" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden">
|
||||
<ItemsControl ItemsSource="{Binding LogMessages}" ItemTemplate="{StaticResource LogMsgTemplate}" />
|
||||
</ScrollViewer>
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
<!--<StackPanel Grid.Row="2" Grid.RowSpan="2" Margin="0 40 0 0" >
|
||||
|
||||
<TextBlock Text="提示信息:" FontSize="22" Foreground="White"/>
|
||||
<ScrollViewer Grid.Row="1" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden">
|
||||
<ItemsControl ItemsSource="{Binding LogMessages}" ItemTemplate="{StaticResource LogMsgTemplate}" />
|
||||
</ScrollViewer>
|
||||
--><!--<TextBox FontSize="18" BorderBrush="White" BorderThickness="1"
|
||||
MinHeight="70" IsReadOnly="True" Foreground="{Binding MsgColor}" Margin="0 5 0 0"
|
||||
AcceptsReturn="True" Text="{Binding Message,Mode=TwoWay}"
|
||||
|
||||
TextWrapping="Wrap"
|
||||
VerticalScrollBarVisibility="Auto" Height="70" />--><!--
|
||||
</StackPanel>-->
|
||||
</Grid>
|
||||
</Border>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Grid>
|
||||
</Border>
|
||||
<Border Grid.Row="1" Grid.ColumnSpan="2" BorderBrush="#0288d1" BorderThickness="1" CornerRadius="5" Background="#FF031B3D" Margin="3,1,3,5">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="9*"/>
|
||||
|
||||
</Grid.RowDefinitions>
|
||||
<Border Grid.Row="0" BorderBrush="#0288d1" BorderThickness="0,0,0,1" CornerRadius="0" Background="Transparent" Margin="1,1,5,5" >
|
||||
<TextBlock Text="扫描记录" FontSize="20" FontWeight="Bold" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center" />
|
||||
</Border>
|
||||
|
||||
<!--计划列表-->
|
||||
<Border x:Name="ScanPanel" Grid.Row="1" Grid.Column="0" BorderBrush="#0288d1" BorderThickness="0" CornerRadius="5" Background="Transparent" Margin="1,1,5,5">
|
||||
|
||||
|
||||
|
||||
<Grid>
|
||||
<ListView Background="#FF031B3D" Foreground="White" FontSize="18" Height="{Binding Path=ActualHeight, ElementName=ScanPanel}" ItemsSource="{Binding TaskInfoDataGrid}" View="{Binding ColumnConfig,Converter={StaticResource ConfigToDynamicGridViewConverter}}">
|
||||
</ListView>
|
||||
<!--<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<DataGrid x:Name="dg_TaskInfo" Grid.Row="0" ItemsSource="{Binding TaskInfoDataGrid}" Background="#00000000"
|
||||
ColumnHeaderHeight="35" Height="{Binding Path=ActualHeight, ElementName=ScanPanel}"
|
||||
RowHeight="50" AutoGenerateColumns="False" RowHeaderWidth="0" FontSize="18"
|
||||
GridLinesVisibility="None" ScrollViewer.HorizontalScrollBarVisibility="Auto" LoadingRow="dgv_LoadingRow"
|
||||
ScrollViewer.VerticalScrollBarVisibility="Auto" BorderThickness="0" CanUserAddRows="False" SelectionMode="Single" IsReadOnly="True"
|
||||
Foreground="White" >
|
||||
<DataGrid.Columns>
|
||||
<DataGridTemplateColumn Width="55" Header="序号" >
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type DataGridRow}}, Path=Header}" FontSize="18" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="10,0,0,0"></TextBlock>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<DataGridTextColumn Binding="{Binding TaskNo}" Header="任务编号" Width="2*" />
|
||||
<DataGridTextColumn Binding="{Binding KBarCode}" Header="壳体条码" Width="2*" />
|
||||
<DataGridTextColumn Binding="{Binding QBarCode}" Header="前盖条码" Width="2*" />
|
||||
<DataGridTextColumn Binding="{Binding Station1}" Header="前盖轴封" Width="*" />
|
||||
<DataGridTextColumn Binding="{Binding Station2}" Header="曲轴压入转子" Width="*" />
|
||||
<DataGridTextColumn Binding="{Binding Station3}" Header="曲轴压入前盖" Width="*" />
|
||||
<DataGridTextColumn Binding="{Binding Station4}" Header="电机壳压轴承" Width="*" />
|
||||
<DataGridTextColumn Binding="{Binding Station5}" Header="前盖轴封检漏" Width="*" />
|
||||
<DataGridTextColumn Binding="{Binding Station6}" Header="转子充磁" Width="*" />
|
||||
<DataGridTextColumn Binding="{Binding RecordTime,StringFormat=\{0:yyyy-MM-dd HH:mm:ss\}}" Header="扫描时间" Width="1.7*" />
|
||||
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>-->
|
||||
</Grid>
|
||||
</Border>
|
||||
</Grid>
|
||||
</Border>
|
||||
<!--日志信息-->
|
||||
<Border Grid.Row="0" Grid.Column="1" BorderBrush="#0288d1" BorderThickness="1" CornerRadius="5" Background="#FF031B3D" Margin="3,1,3,5">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="9*"/>
|
||||
|
||||
</Grid.RowDefinitions>
|
||||
<Border Grid.Row="0" BorderBrush="#0288d1" BorderThickness="0,0,0,1" CornerRadius="0" Background="Transparent" Margin="1,1,1,5" >
|
||||
<Grid>
|
||||
<TextBlock Text="工位信息" FontSize="20" FontWeight="Bold" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center" />
|
||||
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
<Border Grid.Row="1" BorderBrush="#0288d1" BorderThickness="1" CornerRadius="10" Background="Transparent" Margin="5,1,5,5">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="3*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<StackPanel x:Name="stackpanel1">
|
||||
|
||||
</StackPanel>
|
||||
<!--<ScrollViewer HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden">
|
||||
<ItemsControl ItemsSource="{Binding StationQualityInfos}" ItemTemplate="{StaticResource FlightTemplate}"/>
|
||||
</ScrollViewer>-->
|
||||
|
||||
</Grid>
|
||||
</Border>
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
|
||||
</Grid>
|
||||
</UserControl>
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue