|
|
@ -5,7 +5,7 @@ |
|
|
|
module.exports = dc => { |
|
|
|
const DataTypes = dc.ORM; |
|
|
|
const sequelize = dc.orm; |
|
|
|
const BackDetile = sequelize.define("backDetile", { |
|
|
|
const ReceivableDetail = sequelize.define("receivableDetail", { |
|
|
|
id: { |
|
|
|
type: DataTypes.INTEGER, |
|
|
|
allowNull: false, |
|
|
@ -17,52 +17,52 @@ module.exports = dc => { |
|
|
|
}, |
|
|
|
year: { |
|
|
|
type: DataTypes.STRING, |
|
|
|
allowNull: true, |
|
|
|
allowNull: false, |
|
|
|
defaultValue: null, |
|
|
|
comment: "年度", |
|
|
|
comment: "年度:【申请日期】-年份", |
|
|
|
primaryKey: false, |
|
|
|
field: "year", |
|
|
|
autoIncrement: false |
|
|
|
}, |
|
|
|
serialNo: { |
|
|
|
type: DataTypes.INTEGER, |
|
|
|
allowNull: true, |
|
|
|
allowNull: false, |
|
|
|
defaultValue: null, |
|
|
|
comment: "序号", |
|
|
|
comment: "序号:自动生成\n(自动升序),每一年自动从1开始", |
|
|
|
primaryKey: false, |
|
|
|
field: "serial_no", |
|
|
|
autoIncrement: false |
|
|
|
}, |
|
|
|
number: { |
|
|
|
type: DataTypes.STRING, |
|
|
|
allowNull: true, |
|
|
|
allowNull: false, |
|
|
|
defaultValue: null, |
|
|
|
comment: "编号", |
|
|
|
comment: "编号:年份+序号 如2022年1", |
|
|
|
primaryKey: false, |
|
|
|
field: "number", |
|
|
|
autoIncrement: false |
|
|
|
}, |
|
|
|
department: { |
|
|
|
type: DataTypes.STRING, |
|
|
|
allowNull: true, |
|
|
|
allowNull: false, |
|
|
|
defaultValue: null, |
|
|
|
comment: "部门", |
|
|
|
comment: "部门:申请部门", |
|
|
|
primaryKey: false, |
|
|
|
field: "department", |
|
|
|
autoIncrement: false |
|
|
|
}, |
|
|
|
sale: { |
|
|
|
type: DataTypes.STRING, |
|
|
|
allowNull: true, |
|
|
|
allowNull: false, |
|
|
|
defaultValue: null, |
|
|
|
comment: "销售人员", |
|
|
|
comment: "销售人员:申请人", |
|
|
|
primaryKey: false, |
|
|
|
field: "sale", |
|
|
|
autoIncrement: false |
|
|
|
}, |
|
|
|
contractNo: { |
|
|
|
type: DataTypes.STRING, |
|
|
|
allowNull: true, |
|
|
|
allowNull: false, |
|
|
|
defaultValue: null, |
|
|
|
comment: "合同编号", |
|
|
|
primaryKey: false, |
|
|
@ -71,16 +71,16 @@ module.exports = dc => { |
|
|
|
}, |
|
|
|
customer: { |
|
|
|
type: DataTypes.STRING, |
|
|
|
allowNull: true, |
|
|
|
allowNull: false, |
|
|
|
defaultValue: null, |
|
|
|
comment: "客户名称", |
|
|
|
comment: "客户名称:【甲方名称】", |
|
|
|
primaryKey: false, |
|
|
|
field: "customer", |
|
|
|
autoIncrement: false |
|
|
|
}, |
|
|
|
item: { |
|
|
|
type: DataTypes.STRING, |
|
|
|
allowNull: true, |
|
|
|
allowNull: false, |
|
|
|
defaultValue: null, |
|
|
|
comment: "项目名称", |
|
|
|
primaryKey: false, |
|
|
@ -89,99 +89,99 @@ module.exports = dc => { |
|
|
|
}, |
|
|
|
amount: { |
|
|
|
type: DataTypes.STRING, |
|
|
|
allowNull: true, |
|
|
|
allowNull: false, |
|
|
|
defaultValue: null, |
|
|
|
comment: "合同金额", |
|
|
|
comment: "合同金额:【合同金额\n(元)】", |
|
|
|
primaryKey: false, |
|
|
|
field: "amount", |
|
|
|
autoIncrement: false |
|
|
|
}, |
|
|
|
changeAmount: { |
|
|
|
type: DataTypes.STRING, |
|
|
|
allowNull: true, |
|
|
|
allowNull: false, |
|
|
|
defaultValue: null, |
|
|
|
comment: "变更后合同金额", |
|
|
|
primaryKey: false, |
|
|
|
field: "change_amount", |
|
|
|
autoIncrement: false |
|
|
|
}, |
|
|
|
backYear: { |
|
|
|
receivableYear: { |
|
|
|
type: DataTypes.STRING, |
|
|
|
allowNull: true, |
|
|
|
allowNull: false, |
|
|
|
defaultValue: null, |
|
|
|
comment: "回款年份", |
|
|
|
primaryKey: false, |
|
|
|
field: "back_year", |
|
|
|
field: "receivable_year", |
|
|
|
autoIncrement: false |
|
|
|
}, |
|
|
|
backDate: { |
|
|
|
receivableDate: { |
|
|
|
type: DataTypes.DATEONLY, |
|
|
|
allowNull: true, |
|
|
|
allowNull: false, |
|
|
|
defaultValue: null, |
|
|
|
comment: "回款日期", |
|
|
|
primaryKey: false, |
|
|
|
field: "back_date", |
|
|
|
field: "receivable_date", |
|
|
|
autoIncrement: false |
|
|
|
}, |
|
|
|
backAmount: { |
|
|
|
receivableAmount: { |
|
|
|
type: DataTypes.STRING, |
|
|
|
allowNull: true, |
|
|
|
allowNull: false, |
|
|
|
defaultValue: null, |
|
|
|
comment: "回款金额", |
|
|
|
primaryKey: false, |
|
|
|
field: "back_amount", |
|
|
|
field: "receivable_amount", |
|
|
|
autoIncrement: false |
|
|
|
}, |
|
|
|
inBack: { |
|
|
|
invoicedBack: { |
|
|
|
type: DataTypes.STRING, |
|
|
|
allowNull: true, |
|
|
|
allowNull: false, |
|
|
|
defaultValue: null, |
|
|
|
comment: "开票-回款", |
|
|
|
primaryKey: false, |
|
|
|
field: "in_back", |
|
|
|
field: "invoiced_back ", |
|
|
|
autoIncrement: false |
|
|
|
}, |
|
|
|
remainConAmount: { |
|
|
|
type: DataTypes.STRING, |
|
|
|
allowNull: true, |
|
|
|
allowNull: false, |
|
|
|
defaultValue: null, |
|
|
|
comment: "剩余合同金额", |
|
|
|
primaryKey: false, |
|
|
|
field: "remain_con_amount", |
|
|
|
autoIncrement: false |
|
|
|
}, |
|
|
|
backConfirmDate: { |
|
|
|
incomeConfirmdate: { |
|
|
|
type: DataTypes.DATEONLY, |
|
|
|
allowNull: true, |
|
|
|
allowNull: false, |
|
|
|
defaultValue: null, |
|
|
|
comment: "收入确认时间", |
|
|
|
primaryKey: false, |
|
|
|
field: "back_confirm_date", |
|
|
|
field: "income_confirmdate", |
|
|
|
autoIncrement: false |
|
|
|
}, |
|
|
|
payCompany: { |
|
|
|
thirdPayment: { |
|
|
|
type: DataTypes.STRING, |
|
|
|
allowNull: true, |
|
|
|
defaultValue: null, |
|
|
|
comment: "第三方付款单位", |
|
|
|
primaryKey: false, |
|
|
|
field: "pay_company", |
|
|
|
field: "third_payment", |
|
|
|
autoIncrement: false |
|
|
|
}, |
|
|
|
text: { |
|
|
|
remark: { |
|
|
|
type: DataTypes.STRING, |
|
|
|
allowNull: true, |
|
|
|
defaultValue: null, |
|
|
|
comment: "备注", |
|
|
|
comment: "备注:回款流程》-备注", |
|
|
|
primaryKey: false, |
|
|
|
field: "text", |
|
|
|
field: "remark", |
|
|
|
autoIncrement: false |
|
|
|
} |
|
|
|
}, { |
|
|
|
tableName: "back_detile", |
|
|
|
tableName: "receivable_detail", |
|
|
|
comment: "", |
|
|
|
indexes: [] |
|
|
|
}); |
|
|
|
dc.models.BackDetile = BackDetile; |
|
|
|
return BackDetile; |
|
|
|
dc.models.ReceivableDetail = ReceivableDetail; |
|
|
|
return ReceivableDetail; |
|
|
|
}; |