Browse Source

bug处理

dev01 1 month ago
parent
commit
73efc28b97

+ 12 - 6
src/pages/applyDepart/index.jsx

@@ -74,15 +74,22 @@ class ApplyDepart extends Component {
   componentDidShow() {
     const publicInfo = Taro.getStorageSync('publicInfo');
     if (!!publicInfo) {
-      const { type, customerList } = publicInfo;
+      const { type, customerList, orderNo, contractNo } = publicInfo;
       const ids = customerList.map(item => item.id).join(',');
       const names = customerList.map(item => item.name).join(',');
+
+      let enterpriseInfor = { type, id: ids, name: names };
+      if (type === 1) {
+        enterpriseInfor.orderNo = orderNo;
+        enterpriseInfor.contractNo = contractNo;
+      }
+
       this.setState({
         type,
         interviewCustomerList: type === 0 ? customerList : [],
         interviewIdx: 0,
         current: 1,
-        enterpriseInfor: { type, id: ids, name: names },
+        enterpriseInfor,
         refreshInterview: type === 0 ? true : false,
       }, () => {
         Taro.removeStorageSync('publicInfo');
@@ -169,12 +176,11 @@ class ApplyDepart extends Component {
 
   setTabDisabled(item) {
     let userInfo = Taro.getStorageSync('userInfor');
-    if ([1, 2].indexOf(item.type) > -1 && userInfo.type !== 3) {
+    if (item.type === 1 && userInfo.type !== 3) {
+      return true;
+    } else if (item.type === 2 && userInfo.type !== 1) {
       return true;
     }
-    // else if (item.type === 2 && userInfo.position === 1) {
-    //   return true;
-    // }
     return false;
   }
 

+ 2 - 2
src/pages/egressDetails/index.jsx

@@ -472,7 +472,7 @@ class EgressDetails extends Component {
       })
     } else {
       Taro.navigateTo({
-        url: url + "?id=" + data.uids + "&prdid="+ data.prdList[0].id +"&notRequired=false&readonly=true"
+        url: url + "?id=" + data.uids + "&prdid="+ data.prdList[0].id +"&notRequired=false&readonly=true&publicType="+this.state.dtails.publicType
       });
     }
   }
@@ -1044,7 +1044,7 @@ class EgressDetails extends Component {
                   isSelFiles: false
                 })
                 Taro.navigateTo({
-                  url: this.state.detailUrl + "?id=" + this.state.uid + "&notRequired=false&readonly=true&prdid="+this.state.prdid,
+                  url: this.state.detailUrl + "?id=" + this.state.uid + "&notRequired=false&readonly=true&prdid="+this.state.prdid+"&publicType="+dtails.publicType,
                 });
               }}>确定</Button>
           </AtModalAction>

+ 19 - 6
src/pages/interviewDetail/index.jsx

@@ -94,7 +94,8 @@ class CustomerProfile extends Component {
       checkCompShow: false,
       checkCompList: [],
 
-      currAddress: []
+      currAddress: [],
+
     };
     this.queryByUidAll = this.queryByUidAll.bind(this);
     this.update = this.update.bind(this);
@@ -309,6 +310,8 @@ class CustomerProfile extends Component {
             interviewList: res.data.list.filter(item => !!item.prdid),
           }
         });
+      } else {
+        Taro.showToast({ title: "沟通情况数据获取异常", icon: "none" });
       }
     })
   }
@@ -333,6 +336,14 @@ class CustomerProfile extends Component {
             financialProperty: this.addCommas(v.data.financialProperty || 0),
             financialRd: this.addCommas(v.data.financialRd || 0),
             enterpriseCount: this.addCommas(v.data.enterpriseCount || 0),
+            earlyCommunication: '',
+            customerDemand: '',
+            interviewIdeas: '',
+            interviewPurpose: '',
+            interviewRecommend: '',
+            interviewFeedback: '',
+            followUpPlan: '',
+            interviewList: [],
           }
           let patentCount = this.countZlNum(dtailsData);
           this.setState({
@@ -1007,6 +1018,8 @@ class CustomerProfile extends Component {
 
   render() {
     const { dtails, upType, info, obj, userList } = this.state;
+    const publicType = this.$instance.router.params.publicType;
+
     return (
       <View className="customerProfile">
         <MessageNoticebar />
@@ -1028,10 +1041,10 @@ class CustomerProfile extends Component {
                     <Text className="bod">{dtails.nickname}&nbsp;&nbsp;</Text>
                     <Text style={{ fontSize: "12px", color: ["red", "green"][dtails.signBills] }}>{["未签单", "已签单"][dtails.signBills]}</Text>
                   </Text>
-                  {dtails.myUser === 1 && <Button className="share" plain type='primary' open-type="share">分享</Button>}
+                  {publicType === '0' && <Button className="share" plain type='primary' open-type="share">分享</Button>}
                   {/* <View className="share">分享</View> */}
                 </View>
-                { dtails.myUser === 1 && (
+                { publicType === '0' && (
                   <>
                     <View className="button">
                       <View className="but"
@@ -1079,7 +1092,7 @@ class CustomerProfile extends Component {
                     <View className="valueContent">
                       <View className="title" style={{ margin: "14rpx 0 18rpx;" }}>渠道面谈思路表</View>
 
-                      {dtails.myUser === 1 && (
+                      {publicType === '0' && (
                         <>
                           <View className="item">
                             <View className="item-title">企业所在地省市区:</View>
@@ -1301,7 +1314,7 @@ class CustomerProfile extends Component {
                     :
                     <View className="valueContent">
                       <View className="title" style={{ margin: "14rpx 0 18rpx;" }}>企业面谈思路表</View>
-                      {dtails.myUser === 1 && (
+                      {publicType === '0' && (
                         <>
                           <View className="item">
                             <view className="item-title">企业所在地省市区:</view>
@@ -1478,7 +1491,7 @@ class CustomerProfile extends Component {
 
 
                       <View style={{ marginTop: '60rpx' }}>
-                        {dtails.myUser === 1 && (
+                        {publicType === '0' && (
                           <>
                             <View className="title">面谈已知企业情况</View>
                             <View className="tit" style={{ margin: '32rpx 0 20rpx;' }}>

+ 6 - 1
src/pages/mybusiness/index.jsx

@@ -668,7 +668,12 @@ class Examine extends Component {
                 const customerList = data.prdList.map(item => {
                   return { id: item.uid, aid: data.aid, aname: data.aname, name: item.userName, myUser: currUserInfo.myUser }
                 })
-                Taro.setStorageSync('publicInfo', { type: data.type,  customerList })
+                Taro.setStorageSync('publicInfo', {
+                  type: data.type,
+                  customerList,
+                  orderNo: data.orderNo,
+                  contractNo: data.contractNo
+                })
                 Taro.switchTab({
                   url: `/pages/applyDepart/index`
                 });