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;
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'

4
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: "是否可复制的业务路径:《合同评审》表单获取",

3
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;
}

Loading…
Cancel
Save