部门编号设置

This commit is contained in:
liyongshun 2022-06-06 14:01:41 +08:00
parent f3877c843f
commit 204613099a
6 changed files with 194 additions and 15 deletions

View File

@ -2,7 +2,7 @@
* Author: 黎永顺
* Description: 分部编号设置
* Date: 2022-05-17 14:30:57
* LastEditTime: 2022-05-30 10:23:18
* LastEditTime: 2022-06-06 09:42:23
*/
import React, { Component, Fragment } from "react";
import { Button } from "antd";

View File

@ -1,9 +1,11 @@
.branch-wapper {
.branch-wapper,
.dept-number-set {
height: 100%;
display: flex;
flex-direction: column;
.branch-content {
.branch-content,
.dept-content {
flex: 1;
overflow: hidden auto;
@ -16,6 +18,23 @@
background: #f7fbfe;
}
.codeNumbering {
.codeNumbering-operateWapper {
display: flex;
align-items: center;
.wea-select {
width: inherit !important;
margin-left: 8px;
}
.wea-helpful-tip {
margin-left: 8px;
margin-top: 3px;
}
}
}
.numberComposition {
.preview {
margin-top: 20px;

View File

@ -0,0 +1,154 @@
/*
* Author: 黎永顺
* Description: 部门编号设
* Date: 2022-06-06 09:37:39
* LastEditTime: 2022-06-06 10:26:35
*/
import React, { Component, Fragment } from "react";
import { Button } from "antd";
import {
WeaTop,
WeaFormItem,
WeaCheckbox,
WeaSearchGroup,
WeaSelect,
WeaHelpfulTip,
} from "ecCom";
import StartReservedNumberSet from "../branchNumSetting/components/startReservedNumberSet";
import NumberComposition from "../branchNumSetting/components/numberComposition";
import { i18n } from "../../public/i18n";
import "../branchNumSetting/index.less";
export default class DeptNumberSet extends Component {
constructor() {
super();
this.state = {
checkVal: "0",
isSingle: "0", //是否单独流水
singleDate: "month", //日期单独流水
};
}
/**
* name:提示文本
* return {*}
*/
helpContent = () => {
return (
<div>
<p>开启后可根据设置的部门编号规则自动生成部门编号涉及场景如下</p>
<p>1.手动新建和手动编辑部门时可选择重新生成编号和选择预留部门编号</p>
<p>2.导入人员-添加时新创建的部门可自动生成部门编号</p>
<p>3.组织结构导入-添加新部门且部门编号列为空时可自动生成部门编号</p>
<p>注意开启前请先确认部门编号字段已启用</p>
</div>
);
};
render() {
const { checkVal, isSingle, singleDate } = this.state;
const btns = [<Button type="primary">保存</Button>];
const dropMenuDatas = [
{
key: "save",
disabled: false,
icon: <i className="icon-coms-Preservation" />,
content: "保存",
onClick: (key) => alert(`点击了搜索 key = ${key}`),
},
];
const options = [
{
key: "month",
selected: false,
showname: "月",
},
{
key: "day",
selected: true,
showname: "日",
},
];
return (
<div className="dept-number-set">
<WeaTop
title={i18n.label.deptNumSetting()}
icon={<i className="icon-coms-hrm" />}
iconBgcolor="#217346"
buttons={btns}
showDropIcon={true}
dropMenuDatas={dropMenuDatas}
/>
<div className="dept-content">
<div className="switch-wrapper">
<WeaFormItem
label="部门编号自动生成"
labelCol={{ span: 8 }}
wrapperCol={{ span: 16 }}>
<WeaCheckbox
value={checkVal}
helpfulTip={this.helpContent}
helpfulTipProps={{ placement: "top" }}
display="switch"
id="num-set-switch"
onChange={(checkVal) => this.setState({ checkVal })}
/>
</WeaFormItem>
</div>
{/* 内容区 */}
{checkVal === "1" && (
<Fragment>
<div className="numberComposition">
<WeaSearchGroup title={"编号组成"} showGroup>
<NumberComposition />
</WeaSearchGroup>
</div>
<div className="codeNumbering">
<WeaSearchGroup title={"编号流水规则"} showGroup>
<div className="switch-wrapper">
<WeaFormItem
label="日期单独流水"
labelCol={{ span: 8 }}
wrapperCol={{ span: 16 }}>
<div className="codeNumbering-operateWapper">
<WeaCheckbox
value={isSingle}
display="switch"
id="dept-date-set-switch"
onChange={(isSingle) => this.setState({ isSingle })}
/>
{isSingle == "1" && (
<WeaSelect
options={options}
value={singleDate}
detailtype={3}
supportCancel
onChange={(v, showname) => {
console.log("v", v, "showname", showname);
}}
/>
)}
<WeaHelpfulTip
width={200}
title="开启后可设置按年、按月或按天单独流水如设置按年单独流水那每年的1月1日开始流水号从001开始重新流水。"
placement="topLeft"
/>
</div>
</WeaFormItem>
</div>
</WeaSearchGroup>
</div>
<div className="startReservedNumberSet">
<WeaSearchGroup
title={"起始编号及预留编号设置"}
showGroup
center>
<StartReservedNumberSet />
</WeaSearchGroup>
</div>
</Fragment>
)}
</div>
</div>
);
}
}

View File

@ -12,8 +12,9 @@ import Group from "./components/group/Group";
import OfficeManage from "./components/office/officeManage";
import CompanyExtend from "./components/company/CompanyExtend";
import BranchNumSetting from "./components/branchNumSetting";
import DeptNumberSet from "./components/deptNumberSet";
import Company from "./components/company/company";
import DepartmentManage from "./components/deptment";
import DepartmentManage from "./components/department/department";
import StaffScheme from "./components/staff/StaffScheme";
import Staff from "./components/staff/Staff";
import Job from "./components/job/Job";
@ -57,6 +58,11 @@ const Routes = (
path="branchNumSetting"
component={BranchNumSetting}
/>
<Route
key="deptNumberSet"
path="deptNumberSet"
component={DeptNumberSet}
/>
<Route key="company" path="company" component={Company} />
<Route key="department" path="department" component={Department} />
<Route key="departmentExtend" path="departmentExtend/:id" component={DepartmentExtendStore} />

View File

@ -129,6 +129,8 @@ export const i18n = {
editOfficeName: () => getLabel(386247, '编辑职务信息'),
newOfficeClassifyName: () => getLabel(386246, '新建职务分类信息'),
branchNumSetting: () => getLabel(386246, '分部编号设置'),
deptNumSetting: () => getLabel(386246, '部门编号设置'),
posiNumSetting: () => getLabel(386246, '岗位编号设置'),
companyName: () => getLabel(385937, '分部'),
staffSchemeName: () => getLabel(385936, '编制方案'),
newStaffScheme: () => getLabel(386246, '新建编制方案'),

View File

@ -1,16 +1,16 @@
// loading 效果
.wea-demo-loading {
height: 100%;
text-align: center;
>div {
position: absolute;
top: 50%;
}
}
html,body {
html,
body {
height: 100%;
margin: 0;
padding: 0;
@ -22,7 +22,9 @@ body {
color: #333333;
}
#container, body, html {
#container,
body,
html {
height: 100%;
overflow: scroll !important
}
@ -40,7 +42,7 @@ body {
height: 100%;
}
.quickOperate{
.quickOperate {
position: fixed;
width: 45px;
height: 250px;
@ -48,7 +50,7 @@ body {
top: 20px;
// border: 1px solid #8b4513;
img{
img {
cursor: pointer;
width: 30px;
height: 30px;
@ -60,8 +62,4 @@ body {
display: block;
margin-top: 10px;
}
}
}