shish 4 лет назад
Родитель
Сommit
9183dae913

+ 6 - 2
ghsApp/src/admin/home/me.vue

@@ -54,8 +54,12 @@
               <div class="tui-title">余额明细</div>
             </tui-list-cell>
 
-            <tui-list-cell @click="pageTo({ url: '/pagesStore/me/incomeExpenses' })" class="line-cell" :hover="false" :arrow="true" >
-              <div class="tui-title">收支明细</div>
+            <tui-list-cell @click="pageTo({ url: '/pagesStore/me/income' })" class="line-cell" :hover="false" :arrow="true" >
+              <div class="tui-title">收入明细</div>
+            </tui-list-cell>
+
+            <tui-list-cell @click="pageTo({ url: '/pagesStore/me/expend' })" class="line-cell" :hover="false" :arrow="true" >
+              <div class="tui-title">支出明细</div>
             </tui-list-cell>
 
             <tui-list-cell @click="pageTo({ url: '/pagesStore/me/withdraw' })" class="line-cell" :hover="false" :arrow="true" >

+ 3 - 3
ghsApp/src/admin/home/workbench.vue

@@ -22,7 +22,7 @@
 						{{ $util.numberFormat(data.todayData.visitCustom) || 0 }}
 					</div>
 				</navigator>
-				<navigator url="/pagesStore/me/incomeExpenses" class="info-list">
+				<navigator url="/pagesStore/me/expend" class="info-list">
 					<div class="info-list-name">支出</div>
 					<div class="info-list-value">
 						{{ $util.numberFormat(data.todayData.expend) || 0 }}
@@ -125,8 +125,8 @@ export default {
 				{ name: "客户数", value: 0, url:'/admin/home/member', type:4 },
 				{ name: "总访客", value: 0, url:'/admin/custom/visit', type:1, },
 				{ name: "总订单", value: 0, url:'/admin/home/order', type:4 },
-				{ name: "总收入(元)", value: 0.00, url:'/pagesStore/me/incomeExpenses', type:1 },
-				{ name: "总支出(元)", value: 0.00, url:'/pagesStore/me/incomeExpenses', type:1 },
+				{ name: "总收入(元)", value: 0.00, url:'/pagesStore/me/income', type:1 },
+				{ name: "总支出(元)", value: 0.00, url:'/pagesStore/me/expend', type:1 },
 				{ name: "总采购(元)", value: 0.00, url:'/admin/statistics/cgStat', type:1 }
 			],
 			skSrc: `${this.$constant.imgUrl}/ghs/home/sk.jpg`,

+ 13 - 8
ghsApp/src/admin/item/list.vue

@@ -24,17 +24,22 @@
 				<!--内容部分-->
 				<block v-if="!$util.isEmpty(globalClassItemList)">
 					<view class="item_list_bx selectAll" v-for="(classItem, classIndex) in globalClassItemList" :key="classIndex" :id="`class_${classIndex}`">
-						<view class="item_list_title" v-if="!$util.isEmpty(classItem.child)"> {{ classItem.className }}</view>
-						<template v-for="(productItem, productIndex) in classItem.child">
-							<view style="height:240upx" :id="`class_${classIndex}`" :key="productIndex">
-								<ItemStock v-if="classItem.isActive" :isPrice="false" :info="productItem" @goToProduct="goToProduct" @moreToDo="moreToDo" ></ItemStock>
-							</view>
-						</template>
+						<view class="item_list_title"> {{ classItem.className }}</view>
+						<view v-if="classItem.child && !$util.isEmpty(classItem.child)">
+							<template v-for="(productItem, productIndex) in classItem.child">
+								<view style="height:240upx" :id="`class_${classIndex}`" :key="productIndex">
+									<ItemStock v-if="classItem.isActive" :isPrice="false" :info="productItem" @goToProduct="goToProduct" @moreToDo="moreToDo" ></ItemStock>
+								</view>
+							</template>
+						</view>
+						<view v-else>
+							<view style="height:55upx;text-align:center;color:#CCCCCC;">暂无花材</view>
+						</view>
 					</view>
 				</block>
 				<block v-else>
-					<view style="width: 100%">
-						<app-wrapper-empty  title="暂无数据" :is-empty="$util.isEmpty(globalClassItemList)"/>
+					<view style="width:100%">
+						<app-wrapper-empty  title="暂无花材" :is-empty="$util.isEmpty(globalClassItemList)" />
 					</view>
 				</block>
 			</scroll-view>

+ 1 - 1
ghsApp/src/mixins/product.js

