lilei 2 weeks ago
parent
commit
8e556c63af

+ 5 - 7
src/views/salesManagement/salesQueryNew/comps/activeStatisticsList.vue

@@ -331,7 +331,7 @@ export default {
               title: '已选',
               title: '已选',
               width: 50,
               width: 50,
               align: 'center',
               align: 'center',
-              renderBodyCell: ({ row, column, rowIndex }, h) => formatTd(row, column, rowIndex, 'specialPriceUnit')
+              renderBodyCell: ({ row, column, rowIndex }, h) => formatTd(row, column, rowIndex, 'discountRuleUnit')
             },
             },
             {
             {
               field: 'discountRuleValue',
               field: 'discountRuleValue',
@@ -597,12 +597,11 @@ export default {
         const gateQuota = item.gateQuotaAmount // 配额
         const gateQuota = item.gateQuotaAmount // 配额
         const unUseGateQuota = item.unUseAmount // 未用配额
         const unUseGateQuota = item.unUseAmount // 未用配额
         // 特价产品
         // 特价产品
-        const isYuan2 = item.gateRuleUnit == 'YUAN'
-        const specialPriceUnit = isYuan2 ? '元' : '个' // 已选单位
-        const discountRuleUnit = item.discountRuleUnit == 'YUAN' ? '元' : '个' // 单位
+        const isYuan2 = item.discountRuleUnit == 'YUAN'
+        const discountRuleUnit = isYuan2 ? '元' : '个' // 单位
         const specialPriceSelected = isYuan2 ? item.discountAmount : item.discountQty || 0 // 已选
         const specialPriceSelected = isYuan2 ? item.discountAmount : item.discountQty || 0 // 已选
-        const discountRuleValue = item.discountRuleUnit == 'YUAN' ? Number(item.discountRuleValue).toFixed(2) : item.discountRuleValue // 基础
-        const discountRuleNextValue = item.discountRuleUnit == 'YUAN' ? Number(item.discountShortfallValue).toFixed(2) : item.discountShortfallValue // 下阶差
+        const discountRuleValue = isYuan2 ? Number(item.discountRuleValue).toFixed(2) : item.discountRuleValue // 基础
+        const discountRuleNextValue = isYuan2 ? Number(item.discountShortfallValue).toFixed(2) : item.discountShortfallValue // 下阶差
         // 正价统计
         // 正价统计
         const isYuan1 = item.regularRuleUnit == 'YUAN'
         const isYuan1 = item.regularRuleUnit == 'YUAN'
         const regularUnit = isYuan1 ? '元' : '个' // 单位
         const regularUnit = isYuan1 ? '元' : '个' // 单位
@@ -640,7 +639,6 @@ export default {
           gateTotal, // 累计
           gateTotal, // 累计
           geteBalance, // 差额
           geteBalance, // 差额
           // 特价产品
           // 特价产品
-          specialPriceUnit, // 单位
           discountRuleUnit,
           discountRuleUnit,
           specialPriceSelected, // 已选
           specialPriceSelected, // 已选
           discountRuleValue, // 基础
           discountRuleValue, // 基础

+ 1 - 0
src/views/salesManagement/salesQueryNew/comps/cumulativeQueryPart.vue

@@ -206,6 +206,7 @@ export default {
     clear () {
     clear () {
       this.$refs.table.clearSelected()
       this.$refs.table.clearSelected()
       this.rowSelectionInfo = null
       this.rowSelectionInfo = null
+      this.$refs.table.refresh()
     },
     },
     // 查询
     // 查询
     searchForm () {
     searchForm () {

+ 1 - 0
src/views/salesManagement/salesQueryNew/edit.vue

@@ -410,6 +410,7 @@ export default {
       const c = vaildActive.filter(item => item.type == 'price_less_cost' || item.type == 'wait_up_audit_price_less_cost') // 价格校验表格提示,可跳过继续提交
       const c = vaildActive.filter(item => item.type == 'price_less_cost' || item.type == 'wait_up_audit_price_less_cost') // 价格校验表格提示,可跳过继续提交
       if (vaildActive && vaildActive.length == 0) {
       if (vaildActive && vaildActive.length == 0) {
         this.submitOrder()
         this.submitOrder()
+        return
       }
       }
       // 不可提交
       // 不可提交
       // 弹出不符合规则弹框
       // 弹出不符合规则弹框

+ 21 - 5
src/views/salesManagement/waitDispatchNew/detailProductList.vue

@@ -27,7 +27,8 @@
       />
       />
       <div v-show="showEmpty" class="empty-data3"><a-empty description="暂无产品" :image="simpleImage"/></div>
       <div v-show="showEmpty" class="empty-data3"><a-empty description="暂无产品" :image="simpleImage"/></div>
     </a-spin>
     </a-spin>
-
+    <!-- 活动规则详情 -->
+    <detailModal :openModal="openDetailModal" :itemSn="detailSn" @close="closeDetailModal"></detailModal>
   </div>
   </div>
 </template>
 </template>
 
 
@@ -36,11 +37,12 @@ import { commonMixin } from '@/utils/mixin'
 import { deleteBatch, waitDispatchDetailAllList, updateQty } from '@/api/waitDispatchDetail'
 import { deleteBatch, waitDispatchDetailAllList, updateQty } from '@/api/waitDispatchDetail'
 import { Empty } from 'ant-design-vue'
 import { Empty } from 'ant-design-vue'
 import { STable, VSelect } from '@/components'
 import { STable, VSelect } from '@/components'
+import detailModal from '@/views/promotionRulesManagement/dealerPromotions/detailModal.vue'
 import chooseWarehouse from '@/views/common/chooseWarehouse'
 import chooseWarehouse from '@/views/common/chooseWarehouse'
 export default {
 export default {
   name: 'DetailProductList',
   name: 'DetailProductList',
   mixins: [commonMixin],
   mixins: [commonMixin],
-  components: { STable, VSelect, chooseWarehouse },
+  components: { STable, VSelect, chooseWarehouse, detailModal },
   props: {
   props: {
     newLoading: {
     newLoading: {
       type: Boolean,
       type: Boolean,
@@ -75,7 +77,9 @@ export default {
       disableSelectedRowKeys: [], // 禁用的行
       disableSelectedRowKeys: [], // 禁用的行
       selectedRowKeys: [], // 已选行
       selectedRowKeys: [], // 已选行
       detailData: null, // 详情数据
       detailData: null, // 详情数据
-      activeList: [] // 参与活动列表
+      activeList: [], // 参与活动列表
+      openDetailModal: false, // 活动规则详情弹框
+      detailSn: null // 活动详情sn
     }
     }
   },
   },
   computed: {
   computed: {
@@ -184,17 +188,19 @@ export default {
                       return (
                       return (
                         <div
                         <div
                           id={'ruleDetail-' + row.productSn}
                           id={'ruleDetail-' + row.productSn}
+                          title="点击查看详情"
                           style="padding:5px 0;cursor: pointer;"
                           style="padding:5px 0;cursor: pointer;"
+                          onClick={() => _this.showRuleDetail(item)}
                         >{ _this.activeRuleFilter(item) }</div>
                         >{ _this.activeRuleFilter(item) }</div>
                       )
                       )
                     })}
                     })}
                   </template>
                   </template>
                   <a-button type="link" id={'ruleSn-' + row.productSn} size="small" class="button-info">
                   <a-button type="link" id={'ruleSn-' + row.productSn} size="small" class="button-info">
-                    { _this.activeRuleFilter(row.promoRuleSnList[0]) }
+                    {row.promoRuleSnList.length}<span style="zoom:0.6;color: #666;">个 ∨</span>
                   </a-button>
                   </a-button>
                 </a-popover>
                 </a-popover>
                 : <div>
                 : <div>
-                  {row.promoRuleSnList.map(item => <span>{_this.activeRuleFilter(item)}</span>)}
+                  {row.promoRuleSnList ? row.promoRuleSnList.map(item => <span onClick={() => _this.showRuleDetail(item)}>{_this.activeRuleFilter(item)}</span>) : '--'}
                 </div>
                 </div>
             )
             )
           } })
           } })
