fix: 🧩 修复BUG

This commit is contained in:
2025-10-10 16:58:14 +08:00
parent efee846973
commit 190be3b7ce
9 changed files with 75 additions and 24 deletions

View File

@@ -140,8 +140,9 @@ const handleSelectMultipleRemoveTag = async (params: any) => {
dataStore.formData[1].options.forEach((item: any) => {
customers.push(item.value);
});
console.log(customers, "=customers=");
dataStore.ruleForm.customer_number = customers;
console.log(dataStore.ruleForm.customer_number, "=123==");
};
getSubscribeDetails();

View File

@@ -37,7 +37,7 @@ export const FORM_DATA: FormItem[] = [
label: "客户编码: "
},
{
prop: "product_line_name",
prop: "product_line",
placeholder: "请输入品线",
type: "selectProductLinesRemote",
label: "品线: ",
@@ -71,5 +71,6 @@ export const FORM_DATA: FormItem[] = [
export const RULE_FORM = {
page: 1,
size: 1,
org_number: ["101"]
org_number: ["101"],
customer_number: []
};

View File

@@ -19,6 +19,7 @@
<SearchForm
@search="handleSearch"
@reset="handleReset"
@selectMultipleRemoveTag="handleSelectMultipleRemoveTag"
:searchParams="dataStore.initParam"
:formData="dataStore.formData"
/>
@@ -57,7 +58,7 @@ const userStore = useUserStore();
const dataStore = reactive<any>({
columns: COLUMNS, //列表配置项
initParam: cloneDeep(RULE_FORM), // 初始化搜索条件|重置搜索条件
ruleForm: cloneDeep(RULE_FORM), // 搜索条件
formData: FORM_DATA, //搜索配置项
buttons: cloneDeep(BUTTON),
options: [], //规格型号
@@ -109,6 +110,21 @@ const handleOpen = (row: any) => {
query: { id: row.id, title: "编辑订阅" }
});
};
//本地多选远程搜索Tag删除回调(组织)
const handleSelectMultipleRemoveTag = async (params: any) => {
const { org_number } = params;
let customers: any = [];
// 筛选出 org_number 在 ids 中的数据
dataStore.formData[1].options = dataStore.formData[1].options.filter((item: any) => org_number.includes(item.org_number));
dataStore.formData[1].options.length &&
dataStore.formData[1].options.forEach((item: any) => {
customers.push(item.value);
});
nextTick(() => {
dataStore.initParam.customer_number = customers;
});
};
</script>
<style scope lang="scss">