Administrator 3 years ago
parent
commit
c664a9bfa3
  1. 2
      src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/WMSKanBan/IWMSVWKanBanAppService.cs
  2. 4
      src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/WMSSparePart/IWMSSparePartAppService.cs
  3. 322
      src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS-KanBan/WMSKanBanAppService.cs
  4. 326
      src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS-SparePart/WMSSparePartAppService.cs
  5. 160
      src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccount.Application.xml
  6. 61
      vue/src/components/ImportTxt/index.vue
  7. 10
      vue/src/router/modules/fis.js
  8. 25
      vue/src/views/pg-fis/basedate/assemblyCfg/index.vue
  9. 166
      vue/src/views/pg-fis/basedate/customerPartCfg/index.vue
  10. 347
      vue/src/views/pg-fis/basedate/m100BIll/detail.vue
  11. 118
      vue/src/views/pg-fis/basedate/m100BIll/index.vue
  12. 354
      vue/src/views/pg-fis/basedate/m100Online/detail.vue
  13. 82
      vue/src/views/pg-fis/basedate/m100Online/index.vue
  14. 6
      vue/src/views/pg-fis/basedate/productLine/index.vue
  15. 354
      vue/src/views/pg-fis/basedate/r100Online/detail.vue
  16. 106
      vue/src/views/pg-fis/basedate/r100Online/index.vue
  17. 270
      vue/src/views/pg-fis/basedate/unknownAssembly/detail.vue
  18. 1491
      vue/src/views/pg-fis/basedate/unknownAssembly/index.vue
  19. 128
      vue/src/views/pg-fis/basedate/weldingAssembly/index.vue

2
src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/WMSKanBan/IWMSVWKanBanAppService.cs

@ -21,7 +21,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMSKanBan
/// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
/// <returns></returns>
Task<string> WMSVWKanBanUploadExcelImport([FromForm] IFormFileCollection files, Guid branchId, string year, string period, string version, string customerCode);
// Task<string> WMSVWKanBanUploadExcelImport([FromForm] IFormFileCollection files, Guid branchId, string year, string period, string version, string customerCode);

4
src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/WMSSparePart/IWMSSparePartAppService.cs

@ -17,8 +17,8 @@ namespace Win.Sfs.SettleAccount.Entities.WMSSparePart
/// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
/// <returns></returns>
Task<string> WMSSparePartUploadExcelImport([FromForm] IFormFileCollection files, Guid branchId,
string year, string period, string version, string customerCode);
//Task<string> WMSSparePartUploadExcelImport([FromForm] IFormFileCollection files, Guid branchId,
// string year, string period, string version, string customerCode);
/// <summary>
/// 按ID获取唯一实体

322
src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS-KanBan/WMSKanBanAppService.cs

@ -0,0 +1,322 @@
using Magicodes.ExporterAndImporter.Core;
using Magicodes.ExporterAndImporter.Csv;
using Magicodes.ExporterAndImporter.Excel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Guids;
using Win.Sfs.BaseData.ImportExcelCommon;
using Win.Sfs.SettleAccount.Entities.WMSKanBan;
using Win.Sfs.Shared.Filter;
using Shouldly;
using Microsoft.AspNetCore.Mvc;
using Volo.Abp.Caching;
using Win.Abp.Snowflakes;
using Win.Sfs.SettleAccount.CommonManagers;
using Volo.Abp;
using Microsoft.AspNetCore.Http;
using Win.Sfs.SettleAccount.ExcelImporter;
using EFCore.BulkExtensions;
using Win.Sfs.SettleAccount.ExportReports;
using Volo.Abp.Domain.Repositories;
using Win.Sfs.SettleAccount.Constant;
using Microsoft.AspNetCore.Authorization;
using Volo.Abp.Application.Dtos;
namespace Win.Sfs.SettleAccount.Entities.WMS_KanBan
{
/// <summary>
/// 大众看板发货明细
/// </summary>
//[Authorize(SettleAccountPermissions.SettleAccounts.Default)]
//[AllowAnonymous]
[Route("api/settleaccount/WMSVWKanBan")]
public class WMSKanBanAppService : SettleAccountApplicationBase<WMSKanBanSettle>, IWMSVWKanBanAppService
{
private readonly IGuidGenerator _guidGenerator;
private readonly IExcelImportAppService _excelImportService;
private readonly ISettleAccountBranchEfCoreRepository<WMSKanBanVersion, Guid> _versionRepository;
private readonly ISettleAccountBranchEfCoreRepository<WMSKanBanSettle, Guid> _repository;
/// <summary>
/// 构建方法
/// </summary>
/// <param name="guidGenerator">构建UID</param>
/// <param name="repository">仓储接口</param>
/// <param name="cache">缓存</param>
public WMSKanBanAppService(IGuidGenerator guidGenerator,
ISettleAccountBranchEfCoreRepository<WMSKanBanVersion, Guid> versionRepository,
ISettleAccountBranchEfCoreRepository<WMSKanBanSettle, Guid> repository,
IDistributedCache<WMSKanBanSettle> cache,
IExcelImportAppService excelImportService,
ISnowflakeIdGenerator snowflakeIdGenerator,
ICommonManager commonManager
) : base(cache, excelImportService, snowflakeIdGenerator, commonManager)
{
_versionRepository = versionRepository;
_guidGenerator = guidGenerator;
_excelImportService = excelImportService;
_repository = repository;
}
/// <summary>
/// 导入功能
/// </summary>
/// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
/// <returns></returns>
[HttpPost]
[Route("ExcelImport")]
[DisableRequestSizeLimit]
//[Authorize(SettleAccountPermissions.SettleAccounts.Default)]
public async Task<string> WMSVWKanBanUploadExcelImport([FromForm] IFormFileCollection files, Guid branchId, string year, string period, string version, string customerCode)
{
if (string.IsNullOrEmpty(version))
{
throw new BusinessException("版本不能空,必须传入!");
}
List<WMSVWKanBanImportDto> listImport = new List<WMSVWKanBanImportDto>();
ExportImporter _exportImporter = new ExportImporter();
var result = await _exportImporter.UploadExcelImport<WMSVWKanBanImportDto>(files, _excelImportService);
var entityList = ObjectMapper.Map<List<WMSVWKanBanImportDto>, List<WMSKanBanSettle>>(result);
//删除版本
var _versionQuery = _versionRepository.Where(p => p.Version == version);
await _versionQuery.BatchDeleteAsync();
//删除明细
var _query = _repository.Where(p => p.Version == version);
await _query.BatchDeleteAsync();
//插入数据前检验
var checkList = new List<ErrorExportDto>();
var _group = entityList.GroupBy(x => new { x.Kanban, x.MaterialCode, x.Version }).Select(p => new { Count = p.Count(), Kanban = p.Key.Kanban, MaterialCode = p.Key.MaterialCode });
foreach (var itm in _group)
{
if (itm.Count > 1)
{
checkList.Add(new ErrorExportDto(version, customerCode, string.Empty, string.Empty, string.Empty, string.Empty, string.Format("导入的零件号{0},其看板条码号{1}有重复数据,请检查!", itm.MaterialCode, itm.Kanban), string.Empty));
}
}
var _id = GuidGenerator.Create();
var _bomList = new List<WMSKanBanVersion>();
_bomList.Add(new WMSKanBanVersion(_id, branchId, year, period, version, customerCode));
foreach (var itm in entityList)
{
itm.SetValue(GuidGenerator.Create(), branchId, year, period, version, _id);
}
if (checkList.Count > 0)
{
return await ExportErrorReportAsync(checkList);
}
await _repository.GetDbContext().BulkInsertAsync<WMSKanBanSettle>(entityList);
await _versionRepository.GetDbContext().BulkInsertAsync(_bomList);
return ApplicationConsts.SuccessStr;
}
/// <summary>
/// 按ID获取唯一实体
/// </summary>
/// <remarks>
/// 返回实体全部属性
/// </remarks>
/// <param name="id">ID</param>
/// <returns>实体DTO</returns>
[HttpGet]
[Route("{id}")]
[Authorize(SettleAccountPermissions.SettleAccounts.Default)]
virtual public async Task<WMSVWKanBanDto> GetAsync(Guid id)
{
var result = await GetFromCacheAsync(id);
var dto = ObjectMapper.Map<WMSKanBanSettle, WMSVWKanBanDto>(result);
return dto;
}
private async Task<WMSKanBanSettle> GetFromCacheAsync(Guid id)
{
var result = await _repository.GetAsync(id);
return result;
}
private async Task<long> GetCountAsync(WMSVWKanBanRequestDto input)
{
return await _repository.GetCountByFilterAsync(input.BranchId, input.Filters);
}
private async Task<long> GetCountAsync(WMSVWKanBanVersionRequestDto input)
{
return await _versionRepository.GetCountByFilterAsync(input.BranchId, input.Filters);
}
/// <summary>
/// 导出文件
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost]
[Route("Export")]
//[Authorize(SettleAccountPermissions.SettleAccounts.Default)]
virtual public async Task<string> ExportAsync(WMSVWKanBanRequestDto input)
{
IExporter _csv = new CsvExporter();
IExporter _excel = new ExcelExporter();
if (!string.IsNullOrEmpty(input.Version))
{
input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "Version", Logic = EnumFilterLogic.And, Value = input.Version });
}
var entities = await _repository.GetListByFilterAsync(GuidGenerator.Create(), input.Filters, input.Sorting, int.MaxValue,
0, true);
var dtoDetails = ObjectMapper.Map<List<WMSKanBanSettle>, List<WMSVWKanBanExportDto>>(entities);
string _fileName = string.Empty;
//声明导出容器
byte[] result = null;
switch (input.FileType)
{
case 0:
_fileName = string.Format("大众看板发货明细_{0}.csv", input.UserId.ToString());
result = await _csv.ExportAsByteArray(dtoDetails);
break;
case 1:
_fileName = string.Format("大众看板发货明细_{0}.xlsx", input.UserId.ToString());
result = await _excel.ExportAsByteArray(dtoDetails);
break;
}
result.ShouldNotBeNull();
//保存导出文件到服务器存成二进制
await _excelImportService.SaveBlobAsync(
new SaveExcelImportInputDto
{
Name = _fileName,
Content = result
}
);
return _fileName;
}
/// <summary>
/// 根据筛选条件获取实体列表
/// </summary>
/// <remarks>
/// 请求条件包括:筛选条件列表,排序条件,数据数量,页码
/// </remarks>
/// <param name="input">请求条件</param>
/// <returns>实体DTO列表</returns>
[HttpPost]
[Route("list")]
//[Authorize(SettleAccountPermissions.SettleAccounts.Default)]
virtual public async Task<PagedResultDto<WMSVWKanBanDto>> GetListAsync(WMSVWKanBanRequestDto input)
{
if (!string.IsNullOrEmpty(input.Version))
{
input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "Version", Logic = EnumFilterLogic.And, Value = input.Version });
}
else
{
return new PagedResultDto<WMSVWKanBanDto>(0, new List<WMSVWKanBanDto>());
}
var entities = await _repository.GetListByFilterAsync(GuidGenerator.Create(), input.Filters, input.Sorting, input.MaxResultCount,
input.SkipCount, true);
var totalCount = await GetCountAsync(input);
var dtos = ObjectMapper.Map<List<WMSKanBanSettle>, List<WMSVWKanBanDto>>(entities);
return new PagedResultDto<WMSVWKanBanDto>(totalCount, dtos);
}
/// <summary>
/// 获取实体总数
/// </summary>
/// <returns>实体总数</returns>
[HttpGet]
[Route("count")]
[Authorize(SettleAccountPermissions.SettleAccounts.Default)]
virtual public async Task<long> GetTotalCountAsync(Guid branchId)
{
return await _repository.GetCountAsync(branchId);
}
/// <summary>
/// 获取全部实体列表
/// </summary>
/// <returns>实体DTO列表</returns>
[HttpGet]
[Route("all")]
//[Authorize(SettleAccountPermissions.SettleAccounts.Default)]
virtual public async Task<ListResultDto<WMSVWKanBanDto>> GetAllAsync(Guid branchId)
{
var entities = await _repository.GetAllAsync(branchId, true);
var dtos = ObjectMapper.Map<List<WMSKanBanSettle>, List<WMSVWKanBanDto>>(entities);
return new ListResultDto<WMSVWKanBanDto>(dtos);
}
/// <summary>
/// 删除实体
/// </summary>
/// <param name="id">ID</param>
/// <returns>无</returns>
[HttpDelete]
[Route("{id}")]
/// [Authorize(SettleAccountPermissions.SettleAccounts.Delete)]
virtual public async Task DeleteAsync(Guid id)
{
await _repository.DeleteAsync(id);
}
/// <summary>
/// 按IDs删除实体列表
/// </summary>
/// <param name="ids">IDs</param>
/// <returns>是否执行成功</returns>
[HttpPost]
[Route("delete")]
// [Authorize(SettleAccountPermissions.SettleAccounts.Delete)]
virtual public async Task<bool> DeleteListAsync(List<Guid> ids)
{
foreach (var id in ids)
{
var entity = await GetFromCacheAsync(id);
//await Cache.DeleteAsync<SettleAccount>(id.ToString());
}
return await _repository.DeleteListAsync(ids);
}
/// <summary>
/// 版本列表查询
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost]
[Route("listversion")]
public async Task<PagedResultDto<WMSVWKanBanVersionDto>> GetVersionListAsync(WMSVWKanBanVersionRequestDto input)
{
var entities = await _versionRepository.GetListByFilterAsync(input.BranchId, input.Filters, input.Sorting, int.MaxValue,
input.SkipCount, true);
var totalCount = await GetCountAsync(input);
var dtos = ObjectMapper.Map<List<WMSKanBanVersion>, List<WMSVWKanBanVersionDto>>(entities);
return new PagedResultDto<WMSVWKanBanVersionDto>(totalCount, dtos);
}
}
}