@@ -212,6 +218,16 @@ export default {
       const row = this.activeList.length && this.activeList.find(item => item.promoRuleSn == val)
       const row = this.activeList.length && this.activeList.find(item => item.promoRuleSn == val)
       return row ? row.promotionRule.description + '-' + row.promotion.description : ''
       return row ? row.promotionRule.description + '-' + row.promotion.description : ''
     },
     },
+    // 查看参与规则详情
+    showRuleDetail (promoRuleSn) {
+      this.detailSn = promoRuleSn
+      this.openDetailModal = true
+    },
+    // 关闭详情弹窗
+    closeDetailModal () {
+      this.detailSn = null
+      this.openDetailModal = false
+    },
     // 选择单元格
     // 选择单元格
     selectedRowChange ({ row, isSelected, selectedRowKeys }) {
     selectedRowChange ({ row, isSelected, selectedRowKeys }) {
       this.selectedRowKeys = selectedRowKeys
       this.selectedRowKeys = selectedRowKeys

+ 1 - 1
src/views/salesManagement/waitDispatchNew/queryPart.vue

@@ -423,7 +423,7 @@ export default {
                       )
                       )
                     })}
                     })}
                   </template>
                   </template>
-                  <a-button type="link" id={'dispacth-ruleSn-' + row.productSn} size="small" class="button-info">{row.useRuleQty}<span style="zoom:0.6;color: #666;">个</span></a-button>
+                  <a-button type="link" id={'dispacth-ruleSn-' + row.productSn} size="small" class="button-info">{row.useRuleQty}<span style="zoom:0.6;color: #666;">个</span></a-button>
                 </a-popover> : '--'
                 </a-popover> : '--'
             )
             )
           }
           }