dev01 1 year ago
parent
commit
48c024da46

+ 19 - 10
src/app.config.js

@@ -1,38 +1,47 @@
 export default {
   pages: [
+
     'pages/mybusiness/index', // 我的公出
     'pages/login/index',// 登录
-    'pages/applyReimbursement/index',// 申请报销
-    'pages/accountFrom/index', // 添加报销数据
+    'pages/applyreimbursement/index',// 申请报销
+    'pages/accountfrom/index', // 添加报销数据
     'pages/drafts/index', // 报销提交
-    'pages/dataindex/index', // 数据索引
+    'pages/dataindex/index', // 订单数据索引
     'pages/draftsdetail/index', // 报销详情
+    'pages/debitnote/index', // 借支单列表
     'pages/recordlist/index', // 报销记录
+    'pages/examine/index', // 审核
     'pages/myinfo/index', // 我的账户
   ],
   tabBar: {
     list: [
       {
-        iconPath: './image/my.png',
-        selectedIconPath: './image/myselect.png',
+        iconPath: './image/list.png',
+        selectedIconPath: './image/listSelect.png',
         pagePath: 'pages/mybusiness/index',
         text: '列表'
       },
       {
         iconPath: './image/egressUnSelect.png',
-        selectedIconPath: './image/egressUnSelect.png',
-        pagePath: 'pages/applyReimbursement/index',
+        selectedIconPath: './image/egressSelect.png',
+        pagePath: 'pages/applyreimbursement/index',
         text: '申请报销'
       },
       {
-        iconPath: './image/my.png',
-        selectedIconPath: './image/myselect.png',
+        iconPath: './image/record.png',
+        selectedIconPath: './image/recordSelect.png',
         pagePath: 'pages/recordlist/index',
         text: '报销记录'
       },
       {
+        iconPath: './image/examineUnSelect.png',
+        selectedIconPath: './image/examineSelect.png',
+        pagePath: 'pages/examine/index',
+        text: '审核'
+      },
+      {
         iconPath: './image/my.png',
-        selectedIconPath: './image/myselect.png',
+        selectedIconPath: './image/mySelect.png',
         pagePath: 'pages/myinfo/index',
         text: '我的'
       },

+ 48 - 28
src/components/common/auditModal/index.jsx

@@ -1,9 +1,9 @@
 import React, { Component } from "react";
 import { AtModal, AtModalAction, AtModalContent, AtIcon } from "taro-ui";
-import { Button, Image, View } from "@tarojs/components";
+import { Button, Image, View, Text } from "@tarojs/components";
 import Taro from "@tarojs/taro";
 import './index.less';
-import { getAudit } from '../../../utils/servers/servers';
+import { getAccountLog } from '../../../utils/servers/servers';
 import "taro-ui/dist/style/components/icon.scss";
 
 class AuditDetails extends Component {
@@ -11,37 +11,27 @@ class AuditDetails extends Component {
     super(props);
     this.state = {
       list: [],
-      status: 1,
-      processStatus: 1,
     }
-    this.selAudit = this.selAudit.bind(this);
+    this.selLog = this.selLog.bind(this);
   }
 
   componentDidMount() {
-    this.selAudit();
+    this.selLog();
   }
 
-  selAudit() {
+  selLog() {
     Taro.showLoading({
       title: '加载中...'
     })
-    getAudit({
+    getAccountLog({
       eaid: this.props.id
     }).then(v => {
       Taro.hideLoading();
       if (v.error.length === 0) {
-        let obj = v.data
         this.setState({
-          list: [
-            { key: 1, title: "", name: obj.yxy },
-            { key: 2, title: "", name: obj.yxjl },
-            { key: 3, title: "", name: obj.yxgly },
-            { key: 4, title: "", name: obj.cwzy },
-            { key: 5, title: "", name: obj.boss },
-          ],
-          status: obj.status,
-          processStatus: obj.processStatus,
+          list: v.data || []
         })
+        this.isHere(v.data || [])
       } else {
         Taro.showToast({ title: v.error[0].message, icon: 'none' })
       }
@@ -51,8 +41,19 @@ class AuditDetails extends Component {
     })
   }
 
+  isHere(list = []) {
+    for (var i = 0; i < list.length; i++) {
+      if (!list[i].id) {
+        this.setState({
+          processStatus: list[i].processStatus
+        })
+        return
+      }
+    }
+  }
+
   render() {
-    const { list, status, processStatus } = this.state
+    const { list, processStatus } = this.state
     return (
       <AtModal
         width="90%"
@@ -62,27 +63,46 @@ class AuditDetails extends Component {
         <AtModalContent>
           <View className='historicalClock'>
             {
-              this.state.list?.map(v => (
+              this.state.list?.map((v, n) => (
                 <View key={v.key} className='item'>
                   <View className='head'>
                     <View className='spot'
-                      style={{ background: v.key == status ? "#6190E8" : "#999999" }}
-                    >{v.key}</View>
-                    <View className='clockTime'>{v.name}</View>
+                      style={{
+                        borderColor: processStatus == v.processStatus
+                          ? "#6190E8" : !v.remarks
+                            ? "#999999" : "#6190E8",
+                        color: processStatus == v.processStatus
+                          ? "#fff" : !v.remarks
+                            ? "#999999" : "#6190E8",
+                        background: processStatus == v.processStatus && "#6190E8",
+                      }}
+                    >{!!v.remarks ? "✓" : n + 1}</View>
+                    <View className='clockTime'
+                      style={{ color: processStatus == v.processStatus && "black", }}
+                    >
+                      {/* <AtIcon className='atIcon' value='user' size='15' color='#999999' /> */}
+                      {v.auditorName}
+                    </View>
                   </View>
                   <View className='clockContent'>
                     <View className='verticalLine'
                       style={{
-                        visibility: list.length != v.key
+                        visibility: list.length != (n + 1)
                           ? "visible"
                           : "hidden"
                       }}
                     />
                     <View className='rightContent'>
-                      <View className='contentItem'>
-                        <AtIcon className='atIcon' value='user' size='15' color='#999999' />
-                        操作人:{v.name}
-                      </View>
+                      {v.remarks &&
+                        <View className='contentItem'>
+                          <AtIcon className='atIcon' value='clock' size='15' color='#999999' />
+                          操作时间:{v.createTimeStr}
+                        </View>}
+                      {v.remarks &&
+                        <View className='contentItem'>
+                          <AtIcon className='atIcon' value='message' size='15' color='#999999' />
+                          备注:{v.remarks}
+                        </View>}
                     </View>
                   </View>
                 </View>

+ 11 - 6
src/components/common/auditModal/index.less

@@ -11,9 +11,10 @@
       .spot{
         width: 40px;
         height: 40px;
-        border-radius: 30px;
-        background: #999999;
-        color: #fff;
+        border-radius: 40px;
+        // background: #999999;
+        border: 1px solid #999999;
+        color: #999999;
         margin-right: 20px;
         display: flex;
         align-items: center;
@@ -21,21 +22,25 @@
 
       }
       .clockTime{
-        font-size: 25px;
+        font-size: 26px;
+
       }
     }
     .clockContent{
+      min-height: 50px;
       display: flex;
       flex-flow: row nowrap;
+
       .verticalLine{
         border: 2px #cbcaca solid;
-        margin-right: 30px;
+        margin-right: 40px;
         margin-left: 20px;
       }
+
       .rightContent{
         padding-bottom: 20px;
         .contentItem{
-          font-size: 23px;
+          font-size: 24px;
           .atIcon{
             margin-right: 5px;
           }

+ 43 - 43
src/components/common/imagePicker/index.jsx

@@ -1,7 +1,7 @@
-import React,{Component} from "react";
+import React, { Component } from "react";
 import Taro from '@tarojs/taro';
-import {Text, View} from "@tarojs/components";
-import {AtImagePicker,AtToast } from "taro-ui";
+import { Text, View } from "@tarojs/components";
+import { AtImagePicker, AtToast } from "taro-ui";
 
 import './index.less';
 
@@ -12,58 +12,58 @@ import 'taro-ui/dist/style/components/icon.scss';
 
 import getBaseUrl from "../../../utils/servers/baseUrl";
 
-class ImagePicker extends Component{
+class ImagePicker extends Component {
   constructor(props) {
     super(props);
-    this.state={
+    this.state = {
       files: props.files || [],
-      speedProgress:0,
-      loading:false
+      speedProgress: 0,
+      loading: false
     }
     this.onImgChange = this.onImgChange.bind(this);
     this.onFail = this.onFail.bind(this);
     this.onImageClick = this.onImageClick.bind(this);
   }
 
-  onImgChange(files, operationType, index, type){
+  onImgChange(files, operationType, index, type) {
     const BASE_URL = getBaseUrl(this.props.url);
     let token = Taro.getStorageSync('token');
     let _this = this;
-    if(operationType === 'remove'){
+    if (operationType === 'remove') {
       let filesArr = files.concat([]);
-      this.props.onChange(index,'remove');
+      this.props.onChange(index, 'remove');
       this.setState({
-        files:filesArr
+        files: filesArr
       })
-    }else{
+    } else {
       let fileArr = this.state.files.concat([]);
-      let arr = type === 'camera' ? files : files.splice(fileArr.length,files.length - fileArr.length)
+      let arr = type === 'camera' ? files : files.splice(fileArr.length, files.length - fileArr.length)
       this.setState({
-        loading:true
+        loading: true
       })
-      for(let i = 0;i<arr.length;i++){
+      for (let i = 0; i < arr.length; i++) {
         const uploadTask = Taro.uploadFile({
           url: BASE_URL + this.props.url, //仅为示例,非真实的接口地址
           filePath: arr[i].url,
           name: 'file',
           header: {
-            'Accept':'application/json, text/javascript,',
+            'Accept': 'application/json, text/javascript,',
             'content-type': 'application/x-www-form-urlencoded; charset=UTF-8',
             'token': token
           },
-          success: function (res){
+          success: function (res) {
             let dataJson = JSON.parse(res.data)
-            if(dataJson.error.length === 0){
-              _this.props.onChange(dataJson.data,'add');
+            if (dataJson.error.length === 0) {
+              _this.props.onChange(dataJson.data, 'add');
               _this.state.files.push(arr[i]);
               _this.setState({
-                files:_this.state.files
+                files: _this.state.files
               })
-            }else{
-              Taro.showToast({title:dataJson.error[0].message,icon:'none'})
-              if(dataJson.error[0].field === '403'){
+            } else {
+              Taro.showToast({ title: dataJson.error[0].message, icon: 'none' })
+              if (dataJson.error[0].field === '403') {
                 _this.setState({
-                  loading:false
+                  loading: false
                 })
                 Taro.reLaunch({
                   url: '/pages/login/index'
@@ -71,30 +71,30 @@ class ImagePicker extends Component{
               }
             }
           },
-          fail: function (err){
+          fail: function (err) {
             //console.log(err);
-            Taro.showToast({title:'系统错误,请稍后重试',icon:'none'});
+            Taro.showToast({ title: '系统错误,请稍后重试', icon: 'none' });
           },
-          complete: function(v){
+          complete: function (v) {
             //console.log(v)
           }
         })
         uploadTask.progress((res) => {
-          if(res.progress === 100){
-            let num = this.state.speedProgress+1;
-            let speed = num/arr.length*100;
+          if (res.progress === 100) {
+            let num = this.state.speedProgress + 1;
+            let speed = num / arr.length * 100;
             //console.log(num,arr.length)
             //console.log(num/arr.length)
             this.setState({
-              speedProgress:num,
-            },()=>{
-              if(speed === 100){
-                setTimeout(()=>{
+              speedProgress: num,
+            }, () => {
+              if (speed === 100) {
+                setTimeout(() => {
                   _this.setState({
-                    speedProgress:0,
-                    loading:false
+                    speedProgress: 0,
+                    loading: false
                   })
-                },1200)
+                }, 1200)
               }
             })
           }
@@ -105,12 +105,12 @@ class ImagePicker extends Component{
       }
     }
   }
-  onFail(){
+  onFail() {
 
   }
-  onImageClick(index){
+  onImageClick(index) {
     let arr = [];
-    for(let i of this.state.files){
+    for (let i of this.state.files) {
       arr.push(i.url)
     }
     Taro.previewImage({
@@ -118,9 +118,9 @@ class ImagePicker extends Component{
       urls: arr // 需要预览的图片http链接列表
     })
   }
-  clear(){
+  clear() {
     this.setState({
-      files:[]
+      files: []
     })
   }
 
@@ -136,7 +136,7 @@ class ImagePicker extends Component{
           onFail={this.onFail}
           onImageClick={this.onImageClick}
         />
-        <AtToast isOpened={this.state.loading} text="图片上传中" status='loading'/>
+        <AtToast isOpened={this.state.loading} text="图片上传中" status='loading' />
       </>
     )
   }

BIN
src/image/egressSelect.png


BIN
src/image/egressUnSelect.png


BIN
src/image/examineSelect.png


BIN
src/image/examineUnSelect.png


BIN
src/image/list.png


BIN
src/image/listSelect.png


BIN
src/image/my.png


BIN
src/image/myselect.png


BIN
src/image/punchClockSelect.png


BIN
src/image/punchClockUnSelect.png


BIN
src/image/record.png


BIN
src/image/recordSelect.png


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

@@ -269,7 +269,7 @@ class AccountFrom extends Component {
           <AtInput
             name='amount'
             title={type == 4 ? "借支金额:" : "金额:"}
-            type='number'
+            type='text'
             placeholder='请填写金额(元)'
             value={data.amount}
             onChange={e => {

+ 4 - 3
src/pages/applyReimbursement/index.less

@@ -4,12 +4,12 @@
   .rtit {
     color: #000;
     font-size: 32px;
-    margin: 90px auto;
+    margin: 60px auto;
     text-align: center;
   }
 
   .rlist {
-    width: 60%;
+    width: 80%;
     margin: 0 auto;
 
     .at-radio__title {
@@ -17,7 +17,8 @@
     }
 
     .rlbuttom {
-      margin-top: 40px;
+      width: 50%;
+      margin: 40px auto 0;
     }
   }
 }

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

@@ -0,0 +1,3 @@
+export default {
+  navigationBarTitleText: '选择借支订单',
+}

+ 94 - 0
src/pages/debitnote/index.jsx

@@ -0,0 +1,94 @@
+import React, { Component } from "react";
+import Taro, { getCurrentInstance } from "@tarojs/taro";
+import { View, Text, Button, Image } from "@tarojs/components";
+import { AtListItem, AtIcon } from "taro-ui";
+import { getDepartmentList, getOrderByUid, getDrbitNote } from "../../utils/servers/servers";
+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 noData from '../../image/noData.png';
+import './index.less';
+
+class DebitNote extends Component {
+  $instance = getCurrentInstance();
+
+  constructor(props) {
+    super(props);
+    this.state = {
+      list: [],
+      listVisible: false,
+    };
+    this.getList = this.getList.bind(this);
+  }
+
+  componentDidMount() {
+    this.getList()
+  }
+
+
+  getList() {
+    getDrbitNote({
+      depId: this.$instance.router.params.depId,
+    }).then((msg) => {
+      if (msg.error.length === 0) {
+        this.setState({
+          list: msg.data,
+        });
+      } else {
+        Taro.showToast({ title: msg.error[0].message, icon: "none" });
+      }
+    }).catch(() => {
+
+    });
+  }
+
+
+  render() {
+    const { list } = this.state
+    return (
+      <View className="debitnote">
+        {list.length == 0 ?
+          <View className='noData'>
+            <Image src={noData} className='noDataImg' />
+            <View className='noDataTitle'>您暂时没有能使用的借支单</View>
+          </View> :
+          <View className="dlist">
+            {/* v.orderNo + v.totalAmount */}
+            {
+              list?.map((v, k) => (
+                <View className="dlitem" key={k}>
+                  {/* <View className="tit">{v.userNames}</View> */}
+                  <View className="txt">
+                    {/* {v.orderNo} */}
+                    <Text className="num">{v.totalAmount}元</Text>
+                  </View>
+                  <Button
+                    className="bt"
+                    type='primary'
+                    size="mini"
+                    disabled={v.liquidationStatus == 2 || v.liquidationStatus == 3}
+                    onClick={() => {
+                      let pages = Taro.getCurrentPages();
+                      let prevPage = pages[pages.length - 2];
+                      prevPage.setData({
+                        debitId: v.id,
+                        totalAmount: v.totalAmount,
+                      });
+                      Taro.navigateBack({
+                        delta: 1
+                      })
+                    }}
+                  >{(v.liquidationStatus == 2 || v.liquidationStatus == 3) ? "已抵消" : "选择"}</Button>
+                </View>
+              ))
+            }
+          </View>}
+      </View>
+    );
+  }
+}
+
+export default DebitNote;

+ 63 - 0
src/pages/debitnote/index.less

@@ -0,0 +1,63 @@
+.debitnote {
+
+  .noData {
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    flex-flow: column nowrap;
+    padding-top: 100px;
+
+    .noDataImg {
+      width: 200px;
+      height: 200px;
+    }
+
+    .noDataTitle {
+      color: #969696;
+      padding-top: 20px;
+    }
+  }
+
+  .dlist {
+    width: 94%;
+    display: flex;
+    flex-direction: column;
+    padding: 0 3%;
+
+    .dlitem {
+      padding: 20px 10px;
+      border-bottom: 1px solid #d6e4ef;
+      display: flex;
+      flex-direction: column;
+      justify-content: center;
+      position: relative;
+      min-height: 65px;
+
+      .tit {
+        font-size: 34px;
+        margin-bottom: 10px;
+
+      }
+
+      .txt {
+        font-size: 28px;
+        color: #999999;
+
+        .num{
+          color: red;
+          font-size: 28px;
+          margin-left: 40px;
+          
+        }
+
+      }
+
+      .bt {
+        position: absolute;
+        right: 0;
+      }
+
+    }
+
+  }
+}

+ 96 - 37
src/pages/drafts/index.jsx

@@ -5,7 +5,7 @@ import dayjs from "dayjs";
 import ImagePicker from "../../components/common/imagePicker";
 import InquiryModal from "../../components/common/inquiryModal";
 import AccountModal from "../../components/common/accountModal";
-import Select from "../applyReimbursement/select";
+import Select from "../applyreimbursement/select";
 import {
   AtButton,
   AtInput,
@@ -34,6 +34,7 @@ import {
   getNewOptions,
   removeNull,
 } from "../../utils/tools";
+import { resourceAddress } from "../../utils/config";
 import "taro-ui/dist/style/components/form.scss";
 import "taro-ui/dist/style/components/button.scss";
 import "taro-ui/dist/style/components/loading.scss";
@@ -55,14 +56,13 @@ class Drafts extends Component {
       visible: "",
       list: [],
       total: 0,
+      reality: 0,
       accountvisible: "",
       typeVisible: "",
       bankData: {},
       upaccount: false,
       accountsList: [],
-      attachmentUrl: [],
-      orderName: "",
-      contractNo: "",
+      isShow: false,
     };
     this.onChange = this.onChange.bind(this);
     this.getNumHourse = this.getNumHourse.bind(this);
@@ -73,7 +73,6 @@ class Drafts extends Component {
     this.$instance.router.params && this.$instance.router.params.id &&
       (
         this.getDetail(),
-        this.getAccountList(),
         this.state.data.type != 2 && this.getMyList()
       )
   }
@@ -81,11 +80,25 @@ class Drafts extends Component {
   componentDidShow() { // 对应onShow,只有在onShow中才会监听到当前页面的改变
     let pages = Taro.getCurrentPages();
     let currPage = pages[pages.length - 1]; // 获取当前页面
+    // this.setState({
+    //   orderName: currPage.data.name,
+    //   contractNo: currPage.data.contractNo,
+    //   orderNo: currPage.data.orderNo,
+    //   debitId: currPage.data.debitId,
+    //   totalAmount: currPage.data.totalAmount || 0,
+    // })
+    const { data } = this.state
+    const obj = {
+      buyerName: currPage.data.name || data.buyerName,
+      contractNo: currPage.data.contractNo || data.contractNo,
+      orderNo: currPage.data.orderNo || data.orderNo,
+      debitId: currPage.data.debitId || data.debitId,
+      debitTotalAmount: currPage.data.totalAmount || data.debitTotalAmount || 0,
+    }
     this.setState({
-      orderName: currPage.data.name,
-      contractNo: currPage.data.contractNo,
-      orderNo: currPage.data.orderNo,
+      data: { ...this.state.data, ...obj },
     })
+
     this.getAccountList();
 
   }
@@ -258,12 +271,20 @@ class Drafts extends Component {
       id: this.$instance.router.params.id,
     }).then(v => {
       if (v.error.length === 0) {
+        let list = [];
+        for (let i of (v.data.attachmentUrl || '').split(',')) {
+          if (i) {
+            list.push({ 'url': resourceAddress + i })
+          }
+        }
         this.setState({
           data: v.data,
           rangeStartMinuteVal: v.data.releaseStartStr,
           rangeEndMinuteVal: v.data.releaseEndStr,
           totalDuration: v.data.duration,
+          imgs: list,
         })
+        this.getAccountList()
       } else {
         Taro.showToast({ title: v.error[0].message, icon: 'none' })
       }
@@ -277,6 +298,7 @@ class Drafts extends Component {
 
   // 报销详情金额列表
   getAccountList() {
+    const { data } = this.state
     getAccountList({
       eaid: this.$instance.router.params.id,
     }).then(v => {
@@ -286,9 +308,11 @@ class Drafts extends Component {
           // sum += v.data[i].amount
           sum = commonAdd(sum, v.data[i].amount)
         }
+        let reality = (sum > data.debitTotalAmount) ? commonAdd(sum, -data.debitTotalAmount) : 0
         this.setState({
           list: v.data,
           total: sum,
+          reality,
         })
 
       } else {
@@ -299,6 +323,11 @@ class Drafts extends Component {
         title: '系统错误,请稍后再试',
         icon: 'none'
       })
+    }).finally(() => {
+      console.log("zzz")
+      this.setState({
+        isShow: true
+      })
     })
   }
 
@@ -324,7 +353,7 @@ class Drafts extends Component {
 
   onSubmit() {
     const { data, bankData } = this.state
-    if (data.type == 0) {
+    if (data.type == 1) {
       if (!data.userNames) {
         Taro.showToast({ title: "请填写公出客户名称", icon: "none" });
         return;
@@ -342,6 +371,10 @@ class Drafts extends Component {
         return;
       }
     }
+    if (!data.remarks) {
+      Taro.showToast({ title: "请填写报销事由", icon: "none" });
+      return;
+    }
 
     this.setState({
       loading: true,
@@ -356,7 +389,8 @@ class Drafts extends Component {
       applyDep: data.applyDep, // 申请部门
       attachmentUrl: this.state.imgs.length === 0 ? "" : this.state.imgs.join(","), // 附件
       payDep: (data.type == 4 || data.type == 5) ? undefined : data.payDep, // 支付部门(借支抵扣不需要)
-      orderNo: (data.type == 4 || data.type == 5) ? undefined : data.orderNo, // 支付部门(借支抵扣不需要)
+      orderNo: (data.type == 4 || data.type == 5) ? undefined : data.orderNo, // 订单编号(借支抵扣不需要)
+      debitId: (data.type == 4 || data.type == 5) ? undefined : data.debitId, // 预支单
       eaaid: data.type != 3 ? bankData.id : undefined, // 报销账户(第三方付款不需要)
       // 差旅费
       userNames: data.type == 1 ? data.userNames : undefined, // 公出客户名称
@@ -375,6 +409,9 @@ class Drafts extends Component {
             title: "提交成功!",
             icon: "none",
           });
+          Taro.switchTab({
+            url: "/pages/recordlist/index",
+          });
         } else {
           Taro.showToast({
             title: v.error[0].message,
@@ -443,7 +480,7 @@ class Drafts extends Component {
 
 
   render() {
-    const { data, list, total, bankData, attachmentUrl } = this.state
+    const { data, list, total, bankData, } = this.state
     const departmentArr = this.state.departmentArr || [];
     return (
       <View className="subform">
@@ -546,20 +583,21 @@ class Drafts extends Component {
             <AtIcon value="chevron-right" size="20" color="#000000" />
           </View>
         </View>
-        <View className="formItem">
-          <View className="formName">报销至订单:</View>
-          <View className="formValue" onClick={() => {
-            Taro.navigateTo({
-              url: "/pages/dataindex/index"
-            })
-          }}>
-            <View>
-              <View>{this.state.orderName}</View>
-              <View>{this.state.contractNo}</View>
+        {data.type != 4 && data.type != 5 &&
+          <View className="formItem">
+            <View className="formName">报销至订单:</View>
+            <View className="formValue" onClick={() => {
+              Taro.navigateTo({
+                url: "/pages/dataindex/index"
+              })
+            }}>
+              <View>
+                <View>{data.buyerName}</View>
+                <View>{data.contractNo}</View>
+              </View>
+              <AtIcon value="chevron-right" size="20" color="#000000" />
             </View>
-            <AtIcon value="chevron-right" size="20" color="#000000" />
-          </View>
-        </View>
+          </View>}
         <View className="formTitle">
           报销详细
         </View>
@@ -619,7 +657,8 @@ class Drafts extends Component {
                   data: { ...data, ...obj }
                 })
               }}
-              maxLength={30}
+              height={75}
+              maxLength={50}
               placeholder="请填写报销事由"
             />
           </View>
@@ -631,7 +670,7 @@ class Drafts extends Component {
               data.type == 1
                 ? this.setState({ visible: "add" })
                 : Taro.navigateTo({
-                  url: `/pages/accountFrom/index?type=${data.type}&id=${this.$instance.router.params.id}`
+                  url: `/pages/accountfrom/index?type=${data.type}&id=${this.$instance.router.params.id}`
                 })
             }}>+ 增加</Button>
         </View>
@@ -791,26 +830,45 @@ class Drafts extends Component {
             </View>
           )
         }
-        <View className="formItem">
-          <View className="formName">预借支:</View>
-          <View className="formValue"></View>
-        </View>
+        {
+          data.type != 4 && data.type != 5 &&
+          <View className="formItem">
+            <View className="formName">预借支:</View>
+            <View className="formValue"
+              onClick={() => {
+                Taro.navigateTo({
+                  url: `/pages/debitnote/index?depId=${data.applyDep}`
+                })
+              }}
+            >
+              {!data.debitId
+                ? <Button size='mini' type='primary' style={{ marginRight: 0 }}>选择借支订单</Button>
+                : <View>{`已选择${data.debitTotalAmount}元借支订单`}<AtIcon value="chevron-right" size="20" color="#000000" /></View>}
+            </View>
+          </View>
+        }
         <View className="formItem" style={{ paddingTop: "10px" }}>
           <View className="formName">总金额:</View>
           <View className="formValue"><Text style={{ color: "red" }}>{total}</Text>(元)</View>
         </View>
+        <View className="formItem" style={{ paddingTop: "10px" }}>
+          <View className="formName">实报金额:</View>
+          <View className="formValue"><Text style={{ color: "red" }}>{this.state.reality}</Text>(元)</View>
+        </View>
         <View className="formItem" style={{ display: "block", paddingBottom: 0 }}>
           <View className="formName">附件:</View>
           <View
             className="formValue"
             style={{ paddingTop: "10px", textAlign: "left" }}
           >
-            <ImagePicker
-              showAddBtn
-              ref={(ref) => (this.imagePickerRef = ref)}
-              url="/api/admin/release/upload"
-              onChange={this.onChange}
-            />
+            {this.state.isShow &&
+              <ImagePicker
+                files={this.state.imgs}
+                showAddBtn={true}
+                ref={(ref) => (this.imagePickerRef = ref)}
+                url="/api/admin/release/upload"
+                onChange={this.onChange}
+              />}
           </View>
         </View>
         <View className="tips">上传附件要求</View>
@@ -852,13 +910,14 @@ class Drafts extends Component {
           </View>}
         <View className="bottom">
           <AtButton
+            disabled={this.state.loading}
             type="primary"
             circle
             onClick={() => {
               this.onSubmit()
             }}
           >
-            提交申请
+            {data.status == 0 ? "提交申请" : data.status == 3 && "重新发起"}
           </AtButton>
         </View>
         {/* 二级确认弹窗 */}

+ 11 - 5
src/pages/drafts/index.less

@@ -13,7 +13,7 @@
     // align-items: center;
     align-items: flex-start;
     font-size: 30px;
-    padding: 15px 0;
+    padding: 10px 0;
 
     .formName {
       white-space: nowrap;
@@ -101,6 +101,12 @@
 
   }
 
+  .operation{
+    display: flex;
+    flex-flow: row nowrap;
+    margin: 30px 0;
+  }
+
   .unobstructedList {
     .noAccout {
       border: 1px solid #eae8e8;
@@ -119,9 +125,9 @@
 
   .unItem {
     position: relative;
-    border-radius: 10px;
+    border-radius: 20px;
     background: rgba(0, 51, 255, .09);
-    padding: 20px 20px 0;
+    padding: 20px;
     margin-bottom: 20px;
 
     .edit {
@@ -151,7 +157,7 @@
     .formItem {
       display: flex;
       font-size: 30px;
-      padding: 15px 0;
+      padding: 10px 0;
       align-items: baseline;
 
       .formName {
@@ -210,7 +216,7 @@
     .at-input {
       width: 100%;
       margin-left: 0;
-      padding: 15px 0;
+      padding: 10px 0;
 
       .at-input__title {
         font-size: 30px;

+ 284 - 73
src/pages/draftsdetail/index.jsx

@@ -1,11 +1,13 @@
 import React, { Component } from "react";
 import Taro, { getCurrentInstance } from "@tarojs/taro";
-import { Text, View } from "@tarojs/components";
+import { Text, View, Picker } from "@tarojs/components";
 import ImagePicker from "../../components/common/imagePicker";
+import InquiryModal from "../../components/common/inquiryModal";
 import {
   getPridDetail,
   getAccountList,
   selectList,
+  AccountExamine,
 } from "../../utils/servers/servers";
 import {
   getAccountName,
@@ -13,6 +15,7 @@ import {
   getVehicleName,
   commonAdd,
 } from "../../utils/tools";
+import { AtTextarea, AtButton } from "taro-ui";
 import { resourceAddress } from "../../utils/config";
 import "taro-ui/dist/style/components/form.scss";
 import "taro-ui/dist/style/components/button.scss";
@@ -34,6 +37,7 @@ class Drafts extends Component {
       list: [],
       total: 0,
       bankData: {},
+      reason: "",
     };
   }
 
@@ -91,7 +95,7 @@ class Drafts extends Component {
           totalDuration: v.data.duration,
           attachmentUrl: list,
         })
-        v.data.aid && this.getMyList(v.data.aid)
+        // v.data.aid && this.getMyList(v.data.aid)
       } else {
         Taro.showToast({ title: v.error[0].message, icon: 'none' })
       }
@@ -130,52 +134,87 @@ class Drafts extends Component {
     })
   }
 
+  // 审批
+  examine(val) {
+    AccountExamine({
+      id: this.state.data.id,
+      reason: this.state.reason,
+      status: val,
+    })
+      .then((v) => {
+        Taro.hideLoading();
+        if (v.error.length === 0) {
+          Taro.showToast({
+            title: "操作成功",
+            icon: "none",
+          });
+          this.getDetail()
+        } else {
+          Taro.showToast({ title: v.error[0].message, icon: "none" });
+        }
+      })
+      .catch((err) => {
+        Taro.showToast({ title: "系统错误,请稍后再试", icon: "none" });
+        // console.log(err);
+      });
+  }
+
 
   render() {
     const { data, list, total, bankData, attachmentUrl } = this.state
     return (
       <View className="subform">
-        <View className="title">{[data.typeOther, "差旅费报销", "餐费报销", "第三方付款", "申请预借支","申请抵扣"][data.type]}</View>
-        <View className="formItem">
-          <View className="formName" style={{ width: "86px" }}>公出企业:</View>
-          <View className="formValues">{data.userNames}</View>
-        </View>
-        <View className="formItem">
-          <View className="formName" style={{ width: "86px" }}>公出地点:</View>
-          <View className="formValues">{data.districtName}</View>
-        </View>
-        <View className="formItem">
-          <View className="formName">公出时间:</View>
-          <View className="formValue">
-            <View
-              className="time"
-              onClick={() => {
-                this.setState({
-                  isPickerRender: true,
-                });
-              }}
-            >
-              <View className="timeContent">
-                <View style={{ textAlign: "center" }}>{this.state.rangeStartMinuteVal}</View>
-                &nbsp;&nbsp;至&nbsp;&nbsp;
-                <View style={{ textAlign: "center" }}>{this.state.rangeEndMinuteVal}</View>
+        <View className="title">{getAccountName(data.type, data.typeOther)}</View>
+        {data.type == 1 &&
+          <View className="formItem">
+            <View className="formName" style={{ width: "86px" }}>公出企业:</View>
+            <View className="formValues">{data.userNames}</View>
+          </View>}
+        {data.type == 1 &&
+          <View className="formItem">
+            <View className="formName" style={{ width: "86px" }}>公出地点:</View>
+            <View className="formValues">{data.districtName}</View>
+          </View>}
+        {data.type == 1 &&
+          <View className="formItem">
+            <View className="formName">公出时间:</View>
+            <View className="formValue">
+              <View
+                className="time"
+                onClick={() => {
+                  this.setState({
+                    isPickerRender: true,
+                  });
+                }}
+              >
+                <View className="timeContent">
+                  <View style={{ textAlign: "center" }}>{this.state.rangeStartMinuteVal}</View>
+                  &nbsp;&nbsp;至&nbsp;&nbsp;
+                  <View style={{ textAlign: "center" }}>{this.state.rangeEndMinuteVal}</View>
+                </View>
               </View>
-            </View>
 
-          </View>
-        </View>
-        <View className="formItem">
-          <View className="formName">公出时长:</View>
-          <View className="formValue">{this.state.totalDuration}小时</View>
-        </View>
+            </View>
+          </View>}
+        {data.type == 1 &&
+          <View className="formItem">
+            <View className="formName">公出时长:</View>
+            <View className="formValue">{this.state.totalDuration}小时</View>
+          </View>}
         <View className="formItem">
           <View className="formName">申请类型:</View>
           <View className="formValue">{getAccountName(data.type, data.typeOther)}</View>
         </View>
-        {/* <View className="formItem">
-          <View className="formName">报销至订单:</View>
-          <View className="formValue"></View>
-        </View> */}
+        {data.type != 4 && data.type != 5 &&
+          <View className="formItem">
+            <View className="formName">报销至订单:</View>
+            <View className="formValue">
+              <View>
+                <View>{data.buyerName}</View>
+                <View>{data.contractNo}</View>
+              </View>
+            </View>
+          </View>}
         <View className="formTitle">
           报销详细
         </View>
@@ -183,53 +222,135 @@ class Drafts extends Component {
           <View className="formName">申请人:</View>
           <View className="formValue">{data.aname}</View>
         </View>
-        <View className="formItem">
-          <View className="formName">报销公司:</View>
-          <View className="formValue">{data.appDepName}</View>
-        </View>
+        {
+          data.type != 4 && data.type != 5 &&
+          <View className="formItem">
+            <View className="formName">报销公司:</View>
+            <View className="formValue">{data.appDepName}</View>
+          </View>
+        }
         <View className="formItem">
           <View className="formName">支付公司:</View>
           <View className="formValue">{data.payDepName}</View>
         </View>
+        <View className="formItem">
+          <View className="formName">报销事由:</View>
+          <View className="formValue">{data.remarks}</View>
+        </View>
         <View className="formTitle">
           报销费用详细
         </View>
-        {list?.map(item =>
-          item.type == 1
-            ? <View className="unItem" key={item.id}>
+        {/* 差旅费显示 */}
+        {data.type == 1 &&
+          list?.map(item =>
+            item.type == 1
+              ? <View className="unItem" key={item.id}>
+                <View className="formItem">
+                  <View className="formName">交通工具:</View>
+                  <View className="formValue">{getVehicleName(item.vehicle, item.vehicleOther)}</View>
+                </View>
+                <View className="formItem">
+                  <View className="formName">时间:</View>
+                  <View className="formValue">
+                    <View className="ftxt">{item.startTimeStr}</View>
+                    &nbsp;&nbsp;至&nbsp;&nbsp;
+                    <View className="ftxt">{item.endTimeStr}</View>
+                  </View>
+                </View>
+                <View className="formItem">
+                  <View className="formName">地点:</View>
+                  <View className="formValue">
+                    <View className="ftxt">{item.startDistrict}</View>
+                    &nbsp;&nbsp;至&nbsp;&nbsp;
+                    <View className="ftxt">{item.endDistrict}</View>
+                  </View>
+                </View>
+                <View className="formItem">
+                  <View className="formName">金额(元):</View>
+                  <View className="formValue">{item.amount}(元)</View>
+                </View>
+              </View>
+              : <View className="formItem" key={item.id}>
+                <View className="formName" style={{ width: "86px" }}>{getTypeName(item.type) + ":"}</View>
+                <View className="formValues">{item.amount}(元)</View>
+              </View>
+          )
+        }
+        {/* 通用 */}
+        {(data.type == 0 || data.type == 2 || data.type == 4 || data.type == 5) &&
+          list?.map(item =>
+            <View className="unItem" key={item.id}>
               <View className="formItem">
-                <View className="formName">交通工具:</View>
-                <View className="formValue">{getVehicleName(item.vehicle, item.vehicleOther)}</View>
+                <View className="formName">需付款时间:</View>
+                <View className="formValue">{item.agreeTimeStr.slice(0, 10)}</View>
               </View>
               <View className="formItem">
-                <View className="formName">时间:</View>
-                <View className="formValue">
-                  <View className="ftxt">{item.startTimeStr}</View>
-                  &nbsp;&nbsp;至&nbsp;&nbsp;
-                  <View className="ftxt">{item.endTimeStr}</View>
-                </View>
+                <View className="formName">金额(元):</View>
+                <View className="formValue">{item.amount}(元)</View>
               </View>
+            </View>
+          )
+        }
+        {/* 第三方付款 */}
+        {data.type == 3 &&
+          list?.map(item =>
+            <View className="unItem" key={item.id}>
               <View className="formItem">
-                <View className="formName">地点:</View>
-                <View className="formValue">
-                  <View className="ftxt">{item.startDistrict}</View>
-                  &nbsp;&nbsp;至&nbsp;&nbsp;
-                  <View className="ftxt">{item.endDistrict}</View>
-                </View>
+                <View className="formName">需付款时间:</View>
+                <View className="formValue">{item.agreeTimeStr.slice(0, 10)}</View>
               </View>
               <View className="formItem">
-                <View className="formName">金额:</View>
-                <View className="formValue">{item.amount}(元)</View>
+                <View className="formName">付款方式:</View>
+                <View className="formValue">{["公对公转账"][item.payType]}</View>
+              </View>
+              <View className="formItem">
+                <View className="formName">发票类型:</View>
+                <View className="formValue">{["普票", "专票"][item.invoiceType]}</View>
+              </View>
+              <View className="formItem">
+                <View className="formName">发票号:</View>
+                <View className="formValue">{item.invoiceNo}</View>
+              </View>
+              <View className="formItem">
+                <View className="formName">付款单位:</View>
+                <View className="formValue">{item.payerName}</View>
+              </View>
+              <View className="formItem">
+                <View className="formName">开户银行:</View>
+                <View className="formValue">{item.openBank}</View>
+              </View>
+              <View className="formItem">
+                <View className="formName">银行账户:</View>
+                <View className="formValue">{item.bankAccounts}</View>
+              </View>
+              <View className="formItem">
+                <View className="formName">开户行地址:</View>
+                <View className="formValue">{item.openBankAddress}</View>
+              </View>
+              <View className="formItem">
+                <View className="formName">金额(元):</View>
+                <View className="formValue">{item.amount}</View>
               </View>
             </View>
-            : <View className="formItem" key={item.id}>
-              <View className="formName" style={{ width: "86px" }}>{getTypeName(item.type) + ":"}</View>
-              <View className="formValues">{item.amount}(元)</View>
-            </View>)}
-        <View className="formItem" style={{ paddingTop: "10px" }}>
+          )
+        }
+        {
+          data.type != 4 && data.type != 5 && data.debitTotalAmount &&
+          <View className="formItem">
+            <View className="formName">预借支:</View>
+            <View className="formValue"><Text style={{ color: "red" }}>{data.debitTotalAmount}</Text>(元)</View>
+          </View>
+        }
+        <View className="formItem">
           <View className="formName">总金额:</View>
           <View className="formValue"><Text style={{ color: "red" }}>{total}</Text>(元)</View>
         </View>
+        <View className="formItem">
+          <View className="formName">实报金额:</View>
+          <View className="formValue"><Text style={{ color: "red" }}>
+            {(total > data.debitTotalAmount) ? commonAdd(total, data.debitTotalAmount) : 0}
+          </Text>(元)</View>
+        </View>
         <View className="formItem" style={{ display: "block", paddingBottom: 0 }}>
           <View className="formName">附件:</View>
           <View
@@ -238,28 +359,118 @@ class Drafts extends Component {
           >
             {attachmentUrl && attachmentUrl.length > 0 &&
               <ImagePicker
-                files={attachmentUrl}
+                files={attachmentUrl || []}
                 showAddBtn={false}
               />}
           </View>
         </View>
-        <View className="formTitle" style={{ marginTop: "20px" }}>
-          报销收款账户
-        </View>
-        {data.type != 2 &&
+        {data.type != 3 &&
+          <View className="formTitle" style={{ marginTop: "20px" }}>
+            报销至收款账户
+          </View>}
+        {data.type != 3 &&
           <View className="unobstructedList">
             {<View className="unItem" >
               <View className="formItem">
-                <View className="formName">收款人:{bankData.name}</View>
+                <View className="formName">收款人:{data.name}</View>
               </View>
               <View className="formItem">
-                <View className="formName">收款银行:{bankData.bank}</View>
+                <View className="formName">收款银行:{data.bank}</View>
               </View>
               <View className="formItem">
-                <View className="formName">收款账户:{bankData.accounts}</View>
+                <View className="formName">收款账户:{data.accounts}</View>
               </View>
             </View>}
           </View>}
+
+        {
+          data.examine == 1 &&
+          <View>
+            <View className="formTitle" style={{ marginTop: "20px" }}>
+              填写审批意见
+            </View>
+            <AtTextarea
+              value={this.state.reason}
+              onChange={(value) => {
+                this.setState({
+                  reason: value,
+                });
+              }}
+              maxLength={30}
+              placeholder="请填写审批意见"
+            />
+            <View className="operation">
+              <AtButton
+                type="secondary"
+                circle
+                loading={this.state.loading}
+                onClick={() => {
+                  if (!this.state.reason) {
+                    Taro.showToast({ title: "请先填写审批意见", icon: "none" });
+                    return;
+                  }
+                  this.setState({
+                    isInquiryOpened: true,
+                    inquiryTitle: "提醒",
+                    inquiryContent: "您确定要驳回此申请吗?",
+                    inquiryFn: () => {
+                      this.examine(3);
+                    },
+                  });
+                }}
+              >
+                驳回
+              </AtButton>
+              <AtButton
+                type="primary"
+                loading={this.state.loading}
+                circle
+                onClick={() => {
+                  if (!this.state.reason) {
+                    Taro.showToast({ title: "请先填写审批意见", icon: "none" });
+                    return;
+                  }
+                  this.setState({
+                    isInquiryOpened: true,
+                    inquiryTitle: "提醒",
+                    inquiryContent: "您确定要同意此申请吗?",
+                    inquiryFn: () => {
+                      this.examine(1);
+                    },
+                  });
+                }}
+              >
+                同意
+              </AtButton>
+            </View>
+          </View>
+        }
+
+        {/* 二级确认弹窗 */}
+        <InquiryModal
+          isOpened={this.state.isInquiryOpened}
+          title={this.state.inquiryTitle}
+          content={this.state.inquiryContent}
+          onClose={() => {
+            this.setState({
+              isInquiryOpened: false,
+              inquiryTitle: "",
+              inquiryContent: "",
+              isNo: true,
+            });
+          }}
+          onDetermine={() => {
+            this.state.inquiryFn();
+            this.setState({
+              isInquiryOpened: false,
+              inquiryTitle: "",
+              inquiryContent: "",
+              isNo: true,
+              inquiryFn: () => { },
+            });
+          }}
+        />
+
       </View>
     );
   }

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

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

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

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

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

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

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

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

+ 2 - 7
src/pages/mybusiness/index.jsx

@@ -10,7 +10,7 @@ import {
   AtIcon,
 } from 'taro-ui';
 import { clockState } from '../../utils/tools/config';
-
+import { removeNull } from '../../utils/tools';
 import './index.less';
 import 'taro-ui/dist/style/components/tabs.scss';
 import "taro-ui/dist/style/components/flex.scss";
@@ -111,12 +111,7 @@ class MyBusiness extends Component {
       clockIn: this.state.clockInStarts || undefined,
       userName: this.state.searchValue || undefined,
     }
-    for (let i in data) {
-      if (!data[i]) {
-        delete data[i]
-      }
-    }
-    let msg = await getPublicReleaseList(data);
+    let msg = await getPublicReleaseList(removeNull(data));
     if (msg.error.length === 0) {
       if (msg.data.totalCount === 0) {
         this.setState({

+ 8 - 9
src/pages/recordlist/index.jsx

@@ -4,7 +4,7 @@ import { View, Picker, ScrollView, } from '@tarojs/components'
 import { getRecordList, } from '../../utils/servers/servers';
 import dayjs from 'dayjs';
 import { AtIcon, } from 'taro-ui';
-import { getAccountName } from '../../utils/tools';
+import { getAccountName, removeNull } from '../../utils/tools';
 import { accountLtate, } from '../../utils/tools/config'
 import ListBottomStart from "../../components/common/listBottomStart";
 import AuditModal from "../../components/common/auditModal";
@@ -30,6 +30,9 @@ class Examine extends Component {
   }
 
   componentDidShow() {
+    this.setState({
+      visible: false,
+    })
     this.getPublicReleaseList();
   }
 
@@ -86,13 +89,9 @@ class Examine extends Component {
       startTime: this.state.rangeStartMinuteVal || undefined,
       endTime: this.state.rangeEndMinuteVal || undefined,
       status: isNaN(parseInt(this.state.starts.id)) ? undefined : String(this.state.starts.id),
+      processStatus: 0,
     }
-    for (let i in data) {
-      if (!data[i]) {
-        delete data[i]
-      }
-    }
-    let msg = await getRecordList(data);
+    let msg = await getRecordList(removeNull(data));
     if (msg.error.length === 0) {
       if (msg.data.totalCount === 0) {
         this.setState({
@@ -232,7 +231,7 @@ class Examine extends Component {
             list?.map((item) =>
               <View className='item' key={item.id}
                 onClick={() => {
-                  item.status == 0 ?
+                  (item.status == 0 || item.status == 3) ?
                     Taro.navigateTo({
                       url: '/pages/drafts/index?id=' + item.id
                     }) :
@@ -247,7 +246,7 @@ class Examine extends Component {
                 <View className='line'>报销类型:{getAccountName(item.type, item.typeOther)}</View>
                 <View className='lines'
                   style={{ color: accountLtate[item.status].color }}
-                >{accountLtate[item.status].title}</View>
+                >{item.status == 1 && `[${item.examineName}]`}{accountLtate[item.status].title}</View>
               </View>
             )
           }

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

@@ -113,8 +113,8 @@ export const getRecordList = (postData = {}) => {
 }
 
 // 报销审核流程
-export const getAudit = (postData = {}) => {
-  return HTTPREQUEST.get('/api/admin/expenseAccount/examineLog', postData)
+export const getAccountLog = (postData = {}) => {
+  return HTTPREQUEST.get('/api/admin/expenseAccount/log/list', postData)
 }
 
 // 报销详情金额列表
@@ -142,3 +142,7 @@ export const getDrbitNote = (postData = {}) => {
   return HTTPREQUEST.get('/api/admin/expenseAccount/selectDebitOrder', postData)
 }
 
+// 报销审核
+export const AccountExamine = (postData = {}) => {
+  return HTTPREQUEST.post('/api/admin/expenseAccount/examine', postData)
+}

+ 6 - 6
src/utils/tools/config.js

@@ -63,12 +63,12 @@ export const clockJournalState = [
 
 
 export const accountList = [
-  { label: '差旅费', value: 1, },
-  { label: '非业务报销', value: 2, },
-  { label: '第三方付款', value: 3, },
-  { label: '申请借支', value: 4 },
-  { label: '申请抵扣', value: 5 },
-  { label: '其他', value: 0, }
+  { label: '差旅费', value: 1, desc: '公出产生的交通费、住宿费等' },
+  { label: '非业务报销', value: 2, desc: '房租、物业水电费、网络费、话费、顺丰月结、打印费、办公物料、装修费、固定资产等' },
+  { label: '第三方付款', value: 3, desc: '向第三方公司支付、招投标费用等' },
+  { label: '申请借支', value: 4, desc: '提前预支付费用' },
+  { label: '申请抵扣', value: 5, desc: '返还费用抵扣' },
+  { label: '其他', value: 0,desc: '自行填写' }
 ]
 
 export const accountLtate = [