Browse Source

2021116前后端提交

branch_ccpg_220107
44673626 3 years ago
parent
commit
0d1bfcecb9
  1. 8
      src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/appsettings.Development.json
  2. 8
      src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/appsettings.json
  3. 4
      src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/Boms/ImportBomDto.cs
  4. 2
      src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/Invoices/InvoiceDtoBase.cs
  5. 4
      src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWKanBan/VWKanBanImportDto.cs
  6. 2
      src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWScrapClaims/ScrapClaimsImportDto.cs
  7. 8
      src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWSparePart/SparePartImportDto.cs
  8. 200
      src/Modules/SettleAccount/src/SettleAccount.Job/Services/UnSettleAccount/UnSettleAccountImportService.cs
  9. 16
      vue/src/components/ImportExcel-vw/index.vue
  10. 7
      vue/src/router/index.js
  11. 62
      vue/src/router/modules/basedata.js
  12. 2
      vue/src/router/modules/fis.js
  13. 42
      vue/src/router/modules/vwFisData.js
  14. 25
      vue/src/router/modules/vwKBdata.js
  15. 2
      vue/src/settings.js
  16. 4
      vue/src/views/login/index.vue
  17. 572
      vue/src/views/ux/vw/dataInput/r3-open/index.vue
  18. 182
      vue/src/views/ux/vw/dataInput/r3/index.vue
  19. 70
      vue/static/tableFieldForSearch.json

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

