Commit d16db55d by 孙亚楠

dd

parents 836e0b7e f525e656
......@@ -4,6 +4,15 @@ class InvoiceCtl extends CtlBase {
constructor() {
super();
this.invoiceSve = system.getObject("service.invoice.invoiceSve");
this.pageType = {
"0": ["2020", "2030"], // 我的业务发票
"1": ["2010"], // 发票办理
};
}
getPageStatus(type) {
type = this.trim(type || "0");
return this.pageType[type];
}
/**
......@@ -33,15 +42,32 @@ class InvoiceCtl extends CtlBase {
}
}
setRoleAuth(pobj, loginUser) {
if (loginUser.isManager) {
// 暂时先什么都不做
} else
if (loginUser.isMain) {
if (!loginUser.org_path) {
return system.getResultSuccess({count: 0, rows: []});
}
pobj.operator_path_like = loginUser.org_path + "%";
} else {
pobj.operator_id = loginUser.id || 0;
}
}
/**
* 发票申请列表-业务员
* @param {*} pobj
*/
async myInvoicePage(pobj, pobj2, req) {
try {
pobj.operator_id = req.loginUser.id;
pobj.assigned = true;
pobj.statuses = this.getPageStatus(pobj.pageType);
this.setRoleAuth(pobj, req.loginUser);
this.doTimeCondition(pobj, ["createTimeBegin", "createTimeEnd"]);
return await this.invoiceSve.invoicePage(pobj);
return await this.invoiceSve.invoicePage(pobj);
} catch (error) {
console.log(error);
return system.getResultFail(500, `接口错误 错误信息 ${error}`);
......
......@@ -194,11 +194,10 @@ class System {
// 订单服务
// order: domain2 + ":3103" + path,
order: domain + ":3103"+ path,
order: domain2 + ":3103"+ path,
// 发票服务
// invoice: domain2 + ":3105" + path,
invoice: "http://127.0.0.1:3105" + path,
invoice: domain + ":3105" + path,
// 发票服务
uc: domain2 + ":3106" + path,
......
<a name="menu">目录</a>
1. [业务进度字典](#processList)
2. [发票申请页](#invoicePage)
1. [申请列表页](#myInvoicePage)
2. [发票申请](#invoicePage) -- 改
1. [发票办理](#myInvoicePage0) -- 改
1. [我的业务发票](#myInvoicePage1) -- 改
1. [分配业务员](#deliverAssignSalesman)
1. [开具发票](#invoiced)
1. [提交审核](#submitAudit)
......@@ -42,7 +43,7 @@
```
## **<a name="invoicePage"> 发票申请 </a>**
## **<a name="invoicePage"> 发票申请 </a>**
[返回到目录](#menu)
##### URL
[/web/invoice/invoiceCtl/invoicePage]
......@@ -54,13 +55,61 @@
说明:
操作按钮显示
查看详情 全部转态都显示
业务分配 status = 1030
提交审核 status = 1050
业务交付 status = 1070
业务分配 status = 2000
{
"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": "2000", // 进度状态
"status_name": "交付商分配", // 进度状态名称
"merchant_name": "汉唐信通(北京)科技有限公司", // 发票抬头
"businessmen_name": "北京创知厚德科技有限公司", // 开票方
"deliver_name": "1", // 交付商名称
"oproduct": { // 产品
"name": "发票申请",
"desc": "发票申请,发票红冲",
}
},
],
"requestid": "dc53b7fb2151425e8366edfe317bb8b5"
}
```
## **<a name="myInvoicePage0"> 发票办理 </a>**
[返回到目录](#menu)
##### URL
[/web/invoice/invoiceCtl/myInvoicePage]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
``` javascript
{
"currentPage":1,
"pageSize": 2,
"pageType": "0", -- // 发票办理 此处传0
"apply_no":"", // 申请编号
"status":"", // 进度状态
"invoice_type":"", // 发票类型 10 增值税专用发票 20 增值税普通发票 30 普通发票
......@@ -71,6 +120,7 @@
#### 返回结果
```javascript
一直显示发票开具按钮
{
"count": 5,
......@@ -85,13 +135,6 @@
"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": { // 交付商对象
......@@ -109,24 +152,21 @@
```
## **<a name="myInvoicePage"> 申请列表页 </a>**
## **<a name="myInvoicePage1"> 我的业务发票 </a>**
[返回到目录](#menu)
##### URL
[/web/invoice/invoiceCtl/myInvoicePage]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
``` javascript
说明:
操作按钮显示
查看详情 全部转态都显示
新建进度 status = 1040 || 1080,显示当前status_name
按钮规则
status == 2020时,显示客户交付按钮
``` javascript
{
"currentPage":1,
"pageSize": 2,
"pageType": "1", -- // 我的业务发票
"apply_no":"", // 申请编号
"status":"", // 进度状态
"invoice_type":"", // 发票类型 10 增值税专用发票 20 增值税普通发票 30 普通发票
......@@ -151,13 +191,6 @@
"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": { // 交付商对象
......@@ -174,7 +207,6 @@
```
## **<a name="invoice"> 查询详细信息 </a>**     
[返回到目录](#menu)     
##### URL
......
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