<a name="menu">目录</a>
1. [发票申请](#invoiceApply)
1. [分配业务员](#platformAassignSalesman)
1. [完善信息](#perfectInformation)
1. [分配交付商](#assignDeliver)
1. [交付商审核](#deliverAudit)
1. [平台验收](#deliveryAcceptance)
1. [客户交付](#deliveryCustomer)
1. [业务完成](#completed)
1. [查询详细信息](#invoice)

## **<a name="invoiceApply"> 发票申请 </a>**　　　　　
[返回到目录](#menu)　　　　　

**接口方式** HTTP    
**HTTP方法** POST    
**URI路径** /web/invoice/invoiceCtl/invoiceApply
**参数验证** 否     
**参数**    

**示例** 

```javascript
 {
    "businessmen_type": "10",                                         //销售方类型 10 个体工商户 20 自然人 
    "businessmen_id": "1",                                            //销售方ID
    "businessmen_credit_code": "91110105MA00723E4F",                  //销售方社会统一信用代码
    "businessmen_name": "北京创知厚德科技有限公司",                     //销售方名称
    "businessmen_addr": "北京市朝阳区创远路36号院10号楼1层102",         //销售方地址
    "businessmen_mobile": "1331112****",                              //销售方电话
    "businessmen_bank": "工商银行朝阳支行",                            //开户行
    "businessmen_account": "chuangzhihoude",                          //账号
    "mail_to": "flzhang@gongsibao.com",                               //收件人
    "mail_mobile": "010-3359658",                                     //收件电话
    "mail_addr": "北京市朝阳区创远路36号院10号楼1层102",                //收件地址
    "merchant_id": "2",                                               //购买方ID
    "merchant_name": "汉唐信通（北京）科技有限公司",                    //购买方名称
    "merchant_credit_code": "911101083066224948",                     //购买方统一社会信用代码
    "merchant_addr": "北京市海淀区北清路164号17-27号院813号",           //购买方地址
    "merchant_mobile": "010-8492****",                                //购买方电话
    "merchant_bank": "工商银行海淀区北清路支行",                        //开户行
    "merchant_account": "gongsibao",                                  //账户
    "apply_no": "GONGSIBAO20200214",                                  //申请编号
    "invoice_type": "10",                                             //发票类型 10 增值税专用发票 20 增值税普通发票 30 普通发票
    "apply_time": "2020-03-11 00:00:00",                              //申请时间
    "invoice_amount": "4000",                                         //申请金额
    "invoice_content": "服务费",                                       //发票内容
    "contract": "",                                                   //合同
    "personal_invoice_tax": "100",                                    //个税
    "additional_tax": "0",                                            //附加税
    "value_added_tax": "0",                                           //增值税
    "channel_id":"1"                                                  //渠道ID
  }

```

**返回结果**   

| 参数名|数据类型| 说明 |
|---|:---:|---|
| status | Number | 状态码 |
| msg | String | 提示信息 |
| data | JSON | 返回值 |

**示例**
```javascript
{
    "status": 0,
    "msg": "操作成功",
    "data": "success",
    "bizmsg": "empty",
    "requestid": "f6ed725fb64748c9a95227a7c6052942"
}

```

## **<a name="platformAassignSalesman"> 分配业务员 </a>**　　　　　
[返回到目录](#menu)　　　　　

**接口方式** HTTP    
**HTTP方法** POST    
**URI路径** /web/invoice/invoiceCtl/handleStatus
**参数验证** 否     
**参数**    

**示例** 

```javascript
{
    "invoice_id":"11855693476003245",         //发票ID
    "bd_id":"1035",                           //业务员ID
    "status":"1010",                          //业务状态
    "bd_path":"/公司宝/bpo/大客户/30/30/"      //业务员权限
  }

```

**返回结果**   

| 参数名|数据类型| 说明 |
|---|:---:|---|
| status | Number | 状态码 |
| msg | String | 提示信息 |
| data | JSON | 返回值 |

**示例**
```javascript
{
    "status": 0,
    "msg": "操作成功",
    "data": "success",
    "bizmsg": "empty",
    "requestid": "f6ed725fb64748c9a95227a7c6052942"
}

```


## **<a name="perfectInformation"> 完善信息 </a>**　　　　　
[返回到目录](#menu)　　　　　

**接口方式** HTTP    
**HTTP方法** POST    
**URI路径** /web/invoice/invoiceCtl/handleStatus
**参数验证** 否     
**参数**    

**示例** 

```javascript
{
  "invoice_id":"11855671564003193",                     //发票ID
  "contract": "https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=1155989947,2985386605&fm=26&gp=0.jpg",              //合同
  "status":"1020"                                       //业务状态
}
```

**返回结果**   

| 参数名|数据类型| 说明 |
|---|:---:|---|
| status | Number | 状态码 |
| msg | String | 提示信息 |
| data | JSON | 返回值 |

**示例**
```javascript
{
    "status": 0,
    "msg": "操作成功",
    "data": "success",
    "bizmsg": "empty",
    "requestid": "f6ed725fb64748c9a95227a7c6052942"
}

```

## **<a name="assignDeliver"> 分配交付商 </a>**　　　　　
[返回到目录](#menu)　　　　　

**接口方式** HTTP    
**HTTP方法** POST    
**URI路径** /web/invoice/invoiceCtl/handleStatus
**参数验证** 否     
**参数**    

**示例** 

```javascript
{
    "invoice_id":"11855671564003193",                //发票Id
		"deliver_id": "20200112001",                     //交付商ID
    "deliver_name":"开封交付商",                      //交付商名称
		"deliver_delive":"1000",                         //交付商分成
		"status":"1030"                                  //业务状态
}
```

**返回结果**   

| 参数名|数据类型| 说明 |
|---|:---:|---|
| status | Number | 状态码 |
| msg | String | 提示信息 |
| data | JSON | 返回值 |

**示例**
```javascript
{
    "status": 0,
    "msg": "操作成功",
    "data": "success",
    "bizmsg": "empty",
    "requestid": "f6ed725fb64748c9a95227a7c6052942"
}

```


## **<a name="deliverAudit"> 交付商审核 </a>**　　　　　
[返回到目录](#menu)　　　　　

**接口方式** HTTP    
**HTTP方法** POST    
**URI路径** /web/invoice/invoiceCtl/handleStatus
**参数验证** 否     
**参数**    

**示例** 

```javascript
{
    "invoice_id":"11855671564003193",                //发票Id
    "status":"1070",                                 //业务状态  1070审核成功 1080 审核失败
    "audit_content":"订单无误，可进行交付",            //审核内容  ps:必填
    "deliver_content":"发票",                         //交付内容  当status=1070时必填
    "deliver_mail_addr":"河南开封",                   //邮寄地址  当status=1070时必填
    "deliver_mail_to":"杨庆菊",                       //邮寄人    当status=1070时必填
    "deliver_mail_mobile":"18833836395"               //邮寄电话  当status=1070时必填
}
```

**返回结果**   

| 参数名|数据类型| 说明 |
|---|:---:|---|
| status | Number | 状态码 |
| msg | String | 提示信息 |
| data | JSON | 返回值 |

**示例**
```javascript
{
    "status": 0,
    "msg": "操作成功",
    "data": "success",
    "bizmsg": "empty",
    "requestid": "f6ed725fb64748c9a95227a7c6052942"
}

```

## **<a name="deliveryAcceptance"> 平台验收 </a>**　　　　　
[返回到目录](#menu)　　　　　

**接口方式** HTTP    
**HTTP方法** POST    
**URI路径** /web/invoice/invoiceCtl/handleStatus
**参数验证** 否     
**参数**    

**示例** 

```javascript
 {
	"invoice_id":"11855693476003245",                               //发票ID
	"status": "1100",                                               //业务状态
  "province":"上海市",                                            //省份
	"invoice_type":"10",                                            //发票类型
	"invoice_join":"10",                                            //发票联次
	"invoice_no":"17485952652",                                     //发票编号
	"invoice_number":"NO 02995608",                                 //发票号码
	"invoice_time":"2020-03-10 00:00:00",                           //开票时间
	"merchant_name":"汉唐信通（北京）科技有限公司",                    //销售方名称
	"merchant_credit_code":"911101083066224948",                    //销售方统一社会信用代码
	"merchant_addr":"北京市海淀区北清路164号17-27号院813号",          //销售方地址
	"merchant_mobile":"010-8492****",                               //销售方电话
	"merchant_bank":"工商银行海淀区北清路支行",                       //销售方银行
	"merchant_account":"gongsibao",                                 //销售方账户
	"businessmen_credit_code":"91110105MA00723E4F",                 //购买方统一社会信用代码
	"businessmen_name":"北京创知厚德科技有限公司",                    //购买方名称
	"businessmen_addr":"北京市朝阳区创远路36号院10号楼1层102",         //购买方地址
	"businessmen_mobile":"1331112****",                             //购买方电话
	"businessmen_bank":"工商银行朝阳支行",                           //购买方银行
	"businessmen_account":"chuangzhihoude",                         //购买方账户
	"summary":[                                                     //摘要
		{
	        "summaryType":"企业管理服务",
	        "summaryInfo":"市场推广",
	        "category":"xxxxx",
	        "unit":"元（人民币）",
	        "number":"1000",
	        "unitPrice":"100",
	        "amount":"100000",
	        "taxRate":"3%",
	        "taxAmount":"3000"
	    }
	]
}
```

**返回结果**   

| 参数名|数据类型| 说明 |
|---|:---:|---|
| status | Number | 状态码 |
| msg | String | 提示信息 |
| data | JSON | 返回值 |

**示例**
```javascript
{
    "status": 0,
    "msg": "操作成功",
    "data": "success",
    "bizmsg": "empty",
    "requestid": "f6ed725fb64748c9a95227a7c6052942"
}

```

## **<a name="deliveryCustomer"> 客户交付 </a>**　　　　　
[返回到目录](#menu)　　　　　

**接口方式** HTTP    
**HTTP方法** POST    
**URI路径** /web/invoice/invoiceCtl/handleStatus
**参数验证** 否     
**参数**    

**示例** 

```javascript
{
	"invoice_id": "11855693476003245",
  "status": "1110",
  "deliver_mail_no":"sf78946234"          //快递单号
}

```

**返回结果**   

| 参数名|数据类型| 说明 |
|---|:---:|---|
| status | Number | 状态码 |
| msg | String | 提示信息 |
| data | JSON | 返回值 |

**示例**
```javascript
{
    "status": 0,
    "msg": "操作成功",
    "data": "success",
    "bizmsg": "empty",
    "requestid": "f6ed725fb64748c9a95227a7c6052942"
}

```

## **<a name="completed"> 业务完成 </a>**　　　　　
[返回到目录](#menu)　　　　　

**接口方式** HTTP    
**HTTP方法** POST    
**URI路径** /web/invoice/invoiceCtl/handleStatus
**参数验证** 否     
**参数**    

**示例** 

```javascript
{
	"invoice_id": "11855693476003245",
  "status": "1120"
}

```

**返回结果**   

| 参数名|数据类型| 说明 |
|---|:---:|---|
| status | Number | 状态码 |
| msg | String | 提示信息 |
| data | JSON | 返回值 |

**示例**
```javascript
{
    "status": 0,
    "msg": "操作成功",
    "data": "success",
    "bizmsg": "empty",
    "requestid": "f6ed725fb64748c9a95227a7c6052942"
}

```

## **<a name="invoice"> 查询详细信息 </a>**　　　　　
[返回到目录](#menu)　　　　　

**接口方式** HTTP    
**HTTP方法** POST    
**URI路径** /web/invoice/invoiceCtl/invoice
**参数验证** 否     
**参数**    

**示例** 

```javascript
{
	"id": "11855693476003245"
}

```

**返回结果**   

| 参数名|数据类型| 说明 |
|---|:---:|---|
| status | Number | 状态码 |
| msg | String | 提示信息 |
| data | JSON | 返回值 |

**示例**
```javascript
{
  "status": 0,
  "msg": "操作成功",
  "data": {
      "id": "11855693476003245",
      "channel_id": "1",
      "invoice_type": "10",
      "invoice_no": "17485952652",
      "invoice_number": "NO 02995608",
      "invoice_time": "2020-03-10T00:00:00.000Z",
      "merchant_id": "2",
      "merchant_name": "汉唐信通（北京）科技有限公司",
      "merchant_credit_code": "911101083066224948",
      "merchant_addr": "北京市海淀区北清路164号17-27号院813号",
      "merchant_mobile": "010-8492****",
      "merchant_bank": "工商银行海淀区北清路支行",
      "merchant_account": "gongsibao",
      "businessmen_type": "10",
      "businessmen_id": "1",
      "businessmen_credit_code": "91110105MA00723E4F",
      "businessmen_name": "北京创知厚德科技有限公司",
      "businessmen_addr": "北京市朝阳区创远路36号院10号楼1层102",
      "businessmen_mobile": "1331112****",
      "businessmen_bank": "工商银行朝阳支行",
      "businessmen_account": "chuangzhihoude",
      "apply_no": "GONGSIBAO20200214",
      "apply_time": "2020-03-10T16:00:00.000Z",
      "invoice_amount": 4000,
      "invoice_content": "服务费",
      "contract": "https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=1155989947,2985386605&fm=26&gp=0.jpg",
      "personal_invoice_tax": 100,
      "additional_tax": 0,
      "value_added_tax": 0,
      "mail_addr": "北京市朝阳区创远路36号院10号楼1层102",
      "mail_mobile": "010-3359658",
      "mail_to": "flzhang@gongsibao.com",
      "statements": null,
      "invoice_img": "https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=339685511,2228408993&fm=26&gp=0.jpg",
      "invoice_deliver_id": "11435635657000115",
      "deliver_id": "13133030477001094",
      "bd_id": "4",
      "bd_path": "/公司宝/bpo/大客户/30/30/",
      "product_id": "50010000",
      "status": "1120",
      "created_at": "2020-03-12T08:51:12.000Z",
      "updated_at": "2020-03-12T08:51:12.000Z",
      "deleted_at": null,
      "version": 7,
      "invoiceinforeg": {
          "id": "11855693476003245",
          "deliver_mail_addr": "上海开封",
          "deliver_mail_to": "superman",
          "deliver_mail_mobile": "18833836395",
          "audit_content": "订单无误，可进行交付",
          "deliver_content": "发票",
          "deliver_mail_no": "sf78946234",
          "audit_result": "交付商交付",
          "created_at": "2020-03-12T08:51:12.000Z",
          "updated_at": "2020-03-12T08:51:12.000Z",
          "deleted_at": null,
          "version": 0
      },
      "invoicedeliver": {
          "id": "11435635657000115",
          "invoice_id": "11855693476003245",
          "deliver_id": "13133030477001094",
          "deliver_name": "上海交付商",
          "deliver_delive": 2000,
          "deliver_mail_no": "",
          "deliver_img": "",
          "operator_id": "24",
          "created_at": "2020-03-12T12:57:44.000Z",
          "updated_at": "2020-03-12T12:57:44.000Z",
          "deleted_at": null,
          "version": 0
      },
      "invoicesummaryinfo": {
          "id": "11855693476003245",
          "province": "上海市",
          "invoice_type": "10",
          "invoice_join": "10",
          "invoice_no": "17485952652",
          "invoice_number": "NO 02995608",
          "invoice_time": "2020-03-09T16:00:00.000Z",
          "merchant_name": "汉唐信通（北京）科技有限公司",
          "merchant_credit_code": "911101083066224948",
          "merchant_addr": "北京市海淀区北清路164号17-27号院813号",
          "merchant_mobile": "010-8492****",
          "merchant_bank": "工商银行海淀区北清路支行",
          "merchant_account": "gongsibao",
          "businessmen_credit_code": "91110105MA00723E4F",
          "businessmen_name": "北京创知厚德科技有限公司",
          "businessmen_addr": "北京市朝阳区创远路36号院10号楼1层102",
          "businessmen_mobile": "1331112****",
          "businessmen_bank": "工商银行朝阳支行",
          "businessmen_account": "chuangzhihoude",
          "summary": [
              {
                  "summaryType": "企业管理服务",
                  "summaryInfo": "市场推广",
                  "category": "xxxxx",
                  "unit": "元（人民币）",
                  "number": "1000",
                  "unitPrice": "100",
                  "amount": "100000",
                  "taxRate": "3%",
                  "taxAmount": "3000"
              }
          ],
          "created_at": "2020-03-12T08:51:12.000Z",
          "updated_at": "2020-03-12T08:51:12.000Z",
          "deleted_at": null,
          "version": 0
      }
  },
  "bizmsg": "empty",
  "requestid": "5dd0431bbb8749ea848f9e92644c2eeb"
}

```