diff --git a/pc4mobx/hrmSalary/pages/declare/generateDeclarationDetail.js b/pc4mobx/hrmSalary/pages/declare/generateDeclarationDetail.js
index cdfe5a73..91a1a88f 100644
--- a/pc4mobx/hrmSalary/pages/declare/generateDeclarationDetail.js
+++ b/pc4mobx/hrmSalary/pages/declare/generateDeclarationDetail.js
@@ -1,27 +1,24 @@
import React from "react";
-import CustomTab from "../../components/customTab";
import { inject, observer } from "mobx-react";
+import { WeaLocaleProvider, WeaTable, WeaTop } from "ecCom";
import { getQueryString } from "../../util/url";
import * as API from "../../apis/declare";
import { Button } from "antd";
-import UnifiedTable from "../../components/UnifiedTable";
import "./index.less";
+const { getLabel } = WeaLocaleProvider;
@inject("taxAgentStore")
@observer
export default class GenerateDeclarationDetail extends React.Component {
constructor(props) {
super(props);
this.state = {
- loading: false,
- dataSource: [],
- columns: [],
- pageInfo: { current: 1, pageSize: 10, total: 0 },
- declareInfo: {}
+ loading: false, dataSource: [], columns: [], declareInfo: {},
+ pageInfo: { current: 1, pageSize: 10, total: 0 }
};
}
- componentWillMount() {
+ componentDidMount() {
this.getDetailList();
this.getDeclareInfo();
}
@@ -37,31 +34,19 @@ export default class GenerateDeclarationDetail extends React.Component {
if (status) {
const { columns, list: dataSource, pageNum: current, pageSize, total } = data;
this.setState({
- dataSource,
- pageInfo: {
- ...pageInfo,
- current, pageSize, total
- },
+ dataSource, pageInfo: { ...pageInfo, current, pageSize, total },
columns: _.map(_.filter(columns, it => it.dataIndex !== "jobNum"), item => {
if (item.dataIndex === "username") {
return {
- ...item,
- render: (text, record) => {
- return window.pointerXY(e)}
- title={text}
- >
- {text}
- ;
- }
+ ...item, width: 180,
+ render: (text, record) => ( window.pointerXY(e)}
+ title={text}>{text})
};
}
return {
- ...item,
- render: (text) => {
- return {text};
- }
+ ...item, width: (item.dataIndex === "cardType" || item.dataIndex === "cardNum") ? 180 : 100,
+ render: (text) => ({text})
};
})
});
@@ -78,26 +63,19 @@ export default class GenerateDeclarationDetail extends React.Component {
const url = `${window.location.origin}/api/bs/hrmsalary/taxdeclaration/export?taxDeclarationId=${getQueryString("id")}`;
window.open(url, "_self");
};
+ renderTitle = () => {
+ const { declareInfo } = this.state;
+ return (