Compare commits

...

22 Commits

Author SHA1 Message Date
lys cac96cbae6 Merge branch 'release/2.19.1.2501.01' into custom/陕西万众 2025-04-11 10:59:33 +08:00
lys 65b0020ea1 custom/陕西万众 2025-02-27 09:13:44 +08:00
lys 0af1148d03 custom/陕西万众 2025-02-26 17:17:06 +08:00
lys 849f130e6b custom/陕西万众 2025-01-02 14:51:47 +08:00
lys 637e98f0e8 custom/陕西万众 2025-01-02 11:13:06 +08:00
lys c221ce3a23 Merge branch 'release/2.18.2.2412.02' into custom/陕西万众
# Conflicts:
#	pc4mobx/hrmSalary/pages/salaryItem/syncToSalaryAccountSetDialog.js
2025-01-02 10:16:06 +08:00
lys e60d6d4562 Merge branch 'release/2.18.1.2412.01' into custom/陕西万众
# Conflicts:
#	pc4mobx/hrmSalary/apis/ledger.js
#	pc4mobx/hrmSalary/pages/ledgerPage/config.js
#	pc4mobx/hrmSalary/pages/salaryItem/syncToSalaryAccountSetDialog.js
#	pc4mobx/hrmSalary/stores/ledger.js
2024-12-13 15:15:41 +08:00
黎永顺 45a1eb6ccf custom/陕西万众-薪资账套薪资核算配置 2024-07-10 14:53:51 +08:00
黎永顺 4f5aa85c73 Merge branch 'release/2.14.5.2406.03' into custom/陕西万众-薪资账套薪资核算配置
# Conflicts:
#	pc4mobx/hrmSalary/apis/calculate.js
#	pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/index.js
#	pc4mobx/hrmSalary/stores/calculate.js
2024-07-10 14:43:24 +08:00
黎永顺 d0d22ee088 Merge branch 'release/2.10.1.2402.01' into custom/陕西万众-薪资账套薪资核算配置 2024-03-04 14:02:51 +08:00
黎永顺 29f8606b2f Merge branch 'release/2.9.10.2312.02' into custom/陕西万众-薪资账套薪资核算配置
# Conflicts:
#	pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/index.js
2024-01-10 14:46:15 +08:00
黎永顺 0b8c335f0f custom/陕西万众-薪资账套薪资核算配置
新增模板查询功能
2024-01-08 11:37:53 +08:00
黎永顺 bc1fd3f5dc custom/陕西万众-薪资账套薪资核算配置
新增模板查询功能
2024-01-05 18:56:03 +08:00
黎永顺 8361220614 custom/陕西万众-薪资账套薪资核算配置
新增模板查询功能
2024-01-05 17:45:29 +08:00
黎永顺 e3e9e85338 custom/陕西万众-薪资账套薪资核算配置 2024-01-05 14:47:08 +08:00
黎永顺 08d4ed70ba custom/陕西万众-薪资账套薪资核算配置 2024-01-05 10:33:24 +08:00
黎永顺 f808856de6 Merge branch 'hotfix/2.9.10.2312.02' into custom/陕西万众-薪资账套薪资核算配置 2024-01-05 09:24:02 +08:00
黎永顺 6a8a9f95ed custom/陕西万众-薪资账套薪资核算配置 2024-01-03 11:26:44 +08:00
黎永顺 18b7140f4b custom/陕西万众-薪资账套薪资核算配置 2024-01-03 09:17:04 +08:00
黎永顺 2193d35502 custom/陕西万众-薪资账套薪资核算配置 2024-01-02 16:37:30 +08:00
黎永顺 0162ec0369 custom/陕西万众-薪资账套薪资核算配置 2024-01-02 15:53:18 +08:00
黎永顺 5340dba06d custom/陕西万众-薪资账套薪资核算配置 2023-12-29 16:45:37 +08:00
24 changed files with 618 additions and 37 deletions

View File

@ -292,3 +292,19 @@ export const updateSobConfig = params => {
};
//陕西万众-保存或新建模板
export const saveTemplate = (params) => {
return postFetch("/api/bs/hrmsalary/salaryacct/acctresult/saveTemplate", params);
};
// 陕西万众-获取所有的模板信息
export const getListTemplate = (params) => {
return WeaTools.callApi("/api/bs/hrmsalary/salaryacct/acctresult/listTemplate", "get", params);
};
// 陕西万众-删除模板
export const deleteTemplate = (params) => {
return WeaTools.callApi("/api/bs/hrmsalary/salaryacct/acctresult/deleteTemplate", "get", params);
};
// 陕西万众-获取单个核算模板信息
export const getTemplateForm = (params) => {
return WeaTools.callApi("/api/bs/hrmsalary/salaryacct/acctresult/templateForm", "get", params);
};

