Browse Source

Signed-off-by: liuboyan <632697560@qq.com>
bug

liuboyan 4 years ago
parent
commit
c2339331b0
2 changed files with 34 additions and 15 deletions
  1. 0 12
      pagesMain/openMember.vue
  2. 34 3
      pagesMain/orderList.vue

+ 0 - 12
pagesMain/openMember.vue

@@ -43,7 +43,6 @@
 			</scroll-view>
 		</u-popup>
 		<view class="handle-fix-box">
-			<!-- <text class="contract-link" @click="checkContract()">点击查看合同协议</text> -->
 			<u-button type="warning" shape="circle" :ripple="true" :custom-style="customStyle" @click="toPay()">确定支付¥{{memberInfo.realPayAmount}}</u-button>
 		</view>
 		<u-popup v-model="studentShow" mode="bottom" border-radius="30">
@@ -193,17 +192,6 @@
 			setSex(index) {
 				this.form.sex = this.sexList[index].text
 			},
-			//  显示合同
-			checkContract() {
-				uni.downloadFile({
-					url: '',
-					success: (res) => {
-						uni.openDocument({
-							filePath: res.tempFilePath,
-						});
-					}
-				})
-			},
 			//  支付
 			toPay(contractId) {
 				if (!this.studentId) {

+ 34 - 3
pagesMain/orderList.vue

@@ -3,7 +3,7 @@
 		<scroll-view scroll-y class="scroll-box" @scrolltolower="handleLoadMore" :refresher-enabled="true"
 		 :refresher-triggered="triggered" :refresher-threshold="100" refresher-background="white" @refresherrefresh="onRefresh"
 		 @refresherrestore="onRestore">
-			<u-card :head-border-bottom="false" :foot-border-top="false" padding="0px" margin="10px" borderRadius="40" v-for="(item, index) in tableList"
+			<u-card :head-border-bottom="false" padding="0px" margin="10px" borderRadius="40" v-for="(item, index) in tableList"
 			 :key="index" class="class-card">
 				<view class="class-content" slot="head" style="padding-top: 10px;">
 					<view class="class-name">{{item.className}}</view>
@@ -22,6 +22,11 @@
 						支付金额:{{item.factPrices}}
 					</view>
 				</view>
+				<view class="class-content" slot="foot" style="padding-top: 10px;padding-bottom: 10px;text-align: right;">
+					<u-button type="default" shape="circle" :ripple="true" :custom-style="handleDefaultCustomStyle" size="mini"
+					 :hair-line="false" plain @click.stop="copyOrderNumber(item)">复制订单号</u-button>
+					<u-button type="warning" shape="circle" :ripple="true" :custom-style="handleCustomStyle" size="mini" @click.stop="checkContract(item)">查看合同</u-button>
+				</view>
 			</u-card>
 			<u-divider v-if="isOver" bg-color="transparent">没有更多了</u-divider>
 		</scroll-view>
@@ -37,7 +42,10 @@
 	const API = require('@/config/api')
 	export default {
 		computed: {
-			...mapGetters([])
+			...mapGetters([
+				'handleCustomStyle',
+				'handleDefaultCustomStyle',
+			])
 		},
 		data() {
 			return {
@@ -88,7 +96,30 @@
 						type: 'warning',
 					})
 				})
-			}
+			},
+			//  复制订单号
+			copyOrderNumber(item) {
+				uni.setClipboardData({
+					data: item.orderNumber,
+					success: () => {
+						this.$refs.uTips.show({
+							title: '复制成功',
+							type: 'success',
+						})
+					}
+				});
+			},
+			//  查看合同
+			checkContract(item) {
+				uni.downloadFile({
+					url: item.url,
+					success: (res) => {
+						uni.openDocument({
+							filePath: res.tempFilePath,
+						});
+					}
+				})
+			},
 		},
 	}
 </script>