86 Commits

Author SHA1 Message Date
刘泉佳 a554ccf38e 🐛 axios网络级失败(502/504/超时)补充统一错误提示,修复接口报错页面无感知 2026-09-21 21:20:57 +08:00
刘泉佳 a748e52551 开票申请商品行选择开票内容时快照税收分类编码并随保存提交 2026-09-21 19:14:57 +08:00
刘泉佳 e89e78b527 正式结算单认领查询对接发票云全票池(多条件搜索+服务端分页) 2026-09-20 19:41:37 +08:00
刘泉佳 2a03991297 客商档案金蝶回填优化:放宽锁定字段、信用代码可重新输入并修复查询误判 2026-09-20 16:06:03 +08:00
刘泉佳 58aaf79445 客商档案新增金蝶客商查询回填与同步金蝶重推入口 2026-09-18 20:01:29 +08:00
刘泉佳 f067518c0e fix: 付款申请批量同步金蝶失败时展示失败原因
- 批量同步后解析返回结果,按"同步失败"标识区分成功与失败条目
- 部分失败时以 warning 提示成功/失败条数及具体失败原因(停留8秒),全部成功仍提示已同步条数
2026-09-18 11:58:00 +08:00
刘泉佳 11460f3378 付款管理新增同步付款结果按钮并扩展金蝶单据状态选项 2026-09-18 11:57:59 +08:00
刘泉佳 7f543937fb 结算单新增时自动查询BFI汇率
- currency.js: 新增getBfiExchangeRate接口调用
- pre-settlement-editor.vue:
  - 选择合同后同步结算币种并自动查询当天BFI汇率
  - 汇率日期变更时自动查询BFI汇率并回填结算汇率
  - 新增时自动设置当天日期并查询汇率
- formal-settlement-editor.vue:
  - 选择合同后同步结算币种并自动查询当天BFI汇率
  - 汇率日期变更时自动查询BFI汇率并回填结算汇率
  - 新增时自动查询当天BFI汇率
2026-09-16 14:14:53 +08:00
b2894lxlx 6a87066097 调整 合同、运力、客商、项目 2026-09-15 11:59:55 +08:00
b2894lxlx 79aa4f9fae 调整 合同、运力、基础配置、客商 2026-09-14 23:43:20 +08:00
b2894lxlx f1e2313e4c 调整 合同 2026-09-14 15:01:13 +08:00
b2894lxlx acbc9d3322 调整 基础数据、运力、车船务 2026-09-14 01:49:23 +08:00
b2894lxlx dbeb174ae2 调整项目 2026-09-13 01:01:24 +08:00
b2894lxlx 764c0f4581 运单调整 2026-09-11 14:39:30 +08:00
b2894lxlx 1a9cd55d66 1、调整导入运单
2、调整对账
2026-09-10 22:50:18 +08:00
b2894lxlx 38e53e01af Merge remote-tracking branch 'websoft/master' 2026-09-10 02:01:42 +08:00
b2894lxlx 6ff672211f 1、调整导入运单
2、调整对账
2026-09-10 02:01:28 +08:00
gxwebsoft 1bbc97758d fix(contract-manage-change): 修正自动生成结算单问号提示图标位置
- 解决图标夹在开启/关闭 radio 按钮之间,开启按钮右侧多余间距问题
- 清除开启 radio 默认 margin-right,调整提示图标左右间距
- 提示图标紧靠开启按钮一侧,关闭按钮保持较大间距
- 优化样式,使布局更美观一致
2026-09-09 19:25:06 +08:00
gxwebsoft c1813e308f feat(vehicle): 重构车辆认证审核弹窗布局与验证规则
- 新增车辆认证审核弹窗,取消独立尺寸重量卡片,外廓尺寸改为长/宽/高组合布局
- 基础信息调整为3行4列,证件信息新增车辆资质图片行,所属组织标签更名为所有组织
- 行驶证有效期必填星号动态显示,长期有效时不显示且不校验,删除旧校验方法
- driver.vue中从业资格证有效期改为起止日期区间,新增起始日期字段,调整验证规则
- 驾驶证和从业资格证长期有效时禁用起止日期输入,校验逻辑同步调整,提交保留旧值
- contract-manage-change.vue合同文件批量下载按钮移入标题栏,与其它附件分区样式统一
- 样式更新,新增 dimension-group 用于外廓尺寸排版复用及其他局部样式调整
- 修复因后端未实现接口导致的降级方案预留,等待后端补充支持
2026-09-09 19:06:26 +08:00
gxwebsoft 716ce43862 feat(driver): 优化驾驶证信息必填规则和表单placeholder统一
- 驾驶证有效期必填加红星,长期有效去除必填红星,保持校验逻辑不变
- 统一司机弹窗所有输入框和选择框的placeholder为“请输入”或“请选择”,去除字段名
- 保留复合操作、日期范围起止及默认值说明的特例placeholder不变
- 新增3处自动生成结算单开关后悬浮问号图标和提示,增强用户理解
- customer-archive中新增customerKindOptions和映射,用于客户类别选择
- 提升archive-form label与控件垂直居中样式至全局,修正多页标签顶置问题
2026-09-09 17:35:19 +08:00
gxwebsoft 14c6ad0a31 feat(vehicle): 优化车辆管理相关表单布局和字段
- 车牌号组件改为单一输入框,去除省简称和颜色选择,实现完整车牌号输入
- 重写车牌号校验逻辑,校验完整车牌号格式,错误提示更加明确
- 车辆新增/编辑弹窗输入框宽度统一调整,基础信息和资质图片区按四列布局排列
- 修复所有组织字段宽度不一致问题,补充级联选择器样式支持
- 司机新增/编辑弹窗调整为四列布局,调整字段排列顺序,提升界面整洁度
- 客商档案中「客商类型」改名为「客商分类」,新增「客商类型」字段支持外部客商和内部组织区分
- 上传证件项 label 贴顶问题修复,统一提升到全局样式实现垂直居中
- 移除车牌颜色只读展示,审核弹窗同步删除车牌颜色字段
- 保持后端接口兼容,数据库字段未变,OCR同步调用链路无影响
2026-09-09 17:19:33 +08:00
gxwebsoft 1972115173 feat(transportCapacity): 优化车辆与司机弹窗布局并新增字段支持
- 车辆新增弹窗:所有组织移至基础车辆信息区末尾,新增使用部门字段,使用部门复用部门下拉
- 车牌号三段合并为整体输入框,优化样式为flex布局,去除多余边框及阴影,统一视觉
- 长期有效勾选时清空对应日期且禁用输入,新增handleLongTermChange方法,表单校验支持长期有效跳过必填
- 司机弹窗基础身份信息新增placeholder,调整布局,基础身份三列保持不变,其他信息行按需求拆分重排为一致三列
- 后端新增use_department字段,相关mapper、service及校验同步更新,新增增量迁移脚本支持
- 车辆表单相关输入控件宽度统一调整为6列布局,保持与其它区块一致,提升整体UI协调性
- 移除车辆车牌号拆分相关字段及逻辑,车牌号统一管理为单个字段,简化处理流程
- 代码中新增校验规则validateDrivingLicenseEndDate及validateRoadTransportCertEndDate,支持长期有效逻辑
- 优化图片上传区和证件信息区表单字段排列,提升表单整体易用性与规范性
2026-09-09 15:37:40 +08:00
gxwebsoft 006dc95bf0 Merge remote-tracking branch 'origin/master' 2026-09-09 15:11:56 +08:00
gxwebsoft d187da68d2 fix(contract-manage): 优化合同管理页面布局及字典数据读取
- 合同文件「批量下载」按钮调整为与标题同排且垂直居中
- 修改内联组件render函数结构及相关样式,统一合同文件和其它附件布局
- 合同格式下拉改为动态读取业务字典contractFormat,保留静态兜底
- 合同类别contractCategory下拉改为业务字典读取,替代硬编码选项
- 表单增加所属组织、签订日期、回款账期、开票周期、结算币种等字段
- 调整字段顺序,完善表单输入限制和控件属性
- 替换部分按钮类型,优化用户交互体验
- 修复detailValue字典映射,显示合同格式标签
- 修正样式`:deep`选择器,解决scoped样式对子组件无效问题
2026-09-09 15:11:53 +08:00
b2894lxlx 70bb94a2e6 Merge remote-tracking branch 'websoft/master' 2026-09-09 14:43:49 +08:00
b2894lxlx f78e61b433 1、调整导入运单
2、调整对账
2026-09-09 14:43:38 +08:00
gxwebsoft 508d73fc0d Merge remote-tracking branch 'origin/master' 2026-09-09 12:45:50 +08:00
gxwebsoft e73e1da877 feat(contract-manage): 将付款比例设置提示改为tooltip展示
- 付款比例设置区块标题后添加问号图标悬浮提示,替换原红色文字说明
- 编辑弹窗、详情弹窗、合同变更页统一使用el-tooltip + el-icon-question-filled组件
- 移除contract-manage.vue中原有.red tip提示及相应样式

feat(temporary-credit-limit): 优化临时额度申请界面及校验规则

- 增加新增/编辑/查看临时额度申请标题,覆盖默认菜单注入标题
- 所有表单字段统一设置placeholder为“请输入/请选择”无字段名
- 搜索栏占位符统一为“请输入/请选择”,与其他模块一致
- 临时额度申请有效期至字段增加“必须晚于当前日期”日期校验规则
- 增添futureDateRule通用校验规则,支持多种日期格式即时触发验证

feat(project-apply): 新增资金使用风险快速筛选及风险提示

- 项目申请列表增加资金使用风险列,显示高风险/中风险标签
- 新增资金使用风险快速筛选区,可点击标签筛选项目风险等级
- 提供资金使用风险阈值配置,支持中风险≥80%、高风险≥90%
- 调整页面样式及交互,优化风险筛选体验
- 新增后端接口getFundRiskStats,用于获取风险统计数据并实时刷新
2026-09-09 12:45:46 +08:00
gxwebsoft 4d5b99da82 feat(contract): 优化合同变更及车辆认证审核弹窗
- 合同变更页「其它附件」上传按钮样式调整,与变更材料区按钮统一
- 新增分区标题必填星号样式,改用 ::after 避免冲突
- 变更页 load() 强制清空表单关键字段,避免带入旧数据
- 实现 mergeChangeAttachments() 合并上次变更附件,去重并格式化大小
- 合同变更记录表格新增「变更内容」列,支持单行摘要显示与悬浮全量提示
- 操作列由单「流程」改为「详情 + 流程」按钮,详情文字统一
- 变更记录值格式化增强,支持方案名、支付比例、结算规则等摘要展示
- buildDetailChangeRecordRows 过滤条件更新,前后均为空时跳过展示
- 车辆认证审核弹窗样式及结构重构,使用 section-card 白卡分组,内容补全证件图片区
- 证件图片实现只读大图展示,复用全局样式,无需新增规则
- label 单位统一为中文全角括号,提升界面一致性
- 新增长期有效显示逻辑,避免日期未填「-」与长期有效混淆
- 删除无用计算属性 auditDetailItems,改用简洁 auditValue 方法返回展示值
- 全站弹窗标题统一增加 4px 主色竖条,符合设计规范,且对无标题弹窗进行排除处理
- 客户端临时额度申请期限字段拆分为两个独立字段,清晰明了
- 统一合同变更页变更原因必填标识及上传按钮样式
- 修正 EP 表单项标签高度和对齐,完善星号方案兼容性设计
2026-09-09 11:57:52 +08:00
gxwebsoft f3021d4bae style(ship): 调整航区字段布局及上传器宽度
- 将航区选择控件从宽度12调整为宽度6的列中展示
- 保留航区选择及提示信息功能不变,位置更紧凑
- 调整上传组件宽度从240px增加到248px以适配新布局
2026-09-09 11:20:52 +08:00
gxwebsoft 7eb6cce2db fix(project-apply): 修正项目简称输入框的必填校验
- 取消了项目简称表单项的 required 属性
- 在项目简称的验证规则中新增必填校验
- 使得项目简称必填校验逻辑与表单项显示一致
- 保持校验触发事件为失焦(blur)事件
2026-09-09 11:14:44 +08:00
gxwebsoft be2888d428 fix(styles): 修复必填星号首行对齐问题
- 调整 `.is-required .el-form-item__label` 采用 `align-items: normal` 实现星号首行对齐
- 覆盖 Element Plus 固定高度 `height: 32px` 为 `height: auto` 以支持内容自适应高度
- 保持 `align-self: center` 使单行 label 与输入框垂直居中,折行时星号贴首行
- 修改星号 `::before` 的高度为 `auto` 并继承行高,保证首行基线一致
- 修复多行 label 下星号因 flex 居中导致位置偏移的问题
- 兼容 label 多种位置(右、左、顶)及多行折行场景,影响 project-apply 等表单页
2026-09-09 11:11:39 +08:00
gxwebsoft 06f6950434 refactor(contract-manage): 优化结算货币标签显示
- 结算货币选项中仅显示字典值,去除字典键拼接
- 注释掉样式中 el-form-item 标签的行高设置,避免样式冲突
2026-09-09 10:39:30 +08:00
gxwebsoft 09f1af9a0a fix(styles): 调整必填星号与标签首行对齐样式
- 修改 .el-form-item__label 的对齐方式使必填星号与首行文字齐平
- 设置多标签布局下星号对齐,兼容单行和多行标签显示
- 调整 ::before 伪元素行高和外边距,确保星号基线一致

fix(project-apply): 更新表单字段“资金需求”为“履约保证金”

- 修改项目申请页面中“资金需求”标签为“履约保证金”
- 更新对应验证规则标签名称,保持校验一致性

chore(config): 更新开发服务器端口及代理设置

- 注释旧服务器配置,启用新端口 2889
- 更新 /api 代理目标地址为 172.16.203.228:8000
- 保持代理跨域设置不变
2026-09-09 10:31:22 +08:00
b2894lxlx 6d4961f404 1、调整凭证
2、调整对账
3、解决正式结算冲突bug
2026-09-09 10:21:19 +08:00
b2894lxlx cba2ad3b3b 1、调整凭证
2、调整运单
2026-09-08 17:50:34 +08:00
b2894lxlx a7315b4491 调整结算模块 2026-09-07 19:37:27 +08:00
b2894lxlx 0d070d4b34 调整业务模块 2026-09-07 10:05:32 +08:00
b2894lxlx 6a6d10dc79 调整业务模块 2026-09-05 23:26:37 +08:00
b2894lxlx 3bac9b6472 调整结算 2026-09-05 00:04:46 +08:00
b2894lxlx 96f2fa0eb5 Merge remote-tracking branch 'websoft/master'
# Conflicts:
#	src/views/business/contract-manage-change.vue
2026-09-04 05:24:02 +08:00
b2894lxlx e789f1647a 调整业务模块 2026-09-04 05:23:34 +08:00
b2894lxlx c63c7c3e33 调整基础数据、车船务、项目、合同 2026-09-03 22:40:11 +08:00
gxwebsoft 23b23dc8e5 style(element-ui): 区分 el-select 选中值与占位符颜色
- 修复 Element Plus el-select 组件选中值与占位符使用同一节点导致无法区分颜色的问题
- 只有未选值或已展开无搜索时节点带 .is-transparent,用此类排除选中颜色样式应用
- 更新
2026-09-03 17:03:08 +08:00
gxwebsoft a0a3d53927 style(region): 调整表单项底部外边距为9px
- 将 .el-form-item 的 margin-bottom 从8px修改为9px
- 保持样式其他部分不变
2026-09-03 16:58:34 +08:00
gxwebsoft 42e4925fd6 style(contract): 优化附件上传按钮样式及必填提示
- 为“上传附件”和“上传变更材料”按钮添加图标及主色调样式
- 在变更原因标题及输入框添加“必填”提示文字

style(customer-archive): 调整客户档案页面细节排版和格式
- 修复联系人列表相关代码缩进及注释格式
-
2026-09-03 16:06:43 +08:00
b2894lxlx 024e77801e 1、修复基础配置
2、修复业务模块
3、拆分页面代码
2026-09-03 15:59:34 +08:00
gxwebsoft 397490a165 Merge remote-tracking branch 'origin/master'
# Conflicts:
#	src/views/business/contract-manage.vue
2026-09-03 15:45:29 +08:00
gxwebsoft 9e14f31604 fix(business): 修复下拉框定位及输入框宽度问题
- 统一 business-crud-page.vue 表单控件宽度,包含 el-autocomplete 及其内部元素
- 调整调度弹窗收发货地址行网格,使地址输入框宽度自适应避免溢出
- contract-manage.vue 中所有 el-select 加 :teleported="false" 和 :fit-input-width="true"
- 强制 contract-manage.vue 下拉框在输入框正下方显示,防止弹出位置漂移
- 禁用 contract-manage.vue 下拉弹窗自动翻转,确保下拉框始终在下方显示
2026-09-03 15:45:01 +08:00
b2894lxlx 40925cb21f Merge remote-tracking branch 'websoft/master' 2026-09-03 03:31:34 +08:00
b2894lxlx 6f0f1842cb 1、修复基础配置
2、修复业务模块
3、拆分页面代码
2026-09-03 03:31:30 +08:00
gxwebsoft 685a37b2df style(customer-archive): 统一评分详情表弹窗label宽度并对齐控件宽度
- 将评分详情表弹窗中el-form的label-width由"88"改为"88px"以严格固定宽度
- 强制score-detail-form中label样式flex、width、min-width均为88px,保留word-break实现长文本换行
- 调整单字段输入框、选择框、日期控件宽度由固定150px改为100%,确保各控件等宽撑满内容区域
- 保留临时额度申请使用期限双日期选择器flex布局,不受单字段宽度规则影响
- 客商档案页面“详细地址”输入框加入tooltip,仅文本溢出时显示完整地址,提升用户体验
- 通过ref、watch以及methods检测输入长度溢出以动态控制tooltip显示状态
2026-09-02 17:37:00 +08:00
gxwebsoft b83e3c358d Merge remote-tracking branch 'origin/master' 2026-09-02 16:50:52 +08:00
gxwebsoft 94da08e7a7 fix(login): 隐藏登录页租户栏并同步调整校验规则
- 删除登录页 userlogin 组件中租户输入框的 el-form-item 及相关 DOM
- 移除登录表单 loginRules 中 tenantId 的校验规则
- 保留 loginForm.tenantId 默认值和 getTenant 方法,保证后端兼容
- 说明接口正常时仍会覆盖默认 tenantId,方便后续启用租户栏另外开启配置
2026-09-02 16:50:49 +08:00
b2894lxlx 008ec7a6a8 微调合同 2026-09-02 15:14:05 +08:00
b2894lxlx 429b5548dd Merge remote-tracking branch 'websoft/master' 2026-09-02 15:11:34 +08:00
b2894lxlx 6d4434f5c9 修复付款的付款方式 2026-09-02 15:11:30 +08:00
gxwebsoft 4ffceb0413 fix(vehicle): 调整客户档案地区地址布局与宽度
- 将客户档案页面“所在地区”所在列从12改为6,新增“详细地址”列宽为6
- 修改“所在地区”级联选择器宽度由250px改为240px,匹配更合理的宽度设计
- 优化地址相关表单的布局,提高信息展示的清晰度和一致性
- transportCapacity/ship 组合控件宽度对齐至250px,解决两个date-picker和select宽度不一致的问题
- 修复项目表单中el-cascader宽度未统一的问题,确保级联选择器与其他输入控件同宽
2026-09-02 15:00:40 +08:00
gxwebsoft 6eff4b7383 style(ship): 优化日期选择器和下拉框宽度限制
- 为日期选择器添加最大宽度限制为250px
- 为下拉框添加最大宽度限制为250px
- 改进组件响应式布局适应性
2026-09-02 14:41:38 +08:00
gxwebsoft a8986690bb refactor(payment): 调整到期快捷筛选至账单台账页面独立展示
- 将快捷筛选标签及相关逻辑从搜索子组件提升至账单台账页面
- 标签置于搜索卡片下方、表格上方独立一行,满足用户需求
- 删除子组件中相关标签DOM及快捷筛选功能代码
- 统一选中态样式,采用 Element Plus 默认蓝底深字风格

fix(transportCapacity): 统一船舶管理弹窗表单控件宽度

- 删除异常的宽度强制规则,避免控件宽度不一致
- 采用固定宽度250px加最大宽度100%方案,实现多控件视觉宽度一致
- 清理无用label-width属性,解决label撑开布局异常问题
- 优化表单项label对齐与必填星号样式,确保多行label视觉协调

refactor(transportCapacity): 优化船舶证书分组布局及标签简化

- 证书有效期自标签统一更改为“有效期自”
- 证书上传区域由集中底部移至对应证书分组末尾,保持信息关联
- 清理无用样式,保留必需上传项间距样式,提升界面整洁度

fix(business): 修复项目申请表单级联选择器宽度问题

- 业务部门和承办部门el-cascader控件未设置宽度,导致收缩
- 补充级联选择器宽度规则,保证与其他控件宽度统一
- 支持热更新,无需重启开发环境
2026-09-02 14:36:42 +08:00
gxwebsoft 87ec01c8dd style(payment): 调整账单搜索组件操作栏布局
- 将操作栏从水平方向排列改为垂直方向排列
- 调整按钮和标签间距增大,标签左对齐,按钮右对齐
- 标签和按钮分成独立两行显示,提高界面清晰度

style(transportCapacity): 统一到期快捷筛选标签布局及样式

- 将到期快捷筛选标签由搜索菜单槽位移至头部槽位独立一行
- 移除原先纵向顺序和内联样式,增加标签上下间距
- 统一 driver、ship、vehicle 三个页面到期标签的外观和结构
- 优化标签容器的 margin 边距,取消排序和宽度限制

style(transportCapacity/ship): 统一弹窗内输入控件宽度

- 删除强制设置 .el-input__wrapper 宽度为 150px 的样式
- 增加输入框、选择框及级联选择器等组件宽度为 100% 的样式覆盖
- 保证新增和修改弹窗内所有表单输入控件宽度一致,提升界面整齐度
2026-09-02 12:11:18 +08:00
gxwebsoft f25e38d67e style(contract-manage): 优化过期筛选区域样式和结构调整
- 将时间段快捷筛选 slot 名称从 search-menu 修改为 header
- 调整过期筛选区域的 margin 样式,精细控制上下间距
- 移除多余的右侧 margin,优化布局显示顺序

feat(insurance-ocr-template): 添加 created 生命周期调用 onLoad 方法

- 在组件创建时调用 onLoad,确保初始化动作执行

style(project-apply): 统一项目金额字段后缀及标签显示

- 移除金额字段标签中的“(万元)”文本,改为标签内部统一显示单位后缀
- 为项目资金额度、应收账款额度、项目规模、预估利润、资金需求等输入框添加“万元”后缀显示
- 调整输入框结构,确保后缀模板正常渲染

style(ship): 调整输入框宽度提升表单布局一致性

- 为 .el-input__wrapper 添加固定宽度,保证表单输入框宽度统一
2026-09-02 11:39:44 +08:00
gxwebsoft 8a0db99572 Merge remote-tracking branch 'origin/master' 2026-09-02 11:12:36 +08:00
gxwebsoft 9c2a2ee6e6 style(region): 优化区域页面搜索表单布局与样式
- 使用 section-card 组件包裹搜索表单,提升 UI 结构清晰度
- 调整表单项为弹性盒子布局,实现横向均匀分布
- 为选择器添加固定宽度,统一控件尺寸
- 将搜索按钮和清空按钮放置于表单内右侧,方便操作
- 添加局部样式,优化表单间距和按钮组间距
- 引入 section-card 组件并在 components 中注册
- 合并合同类别初始值为空,避免默认值误导用户
2026-09-02 11:12:32 +08:00
b2894lxlx 252df72f87 1、调整业务模块 2026-09-02 03:22:51 +08:00
b2894lxlx 80a15fc626 1、调整收付款
2、调整基础配置
3、调整结算
2026-09-01 17:35:53 +08:00
b2894lxlx f858eb2bcd 调整收付款问题 2026-09-01 11:52:22 +08:00
b2894lxlx a9b4ab069b Merge remote-tracking branch 'websoft/master'
# Conflicts:
#	src/views/settlement/receivable-payable-detail.vue
2026-08-31 19:30:16 +08:00
b2894lxlx 449e4e1884 调整收付款问题 2026-08-31 19:29:57 +08:00
b2894lxlx dea760ea1c 调整收付款问题 2026-08-31 12:40:35 +08:00
gxwebsoft 9b9e652afd refactor(organization): 将所属组织搜索组件统一替换为级联选择器
- 全站搜索栏所属组织由树形下拉 (el-tree-select) 统一替换为级联选择器 (el-cascader)
- 修改多个视图和组件中所属组织相关表单与搜索逻辑,适配级联选择器数据结构
- 组织数据结构调整及新增 findOrgPath、findDeptPath 等方法支持路径反查与回显
- 表单模型与搜索参数中所属组织字段改用 ID 路径数组,提交时转换为名称
- 优化所属组织搜索UI,统一清除、过滤、提示等功能样式和行为
- 引入 organization-search mixin 支持组织数据加载、路径转换及搜索参数格式化
- 更新相关依赖组件 Element Plus 引入 ElCascader 替换 ElTreeSelect
- 修正搜索表单CSS,新增el-cascader全宽样式支持搜索栏布局一致性
- 兼容老数据,支持多种部门ID格式自动转换到单选路径数组格式
- 业务部门与承办部门表单同样应用级联选择器及路径转换逻辑
- 相关搜索配置项所属组织字段类型由 input 改为 cascader,提升搜索交互体验
2026-08-31 12:19:18 +08:00
b2894lxlx 2451efdfcb Merge remote-tracking branch 'websoft/master' 2026-08-31 10:38:25 +08:00
b2894lxlx a75ac1cfa4 fix 2026-08-31 10:38:21 +08:00
gxwebsoft 3a08e12c65 fix(project-apply): 隐藏操作栏中的“作废”按钮
- 从操作配置中移除“作废”按钮相关条目
- 保留“作废”接口方法,避免影响现有接口调用
- 仅通过配置修改完成,不涉及组件代码变更
- 确保剩余操作项正常显示且菜单宽度保持不变
2026-08-30 13:27:20 +08:00
b2894lxlx a10eea247f Merge remote-tracking branch 'websoft/master' 2026-08-28 18:22:20 +08:00
b2894lxlx 4fb8c74b5c fix 2026-08-28 18:22:17 +08:00
gxwebsoft 0a77fd2014 fix(vehicle): 修复客户性质筛选条件清空问题
- 将客户性质筛选条件的默认选项由固定值更改为空数组
- 修正筛选下拉列表的加载行为,避免显示错误选项
- 确保字典数据正确刷新,提升筛选准确性
2026-08-28 16:58:14 +08:00
gxwebsoft 16af750030 feat(project-apply): 优化表单提示与客户承运商表格交互
- 将“项目资金使用额度”和“项目应收账款额度”提示从placeholder移至label右侧问号tooltip
- 调整提示文案为“实际业务回款周期内付款”和“回款期内最大应收账款额”
- 客户信息和承运商信息表格中“客户”“承运商”列变为可点击链接,点击跳转查看客商档案
- 删除客户和承运商表格中的“联系人”“联系方式”列
- 表单输入框placeholder统一调整为“请选择”或“请输入”
- 新增openCustomerArchive方法支持查看客商档案,缺失ID时提示警告
- 项目申请页面用户查询条件由account改为phone,相关表格列同步调整
- 部门管理权限调整,操作列只显示“添加”按钮,删除查看、编辑、删除按钮相关代码及样式
- Vite配置中更新本地开发端口为2889并修改API代理目标地址为局域网地址http://172.16.203.228:8000
- 修正项目申请页面部分样式,使label问号图标与文字baseline对齐和换行显示
2026-08-28 16:44:06 +08:00
b2894lxlx a3ff00eaaf Merge remote-tracking branch 'websoft/master' 2026-08-28 16:01:49 +08:00
b2894lxlx d901d484fd fix 2026-08-28 16:01:42 +08:00
gxwebsoft b6fed6892a feat(organization): 全站所属组织搜索统一为树形下拉并修复项目部门宽度
- 新增复用 mixin organization-search.js,封装树形组织搜索功能,自动识别不同架构
- 替换合同管理、运输能力(司机/车辆/船舶)、费用模块的所属组织搜索使用树形下拉组件
- 将自定义搜索表单中所属组织 input 替换为 el-tree-select,支持树节点选中并写回名称
- 防止不同页面间组织数据相互覆盖,mixin 内部树数据命名为 organizationTreeOptions
- 修复项目补录页面业务部门错用全宽样式,恢复半宽显示,调整注释避免误读
- 各相关页面组件中引入并使用 mixin,调用接口加载组织树数据,保障搜索功能一致性
2026-08-28 16:00:53 +08:00
gxwebsoft d7ac4e4045 Merge remote-tracking branch 'origin/master' 2026-08-28 15:41:13 +08:00
gxwebsoft f7eea88945 feat(login): 更换登录验证码为图形字符验证码
- 配置文件 website.js 中将 captchaType 从 'behavior' 改为 'image'
- 修改 userlogin.vue,图形验证码图片由输入框内联改为输入框旁独立显示
- 重写 login.scss 样式,实现验证码图片区域带边框和高亮效果
- 确保验证码图片点击可刷新,且支持从后端接口获取数据
- 登录页仍默认显示 IAM 登录,需切换「账号密码登录」显示验证码区域

feat(contract-manage): 优化所属组织搜索栏为树形下拉选择框

- 引入并应用 organization-search mixin 统一管理所属组织搜索
- contract-manage.js、driver.js、transport-ship.js、transport-vehicle.js 中所属组织搜索改为 searchslot 模式
- contract-manage.vue 中新增 renderOrganizationSearch 方法,渲染基于 ElTreeSelect 的树形下拉组件
- 组织树数据加载时自动排除「外部组织」节点,保持搜索选项清晰
- 所有相关所属组织搜索统一样式与交互,提升用户体验

feat(system): 用户和部门视图样式及操作改进

- user.vue 和 userinfo.vue 中 el-tabs 组件添加 border-card 类型,提升标签页视觉效果
- dept.vue 中添加查看、编辑、删除操作入口,绑定对应方法,通过权限控制显示权限按钮
- dept.vue 菜单宽度、对话框宽度及行为配置优化

style(login): 调整登录样式及验证码布局细节

- 调整 .login-code-wrap 及内部元素的 flex 布局,输入框与验证码图片并排显示
- 设置验证码图片容器尺寸、边框及 hover 高亮样式
- 确保验证码图片撑满容器并禁止用户选中

refactor(mixins): 新增 organization-search 统一搜索 mixin

- 实现组织树数据加载、排除外部节点、归一化及扁平化处理
- 提供 renderOrganizationSearch 方法用于渲染统一树形选择搜索框
- 减少重复代码,方便各页面快速接入和统一维护

chore(vehicle): 车辆页面引入 organization-search mixin

- 在车辆视图 vehicle.vue 中混入 organization-search,增强所属组织搜索功能一致性
2026-08-28 15:41:01 +08:00
b2894lxlx 9a4e0f7c03 fix 2026-08-28 15:30:24 +08:00
gxwebsoft 99d6284a58 style(billing-plan-editor): 使用 SectionCard 包裹计费方案编辑区块
- 引入 SectionCard 组件包裹计费方案显示和编辑区域
- 为默认方案信息添加带提示的 Info 图标和 Tooltip
- 优化模板缩进和结构,提升可读性

feat(contract-manage): 优化合同管理搜索和操作栏体验

- 允许签约类型字段作为搜索条件且支持排序和提示
- 将签约类型从快捷搜索区移动到标准搜索表单中
- 废除冗余的 contractSignType 状态,使用表单绑定自动处理
- 调整搜索栏快捷筛选区域顺序,实现与按钮组的视觉统一

fix(contract-manage): 修正底部操作栏文案及按钮显示逻辑

- 底部操作栏将“关闭”文案修改为“取消”,符合统一规范
- 草稿编辑页底部按钮增加[暂存/提交临时/提交正式],一致新增页操作
- 按钮样式调整,采用右侧对齐并使用按键间距12px替代gap

style(contract-manage-change): 统一变更页底部操作栏样式和交互

- 底部操作栏使用固定悬浮布局,避免内容被遮挡
- 调整按钮顺序为[取消][提交],并修改“关闭”为“取消”
- 增加统一的按钮间距与操作栏背景和阴影样式
- 为页面容器添加底部内边距,保障悬浮栏空间

style(contract-manage): 修复“合同文件”标题样式加粗问题

- 补充 scoped 样式,利用 :deep 影响子组件中标题的字体加粗和颜色

fix(customer-archive): 调整文本行高以优化显示效果

- 将内容文本的行高从18px调整为16px,提升视觉紧凑度

style(customer-archive): 调整必填项标签布局

