dev01 1 year ago
parent
commit
5b8e05b05c

+ 3 - 2
src/components/common/auditModal/index.jsx

@@ -81,7 +81,8 @@ class AuditDetails extends Component {
                       style={{ color: processStatus == v.processStatus && !v.id && "black", }}
                     >
                       {v.auditorName}
-
+                          
+                      {processStatus == v.processStatus && !v.id && <Text style={{ color: "#FFA500" }}>审核中...</Text>}
                     </View>
                   </View>
                   <View className='clockContent'>
@@ -96,7 +97,7 @@ class AuditDetails extends Component {
                       {v.remarks &&
                         <View className='contentItem'>
                           <AtIcon className='atIcon' value='settings' size='15' color='#999999' />
-                          操作:<Text style={{ color: ["#1D4FEA", "#1D4FEA", "#34DE38", "#F31212", "#1D4FEA"][v.status] }}
+                          操作:<Text style={{ color: ["#1D4FEA", "#1D4FEA", "#34DE38", "red", "#1D4FEA"][v.status] }}
                           >{["【发起】", "【发起】", "【通过】", "【驳回】", "【重新发起】"][v.status]}</Text>
                         </View>}
                       {v.remarks &&

+ 0 - 120
src/components/historicalClock/index.jsx

@@ -1,120 +0,0 @@
-import React, { Component } from "react";
-import { AtModal, AtModalAction, AtModalContent, AtIcon } from "taro-ui";
-import { Button, Image, View } from "@tarojs/components";
-import Taro from "@tarojs/taro";
-
-import './index.less';
-
-import { getListPublicReleaseLog } from '../../utils/servers/servers';
-
-import "taro-ui/dist/style/components/icon.scss";
-import { getClockState } from "../../utils/tools";
-import ImagePicker from "../common/imagePicker";
-import { resourceAddress } from "../../utils/config";
-
-class HistoricalClock extends Component {
-  constructor(props) {
-    super(props);
-    this.state = {
-      publicReleaseLog: []
-    }
-    this.getListPublicReleaseLog = this.getListPublicReleaseLog.bind(this);
-  }
-
-  componentDidMount() {
-    this.getListPublicReleaseLog();
-  }
-
-  getListPublicReleaseLog() {
-    Taro.showLoading({
-      title: '加载中...'
-    })
-    getListPublicReleaseLog({
-      id: this.props.id
-    }).then(v => {
-      Taro.hideLoading();
-      if (v.error.length === 0) {
-        for (let d of v.data) {
-          let list = [];
-          for (let i of (d.photoUrl || '').split(',')) {
-            if (i) {
-              list.push({ 'url': resourceAddress + i })
-            }
-          }
-          d.photoUrl = list;
-        }
-        this.setState({
-          publicReleaseLog: v.data,
-        })
-      } else {
-        Taro.showToast({ title: v.error[0].message, icon: 'none' })
-      }
-    }).catch(err => {
-      Taro.hideLoading();
-      Taro.showToast({ title: '系统错误.请稍后重试', icon: 'none' })
-      //console.log(err)
-    })
-  }
-
-  render() {
-    return (
-      <AtModal
-        width="90%"
-        isOpened={this.props.isOpened}
-        onClose={this.props.onClose}
-        onCancel={this.props.onClose}>
-        <AtModalContent>
-          <View className='historicalClock'>
-            {
-              this.state.publicReleaseLog.map((v, k) => (
-                <View key={k} className='item'>
-                  <View className='head'>
-                    <View className='spot' />
-                    <View className='clockTime' style={{
-                      color: getClockState(v.status, true).color
-                    }}>
-                      {getClockState(v.status, true).title}
-                    </View>
-                  </View>
-                  <View className='clockContent'>
-                    <View className='verticalLine' style={{
-                      visibility: this.state.publicReleaseLog[k + 1] ? 'visible' : 'hidden'
-                    }} />
-                    <View className='rightContent' style={{
-                      paddingBottom: this.state.publicReleaseLog[k + 1] ? '30px' : 0
-                    }}>
-                      <View className='contentItem'>
-                        <AtIcon className='atIcon' value='user' size='15' color='#999999' />
-                        操作人:{v.aname}
-                      </View>
-                      <View className='contentItem'>
-                        <AtIcon className='atIcon' value='clock' size='15' color='#999999' />
-                        操作时间:{v.createTimes}
-                      </View>
-                      {v.remarks ? <View className='contentItem'>
-                        <AtIcon className='atIcon' value='message' size='15' color='#999999' />
-                        备注:{v.remarks}
-                      </View> : null}
-                      {v.photoUrl.length !== 0 ? <View className='contentItem'>
-                        <AtIcon className='atIcon' value='file-generic' size='15' color='#999999' />
-                        附件:
-                        <ImagePicker
-                          files={v.photoUrl || []}
-                          showAddBtn={false} />
-                      </View> : null}
-                    </View>
-                  </View>
-                </View>
-              ))
-            }
-          </View>
-        </AtModalContent>
-        <AtModalAction>
-          <Button onClick={this.props.onClose}>确定</Button>
-        </AtModalAction>
-      </AtModal>
-    )
-  }
-}
-
-export default HistoricalClock;

+ 0 - 45
src/components/historicalClock/index.less

@@ -1,45 +0,0 @@
-.historicalClock{
-  padding: 15px;
-  .item{
-    color: #999999;
-    padding-bottom: 15px;
-    .head{
-      display: flex;
-      flex-flow: row nowrap;
-      align-content: center;
-      padding-bottom: 15px;
-      .spot{
-        width: 30px;
-        height: 30px;
-        border-radius: 30px;
-        background: #999999;
-        margin-right: 20px;
-      }
-      .clockTime{
-        font-size: 23px;
-      }
-    }
-    .clockContent{
-      display: flex;
-      flex-flow: row nowrap;
-      .verticalLine{
-        border: 2px #cbcaca solid;
-        margin-right: 30px;
-        margin-left: 15px;
-      }
-      .rightContent{
-        padding-top: 15px;
-        .contentItem{
-          font-size: 23px;
-          padding-bottom: 25px;
-          .atIcon{
-            margin-right: 5px;
-          }
-        }
-      }
-    }
-  }
-  .at-image-picker__remove-btn{
-    display: none;
-  }
-}

BIN
src/image/bg.jpeg


+ 8 - 7
src/pages/debitnote/index.jsx

@@ -1,8 +1,8 @@
 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 { getDrbitNote } from "../../utils/servers/servers";
+import { commonAdd } from "../../utils/tools"
 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";
@@ -56,14 +56,15 @@ class DebitNote extends Component {
             <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 className="num">{commonAdd(v.totalAmount, -v.settlementAmount)}元</View>
+                    <View className="info">
+                      总金额:{v.totalAmount}元,
+                      已使用:{v.settlementAmount}元
+                    </View>
                   </View>
                   <Button
                     className="bt"
@@ -75,7 +76,7 @@ class DebitNote extends Component {
                       let prevPage = pages[pages.length - 2];
                       prevPage.setData({
                         debitId: v.id,
-                        totalAmount: v.totalAmount,
+                        totalAmount: commonAdd(v.totalAmount, -v.settlementAmount),
                       });
                       Taro.navigateBack({
                         delta: 1

+ 4 - 1
src/pages/debitnote/index.less

@@ -46,10 +46,13 @@
         .num{
           color: red;
           font-size: 28px;
-          margin-left: 40px;
           
         }
 
+        .info{
+          font-size: 24px;
+        }
+
       }
 
       .bt {

+ 7 - 13
src/pages/drafts/index.jsx

@@ -80,13 +80,6 @@ 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,
@@ -324,7 +317,6 @@ class Drafts extends Component {
         icon: 'none'
       })
     }).finally(() => {
-      console.log("zzz")
       this.setState({
         isShow: true
       })
@@ -350,7 +342,7 @@ class Drafts extends Component {
     })
   }
 
-
+  // 提交申请
   onSubmit() {
     const { data, bankData } = this.state
     if (data.type == 1) {
@@ -390,8 +382,8 @@ class Drafts extends Component {
       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, // 订单编号(借支抵扣不需要)
-      debitId: (data.type == 4 || data.type == 5) ? undefined : data.debitId, // 预支单
-      eaaid: data.type != 3 ? bankData.id : undefined, // 报销账户(第三方付款不需要)
+      debitId: data.type == 4 ? undefined : data.debitId, // 预支单
+      eaaid: data.type == 3 ? undefined : bankData.id, // 报销账户(第三方付款不需要)
       // 差旅费
       userNames: data.type == 1 ? data.userNames : undefined, // 公出客户名称
       districtName: data.type == 1 ? data.districtName : undefined, // 公出地点
@@ -831,7 +823,7 @@ class Drafts extends Component {
           )
         }
         {
-          data.type != 4 && data.type != 5 &&
+          data.type != 4 &&
           <View className="formItem">
             <View className="formName">预借支:</View>
             <View className="formValue"
@@ -843,7 +835,9 @@ class Drafts extends Component {
             >
               {!data.debitId
                 ? <Button size='mini' type='primary' style={{ marginRight: 0 }}>选择借支订单</Button>
-                : <View>{`已选择${data.debitTotalAmount}元借支订单`}<AtIcon value="chevron-right" size="20" color="#000000" /></View>}
+                : <View>已选择<Text style={{ color: "red" }}>{data.debitTotalAmount}</Text>元借支订单
+                  <AtIcon value="chevron-right" size="20" color="#000000" />
+                </View>}
             </View>
           </View>
         }

+ 2 - 3
src/pages/draftsdetail/index.jsx

@@ -155,7 +155,6 @@ class Drafts extends Component {
       })
       .catch((err) => {
         Taro.showToast({ title: "系统错误,请稍后再试", icon: "none" });
-        // console.log(err);
       });
   }
 
@@ -335,7 +334,7 @@ class Drafts extends Component {
           )
         }
         {
-          data.type != 4 && data.type != 5 && data.debitTotalAmount &&
+          data.type != 4 && data.debitTotalAmount &&
           <View className="formItem">
             <View className="formName">预借支:</View>
             <View className="formValue"><Text style={{ color: "red" }}>{data.debitTotalAmount}</Text>(元)</View>
@@ -348,7 +347,7 @@ class Drafts extends Component {
         <View className="formItem">
           <View className="formName">实报金额:</View>
           <View className="formValue"><Text style={{ color: "red" }}>
-            {(total > data.debitTotalAmount) ? commonAdd(total, data.debitTotalAmount) : 0}
+            {(total > data.debitTotalAmount) ? commonAdd(total, -data.debitTotalAmount) : 0}
           </Text>(元)</View>
         </View>
         <View className="formItem" style={{ display: "block", paddingBottom: 0 }}>

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

@@ -10,7 +10,7 @@ import { AtButton, AtIcon, AtModal } from 'taro-ui'
 
 import NavBar from '../../components/common/NavBar';
 
-import BG from '../../image/bg.jpg';
+import BG from '../../image/bg.jpeg';
 
 import 'taro-ui/dist/style/components/button.scss';
 import 'taro-ui/dist/style/components/loading.scss';