Browse Source

客户档案面谈保存接口联调

雷佳斌 2 months ago
parent
commit
2b5d6b3904

+ 77 - 0
src/components/common/CheckboxPicker/index.jsx

@@ -0,0 +1,77 @@
+import React, { Component } from "react";
+import { AtFloatLayout , AtCheckbox, AtButton } from "taro-ui";
+
+import 'taro-ui/dist/style/components/float-layout.scss';
+import 'taro-ui/dist/style/components/button.scss';
+
+
+class CheckboxPicker extends Component {
+  constructor(props) {
+    super(props);
+    this.state = {
+        checkboxOption: props.options || [],
+        checkedList: []
+    }
+
+    this.handleClose = this.handleClose.bind(this);
+    this.handleChange = this.handleChange.bind(this);
+    this.handleConfirm = this.handleConfirm.bind(this);
+  }
+
+  componentDidUpdate(prevProps) {
+      if (JSON.stringify(this.props.options) != JSON.stringify(prevProps.options)) {
+        this.setState({ checkboxOption: this.props.options });
+      }
+
+      if (JSON.stringify(this.props.checkedList) != JSON.stringify(prevProps.checkedList)) {
+          this.setState({ checkedList: this.props.checkedList });
+      }
+  }
+
+  handleClose() {
+    this.props.onClose();
+  }
+
+  handleChange(e) {
+    this.setState({ checkedList: e });
+  }
+
+  handleConfirm() {
+    
+    const labelArr = [];
+    const { checkedList, checkboxOption } = this.state;
+    checkedList.map(checkedItem => {
+        checkboxOption.map(optionItem => {
+            if (checkedItem == optionItem.id) {
+                labelArr.push(optionItem.title);
+            }
+        })
+    })
+    this.props.onConfirm(checkedList, labelArr);
+    this.handleClose();
+  }
+
+  render() {
+    const { checkboxOption, checkedList } = this.state;
+    const checkboxOptions = checkboxOption.map(item => {
+        return { label: item.title, value: item.id }
+    })
+    return (
+        <AtFloatLayout isOpened={this.props.isOpened} title={this.props.title} scrollY onClose={this.handleClose}>
+            <view style={{ paddingBottom: '90rpx'}}>
+                <AtCheckbox
+                    options={checkboxOptions}
+                    selectedList={checkedList}
+                    onChange={this.handleChange}
+                />
+
+                <view className='operate-btn' style={{position: 'fixed', left: 0, right: 0, bottom: 0, height: '90rpx', background: '#fff'}}>
+                    <AtButton type='primary' size='normal' onClick={this.handleConfirm}>确定</AtButton>
+                </view>
+            </view>
+        </AtFloatLayout>
+    )
+  }
+}
+
+export default CheckboxPicker;

+ 657 - 93
src/pages/customerProfile/index.jsx

@@ -1,6 +1,7 @@
 import React, { Component } from "react";
-import { View, Input, Button, Text, Picker } from "@tarojs/components";
+import { View, Input, Button, Text, Picker, RadioGroup, Label, Radio } from "@tarojs/components";
 import Taro, { getCurrentInstance } from "@tarojs/taro";
