mahao 1 year ago
parent
commit
8ad7c9081a
  1. 2
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/table/index.js
  2. 8
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/input/jie-suan.js
  3. 14
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/_check.js
  4. 25
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/BA_SERVICE.cs
  5. 16
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/PD_SERVICE.cs
  6. 14
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_BA_SERVICE.cs
  7. 31
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_PD_SERVICE.cs
  8. 2
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/INVOICE_SERVICE.cs
  9. 3
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/INV_MNG.cs
  10. 5
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/INV_MNG_EXT.cs
  11. 24
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/EnumBillState.cs

2
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/table/index.js

@ -39,7 +39,7 @@ export default {
</template>
<div class="cell el-table__cell" :class="key" v-else-if="!item.hidden">
<div class="cell">
<template v-if="item.input==='datetime'">{{dayjs(model[key]).format('YYYY-MM-DD HH:mm:ss')}}</template>
<template v-if="item.input==='datetime'">{{dayjs(row[key]).format('YYYY-MM-DD HH:mm:ss')}} {{}}</template>
<template v-else>{{row[key]}}</template>
</div>
</div>

8
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/input/jie-suan.js

@ -1,12 +1,12 @@
import businessType, { version, state } from "../_options.js";
export default function (businessType, meta) {
export default function (type, meta) {
let service = null;
let detailService = null;
if (businessType === "JisBBAC" || businessType === "MaiDanJianBBAC") {
if (type === "JisBBAC" || type === "MaiDanJianBBAC") {
service = "bbac_sa_service";
detailService = "bbac_sa_detail_service";
} else if (businessType === "JisHBPO" || businessType === "MaiDanJianHBPO") {
} else if (type === "JisHBPO" || type === "MaiDanJianHBPO") {
service = "hbpo_sa_service";
detailService = "hbpo_sa_detail_service";
} else {
@ -100,7 +100,7 @@ export default function (businessType, meta) {
{ label: 1046, value: 1046 },
],
input: "select",
hidden: true,
hideForList: true,
default: meta.client === "bbac-1040" ? 1040 : 1046,
};
querySchema.properties.filters.default.push({

14
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/_check.js

@ -63,8 +63,8 @@ export default {
<el-step title="发票预览" />
<el-step title="重开成功" />
</el-steps>
<div v-loading="loading">
<div class="setup1" v-show="setupRef===1" style="height:calc(100% - 120px);">
<div v-loading="loading" style="height:calc(100% - 60px);">
<div class="setup1" v-show="setupRef===1" style="height:100%;">
<el-row style="padding:14px 0;height:60px;">
<el-col>
<el-button type="primary" @click="showAddAdjDialog">新建</el-button>
@ -80,7 +80,7 @@ export default {
</el-row>
</el-scrollbar>
</div>
<div class="setup2" v-show="setupRef===2" style="height:calc(100% - 60px);background:#ebeef5;">
<div class="setup2" v-show="setupRef===2" style="height:100%;background:#ebeef5;">
<el-row style="width:100%;height:100%;padding:10px;">
<el-col :span="12" style="height:100%;padding:0 5px 0 0;">
<el-scrollbar>
@ -94,7 +94,7 @@ export default {
</el-col>
</el-row>
</div>
<div class="setup3" v-show="setupRef===3" style="height:calc(100% - 60px);">
<div class="setup3" v-show="setupRef===3" style="height:100%;">
<el-row style="width:100%;height:100%;padding:10px;">
<el-col style="height:100%;padding:0 5px 0 0;">
<el-scrollbar>
@ -117,7 +117,7 @@ export default {
</el-col>
</el-row>
</div>
<div class="setup4" v-show="setupRef===4" style="height:calc(100% - 60px);">
<div class="setup4" v-show="setupRef===4" style="height:100%;">
<el-row style="width:100%;height:100%;padding:10px;">
<el-col style="height:100%;padding:0 5px 0 0;">
<el-scrollbar>
@ -488,7 +488,7 @@ export default {
},
};
const defaultAdjModel = schemaToModel(adjSchema);
const adjModel = ref(Object.assign({ invBillNum: "" }, defaultAdjModel));
const adjModel = ref(null);
const addAdjFormRef = ref(null);
const showAddAdjDialog = () => {
adjModel.value = Object.assign({}, defaultAdjModel);
@ -498,7 +498,7 @@ export default {
try {
const valid = await addAdjFormRef.value.validate();
if (valid) {
adjList.value.unshift(adjModel.value);
adjList.value.unshift(Object.assign({}, adjModel.value));
addDialogVisible.value = false;
nextTick(() => {
scrollRef.value.update();

25
code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/BA_SERVICE.cs

@ -105,7 +105,6 @@ namespace Win.Sfs.SettleAccount.Bases
[HttpPost]
public virtual async Task<IActionResult> GenerateInvoice(List<string> p_invs)
{
var issucess=await _invMng.SetForwardState(p_invs, SettleBillState.);
if (issucess == true)
{
@ -122,11 +121,7 @@ namespace Win.Sfs.SettleAccount.Bases
[HttpPost]
public virtual async Task<IActionResult> ReissueInvoice([FromBody] string input)
{
// await _invMng.SetForwardState(input.InvGroupNum, SettleBillState.商务已审核);
return new JsonResult(new { Code = 200, Message = "重开成功" });
}
/// <summary>
/// 主表查询
@ -144,7 +139,6 @@ namespace Win.Sfs.SettleAccount.Bases
{
itm.TaxAmtDiff = itm.TaxAmt + itm.TaxDiff;
}
return new PagedResultDto<INVOICE_GRP_DTO>(totalCount, dtos);
}
/// <summary>
@ -314,8 +308,6 @@ namespace Win.Sfs.SettleAccount.Bases
{
itm.TaxAmtDiff = itm.TaxAmt + itm.TaxDiff;
}
var classDisplayName = typeof(INVOICE_GRP_DTO).GetCustomAttribute<DisplayAttribute>()?.Name ?? typeof(INVOICE_GRP_DTO).Name;
string _fileName = $"{classDisplayName}_{Guid.NewGuid().ToString()}.xlsx";
byte[] result = null;
@ -354,12 +346,9 @@ namespace Win.Sfs.SettleAccount.Bases
{
return new JsonResult(new { Code = 200, Message = "退回成功" });
}
return new JsonResult(new { Code = 400, Message = "退回失败" });
}
[HttpPost]
public virtual async Task<IActionResult> ReceivedAsync(List<string> p_ins)
{
@ -478,8 +467,7 @@ namespace Win.Sfs.SettleAccount.Bases
{
return true;
}
throw new BusinessException("8989", "生成失败,请检查调整表和旧发票内容");
throw new BusinessException("8989", "生成失败,请检查调整表和旧发票内容");
}
[UnitOfWork(false)]
/// <summary>
@ -526,9 +514,11 @@ namespace Win.Sfs.SettleAccount.Bases
/// <summary>
/// 检查是否有重复
/// </summary>
/// <param name="p_list">调整明细数据</param>
/// <returns></returns>
protected async Task<List<ERR_EXP_DTO>> CheckRepeat(List<PUB_ADJ_DETAIL_DTO> p_list)
{
var errorlist = p_list.GroupBy(p => new { p.PN, p.LU }).Where(p => p.Count() > 1).Select(p => new { p.Key.PN, p.Key.LU }).ToList();
@ -544,9 +534,6 @@ namespace Win.Sfs.SettleAccount.Bases
}
/// <summary>
/// 校验规则
/// </summary>

16
code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/PD_SERVICE.cs

@ -138,8 +138,6 @@ namespace Win.Sfs.SettleAccount.Bases
//[Route("generateinvoice")]
public virtual async Task<string> ApprovalPassed(List<string> p_list)
{
return ApplicationConsts.SuccessStr;
}
/// <summary>
@ -164,21 +162,7 @@ namespace Win.Sfs.SettleAccount.Bases
[HttpPost]
public virtual async Task<string> RejectAsync(TRequestMainInput input)
{
return ApplicationConsts.SuccessStr;
}
public virtual async Task<TEntity> GetMainAsync([FromBody] string billNum)
{

14
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_BA_SERVICE.cs

@ -226,16 +226,11 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
/// <returns></returns>
public virtual async Task<IActionResult> ReissueInvoiceExtend(List<PUB_ADJ_DETAIL_DTO> p_list)
{
var errorlist = await CheckRepeat(p_list);
var errorlist = await CheckRepeat(p_list);//是否录入数据重复
if (errorlist.Count > 0)
{
return new JsonResult(new { Code = ApplicationConsts.ImportFailCode, Message = "错误提示文件已下载,请打开文件查看", fileName = await ExportErrorReportAsync(errorlist) });
}
var adjlist = ObjectMapper.Map<List<PUB_ADJ_DETAIL_DTO>, List<PUB_ADJ_DETAIL>>(p_list);
if (adjlist == null && adjlist.Count == 0)
{
@ -243,18 +238,13 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
}
var first = p_list.FirstOrDefault();
var invbillnum = first.InvBillNum;
var version=int.Parse(DateTime.Now.ToString("yyyymm"));
var inv= await GetInvoiceGroupByInvBillNum(invbillnum);
var settle =await _bbacMng.GetMainAsync(inv.InvGroupNum);
if(settle==null)
{
throw new UserFriendlyException( $"选择发票:{invbillnum}对应的可结算单不粗拿在在请检查!", "400");
}
version=settle.Version;
if (inv != null)
{
@ -298,7 +288,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
var gNumList = entitys.Select(p => p.GroupNum).Distinct().ToList();
//var groupNumList = entitys.Select(p => new { p.GroupNum).Distinct().ToList();
//var notList = _notRepository.Where(p => gNumList.Contains(p.GroupNum)).ToList();//不能结算
var priceList = _priceRepository.ToList();//价格单
var priceList = _priceRepository.Where(p => p.ClientCode == inv.Site && p.IsCancel == false).ToList();//价格单
//var errorList =await CheckInvoiceGenerationRules(entitys, priceList, inv.BusinessType);
//if (errorList.Count() > 0)
//{

31
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_PD_SERVICE.cs

@ -1,5 +1,5 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Components;
//using Microsoft.AspNetCore.Components;
using SettleAccount.Domain.BQ;
using SettleAccount.Job.Services.Report;
using SettleAccount.Job.Services;
@ -23,6 +23,7 @@ using Win.Sfs.SettleAccount.Entities.TaskJobs;
using Volo.Abp.Uow;
using Volo.Abp;
using EFCore.BulkExtensions;
using Microsoft.AspNetCore.Mvc;
namespace Win.Sfs.SettleAccount.Entities.BQ
{
@ -70,7 +71,33 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
});
return _taskid;
}
//[HttpPost]
//public virtual async Task<string> RejectAsync(List<string> p_list)
//{
// var detailist = _detailRepository.Where(p => p_list.Contains(p.BillNum)).ToList();
// List<CustomCondition> customConditionList = new List<CustomCondition>();
// customConditionList.Add(new CustomCondition() { Name = "BillNumList", Value = string.Join(",", p_list) });
// customConditionList.Add(new CustomCondition() { Name = "Type", Value = EnumBusinessType.JisBBAC.ToString() });
// customConditionList.Add(new CustomCondition() { Name = "IsOut", Value = "out" });
// var ls = _repository.Where(p => p_list.Contains(p.BillNum)).ToList();
// var lst = ls.Where(p => (p.State == SettleBillState.已提交扣减 || p.State == SettleBillState.已扣减));
// if (lst.Count() > 0)
// {
// throw new UserFriendlyException("当前状态是已提交状态,不能重复已提交", "400");
// }
// foreach (var item in ls)
// {
// item.State = SettleBillState.已提交扣减;
// }
// await _repository.DbContext.BulkUpdateAsync(ls);
// var _taskid = await _service.ExportEnqueueAsync("BBAC待扣减任务", ExportExtentsion.Excel, DateTime.Now.ToString("yyyyMM"), string.Empty, CurrentUser, typeof(PendingDeductionService), customConditionList, (rs) =>
// {
// });
// return _taskid;
//}
}
}

2
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/INVOICE_SERVICE.cs

@ -655,7 +655,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
//inv.TaxAmt = inv.Amt+ Math.Round(inv.Amt * newinv.Tax, 2);
inv.RealnvBillNum = newinv.RealnvBillNum;
// inv.RealAmt = newinv.RealAmt;
inv.TaxDiff =inv.TaxAmt+ newinv.PreTaxDiff;
inv.TaxDiff =newinv.PreTaxDiff;
// inv.ClientCode = newinv.ClientCode;
}

3
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/INV_MNG.cs

@ -1376,6 +1376,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
foreach (var detail in adjdetails)
{
detail.InvBillNum = key;
adjlist.Add(detail);
}
}
var detailDtos = dtos.Where(p => ls.Contains(p.GroupNum)).GroupBy(p => new { p.InvGroupNum, p.PartCode, p.Price, p.BeginDate, p.EndDate, p.ContractDocID, p.LU })
@ -1916,7 +1917,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
foreach (var detail in adjdetails)
{
detail.InvBillNum = key;
adjdetails.Add(detail);
adjlist.Add(detail);
}
}

5
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/INV_MNG_EXT.cs

@ -577,6 +577,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
}
return detailList;
}
[UnitOfWork(false)]
/// <summary>
/// 第一次开票
/// </summary>
@ -675,7 +676,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
foreach (var detail in adjdetails)
{
detail.InvBillNum = key;
adjdetails.Add(detail);
}
}
var detailDtos = dtos.Where(p => ls.Contains(p.GroupNum)).GroupBy(p => new { p.InvGroupNum, p.PartCode, p.Price, p.BeginDate, p.EndDate, p.ContractDocID,p.LU })
@ -942,7 +943,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
foreach (var detail in adjdetails)
{
detail.InvBillNum = key;
adjdetails.Add(detail);
}
}

24
code/src/Modules/SettleAccount/src/SettleAccount.Domain/EnumBillState.cs

@ -34,6 +34,30 @@ namespace Win.Sfs.SettleAccount
= 6
}
public enum PDBillState
{
[Description("新建")]
= 4,
[Description("已扣减")]
= 5,
[Description("已提交扣减")]
= 6,
[Description("已提交反结")]
= 7
}
public enum InvoiceBillState
{
[Description("在用")]

Loading…
Cancel
Save