diff --git a/src/api/basic/basic.js b/src/api/basic/basic.js index b7da053c..0ee5ac70 100644 --- a/src/api/basic/basic.js +++ b/src/api/basic/basic.js @@ -172,6 +172,14 @@ export function delUnitPerson(unitId) { } +// 工程管理下拉框 +export function queryProDataApi(dictType) { + return request({ + url: '/system/dict/data//type/'+ dictType, + method: 'get', + }) +} + // 字典表数据库 // 单位类型-列表 export function unitTypeList(query) { diff --git a/src/api/ma/base.js b/src/api/ma/base.js new file mode 100644 index 00000000..9c3e40ce --- /dev/null +++ b/src/api/ma/base.js @@ -0,0 +1,107 @@ +import request from '@/utils/request' + +//机具类型管理 +export function getMaTypeList(query) { + return request({ + url: '/material/ma_type/getMaTypeTreeSelect', + method: 'get', + params: query, + }) +} + +//机具类型管理列表信息 +export function getListByMaType(query) { + return request({ + url: '/material/ma_type/list', + method: 'get', + params: query, + }) +} + +//查看机具类型管理列表详细信息 +export function getMaType(id) { + return request({ + url: '/material/ma_type/'+ id, + method: 'get', + }) +} +// 仓库信息下拉框- +export function queryKeeperDataApi(query) { + return request({ + url: '/material/wh_house_info/listNoPage', + method: 'get', + params: query + }) +} +// 施工类型下拉框- +export function queryKeeperProApi(query) { + return request({ + url: '/material/ma_type/selectMaTypeListByHouseId', + method: 'get', + params: query + }) +} + +// 物资类型下拉框- +export function queryKeeperMatApi(query) { + return request({ + url: '/material/ma_type/selectMaTypeListByTypeId', + method: 'get', + params: query + }) +} + +// 物资名称下拉框- +export function queryKeeperNameApi(query) { + return request({ + url: '/material/ma_type/selectMaTypeListByTypeId', + method: 'get', + params: query + }) +} + +// // 导出 +// export function exportMaterial(query) { +// return request({ +// url: '/material/ma_type/export', +// method: 'post', +// responseType: 'blob', +// params: query +// }) +// } + +// 物资类型管理--删除 +export function delMaType(typeId) { + return request({ + url: '/material/ma_type/' + typeId, + method: 'delete', + }) +} + +// 物资类型管理--修改 +export function updateMaType(data) { + return request({ + url: '/material/ma_type', + method: 'put', + data: data, + }) +} + +// 物资类型管理--新增 +export function addMaType(data) { + return request({ + url: '/material/ma_type', + method: 'post', + data: data, + }) +} + +// 工程项目-列表 +export function getProjectList(query) { + return request({ + url: '/material/base/bmProjectInfo/projectInfoAll', + method: 'get', + params: query + }) +} + diff --git a/src/api/ma/supplier.js b/src/api/ma/supplier.js new file mode 100644 index 00000000..95e5bc3d --- /dev/null +++ b/src/api/ma/supplier.js @@ -0,0 +1,58 @@ +import request from '@/utils/request' + +//机具类型管理列表信息 +export function getListFacturer(query) { + return request({ + url: '/material/ma_supplier_info/list', + method: 'get', + params: query, + }) +} + +//机具类型管理列表信息 +export function getManufacturerSelect(query) { + return request({ + url: '/material/ma_supplier_info/select', + method: 'get', + params: query, + }) +} + + +//查看机具类型管理列表详细信息 +export function getFacturerDetail(id) { + return request({ + url: '/material/ma_supplier_info/'+ id, + method: 'get', + }) +} + + +// 仓库管理--删除 +export function delFacturer(id) { + return request({ + url: '/material/ma_supplier_info/' + id, + method: 'delete', + }) +} + +// 仓库管理--修改 +export function editFacturer(data) { + return request({ + url: '/material/ma_supplier_info', + method: 'put', + data: data, + }) +} + +// 仓库管理--新增 +export function addFacturer(data) { + return request({ + url: '/material/ma_supplier_info', + method: 'post', + data: data, + }) +} + + + diff --git a/src/api/system/upload.js b/src/api/system/upload.js new file mode 100644 index 00000000..c8edd2e4 --- /dev/null +++ b/src/api/system/upload.js @@ -0,0 +1,75 @@ +import request from '@/utils/request' +//资源图片上传 +export function imgUpLoad(param){ + const formData = new FormData() + formData.append('file', param.file) + formData.append('fileType', param.type) + return request({ + url: '/system/sys/file/upload', + method: 'post', + data: formData, + header:'multipart/form-data' + }) + } + + export function imgUpLoadTwo(param){ + const formData = new FormData() + formData.append('file', param.file) + formData.append('fileType', param.type) + return request({ + url: '/file/upload', + method: 'post', + data: formData, + header:'multipart/form-data' + }) + } + + + +//资源文件上传 +export function fileUpLoad(param){ + const formData = new FormData() + formData.append('file', param.file) + return request({ + url: '/system/sys/file/upload', + method: 'post', + data: formData, + }) + } + +// excel文件上传 +export function excelUpLoad(param){ + const formData = new FormData() + formData.append('file', param.file) + return request({ + url: '/material/base/maPartType/readExcel', + method: 'post', + data: formData, + }) +} + +// excel文件下载 +export function downloadExcel(param){ + return request({ + url: '/material/base/maPartType/downLoad', + method: 'post', + param + }) +} + + + + + + + + + + + + + + + + + diff --git a/src/assets/file.png b/src/assets/file.png new file mode 100644 index 00000000..9289fcd3 Binary files /dev/null and b/src/assets/file.png differ diff --git a/src/views/material/basic/bmProject/index.vue b/src/views/material/basic/bmProject/index.vue index 8c6096b6..8d128996 100644 --- a/src/views/material/basic/bmProject/index.vue +++ b/src/views/material/basic/bmProject/index.vue @@ -102,15 +102,9 @@ - - - - - + @@ -384,6 +380,7 @@ import { getProjectList, getProjectListDetail, updateProject, + queryProDataApi, getProjectUserList, } from '@/api/basic/basic' import { unitTypeList,impUnitTypeList } from '@/api/basic/basic' @@ -434,6 +431,9 @@ export default { // 表单参数 form: {}, chosenData: {}, + proDataRange:[], + proStatusDataRange:[], + proNatureDataRange:[], // 表单校验 rules: { proName: [ @@ -486,9 +486,36 @@ export default { this.getType() // this.getDeptTree() this.getList() + this.getProjectType() }, methods: { - //获取工程类型 + + async getProjectType(){ + let prodataRes = await queryProDataApi('bm_project_type'); + this.proDataRange = prodataRes.data.map((item) => { + return { + label: item.dictLabel, + value: item.dictValue, + }; + }); + + let proStatusdataRes = await queryProDataApi('bm_project_status'); + this.proStatusDataRange = proStatusdataRes.data.map((item) => { + return { + label: item.dictLabel, + value: item.dictValue, + }; + }); + + let proNaturedataRes = await queryProDataApi('bm_project_nature'); + this.proNatureDataRange = proNaturedataRes.data.map((item) => { + return { + label: item.dictLabel, + value: item.dictValue, + }; + }); + }, + //获取实施单位 getType() { impUnitTypeList().then((response) => { let matTypeRes = response.data; diff --git a/src/views/material/basic/bmUnit/index.vue b/src/views/material/basic/bmUnit/index.vue index 0ff8f644..61113ddf 100644 --- a/src/views/material/basic/bmUnit/index.vue +++ b/src/views/material/basic/bmUnit/index.vue @@ -348,13 +348,26 @@ export default { //获取所属分公司类型 getTypeDept() { getDeptList().then((response) => { - let unitList = response.data - this.deptOptions = unitList.map((item) => { - return { + let unitList = response.data; + let result=[]; + unitList.forEach(item=>{ + const parts = item.ancestors.split(','); + if(parts.length==2){ + result.push({ label: item.deptName, value: item.deptId, - }; - }); + }); + } + }) + this.deptOptions=result + + // let unitList = response.data + // this.deptOptions = unitList.map((item) => { + // return { + // label: item.deptName, + // value: item.deptId, + // }; + // }); }) }, diff --git a/src/views/material/basic/bmUnit/people.vue b/src/views/material/basic/bmUnit/people.vue index 0ec4aaaa..c61155ef 100644 --- a/src/views/material/basic/bmUnit/people.vue +++ b/src/views/material/basic/bmUnit/people.vue @@ -19,6 +19,7 @@ :data="deptOptions" :expand-on-click-node="false" :filter-node-method="filterNode" + :render-content="renderConent" ref="tree" node-key="userId" default-expand-all @@ -506,6 +507,24 @@ export default { }, methods: { + renderConent(h, { node }) { + let iconClass = ''; + console.log('node',node) + // 根据 node 的类型判断图标 + if (node.level == 4) { + iconClass = 'el-icon-user-solid'; + } + // else if (node.type === 'file') { + // iconClass = 'el-icon-document'; + // } + + return ( + + {node.label} + + ); + s + }, /** 查询人员列表 */ getUserList() { getUserList({ userName: this.userName ,deptId:0}).then(response => { diff --git a/src/views/material/ma/supplier/index.vue b/src/views/material/ma/supplier/index.vue new file mode 100644 index 00000000..707c6bb1 --- /dev/null +++ b/src/views/material/ma/supplier/index.vue @@ -0,0 +1,655 @@ + + + + \ No newline at end of file diff --git a/src/views/material/ma/type/index.vue b/src/views/material/ma/type/index.vue new file mode 100644 index 00000000..38c9d611 --- /dev/null +++ b/src/views/material/ma/type/index.vue @@ -0,0 +1,1508 @@ + + + +