shish 2 лет назад
Родитель
Сommit
ecac799edf
2 измененных файлов с 23 добавлено и 6 удалено
  1. 22 5
      ghsApp/src/admin/expend/bxList.vue
  2. 1 1
      ghsApp/src/admin/expend/list.vue

+ 22 - 5
ghsApp/src/admin/expend/bxList.vue

@@ -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 : []
 				}
 				}

+ 1 - 1
ghsApp/src/admin/expend/list.vue

@@ -30,7 +30,7 @@
 		<AppWrapperEmpty title="暂无数据" :is-empty="$util.isEmpty(list.data)" />
 		<AppWrapperEmpty title="暂无数据" :is-empty="$util.isEmpty(list.data)" />
 	</block>
 	</block>
 	<view class="app-footer open_btn">
 	<view class="app-footer open_btn">
-		<text style="margin-right:80upx;color:blue;font-size:34upx;" @click="goToBxList()">待报销汇总</text>
+		<text style="margin-right:80upx;color:blue;font-size:34upx;" @click="goToBxList()">汇总统计</text>
 		<view @click="addExpend" class="admin-button-com big blue" style="width:230upx;">新增支出</view>
 		<view @click="addExpend" class="admin-button-com big blue" style="width:230upx;">新增支出</view>
 	</view>
 	</view>