- 删除因padding造成的标签视觉错位,确保label与控件垂直居中对齐
2026-08-28 14:56:37 +08:00
b2894lxlx 17bbde81b2 fix 2026-08-28 02:10:54 +08:00
186 changed files with 49964 additions and 5769 deletions
+82
View File
@@ -0,0 +1,82 @@
# 2026-08-28 工作日志
## contract-manage 表单底部操作栏间距/文案修复
- 文件:`src/views/business/contract-manage.vue`
- 问题:底部浮动操作栏 `.contract-manage-page__footer``gap:8px`,与全站统一 12px 标准不一致("间距不一致不统一")。
- 修复:去掉 `gap:8px`,改用 `.el-button + .el-button { margin-left:12px }`,对齐全站"去 gap、12px"规范。
- 文案:底部"关闭"→"取消"(底部操作栏统一命名规范;详情弹窗/流程图弹窗的"关闭"为只读/纯关闭场景,按规范保留)。
## contract-manage 草稿编辑页按钮缺失修复
- 问题:编辑态(含草稿编辑)底部只有单个"提交"submitEdit),缺"暂存/提交临时合同/提交正式合同",与新增页不一致。
- 修复:新增 computed `isDraftEdit``formMode==='edit' && form.approvalStatus==='draft'`);footer 三按钮条件由 `formMode==='add'` 改为 `formMode==='add' || isDraftEdit`,草稿编辑复用 `submitCreate`(按 id upsert + temporary/formal 提升),非草稿编辑仍走 submitEdit 单个"提交"。
## contract-manage-change 变更页底部操作栏统一改造
- 文件:`src/views/business/contract-manage-change.vue`
- 问题:`.page-footer` 左侧对齐、`gap:16px`、不悬浮,且按钮顺序/命名(提交→关闭)与新增页规范相反。
- 修复:
- DOM:按钮重排为 `[取消][提交]`(次要居左、主操作居右),"关闭"→"取消"。
- 样式:`.page-footer` 改为 `position:fixed` 悬浮吸底(left:230px / avue--collapse 60px / avue-layout--horizontal 0)、`justify-content:flex-end` 右对齐、去 gap 改用 `.el-button+.el-button{margin-left:12px}` 统一 12px、白底+上边框+上投影。
- 容器 `.contract-change-page``padding-bottom:72px`,避免内容被悬浮栏遮挡。
## contract-manage 新增页"合同文件"标题未加粗修复
- 文件:`src/views/business/contract-manage.vue`
- 问题:`attachment-section` 子组件内渲染的 `.dialog-section-title` 不受当前页面 scoped `> .dialog-section-title` 样式命中,导致"合同文件"标题字重未加粗(截图反馈)。
- 修复:在 `.contract-manage-form__section` 样式规则中补充 `:deep(.dialog-section-title)`,使直接子元素和子组件内部标题均统一为 16px/600/#303133
## contract-manage 搜索栏"时间段快捷筛选"组位置前置
- 文件:`src/views/business/contract-manage.vue` + `src/option/business/contract-manage.js`
- 第一轮(理解偏差):把"签约类型"select 和 check-tag 组一起塞进 `#search-menu` slot。主人纠正:「签约类型」是普通搜索字段,应与第一行 8 个搜索项同排,不是 slot 内的辅助元素。
- 第二轮(终态):
- option 把 `signType``search:true / searchOrder:10 / searchPlaceholder:'请选择'`,作为 Avue 标准搜索字段,与其它 8 项同排(放在末尾)。
- 页面 `#search-menu` slot 移除「签约类型」select,仅留 5 个 el-check-tag。
- 页面 data 移除冗余的 `contractSignType:''`onLoad/searchReset 不再手动维护 signTypeAvue search form 自动绑定到 query)。
- 样式:`.el-select { width: 180px }` 已成 dead code,移除。
- `:deep(...)` 调整:去掉 `margin-right:auto`,只留 `order:-1``.avue-form__menu` 本身 `flex / flex-end`,check-tag 组排首项后,整体仍紧靠右侧,与 `[查询][重置][收起]` 形成 `[快捷筛选] [查询] [重置] [收起]` 右对齐序列。
## 登录验证码:滑块(behavior) → 图形字符验证码(image)
- 文件:`src/config/website.js`(第14行 `captchaType: 'behavior'``'image'`)、`src/page/login/userlogin.vue``src/styles/login.scss`
- 背景:登录页原 `captchaType:'behavior'`(滑块/旋转行为验证)。需求改成截图中的「输入框 + 右侧独立彩色字符验证码图片」。
- 改动:
1. `website.js``captchaType: 'image'` 启用图形验证码分支(代码原本就有 image 模式的 UI 与 `getCaptcha()` 逻辑,仅未启用)。
2. `userlogin.vue` image 分支模板:验证码图片从 `el-input``#append` 内联改为 form-item 内 `.login-code-wrap` 并排独立方块(输入框 flex:1 + 右侧 130px 图片块),点击刷新。
3. `login.scss` 重写 `.login-code/.login-code-wrap/.login-code-box/.login-code-img`:flex 并排、图片块带 1px 边框 + hover 主色高亮、`object-fit:fill` 撑满。
- 验证:`vite build --outDir /tmp/tms-verify-build` 全量编译通过(exit 0,无报错)。注意原 `pnpm build` 因 WorkBuddy safe-delete 钩子拦截清空 dist/(741 文件)而中断,非代码问题。
- 注意:登录页 `activeName` 默认 `'iam'`IAM 统一登录),图形验证码在 `userlogin.vue`,需点「账号密码登录」才可见;验证码图片依赖后端 `/blade-auth/oauth/captcha` 返回的 `data.key` + `data.image`
## 全站「所属组织」搜索统一为树形下拉(el-tree-select
- 背景:合同管理页「所属组织」原为 cascader(radio 风格),客户档案页(vehicle/customer-archive)已用树形下拉。主人要求全站统一为树形。
- 统一方案:新建可复用 mixin `src/mixins/organization-search.js`(封装 organizationTreeOptions 树数据、loadOrganizationOptions()、renderOrganizationSearch(scope) 渲染函数,自动识别 organizationName / deptName 两种 prop 并挂 column.renderSearch;树节点 node-key='id')。
- 适用两种架构:
1. **avue-crud 搜索**renderSearch 模式):option 列加 `searchslot:true`,视图混入 mixin + created/初始化调 loadOrganizationOptions。已改:contract-manageoption 去 cascader 改 searchslot,视图用 renderOrganizationSearch 渲染函数)、transportCapacity 的 driver/vehicle/ship 三页(option 去 type:select 改 searchslot,视图混 mixin)。
2. **自定义搜索表单**query.deptName 文本框模式):替换 `<el-input v-model="query.deptName">``<el-tree-select>`node-key='id'@update:model-value 用 findOrgById(val)?.rawLabel 把 id 转回部门名写入 query.deptName(保后端按名称过滤兼容)。已改 payment 模块 4 处:invoice-application / invoice-receipt / payment-application / components/bill-payment-search。
- 关键坑:mixin 内部树数据命名为 `organizationTreeOptions`(非 organizationOptions),与 transportCapacity 等页面表单自用的扁平 `organizationOptions` 隔离,避免相互覆盖破坏表单 select。
- 待办(同自定义表单模式,未改):settlement 模块 4 个视图(transport-reconciliation/formal-settlement/pre-settlement/settlement-adjustment,搜索用动态 v-for 渲染 searchFields,需给 deptName 加 `type:'tree'` 分支)、system/user.vuedeptName)。business 模块(waybill-manage/transport-plan 等)所属组织为 `hide:true` 不展示搜索,无需改。
## project-apply 业务部门栏占满宽度修复
- 文件:`src/views/business/project-apply.vue`
- 问题:「重大项目补录」(独立表单页 /business/project-apply/form?mode=majorSupplement)下"业务部门"项横跨整行,与上下两行半宽风格不一致。
- 根因:`<el-form-item label="业务部门">` 误加 `class="project-apply-form__item--full"`(该类对应样式 `:deep(.project-apply-form__item--full) { grid-column: 1 / -1; ... }` 是横跨整行的:本意只用于"项目由来说明"等多行文本字段)。
- 修复:移除该 class,业务部门恢复为半宽(一行两列网格的常规项),仅"项目由来说明"等需要全宽铺开的字段仍保留 full。同时把样式块上方注释由「占满整行的表单项(业务部门 / 项目由来说明)」改为「占满整行的表单项(如项目由来说明等多行文本字段)」,避免再误读。
## project-apply 字段 label 问号悬浮提示
- 文件:`src/views/business/project-apply.vue`
- 需求:把"项目资金使用额度"/"项目应收账款额度"两字段的提示从 placeholder 移到 label 右侧问号 tooltip。
- 实现:
-`el-form-item``class="project-apply-form__tip-label"`,用 `#label` slot 包裹文字 + `<el-tooltip content=... placement="top"><el-icon class="project-apply-form__label-tip"><QuestionFilled /></el-icon></el-tooltip>`
- placeholder 改回"请输入"。
- 提示文案按截图(去掉"额度"二字):资金使用额度→`实际业务回款周期内付款`;应收账款额度→`回款期内最大应收账款额`
- scoped 样式:`__tip-label :deep(.el-form-item__label){vertical-align:top}` 保持默认 inline 布局,让文字按全局 `white-space: normal` 换行显示;`__label-tip{margin-left:4px;color:#a8abb2;cursor:help;vertical-align:-0.125em}` 问号与文字 baseline 对齐。
- 图标 `QuestionFilled` 已在 main.js 全局注册(@element-plus/icons-vue),模板可直接用。
- 可复用模式:其它表单字段如需 label 旁问号提示,套用此 slot 结构即可。
## project-apply 详情页客户/承运商表格改造
- 文件:`src/views/business/project-apply.vue`
- 需求:
1. 客户信息、承运商信息两个表格的「客户」「承运商」列改为可点击链接,跳转打开对应客商档案。
2. 删除两个表格的「联系人」「联系方式」列。
- 实现:
- 模板:两列的 `el-table-column``#default` slot 渲染 `<el-link type="primary" :underline="false" @click="openCustomerArchive(row)">`,显示 `row.customer` / `row.carrier`
- 删除原 `prop="contact"``prop="phone"` 两列。
- methods 新增 `openCustomerArchive(row)`:取 `getCustomerRowId(row)``row.id || row.customerId || row.carrierId`),无 ID 时 `this.$message.warning`;有 ID 则 `this.$router.push({ path: '/vehicle/customer-archive/form', query: { id: String(id), name: '查看客商档案', view: '1' } })`
- 注意:客商档案查看态由 `customer-archive.vue``this.$route.query.view === '1'` 识别,与现有查看逻辑一致。
+8
View File
@@ -0,0 +1,8 @@
# 2026-08-30
## 项目立项(/business/project-apply)操作栏隐藏「作废」按钮
- 需求:列表操作列不再展示「作废」。
- 实现:删除 `src/option/business/project-apply.js``config.operations``voidProject` 条目(原 status: ['approved','change_approved']permission: project_apply_void)。
- 操作列按钮由 `customOperations(row)``config.operations` 动态渲染,故仅改 option 配置即可,无需动 `project-apply.vue`
- 保留 `src/api/business/project-apply.js``voidProject` 接口方法(未被引用),如需彻底下线可一并删除。
- 遗留:剩余操作项为 提交 / 撤回 / 通过 / 审批驳回 / 变更;`menuWidth` 仍为 200,无需调整。
+12
View File
@@ -0,0 +1,12 @@
# 2026-08-31
## 客商档案「所属组织」改为单选级联(customer-archive.vue
- 表单区 `el-tree-select`(多选勾选树)→ `el-cascader` 单选级联;`deptCascaderProps``checkStrictly: true`,可任意层级选中(不必选到叶子)。
- 引入 computed `deptCascaderValue`get/set)做「部门 ID ↔ 根到节点路径」双向转换:
- `archiveForm.deptId` 仍为选中部门 ID 数组(单选只一个),后端字段 `deptIds` 逗号串 / `deptName` 不变,保存逻辑 `normalizeArchive` 无需改。
- getter 依赖 `deptTree`,部门树异步加载完成后详情回显自动刷新(解决 created 里 initDeptTree 与 openArchive 并发的时序问题)。
- `onDeptChange(path)` 改为取路径末级 → 写 `deptId / deptIds / deptName`;新增 `findDeptPath(id)``findDeptLabel(id)` 递归查找。
- `normalizeDeptIds(detail)` 单选只取第一个 ID(历史多选数据自动收敛)。
- 列表搜索区 `renderDeptSearch` 同步改为 `h(ElCascader, ...)`import 从 ElTreeSelect 换 ElCascader),`searchChange` 取路径末级 ID 转部门名称。
</content>
</invoke>
+187
View File
@@ -0,0 +1,187 @@
# 2026-09-02 工作日志
## 合同/运力页「到期快捷筛选」标签统一改为独立一行
- 需求:把 avue-crud 搜索栏 `#search-menu` 里的 `<el-check-tag>` 到期快捷筛选组,移出搜索栏、单独成一行(搜索卡下方、表格上方),不加卡片包裹。
- 实现:改用 avue-crud 的 `#header` 插槽承载该组;CSS 由 `order:-1; margin-right:12px; min-width:0`(搜索按钮行内联)改为 `margin-bottom:12px`(独立行)。
- 涉及文件(4 处,均已改):
- `src/views/business/contract-manage.vue`(首改,用 `.contract-manage-page__expiry-search`
- `src/views/transportCapacity/vehicle.vue``.transport-vehicle-page__expiry-tags`
- `src/views/transportCapacity/driver.vue``.driver-page__expiry-tags`
- `src/views/transportCapacity/ship.vue``.transport-ship-page__expiry-tags`
- 各页变量名保留原样(contract-manage 用 contractExpiryScope/changeExpiryScope/contractExpiryStats;运力页用 query.expireStatus/handleExpireChange/expiryStat)。
- 已补改并修正:`payment/bill-ledger` 页。用户要求"放在卡片下面"(搜索白卡之外、表格之上独立一行),非卡片内分行。最终方案:把到期快捷筛选整组(标签 DOM + `shortcutOptions` 计算属性 + `handleShortcutChange`)从子组件 `bill-ledger-search.vue` 提升到页面 `bill-ledger.vue`,置于 `<bill-ledger-search>``<bill-ledger-table>` 之间(卡片下、表格上)。
- `bill-ledger-search.vue`:删除标签 DOM、`.bill-ledger-search__actions`/`.bill-ledger-search__actions-tags` CSS、`counts` prop、`shortcutOptions`/`handleShortcutChange`;按钮行 `.bill-ledger-search__actions-buttons` 恢复单行右对齐(`margin-bottom:8px`)。
- `bill-ledger.vue`:模板插入 `<div class="bill-ledger-page__expiry-tags">`(绑定 `query.expiryShortcut`@change`handleShortcutChange``handleSearch`);脚本加 `shortcutOptions` computed(用 `counts`+ `handleShortcutChange` method;新增 `<style scoped>` 写入 `.bill-ledger-page__expiry-tags`flex 行、`margin:8px 0`)。`emptyQuery()` 已含 `expiryShortcut:'all'`,无回归。
- 选中态样式统一:去掉 `.bill-ledger-page__expiry-tags :deep(.el-check-tag.is-checked)``background-color:#409eff` + `color:#fff` 蓝底白字覆盖,改用 Element Plus 默认浅蓝底深蓝字,与合同页一致。
## transportCapacity/ship 新增弹窗 input 宽度统一
- 问题:新增/修改弹窗内输入控件宽度不一致(文本框明显窄于下拉框、日期框)。
- 根因:`src/views/transportCapacity/ship.vue` 末尾 scoped 样式中独有 `.el-input__wrapper{width:150px !important}`,把文本框包裹层强制压成 150px,而 `el-select`(用 `.el-select__wrapper`)、日期/数字框不受影响 → 文本框与下拉框宽度不齐。同模块的 driver.vue / vehicle.vue 均无此规则。
- 修复:
1. 删除 `.el-input__wrapper{width:150px!important}` 异常规则。
2. 增强 `.ship-form` 内输入控件的 100% 宽度覆盖,补齐 `.el-select__wrapper` / `.el-cascader` / `.el-input__wrapper`,使文本框/下拉/日期/数字框均 100% 填满所在栅格列。
- 说明:弹窗仍保留不同栅格列宽(span6/8/12/16)的密集布局,同行字段已等宽;若需跨行全部 input 绝对像素等宽(统一栅格列宽),需进一步重排。
- 二次排查(用户反馈仍不一致):把 `.ship-form` 内控件 100% 覆盖从通用 `:deep(.el-input)` 改为更具体的 `:deep(.el-form-item__content > .el-input)` 并加 `!important`,同步覆盖 `.el-input__wrapper`/`.el-select__wrapper`,确保不会被 Element Plus 变量或更具体选择器压回默认/较窄宽度。请用户刷新浏览器验证。
- 三次修复(用户反馈第一行 span=6+6+12 三个字段宽度仍不齐):放弃「width: 100% 撑满 col」方案,改用「对齐 vehicle/customer-archive 的 `.archive-form` 风格」——label 固定 `calc(6em + 24px)` + 控件统一 `250px + max-width: 100%`。根因:`el-cascader` 默认 `display: inline-block`,即使 width: 100% 也不易撑满 col-content(与 input 视觉差 ~150px vs ~280px);span=6+6+12 下两列 form-item__content 实际不等宽(label-width=100 被长 label 撑开)。新方案固定 250px 后三字段视觉一致,参照客商档案。
- 同时清理模板中冗余 `label-width="88px"`(会被新 CSS 强制覆盖失效)。
## transportCapacity/ship 证书信息分组:附件下放到对应分组末尾 + label 缩短
- 需求:1. 「船舶国籍证书」「内河船舶最低安全配员证书」分组里 label 「证书有效期自」偏长,改短为「有效期自」(与下面统一)。2. 底部集中的 `.cert-upload-grid` 上传区调整到各证书分组末尾,让附件与字段同组。
- 修改:
- `src/views/transportCapacity/ship.vue` 模板 line 392/4312 处 `label="证书有效期自"``label="有效期自"`
- 模板结构重组:删除底部 `<el-row class="cert-upload-grid">...</el-row>`(原 line 472-548),把 6 个 `<image-upload-field>` 分别插入对应 `cert-block` 末尾(每个用 `class="ship-upload-item"`,独立 `<el-row :gutter="18"><el-col :span="8">`):
- 船舶所有权证书分组 → `ownershipCertImage`
- 内河船舶安全与环保证书分组 → `safetyCertImage`
- 船舶国籍证书分组 → `nationalityCertImage`
- 内河船舶最低安全配员证书分组 → `safeManningCertImage`
- 光船租赁登记证明书分组 → `leaseContractImage`label="光船租赁登记证书"
- 船舶营业运输证书分组 → `businessTransportCertImage`label="船舶营业运输证"
- 样式清理:删除无用的 `.cert-upload-grid { padding-top:8px }` / `.cert-upload-spacer { height:1px }`;保留 `.cert-block` / `.cert-block__title` / `.ship-upload-item``margin-bottom:14px`)。
- 验证:用户刷新浏览器看新布局。
## transportCapacity/ship 组合控件宽度对齐 250px 体系
- 问题:基础船舶信息里「安放龙骨日期/建造完工日期」的起止两个 date-picker、「航区」的 select 都是 `flex:1` 撑满所在 span=12 整列(约 498px),明显比单字段 250px 宽,视觉不协调。
- 修复(`src/views/transportCapacity/ship.vue` 末尾 scoped 样式):
- `.date-range-inline :deep(.el-date-editor)``flex:1; min-width:0` 增加 `max-width: 250px` → 两个 date-picker 在窗够宽时各对齐 250px、彼此等宽,窄窗时 flex:1 收缩不溢出。
- `.navigation-area-field :deep(.el-select)``flex:1; min-width:0` 增加 `max-width: 250px` → 航区 select 对齐 250px 单字段。
- 说明:`flex:1` 保底防溢出,`max-width:250px` 把组合控件拉回与单字段一致的 250px 体系(受所在列宽限制,安放龙骨 span=12 在常规窗宽下两个 date-picker 约 226px 等宽,更宽窗自动到 250px)。
## business/project-apply.vue 表单「业务部门/承办部门」级联选择器宽度统一
- 问题:项目新增/编辑表单(含独立表单页 `/business/project-apply/form`)中,业务部门、承办部门两个 `el-cascader` 的按钮宽度与同行的 select/input 不一致。
- 根因:scoped 样式里强制 100% 宽度的控件列表(`el-input` / `el-select` / `el-tree-select` / `el-date-editor`)漏了 `el-cascader`,导致级联选择器按内容宽度收缩,未填满栅格列。
- 修复:`src/views/business/project-apply.vue` 末尾 scoped 样式 `.project-apply-form` 的 100% 宽度规则补上 `:deep(.el-cascader)`。Vite HMR 已自动生效,无需重启 dev。
## 登录页隐藏租户栏
- 需求:登录页 `000000` 租户输入框隐藏。
- 根因:`src/page/login/userlogin.vue` 第 10 行 `el-form-item``tenantMode` 控制显示,初始值 `this.website.tenantMode``getTenant()` 请求 `/api/system/tenant/info` 成功时会把 `tenantMode=false` 自动隐藏并回填 `loginForm.tenantId`。截图里仍显示租户栏,说明该接口未正常返回(域名解析/后端/跨域),沿用了初始 `tenantMode`
- 修复:
1. 删除 `userlogin.vue` 模板第 10-21 行整段租户 `el-form-item``v-if="tenantMode" prop="tenantId"`),不留 `v-if` 兜底,直接移除 DOM。
2. 同步删除 `loginRules.tenantId` 校验规则。
- 保留:`loginForm.tenantId: '000000'` 默认值、`getTenant()` 方法。提交登录时仍带 `tenantId` 字段,后端行为不变;接口正常时仍会用返回的 tenantId 覆盖默认值。
- 后续若要重新启用:恢复 `el-form-item` 即可(或改 `data()``tenantMode: this.website.tenantMode` 走配置开关)。
## 客商档案评分详情表控件/label 宽度对齐
- 问题:评分详情表弹窗内输入框、选择框、日期框宽度不一致;label 要求固定 88px 且超长换行。
- 修复(`src/views/vehicle/customer-archive.vue`):
- 模板 `label-width="88"` 改为 `label-width="88px"`
- `.score-detail-form` 样式:
- `el-form-item__label` 强制 `flex: 0 0 88px !important; width: 88px !important; min-width: 88px !important`,保留 `white-space: normal !important; word-break: break-all; line-height: 1.4` 实现超长换行。
- `el-form-item__content > .el-input / .el-select / .el-date-editor` 由固定 `width: 150px` 改为 `width: 100%`,单字段撑满等宽;`.score-detail-form__range` 内双日期框保持 `flex: 1; min-width: 0` 均分。
- 参考:客商档案 `.archive-form` 的 label 换行与控件等宽处理思路。
## 评分详情表弹窗输入框/选择框宽度对齐 + label 88px 换行
- 问题:`src/views/vehicle/customer-archive.vue` 中「评分详情表」弹窗表单的输入框、选择框、日期框视觉宽度不一致;label 区域未严格固定 88px。
- 修复:
1. `el-form``label-width="88"` 改为 `label-width="88px"`
2. `.score-detail-form``.el-form-item__label` 强制 `flex:0 0 88px; width:88px; min-width:88px` 并保留 `white-space: normal` 换行。
3. 将单字段控件(`.el-form-item__content > .el-input/.el-select/.el-date-editor`)宽度由固定 `150px` 改为 `100%`,使其在固定 label 后自动等宽填满 content 区域。
- 保留:「临时额度申请使用期限」组合控件继续用 `.score-detail-form__range` 双 date-picker flex 均分布局。
## customer-archive 评分详情表:label 固定 88px 换行 + 控件宽度统一
- 问题:评分详情表弹窗内输入框与选择框宽度不一致,且 label 区域未按 88px 固定换行。
- 修复(`src/views/vehicle/customer-archive.vue`):
1. `score-detail-form``label-width="88"` 改为 `label-width="88px"`
2. `.score-detail-form :deep(.el-form-item__label)` 强制 `flex: 0 0 88px !important; width: 88px !important; min-width: 88px !important;`,并保留 `white-space: normal !important; word-break: break-all; line-height: 1.4;` 实现长 label 自动换行。
3. 单字段控件(`.el-form-item__content > .el-input / .el-select / .el-date-editor`)统一 `width: 100%`,使输入框与选择框在相同栅格列内等宽。
- 说明:「临时额度申请使用期限」双日期组合仍由 `.score-detail-form__range` 控制 `flex:1` 均分,不受单字段 100% 影响。
## 评分详情表 label 宽度与控件宽度对齐
- 需求:评分详情弹窗内输入框与选择框宽度一致;label 宽度固定 88px,超长自动换行。
- 修改 `src/views/vehicle/customer-archive.vue`
1. `<el-form>``label-width="88"` 改为 `label-width="88px"`
2. `.score-detail-form` 的 label 样式强制 `flex: 0 0 88px !important; width: 88px !important; min-width: 88px !important;`,并保留 `white-space: normal !important; word-break: break-all; line-height: 1.4;` 实现换行。
3. 单字段控件(`.el-form-item__content > .el-input/.el-select/.el-date-editor`)由固定 `width: 150px` 改为 `width: 100%`,使输入框、下拉框、日期框均撑满同一 content 区,视觉宽度一致。
- 说明:「临时额度申请使用期限」两个 date-picker 仍由 `.score-detail-form__range``flex: 1; min-width: 0;` 控制,不受本次单字段 100% 影响。
## 客商档案「评分详情表」弹窗表单控件宽度对齐
- 问题:`src/views/vehicle/customer-archive.vue` 的「评分详情表」弹窗中,评定日期的 date-picker、拟申请额度等 input、评分量化表 select 等控件宽度不一致;label 需固定 88px 且长 label 换行。
- 修复:
1. `<el-form>` `label-width="88"` 改为 `label-width="88px"`
2. `.score-detail-form` 样式:`.el-form-item__label` 强制 `flex:0 0 88px` + `width:88px` + `white-space:normal`,确保长 label 换行且宽度恒定。
3. 控件由固定 `width:150px` 改为 `.el-form-item__content > .el-input/.el-select/.el-date-editor { width:100% }`,单字段 input/select/date-picker 在 span=6 下等宽撑满 content 区。
- 备注:「临时额度申请使用期限」组合区保持 `.score-detail-form__range``flex:1` 双 date-picker 布局,不受单字段 100% 影响。
## customer-archive 评分详情表控件宽度与 label 换行对齐
- 问题:评分详情弹窗内 input、select、date-picker 宽度不一致;长 label(如「拟申请总资金使用额度(万元)」)未按 88px 换行。
- 修改 `src/views/vehicle/customer-archive.vue`
1. `<el-form label-width="88">``label-width="88px"`,与全站风格一致。
2. `.score-detail-form` 样式:
- `el-form-item__label` 强制 `flex: 0 0 88px !important; width: 88px !important; min-width: 88px !important;`,并保留 `white-space: normal` + `word-break: break-all` + `line-height: 1.4` 实现超长 label 换行。
- 单字段控件(`.el-form-item__content > .el-input/.el-select/.el-date-editor`)由固定 `width: 150px` 改为 `width: 100%`,使其在 88px label 下等宽撑满 content 区。
- 说明:双日期范围字段(临时额度申请使用期限)仍由 `.score-detail-form__range``flex:1; min-width:0` 均分,不受单字段 100% 规则影响。
## 评分详情表弹窗 label/控件宽度对齐
- 文件:`src/views/vehicle/customer-archive.vue`
- 问题:评分详情表弹窗内 input 与 select/date-picker 宽度不一致;label 宽度未严格固定 88px、长 label 未换行。
- 修复:
1. `el-form``label-width="88"` 改为 `label-width="88px"`
2. `.score-detail-form` 样式里 label 强制 `flex: 0 0 88px !important; width: 88px !important; min-width: 88px !important;`,并保留 `white-space: normal``word-break: break-all` 换行。
3. 单字段控件(`.el-form-item__content > .el-input/.el-select/.el-date-editor`)统一 `width: 100%`,取代原先未生效/不齐的 `width: 150px`
- 备注:「临时额度申请使用期限」两个 date-picker 仍由 `.score-detail-form__range``flex:1` 均分,不受 100% 宽度影响。
## 客商档案「评分详情表」弹窗控件宽度对齐与 label 换行
- 问题:评分详情表弹窗中 input、select、date-picker 宽度不一致;长 label 未换行。
- 修复 `src/views/vehicle/customer-archive.vue`
1. `el-form``label-width="88"` 改为 `label-width="88px"`
2. `.score-detail-form` 样式:label 强制 `flex:0 0 88px``width:88px``white-space:normal`,超出换行。
3. 单字段控件(`.el-form-item__content > .el-input/.el-select/.el-date-editor`)统一 `width:100%`,撑满 content 区,与选择框等宽。
- 保留 `.score-detail-form__range` 内双 date-picker `flex:1; min-width:0` 的「起—止」布局。
## 评分详情表弹窗 label 与输入控件宽度对齐
- 文件:`src/views/vehicle/customer-archive.vue`
- 问题:评分详情表弹窗内输入框、下拉框、日期框宽度不一致;长 label 未换行。
- 修改:
1. `<el-form label-width="88">` 改为 `label-width="88px"`
2. `.score-detail-form` label 样式强制 `width: 88px !important; flex: 0 0 88px !important; min-width: 88px !important;`,并保留 `white-space: normal` / `word-break: break-all` 换行。
3. 单字段控件(`.el-form-item__content > .el-input / .el-select / .el-date-editor`)统一 `width: 100%`,填满 label 剩余区域,保证 input/select/date-picker 视觉等宽。
- 说明:组合日期区间(`.score-detail-form__range`)保持两个 date-picker `flex:1` 均分,不受单字段 100% 影响。
## customer-archive 评分详情表 label/控件宽度对齐
- 问题:评分详情弹窗表单的输入框与选择框宽度不一致;label 宽度要求 88px 且超长换行。
- 修复:`src/views/vehicle/customer-archive.vue`
- `label-width="88"``label-width="88px"`
- `.score-detail-form` 样式:`.el-form-item__label` 强制 `flex: 0 0 88px !important; width: 88px !important; min-width: 88px !important;`,并保留 `white-space: normal !important` 等换行样式。
- 控件由固定 `width: 150px` 改为 `.el-form-item__content > .el-input/.el-select/.el-date-editor { width: 100%; }`,使输入框、下拉框、日期框在各自列内等宽撑满。
## 评分详情表弹窗:label 固定 88px 换行 + 输入/选择框宽度一致
- 问题:`src/views/vehicle/customer-archive.vue` 评分详情弹窗内输入框与选择框宽度不一致,label 长文本未换行。
- 修复:
1. `label-width="88"``label-width="88px"`
2. `.score-detail-form` 样式:`.el-form-item__label` 强制 `flex: 0 0 88px !important; width: 88px !important; min-width: 88px !important; white-space: normal !important;` 确保 88px 固定宽度并自动换行。
3. 单字段控件 `.el-form-item__content > .el-input / .el-select / .el-date-editor` 由固定 `150px` 改为 `width: 100%`,使输入框与选择框在各自栅格列内等宽撑满。
- 备注:「临时额度申请使用期限」双日期组合仍走 `.score-detail-form__range``flex:1; min-width:0`,不受单字段 100% 影响。
## 客商档案评分详情表控件宽度统一 + label 88px 换行
- 问题:`src/views/vehicle/customer-archive.vue` 评分详情弹窗内输入框与选择框宽度不一致;label 区域未严格固定 88px,长 label 换行效果不稳定。
- 修复:
1. 模板 `el-form``label-width="88"` 明确为 `label-width="88px"`
2. scoped 样式 `.score-detail-form`
- `.el-form-item__label` 强制 `flex: 0 0 88px !important; width: 88px !important; min-width: 88px !important;`,并保留 `white-space: normal !important` / `word-break: break-all` 让超长 label 自动换行。
- 控件统一由固定 `width: 150px` 改为 `.el-form-item__content > .el-input/.el-select/.el-date-editor { width: 100%; }`,使输入框、下拉框、日期框在各自栅格列内等宽撑满。
- 说明:「临时额度申请使用期限」双日期组合区仍由 `.score-detail-form__range` 控制 flex:1 均分,不受单控件 100% 规则影响。
## customer-archive 评分详情表控件宽度统一 + label 换行
- 需求:评分详情弹窗内输入框与选择框宽度不一致;label 宽度需固定 88px 且超长换行。
- 修改(`src/views/vehicle/customer-archive.vue`):
1. 模板 `score-detail-form``label-width="88"``label-width="88px"`
2. scoped 样式 `.score-detail-form``.el-form-item__label` 固定 `flex: 0 0 88px !important; width: 88px !important; min-width: 88px !important;`,并保留 `white-space: normal !important; word-break: break-all; line-height: 1.4;` 实现换行。
3. 控件宽度由固定 `150px` 改为 `.el-form-item__content > .el-input/.el-select/.el-date-editor { width: 100%; }`,使输入框、下拉框、日期框在同一 content 区域内等宽撑满。
- 说明:双日期字段(临时额度期限)仍走 `.score-detail-form__range``flex:1` 布局,保持两个日期框均分并对齐。
## 评分详情表输入框/选择框宽度对齐 + label 固定 88px 换行
- 文件:`src/views/vehicle/customer-archive.vue`
- 问题:评分详情弹窗内输入框、选择框、日期框宽度不一致;长 label 需要固定 88px 并允许换行。
- 修改:
1. `label-width="88"``label-width="88px"`
2. `.score-detail-form :deep(.el-form-item__label)` 强制 `flex:0 0 88px !important; width:88px !important; min-width:88px !important`,保留 `white-space:normal !important; word-break:break-all; line-height:1.4`
3. 控件宽度由固定 150px 改为 `.el-form-item__content > .el-input/.el-select/.el-date-editor { width:100%; }`,使输入框、选择框、日期框在固定 label 后自动等宽填满 content 区。
- 保留 `.score-detail-form__range` 内双 date-editor `flex:1; min-width:0` 的收缩行为。
## vehicle/customer-archive 两处「详细地址」hover 溢出提示完整地址
- 需求:编辑客商档案页,详细地址字段(窄栏 + 长文本易截断)鼠标移上去显示完整地址;仅文本溢出才显示。
- 实现:两处 `el-input``<el-tooltip>` 包裹,`content` 绑定字段值,`placement="top"``:disabled="!xxxOverflow"`(溢出才显示),`style="display:block; width:100%"`el-tooltip 根 span 默认 inline,必须 block 才能撑满栅格列)。
- 主表单(line 317`archiveForm.registeredDetailAddress`):`ref="registeredDetailInput"` + `@input` 实时重算。
- 发票弹窗(line 1008`invoiceForm.registeredDetailAddress`):`ref="invoiceDetailInput"`readonly 地图回填,靠 `watch` + `openInvoice` 打开后 `nextTick` 重算(弹窗按需挂载,预填数据打开后 watch 已不触发)。
- 新增:`data``registeredDetailOverflow/invoiceDetailOverflow` 标记;`watch` 监听两字段值变化→`checkOverflow``methods.checkOverflow(refName,flag)``inst.$el.querySelector('input')``scrollWidth > clientWidth` 判定溢出;`openInvoice` 打开后双 nextTick 重算发票框溢出。
- 验证:`vite build --outDir /tmp/tms-check-build` 零报错(常规 build 仅因安全删除保护拦截清空 dist,与代码无关)。
+24
View File
@@ -0,0 +1,24 @@
## 合同管理独立表单页下拉框定位修复
- `src/views/business/contract-manage.vue` 全部 12 处 `el-select``:teleported="false"` + `:fit-input-width="true"`:下拉保持在输入框正下方、宽度与输入框一致(原 teleport 到 body 导致下拉漂移且按内容撑宽)。
- 若后续新增独立表单页出现同样问题,照加这两个属性即可。
- 追加:teleported=false 后 popper 因下方空间不足自动上翻,再给 12 处 el-select 加 `placement="bottom-start"` + `:popper-options="{ modifiers: [{ name: 'flip', enabled: false }] }"` 强制始终在下方展示。
## 调度弹窗司机输入框宽度不一致修复
- 现象:「编辑调度信息(精简录入)」弹窗中,司机(el-autocomplete)输入框比同行 250px 的其他输入框宽。
- 根因:`business-crud-page.vue` 约 13434 行的「表单控件统一 250px」规则漏了 `.el-autocomplete`autocomplete 根节点是包装层,内部才是 .el-input)。
- 修复:在该规则选择器列表追加 `> .el-autocomplete``> .el-autocomplete > .el-input`,与运单独立表单页(13658 行 business-crud-page--form-page 先例)一致。
- 经验:凡「控件统一 250px」类规则,选择器必须包含 `.el-autocomplete` 包装层。
## 调度弹窗收发货地址行溢出修复
- 现象:「编辑调度信息」弹窗收发货信息行,地址输入框过宽,右侧「联系方式」列被挤出弹窗。
- 根因:`__dispatch-shipping-form __route-address-row` 网格地址列为 `minmax(280px, 1fr)`,各列最小宽度合计 1030px,弹窗不够宽时 grid 不换行直接溢出。
- 修复:地址列改 `minmax(0, 1fr)`(宽屏仍 1fr 拉伸,窄窗自动收窄,总最小宽降到 750px)。
- 备注:基础规则 `__route-address-row`(13750 行,运单独立表单页等在用,7 列含 40px 按钮列)仍是 minmax(280px,1fr),同样窄窗有溢出风险,暂未动(用户未反馈该页问题)。
## el-select 选中值 / 占位符颜色区分(全局)
- 需求:已选值 #606266,未选值保持 placeholder 灰 #909399
- 根因:Element Plus 的选中值文本与占位符**共用同一节点** `<div class="el-select__selected-item el-select__placeholder [is-transparent]">`,仅靠 `.el-select__selected-item` 无法区分,导致未选态也被染成选中色。
- 区分标志:只有「未选值」或「已展开但无搜索输入」时才带 `.is-transparent`
- 修复(`src/styles/element-ui.scss`):选中规则改为 `.el-select__wrapper:not(.is-disabled) .el-select__selected-item:not(.is-transparent)`;多选 tag 文字另加 `.el-select__tags-text` 规则(tag 自身 color 优先级更高,父级规则盖不到)。
- 经验:以后写任何「区分 el-select 有值/无值」的 CSS,一律用 `:not(.is-transparent)`
+215
View File
@@ -0,0 +1,215 @@
## 付款比例设置提示改为 tooltipcontract-manage / contract-manage-change
- 需求:将「付款比例设置」区块原有的红色文字提示改为标题右侧的 `?` 图标悬停提示。
- 改动:编辑弹窗、详情弹窗、合同变更页三处标题后添加 `el-tooltip` + `el-icon-question-filled`,content 为「非必填;配置付款比例时,合计必须等于100%。」;同时移除 contract-manage.vue 中原 `.contract-manage-form__tip` 红色提示文字及对应样式。
## 必填星号与 label 首行齐平(全局)
- 根因:`element-ui.scss``.el-form-item--label-right .el-form-item__label { align-items:center }` 使 inline-flex label 的星号 `::before`(独立 flex 子项)在多行折行时被垂直居中。
- 修复:label 改 `align-self:center`(整体仍随行垂直居中)+ `align-items:flex-start`(星号/文字首行齐平),覆盖 label-right/left/top 三种位置;旧 inline-block 注释已修正。
- 影响页面:project-apply 独立表单页等所有多行 label 场景(弹窗内 `white-space:nowrap` 不受影响)。
## 必填星号首行对齐:改用 align-items: normalstretch 方案)
- 最终写法(`src/styles/element-ui.scss`):`.is-required .el-form-item__label { align-self:center; align-items:normal; }` + `::before { display:inline-block; height:auto; line-height:inherit; margin-right:4px }`
- 原理:stretch 让星号盒子在「换行时」被拉伸到 label 全高、内容从顶部排布 → 贴首行;单行时盒子=一行高,视觉不变(比 flex-start 更贴合「只换行才生效」)。
- 前提:::before 高度必须 auto 且继承行高;label 不能是 固定 height + 等高 line-height,否则退化成居中,需 JS 判行数加 class。
## 合同变更页(contract-manage-change.vue
- 「其它附件」上传按钮改为 `type="primary" plain icon="el-icon-upload"`,与「变更材料」区 vehicle-attachment-upload 内置按钮一致。
- 分区标题必填星号:`.dialog-section-title.is-required::after { content:'*'; color:#f56c6c }``::before` 已被蓝色竖条占用,星号走 `::after`)。
- 再次变更逻辑:`load()` 里 form 强制重置 `changeContent/changeReason/changeAttachmentsJson = ''``changeMaterials = []`(不带上一次内容);新增 `mergeChangeAttachments()` 把上一次的 `changeAttachmentsJson` 归集进 `attachments`(其它附件),按 url/名去重,数字 size 转格式化文本,提交时随 attachmentsJson 持久化。
## 合同变更记录对齐客商变更记录(contract-manage.vue
- 编辑页与详情弹窗的两处「变更记录」表格新增「变更内容」列:`formatContractChangeContent(row)` 复用 `buildDetailChangeRecordRows` 生成「字段:变更前:x → 变更后:y」摘要,单行省略 + `el-tooltip` 全量悬浮(样式 `.contract-change-record-content-cell/-tooltip` 照搬客商 `change-record-content-*`)。
- 编辑页操作列由单个「流程」改为「详情 + 流程」(`openDetailChangeRecord` + `openFlow`,宽度 120→150);详情弹窗表格「查看详情」改「详情」与客商一致。
- 值格式化增强:`billingPlanJson`→方案名(默认)列表、`paymentRatioJson`→「第N笔 xx%」、`settlementRuleJson/preSettlementConfigJson/formalSettlementConfigJson`→可读摘要(自动生成开关/结算类型/周期类型/截单日/周期天数,含预结算+正式结算双段)。
- `buildDetailChangeRecordRows` 过滤条件补「前后都为空则跳过」(原来只比 JSON 字符串,'' 与 null 会漏)。
## 星号方案补丁(关键)
- EP 的 `.el-form-item__label` 写死 `height:32px; line-height:32px`(项目只覆盖了 line-height:14px),导致 stretch 方案文字顶到 32px 盒子顶部、单行不居中。
- 修复:`.is-required .el-form-item__label { height:auto; align-self:center; align-items:normal }`——height:auto 收缩到内容高 + align-self:center 行内居中 + normal(stretch) 仅换行时星号贴首行。
## 车辆认证审核弹窗重构(transportCapacity/vehicle.vue
- 背景:用户反馈「样式不统一、内容不全」。根因是审核弹窗用 `<el-descriptions :column="3" border>`(大白表 + 居中 label),与同页编辑弹窗的 `<section-card>` 白卡分组风格不一致。
- 改造:弹窗主体改为 4 个 `section-card` 分组 —— 基础信息 / 尺寸重量 / 证件信息 / 证件图片;内部 `el-form label-position="right" label-width="auto"` + `el-row/el-col`3 列 `:span="8"`,所属组织与备注占 `:span="24"`)。
- 内容补全:新增「证件图片」分组,6 张证件照用 `<image-upload-field readonly large class-prefix="vehicle">` 只读展示(可点击放大);证件图片尺寸 240×151 复用已有全局 `:deep(.vehicle-uploader--large)` 规则,无需新写。
- label 单位统一为中文全角括号:`外廓长度(毫米)` / `核定载质量(KG`(原为半角 `外廓长度(mm)`)。
- 方法重构:`formatAuditValue(item)``auditValue(prop)`,签名更简洁;新增 longTermMap,对 drivingLicenseEndDate / roadTransportCertEndDate / annualReviewEndDate / compulsoryScrapDate 在勾选长期有效时返回「长期有效」,避免与未填写的「-」混淆(与列表页 formatEndDate 行为一致)。
- 删除已无引用的 `auditDetailItems` computed。
## 全站弹窗标题补 4px 主色竖条(全局 element-ui.scss
- 发现:`.el-dialog__title` 全局只配了 `inline-flex + gap:8px`**没有竖条**(竖条此前只在 `.dialog-section-title::before`),导致全站 el-dialog 标题都不带竖条,不符合 AGENTS.md 4.8。
- 修复:新增 `.el-dialog__title:not(:empty)::before { width:4px; height:16px; border-radius:2px; background:var(--el-color-primary) }`
- 注意:必须加 `:not(:empty)`,否则无标题弹窗会出现孤立蓝条。
- customer-archive.vue 评分详情弹窗:将「临时额度申请使用期限」区间行(span=12 + 至 连接)拆分为两个 span=6 独立字段「临时申请额度有效期起 / 止」,字段名 tempCreditStartDate/End 不变,删除废弃样式 .score-detail-form__range。
- temporary-credit-limit 文案调整:option 增加 addTitle/editTitle/viewTitle=「新增/编辑/查看临时额度申请」(覆盖 crud-dialog-title mixin 按菜单名注入的「临时额度管理」);remark label 改「临时额度信息」(hide:true 无表格副作用,rules 同步);projectName 表单 label 用 `#projectName-label` 插槽改「项目额度信息」,列 label 保持「项目名称」不动表格列头/搜索。Avue 支持-{prop}-label / -header / -search 插槽分离表单/表头/搜索文案。
- temporary-credit-limit「申请有效期至」增加「必须晚于当前日期」校验:common.js 新增通用 `futureDateRule(label)`trigger: ['change','blur'],空值/非法值放行,按 0 点比较,当天也算过期),temporary-credit-limit.js 的 validUntil rules 追加该规则。已验证 Element Plus 通用 picker 在选中日期时调用 formItem.validate('change'),故选择即刻提示;form.validate() 不带 trigger 时会跑全部规则,提交仍拦截。
- temporary-credit-limit 搜索占位文案统一:createCrudOption(withSearchPlaceholders([...])),搜索栏 placeholder 变为「请输入/请选择」不带字段名,与 waybill-manage / transport-plan / shipping-template 同一模式。
- temporary-credit-limit 弹窗表单 placeholder 统一为「请输入/请选择」不带字段名:option 各列加 placeholderprojectCode/undertakeDeptName/projectFundLimit/usedFundLimit/remainingFundLimit/remark=请输入,validUntil=请选择),视图 formslot 自定义控件(projectName select、applyLimit inputplaceholder 同步改。
## 【项目管理】列表增加「项目资金使用预警」(project-apply
- 需求:列表新增「资金使用风险」列,高风险红色、中风险黄色;列表头部增加「资金使用风险」快速筛选标签(高风险(数)/中风险(数)),点击筛选。规则 tooltip:中风险≥80%、高风险≥90%,使用率=已使用资金/项目资金使用额度×100%。
- 前端(已落地,src/views/business/project-apply.vue + src/option/business/project-apply.js + src/api/business/project-apply.js):
- option/project-apply.js 新增列 `fundUseRisk`(slot:true, hide 列表显示) + 导出 `fundUseRiskOptions`(high/medium/none) 与 `fundUseRiskThreshold`{high:90, medium:80}。
- view 新增 `#header` 插槽:`el-check-tag` 快速筛选(复用 contract-manage 到期标签交互),带数量(fundRiskStats[statKey])与 `?` tooltip 规则;新增 `#fundUseRisk` 插槽渲染彩色 `el-tag`high→type=danger 红,medium→type=warning 黄,无→"-")。
- data 加 fundRiskScope/fundRiskStats{high,medium,none}/fundRiskTagOptionsonLoad 追加 `fundUseRisk` 筛选参数 + 成功后 refreshFundRiskStats;新增 changeFundRiskScope(再次点击取消)、refreshFundRiskStatssearchReset 清空风险筛选。
- api 新增 `getFundRiskStats` → GET /blade-transport/project-apply/fund-risk-stats。
- 后端契约(未改,待确认数据来源):ProjectApplyVO 补齐 `fundUseRisk`(high/medium/none)、`fundUseRiskName``fundUseRate``usedFundLimit`/`remainingFundLimit`;列表 selectProjectApplyPage 填充每行风险 + buildQuery 支持 `fundUseRisk` 过滤;新增 `/fund-risk-stats` 返回 {high,medium,none}。
- ⚠️ 关键阻塞:系统里项目与任何费用表(运输计划/运单/账单/客商)均无关联字段,`usedFundLimit`(已使用资金) 无真实取数来源;临时额度模块的 project-apply/list 返回里 usedFundLimit 实际为空。需业务方确认「已使用资金」口径后才能算风险等级,否则列表风险列全空、统计为 0。
## 合同文件「批量下载」按钮与标题同排(contract-manage.vue 内联 AttachmentSection
- 需求:编辑页「合同文件」分组里「批量下载」按钮目前独立一行、靠右偏上,高度与标题区错位;要放到「合同文件」标题右侧同排、垂直居中。
- 修复:`const AttachmentSection = defineComponent(...)` 内联组件 render() —— 原结构是 `div.dialog-section-title`(标题) 与 `div.contract-manage-form__attachment-head`(批量下载按钮) 两个并列 div;改为把标题与按钮放进同一个 `contract-manage-form__attachment-head` flex 容器(标题左、按钮右)。
- 样式:`:deep(.contract-manage-form__attachment-head)``justify-content:flex-end` 改为 `space-between` + `align-items:center`,并 `.dialog-section-title { margin-bottom:0 }` 抵消标题自身 20px 下边距(2674 行 `:deep(.dialog-section-title)` 会命中子组件渲染的标题)。
- 注意:AttachmentSection 用 render 函数产出 DOM,不带当前组件 scoped data 属性,因此样式必须走 `:deep()`scoped 的 `&__billing-head, &__attachment-head`(2723) 只作用于当前组件模板内(计费信息),对子组件 DOM 无效。
- 影响:4 处使用(编辑/详情 × 合同文件/其它附件)布局统一变为「标题 + 批量下载」同排。
- 主人二次反馈「下面的其它附件也一样」——确认 L463(编辑/其它附件 description) / L765(详情/其它附件 description+readonly) 与 L313(编辑/合同文件) / L671(详情/合同文件) 都走同一份 render+样式,无需新代码;指挥浏览器 Cmd+Shift+R 硬刷即可看到效果(render 函数组件的 :deep() 样式改 HMR 经常不传播)。
## 合同格式下拉改读业务字典 contractFormatcontract-manage.vue
- 需求:新增/编辑合同管理页「合同格式」下拉由硬编码改为读取业务字典 `contractFormat`
- 原实现:`option/business/contract-manage.js``contractFormat``dicData` 硬编码 `[{label:'电子合同',value:'电子合同'},{label:'纸质合同',value:'纸质合同'}]`view 里 `contractFormatOptions` computed 直接 `columnOptions('contractFormat')` 读 column.dicData。
- 修复(4 处):
1. data 加 `contractFormatDictOptions: []`(与 settlementModeDictOptions 并列)。
2. computed `contractFormatOptions` 改为优先 `contractFormatDictOptions`,为空回退 `columnOptions('contractFormat')`(保留静态兜底)。
3. `loadSettlementDictionaries``Promise.all` 追加 `getBizDictionary({ code: 'contractFormat' })`,用 `records()` 映射 `{label:dictValue,value:dictKey}` 填充 `contractFormatDictOptions`;再**条件覆盖** column.dicData(仅当字典非空时),避免字典未配时清掉静态兜底。
4. `detailValue` 的字典映射分支加入 `prop === 'contractFormat'`,详情页「合同格式」也走 `displayStatus` 显示 label。
- 后端契约:`getBizDictionary``GET /blade-system/dict-biz/dictionary?code=contractFormat`,返回 `List<DictBiz>{code,dictKey,dictValue,remark}`DictBizController#dictionary 按 code 精确匹配)。字典 code 按用户口述用驼峰 `contractFormat`(现有 settle_method 为下划线,若后台实际是 `contract_format` 需调整 code)。
- 参考模式:与 `settlementMode`settle_method)完全一致。
## 合同类别 contractCategory 也读业务字典(contract-manage.vue,续上)
- 需求:模板里 label 实为「合同类型」(prop `contractCategory`),下拉由硬编码 `common.js#contractCategoryOptions`(客户合同/承运商合同/补充协议,value 中文)改为读业务字典 `contractCategory`
- 修复(3 处,与 contractFormat 同模式):
1. data 加 `contractCategoryDictOptions: []`
2. computed `contractCategoryOptions` 改为优先 `contractCategoryDictOptions`,空回退 `columnOptions('contractCategory')`(静态兜底)。
3. `loadSettlementDictionaries``Promise.all` 追加 `getBizDictionary({ code: 'contractCategory' })`,映射填充后**条件覆盖** `contractCategory` 列 dicData(仅非空时)。
- 列表页列显示/搜索下拉、详情页(detailValue 已有 `prop==='contractCategory'` 分支走 displayStatus)均因 column.dicData 覆盖而自动跟随业务字典。
- 注意:`config.defaultForm.contractCategory: '客户合同'`option/contract-manage.js)为硬编码中文默认值,若业务字典 dictKey 非中文需同步调整。
## 车辆新增弹窗:所有组织移位 + 使用部门 + 长期有效清空(vehicle.vue + 后端)
- 需求(transportCapacity/vehicle):①所有组织移到「基础车辆信息」区末尾;②新增「使用部门」字段(后端 transport_vehicle 无该字段,需加);③车牌号三段(省/号码/颜色)包成整体输入框+减宽;④勾选「长期有效」清空对应日期且不可编辑。
- 用户确认:所有组织+使用部门放「基础车辆信息」区末尾;使用部门用部门下拉(复用 getDeptTree→organizationOptions,存部门名,仅部门名非级联);车牌号包成整体输入框+减宽;长期有效 4 组全部统一清空(强制报废/行驶证/道路运输证/年审)。
- 前端(vehicle.vue):
1. emptyForm 加 `useDepartment: ''`
2. 删「基础车辆信息」首行的「所有组织」(原 span24),在区末新增一行:`使用部门`(span8, el-select+organizationOptions, 存 rawLabel) + `所有组织`(span8, el-cascader)。organizationOptions 由 initDeptTree 填充。
3. `.plate-group` 由 grid(112px 1fr 112px) 改为 flex 整体输入框:外层 border+radius+focus-within 变化;内部 el-select/el-input 去 box-shadow、无边框,第一/最后 select flex 0 0 30%、中间 input flex 1,子项间用 `::before` 竖线分隔。
4. 4 组 date-picker 加 `:disabled="xxxLongTerm === 1"`(行驶证/道路运输证原缺,补上),checkbox 加 `@change="handleLongTermChange(日期prop, longterm prop)"`;新增方法 handleLongTermChange(勾选时清空日期并 validateField)。
5. formRulesdrivingLicenseEndDate / roadTransportCertEndDate 由 required 改为 validator(新增 validateDrivingLicenseEndDate / validateRoadTransportCertEndDatelongTerm===1 时跳过必填),annualReview 原 validator 已支持。
- 后端(tms-erp-api-ws,新增 use_department 列):
- `TransportVehicle.java``private String useDepartment`
- `blade_transport_vehicle.sql` 建表加 `use_department varchar(50)`
- `TransportVehicleExcel.java``使用部门` 列。
- `TransportVehicleMapper.xml` resultMap + BaseColumn + QueryCondition(useDepartment LIKE) 各加。
- `TransportVehicleServiceImpl.prepare()` trim useDepartmentvalidate() 加长度≤50 校验。
- 新增增量迁移 `doc/sql/transport/blade_transport_vehicle_use_department_patch_20260909.sql`ALTER ADD use_department AFTER organization_name)。
- 注意:VO 继承 entity 无需改;Wrapper BeanUtil 同名透传。已上线库须执行 patch SQL(建表脚本是 DROP+CREATE,勿直接跑)。
- 后续补充(vehicle.vue「车辆资质图片」区输入框对齐):第一行原 span `6/8/10` 不等宽(行驶证档案编号 6 / 行驶证有效期 8 / 道路运输证号 10)导致输入框宽度不齐,统一改为 `8/8/8`,与下方各行 span=8 一致。仅改 2 处 span,无逻辑改动。
## 车辆车牌号:改为单一 input 输入框(vehicle.vue3 段 → 1 段)
- 需求:基础车辆信息区「车牌号」原本是「省简称 select + 号码 input + 车牌颜色 select」三段拼装(plateProvince/plateNoBody/plateColor),改为**单个 el-input** 直接输入完整车牌号(如 京A12345)。
- 改动(vehicle.vue):
1. 模板:`plate-group` 三段 → `<el-input v-model="vehicleForm.plateNo" maxlength="8" show-word-limit placeholder="如:京A12345" @input="handlePlateNoInput" @blur="validatePlateFormat">`。删除 `.plate-group` 样式(含 focus-within、竖线分隔、child flex 占比等整段)。
2. emptyForm:删 `plateProvince``plateNoBody`,保留 `plateNo``plateColor`(后端字段继续存历史车牌颜色)。
3. data:删 `plateProvinceOptions``plateColorOptions` 暴露;常量 `plateProvinceOptions`31 省简称数组)整段删除;`plateColorOptions` 常量删除。
4. validatePlateNo 重写:直接校验 `value`(完整车牌号),正则 `/^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼港澳]{1}[A-Z][A-Z0-9挂学警港澳]{5,6}$/`,错误提示改为「请输入标准车牌号(如:京A12345)」。
5. syncPlateNo / splitPlateNo 重写:splitPlateNo 改为 noop(保留以兼容 OCR 后回调链路);syncPlateNo 改为 trim+upperCase 单一字段。
6. handlePlateBodyInput 改名为 handlePlateNoInput,新增 validatePlateFormat 失焦校验。
7. 车辆认证审核弹窗只读详情同步删「车牌颜色」展示(与录入表单一致)。
- 后端不动:`plate_no` / `plate_color` 字段保留(数据库兼容历史车牌颜色),Service 无强制校验。
- 受影响:OCR 自动识别(行驶证/机动车销售统一发票)后续调用链路无需改,因 syncPlateNo 仍对 plateNo 做归一化。
## 车辆新增/编辑弹窗:输入框宽度统一(vehicle.vue,前后两区)
- 需求(transportCapacity/vehicle):新增/编辑弹窗「基础车辆信息」+「车辆资质图片」两个 section 各输入框宽度要一致;截图红框重点为车牌号、外廓尺寸、所有组织/使用部门。
- 根因:基础区原本列宽混乱(车牌号 span10 / 车辆类型 span6 / 外廓尺寸 span6,其余 span6),行内 3 列与 2 列混排;图片区文本字段全 span6,与基础区不一致。
- 改动(vehicle.vue 仅模板 el-col span):
1. 「基础车辆信息」区所有字段统一为 **span=83 列布局)**:车牌号、车辆类型、外廓尺寸、核定载质量、准牵引总质量、业务关系、能源类型、强制报废日期、海关备案号、所有组织、使用部门。
2. 「车辆资质图片」区文本/日期字段(行驶证档案编号、行驶证有效期、道路运输证号、道路运输证有效期、道路运输年审有效期、机动车登记编号、机动车登记日期)统一为 **span=8**
- 不改:只读「车辆认证审核」弹窗(L140 起的 span6 只读详情 + large 图片上传)与新增弹窗内「证件图片」上传控件(固定尺寸)保持 span6。外廓尺寸为复合控件(长/宽/高三 input),口径同 span8。
- ⚠️ 注意:操作中曾误删核定载质量 el-col 标签(453-460 行开始时少 el-col、尾部多一个 `</el-col>`),已修复为完整 `<el-col :span="8">...`
- 后续纠偏(2026-09-09 傍晚):主人反馈「为什么不是按4列显示」——上一步把"基础车辆信息/车辆资质图片"两区误改成 3 列(span8)。同项目惯例 driver.vue/customer-archive.vue 全为 **4 列(span6,仅复合长字段 span12**,故统一重排为 4 列:
- 基础车辆信息:`车牌号(6)+车辆类型(6)+外廓尺寸(12)``核定载质量/准牵引总质量/业务关系/能源类型(4×6)``强制报废日期/海关备案号/所有组织/使用部门(4×6)`
- 车辆资质图片:`行驶证有效期/道路运输证号/道路运输证有效期/道路运输年审有效期(4×6)``机动车登记编号/机动车登记日期/行驶证档案编号(3×6)`,图片上传控件仍 span6
- 该区 span8 已全部移除,编辑表单区仅剩外廓尺寸 span12(复合控件长/宽/高)+ 图片上传 span6。
- 宽度微调(2026-09-09 傍晚2):主人圈出「所有组织」字段宽度与同行不一致。根因:`.vehicle-form` 里的 `:deep(...){width:100%}` 选择器只列了 `el-select / el-input / el-input-number / el-date-editor`**漏了 `el-cascader`**(所有组织用的就是级联选择器,默认不撑满整列)。已补 `:deep(.el-cascader)` 进该规则,全表单仅此一处用到 el-cascader,故所有组织与同行等宽。
## 司机弹窗:补 placeholder + 每行统一 3 列(transportCapacity/driver.vue
- 需求:新增/编辑司机弹窗 ①输入框无提示文案;②基础身份信息 3 列,其它 4 列 / 6 列行不统一。
- 改动(仅 1819 行 driver.vue 的 126-540 行 `<driver-dialog>` 模板,script/style 不动):
1. **基础身份信息**:行结构不动,7 个 el-form-item 控件补 placeholder(司机姓名/身份证号/出生年月/性别/民族/学历/详细地址)。住址已有「请选择省市区」、驾驶车辆已有「请输入或选择车辆」,不动。
2. **驾驶证信息**:第一行 4 列(:span=6)拆为两行 — 行 1(准驾车型 / 档案编号 / 有效期 date-range:span=8+ 行 2(长期有效,:span=8)。起/止 placeholder 保留简短「起」「止」,符合主人 1.B 偏好(保留原 date-range 二联结构,不改 daterange)。
3. **从业资格证信息**:第一行 4 列拆为两行 — 行 1(从业资格认证类型 / 资格证号 / 有效期,:span=8+ 行 2(长期有效,:span=8)。资格证号 placeholder 保留「默认身份证号」不动。
4. **司机联系信息**:一行 6 列拆为两行 — 行 1(司机类型 / 手机号 / 紧急联系人姓名,:span=8)+ 行 2(紧急联系人手机号 / 与联系人关系 / 所属组织,:span=8)。所属组织已有 placeholder,不动。
- 决策点(主人确认):1.B(保留原 date-range 二联 + 第三列留空后拆行的方案);2 保留;3.A(驾驶证主页/副页、封面页/内容页两组上传图仍 :span=12,与占整行宽的原貌一致)。
- 校验:node 脚本统计 4 个 section-card / 13 个 el-row / 31 个 el-col / 24 个 el-form-item,全平衡。改动只在 driver.vue 一文件,~25 处 Edit 调用。
## 新增/修改司机弹窗改为 4 列布局(driver.vue16:xx
- 主人要求 /transportCapacity/driver 新增司机弹窗改 4 列显示。原文件各分组已是 span=6(4 列栅格)但每行只放 3 个字段,第 4 列空置。
- 重排结果(仅删行断 + 移动字段顺序,字段/校验/逻辑零改动):
1. 基础身份信息:行1 司机姓名/身份证号/出生年月/性别;行2 民族/学历/住址/详细地址;行3 驾驶车辆/岗位;行4 三张证件照(不变)。
2. 驾驶证信息:行1 准驾车型/档案编号/有效期/长期有效;上传主页/副页 span 12→6。
3. 从业资格证信息:行1 类型/资格证号/有效期/长期有效;上传封面页/内容页 span 12→6。
4. 司机联系信息:行1 司机类型/手机号/紧急联系人姓名/紧急联系人手机号;行2 与联系人关系/所属组织。
- 注意:此前日志记录的「3 列 span=8」方案已被后续改动覆盖为 span=6,本次以当前文件实际状态为准。
## 客商档案:客商类型→客商分类 + 新增客商类型(customer-archive.vue
- ⚠️ 补救(17:34):data 里的 `customerKindOptions`/`customerKindMap` 定义一度丢失(模板 v-for 空 → 下拉显示「无数据」,主人截图反馈),已补回 datacustomerTypeOptions 之后)。其余 8 处改动经 grep 确认完好。
- 需求:原「客商类型」(prop `customerType`,字典 customer_type:客户/承运商,多选)改名「客商分类」;另新增「客商类型」字段,取值为 外部客商 / 内部组织。
- 约定:prop `customerType` 不动(其它页面 loading-manage / dept / business-crud-page 都以 `customerType:'承运商'` 作为后端查询参数),只改中文标签。
- 新增字段 prop = **`customerKind`**(前端自定义命名,后端尚无对应字段,需后端在客商表加列并透传),值 `external`(外部客商) / `internal`(内部组织),单选下拉,默认 `external`
- 改动点(8 处,全在 `src/views/vehicle/customer-archive.vue`):
1. 表单:227 行 label 改「客商分类」;其后新增一个 `el-col :span="6"` 表单项「客商类型」prop `customerKind`el-select + `customerKindOptions`)。
2. data 新增 `customerKindOptions` / `customerKindMap`external/internal ↔ 中文)。
3. formRules`customerType` 提示文案改「请选择客商分类」。
4. 列表列:「客户类型」label 改「客商分类」;新增「客商类型」列(prop customerKindtype selectdicData 内外部,minWidth 120**未加 search**)。
5. `emptyArchive()``customerKind: 'external'`
6. `normalizeDetail()``customerKind: detail.customerKind || 'external'`
7. 变更记录 `getChangeFieldLabel``customerType:'客商分类'`,新增 `customerKind:'客商类型'`
8. `formatChangeFieldValue`:别名映射加 `客商分类/客户类型 → customerType``客商类型 → customerKind`valueMap 加 `customerKind:{external:'外部客商',internal:'内部组织'}`
- 校验:用 @vue/compiler-sfc 编译模板,0 错误。
## 上传证件项 label 贴顶修复(全局 archive-form 垂直居中提升)
- 症状:driver.vue 司机弹窗「驾驶证主页/副页」「封面页/内容页」等证件上传项(el-form-item 内容高 151pxlabel 文字贴顶,普通 32px 控件行看不出来。
- 根因:`archive-form` class 被 driver / vehicle / ship / credit-score-quantification / loading-manage / waybill-import-dialog 等 8+ 页面复用,但「label 与控件垂直居中」规则 `.archive-form :deep(.el-form-item){align-items:center}` 锁在 customer-archive.vue 的 scoped 样式里,其它页面拿不到;flex 容器默认 stretchlabel(32px) 在高控件行内贴顶。
- 修复:规则提升到 `src/styles/element-ui.scss` 全局(紧跟 is-required 星号配套规则之后):`.archive-form .el-form-item { align-items:center }`。全站 archive-form 表单一并生效,label 与控件垂直居中。SCSS 编译通过。
## 司机弹窗「驾驶证信息」:有效期必填、长期有效不必填(transportCapacity/driver.vue
- 需求:驾驶证信息区「有效期」(起/止,prop `drivingLicenseEndDate`)要必填(显示红*),「长期有效」复选框(prop `drivingLicenseLongTerm`)不必填(去掉红*)。
- 改动(formRules 两处):
1. `drivingLicenseEndDate` 规则加 `required: true``{ required: true, validator: this.validateDrivingLicenseEndDate, trigger: 'change' }`)——仅用于渲染红*,实际校验仍走自定义 validator。
2. 删除 `drivingLicenseLongTerm``{ required: true, message: '请选择驾驶证是否长期有效' }` 规则块。
- 关键机制(Element Plus 2.14 + async-validator 4.2.5 已核实):
- 红* 由 `form-item``isRequired = normalizedRules.some(rule => rule.required)` 决定,只要规则对象带 `required` 就显示。
- async-validator 的 `rule.validate` 中,若存在 `rule.validator`,直接走自定义 validator 并 return**不会**再执行 required 空值检查 → 勾「长期有效」时止日被清空/disabled 也不会误报必填。
- 校验逻辑保持原样:起始日期恒必填;`longTerm !== 1` 时止日必填。
- 未同步:「从业资格证信息」区仍是「有效期无红* + 长期有效有红*」的旧形态(待主人确认是否一并统一)。
## 司机弹窗 placeholder 统一为「请输入/请选择」(transportCapacity/driver.vue
- 需求:新增/修改司机弹窗输入框 placeholder 去掉后面的字段名称,只保留「请输入」「请选择」。
- 改动:18 处 placeholder 简化(7 处 → `请输入`10 处 → `请选择`1 处动态 cascader `driverForm.addressRegion || '请选择省市区'``|| '请选择'`)。
- **保留 4 处**(主人明确确认):
1. 驾驶车辆 `请输入或选择车辆` —— 复合操作(既可输入又可点按钮选车),去掉会丢语义。
2. 日期范围 `起` / `止` —— 起止标记,非字段提示。
3. 资格证号 `默认身份证号` —— 默认值说明,非「请输入」格式。
- 未动:表单**校验错误提示 message 仍带字段名**(如「请选择准驾车型」),因报错需指明具体字段,与 placeholder 定位不同;主人未要求,暂保持。
- 做法:Python 脚本按完整 placeholder 字符串精确替换(18 规则全命中,未匹配即 exit 1 中断),比逐个 Edit 高效且不会误伤。
- 校验:`@vue/compiler-sfc` parse + compileTemplate + compileScript 三项全通过。注意脚本必须放在**项目根目录**下运行(放 /tmp 解析不到 node_modules 里的 @vue/compiler-sfc)。
- ⚠️ git diff 显示的 `drivingLicenseLongTerm` 校验规则变动是**本次之前工作区已有的未提交改动**(见上一条日志),非本次引入,勿混淆。
## 「自动生成结算单」开关加 ? 悬浮提示(3 处)
- 需求:开关「开启」后面加问号图标,hover 提示「开启时,系统根据配置规则归集运单,定时生成结算单」。
- 改动文件(同一文案,为保持全站一致):
1. `src/views/business/components/business-crud-page.vue`1884 行附近,`.business-crud-page__settlement-switch`
2. `src/views/business/contract-manage.vue`357 行附近,`.contract-manage-form__settlement-switch`
3. `src/views/business/contract-manage-change.vue`55 行,`.settlement-switch`,原为单行长标签已拆行)
- 写法:`<el-radio :label="1">开启</el-radio>` 后插 `<el-tooltip content="..." placement="top"><el-icon class="settlement-switch-tip"><QuestionFilled /></el-icon></el-tooltip>`,再接「关闭」radio。
- 样式:`.settlement-switch-tip { margin:0 4px; color:#a8abb2; cursor:help; font-size:14px }`,各文件 scoped 样式内一份(contract-manage 写在 `&__settlement-switch` 内)。
- 注意:图标走 main.js 全局注册(@element-plus/icons-vue 全量注册),无需 import;写法与 `project-apply.vue``__label-tip` 一致。
- 这三个大文件本身已存在 prettier 格式问题(改动前 git HEAD 版本同样 fail),非本次引入。
## 车辆认证审核弹窗排版对齐新增弹窗(vehicle.vue
- 诊断 `/project-apply/fund-risk-stats` No endpoint:前端已定义 getFundRiskStatsapi/business/project-apply.js:13),后端未实现;方案已给(后端补 R<{high,medium}> / 前端 catch 降级),待主人选。
- vehicle.vue 认证审核弹窗重排对齐新增弹窗:取消独立「尺寸重量」卡片,外廓尺寸改长/宽/高组合(span12dimension-group);基础信息 3 行×4 列(车牌号/车辆类型/外廓尺寸;载质量/牵引质量/业务关系/能源类型;强制报废日期/海关备案号/所有组织/使用部门);证件信息按新增「车辆资质图片」行分布(止+运输证号+止+年审 / 登记编号+登记日期+档案编号+行驶证起 / 运输证起 / 备注整行);label「所属组织」改「所有组织」对齐新增;dimension-group 样式复制进 .certification-audit 作用域。@vue/compiler-sfc 编译校验通过。
- vehicle.vue 行驶证有效期必填星号:原规则是纯 validatorElement Plus 不渲染星号),改为 data 内 baseRules + computed formRulesdrivingLicenseEndDate 动态返回 required 规则(长期有效=1 时返回 [],星号与校验同步消失);删除 validateDrivingLicenseEndDate。经验:Element Plus 星号只在规则含 required:true 时渲染,且 el-form-item 的 :required 属性会被注入为 {required} 规则并产生英文默认提示,不宜用它控制星号。
- 备注:车辆保存的「车牌颜色不能为空」「行驶证有效期:必填」均为后端校验(前端无对应规则),需后端改。
- driver.vue 从业资格证有效期对齐驾驶证:单日期改 date-range 起/止(列宽 6+6+6+6 → 6+6+8+4),新增 qualificationStartDate 字段(emptyForm + handleSubmit normalize);qualificationEndDate 规则加 required:true(渲染星号,validator 豁免长期);删除 qualificationLongTerm 的 required 规则(长期有效不必填);勾长期后起止均 disabled(比驾驶证更严,驾驶证起仍可编辑)。⚠️ 后端需新增 qualification_start_date 字段否则起日期无法存取。
- driver.vue 补充:驾驶证「有效期起」加 :disabled(长期=1 时禁用);驾驶证与从业资格证两个 validator 统一在「长期有效=1」时直接 callback() 放行(起止都不校验、不提示)。禁用不清空旧值,提交时保留原日期(后端以 longTerm 为准)。
- contract-manage-change.vue「合同文件」批量下载按钮上移:标题与按钮合并进 .section-headflex space-between 同排),与「其它附件/计费信息」分区一致;删除无引用的 .attachment-head 样式。
- contract-manage-change.vue「自动生成结算单」问号提示图标位置:原 icon 夹在开启/关闭 radio 之间,因 .el-radio 默认 margin-right:32px 导致离开启远、贴关闭;修复 = 开启 radio margin-right 清零 + icon margin 改 0 32px 0 8px。
+11
View File
@@ -2,6 +2,17 @@
## 设计约定(已确认)
### 表单 placeholder 统一为「请输入 / 请选择」(不带字段名)
- **规范**:输入框 placeholder 只写动作词 `请输入` / `请选择`,**后面不跟字段名称**(label 已说明是什么字段,重复无意义)。
- 已生效页面:waybill-manage、transport-plan、shipping-template、temporary-credit-limit(搜索栏 + 弹窗表单)、**driver.vue**2026-09-09 补齐 18 处)。
- **3 类例外必须保留,不要误简化**:
1. 复合操作:如 `请输入或选择车辆`(既可键盘输入又可点按钮弹窗选车),丢掉会损失语义。
2. 日期区间的 `起` / `止`:是起止标记,不是字段提示。
3. 默认值说明:如资格证号 `默认身份证号`、车牌号 `如:京A12345`,属于示例/默认值提示,非「请输入」格式。
- **校验错误提示 message 保持带字段名**(如「请选择准驾车型」「请输入档案编号」),与 placeholder 定位不同——报错必须指明具体哪个字段,不能只说「请选择」。
- Avue 配置化表单:在 option 各列加 `placeholder`;搜索栏可用通用工具 `withSearchPlaceholders([...])`(见 temporary-credit-limit.js)。
- 批量改法:Python 脚本按**完整 placeholder 字符串**做精确替换,每规则校验 `count > 0` 否则中断,避免误伤;改完用 `@vue/compiler-sfc` 的 parse + compileTemplate + compileScript 验证(脚本须放项目根目录下跑,放 /tmp 解析不到 node_modules)。
### 弹窗分组:统一用全局 `<section-card>`
- 弹窗 body 背景由 `src/styles/element-ui.scss` 全局 `.el-dialog__body { background:#f5f6fa; padding:16px }` 统一灰底。
- 每组 = 白底卡片:4px 主色竖条 + 8px 间距 + 圆角 6px + 淡阴影。组件全局注册 `<section-card title="...">`,支持 `#title` / `#extra` slot。
Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

