Merge branch 'feature/v2-薪资项目添加可见性-1124' into develop
This commit is contained in:
commit
7dbd09c1b0
|
|
@ -1,10 +1,9 @@
|
|||
import React from "react";
|
||||
import { Col, Radio, Row, Switch } from "antd";
|
||||
import { Col, Row, Switch } from "antd";
|
||||
import { WeaHelpfulTip, WeaInput, WeaSelect, WeaTextarea } from "ecCom";
|
||||
import "./index.less";
|
||||
import { dataTypeOptions, patternOptions, roundingModeOptions } from "./options";
|
||||
import RequiredLabelTip from "../../components/requiredLabelTip";
|
||||
import FormalFormModal from "./formalFormModal";
|
||||
import "./index.less";
|
||||
|
||||
export default class CustomSalaryItemSlide extends React.Component {
|
||||
constructor(props) {
|
||||
|
|
@ -32,9 +31,10 @@ export default class CustomSalaryItemSlide extends React.Component {
|
|||
}
|
||||
|
||||
render() {
|
||||
const { editable, request, isAdd } = this.props;
|
||||
const { editable, request, isAdd, userStatusList, taxAgentAdminOption } = this.props;
|
||||
const {
|
||||
name,
|
||||
systemType,
|
||||
useDefault,
|
||||
useInEmployeeSalary,
|
||||
roundingMode,
|
||||
|
|
@ -43,10 +43,11 @@ export default class CustomSalaryItemSlide extends React.Component {
|
|||
description,
|
||||
dataType,
|
||||
formulaContent,
|
||||
formulaId
|
||||
formulaId,
|
||||
sharedType,
|
||||
taxAgentIds
|
||||
} = request;
|
||||
const { formalModalVisible } = this.state;
|
||||
|
||||
return (
|
||||
<div className="customSalaryItemSlide">
|
||||
<div>
|
||||
|
|
@ -69,9 +70,7 @@ export default class CustomSalaryItemSlide extends React.Component {
|
|||
<Col span={20}>
|
||||
<Switch
|
||||
disabled={
|
||||
(editable && this.props.record.canEdit) || isAdd
|
||||
? false
|
||||
: true
|
||||
!((editable && this.props.record.canEdit) || isAdd)
|
||||
}
|
||||
checked={useDefault == 1}
|
||||
onChange={value => {
|
||||
|
|
@ -92,9 +91,7 @@ export default class CustomSalaryItemSlide extends React.Component {
|
|||
<Col span={20}>
|
||||
<Switch
|
||||
disabled={
|
||||
(editable && this.props.record.canEdit) || isAdd
|
||||
? false
|
||||
: true
|
||||
!((editable && this.props.record.canEdit) || isAdd)
|
||||
}
|
||||
checked={useInEmployeeSalary == 1}
|
||||
onChange={value => {
|
||||
|
|
@ -109,7 +106,53 @@ export default class CustomSalaryItemSlide extends React.Component {
|
|||
/>
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
{
|
||||
(systemType == 0 || isAdd) &&
|
||||
<Row className="formItem">
|
||||
<Col span={12}>
|
||||
<Row>
|
||||
<Col span={8}>可见性</Col>
|
||||
<Col span={16}>
|
||||
<WeaSelect
|
||||
disabled={!((editable && this.props.record.canEdit) || isAdd)}
|
||||
value={String(sharedType)}
|
||||
options={userStatusList}
|
||||
onChange={value => {
|
||||
let payload = {};
|
||||
(value === "0" || value === "") && (payload.taxAgentIds = "");
|
||||
payload.sharedType = value;
|
||||
this.handleChange(payload);
|
||||
}}
|
||||
style={{ width: "200px" }}
|
||||
/>
|
||||
</Col>
|
||||
</Row>
|
||||
</Col>
|
||||
</Row>
|
||||
}
|
||||
{
|
||||
sharedType === "1" &&
|
||||
<Row className="formItem">
|
||||
<Col span={12}>
|
||||
<Row>
|
||||
<Col span={8}>可见性范围</Col>
|
||||
<Col span={16}>
|
||||
<WeaSelect
|
||||
disabled={!((editable && this.props.record.canEdit) || isAdd)}
|
||||
multiple
|
||||
viewAttr={3}
|
||||
style={{ width: "200px" }}
|
||||
value={taxAgentIds}
|
||||
options={taxAgentAdminOption}
|
||||
onChange={(value) => {
|
||||
this.handleChange({ taxAgentIds: value });
|
||||
}}
|
||||
/>
|
||||
</Col>
|
||||
</Row>
|
||||
</Col>
|
||||
</Row>
|
||||
}
|
||||
<Row className="formItem">
|
||||
<Col span={12}>
|
||||
<Row>
|
||||
|
|
@ -177,9 +220,9 @@ export default class CustomSalaryItemSlide extends React.Component {
|
|||
viewAttr={3}
|
||||
detailtype={3}
|
||||
options={[
|
||||
{key: "1", showname: "输入"},
|
||||
{key: "2", showname: "公式"},
|
||||
{key: "3", showname: "SQL"}
|
||||
{ key: "1", showname: "输入" },
|
||||
{ key: "2", showname: "公式" },
|
||||
{ key: "3", showname: "SQL" }
|
||||
]}
|
||||
onChange={value => {
|
||||
this.handleChange({
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import React from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { Button, Dropdown, Menu, Modal, Switch, message } from "antd";
|
||||
import { Button, Dropdown, Menu, message, Modal, Switch } from "antd";
|
||||
import { WeaInputSearch, WeaRightMenu, WeaSlideModal, WeaTop } from "ecCom";
|
||||
import { renderLoading } from "../../util"; // 渲染form数据的方法:因为多个页面都会使用,所以抽的公共方法在util中
|
||||
import CustomTab from "../../components/customTab";
|
||||
|
|
@ -12,7 +12,7 @@ import DeleteSalaryItemModal from "./deleteSalaryItemModal";
|
|||
import CustomPaginationTable from "../../components/customPaginationTable";
|
||||
import "../socialSecurityBenefits/programme/index.less";
|
||||
|
||||
@inject("salaryItemStore", "taxAgentStore")
|
||||
@inject("salaryItemStore", "taxAgentStore", "salaryFileStore")
|
||||
@observer
|
||||
export default class SalaryItem extends React.Component {
|
||||
constructor(props) {
|
||||
|
|
@ -50,7 +50,11 @@ export default class SalaryItem extends React.Component {
|
|||
|
||||
|
||||
componentWillMount() { // 初始化渲染页面
|
||||
const { salaryItemStore: { getTableDatas } } = this.props;
|
||||
const { salaryItemStore: { getTableDatas }, salaryFileStore, taxAgentStore } = this.props;
|
||||
const { commonEnumList } = salaryFileStore;
|
||||
const { getTaxAgentSelectListAsAdmin } = taxAgentStore;
|
||||
getTaxAgentSelectListAsAdmin();
|
||||
commonEnumList("user", { enumClass: "com.engine.salary.enums.sicategory.SharedTypeEnum" });
|
||||
getTableDatas({}).then(res => {
|
||||
this.setState({
|
||||
searchParams: {
|
||||
|
|
@ -143,7 +147,8 @@ export default class SalaryItem extends React.Component {
|
|||
}}>删除</a>
|
||||
</Menu.Item>
|
||||
</Menu>}>
|
||||
<a href="javascript:void(0)" style={{textDecoration: "none"}}><i className="icon-coms-more" style={{fontSize: 18}}></i></a>
|
||||
<a href="javascript:void(0)" style={{ textDecoration: "none" }}><i className="icon-coms-more"
|
||||
style={{ fontSize: 18 }}></i></a>
|
||||
</Dropdown>
|
||||
);
|
||||
} else {
|
||||
|
|
@ -196,7 +201,8 @@ export default class SalaryItem extends React.Component {
|
|||
}
|
||||
|
||||
render() {
|
||||
const { salaryItemStore, taxAgentStore: { showOperateBtn, showSalaryItemBtn } } = this.props;
|
||||
const { salaryItemStore, salaryFileStore, taxAgentStore: { showOperateBtn, showSalaryItemBtn, taxAgentAdminOption } } = this.props;
|
||||
const { userStatusList } = salaryFileStore;
|
||||
const { selectedRowKeys } = this.state;
|
||||
const {
|
||||
loading,
|
||||
|
|
@ -443,6 +449,8 @@ export default class SalaryItem extends React.Component {
|
|||
<CustomSalaryItemSlide
|
||||
record={this.record} editable={this.state.editable}
|
||||
isAdd={this.state.isAdd} request={request}
|
||||
userStatusList={userStatusList}
|
||||
taxAgentAdminOption={taxAgentAdminOption}
|
||||
onChange={(value) => {
|
||||
handleSaveSlideChange(value);
|
||||
}}/>
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
padding: 20px;
|
||||
|
||||
.formItem {
|
||||
line-height: 40px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -29,7 +29,9 @@ export class SalaryItemStore {
|
|||
pattern: 0,
|
||||
valueType: 1,
|
||||
dataType: "number",
|
||||
description: ""
|
||||
description: "",
|
||||
sharedType: "",
|
||||
taxAgentIds: ""
|
||||
};
|
||||
|
||||
@observable tableDataSource = []; // 主列表
|
||||
|
|
@ -67,7 +69,9 @@ export class SalaryItemStore {
|
|||
pattern: 0,
|
||||
valueType: "1",
|
||||
dataType: "number",
|
||||
description: ""
|
||||
description: "",
|
||||
sharedType: "",
|
||||
taxAgentIds: ""
|
||||
};
|
||||
|
||||
@action
|
||||
|
|
|
|||
Loading…
Reference in New Issue