|
@@ -1,70 +0,0 @@
|
|
|
-<template>
|
|
|
|
|
-<view class="app-content">
|
|
|
|
|
- <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="font-size:33upx;margin-bottom:20upx;">
|
|
|
|
|
- <view><text style="font-weight:bold;">{{item.staffName?item.staffName:''}}</text></view>
|
|
|
|
|
- <view><text>总支出:¥{{ item.totalAmount }}</text></view>
|
|
|
|
|
- <view><text>已报销:¥{{ item.hasAmount }}</text></view>
|
|
|
|
|
- <view><text>待报销:¥{{ item.amount }}</text></view>
|
|
|
|
|
- </view>
|
|
|
|
|
- <button @tap="confirmBx(index,item.amount)" class="admin-button-com blue middle">确认报销</button>
|
|
|
|
|
- </view>
|
|
|
|
|
- </view>
|
|
|
|
|
- </block>
|
|
|
|
|
- <block v-else>
|
|
|
|
|
- <AppWrapperEmpty title="暂无数据" :is-empty="$util.isEmpty(bxList)" />
|
|
|
|
|
- </block>
|
|
|
|
|
-</view>
|
|
|
|
|
-</template>
|
|
|
|
|
-
|
|
|
|
|
-<script>
|
|
|
|
|
-import AppWrapperEmpty from "@/components/app-wrapper-empty";
|
|
|
|
|
-import { getUnBxList,bx } from '@/api/expend'
|
|
|
|
|
-import DateSelect from "@/components/module/dateSelect"
|
|
|
|
|
-export default {
|
|
|
|
|
- name: "bxList",
|
|
|
|
|
- components: {
|
|
|
|
|
- AppWrapperEmpty,
|
|
|
|
|
- DateSelect
|
|
|
|
|
- },
|
|
|
|
|
- mixins:[],
|
|
|
|
|
- data() {
|
|
|
|
|
- return {
|
|
|
|
|
- bxList:[],
|
|
|
|
|
- searchTime:'',
|
|
|
|
|
- startTime:'',
|
|
|
|
|
- endTime:''
|
|
|
|
|
- };
|
|
|
|
|
- },
|
|
|
|
|
- methods: {
|
|
|
|
|
- selectDateFn(val) {
|
|
|
|
|
- this.searchTime = val.searchTime
|
|
|
|
|
- this.startTime = val.startTime
|
|
|
|
|
- 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=>{
|
|
|
|
|
- if(res.code == 1){
|
|
|
|
|
- this.bxList = res.data.list ? res.data.list : []
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-};
|
|
|
|
|
-</script>
|
|
|
|
|
-<style lang="scss" scoped>
|
|
|
|
|
-</style>
|
|
|