Blame view

documents/api/build/html/_sources/02-finance-http.rst.txt 37 KB
1 2 3
财务进度服务http接口
=======================

王军业 committed
4 5 6
销售合同
^^^^^^^^^^^^^^^^^^^

7
增加销售合同
王军业 committed
8
*************
9 10

 | Verb: POST 
王军业 committed
11
 | Path: /api/v1/financial/contracts
12 13 14 15 16 17 18
 | Header: (Content-Type: application/json)

  Request Body:

  .. code-block:: python
     
	 {
19
		"contract_unid":"2018-079",                        		    #合同unid
王军业 committed
20 21 22 23 24 25 26 27 28 29 30 31 32
		"salesperson_unid":"1235",                      		          #销售员unid
		"project_unid":"1000",                         	         #项目unid
		"customer_unid":"1000",                                   #客户unid
		"province":"1234",                     		                 #项目所在地的省份,通过code服务进行查询
		"city":"1234",                         		            #项目所在地的市区,通过code服务进行查询
		"county":"1234",                         		            #项目所在地的县或区,通过code服务进行查询
		"guarantee_period":6,                                       #质保周期,月份,步长为6(目前取值范围:6~60)
		"sign_date":"2018-03-09",                             		    #签订时间
		"product_line_type":"1",                    		            #产品线类型,(安防、交通、客流、维保)
		"contract_state":"2",                        		    #合同状态,(已完成、待发货,施工中,项目暂停)
		"contract_type":"3",                       		    #合同性质,(供货,施工,集成,维保)
		"contract_amount":140000.00,                       		    #合同金额,小数点保留两位
		"deduct_amount":5000.00,                         		    #折扣金额,小数点保留两位
33
		"contract_amount_note":"xxxx",                  		    #合同金额备注,文本
王军业 committed
34
		"stop_amount":200.00,                           		    #暂停金额,小数点保留两位
35
		"reback_note":"xxxx",                           		    #累计回款额备注,文本
王军业 committed
36
		"exemptions_amount":100.00,                     		    #豁免金额,小数点保留两位
37
		"contract_remain_note":"xxxx",                  		    #合同余额备注
王军业 committed
38 39
		"is_archive":false,                                                #是否归档
		"bad_amount":5000.00,                            		    #坏账金额,小数点保留两位
王军业 committed
40
		"bad_amount_note":"xxxx",                       		    #坏账金额备注
王军业 committed
41 42 43 44 45
		"confirm_income_amount":144000.00,                 		    #确定收入金额,小数点保留两位
		"amount_state_unid":"3",                    		            #帐款状态,通过code服务进行查询
		"start_guarantee_date":"2018-02-03",                  		    #维保服务期开始时间
		"end_guarantee_date":"2018-06-09",                   		            #维保服务期结束时间
		"mainten_start_point":"3",                   		    #质保期开始节点(签订时间,到货验收时间,项目终验时间)
王军业 committed
46
		"contract_note":"xxxx",                         		    #合同备注
47
		"appendix_unids":[xxxx,xxxx,...]                    		            #合同附件(若有附件上传该字段)
王军业 committed
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
	}
	 
  Response Body:

  .. code-block:: python
  
	{
		"ecode":"200", 		                                           #新增成功返回码
		"enote":"OK"                                                   #返回说明 
		
	}
	

	
查询具体合同详情
******************	

 | Verb: GET 
王军业 committed
66
 | Path: /api/v1/financial/contracts/{$contract_unid}
