lvzb 1 year ago
parent
commit
a836fe52c9
  1. 5
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/Extends/MenBanReports/MenBanPrintInputDto.cs
  2. 5
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/Extends/ZhuHuBanReports/ZhuHuBanPrintInputDto.cs
  3. 3
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/MsgBaseData/PrintTemplateConfiguration/IPrintTemplateConfigurationService.cs
  4. 24
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/MsgBaseData/PrintTemplateConfiguration/PrintTemplateConfiguratioDto.cs
  5. 6
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/MsgCheck/BillM100s/Interfaces/IBillM100AppService.cs
  6. 2
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/PrintTable/Dtos/WaitPrintDto.cs
  7. 4
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/PrintTable/Interfaces/IWaitPrintAppService.cs
  8. 25
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/WY.NewJit.Application.Contracts.xml
  9. 28
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/MsgBaseData/PrintTemplateConfiguration/PrintTemplateConfigurationService.cs
  10. 148
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/MsgCheck/BillM100s/BillM100AppService.cs
  11. 29
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/MsgCheck/BillM100s/MenBanPackingRecService.cs
  12. 84
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/MsgCheck/BillM100s/ZhuHuBanPackingRecService.cs
  13. 98
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/PrintTable/WaitPrintAppService.cs
  14. 148
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/PrintTable/WaitPrintAppService_ZHB.cs
  15. 52
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/WY.NewJit.Application.xml
  16. 8
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain.Shared/Common/ExtMethod.cs
  17. 6
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain.Shared/Common/PagedAndSortedBase.cs
  18. 2
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain.Shared/PrintTable/BusinessTypeEnum.cs
  19. 2
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/Extends/PaiGe/MenBanReports/MenBanPackingList.cs
  20. 2
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/MsgCheck/Services/M100DomainService.cs
  21. 2
      vue/src/router/index.js
  22. 3
      vue/src/views/pg-fis/basedate/m100Online/RepetitionMB.vue
  23. 8
      vue/src/views/pg-fis/basedate/m100Online/RepetitionZHB.vue
  24. 143
      vue/src/views/pg-fis/basedate/m100Online/budaMB.vue
  25. 140
      vue/src/views/pg-fis/basedate/m100Online/budaZHB.vue
  26. 419
      vue/src/views/pg-fis/basedate/m100Online/normalPritIndex.vue
  27. 73
      vue/static/config.js

5
src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/Extends/MenBanReports/MenBanPrintInputDto.cs

@ -7,6 +7,11 @@ namespace WY.NewJit.Extends
{ {
public class MenBanPrintInputDto public class MenBanPrintInputDto
{ {
/// <summary>
/// 业务类型:1 门板 2 其它柱护板 3 柱护板
/// </summary>
public WY.NewJit.PrintTable.BusinessTypeEnum BusinessType { get; set; }
/// <summary> /// <summary>
/// 打印类型:0 顺序打印 1 补账打印 3 重新打印 /// 打印类型:0 顺序打印 1 补账打印 3 重新打印

5
src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/Extends/ZhuHuBanReports/ZhuHuBanPrintInputDto.cs

@ -21,6 +21,11 @@ namespace WY.NewJit.Extends
public class ZhuHuBanPrintInputDto public class ZhuHuBanPrintInputDto
{ {
/// <summary>
/// 业务类型:1 门板 2 其它柱护板 3 柱护板
/// </summary>
public WY.NewJit.PrintTable.BusinessTypeEnum BusinessType { get; set; }
/// <summary> /// <summary>
/// 打印类型:提供初次打印、重新打印、针对重新解析后单据的补打功能 /// 打印类型:提供初次打印、重新打印、针对重新解析后单据的补打功能

3
src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/MsgBaseData/PrintTemplateConfiguration/IPrintTemplateConfigurationService.cs

@ -5,5 +5,8 @@ namespace WY.NewJit.MsgBaseData
public interface IPrintTemplateConfigurationService public interface IPrintTemplateConfigurationService
{ {
Task<ListResultDto<string>> GetTypeListAsync(); Task<ListResultDto<string>> GetTypeListAsync();
Task<ListResultDto<GroupCodeNameDto>> GetGroupCodeNameListAsync();
} }
} }

24
src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/MsgBaseData/PrintTemplateConfiguration/PrintTemplateConfiguratioDto.cs

@ -34,4 +34,28 @@ namespace WY.NewJit.MsgBaseData
public virtual string TemplateName { get; set; } public virtual string TemplateName { get; set; }
} }
/// <summary>
/// 分组代码名称DTO
/// </summary>
[Serializable]
public class GroupCodeNameDto
{
/// <summary>
/// 分组名称
/// </summary>
public virtual int GroupCode { get; set; }
/// <summary>
/// 分组名称
/// </summary>
public virtual string GroupName { get; set; }
public GroupCodeNameDto(int groupCode, string groupName)
{
GroupCode = groupCode;
GroupName = groupName;
}
}
} }

6
src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/MsgCheck/BillM100s/Interfaces/IBillM100AppService.cs

@ -99,11 +99,11 @@ namespace WY.NewJit.MsgCheck
/// </summary> /// </summary>
/// <param name="input">生产线编号列表</param> /// <param name="input">生产线编号列表</param>
/// <returns>生产线超时情况</returns> /// <returns>生产线超时情况</returns>
Task<ListResultDto<TimeOutRemindResultDto>> ProductLineTimeoutRemind(TimeOutRemindInputDto input); //Task<ListResultDto<TimeOutRemindResultDto>> ProductLineTimeoutRemind(TimeOutRemindInputDto input);
Task<ListResultDto<TimeOutRemindResultDto>> ProductLineTimeoutRemind_New(TimeOutRemindInputDto input); Task<ListResultDto<TimeOutRemindResultDto>> ProductLineTimeoutRemind(TimeOutRemindInputDto input);
Task<PagedResultDto<ResultBillM100Dto>> GetReplenishPrintListAsync(QueryBillM100Dto input); //Task<PagedResultDto<ResultBillM100Dto>> GetReplenishPrintListAsync(QueryBillM100Dto input);

2
src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/PrintTable/Dtos/WaitPrintDto.cs

@ -15,6 +15,8 @@ namespace WY.NewJit.PrintTable
[Serializable] [Serializable]
public class WaitPrintDto public class WaitPrintDto
{ {
public Guid Id { get; set; }
/// <summary> /// <summary>
/// 对应M100的Id /// 对应M100的Id
/// </summary> /// </summary>

4
src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/PrintTable/Interfaces/IWaitPrintAppService.cs

@ -5,7 +5,6 @@ using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using Volo.Abp.Application.Dtos; using Volo.Abp.Application.Dtos;
using Volo.Abp.Uow; using Volo.Abp.Uow;
using WY.NewJit.PrintTable;
using WY.NewJit.PrintTable.Dtos; using WY.NewJit.PrintTable.Dtos;
namespace WY.NewJit.PrintTable namespace WY.NewJit.PrintTable
@ -13,6 +12,7 @@ namespace WY.NewJit.PrintTable
public interface IWaitPrintAppService public interface IWaitPrintAppService
{ {
Task<PagedResultDto<WaitPrintDto>> GetReplenishPrintListAsync(QueryReplenishPrintDto input); Task<PagedResultDto<WaitPrintDto>> GetReplenishPrintListAsync(QueryReplenishPrintDto input);
Task<bool> UpdatePrintDataStatus(List<Guid> ids, PrintTypeEnum printTypeEnum);
Task<PagedResultDto<WaitPrintDto>> GetReplenishPrintZHBListAsync(QueryReplenishPrintDto input);
} }
} }

25
src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/WY.NewJit.Application.Contracts.xml

@ -184,6 +184,11 @@
用于报表排序 用于报表排序
</summary> </summary>
</member> </member>
<member name="P:WY.NewJit.Extends.MenBanPrintInputDto.BusinessType">
<summary>
业务类型:1 门板 2 其它柱护板 3 柱护板
</summary>
</member>
<member name="P:WY.NewJit.Extends.MenBanPrintInputDto.PrintType"> <member name="P:WY.NewJit.Extends.MenBanPrintInputDto.PrintType">
<summary> <summary>
打印类型:0 顺序打印 1 补账打印 3 重新打印 打印类型:0 顺序打印 1 补账打印 3 重新打印
@ -538,6 +543,11 @@
数据结果类型 1 全部数据, 2 选中数据(仅重新打印时使用) 数据结果类型 1 全部数据, 2 选中数据(仅重新打印时使用)
</summary> </summary>
</member> </member>
<member name="P:WY.NewJit.Extends.ZhuHuBanPrintInputDto.BusinessType">
<summary>
业务类型:1 门板 2 其它柱护板 3 柱护板
</summary>
</member>
<member name="P:WY.NewJit.Extends.ZhuHuBanPrintInputDto.PrintType"> <member name="P:WY.NewJit.Extends.ZhuHuBanPrintInputDto.PrintType">
<summary> <summary>
打印类型:提供初次打印、重新打印、针对重新解析后单据的补打功能 打印类型:提供初次打印、重新打印、针对重新解析后单据的补打功能
@ -1446,6 +1456,21 @@
模板名称 模板名称
</summary> </summary>
</member> </member>
<member name="T:WY.NewJit.MsgBaseData.GroupCodeNameDto">
<summary>
分组代码名称DTO
</summary>
</member>
<member name="P:WY.NewJit.MsgBaseData.GroupCodeNameDto.GroupCode">
<summary>
分组名称
</summary>
</member>
<member name="P:WY.NewJit.MsgBaseData.GroupCodeNameDto.GroupName">
<summary>
分组名称
</summary>
</member>
<member name="T:WY.NewJit.MsgCheck.BillM100Dto"> <member name="T:WY.NewJit.MsgCheck.BillM100Dto">
<summary> <summary>
零件查询结果DTO 零件查询结果DTO

28
src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/MsgBaseData/PrintTemplateConfiguration/PrintTemplateConfigurationService.cs

@ -112,6 +112,34 @@ namespace WY.NewJit.MsgBaseData
} }
} }
/// <summary>
/// 根据筛选条件获取分页实体列表
/// </summary>
/// <param name="input">输入查询条件</param>
/// <param name="page">输入分页条件</param>
/// <returns>返回符合条件的排序分页列表</returns>
[HttpGet]
[UnitOfWork(false)]
[Route("group-list")]
public virtual async Task<ListResultDto<GroupCodeNameDto>> GetGroupCodeNameListAsync()
{
_logger.LogDebug(_errorMessagePrefix + "GetGroupCodeNameListAsync 进入");
ListResultDto<GroupCodeNameDto> ret = new ListResultDto<GroupCodeNameDto>();
try
{
var list = await _repository.GetListAsync();
ret.Item = list.GroupBy(itm => new { itm.GroupCode, itm.GroupName }).Select(r => new GroupCodeNameDto(r.Key.GroupCode, r.Key.GroupName)).ToList();
return ret;
}
catch (Exception ex)
{
ret.Status = false;
ret.Message = _errorMessagePrefix + "GetGroupCodeNameListAsync 执行出错:" + ex.Message;
_logger.LogError(ret.Message);
return ret;
}
}
#endregion #endregion
} }

148
src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/MsgCheck/BillM100s/BillM100AppService.cs

