Administrator 3 years ago
parent
commit
b0653c975d
  1. 4
      src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/appsettings.Development.json
  2. 4
      src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/appsettings.json
  3. 4
      src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/Boms/ImportBomDto.cs
  4. 9
      src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/Invoices/InvoiceDtoBase.cs
  5. 3
      src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWKanBan/VWKanBanDto.cs
  6. 4
      src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWKanBan/VWKanBanImportDto.cs
  7. 2
      src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWScrapClaims/IScrapClaimsAppService.cs
  8. 3
      src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWScrapClaims/ScrapClaimsDto.cs
  9. 2
      src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWScrapClaims/ScrapClaimsImportDto.cs
  10. 3
      src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWSparePart/SparePartDto.cs
  11. 8
      src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWSparePart/SparePartImportDto.cs
  12. 18
      src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Invoices/InvoiceAppService.cs
  13. 6
      src/Modules/SettleAccount/src/SettleAccount.Application/Entities/VWScrapClaims/ScrapClaimsAppService.cs
  14. 2
      src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccount.Application.xml
  15. 204
      src/Modules/SettleAccount/src/SettleAccount.Job/Services/UnSettleAccount/UnSettleAccountImportService.cs
  16. 16
      vue/src/components/ImportExcel-base/index.vue
  17. 35
      vue/src/components/ImportExcel-vw/index.vue
  18. 7
      vue/src/router/index.js
  19. 62
      vue/src/router/modules/basedata.js
  20. 2
      vue/src/router/modules/fis.js
  21. 66
      vue/src/router/modules/vwFisData.js
  22. 25
      vue/src/router/modules/vwKBdata.js
  23. 2
      vue/src/settings.js
  24. 6
      vue/src/views/login/index.vue
  25. 213
      vue/src/views/ux/basedata/Invoice/index.vue
  26. 591
      vue/src/views/ux/vw/dataInput/ScrapClaims/index.vue
  27. 641
      vue/src/views/ux/vw/dataInput/SparePart/index.vue
  28. 572
      vue/src/views/ux/vw/dataInput/r3-open/index.vue
  29. 182
      vue/src/views/ux/vw/dataInput/r3/index.vue
  30. 610
      vue/src/views/ux/vw/dataInput/vwKanBan/index.vue
  31. 5
      vue/static/config.js
  32. 261
      vue/static/tableFieldForSearch.json

4
src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/appsettings.Development.json