View File

@ -0,0 +1,6 @@
import { postFetch } from "../../util/request";
//万众-报表
export const getDHSalaryReportList = params => {
return postFetch("/api/bs/hrmsalary/salaryacct/dhSalaryReport/list", params);
};

View File

@ -171,3 +171,7 @@ export const salaryApprovalSaveForm = params => {
export const getListSalaryItem = params => {
return postFetch("/api/bs/hrmsalary/salarysob/salaryApproval/listSalaryItem", params);
};
//陕西万众-将薪资项目的流程设置同步到其他薪资账套中
export const syncWorkflowSetting = params => {
return postFetch("/api/bs/hrmsalary/salarysob/item/syncWorkflowSetting", params);
};

View File

@ -54,6 +54,8 @@ import TopologyMap from "./pages/topologyMap";
import SupplementaryCalc from "./pages/supplementaryCalc";
import VariableSalary from "./pages/variableSalary";
import Layout from "./layout";
import CustomRoutes from "./pages/custom-pages";
import stores from "./stores";
import "./style/index";
// 读取系统多语言配置
@ -118,6 +120,7 @@ const Routes = (
<Route key="topologyView" path="topologyView/:salarySobId/:salaryItemId" component={TopologyMap}/>
<Route key="supplementaryCalc" path="supplementaryCalc" component={SupplementaryCalc}/>
<Route key="variableSalary" path="variableSalary" component={VariableSalary}/>
{CustomRoutes}
</Route>
);

View File

@ -174,3 +174,24 @@ export const batchUpdateConditions = [
title: ""
}
];
//陕西万众-薪资核算创建模板
export const sxwzTempConditions = [
{
items: [
{
colSpan: 1,
conditionType: "INPUT",
domkey: ["templateName"],
fieldcol: 14,
label: "模板名称",
lanId: 111,
labelcol: 6,
rules: "required|string",
value: "",
viewAttr: 3
}
],
defaultshow: true,
title: ""
}
];

View File

