<a name="menu">目录</a>
1. [身份证校验](#idNoValid)
1. [保存订单](#saveOrder)
1. [我的订单](#myOrders)
1. [订单详情](#orderInfo)
1. [个体户管理/个体户详情](#saasorderbusinessmenPage)
1. [转账交易](#saasTradeBusinessmenPage)
1. [发票管理](#invoiceBycreditCode)
## **<a name="idNoValid"> 身份证校验</a>**
[返回到目录](#menu)
##### URL
[/applet/merchantApplet/idNoValid]
#### 参数格式  `JSON`
#### HTTP请求方式 `POST`
```javascript

{
    "openid": "od1Y85FIQbVye0WzZnAKnTh5YC6k",       // openId
    "merchant_id": "11247613260000707",             // 商户id
    "idno": "210124198911021227",                   // 身份证
}

```

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

{
    "code": 0,
    "msg": "身份证号码错误"
}

```


## **<a name="saveOrder"> 保存订单</a>**
[返回到目录](#menu)
##### URL
[/applet/merchantApplet/saveOrder]
#### 参数格式  `JSON`
#### HTTP请求方式 `POST`
```javascript

{
    "openid": "od1Y85FIQbVye0WzZnAKnTh5YC6k",       // openId
    "merchant_id": "11247613260000707",             // 商户id
    "idcard_front": "222222222",                    // 身份证人像面
    "idcard_back": "222222222222",                  // 身份证国徽面
    "legal_name": "2222222222",                     // 法人姓名
    "legal_mobile": "18600440811",                  // 联系电话
    "legal_idno": "210124198911021227",             // 法人身份证
    "company_names": "2222222",                     // 公司名称，英文逗号（,）分隔
    "bank_front": "22222222222222",                 // 银行卡正面
    "bank_back": "2222222222",                      // 银行卡反面
    "bank_name": "2222222222",                      // 开户行
    "bank_no": "222222222222",                      // 银行卡号
    "bank_mobile": "2222222222222"                  // 手机号（银行卡预留手机号）
}

```

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

{
    "code": 1,
    "msg": "success",
    "data": null
}

```

## **<a name="myOrders"> 我的订单</a>**
[返回到目录](#menu)
##### URL
[/applet/merchantApplet/myOrders]

#### 参数格式  `JSON`
#### HTTP请求方式 `POST`

``` javascript
{
    "currentPage": "1",
    "pageSize": "10",
}

```

#### 返回结果
```javascript
{
    "status": 0,
    "msg": "success",
    "data": {
        "count": 0,
        "rows": [
            {
                "id": "1726724188001516",                   // 订单编号
                "price": 1500,                              // 订单价格
                "pay_voucher_img": "0",                     // 付款凭证
                "audit_remark": "",                         // 审核凭证
                "deliver_man": "",                          // 交付联系人
                "deliver_mobile": "",                       // 交付联系电话
                "deliver_addr": "",                         // 邮寄地址
                "created_at": "2020-03-21 07:45:18",        // 创建时间
                "status": "3030",                           // 订单状态
                "status_name": "已交付"                      // 订单状态名称
                // 订单信息
                "bminfo": {
                    "idcard_front": "11111",                // 身份证正面
                    "idcard_back": "11111",                 // 身份证反面
                    "legal_name": "11111",                  // 法人名称
                    "legal_mobile": "11111",                // 手机号
                    "legal_idno": "11111",                  // 身份证号码
                    "company_names": "11111",               // 个体户名称
                    "bank_front": "11111",                  // 银行卡正面图
                    "bank_back": "11111",                   // 银行卡反面图
                    "bank_name": "11111",                   // 开户行
                    "bank_no": "11111",                     // 银行卡号
                    "bank_mobile": "11111",                 // 预留手机号
                    "domicile_id": "",                      // 注册地id
                    "domicile_name": "",                    // 注册地
                    "business_scope_id": "",                // 经营范围id
                    "business_type": "",                    // 经营范围类型
                    "business_scope": "",                   // 经营范围详情
                }
            }
        ],
        "total": 1
    },
    "requestid": "00521a0a0f094c8d982bf4375fbe91b1"
}
```


## **<a name="orderInfo"> 订单详情</a>**
[返回到目录](#menu)
##### URL
[/applet/merchantApplet/orderInfo]

#### 参数格式  `JSON`
#### HTTP请求方式 `POST`

``` javascript
{
    "id": "1",
}

```

#### 返回结果
```javascript
{
    "status": 0,
    "msg": "success",
    "data": {
        "id": "1726724188001516",                   // 订单编号
        "price": 1500,                              // 订单价格
        "pay_voucher_img": "0",                     // 付款凭证
        "audit_remark": "",                         // 审核凭证
        "deliver_man": "",                          // 交付联系人
        "deliver_mobile": "",                       // 交付联系电话
        "deliver_addr": "",                         // 邮寄地址
        "created_at": "2020-03-21 07:45:18",        // 创建时间
        "status": "3030",                           // 订单状态
        "status_name": "已交付"                      // 订单状态名称
        // 订单信息
        "bminfo": {
            "idcard_front": "11111",                // 身份证正面
            "idcard_back": "11111",                 // 身份证反面
            "legal_name": "11111",                  // 法人名称
            "legal_mobile": "11111",                // 手机号
            "legal_idno": "11111",                  // 身份证号码
            "company_names": "11111",               // 个体户名称
            "bank_front": "11111",                  // 银行卡正面图
            "bank_back": "11111",                   // 银行卡反面图
            "bank_name": "11111",                   // 开户行
            "bank_no": "11111",                     // 银行卡号
            "bank_mobile": "11111",                 // 预留手机号
            "domicile_id": "",                      // 注册地id
            "domicile_name": "",                    // 注册地
            "business_scope_id": "",                // 经营范围id
            "business_type": "",                    // 经营范围类型
            "business_scope": "",                   // 经营范围详情
        }
    },
    "requestid": "00521a0a0f094c8d982bf4375fbe91b1"
}
```

## **<a name="saasorderbusinessmenPage"> 个体户管理</a>**
[返回到目录](#menu)
##### URL
[/applet/merchantApplet/saasorderbusinessmenPage]

#### 参数格式  `JSON`
#### HTTP请求方式 `POST`

``` javascript
{
    "id":"1728803996004807",                   //查询详情是填写
	"merchant_id":"11249768207001229",
	"openid":"od1Y85NtLgV1tFdKsPUXV8LhMMzI"
}

```

#### 返回结果
```javascript
{
    "status": 0,
    "msg": "操作成功",
    "data": {
        "count": 1,
        "rows": [
            {
                "id": "1727155000004670",
                "saas_id": "10000",
                "merchant_id": "11248111258000991",
                "product_id": 10010000,
                "saas_order_id": "",
                "company_id": "116",
                "customer_id": "498786",
                "legal_name": "郝哈哈1",
                "legal_mobile": "18833836395",
                "legal_idcard": "150403199612172012",
                "name": "name1",
                "credit_code": "92321311MA205QEJ3M",
                "business_place": "好的好的和",
                "business_scope": "对对对急急急",
                "reg_date": "2020-03-21 00:00:00",
                "business_img": "https://gsb-zc.oss-cn-beijing.aliyuncs.com//zc_wxapplet_1584759285001.jpg",
                "business_gov_file": "https://gsb-zc.oss-cn-beijing.aliyuncs.com//zc_wxapplet_1584759291483.jpg",
                "gongzhang": "https://gsb-zc.oss-cn-beijing.aliyuncs.com//zc_wxapplet_1584759307283.jpg",
                "caiwuzhang": "https://gsb-zc.oss-cn-beijing.aliyuncs.com//zc_wxapplet_1584759310909.jpg",
                "fapiaozhang": "",
                "hetongzhang": "",
                "farenzhang": "",
                "zhang_gov_file": "",
                "is_bank": 0,
                "bank_name": "张哈哈哈",
                "bank_no": "1377373",
                "bank": "的好的很好的哈",
                "bank_img": "https://gsb-zc.oss-cn-beijing.aliyuncs.com//zc_wxapplet_1584759330846.jpg",
                "bank_gov_file": "https://gsb-zc.oss-cn-beijing.aliyuncs.com//zc_wxapplet_1584759336371.jpg",
                "ca_img": "https://gsb-zc.oss-cn-beijing.aliyuncs.com//zc_wxapplet_1584759349850.jpg",
                "tax_reg_day": "2020-03-21T00:00:00.000Z",
                "tax_org": "的好的好的和",
                "tax_gov_file": "https://gsb-zc.oss-cn-beijing.aliyuncs.com//zc_wxapplet_1584759354261.jpg",
                "notes": "",
                "common_tax_ladder": [
                    {
                        "minValue": "1",
                        "maxValue": "",
                        "quiCalDed": "1",
                        "rate": "1"
                    }
                ],
                "common_other_ladder": [
                    {
                        "minValue": "1",
                        "zengzhiRate": "1",
                        "fujiaRate": "1",
                        "maxValue": ""
                    }
                ],
                "special_tax_ladder": [
                    {
                        "minValue": "1",
                        "maxValue": "",
                        "quiCalDed": "1",
                        "rate": "1"
                    }
                ],
                "special_other_ladder": [
                    {
                        "minValue": "1",
                        "zengzhiRate": "1",
                        "fujiaRate": "1",
                        "maxValue": ""
                    }
                ],
                "service_begin_time": null,
                "service_end_time": null,
                "cost_rate": 0,
                "tax_rate": 0,
                "add_value_up_type": "1",
                "tax_up_type": "1",
                "service_rate": 0,
                "sign_notes": "",
                "sign_time": null,
                "is_create_account": 0,
                "bd_id": 2,
                "bd_path": "",
                "province": "",
                "create_account_time": null,
                "invoice_content": null,
                "created_at": "2020-04-11 08:44:42",
                "updated_at": "2020-04-11T08:57:17.000Z",
                "deleted_at": null,
                "version": 2,
                "merchant_app_user_id": "38",
                "is_bank_name": "未开户"
            }
        ]
    },
    "bizmsg": "empty",
    "requestid": "5a9c5444eb4c49258d1594ffab8c28f9"
}
```


## **<a name="saasTradeBusinessmenPage"> 个体户账单</a>**
[返回到目录](#menu)
##### URL
[/applet/merchantApplet/saasTradeBusinessmenPage]

#### 参数格式  `JSON`
#### HTTP请求方式 `POST`

``` javascript
{
	"merchant_id":"11249768207001229",
	"openid":"od1Y85NtLgV1tFdKsPUXV8LhMMzI"
}

```

#### 返回结果
```javascript
{
    "code": 1,
    "msg": "success",
    "data": {
        "count": 1,
        "rows": [
            {
                "id": 1001600,
                "trade_no": "T10016007027568",
                "saas_merchant_id": "11249768207001229",
                "order_id": "1295007001007702",
                "order_type": "20",
                "out_trade_no": "13699378256239124",
                "acc_name": "孙淑",
                "credit_code": "SYNSSD123123123123",
                "acc_no": "123",
                "open_bank": "招商银行",
                "amt": 100,
                "actual_amt": 100,
                "deduct_amt": 103,
                "service_tax": 3,
                "trade_status": "00",
                "trade_time": "2020-05-12 14:16:58",
                "trade_desc": "商户自行交易",
                "trade_receipt": "",
                "remark": "一般经营所得",
                "saas_id": "10000",
                "saas_invoice_id": "",
                "created_at": "2020-05-12 14:16:58",
                "updated_at": "2020-05-12T06:16:58.000Z",
                "deleted_at": null,
                "version": 0,
                "order_type_name": "商户交易",
                "trade_status_name": "成功"
            }
           
        ]
    }
}
```


## **<a name="invoiceBycreditCode"> 发票管理</a>**
[返回到目录](#menu)
##### URL
[/applet/merchantApplet/invoiceBycreditCode]

#### 参数格式  `JSON`
#### HTTP请求方式 `POST`

``` javascript
{
	"merchant_id":"11249768207001229",
	"openid":"od1Y85NtLgV1tFdKsPUXV8LhMMzI",
    "status":"1060"
}

```

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

{
    "code": 1,
    "msg": "success",
    "data": {
        "count": 1,
        "rows": [
            {
                "from_name": "孙亚楠首饰店",
                "to_name": "大森森金融有限公司",
                "to_credit_code": "DSSJRC123123",
                "to_addr": "狗熊岭",
                "to_mobile": "18833836392",
                "to_bank": "工商银行",
                "to_account": "DSSJR",
                "invoice_time": "2020-05-10 08:00:00",
                "invoice_img": "https://gsb-zc.oss-cn-beijing.aliyuncs.com//zc_wxapplet_1588990656115.jpg",
                "invoice_amount": 1,
                "created_at": "2020-05-09 10:03:21",
                "status": "1060",
                "status_name": "已完成"
            }
        ]
    }
}

```








