Browse Source

更新

branch_ccpg_220107
Administrator 3 years ago
parent
commit
2b6f6d988d
  1. 10990
      src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Migrations/20211221015126_init.Designer.cs
  2. 4640
      src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Migrations/20211221015126_init.cs
  3. 10988
      src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Migrations/SettleAccountHttpApiHostMigrationsDbContextModelSnapshot.cs
  4. 20
      src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/HQ_H/HQ_H_PlatformDto.cs
  5. 20
      src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/HQ_H/HQ_H_PlatformDtoBase.cs
  6. 24
      src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/HQ_H/HQ_H_PlatformExportDto.cs
  7. 24
      src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/HQ_H/HQ_H_PlatformImportDto.cs
  8. 20
      src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/HQ_H/HQ_H_PlatformRequestDto.cs
  9. 2
      src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BT_Car/BT_Car_PlatformAppService.cs
  10. 5
      src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccount.Application.xml
  11. 28
      src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationAutoMapperProfile.cs
  12. 41
      src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/HQ_H/HQ_H_Platform.cs
  13. 92
      src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/SettleAccountDbContextModelCreatingExtensions.cs
  14. 4
      src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/SettleSparePartDapperReportRepository.cs
  15. 11
      vue/src/router/modules/basedata.js
  16. 6
      vue/src/router/modules/hq_menu.js
  17. 29
      vue/src/router/modules/vw_menu.js
  18. 10
      vue/src/router/modules/vw_out_order.js
  19. 19
      vue/src/views/ux/billManage/IssuedUnsettled/index.vue
  20. 1053
      vue/src/views/ux/billManage/KanbanUnSettled/index.vue
  21. 1357
      vue/src/views/ux/billManage/kanBanWithOutCode/index.vue
  22. 517
      vue/src/views/ux/billManage/kanbanWithOutOrder/detail.vue
  23. 340
      vue/src/views/ux/billManage/kanbanWithOutOrder/index.vue
  24. 331
      vue/src/views/ux/billManage/sparePart/index.vue

10990
src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Migrations/20211221015126_init.Designer.cs

File diff suppressed because it is too large

4640
src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Migrations/20211221015126_init.cs

File diff suppressed because it is too large

10988
src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Migrations/SettleAccountHttpApiHostMigrationsDbContextModelSnapshot.cs

File diff suppressed because it is too large

20
src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/HQ_H/HQ_H_PlatformDto.cs

@ -69,5 +69,25 @@ namespace Win.Sfs.SettleAccount.Entities.HQ_H
/// 存储地点描述
/// </summary>
public string StorageLocationDesc { get; set; }
/// <summary>
///验收单号
/// </summary>
public string AcceptanceNo { get; set; }
/// <summary>
/// 数量
/// </summary>
public decimal Qty { set; get; }
/// <summary>
/// 单价
/// </summary>
public decimal Price { set; get; }
/// <summary>
/// 金额
/// </summary>
public decimal Amt { set; get; }
}
}

20
src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/HQ_H/HQ_H_PlatformDtoBase.cs

@ -68,6 +68,26 @@ namespace Win.Sfs.SettleAccount.Entities.HQ_H
/// 存储地点描述
/// </summary>
public string StorageLocationDesc { get; set; }
/// <summary>
///验收单号
/// </summary>
public string AcceptanceNo { get; set; }
/// <summary>
/// 数量
/// </summary>
public decimal Qty { set; get; }
/// <summary>
/// 单价
/// </summary>
public decimal Price { set; get; }
/// <summary>
/// 金额
/// </summary>
public decimal Amt { set; get; }
}
}

24
src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/HQ_H/HQ_H_PlatformExportDto.cs

@ -81,5 +81,29 @@ namespace Win.Sfs.SettleAccount.Entities.HQ_H
/// </summary>
[ExporterHeader(DisplayName = "存储地点描述")]
public string StorageLocationDesc { get; set; }
/// <summary>
///验收单号
/// </summary>
[ExporterHeader(DisplayName = "验收单号")]
public string AcceptanceNo { get; set; }
/// <summary>
/// 数量
/// </summary>
[ExporterHeader(DisplayName = "数量")]
public decimal Qty { set; get; }
/// <summary>
/// 单价
/// </summary>
[ExporterHeader(DisplayName = "单价")]
public decimal Price { set; get; }
/// <summary>
/// 金额
/// </summary>
[ExporterHeader(DisplayName = "金额")]
public decimal Amt { set; get; }
}
}

24
src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/HQ_H/HQ_H_PlatformImportDto.cs

@ -81,5 +81,29 @@ namespace Win.Sfs.SettleAccount.Entities.HQ_H
/// </summary>
[ImporterHeader(Name = "存储地点描述")]
public string StorageLocationDesc { get; set; }
/// <summary>
///验收单号
/// </summary>
[ImporterHeader(Name = "验收单号")]
public string AcceptanceNo { get; set; }
/// <summary>
/// 数量
/// </summary>
[ImporterHeader(Name = "数量")]
public decimal Qty { set; get; }
/// <summary>
/// 单价
/// </summary>
[ImporterHeader(Name = "单价")]
public decimal Price { set; get; }
/// <summary>
/// 金额
/// </summary>
[ImporterHeader(Name = "金额")]
public decimal Amt { set; get; }
}
}

20
src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/HQ_H/HQ_H_PlatformRequestDto.cs

@ -65,6 +65,26 @@ namespace Win.Sfs.SettleAccount.Entities.HQ_H
/// </summary>
public string StorageLocation { get; set; }
/// <summary>
///验收单号
/// </summary>
public string AcceptanceNo { get; set; }
/// <summary>
/// 数量
/// </summary>
public decimal Qty { set; get; }
/// <summary>
/// 单价
/// </summary>
public decimal Price { set; get; }
/// <summary>
/// 金额
/// </summary>
public decimal Amt { set; get; }
/// <summary>
/// 存储地点描述
/// </summary>

2
src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BT_Car/BT_Car_PlatformAppService.cs

@ -28,7 +28,7 @@ namespace Win.Sfs.SettleAccount.Entities.BT_Car
/// <summary>
/// 一汽轿车平台导入
/// </summary>
//[Authorize(SettleAccountPermissions.HQ_MPlatform.Default)]
//[Authorize(SettleAccountPermissions.BT_Carlatform.Default)]
//[AllowAnonymous]
[Route("api/settleaccount/BT_Carlatform")]
public class BT_Car_PlatformAppService : SettleAccountApplicationBase<BT_Car_Platform>, IBT_Car_PlatformAppService

5
src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccount.Application.xml

@ -3030,6 +3030,11 @@
<param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
<returns></returns>
</member>
<member name="M:Win.Sfs.SettleAccount.SettleAccountApplicationAutoMapperProfile.CreateMapHQ_Car_Platform">
<summary>
一汽轿车平台导入
</summary>
</member>
<member name="M:Win.Sfs.SettleAccount.SettleAccountApplicationAutoMapperProfile.CreateMapHQ_F_Platform">
<summary>
红旗F平台导入

28
src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationAutoMapperProfile.cs