@@ -568,7 +568,7 @@ export default {
 		scroll_bottom(){
 			this.classIndex = this.globalClassItemList.length-1
 			this.globalClassItemList[this.classIndex].isActive = true;
-			if(this.globalClassItemList[this.classIndex+1].child.length<5){
+			if(!this.$util.isEmpty(this.globalClassItemList[this.classIndex+1]) && this.globalClassItemList[this.classIndex+1].child.length<5){
 				this.globalClassItemList[this.classIndex+2].isActive = true;
 			}
 		}

+ 2 - 1
ghsApp/src/pages.json

@@ -83,7 +83,8 @@
 			"root": "pagesStore",
 			"pages": [
 				{"path": "me/withdraw","style": {"navigationBarTitleText": "提现记录"}},
-				{"path": "me/incomeExpenses","style": {"navigationBarTitleText": "收支记录"}},
+				{"path": "me/income","style": {"navigationBarTitleText": "收入记录"}},
+				{"path": "me/expend","style": {"navigationBarTitleText": "支出记录"}},
 				{"path": "me/recharge","style": {"navigationBarTitleText": "充值"}},
 				{"path": "me/rechargeList","style": {"navigationBarTitleText": "充值记录"}},
 				{"path": "me/cashSet","style": {"navigationBarTitleText": "提现账号"}},

+ 73 - 0
ghsApp/src/pagesStore/me/expend.vue

@@ -0,0 +1,73 @@
+<template>
+	<view class="app-content">
+		<div class="list-by_box" v-if="!$util.isEmpty(list.data)">
+			<t-table :headerBackgroundColor="'#F0F2F6'">
+				<t-tr header>
+					<t-th v-for="(item, index) in columns" :key="index" :align="item.align">
+						{{ item.name }}
+					</t-th>
+				</t-tr>
+				<t-tr v-for="(item, index) in list.data" :key="index">
+					<t-td v-for="(column, colIndex) in columns" :key="colIndex" :align="column.align" :color="column.color" >
+						<view>
+							{{ item[column.dataIndex] || "" }}
+						</view>
+					</t-td>
+				</t-tr>
+			</t-table>
+		</div>
+		<block v-else>
+			<AppWrapperEmpty title="暂无数据" :is-empty="$util.isEmpty(list.data)" />
+		</block>
+	</view>
+</template>
+<script>
+import AppWrapperEmpty from "@/components/app-wrapper-empty";
+import { list } from "@/mixins";
+import { capitaList } from '@/api/store'
+export default {
+	name: "expend",
+	components: {
+		AppWrapperEmpty
+	},
+	mixins: [list],
+	data() {
+		return {
+			columns: [
+				{name: "事项",dataIndex: "event",color: "info",align: "center"},
+				{name: "金额",dataIndex: "amount",color: "info",align: "center"},
+				{name: "累计支出",dataIndex: "totalExpend",color: "info",align: "center"},
+				{name: "时间",dataIndex: "addTime",color: "info",align: "center"}
+			],
+			tabIndex: 0
+		};
+	},
+	methods: {
+		init() {
+			this.getList();
+		},
+		getList(){
+			return capitaList({ page: this.list.page, io: 0 }).then(res=>{
+				 this.completes(res);
+			})
+		}
+	},
+	onPullDownRefresh() {
+		this.resetList();
+		this.getList().then(res => {
+		uni.stopPullDownRefresh();
+		});
+	},
+	onReachBottom() {
+    if (!this.list.finished) {
+      this.getList().then(res => {
+        uni.stopPullDownRefresh();
+      });
+    } else {
+      uni.stopPullDownRefresh();
+    }
+  },
+};
+</script>
+<style lang="scss" scoped>
+</style>

+ 75 - 0
ghsApp/src/pagesStore/me/income.vue

@@ -0,0 +1,75 @@
+<template>
+	<view class="app-content">
+		<div class="list-by_box" v-if="!$util.isEmpty(list.data)">
+			<t-table :headerBackgroundColor="'#F0F2F6'">
+				<t-tr header>
+					<t-th v-for="(item, index) in columns" :key="index" :align="item.align">
+						{{ item.name }}
+					</t-th>
+				</t-tr>
+				<t-tr v-for="(item, index) in list.data" :key="index">
+					<t-td v-for="(column, colIndex) in columns" :key="colIndex" :align="column.align" :color="column.color" >
+						<view>
+							{{ item[column.dataIndex] || "" }}
+						</view>
+					</t-td>
+				</t-tr>
+			</t-table>
+		</div>
+		<block v-else>
+			<AppWrapperEmpty title="暂无数据" :is-empty="$util.isEmpty(list.data)" />
+		</block>
+	</view>
+</template>
+<script>
+import AppWrapperEmpty from "@/components/app-wrapper-empty";
+import { list } from "@/mixins";
+import { capitaList } from '@/api/store'
+export default {
+	name: "income",
+	components: {
+		AppWrapperEmpty
+	},
+	mixins: [list],
+	data() {
+		return {
+			columns: [
+				{name: "事项",dataIndex: "event",color: "info",align: "center"},
+				{name: "金额",dataIndex: "amount",color: "info",align: "center"},
+				{name: "累计收入",dataIndex: "totalIncome",color: "info",align: "center"},
+				{name: "时间",dataIndex: "addTime",color: "info",align: "center"}
+			]
+		};
+	},
+	methods: {
+		init() {
+			this.getList();
+		},
+		getList(){
+			return capitaList({
+				page: this.list.page,
+				io: 1
+			}).then(res=>{
+				 this.completes(res);
+			})
+		}
+	},
+	onPullDownRefresh() {
+		this.resetList();
+		this.getList().then(res => {
+		uni.stopPullDownRefresh();
+		});
+	},
+	onReachBottom() {
+    if (!this.list.finished) {
+      this.getList().then(res => {
+        uni.stopPullDownRefresh();
+      });
+    } else {
+      uni.stopPullDownRefresh();
+    }
+  },
+};
+</script>
+<style lang="scss" scoped>
+</style>

+ 1 - 1
ghsApp/src/pagesStore/me/incomeExpenses.vue

@@ -31,7 +31,7 @@ import AppTabs from "@/components/plugin/tabs";
 import { list } from "@/mixins";
 import { capitaList } from '@/api/store'
 export default {
-	name: "IncomeExpenses", //收支记录
+	name: "income", //收支记录
 	components: {
 		AppWrapperEmpty,
 		AppTabs