Commit ed8b173e authored by wanglianghe's avatar wanglianghe

库区库域

parent ed87f379
......@@ -142,7 +142,8 @@ export default {
},
methods: {
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 @@
</el-form-item>
<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-select>
</el-form-item>
<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-select>
</el-form-item>
<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-select>
</el-form-item>
......@@ -114,6 +114,7 @@ import { getWarehouseList } from "@/api/ecw/warehouse"
import { getWarehouseAreaList } from "@/api/ecw/warehouseArea"
import { getDictDatas, DICT_TYPE } from '@/utils/dict'
import { CommonStatusEnum } from '@/utils/constants'
import d from "highlight.js/lib/languages/d";
export default {
name: "WarehouseAreaPosition",
......@@ -150,6 +151,9 @@ export default {
// 是否显示弹出层
open: false,
dateRangeCreateTime: [],
domainId: null,
areaId: null,
warehouseId: null,
// 查询参数
queryParams: {
page: 1,
......@@ -165,7 +169,11 @@ export default {
status: null,
},
// 表单参数
form: {},
form: {
warehouseId: null,
domainId: null,
areaId: null
},
// 表单校验
rules: {
code: [{ required: true, message: this.$t("储位代码不能为空"), trigger: "blur" }],
......@@ -221,10 +229,32 @@ computed: {
},
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;
if(areaId) {
areaId = parseInt(areaId)
this.areaId = areaId;
this.queryParams.areaId = areaId;
// this.form.areaId = areaId;
this.$set(this.form, 'areaId', areaId);
}
this.requestWarehouseList();
this.requestWarehouseAreaList();
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