dev01 1 éve%!(EXTRA string=óta)
szülő
commit
16fe3d58d1
37 módosított fájl, 423 hozzáadás és 6490 törlés
  1. 5 4
      project.config.json
  2. 2 1
      project.private.config.json
  3. 13 20
      src/app.config.js
  4. 0 171
      src/components/common/messageNoticebar/index.jsx
  5. 0 84
      src/components/common/messageNoticebar/index.less
  6. 1 1
      src/components/common/userFloatingLayer/index.jsx
  7. 0 427
      src/pages/applyDepart/enterprise.jsx
  8. 0 22
      src/pages/applyDepart/enterprise.less
  9. 0 6
      src/pages/applyDepart/index.config.js
  10. 0 194
      src/pages/applyDepart/index.jsx
  11. 0 65
      src/pages/applyDepart/index.less
  12. 0 742
      src/pages/applyDepart/publicContent.jsx
  13. 0 147
      src/pages/applyDepart/publicContent.less
  14. 0 87
      src/pages/applyDepart/result.jsx
  15. 0 459
      src/pages/egressDetails/enterprise.jsx
  16. 0 6
      src/pages/egressDetails/index.config.js
  17. 0 232
      src/pages/egressDetails/index.css
  18. 0 863
      src/pages/egressDetails/index.jsx
  19. 0 289
      src/pages/egressDetails/index.less
  20. 0 216
      src/pages/egressDetails/modify.jsx
  21. 0 1028
      src/pages/egressDetails/publicContent.jsx
  22. 0 122
      src/pages/egressDetails/publicContent.less
  23. 40 45
      src/pages/login/index.jsx
  24. 27 441
      src/pages/mybusiness/index.jsx
  25. 39 47
      src/pages/project/index.jsx
  26. 5 0
      src/pages/project/index.less
  27. 3 0
      src/pages/projectAdd/index.config.js
  28. 142 0
      src/pages/projectAdd/index.jsx
  29. 11 0
      src/pages/projectAdd/index.less
  30. 7 59
      src/pages/punchClock/index.jsx
  31. 56 7
      src/pages/punchClock/index.less
  32. 58 651
      src/pages/punchClock/punchClocks.jsx
  33. 0 3
      src/pages/staffDistribution/index.config.js
  34. 0 47
      src/pages/staffDistribution/index.jsx
  35. 0 1
      src/pages/staffDistribution/index.less
  36. 1 1
      src/utils/servers/interceptors.js
  37. 13 2
      src/utils/servers/servers.js

+ 5 - 4
project.config.json

@@ -5,7 +5,7 @@
         "urlCheck": false,
         "es6": false,
         "enhance": true,
-        "postcss": false,
+        "postcss": true,
         "preloadBackgroundData": false,
         "minified": true,
         "newFeature": false,
@@ -21,6 +21,8 @@
         "compileHotReLoad": false,
         "lazyloadPlaceholderEnable": false,
         "useMultiFrameRuntime": false,
+        "useApiHook": true,
+        "useApiHostProcess": true,
         "babelSetting": {
             "ignore": [],
             "disablePlugins": [],
@@ -37,9 +39,8 @@
         "showES6CompileOption": false,
         "useCompilerPlugins": false,
         "useStaticServer": true,
-        "ignoreUploadUnusedFiles": true,
-        "useApiHook": false,
-        "useApiHostProcess": false
+        "condition": false,
+        "ignoreUploadUnusedFiles": true
     },
     "compileType": "miniprogram",
     "condition": {},

+ 2 - 1
project.private.config.json

@@ -3,5 +3,6 @@
     "projectname": "kede-research-weapp",
     "setting": {
         "compileHotReLoad": true
-    }
+    },
+    "libVersion": "3.0.0"
 }

+ 13 - 20
src/app.config.js

