dev01 2 роки тому
батько
коміт
38d3455189
61 змінених файлів з 2398 додано та 8976 видалено
  1. 1 1
      README.md
  2. 2 2
      package.json
  3. 2 2
      project.config.json
  4. 7 0
      project.private.config.json
  5. 2 2
      project.tt.json
  6. 13 39
      src/app.config.js
  7. 12 15
      src/app.jsx
  8. 38 38
      src/components/common/listBottomStart/index.jsx
  9. 0 171
      src/components/common/messageNoticebar/index.jsx
  10. 0 84
      src/components/common/messageNoticebar/index.less
  11. 11 10
      src/components/common/userFloatingLayer/index.jsx
  12. 0 427
      src/pages/applyDepart/enterprise.jsx
  13. 0 22
      src/pages/applyDepart/enterprise.less
  14. 0 194
      src/pages/applyDepart/index.jsx
  15. 0 65
      src/pages/applyDepart/index.less
  16. 0 742
      src/pages/applyDepart/publicContent.jsx
  17. 0 147
      src/pages/applyDepart/publicContent.less
  18. 0 87
      src/pages/applyDepart/result.jsx
  19. 0 5
      src/pages/applyReimbursement/index.config.js
  20. 71 58
      src/pages/applyReimbursement/index.jsx
  21. 114 0
      src/pages/applyReimbursement/select.jsx
  22. 0 498
      src/pages/applyReimbursement/submitform.jsx
  23. 0 152
      src/pages/applyReimbursement/submitform.less
  24. 1 1
      src/pages/applyDepart/index.config.js
  25. 531 0
      src/pages/drafts/index.jsx
  26. 355 0
      src/pages/drafts/index.less
  27. 294 0
      src/pages/drafts/modal.jsx
  28. 0 459
      src/pages/egressDetails/enterprise.jsx
  29. 0 232
      src/pages/egressDetails/index.css
  30. 0 863
      src/pages/egressDetails/index.jsx
  31. 0 289
      src/pages/egressDetails/index.less
  32. 0 216
      src/pages/egressDetails/modify.jsx
  33. 0 1028
      src/pages/egressDetails/publicContent.jsx
  34. 0 122
      src/pages/egressDetails/publicContent.less
  35. 0 8
      src/pages/examine/index.config.js
  36. 0 251
      src/pages/examine/index.css
  37. 0 475
      src/pages/examine/index.jsx
  38. 0 336
      src/pages/examine/index.less
  39. 119 119
      src/pages/login/index.jsx
  40. 1 1
      src/pages/mybusiness/index.config.js
  41. 9 218
      src/pages/mybusiness/index.jsx
  42. 15 13
      src/pages/mybusiness/index.less
  43. 62 62
      src/pages/examine/myList.jsx
  44. 1 1
      src/pages/myinfo/index.config.js
  45. 1 1
      src/pages/myinfo/index.jsx
  46. 0 3
      src/pages/punchClock/index.config.js
  47. 0 111
      src/pages/punchClock/index.jsx
  48. 0 344
      src/pages/punchClock/index.less
  49. 0 797
      src/pages/punchClock/punchClocks.jsx
  50. 3 1
      src/pages/egressDetails/index.config.js
  51. 282 0
      src/pages/recordlist/index.jsx
  52. 168 0
      src/pages/recordlist/index.less
  53. 0 3
      src/pages/staffDistribution/index.config.js
  54. 0 47
      src/pages/staffDistribution/index.jsx
  55. 0 1
      src/pages/staffDistribution/index.less
  56. 10 7
      src/utils/servers/interceptors.js
  57. 35 74
      src/utils/servers/servers.js
  58. 87 33
      src/utils/tools/config.js
  59. 61 97
      src/utils/tools/index.js
  60. 1 1
      yarn-error.log
  61. 89 1
      yarn.lock

+ 1 - 1
README.md

@@ -1,3 +1,3 @@
 # kede-tool-weapp
 
-科德工具小程序
+科德研发服务流程管理系统

+ 2 - 2
package.json

@@ -2,13 +2,12 @@
   "name": "kede-tool-weapp",
   "version": "1.0.0",
   "private": true,
-  "description": "科德工具小程序",
+  "description": "科德研发服务流程管理系统小程序",
   "templateInfo": {
     "name": "redux",
     "typescript": false,
     "css": "less"
   },
