分成列表,店铺列表
This commit is contained in:
parent
c9ce2d3ae3
commit
88085eccc9
@ -3,7 +3,7 @@ import request from '@/utils/request';
|
|||||||
// 查询省市区列表
|
// 查询省市区列表
|
||||||
export function areaSelect(query) {
|
export function areaSelect(query) {
|
||||||
return request({
|
return request({
|
||||||
url: '/common/area',
|
url: '/area',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: query
|
params: query
|
||||||
});
|
});
|
||||||
|
102
src/api/system/divide/index.ts
Normal file
102
src/api/system/divide/index.ts
Normal file
@ -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<TenantVO[]> {
|
||||||
|
return request({
|
||||||
|
url: '/system/commission-template/list',
|
||||||
|
method: 'post',
|
||||||
|
data: query
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询租户详细
|
||||||
|
export function getTenant(id: string | number): AxiosPromise<TenantVO> {
|
||||||
|
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<string | number>) {
|
||||||
|
return request({
|
||||||
|
url: `/system/commission-template/${id}`,
|
||||||
|
method: 'delete'
|
||||||
|
});
|
||||||
|
}
|
42
src/api/system/divide/types.ts
Normal file
42
src/api/system/divide/types.ts
Normal file
@ -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;
|
||||||
|
}
|
@ -1,13 +1,14 @@
|
|||||||
import request from '@/utils/request';
|
|
||||||
import { TenantForm, TenantQuery, TenantVO } from './types';
|
import { TenantForm, TenantQuery, TenantVO } from './types';
|
||||||
|
|
||||||
import { AxiosPromise } from 'axios';
|
import { AxiosPromise } from 'axios';
|
||||||
|
import request from '@/utils/request';
|
||||||
|
|
||||||
// 查询租户列表
|
// 查询租户列表
|
||||||
export function listTenant(query: TenantQuery): AxiosPromise<TenantVO[]> {
|
export function listTenant(query: TenantQuery): AxiosPromise<TenantVO[]> {
|
||||||
return request({
|
return request({
|
||||||
url: '/system/tenant/list',
|
url: '/system/tenant/list',
|
||||||
method: 'get',
|
method: 'post',
|
||||||
params: query
|
data: query
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -22,10 +23,10 @@ export function getTenant(id: string | number): AxiosPromise<TenantVO> {
|
|||||||
// 新增租户
|
// 新增租户
|
||||||
export function addTenant(data: TenantForm) {
|
export function addTenant(data: TenantForm) {
|
||||||
return request({
|
return request({
|
||||||
url: '/system/tenant',
|
url: '/system/tenant/add',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
headers: {
|
headers: {
|
||||||
isEncrypt: true,
|
// isEncrypt: true // 加密传输
|
||||||
validateRepeat: true // 校验重复提交
|
validateRepeat: true // 校验重复提交
|
||||||
},
|
},
|
||||||
data: data
|
data: data
|
||||||
@ -35,8 +36,8 @@ export function addTenant(data: TenantForm) {
|
|||||||
// 修改租户
|
// 修改租户
|
||||||
export function updateTenant(data: TenantForm) {
|
export function updateTenant(data: TenantForm) {
|
||||||
return request({
|
return request({
|
||||||
url: '/system/tenant',
|
url: '/system/tenant/update',
|
||||||
method: 'put',
|
method: 'post',
|
||||||
data: data
|
data: data
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -58,7 +59,7 @@ export function changeTenantStatus(id: string | number, tenantId: string | numbe
|
|||||||
// 删除租户
|
// 删除租户
|
||||||
export function delTenant(id: string | number | Array<string | number>) {
|
export function delTenant(id: string | number | Array<string | number>) {
|
||||||
return request({
|
return request({
|
||||||
url: '/system/tenant/' + id,
|
url: '/system/tenant/remove?ids=' + id,
|
||||||
method: 'delete'
|
method: 'delete'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -18,12 +18,15 @@ export interface TenantVO extends BaseEntity {
|
|||||||
|
|
||||||
export interface TenantQuery extends PageQuery {
|
export interface TenantQuery extends PageQuery {
|
||||||
tenantId: string | number;
|
tenantId: string | number;
|
||||||
|
address: string;
|
||||||
|
signStatus: string;
|
||||||
contactUserName: string;
|
contactUserName: string;
|
||||||
|
personName: string;
|
||||||
contactPhone: string;
|
companyType: string;
|
||||||
|
|
||||||
companyName: string;
|
companyName: string;
|
||||||
|
storeName: string;
|
||||||
|
current: number;
|
||||||
|
size: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface TenantForm {
|
export interface TenantForm {
|
||||||
@ -31,7 +34,11 @@ export interface TenantForm {
|
|||||||
tenantId: number | string | undefined;
|
tenantId: number | string | undefined;
|
||||||
username: string;
|
username: string;
|
||||||
password: string;
|
password: string;
|
||||||
|
storeName: string;
|
||||||
|
inviteUserName: string;
|
||||||
contactUserName: string;
|
contactUserName: string;
|
||||||
|
personName: string;
|
||||||
|
personPhone: string;
|
||||||
contactPhone: string;
|
contactPhone: string;
|
||||||
companyName: string;
|
companyName: string;
|
||||||
licenseNumber: string;
|
licenseNumber: string;
|
||||||
@ -47,6 +54,22 @@ export interface TenantForm {
|
|||||||
idCard: string;
|
idCard: string;
|
||||||
bankCard: string;
|
bankCard: string;
|
||||||
inviteUserId: string | number;
|
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 {
|
export interface TenantModal {
|
||||||
@ -54,3 +77,16 @@ export interface TenantModal {
|
|||||||
data: any[];
|
data: any[];
|
||||||
record: object;
|
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;
|
||||||
|
}
|
||||||
|
@ -1,32 +1,30 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-form >
|
<el-form>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-radio v-model='radioValue' :label="1">
|
<el-radio v-model="radioValue" :label="1"> 小时,允许的通配符[, - * /] </el-radio>
|
||||||
小时,允许的通配符[, - * /]
|
|
||||||
</el-radio>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-radio v-model='radioValue' :label="2">
|
<el-radio v-model="radioValue" :label="2">
|
||||||
周期从
|
周期从
|
||||||
<el-input-number v-model='cycle01' :min="0" :max="22" /> -
|
<el-input-number v-model="cycle01" :min="0" :max="22" /> -
|
||||||
<el-input-number v-model='cycle02' :min="cycle01 ? cycle01 + 1 : 1" :max="23" /> 小时
|
<el-input-number v-model="cycle02" :min="cycle01 ? cycle01 + 1 : 1" :max="23" /> 小时
|
||||||
</el-radio>
|
</el-radio>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-radio v-model='radioValue' :label="3">
|
<el-radio v-model="radioValue" :label="3">
|
||||||
从
|
从
|
||||||
<el-input-number v-model='average01' :min="0" :max="22" /> 小时开始,每
|
<el-input-number v-model="average01" :min="0" :max="22" /> 小时开始,每
|
||||||
<el-input-number v-model='average02' :min="1" :max="23 - average01 || 0" /> 小时执行一次
|
<el-input-number v-model="average02" :min="1" :max="23 - average01 || 0" /> 小时执行一次
|
||||||
</el-radio>
|
</el-radio>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-radio v-model='radioValue' :label="4">
|
<el-radio v-model="radioValue" :label="4">
|
||||||
指定
|
指定
|
||||||
<el-select clearable v-model="checkboxList" placeholder="可多选" multiple style="width:100%">
|
<el-select clearable v-model="checkboxList" placeholder="可多选" multiple style="width: 100%">
|
||||||
<el-option v-for="item in 24" :key="item" :value="item-1">{{item-1}}</el-option>
|
<el-option v-for="item in 24" :key="item" :value="item - 1">{{ item - 1 }}</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-radio>
|
</el-radio>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -44,7 +42,7 @@ export default {
|
|||||||
average02: 1,
|
average02: 1,
|
||||||
checkboxList: [],
|
checkboxList: [],
|
||||||
checkNum: this.$options.propsData.check
|
checkNum: this.$options.propsData.check
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
name: 'crontab-hour',
|
name: 'crontab-hour',
|
||||||
props: ['check', 'cron'],
|
props: ['check', 'cron'],
|
||||||
@ -53,7 +51,7 @@ export default {
|
|||||||
radioChange() {
|
radioChange() {
|
||||||
switch (this.radioValue) {
|
switch (this.radioValue) {
|
||||||
case 1:
|
case 1:
|
||||||
this.$emit('update', 'hour', '*')
|
this.$emit('update', 'hour', '*');
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
this.$emit('update', 'hour', this.cycleTotal);
|
this.$emit('update', 'hour', this.cycleTotal);
|
||||||
@ -94,14 +92,14 @@ export default {
|
|||||||
computed: {
|
computed: {
|
||||||
// 计算两个周期值
|
// 计算两个周期值
|
||||||
cycleTotal: function () {
|
cycleTotal: function () {
|
||||||
const cycle01 = this.checkNum(this.cycle01, 0, 22)
|
const cycle01 = this.checkNum(this.cycle01, 0, 22);
|
||||||
const cycle02 = this.checkNum(this.cycle02, cycle01 ? cycle01 + 1 : 1, 23)
|
const cycle02 = this.checkNum(this.cycle02, cycle01 ? cycle01 + 1 : 1, 23);
|
||||||
return cycle01 + '-' + cycle02;
|
return cycle01 + '-' + cycle02;
|
||||||
},
|
},
|
||||||
// 计算平均用到的值
|
// 计算平均用到的值
|
||||||
averageTotal: function () {
|
averageTotal: function () {
|
||||||
const average01 = this.checkNum(this.average01, 0, 22)
|
const average01 = this.checkNum(this.average01, 0, 22);
|
||||||
const average02 = this.checkNum(this.average02, 1, 23 - average01 || 0)
|
const average02 = this.checkNum(this.average02, 1, 23 - average01 || 0);
|
||||||
return average01 + '/' + average02;
|
return average01 + '/' + average02;
|
||||||
},
|
},
|
||||||
// 计算勾选的checkbox值合集
|
// 计算勾选的checkbox值合集
|
||||||
@ -110,5 +108,5 @@ export default {
|
|||||||
return str == '' ? '*' : str;
|
return str == '' ? '*' : str;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -1,70 +1,62 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-form size='small'>
|
<el-form size="small">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-radio v-model='radioValue' :label="1">
|
<el-radio v-model="radioValue" :label="1"> 周,允许的通配符[, - * ? / L #] </el-radio>
|
||||||
周,允许的通配符[, - * ? / L #]
|
|
||||||
</el-radio>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-radio v-model='radioValue' :label="2">
|
<el-radio v-model="radioValue" :label="2"> 不指定 </el-radio>
|
||||||
不指定
|
|
||||||
</el-radio>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-radio v-model='radioValue' :label="3">
|
<el-radio v-model="radioValue" :label="3">
|
||||||
周期从星期
|
周期从星期
|
||||||
<el-select clearable v-model="cycle01">
|
<el-select clearable v-model="cycle01">
|
||||||
<el-option
|
<el-option v-for="(item, index) of weekList" :key="index" :label="item.value" :value="item.key" :disabled="item.key === 1">{{
|
||||||
v-for="(item,index) of weekList"
|
item.value
|
||||||
:key="index"
|
}}</el-option>
|
||||||
:label="item.value"
|
|
||||||
:value="item.key"
|
|
||||||
:disabled="item.key === 1"
|
|
||||||
>{{item.value}}</el-option>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
-
|
-
|
||||||
<el-select clearable v-model="cycle02">
|
<el-select clearable v-model="cycle02">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="(item,index) of weekList"
|
v-for="(item, index) of weekList"
|
||||||
:key="index"
|
:key="index"
|
||||||
:label="item.value"
|
:label="item.value"
|
||||||
:value="item.key"
|
:value="item.key"
|
||||||
:disabled="item.key < cycle01 && item.key !== 1"
|
:disabled="item.key < cycle01 && item.key !== 1"
|
||||||
>{{item.value}}</el-option>
|
>{{ item.value }}</el-option
|
||||||
|
>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-radio>
|
</el-radio>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-radio v-model='radioValue' :label="4">
|
<el-radio v-model="radioValue" :label="4">
|
||||||
第
|
第
|
||||||
<el-input-number v-model='average01' :min="1" :max="4" /> 周的星期
|
<el-input-number v-model="average01" :min="1" :max="4" /> 周的星期
|
||||||
<el-select clearable v-model="average02">
|
<el-select clearable v-model="average02">
|
||||||
<el-option v-for="(item,index) of weekList" :key="index" :label="item.value" :value="item.key">{{item.value}}</el-option>
|
<el-option v-for="(item, index) of weekList" :key="index" :label="item.value" :value="item.key">{{ item.value }}</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-radio>
|
</el-radio>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-radio v-model='radioValue' :label="5">
|
<el-radio v-model="radioValue" :label="5">
|
||||||
本月最后一个星期
|
本月最后一个星期
|
||||||
<el-select clearable v-model="weekday">
|
<el-select clearable v-model="weekday">
|
||||||
<el-option v-for="(item,index) of weekList" :key="index" :label="item.value" :value="item.key">{{item.value}}</el-option>
|
<el-option v-for="(item, index) of weekList" :key="index" :label="item.value" :value="item.key">{{ item.value }}</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-radio>
|
</el-radio>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-radio v-model='radioValue' :label="6">
|
<el-radio v-model="radioValue" :label="6">
|
||||||
指定
|
指定
|
||||||
<el-select clearable v-model="checkboxList" placeholder="可多选" multiple style="width:100%">
|
<el-select clearable v-model="checkboxList" placeholder="可多选" multiple style="width: 100%">
|
||||||
<el-option v-for="(item,index) of weekList" :key="index" :label="item.value" :value="String(item.key)">{{item.value}}</el-option>
|
<el-option v-for="(item, index) of weekList" :key="index" :label="item.value" :value="String(item.key)">{{ item.value }}</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-radio>
|
</el-radio>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
</el-form>
|
</el-form>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -110,7 +102,7 @@ export default {
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
checkNum: this.$options.propsData.check
|
checkNum: this.$options.propsData.check
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
name: 'crontab-week',
|
name: 'crontab-week',
|
||||||
props: ['check', 'cron'],
|
props: ['check', 'cron'],
|
||||||
@ -165,31 +157,31 @@ export default {
|
|||||||
if (this.radioValue == '6') {
|
if (this.radioValue == '6') {
|
||||||
this.$emit('update', 'week', this.checkboxString);
|
this.$emit('update', 'week', this.checkboxString);
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
'radioValue': 'radioChange',
|
'radioValue': 'radioChange',
|
||||||
'cycleTotal': 'cycleChange',
|
'cycleTotal': 'cycleChange',
|
||||||
'averageTotal': 'averageChange',
|
'averageTotal': 'averageChange',
|
||||||
'weekdayCheck': 'weekdayChange',
|
'weekdayCheck': 'weekdayChange',
|
||||||
'checkboxString': 'checkboxChange',
|
'checkboxString': 'checkboxChange'
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
// 计算两个周期值
|
// 计算两个周期值
|
||||||
cycleTotal: function () {
|
cycleTotal: function () {
|
||||||
this.cycle01 = this.checkNum(this.cycle01, 1, 7)
|
this.cycle01 = this.checkNum(this.cycle01, 1, 7);
|
||||||
this.cycle02 = this.checkNum(this.cycle02, 1, 7)
|
this.cycle02 = this.checkNum(this.cycle02, 1, 7);
|
||||||
return this.cycle01 + '-' + this.cycle02;
|
return this.cycle01 + '-' + this.cycle02;
|
||||||
},
|
},
|
||||||
// 计算平均用到的值
|
// 计算平均用到的值
|
||||||
averageTotal: function () {
|
averageTotal: function () {
|
||||||
this.average01 = this.checkNum(this.average01, 1, 4)
|
this.average01 = this.checkNum(this.average01, 1, 4);
|
||||||
this.average02 = this.checkNum(this.average02, 1, 7)
|
this.average02 = this.checkNum(this.average02, 1, 7);
|
||||||
return this.average02 + '#' + this.average01;
|
return this.average02 + '#' + this.average01;
|
||||||
},
|
},
|
||||||
// 最近的工作日(格式)
|
// 最近的工作日(格式)
|
||||||
weekdayCheck: function () {
|
weekdayCheck: function () {
|
||||||
this.weekday = this.checkNum(this.weekday, 1, 7)
|
this.weekday = this.checkNum(this.weekday, 1, 7);
|
||||||
return this.weekday;
|
return this.weekday;
|
||||||
},
|
},
|
||||||
// 计算勾选的checkbox值合集
|
// 计算勾选的checkbox值合集
|
||||||
@ -198,5 +190,5 @@ export default {
|
|||||||
return str == '' ? '*' : str;
|
return str == '' ? '*' : str;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -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 {
|
import {
|
||||||
parseTime,
|
|
||||||
addDateRange,
|
addDateRange,
|
||||||
handleTree,
|
|
||||||
selectDictLabel,
|
|
||||||
selectDictLabels,
|
|
||||||
addDateRange2,
|
addDateRange2,
|
||||||
addDateRange3,
|
addDateRange3,
|
||||||
resetForm,
|
getHiddenDetailAddress,
|
||||||
getHiddenName,
|
getHiddenName,
|
||||||
getHiddenDetailAddress
|
getPhon,
|
||||||
|
handleTree,
|
||||||
|
parseTime,
|
||||||
|
resetForm,
|
||||||
|
selectDictLabel,
|
||||||
|
selectDictLabels
|
||||||
} from '@/utils/ruoyi';
|
} from '@/utils/ruoyi';
|
||||||
|
import { getConfigKey, updateConfigByKey } from '@/api/system/config';
|
||||||
|
import { getDictionaryByKey, useDict } from '@/utils/dict';
|
||||||
|
|
||||||
import { App } from 'vue';
|
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) {
|
export default function installPlugin(app: App) {
|
||||||
// 页签操作
|
// 页签操作
|
||||||
@ -51,6 +52,7 @@ export default function installPlugin(app: App) {
|
|||||||
app.config.globalProperties.selectDictLabel = selectDictLabel;
|
app.config.globalProperties.selectDictLabel = selectDictLabel;
|
||||||
app.config.globalProperties.selectDictLabels = selectDictLabels;
|
app.config.globalProperties.selectDictLabels = selectDictLabels;
|
||||||
app.config.globalProperties.animate = animate;
|
app.config.globalProperties.animate = animate;
|
||||||
|
app.config.globalProperties.getPhon = getPhon;
|
||||||
app.config.globalProperties.addDateRange3 = addDateRange3;
|
app.config.globalProperties.addDateRange3 = addDateRange3;
|
||||||
app.config.globalProperties.resetForm = resetForm;
|
app.config.globalProperties.resetForm = resetForm;
|
||||||
app.config.globalProperties.addDateRange2 = addDateRange2;
|
app.config.globalProperties.addDateRange2 = addDateRange2;
|
||||||
|
@ -294,7 +294,15 @@ export function getHiddenDetailAddress(data) {
|
|||||||
}
|
}
|
||||||
return result;
|
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 {
|
export default {
|
||||||
handleTree
|
handleTree
|
||||||
};
|
};
|
||||||
|
@ -51,20 +51,20 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="用户信息" prop="nickName" width="120" align="center">
|
<el-table-column label="用户信息" prop="nickName" width="120" align="center">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<div>{{ scope.row.nickName }}</div>
|
<div>{{ scope.row.nickname }}</div>
|
||||||
<div>{{ scope.row.phone }}</div>
|
<div>{{ scope.row.phone }}</div>
|
||||||
<div>{{ scope.row.mark }}</div>
|
<!-- <div>{{ scope.row.mark }}</div> -->
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="退款金额" prop="applyReturnAmount" width="120" align="center" />
|
<el-table-column label="退款金额" prop="returnAmount" width="120" align="center" />
|
||||||
<el-table-column label="售后类型" prop="applyRefundType" width="80" align="center">
|
<el-table-column label="售后类型" prop="type" width="80" align="center">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<el-tag effect="plain" size="default" :type="getAftersaleTypeTag(scope.row)">{{ getAftersaleTypeText(scope.row) }} </el-tag>
|
<el-tag effect="plain" size="default" :type="getAftersaleTypeTag(scope.row)">{{ getAftersaleTypeText(scope.row) }} </el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="申请时间" prop="applyRefundTime" width="180" align="center">
|
<el-table-column label="申请时间" prop="createTime" width="180" align="center">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<span>{{ parseTime(scope.row.applyRefundTime, '') }}</span>
|
<span>{{ parseTime(scope.row.createTime, '') }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="处理时间" prop="handleTime" width="180" align="center">
|
<el-table-column label="处理时间" prop="handleTime" width="180" align="center">
|
||||||
@ -73,7 +73,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="原因" prop="reason" width="220" align="center" />
|
<el-table-column label="原因" prop="reason" width="220" align="center" />
|
||||||
<el-table-column label="处理备注" prop="note" width="150" align="center" />
|
<el-table-column label="处理备注" prop="handleNote" width="150" align="center" />
|
||||||
<el-table-column label="处理人员" prop="handleMan" width="100" align="center" />
|
<el-table-column label="处理人员" prop="handleMan" width="100" align="center" />
|
||||||
<el-table-column label="订单编号/操作" class-name="small-padding fixed-width" width="220" fixed="right" align="center">
|
<el-table-column label="订单编号/操作" class-name="small-padding fixed-width" width="220" fixed="right" align="center">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
@ -422,7 +422,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
getAftersaleStatusText(row) {
|
getAftersaleStatusText(row) {
|
||||||
switch (row.aftersaleStatus) {
|
switch (row.status) {
|
||||||
case 0:
|
case 0:
|
||||||
return '待处理';
|
return '待处理';
|
||||||
case 1:
|
case 1:
|
||||||
@ -444,7 +444,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
getAftersaleTypeText(row) {
|
getAftersaleTypeText(row) {
|
||||||
switch (row.applyRefundType) {
|
switch (row.type) {
|
||||||
case 1:
|
case 1:
|
||||||
return '退款';
|
return '退款';
|
||||||
case 2:
|
case 2:
|
||||||
|
@ -137,8 +137,8 @@
|
|||||||
<span v-for="(value, key) in JSON.parse(item.spData)">{{ key }}:{{ value }} </span>
|
<span v-for="(value, key) in JSON.parse(item.spData)">{{ key }}:{{ value }} </span>
|
||||||
</div>
|
</div>
|
||||||
<div class="product-item quantity">
|
<div class="product-item quantity">
|
||||||
<span style="margin-right: 10px">¥{{ item.salePrice }}</span>
|
<span style="margin-right: 10px">¥{{ item.price }}</span>
|
||||||
<span>x{{ item.buyNum }}</span>
|
<span>x{{ item.stock }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
499
src/views/system/divide/index.vue
Normal file
499
src/views/system/divide/index.vue
Normal file
@ -0,0 +1,499 @@
|
|||||||
|
<template>
|
||||||
|
<div class="p-2">
|
||||||
|
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||||
|
<div v-show="showSearch" class="mb-[10px]">
|
||||||
|
<!--店铺名称、负责人、联系人、推广人、店铺类型、地址、签约状态 -->
|
||||||
|
<el-card shadow="hover">
|
||||||
|
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
||||||
|
<el-form-item label="名称:" prop="storeName" label-width="100px">
|
||||||
|
<el-input v-model="queryParams.templateName" placeholder="请输入名称" clearable @keyup.enter="handleQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="类型:" prop="isActive" label-width="100px">
|
||||||
|
<el-select v-model="queryParams.isActive" placeholder="请选择类型" clearable>
|
||||||
|
<el-option label="启用" value="1" />
|
||||||
|
<el-option label="禁用" value="0" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||||
|
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</el-card>
|
||||||
|
</div>
|
||||||
|
</transition>
|
||||||
|
|
||||||
|
<el-card shadow="hover">
|
||||||
|
<template #header>
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button v-hasPermi="['system:tenant:add']" type="primary" plain icon="Plus" @click="handleAdd">新增</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" border :data="tenantList">
|
||||||
|
<el-table-column v-if="false" label="id" align="center" prop="id" />
|
||||||
|
<el-table-column label="名称" align="center" prop="templateName" />
|
||||||
|
<el-table-column label="类型" align="center" prop="templateType">
|
||||||
|
<template #default="scope">
|
||||||
|
{{ scope.row.templateType == 1 ? '商品' : '成交额' }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="描述" align="center" prop="description" />
|
||||||
|
<el-table-column label="创建时间" align="center" prop="createTime" />
|
||||||
|
<el-table-column label="更新时间" align="center" prop="updateTime" />
|
||||||
|
|
||||||
|
<el-table-column width="180" label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-tooltip content="增加规则" placement="top">
|
||||||
|
<el-button v-hasPermi="['system:tenant:edit']" link type="primary" @click="funseach(scope.row)">
|
||||||
|
<el-icon><Plus /></el-icon>
|
||||||
|
</el-button>
|
||||||
|
</el-tooltip>
|
||||||
|
<el-tooltip content="修改" placement="top">
|
||||||
|
<el-button v-hasPermi="['system:tenant:edit']" link type="primary" icon="Edit" @click="handleUpdate(scope.row)"></el-button>
|
||||||
|
</el-tooltip>
|
||||||
|
<el-tooltip content="删除" placement="top">
|
||||||
|
<el-button v-hasPermi="['system:tenant:remove']" link type="primary" icon="Delete" @click="handleDelete(scope.row)"></el-button>
|
||||||
|
</el-tooltip>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination v-show="total > 0" v-model:current="queryParams.current" v-model:size="queryParams.size" :total="total" @pagination="getList" />
|
||||||
|
</el-card>
|
||||||
|
<!-- 添加/修改模板 -->
|
||||||
|
<el-dialog v-model="dialog.visible" :title="dialog.title" width="800px" append-to-body>
|
||||||
|
<el-form ref="tenantFormRef" :model="form" :rules="rules">
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="名称" prop="templateName">
|
||||||
|
<el-input v-model="form.templateName" placeholder="请输入名称" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="类型" prop="templateType">
|
||||||
|
<el-select v-model="form.templateType" placeholder="请选择类型">
|
||||||
|
<el-option label="商品" value="1" />
|
||||||
|
<el-option label="成交额" value="2" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="描述" prop="description">
|
||||||
|
<el-input v-model="form.description" type="textarea" :rows="3" placeholder="请输入描述" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
<template #footer>
|
||||||
|
<div class="dialog-footer">
|
||||||
|
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
<!-- 查看模板 -->
|
||||||
|
<el-dialog v-model="sexDialog.visible" :title="sexDialog.title" width="800px" append-to-body>
|
||||||
|
<el-form ref="secformRef" :model="secform" v-if="mul == '1'">
|
||||||
|
<el-button v-hasPermi="['system:tenant:add']" type="primary" plain icon="Plus" @click="addform" style="margin-bottom: 10px">新增</el-button>
|
||||||
|
<el-row :gutter="20" v-for="(item, index) in templateDetailList" :key="index">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="种类:" :prop="'templateDetailList[' + index + '].rateName'">
|
||||||
|
<el-select v-model="item.rateName" placeholder="请选择" clearable>
|
||||||
|
<el-option v-for="item in enterpriseList" :key="item.value" :label="item.label" :value="item.value" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="10">
|
||||||
|
<el-form-item label="比例:" :prop="'templateDetailList[' + index + '].rate'">
|
||||||
|
<el-input v-model="item.rate" type="text" placeholder="请输入0.00" clearable />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="2">
|
||||||
|
<el-form-item label="" prop="templateType">
|
||||||
|
<el-button v-hasPermi="['system:tenant:remove']" link type="primary" icon="Delete" @click="deleteList(index, item.id)"></el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
<!-- //区间 -->
|
||||||
|
<el-form ref="constdfromRef" :model="secform" :rules="constfrules" v-else>
|
||||||
|
<el-button v-hasPermi="['system:tenant:add']" type="primary" plain icon="Plus" @click="conadd" style="margin-bottom: 10px">新增</el-button>
|
||||||
|
<el-row :gutter="20" v-for="(item, index) in constdfrom" :key="index">
|
||||||
|
<el-col :span="7">
|
||||||
|
<el-form-item label="小于:" :prop="'constdfrom[' + index + '].minAmount'">
|
||||||
|
<el-input v-model="item.minAmount" type="text" placeholder="请输入" clearable />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="大于:" :prop="'constdfrom[' + index + '].maxAmount'">
|
||||||
|
<el-input v-model="item.maxAmount" type="text" placeholder="请输入" clearable />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="比例:" :prop="'constdfrom[' + index + '].rate'">
|
||||||
|
<el-input v-model="item.rate" type="text" placeholder="请输入0.00" clearable />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1">
|
||||||
|
<el-form-item label="" prop="templateType">
|
||||||
|
<el-button v-hasPermi="['system:tenant:remove']" link type="primary" icon="Delete" @click="condele(index, item.id)"></el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
<template #footer>
|
||||||
|
<div class="dialog-footer">
|
||||||
|
<el-button :loading="buttonLoading" type="primary" @click="addsectionasync">确 定</el-button>
|
||||||
|
<el-button @click="clearfun">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup name="Tenant" lang="ts">
|
||||||
|
import { listDivide, addTenant, addsection, getsections, putsections, deletesection, delTenant, updateTenant } from '@/api/system/divide';
|
||||||
|
import { TenantForm, TenantQuery, TenantVO } from '@/api/system/types';
|
||||||
|
import { getDictionaryByKey } from '@/utils/dict';
|
||||||
|
import { selectTenantPackage } from '@/api/system/tenantPackage';
|
||||||
|
import { useUserStore } from '@/store/modules/user';
|
||||||
|
// import { TenantForm, TenantQuery, TenantVO, TenantModal, enterpriseType } from '@/api/system/tenant/types';
|
||||||
|
import { TenantPkgVO } from '@/api/system/tenantPackage/types';
|
||||||
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
|
const userStore = useUserStore();
|
||||||
|
|
||||||
|
const tenantList = ref<TenantVO[]>([]);
|
||||||
|
const packageList = ref<TenantPkgVO[]>([]);
|
||||||
|
|
||||||
|
const buttonLoading = ref(false);
|
||||||
|
const loading = ref(true);
|
||||||
|
const showSearch = ref(true);
|
||||||
|
const ids = ref<Array<string | number>>([]);
|
||||||
|
const total = ref(0);
|
||||||
|
|
||||||
|
const queryFormRef = ref<ElFormInstance>();
|
||||||
|
const tenantFormRef = ref<ElFormInstance>();
|
||||||
|
|
||||||
|
const dialog = reactive<DialogOption>({
|
||||||
|
visible: false,
|
||||||
|
title: ''
|
||||||
|
});
|
||||||
|
const sexDialog = ref<DialogOption>({
|
||||||
|
visible: false,
|
||||||
|
title: ''
|
||||||
|
});
|
||||||
|
//商品
|
||||||
|
const templateDetailList = ref([]);
|
||||||
|
|
||||||
|
const secform = ref({
|
||||||
|
templateId: '',
|
||||||
|
templateList: ''
|
||||||
|
});
|
||||||
|
const addform = () => {
|
||||||
|
templateDetailList.value.push({
|
||||||
|
rateName: '',
|
||||||
|
rate: ''
|
||||||
|
});
|
||||||
|
};
|
||||||
|
const deleteList = (index: any, id: any) => {
|
||||||
|
templateDetailList.value.splice(index, 1);
|
||||||
|
if (id) {
|
||||||
|
deletesection(id);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
//成交额
|
||||||
|
const constdfrom = ref([]);
|
||||||
|
const conadd = () => {
|
||||||
|
constdfrom.value.push({
|
||||||
|
minAmount: '',
|
||||||
|
maxAmount: '',
|
||||||
|
rate: ''
|
||||||
|
});
|
||||||
|
};
|
||||||
|
const condele = (index: any, id: any) => {
|
||||||
|
constdfrom.value.splice(index, 1);
|
||||||
|
if (id) {
|
||||||
|
deletesection(id);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const constfrules = ref({
|
||||||
|
minAmount: [
|
||||||
|
{ required: true, message: '请输入最小金额', trigger: 'blur' },
|
||||||
|
{ pattern: /^\d+(\.\d{1,4})?$/, message: '金额格式应为数字,最多保留四位小数', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
maxAmount: [
|
||||||
|
{ required: true, message: '请输入最大金额', trigger: 'blur' },
|
||||||
|
{ pattern: /^\d+(\.\d{1,4})?$/, message: '金额格式应为数字,最多保留四位小数', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
rate: [
|
||||||
|
{ required: true, message: '请输入比例', trigger: 'blur' },
|
||||||
|
{ pattern: /^\d+(\.\d{1,4})?$/, message: '比例格式应为数字,最多保留四位小数', trigger: 'blur' }
|
||||||
|
]
|
||||||
|
});
|
||||||
|
const mul = ref<string>('');
|
||||||
|
const isFuttl = ref<boolean>(false);
|
||||||
|
//详情数据
|
||||||
|
const funseach = (data: any) => {
|
||||||
|
getTenantPackage();
|
||||||
|
sexDialog.value.visible = true;
|
||||||
|
secform.value.templateId = data.id;
|
||||||
|
mul.value = data.templateType;
|
||||||
|
sexDialog.value.title = '模板详情';
|
||||||
|
getsections({ 'templateId': data.id }).then((res: any) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
if (res.data.length > 0) {
|
||||||
|
console.log(res.data.length);
|
||||||
|
|
||||||
|
isFuttl.value = true;
|
||||||
|
if (data.templateType == '1') {
|
||||||
|
res.data.forEach((item: any) => {
|
||||||
|
templateDetailList.value.push({
|
||||||
|
rateName: item.rateName,
|
||||||
|
rate: item.rate,
|
||||||
|
id: item.id
|
||||||
|
});
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
res.data.forEach((item: any) => {
|
||||||
|
constdfrom.value.push({
|
||||||
|
minAmount: item.minAmount,
|
||||||
|
maxAmount: item.maxAmount,
|
||||||
|
rate: item.rate,
|
||||||
|
id: item.id
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
isFuttl.value = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
const secformRef = ref<ElFormInstance>();
|
||||||
|
const constdfromRef = ref<ElFormInstance>();
|
||||||
|
//模板比例添加
|
||||||
|
const addsectionasync = async () => {
|
||||||
|
//修改
|
||||||
|
if (isFuttl.value) {
|
||||||
|
if (mul.value == '1') {
|
||||||
|
secformRef.value?.validate(async (valid: boolean) => {
|
||||||
|
if (valid) {
|
||||||
|
// const valuefn = JSON.stringify(templateDetailList.value);
|
||||||
|
secform.value.templateList = JSON.stringify(templateDetailList.value);
|
||||||
|
const res = await putsections(secform.value);
|
||||||
|
if (res.code == 200) {
|
||||||
|
isFuttl.value = false;
|
||||||
|
ElMessage.success('修改成功');
|
||||||
|
sexDialog.value.visible = false;
|
||||||
|
getList();
|
||||||
|
secform.value = {
|
||||||
|
templateId: '',
|
||||||
|
templateList: ''
|
||||||
|
};
|
||||||
|
templateDetailList.value = [];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
constdfromRef.value?.validate(async (valid: boolean) => {
|
||||||
|
if (valid) {
|
||||||
|
// const valuefn = JSON.stringify(constdfrom.value);
|
||||||
|
secform.value.templateList = JSON.stringify(constdfrom.value);
|
||||||
|
const res = await putsections(secform.value);
|
||||||
|
if (res.code == 200) {
|
||||||
|
isFuttl.value = false;
|
||||||
|
ElMessage.success('修改成功');
|
||||||
|
sexDialog.value.visible = false;
|
||||||
|
getList();
|
||||||
|
secform.value = {
|
||||||
|
templateId: '',
|
||||||
|
templateList: ''
|
||||||
|
};
|
||||||
|
constdfrom.value = [];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
//添加
|
||||||
|
addsecfun();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const addsecfun = () => {
|
||||||
|
if (mul.value == '1') {
|
||||||
|
secformRef.value?.validate(async (valid: boolean) => {
|
||||||
|
if (valid) {
|
||||||
|
secform.value.templateList = JSON.stringify(templateDetailList.value);
|
||||||
|
const res = await addsection(secform.value);
|
||||||
|
if (res.code == 200) {
|
||||||
|
isFuttl.value = false;
|
||||||
|
ElMessage.success('新增成功');
|
||||||
|
sexDialog.value.visible = false;
|
||||||
|
getList();
|
||||||
|
secform.value = {
|
||||||
|
templateId: '',
|
||||||
|
templateList: ''
|
||||||
|
};
|
||||||
|
templateDetailList.value = [];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
constdfromRef.value?.validate(async (valid: boolean) => {
|
||||||
|
if (valid) {
|
||||||
|
secform.value.templateList = JSON.stringify(constdfrom.value);
|
||||||
|
const res = await addsection(secform.value);
|
||||||
|
if (res.code == 200) {
|
||||||
|
isFuttl.value = false;
|
||||||
|
ElMessage.success('新增成功');
|
||||||
|
sexDialog.value.visible = false;
|
||||||
|
getList();
|
||||||
|
secform.value = {
|
||||||
|
templateId: '',
|
||||||
|
templateList: ''
|
||||||
|
};
|
||||||
|
constdfrom.value = [];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const clearfun = () => {
|
||||||
|
sexDialog.value.visible = false;
|
||||||
|
secform.value.templateId = '';
|
||||||
|
secform.value = {
|
||||||
|
templateId: '',
|
||||||
|
templateList: ''
|
||||||
|
};
|
||||||
|
};
|
||||||
|
const enterpriseList = ref([]); // 种类
|
||||||
|
const getByKey = async () => {
|
||||||
|
const value1 = await getDictionaryByKey('rate_name');
|
||||||
|
enterpriseList.value = value1;
|
||||||
|
};
|
||||||
|
const initFormData: TenantForm = {
|
||||||
|
id: null,
|
||||||
|
templateName: '',
|
||||||
|
templateType: '',
|
||||||
|
description: ''
|
||||||
|
};
|
||||||
|
|
||||||
|
const data = reactive<PageData<TenantForm, TenantQuery>>({
|
||||||
|
form: { ...initFormData },
|
||||||
|
queryParams: {
|
||||||
|
current: 1,
|
||||||
|
size: 10,
|
||||||
|
templateName: '',
|
||||||
|
isActive: ''
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
id: [{ required: true, message: 'id不能为空', trigger: 'blur' }],
|
||||||
|
templateName: [{ required: true, message: '模板名称不能为空', trigger: 'blur' }],
|
||||||
|
templateType: [{ required: true, message: '模板类型不能为空', trigger: 'blur' }],
|
||||||
|
description: [{ required: true, message: '模板描述不能为空', trigger: 'blur' }]
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
const { queryParams, form, rules } = toRefs(data);
|
||||||
|
|
||||||
|
/** 查询所有租户套餐 */
|
||||||
|
const getTenantPackage = async () => {
|
||||||
|
const res = await selectTenantPackage();
|
||||||
|
packageList.value = res.data;
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 查询租户列表 */
|
||||||
|
const getList = async () => {
|
||||||
|
loading.value = true;
|
||||||
|
const res = await listDivide(queryParams.value);
|
||||||
|
tenantList.value = res.data.records;
|
||||||
|
total.value = res.data.total;
|
||||||
|
loading.value = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
// 取消按钮
|
||||||
|
const cancel = () => {
|
||||||
|
reset();
|
||||||
|
dialog.visible = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
// 表单重置
|
||||||
|
const reset = () => {
|
||||||
|
form.value = { ...initFormData };
|
||||||
|
tenantFormRef.value?.resetFields();
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
const handleQuery = () => {
|
||||||
|
queryParams.value.current = 1;
|
||||||
|
getList();
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
const resetQuery = () => {
|
||||||
|
queryFormRef.value?.resetFields();
|
||||||
|
handleQuery();
|
||||||
|
};
|
||||||
|
|
||||||
|
// // 多选框选中数据
|
||||||
|
// const handleSelectionChange = (selection: TenantVO[]) => {
|
||||||
|
// ids.value = selection.map((item) => item.id);
|
||||||
|
// single.value = selection.length != 1;
|
||||||
|
// multiple.value = !selection.length;
|
||||||
|
// };
|
||||||
|
|
||||||
|
/** 新增按钮操作 */
|
||||||
|
const handleAdd = () => {
|
||||||
|
reset();
|
||||||
|
getTenantPackage();
|
||||||
|
dialog.visible = true;
|
||||||
|
dialog.title = '新增模板';
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
const handleUpdate = async (row?: TenantVO) => {
|
||||||
|
reset();
|
||||||
|
await getTenantPackage();
|
||||||
|
const _id = row?.id;
|
||||||
|
// const res = await getTenant(_id);
|
||||||
|
Object.assign(form.value, row);
|
||||||
|
dialog.visible = true;
|
||||||
|
dialog.title = '修改模板';
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 提交按钮 */
|
||||||
|
const submitForm = () => {
|
||||||
|
tenantFormRef.value?.validate(async (valid: boolean) => {
|
||||||
|
if (valid) {
|
||||||
|
buttonLoading.value = true;
|
||||||
|
if (form.value.id) {
|
||||||
|
await updateTenant(form.value).finally(() => (buttonLoading.value = false));
|
||||||
|
} else {
|
||||||
|
await addTenant(form.value).finally(() => (buttonLoading.value = false));
|
||||||
|
}
|
||||||
|
proxy?.$modal.msgSuccess('操作成功');
|
||||||
|
dialog.visible = false;
|
||||||
|
await getList();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
const handleDelete = async (row?: TenantVO) => {
|
||||||
|
const _ids = row?.id || ids.value;
|
||||||
|
await proxy?.$modal.confirm('是否确认删除租户编号为"' + _ids + '"的数据项?');
|
||||||
|
loading.value = true;
|
||||||
|
await delTenant(_ids).finally(() => (loading.value = false));
|
||||||
|
await getList();
|
||||||
|
proxy?.$modal.msgSuccess('删除成功');
|
||||||
|
};
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
getByKey();
|
||||||
|
getList();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<style scoped lang="scss"></style>
|
BIN
src/views/system/tenant/d.png
Normal file
BIN
src/views/system/tenant/d.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.0 KiB |
@ -2,19 +2,36 @@
|
|||||||
<div class="p-2">
|
<div class="p-2">
|
||||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||||
<div v-show="showSearch" class="mb-[10px]">
|
<div v-show="showSearch" class="mb-[10px]">
|
||||||
|
<!--店铺名称、负责人、联系人、推广人、店铺类型、地址、签约状态 -->
|
||||||
<el-card shadow="hover">
|
<el-card shadow="hover">
|
||||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
||||||
<el-form-item label="租户编号" prop="tenantId">
|
<el-form-item label="店铺名称:" prop="storeName" label-width="100px">
|
||||||
<el-input v-model="queryParams.tenantId" placeholder="请输入租户编号" clearable @keyup.enter="handleQuery" />
|
<el-input v-model="queryParams.storeName" placeholder="请输入店铺名称" clearable @keyup.enter="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="联系人" prop="contactUserName">
|
<el-form-item label="负责人:" prop="personName" label-width="100px">
|
||||||
|
<el-input v-model="queryParams.personName" placeholder="请输入负责人" clearable @keyup.enter="handleQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="联系人:" prop="contactUserName" label-width="100px">
|
||||||
<el-input v-model="queryParams.contactUserName" placeholder="请输入联系人" clearable @keyup.enter="handleQuery" />
|
<el-input v-model="queryParams.contactUserName" placeholder="请输入联系人" clearable @keyup.enter="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="联系电话" prop="contactPhone">
|
<!-- <el-form-item label="推广人" prop="companyName">
|
||||||
<el-input v-model="queryParams.contactPhone" placeholder="请输入联系电话" clearable @keyup.enter="handleQuery" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="企业名称" prop="companyName">
|
|
||||||
<el-input v-model="queryParams.companyName" placeholder="请输入企业名称" clearable @keyup.enter="handleQuery" />
|
<el-input v-model="queryParams.companyName" placeholder="请输入企业名称" clearable @keyup.enter="handleQuery" />
|
||||||
|
</el-form-item> -->
|
||||||
|
<el-form-item label="企业名称:" prop="companyName" label-width="100px">
|
||||||
|
<el-input v-model="queryParams.companyName" placeholder="请输入企业名称" clearable @keyup.enter="handleQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="店铺类型:" prop="companyName" label-width="100px">
|
||||||
|
<el-select v-model="queryParams.companyType" placeholder="请选择店铺类型" style="width: 100%" clearable>
|
||||||
|
<el-option v-for="(item, index) in enterpriseList" :key="index" :label="item.label" :value="item.value" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="地址:" prop="address" label-width="100px">
|
||||||
|
<el-input v-model="queryParams.address" placeholder="请输入企业名称" clearable @keyup.enter="handleQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="签约状态:" prop="signStatus" label-width="100px">
|
||||||
|
<el-select v-model="queryParams.signStatus" placeholder="请选择签约状态" clearable>
|
||||||
|
<el-option v-for="(item, index) in signList" :key="index" :label="item.label" :value="item.value" />
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||||
@ -54,27 +71,40 @@
|
|||||||
<el-table v-loading="loading" border :data="tenantList" @selection-change="handleSelectionChange">
|
<el-table v-loading="loading" border :data="tenantList" @selection-change="handleSelectionChange">
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
<el-table-column v-if="false" label="id" align="center" prop="id" />
|
<el-table-column v-if="false" label="id" align="center" prop="id" />
|
||||||
<el-table-column label="租户编号" align="center" prop="tenantId" />
|
<el-table-column label="店铺名称" align="center" prop="storeName" />
|
||||||
<el-table-column label="联系人" align="center" prop="contactUserName" />
|
<el-table-column label="企业名称" align="center" prop="companyName" />
|
||||||
|
<el-table-column label="企业地址" align="center" prop="address" />
|
||||||
|
<el-table-column label="负责人" align="center" prop="personName" />
|
||||||
|
<el-table-column label="负责人联系电话" align="center" prop="personPhone">
|
||||||
|
<template #default="scope">
|
||||||
|
{{ getPhon(scope.row.personPhone) }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="邀请人" align="center" prop="inviteUserName" />
|
||||||
|
|
||||||
|
<!-- <el-table-column label="联系人" align="center" prop="contactUserName" />
|
||||||
<el-table-column label="联系电话" align="center" prop="contactPhone" />
|
<el-table-column label="联系电话" align="center" prop="contactPhone" />
|
||||||
<el-table-column label="身份证号" align="center" prop="idCard" />
|
<el-table-column label="身份证号" align="center" prop="idCard" />
|
||||||
<el-table-column label="银行卡号" align="center" prop="bankCard" />
|
<el-table-column label="银行卡号" align="center" prop="bankCard" />
|
||||||
<el-table-column label="企业名称" align="center" prop="companyName" />
|
|
||||||
<el-table-column label="社会信用代码" align="center" prop="licenseNumber" min-width="100" />
|
<el-table-column label="社会信用代码" align="center" prop="licenseNumber" min-width="100" />
|
||||||
<el-table-column label="营业执照" align="center" prop="businessLicense" />
|
<el-table-column label="营业执照" align="center" prop="businessLicense" />
|
||||||
<el-table-column label="邀请人" align="center" prop="businessLicense" />
|
|
||||||
<el-table-column label="过期时间" align="center" prop="expireTime" width="180">
|
<el-table-column label="过期时间" align="center" prop="expireTime" width="180">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span>{{ proxy.parseTime(scope.row.expireTime, '{y}-{m}-{d}') }}</span>
|
<span>{{ proxy.parseTime(scope.row.expireTime, '{y}-{m}-{d}') }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column> -->
|
||||||
<el-table-column label="租户状态" align="center" prop="status">
|
<el-table-column label="租户状态" align="center" prop="status">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-switch v-model="scope.row.status" active-value="0" inactive-value="1" @change="handleStatusChange(scope.row)"></el-switch>
|
<el-switch v-model="scope.row.status" active-value="0" inactive-value="1" @change="handleStatusChange(scope.row)"></el-switch>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column width="150" label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
|
<el-table-column width="180" label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
|
<el-tooltip content="查看" placement="top">
|
||||||
|
<el-button v-hasPermi="['system:tenant:edit']" link type="primary" @click="funseach(scope.row, true)">
|
||||||
|
<el-icon><Search /></el-icon>
|
||||||
|
</el-button>
|
||||||
|
</el-tooltip>
|
||||||
<el-tooltip content="封禁记录" placement="top">
|
<el-tooltip content="封禁记录" placement="top">
|
||||||
<el-button v-hasPermi="['system:tenant:edit']" link type="primary" icon="User" @click="showTenantBannedInfoModal(scope.row, true)">
|
<el-button v-hasPermi="['system:tenant:edit']" link type="primary" icon="User" @click="showTenantBannedInfoModal(scope.row, true)">
|
||||||
</el-button>
|
</el-button>
|
||||||
@ -93,7 +123,7 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<pagination v-show="total > 0" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" :total="total" @pagination="getList" />
|
<pagination v-show="total > 0" v-model:current="queryParams.current" v-model:size="queryParams.size" :total="total" @pagination="getList" />
|
||||||
</el-card>
|
</el-card>
|
||||||
<!--租户封禁记录-->
|
<!--租户封禁记录-->
|
||||||
<el-dialog title="店铺封禁信息" v-model="tenantBannedInfoModalVisible" width="900px" append-to-body>
|
<el-dialog title="店铺封禁信息" v-model="tenantBannedInfoModalVisible" width="900px" append-to-body>
|
||||||
@ -141,66 +171,182 @@
|
|||||||
/>
|
/>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<!-- 添加或修改租户对话框 -->
|
<!-- 添加或修改租户对话框 -->
|
||||||
<el-dialog v-model="dialog.visible" :title="dialog.title" width="500px" append-to-body>
|
<el-dialog v-model="dialog.visible" :title="dialog.title" width="1200px" append-to-body>
|
||||||
<el-form ref="tenantFormRef" :model="form" :rules="rules" label-width="80px">
|
<el-form ref="tenantFormRef" :model="form" :rules="rules">
|
||||||
<el-form-item label="企业名称" prop="companyName">
|
<!-- 基本信息组 -->
|
||||||
|
<div class="form-group">
|
||||||
|
<h3 class="group-title">店铺信息</h3>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="店铺名称:" prop="storeName">
|
||||||
|
<el-input v-model="form.storeName" placeholder="请输入店铺名称" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="企业名称:" prop="companyName">
|
||||||
<el-input v-model="form.companyName" placeholder="请输入企业名称" />
|
<el-input v-model="form.companyName" placeholder="请输入企业名称" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="联系人" prop="contactUserName">
|
</el-col>
|
||||||
<el-input v-model="form.contactUserName" placeholder="请输入联系人" />
|
<el-col :span="8">
|
||||||
|
<el-form-item label="统一社会信用代码:" prop="licenseNumber">
|
||||||
|
<el-input v-model="form.licenseNumber" placeholder="请输入统一社会信用代码" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="联系电话" prop="contactPhone">
|
</el-col>
|
||||||
<el-input v-model="form.contactPhone" placeholder="请输入联系电话" />
|
<el-col :span="8">
|
||||||
</el-form-item>
|
<el-form-item label="企业类型:" prop="companyType">
|
||||||
<el-form-item v-if="!form.id" label="用户名" prop="username">
|
<el-select v-model="form.companyType" placeholder="请选择企业类型" style="width: 100%" clearable>
|
||||||
<el-input v-model="form.username" placeholder="请输入系统用户名" maxlength="30" />
|
<el-option v-for="(item, index) in enterpriseList" :key="index" :label="item.label" :value="item.value" />
|
||||||
</el-form-item>
|
|
||||||
<el-form-item v-if="!form.id" label="用户密码" prop="password">
|
|
||||||
<el-input v-model="form.password" type="password" placeholder="请输入系统用户密码" maxlength="20" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="租户套餐" prop="packageId">
|
|
||||||
<el-select v-model="form.packageId" :disabled="!!form.tenantId" placeholder="请选择租户套餐" clearable style="width: 100%">
|
|
||||||
<el-option v-for="item in packageList" :key="item.packageId" :label="item.packageName" :value="item.packageId" />
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="过期时间" prop="expireTime">
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="经营类型:" prop="businessTypesjson">
|
||||||
|
<el-select v-model="businessTypesjson" placeholder="请选择经营类型(可多选)" multiple collapse-tags style="width: 100%" clearable>
|
||||||
|
<el-option v-for="(item, index) in manageList" :key="index" :label="item.label" :value="item.value" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="企业地址:" prop="address">
|
||||||
|
<el-input v-model="form.address" placeholder="请输入企业地址" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="营业执照附件:" prop="attachment">
|
||||||
|
<oss-image-upload v-model="form.attachment" :limit="1"> </oss-image-upload>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="推广图片:" prop="promoteList">
|
||||||
|
<oss-image-upload v-model="form.promoteList" :limit="1"> </oss-image-upload>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="相关资质及附件:" prop="related">
|
||||||
|
<oss-image-upload v-model="form.related" :limit="1"> </oss-image-upload>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="营业执照号:" prop="businessLicense">
|
||||||
|
<el-input v-model="form.businessLicense" placeholder="请输入营业执照号" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="营业执照有效期:" prop="expireTime">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
:style="{ width: '100%' }"
|
|
||||||
v-model="form.expireTime"
|
v-model="form.expireTime"
|
||||||
clearable
|
clearable
|
||||||
type="datetime"
|
type="datetime"
|
||||||
value-format="YYYY-MM-DD HH:mm:ss"
|
value-format="YYYY-MM-DD HH:mm:ss"
|
||||||
placeholder="请选择过期时间"
|
placeholder="请选择营业执照有效期"
|
||||||
>
|
>
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="用户数量" prop="accountCount">
|
</el-col>
|
||||||
<el-input v-model="form.accountCount" placeholder="请输入用户数量" />
|
<el-col :span="8">
|
||||||
</el-form-item>
|
<el-form-item label="绑定域名:" prop="domain">
|
||||||
<el-form-item label="绑定域名" prop="domain">
|
|
||||||
<el-input v-model="form.domain" placeholder="请输入绑定域名" />
|
<el-input v-model="form.domain" placeholder="请输入绑定域名" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="企业地址" prop="address">
|
</el-col>
|
||||||
<el-input v-model="form.address" placeholder="请输入企业地址" />
|
<el-col :span="8">
|
||||||
</el-form-item>
|
<el-form-item label="企业简介:" prop="intro">
|
||||||
<el-form-item label="企业代码" prop="licenseNumber">
|
|
||||||
<el-input v-model="form.licenseNumber" placeholder="请输入统一社会信用代码" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="企业简介" prop="intro">
|
|
||||||
<el-input v-model="form.intro" type="textarea" placeholder="请输入企业简介" />
|
<el-input v-model="form.intro" type="textarea" placeholder="请输入企业简介" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<h3 class="group-title">人员信息</h3>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="企业负责人:" prop="personName">
|
||||||
|
<el-input v-model="form.personName" type="text" placeholder="请输入企业负责人" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="企业负责人电话:" prop="personPhone">
|
||||||
|
<el-input v-model="form.personPhone" type="text" placeholder="请输入企业负责人电话" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
<el-form-item label="营业执照" prop="businessLicense">
|
<el-col :span="8">
|
||||||
<el-input v-model="form.businessLicense" placeholder="请输入营业执照编号" />
|
<el-form-item label="负责人证件类型:" prop="idCardType">
|
||||||
|
<el-select v-model="form.idCardType" placeholder="请选择负责人证件类型" style="width: 100%" clearable>
|
||||||
|
<el-option v-for="(item, index) in certificateList" :key="index" :label="item.label" :value="item.value" />
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="身份证号" prop="idCard">
|
</el-col>
|
||||||
<el-input v-model="form.idCard" placeholder="请输入身份证号" />
|
<el-col :span="8">
|
||||||
|
<el-form-item label="负责人证件信息:" prop="idCard">
|
||||||
|
<el-input v-model="form.idCard" placeholder="请输入负责人证件信息" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="银行卡号" prop="bankCard">
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="证件信息:" prop="certificate">
|
||||||
|
<oss-image-upload v-model="form.certificate" :limit="2"> </oss-image-upload>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<h3 class="group-title">收款账号信息</h3>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="银行卡类型:" prop="bankType">
|
||||||
|
<el-select v-model="form.bankType" placeholder="请选择银行卡类型" style="width: 100%" clearable>
|
||||||
|
<el-option v-for="(item, index) in bankList" :key="index" :label="item.label" :value="item.value" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="开户行全称:" prop="bankName">
|
||||||
|
<el-input v-model="form.bankName" placeholder="请输入开户行全称" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="开户卡账号:" prop="bankCard">
|
||||||
<el-input v-model="form.bankCard" placeholder="请输入银行卡号" />
|
<el-input v-model="form.bankCard" placeholder="请输入银行卡号" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="邀请人" prop="inviteUserId">
|
</el-col>
|
||||||
<!-- <el-input v-model="form.inviteUserId" placeholder="请输入邀请人" />-->
|
<el-col :span="8">
|
||||||
|
<el-form-item label="绑定银行卡的手机号:" prop="bankPhone">
|
||||||
|
<el-input v-model="form.bankPhone" type="text" placeholder="请输入绑定银行卡的手机号" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<h3 class="group-title">用户信息</h3>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="用户名:" prop="username">
|
||||||
|
<el-input v-model="form.username" placeholder="请输入系统用户名" maxlength="30" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="用户密码:" prop="password">
|
||||||
|
<el-input v-model="form.password" type="password" placeholder="请输入系统用户密码" maxlength="20" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="联系人:" prop="contactUserName">
|
||||||
|
<el-input v-model="form.contactUserName" placeholder="请输入联系人" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="联系电话:" prop="contactPhone">
|
||||||
|
<el-input v-model="form.contactPhone" placeholder="请输入联系电话" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="租户套餐:" prop="packageId">
|
||||||
|
<el-select v-model="form.packageId" :disabled="!!form.tenantId" placeholder="请选择租户套餐" clearable style="width: 100%">
|
||||||
|
<el-option v-for="item in packageList" :key="item.packageId" :label="item.packageName" :value="item.packageId" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="邀请人:" prop="inviteUserId">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="form.inviteUserId"
|
v-model="form.inviteUserId"
|
||||||
placeholder="请选择邀请人"
|
placeholder="请选择邀请人"
|
||||||
@ -215,10 +361,264 @@
|
|||||||
<el-option v-for="item in userSelectOption" :key="item.id" :label="item.nickname" :value="item.id" />
|
<el-option v-for="item in userSelectOption" :key="item.id" :label="item.nickname" :value="item.id" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
<el-form-item label="备注" prop="remark">
|
<el-col :span="8">
|
||||||
<el-input v-model="form.remark" placeholder="请输入备注" />
|
<el-form-item label="备注:" prop="remark">
|
||||||
|
<el-input v-model="form.remark" placeholder="请输入备注" type="textarea" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<h3 class="group-title">签约信息</h3>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="签约日期" prop="signDate">
|
||||||
|
<el-date-picker v-model="form.signDate" type="datetime" clearable value-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择签约日期" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="分成比例" prop="splitRatio">
|
||||||
|
<el-input v-model="form.splitRatio" type="text" placeholder="请输入分成比例" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="签约人" prop="signer" align="left">
|
||||||
|
<el-input v-model="form.signer" placeholder="请输入签约人" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="合同年限" prop="contractYear" align="left">
|
||||||
|
<el-input v-model="form.contractYear" placeholder="请输入合同年限" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="签约附件" prop="contractAttachment" align="left">
|
||||||
|
<oss-image-upload v-model="form.contractAttachment" :limit="1"> </oss-image-upload>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="签约状态" prop="signStatus" align="left">
|
||||||
|
<el-select v-model="form.signStatus" placeholder="请选择签约状态" clearable>
|
||||||
|
<el-option v-for="(item, index) in signList" :key="index" :label="item.label" :value="item.value" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
</el-form>
|
||||||
|
<template #footer>
|
||||||
|
<div class="dialog-footer">
|
||||||
|
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
<!-- 查看详情 -->
|
||||||
|
<el-dialog v-model="sexDialog.visible" :title="sexDialog.title" width="1200px" append-to-body>
|
||||||
|
<el-form ref="tenantFormRef" :model="form" :rules="rules">
|
||||||
|
<!-- 基本信息组 -->
|
||||||
|
<div class="form-group">
|
||||||
|
<h3 class="group-title">店铺信息</h3>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="店铺名称:" prop="storeName">
|
||||||
|
{{ tenantForm.storeName }}
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="企业名称:" prop="companyName">
|
||||||
|
{{ tenantForm.companyName }}
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="统一社会信用代码:" prop="licenseNumber">
|
||||||
|
{{ tenantForm.licenseNumber }}
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="企业类型:" prop="companyType">
|
||||||
|
{{ enterprisefun(tenantForm.companyType) }}
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="经营类型:" prop="businessTypes">
|
||||||
|
{{ managefun(tenantForm.businessTypes) }}
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="企业地址:" prop="address">
|
||||||
|
{{ tenantForm.address }}
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="营业执照附件:" prop="attachment">
|
||||||
|
<el-image style="width: 100px; height: 100px" :src="tenantForm.attachment" fit="cover" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="推广图片:" prop="promoteList">
|
||||||
|
<el-image style="width: 100px; height: 100px" :src="tenantForm.promoteList" fit="cover" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="相关资质及附件:" prop="related">
|
||||||
|
<el-image style="width: 100px; height: 100px" :src="tenantForm.related" fit="cover" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="营业执照号:" prop="businessLicense">
|
||||||
|
{{ tenantForm.businessLicense }}
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="营业执照有效期:" prop="expireTime">
|
||||||
|
{{ tenantForm.expireTime }}
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="绑定域名:" prop="domain">
|
||||||
|
{{ tenantForm.domain }}
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="企业简介:" prop="intro">
|
||||||
|
{{ tenantForm.intro }}
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<h3 class="group-title">人员信息</h3>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="企业负责人:" prop="personName">
|
||||||
|
{{ tenantForm.personName }}
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="企业负责人电话:" prop="personPhone">
|
||||||
|
{{ tenantForm.personPhone }}
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="负责人证件类型:" prop="idCardType">
|
||||||
|
{{ certificatefun(tenantForm.idCardType) }}
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="负责人证件信息:" prop="idCard">
|
||||||
|
{{ tenantForm.idCard }}
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="证件信息:" prop="certificate">
|
||||||
|
<div v-for="fit in tenantForm.certificate.split(',')" :key="fit" class="block">
|
||||||
|
<el-image style="width: 100px; height: 100px" :src="fit" :fit="fit" />
|
||||||
|
</div>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<h3 class="group-title">收款账号信息</h3>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="银行卡类型:" prop="bankType">
|
||||||
|
{{ bankfun(tenantForm.bankType) }}
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="开户行全称:" prop="bankName">
|
||||||
|
{{ tenantForm.bankName }}
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="开户卡账号:" prop="bankCard">
|
||||||
|
{{ tenantForm.bankCard }}
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="绑定银行卡的手机号:" prop="bankPhone">
|
||||||
|
{{ tenantForm.bankPhone }}
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<h3 class="group-title">用户信息</h3>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="用户名:" prop="username">
|
||||||
|
{{ tenantForm.username }}
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="用户密码:" prop="password">
|
||||||
|
{{ tenantForm.password }}
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="联系人:" prop="contactUserName">
|
||||||
|
{{ tenantForm.contactUserName }}
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="联系电话:" prop="contactPhone">
|
||||||
|
{{ tenantForm.contactPhone }}
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="租户套餐:" prop="packageId">
|
||||||
|
{{ packagefun(tenantForm.packageId) }}
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="邀请人:" prop="inviteUserName">
|
||||||
|
{{ tenantForm.inviteUserName }}
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="备注:" prop="remark">
|
||||||
|
{{ tenantForm.remark }}
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<h3 class="group-title">签约信息</h3>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="签约日期:" prop="signDate">
|
||||||
|
{{ tenantForm.signDate }}
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="分成比例:" prop="splitRatio">
|
||||||
|
{{ tenantForm.splitRatio }}
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="签约人:" prop="signer" align="left">
|
||||||
|
{{ tenantForm.signer }}
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="合同年限:" prop="contractYear" align="left"> {{ tenantForm.contractYear }}年 </el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="签约附件:" prop="contractAttachment" align="left">
|
||||||
|
<el-image style="width: 100px; height: 100px" :src="tenantForm.contractAttachment" fit="cover" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="签约状态:" prop="signStatus" align="left">
|
||||||
|
{{ signfun(tenantForm.signStatus) }}
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
</el-form>
|
</el-form>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<div class="dialog-footer">
|
<div class="dialog-footer">
|
||||||
@ -243,18 +643,19 @@ import {
|
|||||||
getTenantBannelList
|
getTenantBannelList
|
||||||
} from '@/api/system/tenant';
|
} from '@/api/system/tenant';
|
||||||
import { listUmsMember } from '@/api/ums/member';
|
import { listUmsMember } from '@/api/ums/member';
|
||||||
|
import { getDictionaryByKey } from '@/utils/dict';
|
||||||
import { selectTenantPackage } from '@/api/system/tenantPackage';
|
import { selectTenantPackage } from '@/api/system/tenantPackage';
|
||||||
import { useUserStore } from '@/store/modules/user';
|
import { useUserStore } from '@/store/modules/user';
|
||||||
import { TenantForm, TenantQuery, TenantVO, TenantModal } from '@/api/system/tenant/types';
|
import { TenantForm, TenantQuery, TenantVO, TenantModal, enterpriseType } from '@/api/system/tenant/types';
|
||||||
import { TenantPkgVO } from '@/api/system/tenantPackage/types';
|
import { TenantPkgVO } from '@/api/system/tenantPackage/types';
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
|
const baseUrl = import.meta.env.VITE_APP_BASE_API;
|
||||||
|
const uploadFileUrl = ref(baseUrl + '/resource/oss/upload'); // 上传文件服务器地址
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
const userId = ref(userStore.userId);
|
const userId = ref(userStore.userId);
|
||||||
const tenantList = ref<TenantVO[]>([]);
|
const tenantList = ref<TenantVO[]>([]);
|
||||||
const packageList = ref<TenantPkgVO[]>([]);
|
const packageList = ref<TenantPkgVO[]>([]);
|
||||||
|
|
||||||
const buttonLoading = ref(false);
|
const buttonLoading = ref(false);
|
||||||
const loading = ref(true);
|
const loading = ref(true);
|
||||||
const showSearch = ref(true);
|
const showSearch = ref(true);
|
||||||
@ -272,7 +673,7 @@ const bannedDataParams = ref({
|
|||||||
|
|
||||||
const userSelectLoading = ref(false);
|
const userSelectLoading = ref(false);
|
||||||
const userSelectOption = ref([]);
|
const userSelectOption = ref([]);
|
||||||
|
const userSelectfun = (query: string) => {};
|
||||||
// 用户封禁记录
|
// 用户封禁记录
|
||||||
const tenantBannedInfo = ref<TenantModal>({
|
const tenantBannedInfo = ref<TenantModal>({
|
||||||
total: 0,
|
total: 0,
|
||||||
@ -290,50 +691,168 @@ const dialog = reactive<DialogOption>({
|
|||||||
visible: false,
|
visible: false,
|
||||||
title: ''
|
title: ''
|
||||||
});
|
});
|
||||||
|
const sexDialog = ref<DialogOption>({
|
||||||
|
visible: false,
|
||||||
|
title: ''
|
||||||
|
});
|
||||||
|
//详情数据
|
||||||
|
const tenantForm = ref<TenantForm>();
|
||||||
|
const funseach = (data) => {
|
||||||
|
getTenantPackage();
|
||||||
|
sexDialog.value.visible = true;
|
||||||
|
tenantForm.value = data;
|
||||||
|
};
|
||||||
|
// 解析JSON格式字符串为数组
|
||||||
|
const parseJsonString = (data) => {
|
||||||
|
// 1. 非字符串类型直接返回空数组
|
||||||
|
if (typeof data !== 'string') {
|
||||||
|
console.error('输入不是字符串类型:', data);
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
// 2. 尝试JSON解析
|
||||||
|
const parsedData = JSON.parse(data);
|
||||||
|
// 3. 验证解析结果是否为数组
|
||||||
|
if (Array.isArray(parsedData)) {
|
||||||
|
return parsedData;
|
||||||
|
} else {
|
||||||
|
console.error('解析结果不是数组:', parsedData);
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const managefun = (data: any) => {
|
||||||
|
const dataArray = data.split(',');
|
||||||
|
console.log(typeof dataArray);
|
||||||
|
let finds = '';
|
||||||
|
dataArray.forEach((item) => {
|
||||||
|
const matchedItem = manageList.value.find((option: any) => option.value === item);
|
||||||
|
finds += matchedItem ? matchedItem.label + ',' : '';
|
||||||
|
});
|
||||||
|
return finds;
|
||||||
|
};
|
||||||
|
const certificatefun = (data: any) => {
|
||||||
|
return certificateList.value.find((item) => item.value === data)?.label;
|
||||||
|
};
|
||||||
|
const enterprisefun = (data: any) => {
|
||||||
|
return enterpriseList.value.find((item) => item.value === data)?.label;
|
||||||
|
};
|
||||||
|
const bankfun = (data: any) => {
|
||||||
|
return bankList.value.find((item) => item.value === data)?.label;
|
||||||
|
};
|
||||||
|
const signfun = (data: any) => {
|
||||||
|
return signList.value.find((item) => item.value === data)?.label;
|
||||||
|
};
|
||||||
|
const enterpriseList = ref([]); // 企业类型
|
||||||
|
const manageList = ref([]); // 经营类型
|
||||||
|
const certificateList = ref([]); // 证件类型
|
||||||
|
const bankList = ref([]); // 银行类型
|
||||||
|
const signList = ref([]); // 签约状态
|
||||||
|
const getByKey = async () => {
|
||||||
|
const value1 = await getDictionaryByKey('sys_enterprise_type');
|
||||||
|
enterpriseList.value = value1;
|
||||||
|
const orderStatusresulttype = await getDictionaryByKey('sys_manage_type');
|
||||||
|
manageList.value = orderStatusresulttype;
|
||||||
|
const orderStatusreasontype = await getDictionaryByKey('sys_certificate_type');
|
||||||
|
certificateList.value = orderStatusreasontype;
|
||||||
|
const orderStatusaimobject = await getDictionaryByKey('sys_bank_type');
|
||||||
|
bankList.value = orderStatusaimobject;
|
||||||
|
const orderStatusstatus = await getDictionaryByKey('sys_sign_status');
|
||||||
|
signList.value = orderStatusstatus;
|
||||||
|
};
|
||||||
|
const businessTypesjson = ref([]); //经营类型
|
||||||
const initFormData: TenantForm = {
|
const initFormData: TenantForm = {
|
||||||
id: undefined,
|
id: undefined,
|
||||||
tenantId: undefined,
|
tenantId: undefined,
|
||||||
contactUserName: '',
|
storeName: '', //店铺名称
|
||||||
contactPhone: '',
|
contactUserName: '', //联系人
|
||||||
username: '',
|
contactPhone: '', //联系电话
|
||||||
password: '',
|
username: '', //用户名
|
||||||
companyName: '',
|
password: '', //用户密码
|
||||||
licenseNumber: '',
|
companyName: '', //企业名称
|
||||||
domain: '',
|
licenseNumber: '', //统一社会信用代码
|
||||||
address: '',
|
domain: '', //绑定域名
|
||||||
intro: '',
|
address: '', //企业地址
|
||||||
remark: '',
|
intro: '', //企业简介
|
||||||
packageId: '',
|
remark: '', //备注
|
||||||
expireTime: '',
|
packageId: '', //租户套餐
|
||||||
|
expireTime: '', //营业执照有效期,
|
||||||
accountCount: 0,
|
accountCount: 0,
|
||||||
status: '0',
|
status: '0', //是否启用状态
|
||||||
businessLicense: '',
|
businessLicense: '', //营业执照号
|
||||||
idCard: '',
|
idCard: '', //负责人证件信息/身份证号
|
||||||
bankCard: '',
|
bankCard: '', //开户卡账号
|
||||||
inviteUserId: ''
|
bankType: '', //开户行类型
|
||||||
|
bankName: '', //开户行名称
|
||||||
|
bankPhone: '', //开户行预留手机号
|
||||||
|
inviteUserId: '', //邀请人
|
||||||
|
companyType: '', //企业类型
|
||||||
|
businessTypes: '', //经营类型
|
||||||
|
|
||||||
|
idCardType: '', //负责人证件类型
|
||||||
|
personName: '', //负责人姓名
|
||||||
|
personPhone: '', //负责人电话
|
||||||
|
signDate: '', //签约日期
|
||||||
|
splitRatio: 0, //分成比例
|
||||||
|
signer: '', //签约人
|
||||||
|
contractYear: '', //合同年限
|
||||||
|
signStatus: '', //签约状态
|
||||||
|
contractAttachment: '', //签约附件
|
||||||
|
attachment: '', //营业执照附件
|
||||||
|
promoteList: '', //推广附件
|
||||||
|
related: '', //相关资质及附件
|
||||||
|
certificate: '' //身份证附件
|
||||||
};
|
};
|
||||||
|
|
||||||
const data = reactive<PageData<TenantForm, TenantQuery>>({
|
const data = reactive<PageData<TenantForm, TenantQuery>>({
|
||||||
form: { ...initFormData },
|
form: { ...initFormData },
|
||||||
queryParams: {
|
queryParams: {
|
||||||
pageNum: 1,
|
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
tenantId: '',
|
pageNum: 1,
|
||||||
contactUserName: '',
|
current: 1,
|
||||||
contactPhone: '',
|
size: 10,
|
||||||
companyName: ''
|
tenantId: null,
|
||||||
|
personName: null, //负责人姓名
|
||||||
|
storeName: null, //店铺名称
|
||||||
|
contactUserName: null, //联系人
|
||||||
|
companyName: null, //企业名称
|
||||||
|
companyType: null, //企业类型
|
||||||
|
address: null, //地址
|
||||||
|
signStatus: null //签约状态
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
id: [{ required: true, message: 'id不能为空', trigger: 'blur' }],
|
id: [{ required: true, message: 'id不能为空', trigger: 'blur' }],
|
||||||
tenantId: [{ required: true, message: '租户编号不能为空', trigger: 'blur' }],
|
tenantId: [{ required: true, message: '租户编号不能为空', trigger: 'blur' }],
|
||||||
contactUserName: [{ required: true, message: '联系人不能为空', trigger: 'blur' }],
|
contactUserName: [{ required: true, message: '联系人不能为空', trigger: 'blur' }],
|
||||||
contactPhone: [{ required: true, message: '联系电话不能为空', trigger: 'blur' }],
|
contactPhone: [{ required: true, message: '联系电话不能为空', trigger: 'blur' }],
|
||||||
companyName: [{ required: true, message: '企业名称不能为空', trigger: 'blur' }],
|
contractAttachment: [{ required: true, message: '签约附件不能为空', trigger: 'blur' }],
|
||||||
|
attachment: [{ required: true, message: '营业执照附件不能为空', trigger: 'blur' }],
|
||||||
businessLicense: [{ required: true, message: '营业执照编号不能为空', trigger: 'blur' }],
|
certificate: [{ required: true, message: '身份证附件不能为空', trigger: 'blur' }],
|
||||||
|
promoteList: [{ required: true, message: '推广附件不能为空', trigger: 'blur' }],
|
||||||
|
packageId: [{ required: true, message: '套餐编号不能为空', trigger: 'blur' }],
|
||||||
|
related: [{ required: true, message: '相关资质及附件不能为空', trigger: 'blur' }],
|
||||||
|
storeName: [{ required: true, message: '店铺名称不能为空', trigger: 'blur' }],
|
||||||
|
personName: [{ required: true, message: '负责人姓名不能为空', trigger: 'blur' }],
|
||||||
|
personPhone: [{ required: true, message: '负责人电话不能为空', trigger: 'blur' }],
|
||||||
|
signer: [{ required: true, message: '签约人不能为空', trigger: 'blur' }],
|
||||||
|
licenseNumber: [{ required: true, message: '统一社会信用代码不能为空', trigger: 'blur' }],
|
||||||
|
companyType: [{ required: true, message: '企业类型不能为空', trigger: 'blur' }],
|
||||||
|
businessTypes: [{ required: true, message: '经营类型不能为空', trigger: 'blur' }],
|
||||||
|
address: [{ required: true, message: '企业地址不能为空', trigger: 'blur' }],
|
||||||
|
contractYear: [{ required: true, message: '合同年限不能为空', trigger: 'blur' }],
|
||||||
|
signStatus: [{ required: true, message: '签约状态不能为空', trigger: 'blur' }],
|
||||||
|
inviteUserId: [{ required: true, message: '邀请人不能为空', trigger: 'blur' }],
|
||||||
|
splitRatio: [{ required: true, message: '分成比例不能为空', trigger: 'blur' }],
|
||||||
|
businessLicense: [{ required: true, message: '营业执照号不能为空', trigger: 'blur' }],
|
||||||
|
expireTime: [{ required: true, message: '到期时间不能为空', trigger: 'blur' }],
|
||||||
|
idCardType: [{ required: true, message: '身份证类型不能为空', trigger: 'blur' }],
|
||||||
idCard: [{ required: true, message: '身份证不能为空', trigger: 'blur' }],
|
idCard: [{ required: true, message: '身份证不能为空', trigger: 'blur' }],
|
||||||
bankCard: [{ required: true, message: '银行卡不能为空', trigger: 'blur' }],
|
bankCard: [{ required: true, message: '银行卡不能为空', trigger: 'blur' }],
|
||||||
|
bankType: [{ required: true, message: '银行类型不能为空', trigger: 'blur' }],
|
||||||
|
bankName: [{ required: true, message: '开户行名称不能为空', trigger: 'blur' }],
|
||||||
username: [
|
username: [
|
||||||
{ required: true, message: '用户名不能为空', trigger: 'blur' },
|
{ required: true, message: '用户名不能为空', trigger: 'blur' },
|
||||||
{ min: 2, max: 20, message: '用户名称长度必须介于 2 和 20 之间', trigger: 'blur' }
|
{ min: 2, max: 20, message: '用户名称长度必须介于 2 和 20 之间', trigger: 'blur' }
|
||||||
@ -352,7 +871,10 @@ const getTenantPackage = async () => {
|
|||||||
const res = await selectTenantPackage();
|
const res = await selectTenantPackage();
|
||||||
packageList.value = res.data;
|
packageList.value = res.data;
|
||||||
};
|
};
|
||||||
|
const packagefun = (data) => {
|
||||||
|
console.log(packageList.value);
|
||||||
|
return packageList.value.find((item) => item.packageId === data)?.packageName;
|
||||||
|
};
|
||||||
// 查询人员列表
|
// 查询人员列表
|
||||||
const getUserListByName = (params: string) => {
|
const getUserListByName = (params: string) => {
|
||||||
if (params) {
|
if (params) {
|
||||||
@ -374,8 +896,8 @@ const getUserListByName = (params: string) => {
|
|||||||
const getList = async () => {
|
const getList = async () => {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
const res = await listTenant(queryParams.value);
|
const res = await listTenant(queryParams.value);
|
||||||
tenantList.value = res.rows;
|
tenantList.value = res.data.records;
|
||||||
total.value = res.total;
|
total.value = res.data.total;
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -441,7 +963,7 @@ const reset = () => {
|
|||||||
|
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
const handleQuery = () => {
|
const handleQuery = () => {
|
||||||
queryParams.value.pageNum = 1;
|
queryParams.value.current = 1;
|
||||||
getList();
|
getList();
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -463,7 +985,7 @@ const handleAdd = () => {
|
|||||||
reset();
|
reset();
|
||||||
getTenantPackage();
|
getTenantPackage();
|
||||||
dialog.visible = true;
|
dialog.visible = true;
|
||||||
dialog.title = '添加租户';
|
dialog.title = '新增店铺';
|
||||||
};
|
};
|
||||||
|
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
@ -472,6 +994,7 @@ const handleUpdate = async (row?: TenantVO) => {
|
|||||||
await getTenantPackage();
|
await getTenantPackage();
|
||||||
const _id = row?.id || ids.value[0];
|
const _id = row?.id || ids.value[0];
|
||||||
const res = await getTenant(_id);
|
const res = await getTenant(_id);
|
||||||
|
businessTypesjson.value = res.data.businessTypes.split(',');
|
||||||
Object.assign(form.value, res.data);
|
Object.assign(form.value, res.data);
|
||||||
dialog.visible = true;
|
dialog.visible = true;
|
||||||
dialog.title = '修改租户';
|
dialog.title = '修改租户';
|
||||||
@ -485,6 +1008,7 @@ const submitForm = () => {
|
|||||||
if (form.value.id) {
|
if (form.value.id) {
|
||||||
await updateTenant(form.value).finally(() => (buttonLoading.value = false));
|
await updateTenant(form.value).finally(() => (buttonLoading.value = false));
|
||||||
} else {
|
} else {
|
||||||
|
form.value.businessTypes = businessTypesjson.value.join(',');
|
||||||
await addTenant(form.value).finally(() => (buttonLoading.value = false));
|
await addTenant(form.value).finally(() => (buttonLoading.value = false));
|
||||||
}
|
}
|
||||||
proxy?.$modal.msgSuccess('操作成功');
|
proxy?.$modal.msgSuccess('操作成功');
|
||||||
@ -538,6 +1062,51 @@ const handleSyncTenantDict = async () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
getByKey();
|
||||||
getList();
|
getList();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.form-group {
|
||||||
|
margin-bottom: 24px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.group-title {
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: 500;
|
||||||
|
margin-bottom: 16px;
|
||||||
|
color: #1f2937;
|
||||||
|
padding-left: 8px;
|
||||||
|
border-left: 3px solid #409eff;
|
||||||
|
}
|
||||||
|
.upload__tip {
|
||||||
|
background: url('./d.png') no-repeat;
|
||||||
|
background-size: 100% 100%;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
::v-deep {
|
||||||
|
#searc {
|
||||||
|
.el-form-item--default .el-form-item__label {
|
||||||
|
width: 100px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.el-form-item__content {
|
||||||
|
width: 240px;
|
||||||
|
}
|
||||||
|
.el-form-item--default .el-form-item__label {
|
||||||
|
width: 150px;
|
||||||
|
}
|
||||||
|
.el-upload--picture-card {
|
||||||
|
width: 100px;
|
||||||
|
height: 100px;
|
||||||
|
}
|
||||||
|
.el-upload-list {
|
||||||
|
width: 320px;
|
||||||
|
.el-upload-list__item {
|
||||||
|
width: 100px;
|
||||||
|
height: 100px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
@ -9,6 +9,15 @@
|
|||||||
<el-form-item label="手机号码" prop="phone">
|
<el-form-item label="手机号码" prop="phone">
|
||||||
<el-input v-model.trim="queryParams.phone" placeholder="请输入手机号码" clearable />
|
<el-input v-model.trim="queryParams.phone" placeholder="请输入手机号码" clearable />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="类型" prop="type">
|
||||||
|
<!-- 1 用户 2 商家 3 代理 4 平台 -->
|
||||||
|
<el-select v-model="queryParams.type" placeholder="请选择" clearable>
|
||||||
|
<el-option label="用户" value="1" />
|
||||||
|
<el-option label="商家" value="2" />
|
||||||
|
<el-option label="代理" value="3" />
|
||||||
|
<el-option label="平台" value="4" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item class="flex_one tr">
|
<el-form-item class="flex_one tr">
|
||||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||||
@ -17,15 +26,15 @@
|
|||||||
</el-card>
|
</el-card>
|
||||||
<el-card shadow="hover">
|
<el-card shadow="hover">
|
||||||
<el-table v-loading="loading" :data="umsAccountList" border empty-text="暂无数据">
|
<el-table v-loading="loading" :data="umsAccountList" border empty-text="暂无数据">
|
||||||
<el-table-column label="昵称" prop="name" />
|
<el-table-column label="昵称" prop="nickname" align="center" />
|
||||||
<el-table-column label="手机号" prop="phone" />
|
<el-table-column label="手机号" prop="phone" align="center" />
|
||||||
<el-table-column label="钱包" prop="wallet">
|
<el-table-column label="钱包" prop="wallet" align="center">
|
||||||
<template v-slot="scope"> ¥ {{ scope.row.wallet || '0.00' }} </template>
|
<template v-slot="scope"> ¥ {{ scope.row.wallet || '0.00' }} </template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="营收" prop="revenue">
|
<el-table-column label="营收" prop="revenue" align="center">
|
||||||
<template v-slot="scope"> ¥ {{ scope.row.revenue || '0.00' }} </template>
|
<template v-slot="scope"> ¥ {{ scope.row.revenue || '0.00' }} </template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="积分余额" prop="integral">
|
<el-table-column label="积分余额" prop="integral" align="center">
|
||||||
<template v-slot="scope"> ¥ {{ scope.row.integral || '0.00' }} </template>
|
<template v-slot="scope"> ¥ {{ scope.row.integral || '0.00' }} </template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@ -60,7 +69,8 @@ export default {
|
|||||||
current: 1,
|
current: 1,
|
||||||
size: 10,
|
size: 10,
|
||||||
name: null,
|
name: null,
|
||||||
phone: null
|
phone: null,
|
||||||
|
type: null
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@ -74,7 +84,7 @@ export default {
|
|||||||
// type:账户类型 1 用户 2 商家 3 代理 4 平台
|
// type:账户类型 1 用户 2 商家 3 代理 4 平台
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
const { current: pageNum, size: pageSize } = this.queryParams;
|
const { current: pageNum, size: pageSize } = this.queryParams;
|
||||||
const query = { ...this.queryParams, type: 1, pageNum: undefined, pageSize: undefined };
|
const query = { ...this.queryParams, pageNum: undefined, pageSize: undefined };
|
||||||
const pageReq = { current: pageNum - 1, size: pageSize };
|
const pageReq = { current: pageNum - 1, size: pageSize };
|
||||||
getUserAccountList(query, pageReq).then((response) => {
|
getUserAccountList(query, pageReq).then((response) => {
|
||||||
const { records = [], total = 0 } = response.data || {};
|
const { records = [], total = 0 } = response.data || {};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user