ソースを参照

用户端科技服务修改

wubb 8 年 前
コミット
db12e01398

+ 0 - 16
js/component/account/services/technology.jsx

@@ -51,9 +51,6 @@ const Technology = React.createClass({
                         techField: thisdata.techField,
                         state: thisdata.state,
                         createTime: thisdata.createTimeFormattedDate,
-                        website: thisdata.website,
-                        accountNumber: thisdata.accountNumber,
-                        password: thisdata.password,
                         consultant: thisdata.consultant
                     });
                 };
@@ -154,18 +151,6 @@ const Technology = React.createClass({
                     dataIndex: 'createTime',
                     key: 'createTime'
                 }, {
-                    title: '网址',
-                    dataIndex: 'website',
-                    key: 'website'
-                }, {
-                    title: '用户名',
-                    dataIndex: 'accountNumber',
-                    key: 'accountNumber'
-                }, {
-                    title: '密码',
-                    dataIndex: 'password',
-                    key: 'password'
-                }, {
                     title: '咨询师',
                     dataIndex: 'consultant',
                     key: 'consultant'
@@ -249,7 +234,6 @@ const Technology = React.createClass({
                 </div>
                 <ApplyChange
                     data={this.state.RowData}
-                    authorOption={this.state.authorOption}
                     showDesc={this.state.showDesc}
                     closeDesc={this.closeDesc} />
                 <ApplyAdd

+ 2 - 2
js/component/account/services/technologyAdd.jsx

@@ -1,6 +1,5 @@
 import React from 'react';
 import { Button, Input, Select, message, Modal, Checkbox } from 'antd';
-import { companySearch } from '../../tools.js';
 import ajax from 'jquery/src/ajax/xhr.js';
 import $ from 'jquery/src/ajax';
 
@@ -208,7 +207,8 @@ const ApplyAdd = React.createClass({
                         </div>
                         <div className="half-item">
                         	<span className="item-title">立项金额: </span>
-                            <Input style={{ width: 200 }} onChange={(e) => { this.state.projectApproval = e.target.value; }}  />
+                            <Input style={{ width: 150,marginRight:10 }} onChange={(e) => { this.state.projectApproval = e.target.value; }}  />
+                            <span>万元</span>
                         </div>
                     </div>
                     <div className="clearfix">

+ 14 - 74
js/component/account/services/technologyChange.jsx

@@ -1,12 +1,12 @@
 import React from 'react';
 import { Icon, Form, Button, Input, Select, Spin, Table, DatePicker, message, Modal, Checkbox, Upload } from 'antd';
 import { cognizanceStateList } from '../../dataDic.js';
-import { getCognizanceState, beforeUpload, getBase64, beforeUploadFile, downloadFile } from '../../tools.js';
+import { getCognizanceState, beforeUpload, beforeUploadFile, downloadFile } from '../../tools.js';
 import ajax from 'jquery/src/ajax/xhr.js';
 import $ from 'jquery/src/ajax';
 
 const ApplyChangeFrom = Form.create()(React.createClass({
-    loadData() {
+    loadData(id) {
         this.setState({
             loading: true
         });
@@ -14,9 +14,9 @@ const ApplyChangeFrom = Form.create()(React.createClass({
             method: "post",
             dataType: "json",
             crossDomain: false,
-            url: globalConfig.context + "/api/admintechproject/techProjectDetial",
+            url: globalConfig.context + "/api/techproject/techProjectDetial",
             data: {
-                pid: this.props.data.pid
+                pid: id || this.props.data.pid
             },
             success: function (data) {
  
@@ -43,7 +43,7 @@ const ApplyChangeFrom = Form.create()(React.createClass({
             });
         }.bind(this));
     },
-    getStateData() {
+    getStateData(id) {
         this.setState({
             loading: true
         });
@@ -53,7 +53,7 @@ const ApplyChangeFrom = Form.create()(React.createClass({
             crossDomain: false,
             url: globalConfig.context + "/api/techproject/techProjectLog",
             data: {
-                pid: this.props.data.pid
+                pid: id || this.props.data.pid
             },
             success: function (data) {
                 if (data.error.length || !data.data) {
@@ -110,10 +110,7 @@ const ApplyChangeFrom = Form.create()(React.createClass({
             method: "post",
             dataType: "json",
             crossDomain: false,
-            url: globalConfig.context + "/api/admin/getContacts",
-            data: {
-                uid: this.props.data.uid,
-            },
+            url: globalConfig.context + "/api/user/getContacts",
             success: function (data) {
                 let theOption = [];
                 if (data.error.length || !data.data) {
@@ -135,7 +132,6 @@ const ApplyChangeFrom = Form.create()(React.createClass({
     getInitialState() {
         return {
             loading: false,
-            stateOption: [],
             departmentOption: [],
             projectDes:'',
             projectMode: 0,
@@ -164,25 +160,12 @@ const ApplyChangeFrom = Form.create()(React.createClass({
         };
     },
     componentWillMount() {
-        let _me = this;
-        cognizanceStateList.map(function (item) {
-            _me.state.stateOption.push(
-                <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
-            )
-        });
         this.loadData();
         this.getStateData();
-        
     },
     handleSubmit(e) {
         e.preventDefault();
         this.props.form.validateFields((err, values) => {
-            if (values.state || values.principal || values.recordTime || values.comment) {
-                if (!values.state && !values.principal && !values.recordTime) {
-                    message.warning("请填写完整的状态流转信息!");
-                    return;
-                };
-            };
             if (!err) {
                 this.props.spinState(true);
                 let contacts = !isNaN(values.contacts) ? values.contacts : this.state.data.contacts;
@@ -190,10 +173,9 @@ const ApplyChangeFrom = Form.create()(React.createClass({
                     method: "POST",
                     dataType: "json",
                     crossDomain: false,
-                    url: globalConfig.context + "/api/admintechproject/updateTechProject",
+                    url: globalConfig.context + "/api/techproject/updateTechProject",
                     data: {
                         id: this.props.data.pid,
-                        uid: this.props.data.uid,
                         contacts: contacts,
                         department: values.department,
                         projectName: values.projectName,
@@ -204,11 +186,6 @@ const ApplyChangeFrom = Form.create()(React.createClass({
                         projectApproval: values.projectApproval,
                         subsidy: this.state.subsidy,
                         approvalUrl: this.state.approvalUrl,
-                        
-                        recordTimeFormattedDate: values.recordTime ? values.recordTime.format("YYYY-MM-DD") : undefined,
-                        state: values.state,
-                        principal: values.principal,
-                        comment: values.comment,
                     }
                 }).done(function (data) {
                     if (!data.error.length) {
@@ -226,12 +203,9 @@ const ApplyChangeFrom = Form.create()(React.createClass({
     },
     componentWillReceiveProps(nextProps) {
         if (!this.props.visible && nextProps.visible) {
-            this.getStateData();
-            this.loadData();
+            this.loadData(nextProps.data.pid);
+            this.getStateData(nextProps.data.pid);
         };
-        if (nextProps.data) {
-            this.state.pid = nextProps.data.pid;
-        }
     },
     projectEstablishmentCheck(e) {
         if (e.target.checked == true) {
@@ -380,9 +354,11 @@ const ApplyChangeFrom = Form.create()(React.createClass({
                                 {getFieldDecorator('projectApproval', {
                                     initialValue: theData.projectApproval
                                 })(
-                                    <Input />
+                                    <Input style={{ width:150,marginRight:10 }}/>
                                 )}
+                                <span>万元</span>
 			                </FormItem>
+                            
                         </div>
                     </div>
                     <div className="clearfix">
@@ -425,42 +401,7 @@ const ApplyChangeFrom = Form.create()(React.createClass({
                     </div>
                     <div className="form-title">状态流转记录: </div>
                     <Table pagination={false} dataSource={this.state.stateTable} columns={this.state.stateColumns} />
-                    <div className="clearfix">
-                        <FormItem className="third-item"
-                            {...formItemLayout}
-                            label="状态流转"
-                        >
-                            {getFieldDecorator('state')(
-                                <Select placeholder="选择一个状态">{this.state.stateOption}</Select>
-                            )}
-                        </FormItem>
-                        <FormItem className="third-item"
-                            labelCol={{ span: 6 }}
-                            wrapperCol={{ span: 12 }}
-                            label="处理时间"
-                        >
-                            {getFieldDecorator('recordTime')(
-                                <DatePicker />
-                            )}
-                        </FormItem>
-                        <FormItem className="third-item"
-                            {...formItemLayout}
-                            label="负责人"
-                        >
-                            {getFieldDecorator('principal')(
-                                <Select placeholder="选择负责人">{this.props.authorOption}</Select>
-                            )}
-                        </FormItem>
-                    </div>
-                    <FormItem
-                        labelCol={{ span: 2 }}
-                        wrapperCol={{ span: 12 }}
-                        label="备注"
-                    >
-                        {getFieldDecorator('comment')(
-                            <Input />
-                        )}
-                    </FormItem>
+
                     <FormItem style={{ marginTop: '20px' }}>
                         <Button className="set-submit" type="primary" htmlType="submit">保存</Button>
                         <Button type="ghost" style={{ marginLeft: '20px' }} onClick={this.props.closeModal}>取消</Button>
@@ -516,7 +457,6 @@ const ApplyChange = React.createClass({
                     >
                         <ApplyChangeFrom
                             visible={this.state.visible}
-                            authorOption={this.props.authorOption}
                             data={this.props.data}
                             spinState={this.spinChange} closeModal={this.handleCancel} />
                     </Modal>

+ 3 - 2
js/component/manageCenter/servicesManage/technology/applyChange.jsx

@@ -1,7 +1,7 @@
 import React from 'react';
 import { Icon, Form, Button, Input, Select, Spin, Table, DatePicker, message, Modal, Checkbox, Upload } from 'antd';
 import { cognizanceStateList } from '../../../dataDic.js';
-import { getCognizanceState, beforeUpload, getBase64, beforeUploadFile, downloadFile } from '../../../tools.js';
+import { getCognizanceState, beforeUpload, beforeUploadFile, downloadFile } from '../../../tools.js';
 import ajax from 'jquery/src/ajax/xhr.js';
 import $ from 'jquery/src/ajax';
 
@@ -380,8 +380,9 @@ const ApplyChangeFrom = Form.create()(React.createClass({
                                 {getFieldDecorator('projectApproval', {
                                     initialValue: theData.projectApproval
                                 })(
-                                    <Input />
+                                    <Input style={{ width:150,marginRight:10 }}/>
                                 )}
+                                <span>万元</span>
 			                </FormItem>
                         </div>
                     </div>