From 5c2268f4f9715fdf2fe6e0eb856660fecb2a1684 Mon Sep 17 00:00:00 2001 From: liyongshun <971387674@qq.com> Date: Mon, 30 May 2022 10:25:30 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=BF=98=E5=8E=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/branchNumSetting/index.js | 189 ++++++++---------- 1 file changed, 83 insertions(+), 106 deletions(-) diff --git a/pc4mobx/organization/components/branchNumSetting/index.js b/pc4mobx/organization/components/branchNumSetting/index.js index 6ab1d7d..05f4148 100644 --- a/pc4mobx/organization/components/branchNumSetting/index.js +++ b/pc4mobx/organization/components/branchNumSetting/index.js @@ -1,124 +1,101 @@ -const { inject, observer } = mobxReact; -const ProductItem = ecodeSDK.imp(ProductItem); -const ProductDialog = ecodeSDK.imp(ProductDialog); -const { toJS } = mobx; -// const { product } = ecodeSDK.imp(productDataSource); -const { WeaDialog } = ecCom; -const { createRef } = React; +/* + * Author: 黎永顺 + * Description: 分部编号设置 + * Date: 2022-05-17 14:30:57 + * LastEditTime: 2022-05-30 10:23:18 + */ +import React, { Component, Fragment } from "react"; +import { Button } from "antd"; +import { WeaTop, WeaFormItem, WeaCheckbox, WeaSearchGroup } from "ecCom"; +import StartReservedNumberSet from "./components/startReservedNumberSet"; +import NumberComposition from "./components/numberComposition"; +import { i18n } from "../../public/i18n"; +import "./index.less"; -@inject("projectStore") -@observer -class ProductIndex extends React.Component { +const btns = []; +const dropMenuDatas = [ + { + key: "save", + disabled: false, + icon: , + content: "保存", + onClick: (key) => alert(`点击了搜索 key = ${key}`), + }, +]; +export default class BranchNumSetting extends Component { constructor() { super(); this.state = { - dialogParams: { - visible: false, - productId: "", - }, - dialogWidth: 1200, - dialogHeight: 100, + checkVal: "0", }; - this.productRef = createRef(); - } - componentDidMount() { - window.addEventListener("resize", this.resizeWidthHeight); - this.resizeWidthHeight(); - this.init(); - } - conponentWillUnmount() { - window.removeEventListener("resize", this.resizeWidthHeight); } - resizeWidthHeight = () => { - requestAnimationFrame(() => { - if (!this.productRef.current) { - return; - } - const { offsetWidth, offsetHeight } = this.productRef.current; - this.setState({ - dialogWidth: offsetWidth - 100, - // offsetHeight / 2 - dialogHeight: 80, - }); - }); - }; + componentDidMount() {} - init = () => { - const { - projectStore: { init }, - } = this.props; - init(); - }; - - handlePickProduct = async (productId) => { - const { - projectStore: { viewProject, init }, - } = this.props; - const { api_status } = await viewProject(productId); - if (api_status) init(); - this.setState({ - dialogParams: { ...this.state.dialogParams, visible: true, productId }, - }); + /** + * name:提示文本 + * return {*} + */ + helpContent = () => { + return ( +
开启后,可根据设置的分部编号规则自动生成分部编号,涉及场景如下:
+1.手动新建和手动编辑分部时可选择重新生成编号和选择预留分部编号;
+2.组织结构导入-添加新分部且分部编号列为空时,会自动生成分部编号;
+3.导入人员-添加时,新创建的分部可自动生成分部编号;
+【注意】开启前请先确认分部编号字段已启用!
+{subTitle}
*/} -