From a55847e656af15014042e482cd2a46b9bfce9112 Mon Sep 17 00:00:00 2001 From: 18652063575 Date: Fri, 9 Sep 2022 10:29:12 +0800 Subject: [PATCH] =?UTF-8?q?bug=E7=9A=84=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/components/index.js | 4 +- .../components/slideModalTitle/index.js | 2 +- pc4mobx/hrmSalary/index.js | 2 +- pc4mobx/hrmSalary/pages/calculate/index.js | 2 +- .../pages/dataAcquisition/attendance/index.js | 2 +- .../pages/dataAcquisition/cumDeduct/index.js | 2 +- .../dataAcquisition/cumSituation/index.js | 2 +- pc4mobx/hrmSalary/pages/declare/index.js | 2 +- .../individualIncomeTaxRateForm/index.js | 2 +- pc4mobx/hrmSalary/pages/ledger/index.js | 2 +- .../hrmSalary/pages/mobilePayroll/index.js | 158 +++----------- pc4mobx/hrmSalary/pages/mySalary/index.js | 13 +- pc4mobx/hrmSalary/pages/mySalary/index.less | 19 +- .../hrmSalary/pages/mySalary/payrollModal.js | 196 ++++-------------- pc4mobx/hrmSalary/pages/payroll/index.js | 2 +- .../pages/payroll/payrollDetail/index.js | 4 +- .../templatePreview/computerTemplate/index.js | 27 ++- pc4mobx/hrmSalary/pages/salaryFile/index.js | 2 +- pc4mobx/hrmSalary/pages/salaryItem/index.js | 2 +- .../socialSecurityBenefits/archives/index.js | 2 +- .../programme/copySchemaModal.js | 50 +++-- .../socialSecurityBenefits/programme/index.js | 21 +- .../standingBook/index.js | 2 +- .../pages/taxAgent/slideTaxagentUser.js | 2 +- pc4mobx/hrmSalary/pages/taxRate/index.js | 2 +- pc4mobx/hrmSalary/stores/mySalary.js | 20 +- pc4mobx/hrmSalary/stores/programme.js | 3 +- 27 files changed, 175 insertions(+), 372 deletions(-) diff --git a/pc4mobx/hrmSalary/components/index.js b/pc4mobx/hrmSalary/components/index.js index 2b26867b..98497f66 100644 --- a/pc4mobx/hrmSalary/components/index.js +++ b/pc4mobx/hrmSalary/components/index.js @@ -79,7 +79,7 @@ export default class BaseForm extends React.Component { > } // 左侧图标 + icon={} // 左侧图标 iconBgcolor='#F14A2D' // 左侧图标背景色 buttons={btns} // 顶部按钮: 这里是保存按钮,不需要可以不显示 buttonSpace={10} // 按钮之间的间隔 @@ -103,4 +103,4 @@ export default class BaseForm extends React.Component { ) } -} \ No newline at end of file +} diff --git a/pc4mobx/hrmSalary/components/slideModalTitle/index.js b/pc4mobx/hrmSalary/components/slideModalTitle/index.js index a797cee8..19c3d49b 100644 --- a/pc4mobx/hrmSalary/components/slideModalTitle/index.js +++ b/pc4mobx/hrmSalary/components/slideModalTitle/index.js @@ -16,7 +16,7 @@ export default class SlideModalTitle extends React.Component { render() { return
- +
{ diff --git a/pc4mobx/hrmSalary/index.js b/pc4mobx/hrmSalary/index.js index b85aba70..0ee2ad37 100644 --- a/pc4mobx/hrmSalary/index.js +++ b/pc4mobx/hrmSalary/index.js @@ -44,7 +44,7 @@ const Home = (props) => props.children; const SocialSecurityBenefits = (props) => props.children; const DataAcquisition = (props) => props.children; -// mySalaryBenefits 我的薪资福利 +// mySalary 我的薪资福利 // socialSecurityBenefits 社保福利 // programme 社保福利方案 // archives 社保福利档案 diff --git a/pc4mobx/hrmSalary/pages/calculate/index.js b/pc4mobx/hrmSalary/pages/calculate/index.js index 8baecf99..4cb6aa38 100644 --- a/pc4mobx/hrmSalary/pages/calculate/index.js +++ b/pc4mobx/hrmSalary/pages/calculate/index.js @@ -351,7 +351,7 @@ export default class Calculate extends React.Component { {/* 收藏功能: 配置之后显示 收藏、帮助、显示页面地址 这3个功能 */} } // 左侧图标 + icon={} // 左侧图标 iconBgcolor="#F14A2D" // 左侧图标背景色 showDropIcon={true} // 是否显示下拉按钮 dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同) diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/index.js index 826f8c0a..fad0f595 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/index.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/index.js @@ -728,7 +728,7 @@ export default class Attendance extends React.Component { collectParams={collectParams}> } // 左侧图标 + icon={} // 左侧图标 iconBgcolor="#F14A2D" // 左侧图标背景色 showDropIcon={true} // 是否显示下拉按钮 dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同) diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js index e723b238..b6935152 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js @@ -502,7 +502,7 @@ export default class CumDeduct extends React.Component { > } // 左侧图标 + icon={} // 左侧图标 iconBgcolor="#F14A2D" // 左侧图标背景色 showDropIcon={true} // 是否显示下拉按钮 dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同) diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js index bd24fa86..1a7e54c4 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js @@ -482,7 +482,7 @@ export default class CumSituation extends React.Component { } // 左侧图标 + icon={} // 左侧图标 iconBgcolor="#F14A2D" // 左侧图标背景色 showDropIcon={true} // 是否显示下拉按钮 dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同) diff --git a/pc4mobx/hrmSalary/pages/declare/index.js b/pc4mobx/hrmSalary/pages/declare/index.js index 1c9ad083..4410ff22 100644 --- a/pc4mobx/hrmSalary/pages/declare/index.js +++ b/pc4mobx/hrmSalary/pages/declare/index.js @@ -229,7 +229,7 @@ export default class Declare extends React.Component { > } // 左侧图标 + icon={} // 左侧图标 iconBgcolor="#F14A2D" // 左侧图标背景色 showDropIcon={true} // 是否显示下拉按钮 dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同) diff --git a/pc4mobx/hrmSalary/pages/individualIncomeTaxRateForm/index.js b/pc4mobx/hrmSalary/pages/individualIncomeTaxRateForm/index.js index 9ec68665..50fce644 100644 --- a/pc4mobx/hrmSalary/pages/individualIncomeTaxRateForm/index.js +++ b/pc4mobx/hrmSalary/pages/individualIncomeTaxRateForm/index.js @@ -69,7 +69,7 @@ export default class IndividualIncomeTaxRateForm extends React.Component { > } // 左侧图标 + icon={} // 左侧图标 iconBgcolor='#F14A2D' // 左侧图标背景色 showDropIcon={true} // 是否显示下拉按钮 dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同) diff --git a/pc4mobx/hrmSalary/pages/ledger/index.js b/pc4mobx/hrmSalary/pages/ledger/index.js index f7504a42..a010d3f5 100644 --- a/pc4mobx/hrmSalary/pages/ledger/index.js +++ b/pc4mobx/hrmSalary/pages/ledger/index.js @@ -404,7 +404,7 @@ export default class Ledger extends React.Component { collectParams={collectParams}> } // 左侧图标 + icon={} // 左侧图标 iconBgcolor="#F14A2D" // 左侧图标背景色 showDropIcon={true} // 是否显示下拉按钮 dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同) diff --git a/pc4mobx/hrmSalary/pages/mobilePayroll/index.js b/pc4mobx/hrmSalary/pages/mobilePayroll/index.js index 3f7ce7c3..949412ed 100644 --- a/pc4mobx/hrmSalary/pages/mobilePayroll/index.js +++ b/pc4mobx/hrmSalary/pages/mobilePayroll/index.js @@ -1,6 +1,5 @@ import React from "react"; import { inject, observer } from "mobx-react"; -import { toJS } from "mobx"; import { getQueryString } from "../../util/url"; import Authority from "../mySalary/authority"; import ComputerTemplate from "../payroll/templatePreview/computerTemplate"; @@ -12,21 +11,36 @@ import "../payroll/templatePreview/index.less"; export default class MobilePayroll extends React.Component { constructor(props) { super(props); + this.state= { + mySalaryBillData: { + employeeInformation: {} + } + }; this.id = ""; } componentWillMount() { this.id = getQueryString("id"); - const { mySalaryStore: { getMySalaryBill, init } } = this.props; + const { mySalaryStore: { init } } = this.props; init(); - getMySalaryBill(this.id); + this.getMySalaryBill(this.id); } + getMySalaryBill = (id) => { + const { mySalaryStore: { getMySalaryBill } } = this.props; + getMySalaryBill(id).then(result => { + this.setState({ + mySalaryBillData: result + }) + }) + } + + render() { - const { mySalaryStore: { mySalaryBill } } = this.props; + const { mySalaryBillData }= this.state; const type = getQueryString("type"); - const employeeInformation = mySalaryBill.employeeInformation && toJS(mySalaryBill.employeeInformation); - const salaryGroups = mySalaryBill.salaryGroups && toJS(mySalaryBill.salaryGroups); + const employeeInformation = mySalaryBillData.employeeInformation ? mySalaryBillData.employeeInformation : {}; + const salaryGroups = mySalaryBillData.salaryGroups ? mySalaryBillData.salaryGroups : []; return (
: }
- {/*/!* 标题 *!/*/} - {/*
*/} - {/* {mySalaryBill.salaryTemplate && mySalaryBill.salaryTemplate.theme}*/} - {/*
*/} - {/*{*/} - {/* mySalaryBill.salaryTemplate && mySalaryBill.salaryTemplate.background && mySalaryBill.salaryTemplate.background !== ""*/} - {/* &&
*/} - {/* */} - {/*
*/} - {/*}*/} - - {/* 员工信息 */} - {/*
*/} - {/*
*/} - {/* {*/} - {/* mySalaryBill.employeeInformation && */} - {/* {mySalaryBill.employeeInformation.groupName}*/} - {/* */} - {/* }*/} - {/* */} - {/* {*/} - {/* mySalaryBill.employeeInformation && mySalaryBill.employeeInformation.items.map((item, index) => (*/} - {/* */} - {/* {item.name}*/} - {/* {item.salaryItemValue}*/} - {/* */} - {/* ))*/} - {/* }*/} - {/* */} - {/*
*/} - {/*
*/} - - {/*{*/} - {/* mySalaryBill.salaryGroups && mySalaryBill.salaryGroups.length > 0 &&*/} - {/* mySalaryBill.salaryGroups.map(group => (*/} - {/*
*/} - {/*
*/} - {/* {*/} - {/* mySalaryBill.employeeInformation && */} - {/* {group.groupName}*/} - {/* */} - {/* }*/} - {/* */} - {/* {*/} - {/* group.items && group.items.map((item, index) => (*/} - {/* */} - {/* 3 ? "1px solid #f2f2f2" : "none",*/} - {/* overflow: "hidden",*/} - {/* textOverflow: "ellipsis",*/} - {/* whiteSpace: "nowrap",*/} - {/* height: "35px"*/} - {/* }}>{item.name}*/} - {/* 3 ? "1px solid #f2f2f2" : "none",*/} - {/* overflow: "hidden",*/} - {/* textOverflow: "ellipsis",*/} - {/* whiteSpace: "nowrap",*/} - {/* height: "35px"*/} - {/* }}*/} - {/* >{item.salaryItemValue}*/} - {/* */} - {/* ))*/} - {/* }*/} - {/* */} - {/*
*/} - {/*
*/} - {/* ))*/} - {/*}*/}
); diff --git a/pc4mobx/hrmSalary/pages/mySalary/index.js b/pc4mobx/hrmSalary/pages/mySalary/index.js index ae35cf9a..6a8fe4c9 100644 --- a/pc4mobx/hrmSalary/pages/mySalary/index.js +++ b/pc4mobx/hrmSalary/pages/mySalary/index.js @@ -106,16 +106,11 @@ export default class MySalary extends React.Component { loading, hasRight, form, - condition, - tableStore, - showSearchAd, - getTableDatas, + setMySalaryBill, doSearch, setShowSearchAd } = mySalaryStore; const { - tabIndex, - myBillTableStore, myBillDataSource, recordListColumns, recordListDataSource, @@ -200,7 +195,7 @@ export default class MySalary extends React.Component { > } // 左侧图标 + icon={} // 左侧图标 iconBgcolor="#F14A2D" // 左侧图标背景色 showDropIcon={true} // 是否显示下拉按钮 dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同) @@ -266,7 +261,9 @@ export default class MySalary extends React.Component { visible={salaryBillVisible} id={this.salaryInfoId} onCancel={() => { - this.setState({ salaryBillVisible: false }); + this.setState({ salaryBillVisible: false },()=>{ + setMySalaryBill({}) + }); }} /> } diff --git a/pc4mobx/hrmSalary/pages/mySalary/index.less b/pc4mobx/hrmSalary/pages/mySalary/index.less index c864ed6d..d989101a 100644 --- a/pc4mobx/hrmSalary/pages/mySalary/index.less +++ b/pc4mobx/hrmSalary/pages/mySalary/index.less @@ -1,10 +1,11 @@ .mySalaryBenefitsWrapper { - .monthPickerWrapper { - display: inline-block; - width: 100px; - } - .betweenLable { - margin-left: 10px; - margin-right: 10px - } -} \ No newline at end of file + .monthPickerWrapper { + display: inline-block; + width: 100px; + } + + .betweenLable { + margin-left: 10px; + margin-right: 10px + } +} diff --git a/pc4mobx/hrmSalary/pages/mySalary/payrollModal.js b/pc4mobx/hrmSalary/pages/mySalary/payrollModal.js index b68c5699..bd82b91d 100644 --- a/pc4mobx/hrmSalary/pages/mySalary/payrollModal.js +++ b/pc4mobx/hrmSalary/pages/mySalary/payrollModal.js @@ -1,160 +1,44 @@ -import React from 'react' -import { Modal, Row, Col } from 'antd' -import { inject, observer } from 'mobx-react'; +import React from "react"; +import { WeaDialog } from "ecCom"; +import { inject, observer } from "mobx-react"; +import { toJS } from "mobx"; +import ComputerTemplate from "../payroll/templatePreview/computerTemplate"; +import "../payroll/templatePreview/index.less"; -@inject('mySalaryStore') +@inject("mySalaryStore") @observer export default class PayrollModal extends React.Component { - componentWillMount() { - const { mySalaryStore: {getMySalaryBill}} = this.props; - console.log("this.props.id", this.props.id) - getMySalaryBill(this.props.id) - } - render() { - const { mySalaryStore: { mySalaryBill }} = this.props; - return ( - { -this.props.onCancel() -}} - width={900} - footer={null}> -
- {/* 标题 */} -
- { mySalaryBill.salaryTemplate && mySalaryBill.salaryTemplate.theme } -
- { - mySalaryBill.salaryTemplate && mySalaryBill.salaryTemplate.background && mySalaryBill.salaryTemplate.background !== "" - &&
- -
- } + componentWillMount() { + const { mySalaryStore: { getMySalaryBill } } = this.props; + getMySalaryBill(this.props.id); + } - {/* 员工信息 */} -
-
- { - mySalaryBill.employeeInformation && - {mySalaryBill.employeeInformation.groupName} - - } - - { - mySalaryBill.employeeInformation && mySalaryBill.employeeInformation.items.map((item, index) => ( - - {item.name} - {item.salaryItemValue} - - )) - } - -
-
- - { - mySalaryBill.salaryGroups && mySalaryBill.salaryGroups.length > 0 && - mySalaryBill.salaryGroups.map(group => ( -
-
- { - mySalaryBill.employeeInformation && - {group.groupName} - - } - - { - group.items && group.items.map((item, index) => ( - - 3 ? "1px solid #f2f2f2" : "none", - overflow: "hidden", - textOverflow: "ellipsis", - whiteSpace: "nowrap", - height: "35px" - }}>{item.name} - 3 ? "1px solid #f2f2f2" : "none", - overflow: "hidden", - textOverflow: "ellipsis", - whiteSpace: "nowrap", - height: "35px" - }} - >{item.salaryItemValue} - - )) - } - -
-
- )) - } -
-
- ) - } -} \ No newline at end of file + render() { + const { mySalaryStore: { mySalaryBill } } = this.props; + const employeeInformation = mySalaryBill.employeeInformation && toJS(mySalaryBill.employeeInformation); + const salaryGroups = mySalaryBill.salaryGroups && toJS(mySalaryBill.salaryGroups); + return ( + { + this.props.onCancel(); + }} + style={{ width: 980 }} + initLoadCss + resize> +
+
+ { + this.props.visible && + + } +
+
+
+ ); + } +} diff --git a/pc4mobx/hrmSalary/pages/payroll/index.js b/pc4mobx/hrmSalary/pages/payroll/index.js index f8308a7a..712a2244 100644 --- a/pc4mobx/hrmSalary/pages/payroll/index.js +++ b/pc4mobx/hrmSalary/pages/payroll/index.js @@ -373,7 +373,7 @@ export default class Payroll extends React.Component { > } // 左侧图标 + icon={} // 左侧图标 iconBgcolor="#F14A2D" // 左侧图标背景色 showDropIcon={true} // 是否显示下拉按钮 dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同) diff --git a/pc4mobx/hrmSalary/pages/payroll/payrollDetail/index.js b/pc4mobx/hrmSalary/pages/payroll/payrollDetail/index.js index 61834899..9feb3538 100644 --- a/pc4mobx/hrmSalary/pages/payroll/payrollDetail/index.js +++ b/pc4mobx/hrmSalary/pages/payroll/payrollDetail/index.js @@ -148,7 +148,7 @@ this.handleGrant(record)
} // 左侧图标 + icon={} // 左侧图标 iconBgcolor='#F14A2D' // 左侧图标背景色 showDropIcon={true} // 是否显示下拉按钮 buttons={[this.getSearchsAdQuick()]} @@ -212,4 +212,4 @@ this.handleSearch()
) } -} \ No newline at end of file +} diff --git a/pc4mobx/hrmSalary/pages/payroll/templatePreview/computerTemplate/index.js b/pc4mobx/hrmSalary/pages/payroll/templatePreview/computerTemplate/index.js index 350a985d..95997099 100644 --- a/pc4mobx/hrmSalary/pages/payroll/templatePreview/computerTemplate/index.js +++ b/pc4mobx/hrmSalary/pages/payroll/templatePreview/computerTemplate/index.js @@ -11,17 +11,17 @@ export default class ComputerTemplate extends React.Component { this.state = { salaryItemSet: [], salaryTemplateShowSet: { - theme:'', - background:'', - textContentPosition: '', - textContent: '' + theme: "", + background: "", + textContentPosition: "", + textContent: "" } }; } componentWillMount() { - if(this.props.isPreview) return; + if (this.props.isPreview) return; let salaryTemplateShowSetStr = window.localStorage.getItem("salaryTemplateShowSet"); let salaryItemSetStr = window.localStorage.getItem("salaryItemSet"); this.setState({ @@ -30,11 +30,20 @@ export default class ComputerTemplate extends React.Component { }); } + componentDidMount() { + if(this.props.isMsgPreview){ + this.setState({ + salaryItemSet: JSON.parse(this.props.salaryItemSet), + salaryTemplateShowSet: JSON.parse(this.props.salaryTemplateShowSet) + }); + } + } + componentWillReceiveProps(nextProps) { - if(nextProps.salaryTemplateShowSet !== this.props.salaryTemplateShowSet){ + if (nextProps.salaryTemplateShowSet !== this.props.salaryTemplateShowSet) { this.setState({ salaryItemSet: JSON.parse(nextProps.salaryItemSet), - salaryTemplateShowSet: JSON.parse(nextProps.salaryTemplateShowSet), + salaryTemplateShowSet: JSON.parse(nextProps.salaryTemplateShowSet) }); } } @@ -61,11 +70,11 @@ export default class ComputerTemplate extends React.Component { }; render() { - const { salaryTemplateShowSet, salaryItemSet }= this.state; + const { salaryTemplateShowSet, salaryItemSet } = this.state; return (
- {salaryTemplateShowSet.theme.replace("${companyName}", "上海泛微").replace("${salaryMonth}", moment(new Date()).format("YYYY-MM"))} + {salaryTemplateShowSet.theme.replace("${companyName}", "").replace("${salaryMonth}", moment(new Date()).format("YYYY-MM"))}
{ salaryTemplateShowSet.background &&
diff --git a/pc4mobx/hrmSalary/pages/salaryFile/index.js b/pc4mobx/hrmSalary/pages/salaryFile/index.js index 0a57dc82..1465078a 100644 --- a/pc4mobx/hrmSalary/pages/salaryFile/index.js +++ b/pc4mobx/hrmSalary/pages/salaryFile/index.js @@ -568,7 +568,7 @@ export default class SalaryFile extends React.Component { > } // 左侧图标 + icon={} // 左侧图标 iconBgcolor="#F14A2D" // 左侧图标背景色 showDropIcon={true} // 是否显示下拉按钮 dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同) diff --git a/pc4mobx/hrmSalary/pages/salaryItem/index.js b/pc4mobx/hrmSalary/pages/salaryItem/index.js index df47eb0e..33003d42 100644 --- a/pc4mobx/hrmSalary/pages/salaryItem/index.js +++ b/pc4mobx/hrmSalary/pages/salaryItem/index.js @@ -292,7 +292,7 @@ export default class SalaryItem extends React.Component { > } // 左侧图标 + icon={} // 左侧图标 iconBgcolor="#F14A2D" // 左侧图标背景色 showDropIcon={true} // 是否显示下拉按钮 dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同) diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js index eca8f1f1..ec8f6898 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js @@ -226,7 +226,7 @@ export default class Archives extends React.Component { > } // 左侧图标 + icon={} // 左侧图标 iconBgcolor="#F14A2D" // 左侧图标背景色 showDropIcon={true} // 是否显示下拉按钮 dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同) diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/copySchemaModal.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/copySchemaModal.js index e3b2cf29..f0d8a2aa 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/copySchemaModal.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/copySchemaModal.js @@ -1,31 +1,47 @@ import React from "react"; -import { Col, Modal, Row } from "antd"; -import { WeaInput } from "ecCom"; +import { WeaDialog, WeaError, WeaFormItem, WeaInput } from "ecCom"; export default class CopySchemaModal extends React.Component { constructor(props) { super(props); this.state = { - value: "" + value: this.props.value || "" }; } render() { return ( - this.props.onCancel()} - visible={this.props.visible}> - - - {`${this.props.title}名称`} - - - { - this.setState({ value: v }); - this.props.onChange(v); - }}/> - - - + this.props.onCancel()} + visible={this.props.visible}> +
+ + + { + if(v === '') this.refs.weaError.showError(); + this.setState({ value: v }); + this.props.onChange(v); + }}/> + + +
+
); } } diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/index.js index 764b1659..607e1274 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/index.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/index.js @@ -1,10 +1,8 @@ import React from "react"; import { inject, observer } from "mobx-react"; import { toJS } from "mobx"; -import { Button, DatePicker, Dropdown, Menu, message, Modal, Switch } from "antd"; - +import { Button, Dropdown, Menu, message, Modal, Switch } from "antd"; import { WeaRightMenu, WeaSelect, WeaSlideModal, WeaTop } from "ecCom"; - import { WeaTableNew } from "comsMobx"; import "./index.less"; import { renderNoright } from "../../../util"; // 渲染form数据的方法:因为多个页面都会使用,所以抽的公共方法在util中 @@ -20,8 +18,6 @@ import CopySchemaModal from "./copySchemaModal"; const WeaMobxTable = WeaTableNew.WeaTable; -const { MonthPicker } = DatePicker; - @inject("programmeStore", "taxAgentStore", "salaryFileStore") @observer export default class Programme extends React.Component { @@ -436,8 +432,12 @@ export default class Programme extends React.Component { const handleCopyModalSave = () => { const { programmeStore: { copyScheme } } = this.props; const { copyId, copyModalValue } = this.state; - copyScheme({ id: copyId, schemeName: copyModalValue }); - this.setState({ copyModalVisible: false }); + if(_.isEmpty(this.refs.copyRef.state.value)){ + this.refs.copyRef.refs.weaError.showError(); + }else{ + copyScheme({ id: copyId, schemeName: copyModalValue }); + this.setState({ copyModalVisible: false }); + } }; const handleSlideClose = () => { @@ -454,7 +454,7 @@ export default class Programme extends React.Component { {/* 收藏功能: 配置之后显示 收藏、帮助、显示页面地址 这3个功能 */} } // 左侧图标 + icon={} // 左侧图标 iconBgcolor="#F14A2D" // 左侧图标背景色 showDropIcon={true} // 是否显示下拉按钮 dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同) @@ -573,6 +573,7 @@ export default class Programme extends React.Component { {this.state.copyModalVisible && it.viewcondition === selectedKey)[0].title} visible={this.state.copyModalVisible} value={this.state.copyModalValue} @@ -581,13 +582,13 @@ export default class Programme extends React.Component { this.setState({ copyModalVisible: false }); }} footer={ - + ] } />} diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/index.js index 7bb05678..bbb547ad 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/index.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/index.js @@ -437,7 +437,7 @@ export default class StandingBook extends React.Component { > } // 左侧图标 + icon={} // 左侧图标 iconBgcolor="#F14A2D" // 左侧图标背景色 buttons={showOperateBtn ? rightBtns : []} // showDropIcon={true} // 是否显示下拉按钮 diff --git a/pc4mobx/hrmSalary/pages/taxAgent/slideTaxagentUser.js b/pc4mobx/hrmSalary/pages/taxAgent/slideTaxagentUser.js index 6281d96b..a076a2ea 100644 --- a/pc4mobx/hrmSalary/pages/taxAgent/slideTaxagentUser.js +++ b/pc4mobx/hrmSalary/pages/taxAgent/slideTaxagentUser.js @@ -147,7 +147,7 @@ export default class SlideTaxagentUser extends React.Component { float: "left" }}> { - hideIconInTax && !showSalaryItemBtn && + (hideIconInTax || showSalaryItemBtn) &&