diff --git a/pc4mobx/hrmSalary/pages/mobilePayroll/index.js b/pc4mobx/hrmSalary/pages/mobilePayroll/index.js index 4bc9f127..fe3af2ac 100644 --- a/pc4mobx/hrmSalary/pages/mobilePayroll/index.js +++ b/pc4mobx/hrmSalary/pages/mobilePayroll/index.js @@ -1,168 +1,172 @@ -import React from 'react' -import { Modal, Row, Col } from 'antd' -import { inject, observer } from 'mobx-react'; -import { getQueryString } from '../../util/url' +import React from "react"; +import { Col, Row } from "antd"; +import { inject, observer } from "mobx-react"; +import { getQueryString } from "../../util/url"; +import Authority from "../mySalary/authority"; -@inject('mySalaryStore') +@inject("mySalaryStore") @observer export default class MobilePayroll extends React.Component { - constructor(props) { - super(props) - this.id = ""; - this.state = { - type: 'phone' - } - } + constructor(props) { + super(props); + this.id = ""; + this.state = { + type: "phone" + }; + } - componentWillMount() { - let id = getQueryString("id"); - let type = getQueryString("type"); - this.setState({type}) - this.id = id; - const { mySalaryStore: {getMySalaryBill}} = this.props; - getMySalaryBill(this.id) - } + componentWillMount() { + let id = getQueryString("id"); + let type = getQueryString("type"); + this.setState({ type }); + this.id = id; + const { mySalaryStore: { getMySalaryBill, init } } = this.props; + init(); + getMySalaryBill(this.id); + } - render() { - const { mySalaryStore: { mySalaryBill }} = this.props; - const { type } = this.state - return ( -