feature/2.9.42309.01-薪酬统计报表分享报表

This commit is contained in:
黎永顺 2023-09-21 10:17:06 +08:00
parent d664ad2769
commit 96032b5f1c
5 changed files with 40 additions and 27 deletions

View File

@ -269,7 +269,7 @@ class CustomStatisticsItemsModal extends Component {
render() {
const { loading, columns, dataSource, formData } = this.state;
const { itemName, itemValue, itemValueSpan } = formData;
const { statisticsItemId } = this.props;
const { statisticsItemId, isShare } = this.props;
const cols = _.map(columns, it => {
const { text, column } = it;
if (column === "ruleName" || column === "ratio" || column === "m2m" || column === "y2y") {
@ -278,6 +278,7 @@ class CustomStatisticsItemsModal extends Component {
...it,
title: <span>
<WeaCheckbox
disabled={isShare}
value={_.every(dataSource, child => !!child[`${key}Value`])}
onChange={val => this.handleChangeColumnAllChecked(`${key}Value`, val)}
/>
@ -286,6 +287,7 @@ class CustomStatisticsItemsModal extends Component {
render: (txt, record) => {
return <span>
<WeaCheckbox
disabled={isShare}
value={record[`${key}Value`].toString()}
onChange={val => this.handleChangeColumnCheckBox(`${key}Value`, val, record.id)}
/>
@ -305,6 +307,7 @@ class CustomStatisticsItemsModal extends Component {
</span>,
render: (txt, record) => {
return !!record["m2mValue"] && <IntervalSettingsComp
isShare={isShare}
LowerLimit={record[`${column.replace("Limit", "")}LowerLimit`]}
UpperLimit={record[`${column.replace("Limit", "")}UpperLimit`]}
onChange={(type, val) => this.handleChangeColumnM2MValue(`${column.replace("Limit", "")}${type === "min" ? "LowerLimit" : "UpperLimit"}`, val, record.id)}
@ -321,6 +324,7 @@ class CustomStatisticsItemsModal extends Component {
</span>,
render: (txt, record) => {
return !!record["y2yValue"] && <IntervalSettingsComp
isShare={isShare}
LowerLimit={record[`${column.replace("Limit", "")}LowerLimit`]}
UpperLimit={record[`${column.replace("Limit", "")}UpperLimit`]}
onChange={(type, val) => this.handleChangeColumnM2MValue(`${column.replace("Limit", "")}${type === "min" ? "LowerLimit" : "UpperLimit"}`, val, record.id)}
@ -335,8 +339,10 @@ class CustomStatisticsItemsModal extends Component {
title={
<div className="itemsTitle">
<span>{statisticsItemId ? getLabel(111, "编辑自定义统计项目") : getLabel(111, "新建自定义统计项目")}</span>
<Button type="primary" loading={loading}
onClick={this.handleSaveStatisticalItems}>{getLabel(111, "保存")}</Button>
{
!isShare && <Button type="primary" loading={loading}
onClick={this.handleSaveStatisticalItems}>{getLabel(111, "保存")}</Button>
}
</div>
}
style={{ width: 900, height: 450 }}
@ -348,7 +354,7 @@ class CustomStatisticsItemsModal extends Component {
<WeaBrowser
title={getLabel(111, "统计项目")}
type={162}
viewAttr={3}
viewAttr={!isShare ? 3 : 1}
isSingle={false}
value={itemValue}
replaceDatas={itemValue ? _.map(itemValue.split(","), (it, idx) => ({
@ -381,7 +387,7 @@ class CustomStatisticsItemsModal extends Component {
</WeaFormItem>
<WeaFormItem label={getLabel(111, "统计项名称")} labelCol={{ span: 6 }} wrapperCol={{ span: 18 }}>
<WeaError tipPosition="bottom" ref="nameError" error={getLabel(111, "此项必填")}>
<WeaInput value={itemName} viewAttr={3}
<WeaInput value={itemName} viewAttr={!isShare ? 3 : 1}
onChange={itemName => this.setState({ formData: { ...formData, itemName } })}/>
</WeaError>
</WeaFormItem>
@ -406,11 +412,11 @@ export default CustomStatisticsItemsModal;
* Date: 2023/4/23
*/
const IntervalSettingsComp = (props) => {
const { LowerLimit, UpperLimit, onChange } = props;
const { LowerLimit, UpperLimit, onChange, isShare } = props;
return <div className="intervalSettingsCompWrapper">
<WeaInputNumber value={LowerLimit} precision={2} onChange={val => onChange("min", val)}/>
<WeaInputNumber value={LowerLimit} precision={2} onChange={val => onChange("min", val)} disabled={isShare}/>
<span className="increaseTitle">{`% <${getLabel(111, "增幅")}<`}</span>
<WeaInputNumber value={UpperLimit} precision={2} onChange={val => onChange("max", val)}/>
<WeaInputNumber value={UpperLimit} precision={2} onChange={val => onChange("max", val)} disabled={isShare}/>
<span className="pecentTitle">%</span>
</div>;
};

View File

@ -35,8 +35,8 @@ class PovitpivotChartModal extends Component {
componentWillReceiveProps(nextProps, nextContext) {
if (nextProps.visible !== this.props.visible && nextProps.visible) {
const { id, dimensionId, dimensionValue } = nextProps;
this.getDataPerspective({ id, dimensionId, dimensionValue });
const { id, dimensionId, dimensionValue, isShare } = nextProps;
this.getDataPerspective({ id, dimensionId, dimensionValue, isShare });
} else {
this.setState({
dataSource: [],
@ -63,13 +63,11 @@ class PovitpivotChartModal extends Component {
});
} else if (type === "turn") {
if (id === "PAGEINFO") {
const { id, dimensionId, dimensionValue } = this.props;
const { id, dimensionId, dimensionValue, isShare } = this.props;
const { pageNum: current, size: pageSize } = params;
this.setState({ pageInfo: { ...pageInfo, current, pageSize } }, () =>
this.getDataPerspective({
id,
dimensionId,
dimensionValue
id, dimensionId, dimensionValue, isShare
}));
}
}

View File

@ -26,7 +26,7 @@ class ReportContent extends Component {
chartsType: "0",
chartsInfo: {},
povitView: {
visible: false, id: "",
visible: false, id: "", isShare: false,
dimensionId: "", dimensionValue: ""
},
rangSet: {
@ -66,10 +66,9 @@ class ReportContent extends Component {
const { record } = params;
const { dimension: dimensionValue } = record;
const { id: pivotId, dimensionId, isShare } = this.props.report;
if (isShare) return;
this.setState({
povitView: {
visible: true, id: pivotId, dimensionId, dimensionValue
visible: true, id: pivotId, dimensionId, dimensionValue, isShare
}
});
}
@ -262,7 +261,8 @@ class ReportContent extends Component {
{...povitView}
onCancel={() => this.setState({
povitView: {
visible: false, id: "", dimensionId: "", dimensionValue: ""
visible: false, id: "", dimensionId: "", dimensionValue: "",
isShare: false
}
})}
/>

View File

@ -49,7 +49,7 @@ class StatisticalMicroSettingsSlide extends Component {
salaryMonth: [],
statisticalItemPayload: {
visible: false, id: "", dimension: "",
statisticsItemId: ""
statisticsItemId: "", isShare: false
}
};
}
@ -67,7 +67,7 @@ class StatisticalMicroSettingsSlide extends Component {
}
getTaxAgentSelectList = (props) => {
getTaxAgentSelectList(true).then(({ status, data }) => {
getTaxAgentSelectList(props.isShare).then(({ status, data }) => {
if (status) {
const conditions = _.map(condition, item => {
return {
@ -221,7 +221,7 @@ class StatisticalMicroSettingsSlide extends Component {
onClick={() => this.setState({
statisticalItemPayload: {
visible: true, id, dimension,
statisticsItemId: ""
statisticsItemId: "", isShare
}
})}
/>
@ -243,9 +243,8 @@ class StatisticalMicroSettingsSlide extends Component {
render: (txt, record) => {
return (
<a href="javascript: void(0);" onClick={() => {
if (isShare) return;
this.setState({
statisticalItemPayload: { visible: true, id, dimension, statisticsItemId: record.id }
statisticalItemPayload: { visible: true, id, dimension, statisticsItemId: record.id, isShare }
});
}}>{txt}</a>
);
@ -315,10 +314,8 @@ class StatisticalMicroSettingsSlide extends Component {
{...statisticalItemPayload}
onCancel={(isRefresh) => this.setState({
statisticalItemPayload: {
visible: false,
id: "",
dimension: "",
statisticsItemId: ""
visible: false, id: "", dimension: "",
statisticsItemId: "", isShare: false
}
}, () => isRefresh && this.statisticsItemList(this.props.id))}
/>

View File

@ -204,6 +204,18 @@
.microSlideWrapper {
z-index: 999;
.wea-form-item-wrapper {
display: flex !important;
.wea-browser {
width: 100%;
}
}
.wea-form-item .wea-form-item-wrapper .wea-field-readonly {
white-space: pre-wrap !important;
}
.wea-slide-modal-title {
height: auto !important;
line-height: normal !important;