|
@@ -1,12 +1,18 @@
|
|
|
<template>
|
|
<template>
|
|
|
<view class="app-content">
|
|
<view class="app-content">
|
|
|
|
|
+ <view class="top-bar" style="margin:20upx 0 20upx 40upx;">
|
|
|
|
|
+ <DateSelect class="bar" top="0" @selectDateFn="selectDateFn" />
|
|
|
|
|
+ </view>
|
|
|
<block v-if="!$util.isEmpty(bxList)">
|
|
<block v-if="!$util.isEmpty(bxList)">
|
|
|
<view v-for="(item, index) in bxList" :key="index">
|
|
<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:15upx;padding:20upx 0 20upx 20upx;">
|
|
|
<view style="font-size:33upx;margin-bottom:20upx;">
|
|
<view style="font-size:33upx;margin-bottom:20upx;">
|
|
|
- <text style="font-weight:bold;">{{item.staffName?item.staffName:''}}</text><text style="margin-left:20upx;">待报销:¥{{ item.amount }}</text>
|
|
|
|
|
|
|
+ <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>
|
|
</view>
|
|
|
- <button @tap="confirmBx(index,item.amount)" class="admin-button-com blue middle">确认报销</button>
|
|
|
|
|
|
|
+ <button v-if="Number(item.amount)>0" @tap="confirmBx(index,item.amount)" class="admin-button-com blue middle">确认报销</button>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</block>
|
|
</block>
|
|
@@ -19,18 +25,29 @@
|
|
|
<script>
|
|
<script>
|
|
|
import AppWrapperEmpty from "@/components/app-wrapper-empty";
|
|
import AppWrapperEmpty from "@/components/app-wrapper-empty";
|
|
|
import { getUnBxList,bx } from '@/api/expend'
|
|
import { getUnBxList,bx } from '@/api/expend'
|
|
|
|
|
+import DateSelect from "@/components/module/dateSelect"
|
|
|
export default {
|
|
export default {
|
|
|
name: "bxList",
|
|
name: "bxList",
|
|
|
components: {
|
|
components: {
|
|
|
- AppWrapperEmpty
|
|
|
|
|
|
|
+ AppWrapperEmpty,
|
|
|
|
|
+ DateSelect
|
|
|
},
|
|
},
|
|
|
mixins:[],
|
|
mixins:[],
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
- bxList:[]
|
|
|
|
|
|
|
+ bxList:[],
|
|
|
|
|
+ searchTime:'',
|
|
|
|
|
+ startTime:'',
|
|
|
|
|
+ endTime:''
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ selectDateFn(val) {
|
|
|
|
|
+ this.searchTime = val.searchTime
|
|
|
|
|
+ this.startTime = val.startTime
|
|
|
|
|
+ this.endTime = val.endTime
|
|
|
|
|
+ this.init()
|
|
|
|
|
+ },
|
|
|
confirmBx(staffId,amount){
|
|
confirmBx(staffId,amount){
|
|
|
let that = this
|
|
let that = this
|
|
|
that.$util.confirmModal({content:'确认已报销?'},() => {
|
|
that.$util.confirmModal({content:'确认已报销?'},() => {
|
|
@@ -43,7 +60,7 @@ export default {
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
init(){
|
|
init(){
|
|
|
- getUnBxList().then(res=>{
|
|
|
|
|
|
|
+ getUnBxList({searchTime: this.searchTime,startTime: this.startTime,endTime: this.endTime}).then(res=>{
|
|
|
if(res.code == 1){
|
|
if(res.code == 1){
|
|
|
this.bxList = res.data.list ? res.data.list : []
|
|
this.bxList = res.data.list ? res.data.list : []
|
|
|
}
|
|
}
|