no message

main
HUOJIN\92525 2025-10-31 18:03:10 +08:00
parent 692c969065
commit 0284e53b77
56 changed files with 494 additions and 502 deletions

View File

@ -162,12 +162,12 @@ export const passwordChange = (params) => defHttp.get({ url: Api.passwordChange,
* @description: * @description:
*/ */
export function thirdLogin(params, mode: ErrorMessageMode = 'modal') { export function thirdLogin(params, mode: ErrorMessageMode = 'modal') {
//==========begin 第三方登录/auth2登录需要传递租户id=========== //==========begin 第三方登录/auth2登录需要传递仓库id===========
let tenantId = "0"; let tenantId = "0";
if(!params.tenantId){ if(!params.tenantId){
tenantId = params.tenantId; tenantId = params.tenantId;
} }
//==========end 第三方登录/auth2登录需要传递租户id=========== //==========end 第三方登录/auth2登录需要传递仓库id===========
return defHttp.get<LoginResultModel>( return defHttp.get<LoginResultModel>(
{ {
url: `${Api.thirdLogin}/${params.token}/${params.thirdType}/${tenantId}`, url: `${Api.thirdLogin}/${params.token}/${params.thirdType}/${tenantId}`,

View File

@ -60,6 +60,12 @@
text = text.substring(1, text.length - 1); text = text.substring(1, text.length - 1);
} }
break; break;
case JInputTypeEnum.JINPUT_LEFT_LIKE:
text = text.substring(0, text.length - 1);
break;
case JInputTypeEnum.JINPUT_RIGHT_LIKE:
text = text.substring(0, text.length - 1);
break;
case JInputTypeEnum.JINPUT_QUERY_NE: case JInputTypeEnum.JINPUT_QUERY_NE:
text = text.substring(1); text = text.substring(1);
break; break;
@ -87,6 +93,12 @@
case JInputTypeEnum.JINPUT_QUERY_LIKE: case JInputTypeEnum.JINPUT_QUERY_LIKE:
text = '*' + text + '*'; text = '*' + text + '*';
break; break;
case JInputTypeEnum.JINPUT_LEFT_LIKE:
text = '*' + text;
break;
case JInputTypeEnum.JINPUT_RIGHT_LIKE:
text = text + '*';
break;
case JInputTypeEnum.JINPUT_QUERY_NE: case JInputTypeEnum.JINPUT_QUERY_NE:
text = '!' + text; text = '!' + text;
break; break;

View File

@ -1,65 +1,68 @@
<template> <template>
<a-range-picker v-model:value="rangeValue" @change="handleChange" :show-time="datetime" :placeholder="placeholder" :valueFormat="valueFormat"/> <a-range-picker v-model:value="rangeValue" @change="handleChange" :show-time="datetime" :placeholder="placeholder" :valueFormat="valueFormat" />
</template> </template>
<script> <script>
import { defineComponent, ref, watch, computed } from 'vue'; import { defineComponent, ref, watch, computed } from 'vue';
import { propTypes } from '/@/utils/propTypes'; import { propTypes } from '/@/utils/propTypes';
import { Form } from 'ant-design-vue'; import { Form } from 'ant-design-vue';
const placeholder = ['开始日期', '结束日期'] const placeholder = ['开始日期', '结束日期'];
/** /**
* 用于范围查询 * 用于范围查询
*/ */
export default defineComponent({ export default defineComponent({
name: "JRangeDate", name: 'JRangeDate',
props:{ props: {
value: propTypes.string.def(''), value: propTypes.string.def(''),
datetime: propTypes.bool.def(false), datetime: propTypes.bool.def(false),
placeholder: propTypes.string.def(''), placeholder: propTypes.string.def(''),
},
emits: ['change', 'update:value'],
setup(props, { emit }) {
const rangeValue = ref([]);
const formItemContext = Form.useInjectFormItemContext();
watch(
() => props.value,
(val) => {
if (val) {
rangeValue.value = val.split(',');
} else {
rangeValue.value = [];
}
}, },
emits:['change', 'update:value'], { immediate: true }
setup(props, {emit}){ );
const rangeValue = ref([])
const formItemContext = Form.useInjectFormItemContext();
watch(()=>props.value, (val)=>{ const valueFormat = computed(() => {
if(val){ if (props.datetime === true) {
rangeValue.value = val.split(',') return 'YYYY-MM-DD HH:mm:ss';
}else{ } else {
rangeValue.value = [] return 'YYYY-MM-DD';
}
}, {immediate: true});
const valueFormat = computed(()=>{
if(props.datetime === true){
return 'YYYY-MM-DD HH:mm:ss'
}else{
return 'YYYY-MM-DD'
}
});
function handleChange(arr){
let str = ''
if(arr && arr.length>0){
// update-begin--author:liaozhiyang---date:20240710---for[issues/6368] rangeDateallowEmpty
str = arr.join(',')
// update-end--author:liaozhiyang---date:20240710---for[issues/6368] rangeDateallowEmpty
}
emit('change', str);
emit('update:value', str);
formItemContext.onFieldChange();
}
return {
rangeValue,
placeholder,
valueFormat,
handleChange
}
} }
}); });
function handleChange(arr) {
let str = '';
if (arr && arr.length > 0) {
// update-begin--author:liaozhiyang---date:20240710---for[issues/6368] rangeDateallowEmpty
str = arr.join(',');
// update-end--author:liaozhiyang---date:20240710---for[issues/6368] rangeDateallowEmpty
}
emit('change', str);
emit('update:value', str);
formItemContext.onFieldChange();
}
return {
rangeValue,
placeholder,
valueFormat,
handleChange,
};
},
});
</script> </script>
<style scoped> <style scoped></style>
</style>

View File

@ -27,7 +27,7 @@ export const APP_LOCAL_CACHE_KEY = 'COMMON__LOCAL__KEY__';
// base global session key // base global session key
export const APP_SESSION_CACHE_KEY = 'COMMON__SESSION__KEY__'; export const APP_SESSION_CACHE_KEY = 'COMMON__SESSION__KEY__';
// 租户 key // 仓库 key
export const TENANT_ID = 'TENANT_ID'; export const TENANT_ID = 'TENANT_ID';
// login info key // login info key
export const LOGIN_INFO_KEY = 'LOGIN__INFO__'; export const LOGIN_INFO_KEY = 'LOGIN__INFO__';
@ -35,7 +35,7 @@ export const LOGIN_INFO_KEY = 'LOGIN__INFO__';
// 聊天UID key // 聊天UID key
export const CPTE_CHAT_UID = 'CPTE_CHAT_UID'; export const CPTE_CHAT_UID = 'CPTE_CHAT_UID';
// 免登录租户id与系统分开避免重复 // 免登录仓库id与系统分开避免重复
export const OAUTH2_THIRD_LOGIN_TENANT_ID = 'THIRD_LOGIN_TENANT_ID'; export const OAUTH2_THIRD_LOGIN_TENANT_ID = 'THIRD_LOGIN_TENANT_ID';
// ai助手标识退出需要记录一下 // ai助手标识退出需要记录一下

View File

@ -4,6 +4,12 @@
export enum JInputTypeEnum { export enum JInputTypeEnum {
//模糊 //模糊
JINPUT_QUERY_LIKE = 'like', JINPUT_QUERY_LIKE = 'like',
//左模糊
JINPUT_LEFT_LIKE = 'left_like',
JINPUT_RIGHT_LIKE = 'right_like',
//非 //非
JINPUT_QUERY_NE = 'ne', JINPUT_QUERY_NE = 'ne',
//大于等于 //大于等于

View File

@ -41,7 +41,7 @@ export enum ConfigEnum {
TIMESTAMP = 'X-TIMESTAMP', TIMESTAMP = 'X-TIMESTAMP',
// Sign // Sign
Sign = 'X-Sign', Sign = 'X-Sign',
// 租户id // 仓库id
TENANT_ID = 'X-Tenant-Id', TENANT_ID = 'X-Tenant-Id',
// 版本 // 版本
VERSION = 'X-Version', VERSION = 'X-Version',

View File

@ -6,9 +6,9 @@
<template #label> <template #label>
<a-tooltip placement="topLeft"> <a-tooltip placement="topLeft">
<template #title> <template #title>
<span>您隶属于多租户请选择当前所属租户</span> <span>您隶属于多仓库请选择当前所属仓库</span>
</template> </template>
<a-avatar style="background-color: #87d068" :size="30"> 租户 </a-avatar> <a-avatar style="background-color: #87d068" :size="30"> 仓库 </a-avatar>
</a-tooltip> </a-tooltip>
</template> </template>
<!--部门下拉内容--> <!--部门下拉内容-->
@ -100,14 +100,14 @@
async function show() { async function show() {
// //
await loadDepartList(); await loadDepartList();
// //
await loadTenantList(); await loadTenantList();
// //
if (unref(isMultiTenant) && unref(isMultiDepart)) { if (unref(isMultiTenant) && unref(isMultiDepart)) {
currTitle.value = '切换租户和部门'; currTitle.value = '切换仓库和部门';
} else if (unref(isMultiTenant)) { } else if (unref(isMultiTenant)) {
currTitle.value = currTitle.value =
unref(currentTenantName) && unref(currentTenantName).length > 0 ? `租户切换(当前租户 :${unref(currentTenantName)}` : props.title; unref(currentTenantName) && unref(currentTenantName).length > 0 ? `仓库切换(当前仓库 :${unref(currentTenantName)}` : props.title;
} else if (unref(isMultiDepart)) { } else if (unref(isMultiDepart)) {
currTitle.value = currTitle.value =
unref(currentDepartName) && unref(currentDepartName).length > 0 ? `部门切换(当前部门 :${unref(currentDepartName)}` : props.title; unref(currentDepartName) && unref(currentDepartName).length > 0 ? `部门切换(当前部门 :${unref(currentDepartName)}` : props.title;
@ -132,7 +132,7 @@
isMultiDepart.value = true; isMultiDepart.value = true;
} }
/** /**
*加载租户信息 *加载仓库信息
*/ */
async function loadTenantList() { async function loadTenantList() {
const result = await getUserTenants(); const result = await getUserTenants();
@ -165,8 +165,8 @@
userStore.setTenant(unref(tenantSelected)); userStore.setTenant(unref(tenantSelected));
} }
createMessage.success('切换成功'); createMessage.success('切换成功');
// //
window.location.reload(); window.location.reload();
}) })
.catch((e) => { .catch((e) => {

View File

@ -166,18 +166,18 @@
}); });
/** /**
* 首页多租户部门弹窗逻辑 * 首页多仓库部门弹窗逻辑
*/ */
const loginSelectRef = ref(); const loginSelectRef = ref();
function showLoginSelect() { function showLoginSelect() {
//update-begin---author:liusq Date:20220101 for---- //update-begin---author:liusq Date:20220101 for----
// //
const loginInfo = toRaw(userStore.getLoginInfo) || {}; const loginInfo = toRaw(userStore.getLoginInfo) || {};
if (!!loginInfo.isLogin) { if (!!loginInfo.isLogin) {
loginSelectRef.value.show(loginInfo); loginSelectRef.value.show(loginInfo);
} }
//update-end---author:liusq Date:20220101 for---- //update-end---author:liusq Date:20220101 for----
} }
function loginSelectOk() { function loginSelectOk() {
@ -226,7 +226,7 @@
//update-begin---author:scott ---date:2022-09-30 for----------- //update-begin---author:scott ---date:2022-09-30 for-----------
// //
@prefix-cls: ~'@{namespace}-layout-header'; @prefix-cls: ~'@{namespace}-layout-header';
.ant-layout .@{prefix-cls} { .ant-layout .@{prefix-cls} {
display: flex; display: flex;
padding: 0 8px; padding: 0 8px;
@ -234,14 +234,14 @@
height: @header-height; height: @header-height;
// update-end--author:liaozhiyang---date:20240407---forQQYUN-8762 // update-end--author:liaozhiyang---date:20240407---forQQYUN-8762
align-items: center; align-items: center;
.headerIntroductionClass { .headerIntroductionClass {
margin-right: 4px; margin-right: 4px;
margin-bottom: 2px; margin-bottom: 2px;
border-bottom: 0px; border-bottom: 0px;
border-left: 0px; border-left: 0px;
} }
&--light { &--light {
.headerIntroductionClass { .headerIntroductionClass {
color: #000; color: #000;

View File

@ -5,7 +5,7 @@ export default {
dropdownItemDoc: '官网', dropdownItemDoc: '官网',
dropdownItemLoginOut: '退出系统', dropdownItemLoginOut: '退出系统',
dropdownItemSwitchPassword: '密码修改', dropdownItemSwitchPassword: '密码修改',
dropdownItemSwitchDepart: '切换部门', dropdownItemSwitchDepart: '切换仓库',
dropdownItemRefreshCache: '刷新缓存', dropdownItemRefreshCache: '刷新缓存',
dropdownItemSwitchAccount: '账户设置', dropdownItemSwitchAccount: '账户设置',
dropdownItemSwitchDefaultHomePage: '切换首页', dropdownItemSwitchDefaultHomePage: '切换首页',

View File

@ -75,12 +75,12 @@ export function createPermissionGuard(router: Router) {
} else if (to.path === LOGIN_PATH && isOAuth2AppEnv() && !token) { } else if (to.path === LOGIN_PATH && isOAuth2AppEnv() && !token) {
//退出登录进入此逻辑 //退出登录进入此逻辑
//如果进入的页面是login页面并且当前是OAuth2app环境并且token为空就进入OAuth2登录页面 //如果进入的页面是login页面并且当前是OAuth2app环境并且token为空就进入OAuth2登录页面
//update-begin---author:wangshuai ---date:20230224 for[QQYUN-3440]新建企业微信和钉钉配置表,通过租户模式隔离------------ //update-begin---author:wangshuai ---date:20230224 for[QQYUN-3440]新建企业微信和钉钉配置表,通过仓库模式隔离------------
if(to.query.tenantId){ if(to.query.tenantId){
setAuthCache(OAUTH2_THIRD_LOGIN_TENANT_ID,to.query.tenantId) setAuthCache(OAUTH2_THIRD_LOGIN_TENANT_ID,to.query.tenantId)
} }
next({ path: OAUTH2_LOGIN_PAGE_PATH }); next({ path: OAUTH2_LOGIN_PAGE_PATH });
//update-end---author:wangshuai ---date:20230224 for[QQYUN-3440]新建企业微信和钉钉配置表,通过租户模式隔离------------ //update-end---author:wangshuai ---date:20230224 for[QQYUN-3440]新建企业微信和钉钉配置表,通过仓库模式隔离------------
return; return;
//update-end---author:wangshuai ---date:20220629 for[issues/I5BG1I]vue3不支持auth2登录------------ //update-end---author:wangshuai ---date:20220629 for[issues/I5BG1I]vue3不支持auth2登录------------
} }

View File

@ -50,10 +50,10 @@ export const useUserStore = defineStore({
sessionTimeout: false, sessionTimeout: false,
// Last fetch time // Last fetch time
lastUpdateTime: 0, lastUpdateTime: 0,
//租户id //仓库id
tenantid: '', tenantid: '',
// 分享租户ID // 分享仓库ID
// 用于分享页面所属租户与当前用户登录租户不一致的情况 // 用于分享页面所属仓库与当前用户登录仓库不一致的情况
shareTenantId: null, shareTenantId: null,
//登录返回信息 //登录返回信息
loginInfo: null, loginInfo: null,
@ -86,7 +86,7 @@ export const useUserStore = defineStore({
getTenant(): string | number { getTenant(): string | number {
return this.tenantid || getAuthCache<string | number>(TENANT_ID); return this.tenantid || getAuthCache<string | number>(TENANT_ID);
}, },
// 是否有分享租户id // 是否有分享仓库id
hasShareTenantId(): boolean { hasShareTenantId(): boolean {
return this.shareTenantId != null && this.shareTenantId !== ''; return this.shareTenantId != null && this.shareTenantId !== '';
}, },
@ -242,10 +242,10 @@ export const useUserStore = defineStore({
try { try {
const { goHome = true, mode, ...loginParams } = params; const { goHome = true, mode, ...loginParams } = params;
const data = await phoneLoginApi(loginParams, mode); const data = await phoneLoginApi(loginParams, mode);
//update-begin---author:wangshuai---date:2024-11-25---for:【issues/7488】手机号码登录在请求头中无法获取租户id--- //update-begin---author:wangshuai---date:2024-11-25---for:【issues/7488】手机号码登录在请求头中无法获取仓库id---
const { token , userInfo } = data; const { token , userInfo } = data;
this.setTenant(userInfo!.loginTenantId); this.setTenant(userInfo!.loginTenantId);
//update-end---author:wangshuai---date:2024-11-25---for:【issues/7488】手机号码登录在请求头中无法获取租户id--- //update-end---author:wangshuai---date:2024-11-25---for:【issues/7488】手机号码登录在请求头中无法获取仓库id---
// save token // save token
this.setToken(token); this.setToken(token);
return this.afterLoginAction(goHome, data); return this.afterLoginAction(goHome, data);
@ -321,7 +321,7 @@ export const useUserStore = defineStore({
if (openSso == 'true') { if (openSso == 'true') {
await useSso().ssoLoginOut(); await useSso().ssoLoginOut();
} }
//update-begin---author:wangshuai ---date:20230224 for[QQYUN-3440]新建企业微信和钉钉配置表,通过租户模式隔离------------ //update-begin---author:wangshuai ---date:20230224 for[QQYUN-3440]新建企业微信和钉钉配置表,通过仓库模式隔离------------
//退出登录的时候需要用的应用id //退出登录的时候需要用的应用id
if(isOAuth2AppEnv()){ if(isOAuth2AppEnv()){
let tenantId = getAuthCache(OAUTH2_THIRD_LOGIN_TENANT_ID); let tenantId = getAuthCache(OAUTH2_THIRD_LOGIN_TENANT_ID);
@ -339,7 +339,7 @@ export const useUserStore = defineStore({
// update-end-author:sunjianlei date:20230306 for: 修复登录成功后,没有正确重定向的问题 // update-end-author:sunjianlei date:20230306 for: 修复登录成功后,没有正确重定向的问题
} }
//update-end---author:wangshuai ---date:20230224 for[QQYUN-3440]新建企业微信和钉钉配置表,通过租户模式隔离------------ //update-end---author:wangshuai ---date:20230224 for[QQYUN-3440]新建企业微信和钉钉配置表,通过仓库模式隔离------------
}, },
/** /**
* *
@ -353,10 +353,10 @@ export const useUserStore = defineStore({
try { try {
const { goHome = true, mode, ...ThirdLoginParams } = params; const { goHome = true, mode, ...ThirdLoginParams } = params;
const data = await thirdLogin(ThirdLoginParams, mode); const data = await thirdLogin(ThirdLoginParams, mode);
//update-begin---author:wangshuai---date:2024-07-01---for:【issues/6652】开启租户数据隔离,接入钉钉后登录默认租户为0了--- //update-begin---author:wangshuai---date:2024-07-01---for:【issues/6652】开启仓库数据隔离,接入钉钉后登录默认仓库为0了---
const { token, userInfo } = data; const { token, userInfo } = data;
this.setTenant(userInfo?.loginTenantId); this.setTenant(userInfo?.loginTenantId);
//update-end---author:wangshuai---date:2024-07-01---for:【issues/6652】开启租户数据隔离,接入钉钉后登录默认租户为0了--- //update-end---author:wangshuai---date:2024-07-01---for:【issues/6652】开启仓库数据隔离,接入钉钉后登录默认仓库为0了---
// save token // save token
this.setToken(token); this.setToken(token);
return this.afterLoginAction(goHome, data); return this.afterLoginAction(goHome, data);

View File

@ -19,7 +19,7 @@ export function getLoginBackInfo() {
return getAuthCache(LOGIN_INFO_KEY); return getAuthCache(LOGIN_INFO_KEY);
} }
/** /**
* id * id
*/ */
export function getTenantId() { export function getTenantId() {
return getAuthCache<string>(TENANT_ID); return getAuthCache<string>(TENANT_ID);

View File

@ -101,10 +101,10 @@ export class Memory<T = any, V = any> {
const item = this.cache[key]; const item = this.cache[key];
item.timeoutId && clearTimeout(item.timeoutId); item.timeoutId && clearTimeout(item.timeoutId);
}); });
//update-begin---author:liusq Date:20220108 for不删除登录用户的租户id其他缓存信息都清除---- //update-begin---author:liusq Date:20220108 for不删除登录用户的仓库id其他缓存信息都清除----
this.cache = { this.cache = {
...omit(this.cache, [TOKEN_KEY, USER_INFO_KEY, ROLES_KEY, DB_DICT_DATA_KEY, TENANT_ID, LOGIN_INFO_KEY, PROJ_CFG_KEY]), ...omit(this.cache, [TOKEN_KEY, USER_INFO_KEY, ROLES_KEY, DB_DICT_DATA_KEY, TENANT_ID, LOGIN_INFO_KEY, PROJ_CFG_KEY]),
}; };
//update-end---author:liusq Date:20220108 for不删除登录用户的租户id其他缓存信息都清除---- //update-end---author:liusq Date:20220108 for不删除登录用户的仓库id其他缓存信息都清除----
} }
} }

View File

@ -485,22 +485,22 @@ export function replaceUserInfoByExpression(expression: string | any[]) {
} }
/** /**
* 退 * 退
* *
* @param tenantId * @param tenantId
*/ */
export async function userExitChangeLoginTenantId(tenantId){ export async function userExitChangeLoginTenantId(tenantId){
const userStore = useUserStoreWithOut(); const userStore = useUserStoreWithOut();
//step 1 获取用户租户 //step 1 获取用户仓库
const url = '/sys/tenant/getCurrentUserTenant' const url = '/sys/tenant/getCurrentUserTenant'
let currentTenantId = null; let currentTenantId = null;
const data = await defHttp.get({ url }); const data = await defHttp.get({ url });
if(data && data.list){ if(data && data.list){
let arr = data.list; let arr = data.list;
if(arr.length>0){ if(arr.length>0){
//step 2.判断当前id是否存在用户租户 //step 2.判断当前id是否存在用户仓库
let filterTenantId = arr.filter((item) => item.id == tenantId); let filterTenantId = arr.filter((item) => item.id == tenantId);
//存在说明不是退出的不是当前租户,还用用来的租户即可 //存在说明不是退出的不是当前仓库,还用用来的仓库即可
if(filterTenantId && filterTenantId.length>0){ if(filterTenantId && filterTenantId.length>0){
currentTenantId = tenantId; currentTenantId = tenantId;
}else{ }else{
@ -512,16 +512,16 @@ export async function userExitChangeLoginTenantId(tenantId){
let loginTenantId = getTenantId(); let loginTenantId = getTenantId();
userStore.setTenant(currentTenantId); userStore.setTenant(currentTenantId);
//update-begin---author:wangshuai---date:2023-11-07---for:【QQYUN-7005】退租户判断退出的租户ID与当前租户ID一致再刷新--- //update-begin---author:wangshuai---date:2023-11-07---for:【QQYUN-7005】退仓库判断退出的仓库ID与当前仓库ID一致再刷新---
//租户为空,说明没有租户了,需要刷新页面。或者当前租户和退出的租户一致则需要刷新浏览器 //仓库为空,说明没有仓库了,需要刷新页面。或者当前仓库和退出的仓库一致则需要刷新浏览器
if(!currentTenantId || tenantId == loginTenantId){ if(!currentTenantId || tenantId == loginTenantId){
window.location.reload(); window.location.reload();
} }
//update-end---author:wangshuai---date:2023-11-07---for:【QQYUN-7005】退租户判断退出的租户ID与当前租户ID一致再刷新--- //update-end---author:wangshuai---date:2023-11-07---for:【QQYUN-7005】退仓库判断退出的仓库ID与当前仓库ID一致再刷新---
} }
/** /**
* *
* *
* @param title * @param title
*/ */
@ -530,7 +530,7 @@ export function tenantSaasMessage(title){
if(!tenantId){ if(!tenantId){
Modal.confirm({ Modal.confirm({
title:title, title:title,
content: '此菜单需要在多租户模式下使用,否则数据会出现混乱', content: '此菜单需要在多仓库模式下使用,否则数据会出现混乱',
okText: '确认', okText: '确认',
okType: 'danger', okType: 'danger',
// @ts-ignore // @ts-ignore

View File

@ -190,17 +190,17 @@ const transform: AxiosTransform = {
tenantId = 0; tenantId = 0;
} }
// update-begin--author:sunjianlei---date:220230428---for【QQYUN-5279】修复分享的应用租户和当前登录租户不一致时提示404的问题 // update-begin--author:sunjianlei---date:220230428---for【QQYUN-5279】修复分享的应用仓库和当前登录仓库不一致时提示404的问题
const userStore = useUserStoreWithOut(); const userStore = useUserStoreWithOut();
// 判断是否有临时租户id // 判断是否有临时仓库id
if (userStore.hasShareTenantId && userStore.shareTenantId !== 0) { if (userStore.hasShareTenantId && userStore.shareTenantId !== 0) {
// 临时租户id存在使用临时租户id // 临时仓库id存在使用临时仓库id
tenantId = userStore.shareTenantId!; tenantId = userStore.shareTenantId!;
} }
// update-end--author:sunjianlei---date:220230428---for【QQYUN-5279】修复分享的应用租户和当前登录租户不一致时提示404的问题 // update-end--author:sunjianlei---date:220230428---for【QQYUN-5279】修复分享的应用仓库和当前登录仓库不一致时提示404的问题
config.headers[ConfigEnum.TENANT_ID] = tenantId; config.headers[ConfigEnum.TENANT_ID] = tenantId;
//--update-end--author:liusq---date:20211105---for:将多租户id添加在请求接口 Header //--update-end--author:liusq---date:20211105---for:将多仓库id添加在请求接口 Header
// ======================================================================================== // ========================================================================================
// update-begin--author:sunjianlei---date:20220624--for: 添加低代码应用ID // update-begin--author:sunjianlei---date:20220624--for: 添加低代码应用ID

View File

@ -1,8 +1,4 @@
import {BasicColumn} from '/@/components/Table'; import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
import { getWeekMonthQuarterYear } from '/@/utils';
//列表数据 //列表数据
export const columns: BasicColumn[] = [ export const columns: BasicColumn[] = [
{ {
@ -21,16 +17,11 @@ export const columns: BasicColumn[] = [
dataIndex: 'description', dataIndex: 'description',
}, },
{ {
title: '创建日期', title: '创建时间',
align: "center", align: "center",
dataIndex: 'createTime' dataIndex: 'createTime',
}, },
]; ];
// 高级查询数据
export const superQuerySchema = {
areaCode: {title: '库区编码',order: 0,view: 'text', type: 'string',},
areaName: {title: '库区名称',order: 1,view: 'text', type: 'string',},
description: {title: '描述',order: 2,view: 'umeditor', type: 'string',},
createTime: {title: '创建日期',order: 4,view: 'datetime', type: 'string',},
};

View File

@ -4,26 +4,24 @@
<div class="jeecg-basic-table-form-container"> <div class="jeecg-basic-table-form-container">
<a-form ref="formRef" @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol"> <a-form ref="formRef" @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :lg="6"> <a-col :lg="6">
<a-form-item name="areaCode"> <a-form-item name="areaCode">
<template #label><span title="库区编码">库区编码</span></template> <template #label><span title="库区编码">库区编码</span></template>
<JInput v-model:value="queryParam.areaCode"/> <JInput v-model:value="queryParam.areaCode" :type="JInputTypeEnum.JINPUT_RIGHT_LIKE" />
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :lg="6"> <a-col :lg="6">
<a-form-item name="areaName"> <a-form-item name="areaName">
<template #label><span title="库区名称">库区名称</span></template> <template #label><span title="库区名称">库区名称</span></template>
<JInput v-model:value="queryParam.areaName"/> <JInput v-model:value="queryParam.areaName" />
</a-form-item> </a-form-item>
</a-col> </a-col>
<template v-if="toggleSearchStatus"> <a-col :lg="6">
<a-col :lg="6"> <a-form-item name="createTime">
<a-form-item name="createTime"> <template #label><span title="创建日期">创建日期</span></template>
<template #label><span title="创建日期">创建日期</span></template> <JRangeDate v-model:value="queryParam.createTime" />
<a-date-picker showTime valueFormat="YYYY-MM-DD HH:mm:ss" placeholder="请选择创建日期" v-model:value="queryParam.createTime" allow-clear /> </a-form-item>
</a-form-item> </a-col>
</a-col>
</template>
<a-col :xl="6" :lg="7" :md="8" :sm="24"> <a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left; overflow: hidden" class="table-page-search-submitButtons"> <span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
<a-col :lg="6"> <a-col :lg="6">
@ -43,9 +41,11 @@
<BasicTable @register="registerTable" :rowSelection="rowSelection"> <BasicTable @register="registerTable" :rowSelection="rowSelection">
<!--插槽:table标题--> <!--插槽:table标题-->
<template #tableTitle> <template #tableTitle>
<a-button type="primary" v-auth="'base:base_area:add'" @click="handleAdd" preIcon="ant-design:plus-outlined"> </a-button> <a-button type="primary" v-auth="'base:base_area:add'" @click="handleAdd" preIcon="ant-design:plus-outlined"> </a-button>
<a-button type="primary" v-auth="'base:base_area:exportXls'" preIcon="ant-design:export-outlined" @click="onExportXls"> </a-button> <a-button type="primary" v-auth="'base:base_area:exportXls'" preIcon="ant-design:export-outlined" @click="onExportXls"> </a-button>
<j-upload-button type="primary" v-auth="'base:base_area:importExcel'" preIcon="ant-design:import-outlined" @click="onImportXls"></j-upload-button> <j-upload-button type="primary" v-auth="'base:base_area:importExcel'" preIcon="ant-design:import-outlined" @click="onImportXls"
>导入
</j-upload-button>
<a-dropdown v-if="selectedRowKeys.length > 0"> <a-dropdown v-if="selectedRowKeys.length > 0">
<template #overlay> <template #overlay>
<a-menu> <a-menu>
@ -55,19 +55,18 @@
</a-menu-item> </a-menu-item>
</a-menu> </a-menu>
</template> </template>
<a-button v-auth="'base:base_area:deleteBatch'"> <a-button v-auth="'base:base_area:deleteBatch'"
>批量操作
<Icon icon="mdi:chevron-down"></Icon> <Icon icon="mdi:chevron-down"></Icon>
</a-button> </a-button>
</a-dropdown> </a-dropdown>
<!-- 高级查询 -->
<super-query :config="superQueryConfig" @search="handleSuperQuery" />
</template> </template>
<!--操作栏--> <!--操作栏-->
<template #action="{ record }"> <template #action="{ record }">
<TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)"/> <TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)" />
</template> </template>
<template v-slot:bodyCell="{ column, record, index, text }"> <template v-slot:bodyCell="{ column, record, index, text }">
<template v-if="column.dataIndex==='description'"> <template v-if="column.dataIndex === 'description'">
<!--富文本件字段回显插槽--> <!--富文本件字段回显插槽-->
<div v-html="text"></div> <div v-html="text"></div>
</template> </template>
@ -80,21 +79,19 @@
<script lang="ts" name="base-area" setup> <script lang="ts" name="base-area" setup>
import { ref, reactive } from 'vue'; import { ref, reactive } from 'vue';
import { BasicTable, useTable, TableAction } from '/@/components/Table'; import { BasicTable, TableAction } from '/@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage'; import { useListPage } from '/@/hooks/system/useListPage';
import { columns, superQuerySchema } from './Area.data'; import { columns } from './Area.data';
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './Area.api'; import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './Area.api';
import { downloadFile } from '/@/utils/common/renderUtils'; import AreaModal from './components/AreaModal.vue';
import AreaModal from './components/AreaModal.vue'
import { useUserStore } from '/@/store/modules/user'; import { useUserStore } from '/@/store/modules/user';
import { useMessage } from '/@/hooks/web/useMessage'; import { useMessage } from '/@/hooks/web/useMessage';
import {useModal} from '/@/components/Modal'; import JInput from '/@/components/Form/src/jeecg/components/JInput.vue';
import JInput from "/@/components/Form/src/jeecg/components/JInput.vue"; import JRangeDate from '@/components/Form/src/jeecg/components/JRangeDate.vue';
import { getDateByPicker } from '/@/utils'; import { getDateByPicker } from '/@/utils';
import { JInputTypeEnum } from '@/enums/cpteEnum';
const fieldPickers = reactive({ const fieldPickers = reactive({});
});
const formRef = ref(); const formRef = ref();
const queryParam = reactive<any>({}); const queryParam = reactive<any>({});
const toggleSearchStatus = ref<boolean>(false); const toggleSearchStatus = ref<boolean>(false);
@ -107,56 +104,60 @@
title: '库区', title: '库区',
api: list, api: list,
columns, columns,
canResize:true, canResize: true,
useSearchForm: false, useSearchForm: false,
actionColumn: { actionColumn: {
width: 120, width: 120,
fixed: 'right', fixed: 'right',
}, },
beforeFetch: async (params) => { beforeFetch: async (params) => {
for (let key in fieldPickers) { //
if (queryParam[key] && fieldPickers[key]) { const newQueryParam = { ...queryParam };
queryParam[key] = getDateByPicker(queryParam[key], fieldPickers[key]);
//
if (newQueryParam.createTime) {
try {
const [begin, end] = newQueryParam.createTime.split(',');
if (begin !== undefined) newQueryParam.createTime_begin = begin;
if (end !== undefined) newQueryParam.createTime_end = end;
delete newQueryParam.createTime;
} catch (error) {
console.error('日期范围处理错误:', error);
} }
} }
return Object.assign(params, queryParam);
for (let key in fieldPickers) {
if (newQueryParam[key] && fieldPickers[key]) {
newQueryParam[key] = getDateByPicker(newQueryParam[key], fieldPickers[key]);
}
}
return Object.assign(params, newQueryParam);
}, },
}, },
exportConfig: { exportConfig: {
name: "库区", name: '库区',
url: getExportUrl, url: getExportUrl,
params: queryParam, params: queryParam,
}, },
importConfig: { importConfig: {
url: getImportUrl, url: getImportUrl,
success: handleSuccess success: handleSuccess,
}, },
}); });
const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] = tableContext; const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] =
tableContext;
const labelCol = reactive({ const labelCol = reactive({
xs:24, xs: 24,
sm:4, sm: 4,
xl:6, xl: 6,
xxl:4 xxl: 4,
}); });
const wrapperCol = reactive({ const wrapperCol = reactive({
xs: 24, xs: 24,
sm: 20, sm: 20,
}); });
//
const superQueryConfig = reactive(superQuerySchema);
/**
* 高级查询事件
*/
function handleSuperQuery(params) {
Object.keys(params).map((k) => {
queryParam[k] = params[k];
});
searchQuery();
}
/** /**
* 新增事件 * 新增事件
*/ */
@ -164,7 +165,7 @@
registerModal.value.disableSubmit = false; registerModal.value.disableSubmit = false;
registerModal.value.add(); registerModal.value.add();
} }
/** /**
* 编辑事件 * 编辑事件
*/ */
@ -172,7 +173,7 @@
registerModal.value.disableSubmit = false; registerModal.value.disableSubmit = false;
registerModal.value.edit(record); registerModal.value.edit(record);
} }
/** /**
* 详情 * 详情
*/ */
@ -180,28 +181,28 @@
registerModal.value.disableSubmit = true; registerModal.value.disableSubmit = true;
registerModal.value.edit(record); registerModal.value.edit(record);
} }
/** /**
* 删除事件 * 删除事件
*/ */
async function handleDelete(record) { async function handleDelete(record) {
await deleteOne({ id: record.id }, handleSuccess); await deleteOne({ id: record.id }, handleSuccess);
} }
/** /**
* 批量删除事件 * 批量删除事件
*/ */
async function batchHandleDelete() { async function batchHandleDelete() {
await batchDelete({ ids: selectedRowKeys.value }, handleSuccess); await batchDelete({ ids: selectedRowKeys.value }, handleSuccess);
} }
/** /**
* 成功回调 * 成功回调
*/ */
function handleSuccess() { function handleSuccess() {
(selectedRowKeys.value = []) && reload(); (selectedRowKeys.value = []) && reload();
} }
/** /**
* 操作栏 * 操作栏
*/ */
@ -210,11 +211,11 @@
{ {
label: '编辑', label: '编辑',
onClick: handleEdit.bind(null, record), onClick: handleEdit.bind(null, record),
auth: 'base:base_area:edit' auth: 'base:base_area:edit',
}, },
]; ];
} }
/** /**
* 下拉操作栏 * 下拉操作栏
*/ */
@ -223,16 +224,17 @@
{ {
label: '详情', label: '详情',
onClick: handleDetail.bind(null, record), onClick: handleDetail.bind(null, record),
}, { },
{
label: '删除', label: '删除',
popConfirm: { popConfirm: {
title: '是否确认删除', title: '是否确认删除',
confirm: handleDelete.bind(null, record), confirm: handleDelete.bind(null, record),
placement: 'topLeft', placement: 'topLeft',
}, },
auth: 'base:base_area:delete' auth: 'base:base_area:delete',
} },
] ];
} }
/** /**
@ -241,7 +243,7 @@
function searchQuery() { function searchQuery() {
reload(); reload();
} }
/** /**
* 重置 * 重置
*/ */
@ -251,35 +253,35 @@
// //
reload(); reload();
} }
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.jeecg-basic-table-form-container { .jeecg-basic-table-form-container {
padding: 0; padding: 0;
.table-page-search-submitButtons { .table-page-search-submitButtons {
display: block; display: block;
margin-bottom: 24px; margin-bottom: 24px;
white-space: nowrap; white-space: nowrap;
} }
.query-group-cust{
.query-group-cust {
min-width: 100px !important; min-width: 100px !important;
} }
.query-group-split-cust{
.query-group-split-cust {
width: 30px; width: 30px;
display: inline-block; display: inline-block;
text-align: center text-align: center;
} }
.ant-form-item:not(.ant-form-item-with-help){
.ant-form-item:not(.ant-form-item-with-help) {
margin-bottom: 16px; margin-bottom: 16px;
height: 32px; height: 32px;
} }
:deep(.ant-picker),:deep(.ant-input-number){
:deep(.ant-picker),
:deep(.ant-input-number) {
width: 100%; width: 100%;
} }
} }

View File

@ -2,28 +2,23 @@
<a-spin :spinning="confirmLoading"> <a-spin :spinning="confirmLoading">
<JFormContainer :disabled="disabled"> <JFormContainer :disabled="disabled">
<template #detail> <template #detail>
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol" name="AreaForm"> <a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol" name="AreaForm">
<a-row> <a-row>
<a-col :span="12"> <a-col :span="24">
<a-form-item label="库区编码" v-bind="validateInfos.areaCode" id="AreaForm-areaCode" name="areaCode"> <a-form-item label="库区编码" v-bind="validateInfos.areaCode" id="AreaForm-areaCode" name="areaCode">
<a-input v-model:value="formData.areaCode" placeholder="请输入库区编码" allow-clear ></a-input> <a-input v-model:value="formData.areaCode" placeholder="请输入库区编码" allow-clear></a-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="24">
<a-form-item label="库区名称" v-bind="validateInfos.areaName" id="AreaForm-areaName" name="areaName"> <a-form-item label="库区名称" v-bind="validateInfos.areaName" id="AreaForm-areaName" name="areaName">
<a-input v-model:value="formData.areaName" placeholder="请输入库区名称" allow-clear ></a-input> <a-input v-model:value="formData.areaName" placeholder="请输入库区名称" allow-clear></a-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="24">
<a-form-item label="描述" v-bind="validateInfos.description" id="AreaForm-description" name="description"> <a-form-item label="描述" v-bind="validateInfos.description" id="PointForm-description" name="description">
<j-editor v-model:value="formData.description" :autoFocus="false"/> <a-textarea v-model:value="formData.description" :rows="4" placeholder="请输入描述" />
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="12">
<a-form-item label="创建日期" v-bind="validateInfos.createTime" id="AreaForm-createTime" name="createTime">
<a-date-picker placeholder="请选择创建日期" v-model:value="formData.createTime" showTime value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" allow-clear />
</a-form-item>
</a-col>
</a-row> </a-row>
</a-form> </a-form>
</template> </template>
@ -32,29 +27,27 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { ref, reactive, defineExpose, nextTick, defineProps, computed, onMounted } from 'vue'; import { ref, reactive, defineExpose, nextTick, defineProps, computed } from 'vue';
import { defHttp } from '/@/utils/http/axios';
import { useMessage } from '/@/hooks/web/useMessage'; import { useMessage } from '/@/hooks/web/useMessage';
import JEditor from '/@/components/Form/src/jeecg/components/JEditor.vue';
import { getDateByPicker, getValueType } from '/@/utils'; import { getDateByPicker, getValueType } from '/@/utils';
import { saveOrUpdate } from '../Area.api'; import { saveOrUpdate } from '../Area.api';
import { Form } from 'ant-design-vue'; import { Form } from 'ant-design-vue';
import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue'; import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
const props = defineProps({ const props = defineProps({
formDisabled: { type: Boolean, default: false }, formDisabled: { type: Boolean, default: false },
formData: { type: Object, default: () => ({})}, formData: { type: Object, default: () => ({}) },
formBpm: { type: Boolean, default: true } formBpm: { type: Boolean, default: true },
}); });
const formRef = ref(); const formRef = ref();
const useForm = Form.useForm; const useForm = Form.useForm;
const emit = defineEmits(['register', 'ok']); const emit = defineEmits(['register', 'ok']);
const formData = reactive<Record<string, any>>({ const formData = reactive<Record<string, any>>({
id: '', id: '',
areaCode: '', areaCode: '',
areaName: '', areaName: '',
description: '', description: '',
delFlag: '', delFlag: 0,
createTime: '',
}); });
const { createMessage } = useMessage(); const { createMessage } = useMessage();
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 5 } }); const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 5 } });
@ -62,29 +55,27 @@
const confirmLoading = ref<boolean>(false); const confirmLoading = ref<boolean>(false);
// //
const validatorRules = reactive({ const validatorRules = reactive({
areaCode: [{ required: true, message: '请输入库区编码!'},], areaCode: [{ required: true, message: '请输入库区编码!' }],
areaName: [{ required: true, message: '请输入库区名称!'},], areaName: [{ required: true, message: '请输入库区名称!' }],
delFlag: [{ required: true, message: '请输入删除状态!'},], delFlag: [{ required: true, message: '请输入删除状态!' }],
createTime: [{ required: true, message: '请输入创建日期!'},], createTime: [{ required: true, message: '请输入创建日期!' }],
}); });
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: false }); const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: false });
// //
const fieldPickers = reactive({ const fieldPickers = reactive({});
});
// //
const disabled = computed(()=>{ const disabled = computed(() => {
if(props.formBpm === true){ if (props.formBpm === true) {
if(props.formData.disabled === false){ if (props.formData.disabled === false) {
return false; return false;
}else{ } else {
return true; return true;
} }
} }
return props.formDisabled; return props.formDisabled;
}); });
/** /**
* 新增 * 新增
*/ */
@ -100,10 +91,10 @@
resetFields(); resetFields();
const tmpData = {}; const tmpData = {};
Object.keys(formData).forEach((key) => { Object.keys(formData).forEach((key) => {
if(record.hasOwnProperty(key)){ if (record.hasOwnProperty(key)) {
tmpData[key] = record[key] tmpData[key] = record[key];
} }
}) });
// //
Object.assign(formData, tmpData); Object.assign(formData, tmpData);
}); });
@ -159,7 +150,6 @@
}); });
} }
defineExpose({ defineExpose({
add, add,
edit, edit,

View File

@ -1,5 +1,5 @@
<template> <template>
<j-modal :title="title" maxHeight="500px" :width="896" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭"> <j-modal :title="title" maxHeight="250px" :width="600" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
<AreaForm ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></AreaForm> <AreaForm ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></AreaForm>
<template #footer> <template #footer>
<a-button @click="handleCancel"></a-button> <a-button @click="handleCancel"></a-button>
@ -25,25 +25,25 @@
* 新增 * 新增
*/ */
function add() { function add() {
title.value = '新增'; title.value = '新增库区';
visible.value = true; visible.value = true;
nextTick(() => { nextTick(() => {
registerForm.value.add(); registerForm.value.add();
}); });
} }
/** /**
* 编辑 * 编辑
* @param record * @param record
*/ */
function edit(record) { function edit(record) {
title.value = disableSubmit.value ? '详情' : '编辑'; title.value = disableSubmit.value ? '库区详情' : '编辑库区';
visible.value = true; visible.value = true;
nextTick(() => { nextTick(() => {
registerForm.value.edit(record); registerForm.value.edit(record);
}); });
} }
/** /**
* 确定按钮点击事件 * 确定按钮点击事件
*/ */

View File

@ -16,7 +16,7 @@ export const columns: BasicColumn[] = [
dataIndex: 'itemName' dataIndex: 'itemName'
}, },
{ {
title: '租户ID', title: '仓库ID',
align: "center", align: "center",
dataIndex: 'tenantId' dataIndex: 'tenantId'
}, },
@ -26,5 +26,5 @@ export const columns: BasicColumn[] = [
export const superQuerySchema = { export const superQuerySchema = {
itemCode: {title: '物料编码',order: 0,view: 'text', type: 'string',}, itemCode: {title: '物料编码',order: 0,view: 'text', type: 'string',},
itemName: {title: '物料名称',order: 1,view: 'text', type: 'string',}, itemName: {title: '物料名称',order: 1,view: 'text', type: 'string',},
tenantId: {title: '租户ID',order: 2,view: 'number', type: 'number',}, tenantId: {title: '仓库ID',order: 2,view: 'number', type: 'number',},
}; };

View File

@ -77,6 +77,7 @@
fixed: 'right', fixed: 'right',
}, },
beforeFetch: async (params) => { beforeFetch: async (params) => {
console.log("params",params)
for (let key in fieldPickers) { for (let key in fieldPickers) {
if (queryParam[key] && fieldPickers[key]) { if (queryParam[key] && fieldPickers[key]) {
queryParam[key] = getDateByPicker(queryParam[key], fieldPickers[key]); queryParam[key] = getDateByPicker(queryParam[key], fieldPickers[key]);
@ -127,7 +128,7 @@
registerModal.value.disableSubmit = false; registerModal.value.disableSubmit = false;
registerModal.value.add(); registerModal.value.add();
} }
/** /**
* 编辑事件 * 编辑事件
*/ */
@ -135,7 +136,7 @@
registerModal.value.disableSubmit = false; registerModal.value.disableSubmit = false;
registerModal.value.edit(record); registerModal.value.edit(record);
} }
/** /**
* 详情 * 详情
*/ */
@ -143,28 +144,28 @@
registerModal.value.disableSubmit = true; registerModal.value.disableSubmit = true;
registerModal.value.edit(record); registerModal.value.edit(record);
} }
/** /**
* 删除事件 * 删除事件
*/ */
async function handleDelete(record) { async function handleDelete(record) {
await deleteOne({ id: record.id }, handleSuccess); await deleteOne({ id: record.id }, handleSuccess);
} }
/** /**
* 批量删除事件 * 批量删除事件
*/ */
async function batchHandleDelete() { async function batchHandleDelete() {
await batchDelete({ ids: selectedRowKeys.value }, handleSuccess); await batchDelete({ ids: selectedRowKeys.value }, handleSuccess);
} }
/** /**
* 成功回调 * 成功回调
*/ */
function handleSuccess() { function handleSuccess() {
(selectedRowKeys.value = []) && reload(); (selectedRowKeys.value = []) && reload();
} }
/** /**
* 操作栏 * 操作栏
*/ */
@ -177,7 +178,7 @@
}, },
]; ];
} }
/** /**
* 下拉操作栏 * 下拉操作栏
*/ */
@ -204,7 +205,7 @@
function searchQuery() { function searchQuery() {
reload(); reload();
} }
/** /**
* 重置 * 重置
*/ */
@ -214,7 +215,7 @@
// //
reload(); reload();
} }

