Browse Source

订单添加结束按钮。下单添加提示语

zhanghui 2 years ago
parent
commit
e53ce9d34a

+ 9 - 0
common/js/api.js

@@ -4,6 +4,15 @@ import request from '../js/request.js';
 export default {
 
 
+
+    //我的权益卡列表
+    orderFinish(orderId) {
+        return request({
+            url: '/order/wechat/order/finish/' + orderId,
+            method: 'PUT'
+        })
+    },
+
     //我的权益卡列表
     viewNumber(data) {
         return request({

+ 5 - 3
orderPages/bookService/index.rpx.scss

@@ -15,10 +15,14 @@
   z-index: 5;
 }
 
+.groupItem1{
+  height: 220rpx;
+  border-bottom: 1px solid #EEEEEE;
+}
+
 .groupItem{
   height: 154rpx;
   border-bottom: 1px solid #EEEEEE;
-
 }
 .groupItemKey{
   font-size: 28rpx;
@@ -188,6 +192,4 @@
   font-weight: normal;
   text-align: left;
   white-space: nowrap;
-  line-height: 44rpx;
-  margin-top: 16rpx;
 }

+ 2 - 1
orderPages/bookService/index.vue

@@ -1,7 +1,7 @@
 <template>
   <view class="page">
     <view class="flex-col group">
-      <view class="flex-col justify-around groupItem">
+      <view class="flex-col justify-around groupItem1">
         <view class="groupItemKey">
           <text>服务对象</text>
         </view>
@@ -10,6 +10,7 @@
           <u-icon name="arrow-right" color="#666" size="18"></u-icon>
         </view>
         <text class="text_5">服务对象指接受娇骄儿理发服务的儿童</text>
+        <text class="text_5">娇宝儿,此排队提交后只针对一个服务对象</text>
       </view>
       <view class="flex-col justify-around groupItem">
         <view class="groupItemKey">

+ 12 - 3
orderPages/orderDetail/index.vue

@@ -150,8 +150,11 @@
 <!--                        <text  class="priceDetail">价格明细</text>-->
                     </view>
 
-                    <view class="btn" @click="qenPayInfo">
-                        <text lines="1" class="text_33">一键付款</text>
+                    <view v-if="order.canPay" class="btn" @click="qenPayInfo">
+                        <text class="text_33">一键付款</text>
+                    </view>
+                    <view v-else class="btn" @click="orderFinish">
+                        <text  class="text_33">结束订单</text>
                     </view>
                 </view>
             </view>
@@ -281,7 +284,6 @@ export default {
     },
     onLoad(e) {
         this.orderId = e.id
-        this.getOrderDetailByOrderId(e.id)
         this.getUserInfo();
     },
     onShow(){
@@ -377,6 +379,13 @@ export default {
             }
         },
 
+        orderFinish(){
+          this.$api.orderFinish(this.order.orderNo).then((res)=>{
+              uni.$u.toast('操作成功')
+              this.getOrderDetailByOrderId(this.order.orderId)
+          })
+        },
+
         qenPayInfo(){
 
             for(let i=0;i<this.order.child.length;i++){

+ 1 - 2
orderPages/storeService/index.rpx.scss

@@ -75,8 +75,7 @@
     font-weight: normal;
     text-align: left;
     white-space: nowrap;
-    line-height: 44rpx;
-    margin-top: 16rpx;
+    margin-top: 10rpx;
 }
 
 .thumbnail_2 {

+ 1 - 0
orderPages/storeService/index.vue

@@ -7,6 +7,7 @@
             <text class="text_3">服务对象</text>
             <text class="text_4">{{ serviceObject.nickName || '请选择服务对象' }}</text>
             <text class="text_5" >服务对象指接受娇骄儿理发服务的儿童</text>
+            <text class="text_5">娇宝儿,此排队提交后只针对一个服务对象</text>
           </view>
           <u-icon name="arrow-right" color="#666" size="18"></u-icon>
         </view>

+ 12 - 2
pages/order/module/mescrollUni-item.vue

@@ -134,7 +134,10 @@
 								<u-icon name="scan" size="18" />
 								<text>扫码</text>
 							</view>
-							<view class="btn" v-if="item.orderStatus == 6"  @click="oneClickPay(item)">
+							<view class="btn" v-if="!item.canPay && item.orderStatus == 6"  @click="orderFinish(item)">
+								<text>结束订单</text>
+							</view>
+							<view class="btn" v-if="item.canPay"  @click="oneClickPay(item)">
 								<text>一键付款</text>
 							</view>
 							<view class="btn" v-if="item.orderStatus == 5 || item.orderStatus == 11" @click="cancelOrder(item)">
@@ -237,12 +240,19 @@
 
 		methods: {
 
+
+			orderFinish(item){
+				this.$api.orderFinish(item.orderNo).then((res)=>{
+					uni.$u.toast('操作成功')
+					this.downCallback()
+				})
+			},
+
 			getOrderSign(order){
 				this.$emit('serialNumber',order)
 			},
 
 			appointment(order){
-				console.log('+++++++++++++++')
 				this.$emit('openPayAppointment',order,2)
 			},