王军业 committed
67 68 69 70 71 72 73 74 75 76 77 78 79 80
 | Header: (Content-Type: application/json)

  Request Body:无
	
  Response Body:

  .. code-block:: python
  
    {
		"salesperson_unid":"1234",                      		            #销售员unid
		"salesperson_name":"吴旭",                      		                  #销售员名称
		"project_unid":"12321",                         	                    #项目unid
		"project_name":"金源时代客流项目",                         	           #项目名称
		"customer_unid":"1234",                                                  #客户unid
王军业 committed
81 82 83 84 85 86 87 88 89 90 91 92
		"customer_name":"金源时代购物中心有限公司",                            #客户名称
		"province":"1010",                     		                      #项目所在地的省份
		"city":"2350",                         		                      #项目所在地的市区
		"county":"2120",                                                        #项目所在地的县或区
		"guarantee_period":6,                                       #质保周期,月份,步长为6
		"sign_date":"2018-03-09",                                                 #签订时间
		"product_line_type":"2",                    		                  #产品线类型,(安防、交通、客流、维保)
		"contract_state":"2",                        		          #合同状态,(已完成、待发货,施工中,项目暂停)
		"contract_type":"5",                       		          #合同性质,(供货,施工,集成,维保)
		"contract_amount":140000.00,                       		          #合同金额,小数点保留两位
		"deduct_amount":5000.00,                         		          #折扣金额,小数点保留两位
		"total_reback_amount":50000.00,                                     #累计回款额
王军业 committed
93
		"contract_amount_note":"xxxx",                  		          #合同金额备注,文本
王军业 committed
94
		"stop_amount":6000.00,                           		          #暂停金额,小数点保留两位
王军业 committed
95
		"reback_note":"xxxx",                           		          #累计回款额备注,文本
王军业 committed
96 97
		"contract_remain":3000.00,                                         #合同余额
		"exemptions_amount":400.00,                     		          #豁免金额,小数点保留两位
王军业 committed
98
		"contract_remain_note":"xxxx",                  		          #合同余额备注
王军业 committed
99 100
		"is_archive":false,                              		 	  #是否归档
		"bad_amount":15500.00,                            		          #坏账金额,小数点保留两位
王军业 committed
101
		"bad_amount_note":"xxxx",                       		          #坏账金额备注
王军业 committed
102 103 104 105 106 107 108 109 110 111
		"total_receive_amount":800.00,                  		          #累计应收款,小数点保留两位
		"total_amount_remain":6000.00,                                     #应收账款余额
		"over_days":176,                                               #逾期天数
		"confirm_income_amount":130000.00,                 		          #确定收入金额,小数点保留两位
		"amount_state_unid":"3",                    		                  #帐款状态
		"start_guarantee_date":"2018-03-09",                  		          #维保服务期开始时间
		"end_guarantee_date":"2018-06-09",                   		                  #维保服务期结束时间
		"mainten_start_point":"3",                   		          #质保期开始节点
		"mainten_start_date":"2018-02-03",                    		          #质保期开始时间
		"mainten_end_date":"2018-06-09",                                        #质保期结束时间
熊付 committed
112 113
		"payment_data":[                                                  #付款约定
			{
114 115
			   "payment_unid":xxxx,                                  #付款unid
			   "payment_progress":2,                              #付款进度
王军业 committed
116 117 118 119 120
			   "payment_type":"3",                                  #付款类型
			   "days":200,                                          #天数
			   "payment_date":2018-03-02,                                  #本期应付款日期
			   "payment_amount":1400.00,                                #本期应付金额
			   "payment_propority":0.30,                             #付款比例
熊付 committed
121 122 123 124
			   "payment_requirement":"xxxx"                            #付款条件
			},
			...
		},
王军业 committed
125
		"is_delete":xxxx,                                            #true or false ,判断合同删除与否的标志
王军业 committed
126
		"contract_note":"xxxx",                         		          #合同备注
王军业 committed
127
		"appendix_urls":["http://xxxx.pdf","xxxx",...] "                   		            #合同附件url地址(有的话返回)
王军业 committed
128 129 130 131 132 133 134
	}
	
	
修改销售合同
************** 

 | Verb: PUT 
135
 | Path: /api/v1/financial/contracts/{$contract_unid}
王军业 committed
136 137 138 139 140 141 142
 | Header: (Content-Type: application/json)

  Request Body:

  .. code-block:: python
     
	 {
王军业 committed
143 144 145 146 147 148 149 150 151 152 153 154 155
		"salesperson_unid":"1234",                                        #销售员unid
		"project_unid":"1232",                                #项目unid
		"customer_unid":"1234",                   #客户unid
		"province":"1000",						#项目所在地的省份
		"city":"1234",							#项目所在地的市区
		"county":"1253",							#项目所在地的县或区
		"guarantee_period":6,				#质保周期,月份,步长为6
		"sign_date":"2018-03-09",						#签订时间
		"product_line_type":"3",					#产品线类型,(安防、交通、客流、维保)
		"contract_state":"2",                        		    #合同状态,(已完成、待发货,施工中,项目暂停)
		"contract_type":"2",                       		    #合同类型,(供货,施工,集成,维保)
		"contract_amount":140000.00,                       		    #合同金额,小数点保留两位
		"deduct_amount":5000.00,                         		    #折扣金额,小数点保留两位
王军业 committed
156
		"contract_amount_note":"xxxx",                  		    #合同金额备注,文本
王军业 committed
157
		"stop_amount":1500.00,                           		    #暂停金额,小数点保留两位
王军业 committed
158
		"reback_note":"xxxx",                           		    #累计回款额备注,文本
王军业 committed
159
		"exemptions_amount":1500.00,                     		    #豁免金额,小数点保留两位
王军业 committed
160
		"contract_remain_note":"xxxx",                  		    #合同余额备注
王军业 committed
161 162
		"is_archive":false,                              			#是否归档
		"bad_amount":120000.00,                            		    #坏账金额,小数点保留两位
163
		"bad_amount_note":"xxxx",                       		    #坏账金额备注
王军业 committed
164 165 166 167 168 169 170
		"confirm_income_amount":1400.00,                 		    #确定收入金额,小数点保留两位
		"amount_state_unid":"2",                    		            #帐款状态
		"start_guarantee_date":"2018-03-02",                  		    #维保服务期开始时间
		"end_guarantee_date":"2018-03-02",                   		            #维保服务期结束时间
		"mainten_start_point":"2",                   		    #质保期开始节点
		"mainten_start_date":"2018-03-02",                    		    #质保期开始时间
		"contract_note":"2018-06-02",                         		    #合同备注
171
		"appendix_unids":[xxxx,xxxx,...]                    		            #合同附件(若有附件上传该字段)
王军业 committed
172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188
	}
	 
  Response Body:

  .. code-block:: python
  
	{
		"ecode":"200", 		                                        #修改成功返回码
		"enote":"OK"                                                #返回说明 
		
	}

	
