Kaynağa Gözat

1. 优化提示

MONSTER-ygh 1 yıl önce
ebeveyn
işleme
db35af9031

+ 1 - 1
pages/balance/index.vue

@@ -61,7 +61,7 @@
 				statusBarHeight: 0, // 状态栏安全距离
 				monry: 0,
 				tool: [ // 我的工具
-					{ title: "提现密码设置",icon: this.$commonConfig.staticUrl + 'balance/zhifu.png', url: '/pages/passwordSet/index?type=1' },
+					{ title: "支付设置",icon: this.$commonConfig.staticUrl + 'balance/zhifu.png', url: '/pages/passwordSet/index?type=1' },
 					{ title: "收支明细",icon: this.$commonConfig.staticUrl + 'balance/mingxi.png', url: '/pages/consume/index' },
 				],
 				withdrawInfo: {}

+ 46 - 18
pages/cash/index.vue

@@ -84,6 +84,16 @@
 				</view>
 			</u-overlay>
 		</view>
+		<u-modal :show="showModel" @confirm="confirmModel" :confirmText="confirmText" ref="uModal" :asyncClose="true" >
+			<view class="slot-content">
+				<view style="display: flex;justify-content: center;padding-bottom: 20rpx;">
+					<image style="width: 100rpx;height: 100rpx;" :src="showStatus == 0 ? suImage : errorImage" mode="scaleToFill" />
+				</view>
+				<view>
+					<rich-text :nodes="contentModel"></rich-text>
+				</view>
+			</view>
+		</u-modal>
 	</view>
 </template>
 
@@ -117,6 +127,12 @@
 				password: '',
 				personList:[],
 				serviceMoney: null,
+				showModel: false,
+				contentModel: '提交申请提交成功,佣金将会在1-2个工作日内发放到银行卡,请耐心等待!',
+				errorImage: this.$commonConfig.staticUrl + 'cash/shiban.png',
+				suImage: this.$commonConfig.staticUrl + 'cash/chenggong.png',
+				showStatus: null,
+				confirmText: '关闭',
 			}
 		},
 		onLoad(page) {
@@ -133,6 +149,7 @@
 		},
 		onShow() {
 			//this.statusBarHeight = getApp().globalData.statusBarHeight
+			this.showModel = false
 			this.getWithdrawInfo()
 
 		},
@@ -268,6 +285,9 @@
 					this.personList.forEach((item,index)=> {
 						list.push(item.personsId)
 					})
+					this.contentModel = "提现申请提交失败!"
+					this.confirmText = '关闭'
+					this.showStatus = 1
 					let res = await this.$u.api.withdrawApply({
 						noSign: 1,
 						userid: this.distribution_user_info.userId,
@@ -279,21 +299,23 @@
 						withdrawList: list
 					})
 
-					if (res && res.code === 200) {
-						navigateTo('/pages/cashPrompt/index',{
-							id: res.data.orderId,
-							serviceMoney: this.serviceMoney,
-							// ...res.data.bankInfo,
-							// moneyValue: this.moneyValue,
-							// withdrawType: 'wechat',
-							// serviceType: this.withdrawInfo.serviceType,
-							// serviceCharge: this.withdrawInfo.serviceCharge
-						})
+					if (res && res.code == 200) {
+						this.contentModel = "提现申请提交成功,佣金将会在1-2个工作日内发放到银行卡,请耐心等待!"
+						this.confirmText = '返回'
+						this.showStatus = 0
+						this.showModel = true
+						
+						// navigateTo('/pages/cashPrompt/index',{
+						// 	id: res.data.orderId,
+						// 	serviceMoney: this.serviceMoney,
+						// 	// ...res.data.bankInfo,
+						// 	// moneyValue: this.moneyValue,
+						// 	// withdrawType: 'wechat',
+						// 	// serviceType: this.withdrawInfo.serviceType,
+						// 	// serviceCharge: this.withdrawInfo.serviceCharge
+						// })
 					} else {
-						uni.showToast({
-							title: res.msg,
-							icon: 'none'
-						})
+						this.showModel = true
 						this.password = ''
 					}
 					this.showModal = false
@@ -302,10 +324,7 @@
 					console.error("e===", e)
 					this.password = ''
 					this.showModal = false
-					uni.showToast({
-						title: "提交失败",
-						icon: 'none'
-					})
+					this.showModel = true
 				}
 			},
 			/**
@@ -359,6 +378,15 @@
 				});
 				//window.history.replaceState(null, null, document.URL); // 保留此行代码
 			},
+			/**  */
+			confirmModel() {
+				this.showModal = false
+				if(this.showStatus == 0) {
+					uni.navigateBack({
+						delta: 2
+					})
+				}
+			}
 		}
 	}
 </script>

