shish 4 лет назад
Родитель
Сommit
77cf8a0884
1 измененных файлов с 40 добавлено и 23 удалено
  1. 40 23
      ghsApp/src/admin/stat/kdIncome.vue

+ 40 - 23
ghsApp/src/admin/stat/kdIncome.vue

@@ -25,6 +25,28 @@
 			</view>
 			</view>
 			<view class="act-income"></view>
 			<view class="act-income"></view>
 		</view>
 		</view>
+
+		<modal-module :show="showDetailPop" @click="confirmDetail" :maskClosable="true" title="明细" padding="30rpx 30rpx" >
+			<template slot="customContent">
+				<view style="font-size:30upx;margin-bottom:30upx;margin-top:20upx;">
+
+					<stock v-if="detailItem.class && !$util.isEmpty(detailItem.class)">
+						<view v-for="(it, idx) in detailItem.class" :key="idx">
+							{{it.name}} {{it.num}}笔 ¥{{it.amount?parseFloat(it.amount):0}}
+						</view>
+						<view style="height:30upx;"> </view>
+					</stock>
+
+					<stock v-if="detailItem.category && !$util.isEmpty(detailItem.category)">
+						<view v-for="(item, index) in detailItem.category" :key="index">
+							{{item.name}} {{item.num}}笔 ¥{{item.amount?parseFloat(item.amount):0}}
+						</view>
+					</stock>
+
+				</view>
+			</template>
+		</modal-module>
+
 	</view>
 	</view>
 </view>
 </view>
 </template>
 </template>
@@ -36,8 +58,9 @@ import { list } from "@/mixins";
 import ShopSelect from "@/components/module/shopSelect";
 import ShopSelect from "@/components/module/shopSelect";
 import DateSelect from "@/components/module/dateSelect";
 import DateSelect from "@/components/module/dateSelect";
 import {mapActions, mapGetters} from "vuex";
 import {mapActions, mapGetters} from "vuex";
+import ModalModule from "@/components/plugin/modal";
 export default {
 export default {
-	components: { SelectList, AppWrapperEmpty,ShopSelect,DateSelect},
+	components: { SelectList, AppWrapperEmpty,ShopSelect,DateSelect,ModalModule},
 	mixins: [list],
 	mixins: [list],
 	computed: {		
 	computed: {		
 		...mapGetters(["getDictionariesInfo","getLoginInfo"])
 		...mapGetters(["getDictionariesInfo","getLoginInfo"])
@@ -63,7 +86,9 @@ export default {
 				shopId: "",
 				shopId: "",
 			},
 			},
 			profile:[],
 			profile:[],
-			income:0
+			income:0,
+			showDetailPop:false,
+			detailItem:[]
 		};
 		};
 	},
 	},
 	onPullDownRefresh() {
 	onPullDownRefresh() {
@@ -78,28 +103,20 @@ export default {
 		this.shopId = this.getLoginInfo.shopId;
 		this.shopId = this.getLoginInfo.shopId;
 	},
 	},
 	methods: {
 	methods: {
-		getDetail(item){
-			let str = ''
-			if(item.class && !this.$util.isEmpty(item.class)){
-				let cl = Object.values(item.class)
-				cl.forEach((it,idx,arr) => {
-					let num = it.num
-					let name = it.name
-					let amount = it.amount
-					str += name+' '+num+'笔'+' ¥'+amount+', '
-				})
-				str += ' || '
-			}
-			if(item.category && !this.$util.isEmpty(item.category)){
-				let cat = Object.values(item.category)
-				cat.forEach((it,idx,arr) => {
-					let num = it.num
-					let name = it.name
-					let amount = it.amount
-					str += name+' '+num+'笔'+' ¥'+amount+', '
-				})
+		confirmDetail(val){
+			if (val.index === 0) {
+				this.cancelShowDetail();
+			} else {
+				this.cancelShowDetail();
 			}
 			}
-			this.$util.confirmModal({title:'明细',content:str},() => { })
+		},
+		cancelShowDetail(){
+			this.showDetailPop = false
+		},
+		getDetail(item){
+			this.detailItem = item
+			console.log(this.detailItem,'aaa')
+			this.showDetailPop = true
 		},
 		},
 		...mapActions(['setUserShopAll']),
 		...mapActions(['setUserShopAll']),
 		//选择分店
 		//选择分店