Pārlūkot izejas kodu

commit -m 服务返佣

zhengjinyi 2 gadi atpakaļ
vecāks
revīzija
140c81d67d

+ 1 - 1
filters/filters.js

@@ -30,7 +30,7 @@ export function formatStateType(value) {// 收款状态: 1待确认、2已确
 export function formatNewReceiptType(value) {// 非订单类别: 1上架费、2订单返佣、3认证通会员、4认证通企划
     const map = {
 	    1: '上架费',
-	    2: '订单返佣',
+	    2: '服务返佣',
 	    3: '认证通会员',
 	    4: '认证通企划',
     }

+ 14 - 0
pages/collection/list.vue

@@ -51,6 +51,7 @@
 								<view class="list-title-t">
 									<view class="list-title-tip">
 										<text class="badges">{{ receipt.receiptType | formatReceiptType }}</text>
+										<text class="badgesb" v-if="receipt.receiptType == 2 && receipt.secondHandOrderFlag ==1">二手</text>
 										<text class="badgesa" v-if="receipt.receiptType == 2">
 											{{ receipt.newReceiptType | formatNewReceiptType }}
 										</text>
@@ -961,6 +962,19 @@
 					color: #ffffff;
 					margin-left: 24rpx;
 				}
+				.badgesb{
+					display: block;
+					float: left;
+					padding: 0 15rpx;
+					height: 40rpx;
+					line-height: 40rpx;
+					border-radius: 4rpx;
+					background: #FCB16A;
+					font-size: $font-size-24;
+					text-align: center;
+					color: #ffffff;
+					margin-left: 24rpx;
+				}
 			}
 		}
 

+ 15 - 3
pages/relation/nonorder/add.vue

