dev01 1 år sedan
förälder
incheckning
6adcb9e6dd

+ 1 - 1
src/app.config.js

@@ -21,7 +21,7 @@ export default {
         iconPath: './image/list.png',
         selectedIconPath: './image/listSelect.png',
         pagePath: 'pages/mybusiness/index',
-        text: '列表'
+        text: '公出'
       },
       {
         iconPath: './image/egressUnSelect.png',

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

@@ -97,8 +97,8 @@ class AuditDetails extends Component {
                       {v.remarks &&
                         <View className='contentItem'>
                           <AtIcon className='atIcon' value='settings' size='15' color='#999999' />
-                          操作:<Text style={{ color: ["#1D4FEA", "#34DE38", "#108EE9", "red", "#1D4FEA"][v.status] }}
-                          >{["【发起】", "【通过】", "【完成】", "【驳回】", "【重新发起】"][v.status]}</Text>
+                          操作:<Text style={{ color: ["#1D4FEA", "#34DE38", "#108EE9", "red", "#808080", "#1D4FEA"][v.status] }}
+                          >{["【发起】", "【通过】", "【完成】", "【驳回】", "【撤销】", "【修改】"][v.status]}</Text>
                         </View>}
                       {v.remarks &&
                         <View className='contentItem'>

+ 15 - 3
src/pages/applyReimbursement/index.jsx

@@ -129,6 +129,11 @@ class applyReimbursement extends Component {
                       title: '请填写其他明细',
                       icon: 'none'
                     })
+                  } else if (type == 0 && other.length > 10) {
+                    Taro.showToast({
+                      title: '不能超过10个字符',
+                      icon: 'none'
+                    })
                   } else {
                     this.creatOrder()
                   }
@@ -140,7 +145,8 @@ class applyReimbursement extends Component {
           </View>
         </View>
 
-        {(type == 2) && popup &&
+        {
+          (type == 2) && popup &&
           <AtModal
             isOpened={(type == 2) && popup}
             closeOnClickOverlay={false}
@@ -179,6 +185,11 @@ class applyReimbursement extends Component {
                     title: '请填写其他明细',
                     icon: 'none'
                   })
+                } else if (noType == 0 && others.length > 10) {
+                  Taro.showToast({
+                    title: '不能超过10个字符',
+                    icon: 'none'
+                  })
                 } else {
                   this.setState({
                     popup: false
@@ -186,8 +197,9 @@ class applyReimbursement extends Component {
                 }
               }}>确定</Button>
             </AtModalAction>
-          </AtModal>}
-      </View>
+          </AtModal>
+        }
+      </View >
     );
   }
 }

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

@@ -157,6 +157,11 @@ class Select extends Component {
                           title: '请填写其他明细',
                           icon: 'none'
                         })