@ -2,6 +2,10 @@
"App": {
"CorsOrigins": "https://*.abc.com,http://localhost:9528,http://149.223.116.5:8088"
},
//"ConnectionStrings": {
// "Default": "Server=LAPTOP-V3U07C2O;Database=ABP;user id=sa;Password=1q2w!@#",
// "SettleAccountService": "Server=LAPTOP-V3U07C2O;Database=SettleAccountService;user id=sa;Password=1q2w!@#;"
//},
"ConnectionStrings": {
"Default": "Server=192.168.0.140;Database=ABP;user id=sa;Password=Microsoft2008",
"SettleAccountService": "Server=192.168.0.140;Database=SettleAccountService;user id=sa;Password=Microsoft2008;"

4
src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/appsettings.json

@ -2,6 +2,10 @@
"App": {
"CorsOrigins": "https://*.abc.com,http://localhost:9528,http://149.223.116.5:8088"
},
//"ConnectionStrings": {
// "Default": "Server=LAPTOP-V3U07C2O;Database=ABP;user id=sa;Password=1q2w!@#",
// "SettleAccountService": "Server=LAPTOP-V3U07C2O;Database=SettleAccountService;user id=sa;Password=1q2w!@#;"
//},
"ConnectionStrings": {
"Default": "Server=192.168.0.140;Database=ABP;user id=sa;Password=Microsoft2008",
"SettleAccountService": "Server=192.168.0.140;Database=SettleAccountService;user id=sa;Password=Microsoft2008;"

4
src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/Boms/ImportBomDto.cs

@ -37,7 +37,7 @@ namespace Win.Sfs.SettleAccount.Boms
//[MaxLength(CommonConsts.MaxNameLength, ErrorMessage = "{0}最多输入{1}个字符")]
//public string Name { get; set; }
[ImporterHeader(Name = "父物料号")]
[ImporterHeader(Name = "父物料号", FixAllSpace = true)]
[Required(ErrorMessage = "{0}是必填项")]
[MaxLength(CommonConsts.MaxNameLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string ParentItemCode { get; set; }
@ -49,7 +49,7 @@ namespace Win.Sfs.SettleAccount.Boms
public string ParentItemDesc { get; set; }
[ImporterHeader(Name = "组件")]
[ImporterHeader(Name = "组件", FixAllSpace = true)]
[Required(ErrorMessage = "{0}是必填项")]
[MaxLength(CommonConsts.MaxNameLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string ChildItemCode { get; set; }

9
src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/Invoices/InvoiceDtoBase.cs

@ -24,7 +24,7 @@ namespace Win.Sfs.SettleAccount.Entities.Invoices
/// <summary>
///零件号
/// </summary>
[ImporterHeader(Name = "零件号")]
[ImporterHeader(Name = "零件号", FixAllSpace = true)]
public string MaterialCode { get; set; }
/// <summary>
///零件名称
@ -242,7 +242,7 @@ namespace Win.Sfs.SettleAccount.Entities.Invoices
/// <summary>
///零件号
/// </summary>
[ImporterHeader(Name = "零件号")]
[ImporterHeader(Name = "零件号", FixAllSpace = true)]
public string MaterialCode { get; set; }
/// <summary>
///零件名称
@ -322,7 +322,12 @@ namespace Win.Sfs.SettleAccount.Entities.Invoices
//public string Accounting { get; set; }
//[Display(Name = "记账日期")]
//public DateTime AccountDate { get; set; }
public virtual Guid ParentId { get; set; }
public virtual Guid BranchId { get; set; }
public virtual Guid UserId { get; set; }
public virtual int FileType { get; set; }
public string Site { get; set; }

3
src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWKanBan/VWKanBanDto.cs

@ -9,6 +9,9 @@ using Win.Sfs.Shared.DtoBase;
namespace Win.Sfs.SettleAccount.Entities.VWKanBan
{
/// <summary>
/// 大众看板结算
/// </summary>
public class VWKanBanDto: AuditedEntityDtoBase<Guid>
{
/// <summary>

4
src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWKanBan/VWKanBanImportDto.cs

@ -26,7 +26,7 @@ namespace Win.Sfs.SettleAccount.Entities.VWKanBan
/// <summary>
///看板条码号
/// </summary>
[ImporterHeader(Name = "看板条码号")]
[ImporterHeader(Name = "看板条码号", FixAllSpace = true)]
public string Kanban { set; get; }
/// <summary>
@ -42,7 +42,7 @@ namespace Win.Sfs.SettleAccount.Entities.VWKanBan
/// <summary>
/// 零件号
/// </summary>
[ImporterHeader(Name = "零件号")]
[ImporterHeader(Name = "零件号", FixAllSpace = true)]
public virtual string MaterialCode { set; get; }
/// <summary>
/// 零件类型

2
src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWScrapClaims/IScrapClaimsAppService.cs

@ -43,7 +43,7 @@ namespace Win.Sfs.SettleAccount.Entities.VWScrapClaims
/// <param name="input">请求条件</param>
/// <returns>实体DTO列表</returns>
Task<PagedResultDto<ScrapClaimsDto>> GetListAsync(Guid parentId, ScrapClaimsRequestDto input);
Task<PagedResultDto<ScrapClaimsDto>> GetListAsync(ScrapClaimsRequestDto input);

3
src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWScrapClaims/ScrapClaimsDto.cs

@ -7,6 +7,9 @@ using Win.Sfs.Shared.DtoBase;
namespace Win.Sfs.SettleAccount.Entities.VWScrapClaims
{
/// <summary>
/// CP7报废和索赔
/// </summary>
public class ScrapClaimsDto : AuditedEntityDtoBase<Guid>
{
/// <summary>

2
src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWScrapClaims/ScrapClaimsImportDto.cs

@ -30,7 +30,7 @@ namespace Win.Sfs.SettleAccount.Entities.VWScrapClaims
/// <summary>
/// 零件号
/// </summary>
[ImporterHeader(Name = "零件号")]
[ImporterHeader(Name = "零件号", FixAllSpace = true)]
public virtual string MaterialCode { set; get; }
/// <summary>
/// 零件类型

3
src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWSparePart/SparePartDto.cs

@ -7,6 +7,9 @@ using Win.Sfs.Shared.DtoBase;
namespace Win.Sfs.SettleAccount.Entities.VWSparePart
{
/// <summary>
/// 大众备件结算明细DTO
/// </summary>
public class SparePartDto : AuditedEntityDtoBase<Guid>
{
/// <summary>

8
src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWSparePart/SparePartImportDto.cs

@ -26,7 +26,7 @@ namespace Win.Sfs.SettleAccount.Entities.VWSparePart
/// <summary>
/// 采购订单号
/// </summary>
[ImporterHeader(Name = "采购订单号")]
[ImporterHeader(Name = "采购订单号", FixAllSpace = true)]
public string PurchaseOrderNo { get; set; }
/// <summary>
/// 采购订单行项目
@ -62,12 +62,12 @@ namespace Win.Sfs.SettleAccount.Entities.VWSparePart
/// <summary>
/// 科目号
/// </summary>
[ImporterHeader(Name = "科目号")]
[ImporterHeader(Name = "科目号", FixAllSpace = true)]
public string AccountNum { get; set; }
/// <summary>
/// 物料代码
/// </summary>
[ImporterHeader(Name = "物料代码")]
[ImporterHeader(Name = "物料代码", FixAllSpace = true)]
public string MaterialCode { get; set; }
/// <summary>
/// 物料描述
@ -82,7 +82,7 @@ namespace Win.Sfs.SettleAccount.Entities.VWSparePart
/// <summary>
/// 交货单号
/// </summary>
[ImporterHeader(Name = "交货单号")]
[ImporterHeader(Name = "交货单号", FixAllSpace = true)]
public string DeliveryOrderNo { get; set; }
/// <summary>
/// 交货行号

18
src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Invoices/InvoiceAppService.cs

@ -326,6 +326,7 @@ namespace Win.Sfs.SettleAccount.Entities.Invoices
//[Authorize(SettleAccountPermissions.Invoices.Default)]
virtual public async Task<string> ExportAsync(InvoiceRequestDto input)
{
IExporter _csv = new CsvExporter();
IExporter _excel = new ExcelExporter();
if (!string.IsNullOrEmpty(input.Version))
@ -337,13 +338,24 @@ namespace Win.Sfs.SettleAccount.Entities.Invoices
var dtoDetails = ObjectMapper.Map<List<Invoice>, List<InvoiceTHExportDto>>(entities);
string _fileName = string.Empty;
//声明导出容器
byte[] result = null;
string _fileName = string.Format("大众发票汇总_{0}.xlsx", _snowflakeIdGenerator.Create().ToString());
result = await _excel.ExportAsByteArray(dtoDetails);
switch (input.FileType)
{
case 0:
_fileName = string.Format("大众发票汇总_{0}.csv", input.UserId.ToString());
result = await _csv.ExportAsByteArray(dtoDetails);
break;
case 1:
_fileName = string.Format("大众发票汇总_{0}.xlsx", input.UserId.ToString());
result = await _excel.ExportAsByteArray(dtoDetails);
break;
}
//string _fileName = string.Format("大众发票汇总_{0}.xlsx", _snowflakeIdGenerator.Create().ToString());
//result = await _excel.ExportAsByteArray(dtoDetails);
result.ShouldNotBeNull();

6
src/Modules/SettleAccount/src/SettleAccount.Application/Entities/VWScrapClaims/ScrapClaimsAppService.cs

@ -208,11 +208,11 @@ namespace Win.Sfs.SettleAccount.Entities.VWScrapClaims
[HttpPost]
[Route("list")]
//[Authorize(SettleAccountPermissions.SettleAccounts.Default)]
virtual public async Task<PagedResultDto<ScrapClaimsDto>> GetListAsync(Guid id, ScrapClaimsRequestDto input)
virtual public async Task<PagedResultDto<ScrapClaimsDto>> GetListAsync(ScrapClaimsRequestDto input)
{
if (input.ParentId != Guid.Empty)
if (!string.IsNullOrEmpty(input.Version))
{
input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "ParentId", Logic = EnumFilterLogic.And, Value = input.ParentId.ToString() });
input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "Version", Logic = EnumFilterLogic.And, Value = input.Version });
}
else
{

2
src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccount.Application.xml

@ -1616,7 +1616,7 @@
<param name="input"></param>
<returns></returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.VWScrapClaims.ScrapClaimsAppService.GetListAsync(System.Guid,Win.Sfs.SettleAccount.Entities.VWScrapClaims.ScrapClaimsRequestDto)">
<member name="M:Win.Sfs.SettleAccount.Entities.VWScrapClaims.ScrapClaimsAppService.GetListAsync(Win.Sfs.SettleAccount.Entities.VWScrapClaims.ScrapClaimsRequestDto)">
<summary>
根据筛选条件获取实体列表
</summary>

204
src/Modules/SettleAccount/src/SettleAccount.Job/Services/UnSettleAccount/UnSettleAccountImportService.cs

@ -1,5 +1,6 @@
using Magicodes.ExporterAndImporter.Core;
using Magicodes.ExporterAndImporter.Excel;
using SettleAccount.Job.Services;
using System;
using System.Collections.Generic;
using System.IO;
@ -10,7 +11,7 @@ using TaskJob.EventArgs;
using TaskJob.Interfaces;
using Volo.Abp.DependencyInjection;
using Win.Sfs.SettleAccount.Entities.SettleAccounts;
using Win.Sfs.SettleAccount.ExportReports;
using Win.Sfs.SettleAccount.Repository.SettleAccount;
namespace TaskJob.Services
@ -22,13 +23,16 @@ namespace TaskJob.Services
{
private readonly UnSettleAccountRepository _repository;
private readonly UnSettleAccountVersionRepository _versionRepository;
private readonly InputService _inputService;
public UnSettleAccountImportService(
InputService inputService,
UnSettleAccountRepository repository,
UnSettleAccountVersionRepository versionRepository
)
{
_repository = repository;
_versionRepository = versionRepository;
_inputService = inputService;
}
public string ImportFile(Guid id, List<string> fileName, List<string> realfileName, List<CustomCondition> customConditions)
@ -37,91 +41,59 @@ namespace TaskJob.Services
string fileSavePath = Environment.CurrentDirectory + @"\wwwroot\files\host\my-file-container\";
var version = customConditions.Where(p => p.Name == "Version").FirstOrDefault().Value;
var customerCode = customConditions.Where(p => p.Name == "CustomerCode").FirstOrDefault().Value;
var year = customConditions.Where(p => p.Name == "Year").FirstOrDefault().Value;
var period = customConditions.Where(p => p.Name == "Period").FirstOrDefault().Value;
var factory = customConditions.Where(p => p.Name == "Factory").FirstOrDefault().Value;
//_versionRepository.Delete(version);
//_repository.Delete(version);
var _id = Guid.NewGuid();
foreach (var itm in fileName)
{
try
{
var filePath = fileSavePath + itm;//获取到导入的excel
var exten = Path.GetExtension(fileSavePath);
List<UnSettleAccount> _setls = new List<UnSettleAccount>();
List<string> _errorList = new List<string>();
var _id = Guid.NewGuid();
//var checkList = new List<ErrorExportDto>();
//var _chList = await _relrepository.GetAllAsync(GuidGenerator.Create(), true);
//var _chls = _chList.Select(p => p.SettleMaterialCode).Distinct();
var checkList = new List<ErrorExportDto>();
List<string> _precodeList = new List<string>();//
using (TextReader textReader = new StreamReader(filePath))
{
int i = 0;
while (true)
var errorlist = new List<ErrorExportDto>();
var dtoList = _inputService.Input<UnSettleAccountImportDto>(filePath, null, errorlist);
foreach (var dto in dtoList)
{
if (dto.KENNCode.Length == 6)
{
string str = textReader.ReadLine();
if (string.IsNullOrEmpty(str))
{
break;
}
else
{
try
{
var _lst = str.Split(new char[] { '|' }).ToList();
string _settleyear = _lst[1].Trim();
string _kENNCode = _lst[2].Trim();
string _chassisNumber = _lst[3].Trim();
string _model = _lst[4].Trim();
DateTime _cP5A = DateTime.Parse(_lst[5].Trim());
DateTime _cP7 = DateTime.Parse(_lst[6].Trim());
string _materialCode = _lst[7].Trim();
decimal _qty = decimal.Parse(_lst[8].Trim());
string _reason = (!string.IsNullOrEmpty(_lst[9])) ? _lst[9].Trim() : string.Empty;
//string _settlementID = _lst[10].Trim();
//string _settlementSupplier = _lst[12].Trim();
_setls.Add(new UnSettleAccount(
Guid.NewGuid(),
Guid.NewGuid(),
_settleyear,
_kENNCode,
_chassisNumber,
_model,
_cP5A,
_cP7,
_materialCode,
_qty,
string.Empty,
string.Empty,
//,
//,
DateTime.Now.Year.ToString(),
DateTime.Now.Month.ToString(),
_id,
version,
DateTime.Now,
Guid.NewGuid(),
_reason
));
}
catch
{
}
}
i++;
dto.KENNCode = "0" + dto.KENNCode;
}
textReader.Close();
var _settleaccount = new UnSettleAccount(Guid.NewGuid(), Guid.NewGuid(), dto.SettleYear, dto.KENNCode,
dto.ChassisNumber, dto.Model, dto.CP5A, dto.CP7,
dto.MaterialCode, dto.Qty, string.Empty, string.Empty,
DateTime.Now.Year.ToString(), DateTime.Now.Month.ToString(),_id, version, DateTime.Now, Guid.NewGuid(),dto.UnsettledReason);
_setls.Add(_settleaccount);
}
var _ls = _setls;
var _ls = _setls;
var a = _ls.Where(p => string.IsNullOrEmpty(p.KENNCode));
var query = from arc in _ls
group arc by new { arc.ChassisNumber, arc.MaterialCode }
into g
group arc by new { arc.ChassisNumber, arc.MaterialCode } into g
where g.Count() > 1
select g;
_repository.Insert(_setls);
_versionRepository.Insert(version, customerCode, customerCode);
#region
//var errorFileName = "错误文件.xlsx";
//checkList.Add(new ErrorExportDto(version, customerCode, string.Empty, string.Empty, string.Empty, string.Empty, string.Format("ERP物料号{0}底盘号 {1}有重复", "11111111111", "22222222222"), string.Empty));
//_service.ExportError<ErrorExportDto>(id,errorFileName, checkList);
#endregion
}
catch (Exception e)
{
@ -130,5 +102,105 @@ namespace TaskJob.Services
}
return id.ToString();
}
//public string ImportFile(Guid id, List<string> fileName, List<string> realfileName, List<CustomCondition> customConditions)
//{
// IExporter _excel = new ExcelExporter();
// string fileSavePath = Environment.CurrentDirectory + @"\wwwroot\files\host\my-file-container\";
// var version = customConditions.Where(p => p.Name == "Version").FirstOrDefault().Value;
// var customerCode = customConditions.Where(p => p.Name == "CustomerCode").FirstOrDefault().Value;
// foreach (var itm in fileName)
// {
// try
// {
// var filePath = fileSavePath + itm;//获取到导入的excel
// List<UnSettleAccount> _setls = new List<UnSettleAccount>();
// List<string> _errorList = new List<string>();
// var _id = Guid.NewGuid();
// //var checkList = new List<ErrorExportDto>();
// //var _chList = await _relrepository.GetAllAsync(GuidGenerator.Create(), true);
// //var _chls = _chList.Select(p => p.SettleMaterialCode).Distinct();
// List<string> _precodeList = new List<string>();//
// using (TextReader textReader = new StreamReader(filePath))
// {
// int i = 0;
// while (true)
// {
// string str = textReader.ReadLine();
// if (string.IsNullOrEmpty(str))
// {
// break;
// }
// else
// {
// try
// {
// var _lst = str.Split(new char[] { '|' }).ToList();
// string _settleyear = _lst[1].Trim();
// string _kENNCode = _lst[2].Trim();
// string _chassisNumber = _lst[3].Trim();
// string _model = _lst[4].Trim();
// DateTime _cP5A = DateTime.Parse(_lst[5].Trim());
// DateTime _cP7 = DateTime.Parse(_lst[6].Trim());
// string _materialCode = _lst[7].Trim();
// decimal _qty = decimal.Parse(_lst[8].Trim());
// string _reason = (!string.IsNullOrEmpty(_lst[9])) ? _lst[9].Trim() : string.Empty;
// //string _settlementID = _lst[10].Trim();
// //string _settlementSupplier = _lst[12].Trim();
// _setls.Add(new UnSettleAccount(
// Guid.NewGuid(),
// Guid.NewGuid(),
// _settleyear,
// _kENNCode,
// _chassisNumber,
// _model,
// _cP5A,
// _cP7,
// _materialCode,
// _qty,
// string.Empty,
// string.Empty,
// //,
// //,
// DateTime.Now.Year.ToString(),
// DateTime.Now.Month.ToString(),
// _id,
// version,
// DateTime.Now,
// Guid.NewGuid(),
// _reason
// ));
// }
// catch
// {
// }
// }
// i++;
// }
// textReader.Close();
// }
// var _ls = _setls;
// var query = from arc in _ls
// group arc by new { arc.ChassisNumber, arc.MaterialCode }
// into g
// where g.Count() > 1
// select g;
// _repository.Insert(_setls);
// _versionRepository.Insert(version, customerCode, customerCode);
// }
// catch (Exception e)
// {
// throw e;
// }
// }
// return id.ToString();
//}
}
}

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

@ -53,7 +53,6 @@
:value="item.value"
></el-option>
</el-select>
</div>
</div>
<div class="sections">
@ -290,7 +289,7 @@ export default {
this.isEditYearMont = true;
this.isEditFactory = true;
this.isState = false;
} else {
} else {
this.isEditYearMont = false;
this.isEditFactory = false;
}
@ -298,11 +297,16 @@ export default {
crmTypeName() {
return (
{
invoice: "大众发票汇总",
vWKanBan: "大众看板结算明细",
scrapClaims: "CP7报废和索赔",
sparePart: "大众备件结算明细",
bomdatabase: "产品结构BOM",
prebatch: "预批量",
secondaryPriceRatio: "二配结算价格比例",
factory: "工厂设置",
// materialRelation: "",
// materialRelation: "",
carMaterialConfig: "车型代码与零件匹配",
materialRelationSupplier: "供应商零件设置表",
material: "物料主数据",
@ -319,6 +323,11 @@ export default {
getWebApi() {
return (
{
invoice: "/api/settleaccount/Invoices/ExcelImport", //
vWKanBan: "/api/settleaccount/VWKanBan/ExcelImport", //
scrapClaims: "/api/settleaccount/ScrapClaims/ExcelImport", //CP7
sparePart: "/api/settleaccount/SparePart/ExcelImport", //
bomdatabase: "/api/settleaccount/bom/ExcelImport",
prebatch: "/api/settleaccount/Prebatch/ExcelImport",
secondaryPriceRatio:
@ -347,6 +356,7 @@ export default {
//
return (
{
invoice: "大众发票汇总导入.xlsx",
bomdatabase: "产品结构Bom导入模板.xlsx",
secondaryPriceRatio: "二配价格比例导入模板.xlsx",
factory: "工厂设置模板.xlsx",

35
vue/src/components/ImportExcel-vw/index.vue

@ -339,24 +339,16 @@ export default {
crmTypeName() {
return (
{
bomdatabase: "产品结构BOM",
settleAccount: "结算数据",
material: "物料主数据",
ItemInvoicePrice:"QAD出库账单",
materialRelation: "总成与结算件关系",
settleAccount: "大众已结算数据",
unSettleAccount: "大众未结数据",
}[this.crmType] || ""
);
},
getWebApi() {
return (
{
settleAccount: "/api/settleaccount/SettleAccount/ExcelImport-TH",
bomdatabase: "/api/settleaccount/Material/ExcelImport-TH",
material: "/api/settleaccount/Material/ExcelImport-TH",
ItemInvoicePrice: "/api/settleaccount/ItemInvoicePrice/ExcelImport",
materialRelation:
"/api/settleaccount/EstimatedInventoryDetail/ExcelImport-TH",
settlementCrossReference:"/api/settleaccount/SettlementCrossReference/ExcelImport",
settleAccount: "/api/settleaccount/SettleAccount/ExcelImport-PG",
unSettleAccount: "/api/settleaccount/UnSettleAccount/ExcelImport",
}[this.crmType] || ""
);
},
@ -553,25 +545,6 @@ export default {
",请在后台作业监控界面中查看进度!";
this.stepsActive = 4;
}
// if (res === "Success") {
// if (this.isLt2M === "1" && this.isFileType === "1") {
// this.$notify({
// title: "",
// message: "",
// type: "success",
// duration: 2000,
// });
// this.stepList[1].status = "finish";
// this.resultData.successMessage = "";
// this.stepsActive = 4;
// }
// } else {
// this.stepList[0].status = "wait";
// this.resultData.errTemplate = res; //
// this.resultData.errSize = 1; //0
// this.resultData.successMessage = "";
// this.stepsActive = 3;
// }
console.log(this.stepsActive);
this.$emit("status", "finish");
// this.$nextTick(() => {

7
vue/src/router/index.js

@ -16,7 +16,7 @@ import vwFisDataRouter from './modules/vwFisData'
import wheeldataRouter from './modules/wheeldata'
import vwNoBarcodeRouter from './modules/vwKBNoBarcodedata'
import JobTimeDataRouter from './modules/jobtimedata'
import newjitRouter from './modules/newjit-basedata'
//import newjitRouter from './modules/newjit-basedata'
import pgfis from './modules/fis'
/**
@ -169,12 +169,13 @@ export const asyncRoutes = [
managerRouter,//系统首页
personRouter,//系统管理
basedataRouter,//基础数据维护
newjitRouter,//FIS数据管理
//newjitRouter,//FIS数据管理
vwFisDataRouter,//结算与开票数据导入
billdataRouter,//销售结算与开票报表
pgfis,//派格fis
//wheeldataRouter,//二配
JobTimeDataRouter,//后台作业监控
pgfis,//派格fis
// 404 page must be placed at the end !!!
{ path: '*', redirect: '/404', hidden: true }

62
vue/src/router/modules/basedata.js

@ -38,16 +38,16 @@ const basedataRouter = {
name: 'codeSetting',//命名路由
meta: { title: '通用代码设置', roles: ['SettleAccount.CodeSettings'], icon: '通用' }
},
{
path: '/settlementParts',
component: () => import('@/views/ux/basedata/settlementParts/index'),
name: 'settlementParts',//命名路由
meta: {
title: '结算件基本信息',
roles: ['SettleAccount.SettlementParts'],
icon: '零件'
}
},
// {
// path: '/settlementParts',
// component: () => import('@/views/ux/basedata/settlementParts/index'),
// name: 'settlementParts',//命名路由
// meta: {
// title: '结算件基本信息',
// roles: ['SettleAccount.SettlementParts'],
// icon: '零件'
// }
// },
{
path: '/partsSettlement',
component: () => import('@/views/ux/basedata/partsSettlement/index'),
@ -73,33 +73,33 @@ const basedataRouter = {
component: () => import('@/views/ux/basedata/Prebatch/index'),
name: 'Prebatch',//命名路由
meta: {
title: '预批量数据导入',
title: '客户信息管理',
roles: ['SettleAccount.Prebatchs'],
icon: '批量'
}
},
{
path: 'bomdatabase',
component: () => import('@/views/ux/basedata/bomdatabase/index'),
name: 'Bomdatabase',//命名路由
meta: {
title: 'BOM',
roles: ['SettleAccount.Boms'],
icon: '未结算'
}
},
// {
// path: 'bomdatabase',
// component: () => import('@/views/ux/basedata/bomdatabase/index'),
// name: 'Bomdatabase',//命名路由
// meta: {
// title: 'BOM',
// roles: ['SettleAccount.Boms'],
// icon: '未结算'
// }
// },
{
path: '/settlementPakAndSparePartsRef',
component: () => import('@/views/ux/basedata/settlementPakAndSparePartsRef/index'),
name: 'settlementPakAndSparePartsRef',//命名路由
meta: {
title: '结算包与散件对应关系',
roles: ['SettleAccount.Boms'],
icon: '零件'
}
},
// {
// path: '/settlementPakAndSparePartsRef',
// component: () => import('@/views/ux/basedata/settlementPakAndSparePartsRef/index'),
// name: 'settlementPakAndSparePartsRef',//命名路由
// meta: {
// title: '结算包与散件对应关系',
// roles: ['SettleAccount.Boms'],
// icon: '零件'
// }
// },
]
}

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

@ -9,7 +9,7 @@ const pgfis = {
name: 'pgfis',
meta: {
//requiresAuth: true,
title: '派格fis',
title: 'JIT数据管理',
index: 0,
type: 'crm',
icon: '业务',

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

@ -2,14 +2,14 @@
import Layout from '@/layout'
const vwFisDataRouter = {
path: '/jskp',
path: '/pg',
component: Layout,
redirect: 'jskp',
redirect: 'pg',
name: '业务数据',
//hidden: true,
meta: {
//requiresAuth: true,
title: '结算与开票数据导入',
title: '大众结算与开票数据导入',
index: 0,
type: 'crm',
icon: '单据导入',
@ -18,10 +18,20 @@ const vwFisDataRouter = {
children: [
{
path: '/settleAccount',
component: () => import('@/views/ux/vw/dataInput/r3-open'),
name: 'SettleAccount',//命名路由
meta: {
title: 'FIS未结算数据导入',
roles: ['SettleAccount.SettleAccounts'],//控制页面角色(可以设置多个角色)
icon: '结算'
}
},
{
path: '/settleAccount-finish',
component: () => import('@/views/ux/vw/dataInput/r3'),
name: 'SettleAccount',//命名路由
meta: {
title: '结算数据导入',
title: 'FIS已结算数据导入',
roles: ['SettleAccount.SettleAccounts'],//控制页面角色(可以设置多个角色)
icon: '结算'
}
@ -31,53 +41,53 @@ const vwFisDataRouter = {
component: () => import('@/views/ux/basedata/Invoice/index'),
name: 'Invoices',//命名路由
meta: {
title: '开票数据导入',
title: '大众发票汇总导入',
roles: ['SettleAccount.Invoices'],
icon: '对比'
}
},
{
path: 'itemInvoicePrice',
component: () => import('@/views/ux/vw/dataInput/itemInvoicePrice/index'),
name: 'ItemInvoicePrice',//命名路由
path: 'kanBan',
component: () => import('@/views/ux/vw/dataInput/vwKanBan/index'),
name: 'VWKanBan',//命名路由
meta: {
title: 'QAD出库账单导入',
roles: ['SettleAccount.ItemInvoicePrices'],
title: '看板结算明细导入',
//roles: ['SettleAccount.ItemInvoicePrices'],
icon: '发运'
}
},
{
path: '/fis',
component: () => import('@/views/ux/vw/dataInput/fis'),
name: 'FIS',
path: '/scrapClaims',
component: () => import('@/views/ux/vw/dataInput/ScrapClaims'),
name: 'ScrapClaims',
meta: {
title: 'FIS数据查询',
title: 'CP7报废和索赔导入',
roles: ['SettleAccount.FISs'],
icon: '文件'
}
},
{
path: '/SettlementCrossReference',
component: () => import('@/views/ux/vw/dataInput/SettlementCrossReference'),
name: 'SettlementCrossReference',//命名路由
path: '/SparePart',
component: () => import('@/views/ux/vw/dataInput/SparePart'),
name: 'SparePart',//命名路由
meta: {
title: '结算件对照关系',
title: '大众备件结算明细导入',
roles: ['SettleAccount.Boms'],//控制页面角色(可以设置多个角色)
icon: '结算'
}
},
{
path: '/EP',
component: () => import('@/views/ux/vw/dataInput/erpei'),
name: 'ERPEI',//命名路由
meta: {
title: '二配结算表',
roles: ['SettleAccount.Boms'],//控制页面角色(可以设置多个角色)
icon: '结算'
}
},
// {
// path: '/EP',
// component: () => import('@/views/ux/vw/dataInput/erpei'),
// name: 'ERPEI',//命名路由
// meta: {
// title: '二配结算表',
// roles: ['SettleAccount.Boms'],//控制页面角色(可以设置多个角色)
// icon: '结算'
// }
// },
]
}

25
vue/src/router/modules/vwKBdata.js

@ -9,7 +9,7 @@ const billdataRouter = {
//hidden: true,
meta: {
//requiresAuth: true,
title: '销售结算与开票报表',
title: '大众销售结算与开票报表',
index: 0,
type: 'crm',
icon: '销售',
@ -21,7 +21,7 @@ const billdataRouter = {
component: () => import('@/views/ux/billManage/IssuedUnsettled/index'),
name: 'IssuedUnsettled',//命名路由
meta: {
title: '发出未结算报表',
title: '大众准时化未结明细',
roles: ['SettleAccount.Reports'],//控制页面角色(可以设置多个角色)
icon: '报表'
}
@ -31,17 +31,27 @@ const billdataRouter = {
component: () => import('@/views/ux/billManage/settledPartAndErpPartPriceDiff/index'),
name: 'SettledPartAndErpPartPriceDiff',//命名路由
meta: {
title: '总成定价和结算价对比',
title: '大众准时化未结比对',
roles: ['SettleAccount.Reports'],//控制页面角色(可以设置多个角色)
icon: '结算'
}
},
{
path: '/audiAndvw1',
component: () => import('@/views/ux/billManage/audiAndvw'),
name: 'audiAndvw',//命名路由
meta: {
title: '准时化未结差异比对',
roles: ['SettleAccount.Reports'],//控制页面角色(可以设置多个角色)
icon: '售后'
}
},
{
path: '/InvoiceSettledDiff',
component: () => import('@/views/ux/billManage/InvoiceSettledDiff'),
name: 'InvoiceSettledDiff',//命名路由
meta: {
title: '结算与开票数据对比',
title: '发票与结算核对汇总',
roles: ['SettleAccount.Reports'],//控制页面角色(可以设置多个角色)
icon: '结算对比'
}
@ -51,7 +61,7 @@ const billdataRouter = {
component: () => import('@/views/ux/billManage/FisUnSettledDiff'),
name: 'FisUnSettledDiff',//命名路由
meta: {
title: 'ERP总成开票报表',
title: '准时化交货与结算核对',
roles: ['SettleAccount.Reports'],//控制页面角色(可以设置多个角色)
icon: '看板'
}
@ -61,7 +71,7 @@ const billdataRouter = {
component: () => import('@/views/ux/billManage/PriceQtyDiff'),
name: 'PriceQtyDiff',//命名路由
meta: {
title: '价差量差分析报表',
title: '准时化结算数量差异比对',
roles: ['SettleAccount.Reports'],//控制页面角色(可以设置多个角色)
icon: '售后'
}
@ -71,11 +81,12 @@ const billdataRouter = {
component: () => import('@/views/ux/billManage/audiAndvw'),
name: 'audiAndvw',//命名路由
meta: {
title: '二配报表',
title: '准时化结算门板价格差异',
roles: ['SettleAccount.Reports'],//控制页面角色(可以设置多个角色)
icon: '售后'
}
},
]
}

2
vue/src/settings.js

@ -1,5 +1,5 @@
module.exports = {
title: '长春采埃孚富奥结算管理系统',
title: '长春派格汽车塑料技术有限公司结算管理系统',
/**
* @type {boolean} true | false

6
vue/src/views/login/index.vue

@ -1,7 +1,11 @@
<template>
<div class="wrapper">
<div class="left">
<div class="container"><span class="one">闻荫科技-长春派格结算管理系统</span><span class="two"></span></div>
<div class="container"><span class="one">SAS/JIT-长春派格汽车塑料技术有限公司结算管理系统</span><span class="two"></span></div>
<!-- <div class="container"><span class="one">闻荫科技-长春派格结算管理系统</span><span class="two"></span></div> -->
<div class="left-pic"/>
<div class="">
<div class="copyright">

213
vue/src/views/ux/basedata/Invoice/index.vue

@ -16,14 +16,32 @@
@click="handleImportExcel()"
>导入文件Excel
</el-button>
<el-button
<!-- <el-button
class="filter-item"
size="mini"
type="info"
type="primary"
icon="el-icon-download"
@click="handleDownload()"
>导出Excel
</el-button>
</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
@ -123,7 +141,7 @@
<script>
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
import permission from "@/directive/permission/index.js";
import importExcel from "@/components/ImportExcel-invoice";
import importExcel from "@/components/ImportExcel-base";
import CRMTableHead from "../../components/CRMTableHead";
import moment from "moment";
import Lockr from "lockr";
@ -247,30 +265,14 @@ export default {
getDefaultField() {
var tempsTabs = [];
tempsTabs.push({ label: "工厂", prop: "factory", width: 150 });
tempsTabs.push({ label: "物料凭证", prop: "textCode", width: 150 });
tempsTabs.push({ label: "物料号", prop: "materialCode", width: 150 });
tempsTabs.push({
label: "物料描述",
label: "零件名称",
prop: "materialDesc",
width: 280,
});
tempsTabs.push({
label: "入库日期",
prop: "date",
width: 150,
formType: "datetime",
});
tempsTabs.push({ label: "数量", prop: "qty", width: 100 });
tempsTabs.push({ label: "金额", prop: "amt", width: 120 });
tempsTabs.push({ label: "货币", prop: "number", width: 120 });
tempsTabs.push({ label: "工厂名称", prop: "accounting", width: 120 });
tempsTabs.push({
label: "过账日期",
prop: "accountDate",
width: 150,
formType: "datetime",
});
return tempsTabs;
},
MoreTypes() {
@ -281,6 +283,116 @@ export default {
},
},
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("发票导出:" + JSON.stringify(this.listQuery));
this.$axios
.posts("/api/settleaccount/Invoices/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;
});
});
},
//
// async handleDownload() {
// this.listLoading = true;
// if (this.versionValue === "") {
// this.$message.error("");
// this.listLoading = false;
// return;
// }
// if (this.versionValue != "") {
// this.listQuery.version = this.versionValue;
// }
// console.log("" + JSON.stringify(this.listQuery));
// this.$axios
// .posts("/api/settleaccount/Invoices/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;
@ -310,7 +422,7 @@ export default {
}
})
.catch(() => {
//this.listLoading = false;
this.listLoading = false;
});
},
handleImportExcel() {
@ -329,14 +441,6 @@ export default {
if (column.property === "state") {
return { 0: "其他", 2: "已结" }[row[column.property]];
}
if (column.property == "accountDate" || column.property == "date") {
var date = row[column.property];
if (date == undefined) {
return "";
}
//return moment(date).format("YYYY-MM-DD HH:mm:ss");
return moment(date).format("YYYY-MM-DD");
}
return row[column.property] || "--";
},
importExcelData() {
@ -345,54 +449,7 @@ export default {
//
this.showExcelImport = false;
},
//
async handleDownload() {
this.listLoading = true;
if (this.versionValue === "") {
this.$message.error("必需选择版本!");
this.listLoading = false;
return;
}
if (this.versionValue != "") {
this.listQuery.version = this.versionValue;
}
console.log("发票导出:" + JSON.stringify(this.listQuery));
this.$axios
.posts("/api/settleaccount/Invoices/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;
});
});
},
getList() {
this.listLoading = true;
this.listQuery.SkipCount = (this.page - 1) * 10;

591
vue/src/views/ux/vw/dataInput/ScrapClaims/index.vue

@ -0,0 +1,591 @@
<!--CP7和索赔导入功能-->
<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: "ScrapClaims",
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: "scrapClaims",
versionValue: "",
versionList: [], //
rules: {
//
erpMaterialCode: [
{ required: true, message: "必须输入!", trigger: "blur" },
],
},
searchContent: "", //
customerInfo: {
settleAccountId: "",
},
form: {
dicDetailID: "",
customerId: "",
projectId: "",
},
list: null,
totalCount: 0,
listLoading: true,
formLoading: false,
//
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 - 260,
isEdit: false,
};
},
mounted() {
var self = this;
window.onresize = function () {
var offsetHei = document.documentElement.clientHeight;
self.tableHeight = offsetHei - 260;
};
},
created() {
this.getVersionInfo();
if (this.versionList == []) {
this.getList();
}
},
computed: {
/** 列表字段 */
getDefaultField() {
var tempsTabs = [];
tempsTabs.push({ label: "类型(报废和索赔)", prop: "type", width: 170 });
tempsTabs.push({ label: "零件号", prop: "materialCode", width: 220 });
tempsTabs.push({ label: "零件名称", prop: "materialDesc", width: 220 });
tempsTabs.push({ label: "数量", prop: "qty", width: 100 });
tempsTabs.push({ label: "金额", prop: "amt", width: 100 });
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("CP7报废与索赔导出:" + JSON.stringify(this.listQuery));
this.$axios
.posts("/api/settleaccount/ScrapClaims/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;
});
});
},
// //
// async handleDownload() {
// this.listLoading = true;
// if (this.versionValue === "") {
// this.$message.error("");
// this.listLoading = false;
// return;
// }
// if (this.versionValue != "") {
// this.listQuery.version = this.versionValue;
// }
// console.log("" + JSON.stringify(this.listQuery));
// this.$axios
// .posts("/api/settleaccount/ScrapClaims/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/ScrapClaims/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/ScrapClaims/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/ScrapClaims/" + id)
.then((response) => {
this.form = response;
});
},
/** 筛选操作 */
handleFilter() {
this.page = 1;
this.getList();
this.listQuery.Filters = [];
if (this.searchContent != "") {
var column = "materialCode";
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>

641
vue/src/views/ux/vw/dataInput/SparePart/index.vue

@ -0,0 +1,641 @@
<!--大众备件导入功能-->
<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: "SparePart",
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: "sparePart",
versionValue: "",
versionList: [], //
rules: {
//
erpMaterialCode: [
{ required: true, message: "必须输入!", trigger: "blur" },
],
},
searchContent: "", //
customerInfo: {
settleAccountId: "",
},
form: {
dicDetailID: "",
customerId: "",
projectId: "",
},
list: null,
totalCount: 0,
listLoading: true,
formLoading: false,
//
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 - 260,
isEdit: false,
};
},
mounted() {
var self = this;
window.onresize = function () {
var offsetHei = document.documentElement.clientHeight;
self.tableHeight = offsetHei - 260;
};
},
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: 150 });
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("大众看板导出:" + JSON.stringify(this.listQuery));
this.$axios
.posts("/api/settleaccount/SparePart/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;
});
});
},
// //
// async handleDownload() {
// this.listLoading = true;
// if (this.versionValue === "") {
// this.$message.error("");
// this.listLoading = false;
// return;
// }
// if (this.versionValue != "") {
// this.listQuery.version = this.versionValue;
// }
// console.log("" + JSON.stringify(this.listQuery));
// this.$axios
// .posts("/api/settleaccount/SparePart/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/SparePart/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/SparePart/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/SparePart/" + id)
.then((response) => {
this.form = response;
});
},
/** 筛选操作 */
handleFilter() {
this.page = 1;
this.getList();
this.listQuery.Filters = [];
if (this.searchContent != "") {
var column = "materialCode";
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>

572
vue/src/views/ux/vw/dataInput/r3-open/index.vue

@ -0,0 +1,572 @@
<!--R3未结数据-->
<template>
<div class="cr-body-content">
<flexbox class="content-header">
<XhJSSelect
:options="versionList"
style="width: 150px;margin-left:-10px"
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()"
>导出Csv
</el-button>
<el-input
v-model="searchContent"
clearable
size="small"
placeholder="按照零件号搜索..."
style="width: 180px"
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>
<div class="right-container" style="margin-left: 180px">
<el-dropdown
v-if="MoreTypes.length > 0"
trigger="click"
@command="handleTypeDrop"
>
<flexbox class="right-more-item">
<div>更多</div>
<i class="el-icon-arrow-down el-icon--right" style="color: #777" />
</flexbox>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item
v-for="(item, index) in MoreTypes"
:key="index"
:command="item.type"
>{{ item.name }}</el-dropdown-item
>
</el-dropdown-menu>
</el-dropdown>
</div>
</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-vw";
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.vue";
import XhJSSelectVerson from "@/components/CreateCom/Xh-JS-Select-Label.vue";
export default {
name: "UnSettleAccount",
components: {
Pagination,
CRMTableHead,
importExcel,
XhJSSelect,
XhJSSelectVerson,
},
directives: { permission },
filters: {
IsCustomerSignFilter(status) {
//
const statusMap = {
true: "是",
false: "否",
};
return statusMap[status];
},
},
props: {
customerInfos: {
type: Array,
default: () => {
return [];
},
},
},
data() {
return {
crmType: "unSettleAccount",
versionValue: "",
versionValueVerson: "",
versionList: [], //
rules: {
//
erpMaterialCode: [
{ required: true, message: "必须输入!", trigger: "blur" },
],
},
searchContent: "", //
customerInfo: {
settleAccountId: "",
},
form: {
version: "",
dicDetailID: "",
customerId: "",
projectId: "",
},
list: null,
totalCount: 0,
listLoading: true,
formLoading: false,
//
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,
ParentId: "",
fileType: 0,
userId: "00000000-0000-0000-0000-000000000000",
},
listExportQuery: {
Filters: [
{
logic: 0,
column: "Enabled",
action: 0,
value: "true",
}, //
],
//OrgID:"",
SkipCount: 0,
MaxResultCount: 15,
ParentId: "",
fileType: 0,
userId: "",
},
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 - 260;
};
},
created() {
this.getVersionInfo();
//if (this.versionList == []) {
this.getList();
//}
},
computed: {
/** 列表字段 */
getDefaultField() {
var tempsTabs = [];
tempsTabs.push({ label: "KENN号", prop: "kennCode", width: 150 });
tempsTabs.push({ label: "底盘号", prop: "chassisNumber", width: 120 });
tempsTabs.push({ label: "车型", prop: "model", width: 100 });
tempsTabs.push({
label: "CP5时间",
prop: "cP5A",
width: 150,
formType: "datetime",
});
tempsTabs.push({
label: "CP7时间",
prop: "cP7",
width: 150,
formType: "datetime",
});
tempsTabs.push({ label: "零件号", prop: "materialCode", width: 200 });
tempsTabs.push({ label: "数量", prop: "qty", width: 100 });
tempsTabs.push({ label: "未结算原因", prop: "remark", width: 280 });
tempsTabs.push({ label: "结算标识", prop: "settlementID", width: 120 });
tempsTabs.push({
label: "结算供应商",
prop: "settlementSupplier",
width: 150,
});
tempsTabs.push({ label: "状态", prop: "state", width: 120 });
return tempsTabs;
},
MoreTypes() {
var moreTypes = [];
moreTypes.push({ type: "updateFis", name: "刷新FIS结算状态" });
moreTypes.push({ type: "enter", name: "刷新数据开票状态" });
return moreTypes;
},
},
methods: {
selectValue(params) {
//
this.versionValue = params.value;
this.getList();
},
selectValueVerson(params) {
//
this.versionValueVerson = params.value;
},
handleTypeDrop(command, params = {}) {
},
selectOptionsChange(item) {
this.getList();
},
getVersionInfo() {
//
//this.listLoading = true;
this.listQuery.SkipCount = (this.page - 1) * 1000;
this.$axios
.posts("/api/settleaccount/UnSettleAccount/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].value;
this.versionValueVerson = this.versionList[0].label;
this.getList();
}
})
.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 == "cP5A" || column.property == "cP7") {
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;
},
async handleDownload() {
this.listLoading = true;
if (this.versionValueVerson === "") {
this.$message.error("必需选择版本!");
this.listLoading = false;
return;
}
console.log("R3已结导出:" + JSON.stringify(this.versionValueVerson));
this.$axios
.gets("/api/settleaccount/UnSettleAccount/Export", {
version: this.versionValueVerson,
})
.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() {
this.listLoading = true;
this.listQuery.SkipCount = (this.page - 1) * 10;
if (this.versionValue != "") {
this.listQuery.ParentId = this.versionValue;
} else {
this.listQuery.ParentId = "00000000-0000-0000-0000-000000000000";
}
this.$axios
.posts("/api/settleaccount/UnSettleAccount/list", 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;
});
},
fetchData(id) {
//
this.$axios
.gets("/api/settleaccount/UnSettleAccount/" + id)
.then((response) => {
this.form = response;
});
},
/** 筛选操作 */
handleFilter() {
this.page = 1;
this.getList();
this.listQuery.Filters = [];
if (this.searchContent != "") {
var column = "materialCode";
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" };
}
},
/** 通过回调控制表头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>

182
vue/src/views/ux/vw/dataInput/r3/index.vue

@ -1,4 +1,4 @@
<!--R3明细数据-->
<!--R3已结数据-->
<template>
<div class="cr-body-content">
<flexbox class="content-header">
@ -21,15 +21,6 @@
class="filter-item"
size="mini"
type="primary"
icon="el-icon-plus"
@click="handleCreate"
>导出预批量结算数据
</el-button>
<el-button
class="filter-item"
size="mini"
type="info"
icon="el-icon-download"
@click="handleDownload()"
>导出Csv
@ -130,59 +121,7 @@
</template>
</el-table-column>
</el-table>
<!--表单渲染-->
<el-dialog
:visible.sync="dialogFormVisible"
:close-on-click-modal="false"
:title="formTitle"
width="450px"
>
<el-form
ref="form"
:inline="true"
:model="form"
:rules="rules"
size="small"
label-width="120px"
>
<el-row>
<el-col :md="4" :xs="24">
<el-form-item label="版本" required />
</el-col>
<el-col :md="20" :xs="24">
<el-form-item prop="version">
<XhJSSelectVerson
:options="versionList"
style="width: 130px"
class="search-container"
@value-change="selectValueVerson"
></XhJSSelectVerson>
<!-- <el-select
v-model="form.version"
clearable
style="width: 188px"
placeholder="请选择"
>
<el-option
v-for="item in versionList"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select> -->
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="text" @click="dialogFormVisible = false"
>取消</el-button
>
<el-button v-loading="formLoading" type="primary" @click="save"
>确认</el-button
>
</div>
</el-dialog>
<div class="table-footer">
<!-- 分页控件 style="margin-top: -25px;margin-bottom:-25px;float:right;"-->
<pagination
@ -374,65 +313,6 @@ export default {
},
},
methods: {
handleCreate() {
this.formTitle = "导出预批量结算数据";
this.isEdit = false;
this.form.version = "";
this.dialogFormVisible = true;
},
save() {
this.$refs.form.validate((valid) => {
if (valid) {
this.listLoading = true;
if (this.versionValueVerson === "") {
this.$message.error("必需选择版本!");
this.listLoading = false;
return;
}
console.log("导出预批量条件:" + JSON.stringify(this.versionValueVerson));
this.$axios
.gets("/api/settleaccount/SettleAccount/ExportPreBatch", {
version: this.versionValueVerson,
})
.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;
});
});
this.dialogFormVisible = false;//
}
});
},
selectValue(params) {
//
this.versionValue = params.value;
@ -526,12 +406,7 @@ export default {
//
this.showExcelImport = false;
},
ExportPreBatch() {
this.getVersionInfo();
this.listLoading = false;
//
this.showExcelImport = false;
},
async handleDownload() {
this.listLoading = true;
if (this.versionValueVerson === "") {
@ -539,9 +414,9 @@ export default {
this.listLoading = false;
return;
}
console.log("R3导出:" + JSON.stringify(this.versionValueVerson));
console.log("R3已结导出:" + JSON.stringify(this.versionValueVerson));
this.$axios
.gets("/api/settleaccount/SettleAccount/ExportPreBatch", {
.gets("/api/settleaccount/SettleAccount/Export", {
version: this.versionValueVerson,
})
.then((res) => {
@ -578,53 +453,6 @@ export default {
});
});
},
//CSV
async handleDownloadCSV() {
this.listLoading = true;
if (this.versionValueVerson === "") {
this.$message.error("必需选择版本!");
this.listLoading = false;
return;
}
console.log("R3导出:" + JSON.stringify(this.listExportQuery));
this.$axios
.posts("/api/settleaccount/SettleAccount/Export", {
version: this.listExportQuery,
})
.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() {
this.listLoading = true;
this.listQuery.SkipCount = (this.page - 1) * 10;

610
vue/src/views/ux/vw/dataInput/vwKanBan/index.vue

@ -0,0 +1,610 @@
<!--大众看板导入功能-->
<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: "VWKanBan",
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: "vWKanBan",
versionValue: "",
versionList: [], //
rules: {
//
erpMaterialCode: [
{ required: true, message: "必须输入!", trigger: "blur" },
],
},
searchContent: "", //
customerInfo: {
settleAccountId: "",
},
form: {
dicDetailID: "",
customerId: "",
projectId: "",
},
list: null,
totalCount: 0,
listLoading: true,
formLoading: false,
//
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",
fileType: 0,
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 - 260,
isEdit: false,
};
},
mounted() {
var self = this;
window.onresize = function () {
var offsetHei = document.documentElement.clientHeight;
self.tableHeight = offsetHei - 260;
};
},
created() {
this.getVersionInfo();
if (this.versionList == []) {
this.getList();
}
},
computed: {
/** 列表字段 */
getDefaultField() {
var tempsTabs = [];
tempsTabs.push({ label: "看板条码号", prop: "kanban", width: 200 });
tempsTabs.push({ label: "入库关联号", prop: "relation", width: 200 });
tempsTabs.push({ label: "工厂", prop: "factory", width: 120 });
tempsTabs.push({ label: "零件号", prop: "materialCode", width: 220 });
tempsTabs.push({ label: "零件类型", prop: "partType", width: 100 });
tempsTabs.push({
label: "R3入库时间",
prop: "settleInputDate",
width: 150,
formType: "datetime",
});
tempsTabs.push({ label: "供应商编码", prop: "supplierCode", width: 140 });
tempsTabs.push({ label: "数量", prop: "qty", width: 90 });
tempsTabs.push({ label: "批次", prop: "batch", width: 100 });
tempsTabs.push({ label: "入库结算标识", prop: "flag", width: 150 });
tempsTabs.push({
label: "结算日期",
prop: "settleDate",
width: 150,
formType: "datetime",
});
tempsTabs.push({ label: "结算状态", prop: "state", width: 150 });
return tempsTabs;
},
MoreTypes() {
var moreTypes = [];
moreTypes.push({ type: "updateFis", name: "更新FIS结算数据" });
//moreTypes.push({ type: "enter", name: "" });
return moreTypes;
},
},
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("大众看板导出:" + JSON.stringify(this.listQuery));
this.$axios
.posts("/api/settleaccount/VWKanBan/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;
});
});
},
//
async handleDownload() {
this.listLoading = true;
if (this.versionValue === "") {
this.$message.error("必需选择版本!");
this.listLoading = false;
return;
}
if (this.versionValue != "") {
this.listQuery.version = this.versionValue;
}
console.log("大众看板导出:" + JSON.stringify(this.listQuery));
this.$axios
.posts("/api/settleaccount/VWKanBan/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/VWKanBan/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/VWKanBan/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/VWKanBan/" + id).then((response) => {
this.form = response;
});
},
/** 筛选操作 */
handleFilter() {
this.page = 1;
this.getList();
this.listQuery.Filters = [];
if (this.searchContent != "") {
var column = "materialCode";
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>

5
vue/static/config.js

@ -17,7 +17,7 @@ if (process.env.NODE_ENV === 'development') {
public_port: '44378',
backend_port: '44378', */
ip: 'http://192.168.0.214',
ip: 'http://192.168.0.140',
// ip: 'http://149.223.116.5',
auth_port: '8066',
public_port: '8092',
@ -50,7 +50,8 @@ if (process.env.NODE_ENV === 'development') {
// 发布环境
configJSON = {
base: {
ip: 'http://192.168.0.214',
ip: 'http://192.168.0.140',
//ip: 'http://192.168.0.214',
//ip: 'http://149.223.116.5',
//ip: 'http://114.116.225.148',
//ip: 'http://10.123.148.162',

261
vue/static/tableFieldForSearch.json

@ -424,6 +424,76 @@
}
]
},
"unSettleAccount": {
"id": "11",
"data": [
{
"fieldId": 0,
"formType": "text",
"name": "版本",
"type": 1,
"value": "",
"fieldType": 1,
"fieldName": "version",
"setting": []
},
{
"fieldId": 2,
"formType": "text",
"name": "KENN号",
"type": 1,
"value": "",
"fieldType": 1,
"fieldName": "kennCode",
"setting": []
},
{
"fieldId": 3,
"formType": "text",
"name": "车型",
"type": 1,
"value": "",
"fieldType": 1,
"fieldName": "model",
"setting": []
},
{
"fieldId": 3,
"formType": "text",
"name": "底盘号",
"type": 1,
"value": "",
"fieldType": 1,
"fieldName": "chassisNumber",
"setting": []
},
{
"fieldId": 3,
"formType": "text",
"name": "零件号",
"type": 1,
"value": "",
"fieldType": 1,
"fieldName": "materialCode",
"setting": []
},
{
"fieldId": 2,
"formType": "select",
"isNull": 0,
"name": "状态",
"options": "",
"type": 3,
"value": "",
"fieldType": 0,
"fieldName": "state",
"setting": [
"未结,0",
"已结,2"
]
}
]
},
"prebatch": {
"id": "12",
"data": [
@ -2391,5 +2461,196 @@
"setting": []
}
]
},
"vWKanBan": {
"id": "36",
"data": [
{
"fieldId": 1,
"formType": "text",
"name": "看板条码号",
"type": 1,
"value": "",
"fieldType": 1,
"fieldName": "kanban",
"setting": []
},
{
"fieldId": 2,
"formType": "text",
"name": "工厂",
"type": 1,
"value": "",
"fieldType": 1,
"fieldName": "factory",
"setting": []
},
{
"fieldId": 3,
"formType": "text",
"name": "零件号",
"type": 1,
"value": "",
"fieldType": 1,
"fieldName": "materialCode",
"setting": []
},
{
"fieldId": 4,
"formType": "text",
"name": "零件类型",
"type": 1,
"value": "",
"fieldType": 1,
"fieldName": "partType",
"setting": []
},
{
"fieldId": 5,
"formType": "text",
"name": "供应商编码",
"type": 1,
"value": "",
"fieldType": 1,
"fieldName": "supplierCode",
"setting": []
},
{
"fieldId": 6,
"formType": "text",
"name": "入库结算标识",
"type": 1,
"value": "",
"fieldType": 1,
"fieldName": "flag",
"setting": []
},
{
"fieldId": 15,
"formType": "text",
"name": "结算状态",
"type": 1,
"value": "",
"fieldType": 1,
"fieldName": "state",
"setting": []
}
]
},
"scrapClaims": {
"id": "36",
"data": [
{
"fieldId": 2,
"formType": "select",
"isNull": 0,
"name": "类型(报废和索赔)",
"options": "",
"type": 3,
"value": "",
"fieldType": 0,
"fieldName": "type",
"setting": [
"CP7报废,CP7报废",
"索赔,索赔"
]
},
{
"fieldId": 3,
"formType": "text",
"name": "零件号",
"type": 1,
"value": "",
"fieldType": 1,
"fieldName": "materialCode",
"setting": []
},
{
"fieldId": 5,
"formType": "text",
"name": "零件名称",
"type": 1,
"value": "",
"fieldType": 1,
"fieldName": "materialDesc",
"setting": []
}
]
},
"sparePart": {
"id": "36",
"data": [
{
"fieldId": 3,
"formType": "text",
"name": "采购类型",
"type": 1,
"value": "",
"fieldType": 1,
"fieldName": "purchaseType",
"setting": []
},
{
"fieldId": 5,
"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": "deliveryOrderNo",
"setting": []
},
{
"fieldId": 5,
"formType": "text",
"name": "批次号",
"type": 1,
"value": "",
"fieldType": 1,
"fieldName": "batchNo",
"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": []
}
]
}
}
Loading…
Cancel
Save