bug修改
This commit is contained in:
parent
c2439f2628
commit
33e5009585
|
|
@ -16,7 +16,6 @@
|
|||
height: 16px;
|
||||
line-height: 16px;
|
||||
border-radius: 5px;
|
||||
background-color: #eee;
|
||||
}
|
||||
}
|
||||
.contentWrapper {
|
||||
|
|
|
|||
|
|
@ -179,7 +179,7 @@ export default class CalculateDetail extends React.Component {
|
|||
}}
|
||||
onCancel={() => this.setState({
|
||||
acctResultImportVisiable: false,
|
||||
fieldData: {}
|
||||
fieldData: {}
|
||||
})}
|
||||
id={this.id}
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -79,11 +79,12 @@ export default class SalaryDetail extends React.Component {
|
|||
columns.push({
|
||||
title: '操作',
|
||||
key: "cz",
|
||||
width: '100px',
|
||||
render: (text, record) => {
|
||||
return <a onClick={() => {this.handleEdit(record)}}>编辑</a>
|
||||
}
|
||||
})
|
||||
console.log("columns: " , columns)
|
||||
console.log("columns: ", columns);
|
||||
return columns;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -133,7 +133,7 @@ export default class UserSure extends React.Component {
|
|||
// 核算人员范围分页
|
||||
handleUserListPageChange(value) {
|
||||
const { calculateStore: {acctemployeeList}} = this.props;
|
||||
acctemployeeList({acctemployeeList: this.id, employeeName: this.state.userListSearchValue, current: value})
|
||||
acctemployeeList({salaryAcctRecordId: this.id, employeeName: this.state.userListSearchValue, current: value})
|
||||
}
|
||||
|
||||
// 环比减少人员分页
|
||||
|
|
@ -146,7 +146,7 @@ export default class UserSure extends React.Component {
|
|||
handleUserListSearch(value) {
|
||||
const { calculateStore: {acctemployeeList, reducedemployeeList}} = this.props;
|
||||
if(this.state.selectedKey == 0) {
|
||||
acctemployeeList({acctemployeeList: this.id, employeeName: value, current: 1})
|
||||
acctemployeeList({salaryAcctRecordId: this.id, employeeName: value, current: 1})
|
||||
} else {
|
||||
reducedemployeeList({salaryAcctRecordId: this.id, employeeName: value, current: 1})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -127,6 +127,16 @@ export const modalColumns = [
|
|||
title: "累计赡养老人",
|
||||
dataIndex: 'addUpSupportElderly',
|
||||
key: 'addUpSupportElderly',
|
||||
},
|
||||
{
|
||||
title: "累计婴幼儿照护",
|
||||
dataIndex: 'addUpInfantCare',
|
||||
key: 'addUpInfantCare',
|
||||
},
|
||||
{
|
||||
title: "累计大病医疗",
|
||||
dataIndex: 'addUpIllnessMedical',
|
||||
key: 'addUpIllnessMedical'
|
||||
}
|
||||
]
|
||||
|
||||
|
|
|
|||
|
|
@ -172,7 +172,18 @@ export const modalColumns = [
|
|||
title: "累计已预扣预缴税额",
|
||||
dataIndex: 'addUpAdvanceTax',
|
||||
key: 'addUpAdvanceTax',
|
||||
},
|
||||
{
|
||||
title: "累计婴幼儿照护",
|
||||
dataIndex: 'addUpInfantCare',
|
||||
key: 'addUpInfantCare',
|
||||
},
|
||||
{
|
||||
title: "累计大病医疗",
|
||||
dataIndex: 'addUpIllnessMedical',
|
||||
key: 'addUpIllnessMedical',
|
||||
}
|
||||
|
||||
]
|
||||
|
||||
export const dataSource = [];
|
||||
|
|
|
|||
|
|
@ -84,6 +84,7 @@ export default class AddUserModal extends React.Component {
|
|||
this.state.selectedKey == "EMPLOYEE" && <WeaBrowser
|
||||
type={17}
|
||||
title={"人员选择"}
|
||||
isSingle={false}
|
||||
inputStyle={{ width: 200 }}
|
||||
onChange={(ids, names, datas) => {
|
||||
this.setState({ids})
|
||||
|
|
@ -94,6 +95,7 @@ export default class AddUserModal extends React.Component {
|
|||
this.state.selectedKey == "DEPT" && <WeaBrowser
|
||||
type={57}
|
||||
title={"部门选择"}
|
||||
isSingle={false}
|
||||
inputStyle={{ width: 200 }}
|
||||
onChange={(ids, names, datas) => {
|
||||
this.setState({ids})
|
||||
|
|
@ -104,6 +106,7 @@ export default class AddUserModal extends React.Component {
|
|||
this.state.selectedKey == "POSITION" && <WeaBrowser
|
||||
type={278}
|
||||
title={"岗位选择"}
|
||||
isSingle={false}
|
||||
inputStyle={{ width: 200 }}
|
||||
onChange={(ids, names, datas) => {
|
||||
this.setState({ids})
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ export default class CustomSalaryItemSlide extends React.Component {
|
|||
</Row>
|
||||
{
|
||||
( valueType == 2 || valueType == 3 ) && <Row className="formItem">
|
||||
<Col span={4}>公式<RequiredLabelTip /></Col>
|
||||
<Col span={4}>{valueType == 2 ? "公式" : "SQL"}<RequiredLabelTip /></Col>
|
||||
<Col span={20}>
|
||||
<div style={{width: "100%", lineHeight: '30px', minHeight: "30px", border: "1px solid rgb(217, 217, 217)"}}
|
||||
onClick={() =>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import React from 'react'
|
||||
import { inject, observer } from 'mobx-react';
|
||||
import { Row, Col, Select } from 'antd'
|
||||
import { WeaDatePicker, WeaInput } from 'ecCom'
|
||||
import { WeaDatePicker, WeaInput, WeaCheckbox } from 'ecCom'
|
||||
import GroupCard from '../../../components/groupCard'
|
||||
import "./index.less"
|
||||
|
||||
|
|
@ -60,6 +60,9 @@ export default class AccumulationFundForm extends React.Component {
|
|||
}
|
||||
return (
|
||||
<div className="socialFormWrapper">
|
||||
<div style={{overflow: "hidden"}}>
|
||||
<WeaCheckbox style={{float: "right", marginRight: "10px", marginTop: "10px"}} value={data && data.nonPayment} id="nonPayment" content="暂不缴纳" onChange={(value) => {this.handleFormChange({nonPayment: value})}} />
|
||||
</div>
|
||||
<GroupCard title="公积金基础信息" >
|
||||
<Row>
|
||||
<Col span={6} className="formItem">公积金起始缴纳月:</Col>
|
||||
|
|
@ -84,7 +87,7 @@ export default class AccumulationFundForm extends React.Component {
|
|||
<Row>
|
||||
<Col span={6} className="formItem">公积金方案名称:</Col>
|
||||
<Col span={6} className="formItem">
|
||||
<Select defaultValue={data && data.fundSchemeId} value={data && data.fundSchemeId} style={{ width: 150 }} onChange={(value) => {
|
||||
<Select defaultValue={data && data.fundSchemeId} value={data && data.fundSchemeId} style={{ width: "100%" }} onChange={(value) => {
|
||||
this.handleFormChange({fundSchemeId: value})
|
||||
this.handleFetchPaymentForm(value);
|
||||
}}>
|
||||
|
|
@ -111,7 +114,7 @@ export default class AccumulationFundForm extends React.Component {
|
|||
<Row>
|
||||
<Col span={6} className="formItem">公积金缴纳组织:</Col>
|
||||
<Col span={6} className="formItem">
|
||||
<Select defaultValue={data && data.paymentOrganization} value={data && data.paymentOrganization} style={{ width: 150 }} onChange={(value) => this.handleFormChange({paymentOrganization: value})}>
|
||||
<Select defaultValue={data && data.paymentOrganization} value={data && data.paymentOrganization} style={{ width: "100%" }} onChange={(value) => this.handleFormChange({paymentOrganization: value})}>
|
||||
{
|
||||
items && items[0].items &&items[0].items[1] && items[0].items[1].options.map(item => (
|
||||
<Option value={item.key}>{item.showname}</Option>
|
||||
|
|
@ -121,7 +124,7 @@ export default class AccumulationFundForm extends React.Component {
|
|||
</Col>
|
||||
<Col span={6} className="formItem">公积金个人实际承担方:</Col>
|
||||
<Col span={6} className="formItem">
|
||||
<Select defaultValue={data && data.underTake} value={data && data.underTake} style={{ width: 150 }} onChange={(value) => {
|
||||
<Select defaultValue={data && data.underTake} value={data && data.underTake} style={{ width: "100%" }} onChange={(value) => {
|
||||
this.handleFormChange({underTake: value})
|
||||
}}>
|
||||
{
|
||||
|
|
|
|||
|
|
@ -275,9 +275,15 @@ export default class Archives extends React.Component {
|
|||
<SlideModalTitle
|
||||
subtitle={"员工福利档案"}
|
||||
tabs={[{title: '基础设置', key: 0}, {title: "社保", key: 1}, {title: "公积金", key: 2}, {title: '企业年金及其他福利', key: 3}]}
|
||||
editable={true}
|
||||
editable={false}
|
||||
selectedTab={selectedTab}
|
||||
onSave={() => this.handleEditSlideSave()}
|
||||
customOperate={
|
||||
<div>
|
||||
{
|
||||
selectedTab != 0 && <Button type="primary" onClick={() => {this.handleEditSlideSave()}}>保存</Button>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
subItemChange={
|
||||
(item) => {this.setState({selectedTab: item.key})}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import React from 'react'
|
||||
import { inject, observer } from 'mobx-react';
|
||||
import { Row, Col, Select } from 'antd'
|
||||
import { WeaDatePicker, WeaInput } from "ecCom";
|
||||
import { WeaDatePicker, WeaInput, WeaCheckbox } from "ecCom";
|
||||
import GroupCard from '../../../components/groupCard'
|
||||
import "./index.less"
|
||||
const { Option } = Select
|
||||
|
|
@ -67,6 +67,9 @@ export default class OtherForm extends React.Component {
|
|||
|
||||
return (
|
||||
<div className="socialFormWrapper">
|
||||
<div style={{overflow: "hidden"}}>
|
||||
<WeaCheckbox style={{float: "right", marginRight: "10px", marginTop: "10px"}} value={data && data.nonPayment} id="nonPayment" content="暂不缴纳" onChange={(value) => {this.handleFormChange({nonPayment: value})}} />
|
||||
</div>
|
||||
<GroupCard title="其他福利基础信息" >
|
||||
<Row>
|
||||
<Col span={6} className="formItem">其他福利起始缴纳月:</Col>
|
||||
|
|
@ -89,7 +92,7 @@ export default class OtherForm extends React.Component {
|
|||
<Row>
|
||||
<Col span={6} className="formItem">其他福利方案名称:</Col>
|
||||
<Col span={6} className="formItem">
|
||||
<Select defaultValue={data && data.otherName} value={data && data.otherName} style={{ width: 150 }} onChange={(value) => {
|
||||
<Select defaultValue={data && data.otherName} value={data && data.otherName} style={{ width: "100%" }} onChange={(value) => {
|
||||
this.handleFormChange({otherName: value})
|
||||
this.handleFetchPaymentForm(value);
|
||||
}}>
|
||||
|
|
@ -104,7 +107,7 @@ export default class OtherForm extends React.Component {
|
|||
<Row>
|
||||
<Col span={6} className="formItem">社保缴纳组织:</Col>
|
||||
<Col span={6} className="formItem">
|
||||
<Select defaultValue={data && data.paymentOrganization} value={data && data.paymentOrganization} style={{ width: 150 }} onChange={(value) => this.handleFormChange({paymentOrganization: value})}>
|
||||
<Select defaultValue={data && data.paymentOrganization} value={data && data.paymentOrganization} style={{ width: "100%" }} onChange={(value) => this.handleFormChange({paymentOrganization: value})}>
|
||||
{
|
||||
items && items[0].items &&items[0].items[1] && items[0].items[1].options.map(item => (
|
||||
<Option value={item.key}>{item.showname}</Option>
|
||||
|
|
@ -115,7 +118,7 @@ export default class OtherForm extends React.Component {
|
|||
</Col>
|
||||
<Col span={6} className="formItem">社保个人实际承担方:</Col>
|
||||
<Col span={6} className="formItem">
|
||||
<Select defaultValue={data && data.underTake} value={data && data.underTake} style={{ width: 150 }} onChange={(value) => this.handleFormChange({underTake: value})}>
|
||||
<Select defaultValue={data && data.underTake} value={data && data.underTake} style={{ width: "100%" }} onChange={(value) => this.handleFormChange({underTake: value})}>
|
||||
{
|
||||
items && items[0].items &&items[0].items[2] && items[0].items[2].options.map(item => (
|
||||
<Option value={item.key}>{item.showname}</Option>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import React from 'react'
|
||||
import GroupCard from '../../../components/groupCard'
|
||||
import { Row, Col, Select } from 'antd';
|
||||
import { WeaDatePicker, WeaInput } from 'ecCom';
|
||||
import { WeaDatePicker, WeaInput, WeaCheckbox } from 'ecCom';
|
||||
import { inject, observer } from 'mobx-react';
|
||||
import "./index.less"
|
||||
import ItemMangeFormModal from '../../dataAcquisition/attendance/itemMangeFormModal';
|
||||
|
|
@ -63,6 +63,9 @@ export default class SocialSecurityForm extends React.Component {
|
|||
|
||||
return (
|
||||
<div className="socialFormWrapper">
|
||||
<div style={{overflow: "hidden"}}>
|
||||
<WeaCheckbox style={{float: "right", marginRight: "10px", marginTop: "10px"}} value={data && data.nonPayment} id="nonPayment" content="暂不缴纳" onChange={(value) => {this.handleFormChange({nonPayment: value})}} />
|
||||
</div>
|
||||
<GroupCard title="社保基础信息" >
|
||||
<Row>
|
||||
<Col span={6} className="formItem">社保起始缴纳月:</Col>
|
||||
|
|
@ -85,7 +88,7 @@ export default class SocialSecurityForm extends React.Component {
|
|||
<Row>
|
||||
<Col span={6} className="formItem">社保方案名称:</Col>
|
||||
<Col span={6} className="formItem">
|
||||
<Select defaultValue={data && data.socialName} value={data && data.socialName} style={{ width: 150 }} onChange={(value) => {
|
||||
<Select defaultValue={data && data.socialName} value={data && data.socialName} style={{ width: "100%" }} onChange={(value) => {
|
||||
this.handleFormChange({socialName: value})
|
||||
this.handleFetchPaymentForm(value)
|
||||
}}>
|
||||
|
|
@ -105,7 +108,7 @@ export default class SocialSecurityForm extends React.Component {
|
|||
<Col span={6} className="formItem">社保缴纳组织:</Col>
|
||||
|
||||
<Col span={6} className="formItem">
|
||||
<Select defaultValue={data && data.paymentOrganization} value={data && data.paymentOrganization} style={{ width: 150 }} onChange={(value) => this.handleFormChange({paymentOrganization: value})}>
|
||||
<Select defaultValue={data && data.paymentOrganization} value={data && data.paymentOrganization} style={{ width: "100%" }} onChange={(value) => this.handleFormChange({paymentOrganization: value})}>
|
||||
{
|
||||
items && items[0].items &&items[0].items[1] && items[0].items[1].options.map(item => (
|
||||
<Option value={item.key}>{item.showname}</Option>
|
||||
|
|
@ -115,7 +118,7 @@ export default class SocialSecurityForm extends React.Component {
|
|||
</Col>
|
||||
<Col span={6} className="formItem">社保个人实际承担方:</Col>
|
||||
<Col span={6} className="formItem">
|
||||
<Select defaultValue={data && data.underTake} value={data && data.underTake} style={{ width: 150 }} onChange={
|
||||
<Select defaultValue={data && data.underTake} value={data && data.underTake} style={{ width: "100%" }} onChange={
|
||||
(value) => {
|
||||
this.handleFormChange({underTake: value})
|
||||
this.handleFetchPaymentForm(value)
|
||||
|
|
|
|||
|
|
@ -112,7 +112,6 @@ export class ArchivesStore {
|
|||
item.key = item.employeeId
|
||||
return item;
|
||||
})
|
||||
console.log("this.dataSource:", this.dataSource)
|
||||
// this.columns = res.data.columns;
|
||||
this.tableStore.getDatas(res.data.dataKey.datas)
|
||||
this.pageInfo = res.data.pageInfo
|
||||
|
|
@ -187,6 +186,7 @@ export class ArchivesStore {
|
|||
API.save({welfareType, baseForm, paymentForm}).then(res => {
|
||||
if(res.status) {
|
||||
message.success("保存成功")
|
||||
this.getTableDatas()
|
||||
} else {
|
||||
message.error(res.errormsg || "保存失败")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -110,6 +110,8 @@ export class CumDeductStore {
|
|||
API.importCumDeductPreview(params).then(action(res => {
|
||||
if(res.status) {
|
||||
this.slideDataSource = res.data.preview
|
||||
} else {
|
||||
message.error(res.errormsg || '预览失败')
|
||||
}
|
||||
}))
|
||||
}
|
||||
|
|
|
|||
|
|
@ -99,6 +99,8 @@ export class CumSituationStore {
|
|||
API.importCumSituationParam(params).then(action(res => {
|
||||
if(res.status) {
|
||||
this.importResult = res.data
|
||||
} else {
|
||||
message.error(res.errormsg || '接口调用失败!')
|
||||
}
|
||||
}))
|
||||
}
|
||||
|
|
@ -108,6 +110,8 @@ export class CumSituationStore {
|
|||
API.importCumSituationPreview(params).then(action(res => {
|
||||
if(res.status) {
|
||||
this.slideDataSource = res.data.preview
|
||||
} else {
|
||||
message.error(res.errormsg || '接口调用失败!')
|
||||
}
|
||||
}))
|
||||
}
|
||||
|
|
@ -119,7 +123,6 @@ export class CumSituationStore {
|
|||
|
||||
// 查询明细
|
||||
@action getCumDeductDetailList = (id, param = {}) => {
|
||||
let requestParams = {"accumulatedSituationId": id};
|
||||
requestParams = {...requestParams, ...param}
|
||||
API.getCumSituationDetailList(requestParams).then(res => {
|
||||
if(res.status) {
|
||||
|
|
|
|||
|
|
@ -100,6 +100,8 @@ export class OtherDeductStore {
|
|||
API.importOtherDeductionParam(params).then(action(res => {
|
||||
if(res.status) {
|
||||
this.importResult = res.data
|
||||
} else {
|
||||
message.error(res.errormsg || '接口调用失败!')
|
||||
}
|
||||
}))
|
||||
}
|
||||
|
|
@ -109,6 +111,8 @@ export class OtherDeductStore {
|
|||
API.importOtherDeductionPreview(params).then(action(res => {
|
||||
if(res.status) {
|
||||
this.slideDataSource = res.data.preview
|
||||
} else {
|
||||
message.error(res.errormsg || '接口调用失败!')
|
||||
}
|
||||
}))
|
||||
}
|
||||
|
|
@ -120,7 +124,6 @@ export class OtherDeductStore {
|
|||
|
||||
// 查询明细
|
||||
@action getOtherDeductDetailList = (id, param = {}) => {
|
||||
let requestParams = {"otherTaxExemptDeductionId": id};
|
||||
requestParams = {...requestParams, ...param}
|
||||
API.getOtherDeductDetailList(requestParams).then(res => {
|
||||
if(res.status) {
|
||||
|
|
|
|||
|
|
@ -3,49 +3,6 @@ import { WeaSwitch } from 'comsMobx';
|
|||
import { WeaLocaleProvider, WeaAlertPage, WeaSearchGroup, WeaFormItem } from 'ecCom';
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
// 渲染form表单: 一般对form的渲染都统一使用该方法
|
||||
export const getCustomSearchs = (form, condition, col, isCenter) => {
|
||||
const { isFormInit } = form;
|
||||
const formParams = form.getFormParams();
|
||||
let items = [];
|
||||
let group = [];
|
||||
isFormInit && condition &&
|
||||
condition.map(c =>{
|
||||
c.items.map(fields => {
|
||||
items.push({
|
||||
com:(
|
||||
<WeaFormItem
|
||||
label={`${fields.label}`} // label 标签的文本
|
||||
labelCol={{span: `${fields.labelcol}`}} // label标签占一行比例
|
||||
wrapperCol={{span: `${fields.fieldcol}`}} // 右侧控件占一行比例
|
||||
error={form.getError(fields)} // 错误提示: 处理表单中有必填项,保存的校验
|
||||
tipPosition="bottom" // 错误提示的显示位置: top/bottom
|
||||
>
|
||||
<WeaSwitch
|
||||
fieldConfig={fields}
|
||||
form={form}
|
||||
formParams={formParams}
|
||||
/>
|
||||
</WeaFormItem>),
|
||||
colSpan:1,
|
||||
})
|
||||
});
|
||||
});
|
||||
|
||||
if(items.length > 0) {
|
||||
group.push(
|
||||
<WeaSearchGroup
|
||||
col={col || 1} // 高级搜索列布局列数
|
||||
needTigger={true} // 是否开启收缩
|
||||
title={''} // 高级搜索标题
|
||||
showGroup={true} // 是否开启面板
|
||||
items={items} // 条目数组数据
|
||||
center={isCenter || false} // 内容是否居中:一般弹框需要
|
||||
/>)
|
||||
return group;
|
||||
}
|
||||
}
|
||||
|
||||
// 渲染form表单: 一般对form的渲染都统一使用该方法
|
||||
export const getSearchs = (form, condition, col, isCenter) => {
|
||||
const { isFormInit } = form;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,150 @@
|
|||
import { Spin } from 'antd';
|
||||
import { WeaSwitch } from 'comsMobx';
|
||||
import { WeaLocaleProvider, WeaAlertPage, WeaSearchGroup, WeaFormItem } from 'ecCom';
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
// 渲染form表单: 一般对form的渲染都统一使用该方法
|
||||
export const getCustomSearchs = (form, condition, col, isCenter) => {
|
||||
const { isFormInit } = form;
|
||||
const formParams = form.getFormParams();
|
||||
let items = [];
|
||||
let group = [];
|
||||
isFormInit && condition &&
|
||||
condition.map(c =>{
|
||||
c.items.map(fields => {
|
||||
items.push({
|
||||
com:(
|
||||
<WeaFormItem
|
||||
label={`${fields.label}`} // label 标签的文本
|
||||
labelCol={{span: `${fields.labelcol}`}} // label标签占一行比例
|
||||
wrapperCol={{span: `${fields.fieldcol}`}} // 右侧控件占一行比例
|
||||
error={form.getError(fields)} // 错误提示: 处理表单中有必填项,保存的校验
|
||||
tipPosition="bottom" // 错误提示的显示位置: top/bottom
|
||||
>
|
||||
<WeaSwitch
|
||||
fieldConfig={fields}
|
||||
form={form}
|
||||
formParams={formParams}
|
||||
/>
|
||||
</WeaFormItem>),
|
||||
colSpan:1,
|
||||
})
|
||||
});
|
||||
});
|
||||
|
||||
if(items.length > 0) {
|
||||
group.push(
|
||||
<WeaSearchGroup
|
||||
col={col || 1} // 高级搜索列布局列数
|
||||
needTigger={true} // 是否开启收缩
|
||||
title={''} // 高级搜索标题
|
||||
showGroup={true} // 是否开启面板
|
||||
items={items} // 条目数组数据
|
||||
center={isCenter || false} // 内容是否居中:一般弹框需要
|
||||
/>)
|
||||
return group;
|
||||
}
|
||||
}
|
||||
|
||||
// 渲染form表单: 一般对form的渲染都统一使用该方法
|
||||
// export const getSearchs = (form, condition, col, isCenter) => {
|
||||
// const { isFormInit } = form;
|
||||
// const formParams = form.getFormParams();
|
||||
// let group = [];
|
||||
// isFormInit && condition && condition.map(c =>{
|
||||
// let items = [];
|
||||
// c.items.map(fields => {
|
||||
// items.push({
|
||||
// com:(
|
||||
// <WeaFormItem
|
||||
// label={`${fields.label}`} // label 标签的文本
|
||||
// labelCol={{span: `${fields.labelcol}`}} // label标签占一行比例
|
||||
// wrapperCol={{span: `${fields.fieldcol}`}} // 右侧控件占一行比例
|
||||
// error={form.getError(fields)} // 错误提示: 处理表单中有必填项,保存的校验
|
||||
// tipPosition="bottom" // 错误提示的显示位置: top/bottom
|
||||
// >
|
||||
// <WeaSwitch
|
||||
// fieldConfig={fields}
|
||||
// form={form}
|
||||
// formParams={formParams}
|
||||
// />
|
||||
// </WeaFormItem>),
|
||||
// colSpan:1,
|
||||
// })
|
||||
// });
|
||||
// group.push(
|
||||
// <WeaSearchGroup
|
||||
// col={col || 1} // 高级搜索列布局列数
|
||||
// needTigger={true} // 是否开启收缩
|
||||
// title={c.title || ''} // 高级搜索标题
|
||||
// showGroup={c.defaultshow} // 是否开启面板
|
||||
// items={items} // 条目数组数据
|
||||
// center={isCenter || false} // 内容是否居中:一般弹框需要
|
||||
// />)
|
||||
// });
|
||||
// return group;
|
||||
// }
|
||||
|
||||
// 渲染form表单: 一般对form的渲染都统一使用该方法
|
||||
export const getSearchs = (form, condition, col, isCenter) => {
|
||||
const { isFormInit } = form;
|
||||
const formParams = form.getFormParams();
|
||||
let group = [];
|
||||
isFormInit && condition && condition.map(c =>{
|
||||
let items = [];
|
||||
c.items.map(fields => {
|
||||
items.push({
|
||||
com:(
|
||||
<WeaFormItem
|
||||
label={`${fields.label}`} // label 标签的文本
|
||||
labelCol={{span: `${fields.labelcol}`}} // label标签占一行比例
|
||||
wrapperCol={{span: `${fields.fieldcol}`}} // 右侧控件占一行比例
|
||||
error={form.getError(fields)} // 错误提示: 处理表单中有必填项,保存的校验
|
||||
tipPosition="bottom" // 错误提示的显示位置: top/bottom
|
||||
>
|
||||
<WeaSwitch
|
||||
fieldConfig={fields}
|
||||
form={form}
|
||||
formParams={formParams}
|
||||
/>
|
||||
</WeaFormItem>),
|
||||
colSpan:1,
|
||||
})
|
||||
});
|
||||
group.push(
|
||||
<WeaSearchGroup
|
||||
col={col || 1} // 高级搜索列布局列数
|
||||
needTigger={true} // 是否开启收缩
|
||||
title={c.title || ''} // 高级搜索标题
|
||||
showGroup={c.defaultshow} // 是否开启面板
|
||||
items={items} // 条目数组数据
|
||||
center={isCenter || false} // 内容是否居中:一般弹框需要
|
||||
/>)
|
||||
});
|
||||
return group;
|
||||
}
|
||||
|
||||
// 页面加载中效果处理
|
||||
export const renderLoading = (loading) => (
|
||||
<div className="wea-demo-loading">
|
||||
<Spin spinning={loading} />
|
||||
</div>
|
||||
)
|
||||
|
||||
// 无权限处理
|
||||
export const renderNoright = () => (
|
||||
<WeaAlertPage>
|
||||
<div>
|
||||
{getLabel(2012,'对不起,您暂时没有权限!')}
|
||||
</div>
|
||||
</WeaAlertPage>
|
||||
)
|
||||
|
||||
// 暂无数据处理
|
||||
export const renderNoData = () => (
|
||||
<WeaAlertPage>
|
||||
<div>
|
||||
暂无数据
|
||||
</div>
|
||||
</WeaAlertPage>
|
||||
)
|
||||
Loading…
Reference in New Issue