From 3c1f9d699497dcfc4b682502945a4ebee4c37e03 Mon Sep 17 00:00:00 2001
From: huang <1532065656@qq.com>
Date: 星期五, 27 十二月 2024 16:54:45 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10105/r/ERP_override
---
north-glass-erp/northglass-erp/src/views/system/user/UserList.vue | 65 +++++++++++++++++++++++++++++++-
north-glass-erp/src/main/java/com/example/erp/mapper/userInfo/UserMapper.java | 2 +
north-glass-erp/src/main/java/com/example/erp/controller/userInfo/UserInfoController.java | 14 +++++++
north-glass-erp/northglass-erp/src/lang/zh.js | 1
north-glass-erp/src/main/resources/mapper/userInfo/User.xml | 6 +++
north-glass-erp/src/main/java/com/example/erp/service/userInfo/UserService.java | 15 +++++++
6 files changed, 100 insertions(+), 3 deletions(-)
diff --git a/north-glass-erp/northglass-erp/src/lang/zh.js b/north-glass-erp/northglass-erp/src/lang/zh.js
index 0125091..db170ee 100644
--- a/north-glass-erp/northglass-erp/src/lang/zh.js
+++ b/north-glass-erp/northglass-erp/src/lang/zh.js
@@ -818,6 +818,7 @@
userId:'鐢ㄦ埛ID',
user:'鐢ㄦ埛',
setUpRoles:'璁剧疆瑙掕壊',
+ setProcess:'璁剧疆宸ュ簭',
changePassword:'淇敼瀵嗙爜',
OldPassword:'鏃у瘑鐮�',
TheNewPassword:'鏂板瘑鐮�',
diff --git a/north-glass-erp/northglass-erp/src/views/system/user/UserList.vue b/north-glass-erp/northglass-erp/src/views/system/user/UserList.vue
index c95d374..03a0511 100644
--- a/north-glass-erp/northglass-erp/src/views/system/user/UserList.vue
+++ b/north-glass-erp/northglass-erp/src/views/system/user/UserList.vue
@@ -9,10 +9,17 @@
const router = useRouter()
const route = useRoute()
const dialogVisible = ref(false)
+const dialogVisibleProcess = ref(false)
let roleList = ref([])
+//宸ュ簭
+const processValue = ref()
let userRole= ref({
userId:'',
roles:[]
+})
+let processRow = ref({
+ process: null,
+ userId:null
})
const xGrid = ref()
const gridOptions = reactive({
@@ -58,11 +65,11 @@
},
})
onBeforeMount(()=>{
- let columns = [{title: t('basicData.operate'), width: 133, slots: { default: 'button_slot' }}]
+ let columns = [{title: t('basicData.operate'), width: 213, slots: { default: 'button_slot' }}]
const columnName = {
loginName: t('user.userId'),
userName:t('user.user'),
- // address:'鍦板潃',
+ address:t('report.workingProcedure'),
// phone:'鐢佃瘽',
role:t('role.role'),
createTime:t('basicData.creationTime')
@@ -81,6 +88,7 @@
})
onMounted(()=>{
+ selectProcess();
request.get('/userInfo/findAll').then(res=>{
let arr = res.data.users[0]
arr.forEach(item=>{
@@ -90,6 +98,7 @@
gridOptions.data = res.data.users[0]
roleList.value = res.data.role[0]
})
+
})
const getTableRow = (row,type) => {
@@ -114,6 +123,11 @@
})
break
}
+ case 'editProcess': {
+ dialogVisibleProcess.value = true
+ processRow.value.userId = row.id
+ break
+ }
}
}
@@ -121,6 +135,12 @@
const handleClose = (done) => {
userRole.value.roles = []
done()
+}
+
+const selectProcess = () => {
+ request.post('userInfo/selectProcess').then(res=>{
+ processRow.value.process=res.data.process
+ })
}
const roleUpdate = () => {
@@ -133,6 +153,23 @@
})
dialogVisible.value = false
+}
+
+const updateProcess = () => {
+ let userId=processRow.value.userId
+ if (processValue.value!=null){
+ request.post(`userInfo/updateProcess/${userId}/${processValue.value}`).then(res=>{
+ if(res.code==200 && res.data===true){
+ ElMessage.success(t('basicData.msg.saveSuccess'))
+ router.push({path:'/main/user/userList',query:{random:Math.random()}})
+ }
+
+ })
+ dialogVisible.value = false
+ }else {
+ ElMessage.warning(t('report.pleaseSelectAProcessFirst'))
+ }
+
}
@@ -162,6 +199,7 @@
<template #button_slot="{ row }">
<el-button @click="getTableRow(row,'edit')" link type="primary" size="small">{{ $t('user.setUpRoles') }}</el-button>
+ <el-button @click="getTableRow(row,'editProcess')" link type="primary" size="small">{{ $t('user.setProcess') }}</el-button>
<el-popconfirm @confirm="getTableRow(row,'delete')" :title="$t('searchOrder.deleteConfirm')">
<template #reference>
<el-button link type="primary" size="small">{{ $t('basicData.delete') }}</el-button>
@@ -193,6 +231,29 @@
</span>
</template>
</el-dialog>
+ <el-dialog
+ v-model="dialogVisibleProcess"
+ :title="$t('user.roleSelection')"
+ width="30%"
+ :before-close="handleClose"
+ >
+ <el-select v-model="processValue" clearable :placeholder="$t('reportingWorks.selectProcess')" default-value="default_city" style="width: 120px">
+ <el-option
+ v-for="item in processRow['process']"
+ :key="item.id"
+ :label="item.basic_name"
+ :value="item.basic_name"
+ />
+ </el-select>
+ <template #footer>
+ <span class="dialog-footer">
+ <el-button @click="dialogVisibleProcess = false">{{ $t('basicData.cancelButtonText') }}</el-button>
+ <el-button type="primary" @click="updateProcess">
+ {{ $t('basicData.confirmButtonText') }}
+ </el-button>
+ </span>
+ </template>
+ </el-dialog>
</div>
</template>
diff --git a/north-glass-erp/src/main/java/com/example/erp/controller/userInfo/UserInfoController.java b/north-glass-erp/src/main/java/com/example/erp/controller/userInfo/UserInfoController.java
index 9e2efd8..e175ff1 100644
--- a/north-glass-erp/src/main/java/com/example/erp/controller/userInfo/UserInfoController.java
+++ b/north-glass-erp/src/main/java/com/example/erp/controller/userInfo/UserInfoController.java
@@ -61,4 +61,18 @@
public Result findAll(){
return Result.seccess(userService.findAll());
}
+
+ @ApiOperation("鏌ヨ鎵�鏈夊伐搴�")
+ @SaCheckPermission("userList.search")
+ @PostMapping("selectProcess")
+ public Result selectProcess(){
+ return Result.seccess(userService.selectProcessSv());
+ }
+
+ @ApiOperation("淇敼鐢ㄦ埛宸ュ簭")
+ @SaCheckPermission("userList.search")
+ @PostMapping("updateProcess/{id}/{process}")
+ public Result updateProcess(@PathVariable Integer id,@PathVariable String process){
+ return Result.seccess(userService.updateProcessSv(id,process));
+ }
}
diff --git a/north-glass-erp/src/main/java/com/example/erp/mapper/userInfo/UserMapper.java b/north-glass-erp/src/main/java/com/example/erp/mapper/userInfo/UserMapper.java
index 3a87237..704a6cf 100644
--- a/north-glass-erp/src/main/java/com/example/erp/mapper/userInfo/UserMapper.java
+++ b/north-glass-erp/src/main/java/com/example/erp/mapper/userInfo/UserMapper.java
@@ -36,4 +36,6 @@
Boolean updatePassWordById(Integer id,String passWord);
Boolean updateUserNameById(Integer id,String userName);
+
+ Boolean updateProcessMp(Integer id, String process);
}
diff --git a/north-glass-erp/src/main/java/com/example/erp/service/userInfo/UserService.java b/north-glass-erp/src/main/java/com/example/erp/service/userInfo/UserService.java
index e5d3c54..a035b9c 100644
--- a/north-glass-erp/src/main/java/com/example/erp/service/userInfo/UserService.java
+++ b/north-glass-erp/src/main/java/com/example/erp/service/userInfo/UserService.java
@@ -9,6 +9,7 @@
import com.example.erp.entity.userInfo.Role;
import com.example.erp.entity.userInfo.SysError;
import com.example.erp.entity.userInfo.User;
+import com.example.erp.mapper.pp.ProductionSchedulingMapper;
import com.example.erp.mapper.userInfo.*;
import com.example.erp.tools.TokenTools;
import org.springframework.beans.factory.annotation.Autowired;
@@ -32,12 +33,14 @@
private final UserRoleMapper userRoleMapper;
private final PermissionRoleMapper permissionRoleMapper;
+ private final ProductionSchedulingMapper productionSchedulingMapper;
- public UserService(UserMapper userMapper, RoleMapper roleMapper, PermissionRoleMapper permissionRoleMapper, UserRoleMapper userRoleMapper) {
+ public UserService(UserMapper userMapper, RoleMapper roleMapper, PermissionRoleMapper permissionRoleMapper, UserRoleMapper userRoleMapper, ProductionSchedulingMapper productionSchedulingMapper) {
this.userMapper = userMapper;
this.roleMapper = roleMapper;
this.permissionRoleMapper = permissionRoleMapper;
this.userRoleMapper = userRoleMapper;
+ this.productionSchedulingMapper = productionSchedulingMapper;
}
@@ -183,5 +186,15 @@
return userMapper.userDelete(id);
}
+
+ public Map<String, Object> selectProcessSv() {
+ Map<String, Object> map = new HashMap<>();
+ map.put("process", productionSchedulingMapper.selectProcess());
+ return map;
+ }
+
+ public Boolean updateProcessSv(Integer id, String process) {
+ return userMapper.updateProcessMp(id,process);
+ }
}
diff --git a/north-glass-erp/src/main/resources/mapper/userInfo/User.xml b/north-glass-erp/src/main/resources/mapper/userInfo/User.xml
index a593cf5..7029b59 100644
--- a/north-glass-erp/src/main/resources/mapper/userInfo/User.xml
+++ b/north-glass-erp/src/main/resources/mapper/userInfo/User.xml
@@ -7,6 +7,7 @@
<id property="id" column="id"/>
<result property="loginName" column="login_name"/>
<result property="userName" column="user_name"/>
+ <result property="address" column="address"/>
<result property="createTime" column="create_time"/>
<collection property="userRoleList" ofType="com.example.erp.entity.userInfo.UserRole">
@@ -84,4 +85,9 @@
set user_name=#{userName},update_time=now()
where id=#{id}
</update>
+ <update id="updateProcessMp">
+ update erp_user_info.user
+ set address=#{process},update_time=now()
+ where id=#{id}
+ </update>
</mapper>
\ No newline at end of file
--
Gitblit v1.8.0