@@ -1,39 +1,32 @@
 export default {
   pages: [
-    'pages/project/index',//审核
-    // 'pages/staffDistribution/index',//员工分布
+    'pages/project/index',//研发项目
     'pages/punchClock/index',//打卡
-   
-    'pages/egressDetails/index',//公出详情
+    // 'pages/egressDetails/index',//公出详情
     'pages/login/index',//登录
-    'pages/applyDepart/index',//申请公出
-    'pages/mybusiness/index',//我的
+    // 'pages/applyDepart/index',//申请公出
+    'pages/mybusiness/index',//审核
+    // 'pages/projectAdd/index',// 新增项目
   ],
   tabBar: {
     list: [
       {
-        iconPath: './image/punchClockUnSelect.png',
-        selectedIconPath: './image/punchClockSelect.png',
-        pagePath: 'pages/punchClock/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/project/index',
-        text: '我的'
+        text: '研发项目'
+      },
+      {
+        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: '我'
+        text: '审核'
       }],
     'color': '#515151',
     'selectedColor': '#56abe4',

+ 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;
-      }
-    }
-  }
-}

+ 1 - 1
src/components/common/userFloatingLayer/index.jsx

@@ -29,7 +29,7 @@ class UserFloatingLayer extends Component{
           <OpenData type='userAvatarUrl'/>
         </View>
         <View className='userNickName'>
-          {this.state.userInfor.name}
+          {this.state.userInfor.userName}
           <View className='welcome' onClick={()=>{
             Taro.setStorageSync("token", "");
             Taro.setStorageSync('userInfor', "");

+ 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 - 6
src/pages/applyDepart/index.config.js

@@ -1,6 +0,0 @@
-export default {
-  navigationBarTitleText: '申请公出',
-  usingComponents: {
-    timePicker: '../../components/common/timePicker/timePicker'
-  }
-}

+ 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 - 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 - 6
src/pages/egressDetails/index.config.js

@@ -1,6 +0,0 @@
-export default {
-  navigationBarTitleText: '详情',
-  usingComponents: {
-    timePicker: '../../components/common/timePicker/timePicker'
-  }
-}

+ 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;

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 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%;
-  }
-}

+ 40 - 45
src/pages/login/index.jsx

@@ -2,7 +2,7 @@ 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 { login, setOpenId, getInfo } from '../../utils/servers/servers';
 
 import { add, minus, asyncAdd } from '../../actions/counter'
 
@@ -49,7 +49,7 @@ class Login extends Component {
     this.authorization = this.authorization.bind(this);
     this.setUsernameList = this.setUsernameList.bind(this);
     this.getUsernameList = this.getUsernameList.bind(this);
-    this.getWorkingHours = this.getWorkingHours.bind(this);
+    this.getInfo = this.getInfo.bind(this);
   }
 
   componentDidShow() {
@@ -143,58 +143,53 @@ class Login extends Component {
       this.setState({
         loading: false
       });
-
-      Taro.switchTab({
-        url: '/pages/project/index',
-      })
-
-      return
-      if (!msg.data.openId) {
-        Taro.login({
-          success: (res) => {
-            setOpenId({
-              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 {
-                Taro.showToast({
-                  title: v.error[0].message,
-                  icon: 'none',
-                })
-              }
-            })
-          },
-          fail: () => {
-            Taro.showToast({ title: '系统错误,请稍后重试' })
-          }
-        });
-      } else {
-        this.setUsernameList(this.state.username, this.state.password);
-        Taro.eventCenter.trigger('getStorageSync');
-        // this.getWorkingHours(msg.data.departmentId);
-      }
+      this.getInfo()
     }).catch((err) => {
-      //console.log(err)
       this.setState({
         loading: false
       })
     })
   }
 
