Commit 35a21629 by 孙亚楠

dd

parent ab9f04a3
...@@ -252,6 +252,22 @@ class IinvoicestatusService extends ServiceBase { ...@@ -252,6 +252,22 @@ class IinvoicestatusService extends ServiceBase {
} }
} }
/**
* 平台审核失败
* @param {*} params
*/
async deliverReject(params) {
let _invoice= params._invoice;
_invoice.status = this.trim(params.status);
try {
await _invoice.save();
return system.getResultSuccess();
} catch (error) {
console.log(error);
return system.getResult(null, `系统错误 错误信息 ${error}`);
}
}
/** /**
* 平台验收 * 平台验收
* @param {*} params * @param {*} params
...@@ -367,29 +383,22 @@ class IinvoicestatusService extends ServiceBase { ...@@ -367,29 +383,22 @@ class IinvoicestatusService extends ServiceBase {
* 客户交付 * 客户交付
* @param {*} params * @param {*} params
*/ */
async deliverCustomer(params) { async deliveryCustomer(params) {
if (!params.invoice_id) {
return system.getResult(null, `参数错误 发票ID不能为空`);
}
if (!params.status) {
return system.getResult(null, `参数错误 发票状态不能为空`);
}
if (!params.deliver_mail_no) { if (!params.deliver_mail_no) {
return system.getResult(null, `参数错误 客户快递单号不能为空`); return system.getResult(null, `参数错误 客户快递单号不能为空`);
} }
let iivoiceInforegProperty = {}; let iivoiceInforegProperty = {};
iivoiceInforegProperty.id = this.trim(params._order.id); iivoiceInforegProperty.id = this.trim(params.invoice_id);
iivoiceInforegProperty.deliver_mail_no = this.trim(params.deliver_mail_no); iivoiceInforegProperty.deliver_mail_no = this.trim(params.deliver_mail_no);
let iinvoiceProperty = {}; let iinvoiceProperty = {};
iinvoiceProperty.status = this.trim(params.status); iinvoiceProperty.status = this.trim(params.status);
iinvoiceProperty.id = params._invoice.id; iinvoiceProperty.id = params._invoice.id;
try { try {
await this.db.transaction(async t => { await this.db.transaction(async t => {
await this.oorderinforegDao.update(iivoiceInforegProperty, t); await this.iinvoiceinforegDao.update(iivoiceInforegProperty, t);
await this.dao.update(iinvoiceProperty, t); await this.dao.update(iinvoiceProperty, t);
}); });
return system.getResultSuccess(); return system.getResultSuccess();
} catch (error) { } catch (error) {
console.log(error); console.log(error);
...@@ -545,21 +554,6 @@ class IinvoicestatusService extends ServiceBase { ...@@ -545,21 +554,6 @@ class IinvoicestatusService extends ServiceBase {
} }
} }
/**
* 平台审核失败
* @param {*} params
*/
async deliverReject(params) {
let _invoice= params._invoice;
_invoice.status = this.trim(params.status);
try {
await _invoice.save();
return system.getResultSuccess();
} catch (error) {
console.log(error);
return system.getResult(null, `系统错误 错误信息 ${error}`);
}
}
} }
......
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