dev01 hace 2 años
padre
commit
349f3cbc03

+ 28 - 28
src/app.jsx

@@ -7,7 +7,7 @@ import './app.less'
 import 'taro-skeleton/dist/index.css'
 import Taro from "@tarojs/taro";
 
-import {getWxConfig} from './utils/servers/servers';
+import { getWxConfig } from './utils/servers/servers';
 
 import 'taro-ui/dist/style/components/drawer.scss';
 import 'taro-ui/dist/style/components/list.scss';
@@ -15,84 +15,84 @@ import 'taro-ui/dist/style/components/list.scss';
 const store = configStore()
 
 class App extends Component {
-  componentDidMount () {}
+  componentDidMount() { }
 
-  componentDidShow () {
+  componentDidShow() {
     Taro.eventCenter.on('getStorageSync', () => {
       let token = Taro.getStorageSync('token');
-      if(token){
+      if (token) {
         this.getStorageSync();
       }
     })
     let token = Taro.getStorageSync('token');
-    if(token){
+    if (token) {
       this.getStorageSync();
     }
     this.getWxConfig();
   }
 
-  componentDidHide(){
+  componentDidHide() {
     Taro.closeSocket();
   }
 
-  getWxConfig(){
-    getWxConfig({}).then(v=>{
-      if(v.error.length === 0){
+  getWxConfig() {
+    getWxConfig({}).then(v => {
+      if (v.error.length === 0) {
         Taro.setStorageSync("wxConfig", v.data || {});
-      }else{
+      } else {
         Taro.showToast({
-          title:v.error[0].message,
-          icon:'none'
+          title: v.error[0].message,
+          icon: 'none'
         })
       }
-    }).catch((error)=>{
+    }).catch((error) => {
       console.log(error)
     })
   }
 
-  getStorageSync(){
+  getStorageSync() {
     let token = Taro.getStorageSync('token');
     //建立连接
     Taro.connectSocket({
-      header:{
+      header: {
         'token': token,
       },
-      // url: "wss://bm.jishutao.com/webSocketServer",
+      url: "wss://bm.jishutao.com/webSocketServer",
       // url: 'wss://172.16.0.255:8080/webSocketServer'
-      url: 'wss://uat.jishutao.com/webSocketServer'
+      // url: 'wss://uat.jishutao.com/webSocketServer'
     })
 
     //连接成功
-    Taro.onSocketOpen(function() {
+    Taro.onSocketOpen(function () {
       console.log('连接成功')
     })
 
     //接收数据
-    Taro.onSocketMessage(function(data) {
-      console.log(data,'接收数据')
-      Taro.eventCenter.trigger('GoPuncsshIn',data)
+    Taro.onSocketMessage(function (data) {
+      console.log(data, '接收数据')
+      Taro.eventCenter.trigger('GoPuncsshIn', data)
     })
 
     //连接失败
-    Taro.onSocketError(function() {
+    Taro.onSocketError(function () {
       console.log('websocket连接失败!');
     })
 
     //连接关闭
-    Taro.onSocketClose(function() {
+    Taro.onSocketClose(function () {
       console.log('websocket连接关闭!');
     })
   }
 
-  componentDidCatchError () {}
+  componentDidCatchError() { }
 
   // 在 App 类中的 render() 函数没有实际作用
   // 请勿修改此函数
-  render () {
+  render() {
     return (
-        <Provider store={store}>
-          {this.props.children}
-        </Provider>
+      <Provider store={store}>
+        {this.props.children}
+      </Provider>
     )
   }
 }

+ 72 - 72
src/components/common/messageNoticebar/index.jsx

@@ -1,9 +1,9 @@
-import React,{Component} from "react";
-import {View,Text,ScrollView} from '@tarojs/components'
+import React, { Component } from "react";
+import { View, Text, ScrollView } from '@tarojs/components'
 import Taro from '@tarojs/taro';
-import {AtNoticebar} from 'taro-ui'
+import { AtNoticebar } from 'taro-ui'
 import './index.less';
-import  {getPublicReleaseUnread} from '../../../utils/servers/servers';
+import { getPublicReleaseUnread } from '../../../utils/servers/servers';
 
 import "taro-ui/dist/style/components/icon.scss";
 import "taro-ui/dist/style/components/noticebar.scss";
@@ -11,15 +11,15 @@ import "taro-ui/dist/style/components/modal.scss";
 import "taro-ui/dist/style/components/list.scss";
 import "taro-ui/dist/style/components/icon.scss";
 
-class MessageNoticebar extends Component{
+class MessageNoticebar extends Component {
   constructor(props) {
     super(props);
-    this.state={
-      animationData:{},
-      isOpend:false,
-      isOpened:false,
-      str:'',
-      list:[]
+    this.state = {
+      animationData: {},
+      isOpend: false,
+      isOpened: false,
+      str: '',
+      list: []
     }
     this.onClose = this.onClose.bind(this);
     this.getPublicReleaseUnread = this.getPublicReleaseUnread.bind(this);
@@ -27,7 +27,7 @@ class MessageNoticebar extends Component{
     this.onGotoMore = this.onGotoMore.bind(this);
   }
 
-  componentWillMount () {
+  componentWillMount() {
     let animation = Taro.createAnimation({
       duration: 1000,
       timingFunction: 'ease',
@@ -36,12 +36,12 @@ class MessageNoticebar extends Component{
     this.animation = animation
 
     this.setState({
-      animation:animation.export()
+      animation: animation.export()
     })
 
 
     Taro.eventCenter.on('GoPuncsshIn', (data) => {
-      if(data.data === 'unread'){
+      if (data.data === 'unread') {
         this.getPublicReleaseUnread();
       }
     })
@@ -52,58 +52,58 @@ class MessageNoticebar extends Component{
 
     Taro.eventCenter.on('getMessageNoticebar', (data) => {
       this.setState({
-        str:data.str,
-        list:data.list
-      },()=>{
+        str: data.str,
+        list: data.list
+      }, () => {
         this.animation.opacity(1).step()
         this.setState({
           animation: this.animation.export(),
-          isOpend:true
+          isOpend: true
         })
       })
     })
   }
 
-  onClose(){
+  onClose() {
     Taro.eventCenter.trigger('closeMessageNoticebar');
   }
 
-  close(){
+  close() {
     this.animation.opacity(0).step()
     this.setState({
       animation: this.animation.export(),
-      isOpend:false,
-      str:'',
-      list:[],
+      isOpend: false,
+      str: '',
+      list: [],
     })
   }
 
-  getPublicReleaseUnread(){
-    getPublicReleaseUnread({}).then(v=>{
-      if(v.error.length === 0){
-        if(v.data.length === 0){return;}
+  getPublicReleaseUnread() {
+    getPublicReleaseUnread({}).then(v => {
+      if (v.error.length === 0) {
+        if (v.data.length === 0) { return; }
         let str = this.state.isOpend ? this.state.str : '';
-        for(let i of v.data){
-          str+=i.content+'\t\t\t\t\t'
+        for (let i of v.data) {
+          str += i.content + '\t\t\t\t\t'
         }
-        Taro.eventCenter.trigger('getMessageNoticebar',{
+        Taro.eventCenter.trigger('getMessageNoticebar', {
           str,
-          list: this.state.isOpend ? v.data.concat(this.state.list) : v.data
+          list: this.state.isOpend ? [...this.state.list, ...v.data] : v.data
         });
-      }else{
-        Taro.showToast({title:v.error[0].message,icon:'none'})
+      } else {
+        Taro.showToast({ title: v.error[0].message, icon: 'none' })
       }
-    }).catch(()=>{
+    }).catch(() => {
       Taro.showToast({
-        title:'系统错误,请稍后再试',
-        icon:'none'
+        title: '系统错误,请稍后再试',
+        icon: 'none'
       })
     })
   }
 
-  onGotoMore(){
+  onGotoMore() {
     this.setState({
-      isOpened:true
+      isOpened: true
     })
   }
 
@@ -111,25 +111,25 @@ class MessageNoticebar extends Component{
     return (
       <View className='messageNoticebar' animation={this.state.animation}>
         {this.state.isOpend ? <View className='content'>
-              <View style={{width:'100%'}}>
-                <AtNoticebar
-                  close
-                  showMore
-                  moreText='查看全部'
-                  speed='50'
-                  single
-                  icon='volume-plus'
-                  onClose={this.onClose}
-                  onGotoMore={this.onGotoMore}
-                >
-                  <Text decode>
-                    {this.state.str}
-                  </Text>
-                </AtNoticebar>
-              </View>
-              {/*<View className='noticebar' onClick={this.onClose}>*/}
-              {/*  <AtIcon value='close' size='10'/>*/}
-              {/*</View>*/}
+          <View style={{ width: '100%' }}>
+            <AtNoticebar
+              close
+              showMore
+              moreText='查看全部'
+              speed='50'
+              single
+              icon='volume-plus'
+              onClose={this.onClose}
+              onGotoMore={this.onGotoMore}
+            >
+              <Text decode>
+                {this.state.str}
+              </Text>
+            </AtNoticebar>
+          </View>
+          {/*<View className='noticebar' onClick={this.onClose}>*/}
+          {/*  <AtIcon value='close' size='10'/>*/}
+          {/*</View>*/}
         </View> : null}
         {this.state.isOpened ?
           <View className='messageNoticebarContent'>
@@ -137,26 +137,26 @@ class MessageNoticebar extends Component{
               <View className='title'>未读消息</View>
               <ScrollView scrollY scrollWithAnimation scrollTop>
                 <View className='list'>
-                    {
-                      this.state.list.map((v,k)=>(
-                        <View key={k} className='item'>
-                          <View className='itemHead'>
-                            <View className='content'>
-                              <Text>{v.content}</Text>
-                            </View>
-                          </View>
-                          <View className='itemBottom'>
-                            <View className='noticeTypeName'>{v.noticeTypeName}</View>
-                            <View className='createTimeFormattedDate'>{v.createTimeFormattedDate}</View>
+                  {
+                    this.state.list.map((v, k) => (
+                      <View key={k} className='item'>
+                        <View className='itemHead'>
+                          <View className='content'>
+                            <Text>{v.content}</Text>
                           </View>
                         </View>
-                      ))
-                    }
+                        <View className='itemBottom'>
+                          <View className='noticeTypeName'>{v.noticeTypeName}</View>
+                          <View className='createTimeFormattedDate'>{v.createTimeFormattedDate}</View>
+                        </View>
+                      </View>
+                    ))
+                  }
                 </View>
               </ScrollView>
-              <View className='operation' onClick={()=>{
+              <View className='operation' onClick={() => {
                 this.setState({
-                  isOpened:false,
+                  isOpened: false,
                 })
               }}>
                 确定

+ 15 - 6
src/components/common/userquery/index.jsx

@@ -65,7 +65,9 @@ class UserQuery extends Component {
 
 
   render() {
-    const { coorderList, cList } = this.props
+    //selList 本次共出的协单人或协单助手
+    //req是否调用接口添加   addClick接口
+    const { selList = [], coorderList, cList, req = false, addClick } = this.props
     return (
       <AtModal
         isOpened={this.props.isOpened}
@@ -73,7 +75,7 @@ class UserQuery extends Component {
       >
         <AtModalContent>
           <AtSearchBar
-            placeholder="请输入协单人姓名"
+            placeholder="请输入协单人/助手姓名"
             showActionButton
             value={this.state.value}
             onChange={this.onChange}
@@ -106,11 +108,18 @@ class UserQuery extends Component {
                       } else if (isOneself(v.id)) {
                         Taro.showToast({ title: "你不能邀请自己哦~", icon: "none" });
                         return
+                      } else if (selList.includes(v.id)) {
+                        Taro.showToast({ title: "本次公出已经邀请过Ta了", icon: "none" });
+                        return
                       } else {
-                        coorderList.push(v.id);
-                        cList.push(v);
-                        this.props.setList(cList, coorderList);
-                        this.props.onDesc();
+                        if (req) {
+                          addClick(v.id)
+                        } else {
+                          coorderList.push(v.id);
+                          cList.push(v);
+                          this.props.setList(cList, coorderList);
+                          this.props.onDesc();
+                        }
                       }
                     }}
                   />

+ 1 - 0
src/pages/applyDepart/publicContent.jsx

@@ -701,6 +701,7 @@ class PublicContent extends Component {
             isOpened={popup}
             onDesc={this.popupClick.bind(this)}
             cList={cList}
+            selList={[]}
             coorderList={coorderList}
             setList={this.setList.bind(this)}
           />

+ 4 - 0
src/pages/applyDepart/publicContent.less

@@ -125,4 +125,8 @@
     display: flex;
     flex-flow: row nowrap;
   }
+
+  .at-modal__container {
+    width: 718px;
+  }
 }

+ 122 - 10
src/pages/egressDetails/index.jsx

@@ -1,5 +1,5 @@
 import React, { Component } from "react";
-import { View, Image, Button } from "@tarojs/components";
+import { View, Image, Button, Text } from "@tarojs/components";
 import Taro, { getCurrentInstance } from "@tarojs/taro";
 import {
   AtButton,
@@ -19,6 +19,8 @@ import {
   examinePublicRelease,
   getReleasetDails,
   updatePublicRelease,
+  addAssistant,
+  deleteAssistant,
 } from "../../utils/servers/servers";
 import { resourceAddress } from "../../utils/config";
 import "./index.less";
@@ -40,6 +42,7 @@ import ImagePicker from "../../components/common/imagePicker";
 import MessageNoticebar from "../../components/common/messageNoticebar";
 import { getClockState } from "../../utils/tools";
 import HistoricalClock from "../../components/historicalClock";
+import UserQuery from "../../components/common/userquery"; //选择协单人弹窗
 
 class EgressDetails extends Component {
   $instance = getCurrentInstance();
@@ -58,6 +61,10 @@ class EgressDetails extends Component {
       current: "",
       isNo: true,
       foc: false,
+      coorderList: [],
+      cList: [],
+      popup: false,
+      selid: "",
     };
     this.examinePublicRelease = this.examinePublicRelease.bind(this);
     this.getReleasetDails = this.getReleasetDails.bind(this);
@@ -98,6 +105,8 @@ class EgressDetails extends Component {
             v.data.annexUrl = list;
             this.setState({
               dtails: v.data,
+              coorderList: v.data.assistantName != null && v.data.assistantName != "" ? v.data.assistantName.split(",") : [],
+              cList: v.data.assistantAid != null && v.data.assistantName != "" ? v.data.assistantAid.split(",") : [],
               selectArrderLocation: {
                 longitude: parseFloat(v.data.longitude),
                 latitude: parseFloat(v.data.latitude),
@@ -291,9 +300,57 @@ class EgressDetails extends Component {
         });
       });
   }
+  // 弹窗开关
+  popupClick(id) {
+    !this.state.popup &&
+      this.setState({
+        selid: id
+      })
+    this.setState({
+      popup: !this.state.popup
+    })
+  }
+  //增加协单助力
+  addA(aid) {
+    const { selid } = this.state
+    addAssistant({
+      id: selid,
+      aid,
+    }).then((v) => {
+      if (v.error.length === 0) {
+        this.popupClick();
+        this.getReleasetDails();
+      } else {
+        Taro.showToast({ title: v.error[0].message, icon: "none" });
+      }
+    }).catch((err) => {
+      Taro.showToast({ title: "系统错误,请稍后再试", icon: "none" });
+    });
+  }
+  //删除协单助力
+  deleteA(id, aid) {
+    Taro.showLoading({
+      title: '操作中...'
+    })
+    deleteAssistant({
+      id,
+      aid,
+    }).then((v) => {
+      Taro.hideLoading();
+      if (v.error.length === 0) {
+        this.getReleasetDails();
+      } else {
+        Taro.showToast({ title: v.error[0].message, icon: "none" });
+      }
+    }).catch((err) => {
+      Taro.hideLoading();
+      Taro.showToast({ title: "系统错误,请稍后再试", icon: "none" });
+    });
+  }
+
 
   render() {
-    const { dtails, current } = this.state;
+    const { dtails, current, cList, coorderList, popup } = this.state;
     return (
       <View className="egressDetails">
         <MessageNoticebar />
@@ -315,9 +372,7 @@ class EgressDetails extends Component {
             <View>
               <View className="title">
                 {dtails.type === 3 ? dtails.mainName : dtails.aname}提交的公出申请
-                {dtails.updateStatus == 1 && (
-                  <View className="titRight">改</View>
-                )}
+                {dtails.updateStatus == 1 && <View className="titRight">改</View>}
               </View>
               <View className="address">申请时间: {dtails.createTimes}</View>
               <View
@@ -348,11 +403,54 @@ 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}>
+                          {item}
+                        </View>
+                      )
+                    }
+                  </View>
+                </View>
+            }
             <View className="item">
               <View className="title">
                 公出地点:
-                {dtails.permission === 0 && dtails.type !== 3 &&
-                  (dtails.status === 0 || dtails.status === 3) ? (
+                {current !== "审核" && dtails.permission === 0
+                  && dtails.type !== 3 && dtails.type !== 4 ? (
                   <View
                     className="edit"
                     onClick={() => {
@@ -434,7 +532,8 @@ class EgressDetails extends Component {
                   ? "业务公出" : dtails.type == 1
                     ? "技术公出" : dtails.type == 2
                       ? "行政公出" : dtails.type == 3
-                        ? "技术协单" : ""}
+                        ? "技术协单" : dtails.type == 4
+                          ? "协单助手" : ""}
               </View>
             </View>
             {dtails.type == 1 ? (
@@ -548,7 +647,8 @@ class EgressDetails extends Component {
                 </AtButton>
               </View>
             ) : null}
-            {current !== "审核" && dtails.permission === 0 && dtails.status !== 3 && dtails.type !== 3 ? (
+            {current !== "审核" && dtails.permission === 0
+              && dtails.type !== 3 && dtails.type !== 4 ? (
               <View className="item" id={"reasons"}>
                 <View className="title">修改/撤销</View>
                 <AtTextarea
@@ -564,10 +664,12 @@ class EgressDetails extends Component {
                 />
               </View>
             ) : null}
-            {current !== "审核" && dtails.permission === 0 && dtails.status !== 3 && dtails.type !== 3 ? (
+            {current !== "审核" && dtails.permission === 0
+              && dtails.type !== 3 && dtails.type !== 4 ? (
               <View className="operation">
                 <Button
                   type="warn"
+                  disabled={dtails.status === 3}
                   loading={this.state.loading}
                   onClick={() => {
                     if (this.state.loading) {
@@ -719,6 +821,16 @@ class EgressDetails extends Component {
             }}
           />
         ) : null}
+        {popup &&
+          <UserQuery
+            isOpened={popup}
+            onDesc={this.popupClick.bind(this)}
+            coorderList={cList}
+            selList={dtails.assistAid ? dtails.assistAid.split(",") : []}
+            req={true}
+            addClick={this.addA.bind(this)}
+          />
+        }
       </View>
     );
   }

+ 102 - 38
src/pages/egressDetails/index.less

@@ -1,19 +1,22 @@
-.egressDetails{
+.egressDetails {
   min-height: calc(100vh - 30px);
   background: #F5F5F5;
   padding-bottom: 30px;
-  .titleContent{
+
+  .titleContent {
     position: relative;
     background: white;
     padding: 20px 30px;
     border-bottom: 1px #dadada solid;
-    .title{
+
+    .title {
       font-weight: bolder;
       padding-bottom: 20px;
       display: flex;
       flex-direction: row;
       align-items: center;
-      .titRight{
+
+      .titRight {
         background: #1E90FF;
         color: white;
         padding: 5px 8px;
@@ -23,7 +26,8 @@
       }
 
     }
-    .address{
+
+    .address {
       font-size: 25px;
       color: #767272;
       padding-bottom: 20px;
@@ -31,11 +35,13 @@
       flex-flow: row;
       align-items: center;
     }
-    .state{
+
+    .state {
       font-size: 30px;
       color: #767272;
     }
-    .startIcon{
+
+    .startIcon {
       width: 180px;
       height: 180px;
       position: absolute;
@@ -43,14 +49,17 @@
       bottom: 0px;
     }
   }
-  .valueContent{
+
+  .valueContent {
     margin: 20px;
     padding: 30px;
     background: white;
     border-radius: 20px;
-    .item{
+
+    .item {
       padding-bottom: 30px;
-      .title{
+
+      .title {
         display: flex;
         flex-flow: row nowrap;
         align-items: center;
@@ -59,67 +68,113 @@
         font-size: 27px;
         padding-bottom: 10px;
         position: relative;
-        .titleTips{
+
+        .titleTips {
           color: #ff0000;
           font-size: 18px;
           padding-left: 10px;
         }
-        .edit{
+
+        .edit {
           position: absolute;
           right: -30px;
           padding: 30px;
         }
-        .switchItem{
+
+        .switchItem {
           width: 40px;
           height: 40px;
           margin-left: 20px;
         }
       }
-      .value{
+
+      .value {
         color: #000000;
         font-size: 30px;
       }
-      .timeContent{
-        background: rgba(0,51,255,.09);
+
+      .cassistant {
+        font-size: 25px;
+        color: red;
+        display: flex;
+        flex-direction: row;
+        flex-wrap: wrap;
+        margin-top: 10px;
+
+        .citems {
+          margin-right: 20px;
+          margin-bottom: 20px;
+          display: flex;
+          flex-direction: row;
+          position: relative;
+          padding-right: 40px;
+
+          .cclose {
+            position: absolute;
+            right: 0;
+            top: -20px;
+
+          }
+
+        }
+
+        .addbuttom {
+          font-size: 22px;
+          padding: 0 10px;
+          margin-left: 20px;
+        }
+
+      }
+
+      .timeContent {
+        background: rgba(0, 51, 255, .09);
         border-radius: 30px;
         padding: 30px;
         margin-top: 45px;
-        .time{
+
+        .time {
           display: flex;
           flex-flow: row nowrap;
           justify-content: space-between;
           align-items: center;
-          .num{
+
+          .num {
             font-size: 30px;
           }
-          .journal{
+
+          .journal {
             font-size: 28px;
             color: #007aff;
           }
         }
-        .timeAxis{
+
+        .timeAxis {
           display: flex;
           flex-flow: column nowrap;
           padding-top: 30px;
-          .startTime{
+
+          .startTime {
             display: flex;
             align-items: center;
             color: #b7acac;
             font-size: 25px;
           }
-          .axis{
+
+          .axis {
             width: 1px;
             height: 40px;
             border-left: 1px #b7acac solid;
             margin-left: 11px;
           }
-          .endTime{
+
+          .endTime {
             display: flex;
             align-items: center;
             color: #b7acac;
             font-size: 25px;
           }
-          .circle{
+
+          .circle {
             margin-right: 15px;
             width: 20px;
             height: 20px;
@@ -129,50 +184,58 @@
         }
       }
     }
-    .shareContent{
+
+    .shareContent {
       display: flex;
       flex-flow: column nowrap;
       justify-content: center;
       align-items: center;
       width: 100%;
-      .share{
+
+      .share {
         overflow: visible;
         width: 100px;
         height: 100px;
         padding: 0;
         border-radius: 161px;
         background: #0000;
-        .shareIcon{
+
+        .shareIcon {
           width: 100px;
           height: 100px;
         }
       }
-      .shareTitle{
+
+      .shareTitle {
         padding-top: 15px;
         font-size: 19px;
         color: #767272;
       }
     }
   }
-  .history{
+
+  .history {
     display: flex;
     flex-flow: row nowrap;
     justify-content: space-between;
     align-items: center;
     font-size: 30px;
   }
-  .operation{
+
+  .operation {
     display: flex;
     flex-flow: row nowrap;
   }
-  .at-image-picker__flex-box{
+
+  .at-image-picker__flex-box {
     padding-left: 0;
   }
-  .at-image-picker__remove-btn{
+
+  .at-image-picker__remove-btn {
     display: none;
   }
 
-  .at-calendar__list.flex .flex__item--selected{
+  .at-calendar__list.flex .flex__item--selected {
     color: white;
     border: 0 !important;
     border-radius: 0 !important;
@@ -183,20 +246,21 @@
     background-color: #6eb173;
   }
 
-  .at-calendar__list.flex  .flex__item{
+  .at-calendar__list.flex .flex__item {
     background: #6eb173;
     color: #FFFFFF;
   }
 
-  .at-calendar__list.flex .flex__item--blur{
+  .at-calendar__list.flex .flex__item--blur {
     background: #fff !important;
     color: #e1e4e7 !important;
   }
 
-  .at-modal__container{
+  .at-modal__container {
     width: 718px;
   }
-  button::after{
+
+  button::after {
     border: 0px !important;
   }
-}
+}

+ 1 - 0
src/pages/egressDetails/publicContent.jsx

@@ -776,6 +776,7 @@ class PublicContent extends Component {
             isOpened={popup}
             onDesc={this.popupClick.bind(this)}
             cList={cList}
+            selList={dtails.assistantAid ? dtails.assistantAid.split(",") : []}
             coorderList={coorderList}
             setList={this.setList.bind(this)}
           />

+ 2 - 2
src/pages/examine/index.less

@@ -275,13 +275,13 @@
           flex-flow: row nowrap;
           align-items: center;
           justify-content: space-between;
-          padding-bottom: 25px;
+          padding-bottom: 15px;
         }
 
         .coOder {
           font-size: 25px;
           color: #6eb173;
-          padding-bottom: 25px;
+          padding-bottom: 15px;
         }
 
         .bottomContent {

+ 7 - 1
src/pages/examine/myList.jsx

@@ -49,7 +49,7 @@ class MyList extends Component {
                 <View className="userName">
                   公出企业:{v.nickname}
                   {
-                    (title == "我的协单" || title === "查看协单") && v.status === 2 &&
+                    (title == "我的协单" || title === "查看协单") && v.status === 2 && v.type === 3 &&
                     <View
                       className="reject"
                       onClick={e => {
@@ -90,6 +90,12 @@ class MyList extends Component {
                     技术协单:{v.assistAidName.replace(/,/g, " ")}
                   </View>
                 }
+                {
+                  v.assistantName != null && v.assistantName != "" &&
+                  <View className="coOder">
+                    协单助手:{v.assistantName.replace(/,/g, " ")}
+                  </View>
+                }
                 <View className="bottomContent">
                   <View className="clockIn"
                     style={{ color: ['red', "#6eb173", '#dbc037'][v.clockIn] }}

+ 28 - 3
src/pages/mybusiness/index.jsx

@@ -39,7 +39,6 @@ class Examine extends Component {
       current: 0,
       isPickerRender: false,
       validDates: '',
-
       list: [],
       pageNo: 1,
       listState: 'LOADING',
@@ -49,10 +48,15 @@ class Examine extends Component {
       rangeStartVal: '',
       rangeEndMinuteVal: '',
       rangeStartMinuteVal: '',
-
       id: "",
       rmk: "",
       isOpen: false,
+      coorder: [
+        { title: '协单助手', type: 3 },
+        { title: '技术协单', type: 2 },
+        { title: '全部', type: 4 }],
+      selcotype: 4,
+
     }
     this.getPublicReleaseList = this.getPublicReleaseList.bind(this);
     this.getMyList = this.getMyList.bind(this);
@@ -125,7 +129,7 @@ class Examine extends Component {
       pageNo: pageNo,
       pageSize: 10,
       type: '0',
-      assist: this.state.current === 0 ? 0 : 2,
+      assist: this.state.current === 0 ? 0 : this.state.selcotype,
       releaseStarts: this.state.rangeStartMinuteVal || undefined,
       releaseEnds: this.state.rangeEndMinuteVal || undefined,
       status: isNaN(parseInt(this.state.starts.id)) ? undefined : String(this.state.starts.id),
@@ -391,6 +395,27 @@ class Examine extends Component {
                 current={this.state.current}
                 index={index}
               >
+                {
+                  this.state.current === 1 &&
+                  <View className='navs'>
+                    {
+                      this.state.coorder.map((it) =>
+                        <View className={this.state.selcotype == it.type ? 'nitems' : 'nitem'}
+                          key={it.type}
+                          onClick={() => {
+                            this.setState({
+                              list: [],
+                              pageNo: 1,
+                              selcotype: it.type,
+                            }, () => {
+                              this.getPublicReleaseList();
+                            })
+                          }}
+                        >{it.title}</View>
+                      )
+                    }
+                  </View>
+                }
                 <MyList
                   type={0}
                   title={item.title}

+ 113 - 46
src/pages/mybusiness/index.less

@@ -1,32 +1,40 @@
-.indexPage{
+.indexPage {
   position: relative;
   z-index: 1;
   background: #F5F5F5;
   min-height: calc(100vh - 52px);
-  .item-content__info-title{
+
+  .item-content__info-title {
     font-size: 28px;
     color: #9BA0AA;
   }
-  .item-extra__info{
+
+  .item-extra__info {
     font-size: 28px;
     color: #9BA0AA;
   }
-  .at-list__item::after{
+
+  .at-list__item::after {
     border-bottom: 0;
   }
-  .at-list::after{
+
+  .at-list::after {
     border-top: 0;
   }
-  .indexPage .at-list::after{
+
+  .indexPage .at-list::after {
     border: 0;
   }
-  .searchContent{
+
+  .searchContent {
     position: relative;
     background: white;
-    .searchTop{
+
+    .searchTop {
       z-index: 1000;
     }
-    .searchBottom{
+
+    .searchBottom {
       display: flex;
       align-items: center;
       justify-content: space-between;
@@ -34,20 +42,23 @@
       border-bottom-left-radius: 10px;
       border-bottom-right-radius: 10px;
       padding: 10px 0 10px 0;
-      .searchBottomBack{
+
+      .searchBottomBack {
         position: fixed;
         z-index: -1;
         left: 0;
         right: 0;
         bottom: 0;
         top: 100px;
-        background: rgba(0,0,0,.7);
+        background: rgba(0, 0, 0, .7);
       }
-      .searchItem{
-          position: relative;
-          font-size: 25px;
-          color: #FFFFFF;
-        .shortValuecontent{
+
+      .searchItem {
+        position: relative;
+        font-size: 25px;
+        color: #FFFFFF;
+
+        .shortValuecontent {
           position: relative;
           display: flex;
           align-items: center;
@@ -56,23 +67,27 @@
           border-radius: 100px;
           padding: 10px 0;
           margin-right: 5px;
-          .selectValue{
+
+          .selectValue {
             width: 110px;
             padding-left: 15px;
             white-space: nowrap;
           }
-          .selectTitle{
+
+          .selectTitle {
             padding-left: 15px;
             white-space: nowrap;
             width: 110px;
           }
-          .iconContent{
+
+          .iconContent {
             width: 45px;
             padding-right: 20px;
             text-align: right;
           }
         }
-        .valuecontent{
+
+        .valuecontent {
           position: relative;
           display: flex;
           align-items: center;
@@ -81,23 +96,27 @@
           border-radius: 100px;
           padding: 10px 0;
           margin-right: 5px;
-          .selectValue{
+
+          .selectValue {
             padding-left: 15px;
             width: 145px;
             white-space: nowrap;
           }
-          .selectTitle{
+
+          .selectTitle {
             padding-left: 15px;
             white-space: nowrap;
             width: 145px;
           }
-          .iconContent{
+
+          .iconContent {
             width: 45px;
             padding-right: 20px;
             text-align: right;
           }
         }
-        .searchSelectContent{
+
+        .searchSelectContent {
           position: absolute;
           right: 0;
           top: 0;
@@ -111,7 +130,8 @@
           align-items: center;
           padding-bottom: 3px;
         }
-        .closeIcon{
+
+        .closeIcon {
           background: #F00;
           width: 60px;
           height: 46px;
@@ -121,19 +141,50 @@
         }
       }
     }
-    .searchBottomLOL{
+
+    .searchBottomLOL {
       position: fixed;
       z-index: 1000;
-      top:0;
+      top: 0;
       left: 0;
       right: 0;
       box-shadow: 0px 6px 27px 16px #8e8d8d;
       background: #FFFFFF;
     }
   }
-  .list{
+
+  .navs {
+    display: flex;
+    flex-direction: row-reverse;
+    align-items: center;
+    margin-top: 20px;
+    padding: 0 23px;
+
+    .nitem {
+      font-size: 28px;
+      padding: 5px 10px;
+      border-radius: 10px;
+      margin: 0 5px;
+      border: 1px solid transparent;
+
+    }
+
+    .nitems {
+      font-size: 28px;
+      padding: 5px 10px;
+      border-radius: 10px;
+      margin: 0 5px;
+      color: #6190E8;
+      border: 1px solid #6190E8;
+
+    }
+
+  }
+
+  .list {
     padding: 20px 23px 52px 23px;
-    .item{
+
+    .item {
       border-radius: 6px;
       padding: 31px;
       background: #FFFFFF;
@@ -142,40 +193,46 @@
       margin-bottom: 17px;
       position: relative;
       overflow: hidden;
-      .revoke{
+
+      .revoke {
         position: absolute;
         top: 0;
         left: 0;
         right: 0;
         bottom: 0;
-        background: rgba(0,0,0,.7);
+        background: rgba(0, 0, 0, .7);
         z-index: 999;
         display: flex;
         flex-flow: row nowrap;
         align-items: center;
         justify-content: center;
-        .revokeImg{
+
+        .revokeImg {
           width: 250px;
           height: 250px;
         }
       }
-      .infor{
+
+      .infor {
         width: 100%;
         position: relative;
-        .title{
+
+        .title {
           display: flex;
           flex-flow: row nowrap;
           justify-content: space-between;
           align-items: center;
           padding-bottom: 20px;
-          .aname{
+
+          .aname {
             flex: 1;
             padding-right: 20px;
             font-weight: bolder;
             display: flex;
             flex-direction: row;
             align-items: center;
-            .aIcon{
+
+            .aIcon {
               background: #1E90FF;
               color: white;
               padding: 5px 8px;
@@ -184,18 +241,21 @@
               font-size: 25px;
             }
           }
-          .createTimes{
+
+          .createTimes {
             font-size: 20px;
             color: #999999;
             white-space: nowrap;
           }
         }
-        .userName{
+
+        .userName {
           font-size: 25px;
           color: #999999;
           padding-bottom: 15px;
         }
-        .releaseStarts{
+
+        .releaseStarts {
           font-size: 25px;
           color: #999999;
           padding-bottom: 15px;
@@ -204,7 +264,8 @@
           align-items: center;
           justify-content: space-between;
           position: relative;
-          .punchClock{
+
+          .punchClock {
             position: absolute;
             border-bottom-left-radius: 100px;
             border-top-left-radius: 100px;
@@ -218,7 +279,8 @@
             top: -10px;
           }
         }
-        .releaseEnds{
+
+        .releaseEnds {
           font-size: 25px;
           color: #999999;
           display: flex;
@@ -227,28 +289,33 @@
           justify-content: space-between;
           padding-bottom: 25px;
         }
-        .coOder{
+
+        .coOder {
           font-size: 25px;
           color: #6eb173;
           padding-bottom: 25px;
         }
-        .bottomContent{
+
+        .bottomContent {
           display: flex;
           flex-flow: row nowrap;
           justify-content: space-between;
           align-items: center;
-          .status{
+
+          .status {
             font-size: 28px;
           }
-          .clockIn{
+
+          .clockIn {
             font-size: 28px;
           }
         }
       }
     }
   }
+
   .skeleton {
     border-radius: 11px;
     margin-bottom: 20px;
   }
-}
+}

+ 2 - 2
src/pages/punchClock/punchClocks.jsx

@@ -498,7 +498,7 @@ class PunchClocks extends Component {
                         isAbnormalOpen: true
                       })
                     }}
-                  >{(dtails.clockIn === 1 && dtails.clockIn === 2) ? "刷新打卡" : "异常打卡"}</View>
+                  >{(dtails.clockIn === 1 || dtails.clockIn === 2) ? "刷新打卡" : "异常打卡"}</View>
                 }
                 <View className='punchClockContent'
                   onClick={() => {
@@ -542,7 +542,7 @@ class PunchClocks extends Component {
                   }}>
                   <View className='punchClockTitle'>
                     {
-                      (dtails.clockIn === 1 && dtails.clockIn === 2) ?
+                      (dtails.clockIn === 1 || dtails.clockIn === 2) ?
                         '刷新打卡' : '公出打卡'
                     }
                   </View>

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

@@ -113,3 +113,13 @@ export const test = (postData = {}) => {
 export const techReject = (postData = {}) => {
   return HTTPREQUEST.post('/api/admin/release/techReject', postData)
 }
+
+//新增协单助力
+export const addAssistant = (postData = {}) => {
+  return HTTPREQUEST.post('/api/admin/release/addAssistant', postData)
+}
+
+//删除协单助力
+export const deleteAssistant = (postData = {}) => {
+  return HTTPREQUEST.post('/api/admin/release/deleteAssistant', postData)
+}