Răsfoiți Sursa

合并支付

shish 2 luni în urmă
părinte
comite
c0c1628ce8

+ 2 - 2
ghsApp/src/admin/home/components/OrderItem.vue

@@ -89,7 +89,7 @@
         <view class="order-info_box remark-box" v-if="!$util.isEmpty(item.remark)">
           <view class="remark-text">{{ item.remark }}</view>
         </view>
-        <view v-if="item.sameTimeIdsNum && item.sameTimeIdsNum > 1 && moreOrderRemind == true" class="merge-tips" @click.stop="pageTo({ url: '/admin/order/mergeOrder?ids=' + item.sameTimeIds+'&mergeId='+item.id })" >
+        <view v-if="item.sameTimeIdsNum && item.sameTimeIdsNum > 1 && moreOrderRemind == true" class="merge-tips" @click.stop="pageTo({ url: '/admin/order/mergeOrder?ids=' + item.sameTimeIds+'&mergeId='+item.mergeId })" >
           客户共有{{ item.sameTimeIdsNum }}个订单,可合并发货
         </view>
       </view>
@@ -733,4 +733,4 @@ input:-ms-input-placeholder {
 input::-ms-input-placeholder {
   line-height: 60upx;
 }
-</style>
+</style>

+ 4 - 4
ghsApp/src/admin/order/mergeOrder.vue

@@ -113,18 +113,18 @@ export default {
   methods: {
     getShareConfig() {
       const info = this.shareInfo || {}
-      const id = info.id || 0
+      const mergeId = info.mergeId || info.id || 0
       const salt = info.salt || ''
       const title = this.shareTitle || '订单列表'
       return {
         title,
-        hdPath: 'pagesPurchase/mergeOrder?id=' + id + '&salt=' + salt,
-        path: 'pagesOrder/showMergeOrder?id=' + id + '&salt=' + salt
+        hdPath: 'pagesPurchase/mergeOrder?mergeId=' + mergeId + '&salt=' + salt,
+        path: 'pagesOrder/showMergeOrder?mergeId=' + mergeId + '&salt=' + salt
       }
     },
     shareAllOrder(){
       const info = this.shareInfo || {}
-      if (!info.id || !info.salt) {
+      if (!info.mergeId || !info.salt) {
         this.$msg('暂无可分享订单')
         return false
       }

+ 4 - 3
ghsApp/src/pagesOrder/showMergeOrder.vue

@@ -28,17 +28,18 @@ export default {
     init(){
     },
     showMergeOrder() {
-      const id = this.option.id || 0
+      const mergeId = this.option.mergeId || this.option.id || 0
       const salt = this.option.salt || ''
       uni.navigateToMiniProgram({
         appId: this.getAppIdList.hd.miniAppId,
-        path: 'pagesPurchase/mergeOrder?id=' + id + '&salt=' + salt,
+        path: 'pagesPurchase/mergeOrder?mergeId=' + mergeId + '&salt=' + salt,
         envVersion: process.env.NODE_ENV === 'development' ? 'develop' : 'release',
         extraData: {
-          id,
+          mergeId,
           salt
         }
       })
+      console.log('pagesPurchase/mergeOrder?mergeId=' + mergeId + '&salt=' + salt)
     }
   }
 }

+ 12 - 6
hdApp/src/pagesPurchase/mergeOrder.vue

@@ -1,6 +1,7 @@
 <template>
   <view class="order-page">
     <block v-if="!$util.isEmpty(list.data)">
+      <view style="margin:15upx 0 15upx 20upx;font-size:36upx;font-weight:bold;">总金额:¥{{ totalPrice }}</view>
       <view class="pay_list">
         <OrderItem
           v-for="(item, index) in list.data"
@@ -24,6 +25,7 @@ import OrderItem from "./orderItem";
 import { list } from "@/mixins";
 import AppWrapperEmpty from "@/components/app-wrapper-empty";
 import { getMergePurchaseList } from "@/api/purchase/index";
+import { onLoad } from "@dcloudio/uni-app";
 
 export default {
   components: {
@@ -33,8 +35,9 @@ export default {
   mixins: [list],
   data () {
     return {
-      id: 0,
-      salt: ''
+      mergeId: 0,
+      salt: '',
+      totalPrice:0
     }
   },
   onReachBottom () {
@@ -52,14 +55,17 @@ export default {
       uni.stopPullDownRefresh()
     })
   },
-  methods: {
-    init () {
-      this.id = this.option.id ? this.option.id : 0
+  onLoad () {
+      this.mergeId = this.option.mergeId ? this.option.mergeId : 0
       this.salt = this.option.salt ? this.option.salt : ''
       this.getOrderList()
+  },
+  methods: {
+    init () {
     },
     getOrderList () {
-      return getMergePurchaseList({ id: this.id, salt: this.salt, page: this.list.page }).then(res => {
+      return getMergePurchaseList({ mergeId: this.mergeId, salt: this.salt}).then(res => {
+        this.totalPrice = res.data.totalPrice?res.data.totalPrice:0
         this.completes(res)
       })
     },

+ 1 - 1
hdApp/src/pagesPurchase/orderItem.vue

@@ -58,7 +58,7 @@
       class="merge-tips"
       @click.stop="clickMergeEvent"
     >
-      当天采购{{ info.mergeNum }}个订单
+      共{{ info.mergeNum }}个订单
     </view>
   </view>
 </template>

+ 5 - 1
hdApp/src/pagesPurchase/purDetails.vue

@@ -455,7 +455,11 @@ export default {
       console.error('原生模板广告加载失败', err)
     },
     affirmTake(){
-        this.pageTo({url: '/pagesPurchase/confirmTake?id='+this.detailInfo.id})
+      if(this.loginStyle == 0){
+        this.$msg('请先登录')
+        return false
+      }
+      this.pageTo({url: '/pagesPurchase/confirmTake?id='+this.detailInfo.id})
     },
 		copyWl(val){
 			const self = this;