工资单模板删除项目
This commit is contained in:
parent
b407adc724
commit
a39b9d606a
|
|
@ -1,6 +1,6 @@
|
|||
import React from 'react'
|
||||
import { Row, Col, Upload, Icon, Radio, Switch } from 'antd'
|
||||
import { WeaInput, WeaDraggable } from 'ecCom'
|
||||
import { Row, Col, Upload, Icon, Radio, Switch, Modal } from 'antd'
|
||||
import { WeaInput, WeaDraggable } from 'ecCom'
|
||||
import { inject, observer } from 'mobx-react';
|
||||
import BackgroundUpload from '../components/backgroundUpload'
|
||||
import RequiredLabelTip from '../../../components/requiredLabelTip';
|
||||
|
|
@ -73,6 +73,21 @@ export default class ShowSettingForm extends React.Component {
|
|||
console.log("data2:", data2);
|
||||
}
|
||||
|
||||
handleDeleteClick(index) {
|
||||
Modal.confirm({
|
||||
title: '信息确认',
|
||||
content: '确认删除',
|
||||
onOk:() => {
|
||||
const {payrollStore: {salaryItemSet, setSalaryItemSet}} = this.props;
|
||||
let resultSalaryItemSet = [...salaryItemSet]
|
||||
resultSalaryItemSet.splice(index, 1)
|
||||
setSalaryItemSet(resultSalaryItemSet)
|
||||
},
|
||||
onCancel: () => {
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
render() {
|
||||
const { payrollStore } = this.props;
|
||||
const { salaryTemplateShowSet } = payrollStore;
|
||||
|
|
@ -187,6 +202,10 @@ export default class ShowSettingForm extends React.Component {
|
|||
index > 0 && <Icon type="caret-up" style={{marginLeft: "10px", cursor: 'pointer', color: "#666"}}
|
||||
onClick={() => {this.handleUpClick(index)}}/>
|
||||
}
|
||||
|
||||
<i className="icon-coms-Delete" style={{cursor: "pointer", color: '#666', marginLeft: "10px"}} onClick={() => {
|
||||
this.handleDeleteClick(index)
|
||||
}}/>
|
||||
</div>
|
||||
<div className="configContent">
|
||||
{group.items.map(item => (
|
||||
|
|
|
|||
Loading…
Reference in New Issue