Browse Source

新增已打印模块,两天测试bug

master
liuyunfeng 1 year ago
parent
commit
f2d47c23c9
  1. 19
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/MsgCheck/BillM100s/MenBanPackingRecService.cs
  2. 30
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/MsgCheck/UnknownAssemblys/UnknownAssemblyAppService.cs
  3. 62
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/PrintTable/AlreadyPrintAppService.cs
  4. 2
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/PrintTable/WaitPrintAppService_ZHB.cs
  5. 14
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/WY.NewJit.Application.xml
  6. 77
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/MsgCheck/Services/M100DomainService.cs
  7. 12
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Job.ConsoleApp/Properties/launchSettings.json
  8. 3
      vue/src/router/index.js
  9. 10
      vue/src/router/modules/fisprint.js
  10. 354
      vue/src/views/pg-fis/basedate/alreadyPrint/detail.vue
  11. 974
      vue/src/views/pg-fis/basedate/alreadyPrint/index.vue
  12. 2
      vue/src/views/pg-fis/basedate/m100Online/budaMB.vue

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

@ -339,29 +339,34 @@ namespace Win.Sfs.SettleAccount.FISes
}
await _menBanPackingListRepository.UpdateManyAsync(pairlist);
#region 删除已打印表、插入未打印表
#region 删除已打印表、插入未打印表 【报废后, 未打印表有补账打印的、已打印表有断号或未知总成的、保留未打印表数据并更新补账打印为顺序打印】
var mbRecLst = await _menBanPackingListRepository.Where(p => idList.Contains(p.Id)).SelectMany(p => p.Details).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>();
foreach (var ap in _apList) //遍历已打印表
foreach (var alreadyPrint in _apList) //遍历已打印表
{
var waitPrintLst = await _waitPrintRepository.GetListAsync(r => r.HostSN2 == ap.HostSN2 && r.BusinessType == ap.BusinessType);
var waitPrintLst = await _waitPrintRepository.GetListAsync(r => r.HostSN2 == alreadyPrint.HostSN2 && r.BusinessType == alreadyPrint.BusinessType);
if (waitPrintLst.Count == 0) //未打印表没有(对应已打印表)记录
{
var wp = ObjectMapper.Map<AlreadyPrint, WaitPrint>(ap);
var wp = ObjectMapper.Map<AlreadyPrint, WaitPrint>(alreadyPrint);
_wpList.Add(wp);
}
else if(waitPrintLst.Count == 1) //未打印表有一条记录
{
if (ap.BillStatus == BillStatusEnum.BreakNum && waitPrintLst[0].BillStatus == BillStatusEnum.BreakNum)
if (alreadyPrint.BillStatus == BillStatusEnum.BreakNum && waitPrintLst[0].BillStatus == BillStatusEnum.BreakNum)
{
throw new BusinessException("1001", "未打印列表和已打印列表出现都是断号的情况号码未【" + ap.HostSN2 + "】,不能报废!");
throw new BusinessException("1001", "未打印列表和已打印列表出现都是断号的情况号码未【" + alreadyPrint.HostSN2 + "】,不能报废!");
}
if (waitPrintLst[0].PrintType == WY.NewJit.PrintTable.PrintTypeEnum.ReplenishPrint)
{
waitPrintLst[0].PrintType = WY.NewJit.PrintTable.PrintTypeEnum.OrderPrint;
await _waitPrintRepository.UpdateAsync(waitPrintLst[0]);
}
}
else if (waitPrintLst.Count > 1)
{
throw new BusinessException("1001", "未打印列表里出现大众顺序号重复号码为【"+ ap.HostSN2+ "】请检查后在报废!");
throw new BusinessException("1001", "未打印列表里出现大众顺序号重复号码为【"+ alreadyPrint.HostSN2+ "】请检查后在报废!");
}
}
await _alreadyPrintRepository.DeleteManyAsync(_apList);

30
src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/MsgCheck/UnknownAssemblys/UnknownAssemblyAppService.cs

