xunyu.guo 3 years ago
parent
commit
4b2c5d756d
  1. 1
      .vs/VSWorkspaceState.json
  2. BIN
      .vs/Win.Sfs.SmartSettlementSystem.PG/v16/.suo
  3. 264
      src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/Wms/WmsJitOutPutDetialDto.cs
  4. 3
      src/Modules/SettleAccount/src/SettleAccount.Application/Entities/CodeSettingTables/CodeSettingAppService.cs
  5. 65
      src/Modules/SettleAccount/src/SettleAccount.Application/Entities/SettleAccounts/SettleAccountAppService.cs
  6. 264
      src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSAppService.cs
  7. 439
      src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSJitAppService.cs
  8. 381
      src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSKanbanAppService.cs
  9. 382
      src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSSharePartAppService.cs
  10. 2
      src/Modules/SettleAccount/src/SettleAccount.Application/Jobs/TaskJobService.cs
  11. 209
      src/Modules/SettleAccount/src/SettleAccount.Application/Reports/ReportServices/ReportMakeService.cs
  12. 249
      src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccount.Application.xml
  13. 78
      src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/TaskJobs/TEA_TASK_SUB.cs
  14. 9
      src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/TaskJobs/TaskJob.cs
  15. 298
      src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/WMS/TaskList.cs
  16. 122
      src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/SettleAccountDbContextModelCreatingExtensions.cs
  17. 16
      src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/InvoiceSettledDetailDiffDapperRepository.cs
  18. 9
      src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/UnSettledDetailDapperRepository.cs
  19. 2
      src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/SettleAccounts/SettleAccountRepository.cs
  20. 2
      src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Tasks/TaskDapperRepository.cs
  21. 2
      src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/UnSettleAccount/UnSettleAccountRepository.cs
  22. 1
      src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/InvoiceSettledDiffExportService.cs
  23. 3
      vue/src/components/ImportExcel-base/index.vue
  24. 20
      vue/src/router/index.js
  25. 44
      vue/src/router/modules/bt_menu.js
  26. 125
      vue/src/router/modules/hq_menu.js
  27. 10
      vue/src/router/modules/vwFisData.js
  28. 181
      vue/src/router/modules/vw_menu.js
  29. 54
      vue/src/router/modules/vw_out_order.js
  30. 2
      vue/src/views/pg-fis/basedate/m100Online/index.vue
  31. 7
      vue/src/views/ux/basedata/index.vue
  32. 2
      vue/src/views/ux/billManage/FisUnSettledDiff/index.vue
  33. 205
      vue/src/views/ux/billManage/InvoiceSettledDetailDiff/index.vue
  34. 5
      vue/src/views/ux/billManage/InvoiceSettledDiff/index.vue
  35. 2
      vue/src/views/ux/billManage/IssuedUnsettled/index.vue
  36. 2
      vue/src/views/ux/billManage/SettleDoorPanel/index.vue
  37. 19
      vue/src/views/ux/billManage/UnInvoiceSettledDetailDiff/index.vue
  38. 19
      vue/src/views/ux/billManage/UnSettleDiffExport/index.vue
  39. 2
      vue/src/views/ux/billManage/UnSettledDiff/index.vue
  40. 7
      vue/src/views/ux/billManage/index.vue
  41. 100
      vue/src/views/ux/billManage/kanBanWithCode/index.vue
  42. 541
      vue/src/views/ux/billManage/kanbanOutOrder/detail.vue
  43. 317
      vue/src/views/ux/billManage/kanbanOutOrder/index.vue
  44. 254
      vue/src/views/ux/billManage/sparePart/index.vue
  45. 616
      vue/src/views/ux/billManage/vwOutOrder/detail.vue
  46. 320
      vue/src/views/ux/billManage/vwOutOrder/index.vue
  47. 594
      vue/src/views/ux/vw/dataInput/hq_bt/index.vue
  48. 594
      vue/src/views/ux/vw/dataInput/hq_f/index.vue
  49. 4
      vue/src/views/ux/vw/dataInput/hq_h/index.vue
  50. 594
      vue/src/views/ux/vw/dataInput/hq_m/index.vue
  51. 6
      vue/static/config.js
  52. 173
      vue/static/tableFieldForSearch.json

1
.vs/VSWorkspaceState.json

@ -2,5 +2,6 @@
"ExpandedNodes": [
""
],
"SelectedNode": "\\SettleAccount.sln (src\\Modules\\SettleAccount\\SettleAccount.sln)",
"PreviewInSolutionExplorer": false
}

BIN
.vs/Win.Sfs.SmartSettlementSystem.PG/v16/.suo

Binary file not shown.

264
src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/Wms/WmsJitOutPutDetialDto.cs

@ -4,10 +4,46 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Win.Sfs.Shared.DtoBase;
namespace Win.Sfs.SettleAccount.Entities.Wms
{
public class WmsJitOutPutDetialDto
public class WmsJitOutPutDto
{
public WmsJitOutPutDto()
{
}
public string Version { set; get; }
public string BillNum { set; get; }
public string Creator { set; get; }
}
public class WmsJitOutPutRequestDto: RequestDtoBase
{
public WmsJitOutPutRequestDto()
{
}
public string Version { set; get; }
public string BillNum { set; get; }
public string Creator { set; get; }
}
public class WmsJitOutPutDetialDto: AuditedEntityDto<Guid>
{
[ImporterHeader(Name = "交货单号")]
public string WmsBillNum { set; get; }
@ -39,6 +75,232 @@ namespace Win.Sfs.SettleAccount.Entities.Wms
}
public class WmsJitOutPutDetialRequestDto: RequestDtoBase
{
[ImporterHeader(Name = "交货单号")]
public string WmsBillNum { set; get; }
[ImporterHeader(Name = "KENN号")]
//KENN号
public string KennCode { set; get; }
[ImporterHeader(Name = "底盘号")]
//底盘号
public string ChassisNumber { set; get; }
[ImporterHeader(Name = "物料号")]
//物料号
public string MaterialCode { set; get; }
[ImporterHeader(Name = "组件组物料")]
//物料号
public string ParentMaterialCode { set; get; }
[ImporterHeader(Name = "物料描述")]
//物料描述
public string MaterialDesc { set; get; }
[ImporterHeader(Name = "物料组(车型)")]
//物料组(车型)
public string MaterialGroup { set; get; }
public string BillNum { set; get; }
}
public class WmsJitRequestDto
{
public string BillNum { set; get; }
public string Version { set; get; }
public List<Guid> Guids { set; get; }
}
public class WmsKanbanOutPutDto: AuditedEntityDto<Guid>
{
public WmsKanbanOutPutDto()
{
}
public string Version { set; get; }
public string BillNum { set; get; }
public string Creator { set; get; }
}
public class WmsKanbanOutPutRequestDto : RequestDtoBase
{
public WmsKanbanOutPutRequestDto()
{
}
public string Version { set; get; }
public string BillNum { set; get; }
public string Creator { set; get; }
}
public class WmsKanbanOutPutDetialDto: AuditedEntityDto<Guid>
{
[ImporterHeader(Name = "交货单号")]
public string WmsBillNum { set; get; }
[ImporterHeader(Name = "订单号")]
//底盘号
public string Kanban { set; get; }
[ImporterHeader(Name = "物料号")]
//物料号
public string MaterialCode { set; get; }
[ImporterHeader(Name = "物料描述")]
//物料描述
public string MaterialDesc { set; get; }
[ImporterHeader(Name = "物料组(车型)")]
//物料组(车型)
public string MaterialGroup { set; get; }
[ImporterHeader(Name = "交货数量")]
public decimal Qty { set; get; }
}
public class WmsKanbanOutPutDetialRequestDto : RequestDtoBase
{
[ImporterHeader(Name = "交货单号")]
public string WmsBillNum { set; get; }
[ImporterHeader(Name = "订单号")]
//底盘号
public string OrderBillNum { set; get; }
[ImporterHeader(Name = "物料号")]
//物料号
public string MaterialCode { set; get; }
[ImporterHeader(Name = "物料描述")]
//物料描述
public string MaterialDesc { set; get; }
[ImporterHeader(Name = "物料组(车型)")]
//物料组(车型)
public string MaterialGroup { set; get; }
}
public class WmsSharePartOutPutDto
{
public WmsSharePartOutPutDto()
{
}
public string Version { set; get; }
public string BillNum { set; get; }
public string Creator { set; get; }
}
public class WmsSharePartOutPutRequestDto : RequestDtoBase
{
public WmsSharePartOutPutRequestDto()
{
}
public string Version { set; get; }
public string BillNum { set; get; }
public string Creator { set; get; }
}
public class WmsSharePartOutPutDetialDto
{
[ImporterHeader(Name = "交货单号")]
public string WmsBillNum { set; get; }
[ImporterHeader(Name = "订单号")]
//底盘号
public string SharePart { set; get; }
[ImporterHeader(Name = "物料号")]
//物料号
public string MaterialCode { set; get; }
[ImporterHeader(Name = "物料描述")]
//物料描述
public string MaterialDesc { set; get; }
[ImporterHeader(Name = "物料组(车型)")]
//物料组(车型)
public string MaterialGroup { set; get; }
[ImporterHeader(Name = "交货数量")]
public decimal Qty { set; get; }
}
public class WmsSharePartOutPutDetialRequestDto : RequestDtoBase
{
[ImporterHeader(Name = "交货单号")]
public string WmsBillNum { set; get; }
[ImporterHeader(Name = "订单号")]
//底盘号
public string Kanban { set; get; }
[ImporterHeader(Name = "物料号")]
//物料号
public string MaterialCode { set; get; }
[ImporterHeader(Name = "物料描述")]
//物料描述
public string MaterialDesc { set; get; }
[ImporterHeader(Name = "物料组(车型)")]
//物料组(车型)
public string MaterialGroup { set; get; }
}

3
src/Modules/SettleAccount/src/SettleAccount.Application/Entities/CodeSettingTables/CodeSettingAppService.cs

@ -196,6 +196,9 @@ namespace Win.Sfs.SettleAccount.Entities.CodeSettingTables
var totalCount = await GetCountAsync(input);
var dtos = ObjectMapper.Map<List<CodeSetting>, List<CodeSettingDto>>(entities);
dtos=dtos.OrderBy(p => p.Value).ToList();
return new PagedResultDto<CodeSettingDto>(totalCount, dtos);
}

65
src/Modules/SettleAccount/src/SettleAccount.Application/Entities/SettleAccounts/SettleAccountAppService.cs

@ -245,33 +245,6 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
[HttpPost]
[Route("testImport")]
[DisableRequestSizeLimit]
@ -288,10 +261,6 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
});
return _taskid;
}
[HttpPost]
[Route("ExcelImport-PG")]
[DisableRequestSizeLimit]
@ -304,13 +273,14 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
customConditionList.Add(new CustomCondition() { Name = "Year", Value = year ?? string.Empty });
customConditionList.Add(new CustomCondition() { Name = "Period", Value = period ?? string.Empty });
customConditionList.Add(new CustomCondition() { Name = "Factory", Value = factory ?? string.Empty });
var _versionQuery = _versionRepository.Where(p => p.Version == version);
_versionQuery.BatchDelete();
var _query = _repository.Where(p => p.Version == version);
_query.BatchDelete();
var _taskid = await _service.ImportEnqueueAsync<ImportTaskArgs>(files, "结算数据", CurrentUser, typeof(SettleAccountImportService), customConditionList, (rs) =>
{
var _versionQuery = _versionRepository.Where(p => p.Version == version);
_versionQuery.BatchDelete();
var _query = _repository.Where(p => p.Version == version);
_query.BatchDelete();
});
return _taskid;
@ -420,17 +390,14 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
{
checkList.Add(new ErrorExportDto(version, customerCode, string.Empty, string.Empty, itm, string.Empty, string.Format("关系表中不存在结算物料号{0}!", itm), string.Empty));
}
foreach (var itm in query)
{
checkList.Add(new ErrorExportDto(version, customerCode, string.Empty, string.Empty, string.Empty, string.Empty, string.Format("ERP物料号{0}底盘号 {1}有重复", itm.Key.MaterialCode, itm.Key.ChassisNumber), string.Empty));
}
if (checkList.Count > 0)
{
return await ExportErrorReportAsync(checkList);
}
var _existls = _preBatchRepository.Where(p => _precodeList.Contains(p.KENNCode)).ToList();
if (_existls.Count > 0)
{
@ -471,8 +438,6 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
var result = await _repository.GetAsync(id);
return result;
}
private async Task<long> GetCountAsync(SettleAccountRequestDto input)
{
return await _repository.GetCountByFilterAsync(input.BranchId, input.Filters);
@ -500,27 +465,13 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
IExporter _csv = new CsvExporter();
IExporter _excel = new ExcelExporter();
//var prebatchList= await _preBatchRepository.GetAllAsync(GuidGenerator.Create());
//if (input.ParentId != Guid.Empty)
//{
// input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "ParentId", Logic = EnumFilterLogic.And, Value = input.ParentId.ToString() });
//}
//var entities = await _repository.GetListByFilterAsync(input.BranchId, input.Filters, input.Sorting, int.MaxValue,
//0, true);
var _query = from itm1 in _preBatchRepository join itm2 in _repository on new { itm1.KENNCode, itm1.Year } equals new { itm2.KENNCode, itm2.Year } where itm2.Version == version select itm2;
var _ls=await _query.ToListAsync();
foreach (var itm in _ls)
{
itm.state = 3;
}
var dtoDetails = ObjectMapper.Map<List<SettleAccount>, List<SettleAccountExportDto>>(_ls);
string _fileName = string.Empty;
//声明导出容器
@ -562,7 +513,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost]
[HttpPost]
[Route("Export")]
//[Authorize(SettleAccountPermissions.SettleAccounts.Default)]
virtual public async Task<string> ExportAsync(SettleAccountRequestDto input)
@ -671,11 +622,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
virtual public async Task<ListResultDto<SettleAccountDto>> GetAllAsync(Guid branchId)
{
var entities = await _repository.GetAllAsync(branchId, true);
var dtos = ObjectMapper.Map<List<SettleAccount>, List<SettleAccountDto>>(entities);
return new ListResultDto<SettleAccountDto>(dtos);
}

264
src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSAppService.cs

@ -1,264 +0,0 @@
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Caching.Distributed;
using AutoMapper;
using System.Linq;
using System.Text;
using Volo.Abp.Guids;
using Volo.Abp.Application.Services;
using Volo.Abp.Caching;
using Volo.Abp.ObjectMapping;
using Win.Sfs.SettleAccount.ExcelImporter;
using Win.Sfs.Shared.CacheBase;
using Win.Utils;
using Volo.Abp.Application.Dtos;
using Win.Sfs.BaseData.ImportExcelCommon;
using Volo.Abp.Domain.Repositories;
using EFCore.BulkExtensions;
using System.IO;
using Microsoft.EntityFrameworkCore;
using Win.Sfs.SettleAccount.Entities.SettleAccountVersion;
using Win.Sfs.SettleAccount.FISes;
using Win.Sfs.Shared.Enums.SettleAccount;
using Win.Sfs.Shared.Filter;
using Shouldly;
using Magicodes.ExporterAndImporter.Csv;
using Magicodes.ExporterAndImporter.Core;
using Magicodes.ExporterAndImporter.Excel;
using System.Data.Common;
using Volo.Abp.Uow;
using Volo.Abp;
using Win.Abp.Snowflakes;
using Win.Sfs.SettleAccount.CommonManagers;
using Win.Sfs.SettleAccount.ExportReports;
using Win.Sfs.SettleAccount.Constant;
using Win.Sfs.SettleAccount.MaterialRelationships;
using Win.Sfs.SettleAccount.Entities.TaskJobs;
using Magicodes.ExporterAndImporter.Core.Models;
using TaskJob.Services;
using TaskJob.EventArgs;
using Win.Sfs.SettleAccount.Entities.WMS;
using Win.Sfs.SettleAccount.Entities.Wms;
using Win.Sfs.SettleAccount.Repository;
using WY.NewJit.Extends.PaiGe.WMS;
namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
{
/// <summary>
/// 大众准时化结算明细导入-R3已结
/// </summary>
//[Authorize(SettleAccountPermissions.SettleAccounts.Default)]
[AllowAnonymous]
[Route("api/settleaccount/wms")]
public class WMSAppService :
ApplicationService
{
private readonly ISettleAccountBranchEfCoreRepository<WmsJitOutPutDetial, Guid> _wmsRepository;
private readonly ISettleAccountBranchEfCoreRepository<WmsJitOutPut, Guid> _wmsVersionRepository;
private readonly WMSEfCoreRepository<WmsJitOutPutDetial> _wmsefRespository;
private readonly WMSEfCoreRepository<TB_BILL> _wmstbRespository;
private readonly ISettleAccountBranchEfCoreRepository<TaskJob, Guid> _job;
private readonly TaskJobService _service;
/// <summary>
/// 构建方法
/// </summary>
/// <param name="guidGenerator">构建UID</param>
/// <param name="repository">仓储接口</param>
/// <param name="cache">缓存</param>
public WMSAppService(
ISettleAccountBranchEfCoreRepository<WmsJitOutPutDetial, Guid> wmsRepository,
ISettleAccountBranchEfCoreRepository<TaskJob, Guid> job,
ISettleAccountBranchEfCoreRepository<WmsJitOutPut, Guid> wmsVersionRepository,
WMSEfCoreRepository<WmsJitOutPutDetial> wmsefRespository,
WMSEfCoreRepository<TB_BILL> wmstbRespository
)
{
_job = job;
_wmstbRespository = wmstbRespository;
_wmsRepository = wmsRepository;
_wmsVersionRepository = wmsVersionRepository;
_wmsefRespository = wmsefRespository;
}
/// <summary>
/// 选择结算明细任务列表,选择相关任务合拼导期间出库表
/// </summary>
/// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
/// <returns></returns>
[HttpGet]
[Route("WmsJitOutPut")]
[DisableRequestSizeLimit]
public async Task<string> WmsJitOutPut(List<Guid> ids, string version)
{
var _joblist=_job.Where(p => ids.Contains(p.Id)).ToList();
var fileList = _joblist.Select(p => p.RealDownFileName).ToList();
List<WmsJitOutPutDetial> _lst = new List<WmsJitOutPutDetial>();
foreach (var filename in fileList)
{
string fileSavePath = Environment.CurrentDirectory + @"\wwwroot\files\host\my-file-container\" + filename;
IExcelImporter Importer = new Magicodes.ExporterAndImporter.Excel.ExcelImporter();
var _list = await Importer.ImportSameSheets<WmsJitOutPutDetialDto, WmsJitOutPutDetial>(fileSavePath);
foreach (var itm in _list)
{
var list = itm.Value.Data.ToList();
_lst.AddRange(list.ToArray());
}
}
var _ls1 = _lst.Where(p => p.ParentMaterialCode == p.MaterialCode).ToList();
var outPutDetail= await _wmsRepository.Where(p => p.Version == version).ToListAsync();
var _billNum="T" + DateTime.Now.ToString("yyyyMMddhhmmssdddd");
var query = from itm1 in _ls1
join itm2 in outPutDetail on
new { itm1.MaterialCode, itm1.KennCode, itm1.ChassisNumber }
equals
new { itm2.MaterialCode, itm2.KennCode, itm2.ChassisNumber } into temp1
from tm1 in temp1.DefaultIfEmpty() where tm1==null
select itm1;
var _wmslst=query.ToList();
foreach (var itm in _wmslst)
{
itm.BillNum = _billNum;
}
await _wmsRepository.GetDbContext().BulkInsertAsync(_wmslst, new BulkConfig() { BulkCopyTimeout = 0 });
int _count= _wmsVersionRepository.Count(p => p.Version == version);
if (_count == 0)
{
var _version = new List<WmsJitOutPut>();
_version.Add(new WmsJitOutPut { Version = version, BillNum = _billNum, Creator = CurrentUser.Email });
await _wmsVersionRepository.GetDbContext().BulkInsertAsync(_version);
}
else
{
var _ls= _wmsVersionRepository.Where(p => p.Version == version).ToList();
foreach (var itm in _ls)
{
itm.BillNum = _billNum;
}
await _wmsVersionRepository.UpdateManyAsync(_ls);
}
//_wmsRepository.Where(p=>p)
return _billNum;
}
[HttpGet]
[Route("WmsJitOutPut-Pass")]
public async Task<bool> WmsJitOutPutPass( string version, List<Guid> p_list=null)
{
if (p_list != null)
{
List<WmsJitOutPutDetial> _ls = new List<WmsJitOutPutDetial>();
if (p_list.Count() > 0)
{
_ls = await _wmsRepository.Where(p => p_list.Contains(p.Id) && p.Version == version && p.State != 2).ToListAsync();
}
else
{
_ls = await _wmsRepository.Where(p => p.Version == version && p.State != 2).ToListAsync();
}
if (_ls.Count() > 0)
{
var _first = _ls.FirstOrDefault();
var _guid = GuidGenerator.Create();
foreach (var itm in _ls)
{
itm.TaskId = _guid;
}
await _wmsefRespository.GetDbContext().BulkInsertAsync(_ls);
var uniapi = new TS_UNI_API(GuidGenerator.Create(), "1", version, "WmsJitOutPutDetail",_first.BillNum, 0,0 ,_guid)
{
TaskId = _guid,
SourceBillNum = _first.BillNum,
TableName = "WmsJitOutPutDetail",
InterfaceType = "1",
Version = version,
SettleAccountState = 0,
WmsState=0
};
var _l = new List<TS_UNI_API>();
_l.Add(uniapi);
await _wmsefRespository.GetDbContext().BulkInsertAsync(_l);
}
}
//_wmsDapper.GetListBySql<WmsJitOutPutDetial>("insert into WmsJitOutPutDetial", false);
//_wmsDapper.DbConnection.ConnectionTimeout = 1200;
//_wmsRepository.Where(p=>p)
return true;
}
[HttpGet]
[Route("WmsJitOutPut-Cancel")]
public async Task<bool> WmsJitOutPutCancel(List<Guid> ids, string version)
{
//var _guid = GuidGenerator.Create();
//foreach (var itm in _ls)
//{
// itm.TaskId = _guid;
//}
var _ls = await _wmsRepository.Where(p => ids.Contains(p.Id) && p.Version == version && p.State == 1).ToListAsync();
var _first = _ls.FirstOrDefault();
if (_ls.Count>0)
{
var _guid = GuidGenerator.Create();
await _wmsefRespository.GetDbContext().BulkInsertAsync(_ls,new BulkConfig() { BulkCopyTimeout=0 });
var uniapi = new TS_UNI_API(GuidGenerator.Create(), "1", version, "WmsJitOutPutDetail", _first.BillNum, 0,0, _guid)
{
TaskId = _guid,
SourceBillNum = _first.BillNum,
TableName = "WmsJitOutPutDetail",
InterfaceType = "1",
Version = version,
WmsState = 0,
SettleAccountState=0
};
var _l = new List<TS_UNI_API>();
_l.Add(uniapi);
await _wmsefRespository.GetDbContext().BulkInsertAsync(_l);
}
return true;
}
}
}

439
src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSJitAppService.cs

