Merge branch 'master' of http://bore.pub:10439/r/ERP_override
| | |
| | | ConfirmPasswordCannotBeEmpty:'确认密码不能为空', |
| | | TheTwoPasswordsAreNotTheSame:'两次密码不相同', |
| | | OldPasswordError:'旧密码错误', |
| | | |
| | | userName:'用户名称', |
| | | changeUserName:'修改用户名称', |
| | | userNameCannotBeEmpty:'用户名称不能为空', |
| | | }, |
| | | orderBasicData:{ |
| | | order:'订单', |
| | |
| | | component: () => import('../views/system/userPassWord/UpdateUserPassWord.vue') |
| | | }, |
| | | { |
| | | path: 'updateUserName', |
| | | name: 'updateUserName', |
| | | component: () => import('../views/system/userPassWord/UpdateUserName.vue') |
| | | }, |
| | | { |
| | | name:'userPassWord', |
| | | path: '', |
| | | redirect:'/main/userPassWord/updateUserPassWord' |
| | | } |
| | | ] |
| | | }, |
| | | |
| | | |
| | | //sd模块 |
| | | { |
| | |
| | | { |
| | | path: 'printCustomLabel', |
| | | name: 'printCustomLabel', |
| | | component: () => import('../views/pp/processCard/PrintCustomLabel1.vue'), |
| | | component: () => import('../views/pp/processCard/PrintCustomLabel.vue'), |
| | | }, |
| | | { |
| | | path: 'printCustomLabelSemi', |
| | |
| | | { |
| | | path: 'printCustomLabelSemi2', |
| | | name: 'printCustomLabelSemi2', |
| | | component: () => import('../views/pp/processCard/PrintCustomLabelSemi.vue'), |
| | | component: () => import('../views/pp/processCard/PrintCustomLabelSemi2.vue'), |
| | | }, |
| | | { |
| | | path: 'printLabel1', |
| New file |
| | |
| | | <script setup lang="ts"> |
| | | import { reactive, ref } from 'vue' |
| | | import type { FormProps,FormInstance, FormRules } from 'element-plus' |
| | | import {ElMessage,ElMessageBox} from "element-plus"; |
| | | import request from "@/utils/request"; |
| | | import {Avatar, UserFilled} from "@element-plus/icons-vue"; |
| | | import useUserInfoStore from "@/stores/userInfo"; |
| | | import {useRoute, useRouter} from "vue-router"; |
| | | import {useI18n} from "vue-i18n"; |
| | | |
| | | const router = useRouter() |
| | | const route = useRoute() |
| | | const { t } = useI18n() |
| | | const userStore = useUserInfoStore() |
| | | //注册用户参数 |
| | | const register = reactive({ |
| | | userId: userStore.user.id, |
| | | userName: '' |
| | | }) |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | const submitForm = () => { |
| | | console.log(register.userName) |
| | | if(register.userName==""||register.userName==null){ |
| | | ElMessage.warning(t('user.userNameCannotBeEmpty')) |
| | | return |
| | | } |
| | | request.post('/user/updateUserName', register).then((res) => { |
| | | if (res.data === true) { |
| | | ElMessage.success(t('basicData.msg.saveSuccess')) |
| | | router.push("/login") |
| | | } else { |
| | | ElMessage.error(t('basicData.msg.saveFail')) |
| | | return false |
| | | } |
| | | }).catch(error => { |
| | | ElMessage.error(t('basicData.msg.ServerConnectionError')) |
| | | return false |
| | | }) |
| | | } |
| | | |
| | | </script> |
| | | |
| | | <template> |
| | | <div id="main-div"> |
| | | |
| | | <div id="register"> |
| | | <el-form |
| | | label-width="100px" |
| | | :model="register" |
| | | ref="ruleFormRef" |
| | | status-icon |
| | | :rules="rules" |
| | | > |
| | | <el-form-item :label="$t('user.userName')"> |
| | | <el-input type="text" v-model="register.userName" /> |
| | | </el-form-item> |
| | | |
| | | <el-form-item > |
| | | <el-button |
| | | type="primary" |
| | | @click="submitForm(ruleFormRef)" |
| | | >{{ $t('basicData.save') }} |
| | | </el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <style scoped> |
| | | #main-div{ |
| | | width: 1000px; |
| | | height: 600px; |
| | | margin: auto; |
| | | } |
| | | h2{ |
| | | text-align: center; |
| | | width: 100vw; |
| | | margin-top: 10vh; |
| | | } |
| | | #register{ |
| | | background-color: #FAFAFA; |
| | | width: 50vw; |
| | | height: 50vh; |
| | | border-radius: 12px; |
| | | box-shadow: 0 8px 16px 0 rgba(0,0,0,0), 0 6px 5px 0 rgba(0,0,0,0.19); |
| | | display:flex; |
| | | align-items:center; |
| | | justify-content:center; |
| | | min-height: 280px; |
| | | } |
| | | .el-form{ |
| | | max-width: 300px; |
| | | } |
| | | </style> |
| | |
| | | import {Avatar, UserFilled} from "@element-plus/icons-vue"; |
| | | import useUserInfoStore from "@/stores/userInfo"; |
| | | import {useRoute, useRouter} from "vue-router"; |
| | | import {useI18n} from "vue-i18n"; |
| | | |
| | | const router = useRouter() |
| | | const route = useRoute() |
| | | const { t } = useI18n() |
| | | const userStore = useUserInfoStore() |
| | | //注册用户参数 |
| | | const register = reactive({ |
| | |
| | | <div id="div-title"> |
| | | <el-breadcrumb :separator-icon="ArrowRight"> |
| | | <el-breadcrumb-item @click="changeRouter(1)" :class="indexFlag===1?'indexTag':''" :to="{ path: '/main/userPassWord/updateUserPassWord' }">{{$t('user.changePassword')}}</el-breadcrumb-item> |
| | | <el-breadcrumb-item @click="changeRouter(2)" :class="indexFlag===2?'indexTag':''" :to="{ path: '/main/userPassWord/updateUserName' }">{{$t('user.changeUserName')}}</el-breadcrumb-item> |
| | | <el-breadcrumb-item v-show="false" @click="changeRouter(2)" :class="indexFlag===2?'indexTag':''" :to="{ path: '/main/order/createOrder' }">{{$t('basicData.create')}}</el-breadcrumb-item> |
| | | </el-breadcrumb> |
| | | </div> |
| | |
| | | public Result updatePassWord(@RequestBody Map<String,Object> object){ |
| | | return Result.seccess( userService.updatePassWord(object)); |
| | | } |
| | | |
| | | @ApiOperation("修改用户名") |
| | | @PostMapping("/updateUserName") |
| | | public Result updateUserName(@RequestBody Map<String,Object> object){ |
| | | return Result.seccess( userService.updateUserName(object)); |
| | | } |
| | | } |
| | |
| | | Boolean userDelete(Integer id); |
| | | |
| | | Boolean updatePassWordById(Integer id,String passWord); |
| | | |
| | | Boolean updateUserNameById(Integer id,String userName); |
| | | } |
| | |
| | | |
| | | } |
| | | |
| | | @Transactional |
| | | public Boolean updateUserName(Map<String,Object> object) { |
| | | boolean saveState = false; |
| | | int userId =0; |
| | | String userName = ""; |
| | | if (object.get("userId") != null) { |
| | | userId = Integer.parseInt(object.get("userId").toString()); |
| | | } |
| | | if (object.get("userName") != null) { |
| | | userName = object.get("userName").toString(); |
| | | } |
| | | |
| | | if (userMapper.updateUserNameById(userId,userName)){ |
| | | saveState = true; |
| | | } |
| | | return saveState; |
| | | |
| | | } |
| | | |
| | | /*----------------新版本登陆*/ |
| | | public UserDTO doLogin(UserDTO userDTO) { |
| | | User user = userMapper.selectOne(new QueryWrapper<User>(). |
| | |
| | | set password=#{passWord},update_time=now() |
| | | where id=#{id} |
| | | </update> |
| | | |
| | | <update id="updateUserNameById"> |
| | | update erp_user_info.user |
| | | set user_name=#{userName},update_time=now() |
| | | where id=#{id} |
| | | </update> |
| | | </mapper> |