Merge branch 'hotfix/2.14.2.2406.02' into release/2.14.4.2406.02
This commit is contained in:
commit
4a5328791d
|
|
@ -0,0 +1,17 @@
|
|||
import React, { Component } from "react";
|
||||
import { WeaLocaleProvider, WeaReqTop } from "ecCom";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
class Index extends Component {
|
||||
render() {
|
||||
return (
|
||||
<WeaReqTop
|
||||
title={getLabel(111, "编辑账套")} icon={<i className="icon-coms-fa"/>} iconBgcolor="#F14A2D"
|
||||
showDropIcon={false} tabDatas={this.props.tabDatas} {...this.props}
|
||||
/>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Index;
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
import React, { Component } from "react";
|
||||
import { WeaLocaleProvider, WeaTop } from "ecCom";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
class Index extends Component {
|
||||
render() {
|
||||
return (
|
||||
<WeaTop title={getLabel(111, "新建账套")} icon={<i className="icon-coms-fa"/>}
|
||||
iconBgcolor="#F14A2D" {...this.props}/>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Index;
|
||||
|
|
@ -5,9 +5,11 @@
|
|||
* Date: 2023/9/5
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaTable } from "ecCom";
|
||||
import { WeaLocaleProvider, WeaTable } from "ecCom";
|
||||
import { postFetch } from "../../../util/request";
|
||||
|
||||
const { getLabel } = WeaLocaleProvider;
|
||||
|
||||
class ImpStep2 extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
|
@ -41,9 +43,15 @@ class ImpStep2 extends Component {
|
|||
render() {
|
||||
const { dataSource, columns, loading } = this.state;
|
||||
const { scrollHeight } = this.props;
|
||||
const pagination = {
|
||||
showTotal: total => `${getLabel(111, "共")} ${total} ${getLabel(111, "条")}`,
|
||||
total: dataSource.length,
|
||||
showSizeChanger: true
|
||||
};
|
||||
return (
|
||||
<WeaTable
|
||||
dataSource={dataSource} columns={columns} loading={loading} scroll={{ x: 800, y: `${scrollHeight}px` }}
|
||||
pagination={pagination}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ class SalaryDetails extends Component {
|
|||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (nextProps.isQuery !== this.props.isQuery) this.setState({
|
||||
pageInfo: { ...this.state.pageInfo, current: 1 }
|
||||
pageInfo: { ...this.state.pageInfo, current: 1 }, updateSum: true
|
||||
}, () => this.getSalaryList(nextProps));
|
||||
}
|
||||
|
||||
|
|
@ -56,7 +56,7 @@ class SalaryDetails extends Component {
|
|||
const { pageNum: current, size: pageSize } = params;
|
||||
this.setState({
|
||||
pageInfo: { ...pageInfo, current, pageSize },
|
||||
updateSum: true
|
||||
updateSum: false
|
||||
}, () => this.getSalaryList(this.props));
|
||||
} else if (id === "CHECKBOX") {
|
||||
const { selectedRowKeys: checkBox } = params;
|
||||
|
|
|
|||
|
|
@ -9,7 +9,19 @@
|
|||
}
|
||||
}
|
||||
|
||||
.ledgerSlideContent {
|
||||
.ledgerSlideLayout {
|
||||
.wea-new-top {
|
||||
.ant-col-10 {
|
||||
padding-right: 45px !important;
|
||||
}
|
||||
}
|
||||
|
||||
.wea-new-top-req-wapper .wea-new-top-req-title > div:last-child {
|
||||
right: 45px !important;
|
||||
}
|
||||
|
||||
.ledgerSlideContent {
|
||||
}
|
||||
}
|
||||
|
||||
.copyWrapper {
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import React, { Component } from "react";
|
|||
import { WeaLocaleProvider, WeaSlideModal } from "ecCom";
|
||||
import SlideModalTitle from "../../../components/slideModalTitle";
|
||||
import SalaryItemForm from "../../salaryItem/salaryItemForm";
|
||||
import { toDecimal_n } from "../../../util";
|
||||
import "./index.less";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
|
@ -21,7 +22,8 @@ class LedgerSalaryItemEditSlide extends Component {
|
|||
handleChange = (params) => {
|
||||
const request = { ...this.props.request, ...params };
|
||||
const key = Object.keys(params)[0];
|
||||
this.props.onUpdateRequest(request, key);
|
||||
const { defaultValue, pattern, ...extra } = request;
|
||||
this.props.onUpdateRequest({ ...extra, pattern, defaultValue: toDecimal_n(defaultValue, parseInt(pattern)) }, key);
|
||||
};
|
||||
handleShowFormal = (salaryItemName) => this.props.onEditFormnul(salaryItemName);
|
||||
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ class LedgerSalaryItemTable extends Component {
|
|||
handleEditSalaryItem = async (record) => {
|
||||
const { salarySobId, dataSource } = this.props, { salaryItemId, id } = record;
|
||||
const {
|
||||
itemHide: hideDefault,
|
||||
itemHide: hideDefault, defaultValue,
|
||||
valueType, name, description,
|
||||
roundingMode, formulaId, dataType, useInEmployeeSalary,
|
||||
pattern, canEdit, formulaContent, originFormulaContent, originSqlContent
|
||||
|
|
@ -123,7 +123,7 @@ class LedgerSalaryItemTable extends Component {
|
|||
...this.state.salaryItemPayload,
|
||||
visible: true,
|
||||
request: {
|
||||
canEdit, dataType, description,
|
||||
canEdit, dataType, description, defaultValue,
|
||||
formulaContent, formulaId, name,
|
||||
hideDefault: _.isNil(hideDefault) ? "0" : hideDefault,
|
||||
valueType, roundingMode, pattern,
|
||||
|
|
@ -151,11 +151,11 @@ class LedgerSalaryItemTable extends Component {
|
|||
});
|
||||
const { salaryItemId } = record;
|
||||
const {
|
||||
hideDefault, roundingMode, pattern, valueType,
|
||||
hideDefault, roundingMode, pattern, valueType, defaultValue,
|
||||
originFormulaContent, originSqlContent, formulaId
|
||||
} = request;
|
||||
this.handleChangeSalaryItem({
|
||||
itemHide: hideDefault.toString(),
|
||||
itemHide: hideDefault.toString(), defaultValue,
|
||||
roundingMode, pattern, valueType,
|
||||
formulaContent: valueType.toString() === "2" ? originFormulaContent : originSqlContent,
|
||||
formulaId: ((valueType.toString() === "3" && (!originSqlContent || originSqlContent === " ")) || (valueType.toString() === "2" && (!originFormulaContent || originFormulaContent === " ")) || valueType.toString() === "1") ? "" : formulaId,
|
||||
|
|
|
|||
|
|
@ -6,25 +6,20 @@
|
|||
*/
|
||||
import React, { Component } from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { WeaSlideModal, WeaSteps } from "ecCom";
|
||||
import { WeaLocaleProvider, WeaSlideModal, WeaSteps } from "ecCom";
|
||||
import { Button, message, Modal } from "antd";
|
||||
import SlideModalTitle from "../../../components/slideModalTitle";
|
||||
import LedgerBaseSetting from "./ledgerBaseSetting";
|
||||
import LedgerAssociatedPersonnel from "./ledgerAssociatedPersonnel";
|
||||
import LedgerSalaryAdjustmentRules from "./ledgerSalaryAdjustmentRules";
|
||||
import LedgerBackCalculatedSalaryItem from "./ledgerBackCalculatedSalaryItem";
|
||||
import LedgerSalaryItem from "./ledgerSalaryItem";
|
||||
import WeaTopTitle from "../../../components/custom-title/weaTopTitle";
|
||||
import WeaReqTitle from "../../../components/custom-title/weaReqTitle";
|
||||
import { saveAdjustmentRule, saveLedgerBasic, saveLedgerItem } from "../../../apis/ledger";
|
||||
import "./index.less";
|
||||
|
||||
const { getLabel } = WeaLocaleProvider;
|
||||
const Step = WeaSteps.Step;
|
||||
const tabs = [
|
||||
{ key: 0, title: "基础设置" },
|
||||
{ key: 1, title: "关联人员" },
|
||||
{ key: 2, title: "薪资项目" },
|
||||
{ key: 3, title: "回算薪资项目" },
|
||||
{ key: 4, title: "调薪计薪规则" }
|
||||
];
|
||||
|
||||
@inject("taxAgentStore", "ledgerStore")
|
||||
@observer
|
||||
|
|
@ -32,12 +27,8 @@ class LedgerSlide extends Component {
|
|||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
current: 0,
|
||||
loading: false,
|
||||
baseSettingInfo: {},
|
||||
adjustRules: [],
|
||||
empFields: [], itemGroups: [],
|
||||
saveSalarySobId: ""
|
||||
current: 0, loading: false, baseSettingInfo: {}, adjustRules: [],
|
||||
empFields: [], itemGroups: [], saveSalarySobId: ""
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -142,128 +133,96 @@ class LedgerSlide extends Component {
|
|||
}
|
||||
}).catch(() => this.setState({ loading: false }));
|
||||
};
|
||||
handleChangeSlideTab = (current) => {
|
||||
this.setState({ current: Number(current) });
|
||||
};
|
||||
handleClose = () => {
|
||||
this.setState({ current: 0 }, () => this.props.onCancel());
|
||||
};
|
||||
handleClose = () => this.setState({ current: 0, baseSettingInfo: {} }, () => this.props.onCancel());
|
||||
/*
|
||||
* Author: 黎永顺
|
||||
* Description: 基础信息字段切换
|
||||
* Params:
|
||||
* Date: 2022/12/9
|
||||
*/
|
||||
handleChangeSaveParams = (baseSettingInfo) => {
|
||||
this.setState({ baseSettingInfo });
|
||||
};
|
||||
handleChangeSaveParams = (baseSettingInfo) => this.setState({ baseSettingInfo });
|
||||
/*
|
||||
* Author: 黎永顺
|
||||
* Description: 薪资项目保存数据
|
||||
* Params:
|
||||
* Date: 2022/12/14
|
||||
*/
|
||||
handleSaveSalaryItemParams = (empFields, itemGroups) => {
|
||||
this.setState({ empFields, itemGroups });
|
||||
};
|
||||
renderChildren = () => {
|
||||
const { current, saveSalarySobId } = this.state;
|
||||
let CurrentDom = null;
|
||||
switch (current) {
|
||||
case 0:
|
||||
CurrentDom = <LedgerBaseSetting {...this.props} onSaveParams={this.handleChangeSaveParams}/>;
|
||||
break;
|
||||
case 1:
|
||||
CurrentDom = <LedgerAssociatedPersonnel {...this.props} saveSalarySobId={saveSalarySobId}/>;
|
||||
break;
|
||||
case 2:
|
||||
CurrentDom = <LedgerSalaryItem {...this.props} saveSalarySobId={saveSalarySobId}
|
||||
onSaveSalaryItem={this.handleSaveSalaryItemParams}/>;
|
||||
break;
|
||||
case 3:
|
||||
CurrentDom = <LedgerBackCalculatedSalaryItem {...this.props} saveSalarySobId={saveSalarySobId}/>;
|
||||
break;
|
||||
case 4:
|
||||
CurrentDom =
|
||||
<LedgerSalaryAdjustmentRules {...this.props} saveSalarySobId={saveSalarySobId}
|
||||
onSaveParams={(adjustRules) => this.setState({ adjustRules })}/>;
|
||||
break;
|
||||
default:
|
||||
CurrentDom = null;
|
||||
break;
|
||||
}
|
||||
return CurrentDom;
|
||||
};
|
||||
renderCustomOperate = () => {
|
||||
const { taxAgentStore: { showOperateBtn }, editId } = this.props;
|
||||
const { current, loading } = this.state;
|
||||
let CurrentDom = [];
|
||||
//管理员操作权限
|
||||
if (showOperateBtn) {
|
||||
switch (current) {
|
||||
case 0:
|
||||
CurrentDom = [
|
||||
<Button
|
||||
type="primary"
|
||||
loading={loading}
|
||||
onClick={this.saveLedgerBasic}
|
||||
>{editId ? "保存" : "保存并进入下一步"}</Button>
|
||||
];
|
||||
break;
|
||||
case 1:
|
||||
CurrentDom = !editId ? [
|
||||
<Button type="ghost" onClick={this.handleClose}>完成,跳过所有步骤</Button>,
|
||||
<Button type="primary" onClick={() => this.setState({ current: current + 1 })}>下一步</Button>
|
||||
] : [];
|
||||
break;
|
||||
case 2:
|
||||
CurrentDom = !editId ?
|
||||
[
|
||||
<Button type="ghost" onClick={this.handleClose}>完成,跳过所有步骤</Button>,
|
||||
<Button type="ghost" onClick={() => this.setState({ current: current - 1 })}>上一步</Button>,
|
||||
<Button
|
||||
type="primary"
|
||||
loading={loading}
|
||||
onClick={() => {
|
||||
this.setState({ current: current + 1 }, () => {
|
||||
this.saveLedgerItem();
|
||||
});
|
||||
}}
|
||||
>保存并进入下一步</Button>
|
||||
] : [
|
||||
<Button type="primary" loading={loading} onClick={this.saveLedgerItem}>保存</Button>
|
||||
];
|
||||
break;
|
||||
case 3:
|
||||
CurrentDom = !editId ?
|
||||
[
|
||||
<Button type="ghost" onClick={this.handleClose}>完成,跳过所有步骤</Button>,
|
||||
<Button type="ghost" onClick={() => this.setState({ current: current - 1 })}>上一步</Button>,
|
||||
<Button type="primary" onClick={() => this.setState({ current: current + 1 })}>下一步</Button>
|
||||
] : [];
|
||||
break;
|
||||
case 4:
|
||||
CurrentDom = !editId ?
|
||||
[
|
||||
<Button type="ghost" onClick={() => this.setState({ current: current - 1 })}>上一步</Button>,
|
||||
<Button type="primary" loading={loading} onClick={this.saveLedgerAdjustRule}>完成</Button>
|
||||
] : [
|
||||
<Button type="primary" loading={loading} onClick={this.saveLedgerAdjustRule}>保存</Button>
|
||||
];
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
return CurrentDom;
|
||||
};
|
||||
handleSaveSalaryItemParams = (empFields, itemGroups) => this.setState({ empFields, itemGroups });
|
||||
|
||||
render() {
|
||||
const { title, visible, editId, taxAgentStore: { showOperateBtn } } = this.props;
|
||||
const { current } = this.state;
|
||||
const { visible, editId, taxAgentStore: { showOperateBtn } } = this.props;
|
||||
const { current, saveSalarySobId, loading } = this.state;
|
||||
let tabs = [
|
||||
{
|
||||
key: 0, title: getLabel(82751, "基础设置"),
|
||||
createBtns: [
|
||||
<Button type="primary" loading={loading}
|
||||
onClick={this.saveLedgerBasic}>{getLabel(111, "保存并进入下一步")}</Button>
|
||||
],
|
||||
editBtns: [
|
||||
<Button type="primary" loading={loading} onClick={this.saveLedgerBasic}>{getLabel(111, "保存")}</Button>
|
||||
],
|
||||
children: <LedgerBaseSetting
|
||||
{...this.props} onSaveParams={this.handleChangeSaveParams}
|
||||
onTaxableItemsChange={(val) => this.setState({ taxableItems: val })}
|
||||
/>
|
||||
},
|
||||
{
|
||||
key: 1, title: getLabel(543467, "关联人员"),
|
||||
createBtns: [
|
||||
<Button type="ghost" onClick={this.handleClose}>{getLabel(111, "完成,跳过所有步骤")}</Button>,
|
||||
<Button type="primary"
|
||||
onClick={() => this.setState({ current: current + 1 })}>{getLabel(111, "下一步")}</Button>
|
||||
],
|
||||
editBtns: [],
|
||||
children: <LedgerAssociatedPersonnel {...this.props} saveSalarySobId={saveSalarySobId}/>
|
||||
},
|
||||
{
|
||||
key: 2, title: getLabel(542362, "薪资项目"),
|
||||
createBtns: [
|
||||
<Button type="ghost" onClick={this.handleClose}>{getLabel(111, "完成,跳过所有步骤")}</Button>,
|
||||
<Button type="ghost"
|
||||
onClick={() => this.setState({ current: current - 1 })}>{getLabel(111, "上一步")}</Button>,
|
||||
<Button type="primary" loading={loading} onClick={() => {
|
||||
this.setState({ current: current + 1 }, () => this.saveLedgerItem());
|
||||
}}>{getLabel(111, "保存并进入下一步")}</Button>
|
||||
],
|
||||
editBtns: [
|
||||
<Button type="primary" loading={loading} onClick={this.saveLedgerItem}>{getLabel(111, "保存")}</Button>
|
||||
],
|
||||
children: <LedgerSalaryItem {...this.props} saveSalarySobId={saveSalarySobId}
|
||||
onSaveSalaryItem={this.handleSaveSalaryItemParams}/>
|
||||
},
|
||||
{
|
||||
key: 3, title: getLabel(543468, "回算薪资项目"),
|
||||
createBtns: [
|
||||
<Button type="ghost" onClick={this.handleClose}>{getLabel(111, "完成,跳过所有步骤")}</Button>,
|
||||
<Button type="ghost"
|
||||
onClick={() => this.setState({ current: current - 1 })}>{getLabel(111, "上一步")}</Button>,
|
||||
<Button type="primary"
|
||||
onClick={() => this.setState({ current: current + 1 })}>{getLabel(111, "下一步")}</Button>
|
||||
],
|
||||
editBtns: [],
|
||||
children: <LedgerBackCalculatedSalaryItem {...this.props} saveSalarySobId={saveSalarySobId}/>
|
||||
},
|
||||
{
|
||||
key: 4, title: getLabel(543469, "调薪计薪规则"),
|
||||
createBtns: [
|
||||
<Button type="ghost"
|
||||
onClick={() => this.setState({ current: current - 1 })}>{getLabel(111, "上一步")}</Button>,
|
||||
<Button type="primary" loading={loading} onClick={this.saveLedgerAdjustRule}>{getLabel(111, "完成")}</Button>
|
||||
],
|
||||
editBtns: [
|
||||
<Button type="primary" loading={loading}
|
||||
onClick={this.saveLedgerAdjustRule}>{getLabel(111, "保存")}</Button>
|
||||
],
|
||||
children: <LedgerSalaryAdjustmentRules {...this.props} saveSalarySobId={saveSalarySobId}
|
||||
onSaveParams={(adjustRules) => this.setState({ adjustRules })}/>
|
||||
}
|
||||
];
|
||||
return (
|
||||
<WeaSlideModal
|
||||
className="slideOuterWrapper"
|
||||
className="ledgerSlideLayout slideOuterWrapper"
|
||||
visible={visible}
|
||||
top={0}
|
||||
width={100}
|
||||
|
|
@ -271,18 +230,10 @@ class LedgerSlide extends Component {
|
|||
direction="right"
|
||||
measure="%"
|
||||
title={
|
||||
<SlideModalTitle
|
||||
subtitle={title}
|
||||
tabs={editId ? tabs : []}
|
||||
loading={false}
|
||||
showOperateBtn={showOperateBtn}
|
||||
editable={false}
|
||||
onSave={() => {
|
||||
}}
|
||||
selectedTab={current}
|
||||
customOperate={this.renderCustomOperate()}
|
||||
subItemChange={this.handleChangeSlideTab}
|
||||
/>
|
||||
!editId ? <WeaTopTitle buttons={_.find(tabs, o => current === o.key).createBtns}/> :
|
||||
<WeaReqTitle buttons={showOperateBtn ? _.find(tabs, o => current === o.key).editBtns : []}
|
||||
tabDatas={tabs} selectedKey={String(current)}
|
||||
onChange={cur => this.setState({ current: parseInt(cur) })}/>
|
||||
}
|
||||
content={
|
||||
<div className="ledgerSlideContent">
|
||||
|
|
@ -297,9 +248,7 @@ class LedgerSlide extends Component {
|
|||
}
|
||||
</WeaSteps>
|
||||
}
|
||||
{
|
||||
this.renderChildren()
|
||||
}
|
||||
{_.find(tabs, o => current === o.key).children}
|
||||
</div>
|
||||
}
|
||||
onClose={this.handleClose}
|
||||
|
|
|
|||
|
|
@ -1,13 +1,3 @@
|
|||
.ledgerOuter {
|
||||
.wea-new-top {
|
||||
.ant-col-10 {
|
||||
& > span:nth-child(2) {
|
||||
margin-top: -6px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.ledgerWrapper {
|
||||
height: 100%;
|
||||
|
||||
|
|
|
|||
|
|
@ -484,6 +484,10 @@ export const mapBarOptions = (params) => ({
|
|||
];
|
||||
}
|
||||
},
|
||||
textStyle: {
|
||||
textShadowColor: "transparent",
|
||||
color: "#fff"
|
||||
},
|
||||
rich: {
|
||||
a: {
|
||||
fontWeight: "bold",
|
||||
|
|
|
|||
|
|
@ -128,13 +128,14 @@ export const salaryItemFields = [
|
|||
viewAttr: 2,
|
||||
tip: ""
|
||||
},
|
||||
// {
|
||||
// key: "defaultValue",
|
||||
// label: "默认值",
|
||||
// type: "INPUT",
|
||||
// viewAttr: 2,
|
||||
// tip: ""
|
||||
// },
|
||||
{
|
||||
key: "defaultValue",
|
||||
label: "默认值",
|
||||
type: "INPUT",
|
||||
viewAttr: 2,
|
||||
precision: 2,
|
||||
tip: ""
|
||||
},
|
||||
{
|
||||
key: "formulaContent",
|
||||
label: "公式",
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import React from "react";
|
|||
import { inject, observer } from "mobx-react";
|
||||
import { Button, Dropdown, Menu, message, Modal, Switch } from "antd";
|
||||
import { WeaInputSearch, WeaLocaleProvider, WeaNewScroll, WeaSlideModal, WeaTop } from "ecCom";
|
||||
import { renderLoading } from "../../util";
|
||||
import { renderLoading, toDecimal_n } from "../../util";
|
||||
import CustomTab from "../../components/customTab";
|
||||
import SystemSalaryItemModal from "./systemSalaryItemModal";
|
||||
import { columns } from "./columns";
|
||||
|
|
@ -358,7 +358,8 @@ export default class SalaryItem extends React.Component {
|
|||
|
||||
const handleSaveSlideChange = (value) => {
|
||||
const { salaryItemStore: { setRequest } } = this.props;
|
||||
setRequest(value);
|
||||
const { defaultValue, pattern, ...extra } = value;
|
||||
setRequest({ ...extra, pattern, defaultValue: toDecimal_n(defaultValue, parseInt(pattern)) });
|
||||
};
|
||||
const rowSelection = {
|
||||
selectedRowKeys,
|
||||
|
|
|
|||
|
|
@ -71,6 +71,16 @@ export const patternOptions = [
|
|||
key: "8",
|
||||
showname: "8",
|
||||
selected: false
|
||||
},
|
||||
{
|
||||
key: "9",
|
||||
showname: "9",
|
||||
selected: false
|
||||
},
|
||||
{
|
||||
key: "10",
|
||||
showname: "10",
|
||||
selected: false
|
||||
}
|
||||
];
|
||||
|
||||
|
|
|
|||
|
|
@ -122,6 +122,8 @@ class SalaryItemForm extends Component {
|
|||
return { ...item, type: v === "number" ? "INPUTNUMBER" : "INPUT" };
|
||||
} else if (key === "valueType" && item.key === "defaultValue") {
|
||||
return { ...item, display: v === "1" };
|
||||
} else if (key === "pattern" && item.key === "defaultValue") {
|
||||
return { ...item, precision: parseInt(v) };
|
||||
} else if (key === "valueType" && (item.key === "originSqlContent" || item.key === "originFormulaContent")) {
|
||||
return {
|
||||
...item,
|
||||
|
|
@ -133,11 +135,11 @@ class SalaryItemForm extends Component {
|
|||
return { ...item };
|
||||
})
|
||||
}, () => {
|
||||
// if (key === "valueType" && !this.props.isLedger) {
|
||||
// onChangeFieldsItem({ formulaContent: "", formulaId: 0, valueType: v });
|
||||
// } else {
|
||||
onChangeFieldsItem({ [key]: (key === "useDefault" || key === "useInEmployeeSalary" || key === "hideDefault") ? Number(v) : v });
|
||||
// }
|
||||
if (key === "dataType") {
|
||||
onChangeFieldsItem({ [key]: v, defaultValue: "" });
|
||||
} else {
|
||||
onChangeFieldsItem({ [key]: (key === "useDefault" || key === "useInEmployeeSalary" || key === "hideDefault") ? Number(v) : v });
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -148,7 +150,7 @@ class SalaryItemForm extends Component {
|
|||
<WeaSearchGroup showGroup needTigger={false}>
|
||||
{
|
||||
_.map(salaryItemFieldsList, item => {
|
||||
const { key, label, type, viewAttr, tip, options, display = true, multiple = false } = item;
|
||||
const { key, label, type, viewAttr, tip, options, display = true, multiple = false, precision = 0 } = item;
|
||||
const value = !_.isNil(request[key]) ? request[key].toString() : "";
|
||||
return <React.Fragment>
|
||||
{
|
||||
|
|
@ -181,7 +183,7 @@ class SalaryItemForm extends Component {
|
|||
(type === "INPUTNUMBER" && display) ?
|
||||
<WeaFormItem label={label} labelCol={{ span: 6 }} wrapperCol={{ span: 12 }}>
|
||||
<React.Fragment>
|
||||
<WeaInputNumber value={value} viewAttr={viewAttr} precision={0}
|
||||
<WeaInputNumber value={value} viewAttr={viewAttr} precision={precision}
|
||||
min={key === "width" ? 0 : -99999}
|
||||
onChange={v => this.handleChangeSalaryFiledItems(key, v)}/>
|
||||
{key === "width" && display &&
|
||||
|
|
|
|||
|
|
@ -246,7 +246,9 @@ class PlanSetTable extends Component {
|
|||
{ key: "5", showname: "5" },
|
||||
{ key: "6", showname: "6" },
|
||||
{ key: "7", showname: "7" },
|
||||
{ key: "8", showname: "8" }
|
||||
{ key: "8", showname: "8" },
|
||||
{ key: "9", showname: "9" },
|
||||
{ key: "10", showname: "10" }
|
||||
]} viewAttr={showOperateBtn ? 2 : 1}
|
||||
onChange={validNum => onEdit({
|
||||
record: { ...record, validNum },
|
||||
|
|
|
|||
Loading…
Reference in New Issue