Merge branch 'develop' into feature/V2-dev合并多语言
# Conflicts: # pc4mobx/hrmSalary/pages/calculateDetail/placeOnFileDetail.js # pc4mobx/hrmSalary/pages/externalPersonManage/index.js # pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemNormal.js # pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemTable.js # pc4mobx/hrmSalary/pages/ledgerPage/index.js # pc4mobx/hrmSalary/pages/ruleConfig/index.js # pc4mobx/hrmSalary/pages/salaryItem/salaryItemForm.js # pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/customBenefitsTable.js # pc4mobx/hrmSalary/pages/taxAgent/slideTaxagentUser.js
This commit is contained in:
commit
8b1f16e016
|
|
@ -163,7 +163,14 @@ export const testFormual = params => {
|
|||
|
||||
// 根据id获取formual
|
||||
export const detailFormual = params => {
|
||||
return WeaTools.callApi('/api/bs/hrmsalary/formula/detail', 'GET', params);
|
||||
return fetch('/api/bs/hrmsalary/formula/detail', {
|
||||
method: 'POST',
|
||||
mode: 'cors',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify(params)
|
||||
}).then(res => res.json())
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -342,3 +342,7 @@ export const salarysobRangePreview = params => {
|
|||
export const salarysobRangeImportData = params => {
|
||||
return postFetch("/api/bs/hrmsalary/salarysob/range/importData", params);
|
||||
};
|
||||
//薪资账套-获取薪资账套中薪资项目明细
|
||||
export const getSalaryItemForm = params => {
|
||||
return postFetch("/api/bs/hrmsalary/salarysob/item/getSalaryItemForm", params);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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(",")}`
|
||||
|
|
|
|||
|
|
@ -7,7 +7,9 @@ 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;
|
||||
|
||||
|
|
@ -20,7 +22,10 @@ export default class PlaceOnFileDetail extends React.Component {
|
|||
slideVisiable: false,
|
||||
selectedRowKeys: [],
|
||||
searchValue: "",
|
||||
columnIndex: ""
|
||||
columnIndex: "",
|
||||
customExportParams: {
|
||||
visible: false, checkItems: [], itemsByGroup: []
|
||||
}
|
||||
};
|
||||
this.id = "";
|
||||
}
|
||||
|
|
@ -143,15 +148,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(getLabel(543306, "未选择条目"));
|
||||
return;
|
||||
handleMenuClick = ({ key }) => {
|
||||
if (key === "3") {
|
||||
const { calculateStore: { exportAll } } = this.props;
|
||||
const { selectedRowKeys } = this.state;
|
||||
if (selectedRowKeys.length === 0) {
|
||||
message.warning(getLabel(543306, "未选择条目"));
|
||||
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;
|
||||
|
|
@ -161,11 +184,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">{getLabel(543715, "导出所选")}</Menu.Item>
|
||||
<Menu.Item key="4">{getLabel(544270, "自定义导出")}</Menu.Item>
|
||||
</Menu>
|
||||
);
|
||||
|
||||
|
|
@ -219,6 +243,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
|
||||
|
|
|
|||
|
|
@ -102,7 +102,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,
|
||||
|
|
@ -130,7 +133,7 @@ class Index extends Component {
|
|||
>
|
||||
<div className="externalPerCont">
|
||||
<WeaTab
|
||||
buttons={showOperateBtn ? [
|
||||
buttons={(showOperateBtn || showSalaryItemBtn) ? [
|
||||
<Button type="primary" onClick={() => this.handleAdd()}>{getLabel(365, "新建")}</Button>
|
||||
] : []}
|
||||
searchType={["base", "advanced"]} showSearchAd={showSearchAd}
|
||||
|
|
@ -145,7 +148,7 @@ class Index extends Component {
|
|||
<WeaTable
|
||||
rowKey="id"
|
||||
loading={loading}
|
||||
columns={showOperateBtn ? [
|
||||
columns={(showOperateBtn || showSalaryItemBtn) ? [
|
||||
...this.getColumns(),
|
||||
{
|
||||
dataIndex: "operate",
|
||||
|
|
@ -166,7 +169,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>
|
||||
|
|
|
|||
|
|
@ -168,6 +168,11 @@
|
|||
}
|
||||
|
||||
.categroyListWrapper {
|
||||
.wea-search-group {
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
.titleNormalWrapper {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
|
@ -180,6 +185,11 @@
|
|||
}
|
||||
|
||||
.titleWrapper {
|
||||
span {
|
||||
font-weight: 600;
|
||||
color: #111;
|
||||
}
|
||||
|
||||
i {
|
||||
font-size: 16px;
|
||||
color: #333;
|
||||
|
|
@ -201,6 +211,16 @@
|
|||
align-items: center;
|
||||
width: 100%;
|
||||
|
||||
.topTitle {
|
||||
padding: 5px 12px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.active {
|
||||
background: #e9f7ff;
|
||||
color: #5d9cec;
|
||||
}
|
||||
|
||||
.titleLeft {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
|
@ -236,11 +256,28 @@
|
|||
|
||||
.moveModalWrapper {
|
||||
.ant-radio-group {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 33.33%);
|
||||
|
||||
.ant-radio-wrapper {
|
||||
margin: 4px 16px;
|
||||
margin: 4px 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.salaryItemEditWrapper {
|
||||
.wea-search-group {
|
||||
padding: 0;
|
||||
border: 1px solid #e5e5e5;
|
||||
border-bottom: none;
|
||||
|
||||
.wea-content {
|
||||
padding: 0;
|
||||
|
||||
.wea-form-item {
|
||||
padding: 4px 16px;
|
||||
border-bottom: 1px solid #e5e5e5;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -276,7 +276,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)}
|
||||
|
|
|
|||
|
|
@ -26,7 +26,12 @@ class LedgerMovoTo extends Component {
|
|||
>
|
||||
<WeaSearchGroup showGroup needTigger={false}>
|
||||
<WeaSelect
|
||||
options={dataList}
|
||||
options={_.filter(dataList, item => item.showname === "未分类")}
|
||||
detailtype={3} value={value}
|
||||
onChange={onChangeMoveVal}
|
||||
/>
|
||||
<WeaSelect
|
||||
options={_.filter(dataList, item => item.showname !== "未分类")}
|
||||
detailtype={3} value={value}
|
||||
onChange={onChangeMoveVal}
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,57 @@
|
|||
/*
|
||||
* Author: 黎永顺
|
||||
* name: 薪资账套-编辑薪资项目项
|
||||
* Description:
|
||||
* Date: 2023/07/19
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaLocaleProvider, WeaSlideModal } from "ecCom";
|
||||
import SlideModalTitle from "../../../components/slideModalTitle";
|
||||
import SalaryItemForm from "../../salaryItem/salaryItemForm";
|
||||
import "./index.less";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
class LedgerSalaryItemEditSlide extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {};
|
||||
}
|
||||
|
||||
handleChange = (params) => {
|
||||
const request = { ...this.props.request, ...params };
|
||||
const key = Object.keys(params)[0];
|
||||
this.props.onUpdateRequest(request, key);
|
||||
};
|
||||
handleShowFormal = () => this.props.onEditFormnul();
|
||||
|
||||
render() {
|
||||
return (
|
||||
<WeaSlideModal
|
||||
{...this.props}
|
||||
className="salaryItemEditWrapper"
|
||||
top={0} width={80} height={100}
|
||||
direction="right" measure="%"
|
||||
title={
|
||||
<SlideModalTitle
|
||||
subtitle={getLabel(111, "编辑薪资项目")} showOperateBtn
|
||||
loading={this.props.loading} editable onSave={this.props.onSave}
|
||||
/>
|
||||
}
|
||||
content={
|
||||
<div style={{ padding: 16 }}>
|
||||
{
|
||||
this.props.visible &&
|
||||
<SalaryItemForm
|
||||
{...this.props} editable
|
||||
onChangeFieldsItem={this.handleChange} onShowFormal={this.handleShowFormal}
|
||||
/>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
/>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default LedgerSalaryItemEditSlide;
|
||||
|
|
@ -6,16 +6,16 @@
|
|||
*/
|
||||
import React, { Component } from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { WeaButtonIcon, WeaSearchGroup, WeaLocaleProvider } from "ecCom";
|
||||
import { WeaButtonIcon, WeaInputSearch, WeaLocaleProvider, WeaSearchGroup } from "ecCom";
|
||||
import { Button, Modal } from "antd";
|
||||
import CategoryAddModal from "./categoryAddModal";
|
||||
import LedgerSalaryItemAddModal from "./ledgerSalaryItemAddModal";
|
||||
import LedgerSalaryItemTable from "./ledgerSalaryItemTable";
|
||||
import FormalFormModal from "../../salaryItem/formalFormModal";
|
||||
import LedgerMovoTo from "./ledgerMovoTo";
|
||||
import "./index.less";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
@inject("ledgerStore")
|
||||
@observer
|
||||
class LedgerSalaryItemNormal extends Component {
|
||||
|
|
@ -29,51 +29,14 @@ class LedgerSalaryItemNormal extends Component {
|
|||
name: "",
|
||||
id: ""
|
||||
},
|
||||
editFormulModal: {
|
||||
visible: false,
|
||||
formulaId: "",
|
||||
valueType: "",
|
||||
dataType: ""
|
||||
},
|
||||
//公式保存数据
|
||||
formnulField: {},
|
||||
formnulId: "",
|
||||
moveModalPayload: {
|
||||
visible: false, title: "",
|
||||
dataList: [], record: null, value: ""
|
||||
}
|
||||
},
|
||||
salaryItemKeywords: ""
|
||||
};
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
this.handleResetFormnul();
|
||||
}
|
||||
|
||||
handleEditFormnul = (field, record) => {
|
||||
const { valueType, formulaId, dateType: dataType, id, key } = record;
|
||||
const { editFormulModal } = this.state;
|
||||
this.setState({
|
||||
editFormulModal: {
|
||||
...editFormulModal,
|
||||
visible: true,
|
||||
valueType, formulaId, dataType
|
||||
},
|
||||
formnulField: field,
|
||||
formnulId: id || key
|
||||
});
|
||||
};
|
||||
handleSaveFormnul = (data) => {
|
||||
const { onSaveFormnul } = this.props;
|
||||
const { formnulField, formnulId } = this.state;
|
||||
const tmpV = _.cloneDeep(formnulField.items);
|
||||
const formnulData = _.map(tmpV, it => {
|
||||
if (it.id === formnulId || it.key === formnulId) {
|
||||
return { ...it, formulaId: data.id, formulaContent: data.formula };
|
||||
}
|
||||
return { ...it };
|
||||
});
|
||||
onSaveFormnul(formnulField.uuid, formnulData);
|
||||
};
|
||||
handleAddCategory = (name = "", id = "") => {
|
||||
const { categoryModal } = this.state;
|
||||
this.setState({
|
||||
|
|
@ -128,23 +91,6 @@ class LedgerSalaryItemNormal extends Component {
|
|||
}
|
||||
}, () => form.resetForm());
|
||||
};
|
||||
handleCloseFormnul = () => {
|
||||
const { editFormulModal } = this.state;
|
||||
this.setState({
|
||||
editFormulModal: {
|
||||
...editFormulModal,
|
||||
visible: false,
|
||||
formulaId: "",
|
||||
valueType: "", dataType: ""
|
||||
}
|
||||
});
|
||||
};
|
||||
handleResetFormnul = () => {
|
||||
this.setState({
|
||||
formnulField: {},
|
||||
formnulId: ""
|
||||
});
|
||||
};
|
||||
handleCancelMove = () => {
|
||||
this.setState({
|
||||
moveModalPayload: {
|
||||
|
|
@ -185,6 +131,8 @@ class LedgerSalaryItemNormal extends Component {
|
|||
|
||||
render() {
|
||||
const {
|
||||
editId,
|
||||
saveSalarySobId,
|
||||
dataSource,
|
||||
onSaveCategory,
|
||||
onDropCategoryItem,
|
||||
|
|
@ -195,15 +143,23 @@ class LedgerSalaryItemNormal extends Component {
|
|||
taxAgentStore
|
||||
} = this.props;
|
||||
const { showOperateBtn } = taxAgentStore;
|
||||
const { categoryModal, addCategoryItemsVisible, editFormulModal, moveModalPayload } = this.state;
|
||||
const { categoryModal, addCategoryItemsVisible, moveModalPayload, salaryItemKeywords } = this.state;
|
||||
const newDateSource = _.map(dataSource, item => {
|
||||
return {
|
||||
...item,
|
||||
items: _.filter(item.items || [], child => child.name.indexOf(salaryItemKeywords) !== -1)
|
||||
};
|
||||
});
|
||||
return (
|
||||
<WeaSearchGroup needTigger={false} showGroup
|
||||
title={<TitleComp showOperateBtn={showOperateBtn} titleName={incomeCategoriesTitleName}
|
||||
onAddCategory={this.handleAddCategory}/>}>
|
||||
onAddCategory={this.handleAddCategory} keyword={salaryItemKeywords}
|
||||
onChange={val => this.setState({ salaryItemKeywords: val })}
|
||||
/>}>
|
||||
<div className="categroyListWrapper">
|
||||
{
|
||||
_.map(dataSource, field => {
|
||||
const { items } = field;
|
||||
_.map(newDateSource, field => {
|
||||
const { items, id, uuid } = field;
|
||||
return <WeaSearchGroup
|
||||
needTigger showGroup
|
||||
title={
|
||||
|
|
@ -221,12 +177,13 @@ class LedgerSalaryItemNormal extends Component {
|
|||
}
|
||||
>
|
||||
<LedgerSalaryItemTable
|
||||
dataSource={items}
|
||||
tableData={items}
|
||||
dataSource={_.find(dataSource, childItem => childItem.id === id || childItem.uuid === uuid).items}
|
||||
salarySobId={editId || saveSalarySobId}
|
||||
selectedRowKeys={field.selectedRowKeys || []}
|
||||
onDropCategoryItem={(data) => onDropCategoryItem(field, data)}
|
||||
onHandleItemhide={(data) => onHandleItemhide(field, data)}
|
||||
onChangeSelectedRowKeys={(data) => onChangeSelectedRowKeys(field, data)}
|
||||
onEditFormnul={(data) => this.handleEditFormnul(field, data)}
|
||||
onMoveTo={this.handleMoveTo}
|
||||
/>
|
||||
</WeaSearchGroup>;
|
||||
|
|
@ -249,15 +206,6 @@ class LedgerSalaryItemNormal extends Component {
|
|||
onSaveCategory={onSaveCategory}
|
||||
onCancel={this.handleClose}
|
||||
/>
|
||||
{/*公式编辑*/}
|
||||
{
|
||||
editFormulModal.visible &&
|
||||
<FormalFormModal
|
||||
{...editFormulModal}
|
||||
onSaveFormal={this.handleSaveFormnul}
|
||||
onCancel={this.handleCloseFormnul}
|
||||
/>
|
||||
}
|
||||
</div>
|
||||
</WeaSearchGroup>
|
||||
);
|
||||
|
|
@ -305,12 +253,17 @@ const TitleNormalComp = (props) => {
|
|||
};
|
||||
|
||||
const TitleComp = (props) => {
|
||||
const { onAddCategory, titleName, showOperateBtn } = props;
|
||||
const { onAddCategory, titleName, showOperateBtn, salaryItemKeywords, onChange } = props;
|
||||
return <div className="titleWrapper">
|
||||
<span>{titleName}</span>
|
||||
{
|
||||
showOperateBtn &&
|
||||
<Button type="ghost" onClick={() => onAddCategory()}>{getLabel(515324, "新增分类")}</Button>
|
||||
}
|
||||
<div><span className="topTitle active">{titleName}</span></div>
|
||||
<div>
|
||||
{
|
||||
showOperateBtn &&
|
||||
<Button type="ghost" onClick={() => onAddCategory()} style={{ marginRight: 10 }}>{getLabel(515324, "新增分类")}</Button>
|
||||
}
|
||||
<WeaInputSearch value={salaryItemKeywords} onChange={onChange}
|
||||
placeholder={getLabel(111, "请输入薪资项目名称")}
|
||||
/>
|
||||
</div>
|
||||
</div>;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -5,14 +5,31 @@
|
|||
* Date: 2022/12/13
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaCheckbox, WeaHelpfulTip, WeaTable, WeaLocaleProvider } from "ecCom";
|
||||
import { WeaCheckbox, WeaHelpfulTip, WeaLocaleProvider, WeaTable } from "ecCom";
|
||||
import LedgerSalaryItemEditSlide from "./ledgerSalaryItemEditSlide";
|
||||
import { getSalaryItemForm } from "../../../apis/ledger";
|
||||
import { commonEnumList } from "../../../apis/ruleconfig";
|
||||
import FormalFormModal from "../../salaryItem/formalFormModal";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
class LedgerSalaryItemTable extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
selectedRowKeys: []
|
||||
selectedRowKeys: [],
|
||||
originRecord: {},
|
||||
salaryItemPayload: {
|
||||
visible: false, record: {},
|
||||
request: {}, isLedger: true,
|
||||
userStatusList: [], loading: false
|
||||
},
|
||||
editFormulModal: {
|
||||
visible: false,
|
||||
formulaId: "",
|
||||
valueType: "",
|
||||
dataType: ""
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -47,15 +64,172 @@ class LedgerSalaryItemTable extends Component {
|
|||
})
|
||||
);
|
||||
};
|
||||
handleChangeSalaryItem = (data, id) => {
|
||||
const { dataSource, onHandleItemhide } = this.props;
|
||||
onHandleItemhide(
|
||||
_.map([...dataSource], item => {
|
||||
if (id === item.salaryItemId) {
|
||||
return {
|
||||
...item,
|
||||
...data
|
||||
};
|
||||
}
|
||||
return { ...item };
|
||||
})
|
||||
);
|
||||
};
|
||||
/*
|
||||
* Author: 黎永顺
|
||||
* Description: 编辑薪资项目
|
||||
* Params:
|
||||
* Date: 2023/7/19
|
||||
*/
|
||||
handleEditSalaryItem = async (record) => {
|
||||
const { salarySobId, dataSource } = this.props, { salaryItemId, id } = record;
|
||||
const {
|
||||
itemHide: hideDefault,
|
||||
valueType, name, description,
|
||||
roundingMode, formulaId, dataType, useInEmployeeSalary,
|
||||
pattern, canEdit, formulaContent, originFormulaContent, originSqlContent
|
||||
} = _.find(dataSource, it => it.salaryItemId === salaryItemId);
|
||||
const { data: userStatusList } = await commonEnumList({ enumClass: "com.engine.salary.enums.sicategory.SharedTypeEnum" });
|
||||
if (id) {
|
||||
getSalaryItemForm({ salarySobId, salaryItemId }).then(({ status, data }) => {
|
||||
if (status) {
|
||||
this.setState({
|
||||
originRecord: _.find(dataSource, it => it.salaryItemId === salaryItemId),
|
||||
salaryItemPayload: {
|
||||
...this.state.salaryItemPayload,
|
||||
visible: true,
|
||||
request: {
|
||||
...data,
|
||||
useInEmployeeSalary: !_.isNil(data.useInEmployeeSalary) ? data.useInEmployeeSalary : "0",
|
||||
hideDefault: _.isNil(hideDefault) ? "0" : hideDefault, valueType, roundingMode, pattern,
|
||||
formulaContent: formulaContent ? formulaContent : data.formulaContent,
|
||||
originFormulaContent: originFormulaContent ? originFormulaContent : data.originFormulaContent,
|
||||
originSqlContent: originSqlContent ? originSqlContent : data.originSqlContent,
|
||||
formulaId: formulaId ? formulaId : data.formulaId
|
||||
},
|
||||
record,
|
||||
userStatusList: _.map(userStatusList, it => ({ key: it.value.toString(), showname: it.defaultLabel }))
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.setState({
|
||||
salaryItemPayload: {
|
||||
...this.state.salaryItemPayload,
|
||||
visible: true,
|
||||
request: {
|
||||
canEdit, dataType, description,
|
||||
formulaContent, formulaId, name,
|
||||
hideDefault: _.isNil(hideDefault) ? "0" : hideDefault,
|
||||
valueType, roundingMode, pattern,
|
||||
originFormulaContent, originSqlContent,
|
||||
useInEmployeeSalary: !_.isNil(useInEmployeeSalary) ? useInEmployeeSalary : "0"
|
||||
},
|
||||
record,
|
||||
userStatusList: _.map(userStatusList, it => ({ key: it.value.toString(), showname: it.defaultLabel }))
|
||||
},
|
||||
originRecord: _.find(dataSource, it => it.salaryItemId === salaryItemId)
|
||||
});
|
||||
}
|
||||
};
|
||||
/*
|
||||
* Author: 黎永顺
|
||||
* Description: 保存薪资项目
|
||||
* Params:
|
||||
* Date: 2023/7/19
|
||||
*/
|
||||
handleSaveItem = () => {
|
||||
const { salaryItemPayload } = this.state;
|
||||
const { request, record } = salaryItemPayload;
|
||||
this.setState({
|
||||
salaryItemPayload: { ...salaryItemPayload, visible: false }
|
||||
});
|
||||
const { salaryItemId } = record;
|
||||
const {
|
||||
hideDefault, roundingMode, pattern, valueType,
|
||||
originFormulaContent, originSqlContent, formulaId
|
||||
} = request;
|
||||
this.handleChangeSalaryItem({
|
||||
itemHide: hideDefault.toString(),
|
||||
roundingMode, pattern, valueType,
|
||||
formulaContent: valueType.toString() === "2" ? originFormulaContent : originSqlContent,
|
||||
formulaId: ((valueType.toString() === "3" && (!originSqlContent || originSqlContent === " ")) || (valueType.toString() === "2" && (!originFormulaContent || originFormulaContent === " ")) || valueType.toString() === "1") ? "" : formulaId,
|
||||
//不能改成其他空值
|
||||
originFormulaContent: ((valueType.toString() === "3" && (!originSqlContent) || originSqlContent === " ") || (valueType.toString() === "1") || (valueType.toString() === "3" && originSqlContent)) ? " " : originFormulaContent,
|
||||
originSqlContent: ((valueType.toString() === "2" && (!originFormulaContent || originFormulaContent === " ")) || (valueType.toString() === "1") || (valueType.toString() === "2" && originFormulaContent)) ? " " : originSqlContent
|
||||
}, salaryItemId);
|
||||
};
|
||||
handleEditFormnul = () => {
|
||||
const { salaryItemPayload, editFormulModal } = this.state;
|
||||
const { record } = salaryItemPayload;
|
||||
const { valueType, formulaId, dateType: dataType, originFormulaContent, originSqlContent } = record;
|
||||
this.setState({
|
||||
editFormulModal: {
|
||||
...editFormulModal, visible: true, valueType, dataType,
|
||||
formulaId: ((valueType.toString() === "2" && (originFormulaContent || originFormulaContent !== " ")) || valueType.toString() === "3" && (originSqlContent || originSqlContent === " ")) ? formulaId : ""
|
||||
}
|
||||
});
|
||||
};
|
||||
handleCloseFormnul = () => {
|
||||
const { editFormulModal } = this.state;
|
||||
this.setState({
|
||||
editFormulModal: {
|
||||
...editFormulModal,
|
||||
visible: false,
|
||||
formulaId: "",
|
||||
valueType: "", dataType: ""
|
||||
}
|
||||
});
|
||||
};
|
||||
handleSaveFormnul = (data) => {
|
||||
const { salaryItemPayload } = this.state;
|
||||
const { record } = salaryItemPayload;
|
||||
const { salaryItemId } = record;
|
||||
const { dataSource, onHandleItemhide } = this.props;
|
||||
const tmpV = _.cloneDeep(dataSource);
|
||||
const formnulData = _.map(tmpV, it => {
|
||||
if (it.salaryItemId === salaryItemId) {
|
||||
return {
|
||||
...it,
|
||||
formulaId: data.id, formulaContent: data.formula,
|
||||
originFormulaContent: data.referenceType === "formula" ? data.formula : "",
|
||||
originSqlContent: data.referenceType === "sql" ? data.formula : ""
|
||||
};
|
||||
}
|
||||
return { ...it };
|
||||
});
|
||||
this.setState({
|
||||
salaryItemPayload: {
|
||||
...salaryItemPayload,
|
||||
request: {
|
||||
...salaryItemPayload.request,
|
||||
formulaId: data.id,
|
||||
originFormulaContent: data.referenceType === "formula" ? data.formula : "",
|
||||
originSqlContent: data.referenceType === "sql" ? data.formula : ""
|
||||
},
|
||||
record: {
|
||||
...salaryItemPayload.record,
|
||||
formulaId: data.id,
|
||||
originFormulaContent: data.referenceType === "formula" ? data.formula : "",
|
||||
originSqlContent: data.referenceType === "sql" ? data.formula : ""
|
||||
}
|
||||
}
|
||||
}, () => {
|
||||
this.handleCloseFormnul();
|
||||
onHandleItemhide(formnulData);
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
const { salaryItemPayload, editFormulModal, originRecord } = this.state;
|
||||
const { onHandleItemhide } = this.props;
|
||||
const {
|
||||
dataSource,
|
||||
onDropCategoryItem,
|
||||
onChangeSelectedRowKeys,
|
||||
onEditFormnul,
|
||||
selectedRowKeys,
|
||||
onMoveTo
|
||||
tableData, dataSource, onDropCategoryItem,
|
||||
onChangeSelectedRowKeys, selectedRowKeys, onMoveTo
|
||||
} = this.props;
|
||||
const rowSelection = {
|
||||
selectedRowKeys,
|
||||
|
|
@ -66,7 +240,7 @@ class LedgerSalaryItemTable extends Component {
|
|||
disabled: !record.canDelete
|
||||
})
|
||||
};
|
||||
const checkValue = (!_.isEmpty(dataSource) && _.every(dataSource, it => it.itemHide && it.itemHide === "1")) ? "1" : "0";
|
||||
const checkValue = (!_.isEmpty(tableData) && _.every(tableData, it => it.itemHide && it.itemHide === "1")) ? "1" : "0";
|
||||
const columns = [
|
||||
{
|
||||
title: getLabel(33439, "名称"),
|
||||
|
|
@ -78,18 +252,12 @@ class LedgerSalaryItemTable extends Component {
|
|||
<span style={{ marginRight: 8 }}>{getLabel(543423, "核算公式")}</span>
|
||||
<WeaHelpfulTip title={<HelpContent/>} placement="bottom" width={200}/>
|
||||
</span>,
|
||||
dataIndex: "formulaContent",
|
||||
key: "formulaContent",
|
||||
render: (text, record) => {
|
||||
if (record.canEdit) {
|
||||
return (
|
||||
<span className="linkWapper">
|
||||
<a href="javascript: void(0);" onClick={() => onEditFormnul(record)}> {text} </a>
|
||||
</span>
|
||||
);
|
||||
} else {
|
||||
return <span> {text} </span>;
|
||||
}
|
||||
dataIndex: "valueType",
|
||||
key: "valueType",
|
||||
render: (e, record) => {
|
||||
const { valueType } = record;
|
||||
const key = !_.isNil(valueType) ? valueType : "";
|
||||
return <span> {key.toString() === "1" ? "输入" : key.toString() === "2" ? "自定义公式" : key.toString() === "3" ? "SQL" : ""} </span>;
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
@ -117,26 +285,71 @@ class LedgerSalaryItemTable extends Component {
|
|||
title: getLabel(30585, "操作"),
|
||||
dataIndex: "operate",
|
||||
key: "operate",
|
||||
width: 100,
|
||||
width: 120,
|
||||
render: (_, record) => (
|
||||
<a href="javascript:void(0);" onClick={() => onMoveTo(record)}>{getLabel(81298, "移动到")}</a>
|
||||
<React.Fragment>
|
||||
<a href="javascript:void(0);" onClick={() => this.handleEditSalaryItem(record)}
|
||||
style={{ marginRight: 10 }}>{getLabel(501169, "编辑")}</a>
|
||||
<a href="javascript:void(0);" onClick={() => onMoveTo(record)}>{getLabel(81298, "移动到")}</a>
|
||||
</React.Fragment>
|
||||
)
|
||||
}
|
||||
];
|
||||
return (
|
||||
<WeaTable
|
||||
rowKey={record => record.id || record.key}
|
||||
rowSelection={rowSelection}
|
||||
dataSource={dataSource}
|
||||
columns={columns}
|
||||
onRow={(record, index) => ({
|
||||
index,
|
||||
moveRow: record
|
||||
})}
|
||||
pagination={false}
|
||||
onDrop={onDropCategoryItem}
|
||||
draggable={true}
|
||||
/>
|
||||
<React.Fragment>
|
||||
<WeaTable
|
||||
rowKey={record => record.id || record.key}
|
||||
rowSelection={rowSelection}
|
||||
dataSource={tableData}
|
||||
columns={columns}
|
||||
onRow={(record, index) => ({
|
||||
index,
|
||||
moveRow: record
|
||||
})}
|
||||
pagination={false}
|
||||
onDrop={onDropCategoryItem}
|
||||
draggable={dataSource.length === tableData.length}
|
||||
/>
|
||||
<LedgerSalaryItemEditSlide
|
||||
{...salaryItemPayload}
|
||||
onUpdateRequest={(request, key) => {
|
||||
this.setState({
|
||||
salaryItemPayload: {
|
||||
...salaryItemPayload,
|
||||
request,
|
||||
record: key === "valueType" ? {
|
||||
...salaryItemPayload.record,
|
||||
[key]: request[key]
|
||||
} : { ...salaryItemPayload.record }
|
||||
}
|
||||
});
|
||||
}}
|
||||
onEditFormnul={this.handleEditFormnul}
|
||||
onSave={this.handleSaveItem}
|
||||
onClose={() => this.setState({
|
||||
salaryItemPayload: {
|
||||
...salaryItemPayload, visible: false
|
||||
}
|
||||
}, () => {
|
||||
const result = _.map(_.cloneDeep(dataSource), it => {
|
||||
if (it.salaryItemId === originRecord.salaryItemId) {
|
||||
return { ...originRecord };
|
||||
}
|
||||
return { ...it };
|
||||
});
|
||||
onHandleItemhide(result);
|
||||
})}
|
||||
/>
|
||||
{/*公式编辑*/}
|
||||
{
|
||||
editFormulModal.visible &&
|
||||
<FormalFormModal
|
||||
{...editFormulModal}
|
||||
onSaveFormal={this.handleSaveFormnul}
|
||||
onCancel={this.handleCloseFormnul}
|
||||
/>
|
||||
}
|
||||
</React.Fragment>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ import "./index.less";
|
|||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
const Step = WeaSteps.Step;
|
||||
|
||||
@inject("taxAgentStore")
|
||||
@inject("taxAgentStore", "ledgerStore")
|
||||
@observer
|
||||
class LedgerSlide extends Component {
|
||||
constructor(props) {
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ import { WeaInputSearch, WeaLocaleProvider, WeaTop } from "ecCom";
|
|||
import { Button } from "antd";
|
||||
import LedgerTable from "./components/ledgerTable";
|
||||
import LedgerSlide from "./components/ledgerSlide";
|
||||
import "./index.less";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
|
|
@ -69,7 +70,7 @@ class Index extends Component {
|
|||
];
|
||||
return (
|
||||
<WeaTop
|
||||
title={getLabel(538010, "薪资账套")}
|
||||
title={getLabel(538010, "薪资账套")} className="ledgerOuter"
|
||||
icon={<i className="icon-coms-fa"/>}
|
||||
iconBgcolor="#F14A2D"
|
||||
showDropIcon={false}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,13 @@
|
|||
.ledgerOuter {
|
||||
.wea-new-top {
|
||||
.ant-col-10 {
|
||||
span:nth-child(2) {
|
||||
margin-top: -6px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.ledgerWrapper {
|
||||
height: 100%;
|
||||
|
||||
|
|
|
|||
|
|
@ -133,6 +133,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);
|
||||
|
|
@ -167,9 +168,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(544271, "请确认薪资信息是有误,进行反馈并发起反馈流程。"),
|
||||
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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -126,6 +126,7 @@ class SalaryItemSettings extends Component {
|
|||
};
|
||||
getAvailableSalaryItemSet = (record, title) => {
|
||||
const payload = {
|
||||
salaryTemplateId: this.props.salaryTemplateId,
|
||||
salarySobId: this.props.salarySobId,
|
||||
existSalaryItemIds: _.map(record.items, it => it.id),
|
||||
groupId: record.groupId,
|
||||
|
|
@ -150,6 +151,7 @@ class SalaryItemSettings extends Component {
|
|||
const { dataList } = this.state;
|
||||
const payload = {
|
||||
salarySobId,
|
||||
salaryTemplateId: this.props.salaryTemplateId,
|
||||
existSalaryGroupIds: _.map(dataList, it => it.groupId),
|
||||
isReplenish: this.props.isReplenish
|
||||
};
|
||||
|
|
@ -218,6 +220,8 @@ class SalaryItemSettings extends Component {
|
|||
}
|
||||
};
|
||||
handleEditSalaryItemName = (item, field, viewAttr) => {
|
||||
//暂时关闭
|
||||
return
|
||||
const { groupId } = item, { salaryItemId } = field, { dataList } = this.state;
|
||||
if (groupId === "111111111111111111") return;
|
||||
this.setState({
|
||||
|
|
|
|||
|
|
@ -148,7 +148,7 @@ export default class ShowSettingForm extends React.Component {
|
|||
>
|
||||
<SalaryItemSettings
|
||||
ref={dom => this.salaryItemSettingsRef = dom}
|
||||
dataSource={salaryItemSet}
|
||||
dataSource={salaryItemSet} salaryTemplateId={this.props.id || ""}
|
||||
onChangeSalaryItem={this.handleChangeSalaryItem}
|
||||
onChangeSalaryItemShowNamesetting={this.handleChangeSalaryItemShowNamesetting}
|
||||
salarySobId={toJS(templateBaseData).salarySob}
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ export default class TemplateSettingForm extends React.Component {
|
|||
onChangeSalaryItem={this.handleChangeSalaryItem}
|
||||
onChangeSalaryItemShowNamesetting={this.handleChangeSalaryItemShowNamesetting}
|
||||
salarySobId={toJS(templateBaseData).salarySob}
|
||||
salaryTemplateId={this.props.id || ""}
|
||||
isReplenish={true} salaryBillItemNameSet={salaryBillItemNameSet}
|
||||
/>
|
||||
</WeaSearchGroup>
|
||||
|
|
|
|||
|
|
@ -803,7 +803,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(544269, "核算人员匹配规则")} 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)}
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -13,8 +13,7 @@ export default class CustomSalaryItemSlide extends React.Component {
|
|||
}
|
||||
|
||||
handleChange = (params) => {
|
||||
let request = { ...this.props.request, ...params };
|
||||
this.props.onChange(request);
|
||||
this.props.onChange({ ...this.props.request, ...params });
|
||||
};
|
||||
|
||||
handleShowFormal = () => {
|
||||
|
|
@ -25,7 +24,11 @@ export default class CustomSalaryItemSlide extends React.Component {
|
|||
|
||||
// 保存公式成功回调
|
||||
handleSaveFormal = (data) => {
|
||||
this.handleChange({ formulaId: data.id, formulaContent: data.formula });
|
||||
this.handleChange({
|
||||
formulaId: data.id, formulaContent: data.formula,
|
||||
originFormulaContent: data.referenceType === "formula" ? data.formula : "",
|
||||
originSqlContent: data.referenceType === "sql" ? data.formula : ""
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
|
|
|
|||
|
|
@ -40,11 +40,14 @@ export default class FormalFormModal extends React.Component {
|
|||
}
|
||||
|
||||
componentWillMount() {
|
||||
const { salaryItemStore } = this.props;
|
||||
const { salaryItemStore, formulaId, valueType } = this.props;
|
||||
const { salaryAcctImportTemplateParam, setSearchFields, detailFormual } = salaryItemStore;
|
||||
setSearchFields([]);
|
||||
if (!!this.props.formulaId && this.props.formulaId != 0) {
|
||||
detailFormual(this.props.formulaId).then(data => {
|
||||
detailFormual({
|
||||
formulaId,
|
||||
returnType: (valueType.toString() === "2" || valueType.toString() === "FORMULA") ? "formula" : "sql"
|
||||
}).then(data => {
|
||||
this.parameters = data.parameters;
|
||||
this.referenceType = data.referenceType;
|
||||
this.extendParam = data.extendParam;
|
||||
|
|
|
|||
|
|
@ -276,6 +276,7 @@ export default class SalaryItem extends React.Component {
|
|||
// 新建和修改保存的回调
|
||||
const handleSlideSave = (continueFlag) => {
|
||||
const { salaryItemStore: { saveItem, request, getTableDatas } } = this.props;
|
||||
const payload = _.cloneDeep(request);
|
||||
const { name, sharedType, taxAgentIds } = request;
|
||||
if (!name || (sharedType === "1" && !taxAgentIds)) {
|
||||
Modal.warning({
|
||||
|
|
@ -284,7 +285,7 @@ export default class SalaryItem extends React.Component {
|
|||
});
|
||||
return;
|
||||
}
|
||||
saveItem(request, continueFlag).then(() => {
|
||||
saveItem(payload, continueFlag).then(() => {
|
||||
getTableDatas({ ...this.state.searchParams }).then(res => {
|
||||
this.setState({
|
||||
searchParams: {
|
||||
|
|
|
|||
|
|
@ -29,12 +29,21 @@ class SalaryItemForm extends Component {
|
|||
|
||||
componentDidMount() {
|
||||
const { salaryItemFieldsList } = this.state;
|
||||
const { request, editable, record, isAdd, taxAgentAdminOption } = this.props;
|
||||
const { systemType, sharedType, valueType } = request;
|
||||
const { request, editable, record, isAdd = false, taxAgentAdminOption, isLedger = false } = this.props;
|
||||
const { systemType = "", sharedType, valueType, useInEmployeeSalary } = request;
|
||||
this.setState({
|
||||
salaryItemFieldsList: _.map(salaryItemFieldsList, item => {
|
||||
const { key, lanId, label } = item;
|
||||
switch (key) {
|
||||
case "useDefault":
|
||||
case "sortedIndex":
|
||||
case "dataType":
|
||||
case "description":
|
||||
return {
|
||||
...item,
|
||||
viewAttr: (!isLedger && ((editable && record.canEdit) || isAdd)) ? 2 : 1,
|
||||
display: !isLedger
|
||||
};
|
||||
case "useInEmployeeSalary":
|
||||
return {
|
||||
...item,
|
||||
|
|
@ -58,16 +67,24 @@ class SalaryItemForm extends Component {
|
|||
options: taxAgentAdminOption,
|
||||
label: getLabel(lanId, label)
|
||||
};
|
||||
case "hideDefault":
|
||||
return {
|
||||
...item,
|
||||
viewAttr: 2,
|
||||
tip: isLedger ? getLabel(544291, "开启后,薪资核算不会展示该项目,但是不影响该项目的核算值") : item.tip
|
||||
};
|
||||
case "valueType":
|
||||
return {
|
||||
...item,
|
||||
viewAttr: (useInEmployeeSalary.toString() === "0" && ((isLedger && record.canEdit) || (editable && record.canEdit) || isAdd)) ? 2 : 1,
|
||||
label: getLabel(lanId, label)
|
||||
};
|
||||
case "formulaContent":
|
||||
return {
|
||||
...item,
|
||||
display: valueType === "2" || valueType === "3",
|
||||
viewAttr: (editable && record.canEdit) || isAdd ? 2 : 1,
|
||||
key: valueType.toString() === "3" ? "originSqlContent" : "originFormulaContent",
|
||||
display: useInEmployeeSalary.toString() === "0" && valueType && (valueType.toString() === "2" || valueType.toString() === "3"),
|
||||
viewAttr: (isLedger && record.canEdit) || (editable && record.canEdit) || isAdd ? 2 : 1,
|
||||
label: getLabel(lanId, label)
|
||||
};
|
||||
default:
|
||||
|
|
@ -75,7 +92,7 @@ class SalaryItemForm extends Component {
|
|||
}
|
||||
return {
|
||||
...item,
|
||||
viewAttr: (key === "name" && ((editable && record.canEdit) || isAdd)) ? 3 : (key !== "name" && ((editable && record.canEdit) || isAdd)) ? 2 : 1,
|
||||
viewAttr: (key === "name" && ((editable && record.canEdit && !isLedger) || isAdd)) ? 3 : (key !== "name" && ((editable && record.canEdit) || isAdd)) ? 2 : 1,
|
||||
label: getLabel(lanId, label)
|
||||
};
|
||||
})
|
||||
|
|
@ -89,9 +106,10 @@ class SalaryItemForm extends Component {
|
|||
salaryItemFieldsList: _.map(salaryItemFieldsList, item => {
|
||||
if (key === "sharedType" && item.key === "taxAgentIds") {
|
||||
return { ...item, display: v === "1", viewAttr: 3 };
|
||||
} else if (key === "valueType" && item.key === "formulaContent") {
|
||||
} else if (key === "valueType" && (item.key === "originSqlContent" || item.key === "originFormulaContent")) {
|
||||
return {
|
||||
...item,
|
||||
key: v === "3" ? "originSqlContent" : "originFormulaContent",
|
||||
label: v === "2" ? "公式" : v === "3" ? "SQL" : "",
|
||||
display: v === "2" || v === "3"
|
||||
};
|
||||
|
|
@ -99,11 +117,11 @@ class SalaryItemForm extends Component {
|
|||
return { ...item };
|
||||
})
|
||||
}, () => {
|
||||
if (key === "valueType") {
|
||||
onChangeFieldsItem({ formulaContent: "", formulaId: 0, valueType: v });
|
||||
} else {
|
||||
onChangeFieldsItem({ [key]: (key === "useDefault" || key === "useInEmployeeSalary" || key === "hideDefault") ? Number(v) : v });
|
||||
}
|
||||
// if (key === "valueType" && !this.props.isLedger) {
|
||||
// onChangeFieldsItem({ formulaContent: "", formulaId: 0, valueType: v });
|
||||
// } else {
|
||||
onChangeFieldsItem({ [key]: (key === "useDefault" || key === "useInEmployeeSalary" || key === "hideDefault") ? Number(v) : v });
|
||||
// }
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -121,7 +139,7 @@ class SalaryItemForm extends Component {
|
|||
(type === "INPUT" && display) ?
|
||||
<WeaFormItem label={label} labelCol={{ span: 6 }} wrapperCol={{ span: 12 }}>
|
||||
<WeaInput viewAttr={viewAttr} value={value}
|
||||
onClick={() => key === "formulaContent" && onShowFormal()}
|
||||
onClick={() => (key === "originSqlContent" || key === "originFormulaContent") && onShowFormal()}
|
||||
onChange={v => this.handleChangeSalaryFiledItems(key, v)}/></WeaFormItem> :
|
||||
(type === "SWITCH" && display) ?
|
||||
<WeaFormItem label={label} labelCol={{ span: 6 }} wrapperCol={{ span: 12 }}>
|
||||
|
|
|
|||
|
|
@ -252,7 +252,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) {
|
||||
|
|
@ -265,7 +265,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) {
|
||||
|
|
@ -278,7 +278,7 @@ export default class Archives extends React.Component {
|
|||
});
|
||||
return;
|
||||
}
|
||||
save("OTHER").then(() => {
|
||||
save("OTHER", this.record.paymentOrganization).then(() => {
|
||||
this.query();
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,9 +7,9 @@
|
|||
import React, { Component } from "react";
|
||||
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.getLabel;
|
||||
const { getLabel } = WeaLocaleProvider;
|
||||
|
||||
class CustomBenefitsTable extends Component {
|
||||
constructor(props) {
|
||||
|
|
@ -79,7 +79,11 @@ class CustomBenefitsTable extends Component {
|
|||
return (
|
||||
<div className="linkWapper">
|
||||
{showOperateBtn &&
|
||||
<a href="javascript: void(0);" onClick={() => onCustomEdit(record)}>{getLabel(501169, "编辑")}</a>
|
||||
<React.Fragment>
|
||||
<a href="javascript: void(0);" onClick={() => onCustomEdit(record)} style={{ marginRight: 10 }}>{getLabel(501169, "编辑")}</a>
|
||||
<a href="javascript: void(0);"
|
||||
onClick={() => this.deleteCustomCategory(record.id)}>{getLabel(535052, "删除")}</a>
|
||||
</React.Fragment>
|
||||
}
|
||||
</div>
|
||||
);
|
||||
|
|
@ -100,6 +104,38 @@ class CustomBenefitsTable extends Component {
|
|||
message.error(errormsg || getLabel(30651, "操作失败"));
|
||||
}
|
||||
});
|
||||
},
|
||||
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());
|
||||
}
|
||||
});
|
||||
};
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ export default class SlideTaxagentUser extends React.Component {
|
|||
extEmpsWitch: "1" //非系统人员开关, 1: 开启, 0:关闭
|
||||
};
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
this.getSysinfo();
|
||||
}
|
||||
|
|
@ -201,10 +202,10 @@ export default class SlideTaxagentUser extends React.Component {
|
|||
<div className="slideRefereUser">
|
||||
<WeaTab
|
||||
datas={
|
||||
extEmpsWitch === "0" ?
|
||||
(extEmpsWitch === "0" || !extEmpsWitch) ?
|
||||
[
|
||||
{ title: getLabel(124810, "人员范围"), viewcondition: "1" },
|
||||
{ title: getLabel(543489, "从范围中排除"), viewcondition: "0" },
|
||||
{ title: getLabel(543489, "从范围中排除"), viewcondition: "0" }
|
||||
] :
|
||||
[
|
||||
{ title: getLabel(124810, "人员范围"), viewcondition: "1" },
|
||||
|
|
|
|||
|
|
@ -246,11 +246,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;
|
||||
|
|
@ -261,7 +261,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;
|
||||
|
|
@ -272,7 +272,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;
|
||||
|
|
|
|||
|
|
@ -232,7 +232,7 @@ export class payrollStore {
|
|||
if (id !== "") {
|
||||
this.salaryItemSet = res.data.salaryTemplateSalaryItemSet;
|
||||
this.salaryBillItemNameSet = res.data.salaryBillItemNameSet;
|
||||
this.replenishSalaryTemplateSalaryItemSet = res.data.salaryTemplateSalaryItemSet;
|
||||
this.replenishSalaryTemplateSalaryItemSet = res.data.replenishSalaryTemplateSalaryItemSet;
|
||||
}
|
||||
this.salaryTemplateShowSet = { ...res.data.salaryTemplateShowSet.data, ...JSON.parse(salaryTemplateShowSetStorage) };
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -327,7 +327,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();
|
||||
|
|
|
|||
|
|
@ -274,9 +274,34 @@ export class SalaryItemStore {
|
|||
@action
|
||||
saveItem = (params, continueFlag) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
if (!this.validateForm(params)) {
|
||||
return;
|
||||
const { valueType, formulaId, originFormulaContent, originSqlContent, ...extra } = params;
|
||||
let payload = { ...extra, valueType };
|
||||
if (valueType === "1") {
|
||||
payload = {
|
||||
...payload,
|
||||
formulaContent: "",
|
||||
formulaId: "",
|
||||
originSqlContent: "",
|
||||
originFormulaContent: ""
|
||||
};
|
||||
} else if (valueType === "2") {
|
||||
payload = {
|
||||
...payload,
|
||||
formulaContent: originFormulaContent ? originFormulaContent : "",
|
||||
formulaId: originFormulaContent ? formulaId : "",
|
||||
originSqlContent: "",
|
||||
originFormulaContent
|
||||
};
|
||||
} else if (valueType === "3") {
|
||||
payload = {
|
||||
...payload,
|
||||
formulaContent: originSqlContent ? originSqlContent : "",
|
||||
formulaId: originSqlContent ? formulaId : "",
|
||||
originFormulaContent: "",
|
||||
originSqlContent
|
||||
};
|
||||
}
|
||||
if (!this.validateForm(payload)) return;
|
||||
API.saveItem(params).then(res => {
|
||||
if (res.status) {
|
||||
if (!continueFlag) {
|
||||
|
|
@ -336,9 +361,9 @@ export class SalaryItemStore {
|
|||
|
||||
// 根据id获取formual
|
||||
@action
|
||||
detailFormual = (formulaId) => {
|
||||
detailFormual = (params) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
API.detailFormual({ formulaId }).then(res => {
|
||||
API.detailFormual(params).then(res => {
|
||||
if (res.status) {
|
||||
this.formulaDetail = res.data;
|
||||
resolve(res.data);
|
||||
|
|
|
|||
Loading…
Reference in New Issue