44673626 3 years ago
parent
commit
21e8a051bf
  1. 1
      src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/SettleAccount.HttpApi.Host.csproj
  2. 10
      src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/appsettings.Development.json
  3. 10
      src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/appsettings.json
  4. 63
      src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/HQ_F/HQ_F_Kanban.cs
  5. 63
      src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/HQ_H/HQ_H_Kanban.cs
  6. 63
      src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/HQ_M/HQ_M_Kanban.cs
  7. 18
      src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/WMS/TaskList.cs
  8. 135
      src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/SettleAccountDbContextModelCreatingExtensions.cs
  9. 83
      src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/SettleSparePartExtendDapperReportRepository.cs
  10. 45
      vue/src/router/modules/hq_menu.js
  11. 10
      vue/src/router/modules/vwFisData.js
  12. 594
      vue/src/views/ux/vw/dataInput/hq_y/index.vue

1
src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/SettleAccount.HttpApi.Host.csproj

@ -54,7 +54,6 @@
</ItemGroup>
<ItemGroup>
<Folder Include="Migrations\" />
<Folder Include="wwwroot\files\host\my-file-container\" />
</ItemGroup>

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

@ -7,11 +7,11 @@
// "SettleAccountService": "Server=LAPTOP-V3U07C2O;Database=SettleAccountService;user id=sa;Password=1q2w!@#;"
//},
"ConnectionStrings": {
//"Default": "Server=127.0.0.1;Database=ABP;user id=sa;Password=1",
//"SettleAccountService": "Server=127.0.0.1;Database=SettleAccountService;user id=sa;Password=1;"
"Default": "Server=192.168.0.67;Database=ABP;User ID=sa;Password=Microsoft2008;",
"SettleAccountService": "Server=192.168.0.67;Database=SettleAccountService;user id=sa;password=Microsoft2008;",
"Wms": "Server=192.168.0.140;Database=CPAT_WMS_TEST;user id=sa;password=Microsoft2008;"
"Default": "Server=127.0.0.1;Database=ABP;user id=sa;Password=1",
"SettleAccountService": "Server=127.0.0.1;Database=SettleAccountService1;user id=sa;Password=1;"
//"Default": "Server=192.168.0.67;Database=ABP;User ID=sa;Password=Microsoft2008;",
//"SettleAccountService": "Server=192.168.0.67;Database=SettleAccountService;user id=sa;password=Microsoft2008;",
//"Wms": "Server=192.168.0.63;Database=CPAT_WMS;user id=sa;password=Microsoft2008;"
},
"Logging": {
"LogLevel": {

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

@ -7,11 +7,11 @@
// "SettleAccountService": "Server=LAPTOP-V3U07C2O;Database=SettleAccountService;user id=sa;Password=1q2w!@#;"
//},
"ConnectionStrings": {
//"Default": "Server=127.0.0.1;Database=ABP;user id=sa;Password=1",
//"SettleAccountService": "Server=127.0.0.1;Database=SettleAccountService;user id=sa;Password=1;",
"Default": "Server=192.168.0.67;Database=ABP;User ID=sa;Password=Microsoft2008;",
"SettleAccountService": "Server=192.168.0.67;Database=SettleAccountService;user id=sa;password=Microsoft2008;",
"Wms": "Server=192.168.0.140;Database=CPAT_WMS_TEST;user id=sa;password=Microsoft2008;"
"Default": "Server=127.0.0.1;Database=ABP;user id=sa;Password=1",
"SettleAccountService": "Server=127.0.0.1;Database=SettleAccountService1;user id=sa;Password=1;",
//"Default": "Server=192.168.0.67;Database=ABP;User ID=sa;Password=Microsoft2008;",
//"SettleAccountService": "Server=192.168.0.67;Database=SettleAccountService;user id=sa;password=Microsoft2008;",
//"Wms": "Server=192.168.0.63;Database=CPAT_WMS;user id=sa;password=Microsoft2008;"
},
"Logging": {

63
src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/HQ_F/HQ_F_Kanban.cs

@ -0,0 +1,63 @@
using Magicodes.ExporterAndImporter.Core;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Win.Sfs.Shared.DomainBase;
namespace Win.Sfs.SettleAccount.Entities.HQ_F
{
//行号
//零件号
//零件中文名称
//需求数
//已接收数
//订货看板编号
//手工或自动
//收货仓库
//收货仓库描述
//交货时间
//发货状态
//供应商
public class HQ_F_Kanban:FullAuditedAggregateRootBase<Guid>
{
[ExporterHeader(DisplayName = "行号")]
public string PoLine { set; get; }
[ExporterHeader(DisplayName = "零件号")]
public string MaterialCode { set; get; }
[ExporterHeader(DisplayName = "零件中文名称 ")]
public string MaterialDesc { set; get; }
[ExporterHeader(DisplayName = "发货数量")]
public decimal Qty { get; set; }
[ExporterHeader(DisplayName = "订货看板编号")]
public string Kanban { set; get; }
[ExporterHeader(DisplayName = "手工或自动")]
public string IsAuto { set; get; }
[ExporterHeader(DisplayName = "收货仓库")]
public string Warehouse { set; get; }
[ExporterHeader(DisplayName = "收货仓库描述 ")]
public string WarehouseDesc { set; get; }
[ExporterHeader(DisplayName = "供应商")]
public string Supplier { set; get; }
[ExporterHeader(DisplayName = "发货状态")]
public string State { set; get; }
public HQ_F_Kanban(Guid id,string poLine, string materialCode, string materialDesc, decimal qty, string kanban, string isAuto, string warehouse, string warehouseDesc, string supplier, string state):base(id)
{
Id = id;
PoLine = poLine;
MaterialCode = materialCode;
MaterialDesc = materialDesc;
Qty = qty;
Kanban = kanban;
IsAuto = isAuto;
Warehouse = warehouse;
WarehouseDesc = warehouseDesc;
Supplier = supplier;
State = state;
}
}
}

63
src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/HQ_H/HQ_H_Kanban.cs

@ -0,0 +1,63 @@
using Magicodes.ExporterAndImporter.Core;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Win.Sfs.Shared.DomainBase;
namespace Win.Sfs.SettleAccount.Entities.HQ_F
{
//行号
//零件号
//零件中文名称
//需求数
//已接收数
//订货看板编号
//手工或自动
//收货仓库
//收货仓库描述
//交货时间
//发货状态
//供应商
public class HQ_H_Kanban:FullAuditedAggregateRootBase<Guid>
{
[ExporterHeader(DisplayName = "行号")]
public string PoLine { set; get; }
[ExporterHeader(DisplayName = "零件号")]
public string MaterialCode { set; get; }
[ExporterHeader(DisplayName = "零件中文名称 ")]
public string MaterialDesc { set; get; }
[ExporterHeader(DisplayName = "发货数量")]
public decimal Qty { get; set; }
[ExporterHeader(DisplayName = "订货看板编号")]
public string Kanban { set; get; }
[ExporterHeader(DisplayName = "手工或自动")]
public string IsAuto { set; get; }
[ExporterHeader(DisplayName = "收货仓库")]
public string Warehouse { set; get; }
[ExporterHeader(DisplayName = "收货仓库描述 ")]
public string WarehouseDesc { set; get; }
[ExporterHeader(DisplayName = "供应商")]
public string Supplier { set; get; }
[ExporterHeader(DisplayName = "发货状态")]
public string State { set; get; }
public HQ_H_Kanban(Guid id,string poLine, string materialCode, string materialDesc, decimal qty, string kanban, string isAuto, string warehouse, string warehouseDesc, string supplier, string state):base(id)
{
Id = id;
PoLine = poLine;
MaterialCode = materialCode;
MaterialDesc = materialDesc;
Qty = qty;
Kanban = kanban;
IsAuto = isAuto;
Warehouse = warehouse;
WarehouseDesc = warehouseDesc;
Supplier = supplier;
State = state;
}
}
}

63
src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/HQ_M/HQ_M_Kanban.cs

@ -0,0 +1,63 @@
using Magicodes.ExporterAndImporter.Core;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Win.Sfs.Shared.DomainBase;
namespace Win.Sfs.SettleAccount.Entities.HQ_F
{
//行号
//零件号
//零件中文名称
//需求数
//已接收数
//订货看板编号
//手工或自动
//收货仓库
//收货仓库描述
//交货时间
//发货状态
//供应商
public class HQ_M_Kanban:FullAuditedAggregateRootBase<Guid>
{
[ExporterHeader(DisplayName = "行号")]
public string PoLine { set; get; }
[ExporterHeader(DisplayName = "零件号")]
public string MaterialCode { set; get; }
[ExporterHeader(DisplayName = "零件中文名称 ")]
public string MaterialDesc { set; get; }
[ExporterHeader(DisplayName = "发货数量")]
public decimal Qty { get; set; }
[ExporterHeader(DisplayName = "订货看板编号")]
public string Kanban { set; get; }
[ExporterHeader(DisplayName = "手工或自动")]
public string IsAuto { set; get; }
[ExporterHeader(DisplayName = "收货仓库")]
public string Warehouse { set; get; }
[ExporterHeader(DisplayName = "收货仓库描述 ")]
public string WarehouseDesc { set; get; }
[ExporterHeader(DisplayName = "供应商")]
public string Supplier { set; get; }
[ExporterHeader(DisplayName = "发货状态")]
public string State { set; get; }
public HQ_M_Kanban(Guid id,string poLine, string materialCode, string materialDesc, decimal qty, string kanban, string isAuto, string warehouse, string warehouseDesc, string supplier, string state):base(id)
{
Id = id;
PoLine = poLine;
MaterialCode = materialCode;
MaterialDesc = materialDesc;
Qty = qty;
Kanban = kanban;
IsAuto = isAuto;
Warehouse = warehouse;
WarehouseDesc = warehouseDesc;
Supplier = supplier;
State = state;
}
}
}

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

@ -55,7 +55,9 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
}
/// <summary>
/// 准时化出库主表
/// </summary>
public class WmsJitOutPut : FullAuditedAggregateRootBase<Guid>
{
public WmsJitOutPut()
@ -82,7 +84,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
/// <summary>
///
/// 准时化出库明细
/// </summary>
public class WmsJitOutPutDetial : FullAuditedAggregateRootBase<Guid>
{
@ -229,7 +231,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
/// <summary>
///
/// 看板明细
/// </summary>
public class WmsKanbanOutPutDetial : FullAuditedAggregateRootBase<Guid>
{
@ -331,7 +333,9 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
/// <summary>
/// 备件出库
/// </summary>
public class WmsSharePartOutPut : FullAuditedAggregateRootBase<Guid>
{
public WmsSharePartOutPut()
@ -358,7 +362,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
/// <summary>
///
/// 备件出库明细
/// </summary>
public class WmsSharePartOutPutDetial : FullAuditedAggregateRootBase<Guid>
{
@ -452,7 +456,9 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
/// <summary>
/// 备件无订单号出库
/// </summary>
public class WmsSharePartOutPutDetial2: FullAuditedAggregateRootBase<Guid>
{

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

@ -73,6 +73,7 @@ using Win.Sfs.SettleAccount.Entities.BT_Car;
using Win.Sfs.SettleAccount.Entities.WMS;
using Win.Sfs.SettleAccount.Entities.HQ_F;
namespace Win.Sfs.SettleAccount
{
public static class SettleAccountDbContextModelCreatingExtensions
@ -332,13 +333,147 @@ namespace Win.Sfs.SettleAccount
builder.ConfigureWmsKanbanOutPutDetail(options);
builder.ConfigureWmsSharePartOutPutDetail(options);
builder.ConfigureWmsSharePartOutPutVersion(options);
builder.ConfigureHQFKanban(options);
builder.ConfigureHQMKanban(options);
builder.ConfigureHQHKanban(options);
#endregion
}
#region PG-派格
private static void ConfigureHQFKanban(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options)
{
builder.Entity<HQ_F_Kanban>(b =>
{
b.ToTable($"{options.TablePrefix}_HQ_F_Kanban", options.Schema);
b.ConfigureByConvention();
b.Property(x => x.Kanban).IsRequired().HasMaxLength(50);//必填项
b.Property(x => x.MaterialCode).HasMaxLength(50);
b.Property(x => x.MaterialDesc).HasMaxLength(100);
b.Property(x => x.PoLine).IsRequired().HasMaxLength(50);
b.Property(x => x.Supplier).HasMaxLength(50);
b.Property(x => x.Warehouse).HasMaxLength(50);
b.Property(x => x.WarehouseDesc).HasMaxLength(150);
b.Property(x => x.State).HasMaxLength(50);
//创建组合索引
b.HasIndex(x => new { x.Kanban, x.PoLine, x.MaterialCode });
});
}
private static void ConfigureHQMKanban(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options)
{
builder.Entity<HQ_M_Kanban>(b =>
{
b.ToTable($"{options.TablePrefix}_HQ_M_Kanban", options.Schema);
b.ConfigureByConvention();
b.Property(x => x.Kanban).IsRequired().HasMaxLength(50);//必填项
b.Property(x => x.MaterialCode).HasMaxLength(50);
b.Property(x => x.MaterialDesc).HasMaxLength(100);
b.Property(x => x.PoLine).IsRequired().HasMaxLength(50);
b.Property(x => x.Supplier).HasMaxLength(50);
b.Property(x => x.Warehouse).HasMaxLength(50);
b.Property(x => x.WarehouseDesc).HasMaxLength(150);
b.Property(x => x.State).HasMaxLength(50);
//创建组合索引
b.HasIndex(x => new { x.Kanban, x.PoLine, x.MaterialCode });
});
}
private static void ConfigureHQHKanban(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options)
{
builder.Entity<HQ_H_Kanban>(b =>
{
b.ToTable($"{options.TablePrefix}_HQ_H_Kanban", options.Schema);
b.ConfigureByConvention();
b.Property(x => x.Kanban).IsRequired().HasMaxLength(50);//必填项
b.Property(x => x.MaterialCode).HasMaxLength(50);
b.Property(x => x.MaterialDesc).HasMaxLength(100);
b.Property(x => x.PoLine).IsRequired().HasMaxLength(50);
b.Property(x => x.Supplier).HasMaxLength(50);
b.Property(x => x.Warehouse).HasMaxLength(50);
b.Property(x => x.WarehouseDesc).HasMaxLength(150);
b.Property(x => x.State).HasMaxLength(50);
//创建组合索引
b.HasIndex(x => new { x.Kanban, x.PoLine, x.MaterialCode });
});
}
/// <summary>
/// 一汽轿车平台验收结算明细-导入
/// </summary>
/// <param name="builder"></param>
/// <param name="options"></param>
private static void ConfigureHQCar(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options)
{
builder.Entity<HQ_Car_Platform>(b =>
{
b.ToTable($"{options.TablePrefix}_HQ_Car_Platform", options.Schema);
b.ConfigureByConvention();
b.Property(x => x.HQCarKanBan).HasMaxLength(150);//看板号(一汽轿车没有看板号)
b.Property(x => x.MaterialVoucherNo).HasMaxLength(150);
b.Property(x => x.Factory).HasMaxLength(50);
b.Property(x => x.MaterialCode).IsRequired().HasMaxLength(150);
b.Property(x => x.ExternalKanbanNumber).HasMaxLength(50);
b.Property(x => x.KanbanNumber).HasMaxLength(150);//看板编号
b.Property(x => x.Period).HasMaxLength(50);
b.Property(x => x.Year).HasMaxLength(50);
b.Property(x => x.Version).HasMaxLength(50);
b.Property(x => x.Supplier).HasMaxLength(50);
b.Property(x => x.StorageLocation).HasMaxLength(50);
b.Property(x => x.StorageLocationDesc).HasMaxLength(150);
//创建组合索引
b.HasIndex(x => new { x.Version, x.KanbanNumber, x.MaterialCode }).IsUnique().HasFilter(IsDeletedFilter);
});
}
private static void ConfigureHQCarVersion(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options)
{
builder.Entity<HQ_Car_PlatformVersion>(b =>
{
b.ToTable($"{options.TablePrefix}_HQ_Car_PlatformVersion", options.Schema);
b.ConfigureByConvention();
b.Property(x => x.Year).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.Period).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.Version).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.CustomerCode).HasMaxLength(CommonConsts.MaxCodeLength);
b.HasIndex(x => new { x.Version }).IsUnique().HasFilter(IsDeletedFilter);
});
}
/// <summary>
/// 红旗工厂F平台验收结算明细-导入
/// </summary>

83
src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/SettleSparePartExtendDapperReportRepository.cs

@ -80,42 +80,44 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
}
public virtual List<SettleSparePartExport> GetSettleSparePartNoOrderList(string purchaseOrderNo, string version, string sapCode, string matialCode,
public virtual List<SettleSpareExtendPartExport> GetSettleSparePartNoOrderList(string purchaseOrderNo, string version, string sapCode, string matialCode,
string begintime, string endtime)
{
string sqlString = " SELECT \n" +
" * , \n" +
" (Price-InvoicePrice) as InvoiceDiffPrice, --单价差异 \n" +
" ISNULL( Price * ReceiptQty-InvoiceMoney, 0 ) AS SumDiffMoney --总金额差异 \n" +
var sql = "SELECT\n" +
" temp1.*,\n" +
" Isnull( TEMP2.Price, 0 ) Price,\n" +
" Round( Isnull( TEMP2.Price, 0 )* InvoicedQty, 2 ) Amt \n" +
"FROM\n" +
" (\n" +
" SELECT\n" +
" c.Period as WMSDeliveryDate,--交货日期 \n" +
" c.WMSDeliveryNote,--交货单号 \n" +
" c.SpareDate as OrderDate,--订单日期 \n" +
" a.PurchaseOrderNo,--采购订单号 \n" +
" b.MaterialCode as SAPCode,--SAP编码,即厂内物料号 \n" +
" a.MaterialCode,--物料代码 \n" +
" b.MaterialDesc,--物料描述 \n" +
" a.PurchaseOrderNoText,--采购订单文本 \n" +
" c.ReceiptQty,-- 发货数量 \n" +
" a.InvoicedQty as InvoicedQty,--开票数量 \n" +
" (c.ReceiptQty-d.Amt) as SettleInvoiceDiffQty,--发货与开票差异 \n" +
" d.InvoicePrice,--开票单价 \n" +
" 0 as InvoiceMoney --开票金额 \n" +
" \n" +
" a.*,\n" +
" b.EstimateTypeDesc MaterialGroup,\n" +
" b.EstimateType MaterialGroupCode,\n" +
" b.MaterialCode SapCode,\n" +
" 0 SockQty \n" +
" FROM\n" +
" Set_SparePart AS a \n" +
" LEFT JOIN Set_material AS b ON a.MaterialCode= b.CustomerPartCode \n" +
" LEFT JOIN Set_WMSSparePart c ON a.PurchaseOrderNo= c.WMSDeliveryNote \n" +
" AND a.MaterialCode= c.MaterialCode \n" +
" LEFT JOIN ( SELECT SUM ( amt ) / SUM ( Qty ) InvoicePrice, MaterialCode,Amt FROM set_invoice WHERE version = '{0}' GROUP BY materialcode,Amt ) d ON a.MaterialCode= d.MaterialCode \n" +
" ) TEMP1 \n" +
" LEFT JOIN ( SELECT Price, --定价 \n" +
" MaterialCode --厂内物料号 \n" +
" FROM Set_PriceList WHERE version = ( SELECT MAX ( Version ) FROM Set_PriceList ) ) TEMP2 ON TEMP1.SAPCode= TEMP2.MaterialCode ";
" (\n" +
" SELECT\n" +
" sum( ReceiptQty ) ReceiptQty,\n" +
" SUM( InvoicedQty ) InvoicedQty,\n" +
" SUM( AmountNoTax ) AmountNoTax,\n" +
" SUM( PurchasePriceNoTax ) PurchasePriceNoTax,\n" +
" MaterialCode \n" +
" FROM\n" +
" Set_SparePart \n" +
" WHERE\n" +
" Version = '{0}' \n" +
" GROUP BY\n" +
" MaterialCode \n" +
" ) A\n" +
" LEFT JOIN Set_material B ON A.MaterialCode = B.CustomerPartCode \n" +
" ) temp1\n" +
" LEFT JOIN ( SELECT Price, MaterialCode FROM Set_PriceList WHERE version = ( SELECT MAX( Version ) FROM Set_PriceList ) ) TEMP2 ON TEMP1.SAPCode = TEMP2.MaterialCode";
string addwhere = string.Empty;
string addSqlStr = string.Format(sqlString, version);
string addSqlStr = string.Format(sql, version);
//if (!string.IsNullOrEmpty(purchaseOrderNo))
//{
// addwhere += string.Format(" AND PurchaseOrderNo LIKE '{0}%' ", purchaseOrderNo);
@ -135,7 +137,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
string _sql = string.Format(addSqlStr, addwhere);
//string _sql = string.Format(sqlString, version);
var _query = DbConnection.Query<SettleSparePartExport>(_sql, null, null, true, 1200, null);
var _query = DbConnection.Query<SettleSpareExtendPartExport>(_sql, null, null, true, 1200, null);
return _query.ToList();
}
@ -144,6 +146,27 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
}
public class SettleSpareExtendPartExport
{
//交货日期 交货单号 订单日期 采购订单号 SAP编码 物料代码 物料描述 采购订单文本 发货数量 开票数量 发货与开票差异 开票单价 开票金额 定价 单价差异 差异总金额
[ExporterHeader("收货数量数量")]
public decimal ReceiptQty { set; get; }
[ExporterHeader("开票数量")]
public decimal InvoicedQty { set; get; }
[ExporterHeader("金额")]
public decimal AmountNoTax { set; get; }
[ExporterHeader("金额")]
public decimal PurchasePriceNoTax { set; get; }
public string MaterialCode { set; get; }
public string MaterialGroup { set; get; }
public string MaterialGroupCode { set; get; }
public string SapCode { set; get; }
public string SockQty { set; get; }
}
// ReceiptQty InvoicedQty AmountNoTax PurchasePriceNoTax MaterialCode MaterialGroup MaterialGroupCode SapCode
///// <summary>
///// 大众看板有条码报表

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

@ -14,7 +14,7 @@ const hqMenudataRouter = {
},
children: [
{
path: '/H',
path: '/import-h-data',
name: 'import-h-data',//命名路由-二级
component: () => import('@/views/ux/vw/dataInput/hq_h'),
redirect: 'ux/vw/dataInput/hq_h',
@ -45,9 +45,11 @@ const hqMenudataRouter = {
}
}
]
},
{
path: '/M',
path: '/export-m-data',
component: () => import('@/views/ux/vw/dataInput/hq_m'),
name: 'export-m-data',//命名路由
redirect: '/ux/vw/dataInput/hq_m',
@ -81,7 +83,7 @@ const hqMenudataRouter = {
]
},
{
path: '/F',
path: '/export-f-data',
component: () => import('@/views/ux/vw/dataInput/hq_f'),
name: 'export-f-data',//命名路由
redirect: '/ux/vw/dataInput/hq_f',
@ -112,9 +114,44 @@ const hqMenudataRouter = {
icon: '二配'
}
}
]
],
},
{
path: '/import-y-data',
name: 'import-y-data',//命名路由-二级
component: () => import('@/views/ux/vw/dataInput/hq_y'),
redirect: 'ux/vw/dataInput/hq_y',
meta: {
title: '一汽轿车平台',
// roles: ['SettleAccount.HQKBs', 'SettleAccount.HQSpecKBs'],
icon: '看板'
},
children: [
{
path: 'hq-Y-platform',
component: () => import('@/views/ux/vw/dataInput/hq_y'),
name: 'ERPEI',//命名路由
meta: {
title: '一汽轿车平台导入',
roles: ['SettleAccount.Boms'],//控制页面角色(可以设置多个角色)
icon: '结算'
}
},
{
path: 'hq-Y-platform-export',
component: () => import('@/views/ux/vw/dataInput/ScrapClaims'),
name: 'ScrapClaims',
meta: {
title: '一汽轿车平台结算差异输出',
roles: ['SettleAccount.FISs'],
icon: '文件'
}
}
]
},
]
}
export default hqMenudataRouter

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

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

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

