shish преди 8 месеца
родител
ревизия
36638d4f0c
променени са 1 файла, в които са добавени 20 реда и са изтрити 12 реда
  1. 20 12
      hdApp/src/admin/order/detail.vue

+ 20 - 12
hdApp/src/admin/order/detail.vue

@@ -77,17 +77,9 @@
             <text v-if="orderInfo.fromType == 4 && !$util.isEmpty(orderInfo.thirdSn)">(美团编号:{{orderInfo.thirdSn}})</text>
           </text>
           <view class="module-tit__actions">
-            <button 
-              class="admin-button-com mini-btn" 
-              @click="edit(orderInfo)" 
-              v-if="orderInfo.status == 1 || orderInfo.status == 2">
-              修改
-            </button>
-            <button 
-              class="admin-button-com mini-btn default" 
-              v-else>
-              修改
-            </button>
+            <button class="admin-button-com middle" @click="edit(orderInfo)" v-if="orderInfo.status == 1 || orderInfo.status == 2"> 修改 </button>
+            <button class="admin-button-com middle default" v-else> 修改 </button>
+            <button class="admin-button-com middle" @click="copyInfo(orderInfo)">复制</button>
           </view>
         </view>
         <view class="module-det">
@@ -136,6 +128,9 @@
                 <text v-else>{{thisYear==orderInfo.reachDate.substr(0,4)?'':orderInfo.reachDate.substr(0,4)+'-'}}{{orderInfo.reachDate ? orderInfo.reachDate.substr(5,11):''}}</text>
                 <text class="ml-10">{{orderInfo.reachPeriod||''}}前</text>
               </view>
+              <view class="price" v-if="orderInfo.cardInfo!=''">
+                <button @click="copyCard(orderInfo)" class="admin-button-com">复制贺卡内容</button>
+              </view>
             </view>
 
             <!-- 寄语信息 -->
@@ -584,7 +579,20 @@ export default {
     edit(item) {
       this.$util.pageTo({url: '/admin/order/modify?id=' + item.id})
     },
-    
+    copyCard(detailInfo){
+      uni.setClipboardData({ data: detailInfo.cardInfo, success: function() { self.$msg("复制成功") } })
+    },
+    copyInfo(detailInfo){
+			let receiveUserName = detailInfo.receiveUserName
+			let receiveMobile = detailInfo.receiveMobile
+			let address =  detailInfo.city+detailInfo.dist+detailInfo.address+detailInfo.floor
+			if (!this.$util.isEmpty(detailInfo.showAddress) && address != detailInfo.showAddress){
+				address += "("+detailInfo.showAddress+")"
+			}
+			let val = address+" "+receiveUserName+"\n"+receiveMobile
+			const self = this
+			uni.setClipboardData({ data: val, success: function() { self.$msg("复制成功") } })
+    },
     goRefund() {
       this.$util.pageTo({url: '/admin/order/refund?id=' + this.option.id})
     },