fix: 🧩 修复BUG
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
ENV = 'dev'
|
ENV = 'dev'
|
||||||
VITE_APP_API_VERSION =""
|
VITE_APP_API_VERSION =""
|
||||||
VITE_APP_API_BASEURL = https://dev.wms.api.v2.f2b211.com/v1/admapi/
|
VITE_APP_API_BASEURL = https://dev.wms.api.v2.f2b211.com/v1/admapi/
|
||||||
VITE_APP_SSO_LOGINURL = http://dev.uc.v3.f2b211.com/uc/login # http://dev.uc.f2b211.com/index.php/uc/user/login.html
|
VITE_APP_SSO_LOGINURL = https://dev.uc.v3.f2b211.com/uc/login # http://dev.uc.f2b211.com/index.php/uc/user/login.html
|
||||||
VITE_APP_SSO_APPID = 101341644040699904
|
VITE_APP_SSO_APPID = 101341644040699904
|
||||||
|
|
||||||
VITE_REDIRECT_URL =http://localhost:8080/login #单点从定向地址
|
VITE_REDIRECT_URL =http://localhost:8080/login #单点从定向地址
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
ENV = 'production'
|
ENV = 'production'
|
||||||
VITE_APP_API_VERSION = "" #版本号
|
VITE_APP_API_VERSION = "" #版本号
|
||||||
VITE_APP_API_BASEURL = https://opsscmapi.f2b211.com/api/ #请求地址
|
VITE_APP_API_BASEURL = https://opsscmapi.f2b211.com/api/ #请求地址
|
||||||
VITE_APP_SSO_LOGINURL = http://uc.v3.f2b211.com/uc/login
|
VITE_APP_SSO_LOGINURL = https://uc.v3.f2b211.com/uc/login
|
||||||
VITE_APP_SSO_APPID = 100664627590856707
|
VITE_APP_SSO_APPID = 100664627590856707
|
||||||
|
|
||||||
VITE_REDIRECT_URL = https://opsscm.f2b211.com/login #单点从定向地址
|
VITE_REDIRECT_URL = https://wms.v2.f2b211.com/login #单点从定向地址
|
||||||
VITE_SINGLE_URL = https://uc.v3.f2b211.com/ #单点登录通知
|
VITE_SINGLE_URL = https://uc.v3.f2b211.com/ #单点登录通知
|
||||||
# 线上环境
|
# 线上环境
|
||||||
VITE_USER_NODE_ENV = production
|
VITE_USER_NODE_ENV = production
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
ENV = 'test'
|
ENV = 'test'
|
||||||
VITE_APP_API_VERSION =""
|
VITE_APP_API_VERSION =""
|
||||||
VITE_APP_API_BASEURL = https://dev.wms.api.v2.f2b211.com/v1/admapi/
|
VITE_APP_API_BASEURL = https://dev.wms.api.v2.f2b211.com/v1/admapi/
|
||||||
VITE_APP_SSO_LOGINURL = http://dev.uc.v3.f2b211.com/uc/login # http://dev.uc.f2b211.com/index.php/uc/user/login.html
|
VITE_APP_SSO_LOGINURL = https://dev.uc.v3.f2b211.com/uc/login # http://dev.uc.f2b211.com/index.php/uc/user/login.html
|
||||||
VITE_APP_SSO_APPID = 101341644040699904
|
VITE_APP_SSO_APPID = 101341644040699904
|
||||||
|
|
||||||
VITE_REDIRECT_URL =https://dev.wms.v2.f2b211.com/login #单点从定向地址
|
VITE_REDIRECT_URL =https://dev.wms.v2.f2b211.com/login #单点从定向地址
|
||||||
|
|||||||
@@ -60,8 +60,17 @@ class RequestHttp {
|
|||||||
this.service.interceptors.response.use(
|
this.service.interceptors.response.use(
|
||||||
(response: AxiosResponse) => {
|
(response: AxiosResponse) => {
|
||||||
const { data } = response;
|
const { data } = response;
|
||||||
// const userStore = useUserStore();
|
|
||||||
tryHideFullScreenLoading();
|
tryHideFullScreenLoading();
|
||||||
|
// 获取响应头中的 Authorization 信息
|
||||||
|
const authorization = response.headers["authorization"];
|
||||||
|
//刷新token
|
||||||
|
if (authorization) {
|
||||||
|
// 可以在这里更新用户的 token 信息
|
||||||
|
const userStore = useUserStore();
|
||||||
|
userStore.setToken(authorization);
|
||||||
|
return data;
|
||||||
|
}
|
||||||
// 登陆失效
|
// 登陆失效
|
||||||
if (data.code == 401) {
|
if (data.code == 401) {
|
||||||
ElMessage.error(data.msg || data.message);
|
ElMessage.error(data.msg || data.message);
|
||||||
|
|||||||
@@ -58,7 +58,7 @@
|
|||||||
v-if="item.type === 'selectRemote' || item.type === 'selectRemote1' || item.type === 'selectRemote2'"
|
v-if="item.type === 'selectRemote' || item.type === 'selectRemote1' || item.type === 'selectRemote2'"
|
||||||
>
|
>
|
||||||
<el-select
|
<el-select
|
||||||
v-model="_searchParams[`${item.prop}`]"
|
v-model.trim="_searchParams[`${item.prop}`]"
|
||||||
:placeholder="item.placeholder"
|
:placeholder="item.placeholder"
|
||||||
clearable
|
clearable
|
||||||
remote
|
remote
|
||||||
@@ -89,12 +89,13 @@
|
|||||||
<!-- getProductLinesApi -->
|
<!-- getProductLinesApi -->
|
||||||
<template v-if="item.type === 'selectMultipleRemote' || item.type === 'selectProductLinesRemote'">
|
<template v-if="item.type === 'selectMultipleRemote' || item.type === 'selectProductLinesRemote'">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="_searchParams[`${item.prop}`]"
|
v-model.trim="_searchParams[`${item.prop}`]"
|
||||||
:placeholder="item.placeholder"
|
:placeholder="item.placeholder"
|
||||||
remote
|
remote
|
||||||
multiple
|
multiple
|
||||||
filterable
|
filterable
|
||||||
:reserve-keyword="false"
|
:reserve-keyword="false"
|
||||||
|
@remove-tag="handleTagRemove(item)"
|
||||||
@clear="handleClear(item)"
|
@clear="handleClear(item)"
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
class="m-2 select"
|
class="m-2 select"
|
||||||
@@ -122,7 +123,7 @@
|
|||||||
<template v-if="item.type === 'selectMultiple'">
|
<template v-if="item.type === 'selectMultiple'">
|
||||||
<!-- multiple -->
|
<!-- multiple -->
|
||||||
<el-select
|
<el-select
|
||||||
v-model="_searchParams[`${item.prop}`]"
|
v-model.trim="_searchParams[`${item.prop}`]"
|
||||||
filterable
|
filterable
|
||||||
multiple
|
multiple
|
||||||
:disabled="item.disabled"
|
:disabled="item.disabled"
|
||||||
@@ -130,6 +131,8 @@
|
|||||||
class="m-2 select"
|
class="m-2 select"
|
||||||
:reserve-keyword="false"
|
:reserve-keyword="false"
|
||||||
style="width: 224px"
|
style="width: 224px"
|
||||||
|
@remove-tag="handleTagRemove1(item)"
|
||||||
|
ref="remoteRef"
|
||||||
>
|
>
|
||||||
<!-- 循环渲染选项:label 为显示文本,value 为实际提交值 -->
|
<!-- 循环渲染选项:label 为显示文本,value 为实际提交值 -->
|
||||||
<el-option
|
<el-option
|
||||||
@@ -144,7 +147,7 @@
|
|||||||
<template v-if="item.type === 'selectMultipleD'">
|
<template v-if="item.type === 'selectMultipleD'">
|
||||||
<!-- multiple -->
|
<!-- multiple -->
|
||||||
<el-select
|
<el-select
|
||||||
v-model="_searchParams[`${item.prop}`]"
|
v-model.trim="_searchParams[`${item.prop}`]"
|
||||||
filterable
|
filterable
|
||||||
clearable
|
clearable
|
||||||
:reserve-keyword="false"
|
:reserve-keyword="false"
|
||||||
@@ -178,15 +181,17 @@ import { getSupplierApi, getCustomersApi, getProductLinesApi } from "@/api/modul
|
|||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
formData: any[];
|
formData: any[];
|
||||||
searchParams: Record<string, any>;
|
searchParams: Record<string, any>;
|
||||||
|
selectMultipleRemoveTag?: () => void;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const emits = defineEmits<{
|
const emits = defineEmits<{
|
||||||
(e: "search", result: Record<string, any>): void;
|
(e: "search", result: Record<string, any>): void;
|
||||||
(e: "reset", result: Record<string, any>): void;
|
(e: "reset", result: Record<string, any>): void;
|
||||||
|
(e: "selectMultipleRemoveTag", result: Record<string, any>): void;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
let loading = ref(false);
|
let loading = ref(false);
|
||||||
|
const remoteRef = ref(null);
|
||||||
const _searchParams = computed(() => {
|
const _searchParams = computed(() => {
|
||||||
return props.searchParams;
|
return props.searchParams;
|
||||||
});
|
});
|
||||||
@@ -209,6 +214,8 @@ const getSupplier = async (keywords: any, item: any) => {
|
|||||||
if (result?.code === 0) {
|
if (result?.code === 0) {
|
||||||
const { data } = result;
|
const { data } = result;
|
||||||
item.options = data;
|
item.options = data;
|
||||||
|
} else {
|
||||||
|
item.options = [];
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
//客戶
|
//客戶
|
||||||
@@ -219,13 +226,15 @@ const getCustomers = async (keywords: any, item: any) => {
|
|||||||
const { data } = result;
|
const { data } = result;
|
||||||
if (Array.isArray(data) && data.length) {
|
if (Array.isArray(data) && data.length) {
|
||||||
let options: any = [];
|
let options: any = [];
|
||||||
data.forEach((item: any) => {
|
data.forEach((it: any) => {
|
||||||
options.push({
|
options.push({
|
||||||
value: item.customer_number,
|
value: it.customer_number,
|
||||||
label: item.customer_name
|
label: it.customer_name
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
item.options = options;
|
item.options = options;
|
||||||
|
} else {
|
||||||
|
item.options = [];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -236,39 +245,53 @@ const getProductLines = async (keywords: any, item: any) => {
|
|||||||
const { data } = result;
|
const { data } = result;
|
||||||
if (Array.isArray(data) && data.length) {
|
if (Array.isArray(data) && data.length) {
|
||||||
let options: any = [];
|
let options: any = [];
|
||||||
data.forEach((item: any) => {
|
data.forEach((it: any) => {
|
||||||
options.push({
|
options.push({
|
||||||
value: item,
|
value: it,
|
||||||
label: item
|
label: it
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
item.options = options;
|
item.options = options;
|
||||||
|
} else {
|
||||||
|
item.options = [];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
//多选远程搜索
|
//多选远程搜索
|
||||||
const handleSelectMultipleRemote = async (query: any, item: any) => {
|
const handleSelectMultipleRemote = async (query: any, item: any) => {
|
||||||
|
console.log(remoteRef.value, "==========remoteRef=========");
|
||||||
|
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
if (!query) {
|
if (!query) {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
item.options = [];
|
||||||
//去除字符串首尾的所有空白字符。
|
//去除字符串首尾的所有空白字符。
|
||||||
let valClone = query.replace(/^\s*|\s*$/g, "");
|
let valClone = query.replace(/^\s*|\s*$/g, "");
|
||||||
if (!valClone.length) {
|
if (!valClone.length) {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.type === "selectMultipleRemote") {
|
if (item.type === "selectMultipleRemote") {
|
||||||
//客戶編碼
|
//客戶編碼
|
||||||
getCustomers(valClone, item);
|
getCustomers(valClone, item);
|
||||||
} else if (item.type === "selectProductLinesRemote") {
|
} else if (item.type === "selectProductLinesRemote") {
|
||||||
//品线
|
//品线
|
||||||
|
console.log("走到了这里");
|
||||||
getProductLines(valClone, item);
|
getProductLines(valClone, item);
|
||||||
}
|
}
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
};
|
};
|
||||||
|
const handleTagRemove = (item: any) => {
|
||||||
|
if (!_searchParams.value[item.prop].length) {
|
||||||
|
item.options = [];
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const handleTagRemove1 = (item: any) => {
|
||||||
|
emits("selectMultipleRemoveTag", { item, org_number: _searchParams.value.org_number });
|
||||||
|
};
|
||||||
//单选远程搜索(供应商)
|
//单选远程搜索(供应商)
|
||||||
const remoteMethod = async (query: any, item: any) => {
|
const remoteMethod = async (query: any, item: any) => {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
@@ -276,8 +299,9 @@ const remoteMethod = async (query: any, item: any) => {
|
|||||||
loading.value = false;
|
loading.value = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
item.options = [];
|
||||||
//去除字符串首尾的所有空白字符。
|
//去除字符串首尾的所有空白字符。
|
||||||
let valClone = query.replace(/^\s*|\s*$/g, "");
|
let valClone = query.replace(/^\s+|\s+$/g, "");
|
||||||
if (!valClone.length) {
|
if (!valClone.length) {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -38,8 +38,8 @@ export const useTable = (
|
|||||||
state.totalParam.org_number = state.totalParam.org_number.join(",");
|
state.totalParam.org_number = state.totalParam.org_number.join(",");
|
||||||
}
|
}
|
||||||
//品线
|
//品线
|
||||||
if (Array.isArray(state.totalParam?.product_line_name) && state.totalParam?.product_line_name?.length) {
|
if (Array.isArray(state.totalParam?.product_line) && state.totalParam?.product_line?.length) {
|
||||||
state.totalParam.org_number = state.totalParam.product_line_name.join(",");
|
state.totalParam.product_line = state.totalParam.product_line.join(",");
|
||||||
}
|
}
|
||||||
//客户名称
|
//客户名称
|
||||||
if (Array.isArray(state.totalParam?.customer_number) && state.totalParam?.customer_number?.length) {
|
if (Array.isArray(state.totalParam?.customer_number) && state.totalParam?.customer_number?.length) {
|
||||||
|
|||||||
@@ -140,8 +140,9 @@ const handleSelectMultipleRemoveTag = async (params: any) => {
|
|||||||
dataStore.formData[1].options.forEach((item: any) => {
|
dataStore.formData[1].options.forEach((item: any) => {
|
||||||
customers.push(item.value);
|
customers.push(item.value);
|
||||||
});
|
});
|
||||||
|
console.log(customers, "=customers=");
|
||||||
dataStore.ruleForm.customer_number = customers;
|
dataStore.ruleForm.customer_number = customers;
|
||||||
|
console.log(dataStore.ruleForm.customer_number, "=123==");
|
||||||
};
|
};
|
||||||
getSubscribeDetails();
|
getSubscribeDetails();
|
||||||
|
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ export const FORM_DATA: FormItem[] = [
|
|||||||
label: "客户编码: "
|
label: "客户编码: "
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: "product_line_name",
|
prop: "product_line",
|
||||||
placeholder: "请输入品线",
|
placeholder: "请输入品线",
|
||||||
type: "selectProductLinesRemote",
|
type: "selectProductLinesRemote",
|
||||||
label: "品线: ",
|
label: "品线: ",
|
||||||
@@ -71,5 +71,6 @@ export const FORM_DATA: FormItem[] = [
|
|||||||
export const RULE_FORM = {
|
export const RULE_FORM = {
|
||||||
page: 1,
|
page: 1,
|
||||||
size: 1,
|
size: 1,
|
||||||
org_number: ["101"]
|
org_number: ["101"],
|
||||||
|
customer_number: []
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -19,6 +19,7 @@
|
|||||||
<SearchForm
|
<SearchForm
|
||||||
@search="handleSearch"
|
@search="handleSearch"
|
||||||
@reset="handleReset"
|
@reset="handleReset"
|
||||||
|
@selectMultipleRemoveTag="handleSelectMultipleRemoveTag"
|
||||||
:searchParams="dataStore.initParam"
|
:searchParams="dataStore.initParam"
|
||||||
:formData="dataStore.formData"
|
:formData="dataStore.formData"
|
||||||
/>
|
/>
|
||||||
@@ -57,7 +58,7 @@ const userStore = useUserStore();
|
|||||||
const dataStore = reactive<any>({
|
const dataStore = reactive<any>({
|
||||||
columns: COLUMNS, //列表配置项
|
columns: COLUMNS, //列表配置项
|
||||||
initParam: cloneDeep(RULE_FORM), // 初始化搜索条件|重置搜索条件
|
initParam: cloneDeep(RULE_FORM), // 初始化搜索条件|重置搜索条件
|
||||||
ruleForm: cloneDeep(RULE_FORM), // 搜索条件
|
|
||||||
formData: FORM_DATA, //搜索配置项
|
formData: FORM_DATA, //搜索配置项
|
||||||
buttons: cloneDeep(BUTTON),
|
buttons: cloneDeep(BUTTON),
|
||||||
options: [], //规格型号
|
options: [], //规格型号
|
||||||
@@ -109,6 +110,21 @@ const handleOpen = (row: any) => {
|
|||||||
query: { id: row.id, title: "编辑订阅" }
|
query: { id: row.id, title: "编辑订阅" }
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//本地多选远程搜索Tag删除回调(组织)
|
||||||
|
const handleSelectMultipleRemoveTag = async (params: any) => {
|
||||||
|
const { org_number } = params;
|
||||||
|
let customers: any = [];
|
||||||
|
// 筛选出 org_number 在 ids 中的数据
|
||||||
|
dataStore.formData[1].options = dataStore.formData[1].options.filter((item: any) => org_number.includes(item.org_number));
|
||||||
|
dataStore.formData[1].options.length &&
|
||||||
|
dataStore.formData[1].options.forEach((item: any) => {
|
||||||
|
customers.push(item.value);
|
||||||
|
});
|
||||||
|
nextTick(() => {
|
||||||
|
dataStore.initParam.customer_number = customers;
|
||||||
|
});
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scope lang="scss">
|
<style scope lang="scss">
|
||||||
|
|||||||
Reference in New Issue
Block a user