-  getWorkingHours(depId) {
-    getWorkingHours({
-      depId
-    }).then((msg) => {
-      if (msg.error.length === 0) {
-        let obj = Taro.getStorageSync('userInfor');
-        obj.workTimeInfor = msg.data;
-        Taro.setStorageSync('userInfor', obj);
+  getInfo() {
+    getInfo({}).then((msg) => {
+      if (msg.data.code === 200) {
+
+        if (!msg.data.user.openId) {
+          Taro.login({
+            success: (res) => {
+              setOpenId({
+                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 {
+                  Taro.showToast({
+                    title: v.error[0].message,
+                    icon: 'none',
+                  })
+                }
+              })
+            },
+            fail: () => {
+              Taro.showToast({ title: '系统错误,请稍后重试' })
+            }
+          });
+        } else {
+          this.setUsernameList(this.state.username, this.state.password);
+          Taro.eventCenter.trigger('getStorageSync');
+          // this.getWorkingHours(msg.data.departmentId);
+        }
+
+        // let obj = Taro.getStorageSync('userInfor');
+        // obj.workTimeInfor = msg.data.user;
+        Taro.setStorageSync('userInfor', msg.data.user);
         Taro.switchTab({
-          url: '/pages/punchClock/index',
+          url: '/pages/project/index',
         })
+
       } else {
         Taro.showToast({ title: msg.error[0].message, icon: 'none' })
       }

+ 27 - 441
src/pages/mybusiness/index.jsx

@@ -1,7 +1,7 @@
 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 { getProjectList, techReject, getReleasetDails } from '../../utils/servers/servers';
 import dayjs from 'dayjs';
 import {
   AtSearchBar,
@@ -25,9 +25,7 @@ import "taro-ui/dist/style/components/icon.scss";
 import "taro-ui/dist/style/components/modal.scss";
 
 import MyList from '../project/myList';
-import MessageNoticebar from "../../components/common/messageNoticebar";
 import InquiryModal from "../../components/common/inquiryModal";
-import PublicContent from "../egressDetails/publicContent";
 import { resourceAddress } from "../../utils/config";
 
 class Examine extends Component {
@@ -36,59 +34,21 @@ class Examine extends Component {
     super(props);
     this.state = {
       typeList: [
-        { title: '我的公出' },
-        { title: '我的协单' }],
+        { title: '全部', type: 1 },
+        { title: '已审核', type: 2 },
+        { title: '未审核', type: 3 }],
       current: 0,
-      isPickerRender: false,
-      validDates: '',
+
       list: [],
-      pageNo: 1,
+      pageNum: 1,
       listState: 'LOADING',
-      starts: {},
-      clockInStarts: '',
-      rangeEndVal: '',
-      rangeStartVal: '',
-      rangeEndMinuteVal: '',
-      rangeStartMinuteVal: '',
-      id: "",
-      rmk: "",
-      isOpen: false,
-      coorder: [
-        { title: '协单助手', type: 3 },
-        { title: '技术协单', type: 2 },
-        { title: '全部', type: 4 }],
-      selcotype: 4,
 
     }
     this.getPublicReleaseList = this.getPublicReleaseList.bind(this);
     this.getMyList = this.getMyList.bind(this);
-    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();
   }
 
@@ -110,162 +70,70 @@ class Examine extends Component {
     }
   }
 
-  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;
-    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);
+    await this.getMyList(lv ? this.state.pageNum + 1 : 1);
     Taro.stopPullDownRefresh();
   }
 
-  async getMyList(pageNo) {
+  async getMyList(pageNum) {
+    const { current } = this.state
     this.setState({
       listState: 'LOADING'
     })
     let data = {
-      pageNo: pageNo,
+      pageNum: pageNum,
       pageSize: 10,
-      type: '0',
-      assist: this.state.current === 0 ? 0 : this.state.selcotype,
-      releaseStarts: this.state.rangeStartMinuteVal || undefined,
-      releaseEnds: this.state.rangeEndMinuteVal || undefined,
-      status: isNaN(parseInt(this.state.starts.id)) ? undefined : String(this.state.starts.id),
-      clockIn: this.state.clockInStarts || undefined,
-      userName: this.state.searchValue || undefined,
+      roleType: 0,
+      name: this.state.searchValue || undefined,
+
     }
     for (let i in data) {
-      if (!data[i]) {
+      if (!data[i] && data[i] != 0) {
         delete data[i]
       }
     }
-    let msg = await getPublicReleaseList(data);
-    if (msg.error.length === 0) {
-      if (msg.data.totalCount === 0) {
+    let msg = await getProjectList(data);
+    if (msg.data.code === 200) {
+      if (msg.data.total === 0) {
         this.setState({
           listState: 'NO_DATA'
         })
-      } else if (msg.data.totalCount === this.state.list.length && pageNo !== 1) {
-        // 防止提示挡住驳回弹窗
+      } else if (msg.data.total === this.state.list.length && pageNum !== 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) {
+        if (msg.data.total === (pageNum === 1 ? msg.data.rows : this.state.list.concat(msg.data.rows)).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
+        list: pageNum === 1 ? msg.data.rows : this.state.list.concat(msg.data.rows),
+        pageNum: msg.data.rows.length === 0 ? this.state.pageNum : msg.data.next - 1
       })
     } else {
-      Taro.showToast({ title: msg.error[0].message, icon: 'none' });
+      Taro.showToast({ title: msg.data.msg, icon: 'none' });
       this.setState({
-        listState: msg.error[0].field === '403' ? 'NO_DATA' : 'RELOAD'
+        // 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
+            {/* <AtSearchBar
               showActionButton
               placeholder='请输入企业/渠道'
               value={this.state.searchValue}
@@ -282,142 +150,8 @@ class Examine extends Component {
                   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}
@@ -426,7 +160,7 @@ class Examine extends Component {
           onClick={(current) => {
             this.setState({
               list: [],
-              pageNo: 1,
+              pageNum: 1,
               current,
             }, () => {
               this.getPublicReleaseList();
@@ -438,168 +172,20 @@ class Examine extends Component {
                 current={this.state.current}
                 index={index}
               >
-                {
-                  this.state.current === 1 &&
-                  <View className='navs'>
-                    {
-                      this.state.coorder.map((it) =>
-                        <View className={this.state.selcotype == it.type ? 'nitems' : 'nitem'}
-                          key={it.type}
-                          onClick={() => {
-                            this.setState({
-                              list: [],
-                              pageNo: 1,
-                              selcotype: it.type,
-                            }, () => {
-                              this.getPublicReleaseList();
-                            })
-                          }}
-                        >{it.title}</View>
-                      )
-                    }
-                  </View>
-                }
                 <MyList
-                  type={0}
                   title={item.title}
                   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: () => {
-
-                      },
-                    });
+                    this.getProjectList(true);
                   }}
                 />
               </AtTabsPane>
             )
           }
         </AtTabs>
-        <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) => {
-            // 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>
-        }
-        {/* 再次公出申请 */}
-        {
-          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>
     )
   }

+ 39 - 47
src/pages/project/index.jsx

@@ -25,7 +25,6 @@ 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 Project extends Component {
 
@@ -45,7 +44,6 @@ class Project extends Component {
     }
     this.getProjectList = this.getProjectList.bind(this);
     this.getMyList = this.getMyList.bind(this);
-    this.onSetPickerTime = this.onSetPickerTime.bind(this);
   }
 
   componentDidShow() {
@@ -71,15 +69,6 @@ class Project extends Component {
   }
 
 
-  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);
   }
@@ -150,40 +139,39 @@ class Project 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.getProjectList();
-        this.setState({
-          isOpen: false,
-          rmk: "",
-        })
-      } else {
-        Taro.showToast({ title: v.error[0].message, icon: 'none' })
-      }
-    }).catch(() => {
-      Taro.hideLoading()
-      Taro.showToast({
-        title: '系统错误,请稍后再试',
-        icon: 'none'
-      })
-    })
-  }
+  // 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.getProjectList();
+  //       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
@@ -205,13 +193,17 @@ class Project extends Component {
               }}
             />
           </View>
-          {/* <ScrollView className={this.state.openSearch ? 'searchBottomLOL' : ''} scrollX style={{ width: '100%' }}>
-            <View className='searchBottom'>
-              <View className='searchItem' style={{ paddingLeft: '5px' }}>
-
-              </View>
+          {/* <View className='searchBottom'>
+            <View className='searchAdd' style={{ paddingLeft: '5px' }}
+              onClick={() => {
+                this.setState({
+                  isOpen: true
+                })
+              }}
+            >
+              + 创建新项目
             </View>
-          </ScrollView> */}
+          </View> */}
         </View>
         <AtTabs
           swipeable={false}

+ 5 - 0
src/pages/project/index.less

@@ -42,6 +42,11 @@
       border-bottom-left-radius: 10px;
       border-bottom-right-radius: 10px;
       padding: 10px 0 10px 0;
+      border: 1px solid red;
+
+      .searchAdd{
+        
+      }
 
       .searchBottomBack {
         position: fixed;

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

@@ -0,0 +1,3 @@
+export default {
+  navigationBarTitleText: '添加',
+}

+ 142 - 0
src/pages/projectAdd/index.jsx

@@ -0,0 +1,142 @@
+import React, { Component } from "react";
+import { View, Image, Button, Input, Textarea } 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 {
+  projectAdd,
+} 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 { getClockState, unique } from "../../utils/tools";
+
+class ProjectAdd extends Component {
+  $instance = getCurrentInstance();
+
+  constructor(props) {
+    super(props);
+    this.state = {
+
+    };
+
+  }
+
+  componentDidMount() {
+
+  }
+
+  componentDidShow() {
+
+  }
+
+  // 新增
+  Add(sta) {
+    if (!this.state.opinion) {
+      Taro.showToast({ title: "请填写审批意见", icon: "none" });
+      return;
+    }
+    projectAdd({
+      name: "",
+      adminName:"",
+    })
+      .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);
+      });
+  }
+
+  render() {
+    const { } = this.state;
+    return (
+      <View className="add">
+        <View className="count">
+          <View className="inputItem">
+            <View className="title">项目名称</View>
+            <Input />
+          </View>
+          <View className="inputItem">
+            <View className="title">项目负责人</View>
+          </View>
+          <View className="inputItem">
+            <View className="title">研发人员</View>
+          </View>
+          <View className="inputItem">
+            <View className="title">项目说明</View>
+            <Textarea />
+          </View>
+        </View>
+      </View>
+    );
+  }
+}
+
+export default ProjectAdd;

+ 11 - 0
src/pages/projectAdd/index.less

@@ -0,0 +1,11 @@
+.add{
+  padding: 30px;
+  .count{
+    // border: 1px solid red;
+    .inputItem{
+
+    }
+  }
+
+
+}

+ 7 - 59
src/pages/punchClock/index.jsx

@@ -1,6 +1,6 @@
 import React, { Component } from "react";
 import PunchClocks from './punchClocks';
-import MessageNoticebar from "../../components/common/messageNoticebar";
+import UserFloatingLayer from "../../components/common/userFloatingLayer";
 import { AtModal, } from "taro-ui"
 import Taro from "@tarojs/taro";
 import { updateLocation } from '../../utils/servers/servers';
@@ -14,24 +14,11 @@ class PunchClock extends Component {
       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() {
@@ -50,31 +37,6 @@ class PunchClock extends Component {
     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' })
@@ -84,24 +46,10 @@ class PunchClock extends Component {
   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='您确定是否切换位置?切换位置,将重新提交“公出审核”,如您的公出审核已通过,则需再次审核。'
+        <UserFloatingLayer />
+        <PunchClocks
+          getId={this.getId.bind(this)}
+          getHome={this.getHome.bind(this)}
         />
       </>
     )

+ 56 - 7
src/pages/punchClock/index.less

@@ -4,6 +4,54 @@
   min-height: calc(100vh - 50px);
   padding: 25px;
 
+  .item {
+    width: 100%;
+    font-size: 28px;
+    margin-bottom: 15px;
+    display: flex;
+    flex-direction: row;
+    align-items: center;
+    justify-content: space-between;
+
+    .ititle {
+      display: flex;
+      flex-direction: row;
+      align-items: center;
+
+    }
+
+  }
+
+  .items {
+    width: 100%;
+    font-size: 28px;
+    margin-bottom: 15px;
+
+    .ititle {
+      display: flex;
+      flex-direction: row;
+      align-items: center;
+
+      .input {
+        width: 140px;
+      }
+
+    }
+
+    .ititles {
+      display: flex;
+      flex-direction: row;
+
+    }
+
+    .text {
+      font-size: 20px;
+      color: red;
+    }
+
+  }
+
+
   .header {
     background: #FFFFFF;
     padding: 30px;
@@ -16,7 +64,8 @@
 
     .headerContent {
       display: flex;
-      flex-flow: row nowrap;
+      flex-direction: column;
+      // flex-flow: row nowrap;
       align-items: center;
     }
 
@@ -87,7 +136,7 @@
     background: #FFFFFF;
     padding: 30px;
     border-radius: 30px;
-    margin-bottom: 20px;
+    margin: 0 auto;
     display: flex;
     flex-flow: column nowrap;
     align-items: center;
@@ -119,7 +168,7 @@
 
         }
 
-        .switch{
+        .switch {
           display: flex;
           align-items: center;
           justify-content: center;
@@ -128,13 +177,13 @@
           padding: 11px 10px;
           height: 24px;
 
-          .stxt{
+          .stxt {
             font-size: 18px;
             color: #999999;
             padding-right: 10px;
           }
 
-          .sicon{
+          .sicon {
             width: 25px;
             height: 25px;
           }
@@ -265,7 +314,7 @@
         font-size: 25px;
       }
 
-      .refresh{
+      .refresh {
         position: absolute;
         right: 60px;
       }
@@ -339,6 +388,6 @@
   }
 }
 
-.at-radio__title{
+.at-radio__title {
   font-size: 26px;
 }

+ 58 - 651
src/pages/punchClock/punchClocks.jsx

@@ -1,14 +1,16 @@
 import React, { Component } from 'react'
 import { connect } from 'react-redux'
-import { Map, OpenData, View, Image, Text, Button } from '@tarojs/components'
+import { Input, Textarea, View, Text, Picker, Button } from '@tarojs/components'
 import Taro from '@tarojs/taro';
-import { AtIcon, AtModal, AtModalHeader, AtModalContent, AtModalAction, AtTextarea, AtRadio, AtList } from "taro-ui";
+import {
+  AtButton, AtList, AtListItem
+} 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 { getPublicReleaseList, } from '../../utils/servers/servers';
 import './index.less'
 import switchIocn from '../../image/switch.png';
 import Location from '../../image/location.png';
@@ -41,80 +43,19 @@ 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: "",//打卡说明
+      loading: false,
+      selector: ['调研阶段',],
+      dateSel: "",
+      selectorChecked: "",
     }
-    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();
+    // 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(() => {
@@ -151,256 +92,22 @@ class PunchClocks extends Component {
   }
 
   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) {
+  onDateChange = e => {
     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'
-        })
-      }
+      dateSel: e.detail.value
     })
   }
 
-  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)
-    }
+  onChange = e => {
     this.setState({
-      imgs: arr,
+      selectorChecked: this.state.selector[e.detail.value]
     })
   }
 
@@ -430,365 +137,65 @@ class PunchClocks extends Component {
             loading={this.state.loading}
           >
             <View className='headerContent'>
-              <View className='userAvatarUrl'>
-                <OpenData type='userAvatarUrl' />
+              <View className='item'>
+                <View>项目:新一代核心系统研发</View>
+                <AtButton type="primary" size="small">切换</AtButton>
               </View>
-              <View className='infor'>
-                <View className='name'>
-                  {
-                    Object.keys(dtails).length <= 0 ?
-                      Taro.getStorageSync('userInfor').name :
-                      dtails.aname
-                  }
+
+              <View className='item'>
+                <View className='ititle'>研发时间:
+                  <Picker mode='date' onChange={this.onDateChange}>
+                    <View className='picker'>
+                      {!!this.state.dateSel ? this.state.dateSel : "请选择"}
+                    </View>
+                  </Picker>
                 </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 className='items'>
+                <View className='ititle'>研发工时:
+                  <Input type='digit' className='input' placeholder='请输入工时' style={{ textAlign: "center" }} />小时&nbsp;
+                  <Text style={{ color: "red" }}>注:工时可含1个小数点</Text>
                 </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 className='item'>
+                <View className='ititle'>研发阶段:
+                  <Picker mode='selector' range={this.state.selector} onChange={this.onChange}>
+                    <View className='picker'>
+                      {!!this.state.selectorChecked ? this.state.selectorChecked : "请选择"}
                     </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',
-                  })
-                }}>
-                  点击前往申请公出
+                  </Picker>
                 </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 className='items'>
