Merge branch 'hotfix/2.9.42310.02' into release/2.9.42310.01-个税
# Conflicts: # pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/columns.js # pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js # pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js
This commit is contained in:
commit
06895e5a36
|
|
@ -155,6 +155,7 @@
|
|||
.ant-tree-title {
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
max-width: 208px;
|
||||
|
||||
.funcListTitle {
|
||||
width: 100%;
|
||||
|
|
@ -216,9 +217,9 @@
|
|||
}
|
||||
|
||||
.danger {
|
||||
color: rgb(255, 102, 106)!important;
|
||||
border: 1px solid rgb(255, 193, 195)!important;
|
||||
background-color: rgb(255, 223, 224)!important;
|
||||
color: rgb(255, 102, 106) !important;
|
||||
border: 1px solid rgb(255, 193, 195) !important;
|
||||
background-color: rgb(255, 223, 224) !important;
|
||||
}
|
||||
|
||||
.weapp-excel-code-action-list-variable-tip {
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ class Index extends Component {
|
|||
const { calculateStore: { calculateForm } } = this.props;
|
||||
return (
|
||||
<WeaDialog
|
||||
{...this.props} style={{ width: 480 }} initLoadCss
|
||||
{...this.props} style={{ width: 480, height: 174 }} initLoadCss
|
||||
buttons={[
|
||||
<Button type="primary" onClick={this.save} loading={loading}>{getLabel(543233, "保存并进入核算")}</Button>
|
||||
]}
|
||||
|
|
|
|||
|
|
@ -4,195 +4,65 @@
|
|||
* Description:
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaBrowser, WeaFormItem, WeaInput, WeaSearchGroup } from "ecCom";
|
||||
import { getSearchs } from "../../util";
|
||||
import { Select } from "../ruleConfig";
|
||||
import { PickDate } from "../appConfig";
|
||||
import { WeaBrowser, WeaFormItem } from "ecCom";
|
||||
import { getDomkes, getSearchs } from "../../util";
|
||||
import "./index.less";
|
||||
|
||||
class AddItems extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
baseInfo: {
|
||||
declareMonth: "",
|
||||
taxAgentId: "",
|
||||
taxAgentName: "",
|
||||
employeeId: "",
|
||||
employeeName: "",
|
||||
personArea: "ORGANIZATION",
|
||||
username: "",
|
||||
idcard: ""
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
this.setState({
|
||||
baseInfo: {
|
||||
...this.state.baseInfo,
|
||||
declareMonth: this.props.editId.declareMonth || this.props.editId.taxYearMonth,
|
||||
taxAgentId: this.props.editId.taxAgentId,
|
||||
taxAgentName: this.props.editId.taxAgentName,
|
||||
employeeId: this.props.editId.employeeId,
|
||||
employeeName: this.props.editId.username
|
||||
}
|
||||
});
|
||||
const fields = _.map(this.props.condition[0].items, it => {
|
||||
return it.domkey[0];
|
||||
});
|
||||
fields.map(item => {
|
||||
this.props.form.updateFields({
|
||||
[item]: this.props.editId[item] || ""
|
||||
const { editId, condition, form } = this.props;
|
||||
if (!_.isEmpty(editId)) {
|
||||
getDomkes(condition).map(item => {
|
||||
if (item === "employeeId") {
|
||||
form.updateFields({
|
||||
[item]: {
|
||||
value: editId[item],
|
||||
valueSpan: editId["username"],
|
||||
valueObj: [{ id: editId[item], name: editId["username"] }]
|
||||
}
|
||||
});
|
||||
} else if (item === "taxAgentId") {
|
||||
form.updateFields({
|
||||
[item]: editId[item].toString()
|
||||
});
|
||||
} else {
|
||||
form.updateFields({
|
||||
[item]: editId[item] || ""
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (nextProps.editId !== this.props.editId) {
|
||||
this.setState({
|
||||
baseInfo: {
|
||||
...this.state.baseInfo,
|
||||
declareMonth: nextProps.editId.declareMonth || nextProps.editId.taxYearMonth,
|
||||
taxAgentId: nextProps.editId.taxAgentId,
|
||||
taxAgentName: nextProps.editId.taxAgentName,
|
||||
employeeId: nextProps.editId.employeeId,
|
||||
employeeName: nextProps.editId.username
|
||||
if (nextProps.editId !== this.props.editId && !_.isEmpty(nextProps.editId)) {
|
||||
getDomkes(nextProps.condition).map(item => {
|
||||
if (item === "employeeId") {
|
||||
nextProps.form.updateFields({
|
||||
[item]: {
|
||||
value: nextProps.editId[item],
|
||||
valueSpan: nextProps.editId["username"],
|
||||
valueObj: [{ id: nextProps.editId[item], name: nextProps.editId["username"] }]
|
||||
}
|
||||
});
|
||||
} else if (item === "taxAgentId") {
|
||||
nextProps.form.updateFields({
|
||||
[item]: nextProps.editId[item].toString()
|
||||
});
|
||||
} else {
|
||||
nextProps.form.updateFields({
|
||||
[item]: nextProps.editId[item] || ""
|
||||
});
|
||||
}
|
||||
});
|
||||
const fields = _.map(nextProps.condition[0].items, it => {
|
||||
return it.domkey[0];
|
||||
});
|
||||
fields.map(item => {
|
||||
nextProps.form.updateFields({
|
||||
[item]: nextProps.editId[item] || ""
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
render() {
|
||||
const { taxAgentOption = [], form, condition = [], isCum, isSpecial, editId } = this.props;
|
||||
const { baseInfo } = this.state;
|
||||
let items = [
|
||||
{
|
||||
com: PickDate({
|
||||
label: "税款所属期",
|
||||
viewAttr: _.isEmpty(editId) ? 3 : 1,
|
||||
labelCol: { span: 6 },
|
||||
wrapperCol: { span: 18 },
|
||||
format: "YYYY-MM",
|
||||
value: baseInfo.declareMonth,
|
||||
onChange: (data) => {
|
||||
this.setState({ baseInfo: { ...baseInfo, declareMonth: data.date } });
|
||||
}
|
||||
})
|
||||
},
|
||||
{
|
||||
com: Select({
|
||||
label: "个税扣缴义务人",
|
||||
viewAttr: _.isEmpty(editId) ? 3 : 1,
|
||||
options: taxAgentOption,
|
||||
value: baseInfo.taxAgentId,
|
||||
onChange: (data) => {
|
||||
this.setState({ baseInfo: { ...baseInfo, taxAgentId: data.selected, taxAgentName: data.showName } });
|
||||
}
|
||||
})
|
||||
},
|
||||
{
|
||||
com: Browser({
|
||||
label: "人员",
|
||||
viewAttr: _.isEmpty(editId) ? 3 : 1,
|
||||
value: baseInfo.employeeId,
|
||||
valueSpan: baseInfo.employeeName,
|
||||
onChange: ({ ids, names }) => {
|
||||
this.setState({ baseInfo: { ...baseInfo, employeeId: ids, employeeName: names } });
|
||||
}
|
||||
})
|
||||
}
|
||||
];
|
||||
const cumSituationitems = [
|
||||
{
|
||||
com: PickDate({
|
||||
label: "税款所属期",
|
||||
viewAttr: _.isEmpty(editId) ? 3 : 1,
|
||||
labelCol: { span: 6 },
|
||||
wrapperCol: { span: 18 },
|
||||
format: "YYYY-MM",
|
||||
value: baseInfo.declareMonth,
|
||||
onChange: (data) => {
|
||||
this.setState({ baseInfo: { ...baseInfo, declareMonth: data.date } });
|
||||
}
|
||||
})
|
||||
},
|
||||
{
|
||||
com: Select({
|
||||
label: "个税扣缴义务人",
|
||||
viewAttr: _.isEmpty(editId) ? 3 : 1,
|
||||
options: taxAgentOption,
|
||||
value: baseInfo.taxAgentId,
|
||||
onChange: (data) => {
|
||||
this.setState({ baseInfo: { ...baseInfo, taxAgentId: data.selected, taxAgentName: data.showName } });
|
||||
}
|
||||
})
|
||||
},
|
||||
{
|
||||
com: Select({
|
||||
label: "人员范围",
|
||||
viewAttr: _.isEmpty(editId) ? 3 : 1,
|
||||
options: [
|
||||
{ key: "ORGANIZATION", showname: "内部人员" }
|
||||
// { key: "EXT_EMPLOYEE", showname: "非系统人员" }
|
||||
],
|
||||
value: baseInfo.personArea,
|
||||
onChange: (data) => {
|
||||
this.setState({ baseInfo: { ...baseInfo, personArea: data.selected } });
|
||||
}
|
||||
})
|
||||
}
|
||||
];
|
||||
const insider = [{
|
||||
com: Browser({
|
||||
label: "人员",
|
||||
viewAttr: _.isEmpty(editId) ? 3 : 1,
|
||||
value: baseInfo.employeeId,
|
||||
valueSpan: baseInfo.employeeName,
|
||||
onChange: ({ ids, names }) => {
|
||||
this.setState({ baseInfo: { ...baseInfo, employeeId: ids, employeeName: names } });
|
||||
}
|
||||
})
|
||||
}];
|
||||
const noSysPerson = [
|
||||
{
|
||||
com: InputCus({
|
||||
label: "姓名",
|
||||
viewAttr: 2,
|
||||
onChange: (username) => {
|
||||
this.setState({ baseInfo: { ...baseInfo, username } });
|
||||
}
|
||||
})
|
||||
},
|
||||
{
|
||||
com: InputCus({
|
||||
label: "身份证号码",
|
||||
viewAttr: 3,
|
||||
onChange: (idcard) => {
|
||||
this.setState({ baseInfo: { ...baseInfo, idcard } });
|
||||
}
|
||||
})
|
||||
}
|
||||
];
|
||||
isSpecial && items.shift();
|
||||
const { form, condition = [] } = this.props;
|
||||
return (
|
||||
<div className="addItemsWrapper">
|
||||
<WeaSearchGroup
|
||||
className="baseForm"
|
||||
title="基础信息"
|
||||
items={!isCum ? items : baseInfo.personArea === "ORGANIZATION" ? [...cumSituationitems, ...insider] : baseInfo.personArea === "EXT_EMPLOYEE" ? [...cumSituationitems, ...noSysPerson] : cumSituationitems}
|
||||
needTigger showGroup col={1}/>
|
||||
{
|
||||
getSearchs(form, condition, 2)
|
||||
}
|
||||
{getSearchs(form, condition)}
|
||||
<Tips><span>若此员工数据已存在在同期列表中,则当前数据保存后会覆盖列表数据</span></Tips>
|
||||
</div>
|
||||
);
|
||||
|
|
@ -215,14 +85,6 @@ export const Browser = payload => {
|
|||
</WeaFormItem>
|
||||
);
|
||||
};
|
||||
export const InputCus = payload => {
|
||||
const { label, onChange, value, viewAttr = 3 } = payload;
|
||||
return (
|
||||
<WeaFormItem label={label} labelCol={{ span: 6 }} wrapperCol={{ span: 18 }}>
|
||||
<WeaInput value={value} onChange={onChange} viewAttr={viewAttr}/>
|
||||
</WeaFormItem>
|
||||
);
|
||||
};
|
||||
export const Tips = payload => {
|
||||
const { children } = payload;
|
||||
return (
|
||||
|
|
|
|||
|
|
@ -396,6 +396,67 @@ export const situationModalColumns = [
|
|||
export const dataSource = [];
|
||||
|
||||
export const dataCollectCondition = [
|
||||
{
|
||||
items: [
|
||||
{
|
||||
conditionType: "MONTHPICKER",
|
||||
domkey: ["declareMonth"],
|
||||
fieldcol: 12,
|
||||
label: "税款所属期",
|
||||
lanId: 542240,
|
||||
labelcol: 4,
|
||||
value: "",
|
||||
rules: "required|string",
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
conditionType: "SELECT",
|
||||
domkey: ["taxAgentId"],
|
||||
fieldcol: 12,
|
||||
label: "个税扣缴义务人",
|
||||
labelcol: 4,
|
||||
lanId: 537996,
|
||||
value: "",
|
||||
options: [],
|
||||
rules: "required|string",
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
browserConditionParam: {
|
||||
completeParams: {},
|
||||
conditionDataParams: {},
|
||||
dataParams: {},
|
||||
destDataParams: {},
|
||||
hasAddBtn: false,
|
||||
hasAdvanceSerach: true,
|
||||
idSeparator: ",",
|
||||
isAutoComplete: 1,
|
||||
isDetail: 0,
|
||||
isMultCheckbox: false,
|
||||
isSingle: true,
|
||||
linkUrl: "",
|
||||
pageSize: 10,
|
||||
quickSearchName: "",
|
||||
replaceDatas: [],
|
||||
type: "1",
|
||||
viewAttr: 3
|
||||
},
|
||||
colSpan: 2,
|
||||
conditionType: "BROWSER",
|
||||
domkey: ["employeeId"],
|
||||
fieldcol: 12,
|
||||
isQuickSearch: false,
|
||||
label: "人员",
|
||||
lanId: 30042,
|
||||
labelcol: 4,
|
||||
rules: "required",
|
||||
viewAttr: 3
|
||||
}
|
||||
],
|
||||
title: "基础信息",
|
||||
defaultshow: true,
|
||||
col: 1
|
||||
},
|
||||
{
|
||||
items: [
|
||||
{
|
||||
|
|
@ -470,7 +531,8 @@ export const dataCollectCondition = [
|
|||
}
|
||||
],
|
||||
title: "数据采集",
|
||||
defaultshow: true
|
||||
defaultshow: true,
|
||||
col: 2
|
||||
}
|
||||
];
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,8 @@ import {
|
|||
WeaInput,
|
||||
WeaLocaleProvider,
|
||||
WeaSearchGroup,
|
||||
WeaSelect
|
||||
WeaSelect,
|
||||
WeaTools
|
||||
} from "ecCom";
|
||||
import { Button, Dropdown, Menu, message, Modal } from "antd";
|
||||
import {
|
||||
|
|
@ -35,6 +36,7 @@ import moment from "moment";
|
|||
import SalaryCumDeductChooseTaxPeriodDialog from "./components/salaryCumDeductChooseTaxPeriodDialog";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
const getKey = WeaTools.getKey;
|
||||
|
||||
@inject("taxAgentStore", "cumDeductStore")
|
||||
@observer
|
||||
|
|
@ -282,21 +284,21 @@ class Index extends Component {
|
|||
}
|
||||
};
|
||||
handleSaveData = () => {
|
||||
const { cumDeductStore: { addForm } } = this.props;
|
||||
const { baseInfo } = this.addItemRef.state;
|
||||
const bool = _.every(_.pick(baseInfo, ["declareMonth", "taxAgentId", "employeeId"]), v => !!v);
|
||||
if (!bool) {
|
||||
Modal.warning({
|
||||
title: "信息确认",
|
||||
content: "必要信息不完整,红色*为必填项!"
|
||||
});
|
||||
return;
|
||||
}
|
||||
const payload = {
|
||||
..._.pick(baseInfo, ["declareMonth", "taxAgentId", "employeeId", "taxAgentName"]),
|
||||
...addForm.getFormParams()
|
||||
};
|
||||
this.handleSaveDeduction(payload);
|
||||
const { cumDeductStore: { addForm }, taxAgentStore: { taxAgentOption } } = this.props;
|
||||
addForm.validateForm().then(f => {
|
||||
if (f.isValid) {
|
||||
const payload = {
|
||||
...addForm.getFormParams(),
|
||||
taxAgentName: _.find(taxAgentOption, it => it.key === addForm.getFormParams().taxAgentId).showname
|
||||
};
|
||||
this.handleSaveDeduction(payload);
|
||||
} else {
|
||||
Modal.warning({
|
||||
title: "信息确认",
|
||||
content: "必要信息不完整,红色*为必填项!"
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
handleResize = (innerWidth) => this.setState({ innerWidth });
|
||||
/*
|
||||
|
|
@ -309,7 +311,32 @@ class Index extends Component {
|
|||
const { taxAgentStore, cumDeductStore: { addForm } } = this.props;
|
||||
const { slidePayload } = this.state;
|
||||
const { taxAgentOption } = taxAgentStore;
|
||||
addForm.initFormFields(dataCollectCondition);
|
||||
const conditions = _.map(dataCollectCondition, (it, idx) => {
|
||||
if (idx === 0) {
|
||||
return {
|
||||
...it, title: getLabel(82743, "基础信息"),
|
||||
items: _.map(it.items, o => {
|
||||
if (getKey(o) === "taxAgentId") {
|
||||
return {
|
||||
...o, label: getLabel(o.lanId, o.label),
|
||||
options: taxAgentOption, viewAttr: _.isEmpty(editId) ? 3 : 1
|
||||
};
|
||||
}
|
||||
return {
|
||||
...o, label: getLabel(o.lanId, o.label), viewAttr: _.isEmpty(editId) ? 3 : 1
|
||||
};
|
||||
})
|
||||
};
|
||||
} else if (idx === 1) {
|
||||
return {
|
||||
...it, title: getLabel(83871, "数据采集"),
|
||||
items: _.map(it.items, o => ({
|
||||
...o, label: getLabel(o.lanId, o.label)
|
||||
}))
|
||||
};
|
||||
}
|
||||
});
|
||||
addForm.initFormFields(conditions);
|
||||
this.setState({
|
||||
slidePayload: {
|
||||
...slidePayload,
|
||||
|
|
@ -322,7 +349,7 @@ class Index extends Component {
|
|||
taxAgentOption={taxAgentOption}
|
||||
form={addForm}
|
||||
editId={editId}
|
||||
condition={dataCollectCondition}
|
||||
condition={conditions}
|
||||
/> :
|
||||
<TableRecord
|
||||
ref={(dom) => this.tableRecordRef = dom}
|
||||
|
|
@ -360,6 +387,7 @@ class Index extends Component {
|
|||
});
|
||||
this.tableRecordRef && this.tableRecordRef.handleResetSelectKeys();
|
||||
this.handleDebounce = null;
|
||||
this.props.cumDeductStore.initAddForm();
|
||||
};
|
||||
/*
|
||||
* Author: 黎永顺
|
||||
|
|
|
|||
|
|
@ -66,6 +66,82 @@ export const columns = [
|
|||
}
|
||||
];
|
||||
export const dataCollectCondition = [
|
||||
{
|
||||
items: [
|
||||
{
|
||||
conditionType: "MONTHPICKER",
|
||||
domkey: ["taxYearMonth"],
|
||||
fieldcol: 12,
|
||||
label: "税款所属期",
|
||||
lanId: 542240,
|
||||
labelcol: 4,
|
||||
value: "",
|
||||
rules: "required|string",
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
conditionType: "SELECT",
|
||||
domkey: ["taxAgentId"],
|
||||
fieldcol: 12,
|
||||
label: "个税扣缴义务人",
|
||||
labelcol: 4,
|
||||
lanId: 537996,
|
||||
value: "",
|
||||
options: [],
|
||||
rules: "required|string",
|
||||
viewAttr: 3
|
||||
},
|
||||
// {
|
||||
// conditionType: "SELECT",
|
||||
// domkey: ["employeeScope"],
|
||||
// fieldcol: 14,
|
||||
// label: "人员范围",
|
||||
// labelcol: 8,
|
||||
// lanId: 124810,
|
||||
// value: "ORGANIZATION",
|
||||
// options: [
|
||||
// { key: "ORGANIZATION", showname: "内部人员" }
|
||||
// // { key: "EXT_EMPLOYEE", showname: "非系统人员" }
|
||||
// ],
|
||||
// rules: "required|string",
|
||||
// viewAttr: 3
|
||||
// },
|
||||
{
|
||||
browserConditionParam: {
|
||||
completeParams: {},
|
||||
conditionDataParams: {},
|
||||
dataParams: {},
|
||||
destDataParams: {},
|
||||
hasAddBtn: false,
|
||||
hasAdvanceSerach: true,
|
||||
idSeparator: ",",
|
||||
isAutoComplete: 1,
|
||||
isDetail: 0,
|
||||
isMultCheckbox: false,
|
||||
isSingle: true,
|
||||
linkUrl: "",
|
||||
pageSize: 10,
|
||||
quickSearchName: "",
|
||||
replaceDatas: [],
|
||||
type: "1",
|
||||
viewAttr: 3
|
||||
},
|
||||
colSpan: 2,
|
||||
conditionType: "BROWSER",
|
||||
domkey: ["employeeId"],
|
||||
fieldcol: 12,
|
||||
isQuickSearch: false,
|
||||
label: "人员",
|
||||
lanId: 30042,
|
||||
labelcol: 4,
|
||||
rules: "required",
|
||||
viewAttr: 3
|
||||
}
|
||||
],
|
||||
title: "基础信息",
|
||||
defaultshow: true,
|
||||
col: 1
|
||||
},
|
||||
{
|
||||
items: [
|
||||
{
|
||||
|
|
@ -275,7 +351,8 @@ export const dataCollectCondition = [
|
|||
// }
|
||||
],
|
||||
title: "数据采集",
|
||||
defaultshow: true
|
||||
defaultshow: true,
|
||||
col: 2
|
||||
}
|
||||
];
|
||||
export const taxOptions = [
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
import React, { Component } from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { WeaLocaleProvider, WeaSearchGroup } from "ecCom";
|
||||
import { WeaLocaleProvider, WeaSearchGroup, WeaTools } from "ecCom";
|
||||
import { Button, Dropdown, Menu, message, Modal } from "antd";
|
||||
import {
|
||||
createAddUpSituation,
|
||||
|
|
@ -33,6 +33,7 @@ import { convertToUrlString } from "../../../util/url";
|
|||
import SalaryCumDeductChooseTaxPeriodDialog from "../cumDeduct/components/salaryCumDeductChooseTaxPeriodDialog";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
const getKey = WeaTools.getKey;
|
||||
|
||||
@inject("taxAgentStore", "cumSituationStore")
|
||||
@observer
|
||||
|
|
@ -198,7 +199,32 @@ class Index extends Component {
|
|||
const { taxAgentStore, cumSituationStore: { addForm } } = this.props;
|
||||
const { slidePayload } = this.state;
|
||||
const { taxAgentOption } = taxAgentStore;
|
||||
addForm.initFormFields(dataCollectCondition);
|
||||
const conditions = _.map(dataCollectCondition, (it, idx) => {
|
||||
if (idx === 0) {
|
||||
return {
|
||||
...it, title: getLabel(82743, "基础信息"),
|
||||
items: _.map(it.items, o => {
|
||||
if (getKey(o) === "taxAgentId") {
|
||||
return {
|
||||
...o, label: getLabel(o.lanId, o.label),
|
||||
options: taxAgentOption, viewAttr: _.isEmpty(editId) ? 3 : 1
|
||||
};
|
||||
}
|
||||
return {
|
||||
...o, label: getLabel(o.lanId, o.label), viewAttr: _.isEmpty(editId) ? 3 : 1
|
||||
};
|
||||
})
|
||||
};
|
||||
} else if (idx === 1) {
|
||||
return {
|
||||
...it, title: getLabel(83871, "数据采集"),
|
||||
items: _.map(it.items, o => ({
|
||||
...o, label: getLabel(o.lanId, o.label)
|
||||
}))
|
||||
};
|
||||
}
|
||||
});
|
||||
addForm.initFormFields(conditions);
|
||||
this.setState({
|
||||
slidePayload: {
|
||||
...slidePayload,
|
||||
|
|
@ -212,7 +238,7 @@ class Index extends Component {
|
|||
form={addForm}
|
||||
isCum
|
||||
editId={editId}
|
||||
condition={dataCollectCondition}
|
||||
condition={conditions}
|
||||
/> :
|
||||
<TableRecord
|
||||
ref={(dom) => this.tableRecordRef = dom}
|
||||
|
|
@ -438,24 +464,24 @@ class Index extends Component {
|
|||
});
|
||||
this.tableRecordRef && this.tableRecordRef.handleResetSelectKeys();
|
||||
this.handleDebounce = null;
|
||||
this.props.cumSituationStore.initAddForm();
|
||||
};
|
||||
handleSaveData = () => {
|
||||
const { cumSituationStore: { addForm } } = this.props;
|
||||
const { baseInfo } = this.addItemRef.state;
|
||||
const bool = _.every(_.pick(baseInfo, ["declareMonth", "taxAgentId", "employeeId"]), v => !!v);
|
||||
if (!bool) {
|
||||
Modal.warning({
|
||||
title: "信息确认",
|
||||
content: "必要信息不完整,红色*为必填项!"
|
||||
});
|
||||
return;
|
||||
}
|
||||
const payload = {
|
||||
taxYearMonth: baseInfo.declareMonth,
|
||||
..._.pick(baseInfo, ["taxAgentId", "employeeId", "taxAgentName"]),
|
||||
...addForm.getFormParams()
|
||||
};
|
||||
this.handleSaveDeduction(payload);
|
||||
const { cumSituationStore: { addForm }, taxAgentStore: { taxAgentOption } } = this.props;
|
||||
addForm.validateForm().then(f => {
|
||||
if (f.isValid) {
|
||||
const payload = {
|
||||
...addForm.getFormParams(),
|
||||
taxAgentName: _.find(taxAgentOption, it => it.key === addForm.getFormParams().taxAgentId).showname
|
||||
};
|
||||
this.handleSaveDeduction(payload);
|
||||
} else {
|
||||
Modal.warning({
|
||||
title: "信息确认",
|
||||
content: "必要信息不完整,红色*为必填项!"
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
handleResize = (innerWidth) => this.setState({ innerWidth });
|
||||
|
|
|
|||
|
|
@ -66,6 +66,67 @@ export const columns = [
|
|||
}
|
||||
];
|
||||
export const dataCollectCondition = [
|
||||
{
|
||||
items: [
|
||||
{
|
||||
conditionType: "MONTHPICKER",
|
||||
domkey: ["declareMonth"],
|
||||
fieldcol: 12,
|
||||
label: "税款所属期",
|
||||
lanId: 542240,
|
||||
labelcol: 4,
|
||||
value: "",
|
||||
rules: "required|string",
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
conditionType: "SELECT",
|
||||
domkey: ["taxAgentId"],
|
||||
fieldcol: 12,
|
||||
label: "个税扣缴义务人",
|
||||
labelcol: 4,
|
||||
lanId: 537996,
|
||||
value: "",
|
||||
options: [],
|
||||
rules: "required|string",
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
browserConditionParam: {
|
||||
completeParams: {},
|
||||
conditionDataParams: {},
|
||||
dataParams: {},
|
||||
destDataParams: {},
|
||||
hasAddBtn: false,
|
||||
hasAdvanceSerach: true,
|
||||
idSeparator: ",",
|
||||
isAutoComplete: 1,
|
||||
isDetail: 0,
|
||||
isMultCheckbox: false,
|
||||
isSingle: true,
|
||||
linkUrl: "",
|
||||
pageSize: 10,
|
||||
quickSearchName: "",
|
||||
replaceDatas: [],
|
||||
type: "1",
|
||||
viewAttr: 3
|
||||
},
|
||||
colSpan: 2,
|
||||
conditionType: "BROWSER",
|
||||
domkey: ["employeeId"],
|
||||
fieldcol: 12,
|
||||
isQuickSearch: false,
|
||||
label: "人员",
|
||||
lanId: 30042,
|
||||
labelcol: 4,
|
||||
rules: "required",
|
||||
viewAttr: 3
|
||||
}
|
||||
],
|
||||
title: "基础信息",
|
||||
defaultshow: true,
|
||||
col: 1
|
||||
},
|
||||
{
|
||||
items: [
|
||||
{
|
||||
|
|
@ -120,7 +181,8 @@ export const dataCollectCondition = [
|
|||
}
|
||||
],
|
||||
title: "数据采集",
|
||||
defaultshow: true
|
||||
defaultshow: true,
|
||||
col: 2
|
||||
}
|
||||
];
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
import React, { Component } from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { WeaSearchGroup } from "ecCom";
|
||||
import { WeaLocaleProvider, WeaSearchGroup, WeaTools } from "ecCom";
|
||||
import { Button, Dropdown, Menu, message, Modal } from "antd";
|
||||
import {
|
||||
createData,
|
||||
|
|
@ -31,6 +31,9 @@ import TableRecord from "../components/tableRecord";
|
|||
import { otherModalColumns } from "../cumDeduct/columns";
|
||||
import { convertToUrlString } from "../../../util/url";
|
||||
|
||||
const getKey = WeaTools.getKey;
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
@inject("taxAgentStore", "otherDeductStore")
|
||||
@observer
|
||||
class Index extends Component {
|
||||
|
|
@ -287,7 +290,32 @@ class Index extends Component {
|
|||
const { taxAgentStore, otherDeductStore: { addForm } } = this.props;
|
||||
const { slidePayload } = this.state;
|
||||
const { taxAgentOption } = taxAgentStore;
|
||||
addForm.initFormFields(dataCollectCondition);
|
||||
const conditions = _.map(dataCollectCondition, (it, idx) => {
|
||||
if (idx === 0) {
|
||||
return {
|
||||
...it, title: getLabel(82743, "基础信息"),
|
||||
items: _.map(it.items, o => {
|
||||
if (getKey(o) === "taxAgentId") {
|
||||
return {
|
||||
...o, label: getLabel(o.lanId, o.label),
|
||||
options: taxAgentOption, viewAttr: _.isEmpty(editId) ? 3 : 1
|
||||
};
|
||||
}
|
||||
return {
|
||||
...o, label: getLabel(o.lanId, o.label), viewAttr: _.isEmpty(editId) ? 3 : 1
|
||||
};
|
||||
})
|
||||
};
|
||||
} else if (idx === 1) {
|
||||
return {
|
||||
...it, title: getLabel(83871, "数据采集"),
|
||||
items: _.map(it.items, o => ({
|
||||
...o, label: getLabel(o.lanId, o.label)
|
||||
}))
|
||||
};
|
||||
}
|
||||
});
|
||||
addForm.initFormFields(conditions);
|
||||
this.setState({
|
||||
slidePayload: {
|
||||
...slidePayload,
|
||||
|
|
@ -300,7 +328,7 @@ class Index extends Component {
|
|||
taxAgentOption={taxAgentOption}
|
||||
form={addForm}
|
||||
editId={editId}
|
||||
condition={dataCollectCondition}
|
||||
condition={conditions}
|
||||
/> :
|
||||
<TableRecord
|
||||
ref={(dom) => this.tableRecordRef = dom}
|
||||
|
|
@ -389,23 +417,24 @@ class Index extends Component {
|
|||
});
|
||||
this.tableRecordRef && this.tableRecordRef.handleResetSelectKeys();
|
||||
this.handleDebounce = null;
|
||||
this.props.otherDeductStore.initAddForm();
|
||||
};
|
||||
handleSaveData = () => {
|
||||
const { otherDeductStore: { addForm } } = this.props;
|
||||
const { baseInfo } = this.addItemRef.state;
|
||||
const bool = _.every(_.pick(baseInfo, ["declareMonth", "taxAgentId", "employeeId"]), v => !!v);
|
||||
if (!bool) {
|
||||
Modal.warning({
|
||||
title: "信息确认",
|
||||
content: "必要信息不完整,红色*为必填项!"
|
||||
});
|
||||
return;
|
||||
}
|
||||
const payload = {
|
||||
..._.pick(baseInfo, ["declareMonth", "taxAgentId", "employeeId", "taxAgentName"]),
|
||||
...addForm.getFormParams()
|
||||
};
|
||||
this.handleSaveDeduction(payload);
|
||||
const { otherDeductStore: { addForm }, taxAgentStore: { taxAgentOption } } = this.props;
|
||||
addForm.validateForm().then(f => {
|
||||
if (f.isValid) {
|
||||
const payload = {
|
||||
...addForm.getFormParams(),
|
||||
taxAgentName: _.find(taxAgentOption, it => it.key === addForm.getFormParams().taxAgentId).showname
|
||||
};
|
||||
this.handleSaveDeduction(payload);
|
||||
} else {
|
||||
Modal.warning({
|
||||
title: "信息确认",
|
||||
content: "必要信息不完整,红色*为必填项!"
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
handleAdSearch = () => {
|
||||
const { otherDeductStore: { form } } = this.props;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,54 @@
|
|||
export const condition = [
|
||||
{
|
||||
items: [
|
||||
{
|
||||
conditionType: "SELECT",
|
||||
domkey: ["taxAgentId"],
|
||||
fieldcol: 12,
|
||||
label: "个税扣缴义务人",
|
||||
lanId: 537996,
|
||||
labelcol: 4,
|
||||
value: "",
|
||||
options: [],
|
||||
rules: "required|string",
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
browserConditionParam: {
|
||||
completeParams: {},
|
||||
conditionDataParams: {},
|
||||
dataParams: {},
|
||||
destDataParams: {},
|
||||
hasAddBtn: false,
|
||||
hasAdvanceSerach: true,
|
||||
idSeparator: ",",
|
||||
isAutoComplete: 1,
|
||||
isDetail: 0,
|
||||
isMultCheckbox: false,
|
||||
isSingle: true,
|
||||
linkUrl: "",
|
||||
pageSize: 10,
|
||||
quickSearchName: "",
|
||||
replaceDatas: [],
|
||||
type: "1",
|
||||
viewAttr: 3
|
||||
},
|
||||
colSpan: 2,
|
||||
conditionType: "BROWSER",
|
||||
domkey: ["employeeId"],
|
||||
fieldcol: 12,
|
||||
isQuickSearch: false,
|
||||
label: "人员",
|
||||
lanId: 30042,
|
||||
labelcol: 4,
|
||||
rules: "required",
|
||||
viewAttr: 3
|
||||
}
|
||||
],
|
||||
title: "基础信息",
|
||||
defaultshow: true,
|
||||
col: 1
|
||||
},
|
||||
{
|
||||
items: [
|
||||
{
|
||||
|
|
@ -73,7 +123,8 @@ export const condition = [
|
|||
}
|
||||
],
|
||||
title: "数据采集",
|
||||
defaultshow: true
|
||||
defaultshow: true,
|
||||
col: 2
|
||||
}
|
||||
];
|
||||
|
||||
|
|
@ -114,7 +165,7 @@ export const searchCondition = [
|
|||
showOrder: 0
|
||||
}
|
||||
],
|
||||
title: '部门',
|
||||
title: "部门",
|
||||
type: "4",
|
||||
viewAttr: 2,
|
||||
pageSize: 10,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import React, { Component } from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { WeaSearchGroup } from "ecCom";
|
||||
import { WeaLocaleProvider, WeaSearchGroup, WeaTools } from "ecCom";
|
||||
import { Button, Dropdown, Menu, message, Modal } from "antd";
|
||||
import DataTables from "../dataTables";
|
||||
import Layout from "../layout";
|
||||
|
|
@ -23,6 +23,9 @@ import TableRecord from "../components/tableRecord";
|
|||
import { specialModalColumns } from "../cumDeduct/columns";
|
||||
import { convertToUrlString } from "../../../util/url";
|
||||
|
||||
const getKey = WeaTools.getKey;
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
@inject("taxAgentStore", "specialAddStore")
|
||||
@observer
|
||||
class Index extends Component {
|
||||
|
|
@ -295,7 +298,32 @@ class Index extends Component {
|
|||
const { taxAgentStore, specialAddStore: { addForm } } = this.props;
|
||||
const { slidePayload } = this.state;
|
||||
const { taxAgentOption } = taxAgentStore;
|
||||
addForm.initFormFields(condition);
|
||||
const conditions = _.map(condition, (it, idx) => {
|
||||
if (idx === 0) {
|
||||
return {
|
||||
...it, title: getLabel(82743, "基础信息"),
|
||||
items: _.map(it.items, o => {
|
||||
if (getKey(o) === "taxAgentId") {
|
||||
return {
|
||||
...o, label: getLabel(o.lanId, o.label),
|
||||
options: taxAgentOption, viewAttr: _.isEmpty(editId) ? 3 : 1
|
||||
};
|
||||
}
|
||||
return {
|
||||
...o, label: getLabel(o.lanId, o.label), viewAttr: _.isEmpty(editId) ? 3 : 1
|
||||
};
|
||||
})
|
||||
};
|
||||
} else if (idx === 1) {
|
||||
return {
|
||||
...it, title: getLabel(83871, "数据采集"),
|
||||
items: _.map(it.items, o => ({
|
||||
...o, label: getLabel(o.lanId, o.label)
|
||||
}))
|
||||
};
|
||||
}
|
||||
});
|
||||
addForm.initFormFields(conditions);
|
||||
this.setState({
|
||||
slidePayload: {
|
||||
...slidePayload,
|
||||
|
|
@ -309,7 +337,7 @@ class Index extends Component {
|
|||
form={addForm}
|
||||
isSpecial
|
||||
editId={editId}
|
||||
condition={condition}
|
||||
condition={conditions}
|
||||
/> :
|
||||
<TableRecord
|
||||
ref={(dom) => this.tableRecordRef = dom}
|
||||
|
|
@ -347,23 +375,24 @@ class Index extends Component {
|
|||
});
|
||||
this.tableRecordRef && this.tableRecordRef.handleResetSelectKeys();
|
||||
this.handleDebounce = null;
|
||||
this.props.specialAddStore.initAddForm();
|
||||
};
|
||||
handleSaveData = () => {
|
||||
const { specialAddStore: { addForm } } = this.props;
|
||||
const { baseInfo } = this.addItemRef.state;
|
||||
const bool = _.every(_.pick(baseInfo, ["taxAgentId", "employeeId"]), v => !!v);
|
||||
if (!bool) {
|
||||
Modal.warning({
|
||||
title: "信息确认",
|
||||
content: "必要信息不完整,红色*为必填项!"
|
||||
});
|
||||
return;
|
||||
}
|
||||
const payload = {
|
||||
..._.pick(baseInfo, ["taxAgentId", "employeeId", "taxAgentName"]),
|
||||
...addForm.getFormParams()
|
||||
};
|
||||
this.handleSaveDeduction(payload);
|
||||
const { specialAddStore: { addForm }, taxAgentStore: { taxAgentOption } } = this.props;
|
||||
addForm.validateForm().then(f => {
|
||||
if (f.isValid) {
|
||||
const payload = {
|
||||
...addForm.getFormParams(),
|
||||
taxAgentName: _.find(taxAgentOption, it => it.key === addForm.getFormParams().taxAgentId).showname
|
||||
};
|
||||
this.handleSaveDeduction(payload);
|
||||
} else {
|
||||
Modal.warning({
|
||||
title: "信息确认",
|
||||
content: "必要信息不完整,红色*为必填项!"
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
handleAdSearch = () => {
|
||||
const { specialAddStore: { advanceForm } } = this.props;
|
||||
|
|
|
|||
|
|
@ -434,8 +434,8 @@ export default class Programme extends React.Component {
|
|||
visible={this.state.slideVisiable}
|
||||
top={0}
|
||||
measureT="%"
|
||||
width={800}
|
||||
measureX="px"
|
||||
width={100}
|
||||
measureX="%"
|
||||
height={100}
|
||||
measureY="%"
|
||||
direction={"right"}
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ export class CumDeductStore {
|
|||
@observable slideTableStore = new TableStore();
|
||||
@observable form = new WeaForm(); // new 一个form
|
||||
@observable addForm = new WeaForm(); // 新增form
|
||||
@action initAddForm = () => this.addForm = new WeaForm(); // 初始化新增form
|
||||
@observable condition = []; // 存储后台得到的form数据
|
||||
@observable hasRight = true; // 判断用户是有权限查看当前页面: 没有权限渲染无权限页面,有权限渲染数据
|
||||
@observable showSearchAd = false; // 高级搜索面板显示
|
||||
|
|
@ -113,7 +114,7 @@ export class CumDeductStore {
|
|||
...requestParams,
|
||||
current: this.pageObj.current,
|
||||
pageSize: this.pageObj.pageSize,
|
||||
...params,
|
||||
...params
|
||||
};
|
||||
API.getCumDeductList(requestParams).then(
|
||||
action(({ status, data, errormsg }) => {
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ export class CumSituationStore {
|
|||
@observable slideTableStore = new TableStore();
|
||||
@observable form = new WeaForm(); // new 一个form
|
||||
@observable addForm = new WeaForm(); // 新增form
|
||||
@action initAddForm = () => this.addForm = new WeaForm();
|
||||
@observable condition = []; // 存储后台得到的form数据
|
||||
@observable hasRight = true; // 判断用户是有权限查看当前页面: 没有权限渲染无权限页面,有权限渲染数据
|
||||
@observable showSearchAd = false; // 高级搜索面板显示
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { observable, action, toJS } from "mobx";
|
||||
import { action, observable } from "mobx";
|
||||
import { message } from "antd";
|
||||
import { WeaForm, WeaTableNew } from "comsMobx";
|
||||
import { removePropertyCondition } from "../util/response";
|
||||
|
|
@ -12,6 +12,7 @@ export class OtherDeductStore {
|
|||
@observable slideTableStore = new TableStore();
|
||||
@observable form = new WeaForm(); // new 一个form
|
||||
@observable addForm = new WeaForm(); // 新增form
|
||||
@action initAddForm = () => this.addForm = new WeaForm();
|
||||
@observable condition = []; // 存储后台得到的form数据
|
||||
@observable hasRight = true; // 判断用户是有权限查看当前页面: 没有权限渲染无权限页面,有权限渲染数据
|
||||
@observable showSearchAd = false; // 高级搜索面板显示
|
||||
|
|
@ -115,13 +116,13 @@ export class OtherDeductStore {
|
|||
this.setPageObj({
|
||||
total,
|
||||
current,
|
||||
pageSize,
|
||||
pageSize
|
||||
});
|
||||
} else {
|
||||
this.setDataSource([]);
|
||||
this.setPageObj({
|
||||
...this.pageObj,
|
||||
total: 0,
|
||||
total: 0
|
||||
});
|
||||
message.error(errormsg || "接口调用失败!");
|
||||
}
|
||||
|
|
@ -184,23 +185,23 @@ export class OtherDeductStore {
|
|||
this.setSlidePageObj({
|
||||
total,
|
||||
current,
|
||||
pageSize,
|
||||
pageSize
|
||||
});
|
||||
} else {
|
||||
this.setSlideTableDataSource([]);
|
||||
this.setSlidePageObj({
|
||||
...this.slidePageObj,
|
||||
total: 0,
|
||||
total: 0
|
||||
});
|
||||
message.error(errormsg || "接口调用失败!");
|
||||
}
|
||||
this.slideLoading = false
|
||||
this.slideLoading = false;
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
// 导出明细
|
||||
@action exportOtherDeductDetailList = (id, ids = "", taxAgentId="") => {
|
||||
@action exportOtherDeductDetailList = (id, ids = "", taxAgentId = "") => {
|
||||
API.exportOtherDeductDetailList(id, ids, taxAgentId);
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
import { observable, action, toJS } from 'mobx';
|
||||
import { WeaForm } from 'comsMobx';
|
||||
import { action, observable } from "mobx";
|
||||
import { WeaForm } from "comsMobx";
|
||||
|
||||
export class SpecialAddStore {
|
||||
@observable advanceForm = new WeaForm();
|
||||
@observable addForm = new WeaForm();
|
||||
@action initAddForm = () => this.addForm = new WeaForm();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ export const getSearchs = (form, condition, col, isCenter, onChange = () => void
|
|||
});
|
||||
group.push(
|
||||
<WeaSearchGroup
|
||||
col={col || 1} // 高级搜索列布局列数
|
||||
col={col || c.col || 1} // 高级搜索列布局列数
|
||||
needTigger={true} // 是否开启收缩
|
||||
title={c.title || title} // 高级搜索标题
|
||||
showGroup={c.defaultshow} // 是否开启面板
|
||||
|
|
@ -123,7 +123,7 @@ export const printDom = (printParams) => {
|
|||
}
|
||||
};
|
||||
export const getDomkes = (conditions) => {
|
||||
return _.map(conditions[0].items, it => it.domkey[0]);
|
||||
return _.reduce(conditions, (pre, cur) => ([...pre, ..._.map(cur.items, o => o.domkey[0])]), []);
|
||||
};
|
||||
|
||||
export const padding0 = (num, length) => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue