From 9c8c32ccee10583ff0b74e372112ac02400febea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A2=A8=E5=A4=A7=E5=8F=94?= <494979559@qq.com> Date: Mon, 14 Oct 2024 18:03:44 +0800 Subject: [PATCH] =?UTF-8?q?=E5=95=86=E6=88=B7=E6=9F=A5=E7=9C=8B=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E6=89=8B=E6=9C=BA=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/GroupTitle/index.vue | 25 +++ src/views/system/recharge/detail.vue | 19 +- .../smUser/components/UserConfigDialog.vue | 175 ++++++++++++++++++ src/views/system/smUser/detail.vue | 29 ++- src/views/system/smUser/index.vue | 88 ++++----- 5 files changed, 274 insertions(+), 62 deletions(-) create mode 100644 src/components/GroupTitle/index.vue create mode 100644 src/views/system/smUser/components/UserConfigDialog.vue diff --git a/src/components/GroupTitle/index.vue b/src/components/GroupTitle/index.vue new file mode 100644 index 0000000..8bb93e1 --- /dev/null +++ b/src/components/GroupTitle/index.vue @@ -0,0 +1,25 @@ + + {{title}} + + + + + diff --git a/src/views/system/recharge/detail.vue b/src/views/system/recharge/detail.vue index 4ee6f1a..de53ce2 100644 --- a/src/views/system/recharge/detail.vue +++ b/src/views/system/recharge/detail.vue @@ -154,6 +154,13 @@ {{detail.mchMobile | defaultValue}} {{detail.storeName | defaultValue}} {{detail.storeAddress | defaultValue}} + + + + {{detail.mchShowMobilePrice | money | defaultValue}} 元 + + + @@ -194,7 +201,17 @@ export default { name: 'Recharge/:billId', mixins: [$recharge], components: { BooleanTag, RefundDialog, Bonus, PayBill, UserLink, DeviceLink, Refund }, - dicts: ['channel_type','sm_transaction_bill_status', 'sm_transaction_bill_device_recharge_status', 'time_unit', 'suit_fee_mode', 'suit_fee_type', 'recharge_close_status', 'device_service_mode'], + dicts: [ + 'channel_type', + 'sm_transaction_bill_status', + 'sm_transaction_bill_device_recharge_status', + 'time_unit', + 'suit_fee_mode', + 'suit_fee_type', + 'recharge_close_status', + 'device_service_mode', + 'recharge_mch_show_mobile_status' + ], computed: { DeviceServiceMode() { return DeviceServiceMode diff --git a/src/views/system/smUser/components/UserConfigDialog.vue b/src/views/system/smUser/components/UserConfigDialog.vue new file mode 100644 index 0000000..7d5131f --- /dev/null +++ b/src/views/system/smUser/components/UserConfigDialog.vue @@ -0,0 +1,175 @@ + + + + + + {{form.realOrUserName | defaultValue}} + + + + + + + + + + 元 / 单 + + + + + + + + + 小时 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/system/smUser/detail.vue b/src/views/system/smUser/detail.vue index 06033f8..585b5c5 100644 --- a/src/views/system/smUser/detail.vue +++ b/src/views/system/smUser/detail.vue @@ -3,13 +3,22 @@ - + + + + 用户详情 + + 用户配置 + + + + {{userData.nickName}} - 商户 + {{userData.phonenumber}} @@ -102,6 +111,10 @@ + + + + @@ -122,13 +135,18 @@ import Recharge from '@/views/system/recharge/index.vue' import BooleanTag from '@/components/BooleanTag/index.vue' import Withdraw from '@/views/system/withdraw/index.vue' import RealName from '@/views/ss/realName/index.vue' +import UserConfigDialog from '@/views/system/smUser/components/UserConfigDialog.vue' +import { SmUserType } from '@/utils/constants' export default { name: 'User/:userId', mixins: [$view, $serviceType], - components: { RealName, Withdraw, BooleanTag, Recharge, Device, Suit, Account, RecordBalance, Store, Access, UserRechargeReport, UserAccount, UserDevice, LineChart}, + components: { UserConfigDialog, RealName, Withdraw, BooleanTag, Recharge, Device, Suit, Account, RecordBalance, Store, Access, UserRechargeReport, UserAccount, UserDevice, LineChart}, dicts: ['sm_user_type', 'service_type', 'withdraw_service_type'], computed: { + SmUserType() { + return SmUserType + }, serviceUnit() { return (type) => { return type === '2' ? '元' : '%'; @@ -139,13 +157,14 @@ export default { return { userData: {}, loading: false, + showConfigDialog: false, } }, created() { - this.initData(); + this.getDetail(); }, methods: { - initData() { + getDetail() { this.loading = true; getSmUser(this.$route.params.userId).then(response => { this.userData = response.data; diff --git a/src/views/system/smUser/index.vue b/src/views/system/smUser/index.vue index 951d049..e410bb5 100644 --- a/src/views/system/smUser/index.vue +++ b/src/views/system/smUser/index.vue @@ -151,7 +151,7 @@ - + 详情 - 重置服务费 删除 + 重置服务费 + 配置 @@ -194,7 +201,7 @@ /> - + @@ -208,9 +215,6 @@ - - - @@ -218,7 +222,9 @@ - + + + % @@ -228,7 +234,7 @@ % - + @@ -246,32 +252,6 @@ - - - 小时 - - - - - - - - - - - - - - - - - - - - - - - + + + + @@ -289,12 +273,12 @@ import { addSmUser, updateSmUser, delSmUser, - updateServiceRate, resetSmUserService } from '@/api/system/smUser' import { $serviceType, $showColumns, $withdrawServiceType } from '@/utils/mixins' import UserLink from '@/components/Business/SmUser/UserLink.vue' import { SmUserType } from '@/utils/constants' +import UserConfigDialog from '@/views/system/smUser/components/UserConfigDialog.vue' const defaultSort = { prop: "createTime", @@ -304,7 +288,7 @@ const defaultSort = { export default { name: "SmUser", mixins: [$showColumns, $serviceType, $withdrawServiceType], - components: { UserLink }, + components: { UserConfigDialog, UserLink }, dicts: ['sm_user_status', 'sm_user_type', 'sys_user_sex', 'service_type', 'withdraw_service_type'], computed: { SmUserType() { @@ -318,6 +302,8 @@ export default { }, data() { return { + showConfigDialog: false, + row: {}, // 当前row defaultSort, span: 12, columns: [ @@ -406,20 +392,6 @@ export default { }) }) }, - onChangeDeviceAdmin(val) { - if (val) { - this.$confirm('【高危操作】是否确认设置用户为设备管理员?用户将可以通过微信小程序注册设备!', { - confirmButtonText: '确定', - cancelButtonText: '取消', - type: 'warning', - dangerouslyUseHTMLString: true - }).then(() => { - this.form.deviceAdmin = true; - }).catch((e) => { - this.form.deviceAdmin = false; - }); - } - }, onSortChange(column) { if (column.order == null) { this.queryParams.orderByColumn = defaultSort.prop; @@ -506,6 +478,10 @@ export default { this.title = "修改用户信息"; }); }, + handleUpdateRisk(row) { + this.row = row; + this.showConfigDialog = true; + }, /** 提交按钮 */ submitForm() { this.$refs["form"].validate(valid => {