liting2017 6 years ago
parent
commit
9f6c4f3c9b

+ 6 - 4
js/component/manageCenter/financialManage/distribute/paiDan.jsx

@@ -61,6 +61,7 @@ const PaiDan = React.createClass({
 					this.state.pagination.total=0
 				}
                 this.setState({
+                    totalPage:data.data.totalPage,
                     dataSource: theArr,
                     pagination: this.state.pagination
                 });
@@ -76,6 +77,7 @@ const PaiDan = React.createClass({
             searchMore: true,
             assignVisible:false,
             releaseDate: [],
+            totalPage:0,
             boHuivisible:false,
             selectedRowKeys: [],
             selectedRows: [],
@@ -166,12 +168,12 @@ const PaiDan = React.createClass({
     boHuiOk(){
         this.setState({
             boHuiVisible:false
-        })
-        if((this.state.pagination.total)%10==1){
+        });
+        if((this.state.pagination.current==this.state.totalPage)&&(this.state.pagination.total)%10==1){
             this.loadData((this.state.page)-1);
         }else{
             this.loadData(this.state.page);
-        }
+        };
     },
     boHuiCancel(e){
         this.setState({
@@ -196,7 +198,7 @@ const PaiDan = React.createClass({
     closeAssign(e, s) {
         this.state.assignVisible = e;
         if (s) {
-            if((this.state.pagination.total)%10==1){
+            if((this.state.pagination.current==this.state.totalPage)&&(this.state.pagination.total)%10==1){
                 this.loadData((this.state.page)-1);
             }else{
                 this.loadData(this.state.page);

+ 3 - 1
js/component/manageCenter/financialManage/distribute/shouKuang.jsx

@@ -65,6 +65,7 @@ const ShouKuang = React.createClass({
 					this.state.pagination.total=0
 				}
                 this.setState({
+                    totalPage:data.data.totalPage,
                     dataSource: theArr,
                     pagination: this.state.pagination
                 });
@@ -81,6 +82,7 @@ const ShouKuang = React.createClass({
             assignVisible:false,
             releaseDate: [],
             assignData:[],
+            totalPage:0,
             boHuivisible:false,
             selectedRowKeys: [],
             selectedRows: [],
@@ -170,7 +172,7 @@ const ShouKuang = React.createClass({
         this.setState({
             boHuiVisible:false
         })
-        if((this.state.pagination.total)%10==1){
+        if((this.state.pagination.current==this.state.totalPage)&&(this.state.pagination.total)%10==1){
             this.loadData((this.state.page)-1);
         }else{
             this.loadData(this.state.page);

+ 5 - 1
js/component/manageCenter/financialManage/distribute/tuiDan.jsx

@@ -68,6 +68,7 @@ const TuiDan = React.createClass({
 					this.state.pagination.total=0
 				}
                 this.setState({
+                    totalPage:data.data.totalPage,
                     dataSource: theArr,
                     pagination: this.state.pagination
                 });
@@ -83,6 +84,7 @@ const TuiDan = React.createClass({
             searchMore: true,
             assignVisible:false,
             releaseDate: [],
+            totalPage:0,
             assignData:[],
             boHuivisible:false,
             selectedRowKeys: [],
@@ -189,8 +191,10 @@ const TuiDan = React.createClass({
         this.state.examineVisible = e;
         if (s) {
             if(nub=='2'){
-                if((this.state.pagination.page%10) == '1'){
+                if((this.state.pagination.current==this.state.totalPage)&&(this.state.pagination.total)%10==1){
                     this.loadData(this.state.page-1);
+                }else{
+                    this.loadData(this.state.page);
                 }
             }else{
                 this.loadData(this.state.page);

+ 5 - 1
js/component/manageCenter/index/contacts/index.jsx

@@ -5,6 +5,7 @@ import moment from 'moment';
 import '@/manageCenter/financialManage/distribute/public.less';
 import {  Button, Input, Spin, Table, Select, message } from 'antd';
 import SelContact from './selContact';
+import {getPost} from '@/tools';
 
 const Contact = React.createClass({
     departmentList() {
@@ -132,7 +133,10 @@ const Contact = React.createClass({
                 },{
                     title: '职务',
                     dataIndex: 'position',
-                    key: 'position'
+                    key: 'position',
+                    render:text=>{
+                        return getPost(text)
+                    }
                 },{
                     title: '联系手机',
                     dataIndex: 'contactMobile',

+ 5 - 1
js/component/manageCenter/publicComponent/assign.jsx

@@ -2,6 +2,7 @@ import React from 'react';
 import ajax from 'jquery/src/ajax/xhr.js';
 import $ from 'jquery/src/ajax';
 import { Form,Radio, Button, Input, Select, Spin, Table, message, Modal ,Popconfirm} from 'antd';
+import {getPost} from '@/tools'; 
 
 const Assign=React.createClass({
     departmentList() {
@@ -81,7 +82,10 @@ const Assign=React.createClass({
                     title: '职务',
                     dataIndex: 'position',
                     key: 'position',
-                    width:100
+                    width:100,
+                    render:text=>{
+                        return getPost(text)
+                    }
                 },{
                     title: '联系手机',
                     dataIndex: 'contactMobile',