提交
This commit is contained in:
1 parent
a52fe77e34
commit
1938a9b76a
62 files changed
+612436
-10819
No files matched your search
+1
-1
@@ -1 +1 @@
|
||||
41606
|
||||
72943
|
||||
@@ -0,0 +1,41 @@
|
||||
"""中国大陆身份证号解析(周岁年龄)。"""
|
||||
from __future__ import annotations
|
||||
|
||||
import re
|
||||
from datetime import date
|
||||
from typing import Optional
|
||||
|
||||
_ID18_RE = re.compile(r"^\d{17}[\dX]$")
|
||||
|
||||
|
||||
def calc_age_from_chinese_id_card(
|
||||
id_card: Optional[str],
|
||||
*,
|
||||
today: Optional[date] = None,
|
||||
) -> Optional[int]:
|
||||
"""从 18 位身份证号计算周岁。号码不完整或出生日期无效时返回 None。"""
|
||||
if not id_card or not isinstance(id_card, str):
|
||||
return None
|
||||
s = id_card.strip().upper()
|
||||
if not _ID18_RE.match(s):
|
||||
return None
|
||||
|
||||
try:
|
||||
year = int(s[6:10])
|
||||
month = int(s[10:12])
|
||||
day = int(s[12:14])
|
||||
except ValueError:
|
||||
return None
|
||||
|
||||
try:
|
||||
birth = date(year, month, day)
|
||||
except ValueError:
|
||||
return None
|
||||
|
||||
ref = today or date.today()
|
||||
age = ref.year - birth.year
|
||||
if (ref.month, ref.day) < (birth.month, birth.day):
|
||||
age -= 1
|
||||
if age < 0 or age > 120:
|
||||
return None
|
||||
return age
|
||||
@@ -967,7 +967,15 @@ def _normalize_framework_contract_data(data: dict) -> None:
|
||||
data["amountWithTax"] = 0
|
||||
products = _get_field(data, "products", "productList") or []
|
||||
for product in products:
|
||||
if isinstance(product, dict):
|
||||
if not isinstance(product, dict):
|
||||
continue
|
||||
quantity_mode = (_get_field(product, "quantity_mode", "quantityMode") or "customer_demand").strip()
|
||||
price_mode = (_get_field(product, "price_mode", "priceMode") or "market").strip()
|
||||
product["quantityMode"] = quantity_mode
|
||||
product["priceMode"] = price_mode
|
||||
if quantity_mode == "customer_demand":
|
||||
product["quantity"] = 0
|
||||
if price_mode == "market":
|
||||
product["price"] = 0
|
||||
product["subtotal"] = 0
|
||||
product["taxAmount"] = 0
|
||||
@@ -981,10 +989,10 @@ def _validate_product_prices_by_contract_type(data: dict) -> None:
|
||||
for product in products:
|
||||
price = _decimal_value(_get_field(product, "price"))
|
||||
subtotal = _decimal_value(_get_field(product, "subtotal"))
|
||||
if price < Decimal("0.01"):
|
||||
raise ValueError("销售/采购合同产品的含税单价必须大于0")
|
||||
if subtotal < Decimal("0.01"):
|
||||
raise ValueError("销售/采购合同产品的含税总价必须大于0")
|
||||
if price < Decimal("0"):
|
||||
raise ValueError("销售/采购合同产品的含税单价不能为负数")
|
||||
if subtotal < Decimal("0"):
|
||||
raise ValueError("销售/采购合同产品的含税总价不能为负数")
|
||||
|
||||
|
||||
def _validate_sale_purchase_contract_amount(data: dict) -> None:
|
||||
@@ -992,8 +1000,8 @@ def _validate_sale_purchase_contract_amount(data: dict) -> None:
|
||||
if contract_type not in ("sale", "purchase"):
|
||||
return
|
||||
amount = _decimal_value(_get_field(data, "amount"))
|
||||
if amount < Decimal("0.01"):
|
||||
raise ValueError("销售合同或采购合同的合同金额必须大于0")
|
||||
if amount < Decimal("0"):
|
||||
raise ValueError("销售合同或采购合同的合同金额不能为负数")
|
||||
|
||||
|
||||
def _resolve_contract_product_ids(
|
||||
|
||||
@@ -33,11 +33,13 @@ def _row_to_dict(row: CrmContractProduct) -> Dict[str, Any]:
|
||||
"model": row.model or "",
|
||||
"unit": row.unit or "",
|
||||
"quantity": float(row.quantity) if row.quantity is not None else 0.0,
|
||||
"quantityMode": row.quantity_mode or "fixed",
|
||||
"price": float(row.price) if row.price is not None else 0.0,
|
||||
"discount": float(row.discount) if row.discount is not None else 0.0,
|
||||
"taxRate": float(row.tax_rate) if row.tax_rate is not None else 0.0,
|
||||
"taxAmount": float(row.tax_amount) if row.tax_amount is not None else 0.0,
|
||||
"subtotal": float(row.subtotal) if row.subtotal is not None else 0.0,
|
||||
"priceMode": row.price_mode or "fixed",
|
||||
"deliveryDate": row.delivery_date.strftime(_DATE_FMT) if row.delivery_date else "",
|
||||
"deliveryStatus": row.delivery_status or "",
|
||||
"deliveredQuantity": float(row.delivered_quantity) if row.delivered_quantity is not None else 0.0,
|
||||
@@ -234,11 +236,13 @@ def insert_contract_product(
|
||||
model=_get_field(data, "model") or "",
|
||||
unit=_get_field(data, "unit") or "件",
|
||||
quantity=quantity,
|
||||
quantity_mode=_get_field(data, "quantity_mode", "quantityMode") or "fixed",
|
||||
price=price,
|
||||
discount=discount,
|
||||
tax_rate=_decimal_value(_get_field(data, "tax_rate", "taxRate"), Decimal("6.00")),
|
||||
tax_amount=_decimal_value(_get_field(data, "tax_amount", "taxAmount"), Decimal("0")),
|
||||
subtotal=subtotal,
|
||||
price_mode=_get_field(data, "price_mode", "priceMode") or "fixed",
|
||||
delivery_date=_parse_optional_date(_get_field(data, "delivery_date", "deliveryDate")),
|
||||
delivery_status=_get_field(data, "delivery_status", "deliveryStatus") or "pending",
|
||||
delivered_quantity=_decimal_value(_get_field(data, "delivered_quantity", "deliveredQuantity"), Decimal("0")),
|
||||
|
||||
@@ -727,11 +727,13 @@ class CrmContractProduct(Base):
|
||||
model = Column(String(100), nullable=True, comment="规格型号")
|
||||
unit = Column(String(20), nullable=True, default="件", comment="单位")
|
||||
quantity = Column(DECIMAL(20, 4), nullable=False, comment="数量")
|
||||
quantity_mode = Column(String(20), nullable=True, default="fixed", comment="数量模式: customer_demand/fixed")
|
||||
price = Column(DECIMAL(15, 2), nullable=False, default=Decimal("0.00"), comment="单价")
|
||||
discount = Column(DECIMAL(5, 2), nullable=True, default=Decimal("0.00"), comment="折扣(%)")
|
||||
tax_rate = Column(DECIMAL(5, 2), nullable=True, default=Decimal("6.00"), comment="税率(%)")
|
||||
tax_amount = Column(DECIMAL(15, 2), nullable=True, default=Decimal("0.00"), comment="税费金额")
|
||||
subtotal = Column(DECIMAL(15, 2), nullable=False, default=Decimal("0.00"), comment="小计金额")
|
||||
price_mode = Column(String(20), nullable=True, default="fixed", comment="价格模式: market/fixed")
|
||||
delivery_date = Column(Date, nullable=True, comment="交付日期")
|
||||
delivery_status = Column(String(20), nullable=True, default="pending", comment="交付状态")
|
||||
delivered_quantity = Column(DECIMAL(20, 4), nullable=True, default=Decimal("0.0000"), comment="已交付数量")
|
||||
|
||||
@@ -32,12 +32,14 @@ class ContractProductItem(BaseModel):
|
||||
categoryName: Optional[str] = None
|
||||
model: Optional[str] = None
|
||||
unit: Optional[str] = None
|
||||
quantity: float = Field(default=1, gt=0)
|
||||
quantity: float = Field(default=1, ge=0)
|
||||
quantityMode: Optional[str] = Field(default="fixed")
|
||||
price: float = Field(default=0, ge=0)
|
||||
discount: Optional[float] = Field(default=0)
|
||||
taxRate: Optional[float] = Field(default=6.0)
|
||||
taxAmount: Optional[float] = Field(default=0)
|
||||
subtotal: Optional[float] = None
|
||||
priceMode: Optional[str] = Field(default="fixed")
|
||||
deliveryDate: Optional[str] = None
|
||||
deliveryStatus: Optional[str] = None
|
||||
deliveredQuantity: Optional[float] = None
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
"""运输计划 - 人员 upsert 与车辆-人员关联保存"""
|
||||
from __future__ import annotations
|
||||
|
||||
from datetime import datetime
|
||||
from typing import Optional
|
||||
|
||||
from fastapi import HTTPException
|
||||
from sqlalchemy.orm import Session
|
||||
|
||||
from app.core.id_card import calc_age_from_chinese_id_card
|
||||
from app.core.utils import generate_uuid
|
||||
from app.models.pl_models import PlPersonnel, PlVehiclePersonnel
|
||||
from app.schemas.pl.base_data import VehiclePersonnelRow
|
||||
@@ -219,3 +221,26 @@ def load_vehicle_personnel_summaries(
|
||||
return {
|
||||
vid: build_personnel_summary(items) for vid, items in grouped.items()
|
||||
}
|
||||
|
||||
|
||||
def refresh_personnel_ages_from_id_card(db: Session) -> int:
|
||||
"""按 18 位身份证号重算 pl_personnel.age,仅更新算出值与库中不一致的记录。返回更新条数。"""
|
||||
rows = (
|
||||
db.query(PlPersonnel)
|
||||
.filter(
|
||||
PlPersonnel.del_flag == 0,
|
||||
PlPersonnel.id_card_no.isnot(None),
|
||||
PlPersonnel.id_card_no != "",
|
||||
)
|
||||
.all()
|
||||
)
|
||||
now = datetime.now()
|
||||
updated = 0
|
||||
for row in rows:
|
||||
age = calc_age_from_chinese_id_card(row.id_card_no)
|
||||
if age is None or row.age == age:
|
||||
continue
|
||||
row.age = age
|
||||
row.update_time = now
|
||||
updated += 1
|
||||
return updated
|
||||
@@ -22,6 +22,7 @@ def init_scheduled_tasks(get_db_session):
|
||||
)
|
||||
from app.tasks.db_auto_plan import auto_generate_monthly_plans_job
|
||||
from app.tasks.pl_cert_expiry import scan_pl_cert_expiry_job
|
||||
from app.tasks.pl_personnel_age import refresh_personnel_ages_job
|
||||
|
||||
scheduler.add_job(
|
||||
check_customer_protect_time,
|
||||
@@ -29,6 +30,12 @@ def init_scheduled_tasks(get_db_session):
|
||||
id="check_customer_protect_time",
|
||||
replace_existing=True,
|
||||
)
|
||||
scheduler.add_job(
|
||||
refresh_personnel_ages_job,
|
||||
"cron", hour=1, minute=0,
|
||||
id="refresh_personnel_ages",
|
||||
replace_existing=True,
|
||||
)
|
||||
scheduler.add_job(
|
||||
auto_generate_monthly_plans_job,
|
||||
"cron", day=1, hour=1, minute=30,
|
||||
@@ -61,6 +68,7 @@ def init_scheduled_tasks(get_db_session):
|
||||
)
|
||||
logger.info(
|
||||
"已注册定时任务: check_customer_protect_time(01:00), "
|
||||
"refresh_personnel_ages(01:00), "
|
||||
"db_auto_generate_monthly_plans(每月1日01:30), "
|
||||
"pool_recovery_job(02:00), remind_customer_recycle(09:00), "
|
||||
"warn_customer_recycle(10:00), scan_pl_cert_expiry(08:00)"
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
"""驾押人员:按身份证号重算年龄"""
|
||||
import logging
|
||||
|
||||
from app.core.database import SessionLocal
|
||||
from app.services.pl_personnel_service import refresh_personnel_ages_from_id_card
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def refresh_personnel_ages_job():
|
||||
"""每日凌晨重算 pl_personnel 年龄(有合法 18 位身份证号的记录)。"""
|
||||
db = SessionLocal()
|
||||
try:
|
||||
logger.info("======== 开始执行驾押人员年龄重算任务 ========")
|
||||
updated = refresh_personnel_ages_from_id_card(db)
|
||||
db.commit()
|
||||
logger.info("驾押人员年龄重算完成,更新 %d 条", updated)
|
||||
except Exception:
|
||||
db.rollback()
|
||||
logger.exception("驾押人员年龄重算任务失败")
|
||||
raise
|
||||
finally:
|
||||
db.close()
|
||||
@@ -74,18 +74,28 @@
|
||||
"72": "Community 72",
|
||||
"73": "Community 73",
|
||||
"74": "Community 74",
|
||||
"75": "apply_crm_create_by_scope",
|
||||
"76": "opportunity_follow.py",
|
||||
"77": "Community 77",
|
||||
"78": "Community 78",
|
||||
"79": "PlCarrier",
|
||||
"80": "resolve_crm_product",
|
||||
"81": "customer_follow.py",
|
||||
"82": "storage.py",
|
||||
"83": "Community 83",
|
||||
"84": "Community 84",
|
||||
"85": "allocate_next_biz_no",
|
||||
"86": "Community 86",
|
||||
"87": "Community 87",
|
||||
"88": "CrmProduct",
|
||||
"89": "pl_ocr_service.py",
|
||||
"90": "SysApiRequestLog",
|
||||
"91": "pl_vehicle_recharge_service.py",
|
||||
"92": "Community 92",
|
||||
"93": "_invoice_info_by_customer_impl",
|
||||
"94": "response.py",
|
||||
"93": "list_products",
|
||||
"94": "assert_contract_editable_for_update",
|
||||
"95": "Community 95",
|
||||
"96": "__init__.py",
|
||||
"97": "_ensure_subpack_slip_no",
|
||||
"100": "price_letter_detail",
|
||||
"102": "dept.py",
|
||||
@@ -105,12 +115,8 @@
|
||||
"122": "Community 122",
|
||||
"125": "Community 125",
|
||||
"126": "customer_pool.py",
|
||||
"128": "plan.py",
|
||||
"129": "BaseStorage",
|
||||
"130": "datetime_parse.py",
|
||||
"132": "crm_supplier_hazard.py",
|
||||
"134": "Community 134",
|
||||
"135": "unsettled_plans_q_filter",
|
||||
"136": "Community 136",
|
||||
"137": "statistics.py",
|
||||
"138": "Community 138",
|
||||
@@ -118,9 +124,7 @@
|
||||
"141": "PlTransport",
|
||||
"144": "dict_data.py",
|
||||
"145": "resolve_crm_product",
|
||||
"146": "__init__.py",
|
||||
"147": "Community 147",
|
||||
"150": "apply_site_feedback",
|
||||
"151": "Community 151",
|
||||
"154": "response.py",
|
||||
"159": "customer_update",
|
||||
@@ -131,19 +135,14 @@
|
||||
"166": "code:block1 (/iflytek/shanxia2.0/backend)",
|
||||
"170": "test_quote_approver_setting.py",
|
||||
"171": "minio_url.py",
|
||||
"172": "apply_pl_scope",
|
||||
"173": "resolve_create_time_bounds",
|
||||
"174": "register_local_callback",
|
||||
"178": ".__init__",
|
||||
"179": "test_pl_vehicle_personnel_photo_schema.py",
|
||||
"180": "OSSStorage",
|
||||
"182": "statistics.py",
|
||||
"183": "resolve_create_time_bounds",
|
||||
"184": "excel_export.py",
|
||||
"187": "price_letter_detail",
|
||||
"188": "get_client_ip",
|
||||
"193": "storage.py",
|
||||
"200": "assert_contract_editable_for_update",
|
||||
"206": "crm_quote_pdf.py",
|
||||
"207": "shanxia2.0 后端骨架(FastAPI)",
|
||||
"220": "api_crypto_middleware.py",
|
||||
|
||||
@@ -0,0 +1,169 @@
|
||||
{
|
||||
"0": "Community 0",
|
||||
"1": "Community 1",
|
||||
"2": "Community 2",
|
||||
"3": "Community 3",
|
||||
"4": "Community 4",
|
||||
"5": "Community 5",
|
||||
"6": "Community 6",
|
||||
"7": "Community 7",
|
||||
"8": "Community 8",
|
||||
"9": "Community 9",
|
||||
"10": "Community 10",
|
||||
"11": "Community 11",
|
||||
"12": "Community 12",
|
||||
"13": "Community 13",
|
||||
"14": "Community 14",
|
||||
"15": "Community 15",
|
||||
"16": "Community 16",
|
||||
"17": "Community 17",
|
||||
"18": "Community 18",
|
||||
"19": "Community 19",
|
||||
"20": "Community 20",
|
||||
"21": "Community 21",
|
||||
"22": "Community 22",
|
||||
"23": "Community 23",
|
||||
"24": "Community 24",
|
||||
"25": "Community 25",
|
||||
"26": "Community 26",
|
||||
"27": "Community 27",
|
||||
"28": "Community 28",
|
||||
"29": "Community 29",
|
||||
"30": "Community 30",
|
||||
"31": "Community 31",
|
||||
"32": "Community 32",
|
||||
"33": "Community 33",
|
||||
"34": "Community 34",
|
||||
"35": "Community 35",
|
||||
"36": "Community 36",
|
||||
"37": "Community 37",
|
||||
"38": "Community 38",
|
||||
"39": "Community 39",
|
||||
"40": "Community 40",
|
||||
"41": "Community 41",
|
||||
"42": "Community 42",
|
||||
"43": "Community 43",
|
||||
"44": "Community 44",
|
||||
"45": "Community 45",
|
||||
"46": "Community 46",
|
||||
"47": "Community 47",
|
||||
"48": "Community 48",
|
||||
"49": "Community 49",
|
||||
"50": "Community 50",
|
||||
"51": "Community 51",
|
||||
"52": "Community 52",
|
||||
"53": "Community 53",
|
||||
"54": "Community 54",
|
||||
"55": "Community 55",
|
||||
"56": "Community 56",
|
||||
"57": "Community 57",
|
||||
"58": "Community 58",
|
||||
"59": "Community 59",
|
||||
"60": "Community 60",
|
||||
"61": "Community 61",
|
||||
"62": "Community 62",
|
||||
"63": "Community 63",
|
||||
"64": "Community 64",
|
||||
"65": "Community 65",
|
||||
"66": "Community 66",
|
||||
"67": "Community 67",
|
||||
"68": "Community 68",
|
||||
"69": "Community 69",
|
||||
"70": "Community 70",
|
||||
"71": "Community 71",
|
||||
"72": "Community 72",
|
||||
"73": "Community 73",
|
||||
"74": "Community 74",
|
||||
"77": "Community 77",
|
||||
"78": "Community 78",
|
||||
"83": "Community 83",
|
||||
"84": "Community 84",
|
||||
"86": "Community 86",
|
||||
"87": "Community 87",
|
||||
"89": "pl_ocr_service.py",
|
||||
"91": "pl_vehicle_recharge_service.py",
|
||||
"92": "Community 92",
|
||||
"95": "Community 95",
|
||||
"97": "_ensure_subpack_slip_no",
|
||||
"100": "price_letter_detail",
|
||||
"102": "dept.py",
|
||||
"104": "apply_crm_create_by_scope",
|
||||
"105": "list_customers",
|
||||
"107": "apply_pl_scope",
|
||||
"109": "Community 109",
|
||||
"110": "Base",
|
||||
"111": "Community 111",
|
||||
"112": "SysApiRequestLog",
|
||||
"113": "quote_share_log.py",
|
||||
"114": "db_models.py",
|
||||
"115": "site.py",
|
||||
"116": "Community 116",
|
||||
"118": "Community 118",
|
||||
"119": "Community 119",
|
||||
"122": "Community 122",
|
||||
"125": "Community 125",
|
||||
"126": "customer_pool.py",
|
||||
"128": "plan.py",
|
||||
"129": "BaseStorage",
|
||||
"130": "datetime_parse.py",
|
||||
"132": "crm_supplier_hazard.py",
|
||||
"134": "Community 134",
|
||||
"135": "unsettled_plans_q_filter",
|
||||
"136": "Community 136",
|
||||
"137": "statistics.py",
|
||||
"138": "Community 138",
|
||||
"139": "get_current_user_by_token",
|
||||
"141": "PlTransport",
|
||||
"144": "dict_data.py",
|
||||
"145": "resolve_crm_product",
|
||||
"147": "Community 147",
|
||||
"151": "Community 151",
|
||||
"154": "response.py",
|
||||
"159": "customer_update",
|
||||
"160": "register_local_callback",
|
||||
"161": "backfill_crm_contract_attachment_urls.py",
|
||||
"162": ".to_tenant_user_dict",
|
||||
"164": "get_client_ip",
|
||||
"166": "code:block1 (/iflytek/shanxia2.0/backend)",
|
||||
"170": "test_quote_approver_setting.py",
|
||||
"171": "minio_url.py",
|
||||
"173": "resolve_create_time_bounds",
|
||||
"174": "register_local_callback",
|
||||
"178": ".__init__",
|
||||
"179": "test_pl_vehicle_personnel_photo_schema.py",
|
||||
"180": "OSSStorage",
|
||||
"182": "statistics.py",
|
||||
"183": "resolve_create_time_bounds",
|
||||
"184": "excel_export.py",
|
||||
"187": "price_letter_detail",
|
||||
"188": "get_client_ip",
|
||||
"193": "storage.py",
|
||||
"206": "crm_quote_pdf.py",
|
||||
"207": "shanxia2.0 后端骨架(FastAPI)",
|
||||
"220": "api_crypto_middleware.py",
|
||||
"237": "order_status_compat.py",
|
||||
"239": "shanxia2.0 Backend 生产部署说明",
|
||||
"246": "db_collation.py",
|
||||
"254": "Activate.ps1",
|
||||
"263": "__init__.py",
|
||||
"264": "__init__.py",
|
||||
"304": "__init__.py",
|
||||
"305": "__init__.py",
|
||||
"306": "__init__.py",
|
||||
"307": "__init__.py",
|
||||
"308": "__init__.py",
|
||||
"309": "__init__.py",
|
||||
"310": "__init__.py",
|
||||
"311": "__init__.py",
|
||||
"312": "__init__.py",
|
||||
"495": "code:bash (cd /path/to/shanxia2.0)",
|
||||
"496": "code:bash (./start-prod.sh status # 查看状态)",
|
||||
"497": "code:bash (curl -s http://127.0.0.1:9111/health)",
|
||||
"498": "code:bash (cd /iflytek/shanxia2.0/backend)",
|
||||
"499": "code:bash (python -m venv venv)",
|
||||
"500": "code:bash (pip install -r requirements.txt)",
|
||||
"501": "code:env (# 数据库配置)",
|
||||
"502": "code:bash (uvicorn app.main:app --reload --port 8000)",
|
||||
"503": "BaseModel",
|
||||
"504": "PlanResourceSnapshotMixin"
|
||||
}
|
||||
@@ -0,0 +1,778 @@
|
||||
# Graph Report - backend (2026-08-19)
|
||||
|
||||
## Corpus Check
|
||||
- 329 files · ~218,395 words
|
||||
- Verdict: corpus is large enough that graph structure adds value.
|
||||
|
||||
## Summary
|
||||
- 4504 nodes · 16717 edges · 167 communities (148 shown, 19 thin omitted)
|
||||
- Extraction: 96% EXTRACTED · 4% INFERRED · 0% AMBIGUOUS · INFERRED: 748 edges (avg confidence: 0.62)
|
||||
- Token cost: 0 input · 0 output
|
||||
|
||||
## Graph Freshness
|
||||
- Built from commit: `a52fe77e`
|
||||
- Run `git rev-parse HEAD` and compare to check if the graph is stale.
|
||||
- Run `graphify update .` after code changes (no API cost).
|
||||
|
||||
## Community Hubs (Navigation)
|
||||
- [[_COMMUNITY_Community 0|Community 0]]
|
||||
- [[_COMMUNITY_Community 1|Community 1]]
|
||||
- [[_COMMUNITY_Community 2|Community 2]]
|
||||
- [[_COMMUNITY_Community 3|Community 3]]
|
||||
- [[_COMMUNITY_Community 4|Community 4]]
|
||||
- [[_COMMUNITY_Community 5|Community 5]]
|
||||
- [[_COMMUNITY_Community 6|Community 6]]
|
||||
- [[_COMMUNITY_Community 7|Community 7]]
|
||||
- [[_COMMUNITY_Community 8|Community 8]]
|
||||
- [[_COMMUNITY_Community 9|Community 9]]
|
||||
- [[_COMMUNITY_Community 10|Community 10]]
|
||||
- [[_COMMUNITY_Community 11|Community 11]]
|
||||
- [[_COMMUNITY_Community 12|Community 12]]
|
||||
- [[_COMMUNITY_Community 13|Community 13]]
|
||||
- [[_COMMUNITY_Community 14|Community 14]]
|
||||
- [[_COMMUNITY_Community 15|Community 15]]
|
||||
- [[_COMMUNITY_Community 16|Community 16]]
|
||||
- [[_COMMUNITY_Community 17|Community 17]]
|
||||
- [[_COMMUNITY_Community 18|Community 18]]
|
||||
- [[_COMMUNITY_Community 19|Community 19]]
|
||||
- [[_COMMUNITY_Community 20|Community 20]]
|
||||
- [[_COMMUNITY_Community 21|Community 21]]
|
||||
- [[_COMMUNITY_Community 22|Community 22]]
|
||||
- [[_COMMUNITY_Community 23|Community 23]]
|
||||
- [[_COMMUNITY_Community 24|Community 24]]
|
||||
- [[_COMMUNITY_Community 25|Community 25]]
|
||||
- [[_COMMUNITY_Community 26|Community 26]]
|
||||
- [[_COMMUNITY_Community 27|Community 27]]
|
||||
- [[_COMMUNITY_Community 28|Community 28]]
|
||||
- [[_COMMUNITY_Community 29|Community 29]]
|
||||
- [[_COMMUNITY_Community 30|Community 30]]
|
||||
- [[_COMMUNITY_Community 31|Community 31]]
|
||||
- [[_COMMUNITY_Community 32|Community 32]]
|
||||
- [[_COMMUNITY_Community 33|Community 33]]
|
||||
- [[_COMMUNITY_Community 34|Community 34]]
|
||||
- [[_COMMUNITY_Community 35|Community 35]]
|
||||
- [[_COMMUNITY_Community 36|Community 36]]
|
||||
- [[_COMMUNITY_Community 37|Community 37]]
|
||||
- [[_COMMUNITY_Community 38|Community 38]]
|
||||
- [[_COMMUNITY_Community 39|Community 39]]
|
||||
- [[_COMMUNITY_Community 40|Community 40]]
|
||||
- [[_COMMUNITY_Community 41|Community 41]]
|
||||
- [[_COMMUNITY_Community 42|Community 42]]
|
||||
- [[_COMMUNITY_Community 43|Community 43]]
|
||||
- [[_COMMUNITY_Community 44|Community 44]]
|
||||
- [[_COMMUNITY_Community 45|Community 45]]
|
||||
- [[_COMMUNITY_Community 46|Community 46]]
|
||||
- [[_COMMUNITY_Community 47|Community 47]]
|
||||
- [[_COMMUNITY_Community 48|Community 48]]
|
||||
- [[_COMMUNITY_Community 49|Community 49]]
|
||||
- [[_COMMUNITY_Community 50|Community 50]]
|
||||
- [[_COMMUNITY_Community 51|Community 51]]
|
||||
- [[_COMMUNITY_Community 52|Community 52]]
|
||||
- [[_COMMUNITY_Community 53|Community 53]]
|
||||
- [[_COMMUNITY_Community 54|Community 54]]
|
||||
- [[_COMMUNITY_Community 55|Community 55]]
|
||||
- [[_COMMUNITY_Community 56|Community 56]]
|
||||
- [[_COMMUNITY_Community 57|Community 57]]
|
||||
- [[_COMMUNITY_Community 58|Community 58]]
|
||||
- [[_COMMUNITY_Community 59|Community 59]]
|
||||
- [[_COMMUNITY_Community 60|Community 60]]
|
||||
- [[_COMMUNITY_Community 61|Community 61]]
|
||||
- [[_COMMUNITY_Community 62|Community 62]]
|
||||
- [[_COMMUNITY_Community 63|Community 63]]
|
||||
- [[_COMMUNITY_Community 64|Community 64]]
|
||||
- [[_COMMUNITY_Community 65|Community 65]]
|
||||
- [[_COMMUNITY_Community 66|Community 66]]
|
||||
- [[_COMMUNITY_Community 67|Community 67]]
|
||||
- [[_COMMUNITY_Community 68|Community 68]]
|
||||
- [[_COMMUNITY_Community 69|Community 69]]
|
||||
- [[_COMMUNITY_Community 70|Community 70]]
|
||||
- [[_COMMUNITY_Community 71|Community 71]]
|
||||
- [[_COMMUNITY_Community 72|Community 72]]
|
||||
- [[_COMMUNITY_Community 73|Community 73]]
|
||||
- [[_COMMUNITY_Community 74|Community 74]]
|
||||
- [[_COMMUNITY_Community 77|Community 77]]
|
||||
- [[_COMMUNITY_Community 78|Community 78]]
|
||||
- [[_COMMUNITY_Community 83|Community 83]]
|
||||
- [[_COMMUNITY_Community 84|Community 84]]
|
||||
- [[_COMMUNITY_Community 86|Community 86]]
|
||||
- [[_COMMUNITY_Community 87|Community 87]]
|
||||
- [[_COMMUNITY_pl_ocr_service.py|pl_ocr_service.py]]
|
||||
- [[_COMMUNITY_pl_vehicle_recharge_service.py|pl_vehicle_recharge_service.py]]
|
||||
- [[_COMMUNITY_Community 92|Community 92]]
|
||||
- [[_COMMUNITY_Community 95|Community 95]]
|
||||
- [[_COMMUNITY__ensure_subpack_slip_no|_ensure_subpack_slip_no]]
|
||||
- [[_COMMUNITY_price_letter_detail|price_letter_detail]]
|
||||
- [[_COMMUNITY_dept.py|dept.py]]
|
||||
- [[_COMMUNITY_apply_crm_create_by_scope|apply_crm_create_by_scope]]
|
||||
- [[_COMMUNITY_list_customers|list_customers]]
|
||||
- [[_COMMUNITY_apply_pl_scope|apply_pl_scope]]
|
||||
- [[_COMMUNITY_Community 109|Community 109]]
|
||||
- [[_COMMUNITY_Base|Base]]
|
||||
- [[_COMMUNITY_Community 111|Community 111]]
|
||||
- [[_COMMUNITY_SysApiRequestLog|SysApiRequestLog]]
|
||||
- [[_COMMUNITY_quote_share_log.py|quote_share_log.py]]
|
||||
- [[_COMMUNITY_db_models.py|db_models.py]]
|
||||
- [[_COMMUNITY_site.py|site.py]]
|
||||
- [[_COMMUNITY_Community 116|Community 116]]
|
||||
- [[_COMMUNITY_Community 118|Community 118]]
|
||||
- [[_COMMUNITY_Community 119|Community 119]]
|
||||
- [[_COMMUNITY_Community 122|Community 122]]
|
||||
- [[_COMMUNITY_Community 125|Community 125]]
|
||||
- [[_COMMUNITY_customer_pool.py|customer_pool.py]]
|
||||
- [[_COMMUNITY_plan.py|plan.py]]
|
||||
- [[_COMMUNITY_BaseStorage|BaseStorage]]
|
||||
- [[_COMMUNITY_datetime_parse.py|datetime_parse.py]]
|
||||
- [[_COMMUNITY_crm_supplier_hazard.py|crm_supplier_hazard.py]]
|
||||
- [[_COMMUNITY_Community 134|Community 134]]
|
||||
- [[_COMMUNITY_unsettled_plans_q_filter|unsettled_plans_q_filter]]
|
||||
- [[_COMMUNITY_Community 136|Community 136]]
|
||||
- [[_COMMUNITY_statistics.py|statistics.py]]
|
||||
- [[_COMMUNITY_Community 138|Community 138]]
|
||||
- [[_COMMUNITY_get_current_user_by_token|get_current_user_by_token]]
|
||||
- [[_COMMUNITY_PlTransport|PlTransport]]
|
||||
- [[_COMMUNITY_dict_data.py|dict_data.py]]
|
||||
- [[_COMMUNITY_resolve_crm_product|resolve_crm_product]]
|
||||
- [[_COMMUNITY_Community 147|Community 147]]
|
||||
- [[_COMMUNITY_Community 151|Community 151]]
|
||||
- [[_COMMUNITY_response.py|response.py]]
|
||||
- [[_COMMUNITY_customer_update|customer_update]]
|
||||
- [[_COMMUNITY_register_local_callback|register_local_callback]]
|
||||
- [[_COMMUNITY_backfill_crm_contract_attachment_urls.py|backfill_crm_contract_attachment_urls.py]]
|
||||
- [[_COMMUNITY_.to_tenant_user_dict|.to_tenant_user_dict]]
|
||||
- [[_COMMUNITY_get_client_ip|get_client_ip]]
|
||||
- [[_COMMUNITY_codeblock1 (iflytekshanxia2.0backend)|code:block1 (/iflytek/shanxia2.0/backend)]]
|
||||
- [[_COMMUNITY_test_quote_approver_setting.py|test_quote_approver_setting.py]]
|
||||
- [[_COMMUNITY_minio_url.py|minio_url.py]]
|
||||
- [[_COMMUNITY_resolve_create_time_bounds|resolve_create_time_bounds]]
|
||||
- [[_COMMUNITY_register_local_callback|register_local_callback]]
|
||||
- [[_COMMUNITY_.__init__|.__init__]]
|
||||
- [[_COMMUNITY_test_pl_vehicle_personnel_photo_schema.py|test_pl_vehicle_personnel_photo_schema.py]]
|
||||
- [[_COMMUNITY_OSSStorage|OSSStorage]]
|
||||
- [[_COMMUNITY_statistics.py|statistics.py]]
|
||||
- [[_COMMUNITY_resolve_create_time_bounds|resolve_create_time_bounds]]
|
||||
- [[_COMMUNITY_excel_export.py|excel_export.py]]
|
||||
- [[_COMMUNITY_price_letter_detail|price_letter_detail]]
|
||||
- [[_COMMUNITY_get_client_ip|get_client_ip]]
|
||||
- [[_COMMUNITY_storage.py|storage.py]]
|
||||
- [[_COMMUNITY_crm_quote_pdf.py|crm_quote_pdf.py]]
|
||||
- [[_COMMUNITY_shanxia2.0 后端骨架(FastAPI)|shanxia2.0 后端骨架(FastAPI)]]
|
||||
- [[_COMMUNITY_api_crypto_middleware.py|api_crypto_middleware.py]]
|
||||
- [[_COMMUNITY_order_status_compat.py|order_status_compat.py]]
|
||||
- [[_COMMUNITY_shanxia2.0 Backend 生产部署说明|shanxia2.0 Backend 生产部署说明]]
|
||||
- [[_COMMUNITY_db_collation.py|db_collation.py]]
|
||||
- [[_COMMUNITY___init__.py|__init__.py]]
|
||||
- [[_COMMUNITY___init__.py|__init__.py]]
|
||||
- [[_COMMUNITY_codebash (cd pathtoshanxia2.0)|code:bash (cd /path/to/shanxia2.0)]]
|
||||
- [[_COMMUNITY_codebash (.start-prod.sh status 查看状态)|code:bash (./start-prod.sh status # 查看状态)]]
|
||||
- [[_COMMUNITY_codebash (curl -s http127.0.0.19111health)|code:bash (curl -s http://127.0.0.1:9111/health)]]
|
||||
- [[_COMMUNITY_codebash (cd iflytekshanxia2.0backend)|code:bash (cd /iflytek/shanxia2.0/backend)]]
|
||||
- [[_COMMUNITY_codebash (python -m venv venv)|code:bash (python -m venv venv)]]
|
||||
- [[_COMMUNITY_codebash (pip install -r requirements.txt)|code:bash (pip install -r requirements.txt)]]
|
||||
- [[_COMMUNITY_codeenv ( 数据库配置)|code:env (# 数据库配置)]]
|
||||
- [[_COMMUNITY_codebash (uvicorn app.mainapp --reload --port 8000)|code:bash (uvicorn app.main:app --reload --port 8000)]]
|
||||
- [[_COMMUNITY_BaseModel|BaseModel]]
|
||||
- [[_COMMUNITY_PlanResourceSnapshotMixin|PlanResourceSnapshotMixin]]
|
||||
|
||||
## God Nodes (most connected - your core abstractions)
|
||||
1. `BaseModel` - 452 edges
|
||||
2. `get_tenant_no()` - 350 edges
|
||||
3. `success_response()` - 268 edges
|
||||
4. `DbUserContext` - 254 edges
|
||||
5. `error_response()` - 247 edges
|
||||
6. `generate_uuid()` - 194 edges
|
||||
7. `BxUserContext` - 188 edges
|
||||
8. `crm_user_info()` - 137 edges
|
||||
9. `assert_row_deletable_by_creator()` - 83 edges
|
||||
10. `ApiResponse` - 80 edges
|
||||
|
||||
## Surprising Connections (you probably didn't know these)
|
||||
- `MigrationStats` --uses--> `Settings` [INFERRED]
|
||||
scripts/migrate_bx_data.py → app/core/config.py
|
||||
- `StepStats` --uses--> `Settings` [INFERRED]
|
||||
scripts/migrate_bx_data.py → app/core/config.py
|
||||
- `MigrationStats` --uses--> `Settings` [INFERRED]
|
||||
scripts/migrate_crm_clue.py → app/core/config.py
|
||||
- `StepStats` --uses--> `Settings` [INFERRED]
|
||||
scripts/migrate_crm_clue.py → app/core/config.py
|
||||
- `MigrationStats` --uses--> `Settings` [INFERRED]
|
||||
scripts/migrate_crm_contract.py → app/core/config.py
|
||||
|
||||
## Import Cycles
|
||||
- None detected.
|
||||
|
||||
## Communities (167 total, 19 thin omitted)
|
||||
|
||||
### Community 0 - "Community 0"
|
||||
Cohesion: 0.14
|
||||
Nodes (36): check_document_expiry(), document_reminder_stats(), get_inventory_ledger(), get_summary(), list_document_reminders(), list_transactions(), list_warnings(), date (+28 more)
|
||||
|
||||
### Community 1 - "Community 1"
|
||||
Cohesion: 0.08
|
||||
Nodes (38): CRM 合同 API 路由 — GET/PUT/DELETE/POST 对齐原 Java CRM, 接口菜单权限守卫。super_admin 直接放行。, require_menu_code(), ContractApproverSettingSaveBody, ContractApprovalActionBody, ContractApprovalPassBody, ContractApprovalRejectBody, ContractApprovalTransferBody (+30 more)
|
||||
|
||||
### Community 2 - "Community 2"
|
||||
Cohesion: 0.13
|
||||
Nodes (35): _apply_inventory_product_update(), _apply_inventory_update(), _base_query(), create_inventory(), create_link_for_plan(), delete_inventory(), _generate_batch_no(), _get_inventory() (+27 more)
|
||||
|
||||
### Community 3 - "Community 3"
|
||||
Cohesion: 0.09
|
||||
Nodes (78): attachment_download_url(), attachment_preview_url(), create_dept(), create_dict_data(), create_dict_type(), create_menu(), create_menu_favorite(), create_post() (+70 more)
|
||||
|
||||
### Community 4 - "Community 4"
|
||||
Cohesion: 0.09
|
||||
Nodes (76): _apply_list_filters(), assign_opportunities(), batch_update_expect_date(), batch_update_stage(), change_stage(), create_opportunity(), _decimal_value(), _enrich_user_names() (+68 more)
|
||||
|
||||
### Community 5 - "Community 5"
|
||||
Cohesion: 0.10
|
||||
Nodes (59): _generate_notify_message(), PlPlan, PlPlanProduct, 计划产品明细表 pl_plan_product, PlanArchiveFreightBlock, PlanArchiveProductItem, PlanProductCreate, PlanTransportCreateBlock (+51 more)
|
||||
|
||||
### Community 6 - "Community 6"
|
||||
Cohesion: 0.11
|
||||
Nodes (48): assign_customer(), batch_claim_customers(), check_duplicate_customer(), claim_customer(), create_customer(), deal_customer(), _enrich_user_names(), _ensure_customer_in_scope() (+40 more)
|
||||
|
||||
### Community 7 - "Community 7"
|
||||
Cohesion: 0.04
|
||||
Nodes (173): clue_assign(), clue_convert(), clue_create(), clue_delete(), clue_detail(), clue_export(), clue_follow_create(), clue_follow_delete() (+165 more)
|
||||
|
||||
### Community 8 - "Community 8"
|
||||
Cohesion: 0.10
|
||||
Nodes (68): register_quote_routes(), accept_quote(), assert_quote_editable_for_update(), _build_quote_filters(), calculate_quote_amount(), create_new_version(), create_quote(), _decimal_value() (+60 more)
|
||||
|
||||
### Community 9 - "Community 9"
|
||||
Cohesion: 0.10
|
||||
Nodes (49): download_reimburse_import_template(), build_annotated_result_bytes(), build_applicant_label(), build_expense_path_labels(), build_import_template_bytes(), cell_str(), _ids_visible_in_web_tree(), import_reimburse_workbook() (+41 more)
|
||||
|
||||
### Community 10 - "Community 10"
|
||||
Cohesion: 0.11
|
||||
Nodes (37): approve_settlement_legacy(), cancel_settlement(), create_settlement(), delete_settlement(), disburse_settlement(), _generate_settlement_no(), get_settlement(), get_settlement_approval_flow() (+29 more)
|
||||
|
||||
### Community 11 - "Community 11"
|
||||
Cohesion: 0.10
|
||||
Nodes (55): cancel_apply(), create_apply(), create_disburse(), delete_applies(), delete_disburses(), get_apply(), get_disburse(), list_applies() (+47 more)
|
||||
|
||||
### Community 12 - "Community 12"
|
||||
Cohesion: 0.05
|
||||
Nodes (74): contact_add(), contact_delete(), contact_update(), customer_create(), customer_update(), customer_name_exists(), BaseModel, AttachmentUploadResponse (+66 more)
|
||||
|
||||
### Community 13 - "Community 13"
|
||||
Cohesion: 0.11
|
||||
Nodes (47): create_expense_item(), delete_expense_item(), get_expense_item(), get_expense_item_tree(), Session, update_expense_item(), approve_reimburse(), approved_by_me() (+39 more)
|
||||
|
||||
### Community 14 - "Community 14"
|
||||
Cohesion: 0.14
|
||||
Nodes (22): bx_health(), 报销(bx)API 路由聚合 — REST 风格,协议对齐 bx 原系统。, P0 健康检查:验证 bx 路由已挂载且响应协议为 code=0。, create_workflow(), delete_workflow(), get_workflow(), get_workflow_by_biz_type(), list_workflows() (+14 more)
|
||||
|
||||
### Community 15 - "Community 15"
|
||||
Cohesion: 0.11
|
||||
Nodes (16): BxReimburseApply, BxReimburseApproval, BxReimburseDetail, BxReimburseInvoice, BxReimburseOffset, 报销单勾选的发票附件(同一发票可勾选多个附件,各占一条)。, ReimburseApplyOut, ReimburseInvoiceBriefOut (+8 more)
|
||||
|
||||
### Community 16 - "Community 16"
|
||||
Cohesion: 0.09
|
||||
Nodes (60): cancel_apply(), create_apply(), create_record(), delete_applies(), delete_records(), get_apply(), get_record(), list_applies() (+52 more)
|
||||
|
||||
### Community 17 - "Community 17"
|
||||
Cohesion: 0.10
|
||||
Nodes (24): BxAdvanceApply, BxAdvanceApproval, AdvanceService, Any, Session, 同一节点多次审批时,取 approval_time 最新的一条作为当前节点状态。, 返回全部审批动作,按时间正序排列,用于展示完整审批历史。, filter_current_cycle_approvals() (+16 more)
|
||||
|
||||
### Community 18 - "Community 18"
|
||||
Cohesion: 0.11
|
||||
Nodes (37): advance_pending_approval_stats(), advance_status_counts(), approve_advance(), approved_by_me(), create_advance(), delete_advance(), _fill_offset_amounts(), get_advance() (+29 more)
|
||||
|
||||
### Community 19 - "Community 19"
|
||||
Cohesion: 0.11
|
||||
Nodes (31): advance_issue_stats(), batch_offset(), export_advance_issues(), issue_advance(), list_advance_issues(), list_advance_offset_records(), list_pending_payments(), list_processed_payments() (+23 more)
|
||||
|
||||
### Community 20 - "Community 20"
|
||||
Cohesion: 0.16
|
||||
Nodes (31): register_contract_routes(), batch_assign_owner(), batch_submit_contract_approval(), download_contract_pdf(), _ensure_contract_in_scope(), finish_contract(), get_contract_detail(), get_contract_row() (+23 more)
|
||||
|
||||
### Community 21 - "Community 21"
|
||||
Cohesion: 0.08
|
||||
Nodes (63): _alias_row_to_dict(), _assert_brand_deletable(), barcode_exists(), _brand_row_to_dict(), _build_category_tree(), category_code_exists(), _category_row_to_dict(), _collect_category_with_ancestors() (+55 more)
|
||||
|
||||
### Community 22 - "Community 22"
|
||||
Cohesion: 0.08
|
||||
Nodes (28): parse_admin_request_json(), Any, Request, 运营 Web(/web/admin)JSON 请求体解析。 与 ApiCryptoMiddleware 配合:中间件未改写 body 时,在路由内解密 `{, 读取 JSON body;dict 时走 resolve_request_payload(明文 / 密文 / data 包装)。 Returns:, ApiCryptoError, _b64url_decode(), _b64url_encode() (+20 more)
|
||||
|
||||
### Community 23 - "Community 23"
|
||||
Cohesion: 0.11
|
||||
Nodes (7): convert_heic_to_jpeg(), OSSStorage, process_image_content(), QiniuStorage, 文件存储工具模块 支持多种存储方式: 1. 本地存储 (local) - 默认 2. 七牛云存储 (qiniu) - 推荐生产环境使用 3. 阿里云OSS (, 将 HEIC/HEIF 格式转换为 JPEG 格式, 处理图片内容,如果是 HEIC 格式则转换为 JPEG
|
||||
|
||||
### Community 24 - "Community 24"
|
||||
Cohesion: 0.14
|
||||
Nodes (36): _apply_plan_product_update(), _apply_plan_update(), AutoGenerateMonthlyResult, _base_query(), create_plan(), delete_plan(), _generate_plan_no(), get_plan() (+28 more)
|
||||
|
||||
### Community 25 - "Community 25"
|
||||
Cohesion: 0.17
|
||||
Nodes (31): bind_vehicle_driver(), create_driver(), create_personnel(), delete_carrier(), delete_driver(), delete_personnel(), delete_vehicle(), get_driver() (+23 more)
|
||||
|
||||
### Community 26 - "Community 26"
|
||||
Cohesion: 0.05
|
||||
Nodes (89): day_detail(), delete_assignment(), duty_user_options(), _enrich_assign_names(), month_summary(), Session, 指定用户时补全 personName(用 nick_name)。, 值班可安排人员:仅「值班人员」角色下的启用用户。 (+81 more)
|
||||
|
||||
### Community 27 - "Community 27"
|
||||
Cohesion: 0.11
|
||||
Nodes (32): CRM 报价单 API 路由 — 挂接到 crm.router, QuoteApproverSettingSaveBody, QuoteAcceptBody, QuoteApprovalApproveBody, QuoteApprovalListBody, QuoteApprovalRefreshNamesBody, QuoteApprovalWithdrawBody, QuoteCreateBody (+24 more)
|
||||
|
||||
### Community 28 - "Community 28"
|
||||
Cohesion: 0.09
|
||||
Nodes (61): PlFreightSettlement, PlFreightSettlementApproval, PlFreightSettlementTransport, PlRemittanceVoucher, 运费结算表 pl_freight_settlement, 运费结算审批 pl_freight_settlement_approval, 结算单-运输关联表 pl_freight_settlement_transport, 汇款凭证表 pl_remittance_voucher (+53 more)
|
||||
|
||||
### Community 29 - "Community 29"
|
||||
Cohesion: 0.09
|
||||
Nodes (64): _apply_contract_entity_fields(), assert_contract_editable_for_update(), _build_contract_filters(), _build_contract_name_from_parties(), _build_customer_address(), _calc_amount_with_tax(), contract_no_exists(), _contract_period_key() (+56 more)
|
||||
|
||||
### Community 30 - "Community 30"
|
||||
Cohesion: 0.16
|
||||
Nodes (26): clear_target_categories(), compute_level(), count_target_rows(), derive_source_url(), fetch_portal_admin_id(), fetch_source_rows(), legacy_id_to_str(), load_runtime_settings() (+18 more)
|
||||
|
||||
### Community 31 - "Community 31"
|
||||
Cohesion: 0.18
|
||||
Nodes (17): get_oper_log_meta(), OperLogMeta, 请求级操作日志元数据(ContextVar), 供异步落库线程使用,避免 ContextVar 跨线程丢失。, set_oper_log_meta(), snapshot_oper_log_meta(), _format_summary(), oper_log() (+9 more)
|
||||
|
||||
### Community 32 - "Community 32"
|
||||
Cohesion: 0.21
|
||||
Nodes (17): apply_crm_create_by_scope(), _apply_list_filters(), create_supplier_info(), list_all_supplier_info(), list_supplier_info(), Any, Session, CRM 供方信息 CRUD — 对照 CrmSupplierInfoServiceImpl.java (+9 more)
|
||||
|
||||
### Community 33 - "Community 33"
|
||||
Cohesion: 0.14
|
||||
Nodes (20): ApiCryptoMiddleware, ApiRequestLogMiddleware, _claims_from_auth(), _format_body_bytes(), _persist_log(), Any, Request, 统一记录 API 请求/响应出入参的中间件 (+12 more)
|
||||
|
||||
### Community 34 - "Community 34"
|
||||
Cohesion: 0.13
|
||||
Nodes (17): 流程连线/转移 wf_transition, 流程实例 wf_process_instance, WfProcessInstance, WfTransition, _dispatch_local(), Any, 工作流回调服务 —— 流程状态变更时通知业务系统, 注册本地回调函数。当 callback_url 以 path 开头时直接调用 fn。 (+9 more)
|
||||
|
||||
### Community 35 - "Community 35"
|
||||
Cohesion: 0.18
|
||||
Nodes (36): clear_portal_workflow(), _dec(), derive_source_url(), fetch_portal_admin_id(), fetch_source_rows(), legacy_id_to_str(), load_bx_user_mapping(), load_runtime_settings() (+28 more)
|
||||
|
||||
### Community 36 - "Community 36"
|
||||
Cohesion: 0.15
|
||||
Nodes (27): 验证密码(哈希非 bcrypt 或损坏时返回 False,避免抛错), verify_password(), change_password(), create_user(), get_user(), get_user_with_relations(), _hash_password(), list_post_ids_for_user() (+19 more)
|
||||
|
||||
### Community 37 - "Community 37"
|
||||
Cohesion: 0.20
|
||||
Nodes (24): count_source_rows(), derive_source_url(), fetch_portal_admin_id(), fetch_source_rows(), legacy_id_to_str(), load_runtime_settings(), load_settings_env(), load_user_mapping() (+16 more)
|
||||
|
||||
### Community 38 - "Community 38"
|
||||
Cohesion: 0.34
|
||||
Nodes (30): AttachmentDownloadUrlBody, DeptCreateBody, DeptUpdateBody, DictDataCreateBody, DictDataUpdateBody, DictTypeCreateBody, DictTypeUpdateBody, MenuCreateBody (+22 more)
|
||||
|
||||
### Community 39 - "Community 39"
|
||||
Cohesion: 0.14
|
||||
Nodes (42): assign_clues(), check_convert(), check_duplicate_clue(), convert_clue(), create_clue(), _enrich_user_names(), _ensure_clue_in_scope(), create_clue_follow() (+34 more)
|
||||
|
||||
### Community 40 - "Community 40"
|
||||
Cohesion: 0.16
|
||||
Nodes (28): CRM 合同子模块路由 — 变更/模板/审批独立页, register_contract_sub_routes(), _change_row_to_dict(), create_contract_change(), execute_change(), export_contract_changes(), export_contract_templates(), _get_change_row() (+20 more)
|
||||
|
||||
### Community 41 - "Community 41"
|
||||
Cohesion: 0.12
|
||||
Nodes (15): category_add(), category_delete(), category_tree(), category_update(), product_delete(), 删除产品(支持单条 body.id 和批量 body.ids), CategoryDeleteBody, ProductAliasItem (+7 more)
|
||||
|
||||
### Community 42 - "Community 42"
|
||||
Cohesion: 0.19
|
||||
Nodes (32): _dec(), derive_source_url(), fetch_portal_admin_id(), fetch_source_rows(), legacy_id_to_str(), load_oss_id_to_url(), load_runtime_settings(), load_settings_env() (+24 more)
|
||||
|
||||
### Community 43 - "Community 43"
|
||||
Cohesion: 0.09
|
||||
Nodes (34): create_invoice(), delete_invoice(), get_mine_wallet_summary(), list_invoice_ledgers(), list_invoice_wallets(), list_invoices(), Request, Session (+26 more)
|
||||
|
||||
### Community 44 - "Community 44"
|
||||
Cohesion: 0.18
|
||||
Nodes (30): _dec(), derive_source_url(), fetch_portal_admin_id(), fetch_source_rows(), legacy_id_to_str(), legacy_parent_id(), load_oss_id_to_url(), load_runtime_settings() (+22 more)
|
||||
|
||||
### Community 45 - "Community 45"
|
||||
Cohesion: 0.09
|
||||
Nodes (70): _build_driver_url(), get_plan_arrange_info(), 获取计划已安排运输后的司机链接与地磅出入库关联(供查看弹窗复制简述/二维码)。, _apply_plan_logistics_from_payload(), _apply_transport_arrange_fields(), arrange_transport(), _assert_vehicle_carrier_eligible(), _build_arrange_result() (+62 more)
|
||||
|
||||
### Community 46 - "Community 46"
|
||||
Cohesion: 0.16
|
||||
Nodes (32): Settings, BaseSettings, apply_biz_backfill(), BackfillRule, BizRef, build_biz_index(), count_target_rows(), derive_source_url() (+24 more)
|
||||
|
||||
### Community 47 - "Community 47"
|
||||
Cohesion: 0.19
|
||||
Nodes (21): allocate_reimburse_title_seq(), format_reimburse_title(), generate_apply_code(), generate_title(), is_auto_reimburse_title(), parse_optional_date(), parse_reimburse_date(), preview_reimburse_title_seq() (+13 more)
|
||||
|
||||
### Community 48 - "Community 48"
|
||||
Cohesion: 0.29
|
||||
Nodes (12): build_name_pinyin_abbr(), normalize_name_pinyin_abbr(), 名称拼音首字母缩写:库内存小写,检索时大小写不敏感。, 保存时解析拼音字段。 - submitted_provided=True:用提交值(空则按 name 生成) - 否则:已有非空 existi, resolve_name_pinyin_abbr(), test_chinese_and_alnum(), test_empty_and_whitespace(), test_resolve_not_submitted_empty_existing_generates() (+4 more)
|
||||
|
||||
### Community 49 - "Community 49"
|
||||
Cohesion: 0.29
|
||||
Nodes (15): clue_statistics_level(), clue_statistics_overview(), clue_statistics_owner(), clue_statistics_source(), clue_statistics_trend(), _apply_create_range(), _base_query(), get_clue_level_statistics() (+7 more)
|
||||
|
||||
### Community 50 - "Community 50"
|
||||
Cohesion: 0.39
|
||||
Nodes (8): get_redis_client(), get_sync_redis_client(), Redis, 共享 Redis 客户端(同步:会话鉴权;异步:API 加密 nonce)。, 同步 Redis(auth 会话等,在线程池中调用)。, 异步 Redis(API 加密 nonce 等中间件)。, _redis_common_kwargs(), redis_enabled()
|
||||
|
||||
### Community 51 - "Community 51"
|
||||
Cohesion: 0.18
|
||||
Nodes (20): _cargo_stats(), get_dashboard_stats(), get_inbound_by_cargo(), get_inbound_by_partner_cargo(), get_outbound_by_cargo(), get_outbound_by_partner_cargo(), _partner_cargo_stats(), Session (+12 more)
|
||||
|
||||
### Community 52 - "Community 52"
|
||||
Cohesion: 0.18
|
||||
Nodes (29): _dec(), derive_source_url(), fetch_portal_admin_id(), fetch_source_rows(), legacy_id_to_str(), load_oss_id_to_url(), load_runtime_settings(), load_settings_env() (+21 more)
|
||||
|
||||
### Community 53 - "Community 53"
|
||||
Cohesion: 0.09
|
||||
Nodes (39): PlTransportProductBrandQty, PlTransportProductFeedback, 运输单按产品回传 pl_transport_product_feedback, 运输单产品回传品牌数量 pl_transport_product_brand_qty, load_brand_qtys_by_plan_product_ids(), persist_plan_product_brand_qtys(), Any, Decimal (+31 more)
|
||||
|
||||
### Community 54 - "Community 54"
|
||||
Cohesion: 0.18
|
||||
Nodes (29): _get_by_plan(), get_inbound(), get_inbound_by_plan(), _get_order(), get_outbound(), get_outbound_by_plan(), inbound_site_url(), list_inbound() (+21 more)
|
||||
|
||||
### Community 55 - "Community 55"
|
||||
Cohesion: 0.28
|
||||
Nodes (11): assert_products_allowed_for_supplier(), enrich_products_with_hazard_flags(), get_supplier_hazard_flags(), product_allowed(), Any, Session, 批量回填明细行 isToxic/isExplosive(来自产品主数据,供前端切换主体剔除)。, test_dual_requires_both() (+3 more)
|
||||
|
||||
### Community 56 - "Community 56"
|
||||
Cohesion: 0.17
|
||||
Nodes (11): price_letter_add(), price_letter_detail(), price_letter_list(), price_letter_update(), price_letter_void(), PriceLetterCreateBody, PriceLetterDetailBody, PriceLetterListBody (+3 more)
|
||||
|
||||
### Community 57 - "Community 57"
|
||||
Cohesion: 0.47
|
||||
Nodes (8): create_oss(), get_oss_by_id(), get_oss_by_url(), Session, 按主键 id 查询附件(兼容旧 CRM 雪花 oss_id 迁入后的记录), 将 fileUrl 或旧 CRM 数字 ossId 解析为 MinIO 相对路径。 门户新上传把相对路径写入业务字段;迁入合同附件仍存数字 ossId, resolve_storage_path(), SysOss
|
||||
|
||||
### Community 58 - "Community 58"
|
||||
Cohesion: 0.28
|
||||
Nodes (17): _address_to_read(), _build_address_query(), create_transport_address(), delete_transport_address(), _get_address(), get_transport_address(), list_all_transport_addresses(), list_transport_addresses() (+9 more)
|
||||
|
||||
### Community 59 - "Community 59"
|
||||
Cohesion: 0.20
|
||||
Nodes (28): _dec(), derive_source_url(), fetch_portal_admin_id(), fetch_source_rows(), legacy_id_to_str(), load_oss_id_to_url(), load_runtime_settings(), load_settings_env() (+20 more)
|
||||
|
||||
### Community 60 - "Community 60"
|
||||
Cohesion: 0.09
|
||||
Nodes (21): 分页查询供方列表 — Java: CrmSupplierInfoController.list, 供方全量列表(下拉)— Java: CrmSupplierInfoController.listAll, 供方详情 — Java: CrmSupplierInfoController.getInfo, 新增供方 — Java: CrmSupplierInfoController.add, 修改供方 — Java: CrmSupplierInfoController.edit, 删除供方 — Java: CrmSupplierInfoController.remove, 导出供方列表 — Java: CrmSupplierInfoController.export, supplier_info_add() (+13 more)
|
||||
|
||||
### Community 61 - "Community 61"
|
||||
Cohesion: 0.14
|
||||
Nodes (35): PlTransportDbLink, 运输-地磅出入库关联 pl_transport_db_link, _apply_plan_quantity_delta(), _create_db_inventory(), _create_db_plan(), DibangInventoryLinkResult, find_monthly_db_plan(), _generate_batch_no() (+27 more)
|
||||
|
||||
### Community 62 - "Community 62"
|
||||
Cohesion: 0.14
|
||||
Nodes (38): _apply_weighing_product_update(), _apply_weighing_update(), _base_query(), create_weighing(), delete_weighing(), _get_weighing(), get_weighing_related(), list_weighing() (+30 more)
|
||||
|
||||
### Community 64 - "Community 64"
|
||||
Cohesion: 0.30
|
||||
Nodes (15): paste_recognize_commit(), ConflictAction, PasteCommitBody, PasteCommitResult, PastePersonnelIn, PasteVehicleIn, 运输计划 - 三方粘贴识别提交 Schema, commit_paste_recognize() (+7 more)
|
||||
|
||||
### Community 65 - "Community 65"
|
||||
Cohesion: 0.10
|
||||
Nodes (65): menu_badge_stats(), Session, Session, recognize_cert(), RecognizeCertBody, cancel_apply(), create_apply(), create_process() (+57 more)
|
||||
|
||||
### Community 66 - "Community 66"
|
||||
Cohesion: 0.13
|
||||
Nodes (24): bind_biz(), delete_attachment(), download_file(), list_by_biz(), _parse_id_list(), preview_attachment(), Session, UploadFile (+16 more)
|
||||
|
||||
### Community 67 - "Community 67"
|
||||
Cohesion: 0.12
|
||||
Nodes (36): get_password_hash(), Namespace, build_merged_users(), bx_role_labels(), check_minio(), check_mysql(), check_redis(), _clip() (+28 more)
|
||||
|
||||
### Community 68 - "Community 68"
|
||||
Cohesion: 0.33
|
||||
Nodes (13): _build_tree(), _cascade_soft_delete(), _collect_with_ancestors(), create_dept(), get_dept(), list_depts(), list_depts_tree(), Any (+5 more)
|
||||
|
||||
### Community 69 - "Community 69"
|
||||
Cohesion: 0.13
|
||||
Nodes (28): _append_user_scope_conditions(), apply_data_scope(), _collect_scope_ids(), _get_child_dept_ids(), get_user_dept_id(), Session, 数据权限过滤(V0.3:基于角色 data_scope 的查询级行级过滤) data_scope 值: 1 = 全部数据 2 = 本部门数据 3, 合并多角色数据范围为 dept_ids / user_ids 并集。 (+20 more)
|
||||
|
||||
### Community 70 - "Community 70"
|
||||
Cohesion: 0.18
|
||||
Nodes (18): align_contract_no_to_sign_date(), generate_contract_no(), date, Java: generateContractNo — {供方编码}/X-JT{yyyyMMdd}{3位序号} 流水与撞号检测须含软删:uk_contr, 标准编号替换日期段,保留序号;非标准返回 None。, 将标准合同编号日期段对齐签订日;撞号则序号顺延(含软删查重)。 非标准编号原样返回。无签订日则原样返回。, replace_contract_no_date(), _mock_last_contract() (+10 more)
|
||||
|
||||
### Community 71 - "Community 71"
|
||||
Cohesion: 0.15
|
||||
Nodes (23): PlCert, CertRead, SnapshotCertRead, SnapshotPersonnelRow, certs_to_read(), list_owner_certs(), list_owner_certs_batch(), nearest_expire_date() (+15 more)
|
||||
|
||||
### Community 73 - "Community 73"
|
||||
Cohesion: 0.20
|
||||
Nodes (25): derive_source_url(), fetch_portal_admin_id(), fetch_source_rows(), legacy_id_to_str(), load_oss_id_to_url(), load_runtime_settings(), load_settings_env(), load_user_mapping() (+17 more)
|
||||
|
||||
### Community 74 - "Community 74"
|
||||
Cohesion: 0.56
|
||||
Nodes (8): build_menu_badge_counts(), count_document_reminder_expired_pending(), count_freight_approval_pending(), count_freight_disburse_pending(), _count_pending_applies(), count_plan_archive_pending(), count_plan_cert_pending(), Session
|
||||
|
||||
### Community 77 - "Community 77"
|
||||
Cohesion: 0.11
|
||||
Nodes (12): get_wechat_pay_client(), get_wechat_pay_v2(), Any, 微信支付工具模块 支持微信支付 V3 API 文档参考: https://pay.weixin.qq.com/docs/v3/apis/index.html, 统一下单接口 (V3) Args: out_trade_no: 商户订单号 total_amo, 申请退款 Args: out_trade_no: 商户订单号 total_amount: 订单, 小程序调起支付的二次签名参数(与公众号 JSAPI 规则一致), 统一下单 (V2 API) Args: out_trade_no: 商户订单号 total_f (+4 more)
|
||||
|
||||
### Community 78 - "Community 78"
|
||||
Cohesion: 0.24
|
||||
Nodes (18): _actor_ids(), _actor_names(), assert_row_deletable_by_creator(), assert_rows_deletable_by_creator(), can_delete_by_creator(), is_super_admin(), normalize_user_info(), Any (+10 more)
|
||||
|
||||
### Community 83 - "Community 83"
|
||||
Cohesion: 0.09
|
||||
Nodes (46): _advance_contract_after_approval(), approve_contract(), approve_contract_by_contract_id(), approve_pass(), approve_reject(), approve_transfer(), _build_approval_list_filters(), can_user_approve() (+38 more)
|
||||
|
||||
### Community 84 - "Community 84"
|
||||
Cohesion: 0.23
|
||||
Nodes (23): build_id_maps(), clip_text(), count_rows(), export_mapping(), fetch_rows(), legacy_id_to_str(), main(), map_id() (+15 more)
|
||||
|
||||
### Community 86 - "Community 86"
|
||||
Cohesion: 0.33
|
||||
Nodes (11): create_leave(), get_leave(), list_leaves(), Any, Session, _row_to_dict(), soft_delete_leave(), update_leave() (+3 more)
|
||||
|
||||
### Community 87 - "Community 87"
|
||||
Cohesion: 0.20
|
||||
Nodes (18): approve_quote(), create_approval_records(), delete_pending_approvals(), get_quote_approval(), list_quote_approvals(), Any, Session, CRM 报价单审批 CRUD — 对照 CrmQuoteApprovalServiceImpl.java (+10 more)
|
||||
|
||||
### Community 89 - "pl_ocr_service.py"
|
||||
Cohesion: 0.19
|
||||
Nodes (22): PlOcrUsageMonth, 阿里云 OCR 月度调用计数 pl_ocr_usage_month(按自然月全局统计), assert_quota_available(), _build_ocr_client(), compress_image_bytes(), current_usage_month(), _first_attachment_url(), get_or_create_usage_row() (+14 more)
|
||||
|
||||
### Community 91 - "pl_vehicle_recharge_service.py"
|
||||
Cohesion: 0.15
|
||||
Nodes (32): create_contact(), get_contact(), list_contacts_by_customer(), _parse_optional_date(), Any, date, Session, _row_to_dict() (+24 more)
|
||||
|
||||
### Community 92 - "Community 92"
|
||||
Cohesion: 0.20
|
||||
Nodes (21): _assert_users_exist(), get_setting(), Any, Session, _row_to_dict(), save_setting(), _assert_users_exist(), get_setting() (+13 more)
|
||||
|
||||
### Community 95 - "Community 95"
|
||||
Cohesion: 0.35
|
||||
Nodes (11): create_tenant(), get_tenant(), list_tenants(), Any, Session, _row_to_dict(), soft_delete_tenant(), tenant_no_exists() (+3 more)
|
||||
|
||||
### Community 97 - "_ensure_subpack_slip_no"
|
||||
Cohesion: 0.21
|
||||
Nodes (22): clear_target_products(), count_target_rows(), _dec(), derive_source_url(), fetch_portal_admin_id(), fetch_source_rows(), legacy_id_to_str(), load_runtime_settings() (+14 more)
|
||||
|
||||
### Community 100 - "price_letter_detail"
|
||||
Cohesion: 0.31
|
||||
Nodes (13): apply_renumber(), build_mapping(), fetch_products(), format_new_product_no(), load_settings_env(), main(), product_id_sort_key(), Engine (+5 more)
|
||||
|
||||
### Community 102 - "dept.py"
|
||||
Cohesion: 0.25
|
||||
Nodes (10): _cert_url_blank(), plan_has_hazard_product_exists(), plan_has_incomplete_hazard_cert_exists(), 证书 URL 为空(NULL / 空串 / 纯空白)。, 列表筛选:计划下存在 CRM 标识为易制毒/易制爆的产品。, 列表筛选:存在危化产品且至少一张必需证书未上传。, _compile(), 危化品证上传列表筛选:EXISTS 子查询应覆盖 CRM 危化标识与证书缺口。 (+2 more)
|
||||
|
||||
### Community 104 - "apply_crm_create_by_scope"
|
||||
Cohesion: 0.29
|
||||
Nodes (15): create_price_letter(), get_price_letter(), list_price_letters(), _parse_date(), Any, date, Session, _row_to_dict() (+7 more)
|
||||
|
||||
### Community 105 - "list_customers"
|
||||
Cohesion: 0.15
|
||||
Nodes (9): 微信消息通知服务 支持微信小程序模板消息推送 使用方式: from app.core.wechat_message import WechatMes, 发送订单状态通知 Args: openid: 用户openid order_n, 发送支付成功通知 Args: openid: 用户openid order_n, 发送配送通知 Args: openid: 配送员openid task_no:, 发送配送时效预警 Args: openid: 配送员openid task_n, 发送退款结果通知 Args: openid: 用户openid order_n, 发送催单通知给配送员 Args: deliver_openid: 配送员openid, 发送模板消息 Args: openid: 用户openid template_ (+1 more)
|
||||
|
||||
### Community 107 - "apply_pl_scope"
|
||||
Cohesion: 0.17
|
||||
Nodes (29): create_instance(), create_process_def(), create_task(), get_all_tasks_for_business(), get_instance(), get_latest_version(), get_nodes_by_version(), get_pending_tasks_by_node() (+21 more)
|
||||
|
||||
### Community 109 - "Community 109"
|
||||
Cohesion: 0.17
|
||||
Nodes (22): create_vehicle(), get_vehicle(), list_vehicles(), update_vehicle(), _vehicle_to_detail(), _vehicle_to_read(), PlVehicle, VehicleDetailRead (+14 more)
|
||||
|
||||
### Community 110 - "Base"
|
||||
Cohesion: 0.22
|
||||
Nodes (10): Config, decrypt_login_payload(), ensure_initialized(), extract_login_credentials(), get_public_pem(), Any, 登录凭据 RSA 解密(与前端 JSEncrypt PKCS#1 v1.5 兼容)。, Base64 密文 -> JSON 对象(须含 username、password、ts 毫秒时间戳)。 (+2 more)
|
||||
|
||||
### Community 111 - "Community 111"
|
||||
Cohesion: 0.28
|
||||
Nodes (14): _assert_editable(), _build_public_page(), _format_file_size(), _get_inventory_by_token(), get_public_inventory(), _parse_feedback_images(), Session, UploadFile (+6 more)
|
||||
|
||||
### Community 112 - "SysApiRequestLog"
|
||||
Cohesion: 0.36
|
||||
Nodes (7): list_ethnics(), Any, Session, 民族码表 CRUD(全局 sys_ethnic), _row_to_dict(), 民族码表 sys_ethnic(国标 GB/T 3304,全局), SysEthnic
|
||||
|
||||
### Community 113 - "quote_share_log.py"
|
||||
Cohesion: 0.26
|
||||
Nodes (12): list_share_logs(), _parse_user_agent(), Any, Session, CRM 报价单分享访问日志 CRUD — 对照 CrmQuoteShareLogServiceImpl.java, Java: statisticsVisits, 简易 User-Agent 解析(替代 Hutool UserAgentUtil), Java: queryLogsByQuoteId (+4 more)
|
||||
|
||||
### Community 114 - "db_models.py"
|
||||
Cohesion: 0.24
|
||||
Nodes (12): DbSequence, 地磅(db)模块数据模型 — 对齐 docs/sql/db_tables.sql, _allocate_inbound_outbound_id(), _ensure_sequence_row(), max_numeric_inbound_outbound_id(), next_inbound_outbound_id(), Session, 出入库单 id 生成 — 租户内纯数字自增,并发安全。 (+4 more)
|
||||
|
||||
### Community 115 - "site.py"
|
||||
Cohesion: 0.09
|
||||
Nodes (36): approve_carrier(), create_carrier(), get_carrier(), update_carrier(), PlCarrier, carrier_to_read(), CarrierBase, CarrierCreate (+28 more)
|
||||
|
||||
### Community 116 - "Community 116"
|
||||
Cohesion: 0.17
|
||||
Nodes (28): batch_insert_quote_products(), calculate_subtotal(), _decimal_value(), delete_products_by_quote_id(), _ensure_quote_parent_scope(), _get_field(), get_quote_product(), insert_quote_product() (+20 more)
|
||||
|
||||
### Community 118 - "Community 118"
|
||||
Cohesion: 0.20
|
||||
Nodes (24): batch_insert_contract_products(), calculate_subtotal(), _decimal_value(), delete_price_tiers_by_contract_id(), delete_products_by_contract_id(), _get_field(), insert_contract_product(), _letter_oss_ids_to_json() (+16 more)
|
||||
|
||||
### Community 119 - "Community 119"
|
||||
Cohesion: 0.16
|
||||
Nodes (28): CertRow, _cert_row_complete(), collect_required_cert_errors(), _find_cert_for_required(), get_required_personnel_cert_names(), match_required_cert_name(), _missing_field_labels(), Session (+20 more)
|
||||
|
||||
### Community 122 - "Community 122"
|
||||
Cohesion: 0.39
|
||||
Nodes (10): create_post(), get_post(), list_posts(), post_code_exists(), Any, Session, _row_to_dict(), soft_delete_post() (+2 more)
|
||||
|
||||
### Community 125 - "Community 125"
|
||||
Cohesion: 0.24
|
||||
Nodes (7): camel_to_snake(), CRUDBase, get_model_attr(), HistoryCRUD, Any, Session, ModelType
|
||||
|
||||
### Community 126 - "customer_pool.py"
|
||||
Cohesion: 0.36
|
||||
Nodes (13): _build_tree(), _cascade_soft_delete(), create_menu(), get_menu(), list_menus(), list_menus_tree(), menu_name_exists(), Any (+5 more)
|
||||
|
||||
### Community 128 - "plan.py"
|
||||
Cohesion: 0.39
|
||||
Nodes (10): create_site(), get_site(), list_sites(), Any, Session, _row_to_dict(), site_code_exists(), soft_delete_site() (+2 more)
|
||||
|
||||
### Community 129 - "BaseStorage"
|
||||
Cohesion: 0.12
|
||||
Nodes (24): _auto_contract_name_body(), generate_contract_name(), 按面板单位全称精确匹配交易主体/客户主数据,取 shortName;对不上则用全称。, 前端预览误用单位全称时,名称片段会等于面板/客户/开票全称。, 按面板供方(partyA)-需方(partyB)生成:{供方简称}-{需方简称}({合同编号})。 - 名称为空:按主数据简称自动生成 - 名, resolve_party_short_name(), _strip_contract_name_no_suffix(), _user_contract_name_uses_party_full_name() (+16 more)
|
||||
|
||||
### Community 130 - "datetime_parse.py"
|
||||
Cohesion: 0.19
|
||||
Nodes (18): operlog_detail(), operlog_list(), Session, 操作日志分页列表(基于 API 请求日志适配 RuoYi OperLog 结构), _user_info(), business_type_from_path(), title_from_path(), get_oper_log() (+10 more)
|
||||
|
||||
### Community 132 - "crm_supplier_hazard.py"
|
||||
Cohesion: 0.15
|
||||
Nodes (14): invoice_info_add(), invoice_info_by_customer(), _invoice_info_by_customer_impl(), invoice_info_delete(), invoice_info_list(), invoice_info_set_default(), invoice_info_update(), 按客户ID查询开票信息(与 by-customer 等价) (+6 more)
|
||||
|
||||
### Community 134 - "Community 134"
|
||||
Cohesion: 0.25
|
||||
Nodes (18): batch_generate_sample_codes(), batch_issue_sample_codes(), batch_revoke_sample_codes(), create_sample_code(), get_sample_code(), list_sample_codes(), _parse_issued_time(), Any (+10 more)
|
||||
|
||||
### Community 136 - "Community 136"
|
||||
Cohesion: 0.13
|
||||
Nodes (27): generate_uuid(), allocate_next_biz_no(), _format_biz_no(), _prefix_for(), datetime, Session, 业务协议号自动生成:XBCC / JZCC + YYYYMMDD + 6 位序号, 原子分配下一个业务协议号。 须在 create 事务内调用;使用 MySQL LAST_INSERT_ID 保证并发安全。 (+19 more)
|
||||
|
||||
### Community 137 - "statistics.py"
|
||||
Cohesion: 0.35
|
||||
Nodes (11): create_dict_type(), dict_type_code_exists(), get_dict_type(), list_dict_types(), Any, Session, 字典类型 CRUD(sys_dict_type), _row_to_dict() (+3 more)
|
||||
|
||||
### Community 138 - "Community 138"
|
||||
Cohesion: 0.33
|
||||
Nodes (19): check_python(), create_venv(), ensure_dirs(), ensure_valid_venv(), ensure_venv_and_runtime(), install_dependencies(), is_running(), log_error() (+11 more)
|
||||
|
||||
### Community 139 - "get_current_user_by_token"
|
||||
Cohesion: 0.22
|
||||
Nodes (15): get_storage(), download_file_bytes(), file_stream(), get_access_url(), get_download_url(), get_preview_url(), normalize_storage_path(), 报销附件存储适配 — 复用门户 app.core.storage,对外保持 bx 协议。 (+7 more)
|
||||
|
||||
### Community 141 - "PlTransport"
|
||||
Cohesion: 0.15
|
||||
Nodes (32): approve_task(), _assert_wf_instance_in_scope(), _business_type_label(), create_process_def(), delete_process_def(), _enrich_task_list(), get_business_all_tasks(), _get_business_form_fields() (+24 more)
|
||||
|
||||
### Community 144 - "dict_data.py"
|
||||
Cohesion: 0.27
|
||||
Nodes (11): create_dict_data(), get_dict_data(), list_dict_data(), list_dict_data_options(), Any, Session, 字典数据 CRUD(sys_dict_data), 字典下拉选项:租户主数据,忽略数据范围(user_info 保留兼容调用方,不参与过滤)。 (+3 more)
|
||||
|
||||
### Community 145 - "resolve_crm_product"
|
||||
Cohesion: 0.10
|
||||
Nodes (38): apply_dibang_prefill_to_order(), apply_site_feedback(), create_io_order_for_transport(), _dibang_qty_by_plan_product(), enrich_io_items_with_brand_feedback(), enrich_io_order_dict(), _format_io_product_summary_line(), get_active_io_order_for_plan() (+30 more)
|
||||
|
||||
### Community 147 - "Community 147"
|
||||
Cohesion: 0.37
|
||||
Nodes (17): check_env(), check_python(), create_venv(), init_env(), install_dependencies(), log_error(), log_info(), log_success() (+9 more)
|
||||
|
||||
### Community 154 - "response.py"
|
||||
Cohesion: 0.19
|
||||
Nodes (7): _guess_preview_content_type(), MinIOStorage, Any, 从 MINIO_BASE_URL 解析公网 endpoint;未配置或与内网相同时复用 self.client。, 按对象键后缀推断内联预览 Content-Type(纠正上传时未写入 MIME 的情况)。, MinIO 预签名下载 URL,携带原始文件名。, MinIO 预签名内联预览 URL(图片新标签页 / PDF iframe 等)。 上传时 put_object 未写 content_typ
|
||||
|
||||
### Community 159 - "customer_update"
|
||||
Cohesion: 0.08
|
||||
Nodes (31): list_public_vehicle_plates(), Session, 地磅公共只读:免登车牌 options(现场填写页), 免登:按出入库/计划解析 tenant_no,返回 pl_vehicle 车牌(self + carrier)。, _resolve_tenant_no(), API 路由包 — 山峡化工生产一体化门户, get_menu_list(), 运营端菜单接口(与 web-admin 前端静态路由 sqxp.ts 对齐,14 个一级菜单) (+23 more)
|
||||
|
||||
### Community 160 - "register_local_callback"
|
||||
Cohesion: 0.15
|
||||
Nodes (20): create_leave(), delete_leave(), get_leave(), _leave_local_callback(), leave_workflow_callback(), list_leaves(), Session, submit_leave() (+12 more)
|
||||
|
||||
### Community 161 - "backfill_crm_contract_attachment_urls.py"
|
||||
Cohesion: 0.29
|
||||
Nodes (10): normalize_attachment_csv(), extract_minio_object_key(), join_relative_urls(), MinIO 附件 URL 规范化(数据迁移共用)。 背景 ---- CRM / 地磅 / 报销与 shanxia2.0 共用同一 MinIO(bucket 默, 业务表 OSS ID 串 → 相对 URL 串(用于客户证照、跟进附件等)。, 去掉预签名 query(``?X-Amz-...``)。, 将绝对/相对 URL 规范为 MinIO object key(不含 bucket)。, resolve_oss_id_csv() (+2 more)
|
||||
|
||||
### Community 162 - ".to_tenant_user_dict"
|
||||
Cohesion: 0.42
|
||||
Nodes (7): default_settlement_clause(), test_advance_payment_clause(), test_arrive_payment_clause(), test_empty_falls_back_to_arrive(), test_monthly_settlement_clause_uses_label(), test_unknown_falls_back_to_arrive(), test_volume_quarterly_other_labels()
|
||||
|
||||
### Community 164 - "get_client_ip"
|
||||
Cohesion: 0.11
|
||||
Nodes (45): _avatar_url_field(), _build_user_info_payload(), change_current_user_password(), get_current_user_profile(), get_web_auth_menu_codes(), _jwt_user_payload(), logout(), public_quote_share() (+37 more)
|
||||
|
||||
### Community 170 - "test_quote_approver_setting.py"
|
||||
Cohesion: 0.22
|
||||
Nodes (3): BaseStorage, 带下载文件名的访问 URL;默认实现为普通访问地址。, 浏览器内联预览 URL;默认实现为普通访问地址。
|
||||
|
||||
### Community 171 - "minio_url.py"
|
||||
Cohesion: 0.09
|
||||
Nodes (34): get_current_time(), parse_datetime(), datetime, get_pool_record(), list_pool_records(), Any, Session, _row_to_dict() (+26 more)
|
||||
|
||||
### Community 173 - "resolve_create_time_bounds"
|
||||
Cohesion: 0.05
|
||||
Nodes (68): _build_page(), _get_by_token(), _make_handlers(), _models(), Session, 运输计划 · 入库/出库单现场免登录公共 API, SoftDeleteModel, BizAttachment (+60 more)
|
||||
|
||||
### Community 174 - "register_local_callback"
|
||||
Cohesion: 0.07
|
||||
Nodes (55): 返回 (作废, 归档)。现场链接实际走入库/出库单公共页。, _resolve_io_order_link_flags(), _build_public_page(), _build_site_product_read(), _format_file_size(), get_public_site(), _get_site_link_by_token(), _parse_feedback_images() (+47 more)
|
||||
|
||||
### Community 179 - "test_pl_vehicle_personnel_photo_schema.py"
|
||||
Cohesion: 0.27
|
||||
Nodes (16): add_favorite(), count_active(), find_active(), find_soft_deleted(), list_favorites(), _next_order_num(), normalize_menu_path(), Any (+8 more)
|
||||
|
||||
### Community 180 - "OSSStorage"
|
||||
Cohesion: 0.06
|
||||
Nodes (78): archive_plan(), cancel_plan(), cancel_plan_wait_notice(), count_plans_by_contract(), create_from_contract(), create_plan(), create_plan_full(), delete_plan() (+70 more)
|
||||
|
||||
### Community 182 - "statistics.py"
|
||||
Cohesion: 0.19
|
||||
Nodes (20): statistics_follow(), statistics_industry(), statistics_level(), statistics_overview(), statistics_owner(), statistics_source(), statistics_trend(), _customer_base_query() (+12 more)
|
||||
|
||||
### Community 183 - "resolve_create_time_bounds"
|
||||
Cohesion: 0.67
|
||||
Nodes (3): parse_optional_plan_datetime(), datetime, 运输计划相关日期时间解析:前端 date-picker 仅传 YYYY-MM-DD。
|
||||
|
||||
### Community 184 - "excel_export.py"
|
||||
Cohesion: 0.19
|
||||
Nodes (15): CRM 模块 Excel 导出列定义(字段与字典类型对齐 Java *Vo @ExcelDictFormat)。, _build_workbook(), DictLabelResolver, export_rows_to_xlsx_response(), ExportColumn, load_dict_label_maps(), Any, Session (+7 more)
|
||||
|
||||
### Community 188 - "get_client_ip"
|
||||
Cohesion: 0.30
|
||||
Nodes (10): get_last_month_range(), month_range(), date, Session, 地磅计划按月自动生成 — 迁移自 simple-dibang-xiaoshou/auto-create-plan/auto_create_monthly_pla, 按月自动生成采购计划。 - 默认仅在每月 1 日执行(force=True 时跳过该限制,供手动触发验收) - 遍历所有租户,按上月计划模板生, run_auto_generate_monthly_plans(), default_execution_status() (+2 more)
|
||||
|
||||
### Community 193 - "storage.py"
|
||||
Cohesion: 0.17
|
||||
Nodes (11): pool_customer_assign(), pool_customer_claim(), pool_customer_list(), pool_record_detail(), pool_record_list(), PoolAssignBody, PoolClaimBody, PoolCustomerListBody (+3 more)
|
||||
|
||||
### Community 206 - "crm_quote_pdf.py"
|
||||
Cohesion: 0.36
|
||||
Nodes (10): build_quote_html(), _default_value(), _format_date(), _format_discount(), _format_money(), generate_quote_pdf(), _get_pdf_styles(), Any (+2 more)
|
||||
|
||||
### Community 207 - "shanxia2.0 后端骨架(FastAPI)"
|
||||
Cohesion: 0.18
|
||||
Nodes (10): 1. 创建虚拟环境, 2. 安装依赖, 3. 配置环境变量, 4. 启动服务, API 路由分组, shanxia2.0 后端骨架(FastAPI), 开发规范, 快速开始 (+2 more)
|
||||
|
||||
### Community 220 - "api_crypto_middleware.py"
|
||||
Cohesion: 0.24
|
||||
Nodes (13): _claims_from_auth(), _coerce_post_method_override_to_get(), _get_redis_client(), _is_crypto_api(), _json_error_response(), _mark_nonce_once(), _nonce_key(), Redis (+5 more)
|
||||
|
||||
### Community 237 - "order_status_compat.py"
|
||||
Cohesion: 0.36
|
||||
Nodes (7): derive_legacy_status_from_three(), derive_three_status_from_legacy(), Decimal, 阶段A兼容:从旧 status 推导三字段。 约束:旧 status 本身混合了支付/配送/订单生命周期,因此只能尽力推断; 若业务侧已有更精确, 阶段A兼容:从三字段反推旧 status(用于旧前端/旧筛选参数兼容)。, ThreeStatus, _to_decimal()
|
||||
|
||||
### Community 239 - "shanxia2.0 Backend 生产部署说明"
|
||||
Cohesion: 0.25
|
||||
Nodes (7): 1. 上传到服务器, 2. 服务器首次启动, 3. 日常运维, 4. 配置文件, 5. 与 Nginx 配合, 6. 常见问题, shanxia2.0 Backend 生产部署说明
|
||||
|
||||
### Community 246 - "db_collation.py"
|
||||
Cohesion: 0.38
|
||||
Nodes (6): eq_unicode(), like_unicode(), MySQL 字符串比较/模糊匹配时统一排序规则,避免 Illegal mix of collations。, 跨表字符串等值比较(JOIN / WHERE)时统一为 utf8mb4_unicode_ci。, 将列显式设为 utf8mb4_unicode_ci。, unicode_ci()
|
||||
|
||||
## Knowledge Gaps
|
||||
- **30 isolated node(s):** `Config`, `Config`, `Config`, `Config`, `Config` (+25 more)
|
||||
These have ≤1 connection - possible missing edges or undocumented components.
|
||||
- **19 thin communities (<3 nodes) omitted from report** — run `graphify query` to explore isolated nodes.
|
||||
|
||||
## Suggested Questions
|
||||
_Questions this graph is uniquely positioned to answer:_
|
||||
|
||||
- **Why does `generate_uuid()` connect `Community 136` to `Community 0`, `plan.py`, `Community 4`, `Community 5`, `Community 6`, `Community 134`, `Community 8`, `statistics.py`, `Community 11`, `Community 14`, `Community 15`, `dict_data.py`, `Community 17`, `resolve_crm_product`, `Community 16`, `Community 21`, `Community 24`, `Community 25`, `Community 28`, `Community 29`, `Community 32`, `get_client_ip`, `Community 36`, `Community 39`, `Community 40`, `minio_url.py`, `Community 43`, `Community 45`, `resolve_create_time_bounds`, `Community 47`, `OSSStorage`, `Community 53`, `Community 57`, `Community 58`, `get_client_ip`, `Community 61`, `Community 62`, `Community 64`, `Community 65`, `Community 66`, `Community 67`, `Community 68`, `Community 71`, `Community 83`, `Community 86`, `Community 87`, `pl_ocr_service.py`, `pl_vehicle_recharge_service.py`, `Community 92`, `Community 95`, `apply_crm_create_by_scope`, `apply_pl_scope`, `Community 109`, `quote_share_log.py`, `db_models.py`, `site.py`, `Community 116`, `Community 118`, `Community 122`, `customer_pool.py`?**
|
||||
_High betweenness centrality (0.122) - this node is a cross-community bridge._
|
||||
- **Why does `get_tenant_no()` connect `Community 7` to `Community 0`, `Community 1`, `Community 2`, `Community 3`, `crm_supplier_hazard.py`, `Community 8`, `Community 10`, `Community 11`, `Community 12`, `Community 13`, `Community 14`, `Community 15`, `Community 16`, `Community 17`, `Community 18`, `Community 19`, `Community 20`, `Community 24`, `Community 25`, `Community 27`, `customer_update`, `Community 40`, `Community 41`, `Community 43`, `Community 45`, `Community 47`, `Community 49`, `Community 51`, `OSSStorage`, `statistics.py`, `Community 54`, `Community 56`, `Community 58`, `Community 60`, `Community 62`, `Community 64`, `storage.py`, `Community 66`, `Community 65`, `Community 109`, `site.py`?**
|
||||
_High betweenness centrality (0.097) - this node is a cross-community bridge._
|
||||
- **Why does `Settings` connect `Community 46` to `_ensure_subpack_slip_no`, `Community 35`, `Community 67`, `Community 37`, `price_letter_detail`, `Community 73`, `Community 42`, `Community 44`, `Base`, `Community 52`, `Community 59`, `Community 30`?**
|
||||
_High betweenness centrality (0.091) - this node is a cross-community bridge._
|
||||
- **Are the 8 inferred relationships involving `DbUserContext` (e.g. with `InventoryRelatedData` and `AutoGenerateMonthlyResult`) actually correct?**
|
||||
_`DbUserContext` has 8 INFERRED edges - model-reasoned connections that need verification._
|
||||
- **Are the 247 inferred relationships involving `ValueError` (e.g. with `.presigned_download_url()` and `.presigned_preview_url()`) actually correct?**
|
||||
_`ValueError` has 247 INFERRED edges - model-reasoned connections that need verification._
|
||||
- **What connects `API 路由包 — 山峡化工生产一体化门户`, `返回运营端角色下拉选项(label=库中角色名,value=Web 角色码)。`, `返回用户下拉选项(label=昵称,value=用户ID,附带 nickName/userNo)。 供申请人/审批人等选择场景使用,返回本租户全部有效` to the rest of the system?**
|
||||
_565 weakly-connected nodes found - possible documentation gaps or missing edges._
|
||||
- **Should `Community 0` be split into smaller, more focused modules?**
|
||||
_Cohesion score 0.1371794871794872 - nodes in this community are weakly interconnected._
|
||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -1,16 +1,16 @@
|
||||
# Graph Report - backend (2026-08-18)
|
||||
# Graph Report - backend (2026-08-19)
|
||||
|
||||
## Corpus Check
|
||||
- 329 files · ~217,783 words
|
||||
- 332 files · ~218,677 words
|
||||
- Verdict: corpus is large enough that graph structure adds value.
|
||||
|
||||
## Summary
|
||||
- 4491 nodes · 16684 edges · 173 communities (158 shown, 15 thin omitted)
|
||||
- Extraction: 96% EXTRACTED · 4% INFERRED · 0% AMBIGUOUS · INFERRED: 744 edges (avg confidence: 0.62)
|
||||
- 4516 nodes · 16740 edges · 172 communities (157 shown, 15 thin omitted)
|
||||
- Extraction: 96% EXTRACTED · 4% INFERRED · 0% AMBIGUOUS · INFERRED: 748 edges (avg confidence: 0.62)
|
||||
- Token cost: 0 input · 0 output
|
||||
|
||||
## Graph Freshness
|
||||
- Built from commit: `c3bd2c00`
|
||||
- Built from commit: `a52fe77e`
|
||||
- Run `git rev-parse HEAD` and compare to check if the graph is stale.
|
||||
- Run `graphify update .` after code changes (no API cost).
|
||||
|
||||
@@ -90,18 +90,28 @@
|
||||
- [[_COMMUNITY_Community 72|Community 72]]
|
||||
- [[_COMMUNITY_Community 73|Community 73]]
|
||||
- [[_COMMUNITY_Community 74|Community 74]]
|
||||
- [[_COMMUNITY_apply_crm_create_by_scope|apply_crm_create_by_scope]]
|
||||
- [[_COMMUNITY_opportunity_follow.py|opportunity_follow.py]]
|
||||
- [[_COMMUNITY_Community 77|Community 77]]
|
||||
- [[_COMMUNITY_Community 78|Community 78]]
|
||||
- [[_COMMUNITY_PlCarrier|PlCarrier]]
|
||||
- [[_COMMUNITY_resolve_crm_product|resolve_crm_product]]
|
||||
- [[_COMMUNITY_customer_follow.py|customer_follow.py]]
|
||||
- [[_COMMUNITY_storage.py|storage.py]]
|
||||
- [[_COMMUNITY_Community 83|Community 83]]
|
||||
- [[_COMMUNITY_Community 84|Community 84]]
|
||||
- [[_COMMUNITY_allocate_next_biz_no|allocate_next_biz_no]]
|
||||
- [[_COMMUNITY_Community 86|Community 86]]
|
||||
- [[_COMMUNITY_Community 87|Community 87]]
|
||||
- [[_COMMUNITY_CrmProduct|CrmProduct]]
|
||||
- [[_COMMUNITY_pl_ocr_service.py|pl_ocr_service.py]]
|
||||
- [[_COMMUNITY_SysApiRequestLog|SysApiRequestLog]]
|
||||
- [[_COMMUNITY_pl_vehicle_recharge_service.py|pl_vehicle_recharge_service.py]]
|
||||
- [[_COMMUNITY_Community 92|Community 92]]
|
||||
- [[_COMMUNITY__invoice_info_by_customer_impl|_invoice_info_by_customer_impl]]
|
||||
- [[_COMMUNITY_response.py|response.py]]
|
||||
- [[_COMMUNITY_list_products|list_products]]
|
||||
- [[_COMMUNITY_assert_contract_editable_for_update|assert_contract_editable_for_update]]
|
||||
- [[_COMMUNITY_Community 95|Community 95]]
|
||||
- [[_COMMUNITY___init__.py|__init__.py]]
|
||||
- [[_COMMUNITY__ensure_subpack_slip_no|_ensure_subpack_slip_no]]
|
||||
- [[_COMMUNITY_price_letter_detail|price_letter_detail]]
|
||||
- [[_COMMUNITY_dept.py|dept.py]]
|
||||
@@ -121,12 +131,8 @@
|
||||
- [[_COMMUNITY_Community 122|Community 122]]
|
||||
- [[_COMMUNITY_Community 125|Community 125]]
|
||||
- [[_COMMUNITY_customer_pool.py|customer_pool.py]]
|
||||
- [[_COMMUNITY_plan.py|plan.py]]
|
||||
- [[_COMMUNITY_BaseStorage|BaseStorage]]
|
||||
- [[_COMMUNITY_datetime_parse.py|datetime_parse.py]]
|
||||
- [[_COMMUNITY_crm_supplier_hazard.py|crm_supplier_hazard.py]]
|
||||
- [[_COMMUNITY_Community 134|Community 134]]
|
||||
- [[_COMMUNITY_unsettled_plans_q_filter|unsettled_plans_q_filter]]
|
||||
- [[_COMMUNITY_Community 136|Community 136]]
|
||||
- [[_COMMUNITY_statistics.py|statistics.py]]
|
||||
- [[_COMMUNITY_Community 138|Community 138]]
|
||||
@@ -134,9 +140,7 @@
|
||||
- [[_COMMUNITY_PlTransport|PlTransport]]
|
||||
- [[_COMMUNITY_dict_data.py|dict_data.py]]
|
||||
- [[_COMMUNITY_resolve_crm_product|resolve_crm_product]]
|
||||
- [[_COMMUNITY___init__.py|__init__.py]]
|
||||
- [[_COMMUNITY_Community 147|Community 147]]
|
||||
- [[_COMMUNITY_apply_site_feedback|apply_site_feedback]]
|
||||
- [[_COMMUNITY_Community 151|Community 151]]
|
||||
- [[_COMMUNITY_response.py|response.py]]
|
||||
- [[_COMMUNITY_customer_update|customer_update]]
|
||||
@@ -147,19 +151,14 @@
|
||||
- [[_COMMUNITY_codeblock1 (iflytekshanxia2.0backend)|code:block1 (/iflytek/shanxia2.0/backend)]]
|
||||
- [[_COMMUNITY_test_quote_approver_setting.py|test_quote_approver_setting.py]]
|
||||
- [[_COMMUNITY_minio_url.py|minio_url.py]]
|
||||
- [[_COMMUNITY_apply_pl_scope|apply_pl_scope]]
|
||||
- [[_COMMUNITY_resolve_create_time_bounds|resolve_create_time_bounds]]
|
||||
- [[_COMMUNITY_register_local_callback|register_local_callback]]
|
||||
- [[_COMMUNITY_.__init__|.__init__]]
|
||||
- [[_COMMUNITY_test_pl_vehicle_personnel_photo_schema.py|test_pl_vehicle_personnel_photo_schema.py]]
|
||||
- [[_COMMUNITY_OSSStorage|OSSStorage]]
|
||||
- [[_COMMUNITY_statistics.py|statistics.py]]
|
||||
- [[_COMMUNITY_resolve_create_time_bounds|resolve_create_time_bounds]]
|
||||
- [[_COMMUNITY_excel_export.py|excel_export.py]]
|
||||
- [[_COMMUNITY_price_letter_detail|price_letter_detail]]
|
||||
- [[_COMMUNITY_get_client_ip|get_client_ip]]
|
||||
- [[_COMMUNITY_storage.py|storage.py]]
|
||||
- [[_COMMUNITY_assert_contract_editable_for_update|assert_contract_editable_for_update]]
|
||||
- [[_COMMUNITY_crm_quote_pdf.py|crm_quote_pdf.py]]
|
||||
- [[_COMMUNITY_shanxia2.0 后端骨架(FastAPI)|shanxia2.0 后端骨架(FastAPI)]]
|
||||
- [[_COMMUNITY_api_crypto_middleware.py|api_crypto_middleware.py]]
|
||||
@@ -206,51 +205,51 @@
|
||||
## Import Cycles
|
||||
- None detected.
|
||||
|
||||
## Communities (173 total, 15 thin omitted)
|
||||
## Communities (172 total, 15 thin omitted)
|
||||
|
||||
### Community 0 - "Community 0"
|
||||
Cohesion: 0.14
|
||||
Nodes (35): check_document_expiry(), document_reminder_stats(), get_inventory_ledger(), get_summary(), list_document_reminders(), list_transactions(), list_warnings(), date (+27 more)
|
||||
Cohesion: 0.16
|
||||
Nodes (32): check_document_expiry(), document_reminder_stats(), get_inventory_ledger(), get_summary(), list_document_reminders(), list_transactions(), list_warnings(), date (+24 more)
|
||||
|
||||
### Community 1 - "Community 1"
|
||||
Cohesion: 0.06
|
||||
Nodes (64): CRM 合同 API 路由 — GET/PUT/DELETE/POST 对齐原 Java CRM, CRM 合同子模块路由 — 变更/模板/审批独立页, register_contract_sub_routes(), _change_row_to_dict(), create_contract_change(), execute_change(), export_contract_changes(), export_contract_templates() (+56 more)
|
||||
Cohesion: 0.08
|
||||
Nodes (46): CRM 合同 API 路由 — GET/PUT/DELETE/POST 对齐原 Java CRM, CRM 合同子模块路由 — 变更/模板/审批独立页, register_contract_sub_routes(), total_pages(), ContractApproverSettingSaveBody, ContractApprovalActionBody, ContractApprovalExportBody, ContractApprovalListQuery (+38 more)
|
||||
|
||||
### Community 2 - "Community 2"
|
||||
Cohesion: 0.18
|
||||
Nodes (30): _apply_inventory_product_update(), _apply_inventory_update(), _base_query(), create_inventory(), create_link_for_plan(), delete_inventory(), _generate_batch_no(), _get_inventory() (+22 more)
|
||||
Cohesion: 0.20
|
||||
Nodes (25): _apply_inventory_product_update(), _apply_inventory_update(), _base_query(), create_inventory(), create_link_for_plan(), delete_inventory(), _generate_batch_no(), _get_inventory() (+17 more)
|
||||
|
||||
### Community 3 - "Community 3"
|
||||
Cohesion: 0.09
|
||||
Nodes (96): attachment_download_url(), attachment_preview_url(), AttachmentDownloadUrlBody, create_dept(), create_dict_data(), create_dict_type(), create_menu(), create_menu_favorite() (+88 more)
|
||||
Cohesion: 0.08
|
||||
Nodes (102): attachment_download_url(), attachment_preview_url(), AttachmentDownloadUrlBody, create_dept(), create_dict_data(), create_dict_type(), create_menu(), create_menu_favorite() (+94 more)
|
||||
|
||||
### Community 4 - "Community 4"
|
||||
Cohesion: 0.09
|
||||
Nodes (76): _apply_list_filters(), assign_opportunities(), batch_update_expect_date(), batch_update_stage(), change_stage(), create_opportunity(), _decimal_value(), _enrich_user_names() (+68 more)
|
||||
Cohesion: 0.12
|
||||
Nodes (61): _apply_list_filters(), assign_opportunities(), batch_update_expect_date(), batch_update_stage(), change_stage(), create_opportunity(), _decimal_value(), _enrich_user_names() (+53 more)
|
||||
|
||||
### Community 5 - "Community 5"
|
||||
Cohesion: 0.09
|
||||
Nodes (66): update_plan(), PlPlan, PlPlanProduct, PlVehicle, 计划产品明细表 pl_plan_product, PlanArchiveFreightBlock, PlanArchiveProductItem, PlanContractLink (+58 more)
|
||||
Cohesion: 0.38
|
||||
Nodes (6): 解析司机:显式选择优先,否则取车辆关联司机;均无则允许为空。, _resolve_driver(), 运输计划解析司机:车辆未关联司机时允许为空。, 未显式选司机、车辆也无关联司机时,应返回空三元组而非 400。, test_resolve_driver_with_explicit_id_returns_personnel(), test_resolve_driver_without_vehicle_link_returns_none()
|
||||
|
||||
### Community 6 - "Community 6"
|
||||
Cohesion: 0.13
|
||||
Nodes (44): assign_customer(), batch_claim_customers(), check_duplicate_customer(), claim_customer(), create_customer(), deal_customer(), _enrich_user_names(), _ensure_customer_in_scope() (+36 more)
|
||||
Cohesion: 0.18
|
||||
Nodes (32): assign_customer(), batch_claim_customers(), check_duplicate_customer(), claim_customer(), create_customer(), deal_customer(), _enrich_user_names(), _ensure_customer_in_scope() (+24 more)
|
||||
|
||||
### Community 7 - "Community 7"
|
||||
Cohesion: 0.04
|
||||
Nodes (209): clue_assign(), clue_check_convert(), clue_check_duplicate(), clue_convert(), clue_create(), clue_delete(), clue_detail(), clue_export() (+201 more)
|
||||
Cohesion: 0.03
|
||||
Nodes (216): clue_assign(), clue_check_convert(), clue_check_duplicate(), clue_convert(), clue_create(), clue_delete(), clue_detail(), clue_export() (+208 more)
|
||||
|
||||
### Community 8 - "Community 8"
|
||||
Cohesion: 0.10
|
||||
Nodes (67): register_quote_routes(), accept_quote(), assert_quote_editable_for_update(), _build_quote_filters(), calculate_quote_amount(), create_new_version(), create_quote(), _decimal_value() (+59 more)
|
||||
Cohesion: 0.09
|
||||
Nodes (55): MinIO 预签名内联预览 URL(图片新标签页 / PDF iframe 等)。 上传时 put_object 未写 content_typ, assert_quote_editable_for_update(), _build_quote_filters(), calculate_quote_amount(), create_new_version(), create_quote(), _decimal_value(), _enrich_contact_fields() (+47 more)
|
||||
|
||||
### Community 9 - "Community 9"
|
||||
Cohesion: 0.08
|
||||
Nodes (57): download_reimburse_import_template(), build_applicant_label(), build_expense_path_labels(), build_import_template_bytes(), cell_str(), import_reimburse_workbook(), is_example_row(), iter_data_rows() (+49 more)
|
||||
Cohesion: 0.10
|
||||
Nodes (48): build_annotated_result_bytes(), build_applicant_label(), build_expense_path_labels(), build_import_template_bytes(), cell_str(), _ids_visible_in_web_tree(), import_reimburse_workbook(), is_example_row() (+40 more)
|
||||
|
||||
### Community 10 - "Community 10"
|
||||
Cohesion: 0.11
|
||||
Nodes (37): approve_settlement_legacy(), cancel_settlement(), create_settlement(), delete_settlement(), disburse_settlement(), _generate_settlement_no(), get_settlement(), get_settlement_approval_flow() (+29 more)
|
||||
Nodes (41): approve_settlement_legacy(), cancel_settlement(), create_settlement(), delete_settlement(), disburse_settlement(), _generate_settlement_no(), get_settlement(), get_settlement_approval_flow() (+33 more)
|
||||
|
||||
### Community 11 - "Community 11"
|
||||
Cohesion: 0.10
|
||||
@@ -258,75 +257,75 @@ Nodes (55): cancel_apply(), create_apply(), create_disburse(), delete_applies(),
|
||||
|
||||
### Community 12 - "Community 12"
|
||||
Cohesion: 0.05
|
||||
Nodes (72): customer_create(), customer_update(), customer_name_exists(), BaseModel, AttachmentUploadResponse, ChangePasswordRequest, Config, LoginRequest (+64 more)
|
||||
Nodes (71): contact_add(), contact_delete(), contact_update(), customer_delete(), BaseModel, AttachmentUploadResponse, ChangePasswordRequest, Config (+63 more)
|
||||
|
||||
### Community 13 - "Community 13"
|
||||
Cohesion: 0.11
|
||||
Nodes (37): approve_reimburse(), approved_by_me(), _build_details_data(), create_reimburse(), delete_reimburse(), get_approval_history(), get_approvals(), get_generated_title() (+29 more)
|
||||
Cohesion: 0.20
|
||||
Nodes (13): create_expense_item(), delete_expense_item(), get_expense_item(), get_expense_item_tree(), Session, update_expense_item(), BxExpenseItem, _coerce_id() (+5 more)
|
||||
|
||||
### Community 14 - "Community 14"
|
||||
Cohesion: 0.30
|
||||
Nodes (12): PlCarrier, assert_carrier_eligible_for_transport(), carrier_agreement_expired(), carrier_audit_approved(), carrier_eligible_for_transport(), carrier_qualification_complete(), date, 资质附件均为选填,保留函数签名供兼容调用。 (+4 more)
|
||||
Cohesion: 0.14
|
||||
Nodes (21): create_workflow(), delete_workflow(), get_workflow(), get_workflow_by_biz_type(), list_workflows(), Session, save_workflow_nodes(), update_workflow() (+13 more)
|
||||
|
||||
### Community 15 - "Community 15"
|
||||
Cohesion: 0.11
|
||||
Nodes (16): BxReimburseApply, BxReimburseApproval, BxReimburseDetail, BxReimburseInvoice, BxReimburseOffset, 报销单勾选的发票附件(同一发票可勾选多个附件,各占一条)。, ReimburseInvoiceBriefOut, ReimburseInvoiceLinkIn (+8 more)
|
||||
Cohesion: 0.12
|
||||
Nodes (15): BxReimburseApply, BxReimburseApproval, BxReimburseDetail, 报销单勾选的发票附件(同一发票可勾选多个附件,各占一条)。, ReimburseInvoiceBriefOut, ReimburseInvoiceLinkIn, Any, Session (+7 more)
|
||||
|
||||
### Community 16 - "Community 16"
|
||||
Cohesion: 0.14
|
||||
Nodes (40): PlVehicleRechargeApply, PlVehicleRechargeRecord, 车辆ETC/加油充值申请 pl_vehicle_recharge_apply, 车辆ETC/加油充值发放登记 pl_vehicle_recharge_record, Decimal, 发放登记页:申请单 + 关联发放信息(左连接), VehicleRechargeApplyCreate, VehicleRechargeApplyRead (+32 more)
|
||||
Cohesion: 0.09
|
||||
Nodes (60): cancel_apply(), create_apply(), create_record(), delete_applies(), delete_records(), get_apply(), get_record(), list_applies() (+52 more)
|
||||
|
||||
### Community 17 - "Community 17"
|
||||
Cohesion: 0.14
|
||||
Nodes (16): BxAdvanceApply, BxAdvanceApproval, AdvanceService, Any, Session, 同一节点多次审批时,取 approval_time 最新的一条作为当前节点状态。, 返回全部审批动作,按时间正序排列,用于展示完整审批历史。, apply_bx_scope() (+8 more)
|
||||
Cohesion: 0.52
|
||||
Nodes (6): parse_create_time_day_bounds(), _parse_day_start(), datetime, 报销模块日期范围工具(从 bx-backend 迁移)。, 解析申请时间筛选边界,返回 (含起, 不含止)。, resolve_create_time_bounds()
|
||||
|
||||
### Community 18 - "Community 18"
|
||||
Cohesion: 0.15
|
||||
Nodes (30): advance_pending_approval_stats(), advance_status_counts(), approve_advance(), approved_by_me(), create_advance(), delete_advance(), _fill_offset_amounts(), get_advance() (+22 more)
|
||||
Cohesion: 0.09
|
||||
Nodes (42): advance_pending_approval_stats(), advance_status_counts(), approve_advance(), approved_by_me(), create_advance(), delete_advance(), _fill_offset_amounts(), get_advance() (+34 more)
|
||||
|
||||
### Community 19 - "Community 19"
|
||||
Cohesion: 0.22
|
||||
Nodes (22): advance_issue_stats(), batch_offset(), export_advance_issues(), issue_advance(), list_advance_issues(), list_advance_offset_records(), list_pending_payments(), list_processed_payments() (+14 more)
|
||||
Cohesion: 0.08
|
||||
Nodes (62): advance_issue_stats(), batch_offset(), export_advance_issues(), issue_advance(), list_advance_issues(), list_advance_offset_records(), list_pending_payments(), list_processed_payments() (+54 more)
|
||||
|
||||
### Community 20 - "Community 20"
|
||||
Cohesion: 0.17
|
||||
Nodes (20): day_detail(), delete_assignment(), duty_user_options(), _enrich_assign_names(), month_summary(), Session, 指定用户时补全 personName(用 nick_name)。, 值班可安排人员:仅「值班人员」角色下的启用用户。 (+12 more)
|
||||
Cohesion: 0.09
|
||||
Nodes (51): register_contract_routes(), approve_contract_by_contract_id(), Java: approveContractByContractId, batch_assign_owner(), batch_submit_contract_approval(), create_from_opportunity(), create_from_quote(), download_contract_pdf() (+43 more)
|
||||
|
||||
### Community 21 - "Community 21"
|
||||
Cohesion: 0.06
|
||||
Nodes (76): _alias_row_to_dict(), _assert_brand_deletable(), barcode_exists(), _brand_row_to_dict(), _build_category_tree(), category_code_exists(), _category_row_to_dict(), _collect_category_with_ancestors() (+68 more)
|
||||
Cohesion: 0.14
|
||||
Nodes (34): _assert_brand_deletable(), barcode_exists(), category_code_exists(), _category_row_to_dict(), create_category(), create_oss(), create_product(), generate_auto_product_no() (+26 more)
|
||||
|
||||
### Community 22 - "Community 22"
|
||||
Cohesion: 0.08
|
||||
Nodes (28): parse_admin_request_json(), Any, Request, 运营 Web(/web/admin)JSON 请求体解析。 与 ApiCryptoMiddleware 配合:中间件未改写 body 时,在路由内解密 `{, 读取 JSON body;dict 时走 resolve_request_payload(明文 / 密文 / data 包装)。 Returns:, ApiCryptoError, _b64url_decode(), _b64url_encode() (+20 more)
|
||||
|
||||
### Community 23 - "Community 23"
|
||||
Cohesion: 0.11
|
||||
Nodes (7): convert_heic_to_jpeg(), OSSStorage, process_image_content(), QiniuStorage, 文件存储工具模块 支持多种存储方式: 1. 本地存储 (local) - 默认 2. 七牛云存储 (qiniu) - 推荐生产环境使用 3. 阿里云OSS (, 将 HEIC/HEIF 格式转换为 JPEG 格式, 处理图片内容,如果是 HEIC 格式则转换为 JPEG
|
||||
Cohesion: 0.14
|
||||
Nodes (5): LocalStorage, process_image_content(), Path, 带下载文件名的访问 URL;默认实现为普通访问地址。, 处理图片内容,如果是 HEIC 格式则转换为 JPEG
|
||||
|
||||
### Community 24 - "Community 24"
|
||||
Cohesion: 0.17
|
||||
Nodes (31): _apply_plan_product_update(), _apply_plan_update(), AutoGenerateMonthlyResult, _base_query(), create_plan(), _generate_plan_no(), get_plan(), _get_plan_by_id_only() (+23 more)
|
||||
Cohesion: 0.13
|
||||
Nodes (40): _apply_plan_update(), AutoGenerateMonthlyResult, _base_query(), create_plan(), delete_plan(), _generate_plan_no(), get_plan(), _get_plan_by_id_only() (+32 more)
|
||||
|
||||
### Community 25 - "Community 25"
|
||||
Cohesion: 0.13
|
||||
Nodes (28): generate_uuid(), PlInventoryTransaction, 库存流水表 pl_inventory_transaction, load_brand_qtys_by_plan_product_ids(), persist_plan_product_brand_qtys(), Any, Decimal, Session (+20 more)
|
||||
Cohesion: 0.18
|
||||
Nodes (31): bind_vehicle_driver(), create_driver(), create_personnel(), delete_carrier(), delete_driver(), delete_personnel(), delete_vehicle(), get_driver() (+23 more)
|
||||
|
||||
### Community 26 - "Community 26"
|
||||
Cohesion: 0.20
|
||||
Nodes (31): DutyAssignment, DutyDay, DutySlot, 值班排班模型 — docs/superpowers/specs/2026-08-14-duty-schedule-design.md, assert_user_is_duty_staff(), _assignment_dict(), build_public_url(), _count_active_assignments() (+23 more)
|
||||
Cohesion: 0.08
|
||||
Nodes (68): day_detail(), delete_assignment(), duty_user_options(), _enrich_assign_names(), month_summary(), Session, 指定用户时补全 personName(用 nick_name)。, 值班可安排人员:仅「值班人员」角色下的启用用户。 (+60 more)
|
||||
|
||||
### Community 27 - "Community 27"
|
||||
Cohesion: 0.10
|
||||
Nodes (34): CRM 报价单 API 路由 — 挂接到 crm.router, 接口菜单权限守卫。super_admin 直接放行。, require_menu_code(), QuoteApproverSettingSaveBody, QuoteAcceptBody, QuoteApprovalApproveBody, QuoteApprovalListBody, QuoteApprovalRefreshNamesBody (+26 more)
|
||||
Cohesion: 0.11
|
||||
Nodes (32): CRM 报价单 API 路由 — 挂接到 crm.router, QuoteApproverSettingSaveBody, QuoteAcceptBody, QuoteApprovalApproveBody, QuoteApprovalListBody, QuoteApprovalRefreshNamesBody, QuoteApprovalWithdrawBody, QuoteCreateBody (+24 more)
|
||||
|
||||
### Community 28 - "Community 28"
|
||||
Cohesion: 0.10
|
||||
Nodes (59): PlFreightSettlement, PlFreightSettlementApproval, PlRemittanceVoucher, 运费结算表 pl_freight_settlement, 运费结算审批 pl_freight_settlement_approval, 汇款凭证表 pl_remittance_voucher, _advance_after_approval(), _approval_to_dict() (+51 more)
|
||||
Cohesion: 0.08
|
||||
Nodes (71): PlFreightSettlement, PlFreightSettlementApproval, PlFreightSettlementTransport, PlRemittanceVoucher, 运费结算表 pl_freight_settlement, 运费结算审批 pl_freight_settlement_approval, 结算单-运输关联表 pl_freight_settlement_transport, 汇款凭证表 pl_remittance_voucher (+63 more)
|
||||
|
||||
### Community 29 - "Community 29"
|
||||
Cohesion: 0.07
|
||||
Nodes (95): register_contract_routes(), _apply_contract_entity_fields(), delete_pending_approvals(), Java: withdraw — 软删除 pending 审批, batch_assign_owner(), batch_submit_contract_approval(), _build_contract_filters(), _build_contract_name_from_parties() (+87 more)
|
||||
Cohesion: 0.11
|
||||
Nodes (60): _apply_contract_entity_fields(), _build_contract_filters(), _build_contract_name_from_parties(), _build_customer_address(), _calc_amount_with_tax(), _change_row_to_dict(), contract_no_exists(), _contract_period_key() (+52 more)
|
||||
|
||||
### Community 30 - "Community 30"
|
||||
Cohesion: 0.16
|
||||
@@ -337,16 +336,16 @@ Cohesion: 0.18
|
||||
Nodes (17): get_oper_log_meta(), OperLogMeta, 请求级操作日志元数据(ContextVar), 供异步落库线程使用,避免 ContextVar 跨线程丢失。, set_oper_log_meta(), snapshot_oper_log_meta(), _format_summary(), oper_log() (+9 more)
|
||||
|
||||
### Community 32 - "Community 32"
|
||||
Cohesion: 0.22
|
||||
Nodes (18): apply_crm_create_by_scope(), _apply_list_filters(), create_supplier_info(), get_supplier_info(), list_all_supplier_info(), list_supplier_info(), Any, Session (+10 more)
|
||||
Cohesion: 0.21
|
||||
Nodes (16): _apply_list_filters(), create_supplier_info(), list_all_supplier_info(), list_supplier_info(), Any, Session, CRM 供方信息 CRUD — 对照 CrmSupplierInfoServiceImpl.java, Java: queryList(不分页,报价单下拉) (+8 more)
|
||||
|
||||
### Community 33 - "Community 33"
|
||||
Cohesion: 0.20
|
||||
Nodes (16): ApiCryptoMiddleware, ApiRequestLogMiddleware, _claims_from_auth(), _format_body_bytes(), _persist_log(), Any, Request, 统一记录 API 请求/响应出入参的中间件 (+8 more)
|
||||
Cohesion: 0.14
|
||||
Nodes (25): _claims_from_auth(), _format_body_bytes(), _persist_log(), Any, Request, 统一记录 API 请求/响应出入参的中间件, _redact_obj(), _schedule_persist_log() (+17 more)
|
||||
|
||||
### Community 34 - "Community 34"
|
||||
Cohesion: 0.16
|
||||
Nodes (13): create_instance(), 流程连线/转移 wf_transition, 流程实例 wf_process_instance, WfProcessInstance, WfTransition, _dispatch_local(), Any, 尝试本地直调。返回 True 表示已处理,False 表示无匹配的本地回调。 (+5 more)
|
||||
Cohesion: 0.11
|
||||
Nodes (26): ProcessDefCreateBody, ProcessDefUpdateBody, PublishVersionBody, StartInstanceBody, 数据模型(与 docs/sql/shanxia2.0.sql 全库导出基线对齐的核心系统表), Web 管理端约定角色(由 sys_role.role_name 映射而来,非数据库枚举), 流程定义版本 wf_process_version, 流程实例 wf_process_instance (+18 more)
|
||||
|
||||
### Community 35 - "Community 35"
|
||||
Cohesion: 0.18
|
||||
@@ -361,28 +360,28 @@ Cohesion: 0.20
|
||||
Nodes (24): count_source_rows(), derive_source_url(), fetch_portal_admin_id(), fetch_source_rows(), legacy_id_to_str(), load_runtime_settings(), load_settings_env(), load_user_mapping() (+16 more)
|
||||
|
||||
### Community 38 - "Community 38"
|
||||
Cohesion: 0.19
|
||||
Nodes (12): create_expense_item(), delete_expense_item(), get_expense_item(), get_expense_item_tree(), Session, update_expense_item(), BxExpenseItem, Any (+4 more)
|
||||
Cohesion: 0.11
|
||||
Nodes (18): ApiCryptoMiddleware, ApiRequestLogMiddleware, _db_pool_keepalive_loop(), _error_json(), lifespan(), Exception, Request, 数据库异常:返回 JSON 并保留 CORS 头,避免浏览器只报跨域错误 (+10 more)
|
||||
|
||||
### Community 39 - "Community 39"
|
||||
Cohesion: 0.14
|
||||
Nodes (42): assign_clues(), check_convert(), check_duplicate_clue(), convert_clue(), create_clue(), _enrich_user_names(), _ensure_clue_in_scope(), create_clue_follow() (+34 more)
|
||||
Cohesion: 0.22
|
||||
Nodes (28): assign_clues(), check_convert(), check_duplicate_clue(), convert_clue(), create_clue(), _enrich_user_names(), _ensure_clue_in_scope(), get_clue() (+20 more)
|
||||
|
||||
### Community 40 - "Community 40"
|
||||
Cohesion: 0.19
|
||||
Nodes (16): grab(), list_duty_staff_users(), normalize_person_name(), 按固定 id 查找「值班人员」角色;找不到再按角色名兜底。, 本租户启用且绑定「值班人员」角色的用户(公开页 users / 管理端 options)。, resolve_duty_staff_role_id(), test_grab_rejects_duplicate_same_shift(), test_grab_rejects_invalid_user() (+8 more)
|
||||
Cohesion: 0.31
|
||||
Nodes (15): ensure_crm_create_by_row_in_scope(), create_pool_rule(), delete_pool_rules(), execute_pool_rules(), _execute_single_rule(), get_pool_rule(), list_pool_rules(), Any (+7 more)
|
||||
|
||||
### Community 41 - "Community 41"
|
||||
Cohesion: 0.12
|
||||
Nodes (15): category_add(), category_delete(), category_tree(), category_update(), product_delete(), 删除产品(支持单条 body.id 和批量 body.ids), CategoryDeleteBody, ProductAliasItem (+7 more)
|
||||
Cohesion: 0.08
|
||||
Nodes (25): category_add(), category_delete(), category_tree(), category_update(), product_add(), product_delete(), product_detail(), product_options() (+17 more)
|
||||
|
||||
### Community 42 - "Community 42"
|
||||
Cohesion: 0.19
|
||||
Nodes (32): _dec(), derive_source_url(), fetch_portal_admin_id(), fetch_source_rows(), legacy_id_to_str(), load_oss_id_to_url(), load_runtime_settings(), load_settings_env() (+24 more)
|
||||
|
||||
### Community 43 - "Community 43"
|
||||
Cohesion: 0.12
|
||||
Nodes (25): create_invoice(), delete_invoice(), get_mine_wallet_summary(), list_invoice_ledgers(), list_invoice_wallets(), list_invoices(), Request, Session (+17 more)
|
||||
Cohesion: 0.09
|
||||
Nodes (33): create_invoice(), delete_invoice(), get_mine_wallet_summary(), list_invoice_ledgers(), list_invoice_wallets(), list_invoices(), Request, Session (+25 more)
|
||||
|
||||
### Community 44 - "Community 44"
|
||||
Cohesion: 0.18
|
||||
@@ -390,55 +389,55 @@ Nodes (31): _dec(), derive_source_url(), fetch_portal_admin_id(), fetch_source_r
|
||||
|
||||
### Community 45 - "Community 45"
|
||||
Cohesion: 0.08
|
||||
Nodes (76): _build_driver_url(), get_plan_arrange_info(), 获取计划已安排运输后的司机链接与地磅出入库关联(供查看弹窗复制简述/二维码)。, _apply_plan_logistics_from_payload(), _apply_transport_arrange_fields(), arrange_transport(), _assert_vehicle_carrier_eligible(), _build_arrange_result() (+68 more)
|
||||
Nodes (67): get_plan_arrange_info(), 获取计划已安排运输后的司机链接与地磅出入库关联(供查看弹窗复制简述/二维码)。, _apply_plan_logistics_from_payload(), _apply_transport_arrange_fields(), arrange_transport(), _assert_vehicle_carrier_eligible(), _build_arrange_result(), _build_driver_url() (+59 more)
|
||||
|
||||
### Community 46 - "Community 46"
|
||||
Cohesion: 0.19
|
||||
Nodes (28): apply_biz_backfill(), BackfillRule, BizRef, build_biz_index(), count_target_rows(), derive_source_url(), fetch_portal_admin_id(), fetch_source_rows() (+20 more)
|
||||
|
||||
### Community 47 - "Community 47"
|
||||
Cohesion: 0.27
|
||||
Nodes (11): customer_dealed(), customer_export(), customer_key(), customer_list(), customer_long_time_no_follow(), customer_mine(), customer_to_follow(), customer_week_new() (+3 more)
|
||||
Cohesion: 0.18
|
||||
Nodes (21): allocate_reimburse_title_seq(), format_reimburse_title(), generate_apply_code(), generate_title(), is_auto_reimburse_title(), parse_optional_date(), parse_reimburse_date(), preview_reimburse_title_seq() (+13 more)
|
||||
|
||||
### Community 48 - "Community 48"
|
||||
Cohesion: 0.31
|
||||
Nodes (9): change_current_user_password(), get_current_user_profile(), get_web_auth_menu_codes(), public_quote_share(), Request, Session, 获取当前用户信息(与 sys_user 字段对应)。, 获取当前用户菜单权限标识(sys_menu.perms,经角色继承)。 (+1 more)
|
||||
Cohesion: 0.29
|
||||
Nodes (12): build_name_pinyin_abbr(), normalize_name_pinyin_abbr(), 名称拼音首字母缩写:库内存小写,检索时大小写不敏感。, 保存时解析拼音字段。 - submitted_provided=True:用提交值(空则按 name 生成) - 否则:已有非空 existi, resolve_name_pinyin_abbr(), test_chinese_and_alnum(), test_empty_and_whitespace(), test_resolve_not_submitted_empty_existing_generates() (+4 more)
|
||||
|
||||
### Community 49 - "Community 49"
|
||||
Cohesion: 0.49
|
||||
Nodes (10): clue_statistics_level(), _apply_create_range(), _base_query(), get_clue_level_statistics(), get_clue_overview_statistics(), get_clue_owner_statistics(), get_clue_source_statistics(), get_clue_trend_statistics() (+2 more)
|
||||
|
||||
### Community 50 - "Community 50"
|
||||
Cohesion: 0.39
|
||||
Nodes (8): get_redis_client(), get_sync_redis_client(), Redis, 共享 Redis 客户端(同步:会话鉴权;异步:API 加密 nonce)。, 同步 Redis(auth 会话等,在线程池中调用)。, 异步 Redis(API 加密 nonce 等中间件)。, _redis_common_kwargs(), redis_enabled()
|
||||
Cohesion: 0.13
|
||||
Nodes (21): cancel_plan(), _ensure_subpack_slip_no(), _format_subpack_slip_no(), _generate_notify_message(), _normalize_subpack_slip_no(), 作废运输计划:取消跟进状态、作废关联地磅出入库单、取消运输单。, 将历史分装单号统一为 NO:SXFZYYYYMMDD-###, 分配分装单号 NO:SXFZYYYYMMDD-###(按租户每日递增) (+13 more)
|
||||
|
||||
### Community 51 - "Community 51"
|
||||
Cohesion: 0.25
|
||||
Nodes (17): _cargo_stats(), get_dashboard_stats(), get_inbound_by_cargo(), get_inbound_by_partner_cargo(), get_outbound_by_cargo(), get_outbound_by_partner_cargo(), _partner_cargo_stats(), Session (+9 more)
|
||||
Cohesion: 0.11
|
||||
Nodes (31): _cargo_stats(), get_dashboard_stats(), get_inbound_by_cargo(), get_inbound_by_partner_cargo(), get_outbound_by_cargo(), get_outbound_by_partner_cargo(), _partner_cargo_stats(), Session (+23 more)
|
||||
|
||||
### Community 52 - "Community 52"
|
||||
Cohesion: 0.18
|
||||
Nodes (29): _dec(), derive_source_url(), fetch_portal_admin_id(), fetch_source_rows(), legacy_id_to_str(), load_oss_id_to_url(), load_runtime_settings(), load_settings_env() (+21 more)
|
||||
|
||||
### Community 53 - "Community 53"
|
||||
Cohesion: 0.14
|
||||
Nodes (24): PlTransportProductBrandQty, PlTransportProductFeedback, 运输单按产品回传 pl_transport_product_feedback, 运输单产品回传品牌数量 pl_transport_product_brand_qty, _dict_field(), format_brand_qty_summary(), load_transport_driver_product_feedbacks(), persist_io_item_brand_qtys() (+16 more)
|
||||
Cohesion: 0.09
|
||||
Nodes (39): PlTransportProductBrandQty, PlTransportProductFeedback, 运输单按产品回传 pl_transport_product_feedback, 运输单产品回传品牌数量 pl_transport_product_brand_qty, load_brand_qtys_by_plan_product_ids(), persist_plan_product_brand_qtys(), Any, Decimal (+31 more)
|
||||
|
||||
### Community 54 - "Community 54"
|
||||
Cohesion: 0.19
|
||||
Nodes (28): _get_by_plan(), get_inbound(), get_inbound_by_plan(), _get_order(), get_outbound(), get_outbound_by_plan(), inbound_site_url(), list_inbound() (+20 more)
|
||||
Cohesion: 0.26
|
||||
Nodes (23): _get_by_plan(), get_inbound(), get_inbound_by_plan(), _get_order(), get_outbound(), get_outbound_by_plan(), inbound_site_url(), list_inbound() (+15 more)
|
||||
|
||||
### Community 55 - "Community 55"
|
||||
Cohesion: 0.50
|
||||
Nodes (4): ApiRequestLogCRUD, Session, SysApiRequestLog, SysApiRequestLogHis
|
||||
Cohesion: 0.52
|
||||
Nodes (5): product_allowed(), test_dual_requires_both(), test_explosive_only_requires_allow_explosive(), test_plain_always_allowed(), test_toxic_only_requires_allow_toxic()
|
||||
|
||||
### Community 56 - "Community 56"
|
||||
Cohesion: 0.38
|
||||
Nodes (4): _coerce_id(), ExpenseItemCreate, ExpenseItemOut, ExpenseItemUpdate
|
||||
Cohesion: 0.14
|
||||
Nodes (19): _alias_row_to_dict(), _brand_row_to_dict(), _build_category_tree(), _collect_category_with_ancestors(), list_categories(), list_category_tree(), list_oss_by_biz(), list_product_options() (+11 more)
|
||||
|
||||
### Community 57 - "Community 57"
|
||||
Cohesion: 0.50
|
||||
Nodes (4): public_grab(), public_page(), Session, DutyGrabBody
|
||||
Cohesion: 0.47
|
||||
Nodes (8): create_oss(), get_oss_by_id(), get_oss_by_url(), Session, 按主键 id 查询附件(兼容旧 CRM 雪花 oss_id 迁入后的记录), 将 fileUrl 或旧 CRM 数字 ossId 解析为 MinIO 相对路径。 门户新上传把相对路径写入业务字段;迁入合同附件仍存数字 ossId, resolve_storage_path(), SysOss
|
||||
|
||||
### Community 58 - "Community 58"
|
||||
Cohesion: 0.28
|
||||
@@ -453,16 +452,16 @@ Cohesion: 0.12
|
||||
Nodes (16): 供方全量列表(下拉)— Java: CrmSupplierInfoController.listAll, 供方详情 — Java: CrmSupplierInfoController.getInfo, 新增供方 — Java: CrmSupplierInfoController.add, 修改供方 — Java: CrmSupplierInfoController.edit, 删除供方 — Java: CrmSupplierInfoController.remove, supplier_info_add(), supplier_info_delete(), supplier_info_detail() (+8 more)
|
||||
|
||||
### Community 61 - "Community 61"
|
||||
Cohesion: 0.11
|
||||
Nodes (43): PlTransportDbLink, 运输-地磅出入库关联 pl_transport_db_link, _apply_plan_quantity_delta(), _create_db_inventory(), _create_db_plan(), DibangInventoryLinkResult, find_monthly_db_plan(), _generate_batch_no() (+35 more)
|
||||
Cohesion: 0.17
|
||||
Nodes (35): DbInboundOutbound, DbPurchasePlan, PlTransportDbLink, 运输-地磅出入库关联 pl_transport_db_link, parse_date_str(), _apply_plan_quantity_delta(), _create_db_inventory(), _create_db_plan() (+27 more)
|
||||
|
||||
### Community 62 - "Community 62"
|
||||
Cohesion: 0.13
|
||||
Nodes (38): _apply_weighing_product_update(), _apply_weighing_update(), _base_query(), create_weighing(), delete_weighing(), _get_weighing(), get_weighing_related(), list_weighing() (+30 more)
|
||||
Cohesion: 0.19
|
||||
Nodes (26): _apply_weighing_product_update(), _apply_weighing_update(), _base_query(), create_weighing(), delete_weighing(), _get_weighing(), get_weighing_related(), list_weighing() (+18 more)
|
||||
|
||||
### Community 63 - "Community 63"
|
||||
Cohesion: 0.33
|
||||
Nodes (8): Any, should_skip_release(), summarize_entries(), 提交占用可超过已上传总额,余额可为负(补票后再回升)。, test_release_idempotent_guard(), test_summarize_allows_negative_balance(), test_summarize_delete_and_release(), test_summarize_upload_and_reimburse()
|
||||
Cohesion: 0.23
|
||||
Nodes (18): register_quote_routes(), 接口菜单权限守卫。super_admin 直接放行。, require_menu_code(), accept_quote(), generate_pdf(), generate_share(), _get_quote_in_scope(), get_template() (+10 more)
|
||||
|
||||
### Community 64 - "Community 64"
|
||||
Cohesion: 0.30
|
||||
@@ -473,84 +472,120 @@ Cohesion: 0.10
|
||||
Nodes (58): cancel_apply(), create_apply(), create_process(), delete_applies(), delete_processes(), get_apply(), get_process(), list_applies() (+50 more)
|
||||
|
||||
### Community 66 - "Community 66"
|
||||
Cohesion: 0.10
|
||||
Nodes (33): bind_biz(), delete_attachment(), download_file(), list_by_biz(), _parse_id_list(), preview_attachment(), Session, UploadFile (+25 more)
|
||||
Cohesion: 0.11
|
||||
Nodes (25): bind_biz(), delete_attachment(), download_file(), list_by_biz(), _parse_id_list(), preview_attachment(), Session, UploadFile (+17 more)
|
||||
|
||||
### Community 67 - "Community 67"
|
||||
Cohesion: 0.12
|
||||
Nodes (36): get_password_hash(), Namespace, build_merged_users(), bx_role_labels(), check_minio(), check_mysql(), check_redis(), _clip() (+28 more)
|
||||
|
||||
### Community 68 - "Community 68"
|
||||
Cohesion: 0.33
|
||||
Nodes (13): _build_tree(), _cascade_soft_delete(), _collect_with_ancestors(), create_dept(), get_dept(), list_depts(), list_depts_tree(), Any (+5 more)
|
||||
Cohesion: 0.17
|
||||
Nodes (23): _build_tree(), _cascade_soft_delete(), _collect_with_ancestors(), create_dept(), get_dept(), list_depts(), list_depts_tree(), Any (+15 more)
|
||||
|
||||
### Community 69 - "Community 69"
|
||||
Cohesion: 0.15
|
||||
Nodes (23): _append_user_scope_conditions(), apply_data_scope(), _collect_scope_ids(), _get_child_dept_ids(), get_user_dept_id(), Session, 合并多角色数据范围为 dept_ids / user_ids 并集。, 根据用户角色的数据权限过滤查询。 适用于业务单据列表/详情(报销单、客户、运单等)。 以下场景 SHALL NOT 调用本函数(仅租户隔离即 (+15 more)
|
||||
Cohesion: 0.12
|
||||
Nodes (30): _append_user_scope_conditions(), apply_data_scope(), assert_row_in_data_scope(), _collect_scope_ids(), _get_child_dept_ids(), get_user_dept_id(), Session, 数据权限过滤(V0.3:基于角色 data_scope 的查询级行级过滤) data_scope 值: 1 = 全部数据 2 = 本部门数据 3 (+22 more)
|
||||
|
||||
### Community 70 - "Community 70"
|
||||
Cohesion: 0.18
|
||||
Nodes (18): align_contract_no_to_sign_date(), generate_contract_no(), date, Java: generateContractNo — {供方编码}/X-JT{yyyyMMdd}{3位序号} 流水与撞号检测须含软删:uk_contr, 标准编号替换日期段,保留序号;非标准返回 None。, 将标准合同编号日期段对齐签订日;撞号则序号顺延(含软删查重)。 非标准编号原样返回。无签订日则原样返回。, replace_contract_no_date(), _mock_last_contract() (+10 more)
|
||||
|
||||
### Community 71 - "Community 71"
|
||||
Cohesion: 0.12
|
||||
Nodes (28): list_vehicles(), _vehicle_to_read(), PlCert, CertRead, parse_resource_snapshot(), Any, 运输计划 - 安排运输时车辆/人员/证件资源快照 Schema, 从 ORM 文本列或 dict 解析快照。 (+20 more)
|
||||
Cohesion: 0.16
|
||||
Nodes (22): list_personnel(), generate_uuid(), PlCert, CertRead, PersonnelListResponse, SnapshotCertRead, certs_to_read(), list_owner_certs() (+14 more)
|
||||
|
||||
### Community 72 - "Community 72"
|
||||
Cohesion: 0.67
|
||||
Nodes (3): Web 管理端约定角色(由 sys_role.role_name 映射而来,非数据库枚举), UserRole, str
|
||||
Cohesion: 0.29
|
||||
Nodes (16): create_contact(), get_contact(), list_contacts_by_customer(), _parse_optional_date(), Any, date, Session, _row_to_dict() (+8 more)
|
||||
|
||||
### Community 73 - "Community 73"
|
||||
Cohesion: 0.20
|
||||
Nodes (25): derive_source_url(), fetch_portal_admin_id(), fetch_source_rows(), legacy_id_to_str(), load_oss_id_to_url(), load_runtime_settings(), load_settings_env(), load_user_mapping() (+17 more)
|
||||
|
||||
### Community 74 - "Community 74"
|
||||
Cohesion: 0.12
|
||||
Nodes (15): pool_rule_add(), pool_rule_delete(), pool_rule_detail(), pool_rule_execute(), pool_rule_list(), pool_rule_update(), pool_rule_update_status(), PoolRuleAddBody (+7 more)
|
||||
|
||||
### Community 75 - "apply_crm_create_by_scope"
|
||||
Cohesion: 0.28
|
||||
Nodes (14): menu_badge_stats(), Session, apply_pl_scope(), Session, PL 模块数据权限辅助(create_by / create_dept_id,无 owner_field)。, build_menu_badge_counts(), count_document_reminder_expired_pending(), count_freight_approval_pending() (+6 more)
|
||||
Nodes (15): create_clue_follow(), delete_clue_follow(), get_clue_follow(), get_follow_statistics(), list_clue_follows(), Any, Session, 更新线索跟进记录,必要时同步线索 next_time (+7 more)
|
||||
|
||||
### Community 76 - "opportunity_follow.py"
|
||||
Cohesion: 0.36
|
||||
Nodes (15): create_opportunity_follow(), _ensure_parent_opportunity(), get_opportunity_follow(), list_follows_by_opportunity(), list_opportunity_follows(), _parse_optional_datetime(), Any, datetime (+7 more)
|
||||
|
||||
### Community 77 - "Community 77"
|
||||
Cohesion: 0.11
|
||||
Nodes (12): get_wechat_pay_client(), get_wechat_pay_v2(), Any, 微信支付工具模块 支持微信支付 V3 API 文档参考: https://pay.weixin.qq.com/docs/v3/apis/index.html, 统一下单接口 (V3) Args: out_trade_no: 商户订单号 total_amo, 申请退款 Args: out_trade_no: 商户订单号 total_amount: 订单, 小程序调起支付的二次签名参数(与公众号 JSAPI 规则一致), 统一下单 (V2 API) Args: out_trade_no: 商户订单号 total_f (+4 more)
|
||||
|
||||
### Community 78 - "Community 78"
|
||||
Cohesion: 0.17
|
||||
Nodes (26): delete_plan(), delete_carrier(), delete_driver(), delete_personnel(), delete_vehicle(), unbind_vehicle_driver(), delete_plan(), _actor_ids() (+18 more)
|
||||
Cohesion: 0.24
|
||||
Nodes (18): _actor_ids(), _actor_names(), assert_row_deletable_by_creator(), assert_rows_deletable_by_creator(), can_delete_by_creator(), is_super_admin(), normalize_user_info(), Any (+10 more)
|
||||
|
||||
### Community 79 - "PlCarrier"
|
||||
Cohesion: 0.30
|
||||
Nodes (12): PlCarrier, assert_carrier_eligible_for_transport(), carrier_agreement_expired(), carrier_audit_approved(), carrier_eligible_for_transport(), carrier_qualification_complete(), date, 资质附件均为选填,保留函数签名供兼容调用。 (+4 more)
|
||||
|
||||
### Community 80 - "resolve_crm_product"
|
||||
Cohesion: 0.26
|
||||
Nodes (11): _apply_plan_product_update(), apply_product_snapshot_to_plan(), ProductSnapshot, Session, 地磅模块 — CRM 产品解析与快照写入。, 校验 CRM 产品并返回名称/规格快照。新建单据 product_id 必填。 require_on_shelf=False 用于运输计划联动地磅等历, resolve_crm_product(), _product() (+3 more)
|
||||
|
||||
### Community 81 - "customer_follow.py"
|
||||
Cohesion: 0.40
|
||||
Nodes (12): create_follow(), _enrich_follow_dict(), get_follow(), list_follows(), list_follows_by_customer(), Any, Session, _row_to_dict() (+4 more)
|
||||
|
||||
### Community 82 - "storage.py"
|
||||
Cohesion: 0.18
|
||||
Nodes (6): convert_heic_to_jpeg(), _guess_preview_content_type(), OSSStorage, 文件存储工具模块 支持多种存储方式: 1. 本地存储 (local) - 默认 2. 七牛云存储 (qiniu) - 推荐生产环境使用 3. 阿里云OSS (, 按对象键后缀推断内联预览 Content-Type(纠正上传时未写入 MIME 的情况)。, 将 HEIC/HEIF 格式转换为 JPEG 格式
|
||||
|
||||
### Community 83 - "Community 83"
|
||||
Cohesion: 0.15
|
||||
Nodes (30): _advance_contract_after_approval(), approve_contract(), approve_contract_by_contract_id(), approve_pass(), approve_reject(), approve_transfer(), _build_approval_list_filters(), can_user_approve() (+22 more)
|
||||
Nodes (30): _advance_contract_after_approval(), approve_contract(), approve_pass(), approve_reject(), approve_transfer(), _build_approval_list_filters(), can_user_approve(), create_approval_records() (+22 more)
|
||||
|
||||
### Community 84 - "Community 84"
|
||||
Cohesion: 0.23
|
||||
Nodes (23): build_id_maps(), clip_text(), count_rows(), export_mapping(), fetch_rows(), legacy_id_to_str(), main(), map_id() (+15 more)
|
||||
|
||||
### Community 85 - "allocate_next_biz_no"
|
||||
Cohesion: 0.33
|
||||
Nodes (8): allocate_next_biz_no(), _format_biz_no(), _prefix_for(), datetime, Session, 业务协议号自动生成:XBCC / JZCC + YYYYMMDD + 6 位序号, 原子分配下一个业务协议号。 须在 create 事务内调用;使用 MySQL LAST_INSERT_ID 保证并发安全。, BizNoKind
|
||||
|
||||
### Community 86 - "Community 86"
|
||||
Cohesion: 0.40
|
||||
Nodes (9): create_leave(), get_leave(), list_leaves(), Any, Session, _row_to_dict(), soft_delete_leave(), update_leave() (+1 more)
|
||||
Cohesion: 0.33
|
||||
Nodes (11): create_leave(), get_leave(), list_leaves(), Any, Session, _row_to_dict(), soft_delete_leave(), update_leave() (+3 more)
|
||||
|
||||
### Community 87 - "Community 87"
|
||||
Cohesion: 0.11
|
||||
Nodes (32): approve_quote(), can_user_approve(), create_approval_records(), delete_pending_approvals(), get_quote_approval(), invalidate_all_approvals(), list_quote_approvals(), Any (+24 more)
|
||||
|
||||
### Community 88 - "CrmProduct"
|
||||
Cohesion: 0.25
|
||||
Nodes (8): get_product_by_no(), _product_row_to_dict(), product_to_dict(), 产品 ORM 对象转 dict(camelCase 键名), CrmProduct, 运输计划产品展示:标准名 / 别名拆分(与前端 applyAliasDisplayMeta 对齐), 从已存 productName 反推别名;等于标准名或不在别名列表 → None。, resolve_alias_from_saved_name()
|
||||
|
||||
### Community 89 - "pl_ocr_service.py"
|
||||
Cohesion: 0.19
|
||||
Nodes (22): PlOcrUsageMonth, 阿里云 OCR 月度调用计数 pl_ocr_usage_month(按自然月全局统计), assert_quota_available(), _build_ocr_client(), compress_image_bytes(), current_usage_month(), _first_attachment_url(), get_or_create_usage_row() (+14 more)
|
||||
|
||||
### Community 90 - "SysApiRequestLog"
|
||||
Cohesion: 0.50
|
||||
Nodes (4): ApiRequestLogCRUD, Session, SysApiRequestLog, SysApiRequestLogHis
|
||||
|
||||
### Community 91 - "pl_vehicle_recharge_service.py"
|
||||
Cohesion: 0.14
|
||||
Nodes (34): create_contact(), get_contact(), list_contacts_by_customer(), _parse_optional_date(), Any, date, Session, _row_to_dict() (+26 more)
|
||||
Cohesion: 0.29
|
||||
Nodes (16): ensure_crm_customer_linked_row_in_scope(), ensure_crm_owner_row_in_scope(), Session, CRM 数据权限辅助(负责人 owner_user_id + 标准 create_by/create_dept_id)。, 客户子表(开票信息等):先校验关联客户 owner scope,否则校验 create_by。, _clear_default_for_customer(), create_invoice_info(), get_invoice_info() (+8 more)
|
||||
|
||||
### Community 92 - "Community 92"
|
||||
Cohesion: 0.18
|
||||
Nodes (22): _assert_users_exist(), get_setting(), Any, Session, _row_to_dict(), save_setting(), _assert_users_exist(), get_setting() (+14 more)
|
||||
Cohesion: 0.20
|
||||
Nodes (21): _assert_users_exist(), get_setting(), Any, Session, _row_to_dict(), save_setting(), _assert_users_exist(), get_setting() (+13 more)
|
||||
|
||||
### Community 93 - "_invoice_info_by_customer_impl"
|
||||
### Community 93 - "list_products"
|
||||
Cohesion: 0.33
|
||||
Nodes (8): allocate_next_biz_no(), _format_biz_no(), _prefix_for(), datetime, Session, 业务协议号自动生成:XBCC / JZCC + YYYYMMDD + 6 位序号, 原子分配下一个业务协议号。 须在 create 事务内调用;使用 MySQL LAST_INSERT_ID 保证并发安全。, BizNoKind
|
||||
Nodes (6): list_products(), get_supplier_hazard_flags(), 产品/客户列表 keyword:名称/编号/拼音首字母 OR 匹配。, test_list_customer_options_keyword_includes_name_and_pinyin(), test_list_customers_keyword_includes_name_and_pinyin(), test_list_products_keyword_includes_name_and_pinyin()
|
||||
|
||||
### Community 94 - "response.py"
|
||||
Cohesion: 0.18
|
||||
Nodes (17): get_user_menu_codes(), Session, 读取用户授权的菜单权限标识集合(与前端 meta.menuCode / perms 对齐)。, _expand_with_ancestor_menu_ids(), _granted_menu_ids_for_user(), iter_user_menu_perm_codes(), _map_role_name_to_web(), Session (+9 more)
|
||||
### Community 94 - "assert_contract_editable_for_update"
|
||||
Cohesion: 0.60
|
||||
Nodes (3): assert_contract_editable_for_update(), test_assert_allows_editable(), test_assert_rejects_non_editable()
|
||||
|
||||
### Community 95 - "Community 95"
|
||||
Cohesion: 0.35
|
||||
@@ -565,8 +600,8 @@ Cohesion: 0.27
|
||||
Nodes (15): Settings, BaseSettings, apply_renumber(), build_mapping(), fetch_products(), format_new_product_no(), load_settings_env(), main() (+7 more)
|
||||
|
||||
### Community 102 - "dept.py"
|
||||
Cohesion: 0.25
|
||||
Nodes (10): _cert_url_blank(), plan_has_hazard_product_exists(), plan_has_incomplete_hazard_cert_exists(), 证书 URL 为空(NULL / 空串 / 纯空白)。, 列表筛选:计划下存在 CRM 标识为易制毒/易制爆的产品。, 列表筛选:存在危化产品且至少一张必需证书未上传。, _compile(), 危化品证上传列表筛选:EXISTS 子查询应覆盖 CRM 危化标识与证书缺口。 (+2 more)
|
||||
Cohesion: 0.31
|
||||
Nodes (8): _cert_url_blank(), plan_has_incomplete_hazard_cert_exists(), 证书 URL 为空(NULL / 空串 / 纯空白)。, 列表筛选:存在危化产品且至少一张必需证书未上传。, _compile(), 危化品证上传列表筛选:EXISTS 子查询应覆盖 CRM 危化标识与证书缺口。, test_plan_has_hazard_product_exists_joins_crm_flags(), test_plan_has_incomplete_hazard_cert_exists_checks_required_urls()
|
||||
|
||||
### Community 104 - "apply_crm_create_by_scope"
|
||||
Cohesion: 0.29
|
||||
@@ -577,12 +612,12 @@ Cohesion: 0.15
|
||||
Nodes (9): 微信消息通知服务 支持微信小程序模板消息推送 使用方式: from app.core.wechat_message import WechatMes, 发送订单状态通知 Args: openid: 用户openid order_n, 发送支付成功通知 Args: openid: 用户openid order_n, 发送配送通知 Args: openid: 配送员openid task_no:, 发送配送时效预警 Args: openid: 配送员openid task_n, 发送退款结果通知 Args: openid: 用户openid order_n, 发送催单通知给配送员 Args: deliver_openid: 配送员openid, 发送模板消息 Args: openid: 用户openid template_ (+1 more)
|
||||
|
||||
### Community 107 - "apply_pl_scope"
|
||||
Cohesion: 0.14
|
||||
Nodes (31): create_process_def(), create_task(), get_all_tasks_for_business(), get_instance(), get_latest_version(), get_nodes_by_version(), get_pending_tasks_by_node(), get_process_def() (+23 more)
|
||||
Cohesion: 0.16
|
||||
Nodes (31): create_instance(), create_process_def(), create_task(), get_all_tasks_for_business(), get_instance(), get_latest_version(), get_nodes_by_version(), get_pending_tasks_by_node() (+23 more)
|
||||
|
||||
### Community 109 - "Community 109"
|
||||
Cohesion: 0.27
|
||||
Nodes (14): create_vehicle(), get_vehicle(), update_vehicle(), _vehicle_to_detail(), VehicleDetailRead, VehiclePersonnelRow, load_vehicle_personnel_rows(), load_vehicle_personnel_summaries() (+6 more)
|
||||
Cohesion: 0.11
|
||||
Nodes (30): create_vehicle(), get_vehicle(), list_vehicles(), update_vehicle(), _vehicle_to_detail(), _vehicle_to_read(), calc_age_from_chinese_id_card(), date (+22 more)
|
||||
|
||||
### Community 110 - "Base"
|
||||
Cohesion: 0.31
|
||||
@@ -593,72 +628,56 @@ Cohesion: 0.28
|
||||
Nodes (14): _assert_editable(), _build_public_page(), _format_file_size(), _get_inventory_by_token(), get_public_inventory(), _parse_feedback_images(), Session, UploadFile (+6 more)
|
||||
|
||||
### Community 112 - "SysApiRequestLog"
|
||||
Cohesion: 0.47
|
||||
Nodes (5): list_ethnics(), Any, Session, 民族码表 CRUD(全局 sys_ethnic), _row_to_dict()
|
||||
Cohesion: 0.36
|
||||
Nodes (7): list_ethnics(), Any, Session, 民族码表 CRUD(全局 sys_ethnic), _row_to_dict(), 民族码表 sys_ethnic(国标 GB/T 3304,全局), SysEthnic
|
||||
|
||||
### Community 113 - "quote_share_log.py"
|
||||
Cohesion: 0.26
|
||||
Nodes (12): list_share_logs(), _parse_user_agent(), Any, Session, CRM 报价单分享访问日志 CRUD — 对照 CrmQuoteShareLogServiceImpl.java, Java: statisticsVisits, 简易 User-Agent 解析(替代 Hutool UserAgentUtil), Java: queryLogsByQuoteId (+4 more)
|
||||
|
||||
### Community 114 - "db_models.py"
|
||||
Cohesion: 0.24
|
||||
Nodes (12): DbSequence, 地磅(db)模块数据模型 — 对齐 docs/sql/db_tables.sql, _allocate_inbound_outbound_id(), _ensure_sequence_row(), max_numeric_inbound_outbound_id(), next_inbound_outbound_id(), Session, 出入库单 id 生成 — 租户内纯数字自增,并发安全。 (+4 more)
|
||||
Cohesion: 0.16
|
||||
Nodes (17): list_public_vehicle_plates(), Session, 地磅公共只读:免登车牌 options(现场填写页), 免登:按出入库/计划解析 tenant_no,返回 pl_vehicle 车牌(self + carrier)。, _resolve_tenant_no(), DbSequence, 地磅(db)模块数据模型 — 对齐 docs/sql/db_tables.sql, _allocate_inbound_outbound_id() (+9 more)
|
||||
|
||||
### Community 115 - "site.py"
|
||||
Cohesion: 0.09
|
||||
Nodes (52): approve_carrier(), bind_vehicle_driver(), create_carrier(), create_driver(), create_personnel(), get_carrier(), get_driver(), get_personnel() (+44 more)
|
||||
Cohesion: 0.11
|
||||
Nodes (24): approve_carrier(), create_carrier(), get_carrier(), update_carrier(), carrier_to_read(), CarrierBase, CarrierCreate, CarrierQualificationBase (+16 more)
|
||||
|
||||
### Community 116 - "Community 116"
|
||||
Cohesion: 0.17
|
||||
Nodes (28): batch_insert_quote_products(), calculate_subtotal(), _decimal_value(), delete_products_by_quote_id(), _ensure_quote_parent_scope(), _get_field(), get_quote_product(), insert_quote_product() (+20 more)
|
||||
Cohesion: 0.19
|
||||
Nodes (26): batch_insert_quote_products(), calculate_subtotal(), _decimal_value(), _ensure_quote_parent_scope(), _get_field(), get_quote_product(), insert_quote_product(), list_products_by_quote_ids() (+18 more)
|
||||
|
||||
### Community 118 - "Community 118"
|
||||
Cohesion: 0.12
|
||||
Nodes (37): batch_insert_contract_products(), calculate_subtotal(), _decimal_value(), delete_price_tiers_by_contract_id(), delete_products_by_contract_id(), _get_field(), insert_contract_product(), _letter_oss_ids_to_json() (+29 more)
|
||||
Cohesion: 0.15
|
||||
Nodes (29): batch_insert_contract_products(), calculate_subtotal(), _decimal_value(), delete_price_tiers_by_contract_id(), delete_products_by_contract_id(), _get_field(), insert_contract_product(), _letter_oss_ids_to_json() (+21 more)
|
||||
|
||||
### Community 119 - "Community 119"
|
||||
Cohesion: 0.16
|
||||
Nodes (28): CertRow, _cert_row_complete(), collect_required_cert_errors(), _find_cert_for_required(), get_required_personnel_cert_names(), match_required_cert_name(), _missing_field_labels(), Session (+20 more)
|
||||
Nodes (29): CertRow, VehiclePersonnelRow, _cert_row_complete(), collect_required_cert_errors(), _find_cert_for_required(), get_required_personnel_cert_names(), match_required_cert_name(), _missing_field_labels() (+21 more)
|
||||
|
||||
### Community 122 - "Community 122"
|
||||
Cohesion: 0.39
|
||||
Nodes (10): create_post(), get_post(), list_posts(), post_code_exists(), Any, Session, _row_to_dict(), soft_delete_post() (+2 more)
|
||||
|
||||
### Community 125 - "Community 125"
|
||||
Cohesion: 0.23
|
||||
Nodes (8): generate_id(), camel_to_snake(), CRUDBase, get_model_attr(), HistoryCRUD, Any, Session, ModelType
|
||||
Cohesion: 0.24
|
||||
Nodes (7): camel_to_snake(), CRUDBase, get_model_attr(), HistoryCRUD, Any, Session, ModelType
|
||||
|
||||
### Community 126 - "customer_pool.py"
|
||||
Cohesion: 0.36
|
||||
Nodes (13): _build_tree(), _cascade_soft_delete(), create_menu(), get_menu(), list_menus(), list_menus_tree(), menu_name_exists(), Any (+5 more)
|
||||
|
||||
### Community 128 - "plan.py"
|
||||
Cohesion: 0.39
|
||||
Nodes (10): create_site(), get_site(), list_sites(), Any, Session, _row_to_dict(), site_code_exists(), soft_delete_site() (+2 more)
|
||||
|
||||
### Community 129 - "BaseStorage"
|
||||
Cohesion: 0.12
|
||||
Nodes (24): _auto_contract_name_body(), generate_contract_name(), 按面板单位全称精确匹配交易主体/客户主数据,取 shortName;对不上则用全称。, 前端预览误用单位全称时,名称片段会等于面板/客户/开票全称。, 按面板供方(partyA)-需方(partyB)生成:{供方简称}-{需方简称}({合同编号})。 - 名称为空:按主数据简称自动生成 - 名, resolve_party_short_name(), _strip_contract_name_no_suffix(), _user_contract_name_uses_party_full_name() (+16 more)
|
||||
|
||||
### Community 130 - "datetime_parse.py"
|
||||
Cohesion: 0.16
|
||||
Nodes (22): operlog_detail(), operlog_list(), Session, 操作日志分页列表(基于 API 请求日志适配 RuoYi OperLog 结构), _user_info(), 获取用户所有角色的数据权限配置。 返回: [{"data_scope": str, "details": [SysRoleDataScopeDetai, _resolve_user_role_scopes(), business_type_from_path() (+14 more)
|
||||
|
||||
### Community 132 - "crm_supplier_hazard.py"
|
||||
Cohesion: 0.15
|
||||
Nodes (14): invoice_info_add(), invoice_info_by_customer(), _invoice_info_by_customer_impl(), invoice_info_delete(), invoice_info_list(), invoice_info_set_default(), invoice_info_update(), 按客户ID查询开票信息(与 by-customer 等价) (+6 more)
|
||||
|
||||
### Community 134 - "Community 134"
|
||||
Cohesion: 0.25
|
||||
Nodes (18): batch_generate_sample_codes(), batch_issue_sample_codes(), batch_revoke_sample_codes(), create_sample_code(), get_sample_code(), list_sample_codes(), _parse_issued_time(), Any (+10 more)
|
||||
|
||||
### Community 135 - "unsettled_plans_q_filter"
|
||||
Cohesion: 0.18
|
||||
Nodes (23): cancel_apply(), create_apply(), create_record(), delete_applies(), delete_records(), get_apply(), get_record(), list_applies() (+15 more)
|
||||
|
||||
### Community 136 - "Community 136"
|
||||
Cohesion: 0.22
|
||||
Nodes (16): create_role(), get_role(), get_role_data_scope(), get_role_menu_ids(), list_roles(), Any, Session, 角色 CRUD(sys_role / sys_role_menu / sys_role_data_scope_detail) (+8 more)
|
||||
Cohesion: 0.19
|
||||
Nodes (18): create_role(), get_role(), get_role_data_scope(), get_role_menu_ids(), list_roles(), Any, Session, 角色 CRUD(sys_role / sys_role_menu / sys_role_data_scope_detail) (+10 more)
|
||||
|
||||
### Community 137 - "statistics.py"
|
||||
Cohesion: 0.35
|
||||
@@ -673,40 +692,32 @@ Cohesion: 0.22
|
||||
Nodes (15): get_storage(), download_file_bytes(), file_stream(), get_access_url(), get_download_url(), get_preview_url(), normalize_storage_path(), 报销附件存储适配 — 复用门户 app.core.storage,对外保持 bx 协议。 (+7 more)
|
||||
|
||||
### Community 141 - "PlTransport"
|
||||
Cohesion: 0.15
|
||||
Nodes (31): approve_task(), _assert_wf_instance_in_scope(), _business_type_label(), create_process_def(), _enrich_task_list(), get_business_all_tasks(), _get_business_form_fields(), get_designer_data() (+23 more)
|
||||
Cohesion: 0.18
|
||||
Nodes (25): approve_task(), _assert_wf_instance_in_scope(), _business_type_label(), create_process_def(), delete_process_def(), _enrich_task_list(), get_business_all_tasks(), _get_business_form_fields() (+17 more)
|
||||
|
||||
### Community 144 - "dict_data.py"
|
||||
Cohesion: 0.27
|
||||
Nodes (11): create_dict_data(), get_dict_data(), list_dict_data(), list_dict_data_options(), Any, Session, 字典数据 CRUD(sys_dict_data), 字典下拉选项:租户主数据,忽略数据范围(user_info 保留兼容调用方,不参与过滤)。 (+3 more)
|
||||
|
||||
### Community 145 - "resolve_crm_product"
|
||||
Cohesion: 0.51
|
||||
Nodes (10): apply_site_feedback(), OrderItem, _header(), _item(), test_apply_site_feedback_does_not_reset_first_submitted_at(), test_apply_site_feedback_keeps_in_progress_when_requested(), test_apply_site_feedback_rejects_already_voided(), test_apply_site_feedback_rejects_invalid_status() (+2 more)
|
||||
|
||||
### Community 146 - "__init__.py"
|
||||
Cohesion: 0.67
|
||||
Nodes (3): 注册本地回调函数。当 callback_url 以 path 开头时直接调用 fn。, register_local_callback(), _LocalCallbackFn
|
||||
Cohesion: 0.10
|
||||
Nodes (43): apply_dibang_prefill_to_order(), apply_site_feedback(), build_io_order_site_url(), create_io_order_for_transport(), _dibang_qty_by_plan_product(), enrich_io_items_with_brand_feedback(), enrich_io_order_dict(), _format_io_product_summary_line() (+35 more)
|
||||
|
||||
### Community 147 - "Community 147"
|
||||
Cohesion: 0.37
|
||||
Nodes (17): check_env(), check_python(), create_venv(), init_env(), install_dependencies(), log_error(), log_info(), log_success() (+9 more)
|
||||
|
||||
### Community 150 - "apply_site_feedback"
|
||||
Cohesion: 0.29
|
||||
Nodes (9): ProductSnapshot, Session, 地磅模块 — CRM 产品解析与快照写入。, 校验 CRM 产品并返回名称/规格快照。新建单据 product_id 必填。 require_on_shelf=False 用于运输计划联动地磅等历, resolve_crm_product(), _product(), resolve_crm_product:运输联动场景允许已下架产品。, test_resolve_allows_off_shelf_when_not_required() (+1 more)
|
||||
|
||||
### Community 154 - "response.py"
|
||||
Cohesion: 0.19
|
||||
Nodes (7): _guess_preview_content_type(), MinIOStorage, Any, 从 MINIO_BASE_URL 解析公网 endpoint;未配置或与内网相同时复用 self.client。, 按对象键后缀推断内联预览 Content-Type(纠正上传时未写入 MIME 的情况)。, MinIO 预签名下载 URL,携带原始文件名。, MinIO 预签名内联预览 URL(图片新标签页 / PDF iframe 等)。 上传时 put_object 未写 content_typ
|
||||
Cohesion: 0.28
|
||||
Nodes (4): MinIOStorage, Any, 从 MINIO_BASE_URL 解析公网 endpoint;未配置或与内网相同时复用 self.client。, MinIO 预签名下载 URL,携带原始文件名。
|
||||
|
||||
### Community 159 - "customer_update"
|
||||
Cohesion: 0.06
|
||||
Nodes (50): bx_health(), 报销(bx)API 路由聚合 — REST 风格,协议对齐 bx 原系统。, P0 健康检查:验证 bx 路由已挂载且响应协议为 code=0。, get_menu_list(), 运营端菜单接口(与 web-admin 前端静态路由 sqxp.ts 对齐,14 个一级菜单), Session, recognize_cert(), RecognizeCertBody (+42 more)
|
||||
Cohesion: 0.09
|
||||
Nodes (37): get_menu_list(), 运营端菜单接口(与 web-admin 前端静态路由 sqxp.ts 对齐,14 个一级菜单), 报销模块认证适配:门户 JWT 用户 → bx 业务上下文。, get_user_menu_codes(), Session, 菜单 code 权限守卫(V0.3:通过 sys_user_role → sys_role_menu → sys_menu.perms), 运营端角色守卫:admin / super_admin 可访问。, 读取用户授权的菜单权限标识集合(与前端 meta.menuCode / perms 对齐)。 (+29 more)
|
||||
|
||||
### Community 160 - "register_local_callback"
|
||||
Cohesion: 0.16
|
||||
Nodes (17): API 路由包 — 山峡化工生产一体化门户, create_leave(), delete_leave(), get_leave(), _leave_local_callback(), leave_workflow_callback(), list_leaves(), Session (+9 more)
|
||||
Cohesion: 0.08
|
||||
Nodes (33): API 路由包 — 山峡化工生产一体化门户, create_leave(), delete_leave(), get_leave(), _leave_local_callback(), leave_workflow_callback(), list_leaves(), Session (+25 more)
|
||||
|
||||
### Community 161 - "backfill_crm_contract_attachment_urls.py"
|
||||
Cohesion: 0.24
|
||||
@@ -717,36 +728,32 @@ Cohesion: 0.42
|
||||
Nodes (7): default_settlement_clause(), test_advance_payment_clause(), test_arrive_payment_clause(), test_empty_falls_back_to_arrive(), test_monthly_settlement_clause_uses_label(), test_unknown_falls_back_to_arrive(), test_volume_quarterly_other_labels()
|
||||
|
||||
### Community 164 - "get_client_ip"
|
||||
Cohesion: 0.16
|
||||
Nodes (20): logout(), 登出:吊销 Redis 会话(若已配置 REDIS_HOST)。无 Token 或已失效时仍返回成功(幂等)。, decode_token(), extend_session(), get_client_ip(), get_current_user(), get_current_user_by_token(), get_current_user_simple() (+12 more)
|
||||
Cohesion: 0.09
|
||||
Nodes (50): _avatar_url_field(), _build_user_info_payload(), change_current_user_password(), get_current_user_profile(), get_web_auth_menu_codes(), _jwt_user_payload(), logout(), public_quote_share() (+42 more)
|
||||
|
||||
### Community 170 - "test_quote_approver_setting.py"
|
||||
Cohesion: 0.22
|
||||
Nodes (3): BaseStorage, 带下载文件名的访问 URL;默认实现为普通访问地址。, 浏览器内联预览 URL;默认实现为普通访问地址。
|
||||
Cohesion: 0.17
|
||||
Nodes (3): BaseStorage, QiniuStorage, 浏览器内联预览 URL;默认实现为普通访问地址。
|
||||
|
||||
### Community 171 - "minio_url.py"
|
||||
Cohesion: 0.11
|
||||
Nodes (31): get_pool_record(), list_pool_records(), Any, Session, _row_to_dict(), total_pages(), create_pool_rule(), delete_pool_rules() (+23 more)
|
||||
|
||||
### Community 172 - "apply_pl_scope"
|
||||
Cohesion: 0.10
|
||||
Nodes (20): list_public_vehicle_plates(), Session, 地磅公共只读:免登车牌 options(现场填写页), 免登:按出入库/计划解析 tenant_no,返回 pl_vehicle 车牌(self + carrier)。, _resolve_tenant_no(), _db_pool_keepalive_loop(), _error_json(), lifespan() (+12 more)
|
||||
Cohesion: 0.13
|
||||
Nodes (19): get_current_time(), parse_datetime(), datetime, get_pool_record(), list_pool_records(), Any, Session, _row_to_dict() (+11 more)
|
||||
|
||||
### Community 173 - "resolve_create_time_bounds"
|
||||
Cohesion: 0.04
|
||||
Nodes (83): _build_page(), _get_by_token(), _make_handlers(), _models(), Session, 运输计划 · 入库/出库单现场免登录公共 API, SoftDeleteModel, CrmProduct (+75 more)
|
||||
Cohesion: 0.07
|
||||
Nodes (53): _build_page(), _get_by_token(), _models(), Session, 运输计划 · 入库/出库单现场免登录公共 API, QrCodeResponse, SoftDeleteModel, BizAttachment (+45 more)
|
||||
|
||||
### Community 174 - "register_local_callback"
|
||||
Cohesion: 0.08
|
||||
Nodes (49): 返回 (作废, 归档)。现场链接实际走入库/出库单公共页。, _resolve_io_order_link_flags(), _build_public_page(), _build_site_product_read(), _format_file_size(), get_public_site(), _get_site_link_by_token(), _parse_feedback_images() (+41 more)
|
||||
Cohesion: 0.06
|
||||
Nodes (64): 返回 (作废, 归档)。现场链接实际走入库/出库单公共页。, _resolve_io_order_link_flags(), _build_public_page(), _build_site_product_read(), _format_file_size(), get_public_site(), _get_site_link_by_token(), _parse_feedback_images() (+56 more)
|
||||
|
||||
### Community 179 - "test_pl_vehicle_personnel_photo_schema.py"
|
||||
Cohesion: 0.27
|
||||
Nodes (16): add_favorite(), count_active(), find_active(), find_soft_deleted(), list_favorites(), _next_order_num(), normalize_menu_path(), Any (+8 more)
|
||||
|
||||
### Community 180 - "OSSStorage"
|
||||
Cohesion: 0.06
|
||||
Nodes (70): archive_plan(), cancel_plan(), cancel_plan_wait_notice(), count_plans_by_contract(), create_from_contract(), create_plan(), create_plan_full(), _determine_plan_type() (+62 more)
|
||||
Cohesion: 0.05
|
||||
Nodes (125): archive_plan(), _build_driver_url(), cancel_plan_wait_notice(), count_plans_by_contract(), create_from_contract(), create_plan(), create_plan_full(), delete_plan() (+117 more)
|
||||
|
||||
### Community 182 - "statistics.py"
|
||||
Cohesion: 0.45
|
||||
@@ -757,24 +764,12 @@ Cohesion: 0.67
|
||||
Nodes (3): parse_optional_plan_datetime(), datetime, 运输计划相关日期时间解析:前端 date-picker 仅传 YYYY-MM-DD。
|
||||
|
||||
### Community 184 - "excel_export.py"
|
||||
Cohesion: 0.19
|
||||
Nodes (15): CRM 模块 Excel 导出列定义(字段与字典类型对齐 Java *Vo @ExcelDictFormat)。, _build_workbook(), DictLabelResolver, export_rows_to_xlsx_response(), ExportColumn, load_dict_label_maps(), Any, Session (+7 more)
|
||||
|
||||
### Community 187 - "price_letter_detail"
|
||||
Cohesion: 0.18
|
||||
Nodes (19): _avatar_url_field(), _build_user_info_payload(), _jwt_user_payload(), 公共接口(Web 登录、刷新 Token、登出;用户模型对齐 docs/sql/shanxia2.0.sql 基线), 与 web-admin 静态路由 meta.roles(admin/super_admin)对齐的单元素数组。, 与 web-admin `userInfo` 字段约定一致。, Web 端登录用 RSA 公钥(PKCS#1 v1.5,与 JSEncrypt 一致), Web 端登录:账号为 sys_user.user_no,密码为 sys_user.password(bcrypt)。 (+11 more)
|
||||
Cohesion: 0.23
|
||||
Nodes (12): CRM 模块 Excel 导出列定义(字段与字典类型对齐 Java *Vo @ExcelDictFormat)。, _build_workbook(), DictLabelResolver, export_rows_to_xlsx_response(), ExportColumn, Any, Excel 导出工具:集中处理字典 code → label(对齐 Java ExcelDictConvert / ExcelDictPreloadConver, CRM 列表导出统一入口:表头 + 行数据 + 字典 label 转换 + 文件流响应。 (+4 more)
|
||||
|
||||
### Community 188 - "get_client_ip"
|
||||
Cohesion: 0.15
|
||||
Nodes (16): format_datetime(), get_current_time(), parse_datetime(), datetime, get_last_month_range(), month_range(), date, Session (+8 more)
|
||||
|
||||
### Community 193 - "storage.py"
|
||||
Cohesion: 0.17
|
||||
Nodes (11): pool_customer_assign(), pool_customer_claim(), pool_customer_list(), pool_record_detail(), pool_record_list(), PoolAssignBody, PoolClaimBody, PoolCustomerListBody (+3 more)
|
||||
|
||||
### Community 200 - "assert_contract_editable_for_update"
|
||||
Cohesion: 0.60
|
||||
Nodes (3): assert_contract_editable_for_update(), test_assert_allows_editable(), test_assert_rejects_non_editable()
|
||||
Cohesion: 0.24
|
||||
Nodes (12): get_last_month_range(), month_range(), date, Session, 地磅计划按月自动生成 — 迁移自 simple-dibang-xiaoshou/auto-create-plan/auto_create_monthly_pla, 按月自动生成采购计划。 - 默认仅在每月 1 日执行(force=True 时跳过该限制,供手动触发验收) - 遍历所有租户,按上月计划模板生, run_auto_generate_monthly_plans(), default_execution_status() (+4 more)
|
||||
|
||||
### Community 206 - "crm_quote_pdf.py"
|
||||
Cohesion: 0.36
|
||||
@@ -785,8 +780,8 @@ Cohesion: 0.18
|
||||
Nodes (10): 1. 创建虚拟环境, 2. 安装依赖, 3. 配置环境变量, 4. 启动服务, API 路由分组, shanxia2.0 后端骨架(FastAPI), 开发规范, 快速开始 (+2 more)
|
||||
|
||||
### Community 220 - "api_crypto_middleware.py"
|
||||
Cohesion: 0.24
|
||||
Nodes (13): _claims_from_auth(), _coerce_post_method_override_to_get(), _get_redis_client(), _is_crypto_api(), _json_error_response(), _mark_nonce_once(), _nonce_key(), Redis (+5 more)
|
||||
Cohesion: 0.15
|
||||
Nodes (21): _claims_from_auth(), _coerce_post_method_override_to_get(), _get_redis_client(), _is_crypto_api(), _json_error_response(), _mark_nonce_once(), _nonce_key(), Redis (+13 more)
|
||||
|
||||
### Community 237 - "order_status_compat.py"
|
||||
Cohesion: 0.36
|
||||
@@ -808,17 +803,17 @@ Nodes (6): eq_unicode(), like_unicode(), MySQL 字符串比较/模糊匹配时
|
||||
## Suggested Questions
|
||||
_Questions this graph is uniquely positioned to answer:_
|
||||
|
||||
- **Why does `generate_uuid()` connect `Community 25` to `Community 0`, `Community 1`, `plan.py`, `Community 4`, `Community 5`, `Community 6`, `Community 134`, `Community 8`, `statistics.py`, `Community 136`, `Community 11`, `Community 15`, `dict_data.py`, `Community 17`, `Community 16`, `Community 21`, `Community 24`, `Community 28`, `Community 29`, `customer_update`, `Community 32`, `Community 34`, `Community 36`, `Community 38`, `Community 39`, `minio_url.py`, `Community 43`, `Community 45`, `resolve_create_time_bounds`, `OSSStorage`, `Community 53`, `Community 58`, `price_letter_detail`, `get_client_ip`, `Community 61`, `Community 62`, `Community 64`, `Community 65`, `Community 66`, `Community 67`, `Community 68`, `Community 71`, `Community 83`, `Community 86`, `Community 87`, `pl_ocr_service.py`, `pl_vehicle_recharge_service.py`, `Community 92`, `_invoice_info_by_customer_impl`, `Community 95`, `apply_crm_create_by_scope`, `apply_pl_scope`, `Community 109`, `quote_share_log.py`, `db_models.py`, `site.py`, `Community 116`, `Community 118`, `Community 122`, `customer_pool.py`?**
|
||||
_High betweenness centrality (0.134) - this node is a cross-community bridge._
|
||||
- **Why does `get_tenant_no()` connect `Community 7` to `Community 0`, `Community 1`, `Community 2`, `crm_supplier_hazard.py`, `Community 5`, `unsettled_plans_q_filter`, `Community 8`, `Community 10`, `Community 11`, `Community 12`, `Community 13`, `Community 15`, `Community 17`, `Community 18`, `Community 19`, `Community 24`, `Community 27`, `Community 29`, `customer_update`, `Community 38`, `Community 41`, `Community 43`, `Community 45`, `Community 47`, `Community 49`, `Community 51`, `OSSStorage`, `Community 54`, `Community 58`, `Community 60`, `Community 62`, `Community 64`, `storage.py`, `Community 66`, `Community 65`, `Community 71`, `Community 74`, `Community 78`, `Community 109`, `site.py`?**
|
||||
_High betweenness centrality (0.097) - this node is a cross-community bridge._
|
||||
- **Why does `BaseModel` connect `Community 12` to `Community 0`, `Community 1`, `Community 2`, `Community 3`, `crm_supplier_hazard.py`, `datetime_parse.py`, `Community 5`, `Community 7`, `unsettled_plans_q_filter`, `Community 10`, `Community 11`, `PlTransport`, `Community 13`, `Community 15`, `Community 16`, `Community 18`, `Community 19`, `Community 20`, `Community 24`, `Community 27`, `customer_update`, `register_local_callback`, `Community 41`, `Community 43`, `Community 45`, `resolve_create_time_bounds`, `Community 47`, `Community 51`, `OSSStorage`, `Community 54`, `Community 56`, `Community 57`, `Community 58`, `Community 60`, `Community 62`, `Community 64`, `storage.py`, `Community 65`, `Community 71`, `Community 109`, `Community 111`, `site.py`, `Community 119`?**
|
||||
_High betweenness centrality (0.089) - this node is a cross-community bridge._
|
||||
- **Why does `generate_uuid()` connect `Community 71` to `Community 0`, `Community 4`, `Community 6`, `Community 134`, `Community 8`, `statistics.py`, `Community 136`, `Community 11`, `Community 14`, `Community 15`, `dict_data.py`, `resolve_crm_product`, `Community 18`, `Community 16`, `Community 21`, `Community 24`, `Community 25`, `Community 28`, `Community 29`, `customer_update`, `Community 32`, `get_client_ip`, `Community 36`, `Community 39`, `Community 40`, `minio_url.py`, `Community 43`, `Community 45`, `resolve_create_time_bounds`, `Community 50`, `OSSStorage`, `Community 53`, `Community 56`, `Community 57`, `Community 58`, `get_client_ip`, `Community 61`, `Community 62`, `Community 64`, `Community 65`, `Community 67`, `Community 68`, `Community 72`, `apply_crm_create_by_scope`, `opportunity_follow.py`, `customer_follow.py`, `Community 83`, `allocate_next_biz_no`, `Community 86`, `Community 87`, `pl_ocr_service.py`, `pl_vehicle_recharge_service.py`, `Community 92`, `Community 95`, `apply_crm_create_by_scope`, `apply_pl_scope`, `Community 109`, `quote_share_log.py`, `db_models.py`, `site.py`, `Community 116`, `Community 118`, `Community 122`, `customer_pool.py`?**
|
||||
_High betweenness centrality (0.107) - this node is a cross-community bridge._
|
||||
- **Why does `BaseModel` connect `Community 12` to `Community 0`, `Community 1`, `Community 2`, `Community 3`, `Community 7`, `Community 10`, `Community 11`, `PlTransport`, `Community 13`, `Community 15`, `Community 14`, `Community 16`, `Community 18`, `Community 19`, `Community 24`, `Community 25`, `Community 26`, `Community 27`, `register_local_callback`, `Community 34`, `Community 41`, `Community 43`, `resolve_create_time_bounds`, `Community 45`, `register_local_callback`, `Community 51`, `OSSStorage`, `Community 54`, `Community 58`, `Community 60`, `Community 62`, `Community 64`, `Community 65`, `Community 66`, `Community 71`, `Community 74`, `Community 111`, `site.py`, `Community 119`?**
|
||||
_High betweenness centrality (0.093) - this node is a cross-community bridge._
|
||||
- **Why does `Settings` connect `price_letter_detail` to `_ensure_subpack_slip_no`, `Community 35`, `Community 67`, `Community 37`, `Community 73`, `Community 42`, `Community 44`, `register_local_callback`, `Community 46`, `Community 52`, `Community 59`, `Community 30`?**
|
||||
_High betweenness centrality (0.093) - this node is a cross-community bridge._
|
||||
- **Are the 8 inferred relationships involving `DbUserContext` (e.g. with `InventoryRelatedData` and `AutoGenerateMonthlyResult`) actually correct?**
|
||||
_`DbUserContext` has 8 INFERRED edges - model-reasoned connections that need verification._
|
||||
- **Are the 247 inferred relationships involving `ValueError` (e.g. with `.presigned_download_url()` and `.presigned_preview_url()`) actually correct?**
|
||||
_`ValueError` has 247 INFERRED edges - model-reasoned connections that need verification._
|
||||
- **What connects `API 路由包 — 山峡化工生产一体化门户`, `返回运营端角色下拉选项(label=库中角色名,value=Web 角色码)。`, `返回用户下拉选项(label=昵称,value=用户ID,附带 nickName/userNo)。 供申请人/审批人等选择场景使用,返回本租户全部有效` to the rest of the system?**
|
||||
_560 weakly-connected nodes found - possible documentation gaps or missing edges._
|
||||
- **Should `Community 0` be split into smaller, more focused modules?**
|
||||
_Cohesion score 0.14082503556187767 - nodes in this community are weakly interconnected._
|
||||
_568 weakly-connected nodes found - possible documentation gaps or missing edges._
|
||||
- **Should `Community 1` be split into smaller, more focused modules?**
|
||||
_Cohesion score 0.0636523266022827 - nodes in this community are weakly interconnected._
|
||||
_Cohesion score 0.08163265306122448 - nodes in this community are weakly interconnected._
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"nodes": [{"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_models_crm_models_py", "label": "crm_models.py", "file_type": "code", "source_file": "app/models/crm_models.py", "source_location": "L1"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_models_crm_models_crmproductcategory", "label": "CrmProductCategory", "file_type": "code", "source_file": "app/models/crm_models.py", "source_location": "L21"}, {"id": "base", "label": "Base", "file_type": "code", "source_file": "", "source_location": ""}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_models_crm_models_crmproduct", "label": "CrmProduct", "file_type": "code", "source_file": "app/models/crm_models.py", "source_location": "L43"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_models_crm_models_crmproductbrand", "label": "CrmProductBrand", "file_type": "code", "source_file": "app/models/crm_models.py", "source_location": "L79"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_models_crm_models_crmproductalias", "label": "CrmProductAlias", "file_type": "code", "source_file": "app/models/crm_models.py", "source_location": "L99"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_models_crm_models_sysoss", "label": "SysOss", "file_type": "code", "source_file": "app/models/crm_models.py", "source_location": "L118"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_models_crm_models_crmcustomer", "label": "CrmCustomer", "file_type": "code", "source_file": "app/models/crm_models.py", "source_location": "L150"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_models_crm_models_crmcontact", "label": "CrmContact", "file_type": "code", "source_file": "app/models/crm_models.py", "source_location": "L234"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_models_crm_models_crminvoiceinfo", "label": "CrmInvoiceInfo", "file_type": "code", "source_file": "app/models/crm_models.py", "source_location": "L269"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_models_crm_models_crmcustomerfollow", "label": "CrmCustomerFollow", "file_type": "code", "source_file": "app/models/crm_models.py", "source_location": "L297"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_models_crm_models_crmcustomerpool", "label": "CrmCustomerPool", "file_type": "code", "source_file": "app/models/crm_models.py", "source_location": "L328"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_models_crm_models_crmcustomerpoolrule", "label": "CrmCustomerPoolRule", "file_type": "code", "source_file": "app/models/crm_models.py", "source_location": "L354"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_models_crm_models_crmopportunity", "label": "CrmOpportunity", "file_type": "code", "source_file": "app/models/crm_models.py", "source_location": "L377"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_models_crm_models_crmopportunityfollow", "label": "CrmOpportunityFollow", "file_type": "code", "source_file": "app/models/crm_models.py", "source_location": "L420"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_models_crm_models_crmopportunityproduct", "label": "CrmOpportunityProduct", "file_type": "code", "source_file": "app/models/crm_models.py", "source_location": "L451"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_models_crm_models_crmopportunitystagelog", "label": "CrmOpportunityStageLog", "file_type": "code", "source_file": "app/models/crm_models.py", "source_location": "L481"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_models_crm_models_crmcontract", "label": "CrmContract", "file_type": "code", "source_file": "app/models/crm_models.py", "source_location": "L512"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_models_crm_models_crmcontractapproversetting", "label": "CrmContractApproverSetting", "file_type": "code", "source_file": "app/models/crm_models.py", "source_location": "L597"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_models_crm_models_crmcontractapproval", "label": "CrmContractApproval", "file_type": "code", "source_file": "app/models/crm_models.py", "source_location": "L616"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_models_crm_models_crmcontractchange", "label": "CrmContractChange", "file_type": "code", "source_file": "app/models/crm_models.py", "source_location": "L647"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_models_crm_models_crmcontracttemplate", "label": "CrmContractTemplate", "file_type": "code", "source_file": "app/models/crm_models.py", "source_location": "L678"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_models_crm_models_crmcontractproduct", "label": "CrmContractProduct", "file_type": "code", "source_file": "app/models/crm_models.py", "source_location": "L712"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_models_crm_models_crmcontractproductpricetier", "label": "CrmContractProductPriceTier", "file_type": "cLine truncated
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"nodes": [{"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_core_id_card_py", "label": "id_card.py", "file_type": "code", "source_file": "app/core/id_card.py", "source_location": "L1"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_core_id_card_calc_age_from_chinese_id_card", "label": "calc_age_from_chinese_id_card()", "file_type": "code", "source_file": "app/core/id_card.py", "source_location": "L11"}, {"id": "date", "label": "date", "file_type": "code", "source_file": "", "source_location": "", "origin_file": "/Users/wuzilong/work/00code/shanxia2.0/backend/app/core/id_card.py"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_core_id_card_rationale_16", "label": "\u4ece 18 \u4f4d\u8eab\u4efd\u8bc1\u53f7\u8ba1\u7b97\u5468\u5c81\u3002\u53f7\u7801\u4e0d\u5b8c\u6574\u6216\u51fa\u751f\u65e5\u671f\u65e0\u6548\u65f6\u8fd4\u56de None\u3002", "file_type": "rationale", "source_file": "app/core/id_card.py", "source_location": "L16"}], "edges": [{"source": "users_wuzilong_work_00code_shanxia2_0_backend_app_core_id_card_py", "target": "re", "relation": "imports", "context": "import", "confidence": "EXTRACTED", "source_file": "app/core/id_card.py", "source_location": "L4", "weight": 1.0}, {"source": "users_wuzilong_work_00code_shanxia2_0_backend_app_core_id_card_py", "target": "datetime", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "app/core/id_card.py", "source_location": "L5", "weight": 1.0}, {"source": "users_wuzilong_work_00code_shanxia2_0_backend_app_core_id_card_py", "target": "typing", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "app/core/id_card.py", "source_location": "L6", "weight": 1.0}, {"source": "users_wuzilong_work_00code_shanxia2_0_backend_app_core_id_card_py", "target": "users_wuzilong_work_00code_shanxia2_0_backend_app_core_id_card_calc_age_from_chinese_id_card", "relation": "contains", "confidence": "EXTRACTED", "source_file": "app/core/id_card.py", "source_location": "L11", "weight": 1.0}, {"source": "users_wuzilong_work_00code_shanxia2_0_backend_app_core_id_card_calc_age_from_chinese_id_card", "target": "date", "relation": "references", "context": "generic_arg", "confidence": "EXTRACTED", "source_file": "app/core/id_card.py", "source_location": "L11", "weight": 1.0}, {"source": "users_wuzilong_work_00code_shanxia2_0_backend_app_core_id_card_calc_age_from_chinese_id_card", "target": "date", "relation": "calls", "context": "call", "confidence": "EXTRACTED", "source_file": "app/core/id_card.py", "source_location": "L31", "weight": 1.0}, {"source": "users_wuzilong_work_00code_shanxia2_0_backend_app_core_id_card_rationale_16", "target": "users_wuzilong_work_00code_shanxia2_0_backend_app_core_id_card_calc_age_from_chinese_id_card", "relation": "rationale_for", "confidence": "EXTRACTED", "source_file": "app/core/id_card.py", "source_location": "L16", "weight": 1.0}], "raw_calls": [{"caller_nid": "users_wuzilong_work_00code_shanxia2_0_backend_app_core_id_card_calc_age_from_chinese_id_card", "callee": "str", "is_member_call": false, "indirect": true, "context": "argument", "source_file": "/Users/wuzilong/work/00code/shanxia2.0/backend/app/core/id_card.py", "source_location": "L17"}, {"caller_nid": "users_wuzilong_work_00code_shanxia2_0_backend_app_core_id_card_calc_age_from_chinese_id_card", "callee": "upper", "is_member_call": true, "source_file": "/Users/wuzilong/work/00code/shanxia2.0/backend/app/core/id_card.py", "source_location": "L19", "receiver": null}, {"caller_nid": "users_wuzilong_work_00code_shanxia2_0_backend_app_core_id_card_calc_age_from_chinese_id_card", "callee": "strip", "is_member_call": true, "source_file": "/Users/wuzilong/work/00code/shanxia2.0/backend/app/core/id_card.py", "source_location": "L19", "receiver": "id_card"}, {"caller_nid": "users_wuzilong_work_00code_shanxia2_0_backend_app_core_id_card_calc_age_from_chinese_id_card", "callee": "match", "is_member_call": true, "source_file": "/Users/wuzilong/work/00code/shanxia2.0/backend/app/core/id_card.py", "source_location": "L20", "receiver": "_ID18_RE"}, {"caller_nid": "users_wuzilong_work_00code_shanxia2_0_backend_app_core_id_card_calc_age_from_chinese_id_card", "callee": "today", "is_member_call": true, "source_file": "/Users/wuzilong/work/00code/shanxia2.0/backend/app/core/id_card.py", "source_location": "L35", "receiver": "date"}], "callable_nids": ["users_wuzilong_work_00code_shanxia2_0_backend_app_core_id_card_calc_age_from_chinese_id_card"]}
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"nodes": [{"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_services_bx_reimburse_import_py", "label": "reimburse_import.py", "file_type": "code", "source_file": "app/services/bx/reimburse_import.py", "source_location": "L1"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_services_bx_reimburse_import_build_applicant_label", "label": "build_applicant_label()", "file_type": "code", "source_file": "app/services/bx/reimburse_import.py", "source_location": "L59"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_services_bx_reimburse_import_ids_visible_in_web_tree", "label": "_ids_visible_in_web_tree()", "file_type": "code", "source_file": "app/services/bx/reimburse_import.py", "source_location": "L65"}, {"id": "any", "label": "Any", "file_type": "code", "source_file": "", "source_location": "", "origin_file": "/Users/wuzilong/work/00code/shanxia2.0/backend/app/services/bx/reimburse_import.py"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_services_bx_reimburse_import_build_expense_path_labels", "label": "build_expense_path_labels()", "file_type": "code", "source_file": "app/services/bx/reimburse_import.py", "source_location": "L87"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_services_bx_reimburse_import_is_example_row", "label": "is_example_row()", "file_type": "code", "source_file": "app/services/bx/reimburse_import.py", "source_location": "L129"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_services_bx_reimburse_import_partition_import_groups", "label": "partition_import_groups()", "file_type": "code", "source_file": "app/services/bx/reimburse_import.py", "source_location": "L134"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_services_bx_reimburse_import_validate_group_headers", "label": "validate_group_headers()", "file_type": "code", "source_file": "app/services/bx/reimburse_import.py", "source_location": "L150"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_services_bx_reimburse_import_cell_str", "label": "cell_str()", "file_type": "code", "source_file": "app/services/bx/reimburse_import.py", "source_location": "L168"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_services_bx_reimburse_import_parse_amount", "label": "parse_amount()", "file_type": "code", "source_file": "app/services/bx/reimburse_import.py", "source_location": "L183"}, {"id": "decimal", "label": "Decimal", "file_type": "code", "source_file": "", "source_location": "", "origin_file": "/Users/wuzilong/work/00code/shanxia2.0/backend/app/services/bx/reimburse_import.py"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_services_bx_reimburse_import_load_expense_nodes_flat", "label": "load_expense_nodes_flat()", "file_type": "code", "source_file": "app/services/bx/reimburse_import.py", "source_location": "L195"}, {"id": "session", "label": "Session", "file_type": "code", "source_file": "", "source_location": "", "origin_file": "/Users/wuzilong/work/00code/shanxia2.0/backend/app/services/bx/reimburse_import.py"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_services_bx_reimburse_import_load_applicant_options", "label": "load_applicant_options()", "file_type": "code", "source_file": "app/services/bx/reimburse_import.py", "source_location": "L214"}, {"id": "bxusercontext", "label": "BxUserContext", "file_type": "code", "source_file": "", "source_location": "", "origin_file": "/Users/wuzilong/work/00code/shanxia2.0/backend/app/services/bx/reimburse_import.py"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_services_bx_reimburse_import_build_import_template_bytes", "label": "build_import_template_bytes()", "file_type": "code", "source_file": "app/services/bx/reimburse_import.py", "source_location": "L231"}, {"id": "date", "label": "date", "file_type": "code", "source_file": "", "source_location": "", "origin_file": "/Users/wuzilong/work/00code/shanxia2.0/backend/app/services/bx/reimburse_import.py"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_services_bx_reimburse_import_read_sheet_header", "label": "_read_sheet_header()", "file_type": "code", "source_file": "app/services/bx/reimburse_import.py", "source_location": "L312"}, {"id": "worksheet", "label": "Worksheet", "file_type": "code", "source_file": "", "source_location": "", "origin_file": "/Users/wuzilong/work/00code/shanxia2.0/backend/app/services/bx/reimburse_import.py"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_services_bx_reimburse_import_scan_sheet_rows", "label": "scan_sheet_rows()", "file_type": "code", "source_file": "app/services/bx/reimburse_import.py", "source_location": "L321"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_services_bx_reimburse_import_iter_data_rows", "label": "iter_data_rows()", "file_type": "code", "source_file": "app/services/bx/reimburse_import.py", "source_location": "L346"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_services_bx_reimburse_import_build_annotatLine truncated
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"nodes": [{"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_tasks_init_py", "label": "__init__.py", "file_type": "code", "source_file": "app/tasks/__init__.py", "source_location": "L1"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_tasks_init_init_scheduled_tasks", "label": "init_scheduled_tasks()", "file_type": "code", "source_file": "app/tasks/__init__.py", "source_location": "L10"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_tasks_init_shutdown_scheduler", "label": "shutdown_scheduler()", "file_type": "code", "source_file": "app/tasks/__init__.py", "source_location": "L78"}], "edges": [{"source": "users_wuzilong_work_00code_shanxia2_0_backend_app_tasks_init_py", "target": "logging", "relation": "imports", "context": "import", "confidence": "EXTRACTED", "source_file": "app/tasks/__init__.py", "source_location": "L2", "weight": 1.0}, {"source": "users_wuzilong_work_00code_shanxia2_0_backend_app_tasks_init_py", "target": "apscheduler_schedulers_background", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "app/tasks/__init__.py", "source_location": "L4", "weight": 1.0}, {"source": "users_wuzilong_work_00code_shanxia2_0_backend_app_tasks_init_py", "target": "users_wuzilong_work_00code_shanxia2_0_backend_app_tasks_init_init_scheduled_tasks", "relation": "contains", "confidence": "EXTRACTED", "source_file": "app/tasks/__init__.py", "source_location": "L10", "weight": 1.0}, {"source": "users_wuzilong_work_00code_shanxia2_0_backend_app_tasks_init_py", "target": "users_wuzilong_work_00code_shanxia2_0_backend_app_tasks_init_shutdown_scheduler", "relation": "contains", "confidence": "EXTRACTED", "source_file": "app/tasks/__init__.py", "source_location": "L78", "weight": 1.0}], "raw_calls": [{"caller_nid": "users_wuzilong_work_00code_shanxia2_0_backend_app_tasks_init_init_scheduled_tasks", "callee": "start", "is_member_call": true, "source_file": "/Users/wuzilong/work/00code/shanxia2.0/backend/app/tasks/__init__.py", "source_location": "L14", "receiver": "scheduler"}, {"caller_nid": "users_wuzilong_work_00code_shanxia2_0_backend_app_tasks_init_init_scheduled_tasks", "callee": "info", "is_member_call": true, "source_file": "/Users/wuzilong/work/00code/shanxia2.0/backend/app/tasks/__init__.py", "source_location": "L15", "receiver": "logger"}, {"caller_nid": "users_wuzilong_work_00code_shanxia2_0_backend_app_tasks_init_init_scheduled_tasks", "callee": "add_job", "is_member_call": true, "source_file": "/Users/wuzilong/work/00code/shanxia2.0/backend/app/tasks/__init__.py", "source_location": "L27", "receiver": "scheduler"}, {"caller_nid": "users_wuzilong_work_00code_shanxia2_0_backend_app_tasks_init_init_scheduled_tasks", "callee": "check_customer_protect_time", "is_member_call": false, "indirect": true, "context": "argument", "source_file": "/Users/wuzilong/work/00code/shanxia2.0/backend/app/tasks/__init__.py", "source_location": "L28"}, {"caller_nid": "users_wuzilong_work_00code_shanxia2_0_backend_app_tasks_init_init_scheduled_tasks", "callee": "add_job", "is_member_call": true, "source_file": "/Users/wuzilong/work/00code/shanxia2.0/backend/app/tasks/__init__.py", "source_location": "L33", "receiver": "scheduler"}, {"caller_nid": "users_wuzilong_work_00code_shanxia2_0_backend_app_tasks_init_init_scheduled_tasks", "callee": "refresh_personnel_ages_job", "is_member_call": false, "indirect": true, "context": "argument", "source_file": "/Users/wuzilong/work/00code/shanxia2.0/backend/app/tasks/__init__.py", "source_location": "L34"}, {"caller_nid": "users_wuzilong_work_00code_shanxia2_0_backend_app_tasks_init_init_scheduled_tasks", "callee": "add_job", "is_member_call": true, "source_file": "/Users/wuzilong/work/00code/shanxia2.0/backend/app/tasks/__init__.py", "source_location": "L39", "receiver": "scheduler"}, {"caller_nid": "users_wuzilong_work_00code_shanxia2_0_backend_app_tasks_init_init_scheduled_tasks", "callee": "auto_generate_monthly_plans_job", "is_member_call": false, "indirect": true, "context": "argument", "source_file": "/Users/wuzilong/work/00code/shanxia2.0/backend/app/tasks/__init__.py", "source_location": "L40"}, {"caller_nid": "users_wuzilong_work_00code_shanxia2_0_backend_app_tasks_init_init_scheduled_tasks", "callee": "add_job", "is_member_call": true, "source_file": "/Users/wuzilong/work/00code/shanxia2.0/backend/app/tasks/__init__.py", "source_location": "L45", "receiver": "scheduler"}, {"caller_nid": "users_wuzilong_work_00code_shanxia2_0_backend_app_tasks_init_init_scheduled_tasks", "callee": "remind_customer_recycle", "is_member_call": false, "indirect": true, "context": "argument", "source_file": "/Users/wuzilong/work/00code/shanxia2.0/backend/app/tasks/__init__.py", "source_location": "L46"}, {"caller_nid": "users_wuzilong_work_00code_shanxia2_0_backend_app_tasks_init_init_scheduled_tasks", "callee": "add_job", "is_member_call": true, "source_file": "/Users/wuzilong/work/00code/shanxia2.0/backend/app/tasks/__init__.pyLine truncated
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"nodes": [{"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_crud_crm_contract_py", "label": "contract.py", "file_type": "code", "source_file": "app/crud/crm/contract.py", "source_location": "L1"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_crud_crm_contract_ensure_contract_in_scope", "label": "_ensure_contract_in_scope()", "file_type": "code", "source_file": "app/crud/crm/contract.py", "source_location": "L53"}, {"id": "session", "label": "Session", "file_type": "code", "source_file": "", "source_location": "", "origin_file": "/Users/wuzilong/work/00code/shanxia2.0/backend/app/crud/crm/contract.py"}, {"id": "crmcontract", "label": "CrmContract", "file_type": "code", "source_file": "", "source_location": "", "origin_file": "/Users/wuzilong/work/00code/shanxia2.0/backend/app/crud/crm/contract.py"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_crud_crm_contract_get_contract_row_in_scope", "label": "_get_contract_row_in_scope()", "file_type": "code", "source_file": "app/crud/crm/contract.py", "source_location": "L57"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_crud_crm_contract_total_pages", "label": "total_pages()", "file_type": "code", "source_file": "app/crud/crm/contract.py", "source_location": "L74"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_crud_crm_contract_decimal_value", "label": "_decimal_value()", "file_type": "code", "source_file": "app/crud/crm/contract.py", "source_location": "L80"}, {"id": "any", "label": "Any", "file_type": "code", "source_file": "", "source_location": "", "origin_file": "/Users/wuzilong/work/00code/shanxia2.0/backend/app/crud/crm/contract.py"}, {"id": "decimal", "label": "Decimal", "file_type": "code", "source_file": "", "source_location": "", "origin_file": "/Users/wuzilong/work/00code/shanxia2.0/backend/app/crud/crm/contract.py"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_crud_crm_contract_parse_optional_date", "label": "_parse_optional_date()", "file_type": "code", "source_file": "app/crud/crm/contract.py", "source_location": "L88"}, {"id": "date", "label": "date", "file_type": "code", "source_file": "", "source_location": "", "origin_file": "/Users/wuzilong/work/00code/shanxia2.0/backend/app/crud/crm/contract.py"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_crud_crm_contract_parse_optional_datetime", "label": "_parse_optional_datetime()", "file_type": "code", "source_file": "app/crud/crm/contract.py", "source_location": "L106"}, {"id": "datetime", "label": "datetime", "file_type": "code", "source_file": "", "source_location": "", "origin_file": "/Users/wuzilong/work/00code/shanxia2.0/backend/app/crud/crm/contract.py"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_crud_crm_contract_get_field", "label": "_get_field()", "file_type": "code", "source_file": "app/crud/crm/contract.py", "source_location": "L122"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_crud_crm_contract_resolve_user_display_name", "label": "_resolve_user_display_name()", "file_type": "code", "source_file": "app/crud/crm/contract.py", "source_location": "L129"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_crud_crm_contract_is_blank", "label": "_is_blank()", "file_type": "code", "source_file": "app/crud/crm/contract.py", "source_location": "L139"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_crud_crm_contract_first_non_blank", "label": "_first_non_blank()", "file_type": "code", "source_file": "app/crud/crm/contract.py", "source_location": "L143"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_crud_crm_contract_get_default_invoice_info", "label": "_get_default_invoice_info()", "file_type": "code", "source_file": "app/crud/crm/contract.py", "source_location": "L151"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_crud_crm_contract_build_customer_address", "label": "_build_customer_address()", "file_type": "code", "source_file": "app/crud/crm/contract.py", "source_location": "L161"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_crud_crm_contract_row_to_dict", "label": "_row_to_dict()", "file_type": "code", "source_file": "app/crud/crm/contract.py", "source_location": "L173"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_crud_crm_contract_contract_row_to_dict", "label": "contract_row_to_dict()", "file_type": "code", "source_file": "app/crud/crm/contract.py", "source_location": "L252"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_crud_crm_contract_build_contract_filters", "label": "_build_contract_filters()", "file_type": "code", "source_file": "app/crud/crm/contract.py", "source_location": "L256"}, {"id": "query", "label": "Query", "file_type": "code", "source_file": "", "source_location": "", "origin_file": "/Users/wuzilong/work/00code/shanxia2.0/backend/app/crud/crm/contract.py"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_crud_crm_contract_list_contracts", "label": "list_contractsLine truncated
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"nodes": [{"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_crud_crm_contract_py", "label": "contract.py", "file_type": "code", "source_file": "app/crud/crm/contract.py", "source_location": "L1"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_crud_crm_contract_ensure_contract_in_scope", "label": "_ensure_contract_in_scope()", "file_type": "code", "source_file": "app/crud/crm/contract.py", "source_location": "L53"}, {"id": "session", "label": "Session", "file_type": "code", "source_file": "", "source_location": "", "origin_file": "/Users/wuzilong/work/00code/shanxia2.0/backend/app/crud/crm/contract.py"}, {"id": "crmcontract", "label": "CrmContract", "file_type": "code", "source_file": "", "source_location": "", "origin_file": "/Users/wuzilong/work/00code/shanxia2.0/backend/app/crud/crm/contract.py"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_crud_crm_contract_get_contract_row_in_scope", "label": "_get_contract_row_in_scope()", "file_type": "code", "source_file": "app/crud/crm/contract.py", "source_location": "L57"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_crud_crm_contract_total_pages", "label": "total_pages()", "file_type": "code", "source_file": "app/crud/crm/contract.py", "source_location": "L74"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_crud_crm_contract_decimal_value", "label": "_decimal_value()", "file_type": "code", "source_file": "app/crud/crm/contract.py", "source_location": "L80"}, {"id": "any", "label": "Any", "file_type": "code", "source_file": "", "source_location": "", "origin_file": "/Users/wuzilong/work/00code/shanxia2.0/backend/app/crud/crm/contract.py"}, {"id": "decimal", "label": "Decimal", "file_type": "code", "source_file": "", "source_location": "", "origin_file": "/Users/wuzilong/work/00code/shanxia2.0/backend/app/crud/crm/contract.py"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_crud_crm_contract_parse_optional_date", "label": "_parse_optional_date()", "file_type": "code", "source_file": "app/crud/crm/contract.py", "source_location": "L88"}, {"id": "date", "label": "date", "file_type": "code", "source_file": "", "source_location": "", "origin_file": "/Users/wuzilong/work/00code/shanxia2.0/backend/app/crud/crm/contract.py"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_crud_crm_contract_parse_optional_datetime", "label": "_parse_optional_datetime()", "file_type": "code", "source_file": "app/crud/crm/contract.py", "source_location": "L106"}, {"id": "datetime", "label": "datetime", "file_type": "code", "source_file": "", "source_location": "", "origin_file": "/Users/wuzilong/work/00code/shanxia2.0/backend/app/crud/crm/contract.py"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_crud_crm_contract_get_field", "label": "_get_field()", "file_type": "code", "source_file": "app/crud/crm/contract.py", "source_location": "L122"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_crud_crm_contract_resolve_user_display_name", "label": "_resolve_user_display_name()", "file_type": "code", "source_file": "app/crud/crm/contract.py", "source_location": "L129"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_crud_crm_contract_is_blank", "label": "_is_blank()", "file_type": "code", "source_file": "app/crud/crm/contract.py", "source_location": "L139"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_crud_crm_contract_first_non_blank", "label": "_first_non_blank()", "file_type": "code", "source_file": "app/crud/crm/contract.py", "source_location": "L143"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_crud_crm_contract_get_default_invoice_info", "label": "_get_default_invoice_info()", "file_type": "code", "source_file": "app/crud/crm/contract.py", "source_location": "L151"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_crud_crm_contract_build_customer_address", "label": "_build_customer_address()", "file_type": "code", "source_file": "app/crud/crm/contract.py", "source_location": "L161"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_crud_crm_contract_row_to_dict", "label": "_row_to_dict()", "file_type": "code", "source_file": "app/crud/crm/contract.py", "source_location": "L173"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_crud_crm_contract_contract_row_to_dict", "label": "contract_row_to_dict()", "file_type": "code", "source_file": "app/crud/crm/contract.py", "source_location": "L252"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_crud_crm_contract_build_contract_filters", "label": "_build_contract_filters()", "file_type": "code", "source_file": "app/crud/crm/contract.py", "source_location": "L256"}, {"id": "query", "label": "Query", "file_type": "code", "source_file": "", "source_location": "", "origin_file": "/Users/wuzilong/work/00code/shanxia2.0/backend/app/crud/crm/contract.py"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_crud_crm_contract_list_contracts", "label": "list_contractsLine truncated
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"nodes": [{"id": "users_wuzilong_work_00code_shanxia2_0_backend_tests_test_id_card_age_py", "label": "test_id_card_age.py", "file_type": "code", "source_file": "tests/test_id_card_age.py", "source_location": "L1"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_tests_test_id_card_age_test_calc_age_from_18_digit_id", "label": "test_calc_age_from_18_digit_id()", "file_type": "code", "source_file": "tests/test_id_card_age.py", "source_location": "L6"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_tests_test_id_card_age_test_calc_age_rejects_invalid", "label": "test_calc_age_rejects_invalid()", "file_type": "code", "source_file": "tests/test_id_card_age.py", "source_location": "L14"}], "edges": [{"source": "users_wuzilong_work_00code_shanxia2_0_backend_tests_test_id_card_age_py", "target": "datetime", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "tests/test_id_card_age.py", "source_location": "L1", "weight": 1.0}, {"source": "users_wuzilong_work_00code_shanxia2_0_backend_tests_test_id_card_age_py", "target": "app_core_id_card", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "tests/test_id_card_age.py", "source_location": "L3", "weight": 1.0}, {"source": "users_wuzilong_work_00code_shanxia2_0_backend_tests_test_id_card_age_py", "target": "users_wuzilong_work_00code_shanxia2_0_backend_tests_test_id_card_age_test_calc_age_from_18_digit_id", "relation": "contains", "confidence": "EXTRACTED", "source_file": "tests/test_id_card_age.py", "source_location": "L6", "weight": 1.0}, {"source": "users_wuzilong_work_00code_shanxia2_0_backend_tests_test_id_card_age_py", "target": "users_wuzilong_work_00code_shanxia2_0_backend_tests_test_id_card_age_test_calc_age_rejects_invalid", "relation": "contains", "confidence": "EXTRACTED", "source_file": "tests/test_id_card_age.py", "source_location": "L14", "weight": 1.0}], "raw_calls": [{"caller_nid": "users_wuzilong_work_00code_shanxia2_0_backend_tests_test_id_card_age_test_calc_age_from_18_digit_id", "callee": "calc_age_from_chinese_id_card", "is_member_call": false, "source_file": "/Users/wuzilong/work/00code/shanxia2.0/backend/tests/test_id_card_age.py", "source_location": "L9", "receiver": null}, {"caller_nid": "users_wuzilong_work_00code_shanxia2_0_backend_tests_test_id_card_age_test_calc_age_from_18_digit_id", "callee": "date", "is_member_call": false, "source_file": "/Users/wuzilong/work/00code/shanxia2.0/backend/tests/test_id_card_age.py", "source_location": "L9", "receiver": null}, {"caller_nid": "users_wuzilong_work_00code_shanxia2_0_backend_tests_test_id_card_age_test_calc_age_from_18_digit_id", "callee": "calc_age_from_chinese_id_card", "is_member_call": false, "source_file": "/Users/wuzilong/work/00code/shanxia2.0/backend/tests/test_id_card_age.py", "source_location": "L10", "receiver": null}, {"caller_nid": "users_wuzilong_work_00code_shanxia2_0_backend_tests_test_id_card_age_test_calc_age_from_18_digit_id", "callee": "date", "is_member_call": false, "source_file": "/Users/wuzilong/work/00code/shanxia2.0/backend/tests/test_id_card_age.py", "source_location": "L10", "receiver": null}, {"caller_nid": "users_wuzilong_work_00code_shanxia2_0_backend_tests_test_id_card_age_test_calc_age_from_18_digit_id", "callee": "calc_age_from_chinese_id_card", "is_member_call": false, "source_file": "/Users/wuzilong/work/00code/shanxia2.0/backend/tests/test_id_card_age.py", "source_location": "L11", "receiver": null}, {"caller_nid": "users_wuzilong_work_00code_shanxia2_0_backend_tests_test_id_card_age_test_calc_age_from_18_digit_id", "callee": "date", "is_member_call": false, "source_file": "/Users/wuzilong/work/00code/shanxia2.0/backend/tests/test_id_card_age.py", "source_location": "L11", "receiver": null}, {"caller_nid": "users_wuzilong_work_00code_shanxia2_0_backend_tests_test_id_card_age_test_calc_age_rejects_invalid", "callee": "calc_age_from_chinese_id_card", "is_member_call": false, "source_file": "/Users/wuzilong/work/00code/shanxia2.0/backend/tests/test_id_card_age.py", "source_location": "L15", "receiver": null}, {"caller_nid": "users_wuzilong_work_00code_shanxia2_0_backend_tests_test_id_card_age_test_calc_age_rejects_invalid", "callee": "calc_age_from_chinese_id_card", "is_member_call": false, "source_file": "/Users/wuzilong/work/00code/shanxia2.0/backend/tests/test_id_card_age.py", "source_location": "L16", "receiver": null}, {"caller_nid": "users_wuzilong_work_00code_shanxia2_0_backend_tests_test_id_card_age_test_calc_age_rejects_invalid", "callee": "calc_age_from_chinese_id_card", "is_member_call": false, "source_file": "/Users/wuzilong/work/00code/shanxia2.0/backend/tests/test_id_card_age.py", "source_location": "L17", "receiver": null}, {"caller_nid": "users_wuzilong_work_00code_shanxia2_0_backend_tests_test_id_card_age_test_calc_age_rejects_invalid", "callee": "calc_age_from_chinese_id_card", "is_member_call": false, "source_file": "/Users/wuzilong/work/00code/shaLine truncated
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"nodes": [{"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_services_pl_personnel_service_py", "label": "pl_personnel_service.py", "file_type": "code", "source_file": "app/services/pl_personnel_service.py", "source_location": "L1"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_services_pl_personnel_service_upsert_personnel", "label": "upsert_personnel()", "file_type": "code", "source_file": "app/services/pl_personnel_service.py", "source_location": "L16"}, {"id": "session", "label": "Session", "file_type": "code", "source_file": "", "source_location": "", "origin_file": "/Users/wuzilong/work/00code/shanxia2.0/backend/app/services/pl_personnel_service.py"}, {"id": "vehiclepersonnelrow", "label": "VehiclePersonnelRow", "file_type": "code", "source_file": "", "source_location": "", "origin_file": "/Users/wuzilong/work/00code/shanxia2.0/backend/app/services/pl_personnel_service.py"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_services_pl_personnel_service_save_vehicle_personnel", "label": "save_vehicle_personnel()", "file_type": "code", "source_file": "app/services/pl_personnel_service.py", "source_location": "L92"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_services_pl_personnel_service_build_personnel_summary", "label": "build_personnel_summary()", "file_type": "code", "source_file": "app/services/pl_personnel_service.py", "source_location": "L142"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_services_pl_personnel_service_load_vehicle_personnel_rows", "label": "load_vehicle_personnel_rows()", "file_type": "code", "source_file": "app/services/pl_personnel_service.py", "source_location": "L159"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_services_pl_personnel_service_load_vehicle_personnel_summaries", "label": "load_vehicle_personnel_summaries()", "file_type": "code", "source_file": "app/services/pl_personnel_service.py", "source_location": "L192"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_services_pl_personnel_service_refresh_personnel_ages_from_id_card", "label": "refresh_personnel_ages_from_id_card()", "file_type": "code", "source_file": "app/services/pl_personnel_service.py", "source_location": "L226"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_services_pl_personnel_service_rationale_1", "label": "\u8fd0\u8f93\u8ba1\u5212 - \u4eba\u5458 upsert \u4e0e\u8f66\u8f86-\u4eba\u5458\u5173\u8054\u4fdd\u5b58", "file_type": "rationale", "source_file": "app/services/pl_personnel_service.py", "source_location": "L1"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_services_pl_personnel_service_rationale_25", "label": "\u6309 personnelId \u2192 phone \u2192 name \u5f31\u5339\u914d upsert\uff0c\u8fd4\u56de personnel_id\u3002", "file_type": "rationale", "source_file": "app/services/pl_personnel_service.py", "source_location": "L25"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_services_pl_personnel_service_rationale_145", "label": "links: [(personnel_name, role, is_default)] \u2192 (summary, default_driver_name).", "file_type": "rationale", "source_file": "app/services/pl_personnel_service.py", "source_location": "L145"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_services_pl_personnel_service_rationale_195", "label": "\u6279\u91cf\u52a0\u8f7d personnelSummary / defaultDriverName\u3002", "file_type": "rationale", "source_file": "app/services/pl_personnel_service.py", "source_location": "L195"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_services_pl_personnel_service_rationale_227", "label": "\u6309 18 \u4f4d\u8eab\u4efd\u8bc1\u53f7\u91cd\u7b97 pl_personnel.age\uff0c\u4ec5\u66f4\u65b0\u7b97\u51fa\u503c\u4e0e\u5e93\u4e2d\u4e0d\u4e00\u81f4\u7684\u8bb0\u5f55\u3002\u8fd4\u56de\u66f4\u65b0\u6761\u6570\u3002", "file_type": "rationale", "source_file": "app/services/pl_personnel_service.py", "source_location": "L227"}], "edges": [{"source": "users_wuzilong_work_00code_shanxia2_0_backend_app_services_pl_personnel_service_py", "target": "datetime", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "app/services/pl_personnel_service.py", "source_location": "L4", "weight": 1.0}, {"source": "users_wuzilong_work_00code_shanxia2_0_backend_app_services_pl_personnel_service_py", "target": "typing", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "app/services/pl_personnel_service.py", "source_location": "L5", "weight": 1.0}, {"source": "users_wuzilong_work_00code_shanxia2_0_backend_app_services_pl_personnel_service_py", "target": "fastapi", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "app/services/pl_personnel_service.py", "source_location": "L7", "weight": 1.0}, {"source": "users_wuzilong_work_00code_shanxia2_0_backend_app_services_pl_personnel_service_py", "target": "sqlalchemy_orm", "relation": "imports_from", "context": "import", "confideLine truncated
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"nodes": [{"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_tasks_pl_personnel_age_py", "label": "pl_personnel_age.py", "file_type": "code", "source_file": "app/tasks/pl_personnel_age.py", "source_location": "L1"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_tasks_pl_personnel_age_refresh_personnel_ages_job", "label": "refresh_personnel_ages_job()", "file_type": "code", "source_file": "app/tasks/pl_personnel_age.py", "source_location": "L10"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_tasks_pl_personnel_age_rationale_11", "label": "\u6bcf\u65e5\u51cc\u6668\u91cd\u7b97 pl_personnel \u5e74\u9f84\uff08\u6709\u5408\u6cd5 18 \u4f4d\u8eab\u4efd\u8bc1\u53f7\u7684\u8bb0\u5f55\uff09\u3002", "file_type": "rationale", "source_file": "app/tasks/pl_personnel_age.py", "source_location": "L11"}], "edges": [{"source": "users_wuzilong_work_00code_shanxia2_0_backend_app_tasks_pl_personnel_age_py", "target": "logging", "relation": "imports", "context": "import", "confidence": "EXTRACTED", "source_file": "app/tasks/pl_personnel_age.py", "source_location": "L2", "weight": 1.0}, {"source": "users_wuzilong_work_00code_shanxia2_0_backend_app_tasks_pl_personnel_age_py", "target": "app_core_database", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "app/tasks/pl_personnel_age.py", "source_location": "L4", "weight": 1.0}, {"source": "users_wuzilong_work_00code_shanxia2_0_backend_app_tasks_pl_personnel_age_py", "target": "app_services_pl_personnel_service", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "app/tasks/pl_personnel_age.py", "source_location": "L5", "weight": 1.0}, {"source": "users_wuzilong_work_00code_shanxia2_0_backend_app_tasks_pl_personnel_age_py", "target": "users_wuzilong_work_00code_shanxia2_0_backend_app_tasks_pl_personnel_age_refresh_personnel_ages_job", "relation": "contains", "confidence": "EXTRACTED", "source_file": "app/tasks/pl_personnel_age.py", "source_location": "L10", "weight": 1.0}, {"source": "users_wuzilong_work_00code_shanxia2_0_backend_app_tasks_pl_personnel_age_rationale_11", "target": "users_wuzilong_work_00code_shanxia2_0_backend_app_tasks_pl_personnel_age_refresh_personnel_ages_job", "relation": "rationale_for", "confidence": "EXTRACTED", "source_file": "app/tasks/pl_personnel_age.py", "source_location": "L11", "weight": 1.0}], "raw_calls": [{"caller_nid": "users_wuzilong_work_00code_shanxia2_0_backend_app_tasks_pl_personnel_age_refresh_personnel_ages_job", "callee": "SessionLocal", "is_member_call": false, "source_file": "/Users/wuzilong/work/00code/shanxia2.0/backend/app/tasks/pl_personnel_age.py", "source_location": "L12", "receiver": null}, {"caller_nid": "users_wuzilong_work_00code_shanxia2_0_backend_app_tasks_pl_personnel_age_refresh_personnel_ages_job", "callee": "info", "is_member_call": true, "source_file": "/Users/wuzilong/work/00code/shanxia2.0/backend/app/tasks/pl_personnel_age.py", "source_location": "L14", "receiver": "logger"}, {"caller_nid": "users_wuzilong_work_00code_shanxia2_0_backend_app_tasks_pl_personnel_age_refresh_personnel_ages_job", "callee": "refresh_personnel_ages_from_id_card", "is_member_call": false, "source_file": "/Users/wuzilong/work/00code/shanxia2.0/backend/app/tasks/pl_personnel_age.py", "source_location": "L15", "receiver": null}, {"caller_nid": "users_wuzilong_work_00code_shanxia2_0_backend_app_tasks_pl_personnel_age_refresh_personnel_ages_job", "callee": "commit", "is_member_call": true, "source_file": "/Users/wuzilong/work/00code/shanxia2.0/backend/app/tasks/pl_personnel_age.py", "source_location": "L16", "receiver": "db"}, {"caller_nid": "users_wuzilong_work_00code_shanxia2_0_backend_app_tasks_pl_personnel_age_refresh_personnel_ages_job", "callee": "info", "is_member_call": true, "source_file": "/Users/wuzilong/work/00code/shanxia2.0/backend/app/tasks/pl_personnel_age.py", "source_location": "L17", "receiver": "logger"}, {"caller_nid": "users_wuzilong_work_00code_shanxia2_0_backend_app_tasks_pl_personnel_age_refresh_personnel_ages_job", "callee": "rollback", "is_member_call": true, "source_file": "/Users/wuzilong/work/00code/shanxia2.0/backend/app/tasks/pl_personnel_age.py", "source_location": "L19", "receiver": "db"}, {"caller_nid": "users_wuzilong_work_00code_shanxia2_0_backend_app_tasks_pl_personnel_age_refresh_personnel_ages_job", "callee": "exception", "is_member_call": true, "source_file": "/Users/wuzilong/work/00code/shanxia2.0/backend/app/tasks/pl_personnel_age.py", "source_location": "L20", "receiver": "logger"}, {"caller_nid": "users_wuzilong_work_00code_shanxia2_0_backend_app_tasks_pl_personnel_age_refresh_personnel_ages_job", "callee": "close", "is_member_call": true, "source_file": "/Users/wuzilong/work/00code/shanxia2.0/backend/app/tasks/pl_personnel_age.py", "source_location": "L23", "receiver": "db"}], "callable_nids": ["users_wuzilong_work_00code_shanxia2_0_backend_app_tasks_pl_personnel_age_refresh_personnel_agesLine truncated
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"nodes": [{"id": "users_wuzilong_work_00code_shanxia2_0_backend_tests_test_bx_reimburse_import_py", "label": "test_bx_reimburse_import.py", "file_type": "code", "source_file": "tests/test_bx_reimburse_import.py", "source_location": "L1"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_tests_test_bx_reimburse_import_test_build_expense_path_labels_unique_and_enabled_only", "label": "test_build_expense_path_labels_unique_and_enabled_only()", "file_type": "code", "source_file": "tests/test_bx_reimburse_import.py", "source_location": "L20"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_tests_test_bx_reimburse_import_test_build_expense_path_labels_exclude_orphan_when_parent_missing", "label": "test_build_expense_path_labels_exclude_orphan_when_parent_missing()", "file_type": "code", "source_file": "tests/test_bx_reimburse_import.py", "source_location": "L34"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_tests_test_bx_reimburse_import_test_build_expense_path_labels_disambiguate_collision", "label": "test_build_expense_path_labels_disambiguate_collision()", "file_type": "code", "source_file": "tests/test_bx_reimburse_import.py", "source_location": "L45"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_tests_test_bx_reimburse_import_test_cell_str_normalizes_excel_float_ids", "label": "test_cell_str_normalizes_excel_float_ids()", "file_type": "code", "source_file": "tests/test_bx_reimburse_import.py", "source_location": "L55"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_tests_test_bx_reimburse_import_test_build_applicant_label", "label": "test_build_applicant_label()", "file_type": "code", "source_file": "tests/test_bx_reimburse_import.py", "source_location": "L62"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_tests_test_bx_reimburse_import_test_is_example_row", "label": "test_is_example_row()", "file_type": "code", "source_file": "tests/test_bx_reimburse_import.py", "source_location": "L67"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_tests_test_bx_reimburse_import_test_partition_empty_group_is_solo", "label": "test_partition_empty_group_is_solo()", "file_type": "code", "source_file": "tests/test_bx_reimburse_import.py", "source_location": "L72"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_tests_test_bx_reimburse_import_test_validate_group_headers_mismatch", "label": "test_validate_group_headers_mismatch()", "file_type": "code", "source_file": "tests/test_bx_reimburse_import.py", "source_location": "L86"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_tests_test_bx_reimburse_import_test_validate_group_headers_title_partial_empty", "label": "test_validate_group_headers_title_partial_empty()", "file_type": "code", "source_file": "tests/test_bx_reimburse_import.py", "source_location": "L95"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_tests_test_bx_reimburse_import_test_write_option_sheet_and_validation", "label": "test_write_option_sheet_and_validation()", "file_type": "code", "source_file": "tests/test_bx_reimburse_import.py", "source_location": "L104"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_tests_test_bx_reimburse_import_test_build_import_template_has_guide_examples_and_dv", "label": "test_build_import_template_has_guide_examples_and_dv()", "file_type": "code", "source_file": "tests/test_bx_reimburse_import.py", "source_location": "L122"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_tests_test_bx_reimburse_import_test_iter_data_rows_skips_examples", "label": "test_iter_data_rows_skips_examples()", "file_type": "code", "source_file": "tests/test_bx_reimburse_import.py", "source_location": "L142"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_tests_test_bx_reimburse_import_test_build_annotated_result_bytes_appends_status_columns", "label": "test_build_annotated_result_bytes_appends_status_columns()", "file_type": "code", "source_file": "tests/test_bx_reimburse_import.py", "source_location": "L159"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_tests_test_bx_reimburse_import_rationale_35", "label": "\u7236\u7ea7\u672a\u4f20\u5165\uff08\u7b49\u540c\u5df2\u5220\u9664\uff09\u65f6\uff0c\u5b50\u8282\u70b9\u4e0d\u5e94\u8fdb\u5165\u4e0b\u62c9\u2014\u2014\u4e0e Web \u6811\u4e00\u81f4\u3002", "file_type": "rationale", "source_file": "tests/test_bx_reimburse_import.py", "source_location": "L35"}], "edges": [{"source": "users_wuzilong_work_00code_shanxia2_0_backend_tests_test_bx_reimburse_import_py", "target": "datetime", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "tests/test_bx_reimburse_import.py", "source_location": "L2", "weight": 1.0}, {"source": "users_wuzilong_work_00code_shanxia2_0_backend_tests_test_bx_reimburse_import_py", "target": "io", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "tests/test_bx_reimburse_import.py", "source_location": "L3", "weight": 1.0}, {"source": "users_wuzilong_worLine truncated
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"nodes": [{"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_schemas_crm_contract_py", "label": "contract.py", "file_type": "code", "source_file": "app/schemas/crm/contract.py", "source_location": "L1"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_schemas_crm_contract_contractproductpricetieritem", "label": "ContractProductPriceTierItem", "file_type": "code", "source_file": "app/schemas/crm/contract.py", "source_location": "L8"}, {"id": "basemodel", "label": "BaseModel", "file_type": "code", "source_file": "", "source_location": ""}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_schemas_crm_contract_contractproductitem", "label": "ContractProductItem", "file_type": "code", "source_file": "app/schemas/crm/contract.py", "source_location": "L23"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_schemas_crm_contract_contractlistquery", "label": "ContractListQuery", "file_type": "code", "source_file": "app/schemas/crm/contract.py", "source_location": "L57"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_schemas_crm_contract_contractcreatebody", "label": "ContractCreateBody", "file_type": "code", "source_file": "app/schemas/crm/contract.py", "source_location": "L87"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_schemas_crm_contract_contractupdatebody", "label": "ContractUpdateBody", "file_type": "code", "source_file": "app/schemas/crm/contract.py", "source_location": "L151"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_schemas_crm_contract_contractsubmitbody", "label": "ContractSubmitBody", "file_type": "code", "source_file": "app/schemas/crm/contract.py", "source_location": "L155"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_schemas_crm_contract_contractbatchsubmitbody", "label": "ContractBatchSubmitBody", "file_type": "code", "source_file": "app/schemas/crm/contract.py", "source_location": "L161"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_schemas_crm_contract_contractwithdrawbody", "label": "ContractWithdrawBody", "file_type": "code", "source_file": "app/schemas/crm/contract.py", "source_location": "L167"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_schemas_crm_contract_contractstatusbody", "label": "ContractStatusBody", "file_type": "code", "source_file": "app/schemas/crm/contract.py", "source_location": "L172"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_schemas_crm_contract_contractinvalidbody", "label": "ContractInvalidBody", "file_type": "code", "source_file": "app/schemas/crm/contract.py", "source_location": "L177"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_schemas_crm_contract_contracttemplatesavebody", "label": "ContractTemplateSaveBody", "file_type": "code", "source_file": "app/schemas/crm/contract.py", "source_location": "L183"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_schemas_crm_contract_contractdeletebody", "label": "ContractDeleteBody", "file_type": "code", "source_file": "app/schemas/crm/contract.py", "source_location": "L189"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_schemas_crm_contract_contractapprovalactionbody", "label": "ContractApprovalActionBody", "file_type": "code", "source_file": "app/schemas/crm/contract.py", "source_location": "L193"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_schemas_crm_contract_contractuploadfilebody", "label": "ContractUploadFileBody", "file_type": "code", "source_file": "app/schemas/crm/contract.py", "source_location": "L205"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_schemas_crm_contract_contractuploadattachmentsbody", "label": "ContractUploadAttachmentsBody", "file_type": "code", "source_file": "app/schemas/crm/contract.py", "source_location": "L210"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_schemas_crm_contract_contractexportbody", "label": "ContractExportBody", "file_type": "code", "source_file": "app/schemas/crm/contract.py", "source_location": "L218"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_schemas_crm_contract_contractstatisticsoverviewquery", "label": "ContractStatisticsOverviewQuery", "file_type": "code", "source_file": "app/schemas/crm/contract.py", "source_location": "L223"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_schemas_crm_contract_contractstatisticstrendquery", "label": "ContractStatisticsTrendQuery", "file_type": "code", "source_file": "app/schemas/crm/contract.py", "source_location": "L229"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_schemas_crm_contract_contractrenewbody", "label": "ContractRenewBody", "file_type": "code", "source_file": "app/schemas/crm/contract.py", "source_location": "L235"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_schemas_crm_contract_contractapprovalpassbody", "label": "ContractApprovalPassBody", "file_type": "code", "source_file": "app/schemas/crm/contract.py", "source_location": "L239"}, {"id": "users_wuLine truncated
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"nodes": [{"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_crud_crm_contract_product_py", "label": "contract_product.py", "file_type": "code", "source_file": "app/crud/crm/contract_product.py", "source_location": "L1"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_crud_crm_contract_product_row_to_dict", "label": "_row_to_dict()", "file_type": "code", "source_file": "app/crud/crm/contract_product.py", "source_location": "L21"}, {"id": "crmcontractproduct", "label": "CrmContractProduct", "file_type": "code", "source_file": "", "source_location": "", "origin_file": "/Users/wuzilong/work/00code/shanxia2.0/backend/app/crud/crm/contract_product.py"}, {"id": "any", "label": "Any", "file_type": "code", "source_file": "", "source_location": "", "origin_file": "/Users/wuzilong/work/00code/shanxia2.0/backend/app/crud/crm/contract_product.py"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_crud_crm_contract_product_tier_row_to_dict", "label": "_tier_row_to_dict()", "file_type": "code", "source_file": "app/crud/crm/contract_product.py", "source_location": "L56"}, {"id": "crmcontractproductpricetier", "label": "CrmContractProductPriceTier", "file_type": "code", "source_file": "", "source_location": "", "origin_file": "/Users/wuzilong/work/00code/shanxia2.0/backend/app/crud/crm/contract_product.py"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_crud_crm_contract_product_list_contract_products", "label": "list_contract_products()", "file_type": "code", "source_file": "app/crud/crm/contract_product.py", "source_location": "L80"}, {"id": "session", "label": "Session", "file_type": "code", "source_file": "", "source_location": "", "origin_file": "/Users/wuzilong/work/00code/shanxia2.0/backend/app/crud/crm/contract_product.py"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_crud_crm_contract_product_list_products_by_contract_ids", "label": "list_products_by_contract_ids()", "file_type": "code", "source_file": "app/crud/crm/contract_product.py", "source_location": "L124"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_crud_crm_contract_product_decimal_value", "label": "_decimal_value()", "file_type": "code", "source_file": "app/crud/crm/contract_product.py", "source_location": "L154"}, {"id": "decimal", "label": "Decimal", "file_type": "code", "source_file": "", "source_location": "", "origin_file": "/Users/wuzilong/work/00code/shanxia2.0/backend/app/crud/crm/contract_product.py"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_crud_crm_contract_product_get_field", "label": "_get_field()", "file_type": "code", "source_file": "app/crud/crm/contract_product.py", "source_location": "L162"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_crud_crm_contract_product_parse_optional_date", "label": "_parse_optional_date()", "file_type": "code", "source_file": "app/crud/crm/contract_product.py", "source_location": "L169"}, {"id": "date", "label": "date", "file_type": "code", "source_file": "", "source_location": "", "origin_file": "/Users/wuzilong/work/00code/shanxia2.0/backend/app/crud/crm/contract_product.py"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_crud_crm_contract_product_calculate_subtotal", "label": "calculate_subtotal()", "file_type": "code", "source_file": "app/crud/crm/contract_product.py", "source_location": "L187"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_crud_crm_contract_product_letter_oss_ids_to_json", "label": "_letter_oss_ids_to_json()", "file_type": "code", "source_file": "app/crud/crm/contract_product.py", "source_location": "L196"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_crud_crm_contract_product_insert_contract_product", "label": "insert_contract_product()", "file_type": "code", "source_file": "app/crud/crm/contract_product.py", "source_location": "L206"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_crud_crm_contract_product_batch_insert_contract_products", "label": "batch_insert_contract_products()", "file_type": "code", "source_file": "app/crud/crm/contract_product.py", "source_location": "L296"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_crud_crm_contract_product_delete_price_tiers_by_contract_id", "label": "delete_price_tiers_by_contract_id()", "file_type": "code", "source_file": "app/crud/crm/contract_product.py", "source_location": "L344"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_crud_crm_contract_product_delete_products_by_contract_id", "label": "delete_products_by_contract_id()", "file_type": "code", "source_file": "app/crud/crm/contract_product.py", "source_location": "L361"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_crud_crm_contract_product_save_price_tiers_for_product", "label": "save_price_tiers_for_product()", "file_type": "code", "source_file": "app/crud/crm/contract_product.py", "source_location": "L377"}, {"id": "users_wuzilong_work_00code_shanxia2_0_backend_app_crud_crm_contract_product_Line truncated
|
||||
+1
-1
@@ -1 +1 @@
|
||||
{"/Users/zlwu/work/00code/shanxia2.0/backend/start-prod.sh":{"size":7357,"mtime_ns":1782639355476060453,"hash":"ca89869446be74a2bf2367b3b28f448580220859a39a84ad9613ac5fe35a8433"},"/Users/zlwu/work/00code/shanxia2.0/backend/start.sh":{"size":9548,"mtime_ns":1780114661446983244,"hash":"4d632863e8a0cd81194b491d83a0218a4157435ae812dec76a6f6197b4d48e57"},"/Users/zlwu/work/00code/shanxia2.0/backend/app/__init__.py":{"size":21,"mtime_ns":1780113982281973984,"hash":"60a04ff08fd97084e83ea809fd13feda6d2848be20ebf309e31fc1dad7523230"},"/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py":{"size":6280,"mtime_ns":1782790852770448643,"hash":"8f9da799977bee7134d87a26ff8434ac5ef8eabb0b7368dd537eee49ad7fd00b"},"/Users/zlwu/work/00code/shanxia2.0/backend/app/tasks/__init__.py":{"size":2207,"mtime_ns":1783208067881286091,"hash":"313e6da0e91d743ce891dd283458c79b50b24c4d909dc96ca7b3fd9d2bfa5013"},"/Users/zlwu/work/00code/shanxia2.0/backend/app/core/auth.py":{"size":7457,"mtime_ns":1782790841500516545,"hash":"34bac56e1c2cb6215f4b5fa2dc32d77d4b4abca51428819eebf4afd269cc51cf"},"/Users/zlwu/work/00code/shanxia2.0/backend/app/core/api_crypto.py":{"size":1870,"mtime_ns":1780108930724444498,"hash":"c04b748aea86890a5971f749523c7b17dbad1ddd6f9f7f07a5679d159c984e33"},"/Users/zlwu/work/00code/shanxia2.0/backend/app/core/login_crypto.py":{"size":3858,"mtime_ns":1780108930725155710,"hash":"b82d51afabf2293a9cb1fb2e5f994c383948e7f47ea95fe674686b4f3f3342b1"},"/Users/zlwu/work/00code/shanxia2.0/backend/app/core/config.py":{"size":6958,"mtime_ns":1784032424448146538,"hash":"c2fb44aedb880733de28afa7f92d2c1c681eb600f821bbeba2bcda3933e5bc37"},"/Users/zlwu/work/00code/shanxia2.0/backend/app/core/wechat_pay.py":{"size":23585,"mtime_ns":1780108930725768130,"hash":"3d52265ce65d21e7103f94afa1e8547aee0823b5ea6d65c50317436ac81fb4fc"},"/Users/zlwu/work/00code/shanxia2.0/backend/app/core/api_request_log_middleware.py":{"size":11971,"mtime_ns":1782701669198208175,"hash":"0b84c32828939e6102bb3647691fa8f04b1f68e0e0e9f28127374cc44e19a11c"},"/Users/zlwu/work/00code/shanxia2.0/backend/app/core/database.py":{"size":1510,"mtime_ns":1782790847265601586,"hash":"8bc9c8ae62e2be2c6920036582ba448dfcd1711c41cebb62274ff6bc6ee14b0b"},"/Users/zlwu/work/00code/shanxia2.0/backend/app/core/security.py":{"size":728,"mtime_ns":1780108930725470004,"hash":"df0f01115064f7b8de1c81dbe9a6db39360c236610b68c33b3234a51d7f0025b"},"/Users/zlwu/work/00code/shanxia2.0/backend/app/core/request_payload.py":{"size":2842,"mtime_ns":1780108930725350836,"hash":"e9937151530ab1417ef297aef59111977725cf90be2a8fa76c00a0618789aba0"},"/Users/zlwu/work/00code/shanxia2.0/backend/app/core/__init__.py":{"size":61,"mtime_ns":1780108930724312414,"hash":"3dd1842ee59b0c804176b03b4b8a323bd4a252b7feb1bbc32db64f3a8928570e"},"/Users/zlwu/work/00code/shanxia2.0/backend/app/core/response.py":{"size":1824,"mtime_ns":1780108930725412462,"hash":"f1739352d65ea8287d76e282a59553aa8d63c97e35764c64ac378aa5bd9c347e"},"/Users/zlwu/work/00code/shanxia2.0/backend/app/core/menu_guard.py":{"size":1611,"mtime_ns":1780108930725223002,"hash":"3e26077288c3620a4780038b891a326206b45bffe00aca545bdae30172487235"},"/Users/zlwu/work/00code/shanxia2.0/backend/app/core/db_collation.py":{"size":548,"mtime_ns":1780108930725025043,"hash":"0c680e25a18244ca839a7de6ed1f4313b33bc8da118d89c463aee1b6af00c6f9"},"/Users/zlwu/work/00code/shanxia2.0/backend/app/core/context.py":{"size":421,"mtime_ns":1780108930724824458,"hash":"83a10aee67162374993c10a30bf8bb8bd9c4b35cf48f42c832415ccebd91660f"},"/Users/zlwu/work/00code/shanxia2.0/backend/app/core/utils.py":{"size":1498,"mtime_ns":1780108930725607296,"hash":"09323693661c1d4560458b86a954128ccff82bbaf6522da0b44f24da99ddf9ea"},"/Users/zlwu/work/00code/shanxia2.0/backend/app/core/storage.py":{"size":14141,"mtime_ns":1782855136810943216,"hash":"3ae2c413c10898a8adb3d6773870bafbfbc18c739c10e0e8b4f765b4b5ca6c08"},"/Users/zlwu/work/00code/shanxia2.0/backend/app/core/order_status_compat.py":{"size":2828,"mtime_ns":1780108930725284669,"hash":"5349e5a0745ee6734c4a995337779307adefc46f453906171988a77de2081540"},"/Users/zlwu/work/00code/shanxia2.0/backend/app/core/exceptions.py":{"size":4946,"mtime_ns":1780108930725084335,"hash":"79c997d964bca1a4f12f2b92fb1f181fdb9e2b3cf72eae39f4cc164d23794fd7"},"/Users/zlwu/work/00code/shanxia2.0/backend/app/core/data_scope.py":{"size":8043,"mtime_ns":1782648925694296304,"hash":"626dff86937e5cacec634ecbc61cd53d3763d760223a1d4ec7cd11f64e59a220"},"/Users/zlwu/work/00code/shanxia2.0/backend/app/core/admin_request_json.py":{"size":2669,"mtime_ns":1780108930724378914,"hash":"4f68b3cf84291e7bddad6ecf4bb4d29ca5e1ec246a9f7f9c4cf5909d0ec1174a"},"/Users/zlwu/work/00code/shanxia2.0/backend/app/core/api_crypto_middleware.py":{"size":10876,"mtime_ns":1782790001926627098,"hash":"b39f128b6612589ea6ac5babd30752e9585b3af07b82bb1ad53c9e3c0d90816f"},"/Users/zlwu/work/00code/shanxia2.0/backend/app/core/wechat_message.py":{"size":11194,"mtime_ns":1780108930725684255,"hash":"5086070deb14d99d1a69e419b2299ec4Line truncated
|
||||
{"/Users/zlwu/work/00code/shanxia2.0/backend/start-prod.sh":{"size":7357,"mtime_ns":1782639355476060453,"hash":"ca89869446be74a2bf2367b3b28f448580220859a39a84ad9613ac5fe35a8433"},"/Users/zlwu/work/00code/shanxia2.0/backend/start.sh":{"size":9548,"mtime_ns":1780114661446983244,"hash":"4d632863e8a0cd81194b491d83a0218a4157435ae812dec76a6f6197b4d48e57"},"/Users/zlwu/work/00code/shanxia2.0/backend/app/__init__.py":{"size":21,"mtime_ns":1780113982281973984,"hash":"60a04ff08fd97084e83ea809fd13feda6d2848be20ebf309e31fc1dad7523230"},"/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py":{"size":6280,"mtime_ns":1782790852770448643,"hash":"8f9da799977bee7134d87a26ff8434ac5ef8eabb0b7368dd537eee49ad7fd00b"},"/Users/zlwu/work/00code/shanxia2.0/backend/app/tasks/__init__.py":{"size":2207,"mtime_ns":1783208067881286091,"hash":"313e6da0e91d743ce891dd283458c79b50b24c4d909dc96ca7b3fd9d2bfa5013"},"/Users/zlwu/work/00code/shanxia2.0/backend/app/core/auth.py":{"size":7457,"mtime_ns":1782790841500516545,"hash":"34bac56e1c2cb6215f4b5fa2dc32d77d4b4abca51428819eebf4afd269cc51cf"},"/Users/zlwu/work/00code/shanxia2.0/backend/app/core/api_crypto.py":{"size":1870,"mtime_ns":1780108930724444498,"hash":"c04b748aea86890a5971f749523c7b17dbad1ddd6f9f7f07a5679d159c984e33"},"/Users/zlwu/work/00code/shanxia2.0/backend/app/core/login_crypto.py":{"size":3858,"mtime_ns":1780108930725155710,"hash":"b82d51afabf2293a9cb1fb2e5f994c383948e7f47ea95fe674686b4f3f3342b1"},"/Users/zlwu/work/00code/shanxia2.0/backend/app/core/config.py":{"size":6958,"mtime_ns":1784032424448146538,"hash":"c2fb44aedb880733de28afa7f92d2c1c681eb600f821bbeba2bcda3933e5bc37"},"/Users/zlwu/work/00code/shanxia2.0/backend/app/core/wechat_pay.py":{"size":23585,"mtime_ns":1780108930725768130,"hash":"3d52265ce65d21e7103f94afa1e8547aee0823b5ea6d65c50317436ac81fb4fc"},"/Users/zlwu/work/00code/shanxia2.0/backend/app/core/api_request_log_middleware.py":{"size":11971,"mtime_ns":1782701669198208175,"hash":"0b84c32828939e6102bb3647691fa8f04b1f68e0e0e9f28127374cc44e19a11c"},"/Users/zlwu/work/00code/shanxia2.0/backend/app/core/database.py":{"size":1510,"mtime_ns":1782790847265601586,"hash":"8bc9c8ae62e2be2c6920036582ba448dfcd1711c41cebb62274ff6bc6ee14b0b"},"/Users/zlwu/work/00code/shanxia2.0/backend/app/core/security.py":{"size":728,"mtime_ns":1780108930725470004,"hash":"df0f01115064f7b8de1c81dbe9a6db39360c236610b68c33b3234a51d7f0025b"},"/Users/zlwu/work/00code/shanxia2.0/backend/app/core/request_payload.py":{"size":2842,"mtime_ns":1780108930725350836,"hash":"e9937151530ab1417ef297aef59111977725cf90be2a8fa76c00a0618789aba0"},"/Users/zlwu/work/00code/shanxia2.0/backend/app/core/__init__.py":{"size":61,"mtime_ns":1780108930724312414,"hash":"3dd1842ee59b0c804176b03b4b8a323bd4a252b7feb1bbc32db64f3a8928570e"},"/Users/zlwu/work/00code/shanxia2.0/backend/app/core/response.py":{"size":1824,"mtime_ns":1780108930725412462,"hash":"f1739352d65ea8287d76e282a59553aa8d63c97e35764c64ac378aa5bd9c347e"},"/Users/zlwu/work/00code/shanxia2.0/backend/app/core/menu_guard.py":{"size":1611,"mtime_ns":1780108930725223002,"hash":"3e26077288c3620a4780038b891a326206b45bffe00aca545bdae30172487235"},"/Users/zlwu/work/00code/shanxia2.0/backend/app/core/db_collation.py":{"size":548,"mtime_ns":1780108930725025043,"hash":"0c680e25a18244ca839a7de6ed1f4313b33bc8da118d89c463aee1b6af00c6f9"},"/Users/zlwu/work/00code/shanxia2.0/backend/app/core/context.py":{"size":421,"mtime_ns":1780108930724824458,"hash":"83a10aee67162374993c10a30bf8bb8bd9c4b35cf48f42c832415ccebd91660f"},"/Users/zlwu/work/00code/shanxia2.0/backend/app/core/utils.py":{"size":1498,"mtime_ns":1780108930725607296,"hash":"09323693661c1d4560458b86a954128ccff82bbaf6522da0b44f24da99ddf9ea"},"/Users/zlwu/work/00code/shanxia2.0/backend/app/core/storage.py":{"size":14141,"mtime_ns":1782855136810943216,"hash":"3ae2c413c10898a8adb3d6773870bafbfbc18c739c10e0e8b4f765b4b5ca6c08"},"/Users/zlwu/work/00code/shanxia2.0/backend/app/core/order_status_compat.py":{"size":2828,"mtime_ns":1780108930725284669,"hash":"5349e5a0745ee6734c4a995337779307adefc46f453906171988a77de2081540"},"/Users/zlwu/work/00code/shanxia2.0/backend/app/core/exceptions.py":{"size":4946,"mtime_ns":1780108930725084335,"hash":"79c997d964bca1a4f12f2b92fb1f181fdb9e2b3cf72eae39f4cc164d23794fd7"},"/Users/zlwu/work/00code/shanxia2.0/backend/app/core/data_scope.py":{"size":8043,"mtime_ns":1782648925694296304,"hash":"626dff86937e5cacec634ecbc61cd53d3763d760223a1d4ec7cd11f64e59a220"},"/Users/zlwu/work/00code/shanxia2.0/backend/app/core/admin_request_json.py":{"size":2669,"mtime_ns":1780108930724378914,"hash":"4f68b3cf84291e7bddad6ecf4bb4d29ca5e1ec246a9f7f9c4cf5909d0ec1174a"},"/Users/zlwu/work/00code/shanxia2.0/backend/app/core/api_crypto_middleware.py":{"size":10876,"mtime_ns":1782790001926627098,"hash":"b39f128b6612589ea6ac5babd30752e9585b3af07b82bb1ad53c9e3c0d90816f"},"/Users/zlwu/work/00code/shanxia2.0/backend/app/core/wechat_message.py":{"size":11194,"mtime_ns":1780108930725684255,"hash":"5086070deb14d99d1a69e419b2299ec4Line truncated
|
||||
@@ -2,7 +2,7 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>graphify - backend/graphify-out/graph.html</title>
|
||||
<title>graphify - /Users/wuzilong/work/00code/shanxia2.0/backend/graphify-out/graph.html</title>
|
||||
<script src="https://unpkg.com/vis-network@9.1.6/standalone/umd/vis-network.min.js"
|
||||
integrity="sha384-Ux6phic9PEHJ38YtrijhkzyJ8yQlH8i/+buBR8s3mAZOJrP1gwyvAcIYl3GWtpX1"
|
||||
crossorigin="anonymous"></script>
|
||||
@@ -63,12 +63,12 @@
|
||||
</div>
|
||||
<div id="legend"></div>
|
||||
</div>
|
||||
<div id="stats">4491 nodes · 16684 edges · 173 communities</div>
|
||||
<div id="stats">4516 nodes · 16740 edges · 172 communities</div>
|
||||
</div>
|
||||
<script>
|
||||
const RAW_NODES = [{"id": "app_init", "label": "__init__.py", "color": {"background": "#59A14F", "border": "#59A14F", "highlight": {"background": "#ffffff", "border": "#59A14F"}}, "size": 10.0, "font": {"size": 0, "color": "#ffffff"}, "title": "__init__.py", "community": 304, "community_name": "__init__.py", "source_file": "app/__init__.py", "file_type": "code", "degree": 0}, {"id": "app_api_init", "label": "__init__.py", "color": {"background": "#4E79A7", "border": "#4E79A7", "highlight": {"background": "#ffffff", "border": "#4E79A7"}}, "size": 10.6, "font": {"size": 0, "color": "#ffffff"}, "title": "__init__.py", "community": 160, "community_name": "register_local_callback", "source_file": "app/api/__init__.py", "file_type": "code", "degree": 10}, {"id": "app_api_init_rationale_1", "label": "API \u8def\u7531\u5305 \u2014 \u5c71\u5ce1\u5316\u5de5\u751f\u4ea7\u4e00\u4f53\u5316\u95e8\u6237", "color": {"background": "#4E79A7", "border": "#4E79A7", "highlight": {"background": "#ffffff", "border": "#4E79A7"}}, "size": 10.1, "font": {"size": 0, "color": "#ffffff"}, "title": "API \u8def\u7531\u5305 \u2014 \u5c71\u5ce1\u5316\u5de5\u751f\u4ea7\u4e00\u4f53\u5316\u95e8\u6237", "community": 160, "community_name": "register_local_callback", "source_file": "app/api/__init__.py", "file_type": "rationale", "degree": 1}, {"id": "app_api_admin", "label": "admin.py", "color": {"background": "#76B7B2", "border": "#76B7B2", "highlight": {"background": "#ffffff", "border": "#76B7B2"}}, "size": 17.7, "font": {"size": 12, "color": "#ffffff"}, "title": "admin.py", "community": 3, "community_name": "Community 3", "source_file": "app/api/admin.py", "file_type": "code", "degree": 119}, {"id": "app_api_admin_list_roles_for_select", "label": "list_roles_for_select()", "color": {"background": "#76B7B2", "border": "#76B7B2", "highlight": {"background": "#ffffff", "border": "#76B7B2"}}, "size": 10.3, "font": {"size": 0, "color": "#ffffff"}, "title": "list_roles_for_select()", "community": 3, "community_name": "Community 3", "source_file": "app/api/admin.py", "file_type": "code", "degree": 5}, {"id": "app_api_admin_py_session", "label": "Session", "color": {"background": "#76B7B2", "border": "#76B7B2", "highlight": {"background": "#ffffff", "border": "#76B7B2"}}, "size": 13.7, "font": {"size": 0, "color": "#ffffff"}, "title": "Session", "community": 3, "community_name": "Community 3", "source_file": "", "file_type": "code", "degree": 57}, {"id": "app_api_admin_list_users_for_select", "label": "list_users_for_select()", "color": {"background": "#76B7B2", "border": "#76B7B2", "highlight": {"background": "#ffffff", "border": "#76B7B2"}}, "size": 10.3, "font": {"size": 0, "color": "#ffffff"}, "title": "list_users_for_select()", "community": 3, "community_name": "Community 3", "source_file": "app/api/admin.py", "file_type": "code", "degree": 5}, {"id": "app_api_admin_list_roles_for_designer", "label": "list_roles_for_designer()", "color": {"background": "#76B7B2", "border": "#76B7B2", "highlight": {"background": "#ffffff", "border": "#76B7B2"}}, "size": 10.3, "font": {"size": 0, "color": "#ffffff"}, "title": "list_roles_for_designer()", "community": 3, "community_name": "Community 3", "source_file": "app/api/admin.py", "file_type": "code", "degree": 5}, {"id": "app_api_admin_tenantcreatebody", "label": "TenantCreateBody", "color": {"background": "#76B7B2", "border": "#76B7B2", "highlight": {"background": "#ffffff", "border": "#76B7B2"}}, "size": 10.6, "font": {"size": 0, "color": "#ffffff"}, "title": "TenantCreateBody", "community": 3, "community_name": "Community 3", "source_file": "app/api/admin.py", "file_type": "code", "degree": 10}, {"id": "app_api_admin_tenantupdatebody", "label": "TenantUpdateBody", "color": {"background": "#76B7B2", "border": "#76B7B2", "highlight": {"background": "#ffffff", "border": "#76B7B2"}}, "size": 10.6, "font": {"size": 0, "color": "#ffffff"}, "title": "TenantUpdateBody", "community": 3, "community_name": "Community 3", "source_file": "app/api/admin.py", "file_type": "code", "degree": 10}, {"id": "app_api_admin_list_tenants", "label": "list_tenants()", "color": {"background": "#76B7B2", "border": "#76B7B2", "highlight": {"background": "#ffffff", "border": "#76B7B2"}}, "size": 10.2, "font": {"size": 0, "color": "#ffffff"}, "title": "list_tenants()", "community": 3, "community_name": "Community 3", "source_file": "app/api/admin.py", "file_type": "code", "degree": 3}, {"id": "app_api_admin_create_tenant", "label": "create_tenant()", "color": {"background": "#76B7B2", "border": "#76B7B2", "highlight": {"background": "#ffffff", "border": "#76B7B2"}}, "size": 10.3, "font": {"size": 0, "color": "#ffffff"}, "title": "create_tenant()", "community": 3, "community_name": "Community 3", "source_file": "app/api/admin.py", "file_type": "code", "degree": 5}, {"id": "app_api_admin_update_tenant", "label": "update_tenant()", "color": {"background": "#76B7B2", "border": "#76B7B2", "highlight": {"background": "#ffffff", "border":Line truncated
|
||||
const RAW_EDGES = [{"from": "app_api_init", "to": "app_api_admin", "label": "re_exports", "title": "re_exports [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "app_api_init", "to": "app_api_bx_init", "label": "re_exports", "title": "re_exports [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "app_api_init", "to": "app_api_crm", "label": "re_exports", "title": "re_exports [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "app_api_init", "to": "app_api_db_init", "label": "re_exports", "title": "re_exports [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "app_api_init", "to": "app_api_leave", "label": "re_exports", "title": "re_exports [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "app_api_init", "to": "app_api_menu", "label": "re_exports", "title": "re_exports [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "app_api_init", "to": "app_api_monitor", "label": "re_exports", "title": "re_exports [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "app_api_init", "to": "app_api_public", "label": "re_exports", "title": "re_exports [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "app_api_init", "to": "app_api_workflow", "label": "re_exports", "title": "re_exports [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "app_api_init_rationale_1", "to": "app_api_init", "label": "rationale_for", "title": "rationale_for [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "app_api_admin", "to": "app_api_admin_attachment_download_url", "label": "contains", "title": "contains [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "app_api_admin", "to": "app_api_admin_attachment_preview_url", "label": "contains", "title": "contains [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "app_api_admin", "to": "app_api_admin_attachmentdownloadurlbody", "label": "contains", "title": "contains [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "app_api_admin", "to": "app_api_admin_create_dept", "label": "contains", "title": "contains [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "app_api_admin", "to": "app_api_admin_create_dict_data", "label": "contains", "title": "contains [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "app_api_admin", "to": "app_api_admin_create_dict_type", "label": "contains", "title": "contains [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "app_api_admin", "to": "app_api_admin_create_menu", "label": "contains", "title": "contains [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "app_api_admin", "to": "app_api_admin_create_menu_favorite", "label": "contains", "title": "contains [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "app_api_admin", "to": "app_api_admin_create_post", "label": "contains", "title": "contains [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "app_api_admin", "to": "app_api_admin_create_role_management", "label": "contains", "title": "contains [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "app_api_admin", "to": "app_api_admin_create_site", "label": "contains", "title": "contains [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "app_api_admin", "to": "app_api_admin_create_tenant", "label": "contains", "title": "contains [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "app_api_admin", "to": "app_api_admin_create_user", "label": "contains", "title": "contains [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "app_api_admin", "to": "app_api_admin_delete_dept", "label": "contains", "title": "contains [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "app_api_admin", "to": "app_api_admin_delete_dict_data", "label": "contains", "title": "contains [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"Line truncated
|
||||
const LEGEND = [{"cid": 0, "color": "#4E79A7", "label": "Community 0", "count": 38}, {"cid": 1, "color": "#F28E2B", "label": "Community 1", "count": 68}, {"cid": 2, "color": "#E15759", "label": "Community 2", "count": 32}, {"cid": 3, "color": "#76B7B2", "label": "Community 3", "count": 98}, {"cid": 4, "color": "#59A14F", "label": "Community 4", "count": 79}, {"cid": 5, "color": "#EDC948", "label": "Community 5", "count": 69}, {"cid": 6, "color": "#B07AA1", "label": "Community 6", "count": 46}, {"cid": 7, "color": "#FF9DA7", "label": "Community 7", "count": 215}, {"cid": 8, "color": "#9C755F", "label": "Community 8", "count": 68}, {"cid": 9, "color": "#BAB0AC", "label": "Community 9", "count": 62}, {"cid": 10, "color": "#4E79A7", "label": "Community 10", "count": 40}, {"cid": 11, "color": "#F28E2B", "label": "Community 11", "count": 61}, {"cid": 12, "color": "#E15759", "label": "Community 12", "count": 85}, {"cid": 13, "color": "#76B7B2", "label": "Community 13", "count": 50}, {"cid": 14, "color": "#59A14F", "label": "Community 14", "count": 14}, {"cid": 15, "color": "#EDC948", "label": "Community 15", "count": 53}, {"cid": 16, "color": "#B07AA1", "label": "Community 16", "count": 45}, {"cid": 17, "color": "#FF9DA7", "label": "Community 17", "count": 40}, {"cid": 18, "color": "#9C755F", "label": "Community 18", "count": 34}, {"cid": 19, "color": "#BAB0AC", "label": "Community 19", "count": 24}, {"cid": 20, "color": "#4E79A7", "label": "Community 20", "count": 22}, {"cid": 21, "color": "#F28E2B", "label": "Community 21", "count": 82}, {"cid": 22, "color": "#E15759", "label": "Community 22", "count": 43}, {"cid": 23, "color": "#76B7B2", "label": "Community 23", "count": 24}, {"cid": 24, "color": "#59A14F", "label": "Community 24", "count": 33}, {"cid": 25, "color": "#EDC948", "label": "Community 25", "count": 31}, {"cid": 26, "color": "#B07AA1", "label": "Community 26", "count": 33}, {"cid": 27, "color": "#FF9DA7", "label": "Community 27", "count": 37}, {"cid": 28, "color": "#9C755F", "label": "Community 28", "count": 61}, {"cid": 29, "color": "#BAB0AC", "label": "Community 29", "count": 96}, {"cid": 30, "color": "#4E79A7", "label": "Community 30", "count": 27}, {"cid": 31, "color": "#F28E2B", "label": "Community 31", "count": 19}, {"cid": 32, "color": "#E15759", "label": "Community 32", "count": 19}, {"cid": 33, "color": "#76B7B2", "label": "Community 33", "count": 18}, {"cid": 34, "color": "#59A14F", "label": "Community 34", "count": 26}, {"cid": 35, "color": "#EDC948", "label": "Community 35", "count": 38}, {"cid": 36, "color": "#B07AA1", "label": "Community 36", "count": 33}, {"cid": 37, "color": "#FF9DA7", "label": "Community 37", "count": 26}, {"cid": 38, "color": "#9C755F", "label": "Community 38", "count": 24}, {"cid": 39, "color": "#BAB0AC", "label": "Community 39", "count": 44}, {"cid": 40, "color": "#4E79A7", "label": "Community 40", "count": 18}, {"cid": 41, "color": "#F28E2B", "label": "Community 41", "count": 16}, {"cid": 42, "color": "#E15759", "label": "Community 42", "count": 34}, {"cid": 43, "color": "#76B7B2", "label": "Community 43", "count": 51}, {"cid": 44, "color": "#59A14F", "label": "Community 44", "count": 33}, {"cid": 45, "color": "#EDC948", "label": "Community 45", "count": 82}, {"cid": 46, "color": "#B07AA1", "label": "Community 46", "count": 29}, {"cid": 47, "color": "#FF9DA7", "label": "Community 47", "count": 12}, {"cid": 48, "color": "#9C755F", "label": "Community 48", "count": 9}, {"cid": 49, "color": "#BAB0AC", "label": "Community 49", "count": 11}, {"cid": 50, "color": "#4E79A7", "label": "Community 50", "count": 9}, {"cid": 51, "color": "#F28E2B", "label": "Community 51", "count": 21}, {"cid": 52, "color": "#E15759", "label": "Community 52", "count": 31}, {"cid": 53, "color": "#76B7B2", "label": "Community 53", "count": 26}, {"cid": 54, "color": "#59A14F", "label": "Community 54", "count": 30}, {"cid": 55, "color": "#EDC948", "label": "Community 55", "count": 8}, {"cid": 56, "color": "#B07AA1", "label": "Community 56", "count": 7}, {"cid": 57, "color": "#FF9DA7", "label": "Community 57", "count": 4}, {"cid": 58, "color": "#9C755F", "label": "Community 58", "count": 20}, {"cid": 59, "color": "#BAB0AC", "label": "Community 59", "count": 30}, {"cid": 60, "color": "#4E79A7", "label": "Community 60", "count": 17}, {"cid": 61, "color": "#F28E2B", "label": "Community 61", "count": 46}, {"cid": 62, "color": "#E15759", "label": "Community 62", "count": 43}, {"cid": 63, "color": "#76B7B2", "label": "Community 63", "count": 9}, {"cid": 64, "color": "#59A14F", "label": "Community 64", "count": 17}, {"cid": 65, "color": "#EDC948", "label": "Community 65", "count": 62}, {"cid": 66, "color": "#B07AA1", "label": "Community 66", "count": 51}, {"cid": 67, "color": "#FF9DA7", "label": "Community 67", "count": 38}, {"cid": 68, "color": "#9C755F", "label": "Community 68", "count": 14}, {"cid": 69, "color": "#BAB0AC", "label": "Community 69", "count": 24}, {"cid": 70, "color": "#4E79A7", "labelLine truncated
|
||||
const RAW_NODES = [{"id": "app_init", "label": "__init__.py", "color": {"background": "#59A14F", "border": "#59A14F", "highlight": {"background": "#ffffff", "border": "#59A14F"}}, "size": 10.0, "font": {"size": 0, "color": "#ffffff"}, "title": "__init__.py", "community": 304, "community_name": "__init__.py", "source_file": "app/__init__.py", "file_type": "code", "degree": 0}, {"id": "app_api_init", "label": "__init__.py", "color": {"background": "#4E79A7", "border": "#4E79A7", "highlight": {"background": "#ffffff", "border": "#4E79A7"}}, "size": 10.6, "font": {"size": 0, "color": "#ffffff"}, "title": "__init__.py", "community": 160, "community_name": "register_local_callback", "source_file": "app/api/__init__.py", "file_type": "code", "degree": 10}, {"id": "app_api_init_rationale_1", "label": "API \u8def\u7531\u5305 \u2014 \u5c71\u5ce1\u5316\u5de5\u751f\u4ea7\u4e00\u4f53\u5316\u95e8\u6237", "color": {"background": "#4E79A7", "border": "#4E79A7", "highlight": {"background": "#ffffff", "border": "#4E79A7"}}, "size": 10.1, "font": {"size": 0, "color": "#ffffff"}, "title": "API \u8def\u7531\u5305 \u2014 \u5c71\u5ce1\u5316\u5de5\u751f\u4ea7\u4e00\u4f53\u5316\u95e8\u6237", "community": 160, "community_name": "register_local_callback", "source_file": "app/api/__init__.py", "file_type": "rationale", "degree": 1}, {"id": "app_api_admin", "label": "admin.py", "color": {"background": "#76B7B2", "border": "#76B7B2", "highlight": {"background": "#ffffff", "border": "#76B7B2"}}, "size": 17.7, "font": {"size": 12, "color": "#ffffff"}, "title": "admin.py", "community": 3, "community_name": "Community 3", "source_file": "app/api/admin.py", "file_type": "code", "degree": 119}, {"id": "app_api_admin_list_roles_for_select", "label": "list_roles_for_select()", "color": {"background": "#76B7B2", "border": "#76B7B2", "highlight": {"background": "#ffffff", "border": "#76B7B2"}}, "size": 10.3, "font": {"size": 0, "color": "#ffffff"}, "title": "list_roles_for_select()", "community": 3, "community_name": "Community 3", "source_file": "app/api/admin.py", "file_type": "code", "degree": 5}, {"id": "app_api_admin_py_session", "label": "Session", "color": {"background": "#76B7B2", "border": "#76B7B2", "highlight": {"background": "#ffffff", "border": "#76B7B2"}}, "size": 13.7, "font": {"size": 0, "color": "#ffffff"}, "title": "Session", "community": 3, "community_name": "Community 3", "source_file": "", "file_type": "code", "degree": 57}, {"id": "app_api_admin_list_users_for_select", "label": "list_users_for_select()", "color": {"background": "#76B7B2", "border": "#76B7B2", "highlight": {"background": "#ffffff", "border": "#76B7B2"}}, "size": 10.3, "font": {"size": 0, "color": "#ffffff"}, "title": "list_users_for_select()", "community": 3, "community_name": "Community 3", "source_file": "app/api/admin.py", "file_type": "code", "degree": 5}, {"id": "app_api_admin_list_roles_for_designer", "label": "list_roles_for_designer()", "color": {"background": "#76B7B2", "border": "#76B7B2", "highlight": {"background": "#ffffff", "border": "#76B7B2"}}, "size": 10.3, "font": {"size": 0, "color": "#ffffff"}, "title": "list_roles_for_designer()", "community": 3, "community_name": "Community 3", "source_file": "app/api/admin.py", "file_type": "code", "degree": 5}, {"id": "app_api_admin_tenantcreatebody", "label": "TenantCreateBody", "color": {"background": "#76B7B2", "border": "#76B7B2", "highlight": {"background": "#ffffff", "border": "#76B7B2"}}, "size": 10.6, "font": {"size": 0, "color": "#ffffff"}, "title": "TenantCreateBody", "community": 3, "community_name": "Community 3", "source_file": "app/api/admin.py", "file_type": "code", "degree": 10}, {"id": "app_api_admin_tenantupdatebody", "label": "TenantUpdateBody", "color": {"background": "#76B7B2", "border": "#76B7B2", "highlight": {"background": "#ffffff", "border": "#76B7B2"}}, "size": 10.6, "font": {"size": 0, "color": "#ffffff"}, "title": "TenantUpdateBody", "community": 3, "community_name": "Community 3", "source_file": "app/api/admin.py", "file_type": "code", "degree": 10}, {"id": "app_api_admin_list_tenants", "label": "list_tenants()", "color": {"background": "#76B7B2", "border": "#76B7B2", "highlight": {"background": "#ffffff", "border": "#76B7B2"}}, "size": 10.2, "font": {"size": 0, "color": "#ffffff"}, "title": "list_tenants()", "community": 3, "community_name": "Community 3", "source_file": "app/api/admin.py", "file_type": "code", "degree": 3}, {"id": "app_api_admin_create_tenant", "label": "create_tenant()", "color": {"background": "#76B7B2", "border": "#76B7B2", "highlight": {"background": "#ffffff", "border": "#76B7B2"}}, "size": 10.3, "font": {"size": 0, "color": "#ffffff"}, "title": "create_tenant()", "community": 3, "community_name": "Community 3", "source_file": "app/api/admin.py", "file_type": "code", "degree": 5}, {"id": "app_api_admin_update_tenant", "label": "update_tenant()", "color": {"background": "#76B7B2", "border": "#76B7B2", "highlight": {"background": "#ffffff", "border":Line truncated
|
||||
const RAW_EDGES = [{"from": "app_api_init", "to": "app_api_admin", "label": "re_exports", "title": "re_exports [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "app_api_init", "to": "app_api_bx_init", "label": "re_exports", "title": "re_exports [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "app_api_init", "to": "app_api_crm", "label": "re_exports", "title": "re_exports [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "app_api_init", "to": "app_api_db_init", "label": "re_exports", "title": "re_exports [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "app_api_init", "to": "app_api_leave", "label": "re_exports", "title": "re_exports [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "app_api_init", "to": "app_api_menu", "label": "re_exports", "title": "re_exports [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "app_api_init", "to": "app_api_monitor", "label": "re_exports", "title": "re_exports [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "app_api_init", "to": "app_api_public", "label": "re_exports", "title": "re_exports [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "app_api_init", "to": "app_api_workflow", "label": "re_exports", "title": "re_exports [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "app_api_init_rationale_1", "to": "app_api_init", "label": "rationale_for", "title": "rationale_for [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "app_api_admin", "to": "app_api_admin_attachment_download_url", "label": "contains", "title": "contains [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "app_api_admin", "to": "app_api_admin_attachment_preview_url", "label": "contains", "title": "contains [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "app_api_admin", "to": "app_api_admin_attachmentdownloadurlbody", "label": "contains", "title": "contains [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "app_api_admin", "to": "app_api_admin_create_dept", "label": "contains", "title": "contains [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "app_api_admin", "to": "app_api_admin_create_dict_data", "label": "contains", "title": "contains [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "app_api_admin", "to": "app_api_admin_create_dict_type", "label": "contains", "title": "contains [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "app_api_admin", "to": "app_api_admin_create_menu", "label": "contains", "title": "contains [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "app_api_admin", "to": "app_api_admin_create_menu_favorite", "label": "contains", "title": "contains [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "app_api_admin", "to": "app_api_admin_create_post", "label": "contains", "title": "contains [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "app_api_admin", "to": "app_api_admin_create_role_management", "label": "contains", "title": "contains [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "app_api_admin", "to": "app_api_admin_create_site", "label": "contains", "title": "contains [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "app_api_admin", "to": "app_api_admin_create_tenant", "label": "contains", "title": "contains [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "app_api_admin", "to": "app_api_admin_create_user", "label": "contains", "title": "contains [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "app_api_admin", "to": "app_api_admin_delete_dept", "label": "contains", "title": "contains [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "app_api_admin", "to": "app_api_admin_delete_dict_data", "label": "contains", "title": "contains [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"Line truncated
|
||||
const LEGEND = [{"cid": 0, "color": "#4E79A7", "label": "Community 0", "count": 35}, {"cid": 1, "color": "#F28E2B", "label": "Community 1", "count": 50}, {"cid": 2, "color": "#E15759", "label": "Community 2", "count": 27}, {"cid": 3, "color": "#76B7B2", "label": "Community 3", "count": 105}, {"cid": 4, "color": "#59A14F", "label": "Community 4", "count": 63}, {"cid": 5, "color": "#EDC948", "label": "Community 5", "count": 7}, {"cid": 6, "color": "#B07AA1", "label": "Community 6", "count": 33}, {"cid": 7, "color": "#FF9DA7", "label": "Community 7", "count": 224}, {"cid": 8, "color": "#9C755F", "label": "Community 8", "count": 57}, {"cid": 9, "color": "#BAB0AC", "label": "Community 9", "count": 51}, {"cid": 10, "color": "#4E79A7", "label": "Community 10", "count": 46}, {"cid": 11, "color": "#F28E2B", "label": "Community 11", "count": 61}, {"cid": 12, "color": "#E15759", "label": "Community 12", "count": 83}, {"cid": 13, "color": "#76B7B2", "label": "Community 13", "count": 24}, {"cid": 14, "color": "#59A14F", "label": "Community 14", "count": 38}, {"cid": 15, "color": "#EDC948", "label": "Community 15", "count": 51}, {"cid": 16, "color": "#B07AA1", "label": "Community 16", "count": 66}, {"cid": 17, "color": "#FF9DA7", "label": "Community 17", "count": 7}, {"cid": 18, "color": "#9C755F", "label": "Community 18", "count": 71}, {"cid": 19, "color": "#BAB0AC", "label": "Community 19", "count": 78}, {"cid": 20, "color": "#4E79A7", "label": "Community 20", "count": 53}, {"cid": 21, "color": "#F28E2B", "label": "Community 21", "count": 35}, {"cid": 22, "color": "#E15759", "label": "Community 22", "count": 43}, {"cid": 23, "color": "#76B7B2", "label": "Community 23", "count": 21}, {"cid": 24, "color": "#59A14F", "label": "Community 24", "count": 43}, {"cid": 25, "color": "#EDC948", "label": "Community 25", "count": 32}, {"cid": 26, "color": "#B07AA1", "label": "Community 26", "count": 74}, {"cid": 27, "color": "#FF9DA7", "label": "Community 27", "count": 35}, {"cid": 28, "color": "#9C755F", "label": "Community 28", "count": 74}, {"cid": 29, "color": "#BAB0AC", "label": "Community 29", "count": 61}, {"cid": 30, "color": "#4E79A7", "label": "Community 30", "count": 27}, {"cid": 31, "color": "#F28E2B", "label": "Community 31", "count": 19}, {"cid": 32, "color": "#E15759", "label": "Community 32", "count": 17}, {"cid": 33, "color": "#76B7B2", "label": "Community 33", "count": 29}, {"cid": 34, "color": "#59A14F", "label": "Community 34", "count": 42}, {"cid": 35, "color": "#EDC948", "label": "Community 35", "count": 38}, {"cid": 36, "color": "#B07AA1", "label": "Community 36", "count": 33}, {"cid": 37, "color": "#FF9DA7", "label": "Community 37", "count": 26}, {"cid": 38, "color": "#9C755F", "label": "Community 38", "count": 24}, {"cid": 39, "color": "#BAB0AC", "label": "Community 39", "count": 29}, {"cid": 40, "color": "#4E79A7", "label": "Community 40", "count": 16}, {"cid": 41, "color": "#F28E2B", "label": "Community 41", "count": 26}, {"cid": 42, "color": "#E15759", "label": "Community 42", "count": 34}, {"cid": 43, "color": "#76B7B2", "label": "Community 43", "count": 60}, {"cid": 44, "color": "#59A14F", "label": "Community 44", "count": 33}, {"cid": 45, "color": "#EDC948", "label": "Community 45", "count": 73}, {"cid": 46, "color": "#B07AA1", "label": "Community 46", "count": 29}, {"cid": 47, "color": "#FF9DA7", "label": "Community 47", "count": 23}, {"cid": 48, "color": "#9C755F", "label": "Community 48", "count": 14}, {"cid": 49, "color": "#BAB0AC", "label": "Community 49", "count": 11}, {"cid": 50, "color": "#4E79A7", "label": "Community 50", "count": 22}, {"cid": 51, "color": "#F28E2B", "label": "Community 51", "count": 39}, {"cid": 52, "color": "#E15759", "label": "Community 52", "count": 31}, {"cid": 53, "color": "#76B7B2", "label": "Community 53", "count": 43}, {"cid": 54, "color": "#59A14F", "label": "Community 54", "count": 24}, {"cid": 55, "color": "#EDC948", "label": "Community 55", "count": 7}, {"cid": 56, "color": "#B07AA1", "label": "Community 56", "count": 20}, {"cid": 57, "color": "#FF9DA7", "label": "Community 57", "count": 9}, {"cid": 58, "color": "#9C755F", "label": "Community 58", "count": 20}, {"cid": 59, "color": "#BAB0AC", "label": "Community 59", "count": 30}, {"cid": 60, "color": "#4E79A7", "label": "Community 60", "count": 17}, {"cid": 61, "color": "#F28E2B", "label": "Community 61", "count": 37}, {"cid": 62, "color": "#E15759", "label": "Community 62", "count": 29}, {"cid": 63, "color": "#76B7B2", "label": "Community 63", "count": 18}, {"cid": 64, "color": "#59A14F", "label": "Community 64", "count": 17}, {"cid": 65, "color": "#EDC948", "label": "Community 65", "count": 62}, {"cid": 66, "color": "#B07AA1", "label": "Community 66", "count": 36}, {"cid": 67, "color": "#FF9DA7", "label": "Community 67", "count": 38}, {"cid": 68, "color": "#9C755F", "label": "Community 68", "count": 26}, {"cid": 69, "color": "#BAB0AC", "label": "Community 69", "count": 34}, {"cid": 70, "color": "#4E79A7", "laLine truncated
|
||||
|
||||
// HTML-escape helper — prevents XSS when injecting graph data into innerHTML
|
||||
function esc(s) {
|
||||
|
||||
+3079
-2234
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,18 @@
|
||||
from datetime import date
|
||||
|
||||
from app.core.id_card import calc_age_from_chinese_id_card
|
||||
|
||||
|
||||
def test_calc_age_from_18_digit_id():
|
||||
# 1990-05-15
|
||||
id_card = "340102199005151234"
|
||||
assert calc_age_from_chinese_id_card(id_card, today=date(2026, 5, 14)) == 35
|
||||
assert calc_age_from_chinese_id_card(id_card, today=date(2026, 5, 15)) == 36
|
||||
assert calc_age_from_chinese_id_card(id_card, today=date(2026, 8, 19)) == 36
|
||||
|
||||
|
||||
def test_calc_age_rejects_invalid():
|
||||
assert calc_age_from_chinese_id_card("") is None
|
||||
assert calc_age_from_chinese_id_card("34010219900515") is None
|
||||
assert calc_age_from_chinese_id_card("340102199013151234") is None
|
||||
assert calc_age_from_chinese_id_card("340102199002301234") is None
|
||||
@@ -0,0 +1,4 @@
|
||||
-- 框架合同产品明细:数量/价格模式(按客户需求、随行就市 vs 具体数字)
|
||||
ALTER TABLE `crm_contract_product`
|
||||
ADD COLUMN `quantity_mode` varchar(20) DEFAULT 'fixed' COMMENT '数量模式: customer_demand/fixed' AFTER `quantity`,
|
||||
ADD COLUMN `price_mode` varchar(20) DEFAULT 'fixed' COMMENT '价格模式: market/fixed' AFTER `subtotal`;
|
||||
+56
-36
@@ -945,8 +945,8 @@
|
||||
"semantic_hash": ""
|
||||
},
|
||||
"src/api/crm/contract/types.ts": {
|
||||
"mtime": 1786239385.815235,
|
||||
"ast_hash": "e77bdb139daca593fbd2c008688f8eb2",
|
||||
"mtime": 1787131009.585038,
|
||||
"ast_hash": "d39f441cec372e0fc9ba0807c25ad387",
|
||||
"semantic_hash": ""
|
||||
},
|
||||
"src/api/crm/customer.ts": {
|
||||
@@ -1190,8 +1190,8 @@
|
||||
"semantic_hash": ""
|
||||
},
|
||||
"src/components/business/attachment-upload-field/index.vue": {
|
||||
"mtime": 1785687409.4106731,
|
||||
"ast_hash": "21852610c686090dddb4e0c38de05a2d",
|
||||
"mtime": 1787129058.3308272,
|
||||
"ast_hash": "f65867bde270db2f6d2743b992849262",
|
||||
"semantic_hash": ""
|
||||
},
|
||||
"src/components/business/brand-qty-chips-field/index.vue": {
|
||||
@@ -1350,8 +1350,8 @@
|
||||
"semantic_hash": ""
|
||||
},
|
||||
"src/components/business/pl-paste-recognize-dialog/index.vue": {
|
||||
"mtime": 1785922268.1114755,
|
||||
"ast_hash": "aaffac3d0a2c9fae0042d167e63d079c",
|
||||
"mtime": 1787147807.4346647,
|
||||
"ast_hash": "85a7a05e56ebc0f7cca073e36451abe0",
|
||||
"semantic_hash": ""
|
||||
},
|
||||
"src/components/business/pl-personnel-cert-badges/index.vue": {
|
||||
@@ -1390,8 +1390,8 @@
|
||||
"semantic_hash": ""
|
||||
},
|
||||
"src/components/business/pl-plan-form-dialog/index.vue": {
|
||||
"mtime": 1786242552.4727957,
|
||||
"ast_hash": "263a00d703ba8934d049ed8e255abdcf",
|
||||
"mtime": 1787147757.6558907,
|
||||
"ast_hash": "5f50d260e465b6a27e409f221baa5bc7",
|
||||
"semantic_hash": ""
|
||||
},
|
||||
"src/components/business/pl-plan-hazard-cert-view-table/index.vue": {
|
||||
@@ -1475,8 +1475,8 @@
|
||||
"semantic_hash": ""
|
||||
},
|
||||
"src/components/business/pl-vehicle-library-select-dialog/index.vue": {
|
||||
"mtime": 1785973759.637234,
|
||||
"ast_hash": "a9373c03f8ed44875e9dfb69be0f40af",
|
||||
"mtime": 1787148271.3687375,
|
||||
"ast_hash": "44796798e307cc78aa3015e96884547a",
|
||||
"semantic_hash": ""
|
||||
},
|
||||
"src/components/business/pl-vehicle-personnel-view-list/PersonnelViewPanel.vue": {
|
||||
@@ -2809,6 +2809,11 @@
|
||||
"ast_hash": "5c7ca1ed2c7d13fb9f25d1ee6a71cfd3",
|
||||
"semantic_hash": ""
|
||||
},
|
||||
"src/utils/id-card.ts": {
|
||||
"mtime": 1787140339.0040643,
|
||||
"ast_hash": "c1e99c92fe8b6040fce8bd92ae150bbc",
|
||||
"semantic_hash": ""
|
||||
},
|
||||
"src/utils/index.ts": {
|
||||
"mtime": 1782858530.0,
|
||||
"ast_hash": "410d1fe79b96259a6301aa5ff50ac08a",
|
||||
@@ -2915,8 +2920,8 @@
|
||||
"semantic_hash": ""
|
||||
},
|
||||
"src/utils/pl-paste-recognize.ts": {
|
||||
"mtime": 1785656689.388857,
|
||||
"ast_hash": "10746a1e7a735dca458ae9bbf50ed2b3",
|
||||
"mtime": 1787141129.6489534,
|
||||
"ast_hash": "cc3b52eb04b2a72471c534bd4951f6b4",
|
||||
"semantic_hash": ""
|
||||
},
|
||||
"src/utils/pl-personnel-cert.ts": {
|
||||
@@ -3285,18 +3290,18 @@
|
||||
"semantic_hash": ""
|
||||
},
|
||||
"src/views/crm/contract/components/ContractAttachmentPanel.vue": {
|
||||
"mtime": 1786076391.1076276,
|
||||
"ast_hash": "5ccc018d3fce12cc4c2443521563bcda",
|
||||
"mtime": 1787128804.2732458,
|
||||
"ast_hash": "af0d30b1ccdbbf18d4334ac42ad0eb74",
|
||||
"semantic_hash": ""
|
||||
},
|
||||
"src/views/crm/contract/components/ContractDetailDialog.vue": {
|
||||
"mtime": 1786936383.8310437,
|
||||
"ast_hash": "63439cd4c56109b1efef4c4817be7be5",
|
||||
"mtime": 1787131068.8514423,
|
||||
"ast_hash": "83377594a48e22cc797a78a415f381fe",
|
||||
"semantic_hash": ""
|
||||
},
|
||||
"src/views/crm/contract/components/ContractFormDialog.vue": {
|
||||
"mtime": 1786538789.779928,
|
||||
"ast_hash": "02dbd208107c7f76d3cc8315c866b958",
|
||||
"mtime": 1787132729.5041769,
|
||||
"ast_hash": "15b69f77cc504391a2ceced77e37af6b",
|
||||
"semantic_hash": ""
|
||||
},
|
||||
"src/views/crm/contract/components/ExecuteDialog.vue": {
|
||||
@@ -3315,8 +3320,8 @@
|
||||
"semantic_hash": ""
|
||||
},
|
||||
"src/views/crm/contract/components/UploadDialog.vue": {
|
||||
"mtime": 1782858540.0,
|
||||
"ast_hash": "becea01b30f150e2593681ec61999147",
|
||||
"mtime": 1787128787.730353,
|
||||
"ast_hash": "4e6c9342d1fd8579611bacc3c09d083e",
|
||||
"semantic_hash": ""
|
||||
},
|
||||
"src/views/crm/contract/contractType.ts": {
|
||||
@@ -3325,13 +3330,18 @@
|
||||
"semantic_hash": ""
|
||||
},
|
||||
"src/views/crm/contract/detail.vue": {
|
||||
"mtime": 1786936513.2811224,
|
||||
"ast_hash": "72dacba74fd6af4368406e2314bcf396",
|
||||
"mtime": 1787131054.2373319,
|
||||
"ast_hash": "104a4fe7480f29023dea73a6fa975a41",
|
||||
"semantic_hash": ""
|
||||
},
|
||||
"src/views/crm/contract/form.vue": {
|
||||
"mtime": 1786181093.1514828,
|
||||
"ast_hash": "f8faf26825d0578705d71d048ef29c0b",
|
||||
"mtime": 1787132850.848506,
|
||||
"ast_hash": "57f00b3311e811035513fdf3dfc0fe1e",
|
||||
"semantic_hash": ""
|
||||
},
|
||||
"src/views/crm/contract/frameworkProductPricing.ts": {
|
||||
"mtime": 1787132588.6318743,
|
||||
"ast_hash": "49f4d75f8586fe1ef30d0adb7e7d3358",
|
||||
"semantic_hash": ""
|
||||
},
|
||||
"src/views/crm/contract/index.vue": {
|
||||
@@ -3640,18 +3650,18 @@
|
||||
"semantic_hash": ""
|
||||
},
|
||||
"src/views/demo/category/index.vue": {
|
||||
"mtime": 1786180978.7057428,
|
||||
"ast_hash": "2f1ccce4cf4cb1fcd5155068f7bd11cc",
|
||||
"mtime": 1787130174.4400213,
|
||||
"ast_hash": "381d6863219c7f6c1a6809b301d29e2e",
|
||||
"semantic_hash": ""
|
||||
},
|
||||
"src/views/demo/order/index.vue": {
|
||||
"mtime": 1786180978.7026544,
|
||||
"ast_hash": "6fdc6cf790f20693694a0e9293142c5e",
|
||||
"mtime": 1787129876.6407933,
|
||||
"ast_hash": "abe89bfffc165e0b5ff1d55c29a27d38",
|
||||
"semantic_hash": ""
|
||||
},
|
||||
"src/views/demo/product/index.vue": {
|
||||
"mtime": 1786180978.7080238,
|
||||
"ast_hash": "16faa9f7b1ca7db80fd1cb1e16c6f037",
|
||||
"mtime": 1787130016.100707,
|
||||
"ast_hash": "b27e5440c8af6174e87f165dbbaadb94",
|
||||
"semantic_hash": ""
|
||||
},
|
||||
"src/views/demo/unit/index.vue": {
|
||||
@@ -3780,8 +3790,8 @@
|
||||
"semantic_hash": ""
|
||||
},
|
||||
"src/views/pl/personnel/index.vue": {
|
||||
"mtime": 1786186548.240495,
|
||||
"ast_hash": "8873d5fb69479cd65f579d5179b8a981",
|
||||
"mtime": 1787141459.9378362,
|
||||
"ast_hash": "f2d63c96fd9462abe4f1e70c17e4a48f",
|
||||
"semantic_hash": ""
|
||||
},
|
||||
"src/views/pl/plan-archive/index.vue": {
|
||||
@@ -3810,8 +3820,8 @@
|
||||
"semantic_hash": ""
|
||||
},
|
||||
"src/views/pl/plan/index.vue": {
|
||||
"mtime": 1787047541.8256676,
|
||||
"ast_hash": "411c2a3dad70d3c667890933ae3a5759",
|
||||
"mtime": 1787147466.1533017,
|
||||
"ast_hash": "4a14368de655abf1e4361b93347cab33",
|
||||
"semantic_hash": ""
|
||||
},
|
||||
"src/views/pl/self-vehicle/index.vue": {
|
||||
@@ -3860,8 +3870,8 @@
|
||||
"semantic_hash": ""
|
||||
},
|
||||
"src/views/pl/vehicle/index.vue": {
|
||||
"mtime": 1786180978.7111788,
|
||||
"ast_hash": "65a2f02872fce39571309f9cdf8f71e9",
|
||||
"mtime": 1787141457.8110201,
|
||||
"ast_hash": "029b57548b685eb42ceaaefa37deed78",
|
||||
"semantic_hash": ""
|
||||
},
|
||||
"src/views/portal/home/index.vue": {
|
||||
@@ -5393,5 +5403,15 @@
|
||||
"mtime": 1780108931.0,
|
||||
"ast_hash": "839d61e0376bb89e1c2bd458ecb2051b",
|
||||
"semantic_hash": ""
|
||||
},
|
||||
"src/components/business/pl-personnel-form-dialog/index.vue": {
|
||||
"mtime": 1787148169.8604918,
|
||||
"ast_hash": "89ccfee6133a4061bc623dbc5c4ccd61",
|
||||
"semantic_hash": ""
|
||||
},
|
||||
"src/components/business/pl-personnel-library-select-panel/index.vue": {
|
||||
"mtime": 1787148253.0268295,
|
||||
"ast_hash": "cef22d15c60eb8be9874fdec2c803699",
|
||||
"semantic_hash": ""
|
||||
}
|
||||
}
|
||||
@@ -200,14 +200,14 @@
|
||||
"198": "fetchData",
|
||||
"199": "price-letter-template.ts",
|
||||
"200": "index.js",
|
||||
"201": "contractType.ts",
|
||||
"201": "Ha",
|
||||
"202": "Community 202",
|
||||
"203": "price-letter.ts",
|
||||
"204": "fetchData",
|
||||
"205": "menuFavorite.ts",
|
||||
"206": "index.vue",
|
||||
"207": "emit",
|
||||
"208": "v2.5.7 - 2025-09-14",
|
||||
"203": "customerPool.ts",
|
||||
"204": "DbCrmCustomerSelect.vue",
|
||||
"205": "loadDefaultCustomerOptions",
|
||||
"206": "contractType.ts",
|
||||
"207": "SettingDrawer.vue",
|
||||
"208": "syncStatsColumnWidths",
|
||||
"209": "Community 209",
|
||||
"210": "Community 210",
|
||||
"211": "loadUserOptions",
|
||||
@@ -218,9 +218,13 @@
|
||||
"216": "zh_CN.js",
|
||||
"217": "index.js",
|
||||
"218": "index.js",
|
||||
"219": "handleAdd",
|
||||
"219": "applyBrandSelectChange",
|
||||
"220": "detail.vue",
|
||||
"221": "index.vue",
|
||||
"222": "index.vue",
|
||||
"223": "Community 223",
|
||||
"224": "Community 224",
|
||||
"225": "v2.4.2.1 - 2025-06-16",
|
||||
"226": "form.vue",
|
||||
"227": "Community 227",
|
||||
"228": "Community 228",
|
||||
@@ -233,7 +237,6 @@
|
||||
"248": "Community 248",
|
||||
"251": "handleDisburse",
|
||||
"253": "Community 253",
|
||||
"254": "Community 254",
|
||||
"255": "Community 255",
|
||||
"259": "Community 259",
|
||||
"260": "Community 260",
|
||||
@@ -291,7 +294,6 @@
|
||||
"347": "Community 347",
|
||||
"349": "Community 349",
|
||||
"350": "Community 350",
|
||||
"354": "Community 354",
|
||||
"355": "Community 355",
|
||||
"362": "Community 362",
|
||||
"364": "Community 364",
|
||||
|
||||
@@ -0,0 +1,816 @@
|
||||
{
|
||||
"0": "Community 0",
|
||||
"1": "Community 1",
|
||||
"2": "Community 2",
|
||||
"3": "Community 3",
|
||||
"4": "Community 4",
|
||||
"5": "Community 5",
|
||||
"6": "Community 6",
|
||||
"7": "Community 7",
|
||||
"8": "Community 8",
|
||||
"9": "Community 9",
|
||||
"10": "Community 10",
|
||||
"11": "Community 11",
|
||||
"12": "Community 12",
|
||||
"13": "Community 13",
|
||||
"14": "Community 14",
|
||||
"15": "Community 15",
|
||||
"16": "Community 16",
|
||||
"17": "Ha",
|
||||
"18": "Community 18",
|
||||
"19": "Community 19",
|
||||
"20": "Community 20",
|
||||
"21": "Community 21",
|
||||
"22": "Community 22",
|
||||
"23": "Community 23",
|
||||
"24": "Community 24",
|
||||
"25": "Community 25",
|
||||
"26": "theme.min.js",
|
||||
"27": "Community 27",
|
||||
"28": "useCommon",
|
||||
"29": "Community 29",
|
||||
"30": "loader.ts",
|
||||
"31": "RenewDialog.vue",
|
||||
"32": "index.vue",
|
||||
"33": "Community 33",
|
||||
"34": "main.ts",
|
||||
"35": "Community 35",
|
||||
"36": "VoidDialog.vue",
|
||||
"37": "pl-batch-print.ts",
|
||||
"38": "view-fields.ts",
|
||||
"39": "Community 39",
|
||||
"40": "Community 40",
|
||||
"41": "colors.ts",
|
||||
"42": "Community 42",
|
||||
"43": "Community 43",
|
||||
"44": "Community 44",
|
||||
"45": "Community 45",
|
||||
"46": "Community 46",
|
||||
"47": "fetchCustomerDetail",
|
||||
"48": "Community 48",
|
||||
"49": "Community 49",
|
||||
"50": "Community 50",
|
||||
"51": "price-letter-template.ts",
|
||||
"52": "Community 52",
|
||||
"53": "Community 53",
|
||||
"54": "Community 54",
|
||||
"55": "Community 55",
|
||||
"56": "Community 56",
|
||||
"57": "Community 57",
|
||||
"58": "Community 58",
|
||||
"59": "fetchData",
|
||||
"60": "index.vue",
|
||||
"61": "Community 61",
|
||||
"62": "highlight.ts",
|
||||
"63": "price-letter.ts",
|
||||
"64": "Community 64",
|
||||
"65": "detail.vue",
|
||||
"66": "Community 66",
|
||||
"67": "index.vue",
|
||||
"68": "Community 68",
|
||||
"69": "Community 69",
|
||||
"70": "Community 70",
|
||||
"71": "Community 71",
|
||||
"72": "Community 72",
|
||||
"73": "Community 73",
|
||||
"74": "Community 74",
|
||||
"75": "openEdit",
|
||||
"76": "handleSearch",
|
||||
"77": "loadUserOptions",
|
||||
"78": "customerPool.ts",
|
||||
"79": "Community 79",
|
||||
"80": "product.ts",
|
||||
"81": "Community 81",
|
||||
"82": "Community 82",
|
||||
"83": "useDictStore",
|
||||
"84": "Community 84",
|
||||
"85": "index.vue",
|
||||
"86": "Community 86",
|
||||
"87": "canDeleteByCreator",
|
||||
"88": "index.vue",
|
||||
"89": "detail.vue",
|
||||
"90": "theme.min.js",
|
||||
"91": "Community 91",
|
||||
"92": "Community 92",
|
||||
"93": "ArtUserMenu.vue",
|
||||
"94": "formatYmd",
|
||||
"95": "Community 95",
|
||||
"96": "Community 96",
|
||||
"97": "stringifyBody",
|
||||
"98": "index.vue",
|
||||
"99": "stringifyBody",
|
||||
"100": "v2.4.2.1 - 2025-06-16",
|
||||
"101": "price-letter.ts",
|
||||
"102": "price-letter-template.ts",
|
||||
"103": "SettingDrawer.vue",
|
||||
"104": "contractType.ts",
|
||||
"105": "index.vue",
|
||||
"106": "Community 106",
|
||||
"107": "Community 107",
|
||||
"108": "Community 108",
|
||||
"109": "Community 109",
|
||||
"110": "Community 110",
|
||||
"111": "format.ts",
|
||||
"112": "inventory.ts",
|
||||
"113": "Community 113",
|
||||
"114": "index.vue",
|
||||
"115": "useDictStore",
|
||||
"116": "Community 116",
|
||||
"117": "Community 117",
|
||||
"118": "zh_CN.js",
|
||||
"119": "Community 119",
|
||||
"120": "Community 120",
|
||||
"121": "chart.ts",
|
||||
"122": "handleDisburse",
|
||||
"123": "detail.vue",
|
||||
"124": "index.vue",
|
||||
"125": "Community 125",
|
||||
"126": "Community 126",
|
||||
"127": "selectContractRow",
|
||||
"128": "Community 128",
|
||||
"129": "Community 129",
|
||||
"130": "system.ts",
|
||||
"131": "index.vue",
|
||||
"132": "Community 132",
|
||||
"133": "Community 133",
|
||||
"134": "index.vue",
|
||||
"135": "detail.vue",
|
||||
"136": "Community 136",
|
||||
"137": "Community 137",
|
||||
"138": "FollowDialog.vue",
|
||||
"139": "useTableColumns.ts",
|
||||
"140": "Community 140",
|
||||
"141": "Community 141",
|
||||
"142": "Community 142",
|
||||
"143": "index.js",
|
||||
"144": "Community 144",
|
||||
"145": "api",
|
||||
"146": "price-letter-template.ts",
|
||||
"147": "contractType.ts",
|
||||
"148": "Community 148",
|
||||
"149": "fetchCustomerDetail",
|
||||
"150": "Community 150",
|
||||
"151": "Community 151",
|
||||
"152": "SettingDrawer.vue",
|
||||
"153": "index.vue",
|
||||
"154": "index.vue",
|
||||
"155": "error.ts",
|
||||
"156": "v2.4.2.1 - 2025-06-16",
|
||||
"157": "form.vue",
|
||||
"158": "removeProductsNotAllowedByHazard",
|
||||
"159": "detail.vue",
|
||||
"160": "index.vue",
|
||||
"161": "Community 161",
|
||||
"162": "Community 162",
|
||||
"163": "system.ts",
|
||||
"164": "Community 164",
|
||||
"165": "handleDisburse",
|
||||
"166": "Community 166",
|
||||
"167": "Community 167",
|
||||
"168": "crypto.ts",
|
||||
"169": "Community 169",
|
||||
"170": "Community 170",
|
||||
"171": "index.vue",
|
||||
"172": "index.js",
|
||||
"173": "index.vue",
|
||||
"174": "Community 174",
|
||||
"175": "handleEdit",
|
||||
"176": "fetchData",
|
||||
"177": "fetchCustomerDetail",
|
||||
"178": "Community 178",
|
||||
"179": "Community 179",
|
||||
"180": "index.vue",
|
||||
"181": "Community 181",
|
||||
"182": "Community 182",
|
||||
"183": "Ha",
|
||||
"184": "highlight.ts",
|
||||
"185": "handleConfirmApproval",
|
||||
"186": "StorageKeyManager",
|
||||
"187": "Community 187",
|
||||
"188": "Community 188",
|
||||
"189": "Community 189",
|
||||
"190": "error-handle.ts",
|
||||
"191": "formatYmd",
|
||||
"192": "prepareLineAliasAndBrandForSubmit",
|
||||
"193": "crm-product-display.ts",
|
||||
"194": "loadDefaultCustomerOptions",
|
||||
"195": "Community 195",
|
||||
"196": "Community 196",
|
||||
"197": "handleEdit",
|
||||
"198": "fetchData",
|
||||
"199": "price-letter-template.ts",
|
||||
"200": "index.js",
|
||||
"201": "Ha",
|
||||
"202": "Community 202",
|
||||
"203": "customerPool.ts",
|
||||
"204": "DbCrmCustomerSelect.vue",
|
||||
"205": "loadDefaultCustomerOptions",
|
||||
"206": "contractType.ts",
|
||||
"207": "SettingDrawer.vue",
|
||||
"208": "syncStatsColumnWidths",
|
||||
"209": "Community 209",
|
||||
"210": "Community 210",
|
||||
"211": "loadUserOptions",
|
||||
"212": "index.js",
|
||||
"213": "Community 213",
|
||||
"214": "Community 214",
|
||||
"215": "index.vue",
|
||||
"216": "zh_CN.js",
|
||||
"217": "index.js",
|
||||
"218": "index.js",
|
||||
"219": "applyBrandSelectChange",
|
||||
"220": "detail.vue",
|
||||
"221": "index.vue",
|
||||
"222": "index.vue",
|
||||
"223": "Community 223",
|
||||
"224": "Community 224",
|
||||
"225": "v2.4.2.1 - 2025-06-16",
|
||||
"226": "form.vue",
|
||||
"227": "Community 227",
|
||||
"228": "Community 228",
|
||||
"229": "zh_CN.js",
|
||||
"233": "Community 233",
|
||||
"234": "Community 234",
|
||||
"239": "Community 239",
|
||||
"242": "Community 242",
|
||||
"243": "Community 243",
|
||||
"247": "Community 247",
|
||||
"248": "Community 248",
|
||||
"251": "handleDisburse",
|
||||
"253": "Community 253",
|
||||
"255": "Community 255",
|
||||
"259": "Community 259",
|
||||
"260": "Community 260",
|
||||
"261": "Community 261",
|
||||
"265": "Community 265",
|
||||
"269": "Community 269",
|
||||
"270": "Community 270",
|
||||
"280": "Community 280",
|
||||
"283": "Community 283",
|
||||
"284": "Community 284",
|
||||
"285": "Community 285",
|
||||
"286": "Community 286",
|
||||
"292": "Community 292",
|
||||
"295": "Community 295",
|
||||
"296": "Community 296",
|
||||
"302": "Community 302",
|
||||
"303": "Community 303",
|
||||
"304": "Community 304",
|
||||
"305": "isIoPlanFrozen",
|
||||
"306": "handleArrange",
|
||||
"307": "Community 307",
|
||||
"308": "Community 308",
|
||||
"309": "Community 309",
|
||||
"310": "Community 310",
|
||||
"315": "Community 315",
|
||||
"316": "Community 316",
|
||||
"317": "Community 317",
|
||||
"318": "Community 318",
|
||||
"319": "Community 319",
|
||||
"320": "Community 320",
|
||||
"321": "Community 321",
|
||||
"322": "Community 322",
|
||||
"323": "Community 323",
|
||||
"324": "Community 324",
|
||||
"325": "Community 325",
|
||||
"326": "Community 326",
|
||||
"327": "Community 327",
|
||||
"328": "Community 328",
|
||||
"329": "Community 329",
|
||||
"330": "Community 330",
|
||||
"331": "Community 331",
|
||||
"332": "Community 332",
|
||||
"333": "Community 333",
|
||||
"334": "Community 334",
|
||||
"335": "Community 335",
|
||||
"336": "Community 336",
|
||||
"337": "Community 337",
|
||||
"338": "Community 338",
|
||||
"339": "Community 339",
|
||||
"340": "Community 340",
|
||||
"341": "Community 341",
|
||||
"342": "error-handle.ts",
|
||||
"344": "ArtException.vue",
|
||||
"346": "Community 346",
|
||||
"347": "Community 347",
|
||||
"349": "Community 349",
|
||||
"350": "Community 350",
|
||||
"354": "Community 354",
|
||||
"355": "Community 355",
|
||||
"362": "Community 362",
|
||||
"364": "Community 364",
|
||||
"367": "Community 367",
|
||||
"372": "detail.vue",
|
||||
"377": "Community 377",
|
||||
"379": "Community 379",
|
||||
"380": "Community 380",
|
||||
"381": "Community 381",
|
||||
"391": "Community 391",
|
||||
"392": "Community 392",
|
||||
"393": "Community 393",
|
||||
"405": "zh_CN.js",
|
||||
"406": "Community 406",
|
||||
"408": "Community 408",
|
||||
"410": "Community 410",
|
||||
"412": "Community 412",
|
||||
"416": "Community 416",
|
||||
"417": "Community 417",
|
||||
"422": "Community 422",
|
||||
"423": "Community 423",
|
||||
"424": "Community 424",
|
||||
"425": "Community 425",
|
||||
"426": "Community 426",
|
||||
"427": "Community 427",
|
||||
"428": "Community 428",
|
||||
"435": "index.vue",
|
||||
"443": "index.vue",
|
||||
"444": "index.vue",
|
||||
"445": "Community 445",
|
||||
"459": "Community 459",
|
||||
"460": "Community 460",
|
||||
"462": "Community 462",
|
||||
"471": "Community 471",
|
||||
"472": "Community 472",
|
||||
"473": "Community 473",
|
||||
"474": "Community 474",
|
||||
"475": "Community 475",
|
||||
"476": "Community 476",
|
||||
"487": "Community 487",
|
||||
"488": "Community 488",
|
||||
"496": "Community 496",
|
||||
"499": "Community 499",
|
||||
"521": "Community 521",
|
||||
"522": "Community 522",
|
||||
"528": "Community 528",
|
||||
"534": "Community 534",
|
||||
"535": "Community 535",
|
||||
"536": "Community 536",
|
||||
"537": "Community 537",
|
||||
"539": "Community 539",
|
||||
"540": "Community 540",
|
||||
"550": "Community 550",
|
||||
"551": "Community 551",
|
||||
"552": "Community 552",
|
||||
"553": "Community 553",
|
||||
"555": "Community 555",
|
||||
"556": "Community 556",
|
||||
"557": "Community 557",
|
||||
"559": "Community 559",
|
||||
"560": "Community 560",
|
||||
"561": "Community 561",
|
||||
"562": "Community 562",
|
||||
"571": "Community 571",
|
||||
"572": "Community 572",
|
||||
"573": "Community 573",
|
||||
"574": "Community 574",
|
||||
"575": "Community 575",
|
||||
"576": "Community 576",
|
||||
"580": "Community 580",
|
||||
"581": "Community 581",
|
||||
"582": "Community 582",
|
||||
"583": "Community 583",
|
||||
"584": "Community 584",
|
||||
"585": "Community 585",
|
||||
"586": "Community 586",
|
||||
"597": "Community 597",
|
||||
"598": "Community 598",
|
||||
"599": "Community 599",
|
||||
"600": "Community 600",
|
||||
"601": "Community 601",
|
||||
"602": "Community 602",
|
||||
"603": "Community 603",
|
||||
"604": "Community 604",
|
||||
"607": "Community 607",
|
||||
"608": "Community 608",
|
||||
"609": "Community 609",
|
||||
"610": "Community 610",
|
||||
"611": "Community 611",
|
||||
"612": "Community 612",
|
||||
"613": "Community 613",
|
||||
"614": "Community 614",
|
||||
"615": "Community 615",
|
||||
"630": "Community 630",
|
||||
"631": "Community 631",
|
||||
"632": "Community 632",
|
||||
"633": "Community 633",
|
||||
"634": "Community 634",
|
||||
"635": "Community 635",
|
||||
"636": "Community 636",
|
||||
"637": "Community 637",
|
||||
"638": "Community 638",
|
||||
"639": "Community 639",
|
||||
"640": "Community 640",
|
||||
"641": "Community 641",
|
||||
"642": "Community 642",
|
||||
"643": "Community 643",
|
||||
"644": "Community 644",
|
||||
"645": "Community 645",
|
||||
"650": "Community 650",
|
||||
"651": "Community 651",
|
||||
"652": "Community 652",
|
||||
"653": "Community 653",
|
||||
"654": "Community 654",
|
||||
"655": "Community 655",
|
||||
"658": "Community 658",
|
||||
"659": "Community 659",
|
||||
"660": "Community 660",
|
||||
"662": "Community 662",
|
||||
"663": "Community 663",
|
||||
"664": "Community 664",
|
||||
"665": "Community 665",
|
||||
"666": "Community 666",
|
||||
"667": "Community 667",
|
||||
"668": "Community 668",
|
||||
"669": "Community 669",
|
||||
"670": "Community 670",
|
||||
"671": "Community 671",
|
||||
"700": "Community 700",
|
||||
"701": "Fixed",
|
||||
"702": "Community 702",
|
||||
"703": "Community 703",
|
||||
"704": "Community 704",
|
||||
"705": "Community 705",
|
||||
"706": "Community 706",
|
||||
"707": "Community 707",
|
||||
"708": "Community 708",
|
||||
"709": "Community 709",
|
||||
"710": "Community 710",
|
||||
"711": "Community 711",
|
||||
"713": "Community 713",
|
||||
"715": "Community 715",
|
||||
"716": "Community 716",
|
||||
"717": "Community 717",
|
||||
"718": "Community 718",
|
||||
"720": "Community 720",
|
||||
"722": "Community 722",
|
||||
"723": "Community 723",
|
||||
"724": "Community 724",
|
||||
"725": "Community 725",
|
||||
"726": "Community 726",
|
||||
"727": "Community 727",
|
||||
"729": "Community 729",
|
||||
"730": "Community 730",
|
||||
"731": "Community 731",
|
||||
"732": "Community 732",
|
||||
"733": "Community 733",
|
||||
"734": "修复",
|
||||
"766": "新增",
|
||||
"770": "移除",
|
||||
"772": "重构",
|
||||
"779": "重构",
|
||||
"785": "⚠️ 重要提示",
|
||||
"786": "⚠️ 重要提示",
|
||||
"788": "⚠️ 重要提示",
|
||||
"796": "OpportunityForm.vue",
|
||||
"806": "index.vue",
|
||||
"836": "BxInvoiceFileSelect.vue",
|
||||
"838": "CustomerSelector.vue",
|
||||
"840": "index.vue",
|
||||
"857": "index.ts",
|
||||
"886": "index.vue",
|
||||
"889": "QuoteSelector.vue",
|
||||
"892": "index.vue",
|
||||
"896": "MarkWonDialog.vue",
|
||||
"924": "OpportunitySelector.vue",
|
||||
"950": "BatchUpdateStageDialog.vue",
|
||||
"1010": "BxApprovalFlowTabs.vue",
|
||||
"1015": "DealDialog.vue",
|
||||
"1016": "TransferDialog.vue",
|
||||
"1017": "BatchUpdateDateDialog.vue",
|
||||
"1027": "IntoPoolDialog.vue",
|
||||
"1115": "v2.4.2.7 - 2025-06-25",
|
||||
"1117": "v2.5.2 - 2025-07-13",
|
||||
"1118": "v2.4.2.2 - 2025-06-16",
|
||||
"1123": "v2.4.1.1 - 2025-06-07",
|
||||
"1126": "v2.4.2.1 - 2025-06-16",
|
||||
"1127": "v2.4.2.4 - 2025-06-18",
|
||||
"1197": "icons.js",
|
||||
"1198": "icons.min.js",
|
||||
"1199": "index.js",
|
||||
"1200": "index.js",
|
||||
"1201": "index.js",
|
||||
"1202": "index.js",
|
||||
"1203": "index.js",
|
||||
"1204": "plugin.js",
|
||||
"1205": "plugin.min.js",
|
||||
"1206": "index.js",
|
||||
"1207": "plugin.js",
|
||||
"1208": "plugin.min.js",
|
||||
"1209": "index.js",
|
||||
"1210": "plugin.js",
|
||||
"1211": "plugin.min.js",
|
||||
"1212": "index.js",
|
||||
"1213": "plugin.js",
|
||||
"1214": "plugin.min.js",
|
||||
"1215": "index.js",
|
||||
"1216": "index.js",
|
||||
"1217": "plugin.js",
|
||||
"1218": "plugin.min.js",
|
||||
"1219": "index.js",
|
||||
"1220": "index.js",
|
||||
"1222": "emojiimages.js",
|
||||
"1223": "emojiimages.min.js",
|
||||
"1224": "emojis.js",
|
||||
"1225": "emojis.min.js",
|
||||
"1228": "ar.js",
|
||||
"1229": "bg_BG.js",
|
||||
"1230": "ca.js",
|
||||
"1231": "cs.js",
|
||||
"1232": "da.js",
|
||||
"1233": "de.js",
|
||||
"1234": "el.js",
|
||||
"1235": "es.js",
|
||||
"1236": "eu.js",
|
||||
"1237": "fa.js",
|
||||
"1238": "fi.js",
|
||||
"1239": "fr_FR.js",
|
||||
"1240": "he_IL.js",
|
||||
"1241": "hi.js",
|
||||
"1242": "hr.js",
|
||||
"1243": "hu_HU.js",
|
||||
"1244": "id.js",
|
||||
"1245": "it.js",
|
||||
"1246": "ja.js",
|
||||
"1247": "kk.js",
|
||||
"1248": "ko_KR.js",
|
||||
"1249": "ms.js",
|
||||
"1250": "nb_NO.js",
|
||||
"1251": "nl.js",
|
||||
"1252": "pl.js",
|
||||
"1253": "pt_BR.js",
|
||||
"1254": "pt_PT.js",
|
||||
"1255": "ro.js",
|
||||
"1256": "ru.js",
|
||||
"1257": "sk.js",
|
||||
"1258": "sl_SI.js",
|
||||
"1259": "sv_SE.js",
|
||||
"1260": "th_TH.js",
|
||||
"1261": "tr.js",
|
||||
"1262": "uk.js",
|
||||
"1263": "vi.js",
|
||||
"1265": "zh_TW.js",
|
||||
"1266": "index.js",
|
||||
"1267": "index.js",
|
||||
"1268": "plugin.js",
|
||||
"1269": "_",
|
||||
"1270": "index.js",
|
||||
"1271": "plugin.js",
|
||||
"1272": "plugin.min.js",
|
||||
"1275": "index.js",
|
||||
"1277": "plugin.js",
|
||||
"1278": "plugin.min.js",
|
||||
"1280": "plugin.js",
|
||||
"1281": "plugin.min.js",
|
||||
"1282": "index.js",
|
||||
"1283": "plugin.js",
|
||||
"1284": "plugin.min.js",
|
||||
"1287": "plugin.js",
|
||||
"1288": "plugin.min.js",
|
||||
"1289": "index.js",
|
||||
"1290": "index.js",
|
||||
"1291": "index.js",
|
||||
"1292": "index.js",
|
||||
"1293": "plugin.js",
|
||||
"1294": "plugin.min.js",
|
||||
"1295": "index.js",
|
||||
"1297": "plugin.js",
|
||||
"1298": "plugin.min.js",
|
||||
"1299": "content.js",
|
||||
"1300": "content.js",
|
||||
"1301": "content.js",
|
||||
"1302": "content.js",
|
||||
"1303": "content.js",
|
||||
"1304": "content.js",
|
||||
"1305": "content.inline.js",
|
||||
"1306": "content.js",
|
||||
"1307": "skin.js",
|
||||
"1308": "skin.shadowdom.js",
|
||||
"1309": "content.inline.js",
|
||||
"1310": "content.js",
|
||||
"1311": "skin.js",
|
||||
"1312": "skin.shadowdom.js",
|
||||
"1313": "content.inline.js",
|
||||
"1314": "content.js",
|
||||
"1315": "skin.js",
|
||||
"1316": "skin.shadowdom.js",
|
||||
"1317": "content.inline.js",
|
||||
"1318": "content.js",
|
||||
"1319": "skin.js",
|
||||
"1320": "skin.shadowdom.js",
|
||||
"1323": "index.vue",
|
||||
"1324": "index.vue",
|
||||
"1325": "index.vue",
|
||||
"1326": "route-parent.vue",
|
||||
"1327": "setupSubpackSlipEditorTypeCheckboxes",
|
||||
"1328": "修复",
|
||||
"1329": "优化",
|
||||
"1330": "新增",
|
||||
"1331": "⚠️ 重要提示",
|
||||
"1332": "重构",
|
||||
"1333": "优化",
|
||||
"1334": "修复",
|
||||
"1335": "新增",
|
||||
"1336": "升级",
|
||||
"1337": "⚠️ 重要提示",
|
||||
"1338": "修复",
|
||||
"1339": "优化",
|
||||
"1340": "新增",
|
||||
"1341": "优化",
|
||||
"1342": "修复",
|
||||
"1343": "⚠️ 重要提示",
|
||||
"1344": "升级",
|
||||
"1345": "修复",
|
||||
"1346": "优化",
|
||||
"1347": "⚠️ 重要提示",
|
||||
"1348": "新增",
|
||||
"1349": "修复",
|
||||
"1350": "优化",
|
||||
"1351": "新增",
|
||||
"1352": "优化",
|
||||
"1353": "修复",
|
||||
"1354": "新增",
|
||||
"1355": "重构",
|
||||
"1356": "优化",
|
||||
"1357": "修复",
|
||||
"1358": "移除",
|
||||
"1359": "新增",
|
||||
"1360": "优化",
|
||||
"1361": "修复",
|
||||
"1362": "新增",
|
||||
"1363": "重构",
|
||||
"1364": "升级",
|
||||
"1365": "优化",
|
||||
"1366": "修复",
|
||||
"1367": "新增",
|
||||
"1368": "优化",
|
||||
"1369": "修复",
|
||||
"1370": "优化",
|
||||
"1371": "修复",
|
||||
"1372": "新增",
|
||||
"1373": "重构",
|
||||
"1374": "升级",
|
||||
"1375": "移除",
|
||||
"1376": "修复",
|
||||
"1377": "⚠️ 重要提示",
|
||||
"1378": "重构",
|
||||
"1379": "优化",
|
||||
"1380": "修复",
|
||||
"1381": "修复",
|
||||
"1382": "新增",
|
||||
"1383": "优化",
|
||||
"1384": "修复",
|
||||
"1385": "重构",
|
||||
"1386": "优化",
|
||||
"1387": "新增",
|
||||
"1388": "重构",
|
||||
"1389": "重构",
|
||||
"1390": "优化",
|
||||
"1391": "重构",
|
||||
"1392": "优化",
|
||||
"1393": "重构",
|
||||
"1394": "重构",
|
||||
"1395": "修复",
|
||||
"1396": "重构",
|
||||
"1397": "新增",
|
||||
"1398": "优化",
|
||||
"1399": "修复",
|
||||
"1400": "⚠️ 重要提示",
|
||||
"1401": "优化",
|
||||
"1402": "修复",
|
||||
"1403": "新增",
|
||||
"1404": "优化",
|
||||
"1405": "修复",
|
||||
"1406": "重构",
|
||||
"1407": "新增",
|
||||
"1408": "优化",
|
||||
"1409": "⚠️ 重要提示",
|
||||
"1410": "code:block1 (crm/clue/)",
|
||||
"1411": "code:typescript ({)",
|
||||
"1412": "code:block3 (crm:clue:list # 线索列表查询)",
|
||||
"1413": "code:bash (mysql -u root -p your_database < crm/sql/crm/12-CRM字典数据汇总.md)",
|
||||
"9890": "README.md",
|
||||
"9959": "Fixed",
|
||||
"9960": "Fixed",
|
||||
"9961": "Fixed",
|
||||
"9962": "Fixed",
|
||||
"9963": "Fixed",
|
||||
"9964": "Fixed",
|
||||
"9965": "Fixed",
|
||||
"9966": "Fixed",
|
||||
"9967": "Fixed",
|
||||
"9968": "Fixed",
|
||||
"9969": "Fixed",
|
||||
"9970": "Fixed",
|
||||
"9971": "Fixed",
|
||||
"9972": "Fixed",
|
||||
"9973": "Fixed",
|
||||
"9974": "⚠️ Important Notice",
|
||||
"9975": "⚠️ Important Notice",
|
||||
"9976": "⚠️ Important Notice",
|
||||
"9977": "⚠️ Important Notice",
|
||||
"9978": "⚠️ Important Notice",
|
||||
"9979": "⚠️ Important Notice",
|
||||
"9980": "⚠️ Important Notice",
|
||||
"9981": "Optimized",
|
||||
"9982": "Optimized",
|
||||
"9983": "Optimized",
|
||||
"9984": "Optimized",
|
||||
"9985": "Optimized",
|
||||
"9986": "Optimized",
|
||||
"9987": "Optimized",
|
||||
"9988": "Optimized",
|
||||
"9989": "Optimized",
|
||||
"9990": "Optimized",
|
||||
"9991": "Optimized",
|
||||
"9992": "Optimized",
|
||||
"9993": "Optimized",
|
||||
"9994": "Optimized",
|
||||
"9995": "Optimized",
|
||||
"9996": "Optimized",
|
||||
"9997": "Optimized",
|
||||
"9998": "Optimized",
|
||||
"9999": "Optimized",
|
||||
"10000": "Optimized",
|
||||
"10001": "Refactored",
|
||||
"10002": "Refactored",
|
||||
"10003": "Refactored",
|
||||
"10004": "Refactored",
|
||||
"10005": "Refactored",
|
||||
"10006": "Refactored",
|
||||
"10007": "Refactored",
|
||||
"10008": "Refactored",
|
||||
"10009": "Refactored",
|
||||
"10010": "Refactored",
|
||||
"10011": "Refactored",
|
||||
"10012": "Refactored",
|
||||
"10013": "Removed",
|
||||
"10014": "Removed",
|
||||
"10015": "Upgraded",
|
||||
"10016": "Upgraded",
|
||||
"10017": "Upgraded",
|
||||
"10018": "Upgraded",
|
||||
"10019": "优化",
|
||||
"10020": "修复",
|
||||
"10021": "⚠️ 重要提示",
|
||||
"10022": "修复",
|
||||
"10023": "优化",
|
||||
"10024": "优化",
|
||||
"10025": "⚠️ 重要提示",
|
||||
"10026": "修复",
|
||||
"10027": "优化",
|
||||
"10028": "优化",
|
||||
"10029": "修复",
|
||||
"10030": "重构",
|
||||
"10031": "优化",
|
||||
"10032": "修复",
|
||||
"10033": "新增",
|
||||
"10034": "移除",
|
||||
"10035": "优化",
|
||||
"10036": "修复",
|
||||
"10037": "重构",
|
||||
"10038": "升级",
|
||||
"10039": "优化",
|
||||
"10040": "修复",
|
||||
"10041": "优化",
|
||||
"10042": "修复",
|
||||
"10043": "修复",
|
||||
"10044": "重构",
|
||||
"10045": "升级",
|
||||
"10046": "移除",
|
||||
"10047": "修复",
|
||||
"10048": "⚠️ 重要提示",
|
||||
"10049": "⚠️ 重要提示",
|
||||
"10050": "优化",
|
||||
"10051": "修复",
|
||||
"10052": "优化",
|
||||
"10053": "修复",
|
||||
"10054": "优化",
|
||||
"10055": "新增",
|
||||
"10056": "重构",
|
||||
"10057": "优化",
|
||||
"10058": "优化",
|
||||
"10059": "重构",
|
||||
"10060": "修复",
|
||||
"10061": "新增",
|
||||
"10062": "优化",
|
||||
"10063": "修复",
|
||||
"10064": "优化",
|
||||
"10065": "⚠️ 重要提示",
|
||||
"10066": "优化",
|
||||
"10067": "修复",
|
||||
"10068": "优化",
|
||||
"10069": "修复",
|
||||
"10070": "新增",
|
||||
"10071": "优化",
|
||||
"10072": "⚠️ 重要提示",
|
||||
"10073": "修复",
|
||||
"10074": "新增",
|
||||
"10075": "升级",
|
||||
"10076": "⚠️ 重要提示",
|
||||
"10077": "修复",
|
||||
"10078": "优化",
|
||||
"10079": "code:bash (# Install dependencies)",
|
||||
"10080": "code:bash (pnpm clean:dev)",
|
||||
"10081": "code:bash (# 安装依赖)",
|
||||
"10082": "code:bash (pnpm clean:dev)"
|
||||
}
|
||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
+10966
-6740
File diff suppressed because it is too large.
Load diff
@@ -55,7 +55,9 @@ export interface ContractProductForm {
|
||||
categoryName?: string
|
||||
unit?: string
|
||||
quantity: number
|
||||
quantityMode?: string
|
||||
price: number
|
||||
priceMode?: string
|
||||
taxRate?: number
|
||||
taxAmount?: number
|
||||
subtotal?: number
|
||||
|
||||
@@ -174,6 +174,7 @@ import {
|
||||
downloadAttachmentFile,
|
||||
resolveAttachmentPreviewUrl
|
||||
} from '@/utils/download-attachment'
|
||||
import { buildAttachmentUploadFormData, type CrmUploadBizType } from '@/utils/crm-upload'
|
||||
|
||||
type AttachmentItem = {
|
||||
id: string
|
||||
@@ -195,6 +196,8 @@ const props = withDefaults(
|
||||
compact?: boolean
|
||||
/** 附件 URL → 分类名称,用于查看态在缩略图上展示分类标签 */
|
||||
categoryLabels?: Record<string, string>
|
||||
/** CRM 等业务上传 bizType(与 folder 二选一或同时传) */
|
||||
bizType?: CrmUploadBizType | string
|
||||
}>(),
|
||||
{
|
||||
modelValue: '',
|
||||
@@ -379,11 +382,19 @@ async function uploadRawFile(rawFile: File) {
|
||||
}
|
||||
attachments.value.push(item)
|
||||
|
||||
const formData = new FormData()
|
||||
formData.append('file', rawFile)
|
||||
if (props.folder) {
|
||||
formData.append('folder', props.folder)
|
||||
}
|
||||
const formData = props.bizType
|
||||
? buildAttachmentUploadFormData(rawFile, {
|
||||
bizType: props.bizType,
|
||||
folder: props.folder || undefined
|
||||
})
|
||||
: (() => {
|
||||
const fd = new FormData()
|
||||
fd.append('file', rawFile)
|
||||
if (props.folder) {
|
||||
fd.append('folder', props.folder)
|
||||
}
|
||||
return fd
|
||||
})()
|
||||
|
||||
try {
|
||||
const res = await fetchUploadAttachment(formData)
|
||||
|
||||
@@ -138,11 +138,12 @@
|
||||
personnelApi,
|
||||
vehicleApi,
|
||||
type Carrier,
|
||||
type PasteCommitResult,
|
||||
type PasteConflictAction,
|
||||
type PasteConflictItem
|
||||
} from '@/api/pl'
|
||||
import { pickBxData, pickBxPageResult } from '@/utils/http/bx'
|
||||
import { usePlRemoteCarrierOptions } from '@/composables/usePlRemoteOptions'
|
||||
import { pickBxPageResult } from '@/utils/http/bx'
|
||||
import {
|
||||
PL_PASTE_SAMPLE_TEXT,
|
||||
parsePlCustomerVehicleText,
|
||||
@@ -162,7 +163,7 @@
|
||||
|
||||
const emit = defineEmits<{
|
||||
'update:visible': [boolean]
|
||||
done: []
|
||||
done: [result?: PasteCommitResult]
|
||||
}>()
|
||||
|
||||
const innerVisible = computed({
|
||||
@@ -171,7 +172,7 @@
|
||||
})
|
||||
|
||||
const dialogTitle = computed(() =>
|
||||
props.mode === 'vehicle-bundle' ? '粘贴识别(整车套装)' : '粘贴识别(以人为主)'
|
||||
props.mode === 'vehicle-bundle' ? '快速识别创建(整车套装)' : '快速识别创建(以人为主)'
|
||||
)
|
||||
|
||||
const rawText = ref(PL_PASTE_SAMPLE_TEXT)
|
||||
@@ -338,7 +339,7 @@
|
||||
const carrier = carrierOptions.value.find(c => c.id === carrierId.value)
|
||||
const needVehicle = showVehicleFields.value
|
||||
|
||||
await pasteRecognizeApi.commit({
|
||||
const res = await pasteRecognizeApi.commit({
|
||||
mode: props.mode === 'vehicle-bundle' ? 'vehicle_bundle' : 'personnel_first',
|
||||
createVehicle: needVehicle,
|
||||
vehicle: needVehicle
|
||||
@@ -370,7 +371,7 @@
|
||||
})
|
||||
|
||||
ElMessage.success('生成成功')
|
||||
emit('done')
|
||||
emit('done', pickBxData<PasteCommitResult>(res))
|
||||
innerVisible.value = false
|
||||
} catch (e: any) {
|
||||
const msg = e?.response?.data?.detail || e?.message || '生成失败'
|
||||
|
||||
@@ -0,0 +1,398 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-model="visible"
|
||||
:title="dialogTitle"
|
||||
width="1320px"
|
||||
align-center
|
||||
append-to-body
|
||||
destroy-on-close
|
||||
class="dialog-form-layout"
|
||||
modal-class="order-module-dialog-mask"
|
||||
style="backdrop-filter: none"
|
||||
:close-on-click-modal="false"
|
||||
@close="handleDialogClose"
|
||||
>
|
||||
<el-form
|
||||
ref="formRef"
|
||||
v-loading="dialogLoading"
|
||||
:model="formData"
|
||||
:rules="formRules"
|
||||
label-position="right"
|
||||
label-width="100px"
|
||||
class="pl-dialog-form"
|
||||
scroll-to-error
|
||||
:scroll-into-view-options="{ behavior: 'smooth', block: 'center' }"
|
||||
>
|
||||
<div class="form-grid-3">
|
||||
<el-form-item label="姓名" prop="personnelName">
|
||||
<el-input v-model="formData.personnelName" placeholder="请输入姓名" maxlength="100" />
|
||||
</el-form-item>
|
||||
<el-form-item label="手机号" prop="phoneNo">
|
||||
<el-input v-model="formData.phoneNo" placeholder="请输入手机号(选填)" maxlength="32" />
|
||||
</el-form-item>
|
||||
<el-form-item label="年龄" prop="age">
|
||||
<el-input-number
|
||||
v-model="formData.age"
|
||||
:min="0"
|
||||
:max="120"
|
||||
placeholder="年龄"
|
||||
style="width: 100%"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="身份证号" prop="idCardNo">
|
||||
<el-input
|
||||
v-model="formData.idCardNo"
|
||||
placeholder="请输入身份证号"
|
||||
maxlength="32"
|
||||
@input="handleIdCardNoInput"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="人员类型" prop="personnelType">
|
||||
<el-select v-model="formData.personnelType" placeholder="请选择人员类型">
|
||||
<el-option
|
||||
v-for="option in PL_PERSONNEL_TYPE_OPTIONS"
|
||||
:key="option.value"
|
||||
:label="option.label"
|
||||
:value="option.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="status">
|
||||
<el-select v-model="formData.status" placeholder="请选择">
|
||||
<el-option label="在职" value="1" />
|
||||
<el-option label="停用" value="0" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input
|
||||
v-model="formData.remark"
|
||||
type="textarea"
|
||||
:rows="2"
|
||||
placeholder="请输入备注"
|
||||
maxlength="512"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="人员照片" style="grid-column: 1 / -1">
|
||||
<AttachmentUploadField
|
||||
ref="photoUploadRef"
|
||||
v-model="formData.photoUrls"
|
||||
accept="image/*"
|
||||
folder="pl/personnel-photo"
|
||||
hint="支持图片,可上传多张;可拖拽或在此区域粘贴上传"
|
||||
/>
|
||||
</el-form-item>
|
||||
</div>
|
||||
|
||||
<PlCertFormList
|
||||
ref="certFormListRef"
|
||||
v-model="certList"
|
||||
title="人员证书"
|
||||
upload-folder="pl/personnel-cert"
|
||||
:cert-name-options="certNameOptions"
|
||||
:required-cert-names="requiredPersonnelCertNames"
|
||||
:strip-managed-cert-names="PL_PERSONNEL_BOTH_REQUIRED_CERT_NAMES"
|
||||
layout="table"
|
||||
@id-card-recognized="handleIdCardRecognized"
|
||||
/>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="visible = false">
|
||||
<el-icon><Close /></el-icon>取消
|
||||
</el-button>
|
||||
<el-button type="primary" :loading="submitLoading" @click="handleSubmit">
|
||||
<el-icon><Check /></el-icon>确定
|
||||
</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { Check, Close } from '@element-plus/icons-vue'
|
||||
import { personnelApi, type CertRow, type PersonnelDetail } from '@/api/pl'
|
||||
import AttachmentUploadField from '@/components/business/attachment-upload-field/index.vue'
|
||||
import PlCertFormList from '@/components/business/pl-cert-form-list/index.vue'
|
||||
import { pickBxData } from '@/utils/http/bx'
|
||||
import { calcAgeFromChineseIdCard } from '@/utils/id-card'
|
||||
import {
|
||||
collectRequiredCertSlotErrors,
|
||||
formatRequiredCertErrors,
|
||||
mergeCertListWithRequiredSlots
|
||||
} from '@/utils/pl-cert-slots'
|
||||
import {
|
||||
getRequiredPersonnelCertNamesByType,
|
||||
PL_PERSONNEL_BOTH_REQUIRED_CERT_NAMES,
|
||||
PL_PERSONNEL_TYPE_OPTIONS
|
||||
} from '@/utils/pl-personnel-cert'
|
||||
|
||||
type CertListItem = CertRow & { _key?: string }
|
||||
type CertFormListRef = InstanceType<typeof PlCertFormList>
|
||||
|
||||
const props = defineProps<{
|
||||
modelValue: boolean
|
||||
/** carrier=三方,self=山峡;锁定归属,不可切换 */
|
||||
affiliation: 'carrier' | 'self'
|
||||
/** 有值则为编辑,无值则为新增 */
|
||||
personnelId?: string | null
|
||||
}>()
|
||||
|
||||
const emit = defineEmits<{
|
||||
'update:modelValue': [value: boolean]
|
||||
saved: [payload: { mode: 'create' | 'edit'; personnel: PersonnelDetail }]
|
||||
}>()
|
||||
|
||||
const visible = computed({
|
||||
get: () => props.modelValue,
|
||||
set: (value: boolean) => emit('update:modelValue', value)
|
||||
})
|
||||
|
||||
const isCarrierPersonnel = computed(() => props.affiliation === 'carrier')
|
||||
const isEdit = computed(() => Boolean(props.personnelId))
|
||||
|
||||
const dialogTitle = computed(() => {
|
||||
if (isEdit.value) {
|
||||
return isCarrierPersonnel.value ? '编辑人员' : '编辑山峡人员'
|
||||
}
|
||||
return isCarrierPersonnel.value ? '新增人员' : '新增山峡人员'
|
||||
})
|
||||
|
||||
const submitLoading = ref(false)
|
||||
const dialogLoading = ref(false)
|
||||
const formRef = ref()
|
||||
const photoUploadRef = ref<InstanceType<typeof AttachmentUploadField>>()
|
||||
const certList = ref<CertListItem[]>([])
|
||||
const certFormListRef = ref<CertFormListRef>()
|
||||
|
||||
const certNameOptions = [
|
||||
'身份证',
|
||||
'驾驶证',
|
||||
'驾驶员从业资格证',
|
||||
'押运员从业资格证',
|
||||
'押运员证',
|
||||
'健康证'
|
||||
]
|
||||
|
||||
const formData = reactive({
|
||||
id: '',
|
||||
personnelName: '',
|
||||
phoneNo: '',
|
||||
age: null as number | null,
|
||||
idCardNo: '',
|
||||
personnelType: '',
|
||||
personnelAffiliation: props.affiliation,
|
||||
status: '1',
|
||||
remark: '',
|
||||
photoUrls: ''
|
||||
})
|
||||
|
||||
const requiredPersonnelCertNames = computed(() =>
|
||||
isCarrierPersonnel.value
|
||||
? []
|
||||
: formData.personnelType
|
||||
? getRequiredPersonnelCertNamesByType(formData.personnelType)
|
||||
: []
|
||||
)
|
||||
|
||||
const formRules = {
|
||||
personnelName: [{ required: true, message: '请输入姓名', trigger: 'blur' }],
|
||||
personnelType: [{ required: true, message: '请选择人员类型', trigger: 'change' }],
|
||||
status: [{ required: true, message: '请选择状态', trigger: 'change' }]
|
||||
}
|
||||
|
||||
function mergePersonnelCertSlots(list: CertListItem[]) {
|
||||
if (isCarrierPersonnel.value || !formData.personnelType) return list
|
||||
return mergeCertListWithRequiredSlots(
|
||||
list,
|
||||
getRequiredPersonnelCertNamesByType(formData.personnelType),
|
||||
{ stripManagedNames: PL_PERSONNEL_BOTH_REQUIRED_CERT_NAMES }
|
||||
)
|
||||
}
|
||||
|
||||
function resetCertList() {
|
||||
certList.value = []
|
||||
certFormListRef.value?.clearUploadRefs()
|
||||
}
|
||||
|
||||
function resetForm() {
|
||||
Object.assign(formData, {
|
||||
id: '',
|
||||
personnelName: '',
|
||||
phoneNo: '',
|
||||
age: null,
|
||||
idCardNo: '',
|
||||
personnelType: '',
|
||||
personnelAffiliation: props.affiliation,
|
||||
status: '1',
|
||||
remark: '',
|
||||
photoUrls: ''
|
||||
})
|
||||
resetCertList()
|
||||
}
|
||||
|
||||
function applyAgeFromIdCard(idCard?: string) {
|
||||
const age = calcAgeFromChineseIdCard(idCard)
|
||||
if (age != null) {
|
||||
formData.age = age
|
||||
}
|
||||
}
|
||||
|
||||
function handleIdCardNoInput(val: string | number) {
|
||||
applyAgeFromIdCard(String(val ?? ''))
|
||||
}
|
||||
|
||||
function handleIdCardRecognized(certNo: string) {
|
||||
if (certNo) {
|
||||
formData.idCardNo = certNo
|
||||
applyAgeFromIdCard(certNo)
|
||||
}
|
||||
}
|
||||
|
||||
function validateCerts(): boolean {
|
||||
if (!formData.personnelType) {
|
||||
ElMessage.warning('请选择人员类型')
|
||||
return false
|
||||
}
|
||||
if (!isCarrierPersonnel.value) {
|
||||
const errors = collectRequiredCertSlotErrors(certList.value, requiredPersonnelCertNames.value)
|
||||
if (errors.length) {
|
||||
ElMessage.warning(formatRequiredCertErrors(errors))
|
||||
return false
|
||||
}
|
||||
}
|
||||
for (const cert of certList.value) {
|
||||
if (!cert._required && !cert.certName?.trim()) {
|
||||
ElMessage.warning('其他证书名称不能为空')
|
||||
return false
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
async function loadDetail(personnelId: string) {
|
||||
dialogLoading.value = true
|
||||
try {
|
||||
const res = await personnelApi.get(personnelId)
|
||||
const detail = pickBxData<PersonnelDetail>(res)
|
||||
Object.assign(formData, {
|
||||
id: detail.id,
|
||||
personnelName: detail.personnelName,
|
||||
phoneNo: detail.phoneNo || '',
|
||||
age: detail.age ?? null,
|
||||
idCardNo: detail.idCardNo || '',
|
||||
personnelType: detail.personnelType || 'both',
|
||||
personnelAffiliation: props.affiliation,
|
||||
status: detail.status,
|
||||
remark: detail.remark || '',
|
||||
photoUrls: detail.photoUrls || ''
|
||||
})
|
||||
certList.value = mergePersonnelCertSlots(
|
||||
(detail.certList || []).map(c => ({
|
||||
_key: c.id || c.certId || `cert-${Math.random().toString(36).slice(2, 10)}`,
|
||||
certId: c.id || c.certId,
|
||||
certName: c.certName,
|
||||
certNo: c.certNo,
|
||||
expireDate: c.expireDate,
|
||||
remindDays: c.remindDays ?? 30,
|
||||
attachmentUrls: c.attachmentUrls || ''
|
||||
}))
|
||||
)
|
||||
certFormListRef.value?.refreshRequiredSlots?.()
|
||||
} catch {
|
||||
ElMessage.error('加载人员详情失败')
|
||||
visible.value = false
|
||||
} finally {
|
||||
dialogLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
async function openDialog() {
|
||||
resetForm()
|
||||
if (props.personnelId) {
|
||||
await loadDetail(props.personnelId)
|
||||
}
|
||||
}
|
||||
|
||||
async function handleSubmit() {
|
||||
const valid = await formRef.value.validate().catch(() => false)
|
||||
if (!valid || !validateCerts()) return
|
||||
if (certFormListRef.value?.hasUploading?.()) {
|
||||
ElMessage.warning('证书附件上传中,请稍候')
|
||||
return
|
||||
}
|
||||
if (photoUploadRef.value?.hasUploading?.()) {
|
||||
ElMessage.warning('附件上传中,请稍候')
|
||||
return
|
||||
}
|
||||
|
||||
submitLoading.value = true
|
||||
try {
|
||||
const payload = {
|
||||
personnelName: formData.personnelName.trim(),
|
||||
phoneNo: formData.phoneNo || undefined,
|
||||
age: formData.age ?? undefined,
|
||||
idCardNo: formData.idCardNo || undefined,
|
||||
personnelType: formData.personnelType,
|
||||
personnelAffiliation: props.affiliation,
|
||||
status: formData.status,
|
||||
remark: formData.remark || undefined,
|
||||
photoUrls: formData.photoUrls ?? '',
|
||||
certList: certList.value.map(c => ({
|
||||
certId: c.certId,
|
||||
certName: c.certName.trim(),
|
||||
certNo: c.certNo || undefined,
|
||||
expireDate: c.expireDate || undefined,
|
||||
remindDays: c.remindDays ?? 30,
|
||||
attachmentUrls: c.attachmentUrls || undefined
|
||||
}))
|
||||
}
|
||||
|
||||
if (isEdit.value) {
|
||||
await personnelApi.update(formData.id, payload)
|
||||
const res = await personnelApi.get(formData.id)
|
||||
const detail = pickBxData<PersonnelDetail>(res)
|
||||
if (!detail?.id) {
|
||||
ElMessage.error('编辑成功但未返回人员信息')
|
||||
return
|
||||
}
|
||||
ElMessage.success('编辑成功')
|
||||
emit('saved', { mode: 'edit', personnel: detail })
|
||||
} else {
|
||||
const res = await personnelApi.create(payload)
|
||||
const detail = pickBxData<PersonnelDetail>(res)
|
||||
if (!detail?.id) {
|
||||
ElMessage.error('新增成功但未返回人员信息')
|
||||
return
|
||||
}
|
||||
ElMessage.success('新增成功')
|
||||
emit('saved', { mode: 'create', personnel: detail })
|
||||
}
|
||||
visible.value = false
|
||||
} finally {
|
||||
submitLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
function handleDialogClose() {
|
||||
formRef.value?.resetFields()
|
||||
resetCertList()
|
||||
}
|
||||
|
||||
watch(
|
||||
() => formData.personnelType,
|
||||
() => {
|
||||
if (!formData.personnelType) return
|
||||
certList.value = mergePersonnelCertSlots(certList.value)
|
||||
certFormListRef.value?.refreshRequiredSlots?.()
|
||||
}
|
||||
)
|
||||
|
||||
watch(
|
||||
() => props.modelValue,
|
||||
async open => {
|
||||
if (open) {
|
||||
await openDialog()
|
||||
}
|
||||
}
|
||||
)
|
||||
</script>
|
||||
@@ -0,0 +1,371 @@
|
||||
<template>
|
||||
<div class="pl-personnel-library-select-panel">
|
||||
<div class="list-toolbar">
|
||||
<div class="list-toolbar-row pl-personnel-library-select-toolbar">
|
||||
<el-input
|
||||
v-model="keyword"
|
||||
class="pl-personnel-library-select-search"
|
||||
placeholder="搜索姓名或手机号"
|
||||
clearable
|
||||
@keyup.enter="handleSearch"
|
||||
@clear="handleSearch"
|
||||
>
|
||||
<template #prefix>
|
||||
<el-icon><Search /></el-icon>
|
||||
</template>
|
||||
</el-input>
|
||||
<el-button class="btn-main" type="primary" @click="handleOpenCreate">
|
||||
<el-icon><Plus /></el-icon>新增人员
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="list-body list-wrap dialog-list-body-only">
|
||||
<ListTable
|
||||
:table-key="`business-pl-personnel-library-${affiliation}`"
|
||||
class="list-table pl-personnel-library-select-table"
|
||||
:data="rows"
|
||||
v-loading="loading"
|
||||
stripe
|
||||
row-key="id"
|
||||
highlight-current-row
|
||||
:max-height="560"
|
||||
empty-text="暂无人员"
|
||||
@row-dblclick="handleView"
|
||||
>
|
||||
<el-table-column
|
||||
type="index"
|
||||
label="序号"
|
||||
min-width="68"
|
||||
align="center"
|
||||
header-align="center"
|
||||
:index="index => (pagination.page - 1) * pagination.pageSize + index + 1"
|
||||
/>
|
||||
<el-table-column prop="personnelName" label="姓名" min-width="140" show-overflow-tooltip>
|
||||
<template #default="{ row }">
|
||||
<el-link type="primary" @click="handleView(row)">{{ row.personnelName }}</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="人员类型" min-width="120" align="center" header-align="center">
|
||||
<template #default="{ row }">
|
||||
<el-tag :type="getPersonnelTypeTagType(row.personnelType)" size="small">
|
||||
{{ getPersonnelTypeLabel(row.personnelType) }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="phoneNo"
|
||||
label="手机号"
|
||||
min-width="130"
|
||||
align="center"
|
||||
header-align="center"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column label="身份证号" min-width="180" align="center" header-align="center">
|
||||
<template #default="{ row }">
|
||||
{{ maskIdCard(row.idCardNo) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态" min-width="90" align="center" header-align="center">
|
||||
<template #default="{ row }">
|
||||
<el-tag :type="row.status === '1' ? 'success' : 'info'" size="small">
|
||||
{{ row.status === '1' ? '在职' : '停用' }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
min-width="180"
|
||||
align="center"
|
||||
header-align="center"
|
||||
fixed="right"
|
||||
class-name="col-actions"
|
||||
>
|
||||
<template #default="{ row }">
|
||||
<el-button link type="primary" @click="handleView(row)">
|
||||
<el-icon><View /></el-icon>查看
|
||||
</el-button>
|
||||
<el-button link type="primary" @click="handleOpenEdit(row)">
|
||||
<el-icon><Edit /></el-icon>编辑
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</ListTable>
|
||||
|
||||
<ListPagination
|
||||
v-show="pagination.total > 0"
|
||||
:total="pagination.total"
|
||||
v-model:page="pagination.page"
|
||||
v-model:limit="pagination.pageSize"
|
||||
@pagination="fetchList"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<PlPersonnelFormDialog
|
||||
v-model="formVisible"
|
||||
:affiliation="affiliation"
|
||||
:personnel-id="editingId"
|
||||
@saved="handleFormSaved"
|
||||
/>
|
||||
|
||||
<SystemViewDialog
|
||||
v-model:visible="viewVisible"
|
||||
:title="viewDialogTitle"
|
||||
:icon="User"
|
||||
:meta="viewHeroMeta"
|
||||
:sections="viewSections"
|
||||
:loading="viewLoading"
|
||||
width="1040px"
|
||||
modal-class="order-module-dialog-mask"
|
||||
append-to-body
|
||||
>
|
||||
<template v-if="viewDetail" #hero-actions>
|
||||
<el-button class="btn-main" type="primary" @click="handleEditFromView">
|
||||
<el-icon><Edit /></el-icon>编辑
|
||||
</el-button>
|
||||
</template>
|
||||
<template #photo>
|
||||
<AttachmentUploadField
|
||||
v-if="viewDetail?.photoUrls"
|
||||
:model-value="viewDetail.photoUrls"
|
||||
disabled
|
||||
accept="image/*"
|
||||
/>
|
||||
<span v-else>—</span>
|
||||
</template>
|
||||
<template #certs>
|
||||
<PlCertViewList :cert-list="viewDetail?.certList || []" layout="table" />
|
||||
</template>
|
||||
</SystemViewDialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { Edit, Plus, Search, User, View } from '@element-plus/icons-vue'
|
||||
import { personnelApi, type Personnel, type PersonnelDetail } from '@/api/pl'
|
||||
import AttachmentUploadField from '@/components/business/attachment-upload-field/index.vue'
|
||||
import PlCertViewList from '@/components/business/pl-cert-view-list/index.vue'
|
||||
import PlPersonnelFormDialog from '@/components/business/pl-personnel-form-dialog/index.vue'
|
||||
import SystemViewDialog, { type ViewSection } from '@/components/business/system-view-dialog/index.vue'
|
||||
import ListPagination from '@/components/ListPagination/index.vue'
|
||||
import { pickBxData, pickBxPageResult } from '@/utils/http/bx'
|
||||
import { formatDateTime } from '@/utils/format'
|
||||
import {
|
||||
getPersonnelAffiliationLabel,
|
||||
getPersonnelAffiliationTagType,
|
||||
getPersonnelCertMissingSuffix,
|
||||
getPersonnelTypeLabel,
|
||||
getPersonnelTypeTagType
|
||||
} from '@/utils/pl-personnel-cert'
|
||||
import { DEFAULT_LIST_PAGE_SIZE } from '@/utils/table/tableConfig'
|
||||
|
||||
const props = defineProps<{
|
||||
affiliation: 'carrier' | 'self'
|
||||
}>()
|
||||
|
||||
const isCarrierPersonnel = computed(() => props.affiliation === 'carrier')
|
||||
|
||||
const loading = ref(false)
|
||||
const keyword = ref('')
|
||||
const rows = ref<Personnel[]>([])
|
||||
|
||||
const pagination = reactive({
|
||||
page: 1,
|
||||
pageSize: DEFAULT_LIST_PAGE_SIZE,
|
||||
total: 0
|
||||
})
|
||||
|
||||
const formVisible = ref(false)
|
||||
const editingId = ref<string | null>(null)
|
||||
const viewVisible = ref(false)
|
||||
const viewLoading = ref(false)
|
||||
const viewDetail = ref<PersonnelDetail | null>(null)
|
||||
|
||||
function maskIdCard(idCard: string | undefined) {
|
||||
if (!idCard || idCard.length < 8) return idCard || '—'
|
||||
return idCard.slice(0, 4) + '**********' + idCard.slice(-4)
|
||||
}
|
||||
|
||||
function getExpireTagType(dateStr: string | undefined) {
|
||||
if (!dateStr) return 'info'
|
||||
const expDate = new Date(dateStr)
|
||||
const today = new Date()
|
||||
const diffDays = Math.ceil((expDate.getTime() - today.getTime()) / (1000 * 60 * 60 * 24))
|
||||
if (diffDays <= 0) return 'danger'
|
||||
if (diffDays <= 30) return 'warning'
|
||||
return 'success'
|
||||
}
|
||||
|
||||
const viewHeroMeta = computed(() => {
|
||||
if (!viewDetail.value) return ''
|
||||
return [viewDetail.value.phoneNo || '未填写手机号', viewDetail.value.status === '1' ? '在职' : '停用'].join(
|
||||
' · '
|
||||
)
|
||||
})
|
||||
|
||||
const viewDialogTitle = computed(() => {
|
||||
const name = viewDetail.value?.personnelName || '人员详情'
|
||||
if (!viewDetail.value || isCarrierPersonnel.value) return name
|
||||
return (
|
||||
name +
|
||||
getPersonnelCertMissingSuffix(viewDetail.value.certList || [], undefined, viewDetail.value.personnelType)
|
||||
)
|
||||
})
|
||||
|
||||
const viewSections = computed<ViewSection[]>(() => {
|
||||
const d = viewDetail.value
|
||||
if (!d) return []
|
||||
|
||||
return [
|
||||
{
|
||||
title: '基本信息',
|
||||
fields: [
|
||||
{ label: '姓名', value: d.personnelName },
|
||||
{ label: '手机号', value: d.phoneNo || '—' },
|
||||
{
|
||||
label: '人员归属',
|
||||
value: getPersonnelAffiliationLabel(d.personnelAffiliation),
|
||||
tagType: getPersonnelAffiliationTagType(d.personnelAffiliation)
|
||||
},
|
||||
{
|
||||
label: '人员类型',
|
||||
value: getPersonnelTypeLabel(d.personnelType),
|
||||
tagType: getPersonnelTypeTagType(d.personnelType)
|
||||
},
|
||||
{ label: '年龄', value: d.age ?? '—' },
|
||||
{ label: '身份证号', value: maskIdCard(d.idCardNo) },
|
||||
{
|
||||
label: '状态',
|
||||
value: d.status === '1' ? '在职' : '停用',
|
||||
tagType: d.status === '1' ? 'success' : 'info'
|
||||
},
|
||||
{
|
||||
label: '最近到期',
|
||||
value: d.nearestExpireDate || '—',
|
||||
tagType: d.nearestExpireDate ? getExpireTagType(d.nearestExpireDate) : undefined
|
||||
},
|
||||
{ label: '创建时间', value: formatDateTime(d.createTime) },
|
||||
{ label: '更新时间', value: formatDateTime(d.updateTime) },
|
||||
{ label: '备注', value: d.remark || '—', span: 'full' }
|
||||
],
|
||||
fieldLayout: 'table',
|
||||
tableMode: 'triple'
|
||||
},
|
||||
{
|
||||
title: '人员照片',
|
||||
fields: [],
|
||||
slot: 'photo'
|
||||
},
|
||||
{
|
||||
title: `人员证书${
|
||||
viewDetail.value && !isCarrierPersonnel.value
|
||||
? getPersonnelCertMissingSuffix(viewDetail.value.certList || [], undefined, viewDetail.value.personnelType)
|
||||
: ''
|
||||
}`,
|
||||
fields: [],
|
||||
slot: 'certs'
|
||||
}
|
||||
]
|
||||
})
|
||||
|
||||
async function fetchList() {
|
||||
loading.value = true
|
||||
try {
|
||||
const res = await personnelApi.list({
|
||||
q: keyword.value.trim() || undefined,
|
||||
personnelAffiliation: props.affiliation,
|
||||
page: pagination.page,
|
||||
pageSize: pagination.pageSize
|
||||
})
|
||||
const { list, total } = pickBxPageResult<Personnel>(res)
|
||||
rows.value = list
|
||||
pagination.total = total
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
function handleSearch() {
|
||||
pagination.page = 1
|
||||
fetchList()
|
||||
}
|
||||
|
||||
function resetPanel() {
|
||||
keyword.value = ''
|
||||
pagination.page = 1
|
||||
pagination.pageSize = DEFAULT_LIST_PAGE_SIZE
|
||||
pagination.total = 0
|
||||
rows.value = []
|
||||
formVisible.value = false
|
||||
editingId.value = null
|
||||
viewVisible.value = false
|
||||
viewDetail.value = null
|
||||
}
|
||||
|
||||
function handleOpenCreate() {
|
||||
editingId.value = null
|
||||
formVisible.value = true
|
||||
}
|
||||
|
||||
function handleOpenEdit(row: Personnel) {
|
||||
editingId.value = row.id
|
||||
formVisible.value = true
|
||||
}
|
||||
|
||||
function handleFormSaved() {
|
||||
formVisible.value = false
|
||||
editingId.value = null
|
||||
fetchList()
|
||||
}
|
||||
|
||||
async function handleView(row: Personnel) {
|
||||
viewVisible.value = true
|
||||
viewLoading.value = true
|
||||
viewDetail.value = null
|
||||
try {
|
||||
const res = await personnelApi.get(row.id)
|
||||
viewDetail.value = pickBxData<PersonnelDetail>(res)
|
||||
} catch {
|
||||
viewVisible.value = false
|
||||
ElMessage.error('加载人员详情失败')
|
||||
} finally {
|
||||
viewLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
function handleEditFromView() {
|
||||
if (!viewDetail.value) return
|
||||
viewVisible.value = false
|
||||
handleOpenEdit(viewDetail.value)
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
resetPanel,
|
||||
fetchList
|
||||
})
|
||||
|
||||
onMounted(() => {
|
||||
fetchList()
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.pl-personnel-library-select-panel {
|
||||
.list-toolbar {
|
||||
margin-bottom: 0;
|
||||
padding: 10px 0 12px;
|
||||
}
|
||||
}
|
||||
|
||||
.pl-personnel-library-select-toolbar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.pl-personnel-library-select-search {
|
||||
width: 280px;
|
||||
max-width: 100%;
|
||||
}
|
||||
</style>
|
||||
@@ -98,6 +98,8 @@
|
||||
<el-select
|
||||
v-model="formData.supplierId"
|
||||
class="customer-select-row__select"
|
||||
name="pl-plan-supplier-customer"
|
||||
autocomplete="new-password"
|
||||
filterable
|
||||
remote
|
||||
clearable
|
||||
@@ -189,6 +191,8 @@
|
||||
<el-select
|
||||
v-model="formData.customerId"
|
||||
class="customer-select-row__select"
|
||||
name="pl-plan-demander-customer"
|
||||
autocomplete="new-password"
|
||||
filterable
|
||||
remote
|
||||
clearable
|
||||
@@ -278,6 +282,12 @@
|
||||
>
|
||||
<el-icon><FolderOpened /></el-icon>从车辆库选择
|
||||
</el-button>
|
||||
<el-button
|
||||
class="pl-plan-vehicle-with-library__btn btn-ghost"
|
||||
@click="pasteRecognizeVisible = true"
|
||||
>
|
||||
<el-icon><DocumentCopy /></el-icon>三方人车快速创建
|
||||
</el-button>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="运输公司" class="pl-plan-vehicle-carrier-row__carrier">
|
||||
@@ -457,11 +467,16 @@
|
||||
v-model="carrierLibraryVisible"
|
||||
@select="handleCarrierLibrarySelect"
|
||||
/>
|
||||
<PlPasteRecognizeDialog
|
||||
v-model:visible="pasteRecognizeVisible"
|
||||
mode="vehicle-bundle"
|
||||
@done="handlePasteRecognizeDone"
|
||||
/>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { Check, Close, FolderOpened, Plus, Search, Van } from '@element-plus/icons-vue'
|
||||
import { Check, Close, DocumentCopy, FolderOpened, Plus, Search, Van } from '@element-plus/icons-vue'
|
||||
import {
|
||||
planApi,
|
||||
transportApi,
|
||||
@@ -470,6 +485,7 @@ import {
|
||||
type PlanProduct,
|
||||
type PlanUpdatePayload,
|
||||
type Carrier,
|
||||
type PasteCommitResult,
|
||||
type Vehicle,
|
||||
type VehiclePersonnelRow
|
||||
} from '@/api/pl'
|
||||
@@ -485,6 +501,7 @@ import PlVehicleSummaryStrip from '@/components/business/pl-vehicle-summary-stri
|
||||
import PlVehicleViewDialog from '@/components/business/pl-vehicle-view-dialog/index.vue'
|
||||
import PlVehicleLibrarySelectDialog from '@/components/business/pl-vehicle-library-select-dialog/index.vue'
|
||||
import PlCarrierLibrarySelectDialog from '@/components/business/pl-carrier-library-select-dialog/index.vue'
|
||||
import PlPasteRecognizeDialog from '@/components/business/pl-paste-recognize-dialog/index.vue'
|
||||
import PlAddressWithLibrary from '@/components/business/pl-address-with-library/index.vue'
|
||||
import PlPlanFormProductTable from './PlPlanFormProductTable.vue'
|
||||
import {
|
||||
@@ -585,6 +602,7 @@ const productSelectorVisible = ref(false)
|
||||
const vehicleViewVisible = ref(false)
|
||||
const vehicleLibraryVisible = ref(false)
|
||||
const carrierLibraryVisible = ref(false)
|
||||
const pasteRecognizeVisible = ref(false)
|
||||
const vehicleLoading = ref(false)
|
||||
const basicFormRef = ref()
|
||||
const {
|
||||
@@ -1274,6 +1292,11 @@ async function handleVehicleLibrarySelect(vehicle: Vehicle) {
|
||||
}
|
||||
}
|
||||
|
||||
async function handlePasteRecognizeDone(result?: PasteCommitResult) {
|
||||
if (!result?.vehicleId) return
|
||||
await handleVehicleLibrarySelect({ id: result.vehicleId } as Vehicle)
|
||||
}
|
||||
|
||||
async function handleCarrierLibrarySelect(carrier: Carrier) {
|
||||
if (!carrier?.id) return
|
||||
await ensureSelectedCarrierOption(carrier.id)
|
||||
|
||||
@@ -15,147 +15,176 @@
|
||||
<div class="panel dialog-list-panel">
|
||||
<el-tabs v-model="activeTab" class="pl-vehicle-library-select-tabs" @tab-change="handleTabChange">
|
||||
<el-tab-pane label="三方车辆" name="carrier" />
|
||||
<el-tab-pane label="自有车辆" name="self" />
|
||||
<el-tab-pane label="三方驾押人员" name="carrier_personnel" />
|
||||
<el-tab-pane label="山峡车辆" name="self" />
|
||||
<el-tab-pane label="山峡驾押人员" name="self_personnel" />
|
||||
</el-tabs>
|
||||
|
||||
<div class="list-toolbar">
|
||||
<div class="list-toolbar-row pl-vehicle-library-select-toolbar">
|
||||
<el-input
|
||||
v-model="keyword"
|
||||
class="pl-vehicle-library-select-search"
|
||||
placeholder="搜索车牌号"
|
||||
clearable
|
||||
@keyup.enter="handleSearch"
|
||||
@clear="handleSearch"
|
||||
>
|
||||
<template #prefix>
|
||||
<el-icon><Search /></el-icon>
|
||||
</template>
|
||||
</el-input>
|
||||
<el-button class="btn-main" type="primary" @click="handleOpenCreate">
|
||||
<el-icon><Plus /></el-icon>新增车辆
|
||||
</el-button>
|
||||
<template v-if="isVehicleTab">
|
||||
<div class="list-toolbar">
|
||||
<div class="list-toolbar-row pl-vehicle-library-select-toolbar">
|
||||
<el-input
|
||||
v-model="keyword"
|
||||
class="pl-vehicle-library-select-search"
|
||||
placeholder="搜索车牌号"
|
||||
clearable
|
||||
@keyup.enter="handleSearch"
|
||||
@clear="handleSearch"
|
||||
>
|
||||
<template #prefix>
|
||||
<el-icon><Search /></el-icon>
|
||||
</template>
|
||||
</el-input>
|
||||
<el-button
|
||||
v-if="activeTab === 'carrier'"
|
||||
class="btn-ghost"
|
||||
@click="pasteRecognizeVisible = true"
|
||||
>
|
||||
<el-icon><DocumentCopy /></el-icon>三方人车快速创建
|
||||
</el-button>
|
||||
<el-button class="btn-main" type="primary" @click="handleOpenCreate">
|
||||
<el-icon><Plus /></el-icon>新增车辆
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="list-body list-wrap dialog-list-body-only">
|
||||
<ListTable
|
||||
table-key="business-pl-vehicle-library-select-dialog"
|
||||
class="list-table pl-vehicle-library-select-table"
|
||||
:data="rows"
|
||||
v-loading="loading"
|
||||
stripe
|
||||
row-key="id"
|
||||
highlight-current-row
|
||||
:max-height="560"
|
||||
empty-text="暂无可用车辆"
|
||||
@row-dblclick="handleConfirm"
|
||||
>
|
||||
<el-table-column
|
||||
type="index"
|
||||
label="序号"
|
||||
min-width="68"
|
||||
align="center"
|
||||
header-align="center"
|
||||
:index="index => (pagination.page - 1) * pagination.pageSize + index + 1"
|
||||
/>
|
||||
<el-table-column prop="licensePlate" label="车牌号" min-width="120" show-overflow-tooltip>
|
||||
<template #default="{ row }">
|
||||
<el-link type="primary" @click="handleConfirm(row)">{{ row.licensePlate }}</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="trailerNo"
|
||||
label="挂车号"
|
||||
min-width="110"
|
||||
align="center"
|
||||
header-align="center"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
label="车辆状态"
|
||||
min-width="100"
|
||||
align="center"
|
||||
header-align="center"
|
||||
<div class="list-body list-wrap dialog-list-body-only">
|
||||
<ListTable
|
||||
table-key="business-pl-vehicle-library-select-dialog"
|
||||
class="list-table pl-vehicle-library-select-table"
|
||||
:data="rows"
|
||||
v-loading="loading"
|
||||
stripe
|
||||
row-key="id"
|
||||
highlight-current-row
|
||||
:max-height="560"
|
||||
empty-text="暂无可用车辆"
|
||||
@row-dblclick="handleConfirm"
|
||||
>
|
||||
<template #default="{ row }">
|
||||
<el-tag :type="getPlVehicleStatusTagType(row.vehicleStatus)" size="small">
|
||||
{{ getPlVehicleStatusLabel(row.vehicleStatus) }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="loadCapacity"
|
||||
label="载重(吨)"
|
||||
min-width="100"
|
||||
align="center"
|
||||
header-align="center"
|
||||
/>
|
||||
<el-table-column
|
||||
v-if="activeTab === 'carrier'"
|
||||
prop="carrierName"
|
||||
label="承运商"
|
||||
min-width="140"
|
||||
align="center"
|
||||
header-align="center"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="personnelSummary"
|
||||
label="关联人员摘要"
|
||||
min-width="160"
|
||||
align="center"
|
||||
header-align="center"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<template #default="{ row }">
|
||||
{{ normalizePlPersonnelSummaryDisplay(row.personnelSummary) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
min-width="160"
|
||||
align="center"
|
||||
header-align="center"
|
||||
fixed="right"
|
||||
class-name="col-actions"
|
||||
>
|
||||
<template #default="{ row }">
|
||||
<el-button link type="primary" @click="handleOpenEdit(row)">
|
||||
<el-icon><Edit /></el-icon>编辑
|
||||
</el-button>
|
||||
<el-button link type="primary" @click="handleConfirm(row)">
|
||||
<el-icon><Select /></el-icon>选择
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</ListTable>
|
||||
<el-table-column
|
||||
type="index"
|
||||
label="序号"
|
||||
min-width="68"
|
||||
align="center"
|
||||
header-align="center"
|
||||
:index="index => (pagination.page - 1) * pagination.pageSize + index + 1"
|
||||
/>
|
||||
<el-table-column prop="licensePlate" label="车牌号" min-width="120" show-overflow-tooltip>
|
||||
<template #default="{ row }">
|
||||
<el-link type="primary" @click="handleConfirm(row)">{{ row.licensePlate }}</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="trailerNo"
|
||||
label="挂车号"
|
||||
min-width="110"
|
||||
align="center"
|
||||
header-align="center"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column label="车辆状态" min-width="100" align="center" header-align="center">
|
||||
<template #default="{ row }">
|
||||
<el-tag :type="getPlVehicleStatusTagType(row.vehicleStatus)" size="small">
|
||||
{{ getPlVehicleStatusLabel(row.vehicleStatus) }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="loadCapacity"
|
||||
label="载重(吨)"
|
||||
min-width="100"
|
||||
align="center"
|
||||
header-align="center"
|
||||
/>
|
||||
<el-table-column
|
||||
v-if="activeTab === 'carrier'"
|
||||
prop="carrierName"
|
||||
label="承运商"
|
||||
min-width="140"
|
||||
align="center"
|
||||
header-align="center"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="personnelSummary"
|
||||
label="关联人员摘要"
|
||||
min-width="160"
|
||||
align="center"
|
||||
header-align="center"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<template #default="{ row }">
|
||||
{{ normalizePlPersonnelSummaryDisplay(row.personnelSummary) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
min-width="160"
|
||||
align="center"
|
||||
header-align="center"
|
||||
fixed="right"
|
||||
class-name="col-actions"
|
||||
>
|
||||
<template #default="{ row }">
|
||||
<el-button link type="primary" @click="handleOpenEdit(row)">
|
||||
<el-icon><Edit /></el-icon>编辑
|
||||
</el-button>
|
||||
<el-button link type="primary" @click="handleConfirm(row)">
|
||||
<el-icon><Select /></el-icon>选择
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</ListTable>
|
||||
|
||||
<ListPagination
|
||||
v-show="pagination.total > 0"
|
||||
:total="pagination.total"
|
||||
v-model:page="pagination.page"
|
||||
v-model:limit="pagination.pageSize"
|
||||
@pagination="fetchList"
|
||||
/>
|
||||
</div>
|
||||
<ListPagination
|
||||
v-show="pagination.total > 0"
|
||||
:total="pagination.total"
|
||||
v-model:page="pagination.page"
|
||||
v-model:limit="pagination.pageSize"
|
||||
@pagination="fetchList"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<PlPersonnelLibrarySelectPanel
|
||||
v-else-if="activeTab === 'carrier_personnel'"
|
||||
ref="carrierPersonnelPanelRef"
|
||||
affiliation="carrier"
|
||||
/>
|
||||
<PlPersonnelLibrarySelectPanel
|
||||
v-else-if="activeTab === 'self_personnel'"
|
||||
ref="selfPersonnelPanelRef"
|
||||
affiliation="self"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<PlVehicleFormDialog
|
||||
v-model="formVisible"
|
||||
:vehicle-type="activeTab"
|
||||
:vehicle-type="vehicleTab"
|
||||
:vehicle-id="editingId"
|
||||
@saved="handleFormSaved"
|
||||
/>
|
||||
<PlPasteRecognizeDialog
|
||||
v-model:visible="pasteRecognizeVisible"
|
||||
mode="vehicle-bundle"
|
||||
@done="handlePasteRecognizeDone"
|
||||
/>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { Edit, Plus, Search, Select } from '@element-plus/icons-vue'
|
||||
import { vehicleApi, type Vehicle, type VehicleDetail } from '@/api/pl/index'
|
||||
import { DocumentCopy, Edit, Plus, Search, Select } from '@element-plus/icons-vue'
|
||||
import {
|
||||
vehicleApi,
|
||||
type PasteCommitResult,
|
||||
type Vehicle,
|
||||
type VehicleDetail
|
||||
} from '@/api/pl/index'
|
||||
import PlPasteRecognizeDialog from '@/components/business/pl-paste-recognize-dialog/index.vue'
|
||||
import PlPersonnelLibrarySelectPanel from '@/components/business/pl-personnel-library-select-panel/index.vue'
|
||||
import PlVehicleFormDialog from '@/components/business/pl-vehicle-form-dialog/index.vue'
|
||||
import ListPagination from '@/components/ListPagination/index.vue'
|
||||
import { pickBxPageResult } from '@/utils/http/bx'
|
||||
import { pickBxData, pickBxPageResult } from '@/utils/http/bx'
|
||||
import {
|
||||
getPlVehicleStatusLabel,
|
||||
getPlVehicleStatusTagType,
|
||||
@@ -163,6 +192,7 @@ import {
|
||||
} from '@/utils/pl-display'
|
||||
import { DEFAULT_LIST_PAGE_SIZE } from '@/utils/table/tableConfig'
|
||||
|
||||
type LibraryTab = 'carrier' | 'carrier_personnel' | 'self' | 'self_personnel'
|
||||
type VehicleTab = 'carrier' | 'self'
|
||||
|
||||
const props = defineProps<{
|
||||
@@ -181,7 +211,7 @@ const innerVisible = computed({
|
||||
|
||||
const loading = ref(false)
|
||||
const keyword = ref('')
|
||||
const activeTab = ref<VehicleTab>('carrier')
|
||||
const activeTab = ref<LibraryTab>('carrier')
|
||||
const rows = ref<Vehicle[]>([])
|
||||
|
||||
const pagination = reactive({
|
||||
@@ -192,12 +222,19 @@ const pagination = reactive({
|
||||
|
||||
const formVisible = ref(false)
|
||||
const editingId = ref<string | null>(null)
|
||||
const pasteRecognizeVisible = ref(false)
|
||||
const carrierPersonnelPanelRef = ref<InstanceType<typeof PlPersonnelLibrarySelectPanel>>()
|
||||
const selfPersonnelPanelRef = ref<InstanceType<typeof PlPersonnelLibrarySelectPanel>>()
|
||||
|
||||
const isVehicleTab = computed(() => activeTab.value === 'carrier' || activeTab.value === 'self')
|
||||
const vehicleTab = computed<VehicleTab>(() => (activeTab.value === 'self' ? 'self' : 'carrier'))
|
||||
|
||||
async function fetchList() {
|
||||
if (!isVehicleTab.value) return
|
||||
loading.value = true
|
||||
try {
|
||||
const res = await vehicleApi.list({
|
||||
vehicleType: activeTab.value,
|
||||
vehicleType: vehicleTab.value,
|
||||
q: keyword.value.trim() || undefined,
|
||||
page: pagination.page,
|
||||
pageSize: pagination.pageSize
|
||||
@@ -215,11 +252,28 @@ function handleSearch() {
|
||||
fetchList()
|
||||
}
|
||||
|
||||
function refreshPersonnelPanel() {
|
||||
if (activeTab.value === 'carrier_personnel') {
|
||||
carrierPersonnelPanelRef.value?.resetPanel()
|
||||
carrierPersonnelPanelRef.value?.fetchList()
|
||||
} else if (activeTab.value === 'self_personnel') {
|
||||
selfPersonnelPanelRef.value?.resetPanel()
|
||||
selfPersonnelPanelRef.value?.fetchList()
|
||||
}
|
||||
}
|
||||
|
||||
function handleTabChange() {
|
||||
pagination.page = 1
|
||||
formVisible.value = false
|
||||
editingId.value = null
|
||||
fetchList()
|
||||
keyword.value = ''
|
||||
if (isVehicleTab.value) {
|
||||
fetchList()
|
||||
return
|
||||
}
|
||||
nextTick(() => {
|
||||
refreshPersonnelPanel()
|
||||
})
|
||||
}
|
||||
|
||||
function handleOpen() {
|
||||
@@ -254,6 +308,24 @@ function handleFormSaved(payload: { mode: 'create' | 'edit'; vehicle: VehicleDet
|
||||
fetchList()
|
||||
}
|
||||
|
||||
async function handlePasteRecognizeDone(result?: PasteCommitResult) {
|
||||
if (!result?.vehicleId) {
|
||||
fetchList()
|
||||
return
|
||||
}
|
||||
try {
|
||||
const res = await vehicleApi.get(result.vehicleId)
|
||||
const vehicle = pickBxData<VehicleDetail>(res)
|
||||
if (vehicle?.id) {
|
||||
handleConfirm(vehicle)
|
||||
return
|
||||
}
|
||||
} catch {
|
||||
// ignore
|
||||
}
|
||||
fetchList()
|
||||
}
|
||||
|
||||
function handleConfirm(row: Vehicle) {
|
||||
emit('select', row)
|
||||
innerVisible.value = false
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
/**
|
||||
* 从中国大陆 18 位身份证号解析出生日期并计算周岁年龄。
|
||||
* 号码不足 18 位或出生日期无效时返回 null(不强制校验码,便于输入过程中回填)。
|
||||
*/
|
||||
export function calcAgeFromChineseIdCard(idCard: string | null | undefined): number | null {
|
||||
if (!idCard || typeof idCard !== 'string') return null
|
||||
const s = idCard.trim().toUpperCase()
|
||||
if (!/^\d{17}[\dX]$/.test(s)) return null
|
||||
|
||||
const year = Number(s.slice(6, 10))
|
||||
const month = Number(s.slice(10, 12))
|
||||
const day = Number(s.slice(12, 14))
|
||||
if (!Number.isFinite(year) || !Number.isFinite(month) || !Number.isFinite(day)) return null
|
||||
if (month < 1 || month > 12 || day < 1 || day > 31) return null
|
||||
|
||||
const birth = new Date(year, month - 1, day)
|
||||
if (
|
||||
birth.getFullYear() !== year ||
|
||||
birth.getMonth() !== month - 1 ||
|
||||
birth.getDate() !== day
|
||||
) {
|
||||
return null
|
||||
}
|
||||
|
||||
const today = new Date()
|
||||
let age = today.getFullYear() - year
|
||||
const beforeBirthday =
|
||||
today.getMonth() < month - 1 ||
|
||||
(today.getMonth() === month - 1 && today.getDate() < day)
|
||||
if (beforeBirthday) age -= 1
|
||||
|
||||
if (age < 0 || age > 120) return null
|
||||
return age
|
||||
}
|
||||
@@ -8,14 +8,14 @@
|
||||
* 姓名保留姓、手机保留前 3 后 4、身份证保留前 6 后 4、车牌保留省份简称后打码
|
||||
*/
|
||||
export const PL_PASTE_SAMPLE_TEXT = [
|
||||
'皖****** 皖******',
|
||||
'车牌:皖******皖******挂',
|
||||
'核载:34 吨',
|
||||
'驾驶员:张**',
|
||||
'身份证号:340000********0000',
|
||||
'手机号:138****0000',
|
||||
'身份证:340000********0000',
|
||||
'押运员:李**',
|
||||
'电话:139****0000',
|
||||
'身份证:340000********0000'
|
||||
'身份证号:340000********0000',
|
||||
'电话:139****0000'
|
||||
].join('\n')
|
||||
|
||||
export interface PlPastePersonnelDraft {
|
||||
@@ -38,8 +38,47 @@ export interface PlPasteRecognizeResult {
|
||||
warnings: string[]
|
||||
}
|
||||
|
||||
const PLATE_LINE =
|
||||
/^[\u4e00-\u9fa5A-Z]{1,2}[A-Z0-9]+(?:\s+[\u4e00-\u9fa5A-Z]{1,2}[A-Z0-9]+)?$/i
|
||||
/** 普通蓝牌 7 位、挂车带「挂」、新能源约 8 位;每次新建避免 lastIndex 残留 */
|
||||
function plateTokenRe() {
|
||||
return /[\u4e00-\u9fa5][A-HJ-NP-Z][A-HJ-NP-Z0-9]{4,6}挂?/gi
|
||||
}
|
||||
|
||||
const PLATE_LINE_LABEL = /^(?:车牌号|车牌|主车号|主车|号牌)[::]\s*/i
|
||||
const TRAILER_LINE_LABEL = /^(?:挂车号|挂车)[::]\s*/i
|
||||
const ID_CARD_LINE = /^(?:身份证号码|身份证号|身份证|证件号)[::]?\s*([0-9Xx]{15,18})$/
|
||||
|
||||
function extractPlates(text: string): string[] {
|
||||
const compact = text.replace(/\s+/g, '').toUpperCase()
|
||||
const found = compact.match(plateTokenRe()) || []
|
||||
return found
|
||||
}
|
||||
|
||||
function remainderAfterPlates(text: string, plates: string[]): string {
|
||||
let rest = text.replace(/\s+/g, '').toUpperCase()
|
||||
for (const plate of plates) {
|
||||
rest = rest.replace(plate.toUpperCase(), '')
|
||||
}
|
||||
return rest.replace(/[,,、;;\-_//]/g, '')
|
||||
}
|
||||
|
||||
function applyPlatesToVehicle(
|
||||
vehicle: PlPasteVehicleDraft | undefined,
|
||||
plates: string[]
|
||||
): PlPasteVehicleDraft {
|
||||
const next = vehicle || { licensePlate: '' }
|
||||
if (plates[0] && !next.licensePlate) {
|
||||
next.licensePlate = plates[0]
|
||||
}
|
||||
if (plates[1] && !next.trailerNo) {
|
||||
next.trailerNo = plates[1]
|
||||
} else if (plates.length === 1 && plates[0].endsWith('挂') && next.licensePlate && !next.trailerNo) {
|
||||
next.trailerNo = plates[0]
|
||||
if (next.licensePlate === plates[0]) {
|
||||
next.licensePlate = ''
|
||||
}
|
||||
}
|
||||
return next
|
||||
}
|
||||
|
||||
export function parsePlCustomerVehicleText(raw: string): PlPasteRecognizeResult {
|
||||
const warnings: string[] = []
|
||||
@@ -54,13 +93,20 @@ export function parsePlCustomerVehicleText(raw: string): PlPasteRecognizeResult
|
||||
let section: 'none' | 'driver' | 'escort' = 'none'
|
||||
|
||||
for (const line of lines) {
|
||||
const normalizedPlateLine = line.replace(/\s+/g, ' ')
|
||||
if (!vehicle && PLATE_LINE.test(normalizedPlateLine)) {
|
||||
const parts = normalizedPlateLine.split(/\s+/).filter(Boolean)
|
||||
vehicle = {
|
||||
licensePlate: parts[0] || '',
|
||||
trailerNo: parts[1] || undefined
|
||||
if (TRAILER_LINE_LABEL.test(line)) {
|
||||
const plates = extractPlates(line.replace(TRAILER_LINE_LABEL, ''))
|
||||
if (plates.length) {
|
||||
if (!vehicle) vehicle = { licensePlate: '' }
|
||||
vehicle.trailerNo = plates[0]
|
||||
continue
|
||||
}
|
||||
}
|
||||
|
||||
const plateLabeled = PLATE_LINE_LABEL.test(line)
|
||||
const plateSource = plateLabeled ? line.replace(PLATE_LINE_LABEL, '') : line
|
||||
const plates = extractPlates(plateSource)
|
||||
if (plates.length && (plateLabeled || !remainderAfterPlates(plateSource, plates))) {
|
||||
vehicle = applyPlatesToVehicle(vehicle, plates)
|
||||
continue
|
||||
}
|
||||
|
||||
@@ -103,7 +149,7 @@ export function parsePlCustomerVehicleText(raw: string): PlPasteRecognizeResult
|
||||
}
|
||||
}
|
||||
|
||||
const idCard = line.match(/^身份证[::]?\s*([0-9Xx]{15,18})$/)
|
||||
const idCard = line.match(ID_CARD_LINE)
|
||||
if (idCard) {
|
||||
const no = idCard[1].toUpperCase()
|
||||
if (section === 'driver' && driver) {
|
||||
|
||||
@@ -1,19 +1,32 @@
|
||||
<template>
|
||||
<div class="attachment-upload">
|
||||
<div
|
||||
ref="rootRef"
|
||||
class="attachment-upload"
|
||||
:class="{ 'attachment-upload--drag-over': isDragOver && !disabled }"
|
||||
:tabindex="disabled ? undefined : 0"
|
||||
@mouseenter="handlePointerEnter"
|
||||
@mouseleave="handlePointerLeave"
|
||||
@focusin="handlePointerEnter"
|
||||
@focusout="handleFocusOut"
|
||||
@dragenter="handleDragEnter"
|
||||
@dragleave="handleDragLeave"
|
||||
@dragover="handleDragOver"
|
||||
@drop="handleDrop"
|
||||
>
|
||||
<div class="attachment-list">
|
||||
<el-upload
|
||||
v-if="!disabled"
|
||||
ref="uploadRef"
|
||||
:http-request="handleAttachmentUpload"
|
||||
:auto-upload="false"
|
||||
:show-file-list="false"
|
||||
:before-upload="handleBeforeUpload"
|
||||
:disabled="disabled"
|
||||
multiple
|
||||
:limit="limit"
|
||||
:accept="accept"
|
||||
@change="handleAttachmentChange"
|
||||
>
|
||||
<div class="upload-card">
|
||||
<el-icon :size="28" color="#1ca851"><Plus /></el-icon>
|
||||
<span class="upload-card-text">上传附件</span>
|
||||
<span class="upload-card-text">{{ isDragOver ? '松开上传' : '上传附件' }}</span>
|
||||
</div>
|
||||
</el-upload>
|
||||
<div
|
||||
@@ -110,8 +123,8 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { nextTick, ref } from 'vue'
|
||||
import type { UploadInstance, UploadRequestOptions } from 'element-plus'
|
||||
import { nextTick, onBeforeUnmount, onMounted, ref } from 'vue'
|
||||
import type { UploadFile, UploadInstance } from 'element-plus'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { Plus, Document, Loading, Download, Delete, ZoomIn } from '@element-plus/icons-vue'
|
||||
import { fetchUploadAttachment } from '@/api/admin'
|
||||
@@ -138,14 +151,18 @@ const props = withDefaults(
|
||||
{
|
||||
limit: 10,
|
||||
accept: 'image/*,.pdf,.doc,.docx',
|
||||
hint: '支持上传图片、PDF、Word文档等,最多10个文件',
|
||||
hint: '支持上传图片、PDF、Word文档等,最多10个文件;可拖拽或在此区域粘贴上传',
|
||||
disabled: false
|
||||
}
|
||||
)
|
||||
|
||||
const attachmentList = defineModel<ContractAttachmentItem[]>({ default: () => [] })
|
||||
|
||||
const rootRef = ref<HTMLElement>()
|
||||
const uploadRef = ref<UploadInstance>()
|
||||
const isPointerInside = ref(false)
|
||||
const isDragOver = ref(false)
|
||||
let dragEnterDepth = 0
|
||||
const attachmentPreviewVisible = ref(false)
|
||||
const attachmentPreviewFile = ref<ContractAttachmentItem | null>(null)
|
||||
const attachmentPreviewSrc = ref('')
|
||||
@@ -207,35 +224,59 @@ const getShortFileName = (fileName: string) => {
|
||||
return name.substring(0, 8) + '...' + ext
|
||||
}
|
||||
|
||||
const handleBeforeUpload = (file: File) => {
|
||||
const isValidType = /\.(jpg|jpeg|png|gif|bmp|webp|pdf|doc|docx|txt|mp4|avi|mov)$/i.test(file.name)
|
||||
if (!isValidType) {
|
||||
const isFileAccepted = (file: File) => {
|
||||
return /\.(jpg|jpeg|png|gif|bmp|webp|pdf|doc|docx|txt|mp4|avi|mov)$/i.test(file.name)
|
||||
}
|
||||
|
||||
const normalizeIncomingFile = (file: File, index = 0) => {
|
||||
if (file.name && file.name.trim()) return file
|
||||
const ext = (file.type || '').split('/')[1] || 'bin'
|
||||
return new File([file], `paste-${Date.now()}-${index}.${ext}`, {
|
||||
type: file.type || 'application/octet-stream'
|
||||
})
|
||||
}
|
||||
|
||||
const collectClipboardFiles = (event: ClipboardEvent) => {
|
||||
const files: File[] = []
|
||||
const items = event.clipboardData?.items
|
||||
if (items?.length) {
|
||||
Array.from(items).forEach((item, index) => {
|
||||
if (item.kind !== 'file') return
|
||||
const file = item.getAsFile()
|
||||
if (file) files.push(normalizeIncomingFile(file, index))
|
||||
})
|
||||
}
|
||||
if (!files.length && event.clipboardData?.files?.length) {
|
||||
Array.from(event.clipboardData.files).forEach((file, index) => {
|
||||
files.push(normalizeIncomingFile(file, index))
|
||||
})
|
||||
}
|
||||
return files
|
||||
}
|
||||
|
||||
const uploadRawFile = async (rawFile: File) => {
|
||||
if (attachmentList.value.length >= props.limit) {
|
||||
ElMessage.warning(`最多上传 ${props.limit} 个附件`)
|
||||
return false
|
||||
}
|
||||
if (!isFileAccepted(rawFile)) {
|
||||
$modal.msgError('上传文件格式不正确!')
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
const handleAttachmentUpload = async (options: UploadRequestOptions) => {
|
||||
if (attachmentList.value.length >= props.limit) {
|
||||
ElMessage.warning(`最多上传 ${props.limit} 个附件`)
|
||||
options.onError?.(new Error('超出数量限制'))
|
||||
return
|
||||
}
|
||||
|
||||
const uid = `upload-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`
|
||||
const localPreview = isCrmImageFile({ name: options.file.name })
|
||||
? URL.createObjectURL(options.file)
|
||||
const localPreview = isCrmImageFile({ name: rawFile.name })
|
||||
? URL.createObjectURL(rawFile)
|
||||
: undefined
|
||||
attachmentList.value.push({
|
||||
uid,
|
||||
name: options.file.name,
|
||||
name: rawFile.name,
|
||||
status: 'uploading',
|
||||
category: 'other',
|
||||
localPreview
|
||||
})
|
||||
|
||||
const formData = buildAttachmentUploadFormData(options.file, { bizType: props.bizType })
|
||||
const formData = buildAttachmentUploadFormData(rawFile, { bizType: props.bizType })
|
||||
|
||||
try {
|
||||
const res = await fetchUploadAttachment(formData)
|
||||
@@ -246,11 +287,11 @@ const handleAttachmentUpload = async (options: UploadRequestOptions) => {
|
||||
patchAttachmentFile(uid, {
|
||||
ossId: fileUrl,
|
||||
url: fileUrl,
|
||||
name: res?.fileName || options.file.name,
|
||||
name: res?.fileName || rawFile.name,
|
||||
status: 'success'
|
||||
})
|
||||
options.onSuccess?.(res)
|
||||
$modal.msgSuccess('文件上传成功')
|
||||
return true
|
||||
} catch (error: any) {
|
||||
const failed = attachmentList.value.find((item) => item.uid === uid)
|
||||
if (failed?.localPreview) {
|
||||
@@ -258,13 +299,95 @@ const handleAttachmentUpload = async (options: UploadRequestOptions) => {
|
||||
}
|
||||
attachmentList.value = attachmentList.value.filter((item) => item.uid !== uid)
|
||||
$modal.msgError(error?.message || '文件上传失败')
|
||||
options.onError?.(error)
|
||||
} finally {
|
||||
await nextTick()
|
||||
uploadRef.value?.clearFiles()
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
const uploadFiles = async (files: File[]) => {
|
||||
if (!files.length || props.disabled) return
|
||||
for (const file of files) {
|
||||
if (attachmentList.value.length >= props.limit) {
|
||||
ElMessage.warning(`最多上传 ${props.limit} 个附件`)
|
||||
break
|
||||
}
|
||||
await uploadRawFile(file)
|
||||
}
|
||||
}
|
||||
|
||||
const handleAttachmentChange = async (uploadFile: UploadFile) => {
|
||||
const rawFile = uploadFile.raw
|
||||
if (!rawFile) return
|
||||
await uploadRawFile(rawFile)
|
||||
await nextTick()
|
||||
uploadRef.value?.clearFiles()
|
||||
}
|
||||
|
||||
const handlePointerEnter = () => {
|
||||
if (props.disabled) return
|
||||
isPointerInside.value = true
|
||||
}
|
||||
|
||||
const handlePointerLeave = () => {
|
||||
isPointerInside.value = false
|
||||
}
|
||||
|
||||
const handleFocusOut = (event: FocusEvent) => {
|
||||
const next = event.relatedTarget as Node | null
|
||||
if (next && rootRef.value?.contains(next)) return
|
||||
isPointerInside.value = false
|
||||
}
|
||||
|
||||
const handleDragEnter = (event: DragEvent) => {
|
||||
if (props.disabled) return
|
||||
event.preventDefault()
|
||||
dragEnterDepth += 1
|
||||
isDragOver.value = true
|
||||
isPointerInside.value = true
|
||||
}
|
||||
|
||||
const handleDragLeave = (event: DragEvent) => {
|
||||
if (props.disabled) return
|
||||
event.preventDefault()
|
||||
dragEnterDepth = Math.max(0, dragEnterDepth - 1)
|
||||
if (dragEnterDepth === 0) {
|
||||
isDragOver.value = false
|
||||
}
|
||||
}
|
||||
|
||||
const handleDragOver = (event: DragEvent) => {
|
||||
if (props.disabled) return
|
||||
event.preventDefault()
|
||||
if (event.dataTransfer) {
|
||||
event.dataTransfer.dropEffect = 'copy'
|
||||
}
|
||||
}
|
||||
|
||||
const handleDrop = async (event: DragEvent) => {
|
||||
if (props.disabled) return
|
||||
event.preventDefault()
|
||||
dragEnterDepth = 0
|
||||
isDragOver.value = false
|
||||
const files = Array.from(event.dataTransfer?.files || [])
|
||||
await uploadFiles(files)
|
||||
}
|
||||
|
||||
const handleDocumentPaste = async (event: ClipboardEvent) => {
|
||||
if (props.disabled || !isPointerInside.value) return
|
||||
const files = collectClipboardFiles(event)
|
||||
if (!files.length) return
|
||||
event.preventDefault()
|
||||
event.stopPropagation()
|
||||
await uploadFiles(files)
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
document.addEventListener('paste', handleDocumentPaste, true)
|
||||
})
|
||||
|
||||
onBeforeUnmount(() => {
|
||||
document.removeEventListener('paste', handleDocumentPaste, true)
|
||||
})
|
||||
|
||||
const handleFilePreview = async (file: ContractAttachmentItem) => {
|
||||
if (!canPreviewAttachment(file)) {
|
||||
$modal.msgWarning('文件尚未上传完成')
|
||||
@@ -330,6 +453,33 @@ defineExpose({ hasUploading })
|
||||
<style scoped lang="scss">
|
||||
.attachment-upload {
|
||||
width: 100%;
|
||||
outline: none;
|
||||
border-radius: 8px;
|
||||
|
||||
&:focus-visible {
|
||||
box-shadow: 0 0 0 2px rgba(28, 168, 81, 0.25);
|
||||
}
|
||||
|
||||
&--drag-over {
|
||||
.attachment-list {
|
||||
border-radius: 8px;
|
||||
background: rgba(16, 185, 129, 0.06);
|
||||
outline: 2px dashed #1ca851;
|
||||
outline-offset: 4px;
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
.upload-card {
|
||||
border-color: #1ca851;
|
||||
border-style: solid;
|
||||
background: #e6f8ed;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.el-upload) {
|
||||
display: inline-flex;
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
|
||||
.attachment-list {
|
||||
|
||||
@@ -205,7 +205,14 @@
|
||||
<DictTag dict-type="crm_product_unit" :value="scope.row.unit" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="数量" prop="quantity" min-width="72" align="right" />
|
||||
<el-table-column label="数量" prop="quantity" min-width="96" align="right">
|
||||
<template #default="scope">
|
||||
<span v-if="isFrameworkContractType(detailContract.contractType)" class="text-muted">
|
||||
{{ displayFrameworkQuantity(scope.row, true) }}
|
||||
</span>
|
||||
<span v-else>{{ scope.row.quantity }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-if="!hideProductPrice"
|
||||
label="含税单价(元)"
|
||||
@@ -214,7 +221,9 @@
|
||||
align="right"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span v-if="isFrameworkContractType(detailContract.contractType)" class="text-muted">随行就市</span>
|
||||
<span v-if="isFrameworkContractType(detailContract.contractType)" class="text-muted">
|
||||
{{ displayFrameworkMoney(scope.row, 'price', true) }}
|
||||
</span>
|
||||
<span v-else class="money-display">¥{{ parseFloat(scope.row.price || 0).toFixed(2) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -226,7 +235,9 @@
|
||||
align="right"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span v-if="isFrameworkContractType(detailContract.contractType)" class="text-muted">随行就市</span>
|
||||
<span v-if="isFrameworkContractType(detailContract.contractType)" class="text-muted">
|
||||
{{ displayFrameworkMoney(scope.row, 'subtotal', true) }}
|
||||
</span>
|
||||
<span v-else class="money-display">¥{{ parseFloat(scope.row.subtotal || 0).toFixed(2) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -238,7 +249,9 @@
|
||||
align="right"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span v-if="isFrameworkContractType(detailContract.contractType)" class="text-muted">随行就市</span>
|
||||
<span v-if="isFrameworkContractType(detailContract.contractType)" class="text-muted">
|
||||
{{ displayFrameworkMoney(scope.row, 'taxAmount', true) }}
|
||||
</span>
|
||||
<span v-else class="money-display">¥{{ parseFloat(scope.row.taxAmount || 0).toFixed(2) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -843,6 +856,7 @@
|
||||
import { ref, reactive, computed, onMounted, defineAsyncComponent, nextTick } from 'vue';
|
||||
import { useRouter } from 'vue-router';
|
||||
import { isFrameworkContractType, isContractEditableStatus, getContractReeditConfirmMessage } from '../contractType'
|
||||
import { displayFrameworkMoney, displayFrameworkQuantity } from '../frameworkProductPricing'
|
||||
import {
|
||||
CircleCheck,
|
||||
CircleClose,
|
||||
|
||||
@@ -438,19 +438,86 @@
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="quantity" width="110">
|
||||
<el-table-column prop="quantity" width="130">
|
||||
<template #header> <span style="color: #f56c6c">*</span> 数量</template>
|
||||
<template #default="scope">
|
||||
<el-input v-model="scope.row.quantity" placeholder="数量" @input="handleQuantityChange(scope.row)" clearable size="small" />
|
||||
<div v-if="isFrameworkContract" class="framework-pricing-cell">
|
||||
<template v-if="isFrameworkQuantityCustomerDemand(scope.row)">
|
||||
<span class="text-muted framework-pricing-cell__label">{{ FRAMEWORK_QUANTITY_LABEL }}</span>
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
class="framework-pricing-cell__action"
|
||||
@click="handleEnableFrameworkQuantityFixed(scope.row)"
|
||||
>
|
||||
填数字
|
||||
</el-button>
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-input
|
||||
v-model="scope.row.quantity"
|
||||
placeholder="数量"
|
||||
@input="handleQuantityChange(scope.row)"
|
||||
clearable
|
||||
size="small"
|
||||
/>
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
class="framework-pricing-cell__action"
|
||||
@click="handleResetFrameworkQuantity(scope.row)"
|
||||
>
|
||||
按客户需求
|
||||
</el-button>
|
||||
</template>
|
||||
</div>
|
||||
<el-input
|
||||
v-else
|
||||
v-model="scope.row.quantity"
|
||||
placeholder="数量"
|
||||
@input="handleQuantityChange(scope.row)"
|
||||
clearable
|
||||
size="small"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="price" width="130">
|
||||
<el-table-column prop="price" width="150">
|
||||
<template #header>
|
||||
<span v-if="isFrameworkContract">含税单价(元)</span>
|
||||
<span v-else><span style="color: #f56c6c">*</span> 含税单价(元)</span>
|
||||
</template>
|
||||
<template #default="scope">
|
||||
<span v-if="isFrameworkContract" class="text-muted">随行就市</span>
|
||||
<div v-if="isFrameworkContract" class="framework-pricing-cell">
|
||||
<template v-if="isFrameworkPriceMarket(scope.row)">
|
||||
<span class="text-muted framework-pricing-cell__label">{{ FRAMEWORK_PRICE_LABEL }}</span>
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
class="framework-pricing-cell__action"
|
||||
@click="handleEnableFrameworkPriceFixed(scope.row)"
|
||||
>
|
||||
填数字
|
||||
</el-button>
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-input
|
||||
v-model="scope.row.price"
|
||||
placeholder="含税单价"
|
||||
@input="handlePriceChange(scope.row)"
|
||||
clearable
|
||||
size="small"
|
||||
class="money-field-input"
|
||||
/>
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
class="framework-pricing-cell__action"
|
||||
@click="handleResetFrameworkPrice(scope.row)"
|
||||
>
|
||||
随行就市
|
||||
</el-button>
|
||||
</template>
|
||||
</div>
|
||||
<el-input
|
||||
v-else
|
||||
v-model="scope.row.price"
|
||||
@@ -462,19 +529,45 @@
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="subtotal" width="130" align="right">
|
||||
<el-table-column prop="subtotal" width="150" align="right">
|
||||
<template #header>
|
||||
<span v-if="isFrameworkContract">含税总价(元)</span>
|
||||
<span v-else><span style="color: #f56c6c">*</span> 含税总价(元)</span>
|
||||
</template>
|
||||
<template #default="scope">
|
||||
<span v-if="isFrameworkContract" class="text-muted">随行就市</span>
|
||||
<div v-if="isFrameworkContract" class="framework-pricing-cell framework-pricing-cell--money">
|
||||
<template v-if="isFrameworkPriceMarket(scope.row)">
|
||||
<span class="text-muted framework-pricing-cell__label">{{ FRAMEWORK_PRICE_LABEL }}</span>
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
class="framework-pricing-cell__action"
|
||||
@click="handleEnableFrameworkPriceFixed(scope.row)"
|
||||
>
|
||||
填数字
|
||||
</el-button>
|
||||
</template>
|
||||
<span v-else class="money-display">{{ formatFrameworkMoneyDisplay(scope.row, 'subtotal') }}</span>
|
||||
</div>
|
||||
<span v-else class="money-display">¥{{ parseFloat(scope.row.subtotal || 0).toFixed(2) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="税费(元)" prop="taxAmount" min-width="90" align="right">
|
||||
<el-table-column label="税费(元)" prop="taxAmount" min-width="120" align="right">
|
||||
<template #default="scope">
|
||||
<span v-if="isFrameworkContract" class="text-muted">随行就市</span>
|
||||
<div v-if="isFrameworkContract" class="framework-pricing-cell framework-pricing-cell--money">
|
||||
<template v-if="isFrameworkPriceMarket(scope.row)">
|
||||
<span class="text-muted framework-pricing-cell__label">{{ FRAMEWORK_PRICE_LABEL }}</span>
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
class="framework-pricing-cell__action"
|
||||
@click="handleEnableFrameworkPriceFixed(scope.row)"
|
||||
>
|
||||
填数字
|
||||
</el-button>
|
||||
</template>
|
||||
<span v-else class="money-display">{{ formatFrameworkMoneyDisplay(scope.row, 'taxAmount') }}</span>
|
||||
</div>
|
||||
<span v-else class="money-display">¥{{ parseFloat(scope.row.taxAmount || 0).toFixed(2) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -542,7 +635,7 @@
|
||||
</el-button>
|
||||
<div class="panel dialog-list-panel mb-3">
|
||||
<div class="list-body list-wrap dialog-list-body-only">
|
||||
<ListTable table-key="crm-contract-components-contract-form-dialog-2" :data="prod.priceTiers || []" class="list-table" stripe empty-text="暂无调价区间">
|
||||
<ListTable table-key="crm-contract-components-contract-form-dialog-2" :data="prod.priceTiers || []" class="list-table fw-price-tier-table" stripe empty-text="暂无调价区间">
|
||||
<el-table-column type="index" label="#" min-width="50" align="center" header-align="center" />
|
||||
<el-table-column label="开始日期" min-width="150">
|
||||
<template #default="scope">
|
||||
@@ -559,21 +652,16 @@
|
||||
<el-input v-model="scope.row.price" placeholder="含税单价" clearable size="small" class="money-field-input" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="调价函" min-width="300">
|
||||
<el-table-column label="调价函" min-width="220">
|
||||
<template #default="scope">
|
||||
<el-upload
|
||||
:http-request="(opt) => handleTierLetterUploadRequest(opt, pIdx, scope.$index)"
|
||||
list-type="picture-card"
|
||||
:limit="20"
|
||||
multiple
|
||||
<AttachmentUploadField
|
||||
:model-value="tierLetterCsv(scope.row)"
|
||||
accept="image/*"
|
||||
:file-list="scope.row._letterFiles || []"
|
||||
:on-remove="(file) => handleTierLetterRemove(file, pIdx, scope.$index)"
|
||||
class="tier-letter-upload"
|
||||
>
|
||||
<el-icon><Plus /></el-icon>
|
||||
</el-upload>
|
||||
<div class="text-muted" style="font-size: 11px; margin-top: 4px">支持多张图片</div>
|
||||
:limit="20"
|
||||
compact
|
||||
:biz-type="CRM_UPLOAD_BIZ_TYPE.CONTRACT_PRICE_LETTER"
|
||||
@update:model-value="syncTierLetterCsv(scope.row, $event)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" min-width="70" align="center" header-align="center" fixed="right" class-name="col-actions">
|
||||
@@ -733,7 +821,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive, computed, nextTick, watch } from 'vue'
|
||||
import type { FormInstance, FormItemRule, UploadRequestOptions } from 'element-plus'
|
||||
import type { FormInstance, FormItemRule } from 'element-plus'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import {
|
||||
getContract,
|
||||
@@ -744,6 +832,24 @@ import {
|
||||
type ContractProductPriceTierForm
|
||||
} from '@/api/crm/contract/index'
|
||||
import { isFrameworkContractType } from '../contractType'
|
||||
import {
|
||||
FRAMEWORK_QUANTITY_LABEL,
|
||||
FRAMEWORK_PRICE_LABEL,
|
||||
applyFrameworkDefaultsToProduct,
|
||||
createFrameworkProductPricingDefaults,
|
||||
enableFrameworkPriceFixed,
|
||||
enableFrameworkQuantityFixed,
|
||||
formatFrameworkMoneyDisplay,
|
||||
isBlankNumeric,
|
||||
isFrameworkPriceMarket,
|
||||
isFrameworkQuantityCustomerDemand,
|
||||
isNegativeNumeric,
|
||||
confirmZeroPricingIfNeeded,
|
||||
normalizeFrameworkProductPricing,
|
||||
prepareFrameworkProductForSubmit,
|
||||
resetFrameworkPriceToMarket,
|
||||
resetFrameworkQuantityToCustomerDemand
|
||||
} from '../frameworkProductPricing'
|
||||
import { useDictStore } from '@/store/modules/dict'
|
||||
import { useUserStore } from '@/store/modules/user'
|
||||
import { $modal } from '@/utils/modal'
|
||||
@@ -763,12 +869,12 @@ import {
|
||||
} from '@element-plus/icons-vue'
|
||||
import {
|
||||
buildUploadFileListFromField,
|
||||
fillAttachmentInfoCache,
|
||||
serializeContractAttachments,
|
||||
type ContractAttachmentItem
|
||||
} from '@/utils/crm-attachment'
|
||||
import { buildAttachmentUploadFormData, CRM_UPLOAD_BIZ_TYPE } from '@/utils/crm-upload'
|
||||
import { CRM_UPLOAD_BIZ_TYPE } from '@/utils/crm-upload'
|
||||
import ContractAttachmentPanel from './ContractAttachmentPanel.vue'
|
||||
import AttachmentUploadField from '@/components/business/attachment-upload-field/index.vue'
|
||||
import { getOpportunity } from '@/api/crm/opportunity'
|
||||
import { getQuote } from '@/api/crm/quote'
|
||||
import ProductSelector from '@/components/business/product-selector/index.vue'
|
||||
@@ -797,7 +903,7 @@ import {
|
||||
import type { CustomerVO, ContactVO } from '@/api/crm/customer/types'
|
||||
import { getDefaultInvoiceInfoByCustomerId } from '@/api/crm/invoiceInfo'
|
||||
import { listAllSupplierInfo, type SupplierInfoVO } from '@/api/crm/supplierInfo'
|
||||
import { fetchUploadAttachment, fetchUserOptions } from '@/api/admin'
|
||||
import { fetchUserOptions } from '@/api/admin'
|
||||
import { filterOwnerCandidates, findDefaultOwnerUser } from '@/utils/crm-owner-candidates'
|
||||
|
||||
interface UserVO {
|
||||
@@ -820,7 +926,7 @@ type ExtendedContractForm = ContractForm & {
|
||||
}
|
||||
|
||||
// 扩展产品类型,添加显示字段
|
||||
type PriceTierRow = ContractProductPriceTierForm & { _letterFiles?: any[] }
|
||||
type PriceTierRow = ContractProductPriceTierForm
|
||||
|
||||
type ExtendedContractProductForm = ContractProductForm & {
|
||||
productName?: string
|
||||
@@ -1408,30 +1514,28 @@ const loadContractDetail = async (id: number | string) => {
|
||||
}
|
||||
return {
|
||||
...t,
|
||||
letterOssIds: ids,
|
||||
_letterFiles: [] as any[]
|
||||
letterOssIds: ids
|
||||
}
|
||||
}),
|
||||
taxRate: product.taxRate || 6,
|
||||
taxAmount: 0,
|
||||
taxAmount: product.taxAmount ?? 0,
|
||||
packageSpec: product.packageSpec || '',
|
||||
deliveryMethod: product.deliveryMethod || ''
|
||||
}))
|
||||
|
||||
await enrichContractProductBrandMeta(form.value.products)
|
||||
|
||||
if (isFrameworkContractType(contractData.contractType)) {
|
||||
form.value.products.forEach((product: any) => {
|
||||
product.price = 0
|
||||
product.subtotal = 0
|
||||
product.taxAmount = 0
|
||||
})
|
||||
form.value.amount = 0
|
||||
await enrichFrameworkTierLetterFiles()
|
||||
} else {
|
||||
form.value.products.forEach((product: any) => {
|
||||
const isFw = isFrameworkContractType(contractData.contractType)
|
||||
form.value.products.forEach((product: any) => {
|
||||
normalizeFrameworkProductPricing(product, isFw)
|
||||
if (!isFw || !isFrameworkPriceMarket(product)) {
|
||||
calculateProductAmount(product)
|
||||
})
|
||||
}
|
||||
})
|
||||
if (isFw) {
|
||||
form.value.amount = 0
|
||||
} else {
|
||||
calculateTotalAmount()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1844,20 +1948,39 @@ const handleQuoteConfirm = (quote: QuoteVO) => {
|
||||
.confirm('是否要从报价单中带入产品明细?')
|
||||
.then(async () => {
|
||||
const isFw = isFrameworkContractType(form.value.contractType)
|
||||
form.value.products = quote.productList!.map((item: any) => ({
|
||||
productId: item.productId,
|
||||
productName: item.productName,
|
||||
productModel: item.model,
|
||||
categoryId: item.categoryId,
|
||||
categoryName: item.categoryName || '',
|
||||
unit: item.unit || '个',
|
||||
quantity: item.quantity || 1,
|
||||
price: isFw ? 0 : item.price || 0,
|
||||
unitPrice: isFw ? 0 : item.price || 0,
|
||||
taxRate: item.taxRate || 13,
|
||||
taxAmount: isFw ? 0 : item.taxAmount || 0,
|
||||
discount: item.discount || 0,
|
||||
subtotal: isFw ? 0 : item.subtotal || (item.quantity || 1) * (item.price || 0) * (1 - (item.discount || 0) / 100),
|
||||
form.value.products = quote.productList!.map((item: any) => {
|
||||
const hasQuotePrice = Number(item.price) > 0 || Number(item.subtotal) > 0
|
||||
const hasQuoteQty = Number(item.quantity) > 0
|
||||
const fwDefaults = createFrameworkProductPricingDefaults()
|
||||
return {
|
||||
productId: item.productId,
|
||||
productName: item.productName,
|
||||
productModel: item.model,
|
||||
categoryId: item.categoryId,
|
||||
categoryName: item.categoryName || '',
|
||||
unit: item.unit || '个',
|
||||
...(isFw
|
||||
? {
|
||||
...fwDefaults,
|
||||
quantityMode: hasQuoteQty ? 'fixed' : fwDefaults.quantityMode,
|
||||
quantity: hasQuoteQty ? item.quantity || 1 : 0,
|
||||
priceMode: hasQuotePrice ? 'fixed' : fwDefaults.priceMode,
|
||||
price: hasQuotePrice ? item.price || 0 : 0,
|
||||
taxAmount: hasQuotePrice ? item.taxAmount || 0 : 0,
|
||||
subtotal: hasQuotePrice
|
||||
? item.subtotal || (item.quantity || 1) * (item.price || 0) * (1 - (item.discount || 0) / 100)
|
||||
: 0
|
||||
}
|
||||
: {
|
||||
quantity: item.quantity || 1,
|
||||
price: item.price || 0,
|
||||
unitPrice: item.price || 0,
|
||||
taxAmount: item.taxAmount || 0,
|
||||
subtotal:
|
||||
item.subtotal || (item.quantity || 1) * (item.price || 0) * (1 - (item.discount || 0) / 100)
|
||||
}),
|
||||
taxRate: item.taxRate || 13,
|
||||
discount: item.discount || 0,
|
||||
packageSpec: item.packageSpec || '',
|
||||
deliveryMethod: item.deliveryMethod || '',
|
||||
deliveryDate: '',
|
||||
@@ -1869,8 +1992,10 @@ const handleQuoteConfirm = (quote: QuoteVO) => {
|
||||
brandName: item.brandName || undefined,
|
||||
brandOptions: [],
|
||||
priceTiers: isFw ? [] : undefined
|
||||
}))
|
||||
}
|
||||
})
|
||||
await enrichContractProductBrandMeta(form.value.products)
|
||||
form.value.products.forEach((p) => calculateProductAmount(p))
|
||||
calculateTotalAmount()
|
||||
})
|
||||
.catch(() => {})
|
||||
@@ -2131,13 +2256,17 @@ const handleContractTypeChange = (value: string) => {
|
||||
if (isFrameworkContractType(value)) {
|
||||
form.value.amount = 0
|
||||
form.value.products?.forEach((p) => {
|
||||
p.price = 0
|
||||
p.subtotal = 0
|
||||
p.taxAmount = 0
|
||||
applyFrameworkDefaultsToProduct(p)
|
||||
if (!p.priceTiers) {
|
||||
p.priceTiers = []
|
||||
}
|
||||
})
|
||||
} else {
|
||||
form.value.products?.forEach((p) => {
|
||||
normalizeFrameworkProductPricing(p, false)
|
||||
calculateProductAmount(p)
|
||||
})
|
||||
calculateTotalAmount()
|
||||
}
|
||||
if (value === 'purchase' && !isPartiesSwapped.value) {
|
||||
$modal
|
||||
@@ -2230,11 +2359,8 @@ const handleProductSelected = (products: any[]) => {
|
||||
categoryId: product.categoryId,
|
||||
categoryName: product.categoryName || '',
|
||||
unit: product.unit || '个',
|
||||
quantity: 1,
|
||||
price: isFw ? 0 : product.price || 0,
|
||||
...(isFw ? createFrameworkProductPricingDefaults() : { quantity: 1, price: product.price || 0, taxAmount: 0, subtotal: product.price || 0 }),
|
||||
taxRate: normalizeTaxRateDisplay(product.taxRate, 13),
|
||||
taxAmount: 0,
|
||||
subtotal: isFw ? 0 : product.price || 0,
|
||||
packageSpec: '',
|
||||
deliveryMethod: '',
|
||||
description: product.description || '',
|
||||
@@ -2386,9 +2512,32 @@ const handlePackageSpecChange = (product: ExtendedContractProductForm, value: st
|
||||
product.packageSpec = value
|
||||
}
|
||||
|
||||
const handleEnableFrameworkQuantityFixed = (row: ExtendedContractProductForm) => {
|
||||
enableFrameworkQuantityFixed(row)
|
||||
calculateProductAmount(row)
|
||||
calculateTotalAmount()
|
||||
}
|
||||
|
||||
const handleResetFrameworkQuantity = (row: ExtendedContractProductForm) => {
|
||||
resetFrameworkQuantityToCustomerDemand(row)
|
||||
calculateProductAmount(row)
|
||||
calculateTotalAmount()
|
||||
}
|
||||
|
||||
const handleEnableFrameworkPriceFixed = (row: ExtendedContractProductForm) => {
|
||||
enableFrameworkPriceFixed(row)
|
||||
calculateProductAmount(row)
|
||||
calculateTotalAmount()
|
||||
}
|
||||
|
||||
const handleResetFrameworkPrice = (row: ExtendedContractProductForm) => {
|
||||
resetFrameworkPriceToMarket(row)
|
||||
calculateTotalAmount()
|
||||
}
|
||||
|
||||
/** 计算产品金额 */
|
||||
const calculateProductAmount = (product: ExtendedContractProductForm) => {
|
||||
if (isFrameworkContractType(form.value.contractType)) {
|
||||
if (isFrameworkContractType(form.value.contractType) && isFrameworkPriceMarket(product)) {
|
||||
product.price = 0
|
||||
product.subtotal = 0
|
||||
product.taxAmount = 0
|
||||
@@ -2428,35 +2577,14 @@ const calculateTotalAmount = () => {
|
||||
form.value.amount = total
|
||||
}
|
||||
|
||||
/** 框架合同:批量解析调价函 URL */
|
||||
const enrichFrameworkTierLetterFiles = async () => {
|
||||
const products = form.value.products || []
|
||||
const idSet = new Set<string>()
|
||||
products.forEach((p: any) => {
|
||||
;(p.priceTiers || []).forEach((t: any) => {
|
||||
;(t.letterOssIds || []).forEach((id: string) => idSet.add(String(id)))
|
||||
})
|
||||
})
|
||||
if (idSet.size === 0) return
|
||||
/** 框架合同调价函:逗号分隔 URL 与 letterOssIds 互转 */
|
||||
const tierLetterCsv = (row: PriceTierRow) => (row.letterOssIds || []).join(',')
|
||||
|
||||
const cache = new Map<string, { name: string; url: string }>()
|
||||
fillAttachmentInfoCache([...idSet], cache)
|
||||
|
||||
products.forEach((p: any) => {
|
||||
;(p.priceTiers || []).forEach((t: any) => {
|
||||
const ids = t.letterOssIds || []
|
||||
t._letterFiles = ids.map((ossId: string, i: number) => {
|
||||
const info = cache.get(String(ossId))
|
||||
return {
|
||||
name: info?.name || `调价函${i + 1}`,
|
||||
ossId: String(ossId),
|
||||
url: info?.url || ossId,
|
||||
uid: `tier-prev-${t.id ?? 'n'}-${i}-${ossId}`,
|
||||
status: 'success'
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
const syncTierLetterCsv = (row: PriceTierRow, val: string) => {
|
||||
row.letterOssIds = String(val || '')
|
||||
.split(',')
|
||||
.map((item) => item.trim())
|
||||
.filter(Boolean)
|
||||
}
|
||||
|
||||
/** 组装提交/保存的产品明细 */
|
||||
@@ -2493,9 +2621,8 @@ const buildProductsPayload = () => {
|
||||
base.id = product.id
|
||||
}
|
||||
if (isFrameworkContractType(form.value.contractType)) {
|
||||
base.price = 0
|
||||
base.subtotal = 0
|
||||
base.taxAmount = 0
|
||||
const fwPricing = prepareFrameworkProductForSubmit(product)
|
||||
Object.assign(base, fwPricing)
|
||||
base.priceTiers = (product.priceTiers || [])
|
||||
.filter(
|
||||
(t: any) => t.startDate && t.endDate && t.price != null && t.price !== '' && Array.isArray(t.letterOssIds) && t.letterOssIds.length > 0
|
||||
@@ -2519,7 +2646,7 @@ const addPriceTierRow = (pIdx: number) => {
|
||||
if (!p.priceTiers) {
|
||||
p.priceTiers = []
|
||||
}
|
||||
p.priceTiers.push({ startDate: '', endDate: '', price: undefined, letterOssIds: [], _letterFiles: [] })
|
||||
p.priceTiers.push({ startDate: '', endDate: '', price: undefined, letterOssIds: [] })
|
||||
}
|
||||
|
||||
const removePriceTierRow = (pIdx: number, tIdx: number) => {
|
||||
@@ -2528,61 +2655,6 @@ const removePriceTierRow = (pIdx: number, tIdx: number) => {
|
||||
p.priceTiers.splice(tIdx, 1)
|
||||
}
|
||||
|
||||
const handleTierLetterUploadRequest = async (
|
||||
options: UploadRequestOptions,
|
||||
pIdx: number,
|
||||
tIdx: number
|
||||
) => {
|
||||
const p = form.value.products[pIdx]
|
||||
const tiers = p?.priceTiers
|
||||
if (!tiers || !tiers[tIdx]) {
|
||||
options.onError?.(new Error('调价区间不存在'))
|
||||
return
|
||||
}
|
||||
const row = tiers[tIdx]
|
||||
const formData = buildAttachmentUploadFormData(options.file, {
|
||||
bizType: CRM_UPLOAD_BIZ_TYPE.CONTRACT_PRICE_LETTER
|
||||
})
|
||||
try {
|
||||
const res = await fetchUploadAttachment(formData)
|
||||
const fileUrl = res?.fileUrl
|
||||
if (!fileUrl) {
|
||||
throw new Error('上传失败')
|
||||
}
|
||||
const oid = String(fileUrl)
|
||||
row.letterOssIds = row.letterOssIds || []
|
||||
row.letterOssIds.push(oid)
|
||||
row._letterFiles = row._letterFiles || []
|
||||
row._letterFiles.push({
|
||||
name: options.file.name || `调价函${row._letterFiles.length + 1}`,
|
||||
ossId: oid,
|
||||
url: oid,
|
||||
uid: options.file.uid,
|
||||
status: 'success'
|
||||
})
|
||||
options.onSuccess?.(res)
|
||||
} catch (error: any) {
|
||||
ElMessage.error(error?.message || '上传失败')
|
||||
options.onError?.(error)
|
||||
}
|
||||
}
|
||||
|
||||
const handleTierLetterRemove = (file: any, pIdx: number, tIdx: number) => {
|
||||
const p = form.value.products[pIdx]
|
||||
const tiers = p?.priceTiers
|
||||
if (!tiers || !tiers[tIdx]) return
|
||||
const row = tiers[tIdx]
|
||||
const uid = file.uid
|
||||
const idx = (row._letterFiles || []).findIndex((f: any) => f.uid === uid)
|
||||
if (idx >= 0) {
|
||||
const removed = row._letterFiles[idx]
|
||||
row._letterFiles.splice(idx, 1)
|
||||
if (removed?.ossId) {
|
||||
row.letterOssIds = (row.letterOssIds || []).filter((id: string) => String(id) !== String(removed.ossId))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** 处理附件数据 */
|
||||
const handleAttachmentData = async () => {
|
||||
attachmentList.value = buildUploadFileListFromField(
|
||||
@@ -2601,6 +2673,12 @@ const handleSaveDraft = async () => {
|
||||
return
|
||||
}
|
||||
|
||||
const confirmedZero = await confirmZeroPricingIfNeeded(
|
||||
form.value.products,
|
||||
isFrameworkContractType(form.value.contractType)
|
||||
)
|
||||
if (!confirmedZero) return
|
||||
|
||||
rebuildContractName()
|
||||
saveDraftLoading.value = true
|
||||
try {
|
||||
@@ -2690,8 +2768,23 @@ const handleSubmit = async () => {
|
||||
$modal.msgWarning(`第${rowNum}行产品的产品名称不能为空`)
|
||||
return false
|
||||
}
|
||||
if (!product.quantity || Number(product.quantity) <= 0) {
|
||||
$modal.msgWarning(`第${rowNum}行产品的数量不能为空且必须大于0`)
|
||||
const isFwRow = isFrameworkContractType(form.value.contractType)
|
||||
if (isFwRow) {
|
||||
if (product.quantityMode === 'fixed') {
|
||||
if (isBlankNumeric(product.quantity)) {
|
||||
$modal.msgWarning(`第${rowNum}行产品的数量不能为空`)
|
||||
return false
|
||||
}
|
||||
if (isNegativeNumeric(product.quantity)) {
|
||||
$modal.msgWarning(`第${rowNum}行产品的数量不能为负数`)
|
||||
return false
|
||||
}
|
||||
}
|
||||
} else if (isBlankNumeric(product.quantity)) {
|
||||
$modal.msgWarning(`第${rowNum}行产品的数量不能为空`)
|
||||
return false
|
||||
} else if (isNegativeNumeric(product.quantity)) {
|
||||
$modal.msgWarning(`第${rowNum}行产品的数量不能为负数`)
|
||||
return false
|
||||
}
|
||||
if (!product.packageSpec || String(product.packageSpec).trim() === '') {
|
||||
@@ -2717,15 +2810,25 @@ const handleSubmit = async () => {
|
||||
if (!validateProductRowCommon(product, rowNum)) return
|
||||
const isFw = isFrameworkContractType(form.value.contractType)
|
||||
if (!isFw) {
|
||||
if (!product.price || Number(product.price) <= 0) {
|
||||
$modal.msgWarning(`第${rowNum}行产品的含税单价不能为空且必须大于0`)
|
||||
if (isBlankNumeric(product.price)) {
|
||||
$modal.msgWarning(`第${rowNum}行产品的含税单价不能为空`)
|
||||
return
|
||||
}
|
||||
if (!product.subtotal || Number(product.subtotal) <= 0) {
|
||||
$modal.msgWarning(`第${rowNum}行产品的含税总价不能为空且必须大于0`)
|
||||
if (isNegativeNumeric(product.price) || isNegativeNumeric(product.subtotal) || isNegativeNumeric(product.taxAmount)) {
|
||||
$modal.msgWarning(`第${rowNum}行产品的含税单价、含税总价、税费不能为负数`)
|
||||
return
|
||||
}
|
||||
} else {
|
||||
if (product.priceMode === 'fixed') {
|
||||
if (isBlankNumeric(product.price)) {
|
||||
$modal.msgWarning(`第${rowNum}行产品的含税单价不能为空`)
|
||||
return
|
||||
}
|
||||
if (isNegativeNumeric(product.price) || isNegativeNumeric(product.subtotal) || isNegativeNumeric(product.taxAmount)) {
|
||||
$modal.msgWarning(`第${rowNum}行产品的含税单价、含税总价、税费不能为负数`)
|
||||
return
|
||||
}
|
||||
}
|
||||
const tiers = product.priceTiers || []
|
||||
for (let j = 0; j < tiers.length; j++) {
|
||||
const t = tiers[j]
|
||||
@@ -2756,17 +2859,23 @@ const handleSubmit = async () => {
|
||||
const product = form.value.products[i]
|
||||
const rowNum = i + 1
|
||||
if (!validateProductRowCommon(product, rowNum)) return
|
||||
if (!product.price || Number(product.price) <= 0) {
|
||||
$modal.msgWarning(`第${rowNum}行产品的含税单价不能为空且必须大于0`)
|
||||
if (isBlankNumeric(product.price)) {
|
||||
$modal.msgWarning(`第${rowNum}行产品的含税单价不能为空`)
|
||||
return
|
||||
}
|
||||
if (!product.subtotal || Number(product.subtotal) <= 0) {
|
||||
$modal.msgWarning(`第${rowNum}行产品的含税总价不能为空且必须大于0`)
|
||||
if (isNegativeNumeric(product.price) || isNegativeNumeric(product.subtotal) || isNegativeNumeric(product.taxAmount)) {
|
||||
$modal.msgWarning(`第${rowNum}行产品的含税单价、含税总价、税费不能为负数`)
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const confirmedZero = await confirmZeroPricingIfNeeded(
|
||||
form.value.products,
|
||||
isFrameworkContractType(form.value.contractType)
|
||||
)
|
||||
if (!confirmedZero) return
|
||||
|
||||
submitLoading.value = true
|
||||
try {
|
||||
rebuildContractName()
|
||||
@@ -3155,23 +3264,43 @@ const loadSupplierList = async () => {
|
||||
border: none !important;
|
||||
}
|
||||
|
||||
/* 框架合同调价函:表格内多图卡片上传 */
|
||||
.tier-letter-upload :deep(.el-upload-list--picture-card) {
|
||||
/* 框架合同产品明细:默认文案 + 可切换填数字 */
|
||||
.framework-pricing-cell {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 8px;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
gap: 2px;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.tier-letter-upload :deep(.el-upload--picture-card) {
|
||||
width: 72px;
|
||||
height: 72px;
|
||||
line-height: 72px;
|
||||
.framework-pricing-cell--money {
|
||||
align-items: flex-end;
|
||||
}
|
||||
|
||||
.tier-letter-upload :deep(.el-upload-list--picture-card .el-upload-list__item) {
|
||||
width: 72px;
|
||||
height: 72px;
|
||||
margin: 0;
|
||||
.framework-pricing-cell__label {
|
||||
font-size: 13px;
|
||||
line-height: 1.4;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.framework-pricing-cell__action {
|
||||
padding: 0 !important;
|
||||
height: auto !important;
|
||||
font-size: 12px !important;
|
||||
}
|
||||
|
||||
/* 框架合同调价函:表格内紧凑附件上传 */
|
||||
.fw-price-tier-table :deep(.attachment-upload--compact:not(.attachment-upload--readonly)) {
|
||||
min-width: 0;
|
||||
|
||||
.attachment-upload {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.attachment-list {
|
||||
flex-wrap: wrap;
|
||||
align-items: flex-start;
|
||||
}
|
||||
}
|
||||
|
||||
/* 框架合同:增加「调价函」行内按钮可点区域宽度 */
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<ContractAttachmentPanel
|
||||
v-model="attachmentList"
|
||||
:biz-type="CRM_UPLOAD_BIZ_TYPE.CONTRACT_ATTACHMENT"
|
||||
hint="支持上传图片、PDF、Word文档等,最多10个文件"
|
||||
hint="支持上传图片、PDF、Word文档等,最多10个文件;可拖拽或在此区域粘贴上传"
|
||||
/>
|
||||
|
||||
<template #footer>
|
||||
|
||||
@@ -304,22 +304,35 @@
|
||||
<DictTag dict-type="crm_product_unit" :value="scope.row.unit" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="数量" prop="quantity" width="110" align="right" />
|
||||
<el-table-column label="数量" prop="quantity" width="110" align="right">
|
||||
<template #default="scope">
|
||||
<span v-if="isFrameworkContractType(contract.contractType)" class="text-muted">
|
||||
{{ displayFrameworkQuantity(scope.row, true) }}
|
||||
</span>
|
||||
<span v-else>{{ scope.row.quantity }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="含税单价/元" prop="price" width="130" align="right">
|
||||
<template #default="scope">
|
||||
<span v-if="isFrameworkContractType(contract.contractType)" class="text-muted">随行就市</span>
|
||||
<span v-if="isFrameworkContractType(contract.contractType)" class="text-muted">
|
||||
{{ displayFrameworkMoney(scope.row, 'price', true) }}
|
||||
</span>
|
||||
<template v-else>¥{{ parseFloat(scope.row.price || 0).toFixed(2) }}</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="含税总价/元" prop="subtotal" width="130" align="right">
|
||||
<template #default="scope">
|
||||
<span v-if="isFrameworkContractType(contract.contractType)" class="text-muted">随行就市</span>
|
||||
<span v-if="isFrameworkContractType(contract.contractType)" class="text-muted">
|
||||
{{ displayFrameworkMoney(scope.row, 'subtotal', true) }}
|
||||
</span>
|
||||
<span v-else class="text-success font-weight-bold">¥{{ parseFloat(scope.row.subtotal || 0).toFixed(2) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="税费/元" prop="taxAmount" width="120" align="right">
|
||||
<template #default="scope">
|
||||
<span v-if="isFrameworkContractType(contract.contractType)" class="text-muted">随行就市</span>
|
||||
<span v-if="isFrameworkContractType(contract.contractType)" class="text-muted">
|
||||
{{ displayFrameworkMoney(scope.row, 'taxAmount', true) }}
|
||||
</span>
|
||||
<span v-else>¥{{ parseFloat(scope.row.taxAmount || 0).toFixed(2) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -1085,6 +1098,7 @@ import TinyMceEditor from '@/components/TinyMceEditor/index.vue';
|
||||
import { getOpportunity } from '@/api/crm/opportunity';
|
||||
import { getQuote } from '@/api/crm/quote';
|
||||
import { isFrameworkContractType, isContractEditableStatus, getContractReeditConfirmMessage } from './contractType';
|
||||
import { displayFrameworkMoney, displayFrameworkQuantity } from './frameworkProductPricing';
|
||||
import {
|
||||
parseSettlementClauseDrafts,
|
||||
resolveSettlementClauseContent
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,233 @@
|
||||
/** 框架合同产品明细:数量/价格模式常量与工具 */
|
||||
|
||||
import { ElMessageBox } from 'element-plus'
|
||||
|
||||
export const FRAMEWORK_QUANTITY_MODE = {
|
||||
CUSTOMER_DEMAND: 'customer_demand',
|
||||
FIXED: 'fixed'
|
||||
} as const
|
||||
|
||||
export const FRAMEWORK_PRICE_MODE = {
|
||||
MARKET: 'market',
|
||||
FIXED: 'fixed'
|
||||
} as const
|
||||
|
||||
export type FrameworkQuantityMode =
|
||||
(typeof FRAMEWORK_QUANTITY_MODE)[keyof typeof FRAMEWORK_QUANTITY_MODE]
|
||||
export type FrameworkPriceMode =
|
||||
(typeof FRAMEWORK_PRICE_MODE)[keyof typeof FRAMEWORK_PRICE_MODE]
|
||||
|
||||
export const FRAMEWORK_QUANTITY_LABEL = '按客户需求'
|
||||
export const FRAMEWORK_PRICE_LABEL = '随行就市'
|
||||
|
||||
export type FrameworkPricingProduct = {
|
||||
quantity?: number | string | null
|
||||
quantityMode?: FrameworkQuantityMode | string | null
|
||||
quantity_mode?: FrameworkQuantityMode | string | null
|
||||
price?: number | string | null
|
||||
subtotal?: number | string | null
|
||||
taxAmount?: number | string | null
|
||||
priceMode?: FrameworkPriceMode | string | null
|
||||
price_mode?: FrameworkPriceMode | string | null
|
||||
}
|
||||
|
||||
export function createFrameworkProductPricingDefaults() {
|
||||
return {
|
||||
quantity: 0,
|
||||
quantityMode: FRAMEWORK_QUANTITY_MODE.CUSTOMER_DEMAND,
|
||||
price: 0,
|
||||
subtotal: 0,
|
||||
taxAmount: 0,
|
||||
priceMode: FRAMEWORK_PRICE_MODE.MARKET
|
||||
}
|
||||
}
|
||||
|
||||
export function normalizeFrameworkProductPricing(product: FrameworkPricingProduct, isFramework: boolean) {
|
||||
if (!isFramework) {
|
||||
product.quantityMode = FRAMEWORK_QUANTITY_MODE.FIXED
|
||||
product.priceMode = FRAMEWORK_PRICE_MODE.FIXED
|
||||
return product
|
||||
}
|
||||
|
||||
const rawQuantityMode = product.quantityMode || product.quantity_mode
|
||||
const rawPriceMode = product.priceMode || product.price_mode
|
||||
|
||||
product.quantityMode =
|
||||
rawQuantityMode === FRAMEWORK_QUANTITY_MODE.FIXED
|
||||
? FRAMEWORK_QUANTITY_MODE.FIXED
|
||||
: rawQuantityMode === FRAMEWORK_QUANTITY_MODE.CUSTOMER_DEMAND
|
||||
? FRAMEWORK_QUANTITY_MODE.CUSTOMER_DEMAND
|
||||
: Number(product.quantity) > 0
|
||||
? FRAMEWORK_QUANTITY_MODE.FIXED
|
||||
: FRAMEWORK_QUANTITY_MODE.CUSTOMER_DEMAND
|
||||
|
||||
product.priceMode =
|
||||
rawPriceMode === FRAMEWORK_PRICE_MODE.FIXED
|
||||
? FRAMEWORK_PRICE_MODE.FIXED
|
||||
: rawPriceMode === FRAMEWORK_PRICE_MODE.MARKET
|
||||
? FRAMEWORK_PRICE_MODE.MARKET
|
||||
: Number(product.price) > 0 || Number(product.subtotal) > 0
|
||||
? FRAMEWORK_PRICE_MODE.FIXED
|
||||
: FRAMEWORK_PRICE_MODE.MARKET
|
||||
|
||||
if (product.quantityMode === FRAMEWORK_QUANTITY_MODE.CUSTOMER_DEMAND) {
|
||||
product.quantity = 0
|
||||
}
|
||||
if (product.priceMode === FRAMEWORK_PRICE_MODE.MARKET) {
|
||||
product.price = 0
|
||||
product.subtotal = 0
|
||||
product.taxAmount = 0
|
||||
}
|
||||
return product
|
||||
}
|
||||
|
||||
export function applyFrameworkDefaultsToProduct(product: FrameworkPricingProduct) {
|
||||
Object.assign(product, createFrameworkProductPricingDefaults())
|
||||
return product
|
||||
}
|
||||
|
||||
export function isBlankNumeric(value: unknown) {
|
||||
return value === null || value === undefined || value === ''
|
||||
}
|
||||
|
||||
export function isFilledZero(value: unknown) {
|
||||
if (isBlankNumeric(value)) return false
|
||||
return Number(value) === 0
|
||||
}
|
||||
|
||||
export function isNegativeNumeric(value: unknown) {
|
||||
if (isBlankNumeric(value)) return false
|
||||
return Number(value) < 0
|
||||
}
|
||||
|
||||
export function enableFrameworkQuantityFixed(product: FrameworkPricingProduct) {
|
||||
product.quantityMode = FRAMEWORK_QUANTITY_MODE.FIXED
|
||||
if (isBlankNumeric(product.quantity)) {
|
||||
product.quantity = 0
|
||||
}
|
||||
}
|
||||
|
||||
export function resetFrameworkQuantityToCustomerDemand(product: FrameworkPricingProduct) {
|
||||
product.quantityMode = FRAMEWORK_QUANTITY_MODE.CUSTOMER_DEMAND
|
||||
product.quantity = 0
|
||||
}
|
||||
|
||||
export function enableFrameworkPriceFixed(product: FrameworkPricingProduct) {
|
||||
product.priceMode = FRAMEWORK_PRICE_MODE.FIXED
|
||||
if (!product.price || Number(product.price) <= 0) {
|
||||
product.price = 0
|
||||
}
|
||||
}
|
||||
|
||||
export function resetFrameworkPriceToMarket(product: FrameworkPricingProduct) {
|
||||
product.priceMode = FRAMEWORK_PRICE_MODE.MARKET
|
||||
product.price = 0
|
||||
product.subtotal = 0
|
||||
product.taxAmount = 0
|
||||
}
|
||||
|
||||
export function isFrameworkQuantityCustomerDemand(product: FrameworkPricingProduct) {
|
||||
return product.quantityMode === FRAMEWORK_QUANTITY_MODE.CUSTOMER_DEMAND
|
||||
}
|
||||
|
||||
export function isFrameworkPriceMarket(product: FrameworkPricingProduct) {
|
||||
return product.priceMode === FRAMEWORK_PRICE_MODE.MARKET
|
||||
}
|
||||
|
||||
export function formatFrameworkQuantityDisplay(product: FrameworkPricingProduct) {
|
||||
if (isFrameworkQuantityCustomerDemand(product)) {
|
||||
return FRAMEWORK_QUANTITY_LABEL
|
||||
}
|
||||
const qty = Number(product.quantity)
|
||||
if (Number.isNaN(qty)) return '-'
|
||||
return String(qty)
|
||||
}
|
||||
|
||||
export function formatFrameworkMoneyDisplay(product: FrameworkPricingProduct, field: 'price' | 'subtotal' | 'taxAmount') {
|
||||
if (isFrameworkPriceMarket(product)) {
|
||||
return FRAMEWORK_PRICE_LABEL
|
||||
}
|
||||
const val = Number(product[field] ?? 0)
|
||||
if (Number.isNaN(val)) return '-'
|
||||
return `¥${val.toFixed(2)}`
|
||||
}
|
||||
|
||||
export function displayFrameworkQuantity(product: FrameworkPricingProduct, isFramework: boolean) {
|
||||
if (!isFramework) {
|
||||
const qty = Number(product.quantity)
|
||||
return Number.isNaN(qty) ? '-' : String(qty)
|
||||
}
|
||||
return formatFrameworkQuantityDisplay(normalizeFrameworkProductPricing({ ...product }, true))
|
||||
}
|
||||
|
||||
export function displayFrameworkMoney(
|
||||
product: FrameworkPricingProduct,
|
||||
field: 'price' | 'subtotal' | 'taxAmount',
|
||||
isFramework: boolean
|
||||
) {
|
||||
if (!isFramework) {
|
||||
const val = Number(product[field] ?? 0)
|
||||
return Number.isNaN(val) ? '-' : `¥${val.toFixed(2)}`
|
||||
}
|
||||
return formatFrameworkMoneyDisplay(normalizeFrameworkProductPricing({ ...product }, true), field)
|
||||
}
|
||||
|
||||
export function prepareFrameworkProductForSubmit(product: FrameworkPricingProduct) {
|
||||
const quantityMode = product.quantityMode || FRAMEWORK_QUANTITY_MODE.CUSTOMER_DEMAND
|
||||
const priceMode = product.priceMode || FRAMEWORK_PRICE_MODE.MARKET
|
||||
return {
|
||||
quantityMode,
|
||||
priceMode,
|
||||
quantity: quantityMode === FRAMEWORK_QUANTITY_MODE.CUSTOMER_DEMAND ? 0 : product.quantity,
|
||||
price: priceMode === FRAMEWORK_PRICE_MODE.MARKET ? 0 : product.price,
|
||||
subtotal: priceMode === FRAMEWORK_PRICE_MODE.MARKET ? 0 : product.subtotal,
|
||||
taxAmount: priceMode === FRAMEWORK_PRICE_MODE.MARKET ? 0 : product.taxAmount
|
||||
}
|
||||
}
|
||||
|
||||
type ZeroPricingProduct = FrameworkPricingProduct & {
|
||||
productName?: string | null
|
||||
}
|
||||
|
||||
/** 收集用户填写为 0 的数量/价格字段(不含「按客户需求」「随行就市」) */
|
||||
export function collectZeroPricingReminders(products: ZeroPricingProduct[] | undefined, isFramework: boolean) {
|
||||
const lines: string[] = []
|
||||
;(products || []).forEach((product, index) => {
|
||||
const fields: string[] = []
|
||||
const quantityIsNumeric = !isFramework || product.quantityMode === FRAMEWORK_QUANTITY_MODE.FIXED
|
||||
const priceIsNumeric = !isFramework || product.priceMode === FRAMEWORK_PRICE_MODE.FIXED
|
||||
if (quantityIsNumeric && isFilledZero(product.quantity)) {
|
||||
fields.push('数量')
|
||||
}
|
||||
if (priceIsNumeric) {
|
||||
if (isFilledZero(product.price)) fields.push('含税单价')
|
||||
if (isFilledZero(product.subtotal)) fields.push('含税总价')
|
||||
if (isFilledZero(product.taxAmount)) fields.push('税费')
|
||||
}
|
||||
if (fields.length) {
|
||||
const name = String(product.productName || '').trim() || '未命名产品'
|
||||
lines.push(`第${index + 1}行「${name}」:${fields.join('、')}为 0`)
|
||||
}
|
||||
})
|
||||
return lines
|
||||
}
|
||||
|
||||
export async function confirmZeroPricingIfNeeded(products: ZeroPricingProduct[] | undefined, isFramework: boolean) {
|
||||
const lines = collectZeroPricingReminders(products, isFramework)
|
||||
if (!lines.length) return true
|
||||
try {
|
||||
await ElMessageBox.confirm(
|
||||
`以下产品明细填写了 <strong>0</strong>,请确认后继续:<br/><br/>${lines.map((line) => `· ${line}`).join('<br/>')}`,
|
||||
'零值提醒',
|
||||
{
|
||||
type: 'warning',
|
||||
dangerouslyUseHTMLString: true,
|
||||
confirmButtonText: '确定保存',
|
||||
cancelButtonText: '返回修改'
|
||||
}
|
||||
)
|
||||
return true
|
||||
} catch {
|
||||
return false
|
||||
}
|
||||
}
|
||||
@@ -273,27 +273,13 @@
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="分类图片" class="flex-1">
|
||||
<div class="category-image-row">
|
||||
<el-image
|
||||
v-if="formData.imageUrl"
|
||||
:src="formData.imageUrl"
|
||||
fit="cover"
|
||||
style="width: 80px; height: 80px; border-radius: 8px"
|
||||
/>
|
||||
<div v-else class="category-image-placeholder">暂无</div>
|
||||
|
||||
<el-upload
|
||||
ref="categoryImageUploadRef"
|
||||
accept="image/*"
|
||||
:show-file-list="false"
|
||||
:auto-upload="false"
|
||||
:limit="1"
|
||||
:on-change="handleCategoryImageChange"
|
||||
:on-exceed="handleCategoryImageExceed"
|
||||
>
|
||||
<el-button type="primary" plain>上传图片</el-button>
|
||||
</el-upload>
|
||||
</div>
|
||||
<AttachmentUploadField
|
||||
v-model="formData.imageUrl"
|
||||
accept="image/*"
|
||||
:limit="1"
|
||||
folder="categories"
|
||||
hint="支持图片;可拖拽或在此区域粘贴上传"
|
||||
/>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
@@ -525,6 +511,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import ListToolbarEndActions from '@/components/business/list-toolbar-end-actions/index.vue'
|
||||
import AttachmentUploadField from '@/components/business/attachment-upload-field/index.vue'
|
||||
import { useListMediaActive } from '@/composables/useListMediaActive'
|
||||
/* eslint-disable vue/no-v-model-argument */
|
||||
import { ref, reactive, onMounted, nextTick, watch, computed } from 'vue'
|
||||
@@ -543,14 +530,12 @@ import ListToolbarEndActions from '@/components/business/list-toolbar-end-action
|
||||
Delete
|
||||
} from '@element-plus/icons-vue'
|
||||
import { VueDraggable as draggable } from 'vue-draggable-plus'
|
||||
import type { UploadFile } from 'element-plus'
|
||||
import SystemViewDialog from '@/components/business/system-view-dialog/index.vue'
|
||||
import {
|
||||
fetchCategoryList,
|
||||
fetchCreateCategory,
|
||||
fetchUpdateCategory,
|
||||
fetchDeleteCategory,
|
||||
fetchUploadCategoryImage,
|
||||
fetchProductParameterSimple,
|
||||
fetchCategoryParameters,
|
||||
fetchUpdateCategoryParameters
|
||||
@@ -830,7 +815,6 @@ import ListToolbarEndActions from '@/components/business/list-toolbar-end-action
|
||||
const isEdit = ref(false)
|
||||
const submitLoading = ref(false)
|
||||
const formRef = ref()
|
||||
const categoryImageUploadRef = ref<{ clearFiles: () => void } | null>(null)
|
||||
|
||||
const formData = reactive({
|
||||
id: '',
|
||||
@@ -929,40 +913,6 @@ import ListToolbarEndActions from '@/components/business/list-toolbar-end-action
|
||||
}
|
||||
}
|
||||
|
||||
const uploadCategoryImageFile = async (file: File) => {
|
||||
try {
|
||||
ElMessage.info('图片正在上传...')
|
||||
const fd = new FormData()
|
||||
fd.append('folder', 'categories')
|
||||
fd.append('file', file)
|
||||
|
||||
const res: any = await fetchUploadCategoryImage(fd)
|
||||
formData.imageUrl = res?.url || ''
|
||||
ElMessage.success('图片上传成功')
|
||||
} catch (e) {
|
||||
console.error('分类图片上传失败:', e)
|
||||
ElMessage.error('图片上传失败')
|
||||
} finally {
|
||||
categoryImageUploadRef.value?.clearFiles()
|
||||
}
|
||||
}
|
||||
|
||||
// 上传分类图片(limit=1 时第二次选文件会走 on-exceed,不会进 on-change)
|
||||
const handleCategoryImageChange = async (uploadFile: UploadFile) => {
|
||||
const file: any = (uploadFile as any).raw
|
||||
if (!file) return
|
||||
|
||||
const status = (uploadFile as any).status
|
||||
if (status && status !== 'ready') return
|
||||
|
||||
await uploadCategoryImageFile(file)
|
||||
}
|
||||
|
||||
const handleCategoryImageExceed = (files: File[]) => {
|
||||
const file = files[0]
|
||||
if (file) uploadCategoryImageFile(file)
|
||||
}
|
||||
|
||||
const loadData = async () => {
|
||||
selectedRows.value = []
|
||||
loading.value = true
|
||||
|
||||
@@ -1371,16 +1371,13 @@
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="佐证图片">
|
||||
<el-upload
|
||||
action="#"
|
||||
list-type="picture-card"
|
||||
:auto-upload="false"
|
||||
:on-change="handleCancelEvidenceChange"
|
||||
:on-remove="handleCancelEvidenceRemove"
|
||||
<AttachmentUploadField
|
||||
v-model="cancelEvidenceCsv"
|
||||
accept="image/*"
|
||||
:limit="6"
|
||||
>
|
||||
<el-icon><Plus /></el-icon>
|
||||
</el-upload>
|
||||
folder="demo/order-cancel"
|
||||
hint="支持图片;可拖拽或在此区域粘贴上传,最多6张"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
@@ -1706,6 +1703,7 @@
|
||||
WarningFilled
|
||||
} from '@element-plus/icons-vue'
|
||||
import ProductViewDialog from '@/components/business/product-view-dialog/index.vue'
|
||||
import AttachmentUploadField from '@/components/business/attachment-upload-field/index.vue'
|
||||
import {
|
||||
fetchOrderList,
|
||||
fetchOrderDetail,
|
||||
@@ -1714,7 +1712,6 @@
|
||||
fetchCancelOrder,
|
||||
fetchOrderItems,
|
||||
fetchAdjustOrder,
|
||||
fetchUploadAttachment,
|
||||
fetchOrderAdjusts,
|
||||
fetchPriceVersionDetail,
|
||||
fetchSystemConfig,
|
||||
@@ -1958,6 +1955,15 @@
|
||||
evidenceImageUrls: [] as string[]
|
||||
})
|
||||
const cancelDialogLoading = ref(false)
|
||||
const cancelEvidenceCsv = computed({
|
||||
get: () => (cancelDialogForm.evidenceImageUrls || []).join(','),
|
||||
set: (val: string) => {
|
||||
cancelDialogForm.evidenceImageUrls = String(val || '')
|
||||
.split(',')
|
||||
.map((item) => item.trim())
|
||||
.filter(Boolean)
|
||||
}
|
||||
})
|
||||
const cancelDialogRules = {
|
||||
reason: [{ required: true, message: '请输入取消原因', trigger: 'blur' }]
|
||||
}
|
||||
@@ -2642,22 +2648,6 @@
|
||||
cancelDialogVisible.value = true
|
||||
}
|
||||
|
||||
const handleCancelEvidenceChange = async (uploadFile: any) => {
|
||||
const file = uploadFile?.raw
|
||||
if (!file) return
|
||||
const fd = new FormData()
|
||||
fd.append('business_type', 'order')
|
||||
fd.append('business_id', cancelDialogForm.orderId)
|
||||
fd.append('file', file)
|
||||
const res: any = await fetchUploadAttachment(fd)
|
||||
if (res?.fileUrl) cancelDialogForm.evidenceImageUrls.push(res.fileUrl)
|
||||
}
|
||||
|
||||
const handleCancelEvidenceRemove = (_file: any, fileList: any[]) => {
|
||||
const urls = fileList.map((f: any) => f?.response?.fileUrl || f?.url).filter(Boolean)
|
||||
cancelDialogForm.evidenceImageUrls = urls
|
||||
}
|
||||
|
||||
const confirmCancelOrder = async () => {
|
||||
if (!cancelDialogForm.reason) {
|
||||
ElMessage.warning('请输入取消原因')
|
||||
|
||||
@@ -347,51 +347,13 @@
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="商品图片">
|
||||
<div class="image-upload-row">
|
||||
<div class="main-image-card">
|
||||
<template v-if="mainImageUploading">
|
||||
<div class="banner-media-loading main-image-as-banner">
|
||||
<el-image
|
||||
v-if="mainImageLocalPreview"
|
||||
:src="mainImageLocalPreview"
|
||||
fit="cover"
|
||||
class="banner-image banner-image--behind"
|
||||
/>
|
||||
<div v-else class="banner-media-placeholder main-image-ph" />
|
||||
<div class="banner-loading-mask">
|
||||
<el-icon class="banner-loading-icon is-loading"><Loading /></el-icon>
|
||||
<span class="banner-loading-text">上传中…</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<template v-else>
|
||||
<div class="main-image-as-banner main-image-done">
|
||||
<el-image
|
||||
v-if="formData.imageUrl"
|
||||
:src="formData.imageUrl"
|
||||
fit="cover"
|
||||
class="banner-image main-image-done-img"
|
||||
:preview-src-list="[formData.imageUrl]"
|
||||
:z-index="3000"
|
||||
/>
|
||||
<div v-else class="image-placeholder image-placeholder--banner">暂无</div>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
<el-upload
|
||||
ref="mainImageUploadRef"
|
||||
accept="image/*"
|
||||
:show-file-list="false"
|
||||
:auto-upload="false"
|
||||
:limit="1"
|
||||
:disabled="mainImageUploading"
|
||||
:on-change="handleMainImageChange"
|
||||
>
|
||||
<el-button type="primary" plain :disabled="mainImageUploading"
|
||||
>上传图片</el-button
|
||||
>
|
||||
</el-upload>
|
||||
</div>
|
||||
<AttachmentUploadField
|
||||
v-model="formData.imageUrl"
|
||||
accept="image/*"
|
||||
:limit="1"
|
||||
folder="products"
|
||||
hint="支持图片;可拖拽或在此区域粘贴上传"
|
||||
/>
|
||||
<div class="media-spec-hint">
|
||||
尺寸要求:请上传 1:1 正方形主图(推荐 800×800 至 2000×2000
|
||||
像素,JPG/PNG/WebP);小程序商品卡片会按固定方图展示,非 1:1
|
||||
@@ -437,7 +399,20 @@
|
||||
750×562);小程序端详情页顶部轮播区域按 4:3 展示,非 4:3
|
||||
图片会以「居中裁切填充」方式展示。
|
||||
</p>
|
||||
<div class="banner-upload-section">
|
||||
<div
|
||||
ref="bannerDropRef"
|
||||
class="banner-upload-section"
|
||||
:class="{ 'media-drop-zone--over': bannerDragOver }"
|
||||
tabindex="0"
|
||||
@mouseenter="bannerPointerInside = true"
|
||||
@mouseleave="bannerPointerInside = false"
|
||||
@focusin="bannerPointerInside = true"
|
||||
@focusout="onBannerFocusOut"
|
||||
@dragenter="onBannerDragEnter"
|
||||
@dragleave="onBannerDragLeave"
|
||||
@dragover="onBannerDragOver"
|
||||
@drop="onBannerDrop"
|
||||
>
|
||||
<div v-if="bannerList.length > 0" class="banner-list">
|
||||
<draggable
|
||||
v-model="bannerList"
|
||||
@@ -522,8 +497,9 @@
|
||||
<div class="banner-add-btn">
|
||||
<el-button type="primary" plain @click="handleAddBanner">
|
||||
<el-icon><Plus /></el-icon>
|
||||
添加图片/视频
|
||||
{{ bannerDragOver ? '松开上传' : '添加图片/视频' }}
|
||||
</el-button>
|
||||
<span class="media-drop-hint">可拖拽文件到此区域,或聚焦后粘贴上传</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -556,7 +532,20 @@
|
||||
750px,小程序端以「宽度自适应高度(widthFix)」方式展示,不强制比例;建议保证主体内容居中,避免边缘关键信息被不同机型裁切/遮挡。视频建议
|
||||
720p 内并尽量缩短时长以利加载;图片单张不超过 10MB,视频单文件不超过 100MB。
|
||||
</p>
|
||||
<div class="banner-upload-section">
|
||||
<div
|
||||
ref="detailDropRef"
|
||||
class="banner-upload-section"
|
||||
:class="{ 'media-drop-zone--over': detailDragOver }"
|
||||
tabindex="0"
|
||||
@mouseenter="detailPointerInside = true"
|
||||
@mouseleave="detailPointerInside = false"
|
||||
@focusin="detailPointerInside = true"
|
||||
@focusout="onDetailFocusOut"
|
||||
@dragenter="onDetailDragEnter"
|
||||
@dragleave="onDetailDragLeave"
|
||||
@dragover="onDetailDragOver"
|
||||
@drop="onDetailDrop"
|
||||
>
|
||||
<div v-if="detailMediaList.length > 0" class="banner-list">
|
||||
<draggable
|
||||
v-model="detailMediaList"
|
||||
@@ -641,8 +630,9 @@
|
||||
<div class="banner-add-btn">
|
||||
<el-button type="primary" plain @click="handleAddDetailMedia">
|
||||
<el-icon><Plus /></el-icon>
|
||||
添加图片/视频
|
||||
{{ detailDragOver ? '松开上传' : '添加图片/视频' }}
|
||||
</el-button>
|
||||
<span class="media-drop-hint">可拖拽文件到此区域,或聚焦后粘贴上传</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -906,7 +896,7 @@
|
||||
<script setup lang="ts">
|
||||
import ListToolbarEndActions from '@/components/business/list-toolbar-end-actions/index.vue'
|
||||
import { useListMediaActive } from '@/composables/useListMediaActive'
|
||||
import { ref, reactive, onMounted, computed, watch, nextTick } from 'vue'
|
||||
import { ref, reactive, onMounted, onBeforeUnmount, computed, watch, nextTick } from 'vue'
|
||||
import {
|
||||
ElMessage,
|
||||
ElMessageBox,
|
||||
@@ -935,6 +925,7 @@ import ListToolbarEndActions from '@/components/business/list-toolbar-end-action
|
||||
} from '@element-plus/icons-vue'
|
||||
import { VueDraggable as draggable } from 'vue-draggable-plus'
|
||||
import ProductViewDialog from '@/components/business/product-view-dialog/index.vue'
|
||||
import AttachmentUploadField from '@/components/business/attachment-upload-field/index.vue'
|
||||
import {
|
||||
fetchProductList,
|
||||
fetchProductDetail,
|
||||
@@ -1310,10 +1301,6 @@ import ListToolbarEndActions from '@/components/business/list-toolbar-end-action
|
||||
m.sortOrder = i
|
||||
})
|
||||
}
|
||||
const mainImageUploadRef = ref<{ clearFiles: () => void } | null>(null)
|
||||
const mainImageUploading = ref(false)
|
||||
const mainImageLocalPreview = ref('')
|
||||
|
||||
/** 上传接口返回的 data 可能为 { url } 或字段别名,与列表项引用无关时也必须能解析到地址 */
|
||||
const pickProductUploadUrl = (res: any): string => {
|
||||
if (res == null) return ''
|
||||
@@ -1322,17 +1309,6 @@ import ListToolbarEndActions from '@/components/business/list-toolbar-end-action
|
||||
return typeof u === 'string' && u ? u : ''
|
||||
}
|
||||
|
||||
const revokeMainImageLocalPreview = () => {
|
||||
if (mainImageLocalPreview.value) {
|
||||
try {
|
||||
URL.revokeObjectURL(mainImageLocalPreview.value)
|
||||
} catch {
|
||||
/* ignore */
|
||||
}
|
||||
mainImageLocalPreview.value = ''
|
||||
}
|
||||
}
|
||||
|
||||
const revokeLocalPreview = (item: any) => {
|
||||
if (item?._localPreview) {
|
||||
try {
|
||||
@@ -1769,10 +1745,6 @@ import ListToolbarEndActions from '@/components/business/list-toolbar-end-action
|
||||
// 提交
|
||||
const handleSubmit = async () => {
|
||||
if (!basicFormRef.value) return
|
||||
if (mainImageUploading.value) {
|
||||
ElMessage.warning('商品图片正在上传,请稍候再保存')
|
||||
return
|
||||
}
|
||||
if (bannerList.value.some((b) => b._uploading)) {
|
||||
ElMessage.warning('轮播图正在上传,请稍候再保存')
|
||||
return
|
||||
@@ -1952,8 +1924,6 @@ import ListToolbarEndActions from '@/components/business/list-toolbar-end-action
|
||||
lastAutoCategoryId.value = ''
|
||||
revokeListLocalPreviews(bannerList.value)
|
||||
revokeListLocalPreviews(detailMediaList.value)
|
||||
mainImageUploading.value = false
|
||||
revokeMainImageLocalPreview()
|
||||
bannerList.value = []
|
||||
detailMediaList.value = []
|
||||
categoryParameters.value = []
|
||||
@@ -1961,7 +1931,6 @@ import ListToolbarEndActions from '@/components/business/list-toolbar-end-action
|
||||
// 勿用 resetFields():会把表单项恢复为「首次挂载」时的初始值,若先编辑过其它商品,新增时会回填旧名称等
|
||||
nextTick(() => {
|
||||
basicFormRef.value?.clearValidate()
|
||||
mainImageUploadRef.value?.clearFiles()
|
||||
})
|
||||
}
|
||||
|
||||
@@ -2159,40 +2128,6 @@ import ListToolbarEndActions from '@/components/business/list-toolbar-end-action
|
||||
}
|
||||
}
|
||||
|
||||
// 主图上传(limit=1 时内部会保留已选文件,再次选择会走 on-exceed 而非 on-change,需在每次处理后 clearFiles)
|
||||
const handleMainImageChange = async (uploadFile: UploadFile) => {
|
||||
const file: any = (uploadFile as any).raw
|
||||
if (!file) return
|
||||
|
||||
const status = (uploadFile as any).status
|
||||
if (status && status !== 'ready') return
|
||||
|
||||
mainImageUploading.value = true
|
||||
revokeMainImageLocalPreview()
|
||||
mainImageLocalPreview.value = URL.createObjectURL(file)
|
||||
try {
|
||||
const fd = new FormData()
|
||||
fd.append('folder', 'products')
|
||||
fd.append('file', file)
|
||||
|
||||
const res: any = await fetchUploadProductImage(fd)
|
||||
const url = pickProductUploadUrl(res)
|
||||
if (url) {
|
||||
formData.imageUrl = url
|
||||
ElMessage.success('图片上传成功')
|
||||
} else {
|
||||
ElMessage.error('上传成功但未返回图片地址')
|
||||
}
|
||||
} catch (e) {
|
||||
console.error('图片上传失败:', e)
|
||||
ElMessage.error('图片上传失败')
|
||||
} finally {
|
||||
mainImageUploading.value = false
|
||||
revokeMainImageLocalPreview()
|
||||
nextTick(() => mainImageUploadRef.value?.clearFiles())
|
||||
}
|
||||
}
|
||||
|
||||
// 添加轮播图
|
||||
const handleAddBanner = () => {
|
||||
// 获取 el-upload 内部的 input 元素并触发点击
|
||||
@@ -2251,7 +2186,12 @@ import ListToolbarEndActions from '@/components/business/list-toolbar-end-action
|
||||
|
||||
const status = (uploadFile as any).status
|
||||
if (status && status !== 'ready') return
|
||||
await uploadBannerRawFile(file)
|
||||
await nextTick()
|
||||
bannerUploadRef.value?.clearFiles?.()
|
||||
}
|
||||
|
||||
const uploadBannerRawFile = async (file: File) => {
|
||||
// 判断文件类型
|
||||
const isVideo = file.type.startsWith('video/')
|
||||
|
||||
@@ -2345,7 +2285,12 @@ import ListToolbarEndActions from '@/components/business/list-toolbar-end-action
|
||||
|
||||
const status = (uploadFile as any).status
|
||||
if (status && status !== 'ready') return
|
||||
await uploadDetailMediaRawFile(file)
|
||||
await nextTick()
|
||||
detailMediaUploadRef.value?.clearFiles?.()
|
||||
}
|
||||
|
||||
const uploadDetailMediaRawFile = async (file: File) => {
|
||||
const isVideo = file.type.startsWith('video/')
|
||||
|
||||
const allowedImageTypes = [
|
||||
@@ -2478,14 +2423,164 @@ import ListToolbarEndActions from '@/components/business/list-toolbar-end-action
|
||||
{ debounce: 300, deep: true }
|
||||
)
|
||||
|
||||
|
||||
// 轮播图 / 详情媒体:拖拽与粘贴上传
|
||||
const bannerDropRef = ref<HTMLElement>()
|
||||
const detailDropRef = ref<HTMLElement>()
|
||||
const bannerPointerInside = ref(false)
|
||||
const detailPointerInside = ref(false)
|
||||
const bannerDragOver = ref(false)
|
||||
const detailDragOver = ref(false)
|
||||
let bannerDragDepth = 0
|
||||
let detailDragDepth = 0
|
||||
|
||||
const normalizeIncomingFile = (file: File, index = 0) => {
|
||||
if (file.name && file.name.trim()) return file
|
||||
const ext = (file.type || '').split('/')[1] || 'bin'
|
||||
return new File([file], `paste-${Date.now()}-${index}.${ext}`, {
|
||||
type: file.type || 'application/octet-stream'
|
||||
})
|
||||
}
|
||||
|
||||
const collectClipboardFiles = (event: ClipboardEvent) => {
|
||||
const files: File[] = []
|
||||
const items = event.clipboardData?.items
|
||||
if (items?.length) {
|
||||
Array.from(items).forEach((item, index) => {
|
||||
if (item.kind !== 'file') return
|
||||
const file = item.getAsFile()
|
||||
if (file) files.push(normalizeIncomingFile(file, index))
|
||||
})
|
||||
}
|
||||
if (!files.length && event.clipboardData?.files?.length) {
|
||||
Array.from(event.clipboardData.files).forEach((file, index) => {
|
||||
files.push(normalizeIncomingFile(file, index))
|
||||
})
|
||||
}
|
||||
return files
|
||||
}
|
||||
|
||||
const onBannerFocusOut = (event: FocusEvent) => {
|
||||
const next = event.relatedTarget as Node | null
|
||||
if (next && bannerDropRef.value?.contains(next)) return
|
||||
bannerPointerInside.value = false
|
||||
}
|
||||
const onDetailFocusOut = (event: FocusEvent) => {
|
||||
const next = event.relatedTarget as Node | null
|
||||
if (next && detailDropRef.value?.contains(next)) return
|
||||
detailPointerInside.value = false
|
||||
}
|
||||
|
||||
const onBannerDragEnter = (event: DragEvent) => {
|
||||
event.preventDefault()
|
||||
bannerDragDepth += 1
|
||||
bannerDragOver.value = true
|
||||
bannerPointerInside.value = true
|
||||
}
|
||||
const onBannerDragLeave = (event: DragEvent) => {
|
||||
event.preventDefault()
|
||||
bannerDragDepth = Math.max(0, bannerDragDepth - 1)
|
||||
if (bannerDragDepth === 0) bannerDragOver.value = false
|
||||
}
|
||||
const onBannerDragOver = (event: DragEvent) => {
|
||||
event.preventDefault()
|
||||
if (event.dataTransfer) event.dataTransfer.dropEffect = 'copy'
|
||||
}
|
||||
const onBannerDrop = async (event: DragEvent) => {
|
||||
event.preventDefault()
|
||||
bannerDragDepth = 0
|
||||
bannerDragOver.value = false
|
||||
const files = Array.from(event.dataTransfer?.files || [])
|
||||
for (const file of files) {
|
||||
if (bannerList.value.length >= 9) {
|
||||
ElMessage.warning('最多上传9张轮播图')
|
||||
break
|
||||
}
|
||||
await uploadBannerRawFile(file)
|
||||
}
|
||||
}
|
||||
|
||||
const onDetailDragEnter = (event: DragEvent) => {
|
||||
event.preventDefault()
|
||||
detailDragDepth += 1
|
||||
detailDragOver.value = true
|
||||
detailPointerInside.value = true
|
||||
}
|
||||
const onDetailDragLeave = (event: DragEvent) => {
|
||||
event.preventDefault()
|
||||
detailDragDepth = Math.max(0, detailDragDepth - 1)
|
||||
if (detailDragDepth === 0) detailDragOver.value = false
|
||||
}
|
||||
const onDetailDragOver = (event: DragEvent) => {
|
||||
event.preventDefault()
|
||||
if (event.dataTransfer) event.dataTransfer.dropEffect = 'copy'
|
||||
}
|
||||
const onDetailDrop = async (event: DragEvent) => {
|
||||
event.preventDefault()
|
||||
detailDragDepth = 0
|
||||
detailDragOver.value = false
|
||||
const files = Array.from(event.dataTransfer?.files || [])
|
||||
for (const file of files) {
|
||||
await uploadDetailMediaRawFile(file)
|
||||
}
|
||||
}
|
||||
|
||||
const handleProductMediaPaste = async (event: ClipboardEvent) => {
|
||||
const files = collectClipboardFiles(event)
|
||||
if (!files.length) return
|
||||
if (bannerPointerInside.value) {
|
||||
event.preventDefault()
|
||||
event.stopPropagation()
|
||||
for (const file of files) {
|
||||
if (bannerList.value.length >= 9) {
|
||||
ElMessage.warning('最多上传9张轮播图')
|
||||
break
|
||||
}
|
||||
await uploadBannerRawFile(file)
|
||||
}
|
||||
return
|
||||
}
|
||||
if (detailPointerInside.value) {
|
||||
event.preventDefault()
|
||||
event.stopPropagation()
|
||||
for (const file of files) {
|
||||
await uploadDetailMediaRawFile(file)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
document.addEventListener('paste', handleProductMediaPaste, true)
|
||||
loadData()
|
||||
loadCategories()
|
||||
loadUnits()
|
||||
})
|
||||
|
||||
onBeforeUnmount(() => {
|
||||
document.removeEventListener('paste', handleProductMediaPaste, true)
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
.media-drop-hint {
|
||||
margin-left: 12px;
|
||||
font-size: 12px;
|
||||
color: #64748b;
|
||||
}
|
||||
|
||||
.banner-upload-section {
|
||||
outline: none;
|
||||
border-radius: 8px;
|
||||
|
||||
&.media-drop-zone--over {
|
||||
background: rgba(16, 185, 129, 0.06);
|
||||
outline: 2px dashed #1ca851;
|
||||
outline-offset: 4px;
|
||||
padding: 8px;
|
||||
}
|
||||
}
|
||||
|
||||
.search-form {
|
||||
:deep(.el-form-item) {
|
||||
margin-bottom: 0;
|
||||
|
||||
@@ -43,15 +43,15 @@
|
||||
@search="handleQuickSearch"
|
||||
@clear="handleQuickSearchClear"
|
||||
/>
|
||||
<el-button class="btn-main" type="primary" @click="handleAdd">
|
||||
<el-icon><Plus /></el-icon>新增人员
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="isCarrierPersonnel"
|
||||
class="btn-ghost"
|
||||
@click="pasteVisible = true"
|
||||
>
|
||||
<el-icon><DocumentCopy /></el-icon>粘贴识别
|
||||
<el-icon><DocumentCopy /></el-icon>快速识别创建
|
||||
</el-button>
|
||||
<el-button class="btn-main" type="primary" @click="handleAdd">
|
||||
<el-icon><Plus /></el-icon>新增人员
|
||||
</el-button>
|
||||
<el-button
|
||||
class="btn-ghost"
|
||||
@@ -298,7 +298,12 @@
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="身份证号" prop="idCardNo">
|
||||
<el-input v-model="formData.idCardNo" placeholder="请输入身份证号" maxlength="32" />
|
||||
<el-input
|
||||
v-model="formData.idCardNo"
|
||||
placeholder="请输入身份证号"
|
||||
maxlength="32"
|
||||
@input="handleIdCardNoInput"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="人员类型" prop="personnelType">
|
||||
<el-select v-model="formData.personnelType" placeholder="请选择人员类型">
|
||||
@@ -429,6 +434,7 @@ import { useListMediaActive } from '@/composables/useListMediaActive'
|
||||
import { pickBxPageResult } from '@/utils/http/bx'
|
||||
import { DEFAULT_LIST_PAGE_SIZE } from '@/utils/table/tableConfig'
|
||||
import { formatDateTime } from '@/utils/format'
|
||||
import { calcAgeFromChineseIdCard } from '@/utils/id-card'
|
||||
import {
|
||||
downloadListPhoto,
|
||||
firstPhotoUrl,
|
||||
@@ -795,9 +801,21 @@ async function handleView(row: Personnel) {
|
||||
}
|
||||
}
|
||||
|
||||
function applyAgeFromIdCard(idCard?: string) {
|
||||
const age = calcAgeFromChineseIdCard(idCard)
|
||||
if (age != null) {
|
||||
formData.age = age
|
||||
}
|
||||
}
|
||||
|
||||
function handleIdCardNoInput(val: string | number) {
|
||||
applyAgeFromIdCard(String(val ?? ''))
|
||||
}
|
||||
|
||||
function handleIdCardRecognized(certNo: string) {
|
||||
if (certNo) {
|
||||
formData.idCardNo = certNo
|
||||
applyAgeFromIdCard(certNo)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -167,6 +167,13 @@
|
||||
>
|
||||
<el-icon><CircleClose /></el-icon>作废
|
||||
</el-button>
|
||||
<el-button
|
||||
type="danger"
|
||||
class="pl-plan-paste-create-btn"
|
||||
@click="pasteVisible = true"
|
||||
>
|
||||
<el-icon><DocumentCopy /></el-icon>三方人车快速创建
|
||||
</el-button>
|
||||
|
||||
<ListToolbarEndActions
|
||||
:loading="loading"
|
||||
@@ -522,6 +529,8 @@
|
||||
<PlInboundSlipPrintDialog ref="inboundSlipPrintRef" />
|
||||
<PlDeliverySlipPrintDialog ref="deliverySlipPrintRef" />
|
||||
<PlSubpackSlipPrintDialog ref="subpackSlipPrintRef" />
|
||||
|
||||
<PlPasteRecognizeDialog v-model:visible="pasteVisible" mode="vehicle-bundle" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -531,6 +540,7 @@ import {
|
||||
Bell,
|
||||
CircleClose,
|
||||
CopyDocument,
|
||||
DocumentCopy,
|
||||
Edit,
|
||||
Plus,
|
||||
Printer,
|
||||
@@ -543,6 +553,7 @@ import PlInboundSlipPrintDialog from '@/components/business/pl-inbound-slip-prin
|
||||
import PlDeliverySlipPrintDialog from '@/components/business/pl-delivery-slip-print-dialog/index.vue'
|
||||
import PlSubpackSlipPrintDialog from '@/components/business/pl-subpack-slip-print-dialog/index.vue'
|
||||
import PlPlanArrangeDialog from '@/components/business/pl-plan-arrange-dialog/index.vue'
|
||||
import PlPasteRecognizeDialog from '@/components/business/pl-paste-recognize-dialog/index.vue'
|
||||
import PlPlanFormDialog from '@/components/business/pl-plan-form-dialog/index.vue'
|
||||
import ListQuickSearchInput from '@/components/business/list-quick-search-input/index.vue'
|
||||
import ListToolbarEndActions from '@/components/business/list-toolbar-end-actions/index.vue'
|
||||
@@ -577,6 +588,7 @@ const loading = ref(false)
|
||||
const voidLoading = ref(false)
|
||||
const waitNoticeLoading = ref(false)
|
||||
const formDialogVisible = ref(false)
|
||||
const pasteVisible = ref(false)
|
||||
const editingPlanId = ref('')
|
||||
const copyFromPlanId = ref('')
|
||||
const viewVisible = ref(false)
|
||||
@@ -1110,6 +1122,20 @@ async function openArrangeFromQuery() {
|
||||
> .el-dropdown {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
/* 工具栏全局把按钮刷成描边,需单独盖住才能显示危险实心红 */
|
||||
> .el-button.pl-plan-paste-create-btn {
|
||||
color: #fff !important;
|
||||
background: var(--danger, #dc2626) !important;
|
||||
border-color: var(--danger, #dc2626) !important;
|
||||
|
||||
&:hover,
|
||||
&:focus {
|
||||
color: #fff !important;
|
||||
background: #b91c1c !important;
|
||||
border-color: #b91c1c !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.pl-plan-list-pager-bar {
|
||||
|
||||
@@ -63,12 +63,12 @@
|
||||
@search="handleQuickSearch"
|
||||
@clear="handleQuickSearchClear"
|
||||
/>
|
||||
<el-button class="btn-ghost" @click="pasteVisible = true">
|
||||
<el-icon><DocumentCopy /></el-icon>快速识别创建
|
||||
</el-button>
|
||||
<el-button class="btn-main" type="primary" @click="handleAdd">
|
||||
<el-icon><Plus /></el-icon>新增车辆
|
||||
</el-button>
|
||||
<el-button class="btn-ghost" @click="pasteVisible = true">
|
||||
<el-icon><DocumentCopy /></el-icon>粘贴识别
|
||||
</el-button>
|
||||
<el-button
|
||||
class="btn-ghost"
|
||||
:disabled="selectedRows.length !== 1"
|
||||
|
||||
Reference in new issue
Block a user