增加系统参数设置;新仓储货转上家出库费计算参数为“货转时”时,于货转计算出库现结的费用,而在出库时不计算

temp
ddlucky 2 years ago
parent 32dfd23b43
commit 953d2cb470

@ -0,0 +1,21 @@
//author:jxx
//此处是对表单的方法,组件,权限操作按钮等进行任意扩展(方法扩展可参照SellOrder.js)
let extension = {
components: {//动态扩充组件或组件路径
//表单header、content、footer对应位置扩充的组件
gridHeader:'',//{ template: "<div>扩展组xx件</div>" },
gridBody: '',
gridFooter: '',
//弹出框(修改、编辑、查看)header、content、footer对应位置扩充的组件
modelHeader: '',
modelBody: '',
modelFooter: ''
},
buttons: {view: [], box:[], detail:[]},//扩展的按钮
methods: {//事件扩展
onInit() {
}
}
};
export default extension;

@ -550,5 +550,9 @@ let viewgird = [
path: '/VW_OP_YARD_BOOK_AREA', path: '/VW_OP_YARD_BOOK_AREA',
name: 'VW_OP_YARD_BOOK_AREA', name: 'VW_OP_YARD_BOOK_AREA',
component: () => import('@/views/yard/VW_OP_YARD_BOOK_AREA.vue') component: () => import('@/views/yard/VW_OP_YARD_BOOK_AREA.vue')
} ,{
path: '/Sys_Param_Set',
name: 'Sys_Param_Set',
component: () => import('@/views/system/Sys_Param_Set.vue')
}] }]
export default viewgird export default viewgird

@ -0,0 +1,72 @@
<!--
*Authorjxx
*Contact283591387@qq.com
*代码由框架生成,任何更改都可能导致被代码生成器覆盖
*业务请在@/extension/system/Sys_Param_Set.js此处编写
-->
<template>
<div>
<view-grid
ref="grid"
:columns="columns"
:detail="detail"
:editFormFields="editFormFields"
:editFormOptions="editFormOptions"
:searchFormFields="searchFormFields"
:searchFormOptions="searchFormOptions"
:table="table"
:extend="extend">
</view-grid>
</div>
</template>
<script>
import extend from "@/extension/system/Sys_Param_Set.js";
//ViewGrid.vue使elementuitablevoltable.vue
//ViewGrid_Vxe.vuevxetable.vue
//import ViewGrid from "@/components/basic/ViewGrid.vue";//ViewGrid_Vxe//ViewGrid
import ViewGrid from "@/components/basic/ViewGrid.vue";
var vueParam = {
components: {
ViewGrid
},
data() {
return {
table: {
key: 'GID',
footer: "Foots",
cnName: '系统参数设置',
name: 'Sys_Param_Set',
url: "/Sys_Param_Set/",
sortName: "PARAMDESCRIPTION"
},
extend: extend,
editFormFields: {"PARAMNAME":"","PARAMDESCRIPTION":"","PARAMVALUE":"","MODIFIEDUSER":"","MODIFIEDTIME":"","PARAMTYPE":"","FIELDTYPE":""},
editFormOptions: [[{"title":"参数代码","required":true,"field":"PARAMNAME","type":"text"},
{"title":"参数描述","required":true,"field":"PARAMDESCRIPTION","type":"text"}],
[{"title":"值","field":"PARAMVALUE","type":"text"}],
[{"title":"","field":"MODIFIEDUSER","type":"text"},
{"title":"","field":"MODIFIEDTIME","type":"datetime"}],
[{"title":"","field":"PARAMTYPE","type":"text"},
{"title":"","field":"FIELDTYPE","type":"text"}]],
searchFormFields: {"PARAMNAME":"","PARAMDESCRIPTION":""},
searchFormOptions: [[{"title":"参数描述","field":"PARAMDESCRIPTION","type":"like"},{"title":"参数代码","field":"PARAMNAME","type":"like"}]],
columns: [{field:'GID',title:'GID',type:'string',width:90,hidden:true,readonly:true,require:true,align:'left'},
{field:'PARAMNAME',title:'参数代码',type:'string',width:90,require:true,align:'left',sortable:true},
{field:'PARAMDESCRIPTION',title:'参数描述',type:'string',link:true,width:90,require:true,align:'left'},
{field:'PARAMVALUE',title:'值',type:'string',width:220,align:'left'},
{field:'MODIFIEDUSER',title:'MODIFIEDUSER',type:'string',width:90,align:'left'},
{field:'MODIFIEDTIME',title:'MODIFIEDTIME',type:'datetime',width:90,align:'left',sortable:true},
{field:'PARAMTYPE',title:'PARAMTYPE',type:'string',width:90,align:'left'},
{field:'FIELDTYPE',title:'FIELDTYPE',type:'string',width:90,align:'left'}],
detail: {
cnName:"#detailCnName",
columns: [],
sortName: "",
key:""
}
};
}
};
export default vueParam;
</script>

