Merge branch 'release/2.18.2.2412.02' into custom-美锦能源
This commit is contained in:
commit
e1a4345fbd
|
|
@ -0,0 +1,98 @@
|
||||||
|
import React, { Component } from "react";
|
||||||
|
import { WeaCheckbox, WeaFormItem, WeaLocaleProvider, WeaSearchGroup } from "ecCom";
|
||||||
|
import { observer } from "mobx-react";
|
||||||
|
import { WeaSwitch } from "comsMobx";
|
||||||
|
|
||||||
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
@observer
|
||||||
|
export default class FormInfo extends Component {
|
||||||
|
renderForm = () => {
|
||||||
|
const {
|
||||||
|
formFields, form, colCount, itemRender, onSelectedChangeHandle, showLabel, multiColumn, custLabelCol,
|
||||||
|
childrenComponents
|
||||||
|
} = this.props;
|
||||||
|
|
||||||
|
let groupArr = [];
|
||||||
|
const formParams = form.getFormParams();
|
||||||
|
const labelVisible = showLabel == null || showLabel == true;
|
||||||
|
const col = colCount ? colCount : 1;
|
||||||
|
const labelCol = labelVisible ? (custLabelCol || 6) : 0;
|
||||||
|
const itemProps = {
|
||||||
|
// ratio1to2: labelVisible && custLabelCol == null,
|
||||||
|
style: { marginLeft: 0 },
|
||||||
|
tipPosition: "bottom",
|
||||||
|
labelCol: { span: labelCol },
|
||||||
|
wrapperCol: { span: 22 - labelCol }
|
||||||
|
};
|
||||||
|
const textAreaProps = { minRows: 4, maxRows: 4 };
|
||||||
|
|
||||||
|
formFields.map((fields, i) => {
|
||||||
|
let formItems = [];
|
||||||
|
fields.items.map((field, j) => {
|
||||||
|
const customerRender = itemRender != null ? itemRender[field.domkey[0]] : null;
|
||||||
|
const showCheckbox = field.checkbox || false;
|
||||||
|
let label = getLabel(field.lanId, field.label);
|
||||||
|
if (showCheckbox)
|
||||||
|
label = <WeaCheckbox content={label} value={field.checkboxValue} onChange={(v) => {
|
||||||
|
field.checkboxValue = v === "1";
|
||||||
|
onSelectedChangeHandle && onSelectedChangeHandle(field, v);
|
||||||
|
}}/>;
|
||||||
|
let coms;
|
||||||
|
if (customerRender == null) {
|
||||||
|
coms = <WeaSwitch fieldConfig={{
|
||||||
|
...field, helpfulTip: getLabel(field.helpfulTipLanId || "", field.helpfulTip || ""), ...textAreaProps,
|
||||||
|
hasBorder: false
|
||||||
|
}} form={form} formParams={formParams}/>;
|
||||||
|
} else {
|
||||||
|
coms = customerRender({
|
||||||
|
...field, helpfulTip: getLabel(field.helpfulTipLanId || "", field.helpfulTip || "")
|
||||||
|
}, textAreaProps, form, formParams);
|
||||||
|
}
|
||||||
|
Object.assign(itemProps, { label, error: form.getError(field) });
|
||||||
|
let col = colCount ? colCount : 1;
|
||||||
|
if (multiColumn != null) {//检查有哪些字段需要一行显示多个
|
||||||
|
const idx = _.findIndex(multiColumn, item => item.key === field.domkey[0]);
|
||||||
|
if (idx > -1) {
|
||||||
|
col = field.colSpan || 1;
|
||||||
|
if (multiColumn[idx].labelCol != null)//检查字段是否有配置标题宽度
|
||||||
|
Object.assign(itemProps, {
|
||||||
|
labelCol: { span: multiColumn[idx].labelCol },
|
||||||
|
wrapperCol: { span: 24 - multiColumn[idx].labelCol }
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
Object.assign(itemProps, {
|
||||||
|
labelCol: { span: labelCol },
|
||||||
|
wrapperCol: { span: 24 - labelCol }
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
coms != null && formItems.push({
|
||||||
|
com: (<WeaFormItem {...itemProps}>{coms}</WeaFormItem>),
|
||||||
|
col
|
||||||
|
});
|
||||||
|
|
||||||
|
if (childrenComponents && childrenComponents[field.domkey[0]]) {
|
||||||
|
childrenComponents[field.domkey[0]]().map(child => formItems.push(child));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
groupArr.push(<WeaSearchGroup
|
||||||
|
center={this.props.center != null ? this.props.center : true}
|
||||||
|
needTigger={true}
|
||||||
|
title={formFields.length < 2 ? null : fields.title}
|
||||||
|
showGroup={true}
|
||||||
|
items={formItems}
|
||||||
|
col={col}
|
||||||
|
fontSize={14}/>);
|
||||||
|
});
|
||||||
|
return groupArr;
|
||||||
|
};
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const { formFields, className, form } = this.props;
|
||||||
|
if (formFields == null || !form.isFormInit) return (<div></div>);
|
||||||
|
return (
|
||||||
|
<div className={className}>{this.renderForm()}</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -41,7 +41,7 @@ class PersonalScopeTable extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
getPersonalScopeList = (tabActive = this.props.tabActive) => {
|
getPersonalScopeList = (tabActive = this.props.tabActive) => {
|
||||||
const { searchValue, searchKeyVal, APIFox } = this.props;
|
const { searchValue, searchKeyVal, APIFox, showOperateBtn } = this.props;
|
||||||
const { pageInfo, loading } = this.state;
|
const { pageInfo, loading } = this.state;
|
||||||
const payload = {
|
const payload = {
|
||||||
[searchKeyVal["key"]]: searchKeyVal["value"],
|
[searchKeyVal["key"]]: searchKeyVal["value"],
|
||||||
|
|
@ -60,7 +60,7 @@ class PersonalScopeTable extends Component {
|
||||||
return {
|
return {
|
||||||
...item,
|
...item,
|
||||||
render: (text, record) => {
|
render: (text, record) => {
|
||||||
if (item.dataIndex === "targetName") {
|
if (item.dataIndex === "targetName" && showOperateBtn) {
|
||||||
return <a href="javascript:void(0);" onClick={() => this.props.onEditScope(record)}>{text}</a>;
|
return <a href="javascript:void(0);" onClick={() => this.props.onEditScope(record)}>{text}</a>;
|
||||||
}
|
}
|
||||||
return <span className="tdEllipsis" title={text}>{text}</span>;
|
return <span className="tdEllipsis" title={text}>{text}</span>;
|
||||||
|
|
|
||||||
|
|
@ -18,8 +18,10 @@ CodeMirror.extendMode("javascript", {
|
||||||
if (this.jsonMode) {
|
if (this.jsonMode) {
|
||||||
return /^[\[,{]$/.test(content) || /^}/.test(textAfter) || /^]/.test(textAfter);
|
return /^[\[,{]$/.test(content) || /^}/.test(textAfter) || /^]/.test(textAfter);
|
||||||
} else {
|
} else {
|
||||||
if (content == ";" && state.lexical && state.lexical.type == ")") return false;
|
if (content == ";" && state.lexical && state.lexical.type == "}") return false;
|
||||||
return /^[;{}]$/.test(content) && !/^;/.test(textAfter);
|
// if (content == ";" && state.lexical && state.lexical.type == ")") return false;
|
||||||
|
return /[=,]/.test(content) || /.*\)/.test(textAfter);
|
||||||
|
// return /^[;{}]$/.test(content) && !/^;/.test(textAfter);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -94,7 +96,8 @@ CodeMirror.defineExtension("autoFormatRange", function (from, to) {
|
||||||
atSol = false;
|
atSol = false;
|
||||||
}
|
}
|
||||||
if (!atSol && inner.mode.newlineAfterToken &&
|
if (!atSol && inner.mode.newlineAfterToken &&
|
||||||
inner.mode.newlineAfterToken(style, cur, stream.string.slice(stream.pos) || text[i + 1] || "", inner.state))
|
// inner.mode.newlineAfterToken(style, cur, stream.string.slice(stream.pos) || text[i + 1] || "", inner.state))
|
||||||
|
inner.mode.newlineAfterToken(style, cur, stream.string.slice(stream.pos, stream.pos + 2) || text[i + 1] || "", inner.state))
|
||||||
newline();
|
newline();
|
||||||
}
|
}
|
||||||
if (!stream.pos && outer.blankLine) outer.blankLine(state);
|
if (!stream.pos && outer.blankLine) outer.blankLine(state);
|
||||||
|
|
|
||||||
|
|
@ -46,8 +46,8 @@ class Index extends Component {
|
||||||
const payload = {
|
const payload = {
|
||||||
...pageInfo, ...extra,
|
...pageInfo, ...extra,
|
||||||
departmentIds: departmentIds ? departmentIds.split(",") : [],
|
departmentIds: departmentIds ? departmentIds.split(",") : [],
|
||||||
positionIds: departmentIds ? departmentIds.split(",") : [],
|
positionIds: positionIds ? positionIds.split(",") : [],
|
||||||
operatorIds: departmentIds ? departmentIds.split(",") : [],
|
operatorIds: operatorIds ? operatorIds.split(",") : [],
|
||||||
effectiveTime: effectiveTime1 ? [effectiveTime1, effectiveTime2] : [],
|
effectiveTime: effectiveTime1 ? [effectiveTime1, effectiveTime2] : [],
|
||||||
operateTime: operateTime1 ? [operateTime1, operateTime2] : []
|
operateTime: operateTime1 ? [operateTime1, operateTime2] : []
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -289,6 +289,7 @@ class LedgerAssociatedPersonnel extends Component {
|
||||||
APIFox={APIFox}
|
APIFox={APIFox}
|
||||||
tabActive={selectedKey}
|
tabActive={selectedKey}
|
||||||
searchValue={searchValue}
|
searchValue={searchValue}
|
||||||
|
showOperateBtn={showOperateBtn}
|
||||||
onChangeSelectKey={rowKeys => this.setState({ rowKeys })}
|
onChangeSelectKey={rowKeys => this.setState({ rowKeys })}
|
||||||
onEditScope={this.handleAddPersonal}
|
onEditScope={this.handleAddPersonal}
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
|
|
@ -254,20 +254,19 @@ class LedgerSalaryItem extends Component {
|
||||||
* Params:
|
* Params:
|
||||||
* Date: 2022/12/14
|
* Date: 2022/12/14
|
||||||
*/
|
*/
|
||||||
handleAddSalaryItems = (id, items) => {
|
handleAddSalaryItems = (id, items, insertId) => {
|
||||||
const { itemGroups } = this.state;
|
const { itemGroups } = this.state;
|
||||||
this.setState({
|
this.setState({
|
||||||
itemGroups: _.map(itemGroups, it => {
|
itemGroups: _.map(itemGroups, it => {
|
||||||
if (id === it.uuid) {
|
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 {
|
return {
|
||||||
...it, items: _.map([..._.map(items, child => {
|
...it, items: _.map(insertId ? it.items : [...items, ...it.items], (childItem, childItemIndex) => {
|
||||||
const { id: itemsId, ...extraItems } = child;
|
return { ...childItem, sortedIndex: childItemIndex };
|
||||||
return { ...extraItems, salaryItemGroupId: it.uuid };
|
|
||||||
}), ...it.items], (childItem, childItemIndex) => {
|
|
||||||
return {
|
|
||||||
...childItem,
|
|
||||||
sortedIndex: childItemIndex
|
|
||||||
};
|
|
||||||
})
|
})
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,25 +1,15 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { Button, Switch } from "antd";
|
import { Button, Spin } from "antd";
|
||||||
import { WeaDialog, WeaInputSearch, WeaTable } from "ecCom";
|
import { WeaCheckbox, WeaDialog, WeaInputSearch, WeaLocaleProvider, WeaTable } from "ecCom";
|
||||||
import { listSalaryItem } from "../../../apis/ledger";
|
import { listSalaryItem } from "../../../apis/ledger";
|
||||||
|
|
||||||
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
export default class LedgerSalaryItemAddModal extends React.Component {
|
export default class LedgerSalaryItemAddModal extends React.Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
this.state = {
|
this.state = {
|
||||||
loading: {
|
loading: { query: false }, name: "", selectedRowKeys: [], dataSource: [],
|
||||||
query: false
|
dataSourceCopy: [], columns: [], pageInfo: { current: 1, pageSize: 10, total: 0 }
|
||||||
},
|
|
||||||
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);
|
excludeIds.push(i.salaryItemId);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
const payload = {
|
const payload = { excludeIds, name, ...pageInfo, ...extra };
|
||||||
excludeIds,
|
|
||||||
name,
|
|
||||||
...pageInfo,
|
|
||||||
...extra
|
|
||||||
};
|
|
||||||
this.setState({ loading: { ...loading, query: true } });
|
this.setState({ loading: { ...loading, query: true } });
|
||||||
listSalaryItem(payload).then(({ status, data }) => {
|
listSalaryItem(payload).then(({ status, data }) => {
|
||||||
this.setState({ loading: { ...loading, query: false } });
|
this.setState({ loading: { ...loading, query: false } });
|
||||||
|
|
@ -56,9 +41,7 @@ export default class LedgerSalaryItemAddModal extends React.Component {
|
||||||
const tmpV = !_.isEmpty(dataSource) ? dataSource : [];
|
const tmpV = !_.isEmpty(dataSource) ? dataSource : [];
|
||||||
this.setState({
|
this.setState({
|
||||||
dataSourceCopy: [...dataSourceCopy, ...tmpV],
|
dataSourceCopy: [...dataSourceCopy, ...tmpV],
|
||||||
pageInfo: { ...pageInfo, current, pageSize, total },
|
pageInfo: { ...pageInfo, current, pageSize, total }, dataSource: tmpV, columns
|
||||||
dataSource: tmpV,
|
|
||||||
columns
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
|
|
@ -76,7 +59,7 @@ export default class LedgerSalaryItemAddModal extends React.Component {
|
||||||
case "useDefault":
|
case "useDefault":
|
||||||
case "hideDefault":
|
case "hideDefault":
|
||||||
case "useInEmployeeSalary":
|
case "useInEmployeeSalary":
|
||||||
return <Switch checked={text === 1}/>;
|
return <WeaCheckbox value={String(text)} disabled display="switch"/>;
|
||||||
default:
|
default:
|
||||||
return <div dangerouslySetInnerHTML={{ __html: valueSpan }}/>;
|
return <div dangerouslySetInnerHTML={{ __html: valueSpan }}/>;
|
||||||
}
|
}
|
||||||
|
|
@ -85,10 +68,9 @@ export default class LedgerSalaryItemAddModal extends React.Component {
|
||||||
});
|
});
|
||||||
return newColumns;
|
return newColumns;
|
||||||
};
|
};
|
||||||
|
|
||||||
handleAdd = () => {
|
handleAdd = () => {
|
||||||
const { dataSourceCopy, selectedRowKeys } = this.state;
|
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 || [];
|
const arrItems = _.find(itemGroups, it => it.uuid === id).items || [];
|
||||||
let selectItems = [];
|
let selectItems = [];
|
||||||
_.uniqWith(dataSourceCopy, _.isEqual).map((item) => {
|
_.uniqWith(dataSourceCopy, _.isEqual).map((item) => {
|
||||||
|
|
@ -104,12 +86,21 @@ export default class LedgerSalaryItemAddModal extends React.Component {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
onCancel();
|
onCancel();
|
||||||
onAddSalaryItems(id, selectItems);
|
onAddSalaryItems(id, selectItems, record.id || record.key);
|
||||||
|
};
|
||||||
|
renderTitle = () => {
|
||||||
|
const { name, pageInfo } = this.state;
|
||||||
|
return <div className="sys-item-title">
|
||||||
|
<span>{getLabel(111, "添加薪资项目")}</span>
|
||||||
|
<WeaInputSearch value={name} onChange={val => this.setState({ name: val })} style={{ width: 200 }}
|
||||||
|
placeholder={getLabel(111, "请输入薪资项目名称")} onSearch={() => this.setState({
|
||||||
|
pageInfo: { ...pageInfo, current: 1 }
|
||||||
|
}, () => this.listSalaryItem())}/>
|
||||||
|
</div>;
|
||||||
};
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { onCancel, visible } = this.props;
|
const { selectedRowKeys, pageInfo, dataSource, loading } = this.state;
|
||||||
const { name, selectedRowKeys, pageInfo, dataSource, loading } = this.state;
|
|
||||||
const pagination = {
|
const pagination = {
|
||||||
...pageInfo,
|
...pageInfo,
|
||||||
showTotal: total => `共 ${total} 条`,
|
showTotal: total => `共 ${total} 条`,
|
||||||
|
|
@ -117,49 +108,31 @@ export default class LedgerSalaryItemAddModal extends React.Component {
|
||||||
showSizeChanger: true,
|
showSizeChanger: true,
|
||||||
pageSizeOptions: ["10", "20", "50", "100"],
|
pageSizeOptions: ["10", "20", "50", "100"],
|
||||||
onShowSizeChange: (current, pageSize) => {
|
onShowSizeChange: (current, pageSize) => {
|
||||||
this.setState({
|
this.setState({ pageInfo: { ...pageInfo, current: 1, pageSize } }, () => this.listSalaryItem());
|
||||||
pageInfo: { ...pageInfo, current, pageSize }
|
|
||||||
}, () => this.listSalaryItem());
|
|
||||||
},
|
},
|
||||||
onChange: current => {
|
onChange: current => {
|
||||||
this.setState({
|
this.setState({ pageInfo: { ...pageInfo, current } }, () => this.listSalaryItem());
|
||||||
pageInfo: { ...pageInfo, current }
|
|
||||||
}, () => this.listSalaryItem());
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const rowSelection = {
|
const rowSelection = {
|
||||||
selectedRowKeys,
|
selectedRowKeys, onChange: (selectedRowKeys) => this.setState({ selectedRowKeys })
|
||||||
onChange: (selectedRowKeys) => {
|
|
||||||
this.setState({ selectedRowKeys }, () => {
|
|
||||||
});
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
return (
|
return (
|
||||||
<WeaDialog
|
<WeaDialog {...this.props} initLoadCss className="sys-salary-wrapper" ref={dom => this.sysItemRef = dom}
|
||||||
visible={visible} onCancel={onCancel} hasScroll
|
title={this.renderTitle()}
|
||||||
title="添加薪资项目" style={{
|
buttons={[<Button type="primary" onClick={this.handleAdd}
|
||||||
width: "80vw", height: 606.6, minHeight: 200,
|
disabled={_.isEmpty(selectedRowKeys)}>{getLabel(111, "添加")}</Button>]}
|
||||||
minWidth: 380, maxHeight: "80%", maxWidth: "80vw",
|
style={{
|
||||||
overflow: "hidden", transform: "translate(0px, 0px)"
|
width: "60vw", height: 600, minHeight: 200, minWidth: 380,
|
||||||
}}
|
maxHeight: "90%", maxWidth: "90%", overflow: "hidden", transform: "translate(0px, 0px)"
|
||||||
buttons={[<Button type="primary" onClick={this.handleAdd} disabled={_.isEmpty(selectedRowKeys)}>添加</Button>]}
|
}}>
|
||||||
>
|
<div className="sys-item-table-box">
|
||||||
<div style={{ display: "flex", justifyContent: "flex-end", alignItems: "center", padding: 20 }}>
|
<Spin spinning={loading.query && pageInfo.total === 0}>
|
||||||
<WeaInputSearch
|
<WeaTable columns={this.getSalaryItemAddColumns()} dataSource={dataSource} pagination={pagination}
|
||||||
placeholder="请输入薪资项目名称"
|
loading={loading.query} scroll={{ y: this.sysItemRef ? this.sysItemRef.state.height - 112 : 600 }}
|
||||||
value={name}
|
rowKey={record => record.id || record.key} rowSelection={rowSelection}/>
|
||||||
onChange={(name) => this.setState({ name })}
|
</Spin>
|
||||||
onSearch={() => this.listSalaryItem({ current: 1 })}
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
<WeaTable
|
|
||||||
rowKey={record => record.id || record.key}
|
|
||||||
rowSelection={rowSelection}
|
|
||||||
dataSource={dataSource}
|
|
||||||
pagination={pagination}
|
|
||||||
loading={loading.query}
|
|
||||||
columns={this.getSalaryItemAddColumns()}
|
|
||||||
/>
|
|
||||||
</WeaDialog>
|
</WeaDialog>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ class LedgerSalaryItemNormal extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
this.state = {
|
this.state = {
|
||||||
addCategoryItemsVisible: false,
|
addCategoryItemsVisible: { visible: false, id: "", record: {} },
|
||||||
categoryModal: {
|
categoryModal: {
|
||||||
visible: false,
|
visible: false,
|
||||||
title: "新增分类",
|
title: "新增分类",
|
||||||
|
|
@ -170,7 +170,11 @@ class LedgerSalaryItemNormal extends Component {
|
||||||
onEditCategory={this.handleAddCategory}
|
onEditCategory={this.handleAddCategory}
|
||||||
onDeleteCategory={this.handleDeleteCategory}
|
onDeleteCategory={this.handleDeleteCategory}
|
||||||
onDeleteCategoryItems={this.handleDeleteCategoryItems}
|
onDeleteCategoryItems={this.handleDeleteCategoryItems}
|
||||||
onAddCategoryItems={(id) => this.setState({ addCategoryItemsVisible: { visible: true, id } })}
|
onAddCategoryItems={(id) => this.setState({
|
||||||
|
addCategoryItemsVisible: {
|
||||||
|
...addCategoryItemsVisible, visible: true, id
|
||||||
|
}
|
||||||
|
})}
|
||||||
onUpgo={this.handleUpgo}
|
onUpgo={this.handleUpgo}
|
||||||
onDowngo={this.handleDowngo}
|
onDowngo={this.handleDowngo}
|
||||||
/>
|
/>
|
||||||
|
|
@ -178,13 +182,16 @@ class LedgerSalaryItemNormal extends Component {
|
||||||
>
|
>
|
||||||
<LedgerSalaryItemTable
|
<LedgerSalaryItemTable
|
||||||
tableData={items}
|
tableData={items}
|
||||||
dataSource={_.find(dataSource, childItem => childItem.id === id || childItem.uuid === uuid).items}
|
dataSource={_.find(newDateSource, childItem => childItem.uuid === uuid).items}
|
||||||
salarySobId={editId || saveSalarySobId}
|
salarySobId={editId || saveSalarySobId}
|
||||||
selectedRowKeys={field.selectedRowKeys || []}
|
selectedRowKeys={field.selectedRowKeys || []}
|
||||||
onDropCategoryItem={(data) => onDropCategoryItem(field, data)}
|
onDropCategoryItem={(data) => onDropCategoryItem(field, data)}
|
||||||
onHandleItemhide={(data) => onHandleItemhide(field, data)}
|
onHandleItemhide={(data) => onHandleItemhide(field, data)}
|
||||||
onChangeSelectedRowKeys={(data) => onChangeSelectedRowKeys(field, data)}
|
onChangeSelectedRowKeys={(data) => onChangeSelectedRowKeys(field, data)}
|
||||||
onMoveTo={this.handleMoveTo}
|
onMoveTo={this.handleMoveTo}
|
||||||
|
onAddCategoryItems={(record) => this.setState({
|
||||||
|
addCategoryItemsVisible: { visible: true, record, id: uuid }
|
||||||
|
})}
|
||||||
/>
|
/>
|
||||||
</WeaSearchGroup>;
|
</WeaSearchGroup>;
|
||||||
})
|
})
|
||||||
|
|
@ -198,7 +205,7 @@ class LedgerSalaryItemNormal extends Component {
|
||||||
<LedgerSalaryItemAddModal
|
<LedgerSalaryItemAddModal
|
||||||
{...addCategoryItemsVisible}
|
{...addCategoryItemsVisible}
|
||||||
itemGroups={dataSource}
|
itemGroups={dataSource}
|
||||||
onCancel={() => this.setState({ addCategoryItemsVisible: { visible: false, id: "" } })}
|
onCancel={() => this.setState({ addCategoryItemsVisible: { visible: false, id: "", record: {} } })}
|
||||||
onAddSalaryItems={onAddSalaryItems}
|
onAddSalaryItems={onAddSalaryItems}
|
||||||
/>
|
/>
|
||||||
<CategoryAddModal
|
<CategoryAddModal
|
||||||
|
|
|
||||||
|
|
@ -295,11 +295,13 @@ class LedgerSalaryItemTable extends Component {
|
||||||
title: "操作",
|
title: "操作",
|
||||||
dataIndex: "operate",
|
dataIndex: "operate",
|
||||||
key: "operate",
|
key: "operate",
|
||||||
width: 120,
|
width: 180,
|
||||||
render: (_, record) => (
|
render: (_, record) => (
|
||||||
<React.Fragment>
|
<React.Fragment>
|
||||||
<a href="javascript:void(0);" onClick={() => this.handleEditSalaryItem(record)}
|
<a href="javascript:void(0);" onClick={() => this.handleEditSalaryItem(record)}
|
||||||
style={{ marginRight: 10 }}>编辑</a>
|
style={{ marginRight: 10 }}>编辑</a>
|
||||||
|
<a href="javascript:void(0);" onClick={() => this.props.onAddCategoryItems(record)}
|
||||||
|
style={{ marginRight: 10 }}>{getLabel(111, "插入")}</a>
|
||||||
<a href="javascript:void(0);" onClick={() => onMoveTo(record)}>移动到</a>
|
<a href="javascript:void(0);" onClick={() => onMoveTo(record)}>移动到</a>
|
||||||
</React.Fragment>
|
</React.Fragment>
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -86,7 +86,7 @@ class LedgerSlide extends Component {
|
||||||
* Date: 2022/12/12
|
* Date: 2022/12/12
|
||||||
*/
|
*/
|
||||||
saveLedgerAdjustRule = () => {
|
saveLedgerAdjustRule = () => {
|
||||||
const { adjustRules, saveSalarySobId } = this.state;
|
const { adjustRules, saveSalarySobId, salaryApprovalStatus } = this.state;
|
||||||
const payload = {
|
const payload = {
|
||||||
salarySobId: this.props.editId || saveSalarySobId,
|
salarySobId: this.props.editId || saveSalarySobId,
|
||||||
ruleParams: adjustRules
|
ruleParams: adjustRules
|
||||||
|
|
@ -96,6 +96,7 @@ class LedgerSlide extends Component {
|
||||||
this.setState({ loading: false });
|
this.setState({ loading: false });
|
||||||
if (status) {
|
if (status) {
|
||||||
message.success("保存成功");
|
message.success("保存成功");
|
||||||
|
!salaryApprovalStatus && this.handleClose();
|
||||||
} else {
|
} else {
|
||||||
message.success(errormsg || "保存失败");
|
message.success(errormsg || "保存失败");
|
||||||
}
|
}
|
||||||
|
|
@ -259,7 +260,7 @@ class LedgerSlide extends Component {
|
||||||
<Button type="ghost"
|
<Button type="ghost"
|
||||||
onClick={() => this.setState({ current: current - 1 })}>{getLabel(111, "上一步")}</Button>,
|
onClick={() => this.setState({ current: current - 1 })}>{getLabel(111, "上一步")}</Button>,
|
||||||
<Button type="primary"
|
<Button type="primary"
|
||||||
onClick={() => this.setState({ current: current + 1 }, () => this.saveLedgerAdjustRule())}>{getLabel(111, "保存并进入下一步")}</Button>
|
onClick={() => this.setState({ current: !salaryApprovalStatus ? current : current + 1 }, () => this.saveLedgerAdjustRule())}>{!salaryApprovalStatus ? getLabel(111, "完成") : getLabel(111, "保存并进入下一步")}</Button>
|
||||||
],
|
],
|
||||||
editBtns: [
|
editBtns: [
|
||||||
<Button type="primary" loading={loading}
|
<Button type="primary" loading={loading}
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ class Index extends Component {
|
||||||
<span>{moment(it.sendTime).format("YYYY-MM")}</span>
|
<span>{moment(it.sendTime).format("YYYY-MM")}</span>
|
||||||
</div>
|
</div>
|
||||||
<a
|
<a
|
||||||
href={`/spa/hrmSalary/static/index.html#/main/hrmSalary/mobilepayroll?id=${it.id}&recipient=${it.employeeId}&type=phone`}
|
href={`/spa/hrmSalary/static/index.html#/main/hrmSalary/mobilepayroll?id=${it.id}&salaryCode=${it.salaryCode}&type=phone`}
|
||||||
target="_blank">
|
target="_blank">
|
||||||
{`${getLabel(33564, "查看")}>`}
|
{`${getLabel(33564, "查看")}>`}
|
||||||
</a>
|
</a>
|
||||||
|
|
|
||||||
|
|
@ -152,6 +152,22 @@ export const conditions = [
|
||||||
lanId: 538004,
|
lanId: 538004,
|
||||||
defaultshow: true
|
defaultshow: true
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
items: [
|
||||||
|
{
|
||||||
|
conditionType: "SWITCH",
|
||||||
|
domkey: ["ATTENDANCE_SERIAL_COLLECTION_BTN"],
|
||||||
|
fieldcol: 10,
|
||||||
|
label: "考勤引用是否采集班次数据",
|
||||||
|
lanId: 111,
|
||||||
|
labelcol: 8,
|
||||||
|
viewAttr: 2
|
||||||
|
}
|
||||||
|
],
|
||||||
|
title: "数据采集",
|
||||||
|
lanId: 111,
|
||||||
|
defaultshow: true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
items: [
|
items: [
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -153,6 +153,7 @@ class RuleConfig extends Component {
|
||||||
case "APPROVAL_CAN_MANUAL_FILE_STATUS":
|
case "APPROVAL_CAN_MANUAL_FILE_STATUS":
|
||||||
case "APPROVAL_CAN_RE_CALC_STATUS":
|
case "APPROVAL_CAN_RE_CALC_STATUS":
|
||||||
case "APPROVAL_CAN_EDIT_RESULT_STATUS":
|
case "APPROVAL_CAN_EDIT_RESULT_STATUS":
|
||||||
|
case "ATTENDANCE_SERIAL_COLLECTION_BTN":
|
||||||
if (!this.handleDebounce) {
|
if (!this.handleDebounce) {
|
||||||
this.handleDebounce = _.debounce(() => {
|
this.handleDebounce = _.debounce(() => {
|
||||||
const confTitle = {
|
const confTitle = {
|
||||||
|
|
@ -169,7 +170,8 @@ class RuleConfig extends Component {
|
||||||
SALARY_APPROVAL_STATUS: getLabel(111, "是否开启薪资审批"),
|
SALARY_APPROVAL_STATUS: getLabel(111, "是否开启薪资审批"),
|
||||||
APPROVAL_CAN_MANUAL_FILE_STATUS: getLabel(111, "开启审批的核算记录允许手动归档"),
|
APPROVAL_CAN_MANUAL_FILE_STATUS: getLabel(111, "开启审批的核算记录允许手动归档"),
|
||||||
APPROVAL_CAN_RE_CALC_STATUS: getLabel(111, "开启审批的核算记录允许重新核算"),
|
APPROVAL_CAN_RE_CALC_STATUS: getLabel(111, "开启审批的核算记录允许重新核算"),
|
||||||
APPROVAL_CAN_EDIT_RESULT_STATUS: getLabel(111, "审批流程发起后允许修改核算数据")
|
APPROVAL_CAN_EDIT_RESULT_STATUS: getLabel(111, "审批流程发起后允许修改核算数据"),
|
||||||
|
ATTENDANCE_SERIAL_COLLECTION_BTN: getLabel(111, "考勤引用是否采集班次数据")
|
||||||
};
|
};
|
||||||
this.unifiedSettings(key, confTitle[key]);
|
this.unifiedSettings(key, confTitle[key]);
|
||||||
this.handleDebounce = null;
|
this.handleDebounce = null;
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ export default class SystemSalaryItemModal extends React.Component {
|
||||||
return <div className="sys-item-title">
|
return <div className="sys-item-title">
|
||||||
<span>{getLabel(111, "添加系统薪资项目")}</span>
|
<span>{getLabel(111, "添加系统薪资项目")}</span>
|
||||||
<WeaInputSearch value={name} onChange={val => this.setState({ name: val })} style={{ width: 200 }}
|
<WeaInputSearch value={name} onChange={val => this.setState({ name: val })} style={{ width: 200 }}
|
||||||
placeholder={getLabel(111, "请输入薪资项目名称")} a onSearch={() => this.setState({
|
placeholder={getLabel(111, "请输入薪资项目名称")} onSearch={() => this.setState({
|
||||||
pageInfo: { ...pageInfo, current: 1 }
|
pageInfo: { ...pageInfo, current: 1 }
|
||||||
}, () => this.getSysItemList())}/>
|
}, () => this.getSysItemList())}/>
|
||||||
</div>;
|
</div>;
|
||||||
|
|
@ -92,7 +92,7 @@ export default class SystemSalaryItemModal extends React.Component {
|
||||||
<div className="sys-item-table-box">
|
<div className="sys-item-table-box">
|
||||||
<Spin spinning={loading && pageInfo.total === 0}>
|
<Spin spinning={loading && pageInfo.total === 0}>
|
||||||
<WeaTable columns={columns} dataSource={dataSource} pagination={pagination} rowSelection={rowSelection}
|
<WeaTable columns={columns} dataSource={dataSource} pagination={pagination} rowSelection={rowSelection}
|
||||||
loading={loading} scroll={{ y: this.importRef ? this.sysItemRef.state.height - 16 : 600 }}
|
loading={loading} scroll={{ y: this.sysItemRef ? this.sysItemRef.state.height - 16 : 600 }}
|
||||||
rowKey="id"/>
|
rowKey="id"/>
|
||||||
</Spin>
|
</Spin>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -116,7 +116,7 @@ class Index extends Component {
|
||||||
} else if (getKey(g).indexOf("StartTime") !== -1) {
|
} else if (getKey(g).indexOf("StartTime") !== -1) {
|
||||||
return {
|
return {
|
||||||
...g, label: getLabel(g.lanId, g.label),
|
...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 {
|
return {
|
||||||
|
|
|
||||||
|
|
@ -84,7 +84,7 @@ class PlanSetTable extends Component {
|
||||||
com: [{
|
com: [{
|
||||||
type: "custom",
|
type: "custom",
|
||||||
key: "custom",
|
key: "custom",
|
||||||
render: text => (<span>{text}</span>)
|
render: text => (<span className="text-td-elli" title={text}>{text}</span>)
|
||||||
}]
|
}]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -232,6 +232,14 @@
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.text-td-elli {
|
||||||
|
display: inline-block;
|
||||||
|
width: 120px;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -128,3 +128,10 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//公共表格操作按钮间距
|
||||||
|
.space_div {
|
||||||
|
a:not(:last-child) {
|
||||||
|
margin-right: 8px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue