Commit 0914c48a by zhaoxiqing

gsb

parents fc76c521 cf561515
......@@ -46,22 +46,6 @@ class InvoiceCtl extends CtlBase {
}
}
// 商户抬头信息
async apply(params, pobj2, req) {
try {
return await this.orderSve.page(params);
} catch (error) {
return system.getResult(null, `系统错误 错误信息 ${error}`);
}
}
// 商户交付信息
async apply(params, pobj2, req) {
try {
return await this.orderSve.page(params);
} catch (error) {
return system.getResult(null, `系统错误 错误信息 ${error}`);
}
}
// 发票申请
async apply(params, pobj2, req) {
try {
......
......@@ -67,6 +67,20 @@ class MerchantCtl extends CtlBase {
return system.getResult(null, `系统错误 错误信息 ${error}`);
}
}
async title(params, pobj2, req) {
try {
return await this.merchantSve.title(params);
} catch (error) {
return system.getResult(null, `系统错误 错误信息 ${error}`);
}
}
async addr(params, pobj2, req) {
try {
return await this.merchantSve.addr(params);
} catch (error) {
return system.getResult(null, `系统错误 错误信息 ${error}`);
}
}
}
......
......@@ -90,6 +90,28 @@ class MerchantService extends ServiceBase {
return settings;
}
async title(params) {
let rs = await this.callms("merchant", "mchtTitles", params);
let list = rs.data || [];
let u = {};
if(list.length > 0) {
u = list[0];
}
return system.getResultSuccess(u);
}
async addr(params) {
let rs = await this.callms("merchant", "mchtAddrs", params);
let list = rs.data || [];
let u = {};
if(list.length > 0) {
u = list[0];
}
return system.getResultSuccess(u);
}
async setChannel(rows) {
if(!rows) {
return;
......
......@@ -178,7 +178,7 @@ class System {
common: dev + ":3102" + path,
// 商户服务
merchant: dev + ":3101" + path,
merchant: local + ":3101" + path,
// 订单服务
order: local + ":3103" + path,
......
......@@ -22,6 +22,9 @@
## 交易管理
  1 [交易接口](/doc/saas/trade.md)
## 发票管理
  1 [发票接口](/doc/saas/invoice.md)
## 报表管理
  1 [账期](/doc/tax/tax.md)
......
......@@ -2,7 +2,10 @@
1. [发票申请-功能1-交易列表](#merchantPage)
1. [发票申请-功能2-交易列表](#platformPage)
1. [发票申请-功能3-订单列表](#orderPage)
1. [商户抬头](#merchantTitle)
1. [商户地址](#merchantAddr)
1. [发票申请](#apply)
1. [发票列表](#invoicePage)
## **<a name="orderPage"> 发票申请-功能1-交易列表</a>**
[返回到目录](#menu)
......@@ -182,6 +185,17 @@
}
```
## **<a name="merchantTitle"> 商户抬头</a>**
[返回到目录](#menu)
##### URL
[/web/saas/merchantCtl/title] <a href="/doc/saas/merchant.md#title">【 去接口详情 】</a>
## **<a name="merchantAddr"> 商户地址</a>**
[返回到目录](#menu)
##### URL
[/web/saas/merchantCtl/addr] <a href="/doc/saas/merchant.md#title">【 去接口详情 】</a>
## **<a name="apply"> 发票申请</a>**
[返回到目录](#menu)
......@@ -245,4 +259,93 @@
},
"requestid": "00521a0a0f094c8d982bf4375fbe91b1"
}
```
## **<a name="invoicePage"> 发票列表 </a>**     
[返回到目录](#menu)     
##### URL
[/web/saas/invoiceCtl/invoicePage]
#### 参数格式 `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"
}
```
\ No newline at end of file
......@@ -8,6 +8,8 @@
1. [商户账号列表](#userPage)
1. [账号信息](#userInfo)
1. [账号编辑](#save)
1. [商户抬头](#title)
1. [商户地址](#addr)
## **<a name="dics"> 字典</a>**
......@@ -466,4 +468,60 @@
"requestid": "a4c7b5ce853d45cda37fbd93c7360353"
}
```
## **<a name="title"> 商户抬头</a>**
[返回到目录](#menu)
##### URL
[/web/saas/merchantCtl/title]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
``` javascript
{}
```
#### 返回结果
```javascript
{
"status": 0,
"msg": "success",
"data": {
"merchant_name": "舟山兰和有限公司", // 商户名称
"merchant_credit_code": "KHSDLKFJAFJ", // 信用代码
"merchant_tax_type": "00", // 纳税人类型 00一般纳税人 10小规模纳税人
"merchant_addr": "河南信阳", // 商户地址
"merchant_mobile": "18833836395", // 商户电话
"merchant_bank": "北京银行栓秀支行", // 商户开户行
"merchant_account": "zhousanlanhe", // 商户银行账号
"created_at": "2020-04-08 01:44:51", // 创建时间
}
}
```
## **<a name="addr"> 商户地址</a>**
[返回到目录](#menu)
##### URL
[/web/saas/merchantCtl/addr]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
``` javascript
{}
```
#### 返回结果
```javascript
{
"status": 0,
"msg": "success",
"data": {
"mail_addr": "北京朝阳区国创元", // 邮寄地址
"mail_mobile": "010-4525821-44", // 联系电话
"mail_to": "张娇哒哒哒", // 收件人
}
}
```
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment