Browse Source

(*)合同明细表字段调整

master
zmh 2 years ago
parent
commit
c2de45a493
  1. 2
      api/app/lib/controllers/report/achievement.js
  2. 35
      api/app/lib/models/contract_detail.js

2
api/app/lib/controllers/report/achievement.js

@ -346,6 +346,7 @@ async function getContractDetail(ctx) {
where[keywordTarget] = { $iLike: `%${keyword}%` };
}
let contractDetail = await models.ContractDetail.findAndCountAll({
attributes: { exclude: ['iscopy', 'hiredate', 'regularDate'] },
where: where,
offset: Number(page) * Number(limit),
limit: Number(limit),
@ -394,6 +395,7 @@ async function exportContractDetail(ctx) {
try {
const { models } = ctx.fs.dc;
let exportData = await models.ContractDetail.findAll({
attributes: { exclude: ['iscopy', 'hiredate', 'regularDate'] },
order: [['id', 'ASC']]
});
const { utils: { simpleExcelDown, contractDetailsColumnKeys } } = ctx.app.fs;

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

@ -16,12 +16,12 @@ module.exports = dc => {
autoIncrement: true
},
year: {
type: DataTypes.STRING,
type: DataTypes.INTEGER,
allowNull: false,
defaultValue: null,
comment: "年度",
primaryKey: false,
field: "year ",
field: "year",
autoIncrement: false
},
serialNo: {
@ -402,13 +402,13 @@ module.exports = dc => {
field: "cus_province",
autoIncrement: false
},
cusArea: {
itemArea: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "项目所在地",
primaryKey: false,
field: "cus_area",
field: "item_area",
autoIncrement: false
},
text: {
@ -419,6 +419,33 @@ module.exports = dc => {
primaryKey: false,
field: "text",
autoIncrement: false
},
iscopy: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "是否可复制的业务路径",
primaryKey: false,
field: "iscopy",
autoIncrement: false
},
hiredate: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "入职时间",
primaryKey: false,
field: "hiredate",
autoIncrement: false
},
regularDate: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "转正时间",
primaryKey: false,
field: "regular_date",
autoIncrement: false
}
}, {
tableName: "contract_detail",

Loading…
Cancel
Save