+import { getProvince } from '../../utils/tools/index'
 import {
   AtSearchBar,
   AtCheckbox,
@@ -11,11 +12,15 @@ import {
   AtModalAction,
   AtInput,
   AtIcon,
+  AtButton,
+  AtTag,
+  AtRadio
 } from "taro-ui";
 import Skeleton from "taro-skeleton";
 import {
   queryByUidAll,
   updateUserDate,
+  updateUser,
   addOneContact,
   findCustomerContacts,
   updateMainContact,
@@ -28,15 +33,18 @@ import "taro-ui/dist/style/components/icon.scss";
 import "taro-ui/dist/style/components/textarea.scss";
 import "taro-ui/dist/style/components/modal.scss";
 import "taro-ui/dist/style/components/timeline.scss";
-import "taro-ui/dist/style/components/calendar.scss"; 2
+import "taro-ui/dist/style/components/calendar.scss";
 import "taro-ui/dist/style/components/input.scss";
 import "taro-ui/dist/style/components/checkbox.scss";
 import "taro-ui/dist/style/components/search-bar.scss";
+import "taro-ui/dist/style/components/tag.scss";
 
 import MessageNoticebar from "../../components/common/messageNoticebar";
 import { industry, channelTypeList } from '../../utils/tools/config';
 import { getChannel } from "../../utils/tools";
 import Superior from "../../components/common/superior";
+import CheckboxPicker from "../../components/common/CheckboxPicker";
+import AddressPicker from "../../components/common/addressPicker"
 
 
 class CustomerProfile extends Component {
@@ -58,6 +66,20 @@ class CustomerProfile extends Component {
       isSuperior: false,
       channe: {},
       isMask: false,
+
+      addressPickerShow: false,
+      region: [],
+      customItem: [],
+      multiplePickerShow: false,
+      multiplePickerTitle: '',
+      multiplePickerType: '',
+      multiplePickerOptions: [],
+      multiplePickerCheckedList: [],
+
+      addItemShow: false,
+      addItemType: '',
+      addItemTitle: '',
+      addItemInputVal: ''
     };
     this.queryByUidAll = this.queryByUidAll.bind(this);
     this.update = this.update.bind(this);
@@ -65,6 +87,10 @@ class CustomerProfile extends Component {
     this.getUserList = this.getUserList.bind(this);
     this.getBusinessProjectByName = this.getBusinessProjectByName.bind(this);
     this.onSearchChange = this.onSearchChange.bind(this);
+    this.handleOpenMultiplePicker = this.handleOpenMultiplePicker.bind(this);
+    this.handleMultipleConfirm = this.handleMultipleConfirm.bind(this);
+    this.handleAddItemSave = this.handleAddItemSave.bind(this);
+    this.handleCloseAddItemDialog = this.handleCloseAddItemDialog.bind(this);
   }
 
   componentDidMount() {
@@ -77,8 +103,72 @@ class CustomerProfile extends Component {
     }
   }
 
-  componentDidShow() {
+  toggleAddressPicker(e) {
+      const addressIds = getProvince(e.province, e.city, e.area);
+      const { dtails } = this.state;
+      dtails.locationProvince = addressIds[0];
+      dtails.locationProvinceName = e.province;
+      dtails.locationCity = addressIds[1];
+      dtails.locationCityName = e.city;
+      dtails.locationArea = addressIds[2];
+      dtails.locationAreaName = e.area;
+      this.setState({ dtails, addressPickerShow: false });
+  }
 
+  handleOpenMultiplePicker(type) {
+      let multiplePickerOptions = [];
+      let multiplePickerTitle = '';
+      let multiplePickerCheckedList = [];
+      const { dtails } = this.state;
+      switch (type) {
+        case 'industry':
+            // 企业所属行业
+            multiplePickerOptions = industry;
+            multiplePickerCheckedList = !!dtails.industry ? dtails.industry.toString().split(',') : [];
+            multiplePickerTitle = '请选择企业所属行业';
+            break;
+        case 'externalInvestIndustry':
+            // 对外投资控股的行业
+            multiplePickerOptions = industry;
+            multiplePickerCheckedList = !!dtails.externalInvestIndustry ? dtails.externalInvestIndustry.toString().split(',') : [];
+            multiplePickerTitle = '请选择对外投资控股的行业';
+        break;  
+        default:
+            break;
+      }
+    this.setState({
+        multiplePickerShow: true,
+        multiplePickerType: type,
+        multiplePickerTitle,
+        multiplePickerOptions,
+        multiplePickerCheckedList: multiplePickerCheckedList.map(item => Number(item))
+    })
+  }
+
+  handleMultipleConfirm(selectedIds, selectedLabels) {
+    const { multiplePickerType, dtails } = this.state;
+    switch (multiplePickerType) {
+        case "industry":
+            // 企业所属行业
+            dtails.industry = selectedIds.join(',');
+            dtails.industryName = selectedLabels.join('、');
+            break;
+        case "externalInvestIndustry":
+            // 对外投资控股的行业
+            dtails.externalInvestIndustry = selectedIds.join(',');
+            dtails.externalInvestIndustryName = selectedLabels.join('、');
+            break;
+        default:
+            break;
+    }
+    this.setState({ dtails })
+  }
+
+  bindRegionChange (e) {
+    console.log('picker发送选择改变,携带值为', e.detail.value)
+    this.setState({
+      region: e.detail.value
+    })
   }
 
   isLogin() {
@@ -121,72 +211,140 @@ class CustomerProfile extends Component {
         Taro.showToast({ title: "系统错误,请稍后再试", icon: "none" });
       });
   }
-  // 修改客户档案
-  update() {
-    const { upType, info } = this.state
-    let tipList = [
-      { key: "inventionPatentCount", value: "请填写发明专利数" },
-      { key: "utilityModelCount", value: "请填写实用新型数" },
-      { key: "appearancePatentCount", value: "请填写外观专利数" },
-      { key: "softwareWorksCount", value: "请填写软著数" },
-      { key: "otherCount", value: "请填写其他数量" },
-      { key: "financialData", value: "请填写财务数据" },
-      { key: "earlyCommunication", value: "请填写前期沟通" },
-      { key: "interviewIdeas", value: "请填写面谈思路及目的" },
-      { key: "interviewDistribution", value: "请填写主要面谈人及分工" },
-      { key: "enterpriseCount", value: "请填写覆盖企业数" },
-      { key: "channelIndicators", value: "请填写渠道考核指标" },
-    ]
-    if (!info.id) {
-      delete info.id
+
+  onSaveAllData() {
+    const { dtails } = this.state;
+    const params = {
+        id: dtails.id,
+        uid: dtails.uid,
+        industry: dtails.industry,
+        industryName: dtails.industryName,
+        earlyCommunication: dtails.earlyCommunication,
+        customerDemand: dtails.customerDemand,
+        interviewIdeas: dtails.interviewIdeas,
+        interviewPurpose: dtails.interviewPurpose,
+        interviewRecommend: dtails.interviewRecommend,
+        interviewFeedback: dtails.interviewFeedback,
+        followUpPlan: dtails.followUpPlan,
+        patentCount: dtails.patentCount,
+        inventionPatentCount: dtails.inventionPatentCount,
+        utilityModelCount: dtails.utilityModelCount,
+        appearancePatentCount: dtails.appearancePatentCount,
+        softwareWorksCount: dtails.softwareWorksCount,
+        otherCount: dtails.otherCount,
+        financialData: dtails.financialData,
+        companyCount: dtails.companyCount,
+        socialSecurityCount: dtails.socialSecurityCount,
+        externalInvestCount: dtails.externalInvestCount,
+        externalInvestIndustry: dtails.externalInvestIndustry,
+        externalInvestIndustryName: dtails.externalInvestIndustryName,
+        externalInvestId: '0,0',
+        externalInvestName: dtails.externalInvestName,
+        financialRevenue: dtails.financialRevenue,
+        financialTax: dtails.financialTax,
+        financialProperty: dtails.financialProperty,
+        financialRd: dtails.financialRd,
+        locationProvince: dtails.locationProvince,
+        locationProvinceName: dtails.locationProvinceName,
+        locationCity: dtails.locationCity,
+        locationCityName: dtails.locationCityName,
+        locationArea: dtails.locationArea,
+        locationAreaName: dtails.locationAreaName,
+        standard: dtails.standard,
+    };
+    for (let key in params) {
+        if (params[key] === undefined || params[key] === 'undefined' || params[key] === null || params[key] === 'null') {
+            delete params[key];
+        }
     }
-    for (let i in info) {
-      if (!info[i] && info[i] !== 0) {
-        for (var j = 0; j < tipList.length; j++) {
-          if (tipList[j].key == i) {
-            Taro.showToast({
-              title: tipList[j].value,
-              icon: "none",
+    updateUser(params).then((v) => {
+        if (v.error.length === 0) {
+          Taro.showToast({
+            title: "修改成功",
+          });
+          setTimeout(() => {
+            //表示回到上一页面
+            Taro.navigateBack({
+                delta: 1
             });
-          }
-        }
-        return
-      } else if (info[i] == 0) {
-        if (i == "channelType") {
+          }, 1000)
+        } else {
           Taro.showToast({
-            title: "请选择渠道类型",
+            title: v.error[0].message,
             icon: "none",
           });
-          return
         }
-      }
-      if ((i == "financialData" || i == "earlyCommunication" || i == "interviewIdeas" || i == "interviewDistribution")
-        && info[i].length < 20) {
-        Taro.showToast({
-          title: "至少20字以上",
-          icon: "none",
-        });
-        return
-      }
-    }
-    updateUserDate(upType, info).then((v) => {
-      if (v.error.length === 0) {
-        Taro.showToast({
-          title: "修改成功",
-        });
-        this.setState({
-          isOpened: false
-        })
-        this.queryByUidAll()
-      } else {
-        Taro.showToast({
-          title: v.error[0].message,
-          icon: "none",
-        });
-      }
-    }).catch(() => {
+      })
+  }
 
-    })
+  // 修改客户档案
+  update() {
+    // const { upType, info } = this.state
+    // console.log(info)
+    // let tipList = [
+    //   { key: "inventionPatentCount", value: "请填写发明专利数" },
+    //   { key: "utilityModelCount", value: "请填写实用新型数" },
+    //   { key: "appearancePatentCount", value: "请填写外观专利数" },
+    //   { key: "softwareWorksCount", value: "请填写软著数" },
+    //   { key: "otherCount", value: "请填写其他数量" },
+    //   { key: "financialData", value: "请填写财务数据" },
+    //   { key: "earlyCommunication", value: "请填写前期沟通" },
+    //   { key: "interviewIdeas", value: "请填写面谈思路及目的" },
+    //   { key: "interviewDistribution", value: "请填写主要面谈人及分工" },
+    //   { key: "enterpriseCount", value: "请填写覆盖企业数" },
+    //   { key: "channelIndicators", value: "请填写渠道考核指标" },
+    // ]
+    // if (!info.id) {
+    //   delete info.id
+    // }
+    // for (let i in info) {
+    //   if (!info[i] && info[i] !== 0) {
+    //     for (var j = 0; j < tipList.length; j++) {
+    //       if (tipList[j].key == i) {
+    //         Taro.showToast({
+    //           title: tipList[j].value,
+    //           icon: "none",
+    //         });
+    //       }
+    //     }
+    //     return
+    //   } else if (info[i] == 0) {
+    //     if (i == "channelType") {
+    //       Taro.showToast({
+    //         title: "请选择渠道类型",
+    //         icon: "none",
+    //       });
+    //       return
+    //     }
+    //   }
+    //   if ((i == "financialData" || i == "earlyCommunication" || i == "interviewIdeas" || i == "interviewDistribution")
+    //     && info[i].length < 20) {
+    //     Taro.showToast({
+    //       title: "至少20字以上",
+    //       icon: "none",
+    //     });
+    //     return
+    //   }
+    // }
+    // updateUserDate(upType, info).then((v) => {
+    //   if (v.error.length === 0) {
+    //     Taro.showToast({
+    //       title: "修改成功",
+    //     });
+    //     this.setState({
+    //       isOpened: false
+    //     })
+    //     this.queryByUidAll()
+    //   } else {
+    //     Taro.showToast({
+    //       title: v.error[0].message,
+    //       icon: "none",
+    //     });
+    //   }
+    // }).catch(() => {
+
+    // })
+    this.setState({ isOpened: false, dtails: { ...this.state.dtails, ...this.state.info } })
   }
   // 新建联系人
   add() {
@@ -320,6 +478,42 @@ class CustomerProfile extends Component {
     })
   }
 
+  addItemDialog(type) {
+    let title;
+    switch (type) {
+        case 'externalInvestName':
+            // 对外投资控股的企业名称
+            title = '添加对外投资控股的企业名称';
+            break;
+    
+        default:
+            break;
+    }
+    this.setState({ addItemShow: true, addItemType: type, addItemTitle: title });
+  }
+
+  handleCloseAddItemDialog() {
+      this.setState({ addItemShow: false, addItemType: '', addItemInputVal: '' });
+  }
+
+  handleAddItemSave() {
+      switch (this.state.addItemType) {
+          case 'externalInvestName':
+              const { dtails } = this.state;
+              let externalInvestName = this.state.dtails.externalInvestName || '';
+              let externalInvestNameArr = externalInvestName.split('、').filter(item => !!item);
+              externalInvestNameArr.push(this.state.addItemInputVal);
+              dtails.externalInvestName = externalInvestNameArr.join('、');
+
+              this.setState({ dtails }, () => {
+                  this.handleCloseAddItemDialog();
+              });
+              break;
+      
+          default:
+              break;
+      }
+  }
 
   render() {
     const { dtails, upType, info, obj, userList } = this.state;
@@ -449,8 +643,29 @@ class CustomerProfile extends Component {
                   </View>
                   :
                   <View className="first">
-                    <View className="tit">
-                      企业所属行业及主要产品
+                    <View className="title">企业面谈思路表</View>
+                    <View className="val" style={{ display: 'flex' }}>
+                        企业所在地省市区:
+                        {/* <Picker
+                            mode='region'
+                            value={this.state.region}
+                            customItem={this.state.customItem}
+                            onChange={this.bindRegionChange.bind(this)}
+                        >
+                            <View className='picker'>
+                            { this.state.region.length ? this.state.region.join('-') : '请选择' }
+                            </View>
+                        </Picker> */}
+                        <View onClick={() => {this.setState({ addressPickerShow: true })}}>
+                            { dtails.locationProvince ? `${dtails.locationProvinceName}-${dtails.locationCityName}-${dtails.locationAreaName}` : '请选择' }
+                        </View>
+                        <AddressPicker
+                            pickerShow={this.state.addressPickerShow}
+                            onHandleToggleShow={this.toggleAddressPicker.bind(this)}
+                        />
+                    </View>
+                    {/* <View className="tit">
+                      企业面谈思路表
                       {
                         dtails.myUser == 1 &&
                         <View className="up"
@@ -472,35 +687,95 @@ class CustomerProfile extends Component {
                           }}
                         >修改</View>
                       }
+                    </View> */}
+                    <View className="val" style={{display: 'flex'}}>
+                        企业所属行业:
+                        <View onClick={() => this.handleOpenMultiplePicker('industry')}>
+                            { this.state.dtails.industryName || '请选择' }
+                        </View>
                     </View>
-                    <View className="val">行业:{dtails.industryName}</View>
-                    <View className="val">主营产品/服务:{dtails.businessScope}</View>
-                    <View className="tit">
-                      意向合作项目
-                      {
-                        dtails.myUser == 1 &&
-                        <View className="up"
-                          onClick={e => {
-                            e.stopPropagation()
-                            this.getBusinessProjectByName("")
-                            this.setState({
-                              upType: 5,
-                              isOpened: true,
-                              info: {
-                                uid: this.$instance.router.params.id,
-                                intendedProject: dtails.intendedProject,
-                              },
-                              checkOptions: !!dtails.intendedProject ? dtails.intendedProject.split(",") : []
-                            })
-                          }}
-                        >修改</View>
-                      }
+                    <View className="val" style={{display: 'flex', alignItems: 'center'}}>
+                        主营产品:
+                        <View style={{flex: 1}}>
+                            <AtInput
+                            value={dtails.businessScope}
+                            name='businessScope'
+                            placeholder='可填写多个,用“、”隔开'
+                            size='mini'
+                            onChange={value => {
+                                dtails.businessScope = value;
+                                this.setState({ dtails })
+                            }}
+                            />
+                        </View>
+                        
                     </View>
-                    <View className="val">{dtails.intendedProject || "无"}</View>
+                    <View className="val" style={{ display: 'flex', alignItems: 'center' }}>
+                        母/子公司数:
+                        <View style={{width: '180rpx'}}>
+                            <AtInput
+                            value={dtails.companyCount}
+                            name='companyCount'
+                            type='number'
+                            placeholder='请输入数量'
+                            size='mini'
+                            onChange={value => {
+                                dtails.companyCount = value;
+                                this.setState({ dtails })
+                            }}
+                            />
+                        </View>
+                    </View>
+                    <View className="val" style={{ display: 'flex', alignItems: 'center' }}>
+                        社保人数:
+                        <View style={{width: '180rpx'}}>
+                            <AtInput
+                            value={dtails.socialSecurityCount}
+                            name='socialSecurityCount'
+                            type='number'
+                            placeholder='请输入数量'
+                            size='mini'
+                            onChange={value => {
+                                dtails.socialSecurityCount = value;
+                                this.setState({ dtails })
+                            }}
+                            />
+                        </View>
+                    </View>
+                    <View className="val" style={{ display: 'flex', alignItems: 'center' }}>
+                        对外投资控股的企业数:
+                        <View style={{width: '180rpx'}}>
+                            <AtInput
+                            value={dtails.externalInvestCount}
+                            name='externalInvestCount'
+                            type='number'
+                            placeholder='请输入数量'
+                            size='mini'
+                            onChange={value => {
+                                dtails.externalInvestCount = value;
+                                this.setState({ dtails })
+                            }}
+                            />
+                        </View>
+                    </View>
+                    <View className="val" style={{display: 'flex'}}>
+                        对外投资控股的行业:
+                        <View onClick={() => this.handleOpenMultiplePicker('externalInvestIndustry')}>
+                            { this.state.dtails.externalInvestIndustryName || '请选择' }
+                        </View>
+                    </View>
+
+                    <View className="val" style={{display: 'flex'}}>
+                        对外投资控股的企业名称:
+                        <View onClick={() => this.addItemDialog('externalInvestName')}>
+                            { this.state.dtails.externalInvestName || '点击新增' }
+                        </View>
+                    </View>
+
                     <View className="tit">
                       <Text>
-                        联系人
-                        <Text className="txt">(面谈人)</Text>
+                        主要面谈联系信息
+                        {/* <Text className="txt">(面谈人)</Text> */}
                       </Text>
                       {
                         dtails.myUser == 1 &&
@@ -530,9 +805,233 @@ class CustomerProfile extends Component {
                         </View>
                       )
                     }
+
+                    <View className="tit">
+                      本次面谈项目
+                      {
+                        dtails.myUser == 1 &&
+                        <View className="up"
+                          onClick={e => {
+                            e.stopPropagation()
+                            this.getBusinessProjectByName("")
+                            this.setState({
+                              upType: 5,
+                              isOpened: true,
+                              info: {
+                                uid: this.$instance.router.params.id,
+                                intendedProject: dtails.intendedProject,
+                              },
+                              checkOptions: !!dtails.intendedProject ? dtails.intendedProject.split(",") : []
+                            })
+                          }}
+                        >新增</View>
+                      }
+                    </View>
+                    <View className="val">{dtails.intendedProject || "无"}</View>
+
+                    <View style={{marginTop: '60rpx'}}>
+                        <View className="title">面谈已知企业情况</View>
+                        <View className="tit">
+                            <Text>
+                                1.知识产权情况
+                                <Text className="txt">(专利信息、标准、专利、软著)</Text>
+                            </Text>
+                            {
+                            dtails.myUser == 1 &&
+                            <View className="up"
+                            onClick={e => {
+                                e.stopPropagation()
+                                this.setState({
+                                upType: 1,
+                                isOpened: true,
+                                info: {
+                                    uid: this.$instance.router.params.id,
+                                    id: dtails.id,
+                                    inventionPatentCount: dtails.inventionPatentCount || 0,
+                                    utilityModelCount: dtails.utilityModelCount || 0,
+                                    appearancePatentCount: dtails.appearancePatentCount || 0,
+                                    softwareWorksCount: dtails.softwareWorksCount || 0,
+                                    otherCount: dtails.otherCount || 0,
+                                }
+                                })
+                            }}
+                            >修改</View>
+                        }
+                        </View>
+                        <View className="val">
+                            专利&nbsp;<Text className="num">{dtails.patentCount || 0}</Text>&nbsp;&nbsp;&nbsp;
+                            其中发明专利&nbsp;<Text className="num">{dtails.inventionPatentCount || 0}</Text>&nbsp;&nbsp;&nbsp;
+                            实用新型&nbsp;<Text className="num">{dtails.utilityModelCount || 0}</Text>&nbsp;&nbsp;&nbsp;
+                            外观设计&nbsp;<Text className="num">{dtails.appearancePatentCount || 0}</Text>&nbsp;&nbsp;&nbsp;
+                            软著&nbsp;<Text className="num">{dtails.softwareWorksCount || 0}</Text>&nbsp;&nbsp;&nbsp;
+                            标准&nbsp;<Text className="num">{dtails.standard == 1 ? '有' : '无'}</Text>&nbsp;&nbsp;&nbsp;
+                            其他类型&nbsp;<Text className="num">{dtails.otherCount || 0}</Text>&nbsp;&nbsp;&nbsp;
+                        </View>
+
+                        <View className="tit">2.财务数据</View>
+                        <View className="val" style={{display: 'flex', alignItems: 'center'}}>
+                            营收(万元):
+                            <View style={{width: '180rpx'}}>
+                                <AtInput
+                                value={dtails.financialRevenue}
+                                name='financialRevenue'
+                                type='number'
+                                placeholder='请输入数量'
+                                size='mini'
+                                onChange={value => {
+                                    dtails.financialRevenue = value;
+                                    this.setState({ dtails })
+                                }}
+                                />
+                            </View>
+                        </View>
+                        <View className="val" style={{display: 'flex', alignItems: 'center'}}>
+                            税收(万元):
+                            <View style={{width: '180rpx'}}>
+                                <AtInput
+                                value={dtails.financialTax}
+                                name='financialTax'
+                                type='number'
+                                placeholder='请输入数量'
+                                size='mini'
+                                onChange={value => {
+                                    dtails.financialTax = value;
+                                    this.setState({ dtails })
+                                }}
+                                />
+                            </View>
+                        </View>
+                        <View className="val" style={{display: 'flex', alignItems: 'center'}}>
+                            资产(万元):
+                            <View style={{width: '180rpx'}}>
+                                <AtInput
+                                value={dtails.financialProperty}
+                                name='financialProperty'
+                                type='number'
+                                placeholder='请输入数量'
+                                size='mini'
+                                onChange={value => {
+                                    dtails.financialProperty = value;
+                                    this.setState({ dtails })
+                                }}
+                                />
+                            </View>
+                            
+                        </View>
+                        <View className="val" style={{display: 'flex', alignItems: 'center'}}>
+                            研发费用(万元):
+                            <View style={{width: '180rpx'}}>
+                                <AtInput
+                                value={dtails.financialRd}
+                                name='financialRd'
+                                type='number'
+                                placeholder='请输入数量'
+                                size='mini'
+                                onChange={value => {
+                                    dtails.financialRd = value;
+                                    this.setState({ dtails })
+                                }}
+                                />
+                            </View>
+                        </View>
+
+                        <View className="tit">3.前期沟通情况</View>
+                        <View className="tit">
+                            <Text>
+                            客户的难处
+                            <Text className="txt">(20字以上)</Text>
+                            </Text>
+                        </View>
+                        <View className="val">
+                            <AtTextarea
+                            value={dtails.earlyCommunication}
+                            maxLength={200}
+                            placeholder='请编写本次面谈客户难处~'
+                            height={70}
+                            onChange={value => {
+                                dtails.earlyCommunication = value;
+                                this.setState({ dtails });
+                            }}
+                            />
+                        </View>
+                        <View className="tit">
+                            <Text>
+                            客户的需求
+                            <Text className="txt">(20字以上)</Text>
+                            </Text>
+                        </View>
+                        <View className="val">
+                            <AtTextarea
+                            value={dtails.customerDemand}
+                            maxLength={200}
+                            placeholder='请编写本次面谈客户需求~'
+                            height={70}
+                            onChange={value => {
+                                dtails.customerDemand = value;
+                                this.setState({ dtails });
+                            }}
+                            />
+                        </View>
+                        <View className="tit">
+                            <Text>
+                            面谈思路
+                            <Text className="txt">(20字以上)</Text>
+                            </Text>
+                        </View>
+                        <View className="val">
+                            <AtTextarea
+                            value={dtails.interviewIdeas}
+                            maxLength={200}
+                            placeholder='请编写本次面谈客户思路~'
+                            height={70}
+                            onChange={value => {
+                                dtails.interviewIdeas = value;
+                                this.setState({ dtails });
+                            }}
+                            />
+                        </View>
+                        <View className="tit">
+                            <Text>
+                            面谈达成的目的
+                            <Text className="txt">(20字以上)</Text>
+                            </Text>
+                        </View>
+                        <View className="val">
+                            <AtTextarea
+                            value={dtails.interviewPurpose}
+                            maxLength={200}
+                            placeholder='请编写本次面谈达成的目的~'
+                            height={70}
+                            onChange={value => {
+                                dtails.interviewPurpose = value;
+                                this.setState({ dtails });
+                            }}
+                            />
+                        </View>
+                        <View className="tit">
+                            <Text>
+                            经理/上级面谈建议
+                            <Text className="txt">(由经理/上级口述,本人整理,20字以上)</Text>
+                            </Text>
+                        </View>
+                        <View className="val">
+                            <AtTextarea
+                            value={dtails.interviewRecommend}
+                            maxLength={200}
+                            placeholder='请编写本次面谈建议~'
+                            height={70}
+                            onChange={value => {
+                                dtails.interviewRecommend = value;
+                                this.setState({ dtails });
+                            }}
+                            />
+                        </View>
+
+                        <AtButton type="primary" onClick={this.onSaveAllData.bind(this)}>保存</AtButton>
+                    </View>
                   </View>
               }
-              {
+              {/* {
                 dtails.newChannel == 1
                   ?
                   <View className="two">
@@ -610,7 +1109,27 @@ class CustomerProfile extends Component {
                   </View>
                   :
                   <View className="two">
+                      
                     <View className="title">面谈企业情况</View>
+                    <AtInput
+                        name='mzgssl'
+                        title='母/子公司数'
+                        type='number'
+                        placeholder='请输入数量'
+                    />
+                     <AtInput
+                        name='sbrs'
+                        title=''
+                        type='number'
+                        placeholder='请输入数量'
+                        size='mini'
+                    />
+                    <AtInput
+                        name='qyes'
+                        title='对外投资控股的企业数'
+                        type='number'
+                        placeholder='请输入数量'
+                    />
                     <View className="tit">
                       <Text>
                         知识产权情况
@@ -644,6 +1163,7 @@ class CustomerProfile extends Component {
                       实用新型&nbsp;<Text className="num">{dtails.utilityModelCount || 0}</Text>&nbsp;&nbsp;&nbsp;
                       外观设计&nbsp;<Text className="num">{dtails.appearancePatentCount || 0}</Text>&nbsp;&nbsp;&nbsp;
                       软著&nbsp;<Text className="num">{dtails.softwareWorksCount || 0}</Text>&nbsp;&nbsp;&nbsp;
+                      标准&nbsp;<Text className="num">{'有'}</Text>&nbsp;&nbsp;&nbsp;
                       其他类型&nbsp;<Text className="num">{dtails.otherCount || 0}</Text>&nbsp;&nbsp;&nbsp;
                     </View>
                     <View className="tit">
@@ -718,7 +1238,7 @@ class CustomerProfile extends Component {
                     </View>
                     <View className="val">{dtails.interviewIdeas || "无"}</View>
                   </View>
-              }
+              } */}
             </View>
           )}
         </View>
@@ -824,14 +1344,28 @@ class CustomerProfile extends Component {
                     })
                   }}
                 />
+                <View style={{display: 'flex', margin: '12rpx 0'}}>
+                    <Text style={{ fontSize: '32rpx', marginRight: '16rpx', width: '172rpx' }}>标准</Text>
+                    <RadioGroup title="标准" onChange={e => {
+                        dtails.standard = Number(e.target.value);
+                        this.setState({ dtails });
+                    }}>
+                        <Label className='radio-list__label'>
+                        <Radio className='radio-list__radio' value={1} checked={dtails.standard == 1}>有</Radio>
+                        </Label>
+                        <Label className='radio-list__label'>
+                        <Radio className='radio-list__radio' value={0} checked={!dtails.standard}>无</Radio>
+                        </Label>
+                    </RadioGroup>
+                </View>
                 <AtInput
                   name='otherCount'
                   title='其他'
                   type='number'
-                  value={info.otherCount}
+                  value={dtails.otherCount}
                   onChange={e => {
                     this.setState({
-                      info: Object.assign(info, {
+                      info: Object.assign(dtails, {
                         otherCount: e,
                       })
                     })
@@ -1129,6 +1663,36 @@ class CustomerProfile extends Component {
           </AtModalAction>
         </AtModal>
 
+        <AtModal
+            isOpened={this.state.addItemShow}
+            onClose={this.handleCloseAddItemDialog}
+        >
+          <AtModalHeader>新增对外投资控股的企业</AtModalHeader>
+          <AtModalContent>
+            <AtInput
+              required
+              name='mobile'
+              title='企业名称'
+              placeholder='请输入企业名称'
+              value={this.state.addItemInputVal}
+              onChange={value => this.setState({ addItemInputVal: value })}
+            />
+          </AtModalContent>
+          <AtModalAction>
+            <Button type='secondary' onClick={this.handleCloseAddItemDialog}>取消</Button>
+            <Button type='primary' onClick={this.handleAddItemSave}>保存</Button>
+          </AtModalAction>
+        </AtModal>
+
+        {/* 多选框 */}
+        <CheckboxPicker
+            isOpened={this.state.multiplePickerShow}
+            title={this.state.multiplePickerTitle}
+            options={this.state.multiplePickerOptions}
+            checkedList={this.state.multiplePickerCheckedList}
+            onClose={() => {this.setState({multiplePickerShow: false})}}
+            onConfirm={this.handleMultipleConfirm}
+        ></CheckboxPicker>
       </View>
     );
   }

+ 5 - 0
src/pages/customerProfile/index.less

@@ -220,4 +220,9 @@
     color: #fff;
 
   }
+}
+
+.at-input {
+    padding: 4rpx 0;
+    margin-left: 0rpx;
 }

+ 6 - 0
src/pages/customerProfile_old/index.config.js

@@ -0,0 +1,6 @@
+export default {
+  navigationBarTitleText: '客户档案',
+  usingComponents: {
+    timePicker: '../../components/common/timePicker/timePicker'
+  }
+}

File diff suppressed because it is too large
+ 1137 - 0
src/pages/customerProfile_old/index.jsx


+ 223 - 0
src/pages/customerProfile_old/index.less

@@ -0,0 +1,223 @@
+.customerProfile {
+  min-height: calc(100vh - 30px);
+  background: #F5F5F5;
+  padding-bottom: 30px;
+
+  .titleContent {
+    position: relative;
+    // background: white;
+    // padding: 20px 20px;
+    // border-bottom: 1px #dadada solid;
+
+    .content {
+
+      .name {
+        font-size: 32px;
+        color: #1E90FF;
+        font-weight: bolder;
+        padding-bottom: 10px;
+        display: flex;
+        flex-direction: row;
+        flex-wrap: wrap;
+        align-items: flex-start;
+        justify-content: space-between;
+        background: white;
+        padding: 20px;
+        margin-bottom: 20px;
+
+        .bod {
+          // border-bottom: 2px solid #1E90FF;
+          // padding-bottom: 10px;
+        }
+
+        .share {
+          margin: 0;
+          padding: 0;
+          font-size: 26px;
+          line-height: 24px;
+          color: #1E90FF;
+          padding: 10px 30px;
+          border: 1px solid #1E90FF;
+          border-radius: 30px;
+        }
+
+      }
+
+      .button {
+        display: flex;
+        flex-direction: row-reverse;
+        padding: 20px 20px 0;
+        background: white;
+
+        .but {
+          background: #1E90FF;
+          padding: 10px 15px;
+          color: #FFFFFF;
+          font-size: 26px;
+          border-radius: 8px;
+          margin-left: 20px;
+
+        }
+
+      }
+
+      .row {
+        background: white;
+        display: flex;
+        flex-direction: row;
+        align-items: center;
+        justify-content: space-between;
+        padding: 20px 20px;
+
+        .code {
+          font-size: 26px;
+          color: #767272;
+
+        }
+
+        .time {
+          font-size: 26px;
+          color: #767272;
+
+        }
+
+      }
+
+      .first {
+        background: #facd91;
+        padding: 20px 20px;
+
+      }
+
+      .two {
+        background: #81d3f8;
+        padding: 20px 20px;
+
+      }
+
+      .title {
+        font-weight: bolder;
+        margin: 20px 0 10px 0;
+      }
+
+      .tit {
+        display: flex;
+        flex-direction: row;
+        align-items: baseline;
+        justify-content: space-between;
+        font-size: 28px;
+        font-weight: bolder;
+        margin-top: 15px;
+        margin-bottom: 5px;
+
+        .up {
+          background: #70B603;
+          color: #FFFFFF;
+          padding: 10px 20px;
+          font-size: 26px;
+          border-radius: 8px;
+          font-weight: 400;
+
+        }
+
+        .txt {
+          color: red;
+          font-weight: 400;
+          font-size: 20px;
+        }
+
+      }
+
+      .val {
+        position: relative;
+        font-size: 26px;
+        margin-bottom: 5px;
+
+        .num {
+          font-weight: bolder;
+          color: #1E90FF;
+        }
+
+        .mask {
+          position: absolute;
+          top: 0;
+          right: 0;
+          bottom: 0;
+          left: 0;
+          width: 100%;
+          height: 100%;
+          background: #facd91;
+          z-index: 99;
+
+        }
+
+      }
+
+    }
+
+  }
+
+}
+
+.selectTitle {
+  font-weight: bolder;
+  margin-bottom: 10px;
+  font-size: 28px;
+  display: flex;
+  flex-direction: row;
+}
+
+.additem {
+  display: flex;
+  flex-direction: row;
+  align-items: center;
+  justify-content: space-between;
+  font-size: 22px;
+  color: #4395ff;
+  margin-bottom: 15px;
+
+  .txt {
+    width: 16%;
+    display: flex;
+    // flex: 1;
+  }
+
+  .mobile {
+    width: 30%;
+  }
+
+  .bt {
+    padding: 4px 10px;
+    background: #4395ff;
+    color: #FFFFFF;
+    border-radius: 6px;
+    margin-left: 15px;
+
+  }
+
+  .bts {
+    padding: 4px 10px;
+    color: #4395ff;
+    margin-left: 15px;
+
+  }
+
+}
+
+.selproject {
+  margin-left: 32px;
+  display: flex;
+  flex-direction: row;
+  align-items: center;
+  flex-wrap: wrap;
+  margin-bottom: 20px;
+
+  .selptxt {
+    background: #f50;
+    padding: 6px 16px;
+    margin: 6px;
+    border-radius: 8px;
+    color: #fff;
+
+  }
+}

+ 5 - 0
src/utils/servers/servers.js

@@ -182,6 +182,11 @@ export const updateUserDate = (type = 0, postData = {}) => {
   return HTTPREQUEST.post((type == 0 || type == 5) ? '/api/admin/customer/updateUserDate' : '/api/admin/userArchives/update', postData)
 }
 
+// 修改客户信息
+export const updateUser = (postData = {}) => {
+    return HTTPREQUEST.post('/api/admin/interview/updateUser', postData);
+  }
+
 // 新增联系人
 export const addOneContact = (postData = {}) => {
   return HTTPREQUEST.post('/api/admin/customer/addOneContact', postData)