-  
   "scripts": {
     "build:weapp": "taro build --type weapp",
     "build:swan": "taro build --type swan",
@@ -37,6 +36,7 @@
   "author": "",
   "license": "MIT",
   "dependencies": {
+    "@babel/helper-create-regexp-features-plugin": "^7.21.0",
     "@babel/runtime": "^7.7.7",
     "@tarojs/components": "3.1.4",
     "@tarojs/react": "3.1.4",

+ 2 - 2
project.config.json

@@ -1,8 +1,8 @@
 {
     "miniprogramRoot": "dist/",
-    "projectname": "kede-tool-weapp",
+    "projectname": "kede-bill-weapp",
     "description": "项目配置文件,详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
-    "appid": "wxff2f5720ed7d7f63",
+    "appid": "wx4f6bec93d9863623",
     "setting": {
         "urlCheck": false,
         "es6": false,

+ 7 - 0
project.private.config.json

@@ -0,0 +1,7 @@
+{
+    "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
+    "projectname": "kede-bill-weapp",
+    "setting": {
+        "compileHotReLoad": false
+    }
+}

+ 2 - 2
project.tt.json

@@ -1,7 +1,7 @@
 {
   "miniprogramRoot": "./",
-  "projectname": "kede-tool-weapp",
-  "description": "科德工具小程序",
+  "projectname": "kede-bill-weapp",
+  "description": "科德研发服务流程管理系统",
   "appid": "touristappid",
   "setting": {
     "urlCheck": true,

+ 13 - 39
src/app.config.js

@@ -1,46 +1,37 @@
 export default {
   pages: [
-    // 'pages/staffDistribution/index',//员工分布
-    'pages/punchClock/index',//打卡
-    'pages/examine/index',//审核
-    'pages/egressDetails/index',//公出详情
+    'pages/mybusiness/index', // 我的公出
     'pages/login/index',//登录
-    'pages/applyDepart/index',//申请公出
-    'pages/mybusiness/index',//我的
     'pages/applyReimbursement/index',// 申请报销
+    'pages/drafts/index', // 报销提交
     'pages/myinfo/index', // 我的账户
+    'pages/recordlist/index', // 报销记录
   ],
   tabBar: {
     list: [
       {
-        iconPath: './image/punchClockUnSelect.png',
-        selectedIconPath: './image/punchClockSelect.png',
-        pagePath: 'pages/punchClock/index',
-        text: '打卡'
+        iconPath: './image/my.png',
+        selectedIconPath: './image/myselect.png',
+        pagePath: 'pages/mybusiness/index',
+        text: '列表'
       },
       {
         iconPath: './image/egressUnSelect.png',
-        selectedIconPath: './image/egressSelect.png',
-        pagePath: 'pages/applyDepart/index',
-        text: '申请公出'
-      },
-      {
-        iconPath: './image/examineUnSelect.png',
-        selectedIconPath: './image/examineSelect.png',
-        pagePath: 'pages/examine/index',
-        text: '审核'
+        selectedIconPath: './image/egressUnSelect.png',
+        pagePath: 'pages/applyReimbursement/index',
+        text: '申请报销'
       },
       {
         iconPath: './image/my.png',
         selectedIconPath: './image/myselect.png',
-        pagePath: 'pages/mybusiness/index',
-        text: '我的'
+        pagePath: 'pages/recordlist/index',
+        text: '报销记录'
       },
       {
         iconPath: './image/my.png',
         selectedIconPath: './image/myselect.png',
         pagePath: 'pages/myinfo/index',
-        text: '申请报销'
+        text: '我的'
       },
     ],
     'color': '#515151',
@@ -54,22 +45,5 @@ export default {
     navigationBarTitleText: 'WeChat',
     navigationBarTextStyle: 'black',
   },
-  requiredBackgroundModes: ['location'],
-  requiredPrivateInfos: [
-    "getLocation",
-    "onLocationChange",
-    "startLocationUpdate",
-  ],
-  plugins: {
-    chooseLocation: {
-      version: "1.0.10",
-      provider: "wx76a9a06e5b4e693e"
-    },
-  },
-  permission: {
-    "scope.userLocation": {
-      desc: "你的位置信息将用于小程序定位"
-    }
-  },
   "lazyCodeLoading": "requiredComponents"
 }

+ 12 - 15
src/app.jsx

@@ -22,7 +22,6 @@ class App extends Component {
     updateManager.onCheckForUpdate(function (res) {
       // 请求完新版本信息的回调
       //console.log('请求完新版本信息的回调')
-      console.log(res.hasUpdate);
     })
 
     updateManager.onUpdateReady(function () {
@@ -31,7 +30,6 @@ class App extends Component {
         content: '新版本已经准备好,是否重启应用?',
         success(res) {
           if (res.confirm) {
-            console.log("go")
             // 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
             updateManager.applyUpdate()
           }
@@ -41,28 +39,27 @@ class App extends Component {
 
     updateManager.onUpdateFailed(function () {
       // 新版本下载失败
-      console.log('新版本下载失败')
       // errorReport(ERROREVENTS.VERSION_UPGRADE_FAILED, '新版本下载失败');
     })
 
   }
 
   componentDidShow() {
-    Taro.eventCenter.on('getStorageSync', () => {
-      let token = Taro.getStorageSync('token');
-      if (token) {
-        this.getStorageSync();
-      }
-    })
-    let token = Taro.getStorageSync('token');
-    if (token) {
-      this.getStorageSync();
-    }
-    this.getWxConfig();
+    // Taro.eventCenter.on('getStorageSync', () => {
+    //   let token = Taro.getStorageSync('token');
+    //   if (token) {
+    //     this.getStorageSync();
+    //   }
+    // })
+    // let token = Taro.getStorageSync('token');
+    // if (token) {
+    //   this.getStorageSync();
+    // }
+    // this.getWxConfig();
   }
 
   componentDidHide() {
-    Taro.closeSocket();
+    // Taro.closeSocket();
   }
 
   getWxConfig() {

+ 38 - 38
src/components/common/listBottomStart/index.jsx

@@ -1,6 +1,6 @@
-import React,{Component} from 'react';
-import {Image, View} from '@tarojs/components';
-import {AtActivityIndicator, AtPagination} from 'taro-ui';
+import React, { Component } from 'react';
+import { Image, View } from '@tarojs/components';
+import { AtActivityIndicator, AtPagination } from 'taro-ui';
 import 'taro-ui/dist/style/components/icon.scss';
 import 'taro-ui/dist/style/components/divider.scss';
 import 'taro-ui/dist/style/components/icon.scss';
@@ -14,7 +14,7 @@ import 'taro-ui/dist/style/components/pagination.scss';
 import 'taro-ui/dist/style/components/button.scss';
 import 'taro-ui/dist/style/components/icon.scss';
 
-class ListBottomStart extends Component{
+class ListBottomStart extends Component {
   constructor(props) {
     super(props);
   }
@@ -24,51 +24,51 @@ class ListBottomStart extends Component{
     return (
       this.props.type === 'pagination' ? <View className='listBottomStartComponent'>
         {
-        state === 'RELOAD' ?
-          <View className='reload'>
-            <View>加载失败</View>
-            <View className='operation' onClick={()=>{
-              this.props.reload && this.props.reload();
-            }}>点击重新加载</View>
-          </View>:
-          state === 'NO_DATA' ?
-            <View className='noData'>
-              <Image src={noData} className='noDataImg'/>
-              <View className='noDataTitle'>暂时没有数据</View>
-            </View>
-            : <AtPagination
+          state === 'RELOAD' ?
+            <View className='reload'>
+              <View>加载失败</View>
+              <View className='operation' onClick={() => {
+                this.props.reload && this.props.reload();
+              }}>点击重新加载</View>
+            </View> :
+            state === 'NO_DATA' ?
+              <View className='noData'>
+                <Image src={noData} className='noDataImg' />
+                <View className='noDataTitle'>暂时没有数据</View>
+              </View>
+              : <AtPagination
                 icon
                 total={this.props.total}
                 pageSize={this.props.pageSize}
                 current={this.props.current}
-                onPageChange={v=>{
+                onPageChange={v => {
                   this.props.onPageChange(v.type, v.current)
                 }}
-            />
+              />
         }
-      </View> :<View className='listBottomStartComponent'>
+      </View> : <View className='listBottomStartComponent'>
         {
           state === 'NO_MORE_DATA' ?
             <View className='noMoreData'>
               没有更多了
-            </View>:
-          state === 'RELOAD' ?
-            <View className='reload'>
-              <View>加载失败</View>
-              <View className='operation' onClick={()=>{
-                this.props.reload && this.props.reload();
-              }}>点击重新加载</View>
-            </View>:
-            state === 'LOADING' ?
-              <View>
-                <AtActivityIndicator content='加载中...'/>
-              </View>:
-              state === 'NO_DATA' ?
-                <View className='noData'>
-                  <Image src={noData} className='noDataImg'/>
-                  <View className='noDataTitle'>暂时没有数据</View>
-                </View>
-            : null
+            </View> :
+            state === 'RELOAD' ?
+              <View className='reload'>
+                <View>加载失败</View>
+                <View className='operation' onClick={() => {
+                  this.props.reload && this.props.reload();
+                }}>点击重新加载</View>
+              </View> :
+              state === 'LOADING' ?
+                <View>
+                  <AtActivityIndicator content='加载中...' />
+                </View> :
+                state === 'NO_DATA' ?
+                  <View className='noData'>
+                    <Image src={noData} className='noDataImg' />
+                    <View className='noDataTitle'>暂时没有数据</View>
+                  </View>
+                  : null
         }
       </View>
     )

+ 0 - 171
src/components/common/messageNoticebar/index.jsx

@@ -1,171 +0,0 @@
-import React, { Component } from "react";
-import { View, Text, ScrollView } from '@tarojs/components'
-import Taro from '@tarojs/taro';
-import { AtNoticebar } from 'taro-ui'
-import './index.less';
-import { getPublicReleaseUnread } from '../../../utils/servers/servers';
-
-import "taro-ui/dist/style/components/icon.scss";
-import "taro-ui/dist/style/components/noticebar.scss";
-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 {
-  constructor(props) {
-    super(props);
-    this.state = {
-      animationData: {},
-      isOpend: false,
-      isOpened: false,
-      str: '',
-      list: []
-    }
-    this.onClose = this.onClose.bind(this);
-    this.getPublicReleaseUnread = this.getPublicReleaseUnread.bind(this);
-    this.close = this.close.bind(this);
-    this.onGotoMore = this.onGotoMore.bind(this);
-  }
-
-  componentWillMount() {
-    let animation = Taro.createAnimation({
-      duration: 1000,
-      timingFunction: 'ease',
-    })
-
-    this.animation = animation
-
-    this.setState({
-      animation: animation.export()
-    })
-
-
-    Taro.eventCenter.on('GoPuncsshIn', (data) => {
-      if (data.data === 'unread') {
-        this.getPublicReleaseUnread();
-      }
-    })
-
-    Taro.eventCenter.on('closeMessageNoticebar', () => {
-      this.close();
-    })
-
-    Taro.eventCenter.on('getMessageNoticebar', (data) => {
-      this.setState({
-        str: data.str,
-        list: data.list
-      }, () => {
-        this.animation.opacity(1).step()
-        this.setState({
-          animation: this.animation.export(),
-          isOpend: true
-        })
-      })
-    })
-  }
-
-  onClose() {
-    Taro.eventCenter.trigger('closeMessageNoticebar');
-  }
-
-  close() {
-    this.animation.opacity(0).step()
-    this.setState({
-      animation: this.animation.export(),
-      isOpend: false,
-      str: '',
-      list: [],
-    })
-  }
-
-  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'
-        }
-        Taro.eventCenter.trigger('getMessageNoticebar', {
-          str,
-          list: this.state.isOpend ? [...this.state.list, ...v.data] : v.data
-        });
-      } else {
-        Taro.showToast({ title: v.error[0].message, icon: 'none' })
-      }
-    }).catch(() => {
-      Taro.showToast({
-        title: '系统错误,请稍后再试',
-        icon: 'none'
-      })
-    })
-  }
-
-  onGotoMore() {
-    this.setState({
-      isOpened: true
-    })
-  }
-
-  render() {
-    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> : null}
-        {this.state.isOpened ?
-          <View className='messageNoticebarContent'>
-            <View className='messageContent'>
-              <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>
-                        </View>
-                      </View>
-                    ))
-                  }
-                </View>
-              </ScrollView>
-              <View className='operation' onClick={() => {
-                this.setState({
-                  isOpened: false,
-                })
-              }}>
-                确定
-              </View>
-            </View>
-          </View> : null}
-      </View>
-    )
-  }
-}
-
-export default MessageNoticebar;

+ 0 - 84
src/components/common/messageNoticebar/index.less

@@ -1,84 +0,0 @@
-.messageNoticebar{
-  box-shadow: 1px 1px 14px -1px #767272;
-  position: fixed;
-  left: 0;
-  right: 0;
-  top: 0;
-  z-index: 99999;
-  opacity:0;
-  background: #FCF6ED;
-  .content{
-    display: flex;
-    flex-flow: row nowrap;
-    align-items: center;
-    position: relative;
-    .noticebar{
-      width: 60px;
-      text-align: right;
-      position: absolute;
-      z-index: 1;
-      right: 20px;
-    }
-  }
-  .messageNoticebarContent{
-    position: fixed;
-    top: 0;
-    left: 0;
-    right: 0;
-    bottom: 0;
-    background: rgba(0,0,0,.7);
-    display: flex;
-    align-items: center;
-    justify-content: center;
-    .messageContent{
-      margin: 0 35px;
-      width: calc(100vw - 70px);
-      background: #FFFFFF;
-      border-radius: 25px;
-      .title{
-        text-align: center;
-        font-size: 32px;
-        padding: 25px 0;
-        border-bottom: 1px #d4d1d1 solid;
-      }
-      .list{
-        padding: 25px 20px;
-        min-height: 120px;
-        max-height: 700px;
-        .item{
-          padding-bottom: 20px;
-          border-bottom: 1px #e0dede solid;
-          margin-bottom: 30px;
-          .itemHead{
-            .content{
-              font-size: 25px;
-              font-weight: bolder;
-            }
-          }
-          .itemBottom{
-            display: flex;
-            flex-flow: row nowrap;
-            align-items: center;
-            justify-content: space-between;
-            font-size: 20px;
-            padding-top: 25px;
-            .noticeTypeName{
-
-            }
-            .createTimeFormattedDate{
-
-            }
-          }
-        }
-      }
-      .operation{
-        padding: 25px;
-        font-size: 28px;
-        border-top: 1px #d4d1d1 solid;
-        display: flex;
-        justify-content: center;
-        text-align: center;
-      }
-    }
-  }
-}

+ 11 - 10
src/components/common/userFloatingLayer/index.jsx

@@ -1,5 +1,5 @@
-import React,{Component} from 'react';
-import {Button, View,OpenData} from '@tarojs/components'
+import React, { Component } from 'react';
+import { Button, View, OpenData } from '@tarojs/components'
 import Taro from '@tarojs/taro';
 import { AtIcon } from 'taro-ui'
 
@@ -7,11 +7,11 @@ import 'taro-ui/dist/style/components/icon.scss';
 
 import './index.less';
 
-class UserFloatingLayer extends Component{
+class UserFloatingLayer extends Component {
   constructor(props) {
     super(props);
-    this.state={
-      userInfor:{}
+    this.state = {
+      userInfor: {}
     }
   }
 
@@ -23,17 +23,18 @@ class UserFloatingLayer extends Component{
   }
 
   render() {
-    return(
+    return (
       <View className='userFloatingLayer'>
         <View className='userAvatarUrl'>
-          <OpenData type='userAvatarUrl'/>
+          <OpenData type='userAvatarUrl' />
         </View>
         <View className='userNickName'>
           {this.state.userInfor.name}
-          <View className='welcome' onClick={()=>{
-            Taro.setStorageSync("token", "");
+          <View className='welcome' onClick={() => {
+            // Taro.setStorageSync('token', "");
+            Taro.removeStorageSync('token')
             Taro.setStorageSync('userInfor', "");
-            Taro.closeSocket();
+            // Taro.closeSocket();
             Taro.reLaunch({
               url: '/pages/login/index'
             })

+ 0 - 427
src/pages/applyDepart/enterprise.jsx

@@ -1,427 +0,0 @@
-import React, { Component } from "react";
-import { View, Text, Icon } from "@tarojs/components";
-import { getUserByName, getOrderByUid } from "../../utils/servers/servers";
-import { AtSearchBar, AtListItem, AtButton, AtIcon } from "taro-ui";
-import "taro-ui/dist/style/components/search-bar.scss";
-import "taro-ui/dist/style/components/button.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 ListBottomStart from "../../components/common/listBottomStart";
-import "./enterprise.less";
-import Taro from "@tarojs/taro";
-
-class Enterprise extends Component {
-  constructor(props) {
-    super(props);
-    this.state = {
-      value: "",
-      list: [],
-      listState: "NO_DATA",
-      pageNo: 1,
-      listVisible: false,
-      listValue: {},
-      orderNo: [],
-      newList: [],
-      jsList: [],
-    };
-    this.onChange = this.onChange.bind(this);
-    this.getList = this.getList.bind(this);
-  }
-
-  componentDidMount() {
-    Taro.eventCenter.on("result", () => {
-      this.setState({
-        value: "",
-        list: [],
-        newList: [],
-        listState: "NO_DATA",
-        pageNo: 1,
-      });
-    });
-    Taro.eventCenter.on("applyDepartSearchList", () => {
-      this.getList(this.state.value, this.state.pageNo + 1);
-    });
-  }
-
-  onChange(value, lv = true) {
-    this.setState({
-      value,
-    });
-    if (value.length < 2 && !lv) {
-      Taro.showToast({ title: "最少输入两个字符", icon: "none" });
-      return;
-    }
-    if (value.length < 4 && lv) {
-      return;
-    }
-    this.getList(value);
-  }
-
-  getByUid(val) {
-    this.setState({
-      listState: "LOADING",
-    });
-    getOrderByUid({
-      uid: val.id,
-    }).then((msg) => {
-      if (msg.error.length === 0) {
-        let data = msg.data;
-        this.setState({
-          listState: "NO_MORE_DATA",
-          orderNo: data,
-        });
-      } else {
-        Taro.showToast({ title: msg.error[0].message, icon: "none" });
-        this.setState({
-          listState: msg.error[0].field === "403" ? "NO_DATA" : "RELOAD",
-        });
-      }
-    });
-  }
-
-  getList(value = this.state.value, pageNo = 1) {
-    this.setState({
-      listState: "LOADING",
-    });
-    getUserByName({
-      name: value,
-      type: 1,
-      pageNo: pageNo,
-      pageSize: 10,
-    })
-      .then((msg) => {
-        if (msg.error.length === 0) {
-          if (msg.data.totalCount === 0) {
-            this.setState({
-              listState: "NO_DATA",
-            });
-          } else if (
-            msg.data.totalCount === this.state.list.length &&
-            pageNo !== 1
-          ) {
-            Taro.showToast({ title: "没有更多数据了", icon: "none" });
-            this.setState({
-              listState: "NO_MORE_DATA",
-            });
-          } else {
-            if (
-              msg.data.totalCount ===
-              (pageNo === 1
-                ? msg.data.list
-                : this.state.list.concat(msg.data.list)
-              ).length
-            ) {
-              this.setState({
-                listState: "NO_MORE_DATA",
-              });
-            }
-          }
-          this.setState({
-            list:
-              pageNo === 1
-                ? msg.data.list
-                : this.state.list.concat(msg.data.list),
-            pageNo: msg.data.pageNo,
-          });
-        } else {
-          Taro.showToast({ title: msg.error[0].message, icon: "none" });
-          this.setState({
-            listState: msg.error[0].field === "403" ? "NO_DATA" : "RELOAD",
-          });
-        }
-      })
-      .catch(() => {
-        this.setState({
-          listState: "RELOAD",
-        });
-      });
-  }
-
-  render() {
-    return (
-      <>
-        <AtSearchBar
-          placeholder="请输入企业/渠道"
-          showActionButton
-          value={this.state.value}
-          onChange={this.onChange}
-          onActionClick={() => {
-            this.setState({
-              listVisible: false,
-            });
-            this.onChange(this.state.value, false);
-          }}
-          onConfirm={() => {
-            this.onChange(this.state.value, false);
-          }}
-          onClear={() => {
-            this.setState({
-              value: "",
-              list: [],
-              listState: "NO_DATA",
-              pageNo: 1,
-              listVisible: false,
-            });
-          }}
-        />
-        {/* 业务行政公出 */}
-        {
-          this.state.newList.length > 0 && this.props.type != 1 &&
-          <View className="slist">
-            <View style={{ fontSize: "30rpx" }}>本次公出列表</View>
-            {
-              this.state.newList.map((item, index) =>
-                <View className="slitems" key={index}>
-                  <Text>{index + 1}、{item.name}</Text>
-                  <AtIcon value='close' size='18'
-                    onClick={() => {
-                      let list = this.state.newList
-                      for (var i = 0; i < list.length; i++) {
-                        if (list[i].id == item.id) {
-                          list.splice(i, 1)
-                          this.setState({
-                            newList: list
-                          })
-                        }
-                      }
-                    }}
-                  />
-                </View>
-              )
-            }
-            <View className="slbt">
-              <AtButton size="small" type='primary'
-                onClick={() => {
-                  Taro.eventCenter.trigger("enterprise",
-                    {
-                      id: this.state.newList.map(obj => { return obj.id; }).join(","),
-                      name: this.state.newList.map(obj => { return obj.name; }).join(","),
-                      list: this.state.newList,
-                    }
-                  );
-                }}
-              >确定公出列表</AtButton>
-            </View>
-            <View className="cltips">增加企业:搜索增加更多企业,删除企业:点击“X”删除公出列表</View>
-          </View>
-        }
-        {/* 技术公出 */}
-        {
-          this.state.jsList.length > 0 && this.props.type == 1 &&
-          <View className="slist">
-            <View style={{ fontSize: "30rpx" }}>本次公出列表</View>
-            {
-              this.state.jsList.map((item, index) =>
-                <View className="slitems" key={index}>
-                  <Text>{index + 1}、{item.name}{!!item.contractNo && `(${item.contractNo})`}</Text>
-                  <AtIcon value='close' size='18'
-                    onClick={() => {
-                      let list = this.state.jsList
-                      for (var i = 0; i < list.length; i++) {
-                        if (list[i].id == item.id) {
-                          list.splice(i, 1)
-                          this.setState({
-                            jsList: list
-                          })
-                        }
-                      }
-                    }}
-                  />
-                </View>
-              )
-            }
-            <View className="slbt">
-              <AtButton size="small" type='primary'
-                onClick={() => {
-                  let contractNo = ""
-                  let orderNo = ""
-                  let select = 0
-                  for (var i = 0; i < this.state.jsList.length; i++) {
-                    if (!!this.state.jsList[i].contractNo) {
-                      contractNo = this.state.jsList[i].contractNo
-                      orderNo = this.state.jsList[i].orderNo
-                      select = 1
-                    }
-                  }
-                  if (select == 0) {
-                    Taro.showToast({
-                      title: "必须选择一个派单编号",
-                      icon: 'none'
-                    })
-                    return
-                  }
-
-                  Taro.eventCenter.trigger("enterprise",
-                    {
-                      id: this.state.jsList.map(obj => { return obj.id; }).join(","),
-                      name: this.state.jsList.map(obj => { return obj.name; }).join(","),
-                      contractNo,
-                      orderNo,
-                    }
-                  );
-                }}
-              >确定公出列表</AtButton>
-            </View>
-            <View className="cltips">增加企业:搜索增加更多企业,删除企业:点击“X”删除公出列表</View>
-          </View>
-        }
-
-        <View>
-          {this.props.type == 0 || this.props.type == 2
-            ? this.state.list.map((v, k) => (
-              <View key={k}>
-                <AtListItem
-                  title={v.name}
-                  arrow="right"
-                  iconInfo={{ size: 25, color: "#000000", value: "bookmark" }}
-                  onClick={() => {
-                    if (v.status == 2 && this.props.type == 0) {
-                      Taro.showToast({
-                        title: "请在“单位公共客户”中领取后,再次发起公出!",
-                        icon: 'none'
-                      })
-                      return
-                    }
-                    let list = this.state.newList
-                    for (var i = 0; i < list.length; i++) {
-                      if (list[i].id == v.id) {
-                        Taro.showToast({
-                          title: "该企业已在公出列表中",
-                          icon: 'none'
-                        })
-                        return
-                      }
-                    }
-                    list.push(v)
-                    this.setState({
-                      newList: list
-                    })
-                    // Taro.eventCenter.trigger("enterprise", v);
-                  }}
-                />
-              </View>
-            ))
-            : !this.state.listVisible
-              ? this.state.list.map((v, k) => (
-                <View key={k}>
-                  <AtListItem
-                    title={v.name}
-                    arrow="right"
-                    iconInfo={{ size: 25, color: "#000000", value: "bookmark" }}
-                    onClick={() => {
-                      let select = 0
-                      if (this.state.jsList.length == 0) {
-                        select = 0
-                      }
-                      for (var i = 0; i < this.state.jsList.length; i++) {
-                        if (!!this.state.jsList[i].contractNo) {
-                          select = 1
-                        }
-                      }
-                      if (select == 0) {
-                        this.setState({
-                          listVisible: true,
-                          listValue: v,
-                        });
-                        this.getByUid(v);
-                      } else {
-                        let list = this.state.jsList
-                        for (var i = 0; i < list.length; i++) {
-                          if (list[i].id == v.id) {
-                            Taro.showToast({
-                              title: "该企业已在公出列表中",
-                              icon: 'none'
-                            })
-                            return
-                          }
-                        }
-                        list.push(v)
-                        this.setState({
-                          jsList: list
-                        })
-                      }
-
-                    }}
-                  />
-                </View>
-              ))
-              : ""}
-          {this.state.listVisible && this.props.type == 1 ? (
-            <View>
-              <AtListItem
-                title={this.state.listValue.name}
-                arrow="right"
-                iconInfo={{ size: 25, color: "#000000", value: "bookmark" }}
-              />
-              <View style={{ marginTop: "10px" }}>
-                {this.state.orderNo.length > 0 ? (
-                  <View>
-                    {this.state.orderNo.map((v, k) => (
-                      <View
-                        key={k}
-                        style={{
-                          display: "flex",
-                          justifyContent: " center",
-                          marginBottom: "20px",
-                        }}
-                      >
-                        编号:<View>{v.contractNo}</View>
-                        <View
-                          style={{
-                            width: "60px",
-                            height: "24px",
-                            backgroundColor: "#5599FF",
-                            borderRadius: "15px",
-                            textAlign: "center",
-                            lineHeight: "24px",
-                            marginLeft: "20px",
-                            color: "white",
-                          }}
-                          circle
-                          onClick={() => {
-                            this.setState({
-                              listVisible: false,
-                            });
-                            v.name = this.state.listValue.name;
-                            v.id = this.state.listValue.id;
-
-                            let list = this.state.jsList
-                            list.push(v)
-                            this.setState({
-                              jsList: list
-                            })
-                            // Taro.eventCenter.trigger("enterprise", v);
-                          }}
-                        >
-                          选择
-                        </View>
-                      </View>
-                    ))}{" "}
-                    <View style={{ color: "red", width: "260px", margin: "0 auto" }}>
-                      注:请选择正确的派单编号!公出信息将统计至对应的订单中。
-                    </View>
-                  </View>
-                ) : (
-                  <View style={{ color: "red", width: "260px", margin: "0 auto" }}>
-                    该企业暂无订单,无法技术公出!请联系营销员查询派单情况
-                  </View>
-                )}
-              </View>
-            </View>
-          ) : (
-            ""
-          )}
-          <ListBottomStart
-            state={this.state.listState}
-            reload={() => {
-              this.onChange(this.state.value);
-            }}
-          />
-        </View>
-      </>
-    );
-  }
-}
-
-export default Enterprise;

+ 0 - 22
src/pages/applyDepart/enterprise.less

@@ -1,22 +0,0 @@
-.slist{
-  padding: 10px 20px;
-  font-size: 26px;
-
-  .slitems{
-    margin: 15px 0;
-    display: flex;
-    flex-direction: row;
-    align-items: center;
-    justify-content: space-between;
-  }
-
-  .slbt{ 
-    width: 30%;
-    margin: 20px auto;
-  }
-  .cltips{
-    text-align: center;
-    font-size: 24px;
-    color: #4395ff;
-  }
-}

+ 0 - 194
src/pages/applyDepart/index.jsx

@@ -1,194 +0,0 @@
-import React, { Component } from "react";
-import { connect } from "react-redux";
-import { View } from "@tarojs/components";
-import { AtSteps, AtButton, AtListItem } from "taro-ui";
-
-import "taro-ui/dist/style/components/steps.scss";
-import "taro-ui/dist/style/components/icon.scss";
-import "taro-ui/dist/style/components/tabs.scss";
-
-import UserFloatingLayer from "../../components/common/userFloatingLayer";
-
-import { add, minus, asyncAdd } from "../../actions/counter";
-import Enterprise from "./enterprise";
-import PublicContent from "./publicContent";
-import Result from "./result";
-
-import "./index.less";
-import Taro from "@tarojs/taro";
-import MessageNoticebar from "../../components/common/messageNoticebar";
-
-const items = [
-  { title: "选择公出企业" },
-  { title: "填写公出内容" },
-  { title: "提交公出审核" },
-];
-
-@connect(
-  ({ counter }) => ({
-    counter,
-  }),
-  (dispatch) => ({
-    add() {
-      dispatch(add());
-    },
-    dec() {
-      dispatch(minus());
-    },
-    asyncAdd() {
-      dispatch(asyncAdd());
-    },
-  })
-)
-class ApplyDepart extends Component {
-  constructor(props) {
-    super(props);
-    this.state = {
-      current: 0,
-      enterpriseInfor: {},
-      selectArrderLocation: {},
-      resultState: 0,
-      resultId: "",
-      punchClockInfor: {},
-      // colors: "primary",
-      // color: "secondary",
-      // selectColor: 0,
-      type: 0,
-      isShow: false,
-      tipList: [],
-    };
-  }
-
-  componentDidShow() {
-    Taro.eventCenter.on("enterprise", (arg) => {
-      arg.type = this.state.type;
-      // 跳转
-      this.setState({
-        current: 1,
-        enterpriseInfor: arg,
-      });
-    });
-    Taro.eventCenter.on("publicContent", (arg) => {
-      this.setState({
-        current: 2,
-        resultState: arg.code,
-        resultId: arg.data.id,
-        punchClockInfor: arg.data,
-        isShow: arg.isShow,
-        tipList: arg?.list,
-      });
-    });
-    Taro.eventCenter.on("enterpriseBack", () => {
-      this.setState({
-        current: 0,
-      });
-    });
-    Taro.eventCenter.on("result", () => {
-      this.setState({
-        current: 0,
-        enterpriseInfor: {},
-        selectArrderLocation: {},
-        resultState: 0,
-        resultId: "",
-        punchClockInfor: {},
-      });
-    });
-    //获取地区选定数据
-    const chooseLocation = requirePlugin("chooseLocation");
-    const location = chooseLocation.getLocation();
-    if (location) {
-      this.setState({
-        selectArrderLocation: location,
-      });
-    }
-  }
-
-  componentDidMount() { }
-
-  onReachBottom() {
-    if (this.state.current === 0) {
-      Taro.eventCenter.trigger("applyDepartSearchList");
-    }
-  }
-
-  render() {
-    let userInfor = Taro.getStorageSync('userInfor');
-    return (
-      <View className="applyDepart">
-        <MessageNoticebar />
-        <UserFloatingLayer />
-        <View className="atStepsContent">
-          <AtSteps items={items} current={this.state.current} />
-          <View
-            style={{ display: this.state.current === 0 ? "block" : "none" }}
-          >
-            <View style={{ display: "flex", padding: "0 5px" }}>
-              {[
-                { type: 0, title: "业务公出" },
-                { type: 1, title: "技术公出" },
-                { type: 2, title: "行政公出" },
-              ].map((item, index) => (
-                <View style={{ margin: "0 5px" }} key={item.type}>
-                  <AtButton
-                    circle
-                    size="small"
-                    disabled={item.type === 1 && userInfor.type !== 3}
-                    type={
-                      this.state.type == item.type ? "primary" : "secondary"
-                    }
-                    onClick={() => {
-                      this.setState({
-                        type: item.type,
-                      });
-                    }}
-                  >
-                    {item.title}
-                  </AtButton>
-                </View>
-              ))}
-              <View style={{ flex: "1" }}></View>
-            </View>
-          </View>
-          <View className="content">
-            <View
-              style={{ display: this.state.current === 0 ? "block" : "none" }}
-            >
-              <Enterprise type={this.state.type} />
-            </View>
-            <View
-              style={{ display: this.state.current === 1 ? "block" : "none" }}
-            >
-              <PublicContent
-                enterpriseInfor={this.state.enterpriseInfor}
-                selectArrderLocation={this.state.selectArrderLocation}
-              />
-            </View>
-            <View
-              style={{ display: this.state.current === 2 ? "block" : "none" }}
-            >
-              <Result
-                resultState={this.state.resultState}
-                resultId={this.state.resultId}
-                punchClockInfor={this.state.punchClockInfor}
-                isShow={this.state.isShow}
-                tipList={this.state.tipList}
-              />
-            </View>
-            {/* <View style={{display:this.state.current===3 ? 'block' : 'none'}}>
-            <AtListItem
-                  title={this.state.enterpriseInfor.name}
-                  arrow='right'
-                  iconInfo={{ size: 25, color: '#000000', value: 'bookmark', }}
-                  onClick={()=>{
-                    // Taro.eventCenter.trigger('enterprise', v)
-                  }}
-                />
-            </View> */}
-          </View>
-        </View>
-      </View>
-    );
-  }
-}
-
-export default ApplyDepart;

+ 0 - 65
src/pages/applyDepart/index.less

@@ -1,65 +0,0 @@
-.applyDepart{
-  .atStepsContent{
-    padding-top: 10px;
-    .content{
-      padding-top: 20px;
-    }
-  }
-}
-
-.at-calendar__list.flex .flex__item--selected{
-  color: white;
-  border: 0 !important;
-  border-radius: 0 !important;
-  background: #6eb173;
-}
-
-.at-calendar__list.flex .flex__item--selected-head.flex__item--selected-tail {
-  background-color: #6eb173;
-}
-
-.at-calendar__list.flex  .flex__item{
-  background: #6eb173;
-  color: #FFFFFF;
-}
-
-.at-calendar__list.flex .flex__item--blur{
-  background: #fff !important;
-  color: #e1e4e7 !important;
-}
-
-.result{
-  display: flex;
-  flex-flow: column nowrap;
-  align-items: center;
-  padding-top: 83px;
-  height: 506px;
-  .resultIcon{
-    padding-bottom: 20px;
-  }
-  .resultTitle{
-    padding: 0 30px 30px 30px;
-    text-align: center;
-    .resultError{
-      font-size: 20px;
-      color: #969696;
-      padding-top: 15px;
-    }
-  }
-  .resultTips{
-    font-size: 24px;
-    text-align: center;
-    color: #f00;
-    background: #c9c9c9;
-    padding: 20px 100px;
-    margin-bottom: 40px;
-  }
-  .resultOperation{
-    display: flex;
-    flex-flow: row nowrap;
-    align-items: center;
-    justify-content: space-between;
-    margin-top: auto;
-    width: 100%;
-  }
-}

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

@@ -1,742 +0,0 @@
-import React, { Component } from "react";
-import Taro from "@tarojs/taro";
-import { Button, Text, View } from "@tarojs/components";
-import dayjs from "dayjs";
-import "./index.less";
-
-import ImagePicker from "../../components/common/imagePicker";
-
-import { AtButton, AtTextarea, AtIcon, AtCalendar } from "taro-ui";
-import {
-  addPublicRelease,
-  getWorkingHoursList,
-} from "../../utils/servers/servers";
-
-import {
-  getHours,
-  getNumHourse,
-  getUserWordTimes,
-  getNameList,
-  getList,
-  isTips,
-} from "../../utils/tools";
-
-import "taro-ui/dist/style/components/form.scss";
-import "taro-ui/dist/style/components/button.scss";
-import "taro-ui/dist/style/components/loading.scss";
-import "taro-ui/dist/style/components/icon.scss";
-import "taro-ui/dist/style/components/icon.scss";
-import "taro-ui/dist/style/components/textarea.scss";
-import "taro-ui/dist/style/components/calendar.scss";
-
-import "./publicContent.less";
-import InquiryModal from "../../components/common/inquiryModal"; //提示弹窗
-import UserQuery from "../../components/common/userquery"; //选择协单人弹窗
-
-class PublicContent extends Component {
-  constructor(props) {
-    super(props);
-    this.state = {
-      rangeStartVal: "",
-      rangeEndVal: "",
-      rangeEndMinuteVal: "",
-      rangeStartMinuteVal: "",
-      reason: "",
-      plan: "",
-      expectedEffect: "",
-      imgs: [],
-      validDates: [],
-      totalDuration: 0,
-      loading: false,
-      workTypeList: [],
-      workType: 0,
-      isPickerRender: false,
-      coorderList: [],
-      cList: [],
-      popup: false,
-    };
-    this.onSubmit = this.onSubmit.bind(this);
-    this.selectArrder = this.selectArrder.bind(this);
-    this.onChange = this.onChange.bind(this);
-    this.getWorkingHoursList = this.getWorkingHoursList.bind(this);
-    this.onPickerHide = this.onPickerHide.bind(this);
-    this.onSetPickerTime = this.onSetPickerTime.bind(this);
-    this.getNumHourse = this.getNumHourse.bind(this);
-  }
-
-  componentDidMount() {
-    Taro.eventCenter.on("result", () => {
-      this.imagePickerRef && this.imagePickerRef.clear();
-      this.setState({
-        rangeStartVal: "",
-        rangeEndVal: "",
-        rangeEndMinuteVal: "",
-        rangeStartMinuteVal: "",
-        reason: "",
-        plan: "",
-        expectedEffect: "",
-        imgs: [],
-        validDates: [],
-        totalDuration: 0,
-        loading: false,
-      });
-    });
-    this.getWorkingHoursList();
-  }
-
-  getNumHourse(startTime, endTime) {
-    this.setState({
-      totalDuration: getNumHourse(
-        startTime,
-        endTime,
-        this.state.validDates.length
-      ),
-    });
-  }
-
-  // 增加 省 市 区拼接,地址带区域的则把区域去掉
-  getArea() {
-    const { selectArrderLocation } = this.props
-    let pcd = selectArrderLocation.province + selectArrderLocation.city + selectArrderLocation.district
-    let str = selectArrderLocation.name
-    let index = str.lastIndexOf("区")
-    let name = str.substring(index + 1)
-    return pcd + name
-  }
-
-  onSubmit() {
-    let objectType = this.props.enterpriseInfor.id.indexOf(',') > -1 ? 1 : 0
-    if (!this.state.rangeStartMinuteVal) {
-      Taro.showToast({ title: "请选择公出时间", icon: "none" });
-      return;
-    }
-    if (!this.state.rangeEndMinuteVal) {
-      Taro.showToast({ title: "请选择公出时间", icon: "none" });
-      return;
-    }
-    if (
-      !(
-        this.props.selectArrderLocation.longitude &&
-        this.props.selectArrderLocation.latitude
-      )
-    ) {
-      Taro.showToast({ title: "请选择公出地点", icon: "none" });
-      return;
-    }
-    if (!this.state.reason) {
-      Taro.showToast({ title: "请输入公出目标", icon: "none" });
-      return;
-    }
-    if (!this.state.plan && this.props.enterpriseInfor.type != 2) {
-      Taro.showToast({ title: "请输入公出计划", icon: "none" });
-      return;
-    }
-    if (!this.state.expectedEffect && this.props.enterpriseInfor.type != 2) {
-      Taro.showToast({ title: "请输入预计效果", icon: "none" });
-      return;
-    }
-    if (this.state.totalDuration === 0) {
-      Taro.showToast({
-        title: "请选择公出时间,目前设置公出时间不足0.5小时",
-        icon: "none",
-      });
-      return;
-    }
-    if (this.props.enterpriseInfor.type == 0 && this.state.totalDuration > 4 && this.state.imgs.length == 0) {
-      Taro.showToast({ title: "请上传附件", icon: "none" });
-      return
-    }
-
-    this.setState({
-      loading: true,
-    });
-    const { selectArrderLocation } = this.props
-    let datas = {
-      objectType,
-      uids: this.props.enterpriseInfor.id,
-      releaseStarts: this.state.rangeStartMinuteVal,
-      releaseEnds: this.state.rangeEndMinuteVal,
-      remarks: this.state.reason,
-      districtName: this.getArea(),
-      longitude: this.props.selectArrderLocation.longitude,
-      latitude: this.props.selectArrderLocation.latitude,
-      annexUrl: this.state.imgs.length === 0 ? "" : this.state.imgs.join(","),
-      duration: this.state.totalDuration,
-      type: this.props.enterpriseInfor.type,
-      validDate: JSON.stringify(this.state.validDates),
-      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(","),
-    };
-    if (this.props.enterpriseInfor.type == 0) {
-      datas = {
-        ...datas,
-        ...{
-          plan: this.state.plan,
-          expectedEffect: this.state.expectedEffect,
-        }
-      };
-    } else if (this.props.enterpriseInfor.type == 2) {
-      datas = datas;
-    } else {
-      datas = {
-        ...datas,
-        ...{
-          plan: this.state.plan,
-          expectedEffect: this.state.expectedEffect,
-          orderNo: this.props.enterpriseInfor.orderNo,
-        }
-      };
-    }
-    addPublicRelease(datas)
-      .then((v) => {
-        this.setState({
-          loading: false,
-        });
-        let newData = {
-          ...v.data,
-          ...{
-            isShow: this.props.enterpriseInfor.type == 0 ? isTips(this.props.enterpriseInfor.list) : false,
-            list: this.props.enterpriseInfor.type == 0 ? getList(this.props.enterpriseInfor.list, "aname", true) : []
-          }
-        }
-        if (v.error.length === 0) {
-          Taro.eventCenter.trigger("publicContent", newData);
-        } else {
-          Taro.showToast({
-            title: v.error[0].message,
-            icon: "none",
-          });
-        }
-      })
-      .catch(() => {
-        this.setState({
-          loading: false,
-        });
-      });
-  }
-
-  selectArrder() {
-    const key = "AWBBZ-GRAC2-JFYUO-CLA7I-JAHXK-YFFGT"; //使用在腾讯位置服务申请的key
-    const referer = "科德打卡定位"; //调用插件的app的名称
-    const category = "公司企业,房产小区";
-    Taro.navigateTo({
-      url:
-        "plugin://chooseLocation/index?key=" +
-        key +
-        "&referer=" +
-        referer +
-        "&category=" +
-        category,
-    });
-  }
-
-  onChange(value, type) {
-    let arr = this.state.imgs.concat([]);
-    if (type === "add") {
-      arr.push(value);
-    } else if (type === "remove") {
-      arr.splice(value, 1);
-    }
-    this.setState({
-      imgs: arr,
-    });
-  }
-
-  getWorkingHoursList() {
-    getWorkingHoursList({})
-      .then((v) => {
-        if (v.error.length === 0) {
-          let obj = Taro.getStorageSync("userInfor");
-          let index = v.data.findIndex(
-            (value) => value.type === obj.workTimeInfor.type
-          );
-          this.setState({
-            workType: index !== -1 ? index : 0,
-          });
-          this.setState({
-            workTypeList: v.data,
-          });
-        } else {
-          Taro.showToast({
-            title: v.error[0].message,
-            icon: "none",
-          });
-        }
-      })
-      .catch((err) => {
-        //console.log(err);
-      });
-  }
-
-  onPickerHide() {
-    this.setState({
-      isPickerRender: false,
-    });
-  }
-
-  onSetPickerTime(val) {
-    let data = val.detail;
-    this.setState({
-      rangeStartMinuteVal: data.selectStartTime,
-      rangeEndMinuteVal: data.selectEndTime,
-    });
-    let arr = [];
-    if (data.startTime && data.endTime) {
-      let a = dayjs(data.startTime);
-      let b = dayjs(data.endTime);
-      let num;
-      if (a.hour() <= b.hour()) {
-        num = b.diff(a, "day") + 1;
-      } else {
-        num = b.diff(a, "day") + 2;
-      }
-      let strAdd = data.startTime;
-      for (let i = 0; i < num; i++) {
-        let time = dayjs(strAdd).add(i, "days").format("YYYY-MM-DD");
-        arr.push({ value: time });
-      }
-    }
-    this.setState({
-      rangeEndVal: dayjs(data.endTime).format("YYYY-MM-DD"),
-      rangeStartVal: dayjs(data.startTime).format("YYYY-MM-DD"),
-      validDates: arr,
-    }, () => {
-      let a1 = dayjs(dayjs(data.endTime).format("YYYY-MM-DD HH:mm:ss"));
-      let b1 = dayjs(dayjs(data.startTime).format("YYYY-MM-DD  HH:mm:ss"));
-      this.getNumHourse(b1, a1);
-    });
-  }
-  // 新增技术协单
-  setList(list, arr) {
-    this.setState({
-      cList: list,
-      coorderList: arr
-    })
-  }
-  // 弹窗开关
-  popupClick() {
-    this.setState({
-      popup: !this.state.popup
-    })
-  }
-
-  render() {
-    const { cList, coorderList, popup } = this.state
-    return (
-      <View className="publicContent">
-        <View className="formItem">
-          <View className="formName">公出企业:</View>
-          <View className="formValue" style={{ flexDirection: "column", alignItems: "flex-end" }}>
-            {/* {this.props.enterpriseInfor.name} */}
-            {
-              !!this.props.enterpriseInfor.name && this.props.enterpriseInfor.name.indexOf(',') > -1
-                ? this.props.enterpriseInfor.name.split(',')?.map((item, index) => <View key={index}>{item}</View>)
-                : this.props.enterpriseInfor.name
-            }
-          </View>
-        </View>
-        {
-          (this.props.enterpriseInfor.type == 0 && isTips(this.props.enterpriseInfor.list)) &&
-          <View className="othersTips">您正在申请公出他人企业:需跟单员“
-            {getList(this.props.enterpriseInfor.list, "aname", true).toString()}
-            ”审核同意,您才可公出!</View>
-        }
-        <View className="formItem">
-          <View className="formName">公出类型:</View>
-          <View className="formValue">
-            {this.props.enterpriseInfor.type == 0
-              ? "业务公出" : this.props.enterpriseInfor.type == 1
-                ? "技术公出" : this.props.enterpriseInfor.type == 2
-                  ? "行政公出" : this.props.enterpriseInfor.type == 3
-                    ? "技术协单" : ""}
-          </View>
-        </View>
-        {this.props.enterpriseInfor.contractNo ? (
-          <View className="formItem">
-            <View className="formName">合同编号:</View>
-            <View className="formValue">
-              {this.props.enterpriseInfor.contractNo}
-            </View>
-          </View>
-        ) : (
-          ""
-        )}
-        <View className="formItem">
-          <View className="formName">作息时间类型:</View>
-          <View className="formValue">
-            <picker
-              onChange={(e) => {
-                this.setState({
-                  workType: e.detail.value,
-                });
-                if (this.state.workTypeList[e.detail.value]) {
-                  let obj = Taro.getStorageSync("userInfor");
-                  obj.workTimeInfor = this.state.workTypeList[e.detail.value];
-                  Taro.setStorageSync("userInfor", obj);
-                  this.setState({
-                    rangeStartVal: "",
-                    rangeStartMinuteVal: "",
-                    rangeEndMinuteVal: "",
-                    rangeEndVal: "",
-                    validDates: [],
-                    totalDuration: 0,
-                  });
-                }
-              }}
-              value={this.state.workType}
-              rangeKey="name"
-              range={this.state.workTypeList}
-            >
-              <view style={{ display: "flex", alignItems: "center" }}>
-                {this.state.workTypeList[this.state.workType]
-                  ? this.state.workTypeList[this.state.workType].name
-                  : ""}
-                <AtIcon value="chevron-right" size="20" color="#bbbbbb" />
-              </view>
-            </picker>
-          </View>
-        </View>
-        <View className="formItem">
-          <View className="formName">公出时间:</View>
-          <View className="formValue">
-            <View
-              className="time"
-              onClick={() => {
-                this.setState({
-                  isPickerRender: true,
-                });
-              }}
-            >
-              {this.state.rangeStartMinuteVal &&
-                this.state.rangeEndMinuteVal ? (
-                <View className="timeContent">
-                  <View>开始时间:{this.state.rangeStartMinuteVal}</View>
-                  <View>结束时间:{this.state.rangeEndMinuteVal}</View>
-                </View>
-              ) : (
-                "请选择公出时间"
-              )}
-            </View>
-            <timePicker
-              config={{
-                endDate: true,
-                column: "minute",
-                dateLimit: false,
-                // initStartTime: "2019-01-01 12:32:44", //默认开始时间
-                // initEndTime: "2019-12-01 12:32:44",   //默认结束时间
-                limitStartTime: dayjs()
-                  .subtract(3, "year")
-                  .format("YYYY-MM-DD HH:mm:ss"),
-                limitEndTime: dayjs()
-                  .add(3, "year")
-                  .format("YYYY-MM-DD HH:mm:ss"),
-              }}
-              isPartition
-              pickerShow={this.state.isPickerRender}
-              onconditionaljudgment={(v) => {
-                let a = dayjs(
-                  dayjs(v.detail.endTime)
-                    .second(0)
-                    .format("YYYY-MM-DD HH:mm:ss")
-                );
-                let b = dayjs(dayjs().second(0).format("YYYY-MM-DD HH:mm:ss"));
-                if (a.isBefore(b)) {
-                  Taro.showToast({
-                    title: "结束时间不能小于当前时间",
-                    icon: "none",
-                  });
-                  v.detail.setLv(false);
-                }
-              }}
-              onhidepicker={() => {
-                this.onPickerHide();
-              }}
-              onsetpickertime={(v) => {
-                this.onSetPickerTime(v);
-              }}
-            />
-          </View>
-        </View>
-        <View className="formItem">
-          <View className="formName">总时长:</View>
-          <View className="formValue">{this.state.totalDuration}小时</View>
-        </View>
-        {this.state.validDates.length !== 0 ? (
-          <View
-            className="formItem"
-            style={{ display: "block", paddingTop: "15px" }}
-          >
-            <View className="formName">
-              <View>去除放假时间:</View>
-            </View>
-            <View className="tips">
-              绿色方块为公出时间,长按即可去除放假时间
-            </View>
-            <AtCalendar
-              currentDate={this.state.rangeStartVal}
-              minDate={this.state.rangeStartVal}
-              maxDate={this.state.rangeEndVal}
-              isSwiper={false}
-              validDates={this.state.validDates}
-              onDayLongClick={(item) => {
-                if (
-                  !(
-                    dayjs(item.value).isSame(this.state.rangeStartVal) ||
-                    dayjs(item.value).isSame(this.state.rangeEndVal)
-                  )
-                ) {
-                  if (
-                    !(
-                      dayjs(item.value).isAfter(this.state.rangeStartVal) &&
-                      dayjs(item.value).isBefore(this.state.rangeEndVal)
-                    )
-                  ) {
-                    return;
-                  }
-                } else {
-                  Taro.showToast({
-                    title: "开始结束时间不能取消",
-                    icon: "none",
-                  });
-                  return;
-                }
-                let index = this.state.validDates.findIndex((v) => {
-                  let lv = dayjs(v.value).isSame(item.value);
-                  return lv;
-                });
-                const { start, end } = getUserWordTimes();
-                let totalDuration = getHours(
-                  dayjs().format("YYYY-MM-DD") + start,
-                  dayjs(dayjs().format("YYYY-MM-DD") + end)
-                ); //一天工作时长
-                if (index < 0) {
-                  let arr = item.value.split("-");
-                  this.state.validDates.push({ value: arr.join("-") });
-                  this.setState({
-                    validDates: this.state.validDates,
-                    totalDuration: this.state.totalDuration + totalDuration,
-                  });
-                } else {
-                  this.state.validDates.splice(index, 1);
-                  this.setState({
-                    validDates: this.state.validDates,
-                    totalDuration: this.state.totalDuration - totalDuration,
-                  });
-                }
-              }}
-            />
-          </View>
-        ) : null}
-        <View className="formItem" style={{ paddingBottom: 0 }}>
-          <View className="formName">公出地点:</View>
-          <View className="formValue" onClick={this.selectArrder}>
-            <Text className="formValueText">
-              {this.props.selectArrderLocation.name}
-            </Text>
-            <AtIcon value="chevron-right" size="30" color="#bbbbbb" />
-          </View>
-        </View>
-        <View className="tips">
-          以地图为中心100米范围为可打卡区域,移动红标只需要拖动地图即可
-        </View>
-        {
-          this.props.enterpriseInfor.type === 0 &&
-          <View className="formItems" style={{ paddingBottom: 0, marginTop: 10 }}>
-            <View className="formNames">技术协单: </View>
-            <View className="formValues">
-              {
-                cList.length == 0
-                  ? <Text>无</Text>
-                  : cList.map((item, index) =>
-                    <View className="fitems" key={index}>
-                      {item.name}
-                      <View className="fclose"
-                        onClick={() => {
-                          coorderList.includes(item.id) &&
-                            (
-                              cList.splice(coorderList.indexOf(item.id), 1),
-                              coorderList.splice(coorderList.indexOf(item.id), 1)
-                            )
-                          this.setState({
-                            cList,
-                            coorderList,
-                          })
-                        }}
-                      ><AtIcon value="close-circle" size="15" color="#bbbbbb" /></View>
-                    </View>
-                  )
-              }
-              {cList.length < 5 && <Button className="addbuttom" type='primary' onClick={this.popupClick.bind(this)}>新增技术协单</Button>}
-            </View>
-          </View>
-        }
-        {
-          this.props.enterpriseInfor.type === 0 &&
-          <View className="tips">
-            请与技术协商后,再发起协单,协单将统计公出成本等
-          </View>
-        }
-        <View
-          className="formItem"
-          style={{ display: "block", paddingTop: "15px" }}
-        >
-          {/* 公出目标 */}
-          <View className="formName">
-            <Text style={{ color: "red" }}>*公出目标:</Text>
-            <View
-              className="formValue"
-              style={{ paddingTop: "10px", textAlign: "left" }}
-            >
-              <AtTextarea
-                height={46}
-                value={this.state.reason}
-                onChange={(v) => {
-                  this.setState({
-                    reason: v,
-                  });
-                }}
-                maxLength={200}
-                placeholder={
-                  this.props.enterpriseInfor.type == 2
-                    ? "详细说明本次公出的内容,预计完成的内容"
-                    : "本次公出目标,谈的思路与步骤?"
-                }
-              />
-            </View>
-          </View>
-          {/* 公出计划 */}
-          {this.props.enterpriseInfor.type != 2 && (
-            <View className="formName">
-              <Text style={{ color: "red" }}>*公出计划:</Text>
-              <View
-                className="formValue"
-                style={{ paddingTop: "10px", textAlign: "left" }}
-              >
-                <AtTextarea
-                  height={46}
-                  value={this.state.plan}
-                  onChange={(v) => {
-                    this.setState({
-                      plan: v,
-                    });
-                  }}
-                  maxLength={200}
-                  placeholder="本次公出准备工作"
-                />
-              </View>
-            </View>
-          )}
-          {/* 预计效果 */}
-          {this.props.enterpriseInfor.type != 2 && (
-            <View className="formName">
-              <Text style={{ color: "red" }}>*预计效果:</Text>
-              <View
-                className="formValue"
-                style={{ paddingTop: "10px", textAlign: "left" }}
-              >
-                <AtTextarea
-                  height={46}
-                  value={this.state.expectedEffect}
-                  onChange={(v) => {
-                    this.setState({
-                      expectedEffect: v,
-                    });
-                  }}
-                  maxLength={200}
-                  placeholder="预计本次公出效果"
-                />
-              </View>
-            </View>
-          )}
-        </View>
-        {/*  */}
-        <View className="formItem" style={{ display: "block", paddingBottom: 0 }}>
-          <View className="formName">附件:</View>
-          <View
-            className="formValue"
-            style={{ paddingTop: "10px", textAlign: "left" }}
-          >
-            <ImagePicker
-              showAddBtn
-              ref={(ref) => (this.imagePickerRef = ref)}
-              url="/api/admin/release/upload"
-              onChange={this.onChange}
-            />
-          </View>
-        </View>
-        {
-          this.props.enterpriseInfor.type == 0 && this.state.totalDuration > 4 && this.state.imgs.length == 0 &&
-          <View className="tips" style={{ paddingBottom: "40px" }}>
-            您公出时长超过4小时,请上传凭证截图!
-          </View>
-        }
-        <View className="operation">
-          <AtButton
-            disabled={this.state.loading}
-            type="secondary"
-            circle
-            onClick={() => {
-              Taro.eventCenter.trigger("enterpriseBack");
-            }}
-          >
-            上一步
-          </AtButton>
-          <AtButton
-            type="primary"
-            loading={this.state.loading}
-            circle
-            onClick={() => {
-              if (this.state.loading) {
-                return;
-              }
-              this.setState({
-                isInquiryOpened: true,
-                inquiryTitle: "提醒",
-                inquiryContent: "您确定要提交此申请吗?",
-                inquiryFn: () => {
-                  this.onSubmit();
-                },
-              });
-            }}
-          >
-            提交申请
-          </AtButton>
-        </View>
-        <InquiryModal
-          isOpened={this.state.isInquiryOpened}
-          title={this.state.inquiryTitle}
-          content={this.state.inquiryContent}
-          onClose={() => {
-            this.setState({
-              isInquiryOpened: false,
-              inquiryTitle: "",
-              inquiryContent: "",
-            });
-          }}
-          onDetermine={() => {
-            this.state.inquiryFn();
-            this.setState({
-              isInquiryOpened: false,
-              inquiryTitle: "",
-              inquiryContent: "",
-              inquiryFn: () => { },
-            });
-          }}
-        />
-        {popup &&
-          <UserQuery
-            isOpened={popup}
-            onDesc={this.popupClick.bind(this)}
-            cList={cList}
-            selList={[]}
-            coorderList={coorderList}
-            setList={this.setList.bind(this)}
-          />
-        }
-      </View>
-    );
-  }
-}
-
-export default PublicContent;

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

@@ -1,147 +0,0 @@
-.publicContent {
-  padding: 20px;
-
-  .formItem {
-    display: flex;
-    align-items: center;
-    font-size: 30px;
-    padding-bottom: 28px;
-
-    .formName {
-      white-space: nowrap;
-      display: flex;
-      align-items: center;
-
-      .formNameTips {
-        color: #ff0000;
-        font-size: 20px;
-        padding-left: 10px;
-      }
-
-      .tips {
-        color: #ff0000;
-        font-size: 20px;
-        padding-bottom: 20px;
-      }
-    }
-
-    .formValue {
-      text-align: right;
-      flex: 1;
-      display: flex;
-      flex-flow: row nowrap;
-      align-items: center;
-      justify-content: flex-end;
-
-      .button {
-        font-size: 22px;
-        padding: 0 10px;
-
-      }
-
-      .time {
-        flex: 1;
-        font-size: 30px;
-        color: #bfbdbd;
-
-        .timeContent {
-          display: flex;
-          flex-flow: column nowrap;
-          align-items: flex-end;
-          justify-content: center;
-        }
-      }
-
-      .formValueText {
-        display: block;
-        width: 452px;
-        text-overflow: ellipsis;
-        overflow: hidden;
-        white-space: nowrap;
-      }
-    }
-
-  }
-
-  .formItems {
-    display: flex;
-    flex-direction: row;
-    align-items: flex-start;
-    font-size: 30px;
-    padding-bottom: 28px;
-
-    .formNames {
-      white-space: nowrap;
-      display: flex;
-      align-items: center;
-
-      .formNameTips {
-        color: #ff0000;
-        font-size: 20px;
-        padding-left: 10px;
-      }
-
-      .tips {
-        color: #ff0000;
-        font-size: 20px;
-        padding-bottom: 20px;
-      }
-    }
-
-    .formValues {
-      display: flex;
-      flex-direction: row;
-      flex-wrap: wrap;
-
-      .fitems {
-        margin-left: 20px;
-        margin-bottom: 20px;
-        display: flex;
-        flex-direction: row;
-        position: relative;
-        padding-right: 40px;
-
-        .fclose {
-          position: absolute;
-          right: 0;
-          top: -20px;
-
-        }
-
-      }
-
-      .addbuttom {
-        font-size: 22px;
-        padding: 0 10px;
-        margin-left: 20px;
-      }
-
-    }
-
-  }
-
-  .othersTips {
-    font-size: 28px;
-    text-align: center;
-    color: #f00;
-    background: #c9c9c9;
-    padding: 20px 100px;
-    
-  }
-
-  .tips {
-    font-size: 20px;
-    text-align: left;
-    color: #f00;
-
-  }
-
-  .operation {
-    display: flex;
-    flex-flow: row nowrap;
-  }
-
-  .at-modal__container {
-    width: 718px;
-  }
-}

+ 0 - 87
src/pages/applyDepart/result.jsx

@@ -1,87 +0,0 @@
-import React, { Component } from "react";
-import { View, Icon } from '@tarojs/components'
-import { AtButton } from "taro-ui";
-import './index.less';
-import Taro from "@tarojs/taro";
-
-class Result extends Component {
-  constructor(props) {
-    super(props);
-    this.determine = this.determine.bind(this);
-    this.punchClock = this.punchClock.bind(this);
-  }
-
-  determine() {
-    Taro.eventCenter.trigger('result')
-  }
-
-  punchClock(e) {
-    e.stopPropagation();
-    Taro.eventCenter.trigger('GoPunchIn', this.props.punchClockInfor)
-    Taro.switchTab({
-      url: '/pages/punchClock/index',
-    })
-
-  }
-
-  render() {
-    return (
-      <View className='result'>
-        <View className='resultIcon'>
-          {/*{*/}
-          {/*  this.props.resultState === 0 ?*/}
-          {/*    <Icon size='80' type='success' /> :*/}
-          {/*    this.props.resultState === 43101 ?*/}
-          {/*      <Icon size='80' type='info' /> :*/}
-          {/*      <Icon size='80' type='warn' />*/}
-          {/*}*/}
-          {
-            this.props.isShow
-              ? <Icon size='80' type='warn' color='#ff9900'/>
-              : <Icon size='80' type='success' />
-          }
-        </View>
-        <View className='resultTitle'>
-          <View>申请成功{!this.props.isShow && ",可以打卡了!"}</View>
-          <View className='resultError'>
-            {
-              this.props.resultState === 0 ?
-                '' :
-                this.props.resultState === 43101 || this.props.resultState === 2 || this.props.resultState === 40003 ?
-                  ('您可以联系上级审核' + '(' + this.props.resultState + ')') :
-                  this.props.resultState === 41030 || this.props.resultState === 47003 || this.props.resultState === 40037 ?
-                    ('您可以联系上级审核' + '(' + this.props.resultState + ')') :
-                    ('您可以联系上级审核' + '(' + this.props.resultState + ')')
-            }
-          </View>
-        </View>
-        {
-          this.props.isShow &&
-          <View className="resultTips">公出他人企业,需跟单人员“
-            {this.props.tipList.toString()}
-            ”审核同意,才可以打卡!!!</View>
-        }
-        <View className='resultOperation'>
-          <AtButton circle onClick={this.determine}>
-            再次发起
-          </AtButton>
-          {
-            !this.props.isShow &&
-            <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>
-      </View>
-    )
-  }
-}
-
-export default Result;

+ 0 - 5
src/pages/applyReimbursement/index.config.js

@@ -1,8 +1,3 @@
 export default {
   navigationBarTitleText: '申请报销',
-  // enablePullDownRefresh: true,
-  onReachBottomDistance: 50,
-  usingComponents: {
-    timePicker: '../../components/common/timePicker/timePicker'
-  }
 }

+ 71 - 58
src/pages/applyReimbursement/index.jsx

@@ -1,4 +1,5 @@
 import React, { Component } from "react";
+import Taro, { getCurrentInstance } from "@tarojs/taro";
 import { connect } from "react-redux";
 import { View, Text, } from "@tarojs/components";
 import { AtInput, AtButton, AtRadio } from "taro-ui";
@@ -6,19 +7,18 @@ import "taro-ui/dist/style/components/button.scss";
 import "taro-ui/dist/style/components/radio.scss";
 import "taro-ui/dist/style/components/input.scss";
 import "taro-ui/dist/style/components/icon.scss";
-
-import SubmitForm from "./submitform";
+import { creatOrder } from '../../utils/servers/servers';
+import { accountList } from '../../utils/tools/config';
 import "./index.less";
-import Taro from "@tarojs/taro";
-
 
 class applyReimbursement extends Component {
+  $instance = getCurrentInstance();
+
   constructor(props) {
     super(props);
     this.state = {
       type: -1,
       other: "",
-      count: 0,
     };
   }
 
@@ -38,65 +38,78 @@ class applyReimbursement extends Component {
 
   }
 
-  componentDidMount() { }
+  componentDidMount() {
+
+  }
+
+  // 不需要prid绑定,直接发起
+  creatOrder() {
+    const { type, other, } = this.state
+    creatOrder({
+      type,
+      typeOther: other,
+    }).then(v => {
+      if (v.error.length === 0) {
+        Taro.redirectTo({
+          url: '/pages/drafts/index?id=' + v.data
+        })
+      } else {
+        Taro.showToast({ title: v.error[0].message, icon: 'none' })
+      }
+    }).catch(() => {
+      Taro.showToast({
+        title: '系统错误,请稍后再试',
+        icon: 'none'
+      })
+    })
+  }
 
 
   render() {
-    const { type, other, count } = this.state
+    const { type, other } = this.state
     return (
       <View className="reimbursement">
-        {count == 0 &&
-          <View>
-            <View className="rtit">请选择报销费用类型</View>
-            <View className="rlist">
-              <AtRadio
-                options={[
-                  { label: '差旅费', value: 0, },
-                  { label: '非业务报销', value: 1 },
-                  { label: '第三方付款', value: 2, },
-                  { label: '申请借支', value: 3 },
-                  { label: '其他', value: 4, }
-                ]}
-                value={type}
-                onClick={this.handleChange.bind(this)}
-              />
-              {type == 4 &&
-                <AtInput
-                  name='other'
-                  type='text'
-                  placeholder='请填写明细'
-                  value={other}
-                  onChange={this.onInputChange.bind(this)}
-                />}
-              <View className="rlbuttom">
-                <AtButton
-                  type="primary"
-                  circle
-                  onClick={() => {
-                    if (type == -1) {
-                      Taro.showToast({
-                        title: '请选择报销费用类型',
-                        icon: 'none'
-                      })
-                    } else if (type == 4 && !other) {
-                      Taro.showToast({
-                        title: '请填写其他明细',
-                        icon: 'none'
-                      })
-                    } else {
-                      this.setState({
-                        count: 2
-                      })
-                    }
-                  }}
-                >
-                  下一步
-                </AtButton>
-              </View>
+        <View>
+          <View className="rtit">请选择报销费用类型</View>
+          <View className="rlist">
+            <AtRadio
+              options={accountList}
+              value={type}
+              onClick={this.handleChange.bind(this)}
+            />
+            {type == 0 &&
+              <AtInput
+                name='other'
+                type='text'
+                placeholder='请填写明细'
+                value={other}
+                onChange={this.onInputChange.bind(this)}
+              />}
+            <View className="rlbuttom">
+              <AtButton
+                type="primary"
+                circle
+                onClick={() => {
+                  if (type == -1) {
+                    Taro.showToast({
+                      title: '请选择报销费用类型',
+                      icon: 'none'
+                    })
+                  } else if (type == 0 && !other) {
+                    Taro.showToast({
+                      title: '请填写其他明细',
+                      icon: 'none'
+                    })
+                  } else {
+                    this.creatOrder()
+                  }
+                }}
+              >
+                确定
+              </AtButton>
             </View>
-          </View>}
-        {count == 1 && <SubmitForm />}
-
+          </View>
+        </View>
       </View>
     );
   }

+ 114 - 0
src/pages/applyReimbursement/select.jsx

@@ -0,0 +1,114 @@
+import React, { Component } from "react";
+import Taro from "@tarojs/taro";
+import { View, Button, } from '@tarojs/components'
+import { AtRadio, AtInput, AtModal, AtModalHeader, AtModalContent, AtModalAction } from "taro-ui";
+import { accountList } from '../../utils/tools/config';
+import { creatOrder } from '../../utils/servers/servers';
+import './index.less';
+
+import "taro-ui/dist/style/components/icon.scss";
+import "taro-ui/dist/style/components/button.scss";
+import "taro-ui/dist/style/components/radio.scss";
+
+class Select extends Component {
+  constructor(props) {
+    super(props);
+    this.state = {
+      type: -1,
+      other: "",
+    };
+  }
+
+  componentDidShow() {
+    const { } = this.state
+  }
+
+  handleChange(e) {
+    this.setState({
+      type: e
+    })
+  }
+
+  onInputChange(e) {
+    this.setState({
+      other: e
+    })
+  }
+
+
+  creatOrder() {
+    const { prid, onClose } = this.props
+    const { type, other, } = this.state
+    creatOrder({
+      prid,
+      type,
+      typeOther: other,
+    }).then(v => {
+      if (v.error.length === 0) {
+        onClose()
+        Taro.redirectTo({
+          url: '/pages/drafts/index?id=' + v.data
+        })
+        console.log("000")
+      } else {
+        Taro.showToast({ title: v.error[0].message, icon: 'none' })
+      }
+    }).catch(() => {
+      Taro.showToast({
+        title: '系统错误,请稍后再试',
+        icon: 'none'
+      })
+    })
+  }
+
+
+  render() {
+    const { visible = "", onClose } = this.props
+    const { type, other } = this.state
+    return (
+      <AtModal
+        isOpened={visible != ""}
+        closeOnClickOverlay={false}
+      >
+        <AtModalHeader>请选择报销类型</AtModalHeader>
+        <AtModalContent>
+          <View className="rlist">
+            <AtRadio
+              options={accountList}
+              value={type}
+              onClick={this.handleChange.bind(this)}
+            />
+            {type == 0 &&
+              <AtInput
+                name='other'
+                type='text'
+                placeholder='请填写明细'
+                value={other}
+                onChange={this.onInputChange.bind(this)}
+              />}
+          </View>
+        </AtModalContent>
+        <AtModalAction>
+          <Button onClick={onClose}>取消</Button>
+          <Button onClick={() => {
+            if (type == -1) {
+              Taro.showToast({
+                title: '请选择报销费用类型',
+                icon: 'none'
+              })
+            } else if (type == 0 && !other) {
+              Taro.showToast({
+                title: '请填写其他明细',
+                icon: 'none'
+              })
+            } else {
+              this.creatOrder()
+            }
+          }}>确定</Button>
+        </AtModalAction>
+      </AtModal>
+    )
+  }
+}
+
+export default Select;

+ 0 - 498
src/pages/applyReimbursement/submitform.jsx

@@ -1,498 +0,0 @@
-import React, { Component } from "react";
-import Taro from "@tarojs/taro";
-import { Button, Text, View } from "@tarojs/components";
-import dayjs from "dayjs";
-import "./index.less";
-import ImagePicker from "../../components/common/imagePicker";
-import { AtButton, AtTextarea, AtIcon, AtInput } from "taro-ui";
-import {
-  addPublicRelease,
-  getWorkingHoursList,
-} from "../../utils/servers/servers";
-import {
-  getHours,
-  getNumHourse,
-  getUserWordTimes,
-  getNameList,
-  getList,
-  isTips,
-} from "../../utils/tools";
-import "taro-ui/dist/style/components/form.scss";
-import "taro-ui/dist/style/components/button.scss";
-import "taro-ui/dist/style/components/loading.scss";
-import "taro-ui/dist/style/components/icon.scss";
-import "taro-ui/dist/style/components/icon.scss";
-import "taro-ui/dist/style/components/textarea.scss";
-import "taro-ui/dist/style/components/input.scss";
-
-import "./submitform.less";
-
-class SubmitForm extends Component {
-  constructor(props) {
-    super(props);
-    this.state = {
-
-    };
-    this.getNumHourse = this.getNumHourse.bind(this);
-  }
-
-  componentDidMount() {
-
-  }
-
-  onSubmit() {
-    let objectType = this.props.enterpriseInfor.id.indexOf(',') > -1 ? 1 : 0
-    if (!this.state.rangeStartMinuteVal) {
-      Taro.showToast({ title: "请选择公出时间", icon: "none" });
-      return;
-    }
-    if (!this.state.rangeEndMinuteVal) {
-      Taro.showToast({ title: "请选择公出时间", icon: "none" });
-      return;
-    }
-    if (
-      !(
-        this.props.selectArrderLocation.longitude &&
-        this.props.selectArrderLocation.latitude
-      )
-    ) {
-      Taro.showToast({ title: "请选择公出地点", icon: "none" });
-      return;
-    }
-    if (!this.state.reason) {
-      Taro.showToast({ title: "请输入公出目标", icon: "none" });
-      return;
-    }
-    if (!this.state.plan && this.props.enterpriseInfor.type != 2) {
-      Taro.showToast({ title: "请输入公出计划", icon: "none" });
-      return;
-    }
-    if (!this.state.expectedEffect && this.props.enterpriseInfor.type != 2) {
-      Taro.showToast({ title: "请输入预计效果", icon: "none" });
-      return;
-    }
-    if (this.state.totalDuration === 0) {
-      Taro.showToast({
-        title: "请选择公出时间,目前设置公出时间不足0.5小时",
-        icon: "none",
-      });
-      return;
-    }
-    if (this.props.enterpriseInfor.type == 0 && this.state.totalDuration > 4 && this.state.imgs.length == 0) {
-      Taro.showToast({ title: "请上传附件", icon: "none" });
-      return
-    }
-
-    this.setState({
-      loading: true,
-    });
-    const { selectArrderLocation } = this.props
-    let datas = {
-      objectType,
-      uids: this.props.enterpriseInfor.id,
-      releaseStarts: this.state.rangeStartMinuteVal,
-      releaseEnds: this.state.rangeEndMinuteVal,
-      remarks: this.state.reason,
-      districtName: this.getArea(),
-      longitude: this.props.selectArrderLocation.longitude,
-      latitude: this.props.selectArrderLocation.latitude,
-      annexUrl: this.state.imgs.length === 0 ? "" : this.state.imgs.join(","),
-      duration: this.state.totalDuration,
-      type: this.props.enterpriseInfor.type,
-      validDate: JSON.stringify(this.state.validDates),
-      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(","),
-    };
-    if (this.props.enterpriseInfor.type == 0) {
-      datas = {
-        ...datas,
-        ...{
-          plan: this.state.plan,
-          expectedEffect: this.state.expectedEffect,
-        }
-      };
-    } else if (this.props.enterpriseInfor.type == 2) {
-      datas = datas;
-    } else {
-      datas = {
-        ...datas,
-        ...{
-          plan: this.state.plan,
-          expectedEffect: this.state.expectedEffect,
-          orderNo: this.props.enterpriseInfor.orderNo,
-        }
-      };
-    }
-    addPublicRelease(datas)
-      .then((v) => {
-        this.setState({
-          loading: false,
-        });
-        let newData = {
-          ...v.data,
-          ...{
-            isShow: this.props.enterpriseInfor.type == 0 ? isTips(this.props.enterpriseInfor.list) : false,
-            list: this.props.enterpriseInfor.type == 0 ? getList(this.props.enterpriseInfor.list, "aname", true) : []
-          }
-        }
-        if (v.error.length === 0) {
-          Taro.eventCenter.trigger("publicContent", newData);
-        } else {
-          Taro.showToast({
-            title: v.error[0].message,
-            icon: "none",
-          });
-        }
-      })
-      .catch(() => {
-        this.setState({
-          loading: false,
-        });
-      });
-  }
-
-  selectArrder() {
-    const key = "AWBBZ-GRAC2-JFYUO-CLA7I-JAHXK-YFFGT"; //使用在腾讯位置服务申请的key
-    const referer = "科德打卡定位"; //调用插件的app的名称
-    const category = "公司企业,房产小区";
-    Taro.navigateTo({
-      url:
-        "plugin://chooseLocation/index?key=" +
-        key +
-        "&referer=" +
-        referer +
-        "&category=" +
-        category,
-    });
-  }
-
-  getNumHourse(startTime, endTime) {
-    this.setState({
-      totalDuration: getNumHourse(
-        startTime,
-        endTime,
-        this.state.validDates.length
-      ),
-    });
-  }
-
-  getWorkingHoursList() {
-    getWorkingHoursList({})
-      .then((v) => {
-        if (v.error.length === 0) {
-          let obj = Taro.getStorageSync("userInfor");
-          let index = v.data.findIndex(
-            (value) => value.type === obj.workTimeInfor.type
-          );
-          this.setState({
-            workType: index !== -1 ? index : 0,
-          });
-          this.setState({
-            workTypeList: v.data,
-          });
-        } else {
-          Taro.showToast({
-            title: v.error[0].message,
-            icon: "none",
-          });
-        }
-      })
-      .catch((err) => {
-        //console.log(err);
-      });
-  }
-
-  onPickerHide() {
-    this.setState({
-      isPickerRender: false,
-    });
-  }
-
-  onSetPickerTime(val) {
-    let data = val.detail;
-    this.setState({
-      rangeStartMinuteVal: data.selectStartTime,
-      rangeEndMinuteVal: data.selectEndTime,
-    });
-    let arr = [];
-    if (data.startTime && data.endTime) {
-      let a = dayjs(data.startTime);
-      let b = dayjs(data.endTime);
-      let num;
-      if (a.hour() <= b.hour()) {
-        num = b.diff(a, "day") + 1;
-      } else {
-        num = b.diff(a, "day") + 2;
-      }
-      let strAdd = data.startTime;
-      for (let i = 0; i < num; i++) {
-        let time = dayjs(strAdd).add(i, "days").format("YYYY-MM-DD");
-        arr.push({ value: time });
-      }
-    }
-    this.setState({
-      rangeEndVal: dayjs(data.endTime).format("YYYY-MM-DD"),
-      rangeStartVal: dayjs(data.startTime).format("YYYY-MM-DD"),
-      validDates: arr,
-    }, () => {
-      let a1 = dayjs(dayjs(data.endTime).format("YYYY-MM-DD HH:mm:ss"));
-      let b1 = dayjs(dayjs(data.startTime).format("YYYY-MM-DD  HH:mm:ss"));
-      this.getNumHourse(b1, a1);
-    });
-  }
-
-
-  render() {
-    const {  } = this.state
-    return (
-      <View className="subform">
-        <View className="title">差旅费报销</View>
-        <View className="inputFormItem">
-          <AtInput
-            name='sncf'
-            title='公出企业:'
-            type='text'
-            placeholder='请填写公出企业'
-            value={this.state.sncf}
-            onChange={e => { console.log("---", e) }}
-          />
-        </View>
-        <View className="inputFormItem">
-          <AtInput
-            name='sncf'
-            title='公出地点:'
-            type='text'
-            placeholder='请填写公出地点'
-            value={this.state.sncf}
-            onChange={e => { console.log("---", e) }}
-          />
-        </View>
-        <View className="formItem">
-          <View className="formName">公出时间:</View>
-          <View className="formValue">
-            <View
-              className="time"
-              onClick={() => {
-                this.setState({
-                  isPickerRender: true,
-                });
-              }}
-            >
-              {this.state.rangeStartMinuteVal &&
-                this.state.rangeEndMinuteVal ? (
-                <View className="timeContent">
-                  <View>开始时间:{this.state.rangeStartMinuteVal}</View>
-                  <View>结束时间:{this.state.rangeEndMinuteVal}</View>
-                </View>
-              ) : (
-                "请选择时间"
-              )}
-            </View>
-            <timePicker
-              config={{
-                endDate: true,
-                column: "minute",
-                dateLimit: false,
-                limitStartTime: dayjs()
-                  .subtract(3, "year")
-                  .format("YYYY-MM-DD HH:mm:ss"),
-                limitEndTime: dayjs()
-                  .add(3, "year")
-                  .format("YYYY-MM-DD HH:mm:ss"),
-              }}
-              isPartition
-              pickerShow={this.state.isPickerRender}
-              onconditionaljudgment={(v) => {
-                let a = dayjs(
-                  dayjs(v.detail.endTime)
-                    .second(0)
-                    .format("YYYY-MM-DD HH:mm:ss")
-                );
-                let b = dayjs(dayjs().second(0).format("YYYY-MM-DD HH:mm:ss"));
-                if (a.isBefore(b)) {
-                  Taro.showToast({
-                    title: "结束时间不能小于当前时间",
-                    icon: "none",
-                  });
-                  v.detail.setLv(false);
-                }
-              }}
-              onhidepicker={() => {
-                this.onPickerHide();
-              }}
-              onsetpickertime={(v) => {
-                this.onSetPickerTime(v);
-              }}
-            />
-          </View>
-        </View>
-        <View className="formItem">
-          <View className="formName">公出时长:</View>
-          <View className="formValue">{this.state.totalDuration}小时</View>
-        </View>
-        <View className="formItem">
-          <View className="formName">申请类型:</View>
-          <View className="formValue"></View>
-        </View>
-        <View className="formItem">
-          <View className="formName">报销至订单:</View>
-          <View className="formValue"></View>
-        </View>
-        <View className="formTitle">
-          报销详细
-        </View>
-        <View className="formItem">
-          <View className="formName">申请人:</View>
-          <View className="formValue"></View>
-        </View>
-        <View className="formItem">
-          <View className="formName">报销公司:</View>
-          <View className="formValue"></View>
-        </View>
-        <View className="formItem">
-          <View className="formName">支付公司:</View>
-          <View className="formValue"></View>
-        </View>
-        <View className="formTitle">
-          交通费
-          <Button className="ftBottom" size='mini' type='primary'>+ 增加</Button>
-        </View>
-        <View className="unobstructedList">
-          {
-            [0].map((item, index) =>
-              <View className="unItem" key={index}>
-                <View className="close">删除</View>
-                <View className="edit">编辑</View>
-                <View className="formItem">
-                  <View className="formName">交通工具:</View>
-                  <View className="formValue"></View>
-                </View>
-                <View className="formItem">
-                  <View className="formName">时间:</View>
-                  <View className="formValue"></View>
-                </View>
-                <View className="formItem">
-                  <View className="formName">地点:</View>
-                  <View className="formValue"></View>
-                </View>
-                <View className="formItem">
-                  <View className="formName">金额:</View>
-                  <View className="formValue"></View>
-                </View>
-              </View>
-            )
-          }
-        </View>
-        <View className="inputFormItem">
-          <AtInput
-            name='zsf'
-            title='住宿费:'
-            type='number'
-            placeholder='请输入金额(元)'
-            value={this.state.zsf}
-            onChange={e => { console.log("---", e) }}
-          />
-        </View>
-        <View className="inputFormItem">
-          <AtInput
-            name='sncf'
-            title='市内车费:'
-            type='number'
-            placeholder='请输入金额(元)'
-            value={this.state.sncf}
-            onChange={e => { console.log("---", e) }}
-          />
-        </View>
-        <View className="inputFormItem">
-          <AtInput
-            name='cf'
-            title='餐费:'
-            type='number'
-            placeholder='请输入金额(元)'
-            value={this.state.cf}
-            onChange={e => { console.log("---", e) }}
-          />
-        </View>
-        <View className="inputFormItem">
-          <AtInput
-            name='ccbt'
-            title='出差补贴:'
-            type='number'
-            placeholder='请输入金额(元)'
-            value={this.state.ccbt}
-            onChange={e => { console.log("---", e) }}
-          />
-        </View>
-        <View className="inputFormItem">
-          <AtInput
-            name='yjz'
-            title='预借支:'
-            type='number'
-            placeholder='请输入金额(元)'
-            value={this.state.yjz}
-            onChange={e => { console.log("---", e) }}
-          />
-        </View>
-        <View className="inputFormItem">
-          <AtInput
-            name='qt'
-            title='其他:'
-            type='number'
-            placeholder='请输入金额(元)'
-            value={this.state.qt}
-            onChange={e => { console.log("---", e) }}
-          />
-        </View>
-        <View className="formItem" style={{ paddingTop: "10px" }}>
-          <View className="formName">总金额:</View>
-          <View className="formValue"><Text style={{ color: "red" }}>100</Text>(元)</View>
-        </View>
-        <View className="formItem" style={{ display: "block", paddingBottom: 0 }}>
-          <View className="formName">附件:</View>
-          <View
-            className="formValue"
-            style={{ paddingTop: "10px", textAlign: "left" }}
-          >
-            <ImagePicker
-              showAddBtn
-              ref={(ref) => (this.imagePickerRef = ref)}
-              url="/api/admin/release/upload"
-              onChange={this.onChange}
-            />
-          </View>
-        </View>
-        <View className="tips">上传附件要求</View>
-        <View className="tips">①需要提供发票报销</View>
-        <View className="tips">②需要填写报销明细表</View>
-        <View className="tips">③招待费需要提供报备截图</View>
-        <View className="formTitle" style={{ marginTop: "20px" }}>
-          报销收款账户
-        </View>
-        <View className="unobstructedList">
-          <View className="unItem" >
-            <View className="edit">修改</View>
-            <View className="formItem">
-              <View className="formName">收款人:曹津</View>
-            </View>
-            <View className="formItem">
-              <View className="formName">收款账户:4005201205500020</View>
-            </View>
-          </View>
-        </View>
-        <View className="bottom">
-          <AtButton
-            type="primary"
-            circle
-            onClick={() => {
-            }}
-          >
-            提交申请
-          </AtButton>
-        </View>
-      </View>
-    );
-  }
-}
-
-export default SubmitForm;

+ 0 - 152
src/pages/applyReimbursement/submitform.less

@@ -1,152 +0,0 @@
-.subform {
-  padding: 20px 30px;
-
-  .title {
-    font-size: 36px;
-    font-weight: bold;
-    margin: 0 auto 30px;
-    text-align: center;
-  }
-
-  .formItem {
-    display: flex;
-    align-items: center;
-    font-size: 30px;
-    padding-bottom: 28px;
-
-    .formName {
-      white-space: nowrap;
-      display: flex;
-      align-items: center;
-      
-    }
-
-    .formValue {
-      text-align: right;
-      flex: 1;
-      display: flex;
-      flex-flow: row nowrap;
-      align-items: center;
-      justify-content: flex-end;
-
-      .button {
-        font-size: 22px;
-        padding: 0 10px;
-
-      }
-
-      .time {
-        flex: 1;
-        font-size: 30px;
-        color: #bfbdbd;
-
-        .timeContent {
-          display: flex;
-          flex-flow: column nowrap;
-          align-items: flex-end;
-          justify-content: center;
-        }
-      }
-
-      .formValueText {
-        display: block;
-        width: 452px;
-        text-overflow: ellipsis;
-        overflow: hidden;
-        white-space: nowrap;
-      }
-    }
-  }
-
-  .formTitle {
-    font-size: 32px;
-    font-weight: bold;
-    border-top: 1px solid #eae8e8;
-    padding: 20px 0;
-    display: flex;
-    flex-direction: row;
-    align-items: center;
-    justify-content: space-between;
-
-    .ftBottom {
-      margin: 0;
-    }
-
-  }
-
-  .unobstructedList {
-    .unItem {
-      position: relative;
-      border-radius: 10px;
-      background: #eae8e8;
-      padding: 20px 20px 0;
-      margin-bottom: 20px;
-
-      .edit {
-        position: absolute;
-        top: 20px;
-        right: 20px;
-        font-size: 26px;
-        background: rgb(97, 144, 232);
-        color: #fff;
-        padding: 10px;
-        border-radius: 8px;
-
-      }
-
-      .close {
-        position: absolute;
-        bottom: 20px;
-        right: 20px;
-        font-size: 26px;
-        background:red;
-        color: #fff;
-        padding: 10px;
-        border-radius: 8px;
-
-      }
-
-
-    }
-  }
-
-  .inputFormItem {
-    display: flex;
-    align-items: center;
-    font-size: 30px;
-
-    .at-input input{
-      font-size: 30px;
-    }
-
-    .at-input {
-      width: 100%;
-      margin-left: 0;
-      padding: 10px 0;
-
-      .at-input__title {
-        font-size: 30px;
-        color: #000000;
-
-      }
-
-    }
-
-
-  }
-
-  .tips {
-    color: #ff0000;
-    font-size: 20px;
-    margin-left: 20px;
-
-  }
-
-  .bottom{
-    width: 60%;
-    padding: 30px 0;
-    margin: 0 auto;
-  }
-
-
-}

+ 1 - 1
src/pages/applyDepart/index.config.js

@@ -1,5 +1,5 @@
 export default {
-  navigationBarTitleText: '申请公出',
+  navigationBarTitleText: '报销信息填写',
   usingComponents: {
     timePicker: '../../components/common/timePicker/timePicker'
   }

+ 531 - 0
src/pages/drafts/index.jsx

@@ -0,0 +1,531 @@
+import React, { Component } from "react";
+import Taro, { getCurrentInstance } from "@tarojs/taro";
+import { Button, Text, View } from "@tarojs/components";
+import dayjs from "dayjs";
+import "./index.less";
+import ImagePicker from "../../components/common/imagePicker";
+import InquiryModal from "../../components/common/inquiryModal";
+import { AtButton, AtInput } from "taro-ui";
+import {
+  getPridDetail,
+  getAccountList,
+  detailsDelete
+} from "../../utils/servers/servers";
+import {
+  getNumHourse,
+  getAccountName,
+  getTypeName,
+  getVehicleName,
+  commonAdd,
+} from "../../utils/tools";
+import "taro-ui/dist/style/components/form.scss";
+import "taro-ui/dist/style/components/button.scss";
+import "taro-ui/dist/style/components/loading.scss";
+import "taro-ui/dist/style/components/icon.scss";
+import "taro-ui/dist/style/components/icon.scss";
+import "taro-ui/dist/style/components/textarea.scss";
+import "taro-ui/dist/style/components/input.scss";
+
+import "./index.less";
+import NewModal from "./modal"
+
+class Drafts extends Component {
+  $instance = getCurrentInstance();
+
+  constructor(props) {
+    super(props);
+    this.state = {
+      data: {},
+      visible: "",
+      list: [],
+      total: 0,
+    };
+    this.getNumHourse = this.getNumHourse.bind(this);
+  }
+
+  componentDidMount() {
+    this.$instance.router.params &&
+      this.$instance.router.params.id && (
+        this.getDetail(),
+        this.getAccountList()
+      )
+  }
+
+  onInputChange(title, value) {
+
+  }
+
+  // 费用弹窗
+  onClose() {
+    this.setState({
+      visible: "",
+    })
+    this.getAccountList()
+  }
+
+  // 报销单详情
+  getDetail() {
+    getPridDetail({
+      id: this.$instance.router.params.id,
+    }).then(v => {
+      if (v.error.length === 0) {
+        this.setState({
+          data: v.data,
+          rangeStartMinuteVal: v.data.releaseStartStr,
+          rangeEndMinuteVal: v.data.releaseEndStr,
+          totalDuration: v.data.duration,
+        })
+      } else {
+        Taro.showToast({ title: v.error[0].message, icon: 'none' })
+      }
+    }).catch(() => {
+      Taro.showToast({
+        title: '系统错误,请稍后再试',
+        icon: 'none'
+      })
+    })
+  }
+
+  // 报销详情金额列表
+  getAccountList() {
+    getAccountList({
+      eaid: this.$instance.router.params.id,
+    }).then(v => {
+      if (v.error.length === 0) {
+        let sum = 0
+        for (var i = 0; i < v.data.length; i++) {
+          // sum += v.data[i].amount
+          sum = commonAdd(sum, v.data[i].amount)
+        }
+        this.setState({
+          list: v.data,
+          total: sum,
+        })
+
+      } else {
+        Taro.showToast({ title: v.error[0].message, icon: 'none' })
+      }
+    }).catch(() => {
+      Taro.showToast({
+        title: '系统错误,请稍后再试',
+        icon: 'none'
+      })
+    })
+  }
+
+  // 删除报销详情
+  detailsDelete(id) {
+    detailsDelete({
+      id,
+    }).then(v => {
+      if (v.error.length === 0) {
+        Taro.showToast({ title: "操作成功", icon: 'none' })
+        this.getAccountList()
+      } else {
+        Taro.showToast({ title: v.error[0].message, icon: 'none' })
+      }
+    }).catch(() => {
+      Taro.showToast({
+        title: '系统错误,请稍后再试',
+        icon: 'none'
+      })
+    })
+  }
+
+
+  onSubmit() {
+    if (!this.state.rangeStartMinuteVal) {
+      Taro.showToast({ title: "请选择公出时间", icon: "none" });
+      return;
+    }
+    if (!this.state.rangeEndMinuteVal) {
+      Taro.showToast({ title: "请选择公出时间", icon: "none" });
+      return;
+    }
+    if ("") {
+      Taro.showToast({ title: "请选择公出地点", icon: "none" });
+      return;
+    }
+    this.setState({
+      loading: true,
+    });
+    let datas = {
+      uids: this.props.enterpriseInfor.id,
+      releaseStarts: this.state.rangeStartMinuteVal,
+      releaseEnds: this.state.rangeEndMinuteVal,
+    };
+    // addPublicRelease(datas)
+    //   .then((v) => {
+    //     this.setState({
+    //       loading: false,
+    //     })
+    //     if (v.error.length === 0) {
+
+    //     } else {
+    //       Taro.showToast({
+    //         title: v.error[0].message,
+    //         icon: "none",
+    //       });
+    //     }
+    //   })
+    //   .catch(() => {
+    //     this.setState({
+    //       loading: false,
+    //     });
+    //   });
+  }
+
+
+  getNumHourse(startTime, endTime) {
+    this.setState({
+      totalDuration: getNumHourse(
+        startTime,
+        endTime,
+        this.state.validDates.length
+      ),
+    });
+  }
+
+
+  onPickerHide() {
+    this.setState({
+      isPickerRender: false,
+    });
+  }
+
+
+  onSetPickerTime(val) {
+    let data = val.detail;
+    this.setState({
+      rangeStartMinuteVal: data.selectStartTime,
+      rangeEndMinuteVal: data.selectEndTime,
+    });
+    let arr = [];
+    if (data.startTime && data.endTime) {
+      let a = dayjs(data.startTime);
+      let b = dayjs(data.endTime);
+      let num;
+      if (a.hour() <= b.hour()) {
+        num = b.diff(a, "day") + 1;
+      } else {
+        num = b.diff(a, "day") + 2;
+      }
+      let strAdd = data.startTime;
+      for (let i = 0; i < num; i++) {
+        let time = dayjs(strAdd).add(i, "days").format("YYYY-MM-DD");
+        arr.push({ value: time });
+      }
+    }
+    this.setState({
+      rangeEndVal: dayjs(data.endTime).format("YYYY-MM-DD"),
+      rangeStartVal: dayjs(data.startTime).format("YYYY-MM-DD"),
+      validDates: arr,
+    }, () => {
+      let a1 = dayjs(dayjs(data.endTime).format("YYYY-MM-DD HH:mm:ss"));
+      let b1 = dayjs(dayjs(data.startTime).format("YYYY-MM-DD  HH:mm:ss"));
+      this.getNumHourse(b1, a1);
+    });
+  }
+
+
+  render() {
+    const { data, list, total } = this.state
+    return (
+      <View className="subform">
+        <View className="title">{[data.typeOther, "差旅费报销", "餐费报销", "第三方付款", "申请预借支"][data.type]}</View>
+        <View className="inputFormItem">
+          <AtInput
+            name='userNames'
+            title='公出企业:'
+            type='text'
+            placeholder='请填写公出企业'
+            value={data.userNames}
+            onChange={e => { data.userNames = e }}
+          />
+        </View>
+        <View className="inputFormItem">
+          <AtInput
+            name='districtName'
+            title='公出地点:'
+            type='text'
+            placeholder='请填写公出地点'
+            value={data.districtName}
+            onChange={e => { data.districtName = e }}
+          />
+        </View>
+        <View className="formItem">
+          <View className="formName">公出时间:</View>
+          <View className="formValue">
+            <View
+              className="time"
+              onClick={() => {
+                this.setState({
+                  isPickerRender: true,
+                });
+              }}
+            >
+              {this.state.rangeStartMinuteVal &&
+                this.state.rangeEndMinuteVal ? (
+                <View className="timeContent">
+                  <View style={{ textAlign: "center" }}>{this.state.rangeStartMinuteVal}</View>
+                  &nbsp;&nbsp;至&nbsp;&nbsp;
+                  <View style={{ textAlign: "center" }}>{this.state.rangeEndMinuteVal}</View>
+                </View>
+              ) : (
+                "请选择时间"
+              )}
+            </View>
+            <timePicker
+              config={{
+                endDate: true,
+                column: "minute",
+                dateLimit: false,
+                limitStartTime: dayjs()
+                  .subtract(3, "year")
+                  .format("YYYY-MM-DD HH:mm:ss"),
+                limitEndTime: dayjs()
+                  .add(3, "year")
+                  .format("YYYY-MM-DD HH:mm:ss"),
+              }}
+              isPartition
+              pickerShow={this.state.isPickerRender}
+              onconditionaljudgment={(v) => {
+                let a = dayjs(
+                  dayjs(v.detail.endTime)
+                    .second(0)
+                    .format("YYYY-MM-DD HH:mm:ss")
+                );
+                // let b = dayjs(dayjs().second(0).format("YYYY-MM-DD HH:mm:ss"));
+                // if (a.isBefore(b)) {
+                //   Taro.showToast({
+                //     title: "结束时间不能小于当前时间",
+                //     icon: "none",
+                //   });
+                //   v.detail.setLv(false);
+                // }
+              }}
+              onhidepicker={() => {
+                this.onPickerHide();
+              }}
+              onsetpickertime={(v) => {
+                this.onSetPickerTime(v);
+              }}
+            />
+          </View>
+        </View>
+        <View className="formItem">
+          <View className="formName">公出时长:</View>
+          <View className="formValue">{this.state.totalDuration}小时</View>
+        </View>
+        <View className="formItem">
+          <View className="formName">申请类型:</View>
+          <View className="formValue">{getAccountName(data.type, data.typeOther)}</View>
+        </View>
+        {/* <View className="formItem">
+          <View className="formName">报销至订单:</View>
+          <View className="formValue"></View>
+        </View> */}
+        <View className="formTitle">
+          报销详细
+        </View>
+        <View className="formItem">
+          <View className="formName">申请人:</View>
+          <View className="formValue">{data.aname}</View>
+        </View>
+        <View className="formItem">
+          <View className="formName">报销公司:</View>
+          <View className="formValue">{data.appDepName}</View>
+        </View>
+        <View className="formItem">
+          <View className="formName">支付公司:</View>
+          <View className="formValue">{data.payDepName}</View>
+        </View>
+        <View className="formTitle">
+          报销费用详细
+          <Button className="ftBottom" size='mini' type='primary'
+            onClick={() => {
+              this.setState({ visible: "add" })
+            }}>+ 增加</Button>
+        </View>
+        {this.state.visible != "" &&
+          <NewModal
+            eaid={this.$instance.router.params.id}
+            visible={this.state.visible}
+            onClose={this.onClose.bind(this)}
+          />}
+        {list?.map(item =>
+          item.type == 1
+            ? <View className="unItem" key={item.id}>
+              <View className="close"
+                onClick={() => {
+                  this.setState({
+                    isInquiryOpened: true,
+                    inquiryTitle: "提醒",
+                    inquiryContent: "您确定要删除吗?",
+                    inquiryFn: () => {
+                      this.detailsDelete(item.id);
+                    },
+                  });
+                }}
+              >删除</View>
+              <View className="edit">编辑</View>
+              <View className="formItem">
+                <View className="formName">交通工具:</View>
+                <View className="formValue">{getVehicleName(item.vehicle, item.vehicleOther)}</View>
+              </View>
+              <View className="formItem">
+                <View className="formName">时间:</View>
+                <View className="formValue">
+                  <View className="ftxt">{item.startTimeStr}</View>
+                  &nbsp;&nbsp;至&nbsp;&nbsp;
+                  <View className="ftxt">{item.endTimeStr}</View>
+                </View>
+              </View>
+              <View className="formItem">
+                <View className="formName">地点:</View>
+                <View className="formValue">
+                  <View className="ftxt">{item.startDistrict}</View>
+                  &nbsp;&nbsp;至&nbsp;&nbsp;
+                  <View className="ftxt">{item.endDistrict}</View>
+                </View>
+              </View>
+              <View className="formItem">
+                <View className="formName">金额:</View>
+                <View className="formValue">{item.amount}(元)</View>
+              </View>
+            </View>
+            : <View className="inputFormItems" key={item.id}>
+              <AtInput
+                name={item.id}
+                title={getTypeName(item.type) + ":"}
+                type='number'
+                placeholder='请输入金额(元)'
+                value={item.amount}
+              // onChange={e => { console.log("---", e) }}
+              />
+              (元)
+              <View className="close"
+                onClick={() => {
+                  this.setState({
+                    isInquiryOpened: true,
+                    inquiryTitle: "提醒",
+                    inquiryContent: "您确定要删除吗?",
+                    inquiryFn: () => {
+                      this.detailsDelete(item.id);
+                    },
+                  });
+                }}
+              >删除</View>
+            </View>)}
+        {/* <View className="unobstructedList">
+          {
+            [0].map((item, index) =>
+              <View className="unItem" key={index}>
+                <View className="close">删除</View>
+                <View className="edit">编辑</View>
+                <View className="formItem">
+                  <View className="formName">交通工具:</View>
+                  <View className="formValue"></View>
+                </View>
+                <View className="formItem">
+                  <View className="formName">时间:</View>
+                  <View className="formValue"></View>
+                </View>
+                <View className="formItem">
+                  <View className="formName">地点:</View>
+                  <View className="formValue"></View>
+                </View>
+                <View className="formItem">
+                  <View className="formName">金额:</View>
+                  <View className="formValue"></View>
+                </View>
+              </View>
+            )
+          }
+        </View>
+        <View className="inputFormItem">
+          <AtInput
+            name='qt'
+            title='其他:'
+            type='number'
+            placeholder='请输入金额(元)'
+            value={this.state.qt}
+            onChange={e => { console.log("---", e) }}
+          />
+        </View> */}
+        <View className="formItem" style={{ paddingTop: "10px" }}>
+          <View className="formName">总金额:</View>
+          <View className="formValue"><Text style={{ color: "red" }}>{total}</Text>(元)</View>
+        </View>
+        <View className="formItem" style={{ display: "block", paddingBottom: 0 }}>
+          <View className="formName">附件:</View>
+          <View
+            className="formValue"
+            style={{ paddingTop: "10px", textAlign: "left" }}
+          >
+            <ImagePicker
+              showAddBtn
+              ref={(ref) => (this.imagePickerRef = ref)}
+              url="/api/admin/release/upload"
+              onChange={this.onChange}
+            />
+          </View>
+        </View>
+        <View className="tips">上传附件要求</View>
+        <View className="tips">①需要提供发票报销</View>
+        <View className="tips">②需要填写报销明细表</View>
+        <View className="tips">③招待费需要提供报备截图</View>
+        <View className="formTitle" style={{ marginTop: "20px" }}>
+          报销收款账户
+        </View>
+        <View className="unobstructedList">
+          <View className="unItem" >
+            <View className="edit">修改</View>
+            <View className="formItem">
+              <View className="formName">收款人:曹津</View>
+            </View>
+            <View className="formItem">
+              <View className="formName">收款账户:4005201205500020</View>
+            </View>
+          </View>
+        </View>
+        <View className="bottom">
+          <AtButton
+            type="primary"
+            circle
+            onClick={() => {
+            }}
+          >
+            提交申请
+          </AtButton>
+        </View>
+        {/* 二级确认弹窗 */}
+        <InquiryModal
+          isOpened={this.state.isInquiryOpened}
+          title={this.state.inquiryTitle}
+          content={this.state.inquiryContent}
+          onClose={() => {
+            this.setState({
+              isInquiryOpened: false,
+              inquiryTitle: "",
+              inquiryContent: "",
+              isNo: true,
+            });
+          }}
+          onDetermine={() => {
+            this.state.inquiryFn();
+            this.setState({
+              isInquiryOpened: false,
+              inquiryTitle: "",
+              inquiryContent: "",
+              isNo: true,
+              inquiryFn: () => { },
+            });
+          }}
+        />
+      </View>
+    );
+  }
+}
+
+export default Drafts;

+ 355 - 0
src/pages/drafts/index.less

@@ -0,0 +1,355 @@
+.subform {
+  padding: 20px 30px;
+
+  .title {
+    font-size: 36px;
+    font-weight: bold;
+    margin: 0 auto 30px;
+    text-align: center;
+  }
+
+  .formItem {
+    display: flex;
+    align-items: center;
+    font-size: 30px;
+    padding: 15px 0;
+
+    .formName {
+      white-space: nowrap;
+      display: flex;
+      align-items: center;
+
+    }
+
+    .formValue {
+      text-align: right;
+      flex: 1;
+      display: flex;
+      flex-flow: row nowrap;
+      align-items: center;
+      justify-content: flex-end;
+
+      .button {
+        font-size: 22px;
+        padding: 0 10px;
+
+      }
+
+      .time {
+        flex: 1;
+        font-size: 30px;
+        // color: #bfbdbd;
+
+        .timeContent {
+          display: flex;
+          flex-direction: row;
+          align-items: center;
+          flex-wrap: nowrap;
+          // flex-flow: column nowrap;
+          // align-items: flex-end;
+          // justify-content: center;
+        }
+      }
+
+      .formValueText {
+        display: block;
+        width: 452px;
+        text-overflow: ellipsis;
+        overflow: hidden;
+        white-space: nowrap;
+      }
+    }
+  }
+
+  .formTitle {
+    font-size: 32px;
+    font-weight: bold;
+    border-top: 1px solid #eae8e8;
+    padding: 20px 0;
+    display: flex;
+    flex-direction: row;
+    align-items: center;
+    justify-content: space-between;
+
+    .ftBottom {
+      margin: 0;
+    }
+
+  }
+
+  // .unobstructedList {
+
+  // }
+
+  .unItem {
+    position: relative;
+    border-radius: 10px;
+    background: #eae8e8;
+    padding: 20px 20px 0;
+    margin-bottom: 20px;
+
+    .edit {
+      position: absolute;
+      top: 20px;
+      right: 20px;
+      font-size: 26px;
+      background: rgb(97, 144, 232);
+      color: #fff;
+      padding: 10px;
+      border-radius: 8px;
+
+    }
+
+    .close {
+      position: absolute;
+      bottom: 20px;
+      right: 20px;
+      font-size: 26px;
+      background: red;
+      color: #fff;
+      padding: 10px;
+      border-radius: 8px;
+
+    }
+
+    .formItem {
+      display: flex;
+      align-items: center;
+      font-size: 30px;
+      padding: 15px 0;
+
+      .formName{
+        width: 136px;
+        margin-right: 16px;
+        white-space: nowrap;
+        display: flex;
+        align-items: center;
+      }
+
+      .formValue {
+        flex: 1;
+        display: flex;
+        flex-flow: row nowrap;
+        align-items: center;
+        justify-content: flex-start;
+
+        .ftxt{
+          width: 40%;
+          text-align: center;
+        }
+  
+      }
+
+    }
+
+
+  }
+
+  .inputFormItem {
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    font-size: 30px;
+
+    .close {
+      font-size: 26px;
+      background: red;
+      color: #fff;
+      padding: 10px;
+      border-radius: 8px;
+      margin-right: 20px;
+
+    }
+
+    .at-input input {
+      font-size: 30px;
+    }
+
+    .at-input {
+      width: 100%;
+      margin-left: 0;
+      padding: 15px 0;
+
+      .at-input__title {
+        font-size: 30px;
+        color: #000000;
+
+      }
+
+      .at-input__input {
+        font-size: 30px;
+
+      }
+
+    }
+
+    .at-input::after {
+      border: 0;
+    }
+
+  }
+
+  .inputFormItems {
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    font-size: 30px;
+
+    .close {
+      font-size: 26px;
+      background: red;
+      color: #fff;
+      padding: 10px;
+      border-radius: 8px;
+      margin-right: 20px;
+
+    }
+
+    .at-input input {
+      font-size: 30px;
+    }
+
+    .at-input {
+      width: 70%;
+      margin-left: 0;
+      padding: 15px 0;
+
+      .at-input__title {
+        font-size: 30px;
+        color: #000000;
+
+      }
+
+      .at-input__input {
+        font-size: 30px;
+
+      }
+
+    }
+
+    .at-input::after {
+      border: 0;
+    }
+
+  }
+
+  .tips {
+    color: #ff0000;
+    font-size: 20px;
+    margin-left: 20px;
+
+  }
+
+  .bottom {
+    width: 60%;
+    padding: 30px 0;
+    margin: 0 auto;
+  }
+
+
+}
+
+.at-modal__container {
+  width: 710px;
+}
+
+.modal {
+  // min-height: 400px;
+
+  .picker {
+    display: flex;
+    flex-direction: row;
+    align-items: center;
+    margin: 25px 0 20px;
+
+    .ptit {
+      display: flex;
+      flex-direction: row;
+      margin-right: 16px;
+      width: 172px;
+      font-size: 30px;
+      line-height: 1.5;
+      vertical-align: middle;
+      text-align: left;
+    }
+
+    picker {
+      width: 70%;
+    }
+
+  }
+
+  .at-input input {
+    font-size: 30px;
+  }
+
+  .at-input {
+    width: 100%;
+    margin-left: 0;
+    padding: 15px 0;
+
+    .at-input__title {
+      font-size: 30px;
+      color: #000000;
+
+    }
+
+    .at-input__input {
+      font-size: 30px;
+
+    }
+
+  }
+
+  .at-input::after {
+    border: 0;
+  }
+
+  .pub {
+    display: flex;
+    flex-direction: row;
+    align-items: center;
+    padding: 15px 0;
+    // margin: 25px 0 20px;
+
+    .ptit {
+      display: flex;
+      flex-direction: row;
+      margin-right: 16px;
+      width: 172px;
+      font-size: 30px;
+      line-height: 1.5;
+      vertical-align: middle;
+      text-align: left;
+
+    }
+
+    .ptxt {
+      width: 70%;
+      display: flex;
+      flex-direction: row;
+      align-items: center;
+      flex-wrap: nowrap;
+
+      .pin {
+        text-align: center;
+        border-bottom: 1px solid #eae8e8;
+      }
+
+      .pick {
+        display: flex;
+        flex-direction: row;
+        flex-wrap: nowrap;
+        // font-size: 28px;
+
+        .ptime {
+          text-align: center;
+          border-bottom: 1px solid #eae8e8;
+        }
+
+      }
+
+    }
+  }
+
+}

+ 294 - 0
src/pages/drafts/modal.jsx

@@ -0,0 +1,294 @@
+import React, { Component } from "react";
+import Taro from "@tarojs/taro";
+import { View, Icon, Button, Picker, Input } from '@tarojs/components'
+import { AtButton, AtIcon, AtInput, AtModal, AtModalHeader, AtModalContent, AtModalAction } from "taro-ui";
+import { typeList, vehiclelist } from '../../utils/tools/config';
+import { getNumHourse } from "../../utils/tools";
+import { detailsAdd } from "../../utils/servers/servers";
+
+import dayjs from "dayjs";
+import './index.less';
+
+import "taro-ui/dist/style/components/icon.scss";
+
+class Modal extends Component {
+  constructor(props) {
+    super(props);
+    this.state = {
+      data: {
+        type: {},
+        vehicle: {},
+      }
+    };
+  }
+
+  getNumHourse(startTime, endTime) {
+    this.setState({
+      totalDuration: getNumHourse(
+        startTime,
+        endTime,
+        this.state.validDates.length
+      ),
+    });
+  }
+
+  onPickerHide() {
+    this.setState({
+      isPickerRender: false,
+    });
+  }
+
+  onSetPickerTime(val) {
+    let data = val.detail;
+    this.setState({
+      rangeStartMinuteVal: data.selectStartTime,
+      rangeEndMinuteVal: data.selectEndTime,
+    });
+    let arr = [];
+    if (data.startTime && data.endTime) {
+      let a = dayjs(data.startTime);
+      let b = dayjs(data.endTime);
+      let num;
+      if (a.hour() <= b.hour()) {
+        num = b.diff(a, "day") + 1;
+      } else {
+        num = b.diff(a, "day") + 2;
+      }
+      let strAdd = data.startTime;
+      for (let i = 0; i < num; i++) {
+        let time = dayjs(strAdd).add(i, "days").format("YYYY-MM-DD");
+        arr.push({ value: time });
+      }
+    }
+    this.setState({
+      rangeEndVal: dayjs(data.endTime).format("YYYY-MM-DD"),
+      rangeStartVal: dayjs(data.startTime).format("YYYY-MM-DD"),
+      validDates: arr,
+    }, () => {
+      let a1 = dayjs(dayjs(data.endTime).format("YYYY-MM-DD HH:mm:ss"));
+      let b1 = dayjs(dayjs(data.startTime).format("YYYY-MM-DD  HH:mm:ss"));
+      this.getNumHourse(b1, a1);
+    });
+  }
+
+  onSubmit() {
+    const { data } = this.state
+    const { eaid } = this.props
+    if (!data.type) {
+      Taro.showToast({ title: "请选择费用类型", icon: "none", });
+      return
+    }
+    data.type = data.type.value
+    if (data.type == 1) {
+      data.vehicle = data.vehicle.value
+      data.startTime = this.state.rangeStartMinuteVal
+      data.endTime = this.state.rangeEndMinuteVal
+    } else {
+      delete data.vehicle
+    }
+    let obj = {
+      eaid,
+      ...data
+    }
+    this.setState({
+      loading: true,
+    });
+    detailsAdd(obj)
+      .then((v) => {
+        this.setState({
+          loading: false,
+        });
+        if (v.error.length === 0) {
+          this.props.onClose()
+        } else {
+          Taro.showToast({
+            title: v.error[0].message,
+            icon: "none",
+          });
+        }
+      })
+      .catch(() => {
+        this.setState({
+          loading: false,
+        });
+      });
+  }
+
+
+
+  render() {
+    const { data } = this.state
+    const { visible = "", onClose } = this.props
+    return (
+      <AtModal
+        isOpened={visible != ""}
+        closeOnClickOverlay={false}
+      >
+        <AtModalHeader>{visible == "add" ? "新增费用" : visible == "edit" && "编辑费用"}</AtModalHeader>
+        <AtModalContent>
+          <View className="modal" style={{ minHeight: data.type.value == 1 && "200px" }}>
+            <View className="picker">
+              <View className="ptit"><View style={{ color: "red" }}>*&nbsp;</View>类型:</View>
+              <Picker
+                value={data.type.value}
+                range={typeList} rangeKey='label' mode='selector'
+                onChange={(e) => {
+                  this.setState({
+                    data: { ...data, type: typeList[e.detail.value] }
+                  })
+                }}>
+                <View className='selModal'>
+                  <View className='selTitle'>{!data.type.label ? "点击选择" : data.type.label}</View>
+                </View>
+              </Picker>
+            </View>
+            {/* 其他 */}
+            {/* {data.type.value == 0 &&
+              <View>
+                <AtInput
+                  required
+                  name='vehicleOther'
+                  title='类型说明:'
+                  type='text'
+                  placeholder='其他说明'
+                  value={data.vehicleOther}
+                  onChange={e => {
+                    this.setState({
+                      data: { ...data, vehicleOther: e }
+                    })
+                  }}
+                />
+              </View>} */}
+            {/* 交通费 */}
+            {data.type?.value == 1 &&
+              <View className="picker">
+                <View className="ptit"><View style={{ color: "red" }}>*&nbsp;</View>交通工具:</View>
+                <Picker
+                  value={data.vehicle.value}
+                  range={vehiclelist} rangeKey='label' mode='selector'
+                  onChange={(e) => {
+                    this.setState({
+                      data: { ...data, vehicle: vehiclelist[e.detail.value] }
+                    })
+                  }}>
+                  <View className='selModal'>
+                    <View className='selTitle'>{!data.vehicle.label ? "点击选择" : data.vehicle.label}</View>
+                  </View>
+                </Picker>
+              </View>}
+            {/* 其他 */}
+            {data.vehicle?.value == 0 &&
+              <View>
+                <AtInput
+                  required
+                  name='vehicleOther'
+                  title='工具说明:'
+                  type='text'
+                  placeholder='其他交通工具说明'
+                  value={data.vehicleOther}
+                  onChange={e => {
+                    this.setState({
+                      data: { ...data, vehicleOther: e }
+                    })
+                  }}
+                />
+              </View>}
+            {data.type?.value == 1 &&
+              <View className="pub">
+                <View className="ptit"><View style={{ color: "red" }}>*&nbsp;</View>时间:</View>
+                <View className="ptxt"
+                  onClick={() => {
+                    this.setState({
+                      isPickerRender: true,
+                    });
+                  }}
+                >
+                  {
+                    this.state.rangeStartMinuteVal &&
+                      this.state.rangeEndMinuteVal
+                      ? <View className="pick">
+                        <View className="ptime">{this.state.rangeStartMinuteVal}</View>
+                        &nbsp;&nbsp;至&nbsp;&nbsp;
+                        <View className="ptime">{this.state.rangeEndMinuteVal}</View>
+                      </View>
+                      : <View>选择时间</View>
+                  }
+                </View>
+              </View>}
+            {data.type?.value == 1 &&
+              <View className="pub">
+                <View className="ptit"><View style={{ color: "red" }}>*&nbsp;</View>地点:</View>
+                <View className="ptxt">
+                  <AtInput name="startDistrict" className="pin" type='text' placeholder='始发地' value={data.startDistrict}
+                    onChange={e => {
+                      this.setState({
+                        data: { ...data, startDistrict: e }
+                      })
+                    }}
+
+                  />
+                  &nbsp;&nbsp;至&nbsp;&nbsp;
+                  <AtInput name="endDistrict" className="pin" type='text' placeholder='目的地' value={data.endDistrict}
+                    onChange={e => {
+                      this.setState({
+                        data: { ...data, endDistrict: e }
+                      })
+                    }}
+                  />
+                </View>
+              </View>}
+            <View>
+              <AtInput
+                required
+                name='amount'
+                title='金额:'
+                type='text'
+                placeholder='请填写金额(元)'
+                value={data.amount}
+                onChange={e => {
+                  this.setState({
+                    data: { ...data, amount: e }
+                  })
+                }}
+              />
+            </View>
+          </View>
+        </AtModalContent>
+        <AtModalAction>
+          <Button onClick={onClose}>取消</Button>
+          <Button onClick={this.onSubmit.bind(this)}>确定</Button>
+        </AtModalAction>
+        <timePicker
+          config={{
+            endDate: true,
+            column: "minute",
+            dateLimit: false,
+            limitStartTime: dayjs()
+              .subtract(3, "year")
+              .format("YYYY-MM-DD HH:mm:ss"),
+            limitEndTime: dayjs()
+              .add(3, "year")
+              .format("YYYY-MM-DD HH:mm:ss"),
+          }}
+          isPartition
+          pickerShow={this.state.isPickerRender}
+          onconditionaljudgment={(v) => {
+            let a = dayjs(
+              dayjs(v.detail.endTime)
+                .second(0)
+                .format("YYYY-MM-DD HH:mm:ss")
+            );
+          }}
+          onhidepicker={() => {
+            this.onPickerHide();
+          }}
+          onsetpickertime={(v) => {
+            this.onSetPickerTime(v);
+          }}
+        />
+      </AtModal>
+    )
+  }
+}
+
+export default Modal;

+ 0 - 459
src/pages/egressDetails/enterprise.jsx

@@ -1,459 +0,0 @@
-import React, { Component } from "react";
-import { View, Text, Icon } from "@tarojs/components";
-import { getUserByName, getOrderByUid } from "../../utils/servers/servers";
-
-import { AtSearchBar, AtPagination, AtListItem, AtIcon, AtButton } from "taro-ui";
-
-import "taro-ui/dist/style/components/search-bar.scss";
-import "taro-ui/dist/style/components/button.scss";
-import "taro-ui/dist/style/components/list.scss";
-import "taro-ui/dist/style/components/icon.scss";
-import "taro-ui/dist/style/components/pagination.scss";
-import "./index.less";
-
-import ListBottomStart from "../../components/common/listBottomStart";
-
-import Taro from "@tarojs/taro";
-
-class Enterprise extends Component {
-  constructor(props) {
-    super(props);
-    this.state = {
-      value: "",
-      list: [],
-      listState: "NO_DATA",
-      selectId: 0,
-      pageNo: 1,
-      listVisible: false,
-      listValue: {},
-      orderNo: [],
-      visibles: true,
-    };
-    this.onChange = this.onChange.bind(this);
-  }
-
-  onChange(value, lv = true) {
-    this.setState({
-      value,
-    });
-    if (value.length < 2 && !lv) {
-      Taro.showToast({ title: "最少输入两个字符", icon: "none" });
-      return;
-    }
-    if (value.length < 4 && lv) {
-      return;
-    }
-    this.getList(value);
-  }
-
-  componentWillUnmount() {
-    this.setState({
-      value: "",
-      list: [],
-      listState: "NO_DATA",
-      selectId: 0,
-      pageNo: 1,
-      totalCount: 0,
-    });
-  }
-
-  getByUid(val) {
-    this.setState({
-      listState: "LOADING",
-    });
-    getOrderByUid({
-      uid: val.id,
-    }).then((msg) => {
-      if (msg.error.length === 0) {
-        let data = msg.data;
-        this.setState({
-          listState: "NO_MORE_DATA",
-          orderNo: data,
-        });
-      } else {
-        Taro.showToast({ title: msg.error[0].message, icon: "none" });
-        this.setState({
-          listState: msg.error[0].field === "403" ? "NO_DATA" : "RELOAD",
-        });
-      }
-    });
-  }
-
-  getList(value = this.state.value, pageNo = 1) {
-    Taro.showLoading({ title: "加载中..." });
-    this.setState({
-      listState: "LOADING",
-    });
-    getUserByName({
-      type: 1,
-      name: value,
-      pageNo: pageNo,
-      pageSize: 10,
-    })
-      .then((msg) => {
-        Taro.hideLoading();
-        if (msg.error.length === 0) {
-          if (msg.data.totalCount === 0) {
-            this.setState({
-              listState: "NO_DATA",
-            });
-          } else if (
-            msg.data.totalCount === this.state.list.length &&
-            pageNo !== 1
-          ) {
-            Taro.showToast({ title: "没有更多数据了", icon: "none" });
-            this.setState({
-              listState: "NO_MORE_DATA",
-            });
-          } else {
-            if (
-              msg.data.totalCount ===
-              (pageNo === 1
-                ? msg.data.list
-                : this.state.list.concat(msg.data.list)
-              ).length
-            ) {
-              this.setState({
-                listState: "NO_MORE_DATA",
-              });
-            }
-          }
-          this.setState({
-            list: msg.data.list,
-            pageNo: msg.data.pageNo,
-            totalCount: msg.data.totalCount,
-          });
-        } else {
-          Taro.showToast({ title: msg.error[0].message, icon: "none" });
-          this.setState({
-            listState: msg.error[0].field === "403" ? "NO_DATA" : "RELOAD",
-          });
-        }
-      })
-      .catch(() => {
-        Taro.hideLoading();
-        this.setState({
-          listState: "RELOAD",
-        });
-      });
-  }
-
-  render() {
-    return (
-      <>
-        <AtSearchBar
-          showActionButton
-          value={this.state.value}
-          placeholder="请输入公出企业名称"
-          onChange={this.onChange}
-          onActionClick={() => {
-            this.onChange(this.state.value, false);
-          }}
-          onConfirm={() => {
-            this.onChange(this.state.value, false);
-          }}
-          onClear={() => {
-            this.setState(
-              {
-                value: "",
-                list: [],
-                orderNo: [],
-                listValue: {},
-                listVisible: false,
-                listState: "NO_DATA",
-                selectId: 0,
-                pageNo: 1,
-                totalCount: 0,
-              },
-              () => {
-                this.props.onChange({}, 0);
-              }
-            );
-          }}
-        />
-        {
-          this.props.newList.length > 0 && this.props.type != 1 &&
-          <View className="slist">
-            <View style={{ fontSize: "30rpx" }}>本次公出列表</View>
-            {
-              this.props.newList.map((item, index) =>
-                <View className="slitems" key={index}>
-                  <Text>{index + 1}、{item.name}</Text>
-                  <AtIcon value='close' size='18'
-                    onClick={() => {
-                      let list = this.props.newList
-                      for (var i = 0; i < list.length; i++) {
-                        if (list[i].id == item.id) {
-                          list.splice(i, 1)
-                          this.setState({
-                            newList: list
-                          })
-                        }
-                      }
-                    }}
-                  />
-                </View>
-              )
-            }
-            <View className="cltips">增加企业:搜索增加更多企业</View>
-            <View className="cltips">删除企业:点击“X”删除公出列表</View>
-          </View>
-        }
-
-        {
-          this.props.jsList.length > 0 && this.props.type == 1 &&
-          <View className="slist">
-            <View style={{ fontSize: "30rpx" }}>本次公出列表</View>
-            {
-              this.props.jsList.map((item, index) =>
-                <View className="slitems" key={index}>
-                  <Text>{index + 1}、{item.name}{!!item.contractNo && `(${item.contractNo})`}</Text>
-                  <AtIcon value='close' size='18'
-                    onClick={() => {
-                      let list = this.props.jsList
-                      for (var i = 0; i < list.length; i++) {
-                        if (list[i].id == item.id) {
-                          list.splice(i, 1)
-                          this.setState({
-                            jsList: list
-                          })
-                        }
-                      }
-                    }}
-                  />
-                </View>
-              )
-            }
-            <View className="cltips">增加企业:搜索增加更多企业</View>
-            <View className="cltips">删除企业:点击“X”删除公出列表</View>
-          </View>
-        }
-
-        <View>
-          {this.props.type == 0 || this.props.type == 2 ? (
-            <View>
-              {" "}
-              {this.state.list.map((v, k) => (
-                <View
-                  style={{
-                    padding: "10px",
-                    display: "flex",
-                    flexFlow: "row",
-                    alignItems: "center",
-                    justifyContent: "space-between",
-                    borderBottom: "1px #ece6e6 solid",
-                  }}
-                  key={k}
-                  onClick={() => {
-                    if (v.status == 2 && this.props.type == 0) {
-                      Taro.showToast({
-                        title: "请在“单位公共客户”中领取后,再次发起公出!",
-                        icon: 'none'
-                      })
-                      return
-                    }
-                    let list = this.props.newList
-                    for (var i = 0; i < list.length; i++) {
-                      if (list[i].id == v.id) {
-                        Taro.showToast({
-                          title: "该企业已在公出列表中",
-                          icon: 'none'
-                        })
-                        return
-                      }
-                    }
-                    list.push(v)
-                    this.setState({
-                      newList: list
-                    })
-                    // this.setState({
-                    //   selectId: v.id,
-                    // });
-                    // this.getByUid(v)
-                    // this.props.onChange({ uid: v.id, nickname: v.name }, 0);
-                  }}
-                >
-                  <View style={{ fontSize: "15px" }}>{v.name}</View>
-                  {this.state.selectId === v.id ? (
-                    <Icon size="20" type="success_no_circle" />
-                  ) : null}
-                </View>
-              ))}{" "}
-              <ListBottomStart
-                type="pagination"
-                pageSize={10}
-                state={this.state.listState}
-                total={this.state.totalCount}
-                current={this.state.pageNo}
-                onPageChange={(type, current) => {
-                  this.getList(this.state.value, current);
-                }}
-                reload={() => {
-                  this.getList(this.state.value);
-                }}
-              />{" "}
-            </View>
-          ) : !this.state.listVisible ? (
-            <View>
-              {this.state.list.map((v, k) => (
-                <View
-                  style={{
-                    padding: "10px",
-                    display: "flex",
-                    flexFlow: "row",
-                    alignItems: "center",
-                    justifyContent: "space-between",
-                    borderBottom: "1px #ece6e6 solid",
-                  }}
-                  key={k}
-                  onClick={() => {
-                    let select = 0
-                    if (this.props.jsList.length == 0) {
-                      select = 0
-                    }
-                    for (var i = 0; i < this.props.jsList.length; i++) {
-                      if (!!this.props.jsList[i].contractNo) {
-                        select = 1
-                      }
-                    }
-                    if (select == 0) {
-                      this.setState({
-                        listVisible: true,
-                        listValue: v,
-                      });
-                      this.getByUid(v);
-                    } else {
-                      let list = this.props.jsList
-                      for (var i = 0; i < list.length; i++) {
-                        if (list[i].id == v.id) {
-                          Taro.showToast({
-                            title: "该企业已在公出列表中",
-                            icon: 'none'
-                          })
-                          return
-                        }
-                      }
-                      list.push(v)
-                      this.setState({
-                        jsList: list
-                      })
-                    }
-
-                    // this.setState({
-                    //   // selectId:v.id
-                    //   listValue: v,
-                    //   listVisible: true,
-                    // });
-                    // this.getByUid(v);
-                    // this.props.onVisible()
-                    // this.props.onChange({uid:v.id,nickname:v.name});
-                  }}
-                >
-                  <View style={{ fontSize: "15px" }}>{v.name}</View>
-                  {this.state.selectId === v.id ? (
-                    <Icon size="20" type="success_no_circle" />
-                  ) : null}
-                </View>
-              ))}{" "}
-              <ListBottomStart
-                type="pagination"
-                pageSize={10}
-                state={this.state.listState}
-                total={this.state.totalCount}
-                current={this.state.pageNo}
-                onPageChange={(type, current) => {
-                  this.getList(this.state.value, current);
-                }}
-                reload={() => {
-                  this.getList(this.state.value);
-                }}
-              />{" "}
-            </View>
-          ) : (
-            ""
-          )}
-          {this.state.listVisible && this.props.type == 1 ? (
-            <View>
-              <AtListItem
-                title={this.state.listValue.name}
-                arrow="right"
-                iconInfo={{ size: 25, color: "#000000", value: "bookmark" }}
-              />
-              <View>
-                {this.state.orderNo.length > 0 ? (
-                  <View>
-                    {" "}
-                    {this.state.orderNo.map((v, k) => (
-                      <View
-                        key={k}
-                        style={{
-                          display: "flex",
-                          justifyContent: " center",
-                          marginBottom: "20px",
-                        }}
-                      >
-                        编号:<View>{v.contractNo}</View>
-                        <View
-                          style={{
-                            width: "60px",
-                            height: "24px",
-                            backgroundColor: "#5599FF",
-                            borderRadius: "15px",
-                            textAlign: "center",
-                            lineHeight: "24px",
-                            marginLeft: "20px",
-                            color: "white",
-                          }}
-                          circle
-                          onClick={() => {
-                            this.setState({
-                              listVisible: false,
-                            });
-                            v.id = this.state.listValue.id;
-                            v.name = this.state.listValue.name;
-
-                            let list = this.props.jsList
-                            list.push(v)
-                            this.setState({
-                              jsList: list
-                            })
-
-                            // this.props.onChange(
-                            //   {
-                            //     uids: v.id,
-                            //     userNames: v.name,
-                            //     orderNo: v.orderNo,
-                            //     contractNo: v.contractNo,
-                            //   },
-                            //   1
-                            // );
-                            // Taro.eventCenter.trigger('enterprise', v)
-                          }}
-                        >
-                          选择
-                        </View>
-                      </View>
-                    ))}
-                    <View
-                      style={{ color: "red", width: "260px", margin: "0 auto" }}
-                    >
-                      注:请选择正确的派单编号!公出信息将统计至对应的订单中。
-                    </View>
-                  </View>
-                ) : (
-                  <View style={{ color: "red" }}>
-                    该企业暂无订单,无法技术公出!请联系营销员查询派单情况
-                  </View>
-                )}
-              </View>
-            </View>
-          ) : (
-            ""
-          )}
-        </View>
-      </>
-    );
-  }
-}
-
-export default Enterprise;

+ 0 - 232
src/pages/egressDetails/index.css

@@ -1,232 +0,0 @@
-.egressDetails {
-  min-height: calc(100vh - 30px);
-  background: #F5F5F5;
-  padding-bottom: 30px;
-}
-
-.egressDetails .titleContent {
-  position: relative;
-  background: white;
-  padding: 20px 30px;
-  border-bottom: 1px #dadada solid;
-}
-
-.egressDetails .titleContent .title {
-  font-weight: bolder;
-  padding-bottom: 20px;
-  display: flex;
-  flex-direction: row;
-  align-items: center;
-}
-
-.egressDetails .titleContent .title .titRight {
-  background: #1E90FF;
-  color: white;
-  padding: 5px 8px;
-  border-radius: 4px;
-  margin-left: 10px;
-  font-size: 25px;
-}
-
-.egressDetails .titleContent .address {
-  font-size: 25px;
-  color: #767272;
-  padding-bottom: 20px;
-  display: flex;
-  flex-flow: row;
-  align-items: center;
-}
-
-.egressDetails .titleContent .state {
-  font-size: 30px;
-  color: #767272;
-}
-
-.egressDetails .titleContent .startIcon {
-  width: 180px;
-  height: 180px;
-  position: absolute;
-  right: 55px;
-  bottom: 0px;
-}
-
-.egressDetails .valueContent {
-  margin: 20px;
-  padding: 30px;
-  background: white;
-  border-radius: 20px;
-}
-
-.egressDetails .valueContent .item {
-  padding-bottom: 30px;
-}
-
-.egressDetails .valueContent .item .title {
-  display: flex;
-  flex-flow: row nowrap;
-  align-items: center;
-  justify-content: space-between;
-  color: #b7acac;
-  font-size: 27px;
-  padding-bottom: 10px;
-  position: relative;
-}
-
-.egressDetails .valueContent .item .title .titleTips {
-  color: #ff0000;
-  font-size: 18px;
-  padding-left: 10px;
-}
-
-.egressDetails .valueContent .item .title .edit {
-  position: absolute;
-  right: -30px;
-  padding: 30px;
-}
-
-.egressDetails .valueContent .item .title .switchItem {
-  width: 40px;
-  height: 40px;
-  margin-left: 20px;
-}
-
-.egressDetails .valueContent .item .value {
-  color: #000000;
-  font-size: 30px;
-}
-
-.egressDetails .valueContent .item .timeContent {
-  background: rgba(0, 51, 255, 0.09);
-  border-radius: 30px;
-  padding: 30px;
-  margin-top: 45px;
-}
-
-.egressDetails .valueContent .item .timeContent .time {
-  display: flex;
-  flex-flow: row nowrap;
-  justify-content: space-between;
-  align-items: center;
-}
-
-.egressDetails .valueContent .item .timeContent .time .num {
-  font-size: 30px;
-}
-
-.egressDetails .valueContent .item .timeContent .time .journal {
-  font-size: 28px;
-  color: #007aff;
-}
-
-.egressDetails .valueContent .item .timeContent .timeAxis {
-  display: flex;
-  flex-flow: column nowrap;
-  padding-top: 30px;
-}
-
-.egressDetails .valueContent .item .timeContent .timeAxis .startTime {
-  display: flex;
-  align-items: center;
-  color: #b7acac;
-  font-size: 25px;
-}
-
-.egressDetails .valueContent .item .timeContent .timeAxis .axis {
-  width: 1px;
-  height: 40px;
-  border-left: 1px #b7acac solid;
-  margin-left: 11px;
-}
-
-.egressDetails .valueContent .item .timeContent .timeAxis .endTime {
-  display: flex;
-  align-items: center;
-  color: #b7acac;
-  font-size: 25px;
-}
-
-.egressDetails .valueContent .item .timeContent .timeAxis .circle {
-  margin-right: 15px;
-  width: 20px;
-  height: 20px;
-  border-radius: 30px;
-  border: 1px #b7acac solid;
-}
-
-.egressDetails .valueContent .shareContent {
-  display: flex;
-  flex-flow: column nowrap;
-  justify-content: center;
-  align-items: center;
-  width: 100%;
-}
-
-.egressDetails .valueContent .shareContent .share {
-  overflow: visible;
-  width: 100px;
-  height: 100px;
-  padding: 0;
-  border-radius: 161px;
-  background: #0000;
-}
-
-.egressDetails .valueContent .shareContent .share .shareIcon {
-  width: 100px;
-  height: 100px;
-}
-
-.egressDetails .valueContent .shareContent .shareTitle {
-  padding-top: 15px;
-  font-size: 19px;
-  color: #767272;
-}
-
-.egressDetails .history {
-  display: flex;
-  flex-flow: row nowrap;
-  justify-content: space-between;
-  align-items: center;
-  font-size: 30px;
-}
-
-.egressDetails .operation {
-  display: flex;
-  flex-flow: row nowrap;
-}
-
-.egressDetails .at-image-picker__flex-box {
-  padding-left: 0;
-}
-
-.egressDetails .at-image-picker__remove-btn {
-  display: none;
-}
-
-.egressDetails .at-calendar__list.flex .flex__item--selected {
-  color: white;
-  border: 0 !important;
-  border-radius: 0 !important;
-  background: #6eb173;
-}
-
-.egressDetails .at-calendar__list.flex .flex__item--selected-head.flex__item--selected-tail {
-  background-color: #6eb173;
-}
-
-.egressDetails .at-calendar__list.flex .flex__item {
-  background: #6eb173;
-  color: #FFFFFF;
-}
-
-.egressDetails .at-calendar__list.flex .flex__item--blur {
-  background: #fff !important;
-  color: #e1e4e7 !important;
-}
-
-.egressDetails .at-modal__container {
-  width: 718px;
-}
-
-.egressDetails button::after {
-  border: 0px !important;
-}

+ 0 - 863
src/pages/egressDetails/index.jsx

@@ -1,863 +0,0 @@
-import React, { Component } from "react";
-import { View, Image, Button, Text } from "@tarojs/components";
-import Taro, { getCurrentInstance } from "@tarojs/taro";
-import {
-  AtButton,
-  AtCalendar,
-  AtIcon,
-  AtTextarea,
-  AtModal,
-  AtModalContent,
-  AtModalAction,
-} from "taro-ui";
-import Skeleton from "taro-skeleton";
-
-import InquiryModal from "../../components/common/inquiryModal";
-
-import Modify from "./modify";
-import {
-  examinePublicRelease,
-  getReleasetDails,
-  updatePublicRelease,
-  addAssistant,
-  deleteAssistant,
-} from "../../utils/servers/servers";
-import { resourceAddress } from "../../utils/config";
-import "./index.less";
-
-import "taro-ui/dist/style/components/icon.scss";
-import "taro-ui/dist/style/components/textarea.scss";
-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 Rejected from "../../image/rejected.png";
-import Passed from "../../image/passed.png";
-import Reviewed from "../../image/reviewed.png";
-import Wx from "../../image/wx.png";
-import Revoke from "../../image/revoke.png";
-
-import ImagePicker from "../../components/common/imagePicker";
-import MessageNoticebar from "../../components/common/messageNoticebar";
-import { getClockState, unique } from "../../utils/tools";
-import HistoricalClock from "../../components/historicalClock";
-import UserQuery from "../../components/common/userquery"; //选择协单人弹窗
-
-class EgressDetails extends Component {
-  $instance = getCurrentInstance();
-
-  constructor(props) {
-    super(props);
-    this.state = {
-      dtails: {},
-      opinion: "",
-      publicReleaseLog: [],
-      isDetailedOpened: false,
-      isModifyOpened: false,
-      reasonsInvalidation: "",
-      isVerify: false, //判断是否在审核中修改
-      selectArrderLocation: {},
-      current: "",
-      isNo: true,
-      foc: false,
-      coorderList: [],
-      cList: [],
-      popup: false,
-      selid: "",
-    };
-    this.examinePublicRelease = this.examinePublicRelease.bind(this);
-    this.getReleasetDails = this.getReleasetDails.bind(this);
-    this.oidApplication = this.oidApplication.bind(this);
-  }
-
-  componentDidMount() {
-    this.setState({
-      current: this.$instance.router.params.status || "",
-    });
-    this.getReleasetDails();
-  }
-
-  componentDidShow() {
-    //获取地区选定数据
-    const chooseLocation = requirePlugin("chooseLocation");
-    const location = chooseLocation.getLocation();
-    if (location) {
-      this.setState({
-        selectArrderLocation: location,
-      });
-    }
-  }
-
-  getReleasetDails() {
-    getReleasetDails({
-      id: this.$instance.router.params.id,
-    })
-      .then((v) => {
-        if (v.error.length === 0) {
-          if (v.data) {
-            let list = [];
-            for (let i of v.data.annexUrl.split(",")) {
-              if (i) {
-                list.push({ url: resourceAddress + i });
-              }
-            }
-            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.prdList[0]?.longitude),
-                latitude: parseFloat(v.data.prdList[0]?.latitude),
-                name: v.data.prdList[0]?.districtName,
-              },
-            });
-          } else {
-            setTimeout(() => {
-              Taro.switchTab({
-                url: "/pages/punchClock/index",
-              });
-            }, 1800);
-            Taro.showToast({
-              title: "您没有权限查看此公出详情",
-              icon: "none",
-              duration: 1800,
-            });
-          }
-        } else {
-          Taro.showToast({ title: v.error[0].message, icon: "none" });
-        }
-      })
-      .catch((err) => {
-        Taro.showToast({ title: "系统错误,请稍后再试", icon: "none" });
-        // console.log(err);
-      });
-  }
-
-  // 同意/驳回
-  agree(sta) {
-    if (!this.state.opinion) {
-      Taro.showToast({ title: "请填写审批意见", icon: "none" });
-      return;
-    }
-    getReleasetDails({
-      id: this.$instance.router.params.id,
-    })
-      .then((v) => {
-        if (v.error.length === 0) {
-          //如果在审核期间修改过
-          if (
-            v.data.updateTime != null &&
-            this.state.dtails.updateTime !== v.data.updateTime
-          ) {
-            this.setState({
-              isInquiryOpened: true,
-              isNo: false,
-              inquiryTitle: "提醒",
-              inquiryContent: "当前公出申请已修改,请重新审核",
-            });
-          } else {
-            sta === 2
-              ? this.examinePublicRelease(2)
-              : this.examinePublicRelease(0);
-          }
-          if (v.data) {
-            let list = [];
-            for (let i of v.data.annexUrl.split(",")) {
-              if (i) {
-                list.push({ url: resourceAddress + i });
-              }
-            }
-            v.data.annexUrl = list;
-            this.setState({
-              dtails: v.data,
-              selectArrderLocation: {
-                longitude: parseFloat(v.data.prdList[0]?.longitude),
-                latitude: parseFloat(v.data.prdList[0]?.latitude),
-                name: v.data.prdList[0]?.districtName,
-              },
-            });
-          } else {
-            setTimeout(() => {
-              Taro.switchTab({
-                url: "/pages/punchClock/index",
-              });
-            }, 1800);
-            Taro.showToast({
-              title: "您没有权限查看此公出详情",
-              icon: "none",
-              duration: 1800,
-            });
-          }
-        } else {
-          Taro.showToast({ title: v.error[0].message, icon: "none" });
-        }
-      })
-      .catch((err) => {
-        Taro.showToast({ title: "系统错误,请稍后再试", icon: "none" });
-        // console.log(err);
-      });
-  }
-
-  examinePublicRelease(status) {
-    if (!this.state.opinion) {
-      Taro.showToast({ title: "请填写审批意见", icon: "none" });
-      return;
-    }
-    Taro.showLoading({ title: "加载中..." });
-    let isSuperior = this.state.current == "他人公出" ? false : true
-    examinePublicRelease(
-      isSuperior,
-      {
-        status,
-        remarks: this.state.opinion,
-        id: this.state.dtails.id,
-      }
-    )
-      .then((v) => {
-        Taro.hideLoading();
-        if (v.error.length === 0) {
-          Taro.showToast({
-            title: "操作成功",
-            icon: "none",
-          });
-          this.getReleasetDails();
-
-          // Taro.showToast({
-          //   title: status === 0 ? "驳回成功" : "通过成功",
-          //   icon: "none",
-          // });
-          // this.state.dtails.status = status;
-          // this.setState({
-          //   dtails: this.state.dtails,
-          // });
-          // Taro.eventCenter.trigger("listOperation", {
-          //   type: this.state.dtails.permission,
-          //   index: this.$instance.router.params.index,
-          //   status: status === 0 ? 0 : 2,
-          // });
-        } else {
-          Taro.showToast({ title: v.error[0].message, icon: "none" });
-        }
-      })
-      .catch(() => {
-        Taro.hideLoading();
-        Taro.showToast({ title: "系统错误,请稍后再试", icon: "none" });
-      });
-  }
-
-  onShareAppMessage() {
-    return {
-      title:
-        this.state.dtails.status === 3
-          ? this.state.dtails.aname +
-          "撤销了前往" +
-          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,
-    };
-  }
-
-  oidApplication() {
-    if (!this.state.reasonsInvalidation) {
-      Taro.showToast({ title: "请填写撤销原因", icon: "none" });
-      return;
-    }
-    this.setState({
-      loading: true,
-    });
-    updatePublicRelease({
-      id: this.$instance.router.params.id,
-      status: 3,
-      uids: this.state.dtails.uids,
-      reason: this.state.reasonsInvalidation,
-    })
-      .then((v) => {
-        this.setState({
-          loading: false,
-        });
-        if (v.error.length === 0) {
-          Taro.showToast({
-            title: "修改成功",
-          });
-          this.setState({
-            isInquiryOpened: false,
-            inquiryTitle: "",
-            inquiryContent: "",
-          }, () => {
-            this.getReleasetDails();
-          });
-          Taro.eventCenter.trigger("listOperation", {
-            type: this.state.dtails.permission,
-            index: this.$instance.router.params.index,
-            status: 3,
-          });
-        } else {
-          Taro.showToast({
-            title: v.error[0].message,
-            icon: "none",
-          });
-        }
-      })
-      .catch(() => {
-        this.setState({
-          loading: false,
-        });
-      });
-  }
-  // 弹窗开关
-  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, cList, coorderList, popup } = this.state;
-    return (
-      <View className="egressDetails">
-        <MessageNoticebar />
-        <View
-          className="titleContent"
-          style={{
-            padding: Object.keys(dtails).length === 0 ? "0 30px" : "20px 30px",
-          }}
-        >
-          {Object.keys(dtails).length === 0 ? (
-            <Skeleton
-              title
-              row={3}
-              animateName="elastic"
-              avatarShape="square"
-              loading
-            />
-          ) : (
-            <View>
-              <View className="title">
-                {dtails.type === 3 ? dtails.mainName : dtails.aname}提交的公出申请
-                {dtails.updateStatus == 1 && <View className="titRight">改</View>}
-              </View>
-              <View className="address">申请时间: {dtails.createTimes}</View>
-              <View
-                className="state"
-                style={{
-                  color: getClockState(dtails.status).color,
-                }}
-              >
-                {getClockState(dtails.status).title}
-              </View>
-              {
-                dtails.peList?.map(item =>
-                  <View style={{ fontSize: "15px", color: "#007AFF" }}>{item.aname + `(${["审核中", "已审核"][item.status]})`}</View>
-                )
-              }
-              <View></View>
-              <Image
-                src={
-                  dtails.status === 0
-                    ? Rejected : dtails.status === 1
-                      ? Reviewed : dtails.status === 2
-                        ? Passed : dtails.status === 3
-                          ? Revoke : dtails.status === 4
-                            ? Rejected : ""
-                }
-                className="startIcon"
-              />
-            </View>
-          )}
-        </View>
-        {Object.keys(dtails).length === 0 ? (
-          <View style={{ margin: "20px" }}>
-            <Skeleton title row={3} avatarShape="square" loading />
-          </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">
-                公出地点:
-                {current !== "审核" && dtails.permission === 0
-                  && dtails.type !== 3 && dtails.type !== 4 ? (
-                  <View
-                    className="edit"
-                    onClick={() => {
-                      Taro.pageScrollTo({ selector: "#reasons" })
-                      this.setState({
-                        foc: true,
-                      });
-                    }}
-                  >
-                    <View style={{ color: "#3864ef", fontSize: "15px" }}>
-                      修改
-                      <AtIcon value="edit" size="18" color="#3864ef" />
-                    </View>
-                  </View>
-                ) : null}
-              </View>
-              <View className="value">
-                {/* {dtails.districtName} */}
-                {
-                  unique(dtails.prdList, "districtName")?.map((item, index) =>
-                    <View key={index}>{item.districtName}</View>
-                  )
-                }
-              </View>
-              <View className="timeContent">
-                <View className="time">
-                  <View className="num">公出{dtails.duration}小时</View>
-                  <View
-                    className="journal"
-                    onClick={(e) => {
-                      e.stopPropagation();
-                      this.setState({
-                        isDetailedOpened: true,
-                      });
-                    }}
-                  >
-                    明细
-                  </View>
-                </View>
-                <View className="timeAxis">
-                  <View className="startTime">
-                    <View className="circle" />
-                    {dtails.releaseStarts}
-                  </View>
-                  <View className="axis" />
-                  <View className="endTime">
-                    <View className="circle" />
-                    {dtails.releaseEnds}
-                  </View>
-                </View>
-              </View>
-            </View>
-            <AtModal
-              onClose={() => {
-                this.setState({
-                  isDetailedOpened: false,
-                });
-              }}
-              isOpened={this.state.isDetailedOpened}
-            >
-              <AtModalContent>
-                {dtails.validDate ? (
-                  <AtCalendar
-                    currentDate={JSON.parse(dtails.validDate)[0]["value"]}
-                    isSwiper={false}
-                    validDates={JSON.parse(dtails.validDate)}
-                  />
-                ) : null}
-              </AtModalContent>
-              <AtModalAction>
-                <Button
-                  onClick={() => {
-                    this.setState({
-                      isDetailedOpened: false,
-                    });
-                  }}
-                >
-                  确定
-                </Button>
-              </AtModalAction>
-            </AtModal>
-            <View className="item">
-              <View className="title">公出类型</View>
-              <View className="value">
-                {dtails.type == 0
-                  ? "业务公出" : dtails.type == 1
-                    ? "技术公出" : dtails.type == 2
-                      ? "行政公出" : dtails.type == 3
-                        ? "技术协单" : dtails.type == 4
-                          ? "协单助手" : ""}
-              </View>
-            </View>
-            {dtails.type == 1 ? (
-              <View className="item">
-                <View className="title">合同编号</View>
-                <View className="value">{dtails.contractNo}</View>
-              </View>
-            ) : (
-              ""
-            )}
-            <View className="item">
-              <View className="title">公出企业</View>
-              <View className="value">
-                {/* {dtails.nickname} */}
-                {
-                  !!dtails.userNames && dtails.userNames.indexOf(',') > -1
-                    ? dtails.userNames.split(',')?.map((item, index) => <View key={index}>{item}</View>)
-                    : dtails.userNames
-                }
-              </View>
-            </View>
-            {
-              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 className="item">
-              <View className="title">公出目标</View>
-              <View className="value">{dtails.remarks}</View>
-            </View>
-            {/* 公出计划 */}
-            {dtails.type != 2 && (
-              <View className="item">
-                <View className="title">公出计划</View>
-                <View className="value">{dtails.plan}</View>
-              </View>
-            )}
-            {/* 预计效果 */}
-            {dtails.type != 2 && (
-              <View className="item">
-                <View className="title">预计效果</View>
-                <View className="value">{dtails.expectedEffect}</View>
-              </View>
-            )}
-            {dtails.annexUrl && dtails.annexUrl.length > 0 ? (
-              <View className="item">
-                <View className="title">附件</View>
-                <View className="value">
-                  <ImagePicker files={dtails.annexUrl} showAddBtn={false} />
-                </View>
-              </View>
-            ) : null}
-            {((dtails.status === 1 && current === "审核") ||
-              (dtails.publicType == 1 && current === "他人公出" && dtails.myExamine == 0)) &&
-              <View className="item">
-                <View className="title">
-                  填写审批意见
-                  <View className="titleTips">
-                    根据公出申请记录指导怎么沟通?并提出详细指导建议
-                  </View>
-                </View>
-                <AtTextarea
-                  value={this.state.opinion}
-                  onChange={(value) => {
-                    this.setState({
-                      opinion: value,
-                    });
-                  }}
-                  maxLength={20}
-                  placeholder="请填写审批意见"
-                />
-                <View className="operation">
-                  <AtButton
-                    type="secondary"
-                    circle
-                    loading={this.state.loading}
-                    onClick={() => {
-                      this.setState({
-                        isInquiryOpened: true,
-                        inquiryTitle: "提醒",
-                        inquiryContent: "您确定要驳回此申请吗?",
-                        inquiryFn: () => {
-                          this.agree(0);
-                          // this.examinePublicRelease(0);
-                        },
-                      });
-                    }}
-                  >
-                    驳回
-                  </AtButton>
-                  <AtButton
-                    type="primary"
-                    loading={this.state.loading}
-                    circle
-                    onClick={() => {
-                      if (this.state.loading) {
-                        return;
-                      }
-                      this.setState({
-                        isInquiryOpened: true,
-                        inquiryTitle: "提醒",
-                        inquiryContent: "您确定要同意此申请吗?",
-                        inquiryFn: () => {
-                          this.agree(2);
-                          // this.examinePublicRelease(2);
-                        },
-                      });
-                    }}
-                  >
-                    同意
-                  </AtButton>
-                </View>
-              </View>}
-            {current !== "审核" && dtails.permission === 0
-              && dtails.type !== 3 && dtails.type !== 4 ? (
-              <View className="item" id={"reasons"}>
-                <View className="title">修改/撤销</View>
-                <AtTextarea
-                  value={this.state.reasonsInvalidation}
-                  focus={this.state.foc}
-                  onChange={(value) => {
-                    this.setState({
-                      reasonsInvalidation: value,
-                    });
-                  }}
-                  maxLength={20}
-                  placeholder="请填写修改或撤销的详细原因"
-                />
-              </View>
-            ) : null}
-            {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) {
-                      return;
-                    }
-                    this.setState({
-                      isInquiryOpened: true,
-                      inquiryTitle: "提醒",
-                      inquiryContent: dtails.assist == 1
-                        ? "请与技术协单同事协商后再修改,因未协商就个人修改公出内容,产生的影响由个人承担!"
-                        : "您确定要撤销此申请吗?",
-                      inquiryFn: () => {
-                        this.oidApplication();
-                      },
-                    });
-                  }}
-                >
-                  撤销申请
-                </Button>
-                <Button
-                  style={{ color: "#fff", background: "#4876FF" }}
-                  loading={this.state.loading}
-                  onClick={() => {
-                    if (this.state.loading) {
-                      return;
-                    }
-                    this.setState({
-                      isInquiryOpened: true,
-                      inquiryTitle: "提醒",
-                      inquiryContent: dtails.assist == 1
-                        ? "请与技术协单同事协商后再修改,因未协商就个人修改公出内容,产生的影响由个人承担!"
-                        : "您确定修改此公出申请吗?确定修改,已完成的审核,将自动解除,重新转化为待审核状态!!!",
-                      inquiryFn: () => {
-                        if (!this.state.reasonsInvalidation) {
-                          Taro.showToast({
-                            title: "请填写修改原因",
-                            icon: "none",
-                          });
-                          return;
-                        }
-                        this.setState({
-                          isModifyOpened: true,
-                          isVerify: true,
-                          foc: false,
-                        });
-                      },
-                    });
-                  }}
-                >
-                  修改申请
-                </Button>
-              </View>
-            ) : null}
-          </View>
-        )}
-        {Object.keys(dtails).length === 0 ? (
-          <View style={{ margin: "20px" }}>
-            <Skeleton title row={3} avatarShape="square" loading />
-          </View>
-        ) : (
-          <View
-            className="valueContent history"
-            onClick={(e) => {
-              e.stopPropagation();
-              this.setState({
-                historicalIsOpened: true,
-              });
-            }}
-          >
-            查看公出申请日志
-            <AtIcon value="chevron-right" size="20" color="#767272" />
-          </View>
-        )}
-        {Object.keys(dtails).length === 0 ? (
-          <View style={{ margin: "20px" }}>
-            <Skeleton title row={3} avatarShape="square" loading />
-          </View>
-        ) : (
-          <View className="valueContent history">
-            <View className="shareContent">
-              <Button open-type="share" className="share">
-                <Image src={Wx} className="shareIcon" />
-              </Button>
-              <View className="shareTitle">微信分享</View>
-            </View>
-          </View>
-        )}
-        {this.state.isModifyOpened ? (
-          <Modify
-            permission={dtails.permission}
-            index={this.$instance.router.params.index}
-            dtails={dtails}
-            locationInfor={this.state.selectArrderLocation}
-            id={this.$instance.router.params.id}
-            isOpened={this.state.isModifyOpened}
-            isVerify={this.state.isVerify}
-            reason={this.state.reasonsInvalidation}
-            onModalClose={() => {
-              this.setState({
-                isModifyOpened: false,
-              });
-            }}
-            onClose={() => {
-              this.setState(
-                {
-                  isModifyOpened: false,
-                  dtails: {},
-                  reasonsInvalidation: "",
-                },
-                () => {
-                  this.getReleasetDails();
-                }
-              );
-            }}
-          />
-        ) : null}
-        <InquiryModal
-          isOpened={this.state.isInquiryOpened}
-          title={this.state.inquiryTitle}
-          content={this.state.inquiryContent}
-          color={this.state.isNo ? "black" : "red"}
-          isNo={this.state.isNo}
-          onClose={() => {
-            this.setState({
-              isInquiryOpened: false,
-              inquiryTitle: "",
-              inquiryContent: "",
-              isNo: true,
-            });
-          }}
-          onDetermine={() => {
-            this.state.inquiryFn();
-            this.setState({
-              isInquiryOpened: false,
-              inquiryTitle: "",
-              inquiryContent: "",
-              isNo: true,
-              inquiryFn: () => { },
-            });
-          }}
-        />
-        {this.state.historicalIsOpened ? (
-          <HistoricalClock
-            id={this.$instance.router.params.id}
-            isOpened={this.state.historicalIsOpened}
-            onClose={() => {
-              this.setState({
-                historicalIsOpened: false,
-              });
-            }}
-          />
-        ) : 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>
-    );
-  }
-}
-
-export default EgressDetails;

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

@@ -1,289 +0,0 @@
-.egressDetails {
-  min-height: calc(100vh - 30px);
-  background: #F5F5F5;
-  padding-bottom: 30px;
-
-  .titleContent {
-    position: relative;
-    background: white;
-    padding: 20px 30px;
-    border-bottom: 1px #dadada solid;
-
-    .title {
-      font-weight: bolder;
-      padding-bottom: 20px;
-      display: flex;
-      flex-direction: row;
-      align-items: center;
-
-      .titRight {
-        background: #1E90FF;
-        color: white;
-        padding: 5px 8px;
-        border-radius: 4px;
-        margin-left: 10px;
-        font-size: 25px;
-      }
-
-    }
-
-    .address {
-      font-size: 25px;
-      color: #767272;
-      padding-bottom: 20px;
-      display: flex;
-      flex-flow: row;
-      align-items: center;
-    }
-
-    .state {
-      font-size: 30px;
-      color: #767272;
-    }
-
-    .startIcon {
-      width: 180px;
-      height: 180px;
-      position: absolute;
-      right: 55px;
-      bottom: 0px;
-    }
-  }
-
-  .valueContent {
-    margin: 20px;
-    padding: 30px;
-    background: white;
-    border-radius: 20px;
-
-    .item {
-      padding-bottom: 30px;
-
-      .title {
-        display: flex;
-        flex-flow: row nowrap;
-        align-items: center;
-        justify-content: space-between;
-        color: #b7acac;
-        font-size: 27px;
-        padding-bottom: 10px;
-        position: relative;
-
-        .titleTips {
-          color: #ff0000;
-          font-size: 18px;
-          padding-left: 10px;
-        }
-
-        .edit {
-          position: absolute;
-          right: -30px;
-          padding: 30px;
-        }
-
-        .switchItem {
-          width: 40px;
-          height: 40px;
-          margin-left: 20px;
-        }
-      }
-
-      .value {
-        color: #000000;
-        font-size: 30px;
-      }
-
-      .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 {
-          display: flex;
-          flex-flow: row nowrap;
-          justify-content: space-between;
-          align-items: center;
-
-          .num {
-            font-size: 30px;
-          }
-
-          .journal {
-            font-size: 28px;
-            color: #007aff;
-          }
-        }
-
-        .timeAxis {
-          display: flex;
-          flex-flow: column nowrap;
-          padding-top: 30px;
-
-          .startTime {
-            display: flex;
-            align-items: center;
-            color: #b7acac;
-            font-size: 25px;
-          }
-
-          .axis {
-            width: 1px;
-            height: 40px;
-            border-left: 1px #b7acac solid;
-            margin-left: 11px;
-          }
-
-          .endTime {
-            display: flex;
-            align-items: center;
-            color: #b7acac;
-            font-size: 25px;
-          }
-
-          .circle {
-            margin-right: 15px;
-            width: 20px;
-            height: 20px;
-            border-radius: 30px;
-            border: 1px #b7acac solid;
-          }
-        }
-      }
-    }
-
-    .shareContent {
-      display: flex;
-      flex-flow: column nowrap;
-      justify-content: center;
-      align-items: center;
-      width: 100%;
-
-      .share {
-        overflow: visible;
-        width: 100px;
-        height: 100px;
-        padding: 0;
-        border-radius: 161px;
-        background: #0000;
-
-        .shareIcon {
-          width: 100px;
-          height: 100px;
-        }
-      }
-
-      .shareTitle {
-        padding-top: 15px;
-        font-size: 19px;
-        color: #767272;
-      }
-    }
-  }
-
-  .history {
-    display: flex;
-    flex-flow: row nowrap;
-    justify-content: space-between;
-    align-items: center;
-    font-size: 30px;
-  }
-
-  .operation {
-    display: flex;
-    flex-flow: row nowrap;
-    margin-top: 30px;
-  }
-
-  .at-image-picker__flex-box {
-    padding-left: 0;
-  }
-
-  .at-image-picker__remove-btn {
-    display: none;
-  }
-
-  .at-calendar__list.flex .flex__item--selected {
-    color: white;
-    border: 0 !important;
-    border-radius: 0 !important;
-    background: #6eb173;
-  }
-
-  .at-calendar__list.flex .flex__item--selected-head.flex__item--selected-tail {
-    background-color: #6eb173;
-  }
-
-  .at-calendar__list.flex .flex__item {
-    background: #6eb173;
-    color: #FFFFFF;
-  }
-
-  .at-calendar__list.flex .flex__item--blur {
-    background: #fff !important;
-    color: #e1e4e7 !important;
-  }
-
-  .at-modal__container {
-    width: 718px;
-  }
-
-  button::after {
-    border: 0px !important;
-  }
-}
-
-.slist{
-  padding: 10px 20px;
-  font-size: 26px;
-
-  .slitems{
-    margin: 15px 0;
-    display: flex;
-    flex-direction: row;
-    align-items: center;
-    justify-content: space-between;
-  }
-  .slbt{ 
-    width: 30%;
-    margin: 20px auto;
-  }
-  .cltips{
-    text-align: center;
-    font-size: 24px;
-    color: #4395ff;
-  }
-}

+ 0 - 216
src/pages/egressDetails/modify.jsx

@@ -1,216 +0,0 @@
-import React, { Component } from "react";
-import {
-  AtCalendar,
-  AtModal,
-  AtModalAction,
-  AtModalContent,
-  AtButton,
-} from "taro-ui";
-import { Button, View } from "@tarojs/components";
-import Enterprise from "./enterprise";
-import PublicContent from "./publicContent";
-import { getNewList } from "../../utils/tools";
-
-import { updatePublicRelease } from "../../utils/servers/servers";
-
-import "taro-ui/dist/style/components/modal.scss";
-import Taro from "@tarojs/taro";
-
-class Modify extends Component {
-  constructor(props) {
-    super(props);
-    this.state = {
-      data: {},
-      dtails: props.dtails,
-      modifyType: 2,
-      // colors: "primary",
-      // color: "secondary",
-      type: 0,
-      visibles: true,
-      // newList: getNewList(props.dtails.uids, props.dtails.userNames),
-      newList: [],
-      jsList: [],
-    };
-    this.submit = this.submit.bind(this);
-    this.onChange = this.onChange.bind(this);
-    this.onVisible = this.onVisible.bind(this);
-    this.onListChange = this.onListChange.bind(this);
-    this.getValue = this.getValue.bind(this);
-  }
-
-  getValue(arr, key) {
-    return arr.map(obj => { return obj[key]; }).join(",")
-  }
-
-  submit() {
-    // if (this.state.type == 1) {
-    //   Taro.showToast({ title: "技术公出请直接点击公出企业", icon: "none" });
-    //   return;
-    // } else if (this.state.length == 0) {
-    //   Taro.showToast({ title: "请先选择公出的企业", icon: "none" });
-    //   return;
-    // }
-    // if (Object.keys(this.state.data).length === 0) {
-    //   Taro.showToast({ title: "请先选择公出的企业", icon: "none" });
-    //   return;
-    // } else if (this.state.type == 1) {
-    //   Taro.showToast({ title: "技术公出请直接点击公出企业", icon: "none" });
-    //   return;
-    // }
-    let obj = {}
-    if (this.state.type != 1) {
-      obj = { uids: this.getValue(this.state.newList, "id"), userNames: this.getValue(this.state.newList, "name"), type: this.state.type, newList: this.state.newList }
-    } else {
-      obj = { uids: this.getValue(this.state.jsList, "id"), userNames: this.getValue(this.state.jsList, "name"), type: this.state.type, newList: this.state.newList }
-    }
-    this.setState({
-      dtails: {
-        ...this.state.dtails,
-        ...obj,
-      },
-      data: obj,
-    })
-
-    this.setState({
-      modifyType: 2,
-    });
-  }
-  onVisible() {
-    this.setState({
-      visibles: false,
-    });
-  }
-  componentWillUnmount() {
-    this.setState({
-      data: {},
-    });
-  }
-
-  onListChange(list) {
-    this.setState({
-      newList: list
-    })
-  }
-
-  onChange(value, visi) {
-    value.type = this.state.type;
-    this.setState({
-      dtails: {
-        ...this.state.dtails,
-        ...value,
-      },
-      data: value,
-      modifyType: 2,
-    });
-
-    // if (visi == 0) {
-    //   this.setState({
-    //     dtails: {
-    //       ...this.state.dtails,
-    //       ...value,
-    //     },
-    //     data: value,
-    //   });
-    // } else {
-    //   value.type = this.state.type;
-    //   this.setState({
-    //     dtails: {
-    //       ...this.state.dtails,
-    //       ...value,
-    //     },
-    //     data: value,
-    //     modifyType: 2,
-    //   });
-    // }
-  }
-
-  render() {
-    let userInfor = Taro.getStorageSync('userInfor');
-    return (
-      <AtModal isOpened={this.props.isOpened} onClose={this.props.onModalClose}>
-        {this.state.modifyType === 1 ? (
-          <View
-            style={{ display: "flex", margin: "10px 0 0 0", padding: "0 5px" }}
-          >
-            {[
-              { type: 0, title: "业务公出" },
-              { type: 1, title: "技术公出" },
-              { type: 2, title: "行政公出" },
-            ].map((item) => (
-              <View style={{ margin: "0 5px" }} key={item.type}>
-                <AtButton
-                  circle
-                  size="small"
-                  disabled={item.type === 1 && userInfor.type !== 3}
-                  type={this.state.type == item.type ? "primary" : "secondary"}
-                  onClick={() => {
-                    this.setState({
-                      type: item.type,
-                    });
-                    item.type != 1 &&
-                      this.setState({
-                        visibles: true,
-                      });
-                  }}
-                >
-                  {item.title}
-                </AtButton>
-              </View>
-            ))}
-            <View style={{ flex: "1" }}></View>
-          </View>
-        ) : (
-          ""
-        )}
-
-        <AtModalContent>
-          {this.state.modifyType === 1 ? (
-            <Enterprise
-              type={this.state.type}
-              isOpened={this.props.isOpened}
-              isVerify={this.props.isVerify} //判断是否在审核中修改
-              onChange={this.onChange}
-              newList={this.state.newList}
-              jsList={this.state.jsList}
-              onListChange={this.onListChange}
-            />
-          ) : (
-            <PublicContent
-              permission={this.props.permission}
-              index={this.props.index}
-              type={this.state.type}
-              onClose={() => {
-                this.props.onClose();
-              }}
-              locationInfor={this.props.locationInfor}
-              dtails={this.state.dtails}
-              isOpened={this.props.isOpened}
-              isVerify={this.props.isVerify}
-              reason={this.props.reason}//修改原因
-              onChange={this.onChange}
-              onBack={() => {
-                this.setState({
-                  modifyType: 1,
-                });
-              }}
-            />
-          )}
-        </AtModalContent>
-        {this.state.modifyType === 1 ? (
-          <AtModalAction>
-            <Button
-              onClick={() => {
-                this.props.onClose();
-              }}
-            >
-              取消
-            </Button>
-            <Button onClick={this.submit}>下一步</Button>
-          </AtModalAction>
-        ) : null}
-      </AtModal>
-    );
-  }
-}
-
-export default Modify;

Різницю між файлами не показано, бо вона завелика
+ 0 - 1028
src/pages/egressDetails/publicContent.jsx


+ 0 - 122
src/pages/egressDetails/publicContent.less

@@ -1,122 +0,0 @@
-.publicContent {
-  padding: 20px;
-
-  .formItem {
-    display: flex;
-    align-items: center;
-    font-size: 30px;
-    padding-bottom: 25px;
-
-    .formName {
-      white-space: nowrap;
-
-      .formNameTips {
-        color: #ff0000;
-        font-size: 20px;
-        padding-left: 10px;
-      }
-
-      .tips {
-        color: #ff0000;
-        font-size: 20px;
-        padding-bottom: 20px;
-      }
-    }
-
-    .formValue {
-      text-align: right;
-      flex: 1;
-      display: flex;
-      flex-flow: row nowrap;
-      align-items: center;
-      justify-content: flex-end;
-
-      .formValueText {
-        display: block;
-        width: 452px;
-        text-overflow: ellipsis;
-        overflow: hidden;
-        white-space: nowrap;
-      }
-    }
-
-    .formValues {
-      display: flex;
-      flex-direction: row;
-      flex-wrap: wrap;
-
-      .fitems {
-        margin-left: 20px;
-        margin-bottom: 20px;
-        display: flex;
-        flex-direction: row;
-        position: relative;
-        padding-right: 40px;
-
-        .fclose {
-          position: absolute;
-          right: 0;
-          top: -20px;
-        }
-      }
-
-      .addbuttom {
-        font-size: 22px;
-        padding: 0 10px;
-        margin-left: 20px;
-      }
-    }
-  }
-
-  .othersTips{
-    font-size: 28px;
-    text-align: center;
-    color: #f00;
-    background: #c9c9c9;
-    padding: 20px 50px;
-
-  }
-
-  .tips {
-    font-size: 20px;
-    text-align: left;
-    color: #f00;
-  }
-
-  .operation {
-    display: flex;
-    flex-flow: row nowrap;
-  }
-
-  .at-image-picker__remove-btn {
-    display: block !important;
-  }
-}
-
-.result{
-  display: flex;
-  flex-flow: column nowrap;
-  align-items: center;
-  padding-top: 83px;
-  height: 506px;
-  .resultIcon{
-    padding-bottom: 20px;
-  }
-  .resultTitle{
-    padding: 0 30px 30px 30px;
-    text-align: center;
-    .resultError{
-      font-size: 20px;
-      color: #969696;
-      padding-top: 15px;
-    }
-  }
-  .resultOperation{
-    display: flex;
-    flex-flow: row nowrap;
-    align-items: center;
-    justify-content: space-between;
-    margin-top: auto;
-    width: 100%;
-  }
-}

+ 0 - 8
src/pages/examine/index.config.js

@@ -1,8 +0,0 @@
-export default {
-  navigationBarTitleText: '审核',
-  enablePullDownRefresh: true,
-  onReachBottomDistance: 50,
-  usingComponents: {
-    timePicker: '../../components/common/PickerReduce/timePicker'
-  }
-}

+ 0 - 251
src/pages/examine/index.css

@@ -1,251 +0,0 @@
-.indexPage {
-  position: relative;
-  z-index: 1;
-  background: #F5F5F5;
-  min-height: calc(100vh - 52px);
-}
-.indexPage .item-content__info-title {
-  font-size: 28px;
-  color: #9BA0AA;
-}
-.indexPage .item-extra__info {
-  font-size: 28px;
-  color: #9BA0AA;
-}
-.indexPage .at-list__item::after {
-  border-bottom: 0;
-}
-.indexPage .at-list::after {
-  border-top: 0;
-}
-.indexPage .indexPage .at-list::after {
-  border: 0;
-}
-.indexPage .searchContent {
-  position: relative;
-  background: white;
-}
-.indexPage .searchContent .searchTop {
-  z-index: 1000;
-}
-.indexPage .searchContent .searchBottom {
-  display: flex;
-  align-items: center;
-  justify-content: space-between;
-  background: #FFFFFF;
-  border-bottom-left-radius: 10px;
-  border-bottom-right-radius: 10px;
-  padding: 10px 0 10px 0;
-}
-.indexPage .searchContent .searchBottom .searchBottomBack {
-  position: fixed;
-  z-index: -1;
-  left: 0;
-  right: 0;
-  bottom: 0;
-  top: 100px;
-  background: rgba(0, 0, 0, 0.7);
-}
-.indexPage .searchContent .searchBottom .searchItem {
-  position: relative;
-  font-size: 25px;
-  color: #FFFFFF;
-}
-.indexPage .searchContent .searchBottom .searchItem .shortValuecontent {
-  position: relative;
-  display: flex;
-  align-items: center;
-  width: 155px;
-  background: #6190E8;
-  border-radius: 100px;
-  padding: 10px 0;
-  margin-right: 5px;
-}
-.indexPage .searchContent .searchBottom .searchItem .shortValuecontent .selectValue {
-  width: 110px;
-  padding-left: 15px;
-  white-space: nowrap;
-}
-.indexPage .searchContent .searchBottom .searchItem .shortValuecontent .selectTitle {
-  padding-left: 15px;
-  white-space: nowrap;
-  width: 110px;
-}
-.indexPage .searchContent .searchBottom .searchItem .shortValuecontent .iconContent {
-  width: 45px;
-  padding-right: 20px;
-  text-align: right;
-}
-.indexPage .searchContent .searchBottom .searchItem .valuecontent {
-  position: relative;
-  display: flex;
-  align-items: center;
-  width: 190px;
-  background: #6190E8;
-  border-radius: 100px;
-  padding: 10px 0;
-  margin-right: 5px;
-}
-.indexPage .searchContent .searchBottom .searchItem .valuecontent .selectValue {
-  padding-left: 15px;
-  width: 145px;
-  white-space: nowrap;
-}
-.indexPage .searchContent .searchBottom .searchItem .valuecontent .selectTitle {
-  padding-left: 15px;
-  white-space: nowrap;
-  width: 145px;
-}
-.indexPage .searchContent .searchBottom .searchItem .valuecontent .iconContent {
-  width: 45px;
-  padding-right: 20px;
-  text-align: right;
-}
-.indexPage .searchContent .searchBottom .searchItem .searchSelectContent {
-  position: absolute;
-  right: 0;
-  top: 0;
-  bottom: 0;
-  z-index: 1;
-  width: 45px;
-  padding-right: 20px;
-  text-align: right;
-  display: flex;
-  justify-content: flex-end;
-  align-items: center;
-  padding-bottom: 3px;
-}
-.indexPage .searchContent .searchBottom .searchItem .closeIcon {
-  background: #F00;
-  width: 60px;
-  height: 46px;
-  display: flex;
-  padding-left: 20px;
-  align-items: center;
-}
-.indexPage .searchContent .searchBottomLOL {
-  position: fixed;
-  z-index: 1000;
-  top: 0;
-  left: 0;
-  right: 0;
-  box-shadow: 0px 6px 27px 16px #8e8d8d;
-  background: #FFFFFF;
-}
-.indexPage .list {
-  padding: 20px 23px 52px 23px;
-}
-.indexPage .list .item {
-  border-radius: 6px;
-  padding: 31px;
-  background: #FFFFFF;
-  display: flex;
-  flex-flow: row nowrap;
-  margin-bottom: 17px;
-  position: relative;
-  overflow: hidden;
-}
-.indexPage .list .item .revoke {
-  position: absolute;
-  top: 0;
-  left: 0;
-  right: 0;
-  bottom: 0;
-  background: rgba(0, 0, 0, 0.7);
-  z-index: 999;
-  display: flex;
-  flex-flow: row nowrap;
-  align-items: center;
-  justify-content: center;
-}
-.indexPage .list .item .revoke .revokeImg {
-  width: 250px;
-  height: 250px;
-}
-.indexPage .list .item .infor {
-  width: 100%;
-  position: relative;
-}
-.indexPage .list .item .infor .title {
-  display: flex;
-  flex-flow: row nowrap;
-  justify-content: space-between;
-  align-items: center;
-  padding-bottom: 20px;
-}
-.indexPage .list .item .infor .title .aname {
-  flex: 1;
-  padding-right: 20px;
-  font-weight: bolder;
-  display: flex;
-  flex-direction: row;
-  align-items: center;
-}
-.indexPage .list .item .infor .title .aname .aIcon {
-  background: #1E90FF;
-  color: white;
-  padding: 5px 8px;
-  border-radius: 4px;
-  margin-left: 10px;
-  font-size: 25px;
-}
-.indexPage .list .item .infor .title .createTimes {
-  font-size: 20px;
-  color: #999999;
-  white-space: nowrap;
-}
-.indexPage .list .item .infor .userName {
-  font-size: 25px;
-  color: #999999;
-  padding-bottom: 15px;
-}
-.indexPage .list .item .infor .releaseStarts {
-  font-size: 25px;
-  color: #999999;
-  padding-bottom: 15px;
-  display: flex;
-  flex-flow: row nowrap;
-  align-items: center;
-  justify-content: space-between;
-  position: relative;
-}
-.indexPage .list .item .infor .releaseStarts .punchClock {
-  position: absolute;
-  border-bottom-left-radius: 100px;
-  border-top-left-radius: 100px;
-  padding: 20px;
-  background: #f1662f;
-  color: white;
-  display: flex;
-  justify-content: center;
-  align-items: center;
-  right: -31px;
-  top: -10px;
-}
-.indexPage .list .item .infor .releaseEnds {
-  font-size: 25px;
-  color: #999999;
-  display: flex;
-  flex-flow: row nowrap;
-  align-items: center;
-  justify-content: space-between;
-  padding-bottom: 25px;
-}
-.indexPage .list .item .infor .bottomContent {
-  display: flex;
-  flex-flow: row nowrap;
-  justify-content: space-between;
-  align-items: center;
-}
-.indexPage .list .item .infor .bottomContent .status {
-  font-size: 28px;
-}
-.indexPage .list .item .infor .bottomContent .clockIn {
-  padding: 3px 8px;
-  font-size: 28px;
-  border-radius: 6px;
-}
-.indexPage .skeleton {
-  border-radius: 11px;
-  margin-bottom: 20px;
-}

+ 0 - 475
src/pages/examine/index.jsx

@@ -1,475 +0,0 @@
-import React, { Component } from 'react';
-import Taro from '@tarojs/taro';
-import { View, Picker, ScrollView, Button } from '@tarojs/components'
-import { getPublicReleaseList, techReject } from '../../utils/servers/servers';
-import dayjs from 'dayjs';
-import {
-  AtSearchBar,
-  AtTabs,
-  AtTabsPane,
-  AtIcon,
-  AtModal,
-  AtModalContent,
-  AtModalAction,
-  AtTextarea
-} from 'taro-ui';
-import { clockState } from '../../utils/tools/config';
-
-import './index.less';
-
-import 'taro-ui/dist/style/components/tabs.scss';
-import "taro-ui/dist/style/components/flex.scss";
-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 MyList from './myList';
-import MessageNoticebar from "../../components/common/messageNoticebar";
-
-class Examine extends Component {
-
-  constructor(props) {
-    super(props);
-    this.state = {
-      typeList: [
-        { title: '审核', type: 1 },
-        { title: '查看公出', type: 2 },
-        { title: '查看协单', type: 3 },
-        { title: '他人公出', type: 4 }],
-      current: 0,
-      isPickerRender: false,
-      validDates: '',
-
-      list: [],
-      pageNo: 1,
-      listState: 'LOADING',
-      starts: {},
-      clockInStarts: '',
-      rangeEndVal: '',
-      rangeStartVal: '',
-      rangeEndMinuteVal: '',
-      rangeStartMinuteVal: '',
-
-      id: "",
-      rmk: "",
-      isOpen: false,
-
-    }
-    this.getPublicReleaseList = this.getPublicReleaseList.bind(this);
-    this.getMyList = this.getMyList.bind(this);
-    this.onSetPickerTime = this.onSetPickerTime.bind(this);
-    this.onPickerHide = this.onPickerHide.bind(this)
-  }
-
-  componentDidShow() {
-    Taro.eventCenter.on('listOperation', (data) => {
-      if (!isNaN(parseInt(data.index))) {
-        let arr = this.state.list.concat([]);
-        arr[data.index] = {
-          ...arr[data.index],
-          ...data
-        }
-        this.setState({
-          list: arr
-        })
-      }
-    })
-
-    this.getPublicReleaseList();
-  }
-
-  async componentDidMount() {
-    await this.getPublicReleaseList();
-  }
-
-  onPullDownRefresh() {
-    this.getPublicReleaseList();
-  }
-
-  onReachBottom() {
-    this.getPublicReleaseList(true);
-  }
-
-  onTabItemTap(obj) {
-    if (obj.index === 1) {
-      this.onTabTap();
-    }
-  }
-
-  onPickerHide() {
-    this.setState({
-      isPickerRender: false,
-    });
-  }
-
-  async onSetPickerTime(val) {
-    let data = val.detail;
-    await this.setState({
-      rangeStartMinuteVal: dayjs(data.selectStartTime).format("YYYY-MM-DD"),
-      rangeEndMinuteVal: dayjs(data.selectEndTime).format("YYYY-MM-DD")
-    })
-    await this.getMyList(1);
-  }
-
-  async onTabTap() {
-    await this.getMyList(1);
-  }
-
-  async getPublicReleaseList(lv) {
-    await this.getMyList(lv ? this.state.pageNo + 1 : 1);
-    Taro.stopPullDownRefresh();
-  }
-
-  async getMyList(pageNo) {
-    const { current } = this.state
-    this.setState({
-      listState: 'LOADING'
-    })
-    let data = {
-      pageNo: pageNo,
-      pageSize: 10,
-      type: current === 0
-        ? "1" : current === 1
-          ? "2" : current === 2
-            ? "3" : current === 3 && "4",
-      releaseStarts: this.state.rangeStartMinuteVal || undefined,
-      releaseEnds: this.state.rangeEndMinuteVal || undefined,
-      status: isNaN(parseInt(this.state.starts.id)) ? undefined : String(this.state.starts.id),
-      clockIn: this.state.clockInStarts || undefined,
-      userName: this.state.searchValue || undefined,
-    }
-    for (let i in data) {
-      if (!data[i]) {
-        delete data[i]
-      }
-    }
-    let msg = await getPublicReleaseList(data);
-    if (msg.error.length === 0) {
-      if (msg.data.totalCount === 0) {
-        this.setState({
-          listState: 'NO_DATA'
-        })
-      } else if (msg.data.totalCount === this.state.list.length && pageNo !== 1) {
-        !this.state.isOpen && Taro.showToast({ title: '没有更多数据了', icon: 'none' });
-        this.setState({
-          listState: 'NO_MORE_DATA'
-        })
-      } else {
-        if (msg.data.totalCount === (pageNo === 1 ? msg.data.list : this.state.list.concat(msg.data.list)).length) {
-          this.setState({
-            listState: 'NO_MORE_DATA'
-          })
-        }
-      }
-      this.setState({
-        list: pageNo === 1 ? msg.data.list : this.state.list.concat(msg.data.list),
-        pageNo: msg.data.list.length === 0 ? this.state.pageNo : msg.data.pageNo
-      })
-    } else {
-      Taro.showToast({ title: msg.error[0].message, icon: 'none' });
-      this.setState({
-        listState: msg.error[0].field === '403' ? 'NO_DATA' : 'RELOAD'
-      })
-    }
-    Taro.stopPullDownRefresh();
-  }
-
-  onPageScroll(event) {
-    let touchMove = event.scrollTop;
-    if (touchMove >= 37) {
-      this.setState({
-        openSearch: true
-      })
-    } else {
-      this.setState({
-        openSearch: false
-      })
-    }
-  }
-
-  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,
-          rmk: "",
-        })
-      } else {
-        Taro.showToast({ title: v.error[0].message, icon: 'none' })
-      }
-    }).catch(() => {
-      Taro.hideLoading()
-      Taro.showToast({
-        title: '系统错误,请稍后再试',
-        icon: 'none'
-      })
-    })
-  }
-
-  render() {
-    return (
-      <View className='indexPage' >
-        <MessageNoticebar />
-        <View className='searchContent'>
-          <View className='searchTop'>
-            <AtSearchBar
-              showActionButton
-              placeholder='请输入企业/渠道'
-              value={this.state.searchValue}
-              onActionClick={() => {
-                this.getPublicReleaseList();
-              }}
-              onChange={(value) => {
-                this.setState({
-                  searchValue: value
-                })
-              }}
-              onClear={() => {
-                this.setState({
-                  searchValue: ''
-                })
-              }}
-            />
-          </View>
-          <ScrollView className={this.state.openSearch ? 'searchBottomLOL' : ''} scrollX style={{ width: '100%' }}>
-            <View className='searchBottom'>
-              <View className='searchItem' style={{ paddingLeft: '5px' }}>
-                <Picker
-                  value={this.state.starts.id}
-                  range={clockState} rangeKey='title' mode='selector'
-                  onChange={(e) => {
-                    this.setState({
-                      starts: clockState[e.detail.value],
-                    }, () => {
-                      this.getPublicReleaseList();
-                    })
-                  }}>
-                  {
-                    !this.state.starts.title ?
-                      <View className='shortValuecontent'>
-                        <View className='selectTitle'>审核状态</View>
-                        <View className='iconContent'><AtIcon value='chevron-down' size='10' color='#FFFFFF' /></View>
-                      </View> :
-                      <View className='shortValuecontent'>
-                        <View className='selectValue'>
-                          {this.state.starts.title}
-                        </View>
-                        <View className='iconContent' />
-                      </View>
-                  }
-                </Picker>
-                {
-                  this.state.starts.title &&
-                  <View className='searchSelectContent'>
-                    <View className='selectIcon'
-                      onClick={(e) => {
-                        e.stopPropagation();
-                        this.setState({
-                          starts: {}
-                        }, () => {
-                          this.getPublicReleaseList();
-                        })
-                      }}>
-                      <AtIcon value='close-circle' size='10' color='#FFFFFF' />
-                    </View>
-                  </View>
-                }
-              </View>
-              <View className='searchItem' >
-                <Picker
-                  value={this.state.clockInStarts}
-                  range={['未打卡', '已打卡', '异常打卡']}
-                  mode='selector'
-                  onChange={(e) => {
-                    this.setState({
-                      clockInStarts: String(e.detail.value)
-                    }, () => {
-                      this.getPublicReleaseList();
-                    })
-                  }}>
-                  {
-                    !this.state.clockInStarts ?
-                      <View className='shortValuecontent'>
-                        <View className='selectTitle'>打卡状态</View>
-                        <View className='iconContent'><AtIcon value='chevron-down' size='10' color='#FFFFFF' /></View>
-                      </View> :
-                      <View className='shortValuecontent'>
-                        <View className='selectValue'>
-                          {
-                            this.state.clockInStarts === '2'
-                              ? '异常打卡' : this.state.clockInStarts === '1'
-                                ? '已打卡' : this.state.clockInStarts === '0'
-                                  ? '未打卡' : ''
-                          }
-                        </View>
-                        <View className='iconContent' />
-                      </View>
-                  }
-                </Picker>
-                {
-                  this.state.clockInStarts ?
-                    <View className='searchSelectContent'>
-                      <View className='selectIcon'
-                        onClick={(e) => {
-                          e.stopPropagation();
-                          this.setState({
-                            clockInStarts: '',
-                          }, () => {
-                            this.getPublicReleaseList();
-                          })
-                        }}>
-                        <AtIcon value='close-circle' size='10' color='#FFFFFF' />
-                      </View>
-                    </View> : null
-                }
-              </View>
-              {/* 多选时间框 */}
-              <View className='searchItem' onClick={() => {
-                this.setState({
-                  isPickerRender: true
-                })
-              }}>
-                <View>
-                  {
-                    !this.state.rangeStartMinuteVal ?
-                      <View className='valuecontent' style={{ width: '200px' }}>
-                        <View className='selectTitle' style={{ paddingLeft: '50px' }}>开始及结束时间</View>
-                        <View className='iconContent' style={{ paddingLeft: '20px' }}><AtIcon value='chevron-down' size='10' color='#FFFFFF' /></View>
-                      </View> :
-                      <View className='valuecontent' style={{ width: '200px' }}>
-                        <View className='selectValue' >
-                          {this.state.rangeStartMinuteVal + "~" + this.state.rangeEndMinuteVal}
-                        </View>
-                        <View className='iconContent' />
-                      </View>
-                  }
-                </View>
-                {
-                  this.state.rangeStartMinuteVal &&
-                  <View className='searchSelectContent'>
-                    <View className='selectIcon'
-                      onClick={(e) => {
-                        e.stopPropagation();
-                        this.setState({
-                          rangeStartMinuteVal: '',
-                          rangeEndMinuteVal: '',
-                        }, () => {
-                          this.getPublicReleaseList();
-                        })
-                      }}>
-                      <AtIcon value='close-circle' size='10' color='#FFFFFF' />
-                    </View>
-                  </View>
-                }
-              </View>
-            </View>
-          </ScrollView>
-        </View>
-        <AtTabs
-          swipeable={false}
-          current={this.state.current || 0}
-          tabList={this.state.typeList}
-          onClick={(current) => {
-            this.setState({
-              list: [],
-              pageNo: 1,
-              current,
-            }, () => {
-              this.getPublicReleaseList();
-            })
-          }}>
-          {
-            this.state.typeList?.map((item, index) =>
-              <AtTabsPane
-                current={this.state.current}
-                index={index}
-              >
-                <MyList
-                  type={item.type}
-                  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>
-        <timePicker
-          config={{
-            endDate: true,
-            column: "minute",
-            dateLimit: false,
-            limitStartTime: dayjs().subtract(3, 'year').format('YYYY-MM-DD '),
-            limitEndTime: dayjs().add(3, 'year').format('YYYY-MM-DD ')
-          }}
-          isPartition
-          pickerShow={this.state.isPickerRender}
-          onconditionaljudgment={(v) => {
-            // let a = dayjs(dayjs(v.detail.endTime).second(0).format('YYYY-MM-DD'));
-            // let b = dayjs(dayjs().second(0).format('YYYY-MM-DD'))
-            // if(a.isBefore(b)){
-            //   Taro.showToast({
-            //     title:'结束时间不能小于当前时间',
-            //     icon:'none'
-            //   })
-            //   v.detail.setLv(false);
-            // }
-          }}
-          onhidepicker={() => {
-            this.onPickerHide()
-          }}
-          onsetpickertime={(v) => {
-            this.onSetPickerTime(v)
-          }}>
-        </timePicker>
-        {/* 驳回协单 */}
-        {
-          this.state.isOpen &&
-          <AtModal
-            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>
-    )
-  }
-}
-
-export default Examine

+ 0 - 336
src/pages/examine/index.less

@@ -1,336 +0,0 @@
-.indexPage {
-  position: relative;
-  z-index: 1;
-  background: #F5F5F5;
-  min-height: calc(100vh - 52px);
-
-  .item-content__info-title {
-    font-size: 28px;
-    color: #9BA0AA;
-  }
-
-  .item-extra__info {
-    font-size: 28px;
-    color: #9BA0AA;
-  }
-
-  .at-list__item::after {
-    border-bottom: 0;
-  }
-
-  .at-list::after {
-    border-top: 0;
-  }
-
-  .indexPage .at-list::after {
-    border: 0;
-  }
-
-  .searchContent {
-    position: relative;
-    background: white;
-
-    .searchTop {
-      z-index: 1000;
-    }
-
-    .searchBottom {
-      display: flex;
-      align-items: center;
-      justify-content: space-between;
-      background: #FFFFFF;
-      border-bottom-left-radius: 10px;
-      border-bottom-right-radius: 10px;
-      padding: 10px 0 10px 0;
-
-      .searchBottomBack {
-        position: fixed;
-        z-index: -1;
-        left: 0;
-        right: 0;
-        bottom: 0;
-        top: 100px;
-        background: rgba(0, 0, 0, .7);
-      }
-
-      .searchItem {
-        position: relative;
-        font-size: 25px;
-        color: #FFFFFF;
-
-        .shortValuecontent {
-          position: relative;
-          display: flex;
-          align-items: center;
-          width: 155px;
-          background: #6190E8;
-          border-radius: 100px;
-          padding: 10px 0;
-          margin-right: 5px;
-
-          .selectValue {
-            width: 110px;
-            padding-left: 15px;
-            white-space: nowrap;
-          }
-
-          .selectTitle {
-            padding-left: 15px;
-            white-space: nowrap;
-            width: 110px;
-          }
-
-          .iconContent {
-            width: 45px;
-            padding-right: 20px;
-            text-align: right;
-          }
-        }
-
-        .valuecontent {
-          position: relative;
-          display: flex;
-          align-items: center;
-          width: 190px;
-          background: #6190E8;
-          border-radius: 100px;
-          padding: 10px 0;
-          margin-right: 5px;
-
-          .selectValue {
-            padding-left: 15px;
-            width: 145px;
-            white-space: nowrap;
-          }
-
-          .selectTitle {
-            padding-left: 15px;
-            white-space: nowrap;
-            width: 145px;
-          }
-
-          .iconContent {
-            width: 45px;
-            padding-right: 20px;
-            text-align: right;
-          }
-        }
-
-        .searchSelectContent {
-          position: absolute;
-          right: 0;
-          top: 0;
-          bottom: 0;
-          z-index: 1;
-          width: 45px;
-          padding-right: 20px;
-          text-align: right;
-          display: flex;
-          justify-content: flex-end;
-          align-items: center;
-          padding-bottom: 3px;
-        }
-
-        .closeIcon {
-          background: #F00;
-          width: 60px;
-          height: 46px;
-          display: flex;
-          padding-left: 20px;
-          align-items: center;
-        }
-      }
-    }
-
-    .searchBottomLOL {
-      position: fixed;
-      z-index: 1000;
-      top: 0;
-      left: 0;
-      right: 0;
-      box-shadow: 0px 6px 27px 16px #8e8d8d;
-      background: #FFFFFF;
-    }
-  }
-
-  .list {
-    padding: 20px 23px 52px 23px;
-
-    .item {
-      border-radius: 6px;
-      padding: 31px;
-      background: #FFFFFF;
-      display: flex;
-      flex-flow: row nowrap;
-      margin-bottom: 17px;
-      position: relative;
-      overflow: hidden;
-
-      .itype {
-        font-size: 20px;
-        color: #fff;
-        text-align: center;
-        transform: rotate(-45deg);
-        background: #6190E8;
-        padding: 5px 30px;
-        position: absolute;
-        top: 5px;
-        left: -30px;
-
-      }
-
-      .revoke {
-        position: absolute;
-        top: 0;
-        left: 0;
-        right: 0;
-        bottom: 0;
-        background: rgba(0, 0, 0, .7);
-        z-index: 999;
-        display: flex;
-        flex-flow: row nowrap;
-        align-items: center;
-        justify-content: center;
-
-        .revokeImg {
-          width: 250px;
-          height: 250px;
-        }
-      }
-
-      .infor {
-        width: 100%;
-        position: relative;
-
-        .title {
-          display: flex;
-          flex-flow: row nowrap;
-          justify-content: space-between;
-          align-items: center;
-          padding-bottom: 20px;
-
-          .aname {
-            flex: 1;
-            padding-right: 20px;
-            font-weight: bolder;
-            display: flex;
-            flex-direction: row;
-            align-items: center;
-
-            .aIcon {
-              background: #1E90FF;
-              color: white;
-              padding: 5px 8px;
-              border-radius: 4px;
-              margin-left: 10px;
-              font-size: 25px;
-            }
-          }
-
-          .createTimes {
-            font-size: 20px;
-            color: #999999;
-            white-space: nowrap;
-          }
-        }
-
-        .userName {
-          font-size: 25px;
-          color: #999999;
-          padding-bottom: 15px;
-          display: flex;
-          flex-flow: row nowrap;
-          align-items: center;
-          justify-content: space-between;
-          position: relative;
-
-          .uNtext {
-            width: 540px;
-            overflow: hidden;
-            white-space: nowrap;
-            text-overflow: ellipsis;
-          }
-
-          .reject {
-            position: absolute;
-            right: -31px;
-            top: 0px;
-            border-bottom-left-radius: 100px;
-            border-top-left-radius: 100px;
-            padding: 20px 20px;
-            color: white;
-            background: rgba(22, 155, 213, 1);
-
-          }
-
-        }
-
-        .releaseStarts {
-          font-size: 25px;
-          color: #999999;
-          padding-bottom: 15px;
-          display: flex;
-          flex-flow: row nowrap;
-          align-items: center;
-          justify-content: space-between;
-          position: relative;
-
-          .punchClock {
-            position: absolute;
-            border-bottom-left-radius: 100px;
-            border-top-left-radius: 100px;
-            padding: 20px 20px;
-            background: #f1662f;
-            color: white;
-            display: flex;
-            justify-content: center;
-            align-items: center;
-            right: -31px;
-            top: -10px;
-          }
-        }
-
-        .releaseEnds {
-          font-size: 25px;
-          color: #999999;
-          display: flex;
-          flex-flow: row nowrap;
-          align-items: center;
-          justify-content: space-between;
-          padding-bottom: 15px;
-        }
-
-        .coOder {
-          font-size: 25px;
-          color: #6eb173;
-          padding-bottom: 15px;
-        }
-
-        .examine{
-          text-align: right;
-          font-size: 25px;
-        }
-
-        .bottomContent {
-          display: flex;
-          flex-flow: row nowrap;
-          justify-content: space-between;
-          align-items: center;
-
-          .status {
-            font-size: 28px;
-          }
-
-          .clockIn {
-            font-size: 28px;
-          }
-        }
-      }
-    }
-  }
-
-  .skeleton {
-    border-radius: 11px;
-    margin-bottom: 20px;
-  }
-}

+ 119 - 119
src/pages/login/index.jsx

@@ -1,12 +1,12 @@
 import { Component } from 'react'
 import Taro from '@tarojs/taro'
 import { connect } from 'react-redux'
-import {View, Input, Image} from '@tarojs/components'
-import {login,getWorkingHours,setOpenId} from '../../utils/servers/servers';
+import { View, Input, Image } from '@tarojs/components'
+import { login, getWorkingHours, setOpenId } from '../../utils/servers/servers';
 
 import { add, minus, asyncAdd } from '../../actions/counter'
 
-import { AtButton,AtIcon,AtModal  } from 'taro-ui'
+import { AtButton, AtIcon, AtModal } from 'taro-ui'
 
 import NavBar from '../../components/common/NavBar';
 
@@ -17,33 +17,33 @@ import 'taro-ui/dist/style/components/loading.scss';
 import 'taro-ui/dist/style/components/icon.scss';
 import 'taro-ui/dist/style/components/modal.scss';
 
-import selectIcon from '../../image/select.png' ;
+import selectIcon from '../../image/select.png';
 
 import './index.less'
 
 @connect(({ counter }) => ({
   counter
 }), (dispatch) => ({
-  add () {
+  add() {
     dispatch(add())
   },
-  dec () {
+  dec() {
     dispatch(minus())
   },
-  asyncAdd () {
+  asyncAdd() {
     dispatch(asyncAdd())
   }
 }))
 class Login extends Component {
   constructor(props) {
     super(props);
-    this.state={
-      username:'',
-      password:'',
-      isOpened:false,
-      openedType:0,
-      usernameList:Taro.getStorageSync('usernameList') || [],
-      rememberPassword:true
+    this.state = {
+      username: '',
+      password: '',
+      isOpened: false,
+      openedType: 0,
+      usernameList: Taro.getStorageSync('usernameList') || [],
+      rememberPassword: true
     }
     this.login = this.login.bind(this);
     this.authorization = this.authorization.bind(this);
@@ -52,7 +52,7 @@ class Login extends Component {
     this.getWorkingHours = this.getWorkingHours.bind(this);
   }
 
-  componentDidShow () {
+  componentDidShow() {
 
   }
 
@@ -60,60 +60,59 @@ class Login extends Component {
 
   }
 
-  authorization(){
+  authorization() {
     this.setState({
-      loading:true,
+      loading: true,
     })
-    let _this= this;
+    let _this = this;
     Taro.getSetting({
       withSubscriptions: true,
-      success:(res)=>{
+      success: (res) => {
         //console.log(res.subscriptionsSetting,'res.subscriptionsSetting')
-        if(res.subscriptionsSetting.mainSwitch){
-          if(res.subscriptionsSetting['j7WH3EwQnxGxwuV2HwmJhryxySPE8vOiV5cVOpp-42I'] === "reject" || res.subscriptionsSetting['pWia-KJPFwDM8ReDu_BOa9FJn31VFc81bp3yxfBmIRI'] === "reject" || res.subscriptionsSetting['vo28uzT2sLS-9ioroNyZbMSvu0mMvf6le2pDZVN891U'] === "reject"){
+        if (res.subscriptionsSetting.mainSwitch) {
+          if (res.subscriptionsSetting['0e2Te3WUa0fDPQnyE8TLmN_K06WLsB4fqm5qpo6npNo'] === "reject" || res.subscriptionsSetting['rRPWzRcGY8BGwlk0xyjwR1RKdv3iRFXaU3bcK1300gw'] === "reject") {
             this.setState({
-              isOpened:true,
-              loading:false,
-              openedType:1
+              isOpened: true,
+              loading: false,
+              openedType: 1
             })
             return;
           }
           Taro.requestSubscribeMessage({ //获取下发权限
             tmplIds: [
-              'pWia-KJPFwDM8ReDu_BOa9FJn31VFc81bp3yxfBmIRI',
-              'j7WH3EwQnxGxwuV2HwmJhryxySPE8vOiV5cVOpp-42I',
-              'vo28uzT2sLS-9ioroNyZbMSvu0mMvf6le2pDZVN891U'
+              '0e2Te3WUa0fDPQnyE8TLmN_K06WLsB4fqm5qpo6npNo',
+              'rRPWzRcGY8BGwlk0xyjwR1RKdv3iRFXaU3bcK1300gw',
             ], //此处写在后台获取的模板ID,可以写多个模板ID,看自己的需求
-             success: function (s) {
-                _this.setState({
-                  loading:false,
-                })
-               _this.login();
+            success: function (s) {
+              _this.setState({
+                loading: false,
+              })
+              _this.login();
             },
             fail: function (err) {
               _this.setState({
-                loading:false,
+                loading: false,
               })
               //console.log(err)
             }
           })
-        }else{
+        } else {
           this.setState({
-            isOpened:true,
-            loading:false,
+            isOpened: true,
+            loading: false,
           })
         }
       },
-      fail:()=>{
+      fail: () => {
         this.setState({
-          loading:false,
+          loading: false,
         })
       }
     })
   }
 
-  login(){
-    if(!this.state.username){
+  login() {
+    if (!this.state.username) {
       Taro.showToast({
         title: '请输入用户名',
         icon: 'none',
@@ -121,7 +120,7 @@ class Login extends Component {
       })
       return;
     }
-    if(!this.state.password){
+    if (!this.state.password) {
       Taro.showToast({
         title: '请输入密码',
         icon: 'none',
@@ -130,87 +129,88 @@ class Login extends Component {
       return;
     }
     this.setState({
-      loading:true,
+      loading: true,
     })
     login({
-      username:this.state.username,
-      password:this.state.password
-    }).then((msg)=>{
+      username: this.state.username,
+      password: this.state.password
+    }).then((msg) => {
       this.setState({
-        loading:false
+        loading: false
       });
-      if(!msg.data.openId){
+      if (!msg.data.openId) {
         Taro.login({
-          success: (res)=>{
+          success: (res) => {
             setOpenId({
-              code:res.code,
-            }).then(v=>{
-              if(v.error.length === 0){
-                this.setUsernameList(this.state.username,this.state.password);
+              type: 1,
+              code: res.code,
+            }).then(v => {
+              if (v.error.length === 0) {
+                this.setUsernameList(this.state.username, this.state.password);
                 Taro.eventCenter.trigger('getStorageSync');
                 this.getWorkingHours(msg.data.departmentId);
-              }else{
+              } else {
                 Taro.showToast({
-                  title:v.error[0].message,
-                  icon:'none',
+                  title: v.error[0].message,
+                  icon: 'none',
                 })
               }
             })
           },
-          fail:()=>{
-            Taro.showToast({title:'系统错误,请稍后重试'})
+          fail: () => {
+            Taro.showToast({ title: '系统错误,请稍后重试' })
           }
         });
-      }else{
-        this.setUsernameList(this.state.username,this.state.password);
+      } else {
+        this.setUsernameList(this.state.username, this.state.password);
         Taro.eventCenter.trigger('getStorageSync');
         this.getWorkingHours(msg.data.departmentId);
       }
-    }).catch((err)=>{
+    }).catch((err) => {
       //console.log(err)
       this.setState({
-        loading:false
+        loading: false
       })
     })
   }
 
-  getWorkingHours(depId){
+  getWorkingHours(depId) {
     getWorkingHours({
       depId
-    }).then((msg)=>{
-      if(msg.error.length === 0){
+    }).then((msg) => {
+      if (msg.error.length === 0) {
         let obj = Taro.getStorageSync('userInfor');
         obj.workTimeInfor = msg.data;
         Taro.setStorageSync('userInfor', obj);
         Taro.switchTab({
-          url: '/pages/punchClock/index',
+          url: '/pages/mybusiness/index',
         })
-      }else{
-        Taro.showToast({title:msg.error[0].message,icon:'none'})
+      } else {
+        Taro.showToast({ title: msg.error[0].message, icon: 'none' })
       }
-    }).catch((err)=>{
+    }).catch((err) => {
       // console.log(err)
     })
   }
 
-  setUsernameList(username,password){
-    if(!this.state.rememberPassword){
+  setUsernameList(username, password) {
+    if (!this.state.rememberPassword) {
       let usernameList = Taro.getStorageSync('usernameList') || [];
-      let index = usernameList.findIndex(v=>v.username === username);
-      if(index !== -1){
-        usernameList.splice(index,1)
+      let index = usernameList.findIndex(v => v.username === username);
+      if (index !== -1) {
+        usernameList.splice(index, 1)
       }
       Taro.setStorageSync('usernameList', usernameList);
-    }else{
+    } else {
       let usernameList = Taro.getStorageSync('usernameList') || [];
-      let index = usernameList.findIndex(v=>v.username === username);
-      if(index === -1){
+      let index = usernameList.findIndex(v => v.username === username);
+      if (index === -1) {
         usernameList.push({
           username,
           password
         })
-      }else{
-        usernameList[index]={
+      } else {
+        usernameList[index] = {
           username,
           password
         }
@@ -219,25 +219,25 @@ class Login extends Component {
     }
   }
 
-  getUsernameList(value = this.state.username){
+  getUsernameList(value = this.state.username) {
     let usernameList = Taro.getStorageSync('usernameList') || [];
     let arr = [];
-    for(let i of usernameList){
-      if(i.username.indexOf(value) !== -1){
+    for (let i of usernameList) {
+      if (i.username.indexOf(value) !== -1) {
         arr.push(i)
       }
     }
     this.setState({
-      usernameList:arr,
-      isopenUsernameList:true
+      usernameList: arr,
+      isopenUsernameList: true
     })
   }
 
-  render () {
+  render() {
     return (
-      <View className='login' onClick={()=>{
+      <View className='login' onClick={() => {
         this.setState({
-          isopenUsernameList:false
+          isopenUsernameList: false
         })
       }}>
         <NavBar
@@ -245,32 +245,32 @@ class Login extends Component {
           title='科德集团'
           background='#0000'
           color='#FFF'
-          onHome={()=>{}}
+          onHome={() => { }}
         />
         <View className='welcome'>
-          <Image src={BG} className='bg' mode='heightFix'/>
-          <View className='welcomeTitle'>科德科技服务系统</View>
+          <Image src={BG} className='bg' mode='heightFix' />
+          <View className='welcomeTitle'>科德研发服务流程管理系统</View>
           <View className='welcomeTitle'>欢迎您!</View>
         </View>
         <View className='loginContent'>
           <View className='loginItem'>
-            <AtIcon value='user' size='20' color='#999999'/>
+            <AtIcon value='user' size='20' color='#999999' />
             <View className='usernameContent'>
               <Input
-                style={{marginLeft:'15px',width:'100%'}}
+                style={{ marginLeft: '15px', width: '100%' }}
                 type='text'
                 placeholder='请输入您的系统账户'
                 value={this.state.username}
-                onInput={(v)=>{
+                onInput={(v) => {
                   this.setState({
                     username: v.detail.value
                   })
                   this.getUsernameList(v.detail.value);
                 }}
-                onFocus={()=>{
+                onFocus={() => {
                   this.getUsernameList();
                 }}
-                onBlur={()=>{
+                onBlur={() => {
                   // this.setState({
                   //   isopenUsernameList:false
                   // })
@@ -279,17 +279,17 @@ class Login extends Component {
             </View>
           </View>
           <View className='usernameListContent'>
-            {this.state.isopenUsernameList && this.state.usernameList.length >0 ? <View className='usernameList'>
+            {this.state.isopenUsernameList && this.state.usernameList.length > 0 ? <View className='usernameList'>
               {
-                this.state.usernameList.map((v,k)=>(
-                  <View key={k} className='usernameItem' onClick={()=>{
+                this.state.usernameList.map((v, k) => (
+                  <View key={k} className='usernameItem' onClick={() => {
                     this.setState({
-                      username:v.username,
-                      password:v.password,
-                      isopenUsernameList:false
+                      username: v.username,
+                      password: v.password,
+                      isopenUsernameList: false
                     })
                   }}>
-                    <AtIcon value='user' size='20' color='#c6c4c4'/>
+                    <AtIcon value='user' size='20' color='#c6c4c4' />
                     <View className='value'>
                       <View className='name'>{v.username}</View>
                       <View className='password'>*******</View>
@@ -300,13 +300,13 @@ class Login extends Component {
             </View> : null}
           </View>
           <View className='loginItem'>
-            <AtIcon value='lock' size='20' color='#999999'/>
+            <AtIcon value='lock' size='20' color='#999999' />
             <Input
-              style={{marginLeft:'15px',width:'100%'}}
+              style={{ marginLeft: '15px', width: '100%' }}
               type='password'
               placeholder='请输入密码'
               value={this.state.password}
-              onInput={(v)=>{
+              onInput={(v) => {
                 this.setState({
                   password: v.detail.value
                 })
@@ -314,16 +314,16 @@ class Login extends Component {
             />
           </View>
           <View className='rememberPassword'>
-            <View className='selectContent' onClick={()=>{
+            <View className='selectContent' onClick={() => {
               this.setState({
-                rememberPassword:!this.state.rememberPassword
+                rememberPassword: !this.state.rememberPassword
               })
             }}>
-              <Image src={selectIcon} className='selectIcon' style={{visibility:this.state.rememberPassword ? "visible" : "hidden"}}/>
+              <Image src={selectIcon} className='selectIcon' style={{ visibility: this.state.rememberPassword ? "visible" : "hidden" }} />
             </View>
             记住密码
           </View>
-          <AtButton type='primary' 	circle loading={this.state.loading} onClick={this.authorization}>登录</AtButton>
+          <AtButton type='primary' circle loading={this.state.loading} onClick={this.authorization}>登录</AtButton>
           <View className='tips'>
             暂无账号?请联系管理员进行添加
           </View>
@@ -336,25 +336,25 @@ class Login extends Component {
           title='提醒'
           cancelText='取消'
           confirmText='确认'
-          onClose={()=>{
+          onClose={() => {
             this.setState({
-              isOpened:false,
-              openedType:0,
+              isOpened: false,
+              openedType: 0,
             })
           }}
-          onCancel={()=>{
+          onCancel={() => {
             this.setState({
-              isOpened:false,
-              openedType:0
+              isOpened: false,
+              openedType: 0
             })
           }}
-          onConfirm={()=>{
+          onConfirm={() => {
             this.setState({
-              isOpened:false,
-              openedType:0
-            },()=>{
+              isOpened: false,
+              openedType: 0
+            }, () => {
               Taro.openSetting({
-                success:(value)=> {
+                success: (value) => {
 
                 }
               })

+ 1 - 1
src/pages/mybusiness/index.config.js

@@ -1,5 +1,5 @@
 export default {
-  navigationBarTitleText: '我的',
+  navigationBarTitleText: '列表',
   enablePullDownRefresh: true,
   onReachBottomDistance: 50,
   usingComponents: {

+ 9 - 218
src/pages/mybusiness/index.jsx

@@ -1,17 +1,13 @@
 import React, { Component } from 'react';
 import Taro from '@tarojs/taro';
 import { View, Picker, ScrollView, Button } from '@tarojs/components'
-import { getPublicReleaseList, techReject, getReleasetDails } from '../../utils/servers/servers';
+import { getPublicReleaseList, } from '../../utils/servers/servers';
 import dayjs from 'dayjs';
 import {
   AtSearchBar,
   AtTabs,
   AtTabsPane,
   AtIcon,
-  AtModal,
-  AtModalContent,
-  AtModalAction,
-  AtTextarea
 } from 'taro-ui';
 import { clockState } from '../../utils/tools/config';
 
@@ -21,16 +17,12 @@ import "taro-ui/dist/style/components/flex.scss";
 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 "taro-ui/dist/style/components/search-bar.scss";
+import "taro-ui/dist/style/components/button.scss";
 
-import MyList from '../examine/myList';
-import MessageNoticebar from "../../components/common/messageNoticebar";
-import InquiryModal from "../../components/common/inquiryModal";
-import PublicContent from "../egressDetails/publicContent";
-import { resourceAddress } from "../../utils/config";
+import MyList from './list';
 
-class Examine extends Component {
+class MyBusiness extends Component {
 
   constructor(props) {
     super(props);
@@ -40,7 +32,6 @@ class Examine extends Component {
         { title: '我的协单' }],
       current: 0,
       isPickerRender: false,
-      validDates: '',
       list: [],
       pageNo: 1,
       listState: 'LOADING',
@@ -50,9 +41,6 @@ class Examine extends Component {
       rangeStartVal: '',
       rangeEndMinuteVal: '',
       rangeStartMinuteVal: '',
-      id: "",
-      rmk: "",
-      isOpen: false,
       coorder: [
         { title: '协单助手', type: 3 },
         { title: '技术协单', type: 2 },
@@ -64,31 +52,10 @@ class Examine extends Component {
     this.getMyList = this.getMyList.bind(this);
     this.onSetPickerTime = this.onSetPickerTime.bind(this);
     this.onPickerHide = this.onPickerHide.bind(this);
-    this.getReleasetDails = this.getReleasetDails.bind(this);
+
   }
 
   componentDidShow() {
-    Taro.eventCenter.on('listOperation', (data) => {
-      if (!isNaN(parseInt(data.index))) {
-        let arr = this.state.list.concat([]);
-        arr[data.index] = {
-          ...arr[data.index],
-          ...data
-        }
-        this.setState({
-          list: arr
-        })
-      }
-    })
-    //获取地区选定数据
-    const chooseLocation = requirePlugin("chooseLocation");
-    const location = chooseLocation.getLocation();
-    if (location) {
-      this.setState({
-        selectArrderLocation: location,
-      });
-    }
-
     this.getPublicReleaseList();
   }
 
@@ -104,47 +71,12 @@ class Examine extends Component {
     this.getPublicReleaseList(true);
   }
 
-  onTabItemTap(obj) {
-    if (obj.index === 1) {
-      this.onTabTap();
-    }
-  }
-
   onPickerHide() {
     this.setState({
       isPickerRender: false,
     });
   }
-  // 公出详情
-  getReleasetDails(id) {
-    getReleasetDails({
-      id: id
-    }).then((v) => {
-      if (v.error.length === 0) {
-        if (v.data) {
-          let list = [];
-          for (let i of v.data.annexUrl.split(",")) {
-            if (i) {
-              list.push({ url: resourceAddress + i });
-            }
-          }
-          v.data.annexUrl = list;
-          this.setState({
-            dtails: v.data,
-            selectArrderLocation: {
-              longitude: parseFloat(v.data.prdList[0]?.longitude),
-              latitude: parseFloat(v.data.prdList[0]?.latitude),
-              name: v.data.prdList[0]?.districtName,
-            },
-          })
-        }
-      } else {
-        Taro.showToast({ title: v.error[0].message, icon: "none" });
-      }
-    }).catch((err) => {
-      // Taro.showToast({ title: "系统错误,请稍后再试", icon: "none" });
-    });
-  }
+
 
   async onSetPickerTime(val) {
     let data = val.detail;
@@ -191,8 +123,7 @@ class Examine extends Component {
           listState: 'NO_DATA'
         })
       } else if (msg.data.totalCount === this.state.list.length && pageNo !== 1) {
-        // 防止提示挡住驳回弹窗
-        !this.state.isOpen && Taro.showToast({ title: '没有更多数据了', icon: 'none' });
+        Taro.showToast({ title: '没有更多数据了', icon: 'none' });
         this.setState({
           listState: 'NO_MORE_DATA'
         })
@@ -229,40 +160,10 @@ 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,
-          rmk: "",
-        })
-      } else {
-        Taro.showToast({ title: v.error[0].message, icon: 'none' })
-      }
-    }).catch(() => {
-      Taro.hideLoading()
-      Taro.showToast({
-        title: '系统错误,请稍后再试',
-        icon: 'none'
-      })
-    })
-  }
 
   render() {
     return (
       <View className='indexPage' >
-        <MessageNoticebar />
         <View className='searchContent'>
           <View className='searchTop'>
             <AtSearchBar
@@ -460,32 +361,12 @@ class Examine extends Component {
                   </View>
                 }
                 <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,
-                    })
-                  }}
-                  again={e => {
-                    this.getReleasetDails(e.id)
-                    this.setState({
-                      isInquiryOpened: true,
-                      inquiryTitle: "温馨提示",
-                      inquiryContent: "您确定需再次公出拜访同一家企业吗?",
-                      inquiryFn: () => {
-
-                      },
-                    });
-                  }}
                 />
               </AtTabsPane>
             )
@@ -502,15 +383,6 @@ class Examine extends Component {
           isPartition
           pickerShow={this.state.isPickerRender}
           onconditionaljudgment={(v) => {
-            // let a = dayjs(dayjs(v.detail.endTime).second(0).format('YYYY-MM-DD'));
-            // let b = dayjs(dayjs().second(0).format('YYYY-MM-DD'))
-            // if(a.isBefore(b)){
-            //   Taro.showToast({
-            //     title:'结束时间不能小于当前时间',
-            //     icon:'none'
-            //   })
-            //   v.detail.setLv(false);
-            // }
           }}
           onhidepicker={() => {
             this.onPickerHide()
@@ -519,90 +391,9 @@ class Examine extends Component {
             this.onSetPickerTime(v)
           }}>
         </timePicker>
-        {/* 驳回协单 */}
-        {
-          this.state.isOpen &&
-          <AtModal
-            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>
-        }
-        {/* 再次公出申请 */}
-        {
-          this.state.isInquiryOpened &&
-          <InquiryModal
-            isOpened={this.state.isInquiryOpened}
-            title={this.state.inquiryTitle}
-            content={this.state.inquiryContent}
-            color="black"
-            isNo={this.state.isNo}
-            onClose={() => {
-              this.setState({
-                isInquiryOpened: false,
-                dtails: {},
-                inquiryTitle: "",
-                inquiryContent: "",
-                isNo: true,
-              });
-            }}
-            onDetermine={() => {
-              this.setState({
-                isModifyOpened: true,
-
-                isInquiryOpened: false,
-                inquiryTitle: "",
-                inquiryContent: "",
-                isNo: true,
-                inquiryFn: () => { },
-              });
-            }}
-          />
-        }
-        {/* 再次公出详情 */}
-        {
-          this.state.isModifyOpened &&
-          <AtModal
-            isOpened={this.state.isModifyOpened}
-            onClose={() => {
-              this.setState({
-                isModifyOpened: false,
-                dtails: {},
-              })
-            }}
-          >
-            <AtModalContent>
-              <PublicContent
-                again={true}
-                onClose={() => {
-                  this.setState({
-                    isModifyOpened: false,
-                    dtails: {},
-                  })
-                }}
-                locationInfor={this.state.selectArrderLocation}
-                dtails={this.state.dtails}
-                isOpened={this.state.isModifyOpened}
-              />
-            </AtModalContent>
-          </AtModal>
-        }
       </View>
     )
   }
 }
 
-export default Examine
+export default MyBusiness

+ 15 - 13
src/pages/mybusiness/index.less

@@ -265,19 +265,6 @@
           justify-content: space-between;
           position: relative;
 
-          .punchClock {
-            position: absolute;
-            border-bottom-left-radius: 100px;
-            border-top-left-radius: 100px;
-            padding: 20px;
-            background: #f1662f;
-            color: white;
-            display: flex;
-            justify-content: center;
-            align-items: center;
-            right: -31px;
-            top: -10px;
-          }
         }
 
         .releaseEnds {
@@ -322,4 +309,19 @@
 
 .at-modal__container {
   width: 718px;
+}
+
+.punchClock {
+  font-size: 24px;
+  position: absolute;
+  border-bottom-left-radius: 100px;
+  border-top-left-radius: 100px;
+  padding: 20px;
+  background: rgba(0, 128, 0, 1);
+  color: white;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  right: -31px;
+  bottom: 60px;
 }

+ 62 - 62
src/pages/examine/myList.jsx

@@ -3,18 +3,57 @@ import Taro from "@tarojs/taro";
 import { View, Image, Button } from "@tarojs/components";
 import Skeleton from "taro-skeleton";
 import { getClockState } from "../../utils/tools";
+import { selectByPrid } from '../../utils/servers/servers';
 import ListBottomStart from "../../components/common/listBottomStart";
-import RevokeWhite from "../../image/revokeWhite.png";
+import Select from "../applyReimbursement/select";
 import "./index.less";
 
-class MyList extends Component {
+class List extends Component {
   constructor(props) {
     super(props);
+    this.state = {
+      id: "",
+      visible: "",
+    };
+  }
+
+  onClose() {
+    this.setState({
+      visible: "",
+    })
+  }
+
+  getByDrafts(id, e) {
+    e.stopPropagation();
+    selectByPrid({
+      prid: id,
+      status: 0, //  0=草稿,1=审核中,2=完成,3=驳回
+    }).then((v) => {
+      if (v.error.length === 0) {
+        if (v.data) {
+          // 1有草稿未提交
+          Taro.navigateTo({
+            url: '/pages/drafts/index?id=' + v.data
+          })
+        } else {
+          this.setState({
+            id,
+            visible: "add",
+          })
+          // Taro.switchTab({
+          //   url: '/pages/applyReimbursement/index'
+          // })
+          // 0
+        }
+      } else {
+        Taro.showToast({ title: v.error[0].message, icon: "none" });
+      }
+    }).catch((err) => {
+      // Taro.showToast({ title: "系统错误,请稍后再试", icon: "none" });
+    });
   }
 
   render() {
-    let seeView = this.props.seeView;
-    const { title } = this.props
     return (
       <View className="indexPage">
         <View className="list">
@@ -25,24 +64,11 @@ class MyList extends Component {
             ))
           }
           {this.props.list.length > 0 && this.props.list?.map((v, k) => (
-            <View
-              key={k}
-              className="item"
-              onClick={() => {
-                Taro.navigateTo({
-                  url: "/pages/egressDetails/index?id=" + v.id + "&index=" + k + "&status=" + title,
-                });
-              }}
-            >
-              {v.publicAgain == 1 && <View className="itype">再次</View>}
-              {v.status === 3 &&
-                <View className="revoke">
-                  <Image src={RevokeWhite} className="revokeImg" />
-                </View>}
+            <View key={k} className="item">
               <View className="infor">
                 <View className="title">
                   <View className="aname">
-                    {v.type === 3 ? v.mainName : v.aname}提交的公出申请
+                    {v.aname}提交的公出申请
                     {v.updateStatus == 1 && <View className="aIcon">改</View>}
                   </View>
                   <View className="createTimes">{v.createTimes}</View>
@@ -51,34 +77,6 @@ class MyList extends Component {
                   <View className="uNtext">
                     公出企业:{v.userNames}
                   </View>
-                  {
-                    title == "我的公出" &&
-                    (v.type === 0 || v.type === 1 || v.type === 2) &&
-                    v.status !== 3 &&
-                    <View
-                      className="reject"
-                      onClick={e => {
-                        e.stopPropagation();
-                        this.props.again(v)
-                      }}
-                    >
-                      再次公出
-                    </View>
-                  }
-                  {
-                    (title == "我的协单" || title === "查看协单") &&
-                    v.status === 2 &&
-                    v.type === 3 &&
-                    <View
-                      className="reject"
-                      onClick={e => {
-                        e.stopPropagation();
-                        this.props.opens(v.id)
-                      }}
-                    >
-                      驳回协单
-                    </View>
-                  }
                 </View>
                 <View className="userName">
                   <View className="uNtext">
@@ -87,21 +85,16 @@ class MyList extends Component {
                 </View>
                 <View className="releaseStarts">
                   开始时间:{v.releaseStarts}
-                  {this.props.type === 0 && v.status !== 3 ? (
-                    <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>
+                {
+                  v.status == 2 &&
+                  <View
+                    className="punchClock"
+                    onClick={this.getByDrafts.bind(this, v.id)}
+                  >
+                    发起报销
+                  </View>
+                }
                 <View className="releaseEnds">
                   结束时间:{v.releaseEnds}
                 </View>
@@ -139,9 +132,16 @@ class MyList extends Component {
             }}
           />
         </View>
+        {this.state.visible != "" &&
+          <Select
+            prid={this.state.id}
+            visible={this.state.visible}
+            onClose={this.onClose.bind(this)}
+          />}
+
       </View>
     );
   }
 }
 
-export default MyList;
+export default List;

+ 1 - 1
src/pages/myinfo/index.config.js

@@ -3,6 +3,6 @@ export default {
   enablePullDownRefresh: true,
   onReachBottomDistance: 50,
   usingComponents: {
-    timePicker: '../../components/common/timePicker/timePicker'
+    // timePicker: '../../components/common/timePicker/timePicker'
   }
 }

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

@@ -212,7 +212,7 @@ class myInfo extends Component {
         <View className="mlist">
           {
             list.length > 0
-              ? list?.map((item, index) =>
+              ? list?.map(item =>
                 <View className="mitem" key={item.aid}>
                   <View className="edit" onClick={this.editAccount.bind(this, item)}>修改</View>
                   {item.status == 0

+ 0 - 3
src/pages/punchClock/index.config.js

@@ -1,3 +0,0 @@
-export default {
-  navigationBarTitleText: '打卡',
-}

+ 0 - 111
src/pages/punchClock/index.jsx

@@ -1,111 +0,0 @@
-import React, { Component } from "react";
-import PunchClocks from './punchClocks';
-import MessageNoticebar from "../../components/common/messageNoticebar";
-import { AtModal, } from "taro-ui"
-import Taro from "@tarojs/taro";
-import { updateLocation } from '../../utils/servers/servers';
-
-class PunchClock extends Component {
-  constructor(props) {
-    super(props);
-    this.state = {
-      data: {},
-      isOpened: false,
-      isHome: false,
-    }
-    this.onClose = this.onClose.bind(this);
-    this.handleConfirm = this.handleConfirm.bind(this);
-  }
-
-  componentDidShow() {
-    if (this.state.isHome) {
-      Taro.eventCenter.trigger('punchClockComponentDidShow');
-      //获取地区选定数据
-      const chooseLocation = requirePlugin("chooseLocation");
-      const location = chooseLocation.getLocation();
-      if (location) {
-        this.setState({
-          data: location,
-          isOpened: true
-        })
-        // 清除数据
-        chooseLocation.setLocation(null);
-      }
-    }
-  }
-
-  onClose() {
-    this.setState({
-      data: {},
-      isOpened: false,
-      isHome: false,
-    })
-  }
-
-  getId(id, uid) {
-    this.setState({ id, uid })
-  }
-  // 判断是否是首页打卡切换位置
-  getHome() {
-    this.setState({ isHome: true })
-  }
-
-  handleConfirm() {
-    const { id, uid, data } = this.state
-    updateLocation({
-      id,
-      uid,
-      longitude: data.longitude,
-      latitude: data.latitude,
-      districtName: data.name,
-    }).then(v => {
-      this.onClose()
-      Taro.hideLoading()
-      if (v.error.length === 0) {
-        Taro.showToast({ title: '打卡位置已更新', icon: 'none' });
-      } else {
-        Taro.showToast({ title: v.error[0].message, icon: 'none' })
-      }
-    }).catch(() => {
-      this.onClose()
-      Taro.hideLoading()
-      Taro.showToast({
-        title: '系统错误,请稍后再试',
-        icon: 'none'
-      })
-    })
-  }
-
-  componentDidMount() {
-    Taro.eventCenter.trigger('GoPuncsshIn', { data: 'unread' })
-  }
-
-
-  render() {
-    return (
-      <>
-        <MessageNoticebar />
-        {
-          // 刷新打卡页
-          !this.state.isOpened &&
-          <PunchClocks
-            getId={this.getId.bind(this)}
-            getHome={this.getHome.bind(this)}
-          />
-        }
-        <AtModal
-          isOpened={this.state.isOpened}
-          title='提示'
-          cancelText='取消'
-          confirmText='确认'
-          onClose={this.onClose}
-          onCancel={this.onClose}
-          onConfirm={this.handleConfirm}
-          content='您确定是否切换位置?切换位置,将重新提交“公出审核”,如您的公出审核已通过,则需再次审核。'
-        />
-      </>
-    )
-  }
-}
-
-export default PunchClock;

+ 0 - 344
src/pages/punchClock/index.less

@@ -1,344 +0,0 @@
-.punchClock {
-  position: relative;
-  background: #F5F5F5;
-  min-height: calc(100vh - 50px);
-  padding: 25px;
-
-  .header {
-    background: #FFFFFF;
-    padding: 30px;
-    border-radius: 30px;
-    margin-bottom: 20px;
-
-    .skeleton {
-      padding: 0;
-    }
-
-    .headerContent {
-      display: flex;
-      flex-flow: row nowrap;
-      align-items: center;
-    }
-
-    .userAvatarUrl {
-      width: 100px;
-      height: 100px;
-      border-radius: 20px;
-      overflow: hidden;
-    }
-
-    .infor {
-      padding-left: 15px;
-
-      .name {
-        font-size: 28px;
-        padding-bottom: 15px;
-      }
-
-      .address {
-        font-size: 25px;
-        color: #8e8d8d;
-        display: flex;
-        align-items: flex-start;
-
-        .nickname {
-          width: 270px;
-          color: #4564DC;
-        }
-      }
-
-      .types {
-        font-size: 28px;
-        margin-top: 10px;
-        font-weight: bold;
-      }
-    }
-
-    .state {
-      margin-left: auto;
-      font-size: 25px;
-      align-self: flex-start;
-
-    }
-
-    .switchContent {
-      display: flex;
-      align-items: center;
-      align-content: center;
-      border-radius: 30px;
-      border: 1px #999999 solid;
-      padding: 11px 10px;
-      margin-top: 28px;
-
-      .switchTitle {
-        font-size: 18px;
-        color: #999999;
-        padding-right: 10px;
-      }
-
-      .switchItem {
-        width: 25px;
-        height: 25px;
-      }
-    }
-  }
-
-  .content {
-    background: #FFFFFF;
-    padding: 30px;
-    border-radius: 30px;
-    margin-bottom: 20px;
-    display: flex;
-    flex-flow: column nowrap;
-    align-items: center;
-    position: relative;
-
-    .enterprise {
-      width: 94%;
-      background: #eae8e8;
-      margin: 0 30px;
-      padding: 20px;
-      border-radius: 20px;
-
-      .entit {
-        font-size: 30px;
-        margin-bottom: 8px;
-
-      }
-
-      .userlist {
-        display: flex;
-        flex-direction: row;
-        justify-content: space-between;
-
-        .username {
-          font-size: 26px;
-          line-height: 38px;
-          color: #4564DC;
-          max-width: 70%;
-
-        }
-
-        .switch{
-          display: flex;
-          align-items: center;
-          justify-content: center;
-          border-radius: 30px;
-          border: 1px solid #999999;
-          padding: 11px 10px;
-          height: 24px;
-
-          .stxt{
-            font-size: 18px;
-            color: #999999;
-            padding-right: 10px;
-          }
-
-          .sicon{
-            width: 25px;
-            height: 25px;
-          }
-
-        }
-
-      }
-
-    }
-
-
-    .history {
-      display: flex;
-      flex-flow: row nowrap;
-      justify-content: space-between;
-      align-items: center;
-      font-size: 30px;
-      width: 100%;
-    }
-
-    .noData {
-      display: flex;
-      flex-flow: column nowrap;
-      align-items: center;
-      justify-content: center;
-      width: 100%;
-      margin-top: -20px;
-      padding-bottom: 225px;
-
-      .tipsNoData {
-        font-size: 28px;
-        color: #969696;
-        padding-bottom: 20px;
-      }
-
-      .goOut {
-        font-size: 28px;
-        color: #007aff;
-      }
-    }
-
-    .timeContent {
-      width: 100%;
-      padding-top: 20px;
-      display: flex;
-      flex-flow: row nowrap;
-      justify-content: space-between;
-      padding-bottom: 30px;
-
-      .timeItem {
-        background: #eae8e8;
-        padding: 20px;
-        border-radius: 20px;
-
-        .timeTitle {
-          font-size: 30px;
-          padding-bottom: 8px;
-        }
-
-        .timeValue {
-          font-size: 27px;
-          color: #767272;
-        }
-      }
-    }
-
-    .map {
-      position: relative;
-      height: 600px;
-      width: 100%;
-      border-radius: 20px;
-      overflow: hidden;
-
-      #map {
-        height: 600px;
-        width: 100%
-      }
-    }
-
-    .tips {
-      color: #999999;
-      font-size: 18px;
-      padding-top: 10px;
-      align-self: flex-start;
-    }
-
-    .photographUnusual {
-      width: 100px;
-      height: 100px;
-      box-shadow: 1px 1px 15px 1px red;
-      border-radius: 50px;
-      display: flex;
-      align-items: center;
-      justify-content: center;
-      font-size: 20px;
-      color: #FFFFFF;
-      position: absolute;
-      right: 30px;
-      top: 300px;
-
-    }
-
-    .punchClockContent {
-      width: 250px;
-      height: 250px;
-      border-radius: 250px;
-      margin-top: 45px;
-      display: flex;
-      flex-flow: column nowrap;
-      justify-content: center;
-      align-items: center;
-      margin-bottom: 20px;
-
-      .punchClockTitle {
-        color: white;
-        font-size: 35px;
-        padding-bottom: 8px;
-      }
-
-      .punchClockTime {
-        color: #e8e6e6;
-        font-size: 25px;
-        padding-bottom: 8px;
-      }
-
-      .refreshClock {
-        color: #f5f6f8;
-        font-size: 25px;
-      }
-
-      .refresh{
-        position: absolute;
-        right: 60px;
-      }
-
-    }
-
-    .switchposition {
-      margin-bottom: 50px;
-      font-size: 30px;
-
-      .stxt {
-        color: #4395ff;
-      }
-
-    }
-
-    .photographContent {
-      display: flex;
-      flex-flow: row nowrap;
-      align-items: center;
-      justify-content: space-between;
-      width: 100%;
-      padding-left: 20px;
-      padding-right: 20px;
-      padding-bottom: 25px;
-
-      .photographTitle {
-        font-size: 30px;
-
-        .tips {
-          font-size: 18px;
-          color: #999999;
-        }
-      }
-
-      .photograph {}
-    }
-  }
-
-  .locationContent {
-    position: absolute;
-    display: flex;
-    flex-flow: column nowrap;
-    padding: 35px;
-    z-index: 999;
-
-    .location {
-      display: inline-block;
-      padding: 15px 15px 10px 15px;
-      background: #FFFFFF;
-      border-radius: 150px;
-      margin-bottom: 30px;
-
-      .locationIcon {
-        width: 50px;
-        height: 50px;
-      }
-    }
-
-    .punchRange {
-      display: inline-block;
-      padding: 15px 15px 10px 15px;
-      background: #FFFFFF;
-      border-radius: 150px;
-
-      .punchRangeIcon {
-        width: 50px;
-        height: 50px;
-      }
-    }
-  }
-}
-
-.at-radio__title{
-  font-size: 26px;
-}

+ 0 - 797
src/pages/punchClock/punchClocks.jsx

@@ -1,797 +0,0 @@
-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, AtModalHeader, AtModalContent, AtModalAction, AtTextarea, AtRadio, AtList } from "taro-ui";
-import dayjs from 'dayjs';
-import Skeleton from 'taro-skeleton'
-import HistoricalClock from '../../components/historicalClock';
-import ImagePicker from '../../components/common/imagePicker';
-import { add, minus, asyncAdd } from '../../actions/counter'
-import { getPublicReleaseList, publicReleaseClockIn, getPunchClockInfo, getReleasetDails } from '../../utils/servers/servers';
-import './index.less'
-import switchIocn from '../../image/switch.png';
-import Location from '../../image/location.png';
-import PunchRange from '../../image/punchRange.png';
-import 'taro-ui/dist/style/components/noticebar.scss';
-import 'taro-ui/dist/style/components/icon.scss';
-import 'taro-ui/dist/style/components/list.scss';
-import "taro-ui/dist/style/components/radio.scss";
-import "taro-ui/dist/style/components/icon.scss";
-
-import { getClockState, getNewOptions } from "../../utils/tools";
-
-const QQMapWX = require('../../components/common/mapSDK/qqmap-wx-jssdk.min.js');
-
-@connect(({ counter }) => ({
-  counter
-}), (dispatch) => ({
-  add() {
-    dispatch(add())
-  },
-  dec() {
-    dispatch(minus())
-  },
-  asyncAdd() {
-    dispatch(asyncAdd())
-  }
-}))
-
-class PunchClocks extends Component {
-  constructor(props) {
-    super(props);
-    this.state = {
-      imgs: [],
-      nowTime: '00:00:00',
-      newArrder: {},
-      addressLatitude: '',
-      addressLongitude: '',
-      distance: '',
-      dtails: {},
-      data: {},
-      loading: true,
-      isAbnormalOpen: false,
-      clockInRemarks: "",//打卡说明
-    }
-    this.onChange = this.onChange.bind(this);
-    this.getSpacing = this.getSpacing.bind(this);
-    this.getData = this.getData.bind(this);
-    this.publicReleaseClockIn = this.publicReleaseClockIn.bind(this);
-    this.abnormalClockIn = this.abnormalClockIn.bind(this);
-    this.refresh = this.refresh.bind(this);
-    this.getDtails = this.getDtails.bind(this);
-    this.selectArrder = this.selectArrder.bind(this);
-    this.selectOn = this.selectOn.bind(this);
-  }
-
-  nowTime = null;
-
-  wxConfig = null;
-
-  mapCtx = Taro.createMapContext('map');
-
-  qqmapsdk = new QQMapWX({
-    key: 'AWBBZ-GRAC2-JFYUO-CLA7I-JAHXK-YFFGT'
-  });
-
-  componentDidMount() {
-    this.getDtails();
-  }
-
-  selectOn() {
-    const { dtails, selectUid } = this.state
-    if (!selectUid) {
-      Taro.showToast({ title: '请选择您要打卡的企业', icon: 'none' });
-      return
-    }
-    let list = dtails.prdList
-    for (var i = 0; i < list.length; i++) {
-      if (list[i].uid == selectUid) {
-        this.setState({
-          data: list[i],
-          addressLatitude: parseFloat(list[i].latitude),
-          addressLongitude: parseFloat(list[i].longitude),
-          isTips: false,
-          selectUid: "",
-        })
-      }
-    }
-  }
-
-  selectArrder() {
-    const { dtails, data } = this.state
-    this.props.getId(dtails.id, data.uid)
-    this.props.getHome()
-    const key = "AWBBZ-GRAC2-JFYUO-CLA7I-JAHXK-YFFGT"; //使用在腾讯位置服务申请的key
-    const referer = "科德打卡定位"; //调用插件的app的名称
-    const category = "公司企业,房产小区";
-    Taro.navigateTo({
-      url:
-        "plugin://chooseLocation/index?key=" +
-        key +
-        "&referer=" +
-        referer +
-        "&category=" +
-        category,
-    });
-  }
-
-  getDtails() {
-    this.getData(() => {
-      Taro.startLocationUpdate({
-        success: () => {
-          Taro.onLocationChange((v) => {
-            this.getSpacing(v.latitude, v.longitude)
-          })
-        },
-        fail: (err) => {
-          Taro.getSetting({
-            success: (res) => {
-              if (!res.authSetting['scope.userLocation']) {
-                Taro.authorize({
-                  scope: 'scope.userLocation',
-                  success: () => {
-
-                  },
-                  fail: () => {
-                    this.setState({
-                      isOpened: true
-                    })
-                  }
-                })
-              }
-            }
-          })
-          this.setState({
-            loading: false
-          })
-        }
-      })
-    });
-  }
-
-  componentWillMount() {
-    this.wxConfig = Taro.getStorageSync('wxConfig');
-
-    //获得当前位置
-    Taro.getLocation({
-      type: 'gcj02',
-      isHighAccuracy: true,
-      success: (res) => {
-        const latitude = res.latitude
-        const longitude = res.longitude
-        this.setState({
-          newArrder: {
-            latitude,
-            longitude
-          },
-        })
-      }
-    })
-
-    this.nowTime = setInterval(() => {
-      this.setState({
-        nowTime: dayjs().format('HH:mm:ss')
-      })
-    }, 1000)
-
-    Taro.eventCenter.on('punchClockComponentDidShow', () => {
-      if (Object.keys(this.state.dtails).length === 0) {
-        this.getDtails();
-      }
-    })
-
-    Taro.eventCenter.on('GoPunchIn', (arg) => {
-      getReleasetDails({
-        id: arg.id,
-      }).then((v) => {
-        if (v.error.length === 0) {
-          if (v.data) {
-            if (!v.data.prdList) {
-              return
-            }
-            let data = v.data.prdList[0]
-            this.setState({
-              dtails: v.data,
-              data,
-              addressLatitude: parseFloat(data.latitude),
-              addressLongitude: parseFloat(data.longitude),
-            }, () => {
-              Taro.showToast({ title: '切换成功' });
-              Taro.startLocationUpdate({
-                success: () => {
-                  Taro.onLocationChange((v) => {
-                    this.getSpacing(v.latitude, v.longitude)
-                  })
-                },
-                fail: () => {
-                  this.setState({
-                    loading: false
-                  })
-                }
-              })
-            })
-          } else {
-          }
-        } else {
-          Taro.showToast({ title: v.error[0].message, icon: "none" });
-        }
-      }).catch((err) => {
-        Taro.showToast({ title: "系统错误,请稍后再试", icon: "none" });
-      });
-    })
-  }
-
-  componentDidHide() {
-    Taro.offLocationChange();
-    this.nowTime && this.nowTime.clearTimeout();
-  }
-
-  // 正常打卡
-  publicReleaseClockIn(uid) {
-
-    if (this.state.dtails.status === 3) {
-      Taro.hideLoading()
-      Taro.showToast({ title: '申请已撤销,无法打卡', icon: 'none' });
-      return;
-    }
-    if (Object.keys(this.state.dtails).length === 0) {
-      Taro.hideLoading()
-      Taro.showToast({ title: '暂无公出申请,无法打卡', icon: 'none' });
-      return;
-    }
-    if (isNaN(parseInt(this.state.distance))) {
-      Taro.hideLoading()
-      Taro.showToast({ title: '定位错误,请联系管理员', icon: 'none' })
-      return;
-    }
-    if (dayjs().isBefore(this.state.dtails.releaseStarts) || dayjs().isAfter(this.state.dtails.releaseEnds)) {
-      Taro.hideLoading()
-      Taro.showToast({ title: '当前时间不在打卡时间范围内,无法打卡', icon: 'none' })
-      return;
-    }
-    if (!(this.state.distance <= this.wxConfig.clockInRange && this.state.distance >= 0)) {
-      Taro.hideLoading()
-      Taro.showToast({ title: '当前位置未处于可打卡范围,无法打卡', icon: 'none' })
-      return;
-    }
-    if (this.state.imgs.length === 0) {
-      Taro.hideLoading()
-      Taro.showToast({ title: '请上传打卡照片', icon: 'none' })
-      return;
-    }
-
-    publicReleaseClockIn({
-      id: this.state.dtails.id,
-      photoUrl: this.state.imgs.join(','),
-      clockIn: 1,
-      uid: this.state.data.uid,
-    }).then(v => {
-      Taro.hideLoading()
-      if (v.error.length === 0) {
-        Taro.showToast({ title: '打卡成功', icon: 'none' });
-        this.imagePicker.clear();
-        this.state.data.clockIn = 1;
-        this.setState({
-          data: this.state.data,
-          imgs: []
-        })
-      } else {
-        Taro.showToast({ title: v.error[0].message, icon: 'none' })
-      }
-    }).catch(() => {
-      Taro.hideLoading()
-      Taro.showToast({
-        title: '系统错误,请稍后再试',
-        icon: 'none'
-      })
-    })
-  }
-  // 异常打卡
-  abnormalClockIn() {
-    if (!this.state.clockInRemarks) {
-      Taro.showToast({ title: '请填写异常打卡原因!', icon: 'none' })
-      return;
-    }
-    Taro.showLoading({ title: '正在提交...' });
-    publicReleaseClockIn({
-      id: this.state.dtails.id,
-      photoUrl: this.state.imgs.join(','),
-      clockInRemarks: this.state.clockInRemarks,
-      clockIn: 2,
-    }).then(v => {
-      Taro.hideLoading()
-      if (v.error.length === 0) {
-        Taro.showToast({ title: '打卡成功', icon: 'none' });
-        this.imagePicker.clear();
-        this.state.data.clockIn = 2;
-        this.setState({
-          data: this.state.data,
-          imgs: [],
-          clockInRemarks: "",
-          isAbnormalOpen: false,
-        })
-      } else {
-        Taro.showToast({ title: v.error[0].message, icon: 'none' })
-      }
-    }).catch(() => {
-      Taro.hideLoading()
-      Taro.showToast({
-        title: '系统错误,请稍后再试',
-        icon: 'none'
-      })
-    })
-  }
-
-  getData(fn) {
-    this.setState({
-      loading: true
-    })
-    getPunchClockInfo().then(v => {
-      if (v.error.length === 0) {
-        this.setState({
-          loading: false
-        })
-        if (v.data) {
-          let data = v.data.prdList[0]
-          this.setState({
-            dtails: v.data,
-            data,
-            addressLatitude: data.latitude,
-            addressLongitude: data.longitude,
-          }, () => {
-            fn();
-          })
-        } else {
-          this.setState({
-            dtails: {},
-            data: {},
-          })
-        }
-      } else {
-        this.setState({
-          loading: false
-        })
-        Taro.showToast({
-          title: v.error[0].message,
-          icon: 'none'
-        })
-      }
-    })
-  }
-
-  getSpacing(latitude, longitude) {
-    let _this = this;
-    this.qqmapsdk.calculateDistance({
-      mode: 'straight',
-      from: {
-        latitude: this.state.addressLatitude,
-        longitude: this.state.addressLongitude,
-      },
-      to: [
-        {
-          latitude,
-          longitude,
-        }
-      ],
-      success: function (res) {//成功后的回调
-        _this.setState({
-          distance: res.result.elements[0].distance,
-          loading: false
-        })
-      },
-      fail: function (error) {
-        _this.setState({
-          loading: false
-        })
-        console.error(error);
-      },
-      complete: function (res) {
-
-      }
-    });
-  }
-
-  onChange(value, type) {
-    let arr = this.state.imgs.concat([]);
-    if (type === 'add') {
-      arr.push(value)
-    } else if (type === 'remove') {
-      arr.splice(value, 1)
-    }
-    this.setState({
-      imgs: arr,
-    })
-  }
-
-  refresh() {
-    this.getData(() => {
-      Taro.startLocationUpdate({
-        success: () => {
-          Taro.onLocationChange((v) => {
-            this.getSpacing(v.latitude, v.longitude)
-          })
-        }
-      })
-    });
-  }
-
-  render() {
-    const { dtails, data } = this.state;
-    return (
-      <View className='punchClock'>
-        <View className='header'>
-          <Skeleton
-            title
-            avatar
-            row={2}
-            animateName='elastic'
-            avatarShape='square'
-            loading={this.state.loading}
-          >
-            <View className='headerContent'>
-              <View className='userAvatarUrl'>
-                <OpenData type='userAvatarUrl' />
-              </View>
-              <View className='infor'>
-                <View className='name'>
-                  {
-                    Object.keys(dtails).length <= 0 ?
-                      Taro.getStorageSync('userInfor').name :
-                      dtails.aname
-                  }
-                </View>
-                {/* <View className='address'>
-                  公出企业:
-                  <View className='nickname'>
-                    {
-                      Object.keys(dtails).length <= 0 ?
-                        '无' :
-                        dtails.userNames
-                    }
-                  </View>
-                </View> */}
-                <View className='types'
-                  style={{ color: ["#1D4FEA", "#1E90FF", "#FF5500", "red"][dtails.type] }}
-                >
-                  {["业务公出", "技术公出", "行政公出", "技术协单"][dtails.type]}
-                </View>
-              </View>
-              {
-                Object.keys(this.state.dtails).length <= 0 ?
-                  <View onClick={this.refresh} className='state' style={{
-                    alignSelf: 'center',
-                    textAlign: 'center',
-                    color: '#b6b5b5',
-                    fontSize: '11px'
-                  }}>
-                    <AtIcon value='reload' size='20' />
-                    <View>刷新</View>
-                  </View> :
-                  <View className='state' style={{
-                    color: getClockState(dtails.status).color
-                  }}>
-                    <View style={{ textAlign: 'right' }}>
-                      {
-                        getClockState(dtails.status).title
-                      }
-                    </View>
-                    <View className='switchContent' onClick={() => {
-                      Taro.switchTab({
-                        url: '/pages/mybusiness/index',
-                      })
-                    }}>
-                      <View className='switchTitle'>切换打卡</View>
-                      <Image src={switchIocn} className='switchItem' />
-                    </View>
-                  </View>
-              }
-            </View>
-          </Skeleton>
-        </View>
-        {
-          Object.keys(this.state.dtails).length <= 0 ?
-            <View className='content'>
-              <View className='punchClockContent'
-                onClick={this.publicReleaseClockIn}
-                style={{
-                  boxShadow: '1px 1px 15px 1px #acb8ad',
-                  background: '#828e83',
-                  marginTop: '85px',
-                }}>
-                <View className='punchClockTitle'>公出打卡</View>
-                <View className='punchClockTime'>{this.state.nowTime}</View>
-              </View>
-              <View className='noData'>
-                <View className='tipsNoData'>
-                  暂无公出申请
-                </View>
-                <View className='goOut' onClick={() => {
-                  Taro.switchTab({
-                    url: '/pages/applyDepart/index',
-                  })
-                }}>
-                  点击前往申请公出
-                </View>
-              </View>
-            </View> :
-            <View>
-              <View className='content'>
-                <View className="enterprise">
-                  <View className='entit'>公出企业</View>
-                  <View className='userlist'>
-                    <Text className='username'>
-                      {data.userName}
-                      {(data.clockIn === 1 || data.clockIn === 2) && <Text style={{ color: "#72cb78" }}>(已打卡)</Text>}
-                    </Text>
-                    {
-                      this.state.dtails.prdList?.length > 1 &&
-                      <View className='switch' onClick={() => { this.setState({ isTips: true }) }}>
-                        <View className='stxt'>切换企业</View>
-                        <Image src={switchIocn} className='sicon' />
-                      </View>
-                    }
-                  </View>
-                </View>
-                <View className='timeContent'>
-                  <View className='timeItem'>
-                    <View className='timeTitle'>公出开始时间</View>
-                    <View className='timeValue'>{dtails.releaseStarts}</View>
-                  </View>
-                  <View className='timeItem'>
-                    <View className='timeTitle'>公出结束时间</View>
-                    <View className='timeValue'>{dtails.releaseEnds}</View>
-                  </View>
-                </View>
-                <View className='photographContent'>
-                  <View className='photographTitle'>打卡拍照<Text className='tips'>〔可以上传多张〕</Text></View>
-                  <AtIcon onClick={() => {
-                    Taro.chooseImage({
-                      count: 1,
-                      sizeType: ['compressed'],
-                      sourceType: ['camera'],
-                      success: (res) => {
-                        // tempFilePath可以作为img标签的src属性显示图片
-                        const tempFilePaths = res.tempFilePaths
-                        this.imagePicker.onImgChange([{ url: tempFilePaths[0] }], 'add', 0, 'camera')
-                      }
-                    })
-                  }} value='camera' size='25' color='#4395ff' />
-                </View>
-                <View style={{ alignSelf: 'flex-start', width: '100%' }}>
-                  <ImagePicker ref={ref => this.imagePicker = ref} url='/api/admin/release/upload' showAddBtn={false} onChange={this.onChange} />
-                </View>
-                {/* 异常打卡 */}
-                {
-                  // dtails.type == 3 &&
-                  false &&
-                  <View
-                    className="photographUnusual"
-                    style={{ background: data.clockIn === 1 ? "#f69c9f" : "red" }}
-                    onClick={() => {
-                      if (this.state.imgs.length === 0) {
-                        Taro.hideLoading()
-                        Taro.showToast({ title: '请上传打卡照片', icon: 'none' })
-                        return;
-                      }
-                      this.setState({
-                        isAbnormalOpen: true
-                      })
-                    }}
-                  >{(data.clockIn === 1 || data.clockIn === 2) ? "更新打卡" : "异常打卡"}</View>
-                }
-
-                <View className='punchClockContent'
-                  onClick={() => {
-                    let _this = this;
-                    Taro.showLoading({ title: '加载中...' })
-                    Taro.getSetting({
-                      success: (res) => {
-                        if (!res.authSetting['scope.userLocation']) {
-                          Taro.authorize({
-                            scope: 'scope.userLocation',
-                            success: () => {
-                              _this.publicReleaseClockIn();
-                            },
-                            fail: () => {
-                              Taro.hideLoading()
-                              this.setState({
-                                isOpened: true
-                              })
-                            }
-                          })
-                        } else {
-                          _this.publicReleaseClockIn();
-                        }
-                      }
-                    })
-                  }}
-                  style={{
-                    boxShadow:
-                      (!isNaN(parseInt(this.state.distance)))
-                        && this.state.distance <= this.wxConfig.clockInRange && this.state.distance >= 0 &&
-                        !(dayjs().isBefore(this.state.dtails.releaseStarts) || dayjs().isAfter(this.state.dtails.releaseEnds)) &&
-                        dtails.status !== 3
-                        ? ((data.clockIn === 1 || data.clockIn === 2) ? '1px 1px 15px 1px #3f82e8' : '1px 1px 15px 1px #72cb78') : '1px 1px 15px 1px #828e83',
-                    background: (!isNaN(parseInt(this.state.distance)))
-                      &&
-                      this.state.distance <= this.wxConfig.clockInRange &&
-                      this.state.distance >= 0 &&
-                      !(dayjs().isBefore(this.state.dtails.releaseStarts) || dayjs().isAfter(this.state.dtails.releaseEnds)) &&
-                      dtails.status !== 3
-                      ? ((data.clockIn === 1 || data.clockIn === 2) ? '#3f82e8' : '#72cb78') : '#828e83'
-                  }}>
-                  <View className='punchClockTitle'>
-                    {
-                      (data.clockIn === 1 || data.clockIn === 2) ?
-                        '更新打卡' : '公出打卡'
-                    }
-                  </View>
-                  <View className='punchClockTime'>{this.state.nowTime}</View>
-                  <View
-                    onClick={e => {
-                      e.stopPropagation()
-                      this.refresh()
-                    }}
-                    className='refresh'
-                    style={{
-                      alignSelf: 'center',
-                      textAlign: 'center',
-                      color: '#b6b5b5',
-                      fontSize: '11px'
-                    }}>
-                    <AtIcon value='reload' size='20' />
-                    <View>刷新</View>
-                  </View>
-                </View>
-                {
-                  !(this.state.distance <= this.wxConfig.clockInRange && this.state.distance >= 0) &&
-                  <View className='switchposition'>您不在打卡范围:
-                    <Text className='stxt' onClick={this.selectArrder}>切换位置</Text>
-                  </View>
-                }
-
-                <View className='map'>
-                  <View className='locationContent'>
-                    <View className='location' onClick={() => {
-                      this.mapCtx.moveToLocation();
-                    }}>
-                      <Image src={Location} className='locationIcon' />
-                    </View>
-                    <View className='punchRange'
-                      onClick={() => {
-                        this.mapCtx.moveToLocation({
-                          latitude: this.state.addressLatitude,
-                          longitude: this.state.addressLongitude,
-                        });
-                      }}>
-                      <Image src={PunchRange} className='punchRangeIcon' />
-                    </View>
-                  </View>
-                  <Map
-                    id='map'
-                    {...this.state.newArrder}
-                    circles={[
-                      {
-                        latitude: this.state.addressLatitude,
-                        longitude: this.state.addressLongitude,
-                        color: '#c92ddc82',
-                        fillColor: '#c92ddc82',
-                        radius: this.wxConfig.clockInRange,
-                        strokeWidth: 1
-                      }
-                    ]}
-                    showLocation
-                  />
-                </View>
-                <View className='tips'>紫色区域为可打卡区域</View>
-              </View>
-              <View className='content' onClick={() => {
-                this.setState({
-                  historicalIsOpened: true
-                })
-              }}>
-                <View className='history'>
-                  <View>查看公出申请日志</View>
-                  <AtIcon value='chevron-right' size='20' color='#767272' />
-                </View>
-              </View>
-            </View>
-        }
-        <AtModal
-          isOpened={this.state.isOpened}
-          title='提醒'
-          cancelText='取消'
-          confirmText='确认'
-          onClose={() => {
-            this.setState({
-              isOpened: false,
-            })
-          }}
-          onCancel={() => {
-            this.setState({
-              isOpened: false,
-            })
-          }}
-          onConfirm={() => {
-            this.setState({
-              isOpened: false,
-            }, () => {
-              Taro.openSetting({
-                success: (value) => {
-                  if (value.authSetting['scope.userLocation']) {
-                    Taro.getLocation({
-                      type: 'gcj02',
-                      isHighAccuracy: true,
-                      success: (res) => {
-                        const latitude = res.latitude
-                        const longitude = res.longitude
-                        this.setState({
-                          newArrder: {
-                            latitude,
-                            longitude
-                          },
-                        })
-                      }
-                    })
-                    this.getDtails();
-                  }
-                }
-              })
-            })
-          }}
-          content='您拒绝了定位权限,请先前往设置打开定位权限'
-        />
-        {/* 异常打卡原因 */}
-        {
-          this.state.isAbnormalOpen &&
-          <AtModal isOpened={this.state.isAbnormalOpen}>
-            <AtModalContent>
-              <AtTextarea
-                value={this.state.clockInRemarks}
-                onChange={e => { this.setState({ clockInRemarks: e }) }}
-                maxLength={200}
-                placeholder='请填写异常打卡原因~'
-              />
-            </AtModalContent>
-            <AtModalAction>
-              <Button type='secondary' onClick={() => { this.setState({ isAbnormalOpen: false }) }}>取消</Button>
-              <Button type='primary' onClick={this.abnormalClockIn}>提交</Button>
-            </AtModalAction>
-          </AtModal>
-        }
-        {
-          this.state.historicalIsOpened &&
-          <HistoricalClock
-            id={dtails.id}
-            isOpened={this.state.historicalIsOpened}
-            onClose={() => {
-              this.setState({
-                historicalIsOpened: false
-              })
-            }}
-          />
-        }
-        {
-          this.state.isTips &&
-          <AtModal isOpened={this.state.isTips}>
-            <AtModalHeader>请选择</AtModalHeader>
-            <AtModalContent>
-              <AtRadio
-                options={getNewOptions(dtails.prdList)}
-                value={this.state.selectUid}
-                onClick={e => { this.setState({ selectUid: e }) }}
-              />
-            </AtModalContent>
-            <AtModalAction>
-              <Button type='secondary' onClick={() => { this.setState({ isTips: false }) }}>取消</Button>
-              <Button type='primary' onClick={this.selectOn}>确定</Button>
-            </AtModalAction>
-          </AtModal>
-        }
-      </View>
-    )
-  }
-}
-
-export default PunchClocks

+ 3 - 1
src/pages/egressDetails/index.config.js

@@ -1,5 +1,7 @@
 export default {
-  navigationBarTitleText: '详情',
+  navigationBarTitleText: '报销记录',
+  enablePullDownRefresh: true,
+  onReachBottomDistance: 50,
   usingComponents: {
     timePicker: '../../components/common/timePicker/timePicker'
   }

+ 282 - 0
src/pages/recordlist/index.jsx

@@ -0,0 +1,282 @@
+import React, { Component } from 'react';
+import Taro from '@tarojs/taro';
+import { View, Picker, ScrollView, } from '@tarojs/components'
+import { getRecordList, } from '../../utils/servers/servers';
+import dayjs from 'dayjs';
+import { AtIcon, } from 'taro-ui';
+import { getAccountName } from '../../utils/tools';
+import { accountLtate, } from '../../utils/tools/config'
+import ListBottomStart from "../../components/common/listBottomStart";
+
+import './index.less';
+import 'taro-ui/dist/style/components/tabs.scss';
+import "taro-ui/dist/style/components/flex.scss";
+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";
+
+class Examine extends Component {
+
+  constructor(props) {
+    super(props);
+    this.state = {
+      starts: {},
+      list: [],
+    }
+  }
+
+  componentDidShow() {
+    this.getPublicReleaseList();
+  }
+
+  async componentDidMount() {
+    await this.getPublicReleaseList();
+  }
+
+  onPullDownRefresh() {
+    this.getPublicReleaseList();
+  }
+
+  onReachBottom() {
+    this.getPublicReleaseList(true);
+  }
+
+  onTabItemTap(obj) {
+    if (obj.index === 1) {
+      this.onTabTap();
+    }
+  }
+
+  onPickerHide() {
+    this.setState({
+      isPickerRender: false,
+    });
+  }
+
+
+  async onSetPickerTime(val) {
+    let data = val.detail;
+    await this.setState({
+      rangeStartMinuteVal: dayjs(data.selectStartTime).format("YYYY-MM-DD"),
+      rangeEndMinuteVal: dayjs(data.selectEndTime).format("YYYY-MM-DD")
+    })
+    await this.getMyList(1);
+  }
+
+  async onTabTap() {
+    await this.getMyList(1);
+  }
+
+  async getPublicReleaseList(lv) {
+    await this.getMyList(lv ? this.state.pageNo + 1 : 1);
+    Taro.stopPullDownRefresh();
+  }
+
+  async getMyList(pageNo) {
+    this.setState({
+      listState: 'LOADING'
+    })
+    let data = {
+      pageNo: pageNo,
+      pageSize: 10,
+      startTime: this.state.rangeStartMinuteVal || undefined,
+      endTime: this.state.rangeEndMinuteVal || undefined,
+      status: isNaN(parseInt(this.state.starts.id)) ? undefined : String(this.state.starts.id),
+    }
+    for (let i in data) {
+      if (!data[i]) {
+        delete data[i]
+      }
+    }
+    let msg = await getRecordList(data);
+    if (msg.error.length === 0) {
+      if (msg.data.totalCount === 0) {
+        this.setState({
+          listState: 'NO_DATA'
+        })
+      } else if (msg.data.totalCount === this.state.list.length && pageNo !== 1) {
+        Taro.showToast({ title: '没有更多数据了', icon: 'none' });
+        this.setState({
+          listState: 'NO_MORE_DATA'
+        })
+      } else {
+        if (msg.data.totalCount === (pageNo === 1 ? msg.data.list : this.state.list.concat(msg.data.list)).length) {
+          this.setState({
+            listState: 'NO_MORE_DATA'
+          })
+        }
+      }
+      this.setState({
+        list: pageNo === 1 ? msg.data.list : this.state.list.concat(msg.data.list),
+        pageNo: msg.data.list.length === 0 ? this.state.pageNo : msg.data.pageNo
+      })
+    } else {
+      Taro.showToast({ title: msg.error[0].message, icon: 'none' });
+      this.setState({
+        listState: msg.error[0].field === '403' ? 'NO_DATA' : 'RELOAD'
+      })
+    }
+    Taro.stopPullDownRefresh();
+  }
+
+  onPageScroll(event) {
+    let touchMove = event.scrollTop;
+    if (touchMove >= 37) {
+      this.setState({
+        openSearch: true
+      })
+    } else {
+      this.setState({
+        openSearch: false
+      })
+    }
+  }
+
+  onRefresh() {
+
+  }
+
+
+  render() {
+    const { list } = this.state
+    return (
+      <View className='indexPage' >
+        <View className='searchContent'>
+          <ScrollView className={this.state.openSearch ? 'searchBottomLOL' : ''} scrollX style={{ width: '100%' }}>
+            <View className='searchBottom'>
+              <View className='searchItem' style={{ paddingLeft: '5px' }}>
+                <Picker
+                  value={this.state.starts.id}
+                  range={accountLtate} rangeKey='title' mode='selector'
+                  onChange={(e) => {
+                    this.setState({
+                      starts: accountLtate[e.detail.value],
+                    }, () => {
+                      this.getPublicReleaseList();
+                    })
+                  }}>
+                  {
+                    !this.state.starts.title ?
+                      <View className='shortValuecontent'>
+                        <View className='selectTitle'>状态</View>
+                        <View className='iconContent'><AtIcon value='chevron-down' size='10' color='#FFFFFF' /></View>
+                      </View> :
+                      <View className='shortValuecontent'>
+                        <View className='selectValue'>
+                          {this.state.starts.title}
+                        </View>
+                        <View className='iconContent' />
+                      </View>
+                  }
+                </Picker>
+                {
+                  this.state.starts.title &&
+                  <View className='searchSelectContent'>
+                    <View className='selectIcon'
+                      onClick={(e) => {
+                        e.stopPropagation();
+                        this.setState({
+                          starts: {}
+                        }, () => {
+                          this.getPublicReleaseList();
+                        })
+                      }}>
+                      <AtIcon value='close-circle' size='10' color='#FFFFFF' />
+                    </View>
+                  </View>
+                }
+              </View>
+              <View className='searchItem' onClick={() => {
+                this.setState({
+                  isPickerRender: true
+                })
+              }}>
+                <View>
+                  {
+                    !this.state.rangeStartMinuteVal ?
+                      <View className='valuecontent'>
+                        <View className='selectTitle'>开始及结束时间</View>
+                        <View className='iconContent' ><AtIcon value='chevron-down' size='10' color='#FFFFFF' /></View>
+                      </View> :
+                      <View className='valuecontent'>
+                        <View className='selectValue' >
+                          {this.state.rangeStartMinuteVal + "~" + this.state.rangeEndMinuteVal}
+                        </View>
+                        <View className='iconContent' />
+                      </View>
+                  }
+                </View>
+                {
+                  this.state.rangeStartMinuteVal &&
+                  <View className='searchSelectContent'>
+                    <View className='selectIcon'
+                      onClick={(e) => {
+                        e.stopPropagation();
+                        this.setState({
+                          rangeStartMinuteVal: '',
+                          rangeEndMinuteVal: '',
+                        }, () => {
+                          this.getPublicReleaseList();
+                        })
+                      }}>
+                      <AtIcon value='close-circle' size='10' color='#FFFFFF' />
+                    </View>
+                  </View>
+                }
+              </View>
+            </View>
+          </ScrollView>
+        </View>
+        <View className='list'>
+          {
+            list?.map((item) =>
+              <View className='item' key={item.id}
+                onClick={() => {
+                  Taro.navigateTo({
+                    url: '/pages/drafts/index?id=' + item.id
+                  })
+                }}
+              >
+                <View className='line'>报销金额:{item.totalAmount}元</View>
+                <View className='line'>报销时间:{item.createTimeStr}</View>
+                <View className='line'>报销类型:{getAccountName(item.type, item.typeOther)}</View>
+                <View className='lines'
+                  style={{ color: accountLtate[item.status].color }}
+                >{accountLtate[item.status].title}</View>
+              </View>
+            )
+          }
+          <ListBottomStart
+            state={this.state.listState}
+            reload={() => {
+              this.getPublicReleaseList(true)
+            }}
+          />
+        </View>
+        <timePicker
+          config={{
+            endDate: true,
+            column: "day",
+            dateLimit: false,
+            limitStartTime: dayjs().subtract(3, 'year').format('YYYY-MM-DD '),
+            limitEndTime: dayjs().add(3, 'year').format('YYYY-MM-DD ')
+          }}
+          isPartition
+          pickerShow={this.state.isPickerRender}
+          onconditionaljudgment={(v) => {
+          }}
+          onhidepicker={() => {
+            this.onPickerHide()
+          }}
+          onsetpickertime={(v) => {
+            this.onSetPickerTime(v)
+          }}>
+        </timePicker>
+      </View>
+    )
+  }
+}
+
+export default Examine

+ 168 - 0
src/pages/recordlist/index.less

@@ -0,0 +1,168 @@
+.indexPage {
+  position: relative;
+  z-index: 1;
+  background: #F5F5F5;
+  min-height: calc(100vh - 52px);
+
+  .searchContent {
+    position: relative;
+    background: white;
+    padding: 20px;
+
+    .searchTop {
+      z-index: 1000;
+    }
+
+    .searchBottom {
+      display: flex;
+      align-items: center;
+      justify-content: space-between;
+      background: #FFFFFF;
+      border-bottom-left-radius: 10px;
+      border-bottom-right-radius: 10px;
+      padding: 10px 0 10px 0;
+
+      .searchBottomBack {
+        position: fixed;
+        z-index: -1;
+        left: 0;
+        right: 0;
+        bottom: 0;
+        top: 100px;
+        background: rgba(0, 0, 0, .7);
+      }
+
+      .searchItem {
+        position: relative;
+        font-size: 25px;
+        color: #FFFFFF;
+
+        .shortValuecontent {
+          position: relative;
+          display: flex;
+          align-items: center;
+          text-align: center;
+          width: 200px;
+          background: #6190E8;
+          border-radius: 100px;
+          padding: 10px 0;
+          margin-right: 5px;
+
+          .selectValue {
+            width: 100%;
+            text-align: center;
+            white-space: nowrap;
+          }
+
+          .selectTitle {
+            width: 100%;
+            text-align: center;
+          }
+
+          .iconContent {
+            position: absolute;
+            right: 0;
+            width: 60px;
+            text-align: center;
+          }
+        }
+
+        .valuecontent {
+          position: relative;
+          display: flex;
+          align-items: center;
+          width: 440px;
+          background: #6190E8;
+          border-radius: 100px;
+          padding: 10px 0;
+          margin-right: 5px;
+
+          .selectValue {
+            width: 100%;
+            text-align: center;
+            white-space: nowrap;
+          }
+
+          .selectTitle {
+            width: 100%;
+            text-align: center;
+            white-space: nowrap;
+          }
+
+          .iconContent {
+            position: absolute;
+            right: 0;
+            width: 60px;
+            text-align: center;
+          }
+        }
+
+        .searchSelectContent {
+          position: absolute;
+          right: 0;
+          top: 0;
+          bottom: 0;
+          z-index: 1;
+          width: 45px;
+          padding-right: 20px;
+          text-align: right;
+          display: flex;
+          justify-content: flex-end;
+          align-items: center;
+          padding-bottom: 3px;
+        }
+
+        .closeIcon {
+          background: #F00;
+          width: 60px;
+          height: 46px;
+          display: flex;
+          padding-left: 20px;
+          align-items: center;
+        }
+      }
+    }
+
+    .searchBottomLOL {
+      position: fixed;
+      z-index: 1000;
+      top: 0;
+      left: 0;
+      right: 0;
+      box-shadow: 0px 6px 27px 16px #8e8d8d;
+      background: #FFFFFF;
+    }
+  }
+
+  .list {
+    padding: 20px 23px 52px 23px;
+
+    .item {
+      border-radius: 10px;
+      padding: 31px;
+      background: #FFFFFF;
+      display: flex;
+      flex-direction: column;
+      margin-bottom: 17px;
+      position: relative;
+      overflow: hidden;
+
+      .line{
+        width: 100%;
+        font-size: 30px;
+        padding: 5px 0;
+
+      }
+
+      .lines{
+        width: 100%;
+        font-size: 30px;
+        padding: 5px 0;
+        text-align: right;
+      }
+
+    }
+
+  }
+
+}

+ 0 - 3
src/pages/staffDistribution/index.config.js

@@ -1,3 +0,0 @@
-export default {
-  navigationBarTitleText: '员工分布'
-}

+ 0 - 47
src/pages/staffDistribution/index.jsx

@@ -1,47 +0,0 @@
-import { Component } from 'react'
-import Taro from '@tarojs/taro'
-import { connect } from 'react-redux'
-import {View, Map, Button} from '@tarojs/components'
-
-import { add, minus, asyncAdd } from '../../actions/counter'
-
-import './index.less'
-
-
-@connect(({ counter }) => ({
-  counter
-}), (dispatch) => ({
-  add () {
-    dispatch(add())
-  },
-  dec () {
-    dispatch(minus())
-  },
-  asyncAdd () {
-    dispatch(asyncAdd())
-  }
-}))
-class Index extends Component {
-  constructor(props) {
-    super(props);
-    this.state={}
-  }
-
-  componentDidShow () {
-
-  }
-
-  componentDidMount() {
-
-  }
-
-  render () {
-    return (
-      <View>
-      </View>
-    )
-  }
-}
-
-export default Index
-

+ 0 - 1
src/pages/staffDistribution/index.less

@@ -1 +0,0 @@
-#allmap{height:100vh;width:100vw}

+ 10 - 7
src/utils/servers/interceptors.js

@@ -7,17 +7,18 @@ const customInterceptor = (chain) => {
   const requestParams = chain.requestParams
 
   return chain.proceed(requestParams).then(res => {
-    // console.log(res.statusCode,'proceed')
+    // console.log(res.statusCode, 'proceed')
     // 只要请求成功,不管返回什么状态码,都走这个回调
     if (res.statusCode === HTTP_STATUS.NOT_FOUND) {
-      Taro.setStorageSync("token", "");
+      // Taro.setStorageSync('token', "");
+      Taro.removeStorageSync('token')
       Taro.setStorageSync('userInfor', "");
       pageToLogin()
       // TODO 根据自身业务修改
       return {
         error: [
           {
-            message:'请求资源不存在,请重新登录',
+            message: '请求资源不存在,请重新登录',
             start: 404
           }
         ]
@@ -27,7 +28,7 @@ const customInterceptor = (chain) => {
       return {
         error: [
           {
-            message:'系统错误,请稍后再试',
+            message: '系统错误,请稍后再试',
             start: 500
           }
         ]
@@ -37,7 +38,8 @@ const customInterceptor = (chain) => {
       return Promise.reject("服务端出现了问题")
 
     } else if (res.statusCode === HTTP_STATUS.FORBIDDEN || res.statusCode === HTTP_STATUS.NO_PERMISSION) {
-      Taro.setStorageSync("token", "");
+      // Taro.setStorageSync('token', "");
+      Taro.removeStorageSync('token')
       Taro.setStorageSync('userInfor', "");
       pageToLogin()
       // TODO 根据自身业务修改
@@ -49,8 +51,9 @@ const customInterceptor = (chain) => {
       return Promise.reject("需要鉴权")
 
     } else if (res.statusCode === HTTP_STATUS.SUCCESS) {
-      if(res.data.error && res.data.error.length !== 0 && res.data.error[0].field === '403'){
-        Taro.setStorageSync("token", "");
+      if (res.data.error && res.data.error.length !== 0 && res.data.error[0].field === '403') {
+        // Taro.setStorageSync('token', "");
+        Taro.removeStorageSync('token')
         Taro.setStorageSync('userInfor', "");
         pageToLogin()
       }

+ 35 - 74
src/utils/servers/servers.js

@@ -33,105 +33,46 @@ export const login = (res) => {
     }
   })
 }
-// 查询客户订单
-export const getOrderByUid = (postData = {}) => {
-  return HTTPREQUEST.get('/api/admin/release/selectOrderByUid', postData)
-}
-export const getUserByName = (postData = {}) => {
-  return HTTPREQUEST.get('/api/admin/customer/getUserByNames', postData)
-}
-
-export const getadminByName = (postData = {}) => {
-  return HTTPREQUEST.get('/api/admin/customer/listAdminByName', postData)
-}
 
-export const addPublicRelease = (postData = {}) => {
-  return HTTPREQUEST.post('/api/admin/release/addPublicRelease', postData)
+//获取微信参数
+export const getWxConfig = (postData = {}) => {
+  return HTTPREQUEST.get('/open/getWxConfig', postData)
 }
 
 export const setOpenId = (postData = {}) => {
   return HTTPREQUEST.post('/api/admin/setOpenId', postData)
 }
-//获取最近打卡信息
-export const getPunchClockInfo = (postData = {}) => {
-  return HTTPREQUEST.get('/api/admin/release/getMyNewPublic', postData)
-}
-
-export const getPublicReleaseList = (postData = {}) => {
-  return HTTPREQUEST.get('/api/admin/release/listPublicRelease', postData)
-}
-
-export const publicReleaseClockIn = (postData = {}) => {
-  return HTTPREQUEST.post('/api/admin/release/publicReleaseClockIn', postData)
-}
-
-// 公出审批
-export const examinePublicRelease = (isSuperior = true, postData = {}) => {
-  return HTTPREQUEST.post(isSuperior ? '/api/admin/release/examinePublicRelease' : '/api/admin/release/MarketersExamine', postData)
-}
-
-//获取外出公出详情
-export const getReleasetDails = (postData = {}) => {
-  return HTTPREQUEST.get('/api/admin/release/dtails', postData)
-}
-
-//获取公出日志
-export const getListPublicReleaseLog = (postData = {}) => {
-  return HTTPREQUEST.get('/api/admin/release/listPublicReleaseLog', postData)
-}
-
-//修改公出申请
-export const updatePublicRelease = (postData = {}) => {
-  return HTTPREQUEST.post('/api/admin/release/updatePublicRelease', postData)
-}
-
-//外出未读
-export const getPublicReleaseUnread = (postData = {}) => {
-  return HTTPREQUEST.get('/api/admin/notice/publicReleaseUnread', postData)
-}
 
 //获取知道部门作息时间
 export const getWorkingHours = (postData = {}) => {
   return HTTPREQUEST.get('/api/admin/department/workingHours/get', postData)
 }
 
-//获取部门作息列表
-export const getWorkingHoursList = (postData = {}) => {
-  return HTTPREQUEST.get('/api/admin/department/workingHours/list', postData)
-}
-
-//获取微信参数
-export const getWxConfig = (postData = {}) => {
-  return HTTPREQUEST.get('/open/getWxConfig', postData)
-}
-
 //测试
 export const test = (postData = {}) => {
   return HTTPREQUEST.get('/open/getVCode', postData)
 }
 
-//技术协单驳回
-export const techReject = (postData = {}) => {
-  return HTTPREQUEST.post('/api/admin/release/techReject', postData)
+// 我的公出列表
+export const getPublicReleaseList = (postData = {}) => {
+  return HTTPREQUEST.get('/api/admin/release/listPublicRelease', postData)
 }
 
-//新增协单助力
-export const addAssistant = (postData = {}) => {
-  return HTTPREQUEST.post('/api/admin/release/addAssistant', postData)
+// 新增报销
+export const creatOrder = (postData = {}) => {
+  return HTTPREQUEST.post('/api/admin/expenseAccount/add', postData)
 }
 
-//删除协单助力
-export const deleteAssistant = (postData = {}) => {
-  return HTTPREQUEST.post('/api/admin/release/deleteAssistant', postData)
+// 发起未提交
+export const selectByPrid = (postData = {}) => {
+  return HTTPREQUEST.get('/api/admin/expenseAccount/selectByPrid', postData)
 }
 
-//修改公出地址
-export const updateLocation = (postData = {}) => {
-  return HTTPREQUEST.post('/api/admin/release/updateLocation', postData)
+// 草稿箱详情
+export const getPridDetail = (postData = {}) => {
+  return HTTPREQUEST.get('/api/admin/expenseAccount/selectById', postData)
 }
 
-
-
 // 私有账号列表
 export const selectList = (postData = {}) => {
   return HTTPREQUEST.get('/api/admin/expenseAccountPrivate/selectList', postData)
@@ -150,4 +91,24 @@ export const editAccount = (postData = {}) => {
 // 设置默认账户
 export const updateStatus = (postData = {}) => {
   return HTTPREQUEST.post('/api/admin/expenseAccountPrivate/updateStatus', postData)
+}
+
+// 报销记录列表
+export const getRecordList = (postData = {}) => {
+  return HTTPREQUEST.get('/api/admin/expenseAccount/pageList', postData)
+}
+
+// 报销详情金额列表
+export const getAccountList = (postData = {}) => {
+  return HTTPREQUEST.get('/api/admin/expenseAccount/details/list', postData)
+}
+
+// 新增报销详情
+export const detailsAdd = (postData = {}) => {
+  return HTTPREQUEST.post('/api/admin/expenseAccount/details/add', postData)
+}
+
+// 删除报销详情
+export const detailsDelete = (postData = {}) => {
+  return HTTPREQUEST.get('/api/admin/expenseAccount/details/delete', postData)
 }

+ 87 - 33
src/utils/tools/config.js

@@ -1,62 +1,116 @@
 //详情申请状态
 export const clockState = [
   {
-    title:'驳回',
-    id:0,
-    color:'#f31212'
+    title: '驳回',
+    id: 0,
+    color: '#f31212'
   },
   {
-    title:'审核中',
-    id:1,
-    color:'#1d4fea'
+    title: '审核中',
+    id: 1,
+    color: '#1d4fea'
   },
   {
-    title:'通过',
-    id:2,
-    color:'#34de38'
+    title: '通过',
+    id: 2,
+    color: '#34de38'
   },
   {
-    title:'已撤销',
-    id:3,
-    color:'#242424'
+    title: '已撤销',
+    id: 3,
+    color: '#242424'
   },
   {
-    title:'技术驳回',
-    id:4,
-    color:'#f31212'
+    title: '技术驳回',
+    id: 4,
+    color: '#f31212'
   },
 ];
 
 //申请日志状态
 export const clockJournalState = [
   {
-    title:'驳回',
-    id:0,
-    color:'#f31212'
+    title: '驳回',
+    id: 0,
+    color: '#f31212'
   },
   {
-    title:'发起',
-    id:1,
-    color:'#1d4fea'
+    title: '发起',
+    id: 1,
+    color: '#1d4fea'
   },
   {
-    title:'通过',
-    id:2,
-    color:'#34de38'
+    title: '通过',
+    id: 2,
+    color: '#34de38'
   },
   {
-    title:'已打卡',
-    id:3,
-    color:'#b934de'
+    title: '已打卡',
+    id: 3,
+    color: '#b934de'
   },
   {
-    title:'已撤销',
-    id:4,
-    color:'#242424'
+    title: '已撤销',
+    id: 4,
+    color: '#242424'
   },
   {
-    title:'修改',
-    id:5,
-    color:'#1E90FF'
+    title: '修改',
+    id: 5,
+    color: '#1E90FF'
   },
 ];
+
+
+export const accountList = [
+  { label: '差旅费', value: 1, },
+  { label: '非业务报销', value: 2, },
+  { label: '第三方付款', value: 3, },
+  { label: '申请借支', value: 4 },
+  { label: '其他', value: 0, }
+]
+
+export const accountLtate = [
+  {
+    title: '未提交',
+    id: 0,
+    color: '#f1662f'
+  },
+  {
+    title: '审核中',
+    id: 1,
+    color: '#1d4fea'
+  },
+  {
+    title: '完成',
+    id: 2,
+    color: '#34de38'
+  },
+  {
+    title: '已驳回',
+    id: 3,
+    color: '#f31212'
+  },
+]
+
+export const typeList = [
+  { label: '交通费', value: 1, },
+  { label: '住宿费', value: 2, },
+  { label: '市内车费', value: 3, },
+  { label: '餐费', value: 4 },
+  { label: '出差补贴', value: 5 },
+  { label: '预借支', value: 6 },
+  { label: '其他', value: 0, }
+]
+
+export const vehiclelist = [
+  { label: '飞机', value: 1, },
+  { label: '火车或高铁', value: 2, },
+  { label: '地铁', value: 3, },
+  { label: '公交车', value: 4 },
+  { label: '其他', value: 0, },
+]
+
+// export const postList = [
+//   { tatle: "差旅费", type: 1, typeList: [0, 1, 2, 3, 4, 5, 6], },
+// ]

+ 61 - 97
src/utils/tools/index.js

@@ -1,4 +1,4 @@
-import { clockState, clockJournalState } from './config';
+import { clockState, clockJournalState, accountList, typeList, vehiclelist } from './config';
 import dayjs from "dayjs";
 import Taro from "@tarojs/taro";
 
@@ -116,117 +116,81 @@ export const formatDate = (year, month, day, hour, minute) => {
   return year + '-' + newmonth + '-' + newday + ' ' + newhour + ":" + newminute;
 };
 
-export const deepClone1 = (obj) => {
-  //判断拷贝的要进行深拷贝的是数组还是对象,是数组的话进行数组拷贝,对象的话进行对象拷贝
-  var objClone = Array.isArray(obj) ? [] : {};
-  //进行深拷贝的不能为空,并且是对象或者是
-  if (obj && typeof obj === "object") {
-    for (key in obj) {
-      if (obj.hasOwnProperty(key)) {
-        if (obj[key] && typeof obj[key] === "object") {
-          objClone[key] = deepClone1(obj[key]);
-        } else {
-          objClone[key] = obj[key];
-        }
-      }
-    }
-  }
-  return objClone;
-}
 
-// 是否是登录人的id
-export const isOneself = (id) => {
-  let userInfor = Taro.getStorageSync('userInfor');
-  if (userInfor.aid === id) {
-    return true
-  } else {
-    return false
-  }
-}
-
-// 数组合并处理
-export const getNewList = (uids, unames) => {
-  // if(!uids){
-  //   return []
-  // }
-  if (uids.indexOf(",") > -1) {
-    let idlist = uids.split(',')
-    let namelist = unames.split(',')
-    let newlist = []
-    for (var i = 0; i < idlist.length; i++) {
-      newlist.push({ id: idlist[i], name: namelist[i] })
-    }
-    return newlist
-  } else {
-    return [{ id: uids, name: unames }]
-  }
-}
-
-// 数组重组
-export const getNewOptions = (arr) => {
+// 
+export const getNameList = (aidList, arr) => {
   let list = []
-  for (var i = 0; i < arr.length; i++) {
-    list.push({ label: arr[i].userName, value: arr[i].uid, desc: arr[i].clockIn == 1 ? "(已打卡)" : "(未打卡)" })
+  for (var i = 0; i < aidList.length; i++) {
+    if (aidList[i] == arr[i].id) {
+      list.push(arr[i].name)
+    }
   }
   return list
 }
 
-// 提取数组里的某一项组成新数组(公出他人企业限制)
-export const getList = (arr, name, isUnique = false) => {
-  let list = []
-  for (var i = 0; i < arr.length; i++) {
-    if (arr[i].status == 1) {
-      list.push(arr[i][name])
+// 获取报销申请类型
+export const getAccountName = (type, other) => {
+  let theType = "";
+  accountList.map(function (item) {
+    if (item.value == type) {
+      theType = item.label;
+      if (item.value == 0) {
+        theType = other
+      }
     }
-  }
-  // 去重
-  if (isUnique) {
-    unique(list)
-  }
-  return list
+  });
+  return theType;
 }
 
-// 显示提示(公出他人企业)
-export const isTips = (arr) => {
-  let show = false
-  for (var i = 0; i < arr.length; i++) {
-    if (arr[i].status == 1) {
-      show = true
+// 获取报销费用类型
+export const getTypeName = (type, other) => {
+  let theType = "";
+  typeList.map(function (item) {
+    if (item.value == type) {
+      theType = item.label;
+      if (item.value == 0) {
+        theType = other
+      }
     }
-  }
-  return show
+  });
+  return theType;
 }
 
-// 数组去重
-export const unique = (arr, key) => {
-  if (arr.length <= 1) {
-    return arr
-  }
-  for (var i = 0; i < arr.length; i++) {
-    for (var j = i + 1; j < arr.length; j++) {
-      if (key) {
-        if (arr[i][key] == arr[j][key]) {         //第一个等同于第二个,splice方法删除第二个
-          arr.splice(j, 1);
-          j--;
-        }
-      } else {
-        if (arr[i] == arr[j]) {
-          arr.splice(j, 1);
-          j--;
-        }
+// 获取交通工具类型
+export const getVehicleName = (type, other) => {
+  let theType = "";
+  vehiclelist.map(function (item) {
+    if (item.value == type) {
+      theType = item.label;
+      if (item.value == 0) {
+        theType = other
       }
     }
-  }
-  return arr;
+  });
+  return theType;
 }
 
-// 
-export const getNameList = (aidList, arr) => {
-  let list = []
-  for (var i = 0; i < aidList.length; i++) {
-    if (aidList[i] == arr[i].id) {
-      list.push(arr[i].name)
+// 解决小数求和问题
+export const commonAdd = (number1, number2) => {
+  let result = 0;
+  if (Number.isInteger(number1) || Number.isInteger(number2)) {
+    result = number1 + number2;
+  } else {
+    //两个都是纯小数
+    const number1Array = (number1).toString().split('.');
+    const number2Array = (number2).toString().split('.');
+    //最大的除数位数
+    let maxBit = 1;
+    if (number1Array[1].length >= number2Array[1].length) {
+      maxBit = number1Array[1].length + 1;
+    } else {
+      maxBit = number2Array[1].length + 1;
     }
+    const divisor = parseInt('1'.padEnd(maxBit, 0));
+    result = (number1 * divisor + number2 * divisor) / divisor;
   }
-  return list
-}
+  return result;
+}
+
+
+

+ 1 - 1
yarn-error.log

@@ -21,7 +21,7 @@ npm manifest:
     "name": "kede-tool-weapp",
     "version": "1.0.0",
     "private": true,
-    "description": "科德工具小程序",
+    "description": "科德研发服务流程管理系统",
     "templateInfo": {
       "name": "redux",
       "typescript": false,

+ 89 - 1
yarn.lock

@@ -73,6 +73,13 @@
   dependencies:
     "@babel/types" "^7.12.13"
 
+"@babel/helper-annotate-as-pure@^7.18.6":
+  version "7.18.6"
+  resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.18.6.tgz#eaa49f6f80d5a33f9a5dd2276e6d6e451be0a6bb"
+  integrity sha512-duORpUiYrEpzKIop6iNbjnwKLAKnJ47csTyRACyEmWj0QdUrm5aqNJGHSSEQSUAvNW0ojX0dOmK9dZduvkfeXA==
+  dependencies:
+    "@babel/types" "^7.18.6"
+
 "@babel/helper-builder-binary-assignment-operator-visitor@^7.12.13":
   version "7.12.13"
   resolved "https://registry.yarnpkg.com/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.12.13.tgz#6bc20361c88b0a74d05137a65cac8d3cbf6f61fc"
@@ -111,6 +118,14 @@
     "@babel/helper-annotate-as-pure" "^7.12.13"
     regexpu-core "^4.7.1"
 
+"@babel/helper-create-regexp-features-plugin@^7.21.0":
+  version "7.21.0"
+  resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.21.0.tgz#53ff78472e5ce10a52664272a239787107603ebb"
+  integrity sha512-N+LaFW/auRSWdx7SHD/HiARwXQju1vXTW4fKr4u5SgBUTm51OKEjKgj+cs00ggW3kEvNqwErnlwuq7Y3xBe4eg==
+  dependencies:
+    "@babel/helper-annotate-as-pure" "^7.18.6"
+    regexpu-core "^5.3.1"
+
 "@babel/helper-explode-assignable-expression@^7.12.13":
   version "7.13.0"
   resolved "https://registry.yarnpkg.com/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.13.0.tgz#17b5c59ff473d9f956f40ef570cf3a76ca12657f"
@@ -222,11 +237,21 @@
   dependencies:
     "@babel/types" "^7.12.13"
 
+"@babel/helper-string-parser@^7.19.4":
+  version "7.19.4"
+  resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.19.4.tgz#38d3acb654b4701a9b77fb0615a96f775c3a9e63"
+  integrity sha512-nHtDoQcuqFmwYNYPz3Rah5ph2p8PFeFCsZk9A/48dPc/rGocJ5J3hAAZ7pb76VWX3fZKu+uEr/FhH5jLx7umrw==
+
 "@babel/helper-validator-identifier@^7.12.11", "@babel/helper-validator-identifier@^7.14.0":
   version "7.14.0"
   resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.0.tgz#d26cad8a47c65286b15df1547319a5d0bcf27288"
   integrity sha512-V3ts7zMSu5lfiwWDVWzRDGIN+lnCEUdaXgtVHJgLb1rGaA6jMrtB9EmE7L18foXJIE8Un/A/h6NJfGQp/e1J4A==
 
+"@babel/helper-validator-identifier@^7.19.1":
+  version "7.19.1"
+  resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz#7eea834cf32901ffdc1a7ee555e2f9c27e249ca2"
+  integrity sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==
+
 "@babel/helper-validator-option@^7.12.17":
   version "7.12.17"
   resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.12.17.tgz#d1fbf012e1a79b7eebbfdc6d270baaf8d9eb9831"
@@ -921,6 +946,11 @@
     pirates "^4.0.0"
     source-map-support "^0.5.16"
 
+"@babel/regjsgen@^0.8.0":
+  version "0.8.0"
+  resolved "https://registry.yarnpkg.com/@babel/regjsgen/-/regjsgen-0.8.0.tgz#f0ba69b075e1f05fb2825b7fad991e7adbb18310"
+  integrity sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA==
+
 "@babel/runtime@7.9.2":
   version "7.9.2"
   resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.9.2.tgz#d90df0583a3a252f09aaa619665367bae518db06"
@@ -966,6 +996,15 @@
     "@babel/helper-validator-identifier" "^7.14.0"
     to-fast-properties "^2.0.0"
 
+"@babel/types@^7.18.6":
+  version "7.21.2"
+  resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.21.2.tgz#92246f6e00f91755893c2876ad653db70c8310d1"
+  integrity sha512-3wRZSs7jiFaB8AjxiiD+VqN5DTG2iRvJGQ+qYFrs/654lg6kGTQWIOFjlBo5RaXuAZjBmP3+OQH4dmhqiiyYxw==
+  dependencies:
+    "@babel/helper-string-parser" "^7.19.4"
+    "@babel/helper-validator-identifier" "^7.19.1"
+    to-fast-properties "^2.0.0"
+
 "@hapi/address@^4.0.1":
   version "4.1.0"
   resolved "https://registry.yarnpkg.com/@hapi/address/-/address-4.1.0.tgz#d60c5c0d930e77456fdcde2598e77302e2955e1d"
@@ -8488,6 +8527,13 @@ redux@^4.0.0:
   dependencies:
     "@babel/runtime" "^7.9.2"
 
+regenerate-unicode-properties@^10.1.0:
+  version "10.1.0"
+  resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-10.1.0.tgz#7c3192cab6dd24e21cb4461e5ddd7dd24fa8374c"
+  integrity sha512-d1VudCLoIGitcU/hEg2QqvyGZQmdC0Lf8BqdOMXGFSvJP4bNV1+XqbPQeHHLD51Jh4QJJ225dlIFvY4Ly6MXmQ==
+  dependencies:
+    regenerate "^1.4.2"
+
 regenerate-unicode-properties@^8.2.0:
   version "8.2.0"
   resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-8.2.0.tgz#e5de7111d655e7ba60c057dbe9ff37c87e65cdec"
@@ -8495,7 +8541,7 @@ regenerate-unicode-properties@^8.2.0:
   dependencies:
     regenerate "^1.4.0"
 
-regenerate@^1.4.0:
+regenerate@^1.4.0, regenerate@^1.4.2:
   version "1.4.2"
   resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.2.tgz#b9346d8827e8f5a32f7ba29637d398b69014848a"
   integrity sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==
@@ -8567,6 +8613,18 @@ regexpu-core@^4.7.1:
     unicode-match-property-ecmascript "^1.0.4"
     unicode-match-property-value-ecmascript "^1.2.0"
 
+regexpu-core@^5.3.1:
+  version "5.3.1"
+  resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-5.3.1.tgz#66900860f88def39a5cb79ebd9490e84f17bcdfb"
+  integrity sha512-nCOzW2V/X15XpLsK2rlgdwrysrBq+AauCn+omItIz4R1pIcmeot5zvjdmOBRLzEH/CkC6IxMJVmxDe3QcMuNVQ==
+  dependencies:
+    "@babel/regjsgen" "^0.8.0"
+    regenerate "^1.4.2"
+    regenerate-unicode-properties "^10.1.0"
+    regjsparser "^0.9.1"
+    unicode-match-property-ecmascript "^2.0.0"
+    unicode-match-property-value-ecmascript "^2.1.0"
+
 regjsgen@^0.5.1:
   version "0.5.2"
   resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.5.2.tgz#92ff295fb1deecbf6ecdab2543d207e91aa33733"
@@ -8579,6 +8637,13 @@ regjsparser@^0.6.4:
   dependencies:
     jsesc "~0.5.0"
 
+regjsparser@^0.9.1:
+  version "0.9.1"
+  resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.9.1.tgz#272d05aa10c7c1f67095b1ff0addae8442fc5709"
+  integrity sha512-dQUtn90WanSNl+7mQKcXAgZxvUe7Z0SqXlgzv0za4LwiUhyzBC58yQO3liFoUgu8GiJVInAhJjkj1N0EtQ5nkQ==
+  dependencies:
+    jsesc "~0.5.0"
+
 relateurl@0.2.x, relateurl@^0.2.7:
   version "0.2.7"
   resolved "https://registry.yarnpkg.com/relateurl/-/relateurl-0.2.7.tgz#54dbf377e51440aca90a4cd274600d3ff2d888a9"
@@ -10280,6 +10345,11 @@ unicode-canonical-property-names-ecmascript@^1.0.4:
   resolved "https://registry.yarnpkg.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz#2619800c4c825800efdd8343af7dd9933cbe2818"
   integrity sha512-jDrNnXWHd4oHiTZnx/ZG7gtUTVp+gCcTTKr8L0HjlwphROEW3+Him+IpvC+xcJEFegapiMZyZe02CyuOnRmbnQ==
 
+unicode-canonical-property-names-ecmascript@^2.0.0:
+  version "2.0.0"
+  resolved "https://registry.yarnpkg.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz#301acdc525631670d39f6146e0e77ff6bbdebddc"
+  integrity sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ==
+
 unicode-match-property-ecmascript@^1.0.4:
   version "1.0.4"
   resolved "https://registry.yarnpkg.com/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-1.0.4.tgz#8ed2a32569961bce9227d09cd3ffbb8fed5f020c"
@@ -10288,16 +10358,34 @@ unicode-match-property-ecmascript@^1.0.4:
     unicode-canonical-property-names-ecmascript "^1.0.4"
     unicode-property-aliases-ecmascript "^1.0.4"
 
+unicode-match-property-ecmascript@^2.0.0:
+  version "2.0.0"
+  resolved "https://registry.yarnpkg.com/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-2.0.0.tgz#54fd16e0ecb167cf04cf1f756bdcc92eba7976c3"
+  integrity sha512-5kaZCrbp5mmbz5ulBkDkbY0SsPOjKqVS35VpL9ulMPfSl0J0Xsm+9Evphv9CoIZFwre7aJoa94AY6seMKGVN5Q==
+  dependencies:
+    unicode-canonical-property-names-ecmascript "^2.0.0"
+    unicode-property-aliases-ecmascript "^2.0.0"
+
 unicode-match-property-value-ecmascript@^1.2.0:
   version "1.2.0"
   resolved "https://registry.yarnpkg.com/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.2.0.tgz#0d91f600eeeb3096aa962b1d6fc88876e64ea531"
   integrity sha512-wjuQHGQVofmSJv1uVISKLE5zO2rNGzM/KCYZch/QQvez7C1hUhBIuZ701fYXExuufJFMPhv2SyL8CyoIfMLbIQ==
 
+unicode-match-property-value-ecmascript@^2.1.0:
+  version "2.1.0"
+  resolved "https://registry.yarnpkg.com/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.1.0.tgz#cb5fffdcd16a05124f5a4b0bf7c3770208acbbe0"
+  integrity sha512-qxkjQt6qjg/mYscYMC0XKRn3Rh0wFPlfxB0xkt9CfyTvpX1Ra0+rAmdX2QyAobptSEvuy4RtpPRui6XkV+8wjA==
+
 unicode-property-aliases-ecmascript@^1.0.4:
   version "1.1.0"
   resolved "https://registry.yarnpkg.com/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.1.0.tgz#dd57a99f6207bedff4628abefb94c50db941c8f4"
   integrity sha512-PqSoPh/pWetQ2phoj5RLiaqIk4kCNwoV3CI+LfGmWLKI3rE3kl1h59XpX2BjgDrmbxD9ARtQobPGU1SguCYuQg==
 
+unicode-property-aliases-ecmascript@^2.0.0:
+  version "2.1.0"
+  resolved "https://registry.yarnpkg.com/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.1.0.tgz#43d41e3be698bd493ef911077c9b131f827e8ccd"
+  integrity sha512-6t3foTQI9qne+OZoVQB/8x8rk2k1eVy1gRXhV3oFQ5T6R1dqQ1xtin3XqSlx3+ATBkliTaR/hHyJBm+LVPNM8w==
+
 unified@^6.0.0:
   version "6.2.0"
   resolved "https://registry.yarnpkg.com/unified/-/unified-6.2.0.tgz#7fbd630f719126d67d40c644b7e3f617035f6dba"