@ -0,0 +1,439 @@
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Caching.Distributed;
using AutoMapper;
using System.Linq;
using System.Text;
using Volo.Abp.Guids;
using Volo.Abp.Application.Services;
using Volo.Abp.Caching;
using Volo.Abp.ObjectMapping;
using Win.Sfs.SettleAccount.ExcelImporter;
using Win.Sfs.Shared.CacheBase;
using Win.Utils;
using Volo.Abp.Application.Dtos;
using Win.Sfs.BaseData.ImportExcelCommon;
using Volo.Abp.Domain.Repositories;
using EFCore.BulkExtensions;
using System.IO;
using Microsoft.EntityFrameworkCore;
using Win.Sfs.SettleAccount.Entities.SettleAccountVersion;
using Win.Sfs.SettleAccount.FISes;
using Win.Sfs.Shared.Enums.SettleAccount;
using Win.Sfs.Shared.Filter;
using Shouldly;
using Magicodes.ExporterAndImporter.Csv;
using Magicodes.ExporterAndImporter.Core;
using Magicodes.ExporterAndImporter.Excel;
using System.Data.Common;
using Volo.Abp.Uow;
using Volo.Abp;
using Win.Abp.Snowflakes;
using Win.Sfs.SettleAccount.CommonManagers;
using Win.Sfs.SettleAccount.ExportReports;
using Win.Sfs.SettleAccount.Constant;
using Win.Sfs.SettleAccount.MaterialRelationships;
using Win.Sfs.SettleAccount.Entities.TaskJobs;
using Magicodes.ExporterAndImporter.Core.Models;
using TaskJob.Services;
using TaskJob.EventArgs;
using Win.Sfs.SettleAccount.Entities.WMS;
using Win.Sfs.SettleAccount.Entities.Wms;
using Win.Sfs.SettleAccount.Repository;
using WY.NewJit.Extends.PaiGe.WMS;
namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
{
/// <summary>
/// wms出库
/// </summary>
[AllowAnonymous]
[Route("api/settleaccount/wmsjitoutput")]
public class WMSJitAppService :
ApplicationService
{
private readonly ISettleAccountBranchEfCoreRepository<WmsJitOutPutDetial, Guid> _wmsRepository;
private readonly ISettleAccountBranchEfCoreRepository<WmsJitOutPut, Guid> _wmsVersionRepository;
private readonly WMSEfCoreRepository<WmsJitOutPutDetial> _wmsefRespository;
private readonly WMSEfCoreRepository<TB_BILL> _wmstbRespository;
private readonly ISettleAccountBranchEfCoreRepository<TaskJob, Guid> _job;
private readonly IExcelImportAppService _excelImportService;
private readonly TaskJobService _service;
/// <summary>
///
/// </summary>
/// <param name="wmsRepository"></param>
/// <param name="job"></param>
/// <param name="wmsVersionRepository"></param>
/// <param name="wmsefRespository"></param>
/// <param name="wmstbRespository"></param>
public WMSJitAppService(
IExcelImportAppService excelImportService,
ISettleAccountBranchEfCoreRepository<WmsJitOutPutDetial, Guid> wmsRepository,
ISettleAccountBranchEfCoreRepository<TaskJob, Guid> job,
ISettleAccountBranchEfCoreRepository<WmsJitOutPut, Guid> wmsVersionRepository,
WMSEfCoreRepository<WmsJitOutPutDetial> wmsefRespository,
WMSEfCoreRepository<TB_BILL> wmstbRespository
)
{
_job = job;
_wmstbRespository = wmstbRespository;
_wmsRepository = wmsRepository;
_wmsVersionRepository = wmsVersionRepository;
_wmsefRespository = wmsefRespository;
_excelImportService = excelImportService;
}
[HttpPost]
[Route("ExcelImport")]
[DisableRequestSizeLimit]
//[Authorize(SettleAccountPermissions.SettleAccounts.Default)]
public async Task<string> ExcelImport([FromForm] IFormFileCollection files, string version)
{
var _billNum = "T" + DateTime.Now.ToString("yyyyMMddhhmmss");
ExportImporter _exportImporter = new ExportImporter();
var result = await _exportImporter.ExtendExcelImport<WmsJitOutPutDetial>(files, _excelImportService);
List<WmsJitOutPutDetial> _lst = new List<WmsJitOutPutDetial>();
var _lsCopy = new List<WmsJitOutPutDetial>();
foreach (var itm in result)
{
WmsJitOutPutDetial _detail = new WmsJitOutPutDetial(
GuidGenerator.Create(),
itm.WmsBillNum,
itm.KennCode,
itm.ChassisNumber,
itm.MaterialCode,
itm.MaterialDesc,
itm.MaterialGroup,
string.Empty,
string.Empty,
0,
string.Empty,
string.Empty,
version,
itm.ParentMaterialCode,
itm.BillNum,
GuidGenerator.Create()
, string.Empty
, itm.Qty
);
_lsCopy.Add(_detail);
}
_lst.AddRange(_lsCopy.ToArray());
var _ls1 = _lst.Where(p => p.ParentMaterialCode == p.MaterialCode).ToList();
var outPutDetail = await _wmsRepository.Where(p => p.Version == version).ToListAsync();
var query = from itm1 in _ls1
join itm2 in outPutDetail on
new { itm1.MaterialCode, itm1.KennCode, itm1.ChassisNumber }
equals
new { itm2.MaterialCode, itm2.KennCode, itm2.ChassisNumber } into temp1
from tm1 in temp1.DefaultIfEmpty()
where tm1 == null
select itm1;
var _wmslst = query.ToList();
foreach (var itm in _wmslst)
{
itm.BillNum = _billNum;
}
await _wmsRepository.GetDbContext().BulkInsertAsync(_wmslst, new BulkConfig() { BulkCopyTimeout = 0, BatchSize = 10000 });
int _count = _wmsVersionRepository.Count(p => p.Version == version && p.BillNum == _billNum);
if (_count == 0)
{
var _version = new WmsJitOutPut(GuidGenerator.Create(), version, _billNum, CurrentUser.Email);
await _wmsVersionRepository.InsertAsync(_version, true);
}
return _billNum;
}
private async Task<long> GetCountAsync(WmsJitOutPutDetialRequestDto input)
{
input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "BillNum", Logic = EnumFilterLogic.And, Value = input.BillNum });
return await _wmsRepository.GetCountByFilterAsync(GuidGenerator.Create(), input.Filters);
}
private async Task<long> GetCountAsync(WmsJitOutPutRequestDto input)
{
return await _wmsVersionRepository.GetCountByFilterAsync(GuidGenerator.Create(), input.Filters);
}
/// <summary>
/// 准时化出库主表
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost]
[Route("WmsJitList")]
//[Authorize(SettleAccountPermissions.SettleAccounts.Default)]
virtual public async Task<PagedResultDto<WmsJitOutPut>> GetListAsync( WmsJitOutPutRequestDto input)
{
var entities = await _wmsVersionRepository.GetListByFilterAsync(GuidGenerator.Create(), input.Filters, input.Sorting, input.MaxResultCount,
input.SkipCount, true);
var totalCount = await GetCountAsync(input);
return new PagedResultDto<WmsJitOutPut>(totalCount, entities);
}
/// <summary>
/// 准时化出库明细
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost]
[Route("WmsJitDetailList")]
//[Authorize(SettleAccountPermissions.SettleAccounts.Default)]
virtual public async Task<PagedResultDto<WmsJitOutPutDetial>> GetListAsync(WmsJitOutPutDetialRequestDto input)
{
input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "BillNum", Logic = EnumFilterLogic.And, Value =input.BillNum });
var entities = await _wmsRepository.GetListByFilterAsync(GuidGenerator.Create(), input.Filters, input.Sorting, input.MaxResultCount,
input.SkipCount, true);
var totalCount = await GetCountAsync(input);
//var dtoDetails = ObjectMapper.Map<List<WmsJitOutPutDetial>, List<WmsJitOutPutDetialDto>>(entities);
return new PagedResultDto<WmsJitOutPutDetial>(totalCount, entities);
}
/// <summary>
/// 任务明细标记已确认
/// </summary>
/// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
/// <returns></returns>
[HttpPost]
[Route("WmsJitOutPutAudit")]
[DisableRequestSizeLimit]
public async Task<bool> WmsJitAudit(List<Guid> ids)
{
var _joblist =await _job.Where(p => ids.Contains(p.Id)).ToListAsync();
foreach (var itm in _joblist)
{
itm.FileName = "已确认";
await _job.UpdateAsync(itm);
}
return true;
}
/// <summary>
/// 任务明细标记已确认
/// </summary>
/// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
/// <returns></returns>
[HttpPost]
[Route("WmsJitOutPutCancel")]
[DisableRequestSizeLimit]
public async Task<bool> WmsJitCancel(List<Guid> ids)
{
var _joblist = await _job.Where(p => ids.Contains(p.Id) && p.FileName=="已确认").ToListAsync();
foreach (var itm in _joblist)
{
itm.FileName = "取消确认";
await _job.UpdateAsync(itm);
}
return true;
}
/// <summary>
/// 选择任务,生成出库单,只包含已确认的单据
/// </summary>
/// <param name="ids"></param>
/// <param name="version"></param>
/// <returns></returns>
[HttpPost]
[Route("WmsJitOutPut")]
public async Task<string> WmsJitOutPut(WmsJitRequestDto input)
{
var _billNum = "T" + DateTime.Now.ToString("yyyyMMddhhmmss");
var _joblist=_job.Where(p => input.Guids.Contains(p.Id) && p.FileName== "已确认").ToList();
if (_joblist.Count() > 0)
{
var fileList = _joblist.Select(p => p.RealDownFileName).ToList();
List<WmsJitOutPutDetial> _lst = new List<WmsJitOutPutDetial>();
foreach (var filename in fileList)
{
string fileSavePath = Environment.CurrentDirectory + @"\wwwroot\files\host\my-file-container\" + filename;
ExcelHelper _excelHelper = new ExcelHelper(fileSavePath);
var _list = _excelHelper.ExcelToList<WmsJitOutPutDetial>();
var _lsCopy = new List<WmsJitOutPutDetial>();
foreach (var itm in _list)
{
WmsJitOutPutDetial _detail = new WmsJitOutPutDetial(
GuidGenerator.Create(),
itm.WmsBillNum,
itm.KennCode,
itm.ChassisNumber,
itm.MaterialCode,
itm.MaterialDesc,
itm.MaterialGroup,
string.Empty,
string.Empty,
0,
string.Empty,
string.Empty,
input.Version,
itm.ParentMaterialCode,
itm.BillNum,
GuidGenerator.Create()
,string.Empty
,itm.Qty
);
_lsCopy.Add(_detail);
}
_lst.AddRange(_lsCopy.ToArray());
}
var _ls1 = _lst.Where(p => p.ParentMaterialCode == p.MaterialCode).ToList();
var outPutDetail = await _wmsRepository.Where(p => p.Version ==input.Version).ToListAsync();
var query = from itm1 in _ls1
join itm2 in outPutDetail on
new { itm1.MaterialCode, itm1.KennCode, itm1.ChassisNumber }
equals
new { itm2.MaterialCode, itm2.KennCode, itm2.ChassisNumber } into temp1
from tm1 in temp1.DefaultIfEmpty()
where tm1 == null
select itm1;
var _wmslst = query.ToList();
foreach (var itm in _wmslst)
{
itm.BillNum = _billNum;
}
await _wmsRepository.GetDbContext().BulkInsertAsync(_wmslst, new BulkConfig() { BulkCopyTimeout = 0 , BatchSize=10000});
int _count = _wmsVersionRepository.Count(p => p.Version == input.Version && p.BillNum==_billNum);
if (_count == 0)
{
var _version = new WmsJitOutPut(GuidGenerator.Create(), input.Version, _billNum, CurrentUser.Email);
//var _ls = new List<WmsJitOutPut>();
//_ls.Add(_version);
await _wmsVersionRepository.InsertAsync(_version, true);
}
foreach (var job in _joblist)
{
job.FileName = _billNum;
await _job.UpdateAsync(job);
}
}
else
{
_billNum = string.Empty;
}
return _billNum;
}
/// <summary>
/// 出库界面功能,核准出库功能
/// </summary>
/// <param name="version"></param>
/// <param name="p_list"></param>
/// <returns></returns>
[HttpPost]
[Route("WmsJitOutPut-Pass")]
public async Task<bool> WmsJitOutPutPass(WmsJitRequestDto input)
{
if (input.Guids != null)
{
List<WmsJitOutPutDetial> _ls = new List<WmsJitOutPutDetial>();
if (input.Guids.Count() > 0)
{
_ls = await _wmsRepository.Where(p => input.Guids.Contains(p.Id) && p.Version == input.Version && p.State != 2).ToListAsync();
}
else
{
_ls = await _wmsRepository.Where(p => p.Version ==input.Version && p.BillNum==input.BillNum && p.State != 2).ToListAsync();
}
if (_ls.Count() > 0)
{
foreach (var itm in _ls)
{
itm.State = 1;
}
await _wmsRepository.GetDbContext().BulkUpdateAsync(_ls);
//var _first = _ls.FirstOrDefault();
//var _guid = GuidGenerator.Create();
//foreach (var itm in _ls)
//{
// itm.TaskId = _guid;
//}
//await _wmsefRespository.GetDbContext().BulkInsertAsync(_ls);
//var uniapi = new TS_UNI_API(GuidGenerator.Create(), "1", version, "WmsJitOutPutDetail",_first.BillNum, 0,0 ,_guid)
//{
// TaskId = _guid,
// SourceBillNum = _first.BillNum,
// TableName = "WmsJitOutPutDetail",
// InterfaceType = "1",
// Version = version,
// SettleAccountState = 0,
// WmsState=0
//};
//var _l = new List<TS_UNI_API>();
//_l.Add(uniapi);
//await _wmsefRespository.GetDbContext().BulkInsertAsync(_l);
}
}
return true;
}
/// <summary>
///出库界面功能, 撤销核准出库
/// </summary>
/// <param name="ids"></param>
/// <param name="version"></param>
/// <returns></returns>
[HttpPost]
[Route("WmsJitOutPut-Cancel")]
public async Task<bool> WmsJitOutPutCancel(WmsJitRequestDto input)
{
var _ls = await _wmsRepository.Where(p => input.Guids.Contains(p.Id) && p.Version == input.Version && p.State == 2).ToListAsync();
var _first = _ls.FirstOrDefault();
if (_ls.Count > 0)
{
//var _guid = GuidGenerator.Create();
//await _wmsefRespository.GetDbContext().BulkInsertAsync(_ls,new BulkConfig() { BulkCopyTimeout=0 });
//var uniapi = new TS_UNI_API(GuidGenerator.Create(), "1", version, "WmsJitOutPutDetail", _first.BillNum, 0,0, _guid)
//{
// TaskId = _guid,
// SourceBillNum = _first.BillNum,
// TableName = "WmsJitOutPutDetail",
// InterfaceType = "1",
// Version = version,
// WmsState = 0,
// SettleAccountState=0
//};
//var _l = new List<TS_UNI_API>();
//_l.Add(uniapi);
//await _wmsefRespository.GetDbContext().BulkInsertAsync(_l);
}
return true;
}
}
}

381
src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSKanbanAppService.cs

@ -0,0 +1,381 @@
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Caching.Distributed;
using AutoMapper;
using System.Linq;
using System.Text;
using Volo.Abp.Guids;
using Volo.Abp.Application.Services;
using Volo.Abp.Caching;
using Volo.Abp.ObjectMapping;
using Win.Sfs.SettleAccount.ExcelImporter;
using Win.Sfs.Shared.CacheBase;
using Win.Utils;
using Volo.Abp.Application.Dtos;
using Win.Sfs.BaseData.ImportExcelCommon;
using Volo.Abp.Domain.Repositories;
using EFCore.BulkExtensions;
using System.IO;
using Microsoft.EntityFrameworkCore;
using Win.Sfs.SettleAccount.Entities.SettleAccountVersion;
using Win.Sfs.SettleAccount.FISes;
using Win.Sfs.Shared.Enums.SettleAccount;
using Win.Sfs.Shared.Filter;
using Shouldly;
using Magicodes.ExporterAndImporter.Csv;
using Magicodes.ExporterAndImporter.Core;
using Magicodes.ExporterAndImporter.Excel;
using System.Data.Common;
using Volo.Abp.Uow;
using Volo.Abp;
using Win.Abp.Snowflakes;
using Win.Sfs.SettleAccount.CommonManagers;
using Win.Sfs.SettleAccount.ExportReports;
using Win.Sfs.SettleAccount.Constant;
using Win.Sfs.SettleAccount.MaterialRelationships;
using Win.Sfs.SettleAccount.Entities.TaskJobs;
using Magicodes.ExporterAndImporter.Core.Models;
using TaskJob.Services;
using TaskJob.EventArgs;
using Win.Sfs.SettleAccount.Entities.WMS;
using Win.Sfs.SettleAccount.Entities.Wms;
using Win.Sfs.SettleAccount.Repository;
using WY.NewJit.Extends.PaiGe.WMS;
namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
{
/// <summary>
/// wms出库
/// </summary>
[AllowAnonymous]
[Route("api/settleaccount/wmskanbanoutput")]
public class WMSKanbanAppService :
ApplicationService
{
private readonly ISettleAccountBranchEfCoreRepository<WmsKanbanOutPutDetial, Guid> _wmsRepository;
private readonly ISettleAccountBranchEfCoreRepository<WmsKanbanOutPut, Guid> _wmsVersionRepository;
private readonly WMSEfCoreRepository<WmsKanbanOutPutDetial> _wmsefRespository;
private readonly WMSEfCoreRepository<TB_BILL> _wmstbRespository;
private readonly ISettleAccountBranchEfCoreRepository<TaskJob, Guid> _job;
private readonly IExcelImportAppService _excelImportService;
private readonly TaskJobService _service;
/// <summary>
///
/// </summary>
/// <param name="wmsRepository"></param>
/// <param name="job"></param>
/// <param name="wmsVersionRepository"></param>
/// <param name="wmsefRespository"></param>
/// <param name="wmstbRespository"></param>
public WMSKanbanAppService(
IExcelImportAppService excelImportService,
ISettleAccountBranchEfCoreRepository<WmsKanbanOutPutDetial, Guid> wmsRepository,
ISettleAccountBranchEfCoreRepository<TaskJob, Guid> job,
ISettleAccountBranchEfCoreRepository<WmsKanbanOutPut, Guid> wmsVersionRepository,
WMSEfCoreRepository<WmsKanbanOutPutDetial> wmsefRespository,
WMSEfCoreRepository<TB_BILL> wmstbRespository
)
{
_job = job;
_wmstbRespository = wmstbRespository;
_wmsRepository = wmsRepository;
_wmsVersionRepository = wmsVersionRepository;
_wmsefRespository = wmsefRespository;
_excelImportService = excelImportService;
}
private async Task<long> GetCountAsync(WmsKanbanOutPutDetialRequestDto input)
{
return await _wmsRepository.GetCountByFilterAsync(GuidGenerator.Create(), input.Filters);
}
private async Task<long> GetCountAsync(WmsKanbanOutPutRequestDto input)
{
return await _wmsVersionRepository.GetCountByFilterAsync(GuidGenerator.Create(), input.Filters);
}
/// <summary>
/// 准时化出库主表
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost]
[Route("WmsKanbanList")]
//[Authorize(SettleAccountPermissions.SettleAccounts.Default)]
virtual public async Task<PagedResultDto<WmsKanbanOutPut>> GetListAsync( WmsKanbanOutPutRequestDto input)
{
var entities = await _wmsVersionRepository.GetListByFilterAsync(GuidGenerator.Create(), input.Filters, input.Sorting, input.MaxResultCount,
input.SkipCount, true);
var totalCount = await GetCountAsync(input);
return new PagedResultDto<WmsKanbanOutPut>(totalCount, entities);
}
/// <summary>
/// 准时化出库明细
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost]
[Route("WmsKanbanDetailList")]
//[Authorize(SettleAccountPermissions.SettleAccounts.Default)]
virtual public async Task<PagedResultDto<WmsKanbanOutPutDetial>> GetListAsync(WmsKanbanOutPutDetialRequestDto input)
{
var entities = await _wmsRepository.GetListByFilterAsync(GuidGenerator.Create(), input.Filters, input.Sorting, input.MaxResultCount,
input.SkipCount, true);
var totalCount = await GetCountAsync(input);
return new PagedResultDto<WmsKanbanOutPutDetial>(totalCount, entities);
}
/// <summary>
/// 任务明细标记已确认
/// </summary>
/// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
/// <returns></returns>
[HttpGet]
[Route("WmsKanbanOutPutAudit")]
[DisableRequestSizeLimit]
public async Task<bool> WmsKanbanAudit(List<Guid> ids)
{
var _joblist =await _job.Where(p => ids.Contains(p.Id)).ToListAsync();
foreach (var itm in _joblist)
{
itm.FileName = "已确认";
}
foreach (var itm in _joblist)
{
await _job.UpdateAsync(itm);
}
var _count=await _job.BatchUpdateAsync(_joblist.ToList());
if (_count > 0)
{
return true;
}
return false;
}
/// <summary>
/// 选择任务,生成出库单,只包含已确认的单据
/// </summary>
/// <param name="ids"></param>
/// <param name="version"></param>
/// <returns></returns>
[HttpGet]
[Route("WmsKanbanOutPut")]
public async Task<string> WmsKanbanOutPut(WmsJitRequestDto input)
{
var _billNum = "K" + DateTime.Now.ToString("yyyyMMddhhmmss");
var _joblist = _job.Where(p => input.Guids.Contains(p.Id) && p.FileName == "已确认").ToList();
if (_joblist.Count() > 0)
{
var fileList = _joblist.Select(p => p.RealDownFileName).ToList();
List<WmsKanbanOutPutDetial> _lst = new List<WmsKanbanOutPutDetial>();
foreach (var filename in fileList)
{
string fileSavePath = Environment.CurrentDirectory + @"\wwwroot\files\host\my-file-container\" + filename;
ExcelHelper _excelHelper = new ExcelHelper(fileSavePath);
var _list = _excelHelper.ExcelToList<WmsKanbanOutPutDetial>();
foreach (var itm in _list)
{
itm.SetId(GuidGenerator.Create());
}
_lst.AddRange(_list.ToArray());
}
var _ls1 = _lst.Where(p => p.ParentMaterialCode == p.MaterialCode).ToList();
var outPutDetail = await _wmsRepository.Where(p => p.Version == input.Version).ToListAsync();
var query = from itm1 in _ls1
join itm2 in outPutDetail on
new { itm1.MaterialCode, itm1.Kanban }
equals
new { itm2.MaterialCode, itm2.Kanban } into temp1
from tm1 in temp1.DefaultIfEmpty()
where tm1 == null
select itm1;
var _wmslst = query.ToList();
foreach (var itm in _wmslst)
{
itm.BillNum = _billNum;
}
await _wmsRepository.GetDbContext().BulkInsertAsync(_wmslst, new BulkConfig() { BulkCopyTimeout = 0, BatchSize = 10000 });
int _count = _wmsVersionRepository.Count(p => p.Version == input.Version && p.BillNum == _billNum);
if (_count == 0)
{
var _version = new WmsKanbanOutPut(GuidGenerator.Create(), input.Version, _billNum, CurrentUser.Email);
await _wmsVersionRepository.InsertAsync(_version, true);
}
foreach (var job in _joblist)
{
job.FileName = _billNum;
await _job.UpdateAsync(job);
}
}
else
{
_billNum = string.Empty;
}
return _billNum;
}
/// <summary>
/// 出库界面功能,核准出库功能
/// </summary>
/// <param name="version"></param>
/// <param name="p_list"></param>
/// <returns></returns>
[HttpGet]
[Route("WmsKanbanOutPut-Pass")]
public async Task<bool> WmsKanbanOutPutPass(WmsJitRequestDto input)
{
if (input.Guids != null)
{
List<WmsKanbanOutPutDetial> _ls = new List<WmsKanbanOutPutDetial>();
if (input.Guids.Count() > 0)
{
_ls = await _wmsRepository.Where(p => input.Guids.Contains(p.Id) && p.Version ==input.Version && p.BillNum == input.BillNum && p.State != 2).ToListAsync();
}
else
{
_ls = await _wmsRepository.Where(p => p.Version == input.Version && p.BillNum == input.BillNum && p.State != 2).ToListAsync();
}
if (_ls.Count() > 0)
{
var _first = _ls.FirstOrDefault();
var _guid = GuidGenerator.Create();
foreach (var itm in _ls)
{
itm.TaskId = _guid;
}
await _wmsefRespository.GetDbContext().BulkInsertAsync(_ls);
var uniapi = new TS_UNI_API(GuidGenerator.Create(), "1", input.Version, "WmsKanbanOutPutDetail",_first.BillNum, 0,0 ,_guid)
{
TaskId = _guid,
SourceBillNum = _first.BillNum,
TableName = "WmsKanbanOutPutDetail",
InterfaceType = "2",
Version = input.Version,
SettleAccountState = 0,
WmsState=0
};
var _l = new List<TS_UNI_API>();
_l.Add(uniapi);
await _wmsefRespository.GetDbContext().BulkInsertAsync(_l);
}
}
return true;
}
/// <summary>
///出库界面功能, 撤销核准出库
/// </summary>
/// <param name="ids"></param>
/// <param name="version"></param>
/// <returns></returns>
[HttpGet]
[Route("WmsKanbanOutPut-Cancel")]
public async Task<bool> WmsKanbanOutPutCancel(WmsJitRequestDto input)
{
var _ls = await _wmsRepository.Where(p => input.Guids.Contains(p.Id) && p.Version == input.Version && p.State == 1).ToListAsync();
var _first = _ls.FirstOrDefault();
if (_ls.Count()>0)
{
var _guid = GuidGenerator.Create();
await _wmsefRespository.GetDbContext().BulkInsertAsync(_ls,new BulkConfig() { BulkCopyTimeout=0 });
var uniapi = new TS_UNI_API(GuidGenerator.Create(), "1", input.Version, "WmsKanbanOutPutDetail", _first.BillNum, 0,0, _guid)
{
TaskId = _guid,
SourceBillNum = _first.BillNum,
TableName = "WmsKanbanOutPutDetail",
InterfaceType = "2",
Version = input.Version,
WmsState = 0,
SettleAccountState=0
};
var _l = new List<TS_UNI_API>();
_l.Add(uniapi);
await _wmsefRespository.GetDbContext().BulkInsertAsync(_l);
}
return true;
}
[HttpPost]
[Route("ExcelImport")]
[DisableRequestSizeLimit]
//[Authorize(SettleAccountPermissions.SettleAccounts.Default)]
public async Task<string> ExcelImport([FromForm] IFormFileCollection files, string version)
{
var _billNum = "K" + DateTime.Now.ToString("yyyyMMddhhmmss");
ExportImporter _exportImporter = new ExportImporter();
var result = await _exportImporter.ExtendExcelImport<WmsKanbanOutPutDetial>(files, _excelImportService);
List<WmsKanbanOutPutDetial> _lst = new List<WmsKanbanOutPutDetial>();
var _lsCopy = new List<WmsKanbanOutPutDetial>();
foreach (var itm in result)
{
WmsKanbanOutPutDetial _detail = new WmsKanbanOutPutDetial(
GuidGenerator.Create(),
itm.WmsBillNum,
itm.Kanban,
itm.MaterialCode,
itm.MaterialDesc,
itm.MaterialGroup,
string.Empty,
string.Empty,
0,
string.Empty,
string.Empty,
version,
itm.ParentMaterialCode,
itm.BillNum,
GuidGenerator.Create()
, string.Empty
, itm.Qty.Value
);
_lsCopy.Add(_detail);
}
_lst.AddRange(_lsCopy.ToArray());
var _ls1 = _lst.Where(p => p.ParentMaterialCode == p.MaterialCode).ToList();
var outPutDetail = await _wmsRepository.Where(p => p.Version == version).ToListAsync();
var query = from itm1 in _ls1
join itm2 in outPutDetail on
new { itm1.MaterialCode, itm1.Kanban }
equals
new { itm2.MaterialCode, itm2.Kanban } into temp1
from tm1 in temp1.DefaultIfEmpty()
where tm1 == null
select itm1;
var _wmslst = query.ToList();
foreach (var itm in _wmslst)
{
itm.BillNum = _billNum;
}
await _wmsRepository.GetDbContext().BulkInsertAsync(_wmslst, new BulkConfig() { BulkCopyTimeout = 0, BatchSize = 10000 });
int _count = _wmsVersionRepository.Count(p => p.Version == version && p.BillNum == _billNum);
if (_count == 0)
{
var _version = new WmsKanbanOutPut(GuidGenerator.Create(), version, _billNum, CurrentUser.Email);
await _wmsVersionRepository.InsertAsync(_version, true);
}
return _billNum;
}
}
}

382
src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSSharePartAppService.cs

