dev01 3 months ago
parent
commit
71c2044e90

File diff suppressed because it is too large
+ 489 - 489
js/component/common/enterpriseNameChange/inforChange.jsx


+ 394 - 4
js/component/manageCenter/channelList/channelunit/detail/contactPerson.jsx

@@ -10,6 +10,9 @@ import {
   Input,
   Cascader,
   Select,
+  InputNumber,
+  AutoComplete,
+  Tag
 } from "antd";
 import $ from "jquery/src/ajax";
 import AddContact from "../../../customer/NEW/signCustomer/followDetail/addContact";
@@ -194,6 +197,9 @@ const ContactPerson = React.createClass({
       dataArrar: [],
       newintroduction: "",
       newtype: 0,
+      enterpriseCount: 0,
+      channelIndicators: "",
+      cooperationProjects: [],
     };
   },
   //tab2删除
@@ -334,7 +340,11 @@ const ContactPerson = React.createClass({
       locationProvince: (data.province || "") + (!data.city ? "" : "-") + (data.city || "") + (!data.area ? "" : "-") + (data.area || ""),
       introduction: this.props.data.introduction,
       type: this.props.data.type,
+      enterpriseCount: this.props.data.enterpriseCount,
+      channelIndicators: this.props.data.channelIndicators,
+      intendedProject: this.props.data.intendedProject,
     });