@ -49,6 +49,7 @@ namespace WY.NewJit.MsgCheck
private readonly IRepository<BillR100, Guid> _billR100Repository;
private readonly IRepository<BillM100, Guid> _billM100Repository;
private readonly IRepository<WaitPrint, Guid> _waitPrintRepository;
private readonly M100DomainService _m100DomainService;
/// <summary>
/// ERP总成仓储
@ -134,7 +135,8 @@ namespace WY.NewJit.MsgCheck
M100CheckDomainService m100CheckDomainService,
IDistributedEventBus distributedEventBus,
IRepository<PartCfg, Guid> partCfgRepository,
IRepository<WaitPrint, Guid> waitPrintRepository
IRepository<WaitPrint, Guid> waitPrintRepository,
M100DomainService m100DomainService
)
{
_UnknownAssemblyRepository = UnknownAssemblyRepository;
@ -157,6 +159,7 @@ namespace WY.NewJit.MsgCheck
_distributedEventBus = distributedEventBus;
_partCfgRepository = partCfgRepository;
_waitPrintRepository = waitPrintRepository;
_m100DomainService = m100DomainService;
}
#endregion
@ -193,9 +196,9 @@ select * from
with b as
(
select Id,HostSN,KNR,'' as VIN,AssemblyID,OnlineTime,ReceiveTime,VehicleModelCode,ProductLine,[Version],BillStatus, Description from FisBillR100 where BillStatus =1
select Id,HostSN,KNR,'' as VIN,AssemblyID,OnlineTime,ReceiveTime,VehicleModelCode,ProductLine,[Version],BillStatus, Description, SerialNumStr from FisBillR100 where BillStatus =1
union all
select Id,HostSN,KNR,VIN,AssemblyID,OnlineTime,ReceiveTime,VehicleModelCode,ProductLine,[Version],BillStatus, Description from FisBillM100 where BillStatus =1
select Id,HostSN,KNR,VIN,AssemblyID,OnlineTime,ReceiveTime,VehicleModelCode,ProductLine,[Version],BillStatus, Description, SerialNumStr from FisBillM100 where BillStatus =1
)
,d as
(
@ -837,7 +840,7 @@ select * from
union all
select Id from FisBillM100 where BillStatus =1
)
select a.Id from FisUnknownAssembly a where IsDeleted <> 1 and BillID in (select Id from b)
select a.Id from FisUnknownAssembly a where IsDeleted = 0 and BillID in (select Id from b)
";
selLst = await _newJitDapperRepository.GetListBySqlAsync<Guid>(sql, true);
}
@ -882,7 +885,7 @@ select * from
else
{
notMatchNum++;
var billNotExistPartLst = r100Obj.BillR100Parts.Where(itm => allAssemblyPartLst.Contains(itm.PartCode) == false).ToList();
var billNotExistPartLst = r100Obj.BillR100Parts.Where(itm => itm.PartType == "1" && allAssemblyPartLst.Contains(itm.PartCode) == false).ToList();
if (billNotExistPartLst.Count > 0)
{
string desc = "如下是新零件,在总成子零件中不存在:" + billNotExistPartLst.Select(itm => itm.PartCode).Distinct().JoinAsString(",");
@ -907,19 +910,22 @@ select * from
if (isMatch)
{
matchNum++;
//判断未打印表是否有数据,有则更新,没有则插入
ObjectResultDto res = await _m100DomainService.InsertOrUpdateWaitPrintByM100(m100Obj);
#region 当前单据在未匹配时已经参与打印,重新解析后进入补打
bool hasPrintData = _billM100Repository.Any(itm => itm.ProductLine == curPL && itm.SerialNumStr.CompareTo(curSNStr) > 0 && itm.BillStatus == BillStatusEnum.Publish);
if (hasPrintData) //该单据处于未解析时,已经打印
{
m100Obj.NeedReplenishPrint = 1;
await _billM100Repository.UpdateAsync(m100Obj);
}
//bool hasPrintData = _billM100Repository.Any(itm => itm.ProductLine == curPL && itm.SerialNumStr.CompareTo(curSNStr) > 0 && itm.BillStatus == BillStatusEnum.Publish);
//if (hasPrintData) //该单据处于未解析时,已经打印
//{
// m100Obj.NeedReplenishPrint = 1;
// await _billM100Repository.UpdateAsync(m100Obj);
//}
#endregion
}
else
{
notMatchNum++;
var billNotExistPartLst = m100Obj.BillM100Parts.Where(itm => allAssemblyPartLst.Contains(itm.PartCode) == false).ToList();
var billNotExistPartLst = m100Obj.BillM100Parts.Where(itm => itm.PartType == "1" && allAssemblyPartLst.Contains(itm.PartCode) == false).ToList();
if (billNotExistPartLst.Count > 0)
{
string desc = "如下是新零件,在总成子零件中不存在:" + billNotExistPartLst.Select(itm => itm.PartCode).Distinct().JoinAsString(",");

62
src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/PrintTable/AlreadyPrintAppService.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.Extensions.Logging;
using Shouldly;
using System;
using System.Collections.Generic;
using System.Diagnostics;
@ -10,6 +13,7 @@ using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
using Volo.Abp.BlobStoring;
using Volo.Abp.Domain.Repositories;
using Volo.Abp.Uow;
using WY.NewJit.Common;
@ -40,10 +44,20 @@ namespace WY.NewJit.PrintTable
}
private ILogger<WaitPrint> _logger;
private readonly NewJitDapperRepository _newJitDapperRepository;
public AlreadyPrintAppService(ILogger<WaitPrint> logger, NewJitDapperRepository newJitDapperRepository)
/// <summary>
/// BLOB存储
/// </summary>
private readonly IBlobContainer<OurFileContainer> _blobContainer;
public AlreadyPrintAppService(ILogger<WaitPrint> logger,
NewJitDapperRepository newJitDapperRepository,
IBlobContainer<OurFileContainer> blobContainer
)
{
_logger = logger;
_newJitDapperRepository = newJitDapperRepository;
_blobContainer = blobContainer;
}
/// <summary>
/// 已打印列表
@ -52,7 +66,7 @@ namespace WY.NewJit.PrintTable
/// <returns>返回符合条件的排序分页列表</returns>
[HttpGet]
[UnitOfWork(false)]
[Route("already-print-list")]
[Route("list")]
public virtual async Task<PagedResultDto<AlreadyPrintDto>> GetAlreadyPrintListAsync(QueryAlreadyPrintDto input)
{
_logger.LogDebug(_errorMessagePrefix + "GetAlreadyPrintListAsync 进入");
@ -172,5 +186,47 @@ namespace WY.NewJit.PrintTable
var ret = await _newJitDapperRepository.GetListBySqlAsync<T>(sql);
return ret;
}
/// <summary>
/// 导出信息
/// </summary>
/// <param name="input">导出查询条件</param>
/// <returns>执行成功返回真</returns>
[UnitOfWork(false)]
[HttpPost]
[Route("export")]
public virtual async Task<ObjectResultDto<string>> ExportAsync(QueryAlreadyPrintDto input)
{
_logger.LogDebug(_errorMessagePrefix + "ExportAsync 进入");
ObjectResultDto<string> ret = new ObjectResultDto<string>();
try
{
string where = GetWhere(input);
//计算分页
int skipNum = 0;
int takeNum = 50000;
List<AlreadyPrintDto> items = await GetEntityListFromToAsync<AlreadyPrintDto>("FisAlreadyPrint", where, "HostSN2", skipNum, takeNum);
//将实体列表转换成excel文件流
IExporter exporter = new ExcelExporter();
byte[] byteArr = await exporter.ExportAsByteArray<AlreadyPrintDto>(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)
{
ret.Status = false;
ret.Message = _errorMessagePrefix + "ExportAsync 执行出错:" + ex.Message;
_logger.LogError(ret.Message);
return ret;
}
}
}
}

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

@ -854,7 +854,7 @@ namespace WY.NewJit.PrintTable
bool containNotMatch = billLst.Any(itm => itm.BillStatus == BillStatusEnum.NotMatch);
if (containNotMatch)
{
var lst = billLst.Where(itm => itm.BillStatus == BillStatusEnum.NotMatch).OrderBy(itm => itm.HostSN2).Select(itm => itm.HostSN2.ToString() + ",").ToList();
var lst = billLst.Where(itm => itm.BillStatus == BillStatusEnum.NotMatch).OrderBy(itm => itm.HostSN2).Select(itm => itm.HostSN2.ToString() + ", ").ToList();
string str = string.Concat(lst);
retLst.Add($"存在未知总成:{str}");
return new ListResultDto<string>(retLst);

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

@ -1611,7 +1611,7 @@
错误信息前缀
</summary>
</member>
<member name="M:WY.NewJit.MsgCheck.UnknownAssemblyAppService.#ctor(Volo.Abp.Domain.Repositories.IRepository{WY.NewJit.MsgCheck.UnknownAssembly,System.Guid},Volo.Abp.Domain.Repositories.IRepository{WY.NewJit.MsgCheck.UnknownAssemblyPart,System.Guid},Microsoft.Extensions.Logging.ILogger{WY.NewJit.MsgCheck.UnknownAssemblyAppService},WY.NewJit.EntityFrameworkCore.NewJitDapperRepository,Volo.Abp.Domain.Repositories.IRepository{WY.NewJit.MsgBaseData.AssemblyCfgVehicle,System.Guid},Volo.Abp.Domain.Repositories.IRepository{WY.NewJit.MsgBaseData.AssemblyCfgErp,System.Guid},Volo.Abp.Domain.Repositories.IRepository{WY.NewJit.MsgBaseData.AssemblyCfgPart,System.Guid},Volo.Abp.Domain.Repositories.IRepository{WY.NewJit.MsgCheck.BillR100,System.Guid},Volo.Abp.Domain.Repositories.IRepository{WY.NewJit.MsgCheck.BillM100,System.Guid},Volo.Abp.BlobStoring.IBlobContainer{WY.NewJit.Common.OurFileContainer},Volo.Abp.Domain.Repositories.IRepository{WY.NewJit.MsgBaseData.AssemblyCfgErp,System.Guid},WY.NewJit.MsgTransmission.PaiGe.MsgTransmissionAppService,WY.NewJit.MsgCheck.R100CheckDomainService,WY.NewJit.MsgCheck.M100CheckDomainService,Volo.Abp.EventBus.Distributed.IDistributedEventBus,Volo.Abp.Domain.Repositories.IRepository{WY.NewJit.MsgBaseData.PartCfg,System.Guid},Volo.Abp.Domain.Repositories.IRepository{WY.NewJit.PrintTable.WaitPrint,System.Guid})">
<member name="M:WY.NewJit.MsgCheck.UnknownAssemblyAppService.#ctor(Volo.Abp.Domain.Repositories.IRepository{WY.NewJit.MsgCheck.UnknownAssembly,System.Guid},Volo.Abp.Domain.Repositories.IRepository{WY.NewJit.MsgCheck.UnknownAssemblyPart,System.Guid},Microsoft.Extensions.Logging.ILogger{WY.NewJit.MsgCheck.UnknownAssemblyAppService},WY.NewJit.EntityFrameworkCore.NewJitDapperRepository,Volo.Abp.Domain.Repositories.IRepository{WY.NewJit.MsgBaseData.AssemblyCfgVehicle,System.Guid},Volo.Abp.Domain.Repositories.IRepository{WY.NewJit.MsgBaseData.AssemblyCfgErp,System.Guid},Volo.Abp.Domain.Repositories.IRepository{WY.NewJit.MsgBaseData.AssemblyCfgPart,System.Guid},Volo.Abp.Domain.Repositories.IRepository{WY.NewJit.MsgCheck.BillR100,System.Guid},Volo.Abp.Domain.Repositories.IRepository{WY.NewJit.MsgCheck.BillM100,System.Guid},Volo.Abp.BlobStoring.IBlobContainer{WY.NewJit.Common.OurFileContainer},Volo.Abp.Domain.Repositories.IRepository{WY.NewJit.MsgBaseData.AssemblyCfgErp,System.Guid},WY.NewJit.MsgTransmission.PaiGe.MsgTransmissionAppService,WY.NewJit.MsgCheck.R100CheckDomainService,WY.NewJit.MsgCheck.M100CheckDomainService,Volo.Abp.EventBus.Distributed.IDistributedEventBus,Volo.Abp.Domain.Repositories.IRepository{WY.NewJit.MsgBaseData.PartCfg,System.Guid},Volo.Abp.Domain.Repositories.IRepository{WY.NewJit.PrintTable.WaitPrint,System.Guid},WY.NewJit.MsgCheck.M100DomainService)">
<summary>
构造函数
</summary>
@ -1863,6 +1863,11 @@
错误信息前缀
</summary>
</member>
<member name="F:WY.NewJit.PrintTable.AlreadyPrintAppService._blobContainer">
<summary>
BLOB存储
</summary>
</member>
<member name="M:WY.NewJit.PrintTable.AlreadyPrintAppService.GetAlreadyPrintListAsync(WY.NewJit.PrintTable.Dtos.QueryAlreadyPrintDto)">
<summary>
已打印列表
@ -1881,6 +1886,13 @@
<param name="pageIndex"></param>
<returns></returns>
</member>
<member name="M:WY.NewJit.PrintTable.AlreadyPrintAppService.ExportAsync(WY.NewJit.PrintTable.Dtos.QueryAlreadyPrintDto)">
<summary>
导出信息
</summary>
<param name="input">导出查询条件</param>
<returns>执行成功返回真</returns>
</member>
<member name="P:WY.NewJit.PrintTable.WaitPrintAppService._errorMessagePrefix">
<summary>
错误信息前缀

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

@ -138,19 +138,30 @@ namespace WY.NewJit.MsgCheck
var m100Ret = await _billM100Repository.UpdateAsync(m100Obj, autoSave);
if (m100Ret != null)
{
if (m100Obj.ProductLine == "08")
{
//更新已解析状态时,只涉及门板记录
WaitPrint mbRec = await _waitPrintRepository.GetAsync(itm => itm.M100Id == m100Ret.Id && itm.BusinessType == BusinessTypeEnum.MenBan);
ConvertWaitPrint(m100Ret, BusinessTypeEnum.MenBan, mbRec);
await _waitPrintRepository.UpdateAsync(mbRec);
}
else
//if (m100Obj.ProductLine == "08")
//{
// //更新已解析状态时,只涉及门板、2条柱护板
// WaitPrint mbRec = await _waitPrintRepository.GetAsync(itm => itm.M100Id == m100Ret.Id && itm.BusinessType == BusinessTypeEnum.MenBan);
// ConvertWaitPrint(m100Ret, BusinessTypeEnum.MenBan, mbRec);
// await _waitPrintRepository.UpdateAsync(mbRec);
//}
//else
//{
// WaitPrint mbRec = await _waitPrintRepository.GetAsync(itm => itm.M100Id == m100Ret.Id && itm.BusinessType == BusinessTypeEnum.MenBan);
// ConvertWaitPrint(m100Ret, BusinessTypeEnum.MenBan, mbRec);
// await _waitPrintRepository.UpdateAsync(mbRec);
//}
//更新已解析状态时,只涉及门板、不涉及柱护板【柱护板一对一解析成功】
List<WaitPrint> wpLst = await _waitPrintRepository.GetListAsync(itm => itm.M100Id == m100Ret.Id && itm.BusinessType == BusinessTypeEnum.MenBan);
foreach (var wp in wpLst)
{
WaitPrint mbRec = await _waitPrintRepository.GetAsync(itm => itm.M100Id == m100Ret.Id && itm.BusinessType == BusinessTypeEnum.MenBan);
ConvertWaitPrint(m100Ret, BusinessTypeEnum.MenBan, mbRec);
await _waitPrintRepository.UpdateAsync(mbRec);
wp.AssemblyID = m100Ret.AssemblyID;
wp.BillStatus = m100Ret.BillStatus;
}
await _waitPrintRepository.UpdateManyAsync(wpLst, autoSave);
return m100Ret;
}
return null;
@ -220,5 +231,49 @@ namespace WY.NewJit.MsgCheck
Dictionary<Guid, List<BillM100Part>> ret = m100Lst.ToDictionary(itm => itm.Id, itm2 => itm2.BillM100Parts);
return ret;
}
/// <summary>
/// 根据M100插入或更新未打印表,【未知总成重新解析时调用】
/// </summary>
/// <param name="m100Obj"></param>
/// <returns></returns>
public async Task<ObjectResultDto> InsertOrUpdateWaitPrintByM100(BillM100 m100Obj, bool autoSave = false)
{
ObjectResultDto ret = new ObjectResultDto(true, "");
List<WaitPrint> wpLst = await _waitPrintRepository.GetListAsync(itm => itm.VIN == m100Obj.VIN && itm.BusinessType == BusinessTypeEnum.MenBan);
bool hasData = wpLst.Count > 0;
if (hasData) //未打印表有数据
{
foreach (WaitPrint wp in wpLst)
{
wp.AssemblyID = m100Obj.AssemblyID;
wp.BillStatus = m100Obj.BillStatus;
}
await _waitPrintRepository.UpdateManyAsync(wpLst, autoSave);
}
else //未打印表没有数据
{
WaitPrint[] wpArr;
if (m100Obj.ProductLine == "08")
{
WaitPrint mbRec = ConvertWaitPrint(m100Obj, BusinessTypeEnum.MenBan);
//WaitPrint zhbOtherRec = ConvertWaitPrint(m100Obj, BusinessTypeEnum.OtherZhuHuBan);
//WaitPrint zhbRec = ConvertWaitPrint(m100Obj, BusinessTypeEnum.AC_ZhuHuBan);
//wpArr = new WaitPrint[3] { mbRec, zhbOtherRec, zhbRec };
wpArr = new WaitPrint[1] { mbRec };
}
else
{
WaitPrint mbRec = ConvertWaitPrint(m100Obj, BusinessTypeEnum.MenBan);
wpArr = new WaitPrint[1] { mbRec };
}
foreach (WaitPrint wp in wpArr)
{
wp.PrintType = PrintTypeEnum.ReplenishPrint;
}
await _waitPrintRepository.InsertManyAsync(wpArr, autoSave); //插入未打印表
}
return ret;
}
}
}