+                      } else if (noType == 0 && others.length > 10) {
+                        Taro.showToast({
+                          title: '不能超过10个字符',
+                          icon: 'none'
+                        })
                       } else {
                         this.setState({
                           popup: false
@@ -180,6 +185,11 @@ class Select extends Component {
                 title: '请填写其他明细',
                 icon: 'none'
               })
+            } else if (type == 0 && other.length > 10) {
+              Taro.showToast({
+                title: '不能超过10个字符',
+                icon: 'none'
+              })
             } else {
               noPost
                 ? this.creatOrder()

+ 29 - 5
src/pages/drafts/index.jsx

@@ -326,7 +326,7 @@ class Drafts extends Component {
         let sum = 0
         for (var i = 0; i < v.data.length; i++) {
           // sum += v.data[i].amount
-          sum = commonAdd(sum, v.data[i].amount)
+          sum = commonAdd(sum, v.data[i].realAmount)
         }
         let amount = data.debitTotalAmount
         let reality = (sum > amount) ? commonAdd(sum, -amount) : 0
@@ -805,6 +805,30 @@ class Drafts extends Component {
             }}>+ 增加</Button>
         </View>
         {
+          data.publicReleaseType != null &&
+          <View className="formItem">
+            <View className="formName">报销来源:</View>
+            <View className="formValue">
+              {["业务公出", "技术公出", "行政公出", "技术协单", "技术助手"][data.publicReleaseType]}
+            </View>
+          </View>
+        }
+
+        <View className="formItem">
+          <View className="formName">报销至订单:</View>
+          <View className="formValue"
+            onClick={() => {
+              Taro.navigateTo({
+                url: "/pages/dataindex/index"
+              })
+            }}>
+            <View>
+              <View>{data.contractNo}</View>
+            </View>
+            <AtIcon value="chevron-right" size="20" color="#000000" />
+          </View>
+        </View>
+        {
           this.state.visible != "" &&
           <NewModal
             eaid={this.$instance.router.params.id}
@@ -854,7 +878,7 @@ class Drafts extends Component {
                 </View>
                 <View className="formItem">
                   <View className="formName">金额:</View>
-                  <View className="formValue">{item.amount}(元)</View>
+                  <View className="formValue">{item.realAmount}(元)</View>
                 </View>
               </View>
               : <View className="inputFormItems" key={item.id}>
@@ -867,7 +891,7 @@ class Drafts extends Component {
                 /> */}
                 <View className="formItem">
                   <View className="formName">{getTypeName(item.type, item.typeOther) + ":"}</View>
-                  <View className="formValue">{item.amount}(元)</View>
+                  <View className="formValue">{item.realAmount}(元)</View>
                 </View>
                 <View className="close"
                   onClick={() => {
@@ -912,7 +936,7 @@ class Drafts extends Component {
                     ? "预借支金额:" : data.type == 5
                       ? "抵扣金额:" : "金额:"}
                 </View>
-                <View className="formValue">{item.amount}(元)</View>
+                <View className="formValue">{item.realAmount}(元)</View>
               </View>
             </View>
           )
@@ -970,7 +994,7 @@ class Drafts extends Component {
               </View>
               <View className="formItem">
                 <View className="formName">金额(元):</View>
-                <View className="formValue">{item.amount}</View>
+                <View className="formValue">{item.realAmount}</View>
               </View>
             </View>
           )

+ 4 - 4
src/pages/draftsdetail/index.jsx

@@ -202,12 +202,12 @@ class Drafts extends Component {
                 </View>
                 <View className="formItem">
                   <View className="formName">金额:</View>
-                  <View className="formValue">{item.amount}(元)</View>
+                  <View className="formValue">{item.realAmount}(元)</View>
                 </View>
               </View>
               : <View className="formItem" key={item.id}>
                 <View className="formName" >{getTypeName(item.type) + ":"}</View>
-                <View className="formValue">{item.amount}(元)</View>
+                <View className="formValue">{item.realAmount}(元)</View>
               </View>
           )
         }
@@ -226,7 +226,7 @@ class Drafts extends Component {
                     ? "预借支金额:" : data.type == 5
                       ? "抵扣金额:" : "金额:"}
                 </View>
-                <View className="formValue">{item.amount}(元)</View>
+                <View className="formValue">{item.realAmount}(元)</View>
               </View>
             </View>
           )
@@ -270,7 +270,7 @@ class Drafts extends Component {
               </View>
               <View className="formItem">
                 <View className="formName">金额:</View>
-                <View className="formValue">{item.amount}(元)</View>
+                <View className="formValue">{item.realAmount}(元)</View>
               </View>
             </View>
           )

+ 6 - 4
src/pages/examine/index.jsx

@@ -1,6 +1,6 @@
 import React, { Component } from 'react';
 import Taro from '@tarojs/taro';
-import { View, Picker, ScrollView, } from '@tarojs/components'
+import { View, Text, Picker, ScrollView, } from '@tarojs/components'
 import { AtTabs, AtTabsPane, AtIcon, AtSearchBar } from 'taro-ui';
 import { getRecordList, getNewRecordList } from '../../utils/servers/servers';
 import dayjs from 'dayjs';
@@ -227,10 +227,12 @@ class Examine extends Component {
                         {
                           item.sonList?.map((it) =>
                             <View key={it.id} style={{ marginTop: 10 }}>
-                              <View className='line'>报销金额(元):{it.amount}</View>
+                              <View className='line'>报销金额(元):{it.realAmount}</View>
                               <View className='line'>报销类型:
-                                {getAccountName(it.type, it.typeOther)}
-                                {it.type == 2 && (" - " + getSecondaryAccountName(it.secondaryType, it.secondaryTypeOther))}
+                                <Text style={{ color: !!it.prid && "red" }}>
+                                  {getAccountName(it.type, it.typeOther)}
+                                  {it.type == 2 && (" - " + getSecondaryAccountName(it.secondaryType, it.secondaryTypeOther))}
+                                </Text>
                               </View>
                               {it.type == 1 && <View className='line'>公出企业:{it.userNames}</View>}
                               <View className='line'>{it.type == 1 ? "公出时间" : "费用时间"}:

+ 113 - 15
src/pages/mergedetail/index.jsx

@@ -1,6 +1,6 @@
 import React, { Component } from "react";
 import Taro, { getCurrentInstance } from "@tarojs/taro";
-import { Text, View, Picker, Button, Image } from "@tarojs/components";
+import { Text, View, Picker, Button, Image, RadioGroup, Radio, Label } from "@tarojs/components";
 import ImagePicker from "../../components/common/imagePicker";
 import InquiryModal from "../../components/common/inquiryModal";
 import AuditModal from "../../components/common/auditModal";
@@ -13,6 +13,7 @@ import {
   getMainExpenseDetail,
   getDepartmentList,
   subMainAccount,
+  getDepInfo,
 } from "../../utils/servers/servers";
 import {
   getAccountName,
@@ -63,6 +64,7 @@ class Drafts extends Component {
       accountsList: [],
       reason: "",
       visible: false,
+      info: {},
     };
   }
 
@@ -70,7 +72,8 @@ class Drafts extends Component {
     this.getDepartmentList()
     this.$instance.router.params && this.$instance.router.params.id &&
       (
-        this.getDetail()
+        this.getDetail(),
+        this.getConfig()
         // this.getAccountList(),
         // this.getMyList()
       )
@@ -178,6 +181,26 @@ class Drafts extends Component {
     })
   }
 
+  // 配置信息
+  getConfig() {
+    getDepInfo({
+      id: this.$instance.router.params.id,
+    }).then(v => {
+      if (v.error.length === 0) {
+        this.setState({
+          info: v.data,
+        })
+      } else {
+        Taro.showToast({ title: v.error[0].message, icon: 'none' })
+      }
+    }).catch(() => {
+      Taro.showToast({
+        title: '系统错误,请稍后再试',
+        icon: 'none'
+      })
+    })
+  }
+
   getUrls(url) {
     let list = [];
     for (let i of (url || '').split(',')) {
@@ -218,11 +241,18 @@ class Drafts extends Component {
   // 审批
   examine(val) {
     Taro.showLoading({ title: '处理中...' });
-    AccountExamine({
+    let obj1 = {
       id: this.state.data.id,
       reason: this.state.reason,
       status: val,
-    })
+    }
+    let obj2 = {
+      id: this.state.data.id,
+      reason: this.state.reason,
+      status: val,
+      approval: this.state.approval,
+    }
+    AccountExamine((this.state.data.processStatus == 3 && this.state.info.viceCeoExamine == 1 && val == 1) ? obj2 : obj1)
       .then((v) => {
         Taro.hideLoading();
         if (v.error.length === 0) {
@@ -248,9 +278,18 @@ class Drafts extends Component {
       loading: true,
     });
     const { data } = this.state
+    if (val == 1) {
+      if (!data.eaaid) {
+        Taro.showToast({
+          title: "请先填写报销账户",
+          icon: "none",
+        });
+        return
+      }
+    }
     let comData = {
       id: data.id,
-      orderNo: data.orderNo,
+      // orderNo: data.orderNo,
       applyDep: data.applyDep,
       payDep: data.payDep,
       eaaid: data.eaaid,
@@ -344,7 +383,8 @@ class Drafts extends Component {
           <View className="formName" >总金额:</View>
           <View className="formValue">{data.totalAmount}元</View>
         </View> */}
-        <View className="formItem">
+
+        {/* <View className="formItem">
           <View className="formName">报销至订单:</View>
           <View className="formValue"
             onClick={() => {
@@ -358,7 +398,8 @@ class Drafts extends Component {
             </View>
             {isEdit && <AtIcon value="chevron-right" size="20" color="#000000" />}
           </View>
-        </View>
+        </View> */}
+
         <View className="formItem">
           <View className="formName">报销时间:</View>
           <View className="formValue">{data.createTimeStr}</View>
@@ -446,7 +487,7 @@ class Drafts extends Component {
             <View key={it.id} style={{ borderTop: "1px solid #eae8e8" }}>
               <View className="formItem" style={{ fontWeight: "bold" }}>
                 <View className="formName">报销金额:</View>
-                <View className="formValue">{it.amount}(元)</View>
+                <View className="formValue">{it.realAmount}(元)</View>
               </View>
               <View className="formItem" style={{ fontWeight: "bold" }}>
                 <View className="formName">报销类型:</View>
@@ -455,6 +496,17 @@ class Drafts extends Component {
                   {it.type == 2 && (" - " + getSecondaryAccountName(it.secondaryType, it.secondaryTypeOther))}
                 </View>
               </View>
+              {
+                it.publicReleaseType != null &&
+                <View className="formItem" style={{ fontWeight: "bold" }}>
+                  <View className="formName">报销来源:</View>
+                  <View className="formValue"> {["业务公出", "技术公出", "行政公出", "技术协单", "技术助手"][it.publicReleaseType]}</View>
+                </View>
+              }
+              <View className="formItem" style={{ fontWeight: "bold" }}>
+                <View className="formName">{!!it.contractNo ? "报销至订单:" : "报销至部门"}</View>
+                <View className="formValue">{it.contractNo}</View>
+              </View>
               {it.type == 1 &&
                 <View className="formItem">
                   <View className="formName">公出企业:</View>
@@ -476,14 +528,14 @@ class Drafts extends Component {
                         <View className="formValue">
                           {getVehicleName(item.vehicle, item.vehicleOther)}
                           ({item.startDistrict + " - " + item.endDistrict})
-                          {item.amount}(元)
+                          {item.realAmount}(元)
                         </View>
                       </View>
                     </View>
                     : <View className="unItem" key={item.id}>
                       <View className="formItem" key={item.id}>
                         <View className="formName" >{getTypeName(item.type) + ":"}</View>
-                        <View className="formValue">{item.amount}(元)</View>
+                        <View className="formValue">{item.realAmount}(元)</View>
                       </View>
                     </View>
                 )
@@ -503,7 +555,7 @@ class Drafts extends Component {
                           ? "预借支金额:" : it.type == 5
                             ? "抵扣金额:" : "金额:"}
                       </View>
-                      <View className="formValue">{item.amount}(元)</View>
+                      <View className="formValue">{item.realAmount}(元)</View>
                     </View>
                   </View>
                 )
@@ -547,7 +599,7 @@ class Drafts extends Component {
                     </View>
                     <View className="formItem">
                       <View className="formName">金额:</View>
-                      <View className="formValue">{item.amount}(元)</View>
+                      <View className="formValue">{item.realAmount}(元)</View>
                     </View>
                   </View>
                 )
@@ -594,7 +646,7 @@ class Drafts extends Component {
           data.type != 4 && data.type != 5 &&
           <View className="formItem" style={{ fontWeight: "bold" }}>
             <View className="formName">本次报销金额:</View>
-            <View className="formValue"><Text style={{ color: "red" }}>{data.amount}</Text>(元)</View>
+            <View className="formValue"><Text style={{ color: "red" }}>{data.realAmount}</Text>(元)</View>
           </View>
         }
         <View className="formTitle" style={{ marginTop: "20px" }}>
@@ -652,7 +704,7 @@ class Drafts extends Component {
         {
           data.examine == 1 &&
           <View>
-            <View className="formTitle" style={{ marginTop: "20px" }}>
+            <View className="formTitle" style={{ marginTop: "10px" }}>
               填写审批意见
             </View>
             <AtTextarea
@@ -665,6 +717,27 @@ class Drafts extends Component {
               maxLength={30}
               placeholder="请填写审批意见"
             />
+            {
+              data.processStatus == 3 && this.state.info.viceCeoExamine == 1 &&
+              <View style={{ marginTop: "20px" }}>
+                <RadioGroup
+                  onChange={e => {
+                    this.setState({
+                      approval: e.detail.value
+                    })
+                  }}
+                >
+                  {[{ value: 0, text: '不需要董事长审核', checked: false },
+                  { value: 1, text: '需要董事长审核', checked: false }].map((item, i) => {
+                    return (
+                      <Label className='radio-list__label' for={i} key={i}>
+                        <Radio className='radio-list__radio' value={item.value} checked={item.checked}>{item.text}</Radio>
+                      </Label>
+                    )
+                  })}
+                </RadioGroup>
+              </View>
+            }
             <View className="operation">
               <AtButton
                 type="secondary"
@@ -695,6 +768,9 @@ class Drafts extends Component {
                   if (!this.state.reason) {
                     Taro.showToast({ title: "请先填写审批意见", icon: "none" });
                     return;
+                  } else if (data.processStatus == 3 && this.state.info.viceCeoExamine == 1 && !this.state.approval && this.state.approval != 0) {
+                    Taro.showToast({ title: "是否需要董事长审核", icon: "none" });
+                    return;
                   }
                   this.setState({
                     isInquiryOpened: true,
@@ -714,12 +790,34 @@ class Drafts extends Component {
         {
           isEdit &&
           <View className="bottom">
+            <View
+              className="lbt"
+              onClick={() => {
+                this.setState({
+                  isInquiryOpened: true,
+                  inquiryTitle: "提醒",
+                  inquiryContent: "您确定取消该报销订单吗?",
+                  inquiryFn: () => {
+                    this.onSubmit(4);
+                  },
+                });
+              }}
+            >
+              取消订单
+            </View>
             <AtButton
               disabled={this.state.loading}
               type="primary"
               circle
               onClick={() => {
-                this.onSubmit(1)
+                this.setState({
+                  isInquiryOpened: true,
+                  inquiryTitle: "提醒",
+                  inquiryContent: "您确定提交该报销订单吗?",
+                  inquiryFn: () => {
+                    this.onSubmit(1);
+                  },
+                });
               }}
             >
               提交报销订单

+ 18 - 1
src/pages/mergedetail/index.less

@@ -329,6 +329,18 @@
     width: 60%;
     padding: 30px 0;
     margin: 0 auto;
+    position: relative;
+
+    .lbt {
+      background: red;
+      color: #fff;
+      position: absolute;
+      left: -140px;
+      padding: 28px 10px;
+      font-size: 24px;
+      border-radius: 6px;
+
+    }
 
     .bt {
       background: red;
@@ -342,7 +354,7 @@
       text-align: center;
       font-size: 24px;
       color: red;
-  
+
     }
 
   }
@@ -461,4 +473,9 @@
 
 .at-image-picker__remove-btn {
   display: none;
+}
+
+.radio-list__label{
+  padding-right: 40px;
+  font-size: 28px;
 }

+ 2 - 2
src/pages/mymerge/index.jsx

@@ -313,7 +313,7 @@ class Examine extends Component {
                       >
                         {/* {item.status == 1 && <View className='lbt' onClick={e => { e.stopPropagation(); this.setState({ visible: true, id: item.id }) }}>查看审核详情</View>} */}
                         <View className='line' style={{ color: "#6190E8" }}>报销编号:{item.checkNo}</View>
-                        <View className='line' style={{ color: "#6190E8" }}>总金额:{item.amount}元</View>
+                        <View className='line' style={{ color: "#6190E8" }}>总金额:{item.realAmount}元</View>
                         <View className='line'>报销人:{item.aname}</View>
                         <View className='line'>报销部门:{item.applyDepName}</View>
                         <View className='line'>报销时间:{item.createTimeStr}</View>
@@ -321,7 +321,7 @@ class Examine extends Component {
                         {
                           item.sonList?.map((it) =>
                             <View key={it.id} style={{ marginTop: 10 }}>
-                              <View className='line'>报销金额(元):{it.amount}</View>
+                              <View className='line'>报销金额(元):{it.realAmount}</View>
                               <View className='line'>报销类型:
                                 {getAccountName(it.type, it.typeOther)}
                                 {it.type == 2 && (" - " + getSecondaryAccountName(it.secondaryType, it.secondaryTypeOther))}

+ 76 - 2
src/pages/recordlist/index.jsx

@@ -1,11 +1,12 @@
 import React, { Component } from 'react';
 import Taro from '@tarojs/taro';
 import { View, Picker, ScrollView, Image, Button } from '@tarojs/components'
-import { getRecordList, subMrge } from '../../utils/servers/servers';
+import { getRecordList, subMrge, onDel } from '../../utils/servers/servers';
 import dayjs from 'dayjs';
 import { AtIcon, AtSearchBar } from 'taro-ui';
 import { getAccountName, getSecondaryAccountName, removeNull, copyText, commonAdd } from '../../utils/tools';
 import { accountLtate, } from '../../utils/tools/config'
+import InquiryModal from "../../components/common/inquiryModal";
 import ListBottomStart from "../../components/common/listBottomStart";
 import AuditModal from "../../components/common/auditModal";
 import sels from "../../image/sels.png";
@@ -187,7 +188,9 @@ class Examine extends Component {
       }
     }
     for (var k = 0; k < xlist.length; k++) {
-      amount = commonAdd(amount, xlist[k].realAmount)
+      if (!!xlist[k].realAmount) {
+        amount = commonAdd(amount, xlist[k].realAmount)
+      }
     }
     return amount
   }
@@ -225,6 +228,36 @@ class Examine extends Component {
       });
   }
 
+  del() {
+    let data = {
+      id: this.state.sublist.toString()
+    }
+    this.setState({
+      loading: true,
+    });
+    onDel(data)
+      .then((v) => {
+        this.setState({
+          loading: false,
+        })
+        if (v.error.length === 0) {
+          this.setState({
+            sublist: []
+          })
+          this.getMyList(1)
+        } else {
+          Taro.showToast({
+            title: v.error[0].message,
+            icon: "none",
+          });
+        }
+      })
+      .catch(() => {
+        this.setState({
+          loading: false,
+        });
+      });
+  }
 
   render() {
     const { list, sublist, searchType, search } = this.state
@@ -421,6 +454,23 @@ class Examine extends Component {
                 </View>}
               报销金额:{this.getAmount(sublist)}元
             </View>
+            {
+              sublist.length != 0 &&
+              <Button
+                className='del'
+                type='primary'
+                onClick={() => {
+                  this.setState({
+                    isInquiryOpened: true,
+                    inquiryTitle: "提醒",
+                    inquiryContent: "您确定要删除吗?",
+                    inquiryFn: () => {
+                      this.del();
+                    },
+                  });
+                }}
+              >删除</Button>
+            }
             <Button
               disabled={sublist.length == 0}
               className='rbt'
@@ -460,6 +510,30 @@ class Examine extends Component {
             }}
           />
         }
+        {/* 二级确认弹窗 */}
+        <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 >
     )
   }

+ 7 - 2
src/pages/recordlist/index.less

@@ -290,10 +290,15 @@
 
     }
 
+    .del{
+      background: red;
+      font-size: 24px;
+
+    }
+
     .rbt {
       background: #6190E8;
-      // border-radius: 100px;
-      font-size: 28px;
+      font-size: 24px;
       margin: 0;
 
     }

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

@@ -158,10 +158,15 @@ export const AccountExamine = (postData = {}) => {
 }
 
 // 合并报销
-export const subMrge= (postData = {}) => {
+export const subMrge = (postData = {}) => {
   return HTTPREQUEST.get('/api/admin/expenseAccount/merge', postData)
 }
 
+// 删除报销
+export const onDel = (postData = {}) => {
+  return HTTPREQUEST.post('/api/admin/expenseAccount/delete', postData)
+}
+
 // 修改主报销
 export const subMainAccount = (postData = {}) => {
   return HTTPREQUEST.post('/api/admin/expenseAccount/updateMain', postData)
@@ -170,4 +175,9 @@ export const subMainAccount = (postData = {}) => {
 // 撤销已选抵扣
 export const updateDebitld = (postData = {}) => {
   return HTTPREQUEST.post('/api/admin/expenseAccount/updateDebitId', postData)
+}
+
+// 获取
+export const getDepInfo = (postData = {}) => {
+  return HTTPREQUEST.get('/api/admin/expenseAccount/getDepDetails', postData)
 }

+ 8 - 6
src/utils/tools/index.js

@@ -163,7 +163,7 @@ export const getAccountName = (type, other = "其他") => {
     if (item.value == type) {
       theType = item.label;
       if (item.value == 0) {
-        theType = other
+        theType = "其他(" + other + ")"
       }
     }
   });
@@ -177,7 +177,7 @@ export const getSecondaryAccountName = (type, other = "其他") => {
     if (item.value == type) {
       theType = item.label;
       if (item.value == 0) {
-        theType = other
+        theType = "其他(" + other + ")"
       }
     }
   });
@@ -191,7 +191,7 @@ export const getTypeName = (type, other = "其他") => {
     if (item.value == type) {
       theType = item.label;
       if (item.value == 0) {
-        theType = other
+        theType = "其他(" + other + ")"
       }
     }
   });
@@ -205,7 +205,7 @@ export const getVehicleName = (type, other = "其他") => {
     if (item.value == type) {
       theType = item.label;
       if (item.value == 0) {
-        theType = other
+        theType = "其他(" + other + ")"
       }
     }
   });
@@ -215,12 +215,14 @@ export const getVehicleName = (type, other = "其他") => {
 // 解决小数求和问题
 export const commonAdd = (number1, number2) => {
   let result = 0;
-  if (Number.isInteger(number1) || Number.isInteger(number2)) {
+  if (Number.isInteger(number1) && Number.isInteger(number2)) {
     result = number1 + number2;
   } else {
-    //两个都是纯小数
+    //
     const number1Array = (number1).toString().split('.');
     const number2Array = (number2).toString().split('.');
+    Number.isInteger(number1) && number1Array.push("0")
+    Number.isInteger(number2) && number2Array.push("0")
     //最大的除数位数
     let maxBit = 1;
     if (number1Array[1].length >= number2Array[1].length) {