cuilei
2 天以前 1cd8899b91a760da09e170c030091d2465df51a3
货架标签管理表单三级联动问题处理
已修改1个文件
34 ■■■■■ 文件已修改
src/views/tms/modules/GoodsShelvesMarkForm.vue 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/tms/modules/GoodsShelvesMarkForm.vue
@@ -54,7 +54,11 @@
    data () {
      return {
        model:{
         },
          warehouseId: '',
          goodsShelves: '',
          storey: '',
          variety: ''
        },
        labelCol: {
          xs: { span: 24 },
          sm: { span: 5 },
@@ -91,7 +95,8 @@
        editDisabled: false,
        warehouseOptions: [],
        goodsShelvesOptions: [],
        storeyOptions: []
        storeyOptions: [],
        warehouseId: ''
      }
    },
    computed: {
@@ -129,6 +134,8 @@
        })
      },
      warehouseChange(warehouseId) {
        this.model.goodsShelves = ''
        this.model.storey = ''
        this.goodsShelvesOptions = []
        this.storeyOptions = []
        this.warehouseId = warehouseId
@@ -140,6 +147,7 @@
      },
      goodsShelvesChange(shelfNumber) {
        this.storeyOptions = []
        this.model.storey = ''
        getAction(this.url.queryGoodsShelvesStoreyDictList, {
          warehouseId: this.warehouseId,
          shelfNumber: shelfNumber
@@ -163,16 +171,18 @@
            this.warehouseOptions = res.result
          }
        })
        getAction(this.url.queryGoodsShelvesDictList, { warehouseId: record.warehouseId }).then(res => {
          if (res.success) {
            this.goodsShelvesOptions = res.result
          }
        })
        getAction(this.url.queryGoodsShelvesStoreyDictList,  { warehouseId: record.warehouseId, shelfNumber: record.goodsShelves }).then(res => {
          if (res.success) {
            this.storeyOptions = res.result
          }
        })
        if (record.warehouseId) {
          getAction(this.url.queryGoodsShelvesDictList, { warehouseId: record.warehouseId }).then(res => {
            if (res.success) {
              this.goodsShelvesOptions = res.result
            }
          })
          getAction(this.url.queryGoodsShelvesStoreyDictList,  { warehouseId: record.warehouseId, shelfNumber: record.goodsShelves }).then(res => {
            if (res.success) {
              this.storeyOptions = res.result
            }
          })
        }
        if (this.title === '新增' || this.title === '详情') {
          this.editDisabled = false
        }