zuozhengqing
2024-02-05 3c4e059b2c47e3ba22b694805645b008c4276e25
src/views/operate/scrap/AddScrapDialog.vue
@@ -113,7 +113,7 @@
                    style="width: 90%"
                    :disabled="!showFooter"
                  >
                    <el-option v-for="item in toLocationOptions" :key="item.id" :label="item.name" :value="item.id">
                    <el-option v-for="item in toLocationOptions1" :key="item.id" :label="item.name" :value="item.id">
                    </el-option>
                  </el-select>
                </el-form-item>
@@ -180,6 +180,7 @@
      memberOptions: [],
      productOptions: [],
      toLocationOptions: [],
      toLocationOptions1: [],
      list: [
        { label: "草稿", status: "todo", value: 1 },
        { label: "就绪", status: "todo", value: 3 },
@@ -196,7 +197,16 @@
  created() {
    this.setBottonView()
    this.getProductList()
    this.getLocationList()
    this.getLocationList({
      isScrapLocation: true,
      page: 0,
      pageSize: 0
    })
    this.getLocationList({
      // isScrapLocation: true,
      page: 0,
      pageSize: 0
    })
    this.unit = this.editConfig.infomation.unit || ""
    this.formInfo()
  },
@@ -224,17 +234,22 @@
      })
    },
    // 获取仓库位置列表
    async getLocationList() {
      await getLocationList({
        isScrapLocation: true,
        page: 0,
        pageSize: 0
      }).then((res) => {
        console.log(res)
        if (res.code === 200) {
          this.toLocationOptions = res.data
        }
      })
    async getLocationList(params) {
      if(params.isScrapLocation){
        await getLocationList(params).then((res) => {
          console.log(res)
          if (res.code === 200) {
            this.toLocationOptions1 = res.data
          }
        })
      }else{
        await getLocationList(params).then((res) => {
          console.log(res)
          if (res.code === 200) {
            this.toLocationOptions = res.data
          }
        })
      }
    },
    // 设置删除/打印/编辑是否显示
    setBottonView() {