@@ -208,7 +208,7 @@ export default {
 					value: 1
 				},
 				{
-					name: '订单返佣',
+					name: '服务返佣',
 					value: 2
 				},
 				{
@@ -246,11 +246,13 @@ export default {
 			opcity: 1,
 			contentModalTitle: '',
 			contentModalText: '', //操作文字提示语句
-			modal: false
+			modal: false,
+			receiptAmount:0
 		}
 	},
 	onLoad(option) {
 		this.operateParams.id = option.id
+		this.getOrderReceiptDetail(option.id)
 		let obj = {}
 		// #ifdef MP-WEIXIN
 		obj = wx.getMenuButtonBoundingClientRect()
@@ -280,6 +282,16 @@ export default {
 		...mapState(['hasLogin', 'userInfo'])
 	},
 	methods: {
+		getOrderReceiptDetail(id) {
+			// 收款详情
+			this.OrderService.orderReceiptDetail({ id: id })
+				.then(response => {
+					this.receiptAmount = response.data.receiptAmount
+				})
+				.catch(err => {
+					console.log('款项详情异常')
+				})
+		},
 		bindPickerChange(e) {
 			// 选择类别
 			this.handleShopInfo = {}
@@ -343,7 +355,7 @@ export default {
 		},
 		handleChangeOrder(){
 			//跳转选择订单关联
-			this.$api.navigateTo('/pages/relation/nonorder/list')
+			this.$api.navigateTo(`/pages/relation/nonorder/list?receiptAmount=${this.receiptAmount}`)
 		},
 		handleClick(e) {
 			// 确认收款

+ 108 - 51
pages/relation/nonorder/list.vue

@@ -11,7 +11,13 @@
 				<text class="header-sit-text">选择关联订单</text>
 			</view>
 		</view>
-		<tui-skeleton v-if="skeletonShow" backgroundColor="#fafafa" borderRadius="10rpx" :isLoading	="true" :loadingType="7"></tui-skeleton>
+		<tui-skeleton
+			v-if="skeletonShow"
+			backgroundColor="#fafafa"
+			borderRadius="10rpx"
+			:isLoading="true"
+			:loadingType="7"
+		></tui-skeleton>
 		<view class="container-content" v-else>
 			<view class="tui-header-tabs day clearfix" :style="{ top: CustomBar + 6 + 'px' }">
 				<view class="tui-header-tabmain">
@@ -40,24 +46,26 @@
 						<empty v-if="isEmpty" :typeIndex="currents" :navbarHeight="navbarHeight"></empty>
 						<!-- 列表 -->
 						<view v-else class="tui-order-content">
-							<view
-								class="tui-order-item"
-								v-for="(order, index) in orderList"
-								:key="index"
-							>
+							<view class="tui-order-item" v-for="(order, index) in orderList" :key="index">
 								<view class="list-title" @click.stop="orderDetail(order.mainOrder.orderId)">
 									<view class="list-title-t">
 										<view class="list-title-tip">
-											<text class="badges">{{ order.mainOrder.orderType | formatOrderType }}</text>
+											<text class="badges">{{
+												order.mainOrder.orderType | formatOrderType
+											}}</text>
 										</view>
 										<view class="list-title-tag" v-if="order.mainOrder.organizeId == 3">
 											<text class="badges">维沙</text>
 										</view>
-										<view class="list-title-num">{{ order.mainOrder.status | stateExpFormat }}</view>
+										<view class="list-title-num">{{
+											order.mainOrder.status | stateExpFormat
+										}}</view>
 									</view>
 									<view class="list-title-a">
 										<view class="list-title-a-text">
-											子订单编号:<text class="text">{{ order.shopOrderNo }} ( {{ order.shopOrderId }} )</text>
+											子订单编号:<text class="text"
+												>{{ order.shopOrderNo }} ( {{ order.shopOrderId }} )</text
+											>
 										</view>
 										<view class="list-title-a-text">
 											供应商名称:<text class="text">{{ order.shopName }}</text>
@@ -67,24 +75,32 @@
 										</view>
 									</view>
 									<view class="list-title-b">
-										客户名称:<text class="text">{{ order.mainOrder.userName ? order.mainOrder.userName : '无' }}</text>
+										客户名称:<text class="text">{{
+											order.mainOrder.userName ? order.mainOrder.userName : '无'
+										}}</text>
 									</view>
 									<view class="list-title-b">
-										订单编号:<text class="text">{{ order.mainOrder.orderNo }} ( {{ order.mainOrder.orderId }} )</text>
+										订单编号:<text class="text"
+											>{{ order.mainOrder.orderNo }} ( {{ order.mainOrder.orderId }} )</text
+										>
 									</view>
 									<view class="list-title-b">
 										下单日期:<text class="text">{{ order.mainOrder.orderTime }}</text>
 									</view>
 									<view class="list-title-b">
 										<view class="list-title-b-item ">
-											订单金额:<text class="text">¥{{ order.mainOrder.payTotalFee | NumFormat }}</text>
+											订单金额:<text class="text"
+												>¥{{ order.mainOrder.payTotalFee | NumFormat }}</text
+											>
 										</view>
 										<view class="list-title-b-item ">
-											已收金额:<text class="text">¥{{ order.mainOrder.paidAmount | NumFormat }}</text>
+											已收金额:<text class="text"
+												>¥{{ order.mainOrder.paidAmount | NumFormat }}</text
+											>
 										</view>
 									</view>
 								</view>
-								<view class="list-checked" @click="checkedOrder(order,index)">
+								<view class="list-checked" @click="checkedOrder(order, index)">
 									<text
 										class="iconfont"
 										:class="order.isChecked ? 'icon-yixuanze' : 'icon-weixuanze'"
@@ -102,10 +118,27 @@
 					</view>
 				</view>
 			</view>
-			<view class="distinguish-button" :style="{ paddingBottom: isIphoneX ? '68rpx' : '24rpx' }" v-if="orderList.length>0">
+			<view
+				class="distinguish-button"
+				:style="{ paddingBottom: isIphoneX ? '68rpx' : '24rpx' }"
+				v-if="orderList.length > 0"
+			>
 				<view class="button" @click="confirmDistinguish">确定</view>
 			</view>
-		</view>	
+		</view>
+		<!-- 弹窗 -->
+		<tui-modal
+			:show="modal"
+			@click="handleClick"
+			@cancel="hideMobel"
+			:content="contentModalText"
+			:button="modalButton"
+			color="#666666"
+			:padding="'20rpx 20rpx'"
+			:size="30"
+			shape="circle"
+			:maskClosable="false"
+		></tui-modal>
 	</view>
 </template>
 <script>
@@ -114,7 +147,7 @@ import { mapState, mapMutations } from 'vuex'
 const defaultListQuery = {
 	pageNum: 1, //页数
 	pageSize: 10, //条数
-	keyWord: '',
+	keyWord: ''
 }
 export default {
 	components: {
@@ -124,11 +157,11 @@ export default {
 		return {
 			CustomBar: this.CustomBar, // 顶部导航栏高度
 			isIphoneX: this.$store.state.isIphoneX,
-			skeletonShow:true,
+			skeletonShow: true,
 			listQuery: Object.assign({}, defaultListQuery),
 			orderList: [],
 			checkedOrderList: [],
-			checkedIndex:'',
+			checkedIndex: '',
 			scrollTop: 0,
 			isEmpty: false,
 			loadding: false,
@@ -140,11 +173,11 @@ export default {
 			contentModalText: '', //操作文字提示语句
 			modal: false,
 			modal1: false,
-			returnBrokerage:0,
-			confirmParams:{
-				shopOrderId:0,
-				verbalAmount:'',
-				rebateRemarks:''
+			returnBrokerage: 0,
+			confirmParams: {
+				shopOrderId: 0,
+				verbalAmount: '',
+				rebateRemarks: ''
 			},
 			rightDrawer: false,
 			hanldReceipt: {}, //储存监听收款信息
@@ -152,10 +185,22 @@ export default {
 			height: 64, //header高度
 			top: 0, //标题图标距离顶部距离
 			scrollH: 0, //滚动总高度
-			opcity: 1
+			opcity: 1,
+			rebateFee: 0,
+			receiptAmount: 0,
+			contentModalText: '',
+			modal: false,
+			modalButton: [
+				{
+					text: '确认',
+					plain: false
+				}
+			]
 		}
 	},
-	onLoad() {
+	onLoad(option) {
+		this.receiptAmount = option.receiptAmount
+		console.log('receiptAmount', this.receiptAmount)
 		let obj = {}
 		uni.getSystemInfo({
 			success: res => {
@@ -167,7 +212,7 @@ export default {
 		})
 	},
 	computed: {
-		...mapState(['hasLogin']),	
+		...mapState(['hasLogin'])
 	},
 	methods: {
 		orderNoReceiptShoporderList() {
@@ -256,37 +301,50 @@ export default {
 				this.$util.msg('请选择订单!', 2000)
 				return
 			}
+			if (this.receiptAmount != this.rebateFee) {
+				this.modal = true
+				this.contentModalText = '收款金额不等于该订单的返佣服务费,请修改服务费后再关联!'
+				return
+			}
 			// 带参数返回
 			var pages = getCurrentPages()
-			var prevPage = pages[pages.length - 2]  //上一个页面	
-				prevPage.setData({select:'select'})
+			var prevPage = pages[pages.length - 2] //上一个页面
+			prevPage.setData({ select: 'select' })
 			uni.navigateBack()
 		},
-		checkedOrder(order,index) {
+		checkedOrder(order, index) {
 			// 勾选关联订单
 			this.checkedIndex = index
 			this.orderList.forEach((el, index) => {
 				if (this.checkedIndex == index) {
 					el.isChecked = true
 					this.confirmParams.shopOrderId = el.shopOrderId
+					this.rebateFee = el.rebateFee
 					this.returnBrokerage = el.brokerage
-					uni.setStorageSync('selectOrder',el)
+					uni.setStorageSync('selectOrder', el)
 				} else {
 					el.isChecked = false
 				}
 			})
-			console.log('shopOrderId',this.confirmParams.shopOrderId)
-			console.log('returnBrokerage',this.returnBrokerage)
+			console.log('shopOrderId', this.confirmParams.shopOrderId)
+			console.log('returnBrokerage', this.returnBrokerage)
 		},
 		orderDetail(orderId) {
 			//订单详情跳转
 			this.$api.navigateTo(`/pages/relation/order/detail?orderId=${orderId}`)
 		},
-		initListQuery(){// 初始化
-			this.orderList =[]
+		initListQuery() {
+			// 初始化
+			this.orderList = []
 			this.loadding = true
 			this.pullUpOn = true
 			this.listQuery.pageNum = 1
+		},
+		handleClick() {
+			this.modal = false
+		},
+		hideMobel() {
+			this.modal = false
 		}
 	},
 	onPageScroll(e) {
@@ -581,7 +639,7 @@ page {
 		border-radius: 4rpx;
 		background-color: rgba(247, 247, 247, 1);
 		margin-bottom: 10rpx;
-		.text{
+		.text {
 			color: #999999;
 		}
 		.list-title-a-text {
@@ -602,7 +660,7 @@ page {
 		line-height: 44rpx;
 		color: #666666;
 		text-align: left;
-		.text{
+		.text {
 			color: #999999;
 		}
 		.list-title-b-item {
@@ -615,21 +673,21 @@ page {
 		}
 	}
 }
-.tui-prompt-title{
+.tui-prompt-title {
 	line-height: 44rpx;
 	text-align: center;
 }
-.tui-prompt-input{
+.tui-prompt-input {
 	width: 100%;
 	height: 80rpx;
 	box-sizing: border-box;
 	background: #f7f7f7;
 	border-radius: 8rpx;
-	padding:15rpx 20rpx;
+	padding: 15rpx 20rpx;
 	padding-left: 50rpx;
 	margin: 20rpx 0;
 	position: relative;
-	.text{
+	.text {
 		display: block;
 		width: 50rpx;
 		height: 80rpx;
@@ -646,39 +704,38 @@ page {
 		line-height: 80rpx;
 		font-size: $font-size-26;
 		color: $color-system;
-		&.none{
+		&.none {
 			display: none;
 		}
 	}
 }
-.tui-prompt-flex{
+.tui-prompt-flex {
 	width: 100%;
 	height: 70rpx;
 	display: flex;
 	margin-top: 20rpx;
-	.btn{
+	.btn {
 		flex: 1;
 		line-height: 70rpx;
 		font-size: $font-size-26;
 		text-align: center;
-		color: #FFFFFF;
+		color: #ffffff;
 		border-radius: 33rpx;
 		margin: 0 24rpx;
-		&.btn-cancel{
-			background: #F7F7F7;
+		&.btn-cancel {
+			background: #f7f7f7;
 			color: #999999;
 		}
-		&.btn-confirm{
+		&.btn-confirm {
 			background: $color-system;
 		}
 	}
-	
 }
-.tui-prompt-text{
+.tui-prompt-text {
 	line-height: 44rpx;
 	font-size: $font-size-26;
 	color: #333333;
-	.text{
+	.text {
 		color: $color-system;
 	}
 }

+ 14 - 0
pages/relation/return/detail.vue

@@ -64,6 +64,7 @@
 							<view class="list-title-t">
 								<view class="list-title-tip">
 									<text class="badges">{{ order.mainOrder.orderType | formatOrderType }}</text>
+									<text class="badgesb" v-if="order.secondHandOrderFlag ==1">二手</text>
 								</view>
 								<view class="list-title-tag" v-if="order.mainOrder.organizeId == 3">
 									<text class="badges">维沙</text>
@@ -519,6 +520,19 @@
 								text-align: center;
 								color: #666666;
 							}
+							.badgesb{
+								display: block;
+								float: left;
+								padding: 0 15rpx;
+								height: 40rpx;
+								line-height: 40rpx;
+								border-radius: 20rpx;
+								background: #FCB16A;
+								font-size: $font-size-24;
+								text-align: center;
+								color: #ffffff;
+								margin-left: 24rpx;
+							}
 						}
 						.list-title-tag {
 							float: left;

+ 14 - 0
pages/relation/return/index.vue

@@ -105,6 +105,7 @@
 											<text class="badges">{{
 												order.mainOrder.orderType | formatOrderType
 											}}</text>
+											<text class="badgesb" v-if="order.secondHandOrderFlag ==1">二手</text>
 										</view>
 										<view class="list-title-tag" v-if="order.mainOrder.organizeId == 3">
 											<text class="badges">维沙</text>
@@ -864,6 +865,19 @@ page {
 				text-align: center;
 				color: #666666;
 			}
+			.badgesb{
+				display: block;
+				float: left;
+				padding: 0 15rpx;
+				height: 40rpx;
+				line-height: 40rpx;
+				border-radius: 20rpx;
+				background: #FCB16A;
+				font-size: $font-size-24;
+				text-align: center;
+				color: #ffffff;
+				margin-left: 24rpx;
+			}
 		}
 		.list-title-tag {
 			float: left;

+ 1 - 1
utils/config.tabs.js

@@ -24,7 +24,7 @@ export const listTabsType = [
 export const listNoTbasType = [
     {name: '全部',type: 0},
     {name: '上架费',type: 1},
-    {name: '订单返佣',type: 2},
+    {name: '服务返佣',type: 2},
     {name: '认证通会员',type: 3},
     {name: '认证通企划',type: 4}
 ]