Compare commits
2 Commits
7b4e4f81d2
...
efee846973
| Author | SHA1 | Date | |
|---|---|---|---|
| efee846973 | |||
| 2837efee97 |
@@ -1,4 +1,4 @@
|
|||||||
ENV = 'test'
|
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 = http://dev.uc.v3.f2b211.com/uc/login # http://dev.uc.f2b211.com/index.php/uc/user/login.html
|
||||||
@@ -8,7 +8,7 @@ VITE_REDIRECT_URL =http://localhost:8080/login #单点从定向地址
|
|||||||
VITE_SINGLE_URL = https://dev.uc.v3.f2b211.com/ #测试环境单点登录通知
|
VITE_SINGLE_URL = https://dev.uc.v3.f2b211.com/ #测试环境单点登录通知
|
||||||
|
|
||||||
# 测试环境
|
# 测试环境
|
||||||
VITE_USER_NODE_ENV = test
|
VITE_USER_NODE_ENV = development
|
||||||
|
|
||||||
# 公共基础路径
|
# 公共基础路径
|
||||||
VITE_PUBLIC_PATH = /
|
VITE_PUBLIC_PATH = /
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
ENV = 'test'
|
ENV = 'test'
|
||||||
VITE_APP_API_VERSION =""
|
VITE_APP_API_VERSION =""
|
||||||
VITE_APP_API_BASEURL = https://dev.wms.api.v2.f2b211.com/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 = http://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
|
||||||
|
|
||||||
|
|||||||
@@ -12,3 +12,6 @@ export const getMaterialListApi = (params: any) => {
|
|||||||
export const getMaterialListReloadApi = (params: any) => {
|
export const getMaterialListReloadApi = (params: any) => {
|
||||||
return http.get<any>(`material/reload`, params);
|
return http.get<any>(`material/reload`, params);
|
||||||
};
|
};
|
||||||
|
export const getMaterialListExportApi = (params: any) => {
|
||||||
|
return http.get<any>(`material/export`, params);
|
||||||
|
};
|
||||||
|
|||||||
@@ -8,3 +8,6 @@ export const getSubscribeWrrListApi = (params: any) => {
|
|||||||
export const getSubscribeResetListApi = (params: any) => {
|
export const getSubscribeResetListApi = (params: any) => {
|
||||||
return http.get<any>(`subscribe/wrr/reload`, params);
|
return http.get<any>(`subscribe/wrr/reload`, params);
|
||||||
};
|
};
|
||||||
|
export const getSubscribeResetListExportApi = (params: any) => {
|
||||||
|
return http.get<any>(`subscribe/wrr/export`, params);
|
||||||
|
};
|
||||||
|
|||||||
6
src/components.d.ts
vendored
6
src/components.d.ts
vendored
@@ -13,13 +13,12 @@ declare module "vue" {
|
|||||||
ColSetting: typeof import("./components/ProTable/components/ColSetting.vue")["default"];
|
ColSetting: typeof import("./components/ProTable/components/ColSetting.vue")["default"];
|
||||||
DetailsSearch: typeof import("./components/DetailsSearch/index.vue")["default"];
|
DetailsSearch: typeof import("./components/DetailsSearch/index.vue")["default"];
|
||||||
ElAside: typeof import("element-plus/es")["ElAside"];
|
ElAside: typeof import("element-plus/es")["ElAside"];
|
||||||
ElAutocomplete: typeof import("element-plus/es")["ElAutocomplete"];
|
|
||||||
ElBreadcrumb: typeof import("element-plus/es")["ElBreadcrumb"];
|
ElBreadcrumb: typeof import("element-plus/es")["ElBreadcrumb"];
|
||||||
ElBreadcrumbItem: typeof import("element-plus/es")["ElBreadcrumbItem"];
|
ElBreadcrumbItem: typeof import("element-plus/es")["ElBreadcrumbItem"];
|
||||||
ElButton: typeof import("element-plus/es")["ElButton"];
|
ElButton: typeof import("element-plus/es")["ElButton"];
|
||||||
|
ElCheckbox: typeof import("element-plus/es")["ElCheckbox"];
|
||||||
ElContainer: typeof import("element-plus/es")["ElContainer"];
|
ElContainer: typeof import("element-plus/es")["ElContainer"];
|
||||||
ElDatePicker: typeof import("element-plus/es")["ElDatePicker"];
|
ElDatePicker: typeof import("element-plus/es")["ElDatePicker"];
|
||||||
ElDialog: typeof import("element-plus/es")["ElDialog"];
|
|
||||||
ElDrawer: typeof import("element-plus/es")["ElDrawer"];
|
ElDrawer: typeof import("element-plus/es")["ElDrawer"];
|
||||||
ElDropdown: typeof import("element-plus/es")["ElDropdown"];
|
ElDropdown: typeof import("element-plus/es")["ElDropdown"];
|
||||||
ElDropdownItem: typeof import("element-plus/es")["ElDropdownItem"];
|
ElDropdownItem: typeof import("element-plus/es")["ElDropdownItem"];
|
||||||
@@ -29,6 +28,7 @@ declare module "vue" {
|
|||||||
ElHeader: typeof import("element-plus/es")["ElHeader"];
|
ElHeader: typeof import("element-plus/es")["ElHeader"];
|
||||||
ElIcon: typeof import("element-plus/es")["ElIcon"];
|
ElIcon: typeof import("element-plus/es")["ElIcon"];
|
||||||
ElInput: typeof import("element-plus/es")["ElInput"];
|
ElInput: typeof import("element-plus/es")["ElInput"];
|
||||||
|
ElInputNumber: typeof import("element-plus/es")["ElInputNumber"];
|
||||||
ElMain: typeof import("element-plus/es")["ElMain"];
|
ElMain: typeof import("element-plus/es")["ElMain"];
|
||||||
ElMenu: typeof import("element-plus/es")["ElMenu"];
|
ElMenu: typeof import("element-plus/es")["ElMenu"];
|
||||||
ElMenuItem: typeof import("element-plus/es")["ElMenuItem"];
|
ElMenuItem: typeof import("element-plus/es")["ElMenuItem"];
|
||||||
@@ -43,6 +43,7 @@ declare module "vue" {
|
|||||||
ElTabPane: typeof import("element-plus/es")["ElTabPane"];
|
ElTabPane: typeof import("element-plus/es")["ElTabPane"];
|
||||||
ElTabs: typeof import("element-plus/es")["ElTabs"];
|
ElTabs: typeof import("element-plus/es")["ElTabs"];
|
||||||
ElTag: typeof import("element-plus/es")["ElTag"];
|
ElTag: typeof import("element-plus/es")["ElTag"];
|
||||||
|
ElTooltip: typeof import("element-plus/es")["ElTooltip"];
|
||||||
Empty: typeof import("./components/ProTable/components/Empty.vue")["default"];
|
Empty: typeof import("./components/ProTable/components/Empty.vue")["default"];
|
||||||
Form: typeof import("./components/Form/index.vue")["default"];
|
Form: typeof import("./components/Form/index.vue")["default"];
|
||||||
FormItem: typeof import("./components/Form/components/FormItem.vue")["default"];
|
FormItem: typeof import("./components/Form/components/FormItem.vue")["default"];
|
||||||
@@ -55,7 +56,6 @@ declare module "vue" {
|
|||||||
IEpFullScreen: typeof import("~icons/ep/full-screen")["default"];
|
IEpFullScreen: typeof import("~icons/ep/full-screen")["default"];
|
||||||
IEpRefresh: typeof import("~icons/ep/refresh")["default"];
|
IEpRefresh: typeof import("~icons/ep/refresh")["default"];
|
||||||
IEpRemove: typeof import("~icons/ep/remove")["default"];
|
IEpRemove: typeof import("~icons/ep/remove")["default"];
|
||||||
IEpSearch: typeof import("~icons/ep/search")["default"];
|
|
||||||
IEpSwitchButton: typeof import("~icons/ep/switch-button")["default"];
|
IEpSwitchButton: typeof import("~icons/ep/switch-button")["default"];
|
||||||
ImportExcel: typeof import("./components/ImportExcel/index.vue")["default"];
|
ImportExcel: typeof import("./components/ImportExcel/index.vue")["default"];
|
||||||
Loading: typeof import("./components/Loading/index.vue")["default"];
|
Loading: typeof import("./components/Loading/index.vue")["default"];
|
||||||
|
|||||||
@@ -113,6 +113,7 @@
|
|||||||
v-model="_searchResult[`${item.prop}`]"
|
v-model="_searchResult[`${item.prop}`]"
|
||||||
multiple
|
multiple
|
||||||
filterable
|
filterable
|
||||||
|
:reserve-keyword="false"
|
||||||
@remove-tag="handleRomoveTag(item)"
|
@remove-tag="handleRomoveTag(item)"
|
||||||
:disabled="item.disabled"
|
:disabled="item.disabled"
|
||||||
:placeholder="item.placeholder"
|
:placeholder="item.placeholder"
|
||||||
@@ -129,15 +130,16 @@
|
|||||||
<template
|
<template
|
||||||
v-if="item.type === 'selectMultipleRemoteCustomersNames' || item.type === 'selectProductLinesRemote'"
|
v-if="item.type === 'selectMultipleRemoteCustomersNames' || item.type === 'selectProductLinesRemote'"
|
||||||
>
|
>
|
||||||
|
<!-- // filterable -->
|
||||||
<el-select
|
<el-select
|
||||||
v-model="_searchResult[`${item.prop}`]"
|
v-model="_searchResult[`${item.prop}`]"
|
||||||
:placeholder="item.placeholder"
|
:placeholder="item.placeholder"
|
||||||
remote
|
remote
|
||||||
multiple
|
|
||||||
filterable
|
filterable
|
||||||
|
multiple
|
||||||
|
:reserve-keyword="false"
|
||||||
|
@remove-tag="handleTagRemove1(item)"
|
||||||
class="m-2 select"
|
class="m-2 select"
|
||||||
remote-show-suffix
|
|
||||||
@clear="handleSelectClear(item.prop)"
|
|
||||||
:remote-method="(query:any)=> handleSelectMultipleRemote(query, item)"
|
:remote-method="(query:any)=> handleSelectMultipleRemote(query, item)"
|
||||||
:disabled="item.disabled"
|
:disabled="item.disabled"
|
||||||
>
|
>
|
||||||
@@ -169,6 +171,7 @@ const props = defineProps<{
|
|||||||
inline?: Boolean;
|
inline?: Boolean;
|
||||||
getSearchValue?: () => void;
|
getSearchValue?: () => void;
|
||||||
selectMultipleRemoveTag?: () => void;
|
selectMultipleRemoveTag?: () => void;
|
||||||
|
selectMultipleRemoteTag1?: () => void;
|
||||||
setRuleFormValue?: () => void;
|
setRuleFormValue?: () => void;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
@@ -181,12 +184,17 @@ const emits = defineEmits<{
|
|||||||
(e: "setMaterialList", result: Record<string, any>): void;
|
(e: "setMaterialList", result: Record<string, any>): void;
|
||||||
(e: "setRuleFormValue", result: Record<string, any>): void;
|
(e: "setRuleFormValue", result: Record<string, any>): void;
|
||||||
(e: "selectMultipleRemoveTag", result: Record<string, any>): void;
|
(e: "selectMultipleRemoveTag", result: Record<string, any>): void;
|
||||||
|
(e: "selectMultipleRemoteTag1", result: Record<string, any>): void;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const handleRomoveTag = (item: any) => {
|
const handleRomoveTag = (item: any) => {
|
||||||
emits("selectMultipleRemoveTag", { item, org_number: _searchResult.value.org_number });
|
emits("selectMultipleRemoveTag", { item, org_number: _searchResult.value.org_number });
|
||||||
};
|
};
|
||||||
|
const handleTagRemove1 = (item: any) => {
|
||||||
|
if (!_searchResult.value[item.prop].length) {
|
||||||
|
item.options = [];
|
||||||
|
}
|
||||||
|
};
|
||||||
//客戶
|
//客戶
|
||||||
const getCustomers = async (keywords: any, item: any) => {
|
const getCustomers = async (keywords: any, item: any) => {
|
||||||
let org_number = _searchResult.value.org_number.join(",");
|
let org_number = _searchResult.value.org_number.join(",");
|
||||||
@@ -202,6 +210,8 @@ const getCustomers = async (keywords: any, item: any) => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
item.options = options;
|
item.options = options;
|
||||||
|
} else {
|
||||||
|
item.options = [];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -220,6 +230,8 @@ const getProductLines = async (keywords: any, item: any) => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
item.options = options;
|
item.options = options;
|
||||||
|
} else {
|
||||||
|
item.options = [];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -234,10 +246,12 @@ const getUsers = async (keywords: any, item: any) => {
|
|||||||
data.forEach((item: any) => {
|
data.forEach((item: any) => {
|
||||||
options.push({
|
options.push({
|
||||||
value: item.dduid,
|
value: item.dduid,
|
||||||
label: item.realname
|
label: item.realname + " " + item.mobile
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
item.options = options;
|
item.options = options;
|
||||||
|
} else {
|
||||||
|
item.options = [];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -247,6 +261,7 @@ const handleSelectMultipleRemote = (query: any, item: any) => {
|
|||||||
if (!query) {
|
if (!query) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
item.options = [];
|
||||||
let valClone = query.replace(/^\s*|\s*$/g, "");
|
let valClone = query.replace(/^\s*|\s*$/g, "");
|
||||||
if (!valClone) {
|
if (!valClone) {
|
||||||
return;
|
return;
|
||||||
@@ -271,9 +286,7 @@ const remoteMethod = async (query: any, item: any) => {
|
|||||||
getUsers(valClone, item);
|
getUsers(valClone, item);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const handleSelectClear = (prop: any) => {
|
|
||||||
console.log("会触发吗?", prop);
|
|
||||||
};
|
|
||||||
//input输入验证
|
//input输入验证
|
||||||
const valueVerify = (item: any) => {
|
const valueVerify = (item: any) => {
|
||||||
//只能输入整数
|
//只能输入整数
|
||||||
|
|||||||
@@ -94,6 +94,7 @@
|
|||||||
remote
|
remote
|
||||||
multiple
|
multiple
|
||||||
filterable
|
filterable
|
||||||
|
:reserve-keyword="false"
|
||||||
@clear="handleClear(item)"
|
@clear="handleClear(item)"
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
class="m-2 select"
|
class="m-2 select"
|
||||||
@@ -127,6 +128,7 @@
|
|||||||
:disabled="item.disabled"
|
:disabled="item.disabled"
|
||||||
:placeholder="item.placeholder"
|
:placeholder="item.placeholder"
|
||||||
class="m-2 select"
|
class="m-2 select"
|
||||||
|
:reserve-keyword="false"
|
||||||
style="width: 224px"
|
style="width: 224px"
|
||||||
>
|
>
|
||||||
<!-- 循环渲染选项:label 为显示文本,value 为实际提交值 -->
|
<!-- 循环渲染选项:label 为显示文本,value 为实际提交值 -->
|
||||||
@@ -145,6 +147,7 @@
|
|||||||
v-model="_searchParams[`${item.prop}`]"
|
v-model="_searchParams[`${item.prop}`]"
|
||||||
filterable
|
filterable
|
||||||
clearable
|
clearable
|
||||||
|
:reserve-keyword="false"
|
||||||
:disabled="item.disabled"
|
:disabled="item.disabled"
|
||||||
:placeholder="item.placeholder"
|
:placeholder="item.placeholder"
|
||||||
class="m-2 select"
|
class="m-2 select"
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<!-- 公司名 -->
|
<!-- 公司名 -->
|
||||||
<div class="name-box font12" style="padding-top: 2px">
|
<div class="name-box font12" style="padding-top: 2px">
|
||||||
<span style="margin-right: 10px; margin-left: 10px">
|
<span style="margin-right: 10px; margin-left: 10px">
|
||||||
{{ userStore.userInfo.corp.corp_name ? userStore.userInfo.corp.corp_name : "" }}
|
{{ userStore?.userInfo?.corp?.corp_name ? userStore?.userInfo?.corp?.corp_name : "" }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -10,7 +10,7 @@
|
|||||||
<div class="name-box font12">
|
<div class="name-box font12">
|
||||||
<el-dropdown trigger="click" class="triangle-box">
|
<el-dropdown trigger="click" class="triangle-box">
|
||||||
<div>
|
<div>
|
||||||
{{ userStore.userInfo.nickname }}
|
{{ userStore?.userInfo?.nickname }}
|
||||||
<el-icon class="triangle">
|
<el-icon class="triangle">
|
||||||
<i-ep-arrow-down />
|
<i-ep-arrow-down />
|
||||||
</el-icon>
|
</el-icon>
|
||||||
@@ -41,15 +41,12 @@ const logout = () => {
|
|||||||
cancelButtonText: "取消",
|
cancelButtonText: "取消",
|
||||||
type: "warning"
|
type: "warning"
|
||||||
}).then(async () => {
|
}).then(async () => {
|
||||||
//1.退出登录
|
|
||||||
const result: any = await logoutApi();
|
const result: any = await logoutApi();
|
||||||
if (result?.code === 0) {
|
if (result?.code === 0) {
|
||||||
location.href = usePathUrl();
|
|
||||||
setTimeout(() => {
|
|
||||||
userStore.$reset();
|
userStore.$reset();
|
||||||
//清除本地
|
//清除本地
|
||||||
localStorage.clear();
|
localStorage.clear();
|
||||||
}, 300);
|
location.href = usePathUrl();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
:href="scope.row.download_url"
|
:href="scope.row.download_url"
|
||||||
v-if="
|
v-if="
|
||||||
scope.row.status == 1 &&
|
scope.row.status == 1 &&
|
||||||
Math.abs((new Date(scope.row.date).getTime() - new Date().getTime()) / (24 * 60 * 60 * 1000)) <= 7
|
Math.abs((new Date(scope.row.created_at).getTime() - new Date().getTime()) / (24 * 60 * 60 * 1000)) <= 7
|
||||||
"
|
"
|
||||||
>下载</a
|
>下载</a
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -66,7 +66,12 @@ const selectionChange = (selection: any) => {
|
|||||||
};
|
};
|
||||||
const handleButtonClickCallback = (item: any) => {
|
const handleButtonClickCallback = (item: any) => {
|
||||||
const { type } = item;
|
const { type } = item;
|
||||||
btnClick[type](item, dataStore.selectionList, proTableRef);
|
// dataStore.selectionList, proTableRef
|
||||||
|
btnClick[type]({
|
||||||
|
selectionList: dataStore.selectionList,
|
||||||
|
proTableRef,
|
||||||
|
initParam: dataStore.initParam
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
//搜索
|
//搜索
|
||||||
|
|||||||
@@ -1,38 +1,21 @@
|
|||||||
import { getMaterialListReloadApi } from "@/api/modules/foundationMaterial";
|
import { getMaterialListReloadApi, getMaterialListExportApi } from "@/api/modules/foundationMaterial";
|
||||||
import { useMsg } from "@/hooks/useMsg";
|
import { useMsg } from "@/hooks/useMsg";
|
||||||
//getMaterialListResetApi
|
|
||||||
// 直接导出函数,无需额外包装对象
|
// 导出
|
||||||
export const handleExport = (item: any, selectionList: any[], proTable: any) => {
|
export const handleExport = async (params: any) => {
|
||||||
console.log("导出操作", item);
|
const { initParam } = params;
|
||||||
console.log(selectionList, "=selectionList=");
|
const result = await getMaterialListExportApi(initParam);
|
||||||
let length = selectionList.length;
|
if (result?.code === 0) {
|
||||||
if (!length) {
|
useMsg("success", "导出成功 !");
|
||||||
useMsg("warning", "请选择需要删除的数据!");
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
ElMessageBox.confirm("您确定进行删除操作吗?", "温馨提示", {
|
|
||||||
confirmButtonText: "确定",
|
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "warning"
|
|
||||||
})
|
|
||||||
.then(async () => {
|
|
||||||
proTable.value!.getTableList();
|
|
||||||
// const result = await commitListApi();
|
|
||||||
// if (result.status === 200) {
|
|
||||||
// useMsg("success", "删除成功 !");
|
|
||||||
// } else {
|
|
||||||
// useMsg("error", result.message);
|
|
||||||
// }
|
|
||||||
})
|
|
||||||
.catch(() => {});
|
|
||||||
};
|
};
|
||||||
// proTable: any getMaterialListReloadApi
|
//刷新
|
||||||
export const handleReload = async (item: any, selectionList: any[], proTable: any) => {
|
export const handleReload = async (params: any) => {
|
||||||
console.log("刷新操作", item);
|
const { selectionList, proTable } = params;
|
||||||
let length = selectionList.length;
|
let length = selectionList.length;
|
||||||
let ids: any = [];
|
let ids: any = [];
|
||||||
if (length && length > 100) {
|
if (length && length > 100) {
|
||||||
useMsg("warning", "选中刷新数据最大100条!");
|
useMsg("warning", "选中刷新数据最大100条 !");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
selectionList.forEach((item: any) => {
|
selectionList.forEach((item: any) => {
|
||||||
|
|||||||
@@ -44,6 +44,13 @@ const userStore = useUserStore();
|
|||||||
const $route = useRoute();
|
const $route = useRoute();
|
||||||
|
|
||||||
dataStore.formData[0].options = userStore.orgIdArr;
|
dataStore.formData[0].options = userStore.orgIdArr;
|
||||||
|
const init = () => {
|
||||||
|
//$route.query.title === "新增订阅" ? org_number: ["101"],
|
||||||
|
if ($route.query.title === "新增订阅") {
|
||||||
|
dataStore.ruleForm.org_number = ["101"];
|
||||||
|
}
|
||||||
|
};
|
||||||
|
init();
|
||||||
//新增
|
//新增
|
||||||
const handleAdd = () => {
|
const handleAdd = () => {
|
||||||
if (
|
if (
|
||||||
|
|||||||
@@ -1,17 +1,18 @@
|
|||||||
export const FORM_DATA: any[] = [
|
export const FORM_DATA: any[] = [
|
||||||
{
|
{
|
||||||
prop: "org_number",
|
prop: "org_number",
|
||||||
placeholder: "",
|
placeholder: "请输入",
|
||||||
type: "selectMultiple",
|
type: "selectMultiple",
|
||||||
label: "组织:",
|
label: "组织:",
|
||||||
disabled: false,
|
disabled: false,
|
||||||
required: true,
|
required: true,
|
||||||
class: "form-item1",
|
class: "form-item1",
|
||||||
|
|
||||||
options: []
|
options: []
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: "customer_number",
|
prop: "customer_number",
|
||||||
placeholder: "",
|
placeholder: "请输入",
|
||||||
type: "selectMultipleRemoteCustomersNames",
|
type: "selectMultipleRemoteCustomersNames",
|
||||||
label: "客户名称:",
|
label: "客户名称:",
|
||||||
disabled: false,
|
disabled: false,
|
||||||
@@ -21,7 +22,7 @@ export const FORM_DATA: any[] = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: "customer_number",
|
prop: "customer_number",
|
||||||
placeholder: "",
|
placeholder: "请输入",
|
||||||
type: "input",
|
type: "input",
|
||||||
label: "客户编码:",
|
label: "客户编码:",
|
||||||
disabled: true,
|
disabled: true,
|
||||||
@@ -30,7 +31,7 @@ export const FORM_DATA: any[] = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: "product_lines",
|
prop: "product_lines",
|
||||||
placeholder: "",
|
placeholder: "请输入",
|
||||||
type: "selectProductLinesRemote",
|
type: "selectProductLinesRemote",
|
||||||
label: "品线:",
|
label: "品线:",
|
||||||
disabled: false,
|
disabled: false,
|
||||||
@@ -40,7 +41,7 @@ export const FORM_DATA: any[] = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: "subscriber_dduid",
|
prop: "subscriber_dduid",
|
||||||
placeholder: "",
|
placeholder: "请输入",
|
||||||
type: "selectRemoteUser",
|
type: "selectRemoteUser",
|
||||||
label: "订阅账号:",
|
label: "订阅账号:",
|
||||||
disabled: false,
|
disabled: false,
|
||||||
|
|||||||
@@ -3,19 +3,20 @@ export const COLUMNS = [
|
|||||||
{
|
{
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "订阅账号",
|
label: "订阅账号",
|
||||||
prop: "subscriber_name"
|
prop: "subscriber_name",
|
||||||
},
|
fixed: true
|
||||||
{
|
|
||||||
align: "left",
|
|
||||||
fixed: true,
|
|
||||||
label: "客户名称",
|
|
||||||
prop: "customer_name"
|
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "组织",
|
label: "组织",
|
||||||
prop: "org_name"
|
prop: "org_name"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
align: "left",
|
||||||
|
label: "客户名称",
|
||||||
|
prop: "customer_name"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "客户编码",
|
label: "客户编码",
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ export const setDetailsData = (dataStore: any, data: any) => {
|
|||||||
dataStore.formData[4].options = [
|
dataStore.formData[4].options = [
|
||||||
{
|
{
|
||||||
value: data?.subscriber_dduid,
|
value: data?.subscriber_dduid,
|
||||||
label: data?.subscriber_name
|
label: data?.subscriber_mobile ? data?.subscriber_name + " " + data?.subscriber_mobile : data?.subscriber_name
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
dataStore.ruleForm.subscriber_dduid = data?.subscriber_dduid;
|
dataStore.ruleForm.subscriber_dduid = data?.subscriber_dduid;
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ export const BUTTON = [
|
|||||||
{
|
{
|
||||||
text: "导出",
|
text: "导出",
|
||||||
permission: "foundationSubscribeWarehousingBtnExport",
|
permission: "foundationSubscribeWarehousingBtnExport",
|
||||||
type: "add",
|
type: "export",
|
||||||
props: {
|
props: {
|
||||||
type: "primary"
|
type: "primary"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -73,7 +73,11 @@ const selectionChange = (selection: any) => {
|
|||||||
};
|
};
|
||||||
const handleButtonClickCallback = (item: any) => {
|
const handleButtonClickCallback = (item: any) => {
|
||||||
const { type } = item;
|
const { type } = item;
|
||||||
btnClick[type](item, dataStore.selectionList, proTable);
|
btnClick[type]({
|
||||||
|
selectionList: dataStore.selectionList,
|
||||||
|
proTable,
|
||||||
|
initParam: dataStore.initParam
|
||||||
|
});
|
||||||
};
|
};
|
||||||
//搜索
|
//搜索
|
||||||
const handleSearch = async (params: any) => {
|
const handleSearch = async (params: any) => {
|
||||||
|
|||||||
@@ -1,29 +1,12 @@
|
|||||||
import { useMsg } from "@/hooks/useMsg";
|
import { useMsg } from "@/hooks/useMsg";
|
||||||
import { getSubscribeResetListApi } from "@/api/modules/warehousing";
|
import { getSubscribeResetListApi, getSubscribeResetListExportApi } from "@/api/modules/warehousing";
|
||||||
// 直接导出函数,无需额外包装对象
|
// 导出
|
||||||
export const handleDel = (item: any, selectionList: any[], proTable: any) => {
|
export const handleExport = async (params: any) => {
|
||||||
console.log("导出操作", item);
|
const { initParam } = params;
|
||||||
console.log(selectionList, "=selectionList=");
|
const result = await getSubscribeResetListExportApi(initParam);
|
||||||
let length = selectionList.length;
|
if (result?.code === 0) {
|
||||||
if (!length) {
|
useMsg("success", "导出成功 !");
|
||||||
useMsg("warning", "请选择需要删除的数据!");
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
ElMessageBox.confirm("您确定进行删除操作吗?", "温馨提示", {
|
|
||||||
confirmButtonText: "确定",
|
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "warning"
|
|
||||||
})
|
|
||||||
.then(async () => {
|
|
||||||
proTable.value!.getTableList();
|
|
||||||
// const result = await commitListApi();
|
|
||||||
// if (result.status === 200) {
|
|
||||||
// useMsg("success", "删除成功 !");
|
|
||||||
// } else {
|
|
||||||
// useMsg("error", result.message);
|
|
||||||
// }
|
|
||||||
})
|
|
||||||
.catch(() => {});
|
|
||||||
};
|
};
|
||||||
// proTable: any
|
// proTable: any
|
||||||
export const handleReSet = async (item: any, selectionList: any[], proTable: any) => {
|
export const handleReSet = async (item: any, selectionList: any[], proTable: any) => {
|
||||||
@@ -47,6 +30,6 @@ export const handleReSet = async (item: any, selectionList: any[], proTable: any
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const btnClick: any = {
|
export const btnClick: any = {
|
||||||
del: handleDel,
|
export: handleExport,
|
||||||
reset: handleReSet
|
reset: handleReSet
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -5,37 +5,31 @@
|
|||||||
//useRouter
|
//useRouter
|
||||||
import { useRoute, useRouter } from "vue-router";
|
import { useRoute, useRouter } from "vue-router";
|
||||||
// import { useMsg } from "@/hooks/useMsg";
|
// import { useMsg } from "@/hooks/useMsg";
|
||||||
|
//重定向
|
||||||
|
import { usePathUrl } from "@/hooks/usePathUrl";
|
||||||
//登录请求接口
|
//登录请求接口
|
||||||
import { loginApi } from "@/api/modules/login";
|
import { loginApi } from "@/api/modules/login";
|
||||||
|
|
||||||
//用户信息存储
|
//用户信息存储
|
||||||
import { useUserStore } from "@/stores/modules/user";
|
import { useUserStore } from "@/stores/modules/user";
|
||||||
//重定向
|
|
||||||
import { usePathUrl } from "@/hooks/usePathUrl";
|
|
||||||
|
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
// 路由
|
//路由;
|
||||||
const $route = useRoute();
|
const $route = useRoute();
|
||||||
const $router = useRouter();
|
const $router = useRouter();
|
||||||
|
|
||||||
// 设置用户数据
|
|
||||||
const setUserData = (data: any) => {
|
|
||||||
// 设置token
|
|
||||||
userStore.setToken(data.access_token);
|
|
||||||
// 设置用户信息
|
|
||||||
userStore.setUserInfo(data.user_data);
|
|
||||||
|
|
||||||
//设置好了token和用户信息跳转到首页
|
|
||||||
setTimeout(() => {
|
|
||||||
$router.push({ path: "/" });
|
|
||||||
}, 500);
|
|
||||||
};
|
|
||||||
|
|
||||||
// 登录
|
// 登录
|
||||||
const loginHttp = async (code: any) => {
|
const loginHttp = async (code: any) => {
|
||||||
const result: Record<string, any> = await loginApi(code);
|
const result: Record<string, any> = await loginApi(code);
|
||||||
if (result.code === 0) {
|
if (result.code === 0) {
|
||||||
setUserData(result.data);
|
userStore.setToken(result?.data?.access_token);
|
||||||
|
console.log(result?.data?.access_token, "=data.access_token=");
|
||||||
|
// 设置用户信息
|
||||||
|
userStore.setUserInfo(result?.data?.user_data);
|
||||||
|
//设置好了token和用户信息跳转到首页
|
||||||
|
setTimeout(() => {
|
||||||
|
$router.push({ path: "/" });
|
||||||
|
}, 500);
|
||||||
} else {
|
} else {
|
||||||
location.href = usePathUrl();
|
location.href = usePathUrl();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user