lilei 1 éve
szülő
commit
d5b3ea3feb

+ 11 - 4
src/views/dealerManagement/rebateBinding/categoryList.vue

@@ -30,6 +30,7 @@ const ChildTableComp = {
   template: `
         <div class="child-table-comp">
             <ve-table
+              v-if="row.childData.length>0"
               :row-style-option="{clickHighlight: true, stripe: true}"
               :cellSelectionOption="{enable: false}"
               :scroll-width="0"
@@ -39,6 +40,7 @@ const ChildTableComp = {
               :columns="columns"
               :table-data="row.childData"
             />
+            <a-empty v-else description="暂无品类" :image="simpleImage"/>
         </div>
     `,
   props: {
@@ -91,7 +93,8 @@ export default {
         }
       },
       showEmpty: true,
-      checkedDealerSn: []
+      checkedDealerSn: [],
+      isTeyue: false
     }
   },
   computed: {
@@ -132,14 +135,17 @@ export default {
       }
 
       const expendFormat = function (record, data, h) {
+        if (_this.isTeyue) {
+          return (<span>-</span>)
+        }
         return (
           <span style="cursor:pointer;">展开</span>
         )
       }
 
       const arr = [
-        { field: '', key: 'x', type: 'expand', title: '品类', width: '5%', align: 'center', operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return expendFormat(row, row[column.field], h) } },
-        { title: '上级经销商', field: 'superDealerName', width: '20%', key: 'h', align: 'center', operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return row[column.field] || '--' } },
+        { field: '', key: 'x', type: (this.isTeyue ? '-' : 'expand'), title: '品类', width: '5%', align: 'center', operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return expendFormat(row, row[column.field], h) } },
+        { title: '上级经销商' + this.isTeyue, field: 'superDealerName', width: '20%', key: 'h', align: 'center', operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return row[column.field] || '--' } },
         { title: '差价归属方', field: 'rebateDealerList', width: '65%', key: 'k', align: 'center', operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return jcgsFormat(row, row[column.field], h) } },
         { title: '操作', field: 'action', width: '10%', key: 's', align: 'center', operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return actionFormat(row, row[column.field], h) } }
       ]
@@ -246,7 +252,8 @@ export default {
         }
       })
     },
-    pageInit (queryParam) {
+    pageInit (queryParam, isTeyue) {
+      this.isTeyue = isTeyue
       // 获取列表
       this.searchTable(queryParam)
     }

+ 2 - 2
src/views/dealerManagement/rebateBinding/list.vue

@@ -122,7 +122,7 @@ export default {
           params[k] = this.queryParam[k]
         }
       }
-      this.$refs.categoryList.pageInit(params)
+      this.$refs.categoryList.pageInit(params, this.isTeyue)
     },
     //  产品分类  change
     changeProductType (val, opt) {
@@ -164,6 +164,7 @@ export default {
       dealerDetailBySn({ sn: this.$route.params.sn }).then(res => {
         if (res.status == 200) {
           this.detail = res.data
+          this.handleSearch()
         }
         this.spinning = false
       })
@@ -171,7 +172,6 @@ export default {
     pageInit () {
       const _this = this
       this.getDetail()
-      this.handleSearch()
       this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
       })