@ -0,0 +1,382 @@
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Caching.Distributed;
using AutoMapper;
using System.Linq;
using System.Text;
using Volo.Abp.Guids;
using Volo.Abp.Application.Services;
using Volo.Abp.Caching;
using Volo.Abp.ObjectMapping;
using Win.Sfs.SettleAccount.ExcelImporter;
using Win.Sfs.Shared.CacheBase;
using Win.Utils;
using Volo.Abp.Application.Dtos;
using Win.Sfs.BaseData.ImportExcelCommon;
using Volo.Abp.Domain.Repositories;
using EFCore.BulkExtensions;
using System.IO;
using Microsoft.EntityFrameworkCore;
using Win.Sfs.SettleAccount.Entities.SettleAccountVersion;
using Win.Sfs.SettleAccount.FISes;
using Win.Sfs.Shared.Enums.SettleAccount;
using Win.Sfs.Shared.Filter;
using Shouldly;
using Magicodes.ExporterAndImporter.Csv;
using Magicodes.ExporterAndImporter.Core;
using Magicodes.ExporterAndImporter.Excel;
using System.Data.Common;
using Volo.Abp.Uow;
using Volo.Abp;
using Win.Abp.Snowflakes;
using Win.Sfs.SettleAccount.CommonManagers;
using Win.Sfs.SettleAccount.ExportReports;
using Win.Sfs.SettleAccount.Constant;
using Win.Sfs.SettleAccount.MaterialRelationships;
using Win.Sfs.SettleAccount.Entities.TaskJobs;
using Magicodes.ExporterAndImporter.Core.Models;
using TaskJob.Services;
using TaskJob.EventArgs;
using Win.Sfs.SettleAccount.Entities.WMS;
using Win.Sfs.SettleAccount.Entities.Wms;
using Win.Sfs.SettleAccount.Repository;
using WY.NewJit.Extends.PaiGe.WMS;
namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
{
/// <summary>
/// wms出库
/// </summary>
[AllowAnonymous]
[Route("api/settleaccount/wmsSharePartoutput")]
public class WMSSharePartAppService :
ApplicationService
{
private readonly ISettleAccountBranchEfCoreRepository<WmsSharePartOutPutDetial, Guid> _wmsRepository;
private readonly ISettleAccountBranchEfCoreRepository<WmsSharePartOutPut, Guid> _wmsVersionRepository;
private readonly WMSEfCoreRepository<WmsSharePartOutPutDetial> _wmsefRespository;
private readonly WMSEfCoreRepository<TB_BILL> _wmstbRespository;
private readonly ISettleAccountBranchEfCoreRepository<TaskJob, Guid> _job;
private readonly IExcelImportAppService _excelImportService;
private readonly TaskJobService _service;
/// <summary>
///
/// </summary>
/// <param name="wmsRepository"></param>
/// <param name="job"></param>
/// <param name="wmsVersionRepository"></param>
/// <param name="wmsefRespository"></param>
/// <param name="wmstbRespository"></param>
public WMSSharePartAppService(
ISettleAccountBranchEfCoreRepository<WmsSharePartOutPutDetial, Guid> wmsRepository,
ISettleAccountBranchEfCoreRepository<TaskJob, Guid> job,
ISettleAccountBranchEfCoreRepository<WmsSharePartOutPut, Guid> wmsVersionRepository,
WMSEfCoreRepository<WmsSharePartOutPutDetial> wmsefRespository,
WMSEfCoreRepository<TB_BILL> wmstbRespository,
IExcelImportAppService excelImportService
)
{
_excelImportService = excelImportService;
_job = job;
_wmstbRespository = wmstbRespository;
_wmsRepository = wmsRepository;
_wmsVersionRepository = wmsVersionRepository;
_wmsefRespository = wmsefRespository;
}
private async Task<long> GetCountAsync(WmsSharePartOutPutDetialRequestDto input)
{
return await _wmsRepository.GetCountByFilterAsync(GuidGenerator.Create(), input.Filters);
}
private async Task<long> GetCountAsync(WmsSharePartOutPutRequestDto input)
{
return await _wmsVersionRepository.GetCountByFilterAsync(GuidGenerator.Create(), input.Filters);
}
/// <summary>
/// 准时化出库主表
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost]
[Route("WmsSharePartList")]
//[Authorize(SettleAccountPermissions.SettleAccounts.Default)]
virtual public async Task<PagedResultDto<WmsSharePartOutPut>> GetListAsync( WmsSharePartOutPutRequestDto input)
{
var entities = await _wmsVersionRepository.GetListByFilterAsync(GuidGenerator.Create(), input.Filters, input.Sorting, input.MaxResultCount,
input.SkipCount, true);
var totalCount = await GetCountAsync(input);
return new PagedResultDto<WmsSharePartOutPut>(totalCount, entities);
}
/// <summary>
/// 准时化出库明细
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost]
[Route("WmsSharePartDetailList")]
//[Authorize(SettleAccountPermissions.SettleAccounts.Default)]
virtual public async Task<PagedResultDto<WmsSharePartOutPutDetial>> GetListAsync(WmsSharePartOutPutDetialRequestDto input)
{
var entities = await _wmsRepository.GetListByFilterAsync(GuidGenerator.Create(), input.Filters, input.Sorting, input.MaxResultCount,
input.SkipCount, true);
var totalCount = await GetCountAsync(input);
return new PagedResultDto<WmsSharePartOutPutDetial>(totalCount, entities);
}
/// <summary>
/// 任务明细标记已确认
/// </summary>
/// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
/// <returns></returns>
[HttpGet]
[Route("WmsSharePartOutPutAudit")]
[DisableRequestSizeLimit]
public async Task<bool> WmsSharePartAudit(List<Guid> ids)
{
var _joblist =await _job.Where(p => ids.Contains(p.Id)).ToListAsync();
foreach (var itm in _joblist)
{
itm.FileName = "已确认";
}
foreach (var itm in _joblist)
{
await _job.UpdateAsync(itm);
}
var _count=await _job.BatchUpdateAsync(_joblist.ToList());
if (_count > 0)
{
return true;
}
return false;
}
/// <summary>
/// 选择任务,生成出库单,只包含已确认的单据
/// </summary>
/// <param name="ids"></param>
/// <param name="version"></param>
/// <returns></returns>
[HttpGet]
[Route("WmsSharePartOutPut")]
public async Task<string> WmsSharePartOutPut(WmsJitRequestDto input)
{
var _billNum = "B" + DateTime.Now.ToString("yyyyMMddhhmmss");
var _joblist = _job.Where(p => input.Guids.Contains(p.Id) && p.FileName == "已确认").ToList();
if (_joblist.Count() > 0)
{
var fileList = _joblist.Select(p => p.RealDownFileName).ToList();
List<WmsSharePartOutPutDetial> _lst = new List<WmsSharePartOutPutDetial>();
foreach (var filename in fileList)
{
string fileSavePath = Environment.CurrentDirectory + @"\wwwroot\files\host\my-file-container\" + filename;
ExcelHelper _excelHelper = new ExcelHelper(fileSavePath);
var _list = _excelHelper.ExcelToList<WmsSharePartOutPutDetial>();
foreach (var itm in _list)
{
itm.SetId(GuidGenerator.Create());
}
_lst.AddRange(_list.ToArray());
}
var _ls1 = _lst.Where(p => p.ParentMaterialCode == p.MaterialCode).ToList();
var outPutDetail = await _wmsRepository.Where(p => p.Version == input.Version).ToListAsync();
var query = from itm1 in _ls1
join itm2 in outPutDetail on
new { itm1.MaterialCode, itm1.OrderBillNum }
equals
new { itm2.MaterialCode, itm2.OrderBillNum } into temp1
from tm1 in temp1.DefaultIfEmpty()
where tm1 == null
select itm1;
var _wmslst = query.ToList();
foreach (var itm in _wmslst)
{
itm.BillNum = _billNum;
}
await _wmsRepository.GetDbContext().BulkInsertAsync(_wmslst, new BulkConfig() { BulkCopyTimeout = 0, BatchSize = 10000 });
int _count = _wmsVersionRepository.Count(p => p.Version == input.Version && p.BillNum == _billNum);
if (_count == 0)
{
var _version = new WmsSharePartOutPut(GuidGenerator.Create(), input.Version, _billNum, CurrentUser.Email);
//var _ls = new List<WmsSharePartOutPut>();
//_ls.Add(_version);
await _wmsVersionRepository.InsertAsync(_version, true);
}
foreach (var job in _joblist)
{
job.FileName = _billNum;
await _job.UpdateAsync(job);
}
}
else
{
_billNum = string.Empty;
}
return _billNum;
}
/// <summary>
/// 出库界面功能,核准出库功能
/// </summary>
/// <param name="version"></param>
/// <param name="p_list"></param>
/// <returns></returns>
[HttpGet]
[Route("WmsSharePartOutPut-Pass")]
public async Task<bool> WmsSharePartOutPutPass(WmsJitRequestDto input)
{
if (input.Guids != null)
{
List<WmsSharePartOutPutDetial> _ls = new List<WmsSharePartOutPutDetial>();
if (input.Guids.Count() > 0)
{
_ls = await _wmsRepository.Where(p => input.Guids.Contains(p.Id) && p.Version == input.Version && p.BillNum == input.BillNum && p.State != 2).ToListAsync();
}
else
{
_ls = await _wmsRepository.Where(p => p.Version == input.Version && p.BillNum == input.BillNum && p.State != 2).ToListAsync();
}
if (_ls.Count() > 0)
{
var _first = _ls.FirstOrDefault();
var _guid = GuidGenerator.Create();
foreach (var itm in _ls)
{
itm.TaskId = _guid;
}
await _wmsefRespository.GetDbContext().BulkInsertAsync(_ls);
var uniapi = new TS_UNI_API(GuidGenerator.Create(), "1", input.Version, "WmsSharePartOutPutDetail",_first.BillNum, 0,0 ,_guid)
{
TaskId = _guid,
SourceBillNum = _first.BillNum,
TableName = "WmsSharePartOutPutDetail",
InterfaceType = "3",
Version = input.Version,
SettleAccountState = 0,
WmsState=0
};
var _l = new List<TS_UNI_API>();
_l.Add(uniapi);
await _wmsefRespository.GetDbContext().BulkInsertAsync(_l);
}
}
return true;
}
/// <summary>
///出库界面功能, 撤销核准出库
/// </summary>
/// <param name="ids"></param>
/// <param name="version"></param>
/// <returns></returns>
[HttpGet]
[Route("WmsSharePartOutPut-Cancel")]
public async Task<bool> WmsSharePartOutPutCancel(WmsJitRequestDto input)
{
var _ls = await _wmsRepository.Where(p => input.Guids.Contains(p.Id) && p.Version == input.Version && p.State == 1).ToListAsync();
var _first = _ls.FirstOrDefault();
if (_ls.Count()>0)
{
var _guid = GuidGenerator.Create();
await _wmsefRespository.GetDbContext().BulkInsertAsync(_ls,new BulkConfig() { BulkCopyTimeout=0 });
var uniapi = new TS_UNI_API(GuidGenerator.Create(), "1", input.Version, "WmsSharePartOutPutDetail", _first.BillNum, 0,0, _guid)
{
TaskId = _guid,
SourceBillNum = _first.BillNum,
TableName = "WmsSharePartOutPutDetail",
InterfaceType = "3",
Version = input.Version,
WmsState = 0,
SettleAccountState=0
};
var _l = new List<TS_UNI_API>();
_l.Add(uniapi);
await _wmsefRespository.GetDbContext().BulkInsertAsync(_l);
}
return true;
}
[HttpPost]
[Route("ExcelImport")]
[DisableRequestSizeLimit]
//[Authorize(SettleAccountPermissions.SettleAccounts.Default)]
public async Task<string> ExcelImport([FromForm] IFormFileCollection files, string version)
{
var _billNum = "B" + DateTime.Now.ToString("yyyyMMddhhmmss");
ExportImporter _exportImporter = new ExportImporter();
var result = await _exportImporter.ExtendExcelImport<WmsSharePartOutPutDetial>(files, _excelImportService);
List<WmsSharePartOutPutDetial> _lst = new List<WmsSharePartOutPutDetial>();
var _lsCopy = new List<WmsSharePartOutPutDetial>();
foreach (var itm in result)
{
WmsSharePartOutPutDetial _detail = new WmsSharePartOutPutDetial(
GuidGenerator.Create(),
itm.WmsBillNum,
itm.OrderBillNum,
itm.MaterialCode,
itm.MaterialDesc,
itm.MaterialGroup,
string.Empty,
string.Empty,
0,
string.Empty,
string.Empty,
version,
itm.ParentMaterialCode,
itm.BillNum,
GuidGenerator.Create()
, string.Empty
, itm.Qty.Value
);
_lsCopy.Add(_detail);
}
_lst.AddRange(_lsCopy.ToArray());
var _ls1 = _lst.Where(p => p.ParentMaterialCode == p.MaterialCode).ToList();
var outPutDetail = await _wmsRepository.Where(p => p.Version == version).ToListAsync();
var query = from itm1 in _ls1
join itm2 in outPutDetail on
new { itm1.MaterialCode, itm1.OrderBillNum }
equals
new { itm2.MaterialCode, itm2.OrderBillNum } into temp1
from tm1 in temp1.DefaultIfEmpty()
where tm1 == null
select itm1;
var _wmslst = query.ToList();
foreach (var itm in _wmslst)
{
itm.BillNum = _billNum;
}
await _wmsRepository.GetDbContext().BulkInsertAsync(_wmslst, new BulkConfig() { BulkCopyTimeout = 0, BatchSize = 10000 });
int _count = _wmsVersionRepository.Count(p => p.Version == version && p.BillNum == _billNum);
if (_count == 0)
{
var _version = new WmsSharePartOutPut(GuidGenerator.Create(), version, _billNum, CurrentUser.Email);
await _wmsVersionRepository.InsertAsync(_version, true);
}
return _billNum;
}
}
}

2
src/Modules/SettleAccount/src/SettleAccount.Application/Jobs/TaskJobService.cs

