loulijun2021
2023-10-18 4441ff1bf4109ee688d4a7d366d65860a7a58db2
src/views/basicSettings/storageList.vue
@@ -61,8 +61,15 @@
        <div
          style=" width:calc(100% - 300px);"
        >
          <div class="bodyTopButtonGroup">
          <div class="bodyTopButtonGroup" style="justify-content: space-between">
            <el-button v-waves type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">新增</el-button>
            <el-button
              v-waves
              type="success"
              icon="el-icon-download"
              @click="$router.push('./../systemSetting/dataImport?fileCode=7')"
            >导入
            </el-button>
          </div>
          <div class="bodyTopFormGroup">
@@ -657,7 +664,18 @@
    stckcodeChange(val) {
      this.dialogForm.parentlocacode = ''
      this.parentlocacodeArr = this.treeLeftArr.filter(i => i.idparent === val)
      const res = this.recursiveLookupArray([], val)// 递归查找数组
      this.parentlocacodeArr = res
    },
    recursiveLookupArray(newArr, val) {
      const temp = this.treeLeftArr.filter(i => i.idparent === val)
      if (temp.length > 0 && temp) {
        temp.forEach(i => {
          newArr.push(i)
          this.recursiveLookupArray(newArr, i.code)
        })
      }
      return newArr
    },
    // 递归取子集的所有code