删除销售合同
****************

 | Verb: DELETE 
王军业 committed
189
 | Path: /api/v1/financial/contracts/{$contract_unid}
王军业 committed
190 191 192 193 194 195 196 197 198 199 200 201 202
 | Header: (Content-Type: application/json)

  Request Body:无
	 
  Response Body:                                                      

  .. code-block:: python
  
	{
		"ecode":"200", 		                                           #删除成功返回码
		"enote":"OK"                                                   #返回说明 
		
	}
熊付 committed
203 204 205 206 207

查询合同列表
********************************

 | Verb: GET 
王军业 committed
208
 | Path: /api/v1/financial/contracts
熊付 committed
209 210 211 212 213 214 215 216 217 218
 | Header: (Content-Type: application/json)

  Request Body:

  .. code-block:: python
  
    {
		"salesperson_name__like":"吴旭",                                    #销售员
		"project_name__like":"金源时代客流项目",                            #项目名称
		"customer_name__like":"北京金源时代购物中心有限公司",               #客户名称
王军业 committed
219 220 221 222
		"province":"1232",                                          #项目所在省
		"city":"1000",                                              #项目所在市
		"county":"1256",                                                #项目所在县(区)
		"guarantee_period":7,                                       #质保周期(单位是月)
熊付 committed
223 224
		"year":"2018",                                                #所属年份
		"month":"3",                                                  #所属月份
王军业 committed
225 226 227 228 229 230 231
		"product_line_type":"3",                                   #产品线类型(安防、交通、客流、维保)
		"contract_state":"2",                                      #合同状态(已完成、待发货,施工中,项目暂停)
		"contract_type":"2",                                     #合同性质(供货,施工,集成,维保)
		"acceptanc_type":"2",                                        #验收类型(1为初验,2为终验)
		"is_archive":false,                                             #合同是否归档
		"confirm_income_amount":1400.00,                               #确定收入金额
		"amount_state_unid":"3",                                   #账款状态
熊付 committed
232
		
王军业 committed
233 234 235 236 237
		"start_date":"2018-03-02",                                          #签订时间,设置开始时间
		"end_date":"2018-06-09"                                            #结束时间,设置结束时间
		"amount_point":140000.00,                                        #设置金额查询节点
		"overdays_point":176,                                      #设置逾期天数查询节点
		"leave_amount_point":11200.00,                                  #设置应收账款余额查询节点
熊付 committed
238
		
王军业 committed
239 240
		"offset":45,                                              #起始位置
		"limit":25                                                #每页显示的数量
熊付 committed
241 242 243 244 245 246 247
	}

  Response Body:

  .. code-block:: python
  
    {
王军业 committed
248 249 250
		"total_number":1000,                                            #总的数据量
		"list_size":50,                                               #本次返回的列表数量
		"offset":70,                                                  #本次返回的起始索引
熊付 committed
251 252 253
		"list_data":                                                      #数据列表
		[
			{
王军业 committed
254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275
				"contract_code":"2019-079",                                   #合同编号
				"product_line_type":"3",                                   #产品线类型(安防、交通、客流、维保)
				"sign_date":"2018-02-03",                                           #签订日期
				"salesperson_name":"1000",                                    #销售员名称
				"province":"1000",                                 #所在省份
				"city":"1234",                                     #所在市
				"county":"1000",                                       #所在县(区)
				"customer_name":"北京金源时代购物中心有限公司",               #客户名称
				"project_name":"金源时代客流项目",                            #项目名称
				"contract_amount":140000.00,                                     #合同金额
				"stop_amount":5000.00,                                         #暂停金额
				"bad_amount":4000.00,                                          #坏账金额
				"exemptions_amount":5000.00,                                   #豁免金额
				"deduct_amount":7000.00,                                       #抵扣金额
				"total_reback_amount":600.00,                                 #累计已收款
				"contract_remain":8000.00,                                     #合同余额
				"account_state_unid":"3",                                       #账款状态
				"total_receive_amount":15000.00,                                #累计应收
				"total_amount_remain":8000.00,                                       #应收账款余额
				"over_days":176,                                           #逾期天数
				"payment_data":[                                              #付款约定
				{
276 277
					"payment_unid":xxxx,                                  #付款unid
					"payment_progress":2,                              #付款进度
王军业 committed
278 279 280 281 282 283 284 285 286 287
					"payment_type":"3",                                  #付款类型
					"days":198,                                          #天数
					"payment_date":"2018-03-02",                                  #本期应付款日期
					"payment_amount":"2018-06-07",                                #本期应付金额
					"payment_propority":0.30,                             #付款比例
					"payment_requirement":"xxxx"                            #付款条件
				},
				...
				],
				"contract_note":"xxxx"                                     #合同备注
熊付 committed
288 289
			},
			...
王军业 committed
290
		]
熊付 committed
291 292 293 294 295 296 297
	}
	

