Browse Source

优化校对

liting2017 6 years ago
parent
commit
29f0453ff8

+ 11 - 5
js/component/manageCenter/financialManage/bonus/yxBonus.jsx

@@ -176,6 +176,11 @@ const YxBonus = React.createClass({
                     }
                 },
                 {
+                    title: '校对后单量',
+                    dataIndex: 'proofCount',
+                    key: 'proofCount'
+                },
+                {
                     title: '已收(万元)',
                     dataIndex: 'settlementAmount',
                     key: 'settlementAmount'
@@ -190,8 +195,8 @@ const YxBonus = React.createClass({
                     key: 'state11',
                     render:(text,recard)=>{
                         return <div>
-                            {(recard.proofStatus&&!recard.grantStatus)?<Button type="primary" onClick={(e)=>{e.stopPropagation(),this.proofread(recard,0)}}>发放</Button>:''}
-                            {(!recard.proofStatus&&!recard.grantStatus)?<Button type="primary" onClick={(e)=>{e.stopPropagation(),this.proofread(recard,1)}}>校对</Button>:''}
+                            {(recard.proofStatus&&!recard.grantStatus)?<Button type="primary" style={{marginRight:10}} onClick={(e)=>{e.stopPropagation(),this.proofread(recard,0)}}>发放</Button>:''}
+                             <Button type="primary" onClick={(e)=>{e.stopPropagation(),this.proofread(recard,1)}}>校对</Button>
                         </div>
                     }
                 },
@@ -205,7 +210,7 @@ const YxBonus = React.createClass({
             proofreadState:index,
             boHuiVisible:true,
             proofData: recard,
-            result:''
+            result:recard.proofCount
         })
     },
     tableRowClick(record, index) {
@@ -262,10 +267,11 @@ const YxBonus = React.createClass({
     //保存发放状态
     boHuiSubmit(e){
         e.preventDefault();
-        if(this.state.proofreadState&&!this.state.result){
+        var resType = typeof this.state.result;
+        if(this.state.proofreadState&&resType != 'number'){
             message.warning('请填写校对信息');
             return false;
-        }
+        };
         this.setState({
             loading:true
         });

+ 1 - 1
js/component/manageCenter/project/task/taskAssignment.jsx

@@ -259,7 +259,7 @@ const Task = React.createClass({
                     closeDesc={this.closeAssign.bind(this)}
                     fenpaiData={8}
                     specially={0}
-                    roleName={'咨询师经理'}
+                    roleName={this.state.nub?'咨询师':'咨询师经理'}
                 />
         </div> )
     }

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

@@ -127,7 +127,7 @@ const Assign=React.createClass({
 		this.props.closeDesc(false, true);
 	},
     //分配对象列表
-    contactList(){
+    contactList(item={}){
         this.setState({
             loading:true
         });
@@ -142,7 +142,7 @@ const Assign=React.createClass({
                 pageSize: 99,
                 departmentId:this.state.departmenttList,
                 name:this.state.financeNameSearch,
-                roleName:this.props.roleName?this.props.roleName:''
+                roleName:item.roleName?item.roleName:this.props.roleName
             },
             success: function (data) {
                 let theArr = [];
@@ -181,8 +181,6 @@ const Assign=React.createClass({
     	this.setState({
             loading: true
         });
-        console.log(this.props.data);
-        console.log(record);
         $.ajax({
             method: "post",
             dataType: "json",
@@ -221,11 +219,12 @@ const Assign=React.createClass({
     	});
     },
     componentWillMount() {
+        
     },
     componentWillReceiveProps(nextProps) {
         this.state.visible=nextProps.showDesc;
         if(nextProps.showDesc){
-            this.contactList();
+            this.contactList(nextProps);
             this.departmentList()
         }
         this.setState({