bug修改

This commit is contained in:
MustangDeng 2022-05-31 16:21:25 +08:00
parent 95166a6534
commit c5b401f9f4
6 changed files with 32 additions and 7 deletions

View File

@ -15,6 +15,7 @@ import CustomTab from '../../../components/customTab';
import ContentWrapper from '../../../components/contentWrapper';
import ImportModal from '../../../components/importModal'
import { columns, dataSource, modalColumns } from './columns';
import { optionAddAll } from '../../../util/options'
const { MonthPicker } = DatePicker;
@ -88,11 +89,16 @@ export default class CumDeduct extends React.Component {
this.state.inited && <WeaSelect
showSearch // 设置select可搜索
style={{ width: 200 }}
options={taxAgentOption}
options={optionAddAll(taxAgentOption)}
value={taxAgentId}
onChange={v => {
this.setState({taxAgentId: v})
getTableDatas({taxAgentId: v, declareMonth: [monthValue]})
if(v == "All") {
getTableDatas({taxAgentId: "", declareMonth: [monthValue]})
} else {
getTableDatas({taxAgentId: v, declareMonth: [monthValue]})
}
}}
/>
}
@ -104,7 +110,6 @@ export default class CumDeduct extends React.Component {
renderFormComponent() {
const { modalParam } = this.state
const { taxAgentStore: {taxAgentOption} } = this.props;
let options = [...taxAgentOption]
return (
<Row>
<Col span={12}>

View File

@ -15,6 +15,7 @@ import CustomTab from '../../../components/customTab';
import ContentWrapper from '../../../components/contentWrapper';
import ImportModal from '../../../components/importModal'
import { columns, dataSource, modalColumns } from './columns';
import { optionAddAll } from '../../../util/options';
const { MonthPicker } = DatePicker;
@ -85,10 +86,14 @@ export default class CumSituation extends React.Component {
this.state.inited && <WeaSelect
showSearch // 设置select可搜索
style={{ width: 200 }}
options={taxAgentOption}
options={optionAddAll(taxAgentOption)}
value={taxAgentId}
onChange={v => {
this.setState({taxAgentId: v})
let taxAgentId = v;
if(v == "All") {
taxAgentId = ""
}
getTableDatas({ taxAgentId: v, taxYearMonth: [monthValue]})
}}
/>

View File

@ -23,6 +23,7 @@ import "./index.less"
import SlideModalTitle from '../../../components/slideModalTitle';
import EditSlideContent from './editSlideContent';
import { optionAddAll } from '../../../util/options';
@inject('otherDeductStore', "taxAgentStore")
@ -85,10 +86,14 @@ export default class OtherDeduct extends React.Component {
this.state.inited && <WeaSelect
showSearch // 设置select可搜索
style={{ width: 200 }}
options={taxAgentOption}
options={optionAddAll(taxAgentOption)}
value={taxAgentId}
onChange={v => {
this.setState({taxAgentId: v})
let taxAgentId = v
if(v == "All") {
taxAgentId = ""
}
getTableDatas({ taxAgentId: v, declareMonth: [monthValue]})
}}
/>

View File

@ -118,7 +118,7 @@ export default class SalaryItemForm extends React.Component {
{
itemGroups && itemGroups.map(item => {
if(item.items) {
item.items.map(i => {i.key = i.id})
item.items && item.items.map(i => {i.key = i.id})
return (
<CanMoveItem dataSource={item.items} onDataSourceChange={(dataSource) => {this.handleItemDataSourceChange(dataSource, item)}} title={item.name} onGroupDelete={() => {this.handleGroupDelete(item)}} onTitleChange={(value) => {this.handleItemTitleChange(item, value)}} onChange={(dataSource) => {this.handleCanMoveItemChange(dataSource, item)}}/>
)

View File

@ -449,7 +449,7 @@ export class LedgerStore {
listSalaryItem = (searchValue = "", current = 1) => {
let excludeIds = []
this.itemGroups.map(item => {
item.items.map(i => {
item.items && item.items.map(i => {
excludeIds.push(i.salaryItemId)
})
})

View File

@ -0,0 +1,10 @@
// 添加全部选项
export const optionAddAll = (options) => {
let results = [...options];
results.unshift({
key: "All",
showname: "全部",
selected: false
})
return results;
}