导出表格
************************************************

 | Verb: GET 
王军业 committed
298
 | Path: /api/v1/financial/contracts/export
熊付 committed
299 300 301 302 303 304 305 306 307 308
 | Header: (Content-Type: application/json)

  Request Body:

  .. code-block:: python
  
    {
		"salesperson_name__like":"吴旭",                                    #销售员
		"project_name__like":"金源时代客流项目",                            #项目名称
		"customer_name__like":"北京金源时代购物中心有限公司",               #客户名称
王军业 committed
309 310 311 312
		"province":"1000",                                 #项目所在省
		"city":"1245",                                     #项目所在市
		"area":"5623",                                       #项目所在县(区)
		"guarantee_period":24,                                       #质保周期
熊付 committed
313 314
		"year":"2018",                                                #所属年份
		"month":"3",                                                  #所属月份
王军业 committed
315 316 317 318 319 320 321
		"product_line_type":"3",                                   #产品线类型(安防、交通、客流、维保)
		"contract_state":"2",                                      #合同状态(已完成、待发货,施工中,项目暂停)
		"contract_type":"3",                                     #合同性质(供货,施工,集成,维保)
		"is_end_check":true,                                        #是否终验
		"is_archive":false,                                             #合同是否归档
		"confirm_income_amount":14000.00,                               #确定收入金额
		"amount_state_unid":"3",                                   #账款状态
熊付 committed
322
		
王军业 committed
323 324 325 326 327
		"start_date":"2018-03-02",                                          #签订时间,设置开始时间
		"end_date":"2018-06-09",                                            #结束时间,设置结束时间
		"amount_point":14000.00,                                        #设置金额查询节点
		"overdays_point":176,                                      #设置逾期天数查询节点
		"leave_amount_point":1400.00                                   #设置应收账款余额查询节点
熊付 committed
328
	}
王军业 committed
329
	
熊付 committed
330 331 332
  Response Body:无


王军业 committed
333 334 335 336 337 338 339
销售合同付款约定
^^^^^^^^^^^^^^^^^^^^^
			
增加销售合同付款约定信息
**************************

 | Verb: POST 
340
 | Path: /api/v1/financial/contracts/{$contract_unid}/payments
王军业 committed
341 342 343 344 345 346 347 348
 | Header: (Content-Type: application/json)

  Request Body:

  .. code-block:: python
     
	 {
		"list_payment_data":                                                #付款约定信息表
349 350
		[
			{
351
				"payment_progress":2,                                  #付款进度(1,2,3,4)
王军业 committed
352 353 354
				"payment_type":"3",                                      #付款类型,通过code服务进行选择
				"days":45,                                              #天数
				"payment_propority":0.30,                                 #付款比例
王军业 committed
355
				"payment_requirement":""                                  #付款条件
356
			},
王军业 committed
357
			...
358
		]
王军业 committed
359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375
	}
	 
  Response Body:

  .. code-block:: python
  
	{
		"ecode":"200", 		                                           #新增成功返回码
		"enote":"OK"                                                   #返回说明 
		
	}


查询具体合同付款约定信息
***************************	

 | Verb: GET 
376
 | Path: /api/v1/financial/contracts/{$contract_unid}/payments
王军业 committed
377 378 379 380 381 382 383 384 385 386 387 388
 | Header: (Content-Type: application/json)

  Request Body:无
	
  Response Body:

  .. code-block:: python
  
    {
		"list_payment_data":                                            #付款约定列表
		[
			{
389 390
				"payment_unid":xxxx,                                  #付款unid
				"payment_progress":1,                              #付款进度
王军业 committed
391 392 393 394 395
				"payment_type":"2",                                  #付款类型
				"days":23,                                          #天数
				"payment_date":"2018-03-02",                                  #本期应付款日期
				"payment_amount":14000.00,                                #本期应付金额
				"payment_propority":0.30,                             #付款比例
王军业 committed
396 397
				"payment_requirement":"xxxx",                           #付款条件
			},
王军业 committed
398
			...
王军业 committed
399 400 401 402 403 404 405 406
		]
	}
	
	
修改销售合同付款约定信息
****************************** 

 | Verb: PUT 
407
 | Path: /api/v1/financial/contracts/{$contract_unid}/payments
王军业 committed
408 409 410 411 412 413 414 415 416 417
 | Header: (Content-Type: application/json)

  Request Body:

  .. code-block:: python
     
	 {
		"list_payment_data":                                            #付款约定列表
		[
			{
418 419
				"payment_unid":xxxx,                                  #付款unid
				"payment_progress":2,                              #付款进度
王军业 committed
420 421 422
				"payment_type":"3",                                   #付款类型
				"days":30,                                          #天数
				"payment_propority":0.30,                             #付款比例
熊付 committed
423
				"payment_requirement":"xxxx"                            #付款条件
王军业 committed
424
			},
王军业 committed
425
			...
王军业 committed
426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443
		]
	}
	 
  Response Body:

  .. code-block:: python
  
	{
		"ecode":"200", 		                                           #修改成功返回码
		"enote":"OK"                                                   #返回说明 
		
	}
	
		
