feature/2.15.2.2409.01合并业务线测试

This commit is contained in:
lys 2024-10-31 15:13:57 +08:00
parent 09ea3da3e3
commit e4800170a8
2 changed files with 20 additions and 10 deletions

View File

@ -157,7 +157,7 @@ class LedgerBaseSetting extends Component {
};
render() {
const { editId, record } = this.props;
const { editId, record, PageAndOptAuth } = this.props;
const { baseForm, settingBaseInfo } = this.state;
const { canEdit, taxAgentId } = settingBaseInfo;
let taxAgentIdDisabled = false, taxableItemsDisabled = false;
@ -169,8 +169,7 @@ class LedgerBaseSetting extends Component {
{
_.map(baseForm, item => {
const { key, label, type, options = [], children = [], multiple = false } = item;
taxAgentIdDisabled = false;
// taxAgentIdDisabled = key === "taxAgentId" && editId && taxAgentId;
taxAgentIdDisabled = key === "taxAgentId" && editId && !PageAndOptAuth.isChief;
taxableItemsDisabled = key === "taxableItems" && editId;
return <WeaFormItem
key={key} label={label}
@ -191,8 +190,8 @@ class LedgerBaseSetting extends Component {
</React.Fragment> :
type === "SELECT" ?
<WeaSelect value={settingBaseInfo[key]}
options={options} viewAttr={3} multiple={multiple}
disabled={!admin || taxAgentIdDisabled || taxableItemsDisabled}
options={options} viewAttr={taxAgentIdDisabled ? 1 : 3} multiple={multiple}
disabled={!admin || taxableItemsDisabled}
onChange={(v) => this.handleChangeField(key, v)}/> :
type === "CUSTOM" ?
<CustomSelect list={children} baseInfo={settingBaseInfo} inputStr={key} admin={admin}

View File

@ -7,7 +7,7 @@
import React, { Component } from "react";
import { inject, observer } from "mobx-react";
import { WeaLocaleProvider, WeaTop } from "ecCom";
import { Button } from "antd";
import { Button, Modal } from "antd";
import LedgerTable from "./components/ledgerTable";
import LedgerSlide from "./components/ledgerSlide";
import LedgerSearchComp from "./components/ledgerSearchComp";
@ -50,6 +50,19 @@ class Index extends Component {
break;
}
};
handleNewBuild = () => {
const { taxAgentStore } = this.props;
const { PageAndOptAuth } = taxAgentStore;
if (!PageAndOptAuth.isAdminEnable && !PageAndOptAuth.isChief) {
Modal.info({
title: getLabel(111, "提示"),
content: getLabel(111, "业务线人员新建账套后,需联系总管理员,将该账套加入所属业务线。"),
onOk: () => this.setState({ slideparams: { ...this.state.slideparams, visible: true } })
});
} else {
this.setState({ slideparams: { ...this.state.slideparams, visible: true } });
}
};
render() {
const { logDialogVisible, filterConditions, doSearch, slideparams } = this.state;
@ -57,9 +70,7 @@ class Index extends Component {
const { PageAndOptAuth } = taxAgentStore;
const admin = PageAndOptAuth.opts.includes("admin");
const btns = [
<Button type="primary" onClick={() => this.setState({ slideparams: { ...slideparams, visible: true } })}>
{getLabel(111, "新建")}
</Button>,
<Button type="primary" onClick={this.handleNewBuild}>{getLabel(111, "新建")}</Button>,
<LedgerSearchComp onSearch={() => this.setState({ doSearch: !doSearch })}/>
];
return (
@ -78,7 +89,7 @@ class Index extends Component {
<LedgerTable doSearch={doSearch} onEditLedger={this.handleEditLedger}
onFilterLog={(type, targetid) => this.onDropMenuClick(type, targetid)}/>
<LedgerSlide
{...slideparams}
{...slideparams} PageAndOptAuth={PageAndOptAuth}
onCancel={this.handleResetLedger}
onRefreshList={() => this.setState({ doSearch: !doSearch })}
/>