Browse Source

客户领取模块和客户新增模块改动

dev01 1 month ago
parent
commit
d270625304

+ 11 - 11
js/component/common/projectOperation/newAddProject.jsx

@@ -165,9 +165,7 @@ class NewAddProject extends Component {
       return false;
     }
     let reg = /^([0]|[1-9][0-9]*)$/;
-    if (
-      !this.state.commodityQuantity ||
-      !reg.test(this.state.commodityQuantity)
+    if (this.state.isVip != 6 && (!this.state.commodityQuantity || !reg.test(this.state.commodityQuantity))
     ) {
       message.warning("请输入正确服务数量!");
       return false;
@@ -280,14 +278,16 @@ class NewAddProject extends Component {
 
     let flag = true;
     let errorText = '';
-    for (let i=0; i<this.state.subProList.length; i++) {
-      let subItem = this.state.subProList[i];
-      if (!subItem.serviceYear) {
-        flag = false;
-        errorText = "派单年份不能为空!";
-      } else if (!subItem.newCheck || (subItem.newCheck && !subItem.newCheck.length)) {
-        flag = false;
-        errorText = `${subItem.serviceYear}的会员类型不能为空!`;
+    if (this.state.projectType === 1) {
+      for (let i=0; i<this.state.subProList.length; i++) {
+        let subItem = this.state.subProList[i];
+        if (!subItem.serviceYear) {
+          flag = false;
+          errorText = "派单年份不能为空!";
+        } else if (!subItem.newCheck || (subItem.newCheck && !subItem.newCheck.length)) {
+          flag = false;
+          errorText = `${subItem.serviceYear}的会员类型不能为空!`;
+        }
       }
     }
     if (!flag) {

+ 17 - 6
js/component/common/projectOperation/newEditProject.jsx

@@ -227,9 +227,12 @@ class newEditProject extends Component {
     }
 
     const updatedList = this.getUpdatedSubProject();
+    
     let subLen = updatedList.length;
     if (subLen === 0) {
       this.saveParentProject(text);
+    } else {
+
     }
 
     updatedList.map((item) => this.handleUpdateSubProject(item, () => {
@@ -658,12 +661,16 @@ class newEditProject extends Component {
         if (data.error.length === 0) {
           message.success("保存成功!");
           let list = this.state.splitList
+          let oldSplitList = this.state.oldSplitList;
           let histList = this.state.histYear
           list.push(data.data)
+          oldSplitList.push(data.data);
+          console.log(oldSplitList)
           histList.push(data.data.serviceYear)
           this.setState({
             addFrom: false,
             splitList: list,
+            oldSplitList,
             histYear: histList,
             serviceYear: undefined,
             taskComment: undefined,
@@ -696,6 +703,7 @@ class newEditProject extends Component {
   getUpdatedSubProject() {
     const updatedList = [];
     const { splitList, oldSplitList } = this.state;
+    console.log(splitList, oldSplitList)
     splitList.map(newSubItem => {
       let oldSubItem = oldSplitList.find(item => item.id === newSubItem.id);
       if (!!oldSubItem) {
@@ -1531,24 +1539,27 @@ class newEditProject extends Component {
                           ]}
                           value={this.getNewCheckType(item)}
                           onChange={e => {
+                            let newData = Object.assign({}, this.state.splitList[splitIdx]);
                             if (e.indexOf(1) > -1) {
-                              this.state.splitList[splitIdx].htMember = 1;
+                              newData.htMember = 1;
                             } else {
-                              this.state.splitList[splitIdx].htMember = 0;
+                              newData.htMember = 0;
                             }
 
                             if (e.indexOf(2) > -1) {
-                              this.state.splitList[splitIdx].additionalDeduction = 1;
+                              newData.additionalDeduction = 1;
                             } else {
-                              this.state.splitList[splitIdx].additionalDeduction = 0;
+                              newData.additionalDeduction = 0;
                             }
 
                             if (e.indexOf(3) > -1) {
-                              this.state.splitList[splitIdx].rdAwardsubsidy = 1;
+                              newData.rdAwardsubsidy = 1;
                             } else {
-                              this.state.splitList[splitIdx].rdAwardsubsidy = 0;
+                              newData.rdAwardsubsidy = 0;
                             }
 
+                            this.state.splitList[splitIdx] = newData;
+
                             this.setState({
                               splitList: this.state.splitList
                             })

+ 32 - 7
js/component/manageCenter/customer/NEW/crm/customerProfile.jsx

@@ -18,6 +18,7 @@ import { industry } from "@/dataDic.js"
 import ShowModalDiv from "@/showModal.jsx";
 import { ChooseList } from "../../../order/orderNew/chooseList";
 import MainBusinessLog from './mainBusinessLog';
+import ReceiveLog from './receiveLog';
 import moment from 'moment';
 
 import './customer.less';
@@ -35,6 +36,7 @@ const IntentionCustomer = Form.create()(React.createClass({
       visible: false,
       changeList: undefined,
       uid: '',
+      receiveVisible: false,
       dataSource: [],
       pagination: {
         defaultCurrent: 1,
@@ -110,12 +112,13 @@ const IntentionCustomer = Form.create()(React.createClass({
         render: (text, record) => {
           return (
             <div>
-              专利&nbsp;{text || 0}&nbsp;
-              其中发明专利&nbsp;{record.inventionPatentCount || 0}&nbsp;
-              实用新型&nbsp;{record.utilityModelCount || 0}&nbsp;
-              外观设计&nbsp;{record.appearancePatentCount || 0}&nbsp;
-              软著&nbsp;{record.softwareWorksCount || 0}&nbsp;
-              其他类型&nbsp;{record.otherCount || 0}
+              专利&nbsp;{text || ''}&nbsp;
+              其中发明专利&nbsp;{record.inventionPatentCount}&nbsp;
+              实用新型&nbsp;{record.utilityModelCount}&nbsp;
+              外观设计&nbsp;{record.appearancePatentCount}&nbsp;
+              软著&nbsp;{record.softwareWorksCount}&nbsp;
+              标准&nbsp;<span className="num">{String(record.standard) === '1' ? '有' : String(record.standard) === '0' ? '无' : ''}</span>&nbsp;&nbsp;&nbsp;
+              其他类型&nbsp;{record.otherCount}
             </div>
           )
         }
@@ -205,7 +208,7 @@ const IntentionCustomer = Form.create()(React.createClass({
         title: '操作',
         dataIndex: 'operate',
         key: 'operate',
-        width: 120,
+        width: 220,
         render: (text, record) => {
           return (
             <div>
@@ -217,6 +220,15 @@ const IntentionCustomer = Form.create()(React.createClass({
                     uid: record.id
                   })
                 }} type="primary" style={{ marginLeft: '10px' }}>主营日志</Button>
+
+              <Button
+                onClick={(e) => {
+                  e.stopPropagation();
+                  this.setState({
+                    receiveVisible: true,
+                    uid: record.id
+                  })
+                }} type="primary" style={{ marginLeft: '10px' }}>领取日志</Button>
             </div>
           )
         }
@@ -717,6 +729,19 @@ const IntentionCustomer = Form.create()(React.createClass({
               })
             }}
           />}
+
+        { this.state.receiveVisible && (
+          <ReceiveLog
+            visible={this.state.receiveVisible}
+            uid={this.state.uid}
+            onCancel={() => {
+              this.setState({
+                receiveVisible: false,
+                uid: ''
+              })
+            }}
+          />
+        ) }
       </div>
     );
   }

+ 150 - 0
js/component/manageCenter/customer/NEW/crm/receiveLog.jsx

@@ -0,0 +1,150 @@
+import React, { Component } from "react";
+import { message, Modal, Spin, Table, Tooltip } from "antd";
+import $ from "jquery/src/ajax";
+
+class ReceiveLog extends Component {
+  constructor(props) {
+    super(props);
+    this.state = {
+      loading: false,
+      pagination: {
+        defaultCurrent: 1,
+        defaultPageSize: 10,
+        showQuickJumper: true,
+        pageSize: 10,
+        onChange: function (page) {
+          this.loadData(page);
+        }.bind(this),
+        showTotal: function (total) {
+          return '共' + total + '条数据';
+        }
+      },
+      dataSource: [],
+      columns: [
+        {
+          title: '序号',
+          dataIndex: 'id',
+          key: 'id',
+          width: 60,
+        },
+        {
+          title: '内容',
+          dataIndex: 'remarks',
+          key: 'remarks',
+          render: (text, record) => {
+            return `${record.adminName},领取了客户:${record.userName}`;
+          }
+        },
+        {
+          title: '时间',
+          dataIndex: 'createTime',
+          key: 'createTime',
+          width: 160,
+        },
+      ],
+      expandedRowKeys: [],
+
+      previewVisible: false,
+      previewImage: ""
+    }
+
+    this.expandedRowRender = this.expandedRowRender.bind(this);
+  }
+
+
+  componentDidMount() {
+    this.loadData();
+  }
+
+  loadData(pageNo) {
+    const { pagination } = this.state;
+    this.setState({
+      loading: true,
+    });
+    $.ajax({
+      method: 'get',
+      dataType: "json",
+      crossDomain: false,
+      url: globalConfig.context + '/api/admin/userRecevieLog/list',
+      data: {
+        uid: this.props.uid,
+        // uid: "7a6edc3e-c9e3-41f2-9161-319bf3ce3d7e",
+        pageNo: pageNo || 1,
+        pageSize: pagination.pageSize,
+      },
+      success: function (data) {
+        if (data.error.length === 0) {
+          this.setState({
+            dataSource: data.data.list,
+          });
+        } else {
+          message.warning(data.error[0].message);
+        }
+      }.bind(this),
+    }).always(function () {
+      this.setState({
+        loading: false
+      });
+    }.bind(this));
+  }
+
+
+  expandedRowRender(record) {
+    let imgList = record.materialUrl.split(',');
+    return imgList.map(url => {
+      return (<div
+        style={{ width: "60px", height: "60px", padding: "6px", border: "1px solid #eee", cursor: "pointer", marginRight: "6px" }}
+        onClick={() => {
+          this.setState({ previewVisible: true, previewImage: globalConfig.context + "/upload" + url });
+        }}
+      >
+        <img src={globalConfig.context + "/upload" + url} style={{ width: "100%" }} />
+      </div>)
+    })
+  }
+
+  handleExpandChange(rows) {
+    console.log(rows)
+    this.setState({ expandedRowKeys: rows });
+  }
+
+  render() {
+    return (
+      <Modal
+        maskClosable={false}
+        className="customeDetails"
+        footer=""
+        title="领取日志"
+        width="900px"
+        visible={this.props.visible}
+        onOk={this.props.onCancel}
+        onCancel={this.props.onCancel}
+      >
+        <div>
+          <Spin spinning={this.state.loading}>
+            <Table
+              size="middle"
+              columns={this.state.columns}
+              rowKey={record => record.id}
+              dataSource={this.state.dataSource}
+              pagination={this.state.pagination}
+              expandedRowKeys={this.state.expandedRowKeys}
+              expandedRowRender={this.expandedRowRender}
+              onExpandedRowsChange={this.handleExpandChange.bind(this)}
+            />
+          </Spin>
+
+          <Modal
+            maskClosable={false}
+            footer={null}
+            visible={this.state.previewVisible}
+            onCancel={() => { this.setState({ previewVisible: false }) }}>
+            <img alt="" style={{ width: '100%' }} src={this.state.previewImage || ''} />
+          </Modal>
+        </div>
+      </Modal>
+    )
+  }
+}
+
+export default ReceiveLog;

+ 11 - 12
js/component/manageCenter/customer/NEW/intentionCustomer/intentionDetail/detail/contactPerson.jsx

@@ -467,12 +467,12 @@ const ContactPerson = React.createClass({
           </div>
           <div style={{ fontSize: 12, }}>
             专利总数&nbsp;{detail.patentCount || 0}&nbsp;&nbsp;&nbsp;&nbsp;
-            发明专利&nbsp;{detail.inventionPatentCount || 0}&nbsp;&nbsp;&nbsp;&nbsp;
-            实用新型&nbsp;{detail.utilityModelCount || 0}&nbsp;&nbsp;&nbsp;&nbsp;
-            外观专利&nbsp;{detail.appearancePatentCount || 0}&nbsp;&nbsp;&nbsp;&nbsp;
-            软著&nbsp;{detail.softwareWorksCount || 0}&nbsp;&nbsp;&nbsp;&nbsp;
-            标准&nbsp;{detail.standard == 1 ? '有' : '无'}&nbsp;&nbsp;&nbsp;&nbsp;
-            其他&nbsp;{detail.otherCount || 0}&nbsp;&nbsp;&nbsp;&nbsp;
+            发明专利&nbsp;{detail.inventionPatentCount || ""}&nbsp;&nbsp;&nbsp;&nbsp;
+            实用新型&nbsp;{detail.utilityModelCount || ""}&nbsp;&nbsp;&nbsp;&nbsp;
+            外观专利&nbsp;{detail.appearancePatentCount || ""}&nbsp;&nbsp;&nbsp;&nbsp;
+            软著&nbsp;{detail.softwareWorksCount || ""}&nbsp;&nbsp;&nbsp;&nbsp;
+            标准&nbsp;{String(detail.standard) === '1' ? '有' : String(detail.standard) === '0' ? '无' : ''}&nbsp;&nbsp;&nbsp;&nbsp;
+            其他&nbsp;{detail.otherCount || ""}&nbsp;&nbsp;&nbsp;&nbsp;
           </div>
           <div style={{ fontWeight: "bold", marginTop: 10 }}>
             2.财务数据<span style={{ color: "red" }}>(包括营收、税收、资产、研发费用等)</span>&nbsp;&nbsp;
@@ -574,7 +574,7 @@ const ContactPerson = React.createClass({
                   <div className='enterpriseNameTitle'>发明专利:</div>
                   <div className='enterpriseNameValue'>
                     <InputNumber
-                      value={upData.inventionPatentCount || 0}
+                      value={upData.inventionPatentCount}
                       onChange={e => {
                         this.setState({
                           upData: Object.assign(upData, {
@@ -589,7 +589,7 @@ const ContactPerson = React.createClass({
                   <div className='enterpriseNameTitle'>实用新型:</div>
                   <div className='enterpriseNameValue'>
                     <InputNumber
-                      value={upData.utilityModelCount || 0}
+                      value={upData.utilityModelCount}
                       onChange={e => {
                         this.setState({
                           upData: Object.assign(upData, {
@@ -604,7 +604,7 @@ const ContactPerson = React.createClass({
                   <div className='enterpriseNameTitle'>外观专利:</div>
                   <div className='enterpriseNameValue'>
                     <InputNumber
-                      value={upData.appearancePatentCount || 0}
+                      value={upData.appearancePatentCount}
                       onChange={e => {
                         this.setState({
                           upData: Object.assign(upData, {
@@ -619,7 +619,7 @@ const ContactPerson = React.createClass({
                   <div className='enterpriseNameTitle'>软著:</div>
                   <div className='enterpriseNameValue'>
                     <InputNumber
-                      value={upData.softwareWorksCount || 0}
+                      value={upData.softwareWorksCount}
                       onChange={e => {
                         this.setState({
                           upData: Object.assign(upData, {
@@ -634,7 +634,6 @@ const ContactPerson = React.createClass({
                   <div className='enterpriseNameTitle'>标准:</div>
                   <div className='enterpriseNameValue'>
                      <RadioGroup onChange={e => {
-                      console.log(e)
                       this.setState({
                         upData: Object.assign(upData, {
                           standard: e.target.value,
@@ -650,7 +649,7 @@ const ContactPerson = React.createClass({
                   <div className='enterpriseNameTitle'>其他:</div>
                   <div className='enterpriseNameValue'>
                     <InputNumber
-                      value={upData.otherCount || 0}
+                      value={upData.otherCount}
                       onChange={e => {
                         this.setState({
                           upData: Object.assign(upData, {

+ 50 - 4
js/component/manageCenter/customer/NEW/publicCustomer/publicCustomer.jsx

@@ -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>

+ 47 - 4
js/component/manageCenter/customer/NEW/query/queryCutomer.jsx

@@ -12,6 +12,7 @@ import Detaile from './detail.jsx';
 import { ChooseList } from "../../../order/orderNew/chooseList";
 import EnterpriseNameChange from "../../../../common/enterpriseNameChange";
 import TextArea from "antd/es/input/TextArea";
+import ImgList from '../../../../common/imgList/index.js';
 
 const confirm = Modal.confirm;
 
@@ -353,7 +354,9 @@ const QueryCustomer = React.createClass({
       }, {
         value: 0,
         label: "其他组织"
-      }]
+      }],
+
+      fileList: []
     };
   },
 
@@ -493,6 +496,7 @@ const QueryCustomer = React.createClass({
           level: obj.level,
           nature,
           natureOther: obj.natureOther,
+          fileList: []
         });
       } else {
         message.warning(data.error[0].message);
@@ -530,7 +534,7 @@ const QueryCustomer = React.createClass({
         message.error("请填写正确的联系人,且至少包含一个汉字");
         return false;
       }
-      if (!!values.position && /.*[\u4e00-\u9fa5]+.*$/.test(values.position)) {
+      if (!!values.position && !/.*[\u4e00-\u9fa5]+.*$/.test(values.position)) {
         message.error("请填写正确的职位,且至少包含一个汉字");
         return false;
       }
@@ -566,6 +570,10 @@ 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)
@@ -584,6 +592,12 @@ 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",
@@ -608,6 +622,7 @@ const QueryCustomer = React.createClass({
             natureOther: this.state.natureOther,
             enterpriseNature,
             listedNature,
+            materialUrl: materialUrlList.join(",")
           }
         }).done(function (data) {
           this.setState({
@@ -806,6 +821,10 @@ const QueryCustomer = React.createClass({
       changeList: newArr
     });
   },
+  handleFileChange(info) {
+    let fileList = info.fileList;
+    this.setState({ fileList });
+  },
   render() {
     let departmentArr = this.state.departmentArr || [];
     const intentionState = this.props.intentionState;
@@ -1167,7 +1186,7 @@ const QueryCustomer = React.createClass({
                       </FormItem>
                     </div>
                     {
-                      this.state.nature == 0 &&
+                      this.state.nature && this.state.nature.length && this.state.nature[0] === 0 ?
                       <div className="clearfix">
                         <FormItem
                           className="mid-item"
@@ -1184,8 +1203,32 @@ const QueryCustomer = React.createClass({
                             }}
                           />
                         </FormItem>
-                      </div>
+                      </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>

+ 22 - 18
js/component/manageCenter/customer/NEW/signCustomer/intentionDetail/detail/contactPerson.jsx

@@ -8,12 +8,15 @@ import {
   Modal,
   Input,
   InputNumber,
+  Radio
 } from "antd";
 import $ from "jquery/src/ajax";
 import EnterpriseNameChange from "../../../../../../common/enterpriseNameChange";
 import AddContact from "../../followDetail/addContact";
 import "./index.less"
 const { TextArea } = Input;
+const RadioGroup = Radio.Group;
+
 
 const ContactPerson = React.createClass({
   getInitialState() {
@@ -460,12 +463,12 @@ const ContactPerson = React.createClass({
           </div>
           <div style={{ fontSize: 12, }}>
             专利总数&nbsp;{detail.patentCount || 0}&nbsp;&nbsp;&nbsp;&nbsp;
-            发明专利&nbsp;{detail.inventionPatentCount || 0}&nbsp;&nbsp;&nbsp;&nbsp;
-            实用新型&nbsp;{detail.utilityModelCount || 0}&nbsp;&nbsp;&nbsp;&nbsp;
-            外观专利&nbsp;{detail.appearancePatentCount || 0}&nbsp;&nbsp;&nbsp;&nbsp;
-            软著&nbsp;{detail.softwareWorksCount || 0}&nbsp;&nbsp;&nbsp;&nbsp;
-            标准&nbsp;{detail.standard == 1 ? '有' : '无'}&nbsp;&nbsp;&nbsp;&nbsp;
-            其他&nbsp;{detail.otherCount || 0}&nbsp;&nbsp;&nbsp;&nbsp;
+            发明专利&nbsp;{detail.inventionPatentCount || ""}&nbsp;&nbsp;&nbsp;&nbsp;
+            实用新型&nbsp;{detail.utilityModelCount || ""}&nbsp;&nbsp;&nbsp;&nbsp;
+            外观专利&nbsp;{detail.appearancePatentCount || ""}&nbsp;&nbsp;&nbsp;&nbsp;
+            软著&nbsp;{detail.softwareWorksCount || ""}&nbsp;&nbsp;&nbsp;&nbsp;
+            标准&nbsp;{String(detail.standard) === '1' ? '有' : String(detail.standard) === '0' ? '无' : ''}&nbsp;&nbsp;&nbsp;&nbsp;
+            其他&nbsp;{detail.otherCount || ""}&nbsp;&nbsp;&nbsp;&nbsp;
           </div>
           <div style={{ fontWeight: "bold", marginTop: 10 }}>
             2.财务数据<span style={{ color: "red" }}>(包括营收、税收、资产、研发费用等)</span>&nbsp;&nbsp;
@@ -556,7 +559,7 @@ const ContactPerson = React.createClass({
                   <div className='enterpriseNameTitle'>发明专利:</div>
                   <div className='enterpriseNameValue'>
                     <InputNumber
-                      value={upData.inventionPatentCount || 0}
+                      value={upData.inventionPatentCount}
                       onChange={e => {
                         this.setState({
                           upData: Object.assign(upData, {
@@ -571,7 +574,7 @@ const ContactPerson = React.createClass({
                   <div className='enterpriseNameTitle'>实用新型:</div>
                   <div className='enterpriseNameValue'>
                     <InputNumber
-                      value={upData.utilityModelCount || 0}
+                      value={upData.utilityModelCount}
                       onChange={e => {
                         this.setState({
                           upData: Object.assign(upData, {
@@ -586,7 +589,7 @@ const ContactPerson = React.createClass({
                   <div className='enterpriseNameTitle'>外观专利:</div>
                   <div className='enterpriseNameValue'>
                     <InputNumber
-                      value={upData.appearancePatentCount || 0}
+                      value={upData.appearancePatentCount}
                       onChange={e => {
                         this.setState({
                           upData: Object.assign(upData, {
@@ -601,7 +604,7 @@ const ContactPerson = React.createClass({
                   <div className='enterpriseNameTitle'>软著:</div>
                   <div className='enterpriseNameValue'>
                     <InputNumber
-                      value={upData.softwareWorksCount || 0}
+                      value={upData.softwareWorksCount}
                       onChange={e => {
                         this.setState({
                           upData: Object.assign(upData, {
@@ -616,13 +619,14 @@ const ContactPerson = React.createClass({
                   <div className='enterpriseNameTitle'>标准:</div>
                   <div className='enterpriseNameValue'>
                       <RadioGroup onChange={e => {
-                      console.log(e)
-                      this.setState({
-                        upData: Object.assign(upData, {
-                          standard: e.target.value,
-                        }),
-                      })
-                      }} value={upData.standard}>
+                        this.setState({
+                          upData: Object.assign(upData, {
+                            standard: e.target.value,
+                          }),
+                        })
+                        }}
+                        value={upData.standard}
+                      >
                       <Radio value={1}>有</Radio>
                       <Radio value={0}>无</Radio>
                     </RadioGroup>
@@ -632,7 +636,7 @@ const ContactPerson = React.createClass({
                   <div className='enterpriseNameTitle'>其他:</div>
                   <div className='enterpriseNameValue'>
                     <InputNumber
-                      value={upData.otherCount || 0}
+                      value={upData.otherCount}
                       onChange={e => {
                         this.setState({
                           upData: Object.assign(upData, {

+ 22 - 8
js/component/tools.js

@@ -713,13 +713,21 @@ const obj = {
   //获取企业行业
   getIndustryType(e) {
     if (e) {
-      let theType = "";
+      let valueArr = [];
+      if (typeof e == 'string') {
+        valueArr = e.split(',');
+      } else if (e instanceof Array) {
+        valueArr = e;
+      }
+      let theType = [];
       industryList.map(function (item) {
-        if (item.value == e) {
-          theType = item.key;
+        console.log(valueArr, item)
+        if (valueArr.indexOf(item.value) > -1) {
+          // theType = item.key;
+          theType.push(item.key);
         }
       });
-      return theType;
+      return theType.join(',');
     }
   },
   //获取客户性质
@@ -1208,13 +1216,19 @@ const obj = {
   //行业
   getIndustry: function (e) {
     if (e) {
-      let theType = "";
+      let valueArr = [];
+      if (typeof e == 'string') {
+        valueArr = e.split(',');
+      } else if (e instanceof Array) {
+        valueArr = e;
+      }
+      let theType = [];
       industry.map(function (item) {
-        if (item.value == e) {
-          theType = item.key;
+        if (valueArr.indexOf(item.value) > -1) {
+          theType.push(item.key);
         }
       });
-      return theType;
+      return theType.join(',');
     }
   },
   //岗位