From 88085eccc94d6c2999b9292f9d8f335fb1eb287f Mon Sep 17 00:00:00 2001 From: BabyBoy <2019108827@qq.com> Date: Sat, 26 Jul 2025 13:30:24 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=86=E6=88=90=E5=88=97=E8=A1=A8=EF=BC=8C?= =?UTF-8?q?=E5=BA=97=E9=93=BA=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/system/common.js | 2 +- src/api/system/divide/index.ts | 102 ++++ src/api/system/divide/types.ts | 42 ++ src/api/system/tenant/index.ts | 17 +- src/api/system/tenant/types.ts | 44 +- src/components/Crontab/hour.vue | 208 ++++---- src/components/Crontab/week.vue | 372 +++++++------- src/plugins/index.ts | 36 +- src/utils/ruoyi.ts | 10 +- src/views/oms/aftersale/index.vue | 18 +- src/views/oms/order/index.vue | 4 +- src/views/system/divide/index.vue | 499 ++++++++++++++++++ src/views/system/tenant/d.png | Bin 0 -> 2051 bytes src/views/system/tenant/index.vue | 819 +++++++++++++++++++++++++----- src/views/ums/account/index.vue | 24 +- 15 files changed, 1728 insertions(+), 469 deletions(-) create mode 100644 src/api/system/divide/index.ts create mode 100644 src/api/system/divide/types.ts create mode 100644 src/views/system/divide/index.vue create mode 100644 src/views/system/tenant/d.png diff --git a/src/api/system/common.js b/src/api/system/common.js index 56b3ded..5b83a51 100644 --- a/src/api/system/common.js +++ b/src/api/system/common.js @@ -3,7 +3,7 @@ import request from '@/utils/request'; // 查询省市区列表 export function areaSelect(query) { return request({ - url: '/common/area', + url: '/area', method: 'get', params: query }); diff --git a/src/api/system/divide/index.ts b/src/api/system/divide/index.ts new file mode 100644 index 0000000..338435a --- /dev/null +++ b/src/api/system/divide/index.ts @@ -0,0 +1,102 @@ +import { TenantForm, TenantQuery, TenantVO } from './types'; + +import { AxiosPromise } from 'axios'; +import request from '@/utils/request'; + +// 查询租户列表 +export function listDivide(query: TenantQuery): AxiosPromise { + return request({ + url: '/system/commission-template/list', + method: 'post', + data: query + }); +} + +// 查询租户详细 +export function getTenant(id: string | number): AxiosPromise { + return request({ + url: '/system/tenant/' + id, + method: 'get' + }); +} + +// 新增模板 +export function addTenant(data: TenantForm) { + return request({ + url: '/system/commission-template', + method: 'post', + headers: { + // isEncrypt: true // 加密传输 + validateRepeat: true // 校验重复提交 + }, + data: data + }); +} +// 查看比例详情 +export function getsections(data: any) { + return request({ + url: '/system/commission-template/sections', + method: 'post', + + data: data + }); +} +// 删除比例 +export function deletesection(ids: any) { + return request({ + url: `/system/commission-section/${ids}`, + method: 'delete' + }); +} + +// 修改比例 +export function putsections(data: any) { + return request({ + url: '/system/commission-section/edit', + method: 'post', + data: data + }); +} +// 添加比例 +export function addsection(data: any) { + return request({ + url: '/system/commission-section/batch', + method: 'post', + headers: { + // isEncrypt: true // 加密传输 + validateRepeat: true // 校验重复提交 + }, + data: data + }); +} + +// 修改租户 +export function updateTenant(data: TenantForm) { + return request({ + url: '/system/commission-template/edit', + method: 'post', + data: data + }); +} + +// 租户状态修改 +export function changeTenantStatus(id: string | number, tenantId: string | number, status: string) { + const data = { + id, + tenantId, + status + }; + return request({ + url: '/system/tenant/changeStatus', + method: 'put', + data: data + }); +} + +// 删除模板 +export function delTenant(id: string | number | Array) { + return request({ + url: `/system/commission-template/${id}`, + method: 'delete' + }); +} diff --git a/src/api/system/divide/types.ts b/src/api/system/divide/types.ts new file mode 100644 index 0000000..1b15026 --- /dev/null +++ b/src/api/system/divide/types.ts @@ -0,0 +1,42 @@ +export interface TenantVO extends BaseEntity { + id: number | string; + records: any[]; + createTime: string; + description: string; + isActive: number; + templateName: string; + templateType: string; + updateTime: string; +} + +export interface TenantQuery extends PageQuery { + current: number | string; + size: number | string; + templateName: string; + isActive: number; +} + +export interface TenantForm { + templateName: string; + templateType: string; + description: string; +} + +export interface TenantModal { + total: number | string; + data: any[]; + record: object; +} + +export interface enterpriseType { + createTime: string; + cssClass: string; + dictCode: string; + dictLabel: string; + dictSort: number; + dictType: string; + dictValue: string; + isDefault: string; + listClass: string; + remark: string; +} diff --git a/src/api/system/tenant/index.ts b/src/api/system/tenant/index.ts index fbc0da5..7a0cf96 100644 --- a/src/api/system/tenant/index.ts +++ b/src/api/system/tenant/index.ts @@ -1,13 +1,14 @@ -import request from '@/utils/request'; import { TenantForm, TenantQuery, TenantVO } from './types'; + import { AxiosPromise } from 'axios'; +import request from '@/utils/request'; // 查询租户列表 export function listTenant(query: TenantQuery): AxiosPromise { return request({ url: '/system/tenant/list', - method: 'get', - params: query + method: 'post', + data: query }); } @@ -22,10 +23,10 @@ export function getTenant(id: string | number): AxiosPromise { // 新增租户 export function addTenant(data: TenantForm) { return request({ - url: '/system/tenant', + url: '/system/tenant/add', method: 'post', headers: { - isEncrypt: true, + // isEncrypt: true // 加密传输 validateRepeat: true // 校验重复提交 }, data: data @@ -35,8 +36,8 @@ export function addTenant(data: TenantForm) { // 修改租户 export function updateTenant(data: TenantForm) { return request({ - url: '/system/tenant', - method: 'put', + url: '/system/tenant/update', + method: 'post', data: data }); } @@ -58,7 +59,7 @@ export function changeTenantStatus(id: string | number, tenantId: string | numbe // 删除租户 export function delTenant(id: string | number | Array) { return request({ - url: '/system/tenant/' + id, + url: '/system/tenant/remove?ids=' + id, method: 'delete' }); } diff --git a/src/api/system/tenant/types.ts b/src/api/system/tenant/types.ts index af85bac..8ee8c6d 100644 --- a/src/api/system/tenant/types.ts +++ b/src/api/system/tenant/types.ts @@ -18,12 +18,15 @@ export interface TenantVO extends BaseEntity { export interface TenantQuery extends PageQuery { tenantId: string | number; - + address: string; + signStatus: string; contactUserName: string; - - contactPhone: string; - + personName: string; + companyType: string; companyName: string; + storeName: string; + current: number; + size: number; } export interface TenantForm { @@ -31,7 +34,11 @@ export interface TenantForm { tenantId: number | string | undefined; username: string; password: string; + storeName: string; + inviteUserName: string; contactUserName: string; + personName: string; + personPhone: string; contactPhone: string; companyName: string; licenseNumber: string; @@ -47,6 +54,22 @@ export interface TenantForm { idCard: string; bankCard: string; inviteUserId: string | number; + companyType: string; + idCardType: string; + businessTypes: string; + signDate: string; //签约日期 + splitRatio: number | string | undefined; //分成比例 + signer: string; //签约人 + contractYear: string; //合同年限 + signStatus: string; //签约状态 + bankType: string; //开户行类型 + bankName: string; //开户行名称 + bankPhone: string; //开户行预留手机号 + contractAttachment: string; //合同附件 + attachment: string; //营业执照附件 + promoteList: any; //推广人图片吗 + related: any; //相关附件 + certificate: any; //身份证附件 } export interface TenantModal { @@ -54,3 +77,16 @@ export interface TenantModal { data: any[]; record: object; } + +export interface enterpriseType { + createTime: string; + cssClass: string; + dictCode: string; + dictLabel: string; + dictSort: number; + dictType: string; + dictValue: string; + isDefault: string; + listClass: string; + remark: string; +} diff --git a/src/components/Crontab/hour.vue b/src/components/Crontab/hour.vue index 2a5c33d..2bd39ef 100644 --- a/src/components/Crontab/hour.vue +++ b/src/components/Crontab/hour.vue @@ -1,114 +1,112 @@ diff --git a/src/components/Crontab/week.vue b/src/components/Crontab/week.vue index 1cec700..9bfead3 100644 --- a/src/components/Crontab/week.vue +++ b/src/components/Crontab/week.vue @@ -1,202 +1,194 @@ diff --git a/src/plugins/index.ts b/src/plugins/index.ts index 6c936e6..6ecb99d 100644 --- a/src/plugins/index.ts +++ b/src/plugins/index.ts @@ -1,28 +1,29 @@ -import modal from './modal'; -import tab from './tab'; -import download from './download'; -import cache from './cache'; -import auth from './auth'; -// 预设动画 -import animate from '@/animate'; -import { getEmulistLabelById } from '@/utils'; -import { download as dl } from '@/utils/request'; -import { useDict, getDictionaryByKey } from '@/utils/dict'; -import { getConfigKey, updateConfigByKey } from '@/api/system/config'; import { - parseTime, addDateRange, - handleTree, - selectDictLabel, - selectDictLabels, addDateRange2, addDateRange3, - resetForm, + getHiddenDetailAddress, getHiddenName, - getHiddenDetailAddress + getPhon, + handleTree, + parseTime, + resetForm, + selectDictLabel, + selectDictLabels } from '@/utils/ruoyi'; +import { getConfigKey, updateConfigByKey } from '@/api/system/config'; +import { getDictionaryByKey, useDict } from '@/utils/dict'; import { App } from 'vue'; +// 预设动画 +import animate from '@/animate'; +import auth from './auth'; +import cache from './cache'; +import { download as dl } from '@/utils/request'; +import download from './download'; +import { getEmulistLabelById } from '@/utils'; +import modal from './modal'; +import tab from './tab'; export default function installPlugin(app: App) { // 页签操作 @@ -51,6 +52,7 @@ export default function installPlugin(app: App) { app.config.globalProperties.selectDictLabel = selectDictLabel; app.config.globalProperties.selectDictLabels = selectDictLabels; app.config.globalProperties.animate = animate; + app.config.globalProperties.getPhon = getPhon; app.config.globalProperties.addDateRange3 = addDateRange3; app.config.globalProperties.resetForm = resetForm; app.config.globalProperties.addDateRange2 = addDateRange2; diff --git a/src/utils/ruoyi.ts b/src/utils/ruoyi.ts index 5646b9d..2f0f35d 100644 --- a/src/utils/ruoyi.ts +++ b/src/utils/ruoyi.ts @@ -294,7 +294,15 @@ export function getHiddenDetailAddress(data) { } return result; } - +//手机号隐藏中间四位 +export function getPhon(data) { + // 检查是否为有效的11位手机号 + if (!/^1[3-9]\d{9}$/.test(data)) { + return data; // 非手机号格式直接返回原数据 + } + // 使用正则表达式替换中间四位为星号 + return data.replace(/^(\d{3})\d{4}(\d{4})$/, '$1****$2'); +} export default { handleTree }; diff --git a/src/views/oms/aftersale/index.vue b/src/views/oms/aftersale/index.vue index c915c0e..5112a74 100644 --- a/src/views/oms/aftersale/index.vue +++ b/src/views/oms/aftersale/index.vue @@ -51,20 +51,20 @@ - - + + - + @@ -73,7 +73,7 @@ - +