Commit 1a95fd25 by 孙亚楠

dd

parents 73842b1e 21b11b0a
...@@ -8,7 +8,7 @@ const moment = require('moment') ...@@ -8,7 +8,7 @@ const moment = require('moment')
module.exports = (db, DataTypes) => { module.exports = (db, DataTypes) => {
return db.define("iivoice", { return db.define("iivoice", {
id: { type: DataTypes.STRING(32), allowNull: true, comment: "" }, // id: { type: DataTypes.STRING(32), allowNull: true, comment: "" },
province: { type: DataTypes.STRING(10), allowNull: true, comment: "发票对应省份" }, province: { type: DataTypes.STRING(10), allowNull: true, comment: "发票对应省份" },
invoice_type: { type: DataTypes.STRING(4), allowNull: true, comment: '发票类型 10 增值税专用发票 20 增值税普通发票 30 普通发票' }, invoice_type: { type: DataTypes.STRING(4), allowNull: true, comment: '发票类型 10 增值税专用发票 20 增值税普通发票 30 普通发票' },
invoice_join: { type: DataTypes.STRING(4), allowNull: true, comment: '发票联次 10 记账联 20 发票联 30 抵扣联 40 销售方次' }, invoice_join: { type: DataTypes.STRING(4), allowNull: true, comment: '发票联次 10 记账联 20 发票联 30 抵扣联 40 销售方次' },
...@@ -32,12 +32,12 @@ module.exports = (db, DataTypes) => { ...@@ -32,12 +32,12 @@ module.exports = (db, DataTypes) => {
businessmen_account: { type: DataTypes.STRING(45), allowNull: false, COMMENT: '销售方银行账号' }, businessmen_account: { type: DataTypes.STRING(45), allowNull: false, COMMENT: '销售方银行账号' },
apply_no: { type: DataTypes.STRING(45), allowNull: true, defaultValue: null, COMMENT: '发票申请编号' }, apply_no: { type: DataTypes.STRING(45), allowNull: true, defaultValue: null, COMMENT: '发票申请编号' },
apply_time: { type: DataTypes.DATE, allowNull: true, defaultValue: null, COMMENT: '发票申请时间' }, apply_time: { type: DataTypes.DATE, allowNull: true, defaultValue: null, COMMENT: '发票申请时间' },
invoice_amount: { type: DataTypes.INT(11), allowNull: true, defaultValue: 0, COMMENT: '价税合计总金额' }, invoice_amount: { type: DataTypes.INTEGER, allowNull: true, defaultValue: 0, COMMENT: '价税合计总金额' },
invoice_content: { type: DataTypes.STRING(300), allowNull: false, defaultValue: null, COMMENT: '开票内容' }, invoice_content: { type: DataTypes.STRING(300), allowNull: false, defaultValue: null, COMMENT: '开票内容' },
contract: { type: DataTypes.STRING(500), allowNull: true, COMMENT: '合同' }, contract: { type: DataTypes.STRING(500), allowNull: true, COMMENT: '合同' },
personal_invoice_tax: { type: DataTypes.INT(45), allowNull: false, defaultValue: null, COMMENT: '个税' }, personal_invoice_tax: { type: DataTypes.INTEGER, allowNull: false, defaultValue: null, COMMENT: '个税' },
additional_tax: { type: DataTypes.INT(45), allowNull: false, defaultValue: null, COMMENT: '附加税' }, additional_tax: { type: DataTypes.INTEGER, allowNull: false, defaultValue: null, COMMENT: '附加税' },
value_added_tax: { type: DataTypes.INT(45), allowNull: false, defaultValue: null, COMMENT: '增值税' }, value_added_tax: { type: DataTypes.INTEGER, allowNull: false, defaultValue: null, COMMENT: '增值税' },
mail_addr: { type: DataTypes.STRING(200), allowNull: true, defaultValue: null, COMMENT: '邮寄地址' }, mail_addr: { type: DataTypes.STRING(200), allowNull: true, defaultValue: null, COMMENT: '邮寄地址' },
mail_mobile: { type: DataTypes.STRING(20), allowNull: true, defaultValue: null, COMMENT: '邮寄电话' }, mail_mobile: { type: DataTypes.STRING(20), allowNull: true, defaultValue: null, COMMENT: '邮寄电话' },
mail_to: { type: DataTypes.STRING(20), allowNull: true, defaultValue: null, COMMENT: '邮寄人' }, mail_to: { type: DataTypes.STRING(20), allowNull: true, defaultValue: null, COMMENT: '邮寄人' },
...@@ -50,7 +50,7 @@ module.exports = (db, DataTypes) => { ...@@ -50,7 +50,7 @@ module.exports = (db, DataTypes) => {
created_at: { type: DataTypes.DATE, allowNull: true }, created_at: { type: DataTypes.DATE, allowNull: true },
updated_at: { type: DataTypes.DATE, allowNull: true }, updated_at: { type: DataTypes.DATE, allowNull: true },
deleted_at: { type: DataTypes.DATE, allowNull: true }, deleted_at: { type: DataTypes.DATE, allowNull: true },
version: { type: DataTypes.INT(11), allowNull: true, defaultValue: 0 } version: { type: DataTypes.INTEGER, allowNull: true, defaultValue: 0 }
}, { }, {
timestamps: true, timestamps: true,
paranoid: true, paranoid: true,
......
...@@ -5,7 +5,7 @@ const uiconfig = system.getUiConfig2(settings.appKey); ...@@ -5,7 +5,7 @@ const uiconfig = system.getUiConfig2(settings.appKey);
module.exports = (db, DataTypes) => { module.exports = (db, DataTypes) => {
return db.define("iinvoicedeliver", { return db.define("iinvoicedeliver", {
id: { type: DataTypes.STRING(32), field: 'id', allowNull: true }, // id: { type: DataTypes.STRING(32), field: 'id', allowNull: true },
invoice_id: { type: DataTypes.STRING, field: 'invoice_id', allowNull: true, comment: '发票id' }, invoice_id: { type: DataTypes.STRING, field: 'invoice_id', allowNull: true, comment: '发票id' },
deliver_id: { type: DataTypes.STRING, field: 'deliver_id', allowNull: true, comment: '交付商id' }, deliver_id: { type: DataTypes.STRING, field: 'deliver_id', allowNull: true, comment: '交付商id' },
deliver_name: { type: DataTypes.STRING, field: 'deliver_name', allowNull: true, comment: '交付商id' }, deliver_name: { type: DataTypes.STRING, field: 'deliver_name', allowNull: true, comment: '交付商id' },
...@@ -21,7 +21,7 @@ module.exports = (db, DataTypes) => { ...@@ -21,7 +21,7 @@ module.exports = (db, DataTypes) => {
createdAt: { type: DataTypes.DATE, field: 'created_at', allowNull: false, defaultValue: DataTypes.NOW, comment: '发票创建时间' }, createdAt: { type: DataTypes.DATE, field: 'created_at', allowNull: false, defaultValue: DataTypes.NOW, comment: '发票创建时间' },
updatedAt: { type: DataTypes.DATE, field: 'updated_at', allowNull: false, defaultValue: DataTypes.NOW, comment: '更新时间' }, updatedAt: { type: DataTypes.DATE, field: 'updated_at', allowNull: false, defaultValue: DataTypes.NOW, comment: '更新时间' },
deletedAt: { type: DataTypes.DATE, field: 'deleted_at', allowNull: true, comment: '删除时间' }, deletedAt: { type: DataTypes.DATE, field: 'deleted_at', allowNull: true, comment: '删除时间' },
version: { type: DataTypes.INT(11), allowNull: true, defaultValue: 0 } version: { type: DataTypes.INTEGER, allowNull: true, defaultValue: 0 }
}, { }, {
timestamps: true, timestamps: true,
paranoid: true, paranoid: true,
......
...@@ -24,9 +24,7 @@ class InvoiceService extends ServiceBase { ...@@ -24,9 +24,7 @@ class InvoiceService extends ServiceBase {
* @returns {Promise<void>} * @returns {Promise<void>}
*/ */
async buildOrderProcess(productPid) { async buildOrderProcess(productPid) {
// 查询所有产品子项 let productPid = productPid || 50010000;
let productList = await this.oproductDao.findListByPid(productPid);
// 查询产品流程 // 查询产品流程
let productProcessList = await this.oproductprocessDao.byProductPid(productPid); let productProcessList = await this.oproductprocessDao.byProductPid(productPid);
if (!productProcessList || productProcessList.length == 0) { if (!productProcessList || productProcessList.length == 0) {
......
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