Compare commits
7 Commits
dev-V01.00
...
dev-收货单
| Author | SHA1 | Date | |
|---|---|---|---|
| fae9b61e7d | |||
| f4274d2fb3 | |||
| e908048997 | |||
| e79c096e12 | |||
| 4168871fd4 | |||
| 335b9a9b2d | |||
| 2b2e6fc401 |
@@ -4,15 +4,15 @@ import http from "@/api";
|
|||||||
* @name 全局模块(在公司下面的数据)
|
* @name 全局模块(在公司下面的数据)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//质检单列表
|
//质检单列表 /admapi/inspection
|
||||||
export const getQualityInspectListApi = (params: any) => {
|
export const getQualityInspectListApi = (params: any) => {
|
||||||
return http.get<any>(`quality_inspect`, params);
|
return http.get<any>(`inspection`, params);
|
||||||
};
|
};
|
||||||
//刷新 /admapi/quality_inspect/reload
|
//刷新 /admapi/quality_inspect/reload
|
||||||
export const getQualityInspectReloadApi = (params: any) => {
|
export const getQualityInspectReloadApi = (params: any) => {
|
||||||
return http.get<any>(`quality_inspect/reload`, params);
|
return http.get<any>(`inspection/reload`, params);
|
||||||
};
|
};
|
||||||
//导出
|
//导出
|
||||||
export const getQualityInspectExportApi = (params: any) => {
|
export const getQualityInspectExportApi = (params: any) => {
|
||||||
return http.get<any>(`quality_inspect/export`, params);
|
return http.get<any>(`inspection/export`, params);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<div v-if="formData.length" class="table-search" style="display: flex">
|
<div v-if="_formData.length" class="table-search" style="display: flex">
|
||||||
<div style="flex: 2">
|
<div style="flex: 2">
|
||||||
<el-form ref="formRef" :model="_searchParams" :inline="true">
|
<el-form ref="formRef" :model="_searchParams" :inline="true">
|
||||||
<template v-for="item in formData" :key="item.prop">
|
<template v-for="item in _formData" :key="item.prop">
|
||||||
<el-form-item
|
<el-form-item
|
||||||
:prop="item.prop"
|
:prop="item.prop"
|
||||||
:label-width="item.labelWidth ? item.labelWidth : '120px'"
|
:label-width="item.labelWidth ? item.labelWidth : '120px'"
|
||||||
@@ -115,7 +115,7 @@
|
|||||||
}
|
}
|
||||||
"
|
"
|
||||||
:disabled="item.disabled"
|
:disabled="item.disabled"
|
||||||
style="width: 224px"
|
style="width: 224px; max-height: 80px; overflow-y: auto"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
:label="option.label"
|
:label="option.label"
|
||||||
@@ -136,7 +136,7 @@
|
|||||||
:placeholder="item.placeholder"
|
:placeholder="item.placeholder"
|
||||||
class="m-2 select"
|
class="m-2 select"
|
||||||
:reserve-keyword="false"
|
:reserve-keyword="false"
|
||||||
style="width: 224px"
|
style="width: 224px; max-height: 80px; overflow-y: auto"
|
||||||
@remove-tag="handleTagRemove1(item)"
|
@remove-tag="handleTagRemove1(item)"
|
||||||
ref="remoteRef"
|
ref="remoteRef"
|
||||||
>
|
>
|
||||||
@@ -171,6 +171,23 @@
|
|||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<!-- <template v-if="item.type === 'inputBtn'">
|
||||||
|
<el-input
|
||||||
|
:placeholder="item.placeholder"
|
||||||
|
:maxlength="item.maxlength || 255"
|
||||||
|
v-model.trim="_searchParams[`${item.prop}`]"
|
||||||
|
style="width: 224px"
|
||||||
|
@input="handleInput(item)"
|
||||||
|
@keyup.enter="handleFormSearch"
|
||||||
|
clearable
|
||||||
|
@clear="handleEmitClear(item)"
|
||||||
|
>
|
||||||
|
<template #append>
|
||||||
|
<div @click="handleClick(item)" style="cursor: pointer">...</div>
|
||||||
|
</template>
|
||||||
|
</el-input>
|
||||||
|
</template> -->
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
</el-form>
|
</el-form>
|
||||||
@@ -190,8 +207,7 @@ import {
|
|||||||
getWarehousesKingdeeListApi,
|
getWarehousesKingdeeListApi,
|
||||||
getSubwarehouseskingdeeListApi
|
getSubwarehouseskingdeeListApi
|
||||||
} from "@/api/modules/global";
|
} 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>;
|
||||||
@@ -203,13 +219,16 @@ const emits = defineEmits<{
|
|||||||
(e: "reset", result: Record<string, any>): void;
|
(e: "reset", result: Record<string, any>): void;
|
||||||
(e: "selectMultipleRemoveTag", result: Record<string, any>): void;
|
(e: "selectMultipleRemoveTag", result: Record<string, any>): void;
|
||||||
}>();
|
}>();
|
||||||
|
const $router = useRouter();
|
||||||
|
const routeName: any = ref($router.currentRoute.value.name);
|
||||||
let loading = ref(false);
|
let loading = ref(false);
|
||||||
const remoteRef = ref(null);
|
const remoteRef = ref(null);
|
||||||
const _searchParams: any = computed(() => {
|
const _searchParams: any = computed(() => {
|
||||||
return props.searchParams;
|
return props.searchParams;
|
||||||
});
|
});
|
||||||
|
const _formData: any = computed(() => {
|
||||||
|
return props.formData;
|
||||||
|
});
|
||||||
//日期选择后重选赋值
|
//日期选择后重选赋值
|
||||||
const handlePicker = (item: any) => {
|
const handlePicker = (item: any) => {
|
||||||
const { prop } = item;
|
const { prop } = item;
|
||||||
@@ -274,15 +293,15 @@ const getProductLines = async (keywords: any, item: any) => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
//金蝶仓库
|
//金蝶仓库 keywords: any, item: any
|
||||||
const getSetWarehouseKingdeeList = async (keywords: any, item: any) => {
|
const getSetWarehouseKingdeeList = async () => {
|
||||||
const useOrgNumber: any[] = _searchParams?.value?.use_org_number;
|
const useOrgNumber: any[] = _searchParams?.value?.use_org_number;
|
||||||
if (Array.isArray(useOrgNumber) && useOrgNumber?.length > 0) {
|
if (Array.isArray(useOrgNumber) && useOrgNumber?.length > 0) {
|
||||||
item.options = [];
|
_formData.value[1].options = [];
|
||||||
let use_org_number = "";
|
let use_org_number = "";
|
||||||
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 getWarehousesKingdeeListApi({
|
||||||
keywords: keywords,
|
// keywords: keywords,
|
||||||
use_org_number
|
use_org_number
|
||||||
});
|
});
|
||||||
if (result?.code === 0) {
|
if (result?.code === 0) {
|
||||||
@@ -290,36 +309,40 @@ const getSetWarehouseKingdeeList = async (keywords: any, item: any) => {
|
|||||||
result?.data?.forEach((it: any) => {
|
result?.data?.forEach((it: any) => {
|
||||||
options.push({
|
options.push({
|
||||||
label: it.warehouse_name,
|
label: it.warehouse_name,
|
||||||
value: it.warehouse_number,
|
value: it.warehouse_number + "_" + it.use_org_number,
|
||||||
use_org_number: it.use_org_number
|
use_org_number: it.use_org_number
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
item.options = options;
|
_formData.value[1].options = options;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
//获取金蝶子仓库
|
//获取金蝶子仓库
|
||||||
const getSetWarehouseSubwarehousesList = async (keywords: any, item: any) => {
|
const getSetWarehouseSubwarehousesList = async () => {
|
||||||
const kdWarehouseNumber: any[] = _searchParams?.value?.kd_warehouse_number;
|
const kdWarehouseNumber: any[] = _searchParams?.value?.kd_warehouse_number;
|
||||||
if (Array.isArray(kdWarehouseNumber) && kdWarehouseNumber?.length > 0) {
|
if (Array.isArray(kdWarehouseNumber) && kdWarehouseNumber?.length > 0) {
|
||||||
//先清空一下
|
//先清空一下
|
||||||
item.options = [];
|
_formData.value[2].options = [];
|
||||||
let kd_warehouse_number = "";
|
let kd_warehouse_number_str = "";
|
||||||
kd_warehouse_number = _searchParams.value.kd_warehouse_number.join(",");
|
let kd_warehouse_number: any = [];
|
||||||
|
_searchParams.value.kd_warehouse_number.forEach((it: any) => {
|
||||||
|
kd_warehouse_number.push(it.split("_")[0]);
|
||||||
|
});
|
||||||
|
|
||||||
|
kd_warehouse_number_str = kd_warehouse_number.join(",");
|
||||||
const result = await getSubwarehouseskingdeeListApi({
|
const result = await getSubwarehouseskingdeeListApi({
|
||||||
keywords,
|
warehouse_number: kd_warehouse_number_str
|
||||||
warehouse_number: kd_warehouse_number
|
|
||||||
});
|
});
|
||||||
if (result?.code === 0) {
|
if (result?.code === 0) {
|
||||||
let options: any = [];
|
let options: any = [];
|
||||||
result?.data?.forEach((it: any) => {
|
result?.data?.forEach((it: any) => {
|
||||||
options.push({
|
options.push({
|
||||||
label: it.sub_warehouse_name,
|
label: it.sub_warehouse_name,
|
||||||
value: it.sub_warehouse_number,
|
value: it.sub_warehouse_number + "_" + it.warehouse_number,
|
||||||
warehouse_number: it.warehouse_number
|
warehouse_number: it.warehouse_number
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
item.options = options;
|
_formData.value[2].options = options;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -345,11 +368,8 @@ const handleSelectMultipleRemote = async (query: any, item: any) => {
|
|||||||
} else if (item.type === "selectProductLinesRemote") {
|
} else if (item.type === "selectProductLinesRemote") {
|
||||||
//品线
|
//品线
|
||||||
getProductLines(valClone, item);
|
getProductLines(valClone, item);
|
||||||
} else if (item.type === "selectRemoteKD") {
|
|
||||||
getSetWarehouseKingdeeList(valClone, item);
|
|
||||||
} else if (item.type === "selectRemoteKDSubwarehouse") {
|
|
||||||
getSetWarehouseSubwarehousesList(valClone, item);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
};
|
};
|
||||||
const handleTagRemove = (item: any) => {
|
const handleTagRemove = (item: any) => {
|
||||||
@@ -408,6 +428,78 @@ const handleFormSearch = () => {
|
|||||||
const handleFormReset = () => {
|
const handleFormReset = () => {
|
||||||
emits("reset", _searchParams.value);
|
emits("reset", _searchParams.value);
|
||||||
};
|
};
|
||||||
|
// 核心逻辑:根据下划线后的值匹配,保留成功项
|
||||||
|
const filterBySuffixMatch = (targetArr: any, sourceArr: any) => {
|
||||||
|
// 遍历待筛选数组,筛选出符合条件的项
|
||||||
|
const matchedResult = sourceArr.filter((item: any) => {
|
||||||
|
// 分割下划线,获取后半部分(如 "THXLC_101" → "101")
|
||||||
|
const suffix = item.split("_")[1];
|
||||||
|
// 判断后缀是否存在于目标数组中
|
||||||
|
return targetArr.includes(suffix);
|
||||||
|
});
|
||||||
|
return matchedResult;
|
||||||
|
};
|
||||||
|
// 核心逻辑:按规则对比,保留匹配项
|
||||||
|
const filterMatchedItems = (upperArr: any, lowerArr: any) => {
|
||||||
|
// 第一步:处理上方数组,提取所有「下划线前的部分」,组成匹配池
|
||||||
|
const matchPool = upperArr.map((item: any) => item.split("_")[0]);
|
||||||
|
|
||||||
|
// 第二步:遍历下方数组,筛选匹配项
|
||||||
|
const matchedResult = lowerArr.filter((item: any) => {
|
||||||
|
// 提取下方数组元素「下划线后的部分」
|
||||||
|
const lowerSuffix = item.split("_")[1];
|
||||||
|
// 判断是否在匹配池中(同时处理无下划线的情况)
|
||||||
|
return lowerSuffix && matchPool.includes(lowerSuffix);
|
||||||
|
});
|
||||||
|
|
||||||
|
return matchedResult;
|
||||||
|
};
|
||||||
|
watch(
|
||||||
|
() => _searchParams?.value?.use_org_number,
|
||||||
|
newVal => {
|
||||||
|
if (routeName.value === "foundationSetWarehouse") {
|
||||||
|
if (!newVal || !newVal.length) {
|
||||||
|
_searchParams.value.kd_warehouse_number = "";
|
||||||
|
_searchParams.value.kd_subwarehouse_number = "";
|
||||||
|
_formData.value[1].options = [];
|
||||||
|
_formData.value[2].options = [];
|
||||||
|
}
|
||||||
|
getSetWarehouseKingdeeList();
|
||||||
|
if (!_searchParams?.value?.kd_warehouse_number || !_searchParams?.value?.kd_warehouse_number.length) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
let kd_warehouse_number = filterBySuffixMatch(newVal, _searchParams?.value?.kd_warehouse_number);
|
||||||
|
_searchParams.value.kd_warehouse_number = kd_warehouse_number;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
deep: true,
|
||||||
|
immediate: true
|
||||||
|
}
|
||||||
|
);
|
||||||
|
watch(
|
||||||
|
() => _searchParams?.value?.kd_warehouse_number,
|
||||||
|
newVal => {
|
||||||
|
if (routeName.value === "foundationSetWarehouse") {
|
||||||
|
if (!newVal || !newVal.length) {
|
||||||
|
_searchParams.value.kd_subwarehouse_number = "";
|
||||||
|
_formData.value[2].options = [];
|
||||||
|
}
|
||||||
|
getSetWarehouseSubwarehousesList();
|
||||||
|
if (!_searchParams?.value?.kd_subwarehouse_number || !_searchParams?.value?.kd_subwarehouse_number.length) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
let kd_subwarehouse_number = filterMatchedItems(newVal, _searchParams?.value?.kd_subwarehouse_number);
|
||||||
|
console.log(kd_subwarehouse_number, "=kd_subwarehouse_number=");
|
||||||
|
_searchParams.value.kd_subwarehouse_number = kd_subwarehouse_number;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
deep: true,
|
||||||
|
immediate: true
|
||||||
|
}
|
||||||
|
);
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scope>
|
<style lang="scss" scope>
|
||||||
@use "./index.scss";
|
@use "./index.scss";
|
||||||
|
|||||||
@@ -70,11 +70,19 @@ export const useTable = (
|
|||||||
}
|
}
|
||||||
//金蝶仓库
|
//金蝶仓库
|
||||||
if (Array.isArray(state.totalParam?.kd_warehouse_number) && state.totalParam?.kd_warehouse_number?.length) {
|
if (Array.isArray(state.totalParam?.kd_warehouse_number) && state.totalParam?.kd_warehouse_number?.length) {
|
||||||
state.totalParam.kd_warehouse_number = state.totalParam.kd_warehouse_number.join(",");
|
let kd_warehouse_number: any[] = [];
|
||||||
|
state.totalParam.kd_warehouse_number.forEach((item: any) => {
|
||||||
|
kd_warehouse_number.push(item.split("_")[0]);
|
||||||
|
});
|
||||||
|
state.totalParam.kd_warehouse_number = kd_warehouse_number.join(",");
|
||||||
}
|
}
|
||||||
//金蝶子仓库
|
//金蝶子仓库
|
||||||
if (Array.isArray(state.totalParam?.kd_subwarehouse_number) && state.totalParam?.kd_subwarehouse_number?.length) {
|
if (Array.isArray(state.totalParam?.kd_subwarehouse_number) && state.totalParam?.kd_subwarehouse_number?.length) {
|
||||||
state.totalParam.kd_subwarehouse_number = state.totalParam.kd_subwarehouse_number.join(",");
|
let kd_subwarehouse_number: any[] = [];
|
||||||
|
state.totalParam.kd_subwarehouse_number.forEach((item: any) => {
|
||||||
|
kd_subwarehouse_number.push(item.split("_")[0]);
|
||||||
|
});
|
||||||
|
state.totalParam.kd_subwarehouse_number = kd_subwarehouse_number.join(",");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
10
src/main.ts
10
src/main.ts
@@ -32,6 +32,16 @@ import pinia from "@/stores";
|
|||||||
import errorHandler from "@/utils/errorHandler";
|
import errorHandler from "@/utils/errorHandler";
|
||||||
import VXETable from "vxe-table";
|
import VXETable from "vxe-table";
|
||||||
import "vxe-table/lib/style.css";
|
import "vxe-table/lib/style.css";
|
||||||
|
|
||||||
|
// 全局添加 ElMessage 的高层级样式(不用再单独写 CSS 文件)
|
||||||
|
const style = document.createElement("style");
|
||||||
|
style.textContent = `
|
||||||
|
.el-message {
|
||||||
|
z-index: 3000 !important;
|
||||||
|
}
|
||||||
|
`;
|
||||||
|
document.head.appendChild(style);
|
||||||
|
|
||||||
localStorage.setItem("baseUrl", import.meta.env.VITE_SINGLE_URL);
|
localStorage.setItem("baseUrl", import.meta.env.VITE_SINGLE_URL);
|
||||||
|
|
||||||
const app = createApp(App);
|
const app = createApp(App);
|
||||||
|
|||||||
@@ -268,6 +268,3 @@
|
|||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
.el-message {
|
|
||||||
z-index: 888;
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ const dataStore = reactive<any>({
|
|||||||
labelWidth: "120px",
|
labelWidth: "120px",
|
||||||
formData: cloneDeep(DETAILS_FORM_DATA),
|
formData: cloneDeep(DETAILS_FORM_DATA),
|
||||||
ruleForm: cloneDeep(DETAILS_RULE_FORM),
|
ruleForm: cloneDeep(DETAILS_RULE_FORM),
|
||||||
|
compareRuleForm: {},
|
||||||
id: null,
|
id: null,
|
||||||
title: ""
|
title: ""
|
||||||
});
|
});
|
||||||
@@ -68,6 +69,8 @@ const getGoodsUp = async () => {
|
|||||||
if (result?.code === 0) {
|
if (result?.code === 0) {
|
||||||
useMsg("success", "更新成功 !");
|
useMsg("success", "更新成功 !");
|
||||||
$Bus.emit("setGoodsResetList");
|
$Bus.emit("setGoodsResetList");
|
||||||
|
//更新成功以后调用详情接口是为了刷新对比数据防止对比数据不一致
|
||||||
|
getGoodsDetails();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
//详情
|
//详情
|
||||||
@@ -80,6 +83,7 @@ const getGoodsDetails = async () => {
|
|||||||
const result = await getGoodsDetailsApi(dataStore.id);
|
const result = await getGoodsDetailsApi(dataStore.id);
|
||||||
if (result?.code === 0) {
|
if (result?.code === 0) {
|
||||||
dataStore.ruleForm = result?.data;
|
dataStore.ruleForm = result?.data;
|
||||||
|
dataStore.compareRuleForm = cloneDeep(result?.data);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
getGoodsDetails();
|
getGoodsDetails();
|
||||||
@@ -110,9 +114,26 @@ const handleButtonClickCallback = (item: any) => {
|
|||||||
dataStore.title === "新增仓位找货优先级" ? handleAdd() : getGoodsUp();
|
dataStore.title === "新增仓位找货优先级" ? handleAdd() : getGoodsUp();
|
||||||
}
|
}
|
||||||
if (type === "preview") {
|
if (type === "preview") {
|
||||||
if (!dataStore.id) {
|
if (!dataStore.id && dataStore.title === "新增仓位找货优先级") {
|
||||||
useMsg("warning", "请先保存数据 !");
|
useMsg("warning", "请先保存数据 !");
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
// 编辑的话需要判断用户是否有修改
|
||||||
|
if (dataStore.title === "编辑仓位找货优先级") {
|
||||||
|
if (dataStore.compareRuleForm.use_org_number !== dataStore.ruleForm.use_org_number) {
|
||||||
|
useMsg("warning", "请先保存数据 !");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (dataStore.compareRuleForm.warehouse_number !== dataStore.ruleForm.warehouse_number) {
|
||||||
|
useMsg("warning", "请先保存数据 !");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (dataStore.compareRuleForm.pos_picking_priority !== dataStore.ruleForm.pos_picking_priority) {
|
||||||
|
useMsg("warning", "请先保存数据 !");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$router.push({
|
$router.push({
|
||||||
path: "/foundation/set/goods/preview",
|
path: "/foundation/set/goods/preview",
|
||||||
query: { id: dataStore.id, name: dataStore.title }
|
query: { id: dataStore.id, name: dataStore.title }
|
||||||
@@ -124,6 +145,30 @@ const handleButtonClickCallback = (item: any) => {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//去重
|
||||||
|
const uniqueArrayObject = (arr: any[], uniqueKey: any = "value") => {
|
||||||
|
// 边界处理:如果传入的不是数组,直接返回空数组
|
||||||
|
if (!Array.isArray(arr)) {
|
||||||
|
console.warn("传入的参数不是数组,返回空数组");
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
// 方法1:Map 实现(高效,保留顺序)
|
||||||
|
const uniqueMap = new Map();
|
||||||
|
arr.forEach(item => {
|
||||||
|
// 确保对象存在该字段,避免报错
|
||||||
|
if (item.hasOwnProperty(uniqueKey)) {
|
||||||
|
// 以 uniqueKey 的值为键,重复键会自动覆盖(保留最后一次出现?不,forEach 顺序遍历,后出现的会覆盖前面的,如需保留首次出现,用下面的逻辑)
|
||||||
|
// 如需保留首次出现:只有 Map 中没有该键时才添加
|
||||||
|
if (!uniqueMap.has(item[uniqueKey])) {
|
||||||
|
uniqueMap.set(item[uniqueKey], item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
// 转换为数组返回
|
||||||
|
return Array.from(uniqueMap.values());
|
||||||
|
};
|
||||||
|
|
||||||
//仓库列表 /foundation/set/goods/preview
|
//仓库列表 /foundation/set/goods/preview
|
||||||
const getWarehousesList = async () => {
|
const getWarehousesList = async () => {
|
||||||
const result = await getWarehousesListApi({ use_org_number: dataStore.ruleForm.use_org_number });
|
const result = await getWarehousesListApi({ use_org_number: dataStore.ruleForm.use_org_number });
|
||||||
@@ -133,26 +178,44 @@ const getWarehousesList = async () => {
|
|||||||
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_number,
|
value: item.warehouse_number,
|
||||||
label: item.warehouse_name
|
label: item.warehouse_name
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
dataStore.formData[1].options = options;
|
dataStore.formData[1].options = options;
|
||||||
|
if (dataStore.ruleForm.warehouse_name) {
|
||||||
|
dataStore.formData[1].options.push({
|
||||||
|
value: dataStore.ruleForm.warehouse_number,
|
||||||
|
label: dataStore.ruleForm.warehouse_name
|
||||||
|
});
|
||||||
|
|
||||||
|
dataStore.formData[1].options = uniqueArrayObject(dataStore.formData[1].options);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
dataStore.formData[1].options = [];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const handleChange = (item: any) => {
|
const handleChange = (item: any) => {
|
||||||
console.log(item);
|
console.log(item);
|
||||||
|
if (item.prop === "warehouse_number") {
|
||||||
|
if (!dataStore.ruleForm.use_org_number || !dataStore.ruleForm.warehouse_number) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
getGoodsCheckExistsw();
|
getGoodsCheckExistsw();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
//监听当前组织
|
//监听当前组织
|
||||||
watch(
|
watch(
|
||||||
() => dataStore.ruleForm.use_org_number,
|
() => dataStore.ruleForm.use_org_number,
|
||||||
(newVal: any) => {
|
(newVal: any) => {
|
||||||
if (newVal) {
|
if (!newVal) {
|
||||||
getWarehousesList();
|
dataStore.ruleForm.warehouse_number = "";
|
||||||
|
dataStore.formData[1].options = [];
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
getWarehousesList();
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
deep: true,
|
deep: true,
|
||||||
|
|||||||
@@ -37,10 +37,17 @@ const getGoodsPreview = async () => {
|
|||||||
};
|
};
|
||||||
getGoodsPreview();
|
getGoodsPreview();
|
||||||
const handleBlack = () => {
|
const handleBlack = () => {
|
||||||
|
if (route.query.name === "新增仓位找货优先级") {
|
||||||
|
$router.push({
|
||||||
|
path: "/foundation/set/goods/add",
|
||||||
|
query: { title: route.query.name }
|
||||||
|
});
|
||||||
|
} else {
|
||||||
$router.push({
|
$router.push({
|
||||||
path: "/foundation/set/goods/add",
|
path: "/foundation/set/goods/add",
|
||||||
query: { id: route.query.id, title: route.query.name }
|
query: { id: route.query.id, title: route.query.name }
|
||||||
});
|
});
|
||||||
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -124,6 +124,9 @@ const getShopAdd = async () => {
|
|||||||
useMsg("success", "新增成功 !");
|
useMsg("success", "新增成功 !");
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
dataStore.dialogVisible = false;
|
dataStore.dialogVisible = false;
|
||||||
|
detailsRef?.value?.formElement?.resetFields();
|
||||||
|
dataStore.detailsRuleForm = cloneDeep(DETAILS_RULE_FORM);
|
||||||
|
dataStore.detailsFormData = cloneDeep(DETAILS_FORM_DATA);
|
||||||
proTableRef?.value!.getTableList();
|
proTableRef?.value!.getTableList();
|
||||||
}, 600);
|
}, 600);
|
||||||
}
|
}
|
||||||
@@ -135,6 +138,9 @@ const getShopUp = async () => {
|
|||||||
useMsg("success", "更新成功 !");
|
useMsg("success", "更新成功 !");
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
dataStore.dialogVisible = false;
|
dataStore.dialogVisible = false;
|
||||||
|
detailsRef?.value?.formElement?.resetFields();
|
||||||
|
dataStore.detailsRuleForm = cloneDeep(DETAILS_RULE_FORM);
|
||||||
|
dataStore.detailsFormData = cloneDeep(DETAILS_FORM_DATA);
|
||||||
proTableRef?.value!.getTableList();
|
proTableRef?.value!.getTableList();
|
||||||
}, 600);
|
}, 600);
|
||||||
}
|
}
|
||||||
@@ -150,9 +156,10 @@ const getShopDetails = async (id: any) => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
// 表格row点击事件
|
// 表格row点击事件
|
||||||
const handleOpen = (row: any) => {
|
const handleOpen = async (row: any) => {
|
||||||
dataStore.rowId = row.id;
|
dataStore.rowId = row.id;
|
||||||
getShopDetails(row.id);
|
await getShopAccessSystem();
|
||||||
|
await getShopDetails(row.id);
|
||||||
};
|
};
|
||||||
// 獲取接入系統列表數據
|
// 獲取接入系統列表數據
|
||||||
const getShopAccessSystem = async () => {
|
const getShopAccessSystem = async () => {
|
||||||
@@ -169,7 +176,7 @@ const getShopAccessSystem = async () => {
|
|||||||
dataStore.detailsFormData[2].options = options;
|
dataStore.detailsFormData[2].options = options;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
getShopAccessSystem();
|
|
||||||
// 导出
|
// 导出
|
||||||
const handleExport = async () => {
|
const handleExport = async () => {
|
||||||
const result = await getShopListExportApi(dataStore.initParam);
|
const result = await getShopListExportApi(dataStore.initParam);
|
||||||
@@ -189,11 +196,13 @@ const handleButtonClickCallback = (item: any) => {
|
|||||||
if (type === "add") {
|
if (type === "add") {
|
||||||
dataStore.title = "新增店铺";
|
dataStore.title = "新增店铺";
|
||||||
dataStore.dialogVisible = true;
|
dataStore.dialogVisible = true;
|
||||||
|
getShopAccessSystem();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
// 弹窗取消
|
// 弹窗取消
|
||||||
const handleClose = () => {
|
const handleClose = () => {
|
||||||
dataStore.detailsRuleForm = cloneDeep(DETAILS_RULE_FORM);
|
dataStore.detailsRuleForm = cloneDeep(DETAILS_RULE_FORM);
|
||||||
|
dataStore.detailsFormData = cloneDeep(DETAILS_FORM_DATA);
|
||||||
detailsRef?.value?.formElement?.resetFields();
|
detailsRef?.value?.formElement?.resetFields();
|
||||||
dataStore.dialogVisible = false;
|
dataStore.dialogVisible = false;
|
||||||
};
|
};
|
||||||
@@ -241,7 +250,6 @@ const handleCommit = () => {
|
|||||||
};
|
};
|
||||||
// 搜索
|
// 搜索
|
||||||
const handleSearch = async (params: any) => {
|
const handleSearch = async (params: any) => {
|
||||||
console.log(params, "==============>");
|
|
||||||
dataStore.initParam = cloneDeep(params);
|
dataStore.initParam = cloneDeep(params);
|
||||||
//这里需要等到表格刷新以后才去请求
|
//这里需要等到表格刷新以后才去请求
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ export const DETAILS_FORM_DATA: any[] = [
|
|||||||
{
|
{
|
||||||
prop: "kd_subwarehouse_number",
|
prop: "kd_subwarehouse_number",
|
||||||
placeholder: "请选择",
|
placeholder: "请选择",
|
||||||
type: "selectMultiples",
|
type: "selectMultiple",
|
||||||
label: "金蝶子仓库:",
|
label: "金蝶子仓库:",
|
||||||
disabled: false,
|
disabled: false,
|
||||||
class: "form-item1",
|
class: "form-item1",
|
||||||
@@ -31,7 +31,7 @@ export const DETAILS_FORM_DATA: any[] = [
|
|||||||
{
|
{
|
||||||
prop: "jst_warehouse_number",
|
prop: "jst_warehouse_number",
|
||||||
placeholder: "请选择",
|
placeholder: "请选择",
|
||||||
type: "select",
|
type: "selectMultipleD",
|
||||||
label: "对应聚水潭仓库:",
|
label: "对应聚水潭仓库:",
|
||||||
disabled: false,
|
disabled: false,
|
||||||
class: "form-item1",
|
class: "form-item1",
|
||||||
@@ -40,7 +40,7 @@ export const DETAILS_FORM_DATA: any[] = [
|
|||||||
{
|
{
|
||||||
prop: "lx_warehouse_number",
|
prop: "lx_warehouse_number",
|
||||||
placeholder: "请选择",
|
placeholder: "请选择",
|
||||||
type: "select",
|
type: "selectMultipleD",
|
||||||
label: "对应领星仓库:",
|
label: "对应领星仓库:",
|
||||||
disabled: false,
|
disabled: false,
|
||||||
class: "form-item1",
|
class: "form-item1",
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ export const FORM_DATA: FormItem[] = [
|
|||||||
{
|
{
|
||||||
prop: "kd_warehouse_number",
|
prop: "kd_warehouse_number",
|
||||||
placeholder: "请输入金蝶仓库",
|
placeholder: "请输入金蝶仓库",
|
||||||
type: "selectRemoteKD",
|
type: "selectMultiple",
|
||||||
label: "金蝶仓库: ",
|
label: "金蝶仓库: ",
|
||||||
options: []
|
options: []
|
||||||
},
|
},
|
||||||
@@ -34,7 +34,7 @@ export const FORM_DATA: FormItem[] = [
|
|||||||
{
|
{
|
||||||
prop: "kd_subwarehouse_number",
|
prop: "kd_subwarehouse_number",
|
||||||
placeholder: "请输入金蝶子仓库",
|
placeholder: "请输入金蝶子仓库",
|
||||||
type: "selectRemoteKDSubwarehouse",
|
type: "selectMultiple",
|
||||||
label: "金蝶子仓库: ",
|
label: "金蝶子仓库: ",
|
||||||
options: []
|
options: []
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -31,13 +31,13 @@
|
|||||||
:init-param="dataStore.initParam"
|
:init-param="dataStore.initParam"
|
||||||
@selectionChange="selectionChange"
|
@selectionChange="selectionChange"
|
||||||
>
|
>
|
||||||
|
<!-- @selectMultipleRemoveTag="handleSelectMultipleRemoveTag" -->
|
||||||
<template v-slot:search>
|
<template v-slot:search>
|
||||||
<SearchForm
|
<SearchForm
|
||||||
@search="handleSearch"
|
@search="handleSearch"
|
||||||
@reset="handleReset"
|
@reset="handleReset"
|
||||||
:searchParams="dataStore.initParam"
|
:searchParams="dataStore.initParam"
|
||||||
:formData="dataStore.formData"
|
:formData="dataStore.formData"
|
||||||
@selectMultipleRemoveTag="handleSelectMultipleRemoveTag"
|
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -139,6 +139,7 @@ const getWarehouseAdd = async (params: any) => {
|
|||||||
useMsg("success", "新增成功 !");
|
useMsg("success", "新增成功 !");
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
dataStore.dialogVisible = false;
|
dataStore.dialogVisible = false;
|
||||||
|
detailsRef?.value?.formElement?.resetFields();
|
||||||
proTableRef?.value!.getTableList();
|
proTableRef?.value!.getTableList();
|
||||||
}, 600);
|
}, 600);
|
||||||
}
|
}
|
||||||
@@ -150,6 +151,7 @@ const getWarehouseUp = async (params: any) => {
|
|||||||
useMsg("success", "更新成功 !");
|
useMsg("success", "更新成功 !");
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
dataStore.dialogVisible = false;
|
dataStore.dialogVisible = false;
|
||||||
|
detailsRef?.value?.formElement?.resetFields();
|
||||||
proTableRef?.value!.getTableList();
|
proTableRef?.value!.getTableList();
|
||||||
}, 600);
|
}, 600);
|
||||||
}
|
}
|
||||||
@@ -161,6 +163,7 @@ const getWarehouseDetails = async (id: any) => {
|
|||||||
dataStore.dialogVisible = true;
|
dataStore.dialogVisible = true;
|
||||||
dataStore.title = "编辑金蝶子仓与各系统仓库关系";
|
dataStore.title = "编辑金蝶子仓与各系统仓库关系";
|
||||||
dataStore.detailsRuleForm = result?.data;
|
dataStore.detailsRuleForm = result?.data;
|
||||||
|
|
||||||
//临时变量存储金蝶和金蝶子仓库
|
//临时变量存储金蝶和金蝶子仓库
|
||||||
let kd_warehouse_number = dataStore?.detailsRuleForm?.kd_warehouse_number;
|
let kd_warehouse_number = dataStore?.detailsRuleForm?.kd_warehouse_number;
|
||||||
let kd_subwarehouse = dataStore?.detailsRuleForm?.kd_subwarehouse;
|
let kd_subwarehouse = dataStore?.detailsRuleForm?.kd_subwarehouse;
|
||||||
@@ -177,7 +180,7 @@ const getWarehouseDetails = async (id: any) => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
//获取金蝶仓库
|
//获取金蝶仓库
|
||||||
const getSetWarehouseKingdeeList = async () => {
|
const getSetWarehouseKingdeeList = async (type: any) => {
|
||||||
dataStore.detailsFormData[1].options = [];
|
dataStore.detailsFormData[1].options = [];
|
||||||
const result = await getWarehousesKingdeeListApi({ 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) {
|
||||||
@@ -188,11 +191,45 @@ const getSetWarehouseKingdeeList = async () => {
|
|||||||
value: item.warehouse_number
|
value: item.warehouse_number
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
if (type === "details") {
|
||||||
dataStore.detailsFormData[1].options = options;
|
dataStore.detailsFormData[1].options = options;
|
||||||
|
if (dataStore.detailsRuleForm.kd_warehouse_number) {
|
||||||
|
dataStore.detailsFormData[1].options.push({
|
||||||
|
label: dataStore.detailsRuleForm.kd_warehouse_number,
|
||||||
|
value: dataStore.detailsRuleForm.kd_warehouse_number
|
||||||
|
});
|
||||||
|
dataStore.detailsFormData[1].options = uniqueArrayObject(dataStore.detailsFormData[1].options);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
dataStore.formData[1].options = options;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
//去重
|
||||||
|
const uniqueArrayObject = (arr: any[], uniqueKey: any = "value") => {
|
||||||
|
// 边界处理:如果传入的不是数组,直接返回空数组
|
||||||
|
if (!Array.isArray(arr)) {
|
||||||
|
console.warn("传入的参数不是数组,返回空数组");
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
// 方法1:Map 实现(高效,保留顺序)
|
||||||
|
const uniqueMap = new Map();
|
||||||
|
arr.forEach(item => {
|
||||||
|
// 确保对象存在该字段,避免报错
|
||||||
|
if (item.hasOwnProperty(uniqueKey)) {
|
||||||
|
// 以 uniqueKey 的值为键,重复键会自动覆盖(保留最后一次出现?不,forEach 顺序遍历,后出现的会覆盖前面的,如需保留首次出现,用下面的逻辑)
|
||||||
|
// 如需保留首次出现:只有 Map 中没有该键时才添加
|
||||||
|
if (!uniqueMap.has(item[uniqueKey])) {
|
||||||
|
uniqueMap.set(item[uniqueKey], item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
// 转换为数组返回
|
||||||
|
return Array.from(uniqueMap.values());
|
||||||
|
};
|
||||||
|
|
||||||
//获取金蝶子仓库
|
//获取金蝶子仓库
|
||||||
const getSetWarehouseSubwarehousesList = async () => {
|
const getSetWarehouseSubwarehousesList = async (type: any) => {
|
||||||
//先清空一下
|
//先清空一下
|
||||||
dataStore.detailsFormData[2].options = [];
|
dataStore.detailsFormData[2].options = [];
|
||||||
const result = await getSubwarehouseskingdeeListApi({
|
const result = await getSubwarehouseskingdeeListApi({
|
||||||
@@ -206,7 +243,19 @@ const getSetWarehouseSubwarehousesList = async () => {
|
|||||||
value: item.sub_warehouse_number
|
value: item.sub_warehouse_number
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
if (type === "details") {
|
||||||
dataStore.detailsFormData[2].options = options;
|
dataStore.detailsFormData[2].options = options;
|
||||||
|
if (dataStore.detailsRuleForm.kd_subwarehouse.length) {
|
||||||
|
let options: any = [];
|
||||||
|
dataStore.detailsRuleForm.kd_subwarehouse.forEach((item: any) => {
|
||||||
|
options.push({ label: item.subwarehouse_name, value: item.subwarehouse_number });
|
||||||
|
});
|
||||||
|
dataStore.detailsFormData[2].options = [...dataStore.detailsFormData[2].options, ...options];
|
||||||
|
dataStore.detailsFormData[2].options = uniqueArrayObject(dataStore.detailsFormData[2].options);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
dataStore.formData[2].options = options;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -222,6 +271,15 @@ const getSetWarehouseSubwarehousesLingXingList = async () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
dataStore.detailsFormData[4].options = options;
|
dataStore.detailsFormData[4].options = options;
|
||||||
|
console.log(dataStore.detailsRuleForm.lx_warehouse_number, "");
|
||||||
|
//领星
|
||||||
|
if (dataStore.detailsRuleForm.lx_warehouse_number) {
|
||||||
|
dataStore.detailsFormData[4].options.push({
|
||||||
|
label: dataStore.detailsRuleForm.lx_warehouse_name,
|
||||||
|
value: dataStore.detailsRuleForm.lx_warehouse_number
|
||||||
|
});
|
||||||
|
dataStore.detailsFormData[4].options = uniqueArrayObject(dataStore.detailsFormData[4].options);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
//获取聚水潭仓库
|
//获取聚水潭仓库
|
||||||
@@ -236,6 +294,13 @@ const getSetWarehouseSubwarehousesJushuitanList = async () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
dataStore.detailsFormData[3].options = options;
|
dataStore.detailsFormData[3].options = options;
|
||||||
|
if (dataStore.detailsRuleForm.jst_warehouse_number) {
|
||||||
|
dataStore.detailsFormData[3].options.push({
|
||||||
|
label: dataStore.detailsRuleForm.jst_warehouse_name,
|
||||||
|
value: dataStore.detailsRuleForm.jst_warehouse_number
|
||||||
|
});
|
||||||
|
dataStore.detailsFormData[3].options = uniqueArrayObject(dataStore.detailsFormData[3].options);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
// 表格row点击事件
|
// 表格row点击事件
|
||||||
@@ -250,9 +315,6 @@ const handleButtonClickCallback = (item: any) => {
|
|||||||
if (type === "del") {
|
if (type === "del") {
|
||||||
handleDel();
|
handleDel();
|
||||||
}
|
}
|
||||||
// if (type === "export") {
|
|
||||||
// handleExport();
|
|
||||||
// }
|
|
||||||
if (type === "add") {
|
if (type === "add") {
|
||||||
dataStore.title = "新增金蝶子仓与各系统仓库关系";
|
dataStore.title = "新增金蝶子仓与各系统仓库关系";
|
||||||
dataStore.dialogVisible = true;
|
dataStore.dialogVisible = true;
|
||||||
@@ -291,6 +353,15 @@ const handleCommit = () => {
|
|||||||
// 搜索
|
// 搜索
|
||||||
const handleSearch = async (params: any) => {
|
const handleSearch = async (params: any) => {
|
||||||
dataStore.initParam = cloneDeep(params);
|
dataStore.initParam = cloneDeep(params);
|
||||||
|
// dataStore.initParam.kd_subwarehouse_number
|
||||||
|
// if (dataStore.initParam.kd_subwarehouse_number.length) {
|
||||||
|
// let kd_subwarehouse_number = [];
|
||||||
|
// dataStore.initParam.kd_subwarehouse_number.forEach((it: any) => {
|
||||||
|
// // kd_subwarehouse_number.push(it.split("_")[1]);
|
||||||
|
// console.log(it.split("_")[1]);
|
||||||
|
// });
|
||||||
|
// dataStore.initParam.kd_subwarehouse_number = kd_subwarehouse_number;
|
||||||
|
// }
|
||||||
//这里需要等到表格刷新以后才去请求
|
//这里需要等到表格刷新以后才去请求
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
proTableRef?.value!.getTableList();
|
proTableRef?.value!.getTableList();
|
||||||
@@ -311,92 +382,14 @@ const handleSelectMultipleDClear = (params: any) => {
|
|||||||
} = params;
|
} = params;
|
||||||
dataStore.detailsRuleForm[prop] = "";
|
dataStore.detailsRuleForm[prop] = "";
|
||||||
};
|
};
|
||||||
/**
|
|
||||||
* 监听查询条件标签关闭(统一处理组织、仓库、子仓库联动,修复split类型错误)
|
|
||||||
* @param params { item: { prop: string } } - 关闭标签的相关参数(包含字段标识prop)
|
|
||||||
*/
|
|
||||||
const handleSelectMultipleRemoveTag = (params: any) => {
|
|
||||||
const { item } = params;
|
|
||||||
const { prop } = item;
|
|
||||||
const paramValue = dataStore.initParam[prop]; // 获取当前参数值
|
|
||||||
// 根据字段标识分发处理逻辑
|
|
||||||
switch (prop) {
|
|
||||||
case "use_org_number":
|
|
||||||
handleOrgTagRemove(paramValue);
|
|
||||||
break;
|
|
||||||
case "kd_warehouse_number":
|
|
||||||
handleKdWarehouseTagRemove(paramValue);
|
|
||||||
break;
|
|
||||||
case "kd_subwarehouse_number":
|
|
||||||
handleKdSubWarehouseTagRemove(paramValue);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 组织标签关闭处理(联动仓库、子仓库)
|
|
||||||
* @param remainingOrgValues 关闭后剩余的组织value数组(如:["101"]、["101","115"])
|
|
||||||
*/
|
|
||||||
const handleOrgTagRemove = (remainingOrgValues: any[]) => {
|
|
||||||
// 2. 筛选仓库:基于原始金蝶仓库数据,聚合所有剩余组织对应的仓库(去重)
|
|
||||||
let filteredWarehouses: any = [];
|
|
||||||
if (remainingOrgValues.length > 0) {
|
|
||||||
filteredWarehouses = dataStore.formData[1].options.filter((warehouse: any) =>
|
|
||||||
remainingOrgValues.includes(warehouse.use_org_number)
|
|
||||||
);
|
|
||||||
// 去重:避免同一仓库被多个组织关联导致重复
|
|
||||||
filteredWarehouses = Array.from(new Map(filteredWarehouses.map((item: any) => [item.value, item])).values());
|
|
||||||
}
|
|
||||||
|
|
||||||
// 3. 重置仓库状态(清空已选+更新选项)
|
|
||||||
dataStore.initParam.kd_warehouse_number = "";
|
|
||||||
dataStore.formData[1].options = [];
|
|
||||||
dataStore.formData[1].options = filteredWarehouses;
|
|
||||||
|
|
||||||
// 4. 重置子仓库状态(仓库变化后必须清空)
|
|
||||||
dataStore.initParam.kd_subwarehouse_number = "";
|
|
||||||
dataStore.formData[2].options = [];
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 金蝶仓库标签关闭处理(联动子仓库)
|
|
||||||
* @param remainingWarehouseValues 关闭后剩余的仓库value数组(如:["AD"]、["AD","CK001"])
|
|
||||||
*/
|
|
||||||
const handleKdWarehouseTagRemove = (remainingWarehouseValues: any[]) => {
|
|
||||||
// 2. 筛选子仓库:基于原始金蝶子仓库数据,聚合所有剩余仓库对应的子仓库
|
|
||||||
let filteredSubWarehouses = [];
|
|
||||||
if (remainingWarehouseValues.length > 0) {
|
|
||||||
filteredSubWarehouses = dataStore.formData[2].options.filter((subWarehouse: any) =>
|
|
||||||
remainingWarehouseValues.includes(subWarehouse.warehouse_number)
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
// 仓库全部关闭:显示所有原始子仓库数据
|
|
||||||
filteredSubWarehouses = [...dataStore.formData[2].options];
|
|
||||||
}
|
|
||||||
|
|
||||||
// 3. 重置子仓库状态(清空已选+更新选项)
|
|
||||||
dataStore.initParam.kd_subwarehouse_number = "";
|
|
||||||
dataStore.formData[2].options = [];
|
|
||||||
dataStore.formData[2].options = filteredSubWarehouses;
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 金蝶子仓库标签关闭处理(仅更新自身,不联动上级)
|
|
||||||
* @param remainingSubWarehouseValues 关闭后剩余的子仓库value数组
|
|
||||||
*/
|
|
||||||
const handleKdSubWarehouseTagRemove = (remainingSubWarehouseValues: any[]) => {
|
|
||||||
// 同步表单已选值
|
|
||||||
dataStore.formData[2].options = remainingSubWarehouseValues;
|
|
||||||
};
|
|
||||||
// //监听弹窗开启
|
// //监听弹窗开启
|
||||||
watch(
|
watch(
|
||||||
() => dataStore.dialogVisible,
|
() => dataStore.dialogVisible,
|
||||||
(newVal: any) => {
|
(newVal: any) => {
|
||||||
if (newVal) {
|
if (newVal) {
|
||||||
//金蝶倉庫
|
//金蝶倉庫
|
||||||
getSetWarehouseKingdeeList();
|
getSetWarehouseKingdeeList("details");
|
||||||
//领星仓库
|
//领星仓库
|
||||||
getSetWarehouseSubwarehousesLingXingList();
|
getSetWarehouseSubwarehousesLingXingList();
|
||||||
//聚水潭仓库
|
//聚水潭仓库
|
||||||
@@ -414,7 +407,7 @@ watch(
|
|||||||
if (newVal) {
|
if (newVal) {
|
||||||
dataStore.detailsRuleForm.kd_warehouse_number = "";
|
dataStore.detailsRuleForm.kd_warehouse_number = "";
|
||||||
dataStore.detailsRuleForm.kd_subwarehouse_number = "";
|
dataStore.detailsRuleForm.kd_subwarehouse_number = "";
|
||||||
getSetWarehouseKingdeeList();
|
getSetWarehouseKingdeeList("details");
|
||||||
} else {
|
} else {
|
||||||
dataStore.detailsRuleForm.kd_warehouse_number = "";
|
dataStore.detailsRuleForm.kd_warehouse_number = "";
|
||||||
dataStore.detailsRuleForm.kd_subwarehouse_number = "";
|
dataStore.detailsRuleForm.kd_subwarehouse_number = "";
|
||||||
@@ -429,7 +422,7 @@ watch(
|
|||||||
(newVal: any) => {
|
(newVal: any) => {
|
||||||
if (newVal) {
|
if (newVal) {
|
||||||
dataStore.detailsRuleForm.kd_subwarehouse_number = "";
|
dataStore.detailsRuleForm.kd_subwarehouse_number = "";
|
||||||
getSetWarehouseSubwarehousesList();
|
getSetWarehouseSubwarehousesList("details");
|
||||||
} else {
|
} else {
|
||||||
dataStore.detailsRuleForm.kd_subwarehouse_number = "";
|
dataStore.detailsRuleForm.kd_subwarehouse_number = "";
|
||||||
dataStore.detailsFormData[2].options = [];
|
dataStore.detailsFormData[2].options = [];
|
||||||
|
|||||||
@@ -1,8 +1,13 @@
|
|||||||
export const BUTTON = [
|
export const BUTTON = [
|
||||||
|
{
|
||||||
|
text: "返回",
|
||||||
|
permission: "receiptWarehousingReceiptOrderAddBtnBack",
|
||||||
|
type: "back"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
text: "提交",
|
text: "提交",
|
||||||
permission: "receiptWarehousingReceiptOrderAddBtnCommit",
|
permission: "receiptWarehousingReceiptOrderAddBtnSubmit",
|
||||||
type: "commit",
|
type: "submit",
|
||||||
props: {
|
props: {
|
||||||
type: "primary"
|
type: "primary"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
export const BUTTON = [
|
||||||
|
{
|
||||||
|
text: "返回",
|
||||||
|
permission: "receiptWarehousingReceiptOrderDetailsBtnBack",
|
||||||
|
type: "back"
|
||||||
|
}
|
||||||
|
];
|
||||||
@@ -19,12 +19,12 @@ export const BUTTON = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: "导出",
|
text: "导出",
|
||||||
permission: "inspectionManagementReportBtnExport",
|
permission: "receiptWarehousingReceiptOrderBtnExport",
|
||||||
type: "export"
|
type: "export"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: "刷新",
|
text: "刷新",
|
||||||
permission: "inspectionManagementReportBtnRefresh",
|
permission: "receiptWarehousingReceiptOrderBtnRefresh",
|
||||||
type: "refresh"
|
type: "refresh"
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -9,14 +9,20 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<ProTable
|
<ProTable
|
||||||
ref="proTable"
|
ref="proTableRef"
|
||||||
:formData="dataStore.formData"
|
|
||||||
:columns="dataStore.columns"
|
:columns="dataStore.columns"
|
||||||
:request-api="getMaterialListApi"
|
:request-api="getMaterialListApi"
|
||||||
:init-param="dataStore.initParam"
|
:init-param="dataStore.initParam"
|
||||||
@selectionChange="selectionChange"
|
@selectionChange="selectionChange"
|
||||||
:orgCode="dataStore.ruleForm.orgCode"
|
|
||||||
>
|
>
|
||||||
|
<template v-slot:search>
|
||||||
|
<SearchForm
|
||||||
|
@search="handleSearch"
|
||||||
|
@reset="handleReset"
|
||||||
|
:searchParams="dataStore.initParam"
|
||||||
|
:formData="dataStore.formData"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
<template #boxBillNo="scope">
|
<template #boxBillNo="scope">
|
||||||
<a @click="handleOpen(scope.row)" class="break-word to-details">
|
<a @click="handleOpen(scope.row)" class="break-word to-details">
|
||||||
{{ scope.row.boxBillNo }}
|
{{ scope.row.boxBillNo }}
|
||||||
@@ -28,7 +34,6 @@
|
|||||||
|
|
||||||
<script setup lang="ts" name="inspectionManagementReport">
|
<script setup lang="ts" name="inspectionManagementReport">
|
||||||
import ProTable from "@/components/ProTable/index.vue";
|
import ProTable from "@/components/ProTable/index.vue";
|
||||||
|
|
||||||
// import { useMsg } from "@/hooks/useMsg";
|
// import { useMsg } from "@/hooks/useMsg";
|
||||||
import PermissionButton from "@/components/PermissionButton/index.vue";
|
import PermissionButton from "@/components/PermissionButton/index.vue";
|
||||||
import { getMaterialListApi } from "@/api/modules/foundationMaterial";
|
import { getMaterialListApi } from "@/api/modules/foundationMaterial";
|
||||||
@@ -37,16 +42,14 @@ import { useRouter } from "vue-router";
|
|||||||
import { RULE_FORM, FORM_DATA, COLUMNS, BUTTON } from "./constant/list/index";
|
import { RULE_FORM, FORM_DATA, COLUMNS, BUTTON } from "./constant/list/index";
|
||||||
//表格TS
|
//表格TS
|
||||||
import { ProTableInstance } from "@/components/ProTable/interface";
|
import { ProTableInstance } from "@/components/ProTable/interface";
|
||||||
import { useUserStore } from "@/stores/modules/user";
|
|
||||||
import { btnClick } from "./init";
|
import { btnClick } from "./init";
|
||||||
//深拷贝方法
|
//深拷贝方法
|
||||||
import { cloneDeep } from "lodash-es";
|
import { cloneDeep } from "lodash-es";
|
||||||
// 获取 ProTable 元素,调用其获取刷新数据方法(还能获取到当前查询参数,方便导出携带参数)
|
// 获取 ProTable 元素,调用其获取刷新数据方法(还能获取到当前查询参数,方便导出携带参数)
|
||||||
const proTable = ref<ProTableInstance>();
|
const proTableRef = ref<ProTableInstance>();
|
||||||
|
|
||||||
const $router = useRouter();
|
const $router = useRouter();
|
||||||
// 获取用户信息(组织id)
|
|
||||||
const userStore = useUserStore();
|
|
||||||
// 数据源
|
// 数据源
|
||||||
const dataStore = reactive<any>({
|
const dataStore = reactive<any>({
|
||||||
columns: COLUMNS, //列表配置项
|
columns: COLUMNS, //列表配置项
|
||||||
@@ -67,39 +70,26 @@ const handleButtonClickCallback = (item: any) => {
|
|||||||
const { type } = item;
|
const { type } = item;
|
||||||
btnClick[type](item, $router);
|
btnClick[type](item, $router);
|
||||||
};
|
};
|
||||||
// // 规格型号
|
//搜索
|
||||||
// const remoteMethod1 = async (query: any) => {
|
const handleSearch = async (params: any) => {
|
||||||
// datas.loading = true;
|
dataStore.initParam = cloneDeep(params);
|
||||||
// if (!query) {
|
//这里需要等到表格刷新以后才去请求
|
||||||
// datas.loading = false;
|
nextTick(() => {
|
||||||
// return;
|
proTableRef?.value!.getTableList();
|
||||||
// }
|
});
|
||||||
// let valClone = query.replace(/^\s*|\s*$/g, "");
|
};
|
||||||
// if (!valClone.length) {
|
//重置
|
||||||
// datas.loading = false;
|
const handleReset = () => {
|
||||||
// return;
|
dataStore.initParam = cloneDeep(RULE_FORM);
|
||||||
// }
|
// init();
|
||||||
// const result = await getMaterialListApi(valClone);
|
//这里需要等到表格刷新以后才去请求
|
||||||
// if (result.status === 200) {
|
nextTick(() => {
|
||||||
// const { data } = result;
|
proTableRef?.value!.getTableList();
|
||||||
// datas.options = data;
|
});
|
||||||
// }
|
};
|
||||||
// datas.loading = false;
|
|
||||||
// };
|
|
||||||
const handleOpen = (row: any) => {
|
const handleOpen = (row: any) => {
|
||||||
console.log(row);
|
console.log(row);
|
||||||
};
|
};
|
||||||
watch(
|
|
||||||
() => userStore.orgCode,
|
|
||||||
newVal => {
|
|
||||||
dataStore.ruleForm.orgCode = newVal;
|
|
||||||
dataStore.initParam.orgCode = newVal;
|
|
||||||
},
|
|
||||||
{
|
|
||||||
immediate: true,
|
|
||||||
deep: true
|
|
||||||
}
|
|
||||||
);
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scope lang="scss">
|
<style scope lang="scss">
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
export const BUTTON = [
|
export const BUTTON = [
|
||||||
{
|
{
|
||||||
text: "重传",
|
text: "重传",
|
||||||
permission: "receiptWarehousingWarehousingOrderBtnRetransmission",
|
permission: "receiptWarehousingWarehousingOrderBtnCC",
|
||||||
type: "retransmission",
|
type: "retransmission",
|
||||||
props: {
|
props: {
|
||||||
type: "primary"
|
type: "primary"
|
||||||
@@ -14,7 +14,7 @@ export const BUTTON = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: "同步成功",
|
text: "同步成功",
|
||||||
permission: "receiptWarehousingWarehousingOrderBtnSynchronize",
|
permission: "receiptWarehousingWarehousingOrderBtnTB",
|
||||||
type: "synchronize"
|
type: "synchronize"
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -20,22 +20,19 @@ export const FORM_DATA: FormItem[] = [
|
|||||||
prop: "securityNumbers",
|
prop: "securityNumbers",
|
||||||
placeholder: "请输入来源单号",
|
placeholder: "请输入来源单号",
|
||||||
type: "input",
|
type: "input",
|
||||||
isArray: true,
|
|
||||||
label: "来源单号: "
|
label: "来源单号: "
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: "lotNumbers",
|
prop: "lotNumbers",
|
||||||
placeholder: "请选择收货类型",
|
placeholder: "请选择来源类型",
|
||||||
type: "select",
|
type: "select",
|
||||||
isArray: true,
|
label: "来源类型: ",
|
||||||
label: "收货类型: ",
|
|
||||||
options: []
|
options: []
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: "lotNumbers",
|
prop: "lotNumbers",
|
||||||
placeholder: "请选择仓库",
|
placeholder: "请选择仓库",
|
||||||
type: "select",
|
type: "select",
|
||||||
isArray: true,
|
|
||||||
label: "仓库: ",
|
label: "仓库: ",
|
||||||
options: []
|
options: []
|
||||||
},
|
},
|
||||||
@@ -43,34 +40,23 @@ export const FORM_DATA: FormItem[] = [
|
|||||||
prop: "Time",
|
prop: "Time",
|
||||||
type: "daterange",
|
type: "daterange",
|
||||||
options: [],
|
options: [],
|
||||||
startPlaceholder: "收货开始日期",
|
startPlaceholder: "创建开始日期",
|
||||||
endPlaceholder: "收货结束日期",
|
endPlaceholder: "创建结束日期",
|
||||||
startDate: "createBeginDate",
|
startDate: "createBeginDate",
|
||||||
endDate: "createEndDate",
|
endDate: "createEndDate",
|
||||||
label: "收货时间: "
|
label: "创建日期: "
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: "securityNumbers",
|
||||||
|
placeholder: "请输入编码,型号,名称",
|
||||||
|
type: "input",
|
||||||
|
label: "物料: "
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: "lotNumbers",
|
prop: "lotNumbers",
|
||||||
placeholder: "请选择供应商",
|
placeholder: "请选择发货状态",
|
||||||
type: "select",
|
type: "select",
|
||||||
isArray: true,
|
label: "发货状态: ",
|
||||||
label: "供应商: ",
|
|
||||||
options: []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: "materialNumber",
|
|
||||||
placeholder: "请输入物料编码",
|
|
||||||
type: "selectRemote1",
|
|
||||||
isArray: true,
|
|
||||||
options: [],
|
|
||||||
label: "物料编码: "
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: "lotNumbers",
|
|
||||||
placeholder: "请选择收货状态",
|
|
||||||
type: "select",
|
|
||||||
isArray: true,
|
|
||||||
label: "收货状态: ",
|
|
||||||
options: []
|
options: []
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -78,30 +64,50 @@ export const FORM_DATA: FormItem[] = [
|
|||||||
placeholder: "请选择组织",
|
placeholder: "请选择组织",
|
||||||
type: "select",
|
type: "select",
|
||||||
isArray: true,
|
isArray: true,
|
||||||
label: "组织: "
|
label: "组织: ",
|
||||||
|
options: []
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
prop: "securityNumbers",
|
prop: "securityNumbers",
|
||||||
placeholder: "请输入收货人",
|
placeholder: "请输入收货客户",
|
||||||
type: "input",
|
type: "input",
|
||||||
isArray: true,
|
label: "收货客户: "
|
||||||
label: "收货人: "
|
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
prop: "securityNumbers",
|
prop: "securityNumbers",
|
||||||
placeholder: "请输入箱号",
|
placeholder: "请输入箱号",
|
||||||
type: "input",
|
type: "inputBtn",
|
||||||
isArray: true,
|
isArray: true,
|
||||||
label: "箱号: "
|
label: "箱号: "
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: "securityNumbers",
|
prop: "securityNumbers",
|
||||||
placeholder: "请输入序列号",
|
placeholder: "请输入序列号",
|
||||||
type: "input",
|
type: "inputBtn",
|
||||||
isArray: true,
|
isArray: true,
|
||||||
label: "序列号: "
|
label: "序列号: "
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: "securityNumbers",
|
||||||
|
placeholder: "请输入调入仓库",
|
||||||
|
type: "input",
|
||||||
|
|
||||||
|
label: "调入仓库: "
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: "securityNumbers",
|
||||||
|
placeholder: "请输入单号",
|
||||||
|
type: "inputBtn",
|
||||||
|
label: "单号: ",
|
||||||
|
isArray: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: "lotNumbers",
|
||||||
|
placeholder: "请选择组织",
|
||||||
|
type: "select",
|
||||||
|
isArray: true,
|
||||||
|
label: "拣货类型: ",
|
||||||
|
options: []
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<!-- 质检单 -->
|
<!-- 发货单 -->
|
||||||
<template>
|
<template>
|
||||||
<div class="table-box">
|
<div class="table-box">
|
||||||
<div style="padding-bottom: 16px">
|
<div style="padding-bottom: 16px">
|
||||||
@@ -9,7 +9,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<ProTable
|
<ProTable
|
||||||
ref="proTable"
|
ref="proTableRef"
|
||||||
:formData="dataStore.formData"
|
:formData="dataStore.formData"
|
||||||
:columns="dataStore.columns"
|
:columns="dataStore.columns"
|
||||||
:request-api="getMaterialListApi"
|
:request-api="getMaterialListApi"
|
||||||
@@ -22,6 +22,14 @@
|
|||||||
{{ scope.row.boxBillNo }}
|
{{ scope.row.boxBillNo }}
|
||||||
</a>
|
</a>
|
||||||
</template>
|
</template>
|
||||||
|
<template v-slot:search>
|
||||||
|
<SearchForm
|
||||||
|
@search="handleSearch"
|
||||||
|
@reset="handleReset"
|
||||||
|
:searchParams="dataStore.initParam"
|
||||||
|
:formData="dataStore.formData"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
</ProTable>
|
</ProTable>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -32,21 +40,19 @@ import ProTable from "@/components/ProTable/index.vue";
|
|||||||
// import { useMsg } from "@/hooks/useMsg";
|
// import { useMsg } from "@/hooks/useMsg";
|
||||||
import PermissionButton from "@/components/PermissionButton/index.vue";
|
import PermissionButton from "@/components/PermissionButton/index.vue";
|
||||||
import { getMaterialListApi } from "@/api/modules/foundationMaterial";
|
import { getMaterialListApi } from "@/api/modules/foundationMaterial";
|
||||||
// import { useAuthStore } from "@/stores/modules/auth";
|
|
||||||
import { useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
import { RULE_FORM, FORM_DATA, COLUMNS, BUTTON } from "./constant/list/index";
|
import { RULE_FORM, FORM_DATA, COLUMNS, BUTTON } from "./constant/list/index";
|
||||||
//表格TS
|
//表格TS
|
||||||
import { ProTableInstance } from "@/components/ProTable/interface";
|
import { ProTableInstance } from "@/components/ProTable/interface";
|
||||||
import { useUserStore } from "@/stores/modules/user";
|
|
||||||
import { btnClick } from "./init";
|
import { btnClick } from "./init";
|
||||||
//深拷贝方法
|
//深拷贝方法
|
||||||
import { cloneDeep } from "lodash-es";
|
import { cloneDeep } from "lodash-es";
|
||||||
// 获取 ProTable 元素,调用其获取刷新数据方法(还能获取到当前查询参数,方便导出携带参数)
|
// 获取 ProTable 元素,调用其获取刷新数据方法(还能获取到当前查询参数,方便导出携带参数)
|
||||||
const proTable = ref<ProTableInstance>();
|
const proTableRef = ref<ProTableInstance>();
|
||||||
|
|
||||||
const $router = useRouter();
|
const $router = useRouter();
|
||||||
// 获取用户信息(组织id)
|
|
||||||
const userStore = useUserStore();
|
|
||||||
// 数据源
|
// 数据源
|
||||||
const dataStore = reactive<any>({
|
const dataStore = reactive<any>({
|
||||||
columns: COLUMNS, //列表配置项
|
columns: COLUMNS, //列表配置项
|
||||||
@@ -66,39 +72,27 @@ const selectionChange = (selection: any) => {
|
|||||||
const handleButtonClickCallback = (item: any) => {
|
const handleButtonClickCallback = (item: any) => {
|
||||||
btnClick[item?.type](item, $router);
|
btnClick[item?.type](item, $router);
|
||||||
};
|
};
|
||||||
// // 规格型号
|
|
||||||
// const remoteMethod1 = async (query: any) => {
|
|
||||||
// datas.loading = true;
|
|
||||||
// if (!query) {
|
|
||||||
// datas.loading = false;
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
// let valClone = query.replace(/^\s*|\s*$/g, "");
|
|
||||||
// if (!valClone.length) {
|
|
||||||
// datas.loading = false;
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
// const result = await getMaterialListApi(valClone);
|
|
||||||
// if (result.status === 200) {
|
|
||||||
// const { data } = result;
|
|
||||||
// datas.options = data;
|
|
||||||
// }
|
|
||||||
// datas.loading = false;
|
|
||||||
// };
|
|
||||||
const handleOpen = (row: any) => {
|
const handleOpen = (row: any) => {
|
||||||
console.log(row);
|
console.log(row);
|
||||||
};
|
};
|
||||||
watch(
|
|
||||||
() => userStore.orgCode,
|
// 搜索
|
||||||
newVal => {
|
const handleSearch = async (params: any) => {
|
||||||
dataStore.ruleForm.orgCode = newVal;
|
dataStore.initParam = cloneDeep(params);
|
||||||
dataStore.initParam.orgCode = newVal;
|
//这里需要等到表格刷新以后才去请求
|
||||||
},
|
nextTick(() => {
|
||||||
{
|
proTableRef?.value!.getTableList();
|
||||||
immediate: true,
|
});
|
||||||
deep: true
|
};
|
||||||
}
|
// 重置
|
||||||
);
|
const handleReset = () => {
|
||||||
|
dataStore.initParam = cloneDeep(RULE_FORM);
|
||||||
|
//这里需要等到表格刷新以后才去请求
|
||||||
|
nextTick(() => {
|
||||||
|
proTableRef?.value!.getTableList();
|
||||||
|
});
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scope lang="scss">
|
<style scope lang="scss">
|
||||||
|
|||||||
367
vite.config.ts.timestamp-1763083944372-3781ef656fea8.mjs
Normal file
367
vite.config.ts.timestamp-1763083944372-3781ef656fea8.mjs
Normal file
File diff suppressed because one or more lines are too long
367
vite.config.ts.timestamp-1763428081270-15bcc415263b7.mjs
Normal file
367
vite.config.ts.timestamp-1763428081270-15bcc415263b7.mjs
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user