+11
View File
@@ -58,3 +58,14 @@ export const changeStatus = (id, status) => {
},
});
};
export const getBfiExchangeRate = (currencyCode, effectdate) => {
return request({
url: '/blade-transport/bfi/exchange-rate',
method: 'get',
params: {
currencyCode,
effectdate,
},
});
};
+52
View File
@@ -0,0 +1,52 @@
import request from '@/axios';
export const getList = (current, size, params) => {
return request({
url: '/blade-system/measurement-unit/list',
method: 'get',
params: {
...params,
current,
size,
},
});
};
export const getDetail = id => {
return request({
url: '/blade-system/measurement-unit/detail',
method: 'get',
params: {
id,
},
});
};
export const remove = ids => {
return request({
url: '/blade-system/measurement-unit/remove',
method: 'post',
params: {
ids,
},
});
};
export const submit = row => {
return request({
url: '/blade-system/measurement-unit/submit',
method: 'post',
data: row,
});
};
export const changeStatus = (id, status) => {
return request({
url: '/blade-system/measurement-unit/status',
method: 'post',
params: {
id,
status,
},
});
};
+3 -4
View File
@@ -92,13 +92,12 @@ export const createCrudApi = baseUrl => ({
data,
});
},
reassign(id) {
reassign(data) {
const payload = data && typeof data === 'object' ? data : { id: data };
return request({
url: `${baseUrl}/reassign`,
method: 'post',
params: {
id,
},
data: payload,
});
},
batchComplete(ids) {
+3 -3
View File
@@ -59,14 +59,14 @@ export const withdraw = id =>
params: { id },
});
export const startChange = (id, reason) =>
export const startChange = (id, changeContent, changeReason = changeContent) =>
request({
url: `${baseUrl}/start-change`,
method: 'post',
params: {
id,
changeContent: reason,
changeReason: reason,
changeContent: changeContent || '',
changeReason,
},
});
+2 -1
View File
@@ -24,10 +24,11 @@ export const getDetail = id =>
},
});
export const getCarrierContracts = () =>
export const getCarrierContracts = projectIds =>
request({
url: `${baseUrl}/carrier-contracts`,
method: 'get',
params: { projectIds: (projectIds || []).join(',') },
});
export const saveDraft = row =>
+5 -2
View File
@@ -13,11 +13,14 @@ export const getDetail = (id, waybillId) =>
...(waybillId === undefined ? {} : { waybillId }),
},
});
export const getVoucherImages = waybillId =>
export const getVoucherImages = (waybillId, params = {}) =>
request({
url: '/blade-transport/process-config/voucher-images',
method: 'get',
params: { waybillId },
params: {
waybillId,
...params,
},
});
export const submit = api.submit;
export const remove = api.remove;
+14
View File
@@ -6,9 +6,23 @@ const api = createCrudApi(baseUrl);
export const getList = api.getList;
export const getDetail = api.getDetail;
export const getChangeRecordDetail = (id, recordIndex) =>
request({
url: `${baseUrl}/change-record/detail`,
method: 'get',
params: { id, recordIndex },
});
export const submit = api.submit;
export const remove = api.remove;
// 项目资金使用风险统计(高风险 / 中风险数量),供列表头部快速筛选标签使用
export const getFundRiskStats = params =>
request({
url: `${baseUrl}/fund-risk-stats`,
method: 'get',
params,
});
export const saveDraft = row =>
request({
url: `${baseUrl}/save-draft`,
+24 -1
View File
@@ -10,7 +10,6 @@ export const submit = api.submit;
export const dispatch = api.dispatch;
export const remove = api.remove;
export const copy = api.copy;
export const cancel = api.cancel;
export const complete = api.complete;
export const importTransportPlan = ({
@@ -36,3 +35,27 @@ export const importTransportPlan = ({
timeout: 60000,
});
};
export const validateTransportPlan = ({
file,
projectId,
projectName,
customerName,
contractId,
contractName,
}) => {
const data = new FormData();
data.append('file', file);
data.append('projectId', projectId || '');
data.append('projectName', projectName || '');
data.append('customerName', customerName || '');
data.append('contractId', contractId || '');
data.append('contractName', contractName || '');
return request({
url: `${baseUrl}/validate-transport-plan`,
method: 'post',
data,
responseType: 'blob',
timeout: 60000,
});
};
+25
View File
@@ -5,7 +5,29 @@ const baseUrl = '/blade-transport/voucher-manage';
export const getList = (current, size, params) =>
request({ url: `${baseUrl}/list`, method: 'get', params: { current, size, ...params } });
export const getDetail = id => request({ url: `${baseUrl}/detail`, method: 'get', params: { id } });
export const getFolderPage = (voucherId, current, size, params) =>
request({ url: `${baseUrl}/folder-page`, method: 'get', params: { voucherId, current, size, ...params } });
export const getFolderDetail = (voucherId, plateNo) =>
request({ url: `${baseUrl}/folder-detail`, method: 'get', params: { voucherId, plateNo } });
export const replaceFolder = (voucherId, plateNo, file) => {
const data = new FormData();
data.append('voucherId', voucherId);
data.append('plateNo', plateNo);
data.append('file', file);
return request({ url: `${baseUrl}/folder-replace`, method: 'post', data });
};
export const replaceFolderByObject = (voucherId, plateNo, fileInfo) =>
request({
url: `${baseUrl}/folder-replace-object`,
method: 'post',
params: { voucherId, plateNo, ...fileInfo },
timeout: 120000,
});
export const removeFolder = (voucherId, plateNo) =>
request({ url: `${baseUrl}/folder-remove`, method: 'post', params: { voucherId, plateNo } });
export const submit = data => request({ url: `${baseUrl}/submit`, method: 'post', data });
export const changeWaybillBatch = data =>
request({ url: `${baseUrl}/change-waybill-batch`, method: 'post', data });
export const createUploadDraft = data =>
request({ url: `${baseUrl}/upload-draft`, method: 'post', data });
export const completeUploadFile = data =>
@@ -17,6 +39,9 @@ export const getWaybillBatches = (current, size, params) =>
method: 'get',
params: { current, size, ...params },
});
export const auditPass = id => request({ url: `${baseUrl}/audit-pass`, method: 'post', params: { id } });
export const auditReject = (id, rejectReason) =>
request({ url: `${baseUrl}/audit-reject`, method: 'post', params: { id, rejectReason } });
const fileTaskBaseUrl = '/blade-file/fileTask';
export const queryFileTask = md5 =>
+16
View File
@@ -7,6 +7,7 @@ const api = createCrudApi(baseUrl);
export const getList = api.getList;
export const getDetail = api.getDetail;
export const submit = api.submit;
export const saveDraft = data => request({ url: `${baseUrl}/save-draft`, method: 'post', data });
export const remove = api.remove;
export const copy = api.copy;
export const cancel = api.cancel;
@@ -19,6 +20,19 @@ export const changeRoute = data =>
method: 'post',
data,
});
export const maintainMileage = data =>
request({
url: `${baseUrl}/maintain-mileage`,
method: 'post',
data,
});
/** 运单打卡记录 + 司机上传凭证图 */
export const getPunchRecords = waybillId =>
request({
url: `${baseUrl}/punch-records`,
method: 'get',
params: { waybillId },
});
export const roadLoading = ids =>
request({
url: `${baseUrl}/road-loading`,
@@ -29,9 +43,11 @@ export const roadLoading = ids =>
});
export const getImportBatches = params => request({ url: `${baseUrl}/import-batch/list`, method: 'get', params });
export const getImportBatchNextCode = () => request({ url: `${baseUrl}/import-batch/next-code`, method: 'get' });
export const getImportDetails = params => request({ url: `${baseUrl}/import-batch/details`, method: 'get', params });
export const removeImportBatches = ids => request({ url: `${baseUrl}/import-batch/remove`, method: 'post', params: { ids } });
export const getImportOptions = () => request({ url: `${baseUrl}/import-batch/options`, method: 'get' });
export const exportImportTemplate = () => request({ url: `${baseUrl}/import-batch/export-template`, method: 'get', responseType: 'blob' });
export const saveImportDraft = data => request({ url: `${baseUrl}/import-batch/draft`, method: 'post', data });
export const validateImport = data => request({ url: `${baseUrl}/import-batch/validate`, method: 'post', data, responseType: 'blob' });
export const confirmImport = data => request({ url: `${baseUrl}/import-batch/confirm`, method: 'post', data });
+3 -2
View File
@@ -34,7 +34,8 @@ export const exportBlob = (url, params, options = {}) => {
});
};
export const importBlob = (url, file) => {
export const importBlob = (url, file, options = {}) => {
const { timeout = 60000 } = options;
const formData = new FormData();
formData.append('file', file);
return request({
@@ -42,6 +43,6 @@ export const importBlob = (url, file) => {
method: 'post',
data: formData,
responseType: 'blob',
timeout: 60000,
timeout,
});
};
+6
View File
@@ -12,6 +12,12 @@ export const getAvailableOptions = (keyword, deptId, selectedId) =>
method: 'get',
params: { keyword, deptId, selectedId },
});
export const getAvailablePage = (current, size, keyword, deptId, selectedId) =>
request({
url: `${baseUrl}/available-page`,
method: 'get',
params: { current, size, keyword, deptId, selectedId },
});
export const submit = data => request({ url: `${baseUrl}/submit`, method: 'post', data });
export const remove = id => request({ url: `${baseUrl}/remove`, method: 'post', params: { id } });
+6 -2
View File
@@ -5,8 +5,12 @@ const baseUrl = '/blade-transport/invoice-application';
export const getList = (current, size, params) =>
request({ url: `${baseUrl}/list`, method: 'get', params: { current, size, ...params } });
export const getDetail = id => request({ url: `${baseUrl}/detail`, method: 'get', params: { id } });
export const getSettlementCandidates = keyword =>
request({ url: `${baseUrl}/settlement-candidates`, method: 'get', params: { keyword } });
export const getSettlementCandidates = (current, size, params) =>
request({
url: `${baseUrl}/settlement-candidates`,
method: 'get',
params: { current, size, ...params },
});
export const getSettlementDetails = settlementIds =>
request({ url: `${baseUrl}/settlement-details`, method: 'get', params: { settlementIds } });
export const getReceiverInformation = settlementIds =>
+7 -5
View File
@@ -18,17 +18,16 @@ export const returnBill = data => request({ url: `${baseUrl}/return`, method: 'p
export const voidBill = data => request({ url: `${baseUrl}/void`, method: 'post', data });
export const syncKingdee = id =>
request({ url: `${baseUrl}/sync-kingdee`, method: 'post', params: { id } });
export const syncKingdeeBatch = ids =>
request({ url: `${baseUrl}/sync-kingdee-batch`, method: 'post', data: ids });
export const syncKingdeeResult = () =>
request({ url: `${baseUrl}/sync-kingdee-result`, method: 'post' });
export const paymentTypeOptions = [
{ label: '项目预付', value: 'project_advance' },
{ label: '进度预付', value: 'progress_advance' },
{ label: '结算付款', value: 'settlement_payment' },
];
export const paymentMethodOptions = [
{ label: '银行转账', value: 'bank_transfer' },
{ label: '银行承兑汇票', value: 'bank_draft' },
{ label: '商业承兑汇票', value: 'commercial_draft' },
];
export const approvalStatusOptions = [
{ label: '草稿', value: 'draft' },
{ label: '审批中', value: 'reviewing' },
@@ -39,5 +38,8 @@ export const approvalStatusOptions = [
export const kingdeeStatusOptions = [
{ label: '未生成', value: 'unsynced' },
{ label: '已生成', value: 'synced' },
{ label: '付款中', value: 'paying' },
{ label: '已付款', value: 'paid' },
{ label: '已关闭', value: 'closed' },
{ label: '生成失败', value: 'failed' },
];
+14
View File
@@ -4,6 +4,8 @@ const baseUrl = '/blade-transport/formal-settlement';
export const getList = (current, size, params) =>
request({ url: `${baseUrl}/list`, method: 'get', params: { current, size, ...params } });
export const exportList = params =>
request({ url: `${baseUrl}/export`, method: 'get', params, responseType: 'blob' });
export const getDetail = id => request({ url: `${baseUrl}/detail`, method: 'get', params: { id } });
export const getCandidates = (current, size, params) =>
request({
@@ -32,7 +34,19 @@ export const syncKingdee = id =>
request({ url: `${baseUrl}/sync-kingdee`, method: 'post', params: { id } });
export const getDetailFees = detailId =>
request({ url: `${baseUrl}/detail-fees`, method: 'get', params: { detailId } });
export const getReceiptClaims = formalSettlementId =>
request({
url: `${baseUrl}/receipt-claims`,
method: 'get',
params: { formalSettlementId },
});
export const adjustDetail = data =>
request({ url: `${baseUrl}/adjust-detail`, method: 'post', data });
export const applyPayment = data =>
request({ url: `${baseUrl}/apply-payment`, method: 'post', data });
export const applyPayments = data =>
request({ url: `${baseUrl}/apply-payments`, method: 'post', data });
export const claimInvoices = data =>
request({ url: `${baseUrl}/claim-invoices`, method: 'post', data });
export const queryInvoicePool = params =>
request({ url: `${baseUrl}/invoice-pool`, method: 'get', params });
+12
View File
@@ -10,6 +10,18 @@ export const getDetail = id => request({ url: `${baseUrl}/detail`, method: 'get'
export const getContractOptions = keyword =>
request({ url: `${baseUrl}/contract-options`, method: 'get', params: { keyword } });
export const getContractList = (current, size, params) =>
request({
url: '/blade-transport/contract-manage/list',
method: 'get',
params: {
current,
size,
approvalStatuses: 'approved,change_approved',
...params,
},
});
export const getFeeOptions = () => request({ url: `${baseUrl}/fee-options`, method: 'get' });
export const getCandidateDetails = (current, size, params) =>
@@ -8,6 +8,8 @@ export const getFormalSettlements = keyword =>
request({ url: `${baseUrl}/candidate-formal-settlements`, method: 'get', params: { keyword } });
export const getFormalDetails = formalSettlementId =>
request({ url: `${baseUrl}/formal-details`, method: 'get', params: { formalSettlementId } });
export const getFeeOptions = () =>
request({ url: `${baseUrl}/fee-options`, method: 'get' });
export const save = data => request({ url: `${baseUrl}/save`, method: 'post', data });
export const remove = id => request({ url: `${baseUrl}/remove`, method: 'post', params: { id } });
export const submit = id => request({ url: `${baseUrl}/submit`, method: 'post', data: { id } });
+10 -4
View File
@@ -4,6 +4,8 @@ const baseUrl = '/blade-transport/transport-reconciliation';
export const getList = (current, size, params) =>
request({ url: `${baseUrl}/list`, method: 'get', params: { current, size, ...params } });
export const exportList = params =>
request({ url: `${baseUrl}/export`, method: 'get', params, responseType: 'blob' });
export const getDetail = id => request({ url: `${baseUrl}/detail`, method: 'get', params: { id } });
export const getFormalOptions = (current, size, params) =>
request({
@@ -14,17 +16,21 @@ export const getFormalOptions = (current, size, params) =>
export const save = data => request({ url: `${baseUrl}/save`, method: 'post', data });
export const remove = id => request({ url: `${baseUrl}/remove`, method: 'post', params: { id } });
export const match = id => request({ url: `${baseUrl}/match`, method: 'post', params: { id } });
export const matchPreview = data =>
request({ url: `${baseUrl}/match-preview`, method: 'post', data });
export const manualMatch = data =>
request({ url: `${baseUrl}/manual-match`, method: 'post', data });
export const unmatch = internalId =>
request({ url: `${baseUrl}/unmatch`, method: 'post', params: { internalId } });
export const adjust = data => request({ url: `${baseUrl}/adjust`, method: 'post', data });
export const updateByMatch = id =>
request({ url: `${baseUrl}/update-by-match`, method: 'post', params: { id } });
export const updateByMatch = (id, data) =>
request({ url: `${baseUrl}/update-by-match`, method: 'post', params: { id }, data });
export const complete = id =>
request({ url: `${baseUrl}/complete`, method: 'post', params: { id } });
export const template = mode =>
request({ url: `${baseUrl}/template`, method: 'get', params: { mode }, responseType: 'blob' });
export const completeWithData = data =>
request({ url: `${baseUrl}/complete-with-data`, method: 'post', data });
export const template = (mode, params) =>
request({ url: `${baseUrl}/template`, method: 'get', params: { mode, ...params }, responseType: 'blob' });
const importFile = (url, id, file) => {
const data = new FormData();
+7
View File
@@ -78,3 +78,10 @@ export const getDeptLazyTree = parentId => {
},
});
};
export const getPlatformCompanySelect = () => {
return request({
url: '/blade-system/dept/platform-company-select',
method: 'get',
});
};
+7
View File
@@ -86,3 +86,10 @@ export const getDictionary = params => {
params,
});
};
export const getDictionaryAll = () => {
return request({
url: '/blade-system/dict-biz/select-all',
method: 'get',
});
};
@@ -0,0 +1,25 @@
import request from '@/axios';
const baseUrl = '/blade-transport/vehicle-dispatch';
export const getList = (current, size, params) =>
request({ url: `${baseUrl}/list`, method: 'get', params: { ...params, current, size } });
export const getDetail = id => request({ url: `${baseUrl}/detail`, method: 'get', params: { id } });
export const submit = row => request({ url: `${baseUrl}/submit`, method: 'post', data: row });
export const remove = ids => request({ url: `${baseUrl}/remove`, method: 'post', params: { ids } });
export const submitApproval = id =>
request({ url: `${baseUrl}/submit-approval`, method: 'post', params: { id } });
export const approve = id => request({ url: `${baseUrl}/approve`, method: 'post', params: { id } });
export const exportVehicleDispatch = params =>
request({
url: `${baseUrl}/export-vehicle-dispatch`,
method: 'get',
params,
responseType: 'blob',
});
@@ -47,3 +47,11 @@ export const update = row => {
data: row,
});
};
export const getExpiryStat = params => {
return request({
url: '/blade-transport/annual-inspection-record/expiry-stat',
method: 'get',
params,
});
};
+20
View File
@@ -113,6 +113,26 @@ export const getScoreTemplate = quantificationId => {
});
};
export const queryKingdeeCustomer = creditCode => {
return request({
url: '/blade-transport/bfi/customer/query-by-credit-code',
method: 'get',
params: {
creditCode,
},
});
};
export const syncKingdee = id => {
return request({
url: '/blade-transport/customer-archive/sync-kingdee',
method: 'post',
params: {
id,
},
});
};
export const recognizeBusinessLicenseOcr = imageUrl => {
return request({
url: '/blade-transport/baidu-ocr/recognize-url',
+8
View File
@@ -223,6 +223,14 @@ axios.interceptors.response.use(
},
error => {
NProgress.done();
// 网络级失败(HTTP 状态 >500、网关错误、超时、断网等 validateStatus 放行之外的响应)
// 原为静默 reject,接口报错页面无任何感知;统一补错误提示,取消请求与刷新令牌请求除外
if (!axios.isCancel(error) && !isRefreshTokenRequest(error?.config)) {
ElMessage({
message: error?.response?.data?.msg || '请求失败,请稍后重试',
type: 'error',
});
}
return Promise.reject(new Error(error));
}
);
+73 -25
View File
@@ -1,11 +1,5 @@
<template>
<el-dialog
v-model="visible"
title="地图选择地址"
width="920px"
append-to-body
@opened="initMap"
>
<el-dialog v-model="visible" title="地图选择地址" width="920px" append-to-body @opened="initMap">
<div class="address-map-picker__toolbar">
<el-input
v-model="keyword"
@@ -15,7 +9,14 @@
/>
<el-button type="primary" :loading="searching" @click="searchKeyword">搜索</el-button>
</div>
<div ref="map" class="address-map-picker__map"></div>
<div class="address-map-picker__content">
<map-search-results
v-if="searchResults.length"
:results="searchResults"
@select="selectSearchResult"
/>
<div ref="map" class="address-map-picker__map"></div>
</div>
<div class="address-map-picker__info">{{ status }}</div>
<template #footer>
<el-button @click="visible = false">取消</el-button>
@@ -54,6 +55,8 @@ export default {
amap: null,
marker: null,
geocoder: null,
searchResults: [],
mapInitializing: null,
};
},
watch: {
@@ -65,6 +68,7 @@ export default {
this.keyword = this.address || '';
this.selected = {};
this.status = '可搜索地址或点击地图选点';
this.searchResults = [];
}
},
},
@@ -96,25 +100,39 @@ export default {
return amapLoader;
},
initMap() {
this.loadAmap()
if (this.mapInitializing) return this.mapInitializing;
this.mapInitializing = this.loadAmap()
.then(() => {
this.$nextTick(() => {
if (!this.amap) {
this.amap = new window.AMap.Map(this.$refs.map, {
center: [116.40769, 39.89945],
zoom: 11,
});
this.amap.on('click', event => this.pickPoint(event.lnglat));
} else {
this.amap.resize();
this.clearMarker();
}
if (!window.AMap?.Map) {
throw new Error('高德地图组件未就绪');
}
return new Promise(resolve => {
this.$nextTick(() => {
if (!this.$refs.map) return resolve(null);
if (!this.amap) {
this.amap = new window.AMap.Map(this.$refs.map, {
center: [116.40769, 39.89945],
zoom: 11,
});
this.amap.on('click', event => this.pickPoint(event.lnglat));
} else {
this.amap.resize();
this.clearMarker();
}
resolve(this.amap);
});
});
})
.catch(() => {
this.$message.error('高德地图组件加载失败,请稍后重试');
this.visible = false;
return null;
})
.finally(() => {
this.mapInitializing = null;
});
return this.mapInitializing;
},
ensureGeocoder() {
if (this.geocoder) return Promise.resolve(this.geocoder);
@@ -154,15 +172,28 @@ export default {
this.$message.warning('请输入地址关键词');
return;
}
if (this.searching) return;
this.searchResults = [];
this.searching = true;
this.loadAmap()
.then(() => this.runGeocode('location', keyword))
this.initMap()
.then(map => (map ? this.runGeocode('location', keyword) : null))
.then(result => {
const point = result.geocodes?.[0]?.location || result.location;
if (!result) return;
const geocodes = result.geocodes || (result.location ? [result] : []);
this.searchResults = geocodes.map((item, index) => ({
id: item.id || index,
name: item.formattedAddress || item.address || keyword,
address: item.formattedAddress || item.address || keyword,
location: item.location,
}));
const point = geocodes[0]?.location || result.location;
if (!point) {
throw new Error('未找到匹配地址');
}
this.pickPoint(point, keyword);
return this.$nextTick().then(() => {
this.amap?.resize();
this.pickPoint(point, geocodes[0]?.formattedAddress || keyword);
});
})
.catch(() => {
this.status = '未找到匹配地址';
@@ -172,6 +203,11 @@ export default {
this.searching = false;
});
},
selectSearchResult(item) {
if (item && item.location) {
this.pickPoint(item.location, item.address || item.name || '');
}
},
pickPoint(point, fallbackAddress = '') {
const longitude = typeof point.getLng === 'function' ? point.getLng() : point.lng;
const latitude = typeof point.getLat === 'function' ? point.getLat() : point.lat;
@@ -181,7 +217,11 @@ export default {
}
const lnglat = new window.AMap.LngLat(Number(longitude), Number(latitude));
this.renderMarker(lnglat);
this.selected = { longitude: Number(longitude), latitude: Number(latitude), address: fallbackAddress };
this.selected = {
longitude: Number(longitude),
latitude: Number(latitude),
address: fallbackAddress,
};
this.status = '正在解析地址...';
this.resolving = true;
this.runGeocode('address', lnglat)
@@ -238,11 +278,19 @@ export default {
}
&__map {
flex: 1 1 auto;
width: 100%;
min-width: 0;
height: 420px;
border: 1px solid #eff1f7;
}
&__content {
display: flex;
gap: 12px;
min-width: 0;
}
&__info {
margin-top: 10px;
color: #606266;
@@ -0,0 +1,65 @@
<template>
<div v-if="results.length" class="map-search-results">
<div class="map-search-results__title">搜索结果</div>
<el-empty v-if="!results.length" description="暂无搜索结果" :image-size="60" />
<div
v-for="(item, index) in results"
:key="item.id || index"
class="map-search-results__item"
@click="$emit('select', item)"
>
<div class="map-search-results__name">{{ item.name || item.address || '未命名地址' }}</div>
<div class="map-search-results__address">{{ item.address || item.name || '-' }}</div>
</div>
</div>
</template>
<script>
export default {
props: {
results: {
type: Array,
default: () => [],
},
},
emits: ['select'],
};
</script>
<style lang="scss" scoped>
.map-search-results {
width: 260px;
height: 420px;
overflow-y: auto;
border: 1px solid #eff1f7;
background: #fff;
flex: 0 0 260px;
&__title {
padding: 10px 12px;
border-bottom: 1px solid #eff1f7;
font-weight: 600;
}
&__item {
padding: 10px 12px;
cursor: pointer;
border-bottom: 1px solid #f5f5f5;
}
&__item:hover {
background: #f5f9ff;
}
&__name {
color: #303133;
font-size: 14px;
}
&__address {
margin-top: 4px;
color: #909399;
font-size: 12px;
}
}
</style>
+3 -1
View File
@@ -15,10 +15,12 @@
</template>
<script>
import VuePdfEmbed from 'vue-pdf-embed';
import { defineAsyncComponent } from 'vue';
import 'vue-pdf-embed/dist/styles/annotationLayer.css';
import 'vue-pdf-embed/dist/styles/textLayer.css';
const VuePdfEmbed = defineAsyncComponent(() => import('vue-pdf-embed'));
export default {
name: 'PdfPreview',
components: { VuePdfEmbed },
@@ -51,9 +51,9 @@
<vehicle-attachment-upload
:model-value="rows"
:file-types="attachmentFileTypes"
:max-size="500"
:max-size="maxSize"
:show-tip="true"
tip="支持pdfbmpjpegpngjpgdocdocxpptpptxxlsxxlsemlmsgzip的文件格式单个文件不超过500M"
:tip="`支持pdf、bmp、jpeg、png、jpg、doc、docx、ppt、pptx、xlsx、xls、eml、msg、zip的文件格式单个文件不超过${maxSize}MB`"
:show-file-list="false"
button-text="上传附件"
@update:model-value="handleUploadChange"
@@ -149,6 +149,10 @@ export default {
type: Boolean,
default: false,
},
maxSize: {
type: Number,
default: 500,
},
},
emits: ['update:modelValue'],
data() {
@@ -250,7 +254,16 @@ export default {
},
batchDownload() {
const rows = this.selectedRows.length ? this.selectedRows : this.rows;
rows.forEach(this.downloadAttachment);
const downloadableRows = rows.filter(row => this.attachmentUrl(row));
if (!downloadableRows.length) {
this.$message.warning(
this.selectedRows.length ? '所选附件暂无可下载地址' : '暂无可下载附件'
);
return;
}
downloadableRows.forEach((row, index) => {
window.setTimeout(() => this.downloadAttachment(row), index * 500);
});
},
previewAttachment(row) {
const url = this.attachmentUrl(row);
@@ -75,8 +75,8 @@ import pdfWorkerSrc from 'pdfjs-dist/build/pdf.worker.mjs?url';
import { baseUrl } from '@/config/env';
import { getUploadHeaders } from '@/utils/upload';
const UNIFIED_ATTACHMENT_TIP =
'支持pdf、bmp、jpeg、png、jpg、doc、docx、ppt、pptx、xlsx、xls、eml、msg、zip的文件格式,单个文件不超过500M';
const UNIFIED_ATTACHMENT_TIP_PREFIX =
'支持pdf、bmp、jpeg、png、jpg、doc、docx、ppt、pptx、xlsx、xls、eml、msg、zip的文件格式,单个文件不超过';
const MIME_MAP = {
jpg: 'image/jpeg',
@@ -215,7 +215,7 @@ export default {
return this.acceptedList.join(',');
},
tipText() {
return this.tip || UNIFIED_ATTACHMENT_TIP;
return this.tip || `${UNIFIED_ATTACHMENT_TIP_PREFIX}${this.maxSize}M`;
},
uploadingCount() {
return this.fileList.filter(file => ['ready', 'uploading'].includes(file.status)).length;
@@ -335,7 +335,12 @@ export default {
const data = (file.response && file.response.data) || file.data || file;
const url = data.link || data.url || data.domain || file.url || '';
const originalName =
data.originalName || file.originalName || data.name || file.name || this.getFileName(url) || '附件';
data.originalName ||
file.originalName ||
file.name ||
data.name ||
this.getFileName(url) ||
'附件';
const extension = this.getExtension({ name: originalName, url });
return {
...data,
+1 -1
View File
@@ -11,7 +11,7 @@ export default {
tenantMode: true, // 是否开启租户模式
tenantId: '000000', // 管理组租户编号
captchaMode: true, // 是否开启验证码模式
captchaType: 'behavior', // 验证码类型(image:首屏图形验证码 behavior:登录时弹出点选/滑块/旋转随机行为验证)
captchaType: 'image', // 验证码类型(image:首屏图形验证码 behavior:登录时弹出点选/滑块/旋转随机行为验证)
switchMode: false, // 是否开启登录切换角色部门
lockPage: '/lock', // 锁屏页面地址
tokenTime: 3000, // 定时刷新token间隔(单位:毫秒)
+3 -1
View File
@@ -43,6 +43,7 @@ import tenantPackage from './views/system/tenantpackage.vue';
import tenantDatasource from './views/system/tenantdatasource.vue';
// 通用弹窗分组白卡(灰底弹窗内使用,标题在卡内)
import sectionCard from './components/section-card/main.vue';
import mapSearchResults from './components/map-search-results/main.vue';
window.$crudCommon = crudCommon;
debug();
@@ -66,6 +67,7 @@ app.component('formSetting', formSetting);
app.component('tenantPackage', tenantPackage);
app.component('tenantDatasource', tenantDatasource);
app.component('sectionCard', sectionCard);
app.component('mapSearchResults', mapSearchResults);
app.config.globalProperties.$app = app;
app.config.globalProperties.$dayjs = dayjs;
app.config.globalProperties.website = website;
@@ -81,7 +83,7 @@ app.use(ElementPlus, {
});
app.use(Avue, {
axios,
calcHeight: 10,
calcHeight: -26,
crudOption: {
searchIcon: true,
searchIndex: 4,
+173
View File
@@ -0,0 +1,173 @@
import { getDeptTree } from '@/api/system/dept';
import { ElCascader } from 'element-plus';
import { h } from 'vue';
/**
* 所属组织 统一搜索 mixin
* ------------------------------------------------------------------
* 全站「所属组织」搜索栏统一为级联选择器(el-cascader,单选),风格与客商档案
* vehicle/customer-archive.vue)保持一致。
*
* 接入步骤(在使用了 avue-crud 的页面中):
* 1. 混入本 mixinmixins: [organizationSearch]
* 2. option 中「所属组织」列加上 searchslot: trueprop 为 organizationName 或 deptName 均可)
* 3. 在 created / 初始化时调用 this.loadOrganizationOptions()
*
* 说明:
* - 自动识别 organizationName / deptName 两种 prop,并挂载 column.renderSearch
* - 树节点标识统一用 id,级联值为「根 → 选中节点」的 id 路径数组
* - checkStrictly 打开,任意层级(含非末级)都可直接选中
* - 页面若已有 excludeExternalOrganization / normalizeOrgTree 等方法,
* 组件自身方法优先级更高,会覆盖本 mixin 的默认实现
* - 搜索值需在各自的 searchChange / normalizeSearch 中按后端要求转换为部门名称:
* 级联值是路径数组,统一用 findOrgById(路径)?.rawLabel 取末级名称
* - 表单区(新增/编辑)需要回显时,可用 findOrgPath(deptId) 把 id 转成路径,
* 参考 customer-archive 的 deptCascaderValue 计算属性
*/
const ORG_PROPS = ['organizationName', 'deptName'];
export default {
data() {
return {
// 树形组织数据,仅供搜索栏 el-cascader 使用;
// 与页面自身 organizationOptions(多为表单扁平列表)隔离,避免相互覆盖
organizationTreeOptions: [],
organizationTreeFlatOptions: [],
organizationLoading: false,
};
},
computed: {
// 所属组织级联配置:checkStrictly 允许选中任意层级,不必选到末级
organizationCascaderProps() {
return {
value: 'id',
label: 'label',
children: 'children',
emitPath: true,
checkStrictly: true,
expandTrigger: 'click',
};
},
},
methods: {
loadOrganizationOptions() {
if (this.organizationLoading) return;
this.organizationLoading = true;
const tenantId = this.userInfo?.tenantId;
getDeptTree(tenantId)
.then(res => {
const source = res.data?.data || res.data || [];
const tree = this.excludeExternalOrganization
? this.excludeExternalOrganization(source)
: source;
this.organizationTreeOptions = this.normalizeOrgTree(tree);
this.organizationTreeFlatOptions = this.flattenOrgTree(this.organizationTreeOptions);
const option = this.tableOption || this.option;
if (!option) return;
ORG_PROPS.forEach(prop => {
const column = this.findColumn?.(option.column, prop);
if (column) {
column.renderSearch = scope => this.renderOrganizationSearch(scope, prop);
}
});
})
.finally(() => {
this.organizationLoading = false;
});
},
// 默认排除「外部组织」节点;页面可覆盖
excludeExternalOrganization(tree = []) {
return (tree || []).reduce((result, item) => {
const name = item.title || item.deptName || item.name || item.label || '';
if (String(name).trim() === '外部组织') return result;
result.push({
...item,
children: this.excludeExternalOrganization(item.children || []),
});
return result;
}, []);
},
normalizeOrgTree(tree = []) {
return (tree || []).map(item => {
const label = item.title || item.deptName || item.name || item.label || '';
const children = this.normalizeOrgTree(item.children || []);
return {
...item,
id: String(item.id),
label,
rawLabel: label,
children: children.length ? children : undefined,
};
});
},
flattenOrgTree(tree = []) {
return (tree || []).flatMap(item => [
{ id: String(item.id), label: item.label, rawLabel: item.rawLabel },
...this.flattenOrgTree(item.children || []),
]);
},
// 兼容两种入参:级联路径数组(取末级)或单个部门 id
findOrgById(id) {
const value = Array.isArray(id) ? id.at(-1) : id;
return this.organizationTreeFlatOptions.find(item => String(item.id) === String(value));
},
// 由部门 id 反查「根 → 该节点」的 id 路径,供级联回显(找不到返回 null)
findOrgPath(id, tree = this.organizationTreeOptions, parents = []) {
const target = Array.isArray(id) ? id.at(-1) : id;
if (target === undefined || target === null || target === '') return null;
for (const node of tree || []) {
const path = [...parents, String(node.id)];
if (String(node.id) === String(target)) return path;
const matched = this.findOrgPath(target, node.children, path);
if (matched) return matched;
}
return null;
},
// 由部门 id 取组织名称(末级),供表单提交
findOrgName(id) {
return this.findOrgById(id)?.rawLabel || '';
},
// 组织名称 → 级联路径(表单回显用;部门树异步加载完成后会自动重算)
resolveOrgPath(name) {
const value = String(name ?? '').trim();
if (!value) return [];
const node = this.organizationTreeFlatOptions.find(item => item.rawLabel === value);
return node ? this.findOrgPath(node.id) || [] : [];
},
// 级联路径 → 组织名称(表单/搜索提交用,取末级节点名称)
resolveOrgName(path) {
const value = Array.isArray(path)
? path.filter(item => item !== undefined && item !== null && item !== '')
: [];
return value.length ? this.findOrgById(value)?.rawLabel || '' : '';
},
// 搜索提交前把级联路径数组就地转成组织名称(后端按名称过滤)
normalizeOrganizationSearch(params, prop = 'organizationName') {
if (Array.isArray(params?.[prop])) {
params[prop] = this.resolveOrgName(params[prop]);
}
return params;
},
renderOrganizationSearch(scope, prop = 'organizationName') {
return h(ElCascader, {
modelValue: Array.isArray(scope.row?.[prop]) ? scope.row[prop] : [],
'onUpdate:modelValue': value => {
// 级联单选:modelValue 必须是 id 路径数组,否则控件内部状态会错乱导致无法再次选中
if (scope.row) scope.row[prop] = Array.isArray(value) ? value : [];
},
options: this.organizationTreeOptions,
props: {
label: 'label',
value: 'id',
children: 'children',
checkStrictly: true,
expandTrigger: 'click',
},
filterable: true,
clearable: true,
style: 'width: 100%',
placeholder: '请选择 所属组织',
});
},
},
};
+3
View File
@@ -26,6 +26,8 @@ export const getCargoTypeOption = ctx => ({
height: 'auto',
calcHeight: 22,
dialogWidth: 760,
// 货物类型弹窗单独使用样式,避免全局 Avue footer 上移遮挡底部备注字段
dialogCustomClass: 'cargo-type-dialog',
labelPosition: 'right',
labelWidth: 'auto',
tip: false,
@@ -172,6 +174,7 @@ export const getCargoTypeOption = ctx => ({
label: '备注',
prop: 'remark',
type: 'textarea',
formslot: true,
minRows: 2,
span: 24,
minWidth: 180,
+133
View File
@@ -0,0 +1,133 @@
const dimensionOptions = [
{ label: '重量', value: '重量' },
{ label: '体积', value: '体积' },
{ label: '数量', value: '数量' },
];
const statusOptions = [
{ label: '启用', value: 1 },
{ label: '停用', value: 2 },
];
export const createOption = () => ({
height: 'auto',
calcHeight: 32,
dialogWidth: 680,
labelPosition: 'right',
labelWidth: 'auto',
tip: false,
searchBtnText: '查询',
emptyBtnText: '重置',
saveBtnText: '提交',
updateBtnText: '提交',
searchShow: true,
searchMenuSpan: 24,
searchIcon: true,
searchIndex: 4,
searchMenuPosition: 'right',
border: true,
index: true,
indexLabel: '序号',
indexWidth: 70,
addBtn: false,
viewBtn: false,
editBtn: false,
delBtn: false,
selection: true,
dialogClickModal: false,
menuWidth: 240,
menuFixed: 'right',
column: [
{
label: '计量单位',
prop: 'unitName',
minWidth: 150,
search: true,
searchOrder: 3,
searchSpan: 6,
maxlength: 50,
showWordLimit: true,
rules: [
{ required: true, message: '请输入计量单位', trigger: 'blur' },
{ max: 50, message: '计量单位不能超过50个字', trigger: 'blur' },
],
},
{
label: '计量维度',
prop: 'dimension',
type: 'select',
minWidth: 130,
search: true,
searchOrder: 2,
searchSpan: 6,
dicData: dimensionOptions,
rules: [{ required: true, message: '请选择计量维度', trigger: 'change' }],
},
{
label: '备注',
prop: 'remark',
type: 'textarea',
minRows: 2,
span: 24,
minWidth: 200,
maxlength: 200,
showWordLimit: true,
overHidden: true,
rules: [{ max: 200, message: '备注不能超过200个字', trigger: 'blur' }],
},
{
label: '状态',
prop: 'status',
type: 'select',
search: true,
searchOrder: 1,
searchSpan: 6,
slot: true,
dataType: 'number',
dicData: statusOptions,
clearable: true,
value: 1,
addDisplay: false,
editDisplay: false,
minWidth: 100,
},
{
label: '创建人',
prop: 'createUserName',
addDisplay: false,
editDisplay: false,
viewDisplay: false,
display: false,
},
{
label: '更新人',
prop: 'updateUserName',
addDisplay: false,
editDisplay: false,
viewDisplay: false,
display: false,
},
{
label: '创建时间',
prop: 'createTime',
type: 'datetime',
format: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'YYYY-MM-DD HH:mm:ss',
sortable: true,
addDisplay: false,
editDisplay: false,
display: false,
},
{
label: '更新时间',
prop: 'updateTime',
type: 'datetime',
format: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'YYYY-MM-DD HH:mm:ss',
sortable: true,
addDisplay: false,
editDisplay: false,
display: false,
},
],
});
+58 -36
View File
@@ -2,7 +2,6 @@ import {
auditColumns,
createCrudOption,
packageOptions,
priceUnitOptions,
textRule,
} from './common';
@@ -25,10 +24,42 @@ export const config = {
enableAllDept: false,
};
// 单价统一按两位小数展示;格式非法时保留原值,交由表单校验提示。
export const formatCargoValue = value => {
if (value === undefined || value === null) return '';
const raw = String(value).trim();
if (!raw || raw === '-1') return '';
if (!/^\d+(?:\.\d+)?$/.test(raw)) return raw;
const number = Number(raw);
return Number.isFinite(number) ? number.toFixed(2) : raw;
};
export const option = createCrudOption([
{
label: '一级货物类型',
prop: 'firstCargoTypeName',
formslot: true,
order: 60,
span: 12,
minWidth: 150,
editDisabled: true,
rules: [{ required: true, message: '请选择一级货物类型', trigger: 'change' }],
},
{
label: '二级货物类型',
prop: 'secondCargoTypeName',
formslot: true,
order: 59,
span: 12,
minWidth: 150,
editDisabled: true,
rules: [{ required: true, message: '请选择二级货物类型', trigger: 'change' }],
},
{
label: '货物名称',
prop: 'cargoName',
order: 50,
span: 12,
minWidth: 150,
placeholder: '请输入',
rules: textRule('货物名称', 100, true),
@@ -37,6 +68,8 @@ export const option = createCrudOption([
label: '货物编号',
prop: 'cargoCode',
formslot: true,
order: 49,
span: 12,
minWidth: 120,
maxlength: 20,
showWordLimit: true,
@@ -45,14 +78,6 @@ export const option = createCrudOption([
{ max: 20, message: '货物编号不能超过20个字符', trigger: 'blur' },
],
},
{
label: '一级货物类型',
prop: 'firstCargoTypeName',
formslot: true,
minWidth: 150,
editDisabled: true,
rules: [{ required: true, message: '请选择一级货物类型', trigger: 'change' }],
},
{
label: '一级货物类型编码',
prop: 'firstCargoTypeCode',
@@ -61,14 +86,6 @@ export const option = createCrudOption([
addDisplay: false,
editDisabled: true,
},
{
label: '二级货物类型',
prop: 'secondCargoTypeName',
formslot: true,
minWidth: 150,
editDisabled: true,
rules: [{ required: true, message: '请选择二级货物类型', trigger: 'change' }],
},
{
label: '二级货物类型编码',
prop: 'secondCargoTypeCode',
@@ -174,12 +191,16 @@ export const option = createCrudOption([
prop: 'packageType',
type: 'select',
dicData: packageOptions,
order: 39,
span: 12,
minWidth: 100,
},
{
label: '品牌',
prop: 'brand',
search: false,
order: 40,
span: 12,
minWidth: 120,
placeholder: '请输入',
rules: textRule('品牌', 50),
@@ -187,22 +208,18 @@ export const option = createCrudOption([
{
label: '规格',
prop: 'specification',
order: 29,
span: 12,
minWidth: 120,
placeholder: '请输入',
rules: textRule('规格', 50),
},
{
label: '型号',
prop: 'model',
minWidth: 120,
placeholder: '请输入',
rules: textRule('型号', 50),
},
{
label: '单价',
label: '货值',
prop: 'cargoValue',
formslot: true,
formatter: row => (String(row.cargoValue) === '-1' ? '' : row.cargoValue),
order: 30,
formatter: row => formatCargoValue(row.cargoValue),
minWidth: 120,
rules: [
{
@@ -225,10 +242,19 @@ export const option = createCrudOption([
label: '计价单位',
prop: 'priceUnit',
type: 'select',
dicData: priceUnitOptions,
dicData: [],
display: false,
minWidth: 120,
},
{
label: '型号',
prop: 'model',
order: 19,
span: 12,
minWidth: 120,
placeholder: '请输入',
rules: textRule('型号', 50, true),
},
{
label: '尺寸',
prop: 'sizeText',
@@ -238,23 +264,19 @@ export const option = createCrudOption([
rules: textRule('尺寸', 100),
},
{
label: '其他说明1',
label: '说明',
prop: 'descriptionOne',
order: 20,
span: 12,
minWidth: 160,
placeholder: '请输入',
rules: textRule('其他说明1', 100),
},
{
label: '其他说明2',
prop: 'descriptionTwo',
minWidth: 160,
placeholder: '请输入',
rules: textRule('其他说明2', 100),
rules: textRule('说明', 100),
},
{
label: '备注',
prop: 'remark',
type: 'textarea',
order: 10,
minRows: 2,
span: 24,
maxlength: 200,
+38 -2
View File
@@ -41,7 +41,7 @@ export const planStatusOptions = [
export const waybillStatusOptions = [
{ label: '草稿', value: 'draft' },
{ label: '待执行', value: 'pending' },
{ label: '进行中', value: 'processing' },
{ label: '进行中', value: 'running' },
{ label: '已完成', value: 'completed' },
{ label: '已取消', value: 'cancelled' },
];
@@ -49,7 +49,6 @@ export const waybillStatusOptions = [
export const dataSourceOptions = [
{ label: '手工创建', value: '手工创建' },
{ label: '批量导入', value: '批量导入' },
{ label: '模板生成', value: '模板生成' },
{ label: '计划调度', value: '计划调度' },
];
@@ -98,6 +97,11 @@ export const businessTypeOptions = [
{ label: '普通业务', value: '普通业务' },
];
export const businessModeOptions = [
{ label: '国内运输', value: '国内运输' },
{ label: '跨境运输', value: '跨境运输' },
];
export const settlementModeOptions = [
{ label: '先票后款', value: '先票后款' },
{ label: '先款后票', value: '先款后票' },
@@ -126,12 +130,18 @@ export const contractApprovalStatusOptions = [
{ label: '草稿', value: 'draft' },
{ label: '审批中', value: 'reviewing' },
{ label: '已驳回', value: 'rejected' },
{ label: '已撤回', value: 'withdrawn' },
{ label: '审批通过', value: 'approved' },
{ label: '变更审批中', value: 'change_reviewing' },
{ label: '变更驳回', value: 'change_rejected' },
{ label: '变更审批通过', value: 'change_approved' },
];
export const contractArchiveStatusOptions = [
{ label: '未归档', value: '未归档' },
{ label: '已归档', value: '已归档' },
];
export const nodeOptions = [
{ label: '接单', value: '接单' },
{ label: '到场', value: '到场' },
@@ -170,6 +180,32 @@ export const nonNegativeRule = label => ({
trigger: 'blur',
});
// 日期必须晚于当前日期(当天不可选):选择后立即校验,trigger 固定为 change
// 取值支持 YYYY-MM-DD / YYYY-MM-DD HH:mm:ss / 时间戳
export const futureDateRule = label => ({
validator: (rule, value, callback) => {
if (value === undefined || value === null || value === '') {
callback();
return;
}
const raw = String(value).trim().replace(/-/g, '/');
const selected = new Date(raw);
if (Number.isNaN(selected.getTime())) {
callback();
return;
}
const today = new Date();
today.setHours(0, 0, 0, 0);
selected.setHours(0, 0, 0, 0);
if (selected.getTime() <= today.getTime()) {
callback(new Error(`${label}必须晚于当前日期`));
return;
}
callback();
},
trigger: ['change', 'blur'],
});
export const phoneRule = label => ({
pattern: /^1[3-9]\d{9}$/,
message: `${label}格式不正确`,
+76 -16
View File
@@ -1,6 +1,7 @@
import {
auditColumns,
contractApprovalStatusOptions,
contractArchiveStatusOptions,
contractCategoryOptions,
contractStageOptions,
createCrudOption,
@@ -27,6 +28,12 @@ const listDicFormatter = res => {
return [];
};
const projectNameDicFormatter = res => {
const list = listDicFormatter(res);
// 过滤掉 projectName 为空的记录
return list.filter(item => item && item.projectName && String(item.projectName).trim());
};
export const config = {
title: '合同管理',
permission: 'contract_manage',
@@ -42,7 +49,7 @@ export const config = {
batchDelete: false,
enableProjectSelect: true,
projectQueryParams: {
approvalStatuses: 'approved,change_approved',
contractSelectable: true,
},
actions: ['copy'],
statusProp: 'approvalStatus',
@@ -65,6 +72,10 @@ export const config = {
['legalSealFlag', '是否需要加盖法人章'],
['copyCount', '一式(份)'],
['paymentDays', '回款账期(天)'],
['contractAmount', '合同金额'],
['templateFlag', '是否范本'],
['originalContractNo', '原件合同编号'],
['electronicSealFlag', '是否电子章'],
['remark', '备注', 2],
],
},
@@ -78,6 +89,7 @@ export const config = {
['effectiveType', '生效类型'],
['contractStage', '合同阶段'],
['approvalStatus', '审核状态'],
['archiveStatus', '归档状态'],
['currentNode', '当前节点'],
['currentProcessor', '当前处理人'],
],
@@ -98,7 +110,7 @@ export const config = {
},
deleteStatus: ['draft'],
deleteStage: ['draft'],
editStatus: ['draft', 'rejected', 'change_rejected'],
editStatus: ['draft', 'withdrawn', 'rejected', 'change_rejected'],
operations: [
{
action: 'flow',
@@ -251,6 +263,7 @@ export const option = createCrudOption([
searchPlaceholder: '请输入',
order: 180,
slot: true,
overHidden: true,
minWidth: 240,
rules: textRule('合同名称', 100, true),
},
@@ -264,8 +277,8 @@ export const option = createCrudOption([
formslot: true,
order: 165,
dicUrl:
'/blade-transport/project-apply/list?current=1&size=9999&approvalStatuses=approved,change_approved',
dicFormatter: listDicFormatter,
'/blade-transport/project-apply/list?current=1&size=9999&contractSelectable=true',
dicFormatter: projectNameDicFormatter,
props: {
label: 'projectName',
value: 'projectName',
@@ -285,20 +298,11 @@ export const option = createCrudOption([
prop: 'organizationName',
search: true,
searchOrder: 3,
searchType: 'cascader',
searchPlaceholder: '全部',
searchslot: true,
searchPlaceholder: '请选择 所属组织',
formslot: true,
order: 120,
dicData: [],
props: {
label: 'label',
value: 'id',
children: 'children',
},
checkStrictly: true,
emitPath: false,
showAllLevels: false,
filterable: true,
minWidth: 150,
rules: selectRule('所属组织'),
},
@@ -318,7 +322,9 @@ export const option = createCrudOption([
label: '签约类型',
prop: 'signType',
type: 'select',
search: false,
search: true,
searchOrder: 10,
searchPlaceholder: '请选择',
span: 8,
order: 190,
dicData: signTypeOptions,
@@ -485,6 +491,47 @@ export const option = createCrudOption([
order: 50,
minWidth: 130,
},
{
label: '合同金额',
prop: 'contractAmount',
type: 'number',
min: 0,
precision: 2,
hide: true,
order: 45,
minWidth: 130,
},
{
label: '是否范本',
prop: 'templateFlag',
type: 'select',
dicData: [
{ label: '否', value: 0 },
{ label: '是', value: 1 },
],
hide: true,
order: 40,
minWidth: 100,
},
{
label: '原件合同编号',
prop: 'originalContractNo',
hide: true,
order: 35,
minWidth: 160,
},
{
label: '是否电子章',
prop: 'electronicSealFlag',
type: 'select',
dicData: [
{ label: '否', value: 0 },
{ label: '是', value: 1 },
],
hide: true,
order: 30,
minWidth: 110,
},
{
label: '创建时间',
prop: 'createTime',
@@ -522,6 +569,19 @@ export const option = createCrudOption([
addDisplay: false,
editDisplay: false,
},
{
label: '归档状态',
prop: 'archiveStatus',
type: 'select',
search: true,
searchOrder: 5,
searchPlaceholder: '请选择',
slot: true,
dicData: contractArchiveStatusOptions,
minWidth: 110,
addDisplay: false,
editDisplay: false,
},
{
label: '当前节点',
prop: 'currentNode',
+1 -1
View File
@@ -8,7 +8,7 @@ export const transportTypeDict = {
},
};
export const carrierTypeOptions = ['承运商', '自运', '网货平台'];
export const carrierTypeOptions = ['承运商', '自运'];
export const loadingStatusOptions = [
{ label: '草稿', value: 'draft' },
-1
View File
@@ -138,7 +138,6 @@ export const option = {
searchPlaceholder: '请选择',
dicData: processStatusOptions,
slot: true,
hide: true,
fixed: 'right',
minWidth: 100,
addDisplay: false,
+44 -13
View File
@@ -1,5 +1,6 @@
import {
auditColumns,
businessModeOptions,
businessTypeOptions,
createCrudOption,
nonNegativeRule,
@@ -16,6 +17,18 @@ const projectEffectiveTypeOptions = [
{ label: '正式', value: 'formal' },
];
export const fundUseRiskOptions = [
{ label: '高风险', value: 'high' },
{ label: '中风险', value: 'medium' },
{ label: '正常', value: 'none' },
];
// 项目资金额度使用率阈值:中风险 ≥ 80%,高风险 ≥ 90%
export const fundUseRiskThreshold = {
high: 90,
medium: 80,
};
const amountRules = label => [
{ required: true, message: `请输入${label}`, trigger: 'blur' },
nonNegativeRule(label),
@@ -77,15 +90,6 @@ export const config = {
status: ['approved'],
permission: 'project_apply_change',
},
{
action: 'voidProject',
label: '作废',
type: 'danger',
statusProp: 'approvalStatus',
status: ['approved', 'change_approved'],
permission: 'project_apply_void',
prompt: '请输入作废原因',
},
],
};
@@ -126,7 +130,7 @@ export const option = createCrudOption([
hide: true,
minWidth: 140,
maxlength: 20,
rules: textRule('项目简称', 20, true),
rules: textRule('项目简称', 20),
},
{
label: '项目类型',
@@ -165,16 +169,16 @@ export const option = createCrudOption([
rules: textRule('业务部门', 50, true),
},
{
label: '承办部门',
label: '平台公司',
prop: 'undertakeDeptName',
search: true,
searchPlaceholder: '请输入',
searchOrder: 8,
minWidth: 150,
rules: textRule('承办部门', 50, true),
rules: textRule('平台公司', 50, true),
},
{
label: '承办部门ID',
label: '平台公司ID',
prop: 'undertakeDeptId',
hide: true,
},
@@ -188,6 +192,15 @@ export const option = createCrudOption([
formatter: row => formatUserRealName(row, 'principal'),
rules: textRule('项目负责人', 50, true),
},
{
label: '资金使用风险',
prop: 'fundUseRisk',
slot: true,
minWidth: 150,
addDisplay: false,
editDisplay: false,
hide: false,
},
{
label: '项目负责人ID',
prop: 'principalUserId',
@@ -302,6 +315,15 @@ export const option = createCrudOption([
hide: true,
minWidth: 130,
},
{
label: '业务模式',
prop: 'businessMode',
type: 'select',
dicData: businessModeOptions,
hide: true,
minWidth: 120,
rules: [selectRule('业务模式')],
},
{
label: '项目规模(万元)',
prop: 'projectScale',
@@ -320,6 +342,15 @@ export const option = createCrudOption([
minWidth: 150,
rules: [nonNegativeRule('预计利润')],
},
{
label: '利润率(%',
prop: 'profitRate',
type: 'number',
precision: 2,
hide: true,
minWidth: 120,
rules: [nonNegativeRule('利润率')],
},
{
label: '资金需求(万元)',
prop: 'fundDemand',
+10 -3
View File
@@ -269,7 +269,7 @@ export const option = {
order: 270,
hide: true,
labelWidth: '0px',
className: 'business-crud-page__full-form-item',
className: 'shipping-template-page__full-form-item',
},
{ label: '运费信息', prop: 'freightJson', hide: true, display: false },
{
@@ -290,7 +290,7 @@ export const option = {
order: 250,
hide: true,
labelWidth: '0px',
className: 'business-crud-page__full-form-item',
className: 'shipping-template-page__full-form-item',
},
{ label: '项目ID', prop: 'projectId', hide: true, display: false },
{ label: '客户合同ID', prop: 'contractId', hide: true, display: false },
@@ -300,7 +300,14 @@ export const option = {
{ label: '收货地', prop: 'arrivalName', hide: true, display: false },
{ label: '收货联系人', prop: 'arrivalContact', hide: true, display: false },
{ label: '收货联系方式', prop: 'arrivalPhone', hide: true, display: false },
{ label: '所属组织', prop: 'deptName', minWidth: 150, addDisplay: false, editDisplay: false, display: false },
{
label: '所属组织',
prop: 'deptName',
minWidth: 150,
addDisplay: false,
editDisplay: false,
display: false,
},
...auditColumns.map(column => ({
...column,
display: false,
+68 -38
View File
@@ -4,6 +4,7 @@ import {
createCrudOption,
nonNegativeRule,
textRule,
withSearchPlaceholders,
} from './common';
const listDicFormatter = res => {
@@ -15,6 +16,12 @@ const listDicFormatter = res => {
return [];
};
const projectNameDicFormatter = res => {
const list = listDicFormatter(res);
// 过滤掉 projectName 为空的记录
return list.filter(item => item && item.projectName && String(item.projectName).trim());
};
const userDicFormatter = res =>
listDicFormatter(res).map(user => ({
...user,
@@ -50,30 +57,25 @@ export const config = {
detailAlignCenter: true,
detailSections: [
{
title: '申请信息',
title: '项目额度信息',
fields: [
['applicationNo', '申请单号', 1],
['projectName', '项目', 1],
['projectName', '项目名称', 1],
['projectCode', '项目编号', 1],
['undertakeDeptName', '承办部门', 1],
['applyDeptName', '申请部门', 1],
['applicantName', '申请人', 1],
['approvalStatus', '审批状态', 1],
['currentNode', '当前节点', 1],
['currentProcessor', '当前处理人', 1],
['validUntil', '申请有效期至', 1],
['remark', '备注', 1],
],
},
{
title: '额度信息',
fields: [
['projectFundLimit', '项目资金使用额度(万元)', 1],
['usedFundLimit', '已使用项目资金使用额度(万元)', 1],
['remainingFundLimit', '剩余项目资金使用额度(万元)', 1],
['applyLimit', '申请临时额度(万元)', 1],
],
},
{
title: '临时额度信息',
fields: [
['applyLimit', '申请临时额度(万元)', 1],
['validUntil', '申请有效期至', 1],
['remark', '备注', 4],
],
showAttachment: true,
},
],
operations: [
{
@@ -118,7 +120,10 @@ export const config = {
export const option = {
dialogCustomClass: 'temporary-credit-limit-dialog',
...createCrudOption([
addTitle: '新增临时额度申请',
editTitle: '编辑临时额度申请',
viewTitle: '查看临时额度申请',
...createCrudOption(withSearchPlaceholders([
{
label: '申请单号',
prop: 'applicationNo',
@@ -129,6 +134,14 @@ export const option = {
editDisplay: false,
editDisabled: true,
},
{
label: '',
prop: 'projectQuotaInfoTitle',
formslot: true,
span: 24,
hide: true,
labelWidth: 0,
},
{
label: '项目名称',
prop: 'projectName',
@@ -137,7 +150,7 @@ export const option = {
searchType: 'select',
formslot: true,
dicUrl: '/blade-transport/project-apply/list?current=1&size=9999',
dicFormatter: listDicFormatter,
dicFormatter: projectNameDicFormatter,
props: {
label: 'projectName',
value: 'projectName',
@@ -158,6 +171,7 @@ export const option = {
prop: 'projectCode',
hide: true,
disabled: true,
placeholder: '请输入',
span: 6,
minWidth: 150,
rules: textRule('项目编号', 50),
@@ -167,6 +181,7 @@ export const option = {
prop: 'undertakeDeptName',
hide: true,
disabled: true,
placeholder: '请输入',
span: 6,
minWidth: 150,
rules: textRule('承办部门', 50, true),
@@ -176,6 +191,7 @@ export const option = {
prop: 'projectFundLimit',
hide: true,
disabled: true,
placeholder: '请输入',
span: 6,
minWidth: 200,
rules: [nonNegativeRule('项目资金使用额度')],
@@ -185,6 +201,7 @@ export const option = {
prop: 'usedFundLimit',
hide: true,
disabled: true,
placeholder: '请输入',
span: 6,
minWidth: 220,
value: 0,
@@ -195,11 +212,20 @@ export const option = {
prop: 'remainingFundLimit',
hide: true,
disabled: true,
placeholder: '请输入',
span: 6,
minWidth: 230,
value: 0,
rules: [nonNegativeRule('剩余项目资金使用额度')],
},
{
label: '',
prop: 'temporaryCreditInfoTitle',
formslot: true,
span: 24,
hide: true,
labelWidth: 0,
},
{
label: '申请临时额度(万元)',
prop: 'applyLimit',
@@ -217,9 +243,31 @@ export const option = {
type: 'date',
format: 'YYYY-MM-DD',
valueFormat: 'YYYY-MM-DD',
placeholder: '请选择',
span: 6,
minWidth: 140,
rules: [{ required: true, message: '请选择申请有效期至', trigger: 'change' }],
rules: [
{ required: true, message: '请选择申请有效期至', trigger: 'change' },
],
},
{
label: '备注',
prop: 'remark',
type: 'textarea',
span: 24,
minRows: 2,
hide: true,
placeholder: '请输入',
maxlength: 200,
showWordLimit: true,
rules: textRule('备注', 200),
},
{
label: '附件',
prop: 'attachmentsJson',
formslot: true,
span: 24,
hide: true,
},
{
label: '申请部门',
@@ -284,26 +332,8 @@ export const option = {
addDisplay: false,
editDisplay: false,
},
{
label: '备注',
prop: 'remark',
type: 'textarea',
span: 24,
minRows: 2,
hide: true,
maxlength: 200,
showWordLimit: true,
rules: textRule('备注', 200),
},
{
label: '附件',
prop: 'attachmentsJson',
formslot: true,
span: 24,
hide: true,
},
...auditColumns.map(column => ({ ...column, hide: true })),
]),
])),
dialogWidth: '96%',
menuFixed: 'right',
menuWidth: 320,
+42 -14
View File
@@ -1,7 +1,6 @@
import {
auditColumns,
createCrudOption,
dataSourceOptions,
phoneRule,
planStatusOptions,
selectRule,
@@ -9,6 +8,12 @@ import {
withSearchPlaceholders,
} from './common';
const transportPlanDataSourceOptions = [
{ label: '批量导入', value: '批量导入' },
{ label: '手工创建', value: '手工创建' },
{ label: '外部系统', value: '外部系统' },
];
const listDicFormatter = res => {
const data = res?.data || res;
if (Array.isArray(data)) return data;
@@ -18,6 +23,12 @@ const listDicFormatter = res => {
return [];
};
const projectNameDicFormatter = res => {
const list = listDicFormatter(res);
// 过滤掉 projectName 为空的记录
return list.filter(item => item && item.projectName && String(item.projectName).trim());
};
const parseGoodsRows = value => {
if (!value) return [];
if (Array.isArray(value)) return value;
@@ -61,7 +72,11 @@ const getSecondCargoTypeName = item =>
'货物';
const formatGoodsInfo = row => {
const rows = parseGoodsRows(row.goodsJson);
const rows =
[row.goodsJson, row.goodsList, row.goodsRows, row.cargoList, row.cargoRows, row.goods]
.map(source => parseGoodsRows(source))
.filter(source => source.length)
.sort((left, right) => right.length - left.length)[0] || [];
if (!rows.length) return row.goodsInfo || '';
const groups = rows.reduce((result, item = {}) => {
@@ -78,11 +93,22 @@ const formatGoodsInfo = row => {
item.goodsQuantity,
item.quantityUnit,
item.goodsQuantityUnit,
item.cargoUnit,
item.unit,
].some(Boolean);
if (!hasGoodsInfo) return result;
const unit = item.quantityUnit || item.goodsQuantityUnit || item.unit || '';
const unit = String(
item.quantityUnit ||
item.goodsQuantityUnit ||
item.cargoUnit ||
item.unit ||
row.quantityUnit ||
row.goodsQuantityUnit ||
row.cargoUnit ||
row.unit ||
''
).trim();
if (!result[unit]) {
result[unit] = {
typeName: getSecondCargoTypeName(item),
@@ -150,9 +176,12 @@ const formatDispatchProgress = row => {
}
}
const lines = Array.from(summary.entries()).map(
([unit, item]) => `${formatDispatchQuantity(item.assigned)}/${formatDispatchQuantity(item.total)}${unit}`
([unit, item]) =>
`${formatDispatchQuantity(item.assigned)}/${formatDispatchQuantity(item.total)}${unit}`
);
return lines.length ? lines.join('\n') : row.dispatchProgressName || row.dispatchProgress || row.progress || '';
return lines.length
? lines.join('\n')
: row.dispatchProgressName || row.dispatchProgress || row.progress || '';
};
const auditColumn = prop => ({ ...auditColumns.find(item => item.prop === prop) });
@@ -162,7 +191,6 @@ export const config = {
permission: 'transport_plan',
exportUrl: '/blade-transport/transport-plan/export-transport-plan',
exportName: '运输计划',
enableAllDept: false,
enableProjectSelect: true,
projectQueryParams: {
approvalStatuses: 'approved,change_approved',
@@ -176,7 +204,7 @@ export const config = {
enableTransportPlanCreateActions: true,
enableTransportPlanImport: true,
fixedTransportAddressType: true,
transportPlanImportTitle: '导入发货计划',
transportPlanImportTitle: '导入运输计划',
transportPlanTemplateUrl: '/blade-transport/transport-plan/export-template',
attachmentTitle: '附件',
searchRangeMap: {
@@ -187,7 +215,7 @@ export const config = {
statusProp: 'businessStatus',
statusTextProp: 'businessStatusName',
deleteStatus: ['draft', 'waiting_dispatch'],
editStatus: ['draft', 'waiting_dispatch'],
editStatus: ['draft', 'waiting_dispatch', 'dispatching'],
detailButton: true,
detailSections: [
{
@@ -293,7 +321,6 @@ export const option = {
prop: 'goodsInfo',
formatter: row => formatGoodsInfo(row),
minWidth: 320,
className: 'business-crud-page__goods-info-cell',
overHidden: false,
showOverflowTooltip: false,
addDisplay: false,
@@ -305,7 +332,6 @@ export const option = {
prop: 'dispatchProgress',
formatter: row => formatDispatchProgress(row),
minWidth: 120,
className: 'business-crud-page__dispatch-progress-cell',
overHidden: false,
showOverflowTooltip: false,
addDisplay: false,
@@ -344,7 +370,7 @@ export const option = {
span: 6,
order: 400,
dicUrl: '/blade-transport/project-apply/list?current=1&size=9999',
dicFormatter: listDicFormatter,
dicFormatter: projectNameDicFormatter,
props: {
label: 'projectName',
value: 'projectName',
@@ -371,6 +397,7 @@ export const option = {
span: 6,
order: 350,
minWidth: 150,
rules: [{ required: true, message: '请选择计划开始日期', trigger: 'change' }],
},
{
label: '计划结束日期',
@@ -381,6 +408,7 @@ export const option = {
span: 6,
order: 340,
minWidth: 150,
rules: [{ required: true, message: '请选择计划结束日期', trigger: 'change' }],
},
{
label: '数据来源',
@@ -388,7 +416,7 @@ export const option = {
type: 'select',
search: true,
searchOrder: 1,
dicData: dataSourceOptions,
dicData: transportPlanDataSourceOptions,
minWidth: 120,
addDisplay: false,
editDisplay: false,
@@ -580,7 +608,7 @@ export const option = {
order: 270,
hide: true,
labelWidth: '0px',
className: 'business-crud-page__full-form-item',
className: 'transport-plan-page__full-form-item',
},
{
label: '',
@@ -601,7 +629,7 @@ export const option = {
order: 260,
hide: true,
labelWidth: '0px',
className: 'business-crud-page__full-form-item',
className: 'transport-plan-page__full-form-item',
},
])
),
+138 -36
View File
@@ -19,6 +19,12 @@ const transportTypeDict = {
const isEmpty = value => value === undefined || value === null || value === '';
const normalizeNumericDisplayValue = value => (Number(value) === -1 ? '' : value);
const formatMoneyDisplay = value => {
if (isEmpty(value) || Number(value) === -1) return '';
const number = Number(value);
if (!Number.isFinite(number)) return '';
return number.toFixed(2);
};
const parseJsonArray = value => {
if (Array.isArray(value)) return value;
@@ -92,14 +98,32 @@ const getProcessConfigNodes = row => {
const isAcceptProcessNode = node => node.key === 'accept' || node.name === '接单';
const isTruthyFlag = value => {
if (value === true || value === 1) return true;
if (value === false || value === 0 || value === null || value === undefined || value === '') {
return false;
}
return ['true', '1', 'yes'].includes(String(value).trim().toLowerCase());
};
const requiresDriverAcceptConfirmation = row =>
getProcessConfigNodes(row).some(
node =>
isAcceptProcessNode(node) &&
node.enabled !== false &&
node.confirmMode === 'yes' &&
node.confirmDriver === true
);
getProcessConfigNodes(row).some(node => {
if (!isAcceptProcessNode(node) || node.enabled === false) return false;
if (node.confirmMode === 'no_confirm_accept') return false;
// 与后端一致:是否确认=是 即需接单(不强制依赖 confirmDriver
return node.confirmMode === 'yes' || !node.confirmMode;
});
const getDriverRejectReason = row => {
if (!row) return '';
const reason =
row.driverRejectReason ||
row.driverRefuseReason ||
row.acceptRejectReason ||
row.rejectReason ||
'';
return String(reason || '').trim();
};
const isDriverRejectedStatus = value => {
if (value === null || value === undefined || typeof value === 'boolean') return false;
@@ -122,6 +146,7 @@ const isDriverRejectedStatus = value => {
};
const hasDriverRejectRecord = row => {
if (String(row.driverAcceptStatus || '').toLowerCase() === 'rejected') return true;
const rejectRecordValues = [
row.driverRejectTime,
row.driverRejectedTime,
@@ -161,9 +186,16 @@ const hasDriverRejectRecord = row => {
};
const isDriverRejectedWaybill = row =>
requiresDriverAcceptConfirmation(row) && hasDriverRejectRecord(row);
(row.requireAccept === true ||
row.requireAccept === 1 ||
requiresDriverAcceptConfirmation(row)) &&
hasDriverRejectRecord(row);
const hasDriverAcceptRecord = row => {
if (String(row.driverAcceptStatus || '').toLowerCase() === 'accepted') return true;
if (['rejected', 'pending'].includes(String(row.driverAcceptStatus || '').toLowerCase())) {
return false;
}
const recordValues = [
row.driverAcceptTime,
row.driverAcceptedTime,
@@ -172,6 +204,7 @@ const hasDriverAcceptRecord = row => {
row.driverAcceptedBy,
row.acceptUserId,
row.acceptUserName,
row.driverAcceptDriverId,
];
if (recordValues.some(value => value !== null && value !== undefined && value !== '')) {
return true;
@@ -207,6 +240,26 @@ const getFirstValue = (row, props) => {
const getGoodsRows = row => parseJsonArray(row.goodsList || row.goodsRows || row.goodsJson);
const getDetailedGoodsRows = row => {
const goodsRows = [
row.goodsJson,
row.goodsList,
row.goodsRows,
row.cargoList,
row.cargoRows,
row.goods,
]
.map(source => {
if (source === undefined || source === null || source === '') return [];
if (Array.isArray(source)) return source;
if (typeof source === 'object') return [source];
return parseJsonArray(source);
})
.filter(source => source.length)
.sort((left, right) => right.length - left.length);
return goodsRows[0] || [];
};
const getBillingRows = row => {
const freightRows = parseJsonArray(row.freightList || row.freightRows || row.freightJson);
if (freightRows.length) return freightRows;
@@ -218,9 +271,25 @@ const getBillingRows = row => {
const joinText = list => list.filter(item => !isEmpty(item)).join('/');
const formatGoodsInfo = row => {
const goodsRows = [
row.goodsJson,
row.goodsList,
row.goodsRows,
row.cargoList,
row.cargoRows,
row.goods,
]
.map(source => {
if (source === undefined || source === null || source === '') return [];
if (Array.isArray(source)) return source;
if (typeof source === 'object') return [source];
return parseJsonArray(source);
})
.filter(source => source.length)
.sort((left, right) => right.length - left.length)[0] || [];
const text = getFirstValue(row, ['goodsInfo', 'cargoInfo']);
if (text) return text;
return getGoodsRows(row)
if (!goodsRows.length) return text || '';
return goodsRows
.map(item => {
const name = getFirstValue(item, ['cargoName', 'goodsName', 'name']);
const type = getFirstValue(item, ['cargoType', 'goodsType', 'typeName']);
@@ -228,12 +297,13 @@ const formatGoodsInfo = row => {
normalizeNumericDisplayValue(
getFirstValue(item, ['quantity', 'cargoQuantity', 'goodsQuantity'])
),
getFirstValue(item, ['quantityUnit', 'cargoUnit', 'unit']),
getFirstValue(item, ['quantityUnit', 'goodsQuantityUnit', 'cargoUnit', 'unit']) ||
getFirstValue(row, ['quantityUnit', 'goodsQuantityUnit', 'cargoUnit', 'unit']),
]);
return joinText([name, type, quantity]);
})
.filter(Boolean)
.join('; ');
.join('; ') || text || '';
};
const formatGoodsField = (row, props) => {
@@ -246,6 +316,28 @@ const formatGoodsField = (row, props) => {
const formatUnitPrice = row => {
const value = normalizeNumericDisplayValue(getFirstValue(row, ['unitPrice', 'price']));
const unit = getFirstValue(row, ['priceUnit', 'billingUnit', 'unit']);
const goodsRows = getDetailedGoodsRows(row);
if (goodsRows.length > 1) {
const billingRows = getBillingRows(row);
const goodsPrices = goodsRows
.map((item, index) => {
const itemPrice = normalizeNumericDisplayValue(
getFirstValue(item, ['unitPrice', 'price'])
);
if (!isEmpty(itemPrice)) return itemPrice;
return normalizeNumericDisplayValue(
getFirstValue(billingRows[index] || {}, ['unitPrice', 'price'])
);
})
.filter(itemPrice => !isEmpty(itemPrice));
const priceKeys = goodsPrices.map(itemPrice => {
const numericPrice = Number(itemPrice);
return Number.isFinite(numericPrice) ? String(numericPrice) : String(itemPrice).trim();
});
if (new Set(priceKeys).size > 1) return '-';
}
if (!isEmpty(value)) return unit ? `${value}(${unit})` : value;
const billing = getBillingRows(row).find(
item => !isEmpty(normalizeNumericDisplayValue(item.unitPrice))
@@ -256,10 +348,10 @@ const formatUnitPrice = row => {
return billingUnit ? `${billingPrice}(${billingUnit})` : billingPrice;
};
const formatAmount = (row, props) => getFirstValue(row, props);
const formatAmount = (row, props) => formatMoneyDisplay(getFirstValue(row, props));
const sumAmount = list =>
list.reduce((sum, item) => {
const sumAmount = (rows = []) =>
rows.reduce((sum, item) => {
const value = getFirstValue(item, ['freightAmount', 'amount', 'totalAmount']);
return isEmpty(value) ? sum : sum + Number(value || 0);
}, 0);
@@ -278,7 +370,7 @@ const calculateFreightTotal = rows => {
return sum + Number(item.unitPrice || 0) * Number(item.quantity || 0);
}, 0);
if (!hasAmountField) return '';
return Number.isFinite(total) ? Number(total.toFixed(2)).toString() : '';
return Number.isFinite(total) ? total.toFixed(2) : '';
};
const formatFreight = row => {
@@ -286,9 +378,9 @@ const formatFreight = row => {
if (!isEmpty(value)) return value;
const freight = parseJsonObject(row.freightJson);
const freightValue = getFirstValue(freight, ['freightAmount', 'transportFee']);
if (!isEmpty(freightValue)) return freightValue;
if (!isEmpty(freightValue)) return formatMoneyDisplay(freightValue);
const total = sumAmount(Array.isArray(freight.freightItems) ? freight.freightItems : []);
return total ? total : '';
return total ? formatMoneyDisplay(total) : '';
};
const formatOtherFeeTotal = row => {
@@ -305,10 +397,10 @@ const formatFreightTotal = row => {
const otherFeeTotal = !isEmpty(otherFee) ? otherFee : formatOtherFeeTotal(row);
if (!isEmpty(calculated)) {
const total = Number(calculated || 0) + Number(otherFeeTotal || 0);
return Number.isFinite(total) ? Number(total.toFixed(2)).toString() : calculated;
return Number.isFinite(total) ? total.toFixed(2) : calculated;
}
const value = getFirstValue(freight, ['totalFreightAmount', 'totalFreight', 'totalAmount']);
if (!isEmpty(value)) return value;
if (!isEmpty(value)) return formatMoneyDisplay(value);
return formatAmount(row, ['freightTotal', 'totalFreight', 'totalAmount']);
};
@@ -318,6 +410,8 @@ export const config = {
title: '运单管理',
permission: 'waybill_manage',
importUrl: '/blade-transport/waybill-manage/import-waybill-manage',
exportUrl: '/blade-transport/waybill-manage/export-waybill-manage',
exportName: '运单管理',
defaultForm: {
carrierType: '承运商',
transportType: 'road',
@@ -364,29 +458,37 @@ export const config = {
statusProp: 'businessStatus',
statusTextProp: 'businessStatusName',
formatStatus(row, prop, defaultText) {
if (
prop === 'businessStatus' &&
requiresDriverAcceptConfirmation(row) &&
isInProgressStatus(row, defaultText) &&
!hasDriverAcceptRecord(row)
) {
if (prop !== 'businessStatus') return defaultText;
const status = String(row.businessStatus || '');
const terminalStatuses = ['draft', 'completed', 'cancelled', 'waiting_dispatch', 'dispatching'];
const needAccept =
row.requireAccept === true ||
row.requireAccept === 1 ||
requiresDriverAcceptConfirmation(row);
// 需司机接单且尚未接单 → 待执行(含库中仍为 running 的历史数据展示校正)
if (needAccept && !hasDriverAcceptRecord(row) && !terminalStatuses.includes(status)) {
return '待执行';
}
if (
prop === 'businessStatus' &&
row.businessStatus === 'pending' &&
!requiresDriverAcceptConfirmation(row)
) {
return '进行中';
}
if (status === 'pending') return '待执行';
if (status === 'running' || status === 'processing') return '进行中';
return defaultText;
},
canReassign(row) {
return isDriverRejectedWaybill(row);
},
getDriverRejectReason,
isDriverRejectedWaybill,
canEdit(row) {
// 进行中的运单不允许编辑
if (isInProgressStatus(row, row.businessStatusName)) {
return false;
}
return !isDriverRejectedWaybill(row);
},
canCancel(row) {
// 进行中的运单不允许取消
return !isInProgressStatus(row, row.businessStatusName);
},
deleteStatus: ['draft'],
editStatus: ['draft', 'pending'],
};
@@ -578,7 +680,7 @@ export const option = {
viewDisplay: false,
},
{
label: '单价(计价单位)',
label: '单价',
prop: 'unitPrice',
formatter: row => formatUnitPrice(row),
minWidth: 140,
@@ -808,7 +910,7 @@ export const option = {
order: 760,
hide: true,
labelWidth: '0px',
className: 'business-crud-page__full-form-item',
className: 'waybill-manage-page__full-form-item',
},
{
label: '实际发货时间',
@@ -920,7 +1022,7 @@ export const option = {
order: 740,
hide: true,
labelWidth: '0px',
className: 'business-crud-page__full-form-item',
className: 'waybill-manage-page__full-form-item',
},
{
label: '所属组织',
+1 -1
View File
@@ -1,5 +1,5 @@
export const billLedgerTableColumns = [
{ prop: 'billNo', label: '票据编号', minWidth: 170 },
{ prop: 'billNo', label: '票据编号', minWidth: 170, link: true },
{ prop: 'receiverName', label: '收票单位', minWidth: 170 },
{ prop: 'issuerName', label: '出票单位', minWidth: 170 },
{ prop: 'billTypeName', label: '汇票类型', minWidth: 110 },
+3 -3
View File
@@ -1,6 +1,6 @@
export const invoiceApplicationTableColumns = [
{ prop: 'applicationNo', label: '单据号', minWidth: 170, link: true },
{ prop: 'settlementNos', label: '结算单号', minWidth: 190, link: true },
{ prop: 'settlementNos', label: '结算单号', minWidth: 190 },
{ prop: 'projectName', label: '所属项目', minWidth: 140 },
{ prop: 'deptName', label: '所属组织', minWidth: 140 },
{ prop: 'issuerName', label: '开票方', minWidth: 150 },
@@ -21,8 +21,8 @@ export const invoiceApplicationDetailColumns = [
{ prop: 'vehicleNo', label: '车号', minWidth: 120 },
{ prop: 'departureAddress', label: '发货地址', minWidth: 180 },
{ prop: 'arrivalAddress', label: '到货地址', minWidth: 180 },
{ prop: 'actualDepartureTime', label: '实际发货时间', minWidth: 170 },
{ prop: 'actualCompletionTime', label: '实际完成时间', minWidth: 170 },
{ prop: 'actualDepartureTime', label: '实际发货时间', minWidth: 170, dateTime: true },
{ prop: 'actualCompletionTime', label: '实际完成时间', minWidth: 170, dateTime: true },
{ prop: 'transportType', label: '运输类型', minWidth: 120 },
{ prop: 'cargoName', label: '货物名称', minWidth: 140 },
{ prop: 'cargoType', label: '货物类型', minWidth: 130 },
+1 -1
View File
@@ -1,5 +1,5 @@
export const receiptFlowTableColumns = [
{ prop: 'receiptNoticeNo', label: '认领通知单', minWidth: 150 },
{ prop: 'receiptNoticeNo', label: '认领通知单', minWidth: 150, link: true },
{ prop: 'payerName', label: '付款人', minWidth: 130 },
{ prop: 'receiptAmount', label: '付款金额', minWidth: 130, money: true },
{ prop: 'counterpartyName', label: '对方户名', minWidth: 150 },
@@ -11,8 +11,8 @@ export const formalSettlementFormFields = [
{ label: '汇率日期', prop: 'exchangeRateDate', type: 'date', required: true },
{ label: '结算汇率', prop: 'exchangeRate', type: 'number', required: true },
{ label: '本位币合计', prop: 'localSettlementAmount', readonly: true, money: true },
{ label: '申请付款金额(含预付)', prop: 'appliedPaymentAmount', readonly: true, money: true },
{ label: '已收/已付合计', prop: 'paidAmount', readonly: true, money: true },
{ label: '创建人', prop: 'createUserName', readonly: true },
{ label: '创建时间', prop: 'createTime', readonly: true },
];
export const createFormalSettlementForm = () => ({
@@ -27,6 +27,8 @@ export const createFormalSettlementForm = () => ({
sourceDetailIds: [],
exchangeRateDate: '',
exchangeRate: 1,
createUserName: '',
createTime: '',
attachmentsJson: '[]',
remark: '',
});
@@ -7,11 +7,21 @@ export const approvalStatusOptions = [
];
export const invoiceStatusOptions = [
{ label: '未收/开票', value: 'unreceived' },
{ label: '部分收/开票', value: 'partial' },
{ label: '已收/开票', value: 'completed' },
{ label: '未开/收票', value: 'unreceived' },
{ label: '部分开/收票', value: 'partial' },
{ label: '已开/收票', value: 'completed' },
];
export const invoiceStatusName = (value, settlementType) => {
const payable = settlementType === 'payable';
const labels = {
unreceived: payable ? '未收票' : '未开票',
partial: payable ? '部分收票' : '部分开票',
completed: payable ? '已收票' : '已开票',
};
return labels[value] || value || '-';
};
export const paymentStatusOptions = [
{ label: '未收/付款', value: 'unpaid' },
{ label: '部分收/付款', value: 'partial' },
@@ -28,7 +38,7 @@ export const formalSettlementSearchFields = [
{ label: '结算单号', prop: 'formalSettlementNo', type: 'input' },
{ label: '预结算单号', prop: 'preSettlementNo', type: 'input' },
{ label: '项目', prop: 'projectName', type: 'input' },
{ label: '所属组织', prop: 'deptName', type: 'input' },
{ label: '所属组织', prop: 'deptName', type: 'cascader' },
{ label: '合同编号', prop: 'contractNo', type: 'input' },
{ label: '付款方', prop: 'payerName', type: 'input' },
{ label: '收款方', prop: 'payeeName', type: 'input' },
+1 -1
View File
@@ -10,7 +10,7 @@ export const preSettlementSearchFields = [
{ label: '预结算单号', prop: 'preSettlementNo', type: 'input' },
{ label: '预付单号', prop: 'advanceNo', type: 'input' },
{ label: '项目名称', prop: 'projectName', type: 'input' },
{ label: '所属组织', prop: 'deptName', type: 'input' },
{ label: '所属组织', prop: 'deptName', type: 'cascader' },
{ label: '合同名称', prop: 'contractName', type: 'input' },
{ label: '合同编号', prop: 'contractNo', type: 'input' },
{ label: '收款方', prop: 'payeeName', type: 'input' },
+12 -2
View File
@@ -10,8 +10,18 @@ export const preSettlementTableColumns = [
{ label: '原币结算金额', prop: 'settlementAmount', minWidth: 140, money: true, precision: 2 },
{ label: '本位币结算金额', prop: 'localSettlementAmount', minWidth: 150, money: true, precision: 2 },
{ label: '结算汇率', prop: 'exchangeRate', minWidth: 110, precision: 2 },
{ label: '申请预付金额', prop: 'advanceAppliedAmount', minWidth: 140, money: true },
{ label: '已付款金额', prop: 'advancePaidAmount', minWidth: 130, money: true },
{
label: '申请预付金额',
prop: 'advanceAppliedAmount',
minWidth: 190,
money: true,
},
{
label: '已付款金额',
prop: 'advancePaidAmount',
minWidth: 200,
money: true,
},
{ label: '审核状态', prop: 'approvalStatusName', minWidth: 110, status: true },
{ label: '当前节点', prop: 'currentNode', minWidth: 130 },
{ label: '当前处理人', prop: 'currentProcessor', minWidth: 130 },
@@ -14,7 +14,7 @@ export const searchFields = [
{ label: '单据号', prop: 'documentNo', type: 'input' },
{ label: '生成日期', prop: 'generateDateRange', type: 'daterange' },
{ label: '客户名称', prop: 'customerName', type: 'input' },
{ label: '所属组织', prop: 'deptName', type: 'input' },
{ label: '所属组织', prop: 'deptName', type: 'cascader' },
{ label: '项目名称', prop: 'projectName', type: 'input' },
{ label: '货物类型', prop: 'cargoType', type: 'input' },
{ label: '货物名称', prop: 'cargoName', type: 'input' },
@@ -67,9 +67,7 @@ export const feeDetailBaseColumns = [
];
export const feeDetailTailColumns = [
{ label: '原总金额', prop: 'originalAmountText', minWidth: 120 },
{ label: '调整金额', prop: 'adjustAmountText', minWidth: 120 },
{ label: '调整后总金额', prop: 'afterAmountText', minWidth: 140 },
{ label: '结算金额', prop: 'originalAmountText', minWidth: 120 },
{ label: '备注', prop: 'remark', minWidth: 160 },
{ label: '最后录入人', prop: 'updateUserName', minWidth: 120 },
{ label: '最后录入时间', prop: 'updateTime', minWidth: 170 },
@@ -138,4 +136,11 @@ export const generatePreviewColumns = [
{ label: '货物名称', prop: 'cargoName', minWidth: 140 },
{ label: '货物类型', prop: 'cargoType', minWidth: 140 },
{ label: '规格', prop: 'specification', minWidth: 140 },
{ label: '型号', prop: 'model', minWidth: 120 },
{ label: '计费要素', prop: 'billingFactor', minWidth: 130 },
{ label: '计费类型', prop: 'billingType', minWidth: 130 },
{ label: '运输量', prop: 'transportQuantityText', minWidth: 120 },
{ label: '运费计算单位', prop: 'priceUnit', minWidth: 130 },
{ label: '运输单价', prop: 'unitPrice', minWidth: 120 },
{ label: '里程(KM', prop: 'mileage', minWidth: 120 },
];
@@ -1,13 +1,15 @@
export const settlementAdjustmentFormFields = [
{ label: '单据号', prop: 'adjustmentNo' },
{ label: '关联结算单号', prop: 'formalSettlementId' },
{ label: '客户/客商名称', prop: 'customerName' },
{ label: '客户', prop: 'customerName' },
{ label: '结算单类型', prop: 'settlementTypeName' },
{ label: '关联合同名称', prop: 'contractName' },
{ label: '关联项目', prop: 'projectName' },
{ label: '原结算金额', prop: 'originalSettlementAmount', money: true },
{ label: '调整金额', prop: 'adjustmentAmount', money: true },
{ label: '调整后结算金额', prop: 'adjustedSettlementAmount', money: true },
{ label: '创建日期', prop: 'createTime' },
{ label: '创建人', prop: 'createUserName' },
];
export const createSettlementAdjustmentForm = () => ({
@@ -24,6 +26,8 @@ export const createSettlementAdjustmentForm = () => ({
adjustmentAmount: 0,
originalSettlementAmount: 0,
adjustedSettlementAmount: 0,
createTime: '',
createUserName: '',
attachmentsJson: '[]',
remark: '',
});
@@ -5,7 +5,7 @@ export const settlementAdjustmentSearchFields = [
{ label: '日期', prop: 'createDateRange', type: 'daterange' },
{ label: '客户名称', prop: 'customerName', type: 'input' },
{ label: '项目名称', prop: 'projectName', type: 'input' },
{ label: '所属组织', prop: 'deptName', type: 'input' },
{ label: '所属组织', prop: 'deptName', type: 'cascader' },
{ label: '关联结算单', prop: 'formalSettlementNo', type: 'input' },
{
label: '结算单类型',
@@ -8,8 +8,6 @@ export const settlementAdjustmentTableColumns = [
{ label: '合同编号', prop: 'contractNo', minWidth: 150 },
{ label: '合同名称', prop: 'contractName', minWidth: 170 },
{ label: '调整金额', prop: 'adjustmentAmount', minWidth: 130, money: true },
{ label: '原结算金额', prop: 'originalSettlementAmount', minWidth: 140, money: true },
{ label: '调整后结算金额', prop: 'adjustedSettlementAmount', minWidth: 160, money: true },
{ label: '审核状态', prop: 'approvalStatusName', minWidth: 110, status: true },
{ label: '当前节点', prop: 'currentNode', minWidth: 120 },
{ label: '当前处理人', prop: 'currentProcessor', minWidth: 130 },
@@ -2,10 +2,8 @@ export const transportReconciliationFormFields = [
{ prop: 'reconciliationNo', label: '对账单号', readonly: true },
{ prop: 'reconciliationMode', label: '对账模式', type: 'mode' },
{ prop: 'formalSettlementNo', label: '正式结算单', type: 'formal' },
{ prop: 'payerName', label: '付款方', readonly: true },
{ prop: 'payeeName', label: '收款方', readonly: true },
{ prop: 'customerName', label: '客户/承运商', readonly: true },
{ prop: 'projectName', label: '项目', readonly: true },
{ prop: 'deptName', label: '所属组织', readonly: true },
{ prop: 'contractName', label: '合同名称', readonly: true },
{ prop: 'paidAmount', label: '已付合计', money: true, readonly: true },
{ prop: 'reconcilerName', label: '对账人', readonly: true },
@@ -1,12 +1,12 @@
export const reconciliationMatchStatusOptions = [
{ label: '全部', value: '' },
{ label: '全部', value: 'all' },
{ label: '未匹配', value: 'unmatched' },
{ label: '部分匹配', value: 'partial' },
{ label: '已匹配', value: 'matched' },
];
export const reconciliationStatusOptions = [
{ label: '全部', value: '' },
{ label: '全部', value: 'all' },
{ label: '未完成', value: 'unfinished' },
{ label: '已完成', value: 'completed' },
];
@@ -15,7 +15,7 @@ export const transportReconciliationSearchFields = [
{ prop: 'reconciliationNo', label: '对账单号', type: 'input' },
{ prop: 'preSettlementNos', label: '预结算单号', type: 'input' },
{ prop: 'projectName', label: '项目', type: 'input' },
{ prop: 'deptName', label: '所属组织', type: 'input' },
{ prop: 'deptName', label: '所属组织', type: 'cascader' },
{ prop: 'contractNo', label: '合同编号', type: 'input' },
{ prop: 'payerName', label: '付款方', type: 'input' },
{ prop: 'payeeName', label: '收款方', type: 'input' },
@@ -18,7 +18,7 @@ export const transportReconciliationTableColumns = [
export const internalColumns = [
{ prop: 'documentNo', label: '单据号', minWidth: 150 },
{ prop: 'waybillNo', label: '运单号', minWidth: 120 },
{ prop: 'matchedExternalLineNo', label: '匹配外部账单行号', minWidth: 140 },
{ prop: 'matchedExternalLineNo', label: '匹配外部账单行号', minWidth: 180 },
{ prop: 'vehicleNo', label: '车号', minWidth: 100 },
{ prop: 'departureAddress', label: '发货地址', minWidth: 180 },
{ prop: 'arrivalAddress', label: '到货地址', minWidth: 180 },
@@ -27,13 +27,10 @@ export const internalColumns = [
{ prop: 'transportType', label: '运输类型', minWidth: 120 },
{ prop: 'cargoName', label: '货物名称', minWidth: 120 },
{ prop: 'cargoType', label: '货物类型', minWidth: 120 },
{ prop: 'specification', label: '规格', minWidth: 100 },
{ prop: 'model', label: '型号', minWidth: 100 },
{ prop: 'transportQuantity', label: '运输总量', minWidth: 100, number: true },
{ prop: 'mileage', label: '里程(KM', minWidth: 100, number: true },
{ prop: 'mileage', label: '里程(KM', minWidth: 120, number: true },
{ prop: 'batchNo', label: '批次号', minWidth: 100 },
{ prop: 'unitPrice', label: '运输单价', minWidth: 110, money: true },
{ prop: 'freightAmount', label: '运输费', minWidth: 110, money: true },
{ prop: 'settlementAmount', label: '结算金额', minWidth: 120, money: true },
{ prop: 'matchResult', label: '匹配结果', minWidth: 100 },
{ prop: 'updateResult', label: '账单更新结果', minWidth: 130 },
@@ -50,7 +47,7 @@ export const externalVehicleColumns = [
{ prop: 'cargoName', label: '货物名称', minWidth: 120 },
{ prop: 'cargoType', label: '货物类型', minWidth: 120 },
{ prop: 'transportQuantity', label: '运输总量', minWidth: 100, number: true },
{ prop: 'mileage', label: '里程(KM', minWidth: 100, number: true },
{ prop: 'mileage', label: '里程(KM', minWidth: 120, number: true },
{ prop: 'batchNo', label: '批次号', minWidth: 100 },
{ prop: 'unitPrice', label: '运输单价', minWidth: 110, money: true },
{ prop: 'freightAmount', label: '运费', minWidth: 110, money: true },
@@ -69,9 +66,9 @@ export const externalCargoColumns = [
{ prop: 'cargoType', label: '货物类型', minWidth: 120 },
{ prop: 'specification', label: '规格', minWidth: 100 },
{ prop: 'model', label: '型号', minWidth: 100 },
{ prop: 'transportQuantity', label: '运输量', minWidth: 100, number: true },
{ prop: 'transportQuantity', label: '运输量', minWidth: 100, number: true },
{ prop: 'unitPrice', label: '运输单价', minWidth: 110, money: true },
{ prop: 'mileage', label: '里程(KM', minWidth: 100, number: true },
{ prop: 'mileage', label: '里程(KM', minWidth: 120, number: true },
{ prop: 'freightAmount', label: '运输费', minWidth: 110, money: true },
{ prop: 'settlementAmount', label: '结算金额', minWidth: 120, money: true },
{ prop: 'settlementAmount', label: '结算费用合计', minWidth: 130, money: true },
];
+6 -3
View File
@@ -76,14 +76,17 @@ export const option = {
prop: 'posts',
minWidth: 150,
},
{
label: '驾驶车辆',
prop: 'drivingVehicle',
minWidth: 130,
},
{
label: '所属组织',
prop: 'organizationName',
search: true,
searchOrder: 1,
type: 'select',
filterable: true,
dicData: [],
searchslot: true,
slot: true,
minWidth: 160,
},
@@ -37,9 +37,7 @@ export const option = {
prop: 'organizationName',
search: true,
searchOrder: 1,
type: 'select',
filterable: true,
dicData: [],
searchslot: true,
slot: true,
minWidth: 160,
},
@@ -21,7 +21,7 @@ export const option = {
label: '车牌号',
prop: 'plateNo',
search: true,
searchOrder: 6,
searchOrder: 7,
slot: true,
minWidth: 120,
},
@@ -29,7 +29,7 @@ export const option = {
label: '业务关系',
prop: 'businessRelation',
search: true,
searchOrder: 5,
searchOrder: 6,
searchValue: '',
type: 'select',
dicData: [
@@ -46,17 +46,22 @@ export const option = {
prop: 'organizationName',
search: true,
searchOrder: 1,
type: 'select',
filterable: true,
dicData: [],
searchslot: true,
slot: true,
minWidth: 150,
},
{
label: '使用部门',
prop: 'useDepartment',
search: true,
searchOrder: 3,
minWidth: 140,
},
{
label: '车辆类型',
prop: 'vehicleType',
search: true,
searchOrder: 4,
searchOrder: 5,
type: 'select',
dicData: [
{ label: '全部', value: '' },
@@ -110,7 +115,7 @@ export const option = {
label: '车辆状态',
prop: 'status',
search: true,
searchOrder: 3,
searchOrder: 4,
type: 'select',
slot: true,
dicData: [
@@ -0,0 +1,181 @@
const approvalStatusOptions = [
{ label: '草稿', value: 'draft' },
{ label: '审批中', value: 'reviewing' },
{ label: '已驳回', value: 'rejected' },
{ label: '审批通过', value: 'approved' },
];
export const statusName = status =>
approvalStatusOptions.find(item => item.value === status)?.label || status || '-';
export const option = {
height: 'auto',
calcHeight: 32,
dialogWidth: 1200,
labelPosition: 'right',
labelWidth: 'auto',
tip: false,
searchBtnText: '查询',
emptyBtnText: '重置',
saveBtnText: '提交',
updateBtnText: '提交',
searchShow: true,
searchMenuSpan: 24,
searchIndex: 4,
searchMenuPosition: 'right',
border: true,
index: true,
indexLabel: '序号',
indexWidth: 70,
addBtn: false,
editBtn: false,
delBtn: false,
viewBtn: false,
selection: false,
dialogClickModal: false,
menuFixed: 'right',
menuWidth: 320,
column: [
// ========== 表格列(顺序固定)==========
{
label: '申请单号',
prop: 'applicationNo',
search: true,
searchOrder: 5,
searchPlaceholder: '请输入',
minWidth: 180,
slot: true,
addDisplay: true,
editDisabled: true,
disabled: true,
placeholder: '保存后自动生成',
},
{
label: '车牌号',
prop: 'plateNo',
search: true,
searchOrder: 4,
searchPlaceholder: '请输入',
minWidth: 120,
formslot: true,
rules: [{ required: true, message: '请选择车牌号', trigger: 'blur' }],
},
{
label: '所属组织',
prop: 'organizationName',
search: true,
searchOrder: 3,
searchPlaceholder: '请输入',
minWidth: 140,
disabled: true,
placeholder: '选择车牌号后自动填充',
rules: [{ required: true, message: '请输入所属组织', trigger: 'blur' }],
},
{
label: '使用部门',
prop: 'useDepartment',
search: true,
searchOrder: 2,
searchPlaceholder: '请输入',
minWidth: 140,
formslot: true,
span: 12,
rules: [{ required: true, message: '请选择使用部门', trigger: 'blur' }],
},
{
label: '车辆类型',
prop: 'vehicleType',
minWidth: 110,
addDisplay: false,
editDisplay: false,
viewDisplay: false,
},
{
label: '审批状态',
prop: 'approvalStatus',
search: true,
searchOrder: 1,
type: 'select',
dicData: approvalStatusOptions,
slot: true,
minWidth: 120,
addDisplay: false,
editDisplay: false,
},
{
label: '当前节点',
prop: 'currentNode',
minWidth: 120,
addDisplay: false,
editDisplay: false,
},
{
label: '当前处理人',
prop: 'currentProcessor',
minWidth: 130,
addDisplay: false,
editDisplay: false,
},
{
label: '创建人',
prop: 'createUserName',
minWidth: 120,
addDisplay: false,
editDisplay: false,
},
{
label: '创建时间',
prop: 'createTime',
type: 'datetime',
format: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'YYYY-MM-DD HH:mm:ss',
minWidth: 170,
addDisplay: false,
editDisplay: false,
},
// ========== 新增/编辑表单专用(不进表格)==========
{
label: '申请人',
prop: 'applicantName',
hide: true,
display: true,
addDisplay: true,
editDisplay: true,
viewDisplay: true,
disabled: true,
span: 12,
},
{
label: '申请时间',
prop: 'applyTime',
type: 'datetime',
format: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'YYYY-MM-DD HH:mm:ss',
hide: true,
display: true,
addDisplay: true,
editDisplay: true,
viewDisplay: true,
disabled: true,
span: 12,
},
{
label: '备注',
prop: 'remark',
type: 'textarea',
hide: true,
span: 24,
maxlength: 200,
showWordLimit: true,
rules: [{ max: 200, message: '备注不能超过200个字', trigger: 'blur' }],
},
{
label: '附件',
prop: 'attachments',
hide: true,
span: 24,
minWidth: 100,
formslot: true,
},
],
};
+17 -2
View File
@@ -70,14 +70,16 @@ export const option = {
{
label: '车牌号/船号',
prop: 'vehicleNo',
type: 'select',
slot: true,
formslot: true,
search: true,
searchType: 'input',
minWidth: 140,
span: 12,
placeholder: '输入车牌号/船号查询选择',
placeholder: '请选择车牌号/船号',
rules: [
{ required: true, message: '请输入车牌号/船号', trigger: 'blur' },
{ required: true, message: '请选择车牌号/船号', trigger: 'change' },
{ max: 30, message: '最多 30 个字符', trigger: 'blur' },
],
},
@@ -268,6 +270,19 @@ export const option = {
],
};
export const exportColumns = [
{ prop: 'vehicleType', label: '车船类型' },
{ prop: 'vehicleNo', label: '车牌号/船号' },
{ prop: 'accidentDate', label: '事故发生日期' },
{ prop: 'accidentLocation', label: '事故发生地点' },
{ prop: 'accidentNature', label: '事故性质' },
{ prop: 'accidentResponsibility', label: '事故责任' },
{ prop: 'directEconomicLoss', label: '直接经济损失' },
{ prop: 'insuranceClaimAmount', label: '保险理赔金额' },
{ prop: 'accidentReasonDamage', label: '事故原因及损坏情况' },
{ prop: 'remark', label: '备注' },
];
export const excelOption = {
labelPosition: 'right',
submitBtn: false,
+22 -16
View File
@@ -75,14 +75,16 @@ export const option = {
{
label: '车牌号/船号',
prop: 'vehicleNo',
type: 'select',
slot: true,
formslot: true,
search: true,
searchType: 'input',
minWidth: 140,
span: 12,
placeholder: '输入车牌号/船号查询选择',
placeholder: '请选择车牌号/船号',
rules: [
{ required: true, message: '请输入车牌号/船号', trigger: 'blur' },
{ required: true, message: '请选择车牌号/船号', trigger: 'change' },
{ max: 30, message: '最多 30 个字符', trigger: 'blur' },
],
},
@@ -105,6 +107,7 @@ export const option = {
type: 'date',
format: 'YYYY-MM-DD',
valueFormat: 'YYYY-MM-DD',
slot: true,
minWidth: 140,
span: 12,
placeholder: '请输入',
@@ -191,23 +194,12 @@ export const option = {
formslot: true,
},
{
label: '检测评定开始日期',
prop: 'inspectionAssessmentDateStart',
type: 'date',
format: 'YYYY-MM-DD',
valueFormat: 'YYYY-MM-DD',
search: true,
hide: true,
addDisplay: false,
editDisplay: false,
viewDisplay: false,
},
{
label: '检测评定结束日期',
prop: 'inspectionAssessmentDateEnd',
label: '检测评定日期',
prop: 'inspectionAssessmentDateRange',
type: 'date',
format: 'YYYY-MM-DD',
valueFormat: 'YYYY-MM-DD',
searchRange: true,
search: true,
hide: true,
addDisplay: false,
@@ -278,6 +270,20 @@ export const option = {
],
};
export const exportColumns = [
{ prop: 'vehicleType', label: '车船类型' },
{ prop: 'vehicleNo', label: '车牌号/船号' },
{ prop: 'inspectionAssessmentDate', label: '检测评定日期' },
{ prop: 'validUntilDate', label: '有效期截止日' },
{ prop: 'vehicleTechnicalLevel', label: '车辆技术等级' },
{ prop: 'shipInspectionType', label: '船舶检验类型' },
{ prop: 'passengerTypeLevel', label: '客车类型及等级' },
{ prop: 'inspectionUnit', label: '检测评定单位' },
{ prop: 'fee', label: '费用(元)' },
{ prop: 'assessmentUnit', label: '评定(复核)单位' },
{ prop: 'remark', label: '备注' },
];
export const excelOption = {
labelPosition: 'right',
submitBtn: false,
+15
View File
@@ -54,9 +54,11 @@ export const option = {
{
label: '车牌号/船号',
prop: 'vehicleNo',
type: 'select',
slot: true,
formslot: true,
search: true,
searchType: 'input',
searchOrder: 4,
span: 12,
order: 10,
@@ -211,6 +213,19 @@ export const option = {
],
};
export const exportColumns = [
{ prop: 'vehicleType', label: '车船类型' },
{ prop: 'vehicleNo', label: '车牌号/船号' },
{ prop: 'equipmentCode', label: '设备号' },
{ prop: 'equipmentName', label: '设备名称' },
{ prop: 'factoryDate', label: '出厂日期' },
{ prop: 'equipmentBrand', label: '设备品牌' },
{ prop: 'equipmentType', label: '设备类型' },
{ prop: 'specificationModel', label: '规格型号' },
{ prop: 'remark', label: '备注' },
{ prop: 'originalEquipmentNo', label: '原厂设备号' },
];
export const excelOption = {
labelPosition: 'right',
submitBtn: false,
+16 -2
View File
@@ -49,14 +49,16 @@ export const option = {
{
label: '车牌号',
prop: 'vehicleNo',
type: 'select',
slot: true,
formslot: true,
search: true,
searchType: 'input',
minWidth: 140,
span: 12,
placeholder: '输入车牌号模糊查询选择',
placeholder: '请选择车牌号',
rules: [
{ required: true, message: '请输入车牌号', trigger: 'blur' },
{ required: true, message: '请选择车牌号', trigger: 'change' },
{ max: 30, message: '最多 30 个字符', trigger: 'blur' },
],
},
@@ -206,6 +208,18 @@ export const option = {
],
};
export const exportColumns = [
{ prop: 'vehicleNo', label: '车牌号' },
{ prop: 'entryTime', label: '入口时间' },
{ prop: 'etcCardNo', label: 'ETC卡号' },
{ prop: 'exitTime', label: '出口时间' },
{ prop: 'entryStation', label: '入口站' },
{ prop: 'transactionAmount', label: '交易金额' },
{ prop: 'exitStation', label: '出口站' },
{ prop: 'dataSource', label: '数据来源' },
{ prop: 'remark', label: '备注' },
];
export const excelOption = {
labelPosition: 'right',
submitBtn: false,
+19 -1
View File
@@ -78,17 +78,20 @@ export const option = {
prop: 'policyFile',
formslot: true,
hide: true,
viewDisplay: false,
span: 24,
},
{
label: '车牌号/船号',
prop: 'vehicleNo',
type: 'select',
slot: true,
formslot: true,
search: true,
searchType: 'input',
minWidth: 140,
rules: [
{ required: true, message: '请输入车牌号/船号', trigger: 'blur' },
{ required: true, message: '请选择车牌号/船号', trigger: 'change' },
{ max: 50, message: '最多 50 个字符', trigger: 'blur' },
],
},
@@ -108,6 +111,7 @@ export const option = {
rules: [
{ required: true, message: '请输入保单号', trigger: 'blur' },
{ max: 80, message: '最多 80 个字符', trigger: 'blur' },
{ pattern: /^[a-zA-Z0-9]+$/, message: '保单号只能输入数字、字母', trigger: 'blur' },
],
},
{
@@ -240,6 +244,20 @@ export const option = {
],
};
export const exportColumns = [
{ prop: 'vehicleType', label: '车船类型' },
{ prop: 'vehicleNo', label: '车牌号/船号' },
{ prop: 'insuranceType', label: '保险类型' },
{ prop: 'policyNo', label: '保单号' },
{ prop: 'startDate', label: '开始日期' },
{ prop: 'endDate', label: '结束日期' },
{ prop: 'insuredAmount', label: '保额' },
{ prop: 'premium', label: '保费' },
{ prop: 'invoiceNo', label: '发票号' },
{ prop: 'invoiceDate', label: '开票日期' },
{ prop: 'remark', label: '备注' },
];
export const excelOption = {
labelPosition: 'right',
submitBtn: false,
+12 -1
View File
@@ -40,13 +40,15 @@ export const option = {
{
label: '车牌号',
prop: 'vehicleNo',
type: 'select',
slot: true,
formslot: true,
search: true,
searchType: 'input',
searchSpan: 6,
minWidth: 130,
rules: [
{ required: true, message: '请输入车牌号', trigger: 'blur' },
{ required: true, message: '请选择车牌号', trigger: 'change' },
{ max: 30, message: '最多 30 个字符', trigger: 'blur' },
],
},
@@ -199,6 +201,15 @@ export const option = {
],
};
export const exportColumns = [
{ prop: 'vehicleNo', label: '车牌号' },
{ prop: 'previousMonthMileage', label: '上月统计里程数' },
{ prop: 'currentMonthMileage', label: '本月统计里程数' },
{ prop: 'monthlyMileage', label: '本月行驶里程数' },
{ prop: 'totalMileage', label: '累计行驶里程数' },
{ prop: 'remark', label: '备注' },
];
export const excelOption = {
labelPosition: 'right',
submitBtn: false,
+21 -2
View File
@@ -92,13 +92,15 @@ export const option = {
{
label: '车牌号/船号',
prop: 'vehicleNo',
type: 'select',
slot: true,
formslot: true,
search: true,
searchType: 'input',
minWidth: 150,
placeholder: '输入车牌号/船号查询选择',
placeholder: '请选择车牌号/船号',
rules: [
{ required: true, message: '请输入车牌号/船号', trigger: 'blur' },
{ required: true, message: '请选择车牌号/船号', trigger: 'change' },
{ max: 30, message: '最多 30 个字符', trigger: 'blur' },
],
},
@@ -287,6 +289,23 @@ export const option = {
],
};
export const exportColumns = [
{ prop: 'cardNo', label: '卡号' },
{ prop: 'transactionTime', label: '交易时间' },
{ prop: 'vehicleType', label: '车船类型' },
{ prop: 'feeType', label: '费用类型' },
{ prop: 'oilProduct', label: '油品' },
{ prop: 'vehicleNo', label: '车牌号/船号' },
{ prop: 'cardHolder', label: '持卡人' },
{ prop: 'dataSource', label: '数据来源' },
{ prop: 'quantity', label: '数量' },
{ prop: 'unitPrice', label: '单价' },
{ prop: 'transactionAmount', label: '交易金额' },
{ prop: 'balance', label: '余额' },
{ prop: 'station', label: '站点' },
{ prop: 'remark', label: '备注' },
];
export const excelOption = {
labelPosition: 'right',
submitBtn: false,
+15 -13
View File
@@ -17,16 +17,6 @@ export const vehicleTypeDic = [
{ label: '船舶', value: '船舶' },
];
export const expenseTypeDic = [
{ label: '过路费', value: '过路费' },
{ label: '停车费', value: '停车费' },
{ label: '维修费', value: '维修费' },
{ label: '保险费', value: '保险费' },
{ label: '年检费', value: '年检费' },
{ label: '装卸费', value: '装卸费' },
{ label: '其他', value: '其他' },
];
export const option = {
height: 'auto',
calcHeight: 32,
@@ -68,14 +58,16 @@ export const option = {
{
label: '车牌号/船号',
prop: 'vehicleNo',
type: 'select',
slot: true,
formslot: true,
search: true,
searchType: 'input',
minWidth: 150,
span: 12,
placeholder: '输入车牌号/船号查询选择',
placeholder: '请选择车牌号/船号',
rules: [
{ required: true, message: '请输入车牌号/船号', trigger: 'blur' },
{ required: true, message: '请选择车牌号/船号', trigger: 'change' },
{ max: 30, message: '最多 30 个字符', trigger: 'blur' },
],
},
@@ -95,7 +87,7 @@ export const option = {
label: '费用类型',
prop: 'expenseType',
type: 'select',
dicData: expenseTypeDic,
dicData: [],
search: true,
minWidth: 150,
span: 12,
@@ -209,6 +201,16 @@ export const option = {
],
};
export const exportColumns = [
{ prop: 'vehicleType', label: '车船类型' },
{ prop: 'vehicleNo', label: '车牌号/船号' },
{ prop: 'expenseDate', label: '费用日期' },
{ prop: 'expenseType', label: '费用类型' },
{ prop: 'amount', label: '金额' },
{ prop: 'dataSource', label: '数据来源' },
{ prop: 'remark', label: '备注' },
];
export const excelOption = {
labelPosition: 'right',
submitBtn: false,
+15 -2
View File
@@ -49,14 +49,16 @@ export const option = {
{
label: '车牌号',
prop: 'vehicleNo',
type: 'select',
slot: true,
formslot: true,
search: true,
searchType: 'input',
minWidth: 130,
span: 12,
placeholder: '输入车牌号查询选择',
placeholder: '请选择车牌号',
rules: [
{ required: true, message: '请输入车牌号', trigger: 'blur' },
{ required: true, message: '请选择车牌号', trigger: 'change' },
{ max: 30, message: '最多 30 个字符', trigger: 'blur' },
],
},
@@ -206,6 +208,17 @@ export const option = {
],
};
export const exportColumns = [
{ prop: 'vehicleNo', label: '车牌号' },
{ prop: 'handler', label: '处理人' },
{ prop: 'replacementTime', label: '换胎时间' },
{ prop: 'tireBrand', label: '轮胎品牌' },
{ prop: 'tireQuantity', label: '换胎数量' },
{ prop: 'replacementCost', label: '换胎费用' },
{ prop: 'replacementDescription', label: '换胎说明' },
{ prop: 'remark', label: '备注' },
];
export const excelOption = {
labelPosition: 'right',
submitBtn: false,
+11 -1
View File
@@ -47,11 +47,13 @@ export const option = {
{
label: '车牌号/船号',
prop: 'vehicleNo',
type: 'select',
slot: true,
formslot: true,
search: true,
searchType: 'input',
minWidth: 140,
placeholder: '输入车牌号/船号模糊查询选择',
placeholder: '请选择车牌号/船号',
rules: [{ max: 30, message: '最多 30 个字符', trigger: 'blur' }],
},
{
@@ -161,6 +163,14 @@ export const option = {
],
};
export const exportColumns = [
{ prop: 'vehicleType', label: '车船类型' },
{ prop: 'vehicleNo', label: '车牌号/船号' },
{ prop: 'changeItem', label: '变更事项' },
{ prop: 'changeContent', label: '变更内容' },
{ prop: 'remark', label: '备注' },
];
export const excelOption = {
labelPosition: 'right',
submitBtn: false,
+25 -7
View File
@@ -70,14 +70,16 @@ export const option = {
{
label: '车牌号/船号',
prop: 'vehicleNo',
type: 'select',
slot: true,
formslot: true,
search: true,
searchType: 'input',
minWidth: 140,
span: 12,
placeholder: '输入车牌号/船号查询选择',
placeholder: '请选择车牌号/船号',
rules: [
{ required: true, message: '请输入车牌号/船号', trigger: 'blur' },
{ required: true, message: '请选择车牌号/船号', trigger: 'change' },
{ max: 30, message: '最多 30 个字符', trigger: 'blur' },
],
},
@@ -117,13 +119,13 @@ export const option = {
{
label: '日期',
prop: 'violationTime',
type: 'datetime',
format: 'YYYY-MM-DD HH:mm:ss',
type: 'date',
format: 'YYYY-MM-DD',
valueFormat: 'YYYY-MM-DD HH:mm:ss',
minWidth: 170,
minWidth: 140,
span: 12,
placeholder: '请选择',
rules: [{ required: true, message: '请选择时间', trigger: 'click' }],
rules: [{ required: true, message: '请选择日期', trigger: 'click' }],
},
{
label: '地点',
@@ -173,7 +175,7 @@ export const option = {
prop: 'processStatus',
type: 'radio',
dicData: processStatusDic,
value: '处理',
value: '处理',
search: true,
clearable: true,
minWidth: 120,
@@ -278,6 +280,22 @@ export const option = {
],
};
export const exportColumns = [
{ prop: 'vehicleType', label: '车船类型' },
{ prop: 'vehicleNo', label: '车牌号/船号' },
{ prop: 'driverName', label: '驾驶人' },
{ prop: 'violationType', label: '类型' },
{ prop: 'violationItem', label: '事项' },
{ prop: 'violationTime', label: '日期' },
{ prop: 'location', label: '地点' },
{ prop: 'fineAmount', label: '罚款' },
{ prop: 'deductPoints', label: '被扣分数' },
{ prop: 'penaltyUnit', label: '被罚单位' },
{ prop: 'processStatus', label: '状态' },
{ prop: 'processDescription', label: '过程描述' },
{ prop: 'processResult', label: '处理结果' },
];
export const excelOption = {
labelPosition: 'right',
submitBtn: false,
+1 -1
View File
@@ -8,7 +8,7 @@
<div class="login-main">
<p class="login-title">
{{ $t('login.title') }}{{ website.title }}
<top-lang></top-lang>
<!-- <top-lang></top-lang>-->
</p>
<!-- 原登录方式先注释保留备用
<userLogin v-if="activeName === 'user'"></userLogin>
+23 -35
View File
@@ -7,18 +7,6 @@
:model="loginForm"
label-width="0"
>
<el-form-item v-if="tenantMode" prop="tenantId">
<el-input
@keyup.enter="handleLogin"
v-model="loginForm.tenantId"
auto-complete="off"
:placeholder="$t('login.tenantId')"
>
<template #prefix>
<i class="icon-quanxian" />
</template>
</el-input>
</el-form-item>
<el-form-item prop="username">
<el-input
@keyup.enter="handleLogin"
@@ -46,33 +34,34 @@
</el-input>
</el-form-item>
<el-form-item prop="code" class="login-code" v-if="captchaMode && captchaType === 'image'">
<el-input
@keyup.enter="handleLogin"
v-model="loginForm.code"
auto-complete="off"
:placeholder="$t('login.code')"
>
<template #prefix>
<i class="icon-yanzhengma"></i>
</template>
<template #append>
<div class="login-code-box">
<img :src="loginForm.image" class="login-code-img" @click="refreshCode" />
</div>
</template>
</el-input>
<div class="login-code-wrap">
<el-input
@keyup.enter="handleLogin"
v-model="loginForm.code"
auto-complete="off"
maxlength="6"
:placeholder="$t('login.code')"
>
<template #prefix>
<i class="icon-yanzhengma"></i>
</template>
</el-input>
<div class="login-code-box" @click="refreshCode" title="点击刷新验证码">
<img :src="loginForm.image" class="login-code-img" alt="验证码" />
</div>
</div>
</el-form-item>
<el-form-item>
<el-button type="primary" @click.prevent="handleLogin" class="login-submit"
>{{ $t('login.submit') }}
</el-button>
<el-button
v-if="this.registerMode"
type="danger"
@click.prevent="handleRegister"
class="register-submit"
>{{ $t('login.register') }}
</el-button>
<!-- <el-button-->
<!-- v-if="this.registerMode"-->
<!-- type="danger"-->
<!-- @click.prevent="handleRegister"-->
<!-- class="register-submit"-->
<!-- >{{ $t('login.register') }}-->
<!-- </el-button>-->
</el-form-item>
<behavior-captcha ref="behaviorCaptcha" @success="handleBehaviorSuccess"></behavior-captcha>
</el-form>
@@ -117,7 +106,6 @@ export default {
image: 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7',
},
loginRules: {
tenantId: [{ required: false, message: '请输入租户ID', trigger: 'blur' }],
username: [{ required: true, message: '请输入用户名', trigger: 'blur' }],
password: [
{ required: true, message: '请输入密码', trigger: 'blur' },
+24
View File
@@ -2,11 +2,35 @@ import router from './router/';
import store from './store';
import { tabKeyOf } from '@/router/tab';
import { getToken } from '@/utils/auth';
import {
isChunkLoadError,
reloadForChunkError,
setPendingRoutePath,
} from '@/utils/chunk-reload';
import { ElMessage } from 'element-plus';
import NProgress from 'nprogress'; // progress bar
import 'nprogress/nprogress.css'; // progress bar style
NProgress.configure({ showSpinner: false });
const lockPage = '/lock'; //锁屏页
// 懒加载 chunk / CSS 失败时整页刷新,避免菜单点击后卡死
router.onError(error => {
if (!isChunkLoadError(error)) return;
if (reloadForChunkError()) {
ElMessage.warning('页面资源加载失败,正在重新加载…');
}
});
window.addEventListener('unhandledrejection', event => {
if (!isChunkLoadError(event.reason)) return;
if (reloadForChunkError()) {
event.preventDefault();
ElMessage.warning('页面资源加载失败,正在重新加载…');
}
});
router.beforeEach((to, from, next) => {
setPendingRoutePath(to.fullPath);
const meta = to.meta || {};
const isMenu = meta.menu === undefined ? to.query.menu : meta.menu;
store.commit('SET_IS_MENU', isMenu === undefined);
+99
View File
@@ -116,6 +116,33 @@ export default [
},
],
},
{
path: '/settlement/transport-reconciliation/form',
component: Layout,
children: [
{
path: '',
name: '新增编辑运输对账单',
meta: {
keepAlive: false,
activeMenu: '/settlement/transport-reconciliation',
},
component: () => import('@/views/settlement/transport-reconciliation-form.vue'),
},
],
},
{
path: '/business/voucher-manage/detail',
component: Layout,
children: [
{
path: '',
name: '执行凭证批次详情',
meta: { keepAlive: false, activeMenu: '/business/voucher-manage' },
component: () => import('@/views/business/voucher-manage-detail.vue'),
},
],
},
{
path: '/business/contract-manage/form',
component: Layout,
@@ -128,6 +155,18 @@ export default [
},
],
},
{
path: '/business/contract-manage/detail',
component: Layout,
children: [
{
path: '',
name: '合同详情',
meta: { keepAlive: false, activeMenu: '/business/contract-manage' },
component: () => import('@/views/business/contract-manage.vue'),
},
],
},
{
path: '/business/project-apply/form',
component: Layout,
@@ -152,6 +191,42 @@ export default [
},
],
},
{
path: '/business/waybill-manage/detail',
component: Layout,
children: [
{
path: '',
name: '运单管理详情',
meta: { keepAlive: false, activeMenu: '/business/waybill-manage' },
component: () => import('@/views/business/waybill-manage-detail.vue'),
},
],
},
{
path: '/business/waybill-import',
component: Layout,
children: [
{
path: '',
name: '导入运单',
meta: { keepAlive: false, activeMenu: '/business/waybill-import' },
component: () => import('@/views/business/waybill-import.vue'),
},
],
},
{
path: '/business/waybill-import/form',
component: Layout,
children: [
{
path: '',
name: '新建导入运单',
meta: { keepAlive: false, activeMenu: '/business/waybill-import' },
component: () => import('@/views/business/waybill-import-form.vue'),
},
],
},
{
path: '/business/loading-manage/form',
component: Layout,
@@ -176,6 +251,30 @@ export default [
},
],
},
{
path: '/business/transport-plan/import',
component: Layout,
children: [
{
path: '',
name: '导入运输计划',
meta: { keepAlive: false, activeMenu: '/business/transport-plan' },
component: () => import('@/views/business/transport-plan-import.vue'),
},
],
},
{
path: '/business/transport-plan-dispatch',
component: Layout,
children: [
{
path: '',
name: '计划调度',
meta: { keepAlive: false, activeMenu: '/business/transport-plan' },
component: () => import('@/views/business/transport-plan-dispatch.vue'),
},
],
},
{
path: '/business/shipping-template/form',
component: Layout,
+17
View File
@@ -149,3 +149,20 @@ a {
top: 0;
bottom: 0;
}
.map-picker-content {
display: flex;
gap: 12px;
> [class$='__map'],
> .address-map {
flex: 1 1 auto;
width: 100%;
min-width: 0;
box-sizing: border-box;
> .amap-container {
width: 100% !important;
height: 100% !important;
}
}
}
+51 -15
View File
@@ -135,9 +135,10 @@
//white-space: nowrap;
}
// 全宽兜底:搜索表单内树形下拉占满(覆盖默认搜索项宽度)
// 注意:搜索 form 内的 el-tree-select走该规则;新增/编辑表单用 span=6 的栅格自然分开,不受影响。
.avue-crud__search .el-form-item__content > .el-tree-select {
// 全宽兜底:搜索表单内树形下拉 / 级联选择器占满(覆盖默认搜索项宽度)
// 注意:搜索 form 内的 el-tree-select、el-cascader 均走该规则;新增/编辑表单用 span=6 的栅格自然分开,不受影响。
.avue-crud__search .el-form-item__content > .el-tree-select,
.avue-crud__search .el-form-item__content > .el-cascader {
width: 100%;
max-width: 100%;
}
@@ -212,6 +213,17 @@
gap: 8px;
}
// 全站弹窗标题统一带 4px 主色竖条(与 .dialog-section-title 保持一致)
// :not(:empty) 避免无标题弹窗出现孤立竖条
.el-dialog__title:not(:empty)::before {
content: '';
flex: none;
width: 4px;
height: 16px;
border-radius: 2px;
background-color: var(--el-color-primary);
}
.dialog-section-title::before {
content: '';
flex: none;
@@ -707,9 +719,9 @@
.avue-crud .el-table__body-wrapper tr.el-table__row:nth-child(even) td.el-table__cell,
.avue-crud .el-table__body-wrapper tr.el-table__row:nth-child(even) td.el-table-fixed-column--left,
.avue-crud
.el-table__body-wrapper
tr.el-table__row:nth-child(even)
td.el-table-fixed-column--right {
.el-table__body-wrapper
tr.el-table__row:nth-child(even)
td.el-table-fixed-column--right {
background-color: #fafafa;
}
@@ -1049,21 +1061,38 @@
.el-form-item--label-right .el-form-item__label {
align-items: center;
}
// ============ 必填星号 * 与 label 首行齐平(仅换行时生效) ============
// label 为 inline-flex,星号 ::before 与文字是两个独立 flex 子项。
// align-items: normal= stretch):单行时星号盒子 = 一行高,位置不变;
// 折行后星号盒子被拉伸到 label 全高,但其内部按 line-height 从顶部排布 → 星号停在第一行。
// height: auto 覆盖 Element Plus 写死的 32px,让 label 收缩到内容高;
// align-self: center 再让收缩后的 label 在表单行内垂直居中(单行与输入框对齐)。
.is-required .el-form-item__label {
height: auto;
align-self: center;
align-items: normal;
}
.el-form-item--default {
margin-bottom: 14px;
}
// ============ 必填星号 * 与首行文字垂直居中 ============
// Element Plus 默认 .el-form-item__label 为 inline-flex + align-items: flex-start
// 星号 :before 高度(1em) 与文字行盒(line-height) 不一致时,多行/折行 label 会偏上。
// 让 :before 跟随 label 行高、以 inline-block 参与行内对齐即可修复,
// 兼容单行(默认 32px)与多行(auto + 18px)两种 label 高度场景。
// 配套:星号必须保持「高度 auto + 继承行高」,stretch 才会按首行排布;
// 写死 height 或 line-height 与 height 相等时效果会退化成居中。
// 注:客商档案(customer-archive)的 label 为 auto 高度 + padding 下沉方案,scoped 特异性更高会覆盖本规则。
.el-form-item.is-required .el-form-item__label::before {
display: inline-block;
height: auto;
line-height: inherit;
margin-right: 4px;
}
// ============ archive-formlabel 与控件垂直居中(全站复用) ============
// archive-form class 被 driver / vehicle / ship / credit-score-quantification / loading-manage 等
// 多个页面复用,但「垂直居中」规则原本锁在 customer-archive.vue 的 scoped 样式里,
// 其它页面拿不到 → 高控件行(证件上传 151px)label 贴顶。提升为全局统一生效。
.archive-form .el-form-item {
align-items: center;
}
//.el-form-item {
// margin-bottom: 15px !important;
//}
@@ -1116,11 +1145,18 @@
color: #909399 !important;
}
// 已选中:选中文本用主文字色 #333333,与占位符明显区分。
// 注意Element Plus 选中值节点同时带 el-select__selected-item 与 el-select__placeholder 两个类
// 而上面占位符规则用了 !important,故此处必须同样 !important 才能胜出(本规则 specificity 更高)。
// 已选中:选中文本用主文字色 #606266,与占位符明显区分。
// 关键Element Plus 的「选中值文本」与「占位符」共用同一个节点
// <div class="el-select__selected-item el-select__placeholder [is-transparent]">
// 只有未选值(或已展开但无搜索输入)时才会带 .is-transparent。
// 因此这里必须排除 .is-transparent,否则未选值的占位符也会被染成选中色,与占位符灰无法区分。
// 仅作用于非禁用态,禁用态保留 Element Plus 的禁用灰(--el-select-disabled-color),避免被覆盖。
.el-select__wrapper:not(.is-disabled) .el-select__selected-item {
.el-select__wrapper:not(.is-disabled) .el-select__selected-item:not(.is-transparent) {
color: #606266 !important;
}
// 多选:选中项渲染为 el-tag,文字色由 tag 自身控制,上面规则覆盖不到,单独处理。
.el-select__wrapper:not(.is-disabled) .el-select__tags-text {
color: #606266 !important;
}
+26 -15
View File
@@ -134,26 +134,37 @@
}
.login-code {
width: 100%;
height: 100%;
.el-input-group__append {
background-color: #fff;
}
.login-code-wrap {
display: flex;
align-items: stretch;
width: 100%;
gap: 10px;
.el-input {
flex: 1;
}
}
.login-code-box {
width: 130px;
height: 38px;
flex: none;
border: 1px solid #dcdfe6;
border-radius: 4px;
overflow: hidden;
cursor: pointer;
background: #fff;
display: flex;
align-items: center;
justify-content: center;
transition: border-color 0.2s;
&:hover {
border-color: #409eff;
}
}
.login-code-img {
cursor: pointer;
min-width: 100px;
padding: 0 5px;
height: 30px;
color: #333;
font-size: 20px;
font-weight: bold;
letter-spacing: 3px;
line-height: 38px;
text-indent: 5px;
text-align: center;
box-sizing: border-box;
width: 100%;
height: 100%;
object-fit: fill;
display: block;
user-select: none;
}
+38
View File
@@ -0,0 +1,38 @@
/**
* 懒加载 chunk / CSS preload 失败后的整页恢复。
* 常见于:部署后旧 hash 失效、静态服务空闲断连、代理 CONNECTION_RESET。
*/
const RELOAD_FLAG = 'app:chunk-reload-ts';
const RELOAD_COOLDOWN_MS = 10000;
const CHUNK_ERROR_RE =
/Failed to fetch dynamically imported module|Importing a module script failed|Unable to preload CSS|error loading dynamically imported module|Loading CSS chunk|Loading chunk .+ failed|ChunkLoadError/i;
/** 最近一次路由跳转目标,供 onError 时整页落到正确地址 */
let pendingFullPath = '';
export function setPendingRoutePath(fullPath = '') {
pendingFullPath = fullPath || '';
}
export function isChunkLoadError(error) {
if (!error) return false;
const message = error.message || String(error);
return CHUNK_ERROR_RE.test(message);
}
/**
* @returns {boolean} 是否已触发刷新(冷却期内返回 false,避免死循环)
*/
export function reloadForChunkError(targetPath) {
const now = Date.now();
const last = Number(sessionStorage.getItem(RELOAD_FLAG) || 0);
if (now - last < RELOAD_COOLDOWN_MS) {
return false;
}
sessionStorage.setItem(RELOAD_FLAG, String(now));
const path = targetPath || pendingFullPath || window.location.pathname + window.location.search + window.location.hash;
window.location.assign(path);
return true;
}
+22 -6
View File
@@ -7,8 +7,20 @@ import 'nprogress/nprogress.css';
const excelPattern = /\.(xls|xlsx)$/;
const isExcelResponse = res => {
const contentType = res.headers['content-type'] || res.data.type || '';
return contentType.includes('application/vnd.ms-excel');
const headers = res.headers || {};
const contentType = String(headers['content-type'] || res.data?.type || '').toLowerCase();
const contentDisposition = String(headers['content-disposition'] || '').toLowerCase();
if (
contentType.includes('application/vnd.ms-excel') ||
contentType.includes('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet')
) {
return true;
}
// 网关或对象存储可能将 Excel 流标记为二进制类型,此时通过下载文件名识别。
return (
contentType.includes('application/octet-stream') &&
/\.(xls|xlsx)(?:["';]|$)/.test(contentDisposition)
);
};
const parseBlobJson = async blob => {
@@ -44,9 +56,10 @@ const decorateFailExcel = async (blob, businessName, failDetailDecorator) => {
* @param {Function} [onSuccess] 导入成功回调
* @param {Object} [options] 扩展项
* @param {Function} [options.failDetailDecorator] 失败明细加工函数,用于对后端返回的失败 Excel 标红/改写原因
* @param {Number} [options.timeout=60000] 导入请求超时时间(毫秒)
*/
export const openImportDialog = (vm, businessName, onSuccess, options = {}) => {
const { failDetailDecorator } = options;
const { failDetailDecorator, timeout = 60000 } = options;
const excelOption = vm.excelOption || vm.excelOptionConfig;
const column = vm.findColumn(excelOption?.column || [], 'excelFile');
if (!column) {
@@ -54,12 +67,15 @@ export const openImportDialog = (vm, businessName, onSuccess, options = {}) => {
return;
}
column.httpRequest = (option, uploadColumn) =>
handleImportExcel(vm, option, uploadColumn, businessName, onSuccess, { failDetailDecorator });
handleImportExcel(vm, option, uploadColumn, businessName, onSuccess, {
failDetailDecorator,
timeout,
});
vm.excelBox = true;
};
export const handleImportExcel = async (vm, option, column, businessName, onSuccess, options = {}) => {
const { failDetailDecorator } = options;
const { failDetailDecorator, timeout = 60000 } = options;
const file = option.file;
const fileName = file && file.name ? file.name.toLowerCase() : '';
if (!excelPattern.test(fileName)) {
@@ -77,7 +93,7 @@ export const handleImportExcel = async (vm, option, column, businessName, onSucc
background: 'rgba(255, 255, 255, 0.7)',
});
try {
const res = await importBlob(column.action, file);
const res = await importBlob(column.action, file, { timeout });
if (isExcelResponse(res)) {
const decorated = await decorateFailExcel(res.data, businessName, failDetailDecorator);
downloadXls(
+28
View File
@@ -55,6 +55,19 @@
{{ row.createUserName || row.createUser || '' }}
</template>
<template #remark-form>
<el-input
v-model="form.remark"
class="remark-input"
type="textarea"
:rows="2"
:disabled="dialogType === 'view'"
maxlength="200"
show-word-limit
placeholder="请输入"
/>
</template>
<template #parentId-form>
<el-select
v-model="form.parentId"
@@ -644,3 +657,18 @@ export default {
}
}
</style>
<style lang="scss">
/* 货物类型新增/编辑弹窗:footer 不上移,避免覆盖备注文本域底部内容 */
.cargo-type-dialog.avue-dialog.avue-crud__dialog .avue-dialog__footer {
margin-top: 0 !important;
}
.cargo-type-dialog.avue-dialog.avue-crud__dialog .el-dialog__body {
padding-bottom: 16px !important;
}
.cargo-type-dialog .remark-input {
width: 100%;
}
</style>
+16 -1
View File
@@ -232,7 +232,10 @@
搜索
</el-button>
</div>
<div ref="amap" class="common-address-page__map"></div>
<div class="map-picker-content">
<map-search-results :results="mapSearchResults" @select="selectMapSearchResult" />
<div ref="amap" class="common-address-page__map"></div>
</div>
<div class="common-address-page__map-info">
<span>{{ mapStatus }}</span>
<span v-if="mapSelected.regionName">行政区划{{ mapSelected.regionName }}</span>
@@ -298,6 +301,7 @@ export default {
mapKeyword: '',
mapStatus: '可搜索地址或点击地图选点',
mapSelected: {},
mapSearchResults: [],
amap: null,
amapMarker: null,
amapGeocoder: null,
@@ -1113,6 +1117,12 @@ export default {
this.ensureAmapGeocoder()
.then(() => this.runAmapGeocode('location', keyword))
.then(result => {
this.mapSearchResults = (result.geocodes || []).map((item, index) => ({
id: item.id || index,
name: item.formattedAddress || keyword,
address: item.formattedAddress || keyword,
location: item.location,
}));
const point = this.resolveMapPoint(result);
if (!point) {
this.mapStatus = '未找到匹配地址';
@@ -1133,6 +1143,11 @@ export default {
this.$message.error('高德地图组件加载失败,请稍后重试或重新打开弹窗');
});
},
selectMapSearchResult(item) {
if (item && item.location) {
this.pickMapPoint(item.location, item.address || item.name || '');
}
},
pickMapPoint(lnglat, keyword) {
const longitude = this.getPointLng(lnglat);
const latitude = this.getPointLat(lnglat);
+130 -25
View File
@@ -30,12 +30,14 @@
{{ row.status === 1 ? '启用' : '停用' }}
</el-tag>
</template>
<template #feeCategory="{ row }">
{{ formatFeeCategory(row.feeCategory) }}
</template>
<template #feeCategory-form>
<el-select
v-model="form.feeCategory"
class="fee-item-form-control"
clearable
:disabled="dialogType !== 'add'"
filterable
placeholder="请选择费用类型"
@change="handleFeeCategoryChange"
@@ -43,18 +45,30 @@
<el-option
v-for="item in feeCategoryOptions"
:key="item.id || item.dictKey"
:label="item.dictValue"
:label="`${item.dictValue}/${item.dictKey}`"
:value="item.dictKey"
/>
</el-select>
</template>
<template #taxRate="{ row }">{{ formatTaxRate(row.taxRate) }}</template>
<template #taxRate-form>
<el-input
v-model="form.taxRate"
inputmode="numeric"
maxlength="3"
clearable
placeholder="请输入税率"
@input="handleTaxRateInput"
>
<template #append>%</template>
</el-input>
</template>
<template #englishName-form>
<el-input
v-model="form.englishName"
:maxlength="feeItemCodeMaxlength"
class="fee-item-form-control"
clearable
:disabled="dialogType !== 'add'"
placeholder="请输入费用项代码"
@change="handleFeeItemCodeChange"
>
@@ -80,7 +94,7 @@
<script>
import { getList, getDetail, submit, remove, changeStatus } from '@/api/base/fee-item';
import { exportBlob } from '@/api/common';
import { getDictionary } from '@/api/system/dictbiz';
import { getDictionaryAll } from '@/api/system/dictbiz';
import { getDeptTree } from '@/api/system/dept';
import { downloadXls } from '@/utils/util';
import { getToken } from '@/utils/auth';
@@ -136,10 +150,11 @@ export default {
searchOrder: 3,
filterable: true,
formslot: true,
slot: true,
span: 12,
dicData: [],
props: {
label: 'dictValue',
label: 'displayLabel',
value: 'dictKey',
},
minWidth: 120,
@@ -154,6 +169,30 @@ export default {
maxlength: 100,
rules: [{ required: true, message: '请输入费用项代码', trigger: 'blur' }],
},
{
label: '税率',
prop: 'taxRate',
type: 'input',
formslot: true,
slot: true,
minWidth: 100,
span: 12,
rules: [
{ required: true, message: '请输入税率', trigger: 'blur' },
{
validator: (rule, value, callback) => {
const text = String(value ?? '').trim();
const rate = Number(text);
if (!/^\d+$/.test(text) || rate < 0 || rate > 100) {
callback(new Error('税率必须是0到100之间的整数'));
return;
}
callback();
},
trigger: 'blur',
},
],
},
{
label: '费用项',
prop: 'name',
@@ -170,7 +209,8 @@ export default {
type: 'textarea',
minRows: 2,
span: 24,
hide: true,
minWidth: 200,
overHidden: true,
maxlength: 200,
showWordLimit: true,
rules: [{ max: 200, message: '备注不能超过200个字', trigger: 'blur' }],
@@ -275,10 +315,17 @@ export default {
},
methods: {
initFeeCategoryOptions() {
getDictionary({ code: 'fee_category' }).then(res => {
this.feeCategoryOptions = res.data.data || [];
getDictionaryAll().then(res => {
const options = (res.data.data || [])
.filter(item => item.code === 'fee_category' && Number(item.parentId) > 0)
.sort((first, second) => Number(first.sort || 0) - Number(second.sort || 0))
.map(item => ({
...item,
displayLabel: `${item.dictValue}/${item.dictKey}`,
}));
this.feeCategoryOptions = options;
const column = this.findColumn(this.option.column, 'feeCategory');
column.dicData = this.feeCategoryOptions;
column.dicData = options;
});
},
initDeptTree() {
@@ -307,6 +354,21 @@ export default {
);
return String((option && option.dictKey) || feeCategory);
},
formatFeeCategory(value) {
const feeCategory = String(value || '').trim();
if (!feeCategory) return '';
const option = this.feeCategoryOptions.find(
item =>
String(item.dictKey || '') === feeCategory || String(item.dictValue || '') === feeCategory
);
return option ? `${option.dictValue}/${option.dictKey}` : feeCategory;
},
formatTaxRate(value) {
const text = String(value ?? '').trim();
if (text === '') return '';
const rate = Number(text);
return Number.isFinite(rate) ? `${Math.trunc(Math.abs(rate))}%` : `${text}%`;
},
getFeeItemCodeSuffix(code, feeCategory) {
const value = String(code || '').trim();
const prefix = this.getFeeCategoryPrefix(feeCategory);
@@ -328,6 +390,7 @@ export default {
const code = this.getFeeItemCodeSuffix(values.englishName, values.feeCategory);
values.feeCategory = String(values.feeCategory || '').trim();
values.name = String(values.name || '').trim();
values.taxRate = Number(values.taxRate);
values.englishName = prefix ? `${prefix}${code}` : code;
values.remark = String(values.remark || '').trim() || undefined;
if (!values.status) values.status = 1;
@@ -337,33 +400,70 @@ export default {
const values = { ...row };
values.feeCategory = String(values.feeCategory || '').trim();
values.englishName = this.getFeeItemCodeSuffix(values.englishName, values.feeCategory);
const taxRateText = String(values.taxRate ?? '').trim();
const taxRate = Number(taxRateText);
if (taxRateText !== '' && Number.isFinite(taxRate)) {
values.taxRate = String(Math.trunc(Math.abs(taxRate)));
}
return values;
},
validateUnique(row) {
const rowId = String(row.id || '');
const hasDuplicate = (params, prop) => {
if (!row[prop]) {
return Promise.resolve(false);
}
return getList(1, 100, params).then(res => {
const records = res.data.data.records || [];
return records.some(
item =>
String(item[prop] || '').trim() === String(row[prop]).trim() &&
String(item.id || '') !== rowId
);
});
};
return Promise.all([
hasDuplicate({ name: row.name }, 'name'),
hasDuplicate({ englishName: row.englishName }, 'englishName'),
]).then(([nameExists, codeExists]) => {
if (nameExists) {
return Promise.reject(new Error('该费用项已存在'));
}
if (codeExists) {
return Promise.reject(new Error('该费用项代码已存在'));
}
return Promise.resolve();
});
},
handleSubmitError(error, loading) {
const uniqueMessages = ['该费用项已存在', '该费用项代码已存在'];
if (uniqueMessages.includes(error.message)) {
this.$message.warning(error.message);
}
window.console.log(error);
loading();
},
rowSave(row, done, loading) {
submit(this.normalizeRow(row)).then(
() => {
const submitRow = this.normalizeRow(row);
this.validateUnique(submitRow)
.then(() => submit(submitRow))
.then(() => {
this.onLoad(this.page);
this.$message({ type: 'success', message: '操作成功!' });
done();
},
error => {
window.console.log(error);
loading();
}
);
})
.catch(error => this.handleSubmitError(error, loading));
},
rowUpdate(row, index, done, loading) {
submit(this.normalizeRow(row)).then(
() => {
const submitRow = this.normalizeRow(row);
this.validateUnique(submitRow)
.then(() => submit(submitRow))
.then(() => {
this.onLoad(this.page);
this.$message({ type: 'success', message: '操作成功!' });
done();
},
error => {
window.console.log(error);
loading();
}
);
})
.catch(error => this.handleSubmitError(error, loading));
},
rowDel(row) {
this.$confirm('确定将选择数据删除?', {
@@ -404,6 +504,11 @@ export default {
this.form.englishName = '';
done();
},
handleTaxRateInput(value) {
let normalized = String(value ?? '').replace(/\D/g, '');
if (normalized.length > 1) normalized = normalized.replace(/^0+/, '') || '0';
this.form.taxRate = normalized;
},
searchReset() {
this.query = {};
this.onLoad(this.page);
+36 -8
View File
@@ -20,6 +20,16 @@
批量删除
</el-button>
<div class="insurance-ocr-template-page__search">
<el-select
v-model="query.vehicleType"
clearable
placeholder="车船类型"
style="width: 140px"
@change="search"
>
<el-option label="车辆" value="车辆" />
<el-option label="船舶" value="船舶" />
</el-select>
<el-input
v-model="query.name"
clearable
@@ -42,6 +52,7 @@
<el-table-column type="selection" width="48" />
<el-table-column type="index" label="序号" width="70" align="center" />
<el-table-column prop="name" label="模板名称" min-width="220" show-overflow-tooltip />
<el-table-column prop="vehicleType" label="车船类型" min-width="110" />
<el-table-column label="已配置字段" min-width="150">
<template #default="{ row }">{{ getMappingCount(row.mappingConfig) }}</template>
</el-table-column>
@@ -94,6 +105,12 @@
<el-form-item label="模板名称" prop="name">
<el-input v-model="form.name" maxlength="100" show-word-limit />
</el-form-item>
<el-form-item label="车船类型" prop="vehicleType">
<el-radio-group v-model="form.vehicleType">
<el-radio label="车辆">车辆</el-radio>
<el-radio label="船舶">船舶</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="字段映射" required>
<el-table :data="mappingRows" border class="insurance-ocr-template-page__mapping-table">
<el-table-column prop="key" label="键名" width="180" align="center" />
@@ -165,8 +182,8 @@ export default {
readonly: false,
data: [],
selectionList: [],
query: { name: '' },
form: { id: '', name: '' },
query: { name: '', vehicleType: '' },
form: { id: '', name: '', vehicleType: '车辆' },
mappingRows: createMappingRows(),
page: {
pageSize: 10,
@@ -176,9 +193,13 @@ export default {
},
rules: {
name: [{ required: true, message: '请输入模板名称', trigger: 'blur' }],
vehicleType: [{ required: true, message: '请选择车船类型', trigger: 'change' }],
},
};
},
created() {
this.onLoad();
},
computed: {
...mapGetters(['permission', 'userInfo']),
isAdmin() {
@@ -198,7 +219,7 @@ export default {
},
onLoad() {
this.loading = true;
getList(this.page.currentPage, this.page.pageSize, this.query)
return getList(this.page.currentPage, this.page.pageSize, this.query)
.then(res => {
const pageData = res.data.data || {};
this.data = pageData.records || [];
@@ -215,6 +236,7 @@ export default {
},
resetSearch() {
this.query.name = '';
this.query.vehicleType = '';
this.search();
},
currentChange(currentPage) {
@@ -232,18 +254,23 @@ export default {
openDialog(row, readonly = false) {
this.readonly = readonly;
if (!row?.id) {
this.form = { id: '', name: '', vehicleType: '车辆' };
this.dialogVisible = true;
return;
}
getDetail(row.id).then(res => {
const detail = res.data.data || {};
this.form = { id: detail.id, name: detail.name || '' };
this.form = {
id: detail.id,
name: detail.name || '',
vehicleType: detail.vehicleType || '车辆',
};
this.mappingRows = createMappingRows(detail.mappingConfig);
this.dialogVisible = true;
});
},
resetForm() {
this.form = { id: '', name: '' };
this.form = { id: '', name: '', vehicleType: '车辆' };
this.mappingRows = createMappingRows();
this.readonly = false;
this.submitLoading = false;
@@ -261,14 +288,15 @@ export default {
submit({
id: this.form.id || undefined,
name: String(this.form.name || '').trim(),
vehicleType: this.form.vehicleType || '车辆',
mappingConfig: JSON.stringify(
this.mappingRows.map(item => ({ key: item.key, value: String(item.value || '').trim() }))
),
})
.then(() => {
.then(async () => {
this.$message.success('操作成功');
this.dialogVisible = false;
this.onLoad();
await this.onLoad();
})
.finally(() => {
this.submitLoading = false;
@@ -308,7 +336,7 @@ export default {
align-items: center;
gap: 8px;
margin-left: auto;
width: 380px;
width: 520px;
}
&__mapping-table {
+255
View File
@@ -0,0 +1,255 @@
<template>
<basic-container class="measurement-unit-page">
<avue-crud
:option="option"
:table-loading="loading"
:data="data"
v-model:page="page"
v-model="form"
ref="crud"
:permission="permissionList"
:before-open="beforeOpen"
@row-save="rowSave"
@row-update="rowUpdate"
@search-change="searchChange"
@search-reset="searchReset"
@selection-change="selectionChange"
@current-change="currentChange"
@size-change="sizeChange"
@refresh-change="refreshChange"
@on-load="onLoad"
>
<template #menu-left>
<el-button
v-if="hasPermission('measurement_unit_add')"
type="primary"
@click="$refs.crud.rowAdd()"
>
新增
</el-button>
<el-button
v-if="hasPermission('measurement_unit_delete')"
type="danger"
plain
:disabled="!selectionList.length"
@click="handleDelete"
>
批量删除
</el-button>
</template>
<template #dimension="{ row }">
{{ row.dimension || '-' }}
</template>
<template #status="{ row }">
<el-tag :type="row.status === 1 ? 'primary' : 'info'" class="status-text">
{{ row.status === 1 ? '启用' : '停用' }}
</el-tag>
</template>
<template #menu="{ row, index }">
<el-link
v-if="hasPermission('measurement_unit_edit')"
type="primary"
@click="$refs.crud.rowEdit(row, index)"
>
编辑
</el-link>
<el-link
v-if="hasPermission('measurement_unit_status')"
type="primary"
@click="handleStatus(row)"
>
{{ row.status === 1 ? '停用' : '启用' }}
</el-link>
<el-link
v-if="hasPermission('measurement_unit_delete')"
type="danger"
@click="handleDelete(row.id)"
>
删除
</el-link>
</template>
</avue-crud>
<empty-pagination
:page="page"
@size-change="sizeChange"
@current-change="currentChange"
@load="onLoad(page, query)"
/>
</basic-container>
</template>
<script>
import { mapGetters } from 'vuex';
import { changeStatus, getDetail, getList, remove, submit } from '@/api/base/measurement-unit';
import { createOption } from '@/option/base/measurement-unit';
export default {
data() {
return {
form: {},
query: {},
loading: true,
data: [],
page: {
pageSize: 10,
pageSizes: [10, 20, 50, 100],
currentPage: 1,
total: 0,
},
selectionList: [],
option: createOption(),
};
},
computed: {
...mapGetters(['permission', 'userInfo']),
permissionList() {
return {
addBtn: this.hasPermission('measurement_unit_add'),
};
},
ids() {
return this.selectionList.map(item => item.id).join(',');
},
isAdmin() {
return String(this.userInfo?.authority || '').includes('admin');
},
},
methods: {
hasPermission(code) {
return this.isAdmin || this.permission?.[code] === true;
},
normalizeRow(row) {
row.unitName = String(row.unitName || '').trim();
row.dimension = String(row.dimension || '').trim();
row.remark = String(row.remark || '').trim();
if (!row.status) row.status = 1;
return row;
},
rowSave(row, done, loading) {
submit(this.normalizeRow(row)).then(
() => {
this.onLoad(this.page, this.query);
this.$message.success('操作成功');
done();
},
() => loading()
);
},
rowUpdate(row, index, done, loading) {
submit(this.normalizeRow(row)).then(
() => {
this.onLoad(this.page, this.query);
this.$message.success('操作成功');
done();
},
() => loading()
);
},
handleDelete(ids = '') {
const targetIds = ids || this.ids;
if (!targetIds) {
this.$message.warning('请选择至少一条数据');
return;
}
this.$confirm('确定删除所选数据,删除后不可恢复?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => remove(targetIds))
.then(() => {
this.onLoad(this.page, this.query);
this.$message.success('操作成功');
this.selectionList = [];
});
},
handleStatus(row) {
const nextStatus = row.status === 1 ? 2 : 1;
const actionName = nextStatus === 1 ? '启用' : '停用';
this.$confirm(`是否确认${actionName}该计量单位?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => changeStatus(row.id, nextStatus))
.then(() => {
this.onLoad(this.page, this.query);
this.$message.success('操作成功');
});
},
beforeOpen(done, type) {
if (['edit', 'view'].includes(type)) {
getDetail(this.form.id).then(res => {
this.form = res.data.data || {};
done();
});
return;
}
this.form.status = 1;
done();
},
searchReset() {
this.query = {};
this.page.currentPage = 1;
this.onLoad(this.page, this.query);
},
searchChange(params, done) {
this.query = { ...params };
this.page.currentPage = 1;
this.onLoad(this.page, this.query);
done();
},
selectionChange(list) {
this.selectionList = list;
},
currentChange(currentPage) {
this.page.currentPage = currentPage;
this.onLoad(this.page, this.query);
},
sizeChange(pageSize) {
this.page.pageSize = pageSize;
this.page.currentPage = 1;
this.onLoad(this.page, this.query);
},
refreshChange() {
this.onLoad(this.page, this.query);
},
onLoad(page = this.page, params = this.query) {
this.loading = true;
return getList(page.currentPage, page.pageSize, params)
.then(res => {
const pageData = res.data.data || {};
this.data = pageData.records || [];
this.page.total = pageData.total || 0;
this.selectionList = [];
})
.finally(() => {
this.loading = false;
});
},
},
};
</script>
<style lang="scss" scoped>
.measurement-unit-page {
:deep(.avue-crud__menu) {
margin-bottom: 8px;
}
:deep(.avue-crud__search .el-form-item__label) {
min-width: 160px;
white-space: nowrap;
}
:deep(.avue-crud__menu-column) {
display: flex;
flex-wrap: wrap;
gap: 8px;
}
:deep(.avue-crud__menu .el-link) {
margin-right: 8px;
}
}
</style>
+139 -45
View File
@@ -93,6 +93,24 @@
<el-radio label="码头">码头</el-radio>
</el-radio-group>
</template>
<template #provinceCode-form>
<el-select
v-model="form.provinceCode"
clearable
filterable
:disabled="isProvinceDisabled"
placeholder="请选择"
style="width: 100%"
@change="handleProvinceChange"
>
<el-option
v-for="item in provinceOptions"
:key="item.id"
:label="item.title"
:value="item.id"
/>
</el-select>
</template>
<template #code-form>
<el-input
v-if="form.category !== '码头'"
@@ -110,7 +128,9 @@
maxlength="24"
placeholder="请输入码头标识"
@input="handleTerminalCodeChange"
/>
>
<template v-if="form.parentCode" #prepend>{{ form.parentCode }}</template>
</el-input>
</div>
</template>
<template #menu="{ row, index }">
@@ -298,6 +318,8 @@ export default {
excelForm: {},
portOptions: [],
countryOptions: [],
provinceOptions: [],
provinceOptionCache: {},
cityOptions: [],
cityLoading: false,
cityOptionCache: {},
@@ -434,13 +456,30 @@ export default {
change: ({ value }) => this.handleCountryNameChange(value),
rules: [{ required: true, message: '请选择国家', trigger: 'change' }],
},
{
label: '所属省份',
prop: 'provinceCode',
formslot: true,
hide: true,
span: 12,
order: 88,
placeholder: '请选择',
rules: [{ required: true, message: '请选择所属省份', trigger: 'change' }],
},
{
label: '所属省份',
prop: 'provinceName',
addDisplay: false,
editDisplay: false,
minWidth: 120,
},
{
label: '城市',
prop: 'cityCode',
formslot: true,
hide: true,
span: 12,
order: 88,
order: 87,
placeholder: '请选择',
rules: [{ required: true, message: '请选择所属城市', trigger: 'change' }],
},
@@ -463,7 +502,7 @@ export default {
type: 'select',
formslot: true,
hide: true,
order: 87,
order: 86,
props: {
label: 'title',
value: 'id',
@@ -532,7 +571,7 @@ export default {
span: 12,
minWidth: 220,
overHidden: false,
order: 86,
order: 85,
placeholder: '请输入',
maxlength: 255,
showWordLimit: true,
@@ -553,9 +592,8 @@ export default {
editDisplay: false,
dicData: [
{ label: '全部', value: '' },
{ label: '初始化录入', value: '初始化录入' },
{ label: '批量导入', value: '批量导入' },
{ label: '手动入', value: '手动录入' },
{ label: '手动入', value: '手动录入' },
],
},
{
@@ -666,6 +704,9 @@ export default {
return this.form.category === '码头';
},
isCityDisabled() {
return this.isParentRegionLocked || !this.form.provinceCode;
},
isProvinceDisabled() {
return this.isParentRegionLocked || !this.form.countryCode;
},
isDistrictDisabled() {
@@ -754,7 +795,7 @@ export default {
this.form.parentName = '';
this.form.countryCode = '';
this.form.country = '';
this.clearCityValue();
this.clearProvinceValue();
},
handleCategoryChange(value, reset = true) {
const required = value === '码头';
@@ -778,13 +819,15 @@ export default {
handleCountryChange(value) {
const country = this.countryOptions.find(item => item.id === value);
this.form.country = country ? country.title : '';
this.clearCityValue();
this.loadCityOptions(value);
this.clearProvinceValue();
this.loadProvinceOptions(value);
},
handleCountryNameChange(value) {
const country = this.countryOptions.find(item => item.title === value);
this.setProvinceOptions([]);
this.setCityOptions([]);
this.setDistrictOptions([]);
this.loadCityOptions(country ? country.id : '');
this.loadProvinceOptions(country ? country.id : '');
},
syncCountryName(countryCode) {
const country = this.countryOptions.find(item => item.id === countryCode);
@@ -817,6 +860,18 @@ export default {
}));
}
},
setProvinceOptions(provinceOptions) {
this.provinceOptions = provinceOptions;
const provinceCodeColumn = this.findColumn(this.option.column, 'provinceCode');
if (provinceCodeColumn) {
provinceCodeColumn.dicData = provinceOptions;
}
},
clearProvinceValue() {
this.form.provinceCode = undefined;
this.form.provinceName = '';
this.clearCityValue();
},
clearCityValue() {
this.form.cityCode = undefined;
this.form.city = '';
@@ -827,36 +882,38 @@ export default {
this.form.districtName = '';
this.form.regionCode = '';
},
loadCityOptions(countryCode) {
loadProvinceOptions(countryCode) {
if (!countryCode) {
this.setProvinceOptions([]);
return Promise.resolve([]);
}
if (this.provinceOptionCache[countryCode]) {
this.setProvinceOptions(this.provinceOptionCache[countryCode]);
return Promise.resolve(this.provinceOptionCache[countryCode]);
}
return getLazyTree(countryCode).then(res => {
const options = (res.data.data || []).map(this.normalizeRegionOption);
this.provinceOptionCache[countryCode] = options;
this.setProvinceOptions(options);
return options;
});
},
loadCityOptions(provinceCode) {
if (!provinceCode) {
this.setCityOptions([]);
return Promise.resolve([]);
}
if (this.cityOptionCache[countryCode]) {
this.setCityOptions(this.cityOptionCache[countryCode]);
return Promise.resolve(this.cityOptionCache[countryCode]);
if (this.cityOptionCache[provinceCode]) {
this.setCityOptions(this.cityOptionCache[provinceCode]);
return Promise.resolve(this.cityOptionCache[provinceCode]);
}
this.cityLoading = true;
return getLazyTree(countryCode)
return getLazyTree(provinceCode)
.then(res => {
const firstLevelList = (res.data.data || []).map(this.normalizeRegionOption);
return Promise.all(
firstLevelList.map(parent => {
return getLazyTree(parent.id).then(childRes => {
const childList = (childRes.data.data || []).map(this.normalizeRegionOption);
return childList.map(child => ({
...child,
parentCode: child.parentCode || parent.id,
}));
});
})
).then(cityGroups => {
const cityList = cityGroups.flat();
const options = cityList.length > 0 ? cityList : firstLevelList;
this.cityOptionCache[countryCode] = options;
this.setCityOptions(options);
return options;
});
const options = (res.data.data || []).map(this.normalizeRegionOption);
this.cityOptionCache[provinceCode] = options;
this.setCityOptions(options);
return options;
})
.finally(() => {
this.cityLoading = false;
@@ -866,6 +923,12 @@ export default {
const city = this.cityOptions.find(item => item.title === cityName || item.id === regionCode);
return city ? city.id : '';
},
resolveProvinceCode(provinceName) {
const province = this.provinceOptions.find(
item => item.title === provinceName || item.id === provinceName
);
return province ? province.id : '';
},
setDistrictOptions(districtOptions) {
this.districtOptions = districtOptions;
const districtCodeColumn = this.findColumn(this.option.column, 'districtCode');
@@ -926,6 +989,8 @@ export default {
this.form.terminalCode = terminalCode;
this.handleTerminalCodeChange(terminalCode);
this.form.country = parent.country;
this.form.provinceCode = parent.provinceCode;
this.form.provinceName = parent.provinceName;
this.form.city = parent.city;
this.form.districtCode = parent.districtCode;
this.form.districtName = parent.districtName;
@@ -934,7 +999,12 @@ export default {
.then(countryCode => {
this.form.countryCode = countryCode;
this.syncCountryName(countryCode);
return this.loadCityOptions(countryCode);
return this.loadProvinceOptions(countryCode);
})
.then(() => {
this.form.provinceCode =
String(parent.provinceCode || '') || this.resolveProvinceCode(parent.provinceName);
return this.loadCityOptions(this.form.provinceCode);
})
.then(() => {
this.form.cityCode = this.resolveCityCode(parent.city, parent.regionCode);
@@ -951,6 +1021,12 @@ export default {
this.clearDistrictValue();
this.loadDistrictOptions(value);
},
handleProvinceChange(value) {
const province = this.provinceOptions.find(item => item.id === value);
this.form.provinceName = province ? province.title : '';
this.clearCityValue();
this.loadCityOptions(value);
},
handleCityNameChange(value) {
const city = this.cityOptions.find(item => item.title === value);
this.setDistrictOptions([]);
@@ -987,6 +1063,8 @@ export default {
submitRow.regionCode = String(submitRow.regionCode || '').trim();
submitRow.districtCode = String(submitRow.districtCode || '').trim();
submitRow.districtName = String(submitRow.districtName || '').trim();
submitRow.provinceCode = String(submitRow.provinceCode || '').trim();
submitRow.provinceName = String(submitRow.provinceName || '').trim();
submitRow.detailAddress = String(submitRow.detailAddress || '').trim();
submitRow.longitude = normalizeCoordinateInput(submitRow.longitude);
submitRow.latitude = normalizeCoordinateInput(submitRow.latitude);
@@ -1020,6 +1098,10 @@ export default {
this.$message.warning('请选择上级港口');
return false;
}
if (isBlank(row.provinceCode)) {
this.$message.warning('请选择所属省份');
return false;
}
if (isBlank(row.regionCode)) {
this.$message.warning('请选择区县');
return false;
@@ -1152,7 +1234,13 @@ export default {
.then(countryCode => {
this.form.countryCode = countryCode;
this.syncCountryName(countryCode);
return this.loadCityOptions(countryCode);
return this.loadProvinceOptions(countryCode);
})
.then(() => {
this.form.provinceCode =
String(this.form.provinceCode || '') ||
this.resolveProvinceCode(this.form.provinceName);
return this.loadCityOptions(this.form.provinceCode);
})
.then(() => {
this.form.cityCode = this.resolveCityCode(this.form.city, this.form.regionCode);
@@ -1178,7 +1266,13 @@ export default {
.then(countryCode => {
this.form.countryCode = countryCode;
this.syncCountryName(countryCode);
return this.loadCityOptions(countryCode);
return this.loadProvinceOptions(countryCode);
})
.then(() => {
this.form.provinceCode =
String(this.form.provinceCode || '') ||
this.resolveProvinceCode(this.form.provinceName);
return this.loadCityOptions(this.form.provinceCode);
})
.then(() => {
this.form.cityCode = this.resolveCityCode(this.form.city, this.form.regionCode);
@@ -1210,6 +1304,7 @@ export default {
},
searchReset() {
this.query = {};
this.setProvinceOptions([]);
this.setCityOptions([]);
this.setDistrictOptions([]);
this.onLoad(this.page);
@@ -1250,14 +1345,10 @@ export default {
});
},
handleImport() {
openImportDialog(
this,
'港口码头主数据',
() => {
this.loadPortOptions();
this.onLoad(this.page, this.query);
}
);
openImportDialog(this, '港口码头主数据', () => {
this.loadPortOptions();
this.onLoad(this.page, this.query);
});
},
handleExport() {
this.$confirm('是否导出港口码头主数据?', '提示', {
@@ -1270,7 +1361,10 @@ export default {
feedback: true,
})
.then(res => {
downloadXls(res.data, `港口码头主数据${this.$dayjs().format('YYYY-MM-DD HH:mm:ss')}.xlsx`);
downloadXls(
res.data,
`港口码头主数据${this.$dayjs().format('YYYY-MM-DD HH:mm:ss')}.xlsx`
);
})
.finally(() => {
NProgress.done();
+28 -15
View File
@@ -150,7 +150,7 @@ export default {
};
const validateTelegraphCode = (rule, value, callback) => {
if (!/^[A-Z]{3}$/.test(String(value || '').toUpperCase())) {
callback(new Error('电报码格式不正确或已存在'));
callback(new Error('电报码格式不正确或已存在'));
} else {
callback();
}
@@ -246,12 +246,12 @@ export default {
change: ({ value }) => this.handleTmisChange(value),
},
{
label: '电报码',
label: '电报码',
prop: 'telegraphCode',
minWidth: 100,
maxlength: 3,
rules: [
{ required: true, message: '电报码格式不正确或已存在', trigger: 'blur' },
{ required: true, message: '电报码格式不正确或已存在', trigger: 'blur' },
{ validator: validateTelegraphCode, trigger: 'blur' },
],
change: ({ value }) => this.handleTelegraphChange(value),
@@ -358,7 +358,10 @@ export default {
formslot: true,
minWidth: 130,
overHidden: false,
rules: [{ validator: validateLongitude, trigger: 'blur' }],
rules: [
{ required: true, message: '请输入经度', trigger: 'blur' },
{ validator: validateLongitude, trigger: 'blur' },
],
},
{
label: '纬度',
@@ -366,7 +369,10 @@ export default {
formslot: true,
minWidth: 130,
overHidden: false,
rules: [{ validator: validateLatitude, trigger: 'blur' }],
rules: [
{ required: true, message: '请输入纬度', trigger: 'blur' },
{ validator: validateLatitude, trigger: 'blur' },
],
},
{
label: '行政区划编号',
@@ -448,9 +454,8 @@ export default {
editDisplay: false,
dicData: [
{ label: '全部', value: '' },
{ label: '初始化导入', value: '初始化导入' },
{ label: '批量', value: '批量' },
{ label: '手动', value: '手动' },
{ label: '批量导入', value: '批量' },
{ label: '手动导入', value: '手动' },
],
},
],
@@ -661,14 +666,14 @@ export default {
return row;
},
validateCoordinateFields(row) {
const longitudeMessage = getCoordinateValidationMessage(row.longitude, 'longitude');
const longitudeMessage = getCoordinateValidationMessage(row.longitude, 'longitude', true);
if (longitudeMessage) {
this.$message.warning('经度范围不正确');
this.$message.warning(longitudeMessage);
return false;
}
const latitudeMessage = getCoordinateValidationMessage(row.latitude, 'latitude');
const latitudeMessage = getCoordinateValidationMessage(row.latitude, 'latitude', true);
if (latitudeMessage) {
this.$message.warning('纬度范围不正确');
this.$message.warning(latitudeMessage);
return false;
}
return true;
@@ -689,13 +694,13 @@ export default {
return Promise.reject(new Error('该TMIS编码已存在'));
}
if (telegraphExists) {
return Promise.reject(new Error('电报码格式不正确或已存在'));
return Promise.reject(new Error('电报码格式不正确或已存在'));
}
return Promise.resolve();
});
},
handleSubmitError(error, loading) {
const uniqueMessages = ['该TMIS编码已存在', '电报码格式不正确或已存在'];
const uniqueMessages = ['该TMIS编码已存在', '电报码格式不正确或已存在'];
if (uniqueMessages.includes(error.message)) {
this.$message.warning(error.message);
}
@@ -776,10 +781,18 @@ export default {
});
},
beforeOpen(done, type) {
const tmisCodeColumn = this.findColumn('tmisCode');
if (tmisCodeColumn) {
// Avue
tmisCodeColumn.disabled = false;
}
if (['edit', 'view'].includes(type)) {
this.regionInitializing = true;
getDetail(this.form.id).then(res => {
const detail = this.normalizeRegionForm(res.data.data || {});
if (tmisCodeColumn) {
tmisCodeColumn.disabled = type === 'edit' && Number(detail.status) === 1;
}
this.loadCityOptions(detail.provinceCode)
.then(() => {
this.ensureCityOption(detail);
@@ -845,7 +858,7 @@ export default {
});
},
handleImport() {
openImportDialog(this, '铁路车站主数据');
openImportDialog(this, '铁路车站主数据', () => this.onLoad(this.page, this.query));
},
handleExport() {
this.$confirm('是否导出铁路车站主数据?', '提示', {
+90 -64
View File
@@ -4,52 +4,44 @@
<div class="box">
<el-scrollbar>
<basic-container>
<avue-tree :option="treeOption" :data="treeData" @node-click="nodeClick" />
<avue-tree
:option="treeOption"
:data="treeData"
@node-click="nodeClick"
/>
</basic-container>
</el-scrollbar>
</div>
</el-col>
<el-col class="region-page__form-panel" :span="18">
<basic-container>
<el-form class="region-page__search" :model="searchForm" inline>
<el-form-item label="区域编码">
<el-input v-model="searchForm.code" clearable placeholder="请输入区域编码" />
</el-form-item>
<el-form-item label="区域名称">
<el-input v-model="searchForm.name" clearable placeholder="请输入区域名称" />
</el-form-item>
<el-form-item label="区域层级">
<el-select v-model="searchForm.regionLevel" clearable placeholder="请选择区域层级">
<el-option label="省份" :value="1" />
<el-option label="省市" :value="2" />
<el-option label="区县" :value="3" />
</el-select>
</el-form-item>
<el-form-item label="数据来源">
<el-select v-model="searchForm.dataSource" clearable placeholder="请选择数据来源">
<el-option label="手动录入" value="手动录入" />
<el-option label="初始化导入" value="初始化导入" />
</el-select>
</el-form-item>
<el-form-item label="启停状态">
<el-select v-model="searchForm.status" clearable placeholder="请选择启停状态">
<el-option label="启用" :value="1" />
<el-option label="停用" :value="2" />
</el-select>
</el-form-item>
<el-form-item class="region-page__search-actions">
<el-button type="primary" @click="handleSearch">搜索</el-button>
<el-button @click="handleSearchReset">清空</el-button>
</el-form-item>
</el-form>
<section-card>
<el-form class="region-page__search" :model="searchForm" inline>
<div style="display: flex; justify-content: space-between">
<el-form-item label="区域编码">
<el-input v-model="searchForm.code" clearable placeholder="请输入区域编码" />
</el-form-item>
<el-form-item label="区域名称">
<el-input v-model="searchForm.name" clearable placeholder="请输入区域名称" />
</el-form-item>
<el-form-item label="区域层级">
<el-select v-model="searchForm.regionLevel" clearable placeholder="请选择" style="width: 200px;">
<el-option label="省份" :value="1" />
<el-option label="省市" :value="2" />
<el-option label="区县" :value="3" />
</el-select>
</el-form-item>
</div>
<div style="display: flex; flex-direction: row; align-items: center; justify-content: flex-end;">
<el-form-item class="region-page__search-actions">
<el-button type="primary" @click="handleSearch">搜索</el-button>
<el-button @click="handleSearchReset">清空</el-button>
</el-form-item>
</div>
</el-form>
</section-card>
<el-button-group>
<el-button
v-if="permission.region_add"
type="primary"
icon="el-icon-plus"
@click="addCountry"
>新增国家
</el-button>
<el-button
v-if="permission.region_add"
type="primary"
@@ -157,10 +149,12 @@ import { openImportDialog } from '@/utils/import-excel';
import { getToken } from '@/utils/auth';
import NProgress from 'nprogress';
import 'nprogress/nprogress.css';
import SectionCard from '@/components/section-card/main.vue';
const ROOT_PARENT_CODE = '0';
export default {
components: { SectionCard },
data() {
return {
topCode: ROOT_PARENT_CODE,
@@ -171,8 +165,6 @@ export default {
code: '',
name: '',
regionLevel: undefined,
dataSource: '',
status: undefined,
},
parentOptions: [],
syncLoading: false,
@@ -182,18 +174,17 @@ export default {
treeLoad: (node, resolve) => {
const parentCode = node.level === 0 ? ROOT_PARENT_CODE : node.data.id;
getLazyTree(parentCode, this.searchForm).then(res => {
resolve(
res.data.data.map(item => {
return {
...item,
leaf: !item.hasChildren,
};
})
);
const treeData = this.normalizeTreeData(res.data.data);
if (node.level === 0) {
this.setDefaultExpandedKeys(treeData);
}
resolve(treeData);
});
},
addBtn: false,
menu: false,
defaultExpandAll: false,
defaultExpandedKeys: [],
size: 'default',
props: {
labelText: '标题',
@@ -260,6 +251,12 @@ export default {
prop: 'regionLevel',
type: 'radio',
dicUrl: '/blade-system/dict/dictionary?code=region',
dicFormatter: response => {
const list = Array.isArray(response) ? response : response?.data;
return (Array.isArray(list) ? list : [])
.filter(item => Number(item.dictKey) !== 0)
.map(item => ({ ...item, dictKey: Number(item.dictKey) }));
},
props: {
label: 'dictValue',
value: 'dictKey',
@@ -411,9 +408,7 @@ export default {
computed: {
...mapGetters(['permission']),
isCountryRegion() {
return (
Number(this.regionForm.regionLevel) === 0 || this.regionForm.parentCode === this.topCode
);
return Number(this.regionForm.regionLevel) === 0;
},
isProvinceRegion() {
return Number(this.regionForm.regionLevel) === 1;
@@ -438,14 +433,27 @@ export default {
},
},
methods: {
normalizeTreeData(data) {
return data.map(item => {
return {
...item,
leaf: !item.hasChildren,
};
});
},
setDefaultExpandedKeys(treeData) {
const valueKey = this.treeOption.props.value;
this.treeOption.defaultExpandedKeys = treeData
.filter(item => item.hasChildren)
.map(item => item[valueKey]);
},
initTree() {
this.treeData = [];
getLazyTree(this.topCode, this.searchForm).then(res => {
this.treeData = res.data.data.map(item => {
return {
...item,
leaf: !item.hasChildren,
};
const treeData = this.normalizeTreeData(res.data.data);
this.treeData = treeData;
this.$nextTick(() => {
this.setDefaultExpandedKeys(treeData);
});
});
},
@@ -458,8 +466,6 @@ export default {
code: '',
name: '',
regionLevel: undefined,
dataSource: '',
status: undefined,
};
this.handleSearch();
},
@@ -498,6 +504,10 @@ export default {
this.$message.warning('请先选择一项区划');
return;
}
if (Number(this.regionForm.regionLevel) >= 3) {
this.$message.warning('区县已是末级,不能新增下级');
return;
}
const parentCode = this.regionForm.code;
const parentName = this.regionForm.name;
const parentGroupCode = this.regionForm.parentCode || this.topCode;
@@ -508,8 +518,7 @@ export default {
this.regionForm.subCode = '';
this.regionForm.originalCode = '';
this.regionForm.name = '';
this.regionForm.regionLevel =
this.regionForm.regionLevel === 5 ? 5 : this.regionForm.regionLevel + 1;
this.regionForm.regionLevel = Number(this.regionForm.regionLevel) + 1;
this.loadParentOptionsByGroup(parentGroupCode, parentCode, parentName);
},
setRegionColumnDisplay(prop, display) {
@@ -628,9 +637,14 @@ export default {
},
handleImport() {
this.syncImportAction();
openImportDialog(this, '行政区划', () => {
this.initTree();
});
openImportDialog(
this,
'行政区划',
() => {
this.initTree();
},
{ timeout: 300000 }
);
},
syncImportAction() {
const column = this.findColumn(this.excelOption.column, 'excelFile');
@@ -750,4 +764,16 @@ export default {
max-width: 100%;
}
}
.el-form--inline .el-form-item{
margin-right: 10px !important;
}
.region-page__tree-panel .avue-tree__filter{
padding: 0 !important;
}
.el-button-group--horizontal{
margin-bottom: 12px !important;
}
.el-form-item{
margin-bottom: 9px !important;
}
</style>
+59 -8
View File
@@ -113,7 +113,7 @@
:maxlength="getCargoCodeMaxLength()"
show-word-limit
placeholder="请输入"
:disabled="dialogReadonly || dialogType === 'edit'"
:disabled="dialogReadonly"
@input="handleCargoCodeInput"
>
<template v-if="getCargoCodePrefix()" #prepend>
@@ -130,11 +130,13 @@
placeholder="请输入"
:disabled="dialogReadonly"
@input="handleCargoValueInput"
@blur="handleCargoValueBlur"
/>
<el-select
v-model="form.priceUnit"
clearable
:disabled="dialogReadonly"
:loading="priceUnitLoading"
placeholder="请选择"
>
<el-option
@@ -147,6 +149,10 @@
</div>
</template>
<template #cargoValue="{ row }">
{{ formatCargoValue(row.cargoValue) }}
</template>
<template #menu="{ row, index }">
<el-link
type="primary"
@@ -196,8 +202,8 @@ import * as api from '@/api/business/common-cargo';
import { getList as getCargoTypeList } from '@/api/base/cargo-type';
import { exportBlob } from '@/api/common';
import { getDeptTree } from '@/api/system/dept';
import { config, excelOption, option } from '@/option/business/common-cargo';
import { priceUnitOptions } from '@/option/business/common';
import { config, excelOption, formatCargoValue, option } from '@/option/business/common-cargo';
import { getDictionary } from '@/api/system/dictbiz';
import { getToken } from '@/utils/auth';
import { openImportDialog } from '@/utils/import-excel';
import { downloadXls } from '@/utils/util';
@@ -211,7 +217,8 @@ export default {
api,
config,
option,
priceUnitOptions,
priceUnitOptions: [],
priceUnitLoading: false,
form: {},
query: {},
loading: true,
@@ -254,8 +261,10 @@ export default {
},
created() {
this.initDeptTree();
this.loadPriceUnitOptions();
},
methods: {
formatCargoValue,
hasPermission(code) {
return this.isAdmin || this.validData(this.permission && this.permission[code], false);
},
@@ -273,6 +282,28 @@ export default {
}
});
},
loadPriceUnitOptions() {
this.priceUnitLoading = true;
getDictionary({ code: 'unit_fee' })
.then(res => {
const payload = res?.data?.data || res?.data || [];
const list = Array.isArray(payload) ? payload : payload.records || payload.data || [];
this.priceUnitOptions = list
.map(item => ({
label: item.dictValue || item.label || item.name || item.dictKey || item.value,
value: item.dictKey || item.value || item.dictValue || item.name,
}))
.filter(item => item.label && item.value);
if (this.dialogType === 'add' && !this.form.priceUnit && this.priceUnitOptions.length) {
this.form.priceUnit = this.priceUnitOptions[0].value;
}
const priceUnitColumn = this.findColumn(this.option.column, 'priceUnit');
if (priceUnitColumn) priceUnitColumn.dicData = this.priceUnitOptions;
})
.finally(() => {
this.priceUnitLoading = false;
});
},
flattenDept(tree, level = 0) {
const result = [];
tree.forEach(item => {
@@ -389,6 +420,9 @@ export default {
const decimal = parts.slice(1).join('').slice(0, 2);
this.form.cargoValue = parts.length > 1 ? `${integer}.${decimal}` : integer;
},
handleCargoValueBlur() {
this.form.cargoValue = formatCargoValue(this.form.cargoValue);
},
normalizeRow(row) {
const submitRow = { ...row };
Object.keys(submitRow).forEach(key => {
@@ -399,14 +433,23 @@ export default {
if (submitRow.cargoValue !== undefined && submitRow.cargoValue !== null) {
submitRow.cargoValue = String(submitRow.cargoValue).trim();
}
if (!submitRow.cargoValue || String(submitRow.cargoValue) === '-1') {
const cargoValue = submitRow.cargoValue;
if (
cargoValue === undefined ||
cargoValue === null ||
String(cargoValue).trim() === '' ||
String(cargoValue) === '-1'
) {
submitRow.cargoValue = null;
} else {
submitRow.cargoValue = formatCargoValue(submitRow.cargoValue);
}
return submitRow;
},
normalizeCargoValue(row) {
if (row && String(row.cargoValue) === '-1') {
row.cargoValue = null;
if (row && Object.prototype.hasOwnProperty.call(row, 'cargoValue')) {
const formatted = formatCargoValue(row.cargoValue);
row.cargoValue = formatted || null;
}
return row;
},
@@ -445,6 +488,14 @@ export default {
this.$message.warning('货值只能输入数字,最多保留2位小数');
return false;
}
if (!row.model) {
this.$message.warning('请输入型号');
return false;
}
if (row.model.length > 50) {
this.$message.warning('型号不能超过50个字符');
return false;
}
if (row.remark && row.remark.length > 200) {
this.$message.warning('备注不能超过200个字符');
return false;
@@ -539,8 +590,8 @@ export default {
this.dialogType = type || 'add';
if (type === 'add') {
this.form = {
priceUnit: '元/吨',
...this.form,
priceUnit: this.priceUnitOptions[0]?.value || this.form.priceUnit || '',
};
this.loadFirstCargoTypeOptions();
done();
+16 -1
View File
@@ -288,7 +288,10 @@
搜索
</el-button>
</div>
<div ref="routeAmap" class="common-route-page__map"></div>
<div class="map-picker-content">
<map-search-results :results="routeMapSearchResults" @select="selectRouteMapSearchResult" />
<div ref="routeAmap" class="common-route-page__map"></div>
</div>
<div class="common-route-page__map-info">
<span>{{ routeMapStatus }}</span>
<span v-if="routeMapSelected.regionName"
@@ -359,6 +362,7 @@ export default {
routeMapKeyword: '',
routeMapStatus: '可搜索地址或点击地图选点',
routeMapSelected: {},
routeMapSearchResults: [],
routeAmap: null,
routeAmapMarker: null,
routeAmapGeocoder: null,
@@ -612,6 +616,12 @@ export default {
})
.then(() => this.runAmapGeocode('location', keyword))
.then(result => {
this.routeMapSearchResults = (result.geocodes || []).map((item, index) => ({
id: item.id || index,
name: item.formattedAddress || keyword,
address: item.formattedAddress || keyword,
location: item.location,
}));
const point = this.resolveMapPoint(result);
if (!point) {
this.routeMapStatus = '未找到匹配地址';
@@ -628,6 +638,11 @@ export default {
this.routeMapLoading = false;
});
},
selectRouteMapSearchResult(item) {
if (item && item.location) {
this.pickRouteMapPoint(item.location, item.address || item.name || '');
}
},
pickRouteMapPoint(lnglat, keyword) {
const longitude = this.getPointLng(lnglat);
const latitude = this.getPointLat(lnglat);

Some files were not shown because too many files have changed in this diff Show More