diff --git a/pc4mobx/hrmSalary/pages/calculate/index.less b/pc4mobx/hrmSalary/pages/calculate/index.less index 59c90584..cec45959 100644 --- a/pc4mobx/hrmSalary/pages/calculate/index.less +++ b/pc4mobx/hrmSalary/pages/calculate/index.less @@ -1,11 +1,13 @@ .dataList-wrapper { - .ant-modal-body{ + .ant-modal-body { padding: 16px 120px } + .formItem { .wea-select, .ant-select { width: 100%; } + .ant-select-selection { width: 100%; height: 30px; @@ -14,15 +16,21 @@ } } -.salarySobNameWrapper{ +.salarySobNameWrapper { display: flex; align-items: center; justify-content: space-between; width: 100%; - .salarySobNameTagWrapper{ + + & > span { + flex: 1; + } + + .salarySobNameTagWrapper { display: flex; align-items: center; - i{ + + i { color: #5d9cec; margin-right: 10px; cursor: pointer; diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItem.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItem.js index 7620ab0a..1819a321 100644 --- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItem.js +++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItem.js @@ -38,7 +38,7 @@ class LedgerSalaryItem extends Component { if (status) { const { empFields, itemGroups, items, incomeCategories } = data; const obj = { - id: itemGroups.length, + uuid: itemGroups.length.toString(), itemHide: null, items, name: "未分类", @@ -48,7 +48,7 @@ class LedgerSalaryItem extends Component { this.setState({ empFields, incomeCategoriesTitleName: incomeCategories[0].name, - itemGroups: [...itemGroups, obj] + itemGroups: [..._.map(itemGroups, it => ({ ...it, uuid: it.id })), obj] }, () => { const { empFields, itemGroups } = this.state; const { onSaveSalaryItem } = this.props; @@ -81,15 +81,19 @@ class LedgerSalaryItem extends Component { if (payload.id) { this.setState({ itemGroups: _.map(itemGroups, it => { - if (it.id === payload.id) { + if (it.uuid === payload.id) { return { ...it, name: payload.name }; } return { ...it }; }) + }, () => { + const { empFields, itemGroups } = this.state; + const { onSaveSalaryItem } = this.props; + onSaveSalaryItem(empFields, itemGroups); }); } else { const obj = { - id: new Date().getTime(), + uuid: new Date().getTime().toString(), itemHide: null, items: [], name: payload.name @@ -112,7 +116,7 @@ class LedgerSalaryItem extends Component { handleDeleteCategroy = (id) => { const { itemGroups } = this.state; this.setState({ - itemGroups: _.filter(itemGroups, it => it.id !== id) + itemGroups: _.filter(itemGroups, it => it.uuid !== id) }, () => { const { empFields, itemGroups } = this.state; const { onSaveSalaryItem } = this.props; @@ -129,7 +133,7 @@ class LedgerSalaryItem extends Component { const { itemGroups } = this.state; this.setState({ itemGroups: _.map(itemGroups, item => { - if (item.id === id) { + if (item.uuid === id) { return { ...item, items: _.filter(item.items, it => !selectedRowKeys.includes(it.id)), @@ -204,7 +208,7 @@ class LedgerSalaryItem extends Component { const { itemGroups } = this.state; this.setState({ itemGroups: _.map(itemGroups, it => { - if (filed.id === it.id) { + if (filed.uuid === it.uuid) { return { ...it, items: _.map(data, (child, childIndex) => { @@ -233,7 +237,7 @@ class LedgerSalaryItem extends Component { const { itemGroups } = this.state; this.setState({ itemGroups: _.map(itemGroups, it => { - if (filed.id === it.id) { + if (filed.uuid === it.uuid) { return { ...it, selectedRowKeys: data }; } return { ...it }; @@ -254,7 +258,7 @@ class LedgerSalaryItem extends Component { const { itemGroups } = this.state; this.setState({ itemGroups: _.map(itemGroups, it => { - if (id === it.id) { + if (id === it.uuid) { return { ...it, items: [...it.items, ...items] }; } return { ...it }; @@ -275,7 +279,7 @@ class LedgerSalaryItem extends Component { const { itemGroups } = this.state; this.setState({ itemGroups: _.map(itemGroups, it => { - if (id === it.id) { + if (id === it.uuid) { return { ...it, items }; } return { ...it }; diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemAddModal.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemAddModal.js index 84a8f199..0403e365 100644 --- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemAddModal.js +++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemAddModal.js @@ -82,7 +82,7 @@ export default class LedgerSalaryItemAddModal extends React.Component { handleAdd = () => { const { dataSource, selectedRowKeys } = this.state; const { onAddSalaryItems, id, onCancel, itemGroups } = this.props; - const arrItems = _.find(itemGroups, it => it.id === id).items || []; + const arrItems = _.find(itemGroups, it => it.uuid === id).items || []; let selectItems = []; dataSource.map((item) => { item = { ...item }; diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemNormal.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemNormal.js index 578d63a4..153a05ec 100644 --- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemNormal.js +++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemNormal.js @@ -66,7 +66,7 @@ class LedgerSalaryItemNormal extends Component { } return { ...it }; }); - onSaveFormnul(formnulField.id, formnulData); + onSaveFormnul(formnulField.uuid, formnulData); }; handleAddCategory = (name = "", id = "") => { const { categoryModal } = this.state; @@ -214,7 +214,7 @@ export default LedgerSalaryItemNormal; const TitleNormalComp = (props) => { const { name, onEditCategory, onDeleteCategory, - sortedIndex, dataSourceLen, id, onUpgo, + sortedIndex, dataSourceLen, uuid, onUpgo, onDowngo, selectedRowKeys = [], onDeleteCategoryItems, onAddCategoryItems } = props; @@ -223,11 +223,11 @@ const TitleNormalComp = (props) => { {name} { name !== "未分类" && - onEditCategory(name, id)}/> + onEditCategory(name, uuid)}/> } { name !== "未分类" && - onDeleteCategory(id)}/> + onDeleteCategory(uuid)}/> } { sortedIndex !== 0 && @@ -240,8 +240,8 @@ const TitleNormalComp = (props) => {
onDeleteCategoryItems(id, selectedRowKeys)}/> - onAddCategoryItems(id)}/> + onClick={() => onDeleteCategoryItems(uuid, selectedRowKeys)}/> + onAddCategoryItems(uuid)}/>
; }; diff --git a/pc4mobx/hrmSalary/pages/taxAgent/columns.js b/pc4mobx/hrmSalary/pages/taxAgent/columns.js index d185263e..c9326873 100644 --- a/pc4mobx/hrmSalary/pages/taxAgent/columns.js +++ b/pc4mobx/hrmSalary/pages/taxAgent/columns.js @@ -41,6 +41,11 @@ export const importEmployColumns = [ dataIndex: "mobile", key: "mobile" }, + { + title: "员工状态", + dataIndex: "employeeStatus", + key: "employeeStatus" + }, ];