Commit ed8b173e authored by wanglianghe's avatar wanglianghe

库区库域

parent ed87f379
...@@ -142,7 +142,8 @@ export default { ...@@ -142,7 +142,8 @@ export default {
}, },
methods: { methods: {
positionManager(row) { positionManager(row) {
this.$router.push('/warehouse/warehouse-area-position?areaId=' + row.id); // console.log(row)
this.$router.push('/warehouse/warehouse-area-position?areaId=' + row.id + "&warehouseId=" + row.warehouseId + "&domainId=" + row.pid);
}, },
/**查询仓库 */ /**查询仓库 */
......
...@@ -73,19 +73,19 @@ ...@@ -73,19 +73,19 @@
</el-form-item> </el-form-item>
<el-form-item :label="$t('仓库')" prop="warehouseId"> <el-form-item :label="$t('仓库')" prop="warehouseId">
<el-select v-model="form.warehouseId" clearable @change="changeWarehouse" :disabled="parentDo != null"> <el-select v-model="form.warehouseId" clearable @change="changeWarehouse" :disabled="parentDo != null || warehouseId != null">
<el-option v-for="warehouse in warehouseList" :key="warehouse.id" :label="$l(warehouse, 'title')" :value="warehouse.id" /> <el-option v-for="warehouse in warehouseList" :key="warehouse.id" :label="$l(warehouse, 'title')" :value="warehouse.id" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('库域')" prop="domainId"> <el-form-item :label="$t('库域')" prop="domainId">
<el-select v-model="form.domainId" clearable @change="changeDomain" :disabled="parentDo != null"> <el-select v-model="form.domainId" clearable @change="changeDomain" :disabled="parentDo != null || domainId != null">
<el-option v-for="domain in domainList" :key="domain.id" :label="domain.name" :value="domain.id" /> <el-option v-for="domain in domainList" :key="domain.id" :label="domain.name" :value="domain.id" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('库区')" prop="areaId" > <el-form-item :label="$t('库区')" prop="areaId" >
<el-select v-model="form.areaId" clearable @change="changeArea" :disabled="parentDo != null"> <el-select v-model="form.areaId" clearable @change="changeArea" :disabled="parentDo != null || areaId != null">
<el-option v-for="area in areaList" :key="area.id" :label="area.name" :value="area.id" /> <el-option v-for="area in areaList" :key="area.id" :label="area.name" :value="area.id" />
</el-select> </el-select>
</el-form-item> </el-form-item>
...@@ -114,6 +114,7 @@ import { getWarehouseList } from "@/api/ecw/warehouse" ...@@ -114,6 +114,7 @@ import { getWarehouseList } from "@/api/ecw/warehouse"
import { getWarehouseAreaList } from "@/api/ecw/warehouseArea" import { getWarehouseAreaList } from "@/api/ecw/warehouseArea"
import { getDictDatas, DICT_TYPE } from '@/utils/dict' import { getDictDatas, DICT_TYPE } from '@/utils/dict'
import { CommonStatusEnum } from '@/utils/constants' import { CommonStatusEnum } from '@/utils/constants'
import d from "highlight.js/lib/languages/d";
export default { export default {
name: "WarehouseAreaPosition", name: "WarehouseAreaPosition",
...@@ -150,6 +151,9 @@ export default { ...@@ -150,6 +151,9 @@ export default {
// 是否显示弹出层 // 是否显示弹出层
open: false, open: false,
dateRangeCreateTime: [], dateRangeCreateTime: [],
domainId: null,
areaId: null,
warehouseId: null,
// 查询参数 // 查询参数
queryParams: { queryParams: {
page: 1, page: 1,
...@@ -165,7 +169,11 @@ export default { ...@@ -165,7 +169,11 @@ export default {
status: null, status: null,
}, },
// 表单参数 // 表单参数
form: {}, form: {
warehouseId: null,
domainId: null,
areaId: null
},
// 表单校验 // 表单校验
rules: { rules: {
code: [{ required: true, message: this.$t("储位代码不能为空"), trigger: "blur" }], code: [{ required: true, message: this.$t("储位代码不能为空"), trigger: "blur" }],
...@@ -221,10 +229,32 @@ computed: { ...@@ -221,10 +229,32 @@ computed: {
}, },
created() { created() {
let warehouseId = this.$route.query.warehouseId;
console.log(this.$route.query);
if(warehouseId) {
warehouseId = parseInt(warehouseId)
this.warehouseId = warehouseId;
this.queryParams.warehouseId = warehouseId;
// this.form.warehouseId = warehouseId;
this.$set(this.form, 'warehouseId', warehouseId);
}
let domainId = this.$route.query.domainId;
if(domainId) {
domainId = parseInt(domainId)
this.domainId = domainId;
this.queryParams.domainId = domainId;
// this.form.domainId = domainId;
this.$set(this.form, 'domainId', domainId);
}
let areaId = this.$route.query.areaId; let areaId = this.$route.query.areaId;
if(areaId) { if(areaId) {
areaId = parseInt(areaId)
this.areaId = areaId;
this.queryParams.areaId = areaId; this.queryParams.areaId = areaId;
// this.form.areaId = areaId;
this.$set(this.form, 'areaId', areaId);
} }
this.requestWarehouseList(); this.requestWarehouseList();
this.requestWarehouseAreaList(); this.requestWarehouseAreaList();
this.getList(); this.getList();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment