Commit 7f83d593 by 魏强

新增退款原因;

parent 1896b8aa
...@@ -421,10 +421,11 @@ def rent_money_refund_new(): ...@@ -421,10 +421,11 @@ def rent_money_refund_new():
rent_no = json_data['rent_no'] if 'rent_no' in json_data else '' 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 '' 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 '' comment = json_data['comment'] if 'comment' in json_data else ''
time_price = json_data['time_price'] if 'time_price' 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 cause or not comment or not time_price:
return jsonify(PARAMETER_ERROR) return jsonify(PARAMETER_ERROR)
rent_info = db.session.query(Production, Rent).join(Rent, Rent.id == Production.rent_id).filter( rent_info = db.session.query(Production, Rent).join(Rent, Rent.id == Production.rent_id).filter(
...@@ -481,6 +482,7 @@ def rent_money_refund_new(): ...@@ -481,6 +482,7 @@ def rent_money_refund_new():
rent_refund.production_id = rent_info.Production.id rent_refund.production_id = rent_info.Production.id
rent_refund.fee = refund_money rent_refund.fee = refund_money
rent_refund.comment = comment rent_refund.comment = comment
rent_refund.cause = cause
rent.total = rent_total rent.total = rent_total
rent.real_total = rent_real_total rent.real_total = rent_real_total
......
...@@ -12,3 +12,4 @@ class RentRefund(BaseModel): ...@@ -12,3 +12,4 @@ class RentRefund(BaseModel):
production_id = Column(Integer, server_default=FetchedValue(), nullable=False) production_id = Column(Integer, server_default=FetchedValue(), nullable=False)
fee = Column(Integer, server_default=FetchedValue(), nullable=False) fee = Column(Integer, server_default=FetchedValue(), nullable=False)
comment = Column(Text(collation='utf8mb4_unicode_ci'), nullable=False) comment = Column(Text(collation='utf8mb4_unicode_ci'), nullable=False)
cause = Column(String(191, 'utf8mb4_unicode_ci'))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment