Commit 3e6a7ceb by 王昆

gsb

parent f7586d08
......@@ -53,6 +53,7 @@ module.exports = function (db, DataTypes) {
province: { type: DataTypes.STRING, field: 'province', allowNull: true },
customer_id: { type: DataTypes.STRING, field: 'customer_id', allowNull: true },
create_account_time: { type: DataTypes.DATE, field: 'create_account_time', allowNull: true },
invoice_content: { type: DataTypes.STRING, field: 'invoice_content', allowNull: true },
created_at: { type: DataTypes.DATE, field: 'created_at', allowNull: false, defaultValue: DataTypes.NOW },
updated_at: { type: DataTypes.DATE, field: 'updated_at', allowNull: false, defaultValue: DataTypes.NOW },
deleted_at: { type: DataTypes.DATE, field: 'deleted_at', allowNull: true }
......
......@@ -88,6 +88,7 @@ class ObusinessmenService extends ServiceBase {
_obusinessmen.special_tax_ladder = params.special_tax_ladder;
_obusinessmen.common_other_ladder = params.common_other_ladder;
_obusinessmen.common_tax_ladder = params.common_tax_ladder;
_obusinessmen.invoice_content = JSON.stringify(params.invoice_content || []);
try {
await _obusinessmen.save();
......@@ -181,6 +182,15 @@ class ObusinessmenService extends ServiceBase {
if (list) {
for (var row of list) {
this.handleDate(row, ["created_at", "assignTime","reg_date","tax_reg_day","updated_at"], null, -8);
if(row.invoice_content) {
try {
row.invoice_content = JSON.parse(row.invoice_content);
} catch (error) {
row.invoice_content = [];
}
} else {
row.invoice_content = [];
}
}
await this.doSignBtn(list);
await this.setDeliverId(list);
......
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