+    this.queryByUid(this.props.data.id)
   },
   componentWillReceiveProps(nextProps) {
     // if (nextProps.data.id && nextProps.contactState) {
@@ -342,6 +352,84 @@ const ContactPerson = React.createClass({
       this.contactLists(nextProps.data.id);
     }
   },
+
+  // 查询企业信息
+  queryByUid() {
+    this.setState({
+      loading: true
+    });
+    $.ajax({
+      method: "get",
+      dataType: "json",
+      crossDomain: false,
+      url: globalConfig.context + "/api/admin/userArchives/queryByUid",
+      data: {
+        id: this.props.data.id,
+      },
+      success: function (data) {
+        if (data.error.length || data.data.list == "") {
+          if (data.error && data.error.length) {
+            message.warning(data.error[0].message);
+          }
+        } else {
+          this.setState({
+            interviewDistribution: data.data.interviewDistribution,
+            interviewIdeas: data.data.interviewIdeas,
+            // detail: data.data
+          })
+        }
+      }.bind(this)
+    }).always(
+      function () {
+        this.setState({
+          loading: false
+        });
+      }.bind(this)
+    );
+  },
+
+  supervisor(value) {
+    $.ajax({
+      method: "get",
+      dataType: "json",
+      crossDomain: false,
+      url: globalConfig.context + '/api/admin/order/getBusinessProjectByName',
+      data: {
+        businessName: value
+      },
+      success: function (data) {
+        let thedata = data.data;
+        if (data.error.length === 0) {
+          this.setState({
+            cooperationProjects: thedata,
+          });
+        } else {
+          message.warning(data.error[0].message);
+        }
+      }.bind(this),
+    }).always(
+      function () {
+
+      }.bind(this)
+    );
+  },
+  onSelect(value) {
+    let arr = this.state.cooperationProjects.filter(v => v.id === value);
+    let arr1 = this.state.dataArrar.filter(v => v.value === value);
+    if (arr.length > 0) {
+      if (arr1.length > 0) {
+        message.warning('选项已存在');
+      } else {
+        this.state.dataArrar.push({
+          label: arr[0].bname,
+          value: arr[0].id,
+        })
+        this.setState({
+          dataArrar: this.state.dataArrar
+        })
+      }
+    }
+  },
   // 修改渠道名称
   onOk() {
     if (!this.state.newname) {
@@ -377,7 +465,7 @@ const ContactPerson = React.createClass({
   },
   // 修改信息
   updateDate() {
-    const { dataArrar, visible, newintroduction, newtype } = this.state;
+    const { dataArrar, visible, newintroduction, newtype, newenterpriseCount, newchannelIndicators, newinterviewIdeas, newinterviewDistribution } = this.state;
     if (dataArrar.length === 0 && visible == "city") {
       message.warning("请选择省-市-区");
       return;
@@ -390,6 +478,26 @@ const ContactPerson = React.createClass({
       message.warning("请选择渠道类别");
       return;
     }
+    if (!newenterpriseCount && newenterpriseCount != 0 && visible == "enterpriseCount") {
+      message.warning("请输入渠道覆盖企业数");
+      return;
+    }
+    if (!newchannelIndicators && visible == "channelIndicators") {
+      message.warning("请输入渠道考核标准");
+      return;
+    }
+    if (dataArrar.length == 0 && visible == "intendedProject") {
+      message.warning("请输入面谈项目");
+      return;
+    }
+    if (!newinterviewIdeas && visible == "interviewIdeas") {
+      message.warning("请输入面谈思路及目的");
+      return;
+    }
+    if (!newinterviewDistribution && visible == "interviewDistribution") {
+      message.warning("请输入我方主要面谈及分工");
+      return;
+    }
     this.setState({
       loading: true,
     });
@@ -407,8 +515,32 @@ const ContactPerson = React.createClass({
     if (visible == "type") {
       data.channelType = newtype;
     }
+    if (visible == "enterpriseCount") {
+      data.enterpriseCount = newenterpriseCount;
+    }
+    if (visible == "channelIndicators") {
+      data.channelIndicators = newchannelIndicators
+    }
+    if (visible == "intendedProject") {
+      let arr = [];
+      for (let i of dataArrar) {
+        arr.push(i.label)
+      }
+      data.intendedProject = arr.join(',')
+    }
+    if (visible == "interviewIdeas") {
+      data.interviewIdeas = newinterviewIdeas
+    }
+    if (visible == "interviewDistribution") {
+      data.interviewDistribution = newinterviewDistribution
+    }
     $.ajax({
-      url: globalConfig.context + "/api/admin/customer/updateUserDate",
+      url: globalConfig.context +
+        visible == "channelIndicators"
+        ? "/api/admin/userArchives/update" : visible == "enterpriseCount"
+          ? "/api/admin/userArchives/update" : visible == "interviewIdeas"
+            ? "/api/admin/userArchives/update" : visible == "interviewDistribution"
+              ? "/api/admin/userArchives/update" : "/api/admin/customer/updateUserDate",
       method: "post",
       data: data,
     }).done(
@@ -440,6 +572,35 @@ const ContactPerson = React.createClass({
               type: newtype,
             });
           }
+          if (visible == "enterpriseCount") {
+            this.setState({
+              enterpriseCount: newenterpriseCount,
+            });
+          }
+          if (visible == "channelIndicators") {
+            this.setState({
+              channelIndicators: newchannelIndicators,
+            });
+          }
+          if (visible == "intendedProject") {
+            let arr = [];
+            for (let i of dataArrar) {
+              arr.push(i.label)
+            }
+            this.setState({
+              intendedProject: arr.join(',')
+            })
+          }
+          if (visible == "interviewIdeas") {
+            this.setState({
+              interviewIdeas: newinterviewIdeas,
+            });
+          }
+          if (visible == "interviewDistribution") {
+            this.setState({
+              interviewDistribution: newinterviewDistribution,
+            });
+          }
         } else {
           message.warning(data.error[0].message);
         }
@@ -447,6 +608,11 @@ const ContactPerson = React.createClass({
     );
   },
 
+  handleCloseCooperation(removedTag) {
+    let dataArrar = this.state.dataArrar.filter(tag => { return tag.value !== removedTag.value });
+    this.setState({ dataArrar });
+  },
+
   render() {
     const { visible } = this.state;
     return (
@@ -535,7 +701,37 @@ const ContactPerson = React.createClass({
                   onClick={() => {
                     this.setState({
                       visible: "introduction",
-                      newintroduction: [],
+                      newintroduction: "",
+                    });
+                  }}
+                >
+                  修改
+                </Button>
+              </div>
+              <div style={{ padding: "5px 0" }}>
+                <span>渠道覆盖企业数:{this.state.enterpriseCount}</span>
+                <Button
+                  type="primary"
+                  style={{ marginLeft: "20px" }}
+                  onClick={() => {
+                    this.setState({
+                      visible: "enterpriseCount",
+                      newenterpriseCount: "",
+                    });
+                  }}
+                >
+                  修改
+                </Button>
+              </div>
+              <div style={{ padding: "5px 0" }}>
+                <span>渠道考核指标:{this.state.channelIndicators}</span>
+                <Button
+                  type="primary"
+                  style={{ marginLeft: "20px" }}
+                  onClick={() => {
+                    this.setState({
+                      visible: "channelIndicators",
+                      newchannelIndicators: "",
                     });
                   }}
                 >
@@ -561,6 +757,68 @@ const ContactPerson = React.createClass({
             />
           </Spin>
         </div>
+
+        <div style={{
+          fontSize: 14,
+          marginTop: 20,
+        }}>
+          <div style={{ fontWeight: "bold", marginBottom: 5, color: "#58A3FF" }}>面谈的渠道情况</div>
+          <div style={{ fontWeight: "bold", marginTop: 10 }}>
+            面谈项目&nbsp;&nbsp;&nbsp;&nbsp;
+            {
+              !this.props.isCustomerAdmin &&
+              <Button
+                type="primary"
+                onClick={() => {
+                  this.setState({
+                    visible: "intendedProject",
+                    dataArrar: [],
+                  })
+                }}
+              >
+                修改
+              </Button>
+            }
+          </div>
+          <div style={{ fontSize: 12, }}>{this.state.intendedProject || "无"}</div>
+          <div style={{ fontWeight: "bold", marginTop: 10 }}>
+            面谈思路及目的&nbsp;&nbsp;&nbsp;&nbsp;
+            {
+              !this.props.isCustomerAdmin &&
+              <Button
+                type="primary"
+                onClick={() => {
+                  this.setState({
+                    visible: "interviewIdeas",
+                    newinterviewIdeas: "",
+                  })
+                }}
+              >
+                修改
+              </Button>
+            }
+          </div>
+          <div style={{ fontSize: 12, }}>{this.state.interviewIdeas || "无"}</div>
+          <div style={{ fontWeight: "bold", marginTop: 10 }}>
+            我方主要面谈人及分工&nbsp;&nbsp;&nbsp;&nbsp;
+            {
+              !this.props.isCustomerAdmin &&
+              <Button
+                type="primary"
+                onClick={() => {
+                  this.setState({
+                    visible: "interviewDistribution",
+                    newinterviewDistribution: "",
+                  })
+                }}
+              >
+                修改
+              </Button>
+            }
+          </div>
+          <div style={{ fontSize: 12, }}>{this.state.interviewDistribution || "无"}</div>
+        </div>
+
         {/* 新增联系人 */}
         <AddContact
           addcontactModul={this.state.addcontactModul}
@@ -694,7 +952,139 @@ const ContactPerson = React.createClass({
                 </div>
               </div>
             )}
-
+            {visible == "enterpriseCount" && (
+              <div className="enterpriseNameContent">
+                <div className="enterpriseNameItem">
+                  <div className="enterpriseNameTitle">更改前:</div>
+                  <div className="enterpriseNameValue">{this.state.enterpriseCount}</div>
+                </div>
+                <div className="enterpriseNameItem">
+                  <div className="enterpriseNameTitle">更改后:</div>
+                  <div className="enterpriseNameValue">
+                    <InputNumber
+                      value={this.state.newenterpriseCount}
+                      onChange={(e) => {
+                        this.setState({
+                          newenterpriseCount: e,
+                        });
+                      }}
+                    />
+                  </div>
+                </div>
+              </div>
+            )}
+            {visible == "channelIndicators" && (
+              <div className="enterpriseNameContent">
+                <div className="enterpriseNameItem">
+                  <div className="enterpriseNameTitle">更改前:</div>
+                  <div className="enterpriseNameValue">
+                    {this.state.channelIndicators}
+                  </div>
+                </div>
+                <div className="enterpriseNameItem">
+                  <div className="enterpriseNameTitle">更改后:</div>
+                  <div className="enterpriseNameValue">
+                    <TextArea
+                      style={{ width: "200px" }}
+                      value={this.state.newchannelIndicators}
+                      onChange={(e) => {
+                        this.setState({
+                          newchannelIndicators: e.target.value,
+                        });
+                      }}
+                    />
+                  </div>
+                </div>
+              </div>
+            )}
+            {visible == "intendedProject" && (
+              <div className="enterpriseNameContent">
+                <div className="enterpriseNameItem">
+                  <div className="enterpriseNameTitle">意向合作项目:</div>
+                  <div className="enterpriseNameValue">
+                    {this.state.intendedProject}
+                  </div>
+                </div>
+                <div className="enterpriseNameItem">
+                  <div className="enterpriseNameTitle">更改后:</div>
+                  <div className="enterpriseNameValue">
+                    <div style={{ paddingBottom: this.state.dataArrar.length === 0 ? 0 : '10px' }}>
+                      {this.state.dataArrar.map((tag, index) => {
+                        const isLongTag = tag.label.length > 20;
+                        const tagElem = (
+                          <Tag closable key={tag.label} afterClose={() => this.handleCloseCooperation(tag)}>
+                            {isLongTag ? `${tag.label.slice(0, 20)}...` : tag.label}
+                          </Tag>
+                        );
+                        return isLongTag ? <Tooltip title={tag.label} key={tag.label}>{tagElem}</Tooltip> : tagElem;
+                      })}
+                    </div>
+                    <div>
+                      <AutoComplete
+                        style={{ width: 200 }}
+                        onSearch={this.supervisor}
+                        onSelect={this.onSelect}
+                        placeholder="请输入关键字"
+                      >
+                        {
+                          this.state.cooperationProjects.map(function (item) {
+                            return <Select.Option key={item.id} value={item.id}>{item.bname}</Select.Option>
+                          })
+                        }
+                      </AutoComplete>
+                    </div>
+                  </div>
+                </div>
+              </div>
+            )}
+            {visible == "interviewIdeas" && (
+              <div className="enterpriseNameContent">
+                <div className="enterpriseNameItem">
+                  <div className="enterpriseNameTitle">更改前:</div>
+                  <div className="enterpriseNameValue">
+                    {this.state.interviewIdeas}
+                  </div>
+                </div>
+                <div className="enterpriseNameItem">
+                  <div className="enterpriseNameTitle">更改后:</div>
+                  <div className="enterpriseNameValue">
+                    <TextArea
+                      style={{ width: "200px" }}
+                      value={this.state.newinterviewIdeas}
+                      onChange={(e) => {
+                        this.setState({
+                          newinterviewIdeas: e.target.value,
+                        });
+                      }}
+                    />
+                  </div>
+                </div>
+              </div>
+            )}
+            {visible == "interviewDistribution" && (
+              <div className="enterpriseNameContent">
+                <div className="enterpriseNameItem">
+                  <div className="enterpriseNameTitle">更改前:</div>
+                  <div className="enterpriseNameValue">
+                    {this.state.interviewDistribution}
+                  </div>
+                </div>
+                <div className="enterpriseNameItem">
+                  <div className="enterpriseNameTitle">更改后:</div>
+                  <div className="enterpriseNameValue">
+                    <TextArea
+                      style={{ width: "200px" }}
+                      value={this.state.newinterviewDistribution}
+                      onChange={(e) => {
+                        this.setState({
+                          newinterviewDistribution: e.target.value,
+                        });
+                      }}
+                    />
+                  </div>
+                </div>
+              </div>
+            )}
             <Popconfirm
               placement="top"
               title="确定要修改吗?"

+ 5 - 1
js/component/manageCenter/customer/NEW/signCustomer/followDetail/addContact.jsx

@@ -31,7 +31,11 @@ const AddContact = React.createClass({
       message.error("请填写正确的姓名,且至少包含一个汉字");
       return;
     };
-    if (this.state.newmobile.length != 11) {
+    // if (this.state.newmobile.length != 11) {
+    //   message.error('请填写正确的手机号码');
+    //   return
+    // }
+    if (!(/^1[34578]\d{9}$/.test(this.state.newmobile))) {
       message.error('请填写正确的手机号码');
       return
     }

+ 4 - 10
js/component/manageCenter/financialManage/orderDetail/orderDetail.jsx

@@ -767,19 +767,13 @@ const OrderDetail = Form.create()(
             columns = [
               {
                 title: "负责人",
-                dataIndex: "contacts",
-                key: "contacts",
-                render: (text, record) => {
-                  return text || record.receiverName;
-                },
+                dataIndex: "receiverName",
+                key: "receiverName",
               },
               {
                 title: "负责人电话",
-                dataIndex: "contactsMobile",
-                key: "contactsMobile",
-                render: (text, record) => {
-                  return text || record.receiverMobile;
-                },
+                dataIndex: "receiverMobile",
+                key: "receiverMobile",
               },
               {
                 title: "项目状态",

+ 16 - 13
js/component/manageCenter/order/orderNew/addService.jsx

@@ -5856,7 +5856,6 @@ const NewService = Form.create()(
       let children = vipYear.map(its => (
         <Option key={its}>{its}</Option>
       ));
-
       let approvalOptions = [
         { label: '无前期款', value: 1 },
         { label: '暂无合同款', value: 2 },
@@ -5866,18 +5865,22 @@ const NewService = Form.create()(
         { label: '3万以下会员', value: 6 },
         { label: '认证首期5K以下', value: 7 },
         {
-          label: <Input
-            type="text"
-            style={{ width: 150, borderStyle: "none none solid none" }}
-            value={this.state.typeExplain}
-            disabled={this.state.approvaType.indexOf(0) === -1 ? true : false}
-            placeholder="其他"
-            onChange={e => {
-              this.setState({
-                typeExplain: e.target.value
-              })
-            }}
-          />, value: 0
+          label: <span>
+            <span>其他&nbsp;&nbsp;</span>
+            <Input
+              type="text"
+              style={{ width: 150, borderStyle: "none none solid none" }}
+              value={this.state.typeExplain}
+              // disabled={this.state.approvaType.indexOf(0) === -1 ? true : false}
+              placeholder=""
+              onChange={e => {
+                this.setState({
+                  typeExplain: e.target.value
+                })
+              }}
+            />
+          </span>
+          , value: 0
         },
       ];
 

+ 15 - 12
js/component/manageCenter/order/orderNew/reject.jsx

@@ -2175,18 +2175,21 @@ const IntentionCustomer = Form.create()(
         { label: '3万以下会员', value: 6 },
         { label: '认证首期5K以下', value: 7 },
         {
-          label: <Input
-            type="text"
-            style={{ width: 150, borderStyle: "none none solid none" }}
-            value={this.state.typeExplain}
-            disabled={this.state.approvaType.indexOf(0) === -1 ? true : false}
-            placeholder="其他"
-            onChange={e => {
-              this.setState({
-                typeExplain: e.target.value
-              })
-            }}
-          />, value: 0
+          label: <span>
+            <span>其他&nbsp;&nbsp;</span>
+            <Input
+              type="text"
+              style={{ width: 150, borderStyle: "none none solid none" }}
+              value={this.state.typeExplain}
+              // disabled={this.state.approvaType.indexOf(0) === -1 ? true : false}
+              placeholder=""
+              onChange={e => {
+                this.setState({
+                  typeExplain: e.target.value
+                })
+              }}
+            />
+          </span>, value: 0
         },
       ];
 

+ 4 - 4
js/component/manageCenter/project/summary/projectDetails.jsx

@@ -965,13 +965,13 @@ class ProjectDetails extends Component {
           columns = [
             {
               title: "负责人",
-              dataIndex: "contacts",
-              key: "contacts",
+              dataIndex: "receiverName",
+              key: "receiverName",
             },
             {
               title: "负责人电话",
-              dataIndex: "contactsMobile",
-              key: "contactsMobile",
+              dataIndex: "receiverMobile",
+              key: "receiverMobile",
             },
             {
               title: "项目状态",