|
|
@@ -1,54 +1,118 @@
|
|
|
<template>
|
|
|
<view class="app-content">
|
|
|
- <block v-if="!$util.isEmpty(list.data)">
|
|
|
- <t-table :headerBackgroundColor="'#F0F2F6'">
|
|
|
- <t-tr header>
|
|
|
- <t-th><view>时间</view></t-th>
|
|
|
- <t-th><view>登记人</view></t-th>
|
|
|
- <t-th><view>支付</view></t-th>
|
|
|
- <t-th><view>事项</view></t-th>
|
|
|
- <t-th>金额</t-th>
|
|
|
- </t-tr>
|
|
|
- <view v-for="(item, index) in list.data" :key="index">
|
|
|
- <t-tr>
|
|
|
- <t-td align="center" color="info">{{ item.addTime.substr(5,11) }}</t-td>
|
|
|
- <t-td align="center" color="info">{{item.staffName}}</t-td>
|
|
|
- <t-td align="center" color="info">{{item.payWay==0?'线下微信':item.payWay == 4 ? '现金':item.payWay == 1?'线下支付宝':item.payWay == 5 ? '银行卡':''}}</t-td>
|
|
|
- <t-td align="center" color="info">{{item.type == 0 ? '店租':item.type==1?'水电':item.type==2?'物业':item.type==3?'伙食':item.type==4?'房租':'其它'}}</t-td>
|
|
|
- <t-td align="center" color="info">{{item.amount?parseFloat(item.amount):0}}</t-td>
|
|
|
- </t-tr>
|
|
|
- <block v-if="!$util.isEmpty(item.remark)">
|
|
|
- <t-tr>
|
|
|
- <t-td align="center" color="info">{{ item.remark }}</t-td>
|
|
|
- </t-tr>
|
|
|
- </block>
|
|
|
+ <view style="padding:15upx 0 30upx 50upx;font-size:30upx;">
|
|
|
+ <view>
|
|
|
+ <text @click="changeBx()">{{ bx == -1 ? '报销状态' : bx == 0 ? '待报销' : '已报销' }}</text>
|
|
|
+ <text style="margin-left:50upx;" @click="changeType()">类型</text>
|
|
|
+ <text style="margin-left:50upx;" @click="changePayMan()">付款人</text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view style="margin-left:50upx;margin-bottom:26upx;position:relative;">
|
|
|
+ <DateSelect class="bar" top="0" @selectDateFn="selectDateFn" />
|
|
|
+ </view>
|
|
|
+ <block v-if="!$util.isEmpty(list.data)">
|
|
|
+ <view v-for="(item, index) in list.data" :key="index">
|
|
|
+ <view style="background-color: white;margin-bottom:15upx;padding:10upx 0 10upx 20upx;">
|
|
|
+ <view style="color:red;font-weight:bold;font-size:30upx;">
|
|
|
+ <text>{{item.type == 0 ? '店租':item.type==1?'水电':item.type==2?'物业':item.type==3?'伙食':item.type==4?'房租':item.type==6?'物品':'其它'}}</text>
|
|
|
+ <text style="margin-left:20upx;">¥{{item.amount?parseFloat(item.amount):0}}</text>
|
|
|
</view>
|
|
|
- </t-table>
|
|
|
- </block>
|
|
|
- <block v-else>
|
|
|
- <AppWrapperEmpty title="暂无数据" :is-empty="$util.isEmpty(list.data)" />
|
|
|
- </block>
|
|
|
- <view class="app-footer open_btn">
|
|
|
- <view @click="addExpend" class="admin-button-com big blue" style="width:230upx;">新增支出</view>
|
|
|
+ <view v-if="item.remark!=''" style="color:red;">备注:{{ item.remark }}</view>
|
|
|
+ <view>付款:<text style="font-weight:bold;">{{item.staffName?item.staffName:''}}</text></view>
|
|
|
+ <view>时间:{{ item.addTime.substr(5,11) }}</view>
|
|
|
+ <view>支付:{{item.payWay==0?'线下微信':item.payWay == 4 ? '现金':item.payWay == 1?'线下支付宝':item.payWay == 5 ? '银行卡':''}}</view>
|
|
|
+ <view v-if="item.bx == 0" style="color:blue;">报销:待报销</view>
|
|
|
+ <view v-else style="color:green;">报销:已报销</view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
+ </block>
|
|
|
+ <block v-else>
|
|
|
+ <AppWrapperEmpty title="暂无数据" :is-empty="$util.isEmpty(list.data)" />
|
|
|
+ </block>
|
|
|
+ <view class="app-footer open_btn">
|
|
|
+ <text style="margin-right:80upx;color:blue;font-size:29upx;" @click="goToBxList()">待报销列表</text>
|
|
|
+ <view @click="addExpend" class="admin-button-com big blue" style="width:230upx;">新增支出</view>
|
|
|
</view>
|
|
|
+
|
|
|
+
|
|
|
+ <uni-popup ref="typeShowMore" background-color="#fff" type="center" :animation="true" class="class-popup-style">
|
|
|
+ <view style="display:flex;width:100vw;padding:20upx 20upx 40upx 20upx;height:auto;justify-content: space-between;align-items:center;flex-wrap:wrap;max-height:100vh;overflow:auto;">
|
|
|
+ <view v-for="(item, index) in typeList" :key="index" style="width:100vw;margin-top:8upx;">
|
|
|
+ <button @click="">{{ item }}</button>
|
|
|
+ </view>
|
|
|
+ <view style="width:100vw;margin-top:30upx;margin-bottom:70upx;"><button @click="closeTypeShow()">取消</button></view>
|
|
|
+ </view>
|
|
|
+ </uni-popup>
|
|
|
+
|
|
|
+ <uni-popup ref="payShowMore" background-color="#fff" type="center" :animation="true" class="class-popup-style">
|
|
|
+ <view style="display:flex;width:100vw;padding:20upx 20upx 40upx 20upx;height:auto;justify-content: space-between;align-items:center;flex-wrap:wrap;max-height:100vh;overflow:auto;">
|
|
|
+ <view v-for="(item, index) in staffList" :key="index" style="width:100vw;margin-top:8upx;">
|
|
|
+ <button @click="">{{ item.name }}</button>
|
|
|
+ </view>
|
|
|
+ <view style="width:100vw;margin-top:30upx;margin-bottom:70upx;"><button @click="closePayShow()">取消</button></view>
|
|
|
+ </view>
|
|
|
+ </uni-popup>
|
|
|
+
|
|
|
+</view>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import AppWrapperEmpty from "@/components/app-wrapper-empty";
|
|
|
-import { getExpendList } from '@/api/expend'
|
|
|
+import { getExpendList,getTypeList } from '@/api/expend'
|
|
|
import list from '@/mixins/list'
|
|
|
+import { getAllStaff } from "@/api/shop-admin"
|
|
|
+import DateSelect from "@/components/module/dateSelect"
|
|
|
export default {
|
|
|
name: "cashList",
|
|
|
components: {
|
|
|
- AppWrapperEmpty
|
|
|
+ AppWrapperEmpty,
|
|
|
+ DateSelect
|
|
|
},
|
|
|
mixins:[list],
|
|
|
data() {
|
|
|
return {
|
|
|
+ getStaffName:'选付款人',
|
|
|
+ getStaffId:0,
|
|
|
+ staffList:[],
|
|
|
+ bx:-1,
|
|
|
+ typeList:[]
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
|
+ goToBxList(){
|
|
|
+ this.$util.pageTo({ url: "/admin/expend/bxList"})
|
|
|
+ },
|
|
|
+ changePayMan(){
|
|
|
+ this.$refs.payShowMore.open('top')
|
|
|
+ },
|
|
|
+ closePayShow(){
|
|
|
+ this.$refs.payShowMore.close()
|
|
|
+ },
|
|
|
+ closeTypeShow(){
|
|
|
+ this.$refs.typeShowMore.close()
|
|
|
+ },
|
|
|
+ changeType(){
|
|
|
+ this.$refs.typeShowMore.open('top')
|
|
|
+ },
|
|
|
+ changeBx(){
|
|
|
+ let that = this
|
|
|
+ uni.showActionSheet({
|
|
|
+ itemList: ['待报销', '已报销', '重置选择'],
|
|
|
+ success: function (res) {
|
|
|
+ if(res.tapIndex == 0){
|
|
|
+ that.bx = 0
|
|
|
+ }
|
|
|
+ if(res.tapIndex == 1){
|
|
|
+ that.bx = 1
|
|
|
+ }
|
|
|
+ if(res.tapIndex == 2){
|
|
|
+ that.bx = -1
|
|
|
+ }
|
|
|
+ //that.resetList()
|
|
|
+ //that.getRefundData()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
addExpend(){
|
|
|
this.$util.pageTo({url: '/admin/expend/addExpend'})
|
|
|
},
|
|
|
@@ -59,6 +123,19 @@ export default {
|
|
|
return
|
|
|
}
|
|
|
this.completes(res)
|
|
|
+
|
|
|
+ getAllStaff().then(res=>{
|
|
|
+ if(res.code == 1){
|
|
|
+ this.staffList = res.data.list
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ getTypeList().then(res=>{
|
|
|
+ if(res.code == 1){
|
|
|
+ this.typeList = res.data.list ? res.data.list : []
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
}
|
|
|
},
|
|
|
async onPullDownRefresh() {
|
|
|
@@ -81,4 +158,7 @@ export default {
|
|
|
.app-content{
|
|
|
padding-bottom:120upx;
|
|
|
}
|
|
|
+.class-popup-style{
|
|
|
+ z-index:99999;
|
|
|
+}
|
|
|
</style>
|