@ -86,6 +86,7 @@ using Win.Sfs.SettleAccount.Entities.WMSSparePart;
using Win.Sfs.SettleAccount.Entities.HQ_H;
using Win.Sfs.SettleAccount.Entities.HQ_M;
using Win.Sfs.SettleAccount.Entities.HQ_F;
using Win.Sfs.SettleAccount.Entities.HQ_Car;
namespace Win.Sfs.SettleAccount
{
@ -235,11 +236,38 @@ namespace Win.Sfs.SettleAccount
CreateMapHQ_F_Platform();
CreateMapHQ_F_PlatformVersion();
//一汽轿车
CreateMapHQ_Car_Platform();
CreateMapHQ_Car_PlatformVersion();
#endregion
}
#region PG-派格映射
/// <summary>
/// 一汽轿车平台导入
/// </summary>
private void CreateMapHQ_Car_Platform()
{
CreateMap<HQ_Car_Platform, HQ_Car_PlatformDto>().ReverseMap();
CreateMap<HQ_Car_Platform, HQ_Car_PlatformRequestDto>().ReverseMap();
CreateMap<HQ_Car_Platform, HQ_Car_PlatformImportDto>().ReverseMap();
CreateMap<HQ_Car_Platform, HQ_Car_PlatformExportDto>().ReverseMap();
CreateMap<HQ_Car_Platform, HQ_Car_PlatformExportDto>().ReverseMap();
}
private void CreateMapHQ_Car_PlatformVersion()
{
CreateMap<HQ_Car_PlatformVersion, HQ_Car_PlatformVersionDto>().ReverseMap();
CreateMap<HQ_Car_PlatformVersion, HQ_Car_PlatformVersionCreateDto>();
CreateMap<HQ_Car_PlatformVersion, HQ_Car_PlatformVersionUpdateDto>();
CreateMap<HQ_Car_PlatformVersionCreateDto, HQ_Car_PlatformVersion>();
CreateMap<HQ_Car_PlatformVersionUpdateDto, HQ_Car_PlatformVersion>();
}
/// <summary>
/// 红旗F平台导入
/// </summary>

41
src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/HQ_H/HQ_H_Platform.cs

@ -67,11 +67,7 @@ namespace Win.Sfs.SettleAccount.Entities.HQ_H
/// </summary>
[Display(Name = "物料凭证号")]
public string MaterialVoucherNo { get; set; }
///// <summary>
/////验收单号
///// </summary>
//[Display(Name = "验收单号")]
//public string AcceptanceNo { get; set; }
/// <summary>
///会计年度
/// </summary>
@ -124,24 +120,29 @@ namespace Win.Sfs.SettleAccount.Entities.HQ_H
[Display(Name = "存储地点描述")]
public string StorageLocationDesc { get; set; }
/// <summary>
///验收单号
/// </summary>
[Display(Name = "验收单号")]
public string AcceptanceNo { get; set; }
///// <summary>
///// 数量
///// </summary>
//[Display(Name = "数量")]
//public decimal Qty { set; get; }
/// <summary>
/// 数量
/// </summary>
[Display(Name = "数量")]
public decimal Qty { set; get; }
///// <summary>
///// 单价
///// </summary>
//[Display(Name = "单价")]
//public decimal Price { set; get; }
/// <summary>
/// 单价
/// </summary>
[Display(Name = "单价")]
public decimal Price { set; get; }
///// <summary>
///// 金额
///// </summary>
//[Display(Name = "金额")]
//public decimal Amt { set; get; }
/// <summary>
/// 金额
/// </summary>
[Display(Name = "金额")]
public decimal Amt { set; get; }
/// <summary>