@ -1868,56 +1868,56 @@ select * from
/// </summary> /// </summary>
/// <param name="input">输入查询条件</param> /// <param name="input">输入查询条件</param>
/// <returns>返回符合条件的排序分页列表</returns> /// <returns>返回符合条件的排序分页列表</returns>
[HttpGet] //[HttpGet]
[UnitOfWork(false)] //[UnitOfWork(false)]
[Route("replenish-print-list")] //[Route("replenish-print-list")]
public virtual async Task<PagedResultDto<ResultBillM100Dto>> GetReplenishPrintListAsync(QueryBillM100Dto input) //public virtual async Task<PagedResultDto<ResultBillM100Dto>> GetReplenishPrintListAsync(QueryBillM100Dto input)
{ //{
_logger.LogDebug(_errorMessagePrefix + "GetReplenishPrintListAsync 进入"); // _logger.LogDebug(_errorMessagePrefix + "GetReplenishPrintListAsync 进入");
try // try
{ // {
input.CanNotPrint = null; //忽略不能打印 // input.CanNotPrint = null; //忽略不能打印
input.ZHBBillStatus = null; // input.ZHBBillStatus = null;
input.BillStatus = BillStatusEnum.Match; //单据状态是已解析未打印 // input.BillStatus = BillStatusEnum.Match; //单据状态是已解析未打印
input.IsNeedReplenishPrint = true; //只显示需要补打的记录 // input.IsNeedReplenishPrint = true; //只显示需要补打的记录
PagedResultDto<ResultBillM100Dto> ret = await QueryByConditionAsync(input, (PagedAndSortedBase)input); // PagedResultDto<ResultBillM100Dto> ret = await QueryByConditionAsync(input, (PagedAndSortedBase)input);
return ret; // return ret;
} // }
catch (Exception ex) // catch (Exception ex)
{ // {
string errMsg = _errorMessagePrefix + "GetReplenishPrintListAsync 执行出错:" + ex.Message; // string errMsg = _errorMessagePrefix + "GetReplenishPrintListAsync 执行出错:" + ex.Message;
_logger.LogError(errMsg); // _logger.LogError(errMsg);
return new PagedResultDto<ResultBillM100Dto>(0, new List<ResultBillM100Dto>()); // return new PagedResultDto<ResultBillM100Dto>(0, new List<ResultBillM100Dto>());
} // }
} //}
/// <summary> /// <summary>
/// 取柱护板补打列表(IsNeedReplenishPrint=true、单据状态BillStatus是未打印) /// 取柱护板补打列表(IsNeedReplenishPrint=true、单据状态BillStatus是未打印)
/// </summary> /// </summary>
/// <param name="input">输入查询条件</param> /// <param name="input">输入查询条件</param>
/// <returns>返回符合条件的排序分页列表</returns> /// <returns>返回符合条件的排序分页列表</returns>
[HttpGet] //[HttpGet]
[UnitOfWork(false)] //[UnitOfWork(false)]
[Route("replenish-print-zhb-list")] //[Route("replenish-print-zhb-list")]
public virtual async Task<PagedResultDto<ResultBillM100Dto>> GetReplenishPrintZHBListAsync(QueryBillM100Dto input) //public virtual async Task<PagedResultDto<ResultBillM100Dto>> GetReplenishPrintZHBListAsync(QueryBillM100Dto input)
{ //{
_logger.LogDebug(_errorMessagePrefix + "GetReplenishPrintZHBListAsync 进入"); // _logger.LogDebug(_errorMessagePrefix + "GetReplenishPrintZHBListAsync 进入");
try // try
{ // {
input.CanNotPrint = null; //忽略不能打印 // input.CanNotPrint = null; //忽略不能打印
input.BillStatus = null; // input.BillStatus = null;
input.ZHBBillStatus = ZHBBillStatusEnum.NotPrint; //柱护板状态是已解析未打印 // input.ZHBBillStatus = ZHBBillStatusEnum.NotPrint; //柱护板状态是已解析未打印
input.IsNeedReplenishPrint = true; //只显示需要补打的记录 // input.IsNeedReplenishPrint = true; //只显示需要补打的记录
PagedResultDto<ResultBillM100Dto> ret = await QueryZHBByConditionAsync(input, (PagedAndSortedBase)input); // PagedResultDto<ResultBillM100Dto> ret = await QueryZHBByConditionAsync(input, (PagedAndSortedBase)input);
return ret; // return ret;
} // }
catch (Exception ex) // catch (Exception ex)
{ // {
string errMsg = _errorMessagePrefix + "GetReplenishPrintZHBListAsync 执行出错:" + ex.Message; // string errMsg = _errorMessagePrefix + "GetReplenishPrintZHBListAsync 执行出错:" + ex.Message;
_logger.LogError(errMsg); // _logger.LogError(errMsg);
return new PagedResultDto<ResultBillM100Dto>(0, new List<ResultBillM100Dto>()); // return new PagedResultDto<ResultBillM100Dto>(0, new List<ResultBillM100Dto>());
} // }
} //}
#endregion #endregion
@ -2157,29 +2157,29 @@ select * from
/// </summary> /// </summary>
/// <param name="input">生产线编号列表</param> /// <param name="input">生产线编号列表</param>
/// <returns>生产线超时情况</returns> /// <returns>生产线超时情况</returns>
[UnitOfWork] //[UnitOfWork]
[HttpPost] //[HttpPost]
[Route("product-line-timeout-remind")] //[Route("product-line-timeout-remind")]
public virtual async Task<ListResultDto<TimeOutRemindResultDto>> ProductLineTimeoutRemind(TimeOutRemindInputDto input) //public virtual async Task<ListResultDto<TimeOutRemindResultDto>> ProductLineTimeoutRemind(TimeOutRemindInputDto input)
{ //{
List<TimeOutRemindResultDto> retLst = new List<TimeOutRemindResultDto>(); // List<TimeOutRemindResultDto> retLst = new List<TimeOutRemindResultDto>();
foreach (string plStr in input.ProductLineList) // foreach (string plStr in input.ProductLineList)
{ // {
TimeOutRemindResultDto retObj = new TimeOutRemindResultDto(); // TimeOutRemindResultDto retObj = new TimeOutRemindResultDto();
retObj.ProductLine = plStr; // retObj.ProductLine = plStr;
retObj.ConfigMinutes = _configuration[$"ConfigDic:ProductLineTimeoutRemind:{plStr}"].TryToInt() ?? 30; // retObj.ConfigMinutes = _configuration[$"ConfigDic:ProductLineTimeoutRemind:{plStr}"].TryToInt() ?? 30;
string maxSNStr = await _billM100Repository.Where(itm => itm.ProductLine == plStr).MaxAsync(itm => itm.SerialNumStr); // string maxSNStr = await _billM100Repository.Where(itm => itm.ProductLine == plStr).MaxAsync(itm => itm.SerialNumStr);
BillM100 lastBill = await _billM100Repository.FirstOrDefaultAsync(itm => itm.ProductLine == plStr && itm.SerialNumStr == maxSNStr); // BillM100 lastBill = await _billM100Repository.FirstOrDefaultAsync(itm => itm.ProductLine == plStr && itm.SerialNumStr == maxSNStr);
if (lastBill != null) // if (lastBill != null)
{ // {
retObj.LastReceiveTime = lastBill.ReceiveTime ?? ServerHelper.CurrentDateTime; // retObj.LastReceiveTime = lastBill.ReceiveTime ?? ServerHelper.CurrentDateTime;
retObj.TimeoutMinutes = MinuteDiff(retObj.LastReceiveTime, ServerHelper.CurrentDateTime); // retObj.TimeoutMinutes = MinuteDiff(retObj.LastReceiveTime, ServerHelper.CurrentDateTime);
} // }
retLst.Add(retObj); // retLst.Add(retObj);
} // }
return new ListResultDto<TimeOutRemindResultDto>(retLst); // return new ListResultDto<TimeOutRemindResultDto>(retLst);
} //}
/// <summary> /// <summary>
@ -2191,8 +2191,8 @@ select * from
/// <returns>生产线超时情况</returns> /// <returns>生产线超时情况</returns>
[UnitOfWork] [UnitOfWork]
[HttpPost] [HttpPost]
[Route("product-line-timeout-remind-new")] [Route("product-line-timeout-remind")]
public virtual async Task<ListResultDto<TimeOutRemindResultDto>> ProductLineTimeoutRemind_New(TimeOutRemindInputDto input) public virtual async Task<ListResultDto<TimeOutRemindResultDto>> ProductLineTimeoutRemind(TimeOutRemindInputDto input)
{ {
List<TimeOutRemindResultDto> retLst = new List<TimeOutRemindResultDto>(); List<TimeOutRemindResultDto> retLst = new List<TimeOutRemindResultDto>();
foreach (string plStr in input.ProductLineList) foreach (string plStr in input.ProductLineList)
@ -2204,7 +2204,7 @@ select * from
int maxSN2= await _waitPrintRepository.Where(itm => itm.ProductLine == plStr).MaxAsync(itm => itm.HostSN2); int maxSN2= await _waitPrintRepository.Where(itm => itm.ProductLine == plStr).MaxAsync(itm => itm.HostSN2);
WaitPrint lastitem = await _waitPrintRepository.FirstOrDefaultAsync(itm => itm.ProductLine == plStr && itm.HostSN2 == maxSN2); WaitPrint lastitem = await _waitPrintRepository.FirstOrDefaultAsync(itm => itm.ProductLine == plStr && itm.HostSN2 == maxSN2);
var cache = _timeoutCacheList.FirstOrDefault(itm => itm.ProductLine == plStr); var cache = _timeoutCacheList.FirstOrDefault(itm => itm.ProductLine == plStr);
if (lastitem != null) if (lastitem != null) //未打印表有数据
{ {
retObj.LastReceiveTime = lastitem.ReceiveTime ?? ServerHelper.CurrentDateTime; retObj.LastReceiveTime = lastitem.ReceiveTime ?? ServerHelper.CurrentDateTime;
retObj.TimeoutMinutes = MinuteDiff(retObj.LastReceiveTime, ServerHelper.CurrentDateTime); retObj.TimeoutMinutes = MinuteDiff(retObj.LastReceiveTime, ServerHelper.CurrentDateTime);
@ -2219,17 +2219,17 @@ select * from
_timeoutCacheList.Add(retObj); _timeoutCacheList.Add(retObj);
} }
} }
else else //未打印表没有数据
{ {
if (cache != null) if (cache != null)
{ {
retObj.LastReceiveTime = cache.LastReceiveTime; retObj.LastReceiveTime = cache.LastReceiveTime; //优先从缓存取
retObj.TimeoutMinutes = MinuteDiff(cache.LastReceiveTime, ServerHelper.CurrentDateTime); retObj.TimeoutMinutes = MinuteDiff(cache.LastReceiveTime, ServerHelper.CurrentDateTime);
} }
else else //缓存没有时从M100取
{ {
string maxSNStr = await _billM100Repository.Where(itm => itm.ProductLine == plStr).MaxAsync(itm => itm.SerialNumStr); int? maxHostSN2 = await _billM100Repository.Where(itm => itm.ProductLine == plStr).MaxAsync(itm => itm.HostSN2);
BillM100 lastBill = await _billM100Repository.FirstOrDefaultAsync(itm => itm.ProductLine == plStr && itm.SerialNumStr == maxSNStr); BillM100 lastBill = await _billM100Repository.FirstOrDefaultAsync(itm => itm.ProductLine == plStr && itm.HostSN2 == maxHostSN2);
if (lastBill != null) if (lastBill != null)
{ {
retObj.LastReceiveTime = lastBill.ReceiveTime ?? ServerHelper.CurrentDateTime; retObj.LastReceiveTime = lastBill.ReceiveTime ?? ServerHelper.CurrentDateTime;

29
src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/MsgCheck/BillM100s/MenBanPackingRecService.cs

@ -306,7 +306,7 @@ namespace Win.Sfs.SettleAccount.FISes
_strList.Add(string.Format("'{0}'", p)); _strList.Add(string.Format("'{0}'", p));
}); });
string str = string.Join(",", _strList.ToArray()); string str = string.Join(",", _strList.ToArray());
var wmsLst = _wmsRepository.GetListBySql<TB_BILL>(string.Format("select top 100 * from TB_BILL with(nolock) where (state=1 or state=2) and BillNum in ({0}) ", str)); var wmsLst = _wmsRepository.GetListBySql<TB_BILL>(string.Format("select top 100 * from TB_BILL with(nolock) where (state=1 or state=2) and BillNum in ({0}) ", str), true);
if (wmsLst.Count() == 0) //库存没有排序 if (wmsLst.Count() == 0) //库存没有排序
{ {
//调用库存系统接口 //调用库存系统接口
@ -332,40 +332,41 @@ namespace Win.Sfs.SettleAccount.FISes
double updRecCnt2 = await _lineSNDomianServic.SetMaxSN(ProductTypeEnum., curProductLine, "", curPrintDate, 0, null); //调用减号接口,没有上条记录时 单据号传0 double updRecCnt2 = await _lineSNDomianServic.SetMaxSN(ProductTypeEnum., curProductLine, "", curPrintDate, 0, null); //调用减号接口,没有上条记录时 单据号传0
} }
#endregion #endregion
//门板记录表更新成 已作废 状态
foreach (var itm in pairlist) foreach (var itm in pairlist)
{ {
itm.ReportStatus = WY.NewJit.Extends.PaiGe.ReportStatusEnum.; itm.ReportStatus = WY.NewJit.Extends.PaiGe.ReportStatusEnum.;
} }
await _menBanPackingListRepository.UpdateManyAsync(pairlist); await _menBanPackingListRepository.UpdateManyAsync(pairlist);
//批量改为未打印
var _childList = await _menBanPackingListRepository.Where(p => idList.Contains(p.Id)).SelectMany(p => p.Details).ToListAsync(); #region 删除已打印表、插入未打印表
var _child = _childList.Select(p => p.M100BillId).Distinct().ToList(); var mbRecLst = await _menBanPackingListRepository.Where(p => idList.Contains(p.Id)).SelectMany(p => p.Details).ToListAsync();
var _apList = await _alreadyPrintRepository.Where(p => _child.Contains(p.Id)).ToListAsync(); var alreadyPrintIdLst = mbRecLst.Select(p => p.M100BillId).Distinct().ToList(); //未打印\已打印表id列表
var _apList = await _alreadyPrintRepository.Where(p => alreadyPrintIdLst.Contains(p.Id)).ToListAsync();
List<WaitPrint> _wpList = new List<WaitPrint>(); List<WaitPrint> _wpList = new List<WaitPrint>();
foreach (var ap in _apList) foreach (var ap in _apList) //遍历已打印表
{ {
var item = await _waitPrintRepository.GetListAsync(r => r.HostSN2 == ap.HostSN2); var waitPrintLst = await _waitPrintRepository.GetListAsync(r => r.HostSN2 == ap.HostSN2 && r.BusinessType == ap.BusinessType);
if (item.Count == 0) if (waitPrintLst.Count == 0) //未打印表没有(对应已打印表)记录
{ {
var wp = ObjectMapper.Map<AlreadyPrint, WaitPrint>(ap); var wp = ObjectMapper.Map<AlreadyPrint, WaitPrint>(ap);
_wpList.Add(wp); _wpList.Add(wp);
} }
else if(item.Count==1) else if(waitPrintLst.Count == 1) //未打印表有一条记录
{ {
if(ap.BillStatus== BillStatusEnum.BreakNum&&item[0].BillStatus== BillStatusEnum.BreakNum) if (ap.BillStatus == BillStatusEnum.BreakNum && waitPrintLst[0].BillStatus == BillStatusEnum.BreakNum)
{ {
throw new BusinessException("1001", "未打印列表和已打印列表出现都是断号的情况号码未【"+ ap.HostSN2 + "】,不能报废!"); throw new BusinessException("1001", "未打印列表和已打印列表出现都是断号的情况号码未【" + ap.HostSN2 + "】,不能报废!");
} }
} }
else if (item.Count > 1) else if (waitPrintLst.Count > 1)
{ {
throw new BusinessException("1001", "未打印列表里出现大众顺序号重复号码为【"+ ap.HostSN2+ "】请检查后在报废!"); throw new BusinessException("1001", "未打印列表里出现大众顺序号重复号码为【"+ ap.HostSN2+ "】请检查后在报废!");
} }
} }
await _alreadyPrintRepository.DeleteManyAsync(_apList); await _alreadyPrintRepository.DeleteManyAsync(_apList);
await _waitPrintRepository.InsertManyAsync(_wpList); await _waitPrintRepository.InsertManyAsync(_wpList);
#endregion
} }
else else
{ {

84
src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/MsgCheck/BillM100s/ZhuHuBanPackingRecService.cs

@ -32,6 +32,7 @@ using WY.NewJit.Extends.PaiGe.WMS;
using WY.NewJit.Filter; using WY.NewJit.Filter;
using WY.NewJit.MsgBaseData; using WY.NewJit.MsgBaseData;
using WY.NewJit.MsgCheck; using WY.NewJit.MsgCheck;
using WY.NewJit.PrintTable;
namespace Win.Sfs.SettleAccount.FISes namespace Win.Sfs.SettleAccount.FISes
{ {
@ -58,18 +59,23 @@ namespace Win.Sfs.SettleAccount.FISes
//private readonly IRepository<ZHBPrintStatus, Guid> _zHBPrintStatusRepository; //private readonly IRepository<ZHBPrintStatus, Guid> _zHBPrintStatusRepository;
private readonly IRepository<PrintTemplateConfiguration, Guid> _printTemplateConfigurationRepository; private readonly IRepository<PrintTemplateConfiguration, Guid> _printTemplateConfigurationRepository;
private readonly IRepository<AlreadyPrint> _alreadyPrintRepository;
private readonly IRepository<WaitPrint> _waitPrintRepository;
/// <summary> /// <summary>
/// 柱护板装箱单仓储明细 /// 柱护板装箱单仓储明细
/// </summary> /// </summary>
public ZhuHuBanPackingRecService( public ZhuHuBanPackingRecService(
NewJitEfCoreRepository2<ZhuHuBanPackingList,Guid> ZhuHuBanPackingListRepository, NewJitEfCoreRepository2<ZhuHuBanPackingList,Guid> ZhuHuBanPackingListRepository,
IRepository<BillM100, Guid> billM100Repository, IRepository<BillM100, Guid> billM100Repository,
WMSDapperRepository wmsRepository, WMSDapperRepository wmsRepository,
LineSNDomianService lineSNDomianServic, LineSNDomianService lineSNDomianServic,
IRepository<FisTB_BILL_SCRAP> tbBillScrapRepository, IRepository<FisTB_BILL_SCRAP> tbBillScrapRepository,
//IRepository<ZHBPrintStatus, Guid> zHBPrintStatusRepository, //IRepository<ZHBPrintStatus, Guid> zHBPrintStatusRepository,
IRepository<PrintTemplateConfiguration, Guid> printTemplateConfigurationRepository IRepository<PrintTemplateConfiguration, Guid> printTemplateConfigurationRepository,
IRepository<AlreadyPrint> alreadyPrintRepository,
IRepository<WaitPrint> waitPrintRepository
) )
{ {
_wmsRepository = wmsRepository; _wmsRepository = wmsRepository;
@ -79,6 +85,8 @@ namespace Win.Sfs.SettleAccount.FISes
_tbBillScrapRepository = tbBillScrapRepository; _tbBillScrapRepository = tbBillScrapRepository;
//_zHBPrintStatusRepository = zHBPrintStatusRepository; //_zHBPrintStatusRepository = zHBPrintStatusRepository;
_printTemplateConfigurationRepository = printTemplateConfigurationRepository; _printTemplateConfigurationRepository = printTemplateConfigurationRepository;
_alreadyPrintRepository = alreadyPrintRepository;
_waitPrintRepository = waitPrintRepository;
} }
private void DelOrScrapWMSInterface(string billNum, bool isSynchronousMode = false) private void DelOrScrapWMSInterface(string billNum, bool isSynchronousMode = false)
@ -273,7 +281,7 @@ namespace Win.Sfs.SettleAccount.FISes
/// <returns>是否执行成功</returns> /// <returns>是否执行成功</returns>
[HttpPost] [HttpPost]
[Route("scrap")] [Route("scrap")]
[UnitOfWork(isTransactional: false)] [UnitOfWork]
virtual public async Task<List<string>> ScrapAsync(List<Guid> ids) virtual public async Task<List<string>> ScrapAsync(List<Guid> ids)
{ {
var selLst = await _ZhuHuBanPackingListRepository.Where(p => ids.Contains(p.Id)).ToListAsync(); var selLst = await _ZhuHuBanPackingListRepository.Where(p => ids.Contains(p.Id)).ToListAsync();
@ -311,7 +319,7 @@ namespace Win.Sfs.SettleAccount.FISes
_strList.Add(string.Format("'{0}'", p)); _strList.Add(string.Format("'{0}'", p));
}); });
string str = string.Join(",", _strList.ToArray()); string str = string.Join(",", _strList.ToArray());
var wmsLst = _wmsRepository.GetListBySql<TB_BILL>(string.Format("select * from TB_BILL where (state=1 or state=2) and BillNum in ({0}) ", str)); var wmsLst = _wmsRepository.GetListBySql<TB_BILL>(string.Format("select * from TB_BILL with(nolock) where (state=1 or state=2) and BillNum in ({0}) ", str), true);
if (wmsLst.Count() == 0) //库存没有排序 if (wmsLst.Count() == 0) //库存没有排序
{ {
//调用库存系统接口 //调用库存系统接口
@ -347,26 +355,54 @@ namespace Win.Sfs.SettleAccount.FISes
} }
#endregion #endregion
//打印记录表更新成 已作废 状态 //柱护板记录表更新成 已作废 状态
foreach (var itm in pairlist) foreach (var itm in pairlist)
{ {
itm.ReportStatus = WY.NewJit.Extends.PaiGe.ReportStatusEnum.; itm.ReportStatus = WY.NewJit.Extends.PaiGe.ReportStatusEnum.;
} }
await _ZhuHuBanPackingListRepository.UpdateManyAsync(pairlist); await _ZhuHuBanPackingListRepository.UpdateManyAsync(pairlist);
//批量改为未打印 ////m100批量改为未打印
var _childList = await _ZhuHuBanPackingListRepository.Where(p => idList.Contains(p.Id)).SelectMany(p => p.Details).ToListAsync(); //var _childList = await _ZhuHuBanPackingListRepository.Where(p => idList.Contains(p.Id)).SelectMany(p => p.Details).ToListAsync();
var _child = _childList.Select(p => p.M100BillId).Distinct().ToList(); //var _child = _childList.Select(p => p.M100BillId).Distinct().ToList();
var _lst1 = await _billM100Repository.Where(p => _child.Contains(p.Id)).ToListAsync(); //var _lst1 = await _billM100Repository.Where(p => _child.Contains(p.Id)).ToListAsync();
_lst1.ForEach(p => //_lst1.ForEach(p =>
//{
// p.SetZHBBillStatus(ZHBBillStatusEnum.NotPrint);
// p.PrintTime2 = null;
//});
//await _billM100Repository.UpdateManyAsync(_lst1);
//var types = await _ZhuHuBanPackingListRepository.Where(p => idList.Contains(p.Id)).Select(p => p.PartType).Distinct().ToListAsync();
//var groupName = await _printTemplateConfigurationRepository.FirstOrDefaultAsync(r => types.Contains(r.PartType));
//var vins = _childList.Select(p => p.VIN).Distinct().ToList();
////await _zHBPrintStatusRepository.DeleteAsync(r => vins.Contains(r.VIN) && r.GroupName == groupName.GroupName);
#region 删除已打印表、插入未打印表
var zhbRecLst = await _ZhuHuBanPackingListRepository.Where(p => idList.Contains(p.Id)).SelectMany(p => p.Details).ToListAsync();
var alreadyPrintIdLst = zhbRecLst.Select(p => p.M100BillId).Distinct().ToList(); //未打印\已打印表id列表
var _apList = await _alreadyPrintRepository.Where(p => alreadyPrintIdLst.Contains(p.Id)).ToListAsync();
List<WaitPrint> _wpList = new List<WaitPrint>();
foreach (var ap in _apList) //遍历已打印表
{ {
p.SetZHBBillStatus(ZHBBillStatusEnum.NotPrint); var waitPrintLst = await _waitPrintRepository.GetListAsync(r => r.HostSN2 == ap.HostSN2 && r.BusinessType == ap.BusinessType);
p.PrintTime2 = null; if (waitPrintLst.Count == 0) //未打印表没有(对应已打印表)记录
}); {
await _billM100Repository.UpdateManyAsync(_lst1); var wp = ObjectMapper.Map<AlreadyPrint, WaitPrint>(ap);
var types = await _ZhuHuBanPackingListRepository.Where(p => idList.Contains(p.Id)).Select(p => p.PartType).Distinct().ToListAsync(); _wpList.Add(wp);
var groupName = await _printTemplateConfigurationRepository.FirstOrDefaultAsync(r => types.Contains(r.PartType)); }
var vins = _childList.Select(p => p.VIN).Distinct().ToList(); else if (waitPrintLst.Count == 1) //未打印表有一条记录
//await _zHBPrintStatusRepository.DeleteAsync(r => vins.Contains(r.VIN) && r.GroupName == groupName.GroupName); {
if (ap.BillStatus == BillStatusEnum.BreakNum && waitPrintLst[0].BillStatus == BillStatusEnum.BreakNum)
{
throw new BusinessException("1001", "未打印列表和已打印列表出现都是断号的情况号码未【" + ap.HostSN2 + "】,不能报废!");
}
}
else if (waitPrintLst.Count > 1)
{
throw new BusinessException("1001", "未打印列表里出现大众顺序号重复号码为【" + ap.HostSN2 + "】请检查后在报废!");
}
}
await _alreadyPrintRepository.DeleteManyAsync(_apList);
await _waitPrintRepository.InsertManyAsync(_wpList);
#endregion
} }
else else
{ {

98
src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/PrintTable/WaitPrintAppService.cs

@ -1,6 +1,9 @@
using Microsoft.AspNetCore.Mvc; using Magicodes.ExporterAndImporter.Core;
using Magicodes.ExporterAndImporter.Excel;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using Shouldly;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Diagnostics; using System.Diagnostics;
@ -10,6 +13,7 @@ using System.Threading.Tasks;
using Volo.Abp; using Volo.Abp;
using Volo.Abp.Application.Dtos; using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services; using Volo.Abp.Application.Services;
using Volo.Abp.BlobStoring;
using Volo.Abp.Domain.Repositories; using Volo.Abp.Domain.Repositories;
using Volo.Abp.Uow; using Volo.Abp.Uow;
using WY.NewJit.Common; using WY.NewJit.Common;
@ -35,7 +39,7 @@ namespace WY.NewJit.PrintTable
{ {
get get
{ {
return System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "."; return System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + ".";
} }
} }
@ -105,6 +109,11 @@ namespace WY.NewJit.PrintTable
private readonly IRepository<PrintTemplateConfiguration, Guid> _printTemplateConfigurationRepository; private readonly IRepository<PrintTemplateConfiguration, Guid> _printTemplateConfigurationRepository;
private readonly M100DomainService _m100DomainService; private readonly M100DomainService _m100DomainService;
/// <summary>
/// BLOB存储
/// </summary>
private readonly IBlobContainer<OurFileContainer> _blobContainer;
#endregion #endregion
public WaitPrintAppService( public WaitPrintAppService(
@ -123,7 +132,9 @@ namespace WY.NewJit.PrintTable
IRepository<AlreadyPrint, Guid> alreadyPrintRepository, IRepository<AlreadyPrint, Guid> alreadyPrintRepository,
IRepository<ZhuHuBanPackingList, Guid> zhuHuBanPackingListRepository, IRepository<ZhuHuBanPackingList, Guid> zhuHuBanPackingListRepository,
IRepository<PrintTemplateConfiguration, Guid> printTemplateConfigurationRepository, IRepository<PrintTemplateConfiguration, Guid> printTemplateConfigurationRepository,
M100DomainService m100DomainService M100DomainService m100DomainService,
IBlobContainer<OurFileContainer> blobContainer
) )
{ {
_waitPrintRepository = waitPrintRepository; _waitPrintRepository = waitPrintRepository;
@ -142,6 +153,7 @@ namespace WY.NewJit.PrintTable
_zhuHuBanPackingListRepository = zhuHuBanPackingListRepository; _zhuHuBanPackingListRepository = zhuHuBanPackingListRepository;
_printTemplateConfigurationRepository = printTemplateConfigurationRepository; _printTemplateConfigurationRepository = printTemplateConfigurationRepository;
_m100DomainService = m100DomainService; _m100DomainService = m100DomainService;
_blobContainer = blobContainer;
} }
#region 私有方法 #region 私有方法
@ -205,11 +217,11 @@ namespace WY.NewJit.PrintTable
{ {
where += string.Format(" and PrintType = {0}", ((int)input.PrintType).ToString()); where += string.Format(" and PrintType = {0}", ((int)input.PrintType).ToString());
} }
if (input.HostSNBegin != null) if (input.HostSNBegin.HasValue())
{ {
where += string.Format(" and HostSN >= {0}", input.HostSNBegin); where += string.Format(" and HostSN >= {0}", input.HostSNBegin);
} }
if (input.HostSNEnd != null) if (input.HostSNEnd.HasValue())
{ {
where += string.Format(" and HostSN <= {0}", input.HostSNEnd); where += string.Format(" and HostSN <= {0}", input.HostSNEnd);
} }
@ -272,10 +284,10 @@ namespace WY.NewJit.PrintTable
ret.TotalCount = await GetEntityCountAsync("FisWaitPrint", where); ret.TotalCount = await GetEntityCountAsync("FisWaitPrint", where);
//计算分页 //计算分页
int fromRec = page.SkipCount; int skipNum = page.SkipCount;
int ToRec = page.SkipCount + page.MaxResultCount; int takeNum = page.MaxResultCount;
var lst = await GetEntityListFromToAsync<WaitPrintDto>("FisWaitPrint", where, "HostSN2", fromRec, ToRec); var lst = await GetEntityListFromToAsync<WaitPrintDto>("FisWaitPrint", where, "HostSN2", skipNum, takeNum);
ret.Items = lst; ret.Items = lst;
return ret; return ret;
} }
@ -761,18 +773,20 @@ namespace WY.NewJit.PrintTable
[Route("wait-print-list")] [Route("wait-print-list")]
public virtual async Task<PagedResultDto<WaitPrintDto>> GetWaitPrintListAsync(QueryWaitPrintDto input) public virtual async Task<PagedResultDto<WaitPrintDto>> GetWaitPrintListAsync(QueryWaitPrintDto input)
{ {
_logger.LogDebug(_errorMessagePrefix + "GetWaitPrintListAsync 进入"); _logger.LogDebug(_errorMessagePrefix + "GetListAsync 进入");
try try
{ {
PagedResultDto<WaitPrintDto> ret = new PagedResultDto<WaitPrintDto>(); PagedResultDto<WaitPrintDto> ret = new PagedResultDto<WaitPrintDto>();
if (input.BusinessType == BusinessTypeEnum.MenBan|| input.BusinessType == BusinessTypeEnum.OtherZhuHuBan || input.BusinessType == BusinessTypeEnum.ZhuHuBan) if (input.BusinessType == BusinessTypeEnum.MenBan
|| input.BusinessType == BusinessTypeEnum.OtherZhuHuBan
|| input.BusinessType == BusinessTypeEnum.AC_ZhuHuBan)
{ {
ret = await QueryByConditionAsync(input, (PagedAndSortedBase)input); ret = await QueryByConditionAsync(input, (PagedAndSortedBase)input);
//} }
//else if (input.BusinessType == BusinessTypeEnum.OtherZhuHuBan || input.BusinessType == BusinessTypeEnum.ZhuHuBan) //else if (input.BusinessType == BusinessTypeEnum.OtherZhuHuBan || input.BusinessType == BusinessTypeEnum.ZhuHuBan)
//{ //{
// ret = await QueryZHBByConditionAsync(input, (PagedAndSortedBase)input); // ret = await QueryZHBByConditionAsync(input, (PagedAndSortedBase)input);
} //}
else else
{ {
throw new BusinessException("1001", "请传入正确的BusinessType参数!"); throw new BusinessException("1001", "请传入正确的BusinessType参数!");
@ -781,7 +795,7 @@ namespace WY.NewJit.PrintTable
} }
catch (Exception ex) catch (Exception ex)
{ {
string errMsg = _errorMessagePrefix + "GetWaitPrintListAsync 执行出错:" + ex.Message; string errMsg = _errorMessagePrefix + "GetListAsync 执行出错:" + ex.Message;
_logger.LogError(errMsg); _logger.LogError(errMsg);
return new PagedResultDto<WaitPrintDto>(0, new List<WaitPrintDto>()); return new PagedResultDto<WaitPrintDto>(0, new List<WaitPrintDto>());
} }
@ -903,7 +917,7 @@ namespace WY.NewJit.PrintTable
return ret; return ret;
} }
bool allMatch = billLst.All(itm => itm.BillStatus == BillStatusEnum.Match); bool allMatch = billLst.All(itm => itm.BillStatus == BillStatusEnum.Match);
if (allMatch) if (!allMatch)
{ {
ret.Message = "选择要补打的单据中必须全部是已解析的报文!"; ret.Message = "选择要补打的单据中必须全部是已解析的报文!";
ret.Status = false; ret.Status = false;
@ -1195,32 +1209,52 @@ namespace WY.NewJit.PrintTable
} }
/// <summary> /// <summary>
/// 修改未打印列表状态 /// 导出信息
/// </summary> /// </summary>
/// <param name="ids"></param> /// <param name="input">导出查询条件</param>
/// <param name="printTypeEnum"></param> /// <returns>执行成功返回真</returns>
/// <returns></returns> [UnitOfWork(false)]
[HttpGet] [HttpPost]
[UnitOfWork] [Route("export")]
[Route("update-print-data-status")] public virtual async Task<ObjectResultDto<string>> ExportAsync(QueryWaitPrintDto input)
public virtual async Task<bool> UpdatePrintDataStatus(List<Guid> ids, PrintTypeEnum printTypeEnum)
{ {
_logger.LogDebug(_errorMessagePrefix + "UpdatePrintDataStatus 进入"); _logger.LogDebug(_errorMessagePrefix + "ExportAsync 进入");
bool result = true; ObjectResultDto<string> ret = new ObjectResultDto<string>();
try try
{ {
var updatelist = await _waitPrintRepository.GetListAsync(r => ids.Contains(r.Id)); PagedResultDto<WaitPrintDto> query = new PagedResultDto<WaitPrintDto>();
updatelist.ForEach(r => r.PrintType = printTypeEnum);
await _waitPrintRepository.UpdateManyAsync(updatelist); if (input.BusinessType == BusinessTypeEnum.MenBan
|| input.BusinessType == BusinessTypeEnum.OtherZhuHuBan
|| input.BusinessType == BusinessTypeEnum.AC_ZhuHuBan)
{
input.MaxResultCount = 50000;
query = await QueryByConditionAsync(input, (PagedAndSortedBase)input);
}
else
{
throw new BusinessException("1001", "请传入正确的BusinessType参数!");
}
List<WaitPrintDto> items = query.Items.ToList();
//将实体列表转换成excel文件流
IExporter exporter = new ExcelExporter();
byte[] byteArr = await exporter.ExportAsByteArray<WaitPrintDto>(items);
byteArr.ShouldNotBeNull();
//将excel文件流保存到服务器端文件系统
string fileName = string.Format("未打印表_{0}.xlsx", Guid.NewGuid().ToString());
await _blobContainer.SaveAsync(fileName, byteArr);
ret.Item = fileName;
return ret;
} }
catch (Exception ex) catch (Exception ex)
{ {
string errMsg = _errorMessagePrefix + "UpdatePrintDataStatus 执行出错:" + ex.Message; ret.Status = false;
_logger.LogError(errMsg); ret.Message = _errorMessagePrefix + "ExportAsync 执行出错:" + ex.Message;
result = false; _logger.LogError(ret.Message);
return result; return ret;
} }
return result;
} }
} }
} }

