瀏覽代碼

commit -m 平台服务费关联

zhengjinyi 1 年之前
父節點
當前提交
3bfbde9c92

+ 14 - 5
components/cm-module/orderDetails/list-button.vue

@@ -14,7 +14,7 @@
 			:is-cancel="isCancel"
 			@click="handleClickItem"
 			@cancel="closeActionSheet"
-		></tui-actionsheet>
+		/>
 	</view>
 </template>
 
@@ -22,7 +22,7 @@
 export default {
 	name: 'button',
 	props: {
-		status: {//收款款项类型:1订单款,2非订单款,3返佣款 4订单款或者非订单款(因财务阶段无法区分订单非订单), 5供应商退款
+		status: {//收款款项类型:1订单款,2非订单款,3返佣款 4订单款或者非订单款(因财务阶段无法区分订单非订单), 5供应商退款 10 平台服务费
 			type: Number
 		},
 		dataInfo: {
@@ -40,7 +40,7 @@ export default {
 					action:[
 						{ text: '作废',handleId:0},
 						{ text: '设为非订单款',handleId:2},
-						{ text: '设为返佣款',handleId:3},
+						{ text: '设为平台服务费',handleId:10},
 						{ text: '设为供应商退款',handleId:4},
 					],
 				},
@@ -49,7 +49,7 @@ export default {
 					action:[
 						{ text: '作废',handleId:0},
 						{ text: '设为普通款',handleId:1},
-						{ text: '设为返佣款',handleId:3},
+						{ text: '设为平台服务费',handleId:10},
 						{ text: '设为供应商退款',handleId:4}
 					],
 				},
@@ -66,7 +66,16 @@ export default {
 					action:[
 						{ text: '作废',handleId:0},
 						{ text: '设为普通款',handleId:1},
-						{ text: '设为返佣款',handleId:3}
+						{ text: '设为平台服务费',handleId:10}
+					],
+				},
+				{ 
+					type:10,
+					action:[
+						{ text: '作废',handleId:0},
+						{ text: '设为普通款',handleId:1},
+						{ text: '设为非订单款',handleId:2},
+						{ text: '设为供应商退款',handleId:4}
 					],
 				},
 			],

+ 2 - 2
components/cm-module/receipt/receipt-details.vue

@@ -22,14 +22,14 @@
 				客户名称:<text class="text">{{ order.userName ? order.userName : '无' }}</text>
 			</view>
 			<view class="list-title-b">
-				订单编号:<text class="text">{{ order.shopOrderNo }} ( {{ order.shopOrderId }} )</text>
+				订单编号:<text class="text">{{ order.shopOrderNo }} ( {{ order.shopOrderId }} )</text>
 			</view>
 			<view class="list-title-b">
 				下单日期:<text class="text">{{ order.orderTime }}</text>
 			</view>
 			<view class="list-title-b">
 				<view class="list-title-b-item ">
-					订单金额:<text class="text">¥{{ order.totalAmount | NumFormat }}</text>
+					订单金额:<text class="text">¥{{ order.totalAmount | NumFormat }}</text>
 				</view>
 				<view class="list-title-b-item ">
 					余额抵扣:<text class="text">¥{{ order.accountAmount | NumFormat }}</text>

+ 34 - 9
filters/filters.js

@@ -6,18 +6,29 @@ export function NumFormat(value) {
         return '0.00'
     }
 }
-export function formatReceiptType(value) {// 款项类型:1订单款,2非订单款,3返佣款 4订单款或者非订单款(因财务阶段无法区分订单非订单), 5供应商退款
+/**
+ *款项类型
+ *1.订单款 2.非订单款 3.返佣款 4.订单款或者非订单款(因财务阶段无法区分订单非订单
+ *5.供应商退款 6.平台服务费 7.平台服务费欠款
+ */
+export function formatReceiptType(value) {
     const map = {
         1: '订单',
         2: '非订单',
         3: '返佣',
         4: '订单款或者非订单款',
-        5: '供应商退款'
+        5: '供应商退款',
+        10: '平台服务费',
+        11: '平台服务费欠款'
+		
     }
     return map[value]
 }
-
-export function formatStateType(value) {// 收款状态: 1待确认、2已确认(待审核)、3审核通过、4审核未通过、5收款撤销【线上支付成功为审核通过】
+/**
+ *收款状态
+ *1.待确认、2.已确认(待审核)、3.审核通过、4.审核未通过、5.收款撤销【线上支付成功为审核通过】
+ */
+export function formatStateType(value) {
     const map = {
         1: '待确认',
         2: '已确认(待审核)',
@@ -27,7 +38,11 @@ export function formatStateType(value) {// 收款状态: 1待确认、2已确
     }
     return map[value]
 }
-export function formatNewReceiptType(value) {// 非订单类别: 1.上架费、2.订单返佣、3.认证通会员、4.认证通企划、5.其他
+/**
+ *非订单类别
+ *1.上架费、2.订单返佣、3.认证通会员、4.认证通企划、5.其他
+ */
+export function formatNewReceiptType(value) {
     const map = {
 	    1: '上架费',
 	    2: '服务返佣',
@@ -42,7 +57,11 @@ export function formatNewReceiptType(value) {// 非订单类别: 1.上架费
     }
 }
 
-export function formatOrderType(value) {// 订单来源
+/**
+ *订单来源
+ *0.协销订单、1.自主订单、2.客服订单
+ */
+export function formatOrderType(value) {
     const map = {
         0: '协销订单',
         1: '自主订单',
@@ -50,8 +69,10 @@ export function formatOrderType(value) {// 订单来源
     }
     return map[value]
 }
-
-export function stateExpFormat(value) {// 订单状态
+/**
+ *订单状态
+ */
+export function stateExpFormat(value) {
     const map = {
         0: '待确认',
         2: '交易完成',
@@ -70,7 +91,11 @@ export function stateExpFormat(value) {// 订单状态
     }
     return map[value]
 }
-export function organizeName(value) {// 组织名称
+/**
+ *组织名称
+ *0.采美、3.维沙、4.丽格
+ */
+export function organizeName(value) {
     const map = {
         0: '采美',
         3: '维沙',

+ 24 - 0
pages.json

@@ -123,6 +123,30 @@
 				"navigationStyle":"custom"
 			}
 		},
+		{
+			"path": "pages/relation/service/index",
+			"style": {
+				"navigationBarTitleText": "平台服务费关联",
+				"enablePullDownRefresh":true,
+				"navigationStyle":"custom"
+			}
+		},
+		{
+			"path": "pages/relation/service/detail",
+			"style": {
+				"navigationBarTitleText": "平台服务费详情",
+				"enablePullDownRefresh":true,
+				"navigationStyle":"custom"
+			}
+		},
+		{
+			"path": "pages/relation/service/list",
+			"style": {
+				"navigationBarTitleText": "录入平台服务费欠款",
+				"enablePullDownRefresh":true,
+				"navigationStyle":"custom"
+			}
+		},
 		{
 			"path": "pages/relation/refund/index",
 			"style": {

+ 1 - 1
pages/collection/detail.vue

@@ -22,7 +22,7 @@
 					</view>
 				</view>
 				<view class="section-rows">
-					<view class="rows-label">收款类型:</view>
+					<view class="rows-label">收款账号:</view>
 					<view class="rows-mains">
 						<text>{{ receipt.payTypeText }}</text>
 					</view>

+ 113 - 75
pages/collection/list.vue

@@ -105,7 +105,7 @@
 									关联金额:<text class="text">¥{{ receipt.associateAmount | NumFormat }}</text>
 								</view>
 								<view class="list-title-b">
-									收款类型:<text class="text">{{ receipt.payTypeText }}</text>
+									收款账号:<text class="text">{{ receipt.payTypeText }}</text>
 								</view>
 								<view class="list-title-b">
 									收款时间:<text class="text">{{ receipt.receiptDate }}</text>
@@ -142,20 +142,28 @@
 							</list-button>
 						</view>
 						<!--加载loadding-->
-						<tui-loadmore :visible="loadding" :index="3" type="black"></tui-loadmore>
-						<tui-nomore :visible="!pullUpOn" bgcolor="#F7F7F7" :text="nomoreText"></tui-nomore>
+						<tui-loadmore :visible="loadding" :index="3" type="black" />
+						<tui-nomore :visible="!pullUpOn" bgcolor="#F7F7F7" :text="nomoreText" />
 						<!--加载loadding-->
 					</view>
 				</view>
 			</view>
 		</view>
 		<!-- 口头返佣按钮 -->
-		<view
+		<!-- 		<view
 			class="tui-icon-button"
 			v-if="currents == 2 && returnBtnVisible"
 			@click="toNoSms('/pages/relation/return/list')"
 		>
 			<text class="iconfont icon-jiahao"></text>
+		</view> -->
+		<!-- 平台服务费按钮 -->
+		<view
+			class="tui-icon-button service"
+			v-if="currents == 3 && serviceBtnVisible"
+			@click="toNoSms('/pages/relation/service/list')"
+		>
+			<text class="iconfont icon-jiahao"></text>
 		</view>
 		<!--右抽屉-->
 		<tui-drawer mode="right" :visible="rightDrawer" @close="closeDrawer">
@@ -232,17 +240,12 @@
 	</view>
 </template>
 <script>
+import authorize from '@/common/config/authorize.js'
 import headerBack from '@/components/cm-module/headerNavbar/header-back' //自定义导航
 import listButton from '@/components/cm-module/orderDetails/list-button' //按钮
 import modalLayer from '@/components/modal-layer'
 import empty from '@/components/empty'
-import {
-	defaultAllTabs,
-	defaultServiceTabs,
-	listTabsType,
-	listReturnType,
-	listNoTbasType
-} from '@/utils/config.tabs.js'
+import { listTabsType, listReturnType, listNoTbasType } from '@/utils/config.tabs.js'
 import { mapState, mapMutations } from 'vuex'
 const defaultListQuery = {
 	endDate: '', //筛选结束时间
@@ -313,7 +316,7 @@ export default {
 		})
 	},
 	computed: {
-		...mapState(['USER_TYPE', 'handlebBtnVisible', 'returnBtnVisible', 'handleListTabs']),
+		...mapState(['USER_TYPE', 'handlebBtnVisible', 'returnBtnVisible', 'serviceBtnVisible', 'handleListTabs']),
 		startDate() {
 			return this.getDate('start')
 		},
@@ -322,72 +325,87 @@ export default {
 		}
 	},
 	methods: {
-		async initGetStotage() {
-			this.listTabs = this.handleListTabs
-			this.getOrderDatainit()
+		...mapMutations(['login', 'logout']),
+		async getWxAuthorize() {
+			// 初始化授权登录设置菜单权限
+			try {
+				const wXCode = await authorize.getCode('weixin')
+				const wEchat = await authorize.getUserInfo('weixin')
+				const param = { code: wXCode, encryptedData: wEchat.encryptedData, iv: wEchat.iv }
+				const res = await this.UserService.UserLoginAuthApplets(param)
+				const data = res.data
+				this.login(data)
+				this.$store.commit('updateStatus', data)
+				this.listTabs = this.handleListTabs
+				console.log('listTabs', this.listTabs)
+				this.getOrderDatainit()
+			} catch (error) {
+				this.logout()
+				this.$store.commit('updateStatus', error.data)
+			}
 		},
-		getOrderDatainit() {
-			this.initListQuery()
-			this.OrderService.orderReceiptList(this.listQuery)
-				.then(response => {
-					let data = response.data
-					if (data.list && data.list.length > 0) {
-						this.isEmpty = false
-						this.hasNextPage = response.data.hasNextPage
-						this.payList = data.list
-						this.pullFlag = false
-						setTimeout(() => {
-							this.pullFlag = true
-						}, 500)
-						if (this.hasNextPage) {
-							this.pullUpOn = false
-							this.nomoreText = '上拉显示更多'
-						} else {
-							if (this.payList.length < 4) {
-								this.pullUpOn = true
-								this.loadding = false
-							} else {
-								this.pullUpOn = false
-								this.loadding = false
-								this.nomoreText = '已至底部'
-							}
-						}
+		// 获取收款列表数据
+		async getOrderDatainit() {
+			try {
+				this.initListQuery()
+				const res = await this.OrderService.orderReceiptList(this.listQuery)
+				const data = res.data
+				if (data.list && data.list.length > 0) {
+					this.isEmpty = false
+					this.hasNextPage = data.hasNextPage
+					this.payList = data.list
+					this.pullFlag = false
+					setTimeout(() => {
+						this.pullFlag = true
+					}, 500)
+					if (this.hasNextPage) {
+						this.pullUpOn = false
+						this.nomoreText = '上拉显示更多'
 					} else {
-						this.isEmpty = true
-					}
-					this.skeletonShow = false
-				})
-				.catch(error => {
-					this.$util.msg(error.msg, 2000)
-				})
-		},
-		getOnReachBottomData() {
-			//上拉加载
-			this.listQuery.pageNum += 1
-			this.OrderService.orderReceiptList(this.listQuery)
-				.then(response => {
-					let data = response.data
-					if (data.list && data.list.length > 0) {
-						this.hasNextPage = data.hasNextPage
-						this.payList = this.payList.concat(data.list)
-						this.pullFlag = false // 防上拉暴滑
-						setTimeout(() => {
-							this.pullFlag = true
-						}, 500)
-						if (this.hasNextPage) {
-							this.pullUpOn = false
-							this.nomoreText = '上拉显示更多'
+						if (this.payList.length < 4) {
+							this.pullUpOn = true
+							this.loadding = false
 						} else {
 							this.pullUpOn = false
 							this.loadding = false
 							this.nomoreText = '已至底部'
 						}
 					}
-				})
-				.catch(error => {
-					this.$util.msg(error.msg, 2000)
-				})
+				} else {
+					this.isEmpty = true
+				}
+				this.skeletonShow = false
+			} catch (error) {
+				console.log('error', error)
+			}
+		},
+		// 上拉加载分页数据
+		async getOnReachBottomData() {
+			try {
+				this.listQuery.pageNum += 1
+				const res = await this.OrderService.orderReceiptList(this.listQuery)
+				const data = res.data
+				if (data.list && data.list.length > 0) {
+					this.hasNextPage = data.hasNextPage
+					this.payList = this.payList.concat(data.list)
+					this.pullFlag = false // 防上拉暴滑
+					setTimeout(() => {
+						this.pullFlag = true
+					}, 500)
+					if (this.hasNextPage) {
+						this.pullUpOn = false
+						this.nomoreText = '上拉显示更多'
+					} else {
+						this.pullUpOn = false
+						this.loadding = false
+						this.nomoreText = '已至底部'
+					}
+				}
+			} catch (error) {
+				console.log('error', error)
+			}
 		},
+		// 跳转
 		receiptDetail(receipt) {
 			switch (receipt.receiptType) {
 				case 1: // 1:订单 1待确认、2已确认(待审核)、3审核通过、4审核未通过、5收款撤销【线上支付成功为审核通过】
@@ -413,6 +431,23 @@ export default {
 						this.$api.navigateTo(`/pages/relation/return/detail?id=${receipt.id}`)
 					}
 					break
+				case 10: // 10:平台服务费
+					if (receipt.receiptStatus == 1 || receipt.receiptStatus == 4 || receipt.receiptStatus == 5) {
+						// 平台服务费待确认
+						this.$api.navigateTo(`/pages/relation/service/index?id=${receipt.id}`)
+					} else if (receipt.receiptStatus == 2 || receipt.receiptStatus == 3) {
+						console.log('111111111111')
+						this.$api.navigateTo(`/pages/relation/service/detail?id=${receipt.id}`)
+					}
+					break
+				case 11: // 11:平台服务费欠款
+					if (receipt.receiptStatus == 1 || receipt.receiptStatus == 4 || receipt.receiptStatus == 5) {
+						// 平台服务费待确认
+						this.$api.navigateTo(`/pages/relation/service/index?id=${receipt.id}`)
+					} else if (receipt.receiptStatus == 2 || receipt.receiptStatus == 3) {
+						this.$api.navigateTo(`/pages/relation/service/detail?id=${receipt.id}`)
+					}
+					break
 				case 5: // 4:供应商退款
 					if (receipt.receiptStatus == 1 || receipt.receiptStatus == 4 || receipt.receiptStatus == 5) {
 						// 返佣待确认
@@ -442,8 +477,8 @@ export default {
 				case 2: // 设为非订单款
 					this.$api.navigateTo(`/pages/relation/nonorder/add?id=${receipt.id}`)
 					break
-				case 3: // 设为返佣款
-					this.contentModalText = '确认将该款项设为返佣款项?'
+				case 10: // 设为平台服务费
+					this.contentModalText = '确认将该款项设为平台服务费?'
 					this.modal = true
 					break
 				case 4: // 设为供应商退款
@@ -465,7 +500,7 @@ export default {
 					case 1: // 设为普通款
 						this.handReceiptConfirm(this.handleOperId, this.hanldReceipt)
 						break
-					case 3: // 设为返佣款
+					case 10: // 设为返佣款
 						this.handReceiptConfirm(this.handleOperId, this.hanldReceipt)
 						break
 					case 4: // 设为供应商退款
@@ -503,8 +538,8 @@ export default {
 					this.operateParams.receiptType = 2
 					this.operateParams.noOrderReason = this.noOrderReason
 					break
-				case 3: // 设为返佣款
-					this.operateParams.receiptType = 3
+				case 10: // 设为返佣款
+					this.operateParams.receiptType = 10
 					break
 				case 4: // 设为供应商退款
 					this.operateParams.receiptType = 5
@@ -680,7 +715,7 @@ export default {
 		}
 	},
 	onShow() {
-		this.initGetStotage()
+		this.getWxAuthorize()
 	}
 }
 </script>
@@ -1213,6 +1248,9 @@ page {
 	position: fixed;
 	bottom: 120rpx;
 	right: 20rpx;
+	&.service {
+		background: #07c160;
+	}
 	.icon-jiahao {
 		font-size: $font-size-44;
 		color: #ffffff;

+ 3 - 3
pages/collection/nosms.vue

@@ -39,12 +39,12 @@
 					<text class="iconfont icon-xiayibu"></text>
 				</view>
 				<view class="section-rows">
-					<view class="rows-label">收款类型:</view>
+					<view class="rows-label">收款账号:</view>
 					<view class="rows-mains">
 						<picker @change="bindPickerChange(2, $event)" :value="index" :range="banksActions"
 							range-key="name">
 							<input class="input" type="text" disabled="true" v-model="banksTypeText"
-								placeholder="请选择收款类型" />
+								placeholder="请选择收款账号" />
 						</picker>
 					</view>
 					<text class="iconfont icon-xiayibu"></text>
@@ -243,7 +243,7 @@
 					case 2:
 						this.banksTypeText = this.banksActions[e.target.value].name
 						this.params.banksType = this.banksActions[e.target.value].value
-						console.log('收款类型', this.params.banksType)
+						console.log('收款账号', this.params.banksType)
 						break
 				}
 			},

+ 85 - 81
pages/collection/sms.vue

@@ -74,7 +74,7 @@
 						<text class="iconfont icon-xiayibu"></text>
 					</view>
 					<view class="section-rows" :class="isReceiptType ? 'disabled' : ''">
-						<view class="rows-label">收款类型:</view>
+						<view class="rows-label">收款账号:</view>
 						<view class="rows-mains">
 							<picker
 								@change="bindPickerChange(2, $event)"
@@ -88,7 +88,7 @@
 									type="text"
 									disabled="true"
 									v-model="banksTypeText"
-									placeholder="请选择收款类型"
+									placeholder="请选择收款账号"
 								/>
 							</picker>
 						</view>
@@ -158,7 +158,7 @@
 			cancelColor="#555555"
 			color="#4688fa"
 			@confirm="bindStartDateChange"
-		></tui-datetime>
+		/>
 		<!-- 弹窗提示 -->
 		<tui-modal
 			:show="modal"
@@ -171,8 +171,7 @@
 			:size="32"
 			shape="circle"
 			:maskClosable="false"
-		>
-		</tui-modal>
+		/>
 		<!-- 弹窗提示 -->
 		<tui-modal
 			:show="modal1"
@@ -185,8 +184,7 @@
 			:size="32"
 			shape="circle"
 			:maskClosable="false"
-		>
-		</tui-modal>
+		/>
 	</view>
 </template>
 <script>
@@ -254,8 +252,9 @@ export default {
 			],
 			paymentActions: [
 				{ name: '普通款项', value: 1 },
-				{ name: '返佣款项', value: 3 },
+				// { name: '平台服务费', value: 10 },
 				{ name: '供应商退款', value: 5 }
+				// { name: '返佣款项', value: 3 },
 			],
 			receiptTypeActions: [],
 			paymentTypeText: '普通款项', // 款项类型显示文案
@@ -263,7 +262,7 @@ export default {
 			params: {
 				smsContent:'', // 收款短信
 				payType: null, //付款类型
-				receiptType: 1, // 收款款项类型:1订单款,2非订单款,3返佣款 4订单款或者非订单款(因财务阶段无法区分订单非订单), 5供应商退款
+				receiptType: 1, // 收款款项类型:1订单款,2非订单款,3返佣款 4订单款或者非订单款(因财务阶段无法区分订单非订单), 5供应商退款 , 10 平台服务费
 				receiptAmount: '', //收款金额
 				handlingFee: '', //手续费
 				receiptDate: null // 收款时间
@@ -312,7 +311,7 @@ export default {
 	},
 	computed: {
 		...mapState(['hasLogin']),
-		disabled: function() {
+		disabled() {
 			let bool = true
 			if (this.receiptType == 1) {
 				if (this.params.smsContent || this.params.receiptAmount) {
@@ -327,53 +326,69 @@ export default {
 		}
 	},
 	methods: {
-		getOrderReceiptType() {
-			// 获取收款类型列表
-			this.OrderService.orderReceiptType()
-				.then(response => {
-					this.receiptTypeActions = response.data.map(item => ({
-						...item,
-						name: item.type,
-						value: item.id
-					}))
-				})
-				.catch(err => {
-					this.$util.msg(err.msg, 2000)
-				})
+		// 获取收款账号列表
+		async getOrderReceiptType() {
+			try{
+				const res = await this.OrderService.orderReceiptType()
+				const data = res.data
+				this.receiptTypeActions = data.map(item => ({
+					...item,
+					name: item.type,
+					value: item.id
+				}))
+			}catch(error){
+				console.log('error',error) 
+			}
 		},
-		orderReceiptReadSms() {
-			// 识别收款短信
-			this.OrderService.orderReceiptReadSms({smsContent:this.params.smsContent})
-				.then(response => {
-					const data = response.data
-					this.params.payType = data.payType
-					this.params.orderFlag = data.orderFlag
-					this.params.receiptAmount = this.handleReceiptAmount = data.receiptAmount
-					this.params.receiptDate = data.receiptDate
-					this.handleCharge = this.params.handlingFee = data.handlingFee
-					this.receiptTypeActions.forEach(el => {
-						if (this.params.payType === el.value) {
-							this.banksTypeText = el.name
-						}
-					})
-					if (this.params.handlingFee > 0) {
-						this.isCheckedCharge = true
-					}
-					// 处理收款类型禁止点击
-					this.isReceiptType = true
-					console.log('isReceiptType', this.isReceiptType)
-					this.initInput()
-				})
-				.catch(err => {
-					if(err.code === -2){
-						this.modal1 = true
-					}else{
-						this.$util.msg(err.msg, 2000)
+		// 识别收款短信
+		async orderReceiptReadSms() {
+			try{
+				const res = await this.OrderService.orderReceiptReadSms({smsContent:this.params.smsContent})
+				const data = res.data
+				this.params.payType = data.payType
+				this.params.orderFlag = data.orderFlag
+				this.params.receiptAmount = this.handleReceiptAmount = data.receiptAmount
+				this.params.receiptDate = data.receiptDate
+				this.handleCharge = this.params.handlingFee = data.handlingFee
+				this.receiptTypeActions.forEach(el => {
+					if (this.params.payType === el.value) {
+						this.banksTypeText = el.name
 					}
 				})
+				if (this.params.handlingFee > 0) {
+					this.isCheckedCharge = true
+				}
+				// 处理收款账号禁止点击
+				this.isReceiptType = true
+				console.log('isReceiptType', this.isReceiptType)
+				this.initInput()
+			}catch(error){
+				if(error.code === -2){
+					this.modal1 = true
+				}else{
+					this.$util.msg(error.msg, 2000)
+				}
+			}
 		},
-		
 		confirmDistinguish() {
+			const modalTextMap = {
+				1:{// 普通订单款
+					title:'确定收款吗?',
+					text:'确认前请仔细检查各项数据是否正确,确认收款后将不能进行修改。'
+				},
+				3:{// 返佣款
+					title:'',
+					text:'确定返佣收款吗?'
+				},
+				5:{// 供应商退款
+					title:'',
+					text:'确定供应商退款吗?'
+				},
+				10:{// 平台服务费
+					title:'',
+					text:'确定平台服务费吗?'
+				}
+			}
 			if (this.params.receiptAmount == '') {
 				this.$util.msg('请输入收款金额', 2000)
 				return
@@ -390,36 +405,25 @@ export default {
 					return
 				}
 			}
-			if (this.params.receiptType == 1) {
-				// 普通订单款
-				this.contentModalTitle = '确定收款吗?'
-				this.contentModalText = '确认前请仔细检查各项数据是否正确,确认收款后将不能进行修改。' //操作文字提示语句
-			} else if (this.params.receiptType == 3) {
-				// 返佣款
-				this.contentModalTitle = ''
-				this.contentModalText = '确定返佣收款吗?' //操作文字提示语句
-			} else if (this.params.receiptType == 5) {
-				// 供应商退款
-				this.contentModalTitle = ''
-				this.contentModalText = '确定供应商退款吗?' //操作文字提示语句
-			}
+			this.contentModalTitle = modalTextMap[this.params.receiptType].title
+			this.contentModalText =modalTextMap[this.params.receiptType].text
 			this.modal = true
 		},
-		getOrderReceiptSave() {
-			// 收款保存
-			this.OrderService.orderReceiptSave(this.params)
-				.then(response => {
-					this.$util.msg('收款成功', 1500, true, 'success')
-					setTimeout(() => {
-						this.params.smsContent = ''
-						this.params.receiptAmount = ''
-						this.params.handlingFee = ''
-						this.$api.navigateTo(`/pages/collection/detail?id=${response.data.id}&receiptType=${response.data.receiptType}`)
-					}, 1500)
-				})
-				.catch(err => {
-					this.$util.msg(err.msg, 2000)
-				})
+		// 保存收款
+		async getOrderReceiptSave() {
+			try{
+				const res = await this.OrderService.orderReceiptSave(this.params)
+				const data = res.data
+				this.$util.msg('收款成功', 1500, true, 'success')
+				setTimeout(() => {
+					this.params.smsContent = ''
+					this.params.receiptAmount = ''
+					this.params.handlingFee = ''
+					this.$api.navigateTo(`/pages/collection/detail?id=${data.id}&receiptType=${data.receiptType}`)
+				}, 1500)
+			}catch(error){
+				this.$util.msg(err.msg, 2000)
+			}
 		},
 		bindPickerChange(type, e) {
 			// 选择选项
@@ -555,7 +559,7 @@ export default {
 		// }
 	},
 	onShow() {
-		
+
 	}
 }
 </script>

+ 11 - 14
pages/login/login-account.vue

@@ -94,25 +94,22 @@ export default {
 	methods: {
 		...mapMutations(['login', 'logout']),
 		async getWxAuthorize(){// 初始化授权登录
-			const WxCode = await authorize.getCode('weixin')
-			const Wx = await authorize.getUserInfo('weixin')
-			this.UserService.UserLoginAuthApplets({ 
-				code:WxCode,
-				encryptedData:Wx.encryptedData,
-				iv:Wx.iv ,
-			})
-			.then(response =>{
-				let data  = response.data
-				this.login(response.data)
-				this.$store.commit('updateStatus',response.data)
+			try{
+				const wXCode = await authorize.getCode('weixin')
+				const wEchat = await authorize.getUserInfo('weixin')
+				const param = { code: wXCode,encryptedData: wEchat.encryptedData,iv: wEchat.iv}
+				const res = await this.UserService.UserLoginAuthApplets(param)
+				const data = res.data
+				this.login(data)
+				this.$store.commit('updateStatus',data)
 				setTimeout(()=>{
-					this.navigateLink(response.data.userType)
+					this.navigateLink(data.userType)
 				},500)
-			}).catch(error =>{
+			}catch(error){
 				this.logout()
 				this.skeletonShow = false
 				this.$store.commit('updateStatus',error.data)
-			})
+			}
 		},
 		async UserLoginReceiptPassword(){// 账号密码登录
 			const WxCode = await authorize.getCode('weixin')

+ 2 - 2
pages/login/login-share.vue

@@ -96,7 +96,7 @@ export default {
 			})
 		},
 		getOrderReceiptDetailType(id) {
-			// 无权限查询收款详情,防止收款类型被更改
+			// 无权限查询收款详情,防止收款账号被更改
 			this.OrderService.orderReceiptDetailType({ id: id })
 				.then(response => {
 					/**
@@ -129,7 +129,7 @@ export default {
 				})
 		},
 		checkedReceiptAdministration(receipt){
-			// 根据收款类型调用不同收款详情查看权限
+			// 根据收款账号调用不同收款详情查看权限
 			if(receipt.receiptType == 1 || receipt.receiptType == 2 || receipt.receiptType == 4){// 订单 非订单
 				this.getOrderReceiptDetail(receipt)
 			}else if(receipt.receiptType == 3){

+ 1 - 1
pages/relation/nonorder/detail.vue

@@ -47,7 +47,7 @@
 							收款金额:<text class="text">¥{{ receiptInfo.receiptAmount | NumFormat }}</text>
 						</view>
 						<view class="list-title-b-item ">
-							收款类型:<text class="text">{{ receiptInfo.payTypeText }}</text>
+							收款账号:<text class="text">{{ receiptInfo.payTypeText }}</text>
 						</view>
 					</view>
 					<view class="list-title-b">

+ 2 - 2
pages/relation/order/detail.vue

@@ -56,14 +56,14 @@
 							客户名称:<text class="text">{{ order.userName ? order.userName : '无' }}</text>
 						</view>
 						<view class="list-title-b">
-							订单编号:<text class="text">{{ order.shopOrderNo }} ( {{ order.shopOrderId }} )</text>
+							订单编号:<text class="text">{{ order.shopOrderNo }} ( {{ order.shopOrderId }} )</text>
 						</view>
 						<view class="list-title-b">
 							下单日期:<text class="text">{{ order.orderTime }}</text>
 						</view>
 						<view class="list-title-b">
 							<view class="list-title-b-item ">
-								订单金额:<text class="text">¥{{ order.totalAmount | NumFormat }}</text>
+								订单金额:<text class="text">¥{{ order.totalAmount | NumFormat }}</text>
 							</view>
 							<view class="list-title-b-item ">
 								余额抵扣:<text class="text">¥{{ order.accountAmount | NumFormat }}</text>

+ 1 - 1
pages/relation/ordinary/detail.vue

@@ -48,7 +48,7 @@
 						收款金额:<text class="text">¥{{ receiptInfo.receiptAmount | NumFormat }}</text>
 					</view>
 					<view class="list-title-b">
-						收款类型:<text class="text">{{ receiptInfo.payTypeText }}</text>
+						收款账号:<text class="text">{{ receiptInfo.payTypeText }}</text>
 					</view>
 					<view class="list-title-b">
 						收款时间:<text class="text">{{ receiptInfo.receiptDate }}</text>

+ 1 - 1
pages/relation/ordinary/examine-detail.vue

@@ -55,7 +55,7 @@
 						收款金额:<text class="text">¥{{ receiptInfo.receiptAmount | NumFormat }}</text>
 					</view>
 					<view class="list-title-b">
-						收款类型:<text class="text">{{ receiptInfo.payTypeText }}</text>
+						收款账号:<text class="text">{{ receiptInfo.payTypeText }}</text>
 					</view>
 					<view class="list-title-b">
 						收款时间:<text class="text">{{ receiptInfo.receiptDate }}</text>

+ 3 - 3
pages/relation/ordinary/index.vue

@@ -55,7 +55,7 @@
 								收款金额:<text class="text">¥{{ receiptInfo.receiptAmount | NumFormat }} </text>
 							</view>
 							<view class="list-title-b-item ">
-								收款类型:<text class="text">{{ receiptInfo.payTypeText }}</text>
+								收款账号:<text class="text">{{ receiptInfo.payTypeText }}</text>
 							</view>
 						</view>
 						<view class="list-title-b">
@@ -491,9 +491,9 @@ export default {
 				this.orderReceiptOrdersBottom()
 			}
 		},
-		orderDetail(id) {
+		orderDetail(shopOrderId) {
 			//订单详情跳转
-			this.$api.navigateTo(`/pages/relation/order/detail?shopOrderId=${id}`)
+			this.$api.navigateTo(`/pages/relation/order/detail?shopOrderId=${shopOrderId}`)
 		},
 		handleClick(e) {
 			//用户操作订单

+ 14 - 21
pages/relation/refund/detail.vue

@@ -51,7 +51,7 @@
 						收款金额:<text class="text">¥{{ receiptInfo.receiptAmount | NumFormat }}</text>
 					</view>
 					<view class="list-title-b">
-						收款类型:<text class="text">{{ receiptInfo.payTypeText }}</text>
+						收款账号:<text class="text">{{ receiptInfo.payTypeText }}</text>
 					</view>
 					<view class="list-title-b">
 						款时间:<text class="text">{{ receiptInfo.receiptDate }}</text>
@@ -70,16 +70,16 @@
 									<text
 										class="badges"
 										:class="{
-											success: order.mainOrder.orderType === 1,
-											warning: order.mainOrder.orderType === 0
+											success: order.orderType === 1,
+											warning: order.orderType === 0
 										}"
-										>{{ order.mainOrder.orderType | formatOrderType }}</text
+										>{{ order.orderType | formatOrderType }}</text
 									>
 								</view>
 								<view class="list-title-tag">
-									<text class="badges">{{ order.mainOrder.organizeId | organizeName }}</text>
+									<text class="badges">{{ order.organizeId | organizeName }}</text>
 								</view>
-								<view class="list-title-num">{{ order.mainOrder.status | stateExpFormat }}</view>
+								<view class="list-title-num">{{ order.status | stateExpFormat }}</view>
 							</view>
 							<view class="list-title-a">
 								<view class="list-title-a-text">
@@ -91,25 +91,18 @@
 									供应商名称:<text class="text">{{ order.shopName }}</text>
 								</view>
 								<view class="list-title-a-text">
-									订单金额:<text class="text">¥{{ order.needPayAmount | NumFormat }}</text>
+									订单金额:<text class="text">¥{{ order.needPayAmount | NumFormat }}</text>
 								</view>
 							</view>
 							<view class="list-title-b">
-								客户名称:<text class="text">{{
-									order.mainOrder.userName ? order.mainOrder.userName : '无'
-								}}</text>
+								客户名称:<text class="text">{{ order.userName ? order.userName : '无' }}</text>
 							</view>
 							<view class="list-title-b">
-								订单编号:<text class="text"
-									>{{ order.mainOrder.orderNo }} ( {{ order.mainOrder.orderId }} )</text
-								>
-							</view>
-							<view class="list-title-b">
-								下单日期:<text class="text">{{ order.mainOrder.orderTime }}</text>
+								下单日期:<text class="text">{{ order.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.needPayAmount | NumFormat }}</text>
 								</view>
 								<view class="list-title-b-item ">
 									已退金额:<text class="text">¥{{ order.shopRefundAmount | NumFormat }}</text>
@@ -587,10 +580,10 @@ page {
 				width: 100%;
 				height: auto;
 				float: left;
-				padding: 5rpx 8rpx;
-				border-radius: 4rpx;
-				background-color: rgba(247, 247, 247, 1);
-				margin: 10rpx 0;
+				// padding: 5rpx 8rpx;
+				// border-radius: 4rpx;
+				// background-color: rgba(247, 247, 247, 1);
+				// margin: 10rpx 0;
 				.text {
 					color: #999999;
 				}

+ 18 - 21
pages/relation/refund/index.vue

@@ -44,7 +44,7 @@
 								收款金额:<text class="text">¥{{ receiptInfo.receiptAmount | NumFormat }}</text>
 							</view>
 							<view class="list-title-b-item "> 
-								收款类型:<text class="text">{{ receiptInfo.payTypeText }}</text>
+								收款账号:<text class="text">{{ receiptInfo.payTypeText }}</text>
 							</view>
 						</view>
 						<view class="list-title-b">
@@ -103,22 +103,22 @@
 								v-for="(order, index) in shopOrderList"
 								:key="index"
 							>
-								<view class="list-title" @click.stop="orderDetail(order.mainOrder.orderId)">
+								<view class="list-title" @click.stop="orderDetail(order.shopOrderId)">
 									<view class="list-title-t">
 										<view class="list-title-tip">
 											<text
 												class="badges"
 												:class="{
-													success: order.mainOrder.orderType === 1,
-													warning: order.mainOrder.orderType === 0
+													success: order.orderType === 1,
+													warning: order.orderType === 0
 												}"
-												>{{ order.mainOrder.orderType | formatOrderType }}</text
+												>{{ order.orderType | formatOrderType }}</text
 											>
 										</view>
 										<view class="list-title-tag">
-											<text class="badges">{{ order.mainOrder.organizeId | organizeName }}</text>
+											<text class="badges">{{ order.organizeId | organizeName }}</text>
 										</view>
-										<view class="list-title-num">{{ order.mainOrder.status | stateExpFormat }}</view>
+										<view class="list-title-num">{{ order.status | stateExpFormat }}</view>
 									</view>
 									<view class="list-title-a">
 										<view class="list-title-a-text">
@@ -128,21 +128,18 @@
 											供应商名称:<text class="text">{{ order.shopName }}</text>
 										</view>
 										<view class="list-title-a-text">
-											订单金额:<text class="text">¥{{ order.needPayAmount | NumFormat }}</text>
+											订单金额:<text class="text">¥{{ order.needPayAmount | NumFormat }}</text>
 										</view>
 									</view>
 									<view class="list-title-b">
-										客户名称:<text class="text">{{ order.mainOrder.userName ? order.mainOrder.userName : '无' }}</text>
+										客户名称:<text class="text">{{ order.userName ? order.userName : '无' }}</text>
 									</view>
 									<view class="list-title-b">
-										订单编号:<text class="text">{{ order.mainOrder.orderNo }} ( {{ order.mainOrder.orderId }} )</text>
-									</view>
-									<view class="list-title-b">
-										下单日期:<text class="text">{{ order.mainOrder.orderTime }}</text>
+										下单日期:<text class="text">{{ order.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.needPayAmount | NumFormat }}</text>
 										</view>
 										<view class="list-title-b-item ">
 											已退金额:<text class="text">¥{{ order.shopRefundAmount | NumFormat }}</text>
@@ -155,7 +152,7 @@
 										:class="order.isChecked ? 'icon-yixuanze' : 'icon-weixuanze'"
 									></text>
 								</view>
-								<view class="list-detail" @click.stop="orderDetail(order.mainOrder.orderId)">
+								<view class="list-detail" @click.stop="orderDetail(order.shopOrderId)">
 									<text class="iconfont icon-xiayibu"></text>
 								</view>
 							</view>
@@ -412,9 +409,9 @@ export default {
 			})
 			return stateColor
 		},
-		orderDetail(id) {
+		orderDetail(shopOrderId) {
 			//订单详情跳转
-			this.$api.navigateTo(`/pages/relation/order/detail?orderId=${id}`)
+			this.$api.navigateTo(`/pages/relation/order/detail?shopOrderId=${shopOrderId}`)
 		},
 		toNoSms(url) {
 			this.$api.navigateTo(url)
@@ -881,10 +878,10 @@ page {
 		width: 100%;
 		height: auto;
 		float: left;
-		padding: 5rpx 8rpx;
-		border-radius: 4rpx;
-		background-color: rgba(247, 247, 247, 1);
-		margin-bottom: 10rpx;
+		// padding: 5rpx 8rpx;
+		// border-radius: 4rpx;
+		// background-color: rgba(247, 247, 247, 1);
+		// margin-bottom: 10rpx;
 		.text{
 			color: #999999;
 		}

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

@@ -43,7 +43,7 @@
 						收款金额:<text class="text">¥{{ receiptInfo.receiptAmount | NumFormat }}</text>
 					</view>
 					<view class="list-title-b">
-						收款类型:<text class="text">{{ receiptInfo.payTypeText }}</text>
+						收款账号:<text class="text">{{ receiptInfo.payTypeText }}</text>
 					</view>
 					<view class="list-title-b">
 						款时间:<text class="text">{{ receiptInfo.receiptDate }}</text>
@@ -66,17 +66,17 @@
 									<text
 										class="badges"
 										:class="{
-											success: order.mainOrder.orderType === 1,
-											warning: order.mainOrder.orderType === 0
+											success: order.orderType === 1,
+											warning: order.orderType === 0
 										}"
-										>{{ order.mainOrder.orderType | formatOrderType }}</text
+										>{{ order.orderType | formatOrderType }}</text
 									>
 									<text class="badgesb" v-if="order.secondHandOrderFlag ==1">二手</text>
 								</view>
 								<view class="list-title-tag">
-									<text class="badges">{{ order.mainOrder.organizeId | organizeName }}</text>
+									<text class="badges">{{ order.organizeId | organizeName }}</text>
 								</view>
-								<view class="list-title-num">{{ order.mainOrder.status | stateExpFormat }}</view>
+								<view class="list-title-num">{{ order.status | stateExpFormat }}</view>
 							</view>
 							<view class="list-title-a">
 								<view class="list-title-a-text">
@@ -90,20 +90,17 @@
 								</view>
 							</view>
 							<view class="list-title-b">
-								客户名称:<text class="text">{{ order.mainOrder.userName ? order.mainOrder.userName : '无' }}</text>
+								客户名称:<text class="text">{{ order.userName ? order.userName : '无' }}</text>
 							</view>
 							<view class="list-title-b">
-								订单编号:<text class="text">{{ order.mainOrder.orderNo }} ( {{ order.mainOrder.orderId }} )</text>
-							</view>
-							<view class="list-title-b">
-								下单日期:<text class="text">{{ order.mainOrder.orderTime }}</text>
+								下单日期:<text class="text">{{ order.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.needPayAmount | NumFormat }}</text>
 								</view>
 								<view class="list-title-b-item ">
-									已收金额:<text class="text">¥{{ order.mainOrder.paidAmount | NumFormat }}</text>
+									已收金额:<text class="text">¥{{ order.receiptAmount | NumFormat }}</text>
 								</view>
 							</view>
 						</view>
@@ -578,10 +575,10 @@
 						width: 100%;
 						height: auto;
 						float: left;
-						padding: 5rpx 8rpx;
-						border-radius: 4rpx;
-						background-color: rgba(247, 247, 247, 1);
-						margin: 10rpx 0;
+						// padding: 5rpx 8rpx;
+						// border-radius: 4rpx;
+						// background-color: rgba(247, 247, 247, 1);
+						// margin: 10rpx 0;
 						.text{
 							color: #999999;
 						}

+ 11 - 16
pages/relation/return/index.vue

@@ -44,7 +44,7 @@
 								收款金额:<text class="text">¥{{ receiptInfo.receiptAmount | NumFormat }}</text>
 							</view>
 							<view class="list-title-b-item ">
-								收款类型:<text class="text">{{ receiptInfo.payTypeText }}</text>
+								收款账号:<text class="text">{{ receiptInfo.payTypeText }}</text>
 							</view>
 						</view>
 						<view class="list-title-b">
@@ -99,7 +99,7 @@
 						<!-- 列表 -->
 						<view v-else class="tui-order-content">
 							<view class="tui-order-item" v-for="(order, index) in shopOrderList" :key="index">
-								<view class="list-title" @click.stop="orderDetail(order.mainOrder.orderId)">
+								<view class="list-title" @click.stop="orderDetail(order.shopOrderId)">
 									<view class="list-title-t">
 										<view class="list-title-tip">
 											<text
@@ -137,18 +137,13 @@
 											order.mainOrder.userName ? order.mainOrder.userName : '无'
 										}}</text>
 									</view>
-									<view class="list-title-b">
-										订单编号:<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.needPayAmount | NumFormat }}</text
 											>
 										</view>
 										<view class="list-title-b-item ">
@@ -164,7 +159,7 @@
 										:class="order.isChecked ? 'icon-yixuanze' : 'icon-weixuanze'"
 									></text>
 								</view>
-								<view class="list-detail" @click.stop="orderDetail(order.mainOrder.orderId)">
+								<view class="list-detail" @click.stop="orderDetail(order.shopOrderId)">
 									<text class="iconfont icon-xiayibu"></text>
 								</view>
 							</view>
@@ -440,9 +435,9 @@ export default {
 			//处理小数点后两位数
 			return Number(Math.round(val * 100) / 100).toFixed(2)
 		},
-		orderDetail(id) {
+		orderDetail(shopOrderId) {
 			//订单详情跳转
-			this.$api.navigateTo(`/pages/relation/order/detail?orderId=${id}`)
+			this.$api.navigateTo(`/pages/relation/order/detail?shopOrderId=${shopOrderId}`)
 		},
 		toNoSms(url) {
 			this.$api.navigateTo(url)
@@ -922,10 +917,10 @@ page {
 		width: 100%;
 		height: auto;
 		float: left;
-		padding: 5rpx 8rpx;
-		border-radius: 4rpx;
-		background-color: rgba(247, 247, 247, 1);
-		margin-bottom: 10rpx;
+		// padding: 5rpx 8rpx;
+		// border-radius: 4rpx;
+		// background-color: rgba(247, 247, 247, 1);
+		// margin-bottom: 10rpx;
 		.text {
 			color: #999999;
 		}

+ 7 - 10
pages/relation/return/list.vue

@@ -76,9 +76,6 @@
 									<view class="list-title-b">
 										客户名称:<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>
-									</view>
 									<view class="list-title-b">
 										下单日期:<text class="text">{{ order.mainOrder.orderTime }}</text>
 									</view>
@@ -97,7 +94,7 @@
 										:class="order.isChecked ? 'icon-yixuanze' : 'icon-weixuanze'"
 									></text>
 								</view>
-								<view class="list-detail" @click.stop="orderDetail(order.mainOrder.orderId)">
+								<view class="list-detail" @click.stop="orderDetail(order.shopOrderId)">
 									<text class="iconfont icon-xiayibu"></text>
 								</view>
 							</view>
@@ -358,9 +355,9 @@ export default {
 					break
 			}
 		},
-		orderDetail(orderId) {
+		orderDetail(shopOrderId) {
 			//订单详情跳转
-			this.$api.navigateTo(`/pages/relation/order/detail?orderId=${orderId}`)
+			this.$api.navigateTo(`/pages/relation/order/detail?shopOrderId=${shopOrderId}`)
 		},
 		changeNumber(e) {
 			// 校验输入为数字
@@ -706,10 +703,10 @@ page {
 		width: 100%;
 		height: auto;
 		float: left;
-		padding: 5rpx 8rpx;
-		border-radius: 4rpx;
-		background-color: rgba(247, 247, 247, 1);
-		margin-bottom: 10rpx;
+		// padding: 5rpx 8rpx;
+		// border-radius: 4rpx;
+		// background-color: rgba(247, 247, 247, 1);
+		// margin-bottom: 10rpx;
 		.text{
 			color: #999999;
 		}

+ 678 - 0
pages/relation/service/detail.vue

@@ -0,0 +1,678 @@
+<template>
+	<view class="container mine clearfix">
+		<!-- <cu-custom :navbar-data='nvabarData'  @navigateBack="hanldNavigateBack"></cu-custom> -->
+		
+		<view class="tui-header-box first"
+			:style="{ height: isCmcustomClass == 'fiexd' ? CustomBar + 10 + 'px' : CustomBar + 30 + 'px' }"
+			:class="isCmcustomClass">
+			<view class="header-top" :style="{ paddingTop: top + 'px', lineHeight: CustomBar + 30 + 'px' }"></view>
+			<view class="header-sit">
+				<text class="iconfont icon-shouye1" v-if="isShareType" @click.stop="this.$api.navigateLinkJump()"></text>
+				<text class="iconfont icon-fanhui" v-else @click.stop="this.$api.navigateBack(1)"></text>
+				<text class="header-sit-text">平台服务费详情</text>
+			</view>
+		</view>	
+		<view class="tui-header-box"
+			:style="{ height: CustomBar + 30 + 'px', backgroundImage: 'url(https://static.caimei365.com/app/crm/image/statistic_bg1.png)' }">
+		</view>
+		<tui-skeleton
+			v-if="skeletonShow"
+			backgroundColor="#fafafa"
+			borderRadius="10rpx"
+			:isLoading="true"
+			:loadingType="7"
+		/>
+		<view class="distinguish-section" v-else :style="{ top: CustomBar - 4 + 'px', left: 0 + 'px' }">
+			<view class="distinguish-section-conten">
+				<view class="section-top">
+					<view class="title">
+						<view class="title-text">收款信息</view>
+					</view>
+<!-- 					<view class="button" @click="toNoSms('/pages/collection/list')">
+						<text class="iconfont icon-wodedingdan"></text>
+						收款列表
+					</view> -->
+				</view>
+				<view class="section-top-item">
+					<view class="list-title-t">
+						<view class="list-title-tip">
+							<text class="badges">{{ receiptInfo.receiptType | formatReceiptType }}</text>
+						</view>
+					</view>
+					<view class="list-title-b">
+						收款金额:<text class="text">¥{{ receiptInfo.receiptAmount | NumFormat }}</text>
+					</view>
+					<view class="list-title-b">
+						收款账号:<text class="text">{{ receiptInfo.payTypeText }}</text>
+					</view>
+					<view class="list-title-b">
+						款时间:<text class="text">{{ receiptInfo.receiptDate }}</text>
+					</view>
+					<view class="list-title-b">收款短信:</view>
+					<view class="list-title-b sms">
+						<text class="text">{{ receiptInfo.smsContent ? receiptInfo.smsContent : '无' }}</text>
+					</view>
+				</view>
+				<view class="section-title">关联订单</view>
+				<view class="section-mid">
+					<view
+						class="tui-order-item"
+						v-for="(order, index) in shopOrderList"
+						:key="index"
+					>
+						<view class="list-title" @click.stop="orderDetail(order.shopOrderId)">
+							<view class="list-title-t">
+								<view class="list-title-tip">
+									<text
+										class="badges"
+										:class="{
+											success: order.orderType === 1,
+											warning: order.orderType === 0
+										}"
+										>{{ order.orderType | formatOrderType }}</text
+									>
+									<text class="badgesb" v-if="order.secondHandOrderFlag ==1">二手</text>
+								</view>
+								<view class="list-title-tag">
+									<text class="badges">{{ order.organizeId | organizeName }}</text>
+								</view>
+								<view class="list-title-num">{{ order.status | stateExpFormat }}</view>
+							</view>
+							<view class="list-title-a">
+								<view class="list-title-a-text">
+									子订单编号:<text class="text"
+										>{{ order.shopOrderNo }} ( {{ order.shopOrderId }} )</text
+									>
+								</view>
+								<view class="list-title-a-text">
+									下单日期:<text class="text">{{ order.orderTime }}</text>
+								</view>
+								<view class="list-title-a-text">
+									供应商名称:<text class="text">{{ order.shopName }}</text>
+								</view>
+							</view>
+							<view class="list-title-b">
+								客户名称:<text class="text">{{
+									order.userName ? order.userName : '无'
+								}}</text>
+								
+							</view>
+							<view class="list-title-b">
+								子订单金额:<text class="text"
+									>¥{{ order.needPayAmount | NumFormat }}</text
+								>
+							</view>
+							<view class="list-title-b">
+								应收金额:<text class="text"
+									>¥{{ order.needPayAmount | NumFormat }}</text
+								>
+							</view>
+							<view class="list-title-b">
+								已收金额:<text class="text"
+									>¥{{ order.receiptAmount | NumFormat }}</text
+								>
+							</view>
+							<view class="list-title-b">
+								平台服务费:<text class="text"> ¥{{
+									order.cmCostPrice | NumFormat
+								}}</text>
+							</view>
+						</view>
+						<view class="list-detail" @click.stop="orderDetail(order.shopOrderId)">
+							<text class="iconfont icon-xiayibu"></text>
+						</view>
+					</view>
+				</view>
+				<view class="section-title">状态</view>
+				<view class="section-mid">
+					<view class="list-title">
+						<view class="list-title-b">进度:<text
+								:style="{ color: formatColor(receiptInfo.receiptStatus) }">{{ receiptInfo.receiptStatusText }}</text>
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+<script>
+	import {
+		mapState,
+		mapMutations
+	} from 'vuex'
+
+	export default {
+		data() {
+			return {
+				isIphoneX: this.$store.state.isIphoneX,
+				CustomBar: this.CustomBar, // 顶部导航栏高度
+				height: 64, //header高度
+				top: 0, //标题图标距离顶部距离
+				scrollH: 0, //滚动总高度
+				opcity: 1,
+				isCmcustomClass: 'left',
+				skeletonShow:true,
+				orderList:[],
+				listQuery:{
+					pageNum: 1, //页数
+					pageSize: 10, //条数
+					id: 0,
+					shopName: '',
+				},
+				nvabarData: {
+					//顶部自定义导航
+					showCapsule: 1, // 是否显示左上角图标  1表示显示  0表示不显示,
+					showSearch: 0,
+					title: '', // 导航栏 中间的标题
+					haveBack: false,
+					home: false,
+					textLeft: this.$store.state.isIphone,
+					bgColor: '#D33020',
+					textColor: '#ffffff'
+				},
+				receiptInfo: {},
+				receiptId: 0,
+				isShareType:false
+			}
+		},
+		onLoad(option) {
+			let obj = {}
+			// #ifdef MP-WEIXIN
+			obj = wx.getMenuButtonBoundingClientRect()
+			// #endif
+			// #ifdef MP-BAIDU
+			obj = swan.getMenuButtonBoundingClientRect()
+			// #endif
+			// #ifdef MP-ALIPAY
+			my.hideAddToDesktopMenu()
+			// #endif
+			uni.getSystemInfo({
+				success: res => {
+					this.width = obj.left || res.windowWidth
+					this.height = obj.top ? obj.top + obj.height + 8 : res.statusBarHeight + 44
+					this.top = obj.top ? obj.top + (obj.height - 32) / 2 : res.statusBarHeight + 6
+					this.scrollH = res.windowWidth * 0.6
+				}
+			})
+			if(option.type == 'share'){ this.isShareType = true }
+			this.receiptId = this.listQuery.id = option.id
+			this.getOrderReceiptDetail(this.receiptId)
+			this.getOrderReceiptRebateOrders()
+		},
+		computed: {
+			...mapState(['hasLogin'])
+		},
+		methods: {
+			getOrderReceiptDetail(id) {
+				// 收款详情
+				this.OrderService.orderReceiptRebateDetails({ id: id })
+					.then(response => {
+						this.receiptInfo = response.data
+					})
+					.catch(err => {
+						this.$api.navigateTo('/pages/login/login-error')
+					})
+			},
+			getOrderReceiptRebateOrders() {// 收款详情-订单列表
+				this.OrderService.orderReceiptPlatformOrders(this.listQuery)
+					.then(response => {
+						let data = response.data
+						if (data.list && data.list.length > 0) {
+							this.shopOrderList = data.list
+						}	
+						setTimeout(()=>{
+							this.skeletonShow = false
+						},1000)
+					})
+					.catch(err => {
+						this.$util.msg(err.msg, 2000)
+					})
+			},
+			orderDetail(shopOrderId) {
+				//订单详情跳转
+				this.$api.navigateTo(`/pages/relation/order/detail?shopOrderId=${shopOrderId}`)
+			},
+			toNoSms(url) {
+				this.$api.navigateTo(url)
+			},
+			formatColor(state) {
+				//设置邀请码状态亚瑟
+				let stateColor = '',
+					stateColorObject = {
+						1: '#ff7900',
+						2: '#4cd964',
+						3: '#19be6b',
+						4: '#ed3f14',
+						5: '#F74D54'
+					}
+				Object.keys(stateColorObject).forEach(function(key) {
+					if (key == state) {
+						stateColor = stateColorObject[key]
+					}
+				})
+				return stateColor
+			},
+			formatReceiptType(value) {
+				//订单状态文字和颜色
+				var HtmlStateText = '',
+					stateTextObject = {
+						1: '订单款',
+						2: '非订单款',
+						3: '返佣款',
+						4: '订单款或者非订单款',
+						5: '供应商退款'
+					}
+				Object.keys(stateTextObject).forEach(function(key) {
+					if (key == value) {
+						HtmlStateText = stateTextObject[key]
+					}
+				})
+				return HtmlStateText
+			},
+		},
+		onPageScroll(e) {
+			//实时获取到滚动的值
+			// if (e.scrollTop > 30) {
+			// 	this.isCmcustomClass = 'fiexd'
+			// } else {
+			// 	this.isCmcustomClass = 'left'
+			// }
+		},
+		onPullDownRefresh() {
+			setTimeout(() => {
+				this.getOrderReceiptDetail(this.receiptId)
+				uni.stopPullDownRefresh()
+			}, 200)
+		},
+		onShareAppMessage(res) {
+			//分享购买优惠券
+			const receipt = this.receiptInfo
+			const receiptTypeText = this.formatReceiptType(receipt.receiptType)
+			if (res.from === 'button') {
+				// console.log('来自页面内转发按钮')
+			}
+			return {
+				title: `¥${receipt.receiptAmount.toFixed(2)} | ${receipt.receiptDate}  |  ${receipt.receiptStatusText}(${receiptTypeText})`,
+				path: `/pages/login/login-share?id=${receipt.id}`,
+				imageUrl: 'https://static.caimei365.com/app/crm/image/icon-share@2x.jpg'
+			}
+		},
+		onShow() {
+			
+		}
+	}
+</script>
+
+<style lang="scss">
+	@import '@/uni.scss';
+
+	page {
+		background: #fff;
+	}
+
+	.tui-header-box {
+		width: 100%;
+		background: #ffffff;
+		z-index: 999;
+		background-size: cover;
+		background-image: url(https://static.caimei365.com/app/crm/image/statistic_bg2.png);
+
+		&.fiexd {
+			position: fixed;
+			top: 0;
+			left: 0;
+		}
+	}
+
+	.header-top {
+		width: 100%;
+		font-size: 16px;
+		font-weight: 500;
+		height: 32px;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		position: relative;
+		padding: 0 40rpx;
+	}
+
+	.header-sit {
+		width: 100%;
+		box-sizing: border-box;
+		height: 80rpx;
+		line-height: 80rpx;
+		box-sizing: border-box;
+		color: #ffffff;
+
+		.header-sit-text {
+			text-align: left;
+			font-size: $font-size-40;
+			font-weight: 600;
+			font-family: '正楷';
+		}
+
+		.iconfont {
+			display: block;
+			width: 80rpx;
+			height: 80rpx;
+			float: left;
+			text-align: center;
+			line-height: 80rpx;
+			font-size: 42rpx;
+		}
+
+		.icon-iconfonticonfontsousuo1 {
+			font-size: 42rpx;
+			margin-left: 30rpx;
+		}
+	}
+
+	.mine {
+		width: 100%;
+		height: 100%;
+		position: relative;
+	}
+
+	.distinguish-section {
+		width: 100%;
+		position: absolute;
+		padding: 40rpx 20rpx;
+		box-sizing: border-box;
+	}
+
+	.distinguish-section-conten {
+		width: 100%;
+		height: auto;
+		position: relative;
+		background-color: #ffffff;
+		border-radius: 20rpx;
+		padding: 20rpx;
+		box-shadow: 0 10rpx 10rpx 0 rgba(86, 119, 252, 0.2);
+
+		.section-top {
+			width: 100%;
+			height: 66rpx;
+			box-sizing: border-box;
+			.title {
+				float: left;
+				height: 66rpx;
+				padding: 13rpx 0;
+				.title-text{
+					float: left;
+					line-height: 40rpx;
+					height: 40rpx;
+					color: #333333;
+					text-align: left;
+					font-weight: 600;
+					font-size: $font-size-30;
+				}
+			}
+			.button {
+				float: right;
+				box-sizing: border-box;
+				padding: 0 24rpx;
+				height: 100%;
+				line-height: 66rpx;
+				background: $btn-confirm;
+				border-radius: 8rpx;
+				text-align: center;
+				color: #ffffff;
+			}
+		}
+
+		.section-top-item {
+			width: 100%;
+			height: auto;
+			margin-top: 10rpx;
+			position: relative;
+			float: left;
+			.list-title-t {
+				width: 100%;
+				height: 50rpx;
+				float: left;
+				font-size: $font-size-28;
+				padding-bottom: 10rpx;
+				.list-title-tip {
+					float: left;
+					.badges {
+						display: block;
+						float: left;
+						padding: 0 15rpx;
+						height: 36rpx;
+						line-height: 36rpx;
+						border-radius: 18rpx;
+						background: #ecf5ff;
+						font-size: $font-size-22;
+						text-align: center;
+						color: #409eff;
+					}
+				}
+			}
+			.list-title-b {
+				width: 100%;
+				height: 44rpx;
+				float: left;
+				font-size: $font-size-24;
+				line-height: 44rpx;
+				color: #666666;
+				text-align: left;
+				.text{
+					color: #999999;
+				}
+				.list-title-b-item {
+					width: 50%;
+					height: 100%;
+					float: left;
+				}
+				&.sms {
+					height: auto;
+					padding: 10rpx;
+					border-radius: 4rpx;
+					background: #F7F7F7;
+				}
+			}
+			.list-icon {
+				width: 120rpx;
+				height: 60rpx;
+				border: 1px solid #e1e1e1;
+				border-radius: 10rpx;
+				text-align: center;
+				font-size: 20rpx;
+				line-height: 60rpx;
+				position: absolute;
+				right: 90rpx;
+				top: 40rpx;
+				color: #dd524d;
+				z-index: 99;
+				transform: rotate(45deg);
+				-webkit-transform: rotate(45deg);
+				-moz-transform: rotate(45deg);
+				font-family: '正楷';
+			}
+		}
+
+		.section-title {
+			width: 100%;
+			height: 66rpx;
+			float: left;
+			font-size: $font-size-28;
+			line-height: 66rpx;
+			color: #333333;
+			text-align: left;
+			font-weight: 600;
+		}
+
+		.section-mid {
+			width: 100%;
+			height: auto;
+			display: flex;
+			flex-direction: column;
+			position: relative;
+			border-radius: 0 0 20rpx 20rpx;
+			.tui-order-item{
+				display: flex;
+				flex-direction: column;
+				width: 100%;
+				background: #fff;
+				position: relative;
+				.list-title {
+					width: 100%;
+					height: auto;
+					.list-title-t {
+						width: 100%;
+						height: 50rpx;
+						float: left;
+						font-size: $font-size-28;
+						padding-bottom: 10rpx;
+						.list-title-tip {
+							float: left;
+							.badges {
+								display: block;
+								float: left;
+								padding: 0 15rpx;
+								height: 36rpx;
+								line-height: 36rpx;
+								border-radius: 20rpx;
+								font-size: $font-size-22;
+								background-color: #f0f9eb;
+								color: #67c23a;
+								text-align: center;
+								&.success {
+									background-color: #ecf5ff;
+									color: #409eff;
+								}
+								&.warning {
+									background-color: #fdf6ec;
+									color: #e6a23c;
+								}
+							}
+							.badgesb{
+								display: block;
+								float: left;
+								padding: 0 15rpx;
+								height: 36rpx;
+								line-height: 36rpx;
+								border-radius: 20rpx;
+								background: #f4f4f5;
+								font-size: $font-size-22;
+								text-align: center;
+								color: #909399;
+								margin-left: 24rpx;
+							}
+						}
+						.list-title-tag {
+							float: left;
+							margin-left: 20rpx;
+							.badges {
+								display: block;
+								float: left;
+								padding: 0 15rpx;
+								height: 40rpx;
+								line-height: 40rpx;
+								border-radius: 20rpx;
+								font-size: $font-size-22;
+								text-align: center;
+								background-color: #ecf5ff;
+								color: #409eff;
+							}
+						}
+						.list-title-num {
+							float: left;
+							text-align: left;
+							color: #42b983;
+							line-height: 40rpx;
+							margin-left: 20rpx;
+							font-size: $font-size-24;
+						}
+					}
+					.list-title-a {
+						width: 100%;
+						height: auto;
+						float: left;
+						// padding: 5rpx 8rpx;
+						// border-radius: 4rpx;
+						// background-color: rgba(247, 247, 247, 1);
+						// margin: 10rpx 0;
+						.text{
+							color: #999999;
+						}
+						.list-title-a-text {
+							width: 100%;
+							height: 50rpx;
+							float: left;
+							font-size: $font-size-24;
+							line-height: 50rpx;
+							color: #666666;
+							text-align: left;
+						}
+					}
+					.list-title-b {
+						width: 100%;
+						height: 50rpx;
+						float: left;
+						font-size: $font-size-24;
+						line-height: 50rpx;
+						color: #666666;
+						text-align: left;
+						.text{
+							color: #999999;
+						}
+						.list-title-b-item {
+							width: 50%;
+							height: 100%;
+							float: left;
+						}
+					}
+				}
+			}
+			.list-detail {
+				width: 70rpx;
+				height: 80rpx;
+				line-height: 80rpx;
+				text-align: center;
+				position: absolute;
+				right: 0;
+				bottom: 0;
+				.iconfont {
+					font-size: $font-size-32;
+					color: #999999;
+				}
+			}
+		}
+		.section-tips{
+			width: 100%;
+			height: 50rpx;
+			font-size: $font-size-28;
+			line-height: 50rpx;
+			color: $uni-color-error;
+			text-align: left;
+		}
+	}
+	.distinguish-button {
+		width: 100%;
+		position: fixed;
+		bottom: 0;
+		left: 0;
+		background-color: #ffffff;
+		padding: 0 50rpx;
+		padding-top: 20rpx;
+		display: flex;
+		.button {
+			flex: 1;
+			height: 80rpx;
+			margin: 0 20rpx;
+			border-radius: 40rpx;
+			text-align: center;
+			color: #ffffff;
+			line-height: 80rpx;
+			font-size: $font-size-28;
+			box-shadow: 0 10rpx 14rpx 0 rgba(86, 119, 252, 0.2);
+			&.confirm{
+				background: $btn-confirm;
+			}
+			&.cancel{
+				background: $uni-color-error;
+			}
+		}
+	}
+</style>

+ 1041 - 0
pages/relation/service/index.vue

@@ -0,0 +1,1041 @@
+<template>
+	<view class="container mine clearfix">
+		<view
+			class="tui-header-box first"
+			:style="{ height: isCmcustomClass == 'fiexd' ? CustomBar + 6 + 'px' : CustomBar + 6 + 'px' }"
+			:class="isCmcustomClass"
+		>
+			<view class="header-top" :style="{ paddingTop: top + 'px', lineHeight: CustomBar + 20 + 'px' }"></view>
+			<view class="header-sit">
+				<text
+					class="iconfont icon-shouye1"
+					v-if="isShareType"
+					@click.stop="this.$api.navigateLinkJump()"
+				></text>
+				<text class="iconfont icon-fanhui" v-else @click.stop="this.$api.navigateBack(1)"></text>
+				<text class="header-sit-text">关联订单</text>
+			</view>
+		</view>
+		<tui-skeleton
+			v-if="skeletonShow"
+			backgroundColor="#fafafa"
+			borderRadius="10rpx"
+			:isLoading="true"
+			:loadingType="7"
+		/>
+		<view class="container-content" v-else>
+			<view class="tui-header-tabs day clearfix" :style="{ top: CustomBar + 6 + 'px' }">
+				<view v-if="!isShowHeader">
+					<view class="tui-header-top">
+						<view class="title"> 收款信息 </view>
+						<view class="tui-header-button">
+							<!-- <view class="button btn-confirm" @click="toNoSms('/pages/collection/list')">
+								<text class="iconfont icon-wodedingdan"></text> 收款列表
+							</view> -->
+						</view>
+					</view>
+					<view class="tui-header-item">
+						<view class="list-title-t">
+							<view class="list-title-tip">
+								<text class="badges">{{ receiptInfo.receiptType | formatReceiptType }}</text>
+							</view>
+							<view class="list-title-num" :style="{ color: formatColor(receiptInfo.receiptStatus) }">{{
+								receiptInfo.receiptStatus | formatStateType
+							}}</view>
+						</view>
+						<view class="list-title-b">
+							<view class="list-title-b-item ">
+								收款金额:<text class="text">¥{{ receiptInfo.receiptAmount | NumFormat }}</text>
+							</view>
+							<view class="list-title-b-item ">
+								收款账号:<text class="text">{{ receiptInfo.payTypeText }}</text>
+							</view>
+						</view>
+						<view class="list-title-b">
+							收款时间:<text class="text">{{ receiptInfo.receiptDate }}</text>
+						</view>
+						<template v-if="receiptInfo.smsContent">
+							<view class="list-title-b">收款短信:</view>
+							<view class="list-title-b sms">
+								<text class="text">{{ receiptInfo.smsContent ? receiptInfo.smsContent : '无' }}</text>
+							</view>
+						</template>
+						<view class="list-icon" v-if="receiptInfo.tipMsg">
+							<image
+								class="list-icon-image"
+								src="https://static.caimei365.com/app/crm/image/icon-noconfirm@2x.png"
+								mode=""
+								v-if="receiptInfo.receiptStatus == 1"
+							></image>
+							<image
+								class="list-icon-image"
+								src="https://static.caimei365.com/app/crm/image/icon-noaudit@2x.png"
+								mode=""
+								v-if="receiptInfo.receiptStatus == 2"
+							></image>
+						</view>
+					</view>
+				</view>
+				<view class="tui-header-tabmain">
+					<input
+						class="input"
+						type="text"
+						v-model="listQuery.shopName"
+						confirm-type="search"
+						@confirm="subMitSearch()"
+						placeholder="请输入供应商名称/子订单ID"
+					/>
+					<text class="iconfont icon-sousuo"></text>
+				</view>
+			</view>
+			<view
+				class="user-section"
+				:style="{
+					top: isIphoneX ? CustomBar + 260 + 'px' : CustomBar + 250 + 'px',
+					left: 0 + 'px',
+					paddingBottom: isIphoneX ? '178rpx' : '144rpx'
+				}"
+			>
+				<view class="header-content">
+					<view :class="{ 'tui-order-list': scrollTop >= 0 }" class="clearfix">
+						<!-- 空白页 -->
+						<empty v-if="isEmpty" :typeIndex="currents" :navbarHeight="navbarHeight" />
+						<!-- 列表 -->
+						<view v-else class="tui-order-content">
+							<view class="tui-order-item" v-for="(order, index) in shopOrderList" :key="index">
+								<view class="list-title" @click.stop="orderDetail(order.shopOrderId)">
+									<view class="list-title-t">
+										<view class="list-title-tip">
+											<text
+												class="badges"
+												:class="{
+													success: order.orderType === 1,
+													warning: order.orderType === 0
+												}"
+												>{{ order.orderType | formatOrderType }}</text
+											>
+											<text class="badgesb" v-if="order.secondHandOrderFlag == 1">二手</text>
+										</view>
+										<view class="list-title-tag">
+											<text class="badges">{{ order.organizeId | organizeName }}</text>
+										</view>
+										<view class="list-title-num">{{
+											order.status | stateExpFormat
+										}}</view>
+									</view>
+									<view class="list-title-a">
+										<view class="list-title-a-text">
+											子订单编号:<text class="text"
+												>{{ order.shopOrderNo }} ( {{ order.shopOrderId }} )</text
+											>
+										</view>
+										<view class="list-title-a-text">
+											下单日期:<text class="text">{{ order.orderTime }}</text>
+										</view>
+										<view class="list-title-a-text">
+											供应商名称:<text class="text">{{ order.shopName }}</text>
+										</view>
+									</view>
+									<view class="list-title-b">
+										客户名称:<text class="text">{{
+											order.userName ? order.userName : '无'
+										}}</text>
+										
+									</view>
+									<view class="list-title-b">
+										子订单金额:<text class="text"
+											>¥{{ order.needPayAmount | NumFormat }}</text
+										>
+									</view>
+									<view class="list-title-b">
+										应收金额:<text class="text"
+											>¥{{ order.needPayAmount | NumFormat }}</text
+										>
+									</view>
+									<view class="list-title-b">
+										已收金额:<text class="text"
+											>¥{{ order.receiptAmount | NumFormat }}</text
+										>
+									</view>
+									<view class="list-title-b">
+										平台服务费:<text class="text"> ¥{{ order.cmCostPrice | NumFormat }}</text>
+									</view>
+								</view>
+								<view class="list-checked" @click="checkedOrder(order, index)">
+									<text
+										class="iconfont"
+										:class="order.isChecked ? 'icon-yixuanze' : 'icon-weixuanze'"
+									></text>
+								</view>
+								<view class="list-detail" @click.stop="orderDetail(order.shopOrderId)">
+									<text class="iconfont icon-xiayibu"></text>
+								</view>
+							</view>
+							<!--加载loadding-->
+							<tui-loadmore :visible="loadding" :index="3" type="black" />
+							<tui-nomore :visible="!pullUpOn" bgcolor="#F7F7F7" :text="nomoreText" />
+							<!--加载loadding-->
+						</view>
+					</view>
+				</view>
+			</view>
+			<view class="distinguish-button" :style="{ paddingBottom: isIphoneX ? '68rpx' : '24rpx' }">
+				<view class="button" @click="confirmDistinguish">确认</view>
+			</view>
+		</view>
+		<!-- 确认关联弹窗 -->
+		<tui-modal
+			:show="modal"
+			@click="handleClick"
+			@cancel="hideMobel(0)"
+			:content="contentModalText"
+			color="#333"
+			:size="32"
+			shape="circle"
+			:maskClosable="false"
+		/>
+		<!-- 金额不一致弹窗 -->
+		<tui-modal :show="modal1" :padding="'40rpx 30rpx'" @cancel="hideMobel(1)" :custom="true" fadeIn>
+			<view class="tui-modal-custom">
+				<view class="tui-prompt-text">收款金额与子订单平台服务费不相等,不能关联!</view>
+				<view class="tui-prompt-flex"> <view class="btn btn-confirm" @click="hideMobel(1)">知道了</view> </view>
+			</view>
+		</tui-modal>
+	</view>
+</template>
+<script>
+import headerBack from '@/components/cm-module/headerNavbar/header-back' //自定义导航
+import modalLayer from '@/components/modal-layer'
+import empty from '@/components/empty'
+import { mapState, mapMutations } from 'vuex'
+const defaultListQuery = {
+	pageNum: 1, //页数
+	pageSize: 10, //条数
+	id: 0,
+	shopName: ''
+}
+export default {
+	components: {
+		empty
+	},
+	data() {
+		return {
+			CustomBar: this.CustomBar, // 顶部导航栏高度
+			isIphoneX: this.$store.state.isIphoneX,
+			receiptInfo: {},
+			listQuery: Object.assign({}, defaultListQuery),
+			shopOrderList: [],
+			scrollTop: 0,
+			isEmpty: false,
+			loadding: false,
+			pullUpOn: true,
+			hasNextPage: false,
+			pullFlag: true,
+			navbarHeight: '',
+			nomoreText: '上拉显示更多',
+			contentModalText: '确认关联该子订单吗?', //操作文字提示语句
+			modal: false,
+			modal1: false,
+			isCmcustomClass: 'left',
+			isShowHeader: false,
+			height: 64, //header高度
+			top: 0, //标题图标距离顶部距离
+			scrollH: 0, //滚动总高度
+			opcity: 1,
+			checkedOrderList: [],
+			checkedIndex: '',
+			cmCostPrice: 0, // 子订单平台服务费
+			confirmParams: {
+				id: 0,
+				shopOrderId: 0,
+				rebateRemarks: ''
+			},
+			skeletonShow: true,
+			isShareType: false
+		}
+	},
+	onLoad(option) {
+		let obj = {}
+		uni.getSystemInfo({
+			success: res => {
+				this.width = obj.left || res.windowWidth
+				this.height = obj.top ? obj.top + obj.height + 8 : res.statusBarHeight + 44
+				this.top = obj.top ? obj.top + (obj.height - 32) / 2 : res.statusBarHeight + 6
+				this.scrollH = res.windowWidth * 0.6
+			}
+		})
+		if (option.type == 'share') {
+			this.isShareType = true
+		}
+		this.confirmParams.id = option.id
+		this.getOrderReceiptDetail(this.confirmParams.id)
+	},
+	computed: {
+		...mapState(['hasLogin'])
+	},
+	methods: {
+		getOrderReceiptDetail(id) {
+			// 收款详情
+			this.OrderService.orderReceiptRebateDetails({ id: id })
+				.then(response => {
+					this.receiptInfo = response.data
+					this.getOrderReceiptRebateOrders()
+				})
+				.catch(err => {
+					this.$api.navigateTo('/pages/login/login-error')
+				})
+		},
+		getOrderReceiptRebateOrders() {
+			// 收款详情-订单列表
+			this.initListQuery()
+			this.OrderService.orderReceiptPlatformOrders(this.listQuery)
+				.then(response => {
+					let data = response.data
+					this.hasNextPage = response.data.hasNextPage
+					if (data.list && data.list.length > 0) {
+						this.isEmpty = false
+						this.shopOrderList = data.list.map((el, index) => {
+							el.isChecked = false
+							return el
+						})
+						this.pullFlag = false
+						setTimeout(() => {
+							this.pullFlag = true
+						}, 500)
+						if (this.hasNextPage) {
+							this.pullUpOn = false
+							this.nomoreText = '上拉显示更多'
+						} else {
+							if (this.shopOrderList.length < 3) {
+								this.pullUpOn = true
+								this.loadding = false
+							} else {
+								this.pullUpOn = false
+								this.loadding = false
+								this.nomoreText = '已至底部'
+							}
+						}
+					} else {
+						this.isEmpty = true
+					}
+					this.skeletonShow = false
+				})
+				.catch(error => {
+					this.$util.msg(error.msg, 2000)
+				})
+		},
+		getOnReachBottomData(index) {
+			//上拉加载
+			this.listQuery.pageNum += 1
+			this.OrderService.orderReceiptPlatformOrders(this.listQuery)
+				.then(response => {
+					let data = response.data
+					if (data.list && data.list.length > 0) {
+						this.hasNextPage = data.hasNextPage
+						let list = data.list.map((el, index) => {
+							el.isChecked = false
+							return el
+						})
+						this.shopOrderList = this.shopOrderList.concat(list)
+						this.pullFlag = false // 防上拉暴滑
+						setTimeout(() => {
+							this.pullFlag = true
+						}, 500)
+						if (this.hasNextPage) {
+							this.pullUpOn = false
+							this.nomoreText = '上拉显示更多'
+						} else {
+							this.pullUpOn = false
+							this.loadding = false
+							this.nomoreText = '已至底部'
+						}
+					}
+				})
+				.catch(error => {
+					this.$util.msg(error.msg, 2000)
+				})
+		},
+		subMitSearch() {
+			// 确认搜索
+			this.getOrderReceiptRebateOrders()
+		},
+		checkedOrder(order, index) {
+			// 勾选关联订单
+			this.checkedIndex = index
+			this.shopOrderList.forEach((el, index) => {
+				if (this.checkedIndex == index) {
+					el.isChecked = true
+					this.confirmParams.shopOrderId = el.shopOrderId
+					this.cmCostPrice = el.cmCostPrice
+				} else {
+					el.isChecked = false
+				}
+			})
+			console.log('shopOrderId', this.confirmParams.shopOrderId)
+			console.log('cmCostPrice', this.cmCostPrice)
+		},
+		confirmDistinguish() {
+			// 点击确认
+			const list = []
+			this.checkedOrderList.forEach(el => {
+				if (list.indexOf(el.userId) == -1) {
+					list.push(el.userId)
+				}
+			})
+			if (this.confirmParams.shopOrderId == 0) {
+				this.$util.msg('请选择一个订单!', 2000)
+				return
+			}
+			if (this.receiptInfo.receiptAmount != this.cmCostPrice) {
+				this.modal1 = true
+				return
+			} else {
+				this.modal = true
+			}
+		},
+		handleClick(e) {
+			// 确认关联平台服务费
+			// 通过审核
+			if (e.index == 1) {
+				this.orderReceiptConfirm(this.confirmParams)
+			}
+			this.modal = false
+		},
+		orderReceiptConfirm(params) {
+			//确认关联平台服务费
+			this.OrderService.orderReceiptConfirmPlatform(params)
+				.then(response => {
+					this.$util.msg('关联成功~', 2000, true, 'success')
+					setTimeout(() => {
+						this.$api.redirectTo(`/pages/relation/service/detail?id=${params.id}`)
+					}, 2000)
+				})
+				.catch(error => {
+					this.$util.msg(error.msg, 2000)
+				})
+		},
+		hideMobel(type) {
+			switch (type) {
+				case 0:
+					this.modal = false
+					break
+				case 1:
+					this.modal1 = false
+					break
+			}
+		},
+		formatColor(state) {
+			//设置邀请码状态亚瑟
+			let stateColor = '',
+				stateColorObject = {
+					1: '#ff7900',
+					2: '#4cd964',
+					3: '#19be6b',
+					4: '#ed3f14',
+					5: '#F74D54'
+				}
+			Object.keys(stateColorObject).forEach(function(key) {
+				if (key == state) {
+					stateColor = stateColorObject[key]
+				}
+			})
+			return stateColor
+		},
+		changeNumber(e) {
+			// 校验输入为数字
+			this.confirmParams.receiptAmount = this.toFixedFn(e.detail.value)
+			console.log('receiptAmount', this.confirmParams.receiptAmount)
+		},
+		toFixedFn(val) {
+			//处理小数点后两位数
+			return Number(Math.round(val * 100) / 100).toFixed(2)
+		},
+		orderDetail(shopOrderId) {
+			//订单详情跳转
+			this.$api.navigateTo(`/pages/relation/order/detail?shopOrderId=${shopOrderId}`)
+		},
+		toNoSms(url) {
+			this.$api.navigateTo(url)
+		},
+		initListQuery() {
+			// 初始化
+			this.shopOrderList = []
+			this.loadding = true
+			this.pullUpOn = true
+			this.listQuery.pageNum = 1
+		},
+		formatReceiptType(value) {
+			//订单状态文字和颜色
+			var HtmlStateText = '',
+				stateTextObject = {
+					1: '订单款',
+					2: '非订单款',
+					3: '返佣款',
+					4: '订单款或者非订单款',
+					5: '供应商退款'
+				}
+			Object.keys(stateTextObject).forEach(function(key) {
+				if (key == value) {
+					HtmlStateText = stateTextObject[key]
+				}
+			})
+			return HtmlStateText
+		}
+	},
+	onPageScroll(e) {
+		//实时获取到滚动的值
+		if (e.scrollTop > 30) {
+			this.isCmcustomClass = 'fiexd'
+		} else {
+			this.isCmcustomClass = 'left'
+		}
+		if (e.scrollTop > 180) {
+			this.isShowHeader = true
+		} else {
+			this.isShowHeader = false
+		}
+	},
+	onReachBottom() {
+		if (this.hasNextPage) {
+			this.loadding = true
+			this.pullUpOn = true
+			this.getOnReachBottomData()
+		}
+	},
+	onPullDownRefresh() {
+		setTimeout(() => {
+			this.getOrderReceiptRebateOrders()
+			uni.stopPullDownRefresh()
+		}, 200)
+	},
+	onShareAppMessage(res) {
+		//分享购买优惠券
+		const receipt = this.receiptInfo
+		const receiptTypeText = this.formatReceiptType(receipt.receiptType)
+		if (res.from === 'button') {
+			// console.log('来自页面内转发按钮')
+		}
+		return {
+			title: `¥${receipt.receiptAmount.toFixed(2)} | ${receipt.receiptDate}  |  ${
+				receipt.receiptStatusText
+			}(${receiptTypeText})`,
+			path: `/pages/login/login-share?id=${receipt.id}`,
+			imageUrl: 'https://static.caimei365.com/app/crm/image/icon-share@2x.jpg'
+		}
+	},
+	onShow() {}
+}
+</script>
+
+<style lang="scss">
+@import '@/uni.scss';
+
+page {
+	background: #f7f7f7;
+}
+
+.tui-header-box {
+	width: 100%;
+	background: #ffffff;
+	z-index: 999;
+	position: fixed;
+	top: 0;
+	left: 0;
+	background-size: cover;
+	background-image: url(https://static.caimei365.com/app/crm/image/statistic_bg2.png);
+
+	&.fiexd {
+	}
+
+	&.first {
+	}
+}
+.header-top {
+	width: 100%;
+	font-size: 16px;
+	font-weight: 500;
+	height: 32px;
+	display: flex;
+	align-items: center;
+	justify-content: center;
+	position: relative;
+	padding: 0 40rpx;
+}
+
+.header-sit {
+	width: 100%;
+	box-sizing: border-box;
+	height: 80rpx;
+	line-height: 80rpx;
+	box-sizing: border-box;
+	color: #ffffff;
+	.header-sit-text {
+		text-align: left;
+		font-size: $font-size-40;
+		font-weight: 600;
+		font-family: '正楷';
+	}
+	.iconfont {
+		display: block;
+		width: 80rpx;
+		height: 80rpx;
+		float: left;
+		text-align: center;
+		line-height: 80rpx;
+		font-size: 42rpx;
+	}
+}
+
+.tui-header-tabs {
+	width: 100%;
+	height: auto;
+	margin-bottom: 40rpx;
+	padding: 20rpx 24rpx;
+	background: #ffffff;
+	box-sizing: border-box;
+	position: fixed;
+	z-index: 999;
+	box-shadow: 0 10rpx 10rpx 0 rgba(86, 119, 252, 0.2);
+	.tui-header-top {
+		width: 100%;
+		height: 66rpx;
+		box-sizing: border-box;
+		float: left;
+		.title {
+			float: left;
+			line-height: 66rpx;
+			color: #333333;
+			text-align: left;
+			font-size: $font-size-30;
+			font-weight: 600;
+		}
+		.tui-header-button {
+			float: right;
+			box-sizing: border-box;
+			height: 100%;
+			line-height: 66rpx;
+			padding: 5rpx 0;
+			.button {
+				float: left;
+				box-sizing: border-box;
+				padding: 0 24rpx;
+				height: 100%;
+				line-height: 56rpx;
+				border-radius: 8rpx;
+				text-align: center;
+				color: #ffffff;
+				margin-left: 10rpx;
+				&.btn-confirm {
+					background: $btn-confirm;
+				}
+			}
+		}
+	}
+	.tui-header-item {
+		width: 100%;
+		height: auto;
+		margin: 10rpx 0;
+		position: relative;
+		float: left;
+		.list-title-t {
+			width: 100%;
+			height: 50rpx;
+			float: left;
+			font-size: $font-size-28;
+			padding-bottom: 10rpx;
+			margin-bottom: 10rpx;
+			.list-title-num {
+				float: left;
+				text-align: left;
+				color: #999999;
+				margin-left: 20rpx;
+				line-height: 40rpx;
+				font-size: $font-size-24;
+			}
+
+			.list-title-tip {
+				float: left;
+
+				.badges {
+					display: block;
+					float: left;
+					padding: 0 15rpx;
+					height: 36rpx;
+					line-height: 36rpx;
+					border-radius: 18rpx;
+					background: #ecf5ff;
+					font-size: $font-size-22;
+					text-align: center;
+					color: #409eff;
+				}
+			}
+		}
+
+		.list-title-b {
+			width: 100%;
+			height: 40rpx;
+			float: left;
+			font-size: $font-size-24;
+			line-height: 40rpx;
+			color: #666666;
+			text-align: left;
+			.text {
+				color: #999999;
+			}
+			.list-title-b-item {
+				width: 50%;
+				height: 100%;
+				float: left;
+			}
+			&.sms {
+				height: 100rpx;
+				padding: 10rpx;
+				border-radius: 4rpx;
+				.text {
+					height: 100%;
+					text-overflow: ellipsis;
+					overflow: hidden;
+					display: -webkit-box;
+					-webkit-line-clamp: 2;
+					line-clamp: 2;
+					-webkit-box-orient: vertical;
+				}
+			}
+		}
+		.list-icon {
+			width: 120rpx;
+			height: 120rpx;
+			border-radius: 10rpx;
+			position: absolute;
+			right: 0;
+			top: 0;
+			color: #dd524d;
+			z-index: 99;
+			.list-icon-image {
+				width: 120rpx;
+				height: 120rpx;
+				display: block;
+			}
+		}
+	}
+	.tui-header-tabmain {
+		width: 100%;
+		height: 70rpx;
+		float: left;
+		position: relative;
+		.input {
+			width: 100%;
+			height: 70rpx;
+			box-sizing: border-box;
+			padding: 0 20rpx;
+			padding-left: 70rpx;
+			background: #f7f7f7;
+			border-radius: 8rpx;
+			font-size: $font-size-26;
+		}
+		.icon-sousuo {
+			width: 80rpx;
+			height: 70rpx;
+			display: block;
+			line-height: 70rpx;
+			text-align: center;
+			color: #999999;
+			font-size: $font-size-38;
+			position: absolute;
+			left: 0;
+			top: 0;
+		}
+	}
+	.button-content {
+		width: 100%;
+		height: auto;
+		float: left;
+		position: relative;
+		.btn {
+			height: 64rpx;
+			padding: 0 20rpx;
+			margin: 10rpx 0 0 0;
+			line-height: 64rpx;
+			font-size: $font-size-26;
+			text-align: center;
+			border-radius: 6rpx;
+			float: right;
+		}
+		.btn-confirm {
+			background-color: #ff5000;
+			color: #ffffff;
+		}
+	}
+}
+
+.distinguish-button {
+	width: 100%;
+	position: fixed;
+	bottom: 0;
+	left: 0;
+	background-color: #ffffff;
+	padding: 0 50rpx;
+	padding-top: 20rpx;
+	.button {
+		width: 100%;
+		height: 80rpx;
+		background: $btn-confirm;
+		border-radius: 40rpx;
+		text-align: center;
+		color: #ffffff;
+		line-height: 80rpx;
+		font-size: $font-size-28;
+		box-shadow: 0 10rpx 14rpx 0 rgba(86, 119, 252, 0.2);
+	}
+}
+
+.user-section {
+	position: absolute;
+	width: 100%;
+}
+
+.header-content {
+	width: 100%;
+	height: auto;
+	position: relative;
+	background-color: #f7f7f7;
+	.tui-header-btm {
+		width: 100%;
+		padding: 0 30rpx;
+		box-sizing: border-box;
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+		color: #fff;
+	}
+}
+.tui-order-list {
+	margin-top: 24rpx;
+	width: 100%;
+	position: relative;
+	box-sizing: border-box;
+	padding: 0 20rpx;
+}
+
+.tui-order-content {
+	width: 100%;
+	height: auto;
+}
+
+.tui-order-item {
+	display: flex;
+	flex-direction: column;
+	width: 100%;
+	padding: 20rpx 20rpx;
+	background: #fff;
+	margin-bottom: 24rpx;
+	border-radius: 8rpx;
+	position: relative;
+	.list-checked {
+		width: 80rpx;
+		height: 80rpx;
+		line-height: 80rpx;
+		text-align: center;
+		position: absolute;
+		right: 0;
+		top: 0;
+		.iconfont {
+			font-size: 38rpx;
+			color: $color-system;
+		}
+	}
+	.list-detail {
+		width: 70rpx;
+		height: 80rpx;
+		line-height: 80rpx;
+		text-align: center;
+		position: absolute;
+		right: 0;
+		bottom: 0;
+		.iconfont {
+			font-size: $font-size-32;
+			color: #999999;
+		}
+	}
+}
+
+.list-title {
+	width: 100%;
+	height: auto;
+
+	.list-title-t {
+		width: 100%;
+		height: 50rpx;
+		float: left;
+		font-size: $font-size-24;
+		padding-bottom: 10rpx;
+		.list-title-tip {
+			float: left;
+			.badges {
+				display: block;
+				float: left;
+				padding: 0 15rpx;
+				height: 36rpx;
+				line-height: 36rpx;
+				border-radius: 20rpx;
+				font-size: $font-size-22;
+				background-color: #f0f9eb;
+				color: #67c23a;
+				text-align: center;
+				&.success {
+					background-color: #ecf5ff;
+					color: #409eff;
+				}
+				&.warning {
+					background-color: #fdf6ec;
+					color: #e6a23c;
+				}
+			}
+			.badgesb {
+				display: block;
+				float: left;
+				padding: 0 15rpx;
+				height: 36rpx;
+				line-height: 36rpx;
+				border-radius: 20rpx;
+				background: #f4f4f5;
+				font-size: $font-size-22;
+				text-align: center;
+				color: #909399;
+				margin-left: 24rpx;
+			}
+		}
+		.list-title-tag {
+			float: left;
+			margin-left: 20rpx;
+			.badges {
+				display: block;
+				float: left;
+				padding: 0 15rpx;
+				height: 40rpx;
+				line-height: 40rpx;
+				border-radius: 20rpx;
+				font-size: $font-size-22;
+				text-align: center;
+				background-color: #ecf5ff;
+				color: #409eff;
+			}
+		}
+		.list-title-num {
+			float: left;
+			text-align: left;
+			color: #42b983;
+			line-height: 40rpx;
+			margin-left: 20rpx;
+			font-size: $font-size-24;
+		}
+	}
+	.list-title-a {
+		width: 100%;
+		height: auto;
+		float: left;
+		// padding: 5rpx 8rpx;
+		// border-radius: 4rpx;
+		// background-color: rgba(247, 247, 247, 1);
+		// margin-bottom: 10rpx;
+		.text {
+			color: #999999;
+		}
+		.list-title-a-text {
+			width: 100%;
+			height: 44rpx;
+			float: left;
+			font-size: $font-size-24;
+			line-height: 44rpx;
+			color: #666666;
+			text-align: left;
+		}
+	}
+	.list-title-b {
+		width: 100%;
+		height: 44rpx;
+		float: left;
+		font-size: $font-size-24;
+		line-height: 44rpx;
+		color: #666666;
+		text-align: left;
+		.text {
+			color: #999999;
+		}
+		.list-title-b-item {
+			width: 50%;
+			height: 100%;
+			float: left;
+		}
+		&.sms {
+			height: auto;
+		}
+	}
+}
+.tui-prompt-title {
+	line-height: 44rpx;
+	text-align: center;
+}
+.tui-prompt-input {
+	width: 100%;
+	height: 80rpx;
+	box-sizing: border-box;
+	background: #f7f7f7;
+	border-radius: 8rpx;
+	padding: 15rpx 20rpx;
+	padding-left: 50rpx;
+	margin: 20rpx 0;
+	position: relative;
+	.text {
+		display: block;
+		width: 50rpx;
+		height: 80rpx;
+		line-height: 80rpx;
+		color: #666666;
+		text-align: center;
+		position: absolute;
+		top: 0;
+		left: 0;
+	}
+	.input {
+		width: 100%;
+		height: 100%;
+		line-height: 80rpx;
+		font-size: $font-size-26;
+		color: $color-system;
+		&.none {
+			display: none;
+		}
+	}
+}
+.tui-prompt-flex {
+	width: 100%;
+	height: 70rpx;
+	display: flex;
+	margin-top: 20rpx;
+	.btn {
+		flex: 1;
+		line-height: 70rpx;
+		font-size: $font-size-26;
+		text-align: center;
+		color: #ffffff;
+		border-radius: 33rpx;
+		margin: 0 24rpx;
+		&.btn-cancel {
+			background: #f7f7f7;
+			color: #999999;
+		}
+		&.btn-confirm {
+			background: $color-system;
+		}
+	}
+}
+.tui-prompt-text {
+	line-height: 44rpx;
+	font-size: $font-size-26;
+	color: #333333;
+	.text {
+		color: $color-system;
+	}
+}
+</style>

+ 814 - 0
pages/relation/service/list.vue

@@ -0,0 +1,814 @@
+<template>
+	<view class="container mine clearfix">
+		<view
+			class="tui-header-box first"
+			:style="{ height: isCmcustomClass == 'fiexd' ? CustomBar + 6 + 'px' : CustomBar + 6 + 'px' }"
+			:class="isCmcustomClass"
+		>
+			<view class="header-top" :style="{ paddingTop: top + 'px', lineHeight: CustomBar + 20 + 'px' }"></view>
+			<view class="header-sit">
+				<text class="iconfont icon-fanhui" @click.stop="this.$api.navigateBack(1)"></text>
+				<text class="header-sit-text">录入平台服务费欠款</text>
+			</view>
+		</view>
+		<tui-skeleton
+			v-if="skeletonShow"
+			backgroundColor="#fafafa"
+			borderRadius="10rpx"
+			:isLoading="true"
+			:loadingType="7"
+		/>
+		<view class="container-content" v-else>
+			<view class="tui-header-tabs day clearfix" :style="{ top: CustomBar + 6 + 'px' }">
+				<view class="tui-header-tabmain">
+					<input
+						class="input"
+						type="text"
+						confirm-type="search"
+						@confirm="subMitSearch()"
+						placeholder="请输入供应商名称/子订单ID"
+					/>
+					<text class="iconfont icon-sousuo"></text>
+				</view>
+			</view>
+			<view
+				class="user-section"
+				:style="{
+					top: isIphoneX ? CustomBar + 66 + 'px' : CustomBar + 56 + 'px',
+					left: 0 + 'px',
+					paddingBottom: isIphoneX ? '178rpx' : '144rpx'
+				}"
+			>
+				<view class="header-content">
+					<view :class="{ 'tui-order-list': scrollTop >= 0 }" class="clearfix">
+						<!-- 空白页 -->
+						<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="list-title" @click.stop="orderDetail(order.shopOrderId)">
+									<view class="list-title-t">
+										<view class="list-title-tip">
+											<text
+												class="badges"
+												:class="{
+													success: order.orderType === 1,
+													warning: order.orderType === 0
+												}"
+												>{{ order.orderType | formatOrderType }}</text
+											>
+											<text class="badgesb" v-if="order.secondHandOrderFlag == 1">二手</text>
+										</view>
+										<view class="list-title-tag">
+											<text class="badges">{{ order.organizeId | organizeName }}</text>
+										</view>
+										<view class="list-title-num">{{
+											order.status | stateExpFormat
+										}}</view>
+									</view>
+									<view class="list-title-a">
+										<view class="list-title-a-text">
+											子订单编号:<text class="text"
+												>{{ order.shopOrderNo }} ( {{ order.shopOrderId }} )</text
+											>
+										</view>
+										<view class="list-title-a-text">
+											下单日期:<text class="text">{{ order.orderTime }}</text>
+										</view>
+										<view class="list-title-a-text">
+											供应商名称:<text class="text">{{ order.shopName }}</text>
+										</view>
+									</view>
+									<view class="list-title-b">
+										客户名称:<text class="text">{{
+											order.userName ? order.userName : '无'
+										}}</text>
+									</view>
+									<view class="list-title-b">
+										子订单金额:<text class="text"
+											>¥{{ order.needPayAmount | NumFormat }}</text
+										>
+									</view>
+									<view class="list-title-b">
+										应收金额:<text class="text"
+											>¥{{ order.needPayAmount | NumFormat }}</text
+										>
+									</view>
+									<view class="list-title-b">
+										已收金额:<text class="text"
+											>¥{{ order.receiptAmount | NumFormat }}</text
+										>
+									</view>
+									<view class="list-title-b">
+										平台服务费:<text class="text"> ¥{{
+											order.cmCostPrice | NumFormat
+										}}</text>
+									</view>
+								</view>
+								<view class="list-checked" @click="checkedOrder(order, index)">
+									<text
+										class="iconfont"
+										:class="order.isChecked ? 'icon-yixuanze' : 'icon-weixuanze'"
+									></text>
+								</view>
+								<view class="list-detail" @click.stop="orderDetail(order.shopOrderId)">
+									<text class="iconfont icon-xiayibu"></text>
+								</view>
+							</view>
+							<!--加载loadding-->
+							<tui-loadmore :visible="loadding" :index="3" type="black" />
+							<tui-nomore :visible="!pullUpOn" bgcolor="#F7F7F7" :text="nomoreText" />
+							<!--加载loadding-->
+						</view>
+					</view>
+				</view>
+			</view>
+			<view class="distinguish-button" :style="{ paddingBottom: isIphoneX ? '68rpx' : '24rpx' }">
+				<view class="button" @click="confirmDistinguish">录入平台服务费欠款</view>
+			</view>
+		</view>
+		<!--弹窗  -->
+		<tui-modal :show="modal" :padding="'40rpx 30rpx'" @cancel="hideMobel(0)" :custom="true" fadeIn>
+			<view class="tui-modal-custom">
+				<view class="tui-prompt-title">平台服务费欠款</view>
+				<view class="tui-prompt-input">
+					<text class="text">¥</text>
+					<input
+						class="input"
+						:class="modal ? 'show' : 'none'"
+						type="text"
+						placeholder="请输入子订单的平台服务费欠款金额(必填)"
+						@blur="changeNumber($event)"
+						v-model="confirmParams.verbalAmount"
+					/>
+				</view>
+				<view class="tui-prompt-text">
+					欠款确认后,供应商对平台的欠款将转移给采美自营供应商,自营供应商可在以后对该供应商的付款中进行欠款抵扣。
+				</view>
+				<view class="tui-prompt-flex">
+					<view class="btn btn-cancel" @click="hideMobel(0)">取消</view>
+					<view class="btn btn-confirm" @click="handleClick">确定</view>
+				</view>
+			</view>
+		</tui-modal>
+	</view>
+</template>
+<script>
+import empty from '@/components/empty'
+import { mapState, mapMutations } from 'vuex'
+const defaultListQuery = {
+	pageNum: 1, //页数
+	pageSize: 10, //条数
+	id: 0,
+	shopName: ''
+}
+export default {
+	components: {
+		empty
+	},
+	data() {
+		return {
+			CustomBar: this.CustomBar, // 顶部导航栏高度
+			isIphoneX: this.$store.state.isIphoneX,
+			skeletonShow: true,
+			listQuery: Object.assign({}, defaultListQuery),
+			orderList: [],
+			checkedOrderList: [],
+			checkedIndex: '',
+			scrollTop: 0,
+			isEmpty: false,
+			loadding: false,
+			pullUpOn: true,
+			hasNextPage: false,
+			pullFlag: true,
+			navbarHeight: '',
+			nomoreText: '上拉显示更多',
+			contentModalText: '', //操作文字提示语句
+			modal: false,
+			cmCostPrice: 0,
+			confirmParams: {
+				shopOrderId: 0,
+				verbalAmount: '',
+				rebateRemarks: ''
+			},
+			rightDrawer: false,
+			hanldReceipt: {}, //储存监听收款信息
+			handleOperId: 0, //操作类型
+			height: 64, //header高度
+			top: 0, //标题图标距离顶部距离
+			scrollH: 0, //滚动总高度
+			opcity: 1
+		}
+	},
+	onLoad() {
+		let obj = {}
+		uni.getSystemInfo({
+			success: res => {
+				this.width = obj.left || res.windowWidth
+				this.height = obj.top ? obj.top + obj.height + 8 : res.statusBarHeight + 44
+				this.top = obj.top ? obj.top + (obj.height - 32) / 2 : res.statusBarHeight + 6
+				this.scrollH = res.windowWidth * 0.6
+			}
+		})
+	},
+	computed: {
+		...mapState(['hasLogin'])
+	},
+	methods: {
+		getOrderReceiptRebateOrders() {
+			// 收款详情-订单列表
+			this.initListQuery()
+			this.OrderService.orderReceiptPlatformOrders(this.listQuery)
+				.then(response => {
+					let data = response.data
+					this.hasNextPage = response.data.hasNextPage
+					if (data.list && data.list.length > 0) {
+						this.isEmpty = false
+						this.orderList = data.list.map((el, index) => {
+							el.isChecked = false
+							return el
+						})
+						this.pullFlag = false
+						setTimeout(() => {
+							this.pullFlag = true
+						}, 500)
+						if (this.hasNextPage) {
+							this.pullUpOn = false
+							this.nomoreText = '上拉显示更多'
+						} else {
+							if (this.orderList.length < 3) {
+								this.pullUpOn = true
+								this.loadding = false
+							} else {
+								this.pullUpOn = false
+								this.loadding = false
+								this.nomoreText = '已至底部'
+							}
+						}
+					} else {
+						this.isEmpty = true
+					}
+					this.skeletonShow = false
+				})
+				.catch(err => {
+					this.$util.msg(err.msg, 2000)
+				})
+		},
+		getOnReachBottomData(index) {
+			//上拉加载
+			this.listQuery.pageNum += 1
+			this.OrderService.orderReceiptPlatformOrders(this.listQuery)
+				.then(response => {
+					let data = response.data
+					if (data.list && data.list.length > 0) {
+						this.hasNextPage = data.hasNextPage
+						let list = data.list.map((el, index) => {
+							el.isChecked = false
+							return el
+						})
+						this.orderList = this.orderList.concat(list)
+						this.pullFlag = false // 防上拉暴滑
+						setTimeout(() => {
+							this.pullFlag = true
+						}, 500)
+						if (this.hasNextPage) {
+							this.pullUpOn = false
+							this.nomoreText = '上拉显示更多'
+						} else {
+							this.pullUpOn = false
+							this.loadding = false
+							this.nomoreText = '已至底部'
+						}
+					}
+				})
+				.catch(error => {
+					this.$util.msg(error.msg, 2000)
+				})
+		},
+		subMitSearch() {
+			// 确认搜索
+			this.getOrderReceiptRebateOrders()
+		},
+		confirmDistinguish() {
+			// 点击确认 
+			const list = []
+			this.checkedOrderList.forEach(el => {
+				if (list.indexOf(el.userId) == -1) {
+					list.push(el.userId)
+				}
+			})
+			if (this.confirmParams.shopOrderId == 0) {
+				this.$util.msg('请选择一个订单!', 2000)
+				return
+			}
+			this.confirmParams.verbalAmount = ''
+			this.modal = true
+		},
+		checkedOrder(order, index) {
+			// 勾选关联订单
+			this.checkedIndex = index
+			this.orderList.forEach((el, index) => {
+				if (this.checkedIndex == index) {
+					el.isChecked = true
+					this.confirmParams.shopOrderId = el.shopOrderId
+					this.cmCostPrice = el.cmCostPrice
+				} else {
+					el.isChecked = false
+				}
+			})
+			console.log('shopOrderId', this.confirmParams.shopOrderId)
+			console.log('cmCostPrice', this.cmCostPrice)
+		},
+		handleClick() {
+			//用户操作订单
+			// 子订单的平台服务费欠款金为空时
+			if (this.confirmParams.verbalAmount == 0) {
+				this.$util.msg('请输入子订单的平台服务费欠款金额!', 2000)
+				return
+			}
+			// 录入金额与子订单平台服务费金额不一致时
+			if (this.confirmParams.verbalAmount != this.cmCostPrice) {
+				this.modal = false
+				this.$util.msg('录入金额需与平台服务费金额不一致!', 2000)
+				return
+			}
+			this.orderReceiptConfirm(this.confirmParams)
+		},
+		async orderReceiptConfirm(params) {
+			//确认关联平台服务费欠款
+			try {
+				const res = await this.OrderService.orderReceiptConfirmBill(params)
+				this.modal = false
+				this.$util.msg('关联成功~', 2000, true, 'success')
+				setTimeout(() => {
+					this.$api.navigateTo(`/pages/relation/service/detail?id=${res.data}`)
+				}, 2000)
+			} catch (error) {
+				this.$util.msg(error.msg, 2000)
+			}
+		},
+		hideMobel(type) {
+			switch (type) {
+				case 0:
+					this.modal = false
+					break
+				case 1:
+					this.modal1 = false
+					break
+			}
+		},
+		orderDetail(shopOrderId) {
+			//订单详情跳转
+			this.$api.navigateTo(`/pages/relation/order/detail?shopOrderId=${shopOrderId}`)
+		},
+		changeNumber(e) {
+			// 校验输入为数字
+			this.confirmParams.receiptAmount = this.toFixedFn(e.detail.value)
+			console.log('receiptAmount', this.confirmParams.receiptAmount)
+		},
+		toFixedFn(val) {
+			//处理小数点后两位数
+			return Number(Math.round(val * 100) / 100).toFixed(2)
+		},
+		formatColor(state) {
+			//设置邀请码状态亚瑟
+			let stateColor = '',
+				stateColorObject = {
+					1: '#ff7900',
+					2: '#4cd964',
+					3: '#19be6b',
+					4: '#ed3f14',
+					5: '#F74D54'
+				}
+			Object.keys(stateColorObject).forEach(function(key) {
+				if (key == state) {
+					stateColor = stateColorObject[key]
+				}
+			})
+			return stateColor
+		},
+		toNoSms(url) {
+			this.$api.navigateTo(url)
+		},
+		initListQuery() {
+			// 初始化
+			this.orderList = []
+			this.loadding = true
+			this.pullUpOn = true
+			this.listQuery.pageNum = 1
+		}
+	},
+	onPageScroll(e) {
+		//实时获取到滚动的值
+		if (e.scrollTop > 30) {
+			this.isCmcustomClass = 'fiexd'
+		} else {
+			this.isCmcustomClass = 'left'
+		}
+		if (e.scrollTop > 180) {
+			this.isShowHeader = true
+		} else {
+			this.isShowHeader = false
+		}
+	},
+	onReachBottom() {
+		if (this.hasNextPage) {
+			this.loadding = true
+			this.pullUpOn = true
+			this.getOnReachBottomData()
+		}
+	},
+	onPullDownRefresh() {
+		setTimeout(() => {
+			this.getOrderReceiptRebateOrders()
+			uni.stopPullDownRefresh()
+		}, 200)
+	},
+	onShow() {
+		this.getOrderReceiptRebateOrders()
+	}
+}
+</script>
+
+<style lang="scss">
+@import '@/uni.scss';
+
+page {
+	background: #f7f7f7;
+}
+
+.tui-header-box {
+	width: 100%;
+	background: #ffffff;
+	z-index: 999;
+	position: fixed;
+	top: 0;
+	left: 0;
+	background-size: cover;
+	background-image: url(https://static.caimei365.com/app/crm/image/statistic_bg2.png);
+
+	&.fiexd {
+	}
+
+	&.first {
+	}
+}
+.header-top {
+	width: 100%;
+	font-size: 16px;
+	font-weight: 500;
+	height: 32px;
+	display: flex;
+	align-items: center;
+	justify-content: center;
+	position: relative;
+	padding: 0 40rpx;
+}
+
+.header-sit {
+	width: 100%;
+	box-sizing: border-box;
+	height: 80rpx;
+	line-height: 80rpx;
+	box-sizing: border-box;
+	color: #ffffff;
+	.header-sit-text {
+		text-align: left;
+		font-size: $font-size-40;
+		font-weight: 600;
+		font-family: '正楷';
+	}
+	.icon-fanhui {
+		display: block;
+		width: 80rpx;
+		height: 80rpx;
+		float: left;
+		text-align: center;
+		line-height: 80rpx;
+		font-size: 42rpx;
+	}
+}
+
+.tui-header-tabs {
+	width: 100%;
+	height: auto;
+	margin-bottom: 40rpx;
+	padding: 20rpx 24rpx;
+	background: #ffffff;
+	box-sizing: border-box;
+	position: fixed;
+	z-index: 999;
+	box-shadow: 0 10rpx 10rpx 0 rgba(86, 119, 252, 0.2);
+	.tui-header-tabmain {
+		width: 100%;
+		height: 70rpx;
+		float: left;
+		position: relative;
+		.input {
+			width: 100%;
+			height: 70rpx;
+			box-sizing: border-box;
+			padding: 0 20rpx;
+			padding-left: 70rpx;
+			background: #f7f7f7;
+			border-radius: 8rpx;
+			font-size: $font-size-26;
+		}
+		.icon-sousuo {
+			width: 80rpx;
+			height: 70rpx;
+			display: block;
+			line-height: 70rpx;
+			text-align: center;
+			color: #999999;
+			font-size: $font-size-38;
+			position: absolute;
+			left: 0;
+			top: 0;
+		}
+	}
+	.button-content {
+		width: 100%;
+		height: auto;
+		float: left;
+		position: relative;
+		.btn {
+			height: 64rpx;
+			padding: 0 20rpx;
+			margin: 10rpx 0 0 0;
+			line-height: 64rpx;
+			font-size: $font-size-26;
+			text-align: center;
+			border-radius: 6rpx;
+			float: right;
+		}
+		.btn-confirm {
+			background-color: #ff5000;
+			color: #ffffff;
+		}
+	}
+}
+
+.distinguish-button {
+	width: 100%;
+	position: fixed;
+	bottom: 0;
+	left: 0;
+	background-color: #ffffff;
+	padding: 0 50rpx;
+	padding-top: 20rpx;
+	.button {
+		width: 100%;
+		height: 80rpx;
+		background: $btn-confirm;
+		border-radius: 40rpx;
+		text-align: center;
+		color: #ffffff;
+		line-height: 80rpx;
+		font-size: $font-size-28;
+		box-shadow: 0 10rpx 14rpx 0 rgba(86, 119, 252, 0.2);
+	}
+}
+
+.user-section {
+	position: absolute;
+	width: 100%;
+}
+
+.header-content {
+	width: 100%;
+	height: auto;
+	position: relative;
+	background-color: #f7f7f7;
+}
+
+.tui-order-list {
+	margin-top: 24rpx;
+	width: 100%;
+	position: relative;
+	box-sizing: border-box;
+	padding: 0 20rpx;
+}
+
+.tui-order-content {
+	width: 100%;
+	height: auto;
+}
+
+.tui-order-item {
+	display: flex;
+	flex-direction: column;
+	width: 100%;
+	padding: 20rpx 20rpx;
+	background: #fff;
+	margin-bottom: 24rpx;
+	border-radius: 8rpx;
+	position: relative;
+	.list-checked {
+		width: 80rpx;
+		height: 80rpx;
+		line-height: 80rpx;
+		text-align: center;
+		position: absolute;
+		right: 0;
+		top: 0;
+		.iconfont {
+			font-size: 38rpx;
+			color: $color-system;
+		}
+	}
+	.list-detail {
+		width: 70rpx;
+		height: 80rpx;
+		line-height: 80rpx;
+		text-align: center;
+		position: absolute;
+		right: 0;
+		bottom: 0;
+		.iconfont {
+			font-size: $font-size-32;
+			color: #999999;
+		}
+	}
+}
+
+.list-title {
+	width: 100%;
+	height: auto;
+
+	.list-title-t {
+		width: 100%;
+		height: 50rpx;
+		float: left;
+		font-size: $font-size-24;
+		padding-bottom: 10rpx;
+		.list-title-tip {
+			float: left;
+			.badges {
+				display: block;
+				float: left;
+				padding: 0 15rpx;
+				height: 36rpx;
+				line-height: 36rpx;
+				border-radius: 20rpx;
+				font-size: $font-size-22;
+				background-color: #f0f9eb;
+				color: #67c23a;
+				text-align: center;
+				&.success {
+					background-color: #ecf5ff;
+					color: #409eff;
+				}
+				&.warning {
+					background-color: #fdf6ec;
+					color: #e6a23c;
+				}
+			}
+			.badgesb {
+				display: block;
+				float: left;
+				padding: 0 15rpx;
+				height: 36rpx;
+				line-height: 36rpx;
+				border-radius: 20rpx;
+				background: #f4f4f5;
+				font-size: $font-size-22;
+				text-align: center;
+				color: #909399;
+				margin-left: 24rpx;
+			}
+		}
+		.list-title-tag {
+			float: left;
+			margin-left: 20rpx;
+			.badges {
+				display: block;
+				float: left;
+				padding: 0 15rpx;
+				height: 36rpx;
+				line-height: 36rpx;
+				border-radius: 20rpx;
+				font-size: $font-size-22;
+				text-align: center;
+				background-color: #ecf5ff;
+				color: #409eff;
+			}
+		}
+		.list-title-num {
+			float: left;
+			text-align: left;
+			color: #42b983;
+			line-height: 40rpx;
+			margin-left: 20rpx;
+			font-size: $font-size-24;
+		}
+	}
+	.list-title-a {
+		width: 100%;
+		height: auto;
+		float: left;
+		// padding: 5rpx 8rpx;
+		// border-radius: 4rpx;
+		// background-color: rgba(247, 247, 247, 1);
+		// margin-bottom: 10rpx;
+		.text {
+			color: #999999;
+		}
+		.list-title-a-text {
+			width: 100%;
+			height: 44rpx;
+			float: left;
+			font-size: $font-size-24;
+			line-height: 44rpx;
+			color: #666666;
+			text-align: left;
+		}
+	}
+	.list-title-b {
+		width: 100%;
+		height: 44rpx;
+		float: left;
+		font-size: $font-size-24;
+		line-height: 44rpx;
+		color: #666666;
+		text-align: left;
+		.text {
+			color: #999999;
+		}
+		.list-title-b-item {
+			width: 50%;
+			height: 100%;
+			float: left;
+		}
+		&.sms {
+			height: auto;
+		}
+	}
+}
+.tui-prompt-title {
+	line-height: 44rpx;
+	text-align: center;
+}
+.tui-prompt-input {
+	width: 100%;
+	height: 80rpx;
+	box-sizing: border-box;
+	background: #f7f7f7;
+	border-radius: 8rpx;
+	padding: 15rpx 20rpx;
+	padding-left: 50rpx;
+	margin: 20rpx 0;
+	position: relative;
+	.text {
+		display: block;
+		width: 50rpx;
+		height: 80rpx;
+		line-height: 80rpx;
+		color: #666666;
+		text-align: center;
+		position: absolute;
+		top: 0;
+		left: 0;
+	}
+	.input {
+		width: 100%;
+		height: 100%;
+		line-height: 80rpx;
+		font-size: $font-size-26;
+		color: $color-system;
+		&.none {
+			display: none;
+		}
+	}
+}
+.tui-prompt-flex {
+	width: 100%;
+	height: 70rpx;
+	display: flex;
+	margin-top: 20rpx;
+	.btn {
+		flex: 1;
+		line-height: 70rpx;
+		font-size: $font-size-26;
+		text-align: center;
+		color: #ffffff;
+		border-radius: 33rpx;
+		margin: 0 24rpx;
+		&.btn-cancel {
+			background: #f7f7f7;
+			color: #999999;
+		}
+		&.btn-confirm {
+			background: $color-system;
+		}
+	}
+}
+.tui-prompt-text {
+	line-height: 44rpx;
+	font-size: $font-size-26;
+	color: #333333;
+	.text {
+		color: $color-system;
+	}
+}
+</style>

+ 43 - 2
services/order.service.js

@@ -21,7 +21,7 @@ export default class OrderService {
         })
     }
     /**
-	 *获取收款类型
+	 *获取收款账号
 	/**/
     orderReceiptType (data = {}) {
         return this.AjaxService.get({ 
@@ -44,7 +44,7 @@ export default class OrderService {
 	 *保存收款
 	 * @param smsContent 短信内容
 	 * @param payType 付款类型
-	 * @param receiptType 收款类型
+	 * @param receiptType 收款账号
 	 * @param receiptAmount 收款金额
 	 * @param handlingFee 手续费
 	 * @param receiptDate 收款时间
@@ -243,6 +243,47 @@ export default class OrderService {
             loadText: '处理中...' 
         })
     }
+    /**
+	 *平台服务费关联
+	 * @param Id 收款Id
+	 * @param shopOrderId 子订单Id
+	/**/
+    orderReceiptConfirmPlatform(data = {}) {
+	    return this.AjaxService.post({ 
+	        url:'/order/receipt/confirm/platform', 
+	        data, 
+	        isLoading: true ,
+	        loadText: '处理中...' 
+	    })
+    }
+    /**
+	 *平台服务费欠款关联
+	 * @param shopOrderId 子订单Id
+	 * @param verbalAmount 子订单平台服务费
+	/**/
+    orderReceiptConfirmBill(data = {}) {
+	    return this.AjaxService.post({ 
+	        url:'/order/receipt/confirm/bill', 
+	        data, 
+	        isLoading: true ,
+	        loadText: '处理中...' 
+	    })
+    }
+    /**
+	 *平台服务费关联子订单列表
+	 * @param id 收款Id
+	 * @param keyword 搜索关键词(供应商名称/订单号)
+	 * @param pageNum 页码
+	 * @param pageSize 条数
+	/**/
+    orderReceiptPlatformOrders(data = {}) {
+	    return this.AjaxService.get({ 
+	        url:'/order/receipt/platform/orders', 
+	        data, 
+	        isLoading: false ,
+	    })
+    }
+	
     /**
 	 *关联供应商退款
 	 * @param Id 收款Id

+ 38 - 32
store/index.js

@@ -2,15 +2,15 @@ import Vue from 'vue'
 import Vuex from 'vuex'
 import api from '../common/config/caimeiApi.js'
 import authorize from '../common/config/authorize.js'
-import { 
+import {
     defaultAllTabs,
-    defaultServiceTabs ,
+    defaultServiceTabs,
     defaultReturnTabs,
     defaultListTabsArr
 } from '../utils/config.tabs.js'
 
 Vue.use(Vuex)
-const handlebVisible = function(arr,val){
+const handlebVisible = function(arr, val) {
     return arr.some(item => item === val)
 }
 const store = new Vuex.Store({
@@ -18,49 +18,55 @@ const store = new Vuex.Store({
         isWxAuthorize: false,
         hasLogin: false,
         userInfo: {},
-        USER_TYPE:4,
+        USER_TYPE: 4,
         isIphoneX: false,
-        handleListTabs:[],
-        handlebBtnVisible:false, // 收款列表操作按钮显示控制
-        returnBtnVisible:false,  // 收款列表口头返佣按钮显示控制
-        examineBtnVisible:false, // 审核详情审核操作按钮显示控制
+        handleListTabs: [],
+        handlebBtnVisible: false, // 收款列表操作按钮显示控制
+        returnBtnVisible: false, // 收款列表口头返佣按钮显示控制
+        serviceBtnVisible: false, // 收款列表平台服务费按钮显示控制
+        examineBtnVisible: false, // 审核详情审核操作按钮显示控制
     },
     mutations: {
-        login(state, provider) { 
+        login(state, provider) {
             //用户身份 1协销人员,2客服,3财务,4超级管理员
             /**
 			 * @用户权限:permissions
 			 * @1录入收款,2收款列表操作,3关联订单款,4关联返佣款,5口头返佣,6关联供应商退款,7审核订单款
 			 * @8收款详情分享,9非订单款查看(全部),10订单款查看(全部),11返佣款查看(全部),12供应商退款查看(全部)
-			 * @13订单款查看(协销自己机构),14返佣款查看(协销自己机构),15供应商退款查看(协销自己机构)
+			 * @13订单款查看(协销自己机构),14返佣款查看(协销自己机构),15供应商退款查看(协销自己机构) 
+			 * @20平台服务费
 			 **/
             state.hasLogin = true
             state.userInfo = provider
             state.USER_TYPE = provider.userType
-            if(handlebVisible(provider.permissions,4)){// 控制口头返佣按钮显示
-			    state.returnBtnVisible = true
-			    console.log('returnBtnVisible',state.returnBtnVisible)
+            if (handlebVisible(provider.permissions, 4)) { // 控制口头返佣按钮显示
+                state.returnBtnVisible = true
             }
-            if(handlebVisible(provider.permissions,7)){// 控制审核按钮显示
-			    state.examineBtnVisible = true
-			    console.log('examineBtnVisible',state.examineBtnVisible)
+            if (handlebVisible(provider.permissions, 20)) { // 控制平台服务费按钮显示
+                state.serviceBtnVisible = true
             }
-            if(handlebVisible(provider.permissions,2)){// 控制操作按钮显示
+            if (handlebVisible(provider.permissions, 7)) { // 控制审核按钮显示
+                state.examineBtnVisible = true
+            }
+            if (handlebVisible(provider.permissions, 2)) { // 控制操作按钮显示
                 state.handlebBtnVisible = true
-                console.log('handlebBtnVisible',state.handlebBtnVisible)
             }
-            if(provider.tabMenus){
-                state.handleListTabs = provider.tabMenus.map(tab => {
-				    let name
-				    switch(tab){
-				    case 1: name = '订单'; break
-				    case 2: name = '非订单'; break
-				    case 3: name = '返佣'; break
-				    case 5: name = '供应商退款'; break
-				    }
-				    return { name : name, type : tab }
+            if (provider.tabMenus) {
+                const tabMenus = []
+                const tabMap = {
+				    1:'订单',
+				    2:'非订单',
+				    // 3:'返佣',
+				    5:'供应商退款',
+				    10:'平台服务费'
+                } 
+                provider.tabMenus.forEach(type => {
+                    if (type != 3) {
+                        tabMenus.push({name: tabMap[type], type: type }) 
+                    }
                 })
-                console.log('handleListTabs',state.handleListTabs)
+                state.handleListTabs = tabMenus
+                console.log('handleListTabs', state.handleListTabs)
             }
             uni.setStorage({ //缓存用户登陆状态
                 key: 'userInfo',
@@ -83,8 +89,8 @@ const store = new Vuex.Store({
             state.userInfo = provider
             state.openid = provider.openid
             uni.setStorage({ //缓存用户openid
-			    key: 'openid',
-			    data: provider.openid
+                key: 'openid',
+                data: provider.openid
             })
             uni.setStorage({ //缓存用户登陆状态
                 key: 'userInfo',
@@ -108,4 +114,4 @@ const store = new Vuex.Store({
     }
 })
 
-export default store
+export default store

+ 13 - 6
utils/config.tabs.js

@@ -1,21 +1,28 @@
-//全部权限 收款款项类型:1订单款,2非订单款,3返佣款 4订单款或者非订单款(因财务阶段无法区分订单非订单), 5供应商退款
+/**
+ *全部权限
+ *1.订单款 2.非订单款 3.返佣款 4.订单款或者非订单款(因财务阶段无法区分订单非订单
+ *5.供应商退款 6.平台服务费 7.平台服务费欠款
+ */
 export const defaultAllTabs = [
     {name: '订单',type: 1},
     {name: '非订单',type: 2},
-    {name: '返佣',type: 3},
+    {name: '平台服务费',type: 10},
     {name: '供应商退款',type: 5}
 ]
-
-//客服权限  收款款项类型:1订单款,2非订单款,3返佣款 4订单款或者非订单款(因财务阶段无法区分订单非订单), 5供应商退款
+/**
+ *客服权限
+ *1.订单款 2.非订单款 3.返佣款 4.订单款或者非订单款(因财务阶段无法区分订单非订单
+ *5.供应商退款 6.平台服务费 7.平台服务费欠款
+ */
 export const defaultServiceTabs = [
     {name: '订单',type: 1},
     {name: '非订单',type: 2},
-    {name: '返佣',type: 3}
+    {name: '平台服务费',type: 10}
 ]
 
 //订单款 收款状态:0全部 1待确认、2已确认(待审核)、3审核通过、4审核未通过、5收款撤销【线上支付成功为审核通过】
 export const listTabsType = [
-    {name: '全部',type: 0},
+    {name: '全部',type: 0}, 
     {name: '待确认',type: 1},
     {name: '待审核',type: 2},
     {name: '审核通过',type: 3}