Compare commits
72 Commits
429b5548dd
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 6212d68a77 | |||
| ce1ce02551 | |||
| 3a8442e522 | |||
| ac87208ba9 | |||
| 815810f841 | |||
| 4e04cdbc5b | |||
| 57368f0179 | |||
| 7078de6385 | |||
| 4af9afda61 | |||
| 50ab33f369 | |||
| bcbc45bb03 | |||
| ff9fb9168b | |||
| 986feff7b7 | |||
| 3e7110ca8c | |||
| b4e12a671f | |||
| 5bb072223f | |||
| 3d6e297147 | |||
| 82fbb99593 | |||
| 17c482e21a | |||
| 2684624979 | |||
| 84d9e098ba | |||
| c1c4fa18c9 | |||
| 6a87066097 | |||
| 79aa4f9fae | |||
| f1e2313e4c | |||
| acbc9d3322 | |||
| dbeb174ae2 | |||
| 764c0f4581 | |||
| 2131e99ec4 | |||
| 6e5b15f203 | |||
| fbfd5cde89 | |||
| 1a9cd55d66 | |||
| 38e53e01af | |||
| 6ff672211f | |||
| 1bbc97758d | |||
| c1813e308f | |||
| 716ce43862 | |||
| 14c6ad0a31 | |||
| 1972115173 | |||
| 006dc95bf0 | |||
| d187da68d2 | |||
| 70bb94a2e6 | |||
| f78e61b433 | |||
| 508d73fc0d | |||
| e73e1da877 | |||
| 4d5b99da82 | |||
| f3021d4bae | |||
| 7eb6cce2db | |||
| be2888d428 | |||
| 06f6950434 | |||
| 09f1af9a0a | |||
| 6d4961f404 | |||
| cba2ad3b3b | |||
| a7315b4491 | |||
| 0d070d4b34 | |||
| 6a6d10dc79 | |||
| 3bac9b6472 | |||
| 96f2fa0eb5 | |||
| e789f1647a | |||
| c63c7c3e33 | |||
| 23b23dc8e5 | |||
| a0a3d53927 | |||
| 42e4925fd6 | |||
| 024e77801e | |||
| 397490a165 | |||
| 9e14f31604 | |||
| 40925cb21f | |||
| 6f0f1842cb | |||
| 685a37b2df | |||
| b83e3c358d | |||
| 94da08e7a7 | |||
| 008ec7a6a8 |
@@ -50,3 +50,138 @@
|
|||||||
- 问题:项目新增/编辑表单(含独立表单页 `/business/project-apply/form`)中,业务部门、承办部门两个 `el-cascader` 的按钮宽度与同行的 select/input 不一致。
|
- 问题:项目新增/编辑表单(含独立表单页 `/business/project-apply/form`)中,业务部门、承办部门两个 `el-cascader` 的按钮宽度与同行的 select/input 不一致。
|
||||||
- 根因:scoped 样式里强制 100% 宽度的控件列表(`el-input` / `el-select` / `el-tree-select` / `el-date-editor`)漏了 `el-cascader`,导致级联选择器按内容宽度收缩,未填满栅格列。
|
- 根因: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。
|
- 修复:`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,与代码无关)。
|
||||||
|
|||||||
@@ -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)`。
|
||||||
@@ -0,0 +1,215 @@
|
|||||||
|
|
||||||
|
## 付款比例设置提示改为 tooltip(contract-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: normal(stretch 方案)
|
||||||
|
- 最终写法(`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 各列加 placeholder(projectCode/undertakeDeptName/projectFundLimit/usedFundLimit/remainingFundLimit/remark=请输入,validUntil=请选择),视图 formslot 自定义控件(projectName select、applyLimit input)placeholder 同步改。
|
||||||
|
|
||||||
|
## 【项目管理】列表增加「项目资金使用预警」(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}/fundRiskTagOptions;onLoad 追加 `fundUseRisk` 筛选参数 + 成功后 refreshFundRiskStats;新增 changeFundRiskScope(再次点击取消)、refreshFundRiskStats;searchReset 清空风险筛选。
|
||||||
|
- 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 经常不传播)。
|
||||||
|
|
||||||
|
## 合同格式下拉改读业务字典 contractFormat(contract-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. formRules:drivingLicenseEndDate / roadTransportCertEndDate 由 required 改为 validator(新增 validateDrivingLicenseEndDate / validateRoadTransportCertEndDate,longTerm===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 useDepartment;validate() 加长度≤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.vue,3 段 → 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=8(3 列布局)**:车牌号、车辆类型、外廓尺寸、核定载质量、准牵引总质量、业务关系、能源类型、强制报废日期、海关备案号、所有组织、使用部门。
|
||||||
|
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.vue,16: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 空 → 下拉显示「无数据」,主人截图反馈),已补回 data(customerTypeOptions 之后)。其余 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 customerKind,type select,dicData 内外部,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 内容高 151px)label 文字贴顶,普通 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 容器默认 stretch,label(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:前端已定义 getFundRiskStats(api/business/project-apply.js:13),后端未实现;方案已给(后端补 R<{high,medium}> / 前端 catch 降级),待主人选。
|
||||||
|
- vehicle.vue 认证审核弹窗重排对齐新增弹窗:取消独立「尺寸重量」卡片,外廓尺寸改长/宽/高组合(span12,dimension-group);基础信息 3 行×4 列(车牌号/车辆类型/外廓尺寸;载质量/牵引质量/业务关系/能源类型;强制报废日期/海关备案号/所有组织/使用部门);证件信息按新增「车辆资质图片」行分布(止+运输证号+止+年审 / 登记编号+登记日期+档案编号+行驶证起 / 运输证起 / 备注整行);label「所属组织」改「所有组织」对齐新增;dimension-group 样式复制进 .certification-audit 作用域。@vue/compiler-sfc 编译校验通过。
|
||||||
|
- vehicle.vue 行驶证有效期必填星号:原规则是纯 validator(Element Plus 不渲染星号),改为 data 内 baseRules + computed formRules,drivingLicenseEndDate 动态返回 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-head(flex space-between 同排),与「其它附件/计费信息」分区一致;删除无引用的 .attachment-head 样式。
|
||||||
|
- contract-manage-change.vue「自动生成结算单」问号提示图标位置:原 icon 夹在开启/关闭 radio 之间,因 .el-radio 默认 margin-right:32px 导致离开启远、贴关闭;修复 = 开启 radio margin-right 清零 + icon margin 改 0 32px 0 8px。
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
# 2026-09-10
|
||||||
|
|
||||||
|
- 移除 project-apply 的 fund-risk-stats 请求(后端未实现端点,每次列表加载都弹 No endpoint 报错):删除 onLoad 内 refreshFundRiskStats 调用与该方法、data 中 fundRiskStats;头部风险标签去掉「(数量)」只留「高风险/中风险」;api/business/project-apply.js 保留 getFundRiskStats 定义并注释「后端就绪后恢复」。
|
||||||
|
EOF2
|
||||||
|
}
|
||||||
|
cat >> /Users/gxwebsoft/VUE/tms-erp-web-ws/.workbuddy/memory/2026-09-10.md <<'EOF'
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
# 2026-09-11
|
||||||
|
|
||||||
|
## 上传证件区域固定宽度导致跨机器错位(transportCapacity)
|
||||||
|
- 现象:driver.vue 新增弹窗的身份证/大头照上传框在本机对齐,他人电脑不对齐。
|
||||||
|
- 根因:`--large` 上传框写死 `width:240px`(ship 写 248px),而弹窗 `width:90%` + `el-col :span=6` 列宽是弹性的、上方输入框 `width:100%`;列宽随分辨率 / Windows 系统缩放 / 浏览器缩放变化,240px 只在特定宽度下恰好等于列宽。叠加 `labelWidth:auto` 靠 JS 实测字体(苹方 vs 微软雅黑)宽度,label 列宽也不同 → 起始位置漂移。
|
||||||
|
- 修复:三个文件改为 `width:100%; max-width:240px; flex:none`(ship 保留 248px 上限),窄屏跟随列宽、宽屏保持比例上限,左边缘恒与输入框对齐。
|
||||||
|
- `src/views/transportCapacity/driver.vue`(.driver-uploader--large)
|
||||||
|
- `src/views/transportCapacity/vehicle.vue`(.vehicle-uploader--large)
|
||||||
|
- `src/views/transportCapacity/ship.vue`(.ship-uploader--large)
|
||||||
|
- 用 @vue/compiler-sfc(脚本放项目根目录)验证三个 SFC 编译通过。
|
||||||
|
- 教训:本项目所有「固定 px 宽度的上传/控件」都要配 `max-width` + `width:100%`,否则高分屏/低分屏下必然错位。
|
||||||
|
|
||||||
|
## 合同详情由弹窗改为独立页面(contract-manage)
|
||||||
|
- 路由:新增 `/business/contract-manage/detail`(`src/router/views/index.js`,name『合同详情』,meta `keepAlive:false` + `activeMenu:'/business/contract-manage'`),组件仍复用 `contract-manage.vue`(与 form 页同一套路)。
|
||||||
|
- 页面内三分支:`v-if="!isFormPage && !isDetailPage"`(列表)/ `v-else-if="isFormPage"`(表单)/ `v-else`(详情)。**v-else 必须紧邻 form 分支的 `</template>`**,中间不能插其它组件,否则 Vue 编译报「v-else 无相邻 v-if」——弹窗类组件(billing-plan-editor / 附件预览 / 变更记录详情 / 流程)放在三个分支之后。
|
||||||
|
- 关键改动:`openDetail` 改 `router.push({ path:'/business/contract-manage/detail', query:{ id, name } })`;新增 `initDetailPage()`(按 query.id 拉详情,`resetDetailState()` 先清空)、`closeDetailPage()`(closeTag + 回列表)、`isDetailPage` / `detailPageTitle` computed;`created` 与 `$route.fullPath` watch 都要加 `else if (this.isDetailPage)`。
|
||||||
|
- 样式:`.contract-manage-detail--page { max-height:none; overflow:visible }`,去掉弹窗的 74vh 限制;底栏复用 `.contract-manage-page__footer`(fixed 浮动),只读详情页按钮保留「关闭」。
|
||||||
|
- 校验方式:dev server 已运行时 `curl "http://localhost:2889/src/views/business/contract-manage.vue"` 返回 200 即 Vite 编译通过(比整包 build 快)。
|
||||||
|
|
||||||
|
## 只给「查看弹窗」加宽 label(temporary-credit-limit)
|
||||||
|
- 场景:详情页长 label(「剩余项目资金使用额度(万元)」)换行超 2 行撑坏详情表格,但又不能影响新增/编辑页。
|
||||||
|
- **关键发现:Avue 的 `avue-form` 在 detail 模式下根节点会挂 `.avue--detail` 类**(源码 `node_modules/@smallwei/avue/lib/packages/element-plus/form/index3.js` 中 `class: normalizeClass([b(), { 'avue--detail': isDetail }])`)。所以「只针对详情态」的选择器就是:
|
||||||
|
```scss
|
||||||
|
.temporary-credit-limit-dialog .avue--detail .el-form-item__label { width:210px !important; flex:0 0 210px !important; }
|
||||||
|
```
|
||||||
|
新增/编辑弹窗无 `.avue--detail`,天然不受影响,不需要在 option 里做 mode 判断。
|
||||||
|
- 校验样式块编译:dev server 请求 `?vue&type=style&index=1&lang.scss`(**lang 必须写 scss,写 css 会 500**),grep 规则确认产物。
|
||||||
|
- 结论备忘:长 label 优先「加宽 + 换行 ≤2 行」,不要用单行省略 + tooltip —— 详情是纯阅读场景,hover 才能看全字段名的可发现性差。
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
# 2026-09-17 工作日志
|
||||||
|
|
||||||
|
## 配载管理(loading-manage):弹窗全部改为独立表单页/详情页
|
||||||
|
|
||||||
|
- 需求:`/business/loading-manage` 不再用弹窗,改成与新增合同(`/business/contract-manage/form?mode=add&name=新增合同管理`)一致的独立页面。
|
||||||
|
- 现状:新增/编辑**已经**是独立页(组件内 `isStandaloneFormPage` + `/business/loading-manage/form` 路由),但「详情」和「重新派单」仍是 el-dialog(用户截图即详情弹窗)。
|
||||||
|
- 改动(3 个文件):
|
||||||
|
1. `src/router/views/index.js`:新增 `/business/loading-manage/detail`(name 配载单详情,`meta.keepAlive:false, activeMenu:'/business/loading-manage'`),组件仍是 `loading-manage.vue`。
|
||||||
|
2. `src/views/business/loading-manage.vue`:
|
||||||
|
- computed 新增 `isStandaloneDetailPage`(path==='/business/loading-manage/detail')、`isStandalonePage`(form|detail 并集,作为隐藏列表容器的统一开关)、`detailPageTitle`、`formPageDefaultTitle`(add/edit/reassign 映射);`isStandaloneFormPage` 放行 `mode=reassign`。
|
||||||
|
- 模板中所有控制「是否独立页/是否弹窗」的 `isStandaloneFormPage` 改为 `isStandalonePage`;顶部标题按详情/表单取 `detailPageTitle`/`formPageTitle`。
|
||||||
|
- 新增 `gotoLoadingDetail(row)`(push `/detail?id=&name=配载单详情`,替换「配载单号」链接与操作列「详情」)、`gotoLoadingReassign(row)`(push `/form?mode=reassign&id=&name=重新派单`)、`initStandaloneDetailPage()`;`initStandaloneFormPage` 模式透传 edit/reassign;`openLoadingDialog` 对 add/edit/reassign 一律转独立页;`closeLoadingDialog` 判据改 `isStandalonePage`。
|
||||||
|
- `mounted` / `watch $route` 增加详情页分支(直接打开与页内切换都要 init);detail 分支除 id 变化外,`dialogMode !== 'view'` 也重新 init(防止从表单页切详情时残留表单态)。
|
||||||
|
- 兼容旧链接:`/business/loading-manage?detailId=x` 仍可用,会 replace 到详情页。
|
||||||
|
- 样式:底栏去掉写死的 `gap:8px`(全站统一 12px);页面模式的内容区解除 `max-height:78vh` 内嵌滚动盒 —— 原 `:global(.loading-manage-form-page .loading-manage-dialog__body)` 权重 (0,2,0) 低于 scoped 规则 (0,3,0) 一直没生效,改为 `.loading-manage-page .loading-manage-form-dialog.loading-manage-form-page .loading-manage-dialog__body` (0,4,0),内容改随 `#avue-view` 自然滚动(与合同页一致)。
|
||||||
|
3. `src/views/business/components/waybill-manage-page.vue`:`openLoadingDetail` 由 `/business/loading-manage?detailId=` 改为 push `/business/loading-manage/detail?id=&name=配载单详情`。
|
||||||
|
- 校验:dev server(2889)单独编译 4 个模块均 HTTP 200(含 scoped scss);`vite build` 仍会在无关文件 `src/page/login/facelogin.vue` 被沙箱敏感内容保护中断。
|
||||||
|
- 踩坑:**`<style scoped lang="scss">` 顶层写 `//` 注释**会让该样式模块编译 500(`Unexpected '/'. Escaping special characters with \ may help.`),已实测确认;顶层必须用 `/* */`。
|
||||||
|
- 未做:登录态无法在浏览器实测(无测试账号),需用户点 `/business/loading-manage` → 详情/重新派单 自测;`voucher-manage-detail` 跳配载时带的 `?loadingNo=` 参数本来就未被列表消费(历史遗留)。
|
||||||
|
|
||||||
|
## 运单管理详情:打卡时间轴改为按打卡顺序展示
|
||||||
|
|
||||||
|
- 文件:`src/views/business/components/waybill-manage-page.vue`(详情页「执行详情 → 打卡详情」tab)
|
||||||
|
- 需求:时间轴不再固定按流程节点顺序(发货/在途/到货/卸货/签收/回单),改为按打卡时间先后展示。
|
||||||
|
- 实现(不改后端、不改原始数据):
|
||||||
|
1. 新增 computed `orderedWaybillPunchRecords`:映射出 `punchedAt`(毫秒时间戳)后排序 —— **已打卡记录按打卡时间升序排在前**,未打卡记录保持后端返回的节点顺序排在其后;时间相同用原索引稳定排序。
|
||||||
|
2. 新增 method `waybillPunchRecordTimestamp(record)`:`punched === false` 或 `statusName === '未打卡'` 直接返回 null(防止后端返回计划时间造成误序);优先 `this.$dayjs(text).valueOf()`,失败兜底 `new Date(text.replace(/-/g,'/'))`(兼容 Safari)。
|
||||||
|
3. 模板 `el-timeline` 的 `v-for` 改用 `orderedWaybillPunchRecords`;`key` 由 `record.nodeCode || record.id || index` 改为 `${nodeCode||id||'punch'}-${index}`,避免同节点多次打卡(在途)时 key 重复。
|
||||||
|
- 校验:项目根目录临时脚本 `_verify-sfc.mjs`(@vue/compiler-sfc parse + compileScript + compileTemplate)通过,已删除脚本。
|
||||||
|
- 注意:`getPunchRecords`(`src/api/business/waybill-manage.js` → `/punch-records`)后端未提供节点排序字段,排序只能在前端做。
|
||||||
|
|
||||||
|
## 保险记录批量导入:前端归一化日期格式
|
||||||
|
|
||||||
|
- 文件:`src/views/vehicle/insurance-record.vue`(仅此一个文件)
|
||||||
|
- 背景:保险记录批量导入是**后端驱动**——前端 `handleImport` 经 `importBlob` 把原始 Excel 直接 POST 到 `/blade-transport/insurance-record/import-insurance-record`,前端不解析行。后端只认 `2026-09-01`,`2026-9-1` 导入失败。
|
||||||
|
- 决策:用户选择**前端归一化**(不动后端)。把 `openImportDialog` 改为自写 `httpRequest`:用 `xlsx` 读取 Excel → 把日期列(开始日期/结束日期/开票日期)`2026-9-1` 归一为 `2026-09-01` → 重写成新 File 再交给 `handleImportExcel` 上传;复用其失败明细下载与成功刷新逻辑。无日期列时回退为原文件(行为不变)。
|
||||||
|
- 关键方法:`normalizeExcelDates` / `readExcelRows` / `writeExcelFile` / `normalizeDateString`(正则 `^(\d{4})[-/.年](\d{1,2})[-/.月](\d{1,2})日?$`,用 `new Date` 校验合法性后补零;非法/已标准格式返回 null 保持原值)。
|
||||||
|
- 校验:本机 dev(localhost:2889)待用户部署自测。注意所有单元格经 `sheet_to_json(raw:false)` 后均为字符串,与 transport-plan-import 的客户端解析模式一致。
|
||||||
|
|
||||||
|
## 车/船务模块导出 xlsx「创建时间/更新时间」为空(后端 tms-api 修复)
|
||||||
|
|
||||||
|
- 现象:`/vehicle/insurance-record` 批量导出的 xlsx 里「创建时间」「更新时间」两列空白,「更新人」有值。用户要求车/船务模块所有页面统一修。
|
||||||
|
- 定位:导出由**后端**生成(前端只传查询参数,`exportColumns` 参数后端未使用)。实测 `~/Downloads/保险记录2026-09-17 20_46_08.xlsx`:K/M 列单元格无 `<v>` 节点(值 null),E/F/J 日期列是数值 46266.0(带 numFmt `yyyy-MM-dd`,WPS 显示为日期)。
|
||||||
|
- 根因:Service 用 BladeX `org.springblade.core.tool.utils.BeanUtil`(**继承 Spring `BeanUtils`**)做 `copyProperties`。实体 `TenantEntity.createTime/updateTime` 是 `java.util.Date`,导出类字段是 `java.time.LocalDateTime` → Spring BeanUtils **类型不兼容静默跳过**,值为 null。而「更新人」是手动 `UserCache.getUserRealName(...)` 赋值的,所以有值。(Hutool 的 BeanUtil 能转 Date→LocalDateTime,但本项目用的是 BladeX 版本,不能。)
|
||||||
|
- 佐证:项目里正常的导出(Waybill / LoadingManage / CustomerArchive / CommonCargo)时间字段一律用 `java.util.Date`,并在 Service 里手动 `excel.setCreateTime(record.getCreateTime())`。
|
||||||
|
- 修复(后端仓库 `/Users/gxwebsoft/JAVA/tms-api`,blade-transport 模块):在 13 个导出方法里补显式赋值(Date→LocalDateTime 用 BladeX `DateUtil.fromDate`,`Func.isEmpty` 判空),不改 Excel 类字段类型(避免影响自定义 converter 与导入模板)。
|
||||||
|
```java
|
||||||
|
excel.setCreateTime(Func.isEmpty(x.getCreateTime()) ? null : DateUtil.fromDate(x.getCreateTime()));
|
||||||
|
excel.setUpdateTime(Func.isEmpty(x.getUpdateTime()) ? null : DateUtil.fromDate(x.getUpdateTime()));
|
||||||
|
```
|
||||||
|
- 涉及文件(13 个 Service + 1 新建 Excel 类 + 设备台账 controller/接口):InsuranceRecord / ViolationRecord / MaintenanceRecord / MaintenancePlan / TireReplacementRecord / AccidentRecord / AnnualInspectionRecord / MileageRecord / TransportChangeRecord / EtcRecord / OilElectricRecord / OtherExpenseRecord / EquipmentLedger。
|
||||||
|
- 设备台账特殊:原 `EquipmentLedgerExcel` 根本没有审计列(前端列表有),新建 `EquipmentLedgerExportExcel extends EquipmentLedgerExcel`(创建时间/更新人/更新时间),导出链路改用新类,**导入模板仍用旧类不受影响**。
|
||||||
|
- 未验证:本机无 mvn(仅 IDEA 内置),且离线模式缺 `blade-bom` 无法编译;用 javap 确认 `DateUtil.fromDate(Date)` 存在 + 逐行 grep 复核代替。需用户在 IDEA 里编译并重新部署后自测。
|
||||||
|
- 同类隐患(本次未改,其他模块):TemporaryCreditLimit、ProcessConfig、CommonRoute、CommonAddress、ContractManage、ProjectApply、ShippingTemplate 的导出 Excel 也是 LocalDateTime 且未手动 set 时间。
|
||||||
|
|
||||||
|
## 保险记录保额 -1 问题排查(未结案,待用户验证 DB 环境)
|
||||||
|
|
||||||
|
- 症状:新增弹窗保额不填 → 再开编辑弹窗显示 -1,触发「不能小于 0」校验。
|
||||||
|
- 已排除:前端(源码/dist 构建/git 全历史)、后端 tms-api + tms-erp-api-ws(源码/编译产物 javap/git 历史)均无任何 -1 赋值逻辑;保额为 formslot el-input,空值传 ''。
|
||||||
|
- 关键链路:编辑弹窗 beforeOpen 走 `/detail` 接口(getOne 原生查询),**不经过**列表 SQL 的 `CASE WHEN insured_amount<0 THEN 0` 兜底——所以表格显示 0、弹窗显示原始值。
|
||||||
|
- 数据库截图(用户 Navicat):该行 insured_amount=NULL,全表无负数 → 说明用户浏览的库与后端实际连接的库**不是同一个/DDL 不一致**。系统存在「空数值=-1」惯例(MaintenanceRecordMapper 里程 `CASE WHEN mileage=-1 THEN NULL`;前端 waybill-manage.js/process-config.js 均有 `Number(v)===-1?'':v` 掩码)→ 后端真实库的 insured_amount 列默认值很可能是 -1,MP 插入排除 null 列 → 默认值 -1 入库。
|
||||||
|
- 待验证:在后端 Nacos 数据源指向的库执行 `SHOW CREATE TABLE blade_insurance_record` + `SELECT insured_amount FROM blade_insurance_record WHERE policy_no='11111' AND vehicle_no='沪AE31312'`。
|
||||||
|
- 修复方案(待确认):1) ALTER 列默认值改 NULL + UPDATE 存量负数为 NULL;2) 前端 beforeOpen 对 insuredAmount/premium 做 null/-1 → '' 归一(参照 waybill-manage normalizeNumericDisplayValue);3) 列表 SQL 的 CASE 兜底与 detail 不一致,可顺手统一。
|
||||||
@@ -0,0 +1,122 @@
|
|||||||
|
# 2026-09-18
|
||||||
|
|
||||||
|
## 修复:改成独立整页后点左侧菜单仍弹出旧弹窗(loading-manage / project-apply)
|
||||||
|
|
||||||
|
**现象**:配载单管理、项目管理已改为「新增/编辑/详情走独立整页」,但从独立页返回或直接点左侧菜单时,页面上仍会盖出一个老的 `el-dialog`(新增项目管理 / 配载单)。
|
||||||
|
|
||||||
|
**根因**(已读 Vue runtime-core 源码确认):
|
||||||
|
- `src/router/tab.js` 按 `tabKey`(默认 fullPath)为每个标签建一个具名 wrapper 组件放进 `wrapperMap`,`src/page/index/layout.vue` 用 `<keep-alive :include="$store.getters.tagsKeep">` 缓存 —— 每个标签页一个实例,全部缓存不销毁。
|
||||||
|
- 组件被 deactivate 后**仍会随 `$route`(全局响应式)重新渲染**;此时 `isStandalonePage` 变 false,`<component :is="isStandalonePage ? 'div' : 'el-dialog'">` 由 div 翻回 `el-dialog`,而 `v-model`(`projectBox`/`dialogVisible`)仍是 true,`append-to-body` 使弹窗 Teleport 到 body。
|
||||||
|
- `KeepAlive.deactivate` 调 `move(vnode, storageContainer, ..., moveType=OUT)`,但 `TeleportImpl.move`(`moveTeleport`)忽略传入的 moveType、一律按 REORDER 处理 → **teleport 出去的 DOM 不会被搬回 storage container**,永久残留在 `document.body` 上并显示出来。
|
||||||
|
|
||||||
|
**修法**(不回退 tab.js 的 `return wrapper` 提交 c1c4fa1,改修根因):
|
||||||
|
- 独立页容器固定为 `<div v-if="isXxxPage">`,不再按路由回退成 `el-dialog`。
|
||||||
|
- 页内其它 `append-to-body` 二级弹窗加 `deactivated()` / `beforeUnmount()` → `closeInnerDialogs()` 把 v-model 置 false。
|
||||||
|
|
||||||
|
**改动文件**:
|
||||||
|
- `src/views/business/loading-manage.vue`:容器改 `<div v-if="isStandalonePage">`;删 `dialogVisible`、`dialogTitle`、`resetLoadingDialog`、`clearLoadingDialog`、页脚弹窗分支(含「清空」);`watch.$route` 简化;新增 `closeInnerDialogs()`(routeChange / commonAddress / candidateSearch)+ `deactivated`/`beforeUnmount`。
|
||||||
|
- `src/views/business/project-apply.vue`:容器改 `<div v-if="isProjectFormPage">`;删 `projectFormContainer`/`projectFormContainerProps`、`projectBox`、`resetProjectDialog`、`handleCancelProject`;`closeProjectForm` 简化为直接 push 列表;新增 `closeInnerDialogs()`(changeRecordDetail / 附件文档预览 / 图片预览 / 选人)+ `deactivated`/`beforeUnmount`。
|
||||||
|
|
||||||
|
**校验**:dev server(2889) curl 两个 .vue 及其 scoped style 模块,均 HTTP 200(500 才是编译失败)。`vite build` 因沙箱敏感内容保护会在 facelogin.vue 中断,未用。
|
||||||
|
|
||||||
|
**遗留同类风险(未改,已告知用户)**:`business/components/waybill-manage-page.vue`(`detailContainer` 在 PageDetail / el-dialog 间切)、`settlement/components/{pre,formal}-settlement-editor.vue`、`transport-reconciliation-editor.vue`(`pageMode ? 'div':'el-dialog'`)、`business/components/waybill-import-dialog.vue`(`standalone`/`createPage`)。统一修法:容器类型在 `created()` 锁定,不随路由/prop 翻转。
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 追加修复:运单详情弹窗残留(waybill-manage-page.vue)
|
||||||
|
|
||||||
|
用户复现路径:打开 `/business/waybill-manage/detail?id=xxx` → 点「配载管理」菜单 → 页面上又冒出运单详情弹窗。与上面同一根因:`detailContainer()` 随 `isStandaloneWaybillDetailPage` 在 PageDetail / el-dialog 间翻转,`:append-to-body="!isStandaloneWaybillDetailPage"` 随之为 true,`v-model="detailBox"` 仍 true → Teleport 进 body 搬不回来。
|
||||||
|
|
||||||
|
**改动**(`src/views/business/components/waybill-manage-page.vue`):
|
||||||
|
- data 新增三个锁定标志 `formPageLocked` / `detailPageLocked` / `formModeLocked`,在 `created()` 一次性从 `isStandaloneWaybillFormPage` / `isStandaloneWaybillDetailPage` / `$route.query.mode` 取值。
|
||||||
|
- 模板里所有形态判定(根 class、`v-if="!detailPageLocked"` 的列表容器、`form-page-title`、`status`、独立表单页按钮块、分页 `v-show`、`:append-to-body`、detail-page class、内容 `v-if="detailBox || detailPageLocked"`、独立页 footer / 弹窗 footer slot)全部改读锁定标志。
|
||||||
|
- `detailContainer()` / `crudContainer()` / `pageFormOption()`(含 `boxType`)改读锁定标志,避免缓存实例的 option 变形。
|
||||||
|
- 新增 `closeInnerDialogs()`(关 detailBox、里程补录、附件文档/图片预览、变更路线、常用地址、流程图、运输路线/地址/站点/地图、常用货物、货物导入、过程配置、Excel 导入)+ `deactivated()` / `beforeUnmount()`。
|
||||||
|
|
||||||
|
**关键验证**:`onDeactivated` 在子组件里也会触发 —— apiLifecycle 的 `injectHook` 会向上遍历父链,发现 KeepAlive 父级就把钩子注入到根实例(runtime-core 的 `injectToKeepAliveRoot`),所以写在子组件 waybill-manage-page 上的 `deactivated` 有效。
|
||||||
|
|
||||||
|
**校验**:dev server curl 该 .vue 与 scoped style 均 200。仍未 commit。
|
||||||
|
|
||||||
|
**未提交**:上述改动 + 上一轮 loading-manage 独立页改造均未 commit。
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 排查(未改码):配载单详情页反复弹「运单管理不存在」
|
||||||
|
|
||||||
|
用户截图:打开 `/business/loading-manage/detail?id=2097607162718441474&name=配载单详情`,连续弹出 6-7 条红色「运单管理不存在」,标签栏堆了一串「运单管理详情」。
|
||||||
|
|
||||||
|
**文案来源**:前端 src 里没有这句话,是后端 `BusinessException` 的 msg,被 `src/axios.js` 的响应拦截器(`status !== 200` → `ElMessage.error(message)`)统一弹出。
|
||||||
|
|
||||||
|
**主因(通道 A)**:`views/business/waybill-manage-detail.vue` 只有 23 行,写了 `:detail-id="$route.query.id"` —— 直接绑全局 `$route`,**没有路径守卫**。`waybill-manage-page.vue` 的 `detailId` watcher 是 `immediate` 且对任何非空 id 都 `openDetail({id})`。于是:
|
||||||
|
1. 之前打开过的每个运单详情标签(`/business/waybill-manage/detail?id=A`、`?id=B`…)各是一个被 keep-alive 缓存的独立实例;
|
||||||
|
2. 跳到配载单详情后,这些实例被 deactivate 但仍随 `$route` 重渲染 → `$route.query.id` 变成配载单 id;
|
||||||
|
3. prop 变化 → `openDetail({id: 配载单id})` → `getDetail(配载单id)` 去查运单 → 后端「运单管理不存在」→ 拦截器弹一次。**几个旧标签就几条提示**;
|
||||||
|
4. 且被污染实例的 `isStandaloneWaybillDetailPage` 仍是 live computed(false) → `openDetail` 走 `$router.push` 分支 → 又生成新的「运单管理详情」标签(标签栏那串的来源)。
|
||||||
|
|
||||||
|
同理风险:`waybill-manage.vue:6` 与 `transport-plan.vue:6` 的 `:detail-id="$route.query.detailId"`(`business-crud-page.vue:7356` 会 push `/business/loading-manage?detailId=id`,正好会污染运单列表实例)。
|
||||||
|
|
||||||
|
**次因(通道 B)**:`loading-manage.vue` 的 `restoreWaybillRows` 会用 `waybillIdsJson` 里的每个运单 id 并发 `getWaybillDetail(id)`,若历史运单已被删/失效,也会报同一句文案且并发多条。单条 `.catch(() => null)` 挡不住拦截器已弹出的提示。
|
||||||
|
|
||||||
|
**区分方法**:Network 里看报错请求的 `id` —— 等于 `2097607162718441474`(配载单 id)→ 通道 A;是别的数字(运单 id)→ 通道 B。或先关掉所有「运单管理详情」标签再复现,通道 A 会消失。
|
||||||
|
|
||||||
|
**待确认的修法**(用户要求先报不改):
|
||||||
|
1. `waybill-manage-page.vue`:`created()` 锁 `routePathLocked = this.$route.path`,`detailId` watcher 首行加 `if (this.$route.path !== this.routePathLocked) return;`。
|
||||||
|
2. `openDetail()` 的 push 分支加同样守卫(防其它调用路径)。
|
||||||
|
3. 宿主 view 绑定加路径守卫(`waybill-manage-detail.vue` / `waybill-manage.vue` / `transport-plan.vue`)双保险。
|
||||||
|
4. 可选:`getWaybillDetail` 支持静默模式,供 `restoreWaybillRows` 用,避免历史脏数据刷屏。
|
||||||
|
|
||||||
|
## 修复(已执行):「运单管理不存在」误报 + 误开标签
|
||||||
|
|
||||||
|
用户确认后按上方案落地,5 个文件:
|
||||||
|
|
||||||
|
1. `src/views/business/components/waybill-manage-page.vue`
|
||||||
|
- `data()` 新增 `routePathLocked: this.$route.path` —— **必须放 data,不能放 created**:Vue Options API 顺序是 data → computed → watch(immediate) → created(已在 runtime-core `applyOptions` 源码中核实)。放 created 会让首个 immediate watcher 读到空值。
|
||||||
|
- 新增 computed `isOwnedRouteActive() { return this.$route.path === this.routePathLocked; }`
|
||||||
|
- `detailId` watcher 首行加 `if (!this.isOwnedRouteActive) return;`
|
||||||
|
- `openDetail` 的 `$router.push` 分支同样加守卫。
|
||||||
|
2. `src/views/business/components/transport-plan-page.vue`:完全同构的写法(`:detail-id` host 一致),加同样的 `routePathLocked` + `isOwnedRouteActive` + watcher 守卫。
|
||||||
|
3. `src/views/business/waybill-manage-detail.vue`:`:detail-id="$route.query.id"` → `:detail-id="detailId"`,computed 做 `this.$route.path === '/business/waybill-manage/detail'` 守卫。
|
||||||
|
4. `src/views/business/waybill-manage.vue`:同上,守卫 `/business/waybill-manage`(保留旧链接 `?detailId=` 兼容)。
|
||||||
|
5. `src/views/business/transport-plan.vue`:同上,守卫 `/business/transport-plan`。
|
||||||
|
|
||||||
|
**验证**:
|
||||||
|
- dev server curl 5 个 .vue + 2 个 scoped style 全部 HTTP 200。
|
||||||
|
- 用 `@vue/server-renderer` 写了临时 mjs(已删)模拟带 `$route` 的 app,确认 **data() 里访问 `this.$route` 可行**:immediate watcher 触发时 `routePathLocked` 已是正确路径、首次加载不被拦截。
|
||||||
|
- `$route` 是 vue-router 挂在 `app.config.globalProperties` 上的 getter(vue-router.mjs:1498),组件实例化时已就绪。
|
||||||
|
|
||||||
|
**未做(第 4 条可选)**:给 `getWaybillDetail` 加静默模式供 `restoreWaybillRows` 使用(历史失效运单仍会刷多条红字),待用户定夺。
|
||||||
|
|
||||||
|
**另注**:`business-crud-page.vue:6651` 有同构的 `detailId` immediate watcher,但全项目只有上述 3 个宿主 view 传 `:detail-id`,它暂无调用方,未动。
|
||||||
|
|
||||||
|
**仍未 commit。**
|
||||||
|
|
||||||
|
## 修复(已执行):合同详情页整页空白 —— 路由表重复定义
|
||||||
|
|
||||||
|
**现象**:主订单详情点合同编号 → `/business/contract-manage/detail?id=...&name=合同详情` 内容区空白(侧栏/标签正常)。
|
||||||
|
|
||||||
|
**定位过程(关键:真实浏览器复现,不猜)**
|
||||||
|
1. 静态排查全部排除:`contract-manage.vue` 及其 26 个依赖 HTTP 200、模块 `import()` 成功、无循环依赖、详情分支引用的 24 个成员全部有定义。
|
||||||
|
2. dev 环境登录态无法直接拿(验证码 + `admin/admin` 报 `error_code 2004 用户密码强度过低`),改为**注入式复现**:
|
||||||
|
- `agent-browser open <目标 URL>`(落 `/login`);
|
||||||
|
- eval 取 `document.getElementById('app').__vue_app__.config.globalProperties` 拿 `$router` / `$store`;
|
||||||
|
- 写 cookie `saber3-access-token`(注意 token 走 **js-cookie**,不是 localStorage)+ `$store.state.user.token`;
|
||||||
|
- 覆写 `XMLHttpRequest.prototype.open/send` 让所有 `/api/**` 返回 `{code:200,data:{...}}`(defineProperty 伪造 readyState/status/responseText 后手动触发 `onloadend`)。
|
||||||
|
- 再 `$router.push(...)` 做 SPA 跳转。
|
||||||
|
3. 复现出空白,并拿到决定性证据:
|
||||||
|
- `/business/contract-manage/detail` → `$route.matched.length === 1`(只有 Layout,name undefined),`#avue-view.children.length === 0`,innerHTML 为 `<!---->`。
|
||||||
|
- 对照 `/business/contract-manage/change`(结构相同但未重复定义)→ `matched.length === 2`(Layout + 合同变更),内容完整渲染。
|
||||||
|
- `$router.getRoutes()` 里 detail 有 **3 条**记录:2 个 Layout 父记录 + 1 个子记录(`合同详情`)。
|
||||||
|
|
||||||
|
**根因**:`src/router/views/index.js` 中 `/business/contract-manage/detail` **被复制粘贴定义了两次**,两次的子路由都叫 `合同详情`。vue-router 的 `addRoute` 遇到重名会 `removeRoute(name)` 把先注册的子记录删掉,但**不会把它从父记录的 `children` 数组里摘除**;于是第一条 Layout 壳记录留在 matcher 列表里且排在前面,`resolve('/business/contract-manage/detail')` 命中这个"无有效子路由"的壳 → matched 只有 1 层 → `page/index/index.vue` 里 `#avue-view` 的二级 `<router-view>` 无匹配 → 内容区空白。
|
||||||
|
(`getRoutes()` 计数是判据:form / change 都是 2 条 = 父 + 子(健康),detail 是 3 条 = 2 父 + 1 子(坏)。)
|
||||||
|
|
||||||
|
**修复**:删除重复块(原 314-325 行),只保留 159-169 行那一份。
|
||||||
|
|
||||||
|
**验证**:
|
||||||
|
- 重复扫描脚本(正则匹配「顶层 path + `component: Layout` + 首个子路由 name」):views/index.js 27 条 Layout 子路由中仅 `合同详情` 重复;page/index.js 无重复 → 已清零。
|
||||||
|
- 修复后浏览器复验:detail → `matched.length === 2`(Layout + 合同详情)、`#avue-view.children.length === 1`,正文完整渲染「基本信息 / 签约类型 / 合同编号 HT-2026-001 / … / 变更记录」。
|
||||||
|
- 全量回归:48 条 business/vehicle/payment/settlement 路由 `resolve()` 后 `matched.length` 全部 ≥ 2,`bad: []`。
|
||||||
|
- `curl` 校验:`views/index.js`、`contract-manage.vue` 均 200。
|
||||||
|
- 残留报错均为 mock 数据形状不符所致(所有接口都返回同一个合同对象,导致 `tree.reduce` / `feeCategories.find` 之类失败),非真实缺陷。
|
||||||
|
|
||||||
|
**未 commit**(连同 1、2 轮改动一起待确认)。
|
||||||
+19
-89
@@ -1,97 +1,27 @@
|
|||||||
# 项目长期记忆(tms-erp-web-ws / Saber3 客商模块)
|
# 项目长期记忆(tms-erp-web-ws / Saber3)
|
||||||
|
|
||||||
## 设计约定(已确认)
|
后端:`/Users/gxwebsoft/JAVA/tms-api`(`tms-erp-api-ws` 滞后,别看错仓库)。
|
||||||
|
|
||||||
### 弹窗分组:统一用全局 `<section-card>`
|
## 列表 / 表单 / 详情三态同组件分流
|
||||||
- 弹窗 body 背景由 `src/styles/element-ui.scss` 全局 `.el-dialog__body { background:#f5f6fa; padding:16px }` 统一灰底。
|
`/xxx`、`/xxx/form`、`/xxx/detail` 指向同一 `.vue`;form/detail 在 `src/router/views/index.js` 是 `component: Layout` + 空 `children.path` + `meta:{keepAlive:false}`(detail 另带 `activeMenu`)。组件内按 `$route.path` 分流,必须 `watch:{$route}` 重新 init;标签标题取 `query.name`;独立页容器固定 `<div v-if>`,不用 `el-dialog`。
|
||||||
- 每组 = 白底卡片:4px 主色竖条 + 8px 间距 + 圆角 6px + 淡阴影。组件全局注册 `<section-card title="...">`,支持 `#title` / `#extra` slot。
|
|
||||||
- 仅 3 项的小分组用 `el-col :span="8"` 均分一行。
|
|
||||||
|
|
||||||
### Avue 内置弹窗用 section-card:dialogCustomClass 透明化 avue-form
|
## ⚠️ keep-alive 三坑
|
||||||
- option 顶层加 `dialogCustomClass:'xxx-dialog'`,再在 `element-ui.scss` 写三条:
|
背景(`router/tab.js` + `page/index/index.vue`):按 `fullPath` 建 wrapper,`<keep-alive :include="tagsKeep">` 缓存,**每标签一实例、永不销毁**,deactivate 后**仍随全局 `$route` 重渲染**。
|
||||||
1. `.xxx-dialog .avue-form { background:transparent; box-shadow:none; padding:0 }`
|
|
||||||
2. `.xxx-dialog .avue-form__group > .el-col > .el-form-item { margin-bottom:0 }`
|
|
||||||
3. `.xxx-dialog .avue-dialog__footer, .avue-crud__dialog .xxx-dialog .avue-dialog__footer { margin-top:0 !important }`
|
|
||||||
|
|
||||||
### 弹窗底部操作栏浮动(全局 CSS)
|
**坑一:独立页容器禁用 `<component :is>` 在 div / el-dialog 间切换。** `append-to-body` 走 Teleport,`TeleportImpl.move` 忽略 `moveType`,不会把 DOM 搬回缓存容器 → 切菜单冒出旧弹窗。修法:固定 `<div v-if>` + `deactivated(){closeInnerDialogs()}` + `beforeUnmount()`(写在子组件也生效)。已修 loading-manage / project-apply / waybill-manage-page;未修 `settlement/components/{pre,formal}-settlement-editor.vue`、`transport-reconciliation-editor.vue`、`waybill-import-dialog.vue`。
|
||||||
- `.el-dialog__body { max-height:calc(100vh - 200px); overflow-y:auto; overflow-x:hidden }`
|
|
||||||
- `.el-dialog__footer { margin:0; padding:12px 20px; background:#fff; border-top:1px solid #ebeef5; box-shadow:0 -2px 8px rgba(0,0,0,.04) }`
|
|
||||||
- Avue 内置弹窗 footer 真实 class 是 `.avue-dialog__footer`,须 `position:sticky; bottom:0; flex:none; background:#fff` 贴底。
|
|
||||||
|
|
||||||
### 上传证件区域尺寸(transportCapacity)
|
**坑二:宿主 view 直绑全局 `$route.query.*` 给子组件 prop。** 缓存实例被灌入当前页 id → 拿错 id 查后端(批量弹「运单管理不存在」),live computed 还会误 push 标签。修法:`routePathLocked` 锁路径 + watcher / push 前判 `isOwnedRouteActive` + 宿主绑定加路径守卫。⚠️ `routePathLocked` **必须放 `data()`**(Options API 顺序 data → computed → watch(immediate) → created;放 created 会读到空值、挡掉首次加载)。已修 waybill-manage-page / transport-plan-page + 三个宿主 view。
|
||||||
- 身份证/行驶证/道路运输证等固定 **240×151px**(1.586:1)。
|
|
||||||
- scoped 覆盖 `.xxx-uploader--large { width:240px }` 与 `--large .el-upload { width:100%; height:151px }`。
|
|
||||||
|
|
||||||
### 上传图片点击放大预览
|
**坑三:路由表重复定义 → 内容区整页空白(2026-09-18)。** `/business/contract-manage/detail` 在 `router/views/index.js` 定义两次、子路由同名 `合同详情`。重名 `addRoute` 会 `removeRoute(name)` 移除旧子记录,但**不从父记录 children 里摘除**,第一条 Layout 壳记录留在 matcher 且靠前 → `resolve()` 命中它 → `$route.matched.length === 1` → 二级 router-view 无匹配 → 侧栏/标签正常但内容空白。修法:删重复定义。排查:扫「顶层 path + 首个子路由 name」重复项。
|
||||||
- `src/components/image-upload-field/main.vue` 用 `<el-image preview-src-list fit="contain" preview-teleported :z-index="3000" @click.stop>`,阻止冒泡到 el-upload。
|
|
||||||
|
|
||||||
### 独立表单页标题 `archive-page-form__title`
|
## 样式硬规则
|
||||||
- 样式全局化到 `src/styles/element-ui.scss`:18px/600/#303133 + margin-bottom:20px + 4px 主色竖条 + 8px 间距。
|
- 底栏 `flex; justify-content:flex-end`,**不写 gap**(靠 EP 默认 `.el-button+.el-button{margin-left:12px}`);浮动底栏必须 `position:fixed`(祖先 overflow:hidden 使 sticky 失效)+ `:global(.avue--collapse .x){left:60px}`、`:global(.avue-layout--horizontal .x){left:0}`,`:global()` 要包整个选择器。
|
||||||
- business-crud-page 系列通过 `formPageTitle` prop 注入;loading-manage / master-order 手写前置标题。
|
- 按钮层级:次要=无 type;中间步骤=`primary plain`;主操作=`primary`(禁绿、禁两个蓝实心)。顺序 `[辅助][取消][保存草稿][提交]`。
|
||||||
|
- 独立页标题 `.archive-page-form__title`;分组用全局 `<section-card>`;上传证件区 `width:100%; max-width:240px` + `.el-upload{height:151px}`。
|
||||||
|
- ⚠️ `<style scoped lang="scss">` 顶层禁 `//` 注释(Vite5 + sass `Unexpected '/'` → 500),顶层用 `/* */`。其余见 `src/styles/element-ui.scss` 与 `AGENTS.md` 4.4。
|
||||||
|
|
||||||
### 表格列内嵌输入控件全宽
|
## 表单 / 自检 / 导出
|
||||||
- `element-ui.scss` 全局兜底:`.el-table .el-table__body td.el-table__cell .cell > .el-input-number/.el-input/.el-select/.el-date-editor/.el-cascader { width:100% }`。
|
- placeholder 只写 `请输入`/`请选择`;例外:`请输入或选择车辆`、日期区间 `起`/`止`、示例值。校验 message 须带字段名。
|
||||||
|
- `business-crud-page.vue`:option 经 `cloneOption` 克隆,独立表单页走 `PageAvueForm`。
|
||||||
### 业务状态标签文字化
|
- 自检:`curl "localhost:2889/src/xxx.vue"` 与 `"...?vue&type=style&index=0&scoped=true&lang.scss"`(200 / 500)。`vite build` 在 `facelogin.vue` 被沙箱中断,不能作唯一校验。dev `VITE_APP_API=/api` 代理 `172.16.203.228:8000`。
|
||||||
- 全站"状态语义"的 `el-tag` 加 `class="status-text"`,转为普通文字,不带颜色/背景/边框/圆点。
|
- 导出:前端 `exportColumns` 后端未用,以 `XxxExportExcel.java` 为准;BladeX `BeanUtil` 类型不兼容静默跳过(`Date` → `LocalDateTime` 丢值,用 `DateUtil.fromDate`)。
|
||||||
- 实现:`element-ui.scss` 末尾 `.el-tag.status-text { ... }`。
|
|
||||||
|
|
||||||
### 弹窗 / 独立表单页底栏按钮统一规则
|
|
||||||
- **排序**:从左到右按次→主排(次要居左、主操作居右),主操作永远放最后。
|
|
||||||
- 顺序模板:`[可选辅助工具(如同步/导入)][取消][保存草稿][提交/确认]`
|
|
||||||
- **容器布局(2026-08-27 改为「去 gap」)**:`display:flex; justify-content:flex-end;`(**不写 `gap`**)。按钮间距统一由 Element Plus 全局默认的相邻按钮 `.el-button+.el-button{margin-left:12px}` 提供,全站恒为 12px。原各 footer 写死的 `gap:8/12px` 已全部移除。`src/styles/element-ui.scss` 里 `.el-dialog__footer .el-button + .el-button` 也已从 `8px` 改 `12px`,与之一致。弹窗关闭按钮继承 Element Plus 自带 `.el-dialog__footer` 全局规则(见上条),独立页用 `.archive-form__footer` 配 `.archive-page-form & { position:fixed; right:0; left:230px; bottom:0; z-index:10; margin:0; padding:12px 24px; border-top:1px solid #eff1f7; background:#fff; box-shadow:0 -2px 8px rgba(0,0,0,.06); }`。
|
|
||||||
- **⚠️ 浮动底部必须用 `position:fixed`,不能用 `position:sticky`**:本项目布局 `.app-main` / `.basic-container` 祖先带 `overflow:hidden`,会导致 `sticky` 永不触发(footer 不吸底)。固定写法照搬 customer-archive:
|
|
||||||
```scss
|
|
||||||
.xxx-actions {
|
|
||||||
position: fixed; right: 0; left: 230px; bottom: 0; margin: 0; z-index: 10;
|
|
||||||
/* flex-end + padding + border-top + 白底 + 上投影 */
|
|
||||||
}
|
|
||||||
:global(.avue--collapse .xxx-actions) { left: 60px; } /* 侧栏折叠 */
|
|
||||||
:global(.avue-layout--horizontal .xxx-actions) { left: 0; } /* 横向布局 */
|
|
||||||
```
|
|
||||||
注意 `:global()` 要把「整个选择器」包进去(customer-archive 写法),不要只包前缀,否则 scoped 会在中间选择器上追加 data 属性导致不匹配。
|
|
||||||
- **颜色层级 3 档**:
|
|
||||||
| 语义 | type | 备注 |
|
|
||||||
| --- | --- | --- |
|
|
||||||
| 次要(取消 / 关闭) | 不写 type(默认) | 灰描边 |
|
|
||||||
- **全站底部操作栏「返回」已统一改为「取消」**:独立表单页返回列表、弹窗关闭、主从编辑器返回等场景一律写「取消」;仅只读查看 / 纯关闭场景保留「关闭」。
|
|
||||||
| 中间步骤(保存草稿 / 按匹配结果更新) | `type="primary" plain` | 蓝描边 |
|
|
||||||
| 主操作(提交 / 完成对账 / 复评确认) | `type="primary"` | 蓝实心 |
|
|
||||||
- **禁区**:
|
|
||||||
- 保存草稿和主操作不允许同为 `type="primary"`,否则两个蓝实心无视觉层级。
|
|
||||||
- 主操作禁止用 `type="success"`(绿)。全站统一深蓝实心。
|
|
||||||
- **生效页面(已按规则统一)**:
|
|
||||||
- `business/project-apply.vue`(footer + 变更 footer)
|
|
||||||
- `vehicle/customer-archive.vue` 全部 5 处 footer(`archive-form__footer` 主表单页 + `contact-dialog`/`receipt-dialog`/`invoice-dialog` 子弹窗 + `score-detail-dialog` 含总分合计)
|
|
||||||
- `business/components/business-crud-page.vue` 的 PageAvueForm 独立表单页(`#menu-form-before` slot 新增 `取消` 按钮,shipping-template 模式验证通过;影响 `/business/waybill-manage/form`、`/business/transport-plan/form`、`/business/shipping-template/form` 三处独立表单页)
|
|
||||||
- `business/components/master-order-editor.vue` 主 `<footer>`(取消 default + 暂存/确认创建 plain + 创建并调度 primary;`position:fixed` 浮动,含 `avue--collapse`/`avue-layout--horizontal` 左偏移)
|
|
||||||
- **payment 模块**表单页(`__actions` 均 `flex-end` + `position:fixed` 浮动,含 `avue--collapse`/`avue-layout--horizontal` 左偏移):
|
|
||||||
- `payment-application-form.vue`(`[取消][保存 plain][提交]`)
|
|
||||||
- `invoice-application-form.vue` / `invoice-receipt-form.vue`(`[取消][同步 plain][保存 plain][提交]`)
|
|
||||||
- `bill-ledger-form.vue`(`[取消][确认 primary]`)
|
|
||||||
- `bill-payment-form.vue`(`[取消][保存 plain][提交]`)
|
|
||||||
- `receipt-flow-form.vue`(`[取消][确认 primary]`)
|
|
||||||
- `receipt-claim-record-form.vue`(单「关闭」按钮,居中→右对齐浮动)
|
|
||||||
- **settlement 模块**:
|
|
||||||
- `settlement/components/pre-settlement-editor.vue`(弹窗 + pageMode 两处 footer:保存加 `plain`;`&__page-actions` 加 `position:fixed` 浮动,含 `avue--collapse`/`avue-layout--horizontal` 左偏移)
|
|
||||||
- `settlement/components/formal-settlement-editor.vue`(`.formal-editor__page-actions` 加 `position:fixed` 浮动,含 `avue--collapse`/`avue-layout--horizontal` 左偏移;按钮已 `[取消][提交]` 合规)
|
|
||||||
- `settlement/receivable-payable-detail.vue`(生成费用弹窗「上一步」改 `plain`)
|
|
||||||
- **已合规未动**:`settlement/components/transport-reconciliation-editor.vue`(`[取消][保存草稿 plain][按匹配结果更新账单 plain][完成对账 primary]`)、`settlement/components/settlement-adjustment-editor.vue`(弹窗 `[取消][保存 primary]`)、`business/temporary-credit-limit.vue`。
|
|
||||||
- **Avue-form footer 结构注意**:`#menu-form-before` slot 内容在 Avue 内置按钮之**左**;`#menu-form` slot 在 Avue 内置按钮之**右**。要实现 `[次要][Avue 主操作]` 顺序,把次要按钮放进 `#menu-form-before`,主操作保留 Avue 内置即可。
|
|
||||||
- **Avue 表单 footer 按钮去图标(统一纯文字)**:Avue 的 `avue-form` 提交/清空按钮内置图标(`submitIcon: 'el-icon-check'`、`emptyIcon: 'el-icon-delete'`),且 Avue 源码用 `|| 'el-icon-xxx'` 兜底,无法通过 option 配置去掉。已在 `business-crud-page.vue` 样式里用 `:global(.business-crud-form-page-dialog .avue-form__menu .el-icon){display:none}` 统一隐藏,仅作用于独立表单页(PageAvueForm 容器),不影响其它弹窗。新增/编辑弹窗内的 Avue 表单若也要去图标,复用此选择器即可。
|
|
||||||
- **复杂 footer 例外**:当 footer 需要在按钮组左侧展示「总分合计 / 数量统计」等聚合信息时,块用 `flex:1` 推自己到最左,按钮组按上述规则排在右半边(参考 `score-detail-dialog`)。
|
|
||||||
|
|
||||||
## 关键文件
|
|
||||||
- `src/components/section-card/main.vue`
|
|
||||||
- `src/styles/element-ui.scss`
|
|
||||||
- `src/views/vehicle/customer-archive.vue`
|
|
||||||
- `src/views/transportCapacity/{driver,vehicle,ship}.vue`
|
|
||||||
- `src/views/business/project-apply.vue`
|
|
||||||
|
|
||||||
## 环境注意
|
|
||||||
- Vite 代理跨域:`axios.withCredentials=true`,改 `.env`/`vite.config.mjs` 须重启 dev。
|
|
||||||
|
|
||||||
## business-crud-page 复用模式
|
|
||||||
- option 由 prop `crudOption` 经 `cloneOption` 克隆。
|
|
||||||
- 独立表单页走 `PageAvueForm`,不包 el-dialog。
|
|
||||||
- 自定义详情弹窗:`config.detailButton=true` + `detailSections:[{title, fields}]`。
|
|
||||||
|
|||||||
@@ -13,6 +13,8 @@
|
|||||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||||
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
|
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
|
||||||
<meta name="format-detection" content="telephone=no" />
|
<meta name="format-detection" content="telephone=no" />
|
||||||
|
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
|
||||||
|
<meta http-equiv="Pragma" content="no-cache" />
|
||||||
<link rel="stylesheet" href="/iconfont/index.css" />
|
<link rel="stylesheet" href="/iconfont/index.css" />
|
||||||
<link rel="stylesheet" href="/iconfont/avue/iconfont.css" />
|
<link rel="stylesheet" href="/iconfont/avue/iconfont.css" />
|
||||||
<link rel="stylesheet" href="/iconfont/saber/iconfont.css" />
|
<link rel="stylesheet" href="/iconfont/saber/iconfont.css" />
|
||||||
|
|||||||
@@ -0,0 +1,52 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>oa登录</title>
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.10.2/jquery.min.js">
|
||||||
|
</script>
|
||||||
|
<script>
|
||||||
|
// 获取URL查询字符串
|
||||||
|
const queryString = window.location.search;
|
||||||
|
|
||||||
|
// 使用URLSearchParams解析查询字符串
|
||||||
|
const urlParams = new URLSearchParams(queryString);
|
||||||
|
|
||||||
|
// 获取特定的参数值
|
||||||
|
var userid = urlParams.get('userid'); // 用户id
|
||||||
|
var username = urlParams.get('username'); // 用户名
|
||||||
|
var redirectUrl = urlParams.get('redirectUrl'); // 重定向地址
|
||||||
|
|
||||||
|
if(userid==null){
|
||||||
|
userid="";
|
||||||
|
}
|
||||||
|
if(username==null){
|
||||||
|
username="";
|
||||||
|
}
|
||||||
|
|
||||||
|
$.get("/oaApi/getToken?userid="+userid+"&username="+username,function(result){
|
||||||
|
debugger
|
||||||
|
//成功返回token
|
||||||
|
if(result.data.token){
|
||||||
|
//设置系统的cookie
|
||||||
|
document.cookie = "X-AUTH-TOKEN="+result.data.token;
|
||||||
|
|
||||||
|
if(redirectUrl==null){
|
||||||
|
//如果是登录就跳转到系统首页
|
||||||
|
window.location.href = "./";
|
||||||
|
}else {
|
||||||
|
//如果是待办有重定向就跳转
|
||||||
|
window.location.href = redirectUrl;
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
alert("该业务系统未同步当前oa用户");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
@@ -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,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
};
|
||||||
@@ -92,13 +92,12 @@ export const createCrudApi = baseUrl => ({
|
|||||||
data,
|
data,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
reassign(id) {
|
reassign(data) {
|
||||||
|
const payload = data && typeof data === 'object' ? data : { id: data };
|
||||||
return request({
|
return request({
|
||||||
url: `${baseUrl}/reassign`,
|
url: `${baseUrl}/reassign`,
|
||||||
method: 'post',
|
method: 'post',
|
||||||
params: {
|
data: payload,
|
||||||
id,
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
batchComplete(ids) {
|
batchComplete(ids) {
|
||||||
|
|||||||
@@ -59,14 +59,14 @@ export const withdraw = id =>
|
|||||||
params: { id },
|
params: { id },
|
||||||
});
|
});
|
||||||
|
|
||||||
export const startChange = (id, reason) =>
|
export const startChange = (id, changeContent, changeReason = changeContent) =>
|
||||||
request({
|
request({
|
||||||
url: `${baseUrl}/start-change`,
|
url: `${baseUrl}/start-change`,
|
||||||
method: 'post',
|
method: 'post',
|
||||||
params: {
|
params: {
|
||||||
id,
|
id,
|
||||||
changeContent: reason,
|
changeContent: changeContent || '',
|
||||||
changeReason: reason,
|
changeReason,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -79,6 +79,15 @@ export const cancel = id =>
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
export const start = id =>
|
||||||
|
request({
|
||||||
|
url: `${baseUrl}/start`,
|
||||||
|
method: 'post',
|
||||||
|
params: {
|
||||||
|
id,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
export const complete = id =>
|
export const complete = id =>
|
||||||
request({
|
request({
|
||||||
url: `${baseUrl}/complete`,
|
url: `${baseUrl}/complete`,
|
||||||
|
|||||||
@@ -13,11 +13,14 @@ export const getDetail = (id, waybillId) =>
|
|||||||
...(waybillId === undefined ? {} : { waybillId }),
|
...(waybillId === undefined ? {} : { waybillId }),
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
export const getVoucherImages = waybillId =>
|
export const getVoucherImages = (waybillId, params = {}) =>
|
||||||
request({
|
request({
|
||||||
url: '/blade-transport/process-config/voucher-images',
|
url: '/blade-transport/process-config/voucher-images',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: { waybillId },
|
params: {
|
||||||
|
waybillId,
|
||||||
|
...params,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
export const submit = api.submit;
|
export const submit = api.submit;
|
||||||
export const remove = api.remove;
|
export const remove = api.remove;
|
||||||
|
|||||||
@@ -6,9 +6,24 @@ const api = createCrudApi(baseUrl);
|
|||||||
|
|
||||||
export const getList = api.getList;
|
export const getList = api.getList;
|
||||||
export const getDetail = api.getDetail;
|
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 submit = api.submit;
|
||||||
export const remove = api.remove;
|
export const remove = api.remove;
|
||||||
|
|
||||||
|
// 项目资金使用风险统计(高风险 / 中风险数量),供列表头部快速筛选标签使用
|
||||||
|
// 暂未启用:后端 /fund-risk-stats 端点尚未实现,列表页已移除调用,等后端就绪后恢复
|
||||||
|
export const getFundRiskStats = params =>
|
||||||
|
request({
|
||||||
|
url: `${baseUrl}/fund-risk-stats`,
|
||||||
|
method: 'get',
|
||||||
|
params,
|
||||||
|
});
|
||||||
|
|
||||||
export const saveDraft = row =>
|
export const saveDraft = row =>
|
||||||
request({
|
request({
|
||||||
url: `${baseUrl}/save-draft`,
|
url: `${baseUrl}/save-draft`,
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ export const submit = api.submit;
|
|||||||
export const dispatch = api.dispatch;
|
export const dispatch = api.dispatch;
|
||||||
export const remove = api.remove;
|
export const remove = api.remove;
|
||||||
export const copy = api.copy;
|
export const copy = api.copy;
|
||||||
export const cancel = api.cancel;
|
|
||||||
export const complete = api.complete;
|
export const complete = api.complete;
|
||||||
|
|
||||||
export const importTransportPlan = ({
|
export const importTransportPlan = ({
|
||||||
@@ -36,3 +35,27 @@ export const importTransportPlan = ({
|
|||||||
timeout: 60000,
|
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,
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|||||||
@@ -5,7 +5,29 @@ const baseUrl = '/blade-transport/voucher-manage';
|
|||||||
export const getList = (current, size, params) =>
|
export const getList = (current, size, params) =>
|
||||||
request({ url: `${baseUrl}/list`, method: 'get', params: { 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 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 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 =>
|
export const createUploadDraft = data =>
|
||||||
request({ url: `${baseUrl}/upload-draft`, method: 'post', data });
|
request({ url: `${baseUrl}/upload-draft`, method: 'post', data });
|
||||||
export const completeUploadFile = data =>
|
export const completeUploadFile = data =>
|
||||||
@@ -17,6 +39,9 @@ export const getWaybillBatches = (current, size, params) =>
|
|||||||
method: 'get',
|
method: 'get',
|
||||||
params: { current, size, ...params },
|
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';
|
const fileTaskBaseUrl = '/blade-file/fileTask';
|
||||||
export const queryFileTask = md5 =>
|
export const queryFileTask = md5 =>
|
||||||
|
|||||||
@@ -26,6 +26,32 @@ export const maintainMileage = data =>
|
|||||||
method: 'post',
|
method: 'post',
|
||||||
data,
|
data,
|
||||||
});
|
});
|
||||||
|
/** 运单打卡记录 + 司机上传凭证图 */
|
||||||
|
export const getPunchRecords = waybillId =>
|
||||||
|
request({
|
||||||
|
url: `${baseUrl}/punch-records`,
|
||||||
|
method: 'get',
|
||||||
|
params: { waybillId },
|
||||||
|
});
|
||||||
|
|
||||||
|
/** 运单车辆实时定位 */
|
||||||
|
export const locateVehicle = id =>
|
||||||
|
request({
|
||||||
|
url: `${baseUrl}/locate`,
|
||||||
|
method: 'post',
|
||||||
|
params: { id },
|
||||||
|
timeout: 60000,
|
||||||
|
});
|
||||||
|
|
||||||
|
/** 运单车辆历史轨迹 */
|
||||||
|
export const trackVehicle = (id, startDate, endDate) =>
|
||||||
|
request({
|
||||||
|
url: `${baseUrl}/track`,
|
||||||
|
method: 'post',
|
||||||
|
params: { id, startDate, endDate },
|
||||||
|
timeout: 60000,
|
||||||
|
});
|
||||||
|
|
||||||
export const roadLoading = ids =>
|
export const roadLoading = ids =>
|
||||||
request({
|
request({
|
||||||
url: `${baseUrl}/road-loading`,
|
url: `${baseUrl}/road-loading`,
|
||||||
@@ -36,9 +62,11 @@ export const roadLoading = ids =>
|
|||||||
});
|
});
|
||||||
|
|
||||||
export const getImportBatches = params => request({ url: `${baseUrl}/import-batch/list`, method: 'get', params });
|
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 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 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 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 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 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 });
|
export const confirmImport = data => request({ url: `${baseUrl}/import-batch/confirm`, method: 'post', data });
|
||||||
|
|||||||
+3
-2
@@ -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();
|
const formData = new FormData();
|
||||||
formData.append('file', file);
|
formData.append('file', file);
|
||||||
return request({
|
return request({
|
||||||
@@ -42,6 +43,6 @@ export const importBlob = (url, file) => {
|
|||||||
method: 'post',
|
method: 'post',
|
||||||
data: formData,
|
data: formData,
|
||||||
responseType: 'blob',
|
responseType: 'blob',
|
||||||
timeout: 60000,
|
timeout,
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -0,0 +1,23 @@
|
|||||||
|
import request from '@/axios';
|
||||||
|
|
||||||
|
export const getMkPublicDetail = (bizType, id) => {
|
||||||
|
return request({
|
||||||
|
url: `/blade-transport/mk-process/public/${bizType}/detail`,
|
||||||
|
method: 'get',
|
||||||
|
meta: {
|
||||||
|
isToken: false,
|
||||||
|
},
|
||||||
|
params: { id },
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
export const postMkPublicProcessMessage = (bizType, data) => {
|
||||||
|
return request({
|
||||||
|
url: `/blade-transport/mk-process/public/${bizType}/process-message`,
|
||||||
|
method: 'post',
|
||||||
|
meta: {
|
||||||
|
isToken: false,
|
||||||
|
},
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
};
|
||||||
@@ -18,11 +18,13 @@ export const returnBill = data => request({ url: `${baseUrl}/return`, method: 'p
|
|||||||
export const voidBill = data => request({ url: `${baseUrl}/void`, method: 'post', data });
|
export const voidBill = data => request({ url: `${baseUrl}/void`, method: 'post', data });
|
||||||
export const syncKingdee = id =>
|
export const syncKingdee = id =>
|
||||||
request({ url: `${baseUrl}/sync-kingdee`, method: 'post', params: { 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 paymentTypeOptions = [
|
export const paymentTypeOptions = [
|
||||||
{ label: '项目预付', value: 'project_advance' },
|
{ label: '项目预付', value: 'project_advance' },
|
||||||
{ label: '进度预付', value: 'progress_advance' },
|
{ label: '进度预付', value: 'progress_advance' },
|
||||||
{ label: '结算付款', value: 'settlement_payment' },
|
{ label: '尾款付款', value: 'settlement_payment' },
|
||||||
];
|
];
|
||||||
export const approvalStatusOptions = [
|
export const approvalStatusOptions = [
|
||||||
{ label: '草稿', value: 'draft' },
|
{ label: '草稿', value: 'draft' },
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ const baseUrl = '/blade-transport/formal-settlement';
|
|||||||
|
|
||||||
export const getList = (current, size, params) =>
|
export const getList = (current, size, params) =>
|
||||||
request({ url: `${baseUrl}/list`, method: 'get', params: { 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 getDetail = id => request({ url: `${baseUrl}/detail`, method: 'get', params: { id } });
|
||||||
export const getCandidates = (current, size, params) =>
|
export const getCandidates = (current, size, params) =>
|
||||||
request({
|
request({
|
||||||
@@ -44,3 +46,5 @@ export const applyPayment = data =>
|
|||||||
request({ url: `${baseUrl}/apply-payment`, method: 'post', data });
|
request({ url: `${baseUrl}/apply-payment`, method: 'post', data });
|
||||||
export const applyPayments = data =>
|
export const applyPayments = data =>
|
||||||
request({ url: `${baseUrl}/apply-payments`, method: 'post', data });
|
request({ url: `${baseUrl}/apply-payments`, method: 'post', data });
|
||||||
|
export const claimInvoices = data =>
|
||||||
|
request({ url: `${baseUrl}/claim-invoices`, method: 'post', data });
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ const baseUrl = '/blade-transport/transport-reconciliation';
|
|||||||
|
|
||||||
export const getList = (current, size, params) =>
|
export const getList = (current, size, params) =>
|
||||||
request({ url: `${baseUrl}/list`, method: 'get', params: { 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 getDetail = id => request({ url: `${baseUrl}/detail`, method: 'get', params: { id } });
|
||||||
export const getFormalOptions = (current, size, params) =>
|
export const getFormalOptions = (current, size, params) =>
|
||||||
request({
|
request({
|
||||||
@@ -14,17 +16,21 @@ export const getFormalOptions = (current, size, params) =>
|
|||||||
export const save = data => request({ url: `${baseUrl}/save`, method: 'post', data });
|
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 remove = id => request({ url: `${baseUrl}/remove`, method: 'post', params: { id } });
|
||||||
export const match = id => request({ url: `${baseUrl}/match`, 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 =>
|
export const manualMatch = data =>
|
||||||
request({ url: `${baseUrl}/manual-match`, method: 'post', data });
|
request({ url: `${baseUrl}/manual-match`, method: 'post', data });
|
||||||
export const unmatch = internalId =>
|
export const unmatch = internalId =>
|
||||||
request({ url: `${baseUrl}/unmatch`, method: 'post', params: { internalId } });
|
request({ url: `${baseUrl}/unmatch`, method: 'post', params: { internalId } });
|
||||||
export const adjust = data => request({ url: `${baseUrl}/adjust`, method: 'post', data });
|
export const adjust = data => request({ url: `${baseUrl}/adjust`, method: 'post', data });
|
||||||
export const updateByMatch = id =>
|
export const updateByMatch = (id, data) =>
|
||||||
request({ url: `${baseUrl}/update-by-match`, method: 'post', params: { id } });
|
request({ url: `${baseUrl}/update-by-match`, method: 'post', params: { id }, data });
|
||||||
export const complete = id =>
|
export const complete = id =>
|
||||||
request({ url: `${baseUrl}/complete`, method: 'post', params: { id } });
|
request({ url: `${baseUrl}/complete`, method: 'post', params: { id } });
|
||||||
export const template = mode =>
|
export const completeWithData = data =>
|
||||||
request({ url: `${baseUrl}/template`, method: 'get', params: { mode }, responseType: 'blob' });
|
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 importFile = (url, id, file) => {
|
||||||
const data = new FormData();
|
const data = new FormData();
|
||||||
|
|||||||
@@ -0,0 +1,31 @@
|
|||||||
|
import request from '@/axios';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 调用 MK processSubmit 提交审核流
|
||||||
|
* @param {Object} data
|
||||||
|
* @param {string} data.templateCode 模板编码
|
||||||
|
* @param {string} data.submitIdentity 提交人(手机号)
|
||||||
|
* @param {string} data.loginName 登录账号(手机号)
|
||||||
|
* @param {string} data.formInstanceId 业务表单实例 id
|
||||||
|
* @param {string} [data.subject] 流程标题
|
||||||
|
*/
|
||||||
|
export const processSubmit = data => {
|
||||||
|
return request({
|
||||||
|
url: '/blade-system/businessProcess/processSubmit',
|
||||||
|
method: 'post',
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 调用 MK processDelete 删除审核流(驳回后重新提交前使用)
|
||||||
|
* @param {Object} data
|
||||||
|
* @param {string} data.formInstanceId 业务表单实例 id
|
||||||
|
*/
|
||||||
|
export const processDelete = data => {
|
||||||
|
return request({
|
||||||
|
url: '/blade-system/businessProcess/processDelete',
|
||||||
|
method: 'post',
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
};
|
||||||
@@ -41,6 +41,48 @@ export const add = row => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const syncIamOrganizations = () => {
|
||||||
|
return request({
|
||||||
|
url: '/blade-system/dept/sync-iam-organizations',
|
||||||
|
method: 'post',
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
export const clearNonTopDept = signal => {
|
||||||
|
return request({
|
||||||
|
url: '/blade-system/dept/clear-non-top',
|
||||||
|
method: 'post',
|
||||||
|
timeout: 60000,
|
||||||
|
signal,
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
export const syncOaCompany = (current = 1, size = 20, signal) => {
|
||||||
|
return request({
|
||||||
|
url: '/blade-system/dept/sync-oa-company',
|
||||||
|
method: 'post',
|
||||||
|
params: {
|
||||||
|
current,
|
||||||
|
size,
|
||||||
|
},
|
||||||
|
timeout: 60000,
|
||||||
|
signal,
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
export const syncOaDepartment = (current = 1, size = 20, signal) => {
|
||||||
|
return request({
|
||||||
|
url: '/blade-system/dept/sync-oa-department',
|
||||||
|
method: 'post',
|
||||||
|
params: {
|
||||||
|
current,
|
||||||
|
size,
|
||||||
|
},
|
||||||
|
timeout: 60000,
|
||||||
|
signal,
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
export const update = row => {
|
export const update = row => {
|
||||||
return request({
|
return request({
|
||||||
url: '/blade-system/dept/submit',
|
url: '/blade-system/dept/submit',
|
||||||
@@ -78,3 +120,10 @@ export const getDeptLazyTree = parentId => {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const getPlatformCompanySelect = () => {
|
||||||
|
return request({
|
||||||
|
url: '/blade-system/dept/platform-company-select',
|
||||||
|
method: 'get',
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|||||||
@@ -86,3 +86,10 @@ export const getDictionary = params => {
|
|||||||
params,
|
params,
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const getDictionaryAll = () => {
|
||||||
|
return request({
|
||||||
|
url: '/blade-system/dict-biz/select-all',
|
||||||
|
method: 'get',
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|||||||
@@ -31,6 +31,19 @@ export const add = row => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const syncIamAccounts = (current = 1, size = 50, signal) => {
|
||||||
|
return request({
|
||||||
|
url: '/blade-system/user/sync-iam-accounts',
|
||||||
|
method: 'post',
|
||||||
|
params: {
|
||||||
|
current,
|
||||||
|
size,
|
||||||
|
},
|
||||||
|
timeout: 60000,
|
||||||
|
signal,
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
export const update = row => {
|
export const update = row => {
|
||||||
return request({
|
return request({
|
||||||
url: '/blade-system/user/update',
|
url: '/blade-system/user/update',
|
||||||
|
|||||||
@@ -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,
|
data: row,
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const getExpiryStat = params => {
|
||||||
|
return request({
|
||||||
|
url: '/blade-transport/annual-inspection-record/expiry-stat',
|
||||||
|
method: 'get',
|
||||||
|
params,
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|||||||
@@ -22,6 +22,19 @@ export const getDetail = id => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const getPublicDetail = id => {
|
||||||
|
return request({
|
||||||
|
url: '/blade-transport/customer-archive/public/detail',
|
||||||
|
method: 'get',
|
||||||
|
meta: {
|
||||||
|
isToken: false,
|
||||||
|
},
|
||||||
|
params: {
|
||||||
|
id,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
export const getChangeRecordList = (customerId, current, size) => {
|
export const getChangeRecordList = (customerId, current, size) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/blade-transport/customer-archive/change-record/list',
|
url: '/blade-transport/customer-archive/change-record/list',
|
||||||
@@ -34,6 +47,32 @@ export const getChangeRecordList = (customerId, current, size) => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const getPublicChangeRecordList = (customerId, current, size) => {
|
||||||
|
return request({
|
||||||
|
url: '/blade-transport/customer-archive/public/change-record/list',
|
||||||
|
method: 'get',
|
||||||
|
meta: {
|
||||||
|
isToken: false,
|
||||||
|
},
|
||||||
|
params: {
|
||||||
|
customerId,
|
||||||
|
current,
|
||||||
|
size,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
export const postPublicProcessMessage = data => {
|
||||||
|
return request({
|
||||||
|
url: '/blade-transport/customer-archive/public/process-message',
|
||||||
|
method: 'post',
|
||||||
|
meta: {
|
||||||
|
isToken: false,
|
||||||
|
},
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
export const submit = row => {
|
export const submit = row => {
|
||||||
return request({
|
return request({
|
||||||
url: '/blade-transport/customer-archive/submit',
|
url: '/blade-transport/customer-archive/submit',
|
||||||
|
|||||||
@@ -1,11 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog
|
<el-dialog v-model="visible" title="地图选择地址" width="920px" append-to-body @opened="initMap">
|
||||||
v-model="visible"
|
|
||||||
title="地图选择地址"
|
|
||||||
width="920px"
|
|
||||||
append-to-body
|
|
||||||
@opened="initMap"
|
|
||||||
>
|
|
||||||
<div class="address-map-picker__toolbar">
|
<div class="address-map-picker__toolbar">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="keyword"
|
v-model="keyword"
|
||||||
@@ -15,7 +9,14 @@
|
|||||||
/>
|
/>
|
||||||
<el-button type="primary" :loading="searching" @click="searchKeyword">搜索</el-button>
|
<el-button type="primary" :loading="searching" @click="searchKeyword">搜索</el-button>
|
||||||
</div>
|
</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 ref="map" class="address-map-picker__map"></div>
|
||||||
|
</div>
|
||||||
<div class="address-map-picker__info">{{ status }}</div>
|
<div class="address-map-picker__info">{{ status }}</div>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<el-button @click="visible = false">取消</el-button>
|
<el-button @click="visible = false">取消</el-button>
|
||||||
@@ -41,6 +42,14 @@ export default {
|
|||||||
type: String,
|
type: String,
|
||||||
default: '',
|
default: '',
|
||||||
},
|
},
|
||||||
|
longitude: {
|
||||||
|
type: [String, Number],
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
|
latitude: {
|
||||||
|
type: [String, Number],
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
emits: ['update:modelValue', 'confirm'],
|
emits: ['update:modelValue', 'confirm'],
|
||||||
data() {
|
data() {
|
||||||
@@ -54,6 +63,8 @@ export default {
|
|||||||
amap: null,
|
amap: null,
|
||||||
marker: null,
|
marker: null,
|
||||||
geocoder: null,
|
geocoder: null,
|
||||||
|
searchResults: [],
|
||||||
|
mapInitializing: null,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@@ -63,8 +74,11 @@ export default {
|
|||||||
this.visible = value;
|
this.visible = value;
|
||||||
if (value) {
|
if (value) {
|
||||||
this.keyword = this.address || '';
|
this.keyword = this.address || '';
|
||||||
this.selected = {};
|
this.searchResults = [];
|
||||||
this.status = '可搜索地址或点击地图选点';
|
this.selected = this.buildInitialSelection();
|
||||||
|
this.status = this.selected.longitude
|
||||||
|
? this.selected.address || '已选点,可确认回填'
|
||||||
|
: '可搜索地址或点击地图选点';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -78,6 +92,18 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
buildInitialSelection() {
|
||||||
|
const longitude = Number(this.longitude);
|
||||||
|
const latitude = Number(this.latitude);
|
||||||
|
if (!Number.isFinite(longitude) || !Number.isFinite(latitude)) {
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
longitude,
|
||||||
|
latitude,
|
||||||
|
address: this.address || '',
|
||||||
|
};
|
||||||
|
},
|
||||||
loadAmap() {
|
loadAmap() {
|
||||||
if (window.AMap && window.AMap.Map) {
|
if (window.AMap && window.AMap.Map) {
|
||||||
return Promise.resolve();
|
return Promise.resolve();
|
||||||
@@ -96,25 +122,51 @@ export default {
|
|||||||
return amapLoader;
|
return amapLoader;
|
||||||
},
|
},
|
||||||
initMap() {
|
initMap() {
|
||||||
this.loadAmap()
|
if (this.mapInitializing) return this.mapInitializing;
|
||||||
|
|
||||||
|
this.mapInitializing = this.loadAmap()
|
||||||
.then(() => {
|
.then(() => {
|
||||||
|
if (!window.AMap?.Map) {
|
||||||
|
throw new Error('高德地图组件未就绪');
|
||||||
|
}
|
||||||
|
return new Promise(resolve => {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
|
if (!this.$refs.map) return resolve(null);
|
||||||
|
const initial = this.buildInitialSelection();
|
||||||
|
const center =
|
||||||
|
Number.isFinite(initial.longitude) && Number.isFinite(initial.latitude)
|
||||||
|
? [initial.longitude, initial.latitude]
|
||||||
|
: [116.40769, 39.89945];
|
||||||
if (!this.amap) {
|
if (!this.amap) {
|
||||||
this.amap = new window.AMap.Map(this.$refs.map, {
|
this.amap = new window.AMap.Map(this.$refs.map, {
|
||||||
center: [116.40769, 39.89945],
|
center,
|
||||||
zoom: 11,
|
zoom: initial.longitude ? 14 : 11,
|
||||||
});
|
});
|
||||||
this.amap.on('click', event => this.pickPoint(event.lnglat));
|
this.amap.on('click', event => this.pickPoint(event.lnglat));
|
||||||
} else {
|
} else {
|
||||||
this.amap.resize();
|
this.amap.resize();
|
||||||
this.clearMarker();
|
this.clearMarker();
|
||||||
|
this.amap.setZoomAndCenter(initial.longitude ? 14 : 11, center);
|
||||||
}
|
}
|
||||||
|
if (initial.longitude) {
|
||||||
|
const point = new window.AMap.LngLat(initial.longitude, initial.latitude);
|
||||||
|
this.renderMarker(point);
|
||||||
|
this.selected = { ...initial };
|
||||||
|
this.status = initial.address || '已选点,可确认回填';
|
||||||
|
}
|
||||||
|
resolve(this.amap);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
this.$message.error('高德地图组件加载失败,请稍后重试');
|
this.$message.error('高德地图组件加载失败,请稍后重试');
|
||||||
this.visible = false;
|
this.visible = false;
|
||||||
|
return null;
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
this.mapInitializing = null;
|
||||||
});
|
});
|
||||||
|
return this.mapInitializing;
|
||||||
},
|
},
|
||||||
ensureGeocoder() {
|
ensureGeocoder() {
|
||||||
if (this.geocoder) return Promise.resolve(this.geocoder);
|
if (this.geocoder) return Promise.resolve(this.geocoder);
|
||||||
@@ -154,15 +206,28 @@ export default {
|
|||||||
this.$message.warning('请输入地址关键词');
|
this.$message.warning('请输入地址关键词');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (this.searching) return;
|
||||||
|
this.searchResults = [];
|
||||||
this.searching = true;
|
this.searching = true;
|
||||||
this.loadAmap()
|
this.initMap()
|
||||||
.then(() => this.runGeocode('location', keyword))
|
.then(map => (map ? this.runGeocode('location', keyword) : null))
|
||||||
.then(result => {
|
.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) {
|
if (!point) {
|
||||||
throw new Error('未找到匹配地址');
|
throw new Error('未找到匹配地址');
|
||||||
}
|
}
|
||||||
this.pickPoint(point, keyword);
|
return this.$nextTick().then(() => {
|
||||||
|
this.amap?.resize();
|
||||||
|
this.pickPoint(point, geocodes[0]?.formattedAddress || keyword);
|
||||||
|
});
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
this.status = '未找到匹配地址';
|
this.status = '未找到匹配地址';
|
||||||
@@ -172,6 +237,11 @@ export default {
|
|||||||
this.searching = false;
|
this.searching = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
selectSearchResult(item) {
|
||||||
|
if (item && item.location) {
|
||||||
|
this.pickPoint(item.location, item.address || item.name || '');
|
||||||
|
}
|
||||||
|
},
|
||||||
pickPoint(point, fallbackAddress = '') {
|
pickPoint(point, fallbackAddress = '') {
|
||||||
const longitude = typeof point.getLng === 'function' ? point.getLng() : point.lng;
|
const longitude = typeof point.getLng === 'function' ? point.getLng() : point.lng;
|
||||||
const latitude = typeof point.getLat === 'function' ? point.getLat() : point.lat;
|
const latitude = typeof point.getLat === 'function' ? point.getLat() : point.lat;
|
||||||
@@ -181,7 +251,11 @@ export default {
|
|||||||
}
|
}
|
||||||
const lnglat = new window.AMap.LngLat(Number(longitude), Number(latitude));
|
const lnglat = new window.AMap.LngLat(Number(longitude), Number(latitude));
|
||||||
this.renderMarker(lnglat);
|
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.status = '正在解析地址...';
|
||||||
this.resolving = true;
|
this.resolving = true;
|
||||||
this.runGeocode('address', lnglat)
|
this.runGeocode('address', lnglat)
|
||||||
@@ -214,11 +288,19 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
confirm() {
|
confirm() {
|
||||||
|
if (!this.selected.longitude || !this.selected.latitude) {
|
||||||
|
this.$message.warning('请先搜索或点击地图完成选点');
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (!this.selected.address) {
|
if (!this.selected.address) {
|
||||||
this.$message.warning('请等待地址解析完成后再确认');
|
this.$message.warning('请等待地址解析完成后再确认');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.$emit('confirm', this.selected.address);
|
this.$emit('confirm', {
|
||||||
|
address: this.selected.address,
|
||||||
|
longitude: this.selected.longitude,
|
||||||
|
latitude: this.selected.latitude,
|
||||||
|
});
|
||||||
this.visible = false;
|
this.visible = false;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -238,11 +320,19 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
&__map {
|
&__map {
|
||||||
|
flex: 1 1 auto;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
min-width: 0;
|
||||||
height: 420px;
|
height: 420px;
|
||||||
border: 1px solid #eff1f7;
|
border: 1px solid #eff1f7;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&__content {
|
||||||
|
display: flex;
|
||||||
|
gap: 12px;
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
&__info {
|
&__info {
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
color: #606266;
|
color: #606266;
|
||||||
|
|||||||
@@ -0,0 +1,108 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog
|
||||||
|
:model-value="modelValue"
|
||||||
|
title="变更记录详情"
|
||||||
|
append-to-body
|
||||||
|
destroy-on-close
|
||||||
|
align-center
|
||||||
|
width="1100px"
|
||||||
|
class="change-record-detail-dialog"
|
||||||
|
@update:model-value="$emit('update:modelValue', $event)"
|
||||||
|
@open="resetPage"
|
||||||
|
>
|
||||||
|
<el-table
|
||||||
|
:data="pageRows"
|
||||||
|
border
|
||||||
|
max-height="60vh"
|
||||||
|
:show-overflow-tooltip="false"
|
||||||
|
>
|
||||||
|
<el-table-column prop="field" label="变更字段" min-width="180" />
|
||||||
|
<el-table-column
|
||||||
|
prop="before"
|
||||||
|
label="变更前"
|
||||||
|
min-width="360"
|
||||||
|
class-name="change-record-detail-value"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
prop="after"
|
||||||
|
label="变更后"
|
||||||
|
min-width="500"
|
||||||
|
class-name="change-record-detail-value"
|
||||||
|
/>
|
||||||
|
</el-table>
|
||||||
|
<el-empty v-if="!total" description="暂无变更内容" :image-size="60" />
|
||||||
|
<div class="change-record-detail-dialog__pager">
|
||||||
|
<el-pagination
|
||||||
|
v-model:current-page="currentPage"
|
||||||
|
v-model:page-size="pageSize"
|
||||||
|
background
|
||||||
|
:total="total"
|
||||||
|
:page-sizes="[10, 20, 50, 100]"
|
||||||
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<template #footer>
|
||||||
|
<el-button type="primary" @click="$emit('update:modelValue', false)">关闭</el-button>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'ChangeRecordDetailDialog',
|
||||||
|
props: {
|
||||||
|
modelValue: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
rows: {
|
||||||
|
type: Array,
|
||||||
|
default: () => [],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
emits: ['update:modelValue'],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
currentPage: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
total() {
|
||||||
|
return this.rows.length;
|
||||||
|
},
|
||||||
|
pageRows() {
|
||||||
|
const start = (this.currentPage - 1) * this.pageSize;
|
||||||
|
return this.rows.slice(start, start + this.pageSize);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
rows() {
|
||||||
|
const maxPage = Math.max(1, Math.ceil(this.total / this.pageSize) || 1);
|
||||||
|
if (this.currentPage > maxPage) this.currentPage = 1;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
resetPage() {
|
||||||
|
this.currentPage = 1;
|
||||||
|
this.pageSize = 10;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.change-record-detail-dialog__pager {
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
margin-top: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.change-record-detail-value .cell) {
|
||||||
|
white-space: pre-wrap;
|
||||||
|
word-break: break-word;
|
||||||
|
overflow: visible;
|
||||||
|
text-overflow: clip;
|
||||||
|
line-height: 1.6;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -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>
|
||||||
@@ -15,10 +15,12 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<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/annotationLayer.css';
|
||||||
import 'vue-pdf-embed/dist/styles/textLayer.css';
|
import 'vue-pdf-embed/dist/styles/textLayer.css';
|
||||||
|
|
||||||
|
const VuePdfEmbed = defineAsyncComponent(() => import('vue-pdf-embed'));
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'PdfPreview',
|
name: 'PdfPreview',
|
||||||
components: { VuePdfEmbed },
|
components: { VuePdfEmbed },
|
||||||
|
|||||||
@@ -75,8 +75,8 @@ import pdfWorkerSrc from 'pdfjs-dist/build/pdf.worker.mjs?url';
|
|||||||
import { baseUrl } from '@/config/env';
|
import { baseUrl } from '@/config/env';
|
||||||
import { getUploadHeaders } from '@/utils/upload';
|
import { getUploadHeaders } from '@/utils/upload';
|
||||||
|
|
||||||
const UNIFIED_ATTACHMENT_TIP =
|
const UNIFIED_ATTACHMENT_TIP_PREFIX =
|
||||||
'支持pdf、bmp、jpeg、png、jpg、doc、docx、ppt、pptx、xlsx、xls、eml、msg、zip的文件格式,单个文件不超过500M';
|
'支持pdf、bmp、jpeg、png、jpg、doc、docx、ppt、pptx、xlsx、xls、eml、msg、zip的文件格式,单个文件不超过';
|
||||||
|
|
||||||
const MIME_MAP = {
|
const MIME_MAP = {
|
||||||
jpg: 'image/jpeg',
|
jpg: 'image/jpeg',
|
||||||
@@ -215,7 +215,7 @@ export default {
|
|||||||
return this.acceptedList.join(',');
|
return this.acceptedList.join(',');
|
||||||
},
|
},
|
||||||
tipText() {
|
tipText() {
|
||||||
return this.tip || UNIFIED_ATTACHMENT_TIP;
|
return this.tip || `${UNIFIED_ATTACHMENT_TIP_PREFIX}${this.maxSize}M`;
|
||||||
},
|
},
|
||||||
uploadingCount() {
|
uploadingCount() {
|
||||||
return this.fileList.filter(file => ['ready', 'uploading'].includes(file.status)).length;
|
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 data = (file.response && file.response.data) || file.data || file;
|
||||||
const url = data.link || data.url || data.domain || file.url || '';
|
const url = data.link || data.url || data.domain || file.url || '';
|
||||||
const originalName =
|
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 });
|
const extension = this.getExtension({ name: originalName, url });
|
||||||
return {
|
return {
|
||||||
...data,
|
...data,
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
FROM nginx
|
FROM nginx
|
||||||
VOLUME /tmp
|
VOLUME /tmp
|
||||||
ENV LANG en_US.UTF-8
|
ENV LANG en_US.UTF-8
|
||||||
|
ADD ./src/docker/nginx.conf /etc/nginx/conf.d/default.conf
|
||||||
ADD ./dist/ /usr/share/nginx/html/
|
ADD ./dist/ /usr/share/nginx/html/
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
EXPOSE 443
|
EXPOSE 443
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
server_name localhost;
|
||||||
|
root /usr/share/nginx/html;
|
||||||
|
index index.html;
|
||||||
|
|
||||||
|
gzip on;
|
||||||
|
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
|
||||||
|
|
||||||
|
location /assets/ {
|
||||||
|
add_header Cache-Control "public, max-age=31536000, immutable";
|
||||||
|
try_files $uri =404;
|
||||||
|
}
|
||||||
|
|
||||||
|
location / {
|
||||||
|
add_header Cache-Control "no-store, no-cache, must-revalidate";
|
||||||
|
try_files $uri $uri/ /index.html;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,8 +1,12 @@
|
|||||||
import store from './store';
|
import store from './store';
|
||||||
|
import { isChunkLoadError, reloadForChunkError } from './utils/chunk-reload';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
install: app => {
|
install: app => {
|
||||||
app.config.errorHandler = (err, vm, info) => {
|
app.config.errorHandler = (err, vm, info) => {
|
||||||
|
if (isChunkLoadError(err) && reloadForChunkError()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
store.commit('ADD_LOGS', {
|
store.commit('ADD_LOGS', {
|
||||||
type: 'error',
|
type: 'error',
|
||||||
message: err.message,
|
message: err.message,
|
||||||
|
|||||||
+5
-1
@@ -1,4 +1,5 @@
|
|||||||
import { createApp } from 'vue';
|
import { createApp } from 'vue';
|
||||||
|
import { installChunkReload } from './utils/chunk-reload';
|
||||||
import website from './config/website';
|
import website from './config/website';
|
||||||
import axios from './axios';
|
import axios from './axios';
|
||||||
import router from './router/';
|
import router from './router/';
|
||||||
@@ -43,8 +44,10 @@ import tenantPackage from './views/system/tenantpackage.vue';
|
|||||||
import tenantDatasource from './views/system/tenantdatasource.vue';
|
import tenantDatasource from './views/system/tenantdatasource.vue';
|
||||||
// 通用弹窗分组白卡(灰底弹窗内使用,标题在卡内)
|
// 通用弹窗分组白卡(灰底弹窗内使用,标题在卡内)
|
||||||
import sectionCard from './components/section-card/main.vue';
|
import sectionCard from './components/section-card/main.vue';
|
||||||
|
import mapSearchResults from './components/map-search-results/main.vue';
|
||||||
|
|
||||||
window.$crudCommon = crudCommon;
|
window.$crudCommon = crudCommon;
|
||||||
|
installChunkReload();
|
||||||
debug();
|
debug();
|
||||||
window.axios = axios;
|
window.axios = axios;
|
||||||
const app = createApp(App);
|
const app = createApp(App);
|
||||||
@@ -66,6 +69,7 @@ app.component('formSetting', formSetting);
|
|||||||
app.component('tenantPackage', tenantPackage);
|
app.component('tenantPackage', tenantPackage);
|
||||||
app.component('tenantDatasource', tenantDatasource);
|
app.component('tenantDatasource', tenantDatasource);
|
||||||
app.component('sectionCard', sectionCard);
|
app.component('sectionCard', sectionCard);
|
||||||
|
app.component('mapSearchResults', mapSearchResults);
|
||||||
app.config.globalProperties.$app = app;
|
app.config.globalProperties.$app = app;
|
||||||
app.config.globalProperties.$dayjs = dayjs;
|
app.config.globalProperties.$dayjs = dayjs;
|
||||||
app.config.globalProperties.website = website;
|
app.config.globalProperties.website = website;
|
||||||
@@ -81,7 +85,7 @@ app.use(ElementPlus, {
|
|||||||
});
|
});
|
||||||
app.use(Avue, {
|
app.use(Avue, {
|
||||||
axios,
|
axios,
|
||||||
calcHeight: 10,
|
calcHeight: -26,
|
||||||
crudOption: {
|
crudOption: {
|
||||||
searchIcon: true,
|
searchIcon: true,
|
||||||
searchIndex: 4,
|
searchIndex: 4,
|
||||||
|
|||||||
@@ -26,6 +26,8 @@ export const getCargoTypeOption = ctx => ({
|
|||||||
height: 'auto',
|
height: 'auto',
|
||||||
calcHeight: 22,
|
calcHeight: 22,
|
||||||
dialogWidth: 760,
|
dialogWidth: 760,
|
||||||
|
// 货物类型弹窗单独使用样式,避免全局 Avue footer 上移遮挡底部备注字段
|
||||||
|
dialogCustomClass: 'cargo-type-dialog',
|
||||||
labelPosition: 'right',
|
labelPosition: 'right',
|
||||||
labelWidth: 'auto',
|
labelWidth: 'auto',
|
||||||
tip: false,
|
tip: false,
|
||||||
@@ -172,6 +174,7 @@ export const getCargoTypeOption = ctx => ({
|
|||||||
label: '备注',
|
label: '备注',
|
||||||
prop: 'remark',
|
prop: 'remark',
|
||||||
type: 'textarea',
|
type: 'textarea',
|
||||||
|
formslot: true,
|
||||||
minRows: 2,
|
minRows: 2,
|
||||||
span: 24,
|
span: 24,
|
||||||
minWidth: 180,
|
minWidth: 180,
|
||||||
|
|||||||
@@ -0,0 +1,148 @@
|
|||||||
|
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: 'unitCode',
|
||||||
|
minWidth: 150,
|
||||||
|
span: 24,
|
||||||
|
search: true,
|
||||||
|
searchOrder: 4,
|
||||||
|
searchSpan: 6,
|
||||||
|
maxlength: 50,
|
||||||
|
showWordLimit: true,
|
||||||
|
rules: [
|
||||||
|
{ required: true, message: '请输入计量单位编码', trigger: 'blur' },
|
||||||
|
{ max: 50, message: '计量单位编码不能超过50个字', trigger: 'blur' },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
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,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
});
|
||||||
@@ -2,7 +2,6 @@ import {
|
|||||||
auditColumns,
|
auditColumns,
|
||||||
createCrudOption,
|
createCrudOption,
|
||||||
packageOptions,
|
packageOptions,
|
||||||
priceUnitOptions,
|
|
||||||
textRule,
|
textRule,
|
||||||
} from './common';
|
} from './common';
|
||||||
|
|
||||||
@@ -25,10 +24,42 @@ export const config = {
|
|||||||
enableAllDept: false,
|
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([
|
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: '货物名称',
|
label: '货物名称',
|
||||||
prop: 'cargoName',
|
prop: 'cargoName',
|
||||||
|
order: 50,
|
||||||
|
span: 12,
|
||||||
minWidth: 150,
|
minWidth: 150,
|
||||||
placeholder: '请输入',
|
placeholder: '请输入',
|
||||||
rules: textRule('货物名称', 100, true),
|
rules: textRule('货物名称', 100, true),
|
||||||
@@ -37,6 +68,8 @@ export const option = createCrudOption([
|
|||||||
label: '货物编号',
|
label: '货物编号',
|
||||||
prop: 'cargoCode',
|
prop: 'cargoCode',
|
||||||
formslot: true,
|
formslot: true,
|
||||||
|
order: 49,
|
||||||
|
span: 12,
|
||||||
minWidth: 120,
|
minWidth: 120,
|
||||||
maxlength: 20,
|
maxlength: 20,
|
||||||
showWordLimit: true,
|
showWordLimit: true,
|
||||||
@@ -45,14 +78,6 @@ export const option = createCrudOption([
|
|||||||
{ max: 20, message: '货物编号不能超过20个字符', trigger: 'blur' },
|
{ max: 20, message: '货物编号不能超过20个字符', trigger: 'blur' },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
|
||||||
label: '一级货物类型',
|
|
||||||
prop: 'firstCargoTypeName',
|
|
||||||
formslot: true,
|
|
||||||
minWidth: 150,
|
|
||||||
editDisabled: true,
|
|
||||||
rules: [{ required: true, message: '请选择一级货物类型', trigger: 'change' }],
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
label: '一级货物类型编码',
|
label: '一级货物类型编码',
|
||||||
prop: 'firstCargoTypeCode',
|
prop: 'firstCargoTypeCode',
|
||||||
@@ -61,14 +86,6 @@ export const option = createCrudOption([
|
|||||||
addDisplay: false,
|
addDisplay: false,
|
||||||
editDisabled: true,
|
editDisabled: true,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
label: '二级货物类型',
|
|
||||||
prop: 'secondCargoTypeName',
|
|
||||||
formslot: true,
|
|
||||||
minWidth: 150,
|
|
||||||
editDisabled: true,
|
|
||||||
rules: [{ required: true, message: '请选择二级货物类型', trigger: 'change' }],
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
label: '二级货物类型编码',
|
label: '二级货物类型编码',
|
||||||
prop: 'secondCargoTypeCode',
|
prop: 'secondCargoTypeCode',
|
||||||
@@ -174,12 +191,16 @@ export const option = createCrudOption([
|
|||||||
prop: 'packageType',
|
prop: 'packageType',
|
||||||
type: 'select',
|
type: 'select',
|
||||||
dicData: packageOptions,
|
dicData: packageOptions,
|
||||||
|
order: 39,
|
||||||
|
span: 12,
|
||||||
minWidth: 100,
|
minWidth: 100,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '品牌',
|
label: '品牌',
|
||||||
prop: 'brand',
|
prop: 'brand',
|
||||||
search: false,
|
search: false,
|
||||||
|
order: 40,
|
||||||
|
span: 12,
|
||||||
minWidth: 120,
|
minWidth: 120,
|
||||||
placeholder: '请输入',
|
placeholder: '请输入',
|
||||||
rules: textRule('品牌', 50),
|
rules: textRule('品牌', 50),
|
||||||
@@ -187,22 +208,18 @@ export const option = createCrudOption([
|
|||||||
{
|
{
|
||||||
label: '规格',
|
label: '规格',
|
||||||
prop: 'specification',
|
prop: 'specification',
|
||||||
|
order: 29,
|
||||||
|
span: 12,
|
||||||
minWidth: 120,
|
minWidth: 120,
|
||||||
placeholder: '请输入',
|
placeholder: '请输入',
|
||||||
rules: textRule('规格', 50),
|
rules: textRule('规格', 50),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '型号',
|
label: '货值',
|
||||||
prop: 'model',
|
|
||||||
minWidth: 120,
|
|
||||||
placeholder: '请输入',
|
|
||||||
rules: textRule('型号', 50),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '单价',
|
|
||||||
prop: 'cargoValue',
|
prop: 'cargoValue',
|
||||||
formslot: true,
|
formslot: true,
|
||||||
formatter: row => (String(row.cargoValue) === '-1' ? '' : row.cargoValue),
|
order: 30,
|
||||||
|
formatter: row => formatCargoValue(row.cargoValue),
|
||||||
minWidth: 120,
|
minWidth: 120,
|
||||||
rules: [
|
rules: [
|
||||||
{
|
{
|
||||||
@@ -225,10 +242,19 @@ export const option = createCrudOption([
|
|||||||
label: '计价单位',
|
label: '计价单位',
|
||||||
prop: 'priceUnit',
|
prop: 'priceUnit',
|
||||||
type: 'select',
|
type: 'select',
|
||||||
dicData: priceUnitOptions,
|
dicData: [],
|
||||||
display: false,
|
display: false,
|
||||||
minWidth: 120,
|
minWidth: 120,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: '型号',
|
||||||
|
prop: 'model',
|
||||||
|
order: 19,
|
||||||
|
span: 12,
|
||||||
|
minWidth: 120,
|
||||||
|
placeholder: '请输入',
|
||||||
|
rules: textRule('型号', 50, true),
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: '尺寸',
|
label: '尺寸',
|
||||||
prop: 'sizeText',
|
prop: 'sizeText',
|
||||||
@@ -238,23 +264,19 @@ export const option = createCrudOption([
|
|||||||
rules: textRule('尺寸', 100),
|
rules: textRule('尺寸', 100),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '其他说明1',
|
label: '说明',
|
||||||
prop: 'descriptionOne',
|
prop: 'descriptionOne',
|
||||||
|
order: 20,
|
||||||
|
span: 12,
|
||||||
minWidth: 160,
|
minWidth: 160,
|
||||||
placeholder: '请输入',
|
placeholder: '请输入',
|
||||||
rules: textRule('其他说明1', 100),
|
rules: textRule('说明', 100),
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '其他说明2',
|
|
||||||
prop: 'descriptionTwo',
|
|
||||||
minWidth: 160,
|
|
||||||
placeholder: '请输入',
|
|
||||||
rules: textRule('其他说明2', 100),
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '备注',
|
label: '备注',
|
||||||
prop: 'remark',
|
prop: 'remark',
|
||||||
type: 'textarea',
|
type: 'textarea',
|
||||||
|
order: 10,
|
||||||
minRows: 2,
|
minRows: 2,
|
||||||
span: 24,
|
span: 24,
|
||||||
maxlength: 200,
|
maxlength: 200,
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ export const planStatusOptions = [
|
|||||||
export const waybillStatusOptions = [
|
export const waybillStatusOptions = [
|
||||||
{ label: '草稿', value: 'draft' },
|
{ label: '草稿', value: 'draft' },
|
||||||
{ label: '待执行', value: 'pending' },
|
{ label: '待执行', value: 'pending' },
|
||||||
{ label: '进行中', value: 'processing' },
|
{ label: '进行中', value: 'running' },
|
||||||
{ label: '已完成', value: 'completed' },
|
{ label: '已完成', value: 'completed' },
|
||||||
{ label: '已取消', value: 'cancelled' },
|
{ label: '已取消', value: 'cancelled' },
|
||||||
];
|
];
|
||||||
@@ -49,7 +49,6 @@ export const waybillStatusOptions = [
|
|||||||
export const dataSourceOptions = [
|
export const dataSourceOptions = [
|
||||||
{ label: '手工创建', value: '手工创建' },
|
{ label: '手工创建', value: '手工创建' },
|
||||||
{ label: '批量导入', value: '批量导入' },
|
{ label: '批量导入', value: '批量导入' },
|
||||||
{ label: '模板生成', value: '模板生成' },
|
|
||||||
{ label: '计划调度', value: '计划调度' },
|
{ label: '计划调度', value: '计划调度' },
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -98,6 +97,11 @@ export const businessTypeOptions = [
|
|||||||
{ label: '普通业务', value: '普通业务' },
|
{ label: '普通业务', value: '普通业务' },
|
||||||
];
|
];
|
||||||
|
|
||||||
|
export const businessModeOptions = [
|
||||||
|
{ label: '国内运输', value: '国内运输' },
|
||||||
|
{ label: '跨境运输', value: '跨境运输' },
|
||||||
|
];
|
||||||
|
|
||||||
export const settlementModeOptions = [
|
export const settlementModeOptions = [
|
||||||
{ label: '先票后款', value: '先票后款' },
|
{ label: '先票后款', value: '先票后款' },
|
||||||
{ label: '先款后票', value: '先款后票' },
|
{ label: '先款后票', value: '先款后票' },
|
||||||
@@ -126,12 +130,18 @@ export const contractApprovalStatusOptions = [
|
|||||||
{ label: '草稿', value: 'draft' },
|
{ label: '草稿', value: 'draft' },
|
||||||
{ label: '审批中', value: 'reviewing' },
|
{ label: '审批中', value: 'reviewing' },
|
||||||
{ label: '已驳回', value: 'rejected' },
|
{ label: '已驳回', value: 'rejected' },
|
||||||
|
{ label: '已撤回', value: 'withdrawn' },
|
||||||
{ label: '审批通过', value: 'approved' },
|
{ label: '审批通过', value: 'approved' },
|
||||||
{ label: '变更审批中', value: 'change_reviewing' },
|
{ label: '变更审批中', value: 'change_reviewing' },
|
||||||
{ label: '变更驳回', value: 'change_rejected' },
|
{ label: '变更驳回', value: 'change_rejected' },
|
||||||
{ label: '变更审批通过', value: 'change_approved' },
|
{ label: '变更审批通过', value: 'change_approved' },
|
||||||
];
|
];
|
||||||
|
|
||||||
|
export const contractArchiveStatusOptions = [
|
||||||
|
{ label: '未归档', value: '未归档' },
|
||||||
|
{ label: '已归档', value: '已归档' },
|
||||||
|
];
|
||||||
|
|
||||||
export const nodeOptions = [
|
export const nodeOptions = [
|
||||||
{ label: '接单', value: '接单' },
|
{ label: '接单', value: '接单' },
|
||||||
{ label: '到场', value: '到场' },
|
{ label: '到场', value: '到场' },
|
||||||
@@ -170,6 +180,32 @@ export const nonNegativeRule = label => ({
|
|||||||
trigger: 'blur',
|
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 => ({
|
export const phoneRule = label => ({
|
||||||
pattern: /^1[3-9]\d{9}$/,
|
pattern: /^1[3-9]\d{9}$/,
|
||||||
message: `${label}格式不正确`,
|
message: `${label}格式不正确`,
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import {
|
import {
|
||||||
auditColumns,
|
auditColumns,
|
||||||
contractApprovalStatusOptions,
|
contractApprovalStatusOptions,
|
||||||
|
contractArchiveStatusOptions,
|
||||||
contractCategoryOptions,
|
contractCategoryOptions,
|
||||||
contractStageOptions,
|
contractStageOptions,
|
||||||
createCrudOption,
|
createCrudOption,
|
||||||
@@ -27,6 +28,12 @@ const listDicFormatter = res => {
|
|||||||
return [];
|
return [];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const projectNameDicFormatter = res => {
|
||||||
|
const list = listDicFormatter(res);
|
||||||
|
// 过滤掉 projectName 为空的记录
|
||||||
|
return list.filter(item => item && item.projectName && String(item.projectName).trim());
|
||||||
|
};
|
||||||
|
|
||||||
export const config = {
|
export const config = {
|
||||||
title: '合同管理',
|
title: '合同管理',
|
||||||
permission: 'contract_manage',
|
permission: 'contract_manage',
|
||||||
@@ -42,7 +49,7 @@ export const config = {
|
|||||||
batchDelete: false,
|
batchDelete: false,
|
||||||
enableProjectSelect: true,
|
enableProjectSelect: true,
|
||||||
projectQueryParams: {
|
projectQueryParams: {
|
||||||
approvalStatuses: 'approved,change_approved',
|
contractSelectable: true,
|
||||||
},
|
},
|
||||||
actions: ['copy'],
|
actions: ['copy'],
|
||||||
statusProp: 'approvalStatus',
|
statusProp: 'approvalStatus',
|
||||||
@@ -65,6 +72,10 @@ export const config = {
|
|||||||
['legalSealFlag', '是否需要加盖法人章'],
|
['legalSealFlag', '是否需要加盖法人章'],
|
||||||
['copyCount', '一式(份)'],
|
['copyCount', '一式(份)'],
|
||||||
['paymentDays', '回款账期(天)'],
|
['paymentDays', '回款账期(天)'],
|
||||||
|
['contractAmount', '合同金额'],
|
||||||
|
['templateFlag', '是否范本'],
|
||||||
|
['originalContractNo', '原件合同编号'],
|
||||||
|
['electronicSealFlag', '是否电子章'],
|
||||||
['remark', '备注', 2],
|
['remark', '备注', 2],
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
@@ -78,6 +89,7 @@ export const config = {
|
|||||||
['effectiveType', '生效类型'],
|
['effectiveType', '生效类型'],
|
||||||
['contractStage', '合同阶段'],
|
['contractStage', '合同阶段'],
|
||||||
['approvalStatus', '审核状态'],
|
['approvalStatus', '审核状态'],
|
||||||
|
['archiveStatus', '归档状态'],
|
||||||
['currentNode', '当前节点'],
|
['currentNode', '当前节点'],
|
||||||
['currentProcessor', '当前处理人'],
|
['currentProcessor', '当前处理人'],
|
||||||
],
|
],
|
||||||
@@ -98,7 +110,7 @@ export const config = {
|
|||||||
},
|
},
|
||||||
deleteStatus: ['draft'],
|
deleteStatus: ['draft'],
|
||||||
deleteStage: ['draft'],
|
deleteStage: ['draft'],
|
||||||
editStatus: ['draft', 'rejected', 'change_rejected'],
|
editStatus: ['draft', 'withdrawn', 'rejected', 'change_rejected'],
|
||||||
operations: [
|
operations: [
|
||||||
{
|
{
|
||||||
action: 'flow',
|
action: 'flow',
|
||||||
@@ -265,8 +277,8 @@ export const option = createCrudOption([
|
|||||||
formslot: true,
|
formslot: true,
|
||||||
order: 165,
|
order: 165,
|
||||||
dicUrl:
|
dicUrl:
|
||||||
'/blade-transport/project-apply/list?current=1&size=9999&approvalStatuses=approved,change_approved',
|
'/blade-transport/project-apply/list?current=1&size=9999&contractSelectable=true',
|
||||||
dicFormatter: listDicFormatter,
|
dicFormatter: projectNameDicFormatter,
|
||||||
props: {
|
props: {
|
||||||
label: 'projectName',
|
label: 'projectName',
|
||||||
value: 'projectName',
|
value: 'projectName',
|
||||||
@@ -479,6 +491,47 @@ export const option = createCrudOption([
|
|||||||
order: 50,
|
order: 50,
|
||||||
minWidth: 130,
|
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: '创建时间',
|
label: '创建时间',
|
||||||
prop: 'createTime',
|
prop: 'createTime',
|
||||||
@@ -516,6 +569,19 @@ export const option = createCrudOption([
|
|||||||
addDisplay: false,
|
addDisplay: false,
|
||||||
editDisplay: false,
|
editDisplay: false,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: '归档状态',
|
||||||
|
prop: 'archiveStatus',
|
||||||
|
type: 'select',
|
||||||
|
search: true,
|
||||||
|
searchOrder: 5,
|
||||||
|
searchPlaceholder: '请选择',
|
||||||
|
slot: true,
|
||||||
|
dicData: contractArchiveStatusOptions,
|
||||||
|
minWidth: 110,
|
||||||
|
addDisplay: false,
|
||||||
|
editDisplay: false,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: '当前节点',
|
label: '当前节点',
|
||||||
prop: 'currentNode',
|
prop: 'currentNode',
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ export const transportTypeDict = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
export const carrierTypeOptions = ['承运商', '自运', '网货平台'];
|
export const carrierTypeOptions = ['承运商', '自运'];
|
||||||
|
|
||||||
export const loadingStatusOptions = [
|
export const loadingStatusOptions = [
|
||||||
{ label: '草稿', value: 'draft' },
|
{ label: '草稿', value: 'draft' },
|
||||||
|
|||||||
@@ -138,7 +138,6 @@ export const option = {
|
|||||||
searchPlaceholder: '请选择',
|
searchPlaceholder: '请选择',
|
||||||
dicData: processStatusOptions,
|
dicData: processStatusOptions,
|
||||||
slot: true,
|
slot: true,
|
||||||
hide: true,
|
|
||||||
fixed: 'right',
|
fixed: 'right',
|
||||||
minWidth: 100,
|
minWidth: 100,
|
||||||
addDisplay: false,
|
addDisplay: false,
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import {
|
import {
|
||||||
auditColumns,
|
auditColumns,
|
||||||
|
businessModeOptions,
|
||||||
businessTypeOptions,
|
businessTypeOptions,
|
||||||
createCrudOption,
|
createCrudOption,
|
||||||
nonNegativeRule,
|
nonNegativeRule,
|
||||||
@@ -16,6 +17,18 @@ const projectEffectiveTypeOptions = [
|
|||||||
{ label: '正式', value: 'formal' },
|
{ 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 => [
|
const amountRules = label => [
|
||||||
{ required: true, message: `请输入${label}`, trigger: 'blur' },
|
{ required: true, message: `请输入${label}`, trigger: 'blur' },
|
||||||
nonNegativeRule(label),
|
nonNegativeRule(label),
|
||||||
@@ -117,7 +130,7 @@ export const option = createCrudOption([
|
|||||||
hide: true,
|
hide: true,
|
||||||
minWidth: 140,
|
minWidth: 140,
|
||||||
maxlength: 20,
|
maxlength: 20,
|
||||||
rules: textRule('项目简称', 20, true),
|
rules: textRule('项目简称', 20),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '项目类型',
|
label: '项目类型',
|
||||||
@@ -156,16 +169,16 @@ export const option = createCrudOption([
|
|||||||
rules: textRule('业务部门', 50, true),
|
rules: textRule('业务部门', 50, true),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '承办部门',
|
label: '平台公司',
|
||||||
prop: 'undertakeDeptName',
|
prop: 'undertakeDeptName',
|
||||||
search: true,
|
search: true,
|
||||||
searchPlaceholder: '请输入',
|
searchPlaceholder: '请输入',
|
||||||
searchOrder: 8,
|
searchOrder: 8,
|
||||||
minWidth: 150,
|
minWidth: 150,
|
||||||
rules: textRule('承办部门', 50, true),
|
rules: textRule('平台公司', 50, true),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '承办部门ID',
|
label: '平台公司ID',
|
||||||
prop: 'undertakeDeptId',
|
prop: 'undertakeDeptId',
|
||||||
hide: true,
|
hide: true,
|
||||||
},
|
},
|
||||||
@@ -179,6 +192,15 @@ export const option = createCrudOption([
|
|||||||
formatter: row => formatUserRealName(row, 'principal'),
|
formatter: row => formatUserRealName(row, 'principal'),
|
||||||
rules: textRule('项目负责人', 50, true),
|
rules: textRule('项目负责人', 50, true),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: '资金使用风险',
|
||||||
|
prop: 'fundUseRisk',
|
||||||
|
slot: true,
|
||||||
|
minWidth: 150,
|
||||||
|
addDisplay: false,
|
||||||
|
editDisplay: false,
|
||||||
|
hide: false,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: '项目负责人ID',
|
label: '项目负责人ID',
|
||||||
prop: 'principalUserId',
|
prop: 'principalUserId',
|
||||||
@@ -293,6 +315,15 @@ export const option = createCrudOption([
|
|||||||
hide: true,
|
hide: true,
|
||||||
minWidth: 130,
|
minWidth: 130,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: '业务模式',
|
||||||
|
prop: 'businessMode',
|
||||||
|
type: 'select',
|
||||||
|
dicData: businessModeOptions,
|
||||||
|
hide: true,
|
||||||
|
minWidth: 120,
|
||||||
|
rules: [selectRule('业务模式')],
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: '项目规模(万元)',
|
label: '项目规模(万元)',
|
||||||
prop: 'projectScale',
|
prop: 'projectScale',
|
||||||
@@ -311,6 +342,15 @@ export const option = createCrudOption([
|
|||||||
minWidth: 150,
|
minWidth: 150,
|
||||||
rules: [nonNegativeRule('预计利润')],
|
rules: [nonNegativeRule('预计利润')],
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: '利润率(%)',
|
||||||
|
prop: 'profitRate',
|
||||||
|
type: 'number',
|
||||||
|
precision: 2,
|
||||||
|
hide: true,
|
||||||
|
minWidth: 120,
|
||||||
|
rules: [nonNegativeRule('利润率')],
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: '资金需求(万元)',
|
label: '资金需求(万元)',
|
||||||
prop: 'fundDemand',
|
prop: 'fundDemand',
|
||||||
|
|||||||
@@ -55,8 +55,8 @@ export const config = {
|
|||||||
'templateType',
|
'templateType',
|
||||||
'transportType',
|
'transportType',
|
||||||
'createUserName',
|
'createUserName',
|
||||||
'remark',
|
|
||||||
'updateTime',
|
'updateTime',
|
||||||
|
'remark',
|
||||||
'createTime',
|
'createTime',
|
||||||
],
|
],
|
||||||
exportColumns: [
|
exportColumns: [
|
||||||
@@ -65,8 +65,8 @@ export const config = {
|
|||||||
{ prop: 'templateType', label: '模板类型' },
|
{ prop: 'templateType', label: '模板类型' },
|
||||||
{ prop: 'transportType', label: '运输方式' },
|
{ prop: 'transportType', label: '运输方式' },
|
||||||
{ prop: 'createUserName', label: '创建人' },
|
{ prop: 'createUserName', label: '创建人' },
|
||||||
{ prop: 'remark', label: '备注' },
|
|
||||||
{ prop: 'updateTime', label: '更新时间' },
|
{ prop: 'updateTime', label: '更新时间' },
|
||||||
|
{ prop: 'remark', label: '备注' },
|
||||||
{ prop: 'createTime', label: '创建时间' },
|
{ prop: 'createTime', label: '创建时间' },
|
||||||
],
|
],
|
||||||
enableAllDept: false,
|
enableAllDept: false,
|
||||||
@@ -82,12 +82,14 @@ export const config = {
|
|||||||
detailAttachmentDescriptionPlain: true,
|
detailAttachmentDescriptionPlain: true,
|
||||||
enableTransportPlanForm: true,
|
enableTransportPlanForm: true,
|
||||||
enableShippingTemplateFreight: true,
|
enableShippingTemplateFreight: true,
|
||||||
editableRoadAddress: true,
|
editableRoadAddress: false,
|
||||||
fixedTransportAddressType: true,
|
fixedTransportAddressType: true,
|
||||||
enableTemplateCodePreview: true,
|
enableTemplateCodePreview: true,
|
||||||
attachmentTitle: '附件',
|
attachmentTitle: '附件',
|
||||||
defaultForm: {
|
defaultForm: {
|
||||||
templateType: '运输计划',
|
templateType: '运输计划',
|
||||||
|
transportType: '公路运输',
|
||||||
|
transportTypeName: '公路运输',
|
||||||
},
|
},
|
||||||
transportFormRequiredFields: [
|
transportFormRequiredFields: [
|
||||||
['projectName', '项目'],
|
['projectName', '项目'],
|
||||||
@@ -119,15 +121,16 @@ export const option = {
|
|||||||
labelWidth: 0,
|
labelWidth: 0,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '模板编号',
|
label: '模板类型',
|
||||||
prop: 'templateCode',
|
prop: 'templateType',
|
||||||
|
type: 'select',
|
||||||
search: true,
|
search: true,
|
||||||
searchOrder: 4,
|
searchOrder: 2,
|
||||||
span: 8,
|
span: 8,
|
||||||
order: 390,
|
order: 390,
|
||||||
minWidth: 170,
|
dicData: templateTypeOptions,
|
||||||
disabled: true,
|
minWidth: 120,
|
||||||
placeholder: '系统自动生成',
|
rules: selectRule('模板类型'),
|
||||||
display: true,
|
display: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -142,16 +145,15 @@ export const option = {
|
|||||||
display: true,
|
display: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '模板类型',
|
label: '模板编号',
|
||||||
prop: 'templateType',
|
prop: 'templateCode',
|
||||||
type: 'select',
|
|
||||||
search: true,
|
search: true,
|
||||||
searchOrder: 2,
|
searchOrder: 4,
|
||||||
span: 8,
|
span: 8,
|
||||||
order: 370,
|
order: 370,
|
||||||
dicData: templateTypeOptions,
|
minWidth: 170,
|
||||||
minWidth: 120,
|
disabled: true,
|
||||||
rules: selectRule('模板类型'),
|
placeholder: '系统自动生成',
|
||||||
display: true,
|
display: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -269,7 +271,7 @@ export const option = {
|
|||||||
order: 270,
|
order: 270,
|
||||||
hide: true,
|
hide: true,
|
||||||
labelWidth: '0px',
|
labelWidth: '0px',
|
||||||
className: 'business-crud-page__full-form-item',
|
className: 'shipping-template-page__full-form-item',
|
||||||
},
|
},
|
||||||
{ label: '运费信息', prop: 'freightJson', hide: true, display: false },
|
{ label: '运费信息', prop: 'freightJson', hide: true, display: false },
|
||||||
{
|
{
|
||||||
@@ -290,7 +292,7 @@ export const option = {
|
|||||||
order: 250,
|
order: 250,
|
||||||
hide: true,
|
hide: true,
|
||||||
labelWidth: '0px',
|
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: 'projectId', hide: true, display: false },
|
||||||
{ label: '客户合同ID', prop: 'contractId', hide: true, display: false },
|
{ label: '客户合同ID', prop: 'contractId', hide: true, display: false },
|
||||||
@@ -300,7 +302,14 @@ export const option = {
|
|||||||
{ label: '收货地', prop: 'arrivalName', hide: true, display: false },
|
{ label: '收货地', prop: 'arrivalName', hide: true, display: false },
|
||||||
{ label: '收货联系人', prop: 'arrivalContact', hide: true, display: false },
|
{ label: '收货联系人', prop: 'arrivalContact', hide: true, display: false },
|
||||||
{ label: '收货联系方式', prop: 'arrivalPhone', 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 => ({
|
...auditColumns.map(column => ({
|
||||||
...column,
|
...column,
|
||||||
display: false,
|
display: false,
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import {
|
|||||||
createCrudOption,
|
createCrudOption,
|
||||||
nonNegativeRule,
|
nonNegativeRule,
|
||||||
textRule,
|
textRule,
|
||||||
|
withSearchPlaceholders,
|
||||||
} from './common';
|
} from './common';
|
||||||
|
|
||||||
const listDicFormatter = res => {
|
const listDicFormatter = res => {
|
||||||
@@ -15,6 +16,12 @@ const listDicFormatter = res => {
|
|||||||
return [];
|
return [];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const projectNameDicFormatter = res => {
|
||||||
|
const list = listDicFormatter(res);
|
||||||
|
// 过滤掉 projectName 为空的记录
|
||||||
|
return list.filter(item => item && item.projectName && String(item.projectName).trim());
|
||||||
|
};
|
||||||
|
|
||||||
const userDicFormatter = res =>
|
const userDicFormatter = res =>
|
||||||
listDicFormatter(res).map(user => ({
|
listDicFormatter(res).map(user => ({
|
||||||
...user,
|
...user,
|
||||||
@@ -50,30 +57,25 @@ export const config = {
|
|||||||
detailAlignCenter: true,
|
detailAlignCenter: true,
|
||||||
detailSections: [
|
detailSections: [
|
||||||
{
|
{
|
||||||
title: '申请信息',
|
title: '项目额度信息',
|
||||||
fields: [
|
fields: [
|
||||||
['applicationNo', '申请单号', 1],
|
['projectName', '项目名称', 1],
|
||||||
['projectName', '项目', 1],
|
|
||||||
['projectCode', '项目编号', 1],
|
['projectCode', '项目编号', 1],
|
||||||
['undertakeDeptName', '承办部门', 1],
|
['undertakeDeptName', '承办部门', 1],
|
||||||
['applyDeptName', '申请部门', 1],
|
|
||||||
['applicantName', '申请人', 1],
|
|
||||||
['approvalStatus', '审批状态', 1],
|
|
||||||
['currentNode', '当前节点', 1],
|
|
||||||
['currentProcessor', '当前处理人', 1],
|
|
||||||
['validUntil', '申请有效期至', 1],
|
|
||||||
['remark', '备注', 1],
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '额度信息',
|
|
||||||
fields: [
|
|
||||||
['projectFundLimit', '项目资金使用额度(万元)', 1],
|
['projectFundLimit', '项目资金使用额度(万元)', 1],
|
||||||
['usedFundLimit', '已使用项目资金使用额度(万元)', 1],
|
['usedFundLimit', '已使用项目资金使用额度(万元)', 1],
|
||||||
['remainingFundLimit', '剩余项目资金使用额度(万元)', 1],
|
['remainingFundLimit', '剩余项目资金使用额度(万元)', 1],
|
||||||
['applyLimit', '申请临时额度(万元)', 1],
|
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: '临时额度信息',
|
||||||
|
fields: [
|
||||||
|
['applyLimit', '申请临时额度(万元)', 1],
|
||||||
|
['validUntil', '申请有效期至', 1],
|
||||||
|
['remark', '备注', 4],
|
||||||
|
],
|
||||||
|
showAttachment: true,
|
||||||
|
},
|
||||||
],
|
],
|
||||||
operations: [
|
operations: [
|
||||||
{
|
{
|
||||||
@@ -118,7 +120,10 @@ export const config = {
|
|||||||
|
|
||||||
export const option = {
|
export const option = {
|
||||||
dialogCustomClass: 'temporary-credit-limit-dialog',
|
dialogCustomClass: 'temporary-credit-limit-dialog',
|
||||||
...createCrudOption([
|
addTitle: '新增临时额度申请',
|
||||||
|
editTitle: '编辑临时额度申请',
|
||||||
|
viewTitle: '查看临时额度申请',
|
||||||
|
...createCrudOption(withSearchPlaceholders([
|
||||||
{
|
{
|
||||||
label: '申请单号',
|
label: '申请单号',
|
||||||
prop: 'applicationNo',
|
prop: 'applicationNo',
|
||||||
@@ -129,6 +134,14 @@ export const option = {
|
|||||||
editDisplay: false,
|
editDisplay: false,
|
||||||
editDisabled: true,
|
editDisabled: true,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: '',
|
||||||
|
prop: 'projectQuotaInfoTitle',
|
||||||
|
formslot: true,
|
||||||
|
span: 24,
|
||||||
|
hide: true,
|
||||||
|
labelWidth: 0,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: '项目名称',
|
label: '项目名称',
|
||||||
prop: 'projectName',
|
prop: 'projectName',
|
||||||
@@ -137,7 +150,7 @@ export const option = {
|
|||||||
searchType: 'select',
|
searchType: 'select',
|
||||||
formslot: true,
|
formslot: true,
|
||||||
dicUrl: '/blade-transport/project-apply/list?current=1&size=9999',
|
dicUrl: '/blade-transport/project-apply/list?current=1&size=9999',
|
||||||
dicFormatter: listDicFormatter,
|
dicFormatter: projectNameDicFormatter,
|
||||||
props: {
|
props: {
|
||||||
label: 'projectName',
|
label: 'projectName',
|
||||||
value: 'projectName',
|
value: 'projectName',
|
||||||
@@ -158,6 +171,7 @@ export const option = {
|
|||||||
prop: 'projectCode',
|
prop: 'projectCode',
|
||||||
hide: true,
|
hide: true,
|
||||||
disabled: true,
|
disabled: true,
|
||||||
|
placeholder: '请输入',
|
||||||
span: 6,
|
span: 6,
|
||||||
minWidth: 150,
|
minWidth: 150,
|
||||||
rules: textRule('项目编号', 50),
|
rules: textRule('项目编号', 50),
|
||||||
@@ -167,6 +181,7 @@ export const option = {
|
|||||||
prop: 'undertakeDeptName',
|
prop: 'undertakeDeptName',
|
||||||
hide: true,
|
hide: true,
|
||||||
disabled: true,
|
disabled: true,
|
||||||
|
placeholder: '请输入',
|
||||||
span: 6,
|
span: 6,
|
||||||
minWidth: 150,
|
minWidth: 150,
|
||||||
rules: textRule('承办部门', 50, true),
|
rules: textRule('承办部门', 50, true),
|
||||||
@@ -176,6 +191,7 @@ export const option = {
|
|||||||
prop: 'projectFundLimit',
|
prop: 'projectFundLimit',
|
||||||
hide: true,
|
hide: true,
|
||||||
disabled: true,
|
disabled: true,
|
||||||
|
placeholder: '请输入',
|
||||||
span: 6,
|
span: 6,
|
||||||
minWidth: 200,
|
minWidth: 200,
|
||||||
rules: [nonNegativeRule('项目资金使用额度')],
|
rules: [nonNegativeRule('项目资金使用额度')],
|
||||||
@@ -185,6 +201,7 @@ export const option = {
|
|||||||
prop: 'usedFundLimit',
|
prop: 'usedFundLimit',
|
||||||
hide: true,
|
hide: true,
|
||||||
disabled: true,
|
disabled: true,
|
||||||
|
placeholder: '请输入',
|
||||||
span: 6,
|
span: 6,
|
||||||
minWidth: 220,
|
minWidth: 220,
|
||||||
value: 0,
|
value: 0,
|
||||||
@@ -195,11 +212,20 @@ export const option = {
|
|||||||
prop: 'remainingFundLimit',
|
prop: 'remainingFundLimit',
|
||||||
hide: true,
|
hide: true,
|
||||||
disabled: true,
|
disabled: true,
|
||||||
|
placeholder: '请输入',
|
||||||
span: 6,
|
span: 6,
|
||||||
minWidth: 230,
|
minWidth: 230,
|
||||||
value: 0,
|
value: 0,
|
||||||
rules: [nonNegativeRule('剩余项目资金使用额度')],
|
rules: [nonNegativeRule('剩余项目资金使用额度')],
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: '',
|
||||||
|
prop: 'temporaryCreditInfoTitle',
|
||||||
|
formslot: true,
|
||||||
|
span: 24,
|
||||||
|
hide: true,
|
||||||
|
labelWidth: 0,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: '申请临时额度(万元)',
|
label: '申请临时额度(万元)',
|
||||||
prop: 'applyLimit',
|
prop: 'applyLimit',
|
||||||
@@ -217,9 +243,31 @@ export const option = {
|
|||||||
type: 'date',
|
type: 'date',
|
||||||
format: 'YYYY-MM-DD',
|
format: 'YYYY-MM-DD',
|
||||||
valueFormat: 'YYYY-MM-DD',
|
valueFormat: 'YYYY-MM-DD',
|
||||||
|
placeholder: '请选择',
|
||||||
span: 6,
|
span: 6,
|
||||||
minWidth: 140,
|
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: '申请部门',
|
label: '申请部门',
|
||||||
@@ -284,27 +332,9 @@ export const option = {
|
|||||||
addDisplay: false,
|
addDisplay: false,
|
||||||
editDisplay: 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 })),
|
...auditColumns.map(column => ({ ...column, hide: true })),
|
||||||
]),
|
])),
|
||||||
dialogWidth: '96%',
|
dialogWidth: '1100px',
|
||||||
menuFixed: 'right',
|
menuFixed: 'right',
|
||||||
menuWidth: 320,
|
menuWidth: 320,
|
||||||
index: false,
|
index: false,
|
||||||
|
|||||||
@@ -23,6 +23,12 @@ const listDicFormatter = res => {
|
|||||||
return [];
|
return [];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const projectNameDicFormatter = res => {
|
||||||
|
const list = listDicFormatter(res);
|
||||||
|
// 过滤掉 projectName 为空的记录
|
||||||
|
return list.filter(item => item && item.projectName && String(item.projectName).trim());
|
||||||
|
};
|
||||||
|
|
||||||
const parseGoodsRows = value => {
|
const parseGoodsRows = value => {
|
||||||
if (!value) return [];
|
if (!value) return [];
|
||||||
if (Array.isArray(value)) return value;
|
if (Array.isArray(value)) return value;
|
||||||
@@ -66,14 +72,8 @@ const getSecondCargoTypeName = item =>
|
|||||||
'货物';
|
'货物';
|
||||||
|
|
||||||
const formatGoodsInfo = row => {
|
const formatGoodsInfo = row => {
|
||||||
const rows = [
|
const rows =
|
||||||
row.goodsJson,
|
[row.goodsJson, row.goodsList, row.goodsRows, row.cargoList, row.cargoRows, row.goods]
|
||||||
row.goodsList,
|
|
||||||
row.goodsRows,
|
|
||||||
row.cargoList,
|
|
||||||
row.cargoRows,
|
|
||||||
row.goods,
|
|
||||||
]
|
|
||||||
.map(source => parseGoodsRows(source))
|
.map(source => parseGoodsRows(source))
|
||||||
.filter(source => source.length)
|
.filter(source => source.length)
|
||||||
.sort((left, right) => right.length - left.length)[0] || [];
|
.sort((left, right) => right.length - left.length)[0] || [];
|
||||||
@@ -176,9 +176,12 @@ const formatDispatchProgress = row => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const lines = Array.from(summary.entries()).map(
|
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) });
|
const auditColumn = prop => ({ ...auditColumns.find(item => item.prop === prop) });
|
||||||
@@ -188,7 +191,6 @@ export const config = {
|
|||||||
permission: 'transport_plan',
|
permission: 'transport_plan',
|
||||||
exportUrl: '/blade-transport/transport-plan/export-transport-plan',
|
exportUrl: '/blade-transport/transport-plan/export-transport-plan',
|
||||||
exportName: '运输计划',
|
exportName: '运输计划',
|
||||||
enableAllDept: false,
|
|
||||||
enableProjectSelect: true,
|
enableProjectSelect: true,
|
||||||
projectQueryParams: {
|
projectQueryParams: {
|
||||||
approvalStatuses: 'approved,change_approved',
|
approvalStatuses: 'approved,change_approved',
|
||||||
@@ -202,18 +204,18 @@ export const config = {
|
|||||||
enableTransportPlanCreateActions: true,
|
enableTransportPlanCreateActions: true,
|
||||||
enableTransportPlanImport: true,
|
enableTransportPlanImport: true,
|
||||||
fixedTransportAddressType: true,
|
fixedTransportAddressType: true,
|
||||||
transportPlanImportTitle: '导入发货计划',
|
transportPlanImportTitle: '导入运输计划',
|
||||||
transportPlanTemplateUrl: '/blade-transport/transport-plan/export-template',
|
transportPlanTemplateUrl: '/blade-transport/transport-plan/export-template',
|
||||||
attachmentTitle: '附件',
|
attachmentTitle: '附件',
|
||||||
searchRangeMap: {
|
searchRangeMap: {
|
||||||
planStartDateRange: ['planStartDateStart', 'planStartDateEnd'],
|
planStartDateRange: ['planStartDateStart', 'planStartDateEnd'],
|
||||||
planEndDateRange: ['planEndDateStart', 'planEndDateEnd'],
|
createTimeRange: ['createTimeStart', 'createTimeEnd', '00:00:00', '23:59:59'],
|
||||||
},
|
},
|
||||||
actions: ['copy', 'complete'],
|
actions: ['copy', 'complete'],
|
||||||
statusProp: 'businessStatus',
|
statusProp: 'businessStatus',
|
||||||
statusTextProp: 'businessStatusName',
|
statusTextProp: 'businessStatusName',
|
||||||
deleteStatus: ['draft', 'waiting_dispatch'],
|
deleteStatus: ['draft'],
|
||||||
editStatus: ['draft', 'waiting_dispatch'],
|
editStatus: ['draft', 'waiting_dispatch', 'dispatching'],
|
||||||
detailButton: true,
|
detailButton: true,
|
||||||
detailSections: [
|
detailSections: [
|
||||||
{
|
{
|
||||||
@@ -319,7 +321,6 @@ export const option = {
|
|||||||
prop: 'goodsInfo',
|
prop: 'goodsInfo',
|
||||||
formatter: row => formatGoodsInfo(row),
|
formatter: row => formatGoodsInfo(row),
|
||||||
minWidth: 320,
|
minWidth: 320,
|
||||||
className: 'business-crud-page__goods-info-cell',
|
|
||||||
overHidden: false,
|
overHidden: false,
|
||||||
showOverflowTooltip: false,
|
showOverflowTooltip: false,
|
||||||
addDisplay: false,
|
addDisplay: false,
|
||||||
@@ -331,7 +332,6 @@ export const option = {
|
|||||||
prop: 'dispatchProgress',
|
prop: 'dispatchProgress',
|
||||||
formatter: row => formatDispatchProgress(row),
|
formatter: row => formatDispatchProgress(row),
|
||||||
minWidth: 120,
|
minWidth: 120,
|
||||||
className: 'business-crud-page__dispatch-progress-cell',
|
|
||||||
overHidden: false,
|
overHidden: false,
|
||||||
showOverflowTooltip: false,
|
showOverflowTooltip: false,
|
||||||
addDisplay: false,
|
addDisplay: false,
|
||||||
@@ -341,6 +341,7 @@ export const option = {
|
|||||||
{
|
{
|
||||||
label: '发货地址',
|
label: '发货地址',
|
||||||
prop: 'departureAddress',
|
prop: 'departureAddress',
|
||||||
|
slot: true,
|
||||||
formslot: true,
|
formslot: true,
|
||||||
search: true,
|
search: true,
|
||||||
searchOrder: 7,
|
searchOrder: 7,
|
||||||
@@ -352,6 +353,7 @@ export const option = {
|
|||||||
{
|
{
|
||||||
label: '到货地址',
|
label: '到货地址',
|
||||||
prop: 'arrivalAddress',
|
prop: 'arrivalAddress',
|
||||||
|
slot: true,
|
||||||
formslot: true,
|
formslot: true,
|
||||||
search: true,
|
search: true,
|
||||||
searchOrder: 6,
|
searchOrder: 6,
|
||||||
@@ -370,7 +372,7 @@ export const option = {
|
|||||||
span: 6,
|
span: 6,
|
||||||
order: 400,
|
order: 400,
|
||||||
dicUrl: '/blade-transport/project-apply/list?current=1&size=9999',
|
dicUrl: '/blade-transport/project-apply/list?current=1&size=9999',
|
||||||
dicFormatter: listDicFormatter,
|
dicFormatter: projectNameDicFormatter,
|
||||||
props: {
|
props: {
|
||||||
label: 'projectName',
|
label: 'projectName',
|
||||||
value: 'projectName',
|
value: 'projectName',
|
||||||
@@ -397,6 +399,7 @@ export const option = {
|
|||||||
span: 6,
|
span: 6,
|
||||||
order: 350,
|
order: 350,
|
||||||
minWidth: 150,
|
minWidth: 150,
|
||||||
|
rules: [{ required: true, message: '请选择计划开始日期', trigger: 'change' }],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '计划结束日期',
|
label: '计划结束日期',
|
||||||
@@ -407,6 +410,7 @@ export const option = {
|
|||||||
span: 6,
|
span: 6,
|
||||||
order: 340,
|
order: 340,
|
||||||
minWidth: 150,
|
minWidth: 150,
|
||||||
|
rules: [{ required: true, message: '请选择计划结束日期', trigger: 'change' }],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '数据来源',
|
label: '数据来源',
|
||||||
@@ -575,8 +579,8 @@ export const option = {
|
|||||||
viewDisplay: false,
|
viewDisplay: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '计划结束日期',
|
label: '创建时间',
|
||||||
prop: 'planEndDateRange',
|
prop: 'createTimeRange',
|
||||||
type: 'date',
|
type: 'date',
|
||||||
format: 'YYYY-MM-DD',
|
format: 'YYYY-MM-DD',
|
||||||
valueFormat: 'YYYY-MM-DD',
|
valueFormat: 'YYYY-MM-DD',
|
||||||
@@ -606,7 +610,7 @@ export const option = {
|
|||||||
order: 270,
|
order: 270,
|
||||||
hide: true,
|
hide: true,
|
||||||
labelWidth: '0px',
|
labelWidth: '0px',
|
||||||
className: 'business-crud-page__full-form-item',
|
className: 'transport-plan-page__full-form-item',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '',
|
label: '',
|
||||||
@@ -627,7 +631,7 @@ export const option = {
|
|||||||
order: 260,
|
order: 260,
|
||||||
hide: true,
|
hide: true,
|
||||||
labelWidth: '0px',
|
labelWidth: '0px',
|
||||||
className: 'business-crud-page__full-form-item',
|
className: 'transport-plan-page__full-form-item',
|
||||||
},
|
},
|
||||||
])
|
])
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -19,6 +19,12 @@ const transportTypeDict = {
|
|||||||
|
|
||||||
const isEmpty = value => value === undefined || value === null || value === '';
|
const isEmpty = value => value === undefined || value === null || value === '';
|
||||||
const normalizeNumericDisplayValue = value => (Number(value) === -1 ? '' : 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 => {
|
const parseJsonArray = value => {
|
||||||
if (Array.isArray(value)) return value;
|
if (Array.isArray(value)) return value;
|
||||||
@@ -92,14 +98,32 @@ const getProcessConfigNodes = row => {
|
|||||||
|
|
||||||
const isAcceptProcessNode = node => node.key === 'accept' || node.name === '接单';
|
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 =>
|
const requiresDriverAcceptConfirmation = row =>
|
||||||
getProcessConfigNodes(row).some(
|
getProcessConfigNodes(row).some(node => {
|
||||||
node =>
|
if (!isAcceptProcessNode(node) || node.enabled === false) return false;
|
||||||
isAcceptProcessNode(node) &&
|
if (node.confirmMode === 'no_confirm_accept') return false;
|
||||||
node.enabled !== false &&
|
// 与后端一致:是否确认=是 即需接单(不强制依赖 confirmDriver)
|
||||||
node.confirmMode === 'yes' &&
|
return node.confirmMode === 'yes' || !node.confirmMode;
|
||||||
node.confirmDriver === true
|
});
|
||||||
);
|
|
||||||
|
const getDriverRejectReason = row => {
|
||||||
|
if (!row) return '';
|
||||||
|
const reason =
|
||||||
|
row.driverRejectReason ||
|
||||||
|
row.driverRefuseReason ||
|
||||||
|
row.acceptRejectReason ||
|
||||||
|
row.rejectReason ||
|
||||||
|
'';
|
||||||
|
return String(reason || '').trim();
|
||||||
|
};
|
||||||
|
|
||||||
const isDriverRejectedStatus = value => {
|
const isDriverRejectedStatus = value => {
|
||||||
if (value === null || value === undefined || typeof value === 'boolean') return false;
|
if (value === null || value === undefined || typeof value === 'boolean') return false;
|
||||||
@@ -122,6 +146,7 @@ const isDriverRejectedStatus = value => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const hasDriverRejectRecord = row => {
|
const hasDriverRejectRecord = row => {
|
||||||
|
if (String(row.driverAcceptStatus || '').toLowerCase() === 'rejected') return true;
|
||||||
const rejectRecordValues = [
|
const rejectRecordValues = [
|
||||||
row.driverRejectTime,
|
row.driverRejectTime,
|
||||||
row.driverRejectedTime,
|
row.driverRejectedTime,
|
||||||
@@ -161,9 +186,16 @@ const hasDriverRejectRecord = row => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const isDriverRejectedWaybill = row =>
|
const isDriverRejectedWaybill = row =>
|
||||||
requiresDriverAcceptConfirmation(row) && hasDriverRejectRecord(row);
|
(row.requireAccept === true ||
|
||||||
|
row.requireAccept === 1 ||
|
||||||
|
requiresDriverAcceptConfirmation(row)) &&
|
||||||
|
hasDriverRejectRecord(row);
|
||||||
|
|
||||||
const hasDriverAcceptRecord = row => {
|
const hasDriverAcceptRecord = row => {
|
||||||
|
if (String(row.driverAcceptStatus || '').toLowerCase() === 'accepted') return true;
|
||||||
|
if (['rejected', 'pending'].includes(String(row.driverAcceptStatus || '').toLowerCase())) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
const recordValues = [
|
const recordValues = [
|
||||||
row.driverAcceptTime,
|
row.driverAcceptTime,
|
||||||
row.driverAcceptedTime,
|
row.driverAcceptedTime,
|
||||||
@@ -172,6 +204,7 @@ const hasDriverAcceptRecord = row => {
|
|||||||
row.driverAcceptedBy,
|
row.driverAcceptedBy,
|
||||||
row.acceptUserId,
|
row.acceptUserId,
|
||||||
row.acceptUserName,
|
row.acceptUserName,
|
||||||
|
row.driverAcceptDriverId,
|
||||||
];
|
];
|
||||||
if (recordValues.some(value => value !== null && value !== undefined && value !== '')) {
|
if (recordValues.some(value => value !== null && value !== undefined && value !== '')) {
|
||||||
return true;
|
return true;
|
||||||
@@ -315,10 +348,10 @@ const formatUnitPrice = row => {
|
|||||||
return billingUnit ? `${billingPrice}(${billingUnit})` : billingPrice;
|
return billingUnit ? `${billingPrice}(${billingUnit})` : billingPrice;
|
||||||
};
|
};
|
||||||
|
|
||||||
const formatAmount = (row, props) => getFirstValue(row, props);
|
const formatAmount = (row, props) => formatMoneyDisplay(getFirstValue(row, props));
|
||||||
|
|
||||||
const sumAmount = list =>
|
const sumAmount = (rows = []) =>
|
||||||
list.reduce((sum, item) => {
|
rows.reduce((sum, item) => {
|
||||||
const value = getFirstValue(item, ['freightAmount', 'amount', 'totalAmount']);
|
const value = getFirstValue(item, ['freightAmount', 'amount', 'totalAmount']);
|
||||||
return isEmpty(value) ? sum : sum + Number(value || 0);
|
return isEmpty(value) ? sum : sum + Number(value || 0);
|
||||||
}, 0);
|
}, 0);
|
||||||
@@ -337,7 +370,7 @@ const calculateFreightTotal = rows => {
|
|||||||
return sum + Number(item.unitPrice || 0) * Number(item.quantity || 0);
|
return sum + Number(item.unitPrice || 0) * Number(item.quantity || 0);
|
||||||
}, 0);
|
}, 0);
|
||||||
if (!hasAmountField) return '';
|
if (!hasAmountField) return '';
|
||||||
return Number.isFinite(total) ? Number(total.toFixed(2)).toString() : '';
|
return Number.isFinite(total) ? total.toFixed(2) : '';
|
||||||
};
|
};
|
||||||
|
|
||||||
const formatFreight = row => {
|
const formatFreight = row => {
|
||||||
@@ -345,9 +378,9 @@ const formatFreight = row => {
|
|||||||
if (!isEmpty(value)) return value;
|
if (!isEmpty(value)) return value;
|
||||||
const freight = parseJsonObject(row.freightJson);
|
const freight = parseJsonObject(row.freightJson);
|
||||||
const freightValue = getFirstValue(freight, ['freightAmount', 'transportFee']);
|
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 : []);
|
const total = sumAmount(Array.isArray(freight.freightItems) ? freight.freightItems : []);
|
||||||
return total ? total : '';
|
return total ? formatMoneyDisplay(total) : '';
|
||||||
};
|
};
|
||||||
|
|
||||||
const formatOtherFeeTotal = row => {
|
const formatOtherFeeTotal = row => {
|
||||||
@@ -364,10 +397,10 @@ const formatFreightTotal = row => {
|
|||||||
const otherFeeTotal = !isEmpty(otherFee) ? otherFee : formatOtherFeeTotal(row);
|
const otherFeeTotal = !isEmpty(otherFee) ? otherFee : formatOtherFeeTotal(row);
|
||||||
if (!isEmpty(calculated)) {
|
if (!isEmpty(calculated)) {
|
||||||
const total = Number(calculated || 0) + Number(otherFeeTotal || 0);
|
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']);
|
const value = getFirstValue(freight, ['totalFreightAmount', 'totalFreight', 'totalAmount']);
|
||||||
if (!isEmpty(value)) return value;
|
if (!isEmpty(value)) return formatMoneyDisplay(value);
|
||||||
return formatAmount(row, ['freightTotal', 'totalFreight', 'totalAmount']);
|
return formatAmount(row, ['freightTotal', 'totalFreight', 'totalAmount']);
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -377,6 +410,8 @@ export const config = {
|
|||||||
title: '运单管理',
|
title: '运单管理',
|
||||||
permission: 'waybill_manage',
|
permission: 'waybill_manage',
|
||||||
importUrl: '/blade-transport/waybill-manage/import-waybill-manage',
|
importUrl: '/blade-transport/waybill-manage/import-waybill-manage',
|
||||||
|
exportUrl: '/blade-transport/waybill-manage/export-waybill-manage',
|
||||||
|
exportName: '运单管理',
|
||||||
defaultForm: {
|
defaultForm: {
|
||||||
carrierType: '承运商',
|
carrierType: '承运商',
|
||||||
transportType: 'road',
|
transportType: 'road',
|
||||||
@@ -423,29 +458,37 @@ export const config = {
|
|||||||
statusProp: 'businessStatus',
|
statusProp: 'businessStatus',
|
||||||
statusTextProp: 'businessStatusName',
|
statusTextProp: 'businessStatusName',
|
||||||
formatStatus(row, prop, defaultText) {
|
formatStatus(row, prop, defaultText) {
|
||||||
if (
|
if (prop !== 'businessStatus') return defaultText;
|
||||||
prop === 'businessStatus' &&
|
const status = String(row.businessStatus || '');
|
||||||
requiresDriverAcceptConfirmation(row) &&
|
const terminalStatuses = ['draft', 'completed', 'cancelled', 'waiting_dispatch', 'dispatching'];
|
||||||
isInProgressStatus(row, defaultText) &&
|
const needAccept =
|
||||||
!hasDriverAcceptRecord(row)
|
row.requireAccept === true ||
|
||||||
) {
|
row.requireAccept === 1 ||
|
||||||
|
requiresDriverAcceptConfirmation(row);
|
||||||
|
// 需司机接单且尚未接单 → 待执行(含库中仍为 running 的历史数据展示校正)
|
||||||
|
if (needAccept && !hasDriverAcceptRecord(row) && !terminalStatuses.includes(status)) {
|
||||||
return '待执行';
|
return '待执行';
|
||||||
}
|
}
|
||||||
if (
|
if (status === 'pending') return '待执行';
|
||||||
prop === 'businessStatus' &&
|
if (status === 'running' || status === 'processing') return '进行中';
|
||||||
row.businessStatus === 'pending' &&
|
|
||||||
!requiresDriverAcceptConfirmation(row)
|
|
||||||
) {
|
|
||||||
return '进行中';
|
|
||||||
}
|
|
||||||
return defaultText;
|
return defaultText;
|
||||||
},
|
},
|
||||||
canReassign(row) {
|
canReassign(row) {
|
||||||
return isDriverRejectedWaybill(row);
|
return isDriverRejectedWaybill(row);
|
||||||
},
|
},
|
||||||
|
getDriverRejectReason,
|
||||||
|
isDriverRejectedWaybill,
|
||||||
canEdit(row) {
|
canEdit(row) {
|
||||||
|
// 进行中的运单不允许编辑
|
||||||
|
if (isInProgressStatus(row, row.businessStatusName)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
return !isDriverRejectedWaybill(row);
|
return !isDriverRejectedWaybill(row);
|
||||||
},
|
},
|
||||||
|
canCancel(row) {
|
||||||
|
// 进行中的运单不允许取消
|
||||||
|
return !isInProgressStatus(row, row.businessStatusName);
|
||||||
|
},
|
||||||
deleteStatus: ['draft'],
|
deleteStatus: ['draft'],
|
||||||
editStatus: ['draft', 'pending'],
|
editStatus: ['draft', 'pending'],
|
||||||
};
|
};
|
||||||
@@ -637,7 +680,7 @@ export const option = {
|
|||||||
viewDisplay: false,
|
viewDisplay: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '单价(计价单位)',
|
label: '单价',
|
||||||
prop: 'unitPrice',
|
prop: 'unitPrice',
|
||||||
formatter: row => formatUnitPrice(row),
|
formatter: row => formatUnitPrice(row),
|
||||||
minWidth: 140,
|
minWidth: 140,
|
||||||
@@ -867,7 +910,7 @@ export const option = {
|
|||||||
order: 760,
|
order: 760,
|
||||||
hide: true,
|
hide: true,
|
||||||
labelWidth: '0px',
|
labelWidth: '0px',
|
||||||
className: 'business-crud-page__full-form-item',
|
className: 'waybill-manage-page__full-form-item',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '实际发货时间',
|
label: '实际发货时间',
|
||||||
@@ -979,7 +1022,7 @@ export const option = {
|
|||||||
order: 740,
|
order: 740,
|
||||||
hide: true,
|
hide: true,
|
||||||
labelWidth: '0px',
|
labelWidth: '0px',
|
||||||
className: 'business-crud-page__full-form-item',
|
className: 'waybill-manage-page__full-form-item',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '所属组织',
|
label: '所属组织',
|
||||||
|
|||||||
@@ -67,9 +67,7 @@ export const feeDetailBaseColumns = [
|
|||||||
];
|
];
|
||||||
|
|
||||||
export const feeDetailTailColumns = [
|
export const feeDetailTailColumns = [
|
||||||
{ label: '原总金额', prop: 'originalAmountText', minWidth: 120 },
|
{ label: '结算金额', prop: 'originalAmountText', minWidth: 120 },
|
||||||
{ label: '调整金额', prop: 'adjustAmountText', minWidth: 120 },
|
|
||||||
{ label: '调整后总金额', prop: 'afterAmountText', minWidth: 140 },
|
|
||||||
{ label: '备注', prop: 'remark', minWidth: 160 },
|
{ label: '备注', prop: 'remark', minWidth: 160 },
|
||||||
{ label: '最后录入人', prop: 'updateUserName', minWidth: 120 },
|
{ label: '最后录入人', prop: 'updateUserName', minWidth: 120 },
|
||||||
{ label: '最后录入时间', prop: 'updateTime', minWidth: 170 },
|
{ label: '最后录入时间', prop: 'updateTime', minWidth: 170 },
|
||||||
|
|||||||
@@ -2,10 +2,8 @@ export const transportReconciliationFormFields = [
|
|||||||
{ prop: 'reconciliationNo', label: '对账单号', readonly: true },
|
{ prop: 'reconciliationNo', label: '对账单号', readonly: true },
|
||||||
{ prop: 'reconciliationMode', label: '对账模式', type: 'mode' },
|
{ prop: 'reconciliationMode', label: '对账模式', type: 'mode' },
|
||||||
{ prop: 'formalSettlementNo', label: '正式结算单', type: 'formal' },
|
{ prop: 'formalSettlementNo', label: '正式结算单', type: 'formal' },
|
||||||
{ prop: 'payerName', label: '付款方', readonly: true },
|
{ prop: 'customerName', label: '客户/承运商', readonly: true },
|
||||||
{ prop: 'payeeName', label: '收款方', readonly: true },
|
|
||||||
{ prop: 'projectName', label: '项目', readonly: true },
|
{ prop: 'projectName', label: '项目', readonly: true },
|
||||||
{ prop: 'deptName', label: '所属组织', readonly: true },
|
|
||||||
{ prop: 'contractName', label: '合同名称', readonly: true },
|
{ prop: 'contractName', label: '合同名称', readonly: true },
|
||||||
{ prop: 'paidAmount', label: '已付合计', money: true, readonly: true },
|
{ prop: 'paidAmount', label: '已付合计', money: true, readonly: true },
|
||||||
{ prop: 'reconcilerName', label: '对账人', readonly: true },
|
{ prop: 'reconcilerName', label: '对账人', readonly: true },
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
export const reconciliationMatchStatusOptions = [
|
export const reconciliationMatchStatusOptions = [
|
||||||
{ label: '全部', value: '' },
|
{ label: '全部', value: 'all' },
|
||||||
{ label: '未匹配', value: 'unmatched' },
|
{ label: '未匹配', value: 'unmatched' },
|
||||||
{ label: '部分匹配', value: 'partial' },
|
{ label: '部分匹配', value: 'partial' },
|
||||||
{ label: '已匹配', value: 'matched' },
|
{ label: '已匹配', value: 'matched' },
|
||||||
];
|
];
|
||||||
|
|
||||||
export const reconciliationStatusOptions = [
|
export const reconciliationStatusOptions = [
|
||||||
{ label: '全部', value: '' },
|
{ label: '全部', value: 'all' },
|
||||||
{ label: '未完成', value: 'unfinished' },
|
{ label: '未完成', value: 'unfinished' },
|
||||||
{ label: '已完成', value: 'completed' },
|
{ label: '已完成', value: 'completed' },
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ export const transportReconciliationTableColumns = [
|
|||||||
export const internalColumns = [
|
export const internalColumns = [
|
||||||
{ prop: 'documentNo', label: '单据号', minWidth: 150 },
|
{ prop: 'documentNo', label: '单据号', minWidth: 150 },
|
||||||
{ prop: 'waybillNo', label: '运单号', minWidth: 120 },
|
{ prop: 'waybillNo', label: '运单号', minWidth: 120 },
|
||||||
{ prop: 'matchedExternalLineNo', label: '匹配外部账单行号', minWidth: 140 },
|
{ prop: 'matchedExternalLineNo', label: '匹配外部账单行号', minWidth: 180 },
|
||||||
{ prop: 'vehicleNo', label: '车号', minWidth: 100 },
|
{ prop: 'vehicleNo', label: '车号', minWidth: 100 },
|
||||||
{ prop: 'departureAddress', label: '发货地址', minWidth: 180 },
|
{ prop: 'departureAddress', label: '发货地址', minWidth: 180 },
|
||||||
{ prop: 'arrivalAddress', label: '到货地址', minWidth: 180 },
|
{ prop: 'arrivalAddress', label: '到货地址', minWidth: 180 },
|
||||||
@@ -27,13 +27,10 @@ export const internalColumns = [
|
|||||||
{ prop: 'transportType', label: '运输类型', minWidth: 120 },
|
{ prop: 'transportType', label: '运输类型', minWidth: 120 },
|
||||||
{ prop: 'cargoName', label: '货物名称', minWidth: 120 },
|
{ prop: 'cargoName', label: '货物名称', minWidth: 120 },
|
||||||
{ prop: 'cargoType', 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: '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: 'batchNo', label: '批次号', minWidth: 100 },
|
||||||
{ prop: 'unitPrice', label: '运输单价', minWidth: 110, money: true },
|
{ prop: 'unitPrice', label: '运输单价', minWidth: 110, money: true },
|
||||||
{ prop: 'freightAmount', label: '运输费', minWidth: 110, money: true },
|
|
||||||
{ prop: 'settlementAmount', label: '结算金额', minWidth: 120, money: true },
|
{ prop: 'settlementAmount', label: '结算金额', minWidth: 120, money: true },
|
||||||
{ prop: 'matchResult', label: '匹配结果', minWidth: 100 },
|
{ prop: 'matchResult', label: '匹配结果', minWidth: 100 },
|
||||||
{ prop: 'updateResult', label: '账单更新结果', minWidth: 130 },
|
{ prop: 'updateResult', label: '账单更新结果', minWidth: 130 },
|
||||||
@@ -50,7 +47,7 @@ export const externalVehicleColumns = [
|
|||||||
{ prop: 'cargoName', label: '货物名称', minWidth: 120 },
|
{ prop: 'cargoName', label: '货物名称', minWidth: 120 },
|
||||||
{ prop: 'cargoType', label: '货物类型', minWidth: 120 },
|
{ prop: 'cargoType', label: '货物类型', minWidth: 120 },
|
||||||
{ prop: 'transportQuantity', label: '运输总量', minWidth: 100, number: true },
|
{ 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: 'batchNo', label: '批次号', minWidth: 100 },
|
||||||
{ prop: 'unitPrice', label: '运输单价', minWidth: 110, money: true },
|
{ prop: 'unitPrice', label: '运输单价', minWidth: 110, money: true },
|
||||||
{ prop: 'freightAmount', 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: 'cargoType', label: '货物类型', minWidth: 120 },
|
||||||
{ prop: 'specification', label: '规格', minWidth: 100 },
|
{ prop: 'specification', label: '规格', minWidth: 100 },
|
||||||
{ prop: 'model', 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: '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: 'freightAmount', label: '运输费', minWidth: 110, money: true },
|
||||||
{ prop: 'settlementAmount', label: '结算金额', minWidth: 120, money: true },
|
{ prop: 'settlementAmount', label: '结算费用合计', minWidth: 130, money: true },
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ export const GRANT_TYPE_DIC = [
|
|||||||
{ label: '社交登录', value: 'social' },
|
{ label: '社交登录', value: 'social' },
|
||||||
{ label: '客户端凭证', value: 'client_credentials' },
|
{ label: '客户端凭证', value: 'client_credentials' },
|
||||||
{ label: '刷新令牌', value: 'refresh_token' },
|
{ label: '刷新令牌', value: 'refresh_token' },
|
||||||
|
{ label: '退出登录', value: 'logout' },
|
||||||
];
|
];
|
||||||
|
|
||||||
export const authLogOption = {
|
export const authLogOption = {
|
||||||
@@ -38,7 +39,7 @@ export const authLogOption = {
|
|||||||
prop: 'realName',
|
prop: 'realName',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '授权类型',
|
label: '操作类型',
|
||||||
prop: 'grantType',
|
prop: 'grantType',
|
||||||
type: 'select',
|
type: 'select',
|
||||||
search: true,
|
search: true,
|
||||||
@@ -80,7 +81,7 @@ export const authLogOption = {
|
|||||||
width: 120,
|
width: 120,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '登录时间',
|
label: '操作时间',
|
||||||
prop: 'loginTime',
|
prop: 'loginTime',
|
||||||
sortable: true,
|
sortable: true,
|
||||||
span: 24,
|
span: 24,
|
||||||
|
|||||||
@@ -1,12 +1,9 @@
|
|||||||
import { getDeptLazyTree } from '@/api/system/dept';
|
import { getDeptLazyTree } from '@/api/system/dept';
|
||||||
|
import { validateLoginPassword } from '@/utils/validate';
|
||||||
|
|
||||||
export const userOption = safe => {
|
export const userOption = safe => {
|
||||||
const validatePass = (rule, value, callback) => {
|
const validatePass = (rule, value, callback) => {
|
||||||
if (value === '') {
|
validateLoginPassword(rule, value, callback);
|
||||||
callback(new Error('请输入密码'));
|
|
||||||
} else {
|
|
||||||
callback();
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
const validatePass2 = (rule, value, callback) => {
|
const validatePass2 = (rule, value, callback) => {
|
||||||
if (value === '') {
|
if (value === '') {
|
||||||
|
|||||||
@@ -76,6 +76,11 @@ export const option = {
|
|||||||
prop: 'posts',
|
prop: 'posts',
|
||||||
minWidth: 150,
|
minWidth: 150,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: '驾驶车辆',
|
||||||
|
prop: 'drivingVehicle',
|
||||||
|
minWidth: 130,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: '所属组织',
|
label: '所属组织',
|
||||||
prop: 'organizationName',
|
prop: 'organizationName',
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ export const option = {
|
|||||||
label: '车牌号',
|
label: '车牌号',
|
||||||
prop: 'plateNo',
|
prop: 'plateNo',
|
||||||
search: true,
|
search: true,
|
||||||
searchOrder: 6,
|
searchOrder: 7,
|
||||||
slot: true,
|
slot: true,
|
||||||
minWidth: 120,
|
minWidth: 120,
|
||||||
},
|
},
|
||||||
@@ -29,7 +29,7 @@ export const option = {
|
|||||||
label: '业务关系',
|
label: '业务关系',
|
||||||
prop: 'businessRelation',
|
prop: 'businessRelation',
|
||||||
search: true,
|
search: true,
|
||||||
searchOrder: 5,
|
searchOrder: 6,
|
||||||
searchValue: '',
|
searchValue: '',
|
||||||
type: 'select',
|
type: 'select',
|
||||||
dicData: [
|
dicData: [
|
||||||
@@ -50,11 +50,18 @@ export const option = {
|
|||||||
slot: true,
|
slot: true,
|
||||||
minWidth: 150,
|
minWidth: 150,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: '使用部门',
|
||||||
|
prop: 'useDepartment',
|
||||||
|
search: true,
|
||||||
|
searchOrder: 3,
|
||||||
|
minWidth: 140,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: '车辆类型',
|
label: '车辆类型',
|
||||||
prop: 'vehicleType',
|
prop: 'vehicleType',
|
||||||
search: true,
|
search: true,
|
||||||
searchOrder: 4,
|
searchOrder: 5,
|
||||||
type: 'select',
|
type: 'select',
|
||||||
dicData: [
|
dicData: [
|
||||||
{ label: '全部', value: '' },
|
{ label: '全部', value: '' },
|
||||||
@@ -108,7 +115,7 @@ export const option = {
|
|||||||
label: '车辆状态',
|
label: '车辆状态',
|
||||||
prop: 'status',
|
prop: 'status',
|
||||||
search: true,
|
search: true,
|
||||||
searchOrder: 3,
|
searchOrder: 4,
|
||||||
type: 'select',
|
type: 'select',
|
||||||
slot: true,
|
slot: true,
|
||||||
dicData: [
|
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,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
@@ -70,14 +70,16 @@ export const option = {
|
|||||||
{
|
{
|
||||||
label: '车牌号/船号',
|
label: '车牌号/船号',
|
||||||
prop: 'vehicleNo',
|
prop: 'vehicleNo',
|
||||||
|
type: 'select',
|
||||||
slot: true,
|
slot: true,
|
||||||
formslot: true,
|
formslot: true,
|
||||||
search: true,
|
search: true,
|
||||||
|
searchType: 'input',
|
||||||
minWidth: 140,
|
minWidth: 140,
|
||||||
span: 12,
|
span: 12,
|
||||||
placeholder: '输入车牌号/船号查询选择',
|
placeholder: '请选择车牌号/船号',
|
||||||
rules: [
|
rules: [
|
||||||
{ required: true, message: '请输入车牌号/船号', trigger: 'blur' },
|
{ required: true, message: '请选择车牌号/船号', trigger: 'change' },
|
||||||
{ max: 30, message: '最多 30 个字符', trigger: 'blur' },
|
{ 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 = {
|
export const excelOption = {
|
||||||
labelPosition: 'right',
|
labelPosition: 'right',
|
||||||
submitBtn: false,
|
submitBtn: false,
|
||||||
|
|||||||
@@ -75,14 +75,16 @@ export const option = {
|
|||||||
{
|
{
|
||||||
label: '车牌号/船号',
|
label: '车牌号/船号',
|
||||||
prop: 'vehicleNo',
|
prop: 'vehicleNo',
|
||||||
|
type: 'select',
|
||||||
slot: true,
|
slot: true,
|
||||||
formslot: true,
|
formslot: true,
|
||||||
search: true,
|
search: true,
|
||||||
|
searchType: 'input',
|
||||||
minWidth: 140,
|
minWidth: 140,
|
||||||
span: 12,
|
span: 12,
|
||||||
placeholder: '输入车牌号/船号查询选择',
|
placeholder: '请选择车牌号/船号',
|
||||||
rules: [
|
rules: [
|
||||||
{ required: true, message: '请输入车牌号/船号', trigger: 'blur' },
|
{ required: true, message: '请选择车牌号/船号', trigger: 'change' },
|
||||||
{ max: 30, message: '最多 30 个字符', trigger: 'blur' },
|
{ max: 30, message: '最多 30 个字符', trigger: 'blur' },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
@@ -105,6 +107,7 @@ export const option = {
|
|||||||
type: 'date',
|
type: 'date',
|
||||||
format: 'YYYY-MM-DD',
|
format: 'YYYY-MM-DD',
|
||||||
valueFormat: 'YYYY-MM-DD',
|
valueFormat: 'YYYY-MM-DD',
|
||||||
|
slot: true,
|
||||||
minWidth: 140,
|
minWidth: 140,
|
||||||
span: 12,
|
span: 12,
|
||||||
placeholder: '请输入',
|
placeholder: '请输入',
|
||||||
@@ -191,23 +194,12 @@ export const option = {
|
|||||||
formslot: true,
|
formslot: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '检测评定开始日期',
|
label: '检测评定日期',
|
||||||
prop: 'inspectionAssessmentDateStart',
|
prop: 'inspectionAssessmentDateRange',
|
||||||
type: 'date',
|
|
||||||
format: 'YYYY-MM-DD',
|
|
||||||
valueFormat: 'YYYY-MM-DD',
|
|
||||||
search: true,
|
|
||||||
hide: true,
|
|
||||||
addDisplay: false,
|
|
||||||
editDisplay: false,
|
|
||||||
viewDisplay: false,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '检测评定结束日期',
|
|
||||||
prop: 'inspectionAssessmentDateEnd',
|
|
||||||
type: 'date',
|
type: 'date',
|
||||||
format: 'YYYY-MM-DD',
|
format: 'YYYY-MM-DD',
|
||||||
valueFormat: 'YYYY-MM-DD',
|
valueFormat: 'YYYY-MM-DD',
|
||||||
|
searchRange: true,
|
||||||
search: true,
|
search: true,
|
||||||
hide: true,
|
hide: true,
|
||||||
addDisplay: false,
|
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 = {
|
export const excelOption = {
|
||||||
labelPosition: 'right',
|
labelPosition: 'right',
|
||||||
submitBtn: false,
|
submitBtn: false,
|
||||||
|
|||||||
@@ -54,9 +54,11 @@ export const option = {
|
|||||||
{
|
{
|
||||||
label: '车牌号/船号',
|
label: '车牌号/船号',
|
||||||
prop: 'vehicleNo',
|
prop: 'vehicleNo',
|
||||||
|
type: 'select',
|
||||||
slot: true,
|
slot: true,
|
||||||
formslot: true,
|
formslot: true,
|
||||||
search: true,
|
search: true,
|
||||||
|
searchType: 'input',
|
||||||
searchOrder: 4,
|
searchOrder: 4,
|
||||||
span: 12,
|
span: 12,
|
||||||
order: 10,
|
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 = {
|
export const excelOption = {
|
||||||
labelPosition: 'right',
|
labelPosition: 'right',
|
||||||
submitBtn: false,
|
submitBtn: false,
|
||||||
|
|||||||
@@ -49,14 +49,16 @@ export const option = {
|
|||||||
{
|
{
|
||||||
label: '车牌号',
|
label: '车牌号',
|
||||||
prop: 'vehicleNo',
|
prop: 'vehicleNo',
|
||||||
|
type: 'select',
|
||||||
slot: true,
|
slot: true,
|
||||||
formslot: true,
|
formslot: true,
|
||||||
search: true,
|
search: true,
|
||||||
|
searchType: 'input',
|
||||||
minWidth: 140,
|
minWidth: 140,
|
||||||
span: 12,
|
span: 12,
|
||||||
placeholder: '输入车牌号模糊查询选择',
|
placeholder: '请选择车牌号',
|
||||||
rules: [
|
rules: [
|
||||||
{ required: true, message: '请输入车牌号', trigger: 'blur' },
|
{ required: true, message: '请选择车牌号', trigger: 'change' },
|
||||||
{ max: 30, message: '最多 30 个字符', trigger: 'blur' },
|
{ 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 = {
|
export const excelOption = {
|
||||||
labelPosition: 'right',
|
labelPosition: 'right',
|
||||||
submitBtn: false,
|
submitBtn: false,
|
||||||
|
|||||||
@@ -78,17 +78,20 @@ export const option = {
|
|||||||
prop: 'policyFile',
|
prop: 'policyFile',
|
||||||
formslot: true,
|
formslot: true,
|
||||||
hide: true,
|
hide: true,
|
||||||
|
viewDisplay: false,
|
||||||
span: 24,
|
span: 24,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '车牌号/船号',
|
label: '车牌号/船号',
|
||||||
prop: 'vehicleNo',
|
prop: 'vehicleNo',
|
||||||
|
type: 'select',
|
||||||
slot: true,
|
slot: true,
|
||||||
formslot: true,
|
formslot: true,
|
||||||
search: true,
|
search: true,
|
||||||
|
searchType: 'input',
|
||||||
minWidth: 140,
|
minWidth: 140,
|
||||||
rules: [
|
rules: [
|
||||||
{ required: true, message: '请输入车牌号/船号', trigger: 'blur' },
|
{ required: true, message: '请选择车牌号/船号', trigger: 'change' },
|
||||||
{ max: 50, message: '最多 50 个字符', trigger: 'blur' },
|
{ max: 50, message: '最多 50 个字符', trigger: 'blur' },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
@@ -108,6 +111,7 @@ export const option = {
|
|||||||
rules: [
|
rules: [
|
||||||
{ required: true, message: '请输入保单号', trigger: 'blur' },
|
{ required: true, message: '请输入保单号', trigger: 'blur' },
|
||||||
{ max: 80, message: '最多 80 个字符', 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 = {
|
export const excelOption = {
|
||||||
labelPosition: 'right',
|
labelPosition: 'right',
|
||||||
submitBtn: false,
|
submitBtn: false,
|
||||||
|
|||||||
@@ -40,13 +40,15 @@ export const option = {
|
|||||||
{
|
{
|
||||||
label: '车牌号',
|
label: '车牌号',
|
||||||
prop: 'vehicleNo',
|
prop: 'vehicleNo',
|
||||||
|
type: 'select',
|
||||||
slot: true,
|
slot: true,
|
||||||
formslot: true,
|
formslot: true,
|
||||||
search: true,
|
search: true,
|
||||||
|
searchType: 'input',
|
||||||
searchSpan: 6,
|
searchSpan: 6,
|
||||||
minWidth: 130,
|
minWidth: 130,
|
||||||
rules: [
|
rules: [
|
||||||
{ required: true, message: '请输入车牌号', trigger: 'blur' },
|
{ required: true, message: '请选择车牌号', trigger: 'change' },
|
||||||
{ max: 30, message: '最多 30 个字符', trigger: 'blur' },
|
{ 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 = {
|
export const excelOption = {
|
||||||
labelPosition: 'right',
|
labelPosition: 'right',
|
||||||
submitBtn: false,
|
submitBtn: false,
|
||||||
|
|||||||
@@ -92,13 +92,15 @@ export const option = {
|
|||||||
{
|
{
|
||||||
label: '车牌号/船号',
|
label: '车牌号/船号',
|
||||||
prop: 'vehicleNo',
|
prop: 'vehicleNo',
|
||||||
|
type: 'select',
|
||||||
slot: true,
|
slot: true,
|
||||||
formslot: true,
|
formslot: true,
|
||||||
search: true,
|
search: true,
|
||||||
|
searchType: 'input',
|
||||||
minWidth: 150,
|
minWidth: 150,
|
||||||
placeholder: '输入车牌号/船号查询选择',
|
placeholder: '请选择车牌号/船号',
|
||||||
rules: [
|
rules: [
|
||||||
{ required: true, message: '请输入车牌号/船号', trigger: 'blur' },
|
{ required: true, message: '请选择车牌号/船号', trigger: 'change' },
|
||||||
{ max: 30, message: '最多 30 个字符', trigger: 'blur' },
|
{ 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 = {
|
export const excelOption = {
|
||||||
labelPosition: 'right',
|
labelPosition: 'right',
|
||||||
submitBtn: false,
|
submitBtn: false,
|
||||||
|
|||||||
@@ -17,16 +17,6 @@ export const vehicleTypeDic = [
|
|||||||
{ label: '船舶', value: '船舶' },
|
{ label: '船舶', value: '船舶' },
|
||||||
];
|
];
|
||||||
|
|
||||||
export const expenseTypeDic = [
|
|
||||||
{ label: '过路费', value: '过路费' },
|
|
||||||
{ label: '停车费', value: '停车费' },
|
|
||||||
{ label: '维修费', value: '维修费' },
|
|
||||||
{ label: '保险费', value: '保险费' },
|
|
||||||
{ label: '年检费', value: '年检费' },
|
|
||||||
{ label: '装卸费', value: '装卸费' },
|
|
||||||
{ label: '其他', value: '其他' },
|
|
||||||
];
|
|
||||||
|
|
||||||
export const option = {
|
export const option = {
|
||||||
height: 'auto',
|
height: 'auto',
|
||||||
calcHeight: 32,
|
calcHeight: 32,
|
||||||
@@ -68,14 +58,16 @@ export const option = {
|
|||||||
{
|
{
|
||||||
label: '车牌号/船号',
|
label: '车牌号/船号',
|
||||||
prop: 'vehicleNo',
|
prop: 'vehicleNo',
|
||||||
|
type: 'select',
|
||||||
slot: true,
|
slot: true,
|
||||||
formslot: true,
|
formslot: true,
|
||||||
search: true,
|
search: true,
|
||||||
|
searchType: 'input',
|
||||||
minWidth: 150,
|
minWidth: 150,
|
||||||
span: 12,
|
span: 12,
|
||||||
placeholder: '输入车牌号/船号查询选择',
|
placeholder: '请选择车牌号/船号',
|
||||||
rules: [
|
rules: [
|
||||||
{ required: true, message: '请输入车牌号/船号', trigger: 'blur' },
|
{ required: true, message: '请选择车牌号/船号', trigger: 'change' },
|
||||||
{ max: 30, message: '最多 30 个字符', trigger: 'blur' },
|
{ max: 30, message: '最多 30 个字符', trigger: 'blur' },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
@@ -95,7 +87,7 @@ export const option = {
|
|||||||
label: '费用类型',
|
label: '费用类型',
|
||||||
prop: 'expenseType',
|
prop: 'expenseType',
|
||||||
type: 'select',
|
type: 'select',
|
||||||
dicData: expenseTypeDic,
|
dicData: [],
|
||||||
search: true,
|
search: true,
|
||||||
minWidth: 150,
|
minWidth: 150,
|
||||||
span: 12,
|
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 = {
|
export const excelOption = {
|
||||||
labelPosition: 'right',
|
labelPosition: 'right',
|
||||||
submitBtn: false,
|
submitBtn: false,
|
||||||
|
|||||||
@@ -49,14 +49,16 @@ export const option = {
|
|||||||
{
|
{
|
||||||
label: '车牌号',
|
label: '车牌号',
|
||||||
prop: 'vehicleNo',
|
prop: 'vehicleNo',
|
||||||
|
type: 'select',
|
||||||
slot: true,
|
slot: true,
|
||||||
formslot: true,
|
formslot: true,
|
||||||
search: true,
|
search: true,
|
||||||
|
searchType: 'input',
|
||||||
minWidth: 130,
|
minWidth: 130,
|
||||||
span: 12,
|
span: 12,
|
||||||
placeholder: '输入车牌号查询选择',
|
placeholder: '请选择车牌号',
|
||||||
rules: [
|
rules: [
|
||||||
{ required: true, message: '请输入车牌号', trigger: 'blur' },
|
{ required: true, message: '请选择车牌号', trigger: 'change' },
|
||||||
{ max: 30, message: '最多 30 个字符', trigger: 'blur' },
|
{ 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 = {
|
export const excelOption = {
|
||||||
labelPosition: 'right',
|
labelPosition: 'right',
|
||||||
submitBtn: false,
|
submitBtn: false,
|
||||||
|
|||||||
@@ -47,11 +47,13 @@ export const option = {
|
|||||||
{
|
{
|
||||||
label: '车牌号/船号',
|
label: '车牌号/船号',
|
||||||
prop: 'vehicleNo',
|
prop: 'vehicleNo',
|
||||||
|
type: 'select',
|
||||||
slot: true,
|
slot: true,
|
||||||
formslot: true,
|
formslot: true,
|
||||||
search: true,
|
search: true,
|
||||||
|
searchType: 'input',
|
||||||
minWidth: 140,
|
minWidth: 140,
|
||||||
placeholder: '输入车牌号/船号模糊查询选择',
|
placeholder: '请选择车牌号/船号',
|
||||||
rules: [{ max: 30, message: '最多 30 个字符', trigger: 'blur' }],
|
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 = {
|
export const excelOption = {
|
||||||
labelPosition: 'right',
|
labelPosition: 'right',
|
||||||
submitBtn: false,
|
submitBtn: false,
|
||||||
|
|||||||
@@ -70,14 +70,16 @@ export const option = {
|
|||||||
{
|
{
|
||||||
label: '车牌号/船号',
|
label: '车牌号/船号',
|
||||||
prop: 'vehicleNo',
|
prop: 'vehicleNo',
|
||||||
|
type: 'select',
|
||||||
slot: true,
|
slot: true,
|
||||||
formslot: true,
|
formslot: true,
|
||||||
search: true,
|
search: true,
|
||||||
|
searchType: 'input',
|
||||||
minWidth: 140,
|
minWidth: 140,
|
||||||
span: 12,
|
span: 12,
|
||||||
placeholder: '输入车牌号/船号查询选择',
|
placeholder: '请选择车牌号/船号',
|
||||||
rules: [
|
rules: [
|
||||||
{ required: true, message: '请输入车牌号/船号', trigger: 'blur' },
|
{ required: true, message: '请选择车牌号/船号', trigger: 'change' },
|
||||||
{ max: 30, message: '最多 30 个字符', trigger: 'blur' },
|
{ max: 30, message: '最多 30 个字符', trigger: 'blur' },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
@@ -117,13 +119,13 @@ export const option = {
|
|||||||
{
|
{
|
||||||
label: '日期',
|
label: '日期',
|
||||||
prop: 'violationTime',
|
prop: 'violationTime',
|
||||||
type: 'datetime',
|
type: 'date',
|
||||||
format: 'YYYY-MM-DD HH:mm:ss',
|
format: 'YYYY-MM-DD',
|
||||||
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
||||||
minWidth: 170,
|
minWidth: 140,
|
||||||
span: 12,
|
span: 12,
|
||||||
placeholder: '请选择',
|
placeholder: '请选择',
|
||||||
rules: [{ required: true, message: '请选择时间', trigger: 'click' }],
|
rules: [{ required: true, message: '请选择日期', trigger: 'click' }],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '地点',
|
label: '地点',
|
||||||
@@ -173,7 +175,7 @@ export const option = {
|
|||||||
prop: 'processStatus',
|
prop: 'processStatus',
|
||||||
type: 'radio',
|
type: 'radio',
|
||||||
dicData: processStatusDic,
|
dicData: processStatusDic,
|
||||||
value: '未处理',
|
value: '已处理',
|
||||||
search: true,
|
search: true,
|
||||||
clearable: true,
|
clearable: true,
|
||||||
minWidth: 120,
|
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 = {
|
export const excelOption = {
|
||||||
labelPosition: 'right',
|
labelPosition: 'right',
|
||||||
submitBtn: false,
|
submitBtn: false,
|
||||||
|
|||||||
@@ -1,7 +1,18 @@
|
|||||||
<template>
|
<template>
|
||||||
<router-view #="{ Component }">
|
<router-view #="{ Component }">
|
||||||
<keep-alive :include="$store.getters.tagsKeep">
|
<keep-alive :include="$store.getters.tagsKeep">
|
||||||
<component :is="Component" />
|
<component :is="tabView($route, Component)" />
|
||||||
</keep-alive>
|
</keep-alive>
|
||||||
</router-view>
|
</router-view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { tabView } from '@/router/tab';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'layout',
|
||||||
|
methods: {
|
||||||
|
tabView,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
<div class="login-main">
|
<div class="login-main">
|
||||||
<p class="login-title">
|
<p class="login-title">
|
||||||
{{ $t('login.title') }}{{ website.title }}
|
{{ $t('login.title') }}{{ website.title }}
|
||||||
<top-lang></top-lang>
|
<!-- <top-lang></top-lang>-->
|
||||||
</p>
|
</p>
|
||||||
<!-- 原登录方式先注释保留备用
|
<!-- 原登录方式先注释保留备用
|
||||||
<userLogin v-if="activeName === 'user'"></userLogin>
|
<userLogin v-if="activeName === 'user'"></userLogin>
|
||||||
@@ -24,6 +24,7 @@
|
|||||||
-->
|
-->
|
||||||
<userLogin v-if="activeName === 'user'"></userLogin>
|
<userLogin v-if="activeName === 'user'"></userLogin>
|
||||||
<registerLogin v-else-if="activeName === 'register'"></registerLogin>
|
<registerLogin v-else-if="activeName === 'register'"></registerLogin>
|
||||||
|
<!-- 暂时默认账号密码登录,IAM 选择入口先隐藏
|
||||||
<div v-else class="iam-login">
|
<div v-else class="iam-login">
|
||||||
<el-button type="primary" class="login-submit" @click.prevent="handleIamLogin">
|
<el-button type="primary" class="login-submit" @click.prevent="handleIamLogin">
|
||||||
IAM统一身份认证
|
IAM统一身份认证
|
||||||
@@ -32,6 +33,7 @@
|
|||||||
账号密码登录
|
账号密码登录
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
-->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -61,7 +63,7 @@ export default {
|
|||||||
return {
|
return {
|
||||||
website: website,
|
website: website,
|
||||||
time: '',
|
time: '',
|
||||||
activeName: 'iam',
|
activeName: 'user',
|
||||||
socialForm: {
|
socialForm: {
|
||||||
tenantId: '000000',
|
tenantId: '000000',
|
||||||
source: '',
|
source: '',
|
||||||
|
|||||||
@@ -7,18 +7,6 @@
|
|||||||
:model="loginForm"
|
:model="loginForm"
|
||||||
label-width="0"
|
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-form-item prop="username">
|
||||||
<el-input
|
<el-input
|
||||||
@keyup.enter="handleLogin"
|
@keyup.enter="handleLogin"
|
||||||
@@ -67,13 +55,13 @@
|
|||||||
<el-button type="primary" @click.prevent="handleLogin" class="login-submit"
|
<el-button type="primary" @click.prevent="handleLogin" class="login-submit"
|
||||||
>{{ $t('login.submit') }}
|
>{{ $t('login.submit') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<!-- <el-button-->
|
||||||
v-if="this.registerMode"
|
<!-- v-if="this.registerMode"-->
|
||||||
type="danger"
|
<!-- type="danger"-->
|
||||||
@click.prevent="handleRegister"
|
<!-- @click.prevent="handleRegister"-->
|
||||||
class="register-submit"
|
<!-- class="register-submit"-->
|
||||||
>{{ $t('login.register') }}
|
<!-- >{{ $t('login.register') }}-->
|
||||||
</el-button>
|
<!-- </el-button>-->
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<behavior-captcha ref="behaviorCaptcha" @success="handleBehaviorSuccess"></behavior-captcha>
|
<behavior-captcha ref="behaviorCaptcha" @success="handleBehaviorSuccess"></behavior-captcha>
|
||||||
</el-form>
|
</el-form>
|
||||||
@@ -118,7 +106,6 @@ export default {
|
|||||||
image: 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7',
|
image: 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7',
|
||||||
},
|
},
|
||||||
loginRules: {
|
loginRules: {
|
||||||
tenantId: [{ required: false, message: '请输入租户ID', trigger: 'blur' }],
|
|
||||||
username: [{ required: true, message: '请输入用户名', trigger: 'blur' }],
|
username: [{ required: true, message: '请输入用户名', trigger: 'blur' }],
|
||||||
password: [
|
password: [
|
||||||
{ required: true, message: '请输入密码', trigger: 'blur' },
|
{ required: true, message: '请输入密码', trigger: 'blur' },
|
||||||
|
|||||||
+28
-1
@@ -2,11 +2,38 @@ import router from './router/';
|
|||||||
import store from './store';
|
import store from './store';
|
||||||
import { tabKeyOf } from '@/router/tab';
|
import { tabKeyOf } from '@/router/tab';
|
||||||
import { getToken } from '@/utils/auth';
|
import { getToken } from '@/utils/auth';
|
||||||
|
import {
|
||||||
|
consumeReloadQuery,
|
||||||
|
hasReloadQuery,
|
||||||
|
isChunkLoadError,
|
||||||
|
reloadForChunkError,
|
||||||
|
setPendingRoutePath,
|
||||||
|
} from '@/utils/chunk-reload';
|
||||||
|
import { ElMessage } from 'element-plus';
|
||||||
import NProgress from 'nprogress'; // progress bar
|
import NProgress from 'nprogress'; // progress bar
|
||||||
import 'nprogress/nprogress.css'; // progress bar style
|
import 'nprogress/nprogress.css'; // progress bar style
|
||||||
NProgress.configure({ showSpinner: false });
|
NProgress.configure({ showSpinner: false });
|
||||||
const lockPage = '/lock'; //锁屏页
|
const lockPage = '/lock'; //锁屏页
|
||||||
|
|
||||||
|
// 懒加载 chunk / CSS 失败时整页刷新,避免菜单点击后卡死
|
||||||
|
router.onError(error => {
|
||||||
|
if (!isChunkLoadError(error)) return;
|
||||||
|
if (reloadForChunkError()) {
|
||||||
|
ElMessage.warning('页面资源已更新,正在重新加载…');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
router.beforeEach((to, from, next) => {
|
router.beforeEach((to, from, next) => {
|
||||||
|
if (hasReloadQuery(to.query)) {
|
||||||
|
next({
|
||||||
|
path: to.path,
|
||||||
|
query: consumeReloadQuery(to.query),
|
||||||
|
hash: to.hash,
|
||||||
|
replace: true,
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
setPendingRoutePath(to.fullPath);
|
||||||
const meta = to.meta || {};
|
const meta = to.meta || {};
|
||||||
const isMenu = meta.menu === undefined ? to.query.menu : meta.menu;
|
const isMenu = meta.menu === undefined ? to.query.menu : meta.menu;
|
||||||
store.commit('SET_IS_MENU', isMenu === undefined);
|
store.commit('SET_IS_MENU', isMenu === undefined);
|
||||||
@@ -35,7 +62,7 @@ router.beforeEach((to, from, next) => {
|
|||||||
fullPath: tabKeyOf(to),
|
fullPath: tabKeyOf(to),
|
||||||
params: to.params,
|
params: to.params,
|
||||||
query: to.query,
|
query: to.query,
|
||||||
meta: meta,
|
meta: { ...meta, keepAlive: true },
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
next();
|
next();
|
||||||
|
|||||||
@@ -2,6 +2,9 @@ import website from '@/config/website';
|
|||||||
import { getToken } from '@/utils/auth';
|
import { getToken } from '@/utils/auth';
|
||||||
import store from '@/store';
|
import store from '@/store';
|
||||||
import { generateIframePath, processUrlForQuery, isURL } from './router';
|
import { generateIframePath, processUrlForQuery, isURL } from './router';
|
||||||
|
import { wrapViewLoader } from '@/utils/chunk-reload';
|
||||||
|
|
||||||
|
// 保持懒加载,避免 eager 与 store 循环依赖(Cannot access 'store' before initialization)
|
||||||
const modules = import.meta.glob('../**/**/*.vue');
|
const modules = import.meta.glob('../**/**/*.vue');
|
||||||
|
|
||||||
// 将多级路由扁平化为二级路由,支持 keep-alive 跨层级缓存
|
// 将多级路由扁平化为二级路由,支持 keep-alive 跨层级缓存
|
||||||
@@ -96,21 +99,23 @@ RouterPlugin.install = function (option = {}) {
|
|||||||
component: (() => {
|
component: (() => {
|
||||||
// 判断是否为首路由
|
// 判断是否为首路由
|
||||||
if (first) {
|
if (first) {
|
||||||
return modules[
|
return wrapViewLoader(
|
||||||
|
modules[
|
||||||
option.store.getters.isMacOs || !website.setting.menu
|
option.store.getters.isMacOs || !website.setting.menu
|
||||||
? '../page/index/layout.vue'
|
? '../page/index/layout.vue'
|
||||||
: '../page/index/index.vue'
|
: '../page/index/index.vue'
|
||||||
];
|
]
|
||||||
|
);
|
||||||
// 判断是否为多层路由
|
// 判断是否为多层路由
|
||||||
} else if (isChild && !first) {
|
} else if (isChild && !first) {
|
||||||
return modules['../page/index/layout.vue'];
|
return wrapViewLoader(modules['../page/index/layout.vue']);
|
||||||
// 判断是否为最终的页面视图
|
// 判断是否为最终的页面视图
|
||||||
} else {
|
} else {
|
||||||
let result = modules[`../${component}.vue`];
|
let result = modules[`../${component}.vue`];
|
||||||
if (!result) {
|
if (!result) {
|
||||||
isComponent = false;
|
isComponent = false;
|
||||||
}
|
}
|
||||||
return result;
|
return wrapViewLoader(result);
|
||||||
}
|
}
|
||||||
})(),
|
})(),
|
||||||
name,
|
name,
|
||||||
@@ -127,7 +132,7 @@ RouterPlugin.install = function (option = {}) {
|
|||||||
if (first) {
|
if (first) {
|
||||||
oMenu[propsDefault.path] = `${path}`;
|
oMenu[propsDefault.path] = `${path}`;
|
||||||
let componentPath = oMenu.component || component;
|
let componentPath = oMenu.component || component;
|
||||||
let result = modules[`../${componentPath}.vue`];
|
let result = wrapViewLoader(modules[`../${componentPath}.vue`]);
|
||||||
if (!result) {
|
if (!result) {
|
||||||
isComponent = false;
|
isComponent = false;
|
||||||
}
|
}
|
||||||
@@ -173,7 +178,7 @@ export const formatPath = (ele, first) => {
|
|||||||
const icon = ele[propsDefault.icon];
|
const icon = ele[propsDefault.icon];
|
||||||
ele[propsDefault.icon] = icon || '';
|
ele[propsDefault.icon] = icon || '';
|
||||||
ele.meta = {
|
ele.meta = {
|
||||||
keepAlive: ele.isOpen === 2,
|
keepAlive: true,
|
||||||
};
|
};
|
||||||
const iframeComponent = 'components/iframe/main';
|
const iframeComponent = 'components/iframe/main';
|
||||||
const iframeSrc = href => {
|
const iframeSrc = href => {
|
||||||
@@ -215,7 +220,7 @@ export const formatPath = (ele, first) => {
|
|||||||
ele[propsDefault.children].forEach(child => {
|
ele[propsDefault.children].forEach(child => {
|
||||||
child.component = 'views' + child[propsDefault.path];
|
child.component = 'views' + child[propsDefault.path];
|
||||||
child.meta = {
|
child.meta = {
|
||||||
keepAlive: child.isOpen === 2,
|
keepAlive: true,
|
||||||
};
|
};
|
||||||
if (isURL(child[propsDefault.href])) {
|
if (isURL(child[propsDefault.href])) {
|
||||||
let href = child[propsDefault.href];
|
let href = child[propsDefault.href];
|
||||||
|
|||||||
@@ -74,6 +74,82 @@ export default [
|
|||||||
isAuth: false,
|
isAuth: false,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: '/vehicle/customer-archive/public-view',
|
||||||
|
name: '查看客商信息',
|
||||||
|
component: () => import('@/views/vehicle/customer-archive-public-view.vue'),
|
||||||
|
meta: {
|
||||||
|
keepAlive: false,
|
||||||
|
isTab: false,
|
||||||
|
isAuth: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/business/project-apply/public-view',
|
||||||
|
name: '查看项目信息',
|
||||||
|
component: () => import('@/views/business/project-apply-public-view.vue'),
|
||||||
|
meta: {
|
||||||
|
keepAlive: false,
|
||||||
|
isTab: false,
|
||||||
|
isAuth: false,
|
||||||
|
bizType: 'project-apply',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/business/contract-manage/public-view',
|
||||||
|
name: '查看合同信息',
|
||||||
|
component: () => import('@/views/business/contract-manage-public-view.vue'),
|
||||||
|
meta: {
|
||||||
|
keepAlive: false,
|
||||||
|
isTab: false,
|
||||||
|
isAuth: false,
|
||||||
|
bizType: 'contract-manage',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/business/waybill-manage/public-view',
|
||||||
|
name: '查看运单信息',
|
||||||
|
component: () => import('@/views/business/waybill-manage-public-view.vue'),
|
||||||
|
meta: {
|
||||||
|
keepAlive: false,
|
||||||
|
isTab: false,
|
||||||
|
isAuth: false,
|
||||||
|
bizType: 'waybill-manage',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/settlement/pre-settlement/public-view',
|
||||||
|
name: '查看预结算信息',
|
||||||
|
component: () => import('@/views/settlement/pre-settlement-public-view.vue'),
|
||||||
|
meta: {
|
||||||
|
keepAlive: false,
|
||||||
|
isTab: false,
|
||||||
|
isAuth: false,
|
||||||
|
bizType: 'pre-settlement',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/settlement/formal-settlement/public-view',
|
||||||
|
name: '查看正式结算信息',
|
||||||
|
component: () => import('@/views/settlement/formal-settlement-public-view.vue'),
|
||||||
|
meta: {
|
||||||
|
keepAlive: false,
|
||||||
|
isTab: false,
|
||||||
|
isAuth: false,
|
||||||
|
bizType: 'formal-settlement',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/payment/payment-application/public-view',
|
||||||
|
name: '查看付款申请信息',
|
||||||
|
component: () => import('@/views/payment/payment-application-public-view.vue'),
|
||||||
|
meta: {
|
||||||
|
keepAlive: false,
|
||||||
|
isTab: false,
|
||||||
|
isAuth: false,
|
||||||
|
bizType: 'payment-application',
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: '/',
|
path: '/',
|
||||||
name: '主页',
|
name: '主页',
|
||||||
|
|||||||
+1
-1
@@ -128,5 +128,5 @@ export function tabView(route, Component) {
|
|||||||
};
|
};
|
||||||
wrapperMap.set(tabKey, wrapper);
|
wrapperMap.set(tabKey, wrapper);
|
||||||
}
|
}
|
||||||
return h(wrapper);
|
return wrapper;
|
||||||
}
|
}
|
||||||
|
|||||||
+149
-30
@@ -1,5 +1,8 @@
|
|||||||
import Layout from '@/page/index/index.vue';
|
import Layout from '@/page/index/index.vue';
|
||||||
import Store from '@/store/';
|
import Store from '@/store/';
|
||||||
|
import { wrapViewLoader } from '@/utils/chunk-reload';
|
||||||
|
|
||||||
|
const loadView = loader => wrapViewLoader(loader);
|
||||||
|
|
||||||
export default [
|
export default [
|
||||||
{
|
{
|
||||||
@@ -10,7 +13,7 @@ export default [
|
|||||||
path: '',
|
path: '',
|
||||||
name: '汇票付款表单',
|
name: '汇票付款表单',
|
||||||
meta: { keepAlive: false, activeMenu: '/payment/bill-payment' },
|
meta: { keepAlive: false, activeMenu: '/payment/bill-payment' },
|
||||||
component: () => import('@/views/payment/bill-payment-form.vue'),
|
component: loadView(() => import('@/views/payment/bill-payment-form.vue')),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
@@ -22,7 +25,7 @@ export default [
|
|||||||
path: '',
|
path: '',
|
||||||
name: '汇票台账表单',
|
name: '汇票台账表单',
|
||||||
meta: { keepAlive: false, activeMenu: '/payment/bill-ledger' },
|
meta: { keepAlive: false, activeMenu: '/payment/bill-ledger' },
|
||||||
component: () => import('@/views/payment/bill-ledger-form.vue'),
|
component: loadView(() => import('@/views/payment/bill-ledger-form.vue')),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
@@ -34,7 +37,7 @@ export default [
|
|||||||
path: '',
|
path: '',
|
||||||
name: '认领记录详情',
|
name: '认领记录详情',
|
||||||
meta: { keepAlive: false, activeMenu: '/payment/receipt-claim-record' },
|
meta: { keepAlive: false, activeMenu: '/payment/receipt-claim-record' },
|
||||||
component: () => import('@/views/payment/receipt-claim-record-form.vue'),
|
component: loadView(() => import('@/views/payment/receipt-claim-record-form.vue')),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
@@ -46,7 +49,7 @@ export default [
|
|||||||
path: '',
|
path: '',
|
||||||
name: '收款流水认领',
|
name: '收款流水认领',
|
||||||
meta: { keepAlive: false, activeMenu: '/payment/receipt-flow' },
|
meta: { keepAlive: false, activeMenu: '/payment/receipt-flow' },
|
||||||
component: () => import('@/views/payment/receipt-flow-form.vue'),
|
component: loadView(() => import('@/views/payment/receipt-flow-form.vue')),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
@@ -58,7 +61,7 @@ export default [
|
|||||||
path: '',
|
path: '',
|
||||||
name: '收票登记',
|
name: '收票登记',
|
||||||
meta: { keepAlive: false, activeMenu: '/payment/invoice-receipt' },
|
meta: { keepAlive: false, activeMenu: '/payment/invoice-receipt' },
|
||||||
component: () => import('@/views/payment/invoice-receipt-form.vue'),
|
component: loadView(() => import('@/views/payment/invoice-receipt-form.vue')),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
@@ -70,7 +73,7 @@ export default [
|
|||||||
path: '',
|
path: '',
|
||||||
name: '开票申请',
|
name: '开票申请',
|
||||||
meta: { keepAlive: false, activeMenu: '/payment/invoice-application' },
|
meta: { keepAlive: false, activeMenu: '/payment/invoice-application' },
|
||||||
component: () => import('@/views/payment/invoice-application-form.vue'),
|
component: loadView(() => import('@/views/payment/invoice-application-form.vue')),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
@@ -82,7 +85,7 @@ export default [
|
|||||||
path: '',
|
path: '',
|
||||||
name: '付款申请',
|
name: '付款申请',
|
||||||
meta: { keepAlive: false, activeMenu: '/payment/payment-application' },
|
meta: { keepAlive: false, activeMenu: '/payment/payment-application' },
|
||||||
component: () => import('@/views/payment/payment-application-form.vue'),
|
component: loadView(() => import('@/views/payment/payment-application-form.vue')),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
@@ -97,7 +100,7 @@ export default [
|
|||||||
keepAlive: false,
|
keepAlive: false,
|
||||||
activeMenu: '/settlement/pre-settlement',
|
activeMenu: '/settlement/pre-settlement',
|
||||||
},
|
},
|
||||||
component: () => import('@/views/settlement/pre-settlement-form.vue'),
|
component: loadView(() => import('@/views/settlement/pre-settlement-form.vue')),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
@@ -112,7 +115,34 @@ export default [
|
|||||||
keepAlive: false,
|
keepAlive: false,
|
||||||
activeMenu: '/settlement/formal-settlement',
|
activeMenu: '/settlement/formal-settlement',
|
||||||
},
|
},
|
||||||
component: () => import('@/views/settlement/formal-settlement-form.vue'),
|
component: loadView(() => import('@/views/settlement/formal-settlement-form.vue')),
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/settlement/transport-reconciliation/form',
|
||||||
|
component: Layout,
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: '',
|
||||||
|
name: '新增编辑运输对账单',
|
||||||
|
meta: {
|
||||||
|
keepAlive: false,
|
||||||
|
activeMenu: '/settlement/transport-reconciliation',
|
||||||
|
},
|
||||||
|
component: loadView(() => 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: loadView(() => import('@/views/business/voucher-manage-detail.vue')),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
@@ -124,7 +154,19 @@ export default [
|
|||||||
path: '',
|
path: '',
|
||||||
name: '新增合同管理',
|
name: '新增合同管理',
|
||||||
meta: { keepAlive: false },
|
meta: { keepAlive: false },
|
||||||
component: () => import('@/views/business/contract-manage.vue'),
|
component: loadView(() => import('@/views/business/contract-manage.vue')),
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/business/contract-manage/detail',
|
||||||
|
component: Layout,
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: '',
|
||||||
|
name: '合同详情',
|
||||||
|
meta: { keepAlive: false, activeMenu: '/business/contract-manage' },
|
||||||
|
component: loadView(() => import('@/views/business/contract-manage.vue')),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
@@ -136,7 +178,7 @@ export default [
|
|||||||
path: '',
|
path: '',
|
||||||
name: '新增项目申请',
|
name: '新增项目申请',
|
||||||
meta: { keepAlive: false },
|
meta: { keepAlive: false },
|
||||||
component: () => import('@/views/business/project-apply.vue'),
|
component: loadView(() => import('@/views/business/project-apply.vue')),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
@@ -148,7 +190,43 @@ export default [
|
|||||||
path: '',
|
path: '',
|
||||||
name: '新增编辑运单管理',
|
name: '新增编辑运单管理',
|
||||||
meta: { keepAlive: false },
|
meta: { keepAlive: false },
|
||||||
component: () => import('@/views/business/waybill-manage.vue'),
|
component: loadView(() => import('@/views/business/waybill-manage.vue')),
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/business/waybill-manage/detail',
|
||||||
|
component: Layout,
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: '',
|
||||||
|
name: '运单管理详情',
|
||||||
|
meta: { keepAlive: false, activeMenu: '/business/waybill-manage' },
|
||||||
|
component: loadView(() => import('@/views/business/waybill-manage-detail.vue')),
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/business/waybill-import',
|
||||||
|
component: Layout,
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: '',
|
||||||
|
name: '导入运单',
|
||||||
|
meta: { keepAlive: false, activeMenu: '/business/waybill-import' },
|
||||||
|
component: loadView(() => import('@/views/business/waybill-import.vue')),
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/business/waybill-import/form',
|
||||||
|
component: Layout,
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: '',
|
||||||
|
name: '新建导入运单',
|
||||||
|
meta: { keepAlive: false, activeMenu: '/business/waybill-import' },
|
||||||
|
component: loadView(() => import('@/views/business/waybill-import-form.vue')),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
@@ -160,6 +238,18 @@ export default [
|
|||||||
path: '',
|
path: '',
|
||||||
name: '新增编辑配载管理',
|
name: '新增编辑配载管理',
|
||||||
meta: { keepAlive: false },
|
meta: { keepAlive: false },
|
||||||
|
component: loadView(() => import('@/views/business/loading-manage.vue')),
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/business/loading-manage/detail',
|
||||||
|
component: Layout,
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: '',
|
||||||
|
name: '配载单详情',
|
||||||
|
meta: { keepAlive: false, activeMenu: '/business/loading-manage' },
|
||||||
component: () => import('@/views/business/loading-manage.vue'),
|
component: () => import('@/views/business/loading-manage.vue'),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
@@ -172,7 +262,31 @@ export default [
|
|||||||
path: '',
|
path: '',
|
||||||
name: '新增编辑运输计划',
|
name: '新增编辑运输计划',
|
||||||
meta: { keepAlive: false },
|
meta: { keepAlive: false },
|
||||||
component: () => import('@/views/business/transport-plan.vue'),
|
component: loadView(() => import('@/views/business/transport-plan.vue')),
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/business/transport-plan/import',
|
||||||
|
component: Layout,
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: '',
|
||||||
|
name: '导入运输计划',
|
||||||
|
meta: { keepAlive: false, activeMenu: '/business/transport-plan' },
|
||||||
|
component: loadView(() => 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: loadView(() => import('@/views/business/transport-plan-dispatch.vue')),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
@@ -184,7 +298,7 @@ export default [
|
|||||||
path: '',
|
path: '',
|
||||||
name: '新增编辑运单模板',
|
name: '新增编辑运单模板',
|
||||||
meta: { keepAlive: false },
|
meta: { keepAlive: false },
|
||||||
component: () => import('@/views/business/shipping-template.vue'),
|
component: loadView(() => import('@/views/business/shipping-template.vue')),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
@@ -196,7 +310,7 @@ export default [
|
|||||||
path: '',
|
path: '',
|
||||||
name: '新增客商档案',
|
name: '新增客商档案',
|
||||||
meta: { keepAlive: false },
|
meta: { keepAlive: false },
|
||||||
component: () => import('@/views/vehicle/customer-archive.vue'),
|
component: loadView(() => import('@/views/vehicle/customer-archive.vue')),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
@@ -208,7 +322,7 @@ export default [
|
|||||||
path: '',
|
path: '',
|
||||||
name: '合同变更',
|
name: '合同变更',
|
||||||
meta: { keepAlive: false },
|
meta: { keepAlive: false },
|
||||||
component: () => import('@/views/business/contract-manage-change.vue'),
|
component: loadView(() => import('@/views/business/contract-manage-change.vue')),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
@@ -224,7 +338,7 @@ export default [
|
|||||||
meta: {
|
meta: {
|
||||||
i18n: 'dashboard',
|
i18n: 'dashboard',
|
||||||
},
|
},
|
||||||
component: () => import(/* webpackChunkName: "views" */ '@/views/wel/index.vue'),
|
component: loadView(() => import(/* webpackChunkName: "views" */ '@/views/wel/index.vue')),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'dashboard',
|
path: 'dashboard',
|
||||||
@@ -233,7 +347,7 @@ export default [
|
|||||||
i18n: 'dashboard',
|
i18n: 'dashboard',
|
||||||
menu: false,
|
menu: false,
|
||||||
},
|
},
|
||||||
component: () => import(/* webpackChunkName: "views" */ '@/views/wel/dashboard.vue'),
|
component: loadView(() => import(/* webpackChunkName: "views" */ '@/views/wel/dashboard.vue')),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
@@ -248,7 +362,7 @@ export default [
|
|||||||
meta: {
|
meta: {
|
||||||
i18n: 'test',
|
i18n: 'test',
|
||||||
},
|
},
|
||||||
component: () => import(/* webpackChunkName: "views" */ '@/views/util/test.vue'),
|
component: loadView(() => import(/* webpackChunkName: "views" */ '@/views/util/test.vue')),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
@@ -263,8 +377,9 @@ export default [
|
|||||||
meta: {
|
meta: {
|
||||||
i18n: 'dict',
|
i18n: 'dict',
|
||||||
},
|
},
|
||||||
component: () =>
|
component: loadView(() =>
|
||||||
import(/* webpackChunkName: "views" */ '@/views/util/demo/dict-horizontal.vue'),
|
import(/* webpackChunkName: "views" */ '@/views/util/demo/dict-horizontal.vue')
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
@@ -279,8 +394,9 @@ export default [
|
|||||||
meta: {
|
meta: {
|
||||||
i18n: 'dict',
|
i18n: 'dict',
|
||||||
},
|
},
|
||||||
component: () =>
|
component: loadView(() =>
|
||||||
import(/* webpackChunkName: "views" */ '@/views/util/demo/dict-vertical.vue'),
|
import(/* webpackChunkName: "views" */ '@/views/util/demo/dict-vertical.vue')
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
@@ -295,7 +411,7 @@ export default [
|
|||||||
meta: {
|
meta: {
|
||||||
i18n: 'info',
|
i18n: 'info',
|
||||||
},
|
},
|
||||||
component: () => import(/* webpackChunkName: "views" */ '@/views/system/userinfo.vue'),
|
component: loadView(() => import(/* webpackChunkName: "views" */ '@/views/system/userinfo.vue')),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
@@ -310,8 +426,9 @@ export default [
|
|||||||
meta: {
|
meta: {
|
||||||
i18n: 'work',
|
i18n: 'work',
|
||||||
},
|
},
|
||||||
component: () =>
|
component: loadView(() =>
|
||||||
import(/* webpackChunkName: "views" */ '@/views/work/process/leave/form.vue'),
|
import(/* webpackChunkName: "views" */ '@/views/work/process/leave/form.vue')
|
||||||
|
),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'handle/:taskId/:processInstanceId/:businessId',
|
path: 'handle/:taskId/:processInstanceId/:businessId',
|
||||||
@@ -319,8 +436,9 @@ export default [
|
|||||||
meta: {
|
meta: {
|
||||||
i18n: 'work',
|
i18n: 'work',
|
||||||
},
|
},
|
||||||
component: () =>
|
component: loadView(() =>
|
||||||
import(/* webpackChunkName: "views" */ '@/views/work/process/leave/handle.vue'),
|
import(/* webpackChunkName: "views" */ '@/views/work/process/leave/handle.vue')
|
||||||
|
),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'detail/:processInstanceId/:businessId',
|
path: 'detail/:processInstanceId/:businessId',
|
||||||
@@ -328,8 +446,9 @@ export default [
|
|||||||
meta: {
|
meta: {
|
||||||
i18n: 'work',
|
i18n: 'work',
|
||||||
},
|
},
|
||||||
component: () =>
|
component: loadView(() =>
|
||||||
import(/* webpackChunkName: "views" */ '@/views/work/process/leave/detail.vue'),
|
import(/* webpackChunkName: "views" */ '@/views/work/process/leave/detail.vue')
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -16,11 +16,8 @@ const getters = {
|
|||||||
lockPasswd: state => state.common.lockPasswd,
|
lockPasswd: state => state.common.lockPasswd,
|
||||||
tagList: state => state.tags.tagList,
|
tagList: state => state.tags.tagList,
|
||||||
tagsKeep: (state, getters) => {
|
tagsKeep: (state, getters) => {
|
||||||
return getters.tagList
|
// 所有已打开标签均纳入 keep-alive,关闭标签后自动从白名单移除并释放实例
|
||||||
.filter(ele => {
|
return getters.tagList.map(ele => ele.fullPath).filter(Boolean);
|
||||||
return (ele.meta || {}).keepAlive;
|
|
||||||
})
|
|
||||||
.map(ele => ele.fullPath);
|
|
||||||
},
|
},
|
||||||
tagWel: state => state.tags.tagWel,
|
tagWel: state => state.tags.tagWel,
|
||||||
token: state => state.user.token,
|
token: state => state.user.token,
|
||||||
|
|||||||
@@ -149,3 +149,20 @@ a {
|
|||||||
top: 0;
|
top: 0;
|
||||||
bottom: 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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -213,6 +213,17 @@
|
|||||||
gap: 8px;
|
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 {
|
.dialog-section-title::before {
|
||||||
content: '';
|
content: '';
|
||||||
flex: none;
|
flex: none;
|
||||||
@@ -1050,21 +1061,38 @@
|
|||||||
.el-form-item--label-right .el-form-item__label {
|
.el-form-item--label-right .el-form-item__label {
|
||||||
align-items: center;
|
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 {
|
.el-form-item--default {
|
||||||
margin-bottom: 14px;
|
margin-bottom: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ============ 必填星号 * 与首行文字垂直居中 ============
|
// 配套:星号必须保持「高度 auto + 继承行高」,stretch 才会按首行排布;
|
||||||
// Element Plus 默认 .el-form-item__label 为 inline-flex + align-items: flex-start,
|
// 写死 height 或 line-height 与 height 相等时效果会退化成居中。
|
||||||
// 星号 :before 高度(1em) 与文字行盒(line-height) 不一致时,多行/折行 label 会偏上。
|
|
||||||
// 让 :before 跟随 label 行高、以 inline-block 参与行内对齐即可修复,
|
|
||||||
// 兼容单行(默认 32px)与多行(auto + 18px)两种 label 高度场景。
|
|
||||||
// 注:客商档案(customer-archive)的 label 为 auto 高度 + padding 下沉方案,scoped 特异性更高会覆盖本规则。
|
// 注:客商档案(customer-archive)的 label 为 auto 高度 + padding 下沉方案,scoped 特异性更高会覆盖本规则。
|
||||||
.el-form-item.is-required .el-form-item__label::before {
|
.el-form-item.is-required .el-form-item__label::before {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
height: auto;
|
||||||
line-height: inherit;
|
line-height: inherit;
|
||||||
margin-right: 4px;
|
margin-right: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ============ archive-form:label 与控件垂直居中(全站复用) ============
|
||||||
|
// 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 {
|
//.el-form-item {
|
||||||
// margin-bottom: 15px !important;
|
// margin-bottom: 15px !important;
|
||||||
//}
|
//}
|
||||||
@@ -1117,11 +1145,18 @@
|
|||||||
color: #909399 !important;
|
color: #909399 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 已选中:选中文本用主文字色 #333333,与占位符明显区分。
|
// 已选中:选中文本用主文字色 #606266,与占位符明显区分。
|
||||||
// 注意:Element Plus 选中值节点同时带 el-select__selected-item 与 el-select__placeholder 两个类,
|
// 关键:Element Plus 的「选中值文本」与「占位符」共用同一个节点,
|
||||||
// 而上面占位符规则用了 !important,故此处必须同样 !important 才能胜出(本规则 specificity 更高)。
|
// <div class="el-select__selected-item el-select__placeholder [is-transparent]">
|
||||||
|
// 只有未选值(或已展开但无搜索输入)时才会带 .is-transparent。
|
||||||
|
// 因此这里必须排除 .is-transparent,否则未选值的占位符也会被染成选中色,与占位符灰无法区分。
|
||||||
// 仅作用于非禁用态,禁用态保留 Element Plus 的禁用灰(--el-select-disabled-color),避免被覆盖。
|
// 仅作用于非禁用态,禁用态保留 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;
|
color: #606266 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,168 @@
|
|||||||
|
/**
|
||||||
|
* 懒加载 chunk / CSS preload 失败后的整页恢复。
|
||||||
|
* 常见于:部署后旧 hash 失效、静态服务空闲断连、代理 CONNECTION_RESET。
|
||||||
|
*
|
||||||
|
* 失败后必须整页刷新:旧入口里的 hashed 资源地址不会自行更新,
|
||||||
|
* 仅捕获路由错误而不刷新时,未打开过的页面会一直无法进入。
|
||||||
|
*/
|
||||||
|
|
||||||
|
const RELOAD_FLAG = 'app:chunk-reload-ts';
|
||||||
|
const RELOAD_QUERY = '_chunkreload';
|
||||||
|
const RELOAD_COOLDOWN_MS = 15000;
|
||||||
|
|
||||||
|
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|Unable to preload|error loading module|Load failed/i;
|
||||||
|
|
||||||
|
/** 最近一次路由跳转目标,供 onError 时整页落到正确地址 */
|
||||||
|
let pendingFullPath = '';
|
||||||
|
let installed = false;
|
||||||
|
let reloading = false;
|
||||||
|
|
||||||
|
export function setPendingRoutePath(fullPath = '') {
|
||||||
|
pendingFullPath = fullPath || '';
|
||||||
|
}
|
||||||
|
|
||||||
|
function collectErrorText(error, depth = 0) {
|
||||||
|
if (!error || depth > 3) return '';
|
||||||
|
if (typeof error === 'string') return error;
|
||||||
|
const parts = [
|
||||||
|
error.message,
|
||||||
|
error.msg,
|
||||||
|
error.name,
|
||||||
|
error.stack,
|
||||||
|
error.error && collectErrorText(error.error, depth + 1),
|
||||||
|
error.reason && collectErrorText(error.reason, depth + 1),
|
||||||
|
error.cause && collectErrorText(error.cause, depth + 1),
|
||||||
|
error.payload && collectErrorText(error.payload, depth + 1),
|
||||||
|
];
|
||||||
|
const target = error.target;
|
||||||
|
if (target && (target.src || target.href)) {
|
||||||
|
parts.push(target.src || target.href);
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
parts.push(String(error));
|
||||||
|
} catch (e) {
|
||||||
|
/* ignore */
|
||||||
|
}
|
||||||
|
return parts.filter(Boolean).join(' ');
|
||||||
|
}
|
||||||
|
|
||||||
|
export function isChunkLoadError(error) {
|
||||||
|
const text = collectErrorText(error);
|
||||||
|
if (!text) return false;
|
||||||
|
if (CHUNK_ERROR_RE.test(text)) return true;
|
||||||
|
return /Failed to fetch/i.test(text) && /\.m?js(\?|$|:)/i.test(text);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function hasReloadQuery(query = {}) {
|
||||||
|
return !!(query && query[RELOAD_QUERY] !== undefined);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function consumeReloadQuery(query = {}) {
|
||||||
|
if (!hasReloadQuery(query)) return query;
|
||||||
|
const next = { ...query };
|
||||||
|
delete next[RELOAD_QUERY];
|
||||||
|
return next;
|
||||||
|
}
|
||||||
|
|
||||||
|
function buildReloadUrl(targetPath) {
|
||||||
|
const url = new URL(targetPath, window.location.origin);
|
||||||
|
url.searchParams.set(RELOAD_QUERY, String(Date.now()));
|
||||||
|
return url.pathname + url.search + url.hash;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @returns {boolean} 是否已触发刷新(冷却期内返回 false,避免死循环)
|
||||||
|
*/
|
||||||
|
export function reloadForChunkError(targetPath) {
|
||||||
|
if (reloading) return false;
|
||||||
|
const now = Date.now();
|
||||||
|
const last = Number(sessionStorage.getItem(RELOAD_FLAG) || 0);
|
||||||
|
if (now - last < RELOAD_COOLDOWN_MS) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
reloading = true;
|
||||||
|
sessionStorage.setItem(RELOAD_FLAG, String(now));
|
||||||
|
const path =
|
||||||
|
targetPath ||
|
||||||
|
pendingFullPath ||
|
||||||
|
`${window.location.pathname}${window.location.search}${window.location.hash}`;
|
||||||
|
const dest = buildReloadUrl(path);
|
||||||
|
// cache: 'reload' 会回写 HTTP 缓存,降低 index.html 仍指向旧 hash 资源的概率
|
||||||
|
fetch(`${window.location.pathname}?${RELOAD_QUERY}=${now}`, {
|
||||||
|
cache: 'reload',
|
||||||
|
credentials: 'same-origin',
|
||||||
|
headers: {
|
||||||
|
Pragma: 'no-cache',
|
||||||
|
'Cache-Control': 'no-cache',
|
||||||
|
},
|
||||||
|
})
|
||||||
|
.catch(() => {})
|
||||||
|
.finally(() => {
|
||||||
|
window.location.replace(dest);
|
||||||
|
});
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function wrapViewLoader(loader) {
|
||||||
|
if (typeof loader !== 'function') return loader;
|
||||||
|
return () =>
|
||||||
|
Promise.resolve()
|
||||||
|
.then(() => loader())
|
||||||
|
.catch(error => {
|
||||||
|
if (isChunkLoadError(error)) {
|
||||||
|
reloadForChunkError();
|
||||||
|
}
|
||||||
|
throw error;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export function installChunkReload() {
|
||||||
|
if (installed || typeof window === 'undefined') return;
|
||||||
|
installed = true;
|
||||||
|
|
||||||
|
window.addEventListener('vite:preloadError', event => {
|
||||||
|
if (reloadForChunkError()) {
|
||||||
|
event.preventDefault();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
window.addEventListener('unhandledrejection', event => {
|
||||||
|
if (!isChunkLoadError(event.reason)) return;
|
||||||
|
if (reloadForChunkError()) {
|
||||||
|
event.preventDefault();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
window.addEventListener(
|
||||||
|
'error',
|
||||||
|
event => {
|
||||||
|
const el = event.target;
|
||||||
|
const isAssetNode =
|
||||||
|
el &&
|
||||||
|
el !== window &&
|
||||||
|
(el.tagName === 'SCRIPT' ||
|
||||||
|
(el.tagName === 'LINK' && /modulepreload|stylesheet/i.test(el.rel || '')));
|
||||||
|
if (isAssetNode || isChunkLoadError(event.error || event.message)) {
|
||||||
|
if (reloadForChunkError()) {
|
||||||
|
event.preventDefault();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
true
|
||||||
|
);
|
||||||
|
|
||||||
|
document.addEventListener('visibilitychange', () => {
|
||||||
|
if (document.visibilityState === 'visible') checkDeployedAssets();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function checkDeployedAssets() {
|
||||||
|
const el = document.querySelector('script[type="module"][src*="/assets/"]');
|
||||||
|
if (!el || !el.src) return;
|
||||||
|
fetch(el.src, { method: 'HEAD', cache: 'no-store', credentials: 'same-origin' })
|
||||||
|
.then(res => {
|
||||||
|
if (res.status === 404) reloadForChunkError();
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
|
}
|
||||||
@@ -7,8 +7,20 @@ import 'nprogress/nprogress.css';
|
|||||||
const excelPattern = /\.(xls|xlsx)$/;
|
const excelPattern = /\.(xls|xlsx)$/;
|
||||||
|
|
||||||
const isExcelResponse = res => {
|
const isExcelResponse = res => {
|
||||||
const contentType = res.headers['content-type'] || res.data.type || '';
|
const headers = res.headers || {};
|
||||||
return contentType.includes('application/vnd.ms-excel');
|
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 => {
|
const parseBlobJson = async blob => {
|
||||||
@@ -44,9 +56,10 @@ const decorateFailExcel = async (blob, businessName, failDetailDecorator) => {
|
|||||||
* @param {Function} [onSuccess] 导入成功回调
|
* @param {Function} [onSuccess] 导入成功回调
|
||||||
* @param {Object} [options] 扩展项
|
* @param {Object} [options] 扩展项
|
||||||
* @param {Function} [options.failDetailDecorator] 失败明细加工函数,用于对后端返回的失败 Excel 标红/改写原因
|
* @param {Function} [options.failDetailDecorator] 失败明细加工函数,用于对后端返回的失败 Excel 标红/改写原因
|
||||||
|
* @param {Number} [options.timeout=60000] 导入请求超时时间(毫秒)
|
||||||
*/
|
*/
|
||||||
export const openImportDialog = (vm, businessName, onSuccess, options = {}) => {
|
export const openImportDialog = (vm, businessName, onSuccess, options = {}) => {
|
||||||
const { failDetailDecorator } = options;
|
const { failDetailDecorator, timeout = 60000 } = options;
|
||||||
const excelOption = vm.excelOption || vm.excelOptionConfig;
|
const excelOption = vm.excelOption || vm.excelOptionConfig;
|
||||||
const column = vm.findColumn(excelOption?.column || [], 'excelFile');
|
const column = vm.findColumn(excelOption?.column || [], 'excelFile');
|
||||||
if (!column) {
|
if (!column) {
|
||||||
@@ -54,12 +67,15 @@ export const openImportDialog = (vm, businessName, onSuccess, options = {}) => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
column.httpRequest = (option, uploadColumn) =>
|
column.httpRequest = (option, uploadColumn) =>
|
||||||
handleImportExcel(vm, option, uploadColumn, businessName, onSuccess, { failDetailDecorator });
|
handleImportExcel(vm, option, uploadColumn, businessName, onSuccess, {
|
||||||
|
failDetailDecorator,
|
||||||
|
timeout,
|
||||||
|
});
|
||||||
vm.excelBox = true;
|
vm.excelBox = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const handleImportExcel = async (vm, option, column, businessName, onSuccess, options = {}) => {
|
export const handleImportExcel = async (vm, option, column, businessName, onSuccess, options = {}) => {
|
||||||
const { failDetailDecorator } = options;
|
const { failDetailDecorator, timeout = 60000 } = options;
|
||||||
const file = option.file;
|
const file = option.file;
|
||||||
const fileName = file && file.name ? file.name.toLowerCase() : '';
|
const fileName = file && file.name ? file.name.toLowerCase() : '';
|
||||||
if (!excelPattern.test(fileName)) {
|
if (!excelPattern.test(fileName)) {
|
||||||
@@ -77,7 +93,7 @@ export const handleImportExcel = async (vm, option, column, businessName, onSucc
|
|||||||
background: 'rgba(255, 255, 255, 0.7)',
|
background: 'rgba(255, 255, 255, 0.7)',
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
const res = await importBlob(column.action, file);
|
const res = await importBlob(column.action, file, { timeout });
|
||||||
if (isExcelResponse(res)) {
|
if (isExcelResponse(res)) {
|
||||||
const decorated = await decorateFailExcel(res.data, businessName, failDetailDecorator);
|
const decorated = await decorateFailExcel(res.data, businessName, failDetailDecorator);
|
||||||
downloadXls(
|
downloadXls(
|
||||||
|
|||||||
@@ -0,0 +1,94 @@
|
|||||||
|
import { getDictionary } from '@/api/system/dictbiz';
|
||||||
|
import { processDelete, processSubmit } from '@/api/system/business-process';
|
||||||
|
import { ElMessage } from 'element-plus';
|
||||||
|
|
||||||
|
export const MK_BIZ = {
|
||||||
|
'customer-archive': {
|
||||||
|
dictName: '提交客商审核流',
|
||||||
|
subjectPrefix: '客商准入审批',
|
||||||
|
rejected: ['rejected'],
|
||||||
|
},
|
||||||
|
'project-apply': {
|
||||||
|
dictName: '提交项目审核流',
|
||||||
|
subjectPrefix: '项目审批',
|
||||||
|
rejected: ['rejected', 'change_rejected', 'withdrawn'],
|
||||||
|
},
|
||||||
|
'contract-manage': {
|
||||||
|
dictName: '提交合同审核流',
|
||||||
|
subjectPrefix: '合同审批',
|
||||||
|
rejected: ['rejected', 'change_rejected', 'withdrawn'],
|
||||||
|
},
|
||||||
|
'waybill-manage': {
|
||||||
|
dictName: '提交运单审核流',
|
||||||
|
subjectPrefix: '运单审批',
|
||||||
|
rejected: ['rejected', 'returned'],
|
||||||
|
},
|
||||||
|
'pre-settlement': {
|
||||||
|
dictName: '提交预结算审核流',
|
||||||
|
subjectPrefix: '预结算审批',
|
||||||
|
rejected: ['returned'],
|
||||||
|
},
|
||||||
|
'formal-settlement': {
|
||||||
|
dictName: '提交正式结算审核流',
|
||||||
|
subjectPrefix: '正式结算审批',
|
||||||
|
rejected: ['returned'],
|
||||||
|
},
|
||||||
|
'payment-application': {
|
||||||
|
dictName: '提交付款审核流',
|
||||||
|
subjectPrefix: '付款审批',
|
||||||
|
rejected: ['returned'],
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
const MK_SWITCH_NAME = '开启MK';
|
||||||
|
|
||||||
|
async function loadMkTemplateList() {
|
||||||
|
const res = await getDictionary({ code: 'mk_template' });
|
||||||
|
return res?.data?.data || [];
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 业务字典 mk_template:名称「开启MK」且键值为 1 时才请求 MK */
|
||||||
|
export function isMkEnabled(list = []) {
|
||||||
|
const matched = list.find(item => String(item.dictValue || '').trim() === MK_SWITCH_NAME);
|
||||||
|
return String(matched?.dictKey ?? '').trim() === '1';
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function resolveMkTemplateCode(dictName, list) {
|
||||||
|
const dictList = list || (await loadMkTemplateList());
|
||||||
|
const matched = dictList.find(item => String(item.dictValue || '').trim() === dictName);
|
||||||
|
const templateCode = matched?.dictKey;
|
||||||
|
if (!templateCode) {
|
||||||
|
ElMessage.warning(`未配置业务字典 mk_template「${dictName}」,无法提交审核流`);
|
||||||
|
return Promise.reject(new Error(`未配置业务字典 mk_template「${dictName}」`));
|
||||||
|
}
|
||||||
|
return String(templateCode);
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function submitMkApprovalFlow({
|
||||||
|
bizType,
|
||||||
|
formInstanceId,
|
||||||
|
subjectName = '',
|
||||||
|
approvalStatus = '',
|
||||||
|
}) {
|
||||||
|
const conf = MK_BIZ[bizType];
|
||||||
|
if (!conf) {
|
||||||
|
return Promise.reject(new Error(`不支持的MK业务类型:${bizType}`));
|
||||||
|
}
|
||||||
|
const list = await loadMkTemplateList();
|
||||||
|
if (!isMkEnabled(list)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if ((conf.rejected || []).includes(approvalStatus)) {
|
||||||
|
await processDelete({ formInstanceId: String(formInstanceId) });
|
||||||
|
}
|
||||||
|
const templateCode = await resolveMkTemplateCode(conf.dictName, list);
|
||||||
|
const subject = subjectName
|
||||||
|
? `${conf.subjectPrefix}:${subjectName}`
|
||||||
|
: `${conf.subjectPrefix}:${formInstanceId}`;
|
||||||
|
return processSubmit({
|
||||||
|
templateCode,
|
||||||
|
formInstanceId: String(formInstanceId),
|
||||||
|
subject,
|
||||||
|
bizType,
|
||||||
|
});
|
||||||
|
}
|
||||||
@@ -283,3 +283,31 @@ export function validatejson(val) {
|
|||||||
// 非对象、非数组、非字符串,或者字符串不是 JSON
|
// 非对象、非数组、非字符串,或者字符串不是 JSON
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 登录密码规则提示 */
|
||||||
|
export const LOGIN_PASSWORD_RULE_MESSAGE =
|
||||||
|
'密码须大于8位,且同时包含字母、数字和特殊字符(.!@#$%^&*)';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验登录密码强度:大于8位,同时包含字母、数字、特殊字符(.!@#$%^&*)
|
||||||
|
* @param {string} password
|
||||||
|
* @returns {boolean}
|
||||||
|
*/
|
||||||
|
export function isValidLoginPassword(password) {
|
||||||
|
return /^(?=.*[A-Za-z])(?=.*\d)(?=.*[.!@#$%^&*]).{9,}$/.test(String(password || ''));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Element Plus / Avue 表单校验器:登录密码强度
|
||||||
|
*/
|
||||||
|
export function validateLoginPassword(rule, value, callback) {
|
||||||
|
if (value === undefined || value === null || String(value).trim() === '') {
|
||||||
|
callback(new Error('请输入登录密码'));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!isValidLoginPassword(value)) {
|
||||||
|
callback(new Error(LOGIN_PASSWORD_RULE_MESSAGE));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
callback();
|
||||||
|
}
|
||||||
|
|||||||
@@ -94,6 +94,17 @@
|
|||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</template>
|
</template>
|
||||||
|
<template #detailAddress-form>
|
||||||
|
<el-input
|
||||||
|
v-model="form.detailAddress"
|
||||||
|
class="detail-address-input"
|
||||||
|
readonly
|
||||||
|
maxlength="255"
|
||||||
|
show-word-limit
|
||||||
|
placeholder="点击选择地图地址"
|
||||||
|
@click="openAddressMapPicker"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
<template #longitude-form>
|
<template #longitude-form>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="form.longitude"
|
v-model="form.longitude"
|
||||||
@@ -121,6 +132,13 @@
|
|||||||
</template>
|
</template>
|
||||||
</avue-form>
|
</avue-form>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
<address-map-picker
|
||||||
|
v-model="addressMapPickerVisible"
|
||||||
|
:address="form.detailAddress"
|
||||||
|
:longitude="form.longitude"
|
||||||
|
:latitude="form.latitude"
|
||||||
|
@confirm="handleAddressMapConfirm"
|
||||||
|
/>
|
||||||
</basic-container>
|
</basic-container>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -134,6 +152,7 @@ import { openImportDialog } from '@/utils/import-excel';
|
|||||||
import { formatUpdateUserName } from '@/utils/audit';
|
import { formatUpdateUserName } from '@/utils/audit';
|
||||||
import { getToken } from '@/utils/auth';
|
import { getToken } from '@/utils/auth';
|
||||||
import { getCoordinateValidationMessage, normalizeCoordinateInput } from '@/utils/coordinate';
|
import { getCoordinateValidationMessage, normalizeCoordinateInput } from '@/utils/coordinate';
|
||||||
|
import AddressMapPicker from '@/components/address-map-picker/main.vue';
|
||||||
import NProgress from 'nprogress';
|
import NProgress from 'nprogress';
|
||||||
import 'nprogress/nprogress.css';
|
import 'nprogress/nprogress.css';
|
||||||
|
|
||||||
@@ -181,6 +200,9 @@ const addExcelRequiredHeaderMarks = async blob => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
components: {
|
||||||
|
AddressMapPicker,
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
const validateIataCode = (rule, value, callback) => {
|
const validateIataCode = (rule, value, callback) => {
|
||||||
if (!/^[A-Z]{3}$/.test(String(value || '').toUpperCase())) {
|
if (!/^[A-Z]{3}$/.test(String(value || '').toUpperCase())) {
|
||||||
@@ -220,6 +242,7 @@ export default {
|
|||||||
loading: true,
|
loading: true,
|
||||||
data: [],
|
data: [],
|
||||||
excelBox: false,
|
excelBox: false,
|
||||||
|
addressMapPickerVisible: false,
|
||||||
excelForm: {},
|
excelForm: {},
|
||||||
provinceOptions: [],
|
provinceOptions: [],
|
||||||
cityOptions: [],
|
cityOptions: [],
|
||||||
@@ -368,15 +391,14 @@ export default {
|
|||||||
{
|
{
|
||||||
label: '详细地址',
|
label: '详细地址',
|
||||||
prop: 'detailAddress',
|
prop: 'detailAddress',
|
||||||
type: 'textarea',
|
formslot: true,
|
||||||
minRows: 2,
|
|
||||||
span: 24,
|
span: 24,
|
||||||
minWidth: 220,
|
minWidth: 220,
|
||||||
overHidden: false,
|
overHidden: false,
|
||||||
maxlength: 255,
|
maxlength: 255,
|
||||||
showWordLimit: true,
|
showWordLimit: true,
|
||||||
rules: [
|
rules: [
|
||||||
{ required: true, message: '请输入详细地址', trigger: 'blur' },
|
{ required: true, message: '请选择详细地址', trigger: 'change' },
|
||||||
{ max: 255, message: '详细地址不能超过255字', trigger: 'blur' },
|
{ max: 255, message: '详细地址不能超过255字', trigger: 'blur' },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
@@ -504,7 +526,7 @@ export default {
|
|||||||
propsHttp: {
|
propsHttp: {
|
||||||
res: 'data',
|
res: 'data',
|
||||||
},
|
},
|
||||||
tip: '请上传 .xls,.xlsx 标准格式文件',
|
tip: '请上传 .xls,.xlsx 标准格式文件;日期支持 2026-08-02、2026-8-2、2026/8/2 等写法',
|
||||||
accept: '.xls,.xlsx',
|
accept: '.xls,.xlsx',
|
||||||
action: '/blade-system/airport-master/import-airport-master',
|
action: '/blade-system/airport-master/import-airport-master',
|
||||||
},
|
},
|
||||||
@@ -669,6 +691,29 @@ export default {
|
|||||||
handleCoordinateInput(prop, value) {
|
handleCoordinateInput(prop, value) {
|
||||||
this.form[prop] = normalizeCoordinateInput(value);
|
this.form[prop] = normalizeCoordinateInput(value);
|
||||||
},
|
},
|
||||||
|
openAddressMapPicker() {
|
||||||
|
this.addressMapPickerVisible = true;
|
||||||
|
},
|
||||||
|
handleAddressMapConfirm(payload) {
|
||||||
|
const selection = typeof payload === 'string' ? { address: payload } : payload || {};
|
||||||
|
if (selection.address) {
|
||||||
|
this.form.detailAddress = selection.address;
|
||||||
|
}
|
||||||
|
if (
|
||||||
|
selection.longitude !== undefined &&
|
||||||
|
selection.longitude !== null &&
|
||||||
|
selection.longitude !== ''
|
||||||
|
) {
|
||||||
|
this.form.longitude = Number(selection.longitude).toFixed(6);
|
||||||
|
}
|
||||||
|
if (
|
||||||
|
selection.latitude !== undefined &&
|
||||||
|
selection.latitude !== null &&
|
||||||
|
selection.latitude !== ''
|
||||||
|
) {
|
||||||
|
this.form.latitude = Number(selection.latitude).toFixed(6);
|
||||||
|
}
|
||||||
|
},
|
||||||
normalizeRow(row) {
|
normalizeRow(row) {
|
||||||
row.code = row.iataCode ? `JC-${row.iataCode}` : row.code;
|
row.code = row.iataCode ? `JC-${row.iataCode}` : row.code;
|
||||||
row.regionCode = String(row.regionCode || '').trim();
|
row.regionCode = String(row.regionCode || '').trim();
|
||||||
@@ -917,4 +962,13 @@ export default {
|
|||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.detail-address-input {
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
|
:deep(.el-input__wrapper),
|
||||||
|
:deep(.el-input__inner) {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -55,6 +55,19 @@
|
|||||||
{{ row.createUserName || row.createUser || '' }}
|
{{ row.createUserName || row.createUser || '' }}
|
||||||
</template>
|
</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>
|
<template #parentId-form>
|
||||||
<el-select
|
<el-select
|
||||||
v-model="form.parentId"
|
v-model="form.parentId"
|
||||||
@@ -261,7 +274,7 @@ export default {
|
|||||||
res: 'data',
|
res: 'data',
|
||||||
},
|
},
|
||||||
headers: getUploadHeaders(),
|
headers: getUploadHeaders(),
|
||||||
tip: '请上传 .xls,.xlsx 标准格式文件',
|
tip: '请上传 .xls,.xlsx 标准格式文件;日期支持 2026-08-02、2026-8-2、2026/8/2 等写法',
|
||||||
action: '/blade-system/cargo-type/import-cargo-type',
|
action: '/blade-system/cargo-type/import-cargo-type',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -644,3 +657,18 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</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>
|
||||||
|
|||||||
@@ -232,7 +232,10 @@
|
|||||||
搜索
|
搜索
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="map-picker-content">
|
||||||
|
<map-search-results :results="mapSearchResults" @select="selectMapSearchResult" />
|
||||||
<div ref="amap" class="common-address-page__map"></div>
|
<div ref="amap" class="common-address-page__map"></div>
|
||||||
|
</div>
|
||||||
<div class="common-address-page__map-info">
|
<div class="common-address-page__map-info">
|
||||||
<span>{{ mapStatus }}</span>
|
<span>{{ mapStatus }}</span>
|
||||||
<span v-if="mapSelected.regionName">行政区划:{{ mapSelected.regionName }}</span>
|
<span v-if="mapSelected.regionName">行政区划:{{ mapSelected.regionName }}</span>
|
||||||
@@ -298,6 +301,7 @@ export default {
|
|||||||
mapKeyword: '',
|
mapKeyword: '',
|
||||||
mapStatus: '可搜索地址或点击地图选点',
|
mapStatus: '可搜索地址或点击地图选点',
|
||||||
mapSelected: {},
|
mapSelected: {},
|
||||||
|
mapSearchResults: [],
|
||||||
amap: null,
|
amap: null,
|
||||||
amapMarker: null,
|
amapMarker: null,
|
||||||
amapGeocoder: null,
|
amapGeocoder: null,
|
||||||
@@ -1113,6 +1117,12 @@ export default {
|
|||||||
this.ensureAmapGeocoder()
|
this.ensureAmapGeocoder()
|
||||||
.then(() => this.runAmapGeocode('location', keyword))
|
.then(() => this.runAmapGeocode('location', keyword))
|
||||||
.then(result => {
|
.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);
|
const point = this.resolveMapPoint(result);
|
||||||
if (!point) {
|
if (!point) {
|
||||||
this.mapStatus = '未找到匹配地址';
|
this.mapStatus = '未找到匹配地址';
|
||||||
@@ -1133,6 +1143,11 @@ export default {
|
|||||||
this.$message.error('高德地图组件加载失败,请稍后重试或重新打开弹窗');
|
this.$message.error('高德地图组件加载失败,请稍后重试或重新打开弹窗');
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
selectMapSearchResult(item) {
|
||||||
|
if (item && item.location) {
|
||||||
|
this.pickMapPoint(item.location, item.address || item.name || '');
|
||||||
|
}
|
||||||
|
},
|
||||||
pickMapPoint(lnglat, keyword) {
|
pickMapPoint(lnglat, keyword) {
|
||||||
const longitude = this.getPointLng(lnglat);
|
const longitude = this.getPointLng(lnglat);
|
||||||
const latitude = this.getPointLat(lnglat);
|
const latitude = this.getPointLat(lnglat);
|
||||||
|
|||||||
@@ -326,7 +326,7 @@ export default {
|
|||||||
propsHttp: {
|
propsHttp: {
|
||||||
res: 'data',
|
res: 'data',
|
||||||
},
|
},
|
||||||
tip: '请上传 .xls,.xlsx 标准格式文件',
|
tip: '请上传 .xls,.xlsx 标准格式文件;日期支持 2026-08-02、2026-8-2、2026/8/2 等写法',
|
||||||
action: '/blade-system/currency/import-currency',
|
action: '/blade-system/currency/import-currency',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -30,6 +30,9 @@
|
|||||||
{{ row.status === 1 ? '启用' : '停用' }}
|
{{ row.status === 1 ? '启用' : '停用' }}
|
||||||
</el-tag>
|
</el-tag>
|
||||||
</template>
|
</template>
|
||||||
|
<template #feeCategory="{ row }">
|
||||||
|
{{ formatFeeCategory(row.feeCategory) }}
|
||||||
|
</template>
|
||||||
<template #feeCategory-form>
|
<template #feeCategory-form>
|
||||||
<el-select
|
<el-select
|
||||||
v-model="form.feeCategory"
|
v-model="form.feeCategory"
|
||||||
@@ -47,6 +50,19 @@
|
|||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</template>
|
</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>
|
<template #englishName-form>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="form.englishName"
|
v-model="form.englishName"
|
||||||
@@ -78,7 +94,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import { getList, getDetail, submit, remove, changeStatus } from '@/api/base/fee-item';
|
import { getList, getDetail, submit, remove, changeStatus } from '@/api/base/fee-item';
|
||||||
import { exportBlob } from '@/api/common';
|
import { exportBlob } from '@/api/common';
|
||||||
import { getDictionary } from '@/api/system/dictbiz';
|
import { getDictionaryAll } from '@/api/system/dictbiz';
|
||||||
import { getDeptTree } from '@/api/system/dept';
|
import { getDeptTree } from '@/api/system/dept';
|
||||||
import { downloadXls } from '@/utils/util';
|
import { downloadXls } from '@/utils/util';
|
||||||
import { getToken } from '@/utils/auth';
|
import { getToken } from '@/utils/auth';
|
||||||
@@ -134,10 +150,11 @@ export default {
|
|||||||
searchOrder: 3,
|
searchOrder: 3,
|
||||||
filterable: true,
|
filterable: true,
|
||||||
formslot: true,
|
formslot: true,
|
||||||
|
slot: true,
|
||||||
span: 12,
|
span: 12,
|
||||||
dicData: [],
|
dicData: [],
|
||||||
props: {
|
props: {
|
||||||
label: 'dictValue',
|
label: 'displayLabel',
|
||||||
value: 'dictKey',
|
value: 'dictKey',
|
||||||
},
|
},
|
||||||
minWidth: 120,
|
minWidth: 120,
|
||||||
@@ -152,6 +169,30 @@ export default {
|
|||||||
maxlength: 100,
|
maxlength: 100,
|
||||||
rules: [{ required: true, message: '请输入费用项代码', trigger: 'blur' }],
|
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: '费用项',
|
label: '费用项',
|
||||||
prop: 'name',
|
prop: 'name',
|
||||||
@@ -168,7 +209,8 @@ export default {
|
|||||||
type: 'textarea',
|
type: 'textarea',
|
||||||
minRows: 2,
|
minRows: 2,
|
||||||
span: 24,
|
span: 24,
|
||||||
hide: true,
|
minWidth: 200,
|
||||||
|
overHidden: true,
|
||||||
maxlength: 200,
|
maxlength: 200,
|
||||||
showWordLimit: true,
|
showWordLimit: true,
|
||||||
rules: [{ max: 200, message: '备注不能超过200个字', trigger: 'blur' }],
|
rules: [{ max: 200, message: '备注不能超过200个字', trigger: 'blur' }],
|
||||||
@@ -273,10 +315,17 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
initFeeCategoryOptions() {
|
initFeeCategoryOptions() {
|
||||||
getDictionary({ code: 'fee_category' }).then(res => {
|
getDictionaryAll().then(res => {
|
||||||
this.feeCategoryOptions = res.data.data || [];
|
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');
|
const column = this.findColumn(this.option.column, 'feeCategory');
|
||||||
column.dicData = this.feeCategoryOptions;
|
column.dicData = options;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
initDeptTree() {
|
initDeptTree() {
|
||||||
@@ -305,6 +354,21 @@ export default {
|
|||||||
);
|
);
|
||||||
return String((option && option.dictKey) || feeCategory);
|
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) {
|
getFeeItemCodeSuffix(code, feeCategory) {
|
||||||
const value = String(code || '').trim();
|
const value = String(code || '').trim();
|
||||||
const prefix = this.getFeeCategoryPrefix(feeCategory);
|
const prefix = this.getFeeCategoryPrefix(feeCategory);
|
||||||
@@ -326,6 +390,7 @@ export default {
|
|||||||
const code = this.getFeeItemCodeSuffix(values.englishName, values.feeCategory);
|
const code = this.getFeeItemCodeSuffix(values.englishName, values.feeCategory);
|
||||||
values.feeCategory = String(values.feeCategory || '').trim();
|
values.feeCategory = String(values.feeCategory || '').trim();
|
||||||
values.name = String(values.name || '').trim();
|
values.name = String(values.name || '').trim();
|
||||||
|
values.taxRate = Number(values.taxRate);
|
||||||
values.englishName = prefix ? `${prefix}${code}` : code;
|
values.englishName = prefix ? `${prefix}${code}` : code;
|
||||||
values.remark = String(values.remark || '').trim() || undefined;
|
values.remark = String(values.remark || '').trim() || undefined;
|
||||||
if (!values.status) values.status = 1;
|
if (!values.status) values.status = 1;
|
||||||
@@ -335,6 +400,11 @@ export default {
|
|||||||
const values = { ...row };
|
const values = { ...row };
|
||||||
values.feeCategory = String(values.feeCategory || '').trim();
|
values.feeCategory = String(values.feeCategory || '').trim();
|
||||||
values.englishName = this.getFeeItemCodeSuffix(values.englishName, values.feeCategory);
|
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;
|
return values;
|
||||||
},
|
},
|
||||||
validateUnique(row) {
|
validateUnique(row) {
|
||||||
@@ -434,6 +504,11 @@ export default {
|
|||||||
this.form.englishName = '';
|
this.form.englishName = '';
|
||||||
done();
|
done();
|
||||||
},
|
},
|
||||||
|
handleTaxRateInput(value) {
|
||||||
|
let normalized = String(value ?? '').replace(/\D/g, '');
|
||||||
|
if (normalized.length > 1) normalized = normalized.replace(/^0+/, '') || '0';
|
||||||
|
this.form.taxRate = normalized;
|
||||||
|
},
|
||||||
searchReset() {
|
searchReset() {
|
||||||
this.query = {};
|
this.query = {};
|
||||||
this.onLoad(this.page);
|
this.onLoad(this.page);
|
||||||
|
|||||||
@@ -20,6 +20,16 @@
|
|||||||
批量删除
|
批量删除
|
||||||
</el-button>
|
</el-button>
|
||||||
<div class="insurance-ocr-template-page__search">
|
<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
|
<el-input
|
||||||
v-model="query.name"
|
v-model="query.name"
|
||||||
clearable
|
clearable
|
||||||
@@ -42,6 +52,7 @@
|
|||||||
<el-table-column type="selection" width="48" />
|
<el-table-column type="selection" width="48" />
|
||||||
<el-table-column type="index" label="序号" width="70" align="center" />
|
<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="name" label="模板名称" min-width="220" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="vehicleType" label="车船类型" min-width="110" />
|
||||||
<el-table-column label="已配置字段" min-width="150">
|
<el-table-column label="已配置字段" min-width="150">
|
||||||
<template #default="{ row }">{{ getMappingCount(row.mappingConfig) }}</template>
|
<template #default="{ row }">{{ getMappingCount(row.mappingConfig) }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -94,6 +105,12 @@
|
|||||||
<el-form-item label="模板名称" prop="name">
|
<el-form-item label="模板名称" prop="name">
|
||||||
<el-input v-model="form.name" maxlength="100" show-word-limit />
|
<el-input v-model="form.name" maxlength="100" show-word-limit />
|
||||||
</el-form-item>
|
</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-form-item label="字段映射" required>
|
||||||
<el-table :data="mappingRows" border class="insurance-ocr-template-page__mapping-table">
|
<el-table :data="mappingRows" border class="insurance-ocr-template-page__mapping-table">
|
||||||
<el-table-column prop="key" label="键名" width="180" align="center" />
|
<el-table-column prop="key" label="键名" width="180" align="center" />
|
||||||
@@ -165,8 +182,8 @@ export default {
|
|||||||
readonly: false,
|
readonly: false,
|
||||||
data: [],
|
data: [],
|
||||||
selectionList: [],
|
selectionList: [],
|
||||||
query: { name: '' },
|
query: { name: '', vehicleType: '' },
|
||||||
form: { id: '', name: '' },
|
form: { id: '', name: '', vehicleType: '车辆' },
|
||||||
mappingRows: createMappingRows(),
|
mappingRows: createMappingRows(),
|
||||||
page: {
|
page: {
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
@@ -176,6 +193,7 @@ export default {
|
|||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
name: [{ required: true, message: '请输入模板名称', trigger: 'blur' }],
|
name: [{ required: true, message: '请输入模板名称', trigger: 'blur' }],
|
||||||
|
vehicleType: [{ required: true, message: '请选择车船类型', trigger: 'change' }],
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@@ -201,7 +219,7 @@ export default {
|
|||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
getList(this.page.currentPage, this.page.pageSize, this.query)
|
return getList(this.page.currentPage, this.page.pageSize, this.query)
|
||||||
.then(res => {
|
.then(res => {
|
||||||
const pageData = res.data.data || {};
|
const pageData = res.data.data || {};
|
||||||
this.data = pageData.records || [];
|
this.data = pageData.records || [];
|
||||||
@@ -218,6 +236,7 @@ export default {
|
|||||||
},
|
},
|
||||||
resetSearch() {
|
resetSearch() {
|
||||||
this.query.name = '';
|
this.query.name = '';
|
||||||
|
this.query.vehicleType = '';
|
||||||
this.search();
|
this.search();
|
||||||
},
|
},
|
||||||
currentChange(currentPage) {
|
currentChange(currentPage) {
|
||||||
@@ -235,18 +254,23 @@ export default {
|
|||||||
openDialog(row, readonly = false) {
|
openDialog(row, readonly = false) {
|
||||||
this.readonly = readonly;
|
this.readonly = readonly;
|
||||||
if (!row?.id) {
|
if (!row?.id) {
|
||||||
|
this.form = { id: '', name: '', vehicleType: '车辆' };
|
||||||
this.dialogVisible = true;
|
this.dialogVisible = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
getDetail(row.id).then(res => {
|
getDetail(row.id).then(res => {
|
||||||
const detail = res.data.data || {};
|
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.mappingRows = createMappingRows(detail.mappingConfig);
|
||||||
this.dialogVisible = true;
|
this.dialogVisible = true;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
resetForm() {
|
resetForm() {
|
||||||
this.form = { id: '', name: '' };
|
this.form = { id: '', name: '', vehicleType: '车辆' };
|
||||||
this.mappingRows = createMappingRows();
|
this.mappingRows = createMappingRows();
|
||||||
this.readonly = false;
|
this.readonly = false;
|
||||||
this.submitLoading = false;
|
this.submitLoading = false;
|
||||||
@@ -264,14 +288,15 @@ export default {
|
|||||||
submit({
|
submit({
|
||||||
id: this.form.id || undefined,
|
id: this.form.id || undefined,
|
||||||
name: String(this.form.name || '').trim(),
|
name: String(this.form.name || '').trim(),
|
||||||
|
vehicleType: this.form.vehicleType || '车辆',
|
||||||
mappingConfig: JSON.stringify(
|
mappingConfig: JSON.stringify(
|
||||||
this.mappingRows.map(item => ({ key: item.key, value: String(item.value || '').trim() }))
|
this.mappingRows.map(item => ({ key: item.key, value: String(item.value || '').trim() }))
|
||||||
),
|
),
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(async () => {
|
||||||
this.$message.success('操作成功');
|
this.$message.success('操作成功');
|
||||||
this.dialogVisible = false;
|
this.dialogVisible = false;
|
||||||
this.onLoad();
|
await this.onLoad();
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
this.submitLoading = false;
|
this.submitLoading = false;
|
||||||
@@ -311,7 +336,7 @@ export default {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 8px;
|
gap: 8px;
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
width: 380px;
|
width: 520px;
|
||||||
}
|
}
|
||||||
|
|
||||||
&__mapping-table {
|
&__mapping-table {
|
||||||
|
|||||||
@@ -0,0 +1,256 @@
|
|||||||
|
<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.unitCode = String(row.unitCode || '').trim();
|
||||||
|
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>
|
||||||
@@ -93,6 +93,24 @@
|
|||||||
<el-radio label="码头">码头</el-radio>
|
<el-radio label="码头">码头</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</template>
|
</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>
|
<template #code-form>
|
||||||
<el-input
|
<el-input
|
||||||
v-if="form.category !== '码头'"
|
v-if="form.category !== '码头'"
|
||||||
@@ -176,10 +194,11 @@
|
|||||||
<el-input
|
<el-input
|
||||||
v-model="form.detailAddress"
|
v-model="form.detailAddress"
|
||||||
class="detail-address-input"
|
class="detail-address-input"
|
||||||
clearable
|
readonly
|
||||||
maxlength="255"
|
maxlength="255"
|
||||||
show-word-limit
|
show-word-limit
|
||||||
placeholder="请输入"
|
placeholder="点击选择地图地址"
|
||||||
|
@click="openAddressMapPicker"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
<template #remark-form>
|
<template #remark-form>
|
||||||
@@ -226,6 +245,13 @@
|
|||||||
</template>
|
</template>
|
||||||
</avue-form>
|
</avue-form>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
<address-map-picker
|
||||||
|
v-model="addressMapPickerVisible"
|
||||||
|
:address="form.detailAddress"
|
||||||
|
:longitude="form.longitude"
|
||||||
|
:latitude="form.latitude"
|
||||||
|
@confirm="handleAddressMapConfirm"
|
||||||
|
/>
|
||||||
</basic-container>
|
</basic-container>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -246,12 +272,16 @@ import { openImportDialog } from '@/utils/import-excel';
|
|||||||
import { formatUpdateUserName } from '@/utils/audit';
|
import { formatUpdateUserName } from '@/utils/audit';
|
||||||
import { getToken } from '@/utils/auth';
|
import { getToken } from '@/utils/auth';
|
||||||
import { getCoordinateValidationMessage, normalizeCoordinateInput } from '@/utils/coordinate';
|
import { getCoordinateValidationMessage, normalizeCoordinateInput } from '@/utils/coordinate';
|
||||||
|
import AddressMapPicker from '@/components/address-map-picker/main.vue';
|
||||||
import NProgress from 'nprogress';
|
import NProgress from 'nprogress';
|
||||||
import 'nprogress/nprogress.css';
|
import 'nprogress/nprogress.css';
|
||||||
|
|
||||||
const DEFAULT_COUNTRY_CODE = '+86';
|
const DEFAULT_COUNTRY_CODE = '+86';
|
||||||
const newLocal = '请选择类型';
|
const newLocal = '请选择类型';
|
||||||
export default {
|
export default {
|
||||||
|
components: {
|
||||||
|
AddressMapPicker,
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
const validateCode = (rule, value, callback) => {
|
const validateCode = (rule, value, callback) => {
|
||||||
const code = String(value || '').toUpperCase();
|
const code = String(value || '').toUpperCase();
|
||||||
@@ -297,9 +327,12 @@ export default {
|
|||||||
loading: true,
|
loading: true,
|
||||||
data: [],
|
data: [],
|
||||||
excelBox: false,
|
excelBox: false,
|
||||||
|
addressMapPickerVisible: false,
|
||||||
excelForm: {},
|
excelForm: {},
|
||||||
portOptions: [],
|
portOptions: [],
|
||||||
countryOptions: [],
|
countryOptions: [],
|
||||||
|
provinceOptions: [],
|
||||||
|
provinceOptionCache: {},
|
||||||
cityOptions: [],
|
cityOptions: [],
|
||||||
cityLoading: false,
|
cityLoading: false,
|
||||||
cityOptionCache: {},
|
cityOptionCache: {},
|
||||||
@@ -436,13 +469,30 @@ export default {
|
|||||||
change: ({ value }) => this.handleCountryNameChange(value),
|
change: ({ value }) => this.handleCountryNameChange(value),
|
||||||
rules: [{ required: true, message: '请选择国家', trigger: 'change' }],
|
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: '城市',
|
label: '城市',
|
||||||
prop: 'cityCode',
|
prop: 'cityCode',
|
||||||
formslot: true,
|
formslot: true,
|
||||||
hide: true,
|
hide: true,
|
||||||
span: 12,
|
span: 12,
|
||||||
order: 88,
|
order: 87,
|
||||||
placeholder: '请选择',
|
placeholder: '请选择',
|
||||||
rules: [{ required: true, message: '请选择所属城市', trigger: 'change' }],
|
rules: [{ required: true, message: '请选择所属城市', trigger: 'change' }],
|
||||||
},
|
},
|
||||||
@@ -465,7 +515,7 @@ export default {
|
|||||||
type: 'select',
|
type: 'select',
|
||||||
formslot: true,
|
formslot: true,
|
||||||
hide: true,
|
hide: true,
|
||||||
order: 87,
|
order: 86,
|
||||||
props: {
|
props: {
|
||||||
label: 'title',
|
label: 'title',
|
||||||
value: 'id',
|
value: 'id',
|
||||||
@@ -534,12 +584,12 @@ export default {
|
|||||||
span: 12,
|
span: 12,
|
||||||
minWidth: 220,
|
minWidth: 220,
|
||||||
overHidden: false,
|
overHidden: false,
|
||||||
order: 86,
|
order: 85,
|
||||||
placeholder: '请输入',
|
placeholder: '点击选择地图地址',
|
||||||
maxlength: 255,
|
maxlength: 255,
|
||||||
showWordLimit: true,
|
showWordLimit: true,
|
||||||
rules: [
|
rules: [
|
||||||
{ required: true, message: '请输入详细地址', trigger: 'blur' },
|
{ required: true, message: '请选择详细地址', trigger: 'change' },
|
||||||
{ max: 255, message: '详细地址不能超过255字', trigger: 'blur' },
|
{ max: 255, message: '详细地址不能超过255字', trigger: 'blur' },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
@@ -555,9 +605,8 @@ export default {
|
|||||||
editDisplay: false,
|
editDisplay: false,
|
||||||
dicData: [
|
dicData: [
|
||||||
{ label: '全部', value: '' },
|
{ label: '全部', value: '' },
|
||||||
{ label: '初始化录入', value: '初始化录入' },
|
|
||||||
{ label: '批量导入', value: '批量导入' },
|
{ label: '批量导入', value: '批量导入' },
|
||||||
{ label: '手动录入', value: '手动录入' },
|
{ label: '手动输入', value: '手动录入' },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -637,7 +686,7 @@ export default {
|
|||||||
propsHttp: {
|
propsHttp: {
|
||||||
res: 'data',
|
res: 'data',
|
||||||
},
|
},
|
||||||
tip: '请上传 .xls,.xlsx 标准格式文件',
|
tip: '请上传 .xls,.xlsx 标准格式文件;日期支持 2026-08-02、2026-8-2、2026/8/2 等写法',
|
||||||
accept: '.xls,.xlsx',
|
accept: '.xls,.xlsx',
|
||||||
action: '/blade-system/port-terminal/import-port-terminal',
|
action: '/blade-system/port-terminal/import-port-terminal',
|
||||||
},
|
},
|
||||||
@@ -668,6 +717,9 @@ export default {
|
|||||||
return this.form.category === '码头';
|
return this.form.category === '码头';
|
||||||
},
|
},
|
||||||
isCityDisabled() {
|
isCityDisabled() {
|
||||||
|
return this.isParentRegionLocked || !this.form.provinceCode;
|
||||||
|
},
|
||||||
|
isProvinceDisabled() {
|
||||||
return this.isParentRegionLocked || !this.form.countryCode;
|
return this.isParentRegionLocked || !this.form.countryCode;
|
||||||
},
|
},
|
||||||
isDistrictDisabled() {
|
isDistrictDisabled() {
|
||||||
@@ -756,7 +808,7 @@ export default {
|
|||||||
this.form.parentName = '';
|
this.form.parentName = '';
|
||||||
this.form.countryCode = '';
|
this.form.countryCode = '';
|
||||||
this.form.country = '';
|
this.form.country = '';
|
||||||
this.clearCityValue();
|
this.clearProvinceValue();
|
||||||
},
|
},
|
||||||
handleCategoryChange(value, reset = true) {
|
handleCategoryChange(value, reset = true) {
|
||||||
const required = value === '码头';
|
const required = value === '码头';
|
||||||
@@ -780,13 +832,15 @@ export default {
|
|||||||
handleCountryChange(value) {
|
handleCountryChange(value) {
|
||||||
const country = this.countryOptions.find(item => item.id === value);
|
const country = this.countryOptions.find(item => item.id === value);
|
||||||
this.form.country = country ? country.title : '';
|
this.form.country = country ? country.title : '';
|
||||||
this.clearCityValue();
|
this.clearProvinceValue();
|
||||||
this.loadCityOptions(value);
|
this.loadProvinceOptions(value);
|
||||||
},
|
},
|
||||||
handleCountryNameChange(value) {
|
handleCountryNameChange(value) {
|
||||||
const country = this.countryOptions.find(item => item.title === value);
|
const country = this.countryOptions.find(item => item.title === value);
|
||||||
|
this.setProvinceOptions([]);
|
||||||
|
this.setCityOptions([]);
|
||||||
this.setDistrictOptions([]);
|
this.setDistrictOptions([]);
|
||||||
this.loadCityOptions(country ? country.id : '');
|
this.loadProvinceOptions(country ? country.id : '');
|
||||||
},
|
},
|
||||||
syncCountryName(countryCode) {
|
syncCountryName(countryCode) {
|
||||||
const country = this.countryOptions.find(item => item.id === countryCode);
|
const country = this.countryOptions.find(item => item.id === countryCode);
|
||||||
@@ -819,6 +873,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() {
|
clearCityValue() {
|
||||||
this.form.cityCode = undefined;
|
this.form.cityCode = undefined;
|
||||||
this.form.city = '';
|
this.form.city = '';
|
||||||
@@ -829,36 +895,38 @@ export default {
|
|||||||
this.form.districtName = '';
|
this.form.districtName = '';
|
||||||
this.form.regionCode = '';
|
this.form.regionCode = '';
|
||||||
},
|
},
|
||||||
loadCityOptions(countryCode) {
|
loadProvinceOptions(countryCode) {
|
||||||
if (!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([]);
|
this.setCityOptions([]);
|
||||||
return Promise.resolve([]);
|
return Promise.resolve([]);
|
||||||
}
|
}
|
||||||
if (this.cityOptionCache[countryCode]) {
|
if (this.cityOptionCache[provinceCode]) {
|
||||||
this.setCityOptions(this.cityOptionCache[countryCode]);
|
this.setCityOptions(this.cityOptionCache[provinceCode]);
|
||||||
return Promise.resolve(this.cityOptionCache[countryCode]);
|
return Promise.resolve(this.cityOptionCache[provinceCode]);
|
||||||
}
|
}
|
||||||
this.cityLoading = true;
|
this.cityLoading = true;
|
||||||
return getLazyTree(countryCode)
|
return getLazyTree(provinceCode)
|
||||||
.then(res => {
|
.then(res => {
|
||||||
const firstLevelList = (res.data.data || []).map(this.normalizeRegionOption);
|
const options = (res.data.data || []).map(this.normalizeRegionOption);
|
||||||
return Promise.all(
|
this.cityOptionCache[provinceCode] = options;
|
||||||
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);
|
this.setCityOptions(options);
|
||||||
return options;
|
return options;
|
||||||
});
|
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
this.cityLoading = false;
|
this.cityLoading = false;
|
||||||
@@ -868,6 +936,12 @@ export default {
|
|||||||
const city = this.cityOptions.find(item => item.title === cityName || item.id === regionCode);
|
const city = this.cityOptions.find(item => item.title === cityName || item.id === regionCode);
|
||||||
return city ? city.id : '';
|
return city ? city.id : '';
|
||||||
},
|
},
|
||||||
|
resolveProvinceCode(provinceName) {
|
||||||
|
const province = this.provinceOptions.find(
|
||||||
|
item => item.title === provinceName || item.id === provinceName
|
||||||
|
);
|
||||||
|
return province ? province.id : '';
|
||||||
|
},
|
||||||
setDistrictOptions(districtOptions) {
|
setDistrictOptions(districtOptions) {
|
||||||
this.districtOptions = districtOptions;
|
this.districtOptions = districtOptions;
|
||||||
const districtCodeColumn = this.findColumn(this.option.column, 'districtCode');
|
const districtCodeColumn = this.findColumn(this.option.column, 'districtCode');
|
||||||
@@ -928,6 +1002,8 @@ export default {
|
|||||||
this.form.terminalCode = terminalCode;
|
this.form.terminalCode = terminalCode;
|
||||||
this.handleTerminalCodeChange(terminalCode);
|
this.handleTerminalCodeChange(terminalCode);
|
||||||
this.form.country = parent.country;
|
this.form.country = parent.country;
|
||||||
|
this.form.provinceCode = parent.provinceCode;
|
||||||
|
this.form.provinceName = parent.provinceName;
|
||||||
this.form.city = parent.city;
|
this.form.city = parent.city;
|
||||||
this.form.districtCode = parent.districtCode;
|
this.form.districtCode = parent.districtCode;
|
||||||
this.form.districtName = parent.districtName;
|
this.form.districtName = parent.districtName;
|
||||||
@@ -936,7 +1012,12 @@ export default {
|
|||||||
.then(countryCode => {
|
.then(countryCode => {
|
||||||
this.form.countryCode = countryCode;
|
this.form.countryCode = countryCode;
|
||||||
this.syncCountryName(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(() => {
|
.then(() => {
|
||||||
this.form.cityCode = this.resolveCityCode(parent.city, parent.regionCode);
|
this.form.cityCode = this.resolveCityCode(parent.city, parent.regionCode);
|
||||||
@@ -953,6 +1034,12 @@ export default {
|
|||||||
this.clearDistrictValue();
|
this.clearDistrictValue();
|
||||||
this.loadDistrictOptions(value);
|
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) {
|
handleCityNameChange(value) {
|
||||||
const city = this.cityOptions.find(item => item.title === value);
|
const city = this.cityOptions.find(item => item.title === value);
|
||||||
this.setDistrictOptions([]);
|
this.setDistrictOptions([]);
|
||||||
@@ -966,6 +1053,21 @@ export default {
|
|||||||
handleCoordinateInput(prop, value) {
|
handleCoordinateInput(prop, value) {
|
||||||
this.form[prop] = normalizeCoordinateInput(value);
|
this.form[prop] = normalizeCoordinateInput(value);
|
||||||
},
|
},
|
||||||
|
openAddressMapPicker() {
|
||||||
|
this.addressMapPickerVisible = true;
|
||||||
|
},
|
||||||
|
handleAddressMapConfirm(payload) {
|
||||||
|
const selection = typeof payload === 'string' ? { address: payload } : payload || {};
|
||||||
|
if (selection.address) {
|
||||||
|
this.form.detailAddress = selection.address;
|
||||||
|
}
|
||||||
|
if (selection.longitude !== undefined && selection.longitude !== null && selection.longitude !== '') {
|
||||||
|
this.form.longitude = Number(selection.longitude).toFixed(6);
|
||||||
|
}
|
||||||
|
if (selection.latitude !== undefined && selection.latitude !== null && selection.latitude !== '') {
|
||||||
|
this.form.latitude = Number(selection.latitude).toFixed(6);
|
||||||
|
}
|
||||||
|
},
|
||||||
resolveCountryCode(country) {
|
resolveCountryCode(country) {
|
||||||
if (!country) {
|
if (!country) {
|
||||||
return Promise.resolve('');
|
return Promise.resolve('');
|
||||||
@@ -989,6 +1091,8 @@ export default {
|
|||||||
submitRow.regionCode = String(submitRow.regionCode || '').trim();
|
submitRow.regionCode = String(submitRow.regionCode || '').trim();
|
||||||
submitRow.districtCode = String(submitRow.districtCode || '').trim();
|
submitRow.districtCode = String(submitRow.districtCode || '').trim();
|
||||||
submitRow.districtName = String(submitRow.districtName || '').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.detailAddress = String(submitRow.detailAddress || '').trim();
|
||||||
submitRow.longitude = normalizeCoordinateInput(submitRow.longitude);
|
submitRow.longitude = normalizeCoordinateInput(submitRow.longitude);
|
||||||
submitRow.latitude = normalizeCoordinateInput(submitRow.latitude);
|
submitRow.latitude = normalizeCoordinateInput(submitRow.latitude);
|
||||||
@@ -1022,12 +1126,16 @@ export default {
|
|||||||
this.$message.warning('请选择上级港口');
|
this.$message.warning('请选择上级港口');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if (isBlank(row.provinceCode)) {
|
||||||
|
this.$message.warning('请选择所属省份');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
if (isBlank(row.regionCode)) {
|
if (isBlank(row.regionCode)) {
|
||||||
this.$message.warning('请选择区县');
|
this.$message.warning('请选择区县');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (isBlank(row.detailAddress)) {
|
if (isBlank(row.detailAddress)) {
|
||||||
this.$message.warning('请输入详细地址');
|
this.$message.warning('请选择详细地址');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (isBlank(row.longitude)) {
|
if (isBlank(row.longitude)) {
|
||||||
@@ -1154,7 +1262,13 @@ export default {
|
|||||||
.then(countryCode => {
|
.then(countryCode => {
|
||||||
this.form.countryCode = countryCode;
|
this.form.countryCode = countryCode;
|
||||||
this.syncCountryName(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(() => {
|
.then(() => {
|
||||||
this.form.cityCode = this.resolveCityCode(this.form.city, this.form.regionCode);
|
this.form.cityCode = this.resolveCityCode(this.form.city, this.form.regionCode);
|
||||||
@@ -1180,7 +1294,13 @@ export default {
|
|||||||
.then(countryCode => {
|
.then(countryCode => {
|
||||||
this.form.countryCode = countryCode;
|
this.form.countryCode = countryCode;
|
||||||
this.syncCountryName(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(() => {
|
.then(() => {
|
||||||
this.form.cityCode = this.resolveCityCode(this.form.city, this.form.regionCode);
|
this.form.cityCode = this.resolveCityCode(this.form.city, this.form.regionCode);
|
||||||
@@ -1212,6 +1332,7 @@ export default {
|
|||||||
},
|
},
|
||||||
searchReset() {
|
searchReset() {
|
||||||
this.query = {};
|
this.query = {};
|
||||||
|
this.setProvinceOptions([]);
|
||||||
this.setCityOptions([]);
|
this.setCityOptions([]);
|
||||||
this.setDistrictOptions([]);
|
this.setDistrictOptions([]);
|
||||||
this.onLoad(this.page);
|
this.onLoad(this.page);
|
||||||
@@ -1252,14 +1373,10 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleImport() {
|
handleImport() {
|
||||||
openImportDialog(
|
openImportDialog(this, '港口码头主数据', () => {
|
||||||
this,
|
|
||||||
'港口码头主数据',
|
|
||||||
() => {
|
|
||||||
this.loadPortOptions();
|
this.loadPortOptions();
|
||||||
this.onLoad(this.page, this.query);
|
this.onLoad(this.page, this.query);
|
||||||
}
|
});
|
||||||
);
|
|
||||||
},
|
},
|
||||||
handleExport() {
|
handleExport() {
|
||||||
this.$confirm('是否导出港口码头主数据?', '提示', {
|
this.$confirm('是否导出港口码头主数据?', '提示', {
|
||||||
@@ -1272,7 +1389,10 @@ export default {
|
|||||||
feedback: true,
|
feedback: true,
|
||||||
})
|
})
|
||||||
.then(res => {
|
.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(() => {
|
.finally(() => {
|
||||||
NProgress.done();
|
NProgress.done();
|
||||||
@@ -1307,6 +1427,15 @@ export default {
|
|||||||
line-height: 20px;
|
line-height: 20px;
|
||||||
padding: 4px 0;
|
padding: 4px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.detail-address-input {
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
|
:deep(.el-input__wrapper),
|
||||||
|
:deep(.el-input__inner) {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
|||||||
@@ -94,6 +94,17 @@
|
|||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</template>
|
</template>
|
||||||
|
<template #detailAddress-form>
|
||||||
|
<el-input
|
||||||
|
v-model="form.detailAddress"
|
||||||
|
class="detail-address-input"
|
||||||
|
readonly
|
||||||
|
maxlength="255"
|
||||||
|
show-word-limit
|
||||||
|
placeholder="点击选择地图地址"
|
||||||
|
@click="openAddressMapPicker"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
<template #longitude-form>
|
<template #longitude-form>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="form.longitude"
|
v-model="form.longitude"
|
||||||
@@ -121,6 +132,13 @@
|
|||||||
</template>
|
</template>
|
||||||
</avue-form>
|
</avue-form>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
<address-map-picker
|
||||||
|
v-model="addressMapPickerVisible"
|
||||||
|
:address="form.detailAddress"
|
||||||
|
:longitude="form.longitude"
|
||||||
|
:latitude="form.latitude"
|
||||||
|
@confirm="handleAddressMapConfirm"
|
||||||
|
/>
|
||||||
</basic-container>
|
</basic-container>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -134,12 +152,16 @@ import { openImportDialog } from '@/utils/import-excel';
|
|||||||
import { formatUpdateUserName } from '@/utils/audit';
|
import { formatUpdateUserName } from '@/utils/audit';
|
||||||
import { getToken } from '@/utils/auth';
|
import { getToken } from '@/utils/auth';
|
||||||
import { getCoordinateValidationMessage, normalizeCoordinateInput } from '@/utils/coordinate';
|
import { getCoordinateValidationMessage, normalizeCoordinateInput } from '@/utils/coordinate';
|
||||||
|
import AddressMapPicker from '@/components/address-map-picker/main.vue';
|
||||||
import NProgress from 'nprogress';
|
import NProgress from 'nprogress';
|
||||||
import 'nprogress/nprogress.css';
|
import 'nprogress/nprogress.css';
|
||||||
|
|
||||||
const DEFAULT_COUNTRY_CODE = '+86';
|
const DEFAULT_COUNTRY_CODE = '+86';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
components: {
|
||||||
|
AddressMapPicker,
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
const validateTmisCode = (rule, value, callback) => {
|
const validateTmisCode = (rule, value, callback) => {
|
||||||
if (!/^\d{5}$/.test(value || '')) {
|
if (!/^\d{5}$/.test(value || '')) {
|
||||||
@@ -150,7 +172,7 @@ export default {
|
|||||||
};
|
};
|
||||||
const validateTelegraphCode = (rule, value, callback) => {
|
const validateTelegraphCode = (rule, value, callback) => {
|
||||||
if (!/^[A-Z]{3}$/.test(String(value || '').toUpperCase())) {
|
if (!/^[A-Z]{3}$/.test(String(value || '').toUpperCase())) {
|
||||||
callback(new Error('电报码格式不正确或已存在'));
|
callback(new Error('电报略码格式不正确或已存在'));
|
||||||
} else {
|
} else {
|
||||||
callback();
|
callback();
|
||||||
}
|
}
|
||||||
@@ -185,6 +207,7 @@ export default {
|
|||||||
loading: true,
|
loading: true,
|
||||||
data: [],
|
data: [],
|
||||||
excelBox: false,
|
excelBox: false,
|
||||||
|
addressMapPickerVisible: false,
|
||||||
excelForm: {},
|
excelForm: {},
|
||||||
provinceOptions: [],
|
provinceOptions: [],
|
||||||
cityOptions: [],
|
cityOptions: [],
|
||||||
@@ -246,12 +269,12 @@ export default {
|
|||||||
change: ({ value }) => this.handleTmisChange(value),
|
change: ({ value }) => this.handleTmisChange(value),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '电报码',
|
label: '电报略码',
|
||||||
prop: 'telegraphCode',
|
prop: 'telegraphCode',
|
||||||
minWidth: 100,
|
minWidth: 100,
|
||||||
maxlength: 3,
|
maxlength: 3,
|
||||||
rules: [
|
rules: [
|
||||||
{ required: true, message: '电报码格式不正确或已存在', trigger: 'blur' },
|
{ required: true, message: '电报略码格式不正确或已存在', trigger: 'blur' },
|
||||||
{ validator: validateTelegraphCode, trigger: 'blur' },
|
{ validator: validateTelegraphCode, trigger: 'blur' },
|
||||||
],
|
],
|
||||||
change: ({ value }) => this.handleTelegraphChange(value),
|
change: ({ value }) => this.handleTelegraphChange(value),
|
||||||
@@ -340,15 +363,14 @@ export default {
|
|||||||
{
|
{
|
||||||
label: '详细地址',
|
label: '详细地址',
|
||||||
prop: 'detailAddress',
|
prop: 'detailAddress',
|
||||||
type: 'textarea',
|
formslot: true,
|
||||||
minRows: 2,
|
|
||||||
span: 24,
|
span: 24,
|
||||||
minWidth: 220,
|
minWidth: 220,
|
||||||
overHidden: false,
|
overHidden: false,
|
||||||
maxlength: 255,
|
maxlength: 255,
|
||||||
showWordLimit: true,
|
showWordLimit: true,
|
||||||
rules: [
|
rules: [
|
||||||
{ required: true, message: '请输入详细地址', trigger: 'blur' },
|
{ required: true, message: '请选择详细地址', trigger: 'change' },
|
||||||
{ max: 255, message: '详细地址不能超过255字', trigger: 'blur' },
|
{ max: 255, message: '详细地址不能超过255字', trigger: 'blur' },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
@@ -454,9 +476,8 @@ export default {
|
|||||||
editDisplay: false,
|
editDisplay: false,
|
||||||
dicData: [
|
dicData: [
|
||||||
{ label: '全部', value: '' },
|
{ label: '全部', value: '' },
|
||||||
{ label: '初始化导入', value: '初始化导入' },
|
{ label: '批量导入', value: '批量' },
|
||||||
{ label: '批量', value: '批量' },
|
{ label: '手动导入', value: '手动' },
|
||||||
{ label: '手动', value: '手动' },
|
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
@@ -476,7 +497,7 @@ export default {
|
|||||||
propsHttp: {
|
propsHttp: {
|
||||||
res: 'data',
|
res: 'data',
|
||||||
},
|
},
|
||||||
tip: '请上传 .xls,.xlsx 标准格式文件',
|
tip: '请上传 .xls,.xlsx 标准格式文件;日期支持 2026-08-02、2026-8-2、2026/8/2 等写法',
|
||||||
accept: '.xls,.xlsx',
|
accept: '.xls,.xlsx',
|
||||||
action: '/blade-system/railway-station/import-railway-station',
|
action: '/blade-system/railway-station/import-railway-station',
|
||||||
},
|
},
|
||||||
@@ -653,6 +674,29 @@ export default {
|
|||||||
handleCoordinateInput(prop, value) {
|
handleCoordinateInput(prop, value) {
|
||||||
this.form[prop] = normalizeCoordinateInput(value);
|
this.form[prop] = normalizeCoordinateInput(value);
|
||||||
},
|
},
|
||||||
|
openAddressMapPicker() {
|
||||||
|
this.addressMapPickerVisible = true;
|
||||||
|
},
|
||||||
|
handleAddressMapConfirm(payload) {
|
||||||
|
const selection = typeof payload === 'string' ? { address: payload } : payload || {};
|
||||||
|
if (selection.address) {
|
||||||
|
this.form.detailAddress = selection.address;
|
||||||
|
}
|
||||||
|
if (
|
||||||
|
selection.longitude !== undefined &&
|
||||||
|
selection.longitude !== null &&
|
||||||
|
selection.longitude !== ''
|
||||||
|
) {
|
||||||
|
this.form.longitude = Number(selection.longitude).toFixed(6);
|
||||||
|
}
|
||||||
|
if (
|
||||||
|
selection.latitude !== undefined &&
|
||||||
|
selection.latitude !== null &&
|
||||||
|
selection.latitude !== ''
|
||||||
|
) {
|
||||||
|
this.form.latitude = Number(selection.latitude).toFixed(6);
|
||||||
|
}
|
||||||
|
},
|
||||||
normalizeRow(row) {
|
normalizeRow(row) {
|
||||||
row.code = row.tmisCode ? `TL${row.tmisCode}` : row.code;
|
row.code = row.tmisCode ? `TL${row.tmisCode}` : row.code;
|
||||||
row.regionCode = String(row.regionCode || '').trim();
|
row.regionCode = String(row.regionCode || '').trim();
|
||||||
@@ -695,13 +739,13 @@ export default {
|
|||||||
return Promise.reject(new Error('该TMIS编码已存在'));
|
return Promise.reject(new Error('该TMIS编码已存在'));
|
||||||
}
|
}
|
||||||
if (telegraphExists) {
|
if (telegraphExists) {
|
||||||
return Promise.reject(new Error('电报码格式不正确或已存在'));
|
return Promise.reject(new Error('电报略码格式不正确或已存在'));
|
||||||
}
|
}
|
||||||
return Promise.resolve();
|
return Promise.resolve();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleSubmitError(error, loading) {
|
handleSubmitError(error, loading) {
|
||||||
const uniqueMessages = ['该TMIS编码已存在', '电报码格式不正确或已存在'];
|
const uniqueMessages = ['该TMIS编码已存在', '电报略码格式不正确或已存在'];
|
||||||
if (uniqueMessages.includes(error.message)) {
|
if (uniqueMessages.includes(error.message)) {
|
||||||
this.$message.warning(error.message);
|
this.$message.warning(error.message);
|
||||||
}
|
}
|
||||||
@@ -782,10 +826,18 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
beforeOpen(done, type) {
|
beforeOpen(done, type) {
|
||||||
|
const tmisCodeColumn = this.findColumn('tmisCode');
|
||||||
|
if (tmisCodeColumn) {
|
||||||
|
// Avue 会复用列配置,打开不同记录前必须先清除上一次编辑状态。
|
||||||
|
tmisCodeColumn.disabled = false;
|
||||||
|
}
|
||||||
if (['edit', 'view'].includes(type)) {
|
if (['edit', 'view'].includes(type)) {
|
||||||
this.regionInitializing = true;
|
this.regionInitializing = true;
|
||||||
getDetail(this.form.id).then(res => {
|
getDetail(this.form.id).then(res => {
|
||||||
const detail = this.normalizeRegionForm(res.data.data || {});
|
const detail = this.normalizeRegionForm(res.data.data || {});
|
||||||
|
if (tmisCodeColumn) {
|
||||||
|
tmisCodeColumn.disabled = type === 'edit' && Number(detail.status) === 1;
|
||||||
|
}
|
||||||
this.loadCityOptions(detail.provinceCode)
|
this.loadCityOptions(detail.provinceCode)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.ensureCityOption(detail);
|
this.ensureCityOption(detail);
|
||||||
@@ -851,7 +903,7 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleImport() {
|
handleImport() {
|
||||||
openImportDialog(this, '铁路车站主数据');
|
openImportDialog(this, '铁路车站主数据', () => this.onLoad(this.page, this.query));
|
||||||
},
|
},
|
||||||
handleExport() {
|
handleExport() {
|
||||||
this.$confirm('是否导出铁路车站主数据?', '提示', {
|
this.$confirm('是否导出铁路车站主数据?', '提示', {
|
||||||
@@ -903,9 +955,16 @@ export default {
|
|||||||
:deep(.el-table td .cell) {
|
:deep(.el-table td .cell) {
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.detail-address-input {
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
|
:deep(.el-input__wrapper),
|
||||||
|
:deep(.el-input__inner) {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
|||||||
+51
-46
@@ -4,7 +4,11 @@
|
|||||||
<div class="box">
|
<div class="box">
|
||||||
<el-scrollbar>
|
<el-scrollbar>
|
||||||
<basic-container>
|
<basic-container>
|
||||||
<avue-tree :option="treeOption" :data="treeData" @node-click="nodeClick" />
|
<avue-tree
|
||||||
|
:option="treeOption"
|
||||||
|
:data="treeData"
|
||||||
|
@node-click="nodeClick"
|
||||||
|
/>
|
||||||
</basic-container>
|
</basic-container>
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
</div>
|
</div>
|
||||||
@@ -27,20 +31,8 @@
|
|||||||
<el-option label="区县" :value="3" />
|
<el-option label="区县" :value="3" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="数据来源">
|
|
||||||
<el-select v-model="searchForm.dataSource" clearable placeholder="请选择" style="width: 200px;">
|
|
||||||
<el-option label="手动录入" value="手动录入" />
|
|
||||||
<el-option label="初始化导入" value="初始化导入" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</div>
|
</div>
|
||||||
<div style="display: flex; flex-direction: row; align-items: center; justify-content: space-between;">
|
<div style="display: flex; flex-direction: row; align-items: center; justify-content: flex-end;">
|
||||||
<el-form-item label="启停状态">
|
|
||||||
<el-select v-model="searchForm.status" clearable placeholder="请选择" style="width: 200px;">
|
|
||||||
<el-option label="启用" :value="1" />
|
|
||||||
<el-option label="停用" :value="2" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item class="region-page__search-actions">
|
<el-form-item class="region-page__search-actions">
|
||||||
<el-button type="primary" @click="handleSearch">搜索</el-button>
|
<el-button type="primary" @click="handleSearch">搜索</el-button>
|
||||||
<el-button @click="handleSearchReset">清空</el-button>
|
<el-button @click="handleSearchReset">清空</el-button>
|
||||||
@@ -50,13 +42,6 @@
|
|||||||
</section-card>
|
</section-card>
|
||||||
|
|
||||||
<el-button-group>
|
<el-button-group>
|
||||||
<el-button
|
|
||||||
v-if="permission.region_add"
|
|
||||||
type="primary"
|
|
||||||
icon="el-icon-plus"
|
|
||||||
@click="addCountry"
|
|
||||||
>新增国家
|
|
||||||
</el-button>
|
|
||||||
<el-button
|
<el-button
|
||||||
v-if="permission.region_add"
|
v-if="permission.region_add"
|
||||||
type="primary"
|
type="primary"
|
||||||
@@ -180,8 +165,6 @@ export default {
|
|||||||
code: '',
|
code: '',
|
||||||
name: '',
|
name: '',
|
||||||
regionLevel: undefined,
|
regionLevel: undefined,
|
||||||
dataSource: '',
|
|
||||||
status: undefined,
|
|
||||||
},
|
},
|
||||||
parentOptions: [],
|
parentOptions: [],
|
||||||
syncLoading: false,
|
syncLoading: false,
|
||||||
@@ -191,18 +174,17 @@ export default {
|
|||||||
treeLoad: (node, resolve) => {
|
treeLoad: (node, resolve) => {
|
||||||
const parentCode = node.level === 0 ? ROOT_PARENT_CODE : node.data.id;
|
const parentCode = node.level === 0 ? ROOT_PARENT_CODE : node.data.id;
|
||||||
getLazyTree(parentCode, this.searchForm).then(res => {
|
getLazyTree(parentCode, this.searchForm).then(res => {
|
||||||
resolve(
|
const treeData = this.normalizeTreeData(res.data.data);
|
||||||
res.data.data.map(item => {
|
if (node.level === 0) {
|
||||||
return {
|
this.setDefaultExpandedKeys(treeData);
|
||||||
...item,
|
}
|
||||||
leaf: !item.hasChildren,
|
resolve(treeData);
|
||||||
};
|
|
||||||
})
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
addBtn: false,
|
addBtn: false,
|
||||||
menu: false,
|
menu: false,
|
||||||
|
defaultExpandAll: false,
|
||||||
|
defaultExpandedKeys: [],
|
||||||
size: 'default',
|
size: 'default',
|
||||||
props: {
|
props: {
|
||||||
labelText: '标题',
|
labelText: '标题',
|
||||||
@@ -269,6 +251,12 @@ export default {
|
|||||||
prop: 'regionLevel',
|
prop: 'regionLevel',
|
||||||
type: 'radio',
|
type: 'radio',
|
||||||
dicUrl: '/blade-system/dict/dictionary?code=region',
|
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: {
|
props: {
|
||||||
label: 'dictValue',
|
label: 'dictValue',
|
||||||
value: 'dictKey',
|
value: 'dictKey',
|
||||||
@@ -321,7 +309,7 @@ export default {
|
|||||||
propsHttp: {
|
propsHttp: {
|
||||||
res: 'data',
|
res: 'data',
|
||||||
},
|
},
|
||||||
tip: '请上传 .xls,.xlsx 标准格式文件',
|
tip: '请上传 .xls,.xlsx 标准格式文件;日期支持 2026-08-02、2026-8-2、2026/8/2 等写法',
|
||||||
action: '/blade-system/region/import-region',
|
action: '/blade-system/region/import-region',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -420,9 +408,7 @@ export default {
|
|||||||
computed: {
|
computed: {
|
||||||
...mapGetters(['permission']),
|
...mapGetters(['permission']),
|
||||||
isCountryRegion() {
|
isCountryRegion() {
|
||||||
return (
|
return Number(this.regionForm.regionLevel) === 0;
|
||||||
Number(this.regionForm.regionLevel) === 0 || this.regionForm.parentCode === this.topCode
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
isProvinceRegion() {
|
isProvinceRegion() {
|
||||||
return Number(this.regionForm.regionLevel) === 1;
|
return Number(this.regionForm.regionLevel) === 1;
|
||||||
@@ -447,15 +433,28 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
initTree() {
|
normalizeTreeData(data) {
|
||||||
this.treeData = [];
|
return data.map(item => {
|
||||||
getLazyTree(this.topCode, this.searchForm).then(res => {
|
|
||||||
this.treeData = res.data.data.map(item => {
|
|
||||||
return {
|
return {
|
||||||
...item,
|
...item,
|
||||||
leaf: !item.hasChildren,
|
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 => {
|
||||||
|
const treeData = this.normalizeTreeData(res.data.data);
|
||||||
|
this.treeData = treeData;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.setDefaultExpandedKeys(treeData);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleSearch() {
|
handleSearch() {
|
||||||
@@ -467,8 +466,6 @@ export default {
|
|||||||
code: '',
|
code: '',
|
||||||
name: '',
|
name: '',
|
||||||
regionLevel: undefined,
|
regionLevel: undefined,
|
||||||
dataSource: '',
|
|
||||||
status: undefined,
|
|
||||||
};
|
};
|
||||||
this.handleSearch();
|
this.handleSearch();
|
||||||
},
|
},
|
||||||
@@ -507,6 +504,10 @@ export default {
|
|||||||
this.$message.warning('请先选择一项区划');
|
this.$message.warning('请先选择一项区划');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (Number(this.regionForm.regionLevel) >= 3) {
|
||||||
|
this.$message.warning('区县已是末级,不能新增下级');
|
||||||
|
return;
|
||||||
|
}
|
||||||
const parentCode = this.regionForm.code;
|
const parentCode = this.regionForm.code;
|
||||||
const parentName = this.regionForm.name;
|
const parentName = this.regionForm.name;
|
||||||
const parentGroupCode = this.regionForm.parentCode || this.topCode;
|
const parentGroupCode = this.regionForm.parentCode || this.topCode;
|
||||||
@@ -517,8 +518,7 @@ export default {
|
|||||||
this.regionForm.subCode = '';
|
this.regionForm.subCode = '';
|
||||||
this.regionForm.originalCode = '';
|
this.regionForm.originalCode = '';
|
||||||
this.regionForm.name = '';
|
this.regionForm.name = '';
|
||||||
this.regionForm.regionLevel =
|
this.regionForm.regionLevel = Number(this.regionForm.regionLevel) + 1;
|
||||||
this.regionForm.regionLevel === 5 ? 5 : this.regionForm.regionLevel + 1;
|
|
||||||
this.loadParentOptionsByGroup(parentGroupCode, parentCode, parentName);
|
this.loadParentOptionsByGroup(parentGroupCode, parentCode, parentName);
|
||||||
},
|
},
|
||||||
setRegionColumnDisplay(prop, display) {
|
setRegionColumnDisplay(prop, display) {
|
||||||
@@ -637,9 +637,14 @@ export default {
|
|||||||
},
|
},
|
||||||
handleImport() {
|
handleImport() {
|
||||||
this.syncImportAction();
|
this.syncImportAction();
|
||||||
openImportDialog(this, '行政区划', () => {
|
openImportDialog(
|
||||||
|
this,
|
||||||
|
'行政区划',
|
||||||
|
() => {
|
||||||
this.initTree();
|
this.initTree();
|
||||||
});
|
},
|
||||||
|
{ timeout: 300000 }
|
||||||
|
);
|
||||||
},
|
},
|
||||||
syncImportAction() {
|
syncImportAction() {
|
||||||
const column = this.findColumn(this.excelOption.column, 'excelFile');
|
const column = this.findColumn(this.excelOption.column, 'excelFile');
|
||||||
@@ -769,6 +774,6 @@ export default {
|
|||||||
margin-bottom: 12px !important;
|
margin-bottom: 12px !important;
|
||||||
}
|
}
|
||||||
.el-form-item{
|
.el-form-item{
|
||||||
margin-bottom: 8px !important;
|
margin-bottom: 9px !important;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -113,7 +113,7 @@
|
|||||||
:maxlength="getCargoCodeMaxLength()"
|
:maxlength="getCargoCodeMaxLength()"
|
||||||
show-word-limit
|
show-word-limit
|
||||||
placeholder="请输入"
|
placeholder="请输入"
|
||||||
:disabled="dialogReadonly || dialogType === 'edit'"
|
:disabled="dialogReadonly"
|
||||||
@input="handleCargoCodeInput"
|
@input="handleCargoCodeInput"
|
||||||
>
|
>
|
||||||
<template v-if="getCargoCodePrefix()" #prepend>
|
<template v-if="getCargoCodePrefix()" #prepend>
|
||||||
@@ -130,11 +130,13 @@
|
|||||||
placeholder="请输入"
|
placeholder="请输入"
|
||||||
:disabled="dialogReadonly"
|
:disabled="dialogReadonly"
|
||||||
@input="handleCargoValueInput"
|
@input="handleCargoValueInput"
|
||||||
|
@blur="handleCargoValueBlur"
|
||||||
/>
|
/>
|
||||||
<el-select
|
<el-select
|
||||||
v-model="form.priceUnit"
|
v-model="form.priceUnit"
|
||||||
clearable
|
clearable
|
||||||
:disabled="dialogReadonly"
|
:disabled="dialogReadonly"
|
||||||
|
:loading="priceUnitLoading"
|
||||||
placeholder="请选择"
|
placeholder="请选择"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
@@ -147,6 +149,10 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<template #cargoValue="{ row }">
|
||||||
|
{{ formatCargoValue(row.cargoValue) }}
|
||||||
|
</template>
|
||||||
|
|
||||||
<template #menu="{ row, index }">
|
<template #menu="{ row, index }">
|
||||||
<el-link
|
<el-link
|
||||||
type="primary"
|
type="primary"
|
||||||
@@ -196,8 +202,8 @@ import * as api from '@/api/business/common-cargo';
|
|||||||
import { getList as getCargoTypeList } from '@/api/base/cargo-type';
|
import { getList as getCargoTypeList } from '@/api/base/cargo-type';
|
||||||
import { exportBlob } from '@/api/common';
|
import { exportBlob } from '@/api/common';
|
||||||
import { getDeptTree } from '@/api/system/dept';
|
import { getDeptTree } from '@/api/system/dept';
|
||||||
import { config, excelOption, option } from '@/option/business/common-cargo';
|
import { config, excelOption, formatCargoValue, option } from '@/option/business/common-cargo';
|
||||||
import { priceUnitOptions } from '@/option/business/common';
|
import { getDictionary } from '@/api/system/dictbiz';
|
||||||
import { getToken } from '@/utils/auth';
|
import { getToken } from '@/utils/auth';
|
||||||
import { openImportDialog } from '@/utils/import-excel';
|
import { openImportDialog } from '@/utils/import-excel';
|
||||||
import { downloadXls } from '@/utils/util';
|
import { downloadXls } from '@/utils/util';
|
||||||
@@ -211,7 +217,8 @@ export default {
|
|||||||
api,
|
api,
|
||||||
config,
|
config,
|
||||||
option,
|
option,
|
||||||
priceUnitOptions,
|
priceUnitOptions: [],
|
||||||
|
priceUnitLoading: false,
|
||||||
form: {},
|
form: {},
|
||||||
query: {},
|
query: {},
|
||||||
loading: true,
|
loading: true,
|
||||||
@@ -254,8 +261,10 @@ export default {
|
|||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.initDeptTree();
|
this.initDeptTree();
|
||||||
|
this.loadPriceUnitOptions();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
formatCargoValue,
|
||||||
hasPermission(code) {
|
hasPermission(code) {
|
||||||
return this.isAdmin || this.validData(this.permission && this.permission[code], false);
|
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) {
|
flattenDept(tree, level = 0) {
|
||||||
const result = [];
|
const result = [];
|
||||||
tree.forEach(item => {
|
tree.forEach(item => {
|
||||||
@@ -389,6 +420,9 @@ export default {
|
|||||||
const decimal = parts.slice(1).join('').slice(0, 2);
|
const decimal = parts.slice(1).join('').slice(0, 2);
|
||||||
this.form.cargoValue = parts.length > 1 ? `${integer}.${decimal}` : integer;
|
this.form.cargoValue = parts.length > 1 ? `${integer}.${decimal}` : integer;
|
||||||
},
|
},
|
||||||
|
handleCargoValueBlur() {
|
||||||
|
this.form.cargoValue = formatCargoValue(this.form.cargoValue);
|
||||||
|
},
|
||||||
normalizeRow(row) {
|
normalizeRow(row) {
|
||||||
const submitRow = { ...row };
|
const submitRow = { ...row };
|
||||||
Object.keys(submitRow).forEach(key => {
|
Object.keys(submitRow).forEach(key => {
|
||||||
@@ -399,14 +433,23 @@ export default {
|
|||||||
if (submitRow.cargoValue !== undefined && submitRow.cargoValue !== null) {
|
if (submitRow.cargoValue !== undefined && submitRow.cargoValue !== null) {
|
||||||
submitRow.cargoValue = String(submitRow.cargoValue).trim();
|
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;
|
submitRow.cargoValue = null;
|
||||||
|
} else {
|
||||||
|
submitRow.cargoValue = formatCargoValue(submitRow.cargoValue);
|
||||||
}
|
}
|
||||||
return submitRow;
|
return submitRow;
|
||||||
},
|
},
|
||||||
normalizeCargoValue(row) {
|
normalizeCargoValue(row) {
|
||||||
if (row && String(row.cargoValue) === '-1') {
|
if (row && Object.prototype.hasOwnProperty.call(row, 'cargoValue')) {
|
||||||
row.cargoValue = null;
|
const formatted = formatCargoValue(row.cargoValue);
|
||||||
|
row.cargoValue = formatted || null;
|
||||||
}
|
}
|
||||||
return row;
|
return row;
|
||||||
},
|
},
|
||||||
@@ -445,6 +488,14 @@ export default {
|
|||||||
this.$message.warning('货值只能输入数字,最多保留2位小数');
|
this.$message.warning('货值只能输入数字,最多保留2位小数');
|
||||||
return false;
|
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) {
|
if (row.remark && row.remark.length > 200) {
|
||||||
this.$message.warning('备注不能超过200个字符');
|
this.$message.warning('备注不能超过200个字符');
|
||||||
return false;
|
return false;
|
||||||
@@ -539,8 +590,8 @@ export default {
|
|||||||
this.dialogType = type || 'add';
|
this.dialogType = type || 'add';
|
||||||
if (type === 'add') {
|
if (type === 'add') {
|
||||||
this.form = {
|
this.form = {
|
||||||
priceUnit: '元/吨',
|
|
||||||
...this.form,
|
...this.form,
|
||||||
|
priceUnit: this.priceUnitOptions[0]?.value || this.form.priceUnit || '',
|
||||||
};
|
};
|
||||||
this.loadFirstCargoTypeOptions();
|
this.loadFirstCargoTypeOptions();
|
||||||
done();
|
done();
|
||||||
|
|||||||
@@ -288,7 +288,10 @@
|
|||||||
搜索
|
搜索
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="map-picker-content">
|
||||||
|
<map-search-results :results="routeMapSearchResults" @select="selectRouteMapSearchResult" />
|
||||||
<div ref="routeAmap" class="common-route-page__map"></div>
|
<div ref="routeAmap" class="common-route-page__map"></div>
|
||||||
|
</div>
|
||||||
<div class="common-route-page__map-info">
|
<div class="common-route-page__map-info">
|
||||||
<span>{{ routeMapStatus }}</span>
|
<span>{{ routeMapStatus }}</span>
|
||||||
<span v-if="routeMapSelected.regionName"
|
<span v-if="routeMapSelected.regionName"
|
||||||
@@ -359,6 +362,7 @@ export default {
|
|||||||
routeMapKeyword: '',
|
routeMapKeyword: '',
|
||||||
routeMapStatus: '可搜索地址或点击地图选点',
|
routeMapStatus: '可搜索地址或点击地图选点',
|
||||||
routeMapSelected: {},
|
routeMapSelected: {},
|
||||||
|
routeMapSearchResults: [],
|
||||||
routeAmap: null,
|
routeAmap: null,
|
||||||
routeAmapMarker: null,
|
routeAmapMarker: null,
|
||||||
routeAmapGeocoder: null,
|
routeAmapGeocoder: null,
|
||||||
@@ -612,6 +616,12 @@ export default {
|
|||||||
})
|
})
|
||||||
.then(() => this.runAmapGeocode('location', keyword))
|
.then(() => this.runAmapGeocode('location', keyword))
|
||||||
.then(result => {
|
.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);
|
const point = this.resolveMapPoint(result);
|
||||||
if (!point) {
|
if (!point) {
|
||||||
this.routeMapStatus = '未找到匹配地址';
|
this.routeMapStatus = '未找到匹配地址';
|
||||||
@@ -628,6 +638,11 @@ export default {
|
|||||||
this.routeMapLoading = false;
|
this.routeMapLoading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
selectRouteMapSearchResult(item) {
|
||||||
|
if (item && item.location) {
|
||||||
|
this.pickRouteMapPoint(item.location, item.address || item.name || '');
|
||||||
|
}
|
||||||
|
},
|
||||||
pickRouteMapPoint(lnglat, keyword) {
|
pickRouteMapPoint(lnglat, keyword) {
|
||||||
const longitude = this.getPointLng(lnglat);
|
const longitude = this.getPointLng(lnglat);
|
||||||
const latitude = this.getPointLat(lnglat);
|
const latitude = this.getPointLat(lnglat);
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user