|
@@ -179,6 +179,7 @@
|
|
:rowKey="(record) => record.id"
|
|
:rowKey="(record) => record.id"
|
|
:columns="chooseColumns"
|
|
:columns="chooseColumns"
|
|
:data="chooseLoadData"
|
|
:data="chooseLoadData"
|
|
|
|
+ :defaultLoadData="false"
|
|
:scroll="{ x: 1130, y: 300 }"
|
|
:scroll="{ x: 1130, y: 300 }"
|
|
bordered>
|
|
bordered>
|
|
<!-- 产品分类 -->
|
|
<!-- 产品分类 -->
|
|
@@ -288,7 +289,7 @@ export default {
|
|
this.disabled = true
|
|
this.disabled = true
|
|
const params = Object.assign(parameter, this.queryParam)
|
|
const params = Object.assign(parameter, this.queryParam)
|
|
params.enabledFlag = 1
|
|
params.enabledFlag = 1
|
|
- params.warehouseSn = this.basicInfoData.outWarehouseSn
|
|
|
|
|
|
+ params.warehouseSn = this.basicInfoData ? this.basicInfoData.outWarehouseSn : ''
|
|
return productQuery(params).then(res => {
|
|
return productQuery(params).then(res => {
|
|
const data = res.data
|
|
const data = res.data
|
|
const no = (data.pageNo - 1) * data.pageSize
|
|
const no = (data.pageNo - 1) * data.pageSize
|
|
@@ -366,15 +367,17 @@ export default {
|
|
},
|
|
},
|
|
// 基本信息
|
|
// 基本信息
|
|
getDetail () {
|
|
getDetail () {
|
|
|
|
+ this.disabled = true
|
|
allocWarehouseDetail({ id: this.$route.params.id }).then(res => {
|
|
allocWarehouseDetail({ id: this.$route.params.id }).then(res => {
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
this.basicInfoData = res.data
|
|
this.basicInfoData = res.data
|
|
- this.$refs.table.refresh(true)
|
|
|
|
|
|
+ this.resetSearchForm()
|
|
this.getWarehouseLoc(res.data.putWarehouseSn, 'put')
|
|
this.getWarehouseLoc(res.data.putWarehouseSn, 'put')
|
|
this.getWarehouseLoc(res.data.outWarehouseSn, 'out')
|
|
this.getWarehouseLoc(res.data.outWarehouseSn, 'out')
|
|
} else {
|
|
} else {
|
|
this.basicInfoData = null
|
|
this.basicInfoData = null
|
|
}
|
|
}
|
|
|
|
+ this.disabled = false
|
|
})
|
|
})
|
|
},
|
|
},
|
|
// 添加/编辑
|
|
// 添加/编辑
|
|
@@ -538,11 +541,20 @@ export default {
|
|
)
|
|
)
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ mounted () {
|
|
|
|
+ this.getDetail()
|
|
|
|
+ this.getProductBrand()
|
|
|
|
+ this.getProductType()
|
|
|
|
+ this.chooseResetSearchForm()
|
|
|
|
+ },
|
|
beforeRouteEnter (to, from, next) {
|
|
beforeRouteEnter (to, from, next) {
|
|
next(vm => {
|
|
next(vm => {
|
|
- vm.getDetail()
|
|
|
|
- vm.getProductBrand()
|
|
|
|
- vm.getProductType()
|
|
|
|
|
|
+ if (!vm.disabled) {
|
|
|
|
+ vm.getDetail()
|
|
|
|
+ vm.getProductBrand()
|
|
|
|
+ vm.getProductType()
|
|
|
|
+ vm.chooseResetSearchForm()
|
|
|
|
+ }
|
|
})
|
|
})
|
|
}
|
|
}
|
|
}
|
|
}
|