shish 1 день назад
Родитель
Сommit
aa21af55c1

+ 53 - 12
hdh5/admin/ghs/pay.vue

@@ -39,20 +39,26 @@
 					<text class="pay-debt-tip__action">一键填入</text>
 				</view>
 			</view>
+			<!-- 有可用余额时展示当前账户余额 -->
+			<view v-else-if="hasPositiveBalance" class="pay-balance-tip">
+				<text class="pay-balance-tip__label">当前账户余额</text>
+				<text class="pay-balance-tip__value">¥{{ accountBalance }}</text>
+			</view>
 		</view>
 
 		<!-- 账户与明细:独立信息卡,居中排版 -->
 		<view class="pay-extra-card">
-			<view v-if="displayCustomName" class="pay-account">
+			<view v-if="displayCustomName || hasPositiveBalance" class="pay-account">
 				<view class="pay-account__meta">
-					<text class="pay-account__name">付款人:{{ displayCustomName }}</text>
+					<text v-if="displayCustomName" class="pay-account__name">付款人:{{ displayCustomName }}</text>
+					<text v-if="hasPositiveBalance" class="pay-account__balance">余额 ¥{{ accountBalance }}</text>
 				</view>
 			</view>
 			<view
 				class="pay-action-row"
 				:class="{
 					'pay-action-row--single': !showGatheringBtn,
-					'pay-action-row--with-account': !!displayCustomName
+					'pay-action-row--with-account': !!(displayCustomName || hasPositiveBalance)
 				}">
 				<view
 					v-if="showGatheringBtn"
