Browse Source

我的公出页面完成再次公出功能

dev01 1 week ago
parent
commit
112ff1e0f4

+ 20 - 3
src/pages/applyDepart/index.jsx

@@ -15,7 +15,7 @@ import PublicContent from "./publicContent";
 import Result from "./result";
 
 import "./index.less";
-import Taro from "@tarojs/taro";
+import Taro, { getCurrentInstance } from "@tarojs/taro";
 import MessageNoticebar from "../../components/common/messageNoticebar";
 import InterviewCustomer from "../../pages/interview/index"
 
@@ -42,6 +42,9 @@ const items = [
   })
 )
 class ApplyDepart extends Component {
+
+  $instance = getCurrentInstance();
+
   constructor(props) {
     super(props);
     this.state = {
@@ -67,6 +70,22 @@ class ApplyDepart extends Component {
   }
 
   componentDidShow() {
+    const publicInfo = Taro.getStorageSync('publicInfo');
+    if (!!publicInfo) {
+      const { type, customerList } = publicInfo;
+      const ids = customerList.map(item => item.id).join(',');
+      const names = customerList.map(item => item.name).join(',');
+      this.setState({
+        type,
+        interviewCustomerList: type === 0 ? customerList : [],
+        interviewIdx: 0,
+        current: 1,
+        enterpriseInfor: { type, id: ids, name: names }
+      }, () => {
+        Taro.removeStorageSync('publicInfo');
+      });
+    }
+
     Taro.eventCenter.on("enterprise", (arg) => {
       arg.type = this.state.type;
       // 跳转
@@ -118,8 +137,6 @@ class ApplyDepart extends Component {
     }
   }
 
-  componentDidMount() { }
-
   onReachBottom() {
     if (this.state.current === 0) {
       Taro.eventCenter.trigger("applyDepartSearchList");

+ 18 - 0
src/pages/customerProfile/index.jsx

@@ -1017,6 +1017,15 @@ class CustomerProfile extends Component {
                         </View>
                       </View>
 
+                      <View style={{fontWeight: 600, color: "red"}}>
+                        <Text>首次面谈时间:</Text>
+                        { dtails.interviewList.length ? (
+                          <Text>{ dtails.interviewList[dtails.interviewList.length - 1].createTime }</Text>
+                        ) : (
+                          <Text>暂无面谈记录</Text>
+                        ) }
+                      </View>
+
                       <View className="item">
                         <View className="item-title">
                           主要面谈联系信息:
@@ -1189,6 +1198,15 @@ class CustomerProfile extends Component {
                         </View>
                       </View>
 
+                      <View style={{fontWeight: 600, color: "red"}}>
+                        <Text>首次面谈时间:</Text>
+                        { dtails.interviewList.length ? (
+                          <Text>{ dtails.interviewList[dtails.interviewList.length - 1].createTime }</Text>
+                        ) : (
+                          <Text>暂无面谈记录</Text>
+                        ) }
+                      </View>
+
                       <View className="item">
                         <View className="item-title">
                           主要面谈联系信息:

+ 5 - 1
src/pages/interview/index.jsx

@@ -1196,7 +1196,7 @@ class CustomerProfile extends Component {
                             面谈思路:
                             <Text className="titleTips">(20字以上)</Text>
                           </View>
-                          <View className="tbuttom">
+                          <View>
                             {dtails.interviewList.length ? (
                               <AtIcon value='clock' size='20' color='#1E90FF' onClick={() => this.openInteractHis('interviewIdeas')}></AtIcon>
                             ) : null}
@@ -1323,6 +1323,10 @@ class CustomerProfile extends Component {
                           </View>
                         </>
                       ) : null}
+                      <View style={{ display: 'flex', marginTop: '24rpx' }}>
+                        <AtButton type="secondary" circle onClick={this.handlePrevClick.bind(this)}>上一页</AtButton>
+                        <AtButton type="primary" circle onClick={this.handleNextClick.bind(this)}>下一页</AtButton>
+                      </View>
                     </View>
                     :
                     <View className="valueContent">

+ 24 - 11
src/pages/mybusiness/index.jsx

@@ -125,12 +125,13 @@ class Examine extends Component {
     });
   }
   // 公出详情
-  getReleasetDails(id) {
+  getReleasetDails(id, callback) {
     getReleasetDails({
       id: id
     }).then((v) => {
       if (v.error.length === 0) {
         if (v.data) {
+          
           let list = [];
           for (let i of v.data.annexUrl.split(",")) {
             if (i) {
@@ -145,6 +146,8 @@ class Examine extends Component {
               latitude: parseFloat(v.data.prdList[0]?.latitude),
               name: v.data.prdList[0]?.districtName,
             },
+          }, () => {
+            callback && callback();
           })
         }
       } else {
@@ -539,15 +542,17 @@ class Examine extends Component {
                     })
                   }}
                   again={e => {
-                    this.getReleasetDails(e.id)
-                    this.setState({
-                      isInquiryOpened: true,
-                      inquiryTitle: "温馨提示",
-                      inquiryContent: "您确定需再次公出拜访同一家企业吗?",
-                      inquiryFn: () => {
-
-                      },
-                    });
+                    this.getReleasetDails(e.id, () => {
+                      this.setState({
+                        isInquiryOpened: true,
+                        inquiryTitle: "温馨提示",
+                        inquiryContent: "您确定需再次公出拜访同一家企业吗?",
+                        inquiryFn: () => {
+                          
+                        },
+                      });
+                    })
+                    
                   }}
                   opinion={(t, e) => {
                     this.publicAssistAdviceList(t, e)
@@ -629,8 +634,16 @@ class Examine extends Component {
               });
             }}
             onDetermine={() => {
+              const data = this.state.dtails;
+              const customerList = data.prdList.map(item => {
+                return { id: item.uid, aid: data.aid, aname: data.aname, name: item.userName }
+              })
+              Taro.setStorageSync('publicInfo', { type: data.type,  customerList })
+              Taro.switchTab({
+                url: `/pages/applyDepart/index`
+              });
               this.setState({
-                isModifyOpened: true,
+                // isModifyOpened: true,
 
                 isInquiryOpened: false,
                 inquiryTitle: "",