mahao
1 year ago
35 changed files with 1059 additions and 258 deletions
@ -0,0 +1,137 @@ |
|||
const schema = { |
|||
title: "期间设置", |
|||
type: "object", |
|||
properties: { |
|||
year: { |
|||
title: "年度", |
|||
type: "string", |
|||
hidden: true, |
|||
showForList: true, |
|||
rules: [ |
|||
{ |
|||
required: true, |
|||
}, |
|||
], |
|||
}, |
|||
period: { |
|||
title: "期间", |
|||
type: "string", |
|||
hidden: true, |
|||
showForList: true, |
|||
rules: [ |
|||
{ |
|||
required: true, |
|||
}, |
|||
], |
|||
}, |
|||
version: { |
|||
title: "版本", |
|||
type: "string", |
|||
input: "month", |
|||
format: "YYYYMM", |
|||
showForList: true, |
|||
watch: "(model,value)=>{model.year=value.substr(0,4);model.period=value.substr(4,2);}", |
|||
rules: [ |
|||
{ |
|||
required: true, |
|||
trigger: "blur", |
|||
}, |
|||
], |
|||
}, |
|||
state: { |
|||
title: "状态", |
|||
type: "boolean", |
|||
showForList: true, |
|||
default: true, |
|||
rules: [ |
|||
{ |
|||
required: true, |
|||
}, |
|||
], |
|||
}, |
|||
}, |
|||
}; |
|||
|
|||
const baseUrl = "settleaccount/centralized-control"; |
|||
const queryUrl = `${baseUrl}/get-list`; |
|||
const detailsUrl = `${baseUrl}/get/%s`; |
|||
const createUrl = `${baseUrl}/create`; |
|||
const updateUrl = `${baseUrl}/update/%s`; |
|||
const deleteUrl = `${baseUrl}/delete-list`; |
|||
const queryMethod = "POST"; |
|||
const detailsMethod = "POST"; |
|||
const createMethod = "POST"; |
|||
const updateMethod = "POST"; |
|||
const deleteMethod = "POST"; |
|||
|
|||
export default function () { |
|||
return { |
|||
baseUrl, |
|||
query: { |
|||
url: queryUrl, |
|||
method: queryMethod, |
|||
hasFilter: true, |
|||
schema: { |
|||
title: "通用代码", |
|||
type: "object", |
|||
properties: { |
|||
filters: { |
|||
type: "array", |
|||
hidden: true, |
|||
items: { |
|||
type: "object", |
|||
properties: { |
|||
logic: { |
|||
type: "int", |
|||
}, |
|||
column: { |
|||
type: "string", |
|||
}, |
|||
action: { |
|||
type: "int", |
|||
}, |
|||
value: { |
|||
type: "string", |
|||
}, |
|||
}, |
|||
}, |
|||
default: [ |
|||
{ |
|||
logic: "and", |
|||
column: "year", |
|||
action: "like", |
|||
value: null, |
|||
readOnly: true, |
|||
}, |
|||
], |
|||
}, |
|||
skipCount: { |
|||
hidden: true, |
|||
default: 0, |
|||
}, |
|||
maxResultCount: { |
|||
hidden: true, |
|||
default: 10, |
|||
}, |
|||
sorting: { |
|||
hidden: true, |
|||
}, |
|||
}, |
|||
}, |
|||
}, |
|||
table: { |
|||
schema: schema, |
|||
}, |
|||
edit: { |
|||
detailsUrl, |
|||
createUrl, |
|||
updateUrl, |
|||
deleteUrl, |
|||
detailsMethod, |
|||
createMethod, |
|||
updateMethod, |
|||
deleteMethod, |
|||
schema: schema, |
|||
}, |
|||
}; |
|||
} |
@ -0,0 +1,27 @@ |
|||
import html from "html"; |
|||
import { ref } from "vue"; |
|||
import request from "../../request/index.js"; |
|||
import AppList from "../../components/list/index.js"; |
|||
import useConfig from "../../models/centralized-control.js"; |
|||
|
|||
export default { |
|||
components: { AppList }, |
|||
template: html`<app-list ref="listRef" :config="config" @command="onCommand" />`, |
|||
setup(props, context) { |
|||
const listRef = ref(null); |
|||
const config = useConfig(); |
|||
const onCommand = async (item, rows, load) => { |
|||
if (item.path === "open-version" || item.path === "closed-version") { |
|||
const url = `${config.baseUrl}/${item.path}`; |
|||
await request( |
|||
url, |
|||
rows.map((o) => o.id), |
|||
{ method: "POST" } |
|||
); |
|||
console.log(context); |
|||
await load(); |
|||
} |
|||
}; |
|||
return { config, onCommand }; |
|||
}, |
|||
}; |
@ -0,0 +1,97 @@ |
|||
using Hangfire.Annotations; |
|||
using SettleAccount.Bases; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
using Volo.Abp; |
|||
using Volo.Abp.Domain.Entities; |
|||
using Volo.Abp.Domain.Services; |
|||
using Volo.Abp.Guids; |
|||
using Volo.Abp.ObjectMapping; |
|||
using Win.Sfs.SettleAccount.Bases.DomainServices; |
|||
using Win.Sfs.SettleAccount.Boms; |
|||
using Win.Sfs.SettleAccount.Entities.Materials; |
|||
using Win.Sfs.SettleAccount.MaterialRelationships; |
|||
using Win.Sfs.Shared.RepositoryBase; |
|||
|
|||
namespace Win.Sfs.SettleAccount.Entities.Managers |
|||
{ |
|||
public class CAN_SA_MNG<TEntity,TEntityDetail> : DomainService |
|||
where TEntity : SA_CAN_BASE_MAIN |
|||
where TEntityDetail : SA_CAN_BASE |
|||
{ |
|||
private readonly INormalEfCoreRepository<TEntity, Guid> _repository; |
|||
private readonly INormalEfCoreRepository<TEntityDetail, Guid> _detailRepository; |
|||
public CAN_SA_MNG |
|||
( |
|||
INormalEfCoreRepository<TEntity, Guid> repository, |
|||
INormalEfCoreRepository<TEntityDetail, Guid> detailRepository |
|||
) |
|||
{ |
|||
_repository= repository; |
|||
_detailRepository= detailRepository; |
|||
} |
|||
public virtual async Task<bool> SetState(TEntity p_entiy,SettleBillState state) |
|||
{ |
|||
switch (p_entiy.State) |
|||
{ |
|||
case SettleBillState.财务已审核: |
|||
if (state == SettleBillState.商务已审核) |
|||
{ |
|||
p_entiy.State = state; |
|||
} |
|||
else |
|||
{ |
|||
throw new BusinessException("8989", "当前状态不是【商务已审核】,无法设置成【财务已审核】状态"); |
|||
} |
|||
break; |
|||
case SettleBillState.商务已审核: |
|||
if (state == SettleBillState.已开票) |
|||
{ |
|||
p_entiy.State = state; |
|||
} |
|||
else |
|||
{ |
|||
throw new BusinessException("8989", "当前状态不是【已开票】状态,无法设置成【商务已审核】"); |
|||
} |
|||
break; |
|||
case SettleBillState.已开票: |
|||
if (state == SettleBillState.未结状态) |
|||
{ |
|||
p_entiy.State = state; |
|||
} |
|||
else |
|||
{ |
|||
throw new BusinessException("8989", "当前状态不是【未结状态】状态,无法设置成【已开票】"); |
|||
} |
|||
break; |
|||
case SettleBillState.已扣减: |
|||
if (state == SettleBillState.财务已审核) |
|||
{ |
|||
p_entiy.State = state; |
|||
} |
|||
else |
|||
{ |
|||
throw new BusinessException("8989", "当前状态不是【商务已审核】,无法设置成【财务已审核】状态"); |
|||
} |
|||
break; |
|||
} |
|||
await _repository.UpdateAsync(p_entiy); |
|||
return true; |
|||
} |
|||
|
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
} |
@ -0,0 +1,42 @@ |
|||
using SettleAccount.Bases; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
using Volo.Abp.Domain.Services; |
|||
using Volo.Abp; |
|||
using Win.Sfs.Shared.RepositoryBase; |
|||
|
|||
namespace Win.Sfs.SettleAccount.Entities.Managers |
|||
{ |
|||
/// <summary>
|
|||
/// 不能結算管理
|
|||
/// </summary>
|
|||
/// <typeparam name="TEntity"></typeparam>
|
|||
/// <typeparam name="TEntityDetail"></typeparam>
|
|||
/// <typeparam name="TNOTDetail"></typeparam>
|
|||
public class NOT_SA_MNG<TEntity,TEntityDetail, TNOTDetail> : DomainService |
|||
where TEntity : SA_CAN_BASE_MAIN |
|||
where TEntityDetail : SA_CAN_BASE |
|||
where TNOTDetail:SA_NOT_BASE |
|||
{ |
|||
private readonly INormalEfCoreRepository<TEntity, Guid> _repository; |
|||
private readonly INormalEfCoreRepository<TEntityDetail, Guid> _detailRepository; |
|||
public NOT_SA_MNG |
|||
( |
|||
INormalEfCoreRepository<TEntity, Guid> repository, |
|||
INormalEfCoreRepository<TEntityDetail, Guid> detailRepository |
|||
) |
|||
{ |
|||
_repository = repository; |
|||
_detailRepository = detailRepository; |
|||
} |
|||
public virtual async Task<bool> GenerateSettlementOrder(List<TNOTDetail> p_list) |
|||
{ |
|||
return true; |
|||
} |
|||
|
|||
|
|||
} |
|||
} |
Binary file not shown.
Loading…
Reference in new issue