148
src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/PrintTable/WaitPrintAppService_ZHB.cs

@ -743,7 +743,7 @@ namespace WY.NewJit.PrintTable
} }
else if (input.GroupName == "3") else if (input.GroupName == "3")
{ {
busiType = BusinessTypeEnum.ZhuHuBan; busiType = BusinessTypeEnum.AC_ZhuHuBan;
} }
else else
{ {
@ -791,6 +791,21 @@ namespace WY.NewJit.PrintTable
#endregion #endregion
#region 柱护板公有方法 #region 柱护板公有方法
/// <summary>
/// 取柱护板补打列表(IsNeedReplenishPrint=true、单据状态BillStatus是未打印)
/// </summary>
/// <param name="input">输入查询条件</param>
/// <returns>返回符合条件的排序分页列表</returns>
[HttpGet]
[UnitOfWork(false)]
[Route("replenish-print-zhb-list")]
public virtual async Task<PagedResultDto<WaitPrintDto>> GetReplenishPrintZHBListAsync(QueryReplenishPrintDto input)
{
return await GetReplenishPrintListAsync(input);
}
/// <summary> /// <summary>
/// 打印前检查大众顺序号是否断号 /// 打印前检查大众顺序号是否断号
/// </summary> /// </summary>
@ -812,12 +827,16 @@ namespace WY.NewJit.PrintTable
[UnitOfWork] [UnitOfWork]
[HttpPost] [HttpPost]
[Route("save-group-zhuhuban-report")] [Route("save-group-zhuhuban-report")]
public virtual async Task<ObjectResultDto<List<Guid>>> SaveGroupZhuHuBanReport(ZhuHuBanPrintInputDto input) public virtual async Task<ObjectResultDto<ZhuHuBanPrintResultDto>> SaveGroupZhuHuBanReport(ZhuHuBanPrintInputDto input)
{ {
_logger.LogDebug(_errorMessagePrefix + "SaveGroupZhuHuBanReport 进入"); _logger.LogDebug(_errorMessagePrefix + "SaveGroupZhuHuBanReport 进入");
List<Guid> retLst = new List<Guid>(); //List<Guid> retLst = new List<Guid>();
ObjectResultDto<List<Guid>> ret = new ObjectResultDto<List<Guid>>(); //ObjectResultDto<List<Guid>> ret = new ObjectResultDto<List<Guid>>();
ZhuHuBanPrintResultDto retObj = new ZhuHuBanPrintResultDto();
ObjectResultDto<ZhuHuBanPrintResultDto> ret = new ObjectResultDto<ZhuHuBanPrintResultDto>(retObj);
ret.Status = false; ret.Status = false;
using (var uow = _unitOfWorkManager.Begin(requiresNew: true, isTransactional: true, isolationLevel: System.Data.IsolationLevel.Unspecified)) using (var uow = _unitOfWorkManager.Begin(requiresNew: true, isTransactional: true, isolationLevel: System.Data.IsolationLevel.Unspecified))
{ {
@ -974,6 +993,9 @@ namespace WY.NewJit.PrintTable
//加载柱护板缓存列表 //加载柱护板缓存列表
_zhbCacheList = _materialExtRepository.Where(itm => itm.MaterialType == "2").ToList(); //取柱护板零件 _zhbCacheList = _materialExtRepository.Where(itm => itm.MaterialType == "2").ToList(); //取柱护板零件
//加载M100零件缓存
_m100PartDicCache = await _m100DomainService.GetM100PartDic(billLst.Select(itm => itm.M100Id).ToList());
long maxBillNum = 0; //全局唯一装箱单号 long maxBillNum = 0; //全局唯一装箱单号
DateTime printTime = ServerHelper.CurrentDateTime; DateTime printTime = ServerHelper.CurrentDateTime;
@ -1087,9 +1109,125 @@ namespace WY.NewJit.PrintTable
} //补打if } //补打if
//按大众顺序号排序
foreach (var reportMainObj in reportMainLst)
{
List<ZhuHuBanPackingRec> recLst = reportMainObj.Details;
if (recLst == null)
continue;
reportMainObj.Details = recLst.OrderBy(itm => itm.HostSN2).ToList();
}
#region 返回结果格式转换
//实体 转 DTO
List<ZhuHuBanPackingListDto> targetLst = ObjectMapper.Map<List<ZhuHuBanPackingList>, List<ZhuHuBanPackingListDto>>(reportMainLst);
//补充空行
foreach (var masterObj in targetLst)
{
int trueCnt = masterObj.Details.Count;
int planCnt = 0;
switch (masterObj.PartType)
{
case "A上C上":
case "A柱下A中":
case "B柱上":
case "B柱下":
case "后轮上装饰板":
planCnt = 24;
break;
case "D柱":
planCnt = 12;
break;
default:
planCnt = 24;
break;
}
if (trueCnt > planCnt)
{
throw new Exception($"实际打印行数{trueCnt}超过每页总行数{planCnt}, 底盘起{masterObj.BeginVin}底盘止{masterObj.EndVin}");
}
int diffCnt = planCnt - trueCnt;
for (int i = 0; i < diffCnt; i++)
{
ZhuHuBanPackingRecDto dtlObj = new ZhuHuBanPackingRecDto();
masterObj.Details.Add(dtlObj);
}
}
//子表BillNum赋值, BillNum填充空格, SN赋值
foreach (var masterObj in targetLst)
{
masterObj.BillNum = GetTrueString(masterObj.BillNum);
int sn = 1;
foreach (var detailObj in masterObj.Details)
{
detailObj.BillNum = masterObj.BillNum;
detailObj.KNR = GetTrueString(detailObj.KNR);
detailObj.KNR = detailObj.KNR.Replace(" ", "").Replace("\n", "").Replace("\r", "").Replace("/n", "").Replace("/r", "");
detailObj.sn = sn++;
detailObj.VIN = detailObj.VIN.TryToRight(6); //底盘号返回后六位
//客户要求显示零件描述,替换之前的零件编码
detailObj.PartCode = detailObj.MaterialDescription;
detailObj.PartCode2 = detailObj.MaterialDescription2;
detailObj.MaterialDescription = null;
detailObj.MaterialDescription2 = null;
}
}
retObj.MasterList_AC = targetLst.Where(itm => itm.PartType == "A上C上").ToList();
if (retObj.MasterList_AC.Count == 0) retObj.IsVisibleAC = false;
foreach (var masterObj in retObj.MasterList_AC)
{
retObj.DetailList_AC.AddRange(masterObj.Details);
masterObj.Details = null;
}
retObj.MasterList_AA = targetLst.Where(itm => itm.PartType == "A柱下A中").ToList();
if (retObj.MasterList_AA.Count == 0) retObj.IsVisibleAA = false;
foreach (var masterObj in retObj.MasterList_AA)
{
retObj.DetailList_AA.AddRange(masterObj.Details);
masterObj.Details = null;
}
retObj.MasterList_BS = targetLst.Where(itm => itm.PartType == "B柱上").ToList();
if (retObj.MasterList_BS.Count == 0) retObj.IsVisibleBS = false;
foreach (var masterObj in retObj.MasterList_BS)
{
retObj.DetailList_BS.AddRange(masterObj.Details);
masterObj.Details = null;
}
retObj.MasterList_BX = targetLst.Where(itm => itm.PartType == "B柱下").ToList();
if (retObj.MasterList_BX.Count == 0) retObj.IsVisibleBX = false;
foreach (var masterObj in retObj.MasterList_BX)
{
retObj.DetailList_BX.AddRange(masterObj.Details);
masterObj.Details = null;
}
retObj.MasterList_D = targetLst.Where(itm => itm.PartType == "D柱").ToList();
if (retObj.MasterList_D.Count == 0) retObj.IsVisibleD = false;
foreach (var masterObj in retObj.MasterList_D)
{
retObj.DetailList_D.AddRange(masterObj.Details);
masterObj.Details = null;
}
retObj.MasterList_HL = targetLst.Where(itm => itm.PartType == "后轮上装饰板").ToList();
if (retObj.MasterList_HL.Count == 0) retObj.IsVisibleHL = false;
foreach (var masterObj in retObj.MasterList_HL)
{
retObj.DetailList_HL.AddRange(masterObj.Details);
masterObj.Details = null;
}
#endregion
await uow.CompleteAsync(); await uow.CompleteAsync();
ret.Status = true; ret.Status = true;
ret.Item = retLst; ret.Item = retObj;
return ret; return ret;
} }
catch (Exception ex) catch (Exception ex)

52
src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/WY.NewJit.Application.xml

@ -893,6 +893,14 @@
<param name="page">输入分页条件</param> <param name="page">输入分页条件</param>
<returns>返回符合条件的排序分页列表</returns> <returns>返回符合条件的排序分页列表</returns>
</member> </member>
<member name="M:WY.NewJit.MsgBaseData.PrintTemplateConfigurationService.GetGroupCodeNameListAsync">
<summary>
根据筛选条件获取分页实体列表
</summary>
<param name="input">输入查询条件</param>
<param name="page">输入分页条件</param>
<returns>返回符合条件的排序分页列表</returns>
</member>
<member name="T:WY.NewJit.MsgCheck.BillM100AppService"> <member name="T:WY.NewJit.MsgCheck.BillM100AppService">
<summary> <summary>
M100单据管理应用服务实现 M100单据管理应用服务实现
@ -1014,20 +1022,6 @@
<param name="billLst"></param> <param name="billLst"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:WY.NewJit.MsgCheck.BillM100AppService.GetReplenishPrintListAsync(WY.NewJit.MsgCheck.QueryBillM100Dto)">
<summary>
取门板补打列表(IsNeedReplenishPrint=true、单据状态BillStatus是未打印)
</summary>
<param name="input">输入查询条件</param>
<returns>返回符合条件的排序分页列表</returns>
</member>
<member name="M:WY.NewJit.MsgCheck.BillM100AppService.GetReplenishPrintZHBListAsync(WY.NewJit.MsgCheck.QueryBillM100Dto)">
<summary>
取柱护板补打列表(IsNeedReplenishPrint=true、单据状态BillStatus是未打印)
</summary>
<param name="input">输入查询条件</param>
<returns>返回符合条件的排序分页列表</returns>
</member>
<member name="M:WY.NewJit.MsgCheck.BillM100AppService.GetListAsync(WY.NewJit.MsgCheck.QueryBillM100Dto)"> <member name="M:WY.NewJit.MsgCheck.BillM100AppService.GetListAsync(WY.NewJit.MsgCheck.QueryBillM100Dto)">
<summary> <summary>
根据筛选条件获取分页实体列表 根据筛选条件获取分页实体列表
@ -1080,13 +1074,6 @@
<returns>执行成功返回真</returns> <returns>执行成功返回真</returns>
</member> </member>
<member name="M:WY.NewJit.MsgCheck.BillM100AppService.ProductLineTimeoutRemind(WY.NewJit.MsgCheck.TimeOutRemindInputDto)"> <member name="M:WY.NewJit.MsgCheck.BillM100AppService.ProductLineTimeoutRemind(WY.NewJit.MsgCheck.TimeOutRemindInputDto)">
<summary>
生产线超时提醒
</summary>
<param name="input">生产线编号列表</param>
<returns>生产线超时情况</returns>
</member>
<member name="M:WY.NewJit.MsgCheck.BillM100AppService.ProductLineTimeoutRemind_New(WY.NewJit.MsgCheck.TimeOutRemindInputDto)">
<summary> <summary>
生产线超时提醒(新) 生产线超时提醒(新)
先取未打印列表然后更新缓存列表,如果未打印列表为空取m100更新缓存列表 先取未打印列表然后更新缓存列表,如果未打印列表为空取m100更新缓存列表
@ -1926,6 +1913,11 @@
柱护板装箱单仓储 柱护板装箱单仓储
</summary> </summary>
</member> </member>
<member name="F:WY.NewJit.PrintTable.WaitPrintAppService._blobContainer">
<summary>
BLOB存储
</summary>
</member>
<member name="M:WY.NewJit.PrintTable.WaitPrintAppService.GetEntityCountAsync(System.String,System.String)"> <member name="M:WY.NewJit.PrintTable.WaitPrintAppService.GetEntityCountAsync(System.String,System.String)">
<summary> <summary>
取单表记录总数 取单表记录总数
@ -2018,13 +2010,12 @@
<param name="input">输入查询条件</param> <param name="input">输入查询条件</param>
<returns>返回符合条件的排序分页列表</returns> <returns>返回符合条件的排序分页列表</returns>
</member> </member>
<member name="M:WY.NewJit.PrintTable.WaitPrintAppService.UpdatePrintDataStatus(System.Collections.Generic.List{System.Guid},WY.NewJit.PrintTable.PrintTypeEnum)"> <member name="M:WY.NewJit.PrintTable.WaitPrintAppService.ExportAsync(WY.NewJit.PrintTable.Dtos.QueryWaitPrintDto)">
<summary> <summary>
修改未打印列表状态 导出信息
</summary> </summary>
<param name="ids"></param> <param name="input">导出查询条件</param>
<param name="printTypeEnum"></param> <returns>执行成功返回真</returns>
<returns></returns>
</member> </member>
<member name="M:WY.NewJit.PrintTable.WaitPrintAppService.DoZHBPrint_3x8_LRMerge(System.String,WY.NewJit.Extends.ZhuHuBanPrintInputDto,System.Int64,System.Double,System.DateTime,System.Collections.Generic.List{WY.NewJit.PrintTable.WaitPrint},System.String)"> <member name="M:WY.NewJit.PrintTable.WaitPrintAppService.DoZHBPrint_3x8_LRMerge(System.String,WY.NewJit.Extends.ZhuHuBanPrintInputDto,System.Int64,System.Double,System.DateTime,System.Collections.Generic.List{WY.NewJit.PrintTable.WaitPrint},System.String)">
<summary> <summary>
@ -2101,6 +2092,13 @@
<param name="isFillBreakNum"></param> <param name="isFillBreakNum"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:WY.NewJit.PrintTable.WaitPrintAppService.GetReplenishPrintZHBListAsync(WY.NewJit.PrintTable.Dtos.QueryReplenishPrintDto)">
<summary>
取柱护板补打列表(IsNeedReplenishPrint=true、单据状态BillStatus是未打印)
</summary>
<param name="input">输入查询条件</param>
<returns>返回符合条件的排序分页列表</returns>
</member>
<member name="M:WY.NewJit.PrintTable.WaitPrintAppService.CheckZHBHostSNBreakNum(WY.NewJit.Extends.ZhuHuBanPrintInputDto)"> <member name="M:WY.NewJit.PrintTable.WaitPrintAppService.CheckZHBHostSNBreakNum(WY.NewJit.Extends.ZhuHuBanPrintInputDto)">
<summary> <summary>
打印前检查大众顺序号是否断号 打印前检查大众顺序号是否断号
@ -2172,7 +2170,7 @@
区域相关应用服务 区域相关应用服务
</summary> </summary>
</member> </member>
<member name="M:Win.Sfs.SettleAccount.FISes.ZhuHuBanPackingRecService.#ctor(Win.Sfs.SettleAccount.Repository.NewJitEfCoreRepository2{WY.NewJit.Extends.ZhuHuBanPackingList,System.Guid},Volo.Abp.Domain.Repositories.IRepository{WY.NewJit.MsgCheck.BillM100,System.Guid},WY.NewJit.EntityFrameworkCore.WMSDapperRepository,WY.NewJit.MsgBaseData.LineSNDomianService,Volo.Abp.Domain.Repositories.IRepository{WY.NewJit.Extends.PaiGe.WMS.FisTB_BILL_SCRAP},Volo.Abp.Domain.Repositories.IRepository{WY.NewJit.MsgBaseData.PrintTemplateConfiguration,System.Guid})"> <member name="M:Win.Sfs.SettleAccount.FISes.ZhuHuBanPackingRecService.#ctor(Win.Sfs.SettleAccount.Repository.NewJitEfCoreRepository2{WY.NewJit.Extends.ZhuHuBanPackingList,System.Guid},Volo.Abp.Domain.Repositories.IRepository{WY.NewJit.MsgCheck.BillM100,System.Guid},WY.NewJit.EntityFrameworkCore.WMSDapperRepository,WY.NewJit.MsgBaseData.LineSNDomianService,Volo.Abp.Domain.Repositories.IRepository{WY.NewJit.Extends.PaiGe.WMS.FisTB_BILL_SCRAP},Volo.Abp.Domain.Repositories.IRepository{WY.NewJit.MsgBaseData.PrintTemplateConfiguration,System.Guid},Volo.Abp.Domain.Repositories.IRepository{WY.NewJit.PrintTable.AlreadyPrint},Volo.Abp.Domain.Repositories.IRepository{WY.NewJit.PrintTable.WaitPrint})">
<summary> <summary>
柱护板装箱单仓储明细 柱护板装箱单仓储明细
</summary> </summary>

8
src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain.Shared/Common/ExtMethod.cs

@ -316,6 +316,12 @@ namespace WY.NewJit.Common
return false; return false;
} }
public static bool HasValue(this int? p_val)
{
return p_val != null && p_val > 0;
}
//public static string Left(this string param, int length) //public static string Left(this string param, int length)
//{ //{
// string result = param.Substring(0, length); // string result = param.Substring(0, length);
@ -450,5 +456,7 @@ namespace WY.NewJit.Common
} }
return ToInt64(p_objVal.ToString()); return ToInt64(p_objVal.ToString());
} }
} }
} }

