Commit b7b50492 by zhaoxiqing

gsb

parent d4f74063
<component name="ProjectCodeStyleConfiguration">
<state>
<option name="USE_PER_PROJECT_SETTINGS" value="true" />
</state>
</component>
\ No newline at end of file
var system = require("../../../system")
const CtlBase = require("../../ctlms.base");
class InvoiceCtl extends CtlBase {
constructor() {
super();
this.invoiceSve = system.getObject("service.invoice.invoiceSve");
}
//发票列表
async platforminvoicePage(params, pobj2, req) {
try {
let rs = await this.invoiceSve.platforminvoicePage(params);
return rs;
} catch (error) {
return system.getResult(null, `系统错误 错误信息 ${error}`);
}
}
}
module.exports = InvoiceCtl;
......@@ -37,5 +37,24 @@ class InvoiceService extends ServiceBase {
return rs;
}
async platforminvoicePage(params){
var rs = await this.callms("invoice", "platforminvoicePage", params);
if (rs && rs.data && rs.data.rows) {
this.transOrderField(rs.data.rows);
}
return rs;
}
transOrderField(rows) {
if (!rows || rows.length == 0) {
return;
}
for (let row of rows) {
row.price = system.f2y(row.price);
}
}
}
module.exports = InvoiceService;
......@@ -192,7 +192,7 @@ class System {
order: dev + ":3103" + path,
// 发票服务
invoice: dev + ":3105" + path,
invoice: local + ":3105" + path,
// 用户服务
uc: dev + ":3106" + path,
......
......@@ -8,6 +8,7 @@
1. [审核失败](#deliverReject)
1. [交付商交付](#delivered)
1. [查询详细信息](#invoice)
1. [发票列表](#platforminvoicePage)
## **<a name="processList"> 业务进度字典 </a>**
[返回到目录](#menu)
......@@ -514,3 +515,87 @@
}
```
## **<a name="platforminvoicePage"> 发票列表 </a>**     
[返回到目录](#menu)     
##### URL
[/web/saas/invoiceCtl/platforminvoicePage]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
#### 请求参数 `POST`
```javascript
{
"currentPage": 1,
"pageSize": 10,
"apply_no": "", //发票申请编号
"saas_merchant_id":"" //商户名称(传商户id)
}
```
**返回结果**
| 参数名|数据类型| 说明 |
|---|:---:|---|
| 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"
}
```
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