+                <View className='ititles'>研发记录:
+                  <Textarea style='background:#fff;width:66%;min-height:70px;border:1px solid #8e8d8d;padding:10px' autoHeight />
                 </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>
+
+              <View className='items'>
+                <View className='ititles'>上传附件:</View>
+                <View>
+                  <Text className='text'>注:包括研发日志、实验报告、实验记录、检测报告、会议纪要、会议照片等</Text>
                 </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>
 
+              <View className='content'>
                 <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();
-                        }
-                      }
-                    })
-                  }}
+                  onClick={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'
+                    boxShadow: '1px 1px 15px 1px #acb8ad',
+                    background: '#009DD9',
                   }}>
-                  <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 className='punchClockTitle'>打卡</View>
                 </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>
-        }
+          </Skeleton>
+        </View>
+
       </View>
     )
   }

+ 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}

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

@@ -8,7 +8,7 @@ const customInterceptor = (chain) => {
 
   return chain.proceed(requestParams).then(res => {
     // console.log(res.statusCode, 'proceed', res)
-    console.log(res.statusCode, res.data.code, "---", res.data.code === 401)
+    // console.log(res.statusCode, res.data.code, "---", res.data.code === 401)
     // 只要请求成功,不管返回什么状态码,都走这个回调
     if (res.statusCode === HTTP_STATUS.NOT_FOUND) {
       Taro.setStorageSync("token", "");

+ 13 - 2
src/utils/servers/servers.js

@@ -2,7 +2,7 @@
 import HTTPREQUEST from "./http"
 import Taro from "@tarojs/taro";
 
-//登录
+// 登录
 export const login = (res) => {
   return new Promise(async (resolve, reject) => {
     Taro.showLoading({
@@ -13,7 +13,6 @@ export const login = (res) => {
         username: res.username,
         password: res.password,
       });
-      console.log("---", msg)
       if (msg.data.code == 200) {
         Taro.setStorageSync('token', msg.data.token);
         Taro.hideLoading();
@@ -33,6 +32,11 @@ export const login = (res) => {
   })
 }
 
+// 获取用户信息
+export const getInfo = (postData = {}) => {
+  return HTTPREQUEST.get('/getInfo', postData)
+}
+
 // 存储openId
 export const setOpenId = (postData = {}) => {
   return HTTPREQUEST.get('/system/weChat/getOpenId', postData)
@@ -43,6 +47,13 @@ export const getProjectList = (postData = {}) => {
   return HTTPREQUEST.get('/api/project/list', postData)
 }
 
+// 新增项目
+export const projectAdd = (postData = {}) => {
+  return HTTPREQUEST.get('/api/project/add', postData)
+}
+
+
+
 
 // 查询客户订单
 export const getOrderByUid = (postData = {}) => {