|
@@ -262,6 +262,18 @@
|
|
</el-radio-group>
|
|
</el-radio-group>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
|
|
+ <el-col :span="12">
|
|
|
|
+ <el-form-item label="仓库">
|
|
|
|
+ <el-select v-model="form.warehouseIds" placeholder="请选择仓库" multiple>
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="(item, index) in warehouseOptions"
|
|
|
|
+ :key="index.fId"
|
|
|
|
+ :label="item.fName"
|
|
|
|
+ :value="item.fId"
|
|
|
|
+ ></el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
</el-row>
|
|
</el-row>
|
|
<el-row>
|
|
<el-row>
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
@@ -357,6 +369,9 @@ import { getToken } from "@/utils/auth";
|
|
import { treeselect } from "@/api/system/dept";
|
|
import { treeselect } from "@/api/system/dept";
|
|
import Treeselect from "@riophae/vue-treeselect";
|
|
import Treeselect from "@riophae/vue-treeselect";
|
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|
|
|
+import {
|
|
|
|
+ listWarehousesss,
|
|
|
|
+} from "@/api/basicdata/warehouse";
|
|
|
|
|
|
export default {
|
|
export default {
|
|
name: "User",
|
|
name: "User",
|
|
@@ -459,14 +474,16 @@ export default {
|
|
trigger: "blur"
|
|
trigger: "blur"
|
|
}
|
|
}
|
|
]
|
|
]
|
|
- }
|
|
|
|
|
|
+ },
|
|
|
|
+ // 仓库
|
|
|
|
+ warehouseOptions: [],
|
|
};
|
|
};
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|
|
// 根据名称筛选部门树
|
|
// 根据名称筛选部门树
|
|
deptName(val) {
|
|
deptName(val) {
|
|
this.$refs.tree.filter(val);
|
|
this.$refs.tree.filter(val);
|
|
- }
|
|
|
|
|
|
+ },
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
this.getList();
|
|
this.getList();
|
|
@@ -483,6 +500,10 @@ export default {
|
|
this.getDicts("user_system").then(response => {
|
|
this.getDicts("user_system").then(response => {
|
|
this.SystemOptions = response.data;
|
|
this.SystemOptions = response.data;
|
|
});
|
|
});
|
|
|
|
+ listWarehousesss({fStatus: 0, delFlag: 0}).then((response) => {
|
|
|
|
+ this.warehouseOptions = response.rows;
|
|
|
|
+ this.warehouseOptions.unshift({fId: 0,fName: '全部'})
|
|
|
|
+ });
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
/** 查询用户列表 */
|
|
/** 查询用户列表 */
|
|
@@ -548,7 +569,8 @@ export default {
|
|
remark: undefined,
|
|
remark: undefined,
|
|
postIds: [],
|
|
postIds: [],
|
|
roleIds: [],
|
|
roleIds: [],
|
|
- userSystem:undefined
|
|
|
|
|
|
+ userSystem:undefined,
|
|
|
|
+ warehouseIds: [0],
|
|
};
|
|
};
|
|
this.resetForm("form");
|
|
this.resetForm("form");
|
|
},
|
|
},
|
|
@@ -573,6 +595,8 @@ export default {
|
|
handleAdd() {
|
|
handleAdd() {
|
|
this.reset();
|
|
this.reset();
|
|
this.getTreeselect();
|
|
this.getTreeselect();
|
|
|
|
+ // 默认全部
|
|
|
|
+ this.$set(this.form, 'warehouseIds', [0])
|
|
getUser().then(response => {
|
|
getUser().then(response => {
|
|
this.postOptions = response.posts;
|
|
this.postOptions = response.posts;
|
|
this.roleOptions = response.roles;
|
|
this.roleOptions = response.roles;
|
|
@@ -588,6 +612,7 @@ export default {
|
|
const userId = row.userId || this.ids;
|
|
const userId = row.userId || this.ids;
|
|
getUser(userId).then(response => {
|
|
getUser(userId).then(response => {
|
|
this.form = response.data;
|
|
this.form = response.data;
|
|
|
|
+ this.form.warehouseIds = response.warehouseIds
|
|
this.postOptions = response.posts;
|
|
this.postOptions = response.posts;
|
|
this.roleOptions = response.roles;
|
|
this.roleOptions = response.roles;
|
|
this.form.postIds = response.postIds;
|
|
this.form.postIds = response.postIds;
|
|
@@ -682,7 +707,7 @@ export default {
|
|
// 提交上传文件
|
|
// 提交上传文件
|
|
submitFileForm() {
|
|
submitFileForm() {
|
|
this.$refs.upload.submit();
|
|
this.$refs.upload.submit();
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ },
|
|
|
|
+ },
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|