12
src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Job.ConsoleApp/Properties/launchSettings.json

@ -1,8 +1,8 @@
{
//"profiles": {
// "WSL": {
// "commandName": "WSL2",
// "distributionName": ""
// }
//}
"profiles": {
"WSL": {
"commandName": "WSL2",
"distributionName": ""
}
}
}

3
vue/src/router/index.js

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

10
vue/src/router/modules/fisprint.js

@ -35,7 +35,17 @@ const pgfisPrint = {
//roles: ['SettleAccount.Reports'],
icon: '结算对比'
}
},
{
path: '/pg-already-print',
component: () => import('@/views/pg-fis/basedate/alreadyPrint/index.vue'),
name: 'alreadyPrint',//命名路由
meta: {
title: '已打印信息',
//roles: ['SettleAccount.Reports'],
icon: '客户零件'
}
},
]
}

354
vue/src/views/pg-fis/basedate/alreadyPrint/detail.vue

@ -0,0 +1,354 @@
<!--M100上线信息-明细数据-->
<template>
<div class="cr-body-content">
<!--表格渲染-->
<el-table
ref="multipleTable"
v-loading="listLoading"
element-loading-text="拼命加载中..."
element-loading-spinner="el-icon-loading"
class="cr-table"
:data="list"
:height="tableHeight"
:cell-style="cellStyle"
:header-cell-style="headerRowStyle"
size="small"
stripe
border
highlight-current-row
style="width: 100%"
@sort-change="sortChange"
@selection-change="handleSelectionChange"
@row-click="handleRowClick"
:row-key="getRowKeys"
:expand-row-keys="expands"
@expand-change="exChange"
>
<!-- <el-table-column type="selection" width="44px"></el-table-column> -->
<!-- <el-table-column
prop="总成名称"
label="erpAssemblyName"
sortable
width="180"
>
</el-table-column>
<el-table-column
prop="erpAssemblyVersion"
label="总成版本号"
sortable
width="180"
>
style="width: calc(100% - 47px)"
class="two-list"
</el-table-column> -->
<el-table-column type="expand" prop="details">
<template slot-scope="scope">
<el-table :data="scope.row.details">
<el-table-column
prop="partCode"
label="客户零件代码"
></el-table-column>
<el-table-column
prop="partNum"
label="客户零件数量"
></el-table-column>
<el-table-column prop="description" label="描述"></el-table-column>
<el-table-column prop="isKey" label="是否Key件">
<template slot-scope="scope">
<span v-if="scope.row.isKey == true">
<span style="color: #00b46d"></span>
</span>
<span v-else>
<span style="color: #d75c89"></span>
</span>
</template>
</el-table-column>
</el-table>
</template>
</el-table-column>
<el-table-column
v-for="(item, index) in getDefaultField"
:key="index"
:prop="item.prop"
:label="item.label"
:min-width="item.width"
:formatter="fieldFormatter"
sortable="custom"
show-overflow-tooltip
:gutter="0"
>
<template slot="header" slot-scope="scope">
{{ scope.column.label }}
</template>
</el-table-column>
<el-table-column
prop="erpAssemblyVersion"
label="总成版本号"
sortable
width="360"
>
</el-table-column>
</el-table>
<div class="table-footer">
<!-- 分页控件 style="margin-top: -25px;margin-bottom:-25px;float:right;"-->
<pagination
v-show="totalCount > 0"
:total="totalCount"
:page.sync="page"
:limit.sync="listQuery.MaxResultCount"
@pagination="getList"
/>
</div>
</div>
</template>
<script>
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
import permission from "@/directive/permission/index.js";
import CRMTableHead from "../../components/CRMTableHead";
import { downloadFile } from "@/utils/crmindex.js";
import Detail from "./detail";
export default {
name: "sendUnsettledDiffReport",
components: { Pagination, CRMTableHead, Detail },
directives: { permission },
filters: {
IsCustomerSignFilter(status) {
//
const statusMap = {
true: "是",
false: "否",
};
return statusMap[status];
},
},
props: {
customerInfos: {
type: Array,
default: () => {
return [];
},
},
},
data() {
return {
crmType: "stockFisDiffReport",
rules: {
//
erpMaterialCode: [
{ required: true, message: "必须输入!", trigger: "blur" },
],
},
expands: [], //id
getRowKeys: (row) => {
return row.id; //id
},
searchContent: "", //
customerInfo: {
parentId: "",
},
form: {
dicDetailID: "",
customerId: "",
projectId: "",
},
list: null,
totalCount: 0,
listLoading: true,
formLoading: false,
//
filterObj: {
type: Object,
default: () => {
return {};
},
},
listQuery: {
Filters: [
{
logic: 0,
column: "Enabled",
action: 0,
value: "true",
}, //
],
SkipCount: 0,
MaxResultCount: 15,
id: "",
},
page: 1,
dialogFormVisible: false,
multipleSelection: [],
formTitle: "",
drawer: false,
showExcelImport: false,
tableHeight: document.documentElement.clientHeight - 30,
isEdit: false,
};
},
mounted() {
var self = this;
window.onresize = function () {
var offsetHei = document.documentElement.clientHeight;
self.tableHeight = offsetHei - 30;
};
},
created() {
this.getList();
},
watch: {
customerInfos: {
handler(newVal) {
if (newVal == "" || newVal == "undefined") {
//TODO
} else {
newVal.forEach((element) => {
this.customerInfo.parentId = element.ParentId;
});
if (this.customerInfo.parentId != "") {
this.getList();
}
}
},
immediate: true,
},
},
computed: {
/** 列表字段 */
getDefaultField() {
var tempsTabs = [];
tempsTabs.push({
label: "总成编号",
prop: "erpAssemblyCode",
width: 160,
});
tempsTabs.push({
label: "总成名称",
prop: "erpAssemblyName",
width: 160,
});
// tempsTabs.push({
// label: "",
// prop: "erpAssemblyName",
// width: 160,
// });
return tempsTabs;
},
},
methods: {
exChange(row, rowList) {
this.loading = true;
var that = this;
if (rowList.length) {
that.expands = [];
if (row) {
that.expands.push(row.id); // id
}
} else {
that.expands = [];
}
},
/** 刷新列表 */
handleHandle(data) {
if (data.type !== "edit") {
this.getList();
}
},
/** 格式化字段 */
fieldFormatter(row, column) {
return row[column.property] || "--";
},
importExcelData() {
//
this.showExcelImport = false;
this.getList();
},
getList() {
this.listLoading = true;
console.log("详表条件:" + JSON.stringify(this.customerInfo.parentId));
//alert("" + JSON.stringify(this.customerInfo.parentId));
let vehicleAssemblyId = { vehicleAssemblyId: this.customerInfo.parentId };
this.$axios
.gets("/api/newjit/assembly-cfg-vehicle/list", vehicleAssemblyId)
.then((response) => {
this.list = response;
setTimeout(() => {
//
this.listLoading = false;
}, 500);
})
.catch(() => {
this.listLoading = false;
});
},
/** 筛选操作 */
handleFilter() {
this.page = 1;
this.getList();
this.listQuery.Filters = [];
if (this.searchContent != "") {
var column = "partCode";
let filter = {
logic: 0,
column: column,
action: 6,
value: this.searchContent,
};
this.listQuery.Filters.push(filter);
}
this.getList();
},
resetQuery() {},
sortChange(data) {
const { prop, order } = data;
if (!prop || !order) {
this.handleFilter();
return;
}
this.listQuery.Sorting = prop + " " + order;
this.handleFilter();
},
handleSelectionChange(val) {
this.multipleSelection = val;
},
/** 通过回调控制style */
cellStyle({ row, column, rowIndex, columnIndex }) {
if (
column.property === "fisQty" ||
column.property === "diffQty" ||
column.property === "stockQty"
) {
return { textAlign: "right" };
} else {
return { textAlign: "left" };
}
},
/** 通过回调控制表头style */
headerRowStyle({ row, column, rowIndex, columnIndex }) {
if (
column.property === "fisQty" ||
column.property === "diffQty" ||
column.property === "stockQty"
) {
return { textAlign: "right", background: "#FAFAFA" };
} else {
return { textAlign: "left", background: "#FAFAFA" };
}
},
handleRowClick(row, column, event) {
this.$refs.multipleTable.clearSelection();
this.$refs.multipleTable.toggleRowSelection(row);
},
},
};
</script>
<style lang="scss" scoped>
@import "../../../pg-fis/styles/crmtable.scss";
</style>

