Forráskód Böngészése

Merge branch 'develop_yh39' of http://git.chelingzhu.com/jianguan-web/jg-ocs-html into develop_yh39

chenrui 1 éve
szülő
commit
0d2aaa9a90

+ 13 - 3
src/views/salesManagement/salesQueryNew/edit.vue

@@ -230,11 +230,14 @@ export default {
       }
     },
     //  销售单详情
-    getOrderDetail (flag) {
+    getOrderDetail (flag, callback) {
       salesDetailBySn({ salesBillSn: this.$route.params.sn }).then(res => {
         if (res.status == 200) {
           this.detailData = res.data
           this.detailData.totalDiscountAmount = Number(this.detailData.totalOrigAmount || 0) - Number(this.detailData.totalAmount || 0)
+          if (callback) {
+            callback()
+          }
         }
         if (flag) {
           this.getActiveList()
@@ -327,7 +330,7 @@ export default {
     openProductModal (type, refId, countData) {
       console.log(type, refId, countData)
       const promo = this.activeList.find(item => item.promoRuleSn == refId)
-      if(promo){
+      if (promo) {
         promo.countData = countData
       }
       this.$refs.chooseProduct.pageInit(this.detailData, promo, type)
@@ -414,8 +417,13 @@ export default {
         this.submitResult(ajax_data)
       } else {
         updateBatch(this.updataData.detailList).then(res => {
+          this.priceUpdateModal = false
           if (res.status == 200) {
-            this.submitResult(ajax_data)
+            // 刷新详情统计
+            this.spinning = true
+            this.getOrderDetail(false, () => {
+              this.submitResult(ajax_data)
+            })
           }
         })
       }
@@ -465,6 +473,7 @@ export default {
             <div style="padding:10px 0;text-align:center"><strong>请按照以上提示修改后再提交</strong></div>
           </div>
         })
+        this.spinning = false
       } else {
         // 弹出确认提示信息,可跳过继续提交
         if (b.length) {
@@ -485,6 +494,7 @@ export default {
               _this.submitOrder(data)
             }
           })
+          this.spinning = false
         } else {
           _this.submitOrder(data)
         }

+ 2 - 2
src/views/salesManagement/salesQueryNew/setPriceModal.vue

@@ -40,11 +40,11 @@ export default {
   props: {
     show: [Boolean],
     totalRealAmount: {
-      type: String,
+      type: [String, Number],
       default: ''
     },
     totalAmount: {
-      type: String,
+      type: [String, Number],
       default: ''
     }
   },