326
src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS-SparePart/WMSSparePartAppService.cs

@ -0,0 +1,326 @@
using EFCore.BulkExtensions;
using Magicodes.ExporterAndImporter.Core;
using Magicodes.ExporterAndImporter.Csv;
using Magicodes.ExporterAndImporter.Excel;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Caching;
using Volo.Abp.Domain.Repositories;
using Volo.Abp.Guids;
using Win.Abp.Snowflakes;
using Win.Sfs.BaseData.ImportExcelCommon;
using Win.Sfs.SettleAccount.CommonManagers;
using Win.Sfs.SettleAccount.Constant;
using Win.Sfs.SettleAccount.Entities.WMSSparePart;
using Win.Sfs.SettleAccount.ExcelImporter;
using Win.Sfs.SettleAccount.ExportReports;
using Win.Sfs.Shared.Filter;
using Shouldly;
namespace Win.Sfs.SettleAccount.Entities.WMS_SparePart
{
/// <summary>
/// 大众备件服务
/// </summary>
[Route("api/settleaccount/WMSSparePart")]
public class WMSSparePartAppService : SettleAccountApplicationBase<WMSSparePart>, IWMSSparePartAppService
{
private readonly IGuidGenerator _guidGenerator;
private readonly IExcelImportAppService _excelImportService;
private readonly ISettleAccountBranchEfCoreRepository<WMSSparePartVersion, Guid> _versionRepository;
private readonly ISettleAccountBranchEfCoreRepository<WMSSparePart, Guid> _repository;
/// <summary>
/// 构建方法
/// </summary>
/// <param name="guidGenerator">构建UID</param>
/// <param name="repository">仓储接口</param>
/// <param name="cache">缓存</param>
public WMSSparePartAppService(IGuidGenerator guidGenerator,
ISettleAccountBranchEfCoreRepository<WMSSparePartVersion, Guid> versionRepository,
ISettleAccountBranchEfCoreRepository<WMSSparePart, Guid> repository,
IDistributedCache<WMSSparePart> cache,
IExcelImportAppService excelImportService,
ISnowflakeIdGenerator snowflakeIdGenerator,
ICommonManager commonManager
) : base(cache, excelImportService, snowflakeIdGenerator, commonManager)
{
_versionRepository = versionRepository;
_guidGenerator = guidGenerator;
_excelImportService = excelImportService;
_repository = repository;
}
/// <summary>
/// 导入功能
/// </summary>
/// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
/// <returns></returns>
[HttpPost]
[Route("ExcelImport")]
[DisableRequestSizeLimit]
//[Authorize(SettleAccountPermissions.SettleAccounts.Default)]
public async Task<string> WMSSparePartUploadExcelImport([FromForm] IFormFileCollection files, Guid branchId, string year, string period, string version, string customerCode)
{
if (string.IsNullOrEmpty(version))
{
throw new BusinessException("版本不能空,必须传入!");
}
ExportImporter _exportImporter = new ExportImporter();
var result = await _exportImporter.UploadExcelImport<WMSSparePartImportDto>(files, _excelImportService);
var entityList = ObjectMapper.Map<List<WMSSparePartImportDto>, List<WMSSparePart>>(result);
//删除版本
var _versionQuery = _versionRepository.Where(p => p.Version == version);
await _versionQuery.BatchDeleteAsync();
//删除明细
var _query = _repository.Where(p => p.Version == version);
await _query.BatchDeleteAsync();
//插入数据前检验
var checkList = new List<ErrorExportDto>();
var _group = entityList.GroupBy(x => new { x.LineNumber, x.MaterialCode, x.Version }).Select(p => new { Count = p.Count(), LineNumber = p.Key.LineNumber, MaterialCode = p.Key.MaterialCode });
foreach (var itm in _group)
{
if (string.IsNullOrEmpty(itm.MaterialCode))
{
checkList.Add(new ErrorExportDto(version, customerCode, string.Empty, string.Empty, string.Empty, string.Empty, string.Format("导入的行号为{0}的物料代码为空,请检查!", itm.LineNumber), string.Empty));
}
}
var _id = GuidGenerator.Create();
var _bomList = new List<WMSSparePartVersion>();
_bomList.Add(new WMSSparePartVersion(_id, branchId, year, period, version, customerCode));
foreach (var itm in entityList)
{
itm.SetValue(GuidGenerator.Create(), branchId, year, period, version);
}
if (checkList.Count > 0)
{
return await ExportErrorReportAsync(checkList);
}
await _repository.GetDbContext().BulkInsertAsync<WMSSparePart>(entityList);
await _versionRepository.GetDbContext().BulkInsertAsync(_bomList);
return ApplicationConsts.SuccessStr;
}
/// <summary>
/// 按ID获取唯一实体
/// </summary>
/// <remarks>
/// 返回实体全部属性
/// </remarks>
/// <param name="id">ID</param>
/// <returns>实体DTO</returns>
[HttpGet]
[Route("{id}")]
//[Authorize(SettleAccountPermissions.SettleAccounts.Default)]
virtual public async Task<WMSSparePartDto> GetAsync(Guid id)
{
var result = await GetFromCacheAsync(id);
var dto = ObjectMapper.Map<WMSSparePart, WMSSparePartDto>(result);
return dto;
}
private async Task<WMSSparePart> GetFromCacheAsync(Guid id)
{
var result = await _repository.GetAsync(id);
return result;
}
private async Task<long> GetCountAsync(WMSSparePartRequestDto input)
{
return await _repository.GetCountByFilterAsync(input.BranchId, input.Filters);
}
private async Task<long> GetCountAsync(WMSSparePartVersionRequestDto input)
{
return await _versionRepository.GetCountByFilterAsync(input.BranchId, input.Filters);
}
/// <summary>
/// 导出文件
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost]
[Route("Export")]
//[Authorize(SettleAccountPermissions.SettleAccounts.Default)]
virtual public async Task<string> ExportAsync(WMSSparePartRequestDto input)
{
if (string.IsNullOrEmpty(input.Version))
{
throw new BusinessException("版本不能空,必须传入!");
}
IExporter _csv = new CsvExporter();
IExporter _excel = new ExcelExporter();
if (!string.IsNullOrEmpty(input.Version))
{
input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "Version", Logic = EnumFilterLogic.And, Value = input.Version });
}
var entities = await _repository.GetListByFilterAsync(input.BranchId, input.Filters, input.Sorting, int.MaxValue,
0, true);
var dtoDetails = ObjectMapper.Map<List<WMSSparePart>, List<WMSSparePartExportDto>>(entities);
string _fileName = string.Empty;
//声明导出容器
byte[] result = null;
switch (input.FileType)
{
case 0:
_fileName = string.Format("大众备件发货明细_{0}.csv", input.UserId.ToString());
result = await _csv.ExportAsByteArray(dtoDetails);
break;
case 1:
_fileName = string.Format("大众备件发货明细_{0}.xlsx", input.UserId.ToString());
result = await _excel.ExportAsByteArray(dtoDetails);
break;
}
result.ShouldNotBeNull();
//保存导出文件到服务器存成二进制
await _excelImportService.SaveBlobAsync(
new SaveExcelImportInputDto
{
Name = _fileName,
Content = result
}
);
return _fileName;
}
/// <summary>
/// 根据筛选条件获取实体列表
/// </summary>
/// <remarks>
/// 请求条件包括:筛选条件列表,排序条件,数据数量,页码
/// </remarks>
/// <param name="input">请求条件</param>
/// <returns>实体DTO列表</returns>
[HttpPost]
[Route("list")]
//[Authorize(SettleAccountPermissions.SettleAccounts.Default)]
virtual public async Task<PagedResultDto<WMSSparePartDto>> GetListAsync(WMSSparePartRequestDto input)
{
if (!string.IsNullOrEmpty(input.Version))
{
input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "Version", Logic = EnumFilterLogic.And, Value = input.Version });
}
else
{
return new PagedResultDto<WMSSparePartDto>(0, new List<WMSSparePartDto>());
}
var entities = await _repository.GetListByFilterAsync(input.BranchId, input.Filters, input.Sorting, input.MaxResultCount,
input.SkipCount, true);
var totalCount = await GetCountAsync(input);
var dtos = ObjectMapper.Map<List<WMSSparePart>, List<WMSSparePartDto>>(entities);
return new PagedResultDto<WMSSparePartDto>(totalCount, dtos);
}
/// <summary>
/// 获取实体总数
/// </summary>
/// <returns>实体总数</returns>
[HttpGet]
[Route("count")]
[Authorize(SettleAccountPermissions.SettleAccounts.Default)]
virtual public async Task<long> GetTotalCountAsync(Guid branchId)
{
return await _repository.GetCountAsync(branchId);
}
/// <summary>
/// 获取全部实体列表
/// </summary>
/// <returns>实体DTO列表</returns>
[HttpGet]
[Route("all")]
//[Authorize(SettleAccountPermissions.SettleAccounts.Default)]
virtual public async Task<ListResultDto<WMSSparePartDto>> GetAllAsync(Guid branchId)
{
var entities = await _repository.GetAllAsync(branchId, true);
var dtos = ObjectMapper.Map<List<WMSSparePart>, List<WMSSparePartDto>>(entities);
return new ListResultDto<WMSSparePartDto>(dtos);
}
/// <summary>
/// 删除实体
/// </summary>
/// <param name="id">ID</param>
/// <returns>无</returns>
[HttpDelete]
[Route("{id}")]
/// [Authorize(SettleAccountPermissions.SettleAccounts.Delete)]
virtual public async Task DeleteAsync(Guid id)
{
await _repository.DeleteAsync(id);
}
/// <summary>
/// 按IDs删除实体列表
/// </summary>
/// <param name="ids">IDs</param>
/// <returns>是否执行成功</returns>
[HttpPost]
[Route("delete")]
// [Authorize(SettleAccountPermissions.SettleAccounts.Delete)]
virtual public async Task<bool> DeleteListAsync(List<Guid> ids)
{
foreach (var id in ids)
{
var entity = await GetFromCacheAsync(id);
//await Cache.DeleteAsync<SettleAccount>(id.ToString());
}
return await _repository.DeleteListAsync(ids);
}
/// <summary>
/// 版本列表查询
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost]
[Route("listversion")]
public async Task<PagedResultDto<WMSSparePartVersionDto>> GetVersionListAsync(WMSSparePartVersionRequestDto input)
{
var entities = await _versionRepository.GetListByFilterAsync(input.BranchId, input.Filters, input.Sorting, int.MaxValue,
input.SkipCount, true);
var totalCount = await GetCountAsync(input);
var dtos = ObjectMapper.Map<List<WMSSparePartVersion>, List<WMSSparePartVersionDto>>(entities);
return new PagedResultDto<WMSSparePartVersionDto>(totalCount, dtos);
}
}
}