删除销售合同付款约定信息
*******************************

 | Verb: DELETE 
王军业 committed
444
 | Path: /api/v1/financial/contracts/{$contract_unid}/payments
王军业 committed
445 446 447 448 449 450 451 452 453
 | Header: (Content-Type: application/json)

  Request Body:

  .. code-block:: python
     
	 {
		"payment_unids":                                               #付款unid数组
		[
王军业 committed
454
			xxxx,                                     #付款unid
王军业 committed
455
			...
王军业 committed
456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475
		]
	}
	 
  Response Body:

  .. code-block:: python
  
	{
		"ecode":"200", 		                                           #删除成功返回码
		"enote":"OK"                                                   #返回说明 
		
	}
	
销售合同回款
^^^^^^^^^^^^^^^^^^^^^^^^^
		
增加销售合同回款信息
************************

 | Verb: POST 
476
 | Path: /api/v1/financial/contracts/{$contract_unid}/rebacks
王军业 committed
477 478 479 480 481 482 483 484 485 486
 | Header: (Content-Type: application/json)

  Request Body:
	
  Response Body:

  .. code-block:: python
  
	 {
		"list_reback_data":                                         #合同回款信息表
487 488
		[
			{
489
				"reback_progress ":1,                          #回款进度
王军业 committed
490 491
				"reback_date":"2018-06-03",                               #回款时间
				"actual_reback_amount":14000.00,                      #实际回款数额
492 493
				"reback_note":"xxxx",                               #回款备注
			},
王军业 committed
494
			...
495
		]
王军业 committed
496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512
	}
	
 Response Body:

  .. code-block:: python
  
	{
		"ecode":"200", 		                                           #新增成功返回码
		"enote":"OK"                                                   #返回说明 
		
	}
	
	
查询具体合同回款信息
***********************	

 | Verb: GET 
513
 | Path: /api/v1/financial/contracts/{$contract_unid}/rebacks
王军业 committed
514 515 516 517 518 519 520 521 522 523 524 525
 | Header: (Content-Type: application/json)

  Request Body:无
	
    Response Body:

  .. code-block:: python
  
    {
		"list_reback_data":                                               #回款信息列表
		[
			{
526 527
				"reback_unid":xxxx,                                       #回款unid
				"reback_progress":2,                                 #回款进度
王军业 committed
528 529 530
				"reback_date":"2018-03-02",                                     #回款时间
				"reback_propority":0.30,                                #回款比例
				"actual_reback_amount":14000.00,                            #实际回款数额
王军业 committed
531 532
				"reback_note":"xxxx",                                     #回款备注
			},
王军业 committed
533
			...
王军业 committed
534 535 536 537 538 539 540 541
		]
	}


修改销售合同回款信息
*********************** 

 | Verb: PUT 
542
 | Path: /api/v1/financial/contracts/{$contract_unid}/rebacks
王军业 committed
543 544 545 546 547 548 549 550 551 552
 | Header: (Content-Type: application/json)

  Request Body:

  .. code-block:: python
     
	 {
		"list_reback_data":                                            #回款信息列表
		[
			{
553 554
				"reback_unid":xxxx,                                  #回款unid
				"reback_progress":3,                              #回款进度
王军业 committed
555 556
				"reback_date":"2018-03-02",                                  #回款时间
				"actual_reback_amount":14000.00,                         #实际回款数额
王军业 committed
557 558
				"reback_note ":"xxxx",                                 #回款备注
			},
王军业 committed
559
			...
王军业 committed
560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576
		]
	}
	 
  Response Body:

  .. code-block:: python
  
	{
		"ecode":"200", 		                                           #修改成功返回码
		"enote":"OK"                                                   #返回说明 
		
	}
	
删除销售合同回款信息
**************************

 | Verb: DELETE 
王军业 committed
577
 | Path: /api/v1/financial/contracts/{$contract_unid}/rebacks
王军业 committed
578 579 580 581 582 583 584 585 586
 | Header: (Content-Type: application/json)

  Request Body:

  .. code-block:: python
     
	 {
		"reback_unids":                                               #回款unid数组
		[
王军业 committed
587
			xxxx,                                     #回款unid
王军业 committed
588
			...
王军业 committed
589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608
		]
	}
	 
  Response Body:

  .. code-block:: python
  
	{
		"ecode":"200", 		                                           #删除成功返回码
		"enote":"OK"                                                   #返回说明 
		
	}
	
销售合同开票
^^^^^^^^^^^^^^^^^^
			
增加销售合同开票信息
****************************

 | Verb: POST 
609
 | Path: /api/v1/financial/contracts/{$contract_unid}/receipts