6
src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain.Shared/Common/PagedAndSortedBase.cs

@ -6,16 +6,16 @@ namespace WY.NewJit.Common
{ {
public class PagedAndSortedBase public class PagedAndSortedBase
{ {
public int maxResultCount = 500; private int _maxResultCount = 500;
public int MaxResultCount public int MaxResultCount
{ {
get get
{ {
return maxResultCount; return _maxResultCount;
} }
set set
{ {
maxResultCount = value; _maxResultCount = value;
} }
} }
public int SkipCount { get; set; } public int SkipCount { get; set; }

2
src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain.Shared/PrintTable/BusinessTypeEnum.cs

@ -17,7 +17,7 @@ namespace WY.NewJit.PrintTable
OtherZhuHuBan = 2, OtherZhuHuBan = 2,
[Description("AC柱护板")] [Description("AC柱护板")]
ZhuHuBan = 3, AC_ZhuHuBan = 3,
} }

2
src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/Extends/PaiGe/MenBanReports/MenBanPackingList.cs

@ -14,7 +14,7 @@ namespace WY.NewJit.Extends
/// </summary> /// </summary>
public class MenBanPackingList : FullAuditedAggregateRoot<Guid> public class MenBanPackingList : FullAuditedAggregateRoot<Guid>
{ {
/// <summary> /// <summary>
/// 装箱单号:规则 1开头,11位,自增顺序号 /// 装箱单号:规则 1开头,11位,自增顺序号
/// </summary> /// </summary>

2
src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/MsgCheck/Services/M100DomainService.cs

@ -58,7 +58,7 @@ namespace WY.NewJit.MsgCheck
{ {
WaitPrint mbRec = ConvertWaitPrint(m100Obj, BusinessTypeEnum.MenBan); WaitPrint mbRec = ConvertWaitPrint(m100Obj, BusinessTypeEnum.MenBan);
WaitPrint zhbOtherRec = ConvertWaitPrint(m100Obj, BusinessTypeEnum.OtherZhuHuBan); WaitPrint zhbOtherRec = ConvertWaitPrint(m100Obj, BusinessTypeEnum.OtherZhuHuBan);
WaitPrint zhbRec = ConvertWaitPrint(m100Obj, BusinessTypeEnum.ZhuHuBan); WaitPrint zhbRec = ConvertWaitPrint(m100Obj, BusinessTypeEnum.AC_ZhuHuBan);
wpArr = new WaitPrint[3] { mbRec, zhbOtherRec, zhbRec }; wpArr = new WaitPrint[3] { mbRec, zhbOtherRec, zhbRec };
} }
else else

2
vue/src/router/index.js

@ -67,7 +67,7 @@ export const constantRoutes = [
component: () => import('@/views/login/index'), component: () => import('@/views/login/index'),
//component: () => import('@/views/pg-fis/basedate/partSwitch'), //?? one //component: () => import('@/views/pg-fis/basedate/partSwitch'), //?? one
//component: () => import('@/views/pg-fis/basedate/assemblyCfg'), //?? one //component: () => import('@/views/pg-fis/basedate/assemblyCfg'), //?? one
// component: () => import('@/views/pg-fis/basedate/m100Online/normalPritIndex.vue'), //component: () => import('@/views/pg-fis/basedate/m100Online/normalPritIndex.vue'),
hidden: true hidden: true
}, },
{ {

3
vue/src/views/pg-fis/basedate/m100Online/RepetitionMB.vue

@ -618,7 +618,8 @@ export default {
var params = MBVin1; //ID var params = MBVin1; //ID
console.log("门板打印-主界面传过来的值:" + JSON.stringify(params)); console.log("门板打印-主界面传过来的值:" + JSON.stringify(params));
this.$axios this.$axios
.posts("/api/newjit/bill-m100/load-menban-report", params) //.posts("/api/newjit/bill-m100/load-menban-report", params)
.posts("/api/newjit/wait-print/load-menban-report", params)
.then((response) => { .then((response) => {
//alert(response.status); //alert(response.status);
const index = this.list.indexOf(row); const index = this.list.indexOf(row);

8
vue/src/views/pg-fis/basedate/m100Online/RepetitionZHB.vue

@ -540,7 +540,9 @@ export default {
console.log("柱护版-主界面传过来的值:" + JSON.stringify(params)); console.log("柱护版-主界面传过来的值:" + JSON.stringify(params));
this.$axios this.$axios
//.posts("/api/newjit/bill-m100/print-zhuhuban-packing-list", params) //.posts("/api/newjit/bill-m100/print-zhuhuban-packing-list", params)
.posts("/api/newjit/bill-m100/load-zhuhuban-report", params) //.posts("/api/newjit/bill-m100/load-zhuhuban-report", params)
.posts("/api/newjit/wait-print/load-zhuhuban-report", params)
.then((response) => { .then((response) => {
console.log("柱护版-打印返回的状态:" + response.status); console.log("柱护版-打印返回的状态:" + response.status);
const index = this.list.indexOf(row); const index = this.list.indexOf(row);
@ -621,8 +623,8 @@ export default {
}; };
console.log("柱护版-主界面传过来的值:" + JSON.stringify(params)); console.log("柱护版-主界面传过来的值:" + JSON.stringify(params));
this.$axios this.$axios
//.posts("/api/newjit/bill-m100/print-zhuhuban-packing-list", params) //.posts("/api/newjit/bill-m100/load-zhuhuban-report", params)
.posts("/api/newjit/bill-m100/load-zhuhuban-report", params) .posts("/api/newjit/wait-print/load-zhuhuban-report", params)
.then((response) => { .then((response) => {
console.log("柱护版-打印返回的状态:" + response.status); console.log("柱护版-打印返回的状态:" + response.status);
const index = this.list.indexOf(row); const index = this.list.indexOf(row);

143
vue/src/views/pg-fis/basedate/m100Online/budaMB.vue

@ -303,8 +303,9 @@ export default {
//TODO //TODO
} else { } else {
newVal.forEach((element) => { newVal.forEach((element) => {
this.customerInfo.printType = 2; //2 this.customerInfo.printType = 2; //2
this.customerInfo.productLine = element.ProductLine; this.customerInfo.productLine = element.ProductLine;
this.customerInfo.BusinessType = element.BusinessType;
}); });
if (this.customerInfo.productLine != "") { if (this.customerInfo.productLine != "") {
this.getList(); this.getList();
@ -348,12 +349,12 @@ export default {
width: 100, width: 100,
}); });
tempsTabs.push({ // tempsTabs.push({
label: "版本", // label: "",
prop: "version", // prop: "version",
width: 100, // width: 100,
}); // });
tempsTabs.push({ tempsTabs.push({
label: "产线", label: "产线",
@ -370,7 +371,7 @@ export default {
tempsTabs.push({ tempsTabs.push({
label: "备注", label: "备注",
prop: "remark", prop: "description", //remark
width: 80, width: 80,
}); });
@ -477,7 +478,8 @@ export default {
console.log('replenish-print-list方法输入参数:' + JSON.stringify(this.listQuery)); console.log('replenish-print-list方法输入参数:' + JSON.stringify(this.listQuery));
this.$axios this.$axios
.gets( .gets(
"/api/newjit/bill-m100/replenish-print-list", //"/api/newjit/bill-m100/replenish-print-list",
"/api/newjit/wait-print/replenish-print-list",
inputParam inputParam
) )
.then((response) => { .then((response) => {
@ -494,7 +496,7 @@ export default {
}, },
//- //-
handleReplenishPrint() { handleReplenishPrint() {
debugger
this.isEdit = true; this.isEdit = true;
if (this.multipleSelection == null || this.multipleSelection.length == 0) { if (this.multipleSelection == null || this.multipleSelection.length == 0) {
this.$message({ this.$message({
@ -511,14 +513,17 @@ export default {
productLine: this.customerInfo.productLine, productLine: this.customerInfo.productLine,
beginVin: beginVin1, beginVin: beginVin1,
endVin: endVin1, endVin: endVin1,
m100IdList: [] //m100IdList: []
waitPrintIdList: [],
businessType : this.customerInfo.BusinessType
}; };
this.multipleSelection.forEach(itm => { this.multipleSelection.forEach(itm => {
params.m100IdList.push(itm.id); //params.m100IdList.push(itm.id);
params.waitPrintIdList.push(itm.id);
}); });
console.log("门板补打输入参数:" + JSON.stringify(params)); console.log("门板补打输入参数:" + JSON.stringify(params));
debugger // //
// this.$axios // this.$axios
// .posts("/api/newjit/bill-m100/print-menban-packing-list", params) // .posts("/api/newjit/bill-m100/print-menban-packing-list", params)
// .then((response) => { // .then((response) => {
@ -559,7 +564,8 @@ export default {
debugger debugger
this.$axios this.$axios
.posts( .posts(
"/api/newjit/bill-m100/save-menban-report", //"/api/newjit/bill-m100/save-menban-report",
"/api/newjit/wait-print/save-menban-report",
input input
) )
.then((response) => { .then((response) => {
@ -574,49 +580,76 @@ export default {
return; return;
} else if (response.status === true) { } else if (response.status === true) {
let loadInput = response.item; let loadInput = response.item;
//------------------------------------------- debugger
//grid++jsonbase64
//this.fileQuery.report = "menban";
this.fileQuery.dataname = JSON.stringify(
response.item
);
//this.fileQuery.dataname = "";
console.log("打印json");
console.log(this.fileQuery.dataname);
this.$axios this.$axios
.posts( .posts(
"/api/newjit/bill-m100/load-menban-report", "/Handlers/Handler1.ashx?report=menban",
loadInput qs.stringify(this.fileQuery)
) )
.then((response) => { .then((response) => {
console.log("加载门板报表"); console.log("获取文件base64编码");
console.log(response); console.log(response);
console.log(response.status); this.formLoading = false;
if (response.status === false) { this.isDisable = false;
this.$message({ this.printpdf(response); //
message: response.message, })
type: "error", .catch((error) => {
}); this.formLoading = false;
return; this.isDisable = false;
} else if (response.status === true) { });
//grid++jsonbase64
//this.fileQuery.report = "menban"; //-------------------------------------------
this.fileQuery.dataname = JSON.stringify( // this.$axios
response.item // .posts(
); // //"/api/newjit/bill-m100/load-menban-report",
//this.fileQuery.dataname = ""; // "/api/newjit/wait-print/load-menban-report",
console.log("打印json"); // loadInput
console.log(this.fileQuery.dataname); // )
this.$axios // .then((response) => {
.posts( // console.log("");
"/Handlers/Handler1.ashx?report=menban", // console.log(response);
qs.stringify(this.fileQuery) // console.log(response.status);
) // if (response.status === false) {
.then((response) => { // this.$message({
console.log("获取文件base64编码"); // message: response.message,
console.log(response); // type: "error",
this.formLoading = false; // });
this.isDisable = false; // return;
this.printpdf(response); // // } else if (response.status === true) {
}) // //grid++jsonbase64
.catch((error) => { // //this.fileQuery.report = "menban";
this.formLoading = false; // this.fileQuery.dataname = JSON.stringify(
this.isDisable = false; // response.item
}); // );
} // //this.fileQuery.dataname = "";
}); // console.log("json");
// console.log(this.fileQuery.dataname);
// this.$axios
// .posts(
// "/Handlers/Handler1.ashx?report=menban",
// qs.stringify(this.fileQuery)
// )
// .then((response) => {
// console.log("base64");
// console.log(response);
// this.formLoading = false;
// this.isDisable = false;
// this.printpdf(response); //
// })
// .catch((error) => {
// this.formLoading = false;
// this.isDisable = false;
// });
// }
// });
//------------------------------------------- //-------------------------------------------
} }
}); });

140
vue/src/views/pg-fis/basedate/m100Online/budaZHB.vue

@ -304,7 +304,9 @@ export default {
newVal.forEach((element) => { newVal.forEach((element) => {
this.customerInfo.printType = 2; //2 this.customerInfo.printType = 2; //2
this.customerInfo.productLine = element.ProductLine; this.customerInfo.productLine = element.ProductLine;
this.customerInfo.GroupName = element.GroupName this.customerInfo.GroupName = element.GroupName;
debugger
this.customerInfo.BusinessType = element.BusinessType;
}); });
if (this.customerInfo.productLine != "") { if (this.customerInfo.productLine != "") {
this.getList(); this.getList();
@ -348,12 +350,12 @@ export default {
width: 100, width: 100,
}); });
tempsTabs.push({ // tempsTabs.push({
label: "版本", // label: "",
prop: "version", // prop: "version",
width: 100, // width: 100,
}); // });
tempsTabs.push({ tempsTabs.push({
label: "产线", label: "产线",
@ -363,14 +365,14 @@ export default {
}); });
tempsTabs.push({ tempsTabs.push({
label: "柱护板状态", label: "柱护板状态",
prop: "printBillNum", prop: "billStatus", //"printBillNum",
width: 110, width: 110,
}); });
tempsTabs.push({ tempsTabs.push({
label: "备注", label: "备注",
prop: "remark", prop: "description", //remark
width: 80, width: 80,
}); });
@ -452,6 +454,7 @@ export default {
* @param {Object} data * @param {Object} data
*/ */
getList(data) { getList(data) {
debugger
this.listLoading = true; this.listLoading = true;
let inputParam = {}; let inputParam = {};
if (data != undefined) { if (data != undefined) {
@ -473,11 +476,15 @@ export default {
inputParam.productLine = this.customerInfo.productLine; inputParam.productLine = this.customerInfo.productLine;
} }
inputParam.GroupName = this.customerInfo.GroupName; inputParam.GroupName = this.customerInfo.GroupName;
inputParam.businessType = this.customerInfo.BusinessType;
inputParam.printType = 2;
console.log(476,inputParam) console.log(476,inputParam)
console.log('取柱护板补打列表replenish-print-zhb-list方法输入参数:' + JSON.stringify(this.listQuery)); console.log('取柱护板补打列表replenish-print-zhb-list方法输入参数:' + JSON.stringify(this.listQuery));
this.$axios this.$axios
.gets( .gets(
"/api/newjit/bill-m100/replenish-print-zhb-list", //"/api/newjit/bill-m100/replenish-print-zhb-list",
"/api/newjit/wait-print/replenish-print-zhb-list",
inputParam inputParam
) )
.then((response) => { .then((response) => {
@ -494,6 +501,7 @@ export default {
}, },
//- //-
handleReplenishPrint() { handleReplenishPrint() {
debugger
this.isEdit = true; this.isEdit = true;
if (this.multipleSelection == null || this.multipleSelection.length == 0) { if (this.multipleSelection == null || this.multipleSelection.length == 0) {
this.$message({ this.$message({
@ -511,10 +519,11 @@ export default {
GroupName: this.customerInfo.GroupName, GroupName: this.customerInfo.GroupName,
beginVin: beginVin1, beginVin: beginVin1,
endVin: endVin1, endVin: endVin1,
m100IdList: [] waitPrintIdList: [], //m100IdList: [],
businessType : this.customerInfo.BusinessType
}; };
this.multipleSelection.forEach(itm => { this.multipleSelection.forEach(itm => {
params.m100IdList.push(itm.id); params.waitPrintIdList.push(itm.id);
}); });
console.log("柱护板补打输入参数:" + JSON.stringify(params)); console.log("柱护板补打输入参数:" + JSON.stringify(params));
@ -561,7 +570,8 @@ export default {
// //
this.$axios this.$axios
.posts( .posts(
"/api/newjit/bill-m100/save-group-zhuhuban-report", //"/api/newjit/bill-m100/save-group-zhuhuban-report",
"/api/newjit/wait-print/save-group-zhuhuban-report",
input input
) )
.then((response) => { .then((response) => {
@ -573,51 +583,75 @@ export default {
}); });
return; return;
} else if (response.status === true) { } else if (response.status === true) {
let loadInput = {};
loadInput.dataResultType = "1"; //
loadInput.reportIdList = response.item;
//grid++jsonbase64
//this.fileQuery.report = "menban";
this.fileQuery.dataname = JSON.stringify(
response.item
);
//this.fileQuery.dataname = "";
console.log("打印json",this.fileQuery.dataname);
this.$axios
.posts(
"/Handlers/Handler1.ashx?report=zhuhuban",
qs.stringify(this.fileQuery)
)
.then((response) => {
console.log("获取文件base64编码");
this.formLoading = false;
this.isDisable = false;
this.printpdf(response); //
})
.catch((error) => {
this.formLoading = false;
this.isDisable = false;
});
// let loadInput = {};
// loadInput.dataResultType = "1"; //
// loadInput.reportIdList = response.item;
// //-------------------------------------- // //--------------------------------------
// //
// //
this.$axios // this.$axios
.posts( // .posts(
"/api/newjit/bill-m100/load-zhuhuban-report", // //"/api/newjit/bill-m100/load-zhuhuban-report",
loadInput // "/api/newjit/wait-print/load-zhuhuban-report",
) // loadInput
.then((response) => { // )
console.log("加载柱护板报表",response,response.status); // .then((response) => {
if (response.status === false) { // console.log("",response,response.status);
this.$message({ // if (response.status === false) {
message: response.message, // this.$message({
type: "error", // message: response.message,
}); // type: "error",
return; // });
} else if (response.status === true) { // return;
//grid++jsonbase64 // } else if (response.status === true) {
//this.fileQuery.report = "menban"; // //grid++jsonbase64
this.fileQuery.dataname = JSON.stringify( // //this.fileQuery.report = "menban";
response.item // this.fileQuery.dataname = JSON.stringify(
); // response.item
//this.fileQuery.dataname = ""; // );
console.log("打印json",this.fileQuery.dataname); // //this.fileQuery.dataname = "";
this.$axios // console.log("json",this.fileQuery.dataname);
.posts( // this.$axios
"/Handlers/Handler1.ashx?report=zhuhuban", // .posts(
qs.stringify(this.fileQuery) // "/Handlers/Handler1.ashx?report=zhuhuban",
) // qs.stringify(this.fileQuery)
.then((response) => { // )
console.log("获取文件base64编码"); // .then((response) => {
this.formLoading = false; // console.log("base64");
this.isDisable = false; // this.formLoading = false;
this.printpdf(response); // // this.isDisable = false;
}) // this.printpdf(response); //
.catch((error) => { // })
this.formLoading = false; // .catch((error) => {
this.isDisable = false; // this.formLoading = false;
}); // this.isDisable = false;
} // });
}); // }
// });
//-------------------------------------- //--------------------------------------
} }
}); });

419
vue/src/views/pg-fis/basedate/m100Online/normalPritIndex.vue

@ -60,8 +60,8 @@
<el-option <el-option
v-for="(item,key) in PLChildGroupList" v-for="(item,key) in PLChildGroupList"
:key="key" :key="key"
:label="item" :label="item.groupName"
:value="item" :value="item.groupCode"
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -613,7 +613,7 @@ export default {
GroupName: undefined GroupName: undefined
}, },
hostCheckQuery: { hostCheckQuery: {
printType: undefined, //0:;1:;2:; printType: undefined, //0:;1:;2:; -> 1:;2:
productLine: undefined, productLine: undefined,
beginHostSN: undefined, beginHostSN: undefined,
endHostSN: undefined, endHostSN: undefined,
@ -622,7 +622,7 @@ export default {
GroupName:undefined GroupName:undefined
}, },
hostPrintQuery: { hostPrintQuery: {
printType: undefined, //0:;1:;2:; printType: undefined, //0:;1:;2:; -> 1:;2:
productLine: undefined, productLine: undefined,
beginHostSN: undefined, beginHostSN: undefined,
endHostSN: undefined, endHostSN: undefined,
@ -631,7 +631,7 @@ export default {
GroupName: undefined, GroupName: undefined,
}, },
vinPrintQuery: { vinPrintQuery: {
printType: undefined, //0:;1:;2:; printType: undefined, //0:;1:;2:; -> 1:;2:
productLine: undefined, productLine: undefined,
beginHostSN: undefined, beginHostSN: undefined,
endHostSN: undefined, endHostSN: undefined,
@ -715,11 +715,11 @@ export default {
prop: "vehicleModelCode", prop: "vehicleModelCode",
width: 120, width: 120,
}); });
tempsTabs.push({ // tempsTabs.push({
label: "版本", // label: "",
prop: "version", // prop: "version",
width: 150, // width: 150,
}); // });
tempsTabs.push({ tempsTabs.push({
label: "R100上线时间", label: "R100上线时间",
prop: "r100OnlineTime", prop: "r100OnlineTime",
@ -741,17 +741,17 @@ export default {
width: 120, width: 120,
}); });
tempsTabs.push({ // tempsTabs.push({
label: "柱护板状态", // label: "",
prop: "printBillNum", // prop: "printBillNum",
width: 120, // width: 120,
}); // });
tempsTabs.push({ // tempsTabs.push({
label: "备注", // label: "",
prop: "remark", // prop: "remark",
width: 120, // width: 120,
}); // });
return tempsTabs; return tempsTabs;
}, },
...mapGetters(["userInfo"]), // ...mapGetters(["userInfo"]), //
@ -910,7 +910,8 @@ export default {
//12 //12
this.$axios this.$axios
.gets( .gets(
"/api/newjit/bill-m100/get-print-start-hostsn2", //"/api/newjit/bill-m100/get-print-start-hostsn2",
"/api/newjit/wait-print/get-print-start-hostsn2",
this.hostSNQuery this.hostSNQuery
) )
.then((response) => { .then((response) => {
@ -931,26 +932,7 @@ export default {
this.form.endHostSN = this.form.endHostSN =
parseInt(this.printNum) + parseInt(this.form.beginHostSN) - 1; parseInt(this.printNum) + parseInt(this.form.beginHostSN) - 1;
} }
// this.$axios
// .gets("/api/newjit/bill-m100/get-print-start-hostsn2", this.hostSNQuery)
// .then((response) => {
// if (response.item !== null) {
// this.form.beginHostSN = parseInt(response.item);
// if (val == 12) {
// //
// this.form.endHostSN = parseInt(response.item) + 11;
// } else {
// this.form.endHostSN =
// parseInt(response.item) + parseInt(this.printNum) - 1;
// }
// } else {
// this.$message({
// message: "",
// type: "warning",
// });
// return;
// }
// });
}, },
// //
valueNumChangeZHB(val) { valueNumChangeZHB(val) {
@ -959,7 +941,8 @@ export default {
//12 //12
this.$axios this.$axios
.gets( .gets(
"/api/newjit/bill-m100/get-print-start-hostsn2", //"/api/newjit/bill-m100/get-print-start-hostsn2",
"/api/newjit/wait-print/get-print-start-hostsn2",
this.hostSNQuery this.hostSNQuery
) )
.then((response) => { .then((response) => {
@ -980,26 +963,7 @@ export default {
this.form.endHostSN = this.form.endHostSN =
parseInt(this.printNumZHB) + parseInt(this.form.beginHostSN) - 1; parseInt(this.printNumZHB) + parseInt(this.form.beginHostSN) - 1;
} }
// this.$axios
// .gets("/api/newjit/bill-m100/get-print-start-hostsn2", this.hostSNQuery)
// .then((response) => {
// if (response.item !== null) {
// this.form.beginHostSN = parseInt(response.item);
// if (val == 24) {
// //
// this.form.endHostSN = parseInt(response.item) + 23;
// } else {
// this.form.endHostSN =
// parseInt(response.item) + this.printNumZHB - 1;
// }
// } else {
// this.$message({
// message: "",
// type: "warning",
// });
// return;
// }
// });
}, },
// //
handleDrawerOpen(param) { handleDrawerOpen(param) {
@ -1026,12 +990,28 @@ export default {
}, },
/** 导出功能 assembly-cfg-erp/export */ /** 导出功能 assembly-cfg-erp/export */
handleDownload() { handleDownload() {
debugger
this.listLoading = true; this.listLoading = true;
this.listExportQuery.erpAssemblyCode = this.listQuery.ErpAssemblyCode; this.listExportQuery.erpAssemblyCode = this.listQuery.ErpAssemblyCode;
this.listExportQuery.erpAssemblyName = this.listQuery.ErpAssemblyName; this.listExportQuery.erpAssemblyName = this.listQuery.ErpAssemblyName;
if (this.listQuery.productType === 2) { // 1 2
if (this.listQuery.GroupName == "3") { // 2 3 AC
this.listQuery.BusinessType = 3;
} else {
this.listQuery.BusinessType = 2;
}
} else {
this.listQuery.BusinessType = 1
}
this.listQuery.PrintType = 1;
console.log(JSON.stringify(this.listQuery)); console.log(JSON.stringify(this.listQuery));
this.$axios this.$axios
.posts("/api/newjit/bill-m100/export", this.listQuery) //.posts("/api/newjit/bill-m100/export", this.listQuery)
.posts("/api/newjit/wait-print/export", this.listQuery)
.then((res) => { .then((res) => {
let filename = res.item; let filename = res.item;
this.$axios this.$axios
@ -1135,30 +1115,47 @@ export default {
return projectTypeKeyValue[type]; return projectTypeKeyValue[type];
}, },
getList(data) { getList(data) {
/*
http://localhost:44344/api/newjit/wait-print/wait-print-list?
BusinessType=1 业务类型1 门板 2 其它柱护板 3 柱护板
&ProductLine=01 打印类型1 顺序打印 2 补账打印
&PrintType=1
&HostSNBegin=1&HostSNEnd=1999
*/
this.listLoading = true; this.listLoading = true;
if (data != undefined) { if (data != undefined) {
this.listQueryList.SkipCount = (this.page - 1) * data.limit; this.listQueryList.SkipCount = (this.page - 1) * data.limit;
} else { } else {
this.listQueryList.SkipCount = (this.page - 1) * 15; this.listQueryList.SkipCount = (this.page - 1) * 15;
} }
if (this.listQuery.productType === 2) { if (this.listQuery.productType === 2) { // 1 2
this.listQueryList.ZHBBillStatus = 2; //this.listQueryList.ZHBBillStatus = 2;
} else { if (this.listQuery.GroupName == "3") { // 2 3 AC
this.listQueryList.ZHBBillStatus = 0; this.listQueryList.BusinessType = 3;
} } else {
if (this.listQuery.productType === 2) { this.listQueryList.BusinessType = 2;
this.listQuery.ZHBBillStatus = 2; }
} else { } else {
this.listQuery.ZHBBillStatus = 0; //this.listQueryList.ZHBBillStatus = 0;
this.listQueryList.BusinessType = 1
} }
this.listQueryList.BillStatus = 2; // // if (this.listQuery.productType === 2) {
// this.listQuery.ZHBBillStatus = 2;
// } else {
// this.listQuery.ZHBBillStatus = 0;
// }
//this.listQueryList.BillStatus = 2; //
this.listQueryList.ProductLine = this.listQuery.productLine; //线 this.listQueryList.ProductLine = this.listQuery.productLine; //线
this.listQueryList.CanNotPrint = false; // //this.listQueryList.CanNotPrint = false; //
this.listQueryList.GroupName = this.listQuery.GroupName //this.listQueryList.GroupName = this.listQuery.GroupName
this.listQueryList.PrintType = 1;
console.log("日常打印M100查询条件:" + JSON.stringify(this.listQueryList)); console.log("日常打印M100查询条件:" + JSON.stringify(this.listQueryList));
//this.click(); //this.click();
this.$axios this.$axios
.gets("/api/newjit/bill-m100/list", this.listQueryList) //.gets("/api/newjit/bill-m100/list", this.listQueryList)
.gets("/api/newjit/wait-print/wait-print-list", this.listQueryList)
.then((response) => { .then((response) => {
this.list = response.items; this.list = response.items;
this.totalCount = response.totalCount; this.totalCount = response.totalCount;
@ -1199,7 +1196,24 @@ export default {
}, },
// //
valueselectChange(val) { valueselectChange(val) {
debugger
this.$forceUpdate(); this.$forceUpdate();
if (this.listQuery.productType === 2) { // 1 2
//this.listQueryList.ZHBBillStatus = 2;
if (this.listQuery.GroupName == "3") { // 2 3 AC
this.listQueryList.BusinessType = 3;
} else {
this.listQueryList.BusinessType = 2;
}
} else {
//this.listQueryList.ZHBBillStatus = 0;
this.listQueryList.BusinessType = 1
}
this.customerInfosMB = []; this.customerInfosMB = [];
this.customerInfosZHB = []; this.customerInfosZHB = [];
if (this.listQuery.productType === 1) { if (this.listQuery.productType === 1) {
@ -1208,6 +1222,7 @@ export default {
{ {
PrintType: 1, PrintType: 1,
ProductLine: this.listQuery.productLine, ProductLine: this.listQuery.productLine,
BusinessType: this.listQueryList.BusinessType
}, },
]; ];
} }
@ -1217,7 +1232,8 @@ export default {
{ {
PrintType: 1, PrintType: 1,
ProductLine: this.listQuery.productLine, ProductLine: this.listQuery.productLine,
GroupName:this.listQuery.GroupName GroupName:this.listQuery.GroupName,
BusinessType: this.listQueryList.BusinessType
}, },
]; ];
} }
@ -1284,7 +1300,7 @@ export default {
/**打印 */ /**打印 */
print() { print() {
(this.hostPrintQuery = { (this.hostPrintQuery = {
printType: undefined, //0:;1:;2:; printType: undefined, //0:;1:;2:; -> 1:;2:
productLine: undefined, productLine: undefined,
beginHostSN: undefined, beginHostSN: undefined,
endHostSN: undefined, endHostSN: undefined,
@ -1292,9 +1308,9 @@ export default {
endVin: undefined, endVin: undefined,
GroupName: undefined, GroupName: undefined,
}), }),
(this.hostCheckQuery.printType = 0); (this.hostCheckQuery.printType = 1);
this.hostPrintQuery.printType = 0; this.hostPrintQuery.printType = 1;
this.vinPrintQuery.printType = 0; this.vinPrintQuery.printType = 1;
if (this.listQuery.productLine === "" ||this.listQuery.productLine === undefined) { if (this.listQuery.productLine === "" ||this.listQuery.productLine === undefined) {
this.$message({ this.$message({
message: "请选择生产线", message: "请选择生产线",
@ -1323,7 +1339,8 @@ export default {
console.log("门板hostsn2参数" + JSON.stringify(this.hostSNQuery)); console.log("门板hostsn2参数" + JSON.stringify(this.hostSNQuery));
this.$axios this.$axios
.gets( .gets(
"/api/newjit/bill-m100/get-print-start-hostsn2", //"/api/newjit/bill-m100/get-print-start-hostsn2",
"/api/newjit/wait-print/get-print-start-hostsn2",
this.hostSNQuery this.hostSNQuery
) )
.then((response) => { .then((response) => {
@ -1351,7 +1368,8 @@ export default {
this.$axios this.$axios
.gets( .gets(
"/api/newjit/bill-m100/get-print-start-hostsn2", //"/api/newjit/bill-m100/get-print-start-hostsn2",
"/api/newjit/wait-print/get-print-start-hostsn2",
this.hostSNQuery this.hostSNQuery
) )
.then((response) => { .then((response) => {
@ -1412,16 +1430,16 @@ export default {
/**重打 */ /**重打 */
rePrint() { rePrint() {
(this.hostPrintQuery = { (this.hostPrintQuery = {
printType: undefined, //0:;1:;2:; printType: undefined, //0:;1:;2:; -> 1:;2:
productLine: undefined, productLine: undefined,
beginHostSN: undefined, beginHostSN: undefined,
endHostSN: undefined, endHostSN: undefined,
beginVin: undefined, beginVin: undefined,
endVin: undefined, endVin: undefined,
}), }),
(this.hostCheckQuery.printType = 1); (this.hostCheckQuery.printType = -1);
this.hostPrintQuery.printType = 1; this.hostPrintQuery.printType = -1;
this.vinPrintQuery.printType = 1; this.vinPrintQuery.printType = -1;
if ( if (
this.listQuery.productLine === "" || this.listQuery.productLine === "" ||
this.listQuery.productLine === undefined this.listQuery.productLine === undefined
@ -1452,7 +1470,7 @@ export default {
/**补打 */ /**补打 */
makeUpPrint() { makeUpPrint() {
(this.hostPrintQuery = { (this.hostPrintQuery = {
printType: undefined, //0:;1:;2:; printType: undefined, //0:;1:;2:; -> 1:;2:
productLine: undefined, productLine: undefined,
beginHostSN: undefined, beginHostSN: undefined,
endHostSN: undefined, endHostSN: undefined,
@ -1563,7 +1581,8 @@ export default {
); );
this.$axios this.$axios
.posts( .posts(
"/api/newjit/bill-m100/check-mb-hostsn-break-num", //"/api/newjit/bill-m100/check-mb-hostsn-break-num",
"/api/newjit/wait-print/check-mb-hostsn-break-num",
this.hostCheckQuery this.hostCheckQuery
) )
.then((response) => { .then((response) => {
@ -1608,7 +1627,8 @@ export default {
this.isDisable = true; this.isDisable = true;
this.$axios this.$axios
.posts( .posts(
"/api/newjit/bill-m100/check-zhb-hostsn-break-num", //"/api/newjit/bill-m100/check-zhb-hostsn-break-num",
"/api/newjit/wait-print/check-zhb-hostsn-break-num",
this.hostCheckQuery this.hostCheckQuery
) )
.then((response) => { .then((response) => {
@ -1673,7 +1693,8 @@ export default {
{ {
this.$axios this.$axios
.posts( .posts(
"/api/newjit/bill-m100/save-menban-report", //"/api/newjit/bill-m100/save-menban-report",
"/api/newjit/wait-print/save-menban-report",
this.hostPrintQuery this.hostPrintQuery
) )
.then((response) => { .then((response) => {
@ -1686,45 +1707,70 @@ export default {
return; return;
} else if (response.status === true) { } else if (response.status === true) {
let loadInput = response.item; let loadInput = response.item;
//-------------------------------------------
//grid++jsonbase64
//this.fileQuery.report = "menban";
this.fileQuery.dataname = JSON.stringify(
response.item
);
//this.fileQuery.dataname = "";
console.log("打印json");
this.$axios this.$axios
.posts( .posts(
"/api/newjit/bill-m100/load-menban-report", "/Handlers/Handler1.ashx?report=menban",
loadInput qs.stringify(this.fileQuery)
) )
.then((response) => { .then((response) => {
console.log("加载门板报表"); console.log("获取文件base64编码");
if (response.status === false) { this.formLoading = false;
this.$message({ this.isDisable = false;
message: response.message, this.printpdf(response); //
type: "error", })
}); .catch((error) => {
return; this.formLoading = false;
} else if (response.status === true) { this.isDisable = false;
//grid++jsonbase64 });
//this.fileQuery.report = "menban";
this.fileQuery.dataname = JSON.stringify(
response.item //-------------------------------------------
); // this.$axios
//this.fileQuery.dataname = ""; // .posts(
console.log("打印json"); // "/api/newjit/bill-m100/load-menban-report",
this.$axios // loadInput
.posts( // )
"/Handlers/Handler1.ashx?report=menban", // .then((response) => {
qs.stringify(this.fileQuery) // console.log("");
) // if (response.status === false) {
.then((response) => { // this.$message({
console.log("获取文件base64编码"); // message: response.message,
this.formLoading = false; // type: "error",
this.isDisable = false; // });
this.printpdf(response); // // return;
}) // } else if (response.status === true) {
.catch((error) => { // //grid++jsonbase64
this.formLoading = false; // //this.fileQuery.report = "menban";
this.isDisable = false; // this.fileQuery.dataname = JSON.stringify(
}); // response.item
} // );
}); // //this.fileQuery.dataname = "";
// console.log("json");
// this.$axios
// .posts(
// "/Handlers/Handler1.ashx?report=menban",
// qs.stringify(this.fileQuery)
// )
// .then((response) => {
// console.log("base64");
// this.formLoading = false;
// this.isDisable = false;
// this.printpdf(response); //
// })
// .catch((error) => {
// this.formLoading = false;
// this.isDisable = false;
// });
// }
// });
//------------------------------------------- //-------------------------------------------
} }
}); });
@ -1739,7 +1785,9 @@ export default {
// //
this.$axios this.$axios
.posts( .posts(
"/api/newjit/bill-m100/save-group-zhuhuban-report", //"/api/newjit/bill-m100/save-group-zhuhuban-report",
"/api/newjit/wait-print/save-group-zhuhuban-report",
this.hostPrintQuery this.hostPrintQuery
) )
.then((response) => { .then((response) => {
@ -1751,50 +1799,76 @@ export default {
}); });
return; return;
} else if (response.status === true) { } else if (response.status === true) {
let loadInput = {};
loadInput.dataResultType = (isSelAll == true) ? "1" : "2"; //grid++jsonbase64
loadInput.reportIdList = response.item; //this.fileQuery.report = "menban";
this.fileQuery.dataname = JSON.stringify(
response.item
);
//this.fileQuery.dataname = "";
console.log("打印json");
this.$axios
.posts(
"/Handlers/Handler1.ashx?report=zhuhuban",
qs.stringify(this.fileQuery)
)
.then((response) => {
console.log("获取文件base64编码");
this.formLoading = false;
this.isDisable = false;
this.printpdf(response); //
})
.catch((error) => {
this.formLoading = false;
this.isDisable = false;
});
// let loadInput = {};
// loadInput.dataResultType = (isSelAll == true) ? "1" : "2";
// loadInput.reportIdList = response.item;
//-------------------------------------- //--------------------------------------
// //
// //
this.$axios // this.$axios
.posts( // .posts(
"/api/newjit/bill-m100/load-zhuhuban-report", // "/api/newjit/bill-m100/load-zhuhuban-report",
loadInput // loadInput
) // )
.then((response) => { // .then((response) => {
console.log("加载柱护板报表"); // console.log("");
if (response.status === false) { // if (response.status === false) {
this.$message({ // this.$message({
message: response.message, // message: response.message,
type: "error", // type: "error",
}); // });
return; // return;
} else if (response.status === true) { // } else if (response.status === true) {
//grid++jsonbase64 // //grid++jsonbase64
//this.fileQuery.report = "menban"; // //this.fileQuery.report = "menban";
this.fileQuery.dataname = JSON.stringify( // this.fileQuery.dataname = JSON.stringify(
response.item // response.item
); // );
//this.fileQuery.dataname = ""; // //this.fileQuery.dataname = "";
console.log("打印json"); // console.log("json");
this.$axios // this.$axios
.posts( // .posts(
"/Handlers/Handler1.ashx?report=zhuhuban", // "/Handlers/Handler1.ashx?report=zhuhuban",
qs.stringify(this.fileQuery) // qs.stringify(this.fileQuery)
) // )
.then((response) => { // .then((response) => {
console.log("获取文件base64编码"); // console.log("base64");
this.formLoading = false; // this.formLoading = false;
this.isDisable = false; // this.isDisable = false;
this.printpdf(response); // // this.printpdf(response); //
}) // })
.catch((error) => { // .catch((error) => {
this.formLoading = false; // this.formLoading = false;
this.isDisable = false; // this.isDisable = false;
}); // });
} // }
}); // });
//-------------------------------------- //--------------------------------------
} }
}); });
@ -1823,6 +1897,7 @@ export default {
{ {
PrintType: 1, PrintType: 1,
ProductLine: this.PLChildList[0].productLineCode, ProductLine: this.PLChildList[0].productLineCode,
BusinessType: this.listQueryList.BusinessType
}, },
]; ];
} }
@ -1839,7 +1914,7 @@ export default {
return a.productLineCode - b.productLineCode; return a.productLineCode - b.productLineCode;
}); });
this.listQuery.productLine = this.PLChildList[0].productLineCode; this.listQuery.productLine = this.PLChildList[0].productLineCode;
this.listQuery.GroupName = this.listQuery.productType == '1' ? undefined : this.PLChildGroupList[0] this.listQuery.GroupName = this.listQuery.productType == '1' ? undefined : this.PLChildGroupList[0].groupCode
this.changeMainTableHeight() this.changeMainTableHeight()
this.valueselectChange() this.valueselectChange()
// //
@ -1943,7 +2018,7 @@ export default {
getPLChildGroupList(){ getPLChildGroupList(){
this.$axios this.$axios
.gets( .gets(
"/api/newjit/print-template-configuration/list", "/api/newjit/print-template-configuration/group-list",
) )
.then((response) => { .then((response) => {
if (response.item !== null) { if (response.item !== null) {

73
vue/static/config.js

@ -2,23 +2,7 @@ let configJSON;
if (process.env.NODE_ENV === "development") { if (process.env.NODE_ENV === "development") {
configJSON = { configJSON = {
base: { base: {
// ip: 'http://localhost',
// auth_port: '44344',
// public_port: '44344',
// backend_port: '44344',
// ip: 'http://localhost',
// auth_port: '10100',
// public_port: '10130',
// backend_port: '10130'
/* ip: 'http://localhost',
auth_port: '44378',
public_port: '44378',
backend_port: '44378', */
//ip: 'http://192.168.0.203',
//ip: 'http://192.168.0.140',
ip: "http://localhost", ip: "http://localhost",
auth_port: "44344", auth_port: "44344",
public_port: "44344", public_port: "44344",
@ -51,13 +35,14 @@ if (process.env.NODE_ENV === "development") {
// 发布环境 // 发布环境
configJSON = { configJSON = {
base: { base: {
//ip: 'http://192.168.0.203', //ip: "http://192.168.0.140",
ip: "http://149.223.116.5", ip: "http://192.168.0.228",
//ip: 'http://114.116.225.148', // auth_port: "8066",
//ip: 'http://10.123.148.162', // public_port: "8092",
auth_port: "8066", // backend_port: "8092",
public_port: "8092", auth_port: "7696",
backend_port: "8092", public_port: "7692",
backend_port: "7692",
}, },
basic: {}, basic: {},
upload: { upload: {
@ -82,42 +67,12 @@ if (process.env.NODE_ENV === "development") {
grant_type: "password", grant_type: "password",
}, },
}; };
configJSON.base.ip = `${window.location.protocol}//${window.location.hostname}`; // configJSON.base.ip = `${window.location.protocol}//${window.location.hostname}`;
configJSON.base.auth_port = // configJSON.base.auth_port =
configJSON.base.backend_port = // configJSON.base.backend_port =
configJSON.base.public_port = // configJSON.base.public_port =
window.location.port; // window.location.port;
} }
// 开发环境
// export default {
// base: {
// ip: 'http://localhost',
// auth_port: '44323',
// public_port: '44350',
// backend_port: '44350'
// },
// basic: {},
// upload: {
// ip: 'http://localhost'
// },
// authServer: {
// ip: 'http://localhost'
// },
// crm: {
// ip: 'http://localhost'
// },
// oms: {
// ip: 'http://localhost'
// },
// wx: {
// ip: 'http://localhost',
// basicPort: ''
// },
// client: {
// client_id: 'abpvnext_master_App',
// client_secret: '1q2w3e*',
// grant_type: 'password'
// }
// }
export default configJSON; export default configJSON;

Loading…
Cancel
Save