diff --git a/pc4mobx/hrmSalary/components/importDialog/components/impStep1.js b/pc4mobx/hrmSalary/components/importDialog/components/impStep1.js new file mode 100644 index 00000000..6ab09b3e --- /dev/null +++ b/pc4mobx/hrmSalary/components/importDialog/components/impStep1.js @@ -0,0 +1,87 @@ +/* + * Author: 黎永顺 + * name: 导入-步骤一 + * Description: + * Date: 2023/8/11 + */ +import React, { Component } from "react"; +import { WeaLocaleProvider } from "ecCom"; +import { Icon, message, Upload } from "antd"; + +const Dragger = Upload.Dragger; +const { getLabel } = WeaLocaleProvider; + +class ImpStep1 extends Component { + constructor(props) { + super(props); + this.state = { + fileList: [] + }; + } + + handleChange = (data) => { + const { fileList, file } = data; + if (file.response && typeof (file.response) != "undefined" && file.status !== "removed") message.success(getLabel(111, "上传成功")); + this.setState({ fileList: fileList.slice(-1) }); + }; + + render() { + const { fileList } = this.state; + const dragger = { + accept: ".xlsx", + name: "file", + multiple: false, + action: "/api/doc/upload/uploadFile", + fileList, + onChange: this.handleChange + }; + return ( +
+ {/* 导入选项 */} + { + this.props.importParams && +
+
{getLabel(543201, "导入选项")}
+ {this.props.importParams} +
+ } +
{getLabel(543202, "导入Excel")}
+

+ +

+

+

{getLabel(543203, "点击或将文件拖拽到此区域上传")}

+

{getLabel(543204, "支持单个或批量上传,严禁上传公司内部资料及其他违禁文件")}

+
+ +

+ +
+
{getLabel(27577, "操作步骤")}
+

+ {`1. ${getLabel(30907, "第一步")},${getLabel(543205, "请选择导出的Excel文件或")}`}   + {getLabel(543207, "点击这里下载模板")}   + {this.props.exportDataDom} +

+

{`2. ${getLabel(543211, "第二步")},${getLabel(543212, "请一定要确定Excel文档中的格式是模板中的格式")},${getLabel(543213, "没有被修改掉")};`}

+

{`3. ${getLabel(543216, "第三步")},${getLabel(543215, "选择填写好的Excel文档")},${getLabel(543214, "点击“下一步”按钮进行数据预览")};`}

+

+ {`4. ${getLabel(543217, "第四步")},${getLabel(543218, "如果以上步骤和Excel文档正确的话")},${getLabel(543219, "导入成功会有提示")},${getLabel(543220, "数据会被正确导入")}。${getLabel(543221, "如果有问题")},${getLabel(543222, "则会提示Excel文档的错误之处")}。`} +

+
+ +
+
{getLabel(543223, "Excel文件说明")}
+

{`1. ${getLabel(543224, "后缀名为xls或者xlsx")};`}

+

{`2. ${getLabel(543225, "数据请勿放在合并的单元格中")};`}

+

{`3. ${getLabel(543226, "账单月份格式必须为")}:YYYY-MM;`}

+
+ +
+ ); + } +} + +export default ImpStep1; diff --git a/pc4mobx/hrmSalary/components/importDialog/components/impStep2.js b/pc4mobx/hrmSalary/components/importDialog/components/impStep2.js new file mode 100644 index 00000000..8a7373d4 --- /dev/null +++ b/pc4mobx/hrmSalary/components/importDialog/components/impStep2.js @@ -0,0 +1,49 @@ +/* + * Author: 黎永顺 + * name: 导入-步骤二 + * Description: + * Date: 2023/9/5 + */ +import React, { Component } from "react"; +import { WeaTable } from "ecCom"; +import { postFetch } from "../../../util/request"; + +class ImpStep2 extends Component { + constructor(props) { + super(props); + this.state = { + loading: false, columns: [], dataSource: [] + }; + } + + componentDidMount() { + this.init(); + } + + init = () => { + const { previewUrl, imageId } = this.props; + const payload = { imageId }; + this.setState({ loading: true }); + postFetch(previewUrl, payload).then(({ status, data }) => { + this.setState({ loading: false }); + if (status) { + const { headers, list } = data; + this.setState({ + columns: _.map(headers, (item, index) => ({ title: item, dataIndex: index + "", width: 120 })), + dataSource: _.map(list, item => { + return _.reduce(item, (pre, cur, key) => (_.assign(pre, { [key]: cur })), {}); + }) + }); + } + }).catch(() => this.setState({ loading: false })); + }; + + render() { + const { dataSource, columns, loading } = this.state; + return ( + + ); + } +} + +export default ImpStep2; diff --git a/pc4mobx/hrmSalary/components/importDialog/components/impStep3.js b/pc4mobx/hrmSalary/components/importDialog/components/impStep3.js new file mode 100644 index 00000000..481813b4 --- /dev/null +++ b/pc4mobx/hrmSalary/components/importDialog/components/impStep3.js @@ -0,0 +1,51 @@ +/* + * Author: 黎永顺 + * name: 导入-步骤3 + * Description: + * Date: 2023/8/11 + */ +import React, { Component } from "react"; +import { WeaLocaleProvider, WeaTable } from "ecCom"; +import successImg from "../../importModal/success.svg"; + +const getLabel = WeaLocaleProvider.getLabel; + +class ImpStep3 extends Component { + render() { + const { importResult } = this.props; + return ( +
+ { + !_.isEmpty(importResult) ? +
+

+

+ {getLabel(389249, "已导入")} + {importResult.successCount}   + {`${getLabel(30690, "条数据")},${getLabel(25009, "失败")}`} + {importResult.errorCount}  {getLabel(30690, "条数据")} +

+
: +
+

{getLabel(111, "导入失败")}

+
+ } + { + !_.isEmpty(importResult.errorData) && + + } +
+ ); + } +} + +export default ImpStep3; diff --git a/pc4mobx/hrmSalary/components/importDialog/index.js b/pc4mobx/hrmSalary/components/importDialog/index.js new file mode 100644 index 00000000..b7eafd97 --- /dev/null +++ b/pc4mobx/hrmSalary/components/importDialog/index.js @@ -0,0 +1,153 @@ +/* + * Author: 黎永顺 + * name: 导入弹框-步骤条 + * Description: + * Date: 2023/8/11 + */ +import React, { Component } from "react"; +import { Button, message, Modal } from "antd"; +import { WeaDialog, WeaLocaleProvider, WeaSteps } from "ecCom"; +import ImpStep1 from "./components/impStep1"; +import ImpStep2 from "./components/impStep2"; +import ImpStep3 from "./components/impStep3"; +import "./index.less"; + +const { getLabel } = WeaLocaleProvider; +const Step = WeaSteps.Step; + +class Index extends Component { + constructor(props) { + super(props); + this.state = { + current: 0 + }; + } + + componentWillReceiveProps(nextProps, nextContext) { + if (JSON.stringify(nextProps.importResult) !== JSON.stringify(this.props.importResult) && !_.isEmpty(nextProps.importResult)) { + this.setState({ + current: this.state.current + 1 + }); + } + if (nextProps.visible !== this.props.visible && !nextProps.visible) this.setState({ current: 0 }); + } + + renderChildren = () => { + const { current } = this.state; + const { importParams, link, excludeKey, importResult, exportDataDom = null } = this.props; + let CurrentDom = null; + switch (current) { + case 0: + CurrentDom = this.step1Ref = dom}/>; + break; + case 1: + CurrentDom = ; + if (excludeKey) { + CurrentDom = ; + } + break; + case 2: + CurrentDom = ; + break; + default: + CurrentDom = null; + break; + } + return CurrentDom; + }; + /* + * Author: 黎永顺 + * Description: 上一步 + * Params: + * Date: 2023/9/5 + */ + handlePreviousStep = () => { + Modal.confirm({ + title: getLabel(131329, "信息确认"), + content: getLabel(111, "是否放弃已上传的文件?"), + onOk: () => this.setState({ current: this.state.current - 1 }, () => this.props.onResetImportResult()) + }); + }; + /* + * Author: 黎永顺 + * Description: 下一步 + * Params: + * Date: 2023/8/11 + */ + handleNext = () => { + const { params, importResult } = this.props; + if (_.isEmpty(importResult)) { + const { fileList } = this.step1Ref.state; + if (!_.isEmpty(params)) { + if (!Object.values(params).every(o => !!o)) { + Modal.warning({ + title: getLabel(131329, "信息确认"), + content: getLabel(518702, "必要信息不完整,红色*为必填项!") + }); + return; + } + } + if (_.isEmpty(fileList)) { + message.warning(getLabel(111, "请先上传EXCEL文件")); + return; + } + const [file] = fileList; + const { response } = file; + this.props.nextCallback(response.data.fileid); + } else { + this.setState({ current: this.state.current + 1 }); + } + }; + + render() { + const { current } = this.state; + const stepData = [ + { key: 0, label: getLabel(543202, "上传EXCEL") }, + { key: 1, label: getLabel(543200, "数据预览") }, + { key: 2, label: getLabel(502835, "导入数据") } + ]; + const btns = [ + , + , + + ]; + return ( + +
+
+ + {/*this.props.key: 不需要展示的步骤*/} + { + _.map(_.filter(stepData, item => item.key !== this.props.excludeKey), it => ( + )) + } + +
+
+ { + this.renderChildren() + } +
+
+
+ ); + } +} + +export default Index; diff --git a/pc4mobx/hrmSalary/components/importDialog/index.less b/pc4mobx/hrmSalary/components/importDialog/index.less new file mode 100644 index 00000000..95cee40b --- /dev/null +++ b/pc4mobx/hrmSalary/components/importDialog/index.less @@ -0,0 +1,143 @@ +.importBox { + .importCont { + padding: 16px 8px; + + .weapp-batch-impsteps-picker-content-imp-steps { + width: 80%; + margin: 0 auto; + } + + .weapp-batch-impsteps-picker { + margin: 16px auto; + + .weapp-batch-impsteps-picker-content-imp-step1 { + width: 98%; + background-color: #fff; + margin: 8px auto; + border-radius: 3px; + padding: 1px 12px; + + .weapp-batch-impsteps-picker-content-imp-step1 div { + color: #111; + line-height: 22px; + } + + .weapp-salary-tb-border-bottom .weapp-salary-tb-filter.weapp-salary-import-param { + box-sizing: border-box; + padding: 16px; + height: auto; + flex-wrap: wrap; + width: 100%; + } + + .weapp-salary-import-param { + border: 1px solid #ebedf0; + padding: 8px; + margin: 4px 0 14px; + } + + .weapp-salary-tb-filter { + display: flex; + flex-wrap: wrap; + align-items: center; + height: 46px; + } + + .weapp-salary-tb-border-bottom .weapp-salary-tb-filter.weapp-salary-import-param .tbf-item { + display: flex; + justify-content: flex-start !important; + } + + .weapp-salary-tb-filter .tbf-item { + padding: 0 20px 0 0; + display: flex; + align-items: center; + font-size: 12px; + color: #111; + height: 40px; + } + + .weapp-salary-tb-filter .tbf-item > .tbfi-label { + flex-basis: 100px; + flex-shrink: 0; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + padding-right: 10px; + color: #666; + } + + .draggerUploadWrapper { + margin: 16px 0 0; + + .ant-upload-drag-container { + padding: 24px 0 16px; + + .iconUpload { + i { + color: #5d9cec; + font-size: 43px; + } + } + + .uplaod-title { + font-size: 14px; + color: #333; + height: 24px; + line-height: 24px; + margin-top: 8px; + } + + .uplaod-subTitle { + height: 22px; + font-size: 12px; + color: #666; + text-align: center; + line-height: 22px; + } + } + } + + .bottom-border, .description { + margin-top: 12px; + + p { + font-size: 12px; + color: #666; + line-height: 15px; + margin: 12px 0; + } + } + + .bottom-border { + border-bottom: 1px solid #e5e5e5; + + .weapp-salary-link { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + color: #5d9cec; + } + } + + } + } + + .weapp-batch-impsteps-picker-content-imp-step3 { + .weapp-batch-impsteps-picker-spinText { + position: relative; + height: 100%; + display: flex; + justify-content: center; + align-items: center; + flex-direction: column; + text-align: center; + + p { + margin: 14px 0; + } + } + } + + } +} diff --git a/pc4mobx/hrmSalary/index.js b/pc4mobx/hrmSalary/index.js index bd2d3c12..7f0f110d 100644 --- a/pc4mobx/hrmSalary/index.js +++ b/pc4mobx/hrmSalary/index.js @@ -25,6 +25,7 @@ import TaxAgent from "./pages/taxAgent"; import CalculateDetail from "./pages/calculateDetail"; import PlaceOnFileDetail from "./pages/calculateDetail/placeOnFileDetail"; import CompareDetail from "./pages/calculateDetail/compareDetail"; +import DoCalcDetail from "./pages/calculate/doCalc"; import GenerateDeclarationDetail from "./pages/declare/generateDeclarationDetail"; import TemplatePreview from "./pages/payroll/templatePreview"; import MobilePayroll from "./pages/mobilePayroll"; @@ -73,6 +74,7 @@ const DataAcquisition = (props) => props.children; // ledger 薪资账套 // calculate 薪资核算 // calculateDetail 核算详情 +// DoCalcDetail 新核算详情页面 // placeOnFileDetail 核算归档详情 // compareDetail 线下线上对比 // payroll 工资单发放 @@ -130,6 +132,7 @@ const Routes = ( + diff --git a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/advanceInputBtn/index.js b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/advanceInputBtn/index.js new file mode 100644 index 00000000..654756d7 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/advanceInputBtn/index.js @@ -0,0 +1,19 @@ +import React, { Component } from "react"; +import { WeaInputSearch, WeaLocaleProvider } from "ecCom"; +import { Button } from "antd"; +import "./index.less"; + +const getLabel = WeaLocaleProvider.getLabel; + +class Index extends Component { + render() { + return ( +
+ + +
+ ); + } +} + +export default Index; diff --git a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/advanceInputBtn/index.less b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/advanceInputBtn/index.less new file mode 100644 index 00000000..1a3d7283 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/advanceInputBtn/index.less @@ -0,0 +1,28 @@ +.advance-search { + display: flex; + align-items: center; + position: relative; + top: -2.5px; + + .wea-advanced-search { + top: 2px; + left: -1px; + height: 28px; + line-height: 1; + border-radius: 0; + position: relative; + color: #474747; + padding: 4px 15px; + } + + .wea-advanced-search:hover { + border: 1px solid #dadada; + color: #474747; + } + + .text-elli { + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + } +} diff --git a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryCalcPersonConfirm/baseInfo.js b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryCalcPersonConfirm/baseInfo.js new file mode 100644 index 00000000..c12b35e7 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryCalcPersonConfirm/baseInfo.js @@ -0,0 +1,75 @@ +/* + * Author: 黎永顺 + * name: 人员信息确认-基础信息 + * Description: + * Date: 2023/9/13 + */ +import React, { Component } from "react"; +import { WeaHelpfulTip, WeaLocaleProvider, WeaSearchGroup } from "ecCom"; +import SalaryMonthTip from "../salaryMonthTip"; +import { getSalarySobCycle, salaryacctGetForm } from "../../../../../apis/calculate"; +import { Col, Row } from "antd"; +import "./index.less"; + +const getLabel = WeaLocaleProvider.getLabel; + +class BaseInfo extends Component { + constructor(props) { + super(props); + this.state = { + salaryInfo: {}, salarySobCycle: {} + }; + } + + componentDidMount() { + const promise = this.init(); + } + + init = async () => { + const { routeParams: { salaryAcctRecordId } } = this.props; + const [salaryInfo, salarySobCycle] = await Promise.all([salaryacctGetForm({ id: salaryAcctRecordId }), getSalarySobCycle({ salaryAcctRecordId })]); + if (salaryInfo.status && salarySobCycle.status) { + this.setState({ + salaryInfo: salaryInfo.data, salarySobCycle: salarySobCycle.data + }); + } + }; + + render() { + const { salaryInfo, salarySobCycle } = this.state; + const { formDTO } = salaryInfo || {}; + return ( + + + + + + {getLabel(542604, "薪资所属月")} + } + style={{ marginLeft: 10 }} + /> + + {formDTO && formDTO.salaryMonth} + + + + + {getLabel(519146, "核算账套")} + {formDTO && formDTO.salarySobName} + + + + + {getLabel(536726, "备注")} + {formDTO && formDTO.description} + + + + + ); + } +} + +export default BaseInfo; diff --git a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryCalcPersonConfirm/condition.js b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryCalcPersonConfirm/condition.js new file mode 100644 index 00000000..a92c43df --- /dev/null +++ b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryCalcPersonConfirm/condition.js @@ -0,0 +1,104 @@ +export const personConfirmSearchConditions = [ + { + items: [ + { + colSpan: 2, + conditionType: "INPUT", + domkey: ["employeeName"], + fieldcol: 12, + label: "姓名", + lanId: 25034, + labelcol: 6, + value: "", + viewAttr: 2 + }, + { + colSpan: 2, + conditionType: "INPUT", + domkey: ["workcode"], + fieldcol: 12, + label: "工号", + lanId: 1933, + labelcol: 6, + value: "", + viewAttr: 2 + }, + { + browserConditionParam: { + completeParams: {}, + conditionDataParams: {}, + dataParams: {}, + destDataParams: {}, + hasAddBtn: false, + hasAdvanceSerach: false, + idSeparator: ",", + isAutoComplete: 1, + isDetail: 0, + isMultCheckbox: false, + isSingle: false, + icon: "icon-coms-hrm", + linkUrl: "", + pageSize: 10, + quickSearchName: "", + replaceDatas: [], + title: "", + type: "57", + viewAttr: 2 + }, + colSpan: 2, + conditionType: "BROWSER", + domkey: ["departmentIds"], + fieldcol: 12, + label: "部门", + lanId: 27511, + labelcol: 6, + viewAttr: 2 + }, + { + browserConditionParam: { + completeParams: {}, + conditionDataParams: {}, + dataParams: {}, + destDataParams: {}, + hasAddBtn: false, + hasAdvanceSerach: false, + idSeparator: ",", + isAutoComplete: 1, + isDetail: 0, + isMultCheckbox: false, + isSingle: false, + icon: "icon-coms-hrm", + linkUrl: "", + pageSize: 10, + quickSearchName: "", + replaceDatas: [], + title: "", + type: "24", + viewAttr: 2 + }, + colSpan: 2, + conditionType: "BROWSER", + domkey: ["positionIds"], + fieldcol: 12, + label: "岗位", + lanId: 6086, + labelcol: 6, + viewAttr: 2 + }, + { + colSpan: 2, + conditionType: "SELECT", + domkey: ["statuses"], + fieldcol: 12, + multiple: true, + label: "状态", + lanId: 535101, + labelcol: 6, + options: [], + viewAttr: 2 + } + ], + defaultshow: true, + title: "常用条件" + } +]; diff --git a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryCalcPersonConfirm/index.js b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryCalcPersonConfirm/index.js new file mode 100644 index 00000000..944304a1 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryCalcPersonConfirm/index.js @@ -0,0 +1,177 @@ +/* + * Author: 黎永顺 + * name: 人员确认 + * Description: + * Date: 2023/9/13 + */ +import React, { Component } from "react"; +import { WeaButtonIcon, WeaHelpfulTip, WeaLocaleProvider, WeaTab, WeaTools } from "ecCom"; +import { inject, observer } from "mobx-react"; +import { Button } from "antd"; +import BaseInfo from "./baseInfo"; +import { acctemployeeList } from "../../../../../apis/calculate"; +import { personConfirmSearchConditions } from "./condition"; +import { getSearchs } from "../../../../../util"; + +const getKey = WeaTools.getKey; +const getLabel = WeaLocaleProvider.getLabel; + +@inject("calculateStore") +@observer +class Index extends Component { + constructor(props) { + super(props); + this.state = { + selectedKey: "range", showSearchAd: false, + searchConditions: [], loading: false, + pageInfo: { current: 1, pageSize: 10, total: 0 }, + selectedRowKeys: [] + }; + } + + componentDidMount() { + if ($) { + const domTabInnerList = $(".salary-calculate-do-calc-content .ant-tabs-tab-inner"); + domTabInnerList[0].setAttribute("title", ""); + domTabInnerList[1].setAttribute("title", ""); + domTabInnerList[2].setAttribute("title", ""); + } + this.setState({ + searchConditions: _.map(personConfirmSearchConditions, item => { + return { + ...item, + items: _.map(item.items, o => { + if (getKey(o) === "statuses") { + return { + ...o, + options: [ + { key: "0", showname: getLabel(18883, "试用") }, { key: "1", showname: getLabel(15711, "正式") }, + { key: "2", showname: getLabel(480, "临时") }, { key: "3", showname: getLabel(15844, "试用延期") }, + { key: "4", showname: getLabel(542707, "解雇") }, { key: "5", showname: getLabel(6091, "离职") }, + { key: "6", showname: getLabel(6092, "退休") } + ] + }; + } + return { ...o }; + }), + title: getLabel(32905, "常用条件") + }; + }) + }, () => { + const { calculateStore: { PCSearchForm } } = this.props; + PCSearchForm.initFormFields(this.state.searchConditions); + this.acctemployeeList(); + }); + } + + renderTabBtns = () => { + const { selectedKey } = this.state; + let tabBtns = []; + switch (selectedKey) { + case "range": + tabBtns = [ + , + , + + ]; + break; + case "add": + case "sub": + tabBtns = [ + + ]; + break; + default: + break; + } + return tabBtns; + }; + acctemployeeList = () => { + const { pageInfo } = this.state; + const { calculateStore: { PCSearchForm }, routeParams: { salaryAcctRecordId } } = this.props; + const { departmentIds, positionIds, statuses, ...extra } = PCSearchForm.getFormParams(); + const payload = { + salaryAcctRecordId, ...pageInfo, ...extra, + departmentIds: !_.isEmpty(departmentIds) ? departmentIds.split(",") : [], + positionIds: !_.isEmpty(positionIds) ? positionIds.split(",") : [], + statuses: !_.isEmpty(statuses) ? statuses.split(",") : [] + }; + acctemployeeList(payload).then(({ status, data }) => { + if (status) { + console.log(data); + } + }); + }; + + render() { + const { calculateStore: { PCSearchForm } } = this.props; + const { selectedKey, showSearchAd, searchConditions, pageInfo, loading, selectedRowKeys } = this.state; + const tabDatas = [ + { + title: + {getLabel(542307, "核算人员范围")} + + , viewcondition: "range" + }, + { + title: + {getLabel(542308, "环比上月减少人员")} + + , viewcondition: "sub" + }, + { + title: + {getLabel(542308, "环比上月增加人员")} + + , viewcondition: "add" + } + ]; + const pagination = { + ...pageInfo, + showTotal: total => `${getLabel(18609, "共")} ${total} ${getLabel(18256, "条")}`, + showQuickJumper: true, + showSizeChanger: true, + pageSizeOptions: ["10", "20", "50", "100"], + onShowSizeChange: (current, pageSize) => { + this.setState({ pageInfo: { ...pageInfo, current, pageSize } }, () => this.queryList()); + }, + onChange: current => { + this.setState({ pageInfo: { ...pageInfo, current } }, () => this.queryList()); + } + }; + const rowSelection = { + selectedRowKeys, + onChange: selectedRowKeys => this.setState({ selectedRowKeys }) + }; + return ( +
+ + this.setState({ selectedKey: v })} advanceHeight={220} + buttons={this.renderTabBtns()} searchType={["base", "advanced"]} + showSearchAd={showSearchAd} setShowSearchAd={bool => this.setState({ showSearchAd: bool })} + searchsAd={getSearchs(PCSearchForm, searchConditions, 2, false)} + onSearchChange={(v) => PCSearchForm.updateFields({ employeeName: v })} + searchsBaseValue={PCSearchForm.getFormParams().employeeName} + onSearch={this.acctemployeeList} onAdSearch={this.acctemployeeList} + onAdReset={() => PCSearchForm.resetForm()} + /> +
+ ); + } +} + +export default Index; diff --git a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryCalcPersonConfirm/index.less b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryCalcPersonConfirm/index.less new file mode 100644 index 00000000..18bcbc29 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryCalcPersonConfirm/index.less @@ -0,0 +1,42 @@ +.person-confirm-layout { + .wea-tab .wea-tab-right, .wea-input-focus { + background: transparent; + } +} + +.docalc-baseinfo-layout { + padding: 0; + + .wea-title { + border-bottom: none; + } + + .wea-content.pt15 { + padding-top: 0; + } + + .docalc-baseinfo { + background: #fff; + border: 1px solid #e5e5e5; + border-right: none; + + .ant-col-24 { + border-top: 1px solid #e5e5e5; + } + + .label { + color: #666; + } + + .value { + color: #111; + } + + & > div { + border-right: 1px solid #e5e5e5; + line-height: 30px; + padding: 5px 16px; + + } + } +} diff --git a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryMonthTip/index.js b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryMonthTip/index.js new file mode 100644 index 00000000..a230b83e --- /dev/null +++ b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryMonthTip/index.js @@ -0,0 +1,42 @@ +/* + * Author: 黎永顺 + * name: 薪资所属月提示语 + * Description: + * Date: 2023/9/13 + */ +import React, { Component } from "react"; +import { WeaLocaleProvider } from "ecCom"; +import "./index.less"; + +const getLabel = WeaLocaleProvider.getLabel; + +class Index extends Component { + render() { + const { attendCycle, salaryCycle, salaryMonth, socialSecurityCycle } = this.props; + const { fromDate: attendFromDate, endDate: attendEndDate } = attendCycle, + { fromDate: salaryFromDate, endDate: salaryEndDate } = salaryCycle; + return ( +
+
+
{getLabel(543375, "薪资周期")}
+
{`${salaryFromDate}${getLabel(15322, "至")}${salaryEndDate}`}
+
+
+
{getLabel(542240, "税款所属期")}
+
{salaryMonth}
+
+
+
{getLabel(543475, "考勤取值周期")}
+
{`${attendFromDate}${getLabel(15322, "至")}${attendEndDate}`}
+
+
+
{getLabel(543466, "福利台账月份")}
+
{`${getLabel(19422, "引用")}${socialSecurityCycle}${getLabel(543476, "的福利台账数据")}`}
+
+
+ ); + } +} + +export default Index; diff --git a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryMonthTip/index.less b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryMonthTip/index.less new file mode 100644 index 00000000..436f6a0d --- /dev/null +++ b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryMonthTip/index.less @@ -0,0 +1,11 @@ +.salary-month-tip { + .line { + .label { + color: #666; + } + + .value { + color: #111; + } + } +} diff --git a/pc4mobx/hrmSalary/pages/calculate/doCalc/index.js b/pc4mobx/hrmSalary/pages/calculate/doCalc/index.js new file mode 100644 index 00000000..2508d0dc --- /dev/null +++ b/pc4mobx/hrmSalary/pages/calculate/doCalc/index.js @@ -0,0 +1,105 @@ +/* + * Author: 黎永顺 + * name: 薪资核算详情 + * Description: + * Date: 2023/9/13 + */ +import React, { Component } from "react"; +import { WeaLocaleProvider, WeaReqTop } from "ecCom"; +import { Button, Dropdown, Menu } from "antd"; +import Layout from "./layout"; +import AdvanceInputBtn from "./components/advanceInputBtn"; +import SalaryCalcPersonConfirm from "./components/salaryCalcPersonConfirm"; +import "./index.less"; + +const getLabel = WeaLocaleProvider.getLabel; + +class Index extends Component { + constructor(props) { + super(props); + this.state = { + selectedKey: "person" + }; + } + + componentDidMount() { + console.log(this.props); + } + + handleButtonClick = () => { + console.log("核算所有人"); + }; + handleMenuClick = ({ key }) => { + console.log(key); + }; + handleMoreMenuClick = ({ key }) => { + console.log(key); + }; + renderReqBtns = () => { + const { selectedKey } = this.state; + let reqBtns = []; + switch (selectedKey) { + case "calc": + const menu = ( + + {getLabel(543546, "核算所选人员")} + + ); + const moreMenu = ( + + {getLabel(32935, "导入")} + {getLabel(81272, "导出全部")} + {getLabel(544270, "自定义导出")} + {getLabel(543249, "线下对比")} + + ); + reqBtns = [ + + {getLabel(543545, "核算所有人")} + , + , + + ]; + break; + default: + break; + } + return reqBtns; + }; + renderContent = () => { + const { selectedKey } = this.state; + let dom = null; + switch (selectedKey) { + case "person": + dom = ; + break; + default: + break; + } + return dom; + }; + + render() { + const tabs = [ + { key: "person", title: getLabel(543547, "人员确认") }, + { key: "calc", title: getLabel(538011, "薪资核算") } + ]; + const { selectedKey } = this.state; + return ( + +
+ } iconBgcolor="#F14A2D" + onChange={key => this.setState({ selectedKey: key })} + buttons={this.renderReqBtns()} + > +
{this.renderContent()}
+
+
+
+ ); + } +} + +export default Index; diff --git a/pc4mobx/hrmSalary/pages/calculate/doCalc/index.less b/pc4mobx/hrmSalary/pages/calculate/doCalc/index.less new file mode 100644 index 00000000..d15f409a --- /dev/null +++ b/pc4mobx/hrmSalary/pages/calculate/doCalc/index.less @@ -0,0 +1,15 @@ +.salary-calculate-do-calc { + min-width: 1000px; + overflow: auto; + width: 100%; + height: 100%; + background: #f6f6f6; + + .wea-new-top-req-wapper .wea-new-top-req-title > div:last-child { + right: 16px; + } + + .salary-calculate-do-calc-content { + padding: 8px 16px; + } +} diff --git a/pc4mobx/hrmSalary/pages/calculate/doCalc/layout.js b/pc4mobx/hrmSalary/pages/calculate/doCalc/layout.js new file mode 100644 index 00000000..9a802bfb --- /dev/null +++ b/pc4mobx/hrmSalary/pages/calculate/doCalc/layout.js @@ -0,0 +1,46 @@ +import React, { Component } from "react"; +import { inject, observer } from "mobx-react"; +import Authority from "../../mySalary/authority"; +import { salaryacctAcctresultCheckAuth } from "../../../apis/calculate"; + +@inject("taxAgentStore") +@observer +class Layout extends Component { + constructor(props) { + super(props); + this.state = { + store: { loading: false, hasRight: false } + }; + } + + componentDidMount() { + this.salaryacctAcctresultCheckAuth(); + } + + salaryacctAcctresultCheckAuth = () => { + const { taxAgentStore: { getPermission } } = this.props; + this.setState({ store: { ...this.state.store, loading: true } }); + getPermission().then(({ data }) => { + const { isOpenDevolution } = data; + if (isOpenDevolution) { + const { routeParams: { salaryAcctRecordId } } = this.props; + salaryacctAcctresultCheckAuth({ salaryAcctRecordId }).then(({ status, data }) => { + this.setState({ store: { ...this.state.store, loading: false, hasRight: status && data } }); + }); + } else { + this.setState({ store: { ...this.state.store, loading: false, hasRight: true } }); + } + }).catch(() => this.setState({ store: { ...this.state.store, loading: false } })); + }; + + render() { + return ( + + {this.props.children} + + ); + } +} + +export default Layout; diff --git a/pc4mobx/hrmSalary/stores/calculate.js b/pc4mobx/hrmSalary/stores/calculate.js index 5b270ddf..97102665 100644 --- a/pc4mobx/hrmSalary/stores/calculate.js +++ b/pc4mobx/hrmSalary/stores/calculate.js @@ -8,6 +8,9 @@ import { toDecimal_n } from "../util"; const { TableStore } = WeaTableNew; export class calculateStore { + @observable PCSearchForm = new WeaForm(); //人员确认-form + + @observable tableStore = new TableStore(); // new table @observable form = new WeaForm(); // nrew 一个form @observable condition = []; // 存储后台得到的form数据 diff --git a/pc4mobx/hrmSalary/stores/taxAgent.js b/pc4mobx/hrmSalary/stores/taxAgent.js index 2f555120..ef5cfe2d 100644 --- a/pc4mobx/hrmSalary/stores/taxAgent.js +++ b/pc4mobx/hrmSalary/stores/taxAgent.js @@ -4,7 +4,6 @@ import { WeaForm, WeaTableNew } from "comsMobx"; import * as API from "../apis/taxAgent"; // 引入API接口文件 import { decentralizationConditions, editConditions } from "../pages/taxAgent/editConditions"; -import { taxAgentRangeExtDelete } from "../apis/taxAgent"; const { TableStore } = WeaTableNew; @@ -149,12 +148,12 @@ export class TaxAgentStore { //薪酬统计报表权限 this.setStatisticsReportBtn(!isOpenDevolution ? true : !!(isAdminEnable || isChief)); //薪资核算详情页面查看权限 - this.setPayrollPermission(isAdminEnable && isOpenDevolution || !isOpenDevolution); + this.setPayrollPermission((isOpenDevolution && isAdminEnable) || !isOpenDevolution); resolve({ status, data }); } else { reject(); } - }); + }).catch(() => reject()); }); }; // 人员范围列表