Commit a0483251 by 王昆

gsb

parent f164c03b
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;
...@@ -6,7 +6,47 @@ class SaasinvoiceService extends ServiceBase { ...@@ -6,7 +6,47 @@ class SaasinvoiceService extends ServiceBase {
constructor() { constructor() {
super(); 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 = SaasinvoiceService; module.exports = SaasinvoiceService;
\ 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