测试bug

This commit is contained in:
liyongshun 2022-06-23 16:20:49 +08:00
parent e3d30694c3
commit 9a6344dae1
11 changed files with 141 additions and 73 deletions

View File

@ -13,7 +13,7 @@ import { inject, observer } from 'mobx-react';
import CustomTable from '../../components/customTable'
import CustomPaginationTable from '../../components/customPaginationTable'
@inject('calculateStore')
@inject('calculateStore', 'taxAgentStore')
@observer
export default class SalaryDetail extends React.Component {
constructor(props) {
@ -128,7 +128,7 @@ export default class SalaryDetail extends React.Component {
render() {
const { slideVisiable } = this.state;
const { calculateStore } = this.props;
const { calculateStore, taxAgentStore: { showOperateBtn } } = this.props;
const { acctResultListDateSource, acctResultListColumns, baseSalarySobCycle, acctResultListPageInfo, loading } = calculateStore
return (
<div className="salaryDetail">
@ -181,6 +181,7 @@ export default class SalaryDetail extends React.Component {
<SlideModalTitle
subtitle={"编辑薪资"}
editable={true}
showOperateBtn={showOperateBtn}
onSave={() => this.handleEditSlideSave()}
/>
}

View File

@ -1,72 +1,115 @@
import React from 'react';
import { Row, Col, Table, DatePicker } from "antd"
import { inject, observer } from 'mobx-react';
import { WeaInput, WeaTextarea, WeaSearchGroup, WeaSelect, WeaCheckbox, WeaTable } from "ecCom";
import { slideColumns, slideDataSource, columns } from './columns';
import "./editSlideContent.less"
import React from "react";
import { Row, Col, Table, DatePicker } from "antd";
import { inject, observer } from "mobx-react";
import {
WeaInput,
WeaTextarea,
WeaSearchGroup,
WeaSelect,
WeaCheckbox,
WeaTable
} from "ecCom";
import { slideColumns, slideDataSource, columns } from "./columns";
import "./editSlideContent.less";
// import { WeaTableNew } from "comsMobx"
// const WeaTable = WeaTableNew.WeaTable;
import moment from 'moment'
import moment from "moment";
const { MonthPicker } = DatePicker;
let emptyItem = {
incomeLowerLimit: "0.00",
incomeUpperLimit: "0.00",
dutyFreeValue: "0.00",
dutyFreeRate: "0.00",
taxableIncomeLl: "0.00",
taxableIncomeUl: "0.00",
taxRate: "0.00",
taxDeduction: "0.00"
}
incomeLowerLimit: "0.00",
incomeUpperLimit: "0.00",
dutyFreeValue: "0.00",
dutyFreeRate: "0.00",
taxableIncomeLl: "0.00",
taxableIncomeUl: "0.00",
taxRate: "0.00",
taxDeduction: "0.00"
};
@inject('attendanceStore')
@inject("attendanceStore")
@observer
export default class EditSlideContent extends React.Component {
constructor(props) {
super(props);
}
constructor(props) {
super(props);
}
componentWillMount() {
// 初始化渲染页面
const { attendanceStore: { viewAttendQuote } } = this.props;
viewAttendQuote({ attendQuoteId: this.props.id });
}
componentWillMount() { // 初始化渲染页面
const {attendanceStore: {viewAttendQuote}} = this.props;
viewAttendQuote({attendQuoteId: this.props.id})
}
getColumns(columns) {
let result = [...columns];
return result.filter(item => item.hide == "false");
}
getColumns(columns) {
let result = [...columns]
return result.filter(item => item.hide == "false")
}
getScrollWidth() {
const { attendanceStore } = this.props;
const { attendQuoteDetailTableStore } = attendanceStore;
return (
this.getColumns(
attendQuoteDetailTableStore.columns
? attendQuoteDetailTableStore.columns
: []
).length * 150
);
}
getScrollWidth() {
const { attendanceStore } = this.props;
const { attendQuoteDetailTableStore} = attendanceStore;
return this.getColumns(attendQuoteDetailTableStore.columns ? attendQuoteDetailTableStore.columns : []).length * 150
}
render() {
const {
attendanceStore,
attendanceStore: { viewAttendQuote }
} = this.props;
const {
attendQuoteDetailPageInfo,
attendQuoteDetailTableStore
} = attendanceStore;
render() {
const { attendanceStore } = this.props;
const { attendQuoteDetailPageInfo, attendQuoteDetailTableStore} = attendanceStore;
return (
<div className="attendSlide">
<div className="titleWrapper">
{
this.props.salaryYearMonth != "" &&
<div className="slideLeftTitle">考勤周期 {this.props.salaryYearMonth}</div>
}
</div>
<div>
<WeaTable
columns={this.getColumns(attendQuoteDetailTableStore.columns ? attendQuoteDetailTableStore.columns : [])}
dataSource={attendQuoteDetailPageInfo.list ? attendQuoteDetailPageInfo.list : []}
scroll={{x: this.getScrollWidth()}}
/>
</div>
</div>
)
}
}
const pagination = {
total: attendQuoteDetailPageInfo.total,
showTotal: total => `${total}`,
showSizeChanger: true,
pageSizeOptions: ["10", "20", "50", "100"],
onShowSizeChange: (current, pageSize) => {
viewAttendQuote({ attendQuoteId: this.props.id, current, pageSize });
},
onChange: current => {
viewAttendQuote({
attendQuoteId: this.props.id,
current,
pageSize: attendQuoteDetailPageInfo.pageSize
});
}
};
return (
<div className="attendSlide">
<div className="titleWrapper">
{this.props.salaryYearMonth != "" &&
<div className="slideLeftTitle">
考勤周期 {this.props.salaryYearMonth}
</div>}
</div>
<div>
<WeaTable
columns={this.getColumns(
attendQuoteDetailTableStore.columns
? attendQuoteDetailTableStore.columns
: []
)}
dataSource={
attendQuoteDetailPageInfo.list
? attendQuoteDetailPageInfo.list
: []
}
pagination={pagination}
scroll={{ x: this.getScrollWidth() }}
/>
</div>
</div>
);
}
}

View File

@ -223,6 +223,11 @@ export default class Attendance extends React.Component {
viewAttendQuote(request)
}
handleExportAttendQuote= ()=>{
const url= `${window.location.origin}/api/bs/hrmsalary/attendQuote/export?attendQuoteId=${this.recordId}`
window.open(url, '_self');
}
render() {
const { attendanceStore, taxAgentStore: {showOperateBtn} } = this.props;
const { modalParam } = this.state;
@ -354,9 +359,11 @@ export default class Attendance extends React.Component {
<div style={{display: "inline-block"}}>
{
showOperateBtn &&
<Dropdown.Button overlay={menu} type="primary">导出</Dropdown.Button>
<Button type="primary" onClick={this.handleExportAttendQuote}>导出全部</Button>
// <Dropdown.Button onClick={this.handleExportAttendQuote} overlay={menu} type="primary" visible={ false }>导出全部</Dropdown.Button>
}
<WeaInputSearch
style={{ marginLeft: 10 }}
placeholder="请输入姓名/部门/工号/手机号"
onChange={(v) => {this.setState({searchValue: v})}}
onSearch={(v) => {this.handleSearch({keyword: v})}}
@ -394,7 +401,7 @@ export default class Attendance extends React.Component {
const menu = (
<Menu>
<Menu.Item key="1">导出全部</Menu.Item>
<Menu.Item key="1">导出选中</Menu.Item>
</Menu>
);

View File

@ -429,6 +429,7 @@ export default class CumDeduct extends React.Component {
const pagination = {
total: pageObj.total,
showTotal: (total) => `${total}`,
pageSizeOptions: ["10", "20", "50", "100"],
showSizeChanger: true,
onShowSizeChange(current, pageSize) {
setPageObj({ ...pageObj, current, pageSize });
@ -487,7 +488,7 @@ export default class CumDeduct extends React.Component {
),
};
} else {
return { ...item };
return { ...item, width: 150 };
}
});

View File

@ -43,5 +43,15 @@
text-decoration: none;
}
}
}
}
.wea-new-table {
.ant-table-tbody {
tr {
td {
height: 41px !important;
border-bottom: 1px solid #e2e2e2 !important;
}
}
}
}

View File

@ -436,6 +436,7 @@ export default class CumSituation extends React.Component {
total: pageObj.total,
showTotal: (total) => `${total}`,
showSizeChanger: true,
pageSizeOptions: ["10", "20", "50", "100"],
onShowSizeChange(current, pageSize) {
setPageObj({ ...pageObj, current, pageSize });
getTableDatas({

View File

@ -432,6 +432,7 @@ export default class OtherDeduct extends React.Component {
total: pageObj.total,
showTotal: (total) => `${total}`,
showSizeChanger: true,
pageSizeOptions: ["10", "20", "50", "100"],
onShowSizeChange(current, pageSize) {
setPageObj({ ...pageObj, current, pageSize });
getTableDatas({

View File

@ -363,6 +363,7 @@ export default class Ledger extends React.Component {
total: pageObj.total,
showTotal: (total) => `${total}`,
showSizeChanger: true,
pageSizeOptions: ["10", "20", "50", "100"],
onShowSizeChange: (current, pageSize) => {
setPageObj({ ...pageObj, current, pageSize });
getTableDatas({ current, pageSize, name: this.state.searchValue });

View File

@ -92,10 +92,12 @@ export default class PayrollDetail extends React.Component {
}
// 导出全部
handleExportAll() {
const { payrollStore } = this.props;
const { exportDetailList } = payrollStore
exportDetailList({salarySendId: this.state.currentId})
handleExportAll=()=> {
// const { payrollStore } = this.props;
// const { exportDetailList } = payrollStore
// exportDetailList({salarySendId: this.state.currentId})
const url= `${window.location.origin}/api/bs/hrmsalary/salaryBill/send/exportDetailList?salarySendId=${this.state.currentId}`
window.open(url, '_self');
}
getSearchsAdQuick() {
@ -112,7 +114,8 @@ export default class PayrollDetail extends React.Component {
</Menu>
);
return (
<Dropdown.Button type="primary" style={{marginRight: "10px"}} overlay={menu} onClick={() => {this.handleExportAll()}}>导出全部</Dropdown.Button>
// <Dropdown.Button type="primary" style={{marginRight: "10px"}} overlay={menu} onClick={() => {this.handleExportAll()}}>导出全部</Dropdown.Button>
<Button type="primary" onClick={this.handleExportAll}>导出全部</Button>
)
// return (<div></div>)
}

View File

@ -62,7 +62,6 @@ export default class StandingBook extends React.Component {
const { taxAgentStore: {getPermission}, standingBookStore: {getAdminTaxAgentList}} = this.props
getPermission().then(({status, data}) => {
if(status) {
console.log("data:", data);
this.setState({adminData : data})
if(data.isAdminEnable) {
getAdminTaxAgentList().then((data) => {
@ -328,7 +327,7 @@ export default class StandingBook extends React.Component {
}
render() {
const { standingBookStore } = this.props;
const { standingBookStore, taxAgentStore: { showOperateBtn } } = this.props;
const {
inspectLoading,
loading,
@ -353,7 +352,7 @@ export default class StandingBook extends React.Component {
return renderNoright();
}
const rightBtns = (!this.state.adminData.isDefaultOpen || this.state.adminData.isDefaultOpen && this.state.adminData.isAdminEnable) ? [
const rightBtns = [
// 右键菜单
<Button
type="primary"
@ -368,7 +367,7 @@ export default class StandingBook extends React.Component {
}}>
核算
</Button>
] : [];
];
const rightMenu = [
// 右键菜单
{
@ -428,7 +427,7 @@ export default class StandingBook extends React.Component {
title="社保福利台账" // 文字
icon={<i className="icon-coms-meeting" />} // 左侧图标
iconBgcolor="#F14A2D" // 左侧图标背景色
buttons={rightBtns}
buttons={showOperateBtn ? rightBtns : []}
// showDropIcon={true} // 是否显示下拉按钮
// dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同)
// dropMenuProps={{ collectParams }} // 收藏功能: 配置之后显示 收藏、帮助、显示页面地址 这3个功能

View File

@ -305,6 +305,7 @@ export default class TaxAgent extends React.Component {
total: pageObj.total,
showTotal: total => `${total}`,
showSizeChanger: true,
pageSizeOptions: ["10", "20", "50", "100"],
onShowSizeChange(current, pageSize) {
doInit({ current, pageSize });
},