Browse Source

合同明细、开票明细表模型更改

master
zmh 2 years ago
parent
commit
7b866bd2c5
  1. 2
      .vscode/launch.json
  2. 6
      api/app/lib/models/contract_detail.js
  3. 28
      api/app/lib/models/invoice_detail.js

2
.vscode/launch.json

@ -45,7 +45,7 @@
"-g postgres://FashionAdmin:123456@10.8.30.36:5432/data_center", "-g postgres://FashionAdmin:123456@10.8.30.36:5432/data_center",
"--redisHost localhost", "--redisHost localhost",
"--redisPort 6379", "--redisPort 6379",
"--apiEmisUrl http://10.8.30.103:14000", // "--apiEmisUrl http://localhost:14000", //
// "--apiEmisUrl http://10.8.30.161:1111", // // "--apiEmisUrl http://10.8.30.161:1111", //
// //
// //

6
api/app/lib/models/contract_detail.js

@ -17,7 +17,7 @@ module.exports = dc => {
}, },
year: { year: {
type: DataTypes.STRING, type: DataTypes.STRING,
allowNull: true, allowNull: false,
defaultValue: null, defaultValue: null,
comment: "年度", comment: "年度",
primaryKey: false, primaryKey: false,
@ -26,7 +26,7 @@ module.exports = dc => {
}, },
serialNo: { serialNo: {
type: DataTypes.INTEGER, type: DataTypes.INTEGER,
allowNull: true, allowNull: false,
defaultValue: null, defaultValue: null,
comment: "序号", comment: "序号",
primaryKey: false, primaryKey: false,
@ -35,7 +35,7 @@ module.exports = dc => {
}, },
number: { number: {
type: DataTypes.STRING, type: DataTypes.STRING,
allowNull: true, allowNull: false,
defaultValue: null, defaultValue: null,
comment: "编号", comment: "编号",
primaryKey: false, primaryKey: false,

28
api/app/lib/models/invoice_detail.js

@ -13,7 +13,7 @@ module.exports = dc => {
comment: null, comment: null,
primaryKey: true, primaryKey: true,
field: "id", field: "id",
autoIncrement: false autoIncrement: true
}, },
year: { year: {
type: DataTypes.STRING, type: DataTypes.STRING,
@ -44,7 +44,7 @@ module.exports = dc => {
}, },
department: { department: {
type: DataTypes.STRING, type: DataTypes.STRING,
allowNull: false, allowNull: true,
defaultValue: null, defaultValue: null,
comment: "部门:申请部门", comment: "部门:申请部门",
primaryKey: false, primaryKey: false,
@ -53,7 +53,7 @@ module.exports = dc => {
}, },
sale: { sale: {
type: DataTypes.STRING, type: DataTypes.STRING,
allowNull: false, allowNull: true,
defaultValue: null, defaultValue: null,
comment: "销售人员:申请人", comment: "销售人员:申请人",
primaryKey: false, primaryKey: false,
@ -62,7 +62,7 @@ module.exports = dc => {
}, },
contractNo: { contractNo: {
type: DataTypes.STRING, type: DataTypes.STRING,
allowNull: false, allowNull: true,
defaultValue: null, defaultValue: null,
comment: "合同编号", comment: "合同编号",
primaryKey: false, primaryKey: false,
@ -71,7 +71,7 @@ module.exports = dc => {
}, },
customer: { customer: {
type: DataTypes.STRING, type: DataTypes.STRING,
allowNull: false, allowNull: true,
defaultValue: null, defaultValue: null,
comment: "客户名称:【甲方名称】", comment: "客户名称:【甲方名称】",
primaryKey: false, primaryKey: false,
@ -80,7 +80,7 @@ module.exports = dc => {
}, },
item: { item: {
type: DataTypes.STRING, type: DataTypes.STRING,
allowNull: false, allowNull: true,
defaultValue: null, defaultValue: null,
comment: "项目名称", comment: "项目名称",
primaryKey: false, primaryKey: false,
@ -89,7 +89,7 @@ module.exports = dc => {
}, },
amount: { amount: {
type: DataTypes.STRING, type: DataTypes.STRING,
allowNull: false, allowNull: true,
defaultValue: null, defaultValue: null,
comment: "合同金额:【合同金额\n(元)】", comment: "合同金额:【合同金额\n(元)】",
primaryKey: false, primaryKey: false,
@ -98,7 +98,7 @@ module.exports = dc => {
}, },
changeAmount: { changeAmount: {
type: DataTypes.STRING, type: DataTypes.STRING,
allowNull: false, allowNull: true,
defaultValue: null, defaultValue: null,
comment: "变更后合同金额", comment: "变更后合同金额",
primaryKey: false, primaryKey: false,
@ -107,7 +107,7 @@ module.exports = dc => {
}, },
invoiceNo: { invoiceNo: {
type: DataTypes.STRING, type: DataTypes.STRING,
allowNull: false, allowNull: true,
defaultValue: null, defaultValue: null,
comment: "发票号码:《发票申请单》【发票号】一个发票号码一个行数据", comment: "发票号码:《发票申请单》【发票号】一个发票号码一个行数据",
primaryKey: false, primaryKey: false,
@ -116,7 +116,7 @@ module.exports = dc => {
}, },
invoiceType: { invoiceType: {
type: DataTypes.STRING, type: DataTypes.STRING,
allowNull: false, allowNull: true,
defaultValue: null, defaultValue: null,
comment: "开票类型:《发票申请单》\n【发票类型】", comment: "开票类型:《发票申请单》\n【发票类型】",
primaryKey: false, primaryKey: false,
@ -125,7 +125,7 @@ module.exports = dc => {
}, },
invoiceDate: { invoiceDate: {
type: DataTypes.DATEONLY, type: DataTypes.DATEONLY,
allowNull: false, allowNull: true,
defaultValue: null, defaultValue: null,
comment: "开票日期:《发票申请单》\n【开票日期】", comment: "开票日期:《发票申请单》\n【开票日期】",
primaryKey: false, primaryKey: false,
@ -134,7 +134,7 @@ module.exports = dc => {
}, },
invoiceAmount: { invoiceAmount: {
type: DataTypes.STRING, type: DataTypes.STRING,
allowNull: false, allowNull: true,
defaultValue: null, defaultValue: null,
comment: "开票金额:《发票申请单》【发票金额】取财务填写数据", comment: "开票金额:《发票申请单》【发票金额】取财务填写数据",
primaryKey: false, primaryKey: false,
@ -143,7 +143,7 @@ module.exports = dc => {
}, },
outputTax: { outputTax: {
type: DataTypes.STRING, type: DataTypes.STRING,
allowNull: false, allowNull: true,
defaultValue: null, defaultValue: null,
comment: "销项税额:《发票申请单》-销项税额", comment: "销项税额:《发票申请单》-销项税额",
primaryKey: false, primaryKey: false,
@ -152,7 +152,7 @@ module.exports = dc => {
}, },
total: { total: {
type: DataTypes.STRING, type: DataTypes.STRING,
allowNull: false, allowNull: true,
defaultValue: null, defaultValue: null,
comment: "合计:自动算出\n(开票金额+销项税额)", comment: "合计:自动算出\n(开票金额+销项税额)",
primaryKey: false, primaryKey: false,

Loading…
Cancel
Save