+ 37 - 3
pages/distributor/index.vue

@@ -31,7 +31,7 @@
 							<view v-for="(item,index) in dataList" :key="item.id" class="item u-flex">
 								<u-checkbox v-if="serialType==0" shape="circle" activeColor="#ED0000" :key="index"
 									:name="item.name" :checked="item.checked" @change="toggleCheck(index)" class="checkbox" />
-								<view class="item-box">
+								<view :class="['item-box',serialType==0 ? 'item-box-shadow':'']">
 									<view class="text u-flex u-row-between text-order">
 										<view class="name">订单号:{{item.orderId}}</view>
 									</view>
@@ -46,6 +46,12 @@
 										<view class="name">核销数量:{{ item.wipeNum }}</view>
 										<view class="withdrawTotal">获得佣金:<text class="num"> ¥ {{item.totalPrice}}</text></view>
 									</view>
+									<view v-if="serialType!=0" class="text u-flex u-row-between text-perform">
+										<view class="name">提现时间:{{ item.createTime }}</view>
+									</view>
+									<view v-if="serialType==1" class="text u-flex u-row-between text-perform">
+										<view class="name">到账时间:{{ item.receivedTime }}</view>
+									</view>
 								</view>
 							</view>
 						</u-checkbox-group>
@@ -74,6 +80,19 @@
 				<view class="btn" v-else>确定</view>
 			</view>
 		</view>
+		<view class="cart-bottom" v-else-if="dataList.length>0">
+			<view class="inner u-flex u-row-between">
+				<view class="left u-flex">
+					<view class="checkbox" style="padding: 10px;"></view>
+					<view class="total-price-wrap u-flex" style="display: flex;flex-direction: column;align-items: flex-start;">
+						<view class="total">笔数:共{{dataList.length}}笔</view>
+						<view class="totalPrice  u-flex">
+							合计佣金: <text class="num"> {{ totalPriceAll }}</text>
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
 		<u-toast ref="uToast"></u-toast>
 	</view>
 </template>
@@ -82,6 +101,7 @@
 	import {
 		navigateTo
 	} from "@/utils/util.js"
+	import { Decimal } from 'decimal.js';//引入
 	export default {
 		data() {
 			return {
@@ -123,6 +143,7 @@
 				}],
 				// 购物车列表
 				dataList: [],
+				totalPriceAll: null,
 			}
 		},
 		computed: {
@@ -158,6 +179,15 @@
 			this.statusBarHeight = getApp().globalData.statusBarHeight
 			this.$refs.customScrollList.refresh()
 		},
+		watch:{
+			dataList(){
+				let totalPriceAll = 0
+				this.dataList.forEach((item,index)=>{
+					totalPriceAll = new Decimal(totalPriceAll).add(new Decimal(item.totalPrice)) 
+				})
+				this.totalPriceAll = totalPriceAll
+			}
+		},
 		methods: {
 			/**
 			 * @author ygh
@@ -209,6 +239,7 @@
 									}[item.status] || ''
 								} 
 							})
+							this.totalPriceAll = res.data.realPrice
 						}else {
 							this.dataList = []
 						}
@@ -558,12 +589,15 @@
 			border-radius: 10rpx;
 			padding-left: 18rpx;
 			margin-bottom: 24rpx;
+			box-sizing: border-box;
 			.item-box {
 				width: 100%;
-				box-shadow: -6rpx 0rpx 20rpx -18rpx rgba(0,0,0,0.5);
 				padding: 10rpx 10rpx 15rpx;
+				box-sizing: border-box;
+			}
+			.item-box-shadow {
+				box-shadow: -6rpx 0rpx 20rpx -18rpx rgba(0,0,0,0.5);
 			}
-			
 			.text{
 				flex: 1;
 				color: #999;

BIN
static/cash/chenggong.png


BIN
static/cash/shiban.png