@ -0,0 +1,95 @@
/*
*,
*Model
*/
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using VOL.Entity.SystemModels;
namespace VOL.Entity.DomainModels
{
[Entity(TableCnName = "系统参数设置",TableName = "Sys_Param_Set")]
public class Sys_Param_Set:BaseEntity
{
/// <summary>
///GID
/// </summary>
[Key]
[Display(Name ="GID")]
[MaxLength(36)]
[Column(TypeName = "varchar(36)")]
[Required(AllowEmptyStrings=false)]
public string GID { get; set; }
/// <summary>
///参数代码
/// </summary>
[Display(Name ="参数代码")]
[MaxLength(36)]
[Column(TypeName="varchar(36)")]
[Editable(true)]
[Required(AllowEmptyStrings=false)]
public string PARAMNAME { get; set; }
/// <summary>
///参数描述
/// </summary>
[Display(Name ="参数描述")]
[MaxLength(60)]
[Column(TypeName="varchar(60)")]
[Editable(true)]
[Required(AllowEmptyStrings=false)]
public string PARAMDESCRIPTION { get; set; }
/// <summary>
///值
/// </summary>
[Display(Name ="值")]
[MaxLength(360)]
[Column(TypeName="varchar(360)")]
[Editable(true)]
public string PARAMVALUE { get; set; }
/// <summary>
///
/// </summary>
[Display(Name ="MODIFIEDUSER")]
[MaxLength(36)]
[Column(TypeName="varchar(36)")]
[Editable(true)]
public string MODIFIEDUSER { get; set; }
/// <summary>
///
/// </summary>
[Display(Name ="MODIFIEDTIME")]
[Column(TypeName="datetime")]
[Editable(true)]
public DateTime? MODIFIEDTIME { get; set; }
/// <summary>
///
/// </summary>
[Display(Name ="PARAMTYPE")]
[MaxLength(60)]
[Column(TypeName="varchar(60)")]
[Editable(true)]
public string PARAMTYPE { get; set; }
/// <summary>
///
/// </summary>
[Display(Name ="FIELDTYPE")]
[MaxLength(36)]
[Column(TypeName="varchar(36)")]
[Editable(true)]
public string FIELDTYPE { get; set; }
}
}

@ -0,0 +1,16 @@
using VOL.Entity.MappingConfiguration;
using VOL.Entity.DomainModels;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
namespace VOL.Entity.MappingConfiguration
{
public class Sys_Param_SetMapConfig : EntityMappingConfiguration<Sys_Param_Set>
{
public override void Map(EntityTypeBuilder<Sys_Param_Set>
builderTable)
{
//b.Property(x => x.StorageName).HasMaxLength(45);
}
}
}

