From 40be56a31b2cb2be601dc1b1da345fa6920aa187 Mon Sep 17 00:00:00 2001 From: "XIAJI-NEW\\qax" Date: Tue, 11 Nov 2025 13:12:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=9C=A8=E2=80=9C=E8=81=94?= =?UTF-8?q?=E7=B3=BB=E4=BA=BA=E4=BF=A1=E6=81=AF=E2=80=9D=E8=BF=99=E9=87=8C?= =?UTF-8?q?=EF=BC=8C=E5=8F=AF=E4=BB=A5=E5=A4=9A=E9=80=89=E7=9A=84js?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=EF=BC=8C=E5=B9=B6=E5=A2=9E=E5=8A=A0=E4=B8=80?= =?UTF-8?q?=E4=B8=AA=E6=B8=85=E7=A9=BA=E5=A4=9A=E9=80=89=E7=9A=84=E6=8C=89?= =?UTF-8?q?=E9=92=AE=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../huodong/__pycache__/views.cpython-311.pyc | Bin 19829 -> 20309 bytes fzjgact/huodong/templates/contact_list.html | 328 ++++++++++-------- fzjgact/huodong/views.py | 13 +- 3 files changed, 185 insertions(+), 156 deletions(-) diff --git a/fzjgact/huodong/__pycache__/views.cpython-311.pyc b/fzjgact/huodong/__pycache__/views.cpython-311.pyc index 98f91c705c59b981cb99cf5e6940f2307e6a5211..07310f25e03b26757e495b2a7077bb27d27fc087 100644 GIT binary patch delta 846 zcmY*XT}TvB6ux(MXa8L{x7j7ih}3Mb1zqdG&~4XpqXi|NjsgELHuO}_XY8=6^%MT_Wof1mv)sR3BO5Nu77ypxxh%?+|Q#&GcAQHJ8pVEmo zl(T9nMeEgckt6M_iK$0Zs2r~E90spa4M2^eb)mcPEXbcL*2J&kmzr-io3XBqSXU+{ zWn&Ulr{%OZtIhP!^%qx@YEbXtOCrvd^pJQ`ejsUzBxy;yd+h}tqv>$en>&$G6RNDM zid0ylrs&Ub$nPZ6ASUM-lmWoFLkUf%wUN3f4${IH_n|-wBAl$VMQtT9FAvvwkrBGHLidDY%PH(2Y_H#Pd7ln1JX-e$ zGyY%}&=s7xNh_Ksx$>HorRD>U! zjI5I{sEAG$u@_-v1F}RW7pdAv)v}iGfV4wE77L8EfPL~uA!T8<6!sQ|5;mA9149jnq^RKppS7lbu03Ts{gk{p^H?30;Y zdYGhDHcxc<&&2edVe%yRcWS>t7X1bhe}Kd-mgM}D)FNLH{|ATwJLV_D
- -
- + +
+
@@ -17,15 +17,19 @@ type="text" id="branchSearchInput" class="w-full pl-4 pr-10 py-2.5 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-300 focus:border-blue-500 outline-none text-sm" - placeholder="输入分支机构名称搜索..." + placeholder="点击选择分支机构(可多选)..." readonly onclick="toggleBranchDropdown()" > - - + +
@@ -46,15 +50,29 @@
    {% for branch in branches %} -
  • + {{ branch.name }}
  • {% endfor %}
+ +
+ + +
+ + +
+ +
+
- +
-
-
- - - - - -
- - -
+
@@ -119,10 +93,16 @@
-
+
+
+ + + @@ -154,6 +134,133 @@ diff --git a/fzjgact/huodong/views.py b/fzjgact/huodong/views.py index ba50a67..45ce71e 100644 --- a/fzjgact/huodong/views.py +++ b/fzjgact/huodong/views.py @@ -356,16 +356,19 @@ def equipment_images(request): def contact_list(request): # 获取筛选参数 - branch_id = request.GET.get('branch') + branches_param = request.GET.get('branches') # 支持多机构选择,使用逗号分隔的ID字符串 category = request.GET.get('category') contact_name = request.GET.get('contact_name') # 构建查询条件 filters = Q() - # 分支机构筛选 - if branch_id: - filters &= Q(branch_id=branch_id) + # 分支机构筛选(支持多选) + if branches_param: + # 将逗号分隔的字符串转换为ID列表 + branch_ids = [bid.strip() for bid in branches_param.split(',') if bid.strip().isdigit()] + if branch_ids: + filters &= Q(branch_id__in=branch_ids) # 联系人类别筛选 if category: @@ -386,7 +389,7 @@ def contact_list(request): 'contacts': contacts, 'branches': branches, 'categories': categories, - 'selected_branch': branch_id, + 'selected_branches': branches_param, # 传递选中的机构ID字符串 'selected_category': category, 'selected_contact_name': contact_name }