@@ -193,6 +199,14 @@ export default {
 		hasOutstanding() {
 			return this.outstandingAmount > 0
 		},
+		/** 净 balance 为正时的可用余额 */
+		accountBalance() {
+			const bal = parseFloat((this.customInfo && this.customInfo.balance) || 0)
+			return bal > 0 ? parseFloat(bal.toFixed(2)) : 0
+		},
+		hasPositiveBalance() {
+			return this.accountBalance > 0
+		},
 		showGatheringBtn() {
 			return this.hasOutstanding && !!this.id
 		},
@@ -568,6 +582,33 @@ export default {
 	line-height: 32upx;
 }
 
+/* 正余额提示条:与待结条对称,蓝色系 */
+.pay-balance-tip {
+	display: flex;
+	flex-direction: row;
+	align-items: center;
+	justify-content: center;
+	margin-top: 28upx;
+	padding: 20upx 22upx;
+	background: #f0f7ff;
+	border-radius: 12upx;
+	box-sizing: border-box;
+}
+
+.pay-balance-tip__label {
+	font-size: 26upx;
+	color: #666;
+	line-height: 36upx;
+}
+
+.pay-balance-tip__value {
+	margin-left: 12upx;
+	font-size: 34upx;
+	font-weight: 600;
+	color: #1677ff;
+	line-height: 36upx;
+}
+
 /* 账户 + 明细入口:白卡居中 */
 .pay-extra-card {
 	margin: 20upx 24upx 0;
@@ -603,27 +644,27 @@ export default {
 }
 
 .pay-account__meta {
-	margin-left: 16upx;
 	display: flex;
 	flex-direction: column;
-	align-items: flex-start;
+	align-items: center;
 	min-width: 0;
 }
 
-.pay-account__label {
-	font-size: 22upx;
-	color: #999;
-	line-height: 30upx;
-}
-
 .pay-account__name {
-	margin-top: 2upx;
 	font-size: 30upx;
 	font-weight: 600;
 	color: #222;
 	line-height: 40upx;
 }
 
+.pay-account__balance {
+	margin-top: 8upx;
+	font-size: 26upx;
+	color: #1677ff;
+	line-height: 36upx;
+	font-weight: 500;
+}
+
 .pay-action-row {
 	display: flex;
 	flex-direction: row;

Разница между файлами не показана из-за своего большого размера
+ 0 - 0
hdh5/unpackage/dist/build/web/assets/_plugin-vue_export-helper.Dz5-xA6u.js


+ 1 - 1
hdh5/unpackage/dist/build/web/assets/admin-cg-alipay.Bii9O_-Z.js → hdh5/unpackage/dist/build/web/assets/admin-cg-alipay.B1Yfy5gR.js

@@ -1 +1 @@
-import{s as a,j as e,u as t,c as n,w as s,f as o,q as i,i as r,o as d,e as p}from"./index-B7atlFnH.js";import{c as l}from"./index.CqhSNh7n.js";import{_ as c}from"./_plugin-vue_export-helper.C1IbsE0K.js";const h=c({name:"alipay",components:{},mixins:[],data:()=>({payUrl:"",hasRenew:1}),computed:{},onLoad(a){let e=a.orderSn?a.orderSn:"";this.payInit(e)},mounted(){},methods:{init(){},go(){1==this.hasRenew&&(window.location.href=this.payUrl)},payInit(e){if(""==e)return a({title:"没有找到订单编号",icon:"none",duration:1500}),!1;l({orderSn:e}).then((e=>{if(0==e.code)return a({title:e.msg,icon:"none",duration:1500}),!1;this.hasRenew=e.data.hasRenew?e.data.hasRenew:0,e.data.hasRenew&&1==e.data.hasRenew&&(this.payUrl=e.data.payUrl,window.location.href=this.payUrl)}))}}},[["render",function(a,l,c,h,w,u){const m=i,f=r;return d(),e("div",{class:"app-content pay-wrap"},[t("div",{class:"delivery-wrap"},[t("div",{class:"btn-wrap"},[1==w.hasRenew?(d(),n(m,{key:0,class:"button-com red",onClick:l[0]||(l[0]=a=>u.go())},{default:s((()=>[p("正在打开支付宝...")])),_:1})):o("",!0),0==w.hasRenew?(d(),n(f,{key:1,style:{"margin-top":"50upx","font-size":"40upx","font-weight":"bold","text-align":"center"}},{default:s((()=>[p("商家还未开通此功能")])),_:1})):o("",!0)])])])}],["__scopeId","data-v-1045a385"]]);export{h as default};
+import{s as a,j as e,u as t,c as n,w as s,f as o,q as i,i as r,o as d,e as p}from"./index-op2gIMtD.js";import{c as l}from"./index.Ccq_rt3q.js";import{_ as c}from"./_plugin-vue_export-helper.Dz5-xA6u.js";const h=c({name:"alipay",components:{},mixins:[],data:()=>({payUrl:"",hasRenew:1}),computed:{},onLoad(a){let e=a.orderSn?a.orderSn:"";this.payInit(e)},mounted(){},methods:{init(){},go(){1==this.hasRenew&&(window.location.href=this.payUrl)},payInit(e){if(""==e)return a({title:"没有找到订单编号",icon:"none",duration:1500}),!1;l({orderSn:e}).then((e=>{if(0==e.code)return a({title:e.msg,icon:"none",duration:1500}),!1;this.hasRenew=e.data.hasRenew?e.data.hasRenew:0,e.data.hasRenew&&1==e.data.hasRenew&&(this.payUrl=e.data.payUrl,window.location.href=this.payUrl)}))}}},[["render",function(a,l,c,h,w,u){const m=i,f=r;return d(),e("div",{class:"app-content pay-wrap"},[t("div",{class:"delivery-wrap"},[t("div",{class:"btn-wrap"},[1==w.hasRenew?(d(),n(m,{key:0,class:"button-com red",onClick:l[0]||(l[0]=a=>u.go())},{default:s((()=>[p("正在打开支付宝...")])),_:1})):o("",!0),0==w.hasRenew?(d(),n(f,{key:1,style:{"margin-top":"50upx","font-size":"40upx","font-weight":"bold","text-align":"center"}},{default:s((()=>[p("商家还未开通此功能")])),_:1})):o("",!0)])])])}],["__scopeId","data-v-1045a385"]]);export{h as default};

+ 1 - 1
hdh5/unpackage/dist/build/web/assets/admin-clear-alipay.C0X15oWr.js → hdh5/unpackage/dist/build/web/assets/admin-clear-alipay.CmxwGva1.js

@@ -1 +1 @@
-import{s as a,j as e,u as t,c as n,w as s,f as o,q as i,i as r,o as d,e as p}from"./index-B7atlFnH.js";import{b as l}from"./index.CqhSNh7n.js";import{_ as c}from"./_plugin-vue_export-helper.C1IbsE0K.js";const h=c({name:"alipay",components:{},mixins:[],data:()=>({payUrl:"",hasRenew:1}),computed:{},onLoad(a){let e=a.orderSn?a.orderSn:"";this.payInit(e)},mounted(){},methods:{init(){},go(){1==this.hasRenew&&(window.location.href=this.payUrl)},payInit(e){if(""==e)return a({title:"没有找到订单号",icon:"none",duration:1500}),!1;l({orderSn:e}).then((e=>{if(0==e.code)return a({title:e.msg,icon:"none",duration:1500}),!1;this.hasRenew=e.data.hasRenew?e.data.hasRenew:0,e.data.hasRenew&&1==e.data.hasRenew&&(this.payUrl=e.data.payUrl,window.location.href=this.payUrl)}))}}},[["render",function(a,l,c,h,w,u){const m=i,f=r;return d(),e("div",{class:"app-content pay-wrap"},[t("div",{class:"delivery-wrap"},[t("div",{class:"btn-wrap"},[1==w.hasRenew?(d(),n(m,{key:0,class:"button-com red",onClick:l[0]||(l[0]=a=>u.go())},{default:s((()=>[p("正在打开支付宝...")])),_:1})):o("",!0),0==w.hasRenew?(d(),n(f,{key:1,style:{"margin-top":"50upx","font-size":"40upx","font-weight":"bold","text-align":"center"}},{default:s((()=>[p("商家还未开通此功能")])),_:1})):o("",!0)])])])}],["__scopeId","data-v-12a9cc21"]]);export{h as default};
+import{s as a,j as e,u as t,c as n,w as s,f as o,q as i,i as r,o as d,e as p}from"./index-op2gIMtD.js";import{b as l}from"./index.Ccq_rt3q.js";import{_ as c}from"./_plugin-vue_export-helper.Dz5-xA6u.js";const h=c({name:"alipay",components:{},mixins:[],data:()=>({payUrl:"",hasRenew:1}),computed:{},onLoad(a){let e=a.orderSn?a.orderSn:"";this.payInit(e)},mounted(){},methods:{init(){},go(){1==this.hasRenew&&(window.location.href=this.payUrl)},payInit(e){if(""==e)return a({title:"没有找到订单号",icon:"none",duration:1500}),!1;l({orderSn:e}).then((e=>{if(0==e.code)return a({title:e.msg,icon:"none",duration:1500}),!1;this.hasRenew=e.data.hasRenew?e.data.hasRenew:0,e.data.hasRenew&&1==e.data.hasRenew&&(this.payUrl=e.data.payUrl,window.location.href=this.payUrl)}))}}},[["render",function(a,l,c,h,w,u){const m=i,f=r;return d(),e("div",{class:"app-content pay-wrap"},[t("div",{class:"delivery-wrap"},[t("div",{class:"btn-wrap"},[1==w.hasRenew?(d(),n(m,{key:0,class:"button-com red",onClick:l[0]||(l[0]=a=>u.go())},{default:s((()=>[p("正在打开支付宝...")])),_:1})):o("",!0),0==w.hasRenew?(d(),n(f,{key:1,style:{"margin-top":"50upx","font-size":"40upx","font-weight":"bold","text-align":"center"}},{default:s((()=>[p("商家还未开通此功能")])),_:1})):o("",!0)])])])}],["__scopeId","data-v-12a9cc21"]]);export{h as default};

Разница между файлами не показана из-за своего большого размера
+ 0 - 0
hdh5/unpackage/dist/build/web/assets/admin-ghs-balanceChange.B7ImsLlI.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
hdh5/unpackage/dist/build/web/assets/admin-ghs-pay.CHZ7NOAG.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
hdh5/unpackage/dist/build/web/assets/admin-ghs-pay.M93Gge3E.js


Разница между файлами не показана из-за своего большого размера
+ 1 - 1
hdh5/unpackage/dist/build/web/assets/index-op2gIMtD.js


+ 1 - 1
hdh5/unpackage/dist/build/web/assets/index.CqhSNh7n.js → hdh5/unpackage/dist/build/web/assets/index.Ccq_rt3q.js

@@ -1 +1 @@
-import{h as a}from"./_plugin-vue_export-helper.C1IbsE0K.js";const s=async s=>a.post("/purchase/ali-pay",s),e=async s=>a.post("/purchase-clear/ali-pay",s),p=async s=>a.get("/purchase/debt-list",s),c=async s=>a.get("/ghs/detail",s),r=async s=>a.post("/purchase-clear/create-order",s);export{r as a,e as b,s as c,c as g,p};
+import{h as a}from"./_plugin-vue_export-helper.Dz5-xA6u.js";const s=async s=>a.post("/purchase/ali-pay",s),e=async s=>a.post("/purchase-clear/ali-pay",s),p=async s=>a.get("/purchase/debt-list",s),c=async s=>a.get("/ghs/detail",s),r=async s=>a.post("/purchase-clear/create-order",s);export{r as a,e as b,s as c,c as g,p};

+ 1 - 1
hdh5/unpackage/dist/build/web/assets/index.DXss9nx3.js → hdh5/unpackage/dist/build/web/assets/index.DpRsrvgd.js

@@ -1 +1 @@
-import{h as e}from"./_plugin-vue_export-helper.C1IbsE0K.js";const g=g=>e.get("/ghs/get-ghs-data",g),s=g=>e.get("/ghs-balance-change/list",g);export{s as b,g};
+import{h as e}from"./_plugin-vue_export-helper.Dz5-xA6u.js";const g=g=>e.get("/ghs/get-ghs-data",g),s=g=>e.get("/ghs-balance-change/list",g);export{s as b,g};

Разница между файлами не показана из-за своего большого размера
+ 0 - 0
hdh5/unpackage/dist/build/web/assets/pagesPurchase-gathering.CqXONbWO.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
hdh5/unpackage/dist/build/web/assets/pay-BRzoAymn.css


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
hdh5/unpackage/dist/build/web/assets/pay-BaP-jlXb.css


+ 1 - 1
hdh5/unpackage/dist/build/web/index.html

@@ -16,7 +16,7 @@
 	<script src="/static/web/quill-1.3.7.min.js"></script>
     <!--preload-links-->
     <!--app-context-->
-    <script type="module" crossorigin src="/assets/index-B7atlFnH.js"></script>
+    <script type="module" crossorigin src="/assets/index-op2gIMtD.js"></script>
     <link rel="stylesheet" crossorigin href="/assets/index-BvquTqJD.css">
   </head>
   <body>

Некоторые файлы не были показаны из-за большого количества измененных файлов