Browse Source

非订单款项增加类别

zhengjinyi 2 years ago
parent
commit
47ab34eddb
4 changed files with 81 additions and 60 deletions
  1. 9 0
      filters/filters.js
  2. 62 6
      pages/collection/list.vue
  3. 2 53
      pages/relation/nonorder/detail.vue
  4. 8 1
      utils/config.tabs.js

+ 9 - 0
filters/filters.js

@@ -27,6 +27,15 @@ export function formatStateType(value) {// 收款状态: 1待确认、2已确
     }
     return map[value]
 }
+export function formatNewReceiptType(value) {// 非订单类别: 1上架费、2订单返佣、3认证通会员、4认证通企划
+    const map = {
+        1: '上架费',
+        2: '订单返佣',
+        3: '认证通会员',
+        4: '认证通企划',
+    }
+    return map[value]
+}
 
 export function formatOrderType(value) {// 订单来源
     const map = {

+ 62 - 6
pages/collection/list.vue

@@ -22,6 +22,12 @@
 					<view class="text">{{ item.name }}</view>
 				</view>
 			</view>
+			<view class="main day" v-if="currents == 1">
+				<view class="main-item tab small" v-for="(item, index) in listNoTbasType" :key="index"
+					:class="{ tabActive: tabCurrents == index }" @click="tabClick(3, index, item.type)">
+					<view class="text">{{ item.name }}</view>
+				</view>
+			</view>
 			<view class="main day" v-if="currents == 2 || currents == 3">
 				<view class="main-item tab" v-for="(item, index) in listReturnType" :key="index"
 					:class="{ tabActive: tabCurrents == index }" @click="tabClick(2, index, item.type)">
@@ -31,7 +37,7 @@
 		</view>
 		<tui-skeleton v-if="skeletonShow" backgroundColor="#fafafa" borderRadius="10rpx" :isLoading	="true" :loadingType="7"></tui-skeleton>
 		<view class="user-section" v-else :style="{
-				top: currents == 1 ? CustomBar + 71 + 'px' : CustomBar + 105 + 'px',
+				top: CustomBar + 105 + 'px',
 				left: 0 + 'px'
 			}">
 			<view class="header-content">
@@ -45,6 +51,9 @@
 								<view class="list-title-t">
 									<view class="list-title-tip">
 										<text class="badges">{{ receipt.receiptType | formatReceiptType }}</text>
+										<text class="badgesa" v-if="receipt.receiptType == 2">
+											{{ receipt.newReceiptType | formatNewReceiptType }}
+										</text>
 									</view>
 									<view class="list-title-num" :style="{ color: formatColor(receipt.receiptStatus) }">{{
 										receipt.receiptStatusText 
@@ -164,7 +173,8 @@
 		defaultAllTabs,
 		defaultServiceTabs ,
 		listTabsType,
-		listReturnType
+		listReturnType,
+		listNoTbasType
 	} from '@/utils/config.tabs.js'
 	import {
 		mapState,
@@ -195,6 +205,7 @@
 				listTabs: [],// 收款款项类型
 				listTabsType: listTabsType, //收款状态:
 				listReturnType: listReturnType, //收款状态:
+				listNoTbasType: listNoTbasType, //非订单筛选类别:
 				date: currentDate,
 				currents: 0,
 				tabCurrents: 0,
@@ -498,7 +509,7 @@
 			},
 			tabClick(num, index, type) {
 				switch (num) {
-					case 1:
+					case 1:// 订单款
 						this.isEmpty = false
 						this.pullUpOn = true
 						this.currents = index
@@ -507,10 +518,11 @@
 						this.listQuery.startDate = ''
 						this.listQuery.endDate = ''
 						this.listQuery.smsContent = ''
+						this.listQuery.newReceiptType = ''
 						this.getOrderDatainit()
 						this.tabCurrents = 0
 						break
-					case 2:
+					case 2: 
 						this.isEmpty = false
 						this.pullUpOn = true
 						this.tabCurrents = index
@@ -519,6 +531,17 @@
 						this.listQuery.smsContent = ''
 						this.listQuery.receiptStatus = type
 						this.getOrderDatainit()
+						break
+					case 3:// 非订单款类别选项
+						this.isEmpty = false
+						this.pullUpOn = true
+						this.tabCurrents = index
+						this.listQuery.startDate = ''
+						this.listQuery.endDate = ''
+						this.listQuery.smsContent = ''
+						this.listQuery.newReceiptType = type
+						this.getOrderDatainit()
+						break
 				}
 			},
 			toNoSms(url) {
@@ -671,7 +694,6 @@
 					background: #f7f7f7;
 					margin: 0 10rpx;
 					padding: 0 20rpx;
-
 					.text {
 						width: 100%;
 						height: 50rpx;
@@ -682,8 +704,29 @@
 						color: #666666;
 						text-align: center;
 					}
+					&.small{
+						width: auto;
+						border-radius: 8rpx;
+						background: #f7f7f7;
+						margin: 0 10rpx;
+						padding: 0 18rpx;
+						.text {
+							width: 100%;
+							height: 50rpx;
+							line-height: 50rpx;
+							display: block;
+							float: left;
+							font-size: $font-size-22;
+							color: #666666;
+							text-align: center;
+						}
+						&.tabActive {
+							.text {
+								color: $btn-confirm;
+							}
+						}
+					}
 				}
-
 				&.active {
 					.text {
 						color: $btn-confirm;
@@ -905,6 +948,19 @@
 					text-align: center;
 					color: #ffffff;
 				}
+				.badgesa {
+					display: block;
+					float: left;
+					padding: 0 15rpx;
+					height: 40rpx;
+					line-height: 40rpx;
+					border-radius: 4rpx;
+					background: #7fba4f;
+					font-size: $font-size-24;
+					text-align: center;
+					color: #ffffff;
+					margin-left: 24rpx;
+				}
 			}
 		}
 

+ 2 - 53
pages/relation/nonorder/detail.vue

@@ -39,7 +39,7 @@
 					<view class="list-title-t">
 						<view class="list-title-tip">
 							<text class="badges">{{ receiptInfo.receiptType | formatReceiptType }}</text>
-							<text class="badgesa">{{ receiptInfo.newReceiptType | newReceiptTypeType }}</text>
+							<text class="badgesa">{{ receiptInfo.newReceiptType | formatNewReceiptType }}</text>
 						</view>
 					</view>
 					<view class="list-title-b">
@@ -51,7 +51,7 @@
 						</view>
 					</view>
 					<view class="list-title-b">
-						款时间:<text class="text">{{ receiptInfo.receiptDate }}</text>
+						款时间:<text class="text">{{ receiptInfo.receiptDate }}</text>
 					</view>
 					<template v-if="receiptInfo.smsContent">
 						<view class="list-title-b">收款短信:</view>
@@ -184,57 +184,6 @@ export default {
 		this.getOrderReceiptDetail(this.receiptId)
 	},
 	filters: {
-		newReceiptTypeType(value) {
-			switch (value) {
-				case 1:
-					return '上架费'
-					break
-				case 2:
-					return '订单返佣'
-					break
-				case 3:
-					return '认证通会员'
-					break
-				case 4:
-					return '认证通企划'
-					break
-			}
-		},
-		formatSourceType(value) {
-			switch (value) {
-				case 1:
-					return '订单'
-					break
-				case 2:
-					return '非订单'
-					break
-				case 3:
-					return '返佣'
-					break
-				case 4:
-					return '订单款或者非订单款'
-					break
-				case 5:
-					return '供应商退款'
-					break
-			}
-		},
-		formatStateType(value) {
-			switch (value) {
-				case 0:
-					return '待确认'
-					break
-				case 1:
-					return '已确认'
-					break
-				case 2:
-					return '待审核'
-					break
-				case 3:
-					return '审核通过'
-					break
-			}
-		},
 		NumFormat(value) {
 			//处理金额
 			if (value) {

+ 8 - 1
utils/config.tabs.js

@@ -20,7 +20,14 @@ export const listTabsType = [
     {name: '待审核',type: 2},
     {name: '审核通过',type: 3}
 ]
-
+//订单款 收款状态:0全部 1待确认、2已确认(待审核)、3审核通过、4审核未通过、5收款撤销【线上支付成功为审核通过】
+export const listNoTbasType = [
+    {name: '全部',type: 0},
+    {name: '上架费',type: 1},
+    {name: '订单返佣',type: 2},
+    {name: '认证通会员',type: 3},
+    {name: '认证通企划',type: 4}
+]
 //收款状态:0全部 1待确认、2已确认(待审核)、3审核通过、4审核未通过、5收款撤销【线上支付成功为审核通过】
 export const listReturnType = [
     {name: '全部',type: 0},