Merge branch 'feature/v2-社保福利档案调差退差-1208' into release
This commit is contained in:
commit
5b768dde10
|
|
@ -89,7 +89,7 @@ class AdjustTable extends Component {
|
|||
options={targetOptions}
|
||||
value={record.target}
|
||||
style={{ width: "100%" }}
|
||||
viewAttr={3}
|
||||
viewAttr={record.status ? 1 : 3}
|
||||
onChange={v => this.handleChangeTableItem("target", v, index)}
|
||||
/>
|
||||
);
|
||||
|
|
@ -107,7 +107,7 @@ class AdjustTable extends Component {
|
|||
<WeaSelect
|
||||
options={[{ key: "1", showname: "社保" }]}
|
||||
value={record.welfareType}
|
||||
viewAttr={3}
|
||||
viewAttr={record.status ? 1 : 3}
|
||||
onChange={v => this.handleChangeTableItem("welfareType", v, index)}
|
||||
/>
|
||||
)
|
||||
|
|
@ -125,7 +125,7 @@ class AdjustTable extends Component {
|
|||
multiple
|
||||
options={record.categoryTypeOptions || []}
|
||||
value={record.categoryType}
|
||||
viewAttr={3}
|
||||
viewAttr={record.status ? 1 : 3}
|
||||
onChange={v => this.handleChangeTableItem("categoryType", v, index)}
|
||||
/>
|
||||
)
|
||||
|
|
@ -142,7 +142,7 @@ class AdjustTable extends Component {
|
|||
<WeaInputNumber
|
||||
precision={2}
|
||||
value={record.countryTotal}
|
||||
viewAttr={3}
|
||||
viewAttr={record.status ? 1 : 3}
|
||||
onChange={v => this.handleChangeTableItem("countryTotal", v, index)}
|
||||
/>
|
||||
)
|
||||
|
|
@ -202,7 +202,7 @@ class AdjustTable extends Component {
|
|||
<WeaSelect
|
||||
options={record.adjustToOptions || []}
|
||||
value={record.adjustTo}
|
||||
viewAttr={3}
|
||||
viewAttr={record.status ? 1 : 3}
|
||||
onChange={v => this.handleChangeTableItem("adjustTo", v, index)}
|
||||
/>
|
||||
);
|
||||
|
|
@ -334,7 +334,13 @@ class AdjustTable extends Component {
|
|||
compensationBack(payload).then(({ status, data, errormsg }) => {
|
||||
if (status) {
|
||||
message.success(data || "撤回成功");
|
||||
this.getCompensationList().then(r => {
|
||||
this.setState({
|
||||
dataSource: _.map(this.state.dataSource, it => {
|
||||
if (id === it.id) {
|
||||
return { ...it, status: false };
|
||||
}
|
||||
return { ...it };
|
||||
})
|
||||
});
|
||||
} else {
|
||||
message.error(errormsg || "撤回失败");
|
||||
|
|
@ -369,10 +375,16 @@ class AdjustTable extends Component {
|
|||
};
|
||||
compensationSave([payload]).then(({ status, data, errormsg }) => {
|
||||
if (status) {
|
||||
const { data: dataMsg, errorMessage = [] } = data;
|
||||
const { data: dataMsg, errorMessage = [], successIds = [] } = data;
|
||||
const msg = dataMsg + errorMessage.join(",");
|
||||
message.success(msg || "保存成功");
|
||||
this.getCompensationList().then(r => {
|
||||
this.setState({
|
||||
dataSource: _.map(this.state.dataSource, it => {
|
||||
if (record.target === it.target) {
|
||||
return { ...it, status: true, id: successIds[0] };
|
||||
}
|
||||
return { ...it };
|
||||
})
|
||||
});
|
||||
} else {
|
||||
message.error(errormsg || "保存失败");
|
||||
|
|
|
|||
Loading…
Reference in New Issue