Commit bd53b307 by 王昆

gsb

parent 9b74bb2d
...@@ -153,6 +153,17 @@ class InvoiceCtl extends CtlBase { ...@@ -153,6 +153,17 @@ class InvoiceCtl extends CtlBase {
mail_mobile: this.trim(addr.mail_mobile), mail_mobile: this.trim(addr.mail_mobile),
mail_to: this.trim(addr.mail_to), mail_to: this.trim(addr.mail_to),
}; };
data = await this.invoiceSve.applySave(data);
console.log(data);
data = data.data;
if (!data || !data.id) {
return system.getResult(null, "网络异常,发票申请失败");
}
let rs = await this.tradeSve.updateInvoice({ids: params.data_ids, saas_invoice_id: data.id});
console.log(rs);
console.log(data); console.log(data);
return system.getResultSuccess(data); return system.getResultSuccess(data);
} }
......
...@@ -22,6 +22,11 @@ class InvoiceService extends ServiceBase { ...@@ -22,6 +22,11 @@ class InvoiceService extends ServiceBase {
return rs; return rs;
} }
async applySave(params){
var rs = await this.callms("invoice", "invoiceapplySave", params);
return rs;
}
transOrderField(rows) { transOrderField(rows) {
if (!rows || rows.length == 0) { if (!rows || rows.length == 0) {
return; return;
......
...@@ -251,6 +251,11 @@ class TradeService extends ServiceBase { ...@@ -251,6 +251,11 @@ class TradeService extends ServiceBase {
return rs; return rs;
} }
async updateInvoice(params) {
let rs = await this.callms("trade", "updateItemInvoice", params);
return rs;
}
checkField(data, field, rule) { checkField(data, field, rule) {
if (!data || !field) { if (!data || !field) {
return; return;
......
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