@ -2,9 +2,13 @@
"App": { "App": {
"CorsOrigins": "https://*.abc.com,http://localhost:9528,http://149.223.116.5:8088" "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": { "ConnectionStrings": {
"Default": "Server=LAPTOP-V3U07C2O;Database=ABP;user id=sa;Password=1q2w!@#", "Default": "Server=192.168.0.140;Database=ABP;user id=sa;Password=Microsoft2008",
"SettleAccountService": "Server=LAPTOP-V3U07C2O;Database=SettleAccountService;user id=sa;Password=1q2w!@#;" "SettleAccountService": "Server=192.168.0.140;Database=SettleAccountService;user id=sa;Password=Microsoft2008;"
}, },
"Logging": { "Logging": {
"LogLevel": { "LogLevel": {

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

@ -2,9 +2,13 @@
"App": { "App": {
"CorsOrigins": "https://*.abc.com,http://localhost:9528,http://149.223.116.5:8088" "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": { "ConnectionStrings": {
"Default": "Server=LAPTOP-V3U07C2O;Database=ABP;user id=sa;Password=1q2w!@#", "Default": "Server=192.168.0.140;Database=ABP;user id=sa;Password=Microsoft2008",
"SettleAccountService": "Server=LAPTOP-V3U07C2O;Database=SettleAccountService;user id=sa;Password=1q2w!@#;" "SettleAccountService": "Server=192.168.0.140;Database=SettleAccountService;user id=sa;Password=Microsoft2008;"
}, },
"Logging": { "Logging": {
"LogLevel": { "LogLevel": {

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

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

@ -24,7 +24,7 @@ namespace Win.Sfs.SettleAccount.Entities.Invoices
/// <summary> /// <summary>
///零件号 ///零件号
/// </summary> /// </summary>
[ImporterHeader(Name = "零件号")] [ImporterHeader(Name = "零件号", FixAllSpace = true)]
public string MaterialCode { get; set; } public string MaterialCode { get; set; }
/// <summary> /// <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>
///看板条码号 ///看板条码号
/// </summary> /// </summary>
[ImporterHeader(Name = "看板条码号")] [ImporterHeader(Name = "看板条码号", FixAllSpace = true)]
public string Kanban { set; get; } public string Kanban { set; get; }
/// <summary> /// <summary>
@ -42,7 +42,7 @@ namespace Win.Sfs.SettleAccount.Entities.VWKanBan
/// <summary> /// <summary>
/// 零件号 /// 零件号
/// </summary> /// </summary>
[ImporterHeader(Name = "零件号")] [ImporterHeader(Name = "零件号", FixAllSpace = true)]
public virtual string MaterialCode { set; get; } public virtual string MaterialCode { set; get; }
/// <summary> /// <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>
/// 零件号 /// 零件号
/// </summary> /// </summary>
[ImporterHeader(Name = "零件号")] [ImporterHeader(Name = "零件号", FixAllSpace = true)]
public virtual string MaterialCode { set; get; } public virtual string MaterialCode { set; get; }
/// <summary> /// <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>
/// 采购订单号 /// 采购订单号
/// </summary> /// </summary>
[ImporterHeader(Name = "采购订单号")] [ImporterHeader(Name = "采购订单号", FixAllSpace = true)]
public string PurchaseOrderNo { get; set; } public string PurchaseOrderNo { get; set; }
/// <summary> /// <summary>
/// 采购订单行项目 /// 采购订单行项目
@ -62,12 +62,12 @@ namespace Win.Sfs.SettleAccount.Entities.VWSparePart
/// <summary> /// <summary>
/// 科目号 /// 科目号
/// </summary> /// </summary>
[ImporterHeader(Name = "科目号")] [ImporterHeader(Name = "科目号", FixAllSpace = true)]
public string AccountNum { get; set; } public string AccountNum { get; set; }
/// <summary> /// <summary>
/// 物料代码 /// 物料代码
/// </summary> /// </summary>
[ImporterHeader(Name = "物料代码")] [ImporterHeader(Name = "物料代码", FixAllSpace = true)]
public string MaterialCode { get; set; } public string MaterialCode { get; set; }
/// <summary> /// <summary>
/// 物料描述 /// 物料描述
@ -82,7 +82,7 @@ namespace Win.Sfs.SettleAccount.Entities.VWSparePart
/// <summary> /// <summary>
/// 交货单号 /// 交货单号
/// </summary> /// </summary>
[ImporterHeader(Name = "交货单号")] [ImporterHeader(Name = "交货单号", FixAllSpace = true)]
public string DeliveryOrderNo { get; set; } public string DeliveryOrderNo { get; set; }
/// <summary> /// <summary>
/// 交货行号 /// 交货行号

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

@ -1,5 +1,6 @@
using Magicodes.ExporterAndImporter.Core; using Magicodes.ExporterAndImporter.Core;
using Magicodes.ExporterAndImporter.Excel; using Magicodes.ExporterAndImporter.Excel;
using SettleAccount.Job.Services;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
@ -10,7 +11,7 @@ using TaskJob.EventArgs;
using TaskJob.Interfaces; using TaskJob.Interfaces;
using Volo.Abp.DependencyInjection; using Volo.Abp.DependencyInjection;
using Win.Sfs.SettleAccount.Entities.SettleAccounts; using Win.Sfs.SettleAccount.Entities.SettleAccounts;
using Win.Sfs.SettleAccount.ExportReports;
using Win.Sfs.SettleAccount.Repository.SettleAccount; using Win.Sfs.SettleAccount.Repository.SettleAccount;
namespace TaskJob.Services namespace TaskJob.Services
@ -22,13 +23,16 @@ namespace TaskJob.Services
{ {
private readonly UnSettleAccountRepository _repository; private readonly UnSettleAccountRepository _repository;
private readonly UnSettleAccountVersionRepository _versionRepository; private readonly UnSettleAccountVersionRepository _versionRepository;
private readonly InputService _inputService;
public UnSettleAccountImportService( public UnSettleAccountImportService(
InputService inputService,
UnSettleAccountRepository repository, UnSettleAccountRepository repository,
UnSettleAccountVersionRepository versionRepository UnSettleAccountVersionRepository versionRepository
) )
{ {
_repository = repository; _repository = repository;
_versionRepository = versionRepository; _versionRepository = versionRepository;
_inputService = inputService;
} }
public string ImportFile(Guid id, List<string> fileName, List<string> realfileName, List<CustomCondition> customConditions) 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\"; string fileSavePath = Environment.CurrentDirectory + @"\wwwroot\files\host\my-file-container\";
var version = customConditions.Where(p => p.Name == "Version").FirstOrDefault().Value; var version = customConditions.Where(p => p.Name == "Version").FirstOrDefault().Value;
var customerCode = customConditions.Where(p => p.Name == "CustomerCode").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) foreach (var itm in fileName)
{ {
try try
{ {
var filePath = fileSavePath + itm;//获取到导入的excel var filePath = fileSavePath + itm;//获取到导入的excel
var exten = Path.GetExtension(fileSavePath);
List<UnSettleAccount> _setls = new List<UnSettleAccount>(); List<UnSettleAccount> _setls = new List<UnSettleAccount>();
List<string> _errorList = new List<string>(); List<string> _errorList = new List<string>();
var _id = Guid.NewGuid();
//var checkList = new List<ErrorExportDto>(); 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>();// List<string> _precodeList = new List<string>();//
using (TextReader textReader = new StreamReader(filePath))
{
int i = 0; var errorlist = new List<ErrorExportDto>();
while (true) var dtoList = _inputService.Input<UnSettleAccountImportDto>(filePath, null, errorlist);
foreach (var dto in dtoList)
{ {
string str = textReader.ReadLine(); if (dto.KENNCode.Length == 6)
if (string.IsNullOrEmpty(str))
{ {
break; dto.KENNCode = "0" + dto.KENNCode;
} }
else var _settleaccount = new UnSettleAccount(Guid.NewGuid(), Guid.NewGuid(), dto.SettleYear, dto.KENNCode,
{ dto.ChassisNumber, dto.Model, dto.CP5A, dto.CP7,
try dto.MaterialCode, dto.Qty, string.Empty, string.Empty,
{ DateTime.Now.Year.ToString(), DateTime.Now.Month.ToString(),_id, version, DateTime.Now, Guid.NewGuid(),dto.UnsettledReason);
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
{
_setls.Add(_settleaccount);
} }
}
i++;
}
textReader.Close();
}
var _ls = _setls;
var _ls = _setls;
var a = _ls.Where(p => string.IsNullOrEmpty(p.KENNCode));
var query = from arc in _ls var query = from arc in _ls
group arc by new { arc.ChassisNumber, arc.MaterialCode } group arc by new { arc.ChassisNumber, arc.MaterialCode } into g
into g
where g.Count() > 1 where g.Count() > 1
select g; select g;
_repository.Insert(_setls); _repository.Insert(_setls);
_versionRepository.Insert(version, customerCode, customerCode); _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) catch (Exception e)
{ {
@ -130,5 +102,105 @@ namespace TaskJob.Services
} }
return id.ToString(); 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-vw/index.vue

@ -339,24 +339,16 @@ export default {
crmTypeName() { crmTypeName() {
return ( return (
{ {
bomdatabase: "产品结构BOM", settleAccount: "大众已结算数据",
settleAccount: "结算数据", unSettleAccount: "大众未结数据",
material: "物料主数据",
ItemInvoicePrice:"QAD出库账单",
materialRelation: "总成与结算件关系",
}[this.crmType] || "" }[this.crmType] || ""
); );
}, },
getWebApi() { getWebApi() {
return ( return (
{ {
settleAccount: "/api/settleaccount/SettleAccount/ExcelImport-TH", settleAccount: "/api/settleaccount/SettleAccount/ExcelImport-PG",
bomdatabase: "/api/settleaccount/Material/ExcelImport-TH", unSettleAccount: "/api/settleaccount/UnSettleAccount/ExcelImport",
material: "/api/settleaccount/Material/ExcelImport-TH",
ItemInvoicePrice: "/api/settleaccount/ItemInvoicePrice/ExcelImport",
materialRelation:
"/api/settleaccount/EstimatedInventoryDetail/ExcelImport-TH",
settlementCrossReference:"/api/settleaccount/SettlementCrossReference/ExcelImport",
}[this.crmType] || "" }[this.crmType] || ""
); );
}, },

7
vue/src/router/index.js

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

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

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

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

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

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

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

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

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

2
vue/src/settings.js

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

4
vue/src/views/login/index.vue

@ -1,14 +1,14 @@
<template> <template>
<div class="wrapper"> <div class="wrapper">
<div class="left"> <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="left-pic"/> <div class="left-pic"/>
<div class=""> <div class="">
<div class="copyright"> <div class="copyright">
长春市闻荫科技 长春市闻荫科技
<a <a
target="_blank" target="_blank"
href="http://www.ccwin-in.com">©2021 闻荫科技-长春采埃孚富奥结算管理系统</a> href="http://www.ccwin-in.com">©2021 闻荫科技-长春派格汽车塑料有限公司结算管理系统</a>
</div> </div>
</div> </div>
</div> </div>

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> <template>
<div class="cr-body-content"> <div class="cr-body-content">
<flexbox class="content-header"> <flexbox class="content-header">
@ -21,15 +21,6 @@
class="filter-item" class="filter-item"
size="mini" size="mini"
type="primary" type="primary"
icon="el-icon-plus"
@click="handleCreate"
>导出预批量结算数据
</el-button>
<el-button
class="filter-item"
size="mini"
type="info"
icon="el-icon-download" icon="el-icon-download"
@click="handleDownload()" @click="handleDownload()"
>导出Csv >导出Csv
@ -130,59 +121,7 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </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"> <div class="table-footer">
<!-- 分页控件 style="margin-top: -25px;margin-bottom:-25px;float:right;"--> <!-- 分页控件 style="margin-top: -25px;margin-bottom:-25px;float:right;"-->
<pagination <pagination
@ -374,65 +313,6 @@ export default {
}, },
}, },
methods: { 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) { selectValue(params) {
// //
this.versionValue = params.value; this.versionValue = params.value;
@ -526,12 +406,7 @@ export default {
// //
this.showExcelImport = false; this.showExcelImport = false;
}, },
ExportPreBatch() {
this.getVersionInfo();
this.listLoading = false;
//
this.showExcelImport = false;
},
async handleDownload() { async handleDownload() {
this.listLoading = true; this.listLoading = true;
if (this.versionValueVerson === "") { if (this.versionValueVerson === "") {
@ -539,9 +414,9 @@ export default {
this.listLoading = false; this.listLoading = false;
return; return;
} }
console.log("R3导出:" + JSON.stringify(this.versionValueVerson)); console.log("R3已结导出:" + JSON.stringify(this.versionValueVerson));
this.$axios this.$axios
.gets("/api/settleaccount/SettleAccount/ExportPreBatch", { .gets("/api/settleaccount/SettleAccount/Export", {
version: this.versionValueVerson, version: this.versionValueVerson,
}) })
.then((res) => { .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() { getList() {
this.listLoading = true; this.listLoading = true;
this.listQuery.SkipCount = (this.page - 1) * 10; this.listQuery.SkipCount = (this.page - 1) * 10;

70
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": { "prebatch": {
"id": "12", "id": "12",
"data": [ "data": [

Loading…
Cancel
Save