Commit c76818ee authored by 刘帅's avatar 刘帅

1.优化

parent f051971d
...@@ -48,8 +48,8 @@ public class SysDeptController extends BaseController { ...@@ -48,8 +48,8 @@ public class SysDeptController extends BaseController {
*/ */
@SaCheckPermission("system:dept:list") @SaCheckPermission("system:dept:list")
@GetMapping("/current/list") @GetMapping("/current/list")
public R<List<SysDept>> getCurrentDeptList() { public R<List<SysDept>> getCurrentDeptList(SysDept dept) {
List<SysDept> depts = deptService.selectCurrentDeptList(); List<SysDept> depts = deptService.selectCurrentDeptList(dept);
return R.ok(depts); return R.ok(depts);
} }
......
...@@ -92,5 +92,9 @@ public class ErpMaterialPicking extends BaseEntity { ...@@ -92,5 +92,9 @@ public class ErpMaterialPicking extends BaseEntity {
* 出库时间 * 出库时间
*/ */
private Date outTime; private Date outTime;
/**
* 创建部门(数据权限)
*/
private Long createDeptId;
} }
...@@ -64,7 +64,7 @@ public class ErpGroupServiceImpl implements IErpGroupService { ...@@ -64,7 +64,7 @@ public class ErpGroupServiceImpl implements IErpGroupService {
} }
private LambdaQueryWrapper<ErpGroup> buildQueryWrapper(ErpGroupBo bo) { private LambdaQueryWrapper<ErpGroup> buildQueryWrapper(ErpGroupBo bo) {
List<SysDept> deptList = deptMapper.selectChildrenDeptById(LoginHelper.getDeptId()); List<SysDept> deptList = deptMapper.selectChildrenDeptById(LoginHelper.getDeptId(), null);
Map<String, Object> params = bo.getParams(); Map<String, Object> params = bo.getParams();
LambdaQueryWrapper<ErpGroup> lqw = Wrappers.lambdaQuery(); LambdaQueryWrapper<ErpGroup> lqw = Wrappers.lambdaQuery();
lqw.like(StringUtils.isNotBlank(bo.getCode()), ErpGroup::getCode, bo.getCode()); lqw.like(StringUtils.isNotBlank(bo.getCode()), ErpGroup::getCode, bo.getCode());
......
...@@ -151,6 +151,7 @@ public class ErpMaterialPickingServiceImpl implements IErpMaterialPickingService ...@@ -151,6 +151,7 @@ public class ErpMaterialPickingServiceImpl implements IErpMaterialPickingService
add.setReceiveTime(new Date()); add.setReceiveTime(new Date());
BigDecimal moneyTotal = bo.getMaterialList().stream().map(ErpMaterialPickingInfoBo::getMoney).reduce(BigDecimal.ZERO, BigDecimal::add); BigDecimal moneyTotal = bo.getMaterialList().stream().map(ErpMaterialPickingInfoBo::getMoney).reduce(BigDecimal.ZERO, BigDecimal::add);
add.setOutMoney(moneyTotal); add.setOutMoney(moneyTotal);
add.setCreateDeptId(LoginHelper.getUserId());
validEntityBeforeSave(add); validEntityBeforeSave(add);
boolean flag = baseMapper.insert(add) > 0; boolean flag = baseMapper.insert(add) > 0;
if (flag) { if (flag) {
......
...@@ -177,7 +177,7 @@ public class ErpRepairFormServiceImpl implements IErpRepairFormService { ...@@ -177,7 +177,7 @@ public class ErpRepairFormServiceImpl implements IErpRepairFormService {
} }
private QueryWrapper<ErpRepairForm> buildCustomQueryWrapper(ErpRepairFormBo bo) { private QueryWrapper<ErpRepairForm> buildCustomQueryWrapper(ErpRepairFormBo bo) {
List<SysDept> sysDeptList = deptMapper.selectChildrenDeptById(LoginHelper.getDeptId()); List<SysDept> sysDeptList = deptMapper.selectChildrenDeptById(LoginHelper.getDeptId(), null);
QueryWrapper<ErpRepairForm> query = Wrappers.query(); QueryWrapper<ErpRepairForm> query = Wrappers.query();
query query
.like(StringUtils.isNotBlank(bo.getRepairNumber()), "erf.repair_number", bo.getRepairNumber()) .like(StringUtils.isNotBlank(bo.getRepairNumber()), "erf.repair_number", bo.getRepairNumber())
......
...@@ -64,7 +64,7 @@ public class ErpWarehouseServiceImpl implements IErpWarehouseService { ...@@ -64,7 +64,7 @@ public class ErpWarehouseServiceImpl implements IErpWarehouseService {
} }
private LambdaQueryWrapper<ErpWarehouse> buildQueryWrapper(ErpWarehouseBo bo) { private LambdaQueryWrapper<ErpWarehouse> buildQueryWrapper(ErpWarehouseBo bo) {
List<SysDept> deptList = deptMapper.selectChildrenDeptById(LoginHelper.getDeptId()); List<SysDept> deptList = deptMapper.selectChildrenDeptById(LoginHelper.getDeptId(), null);
Map<String, Object> params = bo.getParams(); Map<String, Object> params = bo.getParams();
LambdaQueryWrapper<ErpWarehouse> lqw = Wrappers.lambdaQuery(); LambdaQueryWrapper<ErpWarehouse> lqw = Wrappers.lambdaQuery();
lqw.like(StringUtils.isNotBlank(bo.getCode()), ErpWarehouse::getCode, bo.getCode()); lqw.like(StringUtils.isNotBlank(bo.getCode()), ErpWarehouse::getCode, bo.getCode());
......
package com.maintain.common.enums;
import lombok.Getter;
/**
* 用户状态
*
* @author maintain
*/
@Getter
public enum DeptType {
ONE("1", "总公司"),
TWO("2", "分公司"),
THREE("3", "车队"),
FOUR("4", "车间"),
FIVE("5", "总公司管理部门"),
SIX("6", "分公司管理部门"),
SEVEN("7", "维修点");
private final String code;
private final String info;
DeptType(String code, String info) {
this.code = code;
this.info = info;
}
}
...@@ -43,6 +43,6 @@ public interface SysDeptMapper extends BaseMapperPlus<SysDeptMapper, SysDept, Sy ...@@ -43,6 +43,6 @@ public interface SysDeptMapper extends BaseMapperPlus<SysDeptMapper, SysDept, Sy
* @param deptId 部门ID * @param deptId 部门ID
* @return 选中部门列表 * @return 选中部门列表
*/ */
List<SysDept> selectChildrenDeptById(@Param("deptId") Long deptId); List<SysDept> selectChildrenDeptById(@Param("deptId") Long deptId, @Param("type") String type);
} }
...@@ -24,7 +24,7 @@ public interface ISysDeptService { ...@@ -24,7 +24,7 @@ public interface ISysDeptService {
* *
* @return 部门信息集合 * @return 部门信息集合
*/ */
List<SysDept> selectCurrentDeptList(); List<SysDept> selectCurrentDeptList(SysDept dept);
/** /**
* 查询部门树结构信息 * 查询部门树结构信息
......
...@@ -75,8 +75,8 @@ public class SysDeptServiceImpl implements ISysDeptService, DeptService { ...@@ -75,8 +75,8 @@ public class SysDeptServiceImpl implements ISysDeptService, DeptService {
* @return 部门信息集合 * @return 部门信息集合
*/ */
@Override @Override
public List<SysDept> selectCurrentDeptList() { public List<SysDept> selectCurrentDeptList(SysDept dept) {
return baseMapper.selectChildrenDeptById(LoginHelper.getDeptId()); return baseMapper.selectChildrenDeptById(LoginHelper.getDeptId(), dept.getType());
} }
/** /**
......
...@@ -39,6 +39,9 @@ ...@@ -39,6 +39,9 @@
<select id="selectChildrenDeptById" parameterType="Long" resultMap="SysDeptResult"> <select id="selectChildrenDeptById" parameterType="Long" resultMap="SysDeptResult">
select * from sys_dept where (find_in_set(#{deptId}, ancestors) or dept_id = #{deptId}) and status = 0 and del_flag = 0 select * from sys_dept where (find_in_set(#{deptId}, ancestors) or dept_id = #{deptId}) and status = 0 and del_flag = 0
<if test="type != null">
and type = #{type}
</if>
</select> </select>
</mapper> </mapper>
...@@ -52,9 +52,10 @@ export function getUnitTree(id) { ...@@ -52,9 +52,10 @@ export function getUnitTree(id) {
} }
// 查询维修站点-单位-站点树结构 // 查询维修站点-单位-站点树结构
export function getSiteTree(id) { export function getCurrentDeptTree(query) {
return request({ return request({
url: '/system/dept/current/list', url: '/system/dept/current/list',
method: 'get' method: 'get',
params: query
}) })
} }
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="115px"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="115px">
<el-form-item label="分类名称" prop="typeName"> <!-- <el-form-item label="分类名称" prop="typeName">-->
<el-input <!-- <el-input-->
v-model="queryParams.typeName" <!-- v-model="queryParams.typeName"-->
placeholder="请输入分类名称" <!-- placeholder="请输入分类名称"-->
clearable <!-- clearable-->
@keyup.enter.native="handleQuery" <!-- @keyup.enter.native="handleQuery"-->
/> <!-- />-->
</el-form-item> <!-- </el-form-item>-->
<el-form-item label="检验项目编号" prop="examineCode"> <el-form-item label="检验项目编号" prop="examineCode">
<el-input <el-input
v-model="queryParams.examineCode" v-model="queryParams.examineCode"
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<projectType type="3" ref="projectType" v-if="type==1"> <projectType type="3" ref="projectType" @child-click="handleNodeClick" v-if="type==1">
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
...@@ -374,12 +374,8 @@ export default { ...@@ -374,12 +374,8 @@ export default {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
typeId: undefined, typeId: undefined,
typeName: undefined,
examineCode: undefined, examineCode: undefined,
examineName: undefined, examineName: undefined,
isGeneral: undefined,
state: undefined,
isDelete: undefined,
}, },
// 表单参数 // 表单参数
form: { form: {
...@@ -460,6 +456,11 @@ export default { ...@@ -460,6 +456,11 @@ export default {
}; };
this.resetForm("form"); this.resetForm("form");
}, },
/** 节点点击 */
handleNodeClick(item) {
this.queryParams.typeId = item.id;
this.getList();
},
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
this.queryParams.pageNum = 1; this.queryParams.pageNum = 1;
...@@ -468,6 +469,7 @@ export default { ...@@ -468,6 +469,7 @@ export default {
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
this.resetForm("queryForm"); this.resetForm("queryForm");
this.queryParams.typeId = undefined;
this.handleQuery(); this.handleQuery();
}, },
// 多选框选中数据 // 多选框选中数据
......
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="120px"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="80px">
<el-form-item label="维修原因" prop="maintainCauseName"> <el-form-item label="维修原因编号" prop="maintainCauseCode" label-width="120px">
<el-input <el-input
v-model="queryParams.maintainCauseName" v-model="queryParams.maintainCauseCode"
placeholder="请输入维修原因" placeholder="请输入维修原因编号"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="维修原因编号" prop="maintainCauseCode"> <el-form-item label="维修原因" prop="maintainCauseName">
<el-input <el-input
v-model="queryParams.maintainCauseCode" v-model="queryParams.maintainCauseName"
placeholder="请输入维修原因编号" placeholder="请输入维修原因"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
......
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="80px"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="80px">
<el-form-item label="项目类别" prop="projectCode"> <!-- <el-form-item label="项目类别" prop="projectCode">-->
<Treeselect v-model="queryParams.typeId" :options="$refs.projectType?$refs.projectType.treeData:[]" placeholder="请选择" :props="{value:'id'}" :show-count="true" style="width:200px;" /> <!-- <Treeselect v-model="queryParams.typeId" :options="$refs.projectType?$refs.projectType.treeData:[]" placeholder="请选择" :props="{value:'id'}" :show-count="true" style="width:200px;" />-->
</el-form-item> <!-- </el-form-item>-->
<el-form-item label="项目编号" prop="projectCode"> <el-form-item label="项目编号" prop="projectCode">
<el-input <el-input
v-model="queryParams.projectCode" v-model="queryParams.projectCode"
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<projectType type="1" ref="projectType" v-if="type==1"> <projectType type="1" ref="projectType" @child-click="handleNodeClick" v-if="type==1">
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
...@@ -300,15 +300,8 @@ export default { ...@@ -300,15 +300,8 @@ export default {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
typeId: undefined, typeId: undefined,
typeName: undefined,
projectCode: undefined, projectCode: undefined,
projectName: undefined, projectName: undefined,
standardManHour: undefined,
standardPrice: undefined,
warrantyPeriod: undefined,
technicalSpecification: undefined,
state: undefined,
isDelete: undefined
}, },
// 表单参数 // 表单参数
form: {}, form: {},
...@@ -405,14 +398,8 @@ export default { ...@@ -405,14 +398,8 @@ export default {
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
this.queryParams={
pageNum: 1,
pageSize: this.queryParams.pageSize,
typeId: undefined,
projectCode: undefined,
projectName: undefined,
},
this.resetForm("queryForm"); this.resetForm("queryForm");
this.queryParams.typeId = undefined;
this.handleQuery(); this.handleQuery();
}, },
// 多选框选中数据 // 多选框选中数据
...@@ -422,6 +409,11 @@ export default { ...@@ -422,6 +409,11 @@ export default {
this.single = selection.length!==1 this.single = selection.length!==1
this.multiple = !selection.length this.multiple = !selection.length
}, },
/** 节点点击 */
handleNodeClick(item) {
this.queryParams.typeId = item.id;
this.getList();
},
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd() { handleAdd() {
this.reset(); this.reset();
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<projectType type="2" ref="projectType" v-if="type==1"> <projectType type="2" ref="projectType" @child-click="handleNodeClick" v-if="type==1">
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
...@@ -357,6 +357,11 @@ export default { ...@@ -357,6 +357,11 @@ export default {
}; };
this.resetForm("form"); this.resetForm("form");
}, },
/** 节点点击 */
handleNodeClick(item) {
this.queryParams.typeId = item.id;
this.getList();
},
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
this.queryParams.pageNum = 1; this.queryParams.pageNum = 1;
...@@ -365,6 +370,7 @@ export default { ...@@ -365,6 +370,7 @@ export default {
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
this.resetForm("queryForm"); this.resetForm("queryForm");
this.queryParams.typeId = undefined;
this.handleQuery(); this.handleQuery();
}, },
// 多选框选中数据 // 多选框选中数据
......
...@@ -462,7 +462,7 @@ import { ...@@ -462,7 +462,7 @@ import {
} from '@/api/business/materialCheck' } from '@/api/business/materialCheck'
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 { getSiteTree } from '@/api/business/unit' import { getCurrentDeptTree } from '@/api/business/unit'
import {listSiteWarehouse, listWarehouseAll} from '@/api/business/siteWarehouse' import {listSiteWarehouse, listWarehouseAll} from '@/api/business/siteWarehouse'
import {customListAll, customListAllByWarehouseId, listMaterial} from '@/api/business/material' import {customListAll, customListAllByWarehouseId, listMaterial} from '@/api/business/material'
import { formatDate } from '@/utils' import { formatDate } from '@/utils'
...@@ -571,7 +571,7 @@ export default { ...@@ -571,7 +571,7 @@ export default {
}); });
}, },
getDeptTree(){ getDeptTree(){
getSiteTree().then(response => { getCurrentDeptTree().then(response => {
this.deptTreeData = this.handleTree(response.data, "deptId") this.deptTreeData = this.handleTree(response.data, "deptId")
}); });
}, },
......
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
<el-form-item label="仓库名称" prop="warehouseName"> <el-form-item label="仓库名称" prop="warehouseId">
<el-input <el-select v-model="queryParams.warehouseId" filterable placeholder="选择仓库" clearable>
v-model="queryParams.warehouseName" <el-option
placeholder="请输入仓库名称" v-for="item in warehouseList"
clearable :key="item.id"
@keyup.enter.native="handleQuery" :value="item.id"
:label="item.name"
/> />
</el-select>
</el-form-item> </el-form-item>
<el-form-item label="物资编码" prop="materialCode"> <el-form-item label="物资编码" prop="materialCode">
<el-input <el-input
...@@ -143,6 +145,7 @@ ...@@ -143,6 +145,7 @@
import {listByMaterialId, listMaterialInventory} from "@/api/business/material"; import {listByMaterialId, listMaterialInventory} from "@/api/business/material";
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 {listWarehouseAll} from "@/api/business/siteWarehouse";
export default { export default {
name: "Material", name: "Material",
...@@ -168,6 +171,8 @@ export default { ...@@ -168,6 +171,8 @@ export default {
total: 0, total: 0,
// 物资表格数据 // 物资表格数据
materialList: [], materialList: [],
// 仓库列表
warehouseList: [],
// 物料入库明细表格数据 // 物料入库明细表格数据
materialPutawayInfoList: [], materialPutawayInfoList: [],
// 物料退货明细表格数据 // 物料退货明细表格数据
...@@ -196,6 +201,7 @@ export default { ...@@ -196,6 +201,7 @@ export default {
}, },
created() { created() {
this.getList(); this.getList();
this.getWarehouseList();
}, },
methods: { methods: {
/** 查询物资列表 */ /** 查询物资列表 */
...@@ -207,6 +213,12 @@ export default { ...@@ -207,6 +213,12 @@ export default {
this.loading = false; this.loading = false;
}); });
}, },
/** 仓库列表 */
getWarehouseList() {
listWarehouseAll().then(response => {
this.warehouseList = response.data;
});
},
/** 物资分类更改 */ /** 物资分类更改 */
// materialTypeIdChange() { // materialTypeIdChange() {
// this.$refs.form.clearValidate('materialTypeId') // this.$refs.form.clearValidate('materialTypeId')
......
...@@ -22,7 +22,9 @@ ...@@ -22,7 +22,9 @@
ref="tree" ref="tree"
node-key="id" node-key="id"
default-expand-all default-expand-all
highlight-current> highlight-current
@node-click="treeDataChange"
>
<span class="custom-tree-node" slot-scope="{ node, data }" @mouseenter="showIcons(node)" @mouseleave="hideIcons(node)"> <span class="custom-tree-node" slot-scope="{ node, data }" @mouseenter="showIcons(node)" @mouseleave="hideIcons(node)">
<span>{{ node.label }}</span> <span>{{ node.label }}</span>
<span class="tree-node-icons" v-show="node.showIcons" v-if="data.id !== 1 && data.id !== 2 && data.id !== 3"> <span class="tree-node-icons" v-show="node.showIcons" v-if="data.id !== 1 && data.id !== 2 && data.id !== 3">
...@@ -134,10 +136,17 @@ export default { ...@@ -134,10 +136,17 @@ export default {
}; };
this.resetForm("form"); this.resetForm("form");
}, },
/** 点击事件 */
treeDataChange(item) {
this.form = { type: this.type, parentId: item.id }
this.$emit("child-click", item);
},
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd(data) { handleAdd(data) {
if (data.id) {
console.log('data', data) console.log('data', data)
this.form={ type: this.type, parentId: data.id } this.form={ type: this.type, parentId: data.id }
}
this.open = true; this.open = true;
this.title = `添加${this.type==1?'维修':this.type==2?'故障':this.type==3?'检验':this.type}项目分类`; this.title = `添加${this.type==1?'维修':this.type==2?'故障':this.type==3?'检验':this.type}项目分类`;
}, },
......
...@@ -476,7 +476,7 @@ import malfunctionProject from '../malfunctionProject/index' ...@@ -476,7 +476,7 @@ import malfunctionProject from '../malfunctionProject/index'
import {listCar} from '@/api/business/car' import {listCar} from '@/api/business/car'
import {listClient} from '@/api/business/client' import {listClient} from '@/api/business/client'
import {listMaintainCause} from '@/api/business/maintainCause' import {listMaintainCause} from '@/api/business/maintainCause'
import {getSiteTree} from '@/api/business/unit' import {getCurrentDeptTree} from '@/api/business/unit'
import {listSiteGroup} from '@/api/business/siteGroup' import {listSiteGroup} from '@/api/business/siteGroup'
import {getVehicleModel} from '@/api/business/vehicleModel' import {getVehicleModel} from '@/api/business/vehicleModel'
import repairFormProject from '@/views/business/repairFormProject/index.vue' import repairFormProject from '@/views/business/repairFormProject/index.vue'
...@@ -724,8 +724,6 @@ export default { ...@@ -724,8 +724,6 @@ export default {
}else { }else {
this.deliveryForm.deliveryTime = formatDate(new Date().getTime()) this.deliveryForm.deliveryTime = formatDate(new Date().getTime())
} }
}) })
}, },
/** 查询人员-人员列表 */ /** 查询人员-人员列表 */
...@@ -769,7 +767,7 @@ export default { ...@@ -769,7 +767,7 @@ export default {
}) })
}, },
getTreeData(){ getTreeData(){
getSiteTree().then(response => { getCurrentDeptTree({type: 4}).then(response => {
this.treeData = this.handleTree(response.data, "deptId") this.treeData = this.handleTree(response.data, "deptId")
}); });
}, },
......
...@@ -173,7 +173,7 @@ import { listSiteGroup, getSiteGroup, delSiteGroup, addSiteGroup, updateSiteGrou ...@@ -173,7 +173,7 @@ import { listSiteGroup, getSiteGroup, delSiteGroup, addSiteGroup, updateSiteGrou
import { listDept } from "@/api/system/dept"; import { listDept } 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 { getSiteTree } from "@/api/business/unit"; import { getCurrentDeptTree } from "@/api/business/unit";
import { getToken } from '@/utils/auth' import { getToken } from '@/utils/auth'
export default { export default {
...@@ -279,7 +279,7 @@ export default { ...@@ -279,7 +279,7 @@ export default {
// listDept().then(response => { // listDept().then(response => {
// this.treeData = this.handleTree(response.data, "deptId"); // this.treeData = this.handleTree(response.data, "deptId");
// }); // });
getSiteTree().then(response => { getCurrentDeptTree({type: 4}).then(response => {
this.treeData = this.handleTree(response.data, "deptId") this.treeData = this.handleTree(response.data, "deptId")
}); });
}, },
......
...@@ -167,7 +167,7 @@ ...@@ -167,7 +167,7 @@
<script> <script>
import { listSiteWarehouse, getSiteWarehouse, delSiteWarehouse, addSiteWarehouse, updateSiteWarehouse } from "@/api/business/siteWarehouse"; import { listSiteWarehouse, getSiteWarehouse, delSiteWarehouse, addSiteWarehouse, updateSiteWarehouse } from "@/api/business/siteWarehouse";
import { listDept } from "@/api/system/dept"; import { listDept } from "@/api/system/dept";
import { getSiteTree } from "@/api/business/unit"; import { getCurrentDeptTree } from "@/api/business/unit";
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 { getToken } from '@/utils/auth' import { getToken } from '@/utils/auth'
...@@ -277,7 +277,7 @@ export default { ...@@ -277,7 +277,7 @@ export default {
// listDept().then(response => { // listDept().then(response => {
// this.treeData = this.handleTree(response.data, "deptId"); // this.treeData = this.handleTree(response.data, "deptId");
// }); // });
getSiteTree().then(response => { getCurrentDeptTree().then(response => {
this.treeData = this.handleTree(response.data, "deptId") this.treeData = this.handleTree(response.data, "deptId")
}); });
}, },
......
...@@ -235,7 +235,7 @@ ...@@ -235,7 +235,7 @@
<script> <script>
import { listUser, getUser, delUser, addUser, updateUser, getUserCode } from "@/api/business/user"; import { listUser, getUser, delUser, addUser, updateUser, getUserCode } from "@/api/business/user";
import { getSiteTree } from "@/api/business/unit"; import { getCurrentDeptTree } from "@/api/business/unit";
import { listSiteGroup } from "@/api/business/siteGroup"; import { listSiteGroup } from "@/api/business/siteGroup";
import { listPost } from "@/api/business/post"; import { listPost } from "@/api/business/post";
import { formatDate } from "@/utils/index" import { formatDate } from "@/utils/index"
...@@ -354,7 +354,7 @@ export default { ...@@ -354,7 +354,7 @@ export default {
}, },
methods: { methods: {
getSiteTre(){ getSiteTre(){
getSiteTree().then(response => { getCurrentDeptTree().then(response => {
this.siteLists = this.handleTree(response.data, "deptId") this.siteLists = this.handleTree(response.data, "deptId")
}); });
}, },
......
...@@ -210,7 +210,7 @@ import { ...@@ -210,7 +210,7 @@ import {
} from '@/api/business/warehouseLocation' } from '@/api/business/warehouseLocation'
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 { getSiteTree } from '@/api/business/unit' import { getCurrentDeptTree } from '@/api/business/unit'
import { listSiteWarehouse } from '@/api/business/siteWarehouse' import { listSiteWarehouse } from '@/api/business/siteWarehouse'
import { parseTime } from '../../../utils/ruoyi' import { parseTime } from '../../../utils/ruoyi'
import { typeTree } from '../../../api/business/materialType' import { typeTree } from '../../../api/business/materialType'
...@@ -313,7 +313,7 @@ export default { ...@@ -313,7 +313,7 @@ export default {
}, },
methods: { methods: {
getDeptTree(){ getDeptTree(){
getSiteTree().then(response => { getCurrentDeptTree().then(response => {
this.treeData = this.handleTree(response.data, "deptId") this.treeData = this.handleTree(response.data, "deptId")
}); });
}, },
......
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