Browse Source

(*)业绩明细表 字段类型修改

master
wuqun 2 years ago
parent
commit
610ecee267
  1. 4
      api/app/lib/controllers/report/achievement.js
  2. 4
      api/app/lib/models/performance_detail.js
  3. 3
      web/client/src/sections/business/containers/performanceReport/achievementDetails.jsx

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

@ -237,8 +237,8 @@ async function exportAchievementDetail(ctx, dataList) {
const { utils: { simpleExcelDown } } = ctx.app.fs; const { utils: { simpleExcelDown } } = ctx.app.fs;
let exportData = [] let exportData = []
for (let { dataValues: item } of dataList) { for (let { dataValues: item } of dataList) {
item.isApproval = JSON.stringify(item.isApproval) === 'null' ? '-' : item.isApproval ? '是' : '否'; //item.isApproval = JSON.stringify(item.isApproval) === 'null' ? '-' : item.isApproval ? '是' : '否';
item.reproducible = JSON.stringify(item.reproducible) === 'null' ? '-' : item.reproducible ? '是' : '否'; //item.reproducible = JSON.stringify(item.reproducible) === 'null' ? '-' : item.reproducible ? '是' : '否';
exportData.push(item) exportData.push(item)
} }
const fileName = `业绩明细表_${moment().format('YYYYMMDDHHmmss')}` + '.xlsx' const fileName = `业绩明细表_${moment().format('YYYYMMDDHHmmss')}` + '.xlsx'

4
api/app/lib/models/performance_detail.js

@ -97,7 +97,7 @@ module.exports = dc => {
autoIncrement: false autoIncrement: false
}, },
isApproval: { isApproval: {
type: DataTypes.BOOLEAN, type: DataTypes.STRING,
allowNull: true, allowNull: true,
defaultValue: null, defaultValue: null,
comment: "价格是否特批:根据折算比例-《合同明细表》推\n算(100%——“是”;其他为否)", comment: "价格是否特批:根据折算比例-《合同明细表》推\n算(100%——“是”;其他为否)",
@ -196,7 +196,7 @@ module.exports = dc => {
autoIncrement: false autoIncrement: false
}, },
reproducible: { reproducible: {
type: DataTypes.BOOLEAN, type: DataTypes.STRING,
allowNull: true, allowNull: true,
defaultValue: null, defaultValue: null,
comment: "是否可复制的业务路径:《合同评审》表单获取", comment: "是否可复制的业务路径:《合同评审》表单获取",

3
web/client/src/sections/business/containers/performanceReport/achievementDetails.jsx

@ -47,8 +47,7 @@ const AchievementDetails = (props) => {
default: default:
columns.push({ columns.push({
title: columnKeys[key], dataIndex: key, key: key, width: 120, title: columnKeys[key], dataIndex: key, key: key, width: 120,
render: (text, record) => ['isApproval', 'reproducible'].indexOf(key) != -1 ? JSON.stringify(text) === 'null' ? '-' : text ? '是' : '否' render: (text, record) => text === 0 ? text : text ? text : '-'
: text === 0 ? text : text ? text : '-'
}); });
break; break;
} }

Loading…
Cancel
Save