loulijun2021
2022-08-03 458f6714f335938fce80690c037ffca0ccfaa50c
src/views/wlgl/kwdy.vue
@@ -28,8 +28,8 @@
                :popper-append-to-body="false"
                style="width: 200px"
                placeholder="请选择"
                @focus="getWareHouseSelect"
              >
                <!--                @focus="getWareHouseSelect"-->
                <el-option
                  v-for="item in stockArr"
                  :key="item.code"
@@ -48,7 +48,7 @@
      <el-divider />
      <div style="margin-left: 10px;display: flex">
        <el-button type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">新增</el-button>
        <el-button type="primary" icon="el-icon-upload2" @click="upload">导入</el-button>
        <!--        <el-button type="primary" icon="el-icon-upload2" @click="upload">导入</el-button>-->
      </div>
      <el-divider />
      <div class="elTableDiv">
@@ -101,6 +101,7 @@
            prop="lm_date"
            label="创建时间"
            sortable="custom"
            width="160"
          />
          <el-table-column
            label="操作"
@@ -150,10 +151,10 @@
            :popper-append-to-body="false"
            style="width: 200px"
            placeholder="请选择"
            @focus="getWareHouseSelect2"
          >
            <!--            @focus="getWareHouseSelect2"-->
            <el-option
              v-for="item in stockArr2"
              v-for="item in stockArr"
              :key="item.code"
              :label="item.name"
              :value="item.code"
@@ -171,12 +172,13 @@
        </div>
      </span>
    </el-dialog>
  </div>
</template>
<script>
import Pagination from '@/components/Pagination'
import { AddUpdateStorageDef, DeleteStorageDef, StorageDefSearch, WareHouseDefSearch, WareHouseSelect } from '@/api/wlgl'
import { AddUpdateStorageDef, DeleteStorageDef, StorageDefSearch, WareHouseSelect } from '@/api/wlgl'
const SER_HZ = /^[\u4e00-\u9fa5]+$/
export default {
@@ -212,7 +214,7 @@
      },
      total: 10,
      stockArr: [], // 所属仓库数组
      stockArr2: [], // 所属仓库数组对话框
      // stockArr2: [], // 所属仓库数组对话框
      tableData: [],
      dialogVisible: false,
      dialogForm: {
@@ -240,7 +242,7 @@
  },
  created() {
    this.getStorageDefSearch()
    // this.getWareHouseSelect()
    this.getWareHouseSelect()
  },
  mounted() {
    window.addEventListener('resize', this.getHeight)
@@ -257,10 +259,10 @@
      this.stockArr = res
    },
    // 对话框中的
    async getWareHouseSelect2() {
      const { data: res } = await WareHouseSelect()
      this.stockArr2 = res
    },
    // async getWareHouseSelect2() {
    //   const { data: res } = await WareHouseSelect()
    //   this.stockArr2 = res
    // },
    // 排序改变时
    sortChange({ column, prop, order }) {
      if (order === 'descending') {
@@ -277,9 +279,6 @@
    // 查询
    search() {
      this.getStorageDefSearch()
    },
    upload() {
    },
    // 重置
    reset() {
@@ -371,6 +370,7 @@
        }
      })
    }
  }
}
</script>