|
@@ -6,9 +6,10 @@ import moment from 'moment';
|
|
|
import TechAchievementDesc from '@/manageCenter/achievement/crmAchievement.jsx';
|
|
|
import { citySelect, provinceList ,areaSelect} from '@/NewDicProvinceList';
|
|
|
import { socialAttribute, industry, auditStatusL, lvl, currentMember ,slcRedit,dataGrade} from '@/dataDic.js';
|
|
|
-import { getSocialAttribute, beforeUploadFile,splitUrl ,getSlcRedit,getDataGrade,getAchievementCategory,getTechAuditStatus,getboutique} from '@/tools.js';
|
|
|
+import { getSocialAttribute, beforeUploadFile,splitUrl ,getSlcRedit,getDataGrade,getAchievementCategory,getTechAuditStatus,getboutique,getPreview} from '@/tools.js';
|
|
|
import './customer.less';
|
|
|
const TabPane = Tabs.TabPane;
|
|
|
+const Dragger = Upload.Dragger;
|
|
|
//图片组件
|
|
|
const PicturesWall = React.createClass({
|
|
|
getInitialState() {
|
|
@@ -210,6 +211,7 @@ const IntentionCustomer = Form.create()(React.createClass({
|
|
|
selectedRows: [],
|
|
|
loading: false,
|
|
|
callnub:"0",
|
|
|
+ pojectApplicationUrl:"",
|
|
|
modalVisible:false,
|
|
|
pagination: {
|
|
|
defaultCurrent: 1,
|
|
@@ -563,6 +565,46 @@ const IntentionCustomer = Form.create()(React.createClass({
|
|
|
}.bind(this));
|
|
|
|
|
|
},
|
|
|
+ //获取ID
|
|
|
+ getStateData(id) {
|
|
|
+ this.setState({
|
|
|
+ loading: true
|
|
|
+ });
|
|
|
+ $.ajax({
|
|
|
+ method: "post",
|
|
|
+ dataType: "json",
|
|
|
+ crossDomain: false,
|
|
|
+ url: globalConfig.context + "/api/admin/techproject/techProjectLog",
|
|
|
+ data: {
|
|
|
+ pid: id || this.props.data.id
|
|
|
+ },
|
|
|
+ success: function (data) {
|
|
|
+ if (!data.data) {
|
|
|
+ if (data.error && data.error.length) {
|
|
|
+ message.warning(data.error[0].message);
|
|
|
+ };
|
|
|
+ return;
|
|
|
+ };
|
|
|
+ var myDate = new Date();
|
|
|
+ this.state.stateTable = [];
|
|
|
+ for (let i = 0; i < data.data.length; i++) {
|
|
|
+ this.state.stateTable.push({
|
|
|
+ key: i,
|
|
|
+ state: data.data[i].state,
|
|
|
+ recordTime: data.data[i].recordTime,
|
|
|
+ recordTimeFormattedDate: data.data[i].recordTimeFormattedDate,
|
|
|
+ principal: data.data[i].principal,
|
|
|
+ operator: data.data[i].operator,
|
|
|
+ comment: data.data[i].comment
|
|
|
+ });
|
|
|
+ };
|
|
|
+ }.bind(this),
|
|
|
+ }).always(function () {
|
|
|
+ this.setState({
|
|
|
+ loading: false
|
|
|
+ });
|
|
|
+ }.bind(this));
|
|
|
+ },
|
|
|
//整行点击
|
|
|
tableRowClick(record, index) {
|
|
|
this.state.visitModul=true;
|
|
@@ -761,6 +803,25 @@ const IntentionCustomer = Form.create()(React.createClass({
|
|
|
<Select.Option key={group.id} value={group.name}>{group.name}</Select.Option>
|
|
|
)
|
|
|
const intentionState = this.props.intentionState ||'';
|
|
|
+ const props = {
|
|
|
+ name: 'file',
|
|
|
+ multiple: true,
|
|
|
+ action: '/api/admin/techproject/upload',
|
|
|
+
|
|
|
+ onChange(info) {
|
|
|
+ const status = info.file.status;
|
|
|
+ if (status !== 'uploading') {
|
|
|
+ console.log(11);
|
|
|
+ console.log(info.file, info.fileList);
|
|
|
+ }
|
|
|
+ if (status === 'done') {
|
|
|
+ message.success(`${info.file.name} file uploaded successfully.`);
|
|
|
+ } else if (status === 'error') {
|
|
|
+ message.error(`${info.file.name} file upload failed.`);
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ };
|
|
|
return(
|
|
|
<div className="user-content" >
|
|
|
<div className="content-title">
|
|
@@ -1092,6 +1153,54 @@ const IntentionCustomer = Form.create()(React.createClass({
|
|
|
onChange={(e,pre) => { this.setState({ cooperationSituation: e.target.value })}}/>
|
|
|
</FormItem>
|
|
|
</div>
|
|
|
+ <div className='clearfix'>
|
|
|
+ <FormItem
|
|
|
+ labelCol={{ span:4 }}
|
|
|
+ wrapperCol={{ span: 19 }}
|
|
|
+ label="项目申请书" >
|
|
|
+ <Upload
|
|
|
+ name="avatar"
|
|
|
+ action={globalConfig.context + "/api/admin/customer/upload"}
|
|
|
+ data={{
|
|
|
+ 'uid': this.state.detailId,
|
|
|
+ 'sign': 'organization_application'
|
|
|
+ }}
|
|
|
+ beforeUpload={beforeUploadFile}
|
|
|
+ fileList={this.state.fileList}
|
|
|
+ onChange={(info) => {
|
|
|
+ if (info.file.status !== 'uploading') {
|
|
|
+
|
|
|
+ }
|
|
|
+ if (info.file.status === 'done') {
|
|
|
+ if (!info.file.response.error.length) {
|
|
|
+ message.success(`${info.file.name} 文件上传成功!`);
|
|
|
+ } else {
|
|
|
+ message.warning(info.file.response.error[0].message);
|
|
|
+ return;
|
|
|
+ };
|
|
|
+ this.setState({
|
|
|
+ pojectApplicationUrl:info.file.response.data,
|
|
|
+ })
|
|
|
+ } else if (info.file.status === 'error') {
|
|
|
+ message.error(`${info.file.name} 文件上传失败。`);
|
|
|
+ }
|
|
|
+ this.setState({ fileList: info.fileList.slice(-1) });
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ <Button><Icon type="upload" /> 项目材料上传 </Button>
|
|
|
+ <span style={{ marginTop: '10px' ,marginLeft:"20px"}}>{this.state.pojectApplicationUrl ?
|
|
|
+ <span className="download-file">
|
|
|
+ <a onClick={() => {
|
|
|
+ var newTab = window.open('about:blank'); getPreview(this.state.detailId, 'techProject', 'organization_application', function (data) { newTab.location.href = data; });
|
|
|
+ }}><Icon style={{ fontSize: '16px' }} type="eye-o" /> </a>
|
|
|
+ </span>
|
|
|
+ : <span><Icon type="exclamation-circle" style={{ color: '#ffbf00', marginRight: '6px' }} />未上传!</span>}
|
|
|
+ </span>
|
|
|
+ </Upload>
|
|
|
+
|
|
|
+
|
|
|
+ </FormItem>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<Button className="setSubmit" type="primary" htmlType="submit">保存</Button>
|
|
|
<Button type="ghost" onClick={this.visitCancel}>取消</Button>
|