View File

@ -15,8 +15,8 @@
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-item label="租户ID" v-bind="validateInfos.tenantId" id="ItemForm-tenantId" name="tenantId"> <a-form-item label="仓库ID" v-bind="validateInfos.tenantId" id="ItemForm-tenantId" name="tenantId">
<a-input-number v-model:value="formData.tenantId" placeholder="请输入租户ID" style="width: 100%" /> <a-input-number v-model:value="formData.tenantId" placeholder="请输入仓库ID" style="width: 100%" />
</a-form-item> </a-form-item>
</a-col> </a-col>
</a-row> </a-row>
@ -44,8 +44,8 @@
const emit = defineEmits(['register', 'ok']); const emit = defineEmits(['register', 'ok']);
const formData = reactive<Record<string, any>>({ const formData = reactive<Record<string, any>>({
id: '', id: '',
itemCode: '', itemCode: '',
itemName: '', itemName: '',
tenantId: undefined, tenantId: undefined,
}); });
const { createMessage } = useMessage(); const { createMessage } = useMessage();
@ -72,7 +72,7 @@
return props.formDisabled; return props.formDisabled;
}); });
/** /**
* 新增 * 新增
*/ */

View File

@ -751,7 +751,7 @@ export const schemas: FormSchema[] = [
label: '选中值', label: '选中值',
colProps: { span: 12 }, colProps: { span: 12 },
}, },
{ {
field: 'userSelect2', field: 'userSelect2',
component: 'UserSelect', component: 'UserSelect',
@ -765,7 +765,7 @@ export const schemas: FormSchema[] = [
label: '选中值', label: '选中值',
colProps: { span: 12 }, colProps: { span: 12 },
}, },
{ {
field: 'superQuery', field: 'superQuery',
component: 'Input', component: 'Input',
@ -843,7 +843,6 @@ export const schemas: FormSchema[] = [
label: '课程', label: '课程',
dynamicPropskey: 'options', dynamicPropskey: 'options',
dynamicPropsVal: ({ model }) => { dynamicPropsVal: ({ model }) => {
let options;
if (model.sex == 1) { if (model.sex == 1) {
return [ return [
{ value: '0', label: 'java - 男' }, { value: '0', label: 'java - 男' },
@ -906,7 +905,7 @@ export const schemas: FormSchema[] = [
value: '#{sys_multi_org_code}', value: '#{sys_multi_org_code}',
}, },
{ {
label: '登录用户租户', label: '登录用户仓库',
value: '#{tenant_id}', value: '#{tenant_id}',
}, },
], ],
@ -952,5 +951,5 @@ export const schemas: FormSchema[] = [
label: '选中值', label: '选中值',
colProps: { span: 12 }, colProps: { span: 12 },
}, },
]; ];

View File

@ -1,25 +1,25 @@
<template> <template>
<BasicModal v-bind="config" @register="registerModal" :title="currTitle" wrapClassName="loginSelectModal" v-model:visible="visible"> <BasicModal v-bind="config" @register="registerModal" :title="currTitle" wrapClassName="loginSelectModal" v-model:visible="visible">
<a-form ref="formRef" :model="formState" :rules="rules" v-bind="layout" :colon="false" class="loginSelectForm"> <a-form ref="formRef" :model="formState" :rules="rules" v-bind="layout" :colon="false" class="loginSelectForm">
<!--租户选择--> <!--仓库选择-->
<a-form-item v-if="isMultiTenant" name="tenantId" :validate-status="validate_status"> <a-form-item v-if="isMultiTenant" name="tenantId" :validate-status="validate_status">
<!--label内容--> <!--label内容-->
<template #label> <template #label>
<a-tooltip placement="topLeft"> <a-tooltip placement="topLeft">
<template #title> <template #title>
<span>您隶属于多租户请选择登录租户</span> <span>您隶属于多仓库请选择登录仓库</span>
</template> </template>
<a-avatar style="background-color: #87d068" :size="30"> 租户 </a-avatar> <a-avatar style="background-color: #87d068" :size="30"> 仓库 </a-avatar>
</a-tooltip> </a-tooltip>
</template> </template>
<template #extra v-if="validate_status == 'error'"> <template #extra v-if="validate_status == 'error'">
<span style="color: #ed6f6f">请选择登录租户</span> <span style="color: #ed6f6f">请选择登录仓库</span>
</template> </template>
<!--租户下拉内容--> <!--仓库下拉内容-->
<a-select <a-select
v-model:value="formState.tenantId" v-model:value="formState.tenantId"
@change="handleTenantChange" @change="handleTenantChange"
placeholder="请选择登录租户" placeholder="请选择登录仓库"
:class="{ 'valid-error': validate_status == 'error' }" :class="{ 'valid-error': validate_status == 'error' }"
> >
<template v-for="tenant in tenantList" :key="tenant.id"> <template v-for="tenant in tenantList" :key="tenant.id">
@ -82,7 +82,7 @@
setup(props, { emit }) { setup(props, { emit }) {
const userStore = useUserStore(); const userStore = useUserStore();
const { notification } = useMessage(); const { notification } = useMessage();
// //
const isMultiTenant = ref(false); const isMultiTenant = ref(false);
const tenantList = ref([]); const tenantList = ref([]);
const validate_status = ref(''); const validate_status = ref('');
@ -96,7 +96,7 @@
const username = ref(''); const username = ref('');
// //
const formRef = ref(); const formRef = ref();
// //
const formState: UnwrapRef<FormState> = reactive({ const formState: UnwrapRef<FormState> = reactive({
orgCode: undefined, orgCode: undefined,
tenantId: null, tenantId: null,
@ -116,16 +116,16 @@
// //
const currTitle = computed(() => { const currTitle = computed(() => {
if (unref(isMultiDepart) && unref(isMultiTenant)) { if (unref(isMultiDepart) && unref(isMultiTenant)) {
return '请选择租户和部门'; return '请选择仓库和部门';
} else if (unref(isMultiDepart) && !unref(isMultiTenant)) { } else if (unref(isMultiDepart) && !unref(isMultiTenant)) {
return '请选择部门'; return '请选择部门';
} else if (!unref(isMultiDepart) && unref(isMultiTenant)) { } else if (!unref(isMultiDepart) && unref(isMultiTenant)) {
return '请选择租户'; return '请选择仓库';
} }
}); });
const rules = ref({ const rules = ref({
tenantId: [{ required: unref(isMultiTenant), type: 'number', message: '请选择租户', trigger: 'change' }], tenantId: [{ required: unref(isMultiTenant), type: 'number', message: '请选择仓库', trigger: 'change' }],
orgCode: [{ required: unref(isMultiDepart), message: '请选择部门', trigger: 'change' }], orgCode: [{ required: unref(isMultiDepart), message: '请选择部门', trigger: 'change' }],
}); });
@ -137,12 +137,12 @@
* 处理部门情况 * 处理部门情况
*/ */
function bizDepart(loginResult) { function bizDepart(loginResult) {
//ID //ID
if(loginResult.userInfo?.orgCode && loginResult.userInfo?.orgCode!==''){ if(loginResult.userInfo?.orgCode && loginResult.userInfo?.orgCode!==''){
isMultiDepart.value = false; isMultiDepart.value = false;
return; return;
} }
let multi_depart = loginResult.multi_depart; let multi_depart = loginResult.multi_depart;
//0: 1: 2: //0: 1: 2:
if (multi_depart == 0) { if (multi_depart == 0) {
@ -161,15 +161,15 @@
} }
/** /**
* 处理租户情况 * 处理仓库情况
*/ */
function bizTenantList(loginResult) { function bizTenantList(loginResult) {
//ID //ID
if(loginResult.userInfo?.loginTenantId && loginResult.userInfo?.loginTenantId!==0){ if(loginResult.userInfo?.loginTenantId && loginResult.userInfo?.loginTenantId!==0){
isMultiTenant.value = false; isMultiTenant.value = false;
return; return;
} }
let tenantArr = loginResult.tenantList; let tenantArr = loginResult.tenantList;
if (Array.isArray(tenantArr)) { if (Array.isArray(tenantArr)) {
if (tenantArr.length === 0) { if (tenantArr.length === 0) {
@ -187,7 +187,7 @@
} }
/** /**
* 确认选中的租户和部门信息 * 确认选中的仓库和部门信息
*/ */
function handleSubmit() { function handleSubmit() {
if (unref(isMultiTenant) && !formState.tenantId) { if (unref(isMultiTenant) && !formState.tenantId) {

View File

@ -188,12 +188,12 @@ export function isOAuth2DingAppEnv() {
export function sysOAuth2Login(source) { export function sysOAuth2Login(source) {
let url = `${window._CONFIG['domianURL']}/sys/thirdLogin/oauth2/${source}/login`; let url = `${window._CONFIG['domianURL']}/sys/thirdLogin/oauth2/${source}/login`;
url += `?state=${encodeURIComponent(window.location.origin)}`; url += `?state=${encodeURIComponent(window.location.origin)}`;
//update-begin---author:wangshuai ---date:20230224 for[QQYUN-3440]新建企业微信和钉钉配置表,通过租户模式隔离------------ //update-begin---author:wangshuai ---date:20230224 for[QQYUN-3440]新建企业微信和钉钉配置表,通过仓库模式隔离------------
let tenantId = getAuthCache(OAUTH2_THIRD_LOGIN_TENANT_ID); let tenantId = getAuthCache(OAUTH2_THIRD_LOGIN_TENANT_ID);
if(tenantId){ if(tenantId){
url += `&tenantId=${tenantId}`; url += `&tenantId=${tenantId}`;
} }
//update-end---author:wangshuai ---date:20230224 for[QQYUN-3440]新建企业微信和钉钉配置表,通过租户模式隔离------------ //update-end---author:wangshuai ---date:20230224 for[QQYUN-3440]新建企业微信和钉钉配置表,通过仓库模式隔离------------
window.location.href = url; window.location.href = url;
} }
//update-end---author:wangshuai ---date:20220629 for[issues/I5BG1I]vue3不支持auth2登录------------ //update-end---author:wangshuai ---date:20220629 for[issues/I5BG1I]vue3不支持auth2登录------------

View File

@ -53,7 +53,7 @@ export const thirdAppFormSchema: FormSchema[] = [
}, },
defaultValue: 1 defaultValue: 1
},{ },{
label: '租户id', label: '仓库id',
field: 'tenantId', field: 'tenantId',
component: 'Input', component: 'Input',
show: false, show: false,

View File

@ -143,7 +143,7 @@
} }
} }
let text: string = ''; let text: string = '';
// //
if (userList && userList.length > 0) { if (userList && userList.length > 0) {
for (const item of userList) { for (const item of userList) {
params.push({ wechatUserId: item.wechatUserId, wechatDepartId: item.wechatDepartId, wechatRealName: item.wechatRealName }); params.push({ wechatUserId: item.wechatUserId, wechatDepartId: item.wechatDepartId, wechatRealName: item.wechatRealName });

View File

@ -49,7 +49,7 @@
const loginTenantName = ref<string>(''); const loginTenantName = ref<string>('');
/** /**
* 获取租户名称 * 获取仓库名称
*/ */
getTenantName(); getTenantName();
@ -78,7 +78,7 @@
onMounted(() => { onMounted(() => {
// //
tenantSaasMessage('租户部门'); tenantSaasMessage('仓库部门');
}); });
</script> </script>

View File

@ -25,7 +25,7 @@
</template> </template>
<Icon icon="ant-design:question-circle-outlined" style="margin-left: 10px;cursor: pointer" @click="tipShow = true"></Icon> <Icon icon="ant-design:question-circle-outlined" style="margin-left: 10px;cursor: pointer" @click="tipShow = true"></Icon>
<div v-if="loginTenantName" style="margin-left: 10px;" <div v-if="loginTenantName" style="margin-left: 10px;"
>当前登录租户: <span class="tenant-name">{{ loginTenantName }}</span> >当前登录仓库: <span class="tenant-name">{{ loginTenantName }}</span>
</div> </div>
</div> </div>
<a-alert type="info" show-icon class="alert" style="margin-bottom: 8px"> <a-alert type="info" show-icon class="alert" style="margin-bottom: 8px">
@ -121,9 +121,9 @@
const { createMessage } = useMessage(); const { createMessage } = useMessage();
const { handleImportXls, handleExportXls } = useMethods(); const { handleImportXls, handleExportXls } = useMethods();
const props = defineProps({ const props = defineProps({
// //
isTenantDepart: { default: false, type: Boolean }, isTenantDepart: { default: false, type: Boolean },
// //
loginTenantName: { default: "", type: String }, loginTenantName: { default: "", type: String },
}) })

View File

@ -439,7 +439,7 @@ export const dataRuleFormSchema: FormSchema[] = [
value: '#{sys_multi_org_code}', value: '#{sys_multi_org_code}',
}, },
{ {
label: '登录用户租户', label: '登录用户仓库',
value: '#{tenant_id}', value: '#{tenant_id}',
}, },
], ],

View File

@ -41,7 +41,7 @@
// //
const { onExportXls, onImportXls, tableContext } = useListPage({ const { onExportXls, onImportXls, tableContext } = useListPage({
tableProps: { tableProps: {
title: '租户职务列表', title: '仓库职务列表',
api: getPositionList, api: getPositionList,
columns: columns, columns: columns,
formConfig: { formConfig: {
@ -60,7 +60,7 @@
}, },
}, },
exportConfig: { exportConfig: {
name: '租户职务列表', name: '仓库职务列表',
url: getExportUrl, url: getExportUrl,
}, },
importConfig: { importConfig: {
@ -128,6 +128,6 @@
onMounted(() => { onMounted(() => {
// //
tenantSaasMessage('租户职务'); tenantSaasMessage('仓库职务');
}); });
</script> </script>

View File

@ -16,7 +16,7 @@
<Icon icon="mdi:chevron-down"></Icon> <Icon icon="mdi:chevron-down"></Icon>
</a-button> </a-button>
</a-dropdown> </a-dropdown>
<div style="margin-left: 10px;margin-top: 5px">当前登录租户: <span class="tenant-name">{{loginTenantName}}</span> </div> <div style="margin-left: 10px;margin-top: 5px">当前登录仓库: <span class="tenant-name">{{loginTenantName}}</span> </div>
</template> </template>
<template #action="{ record }"> <template #action="{ record }">
<TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)" /> <TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)" />
@ -42,18 +42,18 @@
import { useListPage } from '/@/hooks/system/useListPage'; import { useListPage } from '/@/hooks/system/useListPage';
import { getLoginTenantName } from "/@/views/system/tenant/tenant.api"; import { getLoginTenantName } from "/@/views/system/tenant/tenant.api";
import { tenantSaasMessage } from "@/utils/common/compUtils"; import { tenantSaasMessage } from "@/utils/common/compUtils";
const showFooter = ref(true); const showFooter = ref(true);
const [roleUserDrawer, { openDrawer: openRoleUserDrawer }] = useDrawer(); const [roleUserDrawer, { openDrawer: openRoleUserDrawer }] = useDrawer();
const [registerDrawer, { openDrawer }] = useDrawer(); const [registerDrawer, { openDrawer }] = useDrawer();
const [registerModal, { openModal }] = useModal(); const [registerModal, { openModal }] = useModal();
const [registerDesc, { openDrawer: openRoleDesc }] = useDrawer(); const [registerDesc, { openDrawer: openRoleDesc }] = useDrawer();
// //
const { prefixCls, tableContext, onImportXls, onExportXls } = useListPage({ const { prefixCls, tableContext, onImportXls, onExportXls } = useListPage({
designScope: 'role-template', designScope: 'role-template',
tableProps: { tableProps: {
title: '租户角色列表', title: '仓库角色列表',
api: listByTenant, api: listByTenant,
columns: columns, columns: columns,
formConfig: { formConfig: {
@ -163,15 +163,15 @@
} }
const loginTenantName = ref<string>(''); const loginTenantName = ref<string>('');
getTenantName(); getTenantName();
async function getTenantName(){ async function getTenantName(){
loginTenantName.value = await getLoginTenantName(); loginTenantName.value = await getLoginTenantName();
} }
onMounted(()=>{ onMounted(()=>{
tenantSaasMessage('租户角色') tenantSaasMessage('仓库角色')
}) })
</script> </script>

View File

@ -45,7 +45,7 @@
const props = defineProps({ const props = defineProps({
disableUserEdit: {type:Boolean,default:false} disableUserEdit: {type:Boolean,default:false}
}) })
const checkedKeys = ref<Array<string | number>>([]); const checkedKeys = ref<Array<string | number>>([]);
const roleId = ref(''); const roleId = ref('');
const [registerBaseDrawer, { setDrawerProps, closeDrawer }] = useDrawerInner(async (data) => { const [registerBaseDrawer, { setDrawerProps, closeDrawer }] = useDrawerInner(async (data) => {
@ -62,9 +62,9 @@
api: userList, api: userList,
columns: userColumns, columns: userColumns,
formConfig: { formConfig: {
//update-begin---author:wangshuai ---date:20230703 forQQYUN-56853, //update-begin---author:wangshuai ---date:20230703 forQQYUN-56853,
labelWidth: 60, labelWidth: 60,
//update-end---author:wangshuai ---date:20230703 forQQYUN-56853, //update-end---author:wangshuai ---date:20230703 forQQYUN-56853,
schemas: searchUserFormSchema, schemas: searchUserFormSchema,
autoSubmitOnEnter: true, autoSubmitOnEnter: true,
}, },
@ -192,9 +192,9 @@
</script> </script>
<style scoped> <style scoped>
/*update-begin---author:wangshuai ---date:20230703 for【QQYUN-5685】3、租户角色下,查询居左显示*/ /*update-begin---author:wangshuai ---date:20230703 for【QQYUN-5685】3、仓库角色下,查询居左显示*/
:deep(.ant-form-item-control-input-content){ :deep(.ant-form-item-control-input-content){
text-align: left; text-align: left;
} }
/*update-end---author:wangshuai ---date:20230703 for【QQYUN-5685】3、租户角色下,查询居左显示*/ /*update-end---author:wangshuai ---date:20230703 for【QQYUN-5685】3、仓库角色下,查询居左显示*/
</style> </style>

View File

@ -40,7 +40,7 @@ export const getImportUrl = Api.importExcel;
*/ */
export const list = (params) => defHttp.get({ url: Api.list, params }); export const list = (params) => defHttp.get({ url: Api.list, params });
/** /**
* *
* @param params * @param params
*/ */
export const listByTenant = (params) => defHttp.get({ url: Api.listByTenant, params }); export const listByTenant = (params) => defHttp.get({ url: Api.listByTenant, params });

View File

@ -14,8 +14,8 @@
</a-button> </a-button>
<JThirdAppButton biz-type="user" :selected-row-keys="selectedRowKeys" syncToApp syncToLocal @sync-finally="onSyncFinally" /> <JThirdAppButton biz-type="user" :selected-row-keys="selectedRowKeys" syncToApp syncToLocal @sync-finally="onSyncFinally" />
<a-button type="primary" @click="openQuitModal(true, {})" preIcon="ant-design:user-delete-outlined">离职人员</a-button> <a-button type="primary" @click="openQuitModal(true, {})" preIcon="ant-design:user-delete-outlined">离职人员</a-button>
<div style="margin-left: 10px;margin-top: 5px"> 当前登录租户: <span class="tenant-name">{{loginTenantName}}</span> </div> <div style="margin-left: 10px;margin-top: 5px"> 当前登录仓库: <span class="tenant-name">{{loginTenantName}}</span> </div>
<a-tooltip title="租户用户更多操作说明"> <a-tooltip title="仓库用户更多操作说明">
<a-icon type="question-circle" style="margin-left: 8px; cursor: pointer " @click="tipShow = true"/> <a-icon type="question-circle" style="margin-left: 8px; cursor: pointer " @click="tipShow = true"/>
</a-tooltip> </a-tooltip>
</template> </template>
@ -34,12 +34,12 @@
<TenantPackAllotModal @register="registerPackAllotModal"></TenantPackAllotModal> <TenantPackAllotModal @register="registerPackAllotModal"></TenantPackAllotModal>
<!-- 邀请人弹窗 --> <!-- 邀请人弹窗 -->
<TenantInviteUserModal @register="registerSelUserModal" @inviteOk="handleInviteUserOk" /> <TenantInviteUserModal @register="registerSelUserModal" @inviteOk="handleInviteUserOk" />
<a-modal v-model:open="tipShow" :footer="null" title="租户用户更多操作说明" :width="800"> <a-modal v-model:open="tipShow" :footer="null" title="仓库用户更多操作说明" :width="800">
<ul class="user-tenant-tip"> <ul class="user-tenant-tip">
<li>移除将用户从当前租户中移除</li> <li>移除将用户从当前仓库中移除</li>
<li>删除仅可删除当天创建的用户删除后可在系统用户回收站恢复</li> <li>删除仅可删除当天创建的用户删除后可在系统用户回收站恢复</li>
<li>离职租户创建者可进行离职操作离职员工可在离职人员列表查看</li> <li>离职仓库创建者可进行离职操作离职员工可在离职人员列表查看</li>
<li>交接租户创建者可进行租户交接交接后员工信息可在离职人员列表查看</li> <li>交接仓库创建者可进行仓库交接交接后员工信息可在离职人员列表查看</li>
</ul> </ul>
<div style="height: 10px"></div> <div style="height: 10px"></div>
</a-modal> </a-modal>
@ -91,7 +91,7 @@
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({ const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
designScope: 'user-list', designScope: 'user-list',
tableProps: { tableProps: {
title: '租户用户列表', title: '仓库用户列表',
api: getUserTenantPageList, api: getUserTenantPageList,
columns: userTenantColumns, columns: userTenantColumns,
size: 'small', size: 'small',
@ -226,7 +226,7 @@
} }
/** /**
* 更新用户租户状态 * 更新用户仓库状态
* @param id * @param id
* @param status * @param status
*/ */
@ -242,8 +242,8 @@
}); });
} }
//============================================ ============================================ //============================================ ============================================
//id //id
const tenantId = ref<string>(''); const tenantId = ref<string>('');
// //
const excludeUserIdList = ref<any>([]); const excludeUserIdList = ref<any>([]);
@ -252,7 +252,7 @@
// //
const [registerSelUserModal, { openModal: userOpenModal }] = useModal(); const [registerSelUserModal, { openModal: userOpenModal }] = useModal();
const handOverUserName = ref<string>(''); const handOverUserName = ref<string>('');
/** /**
* 人员交接 * 人员交接
*/ */
@ -288,10 +288,10 @@
}) })
} }
} }
//============================================ ============================================ //============================================ ============================================
//update-begin---author:wangshuai ---date:20230710 forQQYUN-57234------------ //update-begin---author:wangshuai ---date:20230710 forQQYUN-57234------------
const loginTenantName = ref<string>(''); const loginTenantName = ref<string>('');
getTenantName(); getTenantName();
@ -299,12 +299,12 @@
async function getTenantName(){ async function getTenantName(){
loginTenantName.value = await getLoginTenantName(); loginTenantName.value = await getLoginTenantName();
} }
//update-end---author:wangshuai ---date:20230710 forQQYUN-57234------------ //update-end---author:wangshuai ---date:20230710 forQQYUN-57234------------
/** /**
* 分配套餐 * 分配套餐
* *
* @param record * @param record
*/ */
function handleAllotPack(record) { function handleAllotPack(record) {
@ -321,12 +321,12 @@
} }
/** /**
* 邀请用户加入租户 * 邀请用户加入仓库
*/ */
function handleInvitation() { function handleInvitation() {
userOpenModal(true, {}); userOpenModal(true, {});
} }
/** /**
* 用户选择回调事件 * 用户选择回调事件
* @param username * @param username
@ -352,10 +352,10 @@
async function handleLeave(id) { async function handleLeave(id) {
await leaveTenant({ userIds: id, tenantId: getTenantId() }, reload) await leaveTenant({ userIds: id, tenantId: getTenantId() }, reload)
} }
onMounted(()=>{ onMounted(()=>{
tenantSaasMessage('租户用户') tenantSaasMessage('仓库用户')
}) })
</script> </script>

View File

@ -1,4 +1,4 @@
<!--邀请用户加入租户弹窗--> <!--邀请用户加入仓库弹窗-->
<template> <template>
<BasicModal @register="registerModal" :width="500" :title="title" @ok="handleSubmit"> <BasicModal @register="registerModal" :width="500" :title="title" @ok="handleSubmit">
<BasicForm @register="registerForm" /> <BasicForm @register="registerForm" />
@ -65,7 +65,7 @@ export default defineComponent({
}); });
/** /**
* 提交返回给租户list页面 * 提交返回给仓库list页面
*/ */
async function handleSubmit() { async function handleSubmit() {
let values = await validate(); let values = await validate();

View File

@ -38,7 +38,7 @@
} }
}); });
// //
const title = computed(() => (!unref(isUpdate) ? '新增租户' : '编辑租户')); const title = computed(() => (!unref(isUpdate) ? '新增仓库' : '编辑仓库'));
// //
async function handleSubmit(v) { async function handleSubmit(v) {
try { try {

View File

@ -41,7 +41,7 @@
emits: ['cancel'], emits: ['cancel'],
setup(props, { emit }) { setup(props, { emit }) {
const [registerUserModal, { openModal: openUserModal, closeModal: closeUserModal }] = useModal(); const [registerUserModal, { openModal: openUserModal, closeModal: closeUserModal }] = useModal();
//id //id
const getTenantId = computed(() => { const getTenantId = computed(() => {
return tenantPackData.tenantId; return tenantPackData.tenantId;
}); });

View File

@ -17,22 +17,22 @@
<Icon icon="mdi:chevron-down"></Icon> <Icon icon="mdi:chevron-down"></Icon>
</a-button> </a-button>
</a-dropdown> </a-dropdown>
<a-button <!-- <a-button
preIcon="ant-design:user-add-outlined" preIcon="ant-design:user-add-outlined"
type="primary" type="primary"
@click="handleInvitation" @click="handleInvitation"
style="margin-right: 5px" style="margin-right: 5px"
:disabled="selectedRowKeys.length === 0" :disabled="selectedRowKeys.length === 0"
>邀请用户加入</a-button >邀请用户加入</a-button
> >-->
<a-button <!-- <a-button
preIcon="ant-design:sliders-outlined" preIcon="ant-design:sliders-outlined"
type="primary" type="primary"
@click="handlePack" @click="handlePack"
style="margin-right: 5px" style="margin-right: 5px"
:disabled="selectedRowKeys.length === 0" :disabled="selectedRowKeys.length === 0"
>套餐管理</a-button >套餐管理</a-button
> >-->
<a-button type="primary" @click="recycleBinClick" preIcon="ant-design:hdd-outlined">回收站</a-button> <a-button type="primary" @click="recycleBinClick" preIcon="ant-design:hdd-outlined">回收站</a-button>
</template> </template>
<template #action="{ record }"> <template #action="{ record }">
@ -44,7 +44,7 @@
<TenantUserModal @register="registerTenUserModal" /> <TenantUserModal @register="registerTenUserModal" />
<!-- 产品包 --> <!-- 产品包 -->
<TenantPackList @register="registerPackModal" /> <TenantPackList @register="registerPackModal" />
<!-- 租户回收站 --> <!-- 仓库回收站 -->
<TenantRecycleBinModal @register="registerRecycleBinModal" @success="reload" /> <TenantRecycleBinModal @register="registerRecycleBinModal" @success="reload" />
</div> </div>
</template> </template>
@ -73,7 +73,7 @@
const { prefixCls, tableContext } = useListPage({ const { prefixCls, tableContext } = useListPage({
designScope: 'tenant-template', designScope: 'tenant-template',
tableProps: { tableProps: {
title: '租户列表', title: '仓库列表',
api: getTenantList, api: getTenantList,
columns: columns, columns: columns,
formConfig: { formConfig: {
@ -147,7 +147,7 @@
} }
/** /**
* 邀请用户加入租户 * 邀请用户加入仓库
*/ */
function handleInvitation() { function handleInvitation() {
userOpenModal(true, {}); userOpenModal(true, {});
@ -160,14 +160,14 @@
* @param userSelectId * @param userSelectId
*/ */
async function handleInviteUserOk(phone, username) { async function handleInviteUserOk(phone, username) {
//update-begin---author:wangshuai ---date:20230314 forQQYUN-4605------------ //update-begin---author:wangshuai ---date:20230314 forQQYUN-4605------------
if (phone) { if (phone) {
await invitationUserJoin({ ids: selectedRowKeys.value.join(','), phone: phone }); await invitationUserJoin({ ids: selectedRowKeys.value.join(','), phone: phone });
} }
if (username) { if (username) {
await invitationUserJoin({ ids: selectedRowKeys.value.join(','), username: username }); await invitationUserJoin({ ids: selectedRowKeys.value.join(','), username: username });
} }
//update-end---author:wangshuai ---date:20230314 forQQYUN-4605------------ //update-end---author:wangshuai ---date:20230314 forQQYUN-4605------------
} }
/** /**
@ -190,7 +190,7 @@
} }
packModal(true, { packModal(true, {
tenantId: unref(selectedRowKeys.value.join(',')), tenantId: unref(selectedRowKeys.value.join(',')),
// //
showPackAddAndEdit: true showPackAddAndEdit: true
}); });
} }

View File

@ -1,4 +1,4 @@
<!--我的租户详情--> <!--我的仓库详情-->
<template> <template>
<div class="message-set-container"> <div class="message-set-container">
<div class="message-set-box"> <div class="message-set-box">
@ -78,7 +78,7 @@
let tradeOptions: any[] = []; let tradeOptions: any[] = [];
/** /**
* 初始化租户信息 * 初始化仓库信息
*/ */
async function initTenant() { async function initTenant() {
let result = await getTenantById({ id: getTenantId() }); let result = await getTenantById({ id: getTenantId() });
@ -156,7 +156,7 @@
onMounted(() => { onMounted(() => {
// //
tenantSaasMessage('我的租户'); tenantSaasMessage('我的仓库');
initTenant(); initTenant();
}); });
</script> </script>

View File

@ -56,7 +56,7 @@
const { prefixCls, tableContext } = useListPage({ const { prefixCls, tableContext } = useListPage({
designScope: 'tenant-template', designScope: 'tenant-template',
tableProps: { tableProps: {
title: '租户列表', title: '仓库列表',
api: getTenantPageListByUserId, api: getTenantPageListByUserId,
columns: columns, columns: columns,
formConfig: { formConfig: {
@ -76,14 +76,14 @@
}); });
const [registerTable, { reload }, { rowSelection, selectedRowKeys, selectedRows }] = tableContext; const [registerTable, { reload }, { rowSelection, selectedRowKeys, selectedRows }] = tableContext;
// //
function onFetchSuccess(data) { function onFetchSuccess(data) {
let items = data.items; let items = data.items;
console.log('items:', items); console.log('items:', items);
// ID // ID
let loginTenantId = getTenantId(); let loginTenantId = getTenantId();
console.log('loginTenantId:', loginTenantId); console.log('loginTenantId:', loginTenantId);
// ID // ID
if (items && items.length > 0 && loginTenantId) { if (items && items.length > 0 && loginTenantId) {
for (let i = 0; i < items.length; i++) { for (let i = 0; i < items.length; i++) {
if (items[i].id == loginTenantId) { if (items[i].id == loginTenantId) {
@ -110,7 +110,7 @@
} }
/** /**
* 邀请用户加入租户 * 邀请用户加入仓库
*/ */
function handleInvitation() { function handleInvitation() {
userOpenModal(true, {}); userOpenModal(true, {});
@ -151,7 +151,7 @@
} }
packModal(true, { packModal(true, {
tenantId: unref(selectedRowKeys.value.join(',')), tenantId: unref(selectedRowKeys.value.join(',')),
// //
showPackAddAndEdit: false showPackAddAndEdit: false
}); });
} }
@ -165,6 +165,6 @@
onMounted(()=>{ onMounted(()=>{
// //
tenantSaasMessage('我的租户') tenantSaasMessage('我的仓库')
}) })
</script> </script>

View File

@ -1,11 +1,11 @@
<!-- 当前租户下套餐 --> <!-- 当前仓库下套餐 -->
<template> <template>
<div style="display: flex; width: 100%"> <div style="display: flex; width: 100%">
<div :style="leftStyle"> <div :style="leftStyle">
<BasicTable @register="registerTable"> <BasicTable @register="registerTable">
<template #tableTitle> <template #tableTitle>
<div style="margin-left: 10px; margin-top: 5px" <div style="margin-left: 10px; margin-top: 5px"
>当前登录租户: <span class="tenant-name">{{ loginTenantName }}</span> >当前登录仓库: <span class="tenant-name">{{ loginTenantName }}</span>
</div> </div>
</template> </template>
<!--操作栏--> <!--操作栏-->
@ -81,12 +81,12 @@
}, },
}); });
const [registerTable, { reload }, { rowSelection, selectedRowKeys, selectedRows }] = tableContext; const [registerTable, { reload }, { rowSelection, selectedRowKeys, selectedRows }] = tableContext;
// //
const loginTenantName = ref<string>(''); const loginTenantName = ref<string>('');
const { createMessage } = useMessage(); const { createMessage } = useMessage();
/** /**
* 获取租户名称 * 获取仓库名称
*/ */
getTenantName(); getTenantName();

View File

@ -67,7 +67,7 @@
{ {
label: '删除', label: '删除',
popConfirm: { popConfirm: {
title: '是否确认删除租户套餐包', title: '是否确认删除仓库套餐包',
confirm: handleDelete.bind(null, record.id), confirm: handleDelete.bind(null, record.id),
}, },
}, },
@ -76,7 +76,7 @@
/** /**
* 编辑套餐包 * 编辑套餐包
*/ */
function handleAdd() { function handleAdd() {
packModal(true, { packModal(true, {
isUpdate: false, isUpdate: false,
@ -84,11 +84,11 @@
showFooter: true showFooter: true
}); });
} }
/** /**
* 删除默认套餐包 * 删除默认套餐包
*/ */
async function handleDelete(id) { async function handleDelete(id) {
await deleteTenantPack({ ids: id }, handleSuccess); await deleteTenantPack({ ids: id }, handleSuccess);
} }
@ -96,7 +96,7 @@
* 编辑 * 编辑
*/ */
function handleEdit(record) { function handleEdit(record) {
packModal(true, { packModal(true, {
isUpdate: true, isUpdate: true,
record: record, record: record,
packType:'default', packType:'default',
@ -129,8 +129,8 @@
*/ */
async function handlePackBatch() { async function handlePackBatch() {
Modal.confirm({ Modal.confirm({
title: '删除租户套餐包', title: '删除仓库套餐包',
content: '是否删除租户套餐包', content: '是否删除仓库套餐包',
okText: '确认', okText: '确认',
cancelText: '取消', cancelText: '取消',
onOk: async () => { onOk: async () => {

View File

@ -80,7 +80,7 @@
success(); success();
}); });
// //
const title = '租户个性化套餐包'; const title = '仓库个性化套餐包';
// //
async function handleSubmit(v) { async function handleSubmit(v) {
@ -125,7 +125,7 @@
//,() //,()
const packCode = reactive<any>(['superAdmin','accountAdmin','appAdmin']); const packCode = reactive<any>(['superAdmin','accountAdmin','appAdmin']);
const { createMessage } = useMessage(); const { createMessage } = useMessage();
/** /**
* 删除套餐包 * 删除套餐包
* @param 删除 * @param 删除
@ -166,8 +166,8 @@
} }
} }
Modal.confirm({ Modal.confirm({
title: '删除租户套餐包', title: '删除仓库套餐包',
content: '是否删除租户套餐包', content: '是否删除仓库套餐包',
okText: '确认', okText: '确认',
cancelText: '取消', cancelText: '取消',
onOk: async () => { onOk: async () => {
@ -224,7 +224,7 @@
{ {
label: '删除', label: '删除',
popConfirm: { popConfirm: {
title: '是否确认删除租户套餐包', title: '是否确认删除仓库套餐包',
confirm: handleDelete.bind(null, record), confirm: handleDelete.bind(null, record),
}, },
}, },

View File

@ -18,7 +18,7 @@
schemas: packMenuFormSchema, schemas: packMenuFormSchema,
showActionButtonGroup: false, showActionButtonGroup: false,
}); });
// //
const tenantId = ref<number>(); const tenantId = ref<number>();
// //
const packType = ref<number>(); const packType = ref<number>();
@ -43,11 +43,11 @@
//update-end---author:wangshuai ---date:20230705 forQQYUN-56852 ------------ //update-end---author:wangshuai ---date:20230705 forQQYUN-56852 ------------
}); });
// //
const title = computed(() => (unref(isUpdate) ? '编辑 租户套餐' : '新增 租户套餐')); const title = computed(() => (unref(isUpdate) ? '编辑 仓库套餐' : '新增 仓库套餐'));
// //
async function handleSubmit(v) { async function handleSubmit(v) {
const values = await validate(); const values = await validate();
setModalProps({ confirmLoading: true }); setModalProps({ confirmLoading: true });
values.packType = unref(packType); values.packType = unref(packType);
if(values.packType === 'custom'){ if(values.packType === 'custom'){

View File

@ -38,11 +38,11 @@
name: 'TenantPackUserModal', name: 'TenantPackUserModal',
components: { BasicModal, BasicTable, TableAction, TenantUserSelectModal }, components: { BasicModal, BasicTable, TableAction, TenantUserSelectModal },
setup() { setup() {
//id //id
const getTenantId = computed(()=>{ const getTenantId = computed(()=>{
return tenantPackData.tenantId; return tenantPackData.tenantId;
}) })
// //
const tenantPackData = reactive<any>({}); const tenantPackData = reactive<any>({});
// //

View File

@ -25,18 +25,18 @@ enum Api {
queryTenantPackUserList = '/sys/tenant/queryTenantPackUserList', queryTenantPackUserList = '/sys/tenant/queryTenantPackUserList',
deleteTenantPackUser = '/sys/tenant/deleteTenantPackUser', deleteTenantPackUser = '/sys/tenant/deleteTenantPackUser',
addTenantPackUser = '/sys/tenant/addTenantPackUser', addTenantPackUser = '/sys/tenant/addTenantPackUser',
//获取用户租户列表 //获取用户仓库列表
getTenantPageListByUserId = '/sys/tenant/getTenantPageListByUserId', getTenantPageListByUserId = '/sys/tenant/getTenantPageListByUserId',
//新增、编辑用户租户 //新增、编辑用户仓库
saveUser = '/sys/user/addTenantUser', saveUser = '/sys/user/addTenantUser',
editUser = '/sys/user/editTenantUser', editUser = '/sys/user/editTenantUser',
//根据租户id和用户获取用户的产品包列表和当前用户下的产品包id //根据仓库id和用户获取用户的产品包列表和当前用户下的产品包id
listPackByTenantUserId = '/sys/tenant/listPackByTenantUserId', listPackByTenantUserId = '/sys/tenant/listPackByTenantUserId',
} }
/** /**
* *
* @param params * @param params
*/ */
export const getTenantList = (params) => { export const getTenantList = (params) => {
@ -44,7 +44,7 @@ export const getTenantList = (params) => {
}; };
/** /**
* *
* @param params * @param params
*/ */
export const saveOrUpdateTenant = (params, isUpdate) => { export const saveOrUpdateTenant = (params, isUpdate) => {
@ -53,7 +53,7 @@ export const saveOrUpdateTenant = (params, isUpdate) => {
}; };
/** /**
* *
* @param params * @param params
*/ */
export const getTenantById = (params) => { export const getTenantById = (params) => {
@ -61,7 +61,7 @@ export const getTenantById = (params) => {
}; };
/** /**
* *
* @param params * @param params
*/ */
export const deleteTenant = (params, handleSuccess) => { export const deleteTenant = (params, handleSuccess) => {
@ -71,7 +71,7 @@ export const deleteTenant = (params, handleSuccess) => {
}; };
/** /**
* *
* @param params * @param params
*/ */
export const batchDeleteTenant = (params, handleSuccess) => { export const batchDeleteTenant = (params, handleSuccess) => {
@ -94,13 +94,13 @@ export const batchDeleteTenant = (params, handleSuccess) => {
export const getUserTenants = (params?) => defHttp.get({ url: Api.getCurrentUserTenants, params }); export const getUserTenants = (params?) => defHttp.get({ url: Api.getCurrentUserTenants, params });
/** /**
* *
* @param params * @param params
*/ */
export const invitationUserJoin = (params) => defHttp.put({ url: Api.invitationUserJoin, params }, { joinParamsToUrl: true }); export const invitationUserJoin = (params) => defHttp.put({ url: Api.invitationUserJoin, params }, { joinParamsToUrl: true });
/** /**
* id * id
* @param params * @param params
*/ */
export const getTenantUserList = (params) => { export const getTenantUserList = (params) => {
@ -108,13 +108,13 @@ export const getTenantUserList = (params) => {
}; };
/** /**
* *
* @param params * @param params
*/ */
export const leaveTenant = (params, handleSuccess) => { export const leaveTenant = (params, handleSuccess) => {
Modal.confirm({ Modal.confirm({
title: '请离', title: '请离',
content: '是否将此用户请离当前租户', content: '是否将此用户请离当前仓库',
okText: '确认', okText: '确认',
cancelText: '取消', cancelText: '取消',
onOk: () => { onOk: () => {
@ -171,7 +171,7 @@ export const syncDefaultTenantPack = (params, handleSuccess) => {
}; };
/** /**
* *
* @param params * @param params
*/ */
export const recycleBinPageList = (params) => { export const recycleBinPageList = (params) => {
@ -179,7 +179,7 @@ export const recycleBinPageList = (params) => {
}; };
/** /**
* *
* @param params * @param params
*/ */
export const deleteLogicDeleted = (params,handleSuccess) => { export const deleteLogicDeleted = (params,handleSuccess) => {
@ -191,7 +191,7 @@ export const deleteLogicDeleted = (params,handleSuccess) => {
}; };
/** /**
* *
* @param params * @param params
*/ */
export const revertTenantLogic = (params,handleSuccess) => { export const revertTenantLogic = (params,handleSuccess) => {
@ -201,7 +201,7 @@ export const revertTenantLogic = (params,handleSuccess) => {
}; };
/** /**
* *
* @param params * @param params
*/ */
export const queryTenantPackUserList = (params) => { export const queryTenantPackUserList = (params) => {
@ -225,7 +225,7 @@ export const addTenantPackUser = (params)=>{
} }
/** /**
* *
* @param params * @param params
*/ */
export const getTenantPageListByUserId = (params) => { export const getTenantPageListByUserId = (params) => {
@ -234,7 +234,7 @@ export const getTenantPageListByUserId = (params) => {
/** /**
* *
*/ */
export async function getLoginTenantName() { export async function getLoginTenantName() {
let tenantId = getTenantId(); let tenantId = getTenantId();
@ -256,8 +256,8 @@ export const saveOrUpdateTenantUser = (params, isUpdate) => {
return defHttp.post({ url: url, params },{ joinParamsToUrl: true }); return defHttp.post({ url: url, params },{ joinParamsToUrl: true });
}; };
/** /**
* idid * idid
* *
* @param params * @param params
*/ */
export const listPackByTenantUserId = (params) => { export const listPackByTenantUserId = (params) => {

View File

@ -1,21 +1,21 @@
import { BasicColumn, FormSchema } from '/@/components/Table'; import { BasicColumn, FormSchema } from '/@/components/Table';
import { getAutoScrollContainer } from '/@/utils/common/compUtils';
import { render } from "/@/utils/common/renderUtils"; import { render } from "/@/utils/common/renderUtils";
import { rules } from "/@/utils/helper/validator"; import { rules } from "/@/utils/helper/validator";
export const columns: BasicColumn[] = [ export const columns: BasicColumn[] = [
{ {
title: '租户名称', title: '仓库名称',
dataIndex: 'name', dataIndex: 'name',
width: 200, width: 200,
align: 'left', align: 'left',
}, },
{ {
title: '租户编号(ID)', title: '仓库编号',
dataIndex: 'id', dataIndex: 'id',
width: 180, width: 180,
},{ },
title: '组织LOGO', {
title: '仓库LOGO',
dataIndex: 'companyLogo', dataIndex: 'companyLogo',
width: 100, width: 100,
customRender: ({ text }) => { customRender: ({ text }) => {
@ -25,11 +25,6 @@ export const columns: BasicColumn[] = [
return render.renderImage({text}); return render.renderImage({text});
}, },
}, },
{
dataIndex: 'trade_dictText',
title: '所属行业',
width: 150
},
{ {
dataIndex: 'companySize_dictText', dataIndex: 'companySize_dictText',
title: '公司规模', title: '公司规模',
@ -51,7 +46,7 @@ export const columns: BasicColumn[] = [
// width: 150 // width: 150
// }, // },
{ {
dataIndex: 'createBy_dictText', dataIndex: 'createBy',
title: '创建者(拥有)', title: '创建者(拥有)',
width: 150 width: 150
}, },
@ -77,7 +72,7 @@ export const columns: BasicColumn[] = [
export const searchFormSchema: FormSchema[] = [ export const searchFormSchema: FormSchema[] = [
{ {
field: 'name', field: 'name',
label: '租户名称', label: '仓库名称',
component: 'Input', component: 'Input',
colProps: { span: 8 }, colProps: { span: 8 },
}, },
@ -109,13 +104,13 @@ export const searchFormSchema: FormSchema[] = [
export const formSchema: FormSchema[] = [ export const formSchema: FormSchema[] = [
{ {
field: 'name', field: 'name',
label: '租户名称', label: '仓库名称',
component: 'Input', component: 'Input',
required: true, required: true,
}, },
{ {
field: 'id', field: 'id',
label: '租户编号(ID)', label: '仓库编号(ID)',
component: 'InputNumber', component: 'InputNumber',
required: true, required: true,
ifShow: ({ values }) => { ifShow: ({ values }) => {
@ -124,7 +119,7 @@ export const formSchema: FormSchema[] = [
}, },
{ {
field: 'companyLogo', field: 'companyLogo',
label: '组织LOGO', label: '仓库LOGO',
component: 'JImageUpload', component: 'JImageUpload',
componentProps:{ componentProps:{
text:'logo' text:'logo'
@ -422,8 +417,8 @@ export const packMenuFormSchema: FormSchema[] = [
unCheckedChildren: '否', unCheckedChildren: '否',
}, },
defaultValue: "1", defaultValue: "1",
helpMessage: "默认会自动分配给用户,个性高级套餐,需要租户管理员手工分配人员(拥有更灵活性权限控制)" helpMessage: "默认会自动分配给用户,个性高级套餐,需要仓库管理员手工分配人员(拥有更灵活性权限控制)"
}, },
{ {
field: 'status', field: 'status',
label: '开启状态', label: '开启状态',
@ -447,7 +442,7 @@ export const packMenuFormSchema: FormSchema[] = [
label: '产品包编码', label: '产品包编码',
component: 'Input', component: 'Input',
show: false show: false
}, },
{ {
field: 'packType', field: 'packType',
label: '产品包类型', label: '产品包类型',
@ -459,18 +454,18 @@ export const packMenuFormSchema: FormSchema[] = [
//回收站列表 //回收站列表
export const recycleColumns : BasicColumn[] = [ export const recycleColumns : BasicColumn[] = [
{ {
title: '租户名称', title: '仓库名称',
dataIndex: 'name', dataIndex: 'name',
width: 100, width: 100,
align: 'left', align: 'left',
}, },
{ {
title: '租户编号(ID)', title: '仓库编号(ID)',
dataIndex: 'id', dataIndex: 'id',
width: 100, width: 100,
}, },
{ {
title: '组织LOGO', title: '仓库LOGO',
dataIndex: 'companyLogo', dataIndex: 'companyLogo',
width: 100, width: 100,
customRender: ({ text }) => { customRender: ({ text }) => {
@ -487,11 +482,11 @@ export const recycleColumns : BasicColumn[] = [
} }
] ]
//租户回收站搜索表单 //仓库回收站搜索表单
export const searchRecycleFormSchema : FormSchema[] = [ export const searchRecycleFormSchema : FormSchema[] = [
{ {
field: 'name', field: 'name',
label: '租户名称', label: '仓库名称',
component: 'Input', component: 'Input',
}, },
{ {
@ -525,7 +520,7 @@ export const tenantPackUserColumns: BasicColumn[] = [
] ]
/** /**
* *
*/ */
export const tenantUserSchema: FormSchema[] = [ export const tenantUserSchema: FormSchema[] = [
{ field: 'id', label: 'id', component: 'Input', show: false }, { field: 'id', label: 'id', component: 'Input', show: false },
@ -580,15 +575,15 @@ export const tenantUserSchema: FormSchema[] = [
return [{ required: false, message: '请输入工号' }, { ...rules.duplicateCheckRule('sys_user', 'work_no', model, schema, false)[0] }]; return [{ required: false, message: '请输入工号' }, { ...rules.duplicateCheckRule('sys_user', 'work_no', model, schema, false)[0] }];
}, },
},*/ },*/
{ field: 'relTenantIds', label: '租户', component: 'Input',show:false }, { field: 'relTenantIds', label: '仓库', component: 'Input',show:false },
{ field: 'selectedroles', label: '角色', component: 'Input',show:false }, { field: 'selectedroles', label: '角色', component: 'Input',show:false },
]; ];
// 分配用户套餐 // 分配用户套餐
export const packUserAllotSchemas: FormSchema[] = [ export const packUserAllotSchemas: FormSchema[] = [
{ {
field: 'userId', field: 'userId',
label: '用户id', label: '用户id',
component: 'Input', component: 'Input',
show: false show: false
}, },
@ -606,4 +601,4 @@ export const packUserAllotSchemas: FormSchema[] = [
component: 'Select', component: 'Select',
slot: 'packId' slot: 'packId'
} }
]; ];

View File

@ -43,11 +43,11 @@
isUpdate.value = !!data?.isUpdate; isUpdate.value = !!data?.isUpdate;
if (unref(isUpdate)) { if (unref(isUpdate)) {
rowId.value = data.record.id; rowId.value = data.record.id;
// //
/* if (data.record.relTenantIds && !Array.isArray(data.record.relTenantIds)) { /* if (data.record.relTenantIds && !Array.isArray(data.record.relTenantIds)) {
data.record.relTenantIds = data.record.relTenantIds.split(','); data.record.relTenantIds = data.record.relTenantIds.split(',');
} else { } else {
//issues/I56C5I //issues/I56C5I
//data.record.relTenantIds = []; //data.record.relTenantIds = [];
}*/ }*/
@ -108,27 +108,27 @@
{ {
field: 'selectedroles', field: 'selectedroles',
show: !data?.departDisabled, show: !data?.departDisabled,
//update-begin---author:wangshuai ---date:20230424 forissues/4844------------ //update-begin---author:wangshuai ---date:20230424 forissues/4844------------
// //
componentProps:{ componentProps:{
api: data.tenantSaas?getAllRolesList:getAllRolesListNoByTenant api: data.tenantSaas?getAllRolesList:getAllRolesListNoByTenant
} }
//update-end---author:wangshuai ---date:20230424 forissues/4844------------ //update-end---author:wangshuai ---date:20230424 forissues/4844------------
}, },
//update-begin---author:wangshuai ---date:20230522 forissues/4935------------ //update-begin---author:wangshuai ---date:20230522 forissues/4935------------
{ {
field: 'relTenantIds', field: 'relTenantIds',
componentProps:{ componentProps:{
disabled: !!data.tenantSaas, disabled: !!data.tenantSaas,
}, },
}, },
//update-end---author:wangshuai ---date:20230522 forissues/4935------------ //update-end---author:wangshuai ---date:20230522 forissues/4935------------
]); ]);
//update-begin---author:wangshuai ---date:20230522 forissues/4935------------ //update-begin---author:wangshuai ---date:20230522 forissues/4935------------
if(!unref(isUpdate) && data.tenantSaas){ if(!unref(isUpdate) && data.tenantSaas){
await setFieldsValue({ relTenantIds: getTenantId().toString() }) await setFieldsValue({ relTenantIds: getTenantId().toString() })
} }
//update-end---author:wangshuai ---date:20230522 forissues/4935------------ //update-end---author:wangshuai ---date:20230522 forissues/4935------------
// //
if (typeof data.record === 'object') { if (typeof data.record === 'object') {
setFieldsValue({ setFieldsValue({

View File

@ -39,13 +39,13 @@ export const getExportUrl = Api.exportXls;
*/ */
export const getImportUrl = Api.importExcel; export const getImportUrl = Api.importExcel;
/** /**
* () * ()
* @param params * @param params
*/ */
export const list = (params) => defHttp.get({ url: Api.list, params }); export const list = (params) => defHttp.get({ url: Api.list, params });
/** /**
* () * ()
* @param params * @param params
*/ */
export const listNoCareTenant = (params) => defHttp.get({ url: Api.listNoCareTenant, params }); export const listNoCareTenant = (params) => defHttp.get({ url: Api.listNoCareTenant, params });
@ -127,17 +127,17 @@ export const duplicateCheckDelay = (params) => {
}); });
}; };
/** /**
* *
* @param params * @param params
*/ */
export const getAllRolesList = (params) => defHttp.get({ url: Api.allRolesList, params }); export const getAllRolesList = (params) => defHttp.get({ url: Api.allRolesList, params });
/** /**
* *
* @param params * @param params
*/ */
export const getAllRolesListNoByTenant = (params) => defHttp.get({ url: Api.allRolesListNoByTenant, params }); export const getAllRolesListNoByTenant = (params) => defHttp.get({ url: Api.allRolesListNoByTenant, params });
/** /**
* *
*/ */
export const getAllTenantList = (params) => defHttp.get({ url: Api.allTenantList, params }); export const getAllTenantList = (params) => defHttp.get({ url: Api.allTenantList, params });
/** /**
@ -221,7 +221,7 @@ export const getUserTenantPageList = (params) => {
}; };
/** /**
* *
* @param params * @param params
*/ */
export const updateUserTenantStatus = (params) => { export const updateUserTenantStatus = (params) => {

View File

@ -288,7 +288,7 @@ export const formSchema: FormSchema[] = [
}, },
}, },
{ {
label: '租户', label: '仓库',
field: 'relTenantIds', field: 'relTenantIds',
component: 'JSearchSelect', component: 'JSearchSelect',
componentProps: { componentProps: {
@ -424,7 +424,7 @@ export const formPasswordSchema: FormSchema[] = [
//租户用户列表 //仓库用户列表
export const userTenantColumns: BasicColumn[] = [ export const userTenantColumns: BasicColumn[] = [
{ {
title: '用户账号', title: '用户账号',
@ -468,7 +468,7 @@ export const userTenantColumns: BasicColumn[] = [
}, },
]; ];
//用户租户搜索表单 //用户仓库搜索表单
export const userTenantFormSchema: FormSchema[] = [ export const userTenantFormSchema: FormSchema[] = [
{ {
label: '账号', label: '账号',

View File

@ -68,7 +68,7 @@
<div class="font-size-13 flex"> <div class="font-size-13 flex">
<span class="gray-75 item-label">签名</span> <span class="gray-75 item-label">签名</span>
<a-upload <a-upload
accept="jpg,jpeg,png" accept="jpg,jpeg,png"
:max-count="1" :max-count="1"
:multiple="false" :multiple="false"
name = "file" name = "file"
@ -126,7 +126,7 @@ import { getToken } from "@/utils/auth";
import { uploadUrl } from "@/api/common/api"; import { uploadUrl } from "@/api/common/api";
import { UploadOutlined } from "@ant-design/icons-vue"; import { UploadOutlined } from "@ant-design/icons-vue";
//TODO //TODO
const sexOption = getDictItemsByCode("sex") || [{text:'男',value:'1'},{text:'女',value:'2'}]; const sexOption = getDictItemsByCode("sex") || [{text:'男',value:'1'},{text:'女',value:'2'}];
const { createMessage } = useMessage(); const { createMessage } = useMessage();
const userStore = useUserStore(); const userStore = useUserStore();
@ -294,7 +294,7 @@ function getDiffDay(date) {
/** /**
* 上传图片之前进行验证 * 上传图片之前进行验证
* *
* @param file * @param file
*/ */
function beforeUpload({ file }) { function beforeUpload({ file }) {

View File

@ -65,11 +65,11 @@
class="font-color333 flex-center margin-right40 font-size13 pointer" class="font-color333 flex-center margin-right40 font-size13 pointer"
> >
<Icon icon="ant-design:edit-outlined" class="footer-icon" /> <Icon icon="ant-design:edit-outlined" class="footer-icon" />
<span>查看租户名片</span> <span>查看仓库名片</span>
</span> </span>
<span v-else class="font-color9e flex-center margin-right40 font-size13"> <span v-else class="font-color9e flex-center margin-right40 font-size13">
<Icon icon="ant-design:edit-outlined" class="footer-icon" /> <Icon icon="ant-design:edit-outlined" class="footer-icon" />
<span>查看租户名片</span> <span>查看仓库名片</span>
</span> </span>
<span <span
v-if="item.userTenantStatus !== '3'" v-if="item.userTenantStatus !== '3'"
@ -77,11 +77,11 @@
class="font-color333 flex-center margin-right40 font-size13 pointer" class="font-color333 flex-center margin-right40 font-size13 pointer"
> >
<Icon icon="ant-design:export-outlined" class="footer-icon" /> <Icon icon="ant-design:export-outlined" class="footer-icon" />
<span>退出租户</span> <span>退出仓库</span>
</span> </span>
<span v-else class="font-color9e flex-center margin-right40 font-size13"> <span v-else class="font-color9e flex-center margin-right40 font-size13">
<Icon icon="ant-design:export-outlined" class="footer-icon" /> <Icon icon="ant-design:export-outlined" class="footer-icon" />
<span>退出租户</span> <span>退出仓库</span>
</span> </span>
</div> </div>
</div> </div>
@ -108,19 +108,19 @@
</div> </div>
</a-modal> </a-modal>
<!-- 退出租户 --> <!-- 退出仓库 -->
<a-modal v-model:open="cancelVisible" width="800" destroy-on-close> <a-modal v-model:open="cancelVisible" width="800" destroy-on-close>
<template #title> <template #title>
<div class="cancellation"> <div class="cancellation">
<Icon icon="ant-design:warning-outlined" style="font-size: 20px;color: red"/> <Icon icon="ant-design:warning-outlined" style="font-size: 20px;color: red"/>
退出租户 {{myTenantInfo.name}} 退出仓库 {{myTenantInfo.name}}
</div> </div>
</template> </template>
<a-form :model="formCancelState" ref="cancelTenantRef"> <a-form :model="formCancelState" ref="cancelTenantRef">
<a-form-item name="tenantName"> <a-form-item name="tenantName">
<a-row :span="24" style="padding: 20px 20px 0;font-size: 13px"> <a-row :span="24" style="padding: 20px 20px 0;font-size: 13px">
<a-col :span="24"> <a-col :span="24">
请输入租户名称 请输入仓库名称
</a-col> </a-col>
<a-col :span="24" style="margin-top: 10px"> <a-col :span="24" style="margin-top: 10px">
<a-input v-model:value="formCancelState.tenantName" @change="tenantNameChange"/> <a-input v-model:value="formCancelState.tenantName" @change="tenantNameChange"/>
@ -162,7 +162,7 @@
</a-row> </a-row>
</div> </div>
</a-modal> </a-modal>
<!-- begin 我的受邀信息 --> <!-- begin 我的受邀信息 -->
<a-modal title="我的受邀信息" v-model:open="invitedVisible" :footer="null"> <a-modal title="我的受邀信息" v-model:open="invitedVisible" :footer="null">
<a-row :span="24" class="invited-row"> <a-row :span="24" class="invited-row">
@ -211,7 +211,7 @@ const userStore = useUserStore();
const { createMessage } = useMessage(); const { createMessage } = useMessage();
// //
const departOptions = ref<any>([]); const departOptions = ref<any>([]);
// //
const tenantVisible = ref<boolean>(false); const tenantVisible = ref<boolean>(false);
// //
const userData = ref<any>([]); const userData = ref<any>([]);
@ -223,11 +223,11 @@ const userDetail = ref({
postText: userStore.getUserInfo.postText, postText: userStore.getUserInfo.postText,
}); });
/** /**
* 初始化租户数据 * 初始化仓库数据
*/ */
async function initDataSource() { async function initDataSource() {
// //
//update-begin---author:wangshuai ---date:20230109 for: [QQYUN-3645]------------ //update-begin---author:wangshuai ---date:20230109 for: [QQYUN-3645]------------
//update-begin---author:wangshuai ---date:202307049 for[QQYUN-5608],,----------- //update-begin---author:wangshuai ---date:202307049 for[QQYUN-5608],,-----------
getTenantListByUserId({ userTenantStatus: '1,3,5' }).then((res) => { getTenantListByUserId({ userTenantStatus: '1,3,5' }).then((res) => {
if (res.success) { if (res.success) {
@ -256,12 +256,12 @@ const userDetail = ref({
//update-end---author:wangshuai ---date:202307049 for[QQYUN-5608],,------------ //update-end---author:wangshuai ---date:202307049 for[QQYUN-5608],,------------
} }
}); });
//update-end---author:wangshuai ---date:20230109 for[QQYUN-3645]------------ //update-end---author:wangshuai ---date:20230109 for[QQYUN-3645]------------
} }
function setInitedValue() { function setInitedValue() {
dataSource.value = []; dataSource.value = [];
invitedList.value = []; invitedList.value = [];
invitedCount.value = 0; invitedCount.value = 0;
} }
/** /**
@ -343,7 +343,7 @@ const userDetail = ref({
if (type === 'editTenant') { if (type === 'editTenant') {
tenantVisible.value = true; tenantVisible.value = true;
}else if(type === 'exitTenant'){ }else if(type === 'exitTenant'){
//退 //退
formCancelState.value = {loginPassword:'', tenantName:''}; formCancelState.value = {loginPassword:'', tenantName:''};
outBtnDisabled.value = true; outBtnDisabled.value = true;
cancelVisible.value = true; cancelVisible.value = true;
@ -351,13 +351,13 @@ const userDetail = ref({
} }
} }
//退 //退
const cancelVisible = ref<boolean>(false); const cancelVisible = ref<boolean>(false);
//退 //退
const formCancelState = ref<any>({}); const formCancelState = ref<any>({});
// //
const myTenantInfo = ref<any>({}); const myTenantInfo = ref<any>({});
// //
const outBtnDisabled = ref<boolean>(true); const outBtnDisabled = ref<boolean>(true);
// //
const tenantOwen = ref<string>(''); const tenantOwen = ref<string>('');
@ -365,7 +365,7 @@ const userDetail = ref({
const owenVisible = ref<boolean>(false); const owenVisible = ref<boolean>(false);
/** /**
* 租户名称值改变事件 * 仓库名称值改变事件
*/ */
function tenantNameChange() { function tenantNameChange() {
let name = unref(myTenantInfo).name; let name = unref(myTenantInfo).name;
@ -397,7 +397,7 @@ const userDetail = ref({
// //
owenVisible.value = true; owenVisible.value = true;
cancelVisible.value = false; cancelVisible.value = false;
//update-begin---author:wangshuai ---date:20230426 forQQYUN-5270退------------ //update-begin---author:wangshuai ---date:20230426 forQQYUN-5270退------------
}else if(res.message === 'cancelTenant'){ }else if(res.message === 'cancelTenant'){
cancelVisible.value = false; cancelVisible.value = false;
let fullPath = router.currentRoute.value.fullPath; let fullPath = router.currentRoute.value.fullPath;
@ -414,7 +414,7 @@ const userDetail = ref({
router.push('/myapps/settings/organization/organMessage/'+unref(myTenantInfo).tenantUserId) router.push('/myapps/settings/organization/organMessage/'+unref(myTenantInfo).tenantUserId)
} }
}) })
//update-end---author:wangshuai ---date:20230426 forQQYUN-5270退------------ //update-end---author:wangshuai ---date:20230426 forQQYUN-5270退------------
} else { } else {
createMessage.warning(res.message); createMessage.warning(res.message);
} }
@ -425,7 +425,7 @@ const userDetail = ref({
} }
/** /**
* 退出租户取消事件 * 退出仓库取消事件
*/ */
function handleCancelOutClick() { function handleCancelOutClick() {
cancelVisible.value = false; cancelVisible.value = false;
@ -444,15 +444,15 @@ const userDetail = ref({
if(res.success){ if(res.success){
createMessage.success(res.message); createMessage.success(res.message);
initDataSource(); initDataSource();
//update-begin---author:wangshuai---date:2023-10-23---for:QQYUN-68227退--- //update-begin---author:wangshuai---date:2023-10-23---for:QQYUN-68227退---
userExitChangeLoginTenantId(unref(myTenantInfo).tenantUserId); userExitChangeLoginTenantId(unref(myTenantInfo).tenantUserId);
//update-end---author:wangshuai---date:2023-10-23---for:QQYUN-68227退--- //update-end---author:wangshuai---date:2023-10-23---for:QQYUN-68227退---
} else { } else {
createMessage.warning(res.message); createMessage.warning(res.message);
} }
}) })
} }
// //
const invitedCount = ref<number>(0); const invitedCount = ref<number>(0);
// //

View File

@ -71,7 +71,7 @@ export const updatePasswordNotBindPhone = (params) => {
} }
/** /**
* id * id
* @param params * @param params
*/ */
export const getTenantListByUserId = (params) => { export const getTenantListByUserId = (params) => {
@ -87,7 +87,7 @@ export const cancelApplyTenant = (params) => {
}; };
/** /**
* 退 * 退
* @param params * @param params
*/ */
export const exitUserTenant = (params)=>{ export const exitUserTenant = (params)=>{
@ -95,7 +95,7 @@ export const exitUserTenant = (params)=>{
} }
/** /**
* *
* @param params * @param params
*/ */
export const changeOwenUserTenant = (params)=>{ export const changeOwenUserTenant = (params)=>{
@ -127,7 +127,7 @@ export const deleteThirdAccount = (params) => {
}; };
/** /**
* *
* @param params * @param params
*/ */
export const agreeOrRefuseJoinTenant = (params) => { export const agreeOrRefuseJoinTenant = (params) => {

View File

@ -47,14 +47,7 @@ export const settingList = [
img1: anquan1, img1: anquan1,
img2: anquan2, img2: anquan2,
}, },
{
key: '4',
name: '第三方APP',
component: 'WeChatDingSetting',
icon: 'ant-design:contacts-outlined',
img1: app1,
img2: app2,
},
]; ];
@ -101,7 +94,7 @@ export const formSchema: FormSchema[] = [
{ {
field: 'relTenantIds', field: 'relTenantIds',
component: 'JDictSelectTag', component: 'JDictSelectTag',
label: '租户', label: '仓库',
colProps: { span: 24 }, colProps: { span: 24 },
componentProps:{ componentProps:{
mode:'multiple', mode:'multiple',

View File

@ -78,19 +78,19 @@ export default defineComponent({
} }
function goToMyTeantPage(){ function goToMyTeantPage(){
//update-begin---author:wangshuai ---date:20230721 forQQYUN-5726------------ //update-begin---author:wangshuai ---date:20230721 forQQYUN-5726------------
// //
let query = router.currentRoute.value.query; let query = router.currentRoute.value.query;
if(query && query.page === 'tenantSetting'){ if(query && query.page === 'tenantSetting'){
activeKey.value = "2"; activeKey.value = "2";
} }
//update-end---author:wangshuai ---date:20230721 forQQYUN-5726------------ //update-end---author:wangshuai ---date:20230721 forQQYUN-5726------------
} }
onMounted(()=>{ onMounted(()=>{
goToMyTeantPage(); goToMyTeantPage();
}) })
return { return {
prefixCls, prefixCls,
settingList, settingList,