王军业 committed
610 611 612 613 614 615 616 617 618 619
 | Header: (Content-Type: application/json)

  Request Body:
  
    .. code-block:: python
	
	  {
		"list_receipt_data":                                        #合同发票信息表
		[
			{
620
				"receipt_progress":3,                          #开票进度
王军业 committed
621 622
				"receipt_amount":14000.00,                            #开票金额
				"oa_flow_id":"12345",                                #oa流水号
王军业 committed
623 624
				"receipt_note":"xxxx",                              #发票备注  
			},
王军业 committed
625
			...
王军业 committed
626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642
		]
	  }
  
  Response Body:

  .. code-block:: python
  
	{
		"ecode":"200", 		                                           #新增成功返回码
		"enote":"OK"                                                   #返回说明 
		
	}

查询具体合同开票信息
****************************	

 | Verb: GET 
643
 | Path: /api/v1/financial/contracts/{$contract_unid}/receipts
王军业 committed
644 645 646 647 648 649 650 651 652 653 654 655
 | Header: (Content-Type: application/json)

  Request Body:无
	
    Response Body:

  .. code-block:: python
  
    {
		"list_receipt_data":                                            #开票信息列表
		[
			{
656 657
				"receipt_unid":xxxx,                                    #发票unid
				"receipt_progress":3,                              #开票次数
王军业 committed
658 659 660 661
				"oa_flow_id ":"12345",                                   #oa流水号
				"receipt_amount":14000.00,                                #开票金额
				"total_receipt_amount":5000.00,                          #累计开票金额
				"receipt_propority":0.30,                             #开票比例
王军业 committed
662
				"receipt_note":"xxxx",                                  #开票备注
王军业 committed
663
				"create_date":"2018-03-02",                                   #开票时间
王军业 committed
664
			},
王军业 committed
665
			...
王军业 committed
666 667 668 669 670 671 672 673
		]
	}	
	
	
修改销售合同开票信息
********************************* 

 | Verb: PUT 
674
 | Path: /api/v1/financial/contracts/{$contract_unid}/receipts
王军业 committed
675 676 677 678 679 680 681 682
 | Header: (Content-Type: application/json)

  Request Body:

  .. code-block:: python
     
	 {
		"list_receipt_data":                                        #合同发票信息表
683 684
		[
			{
685 686
				"receipt_unid":xxxx,                              #发票unid
 				"receipt_progress":3,                          #开票进度
王军业 committed
687 688
				"receipt_amount":14000.00,                            #开票金额
				"oa_flow_id":"12345",                                #oa流水号
689 690
				"receipt_note":"xxxx",                              #发票备注  
			},
王军业 committed
691
			...
692 693 694 695 696 697 698 699
		]
	}
	 
  Response Body:

  .. code-block:: python
  
	{
王军业 committed
700 701
		"ecode":"200", 		                                           #修改成功返回码
		"enote":"OK"                                                   #返回说明 
702 703 704 705
		
	}
	
	
王军业 committed
706 707
删除销售合同开票信息
******************************
708

王军业 committed
709
 | Verb: DELETE 
王军业 committed
710
 | Path: /api/v1/financial/contracts/{$contract_unid}/receipts
711 712 713
 | Header: (Content-Type: application/json)

  Request Body:
王军业 committed
714 715 716 717 718 719

  .. code-block:: python
     
	 {
		"receipt_unids":                                                #发票unid数组
		[
王军业 committed
720
			xxxx,                                     #发票unid
王军业 committed
721
			...
王军业 committed
722 723 724
		]
	}
	 
725 726 727 728
  Response Body:

  .. code-block:: python
  
王军业 committed
729 730 731 732 733 734 735 736 737 738 739 740 741 742
	{
		"ecode":"200", 		                                           #删除成功返回码
		"enote":"OK"                                                   #返回说明 
		
	}
	
	
销售合同发货
^^^^^^^^^^^^^^^^^^^^^^^^^
	
增加销售合同发货信息
****************************

 | Verb: POST 
743
 | Path: /api/v1/financial/contracts/{$contract_unid}/delivers
王军业 committed
744 745 746 747 748 749
 | Header: (Content-Type: application/json)

  Request Body:

  .. code-block:: python
  