@ -237,7 +237,7 @@ namespace Win.Sfs.SettleAccount.Entities.TaskJobs
var _serviceName = moudle.FullName;
var guid = Guid.NewGuid();
await _mng.CreateAsync(new TaskJob(guid,version , currentApplicationName, "导出", string.Empty, user.Name, user.Email, string.Empty, string.Empty, str, str, _serviceName,version,remark));
var _entity= await _mng.CreateAsync(new TaskJob(guid,version , currentApplicationName, "导出", string.Empty, user.Name, user.Email, string.Empty,string.Empty, str, str, _serviceName,version,remark));
var args = new ExportTaskArgs()
{
Id=guid,

209
src/Modules/SettleAccount/src/SettleAccount.Application/Reports/ReportServices/ReportMakeService.cs

@ -115,7 +115,7 @@ namespace Win.Sfs.SettleAccount.Reports.ReportServices
customConditionList.Add(new CustomCondition() { Name = "ChassisNumber", Value = string.IsNullOrEmpty(chassisNumber) ? string.Empty : chassisNumber });
customConditionList.Add(new CustomCondition() { Name = "MaterialGroup", Value = string.IsNullOrEmpty(materialGroup) ? string.Empty : materialGroup });
customConditionList.Add(new CustomCondition() { Name = "SapCode", Value = string.IsNullOrEmpty(sapCode) ? string.Empty : sapCode });
var _taskid = await _service.ExportEnqueueAsync("大众准时化结算门板价格差异比对报表", ExportExtentsion.Excel,version,string.Empty, CurrentUser, typeof(SettleDoorPanelExportService), customConditionList, (rs) =>
var _taskid = await _service.ExportEnqueueAsync("准时化结算门板价格差异比对报表", ExportExtentsion.Excel,version, string.IsNullOrEmpty(materialGroup) ? string.Empty : materialGroup, CurrentUser, typeof(SettleDoorPanelExportService), customConditionList, (rs) =>
{
});
return _taskid;
@ -216,29 +216,29 @@ namespace Win.Sfs.SettleAccount.Reports.ReportServices
/// <param name="begin"></param>
/// <param name="end"></param>
/// <returns></returns>
[HttpGet]
[Route("UnSettledDiff-Make")]
[DisableRequestSizeLimit]
//[HttpGet]
//[Route("UnSettledDiff-Make")]
//[DisableRequestSizeLimit]
public async Task<string> UnSettledMake(string year, string period, string version, string customerCode, string factory, string matialCode, string state,DateTime begin,DateTime end)
{
List<CustomCondition> customConditionList = new List<CustomCondition>();
customConditionList.Add(new CustomCondition() { Name = "Version", Value = version ?? string.Empty });
customConditionList.Add(new CustomCondition() { Name = "CustomerCode", Value = customerCode ?? string.Empty });
customConditionList.Add(new CustomCondition() { Name = "Factory", Value = factory ?? string.Empty });
customConditionList.Add(new CustomCondition() { Name = "State", Value = state ?? "0" });
customConditionList.Add(new CustomCondition() { Name = "MatialCode", Value = matialCode ?? "0" });
customConditionList.Add(new CustomCondition() { Name = "ProjectName", Value = "未结算对比" });
customConditionList.Add(new CustomCondition() { Name = "Year", Value = year ?? string.Empty });
customConditionList.Add(new CustomCondition() { Name = "BegingTime", Value = begin.ToString() });
customConditionList.Add(new CustomCondition() { Name = "EndTime", Value = end.ToString() });
//public async Task<string> UnSettledMake(string year, string period, string version, string customerCode, string factory, string matialCode, string state,DateTime begin,DateTime end)
//{
var _taskid = await _service.ExportEnqueueAsync("未结算对比", ExportExtentsion.Excel,version,string.Empty ,CurrentUser, typeof(UnSettledExportService), customConditionList, (rs) =>
{
});
return _taskid;
}
// List<CustomCondition> customConditionList = new List<CustomCondition>();
// customConditionList.Add(new CustomCondition() { Name = "Version", Value = version ?? string.Empty });
// customConditionList.Add(new CustomCondition() { Name = "CustomerCode", Value = customerCode ?? string.Empty });
// customConditionList.Add(new CustomCondition() { Name = "Factory", Value = factory ?? string.Empty });
// customConditionList.Add(new CustomCondition() { Name = "State", Value = state ?? "0" });
// customConditionList.Add(new CustomCondition() { Name = "MatialCode", Value = matialCode ?? "0" });
// customConditionList.Add(new CustomCondition() { Name = "ProjectName", Value = "未结算对比" });
// customConditionList.Add(new CustomCondition() { Name = "Year", Value = year ?? string.Empty });
// customConditionList.Add(new CustomCondition() { Name = "BegingTime", Value = begin.ToString() });
// customConditionList.Add(new CustomCondition() { Name = "EndTime", Value = end.ToString() });
// var _taskid = await _service.ExportEnqueueAsync("未结算对比", ExportExtentsion.Excel,version, string.IsNullOrEmpty(materialGroup) ? string.Empty : materialGroup, CurrentUser, typeof(UnSettledExportService), customConditionList, (rs) =>
// {
// });
// return _taskid;
//}
/// <summary>
@ -254,26 +254,26 @@ namespace Win.Sfs.SettleAccount.Reports.ReportServices
/// <param name="begin"></param>
/// <param name="end"></param>
/// <returns></returns>
[HttpGet]
[Route("FisUnSettledDiff-Make")]
[DisableRequestSizeLimit]
//[HttpGet]
//[Route("FisUnSettledDiff-Make")]
//[DisableRequestSizeLimit]
public async Task<string> FisUnSettledMake(string year, string version, string customerCode, string factory, string state)
{
//public async Task<string> FisUnSettledMake(string year, string version, string customerCode, string factory, string state)
//{
List<CustomCondition> customConditionList = new List<CustomCondition>();
customConditionList.Add(new CustomCondition() { Name = "Version", Value = version ?? string.Empty });
customConditionList.Add(new CustomCondition() { Name = "CustomerCode", Value = customerCode ?? string.Empty });
customConditionList.Add(new CustomCondition() { Name = "Factory", Value = factory ?? string.Empty });
customConditionList.Add(new CustomCondition() { Name = "State", Value = state ?? "0" });
customConditionList.Add(new CustomCondition() { Name = "ProjectName", Value = "ERP总成开票报表" });
customConditionList.Add(new CustomCondition() { Name = "Year", Value = year ?? DateTime.Now.Year.ToString() });
// List<CustomCondition> customConditionList = new List<CustomCondition>();
// customConditionList.Add(new CustomCondition() { Name = "Version", Value = version ?? string.Empty });
// customConditionList.Add(new CustomCondition() { Name = "CustomerCode", Value = customerCode ?? string.Empty });
// customConditionList.Add(new CustomCondition() { Name = "Factory", Value = factory ?? string.Empty });
// customConditionList.Add(new CustomCondition() { Name = "State", Value = state ?? "0" });
// customConditionList.Add(new CustomCondition() { Name = "ProjectName", Value = "ERP总成开票报表" });
// customConditionList.Add(new CustomCondition() { Name = "Year", Value = year ?? DateTime.Now.Year.ToString() });
var _taskid = await _service.ExportEnqueueAsync("ERP总成开票报表", ExportExtentsion.Excel,version,string.Empty ,CurrentUser, typeof(fisUnsettledDiffReport), customConditionList, (rs) =>
{
});
return _taskid;
}
// var _taskid = await _service.ExportEnqueueAsync("ERP总成开票报表", ExportExtentsion.Excel,version,string.Empty ,CurrentUser, typeof(fisUnsettledDiffReport), customConditionList, (rs) =>
// {
// });
// return _taskid;
//}
/// <summary>
/// 价差量差分析报表
@ -284,37 +284,37 @@ namespace Win.Sfs.SettleAccount.Reports.ReportServices
/// <param name="factory"></param>
/// <param name="state"></param>
/// <returns></returns>
[HttpGet]
[Route("PriceQtyDiff-Make")]
[DisableRequestSizeLimit]
//[HttpGet]
//[Route("PriceQtyDiff-Make")]
//[DisableRequestSizeLimit]
public async Task<string> PriceQtyDiffMake(string year, string version, string customerCode, string factory, string state)
{
//if (!_invoiceVersionRepository.Any(p => p.Version == version))
//{
// throw new BusinessException("8989", string.Format("不存发票{0}期间", version));
//}
//if (!_settleAccountVersionrepository.Any(p => p.Version == version))
//{
// throw new BusinessException("8989", string.Format("不存结算{0}期间", version));
//}
//if (!_itemInvoicePriceVersionrepository.Any(p => p.Version == version))
//{
// throw new BusinessException("8989", string.Format("不存QAD价格导入{0}期间", version));
//}
List<CustomCondition> customConditionList = new List<CustomCondition>();
customConditionList.Add(new CustomCondition() { Name = "Version", Value = version ?? string.Empty });
customConditionList.Add(new CustomCondition() { Name = "CustomerCode", Value = customerCode ?? string.Empty });
customConditionList.Add(new CustomCondition() { Name = "Factory", Value = factory ?? string.Empty });
customConditionList.Add(new CustomCondition() { Name = "State", Value = state ?? "0" });
customConditionList.Add(new CustomCondition() { Name = "ProjectName", Value = "价差量差分析报表" });
customConditionList.Add(new CustomCondition() { Name = "Year", Value = year ?? DateTime.Now.Year.ToString() });
//public async Task<string> PriceQtyDiffMake(string year, string version, string customerCode, string factory, string state)
//{
// //if (!_invoiceVersionRepository.Any(p => p.Version == version))
// //{
// // throw new BusinessException("8989", string.Format("不存发票{0}期间", version));
// //}
// //if (!_settleAccountVersionrepository.Any(p => p.Version == version))
// //{
// // throw new BusinessException("8989", string.Format("不存结算{0}期间", version));
// //}
// //if (!_itemInvoicePriceVersionrepository.Any(p => p.Version == version))
// //{
// // throw new BusinessException("8989", string.Format("不存QAD价格导入{0}期间", version));
// //}
// List<CustomCondition> customConditionList = new List<CustomCondition>();
// customConditionList.Add(new CustomCondition() { Name = "Version", Value = version ?? string.Empty });
// customConditionList.Add(new CustomCondition() { Name = "CustomerCode", Value = customerCode ?? string.Empty });
// customConditionList.Add(new CustomCondition() { Name = "Factory", Value = factory ?? string.Empty });
// customConditionList.Add(new CustomCondition() { Name = "State", Value = state ?? "0" });
// customConditionList.Add(new CustomCondition() { Name = "ProjectName", Value = "价差量差分析报表" });
// customConditionList.Add(new CustomCondition() { Name = "Year", Value = year ?? DateTime.Now.Year.ToString() });
var _taskid = await _service.ExportEnqueueAsync("价差量差分析报表", ExportExtentsion.Excel,version,string.Empty ,CurrentUser, typeof(PriceQtyDifferenceExportService), customConditionList, (rs) =>
{
});
return _taskid;
}
// var _taskid = await _service.ExportEnqueueAsync("价差量差分析报表", ExportExtentsion.Excel,version,string.Empty ,CurrentUser, typeof(PriceQtyDifferenceExportService), customConditionList, (rs) =>
// {
// });
// return _taskid;
//}
/// <summary>
@ -342,7 +342,7 @@ namespace Win.Sfs.SettleAccount.Reports.ReportServices
customConditionList.Add(new CustomCondition() { Name = "SapCode", Value = sapCode ?? string.Empty });
customConditionList.Add(new CustomCondition() { Name = "ProjectName", Value = "结算与开票数据对比" });
customConditionList.Add(new CustomCondition() { Name = "Year", Value = year ?? DateTime.Now.Year.ToString() });
var _taskid = await _service.ExportEnqueueAsync("大众发票与结算核对汇总表", ExportExtentsion.Excel,version,string.Empty ,CurrentUser, typeof(InvoiceSettledDiffExportService), customConditionList, (rs) =>
var _taskid = await _service.ExportEnqueueAsync("发票与结算核对汇总表", ExportExtentsion.Excel,version,string.Empty ,CurrentUser, typeof(InvoiceSettledDiffExportService), customConditionList, (rs) =>
{
});
@ -350,7 +350,7 @@ namespace Win.Sfs.SettleAccount.Reports.ReportServices
}
/// <summary>
/// 2.大众发票与结算核对明细表
///发票与结算核对明细表
/// </summary>
/// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
/// <returns></returns>
@ -377,6 +377,7 @@ namespace Win.Sfs.SettleAccount.Reports.ReportServices
// str1 = string.Join(',', materialGroup.ToArray());
//}
List<CustomCondition> customConditionList = new List<CustomCondition>();
customConditionList.Add(new CustomCondition() { Name = "Version", Value =string.IsNullOrEmpty(version) ?string.Empty:version });
customConditionList.Add(new CustomCondition() { Name = "MaterialCode", Value = string.IsNullOrEmpty(materialCode) ?string.Empty: materialCode });
@ -388,14 +389,14 @@ namespace Win.Sfs.SettleAccount.Reports.ReportServices
customConditionList.Add(new CustomCondition() { Name = "ChassisNumber", Value = string.IsNullOrEmpty(chassisNumber) ? string.Empty : chassisNumber });
customConditionList.Add(new CustomCondition() { Name = "MaterialGroup", Value = string.IsNullOrEmpty(materialGroup) ? string.Empty : materialGroup });
customConditionList.Add(new CustomCondition() { Name = "SapCode", Value = string.IsNullOrEmpty(sapCode) ? string.Empty : sapCode });
var _taskid = await _service.ExportEnqueueAsync("大众发票与结算核对明细表", ExportExtentsion.Excel,version,string.Empty ,CurrentUser, typeof(InvoiceSettledDetailDiffExportService), customConditionList, (rs) =>
var _taskid = await _service.ExportEnqueueAsync("准时化结算核对明细", ExportExtentsion.Excel,version, string.IsNullOrEmpty(materialGroup) ? string.Empty : materialGroup, CurrentUser, typeof(InvoiceSettledDetailDiffExportService), customConditionList, (rs) =>
{
});
return _taskid;
}
/// <summary>
///3.大众准时化结算数量差异比对表
///3.准时化结算数量差异比对表
/// </summary>
/// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
/// <returns></returns>
@ -428,7 +429,7 @@ namespace Win.Sfs.SettleAccount.Reports.ReportServices
customConditionList.Add(new CustomCondition() { Name = "Mater", Value = string.IsNullOrEmpty(chassisNumber) ? string.Empty : chassisNumber });
customConditionList.Add(new CustomCondition() { Name = "MaterialGroup", Value = string.IsNullOrEmpty(materialGroup) ? string.Empty : materialGroup });
customConditionList.Add(new CustomCondition() { Name = "SapCode", Value = string.IsNullOrEmpty(sapCode) ? string.Empty : sapCode });
var _taskid = await _service.ExportEnqueueAsync("大众准时化结算数量差异比对表", ExportExtentsion.Excel,version,string.Empty ,CurrentUser, typeof(UnInvoiceSettledDetailDiffExportService), customConditionList, (rs) =>
var _taskid = await _service.ExportEnqueueAsync("准时化结算数量差异比对输出", ExportExtentsion.Excel,version, string.IsNullOrEmpty(materialGroup) ? string.Empty : materialGroup, CurrentUser, typeof(UnInvoiceSettledDetailDiffExportService), customConditionList, (rs) =>
{
});
return _taskid;
@ -439,7 +440,7 @@ namespace Win.Sfs.SettleAccount.Reports.ReportServices
/// <summary>
/// 7.大众准时化未结明细表(包含漏结,漏结要有标识)
/// 准时化未结明细表(包含漏结,漏结要有标识)
/// </summary>
/// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
/// <returns></returns>
@ -469,7 +470,7 @@ namespace Win.Sfs.SettleAccount.Reports.ReportServices
customConditionList.Add(new CustomCondition() { Name = "KennCode", Value = string.IsNullOrEmpty(kenncode) ? string.Empty : kenncode });
customConditionList.Add(new CustomCondition() { Name = "ChassisNumber", Value = string.IsNullOrEmpty(chassisNumber) ? string.Empty : chassisNumber });
customConditionList.Add(new CustomCondition() { Name = "SapCode", Value = string.IsNullOrEmpty(sapCode) ? string.Empty : sapCode });
var _taskid = await _service.ExportEnqueueAsync("大众准时化未结明细表", ExportExtentsion.Excel,version,string.Empty ,CurrentUser, typeof(UnsettledDetailReportService), customConditionList, (rs) =>
var _taskid = await _service.ExportEnqueueAsync("准时化未结明细表", ExportExtentsion.Excel,version, string.IsNullOrEmpty(materialGroup) ? string.Empty : materialGroup, CurrentUser, typeof(UnsettledDetailReportService), customConditionList, (rs) =>
{
});
return _taskid;
@ -477,7 +478,7 @@ namespace Win.Sfs.SettleAccount.Reports.ReportServices
/// <summary>
///6.大众准时化未结差异比对表
///准时化未结差异比对表
/// </summary>
/// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
/// <returns></returns>
@ -505,43 +506,43 @@ namespace Win.Sfs.SettleAccount.Reports.ReportServices
customConditionList.Add(new CustomCondition() { Name = "ChassisNumber", Value = string.IsNullOrEmpty(chassisNumber) ? string.Empty : chassisNumber });
customConditionList.Add(new CustomCondition() { Name = "MaterialGroup", Value = string.IsNullOrEmpty(materialGroup) ? string.Empty : materialGroup });
customConditionList.Add(new CustomCondition() { Name = "SapCode", Value = string.IsNullOrEmpty(sapCode) ? string.Empty : sapCode });
var _taskid = await _service.ExportEnqueueAsync("大众准时化未结差异比对表", ExportExtentsion.Excel,version,string.Empty, CurrentUser, typeof(UnSettleDiffExportService), customConditionList, (rs) =>
var _taskid = await _service.ExportEnqueueAsync("准时化未结差异比对输出", ExportExtentsion.Excel,version, string.IsNullOrEmpty(materialGroup) ? string.Empty : materialGroup, CurrentUser, typeof(UnSettleDiffExportService), customConditionList, (rs) =>
{
});
return _taskid;
}
/// <summary>
/// 结算总成和ERP总成价格对比
/// </summary>
/// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
/// <returns></returns>
[HttpGet]
[Route("SettledPartAndErpPartPriceDiff-Make")]
[DisableRequestSizeLimit]
///// <summary>
///// 结算总成和ERP总成价格对比
///// </summary>
///// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
///// <returns></returns>
//[HttpGet]
//[Route("SettledPartAndErpPartPriceDiff-Make")]
//[DisableRequestSizeLimit]
public async Task<string> SettledPartAndErpPartPriceDiffMake( string version, string customerCode)
{
//public async Task<string> SettledPartAndErpPartPriceDiffMake( string version, string customerCode)
//{
if (!_relationshipRepository.Any(p => p.Version == version && p.CustomerCode == customerCode))
{
throw new BusinessException("8989", string.Format("不存总成与结算件零件关系{0}期间", version));
}
if (!_settlementPartVersionrepository.Any(p => p.Version == version && p.CustomerCode == customerCode))
{
throw new BusinessException("8989", string.Format("不存结算包价格{0}期间", version));
}
// if (!_relationshipRepository.Any(p => p.Version == version && p.CustomerCode == customerCode))
// {
// throw new BusinessException("8989", string.Format("不存总成与结算件零件关系{0}期间", version));
// }
// if (!_settlementPartVersionrepository.Any(p => p.Version == version && p.CustomerCode == customerCode))
// {
// throw new BusinessException("8989", string.Format("不存结算包价格{0}期间", version));
// }
List<CustomCondition> customConditionList = new List<CustomCondition>();
// List<CustomCondition> customConditionList = new List<CustomCondition>();
customConditionList.Add(new CustomCondition() { Name = "ProjectName", Value = "结算总成和ERP总成价格对比" });
customConditionList.Add(new CustomCondition() { Name = "Version", Value = version??string.Empty });
customConditionList.Add(new CustomCondition() { Name = "CustomerCode", Value = customerCode });
var _taskid = await _service.ExportEnqueueAsync("结算总成和ERP总成价格对比", ExportExtentsion.Excel,version,string.Empty,CurrentUser, typeof(SettledPartAndErpPartPriceDiffExportService), customConditionList, (rs) =>
{
});
return _taskid;
}
// customConditionList.Add(new CustomCondition() { Name = "ProjectName", Value = "结算总成和ERP总成价格对比" });
// customConditionList.Add(new CustomCondition() { Name = "Version", Value = version??string.Empty });
// customConditionList.Add(new CustomCondition() { Name = "CustomerCode", Value = customerCode });
// var _taskid = await _service.ExportEnqueueAsync("结算总成和ERP总成价格对比", ExportExtentsion.Excel,version,string.Empty,CurrentUser, typeof(SettledPartAndErpPartPriceDiffExportService), customConditionList, (rs) =>
// {
// });
// return _taskid;
//}
///// <summary>

249
src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccount.Application.xml

@ -1587,26 +1587,193 @@
<param name="input">请求条件</param>
<returns>实体DTO列表</returns>
</member>
<member name="T:Win.Sfs.SettleAccount.Entities.SettleAccounts.WMSAppService">
<member name="T:Win.Sfs.SettleAccount.Entities.SettleAccounts.WMSJitAppService">
<summary>
大众准时化结算明细导入-R3已结
wms出库
</summary>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.SettleAccounts.WMSAppService.#ctor(Win.Sfs.SettleAccount.ISettleAccountBranchEfCoreRepository{Win.Sfs.SettleAccount.Entities.WMS.WmsJitOutPutDetial,System.Guid},Win.Sfs.SettleAccount.ISettleAccountBranchEfCoreRepository{Win.Sfs.SettleAccount.Entities.TaskJob,System.Guid},Win.Sfs.SettleAccount.ISettleAccountBranchEfCoreRepository{Win.Sfs.SettleAccount.Entities.WMS.WmsJitOutPut,System.Guid},Win.Sfs.SettleAccount.Repository.WMSEfCoreRepository{Win.Sfs.SettleAccount.Entities.WMS.WmsJitOutPutDetial},Win.Sfs.SettleAccount.Repository.WMSEfCoreRepository{WY.NewJit.Extends.PaiGe.WMS.TB_BILL})">
<member name="M:Win.Sfs.SettleAccount.Entities.SettleAccounts.WMSJitAppService.#ctor(Win.Sfs.BaseData.ImportExcelCommon.IExcelImportAppService,Win.Sfs.SettleAccount.ISettleAccountBranchEfCoreRepository{Win.Sfs.SettleAccount.Entities.WMS.WmsJitOutPutDetial,System.Guid},Win.Sfs.SettleAccount.ISettleAccountBranchEfCoreRepository{Win.Sfs.SettleAccount.Entities.TaskJob,System.Guid},Win.Sfs.SettleAccount.ISettleAccountBranchEfCoreRepository{Win.Sfs.SettleAccount.Entities.WMS.WmsJitOutPut,System.Guid},Win.Sfs.SettleAccount.Repository.WMSEfCoreRepository{Win.Sfs.SettleAccount.Entities.WMS.WmsJitOutPutDetial},Win.Sfs.SettleAccount.Repository.WMSEfCoreRepository{WY.NewJit.Extends.PaiGe.WMS.TB_BILL})">
<summary>
构建方法
</summary>
<param name="guidGenerator">构建UID</param>
<param name="repository">仓储接口</param>
<param name="cache">缓存</param>
<param name="wmsRepository"></param>
<param name="job"></param>
<param name="wmsVersionRepository"></param>
<param name="wmsefRespository"></param>
<param name="wmstbRespository"></param>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.SettleAccounts.WMSAppService.WmsJitOutPut(System.Collections.Generic.List{System.Guid},System.String)">
<member name="M:Win.Sfs.SettleAccount.Entities.SettleAccounts.WMSJitAppService.GetListAsync(Win.Sfs.SettleAccount.Entities.Wms.WmsJitOutPutRequestDto)">
<summary>
选择结算明细任务列表,选择相关任务合拼导期间出库表
准时化出库主表
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.SettleAccounts.WMSJitAppService.GetListAsync(Win.Sfs.SettleAccount.Entities.Wms.WmsJitOutPutDetialRequestDto)">
<summary>
准时化出库明细
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.SettleAccounts.WMSJitAppService.WmsJitAudit(System.Collections.Generic.List{System.Guid})">
<summary>
任务明细标记已确认
</summary>
<param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
<returns></returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.SettleAccounts.WMSJitAppService.WmsJitCancel(System.Collections.Generic.List{System.Guid})">
<summary>
任务明细标记已确认
</summary>
<param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
<returns></returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.SettleAccounts.WMSJitAppService.WmsJitOutPut(Win.Sfs.SettleAccount.Entities.Wms.WmsJitRequestDto)">
<summary>
选择任务,生成出库单,只包含已确认的单据
</summary>
<param name="ids"></param>
<param name="version"></param>
<returns></returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.SettleAccounts.WMSJitAppService.WmsJitOutPutPass(Win.Sfs.SettleAccount.Entities.Wms.WmsJitRequestDto)">
<summary>
出库界面功能,核准出库功能
</summary>
<param name="version"></param>
<param name="p_list"></param>
<returns></returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.SettleAccounts.WMSJitAppService.WmsJitOutPutCancel(Win.Sfs.SettleAccount.Entities.Wms.WmsJitRequestDto)">
<summary>
出库界面功能, 撤销核准出库
</summary>
<param name="ids"></param>
<param name="version"></param>
<returns></returns>
</member>
<member name="T:Win.Sfs.SettleAccount.Entities.SettleAccounts.WMSKanbanAppService">
<summary>
wms出库
</summary>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.SettleAccounts.WMSKanbanAppService.#ctor(Win.Sfs.BaseData.ImportExcelCommon.IExcelImportAppService,Win.Sfs.SettleAccount.ISettleAccountBranchEfCoreRepository{Win.Sfs.SettleAccount.Entities.WMS.WmsKanbanOutPutDetial,System.Guid},Win.Sfs.SettleAccount.ISettleAccountBranchEfCoreRepository{Win.Sfs.SettleAccount.Entities.TaskJob,System.Guid},Win.Sfs.SettleAccount.ISettleAccountBranchEfCoreRepository{Win.Sfs.SettleAccount.Entities.WMS.WmsKanbanOutPut,System.Guid},Win.Sfs.SettleAccount.Repository.WMSEfCoreRepository{Win.Sfs.SettleAccount.Entities.WMS.WmsKanbanOutPutDetial},Win.Sfs.SettleAccount.Repository.WMSEfCoreRepository{WY.NewJit.Extends.PaiGe.WMS.TB_BILL})">
<summary>
</summary>
<param name="wmsRepository"></param>
<param name="job"></param>
<param name="wmsVersionRepository"></param>
<param name="wmsefRespository"></param>
<param name="wmstbRespository"></param>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.SettleAccounts.WMSKanbanAppService.GetListAsync(Win.Sfs.SettleAccount.Entities.Wms.WmsKanbanOutPutRequestDto)">
<summary>
准时化出库主表
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.SettleAccounts.WMSKanbanAppService.GetListAsync(Win.Sfs.SettleAccount.Entities.Wms.WmsKanbanOutPutDetialRequestDto)">
<summary>
准时化出库明细
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.SettleAccounts.WMSKanbanAppService.WmsKanbanAudit(System.Collections.Generic.List{System.Guid})">
<summary>
任务明细标记已确认
</summary>
<param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
<returns></returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.SettleAccounts.WMSKanbanAppService.WmsKanbanOutPut(Win.Sfs.SettleAccount.Entities.Wms.WmsJitRequestDto)">
<summary>
选择任务,生成出库单,只包含已确认的单据
</summary>
<param name="ids"></param>
<param name="version"></param>
<returns></returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.SettleAccounts.WMSKanbanAppService.WmsKanbanOutPutPass(Win.Sfs.SettleAccount.Entities.Wms.WmsJitRequestDto)">
<summary>
出库界面功能,核准出库功能
</summary>
<param name="version"></param>
<param name="p_list"></param>
<returns></returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.SettleAccounts.WMSKanbanAppService.WmsKanbanOutPutCancel(Win.Sfs.SettleAccount.Entities.Wms.WmsJitRequestDto)">
<summary>
出库界面功能, 撤销核准出库
</summary>
<param name="ids"></param>
<param name="version"></param>
<returns></returns>
</member>
<member name="T:Win.Sfs.SettleAccount.Entities.SettleAccounts.WMSSharePartAppService">
<summary>
wms出库
</summary>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.SettleAccounts.WMSSharePartAppService.#ctor(Win.Sfs.SettleAccount.ISettleAccountBranchEfCoreRepository{Win.Sfs.SettleAccount.Entities.WMS.WmsSharePartOutPutDetial,System.Guid},Win.Sfs.SettleAccount.ISettleAccountBranchEfCoreRepository{Win.Sfs.SettleAccount.Entities.TaskJob,System.Guid},Win.Sfs.SettleAccount.ISettleAccountBranchEfCoreRepository{Win.Sfs.SettleAccount.Entities.WMS.WmsSharePartOutPut,System.Guid},Win.Sfs.SettleAccount.Repository.WMSEfCoreRepository{Win.Sfs.SettleAccount.Entities.WMS.WmsSharePartOutPutDetial},Win.Sfs.SettleAccount.Repository.WMSEfCoreRepository{WY.NewJit.Extends.PaiGe.WMS.TB_BILL})">
<summary>
</summary>
<param name="wmsRepository"></param>
<param name="job"></param>
<param name="wmsVersionRepository"></param>
<param name="wmsefRespository"></param>
<param name="wmstbRespository"></param>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.SettleAccounts.WMSSharePartAppService.GetListAsync(Win.Sfs.SettleAccount.Entities.Wms.WmsSharePartOutPutRequestDto)">
<summary>
准时化出库主表
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.SettleAccounts.WMSSharePartAppService.GetListAsync(Win.Sfs.SettleAccount.Entities.Wms.WmsSharePartOutPutDetialRequestDto)">
<summary>
准时化出库明细
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.SettleAccounts.WMSSharePartAppService.WmsSharePartAudit(System.Collections.Generic.List{System.Guid})">
<summary>
任务明细标记已确认
</summary>
<param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
<returns></returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.SettleAccounts.WMSSharePartAppService.WmsSharePartOutPut(Win.Sfs.SettleAccount.Entities.Wms.WmsJitRequestDto)">
<summary>
选择任务,生成出库单,只包含已确认的单据
</summary>
<param name="ids"></param>
<param name="version"></param>
<returns></returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.SettleAccounts.WMSSharePartAppService.WmsSharePartOutPutPass(Win.Sfs.SettleAccount.Entities.Wms.WmsJitRequestDto)">
<summary>
出库界面功能,核准出库功能
</summary>
<param name="version"></param>
<param name="p_list"></param>
<returns></returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.SettleAccounts.WMSSharePartAppService.WmsSharePartOutPutCancel(Win.Sfs.SettleAccount.Entities.Wms.WmsJitRequestDto)">
<summary>
出库界面功能, 撤销核准出库
</summary>
<param name="ids"></param>
<param name="version"></param>
<returns></returns>
</member>
<member name="T:Win.Sfs.SettleAccount.Entities.SettlementPakAndSparePart.SettlementPakAndSparePartsAppService">
<summary>
结算包与散件对应关系服务
@ -2714,47 +2881,6 @@
<param name="end"></param>
<returns></returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Reports.ReportServices.ReportService.UnSettledMake(System.String,System.String,System.String,System.String,System.String,System.String,System.String,System.DateTime,System.DateTime)">
<summary>
未结算对比
</summary>
<param name="year"></param>
<param name="period"></param>
<param name="version"></param>
<param name="customerCode"></param>
<param name="factory"></param>
<param name="matialCode"></param>
<param name="state"></param>
<param name="begin"></param>
<param name="end"></param>
<returns></returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Reports.ReportServices.ReportService.FisUnSettledMake(System.String,System.String,System.String,System.String,System.String)">
<summary>
ERP总成开票报表功能
</summary>
<param name="year"></param>
<param name="period"></param>
<param name="version"></param>
<param name="customerCode"></param>
<param name="factory"></param>
<param name="matialCode"></param>
<param name="state"></param>
<param name="begin"></param>
<param name="end"></param>
<returns></returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Reports.ReportServices.ReportService.PriceQtyDiffMake(System.String,System.String,System.String,System.String,System.String)">
<summary>
价差量差分析报表
</summary>
<param name="year"></param>
<param name="version"></param>
<param name="customerCode"></param>
<param name="factory"></param>
<param name="state"></param>
<returns></returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Reports.ReportServices.ReportService.InvoiceSettledDiffMake(System.String,System.String,System.String,System.String,System.String,System.String,System.String,System.String)">
<summary>
1.大众发票与结算核对汇总表
@ -2763,40 +2889,33 @@
<returns></returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Reports.ReportServices.ReportService.InvoiceSettledDetailDiffMake(System.String,System.String,System.String,System.String,System.String,System.String,System.String,System.String,System.String,System.String)">
<summary>
2.大众发票与结算核对明细表
</summary>
<param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
<returns></returns>
<summary>
发票与结算核对明细表
</summary>
<param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
<returns></returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Reports.ReportServices.ReportService.UnInvoiceSettledDetailDiffMake(System.String,System.String,System.String,System.String,System.String,System.String,System.String,System.String,System.String,System.String)">
<summary>
3.大众准时化结算数量差异比对表
3.准时化结算数量差异比对表
</summary>
<param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
<returns></returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Reports.ReportServices.ReportService.UnsettledDetailReportServiceMake(System.String,System.String,System.String,System.String,System.String,System.String,System.String,System.String)">
<summary>
7.大众准时化未结明细表(包含漏结,漏结要有标识)
准时化未结明细表(包含漏结,漏结要有标识)
</summary>
<param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
<returns></returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Reports.ReportServices.ReportService.UnSettleDiffExportServiceMake(System.String,System.String,System.String,System.String,System.String,System.String,System.String,System.String)">
<summary>
6.大众准时化未结差异比对表
准时化未结差异比对表
</summary>
<param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
<returns></returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Reports.ReportServices.ReportService.SettledPartAndErpPartPriceDiffMake(System.String,System.String)">
<summary>
结算总成和ERP总成价格对比
</summary>
<param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
<returns></returns>
</member>
<member name="M:Win.Sfs.SettleAccount.SettleAccountApplicationAutoMapperProfile.CreateMapHQ_H_Platform">
<summary>
红旗H平台导入

78
src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/TaskJobs/TEA_TASK_SUB.cs

@ -0,0 +1,78 @@
using System;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Collections.Generic;
namespace CK.SCP.Models.ExchangeCenterTables
{
/// <summary>
/// 任务订阅表
/// </summary>
[Description("任务订阅表")]
public class TEA_TASK_SUB
{
[Description("任务状态")]
public int TaskState { get; set; }
[Description("任务编号")]
public Guid TaskID { get; set; }
[Description("表格名称")]
[StringLength(50)]
public string TableName { get; set; }
[Description("创建者")]
[StringLength(50)]
public string Creator { get; set; }
[Description("数据行数")]
public int DataCount { get; set; }
[Description("订阅者")]
[StringLength(50)]
public string Subscriber { get; set; }
[Description("失败行数")]
public int FailedCount { get; set; }
[Description("失败信息")]
[StringLength(50)]
public string FailedInfo { get; set; }
[Description("域")]
[StringLength(50)]
public string Domain { get; set; }
[Description("地点")]
[StringLength(50)]
public string Site { get; set; }
[Key]
public Guid GUID { get; set; } = Guid.NewGuid();
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int UID { get; set; }
[Description("创建人")]
[StringLength(50)]
public string CreateUser { get; set; }
[Description("创建时间")]
public DateTime CreateTime { get; set; }
[Description("备注")]
public string Remark { get; set; }
[Description("修改人")]
[StringLength(50)]
public string UpdateUser { get; set; }
[Description("修改时间")]
public DateTime? UpdateTime { get; set; }
}
}

9
src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/TaskJobs/TaskJob.cs

@ -40,9 +40,12 @@ namespace Win.Sfs.SettleAccount.Entities
{
DownFileName = downfileName;
}
public void SetRemark(string remark)
{
Remark = remark;
}
public string Type { set; get; }
public string State { set; get; }

298
src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/WMS/TaskList.cs

@ -90,7 +90,9 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
{
}
public WmsJitOutPutDetial(Guid id, string wmsBillNum, string kennCode, string chassisNumber, string materialCode, string materialDesc, string materialGroup, string outPut, string inPut, int state, string extend1, string extend2, string extend3, string parentMaterialCode,string billNum,Guid taskId)
public WmsJitOutPutDetial(Guid id, string wmsBillNum, string kennCode, string chassisNumber, string materialCode, string materialDesc, string materialGroup, string outPut, string inPut, int state, string extend1, string extend2, string extend3, string parentMaterialCode,string billNum,Guid taskId,string remark,decimal qty):base(id)
{
Id = id;
WmsBillNum = wmsBillNum;
@ -108,6 +110,156 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
ParentMaterialCode = parentMaterialCode;
BillNum = billNum;
TaskId = taskId;
Remark = remark;
Qty = qty;
}
public void SetData(Guid guid,string output,string input,string extend1,string extend2,string version,Guid taskid)
{
Id = guid;
OutPut = output;
InPut = input;
Extend1 = extend1;
Extend2 = extend2;
Version = version;
TaskId=taskid;
}
[ImporterHeader(Name = "出库库位", IsIgnore = true)]
//出库库位
public string OutPut { set; get; }
[ImporterHeader(Name = "入库库位", IsIgnore = true)]
//入库库位
public string InPut { set; get; }
[ImporterHeader(Name = "状态")]
public int State { get; set; }
[ImporterHeader(Name = "扩展字段1", IsIgnore = true)]
/// <summary>
/// 扩展字段1
/// </summary>
public string Extend1 { set; get; }
/// <summary>
/// 扩展字段2
/// </summary>
[ImporterHeader(Name = "扩展字段2", IsIgnore = true)]
public string Extend2 { set; get; }
/// <summary>
/// 扩展字段3
/// </summary>
[ImporterHeader(Name = "版本号", IsIgnore = true)]
public string Version { set; get; }
[ImporterHeader(Name = "单号",IsIgnore =true)]
public string BillNum { set; get; }
[ImporterHeader(Name = "任务号", IsIgnore = true)]
public Guid TaskId { set; get; }
[ImporterHeader(Name = "交货单号", AutoTrim = true)]
public string WmsBillNum { set; get; }
[ImporterHeader(Name = "KENN号")]
//KENN号
public string KennCode { set; get; }
[ImporterHeader(Name = "底盘号", AutoTrim = true)]
//底盘号
public string ChassisNumber { set; get; }
[ImporterHeader(Name = "物料号", AutoTrim = true)]
//物料号
public string MaterialCode { set; get; }
[ImporterHeader(Name = "组件组物料",AutoTrim =true)]
//物料号
public string ParentMaterialCode { set; get; }
[ImporterHeader(Name = "物料描述", AutoTrim = true)]
//物料描述
public string MaterialDesc { set; get; }
[ImporterHeader(Name = "物料组(车型)", AutoTrim = true)]
//物料组(车型)
public string MaterialGroup { set; get; }
[ImporterHeader(Name = "结算数量")]
public decimal Qty { set; get; }
}
public class WmsKanbanOutPut : FullAuditedAggregateRootBase<Guid>
{
public WmsKanbanOutPut()
{
}
public WmsKanbanOutPut(Guid id, string version, string billNum, string creator) : base(id)
{
Id = id;
Version = version;
BillNum = billNum;
Creator = creator;
}
public string Version { set; get; }
public string BillNum { set; get; }
public string Creator { set; get; }
}
/// <summary>
///
/// </summary>
public class WmsKanbanOutPutDetial : FullAuditedAggregateRootBase<Guid>
{
public WmsKanbanOutPutDetial()
{
}
public WmsKanbanOutPutDetial(Guid id, string wmsBillNum, string kanban, string materialCode, string materialDesc, string materialGroup, string outPut, string inPut, int state, string extend1, string extend2, string extend3, string parentMaterialCode, string billNum, Guid taskId,string remark,decimal qty)
{
Id = id;
WmsBillNum = wmsBillNum;
Kanban = kanban;
MaterialCode = materialCode;
MaterialDesc = materialDesc;
MaterialGroup = materialGroup;
OutPut = outPut;
InPut = inPut;
State = state;
Extend1 = extend1;
Extend2 = extend2;
Version = extend3;
ParentMaterialCode = parentMaterialCode;
BillNum = billNum;
TaskId = taskId;
Remark = remark;
Qty = qty;
}
public void SetId(Guid id)
{
Id = id;
}
@ -120,12 +272,133 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
public string ParentMaterialCode { set; get; }
[ImporterHeader(Name = "交货单号")]
public string WmsBillNum { set; get; }
[ImporterHeader(Name = "KENN号")]
[ImporterHeader(Name = "看板号")]
//KENN号
public string KennCode { set; get; }
[ImporterHeader(Name = "底盘号")]
//底盘号
public string ChassisNumber { set; get; }
public string Kanban { set; get; }
[ImporterHeader(Name = "物料号")]
//物料号
public string MaterialCode { set; get; }
[ImporterHeader(Name = "物料描述")]
//物料描述
public string MaterialDesc { set; get; }
[ImporterHeader(Name = "物料组(车型)")]
//物料组(车型)
public string MaterialGroup { set; get; }
[ImporterHeader(Name = "出库库位")]
//出库库位
public string OutPut { set; get; }
[ImporterHeader(Name = "入库库位")]
//入库库位
public string InPut { set; get; }
[ImporterHeader(Name = "状态")]
public int State { get; set; }
[ImporterHeader(Name = "扩展字段1")]
/// <summary>
/// 扩展字段1
/// </summary>
public string Extend1 { set; get; }
/// <summary>
/// 扩展字段2
/// </summary>
[ImporterHeader(Name = "扩展字段2")]
public string Extend2 { set; get; }
/// <summary>
/// 扩展字段3
/// </summary>
[ImporterHeader(Name = "版本号")]
public string Version { set; get; }
[ImporterHeader(Name = "数量")]
public decimal? Qty { set; get; }
[ImporterHeader(Name = "数量", IsIgnore = true)]
public string BillNum { set; get; }
public Guid TaskId { set; get; }
}
public class WmsSharePartOutPut : FullAuditedAggregateRootBase<Guid>
{
public WmsSharePartOutPut()
{
}
public WmsSharePartOutPut(Guid id, string version, string billNum, string creator) : base(id)
{
Id = id;
Version = version;
BillNum = billNum;
Creator = creator;
}
public string Version { set; get; }
public string BillNum { set; get; }
public string Creator { set; get; }
}
/// <summary>
///
/// </summary>
public class WmsSharePartOutPutDetial : FullAuditedAggregateRootBase<Guid>
{
public WmsSharePartOutPutDetial()
{
}
public WmsSharePartOutPutDetial(Guid id, string wmsBillNum, string orderBillNum, string materialCode, string materialDesc, string materialGroup, string outPut, string inPut, int state, string extend1, string extend2, string extend3, string parentMaterialCode, string billNum, Guid taskId,string remark,decimal qty )
{
Id = id;
WmsBillNum = wmsBillNum;
OrderBillNum = orderBillNum;
MaterialCode = materialCode;
MaterialDesc = materialDesc;
MaterialGroup = materialGroup;
OutPut = outPut;
InPut = inPut;
State = state;
Extend1 = extend1;
Extend2 = extend2;
Version = extend3;
ParentMaterialCode = parentMaterialCode;
BillNum = billNum;
TaskId = taskId;
Remark = remark;
Qty = qty;
}
public void SetId(Guid id)
{
Id = id;
}
// 交货单号 实际发货日期 KENN号 底盘号 物料号 物料描述 客户物料 组件组物料 组件组物料描述 物料组(车型) 定价 金额 结算平台未结数量 大众R3未结数量 差异金额 差异数量 漏结标识 漏结期间 说明
//交货单号
[ImporterHeader(Name = "组件组物料")]
public string ParentMaterialCode { set; get; }
[ImporterHeader(Name = "交货单号")]
public string WmsBillNum { set; get; }
[ImporterHeader(Name = "看板号")]
//KENN号
public string OrderBillNum { set; get; }
[ImporterHeader(Name = "物料号")]
//物料号
public string MaterialCode { set; get; }
@ -159,9 +432,9 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
[ImporterHeader(Name = "版本号")]
public string Version { set; get; }
[ImporterHeader(Name = "数量")]
public string Qty { set; get; }
public decimal? Qty { set; get; }
[ImporterHeader(Name = "数量",IsIgnore =true)]
[ImporterHeader(Name = "数量", IsIgnore = true)]
public string BillNum { set; get; }
@ -172,4 +445,13 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
}

122
src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/SettleAccountDbContextModelCreatingExtensions.cs

@ -317,7 +317,14 @@ namespace Win.Sfs.SettleAccount
//一汽轿车
builder.ConfigureBTCar(options);
builder.ConfigureBTCarVersion(options);
builder.ConfigureWmsJitOutPutDetail(options);
builder.ConfigureWmsJitOutPutVersion(options);
builder.ConfigureWmsJitOutPutDetail(options);
builder.ConfigureWmsJitOutPutVersion(options);
builder.ConfigureWmsKanbanOutPutVersion(options);
builder.ConfigureWmsKanbanOutPutDetail(options);
builder.ConfigureWmsSharePartOutPutDetail(options);
builder.ConfigureWmsSharePartOutPutVersion(options);
#endregion
}
@ -920,6 +927,119 @@ namespace Win.Sfs.SettleAccount
}
private static void ConfigureWmsJitOutPutVersion(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options)
{
builder.Entity<WmsJitOutPut>(b =>
{
b.ToTable($"{options.TablePrefix}_WmsJitOutPut", options.Schema);
b.ConfigureByConvention();
b.Property(x => x.BillNum).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.Version).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength);
b.HasIndex(x => new { x.BillNum });
});
}
private static void ConfigureWmsJitOutPutDetail(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options)
{
builder.Entity<WmsJitOutPutDetial>(b =>
{
b.ToTable($"{options.TablePrefix}_WmsJitOutPutDetial", options.Schema);
b.ConfigureByConvention();
b.Property(x => x.BillNum).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.WmsBillNum).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.Version).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.OutPut).HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.InPut).HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.KennCode).HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.ChassisNumber).HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.ParentMaterialCode).HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.Extend1).HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.Extend2).HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.MaterialCode).HasMaxLength(CommonConsts.MaxCodeLength);
b.HasIndex(x => new { x.Version }).IsUnique().HasFilter(IsDeletedFilter);
});
}
private static void ConfigureWmsKanbanOutPutVersion(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options)
{
builder.Entity<WmsKanbanOutPut>(b =>
{
b.ToTable($"{options.TablePrefix}_WmsKanbanOutPut", options.Schema);
b.ConfigureByConvention();
b.Property(x => x.BillNum).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.Version).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength);
b.HasIndex(x => new { x.BillNum });
});
}
private static void ConfigureWmsKanbanOutPutDetail(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options)
{
builder.Entity<WmsKanbanOutPutDetial>(b =>
{
b.ToTable($"{options.TablePrefix}_WmsKanbanOutPutDetial", options.Schema);
b.ConfigureByConvention();
b.Property(x => x.BillNum).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.WmsBillNum).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.Version).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.OutPut).HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.InPut).HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.Kanban).HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.ParentMaterialCode).HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.Extend1).HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.Extend2).HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.MaterialCode).HasMaxLength(CommonConsts.MaxCodeLength);
b.HasIndex(x => new { x.BillNum});
});
}
private static void ConfigureWmsSharePartOutPutVersion(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options)
{
builder.Entity<WmsSharePartOutPut>(b =>
{
b.ToTable($"{options.TablePrefix}_WmsSharePartOutPut", options.Schema);
b.ConfigureByConvention();
b.Property(x => x.BillNum).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.Version).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength);
b.HasIndex(x => new { x.BillNum });
});
}
private static void ConfigureWmsSharePartOutPutDetail(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options)
{
builder.Entity<WmsSharePartOutPutDetial>(b =>
{
b.ToTable($"{options.TablePrefix}_WmsSharePartOutPutDetial", options.Schema);
b.ConfigureByConvention();
b.Property(x => x.BillNum).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.WmsBillNum).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.Version).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.OutPut).HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.InPut).HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.OrderBillNum).HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.ParentMaterialCode).HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.Extend1).HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.Extend2).HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.MaterialCode).HasMaxLength(CommonConsts.MaxCodeLength);
b.HasIndex(x => new { x.BillNum });
});
}
#endregion

16
src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/InvoiceSettledDetailDiffDapperRepository.cs

@ -44,27 +44,27 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
// DiffPrice = diffPrice;
//}
[ExporterHeader(DisplayName = "交货单号 ")]
[ExporterHeader(DisplayName = "交货单号")]
public override string WmsBillNum { set; get; }
[ExporterHeader(DisplayName = "实际发货日期 ")]
[ExporterHeader(DisplayName = "实际发货日期")]
public override DateTime CP5Time { set; get; }
[ExporterHeader(DisplayName = "KENN号")]
public override string KENNCode { set; get; }
[ExporterHeader(DisplayName = "底盘号")]
public override string ChassisNumber { set; get; }
[ExporterHeader(DisplayName = "交货状态 ")]
[ExporterHeader(DisplayName = "交货状态")]
public override string WmsState { set; get; }
[ExporterHeader(DisplayName = "物料号")]
public override string SapMaterialCode { set; get; }
[ExporterHeader(DisplayName = "物料描述 ")]
[ExporterHeader(DisplayName = "物料描述")]
public override string MaterialDesc { set; get; }
[ExporterHeader(DisplayName = "客户物料 ")]
[ExporterHeader(DisplayName = "客户物料")]
public override string MaterialCode { set; get; }
[ExporterHeader(DisplayName = "组件组物料 ")]
[ExporterHeader(DisplayName = "组件组物料")]
public override string ParentSapMaterialCode { set; get; }
[ExporterHeader(DisplayName = "组件组物料描述 ")]
[ExporterHeader(DisplayName = "组件组物料描述")]
public override string ParentMaterialDesc { set; get; }
[ExporterHeader(DisplayName = "物料组(车型) ")]
[ExporterHeader(DisplayName = "物料组(车型)")]
public override string MaterialGroup { set; get; }
[ExporterHeader(DisplayName = "定价")]
public override decimal Price { set; get; }

9
src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/UnSettledDetailDapperRepository.cs

@ -83,6 +83,10 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" ItemCode MaterialCode,\n" +
" ChassisNumber,\n" +
" OrderBillNum KENNCode,\n" +
" ChassisNumber2,\n"+
" KENNCode KENNCode2, \n"+
" QTY,\n" +
" ErpMaterialCode ParentSapMaterialCode,\n" +
" '' FLAG \n" +
@ -99,6 +103,9 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" ItemCode MaterialCode,\n" +
" ChassisNumber,\n" +
" OrderBillNum KENNCode,\n" +
" ChassisNumber2,\n" +
" KENNCode KENNCode2, \n" +
" QTY,\n" +
" ErpMaterialCode ParentSapMaterialCode,\n" +
" 'L' FLAG \n" +
@ -109,7 +116,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" AND STATE = 4 {0}\n" +
" ) A\n" +
" left join (select * from Set_Unsettle where version='{1}') f \n" +
" on a.MaterialCode=f.MaterialCode and a.KENNCode=f.KENNCode and a.ChassisNumber=f.ChassisNumber \n"+
" on a.MaterialCode=f.MaterialCode and a.KENNCode2=f.KENNCode and a.ChassisNumber2=f.ChassisNumber \n"+
" LEFT JOIN Set_material B ON a.MaterialCode = b.CustomerPartCode \n" +
" LEFT JOIN Set_material d ON a.ParentSapMaterialCode = d.MaterialCode \n" +
" ) temp1\n" +

