Merge remote-tracking branch 'origin/master'

This commit is contained in:
2026-08-05 15:55:19 +08:00
72 changed files with 7556 additions and 772 deletions

View File

@@ -169,6 +169,7 @@ Avue 表格/表单配置独立存放于 `src/option/` 目录,与 `views` 和 `
- 表格偶数行需统一使用 `#FAFAFA` 背景色,固定列单元格必须与对应行背景保持一致。
- 表格操作列同时展示“查看、编辑、删除”等三个按钮时,操作列宽度统一不小于 `220px`;操作列最大按钮数量超过 3 个时,操作列宽度统一加宽到不小于 `320px`;最大按钮数量超过 4 个时,仍按 `320px` 保持列宽,并从第 5 个按钮开始换行展示,禁止出现按钮裁切或显示不全。
- 表格操作列按钮统一仅展示文字,禁止配置 `icon` / `:icon` 或在操作按钮、操作下拉项中嵌入图标;顶部工具栏按钮不受此条限制。
- 纯文字操作入口统一使用 `<el-link>`,禁止使用带 `text` 属性的 `<el-button>`;提交、确认、上传等具有明确命令语义或需要加载状态的按钮可继续使用 `<el-button>`
- `.avue-crud__header` 顶部间距统一为 `12px`
- 分页组件整体靠右展示,必须展示接口返回的数据总条数,`X条/页` 的页容量选择器必须放在总条数右侧。
- `.basic-container__card` 的直接子级 `.el-card__body` 内边距统一去除,保持 `padding: 0`

View File

@@ -36,7 +36,8 @@
"vue-i18n": "^11.4.2",
"vue-router": "^4.3.2",
"vue3-clipboard": "^1.0.0",
"vuex": "^4.1.0"
"vuex": "^4.1.0",
"xlsx": "0.18.5"
},
"devDependencies": {
"@vitejs/plugin-vue": "^5.2.4",

71
pnpm-lock.yaml generated
View File

@@ -92,6 +92,9 @@ importers:
vuex:
specifier: ^4.1.0
version: 4.1.0(vue@3.5.34)
xlsx:
specifier: 0.18.5
version: 0.18.5
devDependencies:
'@vitejs/plugin-vue':
specifier: ^5.2.4
@@ -2772,30 +2775,30 @@ snapshots:
dependencies:
vue: 3.5.34
'@wangeditor-next/basic-modules@2.0.0(@wangeditor-next/core@1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@4.0.6)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3))(dom7@4.0.6)(lodash.throttle@4.1.1)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3)':
'@wangeditor-next/basic-modules@2.0.0(@wangeditor-next/core@1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@4.0.6)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3))(dom7@3.0.0)(lodash.throttle@4.1.1)(nanoid@3.3.12)(slate@0.72.8)(snabbdom@3.6.3)':
dependencies:
'@wangeditor-next/core': 1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@4.0.6)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3)
dom7: 4.0.6
'@wangeditor-next/core': 1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.12)(slate@0.72.8)(snabbdom@3.6.3)
dom7: 3.0.0
is-url: 1.2.4
lodash.throttle: 4.1.1
nanoid: 5.1.11
slate: 0.123.0
nanoid: 3.3.12
slate: 0.72.8
snabbdom: 3.6.3
'@wangeditor-next/code-highlight@2.0.0(@wangeditor-next/core@1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@4.0.6)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3))(dom7@4.0.6)(slate@0.123.0)(snabbdom@3.6.3)':
dependencies:
'@wangeditor-next/core': 1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@4.0.6)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3)
'@wangeditor-next/core': 1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.12)(slate@0.72.8)(snabbdom@3.6.3)
dom7: 4.0.6
prismjs: 1.30.0
slate: 0.123.0
snabbdom: 3.6.3
'@wangeditor-next/core@1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@4.0.6)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3)':
'@wangeditor-next/core@1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.12)(slate@0.72.8)(snabbdom@3.6.3)':
dependencies:
'@types/event-emitter': 0.3.5
'@uppy/core': 2.3.4
'@uppy/xhr-upload': 2.1.3(@uppy/core@2.3.4)
dom7: 4.0.6
dom7: 3.0.0
event-emitter: 0.3.5
html-void-elements: 3.0.0
i18next: 23.16.8
@@ -2806,9 +2809,9 @@ snapshots:
lodash.foreach: 4.5.0
lodash.throttle: 4.1.1
lodash.toarray: 4.4.0
nanoid: 5.1.11
nanoid: 3.3.12
scroll-into-view-if-needed: 3.1.0
slate: 0.123.0
slate: 0.72.8
slate-history: 0.115.0(slate@0.123.0)
snabbdom: 3.6.3
@@ -2816,9 +2819,9 @@ snapshots:
dependencies:
'@uppy/core': 2.3.4
'@uppy/xhr-upload': 2.1.3(@uppy/core@2.3.4)
'@wangeditor-next/basic-modules': 2.0.0(@wangeditor-next/core@1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@4.0.6)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3))(dom7@4.0.6)(lodash.throttle@4.1.1)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3)
'@wangeditor-next/basic-modules': 2.0.0(@wangeditor-next/core@1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@4.0.6)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3))(dom7@3.0.0)(lodash.throttle@4.1.1)(nanoid@3.3.12)(slate@0.72.8)(snabbdom@3.6.3)
'@wangeditor-next/code-highlight': 2.0.0(@wangeditor-next/core@1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@4.0.6)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3))(dom7@4.0.6)(slate@0.123.0)(snabbdom@3.6.3)
'@wangeditor-next/core': 1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@4.0.6)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3)
'@wangeditor-next/core': 1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.12)(slate@0.72.8)(snabbdom@3.6.3)
'@wangeditor-next/list-module': 2.0.0(@wangeditor-next/core@1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@4.0.6)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3))(dom7@4.0.6)(slate@0.123.0)(snabbdom@3.6.3)
'@wangeditor-next/table-module': 2.0.0(@wangeditor-next/core@1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@4.0.6)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3))(dom7@4.0.6)(lodash.debounce@4.0.8)(lodash.throttle@4.1.1)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3)
'@wangeditor-next/upload-image-module': 2.0.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(@wangeditor-next/basic-modules@2.0.0(@wangeditor-next/core@1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@4.0.6)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3))(dom7@4.0.6)(lodash.throttle@4.1.1)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3))(@wangeditor-next/core@1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@4.0.6)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3))(dom7@4.0.6)(lodash.foreach@4.5.0)(slate@0.123.0)(snabbdom@3.6.3)
@@ -2837,14 +2840,14 @@ snapshots:
'@wangeditor-next/list-module@2.0.0(@wangeditor-next/core@1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@4.0.6)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3))(dom7@4.0.6)(slate@0.123.0)(snabbdom@3.6.3)':
dependencies:
'@wangeditor-next/core': 1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@4.0.6)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3)
'@wangeditor-next/core': 1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.12)(slate@0.72.8)(snabbdom@3.6.3)
dom7: 4.0.6
slate: 0.123.0
snabbdom: 3.6.3
'@wangeditor-next/table-module@2.0.0(@wangeditor-next/core@1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@4.0.6)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3))(dom7@4.0.6)(lodash.debounce@4.0.8)(lodash.throttle@4.1.1)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3)':
dependencies:
'@wangeditor-next/core': 1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@4.0.6)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3)
'@wangeditor-next/core': 1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.12)(slate@0.72.8)(snabbdom@3.6.3)
dom7: 4.0.6
lodash.debounce: 4.0.8
lodash.throttle: 4.1.1
@@ -2856,8 +2859,8 @@ snapshots:
dependencies:
'@uppy/core': 2.3.4
'@uppy/xhr-upload': 2.1.3(@uppy/core@2.3.4)
'@wangeditor-next/basic-modules': 2.0.0(@wangeditor-next/core@1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@4.0.6)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3))(dom7@4.0.6)(lodash.throttle@4.1.1)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3)
'@wangeditor-next/core': 1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@4.0.6)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3)
'@wangeditor-next/basic-modules': 2.0.0(@wangeditor-next/core@1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@4.0.6)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3))(dom7@3.0.0)(lodash.throttle@4.1.1)(nanoid@3.3.12)(slate@0.72.8)(snabbdom@3.6.3)
'@wangeditor-next/core': 1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.12)(slate@0.72.8)(snabbdom@3.6.3)
dom7: 4.0.6
lodash.foreach: 4.5.0
slate: 0.123.0
@@ -2867,36 +2870,36 @@ snapshots:
dependencies:
'@uppy/core': 2.3.4
'@uppy/xhr-upload': 2.1.3(@uppy/core@2.3.4)
'@wangeditor-next/core': 1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@4.0.6)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3)
'@wangeditor-next/core': 1.8.0(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.12)(slate@0.72.8)(snabbdom@3.6.3)
dom7: 4.0.6
nanoid: 5.1.11
slate: 0.123.0
snabbdom: 3.6.3
'@wangeditor/basic-modules@1.1.7(@wangeditor/core@1.1.19(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.12)(slate@0.72.8)(snabbdom@3.6.3))(dom7@4.0.6)(lodash.throttle@4.1.1)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3)':
'@wangeditor/basic-modules@1.1.7(@wangeditor/core@1.1.19(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.12)(slate@0.72.8)(snabbdom@3.6.3))(dom7@3.0.0)(lodash.throttle@4.1.1)(nanoid@3.3.12)(slate@0.72.8)(snabbdom@3.6.3)':
dependencies:
'@wangeditor/core': 1.1.19(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@4.0.6)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3)
dom7: 4.0.6
'@wangeditor/core': 1.1.19(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.12)(slate@0.72.8)(snabbdom@3.6.3)
dom7: 3.0.0
is-url: 1.2.4
lodash.throttle: 4.1.1
nanoid: 5.1.11
slate: 0.123.0
nanoid: 3.3.12
slate: 0.72.8
snabbdom: 3.6.3
'@wangeditor/code-highlight@1.0.3(@wangeditor/core@1.1.19(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.12)(slate@0.72.8)(snabbdom@3.6.3))(dom7@3.0.0)(slate@0.72.8)(snabbdom@3.6.3)':
dependencies:
'@wangeditor/core': 1.1.19(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@4.0.6)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3)
'@wangeditor/core': 1.1.19(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.12)(slate@0.72.8)(snabbdom@3.6.3)
dom7: 3.0.0
prismjs: 1.30.0
slate: 0.72.8
snabbdom: 3.6.3
'@wangeditor/core@1.1.19(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@4.0.6)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3)':
'@wangeditor/core@1.1.19(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.12)(slate@0.72.8)(snabbdom@3.6.3)':
dependencies:
'@types/event-emitter': 0.3.5
'@uppy/core': 2.3.4
'@uppy/xhr-upload': 2.1.3(@uppy/core@2.3.4)
dom7: 4.0.6
dom7: 3.0.0
event-emitter: 0.3.5
html-void-elements: 2.0.1
i18next: 20.6.1
@@ -2908,9 +2911,9 @@ snapshots:
lodash.isequal: 4.5.0
lodash.throttle: 4.1.1
lodash.toarray: 4.4.0
nanoid: 5.1.11
nanoid: 3.3.12
scroll-into-view-if-needed: 2.2.31
slate: 0.123.0
slate: 0.72.8
slate-history: 0.66.0(slate@0.72.8)
snabbdom: 3.6.3
@@ -2923,9 +2926,9 @@ snapshots:
dependencies:
'@uppy/core': 2.3.4
'@uppy/xhr-upload': 2.1.3(@uppy/core@2.3.4)
'@wangeditor/basic-modules': 1.1.7(@wangeditor/core@1.1.19(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.12)(slate@0.72.8)(snabbdom@3.6.3))(dom7@4.0.6)(lodash.throttle@4.1.1)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3)
'@wangeditor/basic-modules': 1.1.7(@wangeditor/core@1.1.19(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.12)(slate@0.72.8)(snabbdom@3.6.3))(dom7@3.0.0)(lodash.throttle@4.1.1)(nanoid@3.3.12)(slate@0.72.8)(snabbdom@3.6.3)
'@wangeditor/code-highlight': 1.0.3(@wangeditor/core@1.1.19(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.12)(slate@0.72.8)(snabbdom@3.6.3))(dom7@3.0.0)(slate@0.72.8)(snabbdom@3.6.3)
'@wangeditor/core': 1.1.19(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@4.0.6)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3)
'@wangeditor/core': 1.1.19(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.12)(slate@0.72.8)(snabbdom@3.6.3)
'@wangeditor/list-module': 1.0.5(@wangeditor/core@1.1.19(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.12)(slate@0.72.8)(snabbdom@3.6.3))(dom7@3.0.0)(slate@0.72.8)(snabbdom@3.6.3)
'@wangeditor/table-module': 1.1.4(@wangeditor/core@1.1.19(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.12)(slate@0.72.8)(snabbdom@3.6.3))(dom7@3.0.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(nanoid@3.3.12)(slate@0.72.8)(snabbdom@3.6.3)
'@wangeditor/upload-image-module': 1.0.2(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(@wangeditor/basic-modules@1.1.7(@wangeditor/core@1.1.19(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.12)(slate@0.72.8)(snabbdom@3.6.3))(dom7@3.0.0)(lodash.throttle@4.1.1)(nanoid@3.3.12)(slate@0.72.8)(snabbdom@3.6.3))(@wangeditor/core@1.1.19(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.12)(slate@0.72.8)(snabbdom@3.6.3))(dom7@3.0.0)(lodash.foreach@4.5.0)(slate@0.72.8)(snabbdom@3.6.3)
@@ -2945,14 +2948,14 @@ snapshots:
'@wangeditor/list-module@1.0.5(@wangeditor/core@1.1.19(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.12)(slate@0.72.8)(snabbdom@3.6.3))(dom7@3.0.0)(slate@0.72.8)(snabbdom@3.6.3)':
dependencies:
'@wangeditor/core': 1.1.19(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@4.0.6)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3)
'@wangeditor/core': 1.1.19(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.12)(slate@0.72.8)(snabbdom@3.6.3)
dom7: 3.0.0
slate: 0.72.8
snabbdom: 3.6.3
'@wangeditor/table-module@1.1.4(@wangeditor/core@1.1.19(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.12)(slate@0.72.8)(snabbdom@3.6.3))(dom7@3.0.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(nanoid@3.3.12)(slate@0.72.8)(snabbdom@3.6.3)':
dependencies:
'@wangeditor/core': 1.1.19(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@4.0.6)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3)
'@wangeditor/core': 1.1.19(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.12)(slate@0.72.8)(snabbdom@3.6.3)
dom7: 3.0.0
lodash.isequal: 4.5.0
lodash.throttle: 4.1.1
@@ -2964,8 +2967,8 @@ snapshots:
dependencies:
'@uppy/core': 2.3.4
'@uppy/xhr-upload': 2.1.3(@uppy/core@2.3.4)
'@wangeditor/basic-modules': 1.1.7(@wangeditor/core@1.1.19(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.12)(slate@0.72.8)(snabbdom@3.6.3))(dom7@4.0.6)(lodash.throttle@4.1.1)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3)
'@wangeditor/core': 1.1.19(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@4.0.6)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3)
'@wangeditor/basic-modules': 1.1.7(@wangeditor/core@1.1.19(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.12)(slate@0.72.8)(snabbdom@3.6.3))(dom7@3.0.0)(lodash.throttle@4.1.1)(nanoid@3.3.12)(slate@0.72.8)(snabbdom@3.6.3)
'@wangeditor/core': 1.1.19(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.12)(slate@0.72.8)(snabbdom@3.6.3)
dom7: 3.0.0
lodash.foreach: 4.5.0
slate: 0.72.8
@@ -2975,7 +2978,7 @@ snapshots:
dependencies:
'@uppy/core': 2.3.4
'@uppy/xhr-upload': 2.1.3(@uppy/core@2.3.4)
'@wangeditor/core': 1.1.19(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@4.0.6)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3)
'@wangeditor/core': 1.1.19(@uppy/core@2.3.4)(@uppy/xhr-upload@2.1.3(@uppy/core@2.3.4))(dom7@3.0.0)(is-hotkey@0.2.0)(lodash.camelcase@4.3.0)(lodash.clonedeep@4.5.0)(lodash.debounce@4.0.8)(lodash.foreach@4.5.0)(lodash.isequal@4.5.0)(lodash.throttle@4.1.1)(lodash.toarray@4.4.0)(nanoid@3.3.12)(slate@0.72.8)(snabbdom@3.6.3)
dom7: 3.0.0
nanoid: 3.3.12
slate: 0.72.8

