hujie123456 5 years ago
parent
commit
dbfec3d2b5

+ 429 - 272
js/component/manageCenter/customer/NEW/intentionCustomer/intentionDetail/detail/contactPerson.jsx

@@ -1,275 +1,432 @@
-import React from 'react';
-import {Form,Table,Button,Spin,message,Input,Popconfirm,Col} from 'antd';
-import ajax from 'jquery/src/ajax/xhr.js';
-import $ from 'jquery/src/ajax';
+import React from "react";
+import {
+  Form,
+  Table,
+  Button,
+  Spin,
+  message,
+  Input,
+  Popconfirm,
+  Col
+} from "antd";
+import ajax from "jquery/src/ajax/xhr.js";
+import $ from "jquery/src/ajax";
 
 const ContactPerson = React.createClass({
-	getInitialState() {
-		return {
-			contactList:[],
-			loading:false,
-			ContactsLists: [{
-					title: '姓名',
-					dataIndex: 'name',
-					key: 'name',
-					render: (text, record, index) => {
-						return <Input value={record.name} placeholder="姓名(必填项)" key={record.id} required="required"
-	                           onChange={(e) => { record.name = e.target.value; 
-	                           	this.setState({ contactList: this.state.contactList }); }} style={{width:'120px'}}/>
-					}
-				}, {
-					title: '联系人部门',
-					dataIndex: 'depatrment',
-					key: 'depatrment',
-					render: (text, record, index) => {
-						return <Input value={record.depatrment} placeholder="联系人部门" key={record.id}
-	                   onChange={(e) => { record.depatrment = e.target.value; this.setState({ contactList: this.state.contactList }); }} style={{width:'120px'}}/>
-					}
-				}, {
-					title: '联系人职务',
-					dataIndex: 'position',
-					key: 'position',
-					render: (text, record, index) => {
-						return <Input value={record.position} placeholder="联系人职务" key={record.id}
-	                  onChange={(e) => { record.position = e.target.value; this.setState({ contactList: this.state.contactList }); }} style={{width:'120px'}}/>
-					}
-				}, {
-                    title: '主要联系人',
-                    dataIndex: 'major',
-                    width:100,
-                    key: 'major',
-                    render:(text) => {
-                    	return text?'是':"否"
-                    }
-                },{
-					title: '手机号码',
-					dataIndex: 'mobile',
-					key: 'mobile',
-					render: (text, record, index) => {
-						return <Input value={record.mobile} placeholder="手机号码(必填项)" key={record.id} required="required"
-	                  onChange={(e) => { record.mobile = e.target.value; this.setState({ contactList: this.state.contactList }); }} style={{width:'120px'}}/>
-					}
-				}, {
-					title: '微信',
-					dataIndex: 'wechat',
-					key: 'wechat',
-					render: (text, record, index) => {
-						return <Input value={record.wechat} placeholder="微信" key={record.id}
-	                  onChange={(e) => { record.wechat = e.target.value; this.setState({ contactList: this.state.contactList }); }} style={{width:'120px'}}/>
-					}
-				}, {
-					title: '联系人QQ',
-					dataIndex: 'qq',
-					key: 'qq',
-					render: (text, record, index) => {
-						return <Input value={record.qq} placeholder="联系人QQ" key={record.id}
-	                  onChange={(e) => { record.qq = e.target.value; this.setState({ contactList: this.state.contactList }); }} style={{width:'120px'}}/>
-					}
-				}, {
-					title: '电子邮箱',
-					dataIndex: 'email',
-					key: 'email',
-					render: (text, record, index) => {
-						return <Input value={record.email} placeholder="电子邮箱" key={record.id}
-	                  onChange={(e) => { record.email = e.target.value; this.setState({ contactList: this.state.contactList }); }} style={{width:'120px'}}/>
-					}
-				},
-				{
-					title: '操作',
-					dataIndex: 'dels',
-					key: 'dels',
-					render: (text, record, index) => {
-						return <div>{adminData.isSuperAdmin ? 
-		                            <Popconfirm title="是否删除?" onConfirm={(e)=>{this.confirmDelet(record)}} okText="删除" cancelText="不删除">
-									    <Button style={{marginRight:'10px',color:'#ffffff',background:'#f00',border:'none'}}>删除</Button>
-									</Popconfirm>
-									:''}
-								{record.name?<Button style={{marginRight:'10px',color:'#ffffff',background:'green',border:'none'}} onClick={(e)=>{e.stopPropagation(),this.mainContact(record)}}>设为主要联系人</Button>:''}
-                            </div>
-					}
-				}
-			],
-		}
-	},
-	//tab2删除
-	confirmDelet(e) {
-		this.setState({
-			loading: true
-		});
-		if(e.id) {
-			$.ajax({
-				method: "get",
-				dataType: "json",
-				crossDomain: false,
-				url: globalConfig.context + "/api/admin/customer/deleteOneContact",
-				data: {
-					ocbId: e.id, //删除的ID    
-				}
-			}).done(function(data) {
-				if(!data.error.length) {
-					message.success('删除成功!');
-					this.setState({
-						loading: false,
-					});
-				} else {
-					message.warning(data.error[0].message);
-				};
-				this.contactLists();
-			}.bind(this));
-		} else {
-			this.contactLists();
-		}
-	},
-	//选择主要联系人
-	mainContact(record){
-		this.setState({
-			loading: true
-		});
-		$.ajax({
-			method: "get",
-			dataType: "json",
-			crossDomain: false,
-			url: globalConfig.context + "/api/admin/customer/updateMainContact",
-			data: {
-				uid:this.props.data.id,
-				ocbId: record.id 
-			}
-		}).done(function(data) {
-			if(!data.error.length) {
-				message.success('设为主要联系人成功!');
-				this.setState({
-					loading: false,
-				});
-			} else {
-				message.warning(data.error[0].message);
-			};
-			this.contactLists();
-		}.bind(this));
-	},
-	//tab2获取联系人详情
-	contactLists(ids) {
-		this.setState({
-			loading: true
-		});
-		$.ajax({
-			method: "get",
-			dataType: "json",
-			crossDomain: false,
-			url: globalConfig.context + '/api/admin/customer/findCustomerContacts',
-			data: {
-				uid: ids||this.props.data.id, //名称1
-			},
-			success: function(data) {
-				let theArr = [];
-				if(data.error.length || data.data.list == "") {
-					if(data.error && data.error.length) {
-						message.warning(data.error[0].message);
-					};
-				} else {
-					for(let i = 0; i < data.data.length; i++) {
-						let thisdata = data.data[i];
-						theArr.push({
-							key:i,
-							id: thisdata.id,
-							name: thisdata.name,
-							mobile: thisdata.mobile,
-							email: thisdata.email,
-							qq: thisdata.qq,
-							wechat: thisdata.wechat,
-							depatrment: thisdata.depatrment,
-							position: thisdata.position,
-							major:thisdata.major
-						});
-					};
+  getInitialState() {
+    return {
+      contactList: [],
+      loading: false,
+      ContactsLists: [
+        {
+          title: "姓名",
+          dataIndex: "name",
+          key: "name",
+          render: (text, record, index) => {
+            return (
+              <Input
+                value={record.name}
+                placeholder="姓名(必填项)"
+                key={record.id}
+                required="required"
+                onChange={e => {
+                  record.name = e.target.value;
+                  this.setState({ contactList: this.state.contactList });
+                }}
+                style={{ width: "120px" }}
+              />
+            );
+          }
+        },
+        {
+          title: "联系人部门",
+          dataIndex: "depatrment",
+          key: "depatrment",
+          render: (text, record, index) => {
+            return (
+              <Input
+                value={record.depatrment}
+                placeholder="联系人部门"
+                key={record.id}
+                onChange={e => {
+                  record.depatrment = e.target.value;
+                  this.setState({ contactList: this.state.contactList });
+                }}
+                style={{ width: "120px" }}
+              />
+            );
+          }
+        },
+        {
+          title: "联系人职务",
+          dataIndex: "position",
+          key: "position",
+          render: (text, record, index) => {
+            return (
+              <Input
+                value={record.position}
+                placeholder="联系人职务"
+                key={record.id}
+                onChange={e => {
+                  record.position = e.target.value;
+                  this.setState({ contactList: this.state.contactList });
+                }}
+                style={{ width: "120px" }}
+              />
+            );
+          }
+        },
+        {
+          title: "主要联系人",
+          dataIndex: "major",
+          width: 100,
+          key: "major",
+          render: text => {
+            return text == 1 ? "是" : "否";
+          }
+        },
+        {
+          title: "手机号码",
+          dataIndex: "mobile",
+          key: "mobile",
+          render: (text, record, index) => {
+            return (
+              <Input
+                value={record.mobile}
+                placeholder="手机号码(必填项)"
+                key={record.id}
+                required="required"
+                onChange={e => {
+                  record.mobile = e.target.value;
+                  this.setState({ contactList: this.state.contactList });
+                }}
+                style={{ width: "120px" }}
+              />
+            );
+          }
+        },
+        {
+          title: "微信",
+          dataIndex: "wechat",
+          key: "wechat",
+          render: (text, record, index) => {
+            return (
+              <Input
+                value={record.wechat}
+                placeholder="微信"
+                key={record.id}
+                onChange={e => {
+                  record.wechat = e.target.value;
+                  this.setState({ contactList: this.state.contactList });
+                }}
+                style={{ width: "120px" }}
+              />
+            );
+          }
+        },
+        {
+          title: "联系人QQ",
+          dataIndex: "qq",
+          key: "qq",
+          render: (text, record, index) => {
+            return (
+              <Input
+                value={record.qq}
+                placeholder="联系人QQ"
+                key={record.id}
+                onChange={e => {
+                  record.qq = e.target.value;
+                  this.setState({ contactList: this.state.contactList });
+                }}
+                style={{ width: "120px" }}
+              />
+            );
+          }
+        },
+        {
+          title: "电子邮箱",
+          dataIndex: "email",
+          key: "email",
+          render: (text, record, index) => {
+            return (
+              <Input
+                value={record.email}
+                placeholder="电子邮箱"
+                key={record.id}
+                onChange={e => {
+                  record.email = e.target.value;
+                  this.setState({ contactList: this.state.contactList });
+                }}
+                style={{ width: "120px" }}
+              />
+            );
+          }
+        },
+        {
+          title: "操作",
+          dataIndex: "dels",
+          key: "dels",
+          render: (text, record, index) => {
+            return (
+              <div>
+                {adminData.isSuperAdmin ? (
+                  <Popconfirm
+                    title="是否删除?"
+                    onConfirm={e => {
+                      this.confirmDelet(record);
+                    }}
+                    okText="删除"
+                    cancelText="不删除"
+                  >
+                    <Button
+                      style={{
+                        marginRight: "10px",
+                        color: "#ffffff",
+                        background: "#f00",
+                        border: "none"
+                      }}
+                    >
+                      删除
+                    </Button>
+                  </Popconfirm>
+                ) : (
+                  ""
+                )}
+                {record.name && record.mobile ? (
+                  <Button
+                    style={{
+                      marginRight: "10px",
+                      color: "#ffffff",
+                      background: "green",
+                      border: "none"
+                    }}
+                    onClick={e => {
+                      e.stopPropagation(), this.mainContact(record);
+                    }}
+                  >
+                    设为主要联系人
+                  </Button>
+                ) : (
+                  ""
+                )}
+              </div>
+            );
+          }
+        }
+      ]
+    };
+  },
+  //tab2删除
+  confirmDelet(e) {
+    this.setState({
+      loading: true
+    });
+    if (e.id) {
+      $.ajax({
+        method: "get",
+        dataType: "json",
+        crossDomain: false,
+        url: globalConfig.context + "/api/admin/customer/deleteOneContact",
+        data: {
+          ocbId: e.id //删除的ID
+        }
+      }).done(
+        function(data) {
+          if (!data.error.length) {
+            message.success("删除成功!");
+            this.setState({
+              loading: false
+            });
+          } else {
+            message.warning(data.error[0].message);
+          }
+          this.contactLists();
+        }.bind(this)
+      );
+    } else {
+      this.contactLists();
+    }
+  },
+  //选择主要联系人
+  mainContact(record) {
+    // this.setState({
+    // 	loading: true
+    // });
+    // $.ajax({
+    // 	method: "get",
+    // 	dataType: "json",
+    // 	crossDomain: false,
+    // 	url: globalConfig.context + "/api/admin/customer/updateMainContact",
+    // 	data: {
+    // 		uid:this.props.data.id,
+    // 		ocbId: record.id
+    // 	}
+    // }).done(function(data) {
+    // 	if(!data.error.length) {
+    // 		message.success('设为主要联系人成功!');
+    // 		this.setState({
+    // 			loading: false,
+    // 		});
+    // 	} else {
+    // 		message.warning(data.error[0].message);
+    // 	};
+    // 	this.contactLists();
+    // }.bind(this));
+    this.state.contactList.forEach(item => {
+      item.major = 0;
+    });
+    record.major = 1;
+    // console.log(record);
+    this.setState({
+      contactList: this.state.contactList
+    });
+    console.log("....", this.state.contactList);
+  },
+  //tab2获取联系人详情
+  contactLists(ids) {
+    this.setState({
+      loading: true
+    });
+    $.ajax({
+      method: "get",
+      dataType: "json",
+      crossDomain: false,
+      url: globalConfig.context + "/api/admin/customer/findCustomerContacts",
+      data: {
+        uid: ids || this.props.data.id //名称1
+      },
+      success: function(data) {
+        let theArr = [];
+        if (data.error.length || data.data.list == "") {
+          if (data.error && data.error.length) {
+            message.warning(data.error[0].message);
+          }
+        } else {
+          for (let i = 0; i < data.data.length; i++) {
+            let thisdata = data.data[i];
+            theArr.push({
+              key: i,
+              id: thisdata.id,
+              name: thisdata.name,
+              mobile: thisdata.mobile,
+              email: thisdata.email,
+              qq: thisdata.qq,
+              wechat: thisdata.wechat,
+              depatrment: thisdata.depatrment,
+              position: thisdata.position,
+              major: thisdata.major
+            });
+          }
+        }
+        this.setState({
+          contactList: theArr
+        });
+      }.bind(this)
+    }).always(
+      function() {
+        this.setState({
+          loading: false
+        });
+      }.bind(this)
+    );
+  },
+  //新增
+  //tab2新增联系人
+  addcontact() {
+    this.state.contactList.push({
+      id: null,
+      name: "",
+      mobile: "",
+      email: "",
+      qq: "",
+      wechat: "",
+      depatrment: "",
+      position: ""
+    });
 
-				};
-				this.setState({
-					contactList: theArr,
-				});
-			}.bind(this),
-		}).always(function() {
-			this.setState({
-				loading: false
-			});
-		}.bind(this));
-	},
-	//新增
-	//tab2新增联系人
-	addcontact() {
-		this.state.contactList.push({
-			id: null,
-			name: '',
-			mobile: '',
-			email: '',
-			qq: '',
-			wechat: '',
-			depatrment: '',
-			position: '',
-		});
-
-		this.setState({
-			contactList: this.state.contactList
-		})
-	},	
-	//tab2联系人保存
-	contactSave(e) {
-		e.preventDefault();
-		this.setState({
-			loading: true
-		});
-		$.ajax({
-			url: globalConfig.context + '/api/admin/customer/updateCustomerContacts',
-			method: 'post',
-			data: {
-				uid: this.props.data.id,
-				contactList: JSON.stringify(this.state.contactList)
-			}
-		}).done(function(data) {
-			this.setState({
-				loading: false
-			});
-			if(!data.error.length) {
-				message.success('保存成功!');
-				this.props.closeDetail(false,true)
-			} else {
-				message.warning(data.error[0].message);
-			}
-		}.bind(this));
-	},
-	componentWillMount(){
-		this.contactLists(this.props.data.id);
-	},
-	detailsModal(){
-		this.props.closeDetail(false, false)
-	},
-	componentWillReceiveProps(nextProps) {
-		if(nextProps.data.id&&nextProps.contactState){
-			this.contactLists(nextProps.data.id)
-		}
-	},
-	render() {
-		return(
-			<div>
-			    <div className="clearfix" >
-					 <Button className="ContactsList" type="primary" onClick={this.addcontact}>新增</Button> 
-				</div>
-		       <div className="clearfix">
-    			  <Spin spinning={this.state.loading}>
-    			        <Form layout="horizontal" id="demand-form" onSubmit={this.contactSave} >
-					      	<Table 
-			            	 pagination={false}
-			            	 columns={this.state.ContactsLists} 
-			            	 dataSource={this.state.contactList}
-			            	 />
-	            	        <Col span={24} offset={9} style={{marginTop:'15px'}}>
-				                <Button  type="primary" htmlType="submit">保存</Button>  
-                                <Button  type="ghost" onClick={this.detailsModal} style={{marginLeft:'100px'}}>取消</Button>
-				            </Col>
-		            	</Form> 
-				   </Spin> 
-				</div>
-			</div>
-		)
-	}
-})
-export default ContactPerson;
+    this.setState({
+      contactList: this.state.contactList
+    });
+  },
+  //tab2联系人保存
+  contactSave(e) {
+    e.preventDefault();
+    this.setState({
+      loading: true
+    });
+    $.ajax({
+      url: globalConfig.context + "/api/admin/customer/updateCustomerContacts",
+      method: "post",
+      data: {
+        uid: this.props.data.id,
+        contactList: JSON.stringify(this.state.contactList)
+      }
+    }).done(
+      function(data) {
+        this.setState({
+          loading: false
+        });
+        if (!data.error.length) {
+          message.success("保存成功!");
+          this.props.closeDetail(false, true);
+        } else {
+          message.warning(data.error[0].message);
+        }
+      }.bind(this)
+    );
+  },
+  componentWillMount() {
+    this.contactLists(this.props.data.id);
+  },
+  detailsModal() {
+    this.props.closeDetail(false, false);
+  },
+  componentWillReceiveProps(nextProps) {
+    if (nextProps.data.id && nextProps.contactState) {
+      this.contactLists(nextProps.data.id);
+    }
+  },
+  render() {
+    return (
+      <div>
+        <div className="clearfix">
+          <Button
+            className="ContactsList"
+            type="primary"
+            onClick={this.addcontact}
+          >
+            新增
+          </Button>
+        </div>
+        <div className="clearfix">
+          <Spin spinning={this.state.loading}>
+            <Form
+              layout="horizontal"
+              id="demand-form"
+              onSubmit={this.contactSave}
+            >
+              <Table
+                pagination={false}
+                columns={this.state.ContactsLists}
+                dataSource={this.state.contactList}
+              />
+              <Col span={24} offset={9} style={{ marginTop: "15px" }}>
+                <Button type="primary" htmlType="submit">
+                  保存
+                </Button>
+                <Button
+                  type="ghost"
+                  onClick={this.detailsModal}
+                  style={{ marginLeft: "100px" }}
+                >
+                  取消
+                </Button>
+              </Col>
+            </Form>
+          </Spin>
+        </div>
+      </div>
+    );
+  }
+});
+export default ContactPerson;

