<a name="menu">目录</a>
1. [业务进度字典](#processList)
1. [发票申请页](#invoicePage)
1. [申请列表页](#myInvoicePage)
1. [发票申请-暂不实现](#invoiceApply)
1. [分配业务员](#platformAassignSalesman)
1. [完善信息](#perfectInformation)
1. [分配交付商](#assignDeliver)
1. [交付商审核](#deliverAudit)
1. [平台验收](#deliveryAcceptance)
1. [客户交付](#deliveryCustomer)
1. [业务完成](#completed)
1. [查询详细信息](#invoice)

## **<a name="processList"> 业务进度字典 </a>**
[返回到目录](#menu)
##### URL
[/web/invoice/invoiceCtl/processDics]
#### 参数格式  `JSON`
#### HTTP请求方式 `POST`

``` javascript
    {}
```

#### 返回结果
```javascript

    {
        "status": 0,
        "msg": "success",
        "data": [
            {
                "status": "1000",       // 状态码
                "name": "待分配"         // 状态名称
            },
            {
                "status": "1010",
                "name": "待完善"
            },
        ],
        "requestid": "db9a3248c6b7483d93ccea6d66d0affc"
    }

```


## **<a name="invoicePage"> 发票申请页 </a>**
[返回到目录](#menu)
##### URL
[/web/invoice/invoiceCtl/invoicePage]
#### 参数格式  `JSON`
#### HTTP请求方式 `POST`

``` javascript
    说明：
        操作按钮显示
        查看详情        全部转态都显示
        业务分配        status = 1000
        交付商分配      status = 1020
        交付商审核      status = 1060
        交付商验收      status = 1090
        查看详情        status = 1000

    {
        "currentPage":1,
        "pageSize": 2,
        "apply_no":"",                  // 申请编号
        "status":"",                    // 进度状态
        "invoice_type":"",              // 发票类型 10 增值税专用发票 20 增值税普通发票 30 普通发票
        "createTimeBegin":"",           // 申请时间-开始
        "createTimeEnd":""              // 申请时间-结束
    }
```

#### 返回结果
```javascript

    {
        "count": 5,
        "rows": [
            {
                "id": "11855671564003193",
                "channel_id": "1",
                "product_id": "50010000",
                "apply_no": "GONGSIBAO20200213",                // 申请编号
                "invoice_type": "10",                           // 发票类型
                "invoice_amount": 5000,                         // 价税合计总额
                "created_at": "2020-03-12 10:46:00",            // 申请时间
                "status": "1110",                               // 进度状态
                "status_name": "业务完成",                       // 进度状态名称
                "next_status": [                                // 下一个进度
                    {
                        "next_status": "1010",                  // 状态码
                        "next_name": "待完善"                    // 状态名称
                    }
                ],

                "merchant_name": "汉唐信通（北京）科技有限公司",    // 发票抬头
                "businessmen_name": "北京创知厚德科技有限公司",     // 开票方
                "invoice_deliver": {                             //  交付商对象
                    "deliver_name": "1",                         //  交付商名称
                },
                "oproduct": {                                     // 产品
                    "name": "发票申请",
                    "desc": "发票申请,发票红冲",
                }
            },
        ],
        "requestid": "dc53b7fb2151425e8366edfe317bb8b5"
    }

```



## **<a name="myInvoicePage"> 申请列表页 </a>**
[返回到目录](#menu)
##### URL
[/web/invoice/invoiceCtl/myInvoicePage]
#### 参数格式  `JSON`
#### HTTP请求方式 `POST`

``` javascript
    说明：
        操作按钮显示
        查看详情        全部转态都显示
        完善申请        status = 1010
        客户交付        status = 1100
        业务完成        status = 1110

    {
        "currentPage":1,
        "pageSize": 2,
        "apply_no":"",                  // 申请编号
        "status":"",                    // 进度状态
        "invoice_type":"",              // 发票类型 10 增值税专用发票 20 增值税普通发票 30 普通发票
        "createTimeBegin":"",           // 申请时间-开始
        "createTimeEnd":""              // 申请时间-结束
    }
```

#### 返回结果
```javascript

    {
        "count": 5,
        "rows": [
            {
                "id": "11855671564003193",
                "channel_id": "1",
                "product_id": "50010000",
                "apply_no": "GONGSIBAO20200213",                // 申请编号
                "invoice_type": "10",                           // 发票类型
                "invoice_amount": 5000,                         // 价税合计总额
                "created_at": "2020-03-12 10:46:00",            // 申请时间
                "status": "1110",                               // 进度状态
                "status_name": "业务完成",                       // 进度状态名称
                "next_status": [                                // 下一个进度
                    {
                        "next_status": "1010",                  // 状态码
                        "next_name": "待完善"                    // 状态名称
                    }
                ],

                "merchant_name": "汉唐信通（北京）科技有限公司",    // 发票抬头
                "businessmen_name": "北京创知厚德科技有限公司",     // 开票方
                "invoice_deliver": {                             //  交付商对象
                    "deliver_name": "1",                         //  交付商名称
                },
                "oproduct": {                                     // 产品
                    "name": "发票申请",
                    "desc": "发票申请,发票红冲",
                }
            },
        ],
        "requestid": "dc53b7fb2151425e8366edfe317bb8b5"
    }


```

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

##### URL
[/web/invoice/invoiceCtl/invoiceApply]
#### 参数格式  `JSON`
#### HTTP请求方式 `POST`
#### 请求参数 

```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)　　　　　
##### URL
[/web/invoice/invoiceCtl/handleStatus]
#### 参数格式  `JSON`
#### HTTP请求方式 `POST`
#### 请求参数 
#### 示例

```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)　　　　　
##### URL
[/web/invoice/invoiceCtl/handleStatus]
#### 参数格式  `JSON`
#### HTTP请求方式 `POST`
#### 请求参数 
#### 示例

```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)　　　　　
##### URL
[/web/invoice/invoiceCtl/handleStatus]
#### 参数格式  `JSON`
#### HTTP请求方式 `POST`
#### 请求参数 
#### 示例


```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)　　　　　
##### URL
[/web/invoice/invoiceCtl/handleStatus]
#### 参数格式  `JSON`
#### HTTP请求方式 `POST`
#### 请求参数 
#### 示例


```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)　　　　　
##### URL
[/web/invoice/invoiceCtl/handleStatus]
#### 参数格式  `JSON`
#### HTTP请求方式 `POST`
#### 请求参数 
#### 示例
  

#### 示例 

```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)　　　　　
##### URL
[/web/invoice/invoiceCtl/handleStatus]
#### 参数格式  `JSON`
#### HTTP请求方式 `POST`
#### 请求参数 
#### 示例
   

#### 示例 

```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)　　　　　
##### URL
[/web/invoice/invoiceCtl/handleStatus]
#### 参数格式  `JSON`
#### HTTP请求方式 `POST`
#### 请求参数 
#### 示例
  

#### 示例 

```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)　　　　　
##### URL
[/web/invoice/invoiceCtl/handleStatus]
#### 参数格式  `JSON`
#### HTTP请求方式 `POST`
#### 请求参数 
#### 示例
  

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

```

#### 返回结果   

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

#### 示例
```javascript
{
    "status": 0,
    "msg": "操作成功",
    "data": {
        "id": "11855850214000129",
        "channel_id": "1",
        "product_id": "50010000",
        "apply_no": "GONGSIBAO20200215",
        "apply_time": "2020-03-13 00:00:00",
        "invoice_type": "10",
        "invoice_no": "1234566",
        "invoice_number": "321211",
        "invoice_time": "2020-03-14 08:00:00",
        "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",
        "invoice_amount": 6000,
        "invoice_content": "服务费",
        "contract": "https://gsb-zc.oss-cn-beijing.aliyuncs.com//zc_wxapplet_1584160672846.jpg",
        "personal_invoice_tax": 99,
        "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://gsb-zc.oss-cn-beijing.aliyuncs.com//zc_wxapplet_1584176465203.jpg",
        "status": "1120",
        "created_at": "2020-03-14 12:23:30",
        "updated_at": "2020-03-14 12:23:30",
        "deleted_at": null,
        "version": 7,
        "invoice_deliver_id": "11435778619000289",
        "deliver_id": "13133030477001094",
        "bd_id": "30",
        "bd_path": "/公司宝/bpo/大客户/30/30/",
        "red_status": "1",
        "invoiceinforeg": {
            "id": "11855850214000129",
            "audit_content": "通过了",
            "deliver_content": "你好啊啊啊啊",
            "deliver_mail_addr": "朝阳区",
            "deliver_mail_mobile": "22333111122",
            "deliver_mail_to": "张三",
            "deliver_mail_no": "11111111111111",
            "audit_result": "交付商交付",
            "created_at": "2020-03-14 12:23:30",
            "updated_at": "2020-03-14 12:23:30",
            "deleted_at": null,
            "version": 0
        },
        "invoicedeliver": [
            {
                "id": "11435778619000289",
                "invoice_id": "11855850214000129",
                "deliver_id": "13133030477001094",
                "deliver_name": "武汉交付商测试10",
                "deliver_delive": 200,
                "deliver_mail_no": "",
                "deliver_img": "",
                "operator_id": "35",
                "created_at": "2020-03-14T04:40:26.000Z",
                "updated_at": "2020-03-14T04:40:26.000Z",
                "deleted_at": null,
                "version": 0
            }
        ],
        "invoicesummaryinfo": {
            "id": "11855850214000129",
            "province": "河北",
            "invoice_type": "10",
            "invoice_join": "10",
            "invoice_no": "1234566",
            "invoice_number": "321211",
            "invoice_time": "2020-03-14 08: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": "123",
                    "summaryInfo": "123",
                    "category": "123",
                    "unit": "123",
                    "number": "123",
                    "unitPrice": "123",
                    "amount": "123",
                    "taxRate": "123",
                    "taxAmount": "123"
                }
            ],
            "created_at": "2020-03-14 12:23:30",
            "updated_at": "2020-03-14 12:23:30",
            "deleted_at": null,
            "version": 0
        },
        "bd_name": "杨勇",                                           //业务员名称
        "assign_user_name": ""
    },
    "bizmsg": "empty",
    "requestid": "5fc900e8a4e5475b8ae75b24403fe1ea"
}
```