chenrui преди 10 месеца
родител
ревизия
eceb378ecb
променени са 2 файла, в които са добавени 32 реда и са изтрити 53 реда
  1. 28 49
      src/views/salesManagement/salesQueryNew/edit.vue
  2. 4 4
      src/views/salesManagement/salesQueryNew/tipModal.vue

+ 28 - 49
src/views/salesManagement/salesQueryNew/edit.vue

@@ -132,7 +132,7 @@
           :disabled="spinning"
           type="primary"
           class="button-primary"
-          @click="handleSubmit()"
+          @click="submitResult()"
           id="productInfoList-handleSubmit">提交</a-button>
       </div>
     </div>
@@ -143,12 +143,12 @@
       @close="closeProductModal"
       @addProduct="insterProduct"></chooseProduct>
     <!-- 价格更新弹窗 -->
-    <setPriceModal
+    <!-- <setPriceModal
       :show="priceUpdateModal"
       :totalRealAmount="updataData.totalRealAmount"
       :totalAmount="updataData.totalAmount"
       @ok="updatePrice"
-      @cancel="priceUpdateModal=false"></setPriceModal>
+      @cancel="priceUpdateModal=false"></setPriceModal> -->
     <!-- 新活动窗口 -->
     <newPromoModal
       :show="showNewActiveModal"
@@ -192,7 +192,7 @@ export default {
         totalRealAmount: '',
         totalAmount: ''
       },
-      priceUpdateModal: false, // 价格更新弹窗
+      // priceUpdateModal: false, // 价格更新弹窗
       showDetail: false, // 显示详细基本信息
       showCpModal: false, // 添加产品弹框
       cpCurRefId: '', // 当前操作的活动id
@@ -433,53 +433,32 @@ export default {
         }
       })
     },
-    // 价格变更,需要选择价格类型  并更新价格
-    updatePrice (type) {
-      const ajax_data = {
-        salesBillSn: this.salesBillSn,
-        productPriceChangeFlag: type
-      }
-      if (type == 0) {
-        this.submitResult(ajax_data)
-      } else {
-        // 批量更新价格
-        updateBatch(this.updataData.detailList).then(res => {
-          this.priceUpdateModal = false
-          if (res.status == 200) {
-            // 刷新详情统计
-            this.spinning = true
-            this.getOrderDetail(false, () => {
-              this.submitResult(ajax_data)
-            })
-          }
-        })
-      }
-    },
-    // 提交销售单
-    handleSubmit () {
-      // 先不提交,先判断是否有价格更新  (下级创建时判断)
-      if (this.detailData && this.detailData.salesBillSource == 'PURCHASE') {
-        submitCheck({ salesBillSn: this.salesBillSn }).then(res => {
-          if (res.status == 200) {
-            // 如果有价格变更记录
-            if (res.data.detailList.length > 0) {
-              this.updataData = res.data
-              this.$nextTick(() => {
-                // 打开变更价格弹框
-                this.priceUpdateModal = true
-              })
-            } else {
-              this.submitResult({ salesBillSn: this.salesBillSn })
-            }
-          }
-        })
-      } else {
-        this.submitResult({ salesBillSn: this.salesBillSn })
-      }
-    },
+    // // 价格变更,需要选择价格类型  并更新价格
+    // updatePrice (type) {
+    //   const ajax_data = {
+    //     salesBillSn: this.salesBillSn,
+    //     productPriceChangeFlag: type
+    //   }
+    //   if (type == 0) {
+    //     this.submitResult(ajax_data)
+    //   } else {
+    //     // 批量更新价格
+    //     updateBatch(this.updataData.detailList).then(res => {
+    //       this.priceUpdateModal = false
+    //       if (res.status == 200) {
+    //         // 刷新详情统计
+    //         this.spinning = true
+    //         this.getOrderDetail(false, () => {
+    //           this.submitResult(ajax_data)
+    //         })
+    //       }
+    //     })
+    //   }
+    // },
     // 提交销售单
-    async submitResult (data) {
+    async submitResult () {
       const _this = this
+      const data = { salesBillSn: _this.salesBillSn }
       // 校验活动规则
       const vaildActive = await salesPromoValidaSubmit({ salesBillSn: this.salesBillSn }).then(res => res.data)
       const a = vaildActive.filter(item => item.type == 1) // 不可提交

+ 4 - 4
src/views/salesManagement/salesQueryNew/tipModal.vue

@@ -103,7 +103,7 @@ export default {
       columns: [
         { title: '产品编码', dataIndex: 'productCode', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '价格级别', dataIndex: 'priceLevelDictValue', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '初始价',
+        { title: '价格变更前',
           children: [
             {
               title: '省级价',
@@ -125,7 +125,7 @@ export default {
             }
           ],
           width: '30%' },
-        { title: '最新价',
+        { title: '价格变更后',
           children: [
             {
               title: '省级价',
@@ -150,10 +150,10 @@ export default {
       ],
       priceSelectList: [{
         id: 0,
-        nameWord: '以【初始价】为准'
+        nameWord: '以【价格变更前】为准'
       }, {
         id: 1,
-        nameWord: '以【最新价】为准'
+        nameWord: '以【价格变更后】为准'
       }],
       priceVal: undefined
     }