whj пре 1 година
родитељ
комит
bfb27fab12

+ 15 - 1
src/api/yongyou/yongyou.js

@@ -31,7 +31,21 @@ export function getSpareStorePageYY (parameter) {
     }
   })
 }
-
+/**
+ * page func
+ * parameter: { }
+ * @param parameter
+ * @returns {*}
+ */
+export function getBomSpareStorePageYY (parameter) {
+  return axios({
+    url: '/yongyou/spareStore/page2?' + stringify(parameter),
+    method: 'get',
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}
 /**
  * update func
  * parameter: { }

+ 4 - 9
src/views/preparation/preparation/Preparation.vue

@@ -3,22 +3,17 @@
     <div v-show="visible">
       <div class="table-page-search-wrapper" @keyup.enter="handleEnter">
         <a-form layout="inline">
-          <a-row :gutter="48" v-show="advanced">
-            <a-col :md="6" :sm="24">
+          <a-row :gutter="48" >
+            <a-col :md="8" :sm="24">
               <a-form-item label="关键字">
                 <a-input v-model="queryParam.keyword" placeholder="请输入名称/类型名称"/>
               </a-form-item>
             </a-col>
-          </a-row>
-          <a-row :gutter="48">
-            <a-col :md="24 || 24" :sm="24" style="text-align: right">
+
+            <a-col :md="6" :sm="24" >
               <span class="table-page-search-submitButtons">
                 <a-button type="primary" @click="$refs.table.refresh(true)">查询</a-button>
                 <a-button style="margin-left: 8px" @click="resetSearchForm">重置</a-button>
-                <a @click="()=>{ this.advanced = !this.advanced}" style="margin-left: 8px">
-                  {{ advanced ? '收起' : '展开' }}
-                  <a-icon :type="advanced ? 'up' : 'down'"/>
-                </a>
               </span>
             </a-col>
           </a-row>

+ 12 - 8
src/views/preparation/preparation/modules/BaseForm.vue

@@ -36,14 +36,17 @@
             :labelCol="BaseTool.Constant.labelCol"
             :wrapperCol="BaseTool.Constant.wrapperCol"
           >
-            <a-select v-decorator="['positionId', {rules: [{required: true, message: '建筑物不能为空'}]}]" placeholder="请选择">
-              <a-select-option
-                v-for="item in sbPositionList"
-                :key="item.id"
-                :label="item.name"
-                :value="item.id">{{ item.name }}
-              </a-select-option>
-            </a-select>
+            <a-tree-select
+              style="width: 100%"
+              :dropdownStyle="{ maxHeight: '400px', overflow: 'auto' }"
+              :treeData="sbPositionList"
+              :treeNodeFilterProp="'title'"
+              :replaceFields="{title:'name',value:'id'}"
+              :showSearch="true"
+              v-decorator="['positionId', {rules: [{required: true, message: '建筑物不能为空'}]}]"
+              placeholder="请选择"
+            >
+            </a-tree-select>
           </a-form-item>
         </row-item>
         <row-item>
@@ -285,6 +288,7 @@ export default {
         this.sbPositionList = [...this.sbPositionList]
       })
     },
+
     save () {
       const { form: { validateFieldsAndScroll } } = this
       this.confirmLoading = true

+ 230 - 70
src/views/purchase/purchase-order-page/modules/BaseForm.vue

@@ -1,76 +1,131 @@
 <template>
   <a-modal
     title="新增"
-    :width="800"
+    :width="1400"
     :visible="visible"
     :confirmLoading="confirmLoading"
     @cancel="handleCancel"
   >
-    <a-form :form="form">
-      <row-list :col="1" v-show="false">
-        <row-item>
-          <a-form-item>
-            <a-input v-decorator="['id']" type="hidden"/>
-            <a-input v-decorator="['sbId']" type="hidden"/>
-          </a-form-item>
-        </row-item>
-      </row-list>
-      <a-row type="flex">
-        <a-col :sm="20" >
-          <a-form-item
-            label="采购计划名称"
-            :labelCol="BaseTool.Constant.labelCol"
-            :wrapperCol="BaseTool.Constant.wrapperCol"
-          >
-            <a-input v-decorator="['name', {rules: [{required: true, message: '采购计划名称不能为空'}]}]" />
-          </a-form-item>
-        </a-col>
-        <a-col :sm="20" >
-          <a-form-item
-            label="采购计划类型"
-            :labelCol="BaseTool.Constant.labelCol"
-            :wrapperCol="BaseTool.Constant.wrapperCol"
-          >
-            <a-select v-decorator="['type', { rules: [{required: true, message: '任务等级不能为空'}]}]" placeholder="请选择">
-              <a-select-option
-                v-for="(label,value) in typeMap"
-                :key="value"
-                :label="label"
-                :value="label">{{ label }}
-              </a-select-option>
-            </a-select>
-          </a-form-item>
-        </a-col>
-
-        <a-col :sm="20" >
-          <a-form-item
-            label="设备名称"
-            :labelCol="BaseTool.Constant.labelCol"
-            :wrapperCol="BaseTool.Constant.wrapperCol"
-          >
-            <a-input
-              style="width: 70%"
-              disabled
-              v-decorator="['sbName', {rules: [{required: true, message: '设备名称不能为空'}]}]" />
-            <a-button style="width: 30%" type="primary" @click="handleSbSelect">选择</a-button>
-          </a-form-item>
-        </a-col>
-        <a-col :sm="20" >
-          <a-form-item
-            label="备注"
-            :labelCol="BaseTool.Constant.labelCol"
-            :wrapperCol="BaseTool.Constant.wrapperCol"
-          >
-            <a-input
-              v-decorator="['remark']"/>
-          </a-form-item>
-        </a-col>
-      </a-row>
-    </a-form>
+    <a-steps :current="current" style="width:400px;margin:20px auto;">
+      <a-step title="基本信息" />
+      <a-step title="物料明细" />
+    </a-steps>
+    <a-card v-show="current===0">
+      <a-form :form="form">
+        <row-list :col="1" v-show="false">
+          <row-item>
+            <a-form-item>
+              <!-- <a-input v-decorator="['id']" type="hidden"/> -->
+              <a-input v-decorator="['sbId']" type="hidden"/>
+            </a-form-item>
+          </row-item>
+        </row-list>
+        <a-row type="flex">
+          <a-col :sm="20" >
+            <a-form-item
+              label="采购计划名称"
+              :labelCol="BaseTool.Constant.labelCol"
+              :wrapperCol="BaseTool.Constant.wrapperCol"
+            >
+              <a-input v-decorator="['name', {rules: [{required: true, message: '采购计划名称不能为空'}]}]" />
+            </a-form-item>
+          </a-col>
+          <a-col :sm="20" >
+            <a-form-item
+              label="采购计划类型"
+              :labelCol="BaseTool.Constant.labelCol"
+              :wrapperCol="BaseTool.Constant.wrapperCol"
+            >
+              <a-select v-decorator="['type', { rules: [{required: true, message: '任务等级不能为空'}]}]" placeholder="请选择">
+                <a-select-option
+                  v-for="(label,value) in typeMap"
+                  :key="value"
+                  :label="label"
+                  :value="parseInt(value)">{{ label }}
+                </a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
+          <a-col :sm="20" >
+            <a-form-item
+              label="厂区"
+              :labelCol="BaseTool.Constant.labelCol"
+              :wrapperCol="BaseTool.Constant.wrapperCol"
+            >
+              <a-select v-decorator="['oldOrNew', {rules: [{required: true, message: '厂区不能为空'}]}]" >
+                <a-select-option
+                  v-for="(label,value) in flagMap"
+                  :key="value"
+                  :label="label"
+                  :value="parseInt(value)">{{ label }}
+                </a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
+          <a-col :sm="20" >
+            <a-form-item
+              label="设备位号"
+              :labelCol="BaseTool.Constant.labelCol"
+              :wrapperCol="BaseTool.Constant.wrapperCol"
+            >
+              <a-input
+                style="width: 70%"
+                disabled
+                v-decorator="['positionNo', {rules: [{required: true, message: '设备名称不能为空'}]}]" />
+              <a-button style="width: 30%" type="primary" @click="handleSbSelect">选择</a-button>
+            </a-form-item>
+          </a-col>
+          <a-col :sm="20" >
+            <a-form-item
+              label="备注"
+              :labelCol="BaseTool.Constant.labelCol"
+              :wrapperCol="BaseTool.Constant.wrapperCol"
+            >
+              <a-input
+                v-decorator="['remark']"/>
+            </a-form-item>
+          </a-col>
+        </a-row>
+      </a-form>
+    </a-card>
+    <a-card v-show="current===1">
+      <div class="table-operator" style="margin-bottom: 8px;">
+        <a-button size="small" type="primary" @click="handleSpareStoreSelect">
+          <a-icon type="plus"/>
+          物料库添加
+        </a-button>
+        <a-button size="small" style="margin-left:20px;" type="primary" @click="handleBomSpareStoreSelect">
+          <a-icon type="plus"/>
+          BOM添加
+        </a-button>
+      </div>
+      <a-table
+        bordered
+        :data-source="data"
+        :columns="columns"
+        tableLayout="auto"
+        rowKey="id"
+      >
+        <template slot="num" slot-scope="text, record">
+          <a-input v-model="record.num" />
+        </template>
+        <span slot="action" slot-scope="record">
+          <template>
+            <a-popconfirm title="是否要删除该条数据?" @confirm="handleDelOne(record)">
+              <a>删除</a>
+            </a-popconfirm>
+          </template>
+        </span>
+      </a-table>
+    </a-card>
     <template slot="footer">
-      <a-button :loading="confirmLoading" type="primary" @click="save()">保存</a-button>
+      <a-button v-show="current===0" type="primary" @click="next()">下一步</a-button>
+      <a-button v-show="current===1" type="primary" @click="back()">上一步</a-button>
+      <a-button v-show="current===1" :loading="confirmLoading" type="primary" @click="save()">保存</a-button>
     </template>
     <sb-info-select-modal ref="sbInfoSelectModal" @selected="handleSbSelectd"/>
+    <spare-store-select-modal ref="spareStoreSelectModal" @selected="handleSpareStoreSelected"/>
+    <BomSpareStoreSelectModal ref="bomSpareStoreSelectModal" @selected="handleSpareStoreSelected"/>
 
   </a-modal>
 </template>
@@ -79,28 +134,87 @@
 import { addPurchaseOrder2 } from '@/api/purchase/purchase-order'
 
 import SbInfoSelectModal from './SbInfoSelectModal'
+import SpareStoreSelectModal from '@/views/store/sparestore/modules/SpareStoreSelectModalYY.vue'
+import BomSpareStoreSelectModal from './SpareStoreSelectModalYY.vue'
 
 export default {
   name: 'BaseFillGather',
+  components: {
+    SpareStoreSelectModal,
+    SbInfoSelectModal,
+    BomSpareStoreSelectModal
+
+  },
   data () {
     return {
       form: this.$form.createForm(this),
       visible: false,
+      current: 0,
+      data: [],
+      columns: [
+        {
+          title: '序号',
+          dataIndex: 'index',
+          customRender: (text, record, index) => {
+            return index + 1
+          }
+        },
+        {
+          title: '名称',
+          dataIndex: 'spareName'
+        },
+        {
+          title: '编号',
+          dataIndex: 'no'
+        },
+        {
+          title: '规格',
+          dataIndex: 'ggxh'
+        },
+
+        {
+          title: '采购数量',
+          dataIndex: 'num',
+          width: 150,
+          scopedSlots: { customRender: 'num' }
+        },
+        {
+          title: '库存',
+          dataIndex: 'storeNum',
+          width: 150
+        },
+
+        {
+          title: '仓库',
+          dataIndex: 'storeName'
+        },
+        {
+          title: '货架号',
+          dataIndex: 'storePosition'
+        },
+        {
+          title: '操作',
+          key: 'action',
+          align: 'center',
+          scopedSlots: { customRender: 'action' }
+        }
+      ],
       typeMap: {},
       ipqcMap: [],
+      flagMap: {},
       model: {},
       sbIds: [],
       rows: [],
       sortNums: [],
+      params: {},
       directorMap: [],
       infoNum: 0,
       confirmLoading: false
     }
   },
-  components: {
-    SbInfoSelectModal
-  },
+
   created () {
+    this.flagMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.PROJECT_NEW_AND_OLD)
     this.typeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.LONG_YAN_PURCHASE_TYPE)
   },
   methods: {
@@ -122,11 +236,22 @@ export default {
       this.$nextTick(() => {
         setFieldsValue(Object.assign({
           'sbId': key,
-          'sbName': row.name
+          'positionNo': row.positionNo
         }))
       })
     },
     save () {
+      const params = {
+        ...this.params,
+        detailDTOS: this.data
+      }
+      console.log(params)
+      addPurchaseOrder2(params).then(res => {
+        this.$message.success('创建成功!')
+        this.handleCancel()
+      })
+    },
+    next () {
       const { form: { validateFieldsAndScroll } } = this
       // this.confirmLoading = true
       validateFieldsAndScroll((errors, values) => {
@@ -135,14 +260,49 @@ export default {
             this.$message.error(item.errors[0].message)
           })
           this.confirmLoading = false
+          return
         }
-        addPurchaseOrder2(values).then(res => {
-          this.$message.success('创建成功!')
-        })
+        this.params = values
+        this.current = 1
       })
     },
+    back () {
+      this.current = 0
+    },
+    handleSpareStoreSelect () {
+      this.$refs.spareStoreSelectModal.base({ tokenType: this.params.oldOrNew })
+    },
+    handleBomSpareStoreSelect () {
+      this.$refs.bomSpareStoreSelectModal.base({ tokenType: this.params.oldOrNew, sbId: this.params.sbId })
+    },
+    handleSpareStoreSelected (record, keys, rows) {
+      console.log(rows)
+      const { data } = this
+      for (let i = 0; i < rows.length; i++) {
+        let find = false
+        for (let j = 0; j < data.length; j++) {
+          if (rows[i].autoId === data[j].autoId) {
+            find = true
+            break
+          }
+        }
+        if (!find) {
+          const selectData = rows[i]
+          selectData.storeNum = selectData.num
+          selectData.num = 1
+          data.push(selectData)
+        }
+      }
+    },
+    handleDelOne (record) {
+      const data = [...this.data]
+      this.data = data.filter(item => record.autoId !== item.autoId)
+    },
     handleCancel (values) {
       this.visible = false
+      this.current = 0
+      this.data = []
+      this.params = {}
       this.form.resetFields()
       this.sbIds = []
       this.$emit('ok', values)

+ 335 - 0
src/views/purchase/purchase-order-page/modules/SpareStoreSelectModalYY.vue

@@ -0,0 +1,335 @@
+<template>
+  <a-modal
+    :title="modalTitle"
+    :width="1300"
+    :visible="visible"
+    :confirmLoading="confirmLoading"
+    class="ant-modal2"
+    @cancel="handleCancel"
+  >
+    <a-card :bordered="false">
+      <a-row :gutter="8">
+        <!--        <a-col :span="5">
+          <a-tree
+            @expand="onExpand"
+            :expandedKeys="expandedKeys"
+            :autoExpandParent="true"
+            @select="onSelect"
+            :selectedKeys="selectedKeys"
+            :treeData="spareTypeTreeData"
+          />
+        </a-col>-->
+        <a-col :span="24">
+          <div class="table-page-search-wrapper">
+            <a-form layout="inline">
+              <a-row :gutter="48">
+                <a-col :md="6" :sm="24">
+                  <a-form-item label="仓库编码">
+                    <a-input v-model.trim="queryParam.storeNo" placeholder="仓库编码"/>
+                  </a-form-item>
+                </a-col>
+                <a-col :md="6" :sm="24">
+                  <a-form-item label="仓库名称">
+                    <a-input v-model.trim="queryParam.storeName" placeholder="仓库名称"/>
+                  </a-form-item>
+                </a-col>
+                <a-col :md="6" :sm="24">
+                  <a-form-item label="存货编码">
+                    <a-input v-model.trim="queryParam.spareNo" placeholder="存货名称"/>
+                  </a-form-item>
+                </a-col>
+                <a-col :md="6" :sm="24">
+                  <a-form-item label="存货名称">
+                    <a-input v-model.trim="queryParam.spareName" placeholder="存货名称"/>
+                  </a-form-item>
+                </a-col>
+                <a-col :md="6" :sm="24">
+                  <a-form-item label="规格型号">
+                    <a-input v-model.trim="queryParam.ggxh" placeholder="规格型号"/>
+                  </a-form-item>
+                </a-col>
+                <a-col :md="8 || 24" :sm="24">
+                  <span class="table-page-search-submitButtons">
+                    <a-button type="primary" @click="$refs.table.refresh(true)">查询</a-button>
+                    <a-button style="margin-left: 8px" @click="resetSearchForm">重置</a-button>
+                  </span>
+                </a-col>
+              </a-row>
+            </a-form>
+          </div>
+
+          <div class="table-operator" style="margin-bottom: 8px;">
+          </div>
+
+          <s-table
+            ref="table"
+            size="default"
+            rowKey="autoId"
+            :columns="columns"
+            :data="loadData"
+            :alert="options.alert"
+            :customRow="options.customRow"
+            :rowSelection="options.rowSelection"
+            showPagination="auto"
+          >
+          </s-table>
+        </a-col>
+      </a-row>
+    </a-card>
+    <template slot="footer">
+      <a-button :loading="confirmLoading" type="primary" @click="handleCancel()">取消</a-button>
+      <a-button :loading="confirmLoading" type="primary" @click="handleSelect()">选择</a-button>
+    </template>
+  </a-modal>
+</template>
+
+<script>
+import { STable, Ellipsis } from '@/components'
+import { fetchSpareTypeTree } from '@/api/sqarepartmanage/sparetype'
+import { fetchStoreTree } from '@/api/store/store'
+
+import { getBomSpareStorePageYY } from '@/api/yongyou/yongyou'
+export default {
+  name: 'SpareStoreSelectModalYY',
+  components: {
+    STable,
+    Ellipsis
+  },
+  props: {
+    type: {
+      type: String,
+      default: 'checkbox'
+    },
+    selectedRowKey: {
+      type: Array,
+      default: () => {
+        return []
+      }
+    },
+    selectedRow: {
+      type: Array,
+      default: () => {
+        return []
+      }
+    }
+  },
+  data () {
+    return {
+      confirmLoading: false,
+      mdl: {},
+      storeTreeDate: [],
+      modalTitle: null,
+      visible: false,
+      record: null,
+      spareTypeTreeData: [],
+      expandedKeys: [],
+      selectedKeys: [],
+      isSpecial: null,
+      // 查询参数
+      queryParam: {
+        storeNo: '09'
+      },
+      // 表头
+      columns: [
+        {
+          title: '序号',
+          dataIndex: 'index',
+          customRender: (text, record, index) => {
+            return `${(this.$refs.table.localPagination.current - 1) * this.$refs.table.localPagination.pageSize + index + 1}`
+          }
+        },
+        {
+          title: '存货编号',
+          dataIndex: 'no'
+        },
+        {
+          title: '存货名称',
+          dataIndex: 'spareName'
+        },
+        {
+          title: '规格型号',
+          dataIndex: 'ggxh'
+        },
+        {
+          title: '仓库名称',
+          dataIndex: 'storeName'
+        },
+        {
+          title: '货架号',
+          dataIndex: 'storePosition'
+        },
+        {
+          title: '批号',
+          dataIndex: 'cbatch'
+        },
+        {
+          title: '库存数量',
+          dataIndex: 'num'
+        },
+        {
+          title: '单位',
+          dataIndex: 'unit'
+        }
+      ],
+      // 下拉框map
+      tokenType: 1,
+      delFlagMap: {},
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        parameter = {
+          ...parameter,
+          ...this.queryParam,
+          tokenType: this.tokenType,
+          dataScope: {
+            sortBy: 'desc',
+            sortName: 'update_time'
+          }
+        }
+        return getBomSpareStorePageYY(Object.assign(parameter, this.queryParam)).then(res => {
+          if (res.data.rows === null) {
+            const data = { total: 0, rows: [], pageNum: 1, pageSize: 10, pages: 1 }
+            return data
+          } else {
+            return res.data
+          }
+        })
+      },
+      selectedRowKeys: [],
+      selectedRows: [],
+      options: {
+        alert: { show: true, clear: () => { this.selectedRowKeys = [] } },
+        rowSelection: {
+          selectedRowKeys: this.selectedRowKeys,
+          onChange: this.onSelectChange
+        }
+      },
+      optionAlertShow: false,
+      isCreated: false
+    }
+  },
+  created () {
+    // 下拉框map
+    this.delFlagMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.DELFLAG)
+    // this.tableOption()
+    fetchSpareTypeTree({}).then(res => {
+      this.spareTypeTreeData = res.data
+    })
+    fetchStoreTree({}).then(res => {
+      this.storeTreeDate = res.data
+    })
+  },
+  methods: {
+    tableOption () {
+      if (!this.optionAlertShow) {
+        this.options = {
+          alert: { show: true, clear: () => { this.selectedRowKeys = [] } },
+          rowSelection: {
+            selectedRowKeys: this.selectedRowKeys,
+            onChange: this.onSelectChange,
+            type: this.type,
+            getCheckboxProps: record => ({
+              props: {
+                disabled: false,
+                name: record.id
+              }
+            })
+          }
+          // customRow: (record) => {
+          //   return {
+          //     on: { // 事件
+          //       click: (event) => { // 点击行
+          //         // 选择对象
+          //         this.mySelect([record.id], [record])
+          //       },
+          //       dblclick: (event) => {
+          //         this.mySelect([record.id], [record])
+          //         this.handleSelect()
+          //       }
+          //     }
+          //   }
+          // }
+        }
+        this.optionAlertShow = true
+      } else {
+        this.options = {
+          alert: false,
+          rowSelection: null
+        }
+        this.optionAlertShow = false
+      }
+    },
+    handleOk () {
+      this.$refs.table.refresh()
+    },
+    onSelectChange (selectedRowKeys, selectedRows) {
+      this.selectedRows = [...new Set([...this.selectedRows, ...selectedRows])]
+      this.selectedRowKeys = selectedRowKeys
+    },
+    resetSearchForm () {
+      this.queryParam = {
+        storeNo: '09'
+      }
+      this.$refs.table.refresh(true)
+    },
+    base (record, queryParam = { storeNo: '09' }) {
+      this.visible = true
+      this.modalTitle = '选择信息'
+      this.tokenType = record.tokenType
+      this.queryParam = queryParam
+      this.queryParam.sbId = record.sbId
+      console.log(this.queryParam)
+      if (queryParam.isSpecial !== undefined) {
+        this.isSpecial = queryParam.isSpecial
+        this.record = record
+      }
+      if (this.isCreated) {
+        this.$refs.table.clearSelected()
+        // this.options.rowSelection.type = this.type
+        this.handleOk()
+      } else {
+        this.tableOption()
+        this.isCreated = true
+      }
+    },
+    handleCancel () {
+      this.visible = false
+      this.confirmLoading = false
+    },
+    handleSelect () {
+      if (this.selectedRowKeys.length === 0) {
+        this.$message.warn('请至少选择一项信息')
+      } else {
+        /* console.log(this.selectedRows[0].num)
+         if (this.selectedRows[0].num == 0) {
+         this.$message.error('不能选择库存为0的物品,请重新选择')
+         return
+       } */
+        this.confirmLoading = true
+        if (this.record !== null) {
+          this.record.isSpecial = this.isSpecial
+        }
+        this.selectedRows = this.selectedRows.filter(item => this.selectedRowKeys.includes(+item.id))
+        this.$emit('selected', this.record, this.selectedRowKeys, this.selectedRows)
+        this.confirmLoading = false
+        this.visible = false
+      }
+    },
+    // mySelect (selectedRowKeys, selectedRows) {
+    //   this.selectedRowKeys = selectedRowKeys
+    //   this.selectedRows = selectedRows
+    //   console.log(this.selectedRowKeys, this.selectedRows)
+    //   this.$refs.table.updateSelect(this.selectedRowKeys, this.selectedRows)
+    //   this.$refs.table.rowSelection.onChange(this.selectedRowKeys, this.selectedRows)
+    // },
+    onSelect: function (selectedKeys, info) {
+      this.selectedKeys = selectedKeys
+      this.queryParam.typeId = selectedKeys.length > 0 ? selectedKeys[0] : ''
+      this.$refs.table.refresh(true)
+    },
+    onExpand (expandedKeys) {
+      this.expandedKeys = expandedKeys
+      this.autoExpandParent = false
+    }
+  }
+}
+</script>