750
	 {
王军业 committed
751
		"list_deliver_data":                                                #合同发货信息表
752 753
		[
			{
王军业 committed
754 755
				"deliver_goods_date":"2018-03-02",                       #发货时间
				"goods_acceptanc_date":"2018-06-03",                        #到货验收时间
王军业 committed
756
				("goods_sign_appendix":"xxxx",                      #到货签收单附件)
王军业 committed
757
				"appendix_unids":["xxxx","xxxx",...]                    		            #合同附件(若有附件上传该字段)
758
			},
王军业 committed
759
			...
760
		]
王军业 committed
761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777
	}
  
  Response Body:

  .. code-block:: python
  
	{
		"ecode":"200", 		                                               #增加成功返回码
		"enote":"OK"                                                       #返回说明 
		
	}

	
查询具体合同发货信息
************************	

 | Verb: GET 
778
 | Path: /api/v1/financial/contracts/{$contract_unid}/delivers
王军业 committed
779 780 781 782 783 784 785 786 787 788
 | Header: (Content-Type: application/json)

  Request Body:无
	
    Response Body:

  .. code-block:: python
  
    {
		"list_deliver_data":                                            #发货信息列表
789 790
		[
			{
791
				"deliver_unid":xxxx,                                    #发货unid
王军业 committed
792 793 794 795 796 797 798 799 800 801
				"deliver_goods_date":"2018-03-02",                            #发货时间
				"goods_acceptanc_date ":"2018-06-09",                             #到货验收时间
				"appendix_list":                                      #附件列表集合
				[
					{
					  "appendix_unid":"1234",                         #附件unid
					  "appendix_url":"http://xxxx.pdf"                #附件url
					}
					...
				]
802
			},
王军业 committed
803
			...
804
		]
王军业 committed
805 806 807 808 809 810
	}	
	
修改销售合同发货信息
************************ 

 | Verb: PUT 
811
 | Path: /api/v1/financial/contracts/{$contract_unid}/delivers
王军业 committed
812 813 814 815 816 817 818 819
 | Header: (Content-Type: application/json)

  Request Body:

  .. code-block:: python
     
	 {
		"list_deliver_data":                                                #合同发货信息表
820 821
		[
			{
822
				"deliver_unid":xxxx,                             #发货unid
王军业 committed
823 824
				"deliver_goods_date":"2018-03-02",                       #发货时间
				"goods_acceptanc_date":"2018-03-02",                     #到货验收时间
王军业 committed
825
				("goods_sign_appendix":"xxxx",)                      #到货签收单附件
王军业 committed
826
				"appendix_unids":["xxxx","xxxx",...],                    		   #合同附件(若有附件上传该字段
827
			},
王军业 committed
828
			...
829 830
		]
	}
王军业 committed
831 832 833 834 835 836 837 838 839 840 841
	 
  Response Body:

  .. code-block:: python
  
	{
		"ecode":"200", 		                                           #修改成功返回码
		"enote":"OK"                                                   #返回说明 
		
	}

842
	
王军业 committed
843 844
删除销售合同发货信息
************************** 
845 846

 | Verb: DELETE 
王军业 committed
847
 | Path: /api/v1/financial/contracts/{$contract_unid}/delivers
848 849
 | Header: (Content-Type: application/json)

王军业 committed
850 851 852 853 854 855 856
  Request Body:

  .. code-block:: python
     
	 {
		"deliver_unids":                                               #发货unid数组                                    
		[
857
			"deliver_unid":xxxx,                                     #发货unid
王军业 committed
858
			...
王军业 committed
859 860 861
		]
	}
	 
862 863 864 865 866 867
  Response Body:

  .. code-block:: python
  
	{
		"ecode":"200", 		                                           #删除成功返回码
王军业 committed
868
		"enote":"OK"                                                   #返回说明 
869 870
		
	}
王军业 committed
871 872 873 874 875 876 877
	
	
销售合同工程验收
^^^^^^^^^^^^^^^^^^^^^^^
	
增加销售合同工程验收信息
******************************
878 879

 | Verb: POST 
880
 | Path: /api/v1/financial/contracts/{$contract_unid}/project/acceptancs
881 882 883 884 885 886
 | Header: (Content-Type: application/json)

  Request Body:

  .. code-block:: python
  
887
	 {
王军业 committed
888
		"list_check_data":
889 890
		[
			{
王军业 committed
891 892
				"acceptanc_type":"1",                                     #验收类型(1为初验、2为终验
				"acceptanc_date":"2018-06-09",                                     #验收时间
熊付 committed
893
				"acceptanc_note":"xxxx"                                      #验收备注
王军业 committed
894 895
				"appendix_unids":["1234","5678",...]                     #附件列表
			}
896
		]
王军业 committed
897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914
		
	}
  
  Response Body:

  .. code-block:: python
  
	{
		"ecode":"200", 		                                             #增加成功返回码
		"enote":"OK"                                                     #返回说明 
		
	}


查询具体合同工程验收信息
**************************	

 | Verb: GET 
915
 | Path: /api/v1/financial/contracts/{$contract_unid}/project/acceptancs
王军业 committed
916 917 918 919 920 921 922 923 924 925
 | Header: (Content-Type: application/json)

  Request Body:无
	
    Response Body:

  .. code-block:: python
  
    {
		"list_check_data":                                            #工程验收信息列表
926 927
		[
			{
928
				"acceptanc_unid":xxxx,                                  #工程id
王军业 committed
929 930
				"acceptanc_type":"2",                                  #验收类型
				"acceptanc_date":"2018-07-02",                                  #验收时间
熊付 committed
931
				"acceptanc_note":"xxxx",                                  #验收备注
王军业 committed
932 933 934 935 936 937 938 939
				"appendix_list":                                      #附件列表集合
				[
					{
					  "appendix_unid":"1234",                         #附件unid
					  "appendix_url":"http://xxxx.pdf"                #附件url
					}
					...
				]
940
			},
王军业 committed
941
			...
942
		]
王军业 committed
943 944 945 946 947 948 949 950
	}

	

修改销售合同工程验收信息
*******************************

 | Verb: PUT 
951
 | Path: /api/v1/financial/contracts/{$contract_unid}/project/acceptancs
王军业 committed
952 953 954 955 956 957 958 959
 | Header: (Content-Type: application/json)

  Request Body:

  .. code-block:: python
     
	 {
		"list_check_data":                                               #工程验收信息表
960 961
		[
			{
962
				"acceptanc_unid":xxxx,                                     #工程验收unid
王军业 committed
963 964
				"acceptanc_type":"2",                                     #验收类型(1为初验、2为终验)
				"acceptanc_date":"2018-05-02",                               #验收时间
熊付 committed
965
				"acceptanc_note":"xxxx"                                      #验收备注
王军业 committed
966
				"appendix_unids":["1234","5678",...]                     #附件列表
王军业 committed
967 968
			},
			...
969 970
		]
	}
王军业 committed
971
	 
972 973 974 975 976 977
  Response Body:

  .. code-block:: python
  
	{
		"ecode":"200", 		                                           #修改成功返回码
王军业 committed
978
		"enote":"OK"                                                   #返回说明 
979 980
		
	}
王军业 committed
981 982 983 984 985 986 987
	
	

删除销售合同工程验收信息
*****************************

 | Verb: DELETE 
王军业 committed
988
 | Path: /api/v1/financial/contracts/{$contract_unid}/project/acceptancs
王军业 committed
989 990 991 992 993 994 995
 | Header: (Content-Type: application/json)

  Request Body:

  .. code-block:: python
     
	 {
熊付 committed
996
		"acceptanc_unids":                                               #验收unid数组
王军业 committed
997
		[
998
			"acceptanc_unid":xxxx,                                     #验收unid
王军业 committed
999
			...
王军业 committed
1000 1001 1002 1003
		]
	}
	 
  Response Body:
1004

王军业 committed
1005 1006 1007 1008 1009 1010 1011
  .. code-block:: python
  
	{
		"ecode":"200", 		                                           #删除成功返回码
		"enote":"OK"                                                   #返回说明 
		
	}
1012
	
王军业 committed
1013 1014 1015 1016 1017 1018


上传附件
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

 | Verb: POST 
1019
 | Path: /api/v1/financial/contracts/{$contract_unid}/upload/appendixes
王军业 committed
1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033
 | Header: (Content-Type: multipart/form-data)

  Request Body:

  .. code-block:: python
  
	 {
	   "business_table":"project_acceptanc",            #业务表名
	   "appendix_files":["xxxx","xxxxx"]	            #上传附件文件(file类型
	}
  
  Response Body:

  .. code-block:: python
王军业 committed
1034
  
王军业 committed
1035 1036 1037 1038
	{
		"appendix_data":[
		    {
		      "business_table":"project_acceptanc",   #业务表名
1039
		      "appendix_unid":xxxxxxx               #附件主键
王军业 committed
1040 1041 1042 1043 1044 1045 1046 1047
		    },
		    ...
		]
		
	}



王军业 committed
1048 1049 1050 1051
查询合同编号
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 

 | Verb: GET 
王军业 committed
1052
 | Path: /api/v1/financial/contracts/codes
王军业 committed
1053 1054 1055 1056 1057 1058 1059 1060 1061
 | Header: (Content-Type: application/json)

  Request Body:无
  
  Request Body:

  .. code-block:: python
  
    {
王军业 committed
1062 1063 1064 1065 1066 1067
		"contract_unids":   #合同编号集合
		[
		    "2018-032",         
		    "2018-079",
		    ...
		]                       
王军业 committed
1068 1069 1070 1071 1072 1073 1074
	}
	
	
查询顾客表
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 

 | Verb: GET 
王军业 committed
1075
 | Path: /api/v1/financial/contracts/customers
王军业 committed
1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087
 | Header: (Content-Type: application/json)

  Request Body:无
  
  Request Body:

  .. code-block:: python
  
    {
		"customer_list":                                 #顾客列表集合
		[
			{
1088
				"customer_unid":1000,                  #顾客id
王军业 committed
1089 1090
				"customer_name":"金源时代购物中心有限公司"                   #顾客名称 
			},
王军业 committed
1091 1092 1093 1094 1095 1096 1097 1098 1099
			...
		]
	}
	
	
查询项目表
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 

 | Verb: GET 
王军业 committed
1100
 | Path: /api/v1/financial/contracts/projects
王军业 committed
1101 1102 1103 1104 1105
 | Header: (Content-Type: application/json)

  Request Body:无
  
  Request Body:
1106

王军业 committed
1107 1108 1109 1110 1111 1112
  .. code-block:: python
  
    {
		"project_list":                                 #项目列表集合
		[
			{
1113
				"project_unid":1234,                 #项目id
王军业 committed
1114 1115
				"project_name":"金源时代客流项目"                  #项目名称 
			},
王军业 committed
1116 1117 1118
			...
		]
	}