From 610ecee267a56bcc5919fe753a310183fdb305be Mon Sep 17 00:00:00 2001 From: wuqun Date: Mon, 5 Dec 2022 15:59:43 +0800 Subject: [PATCH] =?UTF-8?q?(*)=E4=B8=9A=E7=BB=A9=E6=98=8E=E7=BB=86?= =?UTF-8?q?=E8=A1=A8=20=E5=AD=97=E6=AE=B5=E7=B1=BB=E5=9E=8B=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/app/lib/controllers/report/achievement.js | 4 ++-- api/app/lib/models/performance_detail.js | 4 ++-- .../containers/performanceReport/achievementDetails.jsx | 3 +-- 3 files changed, 5 insertions(+), 6 deletions(-) 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; }