<a name="menu">目录</a>
1. [业务进度字典](#processList)
2. [发票申请页](#invoicePage)
1. [申请列表页](#myInvoicePage)
1. [分配业务员](#deliverAssignSalesman)
1. [开具发票](#invoiced)
1. [提交审核](#submitAudit)
1. [审核失败](#deliverReject)
1. [交付商交付](#delivered)
1. [查询详细信息](#invoice)
1. [发票列表](#merchantinvoicePage)
1. [发票申请列表](#merchantinvoiceapplyPage)

## **<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 = 1030
        提交审核        status = 1050
        业务交付        status = 1070

    {
        "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 = 1040 || 1080，显示当前status_name 

    {
        "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="invoice"> 查询详细信息 </a>**　　　　　
[返回到目录](#menu)　　　　　
##### URL
[/web/invoice/invoiceCtl/invoice]
#### 参数格式  `JSON`
#### HTTP请求方式 `POST`
#### 请求参数 `POST`

```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"
}

```

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

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

```javascript
 {
    "invoice_id":"11855671564003193",       //发票ID
		"operator_id": "001",                   //业务员ID
		"status":"1040"                         //业务状态
}

```

**返回结果**   

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

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

```

## **<a name="invoiced"> 开具发票 </a>**　　　　　
[返回到目录](#menu)　　　　　

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

```javascript
 {
	"invoice_id":"11855693476003245",                      //发票ID
	"status":"1050",                                       //业务状态
	"invoice_no": "17485952652",                           //发票编号
	"invoice_img":"https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=339685511,2228408993&fm=26&gp=0.jpg",   //发票图片
	"invoice_time": "2020-03-10",                          //开票时间
	"invoice_number":"NO 02995607"                         //发票号码
}

```

**返回结果**   

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

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

```

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

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

```javascript
 {
	"invoice_id":"11855693476003245",                      //发票ID
	"status":"1060",                                       //业务状态 
}

```

**返回结果**   

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

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

```

## **<a name="deliverReject"> 审核失败 </a>**　　　　　
[返回到目录](#menu)　　　　　

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

```javascript
{
	"invoice_id":"11855693476003245",                      //发票ID
	"status":"1050",                                       //业务状态
	"invoice_no": "17485952652",                           //发票编号
	"invoice_img":"https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=339685511,2228408993&fm=26&gp=0.jpg",                                       //发票图片
	"invoice_time": "2020-03-10",                          //开票时间
	"invoice_number":"NO 02995607"                         //发票号码
}
```

**返回结果**   

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

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

```

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

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

```javascript
{
	"invoice_id":"11855693476003245",                      //发票ID
	"status":"1050",                                       //业务状态
  "deliver_mail_no": "sfsunyanan",                         //快递单号
  "deliver_img": "https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=1909363170,38053158&fm=26&gp=0.jpg"                                        //交接单
}
```

**返回结果**   

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

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

```


## **<a name="merchantinvoicePage"> 发票列表 </a>**　　　　　
[返回到目录](#menu)　　　　　

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

```javascript
{
    "currentPage": 1,       
    "pageSize": 10,         
    "apply_no": "",        //发票申请编号
    "invoice_no": "",       //发票代码
    "from_name": "",        //开票方名称
    "begin_time": "",       //开始时间
    "end_time": ""          //结束时间
}
```

**返回结果**   

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

**示例**
```javascript
{
    "status": 0,
    "msg": "success",
    "data": {
        "count": 1,
        "rows": [
            {
                "id": "1",
                "saas_id": "saas_id",
                "saas_merchant_id": "11248111258000991",
                "batch_no": "batch_no",
                "owner_type": "00",
                "fee_type": "00",         
                "invoice_type": "10",       //发票类型 10 增值税专用发票 20 增值税普通发票 30 普通发票
                "province": "province",
                "invoice_join": "10",
                "invoice_no": "invoice_no",         //发票代码
                "invoice_number": "invoice_number", //发票号码
                "invoice_time": "2020-04-09",       //开票日期
                "invoice_amount": 1,                //价税总计
                "sve_invoice_id": "sve_invoice_id",
                "apply_no": "apply_no",             //发票申请编号
                "from_name": "from_name",           //名称
                "from_credit_code": "from_credit_code", //纳税人识别号
                "from_addr": "from_addr",               //地址
                "from_mobile": "from_mobile",           //电话
                "from_bank": "from_bank",               //开户行
                "from_account": "from_account",         //银行账号
                "to_name": "to_name",                   //邮寄名称
                "to_credit_code": "to_credit_code",     
                "to_addr": "to_addr",                   //邮寄地址
                "to_mobile": "to_mobile",               //邮寄电话
                "to_bank": "to_bank",                   //
                "to_account": "to_account",
                "mail_to": "mail_to",
                "mail_mobile": "mail_mobile",
                "mail_addr": "mail_addr",
                "personal_invoice_tax": 10,
                "additional_tax": 1,
                "value_added_tax": 1,
                "service_tax": 1,
                "summary": "summary",
                "created_at": "2020-04-09 21:31:40",
                "updated_at": "2020-04-09 21:31:42",
                "deleted_at": null,
                "version": 0,
                "price": 0
            }
        ]
    },
    "requestid": "2d9c4d82543f49b197e9bc38e1bdc499"
}

```


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

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

```javascript
{
    "currentPage": 1,       
    "pageSize": 10,         
    "apply_no": "",        //发票申请编号
    "begin_time": "",       //开始时间
    "end_time": ""          //结束时间
}
```

**返回结果**   

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

**示例**
```javascript
{
    "status": 0,
    "msg": "success",
    "data": {
        "count": 1,
        "rows": [
            {
                "id": "1",
                "saas_id": "1",
                "saas_merchant_id": "11248111258000991",
                "batch_no": "1",
                "owner_type": "商户发票",
                "fee_type": "注册订单费用",
                "invoice_type": "增值税专用发票",  //发票类型
                "status": "1",                  //进度
                "sve_invoice_id": "1",
                "apply_no": "1",            //发票申请编号
                "from_name": "1",           //开票方
                "from_credit_code": "1",
                "from_addr": "1",
                "from_mobile": "1",
                "from_bank": "1",
                "from_account": "1",
                "to_name": "1",           //发票抬头
                "to_credit_code": "1",
                "to_addr": "1",
                "to_mobile": "1",
                "to_bank": "1",
                "to_account": "1",
                "mail_to": "1",
                "mail_mobile": "1",
                "mail_addr": "1",
                "personal_invoice_tax": 1,      //个税
                "additional_tax": 1,
                "value_added_tax": 1,
                "service_tax": 1,
                "created_at": "2020-04-10 22:39:43",    //申请时间
                "updated_at": "2020-04-10 22:39:40",
                "deleted_at": null,
                "version": 0,
                "invoice_join": "",
                "price": 0
            }
        ]
    },
    "requestid": "712c62cc9dfd455b82ae13bf68c882c9"
}

```