160
src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccount.Application.xml

@ -1739,6 +1739,166 @@
<param name="input"></param>
<returns></returns>
</member>
<member name="T:Win.Sfs.SettleAccount.Entities.WMS_KanBan.WMSKanBanAppService">
<summary>
大众看板发货明细
</summary>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.WMS_KanBan.WMSKanBanAppService.#ctor(Volo.Abp.Guids.IGuidGenerator,Win.Sfs.SettleAccount.ISettleAccountBranchEfCoreRepository{Win.Sfs.SettleAccount.Entities.WMS_KanBan.WMSKanBanVersion,System.Guid},Win.Sfs.SettleAccount.ISettleAccountBranchEfCoreRepository{Win.Sfs.SettleAccount.Entities.WMS_KanBan.WMSKanBanSettle,System.Guid},Volo.Abp.Caching.IDistributedCache{Win.Sfs.SettleAccount.Entities.WMS_KanBan.WMSKanBanSettle},Win.Sfs.BaseData.ImportExcelCommon.IExcelImportAppService,Win.Abp.Snowflakes.ISnowflakeIdGenerator,Win.Sfs.SettleAccount.CommonManagers.ICommonManager)">
<summary>
构建方法
</summary>
<param name="guidGenerator">构建UID</param>
<param name="repository">仓储接口</param>
<param name="cache">缓存</param>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.WMS_KanBan.WMSKanBanAppService.WMSVWKanBanUploadExcelImport(Microsoft.AspNetCore.Http.IFormFileCollection,System.Guid,System.String,System.String,System.String,System.String)">
<summary>
导入功能
</summary>
<param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
<returns></returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.WMS_KanBan.WMSKanBanAppService.GetAsync(System.Guid)">
<summary>
按ID获取唯一实体
</summary>
<remarks>
返回实体全部属性
</remarks>
<param name="id">ID</param>
<returns>实体DTO</returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.WMS_KanBan.WMSKanBanAppService.ExportAsync(Win.Sfs.SettleAccount.Entities.WMSKanBan.WMSVWKanBanRequestDto)">
<summary>
导出文件
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.WMS_KanBan.WMSKanBanAppService.GetListAsync(Win.Sfs.SettleAccount.Entities.WMSKanBan.WMSVWKanBanRequestDto)">
<summary>
根据筛选条件获取实体列表
</summary>
<remarks>
请求条件包括:筛选条件列表,排序条件,数据数量,页码
</remarks>
<param name="input">请求条件</param>
<returns>实体DTO列表</returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.WMS_KanBan.WMSKanBanAppService.GetTotalCountAsync(System.Guid)">
<summary>
获取实体总数
</summary>
<returns>实体总数</returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.WMS_KanBan.WMSKanBanAppService.GetAllAsync(System.Guid)">
<summary>
获取全部实体列表
</summary>
<returns>实体DTO列表</returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.WMS_KanBan.WMSKanBanAppService.DeleteAsync(System.Guid)">
<summary>
删除实体
</summary>
<param name="id">ID</param>
<returns></returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.WMS_KanBan.WMSKanBanAppService.DeleteListAsync(System.Collections.Generic.List{System.Guid})">
<summary>
按IDs删除实体列表
</summary>
<param name="ids">IDs</param>
<returns>是否执行成功</returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.WMS_KanBan.WMSKanBanAppService.GetVersionListAsync(Win.Sfs.SettleAccount.Entities.WMSKanBan.WMSVWKanBanVersionRequestDto)">
<summary>
版本列表查询
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="T:Win.Sfs.SettleAccount.Entities.WMS_SparePart.WMSSparePartAppService">
<summary>
大众备件服务
</summary>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.WMS_SparePart.WMSSparePartAppService.#ctor(Volo.Abp.Guids.IGuidGenerator,Win.Sfs.SettleAccount.ISettleAccountBranchEfCoreRepository{Win.Sfs.SettleAccount.Entities.WMS_SparePart.WMSSparePartVersion,System.Guid},Win.Sfs.SettleAccount.ISettleAccountBranchEfCoreRepository{Win.Sfs.SettleAccount.Entities.WMS_SparePart.WMSSparePart,System.Guid},Volo.Abp.Caching.IDistributedCache{Win.Sfs.SettleAccount.Entities.WMS_SparePart.WMSSparePart},Win.Sfs.BaseData.ImportExcelCommon.IExcelImportAppService,Win.Abp.Snowflakes.ISnowflakeIdGenerator,Win.Sfs.SettleAccount.CommonManagers.ICommonManager)">
<summary>
构建方法
</summary>
<param name="guidGenerator">构建UID</param>
<param name="repository">仓储接口</param>
<param name="cache">缓存</param>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.WMS_SparePart.WMSSparePartAppService.WMSSparePartUploadExcelImport(Microsoft.AspNetCore.Http.IFormFileCollection,System.Guid,System.String,System.String,System.String,System.String)">
<summary>
导入功能
</summary>
<param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
<returns></returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.WMS_SparePart.WMSSparePartAppService.GetAsync(System.Guid)">
<summary>
按ID获取唯一实体
</summary>
<remarks>
返回实体全部属性
</remarks>
<param name="id">ID</param>
<returns>实体DTO</returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.WMS_SparePart.WMSSparePartAppService.ExportAsync(Win.Sfs.SettleAccount.Entities.WMSSparePart.WMSSparePartRequestDto)">
<summary>
导出文件
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.WMS_SparePart.WMSSparePartAppService.GetListAsync(Win.Sfs.SettleAccount.Entities.WMSSparePart.WMSSparePartRequestDto)">
<summary>
根据筛选条件获取实体列表
</summary>
<remarks>
请求条件包括:筛选条件列表,排序条件,数据数量,页码
</remarks>
<param name="input">请求条件</param>
<returns>实体DTO列表</returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.WMS_SparePart.WMSSparePartAppService.GetTotalCountAsync(System.Guid)">
<summary>
获取实体总数
</summary>
<returns>实体总数</returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.WMS_SparePart.WMSSparePartAppService.GetAllAsync(System.Guid)">
<summary>
获取全部实体列表
</summary>
<returns>实体DTO列表</returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.WMS_SparePart.WMSSparePartAppService.DeleteAsync(System.Guid)">
<summary>
删除实体
</summary>
<param name="id">ID</param>
<returns></returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.WMS_SparePart.WMSSparePartAppService.DeleteListAsync(System.Collections.Generic.List{System.Guid})">
<summary>
按IDs删除实体列表
</summary>
<param name="ids">IDs</param>
<returns>是否执行成功</returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.WMS_SparePart.WMSSparePartAppService.GetVersionListAsync(Win.Sfs.SettleAccount.Entities.WMSSparePart.WMSSparePartVersionRequestDto)">
<summary>
版本列表查询
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="T:Win.Sfs.SettleAccount.FISes.FISAppService">
<summary>
区域相关应用服务

