lilei 4 gadi atpakaļ
vecāks
revīzija
4ecab9bc4d

+ 4 - 3
src/views/dealerManagement/dealerRelationshipBinding/list.vue

@@ -112,7 +112,6 @@ export default {
       this.nowData = record
       this.expandedRowKeys = [] // 重置展开节点,只展开当前点击的节点(内部数据调用模板,无法做到同时几个内层表格数据直接缓存在页面)
       if (expanded) {
-        this.expandedRowKeys = [record.dealerSn]
         this.getSubItem(record) // 获取表格内部数据
       }
     },
@@ -126,14 +125,16 @@ export default {
     // 获取子节点数据
     getSubItem (record) {
       record.children = []
-      querySubList({ parentDealerSn: this.expandedRowKeys[0] }).then(res => {
+      querySubList({ parentDealerSn: record.dealerSn }).then(res => {
         if (res.status == 200 && res.data && res.data.length) {
           record.children = res.data
         } else {
           record.children = this.nowData.children
         }
         if (record.children.length == 0) {
-          this.$message.info('暂无关联下级')
+          this.$message.info('暂无下级,请关联下级')
+        } else {
+          this.expandedRowKeys = [record.dealerSn]
         }
       })
     },

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

@@ -132,7 +132,7 @@ export default {
         { title: '库存数量', dataIndex: 'currentStockQty', width: 100, align: 'center', customRender: function (text) { return text || 0 } },
         { title: '单位', dataIndex: 'productUnit', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '售价', dataIndex: 'productPrice', width: 150, align: 'center', customRender: function (text) { return '¥' + (text || 0) } },
-        { title: '包装数', dataIndex: 'productPackQty', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '包装数', dataIndex: 'productPackQty', width: 100, align: 'center' },
         { title: '销售数量', dataIndex: 'salesNums', scopedSlots: { customRender: 'nums' }, width: 150, align: 'center' },
         { title: '操作', dataIndex: 'action', scopedSlots: { customRender: 'action' }, width: 200, align: 'center', fixed: 'right' }
       ],