974
vue/src/views/pg-fis/basedate/alreadyPrint/index.vue

@ -0,0 +1,974 @@
<!--已打印查询模块-->
<template>
<div class="cr-body-content">
<div ref="box">
<flexbox class="content-header">
<el-form
:model="listQuery"
ref="queryForm"
v-show="showSearch"
:inline="true"
>
<el-form-item label="生产线:" prop="productType">
<el-select
v-model="listQuery.productType"
clearable
placeholder="请选择"
size="medium"
style="margin-right: 15px"
@change="ptypeselectChange"
>
<el-option
v-for="item in productTypeList"
:key="item.id"
:label="item.name"
:value="item.id"
/>
</el-select>
</el-form-item>
<el-form-item label="" prop="productLine">
<el-select
v-model="listQuery.productLine"
clearable
placeholder="请选择"
size="medium"
style="margin-right: 10px"
@change="productLineSelectValueChanged"
>
<el-option
v-for="item in PLChildList"
:key="item.id"
:label="item.productLineName"
:value="item.productLineCode"
/>
</el-select>
</el-form-item>
<!-- 柱护板时候显示 -->
<el-form-item
prop="GroupName"
v-show="listQuery.productType == 2"
>
<el-select
v-model="listQuery.GroupName"
clearable
placeholder="请选择"
size="medium"
style="margin-right: 10px"
@change="productLineSelectValueChanged"
>
<el-option
v-for="(item,key) in PLChildGroupList"
:key="key"
:label="item.groupName"
:value="item.groupCode"
/>
</el-select>
</el-form-item>
<!-- <el-row> -->
<el-form-item label="大众顺序号:" prop="hostSN">
<el-input
v-model="listQuery.HostSNBegin"
placeholder=""
clearable
size="small"
style="width: 200px"
@keyup.enter.native="handleKeyup"
/>
</el-form-item>
<el-form-item label="-" prop="HostSNEnd">
<el-input
v-model="listQuery.HostSNEnd"
placeholder=""
clearable
size="small"
style="width: 200px"
@keyup.enter.native="handleKeyup"
/>
</el-form-item>
<el-form-item label="KNR:" prop="KNRBegin">
<el-input
v-model="listQuery.KNRBegin"
placeholder=""
clearable
size="small"
style="width: 200px"
@keyup.enter.native="handleKeyup"
/>
</el-form-item>
<el-form-item label="-" prop="KNREnd">
<el-input
v-model="listQuery.KNREnd"
placeholder=""
clearable
size="small"
style="width: 200px"
@keyup.enter.native="handleKeyup"
/>
</el-form-item>
<!-- </el-row> -->
<!-- <el-row> -->
<el-form-item label="底盘号:" prop="VINBegin">
<el-input
v-model="listQuery.VINBegin"
placeholder=""
clearable
size="small"
style="width: 200px"
@keyup.enter.native="handleKeyup"
/>
</el-form-item>
<el-form-item label="-" prop="VINEnd">
<el-input
v-model="listQuery.VINEnd"
placeholder=""
clearable
size="small"
style="width: 200px"
@keyup.enter.native="handleKeyup"
/>
</el-form-item>
<el-form-item label="上线日期">
<el-date-picker
v-model="listQuery.OnlineTimeValue"
size="small"
style="width: 380px"
value-format="yyyy-MM-dd HH:mm:ss"
type="datetimerange"
:default-time="['00:00:00', '23:59:59']"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
></el-date-picker>
</el-form-item>
<!-- </el-row> -->
<!-- <el-row> -->
<el-form-item label="接收日期">
<el-date-picker
v-model="listQuery.ReceiveTimeValue"
size="small"
style="width: 380px"
value-format="yyyy-MM-dd HH:mm:ss"
type="datetimerange"
:default-time="['00:00:00', '23:59:59']"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
></el-date-picker>
</el-form-item>
<el-form-item label="单据状态" prop="State" v-show="isShowState">
<el-checkbox-group v-model="listQuery.state">
<el-checkbox
v-for="(item, index) in billState"
:key="item.id"
:label="item.id"
@change="billStateCheckChanged(index)"
>
{{ item.name }}
</el-checkbox>
</el-checkbox-group>
</el-form-item>
<el-form-item >
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="handleFilter"
>搜索</el-button
>
<el-button
icon="el-icon-refresh"
size="mini"
@click="resetQuery('queryForm')"
>重置</el-button
>
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
style="margin-left: 15px"
@click="handleDownload()"
>导出(Excel)
</el-button>
</el-form-item>
<!-- </el-row> -->
</el-form>
</flexbox>
</div>
<div class="l-table" style="margin-top: -30px">
<!--表格渲染-->
<el-table
ref="multipleTable"
v-loading="listLoading"
element-loading-text="拼命加载中..."
element-loading-spinner="el-icon-loading"
class="cr-table"
:data="retList"
:height="tableHeight"
:cell-style="cellStyle"
:header-cell-style="headerRowStyle"
size="small"
stripe
border
highlight-current-row
style="width: 100%"
@sort-change="sortChange"
@selection-change="handleSelectionChange"
@row-click="handleRowClick"
>
<el-table-column
label="底盘号"
prop="vin "
sortable="custom"
align="center"
width="180px"
>
<template slot-scope="scope">
<span class="link-type" @click="handleDrawerOpen(scope.row)">{{
scope.row.vin
}}</span>
</template>
</el-table-column>
<el-table-column
v-for="(item, index) in getDefaultField"
:key="index"
:prop="item.prop"
:label="item.label"
:min-width="item.width"
:formatter="fieldFormatter"
sortable="custom"
show-overflow-tooltip
:gutter="0"
>
<template slot="header" slot-scope="scope">
{{ scope.column.label }}
</template>
</el-table-column>
</el-table>
</div>
<div class="table-footer">
<!-- 分页控件 style="margin-top: -25px;margin-bottom:-25px;float:right;"-->
<pagination
v-show="totalCount > 0"
:total="totalCount"
style="float: right"
:page.sync="page"
:limit.sync="listQuery.MaxResultCount"
@pagination="getList"
/>
<!-- 抽屉控件 -->
<el-drawer
title="信息详细页"
size="75%"
direction="rtl"
:visible.sync="drawerShow"
:before-close="handleDrawerClose"
>
<div>
<Detail
v-bind:customerInfos="customerInfos"
style="margin-top: -35px"
></Detail>
</div>
</el-drawer>
</div>
</div>
</template>
<script>
import Pagination from "@/components/Pagination";
import permission from "@/directive/permission/index.js";
import CRMTableHead from "../../components/CRMTableHead";
import importExcel from "@/components/ImportExcel-vw";
import Lockr from "lockr";
import Detail from "./detail.vue";
import { mapGetters } from "vuex";
import moment from "moment";
import { downloadFile } from "@/utils/crmindex.js";
import qs from "qs";
export default {
name: "alreadyPrint",
components: {
Pagination,
CRMTableHead,
importExcel,
Detail,
},
directives: { permission },
data() {
return {
chkindex: 0, //
// rules: {
// erpAssemblyName: [
// { required: true, message: "", trigger: "blur" },
// ],
// },
billState: [
{ id: 1, name: "未解析" },
{ id: 2, name: "已解析" },
{ id: 4, name: "断号" },
],
//valueSelect: "",
customerInfos: [],
//customerInfosMB: [],
//customerInfosZHB: [],
//dialogOptions: [],
//versionValue: "",
//searchContent: "", //
//showExcelImport: false,
//form: {},
drawerShow: false,
retList: null,
totalCount: 0,
listLoading: true, //
customerInfo: {
bomId: "",
},
//
// filterObj: {
// type: Object,
// default: () => {
// return {};
// },
// },
listQuery: {
SkipCount: 0,
MaxResultCount: 15,
productType: 1, //1:2:
ProductLine: undefined,
GroupName:undefined,//
Version: undefined,
printBillNum: undefined,
serialNumBegin: undefined,
serialNumEnd: undefined,
HostSNBegin: undefined,
HostSNEnd: undefined,
KNRBegin: undefined,
KNREnd: undefined,
VINBegin: undefined,
VINEnd: undefined,
OnlineTimeValue: [],
OnlineTimeBegin: undefined,
OnlineTimeEnd: undefined,
ReceiveTimeValue: [],
ReceiveTimeBegin: undefined,
ReceiveTimeEnd: undefined,
billStatus: undefined,
state: [],
ZHBBillStatus: undefined,
Description:undefined
},
//
listExportQuery: {
erpAssemblyCode: undefined,
erpAssemblyName: undefined,
},
//线
listPLQuery: {
BillType: 2,
//UserId: this.userinfo.UserId,
},
// hostSNQuery: {
// productLine: undefined,
// },
// hostCheckQuery: {
// printType: undefined, //0:;1:;2:;
// productLine: undefined,
// beginHostSN: undefined,
// endHostSN: undefined,
// beginVin: undefined,
// endVin: undefined,
// },
// hostPrintQuery: {
// printType: undefined, //0:;1:;2:;
// productLine: undefined,
// beginHostSN: undefined,
// endHostSN: undefined,
// beginVin: undefined,
// endVin: undefined,
// },
// vinPrintQuery: {
// printType: undefined, //0:;1:;2:;
// productLine: undefined,
// beginHostSN: undefined,
// endHostSN: undefined,
// beginVin: undefined,
// endVin: undefined,
// },
// fileQuery: {
// dataname: undefined,
// },
form: {
details: [],
},
page: 1, //
//
showSearch: true,
//drawerShow: false,
//formTitle: "",
//isEdit: false,
//formLoading: false,
tableHeight: document.documentElement.clientHeight - 335,
//detailTableHeight: 250,
//details: [], //
PLList: [], //线
PLChildList: [], //线
PLChildGroupList: [], //线
productTypeList: [
{ id: 1, name: "门板" },
{ id: 2, name: "柱护板" },
],
//isShowHostSN: false,
//isShowVin: false,
isShowState: true, //
};
},
mounted() {
let _this = this
window.addEventListener('resize',function(){
_this.changeMainTableHeight()
})
this.getPLChildGroupList() //
},
created() {
this.billState.forEach((element, index) => {
if (index === 0) {
this.listQuery.state.push(element.id);
}
});
this.getProductLine();
},
computed: {
getDefaultField() {
var tempsTabs = [];
//tempsTabs.push({ label: "", prop: "serialNum", width: 100 });
tempsTabs.push({ label: "大众顺序号", prop: "hostSN", width: 120 });
// tempsTabs.push({
// label: "",
// prop: "vin",
// width: 130,
// });
tempsTabs.push({
label: "KNR",
prop: "knr",
width: 150,
});
tempsTabs.push({
label: "上线时间",
prop: "onlineTime",
width: 150,
});
tempsTabs.push({
label: "接收时间",
prop: "receiveTime",
width: 180,
});
tempsTabs.push({
label: "车型代码",
prop: "vehicleModelCode",
width: 120,
});
// tempsTabs.push({
// label: "",
// prop: "version",
// width: 150,
// });
tempsTabs.push({
label: "产线",
prop: "productLine",
width: 120,
});
tempsTabs.push({
label: "状态",
prop: "billStatus",
width: 120,
});
tempsTabs.push({
label: "顺序号",
prop: "hostSN2",
width: 120,
});
// tempsTabs.push({
// label: "",
// prop: "printBillNum",
// width: 120,
// });
// tempsTabs.push({
// label: "",
// prop: "canNotPrint",
// width: 120,
// });
tempsTabs.push({
label: "R100上线时间",
prop: "r100OnlineTime",
width: 150,
});
tempsTabs.push({
label: "R100接收时间",
prop: "r100ReceiveTime",
width: 180,
});
tempsTabs.push({
label: "备注",
prop: "description",
width: 120,
});
return tempsTabs;
},
...mapGetters(["userInfo"]), //
},
methods: {
//
changeMainTableHeight(){
this.$nextTick(()=>{
var offsetHei = document.documentElement.clientHeight;
//console.log(offsetHei);
let boxH = this.$refs.box.offsetHeight;
this.tableHeight = offsetHeight - boxH - 37 - 79; //57footer79
//this.tableHeight = offsetHei -260
})
},
// PLChildGroupList
getPLChildGroupList(){
this.$axios
.gets(
"/api/newjit/print-template-configuration/group-list",
)
.then((response) => {
if (response.item !== null) {
this.PLChildGroupList= response.item;
}
});
},
//
handleDrawerOpen(param) {
this.drawerShow = true;
//console.log(510)
//console.log(param)
var parentId = param.assemblyID; //id
this.customerInfos = [
{
ParentId: parentId,
},
];
},
handleDrawerClose(done) {
done();
},
// fetchData(id) {
// //
// this.$axios
// .gets("/api/newjit/assembly-cfg-erp/" + id)
// .then((response) => {
// this.form = response.item;
// //this.details = response.item.details;
// //console.log(this.details);
// });
// },
/** 导出功能**/
handleDownload() {
this.listLoading = true;
this.listExportQuery.erpAssemblyCode = this.listQuery.ErpAssemblyCode;
this.listExportQuery.erpAssemblyName = this.listQuery.ErpAssemblyName;
console.log(JSON.stringify(this.listQuery));
this.$axios
.posts("/api/newjit/already-print/export", this.listQuery)
.then((res) => {
let filename = res.item;
this.$axios
.BolbGets("/api/newjit/exclude-part-cfg/download/" + filename)
.then((response) => {
if (filename.indexOf("_") != -1) {
let downName =
filename.slice(0, filename.lastIndexOf("_")) +
filename.slice(filename.lastIndexOf("."));
downloadFile(response, downName);
this.$notify({
title: "成功",
message: "数据-导出成功!",
type: "success",
duration: 2000,
});
} else {
downloadFile(response, filename);
this.$notify({
title: "成功",
message: "数据-导出成功!",
type: "success",
duration: 2000,
});
}
this.listLoading = false;
});
});
this.listLoading = false;
},
/** 重置按钮操作 */
resetQuery(refName) {
this.$refs[refName].resetFields();
this.listQuery.OnlineTimeValue = [];
this.listQuery.ReceiveTimeValue = [];
this.listQuery.state = [];
this.handleKeyup();
this.getProductLine();
},
/** 搜索按钮操作 */
handleKeyup() {
this.listQuery.SkipCount = 1;
//this.getList();
},
// selectValue(params) {
// //
// this.versionValue = params.value;
// this.getList();
// },
// selectOptionsChange(item) {
// this.getList();
// },
// importExcelData() {
// //
// this.showExcelImport = false;
// //this.getList();
// },
/** 刷新列表 */
// handleHandle(data) {
// if (data.type !== "edit") {
// this.getList();
// }
// },
// handleAddDetails() {
// if (this.form.details === undefined) {
// this.form.details = [];
// //console.log(679);
// }
// let obj = {};
// obj.partCode = "";
// obj.partName = "";
// obj.partNum = "";
// obj.isKey = false;
// obj.description = "";
// //console.log(this.form.details);
// this.form.details.push(obj);
// //console.log(688);
// },
// handleDeleteDetails(index) {
// this.form.details.splice(index, 1);
// //console.log(693);
// },
/** 格式化字段 */
fieldFormatter(row, column) {
// if(column.property === "printBillNum"){
// let value = row[column.property]
// if(value!=null&&value.length > 0){
// return "";
// }
// else{
// return "";
// }
// }
if (column.property === "billStatus") {
return { 1: "未解析", 2: "已解析", 3: "已打印", 4: "断号" }[row[column.property]];
}
if (column.property == "onlineTime" || column.property == "receiveTime") {
var date = row[column.property];
if (date == undefined) {
return "";
}
return moment(date).format("YYYY-MM-DD HH:mm:ss");
}
// if (column.property === "canNotPrint") {
// return { true: "", false: "" }[row[column.property]];
// }
return row[column.property] || "--";
},
getList(data) {
this.listLoading = true;
if (data != undefined) {
this.listQuery.SkipCount = (this.page - 1) * data.limit;
} else {
this.listQuery.SkipCount = (this.page - 1) * 15;
}
if (this.listQuery.OnlineTimeValue !== undefined) {
this.listQuery.OnlineTimeBegin = this.listQuery.OnlineTimeValue[0];
this.listQuery.OnlineTimeEnd = this.listQuery.OnlineTimeValue[1];
}
if (this.listQuery.ReceiveTimeValue !== undefined) {
this.listQuery.ReceiveTimeBegin = this.listQuery.ReceiveTimeValue[0];
this.listQuery.ReceiveTimeEnd = this.listQuery.ReceiveTimeValue[1];
}
if (this.chkindex == 2) {
//
//this.listQuery.canNotPrint = true;
this.listQuery.billStatus = 4;
//this.listQuery.ZHBBillStatus = null;
} else {
//this.listQuery.canNotPrint = null;
if (this.listQuery.state !== undefined) {
this.listQuery.billStatus = this.listQuery.state[0];
}
// if (this.listQuery.productType === 2) {
// this.listQuery.ZHBBillStatus = this.listQuery.billStatus;
// } else {
// this.listQuery.ZHBBillStatus = null;
// }
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("M100查询条件:" + JSON.stringify(this.listQuery));
this.$axios
.gets("/api/newjit/already-print/list", this.listQuery)
.then((response) => {
this.retList = response.items;
this.totalCount = response.totalCount;
console.log("M100结果:" + JSON.stringify(this.retList));
setTimeout(() => {
//
this.listLoading = false;
}, 500);
})
.catch(() => {
this.listLoading = false;
});
this.changeMainTableHeight()
},
// getDetialList(partCode) {
// this.listLoading = true;
// console.log("" + JSON.stringify(this.customerInfo.parentId));
// this.$axios
// .gets("/api/newjit/assembly-cfg-erp/" + this.customerInfo.parentId)
// .then((response) => {
// //console.log(partCode)
// if (partCode !== "" && partCode !== undefined) {
// //console.log(partCode)
// this.retList = response.item.details.filter(
// (u) => u.partCode === partCode
// );
// } else {
// this.retList = response.item.details;
// }
// //alert(JSON.stringify(response.Items))
// //this.totalCount = response.totalCount;
// setTimeout(() => {
// //
// this.listLoading = false;
// }, 500);
// })
// .catch(() => {
// this.listLoading = false;
// });
// },
productLineSelectValueChanged(val) {
this.$forceUpdate();
if (this.listQuery.productType === 2) { // 1 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.customerInfosZHB = [];
if (this.listQuery.productType === 1) {
//线
// this.customerInfosMB = [
// {
// PrintType: 1,
// ProductLine: val,
// },
// ];
}
if (this.listQuery.productType === 2) {
//线
// this.customerInfosZHB = [
// {
// PrintType: 1,
// ProductLine: val,
// },
// ];
}
},
//handleImportSAP() {},
handleFilter() {
this.page = 1;
this.getList();
},
sortChange(data) {
const { prop, order } = data;
if (!prop || !order) {
this.handleFilter();
return;
}
this.listQuery.Sorting = prop + " " + order;
this.handleFilter();
},
handleSelectionChange(val) {
this.multipleSelection = val;
},
/** 通过回调控制style */
cellStyle({ row, column, rowIndex, columnIndex }) {
if (column.property === "qty") {
return { textAlign: "right" };
} else {
return { textAlign: "left" };
}
},
/** 通过回调控制表头style */
headerRowStyle({ row, column, rowIndex, columnIndex }) {
if (column.property === "qty") {
return { textAlign: "right", background: "#FAFAFA" };
} else {
return { textAlign: "left", background: "#FAFAFA" };
}
},
handleRowClick(row, column, event) {
this.$refs.multipleTable.clearSelection();
this.$refs.multipleTable.toggleRowSelection(row);
},
//closeDialog() {},
//线
getProductLine() {
this.listPLQuery.UserId = this.userInfo.userId;
this.$axios
.gets("/api/newjit/product-line/list", this.listPLQuery)
.then((response) => {
//console.log(response);
this.PLList = response.item;
this.PLChildList = this.PLList.filter(
(u) => u.productType === parseInt(this.listQuery.productType)
).sort((a, b) => {
return a.productLineCode - b.productLineCode;
});
this.listQuery.productLine = this.PLChildList[0].productLineCode;
if (this.listQuery.productLine != "") {
//线
// this.customerInfosMB = [
// {
// PrintType: 1,
// ProductLine: this.PLChildList[0].productLineCode,
// },
// ];
}
this.getList();
//console.log(this.PLList)
})
.catch(() => {});
},
//线
ptypeselectChange() {
this.$forceUpdate();
//console.log(this.listQuery.productType);
this.PLChildList = this.PLList.filter(
(u) => u.productType === parseInt(this.listQuery.productType)
).sort((a, b) => {
return a.productLineCode - b.productLineCode;
});
this.listQuery.productLine = this.PLChildList[0].productLineCode;
this.changeMainTableHeight()
//console.log(this.PLList)
//
if (this.listQuery.productType === 1) {
this.listQuery.GroupName = undefined
this.$refs.btn1.$el.innerText = "打印门板发货排序单";
this.$refs.btn2.$el.innerText = "重新打印门板发货排序单";
this.$refs.btn3.$el.innerText = "补打门板发货排序单";
this.listQuery.state.push(this.billState[0].id);
this.isShowState = true;
} else if (this.listQuery.productType === 2) {
this.listQuery.GroupName = this.PLChildGroupList[0]
this.$refs.btn1.$el.innerText = "打印柱护板发货排序单";
this.$refs.btn2.$el.innerText = "重新打印柱护板发货排序单";
this.$refs.btn3.$el.innerText = "补打柱护板发货排序单";
this.listQuery.state = [];
this.isShowState = false;
}
},
/*单据状态变更 */
billStateCheckChanged(index) {
this.chkindex = index;
if (this.listQuery.state.length <= 1) {
this.listQuery.state.push(this.billState[index].id);
} else {
this.listQuery.state = [];
this.listQuery.state.push(this.billState[index].id);
}
},
},
};
</script>
<style lang="scss" scoped>
@import "../../../pg-fis/styles/crmtable.scss";
// /**/
// .el-table >>> .DisabledSelection .cell .el-checkbox__inner {
// display: none;
// position: relative;
// }
// /**/
// .el-table >>> .DisabledSelection .cell:before {
// content: "Key";
// position: absolute;
// left: 7px;
// }
.divider1 {
margin: 0;
}
.divider2 {
margin: 10px;
margin-bottom: 20px;
width: 95%;
}
.label1 {
margin-left: 5px;
margin-right: 5px;
}
</style>

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

@ -474,6 +474,8 @@ export default {
if (this.customerInfo.productLine != "") {
inputParam.productLine = this.customerInfo.productLine;
}
inputParam.businessType = this.customerInfo.BusinessType;
inputParam.printType = 2;
console.log('replenish-print-list方法输入参数:' + JSON.stringify(this.listQuery));
this.$axios

Loading…
Cancel
Save