@ -0,0 +1,18 @@
/*
*,
*RepositoryPartialISys_Param_SetRepository
*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using VOL.Core.BaseProvider;
using VOL.Entity.DomainModels;
using VOL.Core.Extensions.AutofacManager;
namespace VOL.System.IRepositories
{
public partial interface ISys_Param_SetRepository : IDependency,IRepository<Sys_Param_Set>
{
}
}

@ -0,0 +1,12 @@
/*
*,
*/
using VOL.Core.BaseProvider;
using VOL.Entity.DomainModels;
namespace VOL.System.IServices
{
public partial interface ISys_Param_SetService : IService<Sys_Param_Set>
{
}
}

@ -0,0 +1,17 @@
/*
*Sys_Param_Set
*/
using VOL.Core.BaseProvider;
using VOL.Entity.DomainModels;
using VOL.Core.Utilities;
using System.Linq.Expressions;
using System;
namespace VOL.System.IServices
{
public partial interface ISys_Param_SetService
{
public string ();
}
}

@ -0,0 +1,24 @@
/*
*,
*RepositoryPartialSys_Param_SetRepository
*/
using VOL.System.IRepositories;
using VOL.Core.BaseProvider;
using VOL.Core.EFDbContext;
using VOL.Core.Extensions.AutofacManager;
using VOL.Entity.DomainModels;
namespace VOL.System.Repositories
{
public partial class Sys_Param_SetRepository : RepositoryBase<Sys_Param_Set> , ISys_Param_SetRepository
{
public Sys_Param_SetRepository(VOLContext dbContext)
: base(dbContext)
{
}
public static ISys_Param_SetRepository Instance
{
get { return AutofacContainerModule.GetService<ISys_Param_SetRepository>(); } }
}
}

@ -0,0 +1,63 @@
/*
*Sys_Param_Set
*使repository.EF/Dapper
*使repository.DbContextBeginTransaction
*使DBServerProvider.
*使UserContext.Current
*Sys_Param_SetServiceServiceFunFilter
*/
using VOL.Core.BaseProvider;
using VOL.Core.Extensions.AutofacManager;
using VOL.Entity.DomainModels;
using System.Linq;
using VOL.Core.Utilities;
using System.Linq.Expressions;
using VOL.Core.Extensions;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.AspNetCore.Http;
using VOL.System.IRepositories;
using System.Collections.Generic;
using VOL.System.Repositories;
namespace VOL.System.Services
{
public partial class Sys_Param_SetService
{
private readonly IHttpContextAccessor _httpContextAccessor;
private readonly ISys_Param_SetRepository _repository;//访问数据库
[ActivatorUtilitiesConstructor]
public Sys_Param_SetService(
ISys_Param_SetRepository dbRepository,
IHttpContextAccessor httpContextAccessor
)
: base(dbRepository)
{
_httpContextAccessor = httpContextAccessor;
_repository = dbRepository;
//多租户会用到这init代码其他情况可以不用
//base.Init(dbRepository);
}
public override PageGridData<Sys_Param_Set> GetPageData(PageDataOptions pageData)
{
var _r = base.GetPageData(pageData);
return _r;
}
public string () {
var = Sys_Param_SetRepository.Instance.FindAsIQueryable(x => x.PARAMNAME == "DSWMSOUTFEE").ToList();
if ( != null && .Count > 0)
{
return [0].PARAMVALUE;
}
return "";
}
}
}

@ -0,0 +1,29 @@
/*
*Authorjxx
*Contact283591387@qq.com
*,
*PartialSys_Param_SetServiceISys_Param_SetService
*/
using VOL.System.IRepositories;
using VOL.System.IServices;
using VOL.Core.BaseProvider;
using VOL.Core.Extensions.AutofacManager;
using VOL.Entity.DomainModels;
using VOL.System.IRepositories;
namespace VOL.System.Services
{
public partial class Sys_Param_SetService : ServiceBase<Sys_Param_Set, ISys_Param_SetRepository>
, ISys_Param_SetService, IDependency
{
public Sys_Param_SetService(ISys_Param_SetRepository repository)
: base(repository)
{
Init(repository);
}
public static ISys_Param_SetService Instance
{
get { return AutofacContainerModule.GetService<ISys_Param_SetService>
(); } }
}
}

