Browse Source

总赊账

shish 1 năm trước cách đây
mục cha
commit
54f80375f6

+ 106 - 0
ghsApp/src/admin/custom/showTotalBalance.vue

@@ -0,0 +1,106 @@
+<template>
+	<view class="app-content">
+		<form>
+			<view class="module-com input-line-wrap">
+
+				<tui-list-cell class="line-cell" :hover="false">
+					<view class="tui-title">批发总赊账</view>
+					<view>{{ pfDebt }}</view>
+				</tui-list-cell>
+
+				<tui-list-cell class="line-cell" :hover="false">
+					<view class="tui-title">批发总余额</view>
+					<view>{{ pfBalance }}</view>
+				</tui-list-cell>
+
+				<tui-list-cell class="line-cell" :hover="false">
+					<view class="tui-title">零售总赊账</view>
+					<view>{{ lsDebt }}</view>
+				</tui-list-cell>
+
+				<tui-list-cell class="line-cell" :hover="false">
+					<view class="tui-title">零售总余额</view>
+					<view>{{ lsBalance }}</view>
+				</tui-list-cell>
+
+			</view>
+		</form>
+	</view>
+</template>
+<script>
+import TuiListCell from '@/components/plugin/list-cell'
+import AppAvatarModule from '@/components/module/app-avatar'
+import AppAreaSel from '@/components/app-area-sel'
+import { showTotalBalance } from "@/api/custom"
+export default {
+	name: 'totalBalance',
+	components: {
+		TuiListCell,
+		AppAvatarModule,
+		AppAreaSel
+	},
+	data() {
+		return {
+			lsBalance:0,
+			lsDebt:0,
+			pfBalance:0,
+			pfDebt:0
+		}
+	},
+	onLoad() {
+
+	},
+	onShow() {
+	},
+	methods: {
+		init() {
+			showTotalBalance().then(res=>{
+				if(res.code == 1){
+					this.lsBalance = res.data.ls.balance||0
+					this.lsDebt = res.data.ls.debt||0
+					this.pfBalance = res.data.pf.balance||0
+					this.pfDebt = res.data.pf.debt||0
+				}
+			})
+		}
+	}
+}
+</script>
+<style lang="scss" scoped>
+	.app-content {
+		min-height: calc(100vh - 20upx);
+		padding-top:10upx;
+		padding-bottom:150upx;
+	}
+	.prompt-text {
+		color: $fontColor3;
+		padding-left: 30upx;
+		margin-bottom: 30upx;
+	}
+	.module-com {
+		.member-wrap {
+			.member-det {
+				font-size: 24upx;
+				margin-left: 20upx;
+			}
+		}
+		.remark-wrap {
+			align-items: flex-start;
+			.remark {
+				height: 180upx;
+			}
+		}
+	}
+	// 按钮
+	.confirm-btn {
+		position: fixed;
+		bottom: 0upx;
+		width: calc(100% - 60upx);
+		margin: 60upx 30upx 20upx;
+		background-color: white;
+		z-index: 999;
+		.admin-button-com {
+			width: 100%;
+		}
+	}
+</style>

+ 1 - 0
ghsApp/src/admin/home/apply.vue

