Browse Source

开单结果页修改成组件

fuwei 5 years ago
parent
commit
4a3396541e
3 changed files with 133 additions and 56 deletions
  1. 52 49
      ghs/src/admin/billing/result.vue
  2. 14 7
      ghs/src/admin/official/apply.vue
  3. 67 0
      ghs/src/components/app-result.vue

+ 52 - 49
ghs/src/admin/billing/result.vue

@@ -1,63 +1,66 @@
 <template>
-	<view class="billing_box_bg">
-		<view class="top-view"> </view>
-		<view class="result-view">
-			<view class="iconfont iconchenggong"></view>
-			<view class="result-title">开单成功</view>
-			<button class="admin-button-com blue big">发货详情</button>
-			<button class="admin-button-com big">打印单据</button>
-			<button class="admin-button-com big">继续开单</button>
-			<button class="admin-button-com big">订单列表</button>
-		</view>
-	</view>
+	<appResult>
+		<button class="admin-button-com blue big">发货详情</button>
+		<button class="admin-button-com big">打印单据</button>
+		<button class="admin-button-com big">继续开单</button>
+		<button class="admin-button-com big">订单列表</button>
+	</appResult>
 </template>
 
 <script>
+import appResult from '@/components/app-result'
 export default {
-	name: "BillingResult" // 开单结果
+	name: "BillingResult", // 开单结果
+	components:{
+		appResult
+	}
 };
 </script>
 
 <style lang="scss" scoped>
-.billing_box_bg {
-	position: relative;
-	padding: 60px 30px;
-	height: 100%;
-	display: flex;
-	flex-direction: column;
-
-	.top-view {
-		position: absolute;
-		top: 0;
-		left: 0;
-		width: 100%;
-
-		height: 299px;
-		background: #3385ff;
-		border-radius: 0px 0px 83px 83px;
-	}
-	.result-view {
-		position: relative;
-		display: flex;
-		flex-direction: column;
-		align-items: center;
-		padding: 70px;
-		width: 100%;
-		background: #ffffff;
-		border-radius: 20px;
-		z-index: 1;
-		.iconchenggong {
-			font-size: 170px;
-			color: $mainColor1;
-		}
-		.result-title {
-			margin: 50px 0 70px;
-			font-size: 32px;
-		}
-	}
 	.admin-button-com {
 		margin-bottom: 20px;
 		width: 100%;
 	}
-}
+// .billing_box_bg {
+// 	position: relative;
+// 	padding: 60px 30px;
+// 	height: 100%;
+// 	display: flex;
+// 	flex-direction: column;
+
+// 	.top-view {
+// 		position: absolute;
+// 		top: 0;
+// 		left: 0;
+// 		width: 100%;
+
+// 		height: 299px;
+// 		background: #3385ff;
+// 		border-radius: 0px 0px 83px 83px;
+// 	}
+// 	.result-view {
+// 		position: relative;
+// 		display: flex;
+// 		flex-direction: column;
+// 		align-items: center;
+// 		padding: 70px;
+// 		width: 100%;
+// 		background: #ffffff;
+// 		border-radius: 20px;
+// 		z-index: 1;
+// 		.iconchenggong {
+// 			font-size: 170px;
+// 			color: $mainColor1;
+// 		}
+// 		.result-title {
+// 			margin: 50px 0 70px;
+// 			font-size: 32px;
+// 		}
+// 	}
+// 	.admin-button-com {
+// 		margin-bottom: 20px;
+// 		width: 100%;
+// 	}
+// }
 </style>

+ 14 - 7
ghs/src/admin/official/apply.vue

@@ -349,14 +349,21 @@ export default {
       // 进行表单检查
       let formData = this.form;
       let checkRes = form.validation(formData, rules);
-      // 验证通过!
-      if (!checkRes) {
-        setTimeout(() => {
-          this.confirmFn();
+      this.$util.pageTo({
+          url: "/admin/official/callback",
+          type: 2,
+          query: {
+            pagestatus: 1
+          }
         });
-      } else {
-        this.$msg(checkRes);
-      }
+      // 验证通过!
+      // if (!checkRes) {
+      //   setTimeout(() => {
+        //   this.confirmFn();
+        // });
+      // } else {
+      //   this.$msg(checkRes);
+      // }
     }
   }
 };

+ 67 - 0
ghs/src/components/app-result.vue

@@ -0,0 +1,67 @@
+<template>
+	<view class="billing_box_bg">
+		<view class="top-view"> </view>
+		<view class="result-view">
+			<view :class="['iconfont', icon]"></view>
+			<view class="result-title">{{ title }}</view>
+            <slot></slot>
+		</view>
+	</view>
+</template>
+
+<script>
+export default {
+    name: "AppResult", // 开单结果
+    props:{
+        title:{
+            type:String,
+            default: '开单成功'
+        },
+        icon:{
+           type:String,
+            default: 'iconchenggong' 
+        }
+    }
+};
+</script>
+
+<style lang="scss" scoped>
+.billing_box_bg {
+	position: relative;
+	padding: 60px 30px;
+	height: 100vh;
+	display: flex;
+	flex-direction: column;
+    background-color: #f5f5f5;
+	.top-view {
+		position: absolute;
+		top: 0;
+		left: 0;
+		width: 100%;
+
+		height: 299px;
+		background: #3385ff;
+		border-radius: 0px 0px 83px 83px;
+	}
+	.result-view {
+		position: relative;
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+		padding: 70px;
+		width: 100%;
+		background: #ffffff;
+		border-radius: 20px;
+		z-index: 1;
+		.iconchenggong {
+			font-size: 170px;
+			color: $mainColor1;
+		}
+		.result-title {
+			margin: 50px 0 70px;
+			font-size: 32px;
+		}
+	}
+	
+}
+</style>