-
-
-
-
+ return (
} iconBgcolor="#F14A2D"
+ buttons={buttons}>
+
+
- );
+ );
}
}
diff --git a/pc4mobx/hrmSalary/pages/declare/index.less b/pc4mobx/hrmSalary/pages/declare/index.less
index 9e4ced1a..01b8fd58 100644
--- a/pc4mobx/hrmSalary/pages/declare/index.less
+++ b/pc4mobx/hrmSalary/pages/declare/index.less
@@ -1,11 +1,10 @@
-.generateDeclarationDetail {
- .tabWrapper {
- padding-left: 10px
- }
+.declare-detail-table-container {
+ height: 100%;
+ background: #f6f6f6;
+ padding: 8px 16px;
- .tableWrapper {
- height: calc(100vh - 48px);
- overflow: auto;
+ .wea-new-table {
+ background: #FFF;
}
}
diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/copyLedgerModal.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/copyLedgerModal.js
index d5cc7c0a..916efbc2 100644
--- a/pc4mobx/hrmSalary/pages/ledgerPage/components/copyLedgerModal.js
+++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/copyLedgerModal.js
@@ -63,7 +63,8 @@ class CopyLedgerModal extends Component {
const { copyForm: form } = ledgerStore;
form.validateForm().then(f => {
if (f.isValid) {
- const payload = { id, ...form.getFormParams() };
+ const { taxAgentId, ...formParams } = form.getFormParams();
+ const payload = { id, ...formParams, taxAgentIds: taxAgentId.split(",") };
this.setState({ loading: true });
duplicateLedger(payload).then(({ status, errormsg }) => {
this.setState({ loading: false });
diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/index.less b/pc4mobx/hrmSalary/pages/ledgerPage/components/index.less
index 96d0463d..5ed5c65c 100644
--- a/pc4mobx/hrmSalary/pages/ledgerPage/components/index.less
+++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/index.less
@@ -91,39 +91,14 @@
//调薪计薪规则弹框
.adjustRuleModalWrapper {
- .titleTipWrapper {
- display: flex;
- align-items: center;
+ .calcRules .cust {
+ line-height: 30px;
- .title {
- margin-right: 4px;
- }
- }
-
- .adjustRuleDetailWrapper {
- display: flex;
- flex-direction: column;
-
- .adjustSalaryFlex {
+ .child {
display: flex;
align-items: center;
- margin-bottom: 10px;
}
}
-
- .wea-select, .ant-select-selection, .ant-select {
- width: 100%;
- }
-
- .wea-select {
- display: inline-block;
- position: relative;
- }
-
- .ant-select-selection {
- height: 30px;
- border-radius: 0;
- }
}
// 回算薪资项目
@@ -249,7 +224,7 @@
padding: 0;
background: transparent;
border: none;
- font-size: 20px!important;
+ font-size: 20px !important;
line-height: 20px;
}
diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAdjustRuleAddModal.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAdjustRuleAddModal.js
index b81b506e..0956eb81 100644
--- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAdjustRuleAddModal.js
+++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAdjustRuleAddModal.js
@@ -5,170 +5,139 @@
* Date: 2022/12/12
*/
import React, { Component } from "react";
-import { WeaDialog, WeaFormItem, WeaHelpfulTip, WeaSearchGroup, WeaSelect } from "ecCom";
-import { Button, Modal, Radio } from "antd";
-import { monthDays } from "../config";
+import { inject, observer } from "mobx-react";
+import { WeaDialog, WeaFormItem, WeaHelpfulTip, WeaLocaleProvider, WeaSelect, WeaTools } from "ecCom";
+import FormInfo from "../../../components/FormInfo";
+import { WeaSwitch } from "comsMobx";
+import { Button } from "antd";
import { listSalarySobItem } from "../../../apis/ledger";
+import { monthDays, ruleConditions } from "../config";
import "./index.less";
+const { getLabel } = WeaLocaleProvider;
+const getKey = WeaTools.getKey;
+
+@inject("ledgerStore")
+@observer
class LedgerAdjustRuleAddModal extends Component {
constructor(props) {
super(props);
- this.state = {
- beforeAdjustmentType: 2,
- afterAdjustmentType: 1,
- salaryItemId: "",
- salaryItemName: "",
- dayOfMonth: "1",
- salaryItemOptions: []
- };
+ this.state = { conditions: [] };
}
componentWillReceiveProps(nextProps, nextContext) {
- if (nextProps.visible !== this.props.visible && nextProps.salarySobId) this.listSalarySobItem(nextProps.salarySobId);
+ if (nextProps.visible !== this.props.visible && nextProps.visible) this.listSalarySobItem(nextProps.salarySobId);
+ if (nextProps.visible !== this.props.visible && !nextProps.visible) this.props.ledgerStore.initRuleForm();
}
listSalarySobItem = (salarySobId) => {
const { salaryRuleItemsList } = this.props;
const payload = {
- excludeSalaryItemIds: _.map(salaryRuleItemsList, item => item.salaryItemId),
- salarySobId
+ excludeSalaryItemIds: _.map(salaryRuleItemsList, item => item.salaryItemId), salarySobId
};
listSalarySobItem(payload).then(({ status, data }) => {
if (status) {
this.setState({
- salaryItemOptions: _.map(data, it => ({ key: it.salaryItemId.toString(), showname: it.salaryItemName }))
- });
+ conditions: _.map(ruleConditions, item => ({
+ ...item, items: _.map(item.items, o => {
+ o = { ...o, label: getLabel(o.lanId, o.label) };
+ if (getKey(o) === "salaryItemId") {
+ return {
+ ...o, options: _.map(data, it => ({ key: it.salaryItemId.toString(), showname: it.salaryItemName }))
+ };
+ } else if (getKey(o) === "dayOfMonth") {
+ return { ...o, options: monthDays };
+ } else if (getKey(o) === "beforeAdjustmentType" || getKey(o) === "afterAdjustmentType") {
+ return {
+ ...o,
+ options: _.map(o.options, k => ({
+ ...k,
+ showname: !k.helpfultip ? getLabel(k.lanId, k.showname) :
+ {getLabel(k.lanId, k.showname)}
+
+
+ }))
+ };
+ }
+ return o;
+ })
+ }))
+ }, () => this.props.ledgerStore.ruleForm.initFormFields(this.state.conditions));
}
});
};
handleSave = () => {
- const { salaryRuleItemsList, onSave } = this.props;
- const { salaryItemOptions, ...extraItems } = this.state;
- if (_.isEmpty(extraItems.salaryItemId)) {
- Modal.warning({
- title: "信息确认",
- content: "必要信息不完整,红色*为必填项!"
- });
- return;
- }
- const items = { ...extraItems, salaryItemName: this.state.salaryItemName };
- const { salaryItemName, salaryItemId, ...extraFileds } = items;
- const salaryItemNameFiled = salaryItemName.split(","), salaryItemIdFiled = salaryItemId.split(",");
- const fields = _.map(salaryItemNameFiled, (item, index) => {
- return {
- ...extraFileds,
- salaryItemName: item,
- salaryItemId: salaryItemIdFiled[index]
- };
- });
- this.handleReset();
- onSave([...salaryRuleItemsList, ...fields]);
- };
- handleReset = () => {
- this.setState({
- beforeAdjustmentType: 2,
- afterAdjustmentType: 1,
- salaryItemId: "",
- salaryItemName: "",
- dayOfMonth: "1",
- salaryItemOptions: []
- }, () => {
- const { onCancel } = this.props;
- onCancel();
+ const { salaryRuleItemsList, onSave, ledgerStore: { ruleForm } } = this.props;
+ ruleForm.validateForm().then(f => {
+ if (f.isValid) {
+ const { salaryItemId } = ruleForm.getFormParams(), { fieldMap } = ruleForm;
+ const fields = _.map(salaryItemId.split(","), o => ({
+ ...ruleForm.getFormParams(),
+ salaryItemId: o,
+ salaryItemName: _.find(fieldMap["salaryItemId"]["options"], k => k.key === o).showname
+ }));
+ this.props.onCancel(onSave([...salaryRuleItemsList, ...fields]));
+ } else {
+ f.showErrors();
+ }
});
};
render() {
- const {
- salaryItemId,
- salaryItemOptions,
- dayOfMonth,
- beforeAdjustmentType,
- afterAdjustmentType
- } = this.state;
- const { title, visible } = this.props;
- const buttons = [
];
- return (
-
-
-
- this.setState({ salaryItemId, salaryItemName })}
- />
-
- } labelCol={{ span: 4 }} wrapperCol={{ span: 20 }} colon={false}>
-
-
-
如果:调薪生效日期在
-
this.setState({ dayOfMonth })}
- />
- (含)之前
+ const { ledgerStore: { ruleForm } } = this.props, { conditions } = this.state;
+ const buttons = [];
+ const itemRender = {
+ salaryItemId: (field, textAreaProps, form, formParams) => {
+ return ();
+ },
+ dayOfMonth: () => null,
+ beforeAdjustmentType: () => null,
+ afterAdjustmentType: () => null
+ };
+ const childrenComponents = {
+ salaryItemId: () => {
+ const { dayOfMonth, beforeAdjustmentType, afterAdjustmentType } = ruleForm.getFormParams();
+ const coms = [], { fieldMap } = ruleForm;
+ coms.push(
+
+ {getLabel(111, "计薪规则")}
+
+ } labelCol={{ span: 6 }} wrapperCol={{ span: 18 }}>
+
+
+
{fieldMap["dayOfMonth"].label}
+
ruleForm.updateFields({ dayOfMonth: { value: v } })}/>
+ {getLabel(111, "(含)之前")}
-
-
计薪规则为:
-
this.setState({ beforeAdjustmentType: e.target.value })}
- value={beforeAdjustmentType}>
- 取调整后薪资
- 分段计薪
- 取平均
-
-
+
+
{fieldMap["beforeAdjustmentType"].label}
+
ruleForm.updateFields({ beforeAdjustmentType: { value: v } })}/>
-
否则:调薪生效日期在{dayOfMonth}号之后
-
-
计薪规则为:
-
this.setState({ afterAdjustmentType: e.target.value })}
- value={afterAdjustmentType}>
- 取调整前薪资
- 分段计薪
- 取平均
-
-
+
+
{getLabel(111, "否则:调薪生效日期在10号之后")}
+
+
+
{fieldMap["afterAdjustmentType"].label}
+
ruleForm.updateFields({ afterAdjustmentType: { value: v } })}/>
-
+ );
+ return [{ com:
{coms}
, col: 1 }];
+ }
+ };
+ return (
+
+
);
}
@@ -176,14 +145,3 @@ class LedgerAdjustRuleAddModal extends Component {
export default LedgerAdjustRuleAddModal;
-const AdjustTitle = () => {
- return
- 计薪规则
-
- :
-
;
-};
diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAssociatedPersonnel.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAssociatedPersonnel.js
index 2ef759b4..5889b792 100644
--- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAssociatedPersonnel.js
+++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAssociatedPersonnel.js
@@ -287,6 +287,7 @@ class LedgerAssociatedPersonnel extends Component {
APIFox={APIFox}
tabActive={selectedKey}
searchValue={searchValue}
+ showOperateBtn={admin}
onChangeSelectKey={rowKeys => this.setState({ rowKeys })}
onEditScope={this.handleAddPersonal}
/>
diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerMovoTo.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerMovoTo.js
index af75ac82..8a333ea5 100644
--- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerMovoTo.js
+++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerMovoTo.js
@@ -18,10 +18,8 @@ class LedgerMovoTo extends Component {
];
return (
+ {...extraProps} buttons={buttons} hasScroll initLoadCss className="moveModalWrapper"
+ style={{ width: 440, height: Math.ceil((dataList.length - 1) / 3) * 25 + 41 }}>
item.showname === "未分类")}
diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItem.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItem.js
index 66134f24..65912404 100644
--- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItem.js
+++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItem.js
@@ -254,20 +254,19 @@ class LedgerSalaryItem extends Component {
* Params:
* Date: 2022/12/14
*/
- handleAddSalaryItems = (id, items) => {
+ handleAddSalaryItems = (id, items, insertId) => {
const { itemGroups } = this.state;
this.setState({
itemGroups: _.map(itemGroups, it => {
if (id === it.uuid) {
+ items = _.map(items, child => {
+ const { id: itemsId, ...extraItems } = child;
+ return { ...extraItems, salaryItemGroupId: it.uuid };
+ });
+ if (insertId) it.items.splice(_.findIndex(it.items, k => (k.id === insertId) || (k.key === insertId)) + 1, 0, ...items);
return {
- ...it, items: _.map([..._.map(items, child => {
- const { id: itemsId, ...extraItems } = child;
- return { ...extraItems, salaryItemGroupId: it.uuid };
- }), ...it.items], (childItem, childItemIndex) => {
- return {
- ...childItem,
- sortedIndex: childItemIndex
- };
+ ...it, items: _.map(insertId ? it.items : [...items, ...it.items], (childItem, childItemIndex) => {
+ return { ...childItem, sortedIndex: childItemIndex };
})
};
}
@@ -319,7 +318,7 @@ class LedgerSalaryItem extends Component {
items: [...it.items, {
...extraItems,
salaryItemGroupId: moveToItemId,
- key: moveId,
+ key: moveId ? moveId : items.key,
sortedIndex: !_.isEmpty(it.items) ? it.items[it.items.length - 1].sortedIndex + 1 : 0
}]
};
diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemAddModal.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemAddModal.js
index 663aff22..7830fbe5 100644
--- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemAddModal.js
+++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemAddModal.js
@@ -1,25 +1,15 @@
import React from "react";
-import { Button, Switch } from "antd";
-import { WeaDialog, WeaInputSearch, WeaTable } from "ecCom";
+import { Button, Spin } from "antd";
+import { WeaCheckbox, WeaDialog, WeaInputSearch, WeaLocaleProvider, WeaTable } from "ecCom";
import { listSalaryItem } from "../../../apis/ledger";
+const getLabel = WeaLocaleProvider.getLabel;
export default class LedgerSalaryItemAddModal extends React.Component {
constructor(props) {
super(props);
this.state = {
- loading: {
- query: false
- },
- name: "",
- selectedRowKeys: [],
- dataSource: [],
- dataSourceCopy: [],
- columns: [],
- pageInfo: {
- current: 1,
- pageSize: 10,
- total: 0
- }
+ loading: { query: false }, name: "", selectedRowKeys: [], dataSource: [],
+ dataSourceCopy: [], columns: [], pageInfo: { current: 1, pageSize: 10, total: 0 }
};
}
@@ -42,12 +32,7 @@ export default class LedgerSalaryItemAddModal extends React.Component {
excludeIds.push(i.salaryItemId);
});
});
- const payload = {
- excludeIds,
- name,
- ...pageInfo,
- ...extra
- };
+ const payload = { excludeIds, name, ...pageInfo, ...extra };
this.setState({ loading: { ...loading, query: true } });
listSalaryItem(payload).then(({ status, data }) => {
this.setState({ loading: { ...loading, query: false } });
@@ -56,9 +41,7 @@ export default class LedgerSalaryItemAddModal extends React.Component {
const tmpV = !_.isEmpty(dataSource) ? dataSource : [];
this.setState({
dataSourceCopy: [...dataSourceCopy, ...tmpV],
- pageInfo: { ...pageInfo, current, pageSize, total },
- dataSource: tmpV,
- columns
+ pageInfo: { ...pageInfo, current, pageSize, total }, dataSource: tmpV, columns
});
}
}).catch(() => {
@@ -76,7 +59,7 @@ export default class LedgerSalaryItemAddModal extends React.Component {
case "useDefault":
case "hideDefault":
case "useInEmployeeSalary":
- return ;
+ return ;
default:
return ;
}
@@ -85,10 +68,9 @@ export default class LedgerSalaryItemAddModal extends React.Component {
});
return newColumns;
};
-
handleAdd = () => {
const { dataSourceCopy, selectedRowKeys } = this.state;
- const { onAddSalaryItems, id, onCancel, itemGroups } = this.props;
+ const { onAddSalaryItems, id, onCancel, itemGroups, record } = this.props;
const arrItems = _.find(itemGroups, it => it.uuid === id).items || [];
let selectItems = [];
_.uniqWith(dataSourceCopy, _.isEqual).map((item) => {
@@ -104,12 +86,21 @@ export default class LedgerSalaryItemAddModal extends React.Component {
});
});
onCancel();
- onAddSalaryItems(id, selectItems);
+ onAddSalaryItems(id, selectItems, record.id || record.key);
+ };
+ renderTitle = () => {
+ const { name, pageInfo } = this.state;
+ return
+ {getLabel(111, "添加薪资项目")}
+ this.setState({ name: val })} style={{ width: 200 }}
+ placeholder={getLabel(111, "请输入薪资项目名称")} onSearch={() => this.setState({
+ pageInfo: { ...pageInfo, current: 1 }
+ }, () => this.listSalaryItem())}/>
+
;
};
render() {
- const { onCancel, visible } = this.props;
- const { name, selectedRowKeys, pageInfo, dataSource, loading } = this.state;
+ const { selectedRowKeys, pageInfo, dataSource, loading } = this.state;
const pagination = {
...pageInfo,
showTotal: total => `共 ${total} 条`,
@@ -117,49 +108,31 @@ export default class LedgerSalaryItemAddModal extends React.Component {
showSizeChanger: true,
pageSizeOptions: ["10", "20", "50", "100"],
onShowSizeChange: (current, pageSize) => {
- this.setState({
- pageInfo: { ...pageInfo, current, pageSize }
- }, () => this.listSalaryItem());
+ this.setState({ pageInfo: { ...pageInfo, current: 1, pageSize } }, () => this.listSalaryItem());
},
onChange: current => {
- this.setState({
- pageInfo: { ...pageInfo, current }
- }, () => this.listSalaryItem());
+ this.setState({ pageInfo: { ...pageInfo, current } }, () => this.listSalaryItem());
}
};
const rowSelection = {
- selectedRowKeys,
- onChange: (selectedRowKeys) => {
- this.setState({ selectedRowKeys }, () => {
- });
- }
+ selectedRowKeys, onChange: (selectedRowKeys) => this.setState({ selectedRowKeys })
};
return (
- 添加]}
- >
-
-
this.setState({ name })}
- onSearch={() => this.listSalaryItem({ current: 1 })}
- />
+ this.sysItemRef = dom}
+ title={this.renderTitle()}
+ buttons={[]}
+ style={{
+ width: "60vw", height: 600, minHeight: 200, minWidth: 380,
+ maxHeight: "90%", maxWidth: "90%", overflow: "hidden", transform: "translate(0px, 0px)"
+ }}>
+
+
+ record.id || record.key} rowSelection={rowSelection}/>
+
- record.id || record.key}
- rowSelection={rowSelection}
- dataSource={dataSource}
- pagination={pagination}
- loading={loading.query}
- columns={this.getSalaryItemAddColumns()}
- />
);
}
diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemNormal.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemNormal.js
index ea49e899..c7dd907d 100644
--- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemNormal.js
+++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemNormal.js
@@ -22,7 +22,7 @@ class LedgerSalaryItemNormal extends Component {
constructor(props) {
super(props);
this.state = {
- addCategoryItemsVisible: false,
+ addCategoryItemsVisible: { visible: false, id: "", record: {} },
categoryModal: {
visible: false,
title: "新增分类",
@@ -170,7 +170,11 @@ class LedgerSalaryItemNormal extends Component {
onEditCategory={this.handleAddCategory}
onDeleteCategory={this.handleDeleteCategory}
onDeleteCategoryItems={this.handleDeleteCategoryItems}
- onAddCategoryItems={(id) => this.setState({ addCategoryItemsVisible: { visible: true, id } })}
+ onAddCategoryItems={(id) => this.setState({
+ addCategoryItemsVisible: {
+ ...addCategoryItemsVisible, visible: true, id
+ }
+ })}
onUpgo={this.handleUpgo}
onDowngo={this.handleDowngo}
/>
@@ -178,13 +182,16 @@ class LedgerSalaryItemNormal extends Component {
>
childItem.id === id || childItem.uuid === uuid).items}
+ dataSource={_.find(newDateSource, childItem => childItem.uuid === uuid).items}
salarySobId={editId || saveSalarySobId}
selectedRowKeys={field.selectedRowKeys || []}
onDropCategoryItem={(data) => onDropCategoryItem(field, data)}
onHandleItemhide={(data) => onHandleItemhide(field, data)}
onChangeSelectedRowKeys={(data) => onChangeSelectedRowKeys(field, data)}
onMoveTo={this.handleMoveTo}
+ onAddCategoryItems={(record) => this.setState({
+ addCategoryItemsVisible: { visible: true, record, id: uuid }
+ })}
/>
;
})
@@ -198,7 +205,7 @@ class LedgerSalaryItemNormal extends Component {
this.setState({ addCategoryItemsVisible: { visible: false, id: "" } })}
+ onCancel={() => this.setState({ addCategoryItemsVisible: { visible: false, id: "", record: {} } })}
onAddSalaryItems={onAddSalaryItems}
/>
({ key: it.value.toString(), showname: it.defaultLabel }))
@@ -288,18 +290,22 @@ class LedgerSalaryItemTable extends Component {
width: 80,
render: (text, record) => this.handleChangeItem(value, record.id || record.key)}
+ onChange={value => {
+ this.handleChangeItem(value, record.id || record.key);
+ }}
/>
},
{
title: "操作",
dataIndex: "operate",
key: "operate",
- width: 120,
+ width: 180,
render: (_, record) => (
this.handleEditSalaryItem(record)}
style={{ marginRight: 10 }}>编辑
+ this.props.onAddCategoryItems(record)}
+ style={{ marginRight: 10 }}>{getLabel(111, "插入")}
onMoveTo(record)}>移动到
)
diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSlide.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSlide.js
index 68239b5f..0e07cd7e 100644
--- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSlide.js
+++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSlide.js
@@ -87,7 +87,7 @@ class LedgerSlide extends Component {
* Date: 2022/12/12
*/
saveLedgerAdjustRule = () => {
- const { adjustRules, saveSalarySobId } = this.state;
+ const { adjustRules, saveSalarySobId, salaryApprovalStatus } = this.state;
const payload = {
salarySobId: this.props.editId || saveSalarySobId,
ruleParams: adjustRules
@@ -97,6 +97,7 @@ class LedgerSlide extends Component {
this.setState({ loading: false });
if (status) {
message.success("保存成功");
+ !salaryApprovalStatus && this.handleClose();
} else {
message.success(errormsg || "保存失败");
}
@@ -260,7 +261,7 @@ class LedgerSlide extends Component {
,
+ onClick={() => this.setState({ current: !salaryApprovalStatus ? current : current + 1 }, () => this.saveLedgerAdjustRule())}>{!salaryApprovalStatus ? getLabel(111, "完成") : getLabel(111, "保存并进入下一步")}
],
editBtns: [
diff --git a/pc4mobx/hrmSalary/pages/payrollRelease/components/payrollTempNormalSet/formRender.js b/pc4mobx/hrmSalary/pages/payrollRelease/components/payrollTempNormalSet/formRender.js
index b004e177..5e7f1398 100644
--- a/pc4mobx/hrmSalary/pages/payrollRelease/components/payrollTempNormalSet/formRender.js
+++ b/pc4mobx/hrmSalary/pages/payrollRelease/components/payrollTempNormalSet/formRender.js
@@ -41,7 +41,7 @@ export const payrollTempNormalSetForm = (form, condition, background, onChange =
/>
}
{
- getKey(fields) === "theme" && c.viewAttr === 3 &&
+ getKey(fields) === "theme" && fields.viewAttr === 3 &&
{getLabel(500143, "插入变量")}:
div:last-child {
right: 16px;
}
diff --git a/pc4mobx/hrmSalary/pages/ruleConfig/conditions.js b/pc4mobx/hrmSalary/pages/ruleConfig/conditions.js
index c5701013..a141d796 100644
--- a/pc4mobx/hrmSalary/pages/ruleConfig/conditions.js
+++ b/pc4mobx/hrmSalary/pages/ruleConfig/conditions.js
@@ -188,6 +188,15 @@ export const conditions = [
lanId: 111,
labelcol: 8,
viewAttr: 2
+ },
+ {
+ conditionType: "SWITCH",
+ domkey: ["SHOT_EMP_BTN"],
+ fieldcol: 10,
+ label: "启用人事信息快照",
+ lanId: 111,
+ labelcol: 8,
+ viewAttr: 2
}
],
title: "薪资核算",
@@ -213,6 +222,16 @@ export const conditions = [
lanId: 111,
labelcol: 8,
viewAttr: 2
+ },
+ {
+ conditionType: "SELECT",
+ domkey: ["TAX_DECLARATION_DATE_TYPE"],
+ fieldcol: 10,
+ label: "申报日期类型",
+ lanId: 111,
+ labelcol: 8,
+ options: [],
+ viewAttr: 2
}
],
title: "算税规则",
diff --git a/pc4mobx/hrmSalary/pages/ruleConfig/ruleConfig.js b/pc4mobx/hrmSalary/pages/ruleConfig/ruleConfig.js
index 573bc864..3131f9ac 100644
--- a/pc4mobx/hrmSalary/pages/ruleConfig/ruleConfig.js
+++ b/pc4mobx/hrmSalary/pages/ruleConfig/ruleConfig.js
@@ -73,6 +73,13 @@ class RuleConfig extends Component {
...o,
hide: sysinfo["SALARY_APPROVAL_STATUS"] === "0" || _.isNil(sysinfo["SALARY_APPROVAL_STATUS"])
};
+ } else if (getKey(o) === "TAX_DECLARATION_DATE_TYPE") {
+ return {
+ ...o, options: [
+ { key: "0", showname: getLabel(111, "薪资所属月"), selected: true },
+ { key: "1", showname: getLabel(111, "税款所属期"), selected: false }
+ ]
+ };
}
return { ...o };
})
@@ -154,6 +161,8 @@ class RuleConfig extends Component {
case "APPROVAL_CAN_RE_CALC_STATUS":
case "APPROVAL_CAN_EDIT_RESULT_STATUS":
case "ATTENDANCE_SERIAL_COLLECTION_BTN":
+ case "TAX_DECLARATION_DATE_TYPE":
+ case "SHOT_EMP_BTN":
if (!this.handleDebounce) {
this.handleDebounce = _.debounce(() => {
const confTitle = {
@@ -171,7 +180,9 @@ class RuleConfig extends Component {
APPROVAL_CAN_MANUAL_FILE_STATUS: getLabel(111, "开启审批的核算记录允许手动归档"),
APPROVAL_CAN_RE_CALC_STATUS: getLabel(111, "开启审批的核算记录允许重新核算"),
APPROVAL_CAN_EDIT_RESULT_STATUS: getLabel(111, "审批流程发起后允许修改核算数据"),
- ATTENDANCE_SERIAL_COLLECTION_BTN: getLabel(111, "考勤引用是否采集班次数据")
+ ATTENDANCE_SERIAL_COLLECTION_BTN: getLabel(111, "考勤引用是否采集班次数据"),
+ TAX_DECLARATION_DATE_TYPE: getLabel(111, "申报日期类型"),
+ SHOT_EMP_BTN: getLabel(111, "启用组织快照"),
};
this.unifiedSettings(key, confTitle[key]);
this.handleDebounce = null;
diff --git a/pc4mobx/hrmSalary/pages/salary/components/personalScopeModal.js b/pc4mobx/hrmSalary/pages/salary/components/personalScopeModal.js
index 040db1e1..ce15691d 100644
--- a/pc4mobx/hrmSalary/pages/salary/components/personalScopeModal.js
+++ b/pc4mobx/hrmSalary/pages/salary/components/personalScopeModal.js
@@ -150,7 +150,7 @@ class PersonalScopeModal extends Component {
];
return (
-
+
{this.renderForm()}
);
diff --git a/pc4mobx/hrmSalary/pages/salaryItem/syncToSalaryAccountSetDialog.js b/pc4mobx/hrmSalary/pages/salaryItem/syncToSalaryAccountSetDialog.js
index f97ef453..d7d11617 100644
--- a/pc4mobx/hrmSalary/pages/salaryItem/syncToSalaryAccountSetDialog.js
+++ b/pc4mobx/hrmSalary/pages/salaryItem/syncToSalaryAccountSetDialog.js
@@ -78,14 +78,12 @@ class SyncToSalaryAccountSetDialog extends Component {
const { conditions } = this.state;
return (
(pre += cur.items.length), 0) * 47 + 33 }}
buttons={[]}
>
-
- {getSearchs(salarySetform, conditions, 1)}
-
+ {getSearchs(salarySetform, conditions, 1, false)}
);
}
diff --git a/pc4mobx/hrmSalary/pages/salaryItem/systemSalaryItemModal.js b/pc4mobx/hrmSalary/pages/salaryItem/systemSalaryItemModal.js
index b1c3a1f8..1ba632af 100644
--- a/pc4mobx/hrmSalary/pages/salaryItem/systemSalaryItemModal.js
+++ b/pc4mobx/hrmSalary/pages/salaryItem/systemSalaryItemModal.js
@@ -50,7 +50,7 @@ export default class SystemSalaryItemModal extends React.Component {
return
{getLabel(111, "添加系统薪资项目")}
this.setState({ name: val })} style={{ width: 200 }}
- placeholder={getLabel(111, "请输入薪资项目名称")} a onSearch={() => this.setState({
+ placeholder={getLabel(111, "请输入薪资项目名称")} onSearch={() => this.setState({
pageInfo: { ...pageInfo, current: 1 }
}, () => this.getSysItemList())}/>
;
@@ -92,7 +92,7 @@ export default class SystemSalaryItemModal extends React.Component {
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/index.less b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/index.less
index 235eba25..c7117046 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/index.less
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/index.less
@@ -4,12 +4,16 @@
height: 100%;
background: #f6f6f6;
+ .wea-tab {
+ border-bottom: none !important;
+ }
+
.wea-new-top-req-wapper .wea-new-top-req {
z-index: 0 !important;
}
.wea-search-tab, .wea-input-focus {
- background: #f6f6f6;
+ background: #f1f1f1;
}
.normalWapper {
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareEditArchiveSlide/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareEditArchiveSlide/index.js
index c4eb3b57..8019dc11 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareEditArchiveSlide/index.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareEditArchiveSlide/index.js
@@ -118,7 +118,7 @@ class Index extends Component {
} else if (getKey(g).indexOf("StartTime") !== -1) {
return {
...g, label: getLabel(g.lanId, g.label),
- viewAttr: (formData[o["typename"]][`${o.title}Name`] && showOperateBtn) ? 3 : g.viewAttr
+ viewAttr: (runStatuses === "4,5" || !showOperateBtn) ? 1 : (formData[o["typename"]][`${o.title}Name`] && showOperateBtn) ? 3 : g.viewAttr
};
}
return {
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanEditSlide/planSetTable.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanEditSlide/planSetTable.js
index 10751d50..aa3942b0 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanEditSlide/planSetTable.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanEditSlide/planSetTable.js
@@ -84,7 +84,7 @@ class PlanSetTable extends Component {
com: [{
type: "custom",
key: "custom",
- render: text => ({text})
+ render: text => ({text})
}]
},
{
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/index.less b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/index.less
index 5566cc8e..0c19ca25 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/index.less
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/index.less
@@ -232,6 +232,14 @@
text-overflow: ellipsis;
overflow: hidden;
}
+
+ .text-td-elli {
+ display: inline-block;
+ width: 120px;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
}
}
}
diff --git a/pc4mobx/hrmSalary/pages/variableSalary/index.js b/pc4mobx/hrmSalary/pages/variableSalary/index.js
index 08fa8aa9..639355ea 100644
--- a/pc4mobx/hrmSalary/pages/variableSalary/index.js
+++ b/pc4mobx/hrmSalary/pages/variableSalary/index.js
@@ -19,7 +19,6 @@ import SalaryItemList from "./components/salaryItemList";
import SalaryFileList from "./components/salaryFileList";
import SalaryFileImportDialog from "./components/salaryFileImportDialog";
import { Button, message } from "antd";
-import cs from "classnames";
import "./index.less";
const getLabel = WeaLocaleProvider.getLabel;
diff --git a/pc4mobx/hrmSalary/stores/baseForm.js b/pc4mobx/hrmSalary/stores/baseForm.js
index 3eb3a57e..c4d10349 100644
--- a/pc4mobx/hrmSalary/stores/baseForm.js
+++ b/pc4mobx/hrmSalary/stores/baseForm.js
@@ -1,64 +1,14 @@
import { action, observable } from "mobx";
-import { message } from "antd";
-import { WeaForm, WeaLogView } from "comsMobx";
-import { WeaLocaleProvider } from "ecCom";
+import { WeaForm } from "comsMobx";
-import * as API from "../apis"; // 引入API接口文件
-
-const { LogStore } = WeaLogView;
-const getLabel = WeaLocaleProvider.getLabel;
export class BaseFormStore {
+ // 全局设置仓库
@observable form = new WeaForm(); // 规则渲染form
-
- @observable logStore = new LogStore();
- @observable condition = []; // 存储后台得到的form数据
- @observable saveLoading = false; // 保存状态处理:保证保存的时候接口只走一次
- @observable loading = true; // 页面初始化的loading状态:数据加载成功前后前使用
- @observable hasRight = true; // 判断用户是有权限查看当前页面: 没有权限渲染无权限页面,有权限渲染数据
+ @action("初始化form表单") initForm = () => this.form = new WeaForm();
+ @observable formExtra = new WeaForm(); // 规则渲染form
+ @action("初始化form表单") initFormExtra = () => this.formExtra = new WeaForm();
@observable logVisible = false; // 控制日志弹框的显影
-
- @action // 初始化操作: 一般用来初始化获取后台数据
- doInit = () => {
- this.getBaseForm();
- };
-
- @action // 获得form配置数据
- getBaseForm = () => {
- API.getBaseForm().then(action(result => {
- this.loading = false;
- this.hasRight = result.hasRight;
- if (result.hasRight) {
- this.condition = result.condition;
- this.form.initFormFields(result.condition);
- }
- }));
- };
-
- @action // 保存
- saveForm = () => {
- this.form.validateForm().then(action(f => { // 表单的校验: 直接使用form的validateForm方法即可
- if (f.isValid) { // 校验听过: 走保存接口
- this.saveLoading = true;
- const params = this.form.getFormParams();
- API.saveForm(params).then(action(
- result => {
- this.saveLoading = false;
- if (result.api_status) { // 保存成功: 1、给出提示 2、刷新form数据
- message.success(`${getLabel(18758, "保存成功")}`);
- this.getBaseForm();
- } else {
- message.error(`${getLabel(22620, "保存失败")}`);
- }
- }
- ));
- } else {
- f.showErrors();
- }
- }));
- };
-
- @action
+ @action("日志显隐开关")
setLogVisible = bool => this.logVisible = bool;
-
}
diff --git a/pc4mobx/hrmSalary/stores/ledger.js b/pc4mobx/hrmSalary/stores/ledger.js
index 0411826d..6aaff1b8 100644
--- a/pc4mobx/hrmSalary/stores/ledger.js
+++ b/pc4mobx/hrmSalary/stores/ledger.js
@@ -17,7 +17,8 @@ export class LedgerStore {
@action initAARForm = (v) => this.AARForm = new WeaForm();//重置核算审批规则form
@action initAARClassifyForm = (v) => this.AARClassifyForm = new WeaForm();//重置审批规则分类编辑form
-
+ @observable ruleForm = new WeaForm(); // 调薪计薪规则项form
+ @action initRuleForm = (v) => this.ruleForm = new WeaForm();//重置调薪计薪规则项form
/*******************************************************/
@observable tableStore = new TableStore(); // new table
diff --git a/pc4mobx/hrmSalary/style/index.less b/pc4mobx/hrmSalary/style/index.less
index 02955b0b..c28edfd8 100644
--- a/pc4mobx/hrmSalary/style/index.less
+++ b/pc4mobx/hrmSalary/style/index.less
@@ -39,6 +39,10 @@
.form-dialog-layout {
background: #f6f6f6;
+ .wea-form-item-wrapper {
+ display: block !important;
+ }
+
.wea-form-item .wea-form-item-wrapper .wea-field-readonly {
line-height: 28px;
}
@@ -57,7 +61,7 @@
}
.ant-select-selection {
- height: 30px;
+ height: 28px;
border-radius: 0;
}
@@ -128,3 +132,10 @@
}
}
+//公共表格操作按钮间距
+.space_div {
+ a:not(:last-child) {
+ margin-right: 8px;
+ }
+}
+
diff --git a/pc4mobx/hrmSalary/util/index.js b/pc4mobx/hrmSalary/util/index.js
index ca93a24d..11be8705 100644
--- a/pc4mobx/hrmSalary/util/index.js
+++ b/pc4mobx/hrmSalary/util/index.js
@@ -38,7 +38,13 @@ export const getSearchs = (form, condition, col, isCenter, onChange = () => void
items.push({
com: (
+ {`${fields.label}`}
+ {
+ fields.labelExtra && onChange(fields.labelType)}>{fields.labelExtra}
+ }
+ } // label 标签的文本
labelCol={{ span: `${fields.labelcol}` }} // label标签占一行比例
wrapperCol={{ span: `${fields.fieldcol}` }} // 右侧控件占一行比例
error={form.getError(fields)} // 错误提示: 处理表单中有必填项,保存的校验