+ 178 - 64
js/component/manageCenter/financialManage/distribute/huiKuan.jsx

@@ -1,5 +1,6 @@
 import React from "react";
 import $ from "jquery/src/ajax";
+import moment from "moment";
 import "./public.less";
 import {
   Form,
@@ -10,7 +11,8 @@ import {
   Table,
   message,
   Modal,
-  Upload
+  Upload,
+  DatePicker,
 } from "antd";
 import {
   getProjectStatus,
@@ -24,7 +26,9 @@ import {
 import { ChooseList } from "../../../../component/manageCenter/order/orderNew/chooseList";
 import "./huiKuan.less"
 
+const { RangePicker } = DatePicker;
 const FormItem = Form.Item;
+const { TextArea } = Input;
 
 const inSpecial = React.createClass({
   loadData(pageNo) {
@@ -100,6 +104,45 @@ const inSpecial = React.createClass({
     );
   },
 
+  departmentList() {
+    this.setState({
+      loading: true
+    });
+    $.ajax({
+      method: "get",
+      dataType: "json",
+      crossDomain: false,
+      url: globalConfig.context + "/api/admin/organization/selectSuperId",
+      data: {},
+      success: function(data) {
+        let thedata = data.data;
+        let theArr = [];
+        if (!thedata) {
+          if (data.error && data.error.length) {
+            message.warning(data.error[0].message);
+          }
+        } else {
+          thedata.map(function(item, index) {
+            theArr.push({
+              key: index,
+              name: item.name,
+              id: item.id
+            });
+          });
+        }
+        this.setState({
+          departmentArr: theArr
+        });
+      }.bind(this)
+    }).always(
+      function() {
+        this.setState({
+          loading: false
+        });
+      }.bind(this)
+    );
+  },
+
   getInitialState() {
     return {
       visible: false,
@@ -112,8 +155,8 @@ const inSpecial = React.createClass({
       boHuivisible: false,
       selectedRowKeys: [],
       selectedRows: [],
-      //开票状态
-      //用户名称搜索
+      // 弹出层数据
+      modalData: {},
       // userName: "",
       contractNo: "",
       loading: false,
@@ -206,52 +249,52 @@ const inSpecial = React.createClass({
           }
         }
       ],
-      dataSource: [
-        {
-          id: 1,
-          orderNo: "w1",
-          name: "张三",
-          hetong: 3,
-          benci: 1,
-          huiTime: "2019-10-11",
-          daoTime: "2019-10-11",
-          remake: "hhhhh",
-          key: "w1"
-        },
-        {
-          id: 2,
-          orderNo: "w2",
-          name: "王五",
-          hetong: 3,
-          benci: 1,
-          huiTime: "2019-10-11",
-          daoTime: "2019-10-11",
-          remake: "zzzzzz",
-          key: "w2"
-        },
-        {
-          id: 3,
-          orderNo: "w3",
-          name: "二麻子",
-          hetong: 3,
-          benci: 1,
-          huiTime: "2019-10-11",
-          daoTime: "2019-10-11",
-          remake: "yyyyyyy",
-          key: "w3"
-        },
-        {
-          id: 4,
-          orderNo: "w4",
-          name: "jax",
-          hetong: 3,
-          benci: 1,
-          huiTime: "2019-10-11",
-          daoTime: "2019-10-11",
-          remake: "bbbbbb",
-          key: "w4"
-        }
-      ],
+      // dataSource: [
+      //   {
+      //     id: 1,
+      //     orderNo: "w1",
+      //     name: "张三",
+      //     hetong: 3,
+      //     benci: 1,
+      //     huiTime: "2019-10-11",
+      //     daoTime: "2019-10-11",
+      //     remake: "hhhhh",
+      //     key: "w1"
+      //   },
+      //   {
+      //     id: 2,
+      //     orderNo: "w2",
+      //     name: "王五",
+      //     hetong: 3,
+      //     benci: 1,
+      //     huiTime: "2019-10-11",
+      //     daoTime: "2019-10-11",
+      //     remake: "zzzzzz",
+      //     key: "w2"
+      //   },
+      //   {
+      //     id: 3,
+      //     orderNo: "w3",
+      //     name: "二麻子",
+      //     hetong: 3,
+      //     benci: 1,
+      //     huiTime: "2019-10-11",
+      //     daoTime: "2019-10-11",
+      //     remake: "yyyyyyy",
+      //     key: "w3"
+      //   },
+      //   {
+      //     id: 4,
+      //     orderNo: "w4",
+      //     name: "jax",
+      //     hetong: 3,
+      //     benci: 1,
+      //     huiTime: "2019-10-11",
+      //     daoTime: "2019-10-11",
+      //     remake: "bbbbbb",
+      //     key: "w4"
+      //   }
+      // ],
       searchTime: [,]
     };
   },
@@ -262,15 +305,17 @@ const inSpecial = React.createClass({
 
   componentWillMount() {
     // this.loadData();
+    this.departmentList();
   },
   reset() {
     this.state.nameSearch = "";
     this.state.releaseDate = [];
     this.state.orderNoSearch = "";
     this.state.userName = "";
+    this.state.departmenttList = [];
     // this.loadData();
   },
-  
+
   changeList(arr) {
     const newArr = [];
     this.state.columns.forEach(item => {
@@ -285,13 +330,20 @@ const inSpecial = React.createClass({
     });
   },
   onSelectChange(selectedRowKeys) {
-    console.log('selectedRowKeys changed: ', selectedRowKeys);
+    console.log("selectedRowKeys changed: ", selectedRowKeys);
     this.setState({ selectedRowKeys });
   },
   showModal() {
     this.setState({
-      visible: true,
+      visible: true
     });
+    this.state.dataSource.forEach((item) => {
+      if(item.key == this.state.selectedRowKeys[0]) {
+        this.setState({
+          modalData: item
+        })
+      }
+    })
   },
 
   handleOk() {
@@ -305,20 +357,19 @@ const inSpecial = React.createClass({
     this.setState({ visible: false });
   },
 
-
-
   render() {
     const formItemLayout = {
       labelCol: { span: 8 },
       wrapperCol: { span: 14 }
     };
     var departmentArr = this.state.departmentArr || [];
-    const { loading, selectedRowKeys,visible } = this.state;
+    const { loading, selectedRowKeys, visible } = this.state;
     const rowSelection = {
       selectedRowKeys,
       onChange: this.onSelectChange,
       hideDefaultSelections: true
     };
+    var departmentArr = this.state.departmentArr || [];
     return (
       <div className="user-content" style={{ position: "relative" }}>
         <div className="content-title">
@@ -402,13 +453,14 @@ const inSpecial = React.createClass({
         </div>
 
         <Modal
+          width={800}
           visible={visible}
-          title="Title"
+          title="收款记录"
           onOk={this.handleOk}
           onCancel={this.handleCancel}
           footer={[
             <Button key="back" onClick={this.handleCancel}>
-              Return
+              取消
             </Button>,
             <Button
               key="submit"
@@ -416,17 +468,79 @@ const inSpecial = React.createClass({
               loading={loading}
               onClick={this.handleOk}
             >
-              Submit
+              保存
             </Button>
           ]}
         >
-          <p>{this.state.dataSource.id}</p>
-          <p>Some contents...</p>
-          <p>Some contents...</p>
-          <p>Some contents...</p>
-          <p>Some contents...</p>
-        </Modal>
+          <p style={{ marginBottom: 10 }}>
+            合同编号:{this.state.modalData.name}
+          </p>
+          <p style={{ marginBottom: 10 }}>
+            订单编号:{this.state.modalData.name}
+          </p>
+          <p style={{ marginBottom: 10 }}>
+            客户名称:{this.state.modalData.name}
+          </p>
+          <p style={{ marginBottom: 10 }}>
+            合同额(万元):
+            <Input
+              style={{ width: "auto" }}
+              value={this.state.modalData.hetong}
+              onChange={e => {
+                let val = e.target.value;
+                this.state.modalData.hetong = val;
+                this.setState({ modalData: this.state.modalData });
+              }}
+            />
+          </p>
+          <p style={{ marginBottom: 10 }}>
+            本次回款(万元):
+            <Input
+              style={{ width: "auto" }}
+              value={this.state.modalData.benci}
+              onChange={e => {
+                let val = e.target.value;
+                this.state.modalData.benci = val;
+                this.setState({ modalData: this.state.modalData });
+              }}
+            />
+          </p>
+          <p style={{ marginBottom: 10 }}>
+            回款时间:
+            <DatePicker
+              showTime
+              placeholder="选择回款时间"
+              value={moment(this.state.modalData.huiTime, "YYYY-MM-DD")}
+              onChange={(v, e) => {
+                this.state.modalData.huiTime = e;
+                console.log(e);
+
+                this.setState({ modalData: this.state.modalData });
+              }}
+              onOk={() => {}}
+            />
+          </p>
+          <p style={{ marginBottom: 10 }}>
+            批量导入时间:{this.state.modalData.daoTime}
+          </p>
+          <p style={{ marginBottom: 10 }}>
+            <span style={{ display: "inline-block", marginBottom: 20 }}>
+              备注:
+            </span>
+            <TextArea
+              style={{ width: "70%" }}
+              value={this.state.modalData.remake}
+              onChange={e => {
+                this.state.modalData.remake = e.target.value;
+                console.log(e);
 
+                this.setState({ modalData: this.state.modalData });
+              }}
+              placeholder="请输入备注信息"
+              autosize={{ minRows: 3, maxRows: 5 }}
+            />
+          </p>
+        </Modal>
       </div>
     );
   }

+ 2 - 1
js/component/manageCenter/financialManage/distribute/receivable.jsx

@@ -148,7 +148,8 @@ const Receivable=React.createClass({
                                     <FormItem className="half-item" {...formItemLayout} label="订单编号">
                                         <span>{theData.orderNo}</span>
                                     </FormItem>
-                                    {!theData.contractNo?<FormItem className="half-item" {...formItemLayout} label={<span><strong style={{color:'#f00'}}>*</strong>合同编号</span>} >
+                                    {/* !theData.contractNo? */}
+                                    {true?<FormItem className="half-item" {...formItemLayout} label={<span><strong style={{color:'#f00'}}>*</strong>合同编号</span>} >
                                         <Input placeholder="合同编号"
                                             value={this.state.contractNo}
                                             onChange={(e) => { this.setState({ contractNo: e.target.value }); }} />  

File diff suppressed because it is too large
+ 1883 - 1839
package-lock.json


+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "afanti",
-  "version": "1.1.21",
+  "version": "1.1.22",
   "description": "",
   "main": "index.js",
   "scripts": {