Commit ef6e6f0c by 王昆

gsb

parent ac09ebff
...@@ -9,6 +9,7 @@ class InvoiceCtl extends CtlBase { ...@@ -9,6 +9,7 @@ class InvoiceCtl extends CtlBase {
super(); super();
this.saasinvoiceSve = system.getObject("service.saas.saasinvoiceSve"); this.saasinvoiceSve = system.getObject("service.saas.saasinvoiceSve");
this.orderSve = system.getObject("service.saas.orderSve"); this.orderSve = system.getObject("service.saas.orderSve");
this.tradeSve = system.getObject("service.trade.tradeSve");
this.redisClient = system.getObject("util.redisClient"); this.redisClient = system.getObject("util.redisClient");
} }
...@@ -223,7 +224,7 @@ class InvoiceCtl extends CtlBase { ...@@ -223,7 +224,7 @@ class InvoiceCtl extends CtlBase {
try { try {
validation.check(params, "id", {name: "发票申请信息", is_require: true}); validation.check(params, "id", {name: "发票申请信息", is_require: true});
validation.check(params, "invoice_type", {name: "发票类型", dics: ['00', "10", "20"]}); validation.check(params, "invoice_type", {name: "发票类型", is_require: true, dics: ['00', "10", "20"]});
validation.check(params, "invoiceList", {name: "开票信息", arr_require: true}); validation.check(params, "invoiceList", {name: "开票信息", arr_require: true});
validation.check(params, "mail_to", {name: "收件人", arr_require: true}); validation.check(params, "mail_to", {name: "收件人", arr_require: true});
validation.check(params, "mail_mobile", {name: "联系电话", arr_require: true}); validation.check(params, "mail_mobile", {name: "联系电话", arr_require: true});
...@@ -264,6 +265,7 @@ class InvoiceCtl extends CtlBase { ...@@ -264,6 +265,7 @@ class InvoiceCtl extends CtlBase {
batch_no: batch_no, batch_no: batch_no,
apply_no: apply_no, apply_no: apply_no,
fee_type: "10", fee_type: "10",
invoice_amount: Number(invoice.invoice_amount || 0),
invoice_type: this.trim(params.invoice_type), invoice_type: this.trim(params.invoice_type),
from_name: bussinessmen.name, from_name: bussinessmen.name,
......
...@@ -34,7 +34,7 @@ class Validation { ...@@ -34,7 +34,7 @@ class Validation {
if(!data) { if(!data) {
throw new Error(msg + "对象不存在"); throw new Error(msg + "对象不存在");
} }
let v = data[field]; let v = data[field] || "";
if (rule.is_require && !v) { if (rule.is_require && !v) {
this.error(data, `${rule.name}:为空`); this.error(data, `${rule.name}:为空`);
} }
......
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