dev01 2 年之前
父节点
当前提交
f0bbf45633

+ 7 - 3
src/pages/egressDetails/index.jsx

@@ -57,6 +57,7 @@ class EgressDetails extends Component {
       selectArrderLocation: {},
       current: "",
       isNo: true,
+      foc: false,
     };
     this.examinePublicRelease = this.examinePublicRelease.bind(this);
     this.getReleasetDails = this.getReleasetDails.bind(this);
@@ -333,7 +334,8 @@ class EgressDetails extends Component {
                     ? Rejected : dtails.status === 1
                       ? Reviewed : dtails.status === 2
                         ? Passed : dtails.status === 3
-                          ? Revoke : ""
+                          ? Revoke : dtails.status === 4
+                            ? Rejected : ""
                 }
                 className="startIcon"
               />
@@ -354,8 +356,9 @@ class EgressDetails extends Component {
                   <View
                     className="edit"
                     onClick={() => {
+                      Taro.pageScrollTo({ selector: "#reasons" })
                       this.setState({
-                        isModifyOpened: true,
+                        foc: true,
                       });
                     }}
                   >
@@ -548,10 +551,11 @@ class EgressDetails extends Component {
               </View>
             ) : null}
             {dtails.permission === 0 && dtails.status !== 3 && dtails.type !== 3 ? (
-              <View className="item">
+              <View className="item" id={"reasons"}>
                 <View className="title">修改/撤销</View>
                 <AtTextarea
                   value={this.state.reasonsInvalidation}
+                  focus={this.state.foc}
                   onChange={(value) => {
                     this.setState({
                       reasonsInvalidation: value,

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

@@ -213,7 +213,7 @@
   position: absolute;
   border-bottom-left-radius: 100px;
   border-top-left-radius: 100px;
-  padding: 20px 30px;
+  padding: 20px;
   background: #f1662f;
   color: white;
   display: flex;

+ 6 - 5
src/pages/examine/index.jsx

@@ -249,7 +249,7 @@ class Examine extends Component {
               <View className='searchItem' >
                 <Picker
                   value={this.state.clockInStarts}
-                  range={['未打卡', '已打卡']}
+                  range={['未打卡', '已打卡', '异常打卡']}
                   mode='selector'
                   onChange={(e) => {
                     this.setState({
@@ -267,9 +267,10 @@ class Examine extends Component {
                       <View className='shortValuecontent'>
                         <View className='selectValue'>
                           {
-                            this.state.clockInStarts === '1'
-                              ? '已打卡' : this.state.clockInStarts === '0'
-                                ? '未打卡' : ''
+                            this.state.clockInStarts === '2'
+                              ? '异常打卡' : this.state.clockInStarts === '1'
+                                ? '已打卡' : this.state.clockInStarts === '0'
+                                  ? '未打卡' : ''
                           }
                         </View>
                         <View className='iconContent' />
@@ -369,6 +370,7 @@ class Examine extends Component {
           tabList={this.state.typeList}
           onClick={(current) => {
             this.setState({
+              list: [],
               pageNo: 1,
               current,
             }, () => {
@@ -378,7 +380,6 @@ class Examine extends Component {
           {
             this.state.typeList?.map((item, index) =>
               <AtTabsPane
-                key={item.type}
                 current={this.state.current}
                 index={index}
               >

+ 102 - 47
src/pages/examine/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,22 @@
         }
       }
     }
-    .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{
+
+  .list {
     padding: 20px 23px 52px 23px;
-    .item{
+
+    .item {
       border-radius: 6px;
       padding: 31px;
       background: #FFFFFF;
@@ -142,40 +165,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 +213,37 @@
               font-size: 25px;
             }
           }
-          .createTimes{
+
+          .createTimes {
             font-size: 20px;
             color: #999999;
             white-space: nowrap;
           }
         }
-        .userName{
+
+        .userName {
+          width: 540px;
           font-size: 25px;
           color: #999999;
           padding-bottom: 15px;
+          overflow: hidden;
+          white-space: nowrap;
+          text-overflow: ellipsis;
+
+          .reject {
+            position: absolute;
+            right: -31px;
+            top: 60px;
+            border-bottom-left-radius: 100px;
+            border-top-left-radius: 100px;
+            padding: 20px 20px;
+            color: white;
+            background: rgba(22, 155, 213, 1);
+          }
+
         }
-        .releaseStarts{
+
+        .releaseStarts {
           font-size: 25px;
           color: #999999;
           padding-bottom: 15px;
@@ -204,11 +252,12 @@
           align-items: center;
           justify-content: space-between;
           position: relative;
-          .punchClock{
+
+          .punchClock {
             position: absolute;
             border-bottom-left-radius: 100px;
             border-top-left-radius: 100px;
-            padding: 20px 30px;
+            padding: 20px 20px;
             background: #f1662f;
             color: white;
             display: flex;
@@ -218,7 +267,8 @@
             top: -10px;
           }
         }
-        .releaseEnds{
+
+        .releaseEnds {
           font-size: 25px;
           color: #999999;
           display: flex;
@@ -227,28 +277,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;
   }
-}
+}

+ 31 - 29
src/pages/examine/myList.jsx

@@ -1,13 +1,10 @@
 import React, { Component } from "react";
 import Taro from "@tarojs/taro";
-import { View, Image } from "@tarojs/components";
+import { View, Image, Button } from "@tarojs/components";
 import Skeleton from "taro-skeleton";
 import { getClockState } from "../../utils/tools";
-
 import ListBottomStart from "../../components/common/listBottomStart";
-
 import RevokeWhite from "../../image/revokeWhite.png";
-
 import "./index.less";
 
 class MyList extends Component {
@@ -17,15 +14,17 @@ class MyList extends Component {
 
   render() {
     let seeView = this.props.seeView;
+    const { title } = this.props
     return (
       <View className="indexPage">
         <View className="list">
-          {this.props.list.length === 0 && this.props.listState === "LOADING"
-            ? this.props.typelist?.map((v) => (
+          {
+            this.props.list.length === 0 && this.props.listState === "LOADING" &&
+            this.props.typelist?.map((v) => (
               <Skeleton key={v} title row={3} avatarShape="square" loading />
             ))
-            : null}
-          {this.props.list.map((v, k) => (
+          }
+          {this.props.list.length > 0 && this.props.list?.map((v, k) => (
             <View
               key={k}
               className="item"
@@ -35,11 +34,10 @@ class MyList extends Component {
                 });
               }}
             >
-              {v.status === 3 ? (
+              {v.status === 3 &&
                 <View className="revoke">
                   <Image src={RevokeWhite} className="revokeImg" />
-                </View>
-              ) : null}
+                </View>}
               <View className="infor">
                 <View className="title">
                   <View className="aname">
@@ -49,12 +47,22 @@ class MyList extends Component {
                   <View className="createTimes">{v.createTimes}</View>
                 </View>
                 <View className="userName">
-                  公出企业:
-                  {v.nickname}
+                  公出企业:{v.nickname}
+                  {
+                    (title == "我的协单" && v.status !== 3) &&
+                    <View
+                      className="reject"
+                      onClick={e => {
+                        e.stopPropagation();
+                        this.props.opens(v.id)
+                      }}
+                    >
+                      驳回协单
+                    </View>
+                  }
                 </View>
                 <View className="userName">
-                  公出地点:
-                  {v.userName}
+                  公出地点:{v.userName}
                 </View>
                 <View className="releaseStarts">
                   开始时间:{v.releaseStarts}
@@ -73,7 +81,9 @@ class MyList extends Component {
                     </View>
                   ) : null}
                 </View>
-                <View className="releaseEnds">结束时间:{v.releaseEnds}</View>
+                <View className="releaseEnds">
+                  结束时间:{v.releaseEnds}
+                </View>
                 {
                   v.assistAidName != null && v.assistAidName != "" &&
                   <View className="coOder">
@@ -81,22 +91,14 @@ class MyList extends Component {
                   </View>
                 }
                 <View className="bottomContent">
-                  {v.clockIn === 1 ? (
-                    <View className="clockIn" style={{ color: "#6eb173" }}>
-                      已打卡
-                    </View>
-                  ) : (
-                    <View className="clockIn" style={{ color: "#dbc037" }}>
-                      未打卡
-                    </View>
-                  )}
+                  <View className="clockIn"
+                    style={{ color: ['red', "#6eb173", '#dbc037'][v.clockIn] }}
+                  >{['未打卡', '已打卡', '异常打卡'][v.clockIn]}</View>
                   <View
                     className="status"
-                    style={{
-                      color: getClockState(v.status).color,
-                    }}
+                    style={{ color: getClockState(v.status).color, }}
                   >
-                    {getClockState(v.status).title}
+                    {!!v.rejectName && v.rejectName}{getClockState(v.status).title}
                   </View>
                 </View>
               </View>

+ 78 - 12
src/pages/mybusiness/index.jsx

@@ -1,15 +1,17 @@
 import React, { Component } from 'react';
 import Taro from '@tarojs/taro';
-import { View, Picker, ScrollView } from '@tarojs/components'
-import { getPublicReleaseList } from '../../utils/servers/servers';
+import { View, Picker, ScrollView, Button } from '@tarojs/components'
+import { getPublicReleaseList, techReject } from '../../utils/servers/servers';
 import dayjs from 'dayjs';
 import {
   AtSearchBar,
   AtTabs,
   AtTabsPane,
-  AtList,
-  AtListItem,
-  AtIcon
+  AtIcon,
+  AtModal,
+  AtModalContent,
+  AtModalAction,
+  AtTextarea
 } from 'taro-ui';
 import { clockState } from '../../utils/tools/config';
 
@@ -21,6 +23,7 @@ import "taro-ui/dist/style/components/action-sheet.scss";
 import "taro-ui/dist/style/components/icon.scss";
 import "taro-ui/dist/style/components/list.scss";
 import "taro-ui/dist/style/components/icon.scss";
+import "taro-ui/dist/style/components/modal.scss";
 
 import MyList from '../examine/myList';
 import MessageNoticebar from "../../components/common/messageNoticebar";
@@ -46,6 +49,10 @@ class Examine extends Component {
       rangeStartVal: '',
       rangeEndMinuteVal: '',
       rangeStartMinuteVal: '',
+
+      id: "",
+      rmk: "",
+      isOpen: false,
     }
     this.getPublicReleaseList = this.getPublicReleaseList.bind(this);
     this.getMyList = this.getMyList.bind(this);
@@ -137,7 +144,8 @@ class Examine extends Component {
           listState: 'NO_DATA'
         })
       } else if (msg.data.totalCount === this.state.list.length && pageNo !== 1) {
-        Taro.showToast({ title: '没有更多数据了', icon: 'none' });
+        // 防止提示挡住驳回弹窗
+        !this.state.isOpen && Taro.showToast({ title: '没有更多数据了', icon: 'none' });
         this.setState({
           listState: 'NO_MORE_DATA'
         })
@@ -174,6 +182,35 @@ class Examine extends Component {
     }
   }
 
+  submit() {
+    if (!this.state.rmk) {
+      Taro.showToast({ title: '请填写备注!', icon: 'none' });
+      return
+    }
+    Taro.showLoading({ title: '正在提交...' });
+    techReject({
+      id: this.state.id,
+      remarks: this.state.rmk,
+    }).then(v => {
+      Taro.hideLoading()
+      if (v.error.length === 0) {
+        Taro.showToast({ title: '提交成功', icon: 'none' });
+        this.getPublicReleaseList();
+        this.setState({
+          isOpen: false,
+        })
+      } else {
+        Taro.showToast({ title: v.error[0].message, icon: 'none' })
+      }
+    }).catch(() => {
+      Taro.hideLoading()
+      Taro.showToast({
+        title: '系统错误,请稍后再试',
+        icon: 'none'
+      })
+    })
+  }
+
   render() {
     return (
       <View className='indexPage' >
@@ -246,7 +283,7 @@ class Examine extends Component {
               <View className='searchItem' >
                 <Picker
                   value={this.state.clockInStarts}
-                  range={['未打卡', '已打卡']}
+                  range={['未打卡', '已打卡', '异常打卡']}
                   mode='selector'
                   onChange={(e) => {
                     this.setState({
@@ -264,9 +301,10 @@ class Examine extends Component {
                       <View className='shortValuecontent'>
                         <View className='selectValue'>
                           {
-                            this.state.clockInStarts === '1'
-                              ? '已打卡' : this.state.clockInStarts === '0'
-                                ? '未打卡' : ''
+                            this.state.clockInStarts === '2'
+                              ? '异常打卡' : this.state.clockInStarts === '1'
+                                ? '已打卡' : this.state.clockInStarts === '0'
+                                  ? '未打卡' : ''
                           }
                         </View>
                         <View className='iconContent' />
@@ -366,6 +404,7 @@ class Examine extends Component {
           tabList={this.state.typeList}
           onClick={(current) => {
             this.setState({
+              list: [],
               pageNo: 1,
               current,
             }, () => {
@@ -375,23 +414,50 @@ class Examine extends Component {
           {
             this.state.typeList?.map((item, index) =>
               <AtTabsPane
-                key={item.title}
                 current={this.state.current}
                 index={index}
               >
                 <MyList
                   type={0}
+                  title={item.title}
                   typelist={this.state.typeList}
                   seeView={this.state.current}
                   list={this.state.list}
                   listState={this.state.listState}
                   onRefresh={() => {
                     this.getPublicReleaseList(true);
-                  }} />
+                  }}
+                  opens={e => {
+                    this.setState({
+                      id: e,
+                      isOpen: true,
+                    })
+                  }}
+                />
               </AtTabsPane>
             )
           }
         </AtTabs>
+        {/* 驳回协单 */}
+        <AtModal
+          style={{ position: 'fixed' }}
+          isOpened={this.state.isOpen}
+        >
+          <AtModalContent>
+            <AtTextarea
+              value={this.state.rmk}
+              onChange={e => {
+                this.setState({ rmk: e })
+              }}
+              maxLength={200}
+              placeholder='请填写备注~'
+            />
+          </AtModalContent>
+          <AtModalAction>
+            <Button type='secondary' onClick={() => { this.setState({ isOpen: false }) }}>取消</Button>
+            <Button type='primary' onClick={this.submit.bind(this)}>提交</Button>
+          </AtModalAction>
+        </AtModal>
       </View>
     )
   }

+ 1 - 1
src/pages/mybusiness/index.less

@@ -208,7 +208,7 @@
             position: absolute;
             border-bottom-left-radius: 100px;
             border-top-left-radius: 100px;
-            padding: 20px 30px;
+            padding: 20px;
             background: #f1662f;
             color: white;
             display: flex;

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

@@ -2,7 +2,7 @@ import React, { Component } from 'react'
 import { connect } from 'react-redux'
 import { Map, OpenData, View, Image, Text, Button } from '@tarojs/components'
 import Taro from '@tarojs/taro';
-import { AtIcon, AtModal, AtModalContent, AtModalAction, AtTextarea, AtButton } from "taro-ui";
+import { AtIcon, AtModal, AtModalContent, AtModalAction, AtTextarea } from "taro-ui";
 import dayjs from 'dayjs';
 import Skeleton from 'taro-skeleton'
 
@@ -484,7 +484,7 @@ class PunchClocks extends Component {
                 </View>
                 {
                   // dtails.type == 3 &&
-                  false &&
+                  // false &&
                   <View
                     className="photographUnusual"
                     onClick={() => {

+ 3 - 0
src/utils/config.js

@@ -1,4 +1,7 @@
+//
 // export const resourceAddress = 'http://172.16.0.255:3000/upload;'
+// 生产
 // export const resourceAddress = 'https://s.jishutao.com/upload';
+// 测试
 export const resourceAddress = 'https://static.jishutao.com/upload';
 

+ 1 - 1
src/utils/servers/baseUrl.js

@@ -4,7 +4,7 @@ const getBaseUrl = (url) => {
     // 开发环境 - 根据请求不同返回不同的BASE_URL
     // BASE_URL = 'http://172.16.0.255:8080'
     // BASE_URL = 'https://uat.jishutao.com'
-    // BASE_URL = 'https://bm.jishutao.com'
+    BASE_URL = 'https://bm.jishutao.com'
   } else {
     // 生产环境
     // BASE_URL = 'http://172.16.0.255:8080'

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

@@ -108,3 +108,8 @@ export const getWxConfig = (postData = {}) => {
 export const test = (postData = {}) => {
   return HTTPREQUEST.get('/open/getVCode', postData)
 }
+
+//技术协单驳回
+export const techReject = (postData = {}) => {
+  return HTTPREQUEST.post('/api/admin/release/techReject', postData)
+}

+ 5 - 0
src/utils/tools/config.js

@@ -20,6 +20,11 @@ export const clockState = [
     id:3,
     color:'#242424'
   },
+  {
+    title:'技术驳回',
+    id:4,
+    color:'#f31212'
+  },
 ];
 
 //申请日志状态