@@ -72,6 +72,7 @@ export default {
                         {name: "损耗总览",img: `${this.$constant.imgUrl}/ghs/home/jyzk.png`,url: "/admin/stat/waste"},
                         {name: "结账跟踪",img: `${this.$constant.imgUrl}/ghs/home/jyzk.png`,url: "/admin/stat/clear"},
                         {name: "配送业绩",img: `${this.$constant.imgUrl}/ghs/home/jyzk.png`,url: "/admin/stat/sendYj"},
+                        {name: "赊账汇总",img: `${this.$constant.imgUrl}/ghs/home/jyzk.png`,url: "/admin/custom/showTotalBalance"},
                     ]
                 },
                 {

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

@@ -182,7 +182,7 @@
 			<div class="total-blo">
 				<div class="total-list" v-for="(item, index) in overview" :key="index" @click="pageTo(item)">
 					<div class="list-num">
-						<block v-if="lookMoney == 0 && item.name=='总赊账'">0</block>
+						<block v-if="item.name=='总赊账'">查看</block>
 						<block v-else>{{ $util.numberFormat(item.value) }}</block>
 					</div>
 					<div class="app-color-3">{{ item.name }}</div>
@@ -910,8 +910,8 @@ export default {
 			margin: 20upx 0upx;
 			border-right: 1upx solid $borderColor;
 			.list-num {
-				margin-bottom: 8upx;
-				font-size: 36upx;
+				margin-bottom:8upx;
+				font-size: 34upx;
 				font-weight: bold;
 			}
 		}

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

@@ -1,5 +1,9 @@
 import https from '@/plugins/luch-request_0.0.7/request'
 
+export const showTotalBalance = data => {
+	return https.get('/custom/show-total-balance', data)
+}
+
 export const setChange = data => {
 	return https.post('/custom/set-change', data)
 }

+ 1 - 0
ghsApp/src/pages.json

@@ -57,6 +57,7 @@
 			"pages": [
 				{"path": "set","style": {"navigationBarTitleText": "设置"}},
 				{"path": "selectCustom","style": {"navigationBarTitleText": "选择客户"}},
+				{"path": "showTotalBalance","style": {"navigationBarTitleText": "赊账与余额汇总"}},
 				{"path": "levelSet","style": {"navigationBarTitleText": "客户等级标准"}},
 				{"path": "visit","style": {"navigationBarTitleText": "今日访客"}},
 				{"path": "debtChange","style": {"navigationBarTitleText": "欠款变动明细","enablePullDownRefresh": false}},

+ 106 - 0
hdApp/src/admin/custom/showTotalBalance.vue

@@ -0,0 +1,106 @@
+<template>
+	<view class="app-content">
+		<form>
+			<view class="module-com input-line-wrap">
+
+				<tui-list-cell class="line-cell" :hover="false">
+					<view class="tui-title">批发总赊账</view>
+					<view>{{ pfDebt }}</view>
+				</tui-list-cell>
+
+				<tui-list-cell class="line-cell" :hover="false">
+					<view class="tui-title">批发总余额</view>
+					<view>{{ pfBalance }}</view>
+				</tui-list-cell>
+
+				<tui-list-cell class="line-cell" :hover="false">
+					<view class="tui-title">零售总赊账</view>
+					<view>{{ lsDebt }}</view>
+				</tui-list-cell>
+
+				<tui-list-cell class="line-cell" :hover="false">
+					<view class="tui-title">零售总余额</view>
+					<view>{{ lsBalance }}</view>
+				</tui-list-cell>
+
+			</view>
+		</form>
+	</view>
+</template>
+<script>
+import TuiListCell from '@/components/plugin/list-cell'
+import AppAvatarModule from '@/components/module/app-avatar'
+import AppAreaSel from '@/components/app-area-sel'
+import { showTotalBalance } from "@/api/custom"
+export default {
+	name: 'totalBalance',
+	components: {
+		TuiListCell,
+		AppAvatarModule,
+		AppAreaSel
+	},
+	data() {
+		return {
+			lsBalance:0,
+			lsDebt:0,
+			pfBalance:0,
+			pfDebt:0
+		}
+	},
+	onLoad() {
+
+	},
+	onShow() {
+	},
+	methods: {
+		init() {
+			showTotalBalance().then(res=>{
+				if(res.code == 1){
+					this.lsBalance = res.data.ls.balance||0
+					this.lsDebt = res.data.ls.debt||0
+					this.pfBalance = res.data.pf.balance||0
+					this.pfDebt = res.data.pf.debt||0
+				}
+			})
+		}
+	}
+}
+</script>
+<style lang="scss" scoped>
+	.app-content {
+		min-height: calc(100vh - 20upx);
+		padding-top:10upx;
+		padding-bottom:150upx;
+	}
+	.prompt-text {
+		color: $fontColor3;
+		padding-left: 30upx;
+		margin-bottom: 30upx;
+	}
+	.module-com {
+		.member-wrap {
+			.member-det {
+				font-size: 24upx;
+				margin-left: 20upx;
+			}
+		}
+		.remark-wrap {
+			align-items: flex-start;
+			.remark {
+				height: 180upx;
+			}
+		}
+	}
+	// 按钮
+	.confirm-btn {
+		position: fixed;
+		bottom: 0upx;
+		width: calc(100% - 60upx);
+		margin: 60upx 30upx 20upx;
+		background-color: white;
+		z-index: 999;
+		.admin-button-com {
+			width: 100%;
+		}
+	}
+</style>

+ 2 - 1
hdApp/src/admin/home/apply.vue

@@ -96,7 +96,8 @@ export default {
             {name: "采购统计",img: `${this.$constant.imgUrl}/ghs/home/jyzk2.png`,url: "/admin/stat/cgStat",pf:1},
             {name: "采购花材",img: `${this.$constant.imgUrl}/ghs/home/jyzk2.png`,url: "/admin/stat/cgItem",pf:1},
             {name: "绿植统计",img: `${this.$constant.imgUrl}/ghs/home/jyzk2.png`,url: "/admin/stat/kindLz",pf:1},
-            {name: "损耗总览",img: `${this.$constant.imgUrl}/ghs/home/jyzk2.png`,url: "/admin/stat/waste"}
+            {name: "损耗总览",img: `${this.$constant.imgUrl}/ghs/home/jyzk2.png`,url: "/admin/stat/waste"},
+            {name: "赊账汇总",img: `${this.$constant.imgUrl}/ghs/home/jyzk.png`,url: "/admin/custom/showTotalBalance"},
           ]
         }
       ]

