Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
huatu_API
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liudong1993
huatu_API
Commits
27709f74
Commit
27709f74
authored
Sep 26, 2025
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1 画途 删除附件凭证
parent
f1b8fcb0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
87 additions
and
0 deletions
+87
-0
FinancialModule_Part.cs
REBORN.Module.FinanceModule/FinancialModule_Part.cs
+42
-0
FinancialService2.cs
REBORN.Services.FinanceService/FinancialService2.cs
+38
-0
financesetting.json
REBORN.WebApi/AppStting/financesetting.json
+7
-0
No files found.
REBORN.Module.FinanceModule/FinancialModule_Part.cs
View file @
27709f74
...
...
@@ -858,5 +858,47 @@ namespace REBORN.Module.FinanceModule
}
}
#
endregion
#
region
删除单据凭证
/// <summary>
/// 删除附件凭证
/// </summary>
/// <param name="frId"></param>
/// <param name="voucherId"></param>
/// <param name="userInfo"></param>
/// <returns></returns>
public
string
DelFinanceVorcherInos
(
int
frId
,
string
voucherId
,
UserInfo
userInfo
)
{
var
vlist
=
voucherRepository
.
GetList
(
new
RB_Voucher
()
{
VoucherType
=
0
,
FinanceId
=
frId
});
if
(
vlist
.
Count
()
<=
1
)
{
return
"凭证附件数小于等于1,无法删除"
;
}
var
vmodel
=
vlist
.
Where
(
x
=>
x
.
Content
.
Contains
(
voucherId
)).
FirstOrDefault
();
if
(
vmodel
==
null
)
{
return
"凭证附件不存在"
;
}
bool
flag
=
voucherRepository
.
Delete
(
vmodel
)
>
0
;
if
(
flag
)
{
Model
.
Entity
.
Log
.
RB_Finance_Infochange_Log
logModel
=
new
Model
.
Entity
.
Log
.
RB_Finance_Infochange_Log
{
LogId
=
0
,
RB_Branch_id
=
0
,
RB_Group_id
=
userInfo
.
RB_Group_id
,
UpdateBy
=
userInfo
.
EmployeeId
,
UpdateDate
=
DateTime
.
Now
,
ResourceId
=
frId
,
StartValue
=
$"删除附件【
{
vmodel
.
Content
}
】"
,
Type
=
Common
.
Enum
.
Log
.
TemplateEnum
.
Process
,
EndValue
=
""
,
Description
=
""
};
RB_Finance_InfoChange_LogRepository
.
Insert
(
logModel
);
return
""
;
}
else
{
return
"删除失败"
;
}
}
#
endregion
}
}
REBORN.Services.FinanceService/FinancialService2.cs
View file @
27709f74
...
...
@@ -4369,5 +4369,43 @@ namespace REBORN.Services.FinanceService
}
#
endregion
#
region
删除单据附件凭证
/// <summary>
/// 有权限的可以删除凭证
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
public
virtual
ApiResult
DelFinanceVorcherInos
(
RequestParm
request
)
{
var
userInfo
=
CacheManager
.
User
.
RbUserCache
.
GetUserLoginInfo
(
request
.
uid
);
if
(
userInfo
!=
null
&&
userInfo
.
RB_Post_Id
>
0
)
{
string
actionMenu
=
CacheManager
.
User
.
RbUserCache
.
GetUserActionMenu
(
userInfo
.
RB_Post_Id
);
if
(!(!
string
.
IsNullOrEmpty
(
actionMenu
)
&&
actionMenu
.
Contains
(
"F_DelFinanceVoucher"
)))
{
return
ApiResult
.
Failed
(
"没有权限操作"
);
}
}
JObject
parms
=
JObject
.
Parse
(
request
.
msg
.
ToString
());
string
VoucherId
=
parms
.
GetStringValue
(
"VoucherId"
);
int
FrId
=
parms
.
GetInt
(
"FrId"
,
0
);
if
(
string
.
IsNullOrEmpty
(
VoucherId
)
||
FrId
<=
0
)
{
return
ApiResult
.
ParamIsNull
();
}
VoucherId
=
Path
.
GetFileName
(
VoucherId
);
string
msg
=
module
.
DelFinanceVorcherInos
(
FrId
,
VoucherId
,
userInfo
);
if
(
msg
==
""
)
{
return
ApiResult
.
Success
();
}
else
{
return
ApiResult
.
Failed
(
msg
);
}
}
#
endregion
}
}
\ No newline at end of file
REBORN.WebApi/AppStting/financesetting.json
View file @
27709f74
...
...
@@ -2184,6 +2184,13 @@
"checkFormRepeatSubmit"
:
true
,
"url"
:
""
},
{
"cmd"
:
"Financial_post_DelFinanceVorcherInos"
,
//删除单据附件
"fullName"
:
"REBORN.Services.FinanceService.FinancialService"
,
"method"
:
"DelFinanceVorcherInos"
,
"checkFormRepeatSubmit"
:
true
,
"url"
:
""
},
{
"cmd"
:
"Financial_post_GetFinanceRefundEnumService"
,
//获取退款枚举类型
"fullName"
:
"REBORN.Services.FinanceService.FinancialService"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment