优化案件模块
This commit is contained in:
@@ -288,7 +288,7 @@ class Project(APIView):
|
||||
:param kwargs:
|
||||
:return:
|
||||
"""
|
||||
type = request.data.get('type')
|
||||
project_type = request.data.get('type')
|
||||
ContractNo = request.data.get('ContractNo')
|
||||
times = request.data.get('times')
|
||||
client_info = request.data.get('client_info') # 委托人身份信息
|
||||
@@ -314,7 +314,7 @@ class Project(APIView):
|
||||
return Response({'status': 'error', 'message': '此接口不需要 user_id 参数,立项登记已独立创建', 'code': 1}, status=status.HTTP_400_BAD_REQUEST)
|
||||
|
||||
# 验证必填字段
|
||||
if not all([type, ContractNo, times, client_info, party_info, description, charge]):
|
||||
if not all([project_type, ContractNo, times, client_info, party_info, description, charge]):
|
||||
return Response({'status': 'error', 'message': '缺少必填参数', 'code': 1}, status=status.HTTP_400_BAD_REQUEST)
|
||||
|
||||
# 验证负责人信息(字典格式)
|
||||
@@ -357,7 +357,7 @@ class Project(APIView):
|
||||
|
||||
# 创建立项登记
|
||||
pro = ProjectRegistration.objects.create(
|
||||
type=type,
|
||||
type=project_type,
|
||||
ContractNo=ContractNo,
|
||||
times=times,
|
||||
client_info=client_info,
|
||||
|
||||
Reference in New Issue
Block a user