From 0ca0656f4d185a8a0586a42fb99966d83be02976 Mon Sep 17 00:00:00 2001 From: cun-nan <19819293608@163.com> Date: Thu, 24 Oct 2024 15:39:10 +0800 Subject: [PATCH] 10.24 --- fuintAdmin/src/api/system/account.js | 4 +-- fuintAdmin/src/layout/components/Navbar.vue | 5 ++-- fuintAdmin/src/store/getters.js | 1 + fuintAdmin/src/store/modules/user.js | 6 ++++- fuintAdmin/src/views/order/order_Added.vue | 22 +++------------- fuintAdmin/src/views/order/order_Goods.vue | 15 +++-------- fuintAdmin/src/views/order/order_Oil.vue | 17 ++++-------- fuintAdmin/src/views/order/order_Vip.vue | 14 +++------- fuintAdmin/src/views/staff/list.vue | 13 ++++++---- .../fuint/business/member/entity/LJStaff.java | 3 +++ .../member/mapper/xml/LJStaffMapper.xml | 2 +- .../fuint/business/order/entity/OilOrder.java | 2 ++ .../order/mapper/xml/OilOrderMapper.xml | 26 +++++++++---------- .../mapper/xml/PrintDeviceInfoMapper.xml | 1 + 14 files changed, 56 insertions(+), 75 deletions(-) diff --git a/fuintAdmin/src/api/system/account.js b/fuintAdmin/src/api/system/account.js index 58201356a..93fdc1eaf 100644 --- a/fuintAdmin/src/api/system/account.js +++ b/fuintAdmin/src/api/system/account.js @@ -45,9 +45,9 @@ export function delAccount(userId) { } // 用户密码重置 -export function resetAccountPwd(userId, password) { +export function resetAccountPwd(acctId, password) { const data = { - userId, + acctId, password } return request({ diff --git a/fuintAdmin/src/layout/components/Navbar.vue b/fuintAdmin/src/layout/components/Navbar.vue index 80e3e8c25..93248e721 100644 --- a/fuintAdmin/src/layout/components/Navbar.vue +++ b/fuintAdmin/src/layout/components/Navbar.vue @@ -45,7 +45,7 @@
- 系统管理员 + {{ roleName }} {{ name }} @@ -190,7 +190,8 @@ export default { 'sidebar', 'avatar', 'name', - 'device' + 'device', + 'roleName' ]), setting: { get() { diff --git a/fuintAdmin/src/store/getters.js b/fuintAdmin/src/store/getters.js index 4b5a68df6..3a02c100b 100644 --- a/fuintAdmin/src/store/getters.js +++ b/fuintAdmin/src/store/getters.js @@ -7,6 +7,7 @@ const getters = { token: state => state.user.token, avatar: state => state.user.avatar, name: state => state.user.name, + roleName: state => state.user.roleName, introduction: state => state.user.introduction, roles: state => state.user.roles, permissions: state => state.user.permissions, diff --git a/fuintAdmin/src/store/modules/user.js b/fuintAdmin/src/store/modules/user.js index 354cc2477..0637c90fc 100644 --- a/fuintAdmin/src/store/modules/user.js +++ b/fuintAdmin/src/store/modules/user.js @@ -22,6 +22,9 @@ const user = { SET_NAME: (state, name) => { state.name = name }, + SET_ROLE_NAME: (state, roleName) => { + state.roleName = roleName + }, SET_AVATAR: (state, avatar) => { state.avatar = avatar }, @@ -105,7 +108,7 @@ const user = { GetInfo({ commit, state }) { return new Promise((resolve, reject) => { getInfo().then(res => { - console.log("22222223") + console.log("22222223",res.data.accountInfo) const user = res.data.accountInfo const avatar = (user.avatar == "" || user.avatar == null) ? require("@/assets/images/avatar.png") : process.env.VUE_APP_BASE_API + user.avatar; @@ -116,6 +119,7 @@ const user = { commit('SET_ROLES', ['ROLE_DEFAULT']) } commit('SET_NAME', user.accountName) + commit('SET_ROLE_NAME', user.roleName) commit('SET_AVATAR', avatar) commit('SET_MERCHANT_ID', user.merchantId) commit('SET_MERCHANT_NAME', user.merchantName) diff --git a/fuintAdmin/src/views/order/order_Added.vue b/fuintAdmin/src/views/order/order_Added.vue index 954c17cae..d04e5a0fe 100644 --- a/fuintAdmin/src/views/order/order_Added.vue +++ b/fuintAdmin/src/views/order/order_Added.vue @@ -139,15 +139,13 @@
- - + @pagination="getList" + />
@@ -376,19 +374,7 @@ export default { handleClose(done) { done(); }, - getList(val) { - if (val != undefined) { - this.queryParams.page = val - } - - let dateRange1 = this.dateRange - // let dateRange = [] - // if (this.isSysDate){ - // dateRange.push(dateRange1[0].toLocaleDateString()) - // dateRange.push(dateRange1[1].toLocaleDateString()) - // }else { - // dateRange = this.dateRange - // } + getList() { let dateRange = [] if (this.beginTime && this.endTime) { dateRange.push(this.beginTime.toLocaleDateString()) diff --git a/fuintAdmin/src/views/order/order_Goods.vue b/fuintAdmin/src/views/order/order_Goods.vue index edccd9051..d567e9558 100644 --- a/fuintAdmin/src/views/order/order_Goods.vue +++ b/fuintAdmin/src/views/order/order_Goods.vue @@ -168,15 +168,13 @@
- - + @pagination="getList" + />
@@ -469,12 +467,7 @@ export default { }) }, // 查询订单 - getList(val) { - if (val != undefined) { - this.queryParams.page = val - } - - let dateRange1 = this.dateRange + getList() { // let dateRange = [] // if (this.isSysDate){ // dateRange.push(dateRange1[0].toLocaleDateString()) diff --git a/fuintAdmin/src/views/order/order_Oil.vue b/fuintAdmin/src/views/order/order_Oil.vue index 832cec528..1eb7334c4 100644 --- a/fuintAdmin/src/views/order/order_Oil.vue +++ b/fuintAdmin/src/views/order/order_Oil.vue @@ -166,7 +166,7 @@ {{scope.row.remark || "--"}} - + @@ -194,15 +194,13 @@
- - + @pagination="getList" + />
@@ -606,12 +604,7 @@ return name; }, // 获取订单列表信息 - getList(val){ - if (val!=undefined){ - this.queryParams.page = val - } - - let dateRange1 = this.dateRange + getList(){ // let dateRange = [] // if (this.isSysDate){ // dateRange.push(dateRange1[0].toLocaleDateString()) diff --git a/fuintAdmin/src/views/order/order_Vip.vue b/fuintAdmin/src/views/order/order_Vip.vue index 7eba493fa..189ca2432 100644 --- a/fuintAdmin/src/views/order/order_Vip.vue +++ b/fuintAdmin/src/views/order/order_Vip.vue @@ -114,15 +114,13 @@
- - + @pagination="getList" + />
@@ -371,12 +369,8 @@ export default { this.handleQuery(); }, // 获取列表信息 - getList(val) { - if (val != undefined) { - this.queryParams.pageNo = val - } + getList() { - let dateRange1 = this.dateRange // let dateRange = [] // if (this.isSysDate){ // dateRange.push(dateRange1[0].toLocaleDateString()) diff --git a/fuintAdmin/src/views/staff/list.vue b/fuintAdmin/src/views/staff/list.vue index 39cc42cc8..f3e7baa7e 100644 --- a/fuintAdmin/src/views/staff/list.vue +++ b/fuintAdmin/src/views/staff/list.vue @@ -313,6 +313,7 @@ import html2canvas from "html2canvas"; import {getDicts} from "@/api/order/data"; import {dutyList} from "@/api/duty/duty"; import {selectStoreListByDeptId} from "../../api/staff/store"; +import {resetAccountPwd} from "@/api/system/account"; export default { name: "StaffList", @@ -844,12 +845,14 @@ export default { this.$prompt('请输入重置后的密码', '提示', { confirmButtonText: '确定', cancelButtonText: '取消', - + closeOnClickModal: false, + inputPattern: /^.{5,20}$/, + inputErrorMessage: "用户密码长度必须介于 5 和 20 之间" }).then(({ value }) => { - this.$message({ - type: 'success', - message: '你的密码是: ' + value - }); + resetAccountPwd(row.acctId,value).then(res => { + this.$modal.msgSuccess("修改成功,新密码是:" + value); + console.log(res,854) + }) }).catch(() => { this.$message({ type: 'info', diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/member/entity/LJStaff.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/member/entity/LJStaff.java index 465ce3de2..1d491a014 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/member/entity/LJStaff.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/member/entity/LJStaff.java @@ -131,6 +131,9 @@ public class LJStaff extends BaseEntity implements Serializable { //码牌绑定状态 0:未绑定 1:已绑定 @TableField(exist = false) private String tagStatus; +// 登录账号id + @TableField(exist = false) + private Integer acctId; // 登录账号 @TableField(exist = false) private String accountName; diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/member/mapper/xml/LJStaffMapper.xml b/fuintBackend/fuint-application/src/main/java/com/fuint/business/member/mapper/xml/LJStaffMapper.xml index b76600dbc..5be6d7190 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/member/mapper/xml/LJStaffMapper.xml +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/member/mapper/xml/LJStaffMapper.xml @@ -6,7 +6,7 @@ - + select oo.*,ms.real_name from oil_order oo LEFT JOIN mt_staff ms ON oo.staff_id = ms.id - store_id = #{order.storeId} + oo.store_id = #{order.storeId} - and user_id = #{order.userId} + and oo.user_id = #{order.userId} - and staff_id = #{order.staffId} + and oo.staff_id = #{order.staffId} - and terminal = #{order.terminal} + and oo.terminal = #{order.terminal} - and oils = #{order.oils} + and oo.oils = #{order.oils} - and oil_gun_num = #{order.oilGunNum} + and oo.oil_gun_num = #{order.oilGunNum} - and pay_type = #{order.payType} + and oo.pay_type = #{order.payType} - and order_status = #{order.orderStatus} + and oo.order_status = #{order.orderStatus} - and order_no like concat('%', #{order.orderNo}, '%') + and oo.order_no like concat('%', #{order.orderNo}, '%') - and pay_user like concat('%', #{order.payUser}, '%') + and oo.pay_user like concat('%', #{order.payUser}, '%') - and date_format(create_time,'%y%m%d') >= date_format(#{order.params.beginTime},'%y%m%d') + and date_format(oo.create_time,'%y%m%d') >= date_format(#{order.params.beginTime},'%y%m%d') - and date_format(create_time,'%y%m%d') <= date_format(#{order.params.endTime},'%y%m%d') + and date_format(oo.create_time,'%y%m%d') <= date_format(#{order.params.endTime},'%y%m%d') order by create_time desc diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/printer/mapper/xml/PrintDeviceInfoMapper.xml b/fuintBackend/fuint-application/src/main/java/com/fuint/business/printer/mapper/xml/PrintDeviceInfoMapper.xml index f1cdef9ea..08eb60f5b 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/printer/mapper/xml/PrintDeviceInfoMapper.xml +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/printer/mapper/xml/PrintDeviceInfoMapper.xml @@ -69,6 +69,7 @@ and store_id = #{printDeviceInfo.storeId} + order by create_time desc