Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tour_business
Overview
Overview
Details
Activity
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
魏强
tour_business
Commits
7f83d593
Commit
7f83d593
authored
Feb 25, 2021
by
魏强
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增退款原因;
parent
1896b8aa
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletions
+4
-1
Controller/RentController.py
+3
-1
Model/Rent/RentRefundModel.py
+1
-0
No files found.
Controller/RentController.py
View file @
7f83d593
...
...
@@ -421,10 +421,11 @@ def rent_money_refund_new():
rent_no
=
json_data
[
'rent_no'
]
if
'rent_no'
in
json_data
else
''
hatch_no
=
json_data
[
'hatch_no'
]
if
'hatch_no'
in
json_data
else
''
cause
=
json_data
[
'cause'
]
if
'cause'
in
json_data
else
''
comment
=
json_data
[
'comment'
]
if
'comment'
in
json_data
else
''
time_price
=
json_data
[
'time_price'
]
if
'time_price'
in
json_data
else
[]
if
not
rent_no
or
not
hatch_no
or
not
comment
or
not
time_price
:
if
not
rent_no
or
not
hatch_no
or
not
c
ause
or
not
c
omment
or
not
time_price
:
return
jsonify
(
PARAMETER_ERROR
)
rent_info
=
db
.
session
.
query
(
Production
,
Rent
)
.
join
(
Rent
,
Rent
.
id
==
Production
.
rent_id
)
.
filter
(
...
...
@@ -481,6 +482,7 @@ def rent_money_refund_new():
rent_refund
.
production_id
=
rent_info
.
Production
.
id
rent_refund
.
fee
=
refund_money
rent_refund
.
comment
=
comment
rent_refund
.
cause
=
cause
rent
.
total
=
rent_total
rent
.
real_total
=
rent_real_total
...
...
Model/Rent/RentRefundModel.py
View file @
7f83d593
...
...
@@ -12,3 +12,4 @@ class RentRefund(BaseModel):
production_id
=
Column
(
Integer
,
server_default
=
FetchedValue
(),
nullable
=
False
)
fee
=
Column
(
Integer
,
server_default
=
FetchedValue
(),
nullable
=
False
)
comment
=
Column
(
Text
(
collation
=
'utf8mb4_unicode_ci'
),
nullable
=
False
)
cause
=
Column
(
String
(
191
,
'utf8mb4_unicode_ci'
))
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