diff --git a/api/app/lib/controllers/report/achievement.js b/api/app/lib/controllers/report/achievement.js index ac5e40e..b36ad3f 100644 --- a/api/app/lib/controllers/report/achievement.js +++ b/api/app/lib/controllers/report/achievement.js @@ -237,8 +237,8 @@ async function exportAchievementDetail(ctx, dataList) { const { utils: { simpleExcelDown } } = ctx.app.fs; let exportData = [] for (let { dataValues: item } of dataList) { - item.isApproval = JSON.stringify(item.isApproval) === 'null' ? '-' : item.isApproval ? '是' : '否'; - item.reproducible = JSON.stringify(item.reproducible) === 'null' ? '-' : item.reproducible ? '是' : '否'; + //item.isApproval = JSON.stringify(item.isApproval) === 'null' ? '-' : item.isApproval ? '是' : '否'; + //item.reproducible = JSON.stringify(item.reproducible) === 'null' ? '-' : item.reproducible ? '是' : '否'; exportData.push(item) } const fileName = `业绩明细表_${moment().format('YYYYMMDDHHmmss')}` + '.xlsx' diff --git a/api/app/lib/models/performance_detail.js b/api/app/lib/models/performance_detail.js index 39bc1d7..5382ab2 100644 --- a/api/app/lib/models/performance_detail.js +++ b/api/app/lib/models/performance_detail.js @@ -97,7 +97,7 @@ module.exports = dc => { autoIncrement: false }, isApproval: { - type: DataTypes.BOOLEAN, + type: DataTypes.STRING, allowNull: true, defaultValue: null, comment: "价格是否特批:根据折算比例-《合同明细表》推\n算(100%——“是”;其他为否)", @@ -196,7 +196,7 @@ module.exports = dc => { autoIncrement: false }, reproducible: { - type: DataTypes.BOOLEAN, + type: DataTypes.STRING, allowNull: true, defaultValue: null, comment: "是否可复制的业务路径:《合同评审》表单获取", diff --git a/web/client/src/sections/business/containers/performanceReport/achievementDetails.jsx b/web/client/src/sections/business/containers/performanceReport/achievementDetails.jsx index 3fa9b7a..0355cb8 100644 --- a/web/client/src/sections/business/containers/performanceReport/achievementDetails.jsx +++ b/web/client/src/sections/business/containers/performanceReport/achievementDetails.jsx @@ -47,8 +47,7 @@ const AchievementDetails = (props) => { default: columns.push({ title: columnKeys[key], dataIndex: key, key: key, width: 120, - render: (text, record) => ['isApproval', 'reproducible'].indexOf(key) != -1 ? JSON.stringify(text) === 'null' ? '-' : text ? '是' : '否' - : text === 0 ? text : text ? text : '-' + render: (text, record) => text === 0 ? text : text ? text : '-' }); break; }