diff --git a/pc4mobx/hrmSalary/apis/cumDeduct.js b/pc4mobx/hrmSalary/apis/cumDeduct.js
index 18ddb1a5..8d54f306 100644
--- a/pc4mobx/hrmSalary/apis/cumDeduct.js
+++ b/pc4mobx/hrmSalary/apis/cumDeduct.js
@@ -123,3 +123,7 @@ export const deleteSelectAddUpDeduction = (params) => {
export const deleteAllAddUpDeduction = (params) => {
return postFetch('/api/bs/hrmsalary/addUpDeduction/deleteAllAddUpDeduction', params);
}
+//一键累计
+export const autoAddAll = (params) => {
+ return postFetch('/api/bs/hrmsalary/addUpDeduction/autoAddAll', params);
+}
diff --git a/pc4mobx/hrmSalary/apis/special.js b/pc4mobx/hrmSalary/apis/special.js
new file mode 100644
index 00000000..da0b4869
--- /dev/null
+++ b/pc4mobx/hrmSalary/apis/special.js
@@ -0,0 +1,43 @@
+import { WeaTools } from "ecCom";
+import { postFetch } from "../util/request";
+
+//高级搜索条件
+export const getSearchCondition = (params) => {
+ return WeaTools.callApi("/api/bs/hrmsalary/specialAddDeduction/getSearchCondition", "GET", params);
+};
+// 获取专项附加扣除列表
+export const specialAddDeductionList = (params) => {
+ return postFetch('/api/bs/hrmsalary/specialAddDeduction/list', params);
+}
+// 新增专项附加扣除
+export const specialAddDeductionCreateData = (params) => {
+ return postFetch('/api/bs/hrmsalary/specialAddDeduction/createData', params);
+}
+// 编辑专项附加扣除
+export const specialAddDeductionEditData = (params) => {
+ return postFetch('/api/bs/hrmsalary/specialAddDeduction/editData', params);
+}
+// 查看明细
+export const specialAddDeductionGetDetailList = (params) => {
+ return postFetch('/api/bs/hrmsalary/specialAddDeduction/getDetailList', params);
+}
+// 批量专项附加扣除
+export const specialAddDeductionDeleteSelectData = (params) => {
+ return postFetch('/api/bs/hrmsalary/specialAddDeduction/deleteSelectData', params);
+}
+// 一键清空
+export const specialAddDeductionDeleteAllData = (params) => {
+ return postFetch('/api/bs/hrmsalary/specialAddDeduction/deleteAllData', params);
+}
+// 查看单条信息
+export const getSpecialAddDeduction = (params) => {
+ return postFetch('/api/bs/hrmsalary/specialAddDeduction/getSpecialAddDeduction', params);
+}
+// 导入预览
+export const specialAddDeductionPreview = (params) => {
+ return postFetch('/api/bs/hrmsalary/specialAddDeduction/preview', params);
+}
+// 导入预览结果
+export const specialAddDeductionImportData = (params) => {
+ return postFetch('/api/bs/hrmsalary/specialAddDeduction/importData', params);
+}
diff --git a/pc4mobx/hrmSalary/index.js b/pc4mobx/hrmSalary/index.js
index edea0f0a..10ffaca1 100644
--- a/pc4mobx/hrmSalary/index.js
+++ b/pc4mobx/hrmSalary/index.js
@@ -14,6 +14,7 @@ import CumDeduct from "./pages/dataAcquisition/cumDeduct";
import OtherDeduct from "./pages/dataAcquisition/otherDeduct";
import CumSituation from "./pages/dataAcquisition/cumSituation";
import Attendance from "./pages/dataAcquisition/attendance";
+import SpecialAddDeduction from './pages/dataAcquisition/specialAddDeduction';
import Ledger from "./pages/ledger";
import Calculate from "./pages/calculate";
import Payroll from "./pages/payroll";
@@ -61,6 +62,7 @@ const DataAcquisition = (props) => props.children;
// otherDeduct 其他免税扣除
// cumSituation 往期累计情况
// attendance 考勤引用
+// specialAddDeduction 专项附件扣除
// ledger 薪资账套
// calculate 薪资核算
// calculateDetail 核算详情
@@ -111,6 +113,7 @@ const Routes = (
+
diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/addItems.js b/pc4mobx/hrmSalary/pages/dataAcquisition/addItems.js
index 836fb1a8..b57b8860 100644
--- a/pc4mobx/hrmSalary/pages/dataAcquisition/addItems.js
+++ b/pc4mobx/hrmSalary/pages/dataAcquisition/addItems.js
@@ -51,9 +51,9 @@ class AddItems extends Component {
}
render() {
- const { taxAgentOption = [], form, condition = [], isCum, editId } = this.props;
+ const { taxAgentOption = [], form, condition = [], isCum, isSpecial, editId } = this.props;
const { baseInfo } = this.state;
- const items = [
+ let items = [
{
com: PickDate({
label: "税款所属期",
@@ -161,7 +161,7 @@ class AddItems extends Component {
})
}
];
-
+ isSpecial && items.shift();
return (
{
+ const { monthValue: declareMonth, taxAgentId } = this.state;
+ const { cumDeductStore: { doSearch } } = this.props;
+ this.setState({ addAllLoading: true });
+ API.autoAddAll({}).then(({ status, errormsg }) => {
+ this.setState({ addAllLoading: false });
+ if (status) {
+ message.success("操作成功");
+ doSearch({
+ declareMonth: [declareMonth],
+ taxAgentId: taxAgentId === "All" ? "" : taxAgentId
+ });
+ } else {
+ message.error(errormsg || "操作失败");
+ }
+ }).catch(() => this.setState({ addAllLoading: false }));
+ };
render() {
- const { modalParam, slideSelectedKey, monthValue, taxAgentId, addVisible, editId, saveLoading } = this.state;
+ const {
+ modalParam,
+ slideSelectedKey,
+ monthValue,
+ taxAgentId,
+ addVisible,
+ editId,
+ saveLoading,
+ addAllLoading
+ } = this.state;
const { cumDeductStore, taxAgentStore } = this.props;
const {
loading,
@@ -546,7 +573,13 @@ export default class CumDeduct extends React.Component {
}
type="ghost">
一键清空
-
+ ,
+
];
const handleExportAllDetailClick = () => {
diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/specialAddDeduction/components/condition.js b/pc4mobx/hrmSalary/pages/dataAcquisition/specialAddDeduction/components/condition.js
new file mode 100644
index 00000000..5f1187c7
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/dataAcquisition/specialAddDeduction/components/condition.js
@@ -0,0 +1,71 @@
+export const condition = [
+ {
+ items: [
+ {
+ conditionType: "INPUT",
+ domkey: ["childrenEducation"],
+ fieldcol: 14,
+ label: "子女教育",
+ labelcol: 8,
+ value: "",
+ viewAttr: 2
+ },
+ {
+ conditionType: "INPUT",
+ domkey: ["continuingEducation"],
+ fieldcol: 14,
+ label: "继续教育",
+ labelcol: 8,
+ value: "",
+ viewAttr: 2
+ },
+ {
+ conditionType: "INPUT",
+ domkey: ["housingLoanInterest"],
+ fieldcol: 14,
+ label: "住房贷款利息",
+ labelcol: 8,
+ value: "",
+ viewAttr: 2
+ },
+ {
+ conditionType: "INPUT",
+ domkey: ["housingRent"],
+ fieldcol: 14,
+ label: "住房租金",
+ labelcol: 8,
+ value: "",
+ viewAttr: 2
+ },
+ {
+ conditionType: "INPUT",
+ domkey: ["supportingElder"],
+ fieldcol: 14,
+ label: "赡养老人",
+ labelcol: 8,
+ value: "",
+ viewAttr: 2
+ },
+ {
+ conditionType: "INPUT",
+ domkey: ["seriousIllnessTreatment"],
+ fieldcol: 14,
+ label: "大病医疗",
+ labelcol: 8,
+ value: "",
+ viewAttr: 2
+ },
+ {
+ conditionType: "INPUT",
+ domkey: ["infantCare"],
+ fieldcol: 14,
+ label: "婴幼儿照护",
+ labelcol: 8,
+ value: "",
+ viewAttr: 2
+ }
+ ],
+ title: '数据采集',
+ defaultshow: true
+ }
+];
diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/specialAddDeduction/components/inlineForm.js b/pc4mobx/hrmSalary/pages/dataAcquisition/specialAddDeduction/components/inlineForm.js
new file mode 100644
index 00000000..30a44c4e
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/dataAcquisition/specialAddDeduction/components/inlineForm.js
@@ -0,0 +1,25 @@
+import React, { Component } from "react";
+import { Form } from "antd";
+import { WeaSelect } from "ecCom";
+import { optionAddWhole } from "../../../../util/options";
+
+class InlineForm extends Component {
+
+ render() {
+ const { taxAgentOption = [], form, onChange } = this.props;
+ return (
+
+
+
+
+ );
+ }
+}
+
+export default Form.create()(InlineForm);
diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/specialAddDeduction/components/specialAddContent.js b/pc4mobx/hrmSalary/pages/dataAcquisition/specialAddDeduction/components/specialAddContent.js
new file mode 100644
index 00000000..cfdfff2c
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/dataAcquisition/specialAddDeduction/components/specialAddContent.js
@@ -0,0 +1,87 @@
+import React, { Component } from "react";
+import { WeaTable } from "ecCom";
+import * as API from "../../../../apis/special";
+
+class SpecialAddContent extends Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ dataSource: [],
+ columns: [],
+ loading: {
+ query: false
+ },
+ selectedRowKeys: [],
+ pageInfo: {
+ current: 1,
+ pageSize: 10,
+ total: 0
+ }
+ };
+ }
+
+ componentWillReceiveProps(nextProps, nextContext) {
+ if (nextProps.specialId !== this.props.specialId) {
+ nextProps.specialId && this.specialAddDeductionGetDetailList({ specialAddDeductionId: nextProps.specialId });
+ }
+ }
+
+ specialAddDeductionGetDetailList = (payload) => {
+ this.setState({ loading: { ...this.state.loading, query: true } });
+ API.specialAddDeductionGetDetailList(payload).then(({ status, data }) => {
+ this.setState({ loading: { ...this.state.loading, query: false } });
+ if (status) {
+ const { columns, list: dataSource, pageSize, pageNum, total } = data;
+ this.setState({
+ columns, dataSource,
+ pageInfo: {
+ ...this.pageInfo,
+ pageSize, pageNum, total
+ }
+ });
+ }
+ });
+ };
+
+ render() {
+ const { columns, dataSource, pageInfo, selectedRowKeys, loading } = this.state;
+ const { specialId } = this.props;
+ const pagination = {
+ ...pageInfo,
+ showTotal: (total) => `共 ${total} 条`,
+ pageSizeOptions: ["10", "20", "50", "100"],
+ showSizeChanger: true,
+ showQuickJumper: true,
+ onShowSizeChange: (current, pageSize) => {
+ this.setState({
+ pageInfo: { ...pageInfo, current, pageSize }
+ }, () => {
+ this.specialAddDeductionGetDetailList({ specialAddDeductionId: specialId, current, pageSize });
+ });
+ },
+ onChange: (current) => {
+ this.setState({
+ pageInfo: { ...pageInfo, current }
+ }, () => {
+ this.specialAddDeductionGetDetailList({ specialAddDeductionId: specialId, current });
+ });
+ }
+ };
+ const rowSelection = {
+ selectedRowKeys,
+ onChange: (selectedRowKeys) => this.setState({ selectedRowKeys })
+ };
+ return (
+
+ );
+ }
+}
+
+export default SpecialAddContent;
diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/specialAddDeduction/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/specialAddDeduction/index.js
new file mode 100644
index 00000000..97e8d8e1
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/dataAcquisition/specialAddDeduction/index.js
@@ -0,0 +1,645 @@
+import React, { Component } from "react";
+import { inject, observer } from "mobx-react";
+import { Button, Col, Dropdown, Menu, message, Modal, Popover, Row } from "antd";
+import { WeaPopoverHrm, WeaSelect, WeaSlideModal, WeaTab, WeaTable, WeaTools, WeaTop } from "ecCom";
+import InlineForm from "./components/inlineForm";
+import { getSearchs, renderLoading } from "../../../util";
+import * as API from "../../../apis/special";
+import SlideModalTitle from "../../../components/slideModalTitle";
+import AddItems from "../addItems";
+import SpecialAddContent from "./components/specialAddContent";
+import { condition } from "./components/condition";
+import ImportModal from "../../../components/importModal";
+import { specialModalColumns } from "../cumDeduct/columns";
+import "./index.less";
+
+@inject("specialAddStore", "taxAgentStore")
+@observer
+class SpecialAddDeduction extends Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ loading: {
+ query: false
+ },
+ advanceParams: { //高级搜索参数
+ visible: false,
+ condition: []
+ },
+ drawerParams: { //抽屜弹框参数
+ visible: false, title: "新建",
+ loading: false, isView: true,
+ editId: {}
+ },
+ importParams: { //导入弹框参数
+ visible: false, step: 0,
+ importResult: [],
+ payload: { taxAgentId: "" }
+ },
+ dataSource: [],
+ columns: [],
+ selectedRowKeys: [],
+ pageInfo: {
+ current: 1, pageSize: 10, total: 0
+ }
+ };
+ this.inlineForm = null;
+ this.addItemRef = null;
+ this.specialContentRef = null;
+ }
+
+ componentDidMount() {
+ const { taxAgentStore: { getTaxAgentSelectListAsAdmin }, specialAddStore: { addForm } } = this.props;
+ addForm.initFormFields(condition);
+ getTaxAgentSelectListAsAdmin();
+ this.getSearchCondition();
+ this.specialAddDeductionList();
+ }
+
+ getSearchCondition = () => {
+ const { specialAddStore: { advanceForm } } = this.props;
+ const { advanceParams } = this.state;
+ API.getSearchCondition().then(({ status, data }) => {
+ if (status) {
+ const { condition } = data;
+ this.setState({
+ advanceParams: {
+ ...advanceParams,
+ condition: condition
+ }
+ }, () => advanceForm.initFormFields(this.state.advanceParams.condition));
+ }
+ });
+ };
+ specialAddDeductionList = (params = {}) => {
+ const { loading, pageInfo } = this.state;
+ const { specialAddStore: { advanceForm } } = this.props;
+ const queryParams = advanceForm.getFormParams();
+ const extraParams = this.inlineForm ? this.inlineForm.getFieldsValue() : {};
+ const payload = {
+ ...pageInfo,
+ ...queryParams,
+ ...extraParams,
+ ...params
+ };
+ this.setState({ loading: { ...loading, query: true } });
+ API.specialAddDeductionList(payload).then(({ status, data }) => {
+ this.setState({ loading: { ...loading, query: false } });
+ if (status) {
+ const { columns, list: dataSource, pageNum: current, pageSize, total } = data;
+ const { userid } = WeaTools.ls.getJSONObj("theme-account") || {};
+ this.setState({
+ pageInfo: { ...pageInfo, current, pageSize, total },
+ dataSource,
+ columns: _.map(columns, item => {
+ const { dataIndex } = item;
+ if (dataIndex === "username") {
+ return {
+ ...item,
+ render: (text, record) => {
+ return window.pointerXY(e)}
+ title={text}
+ >
+ {text}
+ ;
+ }
+ };
+ } else if (dataIndex === "operate") {
+ return {
+ ...item,
+ render: (text, record) => (
+
+ )
+ };
+ } else {
+ return { ...item };
+ }
+ })
+ });
+ }
+ });
+ };
+ handleSaveSpecialList = (payload) => {
+ const { drawerParams } = this.state;
+ this.setState({ drawerParams: { ...drawerParams, loading: true } });
+ if (!_.isEmpty(drawerParams.editId)) {
+ API.specialAddDeductionEditData({ ...payload, id: drawerParams.editId.id }).then(({ status, errormsg }) => {
+ this.setState({ drawerParams: { ...drawerParams, loading: false } });
+ if (status) {
+ message.success("编辑成功");
+ this.setState({
+ drawerParams: {
+ ...drawerParams,
+ visible: false,
+ isView: true,
+ editId: {}
+ }
+ }, () => {
+ const { specialAddStore: { addForm } } = this.props;
+ this.specialAddDeductionList();
+ addForm.resetForm();
+ });
+ } else {
+ message.error(errormsg || "编辑失败");
+ }
+ });
+ } else {
+ API.specialAddDeductionCreateData(payload).then(({ status, errormsg }) => {
+ this.setState({ drawerParams: { ...drawerParams, loading: false } });
+ if (status) {
+ message.success("新增成功");
+ this.setState({
+ drawerParams: {
+ ...drawerParams,
+ visible: false,
+ isView: true,
+ editId: {}
+ }
+ }, () => {
+ const { specialAddStore: { addForm } } = this.props;
+ this.specialAddDeductionList();
+ addForm.resetForm();
+ });
+ } else {
+ message.error(errormsg || "新增失败");
+ }
+ });
+ }
+ };
+ handleOperate = ({ key }, row) => {
+ const { drawerParams } = this.state;
+ if (key === "edit") {
+ this.setState({
+ drawerParams: {
+ ...drawerParams,
+ visible: true,
+ isView: false,
+ title: "编辑"
+ }
+ }, () => {
+ const { drawerParams: params } = this.state;
+ API.getSpecialAddDeduction({ id: row.id }).then(({ status, data }) => {
+ if (status) {
+ this.setState({
+ drawerParams: {
+ ...params,
+ editId: data
+ }
+ });
+ }
+ });
+ });
+ } else if (key === "delete") {
+ const payload = {
+ ids: [row.id]
+ };
+ Modal.confirm({
+ title: "信息确认",
+ content: `确定删除${row.departmentName}${row.username}的专项附加扣除数据吗?若数据已参与核算,已参与核算的数据不会受影响,点击核算将会按当前列表最新数据重新核算。`,
+ onOk: () => {
+ API.specialAddDeductionDeleteSelectData(payload).then(({ status, errormsg }) => {
+ if (status) {
+ message.success("删除成功");
+ this.specialAddDeductionList();
+ } else {
+ message.error(errormsg || "删除失败");
+ }
+ });
+ }
+ });
+ }
+ };
+ deleteSelectAddUpDeduction = () => {
+ const { selectedRowKeys } = this.state;
+ if (selectedRowKeys.length === 0) {
+ message.warning("未选择条目");
+ return;
+ }
+ const payload = {
+ ids: selectedRowKeys
+ };
+ Modal.confirm({
+ title: "信息确认",
+ content: "确定删除所选数据吗?若数据已参与核算,已参与核算的数据不会受影响,点击核算将会按当前列表最新数据重新核算。",
+ onOk: () => {
+ API.specialAddDeductionDeleteSelectData(payload).then(({ status, errormsg }) => {
+ if (status) {
+ message.success("删除成功");
+ this.specialAddDeductionList();
+ } else {
+ message.error(errormsg || "删除失败");
+ }
+ });
+ },
+ onCancel: () => {
+ }
+ });
+
+ };
+ specialAddDeductionDeleteAllData = () => {
+ const extraParams = this.inlineForm ? this.inlineForm.getFieldsValue() : {};
+ const payload = {
+ ...extraParams
+ };
+ Modal.confirm({
+ title: "信息确认",
+ content: `确定清空所有专项附加扣除数据吗?若数据已参与核算,已参与核算的数据不会受影响,点击核算将会按当前列表最新数据重新核算。`,
+ onOk: () => {
+ API.specialAddDeductionDeleteAllData(payload).then(({ status, errormsg }) => {
+ if (status) {
+ message.success("删除成功");
+ this.specialAddDeductionList();
+ } else {
+ message.error(errormsg || "删除失败");
+ }
+ });
+ }
+ });
+ };
+ specialAddDeductionPreview = (payload) => {
+ const { importParams } = this.state;
+ API.specialAddDeductionPreview(payload).then(({ status, data }) => {
+ if (status) {
+ const { preview: slideDataSource } = data;
+ this.setState({
+ importParams: {
+ ...importParams,
+ slideDataSource
+ }
+ });
+ }
+ });
+ };
+ specialAddDeductionImportData = (payload) => {
+ const { importParams } = this.state;
+ API.specialAddDeductionImportData(payload).then(({ status, data: importResult }) => {
+ if (status) {
+ this.setState({
+ importParams: {
+ ...importParams,
+ step: 2,
+ importResult
+ }
+ });
+ }
+ });
+ };
+ specialAddDeductionExport = () => {
+ const url = `${window.location.origin}/api/bs/hrmsalary/specialAddDeduction/export?ids=&taxAgentId=${this.inlineForm.getFieldsValue().taxAgentId}`;
+ window.open(url, "_self");
+ };
+ specialAddDeductionExportSelect = () => {
+ const { selectedRowKeys } = this.state;
+ if (selectedRowKeys.length === 0) {
+ message.warning("未选择条目");
+ return;
+ }
+ const url = `${window.location.origin}/api/bs/hrmsalary/specialAddDeduction/export?ids=${selectedRowKeys.join(",")}&taxAgentId=${this.inlineForm.getFieldsValue().taxAgentId}`;
+ window.open(url, "_self");
+ };
+ handleExportAllSpecialDetail = () => {
+ const url = `${window.location.origin}/api/bs/hrmsalary/specialAddDeduction/export`;
+ window.open(url, "_self");
+ };
+ handleExportSelectSpecialDetail = () => {
+ const { state: { selectedRowKeys } } = this.specialContentRef;
+ if (selectedRowKeys.length === 0) {
+ message.warning("未选择条目");
+ return;
+ }
+ const url = `${window.location.origin}/api/bs/hrmsalary/specialAddDeduction/export?ids=${selectedRowKeys.join(",")}`;
+ window.open(url, "_self");
+ };
+ getSearchsAdQuick = (isAd) => {
+ const { advanceParams } = this.state;
+ const { taxAgentStore: { taxAgentAdminOption }, specialAddStore: { advanceForm } } = this.props;
+ return isAd ? getSearchs(advanceForm, advanceParams.condition, 2)
+ : this.inlineForm = dom}
+ taxAgentOption={taxAgentAdminOption}
+ onChange={(taxAgentId)=>this.specialAddDeductionList({taxAgentId})}
+ />;
+ };
+ renderImportormComponent = () => {
+ const { importParams } = this.state;
+ const { taxAgentStore: { taxAgentAdminOption } } = this.props;
+ return (
+
+
+
+ 个税扣缴义务人
+
+ {
+ this.setState({ importParams: { ...importParams, payload: { taxAgentId: v } } });
+ }}
+ />
+
+
+ );
+ };
+
+ render() {
+ const {
+ advanceParams,
+ dataSource,
+ columns,
+ loading,
+ selectedRowKeys,
+ pageInfo,
+ drawerParams,
+ importParams
+ } = this.state;
+ const { userid } = WeaTools.ls.getJSONObj("theme-account") || {};
+ const { taxAgentStore, specialAddStore: { advanceForm, addForm } } = this.props;
+ const { showOperateBtn, taxAgentAdminOption } = taxAgentStore;
+ const rowSelection = {
+ selectedRowKeys,
+ onChange: (selectedRowKeys) => this.setState({ selectedRowKeys })
+ };
+ const customBtns = [
+
+ 导出选中
+
+ }
+ type="primary"
+ >
+ 导出全部
+
+ ];
+ const btns = [
+ ,
+
+ 导出选中
+
+ }
+ type="ghost"
+ >
+ 导出全部
+ ,
+ ,
+
+ 删除所选
+
+ }
+ type="ghost"
+ >
+ 一键清空
+
+ ];
+ const pagination = {
+ ...pageInfo,
+ showTotal: (total) => `共 ${total} 条`,
+ pageSizeOptions: ["10", "20", "50", "100"],
+ showSizeChanger: true,
+ showQuickJumper: true,
+ onShowSizeChange: (current, pageSize) => {
+ this.setState({
+ pageInfo: { ...pageInfo, current, pageSize }
+ }, () => {
+ this.specialAddDeductionList({
+ current,
+ pageSize
+ });
+ });
+ },
+ onChange: (current) => {
+ this.setState({
+ pageInfo: { ...pageInfo, current }
+ }, () => {
+ this.specialAddDeductionList({
+ current
+ });
+ });
+ }
+ };
+ //加载数据
+ if (_.isEmpty(columns)) {
+ // 无权限处理
+ return renderLoading();
+ }
+ return (
+
+
}
+ iconBgcolor="#F14A2D"
+ buttons={showOperateBtn ? btns : []}
+ >
+
+
advanceForm.updateFields({ username: v })}
+ onAdReset={() => advanceForm.reset()}
+ onAdSearch={() => this.specialAddDeductionList()}
+ onSearch={() => this.specialAddDeductionList()}
+ searchsAdQuick={this.getSearchsAdQuick()}
+ searchsAd={this.getSearchsAdQuick(true)}
+ setShowSearchAd={bool => this.setState({ advanceParams: { ...advanceParams, visible: bool } })}
+ />
+
+ {
+ const { baseInfo } = this.addItemRef.state;
+ const bool = _.every(_.pick(baseInfo, ["taxAgentId", "employeeId"]), v => !_.isEmpty(v));
+ if (!bool && _.isEmpty(drawerParams.editId)) {
+ Modal.warning({
+ title: "信息确认",
+ content: "必要信息不完整,红色*为必填项!"
+ });
+ return;
+ }
+ const payload = {
+ ..._.pick(baseInfo, ["taxAgentId", "employeeId", "taxAgentName"]),
+ ...addForm.getFormParams()
+ };
+ this.handleSaveSpecialList(payload);
+ }}
+ editable={(showOperateBtn && !drawerParams.isView)}
+ showOperateBtn={showOperateBtn}
+ customOperate={(showOperateBtn && drawerParams.isView) ? customBtns : (!showOperateBtn && userid == drawerParams.editId.employeeId) ? [
+
+ ] : []}
+ />
+ }
+ content={
+ !drawerParams.isView ?
+ this.addItemRef = dom}
+ taxAgentOption={taxAgentAdminOption}
+ form={addForm}
+ isSpecial
+ editId={drawerParams.editId}
+ condition={condition}
+ /> :
+ this.specialContentRef = dom} specialId={drawerParams.editId.id}/>
+ }
+ onClose={() => this.setState({
+ drawerParams: {
+ ...drawerParams,
+ visible: false,
+ isView: true,
+ editId: {}
+ }
+ })}
+ showMask={true}
+ closeMaskOnClick={() => this.setState({
+ drawerParams: {
+ ...drawerParams,
+ visible: false,
+ isView: true,
+ editId: {}
+ }
+ })}
+ />
+ {/*人员卡片*/}
+
+ {/* 导入模板*/}
+ {
+ importParams.visible &&
+ this.setState({ importParams: { ...importParams, step } })}
+ slideDataSource={importParams.slideDataSource}
+ importResult={importParams.importResult}
+ onFinish={() => {
+ this.setState({ importParams: { ...importParams, step: 0, visible: false } }, () => {
+ this.specialAddDeductionList();
+ localStorage.removeItem("fileList");
+ });
+ }}
+ previewImport={this.specialAddDeductionPreview}
+ importFile={this.specialAddDeductionImportData}
+ templateLink="/api/bs/hrmsalary/specialAddDeduction/downloadTemplate"
+ renderFormComponent={this.renderImportormComponent}
+ visiable={importParams.visible}
+ onCancel={() => {
+ localStorage.removeItem("fileList");
+ this.setState({
+ importParams: {
+ ...importParams,
+ step: 0, visible: false,
+ slideDataSource: [], importResult: [],
+ payload: { taxAgentId: "" }
+ }
+ });
+ }}
+ />
+ }
+
+
+
+ );
+ }
+}
+
+export default SpecialAddDeduction;
+
diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/specialAddDeduction/index.less b/pc4mobx/hrmSalary/pages/dataAcquisition/specialAddDeduction/index.less
new file mode 100644
index 00000000..d816b67e
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/dataAcquisition/specialAddDeduction/index.less
@@ -0,0 +1,92 @@
+.specialAddWrapper {
+ height: 100%;
+
+ .wea-new-top-wapper {
+ .specialAddContent {
+ height: 100%;
+ display: flex;
+ flex-direction: column;
+
+ .wea-tab-search-ad-quick {
+ .wea-tab-left {
+ display: flex;
+ align-items: center;
+ }
+
+ .wea-tab-right {
+ margin-top: 0;
+ }
+
+ .wea-search-container-search-ad-quick {
+ top: 47px !important;
+ }
+ }
+ }
+ }
+
+ .linkWapper {
+ a {
+ color: #4d7ad8;
+ margin-right: 8px;
+ }
+
+ i {
+ cursor: pointer;
+ }
+
+ a:hover {
+ text-decoration: none;
+ }
+ }
+}
+
+.moreIconWrapper {
+ .ant-popover-inner {
+ min-width: 106px
+ }
+
+ .ant-popover-inner-content {
+ padding: 0;
+
+ .ant-menu {
+ .ant-menu-item {
+ border-right: none;
+ height: 30px;
+ line-height: 30px;
+ text-align: center;
+ padding: 0;
+ }
+ }
+ }
+}
+
+.specialAddSlideWrapper {
+ .wea-slide-modal-title {
+ height: initial;
+ line-height: initial;
+ text-align: left;
+ }
+
+ .rodal-close {
+ z-index: 99;
+ top: 10px !important;
+ }
+
+}
+
+@media (min-width: 1260px) {
+ .specialAddSlideWrapper {
+ .reqTopWrapper .wea-new-top-req-title > div:first-child > div {
+ max-width: 100% !important;
+ }
+ }
+}
+
+@media screen and (min-width: 1060px) and (max-width: 1260px) {
+ .specialAddSlideWrapper {
+ .reqTopWrapper .wea-new-top-req-title > div:first-child > div {
+ max-width: calc(100% - 96px) !important;
+ }
+ }
+}
+
diff --git a/pc4mobx/hrmSalary/stores/index.js b/pc4mobx/hrmSalary/stores/index.js
index e07529c7..6b7af8e1 100644
--- a/pc4mobx/hrmSalary/stores/index.js
+++ b/pc4mobx/hrmSalary/stores/index.js
@@ -16,7 +16,8 @@ import { payrollStore } from "./payroll";
import { calculateStore } from "./calculate";
import { DeclareStore } from "./declare";
import { StandingBookStore } from "./StandingBook";
-import {PayrollFilesStore} from './payrollFiles';
+import { PayrollFilesStore } from "./payrollFiles";
+import { SpecialAddStore } from "./specialAdd";
module.exports = {
baseFormStore: new BaseFormStore(),
@@ -38,4 +39,5 @@ module.exports = {
declareStore: new DeclareStore(),
standingBookStore: new StandingBookStore(),
payrollFilesStore: new PayrollFilesStore(),
+ specialAddStore: new SpecialAddStore()
};
diff --git a/pc4mobx/hrmSalary/stores/specialAdd.js b/pc4mobx/hrmSalary/stores/specialAdd.js
new file mode 100644
index 00000000..6167156d
--- /dev/null
+++ b/pc4mobx/hrmSalary/stores/specialAdd.js
@@ -0,0 +1,7 @@
+import { observable, action, toJS } from 'mobx';
+import { WeaForm } from 'comsMobx';
+
+export class SpecialAddStore {
+ @observable advanceForm = new WeaForm();
+ @observable addForm = new WeaForm();
+}
diff --git a/pc4mobx/hrmSalary/util/options.js b/pc4mobx/hrmSalary/util/options.js
index 670d5dee..13ef81e4 100644
--- a/pc4mobx/hrmSalary/util/options.js
+++ b/pc4mobx/hrmSalary/util/options.js
@@ -7,4 +7,13 @@ export const optionAddAll = (options) => {
selected: false
})
return results;
-}
\ No newline at end of file
+}
+export const optionAddWhole = (options) => {
+ let results = [...options];
+ results.unshift({
+ key: "",
+ showname: "全部",
+ selected: false
+ })
+ return results;
+}