Browse Source

客户档案优化

dev01 2 weeks ago
parent
commit
99f0181807

+ 1 - 1
src/app.config.js

@@ -64,7 +64,7 @@ export default {
   ],
   plugins: {
     chooseLocation: {
-      version: "1.0.10",
+      version: "1.1.0",
       provider: "wx76a9a06e5b4e693e"
     },
   },

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

@@ -72,8 +72,8 @@ class ApplyDepart extends Component {
       this.setState({
         current: 2,
         resultState: arg.code,
-        resultId: arg.data.id,
-        punchClockInfor: arg.data,
+        resultId: arg.data ? arg.data.id : "",
+        punchClockInfor: arg.data || {},
         isShow: arg.isShow,
         tipList: arg?.list,
       });

+ 42 - 6
src/pages/applyDepart/publicContent.jsx

@@ -1,6 +1,6 @@
 import React, { Component } from "react";
 import Taro from "@tarojs/taro";
-import { Button, Text, View } from "@tarojs/components";
+import { Button, Text, View, Radio, RadioGroup, Label } from "@tarojs/components";
 import dayjs from "dayjs";
 import "./index.less";
 
@@ -56,6 +56,7 @@ class PublicContent extends Component {
       cList: [],
       popup: false,
       isNewshow: false,
+      alone: 1, // 0非协单 1协单一起 2技术单独协单
     };
     this.onSubmit = this.onSubmit.bind(this);
     this.selectArrder = this.selectArrder.bind(this);
@@ -143,6 +144,7 @@ class PublicContent extends Component {
       duration: this.state.totalDuration,
       type: this.props.enterpriseInfor.type,
       validDate: JSON.stringify(this.state.validDates),
+      alone: this.state.coorderList.length === 0 ? 0 : this.state.alone,
       assist: this.state.coorderList.length === 0 ? 0 : 1,
       assistAid: this.state.coorderList.length === 0 ? "" : this.state.coorderList.join(","),
       assistAidName: this.state.coorderList.length === 0 ? "" : getNameList(this.state.coorderList, this.state.cList).join(","),
@@ -589,9 +591,9 @@ class PublicContent extends Component {
         </View>
         {
           this.props.enterpriseInfor.type === 0 &&
-          <View className="formItems" style={{ paddingBottom: 0, marginTop: 10 }}>
+          <View className="formItems" style={{ alignItems: "center", paddingBottom: 0, marginTop: 10 }}>
             <View className="formNames">技术协单: </View>
-            <View className="formValues">
+            <View className="formValues" style={{ alignItems: "center" }}>
               {
                 cList.length == 0
                   ? <Text>无</Text>
@@ -624,9 +626,42 @@ class PublicContent extends Component {
             请与技术协商后,再发起协单,协单将统计公出成本等
           </View>
         }
+        {
+          cList.length >= 1 &&
+          <View
+            className="formItem"
+            style={{ paddingBottom: 0, marginTop: 10 }}
+          >
+            <View className="formName">
+              <Text>本人公出:</Text>
+            </View>
+            <View>
+              <RadioGroup
+                onChange={e => {
+                  this.setState({
+                    alone: e.detail.value
+                  })
+                }}
+              >
+                {[{ text: "是,一同公出", value: 1 },
+                { text: "否,本人不公出", value: 2 }].map((item, i) => {
+                  return (
+                    <Radio
+                      style={{ marginLeft: 10 }}
+                      key={i}
+                      value={item.value}
+                      checked={item.value == this.state.alone}>
+                      {item.text}
+                    </Radio>
+                  )
+                })}
+              </RadioGroup>
+            </View>
+          </View>
+        }
         <View
           className="formItem"
-          style={{ display: "block", paddingTop: "15px" }}
+          style={{ display: "block", paddingTop: "10px" }}
         >
           {/* 公出目标 */}
           <View className="formName">
@@ -818,7 +853,8 @@ class PublicContent extends Component {
             });
           }}
         />
-        {popup &&
+        {
+          popup &&
           <UserQuery
             isOpened={popup}
             onDesc={this.popupClick.bind(this)}
@@ -828,7 +864,7 @@ class PublicContent extends Component {
             setList={this.setList.bind(this)}
           />
         }
-      </View>
+      </View >
     );
   }
 }

+ 1 - 1
src/pages/applyDepart/publicContent.less

@@ -3,6 +3,7 @@
 
   .formItem {
     display: flex;
+    flex-direction: row;
     align-items: center;
     font-size: 30px;
     padding-bottom: 28px;
@@ -95,7 +96,6 @@
 
       .fitems {
         margin-left: 20px;
-        margin-bottom: 20px;
         display: flex;
         flex-direction: row;
         position: relative;

+ 21 - 15
src/pages/applyDepart/result.jsx

@@ -29,7 +29,7 @@ class Result extends Component {
       <View className='result'>
         <View className='resultIcon'>
           {
-            <Icon size='80' type='success'/>
+            <Icon size='80' type='success' />
             // this.props.isShow
             //   ? <Icon size='80' type='warn' color='#ff9900' />
             //   : <Icon size='80' type='success' />
@@ -62,26 +62,32 @@ class Result extends Component {
         } */}
         {
           // this.props.isShow && this.props.type == 1 &&
-          <View className="resultTips">已发出公出申请!待审核通过,方可打卡!</View>
+          !!this.props.resultId
+            ? <View className="resultTips">已发出公出申请!待审核通过,方可打卡!</View>
+            : <View className="resultTips">已发出公出申请!本次公出您不需要打卡!</View>
         }
-        <View className='resultOperation'>
-          <AtButton circle onClick={this.determine}>
-            再次发起
-          </AtButton>
-          {/* {
+        {
+          // 无id则表示 本人不公出
+          !!this.props.resultId &&
+          < View className='resultOperation'>
+            <AtButton circle onClick={this.determine}>
+              再次发起
+            </AtButton>
+            {/* {
             (!this.props.isShow || this.props.type == 1) &&
             <AtButton circle type='primary' onClick={this.punchClock}>
               前往打卡
             </AtButton>
           } */}
-          <AtButton type='secondary' circle onClick={() => {
-            Taro.navigateTo({
-              url: '/pages/egressDetails/index?id=' + this.props.resultId
-            })
-          }}>
-            前往分享
-          </AtButton>
-        </View>
+            <AtButton type='secondary' circle onClick={() => {
+              Taro.navigateTo({
+                url: '/pages/egressDetails/index?id=' + this.props.resultId
+              })
+            }}>
+              前往分享
+            </AtButton>
+          </View>
+        }
       </View>
     )
   }

+ 17 - 9
src/pages/customerProfile/index.jsx

@@ -57,6 +57,7 @@ class CustomerProfile extends Component {
       checkOptions: [],
       isSuperior: false,
       channe: {},
+      isMask: false,
     };
     this.queryByUidAll = this.queryByUidAll.bind(this);
     this.update = this.update.bind(this);
@@ -67,9 +68,12 @@ class CustomerProfile extends Component {
   }
 
   componentDidMount() {
+    this.setState({
+      isMask: false
+    })
     this.queryByUidAll();
     if (!this.isLogin()) {
-      Taro.setStorageSync('currentPage', `/pages/customerProfile/index?id=${this.$instance.router.params.id}&signBills=${this.$instance.router.params.signBills}`)
+      Taro.setStorageSync('currentPage', `/pages/customerProfile/index?id=${this.$instance.router.params.id}`)
     }
   }
 
@@ -85,15 +89,16 @@ class CustomerProfile extends Component {
     this.limitUser();
     return {
       title: "客户档案",
-      path: "/pages/customerProfile/index?id=" + this.$instance.router.params.id + "&signBills=" + this.$instance.router.params.signBills,
+      path: "/pages/customerProfile/index?id=" + this.$instance.router.params.id,
     };
   }
 
   // 客户档案详情
   queryByUidAll() {
-    queryByUidAll({
-      id: this.$instance.router.params.id,
-    })
+    queryByUidAll(
+      this.$instance.router.params.notRequired,
+      { id: this.$instance.router.params.id, }
+    )
       .then((v) => {
         if (v.error.length === 0) {
           this.setState({
@@ -187,7 +192,7 @@ class CustomerProfile extends Component {
         });
         return
       } else if (i == "mobile") {
-        if (!(/^1[34578]\d{9}$/.test(data[i]))) {
+        if (!(/^1[3-9]\d{9}$/.test(data[i]))) {
           Taro.showToast({
             title: "请输入正确地手机号",
             icon: "none",
@@ -330,7 +335,7 @@ class CustomerProfile extends Component {
               <View className="name">
                 <Text style={{ width: "80%" }}>
                   <Text className="bod">{dtails.nickname}&nbsp;&nbsp;</Text>
-                  <Text style={{ fontSize: "12px", color: ["red", "green"][this.$instance.router.params.signBills] }}>{["未签单", "已签单"][this.$instance.router.params.signBills]}</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>}
                 {/* <View className="share">分享</View> */}
@@ -362,7 +367,7 @@ class CustomerProfile extends Component {
                   onClick={e => {
                     e.stopPropagation()
                     Taro.navigateTo({
-                      url: "/pages/situation/index?id=" + this.$instance.router.params.id + "&signBills=" + this.$instance.router.params.signBills + "&nickname=" + dtails.nickname,
+                      url: "/pages/situation/index?id=" + this.$instance.router.params.id + "&notRequired=" + this.$instance.router.params.notRequired,
                     });
                   }}
                 >公出记录</View>
@@ -512,7 +517,10 @@ class CustomerProfile extends Component {
                     </View>
                     {
                       !!dtails.contactList && dtails.contactList.map((v, k) =>
-                        <View className="val" key={k}>{v.name}&nbsp;&nbsp;{v.position}&nbsp;&nbsp;{v.department}&nbsp;&nbsp;{v.mobile}</View>
+                        <View className="val" key={k}>
+                          {v.name}&nbsp;&nbsp;{v.position}&nbsp;&nbsp;{v.department}&nbsp;&nbsp;{v.mobile}
+                          {this.state.isMask && <View className="mask"></View>}
+                        </View>
                       )
                     }
                   </View>

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

@@ -129,6 +129,7 @@
       }
 
       .val {
+        position: relative;
         font-size: 26px;
         margin-bottom: 5px;
 
@@ -137,6 +138,19 @@
           color: #1E90FF;
         }
 
+        .mask {
+          position: absolute;
+          top: 0;
+          right: 0;
+          bottom: 0;
+          left: 0;
+          width: 100%;
+          height: 100%;
+          background: #facd91;
+          z-index: 99;
+
+        }
+
       }
 
     }

+ 175 - 78
src/pages/egressDetails/index.jsx

@@ -7,8 +7,10 @@ import {
   AtIcon,
   AtTextarea,
   AtModal,
+  AtModalHeader,
   AtModalContent,
   AtModalAction,
+  AtRadio,
 } from "taro-ui";
 import Skeleton from "taro-skeleton";
 
@@ -33,6 +35,7 @@ import "taro-ui/dist/style/components/modal.scss";
 import "taro-ui/dist/style/components/timeline.scss";
 import "taro-ui/dist/style/components/icon.scss";
 import "taro-ui/dist/style/components/calendar.scss";
+import "taro-ui/dist/style/components/radio.scss";
 
 import Rejected from "../../image/rejected.png";
 import Passed from "../../image/passed.png";
@@ -60,7 +63,7 @@ class EgressDetails extends Component {
       reasonsInvalidation: "",
       isVerify: false, //判断是否在审核中修改
       selectArrderLocation: {},
-      current: "",
+      current: this.$instance.router.params.status || "",
       isNo: true,
       foc: false,
       coorderList: [],
@@ -68,23 +71,30 @@ class EgressDetails extends Component {
       popup: false,
       selid: "",
       userList: [],
+      isSelFiles: false,
+      filesList: [],
+      uid: "",
+      // techStartProcess 	0无需审核 1需要审核 2营销审核通过 3营销审核驳回
+      // assistProcess 		  0非协单 1协单上级未审核 2协单待审核 3协单部分审核 4协单完全审核 5协单驳回
+      // assist 		        0非协单 1主协单 2子协单  3技术助手
+      // publicType 	      公出他人企业  0不含他人客户 1待审核 2已审核 3已驳回
+      // status=1			      0驳回 1发起 2通过
+      // type			          0业务 1技术 2行政 3协单 4协单助手
     };
     this.examinePublicRelease = this.examinePublicRelease.bind(this);
     this.getReleasetDails = this.getReleasetDails.bind(this);
     this.oidApplication = this.oidApplication.bind(this);
+    this.onSelFiles = this.onSelFiles.bind(this);
   }
 
+
   componentDidMount() {
-    this.setState({
-      current: this.$instance.router.params.status || "",
-      sonType: this.$instance.router.params.sonType || "",
-    });
     this.getReleasetDails();
     if (!this.isLogin()) {
       Taro.setStorageSync('currentPage', `/pages/egressDetails/index?id=${this.$instance.router.params.id}`)
     }
   }
-  
+
   isLogin() {
     return !!Taro.getStorageSync('userInfor');
   }
@@ -151,9 +161,10 @@ class EgressDetails extends Component {
             });
           } else {
             setTimeout(() => {
-              Taro.switchTab({
-                url: "/pages/punchClock/index",
-              });
+              // Taro.switchTab({
+              //   url: "/pages/punchClock/index",
+              // });
+              Taro.navigateBack()
             }, 1800);
             Taro.showToast({
               title: "您没有权限查看此公出详情",
@@ -172,7 +183,7 @@ class EgressDetails extends Component {
   }
 
   // 同意/驳回
-  agree(sta) {
+  agree(sta, evaluateType) {
     if (!this.state.opinion) {
       Taro.showToast({ title: "请填写审批意见", icon: "none" });
       return;
@@ -194,9 +205,10 @@ class EgressDetails extends Component {
               inquiryContent: "当前公出申请已修改,请重新审核",
             });
           } else {
-            sta === 2
-              ? this.examinePublicRelease(2)
-              : this.examinePublicRelease(0);
+            // sta === 2
+            //   ? this.examinePublicRelease(2)
+            //   : this.examinePublicRelease(0);
+            this.examinePublicRelease(sta, evaluateType)
           }
           if (v.data) {
             let list = [];
@@ -236,19 +248,22 @@ class EgressDetails extends Component {
       });
   }
 
-  examinePublicRelease(status) {
+  examinePublicRelease(status, evaluateType) {
     if (!this.state.opinion) {
       Taro.showToast({ title: "请填写审批意见", icon: "none" });
       return;
     }
     // Taro.showLoading({ title: "加载中..." });
-    let isSuperior = this.state.current == "他人公出"
-      ? (this.state.sonType == 4 ? 2 : this.state.sonType == 5 && 3)
-      : this.state.current == "协单审核" ? 4
+
+    let isSuperior = this.state.dtails.publicType == 1
+      ? (this.state.dtails.type == 0 ? 2 : this.state.dtails.type == 1 && 3)
+      : this.state.dtails.assistProcess == 2
+        ? 4
         : 1
     examinePublicRelease(
       isSuperior,
       {
+        evaluateType,
         status,
         remarks: this.state.opinion,
         id: this.state.dtails.id,
@@ -281,7 +296,7 @@ class EgressDetails extends Component {
           this.state.dtails.prdList[0]?.districtName +
           "的公出"
           : this.state.dtails.aname + "将要去" + this.state.dtails.prdList[0]?.districtName,
-      path: "pages/egressDetails/index?id=" + this.$instance.router.params.id,
+      path: "/pages/egressDetails/index?id=" + this.$instance.router.params.id,
     };
   }
 
@@ -380,7 +395,7 @@ class EgressDetails extends Component {
     });
   }
   // 技术公出逻辑判断
-  checkOrderNoDuration() {
+  checkOrderNoDuration(evaluateType) {
     const _this = this
     checkOrderNoDuration({
       id: this.state.dtails.id,
@@ -406,7 +421,7 @@ class EgressDetails extends Component {
                 <View>请确认是否同意本次公出?</View>
               </View>,
               inquiryFn: () => {
-                _this.agree(2);
+                _this.agree(2, evaluateType);
               },
             })
           } else {
@@ -416,7 +431,7 @@ class EgressDetails extends Component {
               inquiryTitle: "提醒",
               inquiryContent: "您确定要同意此申请吗?",
               inquiryFn: () => {
-                _this.agree(2);
+                _this.agree(2, evaluateType);
               },
             })
           }
@@ -429,6 +444,25 @@ class EgressDetails extends Component {
       });
   }
 
+  onSelFiles(data) {
+    let list = []
+    let userNames = data.userNames.split(",")
+    let UserIds = data.uids.split(",")
+    if (UserIds.length > 1) {
+      for (var i = 0; i < userNames.length; i++) {
+        list.push({ label: userNames[i], value: UserIds[i] })
+      }
+      this.setState({
+        filesList: list,
+        isSelFiles: true
+      })
+    } else {
+      Taro.navigateTo({
+        url: "/pages/customerProfile/index?id=" + data.uids + "&notRequired=true",
+      });
+    }
+  }
+
   render() {
     const { dtails, current, cList, coorderList, popup } = this.state;
     return (
@@ -489,54 +523,52 @@ class EgressDetails extends Component {
           </View>
         ) : (
           <View className="valueContent">
-            {
-              dtails.status != 3 && dtails.type == 3 && (current === "查看协单" || current === "我的协单")
-                ? <View className="item">
-                  <View className="title" style={{ color: "red" }}>协单助手(助手无成本)</View>
-                  <View className="cassistant">
-                    {
-                      coorderList.length == 0
-                        ? <Text>无</Text>
-                        : coorderList.map((item, index) =>
-                          <View className="citems" key={index}>
-                            {item}
-                            <View className="cclose"
-                              onClick={() => {
-                                this.setState({
-                                  isInquiryOpened: true,
-                                  inquiryTitle: "温馨提示",
-                                  inquiryContent: "您确定要移除此协单助手吗?",
-                                  inquiryFn: () => {
-                                    this.deleteA(dtails.id, cList[index])
-                                  },
-                                });
-                              }}
-                            ><AtIcon value="close-circle" size="15" color="#bbbbbb" /></View>
-                          </View>
-                        )
-                    }
-                    {cList.length < 5 && <Button className="addbuttom" type='primary' onClick={this.popupClick.bind(this, dtails.id)}>添加协单助手</Button>}
-                  </View>
-                </View>
-                : coorderList.length != 0 &&
-                <View className="item">
-                  <View className="title" style={{ color: "red" }}>协单助手(助手无成本)</View>
-                  <View className="cassistant">
-                    {
-                      coorderList.map((item, index) =>
-                        <View className="citems" style={{ paddingRight: 0 }} key={index}>
+            {dtails.status != 3 && dtails.type == 3 && (dtails.assistProcess == 2 || dtails.assist === 1 || dtails.assist === 2)
+              ? <View className="item">
+                <View className="title" style={{ color: "red" }}>协单助手(助手无成本)</View>
+                <View className="cassistant">
+                  {
+                    coorderList.length == 0
+                      ? <Text>无</Text>
+                      : coorderList.map((item, index) =>
+                        <View className="citems" key={index}>
                           {item}
+                          <View className="cclose"
+                            onClick={() => {
+                              this.setState({
+                                isInquiryOpened: true,
+                                inquiryTitle: "温馨提示",
+                                inquiryContent: "您确定要移除此协单助手吗?",
+                                inquiryFn: () => {
+                                  this.deleteA(dtails.id, cList[index])
+                                },
+                              });
+                            }}
+                          ><AtIcon value="close-circle" size="15" color="#bbbbbb" /></View>
                         </View>
                       )
-                    }
-                  </View>
+                  }
+                  {cList.length < 5 && <Button className="addbuttom" type='primary' onClick={this.popupClick.bind(this, dtails.id)}>添加协单助手</Button>}
                 </View>
+              </View>
+              : coorderList.length != 0 &&
+              <View className="item">
+                <View className="title" style={{ color: "red" }}>协单助手(助手无成本)</View>
+                <View className="cassistant">
+                  {
+                    coorderList.map((item, index) =>
+                      <View className="citems" style={{ paddingRight: 0 }} key={index}>
+                        {item}
+                      </View>
+                    )
+                  }
+                </View>
+              </View>
             }
             <View className="item">
               <View className="title">
                 公出地点:
-                {current !== "审核" && dtails.permission === 0
-                  && dtails.type !== 3 && dtails.type !== 4 ? (
+                {dtails.permission === 0 && dtails.type !== 3 && dtails.type !== 4 ? (
                   <View
                     className="edit"
                     onClick={() => {
@@ -638,7 +670,15 @@ class EgressDetails extends Component {
               ""
             )}
             <View className="item">
-              <View className="title">公出企业</View>
+              <View className="title">
+                公出企业
+                {dtails.viewPermission == 1 &&
+                  <View className="tbuttom"
+                    onClick={e => {
+                      e.stopPropagation()
+                      this.onSelFiles(dtails)
+                    }}>查看客户档案</View>}
+              </View>
               <View className="value">
                 {/* {dtails.nickname} */}
                 {
@@ -648,13 +688,16 @@ class EgressDetails extends Component {
                 }
               </View>
             </View>
-            {
-              dtails.assistAidName != null && dtails.assistAidName != "" &&
+            {dtails.assistAidName != null && dtails.assistAidName != "" &&
               <View className="item">
                 <View className="title" style={{ color: "red" }}>技术协单(技术协单,将统计相关的公出成本等)</View>
                 <View className="value">{dtails.assistAidName.replace(/,/g, " ")}</View>
-              </View>
-            }
+              </View>}
+            {dtails.alone != 0 &&
+              <View className="item">
+                <View className="title">本人公出</View>
+                <View className="value">{["", "是,一同公出", "否,本人不公出"][dtails.alone]}</View>
+              </View>}
             {/* 公出目标 */}
             <View className="item">
               <View className="title">公出目标</View>
@@ -682,11 +725,11 @@ class EgressDetails extends Component {
                 </View>
               </View>
             ) : null}
-            {((dtails.status === 1 && current === "协单审核" && dtails.myExamine === 0) ||
-              (dtails.status === 1 && current === "审核" && dtails.assistProcess === 0) ||
-              (dtails.status === 1 && current === "审核" && dtails.assistProcess === 1) ||
-              (dtails.myExamine === 0 && current === "他人公出" && dtails.publicType == 1) ||
-              (dtails.myExamine === 0 && current === "他人公出" && dtails.techStartProcess == 1)) &&
+            {((dtails.status === 1 && dtails.myExamine === 1) ||
+              (dtails.status === 1 && dtails.myExamine === 1 && dtails.assistProcess === 0) ||
+              (dtails.status === 1 && dtails.myExamine === 1 && dtails.assistProcess === 1) ||
+              (dtails.myExamine === 1 && dtails.publicType == 1) ||
+              (dtails.myExamine === 1 && dtails.techStartProcess == 1)) &&
               <View className="item">
                 <View className="title">
                   填写审批意见
@@ -715,8 +758,7 @@ class EgressDetails extends Component {
                         inquiryTitle: "提醒",
                         inquiryContent: "您确定要驳回此申请吗?",
                         inquiryFn: () => {
-                          this.agree(0);
-                          // this.examinePublicRelease(0);
+                          this.agree(0, 0);
                         },
                       });
                     }}
@@ -732,23 +774,44 @@ class EgressDetails extends Component {
                         return;
                       }
                       dtails.type == 1
-                        ? this.checkOrderNoDuration()
+                        ? this.checkOrderNoDuration(0)
                         : this.setState({
                           isInquiryOpened: true,
                           inquiryTitle: "提醒",
                           inquiryContent: "您确定要同意此申请吗?",
                           inquiryFn: () => {
-                            this.agree(2);
-                            // this.examinePublicRelease(2);
+                            this.agree(2, 0);
                           },
                         });
                     }}
                   >
                     同意
                   </AtButton>
+                  <AtButton
+                    type="primary"
+                    loading={this.state.loading}
+                    circle
+                    onClick={() => {
+                      if (this.state.loading) {
+                        return;
+                      }
+                      dtails.type == 1
+                        ? this.checkOrderNoDuration(1)
+                        : this.setState({
+                          isInquiryOpened: true,
+                          inquiryTitle: "提醒",
+                          inquiryContent: "您确定要同意此申请,并存为指导意见吗?",
+                          inquiryFn: () => {
+                            this.agree(2, 1);
+                          },
+                        });
+                    }}
+                  >
+                    同意,并存为指导意见
+                  </AtButton>
                 </View>
               </View>}
-            {current !== "审核" && dtails.permission === 0
+            {dtails.permission === 0
               && dtails.type !== 3 && dtails.type !== 4 ? (
               <View className="item" id={"reasons"}>
                 <View className="title">修改/撤销</View>
@@ -765,7 +828,7 @@ class EgressDetails extends Component {
                 />
               </View>
             ) : null}
-            {current !== "审核" && dtails.permission === 0
+            {dtails.permission === 0
               && dtails.type !== 3 && dtails.type !== 4 ? (
               <View className="operation">
                 <Button
@@ -930,6 +993,40 @@ class EgressDetails extends Component {
             addClick={this.addA.bind(this)}
           />
         }
+        <AtModal
+          closeOnClickOverlay={false}
+          isOpened={this.state.isSelFiles}
+        >
+          <AtModalHeader>请选择</AtModalHeader>
+          <AtModalContent>
+            <AtRadio
+              options={this.state.filesList}
+              value={this.state.uid}
+              onClick={e => {
+                this.setState({
+                  uid: e
+                })
+              }}
+            />
+          </AtModalContent>
+          <AtModalAction>
+            <Button type='secondary'
+              onClick={() => {
+                this.setState({
+                  isSelFiles: false
+                })
+              }}>取消</Button>
+            <Button type='primary'
+              onClick={() => {
+                this.setState({
+                  isSelFiles: false
+                })
+                Taro.navigateTo({
+                  url: "/pages/customerProfile/index?id=" + this.state.uid + "&notRequired=true",
+                });
+              }}>确定</Button>
+          </AtModalAction>
+        </AtModal>
       </View>
     );
   }

+ 6 - 0
src/pages/egressDetails/index.less

@@ -86,6 +86,12 @@
           height: 40px;
           margin-left: 20px;
         }
+
+        .tbuttom{
+          position: absolute;
+          right: 0;
+          color: #3864ef;
+        }
       }
 
       .value {

+ 43 - 3
src/pages/egressDetails/publicContent.jsx

@@ -1,6 +1,6 @@
 import React, { Component } from "react";
 import Taro from "@tarojs/taro";
-import { Text, View, Button, Icon } from "@tarojs/components";
+import { Text, View, Button, Icon, Radio, RadioGroup } from "@tarojs/components";
 import dayjs from "dayjs";
 import "./index.less";
 
@@ -58,6 +58,7 @@ class PublicContent extends Component {
       coorderList: [],
       cList: [],
       isNewshow: false,
+      alone: 1,
     };
     this.onSubmit = this.onSubmit.bind(this);
     this.selectArrder = this.selectArrder.bind(this);
@@ -103,6 +104,7 @@ class PublicContent extends Component {
         expectedEffect: this.props.dtails.expectedEffect || "",
         cList: list,
         coorderList: !dtails.assistAid ? [] : dtails.assistAid.split(","),
+        alone: this.props.dtails.alone,
       })
     } else {
       // 编辑详情
@@ -119,6 +121,7 @@ class PublicContent extends Component {
         expectedEffect: this.props.dtails.expectedEffect || "",
         cList: list,
         coorderList: !dtails.assistAid ? [] : dtails.assistAid.split(","),
+        alone: this.props.dtails.alone,
       });
     }
 
@@ -234,6 +237,7 @@ class PublicContent extends Component {
         validDate: JSON.stringify(this.state.validDates),
         type: this.props.dtails.type,
         status: 1,
+        alone: this.state.coorderList.length === 0 ? 0 : this.state.alone,
         assist: this.state.coorderList.length === 0 ? 0 : 1,
         assistAid: this.state.coorderList.length === 0 ? "" : this.state.coorderList.join(","),
         assistAidName: this.state.coorderList.length === 0 ? "" : getNameList(this.state.coorderList, this.state.cList).join(","),
@@ -255,8 +259,8 @@ class PublicContent extends Component {
         duration: this.state.totalDuration,
         validDate: JSON.stringify(this.state.validDates),
         type: this.props.dtails.type,
-        orderNo: this.props.dtails.orderNo,
         status: 1,
+        alone: this.state.coorderList.length === 0 ? 0 : this.state.alone,
         assist: this.state.coorderList.length === 0 ? 0 : 1,
         assistAid: this.state.coorderList.length === 0 ? "" : this.state.coorderList.join(","),
         assistAidName: this.state.coorderList.length === 0 ? "" : getNameList(this.state.coorderList, this.state.cList).join(","),
@@ -280,6 +284,7 @@ class PublicContent extends Component {
         type: this.props.dtails.type,
         orderNo: this.props.dtails.orderNo,
         status: 1,
+        alone: this.state.coorderList.length === 0 ? 0 : this.state.alone,
         assist: this.state.coorderList.length === 0 ? 0 : 1,
         assistAid: this.state.coorderList.length === 0 ? "" : this.state.coorderList.join(","),
         assistAidName: this.state.coorderList.length === 0 ? "" : getNameList(this.state.coorderList, this.state.cList).join(","),
@@ -381,6 +386,7 @@ class PublicContent extends Component {
       duration: this.state.totalDuration,
       type: this.props.dtails.type,
       validDate: JSON.stringify(this.state.validDates),
+      alone: this.state.coorderList.length === 0 ? 0 : this.state.alone,
       assist: this.state.coorderList.length === 0 ? 0 : 1,
       assistAid: this.state.coorderList.length === 0 ? "" : this.state.coorderList.join(","),
       assistAidName: this.state.coorderList.length === 0 ? "" : getNameList(this.state.coorderList, this.state.cList).join(","),
@@ -789,9 +795,43 @@ class PublicContent extends Component {
         {
           dtails.type === 0 &&
           <View className="tips">
-            技术协单,将统计相关的公出成本等
+            请与技术协商后,再发起协单,协单将统计公出成本等
           </View>
         }
+        {
+          cList.length >= 1 &&
+          <View
+            className="formItem"
+            style={{ paddingBottom: 0, marginTop: 10 }}
+          >
+            <View className="formName">
+              <Text>本人公出:</Text>
+            </View>
+            <View>
+              <RadioGroup
+                onChange={e => {
+                  this.setState({
+                    alone: e.detail.value
+                  })
+                }}
+              >
+                {[{ text: "是,一同公出", value: 1 },
+                { text: "否,本人不公出", value: 2 }].map((item, i) => {
+                  return (
+                    <Radio
+                      style={{ marginLeft: 10 }}
+                      key={i}
+                      value={item.value}
+                      checked={item.value == this.state.alone}>
+                      {item.text}
+                    </Radio>
+                  )
+                })}
+              </RadioGroup>
+            </View>
+          </View>
+        }
+
         {this.state.validDates.length !== 0 ? (
           <View
             className="formItem"

+ 2 - 2
src/pages/enterprise/list.jsx

@@ -102,7 +102,7 @@ class MyList extends Component {
                     onClick={e => {
                       e.stopPropagation();
                       Taro.navigateTo({
-                        url: "/pages/situation/index?id=" + v.id + "&signBills=" + v.signBills + "&nickname=" + v.nickname,
+                        url: "/pages/situation/index?id=" + v.id,
                       });
                     }}
                   >
@@ -115,7 +115,7 @@ class MyList extends Component {
                     onClick={e => {
                       e.stopPropagation();
                       Taro.navigateTo({
-                        url: "/pages/customerProfile/index?id=" + v.id + "&signBills=" + v.signBills,
+                        url: "/pages/customerProfile/index?id=" + v.id,
                       });
                     }}
                   >

+ 1 - 1
src/pages/examine/index.jsx

@@ -52,7 +52,7 @@ class Examine extends Component {
       list: [],
       pageNo: 1,
       listState: 'LOADING',
-      starts: {},
+      starts: { title: '审核中', id: 1, color: '#1d4fea' },
       clockInStarts: '',
       rangeEndVal: '',
       rangeStartVal: '',

+ 24 - 21
src/pages/examine/myList.jsx

@@ -111,10 +111,24 @@ class MyList extends Component {
                 <View className="releaseStarts">
                   开始时间:{v.releaseStarts}
                   {/* this.props.type === 0 &&  */}
-                  {this.props.type === 0 && v.status === 2 && (
-                    v.type === 3
-                      ? v.publicAssistAdvice > 0
-                        ? <View
+                  {(v.alone == 2 && v.assist == 1) ? null :
+                    ((this.props.type === 0 && v.status === 2) && (
+                      v.type === 3
+                        ? v.publicAssistAdvice > 0
+                          ? <View
+                            className="punchClock"
+                            onClick={(e) => {
+                              e.stopPropagation();
+                              Taro.eventCenter.trigger("GoPunchIn", v);
+                              Taro.switchTab({
+                                url: "/pages/punchClock/index",
+                              });
+                            }}
+                          >
+                            {(v.clockIn === 1 || v.clockIn === 2) ? "更新打卡" : "去打卡"}
+                          </View>
+                          : null
+                        : <View
                           className="punchClock"
                           onClick={(e) => {
                             e.stopPropagation();
@@ -126,20 +140,7 @@ class MyList extends Component {
                         >
                           {(v.clockIn === 1 || v.clockIn === 2) ? "更新打卡" : "去打卡"}
                         </View>
-                        : null
-                      : <View
-                        className="punchClock"
-                        onClick={(e) => {
-                          e.stopPropagation();
-                          Taro.eventCenter.trigger("GoPunchIn", v);
-                          Taro.switchTab({
-                            url: "/pages/punchClock/index",
-                          });
-                        }}
-                      >
-                        {(v.clockIn === 1 || v.clockIn === 2) ? "更新打卡" : "去打卡"}
-                      </View>
-                  )}
+                    ))}
                   {/* {(v.type === 3 && v.publicAssistAdvice === 0) ? null : (v.status === 2 &&)(<View
                     className="punchClock"
                     onClick={(e) => {
@@ -170,9 +171,11 @@ class MyList extends Component {
                 }
                 <View className="examine">{v.adminExamine}</View>
                 <View className="bottomContent">
-                  <View className="clockIn"
-                    style={{ color: ['red', "#6eb173", '#dbc037'][v.clockIn] }}
-                  >{['未打卡', '已打卡', '异常打卡'][v.clockIn]}</View>
+                  {v.alone == 2 && v.assist == 1
+                    ? <View className="clockIn" style={{ color: "#6eb173" }}>无需打卡</View>
+                    : <View className="clockIn"
+                      style={{ color: ['red', "#6eb173", '#dbc037'][v.clockIn] }}
+                    >{['未打卡', '已打卡', '异常打卡'][v.clockIn]}</View>}
                   <View
                     className="status"
                     style={{ color: getClockState(v.status).color, }}

+ 17 - 12
src/pages/situation/index.jsx

@@ -30,6 +30,7 @@ class CustomerProfile extends Component {
     super(props);
     this.state = {
       data: [],
+      user: {},
       loading: false,
       isOpen: false,
       opinion: "",
@@ -46,7 +47,7 @@ class CustomerProfile extends Component {
   componentDidMount() {
     this.getPublicList();
     if (!this.isLogin()) {
-      Taro.setStorageSync('currentPage', `/pages/situation/index?id=${this.$instance.router.params.id}&signBills=${this.$instance.router.params.signBills}&nickname=${this.$instance.router.params.nickname}`)
+      Taro.setStorageSync('currentPage', `/pages/situation/index?id=${this.$instance.router.params.id}`)
     }
   }
 
@@ -62,7 +63,7 @@ class CustomerProfile extends Component {
     this.limitUser();
     return {
       title: "面谈记录",
-      path: "/pages/situation/index?id=" + this.$instance.router.params.id + "&signBills=" + this.$instance.router.params.signBills + "&nickname=" + this.$instance.router.params.nickname,
+      path: "/pages/situation/index?id=" + this.$instance.router.params.id,
     };
   }
 
@@ -70,14 +71,18 @@ class CustomerProfile extends Component {
     this.setState({
       loading: true
     })
-    getPublicList({
-      id: this.$instance.router.params.id,
-    })
+    getPublicList(
+      this.$instance.router.params.notRequired,
+      {
+        id: this.$instance.router.params.id,
+      }
+    )
       .then((v) => {
         if (v.error.length === 0) {
           this.setState({
             data: v.data.list,
             myUser: v.data.myUser,
+            user: v.data.user,
             loading: false,
           })
         } else {
@@ -157,7 +162,7 @@ class CustomerProfile extends Component {
   }
 
   render() {
-    const { data, loading, type, opinion, myUser } = this.state;
+    const { data, loading, type, opinion, myUser, user } = this.state;
     return (
       <View className="situation">
         <MessageNoticebar />
@@ -181,8 +186,8 @@ class CustomerProfile extends Component {
             <View>
               <View className="UserName">
                 <Text style={{ width: "80%" }}>
-                  <Text>{this.$instance.router.params.nickname}&nbsp;&nbsp;</Text>
-                  <Text style={{ fontSize: "12px", color: ["red", "green"][this.$instance.router.params.signBills] }}>{["未签单", "已签单"][this.$instance.router.params.signBills]}</Text>
+                  <Text>{user.nickname}&nbsp;&nbsp;</Text>
+                  <Text style={{ fontSize: "12px", color: ["red", "green"][user.signBills] }}>{["未签单", "已签单"][user.signBills]}</Text>
                 </Text>
                 {myUser == 1 && <Button className="share" plain type='primary' open-type="share">分享</Button>}
               </View>
@@ -199,7 +204,7 @@ class CustomerProfile extends Component {
                   this.state.isSuperior &&
                   <Superior
                     id={this.$instance.router.params.id}
-                    userNames={this.$instance.router.params.nickname}
+                    userNames={user.nickname}
                     isOpinion={this.state.isSuperior}
                     isFill={myUser == 0}
                     onClose={() => {
@@ -213,7 +218,7 @@ class CustomerProfile extends Component {
                   onClick={e => {
                     e.stopPropagation()
                     Taro.navigateTo({
-                      url: "/pages/customerProfile/index?id=" + this.$instance.router.params.id + "&signBills=" + this.$instance.router.params.signBills,
+                      url: "/pages/customerProfile/index?id=" + this.$instance.router.params.id + "&notRequired=" + this.$instance.router.params.notRequired,
                     });
                   }}
                 >客户档案</View>
@@ -247,7 +252,7 @@ class CustomerProfile extends Component {
                     <View className="val">公出计划:<Text className="t">{item.plan}</Text></View>
                     <View className="val">预计效果:<Text className="t">{item.expectedEffect}</Text></View>
                     <View className="tit">
-                      <Text style={{ width: "80%" }}>
+                      <Text style={{ width: myUser == 1 ? "80%" : "100%" }}>
                         本次公出目标总结
                         <Text className="txt">(包括后续面谈时间、内容、沟通对象、沟通结果)</Text>
                       </Text>
@@ -302,7 +307,7 @@ class CustomerProfile extends Component {
           >
             <AtModalHeader>公出企业-{type == 1 ? "本次共出目标" : type == 2 ? "下一步公出计划" : ""}</AtModalHeader>
             <AtModalContent>
-              <View style={{ margin: "0 0 10px", color: "#6190E8" }}>{this.$instance.router.params.nickname}</View>
+              <View style={{ margin: "0 0 10px", color: "#6190E8" }}>{user.nickname}</View>
               <AtTextarea
                 value={this.state.text}
                 onChange={e => {

+ 4 - 4
src/utils/servers/servers.js

@@ -168,13 +168,13 @@ export const selectMyUserDetails = (postData = {}) => {
 }
 
 // 客户档案详情
-export const queryByUidAll = (postData = {}) => {
-  return HTTPREQUEST.get('/api/admin/userArchives/queryByUidAll', postData)
+export const queryByUidAll = (notRequired = false, postData = {}) => {
+  return HTTPREQUEST.get(notRequired ? '/api/admin/userArchives/superQueryByUidAll' : '/api/admin/userArchives/queryByUidAll', postData)
 }
 
 // 企业公出情况
-export const getPublicList = (postData = {}) => {
-  return HTTPREQUEST.get('/api/admin/customer/getPublicReleaseList', postData)
+export const getPublicList = (notRequired = false, postData = {}) => {
+  return HTTPREQUEST.get(notRequired ? '/api/admin/customer/selectPublicReleaseList' : '/api/admin/customer/getPublicReleaseList', postData)
 }
 
 // 修改客户信息