@ -21,6 +21,7 @@ using VOL.Core.Enums;
using VOL.Core.Services; using VOL.Core.Services;
using ConvertHelper; using ConvertHelper;
using VOL.Core.Configuration; using VOL.Core.Configuration;
using VOL.System.Services;
namespace VOL.WMS.Services namespace VOL.WMS.Services
{ {
@ -1530,6 +1531,19 @@ namespace VOL.WMS.Services
List = .Where(x => x.FEEMAKETYPE == "货转现结").ToList(); List = .Where(x => x.FEEMAKETYPE == "货转现结").ToList();
} }
} }
//20230324 对于仓储费上家承担的业务
var = Sys_Param_SetService.Instance.();
if ( == "货转时") {
//寻找该库存货转前的费率
var = OP_WMS_FEERATE_DETAILRepository.Instance.FindAsIQueryable(x => x.FEERATEID == .WMSID && x.FEEMAKETYPE == "出库现结").ToList();
if ( != null && .Count > 0) {
List.AddRange();
}
}
if (List.Count > 0) { if (List.Count > 0) {
foreach (var feerate in List) { foreach (var feerate in List) {

@ -29,6 +29,8 @@ using OfficeOpenXml.ConditionalFormatting;
using VOL.Core.Services; using VOL.Core.Services;
using ConvertHelper; using ConvertHelper;
using VOL.Core.Configuration; using VOL.Core.Configuration;
using VOL.System.Repositories;
using VOL.System.Services;
namespace VOL.WMS.Services namespace VOL.WMS.Services
{ {
@ -5158,9 +5160,22 @@ namespace VOL.WMS.Services
} }
} }
//20230324 查看sys_param_set.PARAMNAME=DSWMSOUTFEE
//如值为货转时 则不算出库费
var = Sys_Param_SetService.Instance.();
//计算出库费 //计算出库费
foreach (var in List) foreach (var in List)
{ {
//20230324 查看sys_param_set.PARAMNAME=DSWMSOUTFEE
//如值为货转时 则不算出库费
if ((bool)_.WMSOUTFEE_OLDCUST) {
if ( == "货转时") {
continue;
}
}
//if (FeeExists(出库费率, 出库费承担者)) continue; //if (FeeExists(出库费率, 出库费承担者)) continue;
if (!codefeelist.Exists(x => x.NAME == .FEENAME)) continue; if (!codefeelist.Exists(x => x.NAME == .FEENAME)) continue;

@ -0,0 +1,33 @@
/*
*...
*ActionAction使
*: [ApiActionPermission("Sys_Param_Set",Enums.ActionPermissionOptions.Search)]
*/
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.AspNetCore.Http;
using VOL.Entity.DomainModels;
using VOL.System.IServices;
namespace VOL.System.Controllers
{
public partial class Sys_Param_SetController
{
private readonly ISys_Param_SetService _service;//访问业务代码
private readonly IHttpContextAccessor _httpContextAccessor;
[ActivatorUtilitiesConstructor]
public Sys_Param_SetController(
ISys_Param_SetService service,
IHttpContextAccessor httpContextAccessor
)
: base(service)
{
_service = service;
_httpContextAccessor = httpContextAccessor;
}
}
}

@ -0,0 +1,21 @@
/*
*,
*PartialSys_Param_SetController
*/
using Microsoft.AspNetCore.Mvc;
using VOL.Core.Controllers.Basic;
using VOL.Entity.AttributeManager;
using VOL.System.IServices;
namespace VOL.System.Controllers
{
[Route("api/Sys_Param_Set")]
[PermissionTable(Name = "Sys_Param_Set")]
public partial class Sys_Param_SetController : ApiBaseController<ISys_Param_SetService>
{
public Sys_Param_SetController(ISys_Param_SetService service)
: base(service)
{
}
}
}
Loading…
Cancel
Save