From cddbcc07d466fb09aafb27faa7b11c527fcd05d9 Mon Sep 17 00:00:00 2001 From: 18650502300 <18650502300@163.com> Date: Wed, 23 Oct 2024 10:37:35 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=8F=90=E7=8E=B0=E6=B8=A0=E9=81=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.production | 2 +- src/api/rl/userWithdraw.js | 44 +++ src/views/system/userWithdraw/index.vue | 370 ++++++++++++++++++++++++ 3 files changed, 415 insertions(+), 1 deletion(-) create mode 100644 src/api/rl/userWithdraw.js create mode 100644 src/views/system/userWithdraw/index.vue diff --git a/.env.production b/.env.production index eb16d91..a6a833d 100644 --- a/.env.production +++ b/.env.production @@ -6,4 +6,4 @@ ENV = 'production' # 电动车租赁系统/生产环境 # VUE_APP_BASE_API = '/prod-api' -VUE_APP_BASE_API = 'http://192.168.2.21:8090' \ No newline at end of file +VUE_APP_BASE_API = 'https://zc.chuangtewl.com' diff --git a/src/api/rl/userWithdraw.js b/src/api/rl/userWithdraw.js new file mode 100644 index 0000000..608635a --- /dev/null +++ b/src/api/rl/userWithdraw.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询用户提现渠道列表 +export function listUserWithdraw(query) { + return request({ + url: '/system/userWithdraw/list', + method: 'get', + params: query + }) +} + +// 查询用户提现渠道详细 +export function getUserWithdraw(userChannelId) { + return request({ + url: '/system/userWithdraw/' + userChannelId, + method: 'get' + }) +} + +// 新增用户提现渠道 +export function addUserWithdraw(data) { + return request({ + url: '/system/userWithdraw', + method: 'post', + data: data + }) +} + +// 修改用户提现渠道 +export function updateUserWithdraw(data) { + return request({ + url: '/system/userWithdraw', + method: 'put', + data: data + }) +} + +// 删除用户提现渠道 +export function delUserWithdraw(userChannelId) { + return request({ + url: '/system/userWithdraw/' + userChannelId, + method: 'delete' + }) +} diff --git a/src/views/system/userWithdraw/index.vue b/src/views/system/userWithdraw/index.vue new file mode 100644 index 0000000..9f8d755 --- /dev/null +++ b/src/views/system/userWithdraw/index.vue @@ -0,0 +1,370 @@ + + + From c8b92c58b2b00be0af0a79007b10337e77bd2924 Mon Sep 17 00:00:00 2001 From: 18650502300 <18650502300@163.com> Date: Thu, 24 Oct 2024 15:20:58 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.production | 2 +- src/api/user/user.js | 9 ++++ src/views/system/device/index.vue | 18 +++---- src/views/system/partner/index.vue | 57 +++++++++++++-------- src/views/system/store/index.vue | 22 ++++---- src/views/system/user/index.vue | 4 +- src/views/user/user/index.vue | 82 +++--------------------------- 7 files changed, 76 insertions(+), 118 deletions(-) diff --git a/.env.production b/.env.production index a6a833d..257931e 100644 --- a/.env.production +++ b/.env.production @@ -6,4 +6,4 @@ ENV = 'production' # 电动车租赁系统/生产环境 # VUE_APP_BASE_API = '/prod-api' -VUE_APP_BASE_API = 'https://zc.chuangtewl.com' +VUE_APP_BASE_API = 'https://zc.chuangtewl.com/prod-api' diff --git a/src/api/user/user.js b/src/api/user/user.js index 2ec7653..a13e23b 100644 --- a/src/api/user/user.js +++ b/src/api/user/user.js @@ -10,6 +10,15 @@ export function listUser(query) { }) } +// 查询app用户列表 +export function listAppUser(query) { + return request({ + url: '/user/user/appList', + method: 'get', + params: query + }) +} + // 根据手机号快速搜索用户列表 export function fastSearch(query) { return request({ diff --git a/src/views/system/device/index.vue b/src/views/system/device/index.vue index eb0df7e..994ea9c 100644 --- a/src/views/system/device/index.vue +++ b/src/views/system/device/index.vue @@ -148,17 +148,17 @@ @@ -464,7 +464,7 @@ import { listStore, getStore, delStore, addStore, updateStore } from "@/api/rl/s export default { name: "Device", - dicts: ['as_online_status', 'as_device_status','et_device_lock_status'], + dicts: ['rl_online_status', 'rl_device_status','rl_device_lock_status'], components: {}, props: { initLng: { @@ -570,7 +570,7 @@ export default { window.removeEventListener('scroll', this.handleScroll, true) }, created() { - + listHardwareVersion(this.queryParams).then(response => { this.hardwareVersionOptions = response.rows; this.loading2 = false; @@ -613,7 +613,7 @@ export default { let data = { pageNum: 1, pageSize: 20, - + } listModel(data).then(response => { // console.log(response,'responseresponseresponse'); @@ -624,13 +624,13 @@ export default { // })); console.log( this.options,' this.options this.options'); }); - + }, getlistStore() { let data = { pageNum: 1, pageSize: 20, - + } listStore(data).then(response => { console.log(response,'店铺'); @@ -641,7 +641,7 @@ export default { // })); console.log( this.options,' this.options this.options'); }); - + }, handleScroll() { let scrollTop = window.scrollY; diff --git a/src/views/system/partner/index.vue b/src/views/system/partner/index.vue index c1b7f7a..9e2df3e 100644 --- a/src/views/system/partner/index.vue +++ b/src/views/system/partner/index.vue @@ -186,22 +186,14 @@ - - + - + - + - - + + @@ -243,7 +235,7 @@ - + item.roleKey !== 'common' && item.roleKey !== 'agent'); + }, + }, components: { Treeselect }, data() { return { @@ -321,6 +318,7 @@ export default { form: { dividendStatus: "0" }, + inputDividendProportion: 30, // 用于输入的百分比 defaultProps: { children: "children", label: "label" @@ -369,9 +367,11 @@ export default { agentList:[], // 表单校验 rules: { + agentId: [ + { required: true, message: "请选择代理商", trigger: "blur" }, + ], dividendProportion: [ { required: true, message: "分账比例不能为空", trigger: "blur" }, - { pattern: /^\d+$/, message: '分账比例必须为正整数', trigger: 'blur' } ], cityId: [ { required: true, message: "代理城市不能为空", trigger: "blur" }, @@ -409,7 +409,7 @@ export default { setTimeout(() => { console.log(this.dicts,'dictsdicts'); }, 200); - + // this.getDeptTree(); this.getConfigKey("sys.user.initPassword").then(response => { this.initPassword = response.msg; @@ -418,11 +418,20 @@ export default { this.getAgentList() }, methods: { + handleInput() { + // 当输入时,将输入的百分比转换为原始值 + console.log(111111111111) + const proportion = parseFloat(this.inputDividendProportion); + if (!isNaN(proportion)) { + console.log(22222222222) + this.form.dividendProportion = proportion / 100; + } + }, getAgentList() { let data = { pageNum: 1, pageSize: 30, - + } listAgent(this.addDateRange(data)).then(response => { console.log(response,'responseresponseresponse'); @@ -433,7 +442,7 @@ export default { // })); console.log( this.options,' this.options this.options'); }); - + }, formatDividendProportion(row) { let dividendProportion = row.dividendProportion; @@ -567,9 +576,11 @@ export default { this.roleOptions = response.roles; this.areaOptions = response.areas; this.$set(this.form, "postIds", response.postIds); - this.$set(this.form, "roleIds", response.roleIds); - // console.log(1111111111111) + this.$set(this.form, "roleIds", response.roleIds[0]); this.$set(this.form, "areas", response.areas); + this.form.roleIds = response.roleIds[0]; // 取出第一个角色 ID + console.log("回显-=====roleIds[0]",response.roleIds[0]) + this.inputDividendProportion = this.form.dividendProportion * 100; this.open = true; this.title = "修改系统用户"; this.form.password = ""; @@ -603,6 +614,10 @@ export default { submitForm: function() { this.$refs["form"].validate(valid => { this.form.userType = '03'; + this.form.roleIds = [this.form.roleIds]; + console.log("提交roleIds=========="+this.form.roleIds) + this.form.dividendProportion = this.inputDividendProportion; // 转换为0.3 + // console.log('保存的分账比例:', this.form.dividendProportion); this.form.dividendStatus = this.form.dividendStatus === "1" ? 1:0; if (valid) { if (this.form.userId != undefined) { diff --git a/src/views/system/store/index.vue b/src/views/system/store/index.vue index 3f9b0c9..f0c1ffd 100644 --- a/src/views/system/store/index.vue +++ b/src/views/system/store/index.vue @@ -47,8 +47,8 @@ - - + + \ No newline at end of file + diff --git a/src/views/user/user/index.vue b/src/views/user/user/index.vue index 62bf11e..d182559 100644 --- a/src/views/user/user/index.vue +++ b/src/views/user/user/index.vue @@ -55,48 +55,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + +