Commit 0bca57a0 by 王昆

gsb

parent c1eb8204
......@@ -5,7 +5,7 @@ const validation = system.getObject("util.validation");
class InvoiceCtl extends CtlBase {
constructor() {
super();
this.invoiceSve = system.getObject("service.invoice.invoiceSve");
this.invoiceSve = system.getObject("service.saas.invoiceSve");
this.tradeSve = system.getObject("service.trade.tradeSve");
}
......@@ -51,7 +51,13 @@ class InvoiceCtl extends CtlBase {
}
async platformTitleAddr(params, pobj2, req) {
try {
let id = params.id;
this.invoiceSve.byid
let result = {};
//
result.title = {"merchant_name": "舟山兰和有限公司", "merchant_credit_code": "KHSDLKFJAFJ", "merchant_tax_type": "00", "merchant_addr": "河南信阳", "merchant_mobile": "18833836395", "merchant_bank": "北京银行栓秀支行", "merchant_account": "zhousanlanhe"};
result.addr = {"mail_addr": "北京朝阳区国创元", "mail_mobile": "010-4525821-44", "mail_to": "张娇哒哒哒",};
return system.getResultSuccess(result);
......@@ -91,7 +97,6 @@ class InvoiceCtl extends CtlBase {
}
}
//发票列表
async invoicePage(params, pobj2, req) {
try {
......@@ -142,41 +147,6 @@ class InvoiceCtl extends CtlBase {
}
}
// 审核
async platformAudit(params, pobj2, req) {
try {
let id = this.trim(params.id);
if (!id) {
return system.getResult(null, "发票申请不存在");
}
let status = params.status || 0;
let remark = this.trim(params.remark);
if (!remark) {
return system.getResult(null, "请填写审核备注");
}
return system.getResultSuccess();
} catch (error) {
return system.getResult(null, `系统错误 错误信息 ${error}`);
}
}
// 审核
async platformAudit(params, pobj2, req) {
try {
let id = this.trim(params.id);
if (!id) {
return system.getResult(null, "发票申请不存在");
}
let status = params.status || 0;
let remark = this.trim(params.remark);
if (!remark) {
return system.getResult(null, "请填写审核备注");
}
return system.getResultSuccess();
} catch (error) {
return system.getResult(null, `系统错误 错误信息 ${error}`);
}
}
}
......
......@@ -36,43 +36,5 @@ class InvoiceService extends ServiceBase {
var rs = await this.callms("invoice", "invoice", params);
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;
}
async platforminvoiceapplyPage(params){
var rs = await this.callms("invoice", "platforminvoiceapplyPage", params);
if (rs && rs.data && rs.data.rows) {
this.transOrderField(rs.data.rows);
}
return rs;
}
async audit(params) {
var rs = await this.callms("invoice", "invoiceapplyAudit", params);
return rs;
}
async makeout(params) {
var rs = await this.callms("invoice", "invoiceapplyMakeOut", params);
return rs;
}
transOrderField(rows) {
if (!rows || rows.length == 0) {
return;
}
for (let row of rows) {
row.price = system.f2y(row.price);
}
}
}
module.exports = InvoiceService;
const system = require("../../../system");
const ServiceBase = require("../../svems.base")
const settings = require("../../../../config/settings")
class InvoiceService extends ServiceBase {
constructor() {
super();
}
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;
}
async platforminvoiceapplyPage(params){
var rs = await this.callms("invoice", "platforminvoiceapplyPage", params);
if (rs && rs.data && rs.data.rows) {
this.transOrderField(rs.data.rows);
}
return rs;
}
async audit(params) {
var rs = await this.callms("invoice", "invoiceapplyAudit", params);
return rs;
}
async makeout(params) {
var rs = await this.callms("invoice", "invoiceapplyMakeOut", params);
return rs;
}
async invoiceapplyById(params) {
var rs = await this.callms("invoice", "invoiceapplyById", params);
return rs;
}
transOrderField(rows) {
if (!rows || rows.length == 0) {
return;
}
for (let row of rows) {
row.price = system.f2y(row.price);
}
}
}
module.exports = InvoiceService;
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