92
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
@ -319,9 +320,11 @@ namespace Win.Sfs.SettleAccount
builder.ConfigureHQM(options);
builder.ConfigureHQMVersion(options);
//一汽轿车
//派格一汽轿车
builder.ConfigureBTCar(options);
builder.ConfigureBTCarVersion(options);
builder.ConfigureWmsJitOutPutDetail(options);
builder.ConfigureWmsJitOutPutVersion(options);
builder.ConfigureWmsJitOutPutDetail(options);
@ -344,6 +347,7 @@ namespace Win.Sfs.SettleAccount
#region PG-派格
private static void ConfigureHQFKanban(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options)
{
@ -420,6 +424,56 @@ namespace Win.Sfs.SettleAccount
/// <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>
@ -482,7 +536,7 @@ namespace Win.Sfs.SettleAccount
b.ToTable($"{options.TablePrefix}_BT_Car_Platform", options.Schema);
b.ConfigureByConvention();
b.Property(x => x.BTCarKanBan).IsRequired().HasMaxLength(150);//必填项
b.Property(x => x.BTCarKanBan).HasMaxLength(150);//一汽轿车没有看板号,为空
b.Property(x => x.MaterialVoucherNo).HasMaxLength(150);
b.Property(x => x.Factory).HasMaxLength(50);
b.Property(x => x.MaterialCode).IsRequired().HasMaxLength(150);
@ -500,6 +554,22 @@ namespace Win.Sfs.SettleAccount
});
}
private static void ConfigureBTCarVersion(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options)
{
builder.Entity<BT_Car_PlatformVersion>(b =>
{
b.ToTable($"{options.TablePrefix}_BT_Car_PlatformVersion", options.Schema);
b.ConfigureByConvention();
b.Property(x => x.Year).HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.Period).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>
/// 准时化出库明细
/// </summary>
@ -529,22 +599,6 @@ namespace Win.Sfs.SettleAccount
private static void ConfigureBTCarVersion(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options)
{
builder.Entity<SparePartVersion>(b =>
{
//b.ToTable($"{options.TablePrefix}_BT_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>
/// 红旗工厂M平台验收结算明细-导入
/// </summary>
@ -619,6 +673,8 @@ namespace Win.Sfs.SettleAccount
b.Property(x => x.Supplier).HasMaxLength(50);
b.Property(x => x.StorageLocation).HasMaxLength(50);
b.Property(x => x.StorageLocationDesc).HasMaxLength(150);
b.Property(x => x.AcceptanceNo).HasMaxLength(50);
//创建组合索引
b.HasIndex(x => new { x.Version, x.HQHKanBan, x.MaterialCode }).IsUnique().HasFilter(IsDeletedFilter);

4
src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/SettleSparePartDapperReportRepository.cs

@ -31,6 +31,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
"FROM\n" +
" (\n" +
" SELECT\n" +
" c.LineNumber,--行号\n" +
" c.Period AS WMSDeliveryDate,--交货日期\n" +
" c.WMSDeliveryNote,--交货单号\n" +
" c.SpareDate AS OrderDate,--订单日期\n" +
@ -172,6 +173,9 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
//[ExcelExporter(Name = "未结明细", AutoFitAllColumn = true, MaxRowNumberOnASheet = 500000)]
public class SettleSparePartExport
{
[ExporterHeader(DisplayName = "行号")]
public string LineNumber { set; get; }
[ExporterHeader(DisplayName = "交货日期")]
public string WMSDeliveryDate { set; get; }

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

@ -38,16 +38,7 @@ const basedataRouter = {
name: 'codeSetting',//命名路由
meta: { title: '通用代码设置', roles: ['SettleAccount.CodeSettings'], icon: '通用' }
},
{
path: 'part-settlement',
component: () => import('@/views/ux/basedata/partsSettlement/index'),
name: 'partsSettlement',//命名路由
meta: {
title: '总成与结算件关系',
roles: ['SettleAccount.MaterialRelationships'],
icon: '零件'
}
},
{
path: 'priceList',
component: () => import('@/views/ux/basedata/priceList/index'),

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

@ -14,7 +14,7 @@ const hqMenudataRouter = {
},
children: [
{
path: '/import-h-data',
path: '/H',
name: 'import-h-data',//命名路由-二级
component: () => import('@/views/ux/vw/dataInput/hq_h'),
redirect: 'ux/vw/dataInput/hq_h',
@ -47,7 +47,7 @@ const hqMenudataRouter = {
]
},
{
path: '/export-m-data',
path: '/M',
component: () => import('@/views/ux/vw/dataInput/hq_m'),
name: 'export-m-data',//命名路由
redirect: '/ux/vw/dataInput/hq_m',
@ -81,7 +81,7 @@ const hqMenudataRouter = {
]
},
{
path: '/export-f-data',
path: '/F',
component: () => import('@/views/ux/vw/dataInput/hq_f'),
name: 'export-f-data',//命名路由
redirect: '/ux/vw/dataInput/hq_f',

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

@ -142,11 +142,11 @@ const vwMenudataRouter = {
component: () => import('@/views/ux/billManage/IssuedUnsettled/index'),
name: 'UnsettledDetail',//命名路由
meta: {
title: '准时化未结明细',
roles: ['SettleAccount.Reports'],//控制页面角色(可以设置多个角色)
icon: '报表'
title: '准时化未结明细',
roles: ['SettleAccount.Reports'],//控制页面角色(可以设置多个角色)
icon: '报表'
}
},
},
{
path: '/kbwithcode',
component: () => import('@/views/ux/billManage/kanBanWithCode'),
@ -157,7 +157,26 @@ const vwMenudataRouter = {
icon: '看板'
}
},
{
path: '/kbunsettle',
component: () => import('@/views/ux/billManage/KanbanUnSettled'),
name: 'KanbanUnSettled',//命名路由
meta: {
title: '看板未结输出',
//roles: ['SettleAccount.EstimatedStockDiffReports'],//控制页面角色(可以设置多个角色)
icon: '看板'
}
},
{
path: '/kbwithoutcode',
component: () => import('@/views/ux/billManage/kanBanWithOutCode'),
name: 'KanBanWithOutCode',//命名路由
meta: {
title: '无条码看板结算输出',
//roles: ['SettleAccount.EstimatedStockDiffReports'],//控制页面角色(可以设置多个角色)
icon: '看板'
}
},
{
path: '/vwsparepart',
component: () => import('@/views/ux/billManage/sparePart'),

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

@ -36,6 +36,16 @@ const vwOutOrderDataRouter = {
icon: '结算'
}
},
{
path: 'kanban-without-order',
component: () => import('@/views/ux/billManage/kanbanWithOutOrder/index'),
name: 'SettleAccount',//命名路由
meta: {
title: '大众无条码看板出库单',
roles: ['SettleAccount.SettleAccounts'],//控制页面角色(可以设置多个角色)
icon: '结算'
}
},
{
path: 'sparepart-out-order',
component: () => import('@/views/ux/billManage/sparepartOutOrder/index'),

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

@ -1,4 +1,4 @@
<!--发出未结算明细页-->
<!--准时化发出未结算明细页-->
<template>
<div class="cr-body-content">
<!--功能栏-->
@ -636,15 +636,14 @@ export default {
searchContent: "", //
form: {},
formCount: {
startTime: "",
endTime: "",
// name: "",
// settledate: "",
// materialCode: "",
// sapMaterialCode: "",
// chassisNumber: "",
// kennCode: "",
// version: "",
version: "",
materialCode: undefined,
kenncode: undefined,
chassisNumber: undefined,
materialGroup: undefined,
begin: undefined,
end: undefined,
sapMaterialCode: undefined,
},
list: null,
totalCount: 0,

1053
vue/src/views/ux/billManage/KanbanUnSettled/index.vue

File diff suppressed because it is too large

1357
vue/src/views/ux/billManage/kanBanWithOutCode/index.vue

File diff suppressed because it is too large

517
vue/src/views/ux/basedata/partsSettlement/index.vue → vue/src/views/ux/billManage/kanbanWithOutOrder/detail.vue

@ -1,52 +1,43 @@
<!--总成与结算件关系页-->
<!--FIS发运数据对比输出表-明细数据-->
<template>
<div class="cr-body-content">
<flexbox class="content-header">
<span>版本:</span>
<XhJSSelect
:options="versionList"
style="width: 200px"
<!-- <el-button
class="filter-item"
size="mini"
type="info"
icon="el-icon-download"
@click="handleDownload()"
>导出全部
</el-button> -->
<JobSelectVerson
:options="JobVersionList"
style="width: 150px; margin-left: -10px"
class="search-container"
@value-change="selectValue"
></XhJSSelect>
<span>适用功能</span>
<el-select
v-model="valueSelect"
clearable
placeholder="请选结算或二配"
size="medium"
style="margin-right: 15px"
@change="valueselectChange"
>
<el-option label="结算" value="R0003"></el-option>
<el-option label="二配" value="R0001"></el-option>
</el-select>
@value-change="JobVersionValue"
></JobSelectVerson>
<el-button
class="filter-item"
type="success"
icon="el-icon-check"
size="mini"
type="primary"
icon="el-icon-plus"
@click="handleImportExcel()"
>导入文件Excel
</el-button>
@click="handleCreateBills()"
>确认出库单(支持批量)</el-button
>
<el-button
class="filter-item"
size="mini"
type="warning"
icon="el-icon-bottom"
@click="handleDownload()"
>导出Excel
icon="el-icon-download"
@click="handleCancelBills()"
>取消出库(支持批量)
</el-button>
<el-input
v-model="searchContent"
clearable
size="small"
placeholder="按照ERP物料号搜索..."
style="width: 200px"
placeholder="按照零件号搜索..."
style="width: 230px"
class="search-container"
@keyup.enter.native="handleFilter"
/>
@ -69,7 +60,7 @@
<!--表格渲染-->
<el-table
ref="multipleTable"
v-loading.fullscreen.lock="listLoading"
v-loading="listLoading"
element-loading-text="拼命加载中..."
element-loading-spinner="el-icon-loading"
class="cr-table"
@ -86,20 +77,7 @@
@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 type="selection" width="44px"></el-table-column>
<el-table-column
v-for="(item, index) in getDefaultField"
:key="index"
@ -125,13 +103,6 @@
:limit.sync="listQuery.MaxResultCount"
@pagination="getList"
/>
<!-- 导入Excel组件 -->
<importExcel
ref="importexcel"
:show="showExcelImport"
:crmType="crmType"
@close="importExcelData"
/>
</div>
</div>
</template>
@ -139,27 +110,14 @@
<script>
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
import permission from "@/directive/permission/index.js";
import importExcel from "@/components/ImportExcel-hq";
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";
import JobSelectVerson from "@/components/CreateCom/Job-Select.vue";
export default {
name: "MaterialRelationshipDetail",
components: { Pagination, CRMTableHead, importExcel, XhJSSelect },
name: "sendUnsettledDiffReport",
components: { Pagination, CRMTableHead, CRMTableHead, JobSelectVerson },
directives: { permission },
filters: {
IsCustomerSignFilter(status) {
//
const statusMap = {
true: "是",
false: "否",
};
return statusMap[status];
},
},
props: {
customerInfos: {
type: Array,
@ -170,10 +128,7 @@ export default {
},
data() {
return {
crmType: "materialRelation",
versionValue: "",
valueSelect: "R0003",
versionList: [], //
crmType: "kanbanOutOrder",
rules: {
//
erpMaterialCode: [
@ -182,7 +137,8 @@ export default {
},
searchContent: "", //
customerInfo: {
settleAccountId: "",
parentId: "",
version: "",
},
form: {
dicDetailID: "",
@ -193,6 +149,13 @@ export default {
totalCount: 0,
listLoading: true,
formLoading: false,
JobVersionList: [
{ value: "0", label: "未处理" },
{ value: "1", label: "申请出库" },
{ value: "2", label: "确认出库" },
{ value: "3", label: "不能出库" },
{ value: "4", label: "取消出库" },
],
//
filterObj: {
type: Object,
@ -200,10 +163,6 @@ export default {
return {};
},
},
listVersionQuery: {
SkipCount: 0,
MaxResultCount: 15,
},
listQuery: {
Filters: [
{
@ -213,35 +172,24 @@ export default {
value: "true",
}, //
],
//OrgID:"",
SkipCount: 0,
MaxResultCount: 15,
version: "",
customerCode: ""
billNum: "",
},
listExportQuery: {
Filters: [
{
logic: 0,
column: "Enabled",
action: 0,
value: "true",
}, //
],
//OrgID:"",
SkipCount: 0,
MaxResultCount: 15,
listOutPutQuery: {
version: "",
fileType: 0,
userId: "",
guids: "",
billNum: "",
},
page: 1,
JobversionValue: "",
JobversionValueVerson: "",
dialogFormVisible: false,
multipleSelection: [],
formTitle: "",
drawer: false,
showExcelImport: false,
tableHeight: document.documentElement.clientHeight - 260,
tableHeight: document.documentElement.clientHeight - 230,
isEdit: false,
};
},
@ -249,127 +197,217 @@ export default {
var self = this;
window.onresize = function () {
var offsetHei = document.documentElement.clientHeight;
self.tableHeight = offsetHei - 260;
self.tableHeight = offsetHei - 190;
};
},
created() {
this.getVersionInfo();
//if (this.versionList == []) {
this.getList();
// }
this.getList();
},
watch: {
customerInfos: {
handler(newVal) {
if (newVal == "" || newVal == "undefined") {
//TODO
} else {
newVal.forEach((element) => {
this.customerInfo.parentId = element.ParentId;
this.customerInfo.version = element.Version;
});
if (this.customerInfo.parentId != "") {
this.getList();
}
}
},
immediate: true,
},
},
computed: {
/** 列表字段 */
getDefaultField() {
var tempsTabs = [];
tempsTabs.push({
label: "适配功能",
prop: "customerCode",
width: 150,
label: "版本",
prop: "version",
width: 110,
});
tempsTabs.push({
label: "ERP物料号",
prop: "erpMaterialCode",
label: "零件号",
prop: "materialCode",
width: 150,
});
tempsTabs.push({
label: "ERP物料描述",
prop: "materialDesc",
width: 250,
});
tempsTabs.push({
label: "结算物料号",
prop: "settleMaterialCode",
width: 120,
});
tempsTabs.push({
label: "数量",
prop: "qty",
width: 120,
});
tempsTabs.push({ label: "零件描述", prop: "materialDesc", width: 250 });
tempsTabs.push({ label: "物料组", prop: "materialGroup", width: 220 });
tempsTabs.push({ label: "交货单号", prop: "wmsBillNum", width: 100 });
tempsTabs.push({ label: "数量", prop: "qty", width: 100 });
tempsTabs.push({ label: "状态", prop: "state", width: 100 });
return tempsTabs;
},
MoreTypes() {
var moreTypes = [];
moreTypes.push({ type: "updateFis", name: "更新FIS结算数据" });
//moreTypes.push({ type: "enter", name: "" });
return moreTypes;
},
},
methods: {
handleImportExcel() {
//
this.showExcelImport = true;
this.$refs.importexcel.handleImportExcelClick();
},
selectValue(params) {
//
JobVersionValue(params) {
//
this.versionValue = params.value;
this.getList();
},
valueselectChange(data) {
//alert(data);
//
this.valueSelect = data;
this.listQuery.Filters = [];
var column = "state";
let filter = {
logic: 0,
column: column,
action: 0,
value: params.value,
};
this.listQuery.Filters.push(filter);
this.getList();
},
handleTypeDrop(command, params = {}) {
if (command == "updateFis") {
this.listLoading = true;
//this.listQuery.SkipCount = (this.page - 1) * 10000;
this.$axios
.posts("/api/settleaccount/MaterialRelationshipDetail/updateFis")
.then((res) => {
if (res == true) {
//
handleCancelBills(row) {
if (this.multipleSelection.length == 0) {
this.$message({
message: "至少选择一行!",
type: "warning",
});
return;
}
var params = [];
let myalert = ""; //使
if (row) {
//
params.push(row.id);
myalert = row.name;
} else {
//
this.multipleSelection.forEach((element) => {
let id = element.id;
params.push(id);
});
myalert = "选中项";
}
this.listOutPutQuery.version = this.customerInfo.version;
this.listOutPutQuery.guids = params;
this.listOutPutQuery.billNum = this.customerInfo.parentId;
console.log("取消出库条件:" + JSON.stringify(this.listOutPutQuery));
this.$confirm("是否确认取消出库" + myalert + "?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.$axios
.posts(
"/api/settleaccount/wmskanbanoutput/WmsKanbanOutPut-Cancel",
this.listOutPutQuery
)
.then((response) => {
const index = this.list.indexOf(row);
this.$notify({
title: "成功",
message: "FIS数据-更新成功!",
message: "操作成功",
type: "success",
duration: 2000,
});
} else {
this.$message({
type: "warning",
message: "FIS数据-更新失败!",
this.getList();
});
})
.catch(() => {
this.$message({
type: "info",
message: "已取消操作",
});
});
},
//
handleCreateBills(row) {
if (this.multipleSelection.length == 0) {
this.listLoading = true;
this.listOutPutQuery.guids = [];
this.listOutPutQuery.version = this.customerInfo.version;
this.listOutPutQuery.billNum = this.customerInfo.parentId;
console.log(
"未选择时全部确认出库条件:" + JSON.stringify(this.listOutPutQuery)
);
this.$confirm("是否全部确认出库?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.$axios
.posts(
"/api/settleaccount/wmskanbanoutput/WmsKanbanOutPut-Pass",
this.listOutPutQuery
)
.then((response) => {
const index = this.list.indexOf(row);
this.$notify({
title: "成功",
message: "生成成功",
type: "success",
duration: 2000,
});
this.getList();
this.listLoading = false;
});
}
})
.catch(() => {
this.$message({
type: "info",
message: "已取消操作",
});
this.listLoading = false;
});
} else if (command == "enter") {
}
},
selectOptionsChange(item) {
this.getList();
},
getVersionInfo() {
//
//this.listLoading = true;
this.listQuery.SkipCount = (this.page - 1) * 1000;
this.$axios
.posts(
"/api/settleaccount/MaterialRelationshipDetail/versionlist",
this.listQuery
)
.then((response) => {
this.versionList = [];
response.items.forEach((element) => {
let options = {};
options.value = element.id;
options.label = element.version;
this.versionList.push(options);
} else {
this.listLoading = true;
var params = [];
let myalert = ""; //使
if (row) {
//
params.push(row.id);
myalert = row.name;
} else {
//
this.multipleSelection.forEach((element) => {
let id = element.id;
params.push(id);
});
const res = new Map()
this.versionList = this.versionList.filter((item) => !res.has(item.label) && res.set(item.label, 1))
if (JSON.stringify(this.versionList) != "[]") {
//
this.versionValue = this.versionList[0].label;
this.getList();
}
myalert = "选中项";
}
this.listOutPutQuery.version = this.customerInfo.version;
this.listOutPutQuery.guids = params;
this.listOutPutQuery.billNum = this.customerInfo.parentId;
console.log(
"部分选择时确认出库条件:" + JSON.stringify(this.listOutPutQuery)
);
this.$confirm("是否确认将选中的出库" + myalert + "?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.catch(() => {
this.listLoading = false;
});
.then(() => {
this.$axios
.posts(
"/api/settleaccount/wmskanbanoutput/WmsKanbanOutPut-Pass",
this.listOutPutQuery
)
.then((response) => {
const index = this.list.indexOf(row);
this.$notify({
title: "成功",
message: "生成成功",
type: "success",
duration: 2000,
});
this.getList();
this.listLoading = false;
});
})
.catch(() => {
this.$message({
type: "info",
message: "已取消操作",
});
this.listLoading = false;
});
}
},
/** 刷新列表 */
handleHandle(data) {
@ -379,49 +417,29 @@ export default {
},
/** 格式化字段 */
fieldFormatter(row, column) {
if (column.property === "customerCode") {
if (row[column.property] === "R0001") {
var vname = "二配";
return vname;
} else if (row[column.property] === "R0003") {
var vname = "结算";
return vname;
} else {
return row[column.property];
}
if (column.property == "state") {
return {
0: "未处理",
1: "申请出库",
2: "确认出库",
3: "不能出库",
4: "取消出库",
}[row[column.property]];
}
return row[column.property] || "--";
},
importExcelData() {
this.getVersionInfo();
this.listLoading = false;
//
this.showExcelImport = false;
this.getList();
},
//
async handleDownload() {
//await this.getDownBoms();
this.listLoading = true;
if (this.versionValue === "") {
this.$message.error("必需选择版本!");
this.listLoading = false;
return;
}
if (this.valueSelect === "") {
this.$message.error("必需选择适用功能!");
this.listLoading = false;
return;
}
if (this.valueSelect != "") {
this.listQuery.customerCode = this.valueSelect;
}
if (this.versionValue != "") {
this.listQuery.version = this.versionValue;
}
console.log("总成与结算件的导出条件:" + JSON.stringify(this.listQuery));
this.$axios
.posts(
"/api/settleaccount/MaterialRelationshipDetail/Export",
this.listQuery
.gets(
"/api/settleaccount/bt-kb-not-consign/export/" +
this.customerInfo.parentId
)
.then((res) => {
let fileNameOfProject = res;
@ -457,25 +475,23 @@ export default {
});
});
},
getList() {
getList(data) {
this.listLoading = true;
this.listQuery.SkipCount = (this.page - 1) * 10;
if (this.versionValue != "") {
this.listQuery.version = this.versionValue;
}
if (this.valueSelect != "") {
this.listQuery.customerCode = this.valueSelect;
if (data != undefined) {
this.listQuery.SkipCount = (this.page - 1) * data.limit;
} else {
this.listQuery.customerCode = "";
this.listQuery.SkipCount = (this.page - 1) * 15;
}
console.log("列表查询条件:" + JSON.stringify(this.listQuery));
this.listQuery.billNum = this.customerInfo.parentId;
console.log("查询条件:" + JSON.stringify(this.listQuery));
this.$axios
.posts(
"/api/settleaccount/MaterialRelationshipDetail/list",
"/api/settleaccount/wmskanbanoutput/WmsKanbanDetailList",
this.listQuery
)
.then((response) => {
this.list = response.items;
//alert(JSON.stringify(response.Items))
this.totalCount = response.totalCount;
setTimeout(() => {
//
@ -486,26 +502,17 @@ export default {
this.listLoading = false;
});
},
fetchData(id) {
//
this.$axios
.gets("/api/settleaccount/MaterialRelationshipDetail/" + id)
.then((response) => {
this.form = response;
});
},
/** 筛选操作 */
handleFilter() {
this.page = 1;
this.getList();
this.listQuery.Filters = [];
if (this.searchContent != "") {
var column = "erpMaterialCode";
var column = "materialCode";
let filter = {
logic: 0,
column: column,
action: 0,
action: 6,
value: this.searchContent,
};
this.listQuery.Filters.push(filter);
@ -555,6 +562,7 @@ export default {
}
},
resetQuery() {},
sortChange(data) {
const { prop, order } = data;
if (!prop || !order) {
@ -562,7 +570,6 @@ export default {
return;
}
this.listQuery.Sorting = prop + " " + order;
console.log(this.listQuery.Sorting);
this.handleFilter();
},
handleSelectionChange(val) {
@ -570,16 +577,24 @@ export default {
},
/** 通过回调控制style */
cellStyle({ row, column, rowIndex, columnIndex }) {
if (column.property === "qty") {
return { textAlign: "left" };
if (
column.property === "fisQty" ||
column.property === "diffQty" ||
column.property === "stockQty"
) {
return { textAlign: "right" };
} else {
return { textAlign: "left" };
}
},
/** 通过回调控制表头style */
headerRowStyle({ row, column, rowIndex, columnIndex }) {
if (column.property === "qty") {
return { textAlign: "left", background: "#FAFAFA" };
if (
column.property === "fisQty" ||
column.property === "diffQty" ||
column.property === "stockQty"
) {
return { textAlign: "right", background: "#FAFAFA" };
} else {
return { textAlign: "left", background: "#FAFAFA" };
}
@ -596,10 +611,4 @@ export default {
<style lang="scss" scoped>
@import "../../styles/crmtable.scss";
</style>
<style lang="scss">
.el-table .cell.el-tooltip {
white-space: pre-wrap;
}
</style>

340
vue/src/views/ux/billManage/kanbanWithOutOrder/index.vue

@ -0,0 +1,340 @@
<!--大众无条码看板-出库单-->
<template>
<div class="cr-body-content">
<flexbox class="content-header">
<el-input
v-model="searchContent"
clearable
size="small"
placeholder="按照版本号搜索..."
style="width: 200px"
class="search-container"
@keyup.enter.native="handleFilter"
/>
<el-button
size="mini"
type="success"
icon="el-icon-search"
@click="handleFilter"
>搜索
</el-button>
<el-button
class="filter-item"
size="mini"
type="warning"
icon="el-icon-upload2"
@click="handleImportExcel()"
>导入文件Excel
</el-button>
</flexbox>
<!--表格渲染-->
<el-table
ref="multipleTable"
v-loading="listLoading"
element-loading-text="拼命加载中..."
element-loading-spinner="el-icon-loading"
class="cr-table"
:data="list"
:height="tableHeight"
:cell-style="cellStyle"
size="small"
stripe
border
highlight-current-row
style="width: 100%"
@sort-change="sortChange"
@selection-change="handleSelectionChange"
@row-click="handleRowClick"
>
<el-table-column
label="单据号"
prop="billNum"
sortable="custom"
align="center"
width="250px"
>
<template slot-scope="scope">
<el-tooltip :content="scope.row.billNum" placement="bottom-end">
<span class="link-type" @click="handleDrawerOpen(scope.row)">{{
scope.row.billNum
}}</span>
</el-tooltip>
</template>
</el-table-column>
<!-- <el-table-column type="selection" width="44px"></el-table-column> -->
<el-table-column
v-for="(item, index) in getDefaultField"
:key="index"
:prop="item.prop"
:label="item.label"
:min-width="item.width"
:formatter="fieldFormatter"
sortable="custom"
show-overflow-tooltip
:gutter="0"
>
<template slot="header" slot-scope="scope">
{{ scope.column.label }}
</template>
</el-table-column>
</el-table>
<div class="table-footer">
<!-- 分页控件 style="margin-top: -25px;margin-bottom:-25px;float:right;"-->
<pagination
v-show="totalCount > 0"
:total="totalCount"
:page.sync="page"
:limit.sync="listQuery.MaxResultCount"
@pagination="getList"
/>
<!-- 导入Excel组件 -->
<importExcel
ref="importexcel"
:show="showExcelImport"
:crmType="crmType"
@close="importExcelData"
/>
<!-- 抽屉控件 -->
<el-drawer
title="信息详细页"
size="75%"
direction="rtl"
:visible.sync="drawer"
:before-close="handleDrawerClose"
>
<div>
<Detail
v-bind:customerInfos="customerInfos"
style="margin-top: -35px"
></Detail>
</div>
</el-drawer>
</div>
</div>
</template>
<script>
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
import permission from "@/directive/permission/index.js";
import Detail from "./detail";
import moment from "moment";
import importExcel from "@/components/ImportExcel-base";
import { formatTimeToTimestamp } from "@/utils/index";
export default {
name: "sendUnsettledDiffReport",
components: { Pagination, Detail,importExcel },
directives: { permission },
data() {
return {
crmType: "kanbanoutorder",
rules: {
// version: [{ required: true, message: "", trigger: "change" }],
// beginTime: [{ required: true, message: "", trigger: "change" }],
// endTime: [{ required: true, message: "", trigger: "change" }],
},
customerInfos: [],
searchContent: "", //
drawer: false,
form: {
version: "",
customerCode: "",
customerName: "",
beginTime: "",
endTime: "",
},
versionValue: "",
versionList: [],
startTimeVale: "",
endTimeVale: "",
list: null,
totalCount: 0,
listLoading: true,
formLoading: false,
//
filterObj: {
type: Object,
default: () => {
return {};
},
},
listQuery: {
Filters: [
{
logic: 0,
column: "Enabled",
action: 0,
value: "true",
}, //
],
//OrgID:"",
SkipCount: 0,
MaxResultCount: 15,
},
page: 1,
dialogFormVisible: false,
multipleSelection: [],
formTitle: "",
drawer: false,
showExcelImport: false,
tableHeight: document.documentElement.clientHeight - 200,
isEdit: false,
};
},
mounted() {
var self = this;
window.onresize = function () {
var offsetHei = document.documentElement.clientHeight;
self.tableHeight = offsetHei - 200;
};
},
created() {
this.getList();
//this.getVersionInfo();
},
computed: {
/** 列表字段 */
getDefaultField() {
var tempsTabs = [];
tempsTabs.push({
label: "版本",
prop: "version",
width: 120,
});
//tempsTabs.push({ label: "", prop: "billNum", width: 150 });
tempsTabs.push({ label: "创建人", prop: "creator", width: 160 });
tempsTabs.push({ label: "创建时间", prop: "creationTime", width: 160 });
tempsTabs.push({ label: "备注", prop: "remark", width: 120 });
return tempsTabs;
},
},
methods: {
handleImportExcel() {
//
this.showExcelImport = true;
this.$refs.importexcel.handleImportExcelClick();
},
getVersionInfo() {
//
this.listLoading = true;
this.listQuery.SkipCount = (this.page - 1) * 1000;
this.$axios
.posts("/api/settleaccount/CentralizedControl/openlist")
.then((response) => {
this.versionList = [];
response.forEach((element) => {
let options = {};
options.value = element.version;
options.label = element.version;
this.versionList.push(options);
});
})
.catch(() => {
this.listLoading = false;
});
},
//
handleDrawerOpen(param) {
this.drawer = true;
var parentId = param.billNum; //
var version = param.version; //
this.customerInfos = [
{
ParentId: parentId,
Version: version,
},
];
},
handleDrawerClose(done) {
done();
},
/** 格式化字段 */
fieldFormatter(row, column) {
if (column.property == "creationTime") {
var date = row[column.property];
if (date == undefined) {
return "";
}
return moment(date).format("YYYY-MM-DD HH:mm:ss");
}
if (column.property == "state") {
return { 0: "已提交", 1: "已出库", 2: "不能出库" }[
row[column.property]
];
}
return row[column.property] || "--";
},
importExcelData() {
//
this.showExcelImport = false;
this.getList();
},
getList(data) {
this.listLoading = true;
if (data != undefined) {
this.listQuery.SkipCount = (this.page - 1) * data.limit;
} else {
this.listQuery.SkipCount = (this.page - 1) * 15;
}
this.$axios
.posts("/api/settleaccount/wmskanbanoutput/WmsKanbanList", this.listQuery)
.then((response) => {
this.list = response.items;
//alert(JSON.stringify(response.Items))
this.totalCount = response.totalCount;
setTimeout(() => {
//
this.listLoading = false;
}, 500);
})
.catch(() => {
this.listLoading = false;
});
},
/** 筛选操作 */
handleFilter() {
this.page = 1;
this.getList();
this.listQuery.Filters = [];
if (this.searchContent != "") {
var column = "version";
let filter = {
logic: 0,
column: column,
action: 0,
value: this.searchContent,
};
this.listQuery.Filters.push(filter);
}
this.getList();
},
resetQuery() {},
sortChange(data) {
const { prop, order } = data;
if (!prop || !order) {
this.handleFilter();
return;
}
this.listQuery.Sorting = prop + " " + order;
this.handleFilter();
},
handleSelectionChange(val) {
this.multipleSelection = val;
},
/** 通过回调控制style */
cellStyle({ row, column, rowIndex, columnIndex }) {
return { textAlign: "left" };
},
handleRowClick(row, column, event) {
this.$refs.multipleTable.clearSelection();
this.$refs.multipleTable.toggleRowSelection(row);
},
},
};
</script>
<style lang="scss" scoped>
@import "../../styles/crmtable.scss";
</style>

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

@ -44,6 +44,14 @@
@click="handleCreateBills()"
>生成出库单(支持批量)</el-button
>
<el-button
class="filter-item"
size="mini"
type="primary"
icon="el-icon-plus"
@click="handleCreateNoBill"
>备件未结明细统计
</el-button>
</flexbox>
</div>
<!-- 刷新 -->
@ -396,50 +404,32 @@
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-row>
<el-col :md="4" :xs="24">
<el-form-item label="物料组(车型)" />
<el-form-item label="采购订单号" />
</el-col>
<el-col :md="20" :xs="24" style="margin-left: -80px">
<el-form-item prop="materialGroupValue">
<el-select
v-model="formCount.materialGroupValue"
size="medium"
multiple
filterable
clearable
style="width: 380px; margin-right: 15px"
@change="valueChange"
placeholder="请选择"
>
<el-option
v-for="item in materialGroupList"
:key="item.value"
:label="item.value"
:value="item.value"
>
<span style="float: left">{{ item.label }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{
item.value
}}</span>
</el-option>
</el-select>
<el-form-item prop="purchaseOrderNo">
<el-input
type="textarea"
v-model="formCount.purchaseOrderNo"
style="width: 450px"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :md="4" :xs="24">
<el-form-item label="CP5时间:" />
<el-form-item label="订单日期:" />
</el-col>
<el-col :md="10" :xs="24" style="margin-left: -80px">
<el-form-item>
<el-date-picker
v-model="cp5startTime"
:picker-options="pickerOptions2"
v-model="startTime"
type="datetime"
size="small"
@change="getdateValueCp5"
:picker-options="pickerOptions0"
@change="getdateValue"
value-format="yyyy-MM-dd HH:mm:ss"
default-time="00:00:00"
>
@ -449,11 +439,11 @@
<el-col :md="10" :xs="24" style="margin-left: -40px">
<el-form-item>
<el-date-picker
v-model="cp5endTime"
:picker-options="pickerOptions3"
v-model="endTime"
type="datetime"
:picker-options="pickerOptions1"
size="small"
@change="getdateValCp5"
@change="getdateVal"
value-format="yyyy-MM-dd HH:mm:ss"
default-time="23:59:59"
>
@ -461,17 +451,86 @@
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :md="4" :xs="24">
<el-form-item label="CP7时间:" />
<el-form-item label="厂内零件号" />
</el-col>
<el-col :md="20" :xs="24" style="margin-left: -80px">
<el-form-item prop="sapCode">
<el-input
v-model="formCount.sapCode"
style="width: 450px"
type="textarea"
:rows="4"
placeholder="多个厂内零件号,请以回车换行形式添加!"
/>
</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 @click="resetForm('formCount')">重置</el-button>
<el-button v-loading="formLoading" type="primary" @click="save"
>确认</el-button
>
</div>
</el-dialog>
<!--统计-备件无条码报表-->
<el-dialog
:visible.sync="dialogFormNoBillVisible"
:close-on-click-modal="false"
:title="formTitle"
append-to-body
width="680px"
>
<el-form
ref="formNoBill"
:inline="true"
:rules="rulesNoBill"
:model="formNoBill"
size="mini"
>
<el-row>
<el-col :md="4" :xs="24">
<el-form-item label="选择版本" required />
</el-col>
<el-col :md="20" :xs="24" style="margin-left: -80px">
<el-form-item prop="versionValue">
<el-select
v-model="formNoBill.versionValue"
size="medium"
clearable
style="width: 188px; margin-right: 15px"
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-row>
<el-col :md="4" :xs="24">
<el-form-item label="查询日期:" />
</el-col>
<el-col :md="10" :xs="24" style="margin-left: -80px">
<el-form-item>
<el-date-picker
v-model="startTime"
v-model="startTimeNoBill"
type="datetime"
size="small"
:picker-options="pickerOptions0"
:picker-options="pickerOptions4"
@change="getdateValue"
value-format="yyyy-MM-dd HH:mm:ss"
default-time="00:00:00"
@ -482,9 +541,9 @@
<el-col :md="10" :xs="24" style="margin-left: -40px">
<el-form-item>
<el-date-picker
v-model="endTime"
v-model="endTimeNoBill"
type="datetime"
:picker-options="pickerOptions1"
:picker-options="pickerOptions5"
size="small"
@change="getdateVal"
value-format="yyyy-MM-dd HH:mm:ss"
@ -496,37 +555,7 @@
</el-row>
<el-row>
<el-col :md="4" :xs="24">
<el-form-item label="KEEN号" />
</el-col>
<el-col :md="10" :xs="24" style="margin-left: -80px">
<el-form-item prop="kennCode">
<el-input
type="textarea"
v-model="formCount.kennCode"
style="width: 170px"
:rows="4"
placeholder="多个KENN号,请以回车换行形式添加!"
/>
</el-form-item>
</el-col>
<el-col :md="4" :xs="24">
<el-form-item label="底盘号" />
</el-col>
<el-col :md="10" :xs="24" style="margin-left: -95px">
<el-form-item prop="chassisNumber">
<el-input
v-model="formCount.chassisNumber"
style="width: 170px"
type="textarea"
:rows="4"
placeholder="多个底盘号,请以回车换行形式添加!"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :md="4" :xs="24">
<!-- <el-col :md="4" :xs="24">
<el-form-item label="客户零件号" />
</el-col>
<el-col :md="10" :xs="24" style="margin-left: -80px">
@ -539,15 +568,15 @@
placeholder="多个客户零件号,请以回车换行形式添加!"
/>
</el-form-item>
</el-col>
</el-col> -->
<el-col :md="4" :xs="24">
<el-form-item label="厂内零件号" />
</el-col>
<el-col :md="10" :xs="24" style="margin-left: -95px">
<el-col :md="10" :xs="24" style="margin-left: -80px">
<el-form-item prop="sapCode">
<el-input
v-model="formCount.sapCode"
style="width: 170px"
v-model="formNoBill.sapCode"
style="width: 450px"
type="textarea"
:rows="4"
placeholder="多个厂内零件号,请以回车换行形式添加!"
@ -557,11 +586,8 @@
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<!-- <el-button type="text" @click="dialogFormVisible = false"
>取消</el-button
> -->
<el-button @click="resetForm('formCount')">重置</el-button>
<el-button v-loading="formLoading" type="primary" @click="save"
<el-button @click="resetNoBillForm('formNoBill')">重置</el-button>
<el-button v-loading="formNoBillLoading" type="primary" @click="saveNoBill"
>确认</el-button
>
</div>
@ -590,6 +616,11 @@ export default {
{ required: true, message: "必须输入!", trigger: "change" },
],
},
rulesNoBill: {
versionValue: [
{ required: true, message: "必须输入!", trigger: "change" },
],
},
pickerOptionsCp5: {
disabledDate: (time) => {
let now = new Date();
@ -617,12 +648,6 @@ export default {
return time.getTime() <= new Date(this.startTime).getTime();
},
},
pickerOptions1: {
disabledDate: (time) => {
//return time.getTime() <= new Date(this.startTime).getTime() || time.getTime() > Date.now();
return time.getTime() <= new Date(this.startTime).getTime();
},
},
pickerOptions2: {
disabledDate: (time) => {
@ -636,8 +661,23 @@ export default {
return time.getTime() <= new Date(this.cp5startTime).getTime();
},
},
pickerOptions4: {
disabledDate: (time) => {
//if (this.endTime != "") {
return time.getTime() > new Date(this.endTimeNoBill).getTime();
//}
},
},
pickerOptions5: {
disabledDate: (time) => {
return time.getTime() <= new Date(this.startTimeNoBill).getTime();
},
},
startTime: "",
endTime: "",
startTimeNoBill: "",
endTimeNoBill: "",
pickerOptionsCp7: {
disabledDate: (time) => {
let now = new Date();
@ -689,6 +729,7 @@ export default {
customerInfos: "",
searchContent: "", //
form: {},
formNoBill: {},
formCount: {
startTime: "",
endTime: "",
@ -708,6 +749,7 @@ export default {
totalCount: 0,
listLoading: true,
formLoading: false,
formNoBillLoading: false,
//
filterObj: {
type: Object,
@ -717,14 +759,14 @@ export default {
},
listExportQuery: {
version: "",
materialCode: undefined,
cp7begin: undefined,
cp7end: undefined,
kenncode: undefined,
chassisNumber: undefined,
materialGroup: undefined,
purchaseOrderNo: undefined,
begin: undefined,
end: undefined,
sapCode: undefined,
},
listNoBillExportQuery: {
version: "",
sapCode: undefined,
},
listQuery: {
taskId: "",
@ -736,6 +778,7 @@ export default {
},
page: 1,
dialogFormVisible: false,
dialogFormNoBillVisible: false,
multipleSelection: [],
tableHeight: document.documentElement.clientHeight - 260,
isEdit: false,
@ -826,11 +869,10 @@ export default {
//cp5
getdateValueCp5(val) {
this.cp5startTime = val;
this.getbalanceIndexData();
//this.getbalanceIndexData();
},
getdateValCp5(val) {
this.cp5endTime = val;
this.getbalanceIndexData();
},
handleSelectionChange(val) {
this.multipleSelection = val;
@ -1060,14 +1102,6 @@ export default {
});
}
},
valueChange(data) {
this.getmaterialGroupValue = "";
this.getmaterialGroupValue += data + ",";
this.getmaterialGroupValue = this.getmaterialGroupValue.substring(
0,
this.getmaterialGroupValue.length - 1
);
},
//
JobVersionValue(params) {
//
@ -1101,11 +1135,9 @@ export default {
},
getdateValue(val) {
this.startTime = val;
this.getbalanceIndexData();
},
getdateVal(val) {
this.endTime = val;
this.getbalanceIndexData();
},
getCurrentMonthFirst() {
@ -1175,38 +1207,29 @@ export default {
this.cp5startTime = "";
this.cp5endTime = "";
},
resetNoBillForm(formName) {
this.formNoBill = {};
this.startTimeNoBill = "";
this.endTimeNoBill = "";
},
save() {
this.$refs.formCount.validate((valid) => {
if (valid) {
this.formLoading = true;
this.listExportQuery.version = this.formCount.versionValue; //
if (this.formCount.materialCode != "") {
this.listExportQuery.materialCode = this.formCount.materialCode; //
if (this.formCount.purchaseOrderNo != "") {
this.listExportQuery.purchaseOrderNo = this.formCount.purchaseOrderNo; //
}
if (this.formCount.sapCode != "") {
this.listExportQuery.sapCode = this.formCount.sapCode; //
}
if (this.formCount.kennCode != "") {
this.listExportQuery.kenncode = this.formCount.kennCode; //KEEN
}
this.listExportQuery.begin = this.cp5startTime
? this.cp5startTime
//
this.listExportQuery.begin = this.startTime
? this.startTime
: undefined;
this.listExportQuery.end = this.cp5endTime
? this.cp5endTime
this.listExportQuery.end = this.endTime
? this.endTime
: undefined;
if (this.startTime != "") {
this.listExportQuery.cp7begin = this.startTime; //CP7
}
if (this.endTime != "") {
this.listExportQuery.cp7end = this.endTime; //CP5
}
if (this.formCount.chassisNumber != "") {
this.listExportQuery.chassisNumber = this.formCount.chassisNumber; //
}
if (this.formCount.materialGroupValue != "") {
this.listExportQuery.materialGroup = this.getmaterialGroupValue; //
}
console.log(
"大众备件结算核对-导出条件:" + JSON.stringify(this.listExportQuery)
);
@ -1236,6 +1259,54 @@ export default {
}
});
},
//
saveNoBill() {
this.$refs.formNoBill.validate((valid) => {
if (valid) {
this.formNoBillLoading = true;
this.listNoBillExportQuery.version = this.formNoBill.versionValue; //
// if (this.formCount.materialCode != "") {
// this.listExportQuery.materialCode = this.formCount.materialCode; //
// }
if (this.formNoBill.sapCode != "") {
this.listNoBillExportQuery.sapCode = this.formNoBill.sapCode; //
}
this.listNoBillExportQuery.begin = this.startTimeNoBill
? this.startTimeNoBill
: undefined;
this.listNoBillExportQuery.end = this.endTimeNoBill
? this.endTimeNoBill
: undefined;
console.log(
"大众备件未结明细-导出条件:" + JSON.stringify(this.listNoBillExportQuery)
);
this.$axios
.gets(
"/api/settleaccount/ReportMakeService/SharePartUnSettledExport",
this.listExportQuery
)
.then((res) => {
let taskid = res;
if (Number.isInteger(taskid)) {
this.$notify({
title: "成功",
message: "任务生成成功!任务号:" + taskid,
type: "success",
duration: 2000,
});
}
this.getList();
this.formNoBillLoading = false;
this.dialogFormNoBillVisible = false;
})
.catch(() => {
this.formNoBillLoading = false;
this.dialogFormNoBillVisible = false;
});
}
});
},
handleCreate() {
// this.$nextTick(() => {
// this.$refs["formCount"].resetFields();
@ -1245,7 +1316,7 @@ export default {
}
this.formTitle = "报表统计";
this.isEdit = false;
this.form = {};
this.formCount = {};
this.datetime5 = [];
this.startTime = "";
this.endTime = "";
@ -1253,6 +1324,18 @@ export default {
this.cp5endTime = "";
this.dialogFormVisible = true;
},
//
handleCreateNoBill() {
if (this.$refs["formNoBill"] !== undefined) {
this.$refs["formNoBill"].resetFields();
}
this.formTitle = "无条码备件明细报表统计";
this.isEdit = false;
this.formNoBill = {};
this.startTimeNoBill = "";
this.endTimeNoBill = "";
this.dialogFormNoBillVisible = true;
},
filterHandler(value, row, column) {
const property = column["property"];
return row[property] === value;

Loading…
Cancel
Save