style: KPI设置的宽度; 销售进度的颜色

feature/bak/sales-kpi
Lei OT 2 years ago
parent a861653ee4
commit 437fc8c016

@ -83,12 +83,14 @@ export default observer((props) => {
title: curObjectItem.label,
dataIndex: 'object_id',
editable: false,
width: '5em',
render: (_, r) => r.object_name,
},
{
title: '年度目标',
dataIndex: 'yearValue',
valueType: 'digit',
width: '6em',
fieldProps: { style: { width: '100%' }, step: 10000 * 1 },
formItemProps: {
style: { width: '100%' },
@ -112,7 +114,7 @@ export default observer((props) => {
</Space>
),
valueType: 'option',
// width: 250,
width: '5em',
render: () => {
return null;
},

@ -82,6 +82,7 @@ export default observer((props) => {
title: curObjectItem.label,
dataIndex: 'object_id',
editable: false,
width: '5em',
render: (_, r) => r.object_name,
},
{
@ -89,6 +90,7 @@ export default observer((props) => {
dataIndex: 'yearValue',
valueType: 'digit',
fieldProps: { style: { width: '100%' }, step: 10000 * 100 },
width: '6em',
formItemProps: {
style: { width: '100%' },
},
@ -111,7 +113,7 @@ export default observer((props) => {
</Space>
),
valueType: 'option',
// width: 250,
width: '5em',
render: () => {
return null;
},

@ -77,12 +77,14 @@ export default observer((props) => {
title: curObjectItem.label,
dataIndex: 'object_id',
editable: false,
width: '5em',
render: (_, r) => r.object_name,
},
{
title: '年度目标',
dataIndex: 'yearValue',
valueType: 'percent',
width: '6em',
formItemProps: {
style: { width: '100%' },
},
@ -106,7 +108,7 @@ export default observer((props) => {
</Space>
),
valueType: 'option',
// width: 250,
width: '5em',
render: () => {
return null;
},

@ -158,7 +158,7 @@ export const KPIObjects = [
export const KPISubjects = [
{ key: 'sum_profit', value: 'sum_profit', label: '毛利' },
{ key: 'in_order_count', value: 'in_order_count', label: '订单数' },
{ key: 'confirm_order_count', value: 'confirm_order_count', label: '成团' },
{ key: 'confirm_order_count', value: 'confirm_order_count', label: '成团' },
// { key: 'depart_order_count', value: 'depart_order_count', label: '走团' }, // 根据日期类型
{ key: 'confirm_rates', value: 'confirm_rates', label: '成行率' },
// { key: 'praise_rates', value: 'praise_rates', label: '表扬率' },

@ -45,6 +45,13 @@ const Sale_KPI = () => {
percent={row.mData[`month_${String(index + 1).padStart(2, '0')}`]?.MLKPIrates || 0}
size="small"
format={(percent) => `${row.mData[`month_${String(index + 1).padStart(2, '0')}`]?.MLKPIrates || 0}%`}
status={
row.mData[`month_${String(index + 1).padStart(2, '0')}`].MLKPIrates < 80
? 'exception'
: row.mData[`month_${String(index + 1).padStart(2, '0')}`].MLKPIrates < 100
? 'normal'
: 'success'
}
/>
) : (
'-'
@ -76,7 +83,16 @@ const Sale_KPI = () => {
<span style={{ marginRight: '.5em' }}>完成</span>
{dataFieldAlias.SumML.formatter(row.yData?.SumML || 0)}
</div>
{row.yData?.MLKPIrates || 0 ? <Progress percent={row.yData?.MLKPIrates || 0} size="small" format={(percent) => `${row.yData?.MLKPIrates || 0}%`} /> : '-'}
{row.yData?.MLKPIrates || 0 ? (
<Progress
percent={row.yData?.MLKPIrates || 0}
size={'small'}
format={(percent) => `${row.yData?.MLKPIrates || 0}%`}
status={row.yData.MLKPIrates < 80 ? 'exception' : row.yData.MLKPIrates < 100 ? 'normal' : 'success'}
/>
) : (
'-'
)}
</Space>
),
},

@ -15,3 +15,6 @@
padding-left: 4px;
padding-right: 4px;
}
.ant-tabs-left > .ant-tabs-nav .ant-tabs-tab{
padding: 8px;
}

Loading…
Cancel
Save