shish 1 vuosi sitten
vanhempi
commit
4082e8a6d5

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

@@ -30,8 +30,8 @@
 		<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:50upx;color:blue;font-size:34upx;" @click="goToStat()">汇总统计</text>
-		<text style="margin-right:50upx;color:blue;font-size:34upx;" @click="goToMayBx()">应报销统计</text>
+		<text style="margin-right:60upx;color:blue;font-size:36upx;" @click="goToStat()">汇总统计</text>
+		<text style="margin-right:60upx;color:blue;font-size:36upx;" @click="goToMayBx()">应报销统计</text>
 		<view @click="addExpend" class="admin-button-com big blue" style="width:210upx;">新增支出</view>
 		<view @click="addExpend" class="admin-button-com big blue" style="width:210upx;">新增支出</view>
 	</view>
 	</view>
 
 

+ 2 - 2
ghsApp/src/admin/expend/mayBx.vue

@@ -3,7 +3,7 @@
 	<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:36upx;margin-bottom:20upx;">
 					<view>
 					<view>
 						<text style="font-weight:bold;">{{item.staffName?item.staffName:''}}</text>
 						<text style="font-weight:bold;">{{item.staffName?item.staffName:''}}</text>
 						<text style="margin-left:30upx;">待报销:¥{{ item.amount }}</text>
 						<text style="margin-left:30upx;">待报销:¥{{ item.amount }}</text>
@@ -14,7 +14,7 @@
 		</view>
 		</view>
 	</block>
 	</block>
 	<block v-else>
 	<block v-else>
-		<AppWrapperEmpty title="暂无数据" :is-empty="$util.isEmpty(bxList)" />
+		<AppWrapperEmpty title="没有需要报销" :is-empty="$util.isEmpty(bxList)" />
 	</block>
 	</block>
 </view>
 </view>
 </template>
 </template>

+ 21 - 18
ghsApp/src/admin/expend/stat.vue

@@ -1,11 +1,13 @@
 <template>
 <template>
 <view class="app-content">
 <view class="app-content">
+
 	<view class="top-bar" style="margin:20upx 0 20upx 40upx;padding-top:30upx;">
 	<view class="top-bar" style="margin:20upx 0 20upx 40upx;padding-top:30upx;">
 		<DateSelect class="bar" top="0" @selectDateFn="selectDateFn" />
 		<DateSelect class="bar" top="0" @selectDateFn="selectDateFn" />
 	</view>
 	</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:10upx;padding:20upx 0 20upx 20upx;">
 				<view style="font-size:33upx;margin-bottom:20upx;">
 				<view style="font-size:33upx;margin-bottom:20upx;">
 					<view><text style="font-weight:bold;">{{item.staffName?item.staffName:''}}</text></view>
 					<view><text style="font-weight:bold;">{{item.staffName?item.staffName:''}}</text></view>
 					<view><text>总支出:¥{{ item.totalAmount }}</text></view>
 					<view><text>总支出:¥{{ item.totalAmount }}</text></view>
@@ -15,17 +17,27 @@
 			</view>
 			</view>
 		</view>
 		</view>
 	</block>
 	</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>
 	</block>
+
 </view>
 </view>
 </template>
 </template>
 <script>
 <script>
 import AppWrapperEmpty from "@/components/app-wrapper-empty";
 import AppWrapperEmpty from "@/components/app-wrapper-empty";
-import { getUnBxList,bx } from '@/api/expend'
+import { getStat } from '@/api/expend'
 import DateSelect from "@/components/module/dateSelect"
 import DateSelect from "@/components/module/dateSelect"
 export default {
 export default {
-	name: "bxList",
+	name: "stat",
 	components: {
 	components: {
 		AppWrapperEmpty,
 		AppWrapperEmpty,
 		DateSelect
 		DateSelect
@@ -36,7 +48,8 @@ export default {
 			bxList:[],
 			bxList:[],
 			searchTime:'',
 			searchTime:'',
 			startTime:'',
 			startTime:'',
-			endTime:''
+			endTime:'',
+			catList:[]
 		};
 		};
 	},
 	},
 	methods: {
 	methods: {
@@ -46,21 +59,11 @@ export default {
 			this.endTime = val.endTime
 			this.endTime = val.endTime
 			this.init()
 			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(){
 		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){
 				if(res.code == 1){
 					this.bxList = res.data.list ? res.data.list : []
 					this.bxList = res.data.list ? res.data.list : []
+					this.catList = res.data.catList ? res.data.catList : []
 				}
 				}
 			})
 			})
 		}
 		}

+ 4 - 0
ghsApp/src/api/expend/index.js

@@ -8,6 +8,10 @@ export const getUnBxList = data => {
 	return https.get('/expend/un-bx-list', data)
 	return https.get('/expend/un-bx-list', data)
 }
 }
 
 
+export const getStat = data => {
+	return https.get('/expend/stat', data)
+}
+
 export const getTypeList = data => {
 export const getTypeList = data => {
 	return https.get('/expend/get-type-list', data)
 	return https.get('/expend/get-type-list', data)
 }
 }

+ 0 - 1
ghsApp/src/pages.json

@@ -511,7 +511,6 @@
 				{"path": "addSalary","style": {"navigationBarTitleText": "发工资"}},
 				{"path": "addSalary","style": {"navigationBarTitleText": "发工资"}},
 				{"path": "salary","style": {"navigationBarTitleText": "发工资记录","enablePullDownRefresh": true}},
 				{"path": "salary","style": {"navigationBarTitleText": "发工资记录","enablePullDownRefresh": true}},
 				{"path": "list","style": {"navigationBarTitleText": "支出记录","enablePullDownRefresh": false}},
 				{"path": "list","style": {"navigationBarTitleText": "支出记录","enablePullDownRefresh": false}},
-				{"path": "bxList","style": {"navigationBarTitleText": "报销记录","enablePullDownRefresh": false}},
 				{"path": "stat","style": {"navigationBarTitleText": "统计","enablePullDownRefresh": false}},
 				{"path": "stat","style": {"navigationBarTitleText": "统计","enablePullDownRefresh": false}},
 				{"path": "mayBx","style": {"navigationBarTitleText": "应报销","enablePullDownRefresh": false}}
 				{"path": "mayBx","style": {"navigationBarTitleText": "应报销","enablePullDownRefresh": false}}
 			]
 			]