|
@@ -1,17 +1,20 @@
|
|
|
import React from 'react';
|
|
|
import {
|
|
|
Button, Cascader, Input, Select, Tag,
|
|
|
- Spin, Table, message, Form, Col, Tabs, Modal, Icon, AutoComplete
|
|
|
+ Spin, Table, message, Form, Col, Tabs, Modal, Icon, AutoComplete, Upload
|
|
|
} from 'antd';
|
|
|
import ajax from 'jquery/src/ajax/xhr.js';
|
|
|
import $ from 'jquery/src/ajax';
|
|
|
import {areaSelect, citySelect, provinceList } from '@/NewDicProvinceList';
|
|
|
-import { ShowModal, onReplace } from '../../../../tools.js'
|
|
|
+import { beforeUploadFile, ShowModal, onReplace } from '../../../../tools.js'
|
|
|
import { socialAttribute, customerSource } from '@/dataDic.js';
|
|
|
import Outbound from '../../NEW/components/outbound';
|
|
|
import ShowModalDiv from "@/showModal.jsx";
|
|
|
import { ChooseList } from "../../../order/orderNew/chooseList";
|
|
|
import TextArea from "antd/es/input/TextArea";
|
|
|
+import ImgList from '../../../../common/imgList/index.js';
|
|
|
+
|
|
|
+
|
|
|
|
|
|
const QueryCustomer = React.createClass({
|
|
|
loadData(pageNo, apiUrl) {
|
|
@@ -245,7 +248,9 @@ const QueryCustomer = React.createClass({
|
|
|
}, {
|
|
|
value: 0,
|
|
|
label: "其他组织"
|
|
|
- }]
|
|
|
+ }],
|
|
|
+
|
|
|
+ fileList: []
|
|
|
}
|
|
|
},
|
|
|
handleClose(removedTag) {
|
|
@@ -382,6 +387,7 @@ const QueryCustomer = React.createClass({
|
|
|
level: obj.level,
|
|
|
nature,
|
|
|
natureOther: obj.natureOther,
|
|
|
+ fileList: []
|
|
|
});
|
|
|
} else {
|
|
|
message.warning(data.error[0].message);
|
|
@@ -534,7 +540,7 @@ const QueryCustomer = React.createClass({
|
|
|
message.error("请填写正确的联系人,且至少包含一个汉字");
|
|
|
return false;
|
|
|
}
|
|
|
- if (!!values.content && /.*[\u4e00-\u9fa5]+.*$/.test(values.position)) {
|
|
|
+ if (!!values.position && !/.*[\u4e00-\u9fa5]+.*$/.test(values.position)) {
|
|
|
message.error("请填写正确的职位,且至少包含一个汉字");
|
|
|
return false;
|
|
|
}
|
|
@@ -570,6 +576,12 @@ const QueryCustomer = React.createClass({
|
|
|
message.warning('其他说明不能为空')
|
|
|
return false;
|
|
|
}
|
|
|
+
|
|
|
+ if (!this.state.verificationMyUser && !this.state.fileList.length) {
|
|
|
+ message.warning('请上传佐证资料')
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
let arr = [];
|
|
|
for (let i of this.state.selectCooperationProjects) {
|
|
|
arr.push(i.label)
|
|
@@ -588,6 +600,11 @@ const QueryCustomer = React.createClass({
|
|
|
listedNature = this.state.nature[2];
|
|
|
}
|
|
|
|
|
|
+ let fileSuccList = this.state.fileList.filter(item => item.response.data && !item.response.error.length);
|
|
|
+ let materialUrlList = fileSuccList.map(item => {
|
|
|
+ return item.response.data;
|
|
|
+ });
|
|
|
+
|
|
|
$.ajax({
|
|
|
method: "POST",
|
|
|
dataType: "json",
|
|
@@ -612,6 +629,7 @@ const QueryCustomer = React.createClass({
|
|
|
natureOther: this.state.natureOther,
|
|
|
enterpriseNature,
|
|
|
listedNature,
|
|
|
+ materialUrl: materialUrlList.join(",")
|
|
|
}
|
|
|
}).done(function (data) {
|
|
|
this.setState({
|
|
@@ -649,6 +667,11 @@ const QueryCustomer = React.createClass({
|
|
|
this.props.form.resetFields();
|
|
|
},
|
|
|
|
|
|
+ handleFileChange(info) {
|
|
|
+ let fileList = info.fileList;
|
|
|
+ this.setState({ fileList });
|
|
|
+ },
|
|
|
+
|
|
|
render() {
|
|
|
const intentionState = this.props.intentionState;
|
|
|
const { getFieldDecorator } = this.props.form;
|
|
@@ -1010,6 +1033,29 @@ const QueryCustomer = React.createClass({
|
|
|
</FormItem>
|
|
|
</div> : null
|
|
|
}
|
|
|
+
|
|
|
+ { !this.state.verificationMyUser && (
|
|
|
+ <FormItem
|
|
|
+ {...formItemLayout}
|
|
|
+ required
|
|
|
+ label="佐证资料" >
|
|
|
+ <div className="clearfix">
|
|
|
+ <ImgList
|
|
|
+ uploadConfig={{
|
|
|
+ action: globalConfig.context + "/api/user/achievement/uploadTextFile",
|
|
|
+ data: { 'sign': 'achievement_maturity_text_file' },
|
|
|
+ multiple: true,
|
|
|
+ listType: "picture-card",
|
|
|
+ }}
|
|
|
+ onChange={(infor) => {
|
|
|
+ this.handleFileChange(infor)
|
|
|
+ }}
|
|
|
+ fileList={this.state.fileList}
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </FormItem>
|
|
|
+ ) }
|
|
|
+
|
|
|
</div>
|
|
|
<FormItem wrapperCol={{ span: 12, offset: 6 }}>
|
|
|
<Button type="primary" htmlType="submit" style={{}}>领取客户</Button>
|