61
vue/src/components/ImportTxt/index.vue

@ -345,6 +345,7 @@ export default {
{
fis: "FIS发运数据",
settleAccount: "R3数据",
AssemblyCfgERP:"总成SAP数据",
}[this.crmType] || ""
);
},
@ -353,6 +354,7 @@ export default {
{
fis: "/api/settleaccount/fis/ExcelImport",
settleAccount: "/api/settleaccount/SettleAccount/ExcelImport",
AssemblyCfgERP:"/api/newjit/assembly-cfg-erp/import",
}[this.crmType] || ""
);
},
@ -362,6 +364,7 @@ export default {
{
fis: "FIS发运数据导入模板.xlsx",
settleAccount: "R3数据模板.xlsx",
AssemblyCfgERP:"BOM-批量导入模板.txt",
}[this.crmType] || ""
);
},
@ -560,24 +563,48 @@ export default {
.posts(webapi, fd)
.then(async (res) => {
console.log("导入条件:" + JSON.stringify(res));
if (res === "Success") {
if (this.isLt2M === "1" && this.isFileType === "1") {
this.$notify({
title: "成功",
message: "数据导入成功!",
type: "success",
duration: 2000,
});
this.stepList[1].status = "finish";
this.resultData.successMessage = "数据导入成功!";
this.stepsActive = 4;
if(this.crmType !== "AssemblyCfgERP"){
if (res === "Success") {
if (this.isLt2M === "1" && this.isFileType === "1") {
this.$notify({
title: "成功",
message: "数据导入成功!",
type: "success",
duration: 2000,
});
this.stepList[1].status = "finish";
this.resultData.successMessage = "数据导入成功!";
this.stepsActive = 4;
}
} else {
this.stepList[0].status = "wait";
this.resultData.errTemplate = res; //
this.resultData.errSize = 1; //0
this.resultData.successMessage = "数据导入失败!";
this.stepsActive = 3;
}
}
else{
console.log(res.status)
if (res.status === true) {
if (this.isLt2M === "1" && this.isFileType === "1") {
this.$notify({
title: "成功",
message: "数据导入成功!",
type: "success",
duration: 2000,
});
this.stepList[1].status = "finish";
this.resultData.successMessage = "数据导入成功!";
this.stepsActive = 4;
}
} else {
this.stepList[0].status = "wait";
this.resultData.errTemplate = res; //
this.resultData.errSize = 1; //0
this.resultData.successMessage = "数据导入失败!";
this.stepsActive = 3;
}
} else {
this.stepList[0].status = "wait";
this.resultData.errTemplate = res; //
this.resultData.errSize = 1; //0
this.resultData.successMessage = "数据导入失败!";
this.stepsActive = 3;
}
this.$emit("status", "finish");
this.loading = false;

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

@ -36,6 +36,16 @@ const pgfis = {
icon: '发货'
}
},
{
path: '/pg-unknownAssembly',
component: () => import('@/views/pg-fis/basedate/unknownAssembly'),
name: 'pg-unknownAssembly',//命名路由
meta: {
title: '未知总成模块管理',
roles: ['SettleAccount.Reports'],
icon: '发货'
}
},
{
path: '/pg-workLine',
component: () => import('@/views/pg-fis/basedate/productLine'),

25
vue/src/views/pg-fis/basedate/assemblyCfg/index.vue

@ -174,7 +174,7 @@
align="center"
>
<template slot-scope="scope">
<span>{{ scope.row.model }}</span>
<span>{{ scope.row.vehicleModel }}</span>
</template>
</el-table-column>
</el-table>
@ -185,6 +185,7 @@
:close-on-click-modal="false"
:title="formTitle"
width="700px"
@close='closeDialog'
>
<el-form
ref="form"
@ -335,6 +336,13 @@
:limit.sync="listQuery.MaxResultCount"
@pagination="getList"
/>
<!-- 导入Excel组件 -->
<importExcel
ref="importexcel"
:show="showExcelImport"
:crmType="crmType"
@close="importExcelData"
/>
</div>
<!-- 抽屉控件 -->
<el-drawer
@ -358,7 +366,7 @@
import Pagination from "@/components/Pagination";
import permission from "@/directive/permission/index.js";
import CRMTableHead from "../../components/CRMTableHead";
import importExcel from "@/components/ImportExcel-vw";
import importExcel from "@/components/ImportTxt";
import Lockr from "lockr";
import moment from "moment";
import Detail from "./detail.vue";
@ -411,7 +419,6 @@ export default {
versionValue: "",
searchContent: "", //
showExcelImport: false,
form: {},
drawer: false,
list: null,
totalCount: 0,
@ -697,8 +704,9 @@ export default {
},
importExcelData() {
//
this.listLoading = false;
this.showExcelImport = false;
//this.getList();
this.getList();
},
/** 刷新列表 */
@ -796,7 +804,11 @@ export default {
},
valueselectChange(){},
handleImportSAP(){},
handleImportSAP(){
//
this.showExcelImport = true;
this.$refs.importexcel.handleImportExcelClick();
},
handleFilter() {
this.page = 1;
@ -849,6 +861,9 @@ export default {
.catch(() => {
});
},
closeDialog(){
//this.multipleSelection = [];//
},
},
};
</script>

166
vue/src/views/pg-fis/basedate/customerPartCfg/index.vue

@ -22,7 +22,7 @@
<el-form-item label="零件代码:" prop="partCode">
<el-input
v-model="partCode"
v-model="listQuery.partCode"
clearable
size="small"
placeholder=""
@ -34,7 +34,7 @@
<el-form-item label="零件名称:" prop="partName">
<el-input
v-model="partName"
v-model="listQuery.partName"
clearable
size="small"
placeholder=""
@ -46,29 +46,35 @@
<el-form-item label="零件类型:" prop="partType">
<el-select
v-model="partType"
v-model="listQuery.partType"
clearable
placeholder="请选择"
size="medium"
style="margin-right: 15px"
@change="valueselectChange"
>
<el-option label="结算" value="R0003"></el-option>
<el-option label="二配" value="R0001"></el-option>
<!-- @change="valueselectChange" -->
<el-option
v-for="item in partType1List"
:key="item.id"
:label="item.dicItemName"
:value="item.dicItemCode"/>
</el-select>
</el-form-item>
<el-form-item label="零件子类型:" prop="partChildType">
<el-form-item label="零件子类型:" prop="partType2">
<el-select
v-model="partChildType"
v-model="listQuery.partType2"
clearable
placeholder="请选择"
size="medium"
style="margin-right: 15px"
@change="valueselectChange"
>
<el-option label="结算" value="R0003"></el-option>
<el-option label="二配" value="R0001"></el-option>
<!-- @change="valueselectChange" -->
<el-option
v-for="item in partType2List"
:key="item.id"
:label="item.dicItemName"
:value="item.dicItemCode"/>
</el-select>
</el-form-item>
@ -274,12 +280,12 @@ export default {
MaxResultCount: 15,
version: "",
//site: "TH",
customerCode: "",
customerCode: undefined,
//userId: "00000000-0000-0000-0000-000000000000",
partCode:"",//
partName:"",//
partType:"",//
partChildType:"",//
partType2:"",//
},
listExportQuery: {
Filters: [
@ -308,26 +314,34 @@ export default {
isEdit: false,
sortState:false, //
partCode:'',
partName:'',
partType:'',
partChildType:'',
partType1Query:{
dicTypeName:"客户零件类型1",
},
partType2Query:{
dicTypeName:"客户零件类型2",
},
partType1List:[],
partType2List:[],
};
},
mounted() {
this.$nextTick(() => {
var offsetHei = document.documentElement.clientHeight;
console.log(offsetHei);
//console.log(offsetHei);
let boxH = this.$refs.box.offsetHeight;
this.tableHeight = offsetHei - boxH - 57 - 79;//57footer79
console.log(this.$refs.box.offsetHeight);
console.log(this.tableHeight);
//console.log(this.$refs.box.offsetHeight);
//console.log(this.tableHeight);
});
},
created() {
//this.getVersionInfo();
//if (this.versionList == []) {
this.getPartType();
this.getList();
//}
},
@ -353,7 +367,7 @@ export default {
});
tempsTabs.push({
label: "零件子类型",
prop: "partChildType",
prop: "partType2",
width: 120,
});
tempsTabs.push({
@ -452,16 +466,16 @@ export default {
//return moment(date).format("YYYY-MM-DD HH:mm:ss");
return moment(date).format("YYYY-MM-DD");
} */
if(column.property === 'customerCode')
if(column.property === "partType")
{
if(row[column.property] === 'R0001')
if(row[column.property] === "1")
{
var vname = '二配';
var vname = '门板';
return vname;
}
else if(row[column.property] === 'R0003')
else if(row[column.property] === '2')
{
var vname = '结算';
var vname = '柱护板';
return vname;
}
else
@ -472,7 +486,7 @@ export default {
return row[column.property] || "--";
},
importExcelData() {
this.getVersionInfo();
//this.getVersionInfo();
this.listLoading = false;
//
this.showExcelImport = false;
@ -480,34 +494,29 @@ export default {
//
async handleDownload() {
this.listLoading = true;
if (this.versionValue === "") {
this.$message.error("必需选择版本!");
this.listLoading = false;
return;
}
if (this.versionValue != "") {
this.listQuery.version = this.versionValue;
}
// if (this.versionValue === "") {
// this.$message.error("");
// this.listLoading = false;
// return;
// }
// if (this.versionValue != "") {
// this.listQuery.version = this.versionValue;
// }
console.log("发票导出:" + JSON.stringify(this.listQuery));
this.$axios
.posts(
"/api/settleaccount/SettlementPart/Export",
"/api/newjit/part-cfg/export",
this.listQuery
)
.then((res) => {
let fileNameOfProject = res;
let filename = res.item;
this.$axios
.BolbGets(
"/api/settleaccount/getblobfile/download/" + fileNameOfProject
)
.BolbGets("/api/newjit/exclude-part-cfg/download/" + filename)
.then((response) => {
if (fileNameOfProject.indexOf("_") != -1) {
if (filename.indexOf("_") != -1) {
let downName =
fileNameOfProject.slice(
0,
fileNameOfProject.lastIndexOf("_")
) +
fileNameOfProject.slice(fileNameOfProject.lastIndexOf("."));
filename.slice(0, filename.lastIndexOf("_")) +
filename.slice(filename.lastIndexOf("."));
downloadFile(response, downName);
this.$notify({
title: "成功",
@ -516,7 +525,7 @@ export default {
duration: 2000,
});
} else {
downloadFile(response, fileNameOfProject);
downloadFile(response, filename);
this.$notify({
title: "成功",
message: "数据-导出成功!",
@ -541,22 +550,22 @@ export default {
}
console.log("列表查询条件:" + JSON.stringify(this.listQuery));
this.$axios
.posts(
.gets(
"/api/newjit/part-cfg/list",
this.listQuery
)
.then((response) => {
this.list = response.items;
this.list.forEach(item => {
if(item.customerCode === 'R0001')
{
item.customerCode = '二配';
}
else if(item.customerCode === 'R0003')
{
item.customerCode = '结算';
}
});
// this.list.forEach(item => {
// if(item.customerCode === 'R0001')
// {
// item.customerCode = '';
// }
// else if(item.customerCode === 'R0003')
// {
// item.customerCode = '';
// }
// });
this.totalCount = response.totalCount;
setTimeout(() => {
//
@ -617,15 +626,15 @@ export default {
this.listQuery.Filters.push(filter);
}
if (this.partChildType != "") {
var column = "partChildType";
if (this.partType2 != "") {
var column = "partType2";
let filter = {
logic: 0,
column: column,
action: 0,
value: this.partChildType,
value: this.partType2,
};
this.listQuery.Filters = this.listQuery.Filters.filter(u => u.column !== "partChildType")
this.listQuery.Filters = this.listQuery.Filters.filter(u => u.column !== "partType2")
this.listQuery.Filters.push(filter);
}
*/
@ -677,9 +686,12 @@ export default {
},
/** 重置按钮操作 */
resetQuery(refName) {
this.OnlineTimeVale = [];
this.ReceiveTimeVale = [];
this.listQuery.partCode = "";
this.listQuery.partName = "";
this.listQuery.partType = "";
this.listQuery.partType2 = "";
this.$refs[refName].resetFields();
this.getPartType()
this.handleFilter();
},
sortChange(data) {
@ -723,6 +735,32 @@ export default {
this.$refs.multipleTable.clearSelection();
this.$refs.multipleTable.toggleRowSelection(row);
},
//
getPartType()
{
this.$axios
.gets(
"/api/newjit/dic/list",this.partType1Query
)
.then((response) => {
console.log(response);
this.partType1List = response.item;
//console.log()
})
.catch(() => {
});
this.$axios
.gets(
"/api/newjit/dic/list",this.partType2Query
)
.then((response) => {
console.log(response);
this.partType2List = response.item;
//console.log()
})
.catch(() => {
});
},
},
};
</script>

347
vue/src/views/pg-fis/basedate/m100BIll/detail.vue

@ -0,0 +1,347 @@
<!--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 - 260,
isEdit: false,
};
},
mounted() {
var self = this;
window.onresize = function () {
var offsetHei = document.documentElement.clientHeight;
self.tableHeight = offsetHei - 190;
};
},
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: "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));
this.$axios
.gets("/api/newjit/bill-m100/"+ this.customerInfo.parentId)
.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 "../../../ux/styles/crmtable.scss";
</style>

118
vue/src/views/pg-fis/basedate/m100BIll/index.vue

@ -320,9 +320,9 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="上线日期:">
<el-form-item label="上线日期:" prop="onlineTime" required>
<el-date-picker
v-model="form.year"
v-model="form.onlineTime"
style="width: 350px"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
@ -362,26 +362,26 @@
>
<!-- <el-table-column type="selection" width="44px"></el-table-column> -->
<el-table-column prop="erpAssemblyCode" label="ERP总成编号" width="150px" >
<!-- <template slot-scope="scope">
<template slot-scope="scope">
<el-input v-model="scope.row.erpAssemblyCode" size="mini" style="width:135px"></el-input>
</template> -->
</template>
</el-table-column>
<el-table-column prop="erpAssemblyName" label="ERP总成名称">
<!-- <template slot-scope="scope">
<template slot-scope="scope">
<el-input v-model="scope.row.erpAssemblyName" size="mini"></el-input>
</template> -->
</template>
</el-table-column>
<el-table-column prop="description" width="35px">
<el-table-column width="35px">
<template slot="header">
<!-- <el-button @click="handleAddDetails" icon="el-icon-plus" type="text"></el-button> -->
<el-button @click="handleAddLeftDetails" icon="el-icon-plus" type="text"></el-button>
</template>
<template slot-scope="scope">
<el-button @click="handleDeleteDetails(scope.$index, scope.row)" icon="el-icon-minus" type="text"></el-button>
<el-button @click="handleLeftDeleteDetails(scope.$index, scope.row)" icon="el-icon-minus" type="text"></el-button>
</template>
</el-table-column>
</el-table>
</el-row>
<el-divider class="divider2" content-position="left">添加ERP总成</el-divider>
<!-- <el-divider class="divider2" content-position="left">添加ERP总成</el-divider>
<el-row>
<el-form-item label="ERP总成编码:" prop="erpAssemblyCode" >
<el-input
@ -420,7 +420,7 @@
</el-row>
<div style="text-align:center;margin: 0px;margin-bottom: 15px;">
<el-button type="primary" @click="leftclick">添加总成</el-button>
</div>
</div> -->
</div>
</el-col>
<el-col :span="12">
@ -454,9 +454,9 @@
<el-input v-model="scope.row.partCode" size="mini" style="width:135px"></el-input>
</template>
</el-table-column>
<el-table-column prop="partName" label="客户零件名称">
<el-table-column prop="description" label="客户零件名称">
<template slot-scope="scope">
<el-input v-model="scope.row.partName" size="mini"></el-input>
<el-input v-model="scope.row.description" size="mini"></el-input>
</template>
</el-table-column>
<el-table-column prop="partNum" label="客户零件数量" width="120px" >
@ -464,17 +464,17 @@
<el-input-number v-model="scope.row.partNum" :min="1" size="mini" style="width:100px"></el-input-number>
</template>
</el-table-column>
<el-table-column prop="description" width="35px">
<el-table-column width="35px">
<template slot="header">
<!-- <el-button @click="handleAddDetails" icon="el-icon-plus" type="text"></el-button> -->
<el-button @click="handleAddRightDetails" icon="el-icon-plus" type="text"></el-button>
</template>
<template slot-scope="scope">
<el-button @click="handleDeleteDetails(scope.$index, scope.row)" icon="el-icon-minus" type="text"></el-button>
<el-button @click="handleRightDeleteDetails(scope.$index, scope.row)" icon="el-icon-minus" type="text"></el-button>
</template>
</el-table-column>
</el-table>
</el-row>
<el-divider class="divider2" content-position="left">添加ERP结算件</el-divider>
<!-- <el-divider class="divider2" content-position="left">添加ERP结算件</el-divider>
<el-row>
<el-form-item label="客户零件代码:" prop="customerPartCode" >
<el-input
@ -507,7 +507,7 @@
</el-row>
<div style="text-align:center;margin: 0px;margin-bottom: 15px;">
<el-button type="primary">添加零件</el-button>
</div>
</div> -->
</div>
</el-col>
</el-row>
@ -559,6 +559,7 @@ import CRMTableHead from "../../components/CRMTableHead";
import importExcel from "@/components/ImportExcel-vw";
import Lockr from "lockr";
import moment from "moment";
import Detail from "./detail.vue";
import { downloadFile } from "@/utils/crmindex.js";
//
@ -574,7 +575,7 @@ const projectTypeKeyValue = bomUnit.reduce((acc, cur) => {
export default {
name: "m100Bill",
components: { Pagination, CRMTableHead, importExcel },
components: { Pagination, CRMTableHead, importExcel, Detail },
directives: { permission },
filters: {
IsCustomerSignFilter(status) {
@ -652,6 +653,11 @@ export default {
//UserId: "00000000-0000-0000-0000-000000000000",
},
form:{
knr:"",
vehicleModelCode:"",
vin:"",
hostSN:"",
onlineTimeVale:"",
leftdetails:[],
rightdetails:[],
},
@ -758,11 +764,12 @@ export default {
this.$refs.form.validate((valid) => {
if (valid) {
console.log("保存参数:" + JSON.stringify(this.form));
console.log(this.form);
this.formLoading = true;
if (this.isEdit) {
//
this.$axios
.puts("/api/newjit/assembly-cfg-erp/" + this.form.id, this.form)
.puts("/api/newjit/new-m100" + this.form.id, this.form)
.then((response) => {
this.formLoading = false;
this.$notify({
@ -875,9 +882,9 @@ export default {
fetchData(id) {
//
this.$axios
.gets("/api/newjit/assembly-cfg-erp/" + id)
.gets("/api/newjit/new-m100/" + id)
.then((response) => {
this.form = response.item;
this.form = response.item.m100Bill;
//this.details = response.item.details;
//console.log(this.details);
});
@ -889,7 +896,7 @@ export default {
this.listExportQuery.erpAssemblyName = this.listQuery.ErpAssemblyName;
console.log(JSON.stringify(this.listExportQuery));
this.$axios
.posts("/api/newjit/assembly-cfg-erp/export", this.listExportQuery)
.posts("/api/newjit/new-m100/export", this.listExportQuery)
.then((res) => {
let filename = res.item;
this.$axios
@ -932,10 +939,10 @@ export default {
this.listQuery.KNREnd = "";
this.listQuery.VINBegin = "";
this.listQuery.VINEnd = "";
this.listQuery.OnlineTimeValue = "";
this.listQuery.OnlineTimeValue = [];
this.listQuery.OnlineTimeBegin = "";
this.listQuery.OnlineTimeEnd = "";
this.listQuery.ReceiveTimeValue = "";
this.listQuery.ReceiveTimeValue = [];
this.listQuery.ReceiveTimeBegin = "";
this.listQuery.ReceiveTimeEnd = "";
this.handleQuery();
@ -968,24 +975,42 @@ export default {
}
},
handleAddDetails() {
if (this.form.details === undefined) {
this.form.details = [];
handleAddLeftDetails() {
this.$forceUpdate();
if (this.form.leftdetails === undefined) {
this.form.leftdetails = [];
//console.log(679);
}
let obj = {};
obj.partCode = "";
obj.partName = "";
obj.partNum = "";
obj.isKey = false;
obj.description = "";
obj.erpAssemblyCode = "";
obj.erpAssemblyName = "";
obj.vehicleModel = this.form.vehicleModel;
console.log(this.form.details);
this.form.details.push(obj);
console.log(this.form.leftdetails);
this.form.leftdetails.push(obj);
//console.log(688);
},
handleDeleteDetails(index){
this.form.details.splice(index, 1);
handleAddRightDetails() {
this.$forceUpdate();
if (this.form.rightdetails === undefined) {
this.form.rightdetails = [];
//console.log(679);
}
let obj = {};
obj.customerPartCode = "";
obj.customerpartName = "";
obj.partQty= "";
console.log(this.form.rightdetails);
this.form.rightdetails.push(obj);
//console.log(688);
},
handleLeftDeleteDetails(index){
this.form.leftdetails.splice(index, 1);
//console.log(693);
},
handleRightDeleteDetails(index){
this.form.rightdetails.splice(index, 1);
//console.log(693);
},
@ -1009,8 +1034,22 @@ export default {
getList() {
this.listLoading = true;
this.listQuery.SkipCount = (this.page - 1) * 10;
console.log(1030)
if(this.listQuery.OnlineTimeValue!== undefined)
{
console.log(1033)
console.log(this.listQuery.OnlineTimeValue)
this.listQuery.OnlineTimeBegin = this.listQuery.OnlineTimeValue[0];
this.listQuery.OnlineTimeEnd = this.listQuery.OnlineTimeValue[1];
}
console.log(this.listQuery.OnlineTimeValue)
if(this.listQuery.ReceiveTimeValue!== undefined)
{
this.listQuery.ReceiveTimeBegin = this.listQuery.ReceiveTimeValue[0];
this.listQuery.ReceiveTimeEnd = this.listQuery.ReceiveTimeValue[1];
}
this.$axios
.gets("/api/newjit/bill-r100/list", this.listQuery)
.gets("/api/newjit/new-m100/list", this.listQuery)
.then((response) => {
this.list = response.items;
this.totalCount = response.totalCount;
@ -1121,6 +1160,7 @@ export default {
//console.log(this.listQuery.productType)
//console.log(this.PLChildList)
},
//
getvehicleModel()
{
this.$axios
@ -1141,7 +1181,7 @@ export default {
let obj = {};
obj.erpAssemblyCode = this.form.erpAssemblyCode;
obj.erpAssemblyName = this.form.erpAssemblyName;
obj.vehicleModel = this.form.vehicleModel;
obj.vehicleModel = this.form.vehicleModelCode;
if (this.form.leftdetails === undefined) {
this.form.leftdetails = [];

354
vue/src/views/pg-fis/basedate/m100Online/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 - 260,
isEdit: false,
};
},
mounted() {
var self = this;
window.onresize = function () {
var offsetHei = document.documentElement.clientHeight;
self.tableHeight = offsetHei - 190;
};
},
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 "../../../ux/styles/crmtable.scss";
</style>

82
vue/src/views/pg-fis/basedate/m100Online/index.vue

@ -39,7 +39,7 @@
v-for="item in PLChildList"
:key="item.id"
:label="item.productLineName"
:value="item.id"/>
:value="item.productLineCode"/>
</el-select>
</el-form-item>
@ -141,7 +141,7 @@
<el-form-item label="上线日期">
<el-date-picker
v-model="listQuery.OnlineTimeVale"
v-model="listQuery.OnlineTimeValue"
size="small"
style="width: 380px"
value-format="yyyy-MM-dd HH:mm:ss"
@ -155,7 +155,7 @@
<!-- <el-row> -->
<el-form-item label="接收日期">
<el-date-picker
v-model="listQuery.ReceiveTimeVale"
v-model="listQuery.ReceiveTimeValue"
size="small"
style="width: 380px"
value-format="yyyy-MM-dd HH:mm:ss"
@ -166,8 +166,8 @@
></el-date-picker>
</el-form-item>
<el-form-item label="单据状态" prop="State">
<el-checkbox-group v-model="listQuery.state" >
<el-checkbox v-for="item in billState" :key="item.id" :label="item.id">
<el-checkbox-group v-model="listQuery.state">
<el-checkbox v-for="(item, index) in billState" :key="item.id" :label="item.id" @change="checkedListChange(index)">
{{ item.name }}
</el-checkbox>
</el-checkbox-group>
@ -294,6 +294,12 @@
:visible.sync="drawer"
:before-close="handleDrawerClose"
>
<div>
<Detail
v-bind:customerInfos="customerInfos"
style="margin-top: -35px"
></Detail>
</div>
</el-drawer>
</div>
</div>
@ -306,6 +312,7 @@ import CRMTableHead from "../../components/CRMTableHead";
import importExcel from "@/components/ImportExcel-vw";
import Lockr from "lockr";
import moment from "moment";
import Detail from "./detail.vue";
import { downloadFile } from "@/utils/crmindex.js";
//
@ -323,7 +330,7 @@ const projectTypeKeyValue = bomUnit.reduce((acc, cur) => {
export default {
name: "M100Online",
components: { Pagination, CRMTableHead, importExcel },
components: { Pagination, CRMTableHead, importExcel, Detail },
directives: { permission },
filters: {
IsCustomerSignFilter(status) {
@ -381,7 +388,7 @@ export default {
MaxResultCount: 15,
productType: 1,
ProductLine: undefined,
version:undefined,
Version:undefined,
serialNumBegin:undefined,
serialNumEnd:undefined,
HostSNBegin:undefined,
@ -390,12 +397,13 @@ export default {
KNREnd:undefined,
VINBegin:undefined,
VINEnd:undefined,
OnlineTimeValue:undefined,
OnlineTimeValue:[],
OnlineTimeBegin:undefined,
OnlineTimeEnd:undefined,
ReceiveTimeValue:undefined,
ReceiveTimeValue:[],
ReceiveTimeBegin:undefined,
ReceiveTimeEnd:undefined,
billStatus:undefined,
state:[],
},
@ -439,6 +447,12 @@ export default {
});
},
created() {
this.billState.forEach((element,index) => {
if(index === 0)
{
this.listQuery.state.push(element.id);
}
});
this.getList();
this.getProductLine();
},
@ -488,6 +502,11 @@ export default {
prop: "r100ReceiveTime",
width: 180,
});
tempsTabs.push({
label: "产线",
prop: "productLine",
width: 120,
});
tempsTabs.push({
label: "备注",
prop: "remark",
@ -500,7 +519,9 @@ export default {
//
handleDrawerOpen(param) {
this.drawer = true;
var parentId = param.id; //id
console.log(510)
console.log(param)
var parentId = param.assemblyID; //id
this.customerInfos = [
{
ParentId: parentId,
@ -525,9 +546,9 @@ export default {
this.listLoading = true;
this.listExportQuery.erpAssemblyCode = this.listQuery.ErpAssemblyCode;
this.listExportQuery.erpAssemblyName = this.listQuery.ErpAssemblyName;
console.log(JSON.stringify(this.listExportQuery));
console.log(JSON.stringify(this.listQuery));
this.$axios
.posts("/api/newjit/assembly-cfg-erp/export", this.listExportQuery)
.posts("/api/newjit/assembly-cfg-erp/export", this.listQuery)
.then((res) => {
let filename = res.item;
this.$axios
@ -563,19 +584,23 @@ export default {
//this.$refs[refName].resetFields();
this.listQuery.billType = "";
this.listQuery.productLine = "";
this.listQuery.version = "";
this.listQuery.Version = "";
this.listQuery.serialNumBegin = "";
this.listQuery.serialNumEnd = "";
this.listQuery.HostSNBegin = "";
this.listQuery.HostSNEnd = "";
this.listQuery.KNRBegin = "";
this.listQuery.KNREnd = "";
this.listQuery.VINBegin = "";
this.listQuery.VINEnd = "";
this.listQuery.OnlineTimeValue = "";
this.listQuery.OnlineTimeValue = [];
this.listQuery.OnlineTimeBegin = "";
this.listQuery.OnlineTimeEnd = "";
this.listQuery.ReceiveTimeValue = "";
this.listQuery.ReceiveTimeValue = [];
this.listQuery.ReceiveTimeBegin = "";
this.listQuery.ReceiveTimeEnd = "";
this.listQuery.state = [];
this.listQuery.billStatus = "";
this.handleQuery();
this.getProductLine();
},
@ -647,6 +672,20 @@ export default {
getList() {
this.listLoading = true;
this.listQuery.SkipCount = (this.page - 1) * 10;
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.listQuery.state!== undefined)
{
this.listQuery.billStatus = this.listQuery.state[0];
}
this.$axios
.gets("/api/newjit/bill-m100/list", this.listQuery)
.then((response) => {
@ -759,6 +798,19 @@ export default {
this.PLChildList = this.PLList.filter(u => u.productType === parseInt(this.listQuery.productType));
//console.log(this.PLList)
},
/*单据状态变更 */
checkedListChange(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>

6
vue/src/views/pg-fis/basedate/productLine/index.vue

@ -394,9 +394,9 @@ export default {
version: "",
customerCode: "",
//userId: "00000000-0000-0000-0000-000000000000",
userName:"",//
name:"",//
productLineCode:"",//线
userName:undefined,//
name:undefined,//
productLineCode:undefined,//线
},
listExportQuery: {
Filters: [

354
vue/src/views/pg-fis/basedate/r100Online/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 - 260,
isEdit: false,
};
},
mounted() {
var self = this;
window.onresize = function () {
var offsetHei = document.documentElement.clientHeight;
self.tableHeight = offsetHei - 190;
};
},
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 "../../../ux/styles/crmtable.scss";
</style>

106
vue/src/views/pg-fis/basedate/r100Online/index.vue

@ -39,7 +39,7 @@
v-for="item in PLChildList"
:key="item.id"
:label="item.productLineName"
:value="item.id"/>
:value="item.productLineCode"/>
</el-select>
</el-form-item>
@ -98,7 +98,7 @@
</el-form-item>
<!-- </el-row> -->
<!-- <el-row> -->
<el-form-item label="底盘号:" prop="VINBegin">
<!-- <el-form-item label="底盘号:" prop="VINBegin">
<el-input
v-model="listQuery.VINBegin"
placeholder=""
@ -117,11 +117,11 @@
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
</el-form-item> -->
<el-form-item label="上线日期">
<el-date-picker
v-model="listQuery.OnlineTimeVale"
v-model="listQuery.OnlineTimeValue"
size="small"
style="width: 380px"
value-format="yyyy-MM-dd HH:mm:ss"
@ -135,7 +135,7 @@
<!-- <el-row> -->
<el-form-item label="接收日期">
<el-date-picker
v-model="listQuery.ReceiveTimeVale"
v-model="listQuery.ReceiveTimeValue"
size="small"
style="width: 380px"
value-format="yyyy-MM-dd HH:mm:ss"
@ -147,7 +147,7 @@
</el-form-item>
<el-form-item label="单据状态" prop="State">
<el-checkbox-group v-model="listQuery.state" >
<el-checkbox v-for="item in billState" :key="item.id" :label="item.id">
<el-checkbox v-for="(item, index) in billState" :key="item.id" :label="item.id" @change="checkedListChange(index)">
{{ item.name }}
</el-checkbox>
</el-checkbox-group>
@ -210,9 +210,9 @@
@row-click="handleRowClick"
>
<!-- <el-table-column
label="底盘号"
prop="vin "
<el-table-column
label="KNR"
prop="knr "
sortable="custom"
align="center"
@ -220,10 +220,10 @@
>
<template slot-scope="scope">
<span class="link-type" @click="handleDrawerOpen(scope.row)">{{
scope.row.vin
scope.row.knr
}}</span>
</template>
</el-table-column> -->
</el-table-column>
<el-table-column
v-for="(item, index) in getDefaultField"
:key="index"
@ -260,6 +260,12 @@
:visible.sync="drawer"
:before-close="handleDrawerClose"
>
<div>
<Detail
v-bind:customerInfos="customerInfos"
style="margin-top: -35px"
></Detail>
</div>
</el-drawer>
</div>
</div>
@ -272,6 +278,7 @@ import CRMTableHead from "../../components/CRMTableHead";
import importExcel from "@/components/ImportExcel-vw";
import Lockr from "lockr";
import moment from "moment";
import Detail from "./detail.vue";
import { downloadFile } from "@/utils/crmindex.js";
//
@ -289,7 +296,7 @@ const projectTypeKeyValue = bomUnit.reduce((acc, cur) => {
export default {
name: "M100Online",
components: { Pagination, CRMTableHead, importExcel },
components: { Pagination, CRMTableHead, importExcel , Detail},
directives: { permission },
filters: {
IsCustomerSignFilter(status) {
@ -347,19 +354,20 @@ export default {
MaxResultCount: 15,
productType: 1,
ProductLine: undefined,
version:undefined,
Version:undefined,
HostSNBegin:undefined,
HostSNBegin:undefined,
KNRBegin:undefined,
KNREnd:undefined,
VINBegin:undefined,
//VINBegin:undefined,
VINEnd:undefined,
OnlineTimeValue:undefined,
OnlineTimeValue:[],
OnlineTimeBegin:undefined,
OnlineTimeEnd:undefined,
ReceiveTimeValue:undefined,
ReceiveTimeValue:[],
ReceiveTimeBegin:undefined,
ReceiveTimeEnd:undefined,
billStatus:undefined,
state:[],
},
@ -402,6 +410,12 @@ export default {
});
},
created() {
this.billState.forEach((element,index) => {
if(index === 0)
{
this.listQuery.state.push(element.id);
}
});
this.getList();
this.getProductLine();
},
@ -415,11 +429,11 @@ export default {
// prop: "vin",
// width: 130,
// });
tempsTabs.push({
label: "KNR",
prop: "knr",
width: 150,
});
// tempsTabs.push({
// label: "KNR",
// prop: "knr",
// width: 150,
// });
tempsTabs.push({
label: "单据状态",
prop: "billState",
@ -455,6 +469,11 @@ export default {
prop: "erpAssemblyName",
width: 180,
});
tempsTabs.push({
label: "产线",
prop: "productLine",
width: 120,
});
tempsTabs.push({
label: "备注",
prop: "remark",
@ -467,7 +486,7 @@ export default {
//
handleDrawerOpen(param) {
this.drawer = true;
var parentId = param.id; //id
var parentId = param.assemblyID; //id
this.customerInfos = [
{
ParentId: parentId,
@ -482,9 +501,9 @@ export default {
this.listLoading = true;
this.listExportQuery.erpAssemblyCode = this.listQuery.ErpAssemblyCode;
this.listExportQuery.erpAssemblyName = this.listQuery.ErpAssemblyName;
console.log(JSON.stringify(this.listExportQuery));
console.log(JSON.stringify(this.listQuery));
this.$axios
.posts("/api/newjit/assembly-cfg-erp/export", this.listExportQuery)
.posts("/api/newjit/bill-r100/export", this.listQuery)
.then((res) => {
let filename = res.item;
this.$axios
@ -520,19 +539,21 @@ export default {
//this.$refs[refName].resetFields();
this.listQuery.billType = "";
this.listQuery.productLine = "";
this.listQuery.version = "";
this.listQuery.Version = "";
this.listQuery.HostSNBegin = "";
this.listQuery.HostSNEnd = "";
this.listQuery.KNRBegin = "";
this.listQuery.KNREnd = "";
this.listQuery.VINBegin = "";
//this.listQuery.VINBegin = "";
this.listQuery.VINEnd = "";
this.listQuery.OnlineTimeValue = "";
this.listQuery.OnlineTimeValue = [];
this.listQuery.OnlineTimeBegin = "";
this.listQuery.OnlineTimeEnd = "";
this.listQuery.ReceiveTimeValue = "";
this.listQuery.ReceiveTimeValue = [];
this.listQuery.ReceiveTimeBegin = "";
this.listQuery.ReceiveTimeEnd = "";
this.listQuery.state = [];
this.listQuery.billStatus = "";
this.handleQuery();
this.getProductLine();
},
@ -604,8 +625,22 @@ export default {
getList() {
this.listLoading = true;
this.listQuery.SkipCount = (this.page - 1) * 10;
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.listQuery.state!== undefined)
{
this.listQuery.billStatus = this.listQuery.state[0];
}
this.$axios
.gets("/api/newjit/bill-m100/list", this.listQuery)
.gets("/api/newjit/bill-r100/list", this.listQuery)
.then((response) => {
this.list = response.items;
this.totalCount = response.totalCount;
@ -714,6 +749,19 @@ export default {
this.PLChildList = this.PLList.filter(u => u.productType === parseInt(this.listQuery.productType));
//console.log(this.PLList)
},
/*单据状态变更 */
checkedListChange(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>

270
vue/src/views/pg-fis/basedate/unknownAssembly/detail.vue

@ -0,0 +1,270 @@
<!--未知总成-明细数据-->
<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"
>
<!-- <el-table-column type="selection" width="44px"></el-table-column> -->
<el-table-column
label="客户零件代码"
prop="partCode "
sortable="custom"
align="center"
width="220px"
>
<template slot-scope="scope">
<span>{{ scope.row.partCode }}</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 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" },
],
},
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 - 260,
isEdit: false,
};
},
mounted() {
var self = this;
window.onresize = function () {
var offsetHei = document.documentElement.clientHeight;
self.tableHeight = offsetHei - 190;
};
},
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: "partCode ", width: 120 });
tempsTabs.push({ label: "客户零件数量", prop: "partNum", width: 95 });
tempsTabs.push({ label: "描述", prop: "description", width: 280 });
return tempsTabs;
},
},
methods: {
/** 刷新列表 */
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));
this.$axios
.gets("/api/newjit/unknown-assembly/" + this.customerInfo.parentId)
.then((response) => {
this.list = response.item.unknownAssemblyParts;
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 }) {
return { textAlign: "left" };
},
/** 通过回调控制表头style */
headerRowStyle({ row, column, rowIndex, columnIndex }) {
return { textAlign: "left", background: "#FAFAFA" };
},
handleRowClick(row, column, event) {
this.$refs.multipleTable.clearSelection();
this.$refs.multipleTable.toggleRowSelection(row);
},
},
};
</script>
<style lang="scss" scoped>
@import "../../styles/crmtable.scss";
</style>
<style lang="scss">
.el-table .cell.el-tooltip {
white-space: pre-wrap;
}

1491
vue/src/views/pg-fis/basedate/unknownAssembly/index.vue

File diff suppressed because it is too large

128
vue/src/views/pg-fis/basedate/weldingAssembly/index.vue

@ -19,9 +19,11 @@
style="margin-right: 15px"
@change="ptypeselectChange"
>
<el-option label="0" value="0"></el-option>
<el-option label="1" value="1"></el-option>
<el-option label="2" value="2"></el-option>
<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">
@ -34,10 +36,10 @@
@change="valueselectChange"
>
<el-option
v-for="item in PLList"
:key="item.productLineCode"
v-for="item in PLChildList"
:key="item.id"
:label="item.productLineName"
:value="item.productLineCode"/>
:value="item.id"/>
</el-select>
</el-form-item>
@ -139,7 +141,7 @@
<el-form-item label="上线日期">
<el-date-picker
v-model="listQuery.OnlineTimeVale"
v-model="listQuery.OnlineTimeValue"
size="small"
style="width: 380px"
value-format="yyyy-MM-dd HH:mm:ss"
@ -153,7 +155,7 @@
<!-- <el-row> -->
<el-form-item label="接收日期">
<el-date-picker
v-model="listQuery.ReceiveTimeVale"
v-model="listQuery.ReceiveTimeValue"
size="small"
style="width: 380px"
value-format="yyyy-MM-dd HH:mm:ss"
@ -164,8 +166,8 @@
></el-date-picker>
</el-form-item>
<el-form-item label="对比状态" prop="State">
<el-checkbox-group v-model="listQuery.state" >
<el-checkbox v-for="item in billState" :key="item.id" :label="item.id">
<el-checkbox-group v-model="listQuery.cstate" >
<el-checkbox v-for="item in compareState" :key="item.id" :label="item.id">
{{ item.name }}
</el-checkbox>
</el-checkbox-group>
@ -192,7 +194,16 @@
size="mini"
style="margin-left: 15px"
@click="handleDownload()"
>导出焊装总成对比
>导出焊装总成对比(Excel)
</el-button>
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
style="margin-left: 15px"
@click="handleDownloadCSV()"
>导出焊装总成对比(CSV)
</el-button>
</el-form-item>
<!-- </el-row> -->
@ -328,7 +339,7 @@ export default {
{ required: true, message: "必须输入!", trigger: "blur" },
],
},
billState:[
compareState:[
{id:0,name:"有焊装无总装"},
{id:1,name:"有焊装有总装"}
],
@ -373,7 +384,9 @@ export default {
ReceiveTimeValue:undefined,
ReceiveTimeBegin:undefined,
ReceiveTimeEnd:undefined,
state:[],
HasR100NotHasM100:undefined,//
HasR100HasM100:undefined,//
cstate:[],
},
listExportQuery: {
@ -400,6 +413,9 @@ export default {
tableHeight: document.documentElement.clientHeight - 335,
detailTableHeight:250,
details:[], //
billStatus:[],
PLChildList:[],//线
productTypeList:[{id:1,name:'门板'},{id:2,name:'柱护板'}]
};
},
mounted() {
@ -413,6 +429,10 @@ export default {
});
},
created() {
this.compareState.forEach((element,index) => {
this.listQuery.cstate.push(element.id);
});
this.getProductLine();
this.getList();
},
computed: {
@ -514,7 +534,45 @@ export default {
this.listExportQuery.erpAssemblyName = this.listQuery.ErpAssemblyName;
console.log(JSON.stringify(this.listExportQuery));
this.$axios
.posts("/api/newjit/assembly-cfg-erp/export", this.listExportQuery)
.posts("/api/newjit/r100-m100-compare/export", this.listExportQuery)
.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;
},
/** 导出功能 */
handleDownloadCSV() {
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/r100-m100-compare/export-CSV", this.listQuery)
.then((res) => {
let filename = res.item;
this.$axios
@ -550,7 +608,9 @@ export default {
//this.$refs[refName].resetFields();
this.listQuery.billType = "";
this.listQuery.productLine = "";
this.listQuery.version = "";
this.listQuery.Version = "";
this.listQuery.serialNumBegin = "";
this.listQuery.serialNumEnd = "";
this.listQuery.HostSNBegin = "";
this.listQuery.HostSNEnd = "";
this.listQuery.KNRBegin = "";
@ -563,6 +623,7 @@ export default {
this.listQuery.ReceiveTimeValue = "";
this.listQuery.ReceiveTimeBegin = "";
this.listQuery.ReceiveTimeEnd = "";
this.listQuery.cstate = [];
this.handleQuery();
this.getProductLine();
},
@ -634,8 +695,38 @@ export default {
getList() {
this.listLoading = true;
this.listQuery.SkipCount = (this.page - 1) * 10;
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];
}
this.listQuery.HasR100NotHasM100 = false;
this.listQuery.HasR100HasM100 = false;
if(this.listQuery.cstate!== undefined && this.listQuery.cstate.length > 0)
{
console.log(this.listQuery.cstate)
this.listQuery.cstate.forEach(element => {
console.log(element)
if(element === 0)
{
this.listQuery.HasR100NotHasM100 = true;
}
if(element === 1)
{
this.listQuery.HasR100HasM100 = true;
}
});
}
this.$axios
.gets("/api/newjit/assembly-cfg-erp/list", this.listQuery)
.gets("/api/newjit/r100-m100-compare/list", this.listQuery)
.then((response) => {
this.list = response.items;
this.totalCount = response.totalCount;
@ -729,7 +820,7 @@ export default {
.then((response) => {
//console.log(response);
this.PLList = response.item;
//console.log(this.PLList);
this.PLChildList = this.PLList.filter(u => u.productType === parseInt(this.listQuery.productType));
})
.catch(() => {
});
@ -738,7 +829,8 @@ export default {
ptypeselectChange()
{
//console.log(this.listQuery.productType);
this.PLList = this.PLList.filter(u => u.productType === this.listQuery.productType);
this.listQuery.productLine = "";
this.PLChildList = this.PLList.filter(u => u.productType === parseInt(this.listQuery.productType));
//console.log(this.PLList);
},
},

Loading…
Cancel
Save