diff --git a/.env.development b/.env.development index d3346e78..a302e53c 100644 --- a/.env.development +++ b/.env.development @@ -1,10 +1,10 @@ # 页面标题 -VUE_APP_TITLE = 材料站材料库存管理系统 +VUE_APP_TITLE = 智慧材料站管理系统 # 开发环境配置 ENV = 'development' -# 材料站材料库存管理系统/开发环境 +# 智慧材料站管理系统/开发环境 VUE_APP_BASE_API = '/dev-api' # 路由懒加载 diff --git a/.env.production b/.env.production index e4773b1c..222d0179 100644 --- a/.env.production +++ b/.env.production @@ -1,10 +1,10 @@ # 页面标题 -VUE_APP_TITLE = 材料站材料库存管理系统 +VUE_APP_TITLE = 智慧材料站管理系统 # 生产环境配置 ENV = 'production' -# 材料站材料库存管理系统/生产环境-公司 +# 智慧材料站管理系统/生产环境-公司 # VUE_APP_BASE_API = '/prod-api' -# 材料站材料库存管理系统/宏源环境 +# 智慧材料站管理系统/宏源环境 VUE_APP_BASE_API = '/iws/clz-api' diff --git a/.env.staging b/.env.staging index 1e06484b..9590e54f 100644 --- a/.env.staging +++ b/.env.staging @@ -1,10 +1,10 @@ # 页面标题 -VUE_APP_TITLE = 材料站材料库存管理系统 +VUE_APP_TITLE = 智慧材料站管理系统 NODE_ENV = production # 测试环境配置 ENV = 'staging' -# 材料站材料库存管理系统/测试环境 +# 智慧材料站管理系统/测试环境 VUE_APP_BASE_API = '/stage-api' diff --git a/package.json b/package.json index c34c35da..48d0442f 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "bonus", "version": "3.6.4", - "description": "材料站材料库存管理系统", + "description": "智慧材料站管理系统", "author": "博诺思", "license": "MIT", "scripts": { diff --git a/src/api/lease/apply.js b/src/api/lease/apply.js index 19789ae6..9f00bb03 100644 --- a/src/api/lease/apply.js +++ b/src/api/lease/apply.js @@ -160,4 +160,40 @@ export function submitLeaseOutApi(data) { method: 'post', data }) +} + +// 根据用户名查询用户信息 +export function getUserInfoByUserNameApi(data) { + return request({ + url: '/material/app/iwsTeamUser/selectUserInfoByUserName', + method: 'get', + params: data + }) +} + +// 根据身份证号查询用户信息 +export function getUserInfoByIdCardApi(data) { + return request({ + url: '/material/app/iwsTeamUser/selectProjectTeamInfoByIdCard', + method: 'get', + params: data + }) +} + +// 更新班组工程信息 +export function updateTeamProjectApi(data) { + return request({ + url: '/material/app/iwsTeamUser/updateTeamProject', + method: 'post', + data + }) +} + +// 获取工程ids +export function getProjectInfoApi(data) { + return request({ + url: '/material/select/getProjectInfo', + method: 'post', + data + }) } \ No newline at end of file diff --git a/src/views/index.vue b/src/views/index.vue index 15a1ad56..5aa55674 100644 --- a/src/views/index.vue +++ b/src/views/index.vue @@ -1,172 +1,625 @@ - - diff --git a/src/views/index_old.vue b/src/views/index_old.vue new file mode 100644 index 00000000..13c79738 --- /dev/null +++ b/src/views/index_old.vue @@ -0,0 +1,172 @@ + + + + + + diff --git a/src/views/login.vue b/src/views/login.vue index a5d7a89b..dc1981f5 100644 --- a/src/views/login.vue +++ b/src/views/login.vue @@ -1,7 +1,7 @@ @@ -323,7 +334,9 @@ export default { }, maForm: { teamId: undefined, + teamName: '', projectId: undefined, + projectName: '', arrivalTime: '', purchaser: '', remark: '', @@ -354,13 +367,13 @@ export default { trigger: 'blur' } ], - leasePerson: [ - { - required: true, - message: '请输入班组长', - trigger: 'blur' - } - ], + // leasePerson: [ + // { + // required: true, + // message: '请输入班组长', + // trigger: 'blur' + // } + // ], phone: [ // { required: true, message: '联系电话不能为空', trigger: 'blur' }, { @@ -431,13 +444,15 @@ export default { } }, mounted() { - this.projectInfoList() //单位工程下拉选 + // this.projectInfoList() //单位工程下拉选 this.getStandardConfigListApi() //标准配置下拉选 if (this.isEdit) { console.log('isEdit', this.isEdit) this.taskId = this.editTaskId this.id = this.editId this.getTaskInfo() + } else { + this.getBmTeam() } }, watch: { @@ -475,22 +490,39 @@ export default { children: node.children } }, + // 获取班组 + async getBmTeam() { + try { + const teamLeaderIdCard = sessionStorage.getItem('idCard') + const res = await getBmTeamApi({ isAll: 0, teamLeaderIdCard }) + if (!res.data || res.data.length === 0) return + this.uniteList = res.data + this.maForm.teamId = res.data[0].id + this.maForm.teamName = res.data[0].teamName + this.maForm.leasePerson = res.data[0].relName + this.projectInfoList() + } catch (error) { + console.log('🚀 ~ getBmTeam ~ error:', error) + } + }, + changeTeam(e) { + console.log('🚀 ~ changeTeam ~ e:', e) + this.maForm.projectId = null + this.maForm.projectName = null + // 查找对应的teamName + const team = this.uniteList.find(item => item.id === e) + this.maForm.teamName = team ? team.teamName : '' + this.maForm.leasePerson = team ? team.relName : '' + console.log('🚀 ~ changeTeam ~ this.maForm.teamName:', this.maForm.teamName) + this.projectInfoList() + }, /** 租赁单位和工程-下拉选 */ - projectInfoList() { - if (!this.isEdit) { - getBmTeamApi({ isAll: 0 }).then(response => { - this.uniteList = response.data - }) - getListProject({ unitId: null }).then(response => { - this.projectList = response.data - }) - } else { - getBmTeamApi({ isAll: 0 }).then(response => { - this.uniteList = response.data - }) - getListProject({ unitId: null }).then(response => { - this.projectList = response.data - }) + async projectInfoList() { + try { + const res = await getListProject({ unitId: null, isApp: true, teamName: this.maForm.teamName }) + this.projectList = res.data + } catch (error) { + console.log('🚀 ~ projectInfoList ~ error:', error) } }, /** 机具类型 */ @@ -581,7 +613,8 @@ export default { ...typeData, preNum: 0, outNum: 0, - parentId: this.parentId + parentId: this.parentId, + maCodeList: [] }) this.deviceType.push(lastSelected) this.$message({ @@ -699,7 +732,10 @@ export default { if (this.equipmentList[i].outNum > this.equipmentList[i].storageNum) { this.$message.error(`第 ${i + 1} 行的 ${'出库数量不可大于库存量'} `) return - } else if (this.equipmentList[i].outNum == 0) { + } else if ( + this.equipmentList[i].outNum == 0 || + (this.equipmentList[i].manageType == 0 && this.equipmentList[i].maCodeList.length == 0) + ) { this.$message.error(`第 ${i + 1} 行 ${'请输入出库数量'} `) return } diff --git a/src/views/material/lease/outBound/component/homeApply.vue b/src/views/material/lease/outBound/component/homeApply.vue index 98054e9f..f55a7988 100644 --- a/src/views/material/lease/outBound/component/homeApply.vue +++ b/src/views/material/lease/outBound/component/homeApply.vue @@ -99,7 +99,7 @@ v-if="scope.row.taskStatus == 1" v-hasPermi="['purchase:info:edit']" > - 编辑 + 出库 领料单 diff --git a/src/views/register.vue b/src/views/register.vue index 6747bbd7..00f5bc2b 100644 --- a/src/views/register.vue +++ b/src/views/register.vue @@ -1,7 +1,7 @@