+ 3 - 2
hdApp/src/admin/home/workbench.vue

@@ -116,7 +116,8 @@
         <div class="total-tit">总览</div>
         <div class="total-blo">
           <div class="total-list" v-for="(item, index) in overview" :key="index" @click="pageTo(item)">
-            <div class="list-num">{{ $util.numberFormat(item.value) }}</div>
+						<block v-if="item.name=='总赊账'">查看</block>
+            <div class="list-num" v-else>{{ $util.numberFormat(item.value) }}</div>
             <div class="app-color-3">{{ item.name }}</div>
           </div>
         </div>
@@ -806,7 +807,7 @@ export default {
 			border-right: 1upx solid $borderColor;
 			.list-num {
 				margin-bottom: 8upx;
-				font-size: 36upx;
+				font-size: 34upx;
 				font-weight: bold;
 			}
 		}

+ 4 - 0
hdApp/src/api/custom/index.js

@@ -1,5 +1,9 @@
 import https from '@/plugins/luch-request_0.0.7/request'
 
+export const showTotalBalance = data => {
+	return https.get('/custom/show-total-balance', data)
+}
+
 export const getCustomInfo = data => {
 	return https.get('/custom/info', data)
 }

+ 1 - 0
hdApp/src/pages.json

@@ -45,6 +45,7 @@
 			"pages": [
 				{"path": "addCustom","style": {"navigationBarTitleText": "添加客户"}},
 				{"path": "selectCustom","style": {"navigationBarTitleText": "选择客户"}},
+				{"path": "showTotalBalance","style": {"navigationBarTitleText": "赊账与余额汇总"}},
 				{"path": "balanceChange","style": {"navigationBarTitleText": "余额变动明细"}},
 				{"path": "debtChange","style": {"navigationBarTitleText": "欠款变动明细"}},
 				{"path": "rechargeChange","style": {"navigationBarTitleText": "充值记录"}},