From bbb41897005b77604a9bfe9a291d8091b4020528 Mon Sep 17 00:00:00 2001 From: liyongshun <971387674@qq.com> Date: Fri, 17 Jun 2022 17:12:21 +0800 Subject: [PATCH] =?UTF-8?q?=E8=96=AA=E8=B5=84=E8=B4=A6=E5=A5=97=E5=A4=8D?= =?UTF-8?q?=E5=88=B6=E6=B7=BB=E5=8A=A0=E4=B8=AA=E7=A8=8E=E6=89=A3=E7=BC=B4?= =?UTF-8?q?=E4=B9=89=E5=8A=A1=E4=BA=BA=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hrmSalary/pages/ledger/copyFormModal.js | 89 +++++++++++++------ pc4mobx/hrmSalary/pages/ledger/index.js | 5 +- pc4mobx/hrmSalary/stores/ledger.js | 4 +- 3 files changed, 66 insertions(+), 32 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/ledger/copyFormModal.js b/pc4mobx/hrmSalary/pages/ledger/copyFormModal.js index c74667e7..231feb79 100644 --- a/pc4mobx/hrmSalary/pages/ledger/copyFormModal.js +++ b/pc4mobx/hrmSalary/pages/ledger/copyFormModal.js @@ -1,30 +1,63 @@ -import React from 'react' -import { Modal, Button, Row, Col } from 'antd' -import { WeaInput } from 'ecCom' +import React from "react"; +import { Modal, Button, Row, Col } from "antd"; +import { WeaInput, WeaSelect } from "ecCom"; export default class CopyFormModal extends React.Component { - constructor(props) { - super(props) - this.state = { - name: "" - } - } - render() { - return ( - this.props.onCancel()} - footer={} - > - - 账套名称 - - {this.setState({name: value})}} /> - - - - ) - } -} \ No newline at end of file + constructor(props) { + super(props); + this.state = { + name: "", + taxAgentId: "" + }; + } + render() { + const { taxAgentStore } = this.props; + const { taxAgentOption } = taxAgentStore; + return ( + this.props.onCancel()} + footer={ + + }> + + 账套名称 + + { + this.setState({ name: value }); + }} + /> + + + + 个税扣缴义务人 + + { + this.setState({ taxAgentId: value }); + }} + /> + + + + ); + } +} diff --git a/pc4mobx/hrmSalary/pages/ledger/index.js b/pc4mobx/hrmSalary/pages/ledger/index.js index 44d5dd88..8d3e464f 100644 --- a/pc4mobx/hrmSalary/pages/ledger/index.js +++ b/pc4mobx/hrmSalary/pages/ledger/index.js @@ -200,7 +200,7 @@ export default class Ledger extends React.Component { const { ledgerStore: { doCopy }, } = this.props; - doCopy(this.state.currentReocrd.id, value).then(() => { + doCopy({id:this.state.currentReocrd.id, ...value}).then(() => { this.setState({ copyFormVisible: false }); }); }; @@ -214,7 +214,7 @@ export default class Ledger extends React.Component { }; render() { - const { ledgerStore } = this.props; + const { ledgerStore, taxAgentStore } = this.props; const { loading, dataSource, @@ -608,6 +608,7 @@ export default class Ledger extends React.Component { {this.state.copyFormVisible && ( this.handleCopySave(value)} onCancel={() => { diff --git a/pc4mobx/hrmSalary/stores/ledger.js b/pc4mobx/hrmSalary/stores/ledger.js index 38276392..cf9a0d38 100644 --- a/pc4mobx/hrmSalary/stores/ledger.js +++ b/pc4mobx/hrmSalary/stores/ledger.js @@ -300,9 +300,9 @@ export class LedgerStore { // 复制 @action - doCopy = (id, name) => { + doCopy = params => { return new Promise((resolve, reject) => { - API.duplicateLedger({ id, name }).then(res => { + API.duplicateLedger({ ...params }).then(res => { if (res.status) { message.success("复制成功"); this.getTableDatas({});