View File

@@ -82,6 +82,16 @@ export const createCrudApi = baseUrl => ({
},
});
},
dispatch(payload) {
const data = payload && typeof payload === 'object' ? payload : { id: payload };
const id = data.id || payload;
return request({
url: `${baseUrl}/dispatch`,
method: 'post',
params: id ? { id } : undefined,
data,
});
},
reassign(id) {
return request({
url: `${baseUrl}/reassign`,

View File

@@ -0,0 +1,91 @@
import request from '@/axios';
const baseUrl = '/blade-transport/loading-manage';
export const exportUrl = `${baseUrl}/export-loading-manage`;
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 saveDraft = row =>
request({
url: `${baseUrl}/save-draft`,
method: 'post',
data: row,
});
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 copy = id =>
request({
url: `${baseUrl}/copy`,
method: 'post',
params: {
id,
},
});
export const reassign = row =>
request({
url: `${baseUrl}/reassign`,
method: 'post',
data: row,
});
export const cancel = id =>
request({
url: `${baseUrl}/cancel`,
method: 'post',
params: {
id,
},
});
export const complete = id =>
request({
url: `${baseUrl}/complete`,
method: 'post',
params: {
id,
},
});
export const batchComplete = ids =>
request({
url: `${baseUrl}/batch-complete`,
method: 'post',
params: {
ids,
},
});

View File

@@ -1,4 +1,5 @@
import { createCrudApi } from './common';
import request from '@/axios';
const api = createCrudApi('/blade-transport/shipping-template');
@@ -7,3 +8,4 @@ export const getDetail = api.getDetail;
export const submit = api.submit;
export const remove = api.remove;
export const copy = api.copy;
export const nextCode = () => request({ url: '/blade-transport/shipping-template/next-code', method: 'get' });

View File

@@ -1,11 +1,38 @@
import { createCrudApi } from './common';
import request from '@/axios';
const api = createCrudApi('/blade-transport/transport-plan');
const baseUrl = '/blade-transport/transport-plan';
const api = createCrudApi(baseUrl);
export const getList = api.getList;
export const getDetail = api.getDetail;
export const submit = api.submit;
export const dispatch = api.dispatch;
export const remove = api.remove;
export const copy = api.copy;
export const cancel = api.cancel;
export const complete = api.complete;
export const importTransportPlan = ({
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}/import-transport-plan`,
method: 'post',
data,
responseType: 'blob',
timeout: 60000,
});
};

View File

@@ -21,3 +21,12 @@ export const roadLoading = ids =>
ids,
},
});
export const getImportBatches = params => request({ url: `${baseUrl}/import-batch/list`, 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 getImportOptions = () => request({ url: `${baseUrl}/import-batch/options`, method: 'get' });
export const getImportContracts = projectId => request({ url: `${baseUrl}/import-batch/contracts`, method: 'get', params: { projectId } });
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 confirmImport = data => request({ url: `${baseUrl}/import-batch/confirm`, method: 'post', data });

View File

@@ -70,11 +70,11 @@ export const recognitionIDCard = url => {
});
};
export const recognitionTransportCertificates = objectKeys => {
export const recognitionTransportCertificates = certificates => {
return request({
url: '/blade-file/file/recognitionTransportCertificates',
method: 'post',
timeout: 60000,
data: objectKeys,
data: certificates,
});
};

View File

@@ -219,7 +219,8 @@ export const option = createCrudOption([
type: 'select',
search: true,
searchOrder: 1,
span: 24,
span: 6,
row: true,
order: 190,
dicData: signTypeOptions,
minWidth: 120,

View File

@@ -0,0 +1,36 @@
import { dataSourceOptions } from './common';
export const transportTypeDict = {
dicUrl: '/blade-system/dict-biz/dictionary?code=transport_type',
props: {
label: 'dictValue',
value: 'dictKey',
},
};
export const carrierTypeOptions = ['承运商', '自运', '网签平台'];
export const loadingStatusOptions = [
{ label: '草稿', value: 'draft' },
{ label: '待执行', value: 'pending' },
{ label: '进行中', value: 'running' },
{ label: '已完成', value: 'completed' },
{ label: '已取消', value: 'cancelled' },
];
export const loadingStatusMap = loadingStatusOptions.reduce((result, item) => {
result[item.value] = item.label;
return result;
}, {});
export const loadingManageConfig = {
title: '配载管理',
permission: 'loading_manage',
exportUrl: '/blade-transport/loading-manage/export-loading-manage',
exportName: '配载管理',
createText: '新建配载',
batchCompleteText: '批量完成',
statusProp: 'businessStatus',
statusTextProp: 'businessStatusName',
dataSourceOptions,
};

View File

@@ -1,11 +1,9 @@
import {
auditColumns,
createCrudOption,
templateTypeOptions,
transportTypeOptions,
selectRule,
textRule,
} from './common';
import { auditColumns, createCrudOption, selectRule, textRule, transportTypeOptions } from './common';
const templateTypeOptions = [
{ label: '运输计划', value: '运输计划' },
{ label: '运单', value: '运单' },
];
export const config = {
title: '发货模板',
@@ -13,155 +11,203 @@ export const config = {
exportUrl: '/blade-transport/shipping-template/export-shipping-template',
exportName: '发货模板',
enableAllDept: false,
enableProjectSelect: true,
enableAttachmentTable: true,
enableTransportPlanForm: true,
enableTemplateCodePreview: true,
attachmentTitle: '附件',
defaultForm: {
templateType: '运输计划',
},
transportFormRequiredFields: [
['projectName', '项目'],
['contractName', '客户合同'],
['transportType', '运输方式'],
['departureAddress', '发货地址'],
['arrivalAddress', '收货地址'],
],
actions: ['copy'],
operations: [
{
action: 'createFromTemplate',
label: '从模板新建',
permission: 'shipping_template_add',
},
],
};
export const option = createCrudOption([
{
label: '模板编号',
prop: 'templateCode',
search: true,
minWidth: 150,
addDisplay: false,
editDisabled: true,
},
{
label: '模板名称',
prop: 'templateName',
search: true,
minWidth: 150,
rules: textRule('模板名称', 50, true),
},
{
label: '模板类型',
prop: 'templateType',
type: 'select',
search: true,
dicData: templateTypeOptions,
minWidth: 120,
value: '运输计划',
rules: selectRule('模板类型'),
},
{
label: '项目',
prop: 'projectName',
search: true,
minWidth: 150,
rules: textRule('项目', 100, true),
},
{
label: '项目ID',
prop: 'projectId',
hide: true,
},
{
label: '客户合同',
prop: 'contractName',
minWidth: 160,
rules: textRule('客户合同', 100, true),
},
{
label: '客户合同ID',
prop: 'contractId',
hide: true,
},
{
label: '运输类型',
prop: 'transportType',
type: 'select',
dicData: transportTypeOptions,
minWidth: 130,
rules: selectRule('运输类型'),
},
{
label: '发货地',
prop: 'departureName',
minWidth: 140,
rules: textRule('发货地', 100, true),
},
{
label: '发货地址',
prop: 'departureAddress',
minWidth: 220,
rules: textRule('发货地址', 255, true),
},
{
label: '发货联系人',
prop: 'departureContact',
minWidth: 120,
rules: textRule('发货联系人', 20),
},
{
label: '发货联系方式',
prop: 'departurePhone',
minWidth: 140,
rules: textRule('发货联系方式', 20),
},
{
label: '收货地',
prop: 'arrivalName',
minWidth: 140,
rules: textRule('收货地', 100, true),
},
{
label: '收货地址',
prop: 'arrivalAddress',
minWidth: 220,
rules: textRule('收货地址', 255, true),
},
{
label: '收货联系人',
prop: 'arrivalContact',
minWidth: 120,
rules: textRule('收货联系人', 20),
},
{
label: '收货联系方式',
prop: 'arrivalPhone',
minWidth: 140,
rules: textRule('收货联系方式', 20),
},
{
label: '货物信息JSON',
prop: 'goodsJson',
type: 'textarea',
minRows: 5,
span: 24,
hide: true,
},
{
label: '运费信息JSON',
prop: 'freightJson',
type: 'textarea',
minRows: 4,
span: 24,
hide: true,
},
{
label: '附件JSON',
prop: 'attachmentsJson',
type: 'textarea',
minRows: 3,
span: 24,
hide: true,
},
{
label: '所属组织',
prop: 'deptName',
minWidth: 150,
addDisplay: false,
editDisplay: false,
},
{
label: '备注',
prop: 'remark',
type: 'textarea',
minRows: 4,
span: 24,
hide: true,
maxlength: 200,
showWordLimit: true,
rules: textRule('备注', 200),
},
...auditColumns,
]);
export const option = {
...createCrudOption([
{
label: '',
prop: 'templateInfoTitle',
formslot: true,
span: 24,
order: 400,
hide: true,
labelWidth: 0,
},
{
label: '模板编号',
prop: 'templateCode',
search: true,
searchOrder: 4,
span: 8,
order: 390,
minWidth: 170,
disabled: true,
placeholder: '系统自动生成',
},
{
label: '模板名称',
prop: 'templateName',
search: true,
searchOrder: 3,
span: 8,
order: 380,
minWidth: 150,
rules: textRule('模板名称', 50, true),
},
{
label: '模板类型',
prop: 'templateType',
type: 'select',
search: true,
searchOrder: 2,
span: 8,
order: 370,
dicData: templateTypeOptions,
minWidth: 120,
rules: selectRule('模板类型'),
},
{
label: '备注',
prop: 'remark',
type: 'textarea',
minRows: 3,
span: 24,
order: 360,
minWidth: 180,
maxlength: 200,
showWordLimit: true,
rules: textRule('备注', 200),
},
{
label: '',
prop: 'basicInfoTitle',
formslot: true,
span: 24,
order: 350,
hide: true,
labelWidth: 0,
},
{
label: '项目',
prop: 'projectName',
formslot: true,
search: true,
searchOrder: 1,
span: 8,
order: 340,
minWidth: 150,
rules: textRule('项目', 100, true),
},
{
label: '客户合同',
prop: 'contractName',
formslot: true,
span: 8,
order: 330,
minWidth: 160,
rules: textRule('客户合同', 100, true),
},
{
label: '运输方式',
prop: 'transportType',
type: 'select',
span: 8,
order: 320,
dicData: transportTypeOptions,
minWidth: 130,
rules: selectRule('运输方式'),
},
{
label: '',
prop: 'shippingInfoTitle',
formslot: true,
span: 24,
order: 310,
hide: true,
labelWidth: 0,
},
{
label: '发货地址',
prop: 'departureAddress',
formslot: true,
span: 24,
order: 300,
minWidth: 220,
rules: textRule('发货地址', 255, true),
},
{
label: '收货地址',
prop: 'arrivalAddress',
formslot: true,
span: 24,
order: 290,
minWidth: 220,
rules: textRule('收货地址', 255, true),
},
{
label: '',
prop: 'goodsInfoTitle',
formslot: true,
span: 24,
order: 280,
hide: true,
labelWidth: 0,
},
{
label: '',
prop: 'goodsJson',
type: 'textarea',
formslot: true,
span: 24,
order: 270,
hide: true,
labelWidth: '0px',
className: 'business-crud-page__full-form-item',
},
{
label: '',
prop: 'attachmentTitle',
formslot: true,
span: 24,
order: 260,
hide: true,
labelWidth: 0,
},
{
label: '',
prop: 'attachmentsJson',
type: 'textarea',
formslot: true,
span: 24,
order: 250,
hide: true,
labelWidth: '0px',
className: 'business-crud-page__full-form-item',
},
{ label: '项目ID', prop: 'projectId', hide: true, display: false },
{ label: '客户合同ID', prop: 'contractId', hide: true, display: false },
{ label: '发货地', prop: 'departureName', hide: true, display: false },
{ label: '发货联系人', prop: 'departureContact', hide: true, display: false },
{ label: '发货联系方式', prop: 'departurePhone', hide: true, display: false },
{ label: '收货地', prop: 'arrivalName', hide: true, display: false },
{ label: '收货联系人', prop: 'arrivalContact', hide: true, display: false },
{ label: '收货联系方式', prop: 'arrivalPhone', hide: true, display: false },
{ label: '所属组织', prop: 'deptName', minWidth: 150, addDisplay: false, editDisplay: false },
...auditColumns,
]),
dialogWidth: '96%',
};

View File

@@ -116,9 +116,13 @@ export const config = {
exportName: '运输计划',
enableAllDept: false,
enableProjectSelect: true,
templateCreateTarget: 'transport-plan',
enableAttachmentTable: true,
enableTransportPlanForm: true,
enableTransportPlanCreateActions: true,
enableTransportPlanImport: true,
transportPlanImportTitle: '导入发货计划',
transportPlanTemplateUrl: '/blade-transport/transport-plan/export-template',
attachmentTitle: '附件',
searchRangeMap: {
planStartDateRange: ['planStartDateStart', 'planStartDateEnd'],
@@ -129,6 +133,55 @@ export const config = {
statusTextProp: 'businessStatusName',
deleteStatus: ['draft'],
editStatus: ['draft', 'waiting_dispatch'],
detailButton: true,
detailSections: [
{
title: '基本信息',
fields: [
['planNo', '计划单号'],
['planName', '计划名称'],
['projectName', '项目名称'],
['customerName', '客户名称'],
['transportType', '运输方式'],
['businessStatus', '调度状态'],
['planStartDate', '计划开始日期'],
['planEndDate', '计划结束日期'],
['dataSource', '数据来源'],
],
},
{
title: '收发货信息',
fields: [
['departureName', '发货地'],
['departureAddress', '发货地址', 2],
['departureContact', '发货联系人'],
['departurePhone', '发货联系方式'],
['arrivalName', '收货地'],
['arrivalAddress', '到货地址', 2],
['arrivalContact', '收货联系人'],
['arrivalPhone', '收货联系方式'],
],
},
{
title: '其它信息',
fields: [
['remark', '备注', 2],
['updateUserName', '更新人'],
['updateTime', '更新时间'],
['createTime', '创建时间'],
],
},
],
operations: [
{
action: 'dispatch',
label: '调度',
statusProp: 'businessStatus',
status: ['waiting_dispatch'],
permission: 'transport_plan_edit',
confirm: '确定调度该运输计划?',
},
],
};
export const option = {

View File

@@ -2,6 +2,7 @@ import {
auditColumns,
createCrudOption,
dataSourceOptions,
phoneRule,
selectRule,
textRule,
waybillStatusOptions,
@@ -96,9 +97,17 @@ export const config = {
exportName: '运单管理',
importUrl: '/blade-transport/waybill-manage/import-waybill-manage',
enableAllDept: false,
enableProjectSelect: true,
templateCreateTarget: 'waybill-manage',
enableContractSelect: true,
enableShippingPlanSelect: true,
enableShippingInfoForm: true,
enableTaskInfoForm: true,
batchDelete: false,
actionButtonLikeSearch: true,
createText: '新建运单',
importText: '导入运单',
enableWaybillImport: true,
roadLoading: true,
roadLoadingText: '公路配载',
searchRangeMap: {
@@ -115,6 +124,15 @@ export const config = {
export const option = {
...createCrudOption([
{
label: '',
prop: 'basicInfoTitle',
formslot: true,
span: 24,
order: 900,
hide: true,
labelWidth: 0,
},
{
label: '运单号',
prop: 'waybillNo',
@@ -129,6 +147,8 @@ export const option = {
prop: 'loadingNo',
search: true,
searchOrder: 5,
span: 6,
order: 840,
minWidth: 140,
},
{
@@ -137,13 +157,18 @@ export const option = {
search: true,
searchLabel: '多联总单',
searchOrder: 6,
span: 6,
order: 830,
minWidth: 140,
},
{
label: '项目名称',
label: '项目',
prop: 'projectName',
formslot: true,
search: true,
searchOrder: 22,
span: 6,
order: 890,
minWidth: 150,
rules: textRule('项目', 100, true),
},
@@ -154,6 +179,10 @@ export const option = {
searchLabel: '客户名称',
searchOrder: 21,
minWidth: 150,
addDisplay: false,
editDisplay: false,
viewDisplay: false,
display: false,
},
{
label: '车牌号/航班号/船号/班列号',
@@ -162,6 +191,7 @@ export const option = {
searchLabel: '车/船/航班/班列',
searchOrder: 13,
minWidth: 210,
display: false,
},
{
label: '司机',
@@ -170,6 +200,7 @@ export const option = {
searchLabel: '司机名称',
searchOrder: 14,
minWidth: 120,
display: false,
},
{
label: '联系方式',
@@ -179,6 +210,7 @@ export const option = {
addDisplay: false,
editDisplay: false,
viewDisplay: false,
display: false,
},
{
label: '运输方式',
@@ -199,6 +231,8 @@ export const option = {
type: 'select',
search: true,
searchOrder: 20,
span: 6,
order: 850,
...transportTypeDict,
minWidth: 130,
rules: selectRule('运输类型'),
@@ -207,6 +241,10 @@ export const option = {
label: '过程节点',
prop: 'currentProcessNode',
minWidth: 140,
addDisplay: false,
editDisplay: false,
viewDisplay: false,
display: false,
},
{
label: '承运类型',
@@ -216,6 +254,7 @@ export const option = {
addDisplay: false,
editDisplay: false,
viewDisplay: false,
display: false,
},
{
label: '承运商',
@@ -224,6 +263,7 @@ export const option = {
searchLabel: '承运商名称',
searchOrder: 15,
minWidth: 150,
display: false,
},
{
label: '货物信息',
@@ -238,17 +278,23 @@ export const option = {
{
label: '发货地址',
prop: 'departureAddress',
formslot: true,
search: true,
searchOrder: 17,
span: 24,
order: 790,
minWidth: 220,
rules: textRule('发货地址', 255, true),
},
{
label: '到货地址',
prop: 'arrivalAddress',
formslot: true,
search: true,
searchLabel: '收货地址',
searchOrder: 16,
span: 24,
order: 780,
minWidth: 220,
rules: textRule('收货地址', 255, true),
},
@@ -307,14 +353,20 @@ export const option = {
{
label: '客户合同',
prop: 'contractName',
formslot: true,
span: 6,
order: 880,
minWidth: 160,
rules: textRule('客户合同', 100, true),
},
{
label: '计划名称',
label: '发货计划',
prop: 'planName',
formslot: true,
search: true,
searchOrder: 7,
span: 6,
order: 870,
minWidth: 150,
},
{
@@ -324,6 +376,7 @@ export const option = {
searchOrder: 18,
formatter: row => formatGoodsField(row, ['cargoType', 'goodsType', 'typeName']),
minWidth: 130,
display: false,
rules: textRule('货物类型', 100, true),
},
{
@@ -333,6 +386,7 @@ export const option = {
searchOrder: 19,
formatter: row => formatGoodsField(row, ['cargoName', 'goodsName', 'name']),
minWidth: 150,
display: false,
rules: textRule('货物名称', 100, true),
},
{
@@ -356,6 +410,8 @@ export const option = {
prop: 'originalNo',
search: true,
searchOrder: 12,
span: 6,
order: 860,
minWidth: 140,
},
{
@@ -365,30 +421,36 @@ export const option = {
searchLabel: '运输批次',
searchOrder: 3,
minWidth: 140,
addDisplay: false,
editDisplay: false,
viewDisplay: false,
display: false,
},
{
label: '预计发货时间',
label: '预计发货日期',
prop: 'estimatedStartTime',
type: 'datetime',
format: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'date',
format: 'YYYY-MM-DD',
valueFormat: 'YYYY-MM-DD',
formatter: row => getFirstValue(row, ['estimatedStartTime', 'planStartDate']),
minWidth: 170,
addDisplay: false,
editDisplay: false,
viewDisplay: false,
display: false,
},
{
label: '预计完成时间',
label: '预计完成日期',
prop: 'estimatedEndTime',
type: 'datetime',
format: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'date',
format: 'YYYY-MM-DD',
valueFormat: 'YYYY-MM-DD',
formatter: row => getFirstValue(row, ['estimatedEndTime', 'planEndDate']),
minWidth: 170,
addDisplay: false,
editDisplay: false,
viewDisplay: false,
display: false,
},
{
label: '备注',
@@ -396,11 +458,12 @@ export const option = {
type: 'textarea',
minRows: 4,
span: 24,
order: 810,
minWidth: 180,
overHidden: true,
maxlength: 500,
maxlength: 200,
showWordLimit: true,
rules: textRule('备注', 500),
rules: textRule('备注', 200),
},
{
label: '数据来源',
@@ -410,6 +473,10 @@ export const option = {
searchOrder: 10,
dicData: dataSourceOptions,
minWidth: 120,
addDisplay: false,
editDisplay: false,
viewDisplay: false,
display: false,
},
{
...auditColumn('createTime'),
@@ -431,6 +498,34 @@ export const option = {
addDisplay: false,
editDisplay: false,
},
{
label: '',
prop: 'shippingInfoTitle',
formslot: true,
span: 24,
order: 800,
hide: true,
labelWidth: 0,
},
{
label: '',
prop: 'taskInfoTitle',
formslot: true,
span: 24,
order: 770,
hide: true,
labelWidth: 0,
},
{
label: '',
prop: 'taskInfoForm',
formslot: true,
span: 24,
order: 760,
hide: true,
labelWidth: '0px',
className: 'business-crud-page__full-form-item',
},
{
label: '实际发货时间',
prop: 'startDateRange',
@@ -444,6 +539,7 @@ export const option = {
addDisplay: false,
editDisplay: false,
viewDisplay: false,
display: false,
},
{
label: '实际完成时间',
@@ -458,6 +554,7 @@ export const option = {
addDisplay: false,
editDisplay: false,
viewDisplay: false,
display: false,
},
{
label: '创建时间',
@@ -478,51 +575,70 @@ export const option = {
prop: 'relationNo',
search: true,
searchOrder: 2,
span: 6,
order: 820,
minWidth: 140,
hide: true,
addDisplay: false,
editDisplay: false,
viewDisplay: false,
},
{
label: '货物信息JSON',
label: '货物信息',
prop: 'goodsJson',
type: 'textarea',
minRows: 5,
span: 24,
hide: true,
display: false,
addDisplay: false,
editDisplay: false,
viewDisplay: false,
},
{
label: '承运信息JSON',
label: '承运信息',
prop: 'carrierJson',
type: 'textarea',
minRows: 4,
span: 24,
hide: true,
display: false,
addDisplay: false,
editDisplay: false,
viewDisplay: false,
},
{
label: '过程配置JSON',
label: '过程配置',
prop: 'processJson',
type: 'textarea',
minRows: 4,
span: 24,
hide: true,
display: false,
addDisplay: false,
editDisplay: false,
viewDisplay: false,
},
{
label: '运费信息JSON',
label: '运费信息',
prop: 'freightJson',
type: 'textarea',
minRows: 4,
span: 24,
hide: true,
display: false,
addDisplay: false,
editDisplay: false,
viewDisplay: false,
},
{
label: '附件JSON',
label: '附件',
prop: 'attachmentsJson',
type: 'textarea',
minRows: 3,
span: 24,
hide: true,
display: false,
addDisplay: false,
editDisplay: false,
viewDisplay: false,
},
{
label: '所属组织',
@@ -532,6 +648,36 @@ export const option = {
addDisplay: false,
editDisplay: false,
},
{
label: '发货地',
prop: 'departureName',
hide: true,
display: false,
minWidth: 140,
rules: textRule('发货地', 100, true),
},
{
label: '收货地',
prop: 'arrivalName',
hide: true,
display: false,
minWidth: 140,
rules: textRule('收货地', 100, true),
},
{
label: '发货联系方式',
prop: 'departurePhone',
hide: true,
display: false,
rules: [phoneRule('发货联系方式'), ...textRule('发货联系方式', 50)],
},
{
label: '收货联系方式',
prop: 'arrivalPhone',
hide: true,
display: false,
rules: [phoneRule('收货联系方式'), ...textRule('收货联系方式', 50)],
},
{
label: '项目ID',
prop: 'projectId',
@@ -544,6 +690,33 @@ export const option = {
hide: true,
display: false,
},
{
label: '发货计划ID',
prop: 'planId',
hide: true,
display: false,
},
{
label: '任务录入模式',
prop: 'taskEntryMode',
hide: true,
display: false,
value: 'simple',
},
{
label: '任务备注',
prop: 'taskRemark',
hide: true,
display: false,
},
{
label: '任务信息',
prop: 'taskInfoJson',
hide: true,
display: false,
},
]),
dialogWidth: '96%',
dialogTop: '10px',
menuWidth: 320,
};

View File

@@ -9,12 +9,14 @@ export const option = {
searchMenuPosition: 'right',
border: true,
index: true,
indexLabel: '序号',
indexWidth: 70,
selection: true,
addBtn: false,
editBtn: false,
delBtn: false,
viewBtn: false,
menuWidth: 160,
menuWidth: 220,
dialogClickModal: false,
column: [
{
@@ -23,14 +25,14 @@ export const option = {
search: true,
searchOrder: 7,
slot: true,
width: 110,
minWidth: 120,
},
{
label: '手机号',
prop: 'mobile',
search: true,
searchOrder: 6,
width: 130,
minWidth: 130,
},
{
label: '准驾车型',
@@ -69,7 +71,7 @@ export const option = {
value: 'C2',
},
],
width: 110,
minWidth: 110,
},
{
label: '状态',
@@ -107,7 +109,7 @@ export const option = {
value: '外协',
},
],
width: 100,
minWidth: 110,
align: 'center',
},
{
@@ -115,7 +117,7 @@ export const option = {
prop: 'idCardNo',
search: true,
searchOrder: 2,
width: 190,
minWidth: 190,
},
{
label: '所属组织',
@@ -125,7 +127,7 @@ export const option = {
type: 'select',
filterable: true,
dicData: [],
width: 140,
minWidth: 160,
},
{
label: '性别',
@@ -136,20 +138,20 @@ export const option = {
{
label: '岗位',
prop: 'posts',
width: 150,
minWidth: 150,
},
{
label: '驾驶认证',
prop: 'drivingLicenseEndDate',
slot: true,
width: 130,
minWidth: 140,
align: 'center',
},
{
label: '从业资格认证',
prop: 'qualificationEndDate',
slot: true,
width: 140,
minWidth: 150,
align: 'center',
},
],

View File

@@ -337,7 +337,12 @@
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
// 上一页 / 下一页 箭头按钮与页码按钮等宽,不再单独加宽
.el-pagination .btn-prev,
.el-pagination .btn-next,
.erp-pagination-first,
.erp-pagination-last {
min-width: 54px;
}
.el-pagination .el-pager {
gap: 6px;
@@ -345,7 +350,18 @@
padding: 0;
}
// 上一页 / 下一页 改为原生箭头图标:不再隐藏原生图标,也不再注入「上一页 / 下一页」文字
.el-pagination .btn-prev .el-icon,
.el-pagination .btn-next .el-icon {
display: none;
}
.el-pagination .btn-prev::before {
content: '上一页';
}
.el-pagination .btn-next::before {
content: '下一页';
}
.el-pagination.is-background .el-pager li.is-active,
.el-pagination .el-pager li.is-active {
@@ -431,7 +447,14 @@
color: #fff;
}
// 全站统一:分页展示「上一页 / 下一页」原生箭头图标(不再隐藏;首页 / 尾页仍不注入)
// 全站统一:隐藏分页的「上一页 / 下一页」原生导航按钮
// (「首页 / 尾页」由 src/utils/pagination.js 的全局增强器统一不再注入)
.el-pagination {
.btn-prev,
.btn-next {
display: none !important;
}
}
// 全站统一:隐藏操作栏按钮前的图标
.avue-crud__menu .el-button--text i,

View File

@@ -41,27 +41,24 @@
<el-tag>{{ row.expireTimeInfo }}</el-tag>
</template>
<template #menu="{ row }">
<el-button
<el-link
type="primary"
text
v-if="row.status === -1 && userInfo.authority.includes('admin')"
@click.stop="handleEnable(row)"
>启用
</el-button>
<el-button
</el-link>
<el-link
type="primary"
text
v-if="row.status === 1 && userInfo.authority.includes('admin')"
@click.stop="handleDisable(row)"
>禁用
</el-button>
<el-button
</el-link>
<el-link
type="primary"
text
v-if="userInfo.authority.includes('admin')"
@click.stop="handleRowLog(row)"
>日志
</el-button>
</el-link>
</template>
<!-- 访问权限动态表单 -->
<template #apiPath-form="{ type }">
@@ -84,8 +81,8 @@
</el-row>
<el-row v-if="type !== 'view'" :gutter="8">
<el-col :span="8">
<el-button type="primary" text icon="el-icon-circle-plus" @click="addApiPath"
>添加路径</el-button
<el-link type="primary" @click="addApiPath"
>添加路径</el-link
>
</el-col>
</el-row>
@@ -117,8 +114,8 @@
</el-row>
<el-row v-if="type !== 'view'" :gutter="8">
<el-col :span="8">
<el-button type="primary" text icon="el-icon-circle-plus" @click="addExtParam"
>添加参数</el-button
<el-link type="primary" @click="addExtParam"
>添加参数</el-link
>
</el-col>
</el-row>

View File

@@ -62,15 +62,13 @@
</el-button>
</template>
<template #menu="{ row }">
<el-button
<el-link
type="primary"
text
v-if="permission.api_scope_setting"
plain
style="border: 0; background-color: transparent !important"
@click.stop="handleDataScope(row)"
>权限配置
</el-button>
</el-link>
</template>
<template #name="{ row }">
<i :class="row.source" style="margin-right: 5px" />

View File

@@ -62,15 +62,13 @@
</el-button>
</template>
<template #menu="{ row }">
<el-button
<el-link
type="primary"
text
v-if="permission.data_scope_setting"
plain
style="border: 0; background-color: transparent !important"
@click.stop="handleDataScope(row)"
>权限配置
</el-button>
</el-link>
</template>
<template #name="{ row }">
<i :class="row.source" style="margin-right: 5px" />

View File

@@ -52,27 +52,24 @@
</el-tag>
</template>
<template #menu="{ row }">
<el-button
<el-link
type="primary"
text
v-if="row.status !== 1 && userInfo.authority.includes('administrator')"
@click.stop="handleEnable(row)"
>启用
</el-button>
<el-button
</el-link>
<el-link
type="primary"
text
v-if="row.status === 1 && userInfo.authority.includes('administrator')"
@click.stop="handleDisable(row)"
>禁用
</el-button>
<el-button
</el-link>
<el-link
type="primary"
text
v-if="userInfo.authority.includes('administrator')"
@click.stop="handleRowLog(row)"
>日志
</el-button>
</el-link>
</template>
<!-- 匹配路径动态表单 -->
<template #limitPattern-form="{ type }">
@@ -100,8 +97,7 @@
</el-row>
<el-row v-if="type !== 'view'" :gutter="8">
<el-col :span="8">
<el-button type="primary" text icon="el-icon-circle-plus" @click="addLimitPattern"
>添加路径</el-button
<el-link type="primary" @click="addLimitPattern">添加路径</el-link
>
</el-col>
</el-row>

View File

@@ -37,15 +37,13 @@
</el-button>
</template>
<template #menu="{ row }">
<el-button
<el-link
type="primary"
text
v-if="userInfo.authority.includes('admin')"
plain
style="border: 0; background-color: transparent !important"
@click.stop="handleRowRole(row)"
>权限设置
</el-button>
</el-link>
</template>
</avue-crud>
<el-dialog

View File

@@ -60,22 +60,20 @@
</el-tag>
</template>
<template #menu="{ row, index }">
<el-button
<el-link
type="primary"
text
v-if="hasPermission('airport_master_edit')"
@click="$refs.crud.rowEdit(row, index)"
>
编辑
</el-button>
<el-button
</el-link>
<el-link
type="primary"
text
v-if="hasPermission('airport_master_status')"
@click="handleStatus(row)"
>
{{ row.status === 1 ? '停用' : '启用' }}
</el-button>
</el-link>
</template>
<template #districtCode-form>
<el-select
@@ -544,8 +542,10 @@ export default {
hasPermission(code) {
return this.isAdmin || this.validData(this.permission && this.permission[code], false);
},
findColumn(prop) {
return this.option.column.find(item => item.prop === prop);
findColumn(columns, prop) {
const targetColumns = Array.isArray(columns) ? columns : this.option.column;
const targetProp = Array.isArray(columns) ? prop : columns;
return targetColumns.find(item => item.prop === targetProp) || null;
},
loadProvinceOptions() {
getLazyTree(DEFAULT_COUNTRY_CODE).then(res => {

View File

@@ -81,25 +81,23 @@
</template>
<template #menu="{ row, index }">
<el-button
<el-link
type="primary"
text
v-if="permission.cargo_type_view"
@click="$refs.crud.rowView(row, index)"
>
查看
</el-button>
<el-button
</el-link>
<el-link
type="primary"
text
v-if="permission.cargo_type_edit"
@click="$refs.crud.rowEdit(row, index)"
>
编辑
</el-button>
<el-button type="primary" text v-if="permission.cargo_type_delete" @click="rowDel(row)">
</el-link>
<el-link type="primary" v-if="permission.cargo_type_delete" @click="rowDel(row)">
删除
</el-button>
</el-link>
</template>
</avue-crud>

View File

@@ -54,30 +54,27 @@
</template>
<template #menu="{ row, index }">
<el-button
<el-link
type="primary"
text
v-if="hasPermission('common_address_view')"
@click="$refs.crud.rowView(row, index)"
>
查看
</el-button>
<el-button
</el-link>
<el-link
type="primary"
text
v-if="hasPermission('common_address_edit') && !row.readonly"
@click="$refs.crud.rowEdit(row, index)"
>
编辑
</el-button>
<el-button
</el-link>
<el-link
type="primary"
text
v-if="hasPermission('common_address_delete') && !row.readonly"
@click="rowDel(row)"
>
删除
</el-button>
</el-link>
</template>
<template #addressType-form>
@@ -462,7 +459,9 @@ export default {
status: 1,
})
.then(res => {
this.terminalOptions = this.normalizeSourceOptions(this.getRecords(res));
this.terminalOptions = this.normalizeSourceOptions(this.getRecords(res)).filter(item =>
this.sameId(item.parentId, this.form.portId)
);
})
.finally(() => {
this.terminalLoading = false;

View File

@@ -68,22 +68,20 @@
</el-tag>
</template>
<template #menu="{ row, index }">
<el-button
<el-link
type="primary"
text
v-if="permission.currency_edit"
@click="$refs.crud.rowEdit(row, index)"
>
编辑
</el-button>
<el-button
</el-link>
<el-link
type="primary"
text
v-if="permission.currency_status"
@click="handleStatus(row)"
>
{{ row.status === 1 ? '停用' : '启用' }}
</el-button>
</el-link>
</template>
</avue-crud>

View File

@@ -36,22 +36,20 @@
</el-tag>
</template>
<template #menu="{ row, index }">
<el-button
<el-link
type="primary"
text
v-if="permission.customer_type_edit"
@click="$refs.crud.rowEdit(row, index)"
>
编辑
</el-button>
<el-button
</el-link>
<el-link
type="primary"
text
v-if="permission.customer_type_status"
@click="handleStatus(row)"
>
{{ row.status === 1 ? '停用' : '启用' }}
</el-button>
</el-link>
</template>
</avue-crud>
<empty-pagination

View File

@@ -65,17 +65,16 @@
</el-input>
</template>
<template #menu="{ row, index }">
<el-button
<el-link
type="primary"
text
v-if="permission.fee_item_edit"
@click="$refs.crud.rowEdit(row, index)"
>
编辑
</el-button>
<el-button type="primary" text v-if="permission.fee_item_status" @click="handleStatus(row)">
</el-link>
<el-link type="primary" v-if="permission.fee_item_status" @click="handleStatus(row)">
{{ row.status === 1 ? '停用' : '启用' }}
</el-button>
</el-link>
</template>
</avue-crud>

View File

@@ -113,22 +113,20 @@
</div>
</template>
<template #menu="{ row, index }">
<el-button
<el-link
type="primary"
text
v-if="hasPermission('port_terminal_edit')"
@click="$refs.crud.rowEdit(row, index)"
>
编辑
</el-button>
<el-button
</el-link>
<el-link
type="primary"
text
v-if="hasPermission('port_terminal_status')"
@click="handleStatus(row)"
>
{{ row.status === 1 ? '停用' : '启用' }}
</el-button>
</el-link>
</template>
<template #cityCode-form>
<el-select

View File

@@ -60,22 +60,20 @@
</el-tag>
</template>
<template #menu="{ row, index }">
<el-button
<el-link
type="primary"
text
v-if="hasPermission('railway_station_edit')"
@click="$refs.crud.rowEdit(row, index)"
>
编辑
</el-button>
<el-button
</el-link>
<el-link
type="primary"
text
v-if="hasPermission('railway_station_status')"
@click="handleStatus(row)"
>
{{ row.status === 1 ? '停用' : '启用' }}
</el-button>
</el-link>
</template>
<template #districtCode-form>
<el-select
@@ -507,8 +505,10 @@ export default {
hasPermission(code) {
return this.isAdmin || this.validData(this.permission && this.permission[code], false);
},
findColumn(prop) {
return this.option.column.find(item => item.prop === prop);
findColumn(columns, prop) {
const targetColumns = Array.isArray(columns) ? columns : this.option.column;
const targetProp = Array.isArray(columns) ? prop : columns;
return targetColumns.find(item => item.prop === targetProp) || null;
},
loadProvinceOptions() {
getLazyTree(DEFAULT_COUNTRY_CODE).then(res => {

View File

@@ -145,30 +145,27 @@
</template>
<template #menu="{ row, index }">
<el-button
<el-link
type="primary"
text
v-if="hasPermission('common_cargo_view')"
@click="$refs.crud.rowView(row, index)"
>
查看
</el-button>
<el-button
</el-link>
<el-link
type="primary"
text
v-if="hasPermission('common_cargo_edit') && !row.readonly"
@click="$refs.crud.rowEdit(row, index)"
>
编辑
</el-button>
<el-button
</el-link>
<el-link
type="primary"
text
v-if="hasPermission('common_cargo_delete') && !row.readonly"
@click="rowDel(row)"
>
删除
</el-button>
</el-link>
</template>
</avue-crud>

View File

@@ -102,30 +102,27 @@
</template>
<template #menu="{ row, index }">
<el-button
<el-link
type="primary"
text
v-if="hasPermission('common_route_view')"
@click="$refs.crud.rowView(row, index)"
>
查看
</el-button>
<el-button
</el-link>
<el-link
type="primary"
text
v-if="hasPermission('common_route_edit') && !row.readonly"
@click="$refs.crud.rowEdit(row, index)"
>
编辑
</el-button>
<el-button
</el-link>
<el-link
type="primary"
text
v-if="hasPermission('common_route_delete') && !row.readonly"
@click="rowDel(row)"
>
删除
</el-button>
</el-link>
</template>
</avue-crud>
@@ -220,7 +217,7 @@
<el-table-column prop="detailAddress" label="详细地址" min-width="220" />
<el-table-column label="操作" width="120" fixed="right">
<template #default="{ row }">
<el-button type="primary" text @click.stop="selectAddressRow(row)">选择</el-button>
<el-link type="primary" @click.stop="selectAddressRow(row)">选择</el-link>
</template>
</el-table-column>
</el-table>
@@ -239,7 +236,6 @@
<template #footer>
<el-button @click="addressDialogVisible = false">关闭</el-button>
<el-button type="primary" @click="confirmAddressPick">确认</el-button>
</template>
</el-dialog>
</basic-container>
@@ -276,7 +272,6 @@ export default {
addressQuery: {},
addressData: [],
addressLoading: false,
addressSelected: null,
deptOptions: [],
page: {
pageSize: 10,
@@ -348,7 +343,6 @@ export default {
openAddressDialog(target) {
if (this.dialogReadonly) return;
this.addressTarget = target;
this.addressSelected = null;
this.addressPage.currentPage = 1;
this.resetAddressQuery();
this.addressDialogVisible = true;
@@ -387,14 +381,8 @@ export default {
});
},
selectAddressRow(row) {
this.addressSelected = row;
},
confirmAddressPick() {
if (!this.addressSelected) {
this.$message.warning('请选择常用地址');
return;
}
this.applyAddress(this.addressTarget, this.addressSelected);
if (!row) return;
this.applyAddress(this.addressTarget, row);
this.addressDialogVisible = false;
},
applyAddress(target, address) {

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,167 @@
<template>
<el-dialog v-model="visible" title="导入运单" width="90%" append-to-body destroy-on-close>
<div class="waybill-import-toolbar">
<div class="waybill-import-toolbar__search">
<el-form :inline="true" :model="query" label-width="auto">
<el-form-item label="运单批次号"><el-input v-model="query.batchNo" clearable /></el-form-item>
<el-form-item label="承运商"><el-select v-model="query.carrierId" clearable filterable><el-option v-for="item in carriers" :key="item.id" :label="item.name" :value="item.id" /></el-select></el-form-item>
<el-form-item label="创建时间"><el-date-picker v-model="query.createTimeRange" type="datetimerange" value-format="YYYY-MM-DD HH:mm:ss" /></el-form-item>
<el-form-item label="创建人"><el-select v-model="query.createUser" clearable filterable><el-option v-for="item in creators" :key="item.id" :label="item.name" :value="item.id" /></el-select></el-form-item>
</el-form>
<div class="waybill-import-toolbar__search-actions"><el-button type="primary" @click="loadBatches">查询</el-button><el-button @click="resetQuery">重置</el-button></div>
</div>
<div class="waybill-import-toolbar__actions"><el-button type="primary" @click="openCreate">新建导入</el-button><el-button type="danger" plain :disabled="!selected.length" @click="removeBatches">批量删除</el-button></div>
</div>
<el-table :data="batches" border @selection-change="selected = $event">
<el-table-column type="selection" width="50" /><el-table-column type="index" label="序号" width="70" />
<el-table-column prop="batchNo" label="运单批次号" min-width="150" /><el-table-column prop="projectName" label="项目名称" min-width="150" />
<el-table-column prop="carrierName" label="承运商" min-width="140" /><el-table-column prop="carrierType" label="承运类型" min-width="120" />
<el-table-column prop="waybillCount" label="运单数" width="90" /><el-table-column prop="importTypeName" label="导入方式" width="100" />
<el-table-column prop="createTime" label="创建时间" min-width="170" /><el-table-column prop="updateTime" label="更新时间" min-width="170" />
<el-table-column prop="statusName" label="状态" width="100" /><el-table-column label="操作" width="180" fixed="right">
<template #default="{ row }"><el-link type="primary" @click="openDetail(row)">查看</el-link><el-link type="primary" @click="editBatch(row)">编辑</el-link><el-link type="danger" @click="removeBatch(row)">删除</el-link></template>
</el-table-column>
</el-table>
<el-pagination v-model:current-page="page.current" v-model:page-size="page.size" layout="total, prev, pager, next, sizes" :page-sizes="[10, 20, 50]" :total="page.total" @current-change="loadBatches" @size-change="loadBatches" />
</el-dialog>
<el-dialog v-model="detailVisible" title="导入运单详情" width="90%" append-to-body>
<el-form :inline="true" :model="detailQuery"><el-form-item label="车牌号/船号"><el-input v-model="detailQuery.vehicleNo" clearable /></el-form-item><el-form-item label="货物名称"><el-input v-model="detailQuery.cargoName" clearable /></el-form-item><el-button type="primary" @click="loadDetails">查询</el-button></el-form>
<el-table :data="details" border><el-table-column type="index" label="序号" width="65" /><el-table-column prop="batchNo" label="运单批次号" min-width="140" /><el-table-column prop="originalNo" label="原始单号" min-width="130" /><el-table-column prop="vehicleNo" label="车牌号/航班号/船号/班列号" min-width="190" /><el-table-column prop="driverName" label="司机/船长" min-width="120" /><el-table-column prop="transportType" label="运输类型" width="110" /><el-table-column prop="cargoName" label="货物名称" width="130" /><el-table-column prop="cargoType" label="货物类型" width="120" /><el-table-column prop="quantity" label="重量" width="90" /><el-table-column prop="departureAddress" label="发货地址" min-width="220" show-overflow-tooltip /><el-table-column prop="departureContact" label="发货联系人" width="110" /><el-table-column prop="departurePhone" label="发货联系人电话" width="140" /><el-table-column prop="arrivalAddress" label="到货地址" min-width="220" show-overflow-tooltip /><el-table-column prop="arrivalContact" label="收货联系人" width="110" /><el-table-column prop="arrivalPhone" label="收货联系人电话" width="140" /><el-table-column prop="startDate" label="开始时间" width="160" /><el-table-column prop="endDate" label="结束时间" width="160" /><el-table-column prop="unitPrice" label="单价" width="90" /><el-table-column prop="freight" label="运费" width="100" /><el-table-column prop="otherFeeTotal" label="其他费用合计" width="120" /><el-table-column prop="freightTotal" label="运费合计" width="100" /><el-table-column prop="remark" label="备注" min-width="160" /><el-table-column label="操作" width="80">-</el-table-column></el-table>
<el-pagination v-model:current-page="detailPage.current" v-model:page-size="detailPage.size" layout="total, prev, pager, next, sizes" :page-sizes="[10, 20, 50]" :total="detailPage.total" @current-change="loadDetails" @size-change="loadDetails" />
</el-dialog>
<el-dialog v-model="createVisible" title="新建导入" width="85%" append-to-body destroy-on-close class="waybill-import-create">
<section class="waybill-import-create__form-panel">
<el-form ref="formRef" :model="form" :rules="rules" label-position="right" label-width="auto">
<el-row :gutter="20"><el-col :span="6"><el-form-item label="项目" prop="projectId"><el-select v-model="form.projectId" filterable clearable placeholder="模糊查询后选择" @change="projectChange"><el-option v-for="item in projects" :key="item.id" :label="item.projectName" :value="item.id" /></el-select></el-form-item></el-col><el-col :span="6"><el-form-item label="客户" prop="customerName"><el-input v-model="form.customerName" disabled placeholder="自动带出" /></el-form-item></el-col><el-col :span="6"><el-form-item label="客户合同" prop="contractId"><el-select v-model="form.contractId" filterable clearable placeholder="自动带出"><el-option v-for="item in contracts" :key="item.id" :label="item.contractName" :value="item.id" /></el-select></el-form-item></el-col><el-col :span="6"><el-form-item label="承运类型" prop="carrierType"><el-select v-model="form.carrierType"><el-option label="承运商" value="承运商" /><el-option label="自运" value="自运" /><el-option label="网货平台" value="网货平台" /></el-select></el-form-item></el-col><el-col :span="6"><el-form-item label="承运商"><el-select v-model="form.carrierIds" multiple filterable placeholder="自动带出,多个需选择"><el-option v-for="item in carriers" :key="item.id" :label="item.name" :value="item.id" /></el-select></el-form-item></el-col><el-col :span="6"><el-form-item label="导入状态" prop="status"><el-select v-model="form.status"><el-option label="完成" value="completed" /><el-option label="进行中" value="processing" /></el-select></el-form-item></el-col><el-col :span="6"><el-form-item label="导入类型" prop="importType"><el-select v-model="form.importType"><el-option label="运单" value="waybill" /><el-option label="结算单" value="settlement" /></el-select></el-form-item></el-col><el-col :span="6"><el-form-item label="发货计划"><el-select v-model="form.planId" clearable filterable placeholder="请选择"><el-option v-for="item in plans" :key="item.id" :label="item.planName" :value="item.id" /></el-select></el-form-item></el-col></el-row>
<el-form-item label="运单明细表" prop="file"><el-upload action="#" accept=".xls,.xlsx" :auto-upload="false" :limit="1" :file-list="files" :on-change="fileChange" :on-remove="fileRemove"><el-button type="primary">添加附件</el-button></el-upload><span class="waybill-import-create__file-tip">请上传运单明细表仅支持 excel 格式</span><el-link type="primary" @click="downloadTemplate">下载模板</el-link></el-form-item>
</el-form>
<div class="waybill-import-create__form-actions"><el-button @click="createVisible = false">关闭</el-button><el-button @click="saveDraft">保存草稿</el-button><el-button type="primary" @click="confirmImport">确认导入</el-button></div>
</section>
<section class="waybill-import-create__detail-panel" v-if="rows.length"><div class="waybill-import-create__detail-head"><div class="dialog-section-title">导入数据明细</div><el-button type="danger" plain :disabled="!rowSelection.length" @click="removeSelectedRows">批量删除</el-button></div><el-tabs v-model="previewTab"><el-tab-pane :label="`运单数(${rows.length}`" name="all" /><el-tab-pane :label="`疑似重复(${duplicateRows.length}`" name="duplicate" /></el-tabs><el-table :data="previewRows" border max-height="440" @selection-change="rowSelection = $event"><el-table-column type="selection" width="55" /><el-table-column type="index" label="序号" width="65" /><el-table-column v-for="column in detailColumns" :key="column.prop" :prop="column.prop" :label="column.label" min-width="140" show-overflow-tooltip /><el-table-column label="操作" width="180" fixed="right"><template #default="{ row }"><el-link type="primary" @click="cancelRow(row)">取消</el-link><el-link type="primary" @click="saveRow(row)">保存</el-link><el-link type="primary" @click="editRow(row)">编辑</el-link><el-link type="danger" @click="deleteRow(row)">删除</el-link></template></el-table-column></el-table></section>
</el-dialog>
</template>
<script setup>
import { computed, reactive, ref } from 'vue';
import { ElMessage, ElMessageBox } from 'element-plus';
import { getList as getProjectList } from '@/api/business/project-apply';
import * as api from '@/api/business/waybill-manage';
import { downloadXls } from '@/utils/util';
const props = defineProps({ modelValue: Boolean });
const emit = defineEmits(['update:modelValue']);
const visible = computed({ get: () => props.modelValue, set: value => emit('update:modelValue', value) });
const createVisible = ref(false), detailVisible = ref(false), formRef = ref();
const query = reactive({ batchNo: '', carrierId: '', createUser: '', createTimeRange: [] });
const detailQuery = reactive({ vehicleNo: '', cargoName: '' });
const form = reactive({ projectId: '', customerName: '', contractId: '', carrierType: '承运商', carrierIds: [], status: 'completed', importType: 'waybill', planId: '', file: null });
const rules = { projectId: [{ required: true, message: '请选择项目' }], customerName: [{ required: true, message: '客户不能为空' }], contractId: [{ required: true, message: '请选择客户合同' }], carrierType: [{ required: true, message: '请选择承运类型' }], status: [{ required: true, message: '请选择导入状态' }], importType: [{ required: true, message: '请选择导入类型' }], file: [{ required: true, message: '请上传明细表' }] };
const batches = ref([]), details = ref([]), rows = ref([]), selected = ref([]), files = ref([]), projects = ref([]), contracts = ref([]), carriers = ref([]), creators = ref([]), plans = ref([]);
const rowSelection = ref([]), previewTab = ref('all');
const duplicateRows = computed(() => rows.value.filter(row => row._duplicate));
const previewRows = computed(() => previewTab.value === 'duplicate' ? duplicateRows.value : rows.value);
const page = reactive({ current: 1, size: 10, total: 0 }), detailPage = reactive({ current: 1, size: 10, total: 0 });
const detailColumns = [{ prop: 'batchNo', label: '运单批次号' }, { prop: 'originalNo', label: '原始单号' }, { prop: 'vehicleNo', label: '车牌号/航班号/船号/班列号' }, { prop: 'driverName', label: '司机/船长' }, { prop: 'transportType', label: '运输类型' }, { prop: 'cargoName', label: '货物名称' }, { prop: 'cargoType', label: '货物类型' }, { prop: 'quantity', label: '重量' }, { prop: 'departureAddress', label: '发货地址' }, { prop: 'departureContact', label: '发货联系人' }, { prop: 'departurePhone', label: '发货联系人电话' }, { prop: 'arrivalAddress', label: '到货地址' }, { prop: 'arrivalContact', label: '收货联系人' }, { prop: 'arrivalPhone', label: '收货联系人电话' }, { prop: 'startDate', label: '开始时间' }, { prop: 'endDate', label: '结束时间' }, { prop: 'unitPrice', label: '单价' }, { prop: 'freight', label: '运费' }, { prop: 'otherFeeTotal', label: '其他费用合计' }, { prop: 'freightTotal', label: '运费合计' }, { prop: 'remark', label: '备注' }];
const requiredDetailFields = [{ prop: 'vehicleNo', label: '车牌号/航班号/船号/班列号' }, { prop: 'driverName', label: '司机/船长' }, { prop: 'transportType', label: '运输类型' }, { prop: 'cargoName', label: '货物名称' }, { prop: 'cargoType', label: '货物类型' }, { prop: 'departureAddress', label: '发货地址' }, { prop: 'departureContact', label: '发货联系人' }, { prop: 'departurePhone', label: '发货联系人电话' }, { prop: 'arrivalAddress', label: '到货地址' }, { prop: 'arrivalContact', label: '到货联系人' }, { prop: 'arrivalPhone', label: '收货联系人电话' }, { prop: 'startDate', label: '开始时间' }, { prop: 'endDate', label: '结束时间' }, { prop: 'unitPrice', label: '单价' }, { prop: 'freight', label: '运费' }];
const loadBatches = async () => { const res = await api.getImportBatches({ ...query, current: page.current, size: page.size }); batches.value = res.data?.data?.records || []; page.total = res.data?.data?.total || 0; };
const resetQuery = () => { Object.assign(query, { batchNo: '', carrierId: '', createUser: '', createTimeRange: [] }); page.current = 1; loadBatches(); };
const loadDetails = async () => { const res = await api.getImportDetails({ batchId: detailQuery.batchId, ...detailQuery, current: detailPage.current, size: detailPage.size }); details.value = res.data?.data?.records || []; detailPage.total = res.data?.data?.total || 0; };
const openCreate = async () => {
createVisible.value = true;
const projectRes = await getProjectList(1, 9999, {});
projects.value = projectRes.data?.data?.records || [];
api.getImportOptions?.().then(res => {
const data = res.data?.data || {};
contracts.value = data.contracts || [];
carriers.value = data.carriers || [];
creators.value = data.creators || [];
plans.value = data.plans || [];
});
};
const openDetail = row => { detailQuery.batchId = row.id; detailVisible.value = true; loadDetails(); };
const editBatch = row => { openCreate(); Object.assign(form, row); };
const removeBatches = () => api.removeImportBatches(selected.value.map(item => item.id).join(',')).then(loadBatches);
const removeBatch = row => api.removeImportBatches(row.id).then(loadBatches);
const projectChange = id => { const item = projects.value.find(row => row.id === id); form.customerName = item?.customerName || ''; api.getImportContracts?.(id).then(res => { contracts.value = res.data?.data || []; }); };
const fileChange = async (file, list) => {
files.value = list.slice(-1); form.file = file.raw;
const XLSX = await import('xlsx');
const workbook = XLSX.read(await file.raw.arrayBuffer(), { type: 'array', cellDates: true });
const source = XLSX.utils.sheet_to_json(workbook.Sheets[workbook.SheetNames[0]], { defval: '' }).map(item => Object.fromEntries(Object.entries(item).map(([key, value]) => [key.replace(/^\*/, ''), value])));
const keyMap = { '原始单号': 'originalNo', '车牌号/航班号/船号/班列号': 'vehicleNo', '司机/船长': 'driverName', '运输类型': 'transportType', '货物名称': 'cargoName', '货物类型': 'cargoType', '重量': 'quantity', '发货地址': 'departureAddress', '发货联系人': 'departureContact', '发货联系人电话': 'departurePhone', '到货地址': 'arrivalAddress', '收货联系人': 'arrivalContact', '收货联系人电话': 'arrivalPhone', '开始时间': 'startDate', '结束时间': 'endDate', '单价': 'unitPrice', '运费': 'freight', '其他费用合计': 'otherFeeTotal', '运费合计': 'freightTotal', '备注': 'remark' };
const count = new Map();
rows.value = source.map((item, index) => { const row = { _key: `${Date.now()}-${index}`, batchNo: '', ...item }; Object.entries(keyMap).forEach(([label, key]) => { row[key] = item[label] ?? item[key] ?? ''; }); const duplicateKey = JSON.stringify(Object.values(keyMap).map(key => row[key])); count.set(duplicateKey, (count.get(duplicateKey) || 0) + 1); row._duplicateKey = duplicateKey; return row; });
rows.value.forEach(row => { row._duplicate = count.get(row._duplicateKey) > 1; });
};
const fileRemove = () => { files.value = []; form.file = null; };
const downloadTemplate = async () => {
try {
const res = await api.exportImportTemplate();
downloadXls(res.data, '运单批量导入模板.xlsx');
ElMessage.success('模板下载成功');
} catch (error) {
ElMessage.error('模板下载失败');
}
};
const validateImportRows = () => {
if (!rows.value.length) {
ElMessage.warning('请上传至少一条运单明细');
return false;
}
for (const [index, row] of rows.value.entries()) {
const missingField = requiredDetailFields.find(field => !String(row[field.prop] ?? '').trim());
if (missingField) {
ElMessage.warning(`${index + 1}${missingField.label}不能为空`);
return false;
}
}
return true;
};
const editRow = row => { row._editing = true; };
const saveRow = row => { row._editing = false; };
const cancelRow = row => { row._cancelled = true; };
const deleteRow = row => { rows.value = rows.value.filter(item => item !== row); };
const removeSelectedRows = () => { const keys = new Set(rowSelection.value.map(row => row._key)); rows.value = rows.value.filter(row => !keys.has(row._key)); rowSelection.value = []; };
const saveDraft = () => api.saveImportDraft({ ...form, rows: rows.value });
const confirmImport = async () => { await formRef.value?.validate(); if (!validateImportRows()) return; const count = rows.value.filter(row => row._duplicate).length; if (count) await ElMessageBox.confirm(`当前导入有${count}条重复数据,是否确认导入?`, '提示'); if (form.importType === 'settlement') await ElMessageBox.confirm('确认后将同时生成运单、应收应付明细、计结算单,是否继续?', '提示'); await api.confirmImport({ ...form, rows: rows.value }); ElMessage.success('导入成功'); createVisible.value = false; loadBatches(); };
</script>
<style scoped lang="scss">
.waybill-import-toolbar {
margin-bottom: 12px;
&__search {
display: flex;
align-items: flex-start;
gap: 12px;
.el-form {
flex: 1;
margin-bottom: 0;
}
}
&__search-actions {
display: flex;
flex: none;
gap: 8px;
}
&__actions { margin-top: 8px; }
}
.waybill-import-create {
&__form-panel,
&__detail-panel {
border: 1px solid #eff1f7;
padding: 20px 24px;
}
&__detail-panel { margin-top: 12px; }
&__form-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 8px; }
&__detail-head { display: flex; align-items: center; gap: 24px; margin-bottom: 8px; }
&__file-tip { margin: 0 24px; color: #606266; }
}
</style>

File diff suppressed because it is too large Load Diff

View File

@@ -333,54 +333,48 @@
</template>
<template #menu="{ row, index }">
<el-button
<el-link
type="primary"
text
v-if="hasPermission('process_config_view')"
@click="$refs.crud.rowView(row, index)"
>
查看
</el-button>
<el-button
</el-link>
<el-link
type="primary"
text
v-if="canEdit(row)"
@click="$refs.crud.rowEdit(row, index)"
>
编辑
</el-button>
<el-button
</el-link>
<el-link
type="primary"
text
v-if="hasPermission('process_config_copy')"
@click="handleCopy(row)"
>
复制
</el-button>
<el-button
</el-link>
<el-link
type="primary"
text
v-if="canEnable(row)"
@click="handleAction('enable', row)"
>
启用
</el-button>
<el-button
</el-link>
<el-link
type="primary"
text
v-if="canDisable(row)"
@click="handleAction('disable', row)"
>
停用
</el-button>
<el-button
</el-link>
<el-link
type="primary"
text
v-if="canDelete(row)"
@click="rowDel(row)"
>
删除
</el-button>
</el-link>
</template>
</avue-crud>

View File

@@ -62,27 +62,25 @@
</template>
<template #menu="{ row, index }">
<el-button
<el-link
type="primary"
text
v-if="hasPermission(`${config.permission}_view`)"
@click="openProjectDialog('view', row)"
>
查看
</el-button>
<el-button type="primary" text v-if="canEdit(row)" @click="openProjectDialog('edit', row)">
</el-link>
<el-link type="primary" v-if="canEdit(row)" @click="openProjectDialog('edit', row)">
编辑
</el-button>
<el-button
</el-link>
<el-link
v-for="operation in customOperations(row)"
:key="operation.action"
:type="operation.type || 'primary'"
text
@click="handleCustomOperation(operation, row)"
>
{{ operation.label }}
</el-button>
<el-button type="primary" text v-if="canDelete(row)" @click="rowDel(row)"> 删除 </el-button>
</el-link>
<el-link type="primary" v-if="canDelete(row)" @click="rowDel(row)"> 删除 </el-link>
</template>
</avue-crud>
@@ -507,13 +505,12 @@
<el-table-column prop="uploadTime" label="上传时间" min-width="170" align="center" />
<el-table-column label="操作" width="110" align="center">
<template #default="{ row, $index }">
<el-button type="primary" text @click="downloadAttachment(row)">下载</el-button>
<el-button
<el-link type="primary" @click="downloadAttachment(row)">下载</el-link>
<el-link
v-if="!dialogReadonly"
type="primary"
text
@click="removeAttachment($index)"
>删除</el-button
>删除</el-link
>
</template>
</el-table-column>
@@ -559,9 +556,9 @@
<el-table-column prop="status" label="状态" min-width="120" align="center" />
<el-table-column label="操作" width="100" align="center">
<template #default="{ row }">
<el-button type="primary" text @click="handleChangeRecordAction(row)">
<el-link type="primary" @click="handleChangeRecordAction(row)">
{{ row.action || '查看' }}
</el-button>
</el-link>
</template>
</el-table-column>
</el-table>
@@ -652,7 +649,7 @@
<el-table-column prop="deptName" label="所属部门" min-width="180" align="center" />
<el-table-column label="操作" width="100" align="center">
<template #default="{ row }">
<el-button type="primary" text @click="selectUser(row)">选择</el-button>
<el-link type="primary" @click="selectUser(row)">选择</el-link>
</template>
</el-table-column>
</el-table>

View File

@@ -23,27 +23,24 @@
</el-radio-group>
</template>
<template #menu="scope">
<el-button
<el-link
type="primary"
text
v-if="permission.flow_manager_state"
@click.stop="handleState(scope.row, scope.index)"
>变更状态
</el-button>
<el-button
</el-link>
<el-link
type="primary"
text
v-if="permission.flow_manager_image"
@click.stop="handleImage(scope.row, scope.index)"
>流程图
</el-button>
<el-button
</el-link>
<el-link
type="primary"
text
v-if="permission.flow_manager_remove"
@click.stop="handleSlotDelete(scope.row, scope.index)"
>删除
</el-button>
</el-link>
</template>
<template #tenantId="{ row }">
<el-tag>{{ row.tenantId === '' ? '通用' : row.tenantId }}</el-tag>

View File

@@ -36,30 +36,27 @@
</el-button>
</template>
<template #menu="scope">
<el-button
<el-link
type="primary"
text
size="default"
v-if="permission.flow_model_update"
@click.stop="handleUpdate(scope.row, scope.index)"
>配置
</el-button>
<el-button
</el-link>
<el-link
type="primary"
text
size="default"
v-if="permission.flow_model_deploy"
@click.stop="handleDeploy(scope.row, scope.index)"
>部署
</el-button>
<el-button
</el-link>
<el-link
type="primary"
text
size="default"
v-if="permission.flow_model_delete"
@click.stop="handleSlotDelete(scope.row, scope.index)"
>删除
</el-button>
</el-link>
</template>
<template #version="{ row }">
<el-tag>v{{ row.version }}</el-tag>

View File

@@ -35,9 +35,9 @@
</el-button>
</template>
<template #menu="scope">
<el-button type="primary" text @click="handleRun(scope.row)"
<el-link type="primary" @click="handleRun(scope.row)"
>
</el-button>
</el-link>
</template>
<template #enable="{ row }">
<el-switch

View File

@@ -35,9 +35,9 @@
</el-button>
</template>
<template #menu="scope">
<el-button type="primary" text @click="handleLink(scope.row)"
<el-link type="primary" @click="handleLink(scope.row)"
>服务跳转
</el-button>
</el-link>
</template>
</avue-crud>
</basic-container>

View File

@@ -23,20 +23,18 @@
</el-button>
</template>
<template #menu="scope">
<el-button
<el-link
type="primary"
text
@click.stop="handleDesign(scope.row.name)"
v-if="userInfo.authority.includes('admin')"
>设计
</el-button>
<el-button
</el-link>
<el-link
type="primary"
text
@click.stop="handlePreview(scope.row.name)"
v-if="userInfo.authority.includes('admin')"
>预览
</el-button>
</el-link>
</template>
<template #name="{ row }">
<el-tag style="cursor: pointer" @click="handlePreview(row.name)">{{ row.name }}</el-tag>

View File

@@ -37,13 +37,12 @@
</el-button>
</template>
<template #menu="scope">
<el-button
<el-link
type="primary"
text
v-if="permission.attach_download"
@click="handleDownload(scope.row)"
>下载
</el-button>
</el-link>
</template>
<template #attachSize="{ row }">
<el-tag>{{ formatFileSize(row.attachSize) }}</el-tag>

View File

@@ -31,20 +31,18 @@
</el-button>
</template>
<template #menu="scope">
<el-button
<el-link
type="primary"
text
v-if="userInfo.authority.includes('admin')"
@click="handleDebug(scope.row)"
>调试
</el-button>
<el-button
</el-link>
<el-link
type="primary"
text
v-if="permission.oss_enable"
@click.stop="handleEnable(scope.row)"
>启用
</el-button>
</el-link>
</template>
<template #status="{ row }">
<el-tag>{{ row.statusName }}</el-tag>

View File

@@ -31,20 +31,18 @@
</el-button>
</template>
<template #menu="scope">
<el-button
<el-link
type="primary"
text
v-if="userInfo.authority.includes('admin')"
@click="handleDebug(scope.row)"
>调试
</el-button>
<el-button
</el-link>
<el-link
type="primary"
text
v-if="permission.sms_enable"
@click.stop="handleEnable(scope.row)"
>启用
</el-button>
</el-link>
</template>
<template #status="{ row }">
<el-tag>{{ row.statusName }}</el-tag>

View File

@@ -46,19 +46,16 @@
{{ row.lockEndTime || '永久' }}
</template>
<template #menu="{ row }">
<el-button
text
<el-link
type="primary"
@click.stop="$refs.authLockCrud.rowView(row)"
>查看</el-button
>查看</el-link
>
<el-button
<el-link
v-if="(row.lockStatus === 'LOCKED' || row.lockStatus === 'PRE_LOCKED') && !row.expired"
text
type="primary"
@click.stop="handleAuthLockUnlock(row)"
>解锁</el-button
>
>解锁</el-link>
</template>
</avue-crud>
</el-drawer>

View File

@@ -18,12 +18,10 @@
@on-load="authLogOnLoad"
>
<template #menu="{ row }">
<el-button
text
<el-link
type="primary"
@click.stop="$refs.authLogCrud.rowView(row)"
>查看</el-button
>
>查看</el-link>
</template>
<template #account="{ row }">
<el-tag size="small" effect="light">{{ row.account }}</el-tag>

View File

@@ -32,13 +32,12 @@
</el-button>
</template>
<template #menu="scope">
<el-button
<el-link
type="primary"
text
@click.stop="handleAdd(scope.row, scope.index)"
v-if="userInfo.authority.includes('admin')"
>新增子项
</el-button>
</el-link>
</template>
<template #deptCategory="{ row }">
<el-tag>{{ row.deptCategoryName }}</el-tag>

View File

@@ -32,13 +32,12 @@
</el-button>
</template>
<template #menu="scope">
<el-button
<el-link
type="primary"
text
@click.stop="handleRowClick(scope.row)"
v-if="userInfo.authority.includes('admin')"
>字典配置
</el-button>
</el-link>
</template>
<template #code="{ row }">
<el-tag @click="handleRowClick(row)" style="cursor: pointer">{{ row.code }}</el-tag>
@@ -79,13 +78,12 @@
</el-button>
</template>
<template #menu="scope">
<el-button
<el-link
type="primary"
text
@click.stop="handleAdd(scope.row, scope.index)"
v-if="userInfo.authority.includes('admin')"
>新增子项
</el-button>
</el-link>
</template>
<template #isSealed="{ row }">
<el-tag>{{ row.isSealed === 0 ? '否' : '是' }}</el-tag>

View File

@@ -32,13 +32,12 @@
</el-button>
</template>
<template #menu="scope">
<el-button
<el-link
type="primary"
text
@click.stop="handleRowClick(scope.row)"
v-if="userInfo.authority.includes('admin')"
>字典配置
</el-button>
</el-link>
</template>
<template #code="{ row }">
<el-tag @click="handleRowClick(row)" style="cursor: pointer">{{ row.code }}</el-tag>
@@ -79,13 +78,12 @@
</el-button>
</template>
<template #menu="scope">
<el-button
<el-link
type="primary"
text
@click.stop="handleAdd(scope.row, scope.index)"
v-if="userInfo.authority.includes('admin')"
>新增子项
</el-button>
</el-link>
</template>
<template #isSealed="{ row }">
<el-tag>{{ row.isSealed === 0 ? '否' : '是' }}</el-tag>

View File

@@ -32,13 +32,12 @@
</el-button>
</template>
<template #menu="scope">
<el-button
<el-link
type="primary"
text
@click.stop="handleAdd(scope.row, scope.index)"
v-if="userInfo.authority.includes('admin') && scope.row.category === 1"
>新增子项
</el-button>
</el-link>
</template>
<template #name="{ row }">
<i :class="row.source" style="margin-right: 5px" />
@@ -89,7 +88,7 @@ export default {
index: true,
selection: true,
viewBtn: true,
menuWidth: 160,
menuWidth: 320,
dialogClickModal: false,
column: [
{
@@ -312,8 +311,42 @@ export default {
column.addDisabled = true;
this.$refs.crud.rowAdd();
},
normalizeSubmitRow(row = {}, isUpdate = false) {
const submitProps = [
'id',
'parentId',
'code',
'name',
'alias',
'path',
'source',
'component',
'sort',
'category',
'action',
'isOpen',
'isDisplay',
'remark',
];
const submitRow = submitProps.reduce((result, prop) => {
if (row[prop] !== undefined) {
result[prop] = row[prop];
}
return result;
}, {});
if (isUpdate) {
submitRow.id = row.id || this.currentEditMenuId;
} else {
delete submitRow.id;
}
if (submitRow.parentId === '') {
submitRow.parentId = 0;
}
return submitRow;
},
rowSave(row, done, loading) {
add(row).then(
const submitRow = this.normalizeSubmitRow(row);
add(submitRow).then(
res => {
// 获取新增数据的相关字段
const data = res.data.data;
@@ -332,15 +365,15 @@ export default {
);
},
rowUpdate(row, index, done, loading) {
row.id = row.id || this.currentEditMenuId;
update(row).then(
const submitRow = this.normalizeSubmitRow(row, true);
update(submitRow).then(
() => {
this.$message({
type: 'success',
message: '操作成功!',
});
// 数据回调进行刷新
done(row);
done({ ...row, ...submitRow });
},
error => {
window.console.log(error);
@@ -417,6 +450,7 @@ export default {
this.initData();
}
if (type === 'add') {
this.form.id = undefined;
this.form.sort = 1;
this.form.isDisplay = 1;
}

View File

@@ -83,27 +83,24 @@
<!-- 操作栏模块 -->
<el-table-column prop="menu" label="操作" :width="220" align="center">
<template #="{ row }">
<el-button
<el-link
v-if="this.permissionList.viewBtn"
type="primary"
text
@click="handleView(row)"
>查看
</el-button>
<el-button
</el-link>
<el-link
v-if="this.permissionList.editBtn"
type="primary"
text
@click="handleEdit(row)"
>编辑
</el-button>
<el-button
</el-link>
<el-link
v-if="this.permissionList.delBtn"
type="primary"
text
@click="rowDel(row)"
>删除
</el-button>
</el-link>
</template>
</el-table-column>
</el-table>

View File

@@ -115,20 +115,18 @@
</el-tooltip>
</template>
<template #menu="scope">
<el-button
<el-link
v-if="userInfo.authority.includes('administrator') && !recycleMode"
type="primary"
text
@click.stop="handleRowDatasource(scope.row)"
>数据源
</el-button>
<el-button
</el-link>
<el-link
v-if="userInfo.authority.includes('administrator') && !recycleMode"
type="primary"
text
@click.stop="handleRowPackage(scope.row)"
>产品包
</el-button>
</el-link>
</template>
<template #accountNumber="{ row }">
<el-tag>{{ row.accountNumber > 0 ? row.accountNumber : '不限制' }}</el-tag>

View File

@@ -38,13 +38,12 @@
</el-button>
</template>
<template #menu="scope">
<el-button
<el-link
v-if="permission.topmenu_setting"
type="primary"
text
@click.stop="handleRowMenuSetting(scope.row)"
>配置
</el-button>
</el-link>
</template>
<template #name="{ row }">
<i :class="row.source" style="margin-right: 5px" />

View File

@@ -125,22 +125,20 @@
</el-button>
</template>
<template #menu="{ row, index, size }">
<el-button
text
<el-link
type="primary"
v-if="this.permission.user_view"
@click.stop="$refs.crud.rowView(row, index)"
>查看
</el-button>
<el-button
text
</el-link>
<el-link
type="primary"
v-if="this.permission.user_edit"
@click.stop="$refs.crud.rowEdit(row, index)"
>编辑
</el-button>
</el-link>
<el-dropdown @command="command => handleDropdownCommand(command, row, index)">
<el-button text type="primary"> </el-button>
<el-link type="primary"> </el-link>
<template #dropdown>
<el-dropdown-menu>
<el-dropdown-item command="setLeader" v-if="userInfo.authority.includes('admin')">

View File

@@ -82,22 +82,20 @@
</el-tooltip>
</template>
<template #menu="scope">
<el-button
<el-link
type="primary"
text
v-if="permission.code_edit"
class="none-border"
@click.stop="handleCopy(scope.row)"
>复制
</el-button>
<el-button
</el-link>
<el-link
type="primary"
text
v-if="userInfo.authority.includes('administrator')"
class="none-border"
@click.stop="handleBuildSingle(scope.row)"
>生成
</el-button>
</el-link>
</template>
</avue-crud>
<el-drawer title="代码快速生成" append-to-body v-model="codeGenBox" direction="rtl" size="50%">

View File

@@ -27,12 +27,11 @@
</el-button>
</template>
<template #menu="scope">
<el-button
<el-link
type="primary"
text
@click.stop="handleEnable(scope.row)"
>
</el-button>
</el-link>
</template>
<template #status="{ row }">
<el-tag>{{ row.status === 1 ? '否' : '是' }}</el-tag>

View File

@@ -27,9 +27,9 @@
</el-button>
</template>
<template #menu="scope">
<el-button type="primary" text @click.stop="handleDesign(scope.row)"
<el-link type="primary" @click.stop="handleDesign(scope.row)"
>
</el-button>
</el-link>
</template>
</avue-crud>
<el-dialog
@@ -81,16 +81,15 @@
:is-crud="isCrud"
>
<template #toolbar>
<el-button
<el-link
style="padding: 0"
text
type="primary"
size="default"
icon="el-icon-download"
@click="handleSubmit"
>
保存
</el-button>
</el-link>
</template>
</nf-form-design>
</el-dialog>

View File

@@ -26,14 +26,12 @@
</el-button>
</template>
<template #menu="{ row }">
<el-button
<el-link
type="primary"
text
plain
class="none-border"
@click.stop="handleModel(row)"
>模型配置
</el-button>
</el-link>
</template>
<template #modelTable="{ row }">
<el-tag>{{ row.modelTable }}</el-tag>

View File

@@ -92,25 +92,23 @@
</span>
</template>
<template #menu="{ row }">
<el-button
<el-link
type="primary"
text
v-if="hasPermission('driver_view')"
@click="openDriver(row, true)"
>
查看
</el-button>
<el-button type="primary" text v-if="hasPermission('driver_edit')" @click="openDriver(row)">
</el-link>
<el-link type="primary" v-if="hasPermission('driver_edit')" @click="openDriver(row)">
修改
</el-button>
<el-button
</el-link>
<el-link
type="primary"
text
v-if="hasPermission('driver_status')"
@click="handleStatus(row)"
>
{{ row.status === 1 ? '停用' : '启用' }}
</el-button>
</el-link>
</template>
</avue-crud>
@@ -186,10 +184,15 @@
<el-row :gutter="18">
<el-col :span="8">
<el-form-item label="住址" prop="addressRegion">
<el-input
v-model="driverForm.addressRegion"
maxlength="100"
placeholder="省 / 市 / 区"
<el-cascader
ref="addressRegionCascader"
v-model="driverForm.addressRegionPath"
:options="regionOptions"
:props="regionCascaderProps"
:placeholder="driverForm.addressRegion || '请选择省市区'"
clearable
filterable
@change="handleAddressRegionChange"
/>
</el-form-item>
</el-col>
@@ -496,6 +499,7 @@ import {
recognitionTransportCertificates,
} from '@/api/transportCapacity/driver';
import { getDeptTree } from '@/api/system/dept';
import { getLazyTree } from '@/api/base/region';
import { exportBlob } from '@/api/common';
import { getToken } from '@/utils/auth';
import { getUploadHeaders } from '@/utils/upload';
@@ -510,6 +514,7 @@ const emptyForm = () => ({
gender: '',
nation: '',
education: '',
addressRegionPath: [],
addressRegion: '',
address: '',
postList: ['司机'],
@@ -644,6 +649,7 @@ export default {
],
relationOptions: ['父母', '配偶', '子女', '兄弟姐妹', '朋友', '同事'],
organizationOptions: [],
regionOptions: [],
formRules: {
driverName: [{ required: true, message: '请输入司机姓名', trigger: 'blur' }],
idCardNo: [{ required: true, message: '请输入身份证号', trigger: 'blur' }],
@@ -709,9 +715,18 @@ export default {
}
return this.driverForm.id ? '修改司机' : '新增司机';
},
regionCascaderProps() {
return {
value: 'id',
label: 'title',
children: 'children',
emitPath: true,
};
},
},
created() {
this.initDeptTree();
this.initRegionOptions();
},
methods: {
hasPermission(code) {
@@ -738,6 +753,117 @@ export default {
});
return result;
},
initRegionOptions() {
getLazyTree().then(res => {
const regions = this.buildRegionTree(res.data.data || []);
this.regionOptions = this.extractChinaRegionOptions(regions);
this.syncAddressRegionPath();
});
},
buildRegionTree(regions = []) {
const flatRegions = [];
const collectRegions = list => {
(list || []).forEach(item => {
flatRegions.push({
...item,
children: undefined,
});
if (item.children?.length) collectRegions(item.children);
});
};
collectRegions(regions);
const nodeMap = new Map();
flatRegions.forEach(item => {
const id = item.id === undefined || item.id === null ? item.value : item.id;
if (id === undefined || id === null) return;
nodeMap.set(String(id), {
...item,
id: String(id),
parentId:
item.parentId === undefined || item.parentId === null ? '' : String(item.parentId),
children: [],
});
});
const rootNodes = [];
nodeMap.forEach(node => {
const parent = nodeMap.get(node.parentId);
if (parent && parent !== node) {
parent.children.push(node);
} else {
rootNodes.push(node);
}
});
return rootNodes.map(item => this.normalizeRegionTreeNode(item));
},
normalizeRegionTreeNode(region) {
const children = (region.children || []).map(item => this.normalizeRegionTreeNode(item));
return {
...region,
children: children.length ? children : undefined,
leaf: !children.length,
};
},
isChinaRegion(region = {}) {
const title = String(region.title || region.name || '').trim();
return title === '中国' || title === '中华人民共和国';
},
extractChinaRegionOptions(regions) {
const china = (regions || []).find(item => this.isChinaRegion(item));
if (china?.children?.length) return china.children;
if (regions.length === 1 && regions[0].children?.length) return regions[0].children;
return regions;
},
findRegionOption(options, value) {
for (const item of options || []) {
if (String(item.id) === String(value)) return item;
const child = this.findRegionOption(item.children, value);
if (child) return child;
}
return null;
},
findRegionPathByName(options = [], addressRegion = '', parents = []) {
const target = String(addressRegion || '').replace(/\s+/g, '');
if (!target) return [];
for (const item of options || []) {
const nextParents = [...parents, item];
const nextName = nextParents.map(region => region.title || region.name || '').join('');
if (nextName === target) {
return nextParents.map(region => region.id);
}
const childPath = this.findRegionPathByName(item.children, target, nextParents);
if (childPath.length) return childPath;
}
return [];
},
getAddressRegionLabels(value) {
const nodes = this.$refs.addressRegionCascader?.getCheckedNodes?.() || [];
if (nodes.length && nodes[0].pathLabels?.length) {
return nodes[0].pathLabels;
}
return (value || [])
.map(code => this.findRegionOption(this.regionOptions, code)?.title)
.filter(Boolean);
},
handleAddressRegionChange(value) {
if (!value || !value.length) {
this.driverForm.addressRegion = '';
this.$refs.driverForm?.validateField('addressRegion');
return;
}
this.$nextTick(() => {
this.driverForm.addressRegion = this.getAddressRegionLabels(value).join('');
this.$refs.driverForm?.validateField('addressRegion');
});
},
syncAddressRegionPath() {
if (!this.driverForm.addressRegion || this.driverForm.addressRegionPath?.length) return;
const path = this.findRegionPathByName(this.regionOptions, this.driverForm.addressRegion);
if (path.length) {
this.driverForm.addressRegionPath = path;
}
},
validateDrivingLicenseEndDate(rule, value, callback) {
if (!this.driverForm.drivingLicenseStartDate) {
callback(new Error('请选择驾驶证有效期起'));
@@ -768,8 +894,12 @@ export default {
this.driverForm = {
...emptyForm(),
...detail,
addressRegionPath: Array.isArray(detail.addressRegionPath)
? detail.addressRegionPath
: [],
postList: detail.posts ? detail.posts.split(',').filter(Boolean) : [],
};
this.syncAddressRegionPath();
this.driverBox = true;
});
},
@@ -817,11 +947,8 @@ export default {
});
},
recognizeDrivingLicense() {
const objectKeys = [
this.drivingLicenseUploads.drivingLicenseFront || this.driverForm.drivingLicenseFront,
this.drivingLicenseUploads.drivingLicenseBack || this.driverForm.drivingLicenseBack,
].filter(Boolean);
if (!objectKeys.length) {
const certificates = this.buildDrivingLicenseRecognitionCertificates();
if (!certificates.length) {
this.$message.warning('驾驶证图片上传成功,未获取到图片地址,无法自动识别');
return;
}
@@ -830,7 +957,7 @@ export default {
text: '驾驶证识别中',
background: 'rgba(255, 255, 255, 0.7)',
});
recognitionTransportCertificates(objectKeys)
recognitionTransportCertificates(certificates)
.then(res => {
const data = res.data.data || {};
this.applyDrivingLicenseRecognition(data);
@@ -843,8 +970,20 @@ export default {
loading.close();
});
},
buildDrivingLicenseRecognitionCertificates() {
return ['drivingLicenseFront', 'drivingLicenseBack']
.map(prop => {
const objectKey = this.drivingLicenseUploads[prop] || this.driverForm[prop];
if (!objectKey) return null;
return {
driverLicenseUrl: objectKey,
};
})
.filter(Boolean);
},
applyDrivingLicenseRecognition(data = {}) {
const driverName = data.driverLicenseName || data.name || this.getOcrValue(data, ['name', '姓名']);
const driverName =
data.driverLicenseName || data.name || this.getOcrValue(data, ['name', '姓名']);
const idCardNo = String(
data.driverLicenseIdNo ||
data.idNo ||
@@ -1021,6 +1160,7 @@ export default {
qualificationNo: this.driverForm.qualificationNo || this.driverForm.idCardNo,
posts: this.driverForm.postList.join(','),
};
delete row.addressRegionPath;
this.submitLoading = true;
submit(row)
.then(() => {
@@ -1183,18 +1323,6 @@ export default {
flex-shrink: 0;
}
:deep(.avue-crud__search .avue-form__menu),
:deep(.avue-crud__search .avue-form__menu--right) {
flex: 0 0 auto;
width: auto;
max-width: none;
}
:deep(.avue-crud__search .avue-form__menu--right) {
margin-left: 12px;
justify-content: flex-end;
}
:deep(.el-table th .cell),
:deep(.el-table td .cell) {
white-space: nowrap;
@@ -1217,6 +1345,7 @@ export default {
:deep(.el-date-editor.el-input),
:deep(.el-date-editor.el-input__wrapper),
:deep(.el-cascader),
:deep(.el-select),
:deep(.el-input) {
width: 100%;

View File

@@ -87,30 +87,27 @@
</span>
</template>
<template #menu="{ row }">
<el-button
<el-link
type="primary"
text
v-if="hasPermission('transport_ship_edit')"
@click="openShip(row)"
>
修改
</el-button>
<el-button
</el-link>
<el-link
type="primary"
text
v-if="hasPermission('transport_ship_view')"
@click="openShip(row, true)"
>
综合台账
</el-button>
<el-button
</el-link>
<el-link
type="primary"
text
v-if="hasPermission('transport_ship_status')"
@click="handleStatus(row)"
>
{{ row.status === 1 ? '停用' : '启用' }}
</el-button>
</el-link>
</template>
</avue-crud>

View File

@@ -79,30 +79,27 @@
</span>
</template>
<template #menu="{ row }">
<el-button
<el-link
type="primary"
text
v-if="hasPermission('transport_vehicle_view')"
@click="openVehicle(row, true)"
>
查看
</el-button>
<el-button
</el-link>
<el-link
type="primary"
text
v-if="hasPermission('transport_vehicle_edit')"
@click="openVehicle(row)"
>
修改
</el-button>
<el-button
</el-link>
<el-link
type="primary"
text
v-if="hasPermission('transport_vehicle_status')"
@click="handleStatus(row)"
>
{{ row.status === 1 ? '停用' : '启用' }}
</el-button>
</el-link>
</template>
</avue-crud>

View File

@@ -6,9 +6,9 @@
<el-button type="primary" @click="handleForm()" icon="el-icon-plus">add</el-button>
</template>
<template #menu="{ row }">
<el-button type="primary" text @click="handleForm(row.id)"
<el-link type="primary" @click="handleForm(row.id)"
>edit
</el-button>
</el-link>
</template>
</avue-crud>
</basic-container>

View File

@@ -34,12 +34,11 @@
<el-tag>{{ row.isSealed === 0 ? '否' : '是' }}</el-tag>
</template>
<template #menu="scope">
<el-button
<el-link
type="primary"
text
@click.stop="handleAdd(scope.row, scope.index)"
>新增子项
</el-button>
</el-link>
</template>
</avue-crud>
</basic-container>

View File

@@ -88,13 +88,12 @@
</el-button>
</template>
<template #menu="scope">
<el-button
<el-link
type="primary"
text
@click.stop="handleAdd(scope.row, scope.index)"
v-if="userInfo.authority.includes('admin')"
>新增子项
</el-button>
</el-link>
</template>
<template #isSealed="{ row }">
<el-tag>{{ row.isSealed === 0 ? '否' : '是' }}</el-tag>

View File

@@ -88,13 +88,12 @@
</el-button>
</template>
<template #menu="scope">
<el-button
<el-link
type="primary"
text
@click.stop="handleAdd(scope.row, scope.index)"
v-if="userInfo.authority.includes('admin')"
>新增子项
</el-button>
</el-link>
</template>
<template #isSealed="{ row }">
<el-tag>{{ row.isSealed === 0 ? '否' : '是' }}</el-tag>

View File

@@ -69,38 +69,34 @@
</el-tag>
</template>
<template #menu="{ row }">
<el-button
<el-link
type="primary"
text
v-if="hasPermission('credit_score_quantification_edit')"
@click="openConfig(row)"
>
编辑
</el-button>
<el-button
</el-link>
<el-link
type="primary"
text
v-if="hasPermission('credit_score_quantification_publish') && row.status === 3"
@click="handlePublish(row)"
>
发布
</el-button>
<el-button
</el-link>
<el-link
type="primary"
text
v-if="hasPermission('credit_score_quantification_status') && row.status !== 3"
@click="handleStatus(row)"
>
{{ row.status === 1 ? '停用' : '启用' }}
</el-button>
<el-button
</el-link>
<el-link
type="danger"
text
v-if="hasPermission('credit_score_quantification_delete') && row.status === 3"
@click="rowDel(row)"
>
删除
</el-button>
</el-link>
</template>
</avue-crud>
@@ -150,7 +146,7 @@
</el-table-column>
<el-table-column label="操作" width="180" align="center">
<template #default="{ row }">
<el-button type="primary" text @click="openCategory(row)">编辑</el-button>
<el-link type="primary" @click="openCategory(row)">编辑</el-link>
</template>
</el-table-column>
</el-table>
@@ -177,9 +173,9 @@
<el-table-column label="标准说明" prop="standardDescription" min-width="320" />
<el-table-column label="操作" width="160" align="center">
<template #default="{ row, $index }">
<el-button type="primary" text @click="openStandard(row, $index)">编辑</el-button>
<el-button type="danger" text v-if="!readonly" @click="removeStandard($index)"
>删除</el-button
<el-link type="primary" @click="openStandard(row, $index)">编辑</el-link>
<el-link type="danger" v-if="!readonly" @click="removeStandard($index)"
>删除</el-link
>
</template>
</el-table-column>
@@ -216,16 +212,15 @@
</el-table-column>
<el-table-column label="操作" width="160" align="center">
<template #default="{ row, $index }">
<el-button type="primary" text @click="openItem(row, $index)">编辑</el-button>
<el-button
<el-link type="primary" @click="openItem(row, $index)">编辑</el-link>
<el-link
type="danger"
text
v-if="!readonly"
:disabled="currentCategory.items.length <= 1"
@click="removeItem($index)"
>
删除
</el-button>
</el-link>
</template>
</el-table-column>
</el-table>
@@ -271,20 +266,19 @@
<el-input-number v-model="option.score" :min="0" :precision="2" :controls="false" />
<span class="score-unit"></span>
</div>
<el-button
<el-link
type="primary"
text
class="option-delete"
v-if="!readonly && itemForm.options.length > 1"
@click="removeOption(index)"
>
删除
</el-button>
</el-link>
</div>
<div class="option-add">
<el-button type="primary" text v-if="!readonly" @click="addOption">
<el-link type="primary" v-if="!readonly" @click="addOption">
+添加选项
</el-button>
</el-link>
</div>
</div>
</el-form-item>

View File

@@ -63,25 +63,22 @@
</el-tag>
</template>
<template #menu="{ row }">
<el-button
<el-link
type="primary"
text
v-if="hasPermission('customer_archive_view')"
@click="openArchive(row, true)"
>
查看
</el-button>
<el-button
</el-link>
<el-link
type="primary"
text
v-if="hasPermission('customer_archive_edit') && row.approvalStatus !== 'reviewing'"
@click="openArchive(row)"
>
编辑
</el-button>
<el-button
</el-link>
<el-link
type="primary"
text
v-if="
hasPermission('customer_archive_submit') &&
['draft', 'rejected'].includes(row.approvalStatus)
@@ -89,39 +86,35 @@
@click="handleSubmitApproval(row)"
>
提交
</el-button>
<el-button
</el-link>
<el-link
type="success"
text
v-if="hasPermission('customer_archive_approve') && row.approvalStatus === 'reviewing'"
@click="handleApprove(row)"
>
审核通过
</el-button>
<el-button
</el-link>
<el-link
type="warning"
text
v-if="hasPermission('customer_archive_reject') && row.approvalStatus === 'reviewing'"
@click="handleReject(row)"
>
审核不通过
</el-button>
<el-button
</el-link>
<el-link
type="primary"
text
v-if="hasPermission('customer_archive_status')"
@click="handleStatus(row)"
>
{{ row.status === 1 ? '停用' : '启用' }}
</el-button>
<el-button
</el-link>
<el-link
type="danger"
text
v-if="hasPermission('customer_archive_delete') && row.approvalStatus === 'draft'"
@click="rowDel(row)"
>
删除
</el-button>
</el-link>
</template>
</avue-crud>
<empty-pagination
@@ -409,9 +402,9 @@
</el-table-column>
<el-table-column label="操作" min-width="135" align="center">
<template #default="{ row }">
<el-button type="primary" text @click="openScore(row.__raw, row.__rawIndex)">
<el-link type="primary" @click="openScore(row.__raw, row.__rawIndex)">
详情
</el-button>
</el-link>
</template>
</el-table-column>
</el-table>
@@ -447,10 +440,10 @@
</el-table-column>
<el-table-column label="操作" width="130" align="center" v-if="!readonly">
<template #default="{ row }">
<el-button type="primary" text @click="openContact(row.__raw, row.__rawIndex)">
<el-link type="primary" @click="openContact(row.__raw, row.__rawIndex)">
修改
</el-button>
<el-button type="danger" text @click="deleteContact(row.__rawIndex)">删除</el-button>
</el-link>
<el-link type="danger" @click="deleteContact(row.__rawIndex)">删除</el-link>
</template>
</el-table-column>
</el-table>
@@ -477,10 +470,10 @@
<el-table-column label="备注" prop="remark" min-width="180" />
<el-table-column label="操作" width="130" align="center" v-if="!readonly">
<template #default="{ row }">
<el-button type="primary" text @click="openReceipt(row.__raw, row.__rawIndex)">
<el-link type="primary" @click="openReceipt(row.__raw, row.__rawIndex)">
修改
</el-button>
<el-button type="danger" text @click="deleteReceipt(row.__rawIndex)">删除</el-button>
</el-link>
<el-link type="danger" @click="deleteReceipt(row.__rawIndex)">删除</el-link>
</template>
</el-table-column>
</el-table>
@@ -513,10 +506,10 @@
<el-table-column label="邮箱" prop="email" min-width="180" />
<el-table-column label="操作" width="130" align="center" v-if="!readonly">
<template #default="{ row }">
<el-button type="primary" text @click="openInvoice(row.__raw, row.__rawIndex)">
<el-link type="primary" @click="openInvoice(row.__raw, row.__rawIndex)">
修改
</el-button>
<el-button type="danger" text @click="deleteInvoice(row.__rawIndex)">删除</el-button>
</el-link>
<el-link type="danger" @click="deleteInvoice(row.__rawIndex)">删除</el-link>
</template>
</el-table-column>
</el-table>
@@ -602,9 +595,9 @@
</el-table-column>
<el-table-column label="操作" width="90" align="center" v-if="!readonly">
<template #default="{ $index }">
<el-button type="danger" text @click="qualificationFiles.splice($index, 1)">
<el-link type="danger" @click="qualificationFiles.splice($index, 1)">
删除
</el-button>
</el-link>
</template>
</el-table-column>
</el-table>
@@ -1083,9 +1076,9 @@
</el-table-column>
<el-table-column label="操作" width="120" align="center" v-if="!readonly">
<template #default="{ $index }">
<el-button type="primary" text @click="scoreAttachmentFiles.splice($index, 1)">
<el-link type="primary" @click="scoreAttachmentFiles.splice($index, 1)">
删除
</el-button>
</el-link>
</template>
</el-table-column>
</el-table>

View File

@@ -15,27 +15,24 @@
@on-load="onLoad"
>
<template #menu="scope">
<el-button
<el-link
type="primary"
text
v-if="permission.work_claim_sign"
@click.stop="handleClaim(scope.row)"
>签收
</el-button>
<el-button
</el-link>
<el-link
type="primary"
text
v-if="permission.work_claim_detail"
@click.stop="handleDetail(scope.row)"
>详情
</el-button>
<el-button
</el-link>
<el-link
type="primary"
text
v-if="permission.work_claim_follow"
@click.stop="handleImage(scope.row, scope.index)"
>流程图
</el-button>
</el-link>
</template>
<template #processDefinitionVersion="{ row }">
<el-tag>v{{ row.processDefinitionVersion }}</el-tag>

View File

@@ -16,20 +16,18 @@
@on-load="onLoad"
>
<template #menu="scope">
<el-button
<el-link
type="primary"
text
v-if="permission.work_done_detail"
@click.stop="handleDetail(scope.row)"
>详情
</el-button>
<el-button
</el-link>
<el-link
type="primary"
text
v-if="permission.work_done_follow"
@click.stop="handleImage(scope.row, scope.index)"
>流程图
</el-button>
</el-link>
</template>
<template #processDefinitionVersion="{ row }">
<el-tag>v{{ row.processDefinitionVersion }}</el-tag>

View File

@@ -16,20 +16,18 @@
@on-load="onLoad"
>
<template #menu="scope">
<el-button
<el-link
type="primary"
text
v-if="permission.work_send_detail"
@click.stop="handleDetail(scope.row)"
>详情
</el-button>
<el-button
</el-link>
<el-link
type="primary"
text
v-if="permission.work_send_follow"
@click.stop="handleImage(scope.row, scope.index)"
>流程图
</el-button>
</el-link>
</template>
<template #processDefinitionVersion="{ row }">
<el-tag>v{{ row.processDefinitionVersion }}</el-tag>

View File

@@ -22,20 +22,18 @@
</el-radio-group>
</template>
<template #menu="scope">
<el-button
<el-link
type="primary"
text
v-if="permission.work_start_flow"
@click.stop="handleStart(scope.row)"
>发起
</el-button>
<el-button
</el-link>
<el-link
type="primary"
text
v-if="permission.work_start_image"
@click.stop="handleImage(scope.row, scope.index)"
>流程图
</el-button>
</el-link>
</template>
<template #tenantId="{ row }">
<el-tag>{{ row.tenantId === '' ? '通用' : row.tenantId }}</el-tag>

View File

@@ -15,27 +15,24 @@
@on-load="onLoad"
>
<template #menu="scope">
<el-button
<el-link
type="primary"
text
v-if="permission.work_todo_handle"
@click.stop="handleWork(scope.row)"
>处理
</el-button>
<el-button
</el-link>
<el-link
type="primary"
text
v-if="permission.work_todo_detail"
@click.stop="handleDetail(scope.row)"
>详情
</el-button>
<el-button
</el-link>
<el-link
type="primary"
text
v-if="permission.work_todo_follow"
@click.stop="handleImage(scope.row, scope.index)"
>流程图
</el-button>
</el-link>
</template>
<template #processDefinitionVersion="{ row }">
<el-tag>v{{ row.processDefinitionVersion }}</el-tag>