|
|
|
@ -47,13 +47,21 @@
|
|
|
|
|
</el-form>
|
|
|
|
|
<el-table v-loading="loading" :data="list" style="width: 100%">
|
|
|
|
|
<el-table-column label="序号" type="index"></el-table-column>
|
|
|
|
|
<el-table-column label="货位号" prop="nameCode" width="120"></el-table-column>
|
|
|
|
|
<el-table-column label="货位名称" prop="cpmctymc" width="180">
|
|
|
|
|
<el-table-column label="货位号" prop="code" width="120"></el-table-column>
|
|
|
|
|
<el-table-column label="货位名称" prop="name" width="180">
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="所属仓库" prop="invStorageName" v-if="showSup"
|
|
|
|
|
<el-table-column label="所属仓库" prop="invStorageName"
|
|
|
|
|
show-overflow-tooltip width="120"></el-table-column>
|
|
|
|
|
<el-table-column label="所属分库" prop="invSubStorageName" v-if="showSup"
|
|
|
|
|
<el-table-column label="所属分库" prop="invSubStorageName"
|
|
|
|
|
show-overflow-tooltip width="120"></el-table-column>
|
|
|
|
|
<el-table-column label="状态" prop="status"
|
|
|
|
|
show-overflow-tooltip width="120">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-tag>
|
|
|
|
|
{{ statusMap[scope.row.status] }}
|
|
|
|
|
</el-tag>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="操作" width="120" fixed="right">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-button
|
|
|
|
@ -78,6 +86,81 @@
|
|
|
|
|
layout="prev, pager, next"
|
|
|
|
|
:total="total"
|
|
|
|
|
></el-pagination>
|
|
|
|
|
|
|
|
|
|
<el-dialog
|
|
|
|
|
:title="formMap[formName]"
|
|
|
|
|
:visible.sync="modifySpaceVisible"
|
|
|
|
|
width="50%"
|
|
|
|
|
:close-on-click-modal="false"
|
|
|
|
|
:close-on-press-escape="false"
|
|
|
|
|
v-if="modifySpaceVisible"
|
|
|
|
|
>
|
|
|
|
|
<el-form :model="formData" ref="formData">
|
|
|
|
|
<el-row :gutter="20">
|
|
|
|
|
<el-col :span="2">
|
|
|
|
|
<span>货位编码:</span>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="10">
|
|
|
|
|
<el-form-item prop="code">
|
|
|
|
|
<el-input v-model="formData.code" auto-complete="off"
|
|
|
|
|
placeholder="请输入货位编码"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
|
|
<el-col :span="2">
|
|
|
|
|
<span>货位名称:</span>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="10">
|
|
|
|
|
<el-form-item prop="name">
|
|
|
|
|
<el-input v-model="formData.name" auto-complete="off"
|
|
|
|
|
placeholder="请输入货位名称"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
<el-row :gutter="20">
|
|
|
|
|
<el-col :span="2">
|
|
|
|
|
<span>所属仓库:</span>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="10">
|
|
|
|
|
<el-form-item prop="invStorageCode">
|
|
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
|
|
<el-col :span="2">
|
|
|
|
|
<span>所属分库:</span>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="10">
|
|
|
|
|
<el-form-item prop="invWarehouseCode">
|
|
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
<el-row :gutter="20">
|
|
|
|
|
<el-col :span="2">
|
|
|
|
|
<span>备注:</span>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="10">
|
|
|
|
|
<el-form-item prop="invStorageCode">
|
|
|
|
|
<el-input v-model="formData.remark" auto-complete="off"
|
|
|
|
|
placeholder="请输入备注内容"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
|
|
<el-col :span="2">
|
|
|
|
|
<span>启用状态:</span>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="10">
|
|
|
|
|
<el-form-item prop="status">
|
|
|
|
|
<el-radio v-model="formData.status" :label="0">禁用</el-radio>
|
|
|
|
|
<el-radio v-model="formData.status" :label="1">启用</el-radio>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
</el-form>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
@ -87,7 +170,7 @@ import {filterUplLocInv} from "@/api/basic/invWarehouse";
|
|
|
|
|
import {filterSubByInv} from "@/api/basic/invSubWarehouse";
|
|
|
|
|
import {userInfo} from "@/api/auth/login";
|
|
|
|
|
import {isBlank} from "@/utils/strUtil";
|
|
|
|
|
|
|
|
|
|
import {getInvSpaceList, saveSpace, deleteSpace} from "@/api/inventory/invSpace";
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
data() {
|
|
|
|
@ -112,10 +195,27 @@ export default {
|
|
|
|
|
formLoading: false,
|
|
|
|
|
dialogVisible: false,
|
|
|
|
|
deleteLoading: false,
|
|
|
|
|
busTypes: [],
|
|
|
|
|
idQuery: null,
|
|
|
|
|
showSup: false,
|
|
|
|
|
fromOptions: [],
|
|
|
|
|
statusMap: {
|
|
|
|
|
0: "禁用",
|
|
|
|
|
1: "启用"
|
|
|
|
|
},
|
|
|
|
|
formMap: {
|
|
|
|
|
add: "添加货位",
|
|
|
|
|
edit: "编辑货位"
|
|
|
|
|
},
|
|
|
|
|
formName: null,
|
|
|
|
|
modifySpaceVisible: false,
|
|
|
|
|
formData: {
|
|
|
|
|
id: null,
|
|
|
|
|
code: null,
|
|
|
|
|
name: null,
|
|
|
|
|
invStorageCode: null,
|
|
|
|
|
invWarehouseCode: null,
|
|
|
|
|
status: 1,
|
|
|
|
|
remark: null
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
@ -160,6 +260,15 @@ export default {
|
|
|
|
|
getList() {
|
|
|
|
|
this.loading = true;
|
|
|
|
|
this.filterQuery.customerId = store.getters.customerId;
|
|
|
|
|
getInvSpaceList(this.filterQuery).then((res) => {
|
|
|
|
|
this.loading = false;
|
|
|
|
|
if (res.code === 20000) {
|
|
|
|
|
this.list = res.data.list || [];
|
|
|
|
|
this.total = res.data.total || 0;
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.error(res.data);
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
deleteDialog(rowId) {
|
|
|
|
@ -169,7 +278,15 @@ export default {
|
|
|
|
|
type: "warning",
|
|
|
|
|
})
|
|
|
|
|
.then(() => {
|
|
|
|
|
|
|
|
|
|
let params = {id: rowId};
|
|
|
|
|
deleteSpace(params).then((res) => {
|
|
|
|
|
if (res.code === 20000) {
|
|
|
|
|
this.$message.success("删除成功!");
|
|
|
|
|
this.getList();
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.error(res.data);
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
});
|
|
|
|
@ -202,10 +319,22 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
editSpace(row) {
|
|
|
|
|
|
|
|
|
|
this.modifySpaceVisible = true;
|
|
|
|
|
this.formName = "edit";
|
|
|
|
|
this.formData = row;
|
|
|
|
|
},
|
|
|
|
|
addSpace() {
|
|
|
|
|
|
|
|
|
|
this.modifySpaceVisible = true;
|
|
|
|
|
this.formName = "add";
|
|
|
|
|
this.formData = {
|
|
|
|
|
id: null,
|
|
|
|
|
code: null,
|
|
|
|
|
name: null,
|
|
|
|
|
invStorageCode: null,
|
|
|
|
|
invWarehouseCode: null,
|
|
|
|
|
status: 1,
|
|
|
|
|
remark: null
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
mounted() {
|
|
|
|
|