Commit bd53b307 by 王昆

gsb

parent 9b74bb2d
......@@ -153,6 +153,17 @@ class InvoiceCtl extends CtlBase {
mail_mobile: this.trim(addr.mail_mobile),
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);
return system.getResultSuccess(data);
}
......
......@@ -22,6 +22,11 @@ class InvoiceService extends ServiceBase {
return rs;
}
async applySave(params){
var rs = await this.callms("invoice", "invoiceapplySave", params);
return rs;
}
transOrderField(rows) {
if (!rows || rows.length == 0) {
return;
......
......@@ -251,6 +251,11 @@ class TradeService extends ServiceBase {
return rs;
}
async updateInvoice(params) {
let rs = await this.callms("trade", "updateItemInvoice", params);
return rs;
}
checkField(data, field, rule) {
if (!data || !field) {
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