Compare commits
3 Commits
cad97ac4fd
...
dev-V01.00
| Author | SHA1 | Date | |
|---|---|---|---|
| 17625a1cff | |||
| b0e729f9c0 | |||
| caf79bae5a |
@@ -26,6 +26,22 @@ export const getProductLinesApi = (params: any) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
//仓库
|
//仓库
|
||||||
export const getWarehousesListApi = () => {
|
export const getWarehousesListApi = (params?: any) => {
|
||||||
return http.get<any>(`basicinfo/warehouses`);
|
return http.get<any>(`basicinfo/warehouses`, params);
|
||||||
|
};
|
||||||
|
|
||||||
|
//获取金蝶仓库
|
||||||
|
export const getWarehousesKingdeeListApi = (params: any) => {
|
||||||
|
return http.get<any>(`basicinfo/warehouses/kingdee`, params);
|
||||||
|
};
|
||||||
|
//获取金蝶子仓库
|
||||||
|
export const getSubwarehouseskingdeeListApi = (params?: any) => {
|
||||||
|
return http.get<any>(`basicinfo/subwarehouses/kingdee`, params);
|
||||||
|
};
|
||||||
|
//获取聚水潭仓库 /admapi/basicinfo/warehouses/jushuitan
|
||||||
|
export const getWarehousesJushuitanListApi = (params?: any) => {
|
||||||
|
return http.get<any>(`basicinfo/warehouses/jushuitan`, params);
|
||||||
|
};
|
||||||
|
export const getWarehousesLingXingListApi = (params?: any) => {
|
||||||
|
return http.get<any>(`basicinfo/warehouses/lingxing`, params);
|
||||||
};
|
};
|
||||||
|
|||||||
26
src/api/modules/setGoods.ts
Normal file
26
src/api/modules/setGoods.ts
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
import http from "@/api";
|
||||||
|
//列表 /admapi/warehouse/pos_picking_priority
|
||||||
|
export const getGoodsListApi = (params: any) => {
|
||||||
|
return http.get<any>(`warehouse/pos_picking_priority`, params);
|
||||||
|
};
|
||||||
|
|
||||||
|
//新增 /admapi/warehouse/pos_picking_priority
|
||||||
|
export const getGoodsAddApi = (params: any) => {
|
||||||
|
return http.post<any>(`warehouse/pos_picking_priority`, params);
|
||||||
|
};
|
||||||
|
//更新
|
||||||
|
export const getGoodsUpApi = (id: any, params: any) => {
|
||||||
|
return http.post<any>(`warehouse/pos_picking_priority/${id}`, params);
|
||||||
|
};
|
||||||
|
//详情
|
||||||
|
export const getGoodsDetailsApi = (id: any) => {
|
||||||
|
return http.get<any>(`warehouse/pos_picking_priority/${id}`);
|
||||||
|
};
|
||||||
|
//预览
|
||||||
|
export const getGoodsPreviewApi = (id: any) => {
|
||||||
|
return http.get<any>(`warehouse/pos_picking_priority/preview/${id}`);
|
||||||
|
};
|
||||||
|
//验证 /admapi/warehouse/pos_picking_priority/check_exists
|
||||||
|
export const getGoodsCheckExistswApi = (params: any) => {
|
||||||
|
return http.get<any>(`warehouse/pos_picking_priority/check_exists`, params);
|
||||||
|
};
|
||||||
@@ -21,19 +21,3 @@ export const getWarehouseUpApi = (id: any, params: any) => {
|
|||||||
export const getWarehouseDetailsApi = (id: any) => {
|
export const getWarehouseDetailsApi = (id: any) => {
|
||||||
return http.get<any>(`warehouse/relationship/${id}`);
|
return http.get<any>(`warehouse/relationship/${id}`);
|
||||||
};
|
};
|
||||||
|
|
||||||
//获取金蝶仓库
|
|
||||||
export const getSetWarehouseKingdeeListApi = (params: any) => {
|
|
||||||
return http.get<any>(`basicinfo/warehouses/kingdee`, params);
|
|
||||||
};
|
|
||||||
//获取金蝶子仓库
|
|
||||||
export const getSetWarehouseSubwarehousesListApi = (params: any) => {
|
|
||||||
return http.get<any>(`basicinfo/subwarehouses/kingdee`, params);
|
|
||||||
};
|
|
||||||
//获取聚水潭仓库 /admapi/basicinfo/warehouses/jushuitan
|
|
||||||
export const getSetWarehouseSubwarehousesJushuitanListApi = (params: any) => {
|
|
||||||
return http.get<any>(`basicinfo/warehouses/jushuitan`, params);
|
|
||||||
};
|
|
||||||
export const getSetWarehouseSubwarehousesLingXingListApi = (params: any) => {
|
|
||||||
return http.get<any>(`basicinfo/warehouses/lingxing`, params);
|
|
||||||
};
|
|
||||||
|
|||||||
121
src/components.d.ts
vendored
121
src/components.d.ts
vendored
@@ -5,65 +5,68 @@
|
|||||||
// Read more: https://github.com/vuejs/core/pull/3399
|
// Read more: https://github.com/vuejs/core/pull/3399
|
||||||
export {}
|
export {}
|
||||||
|
|
||||||
declare module 'vue' {
|
declare module "vue" {
|
||||||
export interface GlobalComponents {
|
export interface GlobalComponents {
|
||||||
403: typeof import('./components/ErrorMessage/403.vue')['default']
|
403: typeof import("./components/ErrorMessage/403.vue")["default"];
|
||||||
404: typeof import('./components/ErrorMessage/404.vue')['default']
|
404: typeof import("./components/ErrorMessage/404.vue")["default"];
|
||||||
500: typeof import('./components/ErrorMessage/500.vue')['default']
|
500: typeof import("./components/ErrorMessage/500.vue")["default"];
|
||||||
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"];
|
||||||
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"];
|
||||||
ElContainer: typeof import('element-plus/es')['ElContainer']
|
ElCheckbox: typeof import("element-plus/es")["ElCheckbox"];
|
||||||
ElDatePicker: typeof import('element-plus/es')['ElDatePicker']
|
ElContainer: typeof import("element-plus/es")["ElContainer"];
|
||||||
ElDialog: typeof import('element-plus/es')['ElDialog']
|
ElDatePicker: typeof import("element-plus/es")["ElDatePicker"];
|
||||||
ElDrawer: typeof import('element-plus/es')['ElDrawer']
|
ElDialog: typeof import("element-plus/es")["ElDialog"];
|
||||||
ElDropdown: typeof import('element-plus/es')['ElDropdown']
|
ElDrawer: typeof import("element-plus/es")["ElDrawer"];
|
||||||
ElDropdownItem: typeof import('element-plus/es')['ElDropdownItem']
|
ElDropdown: typeof import("element-plus/es")["ElDropdown"];
|
||||||
ElDropdownMenu: typeof import('element-plus/es')['ElDropdownMenu']
|
ElDropdownItem: typeof import("element-plus/es")["ElDropdownItem"];
|
||||||
ElForm: typeof import('element-plus/es')['ElForm']
|
ElDropdownMenu: typeof import("element-plus/es")["ElDropdownMenu"];
|
||||||
ElFormItem: typeof import('element-plus/es')['ElFormItem']
|
ElForm: typeof import("element-plus/es")["ElForm"];
|
||||||
ElHeader: typeof import('element-plus/es')['ElHeader']
|
ElFormItem: typeof import("element-plus/es")["ElFormItem"];
|
||||||
ElIcon: typeof import('element-plus/es')['ElIcon']
|
ElHeader: typeof import("element-plus/es")["ElHeader"];
|
||||||
ElInput: typeof import('element-plus/es')['ElInput']
|
ElIcon: typeof import("element-plus/es")["ElIcon"];
|
||||||
ElMain: typeof import('element-plus/es')['ElMain']
|
ElInput: typeof import("element-plus/es")["ElInput"];
|
||||||
ElMenu: typeof import('element-plus/es')['ElMenu']
|
ElInputNumber: typeof import("element-plus/es")["ElInputNumber"];
|
||||||
ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
|
ElMain: typeof import("element-plus/es")["ElMain"];
|
||||||
ElOption: typeof import('element-plus/es')['ElOption']
|
ElMenu: typeof import("element-plus/es")["ElMenu"];
|
||||||
ElPagination: typeof import('element-plus/es')['ElPagination']
|
ElMenuItem: typeof import("element-plus/es")["ElMenuItem"];
|
||||||
ElScrollbar: typeof import('element-plus/es')['ElScrollbar']
|
ElOption: typeof import("element-plus/es")["ElOption"];
|
||||||
ElSelect: typeof import('element-plus/es')['ElSelect']
|
ElPagination: typeof import("element-plus/es")["ElPagination"];
|
||||||
ElSubMenu: typeof import('element-plus/es')['ElSubMenu']
|
ElScrollbar: typeof import("element-plus/es")["ElScrollbar"];
|
||||||
ElSwitch: typeof import('element-plus/es')['ElSwitch']
|
ElSelect: typeof import("element-plus/es")["ElSelect"];
|
||||||
ElTable: typeof import('element-plus/es')['ElTable']
|
ElSubMenu: typeof import("element-plus/es")["ElSubMenu"];
|
||||||
ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
|
ElSwitch: typeof import("element-plus/es")["ElSwitch"];
|
||||||
ElTabPane: typeof import('element-plus/es')['ElTabPane']
|
ElTable: typeof import("element-plus/es")["ElTable"];
|
||||||
ElTabs: typeof import('element-plus/es')['ElTabs']
|
ElTableColumn: typeof import("element-plus/es")["ElTableColumn"];
|
||||||
ElTag: typeof import('element-plus/es')['ElTag']
|
ElTabPane: typeof import("element-plus/es")["ElTabPane"];
|
||||||
Empty: typeof import('./components/ProTable/components/Empty.vue')['default']
|
ElTabs: typeof import("element-plus/es")["ElTabs"];
|
||||||
Form: typeof import('./components/Form/index.vue')['default']
|
ElTag: typeof import("element-plus/es")["ElTag"];
|
||||||
FormItem: typeof import('./components/Form/components/FormItem.vue')['default']
|
ElTooltip: typeof import("element-plus/es")["ElTooltip"];
|
||||||
FormTable: typeof import('./components/FormTable/index.vue')['default']
|
Empty: typeof import("./components/ProTable/components/Empty.vue")["default"];
|
||||||
Grid: typeof import('./components/Grid/index.vue')['default']
|
Form: typeof import("./components/Form/index.vue")["default"];
|
||||||
GridItem: typeof import('./components/Grid/components/GridItem.vue')['default']
|
FormItem: typeof import("./components/Form/components/FormItem.vue")["default"];
|
||||||
IEpArrowDown: typeof import('~icons/ep/arrow-down')['default']
|
FormTable: typeof import("./components/FormTable/index.vue")["default"];
|
||||||
IEpCircleClose: typeof import('~icons/ep/circle-close')['default']
|
Grid: typeof import("./components/Grid/index.vue")["default"];
|
||||||
IEpFolderDelete: typeof import('~icons/ep/folder-delete')['default']
|
GridItem: typeof import("./components/Grid/components/GridItem.vue")["default"];
|
||||||
IEpFullScreen: typeof import('~icons/ep/full-screen')['default']
|
IEpArrowDown: typeof import("~icons/ep/arrow-down")["default"];
|
||||||
IEpRefresh: typeof import('~icons/ep/refresh')['default']
|
IEpCircleClose: typeof import("~icons/ep/circle-close")["default"];
|
||||||
IEpRemove: typeof import('~icons/ep/remove')['default']
|
IEpFolderDelete: typeof import("~icons/ep/folder-delete")["default"];
|
||||||
IEpSwitchButton: typeof import('~icons/ep/switch-button')['default']
|
IEpFullScreen: typeof import("~icons/ep/full-screen")["default"];
|
||||||
ImportExcel: typeof import('./components/ImportExcel/index.vue')['default']
|
IEpRefresh: typeof import("~icons/ep/refresh")["default"];
|
||||||
Loading: typeof import('./components/Loading/index.vue')['default']
|
IEpRemove: typeof import("~icons/ep/remove")["default"];
|
||||||
Pagination: typeof import('./components/ProTable/components/Pagination.vue')['default']
|
IEpSwitchButton: typeof import("~icons/ep/switch-button")["default"];
|
||||||
PermissionButton: typeof import('./components/PermissionButton/index.vue')['default']
|
ImportExcel: typeof import("./components/ImportExcel/index.vue")["default"];
|
||||||
ProTable: typeof import('./components/ProTable/index.vue')['default']
|
Loading: typeof import("./components/Loading/index.vue")["default"];
|
||||||
RouterLink: typeof import('vue-router')['RouterLink']
|
Pagination: typeof import("./components/ProTable/components/Pagination.vue")["default"];
|
||||||
RouterView: typeof import('vue-router')['RouterView']
|
PermissionButton: typeof import("./components/PermissionButton/index.vue")["default"];
|
||||||
SearchForm: typeof import('./components/SearchForm/index.vue')['default']
|
ProTable: typeof import("./components/ProTable/index.vue")["default"];
|
||||||
SearchFormItem: typeof import('./components/SearchForm/components/SearchFormItem.vue')['default']
|
RouterLink: typeof import("vue-router")["RouterLink"];
|
||||||
TableColumn: typeof import('./components/ProTable/components/TableColumn.vue')['default']
|
RouterView: typeof import("vue-router")["RouterView"];
|
||||||
|
SearchForm: typeof import("./components/SearchForm/index.vue")["default"];
|
||||||
|
SearchFormItem: typeof import("./components/SearchForm/components/SearchFormItem.vue")["default"];
|
||||||
|
TableColumn: typeof import("./components/ProTable/components/TableColumn.vue")["default"];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -67,6 +67,7 @@
|
|||||||
:placeholder="item.placeholder"
|
:placeholder="item.placeholder"
|
||||||
clearable
|
clearable
|
||||||
:disabled="item.disabled"
|
:disabled="item.disabled"
|
||||||
|
@change="handleSelectChange(item)"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="option in item.options"
|
v-for="option in item.options"
|
||||||
@@ -222,6 +223,7 @@ const props = defineProps<{
|
|||||||
selectMultipleRemoteTag1?: () => void;
|
selectMultipleRemoteTag1?: () => void;
|
||||||
setRuleFormValue?: () => void;
|
setRuleFormValue?: () => void;
|
||||||
selectMultipleDClear?: () => void;
|
selectMultipleDClear?: () => void;
|
||||||
|
selectChange?: () => void;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
let _searchResult = computed(() => {
|
let _searchResult = computed(() => {
|
||||||
@@ -235,8 +237,11 @@ const emits = defineEmits<{
|
|||||||
(e: "selectMultipleRemoveTag", result: Record<string, any>): void;
|
(e: "selectMultipleRemoveTag", result: Record<string, any>): void;
|
||||||
(e: "selectMultipleRemoteTag1", result: Record<string, any>): void;
|
(e: "selectMultipleRemoteTag1", result: Record<string, any>): void;
|
||||||
(e: "selectMultipleDClear", result: Record<string, any>): void;
|
(e: "selectMultipleDClear", result: Record<string, any>): void;
|
||||||
|
(e: "selectChange", result: Record<string, any>): void;
|
||||||
}>();
|
}>();
|
||||||
|
const handleSelectChange = (item: any) => {
|
||||||
|
emits("selectChange", item);
|
||||||
|
};
|
||||||
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 });
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -183,8 +183,15 @@
|
|||||||
</template>
|
</template>
|
||||||
<script setup lang="ts" name="SearchForm">
|
<script setup lang="ts" name="SearchForm">
|
||||||
import { verificationInput } from "./components/utils/verificationInput";
|
import { verificationInput } from "./components/utils/verificationInput";
|
||||||
import { getSupplierApi, getCustomersApi, getProductLinesApi } from "@/api/modules/global";
|
import {
|
||||||
import { getSetWarehouseKingdeeListApi, getSetWarehouseSubwarehousesListApi } from "@/api/modules/setWarehouse";
|
getSupplierApi,
|
||||||
|
getCustomersApi,
|
||||||
|
getProductLinesApi,
|
||||||
|
getWarehousesKingdeeListApi,
|
||||||
|
getSubwarehouseskingdeeListApi
|
||||||
|
} from "@/api/modules/global";
|
||||||
|
// // getWarehousesKingdeeListApi getSubwarehouseskingdeeListApi getWarehousesJushuitanListApi getWarehousesLingXingListApi
|
||||||
|
// import { getWarehousesKingdeeListApi, getSubwarehouseskingdeeListApi } from "@/api/modules/setWarehouse";
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
formData: any[];
|
formData: any[];
|
||||||
searchParams: Record<string, any>;
|
searchParams: Record<string, any>;
|
||||||
@@ -199,7 +206,7 @@ const emits = defineEmits<{
|
|||||||
|
|
||||||
let loading = ref(false);
|
let loading = ref(false);
|
||||||
const remoteRef = ref(null);
|
const remoteRef = ref(null);
|
||||||
const _searchParams = computed(() => {
|
const _searchParams: any = computed(() => {
|
||||||
return props.searchParams;
|
return props.searchParams;
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -269,12 +276,12 @@ const getProductLines = async (keywords: any, item: any) => {
|
|||||||
|
|
||||||
//金蝶仓库
|
//金蝶仓库
|
||||||
const getSetWarehouseKingdeeList = async (keywords: any, item: any) => {
|
const getSetWarehouseKingdeeList = async (keywords: any, item: any) => {
|
||||||
|
const useOrgNumber: any[] = _searchParams?.value?.use_org_number;
|
||||||
|
if (Array.isArray(useOrgNumber) && useOrgNumber?.length > 0) {
|
||||||
item.options = [];
|
item.options = [];
|
||||||
let use_org_number = "";
|
let use_org_number = "";
|
||||||
if (Array.isArray(_searchParams.value.use_org_number) ** _searchParams.value.use_org_number.length) {
|
|
||||||
use_org_number = _searchParams.value.use_org_number.join(",");
|
use_org_number = _searchParams.value.use_org_number.join(",");
|
||||||
}
|
const result = await getWarehousesKingdeeListApi({
|
||||||
const result = await getSetWarehouseKingdeeListApi({
|
|
||||||
keywords: keywords,
|
keywords: keywords,
|
||||||
use_org_number
|
use_org_number
|
||||||
});
|
});
|
||||||
@@ -289,16 +296,17 @@ const getSetWarehouseKingdeeList = async (keywords: any, item: any) => {
|
|||||||
});
|
});
|
||||||
item.options = options;
|
item.options = options;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
//获取金蝶子仓库
|
//获取金蝶子仓库
|
||||||
const getSetWarehouseSubwarehousesList = async (keywords: any, item: any) => {
|
const getSetWarehouseSubwarehousesList = async (keywords: any, item: any) => {
|
||||||
|
const kdWarehouseNumber: any[] = _searchParams?.value?.kd_warehouse_number;
|
||||||
|
if (Array.isArray(kdWarehouseNumber) && kdWarehouseNumber?.length > 0) {
|
||||||
//先清空一下
|
//先清空一下
|
||||||
item.options = [];
|
item.options = [];
|
||||||
let kd_warehouse_number = "";
|
let kd_warehouse_number = "";
|
||||||
if (Array.isArray(_searchParams.value.kd_warehouse_number) ** _searchParams.value.kd_warehouse_number.length) {
|
|
||||||
kd_warehouse_number = _searchParams.value.kd_warehouse_number.join(",");
|
kd_warehouse_number = _searchParams.value.kd_warehouse_number.join(",");
|
||||||
}
|
const result = await getSubwarehouseskingdeeListApi({
|
||||||
const result = await getSetWarehouseSubwarehousesListApi({
|
|
||||||
keywords,
|
keywords,
|
||||||
warehouse_number: kd_warehouse_number
|
warehouse_number: kd_warehouse_number
|
||||||
});
|
});
|
||||||
@@ -313,6 +321,7 @@ const getSetWarehouseSubwarehousesList = async (keywords: any, item: any) => {
|
|||||||
});
|
});
|
||||||
item.options = options;
|
item.options = options;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
//多选远程搜索
|
//多选远程搜索
|
||||||
@@ -348,7 +357,7 @@ const handleTagRemove = (item: any) => {
|
|||||||
item.options = [];
|
item.options = [];
|
||||||
}
|
}
|
||||||
const { prop } = item;
|
const { prop } = item;
|
||||||
if (prop === "kd_warehouse_number" || prop === "kd_subwarehouse") {
|
if (prop === "kd_warehouse_number" || prop === "kd_subwarehouse_number") {
|
||||||
emits("selectMultipleRemoveTag", { item, org_number: _searchParams.value[prop] });
|
emits("selectMultipleRemoveTag", { item, org_number: _searchParams.value[prop] });
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -73,8 +73,8 @@ export const useTable = (
|
|||||||
state.totalParam.kd_warehouse_number = state.totalParam.kd_warehouse_number.join(",");
|
state.totalParam.kd_warehouse_number = state.totalParam.kd_warehouse_number.join(",");
|
||||||
}
|
}
|
||||||
//金蝶子仓库
|
//金蝶子仓库
|
||||||
if (Array.isArray(state.totalParam?.kd_subwarehouse) && state.totalParam?.kd_subwarehouse?.length) {
|
if (Array.isArray(state.totalParam?.kd_subwarehouse_number) && state.totalParam?.kd_subwarehouse_number?.length) {
|
||||||
state.totalParam.kd_subwarehouse = state.totalParam.kd_subwarehouse.join(",");
|
state.totalParam.kd_subwarehouse_number = state.totalParam.kd_subwarehouse_number.join(",");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -41,7 +41,13 @@ const breadcrumbList = computed(() => {
|
|||||||
item.meta.title = route.query.title;
|
item.meta.title = route.query.title;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
console.log("");
|
}
|
||||||
|
if (route.query.title === "新增仓位找货优先级" || "编辑仓位找货优先级") {
|
||||||
|
breadcrumbData.forEach((item: any) => {
|
||||||
|
if (item.name === "foundationSetGoodsAdd") {
|
||||||
|
item.meta.title = route.query.title;
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
return breadcrumbData;
|
return breadcrumbData;
|
||||||
|
|||||||
@@ -41,7 +41,8 @@ router.beforeEach(async (to, from, next) => {
|
|||||||
const currentPath = window.location.pathname;
|
const currentPath = window.location.pathname;
|
||||||
// 2.动态设置标题
|
// 2.动态设置标题
|
||||||
const title = import.meta.env.VITE_GLOB_APP_TITLE;
|
const title = import.meta.env.VITE_GLOB_APP_TITLE;
|
||||||
document.title = to.meta.title ? `${to.meta.title} - ${title}` : title;
|
// to.meta.title ? `${to.meta.title} - ${title}` :
|
||||||
|
document.title = title;
|
||||||
// 3.判断是访问登陆页,有 Token 就在当前页面,没有 Token 重置路由到登陆页
|
// 3.判断是访问登陆页,有 Token 就在当前页面,没有 Token 重置路由到登陆页
|
||||||
if (to.path.toLocaleLowerCase() === LOGIN_URL) {
|
if (to.path.toLocaleLowerCase() === LOGIN_URL) {
|
||||||
if (userStore.newUserToken) return next(from.fullPath);
|
if (userStore.newUserToken) return next(from.fullPath);
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
:labelWidth="dataStore.labelWidth"
|
:labelWidth="dataStore.labelWidth"
|
||||||
:inline="true"
|
:inline="true"
|
||||||
ref="detailsRef"
|
ref="detailsRef"
|
||||||
|
@selectChange="handleChange"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -24,19 +25,140 @@ import { cloneDeep } from "lodash-es";
|
|||||||
import { DETAILS_FORM_DATA, DETAILS_RULE_FORM } from "./constant/list/add";
|
import { DETAILS_FORM_DATA, DETAILS_RULE_FORM } from "./constant/list/add";
|
||||||
import DetailsSearch from "@/components/DetailsSearch/index.vue";
|
import DetailsSearch from "@/components/DetailsSearch/index.vue";
|
||||||
import PermissionButton from "@/components/PermissionButton/index.vue";
|
import PermissionButton from "@/components/PermissionButton/index.vue";
|
||||||
|
import { useUserStore } from "@/stores/modules/user";
|
||||||
|
import $Bus from "@/utils/mittBus";
|
||||||
|
import { getGoodsAddApi, getGoodsUpApi, getGoodsDetailsApi, getGoodsCheckExistswApi } from "@/api/modules/setGoods";
|
||||||
|
import { getWarehousesListApi } from "@/api/modules/global";
|
||||||
|
import { useMsg } from "@/hooks/useMsg";
|
||||||
|
const userStore = useUserStore();
|
||||||
|
const route = useRoute();
|
||||||
|
const $router = useRouter();
|
||||||
// 数据源
|
// 数据源
|
||||||
const dataStore = reactive<any>({
|
const dataStore = reactive<any>({
|
||||||
buttons: cloneDeep(BUTTON),
|
buttons: cloneDeep(BUTTON),
|
||||||
labelWidth: "120px",
|
labelWidth: "120px",
|
||||||
formData: cloneDeep(DETAILS_FORM_DATA),
|
formData: cloneDeep(DETAILS_FORM_DATA),
|
||||||
ruleForm: cloneDeep(DETAILS_RULE_FORM)
|
ruleForm: cloneDeep(DETAILS_RULE_FORM),
|
||||||
|
id: null,
|
||||||
|
title: ""
|
||||||
});
|
});
|
||||||
|
|
||||||
// 详情表单实例
|
// 详情表单实例
|
||||||
const detailsRef = ref(null);
|
const detailsRef = ref(null);
|
||||||
|
|
||||||
|
//初始化组织数据
|
||||||
|
const init = () => {
|
||||||
|
if (userStore.orgIdArr.length) {
|
||||||
|
dataStore.formData[0].options = userStore?.orgIdArr;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
init();
|
||||||
|
|
||||||
|
//新增
|
||||||
|
const handleAdd = async () => {
|
||||||
|
const result = await getGoodsAddApi(dataStore.ruleForm);
|
||||||
|
if (result?.code === 0) {
|
||||||
|
useMsg("success", "新增成功 !");
|
||||||
|
dataStore.id = result?.data?.id;
|
||||||
|
$Bus.emit("setGoodsResetList");
|
||||||
|
}
|
||||||
|
};
|
||||||
|
//更新
|
||||||
|
const getGoodsUp = async () => {
|
||||||
|
const result = await getGoodsUpApi(dataStore.id, dataStore.ruleForm);
|
||||||
|
if (result?.code === 0) {
|
||||||
|
useMsg("success", "更新成功 !");
|
||||||
|
$Bus.emit("setGoodsResetList");
|
||||||
|
}
|
||||||
|
};
|
||||||
|
//详情
|
||||||
|
const getGoodsDetails = async () => {
|
||||||
|
dataStore.id = route.query.id;
|
||||||
|
if (!dataStore.id) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
//getGoodsDetailsApi
|
||||||
|
const result = await getGoodsDetailsApi(dataStore.id);
|
||||||
|
if (result?.code === 0) {
|
||||||
|
dataStore.ruleForm = result?.data;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
getGoodsDetails();
|
||||||
|
//验证
|
||||||
|
const getGoodsCheckExistsw = async () => {
|
||||||
|
const result = await getGoodsCheckExistswApi({
|
||||||
|
use_org_number: dataStore.ruleForm.use_org_number,
|
||||||
|
warehouse_number: dataStore.ruleForm.warehouse_number
|
||||||
|
});
|
||||||
|
if (result?.code === 0 && result?.data?.exists) {
|
||||||
|
useMsg("error", "仓库已存在数据, 无需再次新增 !");
|
||||||
|
}
|
||||||
|
};
|
||||||
// 按钮点击事件
|
// 按钮点击事件
|
||||||
const handleButtonClickCallback = () => {};
|
const handleButtonClickCallback = (item: any) => {
|
||||||
|
const { type } = item;
|
||||||
|
dataStore.title = route.query.title;
|
||||||
|
if (type === "save") {
|
||||||
|
if (!dataStore.ruleForm.use_org_number) {
|
||||||
|
return useMsg("warning", "组织不能为空 !");
|
||||||
|
}
|
||||||
|
if (!dataStore.ruleForm.warehouse_number) {
|
||||||
|
return useMsg("warning", "仓库不能为空 !");
|
||||||
|
}
|
||||||
|
if (!dataStore.ruleForm.pos_picking_priority) {
|
||||||
|
return useMsg("warning", "仓位不能为空 !");
|
||||||
|
}
|
||||||
|
dataStore.title === "新增仓位找货优先级" ? handleAdd() : getGoodsUp();
|
||||||
|
}
|
||||||
|
if (type === "preview") {
|
||||||
|
if (!dataStore.id) {
|
||||||
|
useMsg("warning", "请先保存数据 !");
|
||||||
|
}
|
||||||
|
$router.push({
|
||||||
|
path: "/foundation/set/goods/preview",
|
||||||
|
query: { id: dataStore.id, name: dataStore.title }
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (type === "return") {
|
||||||
|
$router.push({
|
||||||
|
path: "/foundation/set/goods/index"
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
//仓库列表 /foundation/set/goods/preview
|
||||||
|
const getWarehousesList = async () => {
|
||||||
|
const result = await getWarehousesListApi({ use_org_number: dataStore.ruleForm.use_org_number });
|
||||||
|
if (result?.code === 0) {
|
||||||
|
const { data } = result;
|
||||||
|
if (data?.length) {
|
||||||
|
let options: any = [];
|
||||||
|
data.forEach((item: any) => {
|
||||||
|
options.push({
|
||||||
|
id: item.id,
|
||||||
|
value: item.warehouse_number,
|
||||||
|
label: item.warehouse_name
|
||||||
|
});
|
||||||
|
});
|
||||||
|
dataStore.formData[1].options = options;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const handleChange = (item: any) => {
|
||||||
|
console.log(item);
|
||||||
|
getGoodsCheckExistsw();
|
||||||
|
};
|
||||||
|
//监听当前组织
|
||||||
|
watch(
|
||||||
|
() => dataStore.ruleForm.use_org_number,
|
||||||
|
(newVal: any) => {
|
||||||
|
if (newVal) {
|
||||||
|
getWarehousesList();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
deep: true,
|
||||||
|
immediate: true
|
||||||
|
}
|
||||||
|
);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped></style>
|
<style scoped></style>
|
||||||
|
|||||||
@@ -1,6 +1,15 @@
|
|||||||
export const DETAILS_FORM_DATA: any[] = [
|
export const DETAILS_FORM_DATA: any[] = [
|
||||||
{
|
{
|
||||||
prop: "org_number",
|
prop: "use_org_number",
|
||||||
|
placeholder: "请选择",
|
||||||
|
type: "select",
|
||||||
|
label: "组织:",
|
||||||
|
disabled: false,
|
||||||
|
required: true,
|
||||||
|
class: "form-item1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: "warehouse_number",
|
||||||
placeholder: "请选择",
|
placeholder: "请选择",
|
||||||
type: "select",
|
type: "select",
|
||||||
label: "仓库:",
|
label: "仓库:",
|
||||||
@@ -9,7 +18,7 @@ export const DETAILS_FORM_DATA: any[] = [
|
|||||||
class: "form-item1"
|
class: "form-item1"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: "org_number",
|
prop: "pos_picking_priority",
|
||||||
placeholder: "请输入",
|
placeholder: "请输入",
|
||||||
type: "textarea",
|
type: "textarea",
|
||||||
label: "仓位:",
|
label: "仓位:",
|
||||||
@@ -19,4 +28,6 @@ export const DETAILS_FORM_DATA: any[] = [
|
|||||||
maxLength: 5000
|
maxLength: 5000
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
export const DETAILS_RULE_FORM: any = {};
|
export const DETAILS_RULE_FORM: any = {
|
||||||
|
use_org_number: "101"
|
||||||
|
};
|
||||||
|
|||||||
@@ -11,5 +11,10 @@ export const BUTTON = [
|
|||||||
text: "预览(请先保存)",
|
text: "预览(请先保存)",
|
||||||
permission: "foundationSetGoodsAddBtnPreview",
|
permission: "foundationSetGoodsAddBtnPreview",
|
||||||
type: "preview"
|
type: "preview"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "返回",
|
||||||
|
permission: "foundationSetGoodsAddBtnRreturn",
|
||||||
|
type: "return"
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -17,10 +17,11 @@ interface FormItem {
|
|||||||
}
|
}
|
||||||
export const FORM_DATA: FormItem[] = [
|
export const FORM_DATA: FormItem[] = [
|
||||||
{
|
{
|
||||||
prop: "org_number",
|
prop: "warehouse_number",
|
||||||
placeholder: "请输入仓库",
|
placeholder: "请输入仓库",
|
||||||
type: "input",
|
type: "select",
|
||||||
label: "仓库: "
|
label: "仓库: ",
|
||||||
|
options: []
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@@ -4,38 +4,30 @@ export const COLUMNS = [
|
|||||||
{
|
{
|
||||||
align: "left",
|
align: "left",
|
||||||
fixed: true,
|
fixed: true,
|
||||||
label: "金蝶仓库",
|
label: "仓库名称",
|
||||||
prop: "material_number",
|
prop: "warehouse_name"
|
||||||
width: 200
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "金蝶子仓库",
|
|
||||||
prop: "sku",
|
|
||||||
fixed: true,
|
fixed: true,
|
||||||
width: 200
|
label: "组织",
|
||||||
|
prop: "use_org_name"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "对应聚水潭仓库",
|
label: "仓库优先级",
|
||||||
prop: "material_name",
|
prop: "pos_picking_priority"
|
||||||
width: 200
|
|
||||||
},
|
|
||||||
{
|
|
||||||
align: "left",
|
|
||||||
label: "对应领星仓库",
|
|
||||||
prop: "org_name",
|
|
||||||
width: 200
|
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "更新人",
|
label: "更新人",
|
||||||
prop: "product_line"
|
prop: "operator_name"
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "更新时间",
|
label: "更新时间",
|
||||||
prop: "bar_code"
|
prop: "updated_at"
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
<ProTable
|
<ProTable
|
||||||
ref="proTableRef"
|
ref="proTableRef"
|
||||||
:columns="dataStore.columns"
|
:columns="dataStore.columns"
|
||||||
:request-api="getMaterialListApi"
|
:request-api="getGoodsListApi"
|
||||||
:init-param="dataStore.initParam"
|
:init-param="dataStore.initParam"
|
||||||
@selectionChange="selectionChange"
|
@selectionChange="selectionChange"
|
||||||
>
|
>
|
||||||
@@ -23,6 +23,11 @@
|
|||||||
:formData="dataStore.formData"
|
:formData="dataStore.formData"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
<template #warehouse_name="scope">
|
||||||
|
<a @click="handleOpen(scope.row)" class="break-word to-details">
|
||||||
|
{{ scope.row.warehouse_name }}
|
||||||
|
</a>
|
||||||
|
</template>
|
||||||
</ProTable>
|
</ProTable>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -31,7 +36,9 @@
|
|||||||
import ProTable from "@/components/ProTable/index.vue";
|
import ProTable from "@/components/ProTable/index.vue";
|
||||||
import SearchForm from "@/components/SearchForm/index.vue";
|
import SearchForm from "@/components/SearchForm/index.vue";
|
||||||
import PermissionButton from "@/components/PermissionButton/index.vue";
|
import PermissionButton from "@/components/PermissionButton/index.vue";
|
||||||
import { getMaterialListApi } from "@/api/modules/foundationMaterial";
|
import { getGoodsListApi } from "@/api/modules/setGoods";
|
||||||
|
import { useUserStore } from "@/stores/modules/user";
|
||||||
|
import $Bus from "@/utils/mittBus";
|
||||||
// import { useMsg } from "@/hooks/useMsg";
|
// import { useMsg } from "@/hooks/useMsg";
|
||||||
import { RULE_FORM, FORM_DATA, COLUMNS, BUTTON } from "./constant/list/index";
|
import { RULE_FORM, FORM_DATA, COLUMNS, BUTTON } from "./constant/list/index";
|
||||||
|
|
||||||
@@ -53,7 +60,13 @@ const dataStore = reactive<any>({
|
|||||||
dialogVisible: false, //弹窗
|
dialogVisible: false, //弹窗
|
||||||
selectionList: [] //选中表格的行
|
selectionList: [] //选中表格的行
|
||||||
});
|
});
|
||||||
|
const userStore = useUserStore();
|
||||||
|
const router = useRouter();
|
||||||
|
const init = () => {
|
||||||
|
//仓库赋值
|
||||||
|
dataStore.formData[0].options = userStore.warehouse;
|
||||||
|
};
|
||||||
|
init();
|
||||||
// 表格选择事件
|
// 表格选择事件
|
||||||
const selectionChange = (selection: any) => {
|
const selectionChange = (selection: any) => {
|
||||||
dataStore.selectionList = selection;
|
dataStore.selectionList = selection;
|
||||||
@@ -62,9 +75,15 @@ const selectionChange = (selection: any) => {
|
|||||||
// 顶部按钮点击事件
|
// 顶部按钮点击事件
|
||||||
const handleButtonClickCallback = (item: any) => {
|
const handleButtonClickCallback = (item: any) => {
|
||||||
console.log(item);
|
console.log(item);
|
||||||
$router.push({ path: "/foundation/set/goods/add" });
|
$router.push({ path: "/foundation/set/goods/add", query: { title: "新增仓位找货优先级" } });
|
||||||
|
};
|
||||||
|
//跳转详情
|
||||||
|
const handleOpen = (row: any) => {
|
||||||
|
router.push({
|
||||||
|
path: "/foundation/set/goods/add",
|
||||||
|
query: { id: row.id, title: "编辑仓位找货优先级" }
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
// 搜索
|
// 搜索
|
||||||
const handleSearch = async (params: any) => {
|
const handleSearch = async (params: any) => {
|
||||||
dataStore.initParam = cloneDeep(params);
|
dataStore.initParam = cloneDeep(params);
|
||||||
@@ -82,6 +101,13 @@ const handleReset = () => {
|
|||||||
proTableRef?.value!.getTableList();
|
proTableRef?.value!.getTableList();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
onMounted(() => {
|
||||||
|
$Bus.on("setGoodsResetList", () => {
|
||||||
|
nextTick(() => {
|
||||||
|
proTableRef?.value!.getTableList();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scope lang="scss">
|
<style scope lang="scss">
|
||||||
|
|||||||
47
src/views/foundation/set/goods/preview.vue
Normal file
47
src/views/foundation/set/goods/preview.vue
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
<template>
|
||||||
|
<div class="table-box">
|
||||||
|
<div>
|
||||||
|
<div style="padding-bottom: 16px">
|
||||||
|
<el-button type="primary" @click="handleBlack">返回</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="table-box card">
|
||||||
|
<div style="display: flex">
|
||||||
|
<el-table :data="dataStore.tableData" border style="width: 70%">
|
||||||
|
<el-table-column type="index" :index="indexMethod" label="序号" width="100" />
|
||||||
|
<el-table-column prop="position" label="仓位" />
|
||||||
|
<el-table-column prop="priority_item" label="匹配项" />
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts" name="foundationSetGoodsPreview">
|
||||||
|
import { getGoodsPreviewApi } from "@/api/modules/setGoods";
|
||||||
|
const $router = useRouter();
|
||||||
|
const route = useRoute();
|
||||||
|
const dataStore = reactive<any>({
|
||||||
|
tableData: []
|
||||||
|
});
|
||||||
|
const indexMethod = (index: number) => {
|
||||||
|
return index + 1;
|
||||||
|
};
|
||||||
|
//预览
|
||||||
|
const getGoodsPreview = async () => {
|
||||||
|
const result = await getGoodsPreviewApi(route.query.id);
|
||||||
|
if (result?.code === 0) {
|
||||||
|
dataStore.tableData = result?.data ? result?.data : [];
|
||||||
|
console.log(result?.data);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
getGoodsPreview();
|
||||||
|
const handleBlack = () => {
|
||||||
|
$router.push({
|
||||||
|
path: "/foundation/set/goods/add",
|
||||||
|
query: { id: route.query.id, title: route.query.name }
|
||||||
|
});
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped></style>
|
||||||
@@ -66,7 +66,6 @@ const selectionChange = (selection: any) => {
|
|||||||
};
|
};
|
||||||
const handleButtonClickCallback = (item: any) => {
|
const handleButtonClickCallback = (item: any) => {
|
||||||
const { type } = item;
|
const { type } = item;
|
||||||
|
|
||||||
btnClick[type]({
|
btnClick[type]({
|
||||||
selectionList: dataStore.selectionList,
|
selectionList: dataStore.selectionList,
|
||||||
proTableRef,
|
proTableRef,
|
||||||
|
|||||||
@@ -159,7 +159,7 @@ const getShopAccessSystem = async () => {
|
|||||||
const result = await getShopAccessSystemApi();
|
const result = await getShopAccessSystemApi();
|
||||||
if (result?.code === 0) {
|
if (result?.code === 0) {
|
||||||
let data = cloneDeep(result?.data);
|
let data = cloneDeep(result?.data);
|
||||||
let options = [];
|
let options: any = [];
|
||||||
|
|
||||||
data?.length &&
|
data?.length &&
|
||||||
data.forEach((item: any) => {
|
data.forEach((item: any) => {
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ export const DETAILS_FORM_DATA: any[] = [
|
|||||||
options: []
|
options: []
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: "kd_subwarehouse",
|
prop: "kd_subwarehouse_number",
|
||||||
placeholder: "请选择",
|
placeholder: "请选择",
|
||||||
type: "selectMultiples",
|
type: "selectMultiples",
|
||||||
label: "金蝶子仓库:",
|
label: "金蝶子仓库:",
|
||||||
|
|||||||
@@ -30,15 +30,16 @@ export const FORM_DATA: FormItem[] = [
|
|||||||
label: "金蝶仓库: ",
|
label: "金蝶仓库: ",
|
||||||
options: []
|
options: []
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
prop: "kd_subwarehouse",
|
prop: "kd_subwarehouse_number",
|
||||||
placeholder: "请输入金蝶子仓库",
|
placeholder: "请输入金蝶子仓库",
|
||||||
type: "selectRemoteKDSubwarehouse",
|
type: "selectRemoteKDSubwarehouse",
|
||||||
label: "金蝶子仓库: ",
|
label: "金蝶子仓库: ",
|
||||||
options: []
|
options: []
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: "operator_name",
|
prop: "operator",
|
||||||
placeholder: "请输入更新人",
|
placeholder: "请输入更新人",
|
||||||
type: "input",
|
type: "input",
|
||||||
label: "更新人: "
|
label: "更新人: "
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// import { RenderScope } from "@/components/ProTable/interface";
|
import { RenderScope } from "@/components/ProTable/interface";
|
||||||
export const COLUMNS = [
|
export const COLUMNS = [
|
||||||
{ type: "selection", fixed: "left", width: 40 },
|
{ type: "selection", fixed: "left", width: 40 },
|
||||||
{
|
{
|
||||||
@@ -18,9 +18,18 @@ export const COLUMNS = [
|
|||||||
{
|
{
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "金蝶子仓库",
|
label: "金蝶子仓库",
|
||||||
prop: "kd_subwarehouse",
|
prop: "kd_subwarehouse_number",
|
||||||
|
width: 400,
|
||||||
fixed: true,
|
fixed: true,
|
||||||
width: 200
|
render: (scope: RenderScope<any>): VNode | string | any => {
|
||||||
|
let arr: any = [];
|
||||||
|
if (Array.isArray(scope.row.kd_subwarehouse) && scope.row.kd_subwarehouse.length) {
|
||||||
|
scope.row.kd_subwarehouse?.forEach((item: any) => {
|
||||||
|
arr.push(item.subwarehouse_name);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return Array.isArray(arr) && arr.length ? arr.join(",") : "--";
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: "left",
|
align: "left",
|
||||||
@@ -34,15 +43,22 @@ export const COLUMNS = [
|
|||||||
prop: "lx_warehouse_name",
|
prop: "lx_warehouse_name",
|
||||||
width: 200
|
width: 200
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
align: "left",
|
||||||
|
label: "备注",
|
||||||
|
prop: "remark",
|
||||||
|
width: 200
|
||||||
|
},
|
||||||
{
|
{
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "更新人",
|
label: "更新人",
|
||||||
prop: "creator"
|
prop: "operator"
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
align: "left",
|
align: "left",
|
||||||
label: "更新时间",
|
label: "更新时间",
|
||||||
prop: "created_at"
|
prop: "updated_at",
|
||||||
|
width: 200
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -40,9 +40,10 @@
|
|||||||
@selectMultipleRemoveTag="handleSelectMultipleRemoveTag"
|
@selectMultipleRemoveTag="handleSelectMultipleRemoveTag"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
<template #platform_store_name="scope">
|
|
||||||
|
<template #kd_warehouse_name="scope">
|
||||||
<a @click="handleOpen(scope.row)" class="break-word to-details">
|
<a @click="handleOpen(scope.row)" class="break-word to-details">
|
||||||
{{ scope.row.platform_store_name }}
|
{{ scope.row.kd_warehouse_name }}
|
||||||
</a>
|
</a>
|
||||||
</template>
|
</template>
|
||||||
</ProTable>
|
</ProTable>
|
||||||
@@ -60,12 +61,15 @@ import {
|
|||||||
getWarehouseDelApi,
|
getWarehouseDelApi,
|
||||||
getWarehouseAddApi,
|
getWarehouseAddApi,
|
||||||
getWarehouseUpApi,
|
getWarehouseUpApi,
|
||||||
getWarehouseDetailsApi,
|
getWarehouseDetailsApi
|
||||||
getSetWarehouseKingdeeListApi,
|
|
||||||
getSetWarehouseSubwarehousesListApi,
|
|
||||||
getSetWarehouseSubwarehousesLingXingListApi,
|
|
||||||
getSetWarehouseSubwarehousesJushuitanListApi
|
|
||||||
} from "@/api/modules/setWarehouse";
|
} from "@/api/modules/setWarehouse";
|
||||||
|
|
||||||
|
import {
|
||||||
|
getWarehousesKingdeeListApi,
|
||||||
|
getSubwarehouseskingdeeListApi,
|
||||||
|
getWarehousesJushuitanListApi,
|
||||||
|
getWarehousesLingXingListApi
|
||||||
|
} from "@/api/modules/global";
|
||||||
import { useMsg } from "@/hooks/useMsg";
|
import { useMsg } from "@/hooks/useMsg";
|
||||||
import { RULE_FORM, FORM_DATA, COLUMNS, BUTTON } from "./constant/list/index";
|
import { RULE_FORM, FORM_DATA, COLUMNS, BUTTON } from "./constant/list/index";
|
||||||
import { DETAILS_RULE_FORM, DETAILS_FORM_DATA } from "./constant/list/details";
|
import { DETAILS_RULE_FORM, DETAILS_FORM_DATA } from "./constant/list/details";
|
||||||
@@ -156,14 +160,26 @@ const getWarehouseDetails = async (id: any) => {
|
|||||||
if (result?.code === 0) {
|
if (result?.code === 0) {
|
||||||
dataStore.dialogVisible = true;
|
dataStore.dialogVisible = true;
|
||||||
dataStore.title = "编辑金蝶子仓与各系统仓库关系";
|
dataStore.title = "编辑金蝶子仓与各系统仓库关系";
|
||||||
setAccessSystem(result?.data?.access_system);
|
|
||||||
dataStore.detailsRuleForm = result?.data;
|
dataStore.detailsRuleForm = result?.data;
|
||||||
|
//临时变量存储金蝶和金蝶子仓库
|
||||||
|
let kd_warehouse_number = dataStore?.detailsRuleForm?.kd_warehouse_number;
|
||||||
|
let kd_subwarehouse = dataStore?.detailsRuleForm?.kd_subwarehouse;
|
||||||
|
//判断金蝶仓库和金蝶子仓库是否存在
|
||||||
|
if (kd_warehouse_number && Array.isArray(kd_subwarehouse) && kd_subwarehouse.length) {
|
||||||
|
let kd_subwarehouse_number: any[] = [];
|
||||||
|
dataStore?.detailsRuleForm?.kd_subwarehouse?.forEach((item: any) => {
|
||||||
|
kd_subwarehouse_number.push(item.subwarehouse_number);
|
||||||
|
});
|
||||||
|
nextTick(() => {
|
||||||
|
dataStore.detailsRuleForm.kd_subwarehouse_number = kd_subwarehouse_number;
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
//获取金蝶仓库
|
//获取金蝶仓库
|
||||||
const getSetWarehouseKingdeeList = async () => {
|
const getSetWarehouseKingdeeList = async () => {
|
||||||
dataStore.detailsFormData[1].options = [];
|
dataStore.detailsFormData[1].options = [];
|
||||||
const result = await getSetWarehouseKingdeeListApi({ use_org_number: dataStore.detailsRuleForm.use_org_number });
|
const result = await getWarehousesKingdeeListApi({ use_org_number: dataStore.detailsRuleForm.use_org_number });
|
||||||
if (result?.code === 0) {
|
if (result?.code === 0) {
|
||||||
let options: any = [];
|
let options: any = [];
|
||||||
result?.data?.forEach((item: any) => {
|
result?.data?.forEach((item: any) => {
|
||||||
@@ -179,7 +195,7 @@ const getSetWarehouseKingdeeList = async () => {
|
|||||||
const getSetWarehouseSubwarehousesList = async () => {
|
const getSetWarehouseSubwarehousesList = async () => {
|
||||||
//先清空一下
|
//先清空一下
|
||||||
dataStore.detailsFormData[2].options = [];
|
dataStore.detailsFormData[2].options = [];
|
||||||
const result = await getSetWarehouseSubwarehousesListApi({
|
const result = await getSubwarehouseskingdeeListApi({
|
||||||
warehouse_number: dataStore.detailsRuleForm.kd_warehouse_number
|
warehouse_number: dataStore.detailsRuleForm.kd_warehouse_number
|
||||||
});
|
});
|
||||||
if (result?.code === 0) {
|
if (result?.code === 0) {
|
||||||
@@ -196,7 +212,7 @@ const getSetWarehouseSubwarehousesList = async () => {
|
|||||||
|
|
||||||
//获取领星仓库
|
//获取领星仓库
|
||||||
const getSetWarehouseSubwarehousesLingXingList = async () => {
|
const getSetWarehouseSubwarehousesLingXingList = async () => {
|
||||||
const result = await getSetWarehouseSubwarehousesLingXingListApi();
|
const result = await getWarehousesLingXingListApi();
|
||||||
if (result?.code === 0) {
|
if (result?.code === 0) {
|
||||||
let options: any = [];
|
let options: any = [];
|
||||||
result?.data?.forEach((item: any) => {
|
result?.data?.forEach((item: any) => {
|
||||||
@@ -210,7 +226,7 @@ const getSetWarehouseSubwarehousesLingXingList = async () => {
|
|||||||
};
|
};
|
||||||
//获取聚水潭仓库
|
//获取聚水潭仓库
|
||||||
const getSetWarehouseSubwarehousesJushuitanList = async () => {
|
const getSetWarehouseSubwarehousesJushuitanList = async () => {
|
||||||
const result = await getSetWarehouseSubwarehousesJushuitanListApi();
|
const result = await getWarehousesJushuitanListApi();
|
||||||
if (result?.code === 0) {
|
if (result?.code === 0) {
|
||||||
let options: any = [];
|
let options: any = [];
|
||||||
result?.data?.forEach((item: any) => {
|
result?.data?.forEach((item: any) => {
|
||||||
@@ -232,11 +248,11 @@ const handleOpen = (row: any) => {
|
|||||||
const handleButtonClickCallback = (item: any) => {
|
const handleButtonClickCallback = (item: any) => {
|
||||||
const { type } = item;
|
const { type } = item;
|
||||||
if (type === "del") {
|
if (type === "del") {
|
||||||
return handleDel();
|
handleDel();
|
||||||
}
|
|
||||||
if (type === "export") {
|
|
||||||
return handleExport();
|
|
||||||
}
|
}
|
||||||
|
// if (type === "export") {
|
||||||
|
// handleExport();
|
||||||
|
// }
|
||||||
if (type === "add") {
|
if (type === "add") {
|
||||||
dataStore.title = "新增金蝶子仓与各系统仓库关系";
|
dataStore.title = "新增金蝶子仓与各系统仓库关系";
|
||||||
dataStore.dialogVisible = true;
|
dataStore.dialogVisible = true;
|
||||||
@@ -259,9 +275,11 @@ const handleCommit = () => {
|
|||||||
return useMsg("warning", "金蝶仓库不能为空 !");
|
return useMsg("warning", "金蝶仓库不能为空 !");
|
||||||
}
|
}
|
||||||
//将金蝶子仓库转换为字符串
|
//将金蝶子仓库转换为字符串
|
||||||
let kd_subwarehouse = params.kd_subwarehouse;
|
let kd_subwarehouse_number = params.kd_subwarehouse_number;
|
||||||
if (Array.isArray(kd_subwarehouse) && kd_subwarehouse.length) {
|
if (Array.isArray(kd_subwarehouse_number) && kd_subwarehouse_number.length) {
|
||||||
params.kd_subwarehouse = kd_subwarehouse.join(",");
|
params.kd_subwarehouse_number = kd_subwarehouse_number.join(",");
|
||||||
|
} else {
|
||||||
|
delete params.kd_subwarehouse_number;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dataStore.title === "新增金蝶子仓与各系统仓库关系") {
|
if (dataStore.title === "新增金蝶子仓与各系统仓库关系") {
|
||||||
@@ -301,20 +319,6 @@ const handleSelectMultipleRemoveTag = (params: any) => {
|
|||||||
const { item } = params;
|
const { item } = params;
|
||||||
const { prop } = item;
|
const { prop } = item;
|
||||||
const paramValue = dataStore.initParam[prop]; // 获取当前参数值
|
const paramValue = dataStore.initParam[prop]; // 获取当前参数值
|
||||||
console.log(paramValue, "=============");
|
|
||||||
// // 核心:兼容多种参数类型,解析为「去重数组」(容错处理)
|
|
||||||
// let remainingValues: string[] = [];
|
|
||||||
// if (typeof paramValue === "string" && paramValue.trim()) {
|
|
||||||
// // 情况1:参数是有效字符串 → 分割为数组
|
|
||||||
// remainingValues = Array.from(new Set(paramValue.split(",").filter(val => val.trim())));
|
|
||||||
// } else if (Array.isArray(paramValue)) {
|
|
||||||
// // 情况2:参数是数组 → 直接去重
|
|
||||||
// remainingValues = Array.from(new Set(paramValue.filter(val => val && val.trim())));
|
|
||||||
// } else {
|
|
||||||
// // 情况3:参数是undefined/null/空值 → 空数组
|
|
||||||
// remainingValues = [];
|
|
||||||
// }
|
|
||||||
|
|
||||||
// 根据字段标识分发处理逻辑
|
// 根据字段标识分发处理逻辑
|
||||||
switch (prop) {
|
switch (prop) {
|
||||||
case "use_org_number":
|
case "use_org_number":
|
||||||
@@ -323,7 +327,7 @@ const handleSelectMultipleRemoveTag = (params: any) => {
|
|||||||
case "kd_warehouse_number":
|
case "kd_warehouse_number":
|
||||||
handleKdWarehouseTagRemove(paramValue);
|
handleKdWarehouseTagRemove(paramValue);
|
||||||
break;
|
break;
|
||||||
case "kd_subwarehouse":
|
case "kd_subwarehouse_number":
|
||||||
handleKdSubWarehouseTagRemove(paramValue);
|
handleKdSubWarehouseTagRemove(paramValue);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@@ -337,13 +341,13 @@ const handleSelectMultipleRemoveTag = (params: any) => {
|
|||||||
*/
|
*/
|
||||||
const handleOrgTagRemove = (remainingOrgValues: any[]) => {
|
const handleOrgTagRemove = (remainingOrgValues: any[]) => {
|
||||||
// 2. 筛选仓库:基于原始金蝶仓库数据,聚合所有剩余组织对应的仓库(去重)
|
// 2. 筛选仓库:基于原始金蝶仓库数据,聚合所有剩余组织对应的仓库(去重)
|
||||||
let filteredWarehouses = [];
|
let filteredWarehouses: any = [];
|
||||||
if (remainingOrgValues.length > 0) {
|
if (remainingOrgValues.length > 0) {
|
||||||
filteredWarehouses = dataStore.formData[1].options.filter(warehouse =>
|
filteredWarehouses = dataStore.formData[1].options.filter((warehouse: any) =>
|
||||||
remainingOrgValues.includes(warehouse.use_org_number)
|
remainingOrgValues.includes(warehouse.use_org_number)
|
||||||
);
|
);
|
||||||
// 去重:避免同一仓库被多个组织关联导致重复
|
// 去重:避免同一仓库被多个组织关联导致重复
|
||||||
filteredWarehouses = Array.from(new Map(filteredWarehouses.map(item => [item.value, item])).values());
|
filteredWarehouses = Array.from(new Map(filteredWarehouses.map((item: any) => [item.value, item])).values());
|
||||||
}
|
}
|
||||||
|
|
||||||
// 3. 重置仓库状态(清空已选+更新选项)
|
// 3. 重置仓库状态(清空已选+更新选项)
|
||||||
@@ -352,7 +356,7 @@ const handleOrgTagRemove = (remainingOrgValues: any[]) => {
|
|||||||
dataStore.formData[1].options = filteredWarehouses;
|
dataStore.formData[1].options = filteredWarehouses;
|
||||||
|
|
||||||
// 4. 重置子仓库状态(仓库变化后必须清空)
|
// 4. 重置子仓库状态(仓库变化后必须清空)
|
||||||
dataStore.initParam.kd_subwarehouse = "";
|
dataStore.initParam.kd_subwarehouse_number = "";
|
||||||
dataStore.formData[2].options = [];
|
dataStore.formData[2].options = [];
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -364,7 +368,7 @@ const handleKdWarehouseTagRemove = (remainingWarehouseValues: any[]) => {
|
|||||||
// 2. 筛选子仓库:基于原始金蝶子仓库数据,聚合所有剩余仓库对应的子仓库
|
// 2. 筛选子仓库:基于原始金蝶子仓库数据,聚合所有剩余仓库对应的子仓库
|
||||||
let filteredSubWarehouses = [];
|
let filteredSubWarehouses = [];
|
||||||
if (remainingWarehouseValues.length > 0) {
|
if (remainingWarehouseValues.length > 0) {
|
||||||
filteredSubWarehouses = dataStore.formData[2].options.filter(subWarehouse =>
|
filteredSubWarehouses = dataStore.formData[2].options.filter((subWarehouse: any) =>
|
||||||
remainingWarehouseValues.includes(subWarehouse.warehouse_number)
|
remainingWarehouseValues.includes(subWarehouse.warehouse_number)
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
@@ -373,7 +377,7 @@ const handleKdWarehouseTagRemove = (remainingWarehouseValues: any[]) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 3. 重置子仓库状态(清空已选+更新选项)
|
// 3. 重置子仓库状态(清空已选+更新选项)
|
||||||
dataStore.initParam.kd_subwarehouse = "";
|
dataStore.initParam.kd_subwarehouse_number = "";
|
||||||
dataStore.formData[2].options = [];
|
dataStore.formData[2].options = [];
|
||||||
dataStore.formData[2].options = filteredSubWarehouses;
|
dataStore.formData[2].options = filteredSubWarehouses;
|
||||||
};
|
};
|
||||||
@@ -391,8 +395,11 @@ watch(
|
|||||||
() => dataStore.dialogVisible,
|
() => dataStore.dialogVisible,
|
||||||
(newVal: any) => {
|
(newVal: any) => {
|
||||||
if (newVal) {
|
if (newVal) {
|
||||||
|
//金蝶倉庫
|
||||||
getSetWarehouseKingdeeList();
|
getSetWarehouseKingdeeList();
|
||||||
|
//领星仓库
|
||||||
getSetWarehouseSubwarehousesLingXingList();
|
getSetWarehouseSubwarehousesLingXingList();
|
||||||
|
//聚水潭仓库
|
||||||
getSetWarehouseSubwarehousesJushuitanList();
|
getSetWarehouseSubwarehousesJushuitanList();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -406,11 +413,13 @@ watch(
|
|||||||
(newVal: any) => {
|
(newVal: any) => {
|
||||||
if (newVal) {
|
if (newVal) {
|
||||||
dataStore.detailsRuleForm.kd_warehouse_number = "";
|
dataStore.detailsRuleForm.kd_warehouse_number = "";
|
||||||
dataStore.detailsRuleForm.kd_subwarehouse = "";
|
dataStore.detailsRuleForm.kd_subwarehouse_number = "";
|
||||||
getSetWarehouseKingdeeList();
|
getSetWarehouseKingdeeList();
|
||||||
} else {
|
} else {
|
||||||
dataStore.detailsRuleForm.kd_warehouse_number = "";
|
dataStore.detailsRuleForm.kd_warehouse_number = "";
|
||||||
dataStore.detailsRuleForm.kd_subwarehouse = "";
|
dataStore.detailsRuleForm.kd_subwarehouse_number = "";
|
||||||
|
dataStore.detailsFormData[1].options = [];
|
||||||
|
dataStore.detailsFormData[2].options = [];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
@@ -419,10 +428,11 @@ watch(
|
|||||||
() => dataStore.detailsRuleForm.kd_warehouse_number,
|
() => dataStore.detailsRuleForm.kd_warehouse_number,
|
||||||
(newVal: any) => {
|
(newVal: any) => {
|
||||||
if (newVal) {
|
if (newVal) {
|
||||||
dataStore.detailsRuleForm.kd_subwarehouse = "";
|
dataStore.detailsRuleForm.kd_subwarehouse_number = "";
|
||||||
getSetWarehouseSubwarehousesList();
|
getSetWarehouseSubwarehousesList();
|
||||||
} else {
|
} else {
|
||||||
dataStore.detailsRuleForm.kd_subwarehouse = "";
|
dataStore.detailsRuleForm.kd_subwarehouse_number = "";
|
||||||
|
dataStore.detailsFormData[2].options = [];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -6,11 +6,11 @@
|
|||||||
|
|
||||||
<script setup lang="ts" name="home">
|
<script setup lang="ts" name="home">
|
||||||
//登录请求接口
|
//登录请求接口
|
||||||
// import { getOrgsApi, getWarehousesListApi } from "@/api/modules/global";
|
import { getWarehousesListApi } from "@/api/modules/global";
|
||||||
import { useRoute, useRouter } from "vue-router";
|
import { useRoute, useRouter } from "vue-router";
|
||||||
//用户信息存储
|
//用户信息存储
|
||||||
// import { useUserStore } from "@/stores/modules/user";
|
import { useUserStore } from "@/stores/modules/user";
|
||||||
// const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
//路由;
|
//路由;
|
||||||
const $route = useRoute();
|
const $route = useRoute();
|
||||||
const $router = useRouter();
|
const $router = useRouter();
|
||||||
@@ -33,24 +33,24 @@ const $router = useRouter();
|
|||||||
// }
|
// }
|
||||||
// };
|
// };
|
||||||
// getOrgs();
|
// getOrgs();
|
||||||
// const getWarehousesList = async () => {
|
const getWarehousesList = async () => {
|
||||||
// const result = await getWarehousesListApi();
|
const result = await getWarehousesListApi();
|
||||||
// if (result?.code === 0) {
|
if (result?.code === 0) {
|
||||||
// const { data } = result;
|
const { data } = result;
|
||||||
// if (data?.length) {
|
if (data?.length) {
|
||||||
// let options: any = [];
|
let options: any = [];
|
||||||
// data.forEach((item: any) => {
|
data.forEach((item: any) => {
|
||||||
// options.push({
|
options.push({
|
||||||
// id: item.id,
|
id: item.id,
|
||||||
// value: item.warehouse_name,
|
value: item.warehouse_number,
|
||||||
// label: item.warehouse_name
|
label: item.warehouse_name
|
||||||
// });
|
});
|
||||||
// });
|
});
|
||||||
// userStore.setWarehouse(options);
|
userStore.setWarehouse(options);
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// };
|
};
|
||||||
// getWarehousesList();
|
getWarehousesList();
|
||||||
|
|
||||||
const init = () => {
|
const init = () => {
|
||||||
let redirect_path: any = $route.query.redirect_path;
|
let redirect_path: any = $route.query.redirect_path;
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ const getOrgs = async () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const getWarehousesList = async () => {
|
const getWarehousesList = async () => {
|
||||||
const result = await getWarehousesListApi();
|
const result = await getWarehousesListApi({});
|
||||||
if (result?.code === 0) {
|
if (result?.code === 0) {
|
||||||
const { data } = result;
|
const { data } = result;
|
||||||
if (data?.length) {
|
if (data?.length) {
|
||||||
|
|||||||
367
vite.config.ts.timestamp-1762736569869-1de5e357445ba.mjs
Normal file
367
vite.config.ts.timestamp-1762736569869-1de5e357445ba.mjs
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user