|
|
@@ -1,11 +1,13 @@
|
|
|
<template>
|
|
|
<view class="app-content">
|
|
|
+
|
|
|
<view class="top-bar" style="margin:20upx 0 20upx 40upx;padding-top:30upx;">
|
|
|
<DateSelect class="bar" top="0" @selectDateFn="selectDateFn" />
|
|
|
</view>
|
|
|
+
|
|
|
<block v-if="!$util.isEmpty(bxList)">
|
|
|
<view v-for="(item, index) in bxList" :key="index">
|
|
|
- <view style="background-color: white;margin-bottom:15upx;padding:20upx 0 20upx 20upx;">
|
|
|
+ <view style="background-color: white;margin-bottom:10upx;padding:20upx 0 20upx 20upx;">
|
|
|
<view style="font-size:33upx;margin-bottom:20upx;">
|
|
|
<view><text style="font-weight:bold;">{{item.staffName?item.staffName:''}}</text></view>
|
|
|
<view><text>总支出:¥{{ item.totalAmount }}</text></view>
|
|
|
@@ -15,17 +17,27 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</block>
|
|
|
- <block v-else>
|
|
|
- <AppWrapperEmpty title="暂无数据" :is-empty="$util.isEmpty(bxList)" />
|
|
|
+
|
|
|
+ <block v-if="!$util.isEmpty(catList)">
|
|
|
+ <view style="margin-top:50upx;">
|
|
|
+ <view v-for="(item, index) in catList" :key="index">
|
|
|
+ <view style="background-color: white;margin-bottom:15upx;padding:20upx 0 20upx 20upx;" v-if="Number(item.amount)>0">
|
|
|
+ <view style="font-size:33upx;margin-bottom:20upx;">
|
|
|
+ <view><text>{{ item.name }} {{ item.num }}笔 ¥{{ item.amount }}</text></view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
</block>
|
|
|
+
|
|
|
</view>
|
|
|
</template>
|
|
|
<script>
|
|
|
import AppWrapperEmpty from "@/components/app-wrapper-empty";
|
|
|
-import { getUnBxList,bx } from '@/api/expend'
|
|
|
+import { getStat } from '@/api/expend'
|
|
|
import DateSelect from "@/components/module/dateSelect"
|
|
|
export default {
|
|
|
- name: "bxList",
|
|
|
+ name: "stat",
|
|
|
components: {
|
|
|
AppWrapperEmpty,
|
|
|
DateSelect
|
|
|
@@ -36,7 +48,8 @@ export default {
|
|
|
bxList:[],
|
|
|
searchTime:'',
|
|
|
startTime:'',
|
|
|
- endTime:''
|
|
|
+ endTime:'',
|
|
|
+ catList:[]
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
|
@@ -46,21 +59,11 @@ export default {
|
|
|
this.endTime = val.endTime
|
|
|
this.init()
|
|
|
},
|
|
|
- confirmBx(staffId,amount){
|
|
|
- let that = this
|
|
|
- that.$util.confirmModal({content:'确认已报销?'},() => {
|
|
|
- bx({staffId,amount}).then(res=>{
|
|
|
- if(res.code == 1){
|
|
|
- that.$msg(res.msg)
|
|
|
- that.init()
|
|
|
- }
|
|
|
- })
|
|
|
- })
|
|
|
- },
|
|
|
init(){
|
|
|
- getUnBxList({searchTime: this.searchTime,startTime: this.startTime,endTime: this.endTime}).then(res=>{
|
|
|
+ getStat({searchTime: this.searchTime,startTime: this.startTime,endTime: this.endTime}).then(res=>{
|
|
|
if(res.code == 1){
|
|
|
this.bxList = res.data.list ? res.data.list : []
|
|
|
+ this.catList = res.data.catList ? res.data.catList : []
|
|
|
}
|
|
|
})
|
|
|
}
|