chenrui 6 ヶ月 前
コミット
33d9cd4a7d

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

@@ -27,7 +27,7 @@
       @close="closeGuideModel"
       @ok="hanldeImportOk" />
     <!-- 查看累计产品 -->
-    <totalProductDetailModal ref="totalProductModal" :show="openTotalProductModal" @close="openTotalProductModal=false"></totalProductDetailModal>
+    <totalProductDetailModal ref="totalProductModal" :show="openTotalProductModal" @cancel="openTotalProductModal=false"></totalProductDetailModal>
     <!-- 查看买赠产品详情 -->
     <normalProductDetailModal ref="normalProductModal" :buyGiftsInfo="buyGiftsInfo" :openModal="openNormalProductModal" @close="openNormalProductModal=false"></normalProductDetailModal>
   </div>
@@ -75,7 +75,7 @@ export default {
     // 格式化数字金额单元格
     const formatTd = (row, column, rowIndex, uniKey, fun) => {
       if (row[column.field]) {
-        return (<div><span onClick={() => fun ? fun(row) : false}>{row[column.field]}</span><span style="font-size:10px;zoom:0.7;margin-left:3px;">{row[uniKey]}</span></div>)
+        return (<div onClick={() => fun ? fun(row, uniKey) : false}><span class={fun ? 'table-link-btn' : ''}>{row[column.field]}</span><span style="font-size:10px;zoom:0.7;margin-left:3px;">{row[uniKey]}</span></div>)
       } else {
         return ''
       }
@@ -222,7 +222,7 @@ export default {
               title: '累计',
               width: 50,
               align: 'center',
-              renderBodyCell: ({ row, column, rowIndex }, h) => formatTd(row, column, rowIndex, 'gateUnit')
+              renderBodyCell: ({ row, column, rowIndex }, h) => formatTd(row, column, rowIndex, 'gateUnit', _this.openTotalProduct)
             },
             {
               field: 'geteBalance',
@@ -569,9 +569,9 @@ export default {
       this.disabledActiveIds()
     },
     // 查看累计产品 详情
-    openTotalProduct (row) {
+    openTotalProduct (row, type) {
       this.openTotalProductModal = true
-      this.$refs.totalProductModal.pageInit({ salesBillSn: row.salesBillSn, salesPromoSn: row.salesPromoSn })
+      this.$refs.totalProductModal.pageInit({ salesBillSn: row.salesBillSn, salesPromoSn: row.salesPromoSn, promotionFlag: type === 'gateUnit' ? 'GATE' : 'REGULAR' })
     },
     // 显示买赠产品弹窗
     showBuyGifts (rowVal) {
@@ -753,10 +753,18 @@ export default {
     width:100%;
     color: #409EFF;
     display:flex;
+    cursor:pointer;
     &:hover{
       text-decoration: underline;
     }
   }
+  .table-link-btn{
+     color: #409EFF;
+     cursor:pointer;
+     &:hover{
+       text-decoration: underline;
+     }
+  }
   .table-arrow-box{
     display: flex;
     span{

+ 3 - 1
src/views/salesManagement/salesQueryNew/comps/totalProductDetailModal.vue

@@ -159,7 +159,9 @@ export default {
     // 页面数据初始化
     pageInit (objInfo) {
       this.parameter = { ...objInfo, ...this.parameter }
-      this.$refs.table.refresh(true)
+      this.$nextTick(() => {
+        this.$refs.table.refresh(true)
+      })
     },
     // 重置
     resetSearchForm () {