Commit 3625c5bb by 孙亚楠

dd

parent a9471da9
......@@ -54,7 +54,7 @@ class InvoiceCtl extends CtlBase {
*/
async invoiceApply(pobj, pobj2, req) {
try {
pobj.invoice_amount = system.f2y(pobj.invoice_amount);
pobj.invoice_amount = system.y2f(pobj.invoice_amount);
return await this.invoiceSve.invoiceApply(pobj);
} catch (error) {
console.log(error);
......@@ -66,14 +66,30 @@ class InvoiceCtl extends CtlBase {
* 进度处理
* @param {*} pobj
*/
async handleStatus(pobj) {
async handleStatus(pobj, pobj2, req) {
try {
if(pobj.status=="1030"){
pobj.deliver_delive= system.y2f(pobj.deliver_delive);
}
return await this.invoiceSve.handleStatus(pobj);
} catch (error) {
console.log(error);
return system.getResultFail(500, `接口错误 错误信息 ${error}`);
}
}
/**
* 根据ID查详细信息
* @param {*} pobj
*/
async invoice(pobj, pobj2, req) {
try {
return await this.invoiceSve.invoice(pobj);
} catch (error) {
console.log(error);
return system.getResultFail(500, `接口错误 错误信息 ${error}`);
}
}
// /**
// * 申请发票校验
......
......@@ -3,7 +3,7 @@ const CtlBase = require("../../ctlms.base");
const md5 = require("MD5");
const uuidv4 = require('uuid/v4');
const logCtl = system.getObject("web.common.oplogCtl");
const settings = require("../../../../config/settings");
class UserCtl extends CtlBase {
constructor() {
......
......@@ -46,10 +46,11 @@ class InvoiceService extends ServiceBase {
return rs;
}
async invoiceApply(params) {
var rs = await this.callms("invoice", "invoiceApply", params);
async invoice(params) {
var rs = await this.callms("invoice", "invoice", params);
return rs;
}
}
module.exports = InvoiceService;
\ No newline at end of file
<a name="menu">目录</a>
1. [分配业务员](#deliverAssignSalesman)
1. [开具发票](#invoiced)
1. [提交审核](#submitAudit)
1. [审核失败](#deliverReject)
1. [交付商交付](#delivered)
## **<a name="deliverAssignSalesman"> 分配业务员 </a>**     
[返回到目录](#menu)     
**接口方式** HTTP
**HTTP方法** POST
**URI路径** /web/invoice/invoiceCtl/handleStatus
**参数验证**
**参数**
**示例**
```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)     
**接口方式** HTTP
**HTTP方法** POST
**URI路径** /web/invoice/invoiceCtl/handleStatus
**参数验证**
**参数**
**示例**
```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)     
**接口方式** HTTP
**HTTP方法** POST
**URI路径** /web/invoice/invoiceCtl/handleStatus
**参数验证**
**参数**
**示例**
```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)     
**接口方式** HTTP
**HTTP方法** POST
**URI路径** /web/invoice/invoiceCtl/handleStatus
**参数验证**
**参数**
**示例**
```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)     
**接口方式** HTTP
**HTTP方法** POST
**URI路径** /web/invoice/invoiceCtl/handleStatus
**参数验证**
**参数**
**示例**
```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"
}
```
\ 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