@ -0,0 +1,594 @@
<!--一汽轿车平台导入功能-->
<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: "HQYPlatform",
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: "hqYPlatform",
versionValue: "",
versionList: [], //
rules: {
//
erpMaterialCode: [
{ required: true, message: "必须输入!", trigger: "blur" },
],
},
searchContent: "", //
customerInfo: {
settleAccountId: "",
},
form: {
dicDetailID: "",
customerId: "",
projectId: "",
},
list: null,
totalCount: 0,
listLoading: true,
formLoading: true,
//
filterObj: {
type: Object,
default: () => {
return {};
},
},
listVersionQuery: {
SkipCount: 0,
MaxResultCount: 15,
},
listQuery: {
Filters: [
{
logic: 0,
column: "Enabled",
action: 0,
value: "true",
}, //
],
//OrgID:"",
SkipCount: 0,
MaxResultCount: 15,
version: "",
site: "TH",
userId: "00000000-0000-0000-0000-000000000000",
},
listExportQuery: {
Filters: [
{
logic: 0,
column: "Enabled",
action: 0,
value: "true",
}, //
],
//OrgID:"",
SkipCount: 0,
MaxResultCount: 15,
version: "",
fileType: 0,
userId: "",
},
page: 1,
dialogFormVisible: false,
multipleSelection: [],
formTitle: "",
drawer: false,
showExcelImport: false,
tableHeight: document.documentElement.clientHeight - 220,
isEdit: false,
};
},
mounted() {
var self = this;
window.onresize = function () {
var offsetHei = document.documentElement.clientHeight;
self.tableHeight = offsetHei - 220;
};
},
created() {
this.getVersionInfo();
if (this.versionList == []) {
this.getList();
}
},
computed: {
/** 列表字段 */
getDefaultField() {
var tempsTabs = [];
tempsTabs.push({ label: "行号", prop: "lineNumber", width: 100 });
tempsTabs.push({ label: "采购类型", prop: "purchaseType", width: 150 });
tempsTabs.push({
label: "采购订单号",
prop: "purchaseOrderNo",
width: 220,
});
tempsTabs.push({
label: "采购订单行项目",
prop: "purchaseOrderNoItem",
width: 170,
});
tempsTabs.push({
label: "采购订单文本",
prop: "purchaseOrderNoText",
width: 170,
});
tempsTabs.push({ label: "收货数量", prop: "receiptQty", width: 120 });
tempsTabs.push({ label: "开票数量", prop: "invoicedQty", width: 120 });
tempsTabs.push({ label: "不含税金额", prop: "amountNoTax", width: 150 });
tempsTabs.push({
label: "采购价格不含税",
prop: "purchasePriceNoTax",
width: 200,
});
tempsTabs.push({ label: "科目号", prop: "accountNum", width: 150 });
tempsTabs.push({ label: "物料代码", prop: "materialCode", width: 180 });
tempsTabs.push({ label: "物料描述", prop: "materialDesc", width: 250 });
tempsTabs.push({
label: "日期",
prop: "spareDate",
width: 150,
formType: "datetime",
});
tempsTabs.push({
label: "交货单号",
prop: "deliveryOrderNo",
width: 150,
});
tempsTabs.push({
label: "交货行号",
prop: "deliveryLineNum",
width: 150,
});
tempsTabs.push({ label: "批次号", prop: "batchNo", width: 150 });
tempsTabs.push({ label: "税率", prop: "taxRate", width: 100 });
tempsTabs.push({ label: "税码", prop: "taxCode", width: 110 });
tempsTabs.push({
label: "德国发票号",
prop: "germanInvoiceNo",
width: 150,
});
tempsTabs.push({ label: "工厂", prop: "factory", width: 150 });
tempsTabs.push({ label: "工厂名称", prop: "factoryName", width: 220 });
return tempsTabs;
},
},
methods: {
handleCommand(command) {
if (this.versionValue === "") {
this.$message.error("请先选择版本!");
return;
}
switch (command) {
case "excel":
this.listQuery.fileType = 1; //0csv,1excel
break;
case "csv":
this.listQuery.fileType = 0; //0csv,1excel
break;
default:
//
break;
}
this.listLoading = true;
if (this.versionValue === "") {
this.$message.error("必需选择版本!");
this.listLoading = false;
return;
}
if (this.versionValue != "") {
this.listQuery.version = this.versionValue;
}
console.log("一汽轿车平台导出:" + JSON.stringify(this.listQuery));
this.$axios
.posts("/api/settleaccount/HQHPlatform/Export", this.listQuery)
.then((res) => {
let fileNameOfProject = res;
this.$axios
.BolbGets(
"/api/settleaccount/getblobfile/download/" + fileNameOfProject
)
.then((response) => {
if (fileNameOfProject.indexOf("_") != -1) {
let downName =
fileNameOfProject.slice(
0,
fileNameOfProject.lastIndexOf("_")
) +
fileNameOfProject.slice(fileNameOfProject.lastIndexOf("."));
downloadFile(response, downName);
this.$notify({
title: "成功",
message: "数据-导出成功!",
type: "success",
duration: 2000,
});
} else {
downloadFile(response, fileNameOfProject);
this.$notify({
title: "成功",
message: "数据-导出成功!",
type: "success",
duration: 2000,
});
}
this.listLoading = false;
});
});
},
selectValue(params) {
//
this.versionValue = params.value;
this.getList();
},
selectOptionsChange(item) {
this.getList();
},
getVersionInfo() {
//
//this.listLoading = true;
this.listQuery.SkipCount = (this.page - 1) * 1000;
this.$axios
.posts("/api/settleaccount/HQHPlatform/listVersion", this.listQuery)
.then((response) => {
this.versionList = [];
response.items.forEach((element) => {
let options = {};
options.value = element.id;
options.label = element.version;
this.versionList.push(options);
});
if (JSON.stringify(this.versionList) != "[]") {
//
this.versionValue = this.versionList[0].label;
this.getList();
}
this.listLoading = false;
})
.catch(() => {
this.listLoading = false;
});
},
handleImportExcel() {
//
this.showExcelImport = true;
this.$refs.importexcel.handleImportExcelClick();
},
/** 刷新列表 */
handleHandle(data) {
if (data.type !== "edit") {
this.getList();
}
},
/** 格式化字段 */
fieldFormatter(row, column) {
// if (column.property === "state") {
// return { 0: "", 2: "" }[row[column.property]];
// }
if (
column.property == "settleInputDate" ||
column.property == "settleDate"
) {
var date = row[column.property];
if (date == undefined) {
return "";
}
return moment(date).format("YYYY-MM-DD HH:mm:ss");
}
return row[column.property] || "--";
},
importExcelData() {
this.getVersionInfo();
this.listLoading = false;
//
this.showExcelImport = false;
},
getList() {
this.listLoading = true;
this.listQuery.SkipCount = (this.page - 1) * 10;
if (this.versionValue != "") {
this.listQuery.version = this.versionValue;
}
console.log("列表查询条件:" + JSON.stringify(this.listQuery));
this.$axios
.posts("/api/settleaccount/HQHPlatform/list", this.listQuery)
.then((response) => {
this.list = response.items;
this.totalCount = response.totalCount;
setTimeout(() => {
//
this.listLoading = false;
}, 500);
})
.catch(() => {
this.listLoading = false;
});
},
fetchData(id) {
//
this.$axios
.gets("/api/settleaccount/HQHPlatform/" + id)
.then((response) => {
this.form = response;
});
},
/** 筛选操作 */
handleFilter() {
this.page = 1;
this.getList();
this.listQuery.Filters = [];
if (this.searchContent != "") {
var column = "purchaseOrderNo";
let filter = {
logic: 0,
column: column,
action: 0,
value: this.searchContent,
};
this.listQuery.Filters.push(filter);
}
this.getList();
},
/** 多项筛选操作 */
/** 筛选操作 */
handleFilters(data) {
if (data === null) {
this.listQuery.Filters = [];
this.getList(); //
} else {
this.filterObj = data;
console.log("筛选" + JSON.stringify(data));
var offsetHei = document.documentElement.clientHeight;
var removeHeight = Object.keys(this.filterObj).length > 0 ? 310 : 240;
this.tableHeight = offsetHei - removeHeight;
this.currentPage = 1;
let Filter = [];
data.forEach((item) => {
let filter = {};
if (item.formType === "datetime" || item.formType === "datetime") {
// (datetime >= a and datetime <=b)
filter["Column"] = item.fieldName;
filter["Logic"] = 0;
filter["Value"] = item.value[0];
filter["Action"] = item.action;
Filter.push(filter);
if (item.value[1] != null) {
filter["Value"] = item.value[1];
filter["Action"] = 5;
Filter.push(filter);
}
} else {
filter["Column"] = item.fieldName;
filter["Value"] = item.value;
filter["Logic"] = 0;
filter["Action"] = item.action;
Filter.push(filter);
}
});
console.log("筛选条件" + JSON.stringify(Filter));
this.listQuery.Filters = Filter;
this.getList();
}
},
resetQuery() {},
sortChange(data) {
const { prop, order } = data;
if (!prop || !order) {
this.handleFilter();
return;
}
this.listQuery.Sorting = prop + " " + order;
console.log(this.listQuery.Sorting);
this.handleFilter();
},
handleSelectionChange(val) {
this.multipleSelection = val;
},
/** 通过回调控制style */
cellStyle({ row, column, rowIndex, columnIndex }) {
// if (column.property === "qty") {
// return { textAlign: "right" };
// } else {
// return { textAlign: "left" };
// }
return { textAlign: "left" };
},
/** 通过回调控制表头style */
headerRowStyle({ row, column, rowIndex, columnIndex }) {
if (column.property === "qty") {
return { textAlign: "right", background: "#FAFAFA" };
} else {
return { textAlign: "left", background: "#FAFAFA" };
}
},
handleRowClick(row, column, event) {
this.$refs.multipleTable.clearSelection();
this.$refs.multipleTable.toggleRowSelection(row);
},
},
};
</script>
<style lang="scss" scoped>
@import "../../../styles/crmtable.scss";
</style>
<style lang="scss">
.el-table .cell.el-tooltip {
white-space: pre-wrap;
}
</style>
Loading…
Cancel
Save