Browse Source

项目和客户模块优化

dev01 1 month ago
parent
commit
ba2c49fca0

+ 7 - 2
js/component/common/enterpriseNameChange/inforChange.jsx

@@ -78,7 +78,7 @@ class InforChange extends Component {
       locationProvince: props.data.locationProvince,
       businessScope: props.data.businessScope,
       intendedProject: props.data.intendedProject,
-      industryName: props.data.industry,
+      industryName: props.data.industryName,
       nature: nature,
       natureText: "",
       natureOther: props.data.natureOther,
@@ -291,7 +291,8 @@ class InforChange extends Component {
       // this.props.onCancel();
     }
     if (this.state.changeType === 4) {
-      data.industry = dataArrar
+      data.industry = dataArrar.join(',')
+      data.industryName = getIndustry(dataArrar)
     }
     if (this.state.changeType === 5) {
       let enterpriseNature = undefined; // 企业性质 0=其他,1=国企,2=央企,3=私企,4=合资企业(含港澳台),5=外资控股
@@ -307,6 +308,9 @@ class InforChange extends Component {
       data.listedNature = listedNature;
       data.natureOther = this.state.natureOther;
     }
+
+
+    console.log(data)
     $.ajax({
       url: globalConfig.context + "/api/admin/customer/updateUserDate",
       method: "post",
@@ -719,6 +723,7 @@ class InforChange extends Component {
                                         dataArrar: e
                                       })
                                     }}
+                                    multiple
                                   >
                                     {
                                       industry.map(function (item) {

+ 95 - 28
js/component/common/projectOperation/newAddProject.jsx

@@ -292,7 +292,7 @@ class NewAddProject extends Component {
     }
 
     let sonList = this.state.subProList.map(item => {
-      if (this.state.projectType == 1) {
+      if (this.state.projectType == 1 && item.newCheck) {
         item.htMember = item.newCheck.includes(1) ? 1 : 0
         item.additionalDeduction = item.newCheck.includes(2) ? 1 : 0
         item.rdAwardsubsidy = item.newCheck.includes(3) ? 1 : 0
@@ -1380,31 +1380,7 @@ class NewAddProject extends Component {
                     </FormItem>
                   </div> : null
               }
-              {((isVip != 6) || (isVip == 6 && !isEdit)) &&
-                <div className="clearfix">
-                  <FormItem
-                    wrapperCol={{ span: 12, offset: 8 }}
-                    className="half-middle"
-                  >
-                    <Button
-                      className="submitSave"
-                      type="primary"
-                      onClick={() => {
-                        this.onSubmit();
-                      }}
-                    >
-                      保存
-                    </Button>
-                    <Button
-                      className="submitSave"
-                      type="ghost"
-                      onClick={this.props.onCancel}
-                    >
-                      取消
-                    </Button>
-                  </FormItem>
-                </div>
-              }
+
               {
                 // 会员项目子集列表
                 isEdit &&
@@ -1643,7 +1619,98 @@ class NewAddProject extends Component {
                   </div>
                 )
               }) }
-              { this.state.subProList.length < this.state.serviceLife.length &&
+              
+              {((isVip != 6) || (isVip == 6 && !isEdit)) &&
+                <div className="clearfix">
+                  { isVip != 6 ? (
+                    <FormItem
+                      wrapperCol={{ span: 12, offset: 8 }}
+                      className="half-middle"
+                    >
+
+                      <Button
+                        className="submitSave"
+                        type="primary"
+                        onClick={() => {
+                          this.onSubmit();
+                        }}
+                      >
+                        保存
+                      </Button>
+                      <Button
+                        className="submitSave"
+                        type="ghost"
+                        onClick={() => this.props.onCancel()}
+                      >
+                        取消
+                      </Button>
+                      
+                    </FormItem>
+                  ) : (
+                    <FormItem
+                      wrapperCol={{ span: 12, offset: 8 }}
+                      className="half-middle"
+                    >
+                      { this.state.subProList && this.state.subProList.length ? (
+                        <div>
+                          <Button
+                            className="submitSave"
+                            type="primary"
+                            onClick={() => {
+                              const { subProList } = this.state;
+                              if (!subProList[subProList.length - 1].serviceYear) {
+                                message.warning("请先选择上一个派单的年份!");
+                                return;
+                              }
+                              subProList.push({});
+                              this.setState({ subProList });
+                            }}
+                            disabled={this.state.subProList.length >= this.state.serviceLife.length}
+                          >
+                            + 继续添加,本次派单
+                          </Button>
+                          <Button
+                            className="submitSave"
+                            type="primary"
+                            onClick={() => {
+                              this.onSubmit();
+                            }}
+                          >
+                            保存,确定本次派单
+                          </Button>
+                        </div>
+                      ) : (
+                        <div>
+                          <Button
+                            className="submitSave"
+                            type="primary"
+                            onClick={() => {
+                              const { subProList } = this.state;
+                              subProList.push({});
+                              this.setState({ subProList });
+                            }}
+                            >
+                            + 添加本次派单
+                            </Button>
+                            <Button
+                            className="submitSave"
+                            type="primary"
+                            onClick={() => {
+                              this.onSubmit();
+                            }}
+                            >
+                            暂不开启工作
+                          </Button>
+                        </div>
+
+                      ) }
+                      
+                    </FormItem>
+                  ) }
+                  
+                </div>
+              }
+              {/* { this.state.subProList.length < this.state.serviceLife.length &&
                 <div className="clearfix">
                   <FormItem
                     wrapperCol={{ span: 19, offset: 8 }}
@@ -1662,7 +1729,7 @@ class NewAddProject extends Component {
                     <span style={{ color: "#61BBE2", marginLeft: 10 }}>请填写本次派单的年份,派单表示立即安排人员开始相关的工作!!!</span>
                   </FormItem>
                 </div>
-              }
+              } */}
               {/* {
                 this.state.splitList.length < this.state.yearSum &&
                 <div

+ 21 - 0
js/component/manageCenter/customer/NEW/intentionCustomer/intentionDetail/detail/contactPerson.jsx

@@ -9,10 +9,13 @@ import {
   Modal,
   Input,
   InputNumber,
+  Radio,
 } from "antd";
 import $ from "jquery/src/ajax";
 import EnterpriseNameChange from '../../../../../../../component/common/enterpriseNameChange';
 import AddContact from "../../../signCustomer/followDetail/addContact";
+const RadioGroup = Radio.Group;
+
 
 const { TextArea } = Input;
 const ContactPerson = React.createClass({
@@ -452,6 +455,7 @@ const ContactPerson = React.createClass({
                       utilityModelCount: detail.utilityModelCount,
                       appearancePatentCount: detail.appearancePatentCount,
                       softwareWorksCount: detail.softwareWorksCount,
+                      standard: detail.standard,
                       otherCount: detail.otherCount,
                     }
                   })
@@ -467,6 +471,7 @@ const ContactPerson = React.createClass({
             实用新型&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;
           </div>
           <div style={{ fontWeight: "bold", marginTop: 10 }}>
@@ -626,6 +631,22 @@ const ContactPerson = React.createClass({
                   </div>
                 </div>
                 <div className='enterpriseNameItem'>
+                  <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}>
+                      <Radio value={1}>有</Radio>
+                      <Radio value={0}>无</Radio>
+                    </RadioGroup>
+                  </div>
+                </div>
+                <div className='enterpriseNameItem'>
                   <div className='enterpriseNameTitle'>其他:</div>
                   <div className='enterpriseNameValue'>
                     <InputNumber

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

@@ -449,6 +449,7 @@ const ContactPerson = React.createClass({
                     utilityModelCount: detail.utilityModelCount,
                     appearancePatentCount: detail.appearancePatentCount,
                     softwareWorksCount: detail.softwareWorksCount,
+                    standard: detail.standard,
                     otherCount: detail.otherCount,
                   }
                 })
@@ -463,6 +464,7 @@ const ContactPerson = React.createClass({
             实用新型&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;
           </div>
           <div style={{ fontWeight: "bold", marginTop: 10 }}>
@@ -611,6 +613,22 @@ const ContactPerson = React.createClass({
                   </div>
                 </div>
                 <div className='enterpriseNameItem'>
+                  <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}>
+                      <Radio value={1}>有</Radio>
+                      <Radio value={0}>无</Radio>
+                    </RadioGroup>
+                  </div>
+                </div>
+                <div className='enterpriseNameItem'>
                   <div className='enterpriseNameTitle'>其他:</div>
                   <div className='enterpriseNameValue'>
                     <InputNumber