Merge branch 'feature/2.8.3.2308.01-社保福利方案自定义方案添加删除功能' into develop
This commit is contained in:
commit
d1594e5620
|
|
@ -1,107 +1,108 @@
|
|||
import { WeaTools } from 'ecCom';
|
||||
import { WeaTools } from "ecCom";
|
||||
import { postFetch } from "../util/request";
|
||||
|
||||
export const getForm = params => {
|
||||
return WeaTools.callApi('/api/bs/hrmsalary/scheme/getForm', 'get', params);
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/scheme/getForm", "get", params);
|
||||
};
|
||||
export const getTable = params => {
|
||||
// return WeaTools.callApi('/api/bs/hrmsalary/scheme/getTable', 'get', params);
|
||||
return fetch('/api/bs/hrmsalary/scheme/getTable', {
|
||||
method: 'POST',
|
||||
mode: 'cors',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify(params)
|
||||
}).then(res => res.json())
|
||||
// return WeaTools.callApi('/api/bs/hrmsalary/scheme/getTable', 'get', params);
|
||||
return fetch("/api/bs/hrmsalary/scheme/getTable", {
|
||||
method: "POST",
|
||||
mode: "cors",
|
||||
headers: {
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
body: JSON.stringify(params)
|
||||
}).then(res => res.json());
|
||||
};
|
||||
export const createScheme = params => {
|
||||
return fetch('/api/bs/hrmsalary/scheme/insert', {
|
||||
method: 'POST',
|
||||
mode: 'cors',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify(params)
|
||||
}).then(res => res.json())
|
||||
return fetch("/api/bs/hrmsalary/scheme/insert", {
|
||||
method: "POST",
|
||||
mode: "cors",
|
||||
headers: {
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
body: JSON.stringify(params)
|
||||
}).then(res => res.json());
|
||||
};
|
||||
export const updateScheme = params => {
|
||||
return fetch('/api/bs/hrmsalary/scheme/update', {
|
||||
method: 'POST',
|
||||
mode: 'cors',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify(params)
|
||||
}).then(res => res.json())
|
||||
return fetch("/api/bs/hrmsalary/scheme/update", {
|
||||
method: "POST",
|
||||
mode: "cors",
|
||||
headers: {
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
body: JSON.stringify(params)
|
||||
}).then(res => res.json());
|
||||
};
|
||||
export const getCopyForm = params => {
|
||||
return WeaTools.callApi('/api/bs/hrmsalary/scheme/copyForm', 'get', params);
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/scheme/copyForm", "get", params);
|
||||
};
|
||||
export const copyScheme = params => {
|
||||
return fetch(`/api/bs/hrmsalary/scheme/copyScheme?id=${params.id}&schemeName=${params.schemeName}`, {
|
||||
method: 'GET',
|
||||
mode: 'cors',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
}).then(res => res.json())
|
||||
return fetch(`/api/bs/hrmsalary/scheme/copyScheme?id=${params.id}&schemeName=${params.schemeName}`, {
|
||||
method: "GET",
|
||||
mode: "cors",
|
||||
headers: {
|
||||
"Content-Type": "application/json"
|
||||
}
|
||||
}).then(res => res.json());
|
||||
};
|
||||
export const deleteScheme = params => {
|
||||
return fetch('/api/bs/hrmsalary/scheme/delete', {
|
||||
method: 'POST',
|
||||
mode: 'cors',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify(params)
|
||||
}).then(res => res.json())
|
||||
return fetch("/api/bs/hrmsalary/scheme/delete", {
|
||||
method: "POST",
|
||||
mode: "cors",
|
||||
headers: {
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
body: JSON.stringify(params)
|
||||
}).then(res => res.json());
|
||||
};
|
||||
|
||||
|
||||
export const getCustomCategoryForm = params => {
|
||||
return WeaTools.callApi('/api/bs/hrmsalary/sicategory/customCategoryForm', 'get', params);
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/sicategory/customCategoryForm", "get", params);
|
||||
};
|
||||
export const getCustomCategoryList = params => {
|
||||
// return WeaTools.callApi('/api/bs/hrmsalary/sicategory/customCategoryList', 'get', params);
|
||||
return fetch('/api/bs/hrmsalary/sicategory/customCategoryList', {
|
||||
method: 'POST',
|
||||
mode: 'cors',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify(params)
|
||||
}).then(res => res.json())
|
||||
// return WeaTools.callApi('/api/bs/hrmsalary/sicategory/customCategoryList', 'get', params);
|
||||
return fetch("/api/bs/hrmsalary/sicategory/customCategoryList", {
|
||||
method: "POST",
|
||||
mode: "cors",
|
||||
headers: {
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
body: JSON.stringify(params)
|
||||
}).then(res => res.json());
|
||||
};
|
||||
export const createSICategory = params => {
|
||||
return fetch('/api/bs/hrmsalary/sicategory/createSICategory', {
|
||||
method: 'POST',
|
||||
mode: 'cors',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify(params)
|
||||
}).then(res => res.json())
|
||||
return fetch("/api/bs/hrmsalary/sicategory/createSICategory", {
|
||||
method: "POST",
|
||||
mode: "cors",
|
||||
headers: {
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
body: JSON.stringify(params)
|
||||
}).then(res => res.json());
|
||||
};
|
||||
export const updateCustomCategory = params => {
|
||||
return fetch('/api/bs/hrmsalary/sicategory/updateCustomCategoryName', {
|
||||
method: 'POST',
|
||||
mode: 'cors',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify(params)
|
||||
}).then(res => res.json())
|
||||
return fetch("/api/bs/hrmsalary/sicategory/updateCustomCategoryName", {
|
||||
method: "POST",
|
||||
mode: "cors",
|
||||
headers: {
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
body: JSON.stringify(params)
|
||||
}).then(res => res.json());
|
||||
};
|
||||
export const deleteCustomCategory = params => {
|
||||
return WeaTools.callApi('/api/bs/hrmsalary/sicategory/deleteCustomCategory', 'post', params);
|
||||
export const deleteCustomCategory = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/sicategory/deleteCustomCategory", params);
|
||||
};
|
||||
export const updateCustomCategoryStatus = params => {
|
||||
return fetch('/api/bs/hrmsalary/sicategory/updateCustomCategoryStatus', {
|
||||
method: 'POST',
|
||||
mode: 'cors',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify(params)
|
||||
}).then(res => res.json())
|
||||
return fetch("/api/bs/hrmsalary/sicategory/updateCustomCategoryStatus", {
|
||||
method: "POST",
|
||||
mode: "cors",
|
||||
headers: {
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
body: JSON.stringify(params)
|
||||
}).then(res => res.json());
|
||||
};
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ export default class CustomForm extends React.Component {
|
|||
item.options &&
|
||||
<WeaSelect
|
||||
detailtype={2}
|
||||
disabled={disabledValue}
|
||||
// disabled={disabledValue}
|
||||
viewAttr={item.rules === "required" ? 3 : 2}
|
||||
value={request[item.domkey[0]]}
|
||||
options={item.options.map(o => ({ showname: o.showname, key: o.key }))}
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ class CustomExportDialog extends Component {
|
|||
const { itemsCheckeds } = this.state;
|
||||
customCacheExportField({ salaryItems: _.map(itemsCheckeds, it => it.toString()) }).then(({ status, errorMsg }) => {
|
||||
if (status) {
|
||||
const { consolidatedTaxation, ...extra } = searchItemsValue;
|
||||
const { consolidatedTaxation = "0", ...extra } = searchItemsValue;
|
||||
const payload = { ...extra, consolidatedTaxation: consolidatedTaxation === "0" ? "" : consolidatedTaxation };
|
||||
window.open(
|
||||
`/api/bs/hrmsalary/salaryacct/acctresult/exportWithCustomFields?salaryAcctRecordId=${getQueryString("id")}&ids=&${convertToUrlString(payload)}&salaryItemIds=${itemsCheckeds.join(",")}`
|
||||
|
|
|
|||
|
|
@ -2,13 +2,16 @@ import React from "react";
|
|||
import { toJS } from "mobx";
|
||||
import CustomTab from "../../components/customTab";
|
||||
import { Dropdown, Menu, message } from "antd";
|
||||
import { WeaHelpfulTip, WeaInputSearch, WeaSlideModal } from "ecCom";
|
||||
import { WeaHelpfulTip, WeaInputSearch, WeaLocaleProvider, WeaSlideModal } from "ecCom";
|
||||
import SlideModalTitle from "../../components/slideModalTitle";
|
||||
import FileMergeDetail from "./fileMergeDetail";
|
||||
import { getQueryString } from "../../util/url";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { getExportField } from "../../apis/calculate";
|
||||
import "./index.less";
|
||||
import CustomExportDialog from "./customExportDialog";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
@inject("calculateStore")
|
||||
@observer
|
||||
export default class PlaceOnFileDetail extends React.Component {
|
||||
|
|
@ -18,7 +21,10 @@ export default class PlaceOnFileDetail extends React.Component {
|
|||
slideVisiable: false,
|
||||
selectedRowKeys: [],
|
||||
searchValue: "",
|
||||
columnIndex: ""
|
||||
columnIndex: "",
|
||||
customExportParams: {
|
||||
visible: false, checkItems: [], itemsByGroup: []
|
||||
}
|
||||
};
|
||||
this.id = "";
|
||||
}
|
||||
|
|
@ -95,15 +101,33 @@ export default class PlaceOnFileDetail extends React.Component {
|
|||
childFrameObj.contentWindow.postMessage(JSON.stringify(payload), "*");
|
||||
};
|
||||
|
||||
handleMenuClick() {
|
||||
const { calculateStore: { exportAll } } = this.props;
|
||||
const { selectedRowKeys } = this.state;
|
||||
if (selectedRowKeys.length === 0) {
|
||||
message.warning("未选择条目");
|
||||
return;
|
||||
handleMenuClick = ({ key }) => {
|
||||
if (key === "3") {
|
||||
const { calculateStore: { exportAll } } = this.props;
|
||||
const { selectedRowKeys } = this.state;
|
||||
if (selectedRowKeys.length === 0) {
|
||||
message.warning("未选择条目");
|
||||
return;
|
||||
}
|
||||
exportAll(this.id, selectedRowKeys.join(","));
|
||||
} else if (key === "4") {
|
||||
this.getExportField();
|
||||
}
|
||||
exportAll(this.id, selectedRowKeys.join(","));
|
||||
}
|
||||
};
|
||||
|
||||
getExportField = () => {
|
||||
getExportField({ salaryAcctRecordId: getQueryString("id") }).then(({ status, data }) => {
|
||||
if (status) {
|
||||
const { checkItems, itemsByGroup } = data;
|
||||
this.setState({
|
||||
customExportParams: {
|
||||
visible: true,
|
||||
checkItems, itemsByGroup
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
handleExportAll = () => {
|
||||
const { calculateStore: { exportAll } } = this.props;
|
||||
|
|
@ -113,11 +137,12 @@ export default class PlaceOnFileDetail extends React.Component {
|
|||
render() {
|
||||
const { calculateStore } = this.props;
|
||||
const { baseSalarySobCycle, columnDescList } = calculateStore;
|
||||
const { slideVisiable, columnIndex } = this.state;
|
||||
const { slideVisiable, columnIndex, customExportParams } = this.state;
|
||||
|
||||
const menu = (
|
||||
<Menu onClick={(e) => this.handleMenuClick(e)}>
|
||||
<Menu.Item key="3">导出所选</Menu.Item>
|
||||
<Menu.Item key="4">{getLabel(111, "自定义导出")}</Menu.Item>
|
||||
</Menu>
|
||||
);
|
||||
|
||||
|
|
@ -171,6 +196,17 @@ export default class PlaceOnFileDetail extends React.Component {
|
|||
id="atdTable"
|
||||
/>
|
||||
</div>
|
||||
<CustomExportDialog
|
||||
{...customExportParams}
|
||||
searchItemsValue={{ employeeName: this.state.searchValue }}
|
||||
onCancel={() => {
|
||||
this.setState({
|
||||
customExportParams: {
|
||||
visible: false, checkItems: [], itemsByGroup: []
|
||||
}
|
||||
});
|
||||
}}
|
||||
/>
|
||||
{
|
||||
slideVisiable &&
|
||||
<WeaSlideModal
|
||||
|
|
|
|||
|
|
@ -100,7 +100,10 @@ class Index extends Component {
|
|||
|
||||
render() {
|
||||
const { showSearchAd, externalPersonManagePayload, loading, pageInfo, selectedRowKeys, dataSource } = this.state;
|
||||
const { externalPersonManageStore: { form, addForm }, taxAgentStore: { showOperateBtn } } = this.props;
|
||||
const {
|
||||
externalPersonManageStore: { form, addForm },
|
||||
taxAgentStore: { showOperateBtn, showSalaryItemBtn }
|
||||
} = this.props;
|
||||
const pagination = {
|
||||
current: pageInfo.current,
|
||||
pageSize: pageInfo.pageSize,
|
||||
|
|
@ -128,7 +131,7 @@ class Index extends Component {
|
|||
>
|
||||
<div className="externalPerCont">
|
||||
<WeaTab
|
||||
buttons={showOperateBtn ? [
|
||||
buttons={(showOperateBtn || showSalaryItemBtn) ? [
|
||||
<Button type="primary" onClick={() => this.handleAdd()}>新建</Button>
|
||||
] : []}
|
||||
searchType={["base", "advanced"]} showSearchAd={showSearchAd}
|
||||
|
|
@ -143,7 +146,7 @@ class Index extends Component {
|
|||
<WeaTable
|
||||
rowKey="id"
|
||||
loading={loading}
|
||||
columns={showOperateBtn ? [
|
||||
columns={(showOperateBtn || showSalaryItemBtn) ? [
|
||||
...this.getColumns(),
|
||||
{
|
||||
dataIndex: "operate",
|
||||
|
|
@ -164,7 +167,7 @@ class Index extends Component {
|
|||
xWidth={800}
|
||||
/>
|
||||
<ExternalPersonManageEditSlide
|
||||
showOperateBtn={showOperateBtn} form={addForm} condition={condition}
|
||||
showOperateBtn={showOperateBtn || showSalaryItemBtn} form={addForm} condition={condition}
|
||||
onCancel={this.handleCancel} {...externalPersonManagePayload}
|
||||
/>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -274,7 +274,7 @@ class LedgerAssociatedPersonnel extends Component {
|
|||
return (
|
||||
<div>
|
||||
<WeaTab
|
||||
datas={extEmpsWitch === "0" ? _.dropRight(topTab) : topTab}
|
||||
datas={(extEmpsWitch === "0" || !extEmpsWitch) ? _.dropRight(topTab) : topTab}
|
||||
keyParam="viewcondition" //主键
|
||||
selectedKey={selectedKey}
|
||||
buttons={showOperateBtn && selectedKey === "listInclude" ? btns : btns.slice(1)}
|
||||
|
|
|
|||
|
|
@ -134,6 +134,7 @@ export default class MobilePayroll extends React.Component {
|
|||
const { mySalaryBillData } = this.state;
|
||||
const { salaryTemplate } = mySalaryBillData;
|
||||
const { feedbackUrl } = salaryTemplate;
|
||||
this.getMySalaryBill(getQueryString("id"));
|
||||
window.open(`${window.ecologyContentPath || ""}${feedbackUrl}`);
|
||||
} else {
|
||||
message.error(errorMsg);
|
||||
|
|
@ -168,9 +169,10 @@ export default class MobilePayroll extends React.Component {
|
|||
</WeaError>
|
||||
{
|
||||
notSetting &&
|
||||
<div style={{ clear: "both", paddingTop: 10 }} >
|
||||
<div style={{ clear: "both", paddingTop: 10 }}>
|
||||
{getLabel("514970", "您还未设置二次验证密码,点击")}
|
||||
<a href="javascript:void(0);" onClick={() => this.setState({ pwdSetVisible: true })}>{getLabel("30747", "设置")}</a>
|
||||
<a href="javascript:void(0);"
|
||||
onClick={() => this.setState({ pwdSetVisible: true })}>{getLabel("30747", "设置")}</a>
|
||||
</div>
|
||||
}
|
||||
</WeaDialog>
|
||||
|
|
|
|||
|
|
@ -59,13 +59,17 @@ class MySalaryView extends Component {
|
|||
title: getLabel(131329, "信息确认"),
|
||||
content: getLabel(111, "请确认薪资信息是有误,进行反馈并发起反馈流程。"),
|
||||
onOk: () => {
|
||||
const { params: { salaryInfoId } } = this.props;
|
||||
const { params: { salaryInfoId }, mySalaryStore: { getMySalaryBill } } = this.props;
|
||||
feedBackSalaryBill({ salaryInfoId }).then(({ status, errorMsg }) => {
|
||||
if (status) {
|
||||
const { mySalaryStore } = this.state;
|
||||
const { salaryTemplate } = mySalaryStore;
|
||||
const { feedbackUrl } = salaryTemplate;
|
||||
window.open(`${window.ecologyContentPath || ""}${feedbackUrl}`);
|
||||
getMySalaryBill(Number(salaryInfoId)).then(data => {
|
||||
this.setState({ mySalaryStore: data }, () => {
|
||||
window.open(`${window.ecologyContentPath || ""}${feedbackUrl}`);
|
||||
});
|
||||
});
|
||||
} else {
|
||||
message.error(errorMsg);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -219,6 +219,8 @@ class SalaryItemSettings extends Component {
|
|||
}
|
||||
};
|
||||
handleEditSalaryItemName = (item, field, viewAttr) => {
|
||||
//暂时关闭
|
||||
return
|
||||
const { groupId } = item, { salaryItemId } = field, { dataList } = this.state;
|
||||
if (groupId === "111111111111111111") return;
|
||||
this.setState({
|
||||
|
|
|
|||
|
|
@ -778,7 +778,7 @@ class Index extends Component {
|
|||
dropMenuDatas={rightMenu}
|
||||
>
|
||||
<WeaTab
|
||||
datas={extEmpsWitch === "0" ? _.dropRight(tabCondition) : tabCondition}
|
||||
datas={(extEmpsWitch === "0" || !extEmpsWitch) ? _.dropRight(tabCondition) : tabCondition}
|
||||
counts={tabCount}
|
||||
className="payrollFilesTab"
|
||||
keyParam="viewcondition" //主键
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ export default class Index extends Component {
|
|||
ascOrDesc: "",
|
||||
rule: "",
|
||||
enctry: "",
|
||||
operateTaxDeclaration: "",
|
||||
operateTaxDeclaration: "1",
|
||||
matchRule: "",
|
||||
confValue: "0",
|
||||
withDrawTaxDeclaration: "0",
|
||||
|
|
@ -54,7 +54,7 @@ export default class Index extends Component {
|
|||
const {
|
||||
data: {
|
||||
ascOrDesc = "", orderRule = "", showEncryptOperationButton, matchEmployeeMode: rule = "",
|
||||
taxDeclarationFunction: operateTaxDeclaration = "0", salaryArchiveDelete: confValue,
|
||||
taxDeclarationFunction: operateTaxDeclaration = "1", salaryArchiveDelete: confValue,
|
||||
salaryAcctEmployeeRule: matchRule, WITHDRAW_TAX_DECLARATION: withDrawTaxDeclaration = "0",
|
||||
OPEN_APPLICATION_ENCRYPT: enctry = "0", extEmpsWitch = "0"
|
||||
}
|
||||
|
|
@ -379,8 +379,8 @@ export default class Index extends Component {
|
|||
onChange={val => this.handleChange("confValue", val)}/>
|
||||
</WeaFormItem>
|
||||
</WeaSearchGroup>
|
||||
<WeaSearchGroup title={getLabel(538011, "薪资核算")} showGroup center>
|
||||
<WeaFormItem label={getLabel(111, "核算人员匹配规则")} labelCol={{ span: 6 }} wrapperCol={{ span: 18 }}>
|
||||
<WeaSearchGroup title={getLabel(111, "薪资核算人员匹配规则")} showGroup center>
|
||||
<WeaFormItem label={getLabel(111, "匹配规则")} labelCol={{ span: 6 }} wrapperCol={{ span: 18 }}>
|
||||
<WeaSelect options={matchRuleOptions} value={matchRule}
|
||||
onChange={val => this.handleChange("matchRule", val)}
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -251,7 +251,7 @@ export default class Archives extends React.Component {
|
|||
});
|
||||
return;
|
||||
}
|
||||
save("SOCIAL_SECURITY").then(() => {
|
||||
save("SOCIAL_SECURITY", this.record.paymentOrganization).then(() => {
|
||||
this.query();
|
||||
});
|
||||
} else if (selectedTab == 2) {
|
||||
|
|
@ -264,7 +264,7 @@ export default class Archives extends React.Component {
|
|||
});
|
||||
return;
|
||||
}
|
||||
save("ACCUMULATION_FUND").then(() => {
|
||||
save("ACCUMULATION_FUND", this.record.paymentOrganization).then(() => {
|
||||
this.query();
|
||||
});
|
||||
} else if (selectedTab == 3) {
|
||||
|
|
@ -277,7 +277,7 @@ export default class Archives extends React.Component {
|
|||
});
|
||||
return;
|
||||
}
|
||||
save("OTHER").then(() => {
|
||||
save("OTHER", this.record.paymentOrganization).then(() => {
|
||||
this.query();
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,9 +5,11 @@
|
|||
* Date: 2023/3/2
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaCheckbox, WeaTable } from "ecCom";
|
||||
import { WeaCheckbox, WeaLocaleProvider, WeaTable } from "ecCom";
|
||||
import { message, Modal } from "antd";
|
||||
import { getCustomCategoryList, updateCustomCategoryStatus } from "../../../apis/welfareScheme";
|
||||
import { deleteCustomCategory, getCustomCategoryList, updateCustomCategoryStatus } from "../../../apis/welfareScheme";
|
||||
|
||||
const { getLabel } = WeaLocaleProvider;
|
||||
|
||||
class CustomBenefitsTable extends Component {
|
||||
constructor(props) {
|
||||
|
|
@ -77,7 +79,11 @@ class CustomBenefitsTable extends Component {
|
|||
return (
|
||||
<div className="linkWapper">
|
||||
{showOperateBtn &&
|
||||
<a href="javascript: void(0);" onClick={() => onCustomEdit(record)}>编辑</a>
|
||||
<React.Fragment>
|
||||
<a href="javascript: void(0);" onClick={() => onCustomEdit(record)} style={{ marginRight: 10 }}>编辑</a>
|
||||
<a href="javascript: void(0);"
|
||||
onClick={() => this.deleteCustomCategory(record.id)}>{getLabel(535052, "删除")}</a>
|
||||
</React.Fragment>
|
||||
}
|
||||
</div>
|
||||
);
|
||||
|
|
@ -98,6 +104,38 @@ class CustomBenefitsTable extends Component {
|
|||
message.error(errormsg || "操作失败");
|
||||
}
|
||||
});
|
||||
},
|
||||
onCancel: () => {
|
||||
this.setState({
|
||||
dataSource: _.map(this.state.dataSource, item => {
|
||||
if (item.id === id) {
|
||||
return {
|
||||
...item, isUse: item.isUse
|
||||
};
|
||||
}
|
||||
return { ...item };
|
||||
})
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
deleteCustomCategory = (id) => {
|
||||
Modal.confirm({
|
||||
title: getLabel(131329, "信息确认"),
|
||||
content: getLabel(543231, "确认删除本条数据吗?"),
|
||||
onOk: () => {
|
||||
message.destroy();
|
||||
message.loading("正在删除中...", 0);
|
||||
const payload = { id };
|
||||
deleteCustomCategory(payload).then(({ status, errormsg }) => {
|
||||
message.destroy();
|
||||
if (status) {
|
||||
message.success(getLabel(502230, "删除成功"));
|
||||
this.getCustomCategoryList();
|
||||
} else {
|
||||
message.error(errormsg || getLabel(30651, "操作失败"));
|
||||
}
|
||||
}).catch(() => message.destroy());
|
||||
}
|
||||
});
|
||||
};
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ export default class SlideTaxagentUser extends React.Component {
|
|||
extEmpsWitch: "1" //非系统人员开关, 1: 开启, 0:关闭
|
||||
};
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
this.getSysinfo();
|
||||
}
|
||||
|
|
@ -199,10 +200,10 @@ export default class SlideTaxagentUser extends React.Component {
|
|||
<div className="slideRefereUser">
|
||||
<WeaTab
|
||||
datas={
|
||||
extEmpsWitch === "0" ?
|
||||
(extEmpsWitch === "0" || !extEmpsWitch) ?
|
||||
[
|
||||
{ title: "人员范围", viewcondition: "1" },
|
||||
{ title: "从范围中排除", viewcondition: "0" },
|
||||
{ title: "从范围中排除", viewcondition: "0" }
|
||||
] :
|
||||
[
|
||||
{ title: "人员范围", viewcondition: "1" },
|
||||
|
|
|
|||
|
|
@ -244,11 +244,11 @@ export class ArchivesStore {
|
|||
|
||||
// 保存表单
|
||||
@action
|
||||
save = (welfareType) => {
|
||||
save = (welfareType, paymentOrganization) => {
|
||||
let baseForm = "";
|
||||
let paymentForm = "";
|
||||
if (welfareType === "SOCIAL_SECURITY") {
|
||||
baseForm = JSON.stringify(this.socialSecurityForm.data);
|
||||
baseForm = JSON.stringify({ ...this.socialSecurityForm.data, paymentOrganization });
|
||||
if (this.socialSecurityForm.data.socialSchemeId) {
|
||||
const socialSecurityPaymentData = toJS(this.socialSecurityPaymentForm).data;
|
||||
const socialSecurityPaymentItems = toJS(this.socialSecurityPaymentForm).items[0].items;
|
||||
|
|
@ -259,7 +259,7 @@ export class ArchivesStore {
|
|||
paymentForm = JSON.stringify(payload);
|
||||
}
|
||||
} else if (welfareType === "ACCUMULATION_FUND") {
|
||||
baseForm = JSON.stringify(this.accumulationFundForm.data);
|
||||
baseForm = JSON.stringify({ ...this.accumulationFundForm.data, paymentOrganization });
|
||||
if (this.accumulationFundForm.data.fundSchemeId) {
|
||||
const accumulationFundPaymentData = toJS(this.accumulationFundPaymentForm).data;
|
||||
const accumulationFundPaymentItems = toJS(this.accumulationFundPaymentForm).items[0].items;
|
||||
|
|
@ -270,7 +270,7 @@ export class ArchivesStore {
|
|||
paymentForm = JSON.stringify(payload);
|
||||
}
|
||||
} else if (welfareType === "OTHER") {
|
||||
baseForm = JSON.stringify(this.otherForm.data);
|
||||
baseForm = JSON.stringify({ ...this.otherForm.data, paymentOrganization });
|
||||
if (this.otherForm.data.otherSchemeId) {
|
||||
const otherPaymentData = toJS(this.otherPaymentForm).data;
|
||||
const otherPaymentItems = toJS(this.otherPaymentForm).items[0].items;
|
||||
|
|
|
|||
|
|
@ -325,7 +325,10 @@ export class ProgrammeStore {
|
|||
@action
|
||||
updateCustomCategory = (params) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
API.updateCustomCategory(_.pick(params, ["id", "insuranceName"])).then(res => {
|
||||
API.updateCustomCategory({
|
||||
..._.pick(params, ["id", "insuranceName"]),
|
||||
paymentScope: _.pick(params, ["paymentScope"]).paymentScope.split(",")
|
||||
}).then(res => {
|
||||
if (res.status) {
|
||||
message.success("编辑成功");
|
||||
resolve();
|
||||
|
|
|
|||
Loading…
Reference in New Issue