@ -248,11 +248,12 @@ class EditCalcTable extends Component {
const { pageInfo } = this.state;
const {
calculateStore: { ECSearchForm, otherConditions }, routeParams: { salaryAcctRecordId },
calcDetail = false
calcDetail = false, selectedKey
} = this.props;
const [__, templateId] = selectedKey.split("%%");
const { subcompanyIds, departmentIds, positionIds, statuses, ...extra } = ECSearchForm.getFormParams();
const payload = {
salaryAcctRecordId, ...pageInfo, ...extra, otherConditions,
salaryAcctRecordId, ...pageInfo, ...extra, otherConditions, templateId,
departmentIds: !_.isEmpty(departmentIds) ? departmentIds.split(",") : [],
positionIds: !_.isEmpty(positionIds) ? positionIds.split(",") : [],
subcompanyIds: !_.isEmpty(subcompanyIds) ? subcompanyIds.split(",") : [],

View File

@ -5,13 +5,15 @@
* Date: 2023/9/14
*/
import React, { Component } from "react";
import { WeaHelpfulTip, WeaLocaleProvider } from "ecCom";
import { getColumnDesc, getSalarySobCycle } from "../../../../../apis/calculate";
import { WeaButtonIcon, WeaHelpfulTip, WeaLocaleProvider, WeaTab } from "ecCom";
import { message, Modal } from "antd";
import { deleteTemplate, getColumnDesc, getListTemplate, getSalarySobCycle } from "../../../../../apis/calculate";
import { sysConfCodeRule } from "../../../../../apis/ruleconfig";
import EditCalcAdvanceSearchPannel from "./editCalcAdvanceSearchPannel";
import EditCalcTable from "./editCalcTable";
import SalaryMonthTip from "../salaryMonthTip";
import SalaryCalcLayout from "./salaryCalcLayout";
import SxwzEstablishTempDialog from "./sxwzEstablishTempDialog";
import cs from "classnames";
import "./index.less";
@ -21,8 +23,12 @@ class Index extends Component {
constructor(props) {
super(props);
this.state = {
salarySobCycle: {}, showSearchAd: false,
columnDesc: {}, formulaTd: "", showTotalCell: false
salarySobCycle: {}, showSearchAd: false, selectedKey: "calc%%",
columnDesc: {}, formulaTd: "", showTotalCell: false,
sxwzTemplDialog: { visible: false, salaryAcctRecordId: "", title: "", templateId: "" },
tabInfo: [
{ tabKey: "calc%%", title: getLabel(111, "默认"), editable: false }
]
};
}
@ -31,16 +37,26 @@ class Index extends Component {
this.calcTableRef.wrappedInstance.handleQuery();
bool && this.openAdvanceSearch();
};
init = async () => {
init = async (isRefresh) => {
const { routeParams: { salaryAcctRecordId } } = this.props;
const [salarySobCycle, columnDesc, confCode] = await Promise.all([
const [salarySobCycle, columnDesc, confCode, sxwzTempl] = await Promise.all([
getSalarySobCycle({ salaryAcctRecordId }), getColumnDesc({ salaryAcctRecordId }),
sysConfCodeRule({ code: "OPEN_ACCT_RESULT_SUM" })
sysConfCodeRule({ code: "OPEN_ACCT_RESULT_SUM" }), getListTemplate()
]);
if (salarySobCycle.status && columnDesc.status && confCode.status) {
if (salarySobCycle.status && columnDesc.status && confCode.status && sxwzTempl.status) {
this.setState({
salarySobCycle: salarySobCycle.data,
columnDesc: columnDesc.data, showTotalCell: confCode.data === "1"
columnDesc: columnDesc.data, showTotalCell: confCode.data === "1",
tabInfo: [
{ tabKey: "calc%%", title: getLabel(111, "默认"), editable: false },
..._.map(sxwzTempl.data, g => ({
tabKey: `${g.templateName}%%${g.id}`, title: g.templateName, editable: true
}))
]
}, () => {
!_.isNil(isRefresh) && this.setState({
selectedKey: isRefresh ? this.state.selectedKey : _.last(this.state.tabInfo).tabKey
}, () => this.calcTableRef.wrappedInstance.queryCalcResultList());
});
}
};
@ -48,24 +64,70 @@ class Index extends Component {
handleBatchEditing = (editable) => {
this.calcTableRef.wrappedInstance.handleBatchEditing(editable);
};
handleTabEdit = (tabKey, type) => {
const { sxwzTemplDialog } = this.state;
const { routeParams: { salaryAcctRecordId } } = this.props;
if (type === "remove") {
const [__, templateId] = tabKey.split("%%");
Modal.confirm({
title: getLabel(131329, "信息确认"), content: getLabel(111, "确认删除吗?"),
onOk: () => {
message.destroy();
message.loading("正在删除中...", 0);
deleteTemplate({ templateId }).then(({ status, errormsg }) => {
message.destroy();
if (status) {
message.success(getLabel(502230, "删除成功"));
const promise = this.init();
this.setState({ selectedKey: "calc%%" }, () => {
this.calcTableRef.wrappedInstance.queryCalcResultList();
});
} else {
message.error(errormsg);
}
}).catch(() => message.destroy());
}
});
} else if ((type === "add" || type === "edit") && tabKey !== "calc%%") {
const [__, templateId] = tabKey ? tabKey.split("%%") : ["", ""];
this.setState({
sxwzTemplDialog: {
...sxwzTemplDialog, visible: true, salaryAcctRecordId,
templateId: type === "edit" ? templateId : "",
title: type === "edit" ? getLabel(501169, "编辑") : getLabel(1421, "新增")
}
});
}
};
render() {
const { salarySobCycle, showSearchAd, formulaTd, columnDesc, showTotalCell } = this.state;
const {
salarySobCycle, showSearchAd, formulaTd, columnDesc, showTotalCell,
selectedKey, tabInfo, sxwzTemplDialog
} = this.state;
const { routeParams: { salaryAcctRecordId } } = this.props;
const formulaObj = _.get(columnDesc, [formulaTd]) || {};
return (<SalaryCalcLayout {...this.props} init={this.init} onConfirm={() => this.onAdSearch(false)}>
<div className="salary-edit-calc-content">
<div className="salary-flex-between weapp-salary-tb-tip">
<div>
<span>{getLabel(542604, "薪资所属月")}</span>
<span>{salarySobCycle.salaryMonth}</span>
<WeaHelpfulTip
width={200} placement="topLeft"
title={<SalaryMonthTip {...salarySobCycle}/>}
style={{ marginLeft: 10 }}
/>
</div>
<div></div>
<div className="sxwz-tab-edit-wrapper">
<WeaTab
datas={tabInfo} keyParam="tabKey" selectedKey={selectedKey} showAddBtn
buttons={[
<WeaButtonIcon buttonType="batchEdit" type="primary"
onClick={() => this.handleTabEdit(selectedKey, "edit")}/>,
<div>
<span>{getLabel(542604, "薪资所属月")}</span>
<span>{salarySobCycle.salaryMonth}</span>
<WeaHelpfulTip
width={200} placement="topLeft"
title={<SalaryMonthTip {...salarySobCycle}/>}
style={{ marginLeft: 10 }}
/>
</div>]} leftStyle={{ width: "calc(100% - 180px)" }}
type="editable-inline" onEdit={this.handleTabEdit}
onChange={(v) => this.setState({ selectedKey: v }, () => this.calcTableRef.wrappedInstance.queryCalcResultList())}
/>
</div>
<div className="salary-flex-between formula-detail-area">
<div className="formula-detail">
@ -84,9 +146,17 @@ class Index extends Component {
onAdSearch={this.onAdSearch}
/>
</div>
<EditCalcTable ref={dom => this.calcTableRef = dom} salarySobId={salarySobCycle.salarySobId}
<EditCalcTable ref={dom => this.calcTableRef = dom} selectedKey={selectedKey}
salarySobId={salarySobCycle.salarySobId}
{...this.props} showTotalCell={showTotalCell}
onShowFormulaTd={this.handleShowFormulaTa}/>
{/*陕西万众项目-创建薪资核算模板弹框*/}
<SxwzEstablishTempDialog {...sxwzTemplDialog}
onCancel={(isRefresh) => this.setState({
sxwzTemplDialog: { ...sxwzTemplDialog, visible: false, templateId: "" }
}, () => {
!_.isNil(isRefresh) && this.init(isRefresh);
})}/>
</div>
</SalaryCalcLayout>);
}

View File

@ -2,6 +2,12 @@
height: 100%;
display: flex;
flex-direction: column;
//陕西万众
.sxwz-tab-edit-wrapper {
.wea-tab .wea-tab-right {
background: transparent;
}
}
.salary-flex-between {
display: flex;

View File

@ -0,0 +1,172 @@
/*
* Author: 黎永顺
* name:陕西万众-创建模板
* Description:
* Date: 2024/1/5
*/
import React, { Component } from "react";
import { inject, observer } from "mobx-react";
import { WeaDialog, WeaFormItem, WeaLocaleProvider, WeaSearchGroup } from "ecCom";
import { WeaSwitch } from "comsMobx";
import { Badge, Button, message } from "antd";
import { sxwzTempConditions } from "./condition";
import AddHeaderFieldsModal from "../../../../calculateDetail/acctResult/importModal/addHeaderFieldsModal";
import { getImportField, getTemplateForm, saveTemplate } from "../../../../../apis/calculate";
import cs from "classnames";
const getLabel = WeaLocaleProvider.getLabel;
@inject("calculateStore")
@observer
class SxwzEstablishTempDialog extends Component {
constructor(props) {
super(props);
this.state = {
loading: false, conditions: [],
headerFieldsDialog: {
visible: false, itemsByGroup: [], selectItems: "", title: getLabel(542362, "薪资项目")
}
};
}
async componentWillReceiveProps(nextProps, nextContext) {
const { calculateStore: { tmplForm, initTmplForm }, salaryAcctRecordId, templateId } = nextProps;
if (nextProps.visible !== this.props.visible && nextProps.visible) {
const { data } = await getImportField({ salaryAcctRecordId });
const { data: formData } = templateId ?
await getTemplateForm({ templateId, salaryAcctRecordId }) :
{ data: {} };
const { itemsByGroup } = data;
this.setState({
conditions: _.map(sxwzTempConditions, item => ({
...item, items: _.map(item.items, o => {
return { ...o, label: getLabel(o.lanId, o.label) };
})
})),
headerFieldsDialog: {
...this.state.headerFieldsDialog,
itemsByGroup: _.map(itemsByGroup, item => {
return {
...item,
salaryItems: _.map(item.salaryItems, it => ({
...it,
checked: false
}))
};
}),
selectItems: formData.salaryItemIds || ""
}
}, () => {
tmplForm.initFormFields(this.state.conditions);
tmplForm.updateFields({
templateName: formData.templateName || ""
});
});
} else {
this.setState({
loading: false,
headerFieldsDialog: {
...this.state.headerFieldsDialog, selectItems: ""
}
}, () => {
initTmplForm();
});
}
}
renderTempForm = (form, condition) => {
const { selectItems } = this.state.headerFieldsDialog;
const { isFormInit } = form;
const formParams = form.getFormParams();
let group = [];
isFormInit && condition && condition.map(c => {
let items = [
{
com: (<WeaFormItem label={getLabel(542362, "薪资项目")} labelCol={{ span: 6 }}
wrapperCol={{ span: 14 }}>
<Badge count={!_.isEmpty(selectItems) ? selectItems.split(",").length : 0}>
<Button className={cs({ required: _.isEmpty(selectItems) })} type="ghost" onClick={() => this.setState({
headerFieldsDialog: { ...this.state.headerFieldsDialog, visible: true }
})}>{getLabel(111, "选择薪资项目")}</Button>
</Badge>
</WeaFormItem>)
}
];
c.items.map(fields => {
items.unshift({
com: (
<WeaFormItem label={`${fields.label}`} labelCol={{ span: `${fields.labelcol}` }}
wrapperCol={{ span: `${fields.fieldcol}` }} error={form.getError(fields)}
tipPosition="bottom">
<WeaSwitch fieldConfig={fields} form={form} formParams={formParams}/>
</WeaFormItem>),
colSpan: 1
});
});
group.push(
<WeaSearchGroup col={1} needTigger={true} title={c.title} showGroup={c.defaultshow}
items={items}
/>);
});
return group;
};
save = () => {
const { headerFieldsDialog } = this.state;
const { calculateStore: { tmplForm }, templateId: id } = this.props;
tmplForm.validateForm().then(f => {
if (f.isValid) {
const { selectItems } = headerFieldsDialog;
if (_.isEmpty(selectItems)) {
message.warning(getLabel(543598, "请选择薪资项目"));
return;
}
const payload = {
...tmplForm.getFormParams(), id,
salaryItemIdList: selectItems.split(",")
};
this.setState({ loading: true });
saveTemplate(payload).then(({ status, errormsg }) => {
this.setState({ loading: false });
if (status) {
message.success(getLabel(30700, "操作成功"));
this.props.onCancel(Boolean(id));
} else {
message.error(errormsg);
}
}).catch(() => this.setState({ loading: false }));
} else {
f.showErrors();
}
});
};
render() {
const { conditions, loading, headerFieldsDialog } = this.state;
const { calculateStore: { tmplForm } } = this.props;
return (
<WeaDialog
{...this.props} style={{ width: 480, height: 128 }} initLoadCss
buttons={[
<Button type="primary" onClick={this.save} loading={loading}>{getLabel(826, "确定")}</Button>
]}
>
<div className="calculate-dialog-layout">{this.renderTempForm(tmplForm, conditions)}</div>
{/*薪资项目列表选择弹框*/}
<AddHeaderFieldsModal
{...headerFieldsDialog}
onCancel={() => this.setState({
headerFieldsDialog: { ...headerFieldsDialog, visible: false }
})}
onAdd={selectItems => this.setState({
headerFieldsDialog: {
...headerFieldsDialog, visible: false, selectItems: selectItems.join(",")
}
}, () => {
})}
/>
</WeaDialog>
);
}
}
export default SxwzEstablishTempDialog;

View File

@ -37,7 +37,6 @@ class Index extends Component {
salaryImpDialog: { visible: false, title: "", salaryAcctRecordId: "" },
approvalInfo: {},//审批信息,
accountExceptInfo: "" //核算报错信息,
};
this.calc = null;
this.timer = null;
@ -224,7 +223,7 @@ class Index extends Component {
{ key: "calc", title: getLabel(538011, "薪资核算") }
];
const { calculateStore: { setOtherConditions } } = this.props;
const { selectedKey, progressVisible, progress, customExpDialog, salaryImpDialog } = this.state;
const { selectedKey, progressVisible, progress, customExpDialog, salaryImpDialog, sxwzVisible } = this.state;
return (
<Layout {...this.props} init={this.init}>
<div className="salary-calculate-do-calc">

View File

@ -107,6 +107,20 @@
.wea-search-group {
padding: 16px;
button.required:after {
content: "*";
position: absolute;
top: 50%;
width: 9px;
height: 9px;
margin-top: -5px;
right: -14px;
color: transparent;
background-image: url("/images/BacoError_wev9.png");
background-repeat: no-repeat;
background-position: 50%;
}
}
.wea-select, .ant-select-selection, .ant-select {

View File

@ -77,7 +77,7 @@ class AddHeaderFieldsModal extends Component {
return (
<WeaDialog
{...this.props} hasScroll initLoadCss
scalable title={getLabel(111, "添加表头字段")}
scalable title={this.props.title || getLabel(111, "添加表头字段")}
style={{ width: 700, height: 484 }} className="addHeaderFieldsWrapper"
buttons={[
<Button type="primary" onClick={() => this.props.onAdd(itemsCheckeds)}>{getLabel(111, "添加")}</Button>,

View File

@ -0,0 +1,9 @@
import React from "react";
import Route from "react-router/lib/Route";
import ProvisionReport from "./wz/provisionReport";
const CustomRoutes = [
<Route key="customPage_provisionReport_wz" path="customPage_provisionReport_wz" component={ProvisionReport}/>
];
export default CustomRoutes;

View File

@ -0,0 +1,80 @@
import React, { Component } from "react";
import { WeaDatePicker, WeaLocaleProvider, WeaTable, WeaTop } from "ecCom";
import { getDHSalaryReportList } from "../../../../apis/custom-apis/wz_api";
import { Button } from "antd";
import moment from "moment";
import "./index.less";
import { convertToUrlString } from "../../../../util/url";
const getLabel = WeaLocaleProvider.getLabel;
class Index extends Component {
constructor(props) {
super(props);
this.state = {
startMonthStr: moment().format("YYYY-MM"), dataSource: [], columns: [], loading: false
};
}
componentDidMount() {
this.getDHSalaryReportList();
}
getDHSalaryReportList = () => {
this.setState({ loading: true });
getDHSalaryReportList({ startMonthStr: this.state.startMonthStr }).then(({ status, data }) => {
this.setState({ loading: false });
if (status) {
const { data: dataSource, column } = data;
this.setState({
dataSource, columns: _.map(column, it => {
const { column } = it;
if (column !== "rylx") {
return { dataIndex: column, title: it.text, width: it.width };
} else {
return {
dataIndex: column, title: it.text, width: it.width,
render: (value, row, index) => {
const obj = {
children: value,
props: {}
};
const mergeList = _.filter(dataSource, o => o.rylx === row.rylx);
if (index === 0 || dataSource[index - 1].rylx !== row.rylx) {
obj.props.rowSpan = mergeList.length;
} else {
obj.props.rowSpan = 0;
}
return obj;
}
};
}
})
});
}
});
};
handleExportSalaryReport = () => {
window.open(`/api/bs/hrmsalary/salaryacct/dhSalaryReport/export?${convertToUrlString({ startMonthStr: this.state.startMonthStr })}`, "_blank");
};
render() {
const { startMonthStr, dataSource, columns, loading } = this.state;
return (<WeaTop
title={getLabel(111, "月度工资计提表-财务使用")} buttonSpace={10} className="provisionReport_wz"
icon={<i className="icon-coms-fa"/>} iconBgcolor="#F14A2D"
buttons={[
<WeaDatePicker value={startMonthStr} format="YYYY-MM"
onChange={val => this.setState({ startMonthStr: val }, () => this.getDHSalaryReportList())}/>,
<Button type="primary" onClick={this.handleExportSalaryReport}>{getLabel(111, "导出")}</Button>
]}>
<div className="provisionReport_wz_content">
<WeaTable dataSource={dataSource} columns={columns} pagination={false} bordered loading={loading}
scroll={{ y: `calc(100vh - 100px)` }}/>
</div>
</WeaTop>);
}
}
export default Index;

View File

@ -0,0 +1,16 @@
.provisionReport_wz {
.provisionReport_wz_content {
width: 100%;
height: 100%;
background: #f6f6f6;
padding: 8px 16px 0 16px;
.wea-new-table {
background: #FFF;
table td {
padding-left: 8px !important;
}
}
}
}

View File

@ -187,6 +187,11 @@
.wea-search-group {
padding-left: 0;
padding-right: 0;
margin-bottom: 16px;
.wea-form-cell {
padding: 0;
}
}
.titleNormalWrapper {

View File

@ -40,7 +40,9 @@ class LedgerBaseSetting extends Component {
attendCycleFromDay: "1",
socialSecurityCycleType: "3",
description: "",
canEdit: false
canEdit: false,
// 陕西万众二开: 工资单审批流程地址
wzApprovalUrl: ""
}
};
}
@ -79,7 +81,8 @@ class LedgerBaseSetting extends Component {
attendCycleFromDay: "1",
socialSecurityCycleType: "3",
description: "",
canEdit: "true"
canEdit: "true",
wzApprovalUrl: ""
}
});
};
@ -176,8 +179,8 @@ class LedgerBaseSetting extends Component {
>
{
type === "INPUT" ?
<WeaInput value={settingBaseInfo[key]} viewAttr={3} disabled={canEdit !== "true"}
onChange={(v) => this.handleChangeField(key, v)}/> :
<WeaInput value={settingBaseInfo[key]} viewAttr={key !== "wzApprovalUrl" ? 3 : 2}
disabled={canEdit !== "true"} onChange={(v) => this.handleChangeField(key, v)}/> :
type === "TEXTAREA" ?
<WeaTextarea value={settingBaseInfo[key]} disabled={canEdit !== "true"}
onChange={(v) => this.handleChangeField(key, v)}/> :

View File

@ -5,19 +5,119 @@
* Date: 2023/07/19
*/
import React, { Component } from "react";
import { WeaLocaleProvider, WeaSlideModal } from "ecCom";
import { inject, observer } from "mobx-react";
import { WeaSwitch } from "comsMobx";
import { WeaFormItem, WeaLocaleProvider, WeaSearchGroup, WeaSlideModal } from "ecCom";
import { Button, message } from "antd";
import SyncToSalaryAccountSetDialog from "../../salaryItem/syncToSalaryAccountSetDialog";
import SlideModalTitle from "../../../components/slideModalTitle";
import SalaryItemForm from "../../salaryItem/salaryItemForm";
import { sxwzApprovalConditions } from "../config";
import { getConditionDomkeys } from "../../../util";
import { syncWorkflowSetting } from "../../../apis/ledger";
import "./index.less";
const getLabel = WeaLocaleProvider.getLabel;
@inject("ledgerStore", "salaryItemStore")
@observer
class LedgerSalaryItemEditSlide extends Component {
constructor(props) {
super(props);
this.state = {};
this.state = {
conditions: [], loading: false,
syncSalarySetDialog: { visible: false, title: "", id: "" }
};
}
componentWillReceiveProps(nextProps, nextContext) {
if (nextProps.visible !== this.props.visible && nextProps.visible) {
const { ledgerStore: { sxwzForm }, record } = nextProps;
const { salaryItemId: id } = record;
this.setState({
syncSalarySetDialog: { ...this.state.syncSalarySetDialog, id },
conditions: _.map(sxwzApprovalConditions, item => {
return {
...item, title: getLabel(111, "审批配置"),
items: _.map(item.items, o => ({ ...o, label: getLabel(o.lanId, o.label) }))
};
})
}, () => {
const { request } = nextProps;
sxwzForm.initFormFields(this.state.conditions);
_.forEach(getConditionDomkeys(this.state.conditions), g => {
sxwzForm.updateFields({ [g]: request[g] || "" });
});
});
}
}
save = () => {
const { syncSalarySetDialog } = this.state;
const { id: salaryItemId } = syncSalarySetDialog;
const { salaryItemStore: { salarySetform }, ledgerStore: { sxwzForm } } = this.props;
salarySetform.validateForm().then(f => {
if (f.isValid) {
const { salarySobIds } = salarySetform.getFormParams();
this.setState({ loading: true });
syncWorkflowSetting({ salaryItemId, salarySobIds: salarySobIds.split(","), ...sxwzForm.getFormParams() })
.then(({ status, errormsg }) => {
this.setState({ loading: false });
if (status) {
message.success(getLabel(38462, "同步成功!"));
this.setState({
syncSalarySetDialog: {
...this.state.syncSalarySetDialog,
visible: false
}
});
} else {
message.error(errormsg || getLabel(81556, "同步失败!"));
}
}).catch(() => this.setState({ loading: false }));
} else {
f.showErrors();
}
});
};
/*
* Author: 黎永顺
* Description: 陕西万众-审批配置渲染表单
* Params:
* Date: 2023/12/29
*/
renderSxwzForm = (form, condition) => {
const { isFormInit } = form, formParams = form.getFormParams();
let group = [];
isFormInit && condition && condition.map(c => {
let items = [];
c.items.map(fields => {
items.push({
com: (
<WeaFormItem label={`${fields.label}`} labelCol={{ span: `${fields.labelcol}` }}
wrapperCol={{ span: `${fields.fieldcol}` }} error={form.getError(fields)}
tipPosition="bottom"
>
<WeaSwitch fieldConfig={fields} form={form} formParams={formParams}/>
</WeaFormItem>),
colSpan: 1,
hide: fields.hide
});
});
group.push(
<WeaSearchGroup col={1} needTigger={true} title={c.title}
showGroup={c.defaultshow} items={items} center={false}
customComponent={<Button type="primary" onClick={() => this.setState({
syncSalarySetDialog: {
...this.state.syncSalarySetDialog,
visible: true, title: getLabel(111, "请选择薪资账套")
}
})}>{getLabel(111, "同步审批信息至账套")}</Button>}
/>);
});
return group;
};
handleChange = (params) => {
const request = { ...this.props.request, ...params };
const key = Object.keys(params)[0];
@ -26,6 +126,8 @@ class LedgerSalaryItemEditSlide extends Component {
handleShowFormal = (salaryItemName) => this.props.onEditFormnul(salaryItemName);
render() {
const { conditions } = this.state;
const { ledgerStore: { sxwzForm } } = this.props;
return (
<WeaSlideModal
{...this.props}
@ -47,6 +149,19 @@ class LedgerSalaryItemEditSlide extends Component {
onChangeFieldsItem={this.handleChange} onShowFormal={this.handleShowFormal}
/>
}
{/*陕西万众-流程审批配置*/}
{this.renderSxwzForm(sxwzForm, conditions)}
<SyncToSalaryAccountSetDialog
{...this.state.syncSalarySetDialog}
buttons={[<Button type="primary" onClick={this.save}
loading={this.state.loading}>{getLabel(537558, "确定")}</Button>]}
onCancel={() => this.setState({
syncSalarySetDialog: {
...this.state.syncSalarySetDialog,
visible: false, title: ""
}
})}
/>
</div>
}
/>

View File

@ -5,6 +5,7 @@
* Date: 2022/12/13
*/
import React, { Component } from "react";
import { inject, observer } from "mobx-react";
import { WeaCheckbox, WeaHelpfulTip, WeaLocaleProvider, WeaTable } from "ecCom";
import LedgerSalaryItemEditSlide from "./ledgerSalaryItemEditSlide";
import { getSalaryItemForm } from "../../../apis/ledger";
@ -14,6 +15,8 @@ import { toDecimal_n } from "../../../util";
const getLabel = WeaLocaleProvider.getLabel;
@inject("ledgerStore")
@observer
class LedgerSalaryItemTable extends Component {
constructor(props) {
super(props);
@ -147,6 +150,7 @@ class LedgerSalaryItemTable extends Component {
* Date: 2023/7/19
*/
handleSaveItem = () => {
const { ledgerStore: { sxwzForm } } = this.props;
const { salaryItemPayload } = this.state;
const { request, record } = salaryItemPayload;
this.setState({
@ -158,6 +162,7 @@ class LedgerSalaryItemTable extends Component {
originFormulaContent, originSqlContent, formulaId, dataType
} = request;
this.handleChangeSalaryItem({
...sxwzForm.getFormParams(),
itemHide: hideDefault.toString(),
defaultValue: dataType === "number" ? toDecimal_n(defaultValue, parseInt(pattern)) : defaultValue,
roundingMode, pattern, valueType,

View File

@ -57,7 +57,7 @@ class LedgerSlide extends Component {
saveLedgerBasic = () => {
const { baseSettingInfo, current } = this.state;
const { editId } = this.props;
const { description, canEdit, ...extra } = baseSettingInfo;
const { description, canEdit, wzApprovalUrl, ...extra } = baseSettingInfo;
const bool = _.every(Object.keys(extra), key => !!extra[key]);
if (!bool || _.isEmpty(baseSettingInfo)) {
Modal.warning({
@ -67,7 +67,7 @@ class LedgerSlide extends Component {
return false;
}
this.setState({ loading: true });
saveLedgerBasic({ ...extra, description, id: editId }).then(({ status, data, errormsg }) => {
saveLedgerBasic({ ...extra, description, id: editId, wzApprovalUrl }).then(({ status, data, errormsg }) => {
this.setState({ loading: false });
if (status) {
const { onRefreshList } = this.props;

View File

@ -556,6 +556,11 @@ export const baseSettingFormItem = [
key: "description",
label: "备注",
type: "TEXTAREA"
},
{
key: "wzApprovalUrl",
label: "发放审批流程地址",
type: "INPUT"
}
];
export const monthDays = [
@ -857,3 +862,31 @@ export const classifyConditions = [
defaultshow: true
}
];
//陕西万众-薪资账套中薪资项目的审批配置项
export const sxwzApprovalConditions = [
{
items: [
{
conditionType: "SWITCH",
domkey: ["showInWorkflow"],
fieldcol: 14,
label: "审批时展示",
lanId: 111,
labelcol: 6,
value: "",
viewAttr: 2
},
{
conditionType: "SWITCH",
domkey: ["sumInWorkflow"],
fieldcol: 14,
label: "审批时求和",
lanId: 111,
labelcol: 6,
value: "",
viewAttr: 2
}
],
defaultshow: true
}
];

View File

@ -74,13 +74,13 @@ class SyncToSalaryAccountSetDialog extends Component {
};
render() {
const { salaryItemStore: { salarySetform } } = this.props;
const { salaryItemStore: { salarySetform }, buttons } = this.props;
const { conditions } = this.state;
return (
<WeaDialog
{...this.props} className="salarySetDialog" initLoadCss title={getLabel(111, "请选择薪资账套")}
style={{ width: 480, height: _.reduce(conditions, (pre, cur) => (pre += cur.items.length), 0) * 47 + 33 }}
buttons={[<Button type="primary" onClick={this.save}
buttons={buttons || [<Button type="primary" onClick={this.save}
loading={this.state.loading}>{getLabel(537558, "确定")}</Button>]}
>
<div className="salarySetDialogContent"> {getSearchs(salarySetform, conditions, 1, false)} </div>

View File

@ -16,6 +16,8 @@ export class calculateStore {
@action initBatchUpdateForm = () => this.batchUpdateForm = new WeaForm();
@observable tempForm = new WeaForm(); //导出模板设置-模板form
@action initTempForm = () => this.tempForm = new WeaForm();
@observable tmplForm = new WeaForm(); //陕西万众项目-创建薪资核算模板form
@action initTmplForm = () => this.tmplForm = new WeaForm();
@observable tableStore = new TableStore(); // new table
@observable form = new WeaForm(); // nrew 一个form

View File

@ -17,6 +17,7 @@ export class LedgerStore {
@action initAARForm = (v) => this.AARForm = new WeaForm();//重置核算审批规则form
@action initAARClassifyForm = (v) => this.AARClassifyForm = new WeaForm();//重置审批规则分类编辑form
@observable sxwzForm = new WeaForm(); // 陕西万众-审批配置form
/*******************************************************/