dev01 1 yıl önce
ebeveyn
işleme
f5f1889a48

BIN
src/image/dui.png


BIN
src/image/ok.png


BIN
src/image/passed.png


BIN
src/image/rejected.png


BIN
src/image/reviewed.png


BIN
src/image/revoke.png


BIN
src/image/revokeWhite.png


BIN
src/image/un.png


BIN
src/image/wx.png


+ 24 - 15
src/pages/detail/index.jsx

@@ -19,6 +19,8 @@ import InquiryModal from "../../components/common/inquiryModal";
 import ImagePicker from "../../components/common/imagePicker";
 import HistoricalClock from '../../components/historicalClock';
 import { resourceAddress } from "../../utils/config";
+import Un from "../../image/un.png";
+import Ok from "../../image/ok.png";
 import "../mybusiness/index";
 import './index.less'
 
@@ -40,7 +42,7 @@ class Detail extends Component {
     this.getReleasetDails();
   }
 
-  componentDidShow(){
+  componentDidShow() {
     this.getReleasetDails();
   }
 
@@ -130,34 +132,50 @@ class Detail extends Component {
                 // 我的打卡
                 this.$instance.router.params.type == 0 &&
                 <View className="infor">
+                  {data.processStatus == 1 && <Image className="statusicon" src={Un} />}
+                  {data.processStatus == 2 && <Image className="statusicon" src={Ok} />}
                   <View className="title">
                     <View className="aname">
                       {data.projectName}
                     </View>
                   </View>
+                  <View className="userName" style={{ margin: "20px 0" }}>
+                    <View className="uNtext">
+                      当前审核状态:
+                      <Text style={{ color: ["#000000", "#dbc037", "#6eb173", "red"][data.processStatus] }}>
+                        {["", "待审核", "审核通过", "审核驳回"][data.processStatus]}
+                      </Text>
+                      <Text className="logbt" onClick={() => { this.setState({ historicalIsOpened: true }) }}>查看审核日志</Text>
+                    </View>
+                  </View>
                   <View className="userName">
                     <View className="uNtext">
-                      打卡工时:{data.duration}
+                      打卡时间:{data.createTime}
                     </View>
                   </View>
                   <View className="userName">
                     <View className="uNtext">
-                      打卡时间:{data.recordTime}
+                      打卡人员:{data.name}
+                    </View>
+                  </View>
+                  <View className="userName" style={{ marginTop: 10 }}>
+                    <View className="uNtext">
+                      研发时间:{data.recordTime}
                     </View>
                   </View>
                   <View className="userName">
                     <View className="uNtext">
-                      操作人:{data.name}
+                      研发工时:{data.duration}
                     </View>
                   </View>
                   <View className="userName">
                     <View className="uNtext">
-                      操作时间:{data.createTime}
+                      研发阶段:{["调研阶段"][data.projectStatus]}
                     </View>
                   </View>
                   <View className="userName">
                     <View className="uNtext">
-                      备注:{data.content}
+                      研发记录:{data.content}
                     </View>
                   </View>
                   <View className="userName">
@@ -170,15 +188,6 @@ class Detail extends Component {
                         />}
                     </View>
                   </View>
-                  <View className="userName">
-                    <View className="uNtext">
-                      审核状态:
-                      <Text style={{ color: ["#000000", "#dbc037", "#6eb173", "red"][data.processStatus] }}>
-                        {["", "待审核", "审核通过", "审核驳回"][data.processStatus]}
-                      </Text>
-                      <Text className="logbt" onClick={() => { this.setState({ historicalIsOpened: true }) }}>查看审核日志</Text>
-                    </View>
-                  </View>
                   {
                     data.processStatus == 3 &&
                     <View className="option">

+ 11 - 3
src/pages/detail/index.less

@@ -1,14 +1,22 @@
-.at-image-picker__remove-btn{
+.at-image-picker__remove-btn {
   display: none;
 }
 
-.logbt{
+.logbt {
   margin-left: 30px;
   text-decoration: underline;
   color: #4e6ef2;
 }
 
-.option{
+.option {
   width: 50%;
   margin: 50px auto;
+}
+
+.statusicon {
+  position: absolute;
+  right: 0;
+  top: 100px;
+  width: 222px;
+  height: 197px;
 }

+ 2 - 1
src/pages/login/index.jsx

@@ -180,7 +180,8 @@ class Login extends Component {
         Taro.setStorageSync('userInfor', msg.user);
         Taro.setStorageSync('roles', msg.roles);
         Taro.switchTab({
-          url: '/pages/project/index',
+          // url: '/pages/project/index',
+          url: '/pages/punchClock/index',
         })
 
       } else {

+ 0 - 1
src/pages/mybusiness/myList.jsx

@@ -4,7 +4,6 @@ import { View, Image, Button } from "@tarojs/components";
 import Skeleton from "taro-skeleton";
 import { getClockState } from "../../utils/tools";
 import ListBottomStart from "../../components/common/listBottomStart";
-import RevokeWhite from "../../image/revokeWhite.png";
 import "./index.less";
 
 class MyList extends Component {

+ 0 - 1
src/pages/project/myList.jsx

@@ -4,7 +4,6 @@ import { View, Image, Button } from "@tarojs/components";
 import Skeleton from "taro-skeleton";
 import { getClockState } from "../../utils/tools";
 import ListBottomStart from "../../components/common/listBottomStart";
-import RevokeWhite from "../../image/revokeWhite.png";
 import "./index.less";
 
 class MyList extends Component {

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

@@ -413,4 +413,28 @@
   border-radius: 100px;
   background: #D7D7D7;
 
+}
+
+.tips{
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  padding: 30px 0;
+
+  .img{
+    width: 140px;
+    height: 140px;
+    margin-bottom: 40px;
+  }
+
+  .tit{
+    font-size: 34px;
+    font-weight: bold;
+    margin-bottom: 10px;
+  }
+
+  .txt{
+    font-size: 24px;
+  }
+
 }

+ 48 - 17
src/pages/punchClock/punchClocks.jsx

@@ -1,9 +1,9 @@
 import React, { Component } from 'react'
 import { connect } from 'react-redux'
-import { Input, Textarea, View, Text, Picker, Button } from '@tarojs/components'
+import { Input, Textarea, View, Text, Picker, Button, Image } from '@tarojs/components'
 import Taro from '@tarojs/taro';
 import {
-  AtButton, AtList, AtListItem
+  AtButton, AtModal, AtModalContent, AtModalAction
 } from "taro-ui";
 import dayjs from 'dayjs';
 import Skeleton from 'taro-skeleton'
@@ -11,6 +11,7 @@ import HistoricalClock from '../../components/historicalClock';
 import ImagePicker from '../../components/common/imagePicker';
 import { add, minus, asyncAdd } from '../../actions/counter'
 import { recordAdd, myDuration, getInfo, } from '../../utils/servers/servers';
+import Select from "../../image/dui.png";
 import './index.less';
 import 'taro-ui/dist/style/components/noticebar.scss';
 import 'taro-ui/dist/style/components/icon.scss';
@@ -44,15 +45,17 @@ class PunchClocks extends Component {
       selectorChecked: {},
       remark: "",
       data: {},
+      isOpened: false,
+      clockId: "",
     }
     this.onChange = this.onChange.bind(this);
     this.publicReleaseClockIn = this.publicReleaseClockIn.bind(this);
+    this.onClose = this.onClose.bind(this);
   }
 
 
   componentDidMount() {
     this.imagePickerRef && this.imagePickerRef.clear();
-    // this.getMyDuration();
     this.getInfo()
   }
 
@@ -61,13 +64,6 @@ class PunchClocks extends Component {
 
     })
   }
-
-  getMyDuration() {
-    myDuration().then(v => {
-
-    })
-  }
-
   componentWillMount() {
     Taro.eventCenter.on('GoPunchIn', (arg) => {
       this.setState({
@@ -119,6 +115,10 @@ class PunchClocks extends Component {
       Taro.hideLoading()
       if (v.code === 200) {
         Taro.showToast({ title: '打卡成功', icon: 'none' });
+        this.setState({
+          clockId: v.data.id,
+          isOpened: true,
+        })
       } else {
         Taro.showToast({ title: v.msg, icon: 'none' })
       }
@@ -143,6 +143,18 @@ class PunchClocks extends Component {
     });
   }
 
+  onClose() {
+    const { clockId } = this.state
+    this.setState({
+      isOpened: false
+    })
+    if (!!clockId) {
+      Taro.navigateTo({
+        url: `/pages/detail/index?id=${clockId}&type=0`
+      })
+    }
+  }
+
   render() {
     const { data } = this.state;
     return (
@@ -194,7 +206,7 @@ class PunchClocks extends Component {
                   </View>
 
                   <View className='item'>
-                    <View className='ititle'>研发时间:
+                    <View className='ititle'><Text style={{ color: "red", width: "7px" }}>*</Text>研发时间:
                       <Picker mode='date'
                         onChange={e => {
                           this.setState({
@@ -209,7 +221,7 @@ class PunchClocks extends Component {
                   </View>
 
                   <View className='items'>
-                    <View className='ititle'>研发工时:
+                    <View className='ititle'><Text style={{ color: "red", width: "7px" }}>*</Text>研发工时:
                       <Input value={this.state.duration} type='digit' className='input' placeholder='请输入'
                         style={{ textAlign: "center", background: "#D7D7D7", borderRadius: "10px", }}
                         // border: "1px solid #d6e4ef",
@@ -224,7 +236,7 @@ class PunchClocks extends Component {
                   </View>
 
                   <View className='item'>
-                    <View className='ititle'>研发阶段:
+                    <View className='ititle'><Text style={{ color: "red", width: "7px" }}>*</Text>研发阶段:
                       <Picker mode='selector' range={this.state.selector} rangeKey="lable"
                         onChange={e => {
                           this.setState({
@@ -239,7 +251,7 @@ class PunchClocks extends Component {
                   </View>
 
                   <View className='items'>
-                    <View className='ititles'>研发记录:
+                    <View className='ititles'><Text style={{ width: "7px" }}></Text>研发记录:
                       <Textarea
                         value={this.state.remark}
                         placeholder="请填写研发过程记录"
@@ -260,7 +272,7 @@ class PunchClocks extends Component {
                       onChange={this.onChange}
                     /> */}
                   <View className='items'>
-                    <View className='ititles'>上传附件:</View>
+                    <View className='ititles'><Text style={{ width: "7px" }}></Text>上传附件:</View>
                     <ImagePicker
                       showAddBtn
                       ref={(ref) => (this.imagePickerRef = ref)}
@@ -285,9 +297,28 @@ class PunchClocks extends Component {
                 </View>
             }
           </Skeleton>
-        </View>
+        </View >
+
+        <AtModal
+          width="90%"
+          isOpened={this.state.isOpened}
+        // onClose={this.props.onClose}
+        // onCancel={this.props.onClose}
+        >
+          <AtModalContent>
+            <View className='tips'>
+              <Image src={Select} className="img" />
+              <View className="tit">成功打卡</View>
+              <View className="txt">您的研发打卡,已经确定</View>
+              <View className="txt">请注意查看打卡审核情况!</View>
+            </View>
+          </AtModalContent>
+          <AtModalAction>
+            <Button onClick={this.onClose}>确定</Button>
+          </AtModalAction>
+        </AtModal>
 
-      </View>
+      </View >
     )
   }
 }

+ 5 - 5
src/pages/reclockin/index.jsx

@@ -164,7 +164,7 @@ class ReClockin extends Component {
               </View>
 
               <View className='item'>
-                <View className='ititle'>研发时间:
+                <View className='ititle'><Text style={{ color: "red", width: "7px" }}>*</Text>研发时间:
                   <Picker mode='date'
                     onChange={e => {
                       console.log("===", e.detail.value)
@@ -180,7 +180,7 @@ class ReClockin extends Component {
               </View>
 
               <View className='items'>
-                <View className='ititle'>研发工时:
+                <View className='ititle'><Text style={{ color: "red", width: "7px" }}>*</Text>研发工时:
                   <Input value={this.state.duration} type='digit' className='input' placeholder='请输入'
                     style={{ textAlign: "center", border: "1px solid #d6e4ef", background: "#D7D7D7", borderRadius: "10px", }}
                     onInput={e => {
@@ -194,7 +194,7 @@ class ReClockin extends Component {
               </View>
 
               <View className='item'>
-                <View className='ititle'>研发阶段:
+                <View className='ititle'><Text style={{ color: "red", width: "7px" }}>*</Text>研发阶段:
                   <Picker mode='selector' range={this.state.selector} rangeKey="lable"
                     onChange={e => {
                       this.setState({
@@ -209,7 +209,7 @@ class ReClockin extends Component {
               </View>
 
               <View className='items'>
-                <View className='ititles'>研发记录:
+                <View className='ititles'><Text style={{ width: "7px" }}></Text>研发记录:
                   <Textarea
                     value={this.state.content}
                     style='background:#D7D7D7;width:66%;min-height:70px;border:1px solid #d6e4ef;padding:10px;border-radius: 10px' autoHeight
@@ -222,7 +222,7 @@ class ReClockin extends Component {
                 </View>
               </View>
               <View className='items'>
-                <View className='ititles'>上传附件:</View>
+                <View className='ititles'><Text style={{ width: "7px" }}></Text>上传附件:</View>
                 {this.state.isOpened > 0 &&
                   <ImagePicker
                     showAddBtn