From 488f588a98a6c60ce162a57c103b342467969c2e Mon Sep 17 00:00:00 2001 From: hzj <1304805162@qq.com> Date: Sat, 27 Sep 2025 17:25:35 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E8=BF=90=E8=90=A5-=E9=87=91=E5=B8=81?= =?UTF-8?q?=E4=BB=A3=E7=90=86):=20=E6=96=B0=E5=A2=9E=E2=80=9C=E8=B6=85?= =?UTF-8?q?=E7=BA=A7=E7=BB=8F=E9=94=80=E5=95=86=E2=80=9D=E8=BA=AB=E4=BB=BD?= =?UTF-8?q?=E5=88=87=E6=8D=A2=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/app-user.js | 400 ++++++++++++++++--------------- src/views/user/freight/index.vue | 271 ++++++++++++--------- 2 files changed, 359 insertions(+), 312 deletions(-) diff --git a/src/api/app-user.js b/src/api/app-user.js index a3a707c..666bf92 100644 --- a/src/api/app-user.js +++ b/src/api/app-user.js @@ -1,634 +1,642 @@ -import request from '@/utils/request' -import { httpGetExport } from '@/utils/export-excel' +import request from "@/utils/request"; +import { httpGetExport } from "@/utils/export-excel"; // 获取用户认证信息 export function getNotExpiredSubscriptionName(userId) { return request({ url: `/user/subscription/balance/${userId}/name`, - method: 'get' - }) + method: "get" + }); } // 获取用户认证信息 export function getUserAuthType(userId) { return request({ url: `/user/auth/type/${userId}`, - method: 'get' - }) + method: "get" + }); } // 登录令牌查看 export function getLoginToken(userId) { return request({ - url: '/user/auth/type/longin/token', - method: 'get', + url: "/user/auth/type/longin/token", + method: "get", params: { userId } - }) + }); } // 删除登录令牌 export function delLoginToken(userId) { return request({ - url: '/user/auth/type/longin/token', - method: 'delete', + url: "/user/auth/type/longin/token", + method: "delete", params: { userId } - }) + }); } // 获取用户糖果 export function getUserCandyBalance(userId) { return request({ url: `/user/candy/balance/${userId}`, - method: 'get' - }) + method: "get" + }); } // 获取用户余额top表 export function listUserCandyTop(params) { return request({ url: `/user/candy/balance/top`, - method: 'get', + method: "get", params - }) + }); } // 获取用户游戏券 export function getUserGameCouponBalance(userId) { return request({ url: `/user/game/coupon/balance/${userId}`, - method: 'get' - }) + method: "get" + }); } // 获取用户注册信息 export function getUserRegister(userId) { return request({ url: `/user/register/info/${userId}`, - method: 'get' - }) + method: "get" + }); } // 获取用户正常照片墙 export function getUserPhotoWallNormal(userId) { return request({ url: `/user/photo/wall/normal/${userId}`, - method: 'get' - }) + method: "get" + }); } // 获取用户所有照片墙 export function getUserPhotoWallAll(userId) { return request({ url: `/user/photo/wall/all/${userId}`, - method: 'get' - }) + method: "get" + }); } // app用户列表 export function getUserTable(data) { return request({ - url: '/user/base/info/page', - method: 'post', + url: "/user/base/info/page", + method: "post", data - }) + }); } // 修改用户基本信息 export function updateBaseInfo(data) { return request({ - url: '/user/base/info', - method: 'put', + url: "/user/base/info", + method: "put", data - }) + }); } // 用户基本信息 export function getUserBaseInfo(id) { return request({ url: `/user/base/info/${id}`, - method: 'get' - }) + method: "get" + }); } // 用户基本信息 export function getUserBaseInfoByAccount(id) { return request({ url: `/user/base/info/account/${id}`, - method: 'get' - }) + method: "get" + }); } // 用户基本信息 export function getUserBaseInfoBySysOriginAccount(sysOrigin, id) { return request({ url: `/user/base/info/${sysOrigin}/account/${id}`, - method: 'get' - }) + method: "get" + }); } // 所有照片墙 export function getPotoWallTable(params) { return request({ - url: '/user/photo/wall/page', - method: 'get', + url: "/user/photo/wall/page", + method: "get", params - }) + }); } // 删除照片墙 export function deletePhotoWall(id) { return request({ url: `/user/photo/wall/del/${id}`, - method: 'get' - }) + method: "get" + }); } // 所有照片墙按条件筛选 export function getPotoWallTableSeach(params) { return request({ - url: '/user/photo/wall/page/all', - method: 'get', + url: "/user/photo/wall/page/all", + method: "get", params - }) + }); } // 修改用户等级 export function updateLevelScore(data) { return request({ - url: '/user/level/score', - method: 'post', + url: "/user/level/score", + method: "post", data - }) + }); } // 用户积分 export function getUserLevel(id) { return request({ url: `/user/base/info/level/${id}`, - method: 'get' - }) + method: "get" + }); } // 在线女性用户分页列表 export function getOnlineUserTable(params) { return request({ - url: '/user/real/time/status/online/female/page', - method: 'get', + url: "/user/real/time/status/online/female/page", + method: "get", params - }) + }); } // 在线女性用户总数 export function getOnlineTotal() { return request({ - url: '/user/real/time/status/online/female/total', - method: 'get' - }) + url: "/user/real/time/status/online/female/total", + method: "get" + }); } // 在线男性用户分页列表 export function getOnlineMaleUserTable(params) { return request({ - url: '/user/real/time/status/online/male/page', - method: 'get', + url: "/user/real/time/status/online/male/page", + method: "get", params - }) + }); } // 在线男性用户总数 export function getOnlineMaleTotal() { return request({ - url: '/user/real/time/status/online/male/total', - method: 'get' - }) + url: "/user/real/time/status/online/male/total", + method: "get" + }); } // 获取男性用户等级 export function getUserMaleLevel(id) { return request({ url: `/user/base/info/male/level/${id}`, - method: 'get' - }) + method: "get" + }); } // 修改男性用户等级 export function updateMaleLevelScore(data) { return request({ - url: '/user/male/level/score', - method: 'post', + url: "/user/male/level/score", + method: "post", data - }) + }); } // 修改ai用户基本信息 export function updateVestBaseInfo(data) { return request({ - url: '/user/base/info/vest', - method: 'put', + url: "/user/base/info/vest", + method: "put", data - }) + }); } // 获取用户当前账号状态 export function getAccountStatus(userId) { return request({ url: `/user/base/info/account/status/${userId}`, - method: 'get' - }) + method: "get" + }); } // 获取礼物墙 export function getGiftWall(userId) { return request({ url: `/user/gift/wall/${userId}`, - method: 'get' - }) + method: "get" + }); } // 用户游戏券奖励 export function rewardGameCoupon(userId, coupon, remarks, rewardType) { return request({ url: `/user/game/coupon/income/expenditure/reward/coupon`, - method: 'post', + method: "post", params: { userId, coupon, remarks, rewardType } - }) + }); } // 用户游戏券扣除 export function deductGameCoupon(userId, coupon, remarks) { return request({ url: `/user/game/coupon/income/expenditure/deduct/coupon`, - method: 'post', + method: "post", params: { userId, coupon, remarks } - }) + }); } // 发送金币 export function sendGold(data) { return request({ - url: '/user-wallet/send-gold', - method: 'post', + url: "/user-wallet/send-gold", + method: "post", data - }) + }); } // 用户金币扣除 export function deductGold(data) { return request({ - url: '/user-wallet/deduct-gold', - method: 'post', + url: "/user-wallet/deduct-gold", + method: "post", data - }) + }); } // 发送钻石 export function sendDiamond(data) { return request({ - url: '/user-wallet/send-diamond', - method: 'post', + url: "/user-wallet/send-diamond", + method: "post", data - }) + }); } // 用户钻石扣除 export function deductDiamond(data) { return request({ - url: '/user-wallet/deduct-diamond', - method: 'post', + url: "/user-wallet/deduct-diamond", + method: "post", data - }) + }); } // APP管理员分页列表 export function getAdministratorTable(params) { return request({ - url: '/sys/administrator/page', - method: 'get', + url: "/sys/administrator/page", + method: "get", params - }) + }); } // 禁用/启用APP管理员 export function changeStatusAdministrator(data) { return request({ - url: '/sys/administrator', - method: 'put', + url: "/sys/administrator", + method: "put", data - }) + }); } // 改变角色 export function changeSysAdministratorRoles(params) { return request({ url: `/sys/administrator/change_roles/${params.id}/${params.roles}`, - method: 'get' - }) + method: "get" + }); } // APP权限列表 export function getAdministratorAuthTable() { return request({ - url: '/sys/administrator/auth/resource', - method: 'get' - }) + url: "/sys/administrator/auth/resource", + method: "get" + }); } export function deleteAdministratorAuth(id) { return request({ url: `/sys/administrator/auth/resource/delete/${id}`, - method: 'get' - }) + method: "get" + }); } export function updateAdministratorAuth(data) { return request({ - url: '/sys/administrator/auth/resource', - method: 'put', + url: "/sys/administrator/auth/resource", + method: "put", data - }) + }); } export function addAdministratorAuth(data) { return request({ - url: '/sys/administrator/auth/resource', - method: 'post', + url: "/sys/administrator/auth/resource", + method: "post", data - }) + }); } // 获取用户选中的权限信息 export function getSysAdministratorAuthResourceByUserId(userId) { return request({ url: `/sys/administrator/auth/resource/select/${userId}`, - method: 'get' - }) + method: "get" + }); } // 修改权限 export function deleteAndAddAdministratorAuth(data) { return request({ - url: '/sys/administrator/auth', - method: 'put', + url: "/sys/administrator/auth", + method: "put", data - }) + }); } // 获取用户的设备信息 export function getUserImei(id) { return request({ url: `/user/base/info/user/imei/${id}`, - method: 'get' - }) + method: "get" + }); } // 获取用户的最新设备信息 export function getDeviceByUserId(userId) { return request({ url: `/user/base/info/device/${userId}`, - method: 'get' - }) + method: "get" + }); } // 用户最新设备列表 export function getUserDeviceTable(params) { return request({ url: `/user/latest/mobile/device/page`, - method: 'get', + method: "get", params - }) + }); } // 货运代理账户分页列表 export function pageFreight(params) { return request({ - url: '/freight/page', - method: 'get', + url: "/freight/page", + method: "get", params - }) + }); } // 发货给代理账户 export function shipFreight(data) { return request({ - url: '/freight/ship', - method: 'post', + url: "/freight/ship", + method: "post", data - }) + }); } // 代理账户扣除货款 export function deductionFreight(data) { return request({ - url: '/freight/deduction', - method: 'post', + url: "/freight/deduction", + method: "post", data - }) + }); } // 货运流水列表 export function pageRunningWater(params) { return request({ - url: '/freight/running-water-page', - method: 'get', + url: "/freight/running-water-page", + method: "get", params - }) + }); } // 货运流水列表-导出 export function exportFreightWaters(params, excelName) { - return httpGetExport('/freight/running-water/export', params, excelName) + return httpGetExport("/freight/running-water/export", params, excelName); } // 货运流水列表 export function pageFreightSellerRunningWater(params) { return request({ - url: '/freight/freight-seller-running-water-page', - method: 'get', + url: "/freight/freight-seller-running-water-page", + method: "get", params - }) + }); } // 切换关闭账号状态 export function switchStatusFreight(id, status) { return request({ url: `/freight/switch-status/${id}/${status}`, - method: 'post' - }) + method: "post" + }); } // 切换显示/不显示,在H5页面显示账号信息 export function showStatusFreight(id, status) { return request({ url: `/freight/show-status/${id}/${status}`, - method: 'post' - }) + method: "post" + }); } // 是否经销商切换 export function switchStatusDealer(id, status) { return request({ url: `/freight/switch-dealer-status/${id}/${status}`, - method: 'post' - }) + method: "post" + }); +} + +// 是否超级经销商切换 +export function switchStatusSuperDealer(id, status) { + return request({ + url: `/freight/switch-superdealer-status/${id}/${status}`, + method: "post" + }); } // 经销商卖家列表 export function pageFreightSeller(params) { return request({ - url: '/freight-seller/page', - method: 'get', + url: "/freight-seller/page", + method: "get", params - }) + }); } // 修改经销商卖家数量 export function updateSellerQuantity(data) { return request({ - url: '/freight/update-seller-quantity', - method: 'post', + url: "/freight/update-seller-quantity", + method: "post", data - }) + }); } // 删除经销商卖家 export function removeFreightSeller(id) { return request({ url: `/freight-seller/delete/${id}`, - method: 'delete' - }) + method: "delete" + }); } // 获取指定用户运行资料 export function getUserRunProfileById(userId) { return request({ url: `/user-run-profile/${userId}`, - method: 'get' - }) + method: "get" + }); } // 移除用户运行资料 export function removeUserRunProfileById(userId) { return request({ url: `/user-run-profile/${userId}`, - method: 'delete' - }) + method: "delete" + }); } // 获取扩展信息 export function getUserExpend(userId) { return request({ - url: '/user/expand', - method: 'get', + url: "/user/expand", + method: "get", params: { userId } - }) + }); } // 获得认证详情 export function getUserAuthTypeDetails(userId) { return request({ - url: '/user/auth/type/details/' + userId, - method: 'get', + url: "/user/auth/type/details/" + userId, + method: "get", params: { userId } - }) + }); } // 修改绑定手机认证信息 export function editUserMobileAuth(data) { return request({ - url: '/user/auth/type/edit/mobile-auth', - method: 'post', + url: "/user/auth/type/edit/mobile-auth", + method: "post", data - }) + }); } // 删除绑定手机认证信息 export function deleteUserMobileAuth(userId) { return request({ - url: '/user/auth/type/delete/mobile-auth/' + userId, - method: 'get' - }) + url: "/user/auth/type/delete/mobile-auth/" + userId, + method: "get" + }); } // 重置用户账号密码登录信息 export function initUserAccountLogin(userId) { return request({ - url: '/user/auth/type/init/account-auth/' + userId, - method: 'get' - }) + url: "/user/auth/type/init/account-auth/" + userId, + method: "get" + }); } // 删除用户账号密码登录信息 export function deleteUserAccountLogin(userId) { return request({ - url: '/user/auth/type/delete/account-auth/' + userId, - method: 'get' - }) + url: "/user/auth/type/delete/account-auth/" + userId, + method: "get" + }); } // 重置用户支付密码 export function initUserPayAuth(userId) { return request({ - url: '/user/auth/type/init/pay-auth/' + userId, - method: 'get' - }) + url: "/user/auth/type/init/pay-auth/" + userId, + method: "get" + }); } // 删除用户支付密码 export function deleteUserPayAuth(userId) { return request({ - url: '/user/auth/type/delete/pay-auth/' + userId, - method: 'get' - }) + url: "/user/auth/type/delete/pay-auth/" + userId, + method: "get" + }); } // 获取用户vip实际权益信息 export function getUserVipEquity(userId) { return request({ - url: '/user/base/info/user/vip/equity/' + userId, - method: 'get' - }) + url: "/user/base/info/user/vip/equity/" + userId, + method: "get" + }); } // 用户身份信息 export function getUserIdentity(userId) { return request({ - url: '/user/base/info/' + userId + '/identity', - method: 'get' - }) + url: "/user/base/info/" + userId + "/identity", + method: "get" + }); } // 用户认证身份信息 export function getUserBankIdentityInfo(params) { return request({ - url: '/user/bank-identity-info/page', - method: 'get', + url: "/user/bank-identity-info/page", + method: "get", params - }) + }); } // 用户认证身份信息审核 export function auditUserBankIdentityInfo(data) { return request({ - url: '/user/bank-identity-info', - method: 'put', + url: "/user/bank-identity-info", + method: "put", data - }) + }); } // 用户认证身份信息-导出 export function exportUserBankIdentityInfo(params, excelName) { - return httpGetExport('/user/bank-identity-info/export', params, excelName) + return httpGetExport("/user/bank-identity-info/export", params, excelName); } // 用户钻石流水列表 export function pageUserDiamondRunWater(params) { return request({ - url: '/user/diamond/run/water/page', - method: 'get', + url: "/user/diamond/run/water/page", + method: "get", params - }) + }); } // 用户钻石余额列表 export function pageUserDiamondBalance(params) { return request({ - url: '/user/diamond/balance/page', - method: 'get', + url: "/user/diamond/balance/page", + method: "get", params - }) + }); } diff --git a/src/views/user/freight/index.vue b/src/views/user/freight/index.vue index 3d77716..c9860ba 100644 --- a/src/views/user/freight/index.vue +++ b/src/views/user/freight/index.vue @@ -15,10 +15,8 @@ :value="item.value" > - + {{ item.label }} @@ -162,7 +160,12 @@ /> - + - + - + + + + @@ -205,18 +237,15 @@ @@ -268,13 +297,14 @@ :placeholder="'请输入' + (type ? '发货' : '扣款') + '金币数量'" /> - - + + - + { - const { body } = res - that.total = body.total || 0 - that.list = body.records - that.listLoading = false + const { body } = res; + that.total = body.total || 0; + that.list = body.records; + that.listLoading = false; }) .catch(er => { - that.listLoading = false - }) + that.listLoading = false; + }); }, handleSearch() { - this.renderData(true) + this.renderData(true); }, handleCreate() { - this.thatRow = null - this.formEditVisable = true + this.thatRow = null; + this.formEditVisable = true; }, handleClose() { - this.$emit('close') + this.$emit("close"); }, handleMouseEnter(row) { - this.thatRow = row + this.thatRow = row; }, formEditClose() { - this.formEditVisable = false + this.formEditVisable = false; }, formEditSuccess() { - this.formEditVisable = false - this.renderData() + this.formEditVisable = false; + this.renderData(); }, handleSwitchChange(row) { switchStatusFreight(row.id, row.close) .then(res => {}) .catch(er => { - row.close = !row.close - }) + row.close = !row.close; + }); }, showSwitchChange(row) { showStatusFreight(row.id, row.display) .then(res => {}) .catch(er => { - row.display = !row.display - }) + row.display = !row.display; + }); }, switchChangeDealer(row) { switchStatusDealer(row.id, row.dealer) .then(res => {}) .catch(er => { - row.dealer = !row.dealer - }) + row.dealer = !row.dealer; + }); }, + switchChangeSuperDealer(row) { + switchStatusSuperDealer(row.id, row.superDealer) + .then(res => {}) + .catch(er => { + row.superDealer = !row.superDealer; + }); + }, + showSellerInfo(row) { - const that = this - console.log('---->') - that.showSellerInfoVisable = true - this.sellerInfoEditParam = row + const that = this; + console.log("---->"); + that.showSellerInfoVisable = true; + this.sellerInfoEditParam = row; }, sellerInfoClose() { - this.showSellerInfoVisable = false - this.renderData() + this.showSellerInfoVisable = false; + this.renderData(); }, showGoldInputBox(row, type) { - const that = this - that.type = type + const that = this; + that.type = type; that.formData = { userId: row.userId, - earnPoints: '', + earnPoints: "", sysOrigin: row.sysOrigin, - remark: '' - } - that.goldInputBoxVisible = true + remark: "" + }; + that.goldInputBoxVisible = true; }, hideGoldInputBox() { - const that = this - that.goldInputBoxVisible = false + const that = this; + that.goldInputBoxVisible = false; }, goldSubmit() { - const that = this + const that = this; that.$refs.form.validate(valid => { if (!valid) { - console.error('error submit!!') - return + console.error("error submit!!"); + return; } - that.listLoading = true + that.listLoading = true; if (that.type) { shipFreight(that.formData) .then(res => { - that.$opsMessage.success() - that.goldInputBoxVisible = false - that.listLoading = false - that.renderData() + that.$opsMessage.success(); + that.goldInputBoxVisible = false; + that.listLoading = false; + that.renderData(); }) .catch(er => { - that.listLoading = false - that.$opsMessage.success() - console.error(er) - }) - return + that.listLoading = false; + that.$opsMessage.success(); + console.error(er); + }); + return; } deductionFreight(that.formData) .then(res => { - that.$opsMessage.success() - that.goldInputBoxVisible = false - that.listLoading = false - that.renderData() + that.$opsMessage.success(); + that.goldInputBoxVisible = false; + that.listLoading = false; + that.renderData(); }) .catch(er => { - that.listLoading = false - that.$opsMessage.success() - console.error(er) - }) - }) + that.listLoading = false; + that.$opsMessage.success(); + console.error(er); + }); + }); } } -} +};