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