2
src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/SettleAccounts/SettleAccountRepository.cs

@ -122,7 +122,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccount
}
BulkConfig cfg = new BulkConfig() { BulkCopyTimeout=0, BatchSize=10000,};
BulkConfig cfg = new BulkConfig() { BulkCopyTimeout=0, BatchSize=10000, UseTempDB=true};
DbContext.BulkInsert(_insertls,cfg);
}
catch (Exception e)

2
src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Tasks/TaskDapperRepository.cs

@ -23,7 +23,7 @@ namespace Win.Sfs.SettleAccount.Repository
public virtual async Task<List<Job>> GetTaskJobsAsync(Job p_task)
{
string str = string.Empty;
str += "SELECT b.Id, a.StateId,b.Type, a.StateName, a.InvocationData, a.Arguments, a.CreatedAt, a.ExpireAt, b.TaskId, b.Name, \n";
str += "SELECT b.Id, a.StateId,b.Type, a.StateName, a.InvocationData, a.Arguments, a.CreatedAt, a.ExpireAt, b.TaskId, b.Name,isnull(b.remark,'') remark, \n";
str += " b.ActionName, b.Error, b.Creator, b.Email, b.FileName, b.DownFileName, b.ServiceName,b.RealDownFileName,b.RealFileName \n";
str += " FROM HangFire.Job AS a INNER JOIN \n";
str += " Set_TaskJob AS b ON a.Id = b.TaskId \n";

2
src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/UnSettleAccount/UnSettleAccountRepository.cs

@ -57,7 +57,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccount
_insertls.Add(s);
}
}
DbContext.BulkInsert(_insertls);
DbContext.BulkInsert(_insertls,new BulkConfig() { BatchSize=100000, BulkCopyTimeout=0 });
}
catch (Exception e)
{

1
src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/InvoiceSettledDiffExportService.cs

@ -96,6 +96,7 @@ namespace SettleAccount.Job.Services
});
}
_lsExport=_lsExport.OrderBy(p => p.SapMaterialGroup).ToList();
_outputService.Export<InvoiceSettledDiffExportDto>(id,_first, _lsExport);

3
vue/src/components/ImportExcel-base/index.vue

@ -302,6 +302,7 @@ export default {
scrapClaims: "CP7报废和索赔",
sparePart: "大众备件结算明细",
hqHPlatform: "红旗H平台导入",
hqMPlatform: "红旗M平台导入",
bomdatabase: "产品结构BOM",
prebatch: "预批量",
secondaryPriceRatio: "二配结算价格比例",
@ -328,7 +329,7 @@ export default {
scrapClaims: "/api/settleaccount/ScrapClaims/ExcelImport", //CP7
sparePart: "/api/settleaccount/SparePart/ExcelImport", //
hqHPlatform: "/api/settleaccount/HQHPlatform/ExcelImport", //H
hqMPlatform: "/api/settleaccount/HQMPlatform/ExcelImport", //M
bomdatabase: "/api/settleaccount/bom/ExcelImport",
prebatch: "/api/settleaccount/Prebatch/ExcelImport",
secondaryPriceRatio:

20
vue/src/router/index.js

@ -16,6 +16,10 @@ import vwFisDataRouter from './modules/vwFisData'
import wheeldataRouter from './modules/wheeldata'
import vwNoBarcodeRouter from './modules/vwKBNoBarcodedata'
import JobTimeDataRouter from './modules/jobtimedata'
import vwMenudataRouter from './modules/vw_menu'
import hqMenudataRouter from './modules/hq_menu'
import btcarDataRouter from './modules/bt_menu'
import vwOutOrderDataRouter from './modules/vw_out_order'
//import newjitRouter from './modules/newjit-basedata'
import pgfis from './modules/fis'
import pgfisPrint from './modules/fisprint'
@ -86,8 +90,8 @@ export const constantRoutes = [
children: [
{
path: 'dashboard',
component: () => import('@/views/pg-fis/basedate/m100Online/normalPritIndex.vue'),//fis
//component: () => import('@/views/ux/backGroundWork'),
//component: () => import('@/views/pg-fis/basedate/m100Online/normalPritIndex.vue'),//fis
component: () => import('@/views/ux/backGroundWork'),
name: 'Dashboard',
meta: {
title: '系统首页',
@ -170,14 +174,18 @@ export const asyncRoutes = [
/** when your routing map is too long, you can split it into small modules **/
managerRouter,//系统首页
personRouter,//系统管理
//basedataRouter,//基础数据维护
basedataRouter,//基础数据维护
vwMenudataRouter,//大众
hqMenudataRouter,//红旗
vwOutOrderDataRouter,
//btcarDataRouter,//一汽轿车
//vwFisDataRouter,//结算与开票数据导入
//billdataRouter,//销售结算与开票报表
//businessdataRouter,
//wheeldataRouter,//大众看板和备件
pgfisPrint,//排序单打印
pgfis,//派格fis
//JobTimeDataRouter,//后台作业监控
// pgfisPrint,//排序单打印
// pgfis,//派格fis
JobTimeDataRouter,//后台作业监控
// 404 page must be placed at the end !!!
{ path: '*', redirect: '/404', hidden: true }

44
vue/src/router/modules/bt_menu.js

@ -0,0 +1,44 @@
//大众-FIS结算-路由
import Layout from '@/layout'
const btcarDataRouter = {
path: '/cpat',
component: Layout,
redirect: 'pg',
name: 'btcar',
//hidden: true,
meta: {
//requiresAuth: true,
title: '一轿奔腾',
index: 0,
type: 'crm',
icon: '单据导入',
keepAlive: false,
},
children: [
{
path: 'hq-car-platform',
component: () => import('@/views/ux/vw/dataInput/hq_bt'),
name: 'ERPEI',//命名路由
meta: {
title: '一轿奔腾导入',
roles: ['SettleAccount.Boms'],//控制页面角色(可以设置多个角色)
icon: '结算'
}
},
{
path: 'hq-car-platform-export',
component: () => import('@/views/ux/vw/dataInput/hq_m'),
name: 'ERPEI',//命名路由
meta: {
title: '一轿奔腾结算核对输出',
//roles: ['SettleAccount.Boms'],//控制页面角色(可以设置多个角色)
icon: '结算'
}
},
]
}
export default btcarDataRouter

125
vue/src/router/modules/hq_menu.js

@ -0,0 +1,125 @@
import Layout from '@/layout'
const hqMenudataRouter = {
path: '/capt-hq',
component: Layout,
redirect: 'ux/vw/dataInput/hq_h',
name: 'HQData',
meta: {
title: '红旗工厂',
icon: '红旗',
//roles: ['SettleAccount.HQConsigns', 'SettleAccount.HQSpecConsigns', 'SettleAccount.HQKBs', 'SettleAccount.HQSpecKBs'],
keepAlive: false,
},
children: [
{
path: '/import-h-data',
name: 'import-h-data',//命名路由-二级
component: () => import('@/views/ux/vw/dataInput/hq_h'),
redirect: 'ux/vw/dataInput/hq_h',
meta: {
title: 'H平台',
// roles: ['SettleAccount.HQKBs', 'SettleAccount.HQSpecKBs'],
icon: '看板'
},
children: [
{
path: 'hq-H-platform',
component: () => import('@/views/ux/vw/dataInput/hq_h'),
name: 'ERPEI',//命名路由
meta: {
title: '红旗H平台导入',
roles: ['SettleAccount.Boms'],//控制页面角色(可以设置多个角色)
icon: '结算'
}
},
{
path: 'hq-H-platform-export',
component: () => import('@/views/ux/vw/dataInput/ScrapClaims'),
name: 'ScrapClaims',
meta: {
title: 'H平台结算差异输出',
roles: ['SettleAccount.FISs'],
icon: '文件'
}
}
]
},
{
path: '/export-m-data',
component: () => import('@/views/ux/vw/dataInput/hq_m'),
name: 'export-m-data',//命名路由
redirect: '/ux/vw/dataInput/hq_m',
meta: {
title: 'M平台',
//roles: ['SettleAccount.HQConsigns', 'SettleAccount.HQSpecConsigns'],
icon: '结算'
},
children: [
{
path: 'hq-M-platform',
component: () => import('@/views/ux/vw/dataInput/hq_m'),
name: 'ERPEI',//命名路由
meta: {
title: '红旗M平台导入',
//roles: ['SettleAccount.Boms'],//控制页面角色(可以设置多个角色)
icon: '结算'
}
},
{
path: 'hq-M-platform-export',
component: () => import('@/views/ux/billManage/sparePart'),
name: 'SparePartReport',//命名路由
meta: {
title: 'H平台结算差异输出',
//roles: ['abpvnext_master.ProjectPeople'],//控制页面角色(可以设置多个角色)
icon: '二配'
}
}
]
},
{
path: '/export-f-data',
component: () => import('@/views/ux/vw/dataInput/hq_f'),
name: 'export-f-data',//命名路由
redirect: '/ux/vw/dataInput/hq_f',
meta: {
title: 'F平台',
//roles: ['SettleAccount.HQConsigns', 'SettleAccount.HQSpecConsigns'],
icon: '结算'
},
children: [
{
path: 'hq-F-platform',
component: () => import('@/views/ux/vw/dataInput/hq_f'),
name: 'ERPEI',//命名路由
meta: {
title: '红旗F平台导入',
//roles: ['SettleAccount.Boms'],//控制页面角色(可以设置多个角色)
icon: '结算'
}
},
{
path: 'hq-F-platform-export',
component: () => import('@/views/ux/billManage/sparePart'),
name: 'SparePartReport',//命名路由
meta: {
title: 'F平台结算差异输出',
//roles: ['abpvnext_master.ProjectPeople'],//控制页面角色(可以设置多个角色)
icon: '二配'
}
}
]
}
]
}
export default hqMenudataRouter

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

@ -88,6 +88,16 @@ const vwFisDataRouter = {
icon: '结算'
}
},
{
path: 'hq-M-platform',
component: () => import('@/views/ux/vw/dataInput/hq_m'),
name: 'ERPEI',//命名路由
meta: {
title: '红旗M平台导入',
//roles: ['SettleAccount.Boms'],//控制页面角色(可以设置多个角色)
icon: '结算'
}
},
]
}

181
vue/src/router/modules/vw_menu.js

@ -0,0 +1,181 @@
import Layout from '@/layout'
const vwMenudataRouter = {
path: '/capt-vw',
component: Layout,
redirect: 'ux/basedata/Invoice/index',
name: 'HQData',
meta: {
title: '大众工厂',
icon: 'vw',
//roles: ['SettleAccount.HQConsigns', 'SettleAccount.HQSpecConsigns', 'SettleAccount.HQKBs', 'SettleAccount.HQSpecKBs'],
keepAlive: false,
},
children: [
{
path: '/import-data',
name: 'import-data',//命名路由-二级
component: () => import('@/views/ux/billManage/index'),
redirect: 'ux/basedata/Invoice/index',
meta: {
title: '数据导入',
// roles: ['SettleAccount.HQKBs', 'SettleAccount.HQSpecKBs'],
icon: '看板'
},
children: [
{
path: 'invoice',
component: () => import('@/views/ux/basedata/Invoice/index'),
name: 'Invoices',
meta: {
title: '发票汇总',
roles: ['SettleAccount.Invoices'],
icon: '对比'
}
},
{
path: 'settle-account-finish',
component: () => import('@/views/ux/vw/dataInput/r3'),
name: 'SettleAccount',
meta: {
title: 'FIS结算明细',
roles: ['SettleAccount.SettleAccounts'],//控制页面角色(可以设置多个角色)
icon: '库存'
}
},
{
path: 'unsettle-account',
component: () => import('@/views/ux/vw/dataInput/r3'),
name: 'SettleAccount',
meta: {
title: 'FIS未结明细',
roles: ['SettleAccount.SettleAccounts'],//控制页面角色(可以设置多个角色)
icon: '结算'
}
},
{
path: 'kan-ban',
component: () => import('@/views/ux/vw/dataInput/vwKanBan/index'),
name: 'VWKanBan',//命名路由
meta: {
title: '大众看板结算导入',
roles: ['SettleAccount.SettleAccounts'],//控制页面角色(可以设置多个角色)
icon: '看板'
}
},
{
path: 'spare-part',
component: () => import('@/views/ux/vw/dataInput/SparePart'),
name: 'SparePart',//命名路由
meta: {
title: '大众备件结算导入',
roles: ['SettleAccount.Boms'],//控制页面角色(可以设置多个角色)
icon: '工厂'
}
},
{
path: 'scrap-claims',
component: () => import('@/views/ux/vw/dataInput/ScrapClaims'),
name: 'ScrapClaims',
meta: {
title: 'CP7报废和索赔导入',
roles: ['SettleAccount.FISs'],
icon: '文件'
}
},
]
},
{
path: '/export-data',
component: () => import('@/views/ux/billManage/index'),
name: 'export-data',//命名路由
redirect: 'export-data',
meta: {
title: '数据输出',
//roles: ['SettleAccount.HQConsigns', 'SettleAccount.HQSpecConsigns'],
icon: '结算'
},
children: [
{
path: '/invoice-settled/diff',
component: () => import('@/views/ux/billManage/InvoiceSettledDiff'),
name: 'InvoiceSettledDiff',//命名路由
meta: {
title: '发票与结算核对汇总',
roles: ['SettleAccount.Reports'],//控制页面角色(可以设置多个角色)
icon: '结算'
}
},
{
path: '/invoice-settled/detaildiff',
component: () => import('@/views/ux/billManage/InvoiceSettledDetailDiff'),
name: 'InvoiceSettledDetailDiff',//命名路由
meta: {
title: '准时化结算核对明细',
roles: ['SettleAccount.Reports'],//控制页面角色(可以设置多个角色)
icon: '结算对比'
}
},
{
path: '/unInvoice-settled/detailDiff',
component: () => import('@/views/ux/billManage/UnInvoiceSettledDetailDiff'),
name: 'UnInvoiceSettledDetailDiff',//命名路由
meta: {
title: '准时化量差价差输出',
roles: ['SettleAccount.Reports'],//控制页面角色(可以设置多个角色)
icon: '售后'
}
},
{
path: '/unsettle-diff/export',
component: () => import('@/views/ux/billManage/UnSettleDiffExport'),
name: 'UnSettleDiffExport',//命名路由
meta: {
title: '准时化未结核对',
roles: ['SettleAccount.Reports'],//控制页面角色(可以设置多个角色)
icon: '器具'
}
},
{
path: '/unsettled-detail',//大众准时化未结明细表(包含漏结,漏结要有标识)
component: () => import('@/views/ux/billManage/IssuedUnsettled/index'),
name: 'UnsettledDetail',//命名路由
meta: {
title: '准时化未结明细',
roles: ['SettleAccount.Reports'],//控制页面角色(可以设置多个角色)
icon: '报表'
}
},
{
path: '/kbwithcode',
component: () => import('@/views/ux/billManage/kanBanWithCode'),
name: 'KanBanWithCode',//命名路由
meta: {
title: '看板结算输出',
//roles: ['SettleAccount.EstimatedStockDiffReports'],//控制页面角色(可以设置多个角色)
icon: '看板'
}
},
{
path: '/vwsparepart',
component: () => import('@/views/ux/billManage/sparePart'),
name: 'SparePartReport',//命名路由
meta: {
title: '备件结算输出',
//roles: ['abpvnext_master.ProjectPeople'],//控制页面角色(可以设置多个角色)
icon: '供货'
}
}
]
}
]
}
export default vwMenudataRouter

54
vue/src/router/modules/vw_out_order.js

@ -0,0 +1,54 @@
//大众-FIS结算-路由
import Layout from '@/layout'
const vwOutOrderDataRouter = {
path: '/cpat-order',
component: Layout,
redirect: 'pg',
name: '业务数据',
//hidden: true,
meta: {
//requiresAuth: true,
title: '大众出库单管理',
index: 0,
type: 'crm',
icon: '单据导入',
keepAlive: false,
},
children: [
{
path: 'vw-out-order',
component: () => import('@/views/ux/billManage/vwOutOrder/index'),
name: 'SettleAccount',//命名路由
meta: {
title: '大众准时化出库单',
roles: ['SettleAccount.SettleAccounts'],//控制页面角色(可以设置多个角色)
icon: '结算'
}
},
{
path: 'kanban-out-order',
component: () => import('@/views/ux/billManage/kanbanOutOrder/index'),
name: 'SettleAccount',//命名路由
meta: {
title: '大众看板出库单',
roles: ['SettleAccount.SettleAccounts'],//控制页面角色(可以设置多个角色)
icon: '结算'
}
},
// {
// path: 'invoice',
// component: () => import('@/views/ux/basedata/Invoice/index'),
// name: 'Invoices',//命名路由
// meta: {
// title: '大众发票汇总导入',
// roles: ['SettleAccount.Invoices'],
// icon: '对比'
// }
// },
]
}
export default vwOutOrderDataRouter

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

@ -857,7 +857,7 @@ export default {
},
getList(data) {
this.listLoading = true;
if (data != undefined) {alert()
if (data != undefined) {
this.listQuery.SkipCount = (this.page - 1) * data.limit;
} else {
this.listQuery.SkipCount = (this.page - 1) * 15;

7
vue/src/views/ux/basedata/index.vue

@ -0,0 +1,7 @@
<!-- 父级路由组件 -->
<template>
<div>
<!-- xxx html 内容 -->
<router-view />
</div>
</template>

2
vue/src/views/ux/billManage/FisUnSettledDiff/index.vue

@ -512,7 +512,7 @@ export default {
tempsTabs.push({
label: "单据流水号",
prop: "taskId",
width: 80,
width: 130,
});
tempsTabs.push({
label: "当前版本",

205
vue/src/views/ux/billManage/InvoiceSettledDetailDiff/index.vue

@ -17,7 +17,7 @@
type="primary"
icon="el-icon-plus"
@click="handleCreate"
>统计
>统计明细
</el-button>
<el-button
class="filter-item"
@ -35,6 +35,14 @@
@click="handleCreateBills()"
>生成出库单(支持批量)</el-button
>
<el-button
class="filter-item"
type="success"
icon="el-icon-check"
size="mini"
@click="handleConfirm()"
>已确认</el-button
>
</flexbox>
</div>
<!-- 刷新 -->
@ -55,7 +63,7 @@
</el-tooltip>
<span style="margin-left: 10px; color: #ff5640; float: right"
>说明每间隔15秒进行自动刷新</span
>说明每间隔30秒进行自动刷新</span
>
</flexbox>
</div>
@ -75,6 +83,7 @@
border
highlight-current-row
style="width: 100%"
@sort-change="sortChange"
@row-click="handleRowClick"
@selection-change="handleSelectionChange"
@filter-change="filterChange"
@ -396,21 +405,46 @@
<el-select
v-model="formCount.materialGroupValue"
size="medium"
collapse-tags
multiple
filterable
clearable
style="width: 380px; margin-right: 15px"
@change="valueChange"
style="width: 350px; margin-right: 15px"
placeholder="请选择"
>
<el-option
v-for="item in materialGroupList"
:key="item.value"
:label="item.label"
:label="item.value"
:value="item.value"
></el-option>
>
<span style="float: left">{{ item.label }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{
item.value
}}</span>
</el-option>
</el-select>
<!-- <el-select
v-model="formCount.materialGroupValue"
class="my-el-select"
style="width: 350px; margin-right: 15px"
size="medium"
multiple
clearable
placeholder="请选择"
>
<el-option
v-for="item in materialGroupList"
:key="item.label"
:label="item.value"
:value="item.label"
>
<span style="float: left">{{ item.label }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{
item.value
}}</span>
</el-option>
</el-select> -->
</el-form-item>
</el-col>
</el-row>
@ -524,28 +558,25 @@
<el-col :md="4" :xs="24">
<el-form-item label="KEEN号" />
</el-col>
<el-col :md="20" :xs="24" style="margin-left: -80px">
<el-col :md="10" :xs="24" style="margin-left: -80px">
<el-form-item prop="kennCode">
<el-input
type="textarea"
v-model="formCount.kennCode"
style="width: 450px"
style="width: 170px"
:rows="4"
placeholder="多个KENN号,请以回车换行形式添加!"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :md="4" :xs="24">
<el-form-item label="底盘号" />
</el-col>
<el-col :md="20" :xs="24" style="margin-left: -80px">
<el-col :md="10" :xs="24" style="margin-left: -95px">
<el-form-item prop="chassisNumber">
<el-input
v-model="formCount.chassisNumber"
style="width: 450px"
style="width: 170px"
type="textarea"
:rows="4"
placeholder="多个底盘号,请以回车换行形式添加!"
@ -558,27 +589,25 @@
<el-col :md="4" :xs="24">
<el-form-item label="客户零件号" />
</el-col>
<el-col :md="20" :xs="24" style="margin-left: -80px">
<el-col :md="10" :xs="24" style="margin-left: -80px">
<el-form-item prop="materialCode">
<el-input
v-model="formCount.materialCode"
style="width: 450px"
style="width: 170px"
type="textarea"
:rows="4"
placeholder="多个客户零件号,请以回车换行形式添加!"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :md="4" :xs="24">
<el-form-item label="厂内零件号" />
</el-col>
<el-col :md="20" :xs="24" style="margin-left: -80px">
<el-col :md="10" :xs="24" style="margin-left: -95px">
<el-form-item prop="sapCode">
<el-input
v-model="formCount.sapCode"
style="width: 450px"
style="width: 170px"
type="textarea"
:rows="4"
placeholder="多个厂内零件号,请以回车换行形式添加!"
@ -800,6 +829,10 @@ export default {
name: "",
type: "",
},
listBillQuery: {
version: "",
guids: [],
},
page: 1,
JobversionValue: "",
JobversionValueVerson: "",
@ -829,7 +862,7 @@ export default {
this.listQuery.taskId = "";
this.listQuery.stateName = "";
setTimeout(this.getList, 0);
}, 1000 * 15); //15
}, 1000 * 30); //30
// $oncebeforeDestroy
this.$once("hook:beforeDestroy", () => {
clearInterval(timer);
@ -860,7 +893,7 @@ export default {
tempsTabs.push({
label: "单据流水号",
prop: "taskId",
width: 85,
width: 120,
});
tempsTabs.push({
label: "模块名称",
@ -882,20 +915,46 @@ export default {
prop: "remark",
width: 220,
});
// tempsTabs.push({
// label: "",
// prop: "stateName",
// width: 100,
// });
tempsTabs.push({
label: "审批状态",
prop: "fileName",
width: 150,
});
return tempsTabs;
},
},
methods: {
sortChange(data) {
const { prop, order } = data;
if (!prop || !order) {
this.handleFilter();
return;
}
this.listQuery.Sorting = prop + " " + order;
console.log(this.listQuery.Sorting);
this.handleFilter();
},
/** 筛选操作 */
handleFilter() {
this.page = 1;
this.getList();
this.listQuery.Filters = [];
if (this.searchContent != "") {
var column = "taskId";
let filter = {
logic: 0,
column: column,
action: 0,
value: this.searchContent,
};
this.listQuery.Filters.push(filter);
}
this.getList();
},
handleSelectionChange(val) {
this.multipleSelection = val;
},
//
handleCreateBills(row){
handleConfirm(row) {
if (this.multipleSelection.length == 0) {
this.$message({
message: "至少选择一行!",
@ -917,6 +976,58 @@ export default {
});
myalert = "选中项";
}
this.$confirm("是否确认" + myalert + "?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.$axios
.posts("/api/settleaccount/wmsjitoutput/WmsJitOutPutAudit", params)
.then((response) => {
const index = this.list.indexOf(row);
this.$notify({
title: "成功",
message: "操作成功",
type: "success",
duration: 2000,
});
this.getList();
});
})
.catch(() => {
this.$message({
type: "info",
message: "已取消操作",
});
});
},
//
handleCreateBills(row) {
// if (this.multipleSelection.length == 0) {
// this.$message({
// message: "",
// type: "warning",
// });
// return;
// }
var params = [];
let myalert = ""; //使
if (row) {
//
params.push(row.id);
myalert = row.name;
} else {
//
this.multipleSelection.forEach((element) => {
let id = element.id;
params.push(id);
});
myalert = "选中项";
}
this.listBillQuery.guids = params;
this.listBillQuery.version = this.JobversionValue;
console.log("出库单条件:" + JSON.stringify(this.listBillQuery));
this.$confirm("是否确认出库" + myalert + "?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
@ -924,8 +1035,14 @@ export default {
})
.then(() => {
this.$axios
.posts("/api/settleaccount/wms/WmsJitOutPut", params)
.posts(
"/api/settleaccount/wmsjitoutput/WmsJitOutPut",
this.listBillQuery
)
.then((response) => {
console.log(
"检查柱护板-hostCheckQuery" + JSON.stringify(response)
);
const index = this.list.indexOf(row);
this.$notify({
title: "成功",
@ -933,6 +1050,7 @@ export default {
type: "success",
duration: 2000,
});
this.getList();
});
})
@ -1134,19 +1252,41 @@ export default {
});
},
//
// getMaterialGroup() {
// this.$axios
// .posts("/api/settleaccount/CodeSetting/list", {
// project: "",
// maxResultCount: 1000,
// skipCount: 0,
// })
// .then((response) => {
// this.materialGroupList = [];
// response.items.forEach((element) => {
// let options = {};
// options.value = element.description;
// options.label = element.value;
// this.materialGroupList.push(options);
// });
// })
// .catch(() => {
// this.listLoading = false;
// });
// },
//
getMaterialGroup() {
this.$axios
.posts("/api/settleaccount/CodeSetting/list", {
project: "物料组",
maxResultCount: 1000,
skipCount: 0,
sorting:"value ascending"
})
.then((response) => {
this.materialGroupList = [];
response.items.forEach((element) => {
let options = {};
options.value = element.description;
options.label = element.description + "/" + element.value;
options.label = element.value;
this.materialGroupList.push(options);
});
})
@ -1363,7 +1503,7 @@ export default {
getList() {
this.listLoading = true;
//
this.listQuery.name = "大众发票与结算核对明细表";
this.listQuery.name = "准时化结算核对明细";
this.listQuery.type = this.JobversionValue;
this.$axios
.posts("/api/settleaccount/Job/list", this.listQuery)
@ -1416,7 +1556,6 @@ export default {
};
</script>
<style lang="scss" scoped>
@import "../../styles/crmtable.scss";
@import "../../styles/steps.scss";
@ -1427,4 +1566,4 @@ export default {
border: 0px;
box-shadow: none !important;
}
</style>
</style>

5
vue/src/views/ux/billManage/InvoiceSettledDiff/index.vue

@ -379,7 +379,6 @@
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :md="4" :xs="24">
<el-form-item label="客户零件号" />
@ -627,7 +626,7 @@ export default {
tempsTabs.push({
label: "单据流水号",
prop: "taskId",
width: 85,
width: 130,
});
tempsTabs.push({
label: "模块名称",
@ -990,7 +989,7 @@ export default {
getList() {
this.listLoading = true;
//
this.listQuery.name = "大众发票与结算核对汇总";
this.listQuery.name = "发票与结算核对汇总";
this.listQuery.type = this.JobversionValue;
this.$axios
.posts("/api/settleaccount/Job/list", this.listQuery)

2
vue/src/views/ux/billManage/IssuedUnsettled/index.vue

@ -730,7 +730,7 @@ export default {
tempsTabs.push({
label: "单据流水号",
prop: "taskId",
width: 85,
width: 130,
});
tempsTabs.push({
label: "模块名称",

2
vue/src/views/ux/billManage/SettleDoorPanel/index.vue

@ -772,7 +772,7 @@ export default {
tempsTabs.push({
label: "单据流水号",
prop: "taskId",
width: 85,
width: 130,
});
tempsTabs.push({
label: "模块名称",

19
vue/src/views/ux/billManage/UnInvoiceSettledDetailDiff/index.vue

@ -388,20 +388,24 @@
<el-select
v-model="formCount.materialGroupValue"
size="medium"
collapse-tags
multiple
filterable
clearable
style="width: 380px; margin-right: 15px"
@change="valueChange"
style="width: 350px; margin-right: 15px"
placeholder="请选择"
>
<el-option
v-for="item in materialGroupList"
:key="item.value"
:label="item.label"
:label="item.value"
:value="item.value"
></el-option>
>
<span style="float: left">{{ item.label }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{
item.value
}}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
@ -773,7 +777,7 @@ export default {
tempsTabs.push({
label: "单据流水号",
prop: "taskId",
width: 85,
width: 130,
});
tempsTabs.push({
label: "模块名称",
@ -953,13 +957,14 @@ export default {
project: "物料组",
maxResultCount: 1000,
skipCount: 0,
sorting: "value ascending",
})
.then((response) => {
this.materialGroupList = [];
response.items.forEach((element) => {
let options = {};
options.value = element.description;
options.label = element.description + "/" + element.value;
options.label = element.value;
this.materialGroupList.push(options);
});
})
@ -1176,7 +1181,7 @@ export default {
getList() {
this.listLoading = true;
//
this.listQuery.name = "大众准时化结算数量差异比对表";
this.listQuery.name = "准时化量差输出";
this.listQuery.type = this.JobversionValue;
this.$axios
.posts("/api/settleaccount/Job/list", this.listQuery)

19
vue/src/views/ux/billManage/UnSettleDiffExport/index.vue

@ -390,19 +390,23 @@
v-model="formCount.materialGroupValue"
size="medium"
multiple
collapse-tags
filterable
clearable
style="width: 380px; margin-right: 15px"
@change="valueChange"
style="width: 350px; margin-right: 15px"
placeholder="请选择"
>
<el-option
v-for="item in materialGroupList"
:key="item.value"
:label="item.label"
:label="item.value"
:value="item.value"
></el-option>
>
<span style="float: left">{{ item.label }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{
item.value
}}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
@ -730,7 +734,7 @@ export default {
tempsTabs.push({
label: "单据流水号",
prop: "taskId",
width: 85,
width: 130,
});
tempsTabs.push({
label: "模块名称",
@ -905,13 +909,14 @@ export default {
project: "物料组",
maxResultCount: 1000,
skipCount: 0,
sorting: "value ascending",
})
.then((response) => {
this.materialGroupList = [];
response.items.forEach((element) => {
let options = {};
options.value = element.description;
options.label = element.description + "/" + element.value;
options.label = element.value;
this.materialGroupList.push(options);
});
})
@ -1120,7 +1125,7 @@ export default {
getList() {
this.listLoading = true;
//
this.listQuery.name = "大众准时化未结差异比对表";
this.listQuery.name = "准时化未结差异比对输出";
this.listQuery.type = this.JobversionValue;
this.$axios
.posts("/api/settleaccount/Job/list", this.listQuery)

2
vue/src/views/ux/billManage/UnSettledDiff/index.vue

@ -728,7 +728,7 @@ export default {
tempsTabs.push({
label: "单据流水号",
prop: "taskId",
width: 85,
width: 130,
});
tempsTabs.push({
label: "模块名称",

7
vue/src/views/ux/billManage/index.vue

@ -0,0 +1,7 @@
<!-- 父级路由组件 -->
<template>
<div>
<!-- xxx html 内容 -->
<router-view />
</div>
</template>

100
vue/src/views/ux/billManage/kanBanWithCode/index.vue

@ -35,6 +35,14 @@
@click="handleCreateBills()"
>生成出库单(支持批量)</el-button
>
<el-button
class="filter-item"
type="success"
icon="el-icon-check"
size="mini"
@click="handleConfirm()"
>已确认</el-button
>
</flexbox>
</div>
<!-- 刷新 -->
@ -396,20 +404,24 @@
<el-select
v-model="formCount.materialGroupValue"
size="medium"
collapse-tags
multiple
filterable
clearable
style="width: 380px; margin-right: 15px"
@change="valueChange"
style="width: 350px; margin-right: 15px"
placeholder="请选择"
>
<el-option
v-for="item in materialGroupList"
:key="item.value"
:label="item.label"
:label="item.value"
:value="item.value"
></el-option>
>
<span style="float: left">{{ item.label }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{
item.value
}}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
@ -455,25 +467,23 @@
<el-form-item>
<el-input
type="textarea"
style="width: 450px"
style="width: 170px"
v-model="formCount.kanBan"
:rows="5"
placeholder="多个看板号,请以回车换行形式添加!"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :md="4" :xs="24">
<el-form-item label="客户零件号" />
</el-col>
<el-col :md="20" :xs="24" style="margin-left: -80px">
<el-col :md="10" :xs="24" style="margin-left: -95px">
<el-form-item prop="materialCode">
<el-input
type="textarea"
v-model="formCount.materialCode"
:rows="5"
style="width: 450px"
style="width: 170px"
placeholder="多个客户零件号,请以回车换行形式添加!"
/>
</el-form-item>
@ -728,7 +738,7 @@ export default {
tempsTabs.push({
label: "单据流水号",
prop: "taskId",
width: 85,
width: 120,
});
tempsTabs.push({
label: "模块名称",
@ -745,21 +755,16 @@ export default {
prop: "createdAt",
width: 150,
});
tempsTabs.push({
tempsTabs.push({
label: "说明",
prop: "remark",
width: 220,
});
// tempsTabs.push({
// label: "",
// prop: "actionName",
// width: 120,
// });
// tempsTabs.push({
// label: "",
// prop: "stateName",
// width: 100,
// });
tempsTabs.push({
label: "审批状态",
prop: "fileName",
width: 150,
});
return tempsTabs;
},
},
@ -816,6 +821,54 @@ export default {
});
});
},
handleConfirm(row) {
if (this.multipleSelection.length == 0) {
this.$message({
message: "至少选择一行!",
type: "warning",
});
return;
}
var params = [];
let myalert = ""; //使
if (row) {
//
params.push(row.id);
myalert = row.name;
} else {
//
this.multipleSelection.forEach((element) => {
let id = element.id;
params.push(id);
});
myalert = "选中项";
}
this.$confirm("是否确认" + myalert + "?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.$axios
.posts("/api/settleaccount/wms/WmsJitOutPut", params)
.then((response) => {
const index = this.list.indexOf(row);
this.$notify({
title: "成功",
message: "生成成功",
type: "success",
duration: 2000,
});
this.getList();
});
})
.catch(() => {
this.$message({
type: "info",
message: "已取消操作",
});
});
},
//
handleCreateBills(row) {
if (this.multipleSelection.length == 0) {
@ -957,13 +1010,14 @@ export default {
project: "物料组",
maxResultCount: 1000,
skipCount: 0,
sorting: "value ascending",
})
.then((response) => {
this.materialGroupList = [];
response.items.forEach((element) => {
let options = {};
options.value = element.description;
options.label = element.description + "/" + element.value;
options.label = element.value;
this.materialGroupList.push(options);
});
})
@ -1152,7 +1206,7 @@ export default {
getList() {
this.listLoading = true;
//
this.listQuery.name = "大众看板结算与交货核对明细表";
this.listQuery.name = "看板结算数量差异输出";
this.$axios
.posts("/api/settleaccount/Job/list", this.listQuery)
.then((response) => {

541
vue/src/views/ux/billManage/kanbanOutOrder/detail.vue

@ -0,0 +1,541 @@
<!--FIS发运数据对比输出表-明细数据-->
<template>
<div class="cr-body-content">
<flexbox class="content-header">
<!-- <el-button
class="filter-item"
size="mini"
type="info"
icon="el-icon-download"
@click="handleDownload()"
>导出全部
</el-button> -->
<el-button
class="filter-item"
type="success"
icon="el-icon-check"
size="mini"
@click="handleCreateBills()"
>确认出库单(支持批量)</el-button
>
<el-button
class="filter-item"
size="mini"
type="info"
icon="el-icon-download"
@click="handleCancelBills()"
>取消出库(支持批量)
</el-button>
<el-input
v-model="searchContent"
clearable
size="small"
placeholder="按照零件号搜索..."
style="width: 230px"
class="search-container"
@keyup.enter.native="handleFilter"
/>
<el-button
size="mini"
type="success"
icon="el-icon-search"
@click="handleFilter"
>搜索
</el-button>
<!--表格头组件filter查询-->
<c-r-m-table-head
ref="crmTableHead"
:crm-type="crmType"
@handle="handleHandle"
@filter="handleFilters"
>
</c-r-m-table-head>
</flexbox>
<!--表格渲染-->
<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
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";
export default {
name: "sendUnsettledDiffReport",
components: { Pagination, CRMTableHead, CRMTableHead },
directives: { permission },
props: {
customerInfos: {
type: Array,
default: () => {
return [];
},
},
},
data() {
return {
crmType: "vwOutOrder",
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: "",
action: 0,
value: "",
}, //
],
//OrgID:"",
SkipCount: 0,
MaxResultCount: 15,
ParentId: "",
},
listOutPutQuery: {
version: "",
ids: "",
},
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: "version",
width: 150,
});
tempsTabs.push({
label: "零件号",
prop: "materialCode",
width: 150,
});
tempsTabs.push({ label: "零件描述", prop: "materialDesc", width: 250 });
tempsTabs.push({ label: "物料组", prop: "materialGroup", width: 220 });
tempsTabs.push({ label: "数量", prop: "wmsBillNum", width: 100 });
return tempsTabs;
},
},
methods: {
//
handleCancelBills(row) {
if (this.multipleSelection.length == 0) {
this.$message({
message: "至少选择一行!",
type: "warning",
});
return;
}
//var params = [];
var params = "";
let myalert = ""; //使
if (row) {
//
params.push(row.id);
myalert = row.name;
} else {
//
this.multipleSelection.forEach((element) => {
let id = element.id;
//params.push(id);
params += id + ",";
});
myalert = "选中项";
}
this.listOutPutQuery.version = row.version;
this.listOutPutQuery.ids = params.substr(0, params.length - 1);
this.$confirm("是否确认取消出库" + myalert + "?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.$axios
.posts(
"/api/settleaccount/wmsjitoutput/WmsJitOutPut-Cancel",
this.listOutPutQuery
)
.then((response) => {
const index = this.list.indexOf(row);
this.$notify({
title: "成功",
message: "操作成功",
type: "success",
duration: 2000,
});
this.getList();
});
})
.catch(() => {
this.$message({
type: "info",
message: "已取消操作",
});
});
},
//
handleCreateBills(row) {
if (this.multipleSelection.length == 0) {
this.$message({
message: "至少选择一行!",
type: "warning",
});
return;
}
//var params = [];
var params = "";
let myalert = ""; //使
if (row) {
//
params.push(row.id);
myalert = row.name;
} else {
//
this.multipleSelection.forEach((element) => {
let id = element.id;
//params.push(id);
params += id + ",";
});
myalert = "选中项";
}
this.listOutPutQuery.version = row.version;
this.listOutPutQuery.ids = params.substr(0, params.length - 1);
this.$confirm("是否确认出库" + myalert + "?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.$axios
.posts(
"/api/settleaccount/wmsjitoutput/WmsJitOutPut-Pass",
this.listOutPutQuery
)
.then((response) => {
const index = this.list.indexOf(row);
this.$notify({
title: "成功",
message: "生成成功",
type: "success",
duration: 2000,
});
this.getList();
});
})
.catch(() => {
this.$message({
type: "info",
message: "已取消操作",
});
});
},
/** 刷新列表 */
handleHandle(data) {
if (data.type !== "edit") {
this.getList();
}
},
/** 格式化字段 */
fieldFormatter(row, column) {
return row[column.property] || "--";
},
importExcelData() {
//
this.showExcelImport = false;
this.getList();
},
async handleDownload() {
//await this.getDownBoms();
this.listLoading = true;
this.$axios
.gets(
"/api/settleaccount/bt-kb-not-consign/export/" +
this.customerInfo.parentId
)
.then((res) => {
let fileNameOfProject = res;
this.$axios
.BolbGets(
"/api/settleaccount/getblobfile/download/" + fileNameOfProject
)
.then((response) => {
if (fileNameOfProject.indexOf("_") != -1) {
let downName =
fileNameOfProject.slice(
0,
fileNameOfProject.lastIndexOf("_")
) +
fileNameOfProject.slice(fileNameOfProject.lastIndexOf("."));
downloadFile(response, downName);
this.$notify({
title: "成功",
message: "数据-导出成功!",
type: "success",
duration: 2000,
});
} else {
downloadFile(response, fileNameOfProject);
this.$notify({
title: "成功",
message: "数据-导出成功!",
type: "success",
duration: 2000,
});
}
this.listLoading = false;
});
});
},
getList(data) {
this.listLoading = true;
if (data != undefined) {
this.listQuery.SkipCount = (this.page - 1) * data.limit;
} else {
this.listQuery.SkipCount = (this.page - 1) * 15;
}
let filter = {
logic: 0,
column: "wmsBillNum",
action: 6,
value: this.customerInfo.parentId,
};
this.listQuery.Filters.push(filter);
//this.listQuery.ParentId = this.customerInfo.parentId;
console.log("查询条件:" + JSON.stringify(this.listQuery));
this.$axios
.posts(
"/api/settleaccount/wmsjitoutput/WmsJitDetailList",
this.listQuery
)
.then((response) => {
this.list = response.items;
//alert(JSON.stringify(response.Items))
this.totalCount = response.totalCount;
setTimeout(() => {
//
this.listLoading = false;
}, 500);
})
.catch(() => {
this.listLoading = false;
});
},
/** 筛选操作 */
handleFilter() {
this.page = 1;
this.getList();
this.listQuery.Filters = [];
if (this.searchContent != "") {
var column = "materialCode";
let filter = {
logic: 0,
column: column,
action: 6,
value: this.searchContent,
};
this.listQuery.Filters.push(filter);
}
this.getList();
},
/** 多项筛选操作 */
/** 筛选操作 */
handleFilters(data) {
if (data === null) {
this.listQuery.Filters = [];
this.getList(); //
} else {
this.filterObj = data;
console.log("筛选" + JSON.stringify(data));
var offsetHei = document.documentElement.clientHeight;
var removeHeight = Object.keys(this.filterObj).length > 0 ? 310 : 240;
this.tableHeight = offsetHei - removeHeight;
this.currentPage = 1;
let Filter = [];
data.forEach((item) => {
let filter = {};
if (item.formType === "datetime" || item.formType === "datetime") {
// (datetime >= a and datetime <=b)
filter["Column"] = item.fieldName;
filter["Logic"] = 0;
filter["Value"] = item.value[0];
filter["Action"] = item.action;
Filter.push(filter);
if (item.value[1] != null) {
filter["Value"] = item.value[1];
filter["Action"] = 5;
Filter.push(filter);
}
} else {
filter["Column"] = item.fieldName;
filter["Value"] = item.value;
filter["Logic"] = 0;
filter["Action"] = item.action;
Filter.push(filter);
}
});
console.log("筛选条件" + JSON.stringify(Filter));
this.listQuery.Filters = 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 "../../styles/crmtable.scss";
</style>

317
vue/src/views/ux/billManage/kanbanOutOrder/index.vue

@ -0,0 +1,317 @@
<!--轿车看板-发出未结算-->
<template>
<div class="cr-body-content">
<flexbox class="content-header">
<el-input
v-model="searchContent"
clearable
size="small"
placeholder="按照版本号搜索..."
style="width: 200px"
class="search-container"
@keyup.enter.native="handleFilter"
/>
<el-button
size="mini"
type="success"
icon="el-icon-search"
@click="handleFilter"
>搜索
</el-button>
</flexbox>
<!--表格渲染-->
<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"
size="small"
stripe
border
highlight-current-row
style="width: 100%"
@sort-change="sortChange"
@selection-change="handleSelectionChange"
@row-click="handleRowClick"
>
<el-table-column
label="单据号"
prop="billNum"
sortable="custom"
align="center"
width="250px"
>
<template slot-scope="scope">
<el-tooltip :content="scope.row.billNum" placement="bottom-end">
<span class="link-type" @click="handleDrawerOpen(scope.row)">{{
scope.row.billNum
}}</span>
</el-tooltip>
</template>
</el-table-column>
<!-- <el-table-column type="selection" width="44px"></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"
/>
<!-- 抽屉控件 -->
<el-drawer
title="信息详细页"
size="75%"
direction="rtl"
:visible.sync="drawer"
: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"; // secondary package based on el-pagination
import permission from "@/directive/permission/index.js";
import Detail from "./detail";
import moment from "moment";
import { formatTimeToTimestamp } from "@/utils/index";
export default {
name: "sendUnsettledDiffReport",
components: { Pagination, Detail },
directives: { permission },
data() {
return {
crmType: "sendUnsettledDiffReport",
rules: {
// version: [{ required: true, message: "", trigger: "change" }],
// beginTime: [{ required: true, message: "", trigger: "change" }],
// endTime: [{ required: true, message: "", trigger: "change" }],
},
customerInfos: [],
searchContent: "", //
drawer: false,
form: {
version: "",
customerCode: "",
customerName: "",
beginTime: "",
endTime: "",
},
versionValue: "",
versionList: [],
startTimeVale: "",
endTimeVale: "",
list: null,
totalCount: 0,
listLoading: true,
formLoading: false,
//
filterObj: {
type: Object,
default: () => {
return {};
},
},
listQuery: {
Filters: [
{
logic: 0,
column: "Enabled",
action: 0,
value: "true",
}, //
],
//OrgID:"",
SkipCount: 0,
MaxResultCount: 15,
},
page: 1,
dialogFormVisible: false,
multipleSelection: [],
formTitle: "",
drawer: false,
showExcelImport: false,
tableHeight: document.documentElement.clientHeight - 200,
isEdit: false,
};
},
mounted() {
var self = this;
window.onresize = function () {
var offsetHei = document.documentElement.clientHeight;
self.tableHeight = offsetHei - 200;
};
},
created() {
this.getList();
//this.getVersionInfo();
},
computed: {
/** 列表字段 */
getDefaultField() {
var tempsTabs = [];
tempsTabs.push({
label: "版本",
prop: "version",
width: 120,
});
//tempsTabs.push({ label: "", prop: "billNum", width: 150 });
tempsTabs.push({ label: "创建人", prop: "creator", width: 160 });
tempsTabs.push({ label: "创建时间", prop: "creationTime", width: 160 });
tempsTabs.push({ label: "备注", prop: "remark", width: 120 });
return tempsTabs;
},
},
methods: {
getVersionInfo() {
//
this.listLoading = true;
this.listQuery.SkipCount = (this.page - 1) * 1000;
this.$axios
.posts("/api/settleaccount/CentralizedControl/openlist")
.then((response) => {
this.versionList = [];
response.forEach((element) => {
let options = {};
options.value = element.version;
options.label = element.version;
this.versionList.push(options);
});
})
.catch(() => {
this.listLoading = false;
});
},
//
handleDrawerOpen(param) {
this.drawer = true;
var parentId = param.billNum; //
this.customerInfos = [
{
ParentId: parentId,
},
];
},
handleDrawerClose(done) {
done();
},
/** 格式化字段 */
fieldFormatter(row, column) {
if (column.property == "creationTime") {
var date = row[column.property];
if (date == undefined) {
return "";
}
return moment(date).format("YYYY-MM-DD HH:mm:ss");
}
if (column.property == "documentStatus") {
return { 0: "新建", 1: "进行中", 5: "完成", 9: "取消" }[
row[column.property]
];
}
return row[column.property] || "--";
},
importExcelData() {
//
this.showExcelImport = false;
this.getList();
},
getList(data) {
this.listLoading = true;
if (data != undefined) {
this.listQuery.SkipCount = (this.page - 1) * data.limit;
} else {
this.listQuery.SkipCount = (this.page - 1) * 15;
}
this.$axios
.posts("/api/settleaccount/wmsjitoutput/WmsJitList", this.listQuery)
.then((response) => {
this.list = response.items;
//alert(JSON.stringify(response.Items))
this.totalCount = response.totalCount;
setTimeout(() => {
//
this.listLoading = false;
}, 500);
})
.catch(() => {
this.listLoading = false;
});
},
/** 筛选操作 */
handleFilter() {
this.page = 1;
this.getList();
this.listQuery.Filters = [];
if (this.searchContent != "") {
var column = "version";
let filter = {
logic: 0,
column: column,
action: 0,
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" };
},
handleRowClick(row, column, event) {
this.$refs.multipleTable.clearSelection();
this.$refs.multipleTable.toggleRowSelection(row);
},
},
};
</script>
<style lang="scss" scoped>
@import "../../styles/crmtable.scss";
</style>

254
vue/src/views/ux/billManage/sparePart/index.vue

@ -35,6 +35,14 @@
@click="handleCreateBills()"
>生成出库单(支持批量)</el-button
>
<el-button
class="filter-item"
type="success"
icon="el-icon-check"
size="mini"
@click="handleConfirm()"
>已确认</el-button
>
</flexbox>
</div>
<!-- 刷新 -->
@ -396,17 +404,24 @@
<el-select
v-model="formCount.materialGroupValue"
size="medium"
multiple
filterable
clearable
style="width: 188px; margin-right: 15px"
style="width: 380px; margin-right: 15px"
@change="valueChange"
placeholder="请选择"
>
<el-option
v-for="item in materialGroupList"
:key="item.value"
:label="item.label"
:label="item.value"
:value="item.value"
></el-option>
>
<span style="float: left">{{ item.label }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{
item.value
}}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
@ -416,17 +431,30 @@
<el-col :md="4" :xs="24">
<el-form-item label="CP5时间:" />
</el-col>
<el-col :md="20" :xs="24" style="margin-left: -80px">
<el-col :md="10" :xs="24" style="margin-left: -80px">
<el-form-item>
<el-date-picker
v-model="datetime5"
type="datetimerange"
:picker-options="pickerOptionsCp5"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
v-model="cp5startTime"
:picker-options="pickerOptions2"
type="datetime"
size="small"
@change="getdateValueCp5"
value-format="yyyy-MM-dd HH:mm:ss"
:default-time="['00:00:00', '23:59:59']"
default-time="00:00:00"
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :md="10" :xs="24" style="margin-left: -40px">
<el-form-item>
<el-date-picker
v-model="cp5endTime"
:picker-options="pickerOptions3"
type="datetime"
size="small"
@change="getdateValCp5"
value-format="yyyy-MM-dd HH:mm:ss"
default-time="23:59:59"
>
</el-date-picker>
</el-form-item>
@ -471,37 +499,60 @@
<el-form-item label="KEEN号" />
</el-col>
<el-col :md="10" :xs="24" style="margin-left: -80px">
<el-form-item>
<el-input v-model="formCount.kennCode" />
<el-form-item prop="kennCode">
<el-input
type="textarea"
v-model="formCount.kennCode"
style="width: 170px"
:rows="4"
placeholder="多个KENN号,请以回车换行形式添加!"
/>
</el-form-item>
</el-col>
<el-col :md="4" :xs="24">
<el-form-item label="底盘号" />
</el-col>
<el-col :md="10" :xs="24" style="margin-left: -95px">
<el-form-item>
<el-input v-model="formCount.chassisNumber" />
<el-form-item prop="chassisNumber">
<el-input
v-model="formCount.chassisNumber"
style="width: 170px"
type="textarea"
:rows="4"
placeholder="多个底盘号,请以回车换行形式添加!"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :md="4" :xs="24">
<el-form-item label="客户零件号" />
</el-col>
<el-col :md="10" :xs="24" style="margin-left: -80px">
<el-form-item>
<el-input v-model="formCount.materialCode" />
<el-form-item prop="materialCode">
<el-input
v-model="formCount.materialCode"
style="width: 170px"
type="textarea"
:rows="4"
placeholder="多个客户零件号,请以回车换行形式添加!"
/>
</el-form-item>
</el-col>
<!-- <el-col :md="4" :xs="24">
<el-form-item label="客户零件号" />
<el-col :md="4" :xs="24">
<el-form-item label="厂内零件号" />
</el-col>
<el-col :md="10" :xs="24" style="margin-left: -95px">
<el-form-item>
<el-input v-model="formCount.sapMaterialCode" />
<el-form-item prop="sapCode">
<el-input
v-model="formCount.sapCode"
style="width: 170px"
type="textarea"
:rows="4"
placeholder="多个厂内零件号,请以回车换行形式添加!"
/>
</el-form-item>
</el-col> -->
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
@ -565,6 +616,25 @@ export default {
return time.getTime() <= new Date(this.startTime).getTime();
},
},
pickerOptions1: {
disabledDate: (time) => {
//return time.getTime() <= new Date(this.startTime).getTime() || time.getTime() > Date.now();
return time.getTime() <= new Date(this.startTime).getTime();
},
},
pickerOptions2: {
disabledDate: (time) => {
//if (this.endTime != "") {
return time.getTime() > new Date(this.cp5endTime).getTime();
//}
},
},
pickerOptions3: {
disabledDate: (time) => {
return time.getTime() <= new Date(this.cp5startTime).getTime();
},
},
startTime: "",
endTime: "",
pickerOptionsCp7: {
@ -589,6 +659,7 @@ export default {
radio: "0", //0 1
versionList: [],
materialGroupList: [],
getmaterialGroupValue: "",
//
openView: false,
versionValue: "",
@ -618,16 +689,20 @@ export default {
searchContent: "", //
form: {},
formCount: {
name: "未结算对比",
// datetime5: [],
// datetime7: [],
settledate: "",
materialCode: "",
sapMaterialCode: "",
chassisNumber: "",
kennCode: "",
version: "",
startTime: "",
endTime: "",
cp5startTime: "",
cp5endTime: "",
// name: "",
// settledate: "",
// materialCode: "",
// sapMaterialCode: "",
// chassisNumber: "",
// kennCode: "",
// version: "",
},
cp5startTime: "",
cp5endTime: "",
list: null,
totalCount: 0,
listLoading: true,
@ -707,12 +782,12 @@ export default {
tempsTabs.push({
label: "版本号",
prop: "type",
width: 85,
width: 120,
});
tempsTabs.push({
label: "单据流水号",
prop: "taskId",
width: 85,
width: 130,
});
tempsTabs.push({
label: "模块名称",
@ -734,20 +809,24 @@ export default {
prop: "remark",
width: 220,
});
// tempsTabs.push({
// label: "",
// prop: "actionName",
// width: 120,
// });
// tempsTabs.push({
// label: "",
// prop: "stateName",
// width: 100,
// });
tempsTabs.push({
label: "审批状态",
prop: "fileName",
width: 150,
});
return tempsTabs;
},
},
methods: {
//cp5
getdateValueCp5(val) {
this.cp5startTime = val;
this.getbalanceIndexData();
},
getdateValCp5(val) {
this.cp5endTime = val;
this.getbalanceIndexData();
},
handleSelectionChange(val) {
this.multipleSelection = val;
},
@ -800,6 +879,54 @@ export default {
});
});
},
handleConfirm(row) {
if (this.multipleSelection.length == 0) {
this.$message({
message: "至少选择一行!",
type: "warning",
});
return;
}
var params = [];
let myalert = ""; //使
if (row) {
//
params.push(row.id);
myalert = row.name;
} else {
//
this.multipleSelection.forEach((element) => {
let id = element.id;
params.push(id);
});
myalert = "选中项";
}
this.$confirm("是否确认" + myalert + "?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.$axios
.posts("/api/settleaccounWmsJitOutPutt/wms/", params)
.then((response) => {
const index = this.list.indexOf(row);
this.$notify({
title: "成功",
message: "生成成功",
type: "success",
duration: 2000,
});
this.getList();
});
})
.catch(() => {
this.$message({
type: "info",
message: "已取消操作",
});
});
},
//
handleCreateBills(row) {
if (this.multipleSelection.length == 0) {
@ -934,20 +1061,20 @@ export default {
this.listLoading = false;
});
},
//
getMaterialGroup() {
this.$axios
.posts("/api/settleaccount/CodeSetting/list", {
project: "物料组",
maxResultCount: 1000,
skipCount: 0,
sorting: "value ascending",
})
.then((response) => {
this.materialGroupList = [];
response.items.forEach((element) => {
let options = {};
options.value = element.description;
options.label = element.description;
options.label = element.value;
this.materialGroupList.push(options);
});
})
@ -961,7 +1088,8 @@ export default {
this.datetime5 = [];
this.startTime = "";
this.endTime = "";
// this.datetime7 = [];
this.cp5startTime = "";
this.cp5endTime = "";
},
save() {
this.$refs.formCount.validate((valid) => {
@ -971,22 +1099,18 @@ export default {
if (this.formCount.materialCode != "") {
this.listExportQuery.materialCode = this.formCount.materialCode; //
}
// if (this.formCount.sapMaterialCode != "") {
// this.listExportQuery.sapMaterialCode = this.formCount.sapMaterialCode; //
// }
if (this.formCount.sapCode != "") {
this.listExportQuery.sapCode = this.formCount.sapCode; //
}
if (this.formCount.kennCode != "") {
this.listExportQuery.kenncode = this.formCount.kennCode; //KEEN
}
var getdate5 = JSON.stringify(this.datetime5);
if (getdate5 != "[]") {
alert(this.datetime5[0]);
this.listExportQuery.begin = this.datetime5
? this.datetime5[0] || undefined
: undefined;
this.listExportQuery.end = this.datetime5
? this.datetime5[1] || undefined
: undefined;
}
this.listExportQuery.begin = this.cp5startTime
? this.cp5startTime
: undefined;
this.listExportQuery.end = this.cp5endTime
? this.cp5endTime
: undefined;
if (this.startTime != "") {
this.listExportQuery.cp7begin = this.startTime; //CP7
}
@ -997,8 +1121,7 @@ export default {
this.listExportQuery.chassisNumber = this.formCount.chassisNumber; //
}
if (this.formCount.materialGroupValue != "") {
this.listExportQuery.materialGroup =
this.formCount.materialGroupValue; //
this.listExportQuery.materialGroup = this.getmaterialGroupValue; //
}
console.log(
"大众备件结算核对-导出条件:" + JSON.stringify(this.listExportQuery)
@ -1036,6 +1159,11 @@ export default {
this.formTitle = "报表统计";
this.isEdit = false;
this.form = {};
this.datetime5 = [];
this.startTime = "";
this.endTime = "";
this.cp5startTime = "";
this.cp5endTime = "";
this.dialogFormVisible = true;
},
filterHandler(value, row, column) {
@ -1150,7 +1278,7 @@ export default {
getList() {
this.listLoading = true;
//
this.listQuery.name = "大众准时化结算门板价格差异比对报表";
this.listQuery.name = "备件结算数量差异输出";
this.$axios
.posts("/api/settleaccount/Job/list", this.listQuery)
.then((response) => {

616
vue/src/views/ux/billManage/vwOutOrder/detail.vue

@ -0,0 +1,616 @@
<!--FIS发运数据对比输出表-明细数据-->
<template>
<div class="cr-body-content">
<flexbox class="content-header">
<!-- <el-button
class="filter-item"
size="mini"
type="info"
icon="el-icon-download"
@click="handleDownload()"
>导出全部
</el-button> -->
<JobSelectVerson
:options="JobVersionList"
style="width: 150px; margin-left: -10px"
class="search-container"
@value-change="JobVersionValue"
></JobSelectVerson>
<el-button
class="filter-item"
type="success"
icon="el-icon-check"
size="mini"
@click="handleCreateBills()"
>确认出库单(支持批量)</el-button
>
<el-button
class="filter-item"
size="mini"
type="warning"
icon="el-icon-download"
@click="handleCancelBills()"
>取消出库(支持批量)
</el-button>
<el-input
v-model="searchContent"
clearable
size="small"
placeholder="按照零件号搜索..."
style="width: 230px"
class="search-container"
@keyup.enter.native="handleFilter"
/>
<el-button
size="mini"
type="success"
icon="el-icon-search"
@click="handleFilter"
>搜索
</el-button>
<!--表格头组件filter查询-->
<c-r-m-table-head
ref="crmTableHead"
:crm-type="crmType"
@handle="handleHandle"
@filter="handleFilters"
>
</c-r-m-table-head>
</flexbox>
<!--表格渲染-->
<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
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 JobSelectVerson from "@/components/CreateCom/Job-Select.vue";
export default {
name: "sendUnsettledDiffReport",
components: { Pagination, CRMTableHead, CRMTableHead, JobSelectVerson },
directives: { permission },
props: {
customerInfos: {
type: Array,
default: () => {
return [];
},
},
},
data() {
return {
crmType: "vwOutOrder",
rules: {
//
erpMaterialCode: [
{ required: true, message: "必须输入!", trigger: "blur" },
],
},
searchContent: "", //
customerInfo: {
parentId: "",
version: "",
},
form: {
dicDetailID: "",
customerId: "",
projectId: "",
},
list: null,
totalCount: 0,
listLoading: true,
formLoading: false,
JobVersionList: [
{ value: "0", label: "未处理" },
{ value: "1", label: "申请出库" },
{ value: "2", label: "确认出库" },
{ value: "3", label: "不能出库" },
{ value: "4", label: "取消出库" },
],
//
filterObj: {
type: Object,
default: () => {
return {};
},
},
listQuery: {
Filters: [
{
logic: 0,
column: "Enabled",
action: 0,
value: "true",
}, //
],
SkipCount: 0,
MaxResultCount: 15,
billNum: "",
},
listOutPutQuery: {
version: "",
guids: "",
billNum: "",
},
page: 1,
JobversionValue: "",
JobversionValueVerson: "",
dialogFormVisible: false,
multipleSelection: [],
formTitle: "",
drawer: false,
showExcelImport: false,
tableHeight: document.documentElement.clientHeight - 230,
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;
this.customerInfo.version = element.Version;
});
if (this.customerInfo.parentId != "") {
this.getList();
}
}
},
immediate: true,
},
},
computed: {
/** 列表字段 */
getDefaultField() {
var tempsTabs = [];
tempsTabs.push({
label: "版本",
prop: "version",
width: 110,
});
tempsTabs.push({
label: "零件号",
prop: "materialCode",
width: 150,
});
tempsTabs.push({ label: "KEEN号", prop: "kennCode", width: 170 });
tempsTabs.push({ label: "底盘号", prop: "chassisNumber", width: 190 });
tempsTabs.push({ label: "零件描述", prop: "materialDesc", width: 250 });
tempsTabs.push({ label: "物料组", prop: "materialGroup", width: 220 });
tempsTabs.push({ label: "交货单号", prop: "wmsBillNum", width: 100 });
tempsTabs.push({ label: "数量", prop: "qty", width: 100 });
tempsTabs.push({ label: "状态", prop: "state", width: 100 });
return tempsTabs;
},
},
methods: {
//
JobVersionValue(params) {
//
this.listQuery.Filters = [];
var column = "state";
let filter = {
logic: 0,
column: column,
action: 0,
value: params.value,
};
this.listQuery.Filters.push(filter);
this.getList();
},
//
handleCancelBills(row) {
if (this.multipleSelection.length == 0) {
this.$message({
message: "至少选择一行!",
type: "warning",
});
return;
}
var params = [];
let myalert = ""; //使
if (row) {
//
params.push(row.id);
myalert = row.name;
} else {
//
this.multipleSelection.forEach((element) => {
let id = element.id;
params.push(id);
});
myalert = "选中项";
}
this.listOutPutQuery.version = this.customerInfo.version;
this.listOutPutQuery.guids = params;
this.listOutPutQuery.billNum = this.customerInfo.parentId;
console.log("取消出库条件:" + JSON.stringify(this.listOutPutQuery));
this.$confirm("是否确认取消出库" + myalert + "?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.$axios
.posts(
"/api/settleaccount/wmsjitoutput/WmsJitOutPut-Cancel",
this.listOutPutQuery
)
.then((response) => {
const index = this.list.indexOf(row);
this.$notify({
title: "成功",
message: "操作成功",
type: "success",
duration: 2000,
});
this.getList();
});
})
.catch(() => {
this.$message({
type: "info",
message: "已取消操作",
});
});
},
//
handleCreateBills(row) {
if (this.multipleSelection.length == 0) {
this.listLoading = true;
this.listOutPutQuery.guids = [];
this.listOutPutQuery.version = this.customerInfo.version;
this.listOutPutQuery.billNum = this.customerInfo.parentId;
console.log(
"未选择时全部确认出库条件:" + JSON.stringify(this.listOutPutQuery)
);
this.$confirm("是否全部确认出库?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.$axios
.posts(
"/api/settleaccount/wmsjitoutput/WmsJitOutPut-Pass",
this.listOutPutQuery
)
.then((response) => {
const index = this.list.indexOf(row);
this.$notify({
title: "成功",
message: "生成成功",
type: "success",
duration: 2000,
});
this.getList();
this.listLoading = false;
});
})
.catch(() => {
this.$message({
type: "info",
message: "已取消操作",
});
this.listLoading = false;
});
} else {
this.listLoading = true;
var params = [];
let myalert = ""; //使
if (row) {
//
params.push(row.id);
myalert = row.name;
} else {
//
this.multipleSelection.forEach((element) => {
let id = element.id;
params.push(id);
});
myalert = "选中项";
}
this.listOutPutQuery.version = this.customerInfo.version;
this.listOutPutQuery.guids = params;
this.listOutPutQuery.billNum = this.customerInfo.parentId;
console.log(
"部分选择时确认出库条件:" + JSON.stringify(this.listOutPutQuery)
);
this.$confirm("是否确认将选中的出库" + myalert + "?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.$axios
.posts(
"/api/settleaccount/wmsjitoutput/WmsJitOutPut-Pass",
this.listOutPutQuery
)
.then((response) => {
const index = this.list.indexOf(row);
this.$notify({
title: "成功",
message: "生成成功",
type: "success",
duration: 2000,
});
this.getList();
this.listLoading = false;
});
})
.catch(() => {
this.$message({
type: "info",
message: "已取消操作",
});
this.listLoading = false;
});
}
},
/** 刷新列表 */
handleHandle(data) {
if (data.type !== "edit") {
this.getList();
}
},
/** 格式化字段 */
fieldFormatter(row, column) {
if (column.property == "state") {
return {
0: "未处理",
1: "申请出库",
2: "确认出库",
3: "不能出库",
4: "取消出库",
}[row[column.property]];
}
return row[column.property] || "--";
},
importExcelData() {
//
this.showExcelImport = false;
this.getList();
},
async handleDownload() {
//await this.getDownBoms();
this.listLoading = true;
this.$axios
.gets(
"/api/settleaccount/bt-kb-not-consign/export/" +
this.customerInfo.parentId
)
.then((res) => {
let fileNameOfProject = res;
this.$axios
.BolbGets(
"/api/settleaccount/getblobfile/download/" + fileNameOfProject
)
.then((response) => {
if (fileNameOfProject.indexOf("_") != -1) {
let downName =
fileNameOfProject.slice(
0,
fileNameOfProject.lastIndexOf("_")
) +
fileNameOfProject.slice(fileNameOfProject.lastIndexOf("."));
downloadFile(response, downName);
this.$notify({
title: "成功",
message: "数据-导出成功!",
type: "success",
duration: 2000,
});
} else {
downloadFile(response, fileNameOfProject);
this.$notify({
title: "成功",
message: "数据-导出成功!",
type: "success",
duration: 2000,
});
}
this.listLoading = false;
});
});
},
getList(data) {
this.listLoading = true;
if (data != undefined) {
this.listQuery.SkipCount = (this.page - 1) * data.limit;
} else {
this.listQuery.SkipCount = (this.page - 1) * 15;
}
this.listQuery.billNum = this.customerInfo.parentId;
console.log("查询条件:" + JSON.stringify(this.listQuery));
this.$axios
.posts(
"/api/settleaccount/wmsjitoutput/WmsJitDetailList",
this.listQuery
)
.then((response) => {
this.list = response.items;
//alert(JSON.stringify(response.Items))
this.totalCount = response.totalCount;
setTimeout(() => {
//
this.listLoading = false;
}, 500);
})
.catch(() => {
this.listLoading = false;
});
},
/** 筛选操作 */
handleFilter() {
this.page = 1;
this.getList();
this.listQuery.Filters = [];
if (this.searchContent != "") {
var column = "materialCode";
let filter = {
logic: 0,
column: column,
action: 6,
value: this.searchContent,
};
this.listQuery.Filters.push(filter);
}
this.getList();
},
/** 多项筛选操作 */
/** 筛选操作 */
handleFilters(data) {
if (data === null) {
this.listQuery.Filters = [];
this.getList(); //
} else {
this.filterObj = data;
console.log("筛选" + JSON.stringify(data));
var offsetHei = document.documentElement.clientHeight;
var removeHeight = Object.keys(this.filterObj).length > 0 ? 310 : 240;
this.tableHeight = offsetHei - removeHeight;
this.currentPage = 1;
let Filter = [];
data.forEach((item) => {
let filter = {};
if (item.formType === "datetime" || item.formType === "datetime") {
// (datetime >= a and datetime <=b)
filter["Column"] = item.fieldName;
filter["Logic"] = 0;
filter["Value"] = item.value[0];
filter["Action"] = item.action;
Filter.push(filter);
if (item.value[1] != null) {
filter["Value"] = item.value[1];
filter["Action"] = 5;
Filter.push(filter);
}
} else {
filter["Column"] = item.fieldName;
filter["Value"] = item.value;
filter["Logic"] = 0;
filter["Action"] = item.action;
Filter.push(filter);
}
});
console.log("筛选条件" + JSON.stringify(Filter));
this.listQuery.Filters = 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 "../../styles/crmtable.scss";
</style>

320
vue/src/views/ux/billManage/vwOutOrder/index.vue

@ -0,0 +1,320 @@
<!--轿车看板-发出未结算-->
<template>
<div class="cr-body-content">
<flexbox class="content-header">
<el-input
v-model="searchContent"
clearable
size="small"
placeholder="按照版本号搜索..."
style="width: 200px"
class="search-container"
@keyup.enter.native="handleFilter"
/>
<el-button
size="mini"
type="success"
icon="el-icon-search"
@click="handleFilter"
>搜索
</el-button>
</flexbox>
<!--表格渲染-->
<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"
size="small"
stripe
border
highlight-current-row
style="width: 100%"
@sort-change="sortChange"
@selection-change="handleSelectionChange"
@row-click="handleRowClick"
>
<el-table-column
label="单据号"
prop="billNum"
sortable="custom"
align="center"
width="250px"
>
<template slot-scope="scope">
<el-tooltip :content="scope.row.billNum" placement="bottom-end">
<span class="link-type" @click="handleDrawerOpen(scope.row)">{{
scope.row.billNum
}}</span>
</el-tooltip>
</template>
</el-table-column>
<!-- <el-table-column type="selection" width="44px"></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"
/>
<!-- 抽屉控件 -->
<el-drawer
title="信息详细页"
size="75%"
direction="rtl"
:visible.sync="drawer"
: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"; // secondary package based on el-pagination
import permission from "@/directive/permission/index.js";
import Detail from "./detail";
import moment from "moment";
import { formatTimeToTimestamp } from "@/utils/index";
export default {
name: "sendUnsettledDiffReport",
components: { Pagination, Detail},
directives: { permission },
data() {
return {
crmType: "sendUnsettledDiffReport",
rules: {
// version: [{ required: true, message: "", trigger: "change" }],
// beginTime: [{ required: true, message: "", trigger: "change" }],
// endTime: [{ required: true, message: "", trigger: "change" }],
},
customerInfos: [],
searchContent: "", //
drawer: false,
form: {
version: "",
customerCode: "",
customerName: "",
beginTime: "",
endTime: "",
},
versionValue: "",
versionList: [],
startTimeVale: "",
endTimeVale: "",
list: null,
totalCount: 0,
listLoading: true,
formLoading: false,
//
filterObj: {
type: Object,
default: () => {
return {};
},
},
listQuery: {
Filters: [
{
logic: 0,
column: "Enabled",
action: 0,
value: "true",
}, //
],
//OrgID:"",
SkipCount: 0,
MaxResultCount: 15,
},
page: 1,
dialogFormVisible: false,
multipleSelection: [],
formTitle: "",
drawer: false,
showExcelImport: false,
tableHeight: document.documentElement.clientHeight - 200,
isEdit: false,
};
},
mounted() {
var self = this;
window.onresize = function () {
var offsetHei = document.documentElement.clientHeight;
self.tableHeight = offsetHei - 200;
};
},
created() {
this.getList();
//this.getVersionInfo();
},
computed: {
/** 列表字段 */
getDefaultField() {
var tempsTabs = [];
tempsTabs.push({
label: "版本",
prop: "version",
width: 120,
});
//tempsTabs.push({ label: "", prop: "billNum", width: 150 });
tempsTabs.push({ label: "创建人", prop: "creator", width: 160 });
tempsTabs.push({ label: "创建时间", prop: "creationTime", width: 160 });
tempsTabs.push({ label: "备注", prop: "remark", width: 120 });
return tempsTabs;
},
},
methods: {
getVersionInfo() {
//
this.listLoading = true;
this.listQuery.SkipCount = (this.page - 1) * 1000;
this.$axios
.posts("/api/settleaccount/CentralizedControl/openlist")
.then((response) => {
this.versionList = [];
response.forEach((element) => {
let options = {};
options.value = element.version;
options.label = element.version;
this.versionList.push(options);
});
})
.catch(() => {
this.listLoading = false;
});
},
//
handleDrawerOpen(param) {
this.drawer = true;
var parentId = param.billNum; //
var version = param.version; //
this.customerInfos = [
{
ParentId: parentId,
Version: version,
},
];
},
handleDrawerClose(done) {
done();
},
/** 格式化字段 */
fieldFormatter(row, column) {
if (column.property == "creationTime") {
var date = row[column.property];
if (date == undefined) {
return "";
}
return moment(date).format("YYYY-MM-DD HH:mm:ss");
}
if (column.property == "state") {
return { 0: "已提交", 1: "已出库", 2: "不能出库" }[
row[column.property]
];
}
return row[column.property] || "--";
},
importExcelData() {
//
this.showExcelImport = false;
this.getList();
},
getList(data) {
this.listLoading = true;
if (data != undefined) {
this.listQuery.SkipCount = (this.page - 1) * data.limit;
} else {
this.listQuery.SkipCount = (this.page - 1) * 15;
}
this.$axios
.posts("/api/settleaccount/wmsjitoutput/WmsJitList", this.listQuery)
.then((response) => {
this.list = response.items;
//alert(JSON.stringify(response.Items))
this.totalCount = response.totalCount;
setTimeout(() => {
//
this.listLoading = false;
}, 500);
})
.catch(() => {
this.listLoading = false;
});
},
/** 筛选操作 */
handleFilter() {
this.page = 1;
this.getList();
this.listQuery.Filters = [];
if (this.searchContent != "") {
var column = "version";
let filter = {
logic: 0,
column: column,
action: 0,
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" };
},
handleRowClick(row, column, event) {
this.$refs.multipleTable.clearSelection();
this.$refs.multipleTable.toggleRowSelection(row);
},
},
};
</script>
<style lang="scss" scoped>
@import "../../styles/crmtable.scss";
</style>

594
vue/src/views/ux/vw/dataInput/hq_bt/index.vue

@ -0,0 +1,594 @@
<!--红旗H平台导入功能-->
<template>
<div class="cr-body-content">
<flexbox class="content-header">
<XhJSSelect
:options="versionList"
style="width: 200px"
class="search-container"
@value-change="selectValue"
></XhJSSelect>
<el-button
class="filter-item"
size="mini"
type="warning"
icon="el-icon-upload2"
@click="handleImportExcel()"
>导入文件Excel
</el-button>
<!-- <el-button
class="filter-item"
size="mini"
type="primary"
icon="el-icon-download"
@click="handleDownload()"
>导出Excel
</el-button> -->
<el-dropdown
size="small"
class="filter-item"
style="margin-left: 15px; font-weight: bold"
@command="handleCommand"
>
<span class="el-dropdown-link">
导出数据<i class="el-icon-arrow-down el-icon--right"></i>
</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item command="excel" icon="el-icon-plus"
>导出Excel</el-dropdown-item
>
<el-dropdown-item command="csv" icon="el-icon-circle-plus"
>导出Csv</el-dropdown-item
>
</el-dropdown-menu>
</el-dropdown>
<el-input
v-model="searchContent"
clearable
size="small"
placeholder="按照采购订单号搜索..."
style="width: 200px"
class="search-container"
@keyup.enter.native="handleFilter"
/>
<el-button
size="mini"
type="success"
icon="el-icon-search"
@click="handleFilter"
>搜索
</el-button>
<!--表格头组件filter查询-->
<c-r-m-table-head
ref="crmTableHead"
:crm-type="crmType"
@handle="handleHandle"
@filter="handleFilters"
>
</c-r-m-table-head>
</flexbox>
<!--表格渲染-->
<el-table
ref="multipleTable"
v-loading.fullscreen.lock="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="version"
sortable="custom"
align="center"
width="100px"
fixed
>
<template slot-scope="scope">
<el-tooltip :content="scope.row.version" placement="top">
<span class="link-type">{{ scope.row.version }}</span>
</el-tooltip>
</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"
/>
<!-- 导入Excel组件 -->
<importExcel
ref="importexcel"
:show="showExcelImport"
:crmType="crmType"
@close="importExcelData"
/>
</div>
</div>
</template>
<script>
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
import permission from "@/directive/permission/index.js";
import importExcel from "@/components/ImportExcel-base";
import CRMTableHead from "../../../components/CRMTableHead";
import moment from "moment";
import Lockr from "lockr";
import { downloadFile } from "@/utils/crmindex.js";
import XhJSSelect from "@/components/CreateCom/Xh-JS-Select-Label.vue";
export default {
name: "HQHPlatform",
components: { Pagination, CRMTableHead, importExcel, XhJSSelect },
directives: { permission },
filters: {
IsCustomerSignFilter(status) {
//
const statusMap = {
true: "是",
false: "否",
};
return statusMap[status];
},
},
props: {
customerInfos: {
type: Array,
default: () => {
return [];
},
},
},
data() {
return {
crmType: "hqHPlatform",
versionValue: "",
versionList: [], //
rules: {
//
erpMaterialCode: [
{ required: true, message: "必须输入!", trigger: "blur" },
],
},
searchContent: "", //
customerInfo: {
settleAccountId: "",
},
form: {
dicDetailID: "",
customerId: "",
projectId: "",
},
list: null,
totalCount: 0,
listLoading: true,
formLoading: true,
//
filterObj: {
type: Object,
default: () => {
return {};
},
},
listVersionQuery: {
SkipCount: 0,
MaxResultCount: 15,
},
listQuery: {
Filters: [
{
logic: 0,
column: "Enabled",
action: 0,
value: "true",
}, //
],
//OrgID:"",
SkipCount: 0,
MaxResultCount: 15,
version: "",
site: "TH",
userId: "00000000-0000-0000-0000-000000000000",
},
listExportQuery: {
Filters: [
{
logic: 0,
column: "Enabled",
action: 0,
value: "true",
}, //
],
//OrgID:"",
SkipCount: 0,
MaxResultCount: 15,
version: "",
fileType: 0,
userId: "",
},
page: 1,
dialogFormVisible: false,
multipleSelection: [],
formTitle: "",
drawer: false,
showExcelImport: false,
tableHeight: document.documentElement.clientHeight - 220,
isEdit: false,
};
},
mounted() {
var self = this;
window.onresize = function () {
var offsetHei = document.documentElement.clientHeight;
self.tableHeight = offsetHei - 220;
};
},
created() {
this.getVersionInfo();
if (this.versionList == []) {
this.getList();
}
},
computed: {
/** 列表字段 */
getDefaultField() {
var tempsTabs = [];
tempsTabs.push({ label: "行号", prop: "lineNumber", width: 100 });
tempsTabs.push({ label: "采购类型", prop: "purchaseType", width: 150 });
tempsTabs.push({
label: "采购订单号",
prop: "purchaseOrderNo",
width: 220,
});
tempsTabs.push({
label: "采购订单行项目",
prop: "purchaseOrderNoItem",
width: 170,
});
tempsTabs.push({
label: "采购订单文本",
prop: "purchaseOrderNoText",
width: 170,
});
tempsTabs.push({ label: "收货数量", prop: "receiptQty", width: 120 });
tempsTabs.push({ label: "开票数量", prop: "invoicedQty", width: 120 });
tempsTabs.push({ label: "不含税金额", prop: "amountNoTax", width: 150 });
tempsTabs.push({
label: "采购价格不含税",
prop: "purchasePriceNoTax",
width: 200,
});
tempsTabs.push({ label: "科目号", prop: "accountNum", width: 150 });
tempsTabs.push({ label: "物料代码", prop: "materialCode", width: 180 });
tempsTabs.push({ label: "物料描述", prop: "materialDesc", width: 250 });
tempsTabs.push({
label: "日期",
prop: "spareDate",
width: 150,
formType: "datetime",
});
tempsTabs.push({
label: "交货单号",
prop: "deliveryOrderNo",
width: 150,
});
tempsTabs.push({
label: "交货行号",
prop: "deliveryLineNum",
width: 150,
});
tempsTabs.push({ label: "批次号", prop: "batchNo", width: 150 });
tempsTabs.push({ label: "税率", prop: "taxRate", width: 100 });
tempsTabs.push({ label: "税码", prop: "taxCode", width: 110 });
tempsTabs.push({
label: "德国发票号",
prop: "germanInvoiceNo",
width: 150,
});
tempsTabs.push({ label: "工厂", prop: "factory", width: 150 });
tempsTabs.push({ label: "工厂名称", prop: "factoryName", width: 220 });
return tempsTabs;
},
},
methods: {
handleCommand(command) {
if (this.versionValue === "") {
this.$message.error("请先选择版本!");
return;
}
switch (command) {
case "excel":
this.listQuery.fileType = 1; //0csv,1excel
break;
case "csv":
this.listQuery.fileType = 0; //0csv,1excel
break;
default:
//
break;
}
this.listLoading = true;
if (this.versionValue === "") {
this.$message.error("必需选择版本!");
this.listLoading = false;
return;
}
if (this.versionValue != "") {
this.listQuery.version = this.versionValue;
}
console.log("红旗H平台导出:" + JSON.stringify(this.listQuery));
this.$axios
.posts("/api/settleaccount/HQHPlatform/Export", this.listQuery)
.then((res) => {
let fileNameOfProject = res;
this.$axios
.BolbGets(
"/api/settleaccount/getblobfile/download/" + fileNameOfProject
)
.then((response) => {
if (fileNameOfProject.indexOf("_") != -1) {
let downName =
fileNameOfProject.slice(
0,
fileNameOfProject.lastIndexOf("_")
) +
fileNameOfProject.slice(fileNameOfProject.lastIndexOf("."));
downloadFile(response, downName);
this.$notify({
title: "成功",
message: "数据-导出成功!",
type: "success",
duration: 2000,
});
} else {
downloadFile(response, fileNameOfProject);
this.$notify({
title: "成功",
message: "数据-导出成功!",
type: "success",
duration: 2000,
});
}
this.listLoading = false;
});
});
},
selectValue(params) {
//
this.versionValue = params.value;
this.getList();
},
selectOptionsChange(item) {
this.getList();
},
getVersionInfo() {
//
//this.listLoading = true;
this.listQuery.SkipCount = (this.page - 1) * 1000;
this.$axios
.posts("/api/settleaccount/HQHPlatform/listVersion", this.listQuery)
.then((response) => {
this.versionList = [];
response.items.forEach((element) => {
let options = {};
options.value = element.id;
options.label = element.version;
this.versionList.push(options);
});
if (JSON.stringify(this.versionList) != "[]") {
//
this.versionValue = this.versionList[0].label;
this.getList();
}
this.listLoading = false;
})
.catch(() => {
this.listLoading = false;
});
},
handleImportExcel() {
//
this.showExcelImport = true;
this.$refs.importexcel.handleImportExcelClick();
},
/** 刷新列表 */
handleHandle(data) {
if (data.type !== "edit") {
this.getList();
}
},
/** 格式化字段 */
fieldFormatter(row, column) {
// if (column.property === "state") {
// return { 0: "", 2: "" }[row[column.property]];
// }
if (
column.property == "settleInputDate" ||
column.property == "settleDate"
) {
var date = row[column.property];
if (date == undefined) {
return "";
}
return moment(date).format("YYYY-MM-DD HH:mm:ss");
}
return row[column.property] || "--";
},
importExcelData() {
this.getVersionInfo();
this.listLoading = false;
//
this.showExcelImport = false;
},
getList() {
this.listLoading = true;
this.listQuery.SkipCount = (this.page - 1) * 10;
if (this.versionValue != "") {
this.listQuery.version = this.versionValue;
}
console.log("列表查询条件:" + JSON.stringify(this.listQuery));
this.$axios
.posts("/api/settleaccount/HQHPlatform/list", this.listQuery)
.then((response) => {
this.list = response.items;
this.totalCount = response.totalCount;
setTimeout(() => {
//
this.listLoading = false;
}, 500);
})
.catch(() => {
this.listLoading = false;
});
},
fetchData(id) {
//
this.$axios
.gets("/api/settleaccount/HQHPlatform/" + id)
.then((response) => {
this.form = response;
});
},
/** 筛选操作 */
handleFilter() {
this.page = 1;
this.getList();
this.listQuery.Filters = [];
if (this.searchContent != "") {
var column = "purchaseOrderNo";
let filter = {
logic: 0,
column: column,
action: 0,
value: this.searchContent,
};
this.listQuery.Filters.push(filter);
}
this.getList();
},
/** 多项筛选操作 */
/** 筛选操作 */
handleFilters(data) {
if (data === null) {
this.listQuery.Filters = [];
this.getList(); //
} else {
this.filterObj = data;
console.log("筛选" + JSON.stringify(data));
var offsetHei = document.documentElement.clientHeight;
var removeHeight = Object.keys(this.filterObj).length > 0 ? 310 : 240;
this.tableHeight = offsetHei - removeHeight;
this.currentPage = 1;
let Filter = [];
data.forEach((item) => {
let filter = {};
if (item.formType === "datetime" || item.formType === "datetime") {
// (datetime >= a and datetime <=b)
filter["Column"] = item.fieldName;
filter["Logic"] = 0;
filter["Value"] = item.value[0];
filter["Action"] = item.action;
Filter.push(filter);
if (item.value[1] != null) {
filter["Value"] = item.value[1];
filter["Action"] = 5;
Filter.push(filter);
}
} else {
filter["Column"] = item.fieldName;
filter["Value"] = item.value;
filter["Logic"] = 0;
filter["Action"] = item.action;
Filter.push(filter);
}
});
console.log("筛选条件" + JSON.stringify(Filter));
this.listQuery.Filters = Filter;
this.getList();
}
},
resetQuery() {},
sortChange(data) {
const { prop, order } = data;
if (!prop || !order) {
this.handleFilter();
return;
}
this.listQuery.Sorting = prop + " " + order;
console.log(this.listQuery.Sorting);
this.handleFilter();
},
handleSelectionChange(val) {
this.multipleSelection = val;
},
/** 通过回调控制style */
cellStyle({ row, column, rowIndex, columnIndex }) {
// if (column.property === "qty") {
// return { textAlign: "right" };
// } else {
// return { textAlign: "left" };
// }
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);
},
},
};
</script>
<style lang="scss" scoped>
@import "../../../styles/crmtable.scss";
</style>
<style lang="scss">
.el-table .cell.el-tooltip {
white-space: pre-wrap;
}
</style>

594
vue/src/views/ux/vw/dataInput/hq_f/index.vue

@ -0,0 +1,594 @@
<!--红旗H平台导入功能-->
<template>
<div class="cr-body-content">
<flexbox class="content-header">
<XhJSSelect
:options="versionList"
style="width: 200px"
class="search-container"
@value-change="selectValue"
></XhJSSelect>
<el-button
class="filter-item"
size="mini"
type="warning"
icon="el-icon-upload2"
@click="handleImportExcel()"
>导入文件Excel
</el-button>
<!-- <el-button
class="filter-item"
size="mini"
type="primary"
icon="el-icon-download"
@click="handleDownload()"
>导出Excel
</el-button> -->
<el-dropdown
size="small"
class="filter-item"
style="margin-left: 15px; font-weight: bold"
@command="handleCommand"
>
<span class="el-dropdown-link">
导出数据<i class="el-icon-arrow-down el-icon--right"></i>
</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item command="excel" icon="el-icon-plus"
>导出Excel</el-dropdown-item
>
<el-dropdown-item command="csv" icon="el-icon-circle-plus"
>导出Csv</el-dropdown-item
>
</el-dropdown-menu>
</el-dropdown>
<el-input
v-model="searchContent"
clearable
size="small"
placeholder="按照采购订单号搜索..."
style="width: 200px"
class="search-container"
@keyup.enter.native="handleFilter"
/>
<el-button
size="mini"
type="success"
icon="el-icon-search"
@click="handleFilter"
>搜索
</el-button>
<!--表格头组件filter查询-->
<c-r-m-table-head
ref="crmTableHead"
:crm-type="crmType"
@handle="handleHandle"
@filter="handleFilters"
>
</c-r-m-table-head>
</flexbox>
<!--表格渲染-->
<el-table
ref="multipleTable"
v-loading.fullscreen.lock="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="version"
sortable="custom"
align="center"
width="100px"
fixed
>
<template slot-scope="scope">
<el-tooltip :content="scope.row.version" placement="top">
<span class="link-type">{{ scope.row.version }}</span>
</el-tooltip>
</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"
/>
<!-- 导入Excel组件 -->
<importExcel
ref="importexcel"
:show="showExcelImport"
:crmType="crmType"
@close="importExcelData"
/>
</div>
</div>
</template>
<script>
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
import permission from "@/directive/permission/index.js";
import importExcel from "@/components/ImportExcel-base";
import CRMTableHead from "../../../components/CRMTableHead";
import moment from "moment";
import Lockr from "lockr";
import { downloadFile } from "@/utils/crmindex.js";
import XhJSSelect from "@/components/CreateCom/Xh-JS-Select-Label.vue";
export default {
name: "HQHPlatform",
components: { Pagination, CRMTableHead, importExcel, XhJSSelect },
directives: { permission },
filters: {
IsCustomerSignFilter(status) {
//
const statusMap = {
true: "是",
false: "否",
};
return statusMap[status];
},
},
props: {
customerInfos: {
type: Array,
default: () => {
return [];
},
},
},
data() {
return {
crmType: "hqHPlatform",
versionValue: "",
versionList: [], //
rules: {
//
erpMaterialCode: [
{ required: true, message: "必须输入!", trigger: "blur" },
],
},
searchContent: "", //
customerInfo: {
settleAccountId: "",
},
form: {
dicDetailID: "",
customerId: "",
projectId: "",
},
list: null,
totalCount: 0,
listLoading: true,
formLoading: true,
//
filterObj: {
type: Object,
default: () => {
return {};
},
},
listVersionQuery: {
SkipCount: 0,
MaxResultCount: 15,
},
listQuery: {
Filters: [
{
logic: 0,
column: "Enabled",
action: 0,
value: "true",
}, //
],
//OrgID:"",
SkipCount: 0,
MaxResultCount: 15,
version: "",
site: "TH",
userId: "00000000-0000-0000-0000-000000000000",
},
listExportQuery: {
Filters: [
{
logic: 0,
column: "Enabled",
action: 0,
value: "true",
}, //
],
//OrgID:"",
SkipCount: 0,
MaxResultCount: 15,
version: "",
fileType: 0,
userId: "",
},
page: 1,
dialogFormVisible: false,
multipleSelection: [],
formTitle: "",
drawer: false,
showExcelImport: false,
tableHeight: document.documentElement.clientHeight - 220,
isEdit: false,
};
},
mounted() {
var self = this;
window.onresize = function () {
var offsetHei = document.documentElement.clientHeight;
self.tableHeight = offsetHei - 220;
};
},
created() {
this.getVersionInfo();
if (this.versionList == []) {
this.getList();
}
},
computed: {
/** 列表字段 */
getDefaultField() {
var tempsTabs = [];
tempsTabs.push({ label: "行号", prop: "lineNumber", width: 100 });
tempsTabs.push({ label: "采购类型", prop: "purchaseType", width: 150 });
tempsTabs.push({
label: "采购订单号",
prop: "purchaseOrderNo",
width: 220,
});
tempsTabs.push({
label: "采购订单行项目",
prop: "purchaseOrderNoItem",
width: 170,
});
tempsTabs.push({
label: "采购订单文本",
prop: "purchaseOrderNoText",
width: 170,
});
tempsTabs.push({ label: "收货数量", prop: "receiptQty", width: 120 });
tempsTabs.push({ label: "开票数量", prop: "invoicedQty", width: 120 });
tempsTabs.push({ label: "不含税金额", prop: "amountNoTax", width: 150 });
tempsTabs.push({
label: "采购价格不含税",
prop: "purchasePriceNoTax",
width: 200,
});
tempsTabs.push({ label: "科目号", prop: "accountNum", width: 150 });
tempsTabs.push({ label: "物料代码", prop: "materialCode", width: 180 });
tempsTabs.push({ label: "物料描述", prop: "materialDesc", width: 250 });
tempsTabs.push({
label: "日期",
prop: "spareDate",
width: 150,
formType: "datetime",
});
tempsTabs.push({
label: "交货单号",
prop: "deliveryOrderNo",
width: 150,
});
tempsTabs.push({
label: "交货行号",
prop: "deliveryLineNum",
width: 150,
});
tempsTabs.push({ label: "批次号", prop: "batchNo", width: 150 });
tempsTabs.push({ label: "税率", prop: "taxRate", width: 100 });
tempsTabs.push({ label: "税码", prop: "taxCode", width: 110 });
tempsTabs.push({
label: "德国发票号",
prop: "germanInvoiceNo",
width: 150,
});
tempsTabs.push({ label: "工厂", prop: "factory", width: 150 });
tempsTabs.push({ label: "工厂名称", prop: "factoryName", width: 220 });
return tempsTabs;
},
},
methods: {
handleCommand(command) {
if (this.versionValue === "") {
this.$message.error("请先选择版本!");
return;
}
switch (command) {
case "excel":
this.listQuery.fileType = 1; //0csv,1excel
break;
case "csv":
this.listQuery.fileType = 0; //0csv,1excel
break;
default:
//
break;
}
this.listLoading = true;
if (this.versionValue === "") {
this.$message.error("必需选择版本!");
this.listLoading = false;
return;
}
if (this.versionValue != "") {
this.listQuery.version = this.versionValue;
}
console.log("红旗H平台导出:" + JSON.stringify(this.listQuery));
this.$axios
.posts("/api/settleaccount/HQHPlatform/Export", this.listQuery)
.then((res) => {
let fileNameOfProject = res;
this.$axios
.BolbGets(
"/api/settleaccount/getblobfile/download/" + fileNameOfProject
)
.then((response) => {
if (fileNameOfProject.indexOf("_") != -1) {
let downName =
fileNameOfProject.slice(
0,
fileNameOfProject.lastIndexOf("_")
) +
fileNameOfProject.slice(fileNameOfProject.lastIndexOf("."));
downloadFile(response, downName);
this.$notify({
title: "成功",
message: "数据-导出成功!",
type: "success",
duration: 2000,
});
} else {
downloadFile(response, fileNameOfProject);
this.$notify({
title: "成功",
message: "数据-导出成功!",
type: "success",
duration: 2000,
});
}
this.listLoading = false;
});
});
},
selectValue(params) {
//
this.versionValue = params.value;
this.getList();
},
selectOptionsChange(item) {
this.getList();
},
getVersionInfo() {
//
//this.listLoading = true;
this.listQuery.SkipCount = (this.page - 1) * 1000;
this.$axios
.posts("/api/settleaccount/HQHPlatform/listVersion", this.listQuery)
.then((response) => {
this.versionList = [];
response.items.forEach((element) => {
let options = {};
options.value = element.id;
options.label = element.version;
this.versionList.push(options);
});
if (JSON.stringify(this.versionList) != "[]") {
//
this.versionValue = this.versionList[0].label;
this.getList();
}
this.listLoading = false;
})
.catch(() => {
this.listLoading = false;
});
},
handleImportExcel() {
//
this.showExcelImport = true;
this.$refs.importexcel.handleImportExcelClick();
},
/** 刷新列表 */
handleHandle(data) {
if (data.type !== "edit") {
this.getList();
}
},
/** 格式化字段 */
fieldFormatter(row, column) {
// if (column.property === "state") {
// return { 0: "", 2: "" }[row[column.property]];
// }
if (
column.property == "settleInputDate" ||
column.property == "settleDate"
) {
var date = row[column.property];
if (date == undefined) {
return "";
}
return moment(date).format("YYYY-MM-DD HH:mm:ss");
}
return row[column.property] || "--";
},
importExcelData() {
this.getVersionInfo();
this.listLoading = false;
//
this.showExcelImport = false;
},
getList() {
this.listLoading = true;
this.listQuery.SkipCount = (this.page - 1) * 10;
if (this.versionValue != "") {
this.listQuery.version = this.versionValue;
}
console.log("列表查询条件:" + JSON.stringify(this.listQuery));
this.$axios
.posts("/api/settleaccount/HQHPlatform/list", this.listQuery)
.then((response) => {
this.list = response.items;
this.totalCount = response.totalCount;
setTimeout(() => {
//
this.listLoading = false;
}, 500);
})
.catch(() => {
this.listLoading = false;
});
},
fetchData(id) {
//
this.$axios
.gets("/api/settleaccount/HQHPlatform/" + id)
.then((response) => {
this.form = response;
});
},
/** 筛选操作 */
handleFilter() {
this.page = 1;
this.getList();
this.listQuery.Filters = [];
if (this.searchContent != "") {
var column = "purchaseOrderNo";
let filter = {
logic: 0,
column: column,
action: 0,
value: this.searchContent,
};
this.listQuery.Filters.push(filter);
}
this.getList();
},
/** 多项筛选操作 */
/** 筛选操作 */
handleFilters(data) {
if (data === null) {
this.listQuery.Filters = [];
this.getList(); //
} else {
this.filterObj = data;
console.log("筛选" + JSON.stringify(data));
var offsetHei = document.documentElement.clientHeight;
var removeHeight = Object.keys(this.filterObj).length > 0 ? 310 : 240;
this.tableHeight = offsetHei - removeHeight;
this.currentPage = 1;
let Filter = [];
data.forEach((item) => {
let filter = {};
if (item.formType === "datetime" || item.formType === "datetime") {
// (datetime >= a and datetime <=b)
filter["Column"] = item.fieldName;
filter["Logic"] = 0;
filter["Value"] = item.value[0];
filter["Action"] = item.action;
Filter.push(filter);
if (item.value[1] != null) {
filter["Value"] = item.value[1];
filter["Action"] = 5;
Filter.push(filter);
}
} else {
filter["Column"] = item.fieldName;
filter["Value"] = item.value;
filter["Logic"] = 0;
filter["Action"] = item.action;
Filter.push(filter);
}
});
console.log("筛选条件" + JSON.stringify(Filter));
this.listQuery.Filters = Filter;
this.getList();
}
},
resetQuery() {},
sortChange(data) {
const { prop, order } = data;
if (!prop || !order) {
this.handleFilter();
return;
}
this.listQuery.Sorting = prop + " " + order;
console.log(this.listQuery.Sorting);
this.handleFilter();
},
handleSelectionChange(val) {
this.multipleSelection = val;
},
/** 通过回调控制style */
cellStyle({ row, column, rowIndex, columnIndex }) {
// if (column.property === "qty") {
// return { textAlign: "right" };
// } else {
// return { textAlign: "left" };
// }
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);
},
},
};
</script>
<style lang="scss" scoped>
@import "../../../styles/crmtable.scss";
</style>
<style lang="scss">
.el-table .cell.el-tooltip {
white-space: pre-wrap;
}
</style>

4
vue/src/views/ux/vw/dataInput/hq_h/index.vue

@ -243,7 +243,7 @@ export default {
formTitle: "",
drawer: false,
showExcelImport: false,
tableHeight: document.documentElement.clientHeight - 260,
tableHeight: document.documentElement.clientHeight - 220,
isEdit: false,
};
},
@ -251,7 +251,7 @@ export default {
var self = this;
window.onresize = function () {
var offsetHei = document.documentElement.clientHeight;
self.tableHeight = offsetHei - 260;
self.tableHeight = offsetHei - 220;
};
},
created() {

594
vue/src/views/ux/vw/dataInput/hq_m/index.vue

@ -0,0 +1,594 @@
<!--红旗M平台导入功能-->
<template>
<div class="cr-body-content">
<flexbox class="content-header">
<XhJSSelect
:options="versionList"
style="width: 200px"
class="search-container"
@value-change="selectValue"
></XhJSSelect>
<el-button
class="filter-item"
size="mini"
type="warning"
icon="el-icon-upload2"
@click="handleImportExcel()"
>导入文件Excel
</el-button>
<!-- <el-button
class="filter-item"
size="mini"
type="primary"
icon="el-icon-download"
@click="handleDownload()"
>导出Excel
</el-button> -->
<el-dropdown
size="small"
class="filter-item"
style="margin-left: 15px; font-weight: bold"
@command="handleCommand"
>
<span class="el-dropdown-link">
导出数据<i class="el-icon-arrow-down el-icon--right"></i>
</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item command="excel" icon="el-icon-plus"
>导出Excel</el-dropdown-item
>
<el-dropdown-item command="csv" icon="el-icon-circle-plus"
>导出Csv</el-dropdown-item
>
</el-dropdown-menu>
</el-dropdown>
<el-input
v-model="searchContent"
clearable
size="small"
placeholder="按照采购订单号搜索..."
style="width: 200px"
class="search-container"
@keyup.enter.native="handleFilter"
/>
<el-button
size="mini"
type="success"
icon="el-icon-search"
@click="handleFilter"
>搜索
</el-button>
<!--表格头组件filter查询-->
<c-r-m-table-head
ref="crmTableHead"
:crm-type="crmType"
@handle="handleHandle"
@filter="handleFilters"
>
</c-r-m-table-head>
</flexbox>
<!--表格渲染-->
<el-table
ref="multipleTable"
v-loading.fullscreen.lock="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="version"
sortable="custom"
align="center"
width="100px"
fixed
>
<template slot-scope="scope">
<el-tooltip :content="scope.row.version" placement="top">
<span class="link-type">{{ scope.row.version }}</span>
</el-tooltip>
</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"
/>
<!-- 导入Excel组件 -->
<importExcel
ref="importexcel"
:show="showExcelImport"
:crmType="crmType"
@close="importExcelData"
/>
</div>
</div>
</template>
<script>
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
import permission from "@/directive/permission/index.js";
import importExcel from "@/components/ImportExcel-base";
import CRMTableHead from "../../../components/CRMTableHead";
import moment from "moment";
import Lockr from "lockr";
import { downloadFile } from "@/utils/crmindex.js";
import XhJSSelect from "@/components/CreateCom/Xh-JS-Select-Label.vue";
export default {
name: "HQMPlatform",
components: { Pagination, CRMTableHead, importExcel, XhJSSelect },
directives: { permission },
filters: {
IsCustomerSignFilter(status) {
//
const statusMap = {
true: "是",
false: "否",
};
return statusMap[status];
},
},
props: {
customerInfos: {
type: Array,
default: () => {
return [];
},
},
},
data() {
return {
crmType: "hqMPlatform",
versionValue: "",
versionList: [], //
rules: {
//
erpMaterialCode: [
{ required: true, message: "必须输入!", trigger: "blur" },
],
},
searchContent: "", //
customerInfo: {
settleAccountId: "",
},
form: {
dicDetailID: "",
customerId: "",
projectId: "",
},
list: null,
totalCount: 0,
listLoading: true,
formLoading: true,
//
filterObj: {
type: Object,
default: () => {
return {};
},
},
listVersionQuery: {
SkipCount: 0,
MaxResultCount: 15,
},
listQuery: {
Filters: [
{
logic: 0,
column: "Enabled",
action: 0,
value: "true",
}, //
],
//OrgID:"",
SkipCount: 0,
MaxResultCount: 15,
version: "",
site: "TH",
userId: "00000000-0000-0000-0000-000000000000",
},
listExportQuery: {
Filters: [
{
logic: 0,
column: "Enabled",
action: 0,
value: "true",
}, //
],
//OrgID:"",
SkipCount: 0,
MaxResultCount: 15,
version: "",
fileType: 0,
userId: "",
},
page: 1,
dialogFormVisible: false,
multipleSelection: [],
formTitle: "",
drawer: false,
showExcelImport: false,
tableHeight: document.documentElement.clientHeight - 220,
isEdit: false,
};
},
mounted() {
var self = this;
window.onresize = function () {
var offsetHei = document.documentElement.clientHeight;
self.tableHeight = offsetHei - 220;
};
},
created() {
this.getVersionInfo();
if (this.versionList == []) {
this.getList();
}
},
computed: {
/** 列表字段 */
getDefaultField() {
var tempsTabs = [];
tempsTabs.push({ label: "行号", prop: "lineNumber", width: 100 });
tempsTabs.push({ label: "采购类型", prop: "purchaseType", width: 150 });
tempsTabs.push({
label: "采购订单号",
prop: "purchaseOrderNo",
width: 220,
});
tempsTabs.push({
label: "采购订单行项目",
prop: "purchaseOrderNoItem",
width: 170,
});
tempsTabs.push({
label: "采购订单文本",
prop: "purchaseOrderNoText",
width: 170,
});
tempsTabs.push({ label: "收货数量", prop: "receiptQty", width: 120 });
tempsTabs.push({ label: "开票数量", prop: "invoicedQty", width: 120 });
tempsTabs.push({ label: "不含税金额", prop: "amountNoTax", width: 150 });
tempsTabs.push({
label: "采购价格不含税",
prop: "purchasePriceNoTax",
width: 200,
});
tempsTabs.push({ label: "科目号", prop: "accountNum", width: 150 });
tempsTabs.push({ label: "物料代码", prop: "materialCode", width: 180 });
tempsTabs.push({ label: "物料描述", prop: "materialDesc", width: 250 });
tempsTabs.push({
label: "日期",
prop: "spareDate",
width: 150,
formType: "datetime",
});
tempsTabs.push({
label: "交货单号",
prop: "deliveryOrderNo",
width: 150,
});
tempsTabs.push({
label: "交货行号",
prop: "deliveryLineNum",
width: 150,
});
tempsTabs.push({ label: "批次号", prop: "batchNo", width: 150 });
tempsTabs.push({ label: "税率", prop: "taxRate", width: 100 });
tempsTabs.push({ label: "税码", prop: "taxCode", width: 110 });
tempsTabs.push({
label: "德国发票号",
prop: "germanInvoiceNo",
width: 150,
});
tempsTabs.push({ label: "工厂", prop: "factory", width: 150 });
tempsTabs.push({ label: "工厂名称", prop: "factoryName", width: 220 });
return tempsTabs;
},
},
methods: {
handleCommand(command) {
if (this.versionValue === "") {
this.$message.error("请先选择版本!");
return;
}
switch (command) {
case "excel":
this.listQuery.fileType = 1; //0csv,1excel
break;
case "csv":
this.listQuery.fileType = 0; //0csv,1excel
break;
default:
//
break;
}
this.listLoading = true;
if (this.versionValue === "") {
this.$message.error("必需选择版本!");
this.listLoading = false;
return;
}
if (this.versionValue != "") {
this.listQuery.version = this.versionValue;
}
console.log("红旗H平台导出:" + JSON.stringify(this.listQuery));
this.$axios
.posts("/api/settleaccount/HQMPlatform/Export", this.listQuery)
.then((res) => {
let fileNameOfProject = res;
this.$axios
.BolbGets(
"/api/settleaccount/getblobfile/download/" + fileNameOfProject
)
.then((response) => {
if (fileNameOfProject.indexOf("_") != -1) {
let downName =
fileNameOfProject.slice(
0,
fileNameOfProject.lastIndexOf("_")
) +
fileNameOfProject.slice(fileNameOfProject.lastIndexOf("."));
downloadFile(response, downName);
this.$notify({
title: "成功",
message: "数据-导出成功!",
type: "success",
duration: 2000,
});
} else {
downloadFile(response, fileNameOfProject);
this.$notify({
title: "成功",
message: "数据-导出成功!",
type: "success",
duration: 2000,
});
}
this.listLoading = false;
});
});
},
selectValue(params) {
//
this.versionValue = params.value;
this.getList();
},
selectOptionsChange(item) {
this.getList();
},
getVersionInfo() {
//
//this.listLoading = true;
this.listQuery.SkipCount = (this.page - 1) * 1000;
this.$axios
.posts("/api/settleaccount/HQMPlatform/listVersion", this.listQuery)
.then((response) => {
this.versionList = [];
response.items.forEach((element) => {
let options = {};
options.value = element.id;
options.label = element.version;
this.versionList.push(options);
});
if (JSON.stringify(this.versionList) != "[]") {
//
this.versionValue = this.versionList[0].label;
this.getList();
}
this.listLoading = false;
})
.catch(() => {
this.listLoading = false;
});
},
handleImportExcel() {
//
this.showExcelImport = true;
this.$refs.importexcel.handleImportExcelClick();
},
/** 刷新列表 */
handleHandle(data) {
if (data.type !== "edit") {
this.getList();
}
},
/** 格式化字段 */
fieldFormatter(row, column) {
// if (column.property === "state") {
// return { 0: "", 2: "" }[row[column.property]];
// }
if (
column.property == "settleInputDate" ||
column.property == "settleDate"
) {
var date = row[column.property];
if (date == undefined) {
return "";
}
return moment(date).format("YYYY-MM-DD HH:mm:ss");
}
return row[column.property] || "--";
},
importExcelData() {
this.getVersionInfo();
this.listLoading = false;
//
this.showExcelImport = false;
},
getList() {
this.listLoading = true;
this.listQuery.SkipCount = (this.page - 1) * 10;
if (this.versionValue != "") {
this.listQuery.version = this.versionValue;
}
console.log("列表查询条件:" + JSON.stringify(this.listQuery));
this.$axios
.posts("/api/settleaccount/HQMPlatform/list", this.listQuery)
.then((response) => {
this.list = response.items;
this.totalCount = response.totalCount;
setTimeout(() => {
//
this.listLoading = false;
}, 500);
})
.catch(() => {
this.listLoading = false;
});
},
fetchData(id) {
//
this.$axios
.gets("/api/settleaccount/HQMPlatform/" + id)
.then((response) => {
this.form = response;
});
},
/** 筛选操作 */
handleFilter() {
this.page = 1;
this.getList();
this.listQuery.Filters = [];
if (this.searchContent != "") {
var column = "purchaseOrderNo";
let filter = {
logic: 0,
column: column,
action: 0,
value: this.searchContent,
};
this.listQuery.Filters.push(filter);
}
this.getList();
},
/** 多项筛选操作 */
/** 筛选操作 */
handleFilters(data) {
if (data === null) {
this.listQuery.Filters = [];
this.getList(); //
} else {
this.filterObj = data;
console.log("筛选" + JSON.stringify(data));
var offsetHei = document.documentElement.clientHeight;
var removeHeight = Object.keys(this.filterObj).length > 0 ? 310 : 240;
this.tableHeight = offsetHei - removeHeight;
this.currentPage = 1;
let Filter = [];
data.forEach((item) => {
let filter = {};
if (item.formType === "datetime" || item.formType === "datetime") {
// (datetime >= a and datetime <=b)
filter["Column"] = item.fieldName;
filter["Logic"] = 0;
filter["Value"] = item.value[0];
filter["Action"] = item.action;
Filter.push(filter);
if (item.value[1] != null) {
filter["Value"] = item.value[1];
filter["Action"] = 5;
Filter.push(filter);
}
} else {
filter["Column"] = item.fieldName;
filter["Value"] = item.value;
filter["Logic"] = 0;
filter["Action"] = item.action;
Filter.push(filter);
}
});
console.log("筛选条件" + JSON.stringify(Filter));
this.listQuery.Filters = Filter;
this.getList();
}
},
resetQuery() {},
sortChange(data) {
const { prop, order } = data;
if (!prop || !order) {
this.handleFilter();
return;
}
this.listQuery.Sorting = prop + " " + order;
console.log(this.listQuery.Sorting);
this.handleFilter();
},
handleSelectionChange(val) {
this.multipleSelection = val;
},
/** 通过回调控制style */
cellStyle({ row, column, rowIndex, columnIndex }) {
// if (column.property === "qty") {
// return { textAlign: "right" };
// } else {
// return { textAlign: "left" };
// }
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);
},
},
};
</script>
<style lang="scss" scoped>
@import "../../../styles/crmtable.scss";
</style>
<style lang="scss">
.el-table .cell.el-tooltip {
white-space: pre-wrap;
}
</style>

6
vue/static/config.js

@ -2,8 +2,8 @@ let configJSON
if (process.env.NODE_ENV === 'development') {
configJSON = {
base: {
ip: 'http://192.168.0.63',
//ip: 'http://192.168.0.140',
//ip: 'http://192.168.0.63',
ip: 'http://192.168.0.140',
//ip: 'http://149.223.116.5',
auth_port: '8066',
public_port: '8092',
@ -37,7 +37,7 @@ if (process.env.NODE_ENV === 'development') {
configJSON = {
base: {
ip: 'http://192.168.0.63',
ip: 'http://192.168.0.67',
//ip: 'http://192.168.0.140',
//ip: 'http://149.223.116.5',
//ip: 'http://114.116.225.148',

173
vue/static/tableFieldForSearch.json

@ -2773,5 +2773,178 @@
"setting": []
}
]
},
"hqHPlatform": {
"id": "36",
"data": [
{
"fieldId": 3,
"formType": "text",
"name": "采购订单号",
"type": 1,
"value": "",
"fieldType": 1,
"fieldName": "purchaseOrderNo",
"setting": []
},
{
"fieldId": 5,
"formType": "text",
"name": "物料代码",
"type": 1,
"value": "",
"fieldType": 1,
"fieldName": "materialCode",
"setting": []
},
{
"fieldId": 5,
"formType": "text",
"name": "科目号",
"type": 1,
"value": "",
"fieldType": 1,
"fieldName": "accountNum",
"setting": []
},
{
"fieldId": 5,
"formType": "text",
"name": "交货单号",
"type": 1,
"value": "",
"fieldType": 1,
"fieldName": "deliveryOrderNo",
"setting": []
},
{
"fieldId": 5,
"formType": "text",
"name": "工厂",
"type": 1,
"value": "",
"fieldType": 1,
"fieldName": "factory",
"setting": []
},
{
"fieldId": 5,
"formType": "text",
"name": "工厂名称",
"type": 1,
"value": "",
"fieldType": 1,
"fieldName": "factoryName",
"setting": []
}
]
},
"hqMPlatform": {
"id": "36",
"data": [
{
"fieldId": 3,
"formType": "text",
"name": "采购订单号",
"type": 1,
"value": "",
"fieldType": 1,
"fieldName": "purchaseOrderNo",
"setting": []
},
{
"fieldId": 5,
"formType": "text",
"name": "物料代码",
"type": 1,
"value": "",
"fieldType": 1,
"fieldName": "materialCode",
"setting": []
},
{
"fieldId": 5,
"formType": "text",
"name": "科目号",
"type": 1,
"value": "",
"fieldType": 1,
"fieldName": "accountNum",
"setting": []
},
{
"fieldId": 5,
"formType": "text",
"name": "交货单号",
"type": 1,
"value": "",
"fieldType": 1,
"fieldName": "deliveryOrderNo",
"setting": []
},
{
"fieldId": 5,
"formType": "text",
"name": "工厂",
"type": 1,
"value": "",
"fieldType": 1,
"fieldName": "factory",
"setting": []
},
{
"fieldId": 5,
"formType": "text",
"name": "工厂名称",
"type": 1,
"value": "",
"fieldType": 1,
"fieldName": "factoryName",
"setting": []
}
]
},
"vwOutOrder": {
"id": "36",
"data": [
{
"fieldId": 3,
"formType": "text",
"name": "零件号",
"type": 1,
"value": "",
"fieldType": 1,
"fieldName": "materialCode",
"setting": []
},
{
"fieldId": 5,
"formType": "text",
"name": "物料组",
"type": 1,
"value": "",
"fieldType": 1,
"fieldName": "materialGroup",
"setting": []
},
{
"fieldId": 2,
"formType": "select",
"isNull": 0,
"name": "状态",
"options": "",
"type": 3,
"value": "",
"fieldType": 0,
"fieldName": "state",
"setting": [
"未处理,0",
"申请出库,1",
"确认出库,2",
"不能出库,3",
"取消出库,4"
]
}
]
}
}
Loading…
Cancel
Save