MONSTER-ygh il y a 1 an
Parent
commit
9f86ce8cee
2 fichiers modifiés avec 26 ajouts et 4 suppressions
  1. 6 2
      pages/cash/index.vue
  2. 20 2
      pages/cashPrompt/index.vue

+ 6 - 2
pages/cash/index.vue

@@ -51,7 +51,7 @@
 							</u-cell-group>
 						</view>
 
-						<view class="cash-content-cash-submit">
+						<view v-if="withdrawInfo.allowWithdraw == 1 " class="cash-content-cash-submit">
 							<view @click="openModal">提现</view>
 						</view>
 					</view>
@@ -122,7 +122,8 @@
 				withdrawInfo: {},
 				showModal: false,
 				password: '',
-				personList:[]
+				personList:[],
+				serviceMoney: null,
 			}
 		},
 		onLoad(page) {
@@ -276,6 +277,7 @@
 					if (res && res.code === 200) {
 						navigateTo('/pages/cashPrompt/index',{
 							id: res.data.orderId,
+							serviceMoney: this.serviceMoney,
 							// ...res.data.bankInfo,
 							// moneyValue: this.moneyValue,
 							// withdrawType: 'wechat',
@@ -305,11 +307,13 @@
 			setServiceType(data) {
 				if (data && data.serviceType) {
 					if(data.serviceType == 1){
+						this.serviceMoney = data.serviceCharge
 						return ('¥' + data.serviceCharge)
 					}else {
 						let num1 = this.withdrawInfo.serviceCharge;
 						let num = isNaN(num1) ? 0 : (Number(num1) / 100)
 						let money = num ? new Decimal(this.moneyValue).mul(new Decimal(num)) : 0
+						this.serviceMoney = money
 						return '¥' + money
 						
 					}

+ 20 - 2
pages/cashPrompt/index.vue

@@ -21,7 +21,7 @@
 				<view>
 					<view>
 						<text>服务费</text>
-						<text>¥{{ retailStatistics && retailStatistics.servicePrice }}</text>
+						<text>¥{{ serviceMoney }}</text>
 					</view>
 					<view>
 						<text>到账账户</text>
@@ -47,7 +47,8 @@
 					{ title: "已核销",num: 0,decimals:2 },
 				],
 				retailStatistics: {}, // 统计信息
-				params: {}
+				params: {},
+				serviceMoney: null,
 			}
 		},
 		onLoad(e) {
@@ -85,6 +86,7 @@
 			/** 获取数据 */
 			async orderWithdrawSelectById(){
 				try{
+					this.serviceMoney = this.params.serviceMoney
 					let res = await this.$u.api.orderWithdrawSelectById({
 						noSign: 1,
 						userid: this.distribution_user_info.userId,
@@ -119,6 +121,22 @@
 				}
 				return src
 			},
+			/**
+			 * 设置服务费显示
+			 */
+			setServiceType(data) {
+				if (data && data.serviceType) {
+					if(data.serviceType == 1){
+						return ('¥' + data.serviceCharge)
+					}else {
+						let num1 = this.withdrawInfo.serviceCharge;
+						let num = isNaN(num1) ? 0 : (Number(num1) / 100)
+						let money = num ? new Decimal(this.moneyValue).mul(new Decimal(num)) : 0
+						return '¥' + money
+						
+					}
+				}
+			},
 		}
 	}
 </script>