Compare commits
136 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 799a87641e | |||
| 28baa69e8f | |||
| 4ed80268b4 | |||
| 30c59c2acb | |||
| 8388a55481 | |||
| 39560bde79 | |||
| 8e1430491b | |||
| 9fed3785d9 | |||
| eaf431819e | |||
| d95163663b | |||
| 5ce91ec5d5 | |||
| 8d85311bb3 | |||
| fe4255c59b | |||
| 083d954765 | |||
| 185a0f9aec | |||
| a528788409 | |||
| 72471f48de | |||
| 415e1fd58d | |||
| 114c2fd2af | |||
| 7ba6620f06 | |||
| 9a3652d767 | |||
| 450505715a | |||
| 9a603a3796 | |||
| 2b51619728 | |||
| 5f167aae50 | |||
| 0d8eb25253 | |||
| 74988c0b5e | |||
| e53852b05f | |||
| 8d3e87d710 | |||
| c7b07f0c95 | |||
| 4c117d87a5 | |||
| 59199397e0 | |||
| 70d49d022b | |||
| 7d16660bfc | |||
| d6bcb12c20 | |||
| e1d87f5788 | |||
| 56b8f68449 | |||
| 0ac17dea0b | |||
| 39e3115fbe | |||
| 9c0f7cb3f4 | |||
| 7b478bdbf2 | |||
| 87d6ff97a3 | |||
| e3bd44e8fc | |||
| 324daf9d4d | |||
| 37ac683fb4 | |||
| c402d68aea | |||
| e8f6311477 | |||
| fa78a68df6 | |||
| 320422856c | |||
| 0add4c5cdc | |||
| f6621392b1 | |||
| 2a5eca8393 | |||
| e4ae1d3c77 | |||
| 96783fcd7b | |||
| 372e8826a2 | |||
| 8d9fe998c0 | |||
| 92a8d4aab1 | |||
| 59a1ca8a0d | |||
| b9de34aa0e | |||
| 5544cfb3ca | |||
| fcd5ef7df9 | |||
| 489b406214 | |||
| 353148eb7f | |||
| 293b4fc6ce | |||
| 53b588063e | |||
| 0889f29c59 | |||
| f1c004813e | |||
| d67cf55491 | |||
| d7969c191a | |||
| 2f64abfc83 | |||
| a657b9d0ef | |||
| 9558426da1 | |||
| 6384e80758 | |||
| 3f019c9ac5 | |||
| e7c76c803f | |||
| eb32a275f3 | |||
| 9150213b0f | |||
| 90edc4b864 | |||
| 6a21b4ac8d | |||
| d05f8fd636 | |||
| d968c418a8 | |||
| d100e7a271 | |||
| 1c798046fd | |||
| 8d25e186b1 | |||
| c1863d0b6a | |||
| 4a0af452e8 | |||
| 447b2d9d76 | |||
| 603038d5ff | |||
| 673c47771b | |||
| 3168d365d0 | |||
| 5c97d3b5c5 | |||
| 09ce6472b0 | |||
| 5b435bef04 | |||
| d3af455374 | |||
| 0c4bb7cd82 | |||
| 4c9bbf1eb7 | |||
| 4e8163dd18 | |||
| 31794bf26a | |||
| 89bbc43f12 | |||
| 4199318aa9 | |||
| 555189177c | |||
| 1622015724 | |||
| 0e57de5c71 | |||
| 5cb7eb16d5 | |||
| ccaf944782 | |||
| aee661772b | |||
| bbe71e340a | |||
| 1ac741f785 | |||
| f7d8fbf16b | |||
| 912c1169a6 | |||
| 847f09b14d | |||
| 6596722601 | |||
| 2ae817ec38 | |||
| 6f2383a7e5 | |||
| 8db52ef168 | |||
| 38ca250242 | |||
| 73c12cc1c7 | |||
| f4542cd0b8 | |||
| 4b165471e3 | |||
| d1e779bbcc | |||
| 6d80ffde6c | |||
| acfbb4c54e | |||
| 44809ad303 | |||
| f440343830 | |||
| c1bc55e133 | |||
| baec42f876 | |||
| 4d3b6cdaed | |||
| 91cb3ee8c2 | |||
| b2a6d73bac | |||
| fb91768585 | |||
| 411fdd2425 | |||
| 7ea96bcdc0 | |||
| b7af496a43 | |||
| 9e5f53702f | |||
| 8640238cbe | |||
| ef1a43f947 |
@@ -2,6 +2,7 @@
|
|||||||
node_modules
|
node_modules
|
||||||
pnpm-lock.yaml
|
pnpm-lock.yaml
|
||||||
/dist
|
/dist
|
||||||
|
/dist.zip
|
||||||
|
|
||||||
/tests/e2e/videos/
|
/tests/e2e/videos/
|
||||||
/tests/e2e/screenshots/
|
/tests/e2e/screenshots/
|
||||||
|
|||||||
@@ -0,0 +1,31 @@
|
|||||||
|
# 2026-10-20
|
||||||
|
|
||||||
|
## settlement-import 列表页工具栏对齐 receipt-settlement
|
||||||
|
|
||||||
|
- `src/views/settlement/settlement-import.vue`:
|
||||||
|
- 左侧只保留「新增」(`type="primary"`),删掉原来的 `plain` 文字「刷新」按钮(刷新统一收进右侧图标组,与 receipt-settlement / settlement-adjustment 一致)。
|
||||||
|
- 右侧接入 `<settlement-table-tools>`(`./components/settlement-table-tools.vue`,即 `table-header-tools` 包装):刷新 / 列设置 / 搜索显隐 / 表格尺寸 4 键,`@refresh="refreshTable"`。
|
||||||
|
- 表格列改为配置化,新增 `src/option/settlement/settlementImportTable.js`(`settlementImportTableColumns`),页面加 `tableColumns / visibleColumnKeys / tableSize / columnSettingOptions / visibleTableColumns`,`el-table` 加 `:size="tableSize"`。
|
||||||
|
- 列渲染标志:`link / status / enum / billType / count`(注意**不能用 `type` 作 key**,`type` 是 el-table-column 真实 prop,会把列变成 selection/index 列)。
|
||||||
|
- 新增 `displayValue()`;`settlementBillTypeLabel('')` 返回 `-`。
|
||||||
|
- 序号列改 `fixed="left"`;数据列与操作列统一 `align: 'center'`,操作链接 `justify-content: center`。
|
||||||
|
- 校验方式(无 dev server 时):项目根目录临时 `sfc-check.mjs` 用 `vue/compiler-sfc` 的 `parse + compileTemplate + compileScript`;SCSS 用 `sass.compileString`。用完即删。
|
||||||
|
|
||||||
|
## 追加:用户要求「列显隐 + 显示方式」→ 两个页面改 avue-crud
|
||||||
|
|
||||||
|
用户反馈上面那版不对:右侧工具按钮必须是 **avue-crud 原生**的 4 键,第 2 键是「列显隐」抽屉(不是「列设置」勾选弹窗),第 4 键是「显示方式」(表格↔卡片),不是表格尺寸循环。确认后范围:`settlement-import` + `formal-settlement`(receipt/payment 共用)都改 avue-crud。
|
||||||
|
|
||||||
|
- 关键结论:**「列显隐 + 显示方式」只有 avue-crud 原生才有**,avue 的 `dialog-column` 依赖 `inject: ['crud']`,脱离 avue-crud 拿不出来;`table-header-tools` 只是仿制件,做不到。所以目标页只能整页改 avue-crud。
|
||||||
|
- avue 右侧按钮源码:`node_modules/@smallwei/avue/lib/packages/element-plus/crud/menu/header-menu3.js`(refreshBtn/columnBtn/searchBtn/gridBtn,`gridBtn` → `handleGridShow()` 切 `gridShow` 表格↔卡片);图标默认配置在同目录 `config.js`。
|
||||||
|
- 新增 `src/option/settlement/settlementImport.js`(`settlementImportOption`)、`src/option/settlement/formalSettlement.js`(`formalSettlementOption`,表格列复用 `formalSettlementTable.js` 的 `formalSettlementTableColumns` + `COLUMN_EXTRA` 增量配置,避免两处维护)。
|
||||||
|
- `settlement-import.vue` 整页改 avue-crud(删除手写的搜索区/表格/分页);`formal-settlement-table-panel.vue` 由 el-table 改成包一层 `<avue-crud>`,父页面保留数据加载与全部业务动作。
|
||||||
|
- ⚠️ **avue 的搜索自定义控件要用 `column.renderSearch`(`h()` 渲染),不能用 `searchslot`** —— avue 3.9.2 根本不读 `searchslot`(全库无此字段),而 `searchslot: true` 还会被 `header-search2.js` 的 `searchXxx → xxx` 映射成 `slot: true`。真正的搜索插槽是 avue-crud 上 `${prop}-search`(`crud.searchSlot`,见 `index2.js` `getSlotList(["-search"])`),但其作用域**没有 `row`**(只有 value/column/label/size/readonly/disabled/dic),`mileage-record.vue` 用 `{ row }` 是错的。已用于批次号下拉(filterable + allowCreate)。
|
||||||
|
- avue `formatter` 签名确认:`detail.js` → `column.formatter(row, row[column.prop], result, column)`。
|
||||||
|
- `on-load` 由 `table-page2.js` 在 created / 翻页 / 改页容量时触发,参数是内部 `defaultPage`(已 `Object.assign` 合并外部 page)。
|
||||||
|
- 分页透传写法(父持 page、子包 avue-crud):子组件用 computed `crudPage{get/set}`,setter 里 `Object.assign(this.page, value)` 原地回写,避免 prop 直接赋值告警。
|
||||||
|
- ⚠️ `src/option/settlement/formalSettlementTable.js` **不能删** —— `formal-settlement-editor.vue` 还从它导入 `candidateColumns/candidateDetailColumns/detailColumns/sourceColumns/summaryColumns`(我一度删掉,Vite 转换报错后从 HEAD 恢复)。
|
||||||
|
- 校验方式升级:沙箱里 curl 不通 dev server(502),改用 `vite.createServer({ middlewareMode:true })` + `server.transformRequest(path)` 就地转换,能同时暴露依赖解析失败(如上面误删文件)。脚本用完即删。
|
||||||
|
|
||||||
|
## 遗留未改(仍用 table-header-tools 仿制件)
|
||||||
|
|
||||||
|
pre-settlement、settlement-adjustment、receivable-payable-detail、transport-reconciliation-table-panel、business/{master-order,loading-manage,voucher-manage}、payment/* 手写页。若用户要全站一致,需逐页改 avue-crud。
|
||||||
@@ -69,6 +69,18 @@
|
|||||||
- 自检:`curl "localhost:2888/src/xxx.vue"` 与 `"...?vue&type=style&index=0&scoped=true&lang.scss"`(200 / 500)。`vite build` 在 `facelogin.vue` 被沙箱中断,不能作唯一校验。dev `VITE_APP_API=/api` 代理 `172.16.203.228:8000`。
|
- 自检:`curl "localhost:2888/src/xxx.vue"` 与 `"...?vue&type=style&index=0&scoped=true&lang.scss"`(200 / 500)。`vite build` 在 `facelogin.vue` 被沙箱中断,不能作唯一校验。dev `VITE_APP_API=/api` 代理 `172.16.203.228:8000`。
|
||||||
- 导出:前端 `exportColumns` 后端未用,以 `XxxExportExcel.java` 为准;BladeX `BeanUtil` 类型不兼容静默跳过(`Date` → `LocalDateTime` 丢值,用 `DateUtil.fromDate`)。
|
- 导出:前端 `exportColumns` 后端未用,以 `XxxExportExcel.java` 为准;BladeX `BeanUtil` 类型不兼容静默跳过(`Date` → `LocalDateTime` 丢值,用 `DateUtil.fromDate`)。
|
||||||
|
|
||||||
|
## avue-crud 才是「右侧 4 键」的唯一来源(2026-10-20 定论)
|
||||||
|
用户要的右侧工具栏是 **avue-crud 原生**:刷新 / **列显隐**(el-drawer,含 隐藏/冻结/过滤/排序 + 行拖拽)/ 搜索显隐 / **显示方式**(表格↔卡片)。
|
||||||
|
- 源码:`node_modules/@smallwei/avue/lib/packages/element-plus/crud/menu/header-menu3.js`(refreshBtn/columnBtn/searchBtn/gridBtn),`gridBtn` → `handleGridShow()` 切 `gridShow`;图标默认在同目录 `config.js`。「列显隐」文案来自 avue 语言包 `crud.showTitle`(项目 `src/lang/zh.js` 已覆盖)。
|
||||||
|
- **列显隐抽屉依赖 `inject: ['crud']`,脱离 avue-crud 拿不出来**;`components/table-header-tools` 的「列设置勾选弹窗 + 表格尺寸循环」是仿制件,**做不到这两点**。所以「要和 avue 一致」= 整页改用 avue-crud,没有中间方案。
|
||||||
|
- ⚠️ 搜索自定义控件用 `column.renderSearch = scope => h(...)`(`scope.row` 可用,同 `mixins/organization-search.js`)。**不要用 `searchslot`**:avue 3.9.2 全库无此字段,且 `header-search2.js` 的 `searchXxx → xxx` 映射会把 `searchslot` 变成 `slot: true`。
|
||||||
|
- avue-crud 上的 `${prop}-search` 插槽确实存在(`index2.js` 的 `getSlotList(["-search"])`),但**作用域没有 `row`**(只有 value/column/label/size/readonly/disabled/dic)——`mileage-record.vue` 里 `{ row }` 是错的写法,别照抄。
|
||||||
|
- `formatter` 签名:`detail.js` → `column.formatter(row, row[column.prop], result, column)`。
|
||||||
|
- `on-load` 由 `table-page2.js` 在 created / 翻页 / 改页容量时触发,参数是内部 `defaultPage`(已合并外部 page)。分页若由父组件持有、子组件包一层 avue-crud,用 computed `crudPage{get/set}` + setter 里 `Object.assign(this.page, value)` 原地回写。
|
||||||
|
- 已改:settlement-import.vue、formal-settlement.vue + components/formal-settlement-table-panel.vue(receipt/payment 共用)。未改:pre-settlement、settlement-adjustment、receivable-payable-detail、transport-reconciliation-table-panel、business 与 payment 的手写页。
|
||||||
|
- ⚠️ `src/option/settlement/formalSettlementTable.js` 别删:`formal-settlement-editor.vue` 还依赖它的 candidate/detail/source/summary 列。
|
||||||
|
- 沙箱里 curl 打不通本地 dev server(一律 502)。改用 `vite.createServer({middlewareMode:true})` + `server.transformRequest(path)` 就地转换校验,还能暴露依赖解析失败。
|
||||||
|
|
||||||
## Element Plus 图标两种用法的机制差异(易误判)
|
## Element Plus 图标两种用法的机制差异(易误判)
|
||||||
`main.js` 里 `for (...ElementPlusIconsVue) app.component(key, component)` 全局注册了全部图标,因此模板里可以写标签形式 `<Location />`(靠全局注册解析)。
|
`main.js` 里 `for (...ElementPlusIconsVue) app.component(key, component)` 全局注册了全部图标,因此模板里可以写标签形式 `<Location />`(靠全局注册解析)。
|
||||||
但 `:icon="OfficeBuilding"` 是**表达式**,编译成 `_ctx.OfficeBuilding`,只会从 data / props / computed / setup 返回值里取 —— **组件对象必须放进 `data()`**;放进 `components: {}` 注册里模板取不到,会静默渲染不出图标(不报错,只是空白)。
|
但 `:icon="OfficeBuilding"` 是**表达式**,编译成 `_ctx.OfficeBuilding`,只会从 data / props / computed / setup 返回值里取 —— **组件对象必须放进 `data()`**;放进 `components: {}` 注册里模板取不到,会静默渲染不出图标(不报错,只是空白)。
|
||||||
|
|||||||
+5
-4
@@ -4,10 +4,11 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite --host",
|
"dev": "vite --host",
|
||||||
"prod": "vite --mode production",
|
"prod": "vite --mode production",
|
||||||
"build": "vite build",
|
"build": "vite build && node scripts/zip-dist.mjs",
|
||||||
"build:prod": "vite build --mode production",
|
"build:prod": "vite build --mode production && node scripts/zip-dist.mjs",
|
||||||
|
"zip:dist": "node scripts/zip-dist.mjs",
|
||||||
"serve": "vite preview --host",
|
"serve": "vite preview --host",
|
||||||
"typecheck": "vue-tsc --noEmit"
|
"typecheck": "vue-tsc -p jsconfig.json --noEmit"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@element-plus/icons-vue": "^2.3.1",
|
"@element-plus/icons-vue": "^2.3.1",
|
||||||
@@ -48,7 +49,7 @@
|
|||||||
"prettier": "^2.8.7",
|
"prettier": "^2.8.7",
|
||||||
"sass": "^1.85.1",
|
"sass": "^1.85.1",
|
||||||
"terser": "^5.31.1",
|
"terser": "^5.31.1",
|
||||||
"typescript": "^7.0.2",
|
"typescript": "5.9.3",
|
||||||
"unplugin-auto-import": "^0.11.2",
|
"unplugin-auto-import": "^0.11.2",
|
||||||
"vite": "^5.4.19",
|
"vite": "^5.4.19",
|
||||||
"vite-plugin-compression": "^0.5.1",
|
"vite-plugin-compression": "^0.5.1",
|
||||||
|
|||||||
Generated
+94
-295
@@ -13,31 +13,31 @@ importers:
|
|||||||
dependencies:
|
dependencies:
|
||||||
'@element-plus/icons-vue':
|
'@element-plus/icons-vue':
|
||||||
specifier: ^2.3.1
|
specifier: ^2.3.1
|
||||||
version: 2.3.2(vue@3.5.34(typescript@7.0.2))
|
version: 2.3.2(vue@3.5.34(typescript@5.9.3))
|
||||||
'@open-file-viewer/core':
|
'@open-file-viewer/core':
|
||||||
specifier: ^0.1.27
|
specifier: ^0.1.27
|
||||||
version: 0.1.27(pdfjs-dist@6.1.200)
|
version: 0.1.27(pdfjs-dist@6.1.200)
|
||||||
'@open-file-viewer/vue':
|
'@open-file-viewer/vue':
|
||||||
specifier: ^0.1.27
|
specifier: ^0.1.27
|
||||||
version: 0.1.27(@open-file-viewer/core@0.1.27(pdfjs-dist@6.1.200))(vue@3.5.34(typescript@7.0.2))
|
version: 0.1.27(@open-file-viewer/core@0.1.27(pdfjs-dist@6.1.200))(vue@3.5.34(typescript@5.9.3))
|
||||||
'@saber/nf-design-base-elp':
|
'@saber/nf-design-base-elp':
|
||||||
specifier: ^1.3.0
|
specifier: ^1.3.0
|
||||||
version: 1.3.0
|
version: 1.3.0
|
||||||
'@saber/nf-form-design-elp':
|
'@saber/nf-form-design-elp':
|
||||||
specifier: ^1.6.1
|
specifier: ^1.6.1
|
||||||
version: 1.6.1(vue@3.5.34(typescript@7.0.2))
|
version: 1.6.1(vue@3.5.34(typescript@5.9.3))
|
||||||
'@saber/nf-form-elp':
|
'@saber/nf-form-elp':
|
||||||
specifier: ^1.6.3
|
specifier: ^1.6.3
|
||||||
version: 1.7.0
|
version: 1.7.0
|
||||||
'@smallwei/avue':
|
'@smallwei/avue':
|
||||||
specifier: ~3.9.2
|
specifier: ~3.9.2
|
||||||
version: 3.9.2(patch_hash=5ba15ad41b2c301250bf24adf39da2ed526b8375143da2c5a495361b29e862db)(@element-plus/icons-vue@2.3.2(vue@3.5.34(typescript@7.0.2)))(debug@4.4.3(supports-color@7.2.0))(element-plus@2.14.2(vue@3.5.34(typescript@7.0.2)))(vue@3.5.34(typescript@7.0.2))
|
version: 3.9.2(patch_hash=5ba15ad41b2c301250bf24adf39da2ed526b8375143da2c5a495361b29e862db)(@element-plus/icons-vue@2.3.2(vue@3.5.34(typescript@5.9.3)))(debug@4.4.3(supports-color@7.2.0))(element-plus@2.14.2(vue@3.5.34(typescript@5.9.3)))(vue@3.5.34(typescript@5.9.3))
|
||||||
animate.css:
|
animate.css:
|
||||||
specifier: ^4.1.1
|
specifier: ^4.1.1
|
||||||
version: 4.1.1
|
version: 4.1.1
|
||||||
avue-plugin-ueditor:
|
avue-plugin-ueditor:
|
||||||
specifier: ^1.0.4
|
specifier: ^1.0.4
|
||||||
version: 1.0.4(axios@1.16.0(debug@4.4.3(supports-color@7.2.0)))(vue@3.5.34(typescript@7.0.2))
|
version: 1.0.4(axios@1.16.0(debug@4.4.3(supports-color@7.2.0)))(vue@3.5.34(typescript@5.9.3))
|
||||||
axios:
|
axios:
|
||||||
specifier: ^1.13.5
|
specifier: ^1.13.5
|
||||||
version: 1.16.0(debug@4.4.3(supports-color@7.2.0))
|
version: 1.16.0(debug@4.4.3(supports-color@7.2.0))
|
||||||
@@ -58,7 +58,7 @@ importers:
|
|||||||
version: 6.1.0
|
version: 6.1.0
|
||||||
element-plus:
|
element-plus:
|
||||||
specifier: ^2.14.2
|
specifier: ^2.14.2
|
||||||
version: 2.14.2(vue@3.5.34(typescript@7.0.2))
|
version: 2.14.2(vue@3.5.34(typescript@5.9.3))
|
||||||
exceljs:
|
exceljs:
|
||||||
specifier: ^4.4.0
|
specifier: ^4.4.0
|
||||||
version: 4.4.0
|
version: 4.4.0
|
||||||
@@ -85,29 +85,29 @@ importers:
|
|||||||
version: 0.4.0
|
version: 0.4.0
|
||||||
vue:
|
vue:
|
||||||
specifier: ^3.5.13
|
specifier: ^3.5.13
|
||||||
version: 3.5.34(typescript@7.0.2)
|
version: 3.5.34(typescript@5.9.3)
|
||||||
vue-i18n:
|
vue-i18n:
|
||||||
specifier: ^11.4.2
|
specifier: ^11.4.2
|
||||||
version: 11.4.2(vue@3.5.34(typescript@7.0.2))
|
version: 11.4.2(vue@3.5.34(typescript@5.9.3))
|
||||||
vue-pdf-embed:
|
vue-pdf-embed:
|
||||||
specifier: ^2.1.6
|
specifier: ^2.1.6
|
||||||
version: 2.1.6(vue@3.5.34(typescript@7.0.2))
|
version: 2.1.6(vue@3.5.34(typescript@5.9.3))
|
||||||
vue-router:
|
vue-router:
|
||||||
specifier: ^4.3.2
|
specifier: ^4.3.2
|
||||||
version: 4.6.4(vue@3.5.34(typescript@7.0.2))
|
version: 4.6.4(vue@3.5.34(typescript@5.9.3))
|
||||||
vue3-clipboard:
|
vue3-clipboard:
|
||||||
specifier: ^1.0.0
|
specifier: ^1.0.0
|
||||||
version: 1.0.0(vue@3.5.34(typescript@7.0.2))
|
version: 1.0.0(vue@3.5.34(typescript@5.9.3))
|
||||||
vuex:
|
vuex:
|
||||||
specifier: ^4.1.0
|
specifier: ^4.1.0
|
||||||
version: 4.1.0(vue@3.5.34(typescript@7.0.2))
|
version: 4.1.0(vue@3.5.34(typescript@5.9.3))
|
||||||
xlsx:
|
xlsx:
|
||||||
specifier: 0.18.5
|
specifier: 0.18.5
|
||||||
version: 0.18.5
|
version: 0.18.5
|
||||||
devDependencies:
|
devDependencies:
|
||||||
'@vitejs/plugin-vue':
|
'@vitejs/plugin-vue':
|
||||||
specifier: ^5.2.4
|
specifier: ^5.2.4
|
||||||
version: 5.2.4(vite@5.4.21(sass@1.99.0)(terser@5.46.2))(vue@3.5.34(typescript@7.0.2))
|
version: 5.2.4(vite@5.4.21(sass@1.99.0)(terser@5.46.2))(vue@3.5.34(typescript@5.9.3))
|
||||||
'@vue/compiler-sfc':
|
'@vue/compiler-sfc':
|
||||||
specifier: ^3.4.27
|
specifier: ^3.4.27
|
||||||
version: 3.5.34
|
version: 3.5.34
|
||||||
@@ -121,11 +121,11 @@ importers:
|
|||||||
specifier: ^5.31.1
|
specifier: ^5.31.1
|
||||||
version: 5.46.2
|
version: 5.46.2
|
||||||
typescript:
|
typescript:
|
||||||
specifier: ^7.0.2
|
specifier: 5.9.3
|
||||||
version: 7.0.2
|
version: 5.9.3
|
||||||
unplugin-auto-import:
|
unplugin-auto-import:
|
||||||
specifier: ^0.11.2
|
specifier: ^0.11.2
|
||||||
version: 0.11.5(@vueuse/core@14.3.0(vue@3.5.34(typescript@7.0.2)))(rollup@4.60.3)
|
version: 0.11.5(@vueuse/core@14.3.0(vue@3.5.34(typescript@5.9.3)))(rollup@4.60.3)
|
||||||
vite:
|
vite:
|
||||||
specifier: ^5.4.19
|
specifier: ^5.4.19
|
||||||
version: 5.4.21(sass@1.99.0)(terser@5.46.2)
|
version: 5.4.21(sass@1.99.0)(terser@5.46.2)
|
||||||
@@ -137,7 +137,7 @@ importers:
|
|||||||
version: 0.4.0(vite@5.4.21(sass@1.99.0)(terser@5.46.2))
|
version: 0.4.0(vite@5.4.21(sass@1.99.0)(terser@5.46.2))
|
||||||
vue-tsc:
|
vue-tsc:
|
||||||
specifier: ^3.3.11
|
specifier: ^3.3.11
|
||||||
version: 3.3.13(typescript@7.0.2)
|
version: 3.3.13(typescript@5.9.3)
|
||||||
|
|
||||||
packages:
|
packages:
|
||||||
|
|
||||||
@@ -771,126 +771,6 @@ packages:
|
|||||||
'@types/web-bluetooth@0.0.21':
|
'@types/web-bluetooth@0.0.21':
|
||||||
resolution: {integrity: sha512-oIQLCGWtcFZy2JW77j9k8nHzAOpqMHLQejDA48XXMWH6tjCQHz5RCFz1bzsmROyL6PUm+LLnUiI4BCn221inxA==}
|
resolution: {integrity: sha512-oIQLCGWtcFZy2JW77j9k8nHzAOpqMHLQejDA48XXMWH6tjCQHz5RCFz1bzsmROyL6PUm+LLnUiI4BCn221inxA==}
|
||||||
|
|
||||||
'@typescript/typescript-aix-ppc64@7.0.2':
|
|
||||||
resolution: {integrity: sha512-MTKKkWB7p/0E9xi1d1tHtZ5PiLkGEMIq88pK2CubZjOsLtYTLqhgIgi6zepFa+9GHZ6h05NMCkQxGKiPXMxXtQ==}
|
|
||||||
engines: {node: '>=16.20.0'}
|
|
||||||
cpu: [ppc64]
|
|
||||||
os: [aix]
|
|
||||||
|
|
||||||
'@typescript/typescript-darwin-arm64@7.0.2':
|
|
||||||
resolution: {integrity: sha512-gowzar9MwS/aRWp6f3a4KUqzRjAZjOsmGNCM6LcTgXum+dBfgsBVMN+AgvOCCbguXyick6LJhpBszxMebJ8syA==}
|
|
||||||
engines: {node: '>=16.20.0'}
|
|
||||||
cpu: [arm64]
|
|
||||||
os: [darwin]
|
|
||||||
|
|
||||||
'@typescript/typescript-darwin-x64@7.0.2':
|
|
||||||
resolution: {integrity: sha512-SZ9xZInqApNlNGc9s0W1VSsktYSOe9cFqNOIqmN1Gs8SmkjKZYFt017G4VwPxASInODuAdbTW7sXiFUf893RgA==}
|
|
||||||
engines: {node: '>=16.20.0'}
|
|
||||||
cpu: [x64]
|
|
||||||
os: [darwin]
|
|
||||||
|
|
||||||
'@typescript/typescript-freebsd-arm64@7.0.2':
|
|
||||||
resolution: {integrity: sha512-W5NH4y/J0plIIS5b2xvTEkU7JFxyqdMAOgf+Ilhl0vHQXKO5dZoxd+C/jEtq56c4F3wk71RB4BMRQ2XdI+bwYQ==}
|
|
||||||
engines: {node: '>=16.20.0'}
|
|
||||||
cpu: [arm64]
|
|
||||||
os: [freebsd]
|
|
||||||
|
|
||||||
'@typescript/typescript-freebsd-x64@7.0.2':
|
|
||||||
resolution: {integrity: sha512-UMGDx5sTpzNw3WiPebH7l90IWfJggEd+egHt/q6p7/Cm3zqoV7VxkGXt+3DxPIw8CcmvAB0j3sVVfbhX+M4Tpw==}
|
|
||||||
engines: {node: '>=16.20.0'}
|
|
||||||
cpu: [x64]
|
|
||||||
os: [freebsd]
|
|
||||||
|
|
||||||
'@typescript/typescript-linux-arm64@7.0.2':
|
|
||||||
resolution: {integrity: sha512-Qh4eU4/y3yDjnfjjyPYihMj5/ODIlmt+Bzu17OI+fiSRDW57QmU5SiN63exPRNJPKUzcc1INa1NXdrJ+MqHjUQ==}
|
|
||||||
engines: {node: '>=16.20.0'}
|
|
||||||
cpu: [arm64]
|
|
||||||
os: [linux]
|
|
||||||
|
|
||||||
'@typescript/typescript-linux-arm@7.0.2':
|
|
||||||
resolution: {integrity: sha512-gffT3xPz9sR7j/YJExkyPntrI0P2EP9XbOyWzth2/Gs0RstK+90RBcO0ncXoXy/beYll1SXw846Nf2zdnEz0QQ==}
|
|
||||||
engines: {node: '>=16.20.0'}
|
|
||||||
cpu: [arm]
|
|
||||||
os: [linux]
|
|
||||||
|
|
||||||
'@typescript/typescript-linux-loong64@7.0.2':
|
|
||||||
resolution: {integrity: sha512-uEHck9i8hoAzXPiYRib1O7miOnz23SxIeVl6F4LXox+qov1K35jHcEW6VHKvZI+pyvl7fZEP4MCU5LYvIq1GuQ==}
|
|
||||||
engines: {node: '>=16.20.0'}
|
|
||||||
cpu: [loong64]
|
|
||||||
os: [linux]
|
|
||||||
|
|
||||||
'@typescript/typescript-linux-mips64el@7.0.2':
|
|
||||||
resolution: {integrity: sha512-R4KvAMnE43W5Qeqb0Ly56O3mWMWIAgsMyz36DCaycd5nbg/9kzm0liw3JocfRqyJY0KPmzFjbswozXyW0DnIYA==}
|
|
||||||
engines: {node: '>=16.20.0'}
|
|
||||||
cpu: [mips64el]
|
|
||||||
os: [linux]
|
|
||||||
|
|
||||||
'@typescript/typescript-linux-ppc64@7.0.2':
|
|
||||||
resolution: {integrity: sha512-DORx5b3sd/4S7eayxm4FQv+A7CrkUIGRaHiwI8oiHTAI1fAPWhF4J0vAlkC8biAlHSVVwxMQ3tjZ2/DVbnQiiA==}
|
|
||||||
engines: {node: '>=16.20.0'}
|
|
||||||
cpu: [ppc64]
|
|
||||||
os: [linux]
|
|
||||||
|
|
||||||
'@typescript/typescript-linux-riscv64@7.0.2':
|
|
||||||
resolution: {integrity: sha512-wf0jqEDOjrPRnKwYRyyJDRo11KMbvMFrU+q4zqKyChODBzvlkbhNQfKvLxQCcwTpdDaXSHZTVuh0JoCrKCUMHQ==}
|
|
||||||
engines: {node: '>=16.20.0'}
|
|
||||||
cpu: [riscv64]
|
|
||||||
os: [linux]
|
|
||||||
|
|
||||||
'@typescript/typescript-linux-s390x@7.0.2':
|
|
||||||
resolution: {integrity: sha512-IkwJc3L7yhytWd/ewjyxNDfOmswCm9GWMJT/ue/dU4aZNbwZeYAetq42VyLmsmSjvoX7z74X6ZaYCtzAr0EuGw==}
|
|
||||||
engines: {node: '>=16.20.0'}
|
|
||||||
cpu: [s390x]
|
|
||||||
os: [linux]
|
|
||||||
|
|
||||||
'@typescript/typescript-linux-x64@7.0.2':
|
|
||||||
resolution: {integrity: sha512-EYdf2cNg7rgCWJnxCdJ+F3V39O8ihb37eHAu1LK8oAFizgTQbPOK7zHHXbPt8rX24COqODXeI3sIf0fCXG7H/A==}
|
|
||||||
engines: {node: '>=16.20.0'}
|
|
||||||
cpu: [x64]
|
|
||||||
os: [linux]
|
|
||||||
|
|
||||||
'@typescript/typescript-netbsd-arm64@7.0.2':
|
|
||||||
resolution: {integrity: sha512-+polYF4MF04aPpO5FTkHran9yUQDSXqy5GiSDKpsll5jy3l3+g9QLhpf39T+ePtefhXLOGrLl0QIjkQP6VnelA==}
|
|
||||||
engines: {node: '>=16.20.0'}
|
|
||||||
cpu: [arm64]
|
|
||||||
os: [netbsd]
|
|
||||||
|
|
||||||
'@typescript/typescript-netbsd-x64@7.0.2':
|
|
||||||
resolution: {integrity: sha512-8YIT0EHM/3dq10ZOVF/A7pc/YSMtbcecct4rWtexrnSCHOPcpC2KTLXfTCR6vDpnSiY12heNb1GiN/wu+T/FyA==}
|
|
||||||
engines: {node: '>=16.20.0'}
|
|
||||||
cpu: [x64]
|
|
||||||
os: [netbsd]
|
|
||||||
|
|
||||||
'@typescript/typescript-openbsd-arm64@7.0.2':
|
|
||||||
resolution: {integrity: sha512-APT8+ClYnuYm1u9+kgGXoMj2VzWzcymwh2gNSQVySHfkRDGOTVkoWLjCmOQSaO+PoqQ57B0flRp9SA+7GnnkzQ==}
|
|
||||||
engines: {node: '>=16.20.0'}
|
|
||||||
cpu: [arm64]
|
|
||||||
os: [openbsd]
|
|
||||||
|
|
||||||
'@typescript/typescript-openbsd-x64@7.0.2':
|
|
||||||
resolution: {integrity: sha512-yX7s+Q0Dln0Dt9tEzZsAjXXR/+ytBM7AlglaqyeMPxQszJ1JhlJdZ6jLA+IzldHtflX81em7lDao1xXu+aRRkg==}
|
|
||||||
engines: {node: '>=16.20.0'}
|
|
||||||
cpu: [x64]
|
|
||||||
os: [openbsd]
|
|
||||||
|
|
||||||
'@typescript/typescript-sunos-x64@7.0.2':
|
|
||||||
resolution: {integrity: sha512-dLJDGaLZ1D4HPQn62u1n8mBDkJREwMsAkCdkwd4Ieqw+x3TUyTsqY0YiBCtE6H6OzzgGk3iuZ3vFWRS+E8/d1g==}
|
|
||||||
engines: {node: '>=16.20.0'}
|
|
||||||
cpu: [x64]
|
|
||||||
os: [sunos]
|
|
||||||
|
|
||||||
'@typescript/typescript-win32-arm64@7.0.2':
|
|
||||||
resolution: {integrity: sha512-Gyl1Vy6OsWesLzmq+EP0Fb7b4Nid5232AvcA2SFcdYreldpNtYFFofPjnt62y9hQy7VTaZp65ICJjuAQRaVcIQ==}
|
|
||||||
engines: {node: '>=16.20.0'}
|
|
||||||
cpu: [arm64]
|
|
||||||
os: [win32]
|
|
||||||
|
|
||||||
'@typescript/typescript-win32-x64@7.0.2':
|
|
||||||
resolution: {integrity: sha512-0BQ3HkAHHlKLSp1qRvf3SUhGpGsDuhB/jgFw75guyqbxJqEaS0Cw/VFO8i2nHglJUzQCRtMMR/IBAKE3ETMC4g==}
|
|
||||||
engines: {node: '>=16.20.0'}
|
|
||||||
cpu: [x64]
|
|
||||||
os: [win32]
|
|
||||||
|
|
||||||
'@uppy/companion-client@2.2.2':
|
'@uppy/companion-client@2.2.2':
|
||||||
resolution: {integrity: sha512-5mTp2iq97/mYSisMaBtFRry6PTgZA6SIL7LePteOV5x0/DxKfrZW3DEiQERJmYpHzy7k8johpm2gHnEKto56Og==}
|
resolution: {integrity: sha512-5mTp2iq97/mYSisMaBtFRry6PTgZA6SIL7LePteOV5x0/DxKfrZW3DEiQERJmYpHzy7k8johpm2gHnEKto56Og==}
|
||||||
|
|
||||||
@@ -2194,9 +2074,9 @@ packages:
|
|||||||
typedarray@0.0.6:
|
typedarray@0.0.6:
|
||||||
resolution: {integrity: sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==}
|
resolution: {integrity: sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==}
|
||||||
|
|
||||||
typescript@7.0.2:
|
typescript@5.9.3:
|
||||||
resolution: {integrity: sha512-8FYau96o3NKOhbjKi/qNvG/W5jhzxkbdm5sj9AbZ/5T5sWqn3hJgLfGx27sRKZWTvyzCP8dLRBTf5tBTSRVUNA==}
|
resolution: {integrity: sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==}
|
||||||
engines: {node: '>=16.20.0'}
|
engines: {node: '>=14.17'}
|
||||||
hasBin: true
|
hasBin: true
|
||||||
|
|
||||||
ufo@1.6.4:
|
ufo@1.6.4:
|
||||||
@@ -2408,9 +2288,9 @@ snapshots:
|
|||||||
|
|
||||||
'@ctrl/tinycolor@4.2.0': {}
|
'@ctrl/tinycolor@4.2.0': {}
|
||||||
|
|
||||||
'@element-plus/icons-vue@2.3.2(vue@3.5.34(typescript@7.0.2))':
|
'@element-plus/icons-vue@2.3.2(vue@3.5.34(typescript@5.9.3))':
|
||||||
dependencies:
|
dependencies:
|
||||||
vue: 3.5.34(typescript@7.0.2)
|
vue: 3.5.34(typescript@5.9.3)
|
||||||
|
|
||||||
'@esbuild/aix-ppc64@0.21.5':
|
'@esbuild/aix-ppc64@0.21.5':
|
||||||
optional: true
|
optional: true
|
||||||
@@ -2651,10 +2531,10 @@ snapshots:
|
|||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- geotiff
|
- geotiff
|
||||||
|
|
||||||
'@open-file-viewer/vue@0.1.27(@open-file-viewer/core@0.1.27(pdfjs-dist@6.1.200))(vue@3.5.34(typescript@7.0.2))':
|
'@open-file-viewer/vue@0.1.27(@open-file-viewer/core@0.1.27(pdfjs-dist@6.1.200))(vue@3.5.34(typescript@5.9.3))':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@open-file-viewer/core': 0.1.27(pdfjs-dist@6.1.200)
|
'@open-file-viewer/core': 0.1.27(pdfjs-dist@6.1.200)
|
||||||
vue: 3.5.34(typescript@7.0.2)
|
vue: 3.5.34(typescript@5.9.3)
|
||||||
|
|
||||||
'@parcel/watcher-android-arm64@2.5.6':
|
'@parcel/watcher-android-arm64@2.5.6':
|
||||||
optional: true
|
optional: true
|
||||||
@@ -2806,9 +2686,9 @@ snapshots:
|
|||||||
codemirror: 5.65.21
|
codemirror: 5.65.21
|
||||||
randomcolor: 0.6.2
|
randomcolor: 0.6.2
|
||||||
|
|
||||||
'@saber/nf-form-design-elp@1.6.1(vue@3.5.34(typescript@7.0.2))':
|
'@saber/nf-form-design-elp@1.6.1(vue@3.5.34(typescript@5.9.3))':
|
||||||
dependencies:
|
dependencies:
|
||||||
vuedraggable: 4.1.0(vue@3.5.34(typescript@7.0.2))
|
vuedraggable: 4.1.0(vue@3.5.34(typescript@5.9.3))
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- vue
|
- vue
|
||||||
|
|
||||||
@@ -2820,16 +2700,16 @@ snapshots:
|
|||||||
countup.js: 2.10.0
|
countup.js: 2.10.0
|
||||||
signature_pad: 5.1.3
|
signature_pad: 5.1.3
|
||||||
|
|
||||||
'@smallwei/avue@3.9.2(patch_hash=5ba15ad41b2c301250bf24adf39da2ed526b8375143da2c5a495361b29e862db)(@element-plus/icons-vue@2.3.2(vue@3.5.34(typescript@7.0.2)))(debug@4.4.3(supports-color@7.2.0))(element-plus@2.14.2(vue@3.5.34(typescript@7.0.2)))(vue@3.5.34(typescript@7.0.2))':
|
'@smallwei/avue@3.9.2(patch_hash=5ba15ad41b2c301250bf24adf39da2ed526b8375143da2c5a495361b29e862db)(@element-plus/icons-vue@2.3.2(vue@3.5.34(typescript@5.9.3)))(debug@4.4.3(supports-color@7.2.0))(element-plus@2.14.2(vue@3.5.34(typescript@5.9.3)))(vue@3.5.34(typescript@5.9.3))':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@element-plus/icons-vue': 2.3.2(vue@3.5.34(typescript@7.0.2))
|
'@element-plus/icons-vue': 2.3.2(vue@3.5.34(typescript@5.9.3))
|
||||||
axios: 0.21.4(debug@4.4.3(supports-color@7.2.0))
|
axios: 0.21.4(debug@4.4.3(supports-color@7.2.0))
|
||||||
countup.js: 1.9.3
|
countup.js: 1.9.3
|
||||||
dayjs: 1.11.20
|
dayjs: 1.11.20
|
||||||
element-plus: 2.14.2(vue@3.5.34(typescript@7.0.2))
|
element-plus: 2.14.2(vue@3.5.34(typescript@5.9.3))
|
||||||
lodash: 4.18.1
|
lodash: 4.18.1
|
||||||
lodash-es: 4.18.1
|
lodash-es: 4.18.1
|
||||||
vue: 3.5.34(typescript@7.0.2)
|
vue: 3.5.34(typescript@5.9.3)
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- debug
|
- debug
|
||||||
|
|
||||||
@@ -2856,66 +2736,6 @@ snapshots:
|
|||||||
|
|
||||||
'@types/web-bluetooth@0.0.21': {}
|
'@types/web-bluetooth@0.0.21': {}
|
||||||
|
|
||||||
'@typescript/typescript-aix-ppc64@7.0.2':
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
'@typescript/typescript-darwin-arm64@7.0.2':
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
'@typescript/typescript-darwin-x64@7.0.2':
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
'@typescript/typescript-freebsd-arm64@7.0.2':
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
'@typescript/typescript-freebsd-x64@7.0.2':
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
'@typescript/typescript-linux-arm64@7.0.2':
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
'@typescript/typescript-linux-arm@7.0.2':
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
'@typescript/typescript-linux-loong64@7.0.2':
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
'@typescript/typescript-linux-mips64el@7.0.2':
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
'@typescript/typescript-linux-ppc64@7.0.2':
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
'@typescript/typescript-linux-riscv64@7.0.2':
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
'@typescript/typescript-linux-s390x@7.0.2':
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
'@typescript/typescript-linux-x64@7.0.2':
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
'@typescript/typescript-netbsd-arm64@7.0.2':
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
'@typescript/typescript-netbsd-x64@7.0.2':
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
'@typescript/typescript-openbsd-arm64@7.0.2':
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
'@typescript/typescript-openbsd-x64@7.0.2':
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
'@typescript/typescript-sunos-x64@7.0.2':
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
'@typescript/typescript-win32-arm64@7.0.2':
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
'@typescript/typescript-win32-x64@7.0.2':
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
'@uppy/companion-client@2.2.2':
|
'@uppy/companion-client@2.2.2':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@uppy/utils': 4.1.3
|
'@uppy/utils': 4.1.3
|
||||||
@@ -2945,10 +2765,10 @@ snapshots:
|
|||||||
'@uppy/utils': 4.1.3
|
'@uppy/utils': 4.1.3
|
||||||
nanoid: 3.3.12
|
nanoid: 3.3.12
|
||||||
|
|
||||||
'@vitejs/plugin-vue@5.2.4(vite@5.4.21(sass@1.99.0)(terser@5.46.2))(vue@3.5.34(typescript@7.0.2))':
|
'@vitejs/plugin-vue@5.2.4(vite@5.4.21(sass@1.99.0)(terser@5.46.2))(vue@3.5.34(typescript@5.9.3))':
|
||||||
dependencies:
|
dependencies:
|
||||||
vite: 5.4.21(sass@1.99.0)(terser@5.46.2)
|
vite: 5.4.21(sass@1.99.0)(terser@5.46.2)
|
||||||
vue: 3.5.34(typescript@7.0.2)
|
vue: 3.5.34(typescript@5.9.3)
|
||||||
|
|
||||||
'@volar/language-core@2.4.28':
|
'@volar/language-core@2.4.28':
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -2956,13 +2776,13 @@ snapshots:
|
|||||||
|
|
||||||
'@volar/source-map@2.4.28': {}
|
'@volar/source-map@2.4.28': {}
|
||||||
|
|
||||||
'@volar/typescript@2.4.28(typescript@7.0.2)':
|
'@volar/typescript@2.4.28(typescript@5.9.3)':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@volar/language-core': 2.4.28
|
'@volar/language-core': 2.4.28
|
||||||
path-browserify: 1.0.1
|
path-browserify: 1.0.1
|
||||||
vscode-uri: 3.2.0
|
vscode-uri: 3.2.0
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
typescript: 7.0.2
|
typescript: 5.9.3
|
||||||
|
|
||||||
'@vue/compiler-core@3.5.34':
|
'@vue/compiler-core@3.5.34':
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -3022,51 +2842,51 @@ snapshots:
|
|||||||
'@vue/shared': 3.5.34
|
'@vue/shared': 3.5.34
|
||||||
csstype: 3.2.3
|
csstype: 3.2.3
|
||||||
|
|
||||||
'@vue/server-renderer@3.5.34(vue@3.5.34(typescript@7.0.2))':
|
'@vue/server-renderer@3.5.34(vue@3.5.34(typescript@5.9.3))':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@vue/compiler-ssr': 3.5.34
|
'@vue/compiler-ssr': 3.5.34
|
||||||
'@vue/shared': 3.5.34
|
'@vue/shared': 3.5.34
|
||||||
vue: 3.5.34(typescript@7.0.2)
|
vue: 3.5.34(typescript@5.9.3)
|
||||||
|
|
||||||
'@vue/shared@3.5.34': {}
|
'@vue/shared@3.5.34': {}
|
||||||
|
|
||||||
'@vueuse/core@14.3.0(vue@3.5.34(typescript@7.0.2))':
|
'@vueuse/core@14.3.0(vue@3.5.34(typescript@5.9.3))':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@types/web-bluetooth': 0.0.21
|
'@types/web-bluetooth': 0.0.21
|
||||||
'@vueuse/metadata': 14.3.0
|
'@vueuse/metadata': 14.3.0
|
||||||
'@vueuse/shared': 14.3.0(vue@3.5.34(typescript@7.0.2))
|
'@vueuse/shared': 14.3.0(vue@3.5.34(typescript@5.9.3))
|
||||||
vue: 3.5.34(typescript@7.0.2)
|
vue: 3.5.34(typescript@5.9.3)
|
||||||
|
|
||||||
'@vueuse/metadata@14.3.0': {}
|
'@vueuse/metadata@14.3.0': {}
|
||||||
|
|
||||||
'@vueuse/shared@14.3.0(vue@3.5.34(typescript@7.0.2))':
|
'@vueuse/shared@14.3.0(vue@3.5.34(typescript@5.9.3))':
|
||||||
dependencies:
|
dependencies:
|
||||||
vue: 3.5.34(typescript@7.0.2)
|
vue: 3.5.34(typescript@5.9.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@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@5.1.11)(slate@0.123.0)(snabbdom@3.6.3))(dom7@3.0.0)(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@4.0.6)(lodash.throttle@4.1.1)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3)':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@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@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: 3.0.0
|
dom7: 4.0.6
|
||||||
is-url: 1.2.4
|
is-url: 1.2.4
|
||||||
lodash.throttle: 4.1.1
|
lodash.throttle: 4.1.1
|
||||||
nanoid: 5.1.11
|
nanoid: 5.1.11
|
||||||
slate: 0.123.0
|
slate: 0.123.0
|
||||||
snabbdom: 3.6.3
|
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@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@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/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:
|
dependencies:
|
||||||
'@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@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
|
dom7: 4.0.6
|
||||||
prismjs: 1.30.0
|
prismjs: 1.30.0
|
||||||
slate: 0.123.0
|
slate: 0.123.0
|
||||||
snabbdom: 3.6.3
|
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@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)':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@types/event-emitter': 0.3.5
|
'@types/event-emitter': 0.3.5
|
||||||
'@uppy/core': 2.3.4
|
'@uppy/core': 2.3.4
|
||||||
'@uppy/xhr-upload': 2.1.3(@uppy/core@2.3.4)
|
'@uppy/xhr-upload': 2.1.3(@uppy/core@2.3.4)
|
||||||
dom7: 3.0.0
|
dom7: 4.0.6
|
||||||
event-emitter: 0.3.5
|
event-emitter: 0.3.5
|
||||||
html-void-elements: 3.0.0
|
html-void-elements: 3.0.0
|
||||||
i18next: 23.16.8
|
i18next: 23.16.8
|
||||||
@@ -3087,13 +2907,13 @@ snapshots:
|
|||||||
dependencies:
|
dependencies:
|
||||||
'@uppy/core': 2.3.4
|
'@uppy/core': 2.3.4
|
||||||
'@uppy/xhr-upload': 2.1.3(@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@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@5.1.11)(slate@0.123.0)(snabbdom@3.6.3))(dom7@3.0.0)(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@4.0.6)(lodash.throttle@4.1.1)(nanoid@5.1.11)(slate@0.123.0)(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@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@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/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@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@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/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@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@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/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@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@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/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@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@5.1.11)(slate@0.123.0)(snabbdom@3.6.3))(dom7@3.0.0)(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@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@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)
|
'@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)
|
||||||
'@wangeditor-next/video-module': 2.0.0(@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@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@5.1.11)(slate@0.123.0)(snabbdom@3.6.3))(dom7@4.0.6)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3)
|
'@wangeditor-next/video-module': 2.0.0(@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))(dom7@4.0.6)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3)
|
||||||
dom7: 4.0.6
|
dom7: 4.0.6
|
||||||
is-hotkey: 0.2.0
|
is-hotkey: 0.2.0
|
||||||
lodash.camelcase: 4.3.0
|
lodash.camelcase: 4.3.0
|
||||||
@@ -3106,16 +2926,16 @@ snapshots:
|
|||||||
slate: 0.123.0
|
slate: 0.123.0
|
||||||
snabbdom: 3.6.3
|
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@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@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/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:
|
dependencies:
|
||||||
'@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@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
|
dom7: 4.0.6
|
||||||
slate: 0.123.0
|
slate: 0.123.0
|
||||||
snabbdom: 3.6.3
|
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@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@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/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:
|
dependencies:
|
||||||
'@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@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
|
dom7: 4.0.6
|
||||||
lodash.debounce: 4.0.8
|
lodash.debounce: 4.0.8
|
||||||
lodash.throttle: 4.1.1
|
lodash.throttle: 4.1.1
|
||||||
@@ -3123,22 +2943,22 @@ snapshots:
|
|||||||
slate: 0.123.0
|
slate: 0.123.0
|
||||||
snabbdom: 3.6.3
|
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@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@5.1.11)(slate@0.123.0)(snabbdom@3.6.3))(dom7@3.0.0)(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@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@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)':
|
'@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)':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@uppy/core': 2.3.4
|
'@uppy/core': 2.3.4
|
||||||
'@uppy/xhr-upload': 2.1.3(@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@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@5.1.11)(slate@0.123.0)(snabbdom@3.6.3))(dom7@3.0.0)(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@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@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@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
|
dom7: 4.0.6
|
||||||
lodash.foreach: 4.5.0
|
lodash.foreach: 4.5.0
|
||||||
slate: 0.123.0
|
slate: 0.123.0
|
||||||
snabbdom: 3.6.3
|
snabbdom: 3.6.3
|
||||||
|
|
||||||
'@wangeditor-next/video-module@2.0.0(@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@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@5.1.11)(slate@0.123.0)(snabbdom@3.6.3))(dom7@4.0.6)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3)':
|
'@wangeditor-next/video-module@2.0.0(@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))(dom7@4.0.6)(nanoid@5.1.11)(slate@0.123.0)(snabbdom@3.6.3)':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@uppy/core': 2.3.4
|
'@uppy/core': 2.3.4
|
||||||
'@uppy/xhr-upload': 2.1.3(@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@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@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
|
dom7: 4.0.6
|
||||||
nanoid: 5.1.11
|
nanoid: 5.1.11
|
||||||
slate: 0.123.0
|
slate: 0.123.0
|
||||||
@@ -3185,10 +3005,10 @@ snapshots:
|
|||||||
slate-history: 0.66.0(slate@0.72.8)
|
slate-history: 0.66.0(slate@0.72.8)
|
||||||
snabbdom: 3.6.3
|
snabbdom: 3.6.3
|
||||||
|
|
||||||
'@wangeditor/editor-for-vue@5.1.12(@wangeditor/editor@5.1.23)(vue@3.5.34(typescript@7.0.2))':
|
'@wangeditor/editor-for-vue@5.1.12(@wangeditor/editor@5.1.23)(vue@3.5.34(typescript@5.9.3))':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@wangeditor/editor': 5.1.23
|
'@wangeditor/editor': 5.1.23
|
||||||
vue: 3.5.34(typescript@7.0.2)
|
vue: 3.5.34(typescript@5.9.3)
|
||||||
|
|
||||||
'@wangeditor/editor@5.1.23':
|
'@wangeditor/editor@5.1.23':
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -3317,12 +3137,12 @@ snapshots:
|
|||||||
|
|
||||||
asynckit@0.4.0: {}
|
asynckit@0.4.0: {}
|
||||||
|
|
||||||
avue-plugin-ueditor@1.0.4(axios@1.16.0(debug@4.4.3(supports-color@7.2.0)))(vue@3.5.34(typescript@7.0.2)):
|
avue-plugin-ueditor@1.0.4(axios@1.16.0(debug@4.4.3(supports-color@7.2.0)))(vue@3.5.34(typescript@5.9.3)):
|
||||||
dependencies:
|
dependencies:
|
||||||
'@wangeditor/editor': 5.1.23
|
'@wangeditor/editor': 5.1.23
|
||||||
'@wangeditor/editor-for-vue': 5.1.12(@wangeditor/editor@5.1.23)(vue@3.5.34(typescript@7.0.2))
|
'@wangeditor/editor-for-vue': 5.1.12(@wangeditor/editor@5.1.23)(vue@3.5.34(typescript@5.9.3))
|
||||||
axios: 1.16.0(debug@4.4.3(supports-color@7.2.0))
|
axios: 1.16.0(debug@4.4.3(supports-color@7.2.0))
|
||||||
vue: 3.5.34(typescript@7.0.2)
|
vue: 3.5.34(typescript@5.9.3)
|
||||||
|
|
||||||
axios@0.21.4(debug@4.4.3(supports-color@7.2.0)):
|
axios@0.21.4(debug@4.4.3(supports-color@7.2.0)):
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -3575,15 +3395,15 @@ snapshots:
|
|||||||
tslib: 2.3.0
|
tslib: 2.3.0
|
||||||
zrender: 6.1.0
|
zrender: 6.1.0
|
||||||
|
|
||||||
element-plus@2.14.2(vue@3.5.34(typescript@7.0.2)):
|
element-plus@2.14.2(vue@3.5.34(typescript@5.9.3)):
|
||||||
dependencies:
|
dependencies:
|
||||||
'@ctrl/tinycolor': 4.2.0
|
'@ctrl/tinycolor': 4.2.0
|
||||||
'@element-plus/icons-vue': 2.3.2(vue@3.5.34(typescript@7.0.2))
|
'@element-plus/icons-vue': 2.3.2(vue@3.5.34(typescript@5.9.3))
|
||||||
'@floating-ui/dom': 1.7.6
|
'@floating-ui/dom': 1.7.6
|
||||||
'@popperjs/core': '@sxzz/popperjs-es@2.11.8'
|
'@popperjs/core': '@sxzz/popperjs-es@2.11.8'
|
||||||
'@types/lodash': 4.17.24
|
'@types/lodash': 4.17.24
|
||||||
'@types/lodash-es': 4.17.12
|
'@types/lodash-es': 4.17.12
|
||||||
'@vueuse/core': 14.3.0(vue@3.5.34(typescript@7.0.2))
|
'@vueuse/core': 14.3.0(vue@3.5.34(typescript@5.9.3))
|
||||||
async-validator: 4.2.5
|
async-validator: 4.2.5
|
||||||
dayjs: 1.11.20
|
dayjs: 1.11.20
|
||||||
lodash: 4.18.1
|
lodash: 4.18.1
|
||||||
@@ -3591,7 +3411,7 @@ snapshots:
|
|||||||
lodash-unified: 1.0.3(@types/lodash-es@4.17.12)(lodash-es@4.18.1)(lodash@4.18.1)
|
lodash-unified: 1.0.3(@types/lodash-es@4.17.12)(lodash-es@4.18.1)(lodash@4.18.1)
|
||||||
memoize-one: 6.0.0
|
memoize-one: 6.0.0
|
||||||
normalize-wheel-es: 1.2.0
|
normalize-wheel-es: 1.2.0
|
||||||
vue: 3.5.34(typescript@7.0.2)
|
vue: 3.5.34(typescript@5.9.3)
|
||||||
vue-component-type-helpers: 3.3.6
|
vue-component-type-helpers: 3.3.6
|
||||||
|
|
||||||
end-of-stream@1.4.5:
|
end-of-stream@1.4.5:
|
||||||
@@ -4352,28 +4172,7 @@ snapshots:
|
|||||||
|
|
||||||
typedarray@0.0.6: {}
|
typedarray@0.0.6: {}
|
||||||
|
|
||||||
typescript@7.0.2:
|
typescript@5.9.3: {}
|
||||||
optionalDependencies:
|
|
||||||
'@typescript/typescript-aix-ppc64': 7.0.2
|
|
||||||
'@typescript/typescript-darwin-arm64': 7.0.2
|
|
||||||
'@typescript/typescript-darwin-x64': 7.0.2
|
|
||||||
'@typescript/typescript-freebsd-arm64': 7.0.2
|
|
||||||
'@typescript/typescript-freebsd-x64': 7.0.2
|
|
||||||
'@typescript/typescript-linux-arm': 7.0.2
|
|
||||||
'@typescript/typescript-linux-arm64': 7.0.2
|
|
||||||
'@typescript/typescript-linux-loong64': 7.0.2
|
|
||||||
'@typescript/typescript-linux-mips64el': 7.0.2
|
|
||||||
'@typescript/typescript-linux-ppc64': 7.0.2
|
|
||||||
'@typescript/typescript-linux-riscv64': 7.0.2
|
|
||||||
'@typescript/typescript-linux-s390x': 7.0.2
|
|
||||||
'@typescript/typescript-linux-x64': 7.0.2
|
|
||||||
'@typescript/typescript-netbsd-arm64': 7.0.2
|
|
||||||
'@typescript/typescript-netbsd-x64': 7.0.2
|
|
||||||
'@typescript/typescript-openbsd-arm64': 7.0.2
|
|
||||||
'@typescript/typescript-openbsd-x64': 7.0.2
|
|
||||||
'@typescript/typescript-sunos-x64': 7.0.2
|
|
||||||
'@typescript/typescript-win32-arm64': 7.0.2
|
|
||||||
'@typescript/typescript-win32-x64': 7.0.2
|
|
||||||
|
|
||||||
ufo@1.6.4: {}
|
ufo@1.6.4: {}
|
||||||
|
|
||||||
@@ -4397,7 +4196,7 @@ snapshots:
|
|||||||
|
|
||||||
universalify@2.0.1: {}
|
universalify@2.0.1: {}
|
||||||
|
|
||||||
unplugin-auto-import@0.11.5(@vueuse/core@14.3.0(vue@3.5.34(typescript@7.0.2)))(rollup@4.60.3):
|
unplugin-auto-import@0.11.5(@vueuse/core@14.3.0(vue@3.5.34(typescript@5.9.3)))(rollup@4.60.3):
|
||||||
dependencies:
|
dependencies:
|
||||||
'@antfu/utils': 0.7.10
|
'@antfu/utils': 0.7.10
|
||||||
'@rollup/pluginutils': 5.3.0(rollup@4.60.3)
|
'@rollup/pluginutils': 5.3.0(rollup@4.60.3)
|
||||||
@@ -4406,7 +4205,7 @@ snapshots:
|
|||||||
unimport: 1.3.0(rollup@4.60.3)
|
unimport: 1.3.0(rollup@4.60.3)
|
||||||
unplugin: 1.16.1
|
unplugin: 1.16.1
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
'@vueuse/core': 14.3.0(vue@3.5.34(typescript@7.0.2))
|
'@vueuse/core': 14.3.0(vue@3.5.34(typescript@5.9.3))
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- rollup
|
- rollup
|
||||||
|
|
||||||
@@ -4465,54 +4264,54 @@ snapshots:
|
|||||||
|
|
||||||
vue-component-type-helpers@3.3.6: {}
|
vue-component-type-helpers@3.3.6: {}
|
||||||
|
|
||||||
vue-i18n@11.4.2(vue@3.5.34(typescript@7.0.2)):
|
vue-i18n@11.4.2(vue@3.5.34(typescript@5.9.3)):
|
||||||
dependencies:
|
dependencies:
|
||||||
'@intlify/core-base': 11.4.2
|
'@intlify/core-base': 11.4.2
|
||||||
'@intlify/devtools-types': 11.4.2
|
'@intlify/devtools-types': 11.4.2
|
||||||
'@intlify/shared': 11.4.2
|
'@intlify/shared': 11.4.2
|
||||||
'@vue/devtools-api': 6.6.4
|
'@vue/devtools-api': 6.6.4
|
||||||
vue: 3.5.34(typescript@7.0.2)
|
vue: 3.5.34(typescript@5.9.3)
|
||||||
|
|
||||||
vue-pdf-embed@2.1.6(vue@3.5.34(typescript@7.0.2)):
|
vue-pdf-embed@2.1.6(vue@3.5.34(typescript@5.9.3)):
|
||||||
dependencies:
|
dependencies:
|
||||||
pdfjs-dist: 6.2.108
|
pdfjs-dist: 6.2.108
|
||||||
vue: 3.5.34(typescript@7.0.2)
|
vue: 3.5.34(typescript@5.9.3)
|
||||||
|
|
||||||
vue-router@4.6.4(vue@3.5.34(typescript@7.0.2)):
|
vue-router@4.6.4(vue@3.5.34(typescript@5.9.3)):
|
||||||
dependencies:
|
dependencies:
|
||||||
'@vue/devtools-api': 6.6.4
|
'@vue/devtools-api': 6.6.4
|
||||||
vue: 3.5.34(typescript@7.0.2)
|
vue: 3.5.34(typescript@5.9.3)
|
||||||
|
|
||||||
vue-tsc@3.3.13(typescript@7.0.2):
|
vue-tsc@3.3.13(typescript@5.9.3):
|
||||||
dependencies:
|
dependencies:
|
||||||
'@volar/typescript': 2.4.28(typescript@7.0.2)
|
'@volar/typescript': 2.4.28(typescript@5.9.3)
|
||||||
'@vue/language-core': 3.3.13
|
'@vue/language-core': 3.3.13
|
||||||
typescript: 7.0.2
|
typescript: 5.9.3
|
||||||
|
|
||||||
vue3-clipboard@1.0.0(vue@3.5.34(typescript@7.0.2)):
|
vue3-clipboard@1.0.0(vue@3.5.34(typescript@5.9.3)):
|
||||||
dependencies:
|
dependencies:
|
||||||
clipboard: 2.0.11
|
clipboard: 2.0.11
|
||||||
vue: 3.5.34(typescript@7.0.2)
|
vue: 3.5.34(typescript@5.9.3)
|
||||||
|
|
||||||
vue@3.5.34(typescript@7.0.2):
|
vue@3.5.34(typescript@5.9.3):
|
||||||
dependencies:
|
dependencies:
|
||||||
'@vue/compiler-dom': 3.5.34
|
'@vue/compiler-dom': 3.5.34
|
||||||
'@vue/compiler-sfc': 3.5.34
|
'@vue/compiler-sfc': 3.5.34
|
||||||
'@vue/runtime-dom': 3.5.34
|
'@vue/runtime-dom': 3.5.34
|
||||||
'@vue/server-renderer': 3.5.34(vue@3.5.34(typescript@7.0.2))
|
'@vue/server-renderer': 3.5.34(vue@3.5.34(typescript@5.9.3))
|
||||||
'@vue/shared': 3.5.34
|
'@vue/shared': 3.5.34
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
typescript: 7.0.2
|
typescript: 5.9.3
|
||||||
|
|
||||||
vuedraggable@4.1.0(vue@3.5.34(typescript@7.0.2)):
|
vuedraggable@4.1.0(vue@3.5.34(typescript@5.9.3)):
|
||||||
dependencies:
|
dependencies:
|
||||||
sortablejs: 1.14.0
|
sortablejs: 1.14.0
|
||||||
vue: 3.5.34(typescript@7.0.2)
|
vue: 3.5.34(typescript@5.9.3)
|
||||||
|
|
||||||
vuex@4.1.0(vue@3.5.34(typescript@7.0.2)):
|
vuex@4.1.0(vue@3.5.34(typescript@5.9.3)):
|
||||||
dependencies:
|
dependencies:
|
||||||
'@vue/devtools-api': 6.6.4
|
'@vue/devtools-api': 6.6.4
|
||||||
vue: 3.5.34(typescript@7.0.2)
|
vue: 3.5.34(typescript@5.9.3)
|
||||||
|
|
||||||
webpack-virtual-modules@0.6.2: {}
|
webpack-virtual-modules@0.6.2: {}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,25 @@
|
|||||||
|
import { execFileSync } from 'node:child_process';
|
||||||
|
import { existsSync, rmSync, statSync } from 'node:fs';
|
||||||
|
import { resolve } from 'node:path';
|
||||||
|
|
||||||
|
const root = process.cwd();
|
||||||
|
const distDir = resolve(root, 'dist');
|
||||||
|
const zipPath = resolve(root, 'dist.zip');
|
||||||
|
|
||||||
|
if (!existsSync(distDir) || !statSync(distDir).isDirectory()) {
|
||||||
|
console.error('[zip-dist] dist 目录不存在,请先完成构建');
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (existsSync(zipPath)) {
|
||||||
|
rmSync(zipPath);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 压缩 dist 内文件到根级(解压即 index.html / assets,便于直接上传部署)
|
||||||
|
execFileSync('zip', ['-qr', zipPath, '.', '-x', '*.DS_Store', '-x', '__MACOSX/*'], {
|
||||||
|
cwd: distDir,
|
||||||
|
stdio: 'inherit',
|
||||||
|
});
|
||||||
|
|
||||||
|
const sizeMb = (statSync(zipPath).size / (1024 * 1024)).toFixed(2);
|
||||||
|
console.log(`[zip-dist] 已生成 ${zipPath}(${sizeMb} MB)`);
|
||||||
@@ -0,0 +1,61 @@
|
|||||||
|
import { createCrudApi } from './common';
|
||||||
|
import request from '@/axios';
|
||||||
|
|
||||||
|
const baseUrl = '/blade-transport/contract-change';
|
||||||
|
const api = createCrudApi(baseUrl);
|
||||||
|
|
||||||
|
export const getList = api.getList;
|
||||||
|
export const getDetail = api.getDetail;
|
||||||
|
export const submit = api.submit;
|
||||||
|
export const remove = api.remove;
|
||||||
|
|
||||||
|
export const createFromContract = (contractId, changeType) =>
|
||||||
|
request({
|
||||||
|
url: `${baseUrl}/create-from-contract`,
|
||||||
|
method: 'post',
|
||||||
|
params: { contractId, changeType },
|
||||||
|
});
|
||||||
|
|
||||||
|
export const saveDraft = row =>
|
||||||
|
request({
|
||||||
|
url: `${baseUrl}/save-draft`,
|
||||||
|
method: 'post',
|
||||||
|
data: row,
|
||||||
|
});
|
||||||
|
|
||||||
|
export const submitApproval = id =>
|
||||||
|
request({
|
||||||
|
url: `${baseUrl}/submit-approval`,
|
||||||
|
method: 'post',
|
||||||
|
params: { id },
|
||||||
|
});
|
||||||
|
|
||||||
|
export const approve = id =>
|
||||||
|
request({
|
||||||
|
url: `${baseUrl}/approve`,
|
||||||
|
method: 'post',
|
||||||
|
params: { id },
|
||||||
|
// 审批通过后同步推送合规(附件转传可达 20s+),覆盖全局 10s 超时
|
||||||
|
timeout: 120000,
|
||||||
|
});
|
||||||
|
|
||||||
|
export const reject = id =>
|
||||||
|
request({
|
||||||
|
url: `${baseUrl}/reject`,
|
||||||
|
method: 'post',
|
||||||
|
params: { id },
|
||||||
|
});
|
||||||
|
|
||||||
|
export const withdraw = id =>
|
||||||
|
request({
|
||||||
|
url: `${baseUrl}/withdraw`,
|
||||||
|
method: 'post',
|
||||||
|
params: { id },
|
||||||
|
});
|
||||||
|
|
||||||
|
export const markSyncStatus = (ids, syncStatus) =>
|
||||||
|
request({
|
||||||
|
url: `${baseUrl}/mark-sync-status`,
|
||||||
|
method: 'post',
|
||||||
|
params: { ids, syncStatus },
|
||||||
|
});
|
||||||
@@ -36,6 +36,8 @@ export const approve = id =>
|
|||||||
url: `${baseUrl}/approve`,
|
url: `${baseUrl}/approve`,
|
||||||
method: 'post',
|
method: 'post',
|
||||||
params: { id },
|
params: { id },
|
||||||
|
// 审批通过后同步推送合规(附件转传可达 20s+),覆盖全局 10s 超时
|
||||||
|
timeout: 120000,
|
||||||
});
|
});
|
||||||
|
|
||||||
export const reject = id =>
|
export const reject = id =>
|
||||||
@@ -91,10 +93,10 @@ export const expireStats = params =>
|
|||||||
params,
|
params,
|
||||||
});
|
});
|
||||||
|
|
||||||
/** 按合同负责部门预览下一合同编号 */
|
/** 按平台公司 + 业务部门预览下一合同编号 */
|
||||||
export const nextContractNo = organizationId =>
|
export const nextContractNo = (organizationId, platformCompanyId) =>
|
||||||
request({
|
request({
|
||||||
url: `${baseUrl}/next-contract-no`,
|
url: `${baseUrl}/next-contract-no`,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: { organizationId },
|
params: { organizationId, platformCompanyId },
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -0,0 +1,133 @@
|
|||||||
|
import request from '@/axios';
|
||||||
|
|
||||||
|
const baseUrl = '/blade-transport/hcs';
|
||||||
|
|
||||||
|
/** 进程内缓存,避免列表页重复请求推送开关 */
|
||||||
|
let immediateEnabledCache = null;
|
||||||
|
let immediateEnabledPromise = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询 HCS 即时推送开关(thirdParty.hcs.push.immediate-enabled)。
|
||||||
|
* 关闭时项目管理/合同管理隐藏「推送合规」「批量推送合规」。
|
||||||
|
*/
|
||||||
|
export const getPushConfig = () =>
|
||||||
|
request({
|
||||||
|
url: `${baseUrl}/push-config`,
|
||||||
|
method: 'get',
|
||||||
|
});
|
||||||
|
|
||||||
|
export const loadHcsImmediateEnabled = () => {
|
||||||
|
if (immediateEnabledCache !== null) {
|
||||||
|
return Promise.resolve(immediateEnabledCache);
|
||||||
|
}
|
||||||
|
if (immediateEnabledPromise) {
|
||||||
|
return immediateEnabledPromise;
|
||||||
|
}
|
||||||
|
immediateEnabledPromise = getPushConfig()
|
||||||
|
.then(res => {
|
||||||
|
const data = res?.data?.data ?? res?.data ?? {};
|
||||||
|
immediateEnabledCache = data.immediateEnabled === true || data.immediateEnabled === 'true';
|
||||||
|
return immediateEnabledCache;
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
immediateEnabledCache = false;
|
||||||
|
return false;
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
immediateEnabledPromise = null;
|
||||||
|
});
|
||||||
|
return immediateEnabledPromise;
|
||||||
|
};
|
||||||
|
|
||||||
|
// 合规推送涉及 HCS 远程多次调用(风险校验+附件转传+起草),可达 20s+,覆盖全局 10s 超时
|
||||||
|
export const repush = (bizType, id) =>
|
||||||
|
request({
|
||||||
|
url: `${baseUrl}/sync/${bizType}/${id}`,
|
||||||
|
method: 'post',
|
||||||
|
timeout: 60000,
|
||||||
|
});
|
||||||
|
|
||||||
|
// 批量推送为逐条同步推送,耗时随勾选行数线性增长,进一步放宽超时
|
||||||
|
export const repushBatch = (bizType, ids) =>
|
||||||
|
request({
|
||||||
|
url: `${baseUrl}/sync/${bizType}/batch`,
|
||||||
|
method: 'post',
|
||||||
|
data: ids,
|
||||||
|
timeout: 300000,
|
||||||
|
});
|
||||||
|
|
||||||
|
export const getTemplates = () =>
|
||||||
|
request({
|
||||||
|
url: `${baseUrl}/master-data/template`,
|
||||||
|
method: 'get',
|
||||||
|
});
|
||||||
|
|
||||||
|
export const refreshMasterData = () =>
|
||||||
|
request({
|
||||||
|
url: `${baseUrl}/master-data/refresh`,
|
||||||
|
method: 'post',
|
||||||
|
timeout: 60000,
|
||||||
|
});
|
||||||
|
|
||||||
|
export const getRisk = customerCode =>
|
||||||
|
request({
|
||||||
|
url: `${baseUrl}/risk`,
|
||||||
|
method: 'get',
|
||||||
|
params: { customerCode },
|
||||||
|
timeout: 30000,
|
||||||
|
});
|
||||||
|
|
||||||
|
// 客商风险批量查询(客商列表页展示用):入参编号数组,后端逐个查 C101-1,单个失败跳过
|
||||||
|
export const getRiskBatch = customerCodes =>
|
||||||
|
request({
|
||||||
|
url: `${baseUrl}/risk/batch`,
|
||||||
|
method: 'get',
|
||||||
|
params: { customerCodes: (customerCodes || []).join(',') },
|
||||||
|
timeout: 60000,
|
||||||
|
});
|
||||||
|
|
||||||
|
// 客商风险按名称查询(客商档案表单展示用):名称反查编号后口径同编号查询
|
||||||
|
export const getRiskByName = customerName =>
|
||||||
|
request({
|
||||||
|
url: `${baseUrl}/risk/by-name`,
|
||||||
|
method: 'get',
|
||||||
|
params: { customerName },
|
||||||
|
timeout: 30000,
|
||||||
|
});
|
||||||
|
|
||||||
|
export const uploadAttachment = formData =>
|
||||||
|
request({
|
||||||
|
url: `${baseUrl}/attachment/upload`,
|
||||||
|
method: 'post',
|
||||||
|
data: formData,
|
||||||
|
timeout: 60000,
|
||||||
|
});
|
||||||
|
|
||||||
|
export const downloadAttachment = (fdId, name) =>
|
||||||
|
request({
|
||||||
|
url: `${baseUrl}/attachment/download`,
|
||||||
|
method: 'get',
|
||||||
|
params: { fdId, name },
|
||||||
|
responseType: 'blob',
|
||||||
|
timeout: 120000,
|
||||||
|
});
|
||||||
|
|
||||||
|
export const applyContractSpec = data =>
|
||||||
|
request({
|
||||||
|
url: `${baseUrl}/contract/spec-apply`,
|
||||||
|
method: 'post',
|
||||||
|
data,
|
||||||
|
timeout: 60000,
|
||||||
|
});
|
||||||
|
|
||||||
|
export const confirmContractSpec = (id, result) =>
|
||||||
|
request({
|
||||||
|
url: `${baseUrl}/contract/spec/confirm`,
|
||||||
|
method: 'post',
|
||||||
|
params: { id, result },
|
||||||
|
});
|
||||||
|
|
||||||
|
export const unwrapData = response => {
|
||||||
|
const data = response?.data?.data ?? response?.data;
|
||||||
|
return data && typeof data === 'object' && 'data' in data ? data.data : data;
|
||||||
|
};
|
||||||
@@ -24,11 +24,16 @@ export const getDetail = id =>
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const getCarrierContracts = projectIds =>
|
export const getCarrierContracts = (projectIds, waybillIds = []) =>
|
||||||
request({
|
request({
|
||||||
url: `${baseUrl}/carrier-contracts`,
|
url: `${baseUrl}/carrier-contracts`,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: { projectIds: (projectIds || []).join(',') },
|
params: {
|
||||||
|
projectIds: (projectIds || []).join(','),
|
||||||
|
...(waybillIds || []).filter(Boolean).length
|
||||||
|
? { waybillIds: (waybillIds || []).filter(Boolean).join(',') }
|
||||||
|
: {},
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const saveDraft = row =>
|
export const saveDraft = row =>
|
||||||
|
|||||||
@@ -43,6 +43,8 @@ export const approve = id =>
|
|||||||
url: `${baseUrl}/approve`,
|
url: `${baseUrl}/approve`,
|
||||||
method: 'post',
|
method: 'post',
|
||||||
params: { id },
|
params: { id },
|
||||||
|
// 审批通过后同步推送合规(远程多次调用),覆盖全局 10s 超时
|
||||||
|
timeout: 60000,
|
||||||
});
|
});
|
||||||
|
|
||||||
export const reject = id =>
|
export const reject = id =>
|
||||||
|
|||||||
@@ -0,0 +1,52 @@
|
|||||||
|
import { createCrudApi } from './common';
|
||||||
|
import request from '@/axios';
|
||||||
|
|
||||||
|
const baseUrl = '/blade-transport/project-change';
|
||||||
|
const api = createCrudApi(baseUrl);
|
||||||
|
|
||||||
|
export const getList = api.getList;
|
||||||
|
export const getDetail = api.getDetail;
|
||||||
|
export const submit = api.submit;
|
||||||
|
export const remove = api.remove;
|
||||||
|
|
||||||
|
export const createFromProject = (projectId, changeType) =>
|
||||||
|
request({
|
||||||
|
url: `${baseUrl}/create-from-project`,
|
||||||
|
method: 'post',
|
||||||
|
params: { projectId, changeType },
|
||||||
|
});
|
||||||
|
|
||||||
|
export const saveDraft = row =>
|
||||||
|
request({
|
||||||
|
url: `${baseUrl}/save-draft`,
|
||||||
|
method: 'post',
|
||||||
|
data: row,
|
||||||
|
});
|
||||||
|
|
||||||
|
export const submitApproval = id =>
|
||||||
|
request({
|
||||||
|
url: `${baseUrl}/submit-approval`,
|
||||||
|
method: 'post',
|
||||||
|
params: { id },
|
||||||
|
});
|
||||||
|
|
||||||
|
export const approve = id =>
|
||||||
|
request({
|
||||||
|
url: `${baseUrl}/approve`,
|
||||||
|
method: 'post',
|
||||||
|
params: { id },
|
||||||
|
});
|
||||||
|
|
||||||
|
export const reject = id =>
|
||||||
|
request({
|
||||||
|
url: `${baseUrl}/reject`,
|
||||||
|
method: 'post',
|
||||||
|
params: { id },
|
||||||
|
});
|
||||||
|
|
||||||
|
export const withdraw = id =>
|
||||||
|
request({
|
||||||
|
url: `${baseUrl}/withdraw`,
|
||||||
|
method: 'post',
|
||||||
|
params: { id },
|
||||||
|
});
|
||||||
@@ -14,6 +14,13 @@ export const cancel = api.cancel;
|
|||||||
export const reassign = api.reassign;
|
export const reassign = api.reassign;
|
||||||
export const complete = api.complete;
|
export const complete = api.complete;
|
||||||
export const batchComplete = api.batchComplete;
|
export const batchComplete = api.batchComplete;
|
||||||
|
/** 确认回单:回单节点配成「需业务员确认」时用;后端校验司机打卡节点齐全且无未了结异常后才置完成 */
|
||||||
|
export const confirmReturn = id =>
|
||||||
|
request({
|
||||||
|
url: `${baseUrl}/confirm-return`,
|
||||||
|
method: 'post',
|
||||||
|
params: { id },
|
||||||
|
});
|
||||||
export const changeRoute = data =>
|
export const changeRoute = data =>
|
||||||
request({
|
request({
|
||||||
url: `${baseUrl}/change-route`,
|
url: `${baseUrl}/change-route`,
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
import request from '@/axios';
|
import request from '@/axios';
|
||||||
import { ElLoading, ElMessage } from 'element-plus';
|
import { ElLoading, ElMessage } from 'element-plus';
|
||||||
|
|
||||||
|
/** 审核按钮统一超时:审批通过后可能同步推送金蝶等耗时操作,覆盖全局 10s */
|
||||||
|
export const APPROVE_TIMEOUT = 30000;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 文件流返回
|
* 文件流返回
|
||||||
* @param url 接口地址
|
* @param url 接口地址
|
||||||
|
|||||||
@@ -6,17 +6,17 @@ export const getList = (current, size, params) =>
|
|||||||
request({ url: `${baseUrl}/list`, method: 'get', params: { current, size, ...params } });
|
request({ url: `${baseUrl}/list`, method: 'get', params: { current, size, ...params } });
|
||||||
export const getDetail = id => request({ url: `${baseUrl}/detail`, method: 'get', params: { id } });
|
export const getDetail = id => request({ url: `${baseUrl}/detail`, method: 'get', params: { id } });
|
||||||
export const getExpiryCounts = () => request({ url: `${baseUrl}/expiry-counts`, method: 'get' });
|
export const getExpiryCounts = () => request({ url: `${baseUrl}/expiry-counts`, method: 'get' });
|
||||||
export const getAvailableOptions = (keyword, deptId, selectedId) =>
|
export const getAvailableOptions = (keyword, deptId, selectedId, payerName, payeeName) =>
|
||||||
request({
|
request({
|
||||||
url: `${baseUrl}/available-options`,
|
url: `${baseUrl}/available-options`,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: { keyword, deptId, selectedId },
|
params: { keyword, deptId, selectedId, payerName, payeeName },
|
||||||
});
|
});
|
||||||
export const getAvailablePage = (current, size, keyword, deptId, selectedId) =>
|
export const getAvailablePage = (current, size, keyword, deptId, selectedId, payerName, payeeName) =>
|
||||||
request({
|
request({
|
||||||
url: `${baseUrl}/available-page`,
|
url: `${baseUrl}/available-page`,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: { current, size, keyword, deptId, selectedId },
|
params: { current, size, keyword, deptId, selectedId, payerName, payeeName },
|
||||||
});
|
});
|
||||||
export const submit = data => request({ url: `${baseUrl}/submit`, method: 'post', data });
|
export const submit = data => request({ url: `${baseUrl}/submit`, method: 'post', data });
|
||||||
export const remove = id => request({ url: `${baseUrl}/remove`, method: 'post', params: { id } });
|
export const remove = id => request({ url: `${baseUrl}/remove`, method: 'post', params: { id } });
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import request from '@/axios';
|
import request from '@/axios';
|
||||||
|
import { APPROVE_TIMEOUT } from '@/api/common';
|
||||||
|
|
||||||
const baseUrl = '/blade-transport/invoice-application';
|
const baseUrl = '/blade-transport/invoice-application';
|
||||||
|
|
||||||
@@ -18,7 +19,8 @@ export const getReceiverInformation = settlementIds =>
|
|||||||
export const save = data => request({ url: `${baseUrl}/save`, method: 'post', data });
|
export const save = data => request({ url: `${baseUrl}/save`, method: 'post', data });
|
||||||
export const remove = id => request({ url: `${baseUrl}/remove`, method: 'post', params: { id } });
|
export const remove = id => request({ url: `${baseUrl}/remove`, method: 'post', params: { id } });
|
||||||
export const submit = data => request({ url: `${baseUrl}/submit`, method: 'post', data });
|
export const submit = data => request({ url: `${baseUrl}/submit`, method: 'post', data });
|
||||||
export const approve = data => request({ url: `${baseUrl}/approve`, method: 'post', data });
|
export const approve = data =>
|
||||||
|
request({ url: `${baseUrl}/approve`, method: 'post', data, timeout: APPROVE_TIMEOUT });
|
||||||
export const returnBill = data => request({ url: `${baseUrl}/return`, method: 'post', data });
|
export const returnBill = data => request({ url: `${baseUrl}/return`, method: 'post', data });
|
||||||
export const voidBill = data => request({ url: `${baseUrl}/void`, method: 'post', data });
|
export const voidBill = data => request({ url: `${baseUrl}/void`, method: 'post', data });
|
||||||
export const syncKingdee = id =>
|
export const syncKingdee = id =>
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import request from '@/axios';
|
import request from '@/axios';
|
||||||
|
import { APPROVE_TIMEOUT } from '@/api/common';
|
||||||
|
|
||||||
const baseUrl = '/blade-transport/invoice-receipt';
|
const baseUrl = '/blade-transport/invoice-receipt';
|
||||||
|
|
||||||
@@ -31,7 +32,8 @@ export const getReferenceInformation = settlementIds =>
|
|||||||
export const save = data => request({ url: `${baseUrl}/save`, method: 'post', data });
|
export const save = data => request({ url: `${baseUrl}/save`, method: 'post', data });
|
||||||
export const remove = id => request({ url: `${baseUrl}/remove`, method: 'post', params: { id } });
|
export const remove = id => request({ url: `${baseUrl}/remove`, method: 'post', params: { id } });
|
||||||
export const submit = data => request({ url: `${baseUrl}/submit`, method: 'post', data });
|
export const submit = data => request({ url: `${baseUrl}/submit`, method: 'post', data });
|
||||||
export const approve = data => request({ url: `${baseUrl}/approve`, method: 'post', data });
|
export const approve = data =>
|
||||||
|
request({ url: `${baseUrl}/approve`, method: 'post', data, timeout: APPROVE_TIMEOUT });
|
||||||
export const returnBill = data => request({ url: `${baseUrl}/return`, method: 'post', data });
|
export const returnBill = data => request({ url: `${baseUrl}/return`, method: 'post', data });
|
||||||
export const voidBill = data => request({ url: `${baseUrl}/void`, method: 'post', data });
|
export const voidBill = data => request({ url: `${baseUrl}/void`, method: 'post', data });
|
||||||
export const pushKingdee = ids =>
|
export const pushKingdee = ids =>
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import request from '@/axios';
|
import request from '@/axios';
|
||||||
|
import { APPROVE_TIMEOUT } from '@/api/common';
|
||||||
|
|
||||||
const baseUrl = '/blade-transport/payment-application';
|
const baseUrl = '/blade-transport/payment-application';
|
||||||
export const getList = (current, size, params) =>
|
export const getList = (current, size, params) =>
|
||||||
@@ -20,7 +21,8 @@ export const getProjectAdvanceWriteOffOptions = params =>
|
|||||||
export const save = data => request({ url: `${baseUrl}/save`, method: 'post', data });
|
export const save = data => request({ url: `${baseUrl}/save`, method: 'post', data });
|
||||||
export const remove = id => request({ url: `${baseUrl}/remove`, method: 'post', params: { id } });
|
export const remove = id => request({ url: `${baseUrl}/remove`, method: 'post', params: { id } });
|
||||||
export const submit = data => request({ url: `${baseUrl}/submit`, method: 'post', data });
|
export const submit = data => request({ url: `${baseUrl}/submit`, method: 'post', data });
|
||||||
export const approve = data => request({ url: `${baseUrl}/approve`, method: 'post', data });
|
export const approve = data =>
|
||||||
|
request({ url: `${baseUrl}/approve`, method: 'post', data, timeout: APPROVE_TIMEOUT });
|
||||||
export const returnBill = data => request({ url: `${baseUrl}/return`, method: 'post', data });
|
export const returnBill = data => request({ url: `${baseUrl}/return`, method: 'post', data });
|
||||||
export const voidBill = data => request({ url: `${baseUrl}/void`, method: 'post', data });
|
export const voidBill = data => request({ url: `${baseUrl}/void`, method: 'post', data });
|
||||||
// 同步金蝶涉及多次金蝶远程接口调用(A103-2 预检 + A103-1/A103-3 推送),单笔可达 20s+,覆盖全局 10s 超时
|
// 同步金蝶涉及多次金蝶远程接口调用(A103-2 预检 + A103-1/A103-3 推送),单笔可达 20s+,覆盖全局 10s 超时
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import request from '@/axios';
|
import request from '@/axios';
|
||||||
|
import { APPROVE_TIMEOUT } from '@/api/common';
|
||||||
|
|
||||||
const baseUrl = '/blade-transport/formal-settlement';
|
const baseUrl = '/blade-transport/formal-settlement';
|
||||||
|
|
||||||
@@ -27,12 +28,20 @@ export const getCandidateDetails = (current, size, params) =>
|
|||||||
export const save = data => request({ url: `${baseUrl}/save`, method: 'post', data });
|
export const save = data => request({ url: `${baseUrl}/save`, method: 'post', data });
|
||||||
export const remove = id => request({ url: `${baseUrl}/remove`, method: 'post', params: { id } });
|
export const remove = id => request({ url: `${baseUrl}/remove`, method: 'post', params: { id } });
|
||||||
export const submit = data => request({ url: `${baseUrl}/submit`, method: 'post', data });
|
export const submit = data => request({ url: `${baseUrl}/submit`, method: 'post', data });
|
||||||
export const approve = data => request({ url: `${baseUrl}/approve`, method: 'post', data });
|
export const approve = data =>
|
||||||
|
request({ url: `${baseUrl}/approve`, method: 'post', data, timeout: APPROVE_TIMEOUT });
|
||||||
export const returnBill = data => request({ url: `${baseUrl}/return`, method: 'post', data });
|
export const returnBill = data => request({ url: `${baseUrl}/return`, method: 'post', data });
|
||||||
export const voidBill = data => request({ url: `${baseUrl}/void`, method: 'post', data });
|
export const voidBill = data => request({ url: `${baseUrl}/void`, method: 'post', data });
|
||||||
// 同步金蝶涉及多次金蝶远程接口调用(A102-4 预检 + A102-2 保存),可达 20s+,覆盖全局 10s 超时
|
// 同步金蝶涉及多次金蝶远程接口调用(A102-4 预检 + A102-2 保存),可达 20s+,覆盖全局 10s 超时
|
||||||
export const syncKingdee = id =>
|
// config.meta.suppressErrorMessage=true 时由页面弹框汇总结果,避免拦截器重复 toast
|
||||||
request({ url: `${baseUrl}/sync-kingdee`, method: 'post', timeout: 30000, params: { id } });
|
export const syncKingdee = (id, config = {}) =>
|
||||||
|
request({
|
||||||
|
url: `${baseUrl}/sync-kingdee`,
|
||||||
|
method: 'post',
|
||||||
|
timeout: 30000,
|
||||||
|
params: { id },
|
||||||
|
...config,
|
||||||
|
});
|
||||||
export const getDetailFees = detailId =>
|
export const getDetailFees = detailId =>
|
||||||
request({ url: `${baseUrl}/detail-fees`, method: 'get', params: { detailId } });
|
request({ url: `${baseUrl}/detail-fees`, method: 'get', params: { detailId } });
|
||||||
export const getReceiptClaims = formalSettlementId =>
|
export const getReceiptClaims = formalSettlementId =>
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import request from '@/axios';
|
import request from '@/axios';
|
||||||
|
import { APPROVE_TIMEOUT } from '@/api/common';
|
||||||
|
|
||||||
const baseUrl = '/blade-transport/pre-settlement';
|
const baseUrl = '/blade-transport/pre-settlement';
|
||||||
|
|
||||||
@@ -42,7 +43,8 @@ export const removeDetail = (id, detailId) =>
|
|||||||
|
|
||||||
export const submit = data => request({ url: `${baseUrl}/submit`, method: 'post', data });
|
export const submit = data => request({ url: `${baseUrl}/submit`, method: 'post', data });
|
||||||
|
|
||||||
export const approve = data => request({ url: `${baseUrl}/approve`, method: 'post', data });
|
export const approve = data =>
|
||||||
|
request({ url: `${baseUrl}/approve`, method: 'post', data, timeout: APPROVE_TIMEOUT });
|
||||||
|
|
||||||
export const returnBill = data => request({ url: `${baseUrl}/return`, method: 'post', data });
|
export const returnBill = data => request({ url: `${baseUrl}/return`, method: 'post', data });
|
||||||
|
|
||||||
|
|||||||
@@ -17,6 +17,10 @@ export const approve = id => request({ url: `${baseUrl}/approve`, method: 'post'
|
|||||||
export const returnBill = (id, reason) =>
|
export const returnBill = (id, reason) =>
|
||||||
request({ url: `${baseUrl}/return`, method: 'post', data: { id, reason } });
|
request({ url: `${baseUrl}/return`, method: 'post', data: { id, reason } });
|
||||||
export const repush = id => request({ url: `${baseUrl}/repush`, method: 'post', params: { id } });
|
export const repush = id => request({ url: `${baseUrl}/repush`, method: 'post', params: { id } });
|
||||||
|
export const syncKingdee = id =>
|
||||||
|
request({ url: `${baseUrl}/sync-kingdee`, method: 'post', timeout: 30000, params: { id } });
|
||||||
|
export const kingdeeWriteOffPrecheck = formalSettlementId =>
|
||||||
|
request({ url: `${baseUrl}/kingdee-writeoff-precheck`, method: 'get', params: { formalSettlementId } });
|
||||||
|
|
||||||
export const approvalStatusOptions = [
|
export const approvalStatusOptions = [
|
||||||
{ label: '草稿', value: 'draft' },
|
{ label: '草稿', value: 'draft' },
|
||||||
|
|||||||
@@ -53,3 +53,13 @@ export const confirm = data =>
|
|||||||
request({ url: `${baseUrl}/confirm`, method: 'post', data, timeout: 120000 });
|
request({ url: `${baseUrl}/confirm`, method: 'post', data, timeout: 120000 });
|
||||||
|
|
||||||
export const voidBatch = data => request({ url: `${baseUrl}/void`, method: 'post', data });
|
export const voidBatch = data => request({ url: `${baseUrl}/void`, method: 'post', data });
|
||||||
|
|
||||||
|
export const removeDraft = id =>
|
||||||
|
request({ url: `${baseUrl}/remove`, method: 'post', params: { id } });
|
||||||
|
|
||||||
|
export const getHistoryWaybills = params =>
|
||||||
|
request({
|
||||||
|
url: `${baseUrl}/history-waybills`,
|
||||||
|
method: 'get',
|
||||||
|
params,
|
||||||
|
});
|
||||||
|
|||||||
@@ -0,0 +1,42 @@
|
|||||||
|
import request from '@/axios';
|
||||||
|
|
||||||
|
const baseUrl = '/blade-system/business-dept-config';
|
||||||
|
|
||||||
|
export const getList = (current, size, params) =>
|
||||||
|
request({
|
||||||
|
url: `${baseUrl}/list`,
|
||||||
|
method: 'get',
|
||||||
|
params: {
|
||||||
|
...params,
|
||||||
|
current,
|
||||||
|
size,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
export const getDetail = id =>
|
||||||
|
request({
|
||||||
|
url: `${baseUrl}/detail`,
|
||||||
|
method: 'get',
|
||||||
|
params: { id },
|
||||||
|
});
|
||||||
|
|
||||||
|
export const submit = row =>
|
||||||
|
request({
|
||||||
|
url: `${baseUrl}/submit`,
|
||||||
|
method: 'post',
|
||||||
|
data: row,
|
||||||
|
});
|
||||||
|
|
||||||
|
export const remove = ids =>
|
||||||
|
request({
|
||||||
|
url: `${baseUrl}/remove`,
|
||||||
|
method: 'post',
|
||||||
|
params: { ids },
|
||||||
|
});
|
||||||
|
|
||||||
|
export const getByPlatformDept = (platformCompanyId, businessDeptId) =>
|
||||||
|
request({
|
||||||
|
url: `${baseUrl}/by-platform-dept`,
|
||||||
|
method: 'get',
|
||||||
|
params: { platformCompanyId, businessDeptId },
|
||||||
|
});
|
||||||
@@ -1,5 +1,8 @@
|
|||||||
import request from '@/axios';
|
import request from '@/axios';
|
||||||
|
|
||||||
|
/** 提交审核流(MK)统一超时:客商/项目/合同/预结算/正式结算/付款/开票/收票/汇票付款 */
|
||||||
|
export const MK_SUBMIT_TIMEOUT = 30000;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 调用 MK processSubmit 提交审核流
|
* 调用 MK processSubmit 提交审核流
|
||||||
* @param {Object} data
|
* @param {Object} data
|
||||||
@@ -9,12 +12,14 @@ import request from '@/axios';
|
|||||||
* @param {string} data.bizId 业务主键(后端生成/复用 formInstanceId)
|
* @param {string} data.bizId 业务主键(后端生成/复用 formInstanceId)
|
||||||
* @param {string} [data.subject] 流程标题
|
* @param {string} [data.subject] 流程标题
|
||||||
* @param {string} [data.bizType] 业务类型
|
* @param {string} [data.bizType] 业务类型
|
||||||
|
* @param {Object} [data.tempVarData] MK 临时变量(如 { projectType })
|
||||||
*/
|
*/
|
||||||
export const processSubmit = data => {
|
export const processSubmit = data => {
|
||||||
return request({
|
return request({
|
||||||
url: '/blade-system/businessProcess/processSubmit',
|
url: '/blade-system/businessProcess/processSubmit',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data,
|
data,
|
||||||
|
timeout: MK_SUBMIT_TIMEOUT,
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -28,6 +33,7 @@ export const processDelete = data => {
|
|||||||
url: '/blade-system/businessProcess/processDelete',
|
url: '/blade-system/businessProcess/processDelete',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data,
|
data,
|
||||||
|
timeout: MK_SUBMIT_TIMEOUT,
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
+10
-1
@@ -77,7 +77,8 @@ export const syncOaDepartment = (
|
|||||||
size = 20,
|
size = 20,
|
||||||
signal,
|
signal,
|
||||||
incremental = false,
|
incremental = false,
|
||||||
modifiedSince
|
modifiedSince,
|
||||||
|
companyOaId
|
||||||
) => {
|
) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/blade-system/dept/sync-oa-department',
|
url: '/blade-system/dept/sync-oa-department',
|
||||||
@@ -87,6 +88,7 @@ export const syncOaDepartment = (
|
|||||||
size,
|
size,
|
||||||
incremental: !!incremental,
|
incremental: !!incremental,
|
||||||
modifiedSince: modifiedSince || undefined,
|
modifiedSince: modifiedSince || undefined,
|
||||||
|
companyOaId: companyOaId || undefined,
|
||||||
},
|
},
|
||||||
timeout: 60000,
|
timeout: 60000,
|
||||||
signal,
|
signal,
|
||||||
@@ -137,3 +139,10 @@ export const getPlatformCompanySelect = () => {
|
|||||||
method: 'get',
|
method: 'get',
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const getBusinessDeptSelect = () => {
|
||||||
|
return request({
|
||||||
|
url: '/blade-system/dept/business-dept-select',
|
||||||
|
method: 'get',
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|||||||
@@ -0,0 +1,19 @@
|
|||||||
|
import request from '@/axios';
|
||||||
|
|
||||||
|
export const getRoleMenuDataScopeTree = roleId => {
|
||||||
|
return request({
|
||||||
|
url: '/blade-system/role-menu-data-scope/tree',
|
||||||
|
method: 'get',
|
||||||
|
params: {
|
||||||
|
roleId,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
export const submitRoleMenuDataScope = data => {
|
||||||
|
return request({
|
||||||
|
url: '/blade-system/role-menu-data-scope/submit',
|
||||||
|
method: 'post',
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
};
|
||||||
@@ -176,12 +176,11 @@ export const syncKingdee = id => {
|
|||||||
|
|
||||||
export const recognizeBusinessLicenseOcr = imageUrl => {
|
export const recognizeBusinessLicenseOcr = imageUrl => {
|
||||||
return request({
|
return request({
|
||||||
url: '/blade-transport/baidu-ocr/recognize-url',
|
url: '/blade-transport/baidu-ocr/business-license',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
timeout: 60000,
|
timeout: 60000,
|
||||||
params: {
|
params: {
|
||||||
imageUrl,
|
imageUrl,
|
||||||
type: 'business_license',
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
+46
-18
@@ -74,12 +74,15 @@ const redirectToLogin = () => {
|
|||||||
* 统一弹出错误提示并返回带标记的 Error。
|
* 统一弹出错误提示并返回带标记的 Error。
|
||||||
* `_notified` 标记用于让业务层(批量导入等)识别「拦截器已经提示过」,
|
* `_notified` 标记用于让业务层(批量导入等)识别「拦截器已经提示过」,
|
||||||
* 避免同一条错误被弹两次。
|
* 避免同一条错误被弹两次。
|
||||||
|
* meta.suppressErrorMessage=true 时由业务层自行弹框汇总,拦截器不再 toast。
|
||||||
*/
|
*/
|
||||||
const notifiedError = message => {
|
const notifiedError = (message, config) => {
|
||||||
ElMessage({
|
if (config?.meta?.suppressErrorMessage !== true) {
|
||||||
message: message,
|
ElMessage({
|
||||||
type: 'error',
|
message: message,
|
||||||
});
|
type: 'error',
|
||||||
|
});
|
||||||
|
}
|
||||||
const error = new Error(message);
|
const error = new Error(message);
|
||||||
error._notified = true;
|
error._notified = true;
|
||||||
return error;
|
return error;
|
||||||
@@ -102,12 +105,27 @@ const isJsonContentType = res => {
|
|||||||
return contentType.includes('application/json') || contentType.includes('text/json');
|
return contentType.includes('application/json') || contentType.includes('text/json');
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否为可按文本读取的 Blob / Blob-like(含跨 realm)。
|
||||||
|
* 禁止对普通业务 JSON 对象调用 .text()。
|
||||||
|
*/
|
||||||
|
const isBlobLikeData = value =>
|
||||||
|
value != null &&
|
||||||
|
typeof value === 'object' &&
|
||||||
|
typeof value.size === 'number' &&
|
||||||
|
typeof value.type === 'string' &&
|
||||||
|
typeof value.text === 'function';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 判断响应体是否已是解析好的对象(无需再解析)。
|
* 判断响应体是否已是解析好的对象(无需再解析)。
|
||||||
* 注意 Blob 也是 object,必须排除,否则会把待解析的文件流误判为已完成。
|
* 注意 Blob 也是 object,必须排除,否则会把待解析的文件流误判为已完成。
|
||||||
*/
|
*/
|
||||||
const isPlainObject = value =>
|
const isPlainObject = value =>
|
||||||
value !== null && typeof value === 'object' && !(value instanceof Blob);
|
value !== null &&
|
||||||
|
typeof value === 'object' &&
|
||||||
|
!(value instanceof Blob) &&
|
||||||
|
!isBlobLikeData(value) &&
|
||||||
|
!(value instanceof ArrayBuffer);
|
||||||
//跨域请求,允许保存cookie
|
//跨域请求,允许保存cookie
|
||||||
axios.defaults.withCredentials = true;
|
axios.defaults.withCredentials = true;
|
||||||
// NProgress Configuration
|
// NProgress Configuration
|
||||||
@@ -187,15 +205,20 @@ axios.interceptors.response.use(
|
|||||||
// 用户就会以为系统崩了——而后端其实返回了明确的业务提示(如「未读取到数据行…」)。
|
// 用户就会以为系统崩了——而后端其实返回了明确的业务提示(如「未读取到数据行…」)。
|
||||||
// 这里按 Content-Type 判断:JSON 才解析回对象;真·文件流(Excel 等)保持原样不动。
|
// 这里按 Content-Type 判断:JSON 才解析回对象;真·文件流(Excel 等)保持原样不动。
|
||||||
// 兼容 Blob(浏览器 responseType='blob')与 string(非浏览器环境)两种形态。
|
// 兼容 Blob(浏览器 responseType='blob')与 string(非浏览器环境)两种形态。
|
||||||
|
// 仅对真正的 Blob/Blob-like 调 .text(),避免业务 JSON 已解析后出现
|
||||||
|
// 「e.data.text is not a function」。
|
||||||
if (isJsonContentType(res) && !isPlainObject(res.data)) {
|
if (isJsonContentType(res) && !isPlainObject(res.data)) {
|
||||||
try {
|
try {
|
||||||
let text = '';
|
let text = '';
|
||||||
if (typeof res.data?.text === 'function') {
|
const raw = res.data;
|
||||||
text = await res.data.text();
|
if (isBlobLikeData(raw) || (typeof Blob !== 'undefined' && raw instanceof Blob)) {
|
||||||
} else if (typeof res.data === 'string') {
|
text = await raw.text();
|
||||||
text = res.data;
|
} else if (typeof raw === 'string') {
|
||||||
} else if (typeof res.data?.arrayBuffer === 'function') {
|
text = raw;
|
||||||
text = new TextDecoder().decode(await res.data.arrayBuffer());
|
} else if (raw && typeof raw.arrayBuffer === 'function') {
|
||||||
|
text = new TextDecoder().decode(await raw.arrayBuffer());
|
||||||
|
} else if (raw instanceof ArrayBuffer) {
|
||||||
|
text = new TextDecoder().decode(raw);
|
||||||
}
|
}
|
||||||
const parsed = typeof text === 'string' && text ? JSON.parse(text) : null;
|
const parsed = typeof text === 'string' && text ? JSON.parse(text) : null;
|
||||||
if (parsed && typeof parsed === 'object') {
|
if (parsed && typeof parsed === 'object') {
|
||||||
@@ -205,10 +228,11 @@ axios.interceptors.response.use(
|
|||||||
// 声明是 JSON 却解析失败:保持原样,交给下游按文件处理
|
// 声明是 JSON 却解析失败:保持原样,交给下游按文件处理
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//获取状态信息
|
// 获取状态信息:文件流没有 code/msg,必须退回 HTTP status,禁止读 Blob 上的幽灵字段
|
||||||
const status = res.data.error_code || res.data.code || res.status;
|
const payload = isPlainObject(res.data) ? res.data : {};
|
||||||
|
const status = Number(payload.error_code || payload.code || res.status);
|
||||||
const statusWhiteList = website.statusWhiteList || [];
|
const statusWhiteList = website.statusWhiteList || [];
|
||||||
const message = res.data.msg || res.data.error_description || '系统错误';
|
const message = payload.msg || payload.error_description || '系统错误';
|
||||||
//如果在白名单里则自行catch逻辑处理
|
//如果在白名单里则自行catch逻辑处理
|
||||||
if (statusWhiteList.includes(status)) return Promise.reject(res);
|
if (statusWhiteList.includes(status)) return Promise.reject(res);
|
||||||
|
|
||||||
@@ -260,12 +284,12 @@ axios.interceptors.response.use(
|
|||||||
|
|
||||||
// OAuth2 业务错误码提示
|
// OAuth2 业务错误码提示
|
||||||
if (status > 2000 && !validatenull(res.data.error_description)) {
|
if (status > 2000 && !validatenull(res.data.error_description)) {
|
||||||
return Promise.reject(notifiedError(message));
|
return Promise.reject(notifiedError(message, config));
|
||||||
}
|
}
|
||||||
|
|
||||||
// 其余非 200 响应统一提示
|
// 其余非 200 响应统一提示
|
||||||
if (status !== 200) {
|
if (status !== 200) {
|
||||||
return Promise.reject(notifiedError(message));
|
return Promise.reject(notifiedError(message, config));
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
},
|
},
|
||||||
@@ -273,7 +297,11 @@ axios.interceptors.response.use(
|
|||||||
NProgress.done();
|
NProgress.done();
|
||||||
// 网络级失败(HTTP 状态 >500、网关错误、超时、断网等 validateStatus 放行之外的响应)
|
// 网络级失败(HTTP 状态 >500、网关错误、超时、断网等 validateStatus 放行之外的响应)
|
||||||
// 原为静默 reject,接口报错页面无任何感知;统一补错误提示,取消请求与刷新令牌请求除外
|
// 原为静默 reject,接口报错页面无任何感知;统一补错误提示,取消请求与刷新令牌请求除外
|
||||||
if (!axios.isCancel(error) && !isRefreshTokenRequest(error?.config)) {
|
if (
|
||||||
|
!axios.isCancel(error) &&
|
||||||
|
!isRefreshTokenRequest(error?.config) &&
|
||||||
|
error?.config?.meta?.suppressErrorMessage !== true
|
||||||
|
) {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
message: error?.response?.data?.msg || '请求失败,请稍后重试',
|
message: error?.response?.data?.msg || '请求失败,请稍后重试',
|
||||||
type: 'error',
|
type: 'error',
|
||||||
|
|||||||
@@ -12,6 +12,8 @@ import { h } from 'vue';
|
|||||||
* 1. 混入本 mixin:mixins: [organizationSearch]
|
* 1. 混入本 mixin:mixins: [organizationSearch]
|
||||||
* 2. option 中「所属组织」列加上 searchslot: true(prop 为 organizationName 或 deptName 均可)
|
* 2. option 中「所属组织」列加上 searchslot: true(prop 为 organizationName 或 deptName 均可)
|
||||||
* 3. 在 created / 初始化时调用 this.loadOrganizationOptions()
|
* 3. 在 created / 初始化时调用 this.loadOrganizationOptions()
|
||||||
|
* 4. 需要「未分配组织」筛选项的页面在 data 里置 enableUnassignedOrgFilter: true;
|
||||||
|
* 该项只追加进搜索树 organizationSearchTreeOptions,表单级联 organizationTreeOptions 不含哨兵
|
||||||
*
|
*
|
||||||
* 说明:
|
* 说明:
|
||||||
* - 自动识别 organizationName / deptName 两种 prop,并挂载 column.renderSearch
|
* - 自动识别 organizationName / deptName 两种 prop,并挂载 column.renderSearch
|
||||||
@@ -26,6 +28,12 @@ import { h } from 'vue';
|
|||||||
*/
|
*/
|
||||||
const ORG_PROPS = ['organizationName', 'deptName'];
|
const ORG_PROPS = ['organizationName', 'deptName'];
|
||||||
|
|
||||||
|
// 「未分配组织」筛选项的哨兵值:不是真实组织名,选中后提交给后端的就是这串字面量。
|
||||||
|
// 后端 TransportBusiConstant.UNASSIGNED_ORG_FILTER、DriverMapper.xml / TransportVehicleMapper.xml
|
||||||
|
// 的 organizationName 分支以及司机、车辆导出查询都按它改判为 organization_name = '';
|
||||||
|
// 后端换成空串会让整段组织条件不生效,筛选静默失效。前端与后端这几处必须同步修改。
|
||||||
|
const UNASSIGNED_ORG_FILTER = '__UNASSIGNED_ORG__';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -34,9 +42,18 @@ export default {
|
|||||||
organizationTreeOptions: [],
|
organizationTreeOptions: [],
|
||||||
organizationTreeFlatOptions: [],
|
organizationTreeFlatOptions: [],
|
||||||
organizationLoading: false,
|
organizationLoading: false,
|
||||||
|
// 组织筛选是否追加「未分配组织」一项;页面在 data 里覆盖为 true 才生效
|
||||||
|
enableUnassignedOrgFilter: false,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
// 搜索栏级联的选项:开关打开时在真实组织最前面追加「未分配组织」。
|
||||||
|
// 不能直接改 organizationTreeOptions——司机/车辆页的编辑表单也用这棵树选组织。
|
||||||
|
organizationSearchTreeOptions() {
|
||||||
|
return this.enableUnassignedOrgFilter
|
||||||
|
? [this.unassignedOrgOption(), ...this.organizationTreeOptions]
|
||||||
|
: this.organizationTreeOptions;
|
||||||
|
},
|
||||||
// 所属组织级联配置:checkStrictly 允许选中任意层级,不必选到末级
|
// 所属组织级联配置:checkStrictly 允许选中任意层级,不必选到末级
|
||||||
organizationCascaderProps() {
|
organizationCascaderProps() {
|
||||||
return {
|
return {
|
||||||
@@ -61,7 +78,7 @@ export default {
|
|||||||
? this.excludeExternalOrganization(source)
|
? this.excludeExternalOrganization(source)
|
||||||
: source;
|
: source;
|
||||||
this.organizationTreeOptions = this.normalizeOrgTree(tree);
|
this.organizationTreeOptions = this.normalizeOrgTree(tree);
|
||||||
this.organizationTreeFlatOptions = this.flattenOrgTree(this.organizationTreeOptions);
|
this.organizationTreeFlatOptions = this.flattenOrgTree(this.organizationSearchTreeOptions);
|
||||||
const option = this.tableOption || this.option;
|
const option = this.tableOption || this.option;
|
||||||
if (!option) return;
|
if (!option) return;
|
||||||
ORG_PROPS.forEach(prop => {
|
ORG_PROPS.forEach(prop => {
|
||||||
@@ -100,12 +117,20 @@ export default {
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
// 哨兵节点的 id 与 rawLabel 都取哨兵值,resolveOrgName 取到的仍是哨兵而不是某个真实组织名
|
||||||
|
unassignedOrgOption() {
|
||||||
|
return { id: UNASSIGNED_ORG_FILTER, label: '未分配组织', rawLabel: UNASSIGNED_ORG_FILTER };
|
||||||
|
},
|
||||||
flattenOrgTree(tree = []) {
|
flattenOrgTree(tree = []) {
|
||||||
return (tree || []).flatMap(item => [
|
return (tree || []).flatMap(item => [
|
||||||
{ id: String(item.id), label: item.label, rawLabel: item.rawLabel },
|
{ id: String(item.id), label: item.label, rawLabel: item.rawLabel },
|
||||||
...this.flattenOrgTree(item.children || []),
|
...this.flattenOrgTree(item.children || []),
|
||||||
]);
|
]);
|
||||||
},
|
},
|
||||||
|
// 组织列渲染用:空串或纯空白即「未分配组织」(组织列 NOT NULL,无组织存空串)
|
||||||
|
isBlankOrganizationName(value) {
|
||||||
|
return String(value ?? '').trim() === '';
|
||||||
|
},
|
||||||
// 兼容两种入参:级联路径数组(取末级)或单个部门 id
|
// 兼容两种入参:级联路径数组(取末级)或单个部门 id
|
||||||
findOrgById(id) {
|
findOrgById(id) {
|
||||||
const value = Array.isArray(id) ? id.at(-1) : id;
|
const value = Array.isArray(id) ? id.at(-1) : id;
|
||||||
@@ -155,7 +180,7 @@ export default {
|
|||||||
// 级联单选:modelValue 必须是 id 路径数组,否则控件内部状态会错乱导致无法再次选中
|
// 级联单选:modelValue 必须是 id 路径数组,否则控件内部状态会错乱导致无法再次选中
|
||||||
if (scope.row) scope.row[prop] = Array.isArray(value) ? value : [];
|
if (scope.row) scope.row[prop] = Array.isArray(value) ? value : [];
|
||||||
},
|
},
|
||||||
options: this.organizationTreeOptions,
|
options: this.organizationSearchTreeOptions,
|
||||||
props: {
|
props: {
|
||||||
label: 'label',
|
label: 'label',
|
||||||
value: 'id',
|
value: 'id',
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
export const transportTypeOptions = [
|
export const transportTypeOptions = [
|
||||||
{ label: '公路运输', value: '公路运输' },
|
{ label: '公路运输', value: '公路运输' },
|
||||||
{ label: '铁路运输', value: '铁路运输' },
|
{ label: '铁路运输', value: '铁路运输' },
|
||||||
{ label: '水路运输', value: '水路运输' },
|
{ label: '水路运输', value: '水路运输' },
|
||||||
@@ -42,6 +42,7 @@ export const waybillStatusOptions = [
|
|||||||
{ label: '草稿', value: 'draft' },
|
{ label: '草稿', value: 'draft' },
|
||||||
{ label: '待执行', value: 'pending' },
|
{ label: '待执行', value: 'pending' },
|
||||||
{ label: '进行中', value: 'running' },
|
{ label: '进行中', value: 'running' },
|
||||||
|
{ label: '待回单确认', value: 'pending_return_confirm' },
|
||||||
{ label: '已完成', value: 'completed' },
|
{ label: '已完成', value: 'completed' },
|
||||||
{ label: '已取消', value: 'cancelled' },
|
{ label: '已取消', value: 'cancelled' },
|
||||||
];
|
];
|
||||||
@@ -143,6 +144,17 @@ export const contractArchiveStatusOptions = [
|
|||||||
{ label: '已归档', value: '已归档' },
|
{ label: '已归档', value: '已归档' },
|
||||||
];
|
];
|
||||||
|
|
||||||
|
export const hcsSyncStatusOptions = [
|
||||||
|
{ label: '待推送', value: 'unsynced' },
|
||||||
|
{ label: '已推送', value: 'synced' },
|
||||||
|
{ label: '推送失败', value: 'failed' },
|
||||||
|
];
|
||||||
|
|
||||||
|
export const yesNoOptions = [
|
||||||
|
{ label: '是', value: true },
|
||||||
|
{ label: '否', value: false },
|
||||||
|
];
|
||||||
|
|
||||||
export const nodeOptions = [
|
export const nodeOptions = [
|
||||||
{ label: '接单', value: '接单' },
|
{ label: '接单', value: '接单' },
|
||||||
{ label: '到场', value: '到场' },
|
{ label: '到场', value: '到场' },
|
||||||
|
|||||||
@@ -0,0 +1,221 @@
|
|||||||
|
import {
|
||||||
|
approvalStatusOptions,
|
||||||
|
contractCategoryOptions,
|
||||||
|
createCrudOption,
|
||||||
|
hcsSyncStatusOptions,
|
||||||
|
signTypeOptions,
|
||||||
|
} from './common';
|
||||||
|
|
||||||
|
const listDicFormatter = res => {
|
||||||
|
const data = res?.data || res;
|
||||||
|
if (Array.isArray(data)) return data;
|
||||||
|
if (Array.isArray(data?.records)) return data.records;
|
||||||
|
if (Array.isArray(data?.data)) return data.data;
|
||||||
|
if (Array.isArray(data?.data?.records)) return data.data.records;
|
||||||
|
return [];
|
||||||
|
};
|
||||||
|
|
||||||
|
const projectNameDicFormatter = res => {
|
||||||
|
const list = listDicFormatter(res);
|
||||||
|
return list.filter(item => item && item.projectName && String(item.projectName).trim());
|
||||||
|
};
|
||||||
|
|
||||||
|
export const changeTypeOptions = [
|
||||||
|
{ label: '合同信息变更', value: '合同信息变更' },
|
||||||
|
{ label: '结算规则变更', value: '结算规则变更' },
|
||||||
|
];
|
||||||
|
|
||||||
|
export const config = {
|
||||||
|
title: '合同变更',
|
||||||
|
permission: 'contract_change',
|
||||||
|
statusProp: 'approvalStatus',
|
||||||
|
statusTextProp: 'approvalStatusName',
|
||||||
|
deleteStatus: ['draft', 'withdrawn', 'rejected'],
|
||||||
|
editStatus: ['draft', 'withdrawn', 'rejected'],
|
||||||
|
viewStatus: ['approved'],
|
||||||
|
operations: [
|
||||||
|
{
|
||||||
|
action: 'submitApproval',
|
||||||
|
label: '提交',
|
||||||
|
statusProp: 'approvalStatus',
|
||||||
|
status: ['draft'],
|
||||||
|
permission: 'contract_change_submit',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
action: 'withdraw',
|
||||||
|
label: '撤回',
|
||||||
|
statusProp: 'approvalStatus',
|
||||||
|
status: ['reviewing'],
|
||||||
|
permission: 'contract_change_withdraw',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
action: 'mkAudit',
|
||||||
|
label: '流程',
|
||||||
|
statusProp: 'approvalStatus',
|
||||||
|
status: ['reviewing', 'rejected', 'approved'],
|
||||||
|
permission: 'contract_change_approve',
|
||||||
|
mkOnly: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
action: 'approve',
|
||||||
|
label: '通过',
|
||||||
|
type: 'success',
|
||||||
|
statusProp: 'approvalStatus',
|
||||||
|
status: ['reviewing'],
|
||||||
|
permission: 'contract_change_approve',
|
||||||
|
localOnly: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
action: 'reject',
|
||||||
|
label: '驳回',
|
||||||
|
type: 'warning',
|
||||||
|
statusProp: 'approvalStatus',
|
||||||
|
status: ['reviewing'],
|
||||||
|
permission: 'contract_change_reject',
|
||||||
|
localOnly: true,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
|
|
||||||
|
export const option = createCrudOption([
|
||||||
|
{
|
||||||
|
label: '合同编号',
|
||||||
|
prop: 'contractNo',
|
||||||
|
search: true,
|
||||||
|
searchPlaceholder: '请输入',
|
||||||
|
searchOrder: 20,
|
||||||
|
minWidth: 160,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '合同名称',
|
||||||
|
prop: 'contractName',
|
||||||
|
search: true,
|
||||||
|
searchPlaceholder: '请输入',
|
||||||
|
searchOrder: 30,
|
||||||
|
minWidth: 180,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '所属项目',
|
||||||
|
prop: 'projectName',
|
||||||
|
search: true,
|
||||||
|
searchType: 'select',
|
||||||
|
searchPlaceholder: '请选择',
|
||||||
|
searchOrder: 60,
|
||||||
|
dicUrl: '/blade-transport/project-apply/list?current=1&size=9999&contractSelectable=true',
|
||||||
|
dicFormatter: projectNameDicFormatter,
|
||||||
|
props: {
|
||||||
|
label: 'projectName',
|
||||||
|
value: 'projectName',
|
||||||
|
},
|
||||||
|
filterable: true,
|
||||||
|
minWidth: 160,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '所属组织',
|
||||||
|
prop: 'organizationName',
|
||||||
|
search: true,
|
||||||
|
searchPlaceholder: '请输入',
|
||||||
|
searchOrder: 10,
|
||||||
|
minWidth: 150,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '合同类别',
|
||||||
|
prop: 'contractCategory',
|
||||||
|
type: 'select',
|
||||||
|
search: true,
|
||||||
|
searchPlaceholder: '请选择',
|
||||||
|
searchOrder: 70,
|
||||||
|
dicData: contractCategoryOptions,
|
||||||
|
minWidth: 130,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '签约类型',
|
||||||
|
prop: 'signType',
|
||||||
|
type: 'select',
|
||||||
|
search: true,
|
||||||
|
searchPlaceholder: '请选择',
|
||||||
|
searchOrder: 50,
|
||||||
|
dicData: signTypeOptions,
|
||||||
|
minWidth: 120,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '甲方',
|
||||||
|
prop: 'partyA',
|
||||||
|
minWidth: 160,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '乙方',
|
||||||
|
prop: 'partyB',
|
||||||
|
minWidth: 160,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '开始日期',
|
||||||
|
prop: 'startDate',
|
||||||
|
type: 'date',
|
||||||
|
format: 'YYYY-MM-DD',
|
||||||
|
valueFormat: 'YYYY-MM-DD',
|
||||||
|
minWidth: 130,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '结束日期',
|
||||||
|
prop: 'endDate',
|
||||||
|
type: 'date',
|
||||||
|
format: 'YYYY-MM-DD',
|
||||||
|
valueFormat: 'YYYY-MM-DD',
|
||||||
|
minWidth: 130,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '临时效力起',
|
||||||
|
prop: 'temporaryStartDate',
|
||||||
|
type: 'date',
|
||||||
|
format: 'YYYY-MM-DD',
|
||||||
|
valueFormat: 'YYYY-MM-DD',
|
||||||
|
minWidth: 130,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '临时效力止',
|
||||||
|
prop: 'temporaryEndDate',
|
||||||
|
type: 'date',
|
||||||
|
format: 'YYYY-MM-DD',
|
||||||
|
valueFormat: 'YYYY-MM-DD',
|
||||||
|
minWidth: 130,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '经办人',
|
||||||
|
prop: 'handlerUserName',
|
||||||
|
minWidth: 120,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '创建时间',
|
||||||
|
prop: 'createTime',
|
||||||
|
type: 'datetime',
|
||||||
|
minWidth: 170,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '审核状态',
|
||||||
|
prop: 'approvalStatus',
|
||||||
|
type: 'select',
|
||||||
|
search: true,
|
||||||
|
searchPlaceholder: '请选择',
|
||||||
|
searchOrder: 40,
|
||||||
|
dicData: approvalStatusOptions,
|
||||||
|
minWidth: 110,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '当前节点',
|
||||||
|
prop: 'currentNode',
|
||||||
|
minWidth: 120,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '当前处理人',
|
||||||
|
prop: 'currentProcessor',
|
||||||
|
minWidth: 120,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '同步状态',
|
||||||
|
prop: 'syncStatus',
|
||||||
|
type: 'select',
|
||||||
|
dicData: hcsSyncStatusOptions,
|
||||||
|
minWidth: 110,
|
||||||
|
},
|
||||||
|
]);
|
||||||
@@ -7,9 +7,11 @@ import {
|
|||||||
createCrudOption,
|
createCrudOption,
|
||||||
effectiveTypeOptions,
|
effectiveTypeOptions,
|
||||||
nonNegativeRule,
|
nonNegativeRule,
|
||||||
|
hcsSyncStatusOptions,
|
||||||
selectRule,
|
selectRule,
|
||||||
signTypeOptions,
|
signTypeOptions,
|
||||||
textRule,
|
textRule,
|
||||||
|
yesNoOptions,
|
||||||
} from './common';
|
} from './common';
|
||||||
|
|
||||||
const contractSettlementModeOptions = [
|
const contractSettlementModeOptions = [
|
||||||
@@ -63,10 +65,12 @@ export const config = {
|
|||||||
['contractName', '合同名称'],
|
['contractName', '合同名称'],
|
||||||
['projectName', '所属项目'],
|
['projectName', '所属项目'],
|
||||||
['organizationName', '合同负责部门'],
|
['organizationName', '合同负责部门'],
|
||||||
|
['platformCompanyName', '平台公司'],
|
||||||
['contractCategory', '合同类别'],
|
['contractCategory', '合同类别'],
|
||||||
['signType', '签约类型'],
|
['signType', '签约类型'],
|
||||||
['partyA', '甲方'],
|
['partyA', '甲方'],
|
||||||
['partyB', '乙方'],
|
['partyB', '乙方'],
|
||||||
|
['partyC', '丙方'],
|
||||||
['handlerUserName', '经办人'],
|
['handlerUserName', '经办人'],
|
||||||
['signDate', '签订日期'],
|
['signDate', '签订日期'],
|
||||||
['applyDate', '申请日期'],
|
['applyDate', '申请日期'],
|
||||||
@@ -245,15 +249,26 @@ export const option = createCrudOption([
|
|||||||
hide: true,
|
hide: true,
|
||||||
labelWidth: 0,
|
labelWidth: 0,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: '客商',
|
||||||
|
prop: 'partyName',
|
||||||
|
search: true,
|
||||||
|
searchOrder: 14,
|
||||||
|
searchPlaceholder: '请输入甲/乙方名称',
|
||||||
|
hide: true,
|
||||||
|
display: false,
|
||||||
|
addDisplay: false,
|
||||||
|
editDisplay: false,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: '合同编号',
|
label: '合同编号',
|
||||||
prop: 'contractNo',
|
prop: 'contractNo',
|
||||||
search: true,
|
search: true,
|
||||||
searchOrder: 6,
|
searchOrder: 8,
|
||||||
searchPlaceholder: '请输入',
|
searchPlaceholder: '请输入',
|
||||||
order: 185,
|
order: 185,
|
||||||
disabled: true,
|
maxlength: 100,
|
||||||
placeholder: '不填写,则系统自动生成',
|
placeholder: '不填写则按部门规则自动生成',
|
||||||
minWidth: 200,
|
minWidth: 200,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -262,7 +277,7 @@ export const option = createCrudOption([
|
|||||||
align: 'left',
|
align: 'left',
|
||||||
headerAlign: 'left',
|
headerAlign: 'left',
|
||||||
search: true,
|
search: true,
|
||||||
searchOrder: 7,
|
searchOrder: 1,
|
||||||
searchPlaceholder: '请输入',
|
searchPlaceholder: '请输入',
|
||||||
order: 180,
|
order: 180,
|
||||||
slot: true,
|
slot: true,
|
||||||
@@ -274,7 +289,7 @@ export const option = createCrudOption([
|
|||||||
label: '所属项目',
|
label: '所属项目',
|
||||||
prop: 'projectName',
|
prop: 'projectName',
|
||||||
search: true,
|
search: true,
|
||||||
searchOrder: 8,
|
searchOrder: 11,
|
||||||
searchType: 'select',
|
searchType: 'select',
|
||||||
searchPlaceholder: '请选择',
|
searchPlaceholder: '请选择',
|
||||||
formslot: true,
|
formslot: true,
|
||||||
@@ -309,12 +324,19 @@ export const option = createCrudOption([
|
|||||||
minWidth: 150,
|
minWidth: 150,
|
||||||
rules: selectRule('合同负责部门'),
|
rules: selectRule('合同负责部门'),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: '平台公司',
|
||||||
|
prop: 'platformCompanyName',
|
||||||
|
minWidth: 180,
|
||||||
|
order: 115,
|
||||||
|
display: false,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: '合同类别',
|
label: '合同类别',
|
||||||
prop: 'contractCategory',
|
prop: 'contractCategory',
|
||||||
type: 'select',
|
type: 'select',
|
||||||
search: true,
|
search: true,
|
||||||
searchOrder: 9,
|
searchOrder: 12,
|
||||||
searchPlaceholder: '请选择',
|
searchPlaceholder: '请选择',
|
||||||
order: 170,
|
order: 170,
|
||||||
dicData: contractCategoryOptions,
|
dicData: contractCategoryOptions,
|
||||||
@@ -326,7 +348,7 @@ export const option = createCrudOption([
|
|||||||
prop: 'signType',
|
prop: 'signType',
|
||||||
type: 'select',
|
type: 'select',
|
||||||
search: true,
|
search: true,
|
||||||
searchOrder: 10,
|
searchOrder: 13,
|
||||||
searchPlaceholder: '请选择',
|
searchPlaceholder: '请选择',
|
||||||
span: 8,
|
span: 8,
|
||||||
order: 190,
|
order: 190,
|
||||||
@@ -335,11 +357,11 @@ export const option = createCrudOption([
|
|||||||
rules: selectRule('签约类型'),
|
rules: selectRule('签约类型'),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '生效类型',
|
label: '合同状态',
|
||||||
prop: 'effectiveType',
|
prop: 'effectiveType',
|
||||||
type: 'select',
|
type: 'select',
|
||||||
search: true,
|
search: true,
|
||||||
searchOrder: 5,
|
searchOrder: 6,
|
||||||
searchPlaceholder: '请选择',
|
searchPlaceholder: '请选择',
|
||||||
dicData: effectiveTypeOptions,
|
dicData: effectiveTypeOptions,
|
||||||
hide: true,
|
hide: true,
|
||||||
@@ -348,24 +370,23 @@ export const option = createCrudOption([
|
|||||||
{
|
{
|
||||||
label: '甲方',
|
label: '甲方',
|
||||||
prop: 'partyA',
|
prop: 'partyA',
|
||||||
type: 'select',
|
|
||||||
formslot: true,
|
|
||||||
disabled: true,
|
|
||||||
order: 160,
|
|
||||||
filterable: true,
|
|
||||||
minWidth: 160,
|
minWidth: 160,
|
||||||
rules: selectRule('甲方'),
|
addDisplay: false,
|
||||||
|
editDisplay: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '乙方',
|
label: '乙方',
|
||||||
prop: 'partyB',
|
prop: 'partyB',
|
||||||
type: 'select',
|
|
||||||
formslot: true,
|
|
||||||
disabled: true,
|
|
||||||
order: 150,
|
|
||||||
filterable: true,
|
|
||||||
minWidth: 160,
|
minWidth: 160,
|
||||||
rules: selectRule('乙方'),
|
addDisplay: false,
|
||||||
|
editDisplay: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '丙方',
|
||||||
|
prop: 'partyC',
|
||||||
|
minWidth: 160,
|
||||||
|
addDisplay: false,
|
||||||
|
editDisplay: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '合同期限',
|
label: '合同期限',
|
||||||
@@ -606,6 +627,50 @@ export const option = createCrudOption([
|
|||||||
addDisplay: false,
|
addDisplay: false,
|
||||||
editDisplay: false,
|
editDisplay: false,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: '合规状态',
|
||||||
|
prop: 'hcsSyncStatus',
|
||||||
|
type: 'select',
|
||||||
|
search: true,
|
||||||
|
searchOrder: 7,
|
||||||
|
searchPlaceholder: '请选择',
|
||||||
|
slot: true,
|
||||||
|
dicData: hcsSyncStatusOptions,
|
||||||
|
minWidth: 110,
|
||||||
|
addDisplay: false,
|
||||||
|
editDisplay: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '金蝶合同ID',
|
||||||
|
prop: 'kingdeeId',
|
||||||
|
minWidth: 130,
|
||||||
|
addDisplay: false,
|
||||||
|
editDisplay: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '是否同步金蝶',
|
||||||
|
prop: 'kingdeeSynced',
|
||||||
|
type: 'select',
|
||||||
|
search: true,
|
||||||
|
searchPlaceholder: '请选择',
|
||||||
|
searchOrder: 9,
|
||||||
|
dicData: yesNoOptions,
|
||||||
|
hide: true,
|
||||||
|
addDisplay: false,
|
||||||
|
editDisplay: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '是否同步合规',
|
||||||
|
prop: 'hcsSynced',
|
||||||
|
type: 'select',
|
||||||
|
search: true,
|
||||||
|
searchPlaceholder: '请选择',
|
||||||
|
searchOrder: 10,
|
||||||
|
dicData: yesNoOptions,
|
||||||
|
hide: true,
|
||||||
|
addDisplay: false,
|
||||||
|
editDisplay: false,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: '当前节点',
|
label: '当前节点',
|
||||||
prop: 'currentNode',
|
prop: 'currentNode',
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import {
|
|||||||
businessModeOptions,
|
businessModeOptions,
|
||||||
businessTypeOptions,
|
businessTypeOptions,
|
||||||
createCrudOption,
|
createCrudOption,
|
||||||
|
hcsSyncStatusOptions,
|
||||||
nonNegativeRule,
|
nonNegativeRule,
|
||||||
projectApprovalStatusOptions,
|
projectApprovalStatusOptions,
|
||||||
projectSourceOptions,
|
projectSourceOptions,
|
||||||
@@ -10,6 +11,7 @@ import {
|
|||||||
selectRule,
|
selectRule,
|
||||||
settlementModeOptions,
|
settlementModeOptions,
|
||||||
textRule,
|
textRule,
|
||||||
|
yesNoOptions,
|
||||||
} from './common';
|
} from './common';
|
||||||
|
|
||||||
const projectEffectiveTypeOptions = [
|
const projectEffectiveTypeOptions = [
|
||||||
@@ -97,7 +99,8 @@ export const config = {
|
|||||||
action: 'startChange',
|
action: 'startChange',
|
||||||
label: '变更',
|
label: '变更',
|
||||||
statusProp: 'approvalStatus',
|
statusProp: 'approvalStatus',
|
||||||
status: ['approved'],
|
// 立项通过、变更通过后均可再次发起变更
|
||||||
|
status: ['approved', 'change_approved'],
|
||||||
permission: 'project_apply_change',
|
permission: 'project_apply_change',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
@@ -405,6 +408,57 @@ export const option = createCrudOption([
|
|||||||
addDisplay: false,
|
addDisplay: false,
|
||||||
editDisplay: false,
|
editDisplay: false,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: '合规状态',
|
||||||
|
prop: 'hcsSyncStatus',
|
||||||
|
type: 'select',
|
||||||
|
search: true,
|
||||||
|
searchPlaceholder: '请选择',
|
||||||
|
searchOrder: 1,
|
||||||
|
slot: true,
|
||||||
|
dicData: hcsSyncStatusOptions,
|
||||||
|
minWidth: 110,
|
||||||
|
addDisplay: false,
|
||||||
|
editDisplay: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '金蝶项目ID',
|
||||||
|
prop: 'kingdeeId',
|
||||||
|
minWidth: 130,
|
||||||
|
addDisplay: false,
|
||||||
|
editDisplay: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '金蝶项目编号',
|
||||||
|
prop: 'kingdeeNumber',
|
||||||
|
minWidth: 130,
|
||||||
|
addDisplay: false,
|
||||||
|
editDisplay: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '是否同步金蝶',
|
||||||
|
prop: 'kingdeeSynced',
|
||||||
|
type: 'select',
|
||||||
|
search: true,
|
||||||
|
searchPlaceholder: '请选择',
|
||||||
|
searchOrder: 2,
|
||||||
|
dicData: yesNoOptions,
|
||||||
|
hide: true,
|
||||||
|
addDisplay: false,
|
||||||
|
editDisplay: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '是否同步合规',
|
||||||
|
prop: 'hcsSynced',
|
||||||
|
type: 'select',
|
||||||
|
search: true,
|
||||||
|
searchPlaceholder: '请选择',
|
||||||
|
searchOrder: 3,
|
||||||
|
dicData: yesNoOptions,
|
||||||
|
hide: true,
|
||||||
|
addDisplay: false,
|
||||||
|
editDisplay: false,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: '生效类型',
|
label: '生效类型',
|
||||||
prop: 'effectiveType',
|
prop: 'effectiveType',
|
||||||
|
|||||||
@@ -0,0 +1,161 @@
|
|||||||
|
import {
|
||||||
|
approvalStatusOptions,
|
||||||
|
createCrudOption,
|
||||||
|
hcsSyncStatusOptions,
|
||||||
|
projectTypeOptions,
|
||||||
|
} from './common';
|
||||||
|
|
||||||
|
export const changeTypeOptions = [
|
||||||
|
{ label: '项目变更', value: '项目变更' },
|
||||||
|
{ label: '项目备案调整', value: '项目备案调整' },
|
||||||
|
];
|
||||||
|
|
||||||
|
export const config = {
|
||||||
|
title: '项目变更',
|
||||||
|
permission: 'project_change',
|
||||||
|
statusProp: 'approvalStatus',
|
||||||
|
statusTextProp: 'approvalStatusName',
|
||||||
|
deleteStatus: ['draft', 'withdrawn', 'rejected'],
|
||||||
|
editStatus: ['draft', 'withdrawn', 'rejected'],
|
||||||
|
viewStatus: ['approved', 'rejected', 'withdrawn'],
|
||||||
|
operations: [
|
||||||
|
{
|
||||||
|
action: 'submitApproval',
|
||||||
|
label: '提交',
|
||||||
|
statusProp: 'approvalStatus',
|
||||||
|
status: ['draft'],
|
||||||
|
permission: 'project_change_submit',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
action: 'withdraw',
|
||||||
|
label: '撤回',
|
||||||
|
statusProp: 'approvalStatus',
|
||||||
|
status: ['reviewing'],
|
||||||
|
permission: 'project_change_withdraw',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
action: 'mkAudit',
|
||||||
|
label: '流程',
|
||||||
|
statusProp: 'approvalStatus',
|
||||||
|
status: ['reviewing'],
|
||||||
|
permission: 'project_change_approve',
|
||||||
|
mkOnly: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
action: 'approve',
|
||||||
|
label: '通过',
|
||||||
|
type: 'success',
|
||||||
|
statusProp: 'approvalStatus',
|
||||||
|
status: ['reviewing'],
|
||||||
|
permission: 'project_change_approve',
|
||||||
|
localOnly: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
action: 'reject',
|
||||||
|
label: '驳回',
|
||||||
|
type: 'warning',
|
||||||
|
statusProp: 'approvalStatus',
|
||||||
|
status: ['reviewing'],
|
||||||
|
permission: 'project_change_reject',
|
||||||
|
localOnly: true,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
|
|
||||||
|
export const option = createCrudOption([
|
||||||
|
{
|
||||||
|
label: '项目编号',
|
||||||
|
prop: 'projectCode',
|
||||||
|
search: true,
|
||||||
|
searchPlaceholder: '请输入',
|
||||||
|
searchOrder: 70,
|
||||||
|
minWidth: 160,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '项目名称',
|
||||||
|
prop: 'projectName',
|
||||||
|
search: true,
|
||||||
|
searchPlaceholder: '请输入',
|
||||||
|
searchOrder: 60,
|
||||||
|
minWidth: 180,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '变更类型',
|
||||||
|
prop: 'changeType',
|
||||||
|
type: 'select',
|
||||||
|
search: true,
|
||||||
|
searchPlaceholder: '请选择',
|
||||||
|
searchOrder: 10,
|
||||||
|
dicData: changeTypeOptions,
|
||||||
|
minWidth: 130,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '项目类型',
|
||||||
|
prop: 'projectType',
|
||||||
|
type: 'select',
|
||||||
|
search: true,
|
||||||
|
searchPlaceholder: '请选择',
|
||||||
|
searchOrder: 20,
|
||||||
|
dicData: projectTypeOptions,
|
||||||
|
minWidth: 110,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '客户名称',
|
||||||
|
prop: 'customerNames',
|
||||||
|
minWidth: 160,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '下游承运商',
|
||||||
|
prop: 'carrierNames',
|
||||||
|
minWidth: 160,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '承办部门',
|
||||||
|
prop: 'undertakeDeptName',
|
||||||
|
search: true,
|
||||||
|
searchPlaceholder: '请输入',
|
||||||
|
searchOrder: 50,
|
||||||
|
minWidth: 140,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '项目负责人',
|
||||||
|
prop: 'principalUserName',
|
||||||
|
search: true,
|
||||||
|
searchPlaceholder: '请输入',
|
||||||
|
searchOrder: 40,
|
||||||
|
minWidth: 120,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '审批状态',
|
||||||
|
prop: 'approvalStatus',
|
||||||
|
type: 'select',
|
||||||
|
search: true,
|
||||||
|
searchPlaceholder: '请选择',
|
||||||
|
searchOrder: 30,
|
||||||
|
dicData: approvalStatusOptions,
|
||||||
|
minWidth: 110,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '当前节点',
|
||||||
|
prop: 'currentNode',
|
||||||
|
minWidth: 120,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '当前处理人',
|
||||||
|
prop: 'currentProcessor',
|
||||||
|
minWidth: 120,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '审核通过时间',
|
||||||
|
prop: 'approvedTime',
|
||||||
|
type: 'datetime',
|
||||||
|
minWidth: 170,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '同步状态',
|
||||||
|
prop: 'syncStatus',
|
||||||
|
type: 'select',
|
||||||
|
dicData: hcsSyncStatusOptions,
|
||||||
|
minWidth: 110,
|
||||||
|
},
|
||||||
|
]);
|
||||||
@@ -124,7 +124,8 @@ const formatGoodsInfo = row => {
|
|||||||
const text = Object.entries(groups)
|
const text = Object.entries(groups)
|
||||||
.map(([unit, group]) => {
|
.map(([unit, group]) => {
|
||||||
const quantity = formatGoodsQuantity(group.quantity);
|
const quantity = formatGoodsQuantity(group.quantity);
|
||||||
return `${group.typeName}等${group.count}种货物 | ${quantity}${unit ? ` ${unit}` : ''}`;
|
const typeName = group.count > 1 ? `${group.typeName}等${group.count}种货物` : group.typeName;
|
||||||
|
return `${typeName} | ${quantity}${unit ? ` ${unit}` : ''}`;
|
||||||
})
|
})
|
||||||
.join('; ');
|
.join('; ');
|
||||||
|
|
||||||
|
|||||||
@@ -471,7 +471,7 @@ export const config = {
|
|||||||
endDateRange: ['endDateStart', 'endDateEnd'],
|
endDateRange: ['endDateStart', 'endDateEnd'],
|
||||||
createTimeRange: ['createTimeStart', 'createTimeEnd'],
|
createTimeRange: ['createTimeStart', 'createTimeEnd'],
|
||||||
},
|
},
|
||||||
actions: ['copy', 'cancel', 'reassign', 'complete', 'batchComplete'],
|
actions: ['copy', 'cancel', 'reassign', 'complete', 'batchComplete', 'confirmReturn'],
|
||||||
detailButton: true,
|
detailButton: true,
|
||||||
statusProp: 'businessStatus',
|
statusProp: 'businessStatus',
|
||||||
statusTextProp: 'businessStatusName',
|
statusTextProp: 'businessStatusName',
|
||||||
@@ -483,6 +483,8 @@ export const config = {
|
|||||||
row.requireAccept === true ||
|
row.requireAccept === true ||
|
||||||
row.requireAccept === 1 ||
|
row.requireAccept === 1 ||
|
||||||
requiresDriverAcceptConfirmation(row);
|
requiresDriverAcceptConfirmation(row);
|
||||||
|
// 待回单确认由末位打卡产生,司机必然已接单
|
||||||
|
if (status === 'pending_return_confirm') return '待回单确认';
|
||||||
// 需司机接单且尚未接单 → 待执行(含库中仍为 running 的历史数据展示校正)
|
// 需司机接单且尚未接单 → 待执行(含库中仍为 running 的历史数据展示校正)
|
||||||
if (needAccept && !hasDriverAcceptRecord(row) && !terminalStatuses.includes(status)) {
|
if (needAccept && !hasDriverAcceptRecord(row) && !terminalStatuses.includes(status)) {
|
||||||
return '待执行';
|
return '待执行';
|
||||||
@@ -504,7 +506,7 @@ export const config = {
|
|||||||
return !isDriverRejectedWaybill(row);
|
return !isDriverRejectedWaybill(row);
|
||||||
},
|
},
|
||||||
canCancel(row) {
|
canCancel(row) {
|
||||||
// 进行中的运单不允许取消
|
// 进行中的运单不允许取消;待回单确认仍可取消(与页面 canCancel 一致)
|
||||||
return !isInProgressStatus(row, row.businessStatusName);
|
return !isInProgressStatus(row, row.businessStatusName);
|
||||||
},
|
},
|
||||||
deleteStatus: ['draft'],
|
deleteStatus: ['draft'],
|
||||||
|
|||||||
@@ -52,7 +52,8 @@ export const paymentApplicationOption = ({
|
|||||||
searchShow: true,
|
searchShow: true,
|
||||||
searchIcon: true,
|
searchIcon: true,
|
||||||
searchLabelWidth: 88,
|
searchLabelWidth: 88,
|
||||||
searchMenuSpan: 24,
|
// 查询/重置紧跟首行 4 个条件(4×5 + 菜单 4 = 24),不再独占下一整行
|
||||||
|
searchMenuSpan: 4,
|
||||||
searchIndex: 4,
|
searchIndex: 4,
|
||||||
searchMenuPosition: 'right',
|
searchMenuPosition: 'right',
|
||||||
border: true,
|
border: true,
|
||||||
@@ -78,6 +79,7 @@ export const paymentApplicationOption = ({
|
|||||||
prop: 'paymentNo',
|
prop: 'paymentNo',
|
||||||
slot: true,
|
slot: true,
|
||||||
search: true,
|
search: true,
|
||||||
|
searchSpan: 5,
|
||||||
searchOrder: 9,
|
searchOrder: 9,
|
||||||
searchPlaceholder: '请输入',
|
searchPlaceholder: '请输入',
|
||||||
minWidth: 150,
|
minWidth: 150,
|
||||||
@@ -88,6 +90,7 @@ export const paymentApplicationOption = ({
|
|||||||
type: 'daterange',
|
type: 'daterange',
|
||||||
searchType: 'daterange',
|
searchType: 'daterange',
|
||||||
search: true,
|
search: true,
|
||||||
|
searchSpan: 5,
|
||||||
searchOrder: 8,
|
searchOrder: 8,
|
||||||
hide: true,
|
hide: true,
|
||||||
showColumn: false,
|
showColumn: false,
|
||||||
@@ -95,18 +98,24 @@ export const paymentApplicationOption = ({
|
|||||||
editDisplay: false,
|
editDisplay: false,
|
||||||
viewDisplay: false,
|
viewDisplay: false,
|
||||||
},
|
},
|
||||||
searchOnlyColumn({
|
{
|
||||||
label: '客户名称',
|
...searchOnlyColumn({
|
||||||
prop: 'payeeNameSearch',
|
label: '客户名称',
|
||||||
searchOrder: 7,
|
prop: 'payeeNameSearch',
|
||||||
searchProp: 'payeeName',
|
searchOrder: 7,
|
||||||
}),
|
searchProp: 'payeeName',
|
||||||
searchOnlyColumn({
|
}),
|
||||||
label: '项目名称',
|
searchSpan: 5,
|
||||||
prop: 'projectNameSearch',
|
},
|
||||||
searchOrder: 6,
|
{
|
||||||
searchProp: 'projectName',
|
...searchOnlyColumn({
|
||||||
}),
|
label: '项目名称',
|
||||||
|
prop: 'projectNameSearch',
|
||||||
|
searchOrder: 6,
|
||||||
|
searchProp: 'projectName',
|
||||||
|
}),
|
||||||
|
searchSpan: 5,
|
||||||
|
},
|
||||||
searchOnlyColumn({
|
searchOnlyColumn({
|
||||||
label: '关联结算单',
|
label: '关联结算单',
|
||||||
prop: 'settlementNo',
|
prop: 'settlementNo',
|
||||||
|
|||||||
@@ -0,0 +1,173 @@
|
|||||||
|
/**
|
||||||
|
* 正式结算单列表(avue-crud)配置
|
||||||
|
* ------------------------------------------------------------------
|
||||||
|
* 列表页与其它模块统一使用 avue-crud,头部 4 个按钮(刷新 / 列显隐 / 搜索显隐 /
|
||||||
|
* 显示方式)由 avue-crud 自带,不做二次封装。
|
||||||
|
*
|
||||||
|
* 表格列复用 formalSettlementTable.js 的 formalSettlementTableColumns(与弹窗内
|
||||||
|
* 明细表共用同一份列定义),此处只补充 avue 需要的展示/搜索属性,避免两处维护。
|
||||||
|
*
|
||||||
|
* ⚠️ searchOrder 为降序排序,值越大越靠前。
|
||||||
|
* ⚠️ 仅用于搜索的列必须 hide + showColumn: false,否则会混进「列显隐」抽屉。
|
||||||
|
* ⚠️ column 数组顺序 = 表格列顺序,搜索专用列统一放在数组最前面。
|
||||||
|
*/
|
||||||
|
|
||||||
|
import {
|
||||||
|
approvalStatusOptions,
|
||||||
|
invoiceStatusOptions,
|
||||||
|
kingdeeSyncStatusOptions,
|
||||||
|
paymentStatusOptions,
|
||||||
|
} from './formalSettlementSearch';
|
||||||
|
import { formalSettlementTableColumns } from './formalSettlementTable';
|
||||||
|
|
||||||
|
const textFormatter = (row, value) =>
|
||||||
|
value === null || value === undefined || value === '' ? '-' : value;
|
||||||
|
|
||||||
|
/** 金额统一展示:两位小数 + 币种 */
|
||||||
|
const moneyFormatter = (row, value) =>
|
||||||
|
`${Number(value || 0).toFixed(2)} ${row?.currency || 'RMB'}`;
|
||||||
|
|
||||||
|
const pickLabel = (options, value) =>
|
||||||
|
options.find(item => item.value === value)?.label || value || '-';
|
||||||
|
|
||||||
|
const searchOnlyColumn = ({ label, prop, searchOrder, type = 'input', dicData }) => {
|
||||||
|
const column = {
|
||||||
|
label,
|
||||||
|
prop,
|
||||||
|
search: true,
|
||||||
|
searchOrder,
|
||||||
|
searchSpan: 5,
|
||||||
|
hide: true,
|
||||||
|
showColumn: false,
|
||||||
|
addDisplay: false,
|
||||||
|
editDisplay: false,
|
||||||
|
viewDisplay: false,
|
||||||
|
};
|
||||||
|
if (type === 'select') {
|
||||||
|
column.type = 'select';
|
||||||
|
column.searchPlaceholder = '请选择';
|
||||||
|
column.dicData = dicData || [];
|
||||||
|
} else if (type === 'daterange') {
|
||||||
|
column.type = 'daterange';
|
||||||
|
column.searchType = 'daterange';
|
||||||
|
column.searchPlaceholder = '请选择';
|
||||||
|
} else {
|
||||||
|
column.searchPlaceholder = '请输入';
|
||||||
|
}
|
||||||
|
return column;
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 表格列的 avue 增量配置:搜索项、插槽、覆盖宽度等 */
|
||||||
|
const COLUMN_EXTRA = {
|
||||||
|
formalSettlementNo: {
|
||||||
|
slot: true,
|
||||||
|
search: true,
|
||||||
|
searchSpan: 5,
|
||||||
|
searchOrder: 12,
|
||||||
|
searchPlaceholder: '请输入',
|
||||||
|
},
|
||||||
|
payerName: { search: true, searchSpan: 5, searchOrder: 7, searchPlaceholder: '请输入' },
|
||||||
|
payeeName: { search: true, searchSpan: 5, searchOrder: 6, searchPlaceholder: '请输入' },
|
||||||
|
projectName: { search: true, searchSpan: 5, searchOrder: 11, searchPlaceholder: '请输入' },
|
||||||
|
deptName: { search: true, searchslot: true, searchSpan: 5, searchOrder: 10 },
|
||||||
|
contractNo: { search: true, searchSpan: 5, searchOrder: 9, searchPlaceholder: '请输入' },
|
||||||
|
invoiceStatusName: { slot: true },
|
||||||
|
paymentStatusName: { slot: true },
|
||||||
|
approvalStatusName: { slot: true },
|
||||||
|
adjustFlag: {
|
||||||
|
formatter: row => row.adjustStatusName || (row.originFormalSettlementNo ? '调整后单' : '-'),
|
||||||
|
},
|
||||||
|
kingdeeSyncStatus: {
|
||||||
|
slot: true,
|
||||||
|
search: true,
|
||||||
|
type: 'select',
|
||||||
|
dicData: kingdeeSyncStatusOptions,
|
||||||
|
searchSpan: 5,
|
||||||
|
searchOrder: 2,
|
||||||
|
searchPlaceholder: '请选择',
|
||||||
|
},
|
||||||
|
kingdeeLockStatus: { slot: true },
|
||||||
|
createTime: { width: 180 },
|
||||||
|
};
|
||||||
|
|
||||||
|
const buildTableColumns = () =>
|
||||||
|
formalSettlementTableColumns.map(column => {
|
||||||
|
const extra = { ...(COLUMN_EXTRA[column.prop] || {}) };
|
||||||
|
if (column.money) {
|
||||||
|
extra.formatter = moneyFormatter;
|
||||||
|
extra.align = 'right';
|
||||||
|
}
|
||||||
|
// link / status 标记的列统一走单元格插槽
|
||||||
|
if (column.link || column.status) extra.slot = true;
|
||||||
|
if (!extra.formatter) extra.formatter = textFormatter;
|
||||||
|
return { ...column, ...extra };
|
||||||
|
});
|
||||||
|
|
||||||
|
export const formalSettlementOption = () => ({
|
||||||
|
height: 'auto',
|
||||||
|
calcHeight: 32,
|
||||||
|
tip: false,
|
||||||
|
searchBtnText: '查询',
|
||||||
|
emptyBtnText: '重置',
|
||||||
|
searchShow: true,
|
||||||
|
searchIcon: true,
|
||||||
|
searchLabelWidth: 88,
|
||||||
|
// 查询/重置紧跟首行 4 个条件(4×5 + 菜单 4 = 24),不再独占下一整行
|
||||||
|
searchMenuSpan: 4,
|
||||||
|
searchIndex: 4,
|
||||||
|
searchMenuPosition: 'right',
|
||||||
|
border: true,
|
||||||
|
index: true,
|
||||||
|
indexLabel: '序号',
|
||||||
|
indexWidth: 64,
|
||||||
|
indexFixed: 'left',
|
||||||
|
selection: true,
|
||||||
|
selectionWidth: 52,
|
||||||
|
selectionFixed: 'left',
|
||||||
|
addBtn: false,
|
||||||
|
viewBtn: false,
|
||||||
|
delBtn: false,
|
||||||
|
editBtn: false,
|
||||||
|
menuWidth: 320,
|
||||||
|
menuFixed: 'right',
|
||||||
|
column: [
|
||||||
|
// ---------- 仅搜索列 ----------
|
||||||
|
searchOnlyColumn({
|
||||||
|
label: '预付结算单号',
|
||||||
|
prop: 'preSettlementNo',
|
||||||
|
searchOrder: 8,
|
||||||
|
}),
|
||||||
|
searchOnlyColumn({
|
||||||
|
label: '发票状态',
|
||||||
|
prop: 'invoiceStatus',
|
||||||
|
searchOrder: 5,
|
||||||
|
type: 'select',
|
||||||
|
dicData: invoiceStatusOptions,
|
||||||
|
}),
|
||||||
|
searchOnlyColumn({
|
||||||
|
label: '收付款状态',
|
||||||
|
prop: 'paymentStatus',
|
||||||
|
searchOrder: 4,
|
||||||
|
type: 'select',
|
||||||
|
dicData: paymentStatusOptions,
|
||||||
|
}),
|
||||||
|
searchOnlyColumn({
|
||||||
|
label: '审核状态',
|
||||||
|
prop: 'approvalStatus',
|
||||||
|
searchOrder: 3,
|
||||||
|
type: 'select',
|
||||||
|
dicData: approvalStatusOptions,
|
||||||
|
}),
|
||||||
|
searchOnlyColumn({
|
||||||
|
label: '生成日期',
|
||||||
|
prop: 'createDateRange',
|
||||||
|
searchOrder: 1,
|
||||||
|
type: 'daterange',
|
||||||
|
}),
|
||||||
|
// ---------- 表格列(部分兼搜索项) ----------
|
||||||
|
...buildTableColumns(),
|
||||||
|
],
|
||||||
|
});
|
||||||
|
|
||||||
|
export const kingdeeSyncName = value => pickLabel(kingdeeSyncStatusOptions, value);
|
||||||
|
export const paymentStatusName = value => pickLabel(paymentStatusOptions, value);
|
||||||
@@ -8,6 +8,8 @@ export const formalSettlementFormFields = [
|
|||||||
{ label: '收款方', prop: 'payeeName', readonly: true },
|
{ label: '收款方', prop: 'payeeName', readonly: true },
|
||||||
{ label: '结算类型', prop: 'settlementTypeName', readonly: true },
|
{ label: '结算类型', prop: 'settlementTypeName', readonly: true },
|
||||||
{ label: '结算金额', prop: 'settlementAmount', readonly: true, money: true },
|
{ label: '结算金额', prop: 'settlementAmount', readonly: true, money: true },
|
||||||
|
{ label: '业务模式', prop: 'businessModel', type: 'select', optionsKey: 'businessModelOptions' },
|
||||||
|
{ label: '运输方式', prop: 'transportType', type: 'select', optionsKey: 'transportTypeOptions' },
|
||||||
{ label: '汇率日期', prop: 'exchangeRateDate', type: 'date', required: true },
|
{ label: '汇率日期', prop: 'exchangeRateDate', type: 'date', required: true },
|
||||||
{ label: '结算汇率', prop: 'exchangeRate', type: 'number', required: true },
|
{ label: '结算汇率', prop: 'exchangeRate', type: 'number', required: true },
|
||||||
{ label: '本位币合计', prop: 'localSettlementAmount', readonly: true, money: true },
|
{ label: '本位币合计', prop: 'localSettlementAmount', readonly: true, money: true },
|
||||||
@@ -25,6 +27,8 @@ export const createFormalSettlementForm = () => ({
|
|||||||
settlementType: '',
|
settlementType: '',
|
||||||
sourcePreSettlementIds: [],
|
sourcePreSettlementIds: [],
|
||||||
sourceDetailIds: [],
|
sourceDetailIds: [],
|
||||||
|
businessModel: '',
|
||||||
|
transportType: '',
|
||||||
exchangeRateDate: '',
|
exchangeRateDate: '',
|
||||||
exchangeRate: 1,
|
exchangeRate: 1,
|
||||||
createUserName: '',
|
createUserName: '',
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ export const kingdeeSyncStatusOptions = [
|
|||||||
|
|
||||||
export const formalSettlementSearchFields = [
|
export const formalSettlementSearchFields = [
|
||||||
{ label: '结算单号', prop: 'formalSettlementNo', type: 'input' },
|
{ label: '结算单号', prop: 'formalSettlementNo', type: 'input' },
|
||||||
{ label: '预结算单号', prop: 'preSettlementNo', type: 'input' },
|
{ label: '预付结算单号', prop: 'preSettlementNo', type: 'input' },
|
||||||
{ label: '项目', prop: 'projectName', type: 'input' },
|
{ label: '项目', prop: 'projectName', type: 'input' },
|
||||||
{ label: '所属组织', prop: 'deptName', type: 'cascader' },
|
{ label: '所属组织', prop: 'deptName', type: 'cascader' },
|
||||||
{ label: '合同编号', prop: 'contractNo', type: 'input' },
|
{ label: '合同编号', prop: 'contractNo', type: 'input' },
|
||||||
|
|||||||
@@ -8,6 +8,8 @@ export const formalSettlementTableColumns = [
|
|||||||
{ label: '合同编号', prop: 'contractNo', minWidth: 150 },
|
{ label: '合同编号', prop: 'contractNo', minWidth: 150 },
|
||||||
{ label: '合同名称', prop: 'contractName', minWidth: 170 },
|
{ label: '合同名称', prop: 'contractName', minWidth: 170 },
|
||||||
{ label: '原币结算金额', prop: 'settlementAmount', minWidth: 145, money: true },
|
{ label: '原币结算金额', prop: 'settlementAmount', minWidth: 145, money: true },
|
||||||
|
{ label: '业务模式', prop: 'businessModelName', minWidth: 120 },
|
||||||
|
{ label: '运输方式', prop: 'transportTypeName', minWidth: 120 },
|
||||||
{ label: '本位币结算金额', prop: 'localSettlementAmount', minWidth: 155, money: true },
|
{ label: '本位币结算金额', prop: 'localSettlementAmount', minWidth: 155, money: true },
|
||||||
{ label: '结算汇率', prop: 'exchangeRate', minWidth: 110 },
|
{ label: '结算汇率', prop: 'exchangeRate', minWidth: 110 },
|
||||||
{ label: '申请付款金额(含预付)', prop: 'appliedPaymentAmount', minWidth: 185, money: true },
|
{ label: '申请付款金额(含预付)', prop: 'appliedPaymentAmount', minWidth: 185, money: true },
|
||||||
@@ -19,6 +21,8 @@ export const formalSettlementTableColumns = [
|
|||||||
{ label: '审核状态', prop: 'approvalStatusName', minWidth: 110, status: true },
|
{ label: '审核状态', prop: 'approvalStatusName', minWidth: 110, status: true },
|
||||||
{ label: '当前节点', prop: 'currentNode', minWidth: 130 },
|
{ label: '当前节点', prop: 'currentNode', minWidth: 130 },
|
||||||
{ label: '当前处理人', prop: 'currentProcessor', minWidth: 130 },
|
{ label: '当前处理人', prop: 'currentProcessor', minWidth: 130 },
|
||||||
|
{ label: '调整标识', prop: 'adjustFlag', minWidth: 110 },
|
||||||
|
{ label: '来源原单号', prop: 'originFormalSettlementNo', minWidth: 170 },
|
||||||
{ label: '金蝶单据号', prop: 'kingdeeBillNo', minWidth: 150 },
|
{ label: '金蝶单据号', prop: 'kingdeeBillNo', minWidth: 150 },
|
||||||
{ label: '金蝶单据状态', prop: 'kingdeeSyncStatus', minWidth: 135 },
|
{ label: '金蝶单据状态', prop: 'kingdeeSyncStatus', minWidth: 135 },
|
||||||
{ label: '金蝶锁状态', prop: 'kingdeeLockStatus', minWidth: 150 },
|
{ label: '金蝶锁状态', prop: 'kingdeeLockStatus', minWidth: 150 },
|
||||||
@@ -28,7 +32,7 @@ export const formalSettlementTableColumns = [
|
|||||||
];
|
];
|
||||||
|
|
||||||
export const sourceColumns = [
|
export const sourceColumns = [
|
||||||
{ label: '预结算单号', prop: 'preSettlementNo', minWidth: 160 },
|
{ label: '预付结算单号', prop: 'preSettlementNo', minWidth: 160 },
|
||||||
{ label: '结算金额', prop: 'settlementAmount', minWidth: 130, money: true },
|
{ label: '结算金额', prop: 'settlementAmount', minWidth: 130, money: true },
|
||||||
{ label: '申请预付金额', prop: 'advanceAppliedAmount', minWidth: 140, money: true },
|
{ label: '申请预付金额', prop: 'advanceAppliedAmount', minWidth: 140, money: true },
|
||||||
{ label: '已付款金额', prop: 'advancePaidAmount', minWidth: 130, money: true },
|
{ label: '已付款金额', prop: 'advancePaidAmount', minWidth: 130, money: true },
|
||||||
@@ -48,11 +52,11 @@ export const detailColumns = [
|
|||||||
{ label: '运输总量', prop: 'transportQuantity', minWidth: 120 },
|
{ label: '运输总量', prop: 'transportQuantity', minWidth: 120 },
|
||||||
{ label: '里程(KM)', prop: 'mileage', minWidth: 120 },
|
{ label: '里程(KM)', prop: 'mileage', minWidth: 120 },
|
||||||
{ label: '批次号', prop: 'batchNo', minWidth: 120 },
|
{ label: '批次号', prop: 'batchNo', minWidth: 120 },
|
||||||
|
{ label: '计费方式', prop: 'billingType', minWidth: 130 },
|
||||||
{ label: '运输单价', prop: 'unitPrice', minWidth: 120, money: true },
|
{ label: '运输单价', prop: 'unitPrice', minWidth: 120, money: true },
|
||||||
{ label: '运费', prop: 'freightAmount', minWidth: 120, money: true },
|
{ label: '运费', prop: 'freightAmount', minWidth: 120, money: true },
|
||||||
{ label: '调整金额', prop: 'adjustAmount', minWidth: 120, money: true },
|
{ label: '调整金额', prop: 'adjustAmount', minWidth: 120, money: true },
|
||||||
{ label: '结算金额(含税)', prop: 'settlementAmountTax', minWidth: 155, money: true },
|
{ label: '结算金额(含税)', prop: 'settlementAmountTax', minWidth: 155, money: true },
|
||||||
{ label: '结算金额(不含税)', prop: 'settlementAmountNoTax', minWidth: 170, money: true },
|
|
||||||
{ label: '备注', prop: 'remark', minWidth: 180 },
|
{ label: '备注', prop: 'remark', minWidth: 180 },
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -66,7 +70,7 @@ export const summaryColumns = [
|
|||||||
];
|
];
|
||||||
|
|
||||||
export const candidateColumns = [
|
export const candidateColumns = [
|
||||||
{ label: '预结算单号', prop: 'preSettlementNo', minWidth: 170 },
|
{ label: '预付结算单号', prop: 'preSettlementNo', minWidth: 170 },
|
||||||
{ label: '项目名称', prop: 'projectName', minWidth: 140 },
|
{ label: '项目名称', prop: 'projectName', minWidth: 140 },
|
||||||
{ label: '所属组织', prop: 'deptName', minWidth: 140 },
|
{ label: '所属组织', prop: 'deptName', minWidth: 140 },
|
||||||
{ label: '合同编号', prop: 'contractNo', minWidth: 150 },
|
{ label: '合同编号', prop: 'contractNo', minWidth: 150 },
|
||||||
@@ -86,7 +90,7 @@ export const candidateDetailColumns = [
|
|||||||
{ label: '合同编号', prop: 'contractNo', minWidth: 150 },
|
{ label: '合同编号', prop: 'contractNo', minWidth: 150 },
|
||||||
{ label: '合同名称', prop: 'contractName', minWidth: 170 },
|
{ label: '合同名称', prop: 'contractName', minWidth: 170 },
|
||||||
{ label: '来源', prop: 'sourceType', minWidth: 110 },
|
{ label: '来源', prop: 'sourceType', minWidth: 110 },
|
||||||
{ label: '预结算单号', prop: 'preSettlementNo', minWidth: 160 },
|
{ label: '预付结算单号', prop: 'preSettlementNo', minWidth: 160 },
|
||||||
{ label: '正式结算单号', prop: 'formalSettlementNo', minWidth: 160 },
|
{ label: '正式结算单号', prop: 'formalSettlementNo', minWidth: 160 },
|
||||||
{ label: '运单号', prop: 'waybillNo', minWidth: 150 },
|
{ label: '运单号', prop: 'waybillNo', minWidth: 150 },
|
||||||
{ label: '车号', prop: 'vehicleNo', minWidth: 130 },
|
{ label: '车号', prop: 'vehicleNo', minWidth: 130 },
|
||||||
@@ -94,6 +98,7 @@ export const candidateDetailColumns = [
|
|||||||
{ label: '货物名称', prop: 'cargoName', minWidth: 140 },
|
{ label: '货物名称', prop: 'cargoName', minWidth: 140 },
|
||||||
{ label: '货物类型', prop: 'cargoType', minWidth: 130 },
|
{ label: '货物类型', prop: 'cargoType', minWidth: 130 },
|
||||||
{ label: '批次号', prop: 'batchNo', minWidth: 120 },
|
{ label: '批次号', prop: 'batchNo', minWidth: 120 },
|
||||||
|
{ label: '计费方式', prop: 'billingType', minWidth: 130 },
|
||||||
{ label: '应收应付合计', prop: 'totalAmount', minWidth: 140, money: true },
|
{ label: '应收应付合计', prop: 'totalAmount', minWidth: 140, money: true },
|
||||||
{ label: '状态', prop: 'settlementStatusName', minWidth: 110 },
|
{ label: '状态', prop: 'settlementStatusName', minWidth: 110 },
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ export const settlementTypeOptions = [
|
|||||||
];
|
];
|
||||||
|
|
||||||
export const preSettlementFormFields = [
|
export const preSettlementFormFields = [
|
||||||
{ label: '预结算单号', prop: 'preSettlementNo', readonly: true },
|
{ label: '预付结算单号', prop: 'preSettlementNo', readonly: true },
|
||||||
{ label: '合同名称', prop: 'contractId', type: 'contract', required: true },
|
{ label: '合同名称', prop: 'contractId', type: 'contract', required: true },
|
||||||
{ label: '合同编号', prop: 'contractNo', readonly: true },
|
{ label: '合同编号', prop: 'contractNo', readonly: true },
|
||||||
{ label: '项目名称', prop: 'projectName', readonly: true },
|
{ label: '项目名称', prop: 'projectName', readonly: true },
|
||||||
@@ -12,6 +12,8 @@ export const preSettlementFormFields = [
|
|||||||
{ label: '付款方', prop: 'payerName', readonly: true },
|
{ label: '付款方', prop: 'payerName', readonly: true },
|
||||||
{ label: '结算类型', prop: 'settlementType', readonly: true },
|
{ label: '结算类型', prop: 'settlementType', readonly: true },
|
||||||
{ label: '结算金额', prop: 'settlementAmount', readonly: true, money: true },
|
{ label: '结算金额', prop: 'settlementAmount', readonly: true, money: true },
|
||||||
|
{ label: '业务模式', prop: 'businessModel', type: 'select', optionsKey: 'businessModelOptions' },
|
||||||
|
{ label: '运输方式', prop: 'transportType', type: 'select', optionsKey: 'transportTypeOptions' },
|
||||||
{ label: '汇率日期', prop: 'exchangeRateDate', type: 'date' },
|
{ label: '汇率日期', prop: 'exchangeRateDate', type: 'date' },
|
||||||
{ label: '结算汇率', prop: 'exchangeRate', type: 'number', class: 'exchange-rate-input' },
|
{ label: '结算汇率', prop: 'exchangeRate', type: 'number', class: 'exchange-rate-input' },
|
||||||
{ label: '本位币合计', prop: 'localSettlementAmount', readonly: true, money: true },
|
{ label: '本位币合计', prop: 'localSettlementAmount', readonly: true, money: true },
|
||||||
@@ -64,6 +66,8 @@ export const emptyPreSettlementForm = () => ({
|
|||||||
settlementType: 'payable',
|
settlementType: 'payable',
|
||||||
currency: 'RMB',
|
currency: 'RMB',
|
||||||
settlementAmount: 0,
|
settlementAmount: 0,
|
||||||
|
businessModel: '',
|
||||||
|
transportType: '',
|
||||||
localCurrency: 'RMB',
|
localCurrency: 'RMB',
|
||||||
localSettlementAmount: 0,
|
localSettlementAmount: 0,
|
||||||
exchangeRateDate: '',
|
exchangeRateDate: '',
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ export const approvalStatusOptions = [
|
|||||||
];
|
];
|
||||||
|
|
||||||
export const preSettlementSearchFields = [
|
export const preSettlementSearchFields = [
|
||||||
{ label: '预结算单号', prop: 'preSettlementNo', type: 'input' },
|
{ label: '预付结算单号', prop: 'preSettlementNo', type: 'input' },
|
||||||
{ label: '预付单号', prop: 'advanceNo', type: 'input' },
|
{ label: '预付单号', prop: 'advanceNo', type: 'input' },
|
||||||
{ label: '项目名称', prop: 'projectName', type: 'input' },
|
{ label: '项目名称', prop: 'projectName', type: 'input' },
|
||||||
{ label: '所属组织', prop: 'deptName', type: 'cascader' },
|
{ label: '所属组织', prop: 'deptName', type: 'cascader' },
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
export const preSettlementTableColumns = [
|
export const preSettlementTableColumns = [
|
||||||
{ label: '预结算单号', prop: 'preSettlementNo', minWidth: 150, link: true, fixed: 'left' },
|
{ label: '预付结算单号', prop: 'preSettlementNo', minWidth: 150, link: true, fixed: 'left' },
|
||||||
{ label: '来源', prop: 'sourceType', minWidth: 100 },
|
{ label: '来源', prop: 'sourceType', minWidth: 100 },
|
||||||
{ label: '付款方', prop: 'payerName', minWidth: 160 },
|
{ label: '付款方', prop: 'payerName', minWidth: 160 },
|
||||||
{ label: '收款方', prop: 'payeeName', minWidth: 160 },
|
{ label: '收款方', prop: 'payeeName', minWidth: 160 },
|
||||||
@@ -8,6 +8,8 @@ export const preSettlementTableColumns = [
|
|||||||
{ label: '合同编号', prop: 'contractNo', minWidth: 140 },
|
{ label: '合同编号', prop: 'contractNo', minWidth: 140 },
|
||||||
{ label: '合同名称', prop: 'contractName', minWidth: 160 },
|
{ label: '合同名称', prop: 'contractName', minWidth: 160 },
|
||||||
{ label: '原币结算金额', prop: 'settlementAmount', minWidth: 140, money: true, precision: 2 },
|
{ label: '原币结算金额', prop: 'settlementAmount', minWidth: 140, money: true, precision: 2 },
|
||||||
|
{ label: '业务模式', prop: 'businessModelName', minWidth: 120 },
|
||||||
|
{ label: '运输方式', prop: 'transportTypeName', minWidth: 120 },
|
||||||
{ label: '本位币结算金额', prop: 'localSettlementAmount', minWidth: 150, money: true, precision: 2 },
|
{ label: '本位币结算金额', prop: 'localSettlementAmount', minWidth: 150, money: true, precision: 2 },
|
||||||
{ label: '结算汇率', prop: 'exchangeRate', minWidth: 110, precision: 2 },
|
{ label: '结算汇率', prop: 'exchangeRate', minWidth: 110, precision: 2 },
|
||||||
{
|
{
|
||||||
@@ -52,6 +54,7 @@ export const settlementDetailColumns = [
|
|||||||
{ label: '运输总量', prop: 'transportQuantityText', minWidth: 120 },
|
{ label: '运输总量', prop: 'transportQuantityText', minWidth: 120 },
|
||||||
{ label: '里程(KM)', prop: 'mileage', minWidth: 120 },
|
{ label: '里程(KM)', prop: 'mileage', minWidth: 120 },
|
||||||
{ label: '批次号', prop: 'batchNo', minWidth: 130 },
|
{ label: '批次号', prop: 'batchNo', minWidth: 130 },
|
||||||
|
{ label: '计费方式', prop: 'billingType', minWidth: 130 },
|
||||||
{ label: '运输单价', prop: 'unitPrice', minWidth: 120, money: true },
|
{ label: '运输单价', prop: 'unitPrice', minWidth: 120, money: true },
|
||||||
{ label: '运费', prop: 'freightAmount', minWidth: 120, money: true },
|
{ label: '运费', prop: 'freightAmount', minWidth: 120, money: true },
|
||||||
{ label: '原金额', prop: 'originalAmount', minWidth: 120, money: true },
|
{ label: '原金额', prop: 'originalAmount', minWidth: 120, money: true },
|
||||||
@@ -94,5 +97,6 @@ export const candidateDetailColumns = [
|
|||||||
{ label: '货物名称', prop: 'cargoName', minWidth: 140 },
|
{ label: '货物名称', prop: 'cargoName', minWidth: 140 },
|
||||||
{ label: '货物类型', prop: 'cargoType', minWidth: 130 },
|
{ label: '货物类型', prop: 'cargoType', minWidth: 130 },
|
||||||
{ label: '批次号', prop: 'batchNo', minWidth: 120 },
|
{ label: '批次号', prop: 'batchNo', minWidth: 120 },
|
||||||
|
{ label: '计费方式', prop: 'billingType', minWidth: 130 },
|
||||||
{ label: '结算金额', prop: 'totalAmount', minWidth: 130, money: true },
|
{ label: '结算金额', prop: 'totalAmount', minWidth: 130, money: true },
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ export const searchFields = [
|
|||||||
{ label: '货物名称', prop: 'cargoName', type: 'input' },
|
{ label: '货物名称', prop: 'cargoName', type: 'input' },
|
||||||
{ label: '合同编号', prop: 'contractNo', type: 'input' },
|
{ label: '合同编号', prop: 'contractNo', type: 'input' },
|
||||||
{ label: '合同名称', prop: 'contractName', type: 'input' },
|
{ label: '合同名称', prop: 'contractName', type: 'input' },
|
||||||
{ label: '预结算单号', prop: 'preSettlementNo', type: 'input' },
|
{ label: '预付结算单号', prop: 'preSettlementNo', type: 'input' },
|
||||||
{ label: '正式结算单号', prop: 'formalSettlementNo', type: 'input' },
|
{ label: '正式结算单号', prop: 'formalSettlementNo', type: 'input' },
|
||||||
{ label: '批次号', prop: 'batchNo', type: 'input' },
|
{ label: '批次号', prop: 'batchNo', type: 'input' },
|
||||||
{ label: '车号', prop: 'vehicleNo', type: 'input' },
|
{ label: '车号', prop: 'vehicleNo', type: 'input' },
|
||||||
@@ -35,7 +35,7 @@ export const tableColumns = [
|
|||||||
{ label: '合同编号', prop: 'contractNo', minWidth: 140 },
|
{ label: '合同编号', prop: 'contractNo', minWidth: 140 },
|
||||||
{ label: '合同名称', prop: 'contractName', minWidth: 140 },
|
{ label: '合同名称', prop: 'contractName', minWidth: 140 },
|
||||||
{ label: '来源', prop: 'sourceType', minWidth: 110 },
|
{ label: '来源', prop: 'sourceType', minWidth: 110 },
|
||||||
{ label: '预结算单号', prop: 'preSettlementNo', minWidth: 140, link: true },
|
{ label: '预付结算单号', prop: 'preSettlementNo', minWidth: 140, link: true },
|
||||||
{ label: '正式结算单号', prop: 'formalSettlementNo', minWidth: 140, link: true },
|
{ label: '正式结算单号', prop: 'formalSettlementNo', minWidth: 140, link: true },
|
||||||
{ label: '运单号', prop: 'waybillNo', minWidth: 140, link: true },
|
{ label: '运单号', prop: 'waybillNo', minWidth: 140, link: true },
|
||||||
{ label: '车号', prop: 'vehicleNo', minWidth: 120 },
|
{ label: '车号', prop: 'vehicleNo', minWidth: 120 },
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
export const settlementAdjustmentTableColumns = [
|
export const settlementAdjustmentTableColumns = [
|
||||||
{ label: '单据号', prop: 'adjustmentNo', minWidth: 160, link: true, fixed: 'left' },
|
{ label: '单据号', prop: 'adjustmentNo', minWidth: 160, link: true, fixed: 'left' },
|
||||||
{ label: '结算单号', prop: 'formalSettlementNo', minWidth: 160 },
|
{ label: '结算单号', prop: 'formalSettlementNo', minWidth: 160, link: true },
|
||||||
{ label: '结算单类型', prop: 'settlementTypeName', minWidth: 110 },
|
{ label: '结算单类型', prop: 'settlementTypeName', minWidth: 110 },
|
||||||
{ label: '项目名称', prop: 'projectName', minWidth: 140 },
|
{ label: '项目名称', prop: 'projectName', minWidth: 140 },
|
||||||
{ label: '所属组织', prop: 'deptName', minWidth: 140 },
|
{ label: '所属组织', prop: 'deptName', minWidth: 140 },
|
||||||
@@ -9,6 +9,8 @@ export const settlementAdjustmentTableColumns = [
|
|||||||
{ label: '合同名称', prop: 'contractName', minWidth: 170 },
|
{ label: '合同名称', prop: 'contractName', minWidth: 170 },
|
||||||
{ label: '调整金额', prop: 'adjustmentAmount', minWidth: 130, money: true },
|
{ label: '调整金额', prop: 'adjustmentAmount', minWidth: 130, money: true },
|
||||||
{ label: '审核状态', prop: 'approvalStatusName', minWidth: 110, status: true },
|
{ label: '审核状态', prop: 'approvalStatusName', minWidth: 110, status: true },
|
||||||
|
{ label: '金蝶单据状态', prop: 'kingdeeSyncStatus', minWidth: 130, kingdee: true },
|
||||||
|
{ label: '金蝶单据号', prop: 'kingdeeBillNo', minWidth: 150 },
|
||||||
{ label: '当前节点', prop: 'currentNode', minWidth: 120 },
|
{ label: '当前节点', prop: 'currentNode', minWidth: 120 },
|
||||||
{ label: '当前处理人', prop: 'currentProcessor', minWidth: 130 },
|
{ label: '当前处理人', prop: 'currentProcessor', minWidth: 130 },
|
||||||
{ label: '创建人', prop: 'createUserName', minWidth: 110 },
|
{ label: '创建人', prop: 'createUserName', minWidth: 110 },
|
||||||
|
|||||||
@@ -0,0 +1,157 @@
|
|||||||
|
/**
|
||||||
|
* 导入结算单列表(avue-crud)配置
|
||||||
|
* ------------------------------------------------------------------
|
||||||
|
* 列表页与其它模块统一使用 avue-crud,头部 4 个按钮(刷新 / 列显隐 / 搜索显隐 /
|
||||||
|
* 显示方式)由 avue-crud 自带,不做二次封装。
|
||||||
|
*
|
||||||
|
* ⚠️ searchOrder 为降序排序,值越大越靠前。
|
||||||
|
* ⚠️ 仅用于搜索的列必须 hide + showColumn: false,否则会混进「列显隐」抽屉。
|
||||||
|
*/
|
||||||
|
|
||||||
|
const IMPORT_STATUS_OPTIONS = [
|
||||||
|
{ label: '草稿', value: 'draft' },
|
||||||
|
{ label: '已完成', value: 'completed' },
|
||||||
|
{ label: '已作废', value: 'voided' },
|
||||||
|
];
|
||||||
|
|
||||||
|
const SETTLEMENT_TYPE_OPTIONS = [
|
||||||
|
{ label: '应收', value: 'receivable' },
|
||||||
|
{ label: '应付', value: 'payable' },
|
||||||
|
];
|
||||||
|
|
||||||
|
const textFormatter = (row, value) =>
|
||||||
|
value === null || value === undefined || value === '' ? '-' : value;
|
||||||
|
|
||||||
|
const pickLabel = (options, value) =>
|
||||||
|
options.find(item => item.value === value)?.label || value || '-';
|
||||||
|
|
||||||
|
const settlementTypeLabel = value => pickLabel(SETTLEMENT_TYPE_OPTIONS, value);
|
||||||
|
|
||||||
|
const billTypeLabel = value => (value === 'pre' ? '预结算单' : value ? '正式结算单' : '-');
|
||||||
|
|
||||||
|
export const importStatusLabel = value => pickLabel(IMPORT_STATUS_OPTIONS, value);
|
||||||
|
|
||||||
|
export const settlementImportOption = () => ({
|
||||||
|
height: 'auto',
|
||||||
|
calcHeight: 32,
|
||||||
|
tip: false,
|
||||||
|
searchBtnText: '查询',
|
||||||
|
emptyBtnText: '重置',
|
||||||
|
searchShow: true,
|
||||||
|
searchIcon: true,
|
||||||
|
searchLabelWidth: 88,
|
||||||
|
// 查询/重置紧跟首行 4 个条件(4×5 + 菜单 4 = 24),不再独占下一整行
|
||||||
|
searchMenuSpan: 4,
|
||||||
|
searchIndex: 4,
|
||||||
|
searchMenuPosition: 'right',
|
||||||
|
border: true,
|
||||||
|
index: true,
|
||||||
|
indexLabel: '序号',
|
||||||
|
indexWidth: 64,
|
||||||
|
indexFixed: 'left',
|
||||||
|
selection: false,
|
||||||
|
addBtn: false,
|
||||||
|
viewBtn: false,
|
||||||
|
delBtn: false,
|
||||||
|
editBtn: false,
|
||||||
|
menuWidth: 220,
|
||||||
|
menuFixed: 'right',
|
||||||
|
column: [
|
||||||
|
// ---------- 搜索项(前 4 项默认展示,其余折叠;searchOrder 越大越靠前) ----------
|
||||||
|
{
|
||||||
|
label: '状态',
|
||||||
|
prop: 'importStatus',
|
||||||
|
type: 'select',
|
||||||
|
search: true,
|
||||||
|
searchSpan: 5,
|
||||||
|
searchOrder: 6,
|
||||||
|
searchPlaceholder: '请选择',
|
||||||
|
dicData: IMPORT_STATUS_OPTIONS,
|
||||||
|
hide: true,
|
||||||
|
showColumn: false,
|
||||||
|
addDisplay: false,
|
||||||
|
editDisplay: false,
|
||||||
|
viewDisplay: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '导入类型',
|
||||||
|
prop: 'settlementType',
|
||||||
|
type: 'select',
|
||||||
|
search: true,
|
||||||
|
searchSpan: 5,
|
||||||
|
searchOrder: 5,
|
||||||
|
searchPlaceholder: '请选择',
|
||||||
|
dicData: SETTLEMENT_TYPE_OPTIONS,
|
||||||
|
hide: true,
|
||||||
|
showColumn: false,
|
||||||
|
addDisplay: false,
|
||||||
|
editDisplay: false,
|
||||||
|
viewDisplay: false,
|
||||||
|
},
|
||||||
|
// ---------- 表格列 ----------
|
||||||
|
{
|
||||||
|
label: '导入批次号',
|
||||||
|
prop: 'batchNo',
|
||||||
|
slot: true,
|
||||||
|
search: true,
|
||||||
|
searchSpan: 5,
|
||||||
|
searchOrder: 7,
|
||||||
|
searchPlaceholder: '请选择',
|
||||||
|
minWidth: 160,
|
||||||
|
},
|
||||||
|
{ label: '状态', prop: 'importStatusName', slot: true, width: 100, align: 'center' },
|
||||||
|
{
|
||||||
|
label: '导入类型',
|
||||||
|
prop: 'settlementTypeName',
|
||||||
|
minWidth: 100,
|
||||||
|
align: 'center',
|
||||||
|
formatter: (row, value) => value || settlementTypeLabel(row.settlementType),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '结算单',
|
||||||
|
prop: 'settlementBillTypeName',
|
||||||
|
minWidth: 110,
|
||||||
|
align: 'center',
|
||||||
|
formatter: (row, value) => value || billTypeLabel(row.settlementBillType),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '项目',
|
||||||
|
prop: 'projectName',
|
||||||
|
search: true,
|
||||||
|
searchSpan: 5,
|
||||||
|
searchOrder: 4,
|
||||||
|
searchPlaceholder: '请输入',
|
||||||
|
minWidth: 140,
|
||||||
|
formatter: textFormatter,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '客户',
|
||||||
|
prop: 'customerName',
|
||||||
|
search: true,
|
||||||
|
searchSpan: 5,
|
||||||
|
searchOrder: 3,
|
||||||
|
searchPlaceholder: '请输入',
|
||||||
|
minWidth: 140,
|
||||||
|
formatter: textFormatter,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '承运商',
|
||||||
|
prop: 'carrierName',
|
||||||
|
search: true,
|
||||||
|
searchSpan: 5,
|
||||||
|
searchOrder: 2,
|
||||||
|
searchPlaceholder: '请输入',
|
||||||
|
minWidth: 140,
|
||||||
|
formatter: textFormatter,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '明细行数',
|
||||||
|
prop: 'detailCount',
|
||||||
|
width: 100,
|
||||||
|
align: 'center',
|
||||||
|
formatter: row => row.detailCount ?? row.waybillCount ?? 0,
|
||||||
|
},
|
||||||
|
{ label: '创建时间', prop: 'createTime', width: 180, align: 'center', formatter: textFormatter },
|
||||||
|
{ label: '创建人', prop: 'createUserName', minWidth: 110, formatter: textFormatter },
|
||||||
|
],
|
||||||
|
});
|
||||||
@@ -13,7 +13,7 @@ export const reconciliationStatusOptions = [
|
|||||||
|
|
||||||
export const transportReconciliationSearchFields = [
|
export const transportReconciliationSearchFields = [
|
||||||
{ prop: 'reconciliationNo', label: '对账单号', type: 'input' },
|
{ prop: 'reconciliationNo', label: '对账单号', type: 'input' },
|
||||||
{ prop: 'preSettlementNos', label: '预结算单号', type: 'input' },
|
{ prop: 'preSettlementNos', label: '预付结算单号', type: 'input' },
|
||||||
{ prop: 'projectName', label: '项目', type: 'input' },
|
{ prop: 'projectName', label: '项目', type: 'input' },
|
||||||
{ prop: 'deptName', label: '所属组织', type: 'cascader' },
|
{ prop: 'deptName', label: '所属组织', type: 'cascader' },
|
||||||
{ prop: 'contractNo', label: '合同编号', type: 'input' },
|
{ prop: 'contractNo', label: '合同编号', type: 'input' },
|
||||||
|
|||||||
@@ -14,6 +14,11 @@ const validatePhone = (rule, value, callback) => {
|
|||||||
callback(new Error('请输入手机号'));
|
callback(new Error('请输入手机号'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
// 详情回显为脱敏手机号(含 *)时放行,未修改则提交时剔除该字段
|
||||||
|
if (phone.includes('*')) {
|
||||||
|
callback();
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (!/^1\d{10}$/.test(phone)) {
|
if (!/^1\d{10}$/.test(phone)) {
|
||||||
callback(new Error('请输入正确的手机号'));
|
callback(new Error('请输入正确的手机号'));
|
||||||
return;
|
return;
|
||||||
@@ -121,6 +126,62 @@ export default {
|
|||||||
order: 60,
|
order: 60,
|
||||||
rules: [{ required: true, message: '请选择小程序身份', trigger: 'change' }],
|
rules: [{ required: true, message: '请选择小程序身份', trigger: 'change' }],
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: '所属组织',
|
||||||
|
prop: 'deptId',
|
||||||
|
formslot: true,
|
||||||
|
hide: true,
|
||||||
|
span: 24,
|
||||||
|
order: 55,
|
||||||
|
// 所属组织可为空:为空表示未分配组织,账号的数据权限为空集
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '所属组织',
|
||||||
|
prop: 'deptName',
|
||||||
|
minWidth: 180,
|
||||||
|
overHidden: true,
|
||||||
|
addDisplay: false,
|
||||||
|
editDisplay: false,
|
||||||
|
viewDisplay: false,
|
||||||
|
order: 54,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '数据权限范围',
|
||||||
|
prop: 'dataScopeRange',
|
||||||
|
type: 'radio',
|
||||||
|
span: 24,
|
||||||
|
hide: true,
|
||||||
|
order: 53,
|
||||||
|
value: 1,
|
||||||
|
dicData: [
|
||||||
|
{ label: '仅所属组织', value: 1 },
|
||||||
|
{ label: '全部组织', value: 2 },
|
||||||
|
{ label: '自定义', value: 3 },
|
||||||
|
],
|
||||||
|
rules: [{ required: true, message: '请选择数据权限范围', trigger: 'change' }],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '数据层级范围',
|
||||||
|
prop: 'dataLevelRange',
|
||||||
|
type: 'radio',
|
||||||
|
span: 24,
|
||||||
|
hide: true,
|
||||||
|
order: 52,
|
||||||
|
value: 1,
|
||||||
|
dicData: [
|
||||||
|
{ label: '包含下级', value: 1 },
|
||||||
|
{ label: '仅本级', value: 2 },
|
||||||
|
],
|
||||||
|
rules: [{ required: true, message: '请选择数据层级范围', trigger: 'change' }],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '数据权限',
|
||||||
|
prop: 'dataScopeDeptIds',
|
||||||
|
formslot: true,
|
||||||
|
span: 24,
|
||||||
|
hide: true,
|
||||||
|
order: 51,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: '性别',
|
label: '性别',
|
||||||
prop: 'sex',
|
prop: 'sex',
|
||||||
@@ -142,10 +203,9 @@ export default {
|
|||||||
overHidden: true,
|
overHidden: true,
|
||||||
hide: true,
|
hide: true,
|
||||||
addDisplay: false,
|
addDisplay: false,
|
||||||
editDisplay: true,
|
editDisplay: false,
|
||||||
viewDisplay: true,
|
viewDisplay: true,
|
||||||
order: 40,
|
order: 40,
|
||||||
placeholder: '可清空以解绑微信',
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '状态',
|
label: '状态',
|
||||||
|
|||||||
@@ -72,6 +72,7 @@ export const userOption = safe => {
|
|||||||
},
|
},
|
||||||
{ label: '岗位', prop: 'postName', overHidden: true, display: false },
|
{ label: '岗位', prop: 'postName', overHidden: true, display: false },
|
||||||
{ label: '性别', prop: 'sexName', width: 80, display: false },
|
{ label: '性别', prop: 'sexName', width: 80, display: false },
|
||||||
|
{ label: 'OA登录名', prop: 'oaLoginId', minWidth: 140, overHidden: true, display: false },
|
||||||
{ label: 'OA人员id', prop: 'oaPersonId', minWidth: 120, overHidden: true, display: false },
|
{ label: 'OA人员id', prop: 'oaPersonId', minWidth: 120, overHidden: true, display: false },
|
||||||
{ label: '备注', prop: 'remark', minWidth: 160, overHidden: true, display: false },
|
{ label: '备注', prop: 'remark', minWidth: 160, overHidden: true, display: false },
|
||||||
{
|
{
|
||||||
@@ -314,29 +315,6 @@ export const userOption = safe => {
|
|||||||
{ label: '承运商', value: 2 },
|
{ label: '承运商', value: 2 },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
|
||||||
label: '数据权限范围',
|
|
||||||
prop: 'dataScopeRange',
|
|
||||||
type: 'radio',
|
|
||||||
span: 24,
|
|
||||||
value: 1,
|
|
||||||
dicData: [
|
|
||||||
{ label: '仅所属组织', value: 1 },
|
|
||||||
{ label: '全部组织', value: 2 },
|
|
||||||
{ label: '自定义', value: 3 },
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '数据层级范围',
|
|
||||||
prop: 'dataLevelRange',
|
|
||||||
type: 'radio',
|
|
||||||
span: 24,
|
|
||||||
value: 1,
|
|
||||||
dicData: [
|
|
||||||
{ label: '包含下级', value: 1 },
|
|
||||||
{ label: '仅本级', value: 2 },
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
label: '备注',
|
label: '备注',
|
||||||
prop: 'remark',
|
prop: 'remark',
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ export const option = {
|
|||||||
searchOrder: 1,
|
searchOrder: 1,
|
||||||
searchslot: true,
|
searchslot: true,
|
||||||
slot: true,
|
slot: true,
|
||||||
|
overHidden: true,
|
||||||
minWidth: 150,
|
minWidth: 150,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -55,6 +56,8 @@ export const option = {
|
|||||||
prop: 'useDepartment',
|
prop: 'useDepartment',
|
||||||
search: true,
|
search: true,
|
||||||
searchOrder: 3,
|
searchOrder: 3,
|
||||||
|
slot: true,
|
||||||
|
overHidden: true,
|
||||||
minWidth: 140,
|
minWidth: 140,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -95,6 +95,17 @@ export default [
|
|||||||
bizType: 'project-apply',
|
bizType: 'project-apply',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: '/business/project-change/public-view',
|
||||||
|
name: '查看项目变更信息',
|
||||||
|
component: () => import('@/views/business/project-apply-public-view.vue'),
|
||||||
|
meta: {
|
||||||
|
keepAlive: false,
|
||||||
|
isTab: false,
|
||||||
|
isAuth: false,
|
||||||
|
bizType: 'project-change',
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: '/business/contract-manage/public-view',
|
path: '/business/contract-manage/public-view',
|
||||||
name: '查看合同信息',
|
name: '查看合同信息',
|
||||||
@@ -106,9 +117,20 @@ export default [
|
|||||||
bizType: 'contract-manage',
|
bizType: 'contract-manage',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: '/business/contract-change/public-view',
|
||||||
|
name: '查看合同变更信息',
|
||||||
|
component: () => import('@/views/business/contract-change-public-view.vue'),
|
||||||
|
meta: {
|
||||||
|
keepAlive: false,
|
||||||
|
isTab: false,
|
||||||
|
isAuth: false,
|
||||||
|
bizType: 'contract-change',
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: '/settlement/pre-settlement/public-view',
|
path: '/settlement/pre-settlement/public-view',
|
||||||
name: '查看预结算信息',
|
name: '查看预付结算单信息',
|
||||||
component: () => import('@/views/settlement/pre-settlement-public-view.vue'),
|
component: () => import('@/views/settlement/pre-settlement-public-view.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
keepAlive: false,
|
keepAlive: false,
|
||||||
@@ -119,7 +141,7 @@ export default [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/settlement/formal-settlement/public-view',
|
path: '/settlement/formal-settlement/public-view',
|
||||||
name: '查看正式结算信息',
|
name: '查看结算单信息',
|
||||||
component: () => import('@/views/settlement/formal-settlement-public-view.vue'),
|
component: () => import('@/views/settlement/formal-settlement-public-view.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
keepAlive: false,
|
keepAlive: false,
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ export default [
|
|||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: '',
|
path: '',
|
||||||
name: '新增编辑预结算',
|
name: '新增编辑预付结算单',
|
||||||
meta: {
|
meta: {
|
||||||
keepAlive: false,
|
keepAlive: false,
|
||||||
activeMenu: '/settlement/pre-settlement',
|
activeMenu: '/settlement/pre-settlement',
|
||||||
@@ -104,16 +104,33 @@ export default [
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
// 兼容旧菜单路径:按 detailNo 解析应付/应收后跳转到拆分后的列表页
|
||||||
|
path: '/settlement/formal-settlement',
|
||||||
|
component: Layout,
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: '',
|
||||||
|
name: '正式结算单兼容跳转',
|
||||||
|
meta: {
|
||||||
|
keepAlive: false,
|
||||||
|
activeMenu: '/settlement/payment-settlement',
|
||||||
|
},
|
||||||
|
component: loadView(() => import('@/views/settlement/formal-settlement-redirect.vue')),
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: '/settlement/formal-settlement/form',
|
path: '/settlement/formal-settlement/form',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: '',
|
path: '',
|
||||||
name: '新增编辑正式结算',
|
name: '新增编辑结算单',
|
||||||
meta: {
|
meta: {
|
||||||
keepAlive: false,
|
keepAlive: false,
|
||||||
activeMenu: '/settlement/formal-settlement',
|
// 付款/收款结算单共用表单页,具体高亮菜单由页面按 settlementType 回写
|
||||||
|
activeMenu: '/settlement/payment-settlement',
|
||||||
},
|
},
|
||||||
component: loadView(() => import('@/views/settlement/formal-settlement-form.vue')),
|
component: loadView(() => import('@/views/settlement/formal-settlement-form.vue')),
|
||||||
},
|
},
|
||||||
@@ -197,6 +214,18 @@ export default [
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: '/business/project-change/form',
|
||||||
|
component: Layout,
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: '',
|
||||||
|
name: '项目变更表单',
|
||||||
|
meta: { keepAlive: false, activeMenu: '/business/project-change' },
|
||||||
|
component: loadView(() => import('@/views/business/project-apply.vue')),
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: '/business/waybill-manage/form',
|
path: '/business/waybill-manage/form',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
@@ -341,6 +370,18 @@ export default [
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: '/business/contract-change/form',
|
||||||
|
component: Layout,
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: '',
|
||||||
|
name: '合同变更表单',
|
||||||
|
meta: { keepAlive: false, activeMenu: '/business/contract-change' },
|
||||||
|
component: loadView(() => import('@/views/business/contract-manage-change.vue')),
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: '/wel',
|
path: '/wel',
|
||||||
component: () =>
|
component: () =>
|
||||||
|
|||||||
@@ -622,7 +622,7 @@
|
|||||||
background: #fff;
|
background: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 合同管理新增/编辑弹窗(business-crud-page 封装 → avue-crud,弹窗带 avue-crud__dialog class)
|
// 合同管理新增/编辑弹窗(avue-crud,弹窗带 avue-crud__dialog class)
|
||||||
// 复刻 waybill-manage 方案:接近全屏、压过库内置 .avue-dialog 的 calc(100% - 200px),
|
// 复刻 waybill-manage 方案:接近全屏、压过库内置 .avue-dialog 的 calc(100% - 200px),
|
||||||
// 并解开 body 的 200px 上限、抵消全局 footer 的 -30px 上移
|
// 并解开 body 的 200px 上限、抵消全局 footer 的 -30px 上移
|
||||||
.contract-manage-dialog.el-dialog {
|
.contract-manage-dialog.el-dialog {
|
||||||
|
|||||||
@@ -26,6 +26,35 @@ const uniqueOrgNames = (values = []) => {
|
|||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 候选司机取数上限:超出后只能靠关键字缩小范围
|
||||||
|
const DRIVER_CANDIDATE_MAX_SIZE = 200;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 派单候选司机:租户内的司机档案,按岗位等条件过滤。
|
||||||
|
*
|
||||||
|
* 与组织、承运商都无关——司机档案与组织树、承运商之间没有外键,`organization_name`
|
||||||
|
* 只是自由文本,用它做匹配会让小程序自动建档的司机永远进不了候选。
|
||||||
|
*/
|
||||||
|
export const fetchDriverCandidates = async (query = {}) => {
|
||||||
|
const params = { ...query };
|
||||||
|
const size = Math.min(Math.max(Number(params.size) || 50, 50), DRIVER_CANDIDATE_MAX_SIZE);
|
||||||
|
delete params.size;
|
||||||
|
const res = await getDriverList(1, size, params);
|
||||||
|
return extractRecords(res).slice(0, size);
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 司机候选项的展示文本:姓名(手机尾号后 4 位)。
|
||||||
|
*
|
||||||
|
* 只用于下拉渲染。写回表单的仍是姓名本身,别把带尾号的文本当值用。
|
||||||
|
*/
|
||||||
|
export const driverOptionText = (item = {}) => {
|
||||||
|
const name = normalizeOrgName(item.driverName || item.name);
|
||||||
|
const mobile = String(item.mobile || item.phone || item.driverPhone || '').trim();
|
||||||
|
if (!name) return '';
|
||||||
|
return mobile.length >= 4 ? `${name}(${mobile.slice(-4)})` : name;
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 解析承运商客商档案上联系人的所属组织(branchName),无联系人时回退客商所属组织。
|
* 解析承运商客商档案上联系人的所属组织(branchName),无联系人时回退客商所属组织。
|
||||||
*/
|
*/
|
||||||
@@ -72,13 +101,6 @@ export const resolveCarrierOrganizationNames = async ({ carrierId, carrierName }
|
|||||||
return orgNames;
|
return orgNames;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const clearCarrierOrganizationCache = (carrier = {}) => {
|
|
||||||
const id = String(carrier.carrierId || '').trim();
|
|
||||||
const name = normalizeOrgName(carrier.carrierName);
|
|
||||||
if (id) orgNameCache.delete(id);
|
|
||||||
if (name) orgNameCache.delete(name);
|
|
||||||
};
|
|
||||||
|
|
||||||
export const matchOrganizationName = (value, orgNames = []) => {
|
export const matchOrganizationName = (value, orgNames = []) => {
|
||||||
const text = normalizeOrgName(value);
|
const text = normalizeOrgName(value);
|
||||||
if (!text || !orgNames.length) return false;
|
if (!text || !orgNames.length) return false;
|
||||||
@@ -90,34 +112,9 @@ const filterByOrganizations = (records = [], orgNames = []) => {
|
|||||||
return records.filter(item => matchOrganizationName(item.organizationName, orgNames));
|
return records.filter(item => matchOrganizationName(item.organizationName, orgNames));
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
|
||||||
* 按承运商联系人所属组织筛选司机。
|
|
||||||
* 未选择承运商时返回空列表(需先选承运商)。
|
|
||||||
*/
|
|
||||||
export const fetchDriversByCarrierOrganizations = async (
|
|
||||||
query = {},
|
|
||||||
{ carrierId, carrierName } = {}
|
|
||||||
) => {
|
|
||||||
if (!String(carrierId || '').trim() && !normalizeOrgName(carrierName)) {
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
const orgNames = await resolveCarrierOrganizationNames({ carrierId, carrierName });
|
|
||||||
if (!orgNames.length) return [];
|
|
||||||
|
|
||||||
const size = Math.max(Number(query.size) || 50, 50);
|
|
||||||
const params = { ...query };
|
|
||||||
delete params.size;
|
|
||||||
// 单组织时用后端模糊条件缩小范围;多组织再前端精确过滤
|
|
||||||
if (orgNames.length === 1) {
|
|
||||||
params.organizationName = orgNames[0];
|
|
||||||
}
|
|
||||||
const res = await getDriverList(1, Math.min(size * 5, 200), params);
|
|
||||||
return filterByOrganizations(extractRecords(res), orgNames).slice(0, size);
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 按承运商联系人所属组织筛选车辆。
|
* 按承运商联系人所属组织筛选车辆。
|
||||||
* 未选择承运商时返回空列表。
|
* 未选择承运商时返回空列表(需先选承运商)。
|
||||||
*/
|
*/
|
||||||
export const fetchVehiclesByCarrierOrganizations = async (
|
export const fetchVehiclesByCarrierOrganizations = async (
|
||||||
query = {},
|
query = {},
|
||||||
|
|||||||
@@ -106,6 +106,9 @@ const CERT_SNAPSHOT_GROUPS = {
|
|||||||
fields: [
|
fields: [
|
||||||
{ key: 'realName', label: '真实姓名' },
|
{ key: 'realName', label: '真实姓名' },
|
||||||
{ key: 'idCardNo', label: '身份证号' },
|
{ key: 'idCardNo', label: '身份证号' },
|
||||||
|
{ key: 'birthday', label: '出生年月', type: TYPE_DATE },
|
||||||
|
{ key: 'addressRegion', label: '住址' },
|
||||||
|
{ key: 'address', label: '详细地址' },
|
||||||
{ key: 'idCardFrontUrl', label: '身份证正面照', type: TYPE_IMAGE },
|
{ key: 'idCardFrontUrl', label: '身份证正面照', type: TYPE_IMAGE },
|
||||||
{ key: 'idCardBackUrl', label: '身份证反面照', type: TYPE_IMAGE },
|
{ key: 'idCardBackUrl', label: '身份证反面照', type: TYPE_IMAGE },
|
||||||
{ key: 'idCardValidStart', label: '身份证有效期起', type: TYPE_DATE },
|
{ key: 'idCardValidStart', label: '身份证有效期起', type: TYPE_DATE },
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import 'nprogress/nprogress.css';
|
|||||||
const excelPattern = /\.(xls|xlsx)$/;
|
const excelPattern = /\.(xls|xlsx)$/;
|
||||||
|
|
||||||
/** 是否为浏览器 Blob(含跨 realm 的 Blob-like) */
|
/** 是否为浏览器 Blob(含跨 realm 的 Blob-like) */
|
||||||
const isBlobLike = value =>
|
export const isBlobLike = value =>
|
||||||
value != null &&
|
value != null &&
|
||||||
typeof value === 'object' &&
|
typeof value === 'object' &&
|
||||||
typeof value.size === 'number' &&
|
typeof value.size === 'number' &&
|
||||||
@@ -15,14 +15,14 @@ const isBlobLike = value =>
|
|||||||
(typeof value.text === 'function' || typeof value.arrayBuffer === 'function');
|
(typeof value.text === 'function' || typeof value.arrayBuffer === 'function');
|
||||||
|
|
||||||
/** axios 拦截器已把 JSON Blob 解析成的业务对象 */
|
/** axios 拦截器已把 JSON Blob 解析成的业务对象 */
|
||||||
const isBusinessJson = value =>
|
export const isBusinessJson = value =>
|
||||||
value != null &&
|
value != null &&
|
||||||
typeof value === 'object' &&
|
typeof value === 'object' &&
|
||||||
!isBlobLike(value) &&
|
!isBlobLike(value) &&
|
||||||
!(value instanceof ArrayBuffer) &&
|
!(value instanceof ArrayBuffer) &&
|
||||||
('code' in value || 'success' in value || 'msg' in value);
|
('code' in value || 'success' in value || 'msg' in value);
|
||||||
|
|
||||||
const isExcelResponse = res => {
|
export const isExcelResponse = res => {
|
||||||
// 已是业务 JSON(导入成功/失败提示)时,绝不能当失败明细 Excel 处理
|
// 已是业务 JSON(导入成功/失败提示)时,绝不能当失败明细 Excel 处理
|
||||||
if (isBusinessJson(res?.data)) {
|
if (isBusinessJson(res?.data)) {
|
||||||
return false;
|
return false;
|
||||||
@@ -54,7 +54,7 @@ const isExcelResponse = res => {
|
|||||||
* 提前解析成普通对象;此处需同时兼容 Blob / 字符串 / 已解析对象,避免再调
|
* 提前解析成普通对象;此处需同时兼容 Blob / 字符串 / 已解析对象,避免再调
|
||||||
* `blob.text()` 时出现「blob.text is not a function」。
|
* `blob.text()` 时出现「blob.text is not a function」。
|
||||||
*/
|
*/
|
||||||
const parseBlobJson = async data => {
|
export const parseBlobJson = async data => {
|
||||||
if (data == null) {
|
if (data == null) {
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
@@ -88,7 +88,7 @@ const parseBlobJson = async data => {
|
|||||||
*
|
*
|
||||||
* 这里补上这一步:从错误响应的 Blob 里取出后端 `msg`,取不到再退回通用文案。
|
* 这里补上这一步:从错误响应的 Blob 里取出后端 `msg`,取不到再退回通用文案。
|
||||||
*/
|
*/
|
||||||
const resolveErrorMessage = async error => {
|
export const resolveImportErrorMessage = async error => {
|
||||||
const payload = error?.response?.data ?? error?.data;
|
const payload = error?.response?.data ?? error?.data;
|
||||||
if (isBusinessJson(payload) && payload.msg) {
|
if (isBusinessJson(payload) && payload.msg) {
|
||||||
return payload.msg;
|
return payload.msg;
|
||||||
@@ -109,6 +109,26 @@ const resolveErrorMessage = async error => {
|
|||||||
return fallback;
|
return fallback;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统一消费导入接口响应:成功 JSON / 失败 Excel 流。
|
||||||
|
* 兼容 axios 已把 JSON Blob 解析成对象的情况,禁止再对普通对象调 .text()。
|
||||||
|
*/
|
||||||
|
export const consumeImportResponse = async (res, options = {}) => {
|
||||||
|
const { businessName = '导入', dayjsFormat } = options;
|
||||||
|
if (isExcelResponse(res)) {
|
||||||
|
return {
|
||||||
|
kind: 'excel',
|
||||||
|
blob: res?.data,
|
||||||
|
fileName: `${businessName}导入失败明细${dayjsFormat || ''}.xlsx`,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
const result = isBusinessJson(res?.data) ? res.data : await parseBlobJson(res?.data);
|
||||||
|
if (Number(result?.code) !== 200) {
|
||||||
|
throw new Error(result?.msg || '导入失败');
|
||||||
|
}
|
||||||
|
return { kind: 'success', result };
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 加工后端返回的导入失败明细 Excel。
|
* 加工后端返回的导入失败明细 Excel。
|
||||||
* 若传入 failDetailDecorator(函数),则动态加载 exceljs 读取 blob 流,
|
* 若传入 failDetailDecorator(函数),则动态加载 exceljs 读取 blob 流,
|
||||||
@@ -235,7 +255,7 @@ export const handleImportExcel = async (vm, option, column, businessName, onSucc
|
|||||||
// 拦截器已提示过的错误(如后端 400 返回的业务提示)不再重复弹一次,
|
// 拦截器已提示过的错误(如后端 400 返回的业务提示)不再重复弹一次,
|
||||||
// 只保留一次清晰的中文提示。
|
// 只保留一次清晰的中文提示。
|
||||||
if (!error?._notified) {
|
if (!error?._notified) {
|
||||||
vm.$message.error(await resolveErrorMessage(error));
|
vm.$message.error(await resolveImportErrorMessage(error));
|
||||||
}
|
}
|
||||||
notifyUploadError(option, error);
|
notifyUploadError(option, error);
|
||||||
} finally {
|
} finally {
|
||||||
|
|||||||
@@ -15,15 +15,27 @@ export const MK_BIZ = {
|
|||||||
rejected: ['rejected', 'change_rejected', 'withdrawn'],
|
rejected: ['rejected', 'change_rejected', 'withdrawn'],
|
||||||
approved: ['approved', 'change_approved'],
|
approved: ['approved', 'change_approved'],
|
||||||
},
|
},
|
||||||
|
'project-change': {
|
||||||
|
dictName: '提交项目变更审核流',
|
||||||
|
subjectPrefix: '项目变更审批',
|
||||||
|
rejected: ['rejected', 'withdrawn'],
|
||||||
|
approved: ['approved'],
|
||||||
|
},
|
||||||
'contract-manage': {
|
'contract-manage': {
|
||||||
dictName: '提交合同审核流',
|
dictName: '提交合同审核流',
|
||||||
subjectPrefix: '合同审批',
|
subjectPrefix: '合同审批',
|
||||||
rejected: ['rejected', 'change_rejected', 'withdrawn'],
|
rejected: ['rejected', 'change_rejected', 'withdrawn'],
|
||||||
approved: ['approved', 'change_approved'],
|
approved: ['approved', 'change_approved'],
|
||||||
},
|
},
|
||||||
|
'contract-change': {
|
||||||
|
dictName: '提交合同变更审核流',
|
||||||
|
subjectPrefix: '合同变更审批',
|
||||||
|
rejected: ['rejected', 'withdrawn'],
|
||||||
|
approved: ['approved'],
|
||||||
|
},
|
||||||
'pre-settlement': {
|
'pre-settlement': {
|
||||||
dictName: '提交预结算审核流',
|
dictName: '提交预结算审核流',
|
||||||
subjectPrefix: '预结算审批',
|
subjectPrefix: '预付结算审批',
|
||||||
rejected: ['returned'],
|
rejected: ['returned'],
|
||||||
approved: ['approved'],
|
approved: ['approved'],
|
||||||
},
|
},
|
||||||
@@ -142,6 +154,7 @@ export function isMkApprovedStatus(bizType, approvalStatus) {
|
|||||||
* @param {string} [options.subjectName] 标题后缀
|
* @param {string} [options.subjectName] 标题后缀
|
||||||
* @param {string} [options.approvalStatus] 提交前的审批状态
|
* @param {string} [options.approvalStatus] 提交前的审批状态
|
||||||
* @param {boolean} [options.mkEnabled] 调用方已知开关时传入,false 时立即跳过
|
* @param {boolean} [options.mkEnabled] 调用方已知开关时传入,false 时立即跳过
|
||||||
|
* @param {Object} [options.tempVarData] 传给 MK 的临时变量(如项目类型 projectType)
|
||||||
* @returns {Promise<boolean>} true=已发起/复用 MK 流程,false=未开启或已跳过
|
* @returns {Promise<boolean>} true=已发起/复用 MK 流程,false=未开启或已跳过
|
||||||
*/
|
*/
|
||||||
export async function submitMkApprovalFlow({
|
export async function submitMkApprovalFlow({
|
||||||
@@ -150,6 +163,7 @@ export async function submitMkApprovalFlow({
|
|||||||
subjectName = '',
|
subjectName = '',
|
||||||
approvalStatus = '',
|
approvalStatus = '',
|
||||||
mkEnabled,
|
mkEnabled,
|
||||||
|
tempVarData,
|
||||||
} = {}) {
|
} = {}) {
|
||||||
const conf = MK_BIZ[bizType];
|
const conf = MK_BIZ[bizType];
|
||||||
if (!conf) {
|
if (!conf) {
|
||||||
@@ -190,12 +204,16 @@ export async function submitMkApprovalFlow({
|
|||||||
const subject = subjectName
|
const subject = subjectName
|
||||||
? `${conf.subjectPrefix}:${subjectName}`
|
? `${conf.subjectPrefix}:${subjectName}`
|
||||||
: `${conf.subjectPrefix}:${bizIdText}`;
|
: `${conf.subjectPrefix}:${bizIdText}`;
|
||||||
await processSubmit({
|
const submitPayload = {
|
||||||
templateCode,
|
templateCode,
|
||||||
bizId: bizIdText,
|
bizId: bizIdText,
|
||||||
subject,
|
subject,
|
||||||
bizType,
|
bizType,
|
||||||
forceNewFormInstance,
|
forceNewFormInstance,
|
||||||
});
|
};
|
||||||
|
if (tempVarData != null && typeof tempVarData === 'object') {
|
||||||
|
submitPayload.tempVarData = tempVarData;
|
||||||
|
}
|
||||||
|
await processSubmit(submitPayload);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,47 @@
|
|||||||
|
export function isFreightFeeName(name) {
|
||||||
|
const text = String(name || '');
|
||||||
|
return text.includes('运费') || text.includes('运输费');
|
||||||
|
}
|
||||||
|
|
||||||
|
function parseBillingRules(row = {}) {
|
||||||
|
const rule = row.billingRule || {};
|
||||||
|
const nested = Array.isArray(rule.rules) ? rule.rules : [];
|
||||||
|
if (nested.length) return nested;
|
||||||
|
const raw = row.billingRulesJson ?? row.billingRules;
|
||||||
|
if (Array.isArray(raw)) return raw.filter(item => item && typeof item === 'object');
|
||||||
|
if (typeof raw === 'string' && raw.trim()) {
|
||||||
|
try {
|
||||||
|
const parsed = JSON.parse(raw);
|
||||||
|
return Array.isArray(parsed) ? parsed.filter(item => item && typeof item === 'object') : [];
|
||||||
|
} catch (error) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 运输单价对应的运费计费类型。 */
|
||||||
|
export function freightBillingType(row = {}) {
|
||||||
|
const rule = row.billingRule || {};
|
||||||
|
const rules = parseBillingRules(row);
|
||||||
|
const freightRule = rules.find(
|
||||||
|
item => isFreightFeeName(item?.feeItem) || isFreightFeeName(item?.feeType)
|
||||||
|
);
|
||||||
|
return freightRule?.billingType || row.billingType || rule.billingType || '';
|
||||||
|
}
|
||||||
|
|
||||||
|
export function isTierUnitPrice(row) {
|
||||||
|
return freightBillingType(row) === '阶梯单价';
|
||||||
|
}
|
||||||
|
|
||||||
|
export function isIntervalBilling(row) {
|
||||||
|
const type = freightBillingType(row);
|
||||||
|
return type === '区间单价' || (type.includes('区间') && type.includes('一口价'));
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 阶梯单价、区间单价、区间一口价的运输单价不开放手工调整。 */
|
||||||
|
export function isUnitPriceAdjustable(row) {
|
||||||
|
const type = freightBillingType(row);
|
||||||
|
if (!type) return true;
|
||||||
|
return !isTierUnitPrice(row) && !isIntervalBilling(row);
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
/** 审批通过、驳回等审批流转类变更内容,不在结算单变更记录中展示。 */
|
||||||
|
export function isApprovalSettlementChange(content) {
|
||||||
|
const text = String(content || '').trim();
|
||||||
|
if (!text) return false;
|
||||||
|
return text.includes('审批通过') || text.includes('审批驳回') || text === '已驳回';
|
||||||
|
}
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
/** 结算菜单拆分后的展示名与权限前缀 */
|
||||||
|
|
||||||
|
export const SETTLEMENT_TYPE_PAYABLE = 'payable';
|
||||||
|
export const SETTLEMENT_TYPE_RECEIVABLE = 'receivable';
|
||||||
|
|
||||||
|
export function settlementBillLabel(settlementType) {
|
||||||
|
return settlementType === SETTLEMENT_TYPE_RECEIVABLE ? '收款结算单' : '付款结算单';
|
||||||
|
}
|
||||||
|
|
||||||
|
export function settlementPermissionPrefix(settlementType) {
|
||||||
|
return settlementType === SETTLEMENT_TYPE_RECEIVABLE
|
||||||
|
? 'receipt_settlement'
|
||||||
|
: 'payment_settlement';
|
||||||
|
}
|
||||||
|
|
||||||
|
export function settlementListPath(settlementType) {
|
||||||
|
return settlementType === SETTLEMENT_TYPE_RECEIVABLE
|
||||||
|
? '/settlement/receipt-settlement'
|
||||||
|
: '/settlement/payment-settlement';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 权限判断:优先新菜单码,兼容旧 formal_settlement_*。
|
||||||
|
* @param {Object} ctx 组件实例(需含 permission、isAdmin、validData)
|
||||||
|
* @param {string} settlementType payable|receivable
|
||||||
|
* @param {string} action add|edit|view...
|
||||||
|
*/
|
||||||
|
export function hasSettlementPermission(ctx, settlementType, action) {
|
||||||
|
if (ctx?.isAdmin) return true;
|
||||||
|
const prefix = settlementPermissionPrefix(settlementType);
|
||||||
|
const codes = [`${prefix}_${action}`, `formal_settlement_${action}`];
|
||||||
|
return codes.some(code => {
|
||||||
|
const value = ctx?.permission?.[code];
|
||||||
|
if (typeof ctx?.validData === 'function') {
|
||||||
|
return ctx.validData(value, false);
|
||||||
|
}
|
||||||
|
return value === true;
|
||||||
|
});
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
/**
|
||||||
|
* 结算单预付记录单据状态名(预结算编辑器与正式结算编辑器共用,避免两页状态名不一致)
|
||||||
|
*/
|
||||||
|
export function settlementStatusName(status, displayValue) {
|
||||||
|
const labels = {
|
||||||
|
reviewing: '审批中',
|
||||||
|
approved: '审批通过',
|
||||||
|
paid: '已付款',
|
||||||
|
returned: '已驳回',
|
||||||
|
voided: '已作废',
|
||||||
|
draft: '草稿',
|
||||||
|
};
|
||||||
|
const name = labels[status];
|
||||||
|
if (name) return name;
|
||||||
|
return typeof displayValue === 'function' ? displayValue(status) : status || '-';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统一预付付款记录类型名
|
||||||
|
*/
|
||||||
|
export function settlementRecordTypeName(recordType) {
|
||||||
|
return { progress_advance: '进度预付', project_advance: '项目预付核销' }[recordType] || '';
|
||||||
|
}
|
||||||
+190
-100
@@ -50,7 +50,7 @@
|
|||||||
title="角色权限配置"
|
title="角色权限配置"
|
||||||
append-to-body
|
append-to-body
|
||||||
v-model="box"
|
v-model="box"
|
||||||
width="345px"
|
width="960px"
|
||||||
@close="handleDialogClose"
|
@close="handleDialogClose"
|
||||||
>
|
>
|
||||||
<el-tabs type="border-card">
|
<el-tabs type="border-card">
|
||||||
@@ -100,41 +100,26 @@
|
|||||||
align="middle"
|
align="middle"
|
||||||
style="margin-bottom: 12px; background: #f5f7fa; padding: 6px 10px; border-radius: 4px"
|
style="margin-bottom: 12px; background: #f5f7fa; padding: 6px 10px; border-radius: 4px"
|
||||||
>
|
>
|
||||||
<span style="display: inline-flex; align-items: center">
|
<span style="color: #606266; font-size: 13px"
|
||||||
<el-switch
|
>勾选多个菜单后点击「设置」,可批量配置数据权限;设置后菜单旁展示当前范围</span
|
||||||
v-model="dataScopeLinked"
|
>
|
||||||
active-text="节点联动"
|
<el-button type="primary" size="small" @click="openDataScopeSetting">设置</el-button>
|
||||||
size="small"
|
|
||||||
@change="handleLinkedChange('treeDataScope')"
|
|
||||||
/>
|
|
||||||
<el-tooltip content="开启后勾选父节点会自动勾选所有子节点,关闭则可独立勾选任意节点" placement="top">
|
|
||||||
<el-icon style="margin-left: 4px; color: #909399; cursor: pointer"><el-icon-question-filled /></el-icon>
|
|
||||||
</el-tooltip>
|
|
||||||
</span>
|
|
||||||
<el-button-group>
|
|
||||||
<el-button
|
|
||||||
size="small"
|
|
||||||
plain
|
|
||||||
@click="handleSelectAll('treeDataScope', dataScopeGrantList)"
|
|
||||||
>全选</el-button
|
|
||||||
>
|
|
||||||
<el-button
|
|
||||||
size="small"
|
|
||||||
plain
|
|
||||||
@click="handleInvertSelect('treeDataScope', dataScopeGrantList, dataScopeLinked)"
|
|
||||||
>反选</el-button
|
|
||||||
>
|
|
||||||
</el-button-group>
|
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-tree
|
<el-tree
|
||||||
:data="dataScopeGrantList"
|
:data="roleDataScopeMenuTree"
|
||||||
show-checkbox
|
show-checkbox
|
||||||
:check-strictly="!dataScopeLinked"
|
|
||||||
node-key="id"
|
node-key="id"
|
||||||
ref="treeDataScope"
|
ref="treeRoleDataScope"
|
||||||
:default-checked-keys="dataScopeTreeObj"
|
|
||||||
:props="props"
|
:props="props"
|
||||||
>
|
>
|
||||||
|
<template #default="{ data }">
|
||||||
|
<span class="role-data-scope-node">
|
||||||
|
<span>{{ data.title }}</span>
|
||||||
|
<span v-if="getMenuScopeLabel(data.id)" class="role-data-scope-tag"
|
||||||
|
>【{{ getMenuScopeLabel(data.id) }}】</span
|
||||||
|
>
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
</el-tree>
|
</el-tree>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="接口权限">
|
<el-tab-pane label="接口权限">
|
||||||
@@ -188,6 +173,45 @@
|
|||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
<el-dialog
|
||||||
|
title="数据权限设置"
|
||||||
|
append-to-body
|
||||||
|
v-model="dataScopeSettingBox"
|
||||||
|
width="560px"
|
||||||
|
class="role-data-scope-setting-dialog"
|
||||||
|
>
|
||||||
|
<el-form label-position="right" label-width="auto">
|
||||||
|
<el-form-item label="角色名称">
|
||||||
|
<el-input v-model="dataScopeSetting.roleName" disabled />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="数据权限">
|
||||||
|
<el-radio-group v-model="dataScopeSetting.scopeType">
|
||||||
|
<el-radio :value="1">所在部门及下级</el-radio>
|
||||||
|
<el-radio :value="2">全部组织</el-radio>
|
||||||
|
<el-radio :value="3">本人创建</el-radio>
|
||||||
|
<el-radio :value="4">自定义组织</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item v-if="Number(dataScopeSetting.scopeType) === 4" label="组织">
|
||||||
|
<el-tree
|
||||||
|
ref="treeCustomDept"
|
||||||
|
:data="deptTree"
|
||||||
|
show-checkbox
|
||||||
|
node-key="id"
|
||||||
|
default-expand-all
|
||||||
|
:props="{ label: 'title', children: 'children' }"
|
||||||
|
style="width: 100%; max-height: 320px; overflow: auto; border: 1px solid #ebeef5; padding: 8px"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<template #footer>
|
||||||
|
<span class="dialog-footer">
|
||||||
|
<el-button @click="dataScopeSettingBox = false">取消</el-button>
|
||||||
|
<el-button type="primary" @click="submitDataScopeSetting">保存</el-button>
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
</basic-container>
|
</basic-container>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -196,37 +220,44 @@ import {
|
|||||||
add,
|
add,
|
||||||
getList,
|
getList,
|
||||||
getRole,
|
getRole,
|
||||||
getRoleAlias,
|
|
||||||
getRoleTreeById,
|
getRoleTreeById,
|
||||||
grant,
|
grant,
|
||||||
grantTree,
|
grantTree,
|
||||||
remove,
|
remove,
|
||||||
update,
|
update,
|
||||||
} from '@/api/system/role';
|
} from '@/api/system/role';
|
||||||
|
import { getRoleMenuDataScopeTree, submitRoleMenuDataScope } from '@/api/system/roleDataScope';
|
||||||
|
import { getDeptTree } from '@/api/system/dept';
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import website from '@/config/website';
|
import website from '@/config/website';
|
||||||
import { validatenull } from '@/utils/validate';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
form: {},
|
form: {},
|
||||||
box: false,
|
box: false,
|
||||||
|
dataScopeSettingBox: false,
|
||||||
props: {
|
props: {
|
||||||
label: 'title',
|
label: 'title',
|
||||||
value: 'key',
|
value: 'key',
|
||||||
},
|
},
|
||||||
menuGrantList: [],
|
menuGrantList: [],
|
||||||
dataScopeGrantList: [],
|
|
||||||
apiScopeGrantList: [],
|
apiScopeGrantList: [],
|
||||||
apiGrantList: [],
|
apiGrantList: [],
|
||||||
menuTreeObj: [],
|
menuTreeObj: [],
|
||||||
dataScopeTreeObj: [],
|
|
||||||
apiScopeTreeObj: [],
|
apiScopeTreeObj: [],
|
||||||
menuLinked: false,
|
menuLinked: false,
|
||||||
dataScopeLinked: false,
|
|
||||||
apiScopeLinked: false,
|
apiScopeLinked: false,
|
||||||
currentRoleIds: [],
|
currentRoleIds: [],
|
||||||
|
currentRoleName: '',
|
||||||
|
roleDataScopeMenuTree: [],
|
||||||
|
roleDataScopeMap: {},
|
||||||
|
deptTree: [],
|
||||||
|
dataScopeSetting: {
|
||||||
|
roleName: '',
|
||||||
|
scopeType: 2,
|
||||||
|
menuIds: [],
|
||||||
|
},
|
||||||
selectionList: [],
|
selectionList: [],
|
||||||
query: {},
|
query: {},
|
||||||
loading: true,
|
loading: true,
|
||||||
@@ -309,32 +340,19 @@ export default {
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '角色别名',
|
label: '角色标识',
|
||||||
labelTip: '用于权限校验与标注的属性,可手动录入也可点击现有别名快速录入',
|
labelTip: '用于权限校验与标注的属性',
|
||||||
prop: 'roleAlias',
|
prop: 'roleAlias',
|
||||||
search: true,
|
search: true,
|
||||||
span: 24,
|
span: 24,
|
||||||
rules: [
|
rules: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: '请输入角色别名',
|
message: '请输入角色标识',
|
||||||
trigger: 'blur',
|
trigger: 'blur',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
|
||||||
label: '现有别名',
|
|
||||||
labelTip: '当前系统已存在的角色别名,点击可快速录入',
|
|
||||||
prop: 'currentAlias',
|
|
||||||
type: 'radio',
|
|
||||||
dicData: [],
|
|
||||||
props: {
|
|
||||||
label: 'roleName',
|
|
||||||
value: 'roleAlias',
|
|
||||||
},
|
|
||||||
hide: true,
|
|
||||||
span: 24,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
label: '角色排序',
|
label: '角色排序',
|
||||||
prop: 'sort',
|
prop: 'sort',
|
||||||
@@ -378,14 +396,6 @@ export default {
|
|||||||
return ids;
|
return ids;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
watch: {
|
|
||||||
'form.currentAlias'() {
|
|
||||||
const alias = this.form.currentAlias;
|
|
||||||
if (!validatenull(alias)) {
|
|
||||||
this.form.roleAlias = alias;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
initData(roleId) {
|
initData(roleId) {
|
||||||
getRoleTreeById(roleId).then(res => {
|
getRoleTreeById(roleId).then(res => {
|
||||||
@@ -452,9 +462,9 @@ export default {
|
|||||||
},
|
},
|
||||||
submit() {
|
submit() {
|
||||||
const menuList = this.$refs.treeMenu.getCheckedKeys();
|
const menuList = this.$refs.treeMenu.getCheckedKeys();
|
||||||
const dataScopeList = this.$refs.treeDataScope.getCheckedKeys();
|
|
||||||
const apiScopeList = this.$refs.treeApiScope.getCheckedKeys();
|
const apiScopeList = this.$refs.treeApiScope.getCheckedKeys();
|
||||||
grant(this.currentRoleIds, menuList, dataScopeList, apiScopeList).then(() => {
|
// 数据权限已改为角色菜单配置;传 null 跳过原生 dataScope 更新,避免误清历史配置
|
||||||
|
grant(this.currentRoleIds, menuList, null, apiScopeList).then(() => {
|
||||||
this.box = false;
|
this.box = false;
|
||||||
this.$message({
|
this.$message({
|
||||||
type: 'success',
|
type: 'success',
|
||||||
@@ -465,6 +475,84 @@ export default {
|
|||||||
this.onLoad(this.page);
|
this.onLoad(this.page);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
getMenuScopeLabel(menuId) {
|
||||||
|
const scope = this.roleDataScopeMap[String(menuId)];
|
||||||
|
return scope ? scope.scopeTypeName : '';
|
||||||
|
},
|
||||||
|
loadRoleDataScopeTree(roleId) {
|
||||||
|
return getRoleMenuDataScopeTree(roleId).then(res => {
|
||||||
|
const data = res.data.data || {};
|
||||||
|
this.currentRoleName = data.roleName || '';
|
||||||
|
this.roleDataScopeMenuTree = data.menuTree || [];
|
||||||
|
const scopeMap = {};
|
||||||
|
(data.scopes || []).forEach(item => {
|
||||||
|
scopeMap[String(item.menuId)] = item;
|
||||||
|
});
|
||||||
|
this.roleDataScopeMap = scopeMap;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
openDataScopeSetting() {
|
||||||
|
const tree = this.$refs.treeRoleDataScope;
|
||||||
|
if (!tree) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const menuIds = tree.getCheckedKeys();
|
||||||
|
if (!menuIds || menuIds.length === 0) {
|
||||||
|
this.$message.warning('请先勾选要设置的菜单');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.dataScopeSetting = {
|
||||||
|
roleName: this.currentRoleName,
|
||||||
|
scopeType: 2,
|
||||||
|
menuIds,
|
||||||
|
};
|
||||||
|
const loadDept =
|
||||||
|
this.deptTree && this.deptTree.length
|
||||||
|
? Promise.resolve()
|
||||||
|
: getDeptTree(this.userInfo.tenantId).then(res => {
|
||||||
|
this.deptTree = res.data.data || [];
|
||||||
|
});
|
||||||
|
loadDept.then(() => {
|
||||||
|
this.dataScopeSettingBox = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
if (this.$refs.treeCustomDept) {
|
||||||
|
this.$refs.treeCustomDept.setCheckedKeys([]);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
submitDataScopeSetting() {
|
||||||
|
const roleId = this.currentRoleIds && this.currentRoleIds[0];
|
||||||
|
if (!roleId) {
|
||||||
|
this.$message.warning('角色信息异常,请重新打开权限配置');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const scopeType = Number(this.dataScopeSetting.scopeType || 2);
|
||||||
|
let deptIds = [];
|
||||||
|
if (scopeType === 4) {
|
||||||
|
deptIds = this.$refs.treeCustomDept ? this.$refs.treeCustomDept.getCheckedKeys() : [];
|
||||||
|
if (!deptIds.length) {
|
||||||
|
this.$message.warning('自定义组织时请勾选组织');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
submitRoleMenuDataScope({
|
||||||
|
roleId,
|
||||||
|
menuIds: this.dataScopeSetting.menuIds,
|
||||||
|
scopeType,
|
||||||
|
deptIds,
|
||||||
|
}).then(() => {
|
||||||
|
this.$message.success('数据权限设置成功');
|
||||||
|
this.dataScopeSettingBox = false;
|
||||||
|
this.loadRoleDataScopeTree(roleId).then(() => {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
if (this.$refs.treeRoleDataScope) {
|
||||||
|
this.$refs.treeRoleDataScope.setCheckedKeys([]);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
rowSave(row, done, loading) {
|
rowSave(row, done, loading) {
|
||||||
add(this.withTenantId(row)).then(
|
add(this.withTenantId(row)).then(
|
||||||
() => {
|
() => {
|
||||||
@@ -547,10 +635,6 @@ export default {
|
|||||||
this.form.parentId = '';
|
this.form.parentId = '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
getRoleAlias().then(res => {
|
|
||||||
const column = this.findColumn(this.option.column, 'currentAlias');
|
|
||||||
column.dicData = res.data.data;
|
|
||||||
});
|
|
||||||
done();
|
done();
|
||||||
},
|
},
|
||||||
handleRole() {
|
handleRole() {
|
||||||
@@ -563,58 +647,52 @@ export default {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.menuTreeObj = [];
|
this.menuTreeObj = [];
|
||||||
this.dataScopeTreeObj = [];
|
|
||||||
this.apiScopeTreeObj = [];
|
this.apiScopeTreeObj = [];
|
||||||
// 保存当前要配置权限的角色ID
|
|
||||||
this.currentRoleIds = this.idsArray;
|
this.currentRoleIds = this.idsArray;
|
||||||
grantTree().then(res => {
|
this.currentRoleName = (this.selectionList[0] && this.selectionList[0].roleName) || '';
|
||||||
this.menuGrantList = res.data.data.menu;
|
const roleId = this.currentRoleIds[0];
|
||||||
this.dataScopeGrantList = res.data.data.dataScope;
|
Promise.all([grantTree(), getRole(this.ids), this.loadRoleDataScopeTree(roleId)]).then(results => {
|
||||||
this.apiScopeGrantList = res.data.data.apiScope;
|
const grantRes = results[0];
|
||||||
getRole(this.ids).then(res => {
|
const roleRes = results[1];
|
||||||
this.menuTreeObj = res.data.data.menu;
|
this.menuGrantList = grantRes.data.data.menu;
|
||||||
this.dataScopeTreeObj = res.data.data.dataScope;
|
this.apiScopeGrantList = grantRes.data.data.apiScope;
|
||||||
this.apiScopeTreeObj = res.data.data.apiScope;
|
this.menuTreeObj = roleRes.data.data.menu;
|
||||||
this.box = true;
|
this.apiScopeTreeObj = roleRes.data.data.apiScope;
|
||||||
this.$nextTick(() => {
|
this.box = true;
|
||||||
this.applyCheckedKeys('treeMenu', this.menuTreeObj);
|
this.$nextTick(() => {
|
||||||
this.applyCheckedKeys('treeDataScope', this.dataScopeTreeObj);
|
this.applyCheckedKeys('treeMenu', this.menuTreeObj);
|
||||||
this.applyCheckedKeys('treeApiScope', this.apiScopeTreeObj);
|
this.applyCheckedKeys('treeApiScope', this.apiScopeTreeObj);
|
||||||
});
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleRowRole(row) {
|
handleRowRole(row) {
|
||||||
this.menuTreeObj = [];
|
this.menuTreeObj = [];
|
||||||
this.dataScopeTreeObj = [];
|
|
||||||
this.apiScopeTreeObj = [];
|
this.apiScopeTreeObj = [];
|
||||||
// 保存当前要配置权限的角色ID(单个行操作)
|
|
||||||
this.currentRoleIds = [row.id];
|
this.currentRoleIds = [row.id];
|
||||||
grantTree().then(res => {
|
this.currentRoleName = row.roleName || '';
|
||||||
this.menuGrantList = res.data.data.menu;
|
Promise.all([grantTree(), getRole(row.id), this.loadRoleDataScopeTree(row.id)]).then(results => {
|
||||||
this.dataScopeGrantList = res.data.data.dataScope;
|
const grantRes = results[0];
|
||||||
this.apiScopeGrantList = res.data.data.apiScope;
|
const roleRes = results[1];
|
||||||
getRole(row.id).then(res => {
|
this.menuGrantList = grantRes.data.data.menu;
|
||||||
this.menuTreeObj = res.data.data.menu;
|
this.apiScopeGrantList = grantRes.data.data.apiScope;
|
||||||
this.dataScopeTreeObj = res.data.data.dataScope;
|
this.menuTreeObj = roleRes.data.data.menu;
|
||||||
this.apiScopeTreeObj = res.data.data.apiScope;
|
this.apiScopeTreeObj = roleRes.data.data.apiScope;
|
||||||
this.box = true;
|
this.box = true;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.applyCheckedKeys('treeMenu', this.menuTreeObj);
|
this.applyCheckedKeys('treeMenu', this.menuTreeObj);
|
||||||
this.applyCheckedKeys('treeDataScope', this.dataScopeTreeObj);
|
this.applyCheckedKeys('treeApiScope', this.apiScopeTreeObj);
|
||||||
this.applyCheckedKeys('treeApiScope', this.apiScopeTreeObj);
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleDialogClose() {
|
handleDialogClose() {
|
||||||
// 对话框关闭时清空选择状态和权限树数据
|
|
||||||
this.menuTreeObj = [];
|
this.menuTreeObj = [];
|
||||||
this.dataScopeTreeObj = [];
|
|
||||||
this.apiScopeTreeObj = [];
|
this.apiScopeTreeObj = [];
|
||||||
this.menuLinked = false;
|
this.menuLinked = false;
|
||||||
this.dataScopeLinked = false;
|
|
||||||
this.apiScopeLinked = false;
|
this.apiScopeLinked = false;
|
||||||
|
this.roleDataScopeMenuTree = [];
|
||||||
|
this.roleDataScopeMap = {};
|
||||||
|
this.currentRoleName = '';
|
||||||
|
this.dataScopeSettingBox = false;
|
||||||
this.selectionClear();
|
this.selectionClear();
|
||||||
},
|
},
|
||||||
handleDelete() {
|
handleDelete() {
|
||||||
@@ -659,3 +737,15 @@ export default {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.role-data-scope-node {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 4px;
|
||||||
|
}
|
||||||
|
.role-data-scope-tag {
|
||||||
|
color: #409eff;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
@@ -280,6 +280,23 @@ export default {
|
|||||||
.filter(Boolean)[0] || '';
|
.filter(Boolean)[0] || '';
|
||||||
},
|
},
|
||||||
applyDefaultDeptSearch() {
|
applyDefaultDeptSearch() {
|
||||||
|
// 超管默认不限组织,避免预填当前组织后看不到其他组织/无组织数据。
|
||||||
|
if (this.isAdmin) {
|
||||||
|
const deptColumn = this.findColumn(this.option.column, 'searchDeptId');
|
||||||
|
if (deptColumn) {
|
||||||
|
deptColumn.searchValue = undefined;
|
||||||
|
}
|
||||||
|
const nextQuery = { ...this.query };
|
||||||
|
delete nextQuery.deptId;
|
||||||
|
delete nextQuery.searchDeptId;
|
||||||
|
this.query = nextQuery;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
if (this.$refs.crud?.searchForm) {
|
||||||
|
this.$refs.crud.searchForm.searchDeptId = undefined;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
const deptId = this.defaultDeptId();
|
const deptId = this.defaultDeptId();
|
||||||
const deptColumn = this.findColumn(this.option.column, 'searchDeptId');
|
const deptColumn = this.findColumn(this.option.column, 'searchDeptId');
|
||||||
if (!deptId || !deptColumn) return;
|
if (!deptId || !deptColumn) return;
|
||||||
@@ -298,7 +315,8 @@ export default {
|
|||||||
if (deptColumn) {
|
if (deptColumn) {
|
||||||
deptColumn.dicData = this.deptOptions;
|
deptColumn.dicData = this.deptOptions;
|
||||||
}
|
}
|
||||||
// dicData 异步到位后再回填,避免下拉选项为空时清空已选组织,导致请求丢失 deptId。
|
// 超管不回填默认组织;普通用户在 dicData 到位后再回填,避免下拉清空已选组织。
|
||||||
|
if (this.isAdmin) return;
|
||||||
const deptId = String(this.query.deptId || this.defaultDeptId() || '');
|
const deptId = String(this.query.deptId || this.defaultDeptId() || '');
|
||||||
if (!deptId) return;
|
if (!deptId) return;
|
||||||
if (deptColumn) {
|
if (deptColumn) {
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -205,7 +205,9 @@ export const defaultContractAttachmentTypeOptions = [
|
|||||||
{ label: '双章归档文件', value: '双章归档文件' },
|
{ label: '双章归档文件', value: '双章归档文件' },
|
||||||
{ label: '其他文件', value: CONTRACT_ATTACHMENT_TYPE_OTHER },
|
{ label: '其他文件', value: CONTRACT_ATTACHMENT_TYPE_OTHER },
|
||||||
];
|
];
|
||||||
|
// 特批附件归口附件(佐证材料等)区上传:高风险/黑名单客商合同必传,后端按 fileType=特批附件 校验并挂特批面板(与后端 HcsSyncConstant.ATTACHMENT_TYPE_SPEC_EXPLANATION 对齐)
|
||||||
export const defaultContractSupportingAttachmentTypeOptions = [
|
export const defaultContractSupportingAttachmentTypeOptions = [
|
||||||
|
{ label: '特批附件', value: '特批附件' },
|
||||||
{ label: '其他文件', value: CONTRACT_ATTACHMENT_TYPE_OTHER },
|
{ label: '其他文件', value: CONTRACT_ATTACHMENT_TYPE_OTHER },
|
||||||
];
|
];
|
||||||
/** @deprecated 兼容旧引用,实际选项由业务字典动态加载 */
|
/** @deprecated 兼容旧引用,实际选项由业务字典动态加载 */
|
||||||
@@ -299,6 +301,8 @@ export const resolveContractAttachmentType = (
|
|||||||
item => String(item.label) === aliasedFileType || String(item.label) === rawFileType
|
item => String(item.label) === aliasedFileType || String(item.label) === rawFileType
|
||||||
);
|
);
|
||||||
if (matchedByLabel) return matchedByLabel.value;
|
if (matchedByLabel) return matchedByLabel.value;
|
||||||
|
// 行已带类型但字典未命中(如历史保存值、字典缺失)时保留原值,避免重开页面时被降级为其他文件
|
||||||
|
if (rawFileType) return aliasedFileType;
|
||||||
const fileName = normalizeAttachmentTypeText(attachmentName(row));
|
const fileName = normalizeAttachmentTypeText(attachmentName(row));
|
||||||
if (!fileName) return otherType;
|
if (!fileName) return otherType;
|
||||||
const matched = list
|
const matched = list
|
||||||
@@ -641,7 +645,7 @@ export default {
|
|||||||
this.contractAttachmentTypeOptions
|
this.contractAttachmentTypeOptions
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
this.uploadDialogType = this.defaultAttachmentType;
|
this.uploadDialogType = this.uploadDialogType || this.defaultAttachmentType;
|
||||||
}
|
}
|
||||||
this.$message.success('上传成功');
|
this.$message.success('上传成功');
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -0,0 +1,271 @@
|
|||||||
|
<template>
|
||||||
|
<section class="contract-manage-form__section contract-manage-form__section--panel hcs-contract-panel">
|
||||||
|
<div class="contract-manage-form__attachment-head">
|
||||||
|
<div class="dialog-section-title">合规信息</div>
|
||||||
|
<div>
|
||||||
|
<el-button
|
||||||
|
v-if="canApplySpec"
|
||||||
|
type="warning"
|
||||||
|
plain
|
||||||
|
:loading="specApplying"
|
||||||
|
@click="openSpecDialog"
|
||||||
|
>
|
||||||
|
发起特批
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
v-if="isSpecProcessing"
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
@click="confirmSpecResult"
|
||||||
|
>
|
||||||
|
确认特批结果
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<el-descriptions :column="3" class="contract-manage-detail__descriptions">
|
||||||
|
<el-descriptions-item label="合规同步状态">
|
||||||
|
<el-tooltip
|
||||||
|
v-if="hcsSyncMsg"
|
||||||
|
placement="top"
|
||||||
|
:content="hcsSyncMsg"
|
||||||
|
>
|
||||||
|
<el-tag :type="syncTagType" class="status-text">{{ syncLabel }}</el-tag>
|
||||||
|
</el-tooltip>
|
||||||
|
<el-tag v-else :type="syncTagType" class="status-text">{{ syncLabel }}</el-tag>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="合规合同ID">{{
|
||||||
|
contract.hcsFdId || '-'
|
||||||
|
}}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="客商风险">
|
||||||
|
<template v-if="contract.hcsRiskLevel || contract.hcsBlackStatus">
|
||||||
|
<el-tag
|
||||||
|
v-if="isBlacklist"
|
||||||
|
type="danger"
|
||||||
|
class="status-text"
|
||||||
|
>黑名单</el-tag
|
||||||
|
>
|
||||||
|
<span v-if="contract.hcsRiskLevel" class="hcs-contract-panel__risk">{{
|
||||||
|
`风险等级:${contract.hcsRiskLevel}`
|
||||||
|
}}</span>
|
||||||
|
<span v-if="!contract.hcsRiskLevel && !isBlacklist">-</span>
|
||||||
|
</template>
|
||||||
|
<span v-else>-</span>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="特批状态">
|
||||||
|
<el-tag v-if="specLabel" :type="specTagType" class="status-text">{{ specLabel }}</el-tag>
|
||||||
|
<span v-else>-</span>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="特批说明" :span="2">{{
|
||||||
|
contract.hcsSpecMsg || '-'
|
||||||
|
}}</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
|
||||||
|
<el-dialog
|
||||||
|
v-model="specDialogVisible"
|
||||||
|
title="发起合同特批"
|
||||||
|
width="640px"
|
||||||
|
append-to-body
|
||||||
|
destroy-on-close
|
||||||
|
class="hcs-contract-panel__spec-dialog"
|
||||||
|
@closed="resetSpecDialog"
|
||||||
|
>
|
||||||
|
<el-alert
|
||||||
|
title="高风险客商合同需经集团特批后方可签约推送;请上传特批申请材料及内部审批流程附件。"
|
||||||
|
type="warning"
|
||||||
|
:closable="false"
|
||||||
|
class="hcs-contract-panel__spec-alert"
|
||||||
|
/>
|
||||||
|
<el-upload
|
||||||
|
drag
|
||||||
|
multiple
|
||||||
|
:show-file-list="false"
|
||||||
|
:http-request="uploadMaterial"
|
||||||
|
:on-error="() => uploadFailed()"
|
||||||
|
class="hcs-contract-panel__spec-upload"
|
||||||
|
>
|
||||||
|
<el-icon class="el-icon--upload"><upload-filled /></el-icon>
|
||||||
|
<div class="el-upload__text">将特批材料拖到此处,或<em>点击上传到合同系统</em></div>
|
||||||
|
</el-upload>
|
||||||
|
<el-table :data="materials" border class="hcs-contract-panel__spec-table">
|
||||||
|
<el-table-column type="index" label="序号" width="70" align="center" />
|
||||||
|
<el-table-column prop="name" label="文件名" min-width="220" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="fdId" label="合规附件ID" min-width="240" show-overflow-tooltip />
|
||||||
|
<el-table-column label="操作" width="90" align="center" fixed="right">
|
||||||
|
<template #default="{ $index }">
|
||||||
|
<el-link type="danger" @click="materials.splice($index, 1)">删除</el-link>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<template #footer>
|
||||||
|
<el-button type="primary" :loading="specApplying" @click="submitSpec">确认发起</el-button>
|
||||||
|
<el-button @click="specDialogVisible = false">取消</el-button>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</section>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { UploadFilled } from '@element-plus/icons-vue';
|
||||||
|
import {
|
||||||
|
applyContractSpec,
|
||||||
|
confirmContractSpec,
|
||||||
|
uploadAttachment,
|
||||||
|
} from '@/api/business/hcs';
|
||||||
|
|
||||||
|
const SYNC_STATUS_OPTIONS = [
|
||||||
|
{ label: '待推送', value: 'unsynced', type: 'info' },
|
||||||
|
{ label: '已推送', value: 'synced', type: 'success' },
|
||||||
|
{ label: '推送失败', value: 'failed', type: 'danger' },
|
||||||
|
];
|
||||||
|
|
||||||
|
const SPEC_STATUS_OPTIONS = [
|
||||||
|
{ label: '待特批', value: 'need', type: 'warning' },
|
||||||
|
{ label: '特批中', value: 'processing', type: 'warning' },
|
||||||
|
{ label: '特批通过', value: 'approved', type: 'success' },
|
||||||
|
{ label: '特批驳回', value: 'rejected', type: 'danger' },
|
||||||
|
];
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'HcsContractPanel',
|
||||||
|
components: { UploadFilled },
|
||||||
|
props: {
|
||||||
|
// 合同详情行(须含 id/hcsSyncStatus/hcsFdId/hcsRiskLevel/hcsBlackStatus/hcsSpecStatus 等)
|
||||||
|
contract: { type: Object, required: true },
|
||||||
|
},
|
||||||
|
emits: ['refresh'],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
specDialogVisible: false,
|
||||||
|
specApplying: false,
|
||||||
|
materials: [],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
syncLabel() {
|
||||||
|
return SYNC_STATUS_OPTIONS.find(item => item.value === this.contract.hcsSyncStatus)?.label || '-';
|
||||||
|
},
|
||||||
|
syncTagType() {
|
||||||
|
return SYNC_STATUS_OPTIONS.find(item => item.value === this.contract.hcsSyncStatus)?.type || 'info';
|
||||||
|
},
|
||||||
|
hcsSyncMsg() {
|
||||||
|
return this.contract.hcsSyncMsg || '';
|
||||||
|
},
|
||||||
|
isBlacklist() {
|
||||||
|
return String(this.contract.hcsBlackStatus || '').toLowerCase() === 'yes';
|
||||||
|
},
|
||||||
|
specLabel() {
|
||||||
|
return SPEC_STATUS_OPTIONS.find(item => item.value === this.contract.hcsSpecStatus)?.label || '';
|
||||||
|
},
|
||||||
|
specTagType() {
|
||||||
|
return SPEC_STATUS_OPTIONS.find(item => item.value === this.contract.hcsSpecStatus)?.type || 'info';
|
||||||
|
},
|
||||||
|
isSpecProcessing() {
|
||||||
|
return this.contract.hcsSpecStatus === 'processing';
|
||||||
|
},
|
||||||
|
canApplySpec() {
|
||||||
|
return ['need', 'rejected'].includes(this.contract.hcsSpecStatus);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
openSpecDialog() {
|
||||||
|
this.specDialogVisible = true;
|
||||||
|
},
|
||||||
|
resetSpecDialog() {
|
||||||
|
this.materials = [];
|
||||||
|
},
|
||||||
|
// 自定义上传:直传合同合规系统(C103-2),成功记录合规附件ID
|
||||||
|
uploadMaterial(options) {
|
||||||
|
const file = options.file;
|
||||||
|
if (file.size / 1024 / 1024 > 50) {
|
||||||
|
this.$message.warning('单文件大小不能超过 50MB');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const formData = new FormData();
|
||||||
|
formData.append('fdFile', file);
|
||||||
|
uploadAttachment(formData)
|
||||||
|
.then(response => {
|
||||||
|
const fdId = response?.data?.data || response?.data;
|
||||||
|
if (!fdId || typeof fdId !== 'string') {
|
||||||
|
this.$message.error(response?.data?.msg || '上传合同系统失败');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.materials.push({ fdId, name: file.name });
|
||||||
|
this.$message.success(`已上传合同系统:${file.name}`);
|
||||||
|
})
|
||||||
|
.catch(error => {
|
||||||
|
this.$message.error(error?.response?.data?.msg || '上传合同系统失败');
|
||||||
|
});
|
||||||
|
},
|
||||||
|
uploadFailed() {
|
||||||
|
this.$message.error('上传合同系统失败');
|
||||||
|
},
|
||||||
|
submitSpec() {
|
||||||
|
if (!this.materials.length) {
|
||||||
|
this.$message.warning('请先上传特批申请材料');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.specApplying = true;
|
||||||
|
applyContractSpec({
|
||||||
|
contractId: this.contract.id,
|
||||||
|
attachments: this.materials.map(item => ({ fdId: item.fdId, name: item.name })),
|
||||||
|
})
|
||||||
|
.then(response => {
|
||||||
|
if (response?.data?.success === false) {
|
||||||
|
this.$message.error(response?.data?.msg || '特批发起失败');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.$message.success(response?.data?.data || '特批发起成功,等待集团审批');
|
||||||
|
this.specDialogVisible = false;
|
||||||
|
this.$emit('refresh');
|
||||||
|
})
|
||||||
|
.catch(error => {
|
||||||
|
this.$message.error(error?.response?.data?.msg || '特批发起失败');
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
this.specApplying = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
confirmSpecResult() {
|
||||||
|
this.$prompt('请输入集团特批结果(approved=通过 / rejected=驳回)', '确认特批结果', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
inputPattern: /^(approved|rejected)$/,
|
||||||
|
inputErrorMessage: '请输入 approved 或 rejected',
|
||||||
|
}).then(({ value }) => {
|
||||||
|
confirmContractSpec(this.contract.id, value).then(() => {
|
||||||
|
this.$message.success('特批结果已确认');
|
||||||
|
this.$emit('refresh');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.hcs-contract-panel__risk {
|
||||||
|
margin-left: 8px;
|
||||||
|
color: #606266;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hcs-contract-panel__spec-alert {
|
||||||
|
margin-bottom: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hcs-contract-panel__spec-upload {
|
||||||
|
margin-bottom: 12px;
|
||||||
|
|
||||||
|
:deep(.el-upload) {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.el-upload-dragger) {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.hcs-contract-panel__spec-table {
|
||||||
|
margin-bottom: 4px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -294,8 +294,8 @@ export default {
|
|||||||
query: { id: String(customerId), name: '查看客商档案', view: '1' },
|
query: { id: String(customerId), name: '查看客商档案', view: '1' },
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
waybillStatusName(value) { return ({ pending: '待执行', waiting: '待执行', running: '进行中', processing: '进行中', completed: '已完成', cancelled: '已取消' })[value] || value || '-'; },
|
waybillStatusName(value) { return ({ pending: '待执行', waiting: '待执行', running: '进行中', processing: '进行中', pending_return_confirm: '待回单确认', completed: '已完成', cancelled: '已取消' })[value] || value || '-'; },
|
||||||
waybillStatusType(value) { return ({ pending: 'info', waiting: 'info', running: 'warning', processing: 'warning', completed: 'success', cancelled: 'danger' })[value] || 'info'; },
|
waybillStatusType(value) { return ({ pending: 'info', waiting: 'info', running: 'warning', processing: 'warning', pending_return_confirm: 'warning', completed: 'success', cancelled: 'danger' })[value] || 'info'; },
|
||||||
statusName(value) { return ({ waiting_dispatch: '待调度', dispatching: '调度中', completed: '调度完成', closed: '调度关闭' })[value] || value || '-'; },
|
statusName(value) { return ({ waiting_dispatch: '待调度', dispatching: '调度中', completed: '调度完成', closed: '调度关闭' })[value] || value || '-'; },
|
||||||
statusType(value) { return ({ waiting_dispatch: 'warning', dispatching: 'success', completed: 'primary', closed: 'danger' })[value] || 'info'; },
|
statusType(value) { return ({ waiting_dispatch: 'warning', dispatching: 'success', completed: 'primary', closed: 'danger' })[value] || 'info'; },
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -210,7 +210,11 @@
|
|||||||
@mousedown="() => handleDriverFocus(route)"
|
@mousedown="() => handleDriverFocus(route)"
|
||||||
@focus="() => handleDriverFocus(route)"
|
@focus="() => handleDriverFocus(route)"
|
||||||
@select="handleDriverSuggestionSelect"
|
@select="handleDriverSuggestionSelect"
|
||||||
/></el-form-item
|
>
|
||||||
|
<template #default="{ item }">
|
||||||
|
<span>{{ driverOptionText(item) }}</span>
|
||||||
|
</template>
|
||||||
|
</el-autocomplete></el-form-item
|
||||||
></el-col>
|
></el-col>
|
||||||
<el-col :span="6"
|
<el-col :span="6"
|
||||||
><el-form-item
|
><el-form-item
|
||||||
@@ -239,7 +243,11 @@
|
|||||||
@mousedown="() => handleDriverFocus(route)"
|
@mousedown="() => handleDriverFocus(route)"
|
||||||
@focus="() => handleDriverFocus(route)"
|
@focus="() => handleDriverFocus(route)"
|
||||||
@select="handleEscortSuggestionSelect"
|
@select="handleEscortSuggestionSelect"
|
||||||
/></el-form-item
|
>
|
||||||
|
<template #default="{ item }">
|
||||||
|
<span>{{ driverOptionText(item) }}</span>
|
||||||
|
</template>
|
||||||
|
</el-autocomplete></el-form-item
|
||||||
></el-col>
|
></el-col>
|
||||||
<el-col v-if="route.carrierType !== '承运商'" :span="6"
|
<el-col v-if="route.carrierType !== '承运商'" :span="6"
|
||||||
><el-form-item label="押运人手机号"
|
><el-form-item label="押运人手机号"
|
||||||
@@ -316,7 +324,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import * as api from '@/api/business/master-order';
|
import * as api from '@/api/business/master-order';
|
||||||
import { fetchDriversByCarrierOrganizations } from '@/utils/carrier-org-resource';
|
import { fetchDriverCandidates, driverOptionText } from '@/utils/carrier-org-resource';
|
||||||
import { formatContractOptionLabel } from '@/utils/contract';
|
import { formatContractOptionLabel } from '@/utils/contract';
|
||||||
import {
|
import {
|
||||||
currencyUnit,
|
currencyUnit,
|
||||||
@@ -403,6 +411,7 @@ export default {
|
|||||||
this.applySelfOperatedCarrierDefaults();
|
this.applySelfOperatedCarrierDefaults();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
driverOptionText,
|
||||||
loadQuantityUnitOptions() {
|
loadQuantityUnitOptions() {
|
||||||
if (this.quantityUnitLoading) return this.quantityUnitLoadPromise;
|
if (this.quantityUnitLoading) return this.quantityUnitLoadPromise;
|
||||||
this.quantityUnitLoading = true;
|
this.quantityUnitLoading = true;
|
||||||
@@ -944,12 +953,6 @@ export default {
|
|||||||
route.escortPhone = '';
|
route.escortPhone = '';
|
||||||
this.driverOptions = [];
|
this.driverOptions = [];
|
||||||
},
|
},
|
||||||
getRouteCarrierFilter(route = {}) {
|
|
||||||
return {
|
|
||||||
carrierId: route.carrierId || '',
|
|
||||||
carrierName: route.carrierName || '',
|
|
||||||
};
|
|
||||||
},
|
|
||||||
carrierOptionValue(item = {}) {
|
carrierOptionValue(item = {}) {
|
||||||
return item.contractId || item.id || item.value || item.carrierName || '';
|
return item.contractId || item.id || item.value || item.carrierName || '';
|
||||||
},
|
},
|
||||||
@@ -1026,36 +1029,22 @@ export default {
|
|||||||
this.activeSuggestRoute = route;
|
this.activeSuggestRoute = route;
|
||||||
},
|
},
|
||||||
async loadDriverOptions(route = {}, keyword = '') {
|
async loadDriverOptions(route = {}, keyword = '') {
|
||||||
const carrier = this.getRouteCarrierFilter(route);
|
|
||||||
if (!carrier.carrierId && !carrier.carrierName) {
|
|
||||||
this.driverOptions = [];
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
this.driverLoading = true;
|
this.driverLoading = true;
|
||||||
try {
|
try {
|
||||||
this.driverOptions = await fetchDriversByCarrierOrganizations(
|
this.driverOptions = await fetchDriverCandidates({
|
||||||
{ size: 20, ...(keyword ? { driverName: keyword } : {}), posts: '司机' },
|
size: 20,
|
||||||
carrier
|
...(keyword ? { driverName: keyword } : {}),
|
||||||
);
|
posts: '司机',
|
||||||
|
});
|
||||||
return this.driverOptions;
|
return this.driverOptions;
|
||||||
} finally {
|
} finally {
|
||||||
this.driverLoading = false;
|
this.driverLoading = false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
fetchDriverSuggestions(queryString, callback) {
|
fetchDriverSuggestions(queryString, callback) {
|
||||||
const route = this.activeSuggestRoute || {};
|
|
||||||
const carrier = this.getRouteCarrierFilter(route);
|
|
||||||
const keyword = String(queryString || '').trim();
|
const keyword = String(queryString || '').trim();
|
||||||
if (!carrier.carrierId && !carrier.carrierName) {
|
|
||||||
callback([]);
|
|
||||||
if (!keyword) this.$message.warning('请先选择承运商');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.driverLoading = true;
|
this.driverLoading = true;
|
||||||
fetchDriversByCarrierOrganizations(
|
fetchDriverCandidates({ size: 20, ...(keyword ? { driverName: keyword } : {}), posts: '司机' })
|
||||||
{ size: 20, ...(keyword ? { driverName: keyword } : {}), posts: '司机' },
|
|
||||||
carrier
|
|
||||||
)
|
|
||||||
.then(records => {
|
.then(records => {
|
||||||
this.driverOptions = records;
|
this.driverOptions = records;
|
||||||
callback(
|
callback(
|
||||||
@@ -1080,19 +1069,13 @@ export default {
|
|||||||
if (drivingVehicle) route.vehicleNo = drivingVehicle;
|
if (drivingVehicle) route.vehicleNo = drivingVehicle;
|
||||||
},
|
},
|
||||||
fetchEscortSuggestions(queryString, callback) {
|
fetchEscortSuggestions(queryString, callback) {
|
||||||
const route = this.activeSuggestRoute || {};
|
|
||||||
const keyword = String(queryString || '').trim();
|
const keyword = String(queryString || '').trim();
|
||||||
const carrier = this.getRouteCarrierFilter(route);
|
|
||||||
if (!carrier.carrierId && !carrier.carrierName) {
|
|
||||||
callback([]);
|
|
||||||
if (!keyword) this.$message.warning('请先选择承运商');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.escortLoading = true;
|
this.escortLoading = true;
|
||||||
fetchDriversByCarrierOrganizations(
|
fetchDriverCandidates({
|
||||||
{ size: 20, ...(keyword ? { driverName: keyword } : {}), posts: '押运员' },
|
size: 20,
|
||||||
carrier
|
...(keyword ? { driverName: keyword } : {}),
|
||||||
)
|
posts: '押运员',
|
||||||
|
})
|
||||||
.then(records => {
|
.then(records => {
|
||||||
callback(
|
callback(
|
||||||
records.map(item => ({
|
records.map(item => ({
|
||||||
|
|||||||
@@ -94,7 +94,7 @@
|
|||||||
<div class="route-node-form">
|
<div class="route-node-form">
|
||||||
<el-form-item label="途经地" required class="route-address-form-item"
|
<el-form-item label="途经地" required class="route-address-form-item"
|
||||||
><div class="route-address-inputs"
|
><div class="route-address-inputs"
|
||||||
><el-input v-if="isNonRoadAddress(`route-${index}`)" v-model="route.departureName" class="route-address-name" readonly :disabled="isBasicRouteReadonly || !route.transportType" placeholder="请先选择运输方式" /><el-cascader v-else v-model="addressRegionPaths[`route-${index}`]" class="route-address-name" :options="regionOptions" :props="regionCascaderProps" :loading="regionLoading" :disabled="isBasicRouteReadonly || !route.transportType" placeholder="请选择省市区" clearable filterable @visible-change="visible => visible && loadRegionOptions()" @change="value => handleAddressRegionChange(`route-${index}`, value)" /><el-input v-model="route.departureAddress" class="route-address-detail" readonly :disabled="isBasicRouteReadonly || !route.transportType" placeholder="请先选择运输方式" @click="handleAddressDetailClick(`route-${index}`)" /><el-tooltip content="选择常用地址" placement="top"><el-button class="address-picker-button" type="primary" link :icon="OfficeBuilding" :disabled="isBasicRouteReadonly || !route.transportType" @click="openCommonAddress(`route-${index}`)" /></el-tooltip></div
|
><el-input v-if="isNonRoadAddress(`route-${index}`)" v-model="route.departureName" class="route-address-name" readonly :disabled="isBasicRouteReadonly" placeholder="请选择站点" /><el-cascader v-else v-model="addressRegionPaths[`route-${index}`]" class="route-address-name" :options="regionOptions" :props="regionCascaderProps" :loading="regionLoading" :disabled="isBasicRouteReadonly" placeholder="请选择省市区" clearable filterable @visible-change="visible => visible && loadRegionOptions()" @change="value => handleAddressRegionChange(`route-${index}`, value)" /><el-input v-model="route.departureAddress" class="route-address-detail" readonly :disabled="isBasicRouteReadonly" placeholder="请输入详细地址" @click="handleAddressDetailClick(`route-${index}`)" /><el-tooltip content="选择常用地址" placement="top"><el-button class="address-picker-button" type="primary" link :icon="OfficeBuilding" :disabled="isBasicRouteReadonly" @click="openCommonAddress(`route-${index}`)" /></el-tooltip></div
|
||||||
></el-form-item>
|
></el-form-item>
|
||||||
<el-form-item label="联系人" class="route-contact-form-item"><el-input v-model="route.departureContact" :disabled="isBasicRouteReadonly" placeholder="请输入" /></el-form-item>
|
<el-form-item label="联系人" class="route-contact-form-item"><el-input v-model="route.departureContact" :disabled="isBasicRouteReadonly" placeholder="请输入" /></el-form-item>
|
||||||
<el-form-item label="联系方式" class="route-phone-form-item"><div class="route-contact-actions"><el-input v-model="route.departurePhone" :disabled="isBasicRouteReadonly" placeholder="请输入" /><template v-if="!isBasicRouteReadonly"><el-tooltip v-if="index === form.routes.length - 1" content="新增途经点" placement="top"><el-button class="route-action-button" type="primary" link @click="addRoute"><el-icon><CirclePlus /></el-icon></el-button></el-tooltip><el-tooltip content="删除途经点" placement="top"><el-button class="route-action-button" type="danger" link @click="removeRoute(index)"><el-icon><Remove /></el-icon></el-button></el-tooltip></template></div></el-form-item>
|
<el-form-item label="联系方式" class="route-phone-form-item"><div class="route-contact-actions"><el-input v-model="route.departurePhone" :disabled="isBasicRouteReadonly" placeholder="请输入" /><template v-if="!isBasicRouteReadonly"><el-tooltip v-if="index === form.routes.length - 1" content="新增途经点" placement="top"><el-button class="route-action-button" type="primary" link @click="addRoute"><el-icon><CirclePlus /></el-icon></el-button></el-tooltip><el-tooltip content="删除途经点" placement="top"><el-button class="route-action-button" type="danger" link @click="removeRoute(index)"><el-icon><Remove /></el-icon></el-button></el-tooltip></template></div></el-form-item>
|
||||||
@@ -111,7 +111,7 @@
|
|||||||
<div class="route-node-form">
|
<div class="route-node-form">
|
||||||
<el-form-item label="收货地" required class="route-address-form-item"
|
<el-form-item label="收货地" required class="route-address-form-item"
|
||||||
><div class="route-address-inputs"
|
><div class="route-address-inputs"
|
||||||
><el-input v-if="isNonRoadAddress('arrival')" v-model="form.arrivalName" class="route-address-name" readonly :disabled="isBasicRouteReadonly || !form.finalTransportType" placeholder="请先选择运输方式" /><el-cascader v-else v-model="addressRegionPaths.arrival" class="route-address-name" :options="regionOptions" :props="regionCascaderProps" :loading="regionLoading" :disabled="isBasicRouteReadonly || !form.finalTransportType" placeholder="请选择省市区" clearable filterable @visible-change="visible => visible && loadRegionOptions()" @change="value => handleAddressRegionChange('arrival', value)" /><el-input v-model="form.arrivalAddress" class="route-address-detail" readonly :disabled="isBasicRouteReadonly || !form.finalTransportType" placeholder="请先选择运输方式" @click="handleAddressDetailClick('arrival')" /><el-tooltip content="选择常用地址" placement="top"><el-button class="address-picker-button" type="primary" link :icon="OfficeBuilding" :disabled="isBasicRouteReadonly || !form.finalTransportType" @click="openCommonAddress('arrival')" /></el-tooltip></div
|
><el-input v-if="isNonRoadAddress('arrival')" v-model="form.arrivalName" class="route-address-name" readonly :disabled="isBasicRouteReadonly" placeholder="请选择站点" /><el-cascader v-else v-model="addressRegionPaths.arrival" class="route-address-name" :options="regionOptions" :props="regionCascaderProps" :loading="regionLoading" :disabled="isBasicRouteReadonly" placeholder="请选择省市区" clearable filterable @visible-change="visible => visible && loadRegionOptions()" @change="value => handleAddressRegionChange('arrival', value)" /><el-input v-model="form.arrivalAddress" class="route-address-detail" readonly :disabled="isBasicRouteReadonly" placeholder="请输入详细地址" @click="handleAddressDetailClick('arrival')" /><el-tooltip content="选择常用地址" placement="top"><el-button class="address-picker-button" type="primary" link :icon="OfficeBuilding" :disabled="isBasicRouteReadonly" @click="openCommonAddress('arrival')" /></el-tooltip></div
|
||||||
></el-form-item>
|
></el-form-item>
|
||||||
<el-form-item label="联系人" class="route-contact-form-item"
|
<el-form-item label="联系人" class="route-contact-form-item"
|
||||||
><el-input v-model="form.arrivalContact" :disabled="isBasicRouteReadonly" placeholder="请输入" /></el-form-item>
|
><el-input v-model="form.arrivalContact" :disabled="isBasicRouteReadonly" placeholder="请输入" /></el-form-item>
|
||||||
@@ -352,7 +352,12 @@
|
|||||||
@opened="loadAddressList"
|
@opened="loadAddressList"
|
||||||
>
|
>
|
||||||
<div class="route-dialog__search common-address-dialog__search">
|
<div class="route-dialog__search common-address-dialog__search">
|
||||||
<el-form :model="addressQuery" label-position="right" label-width="auto">
|
<el-form
|
||||||
|
class="dialog-form-label-fixed"
|
||||||
|
:model="addressQuery"
|
||||||
|
label-position="right"
|
||||||
|
label-width="96px"
|
||||||
|
>
|
||||||
<el-row :gutter="16">
|
<el-row :gutter="16">
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="地址名称">
|
<el-form-item label="地址名称">
|
||||||
@@ -446,7 +451,12 @@
|
|||||||
@opened="loadStationList"
|
@opened="loadStationList"
|
||||||
>
|
>
|
||||||
<div class="route-dialog__search">
|
<div class="route-dialog__search">
|
||||||
<el-form :model="stationQuery" label-position="right" label-width="auto">
|
<el-form
|
||||||
|
class="dialog-form-label-fixed"
|
||||||
|
:model="stationQuery"
|
||||||
|
label-position="right"
|
||||||
|
label-width="96px"
|
||||||
|
>
|
||||||
<el-row :gutter="16">
|
<el-row :gutter="16">
|
||||||
<el-col :span="8"><el-form-item label="站点名称"><el-input v-model="stationQuery.name" clearable placeholder="请输入" /></el-form-item></el-col>
|
<el-col :span="8"><el-form-item label="站点名称"><el-input v-model="stationQuery.name" clearable placeholder="请输入" /></el-form-item></el-col>
|
||||||
<el-col :span="8"><el-form-item label="详细地址"><el-input v-model="stationQuery.detailAddress" clearable placeholder="请输入" /></el-form-item></el-col>
|
<el-col :span="8"><el-form-item label="详细地址"><el-input v-model="stationQuery.detailAddress" clearable placeholder="请输入" /></el-form-item></el-col>
|
||||||
@@ -652,6 +662,8 @@ export default {
|
|||||||
addressQuery: {},
|
addressQuery: {},
|
||||||
addressPage: { current: 1, size: 10, total: 0 },
|
addressPage: { current: 1, size: 10, total: 0 },
|
||||||
addressRegionPaths: { departure: [], arrival: [] },
|
addressRegionPaths: { departure: [], arrival: [] },
|
||||||
|
// 程序回填省市区时抑制 cascader @change,避免空值回调把已填地址清空
|
||||||
|
suppressAddressRegionChange: false,
|
||||||
regionOptions: [],
|
regionOptions: [],
|
||||||
regionLoading: false,
|
regionLoading: false,
|
||||||
regionRequest: null,
|
regionRequest: null,
|
||||||
@@ -714,7 +726,7 @@ export default {
|
|||||||
'msg',
|
'msg',
|
||||||
'zip',
|
'zip',
|
||||||
],
|
],
|
||||||
transports: ['公路运输', '铁路运输', '水路运输', '航空运输'],
|
transports: ['铁路运输', '水路运输', '航空运输', '公路运输'],
|
||||||
quantityUnitOptions: [],
|
quantityUnitOptions: [],
|
||||||
quantityUnitLoading: false,
|
quantityUnitLoading: false,
|
||||||
form: {
|
form: {
|
||||||
@@ -798,6 +810,7 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
formatContractOptionLabel,
|
formatContractOptionLabel,
|
||||||
defaultQuantityUnit() {
|
defaultQuantityUnit() {
|
||||||
|
if (this.quantityUnitOptions.includes('吨')) return '吨';
|
||||||
return this.quantityUnitOptions[0] || '吨';
|
return this.quantityUnitOptions[0] || '吨';
|
||||||
},
|
},
|
||||||
loadQuantityUnitOptions() {
|
loadQuantityUnitOptions() {
|
||||||
@@ -888,26 +901,63 @@ export default {
|
|||||||
findRegionPathByName(options = [], regionName = '', parents = []) {
|
findRegionPathByName(options = [], regionName = '', parents = []) {
|
||||||
const target = String(regionName || '').replace(/\s+/g, '');
|
const target = String(regionName || '').replace(/\s+/g, '');
|
||||||
if (!target) return [];
|
if (!target) return [];
|
||||||
|
let suffixMatch = [];
|
||||||
for (const item of options) {
|
for (const item of options) {
|
||||||
const nextParents = [...parents, item];
|
const nextParents = [...parents, item];
|
||||||
const name = nextParents.map(region => region.title || region.name || '').join('');
|
const name = nextParents.map(region => region.title || region.name || '').join('');
|
||||||
if (name === target) return nextParents.map(region => region.id);
|
if (name === target) return nextParents.map(region => region.id);
|
||||||
|
// 常用地址可能缺省名,允许「市+区」后缀命中完整省市区路径
|
||||||
|
if (!suffixMatch.length && name.endsWith(target) && target.length >= 2) {
|
||||||
|
suffixMatch = nextParents.map(region => region.id);
|
||||||
|
}
|
||||||
const path = this.findRegionPathByName(item.children, target, nextParents);
|
const path = this.findRegionPathByName(item.children, target, nextParents);
|
||||||
if (path.length) return path;
|
if (path.length) return path;
|
||||||
}
|
}
|
||||||
return [];
|
return suffixMatch;
|
||||||
},
|
},
|
||||||
findRegionPathByCode(options = [], regionCode = '', parents = []) {
|
findRegionPathByCode(options = [], regionCode = '', parents = []) {
|
||||||
const target = String(regionCode || '').trim();
|
const target = String(regionCode || '').trim();
|
||||||
if (!target) return [];
|
if (!target) return [];
|
||||||
for (const item of options) {
|
for (const item of options) {
|
||||||
const nextParents = [...parents, item];
|
const nextParents = [...parents, item];
|
||||||
if (String(item.id) === target) return nextParents.map(region => region.id);
|
if (String(item.id) === target || String(item.value || '') === target) {
|
||||||
|
return nextParents.map(region => region.id);
|
||||||
|
}
|
||||||
const path = this.findRegionPathByCode(item.children, target, nextParents);
|
const path = this.findRegionPathByCode(item.children, target, nextParents);
|
||||||
if (path.length) return path;
|
if (path.length) return path;
|
||||||
}
|
}
|
||||||
return [];
|
return [];
|
||||||
},
|
},
|
||||||
|
resolveRegionPath(field) {
|
||||||
|
if (!field) return [];
|
||||||
|
const codePath = this.findRegionPathByCode(
|
||||||
|
this.regionOptions,
|
||||||
|
field.model[field.regionCode]
|
||||||
|
);
|
||||||
|
if (codePath.length) return codePath;
|
||||||
|
const namePath = this.findRegionPathByName(this.regionOptions, field.model[field.name]);
|
||||||
|
if (namePath.length) return namePath;
|
||||||
|
const composed = [field.model[field.provinceName], field.model[field.cityName], field.model[field.districtName]]
|
||||||
|
.filter(Boolean)
|
||||||
|
.join('');
|
||||||
|
return this.findRegionPathByName(this.regionOptions, composed);
|
||||||
|
},
|
||||||
|
setAddressRegionPath(target, path = []) {
|
||||||
|
const nextPath = Array.isArray(path) ? path.map(item => String(item)) : [];
|
||||||
|
const current = this.addressRegionPaths[target] || [];
|
||||||
|
if (
|
||||||
|
current.length === nextPath.length &&
|
||||||
|
current.every((item, index) => String(item) === String(nextPath[index]))
|
||||||
|
) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.suppressAddressRegionChange = true;
|
||||||
|
// Vue3 直接写动态 key,避免整体替换对象导致其它 cascader 重建并触发空 @change
|
||||||
|
this.addressRegionPaths[target] = nextPath;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.suppressAddressRegionChange = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
regionLabels(path = []) {
|
regionLabels(path = []) {
|
||||||
let options = this.regionOptions;
|
let options = this.regionOptions;
|
||||||
const labels = [];
|
const labels = [];
|
||||||
@@ -946,10 +996,22 @@ export default {
|
|||||||
this.setAddressRegionNames(field, [provinceMatch?.[0], cityMatch?.[0], districtMatch?.[0]]);
|
this.setAddressRegionNames(field, [provinceMatch?.[0], cityMatch?.[0], districtMatch?.[0]]);
|
||||||
},
|
},
|
||||||
handleAddressRegionChange(target, value) {
|
handleAddressRegionChange(target, value) {
|
||||||
|
if (this.suppressAddressRegionChange) return;
|
||||||
const field = this.addressModel(target);
|
const field = this.addressModel(target);
|
||||||
const path = Array.isArray(value) ? value.map(item => String(item)) : [];
|
const path = Array.isArray(value) ? value.map(item => String(item)) : [];
|
||||||
this.addressRegionPaths = { ...this.addressRegionPaths, [target]: path };
|
this.setAddressRegionPath(target, path);
|
||||||
if (!field) return;
|
if (!field) return;
|
||||||
|
// 程序回填/重建过程中 cascader 可能短暂抛出空值,不能据此清空已选常用地址
|
||||||
|
if (!path.length) {
|
||||||
|
const hasExisting =
|
||||||
|
String(field.model[field.name] || '').trim() ||
|
||||||
|
String(field.model[field.address] || '').trim() ||
|
||||||
|
String(field.model[field.regionCode] || '').trim();
|
||||||
|
if (hasExisting) {
|
||||||
|
this.$nextTick(() => this.syncAddressRegionPath(target));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
const labels = this.regionLabels(path);
|
const labels = this.regionLabels(path);
|
||||||
field.model[field.name] = labels.join('');
|
field.model[field.name] = labels.join('');
|
||||||
field.model[field.regionCode] = path.at(-1) || '';
|
field.model[field.regionCode] = path.at(-1) || '';
|
||||||
@@ -958,19 +1020,29 @@ export default {
|
|||||||
},
|
},
|
||||||
syncAddressRegionPath(target) {
|
syncAddressRegionPath(target) {
|
||||||
const field = this.addressModel(target);
|
const field = this.addressModel(target);
|
||||||
if (!field) return;
|
if (!field || !this.regionOptions.length) return;
|
||||||
const codePath = this.findRegionPathByCode(this.regionOptions, field.model[field.regionCode]);
|
const path = this.resolveRegionPath(field);
|
||||||
const path = codePath.length
|
this.setAddressRegionPath(target, path);
|
||||||
? codePath
|
|
||||||
: this.findRegionPathByName(this.regionOptions, field.model[field.name]);
|
|
||||||
this.addressRegionPaths = { ...this.addressRegionPaths, [target]: path };
|
|
||||||
if (path.length) this.setAddressRegionNames(field, this.regionLabels(path));
|
if (path.length) this.setAddressRegionNames(field, this.regionLabels(path));
|
||||||
},
|
},
|
||||||
syncAddressRegionPaths() {
|
syncAddressRegionPaths() {
|
||||||
if (!this.regionOptions.length) return;
|
if (!this.regionOptions.length) return;
|
||||||
['departure', 'arrival', ...this.form.routes.map((route, index) => `route-${index}`)].forEach(target => {
|
this.suppressAddressRegionChange = true;
|
||||||
this.syncAddressRegionPath(target);
|
try {
|
||||||
});
|
['departure', 'arrival', ...this.form.routes.map((route, index) => `route-${index}`)].forEach(
|
||||||
|
target => {
|
||||||
|
const field = this.addressModel(target);
|
||||||
|
if (!field) return;
|
||||||
|
const path = this.resolveRegionPath(field);
|
||||||
|
this.addressRegionPaths[target] = path;
|
||||||
|
if (path.length) this.setAddressRegionNames(field, this.regionLabels(path));
|
||||||
|
}
|
||||||
|
);
|
||||||
|
} finally {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.suppressAddressRegionChange = false;
|
||||||
|
});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
async loadDetail(id) {
|
async loadDetail(id) {
|
||||||
const res = await api.getDetail(id);
|
const res = await api.getDetail(id);
|
||||||
@@ -1144,13 +1216,15 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
addressTransportType(target) {
|
addressTransportType(target) {
|
||||||
if (target.startsWith('route-')) {
|
const key = String(target || '');
|
||||||
return this.form.routes[Number(target.slice(6))]?.transportType || '';
|
if (key.startsWith('route-')) {
|
||||||
|
return String(this.form.routes[Number(key.slice(6))]?.transportType || '');
|
||||||
}
|
}
|
||||||
return target === 'arrival' ? this.form.finalTransportType : this.form.routes[0]?.transportType || '';
|
if (key === 'arrival') return String(this.form.finalTransportType || '');
|
||||||
|
return String(this.form.routes[0]?.transportType || '');
|
||||||
},
|
},
|
||||||
addressTransportMode(target) {
|
addressTransportMode(target) {
|
||||||
const type = this.addressTransportType(target);
|
const type = String(this.addressTransportType(target) || '');
|
||||||
if (type.includes('铁路')) return 'rail';
|
if (type.includes('铁路')) return 'rail';
|
||||||
if (type.includes('水路') || type.includes('水运') || type.includes('海运')) return 'water';
|
if (type.includes('水路') || type.includes('水运') || type.includes('海运')) return 'water';
|
||||||
if (type.includes('航空') || type.includes('空运')) return 'air';
|
if (type.includes('航空') || type.includes('空运')) return 'air';
|
||||||
@@ -1164,8 +1238,7 @@ export default {
|
|||||||
const field = this.addressModel(target);
|
const field = this.addressModel(target);
|
||||||
if (!field) return false;
|
if (!field) return false;
|
||||||
const siteCode = String(field.model[field.siteCode] || '').trim();
|
const siteCode = String(field.model[field.siteCode] || '').trim();
|
||||||
// 地址展示模式由实际选择的数据决定:有站点编码表示非公路站点名称,
|
// 展示模式由已选数据决定:有站点编码则显示站点名,否则省市区;暂不按运输方式强制站点限制。
|
||||||
// 没有站点编码则保留省市区级联,避免切换运输方式时改写已有地址。
|
|
||||||
return Boolean(siteCode && siteCode !== '/');
|
return Boolean(siteCode && siteCode !== '/');
|
||||||
},
|
},
|
||||||
resolveAddressRegionCode(row = {}) {
|
resolveAddressRegionCode(row = {}) {
|
||||||
@@ -1174,12 +1247,7 @@ export default {
|
|||||||
openCommonAddress(target) {
|
openCommonAddress(target) {
|
||||||
if (this.isBasicRouteReadonly) return;
|
if (this.isBasicRouteReadonly) return;
|
||||||
this.addressTarget = target;
|
this.addressTarget = target;
|
||||||
if (this.addressTransportMode(target) !== 'road') {
|
// 暂不按运输方式限制站点:统一走常用地址选择。
|
||||||
this.stationQuery = {};
|
|
||||||
this.stationPage.current = 1;
|
|
||||||
this.stationDialogVisible = true;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.addressQuery = {};
|
this.addressQuery = {};
|
||||||
this.addressPage.current = 1;
|
this.addressPage.current = 1;
|
||||||
this.addressDialogVisible = true;
|
this.addressDialogVisible = true;
|
||||||
@@ -1224,8 +1292,9 @@ export default {
|
|||||||
this.stationPage.current = 1;
|
this.stationPage.current = 1;
|
||||||
this.loadStationList();
|
this.loadStationList();
|
||||||
},
|
},
|
||||||
selectStation(row) {
|
async selectStation(row) {
|
||||||
const target = this.addressModel(this.addressTarget);
|
const targetKey = this.addressTarget;
|
||||||
|
const target = this.addressModel(targetKey);
|
||||||
if (!target) return;
|
if (!target) return;
|
||||||
const station = this.normalizeStation(row);
|
const station = this.normalizeStation(row);
|
||||||
target.model[target.name] = station.stationName || station.regionName;
|
target.model[target.name] = station.stationName || station.regionName;
|
||||||
@@ -1236,7 +1305,9 @@ export default {
|
|||||||
target.model[target.siteCode] = station.stationCode;
|
target.model[target.siteCode] = station.stationCode;
|
||||||
this.setAddressRegionNamesFromRow(target, station);
|
this.setAddressRegionNamesFromRow(target, station);
|
||||||
this.stationDialogVisible = false;
|
this.stationDialogVisible = false;
|
||||||
this.loadRegionOptions().then(() => this.syncAddressRegionPath(this.addressTarget));
|
await this.loadRegionOptions();
|
||||||
|
await this.$nextTick();
|
||||||
|
this.syncAddressRegionPath(targetKey);
|
||||||
},
|
},
|
||||||
async loadAddressList() {
|
async loadAddressList() {
|
||||||
this.addressLoading = true;
|
this.addressLoading = true;
|
||||||
@@ -1262,8 +1333,9 @@ export default {
|
|||||||
this.addressPage.current = 1;
|
this.addressPage.current = 1;
|
||||||
this.loadAddressList();
|
this.loadAddressList();
|
||||||
},
|
},
|
||||||
selectAddress(row) {
|
async selectAddress(row) {
|
||||||
const target = this.addressModel(this.addressTarget);
|
const targetKey = this.addressTarget;
|
||||||
|
const target = this.addressModel(targetKey);
|
||||||
if (!target) return;
|
if (!target) return;
|
||||||
target.model[target.name] = row.regionName || row.addressName || '';
|
target.model[target.name] = row.regionName || row.addressName || '';
|
||||||
target.model[target.address] = row.detailAddress || row.address || '';
|
target.model[target.address] = row.detailAddress || row.address || '';
|
||||||
@@ -1275,22 +1347,17 @@ export default {
|
|||||||
target.model[target.siteCode] = '';
|
target.model[target.siteCode] = '';
|
||||||
this.setAddressRegionNamesFromRow(target, row);
|
this.setAddressRegionNamesFromRow(target, row);
|
||||||
this.addressDialogVisible = false;
|
this.addressDialogVisible = false;
|
||||||
this.loadRegionOptions().then(() => this.syncAddressRegionPath(this.addressTarget));
|
await this.loadRegionOptions();
|
||||||
|
// nextTick 确保途经点动态 key 已挂载 cascader 后再回填路径
|
||||||
|
await this.$nextTick();
|
||||||
|
this.syncAddressRegionPath(targetKey);
|
||||||
},
|
},
|
||||||
handleAddressDetailClick(target) {
|
handleAddressDetailClick(target) {
|
||||||
if (this.isBasicRouteReadonly) return;
|
if (this.isBasicRouteReadonly) return;
|
||||||
if (this.addressTransportMode(target) !== 'road') {
|
|
||||||
this.openCommonAddress(target);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.openAddressMap(target);
|
this.openAddressMap(target);
|
||||||
},
|
},
|
||||||
openAddressMap(target) {
|
openAddressMap(target) {
|
||||||
if (this.isBasicRouteReadonly) return;
|
if (this.isBasicRouteReadonly) return;
|
||||||
if (this.addressTransportMode(target) !== 'road') {
|
|
||||||
this.$message.info('非公路运输地址不能使用地图选择');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
const field = this.addressModel(target);
|
const field = this.addressModel(target);
|
||||||
if (!field) return;
|
if (!field) return;
|
||||||
this.mapTarget = target;
|
this.mapTarget = target;
|
||||||
@@ -1690,7 +1757,11 @@ export default {
|
|||||||
'',
|
'',
|
||||||
cargoTypePath,
|
cargoTypePath,
|
||||||
quantity: row.quantity || '',
|
quantity: row.quantity || '',
|
||||||
quantityUnit: row.quantityUnit || this.defaultQuantityUnit(),
|
// 常用货物单位若为空或「个」,新建总单统一默认「吨」
|
||||||
|
quantityUnit:
|
||||||
|
!row.quantityUnit || String(row.quantityUnit).trim() === '个'
|
||||||
|
? this.defaultQuantityUnit()
|
||||||
|
: row.quantityUnit,
|
||||||
packageType: row.packageType || row.package || '',
|
packageType: row.packageType || row.package || '',
|
||||||
brand: row.brand || '',
|
brand: row.brand || '',
|
||||||
specification: row.specification || row.spec || '',
|
specification: row.specification || row.spec || '',
|
||||||
@@ -1775,17 +1846,21 @@ export default {
|
|||||||
return formatUpdateUserName(row);
|
return formatUpdateUserName(row);
|
||||||
},
|
},
|
||||||
selectRoute(route) {
|
selectRoute(route) {
|
||||||
|
// 先写入运输方式(会触发地点清空),再回填线路地址,避免被清空逻辑覆盖。
|
||||||
|
this.form.finalTransportType = '公路运输';
|
||||||
|
if (!this.form.routes.length) this.addRoute();
|
||||||
|
if (this.form.routes[0]) this.form.routes[0].transportType = '公路运输';
|
||||||
this.form.departureName = route.departureName || '';
|
this.form.departureName = route.departureName || '';
|
||||||
this.form.departureAddress = route.departureAddress || '';
|
this.form.departureAddress = route.departureAddress || '';
|
||||||
this.form.departureContact = route.departureContact || '';
|
this.form.departureContact = route.departureContact || '';
|
||||||
this.form.departurePhone = route.departurePhone || '';
|
this.form.departurePhone = route.departurePhone || '';
|
||||||
|
this.form.departureSiteCode = '';
|
||||||
this.form.arrivalName = route.arrivalName || '';
|
this.form.arrivalName = route.arrivalName || '';
|
||||||
this.form.arrivalAddress = route.arrivalAddress || '';
|
this.form.arrivalAddress = route.arrivalAddress || '';
|
||||||
this.form.arrivalContact = route.arrivalContact || '';
|
this.form.arrivalContact = route.arrivalContact || '';
|
||||||
this.form.arrivalPhone = route.arrivalPhone || '';
|
this.form.arrivalPhone = route.arrivalPhone || '';
|
||||||
|
this.form.arrivalSiteCode = '';
|
||||||
this.syncAddressRegionPaths();
|
this.syncAddressRegionPaths();
|
||||||
this.form.finalTransportType = '公路运输';
|
|
||||||
if (!this.form.routes.length) this.addRoute();
|
|
||||||
this.routeDialogVisible = false;
|
this.routeDialogVisible = false;
|
||||||
},
|
},
|
||||||
createRoute(index = this.form.routes.length) {
|
createRoute(index = this.form.routes.length) {
|
||||||
@@ -1793,12 +1868,23 @@ export default {
|
|||||||
},
|
},
|
||||||
addRoute() {
|
addRoute() {
|
||||||
if (this.isBasicRouteReadonly) return;
|
if (this.isBasicRouteReadonly) return;
|
||||||
this.form.routes.push(this.createRoute());
|
const index = this.form.routes.length;
|
||||||
|
this.form.routes.push(this.createRoute(index));
|
||||||
|
this.addressRegionPaths[`route-${index}`] = [];
|
||||||
},
|
},
|
||||||
removeRoute(index) {
|
removeRoute(index) {
|
||||||
if (this.isBasicRouteReadonly) return;
|
if (this.isBasicRouteReadonly) return;
|
||||||
this.form.routes.splice(index, 1);
|
this.form.routes.splice(index, 1);
|
||||||
this.syncAddressRegionPaths();
|
const nextPaths = { departure: this.addressRegionPaths.departure || [], arrival: this.addressRegionPaths.arrival || [] };
|
||||||
|
this.form.routes.forEach((route, routeIndex) => {
|
||||||
|
nextPaths[`route-${routeIndex}`] = this.addressRegionPaths[`route-${routeIndex >= index ? routeIndex + 1 : routeIndex}`] || [];
|
||||||
|
});
|
||||||
|
this.suppressAddressRegionChange = true;
|
||||||
|
this.addressRegionPaths = nextPaths;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.suppressAddressRegionChange = false;
|
||||||
|
this.syncAddressRegionPaths();
|
||||||
|
});
|
||||||
},
|
},
|
||||||
goodsKey(row = {}) {
|
goodsKey(row = {}) {
|
||||||
return `${row.cargoName || ''}\u0000${row.cargoType || ''}`;
|
return `${row.cargoName || ''}\u0000${row.cargoType || ''}`;
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
:class="{ 'punch-record-photos__grid--edit': editable }"
|
:class="{ 'punch-record-photos__grid--edit': editable }"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
v-for="(item, groupIndex) in group.items"
|
v-for="item in group.items"
|
||||||
:key="`${item.photo.url}-${item.index}`"
|
:key="`${item.photo.url}-${item.index}`"
|
||||||
class="punch-record-photos__item"
|
class="punch-record-photos__item"
|
||||||
@click="handlePreview(item.index)"
|
@click="handlePreview(item.index)"
|
||||||
@@ -23,8 +23,6 @@
|
|||||||
:lazy="lazy"
|
:lazy="lazy"
|
||||||
fit="cover"
|
fit="cover"
|
||||||
/>
|
/>
|
||||||
<!-- 主图 = 该类型的第一张,按上传顺序取;没有独立字段,也不可切换 -->
|
|
||||||
<div v-if="groupIndex === 0" class="punch-record-photos__badge">主图</div>
|
|
||||||
<el-link
|
<el-link
|
||||||
v-if="editable"
|
v-if="editable"
|
||||||
class="punch-record-photos__remove"
|
class="punch-record-photos__remove"
|
||||||
@@ -59,7 +57,7 @@
|
|||||||
import { computed } from 'vue';
|
import { computed } from 'vue';
|
||||||
|
|
||||||
// 打卡照片是每个打卡节点必有的一个照片类型,不由过程配置的凭证类型决定;
|
// 打卡照片是每个打卡节点必有的一个照片类型,不由过程配置的凭证类型决定;
|
||||||
// 它与各凭证类型各自最多 9 张,同一类型下第一张即界面上的「主图」。
|
// 它与各凭证类型各自最多 9 张。
|
||||||
const PUNCH_PHOTO_TYPE = '打卡照片';
|
const PUNCH_PHOTO_TYPE = '打卡照片';
|
||||||
// 照片没带类型时的兜底名称,与后端落库时的兜底口径一致
|
// 照片没带类型时的兜底名称,与后端落库时的兜底口径一致
|
||||||
const PHOTO_TYPE_FALLBACK = '凭证';
|
const PHOTO_TYPE_FALLBACK = '凭证';
|
||||||
@@ -252,18 +250,6 @@ const countText = group =>
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&__badge {
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
padding: 0 6px;
|
|
||||||
border-radius: 4px 0 4px 0;
|
|
||||||
background: rgba(64, 158, 255, 0.9);
|
|
||||||
font-size: 12px;
|
|
||||||
line-height: 18px;
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
&__remove {
|
&__remove {
|
||||||
align-self: center;
|
align-self: center;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
|
|||||||
@@ -388,7 +388,7 @@
|
|||||||
:disabled="dialogReadonly"
|
:disabled="dialogReadonly"
|
||||||
@visible-change="visible => visible && loadFeeUnitOptions()"
|
@visible-change="visible => visible && loadFeeUnitOptions()"
|
||||||
><el-option
|
><el-option
|
||||||
v-for="unit in feeUnitOptions"
|
v-for="unit in feeUnitSelectOptions"
|
||||||
:key="unit.value"
|
:key="unit.value"
|
||||||
:label="unit.label"
|
:label="unit.label"
|
||||||
:value="unit.value" /></el-select
|
:value="unit.value" /></el-select
|
||||||
@@ -1124,6 +1124,10 @@ import { getDictionary as getSystemDictionary } from '@/api/system/dict';
|
|||||||
import { getDictionary } from '@/api/system/dictbiz';
|
import { getDictionary } from '@/api/system/dictbiz';
|
||||||
import { packageOptions } from '@/option/business/common';
|
import { packageOptions } from '@/option/business/common';
|
||||||
import { formatContractOptionLabel } from '@/utils/contract';
|
import { formatContractOptionLabel } from '@/utils/contract';
|
||||||
|
import {
|
||||||
|
mapFeeUnitOptions,
|
||||||
|
resolvePriceUnitByQuantityUnit,
|
||||||
|
} from '@/utils/currency';
|
||||||
import { loadMeasurementUnitOptions } from '@/utils/measurement-unit';
|
import { loadMeasurementUnitOptions } from '@/utils/measurement-unit';
|
||||||
import { normalizeMapSearchResults, searchAmapPlaceText } from '@/utils/map-search';
|
import { normalizeMapSearchResults, searchAmapPlaceText } from '@/utils/map-search';
|
||||||
import { downloadFileByUrl, downloadXls } from '@/utils/util';
|
import { downloadFileByUrl, downloadXls } from '@/utils/util';
|
||||||
@@ -1264,6 +1268,10 @@ const PageAvueForm = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const shippingTemplateListRoute = '/business/shipping-template';
|
||||||
|
const shippingTemplateFormRoute = '/business/shipping-template/form';
|
||||||
|
const shippingTemplateListRefreshKey = 'shipping-template-list-refresh';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ShippingTemplatePage',
|
name: 'ShippingTemplatePage',
|
||||||
components: { PageAvueForm, ElImageViewer, OpenFileViewer },
|
components: { PageAvueForm, ElImageViewer, OpenFileViewer },
|
||||||
@@ -1280,6 +1288,9 @@ export default {
|
|||||||
return {
|
return {
|
||||||
Location,
|
Location,
|
||||||
OfficeBuilding,
|
OfficeBuilding,
|
||||||
|
// 实例所属路由快照,避免 keep-alive 列表实例被全局 $route 误判成表单页。
|
||||||
|
routePathLocked: this.$route.path,
|
||||||
|
isFormPageInstance: this.$route.path === shippingTemplateFormRoute,
|
||||||
form: {},
|
form: {},
|
||||||
query: {},
|
query: {},
|
||||||
loading: true,
|
loading: true,
|
||||||
@@ -1401,13 +1412,18 @@ export default {
|
|||||||
isStandaloneBusinessPage() {
|
isStandaloneBusinessPage() {
|
||||||
return (
|
return (
|
||||||
this.standaloneFormPage &&
|
this.standaloneFormPage &&
|
||||||
['/business/shipping-template', '/business/shipping-template/form'].includes(
|
(this.isFormPageInstance ||
|
||||||
this.$route.path
|
[shippingTemplateListRoute, shippingTemplateFormRoute].includes(this.routePathLocked) ||
|
||||||
)
|
[shippingTemplateListRoute, shippingTemplateFormRoute].includes(this.$route.path))
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
isStandaloneFormPage() {
|
isStandaloneFormPage() {
|
||||||
return this.isStandaloneBusinessPage && ['add', 'edit'].includes(this.$route.query.mode);
|
// 用实例锁定标志,避免列表 keep-alive 实例被全局路由误判成表单页。
|
||||||
|
return (
|
||||||
|
this.standaloneFormPage &&
|
||||||
|
this.isFormPageInstance &&
|
||||||
|
['add', 'edit'].includes(this.$route.query.mode)
|
||||||
|
);
|
||||||
},
|
},
|
||||||
formPageTitle() {
|
formPageTitle() {
|
||||||
return this.isStandaloneFormPage
|
return this.isStandaloneFormPage
|
||||||
@@ -1464,6 +1480,12 @@ export default {
|
|||||||
);
|
);
|
||||||
return this.currencyUnit(option?.label || this.shippingTemplateFreight.currency);
|
return this.currencyUnit(option?.label || this.shippingTemplateFreight.currency);
|
||||||
},
|
},
|
||||||
|
feeUnitSelectOptions() {
|
||||||
|
return mapFeeUnitOptions(
|
||||||
|
this.feeUnitOptions,
|
||||||
|
this.shippingTemplateFreight.currency || 'RMB'
|
||||||
|
);
|
||||||
|
},
|
||||||
roadFreightTotal() {
|
roadFreightTotal() {
|
||||||
const total = this.shippingTemplateFreight.freightItems.reduce(
|
const total = this.shippingTemplateFreight.freightItems.reduce(
|
||||||
(sum, item) => sum + Number(this.freightAmount(item) || 0),
|
(sum, item) => sum + Number(this.freightAmount(item) || 0),
|
||||||
@@ -1530,6 +1552,18 @@ export default {
|
|||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
$route(to, from) {
|
$route(to, from) {
|
||||||
|
// 列表实例:从其他页进入列表时刷新(activated 负责标签切回)。
|
||||||
|
if (!this.isFormPageInstance) {
|
||||||
|
const enteringList =
|
||||||
|
(to.path === this.routePathLocked || to.path === shippingTemplateListRoute) &&
|
||||||
|
from?.path &&
|
||||||
|
from.path !== to.path;
|
||||||
|
if (enteringList) {
|
||||||
|
sessionStorage.removeItem(shippingTemplateListRefreshKey);
|
||||||
|
this.$nextTick(() => this.onLoad(this.page, this.query));
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (
|
if (
|
||||||
this.isStandaloneFormPage &&
|
this.isStandaloneFormPage &&
|
||||||
(to.query.mode !== from?.query?.mode ||
|
(to.query.mode !== from?.query?.mode ||
|
||||||
@@ -1550,6 +1584,10 @@ export default {
|
|||||||
this.handleTransportTypeChange(value);
|
this.handleTransportTypeChange(value);
|
||||||
this.syncFreightItems();
|
this.syncFreightItems();
|
||||||
},
|
},
|
||||||
|
'form.templateType'() {
|
||||||
|
// 切换到运单模板时立即按货物数量单位生成公路运费明细。
|
||||||
|
this.$nextTick(() => this.syncFreightItems());
|
||||||
|
},
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.loadProjectOptions();
|
this.loadProjectOptions();
|
||||||
@@ -1559,8 +1597,16 @@ export default {
|
|||||||
this.loadCurrencyOptions();
|
this.loadCurrencyOptions();
|
||||||
if (this.isStandaloneFormPage) this.$nextTick(() => this.initStandaloneFormPage());
|
if (this.isStandaloneFormPage) this.$nextTick(() => this.initStandaloneFormPage());
|
||||||
},
|
},
|
||||||
|
activated() {
|
||||||
|
if (this.isFormPageInstance) return;
|
||||||
|
sessionStorage.removeItem(shippingTemplateListRefreshKey);
|
||||||
|
this.$nextTick(() => this.onLoad(this.page, this.query));
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
formatContractOptionLabel,
|
formatContractOptionLabel,
|
||||||
|
markShippingTemplateListNeedRefresh() {
|
||||||
|
sessionStorage.setItem(shippingTemplateListRefreshKey, '1');
|
||||||
|
},
|
||||||
loadQuantityUnitOptions() {
|
loadQuantityUnitOptions() {
|
||||||
if (this.quantityUnitLoading) return this.quantityUnitLoadPromise;
|
if (this.quantityUnitLoading) return this.quantityUnitLoadPromise;
|
||||||
this.quantityUnitLoading = true;
|
this.quantityUnitLoading = true;
|
||||||
@@ -1591,12 +1637,8 @@ export default {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (this.menuWidth != null) next.menuWidth = this.menuWidth;
|
if (this.menuWidth != null) next.menuWidth = this.menuWidth;
|
||||||
if (
|
// 仅表单页实例套用全屏表单弹窗样式,避免列表页误用后表格区域异常。
|
||||||
this.standaloneFormPage &&
|
if (this.standaloneFormPage && this.$route.path === shippingTemplateFormRoute) {
|
||||||
['/business/shipping-template', '/business/shipping-template/form'].includes(
|
|
||||||
this.$route.path
|
|
||||||
)
|
|
||||||
) {
|
|
||||||
next.dialogAppendToBody = false;
|
next.dialogAppendToBody = false;
|
||||||
next.dialogModal = false;
|
next.dialogModal = false;
|
||||||
next.dialogCustomClass = 'shipping-template-form-page-dialog';
|
next.dialogCustomClass = 'shipping-template-form-page-dialog';
|
||||||
@@ -1776,13 +1818,22 @@ export default {
|
|||||||
this.onLoad(this.page, this.query);
|
this.onLoad(this.page, this.query);
|
||||||
},
|
},
|
||||||
onLoad(page, params = {}) {
|
onLoad(page, params = {}) {
|
||||||
|
if (this.isFormPageInstance) return;
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
|
const currentPage = page?.currentPage || this.page.currentPage || 1;
|
||||||
|
const pageSize = page?.pageSize || this.page.pageSize || 10;
|
||||||
this.api
|
this.api
|
||||||
.getList(page.currentPage, page.pageSize, { ...this.query, ...params })
|
.getList(currentPage, pageSize, { ...this.query, ...params })
|
||||||
.then(res => {
|
.then(res => {
|
||||||
const data = res?.data?.data || {};
|
const data = res?.data?.data || res?.data || {};
|
||||||
this.data = extractRecords(res);
|
const records = extractRecords(res);
|
||||||
this.page.total = data.total || this.data.length;
|
this.data = records;
|
||||||
|
this.page.total = Number(data.total ?? records.length) || 0;
|
||||||
|
})
|
||||||
|
.catch(error => {
|
||||||
|
window.console.error(error);
|
||||||
|
this.data = [];
|
||||||
|
this.page.total = 0;
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
@@ -1821,9 +1872,10 @@ export default {
|
|||||||
.submit(submit)
|
.submit(submit)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.$message.success('操作成功');
|
this.$message.success('操作成功');
|
||||||
|
this.markShippingTemplateListNeedRefresh();
|
||||||
done?.();
|
done?.();
|
||||||
this.closeCrudDialog();
|
this.closeCrudDialog();
|
||||||
this.onLoad(this.page, this.query);
|
if (!this.isFormPageInstance) this.onLoad(this.page, this.query);
|
||||||
})
|
})
|
||||||
.catch(() => loading?.());
|
.catch(() => loading?.());
|
||||||
},
|
},
|
||||||
@@ -1837,9 +1889,10 @@ export default {
|
|||||||
.submit(submit)
|
.submit(submit)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.$message.success('操作成功');
|
this.$message.success('操作成功');
|
||||||
|
this.markShippingTemplateListNeedRefresh();
|
||||||
done?.();
|
done?.();
|
||||||
this.closeCrudDialog();
|
this.closeCrudDialog();
|
||||||
this.onLoad(this.page, this.query);
|
if (!this.isFormPageInstance) this.onLoad(this.page, this.query);
|
||||||
})
|
})
|
||||||
.catch(() => loading?.());
|
.catch(() => loading?.());
|
||||||
},
|
},
|
||||||
@@ -1883,6 +1936,8 @@ export default {
|
|||||||
this.attachmentRows = [];
|
this.attachmentRows = [];
|
||||||
this.shippingTemplateFreight = defaultFreight();
|
this.shippingTemplateFreight = defaultFreight();
|
||||||
this.loadCurrencyOptions();
|
this.loadCurrencyOptions();
|
||||||
|
this.loadFeeUnitOptions();
|
||||||
|
this.$nextTick(() => this.syncFreightItems());
|
||||||
if (typeof this.api.nextCode === 'function')
|
if (typeof this.api.nextCode === 'function')
|
||||||
this.api
|
this.api
|
||||||
.nextCode()
|
.nextCode()
|
||||||
@@ -2005,20 +2060,47 @@ export default {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (this.transportMode === 'road') {
|
if (this.transportMode === 'road') {
|
||||||
const invalid = this.shippingTemplateFreight.freightItems.findIndex(
|
if (!this.shippingTemplateFreight.freightItems.length) {
|
||||||
item =>
|
this.$message.warning('请先完善货物数量单位,以便生成运费明细');
|
||||||
Number(item.unitPrice || 0) < 0 ||
|
|
||||||
!item.priceUnit ||
|
|
||||||
(!this.isFreightAutoCalculable(item) &&
|
|
||||||
(item.freightAmount === '' ||
|
|
||||||
item.freightAmount === null ||
|
|
||||||
item.freightAmount === undefined)) ||
|
|
||||||
Number(item.freightAmount || 0) < 0
|
|
||||||
);
|
|
||||||
if (invalid > -1) {
|
|
||||||
this.$message.warning(`第${invalid + 1}条货物的单价、计价单位或运费无效`);
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
for (const [index, item] of this.shippingTemplateFreight.freightItems.entries()) {
|
||||||
|
const label = `第${index + 1}条运费明细`;
|
||||||
|
if (
|
||||||
|
item.unitPrice === '' ||
|
||||||
|
item.unitPrice === null ||
|
||||||
|
item.unitPrice === undefined
|
||||||
|
) {
|
||||||
|
this.$message.warning(`请填写${label}的单价`);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (Number(item.unitPrice) < 0) {
|
||||||
|
this.$message.warning(`${label}的单价不能小于0`);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!String(item.priceUnit || '').trim()) {
|
||||||
|
this.$message.warning(`请选择${label}的计价单位`);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (this.isFreightAutoCalculable(item)) {
|
||||||
|
if (!item.freightAmountManual) {
|
||||||
|
item.freightAmount = this.freightAmount(item);
|
||||||
|
}
|
||||||
|
} else if (
|
||||||
|
item.freightAmount === '' ||
|
||||||
|
item.freightAmount === null ||
|
||||||
|
item.freightAmount === undefined
|
||||||
|
) {
|
||||||
|
this.$message.warning(
|
||||||
|
`${label}的计价单位与货物数量单位不匹配,无法自动计算运费,请手动填写运费`
|
||||||
|
);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (Number(item.freightAmount || 0) < 0) {
|
||||||
|
this.$message.warning(`${label}的运费不能小于0`);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
} else if (Number(this.shippingTemplateFreight.freightAmount || 0) < 0) {
|
} else if (Number(this.shippingTemplateFreight.freightAmount || 0) < 0) {
|
||||||
this.$message.warning('运费不能小于0');
|
this.$message.warning('运费不能小于0');
|
||||||
return false;
|
return false;
|
||||||
@@ -2033,8 +2115,11 @@ export default {
|
|||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
closeCrudDialog() {
|
closeCrudDialog() {
|
||||||
if (this.isStandaloneBusinessPage) {
|
if (this.isStandaloneBusinessPage || this.isFormPageInstance) {
|
||||||
this.$router.push({ path: '/business/shipping-template', query: {} });
|
// 关闭独立表单页时标记列表需刷新(含直接点关闭未保存的场景)
|
||||||
|
this.markShippingTemplateListNeedRefresh();
|
||||||
|
this.$router.$avueRouter?.closeTag?.();
|
||||||
|
this.$router.push({ path: shippingTemplateListRoute, query: {} });
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.$refs.crud?.closeDialog?.();
|
this.$refs.crud?.closeDialog?.();
|
||||||
@@ -2294,7 +2379,16 @@ export default {
|
|||||||
},
|
},
|
||||||
loadFeeUnitOptions() {
|
loadFeeUnitOptions() {
|
||||||
getDictionary({ code: 'unit_fee' }).then(res => {
|
getDictionary({ code: 'unit_fee' }).then(res => {
|
||||||
this.feeUnitOptions = this.normalizeDictOptions(res?.data?.data || []);
|
// 计价单位必须保存可读文案(如 元/吨),才能与货物数量单位匹配并自动计算运费。
|
||||||
|
this.feeUnitOptions = (res?.data?.data || []).map(item => {
|
||||||
|
const label = String(item.dictValue || item.label || item.value || '').trim();
|
||||||
|
const key = String(item.dictKey || item.value || '').trim();
|
||||||
|
return {
|
||||||
|
label: label || key,
|
||||||
|
value: label.includes('/') ? label : key || label,
|
||||||
|
remark: item.remark || '',
|
||||||
|
};
|
||||||
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
loadCurrencyOptions() {
|
loadCurrencyOptions() {
|
||||||
@@ -3098,24 +3192,53 @@ export default {
|
|||||||
: [];
|
: [];
|
||||||
const quantityUnits = [];
|
const quantityUnits = [];
|
||||||
this.transportCargoRows.forEach(row => {
|
this.transportCargoRows.forEach(row => {
|
||||||
const quantityUnit = row.quantityUnit || '';
|
const quantityUnit = String(row.quantityUnit || '').trim();
|
||||||
|
if (!quantityUnit) return;
|
||||||
if (!quantityUnits.some(unit => unit === quantityUnit)) quantityUnits.push(quantityUnit);
|
if (!quantityUnits.some(unit => unit === quantityUnit)) quantityUnits.push(quantityUnit);
|
||||||
});
|
});
|
||||||
|
const currency = this.shippingTemplateFreight.currency || 'RMB';
|
||||||
this.shippingTemplateFreight.freightItems = quantityUnits.map((quantityUnit, index) => {
|
this.shippingTemplateFreight.freightItems = quantityUnits.map((quantityUnit, index) => {
|
||||||
const matched =
|
const matched =
|
||||||
previousItems.find(item => String(item.quantityUnit || '') === String(quantityUnit)) ||
|
previousItems.find(item => String(item.quantityUnit || '') === String(quantityUnit)) ||
|
||||||
previousItems[index] ||
|
previousItems[index] ||
|
||||||
{};
|
{};
|
||||||
|
const defaultPriceUnit = resolvePriceUnitByQuantityUnit(quantityUnit, currency);
|
||||||
|
const priceUnit = this.normalizeFreightPriceUnit(
|
||||||
|
matched.priceUnit || defaultPriceUnit || '',
|
||||||
|
quantityUnit,
|
||||||
|
currency
|
||||||
|
);
|
||||||
return {
|
return {
|
||||||
quantityUnit,
|
quantityUnit,
|
||||||
unitPrice: matched.unitPrice || '',
|
unitPrice: matched.unitPrice || '',
|
||||||
priceUnit: matched.priceUnit || '',
|
priceUnit,
|
||||||
freightAmount: matched.freightAmount ?? '',
|
freightAmount: matched.freightAmount ?? '',
|
||||||
freightAmountManual:
|
freightAmountManual:
|
||||||
matched.freightAmountManual === true || matched.manualFreightAmount === true,
|
matched.freightAmountManual === true || matched.manualFreightAmount === true,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
normalizeFreightPriceUnit(priceUnit, quantityUnit, currency = 'RMB') {
|
||||||
|
const text = this.resolvePriceUnitText(priceUnit);
|
||||||
|
if (text && this.priceUnitMatchesQuantity(text, quantityUnit)) return text;
|
||||||
|
return (
|
||||||
|
resolvePriceUnitByQuantityUnit(quantityUnit, currency) ||
|
||||||
|
text ||
|
||||||
|
String(priceUnit || '').trim()
|
||||||
|
);
|
||||||
|
},
|
||||||
|
resolvePriceUnitText(priceUnit) {
|
||||||
|
const raw = String(priceUnit || '').trim();
|
||||||
|
if (!raw) return '';
|
||||||
|
if (raw.includes('/')) return raw;
|
||||||
|
const options = this.feeUnitSelectOptions.length
|
||||||
|
? this.feeUnitSelectOptions
|
||||||
|
: this.feeUnitOptions;
|
||||||
|
const matched = options.find(
|
||||||
|
item => String(item.value) === raw || String(item.label) === raw
|
||||||
|
);
|
||||||
|
return matched?.label || raw;
|
||||||
|
},
|
||||||
quantityUnits() {
|
quantityUnits() {
|
||||||
return [
|
return [
|
||||||
...new Set(
|
...new Set(
|
||||||
@@ -3131,7 +3254,7 @@ export default {
|
|||||||
.replace(/\s+/g, '')
|
.replace(/\s+/g, '')
|
||||||
.replace(/立方米|立方公尺|方/g, '立方');
|
.replace(/立方米|立方公尺|方/g, '立方');
|
||||||
const unit = normalizeUnit(quantityUnit).replace(/[·*.]/g, '');
|
const unit = normalizeUnit(quantityUnit).replace(/[·*.]/g, '');
|
||||||
const value = String(priceUnit || '')
|
const value = String(this.resolvePriceUnitText(priceUnit) || '')
|
||||||
.trim()
|
.trim()
|
||||||
.toLowerCase()
|
.toLowerCase()
|
||||||
.replace(/\s+/g, '');
|
.replace(/\s+/g, '');
|
||||||
@@ -3163,6 +3286,10 @@ export default {
|
|||||||
return this.formatFreightNumber(item.freightAmount);
|
return this.formatFreightNumber(item.freightAmount);
|
||||||
}
|
}
|
||||||
if (!this.isFreightAutoCalculable(item)) {
|
if (!this.isFreightAutoCalculable(item)) {
|
||||||
|
// 无法自动计算且未手工填写时返回空,避免把空值显示成 0 造成“已填写”的错觉。
|
||||||
|
if (item.freightAmount === '' || item.freightAmount === null || item.freightAmount === undefined) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
return this.formatFreightNumber(item.freightAmount);
|
return this.formatFreightNumber(item.freightAmount);
|
||||||
}
|
}
|
||||||
return this.formatFreightNumber(
|
return this.formatFreightNumber(
|
||||||
|
|||||||
@@ -1677,7 +1677,7 @@
|
|||||||
{{
|
{{
|
||||||
isDispatchPlanQuantityUnlimited(row)
|
isDispatchPlanQuantityUnlimited(row)
|
||||||
? '-'
|
? '-'
|
||||||
: formatDispatchQuantity(dispatchItemRemainingQuantity(row))
|
: formatDispatchQuantity(dispatchItemDisplayRemainingQuantity(row))
|
||||||
}}
|
}}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -1861,7 +1861,7 @@
|
|||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="司机" :required="dispatchItemForm.carrierType !== '承运商'">
|
<el-form-item label="司机" required>
|
||||||
<el-autocomplete
|
<el-autocomplete
|
||||||
v-model="dispatchItemForm.driverName"
|
v-model="dispatchItemForm.driverName"
|
||||||
placeholder="请输入"
|
placeholder="请输入"
|
||||||
@@ -1870,11 +1870,15 @@
|
|||||||
:fetch-suggestions="fetchTaskDriverSuggestions"
|
:fetch-suggestions="fetchTaskDriverSuggestions"
|
||||||
:loading="taskDriverLoading"
|
:loading="taskDriverLoading"
|
||||||
@select="item => handleTaskDriverSelect('dispatch', item)"
|
@select="item => handleTaskDriverSelect('dispatch', item)"
|
||||||
/>
|
>
|
||||||
|
<template #default="{ item }">
|
||||||
|
<span>{{ driverOptionText(item) }}</span>
|
||||||
|
</template>
|
||||||
|
</el-autocomplete>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
:label="dispatchItemForm.carrierType === '承运商' ? '手机号' : '司机手机号'"
|
:label="dispatchItemForm.carrierType === '承运商' ? '手机号' : '司机手机号'"
|
||||||
:required="dispatchItemForm.carrierType !== '承运商'"
|
required
|
||||||
>
|
>
|
||||||
<el-input v-model="dispatchItemForm.driverPhone" placeholder="请输入" />
|
<el-input v-model="dispatchItemForm.driverPhone" placeholder="请输入" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -1893,7 +1897,11 @@
|
|||||||
:fetch-suggestions="fetchTaskEscortSuggestions"
|
:fetch-suggestions="fetchTaskEscortSuggestions"
|
||||||
:loading="taskEscortLoading"
|
:loading="taskEscortLoading"
|
||||||
@select="handleTaskEscortSelect"
|
@select="handleTaskEscortSelect"
|
||||||
/>
|
>
|
||||||
|
<template #default="{ item }">
|
||||||
|
<span>{{ driverOptionText(item) }}</span>
|
||||||
|
</template>
|
||||||
|
</el-autocomplete>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-if="dispatchItemForm.carrierType !== '承运商'" label="押运人手机号">
|
<el-form-item v-if="dispatchItemForm.carrierType !== '承运商'" label="押运人手机号">
|
||||||
<el-input v-model="dispatchItemForm.escortPhone" placeholder="请输入" />
|
<el-input v-model="dispatchItemForm.escortPhone" placeholder="请输入" />
|
||||||
@@ -1955,7 +1963,7 @@
|
|||||||
class="transport-plan-page__dispatch-quantity-hint"
|
class="transport-plan-page__dispatch-quantity-hint"
|
||||||
>
|
>
|
||||||
剩余数量:{{
|
剩余数量:{{
|
||||||
formatDispatchQuantity(dispatchItemHintRemainingQuantity(dispatchItemForm))
|
formatDispatchQuantity(dispatchItemDisplayRemainingQuantity(dispatchItemForm))
|
||||||
}}
|
}}
|
||||||
{{ dispatchItemForm.quantityUnit || '吨' }}
|
{{ dispatchItemForm.quantityUnit || '吨' }}
|
||||||
</div>
|
</div>
|
||||||
@@ -2096,11 +2104,7 @@
|
|||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
<el-form-item v-if="dispatchIsRoadTransport" label="司机" required>
|
||||||
v-if="dispatchIsRoadTransport"
|
|
||||||
label="司机"
|
|
||||||
:required="dispatchItemForm.carrierType === '自运'"
|
|
||||||
>
|
|
||||||
<el-autocomplete
|
<el-autocomplete
|
||||||
v-model="dispatchItemForm.driverName"
|
v-model="dispatchItemForm.driverName"
|
||||||
placeholder="请输入"
|
placeholder="请输入"
|
||||||
@@ -2111,11 +2115,7 @@
|
|||||||
@select="item => handleTaskDriverSelect('dispatch', item)"
|
@select="item => handleTaskDriverSelect('dispatch', item)"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
<el-form-item v-if="dispatchIsRoadTransport" label="手机号" required>
|
||||||
v-if="dispatchIsRoadTransport"
|
|
||||||
label="手机号"
|
|
||||||
:required="dispatchItemForm.carrierType === '自运'"
|
|
||||||
>
|
|
||||||
<el-input v-model="dispatchItemForm.driverPhone" placeholder="请输入" />
|
<el-input v-model="dispatchItemForm.driverPhone" placeholder="请输入" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
@@ -2768,7 +2768,7 @@ import {
|
|||||||
getList as getProjectList,
|
getList as getProjectList,
|
||||||
} from '@/api/business/project-apply';
|
} from '@/api/business/project-apply';
|
||||||
import { getList as getCommonRouteList } from '@/api/business/common-route';
|
import { getList as getCommonRouteList } from '@/api/business/common-route';
|
||||||
import { fetchDriversByCarrierOrganizations } from '@/utils/carrier-org-resource';
|
import { fetchDriverCandidates, driverOptionText } from '@/utils/carrier-org-resource';
|
||||||
import { getDictionary } from '@/api/system/dictbiz';
|
import { getDictionary } from '@/api/system/dictbiz';
|
||||||
import { getDictionary as getSystemDictionary } from '@/api/system/dict';
|
import { getDictionary as getSystemDictionary } from '@/api/system/dict';
|
||||||
import { addressTypeOptions } from '@/option/base/common-address';
|
import { addressTypeOptions } from '@/option/base/common-address';
|
||||||
@@ -2807,8 +2807,11 @@ import 'nprogress/nprogress.css';
|
|||||||
const AMAP_KEY = '653b7cf105ad7fb8ec9b2f5198ade315';
|
const AMAP_KEY = '653b7cf105ad7fb8ec9b2f5198ade315';
|
||||||
const AMAP_SECURITY_CODE = '5aab65c632e48ebae0d0e28f5b28e21a';
|
const AMAP_SECURITY_CODE = '5aab65c632e48ebae0d0e28f5b28e21a';
|
||||||
let amapLoader;
|
let amapLoader;
|
||||||
|
const transportPlanListRoute = '/business/transport-plan';
|
||||||
|
const transportPlanFormRoute = '/business/transport-plan/form';
|
||||||
|
const transportPlanListRefreshKey = 'transport-plan-list-refresh';
|
||||||
const standaloneTransportPlanFormRoutes = {
|
const standaloneTransportPlanFormRoutes = {
|
||||||
'/business/transport-plan': '/business/transport-plan/form',
|
[transportPlanListRoute]: transportPlanFormRoute,
|
||||||
};
|
};
|
||||||
const standaloneTransportPlanFormPaths = [
|
const standaloneTransportPlanFormPaths = [
|
||||||
...Object.keys(standaloneTransportPlanFormRoutes),
|
...Object.keys(standaloneTransportPlanFormRoutes),
|
||||||
@@ -3072,6 +3075,10 @@ export default {
|
|||||||
// 必须放 data:Options API 的顺序是 data → computed → watch(immediate) → created,
|
// 必须放 data:Options API 的顺序是 data → computed → watch(immediate) → created,
|
||||||
// 放 created 的话首个 immediate watcher 会读到空值,把首次加载也挡掉。
|
// 放 created 的话首个 immediate watcher 会读到空值,把首次加载也挡掉。
|
||||||
routePathLocked: this.$route.path,
|
routePathLocked: this.$route.path,
|
||||||
|
// 表单页实例在创建时锁定,避免 keep-alive 列表实例随全局 $route 误切到表单态。
|
||||||
|
isFormPageInstance: Object.values(standaloneTransportPlanFormRoutes).includes(
|
||||||
|
this.$route.path
|
||||||
|
),
|
||||||
form: {},
|
form: {},
|
||||||
suppressTransportTypeClear: false,
|
suppressTransportTypeClear: false,
|
||||||
query: {},
|
query: {},
|
||||||
@@ -3112,10 +3119,11 @@ export default {
|
|||||||
option: (() => {
|
option: (() => {
|
||||||
const opt = this.cloneOption(this.crudOption, estimateMenuButtonCount(this.config));
|
const opt = this.cloneOption(this.crudOption, estimateMenuButtonCount(this.config));
|
||||||
if (this.menuWidth != null) opt.menuWidth = this.menuWidth;
|
if (this.menuWidth != null) opt.menuWidth = this.menuWidth;
|
||||||
if (
|
// 仅表单页实例套用全屏表单弹窗样式,避免列表页误用后表格区域异常。
|
||||||
this.standaloneFormPage &&
|
const isFormInstance = Object.values(standaloneTransportPlanFormRoutes).includes(
|
||||||
standaloneTransportPlanFormPaths.includes(this.$route.path)
|
this.$route.path
|
||||||
) {
|
);
|
||||||
|
if (this.standaloneFormPage && isFormInstance) {
|
||||||
opt.dialogAppendToBody = false;
|
opt.dialogAppendToBody = false;
|
||||||
opt.dialogModal = false;
|
opt.dialogModal = false;
|
||||||
opt.dialogCustomClass = 'transport-plan-form-page-dialog';
|
opt.dialogCustomClass = 'transport-plan-form-page-dialog';
|
||||||
@@ -3150,6 +3158,8 @@ export default {
|
|||||||
dispatchItemIndex: -1,
|
dispatchItemIndex: -1,
|
||||||
dispatchItemForm: defaultDispatchRow(),
|
dispatchItemForm: defaultDispatchRow(),
|
||||||
dispatchItemCargoRows: [],
|
dispatchItemCargoRows: [],
|
||||||
|
// 本次数量变更版本号:驱动同表其他行「剩余数量」同步重算
|
||||||
|
dispatchCargoQuantityVersion: 0,
|
||||||
dispatchItemAttachmentRows: [],
|
dispatchItemAttachmentRows: [],
|
||||||
selectedDispatchItemAttachmentRows: [],
|
selectedDispatchItemAttachmentRows: [],
|
||||||
attachmentRows: [],
|
attachmentRows: [],
|
||||||
@@ -3289,6 +3299,12 @@ export default {
|
|||||||
}
|
}
|
||||||
this.loadTaskQuantityUnitOptions();
|
this.loadTaskQuantityUnitOptions();
|
||||||
},
|
},
|
||||||
|
// keep-alive 重新激活列表时强制刷新,避免缓存脏数据;标记位用于兼容旧跳转逻辑。
|
||||||
|
activated() {
|
||||||
|
if (this.isFormPageInstance) return;
|
||||||
|
sessionStorage.removeItem(transportPlanListRefreshKey);
|
||||||
|
this.$nextTick(() => this.onLoad(this.page, this.query));
|
||||||
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters(['permission', 'userInfo']),
|
...mapGetters(['permission', 'userInfo']),
|
||||||
permissionList() {
|
permissionList() {
|
||||||
@@ -3300,10 +3316,20 @@ export default {
|
|||||||
return this.config.detailSections || [];
|
return this.config.detailSections || [];
|
||||||
},
|
},
|
||||||
isStandaloneBusinessPage() {
|
isStandaloneBusinessPage() {
|
||||||
return this.standaloneFormPage && standaloneTransportPlanFormPaths.includes(this.$route.path);
|
return (
|
||||||
|
this.standaloneFormPage &&
|
||||||
|
(this.isFormPageInstance ||
|
||||||
|
standaloneTransportPlanFormPaths.includes(this.routePathLocked) ||
|
||||||
|
standaloneTransportPlanFormPaths.includes(this.$route.path))
|
||||||
|
);
|
||||||
},
|
},
|
||||||
isStandaloneFormPage() {
|
isStandaloneFormPage() {
|
||||||
return this.isStandaloneBusinessPage && ['add', 'edit'].includes(this.$route.query.mode);
|
// 用实例锁定标志,避免列表 keep-alive 实例被全局路由误判成表单页。
|
||||||
|
return (
|
||||||
|
this.standaloneFormPage &&
|
||||||
|
this.isFormPageInstance &&
|
||||||
|
['add', 'edit'].includes(this.$route.query.mode)
|
||||||
|
);
|
||||||
},
|
},
|
||||||
formPageTitle() {
|
formPageTitle() {
|
||||||
if (this.isStandaloneFormPage) {
|
if (this.isStandaloneFormPage) {
|
||||||
@@ -3752,6 +3778,18 @@ export default {
|
|||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
$route(to, from) {
|
$route(to, from) {
|
||||||
|
// 列表实例:从其他页进入列表时刷新(activated 负责标签切回)。
|
||||||
|
if (!this.isFormPageInstance) {
|
||||||
|
const enteringList =
|
||||||
|
(to.path === this.routePathLocked || to.path === transportPlanListRoute) &&
|
||||||
|
from?.path &&
|
||||||
|
from.path !== to.path;
|
||||||
|
if (enteringList) {
|
||||||
|
sessionStorage.removeItem(transportPlanListRefreshKey);
|
||||||
|
this.$nextTick(() => this.onLoad(this.page, this.query));
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (!this.isStandaloneFormPage) return;
|
if (!this.isStandaloneFormPage) return;
|
||||||
if (
|
if (
|
||||||
to.query.mode !== from?.query?.mode ||
|
to.query.mode !== from?.query?.mode ||
|
||||||
@@ -3779,6 +3817,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
formatContractOptionLabel,
|
formatContractOptionLabel,
|
||||||
|
driverOptionText,
|
||||||
initStandaloneFormPage() {
|
initStandaloneFormPage() {
|
||||||
if (!this.isStandaloneFormPage) return;
|
if (!this.isStandaloneFormPage) return;
|
||||||
const mode = this.$route.query.mode === 'edit' ? 'edit' : 'add';
|
const mode = this.$route.query.mode === 'edit' ? 'edit' : 'add';
|
||||||
@@ -3910,9 +3949,9 @@ export default {
|
|||||||
return Object.values(groups)
|
return Object.values(groups)
|
||||||
.map(group => {
|
.map(group => {
|
||||||
const quantity = this.formatDispatchQuantity(group.quantity);
|
const quantity = this.formatDispatchQuantity(group.quantity);
|
||||||
return `${group.typeName}等${group.count}种货物 | ${quantity}${
|
const typeName =
|
||||||
group.unit ? ` ${group.unit}` : ''
|
group.count > 1 ? `${group.typeName}等${group.count}种货物` : group.typeName;
|
||||||
}`;
|
return `${typeName} | ${quantity}${group.unit ? ` ${group.unit}` : ''}`;
|
||||||
})
|
})
|
||||||
.join('; ');
|
.join('; ');
|
||||||
},
|
},
|
||||||
@@ -4148,6 +4187,7 @@ export default {
|
|||||||
waiting: ['待执行', 'is-pending'],
|
waiting: ['待执行', 'is-pending'],
|
||||||
processing: ['进行中', 'is-processing'],
|
processing: ['进行中', 'is-processing'],
|
||||||
running: ['进行中', 'is-processing'],
|
running: ['进行中', 'is-processing'],
|
||||||
|
pending_return_confirm: ['待回单确认', 'is-pending'],
|
||||||
completed: ['已完成', 'is-completed'],
|
completed: ['已完成', 'is-completed'],
|
||||||
cancelled: ['已取消', 'is-cancelled'],
|
cancelled: ['已取消', 'is-cancelled'],
|
||||||
};
|
};
|
||||||
@@ -4484,6 +4524,9 @@ export default {
|
|||||||
loading();
|
loading();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
markTransportPlanListNeedRefresh() {
|
||||||
|
sessionStorage.setItem(transportPlanListRefreshKey, '1');
|
||||||
|
},
|
||||||
rowSave(row, done, loading) {
|
rowSave(row, done, loading) {
|
||||||
const submitRow = this.normalizeRow(row);
|
const submitRow = this.normalizeRow(row);
|
||||||
if (!submitRow) {
|
if (!submitRow) {
|
||||||
@@ -4492,6 +4535,7 @@ export default {
|
|||||||
}
|
}
|
||||||
this.getSaveRequest()(submitRow).then(
|
this.getSaveRequest()(submitRow).then(
|
||||||
() => {
|
() => {
|
||||||
|
this.markTransportPlanListNeedRefresh();
|
||||||
this.onLoad(this.page);
|
this.onLoad(this.page);
|
||||||
this.$message({ type: 'success', message: '操作成功!' });
|
this.$message({ type: 'success', message: '操作成功!' });
|
||||||
done();
|
done();
|
||||||
@@ -4511,6 +4555,7 @@ export default {
|
|||||||
}
|
}
|
||||||
this.getSaveRequest()(submitRow).then(
|
this.getSaveRequest()(submitRow).then(
|
||||||
() => {
|
() => {
|
||||||
|
this.markTransportPlanListNeedRefresh();
|
||||||
this.onLoad(this.page);
|
this.onLoad(this.page);
|
||||||
this.$message({ type: 'success', message: '操作成功!' });
|
this.$message({ type: 'success', message: '操作成功!' });
|
||||||
done();
|
done();
|
||||||
@@ -4540,7 +4585,7 @@ export default {
|
|||||||
.submit(submitRow)
|
.submit(submitRow)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.$message.success(action === 'draft' ? '暂存成功' : '创建成功');
|
this.$message.success(action === 'draft' ? '暂存成功' : '创建成功');
|
||||||
this.onLoad(this.page, this.query);
|
this.markTransportPlanListNeedRefresh();
|
||||||
this.closeCrudDialog();
|
this.closeCrudDialog();
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
@@ -4548,12 +4593,14 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
closeCrudDialog() {
|
closeCrudDialog() {
|
||||||
if (this.isStandaloneBusinessPage) {
|
if (this.isStandaloneBusinessPage || this.isFormPageInstance) {
|
||||||
|
// 关闭独立表单页时标记列表需刷新(含直接点关闭未保存的场景)
|
||||||
|
this.markTransportPlanListNeedRefresh();
|
||||||
this.$router.$avueRouter?.closeTag?.();
|
this.$router.$avueRouter?.closeTag?.();
|
||||||
const listPath =
|
const listPath =
|
||||||
Object.entries(standaloneTransportPlanFormRoutes).find(
|
Object.entries(standaloneTransportPlanFormRoutes).find(
|
||||||
([, formPath]) => formPath === this.$route.path
|
([, formPath]) => formPath === this.$route.path || formPath === this.routePathLocked
|
||||||
)?.[0] || this.$route.path;
|
)?.[0] || transportPlanListRoute;
|
||||||
this.$router.push({ path: listPath, query: {} });
|
this.$router.push({ path: listPath, query: {} });
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -4951,16 +4998,8 @@ export default {
|
|||||||
},
|
},
|
||||||
fetchTaskDriverSuggestions(queryString, callback) {
|
fetchTaskDriverSuggestions(queryString, callback) {
|
||||||
const keyword = String(queryString || '').trim();
|
const keyword = String(queryString || '').trim();
|
||||||
const carrier = this.getDispatchCarrierFilter();
|
|
||||||
if (!carrier.carrierId && !carrier.carrierName) {
|
|
||||||
callback([]);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.taskDriverLoading = true;
|
this.taskDriverLoading = true;
|
||||||
fetchDriversByCarrierOrganizations(
|
fetchDriverCandidates({ size: 20, ...(keyword ? { driverName: keyword } : {}), posts: '司机' })
|
||||||
{ size: 20, ...(keyword ? { driverName: keyword } : {}), posts: '司机' },
|
|
||||||
carrier
|
|
||||||
)
|
|
||||||
.then(records => {
|
.then(records => {
|
||||||
this.taskDriverOptions = records;
|
this.taskDriverOptions = records;
|
||||||
callback(
|
callback(
|
||||||
@@ -4980,16 +5019,12 @@ export default {
|
|||||||
},
|
},
|
||||||
fetchTaskEscortSuggestions(queryString, callback) {
|
fetchTaskEscortSuggestions(queryString, callback) {
|
||||||
const keyword = String(queryString || '').trim();
|
const keyword = String(queryString || '').trim();
|
||||||
const carrier = this.getDispatchCarrierFilter();
|
|
||||||
if (!carrier.carrierId && !carrier.carrierName) {
|
|
||||||
callback([]);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.taskEscortLoading = true;
|
this.taskEscortLoading = true;
|
||||||
fetchDriversByCarrierOrganizations(
|
fetchDriverCandidates({
|
||||||
{ size: 20, ...(keyword ? { driverName: keyword } : {}), posts: '押运员' },
|
size: 20,
|
||||||
carrier
|
...(keyword ? { driverName: keyword } : {}),
|
||||||
)
|
posts: '押运员',
|
||||||
|
})
|
||||||
.then(records => {
|
.then(records => {
|
||||||
this.taskEscortOptions = records;
|
this.taskEscortOptions = records;
|
||||||
callback(records.map(item => ({ ...item, value: item.driverName || item.name || '' })));
|
callback(records.map(item => ({ ...item, value: item.driverName || item.name || '' })));
|
||||||
@@ -6634,20 +6669,33 @@ export default {
|
|||||||
return query;
|
return query;
|
||||||
},
|
},
|
||||||
onLoad(page, params = {}) {
|
onLoad(page, params = {}) {
|
||||||
|
if (this.isFormPageInstance) return;
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
|
const currentPage = page?.currentPage || this.page.currentPage || 1;
|
||||||
|
const pageSize = page?.pageSize || this.page.pageSize || 10;
|
||||||
const query = this.normalizeQueryParams({
|
const query = this.normalizeQueryParams({
|
||||||
...params,
|
...params,
|
||||||
...this.query,
|
...this.query,
|
||||||
allDept: 0,
|
allDept: 0,
|
||||||
});
|
});
|
||||||
this.api
|
this.api
|
||||||
.getList(page.currentPage, page.pageSize, query)
|
.getList(currentPage, pageSize, query)
|
||||||
.then(res => {
|
.then(res => {
|
||||||
const result = res.data.data;
|
const result = res?.data?.data || res?.data || {};
|
||||||
this.page.total = result.total;
|
const records = Array.isArray(result.records)
|
||||||
this.data = result.records;
|
? result.records
|
||||||
|
: Array.isArray(result)
|
||||||
|
? result
|
||||||
|
: [];
|
||||||
|
this.page.total = Number(result.total ?? records.length) || 0;
|
||||||
|
this.data = records;
|
||||||
this.selectionClear();
|
this.selectionClear();
|
||||||
})
|
})
|
||||||
|
.catch(error => {
|
||||||
|
window.console.error(error);
|
||||||
|
this.data = [];
|
||||||
|
this.page.total = 0;
|
||||||
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
@@ -7501,12 +7549,13 @@ export default {
|
|||||||
}, {});
|
}, {});
|
||||||
|
|
||||||
const cargoInfo = Object.values(groups)
|
const cargoInfo = Object.values(groups)
|
||||||
.map(
|
.map(group => {
|
||||||
group =>
|
const typeName =
|
||||||
`${group.cargoType}等${group.count}种货物 | ${this.formatDispatchQuantity(
|
group.count > 1 ? `${group.cargoType}等${group.count}种货物` : group.cargoType;
|
||||||
group.quantity
|
return `${typeName} | ${this.formatDispatchQuantity(group.quantity)}${
|
||||||
)}${group.unit ? ` ${group.unit}` : ''}`
|
group.unit ? ` ${group.unit}` : ''
|
||||||
)
|
}`;
|
||||||
|
})
|
||||||
.join('; ');
|
.join('; ');
|
||||||
return cargoInfo || plan.goodsInfo || '';
|
return cargoInfo || plan.goodsInfo || '';
|
||||||
},
|
},
|
||||||
@@ -7652,6 +7701,7 @@ export default {
|
|||||||
row.cargoName = '';
|
row.cargoName = '';
|
||||||
row.specification = '';
|
row.specification = '';
|
||||||
row.model = '';
|
row.model = '';
|
||||||
|
this.dispatchCargoQuantityVersion += 1;
|
||||||
},
|
},
|
||||||
handleDispatchConfiguredCargoNameChange(row, value) {
|
handleDispatchConfiguredCargoNameChange(row, value) {
|
||||||
const nextValue = String(value ?? row.cargoName ?? '').trim();
|
const nextValue = String(value ?? row.cargoName ?? '').trim();
|
||||||
@@ -7660,6 +7710,7 @@ export default {
|
|||||||
);
|
);
|
||||||
if (!option) {
|
if (!option) {
|
||||||
row.cargoName = nextValue;
|
row.cargoName = nextValue;
|
||||||
|
this.dispatchCargoQuantityVersion += 1;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const previousType = String(row.cargoType || '').trim();
|
const previousType = String(row.cargoType || '').trim();
|
||||||
@@ -7674,6 +7725,7 @@ export default {
|
|||||||
}
|
}
|
||||||
row.specification = option.specification || row.specification || '';
|
row.specification = option.specification || row.specification || '';
|
||||||
row.model = option.model || row.model || '';
|
row.model = option.model || row.model || '';
|
||||||
|
this.dispatchCargoQuantityVersion += 1;
|
||||||
},
|
},
|
||||||
openDispatchItemDialog(index = -1, row = defaultDispatchRow()) {
|
openDispatchItemDialog(index = -1, row = defaultDispatchRow()) {
|
||||||
const defaultSummaryItem =
|
const defaultSummaryItem =
|
||||||
@@ -7991,17 +8043,12 @@ export default {
|
|||||||
this.taskDriverOptions = [];
|
this.taskDriverOptions = [];
|
||||||
this.taskEscortOptions = [];
|
this.taskEscortOptions = [];
|
||||||
},
|
},
|
||||||
getDispatchCarrierFilter() {
|
|
||||||
return {
|
|
||||||
carrierId: this.dispatchItemForm.carrierId || '',
|
|
||||||
carrierName: this.dispatchItemForm.carrierName || '',
|
|
||||||
};
|
|
||||||
},
|
|
||||||
handleDispatchCargoQuantityInput(row, value) {
|
handleDispatchCargoQuantityInput(row, value) {
|
||||||
const text = String(value || '').replace(/[^\d.]/g, '');
|
const text = String(value || '').replace(/[^\d.]/g, '');
|
||||||
const parts = text.split('.');
|
const parts = text.split('.');
|
||||||
row.quantity =
|
row.quantity =
|
||||||
parts.length > 1 ? `${parts[0]}.${parts.slice(1).join('').slice(0, 3)}` : parts[0];
|
parts.length > 1 ? `${parts[0]}.${parts.slice(1).join('').slice(0, 3)}` : parts[0];
|
||||||
|
this.dispatchCargoQuantityVersion += 1;
|
||||||
},
|
},
|
||||||
handleDispatchCargoNumberInput(row, prop, value) {
|
handleDispatchCargoNumberInput(row, prop, value) {
|
||||||
this.handleFreightNumberInput(row, prop, value);
|
this.handleFreightNumberInput(row, prop, value);
|
||||||
@@ -8021,12 +8068,14 @@ export default {
|
|||||||
const nextRow = this.normalizeTransportCargoRow({ priceUnit: this.defaultPriceUnit });
|
const nextRow = this.normalizeTransportCargoRow({ priceUnit: this.defaultPriceUnit });
|
||||||
if (index > -1) this.dispatchItemCargoRows.splice(index + 1, 0, nextRow);
|
if (index > -1) this.dispatchItemCargoRows.splice(index + 1, 0, nextRow);
|
||||||
else this.dispatchItemCargoRows.push(nextRow);
|
else this.dispatchItemCargoRows.push(nextRow);
|
||||||
|
this.dispatchCargoQuantityVersion += 1;
|
||||||
},
|
},
|
||||||
removeDispatchCargoRow(index) {
|
removeDispatchCargoRow(index) {
|
||||||
this.dispatchItemCargoRows.splice(index, 1);
|
this.dispatchItemCargoRows.splice(index, 1);
|
||||||
if (!this.dispatchItemCargoRows.length) {
|
if (!this.dispatchItemCargoRows.length) {
|
||||||
this.dispatchItemCargoRows.push(this.normalizeTransportCargoRow());
|
this.dispatchItemCargoRows.push(this.normalizeTransportCargoRow());
|
||||||
}
|
}
|
||||||
|
this.dispatchCargoQuantityVersion += 1;
|
||||||
},
|
},
|
||||||
dispatchCargoFreightAmount(cargo = {}) {
|
dispatchCargoFreightAmount(cargo = {}) {
|
||||||
if (cargo.freightAmount !== undefined && cargo.freightAmount !== null) {
|
if (cargo.freightAmount !== undefined && cargo.freightAmount !== null) {
|
||||||
@@ -8176,11 +8225,50 @@ export default {
|
|||||||
}, 0)
|
}, 0)
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
/** 精简录入提示:可调度余量扣减当前本次数量后的剩余 */
|
/**
|
||||||
dispatchItemHintRemainingQuantity(row = {}) {
|
* 当前编辑表单中,与指定行同货物(有身份)或同单位(无身份)已占用的本次数量合计。
|
||||||
|
* 用于剩余数量展示联动,不参与提交校验(校验仍按整单合计对比计划余量)。
|
||||||
|
*/
|
||||||
|
getDispatchFormOccupiedQuantity(row = {}) {
|
||||||
|
const goodsRows =
|
||||||
|
this.dispatchItemForm?.taskEntryMode === 'full'
|
||||||
|
? this.dispatchItemCargoRows || []
|
||||||
|
: [this.dispatchItemForm || row];
|
||||||
|
const hasCargoIdentity = Boolean(
|
||||||
|
String(row.cargoName || row.goodsName || row.name || '').trim() ||
|
||||||
|
String(row.cargoType || row.secondCargoTypeName || row.goodsType || row.type || '').trim()
|
||||||
|
);
|
||||||
|
const unit = this.getDispatchQuantityUnit(row);
|
||||||
|
const cargoKey = this.getDispatchCargoIdentity(row);
|
||||||
|
return goodsRows.reduce((sum, goods) => {
|
||||||
|
if (!goods) return sum;
|
||||||
|
if (hasCargoIdentity) {
|
||||||
|
const goodsHasIdentity = Boolean(
|
||||||
|
String(goods.cargoName || goods.goodsName || goods.name || '').trim() ||
|
||||||
|
String(
|
||||||
|
goods.cargoType || goods.secondCargoTypeName || goods.goodsType || goods.type || ''
|
||||||
|
).trim()
|
||||||
|
);
|
||||||
|
if (!goodsHasIdentity || this.getDispatchCargoIdentity(goods) !== cargoKey) {
|
||||||
|
return sum;
|
||||||
|
}
|
||||||
|
} else if (this.getDispatchQuantityUnit(goods) !== unit) {
|
||||||
|
return sum;
|
||||||
|
}
|
||||||
|
return sum + this.parseDispatchQuantity(goods.quantity);
|
||||||
|
}, 0);
|
||||||
|
},
|
||||||
|
/** 展示用剩余数量:计划可调度余量扣减本单已填本次数量(含当前行) */
|
||||||
|
dispatchItemDisplayRemainingQuantity(row = {}) {
|
||||||
|
// 依赖版本号,确保一行本次数量变化后其他行剩余数量一并刷新
|
||||||
|
void this.dispatchCargoQuantityVersion;
|
||||||
const available = this.dispatchItemRemainingQuantity(row);
|
const available = this.dispatchItemRemainingQuantity(row);
|
||||||
const current = this.parseDispatchQuantity(row.quantity);
|
const occupied = this.getDispatchFormOccupiedQuantity(row);
|
||||||
return Math.max(available - current, 0);
|
return Math.max(available - occupied, 0);
|
||||||
|
},
|
||||||
|
/** 精简录入提示:与完整录入剩余数量展示规则一致 */
|
||||||
|
dispatchItemHintRemainingQuantity(row = {}) {
|
||||||
|
return this.dispatchItemDisplayRemainingQuantity(row);
|
||||||
},
|
},
|
||||||
pruneDispatchPendingRows(rows = []) {
|
pruneDispatchPendingRows(rows = []) {
|
||||||
const planQuantities = new Map();
|
const planQuantities = new Map();
|
||||||
@@ -8278,13 +8366,17 @@ export default {
|
|||||||
const fullEntry = row.taskEntryMode === 'full';
|
const fullEntry = row.taskEntryMode === 'full';
|
||||||
const roadTransport = this.resolveTransportMode(row.transportType) === 'road';
|
const roadTransport = this.resolveTransportMode(row.transportType) === 'road';
|
||||||
if (fullEntry) {
|
if (fullEntry) {
|
||||||
if (roadTransport && row.carrierType === '自运') {
|
// 公路运输时司机/手机号一律必填(含承运类型为承运商)
|
||||||
|
if (roadTransport && row.carrierType) {
|
||||||
requiredFields.push(['driverName', '司机']);
|
requiredFields.push(['driverName', '司机']);
|
||||||
requiredFields.push(['driverPhone', '手机号']);
|
requiredFields.push(['driverPhone', '手机号']);
|
||||||
}
|
}
|
||||||
} else if (row.carrierType && row.carrierType !== '承运商') {
|
} else if (row.carrierType) {
|
||||||
requiredFields.push(['driverName', '司机']);
|
requiredFields.push(['driverName', '司机']);
|
||||||
requiredFields.push(['driverPhone', '司机手机号']);
|
requiredFields.push([
|
||||||
|
'driverPhone',
|
||||||
|
row.carrierType === '承运商' ? '手机号' : '司机手机号',
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
const emptyField = requiredFields.find(([prop]) => this.isBillingFieldEmpty(row[prop]));
|
const emptyField = requiredFields.find(([prop]) => this.isBillingFieldEmpty(row[prop]));
|
||||||
if (emptyField) return requiredMessage(emptyField[1]);
|
if (emptyField) return requiredMessage(emptyField[1]);
|
||||||
|
|||||||
@@ -96,22 +96,12 @@
|
|||||||
prop="carrierName"
|
prop="carrierName"
|
||||||
label="承运商"
|
label="承运商"
|
||||||
min-width="140"
|
min-width="140"
|
||||||
/><el-table-column
|
|
||||||
v-if="columnVisible.carrierType"
|
|
||||||
prop="carrierType"
|
|
||||||
label="承运类型"
|
|
||||||
min-width="120"
|
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
v-if="columnVisible.waybillCount"
|
v-if="columnVisible.waybillCount"
|
||||||
prop="waybillCount"
|
prop="waybillCount"
|
||||||
label="运单数"
|
label="运单数"
|
||||||
width="90"
|
width="90"
|
||||||
/> <el-table-column
|
|
||||||
v-if="columnVisible.importTypeName"
|
|
||||||
prop="importTypeName"
|
|
||||||
label="导入方式"
|
|
||||||
width="100"
|
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
v-if="columnVisible.statusName"
|
v-if="columnVisible.statusName"
|
||||||
@@ -119,6 +109,12 @@
|
|||||||
label="状态"
|
label="状态"
|
||||||
width="100"
|
width="100"
|
||||||
/>
|
/>
|
||||||
|
<el-table-column
|
||||||
|
v-if="columnVisible.settlementStatusName"
|
||||||
|
prop="settlementStatusName"
|
||||||
|
label="结算状态"
|
||||||
|
width="110"
|
||||||
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
v-if="columnVisible.createUserName"
|
v-if="columnVisible.createUserName"
|
||||||
prop="createUserName"
|
prop="createUserName"
|
||||||
@@ -159,7 +155,7 @@
|
|||||||
>编辑</el-link
|
>编辑</el-link
|
||||||
>
|
>
|
||||||
<el-link
|
<el-link
|
||||||
v-if="row.importStatus === 'draft'"
|
v-if="canRemoveBatch(row)"
|
||||||
type="danger"
|
type="danger"
|
||||||
@click="removeBatch(row)"
|
@click="removeBatch(row)"
|
||||||
>删除</el-link
|
>删除</el-link
|
||||||
@@ -641,10 +637,9 @@ const columnOptions = [
|
|||||||
{ prop: 'batchNo', label: '运单批次号' },
|
{ prop: 'batchNo', label: '运单批次号' },
|
||||||
{ prop: 'projectName', label: '项目名称' },
|
{ prop: 'projectName', label: '项目名称' },
|
||||||
{ prop: 'carrierName', label: '承运商' },
|
{ prop: 'carrierName', label: '承运商' },
|
||||||
{ prop: 'carrierType', label: '承运类型' },
|
|
||||||
{ prop: 'waybillCount', label: '运单数' },
|
{ prop: 'waybillCount', label: '运单数' },
|
||||||
{ prop: 'importTypeName', label: '导入方式' },
|
|
||||||
{ prop: 'statusName', label: '状态' },
|
{ prop: 'statusName', label: '状态' },
|
||||||
|
{ prop: 'settlementStatusName', label: '结算状态' },
|
||||||
{ prop: 'createUserName', label: '创建人' },
|
{ prop: 'createUserName', label: '创建人' },
|
||||||
{ prop: 'createTime', label: '创建时间' },
|
{ prop: 'createTime', label: '创建时间' },
|
||||||
{ prop: 'updateTime', label: '更新时间' },
|
{ prop: 'updateTime', label: '更新时间' },
|
||||||
@@ -1266,9 +1261,47 @@ const fillEditForm = async row => {
|
|||||||
if (carrierValue) carrierChange(carrierValue);
|
if (carrierValue) carrierChange(carrierValue);
|
||||||
await loadBatchRows(snapshot.id);
|
await loadBatchRows(snapshot.id);
|
||||||
};
|
};
|
||||||
const removeBatches = () =>
|
/** 与后端一致:仅未结算批次可整批删除 */
|
||||||
api.removeImportBatches(selected.value.map(item => item.id).join(',')).then(loadBatches);
|
const canRemoveBatch = row => String(row?.settlementStatus || 'unsettled') === 'unsettled';
|
||||||
const removeBatch = row => api.removeImportBatches(row.id).then(loadBatches);
|
const removeBatches = async () => {
|
||||||
|
if (!selected.value.length) {
|
||||||
|
ElMessage.warning('请选择至少一条数据');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// 选中含部分结算/已结算时整批拦截,不静默跳过
|
||||||
|
if (selected.value.some(row => !canRemoveBatch(row))) {
|
||||||
|
ElMessage.warning('仅未结算的运单批次可以删除');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
await ElMessageBox.confirm('确认删除选中的运单批次?删除后不可恢复。', '提示', {
|
||||||
|
type: 'warning',
|
||||||
|
});
|
||||||
|
} catch {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
await api.removeImportBatches(selected.value.map(item => item.id).join(','));
|
||||||
|
ElMessage.success('删除成功');
|
||||||
|
return loadBatches();
|
||||||
|
};
|
||||||
|
const removeBatch = async row => {
|
||||||
|
if (!canRemoveBatch(row)) {
|
||||||
|
ElMessage.warning('仅未结算的运单批次可以删除');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
await ElMessageBox.confirm(
|
||||||
|
`确认删除运单批次「${row.batchNo || ''}」?删除后不可恢复。`,
|
||||||
|
'提示',
|
||||||
|
{ type: 'warning' }
|
||||||
|
);
|
||||||
|
} catch {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
await api.removeImportBatches(row.id);
|
||||||
|
ElMessage.success('删除成功');
|
||||||
|
return loadBatches();
|
||||||
|
};
|
||||||
const projectChange = async id => {
|
const projectChange = async id => {
|
||||||
const requestId = ++projectRequestId;
|
const requestId = ++projectRequestId;
|
||||||
const item = projects.value.find(row => String(row.id) === String(id));
|
const item = projects.value.find(row => String(row.id) === String(id));
|
||||||
@@ -1348,11 +1381,23 @@ const formatOptionalNumber = value => {
|
|||||||
const normalized = normalizeOptionalImportNumber(value);
|
const normalized = normalizeOptionalImportNumber(value);
|
||||||
return normalized === null || normalized === undefined ? '' : normalized;
|
return normalized === null || normalized === undefined ? '' : normalized;
|
||||||
};
|
};
|
||||||
|
// 明细接口返回运单实体字段 startDate/endDate/estimatedStartTime/estimatedEndTime,
|
||||||
|
// 而明细表与编辑回填按导入列字段名 actualStartDate 等读取,重载后在此对齐,否则实际/预计时间列为空。
|
||||||
|
const detailDateAliases = {
|
||||||
|
actualStartDate: 'startDate',
|
||||||
|
actualEndDate: 'endDate',
|
||||||
|
planStartDate: 'estimatedStartTime',
|
||||||
|
planEndDate: 'estimatedEndTime',
|
||||||
|
};
|
||||||
const normalizeDetailRow = row => {
|
const normalizeDetailRow = row => {
|
||||||
const next = { ...(row || {}) };
|
const next = { ...(row || {}) };
|
||||||
OPTIONAL_NUMBER_PROPS.forEach(prop => {
|
OPTIONAL_NUMBER_PROPS.forEach(prop => {
|
||||||
next[prop] = formatOptionalNumber(next[prop]);
|
next[prop] = formatOptionalNumber(next[prop]);
|
||||||
});
|
});
|
||||||
|
Object.entries(detailDateAliases).forEach(([prop, source]) => {
|
||||||
|
if (String(next[prop] ?? '').trim()) return;
|
||||||
|
if (String(next[source] ?? '').trim()) next[prop] = next[source];
|
||||||
|
});
|
||||||
return next;
|
return next;
|
||||||
};
|
};
|
||||||
const normalizeImportRow = row => ({
|
const normalizeImportRow = row => ({
|
||||||
|
|||||||
@@ -1200,7 +1200,11 @@
|
|||||||
:loading="taskDriverLoading"
|
:loading="taskDriverLoading"
|
||||||
:disabled="dialogReadonly"
|
:disabled="dialogReadonly"
|
||||||
@select="handleTaskDriverSelect"
|
@select="handleTaskDriverSelect"
|
||||||
/>
|
>
|
||||||
|
<template #default="{ item }">
|
||||||
|
<span>{{ driverOptionText(item) }}</span>
|
||||||
|
</template>
|
||||||
|
</el-autocomplete>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
v-if="isRoadTransport"
|
v-if="isRoadTransport"
|
||||||
@@ -1279,7 +1283,11 @@
|
|||||||
:loading="taskEscortLoading"
|
:loading="taskEscortLoading"
|
||||||
:disabled="dialogReadonly"
|
:disabled="dialogReadonly"
|
||||||
@select="handleTaskEscortSelect"
|
@select="handleTaskEscortSelect"
|
||||||
/>
|
>
|
||||||
|
<template #default="{ item }">
|
||||||
|
<span>{{ driverOptionText(item) }}</span>
|
||||||
|
</template>
|
||||||
|
</el-autocomplete>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-if="showRoadEscortFields" label="押运人手机号">
|
<el-form-item v-if="showRoadEscortFields" label="押运人手机号">
|
||||||
<el-input
|
<el-input
|
||||||
@@ -1594,6 +1602,13 @@
|
|||||||
<el-link type="primary" v-if="canComplete(row)" @click="handleAction('complete', row)">
|
<el-link type="primary" v-if="canComplete(row)" @click="handleAction('complete', row)">
|
||||||
{{ completeActionLabel }}
|
{{ completeActionLabel }}
|
||||||
</el-link>
|
</el-link>
|
||||||
|
<el-link
|
||||||
|
type="primary"
|
||||||
|
v-if="canConfirmReturn(row)"
|
||||||
|
@click="handleAction('confirmReturn', row)"
|
||||||
|
>
|
||||||
|
{{ completeActionLabel }}
|
||||||
|
</el-link>
|
||||||
<el-link type="primary" v-if="canMaintainMileage(row)" @click="openMileageDialog(row)">
|
<el-link type="primary" v-if="canMaintainMileage(row)" @click="openMileageDialog(row)">
|
||||||
维护里程
|
维护里程
|
||||||
</el-link>
|
</el-link>
|
||||||
@@ -1653,7 +1668,11 @@
|
|||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
@select="handleReassignDriverSelect"
|
@select="handleReassignDriverSelect"
|
||||||
@change="handleReassignDriverChange"
|
@change="handleReassignDriverChange"
|
||||||
/>
|
>
|
||||||
|
<template #default="{ item }">
|
||||||
|
<span>{{ driverOptionText(item) }}</span>
|
||||||
|
</template>
|
||||||
|
</el-autocomplete>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
label="手机号"
|
label="手机号"
|
||||||
@@ -2252,6 +2271,13 @@
|
|||||||
<span v-if="record.volume">体积 {{ record.volume }}方</span>
|
<span v-if="record.volume">体积 {{ record.volume }}方</span>
|
||||||
<span v-if="record.quantity">数量 {{ record.quantity }}</span>
|
<span v-if="record.quantity">数量 {{ record.quantity }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- 里程只挂在末位节点上(needMileage 由后端下发),显示的是运单里程 -->
|
||||||
|
<div
|
||||||
|
v-if="record.needMileage && Number(record.mileage) > 0"
|
||||||
|
class="waybill-manage-page__punch-record-line"
|
||||||
|
>
|
||||||
|
里程 {{ record.mileage }} 公里
|
||||||
|
</div>
|
||||||
<div
|
<div
|
||||||
v-if="record.remark"
|
v-if="record.remark"
|
||||||
class="waybill-manage-page__punch-record-line"
|
class="waybill-manage-page__punch-record-line"
|
||||||
@@ -2848,6 +2874,20 @@
|
|||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<!-- 里程只在末位打卡节点出现:后端按「末位 + 计费规则含里程」下发 needMileage,前端不自己推 -->
|
||||||
|
<el-col v-if="waybillPunchEditMileageVisible" :span="8">
|
||||||
|
<el-form-item label="里程">
|
||||||
|
<el-input
|
||||||
|
v-model="waybillPunchEditForm.mileage"
|
||||||
|
maxlength="10"
|
||||||
|
:disabled="waybillPunchEditMileageLocked"
|
||||||
|
placeholder="请输入"
|
||||||
|
@input="handleWaybillPunchMileageInput"
|
||||||
|
>
|
||||||
|
<template #append>公里</template>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="备注">
|
<el-form-item label="备注">
|
||||||
<el-input
|
<el-input
|
||||||
@@ -3683,6 +3723,7 @@ import {
|
|||||||
getVoucherImages as getProcessConfigVoucherImages,
|
getVoucherImages as getProcessConfigVoucherImages,
|
||||||
} from '@/api/business/process-config';
|
} from '@/api/business/process-config';
|
||||||
import {
|
import {
|
||||||
|
getList as getWaybillList,
|
||||||
getPunchRecords as getWaybillPunchRecords,
|
getPunchRecords as getWaybillPunchRecords,
|
||||||
locateVehicle,
|
locateVehicle,
|
||||||
savePunchRecord,
|
savePunchRecord,
|
||||||
@@ -3692,9 +3733,7 @@ import VoucherExecutionDetail from './voucher-execution-detail.vue';
|
|||||||
import PunchRecordPhotos from './punch-record-photos.vue';
|
import PunchRecordPhotos from './punch-record-photos.vue';
|
||||||
import AddressMapPicker from '@/components/address-map-picker/main.vue';
|
import AddressMapPicker from '@/components/address-map-picker/main.vue';
|
||||||
import { getList as getDriverList } from '@/api/transportCapacity/driver';
|
import { getList as getDriverList } from '@/api/transportCapacity/driver';
|
||||||
import {
|
import { fetchDriverCandidates, driverOptionText } from '@/utils/carrier-org-resource';
|
||||||
fetchDriversByCarrierOrganizations,
|
|
||||||
} from '@/utils/carrier-org-resource';
|
|
||||||
import { getDictionary } from '@/api/system/dictbiz';
|
import { getDictionary } from '@/api/system/dictbiz';
|
||||||
import { getDictionary as getSystemDictionary } from '@/api/system/dict';
|
import { getDictionary as getSystemDictionary } from '@/api/system/dict';
|
||||||
import { addressTypeOptions } from '@/option/base/common-address';
|
import { addressTypeOptions } from '@/option/base/common-address';
|
||||||
@@ -4011,6 +4050,7 @@ export default {
|
|||||||
weight: '',
|
weight: '',
|
||||||
volume: '',
|
volume: '',
|
||||||
quantity: '',
|
quantity: '',
|
||||||
|
mileage: '',
|
||||||
remark: '',
|
remark: '',
|
||||||
photos: [],
|
photos: [],
|
||||||
},
|
},
|
||||||
@@ -4370,9 +4410,15 @@ export default {
|
|||||||
addBtn: this.canCreate,
|
addBtn: this.canCreate,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
// 打卡记录编辑入口与运单编辑同权限:能改运单的人才能订正它的打卡流水
|
// 打卡记录编辑入口与运单编辑同权限:能改运单的人才能订正它的打卡流水。
|
||||||
|
// 时间轴的「编辑打卡 / 补卡」链接是本页唯一写入入口,提交固定 punched=true。
|
||||||
|
// 取消打卡不在本页;待回单确认的运单不显示该链接。
|
||||||
canEditWaybillPunchRecord() {
|
canEditWaybillPunchRecord() {
|
||||||
return this.hasPermission(`${this.config.permission}_edit`) && !this.readonlyScope;
|
return (
|
||||||
|
this.hasPermission(`${this.config.permission}_edit`) &&
|
||||||
|
!this.readonlyScope &&
|
||||||
|
this.statusValue(this.detailRow) !== 'pending_return_confirm'
|
||||||
|
);
|
||||||
},
|
},
|
||||||
waybillPunchEditNode() {
|
waybillPunchEditNode() {
|
||||||
return this.findWaybillPunchEditNodeConfig(this.waybillPunchEditRecord);
|
return this.findWaybillPunchEditNodeConfig(this.waybillPunchEditRecord);
|
||||||
@@ -4407,6 +4453,15 @@ export default {
|
|||||||
waybillPunchEditPunchDisabled() {
|
waybillPunchEditPunchDisabled() {
|
||||||
return this.waybillPunchEditNode?.punch === false;
|
return this.waybillPunchEditNode?.punch === false;
|
||||||
},
|
},
|
||||||
|
// 里程:后端下发 needMileage 才出现(末位打卡节点 + 计费规则含里程);在途打卡不采集里程
|
||||||
|
waybillPunchEditMileageVisible() {
|
||||||
|
const record = this.waybillPunchEditRecord || {};
|
||||||
|
return record.needMileage === true && record.type !== 'enroute';
|
||||||
|
},
|
||||||
|
// 已生成结算单的运单里程冻结:输入框置灰,改动由后端拒绝
|
||||||
|
waybillPunchEditMileageLocked() {
|
||||||
|
return this.waybillPunchEditRecord?.mileageLocked === true;
|
||||||
|
},
|
||||||
waybillPunchEditRules() {
|
waybillPunchEditRules() {
|
||||||
return { punchTime: [{ required: true, message: '请选择打卡时间', trigger: 'change' }] };
|
return { punchTime: [{ required: true, message: '请选择打卡时间', trigger: 'change' }] };
|
||||||
},
|
},
|
||||||
@@ -4800,6 +4855,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
formatContractOptionLabel,
|
formatContractOptionLabel,
|
||||||
|
driverOptionText,
|
||||||
parseRouteChangeContent,
|
parseRouteChangeContent,
|
||||||
// 页面被 keep-alive 缓存/卸载时调用,关闭本页所有 append-to-body 的弹窗,
|
// 页面被 keep-alive 缓存/卸载时调用,关闭本页所有 append-to-body 的弹窗,
|
||||||
// 避免 Teleport 出去的 DOM 残留在 body 上盖住后续页面(详见 data 里的说明)。
|
// 避免 Teleport 出去的 DOM 残留在 body 上盖住后续页面(详见 data 里的说明)。
|
||||||
@@ -4957,9 +5013,9 @@ export default {
|
|||||||
return Object.values(groups)
|
return Object.values(groups)
|
||||||
.map(group => {
|
.map(group => {
|
||||||
const quantity = this.formatQuantity(group.quantity);
|
const quantity = this.formatQuantity(group.quantity);
|
||||||
return `${group.typeName}等${group.count}种货物 | ${quantity}${
|
const typeName =
|
||||||
group.unit ? ` ${group.unit}` : ''
|
group.count > 1 ? `${group.typeName}等${group.count}种货物` : group.typeName;
|
||||||
}`;
|
return `${typeName} | ${quantity}${group.unit ? ` ${group.unit}` : ''}`;
|
||||||
})
|
})
|
||||||
.join('; ');
|
.join('; ');
|
||||||
},
|
},
|
||||||
@@ -5060,11 +5116,16 @@ export default {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
canCopy(row) {
|
canCopy(row) {
|
||||||
|
if (!row) return false;
|
||||||
|
// 归属本账号可见范围的运单允许复制。跨组织但项目归属本账号的记录会被标成只读,
|
||||||
|
// 只读仅拦截编辑/删除,不拦截复制。具备查看、新增、编辑或复制权限即可使用。
|
||||||
return (
|
return (
|
||||||
this.hasAction('copy') &&
|
this.hasAction('copy') &&
|
||||||
this.hasPermission(`${this.config.permission}_copy`) &&
|
|
||||||
!this.readonlyScope &&
|
!this.readonlyScope &&
|
||||||
!row.readonly
|
(this.hasPermission(`${this.config.permission}_copy`) ||
|
||||||
|
this.hasPermission(`${this.config.permission}_add`) ||
|
||||||
|
this.hasPermission(`${this.config.permission}_edit`) ||
|
||||||
|
this.hasPermission(`${this.config.permission}_view`))
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
canEnable(row) {
|
canEnable(row) {
|
||||||
@@ -5099,7 +5160,8 @@ export default {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
const status = this.statusValue(row);
|
const status = this.statusValue(row);
|
||||||
return status === 'pending';
|
// 待回单确认可取消,取消不生成应收应付
|
||||||
|
return status === 'pending' || status === 'pending_return_confirm';
|
||||||
},
|
},
|
||||||
canComplete(row) {
|
canComplete(row) {
|
||||||
if (
|
if (
|
||||||
@@ -5111,8 +5173,22 @@ export default {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
const status = this.statusValue(row);
|
const status = this.statusValue(row);
|
||||||
|
// 待回单确认的「完成」由确认回单入口承担(走打卡节点与未了结异常校验);
|
||||||
|
// 只有确认回单不可用时才退回这里的普通完成
|
||||||
|
if (status === 'pending_return_confirm') {
|
||||||
|
return !this.canConfirmReturn(row);
|
||||||
|
}
|
||||||
return status === 'processing' || status === 'running';
|
return status === 'processing' || status === 'running';
|
||||||
},
|
},
|
||||||
|
canConfirmReturn(row) {
|
||||||
|
return (
|
||||||
|
this.hasAction('confirmReturn') &&
|
||||||
|
this.hasPermission(`${this.config.permission}_complete`) &&
|
||||||
|
!this.readonlyScope &&
|
||||||
|
!row.readonly &&
|
||||||
|
this.statusValue(row) === 'pending_return_confirm'
|
||||||
|
);
|
||||||
|
},
|
||||||
canMaintainMileage(row) {
|
canMaintainMileage(row) {
|
||||||
return (
|
return (
|
||||||
this.config.permission === 'waybill_manage' &&
|
this.config.permission === 'waybill_manage' &&
|
||||||
@@ -5926,6 +6002,8 @@ export default {
|
|||||||
weight: record.weight || '',
|
weight: record.weight || '',
|
||||||
volume: record.volume || '',
|
volume: record.volume || '',
|
||||||
quantity: record.quantity || '',
|
quantity: record.quantity || '',
|
||||||
|
// 里程只有正整数口径,后端若仍下发 "200.00" 会过不了提交时的正整数校验
|
||||||
|
mileage: Number(record.mileage) > 0 ? String(Number(record.mileage)) : '',
|
||||||
remark: record.remark || '',
|
remark: record.remark || '',
|
||||||
photos: (record.photos || [])
|
photos: (record.photos || [])
|
||||||
.filter(photo => photo?.url)
|
.filter(photo => photo?.url)
|
||||||
@@ -6001,10 +6079,22 @@ export default {
|
|||||||
photos.splice(index, 1);
|
photos.splice(index, 1);
|
||||||
this.waybillPunchEditForm.photos = photos;
|
this.waybillPunchEditForm.photos = photos;
|
||||||
},
|
},
|
||||||
|
// 里程只收整数:非数字直接丢掉,长度与「维护里程」一致(≤10 位)
|
||||||
|
handleWaybillPunchMileageInput(value) {
|
||||||
|
this.waybillPunchEditForm.mileage = String(value || '')
|
||||||
|
.replace(/\D/g, '')
|
||||||
|
.slice(0, 10);
|
||||||
|
},
|
||||||
async submitWaybillPunchRecordEdit() {
|
async submitWaybillPunchRecordEdit() {
|
||||||
await this.$refs.waybillPunchRecordEditFormRef.validate();
|
await this.$refs.waybillPunchRecordEditFormRef.validate();
|
||||||
const record = this.waybillPunchEditRecord;
|
const record = this.waybillPunchEditRecord;
|
||||||
const form = this.waybillPunchEditForm;
|
const form = this.waybillPunchEditForm;
|
||||||
|
// 管理端里程选填:留空表示不改动运单里程,所以只校验填了值的情况
|
||||||
|
const mileageText = String(form.mileage || '').trim();
|
||||||
|
if (this.waybillPunchEditMileageVisible && mileageText && !/^[1-9]\d{0,9}$/.test(mileageText)) {
|
||||||
|
this.$message.warning('里程必须为不超过10位的正整数');
|
||||||
|
return;
|
||||||
|
}
|
||||||
const submit =
|
const submit =
|
||||||
typeof this.api?.savePunchRecord === 'function' ? this.api.savePunchRecord : savePunchRecord;
|
typeof this.api?.savePunchRecord === 'function' ? this.api.savePunchRecord : savePunchRecord;
|
||||||
this.waybillPunchRecordEditDialog.submitting = true;
|
this.waybillPunchRecordEditDialog.submitting = true;
|
||||||
@@ -6023,6 +6113,8 @@ export default {
|
|||||||
weight: form.weight,
|
weight: form.weight,
|
||||||
volume: form.volume,
|
volume: form.volume,
|
||||||
quantity: form.quantity,
|
quantity: form.quantity,
|
||||||
|
// 不传代表不改;后端按 null 处理
|
||||||
|
mileage: mileageText ? Number(mileageText) : undefined,
|
||||||
remark: form.remark,
|
remark: form.remark,
|
||||||
photos: form.photos.map(photo => ({ url: photo.url, type: photo.type })),
|
photos: form.photos.map(photo => ({ url: photo.url, type: photo.type })),
|
||||||
});
|
});
|
||||||
@@ -6543,6 +6635,9 @@ export default {
|
|||||||
if (status === 'completed') {
|
if (status === 'completed') {
|
||||||
return 'primary';
|
return 'primary';
|
||||||
}
|
}
|
||||||
|
if (status === 'pending_return_confirm') {
|
||||||
|
return 'warning';
|
||||||
|
}
|
||||||
return 'warning';
|
return 'warning';
|
||||||
},
|
},
|
||||||
normalizeRow(row, saveAsDraft = false) {
|
normalizeRow(row, saveAsDraft = false) {
|
||||||
@@ -7942,19 +8037,10 @@ export default {
|
|||||||
this.taskDriverOptions = [];
|
this.taskDriverOptions = [];
|
||||||
this.taskEscortOptions = [];
|
this.taskEscortOptions = [];
|
||||||
},
|
},
|
||||||
getTaskCarrierFilter() {
|
|
||||||
return {
|
|
||||||
carrierId: this.form.carrierId || '',
|
|
||||||
carrierName: this.form.carrierName || '',
|
|
||||||
};
|
|
||||||
},
|
|
||||||
loadTaskDriverOptions() {
|
loadTaskDriverOptions() {
|
||||||
if (!this.taskInfoFormEnabled || this.taskDriverLoading) return Promise.resolve([]);
|
if (!this.taskInfoFormEnabled || this.taskDriverLoading) return Promise.resolve([]);
|
||||||
this.taskDriverLoading = true;
|
this.taskDriverLoading = true;
|
||||||
return fetchDriversByCarrierOrganizations(
|
return fetchDriverCandidates({ size: 9999, posts: '司机' })
|
||||||
{ size: 9999, posts: '司机' },
|
|
||||||
this.getTaskCarrierFilter()
|
|
||||||
)
|
|
||||||
.then(records => {
|
.then(records => {
|
||||||
this.taskDriverOptions = records;
|
this.taskDriverOptions = records;
|
||||||
return this.taskDriverOptions;
|
return this.taskDriverOptions;
|
||||||
@@ -7965,16 +8051,8 @@ export default {
|
|||||||
},
|
},
|
||||||
fetchTaskDriverSuggestions(queryString, callback) {
|
fetchTaskDriverSuggestions(queryString, callback) {
|
||||||
const keyword = String(queryString || '').trim();
|
const keyword = String(queryString || '').trim();
|
||||||
const carrier = this.getTaskCarrierFilter();
|
|
||||||
if (!carrier.carrierId && !carrier.carrierName) {
|
|
||||||
callback([]);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.taskDriverLoading = true;
|
this.taskDriverLoading = true;
|
||||||
fetchDriversByCarrierOrganizations(
|
fetchDriverCandidates({ size: 20, ...(keyword ? { driverName: keyword } : {}), posts: '司机' })
|
||||||
{ size: 20, ...(keyword ? { driverName: keyword } : {}), posts: '司机' },
|
|
||||||
carrier
|
|
||||||
)
|
|
||||||
.then(records => {
|
.then(records => {
|
||||||
this.taskDriverOptions = records;
|
this.taskDriverOptions = records;
|
||||||
callback(
|
callback(
|
||||||
@@ -7994,16 +8072,12 @@ export default {
|
|||||||
},
|
},
|
||||||
fetchTaskEscortSuggestions(queryString, callback) {
|
fetchTaskEscortSuggestions(queryString, callback) {
|
||||||
const keyword = String(queryString || '').trim();
|
const keyword = String(queryString || '').trim();
|
||||||
const carrier = this.getTaskCarrierFilter();
|
|
||||||
if (!carrier.carrierId && !carrier.carrierName) {
|
|
||||||
callback([]);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.taskEscortLoading = true;
|
this.taskEscortLoading = true;
|
||||||
fetchDriversByCarrierOrganizations(
|
fetchDriverCandidates({
|
||||||
{ size: 20, ...(keyword ? { driverName: keyword } : {}), posts: '押运员' },
|
size: 20,
|
||||||
carrier
|
...(keyword ? { driverName: keyword } : {}),
|
||||||
)
|
posts: '押运员',
|
||||||
|
})
|
||||||
.then(records => {
|
.then(records => {
|
||||||
this.taskEscortOptions = records;
|
this.taskEscortOptions = records;
|
||||||
callback(records.map(item => ({ ...item, value: item.driverName || item.name || '' })));
|
callback(records.map(item => ({ ...item, value: item.driverName || item.name || '' })));
|
||||||
@@ -10150,8 +10224,14 @@ export default {
|
|||||||
cancel: '取消',
|
cancel: '取消',
|
||||||
complete: this.completeActionLabel,
|
complete: this.completeActionLabel,
|
||||||
reassign: '重新派单',
|
reassign: '重新派单',
|
||||||
|
confirmReturn: '完成',
|
||||||
}[action];
|
}[action];
|
||||||
this.$confirm(`确定${actionName}该${this.config.title}?`, '提示', {
|
// 回单确认是终态动作(本轮不做撤销),把后果写在提示里,别让人以为还能退回
|
||||||
|
const confirmText =
|
||||||
|
action === 'confirmReturn'
|
||||||
|
? '回单确认后该运单将置为已完成,且不可撤销。是否继续?'
|
||||||
|
: `确定${actionName}该${this.config.title}?`;
|
||||||
|
this.$confirm(confirmText, '提示', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
@@ -10204,20 +10284,8 @@ export default {
|
|||||||
},
|
},
|
||||||
fetchReassignDriverSuggestions(queryString, callback) {
|
fetchReassignDriverSuggestions(queryString, callback) {
|
||||||
const keyword = String(queryString || '').trim();
|
const keyword = String(queryString || '').trim();
|
||||||
const row = this.reassignDrawer.row || {};
|
|
||||||
const carrier = {
|
|
||||||
carrierId: row.carrierId || '',
|
|
||||||
carrierName: row.carrierName || '',
|
|
||||||
};
|
|
||||||
if (!carrier.carrierId && !carrier.carrierName) {
|
|
||||||
callback([]);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.reassignDrawer.driverLoading = true;
|
this.reassignDrawer.driverLoading = true;
|
||||||
fetchDriversByCarrierOrganizations(
|
fetchDriverCandidates({ size: 20, ...(keyword ? { driverName: keyword } : {}), posts: '司机' })
|
||||||
{ size: 20, ...(keyword ? { driverName: keyword } : {}), posts: '司机' },
|
|
||||||
carrier
|
|
||||||
)
|
|
||||||
.then(records => {
|
.then(records => {
|
||||||
this.reassignDriverOptions = records;
|
this.reassignDriverOptions = records;
|
||||||
callback(
|
callback(
|
||||||
@@ -10356,7 +10424,14 @@ export default {
|
|||||||
this.$message.warning('请选择至少一条数据');
|
this.$message.warning('请选择至少一条数据');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.$confirm('确定完成选中的运单?', '提示', {
|
const pendingReturnCount = this.selectionList.filter(
|
||||||
|
row => this.statusValue(row) === 'pending_return_confirm'
|
||||||
|
).length;
|
||||||
|
const tip =
|
||||||
|
pendingReturnCount > 0
|
||||||
|
? `确定完成选中的运单?其中 ${pendingReturnCount} 条为待回单确认,确认后将转为已完成。`
|
||||||
|
: '确定完成选中的运单?';
|
||||||
|
this.$confirm(tip, '提示', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
@@ -10370,25 +10445,38 @@ export default {
|
|||||||
this.onLoad(this.page, this.query);
|
this.onLoad(this.page, this.query);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleRoadLoading() {
|
async handleRoadLoading() {
|
||||||
if (!this.selectionList.length) {
|
if (!this.selectionList.length) {
|
||||||
this.$message.warning('请选择至少一条数据');
|
this.$message.warning('请选择至少一条数据');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const nonRoadWaybills = this.selectionList.filter(row => !this.waybillIsRoadTransport(row));
|
const selectedIds = this.selectionList.map(row => row.id).filter(Boolean);
|
||||||
if (nonRoadWaybills.length) {
|
if (!selectedIds.length) {
|
||||||
this.$message.warning('公路配载仅支持运输方式为“公路运输”的运单');
|
this.$message.warning('请选择至少一条数据');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const unavailableWaybills = this.selectionList.filter(
|
// 可配载与否只看后端查询结果
|
||||||
row =>
|
let loadableIds;
|
||||||
!['processing', 'running'].includes(this.statusValue(row)) ||
|
try {
|
||||||
row.loadingId ||
|
const res = await getWaybillList(1, selectedIds.length, {
|
||||||
row.loadingManageId ||
|
loadableOnly: 1,
|
||||||
row.loadingNo
|
ids: selectedIds.join(','),
|
||||||
);
|
});
|
||||||
if (unavailableWaybills.length) {
|
loadableIds = new Set(extractRecords(res).map(row => String(row.id)));
|
||||||
this.$message.warning('公路配载仅支持进行中且未配载的运单');
|
} catch (error) {
|
||||||
|
this.$message.error('校验运单可配载状态失败,请重试');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const rejectedRows = this.selectionList.filter(row => !loadableIds.has(String(row.id)));
|
||||||
|
if (rejectedRows.length) {
|
||||||
|
const rejectedText = rejectedRows
|
||||||
|
.map(row => {
|
||||||
|
const reason = this.roadLoadingRejectReasonText(row);
|
||||||
|
const no = row.waybillNo || row.id || '';
|
||||||
|
return `${no}(${reason})`;
|
||||||
|
})
|
||||||
|
.join('、');
|
||||||
|
this.$message.warning(`${rejectedText};公路配载仅支持公路、待执行且未配载的运单`);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
@@ -10411,6 +10499,13 @@ export default {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
// 只给后端判定为不可配载的运单生成可读原因,本身不参与准入判定
|
||||||
|
roadLoadingRejectReasonText(row = {}) {
|
||||||
|
if (!this.waybillIsRoadTransport(row)) return '非公路运输';
|
||||||
|
if (String(row.businessStatus || '') !== 'pending') return '状态不是待执行';
|
||||||
|
if (row.loadingNo) return '已关联配载单';
|
||||||
|
return '运单数据可能已变化,请刷新后重试';
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -0,0 +1,21 @@
|
|||||||
|
<template>
|
||||||
|
<mk-public-shell biz-type="contract-change" :get-form="getForm">
|
||||||
|
<contract-manage-change ref="page" />
|
||||||
|
</mk-public-shell>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import MkPublicShell from '@/views/mk/mk-public-shell.vue';
|
||||||
|
import ContractManageChange from '@/views/business/contract-manage-change.vue';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'ContractChangePublicView',
|
||||||
|
components: { MkPublicShell, ContractManageChange },
|
||||||
|
methods: {
|
||||||
|
getForm() {
|
||||||
|
const row = this.$refs.page?.form || {};
|
||||||
|
return { ...row, subject: row.contractName || row.contractNo || '' };
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
@@ -0,0 +1,407 @@
|
|||||||
|
<template>
|
||||||
|
<basic-container class="contract-change-page">
|
||||||
|
<avue-crud
|
||||||
|
:option="tableOption"
|
||||||
|
:table-loading="loading"
|
||||||
|
:data="data"
|
||||||
|
v-model:page="page"
|
||||||
|
v-model="tableForm"
|
||||||
|
ref="crud"
|
||||||
|
:permission="permissionList"
|
||||||
|
@search-change="searchChange"
|
||||||
|
@search-reset="searchReset"
|
||||||
|
@selection-change="selectionChange"
|
||||||
|
@current-change="currentChange"
|
||||||
|
@size-change="sizeChange"
|
||||||
|
@refresh-change="refreshChange"
|
||||||
|
@on-load="onLoad"
|
||||||
|
>
|
||||||
|
<template #menu-left>
|
||||||
|
<el-button type="primary" plain :loading="hcsRepushingId === 'batch'" @click="handleHcsBatchRepush">
|
||||||
|
批量同步
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
plain
|
||||||
|
v-if="hasPermission(`${config.permission}_delete`)"
|
||||||
|
@click="handleDelete"
|
||||||
|
>
|
||||||
|
批量删除
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template #approvalStatus="{ row }">
|
||||||
|
{{ row.approvalStatusName || statusLabel(row.approvalStatus) }}
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template #syncStatus="{ row }">
|
||||||
|
<el-tag v-if="row.syncStatus" :type="syncTagType(row.syncStatus)" class="status-text">
|
||||||
|
{{ syncLabel(row.syncStatus) }}
|
||||||
|
</el-tag>
|
||||||
|
<span v-else>-</span>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template #menu="{ row }">
|
||||||
|
<el-link type="primary" v-if="canView(row)" @click="openForm('view', row)"> 查看 </el-link>
|
||||||
|
<el-link type="primary" v-if="canEdit(row)" @click="openForm('edit', row)"> 编辑 </el-link>
|
||||||
|
<el-link type="danger" v-if="canDelete(row)" @click="rowDel(row)"> 删除 </el-link>
|
||||||
|
<el-link
|
||||||
|
v-for="operation in customOperations(row)"
|
||||||
|
:key="operation.action"
|
||||||
|
:type="
|
||||||
|
operation.type === 'warning'
|
||||||
|
? 'warning'
|
||||||
|
: operation.type === 'success'
|
||||||
|
? 'success'
|
||||||
|
: 'primary'
|
||||||
|
"
|
||||||
|
@click="handleCustomOperation(operation, row)"
|
||||||
|
>
|
||||||
|
{{ operation.label }}
|
||||||
|
</el-link>
|
||||||
|
</template>
|
||||||
|
</avue-crud>
|
||||||
|
</basic-container>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import * as api from '@/api/business/contract-change';
|
||||||
|
import { repushBatch as hcsRepushBatch } from '@/api/business/hcs';
|
||||||
|
import { getMKApprovalUrl } from '@/api/system/business-process';
|
||||||
|
import { config, option } from '@/option/business/contract-change';
|
||||||
|
import { approvalStatusOptions } from '@/option/business/common';
|
||||||
|
import { loadMkEnabled, submitMkApprovalFlow } from '@/utils/mk-approval';
|
||||||
|
import { isAdministrator } from '@/utils/auth';
|
||||||
|
import { mapGetters } from 'vuex';
|
||||||
|
|
||||||
|
const contractChangeFormRoute = '/business/contract-change/form';
|
||||||
|
const contractChangeListRefreshKey = 'contract-change-list-refresh';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'ContractChange',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
api,
|
||||||
|
config,
|
||||||
|
tableForm: {},
|
||||||
|
tableOption: this.buildTableOption(),
|
||||||
|
loading: true,
|
||||||
|
data: [],
|
||||||
|
page: {
|
||||||
|
pageSize: 10,
|
||||||
|
currentPage: 1,
|
||||||
|
total: 0,
|
||||||
|
},
|
||||||
|
query: {},
|
||||||
|
selectionList: [],
|
||||||
|
mkEnabled: false,
|
||||||
|
hcsRepushingId: null,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapGetters(['permission', 'userInfo', 'website']),
|
||||||
|
permissionList() {
|
||||||
|
return {
|
||||||
|
addBtn: false,
|
||||||
|
viewBtn: false,
|
||||||
|
delBtn: false,
|
||||||
|
editBtn: false,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
isAdmin() {
|
||||||
|
return isAdministrator(this.userInfo);
|
||||||
|
},
|
||||||
|
ids() {
|
||||||
|
return this.selectionList.map(item => item.id).join(',');
|
||||||
|
},
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
loadMkEnabled()
|
||||||
|
.then(enabled => {
|
||||||
|
this.mkEnabled = enabled;
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.mkEnabled = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
activated() {
|
||||||
|
if (sessionStorage.getItem(contractChangeListRefreshKey)) {
|
||||||
|
sessionStorage.removeItem(contractChangeListRefreshKey);
|
||||||
|
this.onLoad(this.page, this.query);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
buildTableOption() {
|
||||||
|
return {
|
||||||
|
...option,
|
||||||
|
addBtn: false,
|
||||||
|
viewBtn: false,
|
||||||
|
editBtn: false,
|
||||||
|
delBtn: false,
|
||||||
|
menuWidth: 320,
|
||||||
|
column: (option.column || []).map(column => ({
|
||||||
|
...column,
|
||||||
|
display: false,
|
||||||
|
align: 'center',
|
||||||
|
headerAlign: 'center',
|
||||||
|
})),
|
||||||
|
};
|
||||||
|
},
|
||||||
|
hasPermission(code) {
|
||||||
|
return this.isAdmin || this.validData(this.permission && this.permission[code], false);
|
||||||
|
},
|
||||||
|
statusLabel(status) {
|
||||||
|
return approvalStatusOptions.find(item => item.value === status)?.label || status || '-';
|
||||||
|
},
|
||||||
|
syncLabel(value) {
|
||||||
|
return { unsynced: '待推送', synced: '已推送', failed: '推送失败' }[value] || value;
|
||||||
|
},
|
||||||
|
syncTagType(value) {
|
||||||
|
return { unsynced: 'info', synced: 'success', failed: 'danger' }[value] || 'info';
|
||||||
|
},
|
||||||
|
canHcsRepush(row) {
|
||||||
|
return row.approvalStatus === 'approved' && row.contractId && row.syncStatus !== 'synced';
|
||||||
|
},
|
||||||
|
handleHcsBatchRepush() {
|
||||||
|
if (this.hcsRepushingId) return;
|
||||||
|
if (!this.selectionList.length) {
|
||||||
|
this.$message.warning('请选择至少一条数据');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const rows = this.selectionList.filter(item => this.canHcsRepush(item));
|
||||||
|
if (!rows.length) {
|
||||||
|
this.$message.warning('请选择审批通过且未同步成功的变更单');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.$confirm(`确定同步选中的${rows.length}条合同变更到合规系统?`, '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning',
|
||||||
|
}).then(() => {
|
||||||
|
const loading = this.$loading({
|
||||||
|
lock: true,
|
||||||
|
text: '正在推送合规,请稍候…',
|
||||||
|
background: 'rgba(255, 255, 255, 0.6)',
|
||||||
|
});
|
||||||
|
this.hcsRepushingId = 'batch';
|
||||||
|
const contractIds = [...new Set(rows.map(item => item.contractId))];
|
||||||
|
const changeIds = rows.map(item => item.id).join(',');
|
||||||
|
hcsRepushBatch('contract', contractIds)
|
||||||
|
.then(res => {
|
||||||
|
if (res.data?.success === false) {
|
||||||
|
this.$message.error(res.data?.msg || '批量同步失败');
|
||||||
|
return api.markSyncStatus(changeIds, 'failed');
|
||||||
|
}
|
||||||
|
return api.markSyncStatus(changeIds, 'synced').then(() => {
|
||||||
|
this.$message.success(res.data?.data || '批量同步成功');
|
||||||
|
this.onLoad(this.page, this.query);
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch(() => api.markSyncStatus(changeIds, 'failed'))
|
||||||
|
.finally(() => {
|
||||||
|
this.hcsRepushingId = null;
|
||||||
|
loading.close();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
inStatus(row, statusList) {
|
||||||
|
if (!statusList || !statusList.length) return true;
|
||||||
|
return statusList.includes(row.approvalStatus);
|
||||||
|
},
|
||||||
|
canEdit(row) {
|
||||||
|
return (
|
||||||
|
this.hasPermission(`${this.config.permission}_edit`) &&
|
||||||
|
!row.readonly &&
|
||||||
|
this.inStatus(row, this.config.editStatus)
|
||||||
|
);
|
||||||
|
},
|
||||||
|
canDelete(row) {
|
||||||
|
return (
|
||||||
|
this.hasPermission(`${this.config.permission}_delete`) &&
|
||||||
|
!row.readonly &&
|
||||||
|
this.inStatus(row, this.config.deleteStatus)
|
||||||
|
);
|
||||||
|
},
|
||||||
|
canView(row) {
|
||||||
|
return (
|
||||||
|
this.hasPermission(`${this.config.permission}_view`) &&
|
||||||
|
this.inStatus(row, this.config.viewStatus)
|
||||||
|
);
|
||||||
|
},
|
||||||
|
canOperation(operation, row) {
|
||||||
|
if (operation.permission && !this.hasPermission(operation.permission)) return false;
|
||||||
|
if (
|
||||||
|
row.readonly &&
|
||||||
|
['submitApproval', 'withdraw', 'approve', 'reject'].includes(operation.action)
|
||||||
|
) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return this.inStatus(row, operation.status);
|
||||||
|
},
|
||||||
|
customOperations(row) {
|
||||||
|
return (this.config.operations || []).filter(operation => {
|
||||||
|
if (operation.mkOnly && !this.mkEnabled) return false;
|
||||||
|
if (operation.localOnly && this.mkEnabled) return false;
|
||||||
|
return this.canOperation(operation, row);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
openForm(mode, row = {}) {
|
||||||
|
const query = { mode, id: row.id };
|
||||||
|
if (mode === 'edit') query.name = '编辑合同变更';
|
||||||
|
else if (mode === 'view') query.name = '查看合同变更';
|
||||||
|
this.$router.push({ path: contractChangeFormRoute, query });
|
||||||
|
},
|
||||||
|
handleCustomOperation(operation, row) {
|
||||||
|
if (operation.action === 'mkAudit') {
|
||||||
|
this.handleMkAudit(row);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const run = () => {
|
||||||
|
const request = () => this.api[operation.action](row.id);
|
||||||
|
const afterMk =
|
||||||
|
operation.action === 'submitApproval'
|
||||||
|
? submitMkApprovalFlow({
|
||||||
|
bizType: 'contract-change',
|
||||||
|
bizId: row.id,
|
||||||
|
subjectName: row.contractName || '',
|
||||||
|
approvalStatus: row.approvalStatus || '',
|
||||||
|
mkEnabled: this.mkEnabled,
|
||||||
|
}).then(() => request())
|
||||||
|
: request();
|
||||||
|
const loading =
|
||||||
|
operation.action === 'approve'
|
||||||
|
? this.$loading({
|
||||||
|
lock: true,
|
||||||
|
text: '正在推送合规,请稍候…',
|
||||||
|
background: 'rgba(255, 255, 255, 0.6)',
|
||||||
|
})
|
||||||
|
: null;
|
||||||
|
afterMk
|
||||||
|
.then(res => {
|
||||||
|
if (operation.action === 'approve' && res.data?.data === false) {
|
||||||
|
this.$message.warning(res.data?.msg);
|
||||||
|
this.onLoad(this.page, this.query);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (res.data?.success === false) {
|
||||||
|
this.$message.error(res.data?.msg || `${operation.label}失败,请联系管理员`);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.$message.success(`${operation.label}成功`);
|
||||||
|
this.onLoad(this.page, this.query);
|
||||||
|
})
|
||||||
|
.finally(() => loading && loading.close());
|
||||||
|
};
|
||||||
|
this.$confirm(operation.confirm || `确定${operation.label}该${this.config.title}?`, '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning',
|
||||||
|
}).then(() => run());
|
||||||
|
},
|
||||||
|
handleMkAudit(row) {
|
||||||
|
if (!row?.id) {
|
||||||
|
this.$message.warning('变更单ID为空,无法打开审核页');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
getMKApprovalUrl({ bizId: String(row.id) })
|
||||||
|
.then(res => {
|
||||||
|
const url = res?.data?.data;
|
||||||
|
if (!url) {
|
||||||
|
this.$message.error('获取审核跳转地址失败');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
window.open(url, '_blank');
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.$message.error('获取审核跳转地址失败');
|
||||||
|
});
|
||||||
|
},
|
||||||
|
searchReset() {
|
||||||
|
this.query = {};
|
||||||
|
this.onLoad(this.page);
|
||||||
|
},
|
||||||
|
searchChange(params, done) {
|
||||||
|
this.query = params;
|
||||||
|
this.page.currentPage = 1;
|
||||||
|
this.onLoad(this.page, params);
|
||||||
|
done();
|
||||||
|
},
|
||||||
|
selectionChange(list) {
|
||||||
|
this.selectionList = list;
|
||||||
|
},
|
||||||
|
selectionClear() {
|
||||||
|
this.selectionList = [];
|
||||||
|
this.$refs.crud?.toggleSelection?.();
|
||||||
|
},
|
||||||
|
currentChange(currentPage) {
|
||||||
|
this.page.currentPage = currentPage;
|
||||||
|
},
|
||||||
|
sizeChange(pageSize) {
|
||||||
|
this.page.pageSize = pageSize;
|
||||||
|
},
|
||||||
|
refreshChange() {
|
||||||
|
this.onLoad(this.page, this.query);
|
||||||
|
},
|
||||||
|
rowDel(row) {
|
||||||
|
this.$confirm('确定将选择数据删除?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning',
|
||||||
|
}).then(() => {
|
||||||
|
this.api.remove(row.id).then(() => {
|
||||||
|
this.$message.success('删除成功!');
|
||||||
|
this.onLoad(this.page, this.query);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleDelete() {
|
||||||
|
if (!this.selectionList.length) {
|
||||||
|
this.$message.warning('请选择至少一条数据');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.$confirm('确定将选择数据删除?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning',
|
||||||
|
}).then(() => {
|
||||||
|
this.api.remove(this.ids).then(() => {
|
||||||
|
this.$message.success('删除成功!');
|
||||||
|
this.selectionClear();
|
||||||
|
this.onLoad(this.page, this.query);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
onLoad(page, params = {}) {
|
||||||
|
this.loading = true;
|
||||||
|
const values = {
|
||||||
|
...this.query,
|
||||||
|
...params,
|
||||||
|
};
|
||||||
|
this.api
|
||||||
|
.getList(page.currentPage, page.pageSize, values)
|
||||||
|
.then(res => {
|
||||||
|
const data = res.data.data || {};
|
||||||
|
this.page.total = data.total || 0;
|
||||||
|
this.data = data.records || [];
|
||||||
|
this.loading = false;
|
||||||
|
this.selectionClear();
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.contract-change-page {
|
||||||
|
:deep(.avue-crud__menu) {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 8px;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -1,18 +1,32 @@
|
|||||||
<template>
|
<template>
|
||||||
<basic-container class="contract-change-page">
|
<basic-container class="contract-change-page">
|
||||||
<div class="archive-page-form__title">{{ pageTitle }}</div>
|
<div class="archive-page-form__title">{{ pageTitle }}</div>
|
||||||
<el-form ref="formRef" :model="form" :rules="rules" label-position="right" label-width="auto" class="contract-change-form">
|
<el-form
|
||||||
|
ref="formRef"
|
||||||
|
:model="form"
|
||||||
|
:rules="rules"
|
||||||
|
:disabled="pageReadonly"
|
||||||
|
label-position="right"
|
||||||
|
label-width="auto"
|
||||||
|
class="contract-change-form"
|
||||||
|
>
|
||||||
<section class="change-section contract-basic-section">
|
<section class="change-section contract-basic-section">
|
||||||
<div class="dialog-section-title">基本信息</div>
|
<div class="dialog-section-title">基本信息</div>
|
||||||
<div class="contract-basic-section__grid">
|
<div class="contract-basic-section__grid">
|
||||||
<el-form-item label="变更类型" class="contract-basic-section__change-type">
|
<el-form-item label="变更类型" class="contract-basic-section__change-type">
|
||||||
<el-radio-group v-model="form.changeType">
|
<el-radio-group v-model="form.changeType" :disabled="pageReadonly">
|
||||||
<el-radio label="合同信息变更" />
|
<el-radio label="合同信息变更" />
|
||||||
|
<el-radio label="结算规则变更" />
|
||||||
<el-radio label="终止合同" />
|
<el-radio label="终止合同" />
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="签约类型" prop="signType">
|
<el-form-item label="签约类型" prop="signType">
|
||||||
<el-select v-model="form.signType" placeholder="请选择签约类型" clearable>
|
<el-select
|
||||||
|
v-model="form.signType"
|
||||||
|
placeholder="请选择签约类型"
|
||||||
|
clearable
|
||||||
|
:disabled="isSettlementRuleChange"
|
||||||
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in signTypeOptions"
|
v-for="item in signTypeOptions"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
@@ -21,8 +35,14 @@
|
|||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="合同编号">
|
<el-form-item label="合同编号" prop="contractNo">
|
||||||
<el-input v-model="form.contractNo" disabled />
|
<el-input
|
||||||
|
v-model="form.contractNo"
|
||||||
|
maxlength="100"
|
||||||
|
clearable
|
||||||
|
placeholder="请输入合同编号"
|
||||||
|
:disabled="isSettlementRuleChange"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="合同名称" prop="contractName">
|
<el-form-item label="合同名称" prop="contractName">
|
||||||
<el-input
|
<el-input
|
||||||
@@ -30,6 +50,7 @@
|
|||||||
maxlength="100"
|
maxlength="100"
|
||||||
show-word-limit
|
show-word-limit
|
||||||
placeholder="请输入合同名称"
|
placeholder="请输入合同名称"
|
||||||
|
:disabled="isSettlementRuleChange"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="合同类型">
|
<el-form-item label="合同类型">
|
||||||
@@ -80,6 +101,7 @@
|
|||||||
format="YYYY-MM-DD"
|
format="YYYY-MM-DD"
|
||||||
value-format="YYYY-MM-DD"
|
value-format="YYYY-MM-DD"
|
||||||
placeholder="请输入"
|
placeholder="请输入"
|
||||||
|
:disabled="isSettlementRuleChange"
|
||||||
/>
|
/>
|
||||||
<span>至</span>
|
<span>至</span>
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
@@ -88,6 +110,7 @@
|
|||||||
format="YYYY-MM-DD"
|
format="YYYY-MM-DD"
|
||||||
value-format="YYYY-MM-DD"
|
value-format="YYYY-MM-DD"
|
||||||
placeholder="请输入"
|
placeholder="请输入"
|
||||||
|
:disabled="isSettlementRuleChange"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -95,6 +118,7 @@
|
|||||||
<el-input
|
<el-input
|
||||||
v-model="form.paymentDays"
|
v-model="form.paymentDays"
|
||||||
placeholder="请输入"
|
placeholder="请输入"
|
||||||
|
:disabled="isSettlementRuleChange"
|
||||||
@input="value => positiveIntegerInput('paymentDays', value)"
|
@input="value => positiveIntegerInput('paymentDays', value)"
|
||||||
>
|
>
|
||||||
<template #suffix>天</template>
|
<template #suffix>天</template>
|
||||||
@@ -105,22 +129,36 @@
|
|||||||
:model-value="contractAmountDisplay"
|
:model-value="contractAmountDisplay"
|
||||||
placeholder="请输入"
|
placeholder="请输入"
|
||||||
clearable
|
clearable
|
||||||
|
:disabled="isSettlementRuleChange"
|
||||||
@input="handleContractAmountInput"
|
@input="handleContractAmountInput"
|
||||||
@blur="formatContractAmountField"
|
@blur="formatContractAmountField"
|
||||||
@clear="form.contractAmount = null"
|
@clear="form.contractAmount = null"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="是否范本">
|
<el-form-item label="是否范本">
|
||||||
<el-select v-model="form.templateFlag" placeholder="请选择">
|
<el-select
|
||||||
|
v-model="form.templateFlag"
|
||||||
|
placeholder="请选择"
|
||||||
|
:disabled="isSettlementRuleChange"
|
||||||
|
>
|
||||||
<el-option label="否" :value="0" />
|
<el-option label="否" :value="0" />
|
||||||
<el-option label="是" :value="1" />
|
<el-option label="是" :value="1" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="原件合同编号">
|
<el-form-item label="原件合同编号">
|
||||||
<el-input v-model="form.originalContractNo" maxlength="100" placeholder="请输入" />
|
<el-input
|
||||||
|
v-model="form.originalContractNo"
|
||||||
|
maxlength="100"
|
||||||
|
placeholder="请输入"
|
||||||
|
:disabled="isSettlementRuleChange"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="是否电子章">
|
<el-form-item label="是否电子章">
|
||||||
<el-select v-model="form.electronicSealFlag" placeholder="请选择">
|
<el-select
|
||||||
|
v-model="form.electronicSealFlag"
|
||||||
|
placeholder="请选择"
|
||||||
|
:disabled="isSettlementRuleChange"
|
||||||
|
>
|
||||||
<el-option label="否" :value="0" />
|
<el-option label="否" :value="0" />
|
||||||
<el-option label="是" :value="1" />
|
<el-option label="是" :value="1" />
|
||||||
</el-select>
|
</el-select>
|
||||||
@@ -129,13 +167,19 @@
|
|||||||
<el-input
|
<el-input
|
||||||
v-model="form.invoiceCycle"
|
v-model="form.invoiceCycle"
|
||||||
placeholder="请输入"
|
placeholder="请输入"
|
||||||
|
:disabled="isSettlementRuleChange"
|
||||||
@input="value => positiveIntegerInput('invoiceCycle', value)"
|
@input="value => positiveIntegerInput('invoiceCycle', value)"
|
||||||
>
|
>
|
||||||
<template #suffix>天</template>
|
<template #suffix>天</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="结算币种" prop="settlementCurrency">
|
<el-form-item label="结算币种" prop="settlementCurrency">
|
||||||
<el-select v-model="form.settlementCurrency" placeholder="请选择结算币种" clearable>
|
<el-select
|
||||||
|
v-model="form.settlementCurrency"
|
||||||
|
placeholder="请选择结算币种"
|
||||||
|
clearable
|
||||||
|
:disabled="isSettlementRuleChange"
|
||||||
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in settlementCurrencyOptions"
|
v-for="item in settlementCurrencyOptions"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
@@ -145,7 +189,12 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="合同格式">
|
<el-form-item label="合同格式">
|
||||||
<el-select v-model="form.contractFormat" placeholder="请选择合同格式" clearable>
|
<el-select
|
||||||
|
v-model="form.contractFormat"
|
||||||
|
placeholder="请选择合同格式"
|
||||||
|
clearable
|
||||||
|
:disabled="isSettlementRuleChange"
|
||||||
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in contractFormatOptions"
|
v-for="item in contractFormatOptions"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
@@ -158,19 +207,30 @@
|
|||||||
<el-input
|
<el-input
|
||||||
v-model="form.copyCount"
|
v-model="form.copyCount"
|
||||||
placeholder="请输入"
|
placeholder="请输入"
|
||||||
|
:disabled="isSettlementRuleChange"
|
||||||
@input="value => positiveIntegerInput('copyCount', value)"
|
@input="value => positiveIntegerInput('copyCount', value)"
|
||||||
>
|
>
|
||||||
<template #suffix>份</template>
|
<template #suffix>份</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="是否需要加盖法人章">
|
<el-form-item label="是否需要加盖法人章">
|
||||||
<el-select v-model="form.legalSealFlag" placeholder="请选择" clearable>
|
<el-select
|
||||||
|
v-model="form.legalSealFlag"
|
||||||
|
placeholder="请选择"
|
||||||
|
clearable
|
||||||
|
:disabled="isSettlementRuleChange"
|
||||||
|
>
|
||||||
<el-option label="否" :value="0" />
|
<el-option label="否" :value="0" />
|
||||||
<el-option label="是" :value="1" />
|
<el-option label="是" :value="1" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="结算方式">
|
<el-form-item label="结算方式">
|
||||||
<el-select v-model="form.settlementMode" placeholder="请选择结算方式" clearable>
|
<el-select
|
||||||
|
v-model="form.settlementMode"
|
||||||
|
placeholder="请选择结算方式"
|
||||||
|
clearable
|
||||||
|
:disabled="isSettlementRuleChange"
|
||||||
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in settlementModeOptions"
|
v-for="item in settlementModeOptions"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
@@ -191,6 +251,7 @@
|
|||||||
maxlength="1000"
|
maxlength="1000"
|
||||||
show-word-limit
|
show-word-limit
|
||||||
placeholder="请输入合同主要内容"
|
placeholder="请输入合同主要内容"
|
||||||
|
:disabled="isSettlementRuleChange"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="其他事项说明" class="contract-basic-section__remark">
|
<el-form-item label="其他事项说明" class="contract-basic-section__remark">
|
||||||
@@ -201,14 +262,21 @@
|
|||||||
maxlength="200"
|
maxlength="200"
|
||||||
show-word-limit
|
show-word-limit
|
||||||
placeholder="请输入其他事项说明"
|
placeholder="请输入其他事项说明"
|
||||||
|
:disabled="isSettlementRuleChange"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<!-- 风险客商提示:合同已推送合规并留痕高风险/黑名单时展示,变更提交同样要求特批附件 -->
|
||||||
|
<div v-if="riskTipText" class="contract-manage-form__risk-tip">
|
||||||
|
<div class="contract-manage-form__risk-tip-title">风险客商提示:</div>
|
||||||
|
<div class="contract-manage-form__risk-tip-content">{{ riskTipText }}</div>
|
||||||
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<contract-attachment-section
|
<contract-attachment-section
|
||||||
title="用印材料"
|
title="用印材料"
|
||||||
description
|
description
|
||||||
attachment-type
|
attachment-type
|
||||||
|
:readonly="isSettlementRuleChange"
|
||||||
:attachment-location-options="changeAttachmentLocationOptions"
|
:attachment-location-options="changeAttachmentLocationOptions"
|
||||||
:rows="contractFileRows"
|
:rows="contractFileRows"
|
||||||
:preview="previewAttachment"
|
:preview="previewAttachment"
|
||||||
@@ -217,9 +285,39 @@
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<section class="change-section">
|
<section class="change-section">
|
||||||
<div class="section-head"><div class="dialog-section-title">计费信息</div><el-button type="primary" plain @click="addPlan">添加</el-button></div>
|
<div class="section-head">
|
||||||
<el-radio-group v-model="feeGenerationMode"><el-radio label="system">系统生成</el-radio><el-radio label="manual">账单导入生成</el-radio></el-radio-group>
|
<div class="dialog-section-title">计费信息</div>
|
||||||
<el-table :data="plans" border class="change-table"><el-table-column type="index" label="序号" width="70" /><el-table-column prop="planName" label="方案名称" min-width="220" /><el-table-column label="默认方案" min-width="120"><template #default="{ row }">{{ row.defaultPlan ? '是' : '否' }}</template></el-table-column><el-table-column prop="remark" label="备注" min-width="260" /><el-table-column label="操作" width="180"><template #default="{ row, $index }"><el-link type="primary" @click="editPlan(row, $index)">编辑</el-link><el-link type="danger" @click="plans.splice($index, 1)">删除</el-link></template></el-table-column></el-table>
|
<el-button
|
||||||
|
v-if="!pageReadonly && feeGenerationMode !== 'manual'"
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
@click="addPlan"
|
||||||
|
>添加</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<el-radio-group v-model="feeGenerationMode"
|
||||||
|
><el-radio label="system">系统生成</el-radio
|
||||||
|
><el-radio label="manual">账单导入生成</el-radio></el-radio-group
|
||||||
|
>
|
||||||
|
<el-table :data="plans" border class="change-table"
|
||||||
|
><el-table-column type="index" label="序号" width="70" /><el-table-column
|
||||||
|
prop="planName"
|
||||||
|
label="方案名称"
|
||||||
|
min-width="220"
|
||||||
|
/><el-table-column label="默认方案" min-width="120"
|
||||||
|
><template #default="{ row }">{{
|
||||||
|
row.defaultPlan ? '是' : '否'
|
||||||
|
}}</template></el-table-column
|
||||||
|
><el-table-column prop="remark" label="备注" min-width="260" /><el-table-column
|
||||||
|
v-if="!pageReadonly"
|
||||||
|
label="操作"
|
||||||
|
width="180"
|
||||||
|
><template #default="{ row, $index }"
|
||||||
|
><el-link type="primary" @click="editPlan(row, $index)">编辑</el-link
|
||||||
|
><el-link type="danger" @click="plans.splice($index, 1)">删除</el-link></template
|
||||||
|
></el-table-column
|
||||||
|
></el-table
|
||||||
|
>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section class="change-section">
|
<section class="change-section">
|
||||||
@@ -238,19 +336,106 @@
|
|||||||
<el-radio :label="0">关闭</el-radio>
|
<el-radio :label="0">关闭</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</div>
|
</div>
|
||||||
<el-form v-if="settlementRule.autoGenerate === 1" :model="settlementRule" label-position="right" label-width="auto" class="settlement-form">
|
<el-form
|
||||||
<el-form-item label="账单起始日" required><el-date-picker v-model="settlementRule.billStartDate" type="date" placeholder="请选择账单起始日" format="YYYY-MM-DD" value-format="YYYY-MM-DD" /></el-form-item>
|
v-if="settlementRule.autoGenerate === 1"
|
||||||
<el-form-item label="结算类型" required><el-select v-model="settlementRule.settlementType" placeholder="请选择结算类型" @change="handleSettlementTypeChange"><el-option v-for="item in settlementTypeOptions" :key="item" :label="item" :value="item" /></el-select></el-form-item>
|
:model="settlementRule"
|
||||||
<el-form-item v-if="showSettlementBillCycleType" label="结算周期" required><el-select v-model="settlementRule.billCycleType" placeholder="请选择结算周期" @change="handleCycleTypeChange"><el-option v-for="item in billCycleTypeOptions" :key="item" :label="item" :value="item" /></el-select></el-form-item>
|
label-position="right"
|
||||||
<el-form-item v-if="showSettlementBillCutoffDay" label="账单截单日" required><el-select v-model="settlementRule.billCutoffDay" placeholder="请选择账单截单日"><el-option v-for="item in billCutoffDayOptions" :key="item.value" :label="item.label" :value="item.value" /></el-select></el-form-item>
|
label-width="auto"
|
||||||
<el-form-item v-if="showSettlementCycleDays" label="周期天数" required><el-select v-model="settlementRule.cycleDays" placeholder="请选择周期天数"><el-option v-for="item in cycleDayOptions" :key="item.value" :label="item.label" :value="item.value" /></el-select></el-form-item>
|
class="settlement-form"
|
||||||
|
>
|
||||||
|
<el-form-item label="账单起始日" required
|
||||||
|
><el-date-picker
|
||||||
|
v-model="settlementRule.billStartDate"
|
||||||
|
type="date"
|
||||||
|
placeholder="请选择账单起始日"
|
||||||
|
format="YYYY-MM-DD"
|
||||||
|
value-format="YYYY-MM-DD"
|
||||||
|
/></el-form-item>
|
||||||
|
<el-form-item label="结算类型" required
|
||||||
|
><el-select
|
||||||
|
v-model="settlementRule.settlementType"
|
||||||
|
placeholder="请选择结算类型"
|
||||||
|
@change="handleSettlementTypeChange"
|
||||||
|
><el-option
|
||||||
|
v-for="item in settlementTypeOptions"
|
||||||
|
:key="item"
|
||||||
|
:label="item"
|
||||||
|
:value="item"
|
||||||
|
/></el-select></el-form-item>
|
||||||
|
<el-form-item v-if="showSettlementBillCycleType" label="结算周期" required
|
||||||
|
><el-select
|
||||||
|
v-model="settlementRule.billCycleType"
|
||||||
|
placeholder="请选择结算周期"
|
||||||
|
@change="handleCycleTypeChange"
|
||||||
|
><el-option
|
||||||
|
v-for="item in billCycleTypeOptions"
|
||||||
|
:key="item"
|
||||||
|
:label="item"
|
||||||
|
:value="item"
|
||||||
|
/></el-select></el-form-item>
|
||||||
|
<el-form-item v-if="showSettlementBillCutoffDay" label="账单截单日" required
|
||||||
|
><el-select v-model="settlementRule.billCutoffDay" placeholder="请选择账单截单日"
|
||||||
|
><el-option
|
||||||
|
v-for="item in billCutoffDayOptions"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/></el-select></el-form-item>
|
||||||
|
<el-form-item v-if="showSettlementCycleDays" label="周期天数" required
|
||||||
|
><el-select v-model="settlementRule.cycleDays" placeholder="请选择周期天数"
|
||||||
|
><el-option
|
||||||
|
v-for="item in cycleDayOptions"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/></el-select></el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-table v-if="settlementRule.autoGenerate === 1 && showSettlementCustomPeriods" :data="settlementRule.customPeriods || []" border class="change-table custom-periods-table">
|
<el-table
|
||||||
|
v-if="settlementRule.autoGenerate === 1 && showSettlementCustomPeriods"
|
||||||
|
:data="settlementRule.customPeriods || []"
|
||||||
|
border
|
||||||
|
class="change-table custom-periods-table"
|
||||||
|
>
|
||||||
<el-table-column type="index" label="序号" width="70" />
|
<el-table-column type="index" label="序号" width="70" />
|
||||||
<el-table-column label="运单区间-开始日" min-width="180"><template #default="{ row, $index }"><el-select :model-value="row.startDay" placeholder="请选择" clearable @update:model-value="value => handleCustomPeriodStartDayChange($index, value)"><el-option v-for="item in billCutoffDayOptions" :key="`start-${item.value}`" :label="item.label" :value="item.value" /></el-select></template></el-table-column>
|
<el-table-column label="运单区间-开始日" min-width="180"
|
||||||
<el-table-column label="运单区间-结束日" min-width="200"><template #default="{ row, $index }"><el-select :model-value="row.endDay" placeholder="请选择" clearable @update:model-value="value => handleCustomPeriodEndDayChange($index, value)"><el-option v-for="item in customPeriodEndDayOptions(row)" :key="item.value" :label="item.label" :value="item.value" /></el-select></template></el-table-column>
|
><template #default="{ row, $index }"
|
||||||
<el-table-column label="操作" width="100"><template #default="{ $index }"><el-link v-if="$index === 0" type="primary" @click="addCustomPeriodRow">添加</el-link><el-link v-else type="danger" @click="removeCustomPeriodRow($index)">删除</el-link></template></el-table-column>
|
><el-select
|
||||||
<template #empty><el-link type="primary" @click="addCustomPeriodRow">添加</el-link></template>
|
:model-value="row.startDay"
|
||||||
|
placeholder="请选择"
|
||||||
|
clearable
|
||||||
|
@update:model-value="value => handleCustomPeriodStartDayChange($index, value)"
|
||||||
|
><el-option
|
||||||
|
v-for="item in billCutoffDayOptions"
|
||||||
|
:key="`start-${item.value}`"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/></el-select></template
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column label="运单区间-结束日" min-width="200"
|
||||||
|
><template #default="{ row, $index }"
|
||||||
|
><el-select
|
||||||
|
:model-value="row.endDay"
|
||||||
|
placeholder="请选择"
|
||||||
|
clearable
|
||||||
|
@update:model-value="value => handleCustomPeriodEndDayChange($index, value)"
|
||||||
|
><el-option
|
||||||
|
v-for="item in customPeriodEndDayOptions(row)"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/></el-select></template
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column v-if="!pageReadonly" label="操作" width="100"
|
||||||
|
><template #default="{ $index }"
|
||||||
|
><el-link v-if="$index === 0" type="primary" @click="addCustomPeriodRow">添加</el-link
|
||||||
|
><el-link v-else type="danger" @click="removeCustomPeriodRow($index)"
|
||||||
|
>删除</el-link
|
||||||
|
></template
|
||||||
|
></el-table-column
|
||||||
|
>
|
||||||
|
<template #empty
|
||||||
|
><el-link v-if="!pageReadonly" type="primary" @click="addCustomPeriodRow">添加</el-link></template
|
||||||
|
>
|
||||||
</el-table>
|
</el-table>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
@@ -258,17 +443,48 @@
|
|||||||
<div class="dialog-section-title">
|
<div class="dialog-section-title">
|
||||||
付款比例设置
|
付款比例设置
|
||||||
<el-tooltip content="非必填;配置付款比例时,合计必须等于100%。" placement="top">
|
<el-tooltip content="非必填;配置付款比例时,合计必须等于100%。" placement="top">
|
||||||
<el-icon style="margin-left: 4px; color: #909399; cursor: pointer"><el-icon-question-filled /></el-icon>
|
<el-icon style="margin-left: 4px; color: #909399; cursor: pointer"
|
||||||
|
><el-icon-question-filled
|
||||||
|
/></el-icon>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</div>
|
</div>
|
||||||
<el-table :data="paymentRatioRows" border class="change-table">
|
<el-table :data="paymentRatioRows" border class="change-table">
|
||||||
<el-table-column type="index" label="序号" width="70" />
|
<el-table-column type="index" label="序号" width="70" />
|
||||||
<el-table-column prop="paymentTerm" label="付款笔数" min-width="180" />
|
<el-table-column prop="paymentTerm" label="付款笔数" min-width="180" />
|
||||||
<el-table-column label="付款比例上限(%)" min-width="220"><template #default="{ row }"><el-input-number v-model="row.ratioLimit" :min="0" :max="100" :precision="2" controls-position="right" /></template></el-table-column>
|
<el-table-column label="付款比例上限(%)" min-width="220"
|
||||||
<el-table-column label="备注" min-width="220"><template #default="{ row }"><el-input v-model="row.remark" maxlength="200" /></template></el-table-column>
|
><template #default="{ row }"
|
||||||
<el-table-column label="操作" width="100"><template #default="{ $index }"><el-link type="danger" @click="paymentRatioRows.splice($index, 1)">删除</el-link></template></el-table-column>
|
><el-input-number
|
||||||
|
v-model="row.ratioLimit"
|
||||||
|
:min="0"
|
||||||
|
:max="100"
|
||||||
|
:precision="2"
|
||||||
|
controls-position="right"
|
||||||
|
:disabled="isSettlementRuleChange"
|
||||||
|
/></template
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column label="备注" min-width="220"
|
||||||
|
><template #default="{ row }"
|
||||||
|
><el-input
|
||||||
|
v-model="row.remark"
|
||||||
|
maxlength="200"
|
||||||
|
:disabled="isSettlementRuleChange"
|
||||||
|
/></template
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column v-if="!pageReadonly && !isSettlementRuleChange" label="操作" width="100"
|
||||||
|
><template #default="{ $index }"
|
||||||
|
><el-link type="danger" @click="paymentRatioRows.splice($index, 1)"
|
||||||
|
>删除</el-link
|
||||||
|
></template
|
||||||
|
></el-table-column
|
||||||
|
>
|
||||||
</el-table>
|
</el-table>
|
||||||
<el-button type="primary" plain @click="addPaymentRatioRow">添加</el-button>
|
<el-button
|
||||||
|
v-if="!pageReadonly && !isSettlementRuleChange"
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
@click="addPaymentRatioRow"
|
||||||
|
>添加</el-button
|
||||||
|
>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<billing-plan-editor
|
<billing-plan-editor
|
||||||
@@ -285,6 +501,7 @@
|
|||||||
attachment-type
|
attachment-type
|
||||||
attachment-location="附件(佐证材料等)"
|
attachment-location="附件(佐证材料等)"
|
||||||
attachment-type-dict-code="contract_supporting_attachment_type"
|
attachment-type-dict-code="contract_supporting_attachment_type"
|
||||||
|
:readonly="isSettlementRuleChange"
|
||||||
:attachment-location-options="changeAttachmentLocationOptions"
|
:attachment-location-options="changeAttachmentLocationOptions"
|
||||||
:rows="attachments"
|
:rows="attachments"
|
||||||
:preview="previewAttachment"
|
:preview="previewAttachment"
|
||||||
@@ -317,8 +534,9 @@
|
|||||||
@update:rows="changeMaterials = $event"
|
@update:rows="changeMaterials = $event"
|
||||||
@upload-to-location="handleAttachmentUploadToLocation"
|
@upload-to-location="handleAttachmentUploadToLocation"
|
||||||
/>
|
/>
|
||||||
<div class="page-footer">
|
<div v-if="!pageReadonly" class="page-footer">
|
||||||
<el-button @click="$router.back()">取消</el-button>
|
<el-button @click="goBack">取消</el-button>
|
||||||
|
<el-button v-if="isContractChangeModule" @click="saveDraft">保存草稿</el-button>
|
||||||
<el-button type="primary" @click="submit">提交</el-button>
|
<el-button type="primary" @click="submit">提交</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-form>
|
</el-form>
|
||||||
@@ -331,7 +549,9 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import * as api from '@/api/business/contract-manage';
|
import * as contractApi from '@/api/business/contract-manage';
|
||||||
|
import * as changeApi from '@/api/business/contract-change';
|
||||||
|
import { getMkPublicDetail } from '@/api/mk-process';
|
||||||
import { loadMkEnabled, submitMkApprovalFlow } from '@/utils/mk-approval';
|
import { loadMkEnabled, submitMkApprovalFlow } from '@/utils/mk-approval';
|
||||||
import BillingPlanEditor from './components/billing-plan-editor.vue';
|
import BillingPlanEditor from './components/billing-plan-editor.vue';
|
||||||
import ContractAttachmentSection, {
|
import ContractAttachmentSection, {
|
||||||
@@ -369,6 +589,8 @@ const defaultContractFormatOptions = [
|
|||||||
{ label: '电子合同', value: '电子合同' },
|
{ label: '电子合同', value: '电子合同' },
|
||||||
{ label: '纸质合同', value: '纸质合同' },
|
{ label: '纸质合同', value: '纸质合同' },
|
||||||
];
|
];
|
||||||
|
const contractChangeListRoute = '/business/contract-change';
|
||||||
|
const contractChangeListRefreshKey = 'contract-change-list-refresh';
|
||||||
const normalizeOptionalPositiveInteger = value => {
|
const normalizeOptionalPositiveInteger = value => {
|
||||||
if (value === undefined || value === null || value === '') return null;
|
if (value === undefined || value === null || value === '') return null;
|
||||||
const number = Number(value);
|
const number = Number(value);
|
||||||
@@ -440,7 +662,7 @@ export default {
|
|||||||
},
|
},
|
||||||
preSettlementConfig: {},
|
preSettlementConfig: {},
|
||||||
formalSettlementConfig: {},
|
formalSettlementConfig: {},
|
||||||
settlementTypeOptions: ['月结', '日结', '周结', '半月结', '固定天数周期结算'],
|
settlementTypeOptions: ['月结', '日结', '周结', '固定天数周期结算'],
|
||||||
billCycleTypeOptions: ['固定截单日', '自然月', '自定义多周期'],
|
billCycleTypeOptions: ['固定截单日', '自然月', '自定义多周期'],
|
||||||
billCutoffDayOptions: Array.from({ length: 31 }, (_, index) => ({
|
billCutoffDayOptions: Array.from({ length: 31 }, (_, index) => ({
|
||||||
label: `${index + 1}日`,
|
label: `${index + 1}日`,
|
||||||
@@ -465,6 +687,24 @@ export default {
|
|||||||
'按数量',
|
'按数量',
|
||||||
],
|
],
|
||||||
rules: {
|
rules: {
|
||||||
|
contractNo: [
|
||||||
|
{
|
||||||
|
validator: (rule, value, callback) => {
|
||||||
|
if (this.isSettlementRuleChange) {
|
||||||
|
return callback();
|
||||||
|
}
|
||||||
|
const contractNo = String(value || '').trim();
|
||||||
|
if (!contractNo) {
|
||||||
|
return callback(new Error('请输入合同编号'));
|
||||||
|
}
|
||||||
|
if (contractNo.length > 100) {
|
||||||
|
return callback(new Error('合同编号不能超过100个字符'));
|
||||||
|
}
|
||||||
|
callback();
|
||||||
|
},
|
||||||
|
trigger: 'blur',
|
||||||
|
},
|
||||||
|
],
|
||||||
contractName: [{ required: true, message: '请输入合同名称', trigger: 'blur' }],
|
contractName: [{ required: true, message: '请输入合同名称', trigger: 'blur' }],
|
||||||
contractAmount: [
|
contractAmount: [
|
||||||
{ required: true, message: '请输入合同金额', trigger: 'blur' },
|
{ required: true, message: '请输入合同金额', trigger: 'blur' },
|
||||||
@@ -487,9 +727,39 @@ export default {
|
|||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
pageTitle() {
|
pageTitle() {
|
||||||
|
if (this.pageReadonly) return this.$route.query.name || '查看合同变更';
|
||||||
return this.$route.query.name || '合同变更';
|
return this.$route.query.name || '合同变更';
|
||||||
},
|
},
|
||||||
|
isContractChangeModule() {
|
||||||
|
return (
|
||||||
|
this.$route.path === '/business/contract-change/form' ||
|
||||||
|
this.$route.path === '/business/contract-change/public-view'
|
||||||
|
);
|
||||||
|
},
|
||||||
|
isPublicViewPage() {
|
||||||
|
return this.$route.path === '/business/contract-change/public-view';
|
||||||
|
},
|
||||||
|
pageReadonly() {
|
||||||
|
return this.isPublicViewPage || this.$route.query.mode === 'view';
|
||||||
|
},
|
||||||
|
// 高风险/黑名单客商提示:按合同推送合规留痕 hcs_risk_level/hcs_black_status 判定(与合同详情口径一致)
|
||||||
|
riskTipText() {
|
||||||
|
const riskLevel = String(this.form.hcsRiskLevel || '').trim();
|
||||||
|
const blacklist = String(this.form.hcsBlackStatus || '').toLowerCase() === 'yes';
|
||||||
|
if (riskLevel !== '2' && !blacklist) return '';
|
||||||
|
const parties = [this.form.partyA, this.form.partyB]
|
||||||
|
.map(name => String(name || '').trim())
|
||||||
|
.filter(Boolean)
|
||||||
|
.join('、');
|
||||||
|
return `【${parties || '相对方'}】:被列入外部黑名单;涉贪污受贿裁判相关提及方(3年以上及其他);被执行人信息;买卖合同纠纷;劳动纠纷;重大纠纷。提交变更前须上传「特批附件」类型附件`;
|
||||||
|
},
|
||||||
|
isSettlementRuleChange() {
|
||||||
|
return this.form.changeType === '结算规则变更';
|
||||||
|
},
|
||||||
changeAttachmentLocationOptions() {
|
changeAttachmentLocationOptions() {
|
||||||
|
if (this.isSettlementRuleChange) {
|
||||||
|
return ['变更材料'];
|
||||||
|
}
|
||||||
return ['用印材料', '附件(佐证材料等)', '变更材料'];
|
return ['用印材料', '附件(佐证材料等)', '变更材料'];
|
||||||
},
|
},
|
||||||
contractAmountDisplay() {
|
contractAmountDisplay() {
|
||||||
@@ -590,13 +860,25 @@ export default {
|
|||||||
async load() {
|
async load() {
|
||||||
const id = this.$route.query.id;
|
const id = this.$route.query.id;
|
||||||
if (!id) return;
|
if (!id) return;
|
||||||
const res = await api.getDetail(id);
|
let data = {};
|
||||||
const data = res.data?.data || res.data || {};
|
if (this.isPublicViewPage) {
|
||||||
|
const res = await getMkPublicDetail('contract-change', id);
|
||||||
|
data = res.data?.data || res.data || {};
|
||||||
|
} else if (this.isContractChangeModule) {
|
||||||
|
const res = await changeApi.getDetail(id);
|
||||||
|
data = res.data?.data || res.data || {};
|
||||||
|
} else {
|
||||||
|
const res = await contractApi.getDetail(id);
|
||||||
|
data = res.data?.data || res.data || {};
|
||||||
|
}
|
||||||
|
const isChangeRecord = this.isContractChangeModule || this.isPublicViewPage;
|
||||||
this.form = {
|
this.form = {
|
||||||
...data,
|
...data,
|
||||||
changeContent: '',
|
// 独立变更单保留 contractId;旧路由以合同 id 作为主键
|
||||||
changeReason: '',
|
contractId: data.contractId || (isChangeRecord ? data.contractId : data.id),
|
||||||
changeAttachmentsJson: '',
|
changeContent: isChangeRecord ? data.changeContent || '' : '',
|
||||||
|
changeReason: isChangeRecord ? data.changeReason || '' : '',
|
||||||
|
changeAttachmentsJson: data.changeAttachmentsJson || '',
|
||||||
copyCount: normalizeOptionalPositiveInteger(data.copyCount),
|
copyCount: normalizeOptionalPositiveInteger(data.copyCount),
|
||||||
invoiceCycle: normalizeOptionalPositiveInteger(data.invoiceCycle),
|
invoiceCycle: normalizeOptionalPositiveInteger(data.invoiceCycle),
|
||||||
paymentDays: normalizeOptionalPositiveInteger(data.paymentDays),
|
paymentDays: normalizeOptionalPositiveInteger(data.paymentDays),
|
||||||
@@ -604,14 +886,14 @@ export default {
|
|||||||
templateFlag: data.templateFlag ?? 0,
|
templateFlag: data.templateFlag ?? 0,
|
||||||
electronicSealFlag: data.electronicSealFlag ?? 0,
|
electronicSealFlag: data.electronicSealFlag ?? 0,
|
||||||
archiveStatus: data.archiveStatus || '未归档',
|
archiveStatus: data.archiveStatus || '未归档',
|
||||||
changeType: '合同信息变更',
|
changeType: data.changeType || '合同信息变更',
|
||||||
};
|
};
|
||||||
this.changeMaterials = [];
|
this.changeMaterials = this.parse(data.changeAttachmentsJson);
|
||||||
this.period = data.startDate && data.endDate ? [data.startDate, data.endDate] : [];
|
this.period = data.startDate && data.endDate ? [data.startDate, data.endDate] : [];
|
||||||
this.plans = this.parse(data.billingPlanJson);
|
this.plans = this.parse(data.billingPlanJson);
|
||||||
this.attachments = this.mergeChangeAttachments(
|
this.attachments = this.mergeChangeAttachments(
|
||||||
this.parse(data.attachmentsJson),
|
this.parse(data.attachmentsJson),
|
||||||
this.parse(data.changeAttachmentsJson)
|
isChangeRecord ? [] : this.parse(data.changeAttachmentsJson)
|
||||||
);
|
);
|
||||||
this.contractFileRows = normalizeContractFileRows(this.parse(data.contractFileJson));
|
this.contractFileRows = normalizeContractFileRows(this.parse(data.contractFileJson));
|
||||||
const rules = this.parseObject(data.settlementRuleJson);
|
const rules = this.parseObject(data.settlementRuleJson);
|
||||||
@@ -653,6 +935,70 @@ export default {
|
|||||||
data.feeGenerationMode || (Number(data.billingEnabled) === 0 ? 'manual' : 'system');
|
data.feeGenerationMode || (Number(data.billingEnabled) === 0 ? 'manual' : 'system');
|
||||||
this.paymentRatioRows = this.parse(data.paymentRatioJson);
|
this.paymentRatioRows = this.parse(data.paymentRatioJson);
|
||||||
},
|
},
|
||||||
|
goBack() {
|
||||||
|
if (this.isContractChangeModule) {
|
||||||
|
this.$router.push(contractChangeListRoute);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.$router.back();
|
||||||
|
},
|
||||||
|
buildChangePayload() {
|
||||||
|
if (this.settlementConfigTab === 'pre') this.preSettlementConfig = { ...this.settlementRule };
|
||||||
|
else this.formalSettlementConfig = { ...this.settlementRule };
|
||||||
|
const settlementRule = {
|
||||||
|
preSettlementConfig: this.preSettlementConfig,
|
||||||
|
formalSettlementConfig: this.formalSettlementConfig,
|
||||||
|
};
|
||||||
|
if (this.isSettlementRuleChange) {
|
||||||
|
return {
|
||||||
|
id: this.form.id,
|
||||||
|
contractId: this.form.contractId,
|
||||||
|
changeType: this.form.changeType,
|
||||||
|
changeContent: this.form.changeContent,
|
||||||
|
changeReason: this.form.changeReason,
|
||||||
|
feeGenerationMode: this.feeGenerationMode,
|
||||||
|
billingEnabled: this.feeGenerationMode === 'system' ? 1 : 0,
|
||||||
|
billingPlanJson: JSON.stringify(this.plans),
|
||||||
|
settlementRuleJson: JSON.stringify(settlementRule),
|
||||||
|
preSettlementConfigJson: JSON.stringify(this.preSettlementConfig),
|
||||||
|
formalSettlementConfigJson: JSON.stringify(this.formalSettlementConfig),
|
||||||
|
changeAttachmentsJson: JSON.stringify(this.changeMaterials),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
...this.form,
|
||||||
|
contractId: this.form.contractId,
|
||||||
|
changeType: this.form.changeType || '合同信息变更',
|
||||||
|
settlementCurrency: String(this.form.settlementCurrency || '').trim() || 'RMB',
|
||||||
|
copyCount: normalizeOptionalPositiveInteger(this.form.copyCount),
|
||||||
|
invoiceCycle: normalizeOptionalPositiveInteger(this.form.invoiceCycle),
|
||||||
|
paymentDays: normalizeOptionalPositiveInteger(this.form.paymentDays),
|
||||||
|
contractAmount: normalizeOptionalAmount(this.form.contractAmount),
|
||||||
|
startDate: this.period[0],
|
||||||
|
endDate: this.period[1],
|
||||||
|
feeGenerationMode: this.feeGenerationMode,
|
||||||
|
billingEnabled: this.feeGenerationMode === 'system' ? 1 : 0,
|
||||||
|
billingPlanJson: JSON.stringify(this.plans),
|
||||||
|
settlementRuleJson: JSON.stringify(settlementRule),
|
||||||
|
preSettlementConfigJson: JSON.stringify(this.preSettlementConfig),
|
||||||
|
formalSettlementConfigJson: JSON.stringify(this.formalSettlementConfig),
|
||||||
|
paymentRatioJson: JSON.stringify(this.paymentRatioRows),
|
||||||
|
contractFileJson: JSON.stringify(this.contractFileRows),
|
||||||
|
attachmentsJson: JSON.stringify(this.attachments),
|
||||||
|
changeContent: this.form.changeContent,
|
||||||
|
changeReason: this.form.changeReason,
|
||||||
|
changeAttachmentsJson: JSON.stringify(this.changeMaterials),
|
||||||
|
};
|
||||||
|
},
|
||||||
|
async saveDraft() {
|
||||||
|
if (this.form.changeType === '终止合同') {
|
||||||
|
this.$message.warning('终止合同无需保存草稿,请直接提交');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const payload = this.buildChangePayload();
|
||||||
|
await changeApi.saveDraft(payload);
|
||||||
|
this.$message.success('草稿已保存');
|
||||||
|
},
|
||||||
parse(value) {
|
parse(value) {
|
||||||
try {
|
try {
|
||||||
const result = JSON.parse(value || '[]');
|
const result = JSON.parse(value || '[]');
|
||||||
@@ -715,6 +1061,12 @@ export default {
|
|||||||
previewAttachment(row, rows = this.attachments) { const url = this.attachmentUrl(row); if (!url) { this.$message.warning('附件地址为空,无法预览'); return; } if (this.isAttachmentImage(row)) { this.imagePreviewUrls = (rows || []).filter(item => this.isAttachmentImage(item) && this.attachmentUrl(item)).map(item => this.attachmentUrl(item)); this.imagePreviewIndex = Math.max(this.imagePreviewUrls.indexOf(url), 0); this.imagePreviewVisible = true; return; } this.previewFile = { name: this.attachmentName(row), url, mimeType: row.mimeType || row.contentType || '' }; this.documentPreviewVisible = true; },
|
previewAttachment(row, rows = this.attachments) { const url = this.attachmentUrl(row); if (!url) { this.$message.warning('附件地址为空,无法预览'); return; } if (this.isAttachmentImage(row)) { this.imagePreviewUrls = (rows || []).filter(item => this.isAttachmentImage(item) && this.attachmentUrl(item)).map(item => this.attachmentUrl(item)); this.imagePreviewIndex = Math.max(this.imagePreviewUrls.indexOf(url), 0); this.imagePreviewVisible = true; return; } this.previewFile = { name: this.attachmentName(row), url, mimeType: row.mimeType || row.contentType || '' }; this.documentPreviewVisible = true; },
|
||||||
handleAttachmentUploadToLocation({ location, rows = [] }) {
|
handleAttachmentUploadToLocation({ location, rows = [] }) {
|
||||||
if (!rows.length) return;
|
if (!rows.length) return;
|
||||||
|
if (this.isSettlementRuleChange) {
|
||||||
|
if (location === '变更材料') {
|
||||||
|
this.changeMaterials = [...(this.changeMaterials || []), ...rows];
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (isContractSealMaterialLocation(location)) {
|
if (isContractSealMaterialLocation(location)) {
|
||||||
this.contractFileRows = [...(this.contractFileRows || []), ...rows];
|
this.contractFileRows = [...(this.contractFileRows || []), ...rows];
|
||||||
return;
|
return;
|
||||||
@@ -738,7 +1090,66 @@ export default {
|
|||||||
removeCustomPeriodRow(index) { if (index <= 0) return; const periods = [...(this.settlementRule.customPeriods || [])]; periods.splice(index, 1); this.settlementRule.customPeriods = normalizeCustomPeriods(periods); },
|
removeCustomPeriodRow(index) { if (index <= 0) return; const periods = [...(this.settlementRule.customPeriods || [])]; periods.splice(index, 1); this.settlementRule.customPeriods = normalizeCustomPeriods(periods); },
|
||||||
validateCustomPeriods(periods = [], label) { const rows = normalizeCustomPeriods(periods); if (!rows.length) { this.$message.warning(`${label}:请至少配置一段自定义周期`); return false; } for (let index = 0; index < rows.length; index += 1) { const row = rows[index]; const startDay = Number(row.startDay); const endDay = Number(row.endDay); if (!Number.isFinite(startDay) || startDay < 1 || startDay > 31) { this.$message.warning(`${label}:请选择第${index + 1}行运单区间开始日`); return false; } if (!Number.isFinite(endDay) || endDay < 1 || endDay > 31) { this.$message.warning(`${label}:请选择第${index + 1}行运单区间结束日`); return false; } if (endDay < startDay) { this.$message.warning(`${label}:第${index + 1}行结束日不能早于开始日`); return false; } if (index > 0 && startDay !== Number(rows[index - 1].endDay) + 1) { this.$message.warning(`${label}:自定义多周期区间必须连续,不允许重叠或存在日期缺口`); return false; } } return true; },
|
validateCustomPeriods(periods = [], label) { const rows = normalizeCustomPeriods(periods); if (!rows.length) { this.$message.warning(`${label}:请至少配置一段自定义周期`); return false; } for (let index = 0; index < rows.length; index += 1) { const row = rows[index]; const startDay = Number(row.startDay); const endDay = Number(row.endDay); if (!Number.isFinite(startDay) || startDay < 1 || startDay > 31) { this.$message.warning(`${label}:请选择第${index + 1}行运单区间开始日`); return false; } if (!Number.isFinite(endDay) || endDay < 1 || endDay > 31) { this.$message.warning(`${label}:请选择第${index + 1}行运单区间结束日`); return false; } if (endDay < startDay) { this.$message.warning(`${label}:第${index + 1}行结束日不能早于开始日`); return false; } if (index > 0 && startDay !== Number(rows[index - 1].endDay) + 1) { this.$message.warning(`${label}:自定义多周期区间必须连续,不允许重叠或存在日期缺口`); return false; } } return true; },
|
||||||
validateSettlementRule(rule, label) { if (Number(rule.autoGenerate) !== 1) return true; if (!rule.billStartDate || !rule.settlementType) { this.$message.warning(`${label}:请完整填写账单起始日和结算类型`); return false; } if (rule.settlementType === '月结' && !rule.billCycleType) { this.$message.warning(`${label}:请选择结算周期`); return false; } if (rule.settlementType === '月结' && rule.billCycleType === '固定截单日' && !rule.billCutoffDay) { this.$message.warning(`${label}:请选择账单截单日`); return false; } if (rule.settlementType === '月结' && rule.billCycleType === '自定义多周期') return this.validateCustomPeriods(rule.customPeriods, label); if (rule.settlementType === '固定天数周期结算' && !rule.cycleDays) { this.$message.warning(`${label}:请选择周期天数`); return false; } return true; },
|
validateSettlementRule(rule, label) { if (Number(rule.autoGenerate) !== 1) return true; if (!rule.billStartDate || !rule.settlementType) { this.$message.warning(`${label}:请完整填写账单起始日和结算类型`); return false; } if (rule.settlementType === '月结' && !rule.billCycleType) { this.$message.warning(`${label}:请选择结算周期`); return false; } if (rule.settlementType === '月结' && rule.billCycleType === '固定截单日' && !rule.billCutoffDay) { this.$message.warning(`${label}:请选择账单截单日`); return false; } if (rule.settlementType === '月结' && rule.billCycleType === '自定义多周期') return this.validateCustomPeriods(rule.customPeriods, label); if (rule.settlementType === '固定天数周期结算' && !rule.cycleDays) { this.$message.warning(`${label}:请选择周期天数`); return false; } return true; },
|
||||||
async submit() { await this.$refs.formRef.validate(); const total = this.paymentRatioRows.reduce((sum, row) => sum + Number(row.ratioLimit || 0), 0); if (this.paymentRatioRows.length && Math.abs(total - 100) > 0.0001) { this.$message.warning('付款比例上限合计必须等于100%'); return; } if (this.settlementConfigTab === 'pre') this.preSettlementConfig = { ...this.settlementRule }; else this.formalSettlementConfig = { ...this.settlementRule }; if (!this.validateSettlementRule(this.preSettlementConfig, '预结算配置') || !this.validateSettlementRule(this.formalSettlementConfig, '正式结算配置')) return; const settlementRule = { preSettlementConfig: this.preSettlementConfig, formalSettlementConfig: this.formalSettlementConfig }; await api.submitChange({ ...this.form, settlementCurrency: String(this.form.settlementCurrency || '').trim() || 'RMB', copyCount: normalizeOptionalPositiveInteger(this.form.copyCount), invoiceCycle: normalizeOptionalPositiveInteger(this.form.invoiceCycle), paymentDays: normalizeOptionalPositiveInteger(this.form.paymentDays), contractAmount: normalizeOptionalAmount(this.form.contractAmount), startDate: this.period[0], endDate: this.period[1], feeGenerationMode: this.feeGenerationMode, billingEnabled: this.feeGenerationMode === 'system' ? 1 : 0, billingPlanJson: JSON.stringify(this.plans), settlementRuleJson: JSON.stringify(settlementRule), preSettlementConfigJson: JSON.stringify(this.preSettlementConfig), formalSettlementConfigJson: JSON.stringify(this.formalSettlementConfig), paymentRatioJson: JSON.stringify(this.paymentRatioRows), contractFileJson: JSON.stringify(this.contractFileRows), attachmentsJson: JSON.stringify(this.attachments), changeContent: this.form.changeContent, changeReason: this.form.changeReason, changeAttachmentsJson: JSON.stringify(this.changeMaterials) }); await submitMkApprovalFlow({ bizType: 'contract-manage', bizId: this.form.id, subjectName: this.form.contractName || '', approvalStatus: this.form.approvalStatus || 'change_rejected', mkEnabled: await loadMkEnabled().catch(() => false) }); this.$message.success('变更已提交'); this.$router.back(); },
|
async submit() {
|
||||||
|
if (this.form.changeType === '终止合同') {
|
||||||
|
const contractId = this.form.contractId || this.form.id;
|
||||||
|
await contractApi.terminate(contractId, this.form.changeReason);
|
||||||
|
this.$message.success('合同已终止');
|
||||||
|
this.goBack();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
await this.$refs.formRef.validate();
|
||||||
|
if (!this.isSettlementRuleChange) {
|
||||||
|
const contractNo = String(this.form.contractNo || '').trim();
|
||||||
|
if (!contractNo) {
|
||||||
|
this.$message.warning('请输入合同编号');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (contractNo.length > 100) {
|
||||||
|
this.$message.warning('合同编号不能超过100个字符');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.form.contractNo = contractNo;
|
||||||
|
const total = this.paymentRatioRows.reduce((sum, row) => sum + Number(row.ratioLimit || 0), 0);
|
||||||
|
if (this.paymentRatioRows.length && Math.abs(total - 100) > 0.0001) {
|
||||||
|
this.$message.warning('付款比例上限合计必须等于100%');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (this.settlementConfigTab === 'pre') this.preSettlementConfig = { ...this.settlementRule };
|
||||||
|
else this.formalSettlementConfig = { ...this.settlementRule };
|
||||||
|
if (
|
||||||
|
!this.validateSettlementRule(this.preSettlementConfig, '预结算配置') ||
|
||||||
|
!this.validateSettlementRule(this.formalSettlementConfig, '正式结算配置')
|
||||||
|
) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const payload = this.buildChangePayload();
|
||||||
|
if (this.isContractChangeModule) {
|
||||||
|
await changeApi.submit(payload);
|
||||||
|
await submitMkApprovalFlow({
|
||||||
|
bizType: 'contract-change',
|
||||||
|
bizId: this.form.id,
|
||||||
|
subjectName: this.form.contractName || '',
|
||||||
|
approvalStatus: this.form.approvalStatus || '',
|
||||||
|
mkEnabled: await loadMkEnabled().catch(() => false),
|
||||||
|
});
|
||||||
|
sessionStorage.setItem(contractChangeListRefreshKey, '1');
|
||||||
|
this.$message.success('变更已提交');
|
||||||
|
this.$router.push(contractChangeListRoute);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
await contractApi.submitChange(payload);
|
||||||
|
await submitMkApprovalFlow({
|
||||||
|
bizType: 'contract-manage',
|
||||||
|
bizId: this.form.id,
|
||||||
|
subjectName: this.form.contractName || '',
|
||||||
|
approvalStatus: this.form.approvalStatus || 'change_rejected',
|
||||||
|
mkEnabled: await loadMkEnabled().catch(() => false),
|
||||||
|
});
|
||||||
|
this.$message.success('变更已提交');
|
||||||
|
this.$router.back();
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
@@ -762,6 +1173,10 @@ export default {
|
|||||||
}
|
}
|
||||||
.contract-basic-section__date-range { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 8px; width: 360px; max-width: 100%; }
|
.contract-basic-section__date-range { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 8px; width: 360px; max-width: 100%; }
|
||||||
.contract-basic-section__date-range span { color: #606266; }
|
.contract-basic-section__date-range span { color: #606266; }
|
||||||
|
// 风险客商提示条(基本信息备注后):橙黄背景 + 红色文字,与合同新增页一致
|
||||||
|
.contract-manage-form__risk-tip { margin: 0 0 18px; padding: 10px 16px; background: #faecd8; border-radius: 4px; }
|
||||||
|
.contract-manage-form__risk-tip-title { color: #f56c6c; font-weight: 600; line-height: 22px; }
|
||||||
|
.contract-manage-form__risk-tip-content { color: #f56c6c; line-height: 22px; }
|
||||||
.contract-basic-section__date-range :deep(.el-date-editor) { width: auto; min-width: 0; }
|
.contract-basic-section__date-range :deep(.el-date-editor) { width: auto; min-width: 0; }
|
||||||
.contract-basic-section :deep(.el-form-item) { align-items: center; }
|
.contract-basic-section :deep(.el-form-item) { align-items: center; }
|
||||||
.contract-basic-section :deep(.el-form-item__label) { flex: 0 0 96px !important; width: 96px !important; height: auto; padding-right: 12px; white-space: normal; word-break: break-all; line-height: 18px; }
|
.contract-basic-section :deep(.el-form-item__label) { flex: 0 0 96px !important; width: 96px !important; height: auto; padding-right: 12px; white-space: normal; word-break: break-all; line-height: 18px; }
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,100 @@
|
|||||||
|
<template>
|
||||||
|
<basic-container class="hcs-master-data-page">
|
||||||
|
<div class="hcs-master-data-page__head">
|
||||||
|
<div class="dialog-section-title">合规主数据(HCS)</div>
|
||||||
|
<el-button type="primary" :loading="refreshing" @click="handleRefresh">刷新缓存</el-button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<el-tabs v-model="activeTab">
|
||||||
|
<el-tab-pane label="合同模板" name="template" />
|
||||||
|
</el-tabs>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="templates" border>
|
||||||
|
<el-table-column type="index" label="序号" width="70" align="center" />
|
||||||
|
<el-table-column prop="fdId" label="模板ID(fdTemplateId)" min-width="320" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="fdName" label="模板名称" min-width="220" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="fdStatus" label="状态" width="100" align="center" />
|
||||||
|
<el-table-column prop="fdContractCharacter" label="合同性质" min-width="140" align="center" />
|
||||||
|
<el-table-column label="创建时间" min-width="170" align="center">
|
||||||
|
<template #default="{ row }">{{ formatTime(row.fdCreateTime) }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<el-alert
|
||||||
|
class="hcs-master-data-page__tip"
|
||||||
|
title="合同类别与合规模板的对应关系由 Nacos 配置 thirdParty.hcs.contract.template-mapping 维护;此列表用于核对映射的模板ID 是否存在。"
|
||||||
|
type="info"
|
||||||
|
:closable="false"
|
||||||
|
/>
|
||||||
|
</basic-container>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { getTemplates, refreshMasterData } from '@/api/business/hcs';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'HcsMasterData',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
activeTab: 'template',
|
||||||
|
loading: false,
|
||||||
|
refreshing: false,
|
||||||
|
templates: [],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.loadTemplates();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
loadTemplates() {
|
||||||
|
this.loading = true;
|
||||||
|
getTemplates()
|
||||||
|
.then(response => {
|
||||||
|
const data = response?.data?.data ?? response?.data;
|
||||||
|
this.templates = Array.isArray(data) ? data : [];
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.$message.error('合规模板列表加载失败');
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleRefresh() {
|
||||||
|
this.refreshing = true;
|
||||||
|
refreshMasterData()
|
||||||
|
.then(response => {
|
||||||
|
this.$message.success(response?.data?.data || '合规主数据缓存已刷新');
|
||||||
|
this.loadTemplates();
|
||||||
|
})
|
||||||
|
.catch(error => {
|
||||||
|
this.$message.error(error?.response?.data?.msg || '刷新失败');
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
this.refreshing = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
formatTime(value) {
|
||||||
|
if (!value) return '-';
|
||||||
|
return this.$dayjs(Number(value)).format('YYYY-MM-DD HH:mm:ss');
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.hcs-master-data-page__head {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
margin-bottom: 8px;
|
||||||
|
|
||||||
|
.dialog-section-title {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.hcs-master-data-page__tip {
|
||||||
|
margin-top: 12px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -635,10 +635,11 @@
|
|||||||
min-width="100" /><el-table-column
|
min-width="100" /><el-table-column
|
||||||
prop="quantity"
|
prop="quantity"
|
||||||
label="数量"
|
label="数量"
|
||||||
min-width="90" /><el-table-column
|
min-width="120"
|
||||||
prop="quantityUnit"
|
><template #default="{ row }">{{
|
||||||
label="数量单位"
|
formatCargoQuantityDisplay(row)
|
||||||
min-width="100" /><el-table-column
|
}}</template></el-table-column
|
||||||
|
><el-table-column
|
||||||
prop="materialCode"
|
prop="materialCode"
|
||||||
label="物料编码"
|
label="物料编码"
|
||||||
min-width="120" /><el-table-column
|
min-width="120" /><el-table-column
|
||||||
@@ -1068,31 +1069,12 @@
|
|||||||
<el-option
|
<el-option
|
||||||
v-for="item in driverOptions"
|
v-for="item in driverOptions"
|
||||||
:key="item.id || item.driverName || item.name"
|
:key="item.id || item.driverName || item.name"
|
||||||
:label="item.driverName || item.name"
|
:label="driverOptionText(item)"
|
||||||
:value="item.driverName || item.name"
|
:value="item.driverName || item.name"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
|
||||||
<el-form-item label="运输方式">
|
|
||||||
<el-select
|
|
||||||
v-model="candidateQuery.transportType"
|
|
||||||
clearable
|
|
||||||
filterable
|
|
||||||
placeholder="请选择"
|
|
||||||
:disabled="dialogMode === 'add'"
|
|
||||||
@visible-change="visible => visible && loadTransportTypeOptions()"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in transportTypeOptions"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</template>
|
</template>
|
||||||
<el-col
|
<el-col
|
||||||
:span="candidateSearchVisible ? 24 : 6"
|
:span="candidateSearchVisible ? 24 : 6"
|
||||||
@@ -1201,6 +1183,16 @@
|
|||||||
min-width="160"
|
min-width="160"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
/>
|
/>
|
||||||
|
<el-table-column
|
||||||
|
prop="carrierContractName"
|
||||||
|
label="承运商合同"
|
||||||
|
min-width="160"
|
||||||
|
show-overflow-tooltip
|
||||||
|
>
|
||||||
|
<template #default="{ row }">
|
||||||
|
{{ row.carrierContractName || '-' }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="planName"
|
prop="planName"
|
||||||
label="计划名称"
|
label="计划名称"
|
||||||
@@ -1357,19 +1349,29 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" width="110" fixed="right">
|
<el-table-column label="操作" width="110" fixed="right">
|
||||||
<template #default="{ $index }">
|
<template #default="{ row, $index }">
|
||||||
<el-link
|
<el-link
|
||||||
v-if="!dialogReadonly"
|
v-if="!dialogReadonly && !isSelectedWaybillRemoveLocked(row)"
|
||||||
type="danger"
|
type="danger"
|
||||||
@click="removeSelectedWaybill($index)"
|
@click="removeSelectedWaybill($index)"
|
||||||
>删除</el-link
|
>删除</el-link
|
||||||
>
|
>
|
||||||
|
<span
|
||||||
|
v-else-if="!dialogReadonly && isSelectedWaybillRemoveLocked(row)"
|
||||||
|
class="loading-manage-dialog__locked-tip"
|
||||||
|
>已打卡</span
|
||||||
|
>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</section-card>
|
</section-card>
|
||||||
|
|
||||||
<section-card title="线路编辑">
|
<section-card title="线路编辑">
|
||||||
|
<template v-if="isRunningEdit" #extra>
|
||||||
|
<span class="loading-manage-dialog__route-hint"
|
||||||
|
>已打卡地点置灰不可拖拽,新增地址仅可在未打卡节点间调整</span
|
||||||
|
>
|
||||||
|
</template>
|
||||||
<div class="loading-manage-dialog__route-list" v-if="routeNodes.length">
|
<div class="loading-manage-dialog__route-list" v-if="routeNodes.length">
|
||||||
<div
|
<div
|
||||||
v-for="(node, index) in routeNodes"
|
v-for="(node, index) in routeNodes"
|
||||||
@@ -1415,8 +1417,9 @@
|
|||||||
<el-table-column prop="cargoName" label="货物名称" min-width="140" />
|
<el-table-column prop="cargoName" label="货物名称" min-width="140" />
|
||||||
<el-table-column prop="cargoType" label="货物类型" min-width="140" />
|
<el-table-column prop="cargoType" label="货物类型" min-width="140" />
|
||||||
<el-table-column prop="packageType" label="包装" min-width="100" />
|
<el-table-column prop="packageType" label="包装" min-width="100" />
|
||||||
<el-table-column prop="quantity" label="数量" min-width="100" />
|
<el-table-column prop="quantity" label="数量" min-width="120">
|
||||||
<el-table-column prop="quantityUnit" label="数量单位" min-width="100" />
|
<template #default="{ row }">{{ formatCargoQuantityDisplay(row) }}</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column prop="materialCode" label="物料编码" min-width="130" />
|
<el-table-column prop="materialCode" label="物料编码" min-width="130" />
|
||||||
<el-table-column prop="equipmentCode" label="设备编码" min-width="130" />
|
<el-table-column prop="equipmentCode" label="设备编码" min-width="130" />
|
||||||
<el-table-column prop="brand" label="品牌" min-width="120" />
|
<el-table-column prop="brand" label="品牌" min-width="120" />
|
||||||
@@ -1436,7 +1439,7 @@
|
|||||||
<el-segmented
|
<el-segmented
|
||||||
v-model="dialogForm.carrierType"
|
v-model="dialogForm.carrierType"
|
||||||
:options="carrierTypeOptions"
|
:options="carrierTypeOptions"
|
||||||
:disabled="dialogReadonly"
|
:disabled="dialogReadonly || isRunningTaskRequiredLocked"
|
||||||
@change="handleCarrierTypeChange"
|
@change="handleCarrierTypeChange"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
@@ -1450,7 +1453,11 @@
|
|||||||
"
|
"
|
||||||
clearable
|
clearable
|
||||||
filterable
|
filterable
|
||||||
:disabled="dialogReadonly || !selectedWaybillRows.length"
|
:disabled="
|
||||||
|
dialogReadonly ||
|
||||||
|
isRunningTaskRequiredLocked ||
|
||||||
|
!selectedWaybillRows.length
|
||||||
|
"
|
||||||
:loading="taskCarrierLoading"
|
:loading="taskCarrierLoading"
|
||||||
:placeholder="taskCarrierPlaceholder"
|
:placeholder="taskCarrierPlaceholder"
|
||||||
@change="handleTaskCarrierChange"
|
@change="handleTaskCarrierChange"
|
||||||
@@ -1483,20 +1490,40 @@
|
|||||||
:fetch-suggestions="fetchDriverSuggestions"
|
:fetch-suggestions="fetchDriverSuggestions"
|
||||||
:loading="driverLoading"
|
:loading="driverLoading"
|
||||||
placeholder="请输入"
|
placeholder="请输入"
|
||||||
|
:disabled="dialogReadonly || isRunningSelfDriverLocked"
|
||||||
@select="item => handleDriverSuggestionSelect('dialog', item)"
|
@select="item => handleDriverSuggestionSelect('dialog', item)"
|
||||||
/>
|
>
|
||||||
|
<template #default="{ item }">
|
||||||
|
<span>{{ driverOptionText(item) }}</span>
|
||||||
|
</template>
|
||||||
|
</el-autocomplete>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
label="手机号"
|
label="手机号"
|
||||||
:required="dialogForm.carrierType === '自运'"
|
:required="dialogForm.carrierType === '自运'"
|
||||||
>
|
>
|
||||||
<el-input v-model="dialogForm.driverPhone" clearable placeholder="请输入" />
|
<el-input
|
||||||
|
v-model="dialogForm.driverPhone"
|
||||||
|
clearable
|
||||||
|
placeholder="请输入"
|
||||||
|
:disabled="dialogReadonly || isRunningSelfDriverLocked"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="车牌号" required>
|
<el-form-item label="车牌号" required>
|
||||||
<el-input v-model="dialogForm.vehicleNo" clearable placeholder="请输入" />
|
<el-input
|
||||||
|
v-model="dialogForm.vehicleNo"
|
||||||
|
clearable
|
||||||
|
placeholder="请输入"
|
||||||
|
:disabled="dialogReadonly || isRunningTaskRequiredLocked"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-if="dialogForm.carrierType !== '承运商'" label="挂车车牌号">
|
<el-form-item v-if="dialogForm.carrierType !== '承运商'" label="挂车车牌号">
|
||||||
<el-input v-model="dialogForm.trailerVehicleNo" clearable placeholder="请输入" />
|
<el-input
|
||||||
|
v-model="dialogForm.trailerVehicleNo"
|
||||||
|
clearable
|
||||||
|
placeholder="请输入"
|
||||||
|
:disabled="dialogReadonly"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-if="dialogForm.carrierType !== '承运商'" label="押运人">
|
<el-form-item v-if="dialogForm.carrierType !== '承运商'" label="押运人">
|
||||||
<el-autocomplete
|
<el-autocomplete
|
||||||
@@ -1506,11 +1533,21 @@
|
|||||||
:fetch-suggestions="fetchEscortSuggestions"
|
:fetch-suggestions="fetchEscortSuggestions"
|
||||||
:loading="escortLoading"
|
:loading="escortLoading"
|
||||||
placeholder="请输入"
|
placeholder="请输入"
|
||||||
|
:disabled="dialogReadonly"
|
||||||
@select="item => handleEscortSuggestionSelect('dialog', item)"
|
@select="item => handleEscortSuggestionSelect('dialog', item)"
|
||||||
/>
|
>
|
||||||
|
<template #default="{ item }">
|
||||||
|
<span>{{ driverOptionText(item) }}</span>
|
||||||
|
</template>
|
||||||
|
</el-autocomplete>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-if="dialogForm.carrierType !== '承运商'" label="押运人手机号">
|
<el-form-item v-if="dialogForm.carrierType !== '承运商'" label="押运人手机号">
|
||||||
<el-input v-model="dialogForm.escortPhone" clearable placeholder="请输入" />
|
<el-input
|
||||||
|
v-model="dialogForm.escortPhone"
|
||||||
|
clearable
|
||||||
|
placeholder="请输入"
|
||||||
|
:disabled="dialogReadonly"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="里程(km)">
|
<el-form-item label="里程(km)">
|
||||||
<el-input
|
<el-input
|
||||||
@@ -1528,6 +1565,7 @@
|
|||||||
format="YYYY-MM-DD"
|
format="YYYY-MM-DD"
|
||||||
value-format="YYYY-MM-DD"
|
value-format="YYYY-MM-DD"
|
||||||
placeholder="请选择"
|
placeholder="请选择"
|
||||||
|
:disabled="dialogReadonly"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="预计完成日期">
|
<el-form-item label="预计完成日期">
|
||||||
@@ -1537,6 +1575,7 @@
|
|||||||
format="YYYY-MM-DD"
|
format="YYYY-MM-DD"
|
||||||
value-format="YYYY-MM-DD"
|
value-format="YYYY-MM-DD"
|
||||||
placeholder="请选择"
|
placeholder="请选择"
|
||||||
|
:disabled="dialogReadonly"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="备注" class="loading-manage-dialog__span-2">
|
<el-form-item label="备注" class="loading-manage-dialog__span-2">
|
||||||
@@ -1547,6 +1586,7 @@
|
|||||||
maxlength="500"
|
maxlength="500"
|
||||||
show-word-limit
|
show-word-limit
|
||||||
placeholder="请输入,500字以内"
|
placeholder="请输入,500字以内"
|
||||||
|
:disabled="dialogReadonly"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
@@ -1561,11 +1601,17 @@
|
|||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<el-button @click="closeLoadingDialog">关闭</el-button>
|
<el-button @click="closeLoadingDialog">关闭</el-button>
|
||||||
<el-button type="primary" plain :loading="dialogSaving === 'draft'" @click="saveDraft">
|
<el-button
|
||||||
|
v-if="!isRunningEdit"
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
:loading="dialogSaving === 'draft'"
|
||||||
|
@click="saveDraft"
|
||||||
|
>
|
||||||
暂存
|
暂存
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button type="primary" :loading="dialogSaving === 'submit'" @click="submitLoading">
|
<el-button type="primary" :loading="dialogSaving === 'submit'" @click="submitLoading">
|
||||||
{{ dialogMode === 'reassign' ? '确认派单' : '确认' }}
|
{{ dialogMode === 'reassign' ? '确认派单' : isRunningEdit ? '保存' : '确认' }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
@@ -1823,7 +1869,7 @@ import { getList as getContractList } from '@/api/business/contract-manage';
|
|||||||
import { getParentOptions as getCargoTypeOptions } from '@/api/base/cargo-type';
|
import { getParentOptions as getCargoTypeOptions } from '@/api/base/cargo-type';
|
||||||
import { getList as getCustomerList } from '@/api/vehicle/customer-archive';
|
import { getList as getCustomerList } from '@/api/vehicle/customer-archive';
|
||||||
import { getList as getDriverList } from '@/api/transportCapacity/driver';
|
import { getList as getDriverList } from '@/api/transportCapacity/driver';
|
||||||
import { fetchDriversByCarrierOrganizations } from '@/utils/carrier-org-resource';
|
import { fetchDriverCandidates, driverOptionText } from '@/utils/carrier-org-resource';
|
||||||
import { formatContractOptionLabel } from '@/utils/contract';
|
import { formatContractOptionLabel } from '@/utils/contract';
|
||||||
import {
|
import {
|
||||||
getList as getProcessConfigList,
|
getList as getProcessConfigList,
|
||||||
@@ -1848,7 +1894,6 @@ import { normalizeMapSearchResults, searchAmapPlaceText } from '@/utils/map-sear
|
|||||||
import { parseRouteChangeContent } from '@/utils/route-change';
|
import { parseRouteChangeContent } from '@/utils/route-change';
|
||||||
|
|
||||||
const defaultTransportType = '';
|
const defaultTransportType = '';
|
||||||
const defaultCandidateTransportType = '';
|
|
||||||
const AMAP_KEY = '653b7cf105ad7fb8ec9b2f5198ade315';
|
const AMAP_KEY = '653b7cf105ad7fb8ec9b2f5198ade315';
|
||||||
const AMAP_SECURITY_CODE = '5aab65c632e48ebae0d0e28f5b28e21a';
|
const AMAP_SECURITY_CODE = '5aab65c632e48ebae0d0e28f5b28e21a';
|
||||||
const loadingCreateWaybillsStorageKey = 'loading-manage-create-waybills';
|
const loadingCreateWaybillsStorageKey = 'loading-manage-create-waybills';
|
||||||
@@ -1889,7 +1934,6 @@ const createCandidateSearchForm = () => ({
|
|||||||
vehicleNo: '',
|
vehicleNo: '',
|
||||||
carrierName: '',
|
carrierName: '',
|
||||||
driverName: '',
|
driverName: '',
|
||||||
transportType: defaultCandidateTransportType,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const createDialogForm = () => ({
|
const createDialogForm = () => ({
|
||||||
@@ -2107,6 +2151,8 @@ export default {
|
|||||||
routeNodes: [],
|
routeNodes: [],
|
||||||
cargoRows: [],
|
cargoRows: [],
|
||||||
routeDragIndex: -1,
|
routeDragIndex: -1,
|
||||||
|
/** 进行中编辑:子运单打卡记录映射 waybillId -> records[] */
|
||||||
|
waybillPunchMap: {},
|
||||||
transportTypeOptions: [],
|
transportTypeOptions: [],
|
||||||
projectOptions: [],
|
projectOptions: [],
|
||||||
customerOptions: [],
|
customerOptions: [],
|
||||||
@@ -2170,6 +2216,23 @@ export default {
|
|||||||
dialogReadonly() {
|
dialogReadonly() {
|
||||||
return this.dialogMode === 'view';
|
return this.dialogMode === 'view';
|
||||||
},
|
},
|
||||||
|
/** 进行中配载编辑:可加子单/调未打卡路线,但任务必填字段锁定 */
|
||||||
|
isRunningEdit() {
|
||||||
|
return (
|
||||||
|
this.dialogMode === 'edit' &&
|
||||||
|
String(this.dialogForm.businessStatus || '') === 'running'
|
||||||
|
);
|
||||||
|
},
|
||||||
|
/** 进行中任务必填字段(已派车)不可改 */
|
||||||
|
isRunningTaskRequiredLocked() {
|
||||||
|
return this.isRunningEdit;
|
||||||
|
},
|
||||||
|
/** 自运进行中:司机/手机号同属必填派车信息,不可改 */
|
||||||
|
isRunningSelfDriverLocked() {
|
||||||
|
return (
|
||||||
|
this.isRunningEdit && String(this.dialogForm.carrierType || '').trim() === '自运'
|
||||||
|
);
|
||||||
|
},
|
||||||
// 打卡时间轴:已打卡按时间升序,未打卡保持原节点顺序排在其后
|
// 打卡时间轴:已打卡按时间升序,未打卡保持原节点顺序排在其后
|
||||||
orderedPunchRecords() {
|
orderedPunchRecords() {
|
||||||
const records = Array.isArray(this.punchRecords) ? this.punchRecords : [];
|
const records = Array.isArray(this.punchRecords) ? this.punchRecords : [];
|
||||||
@@ -2325,6 +2388,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
parseRouteChangeContent,
|
parseRouteChangeContent,
|
||||||
|
driverOptionText,
|
||||||
formatTaskCarrierContractLabel(item = {}) {
|
formatTaskCarrierContractLabel(item = {}) {
|
||||||
const carrierName = item.carrierName || item.partyB || '';
|
const carrierName = item.carrierName || item.partyB || '';
|
||||||
const contractLabel = formatContractOptionLabel(item);
|
const contractLabel = formatContractOptionLabel(item);
|
||||||
@@ -2460,9 +2524,9 @@ export default {
|
|||||||
Object.values(groups)
|
Object.values(groups)
|
||||||
.map(group => {
|
.map(group => {
|
||||||
const quantity = this.formatGoodsQuantity(group.quantity);
|
const quantity = this.formatGoodsQuantity(group.quantity);
|
||||||
return `${group.typeName}等${group.count}种货物 | ${quantity}${
|
const typeName =
|
||||||
group.unit ? ` ${group.unit}` : ''
|
group.count > 1 ? `${group.typeName}等${group.count}种货物` : group.typeName;
|
||||||
}`;
|
return `${typeName} | ${quantity}${group.unit ? ` ${group.unit}` : ''}`;
|
||||||
})
|
})
|
||||||
.join('; ') || '-'
|
.join('; ') || '-'
|
||||||
);
|
);
|
||||||
@@ -2913,6 +2977,7 @@ export default {
|
|||||||
if (status === 'running') {
|
if (status === 'running') {
|
||||||
return [
|
return [
|
||||||
{ type: 'view', label: '详情' },
|
{ type: 'view', label: '详情' },
|
||||||
|
{ type: 'edit', label: '编辑' },
|
||||||
{ type: 'complete', label: '完成' },
|
{ type: 'complete', label: '完成' },
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
@@ -3014,7 +3079,12 @@ export default {
|
|||||||
query: {
|
query: {
|
||||||
mode,
|
mode,
|
||||||
...(mode === 'edit' && row?.id ? { id: row.id } : {}),
|
...(mode === 'edit' && row?.id ? { id: row.id } : {}),
|
||||||
name: mode === 'edit' ? '编辑配载管理' : '新增配载管理',
|
name:
|
||||||
|
mode === 'edit'
|
||||||
|
? row?.businessStatus === 'running'
|
||||||
|
? '编辑进行中配载'
|
||||||
|
: '编辑配载管理'
|
||||||
|
: '新增配载管理',
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
@@ -3022,7 +3092,6 @@ export default {
|
|||||||
this.dialogMode = mode;
|
this.dialogMode = mode;
|
||||||
this.dialogLoading = true;
|
this.dialogLoading = true;
|
||||||
this.resetDialogData();
|
this.resetDialogData();
|
||||||
if (mode === 'add') this.candidateQuery.transportType = 'road';
|
|
||||||
try {
|
try {
|
||||||
if (row?.id) {
|
if (row?.id) {
|
||||||
const res = await loadingApi.getDetail(row.id);
|
const res = await loadingApi.getDetail(row.id);
|
||||||
@@ -3037,6 +3106,9 @@ export default {
|
|||||||
this.dialogForm.loadingSubNos
|
this.dialogForm.loadingSubNos
|
||||||
);
|
);
|
||||||
this.syncProcessWaybillOptions();
|
this.syncProcessWaybillOptions();
|
||||||
|
if (this.isRunningEdit) {
|
||||||
|
await this.refreshWaybillPunchMap();
|
||||||
|
}
|
||||||
this.restoreRouteAndCargo();
|
this.restoreRouteAndCargo();
|
||||||
this.restoreRouteChangeRecords();
|
this.restoreRouteChangeRecords();
|
||||||
this.loadPunchRecords();
|
this.loadPunchRecords();
|
||||||
@@ -3046,7 +3118,6 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
this.dialogForm = createDialogForm();
|
this.dialogForm = createDialogForm();
|
||||||
this.candidateQuery = createCandidateSearchForm();
|
this.candidateQuery = createCandidateSearchForm();
|
||||||
this.candidateQuery.transportType = 'road';
|
|
||||||
await this.loadCandidateWaybills();
|
await this.loadCandidateWaybills();
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
@@ -3071,6 +3142,8 @@ export default {
|
|||||||
this.taskCarrierLoading = false;
|
this.taskCarrierLoading = false;
|
||||||
this.routeNodes = [];
|
this.routeNodes = [];
|
||||||
this.cargoRows = [];
|
this.cargoRows = [];
|
||||||
|
this.routeDragIndex = -1;
|
||||||
|
this.waybillPunchMap = {};
|
||||||
this.candidatePage.currentPage = 1;
|
this.candidatePage.currentPage = 1;
|
||||||
this.candidatePage.total = 0;
|
this.candidatePage.total = 0;
|
||||||
this.candidateSearchVisible = false;
|
this.candidateSearchVisible = false;
|
||||||
@@ -3435,20 +3508,144 @@ export default {
|
|||||||
const statusName = String(row.businessStatusName || row.statusName || '');
|
const statusName = String(row.businessStatusName || row.statusName || '');
|
||||||
return statusName.includes('已完成');
|
return statusName.includes('已完成');
|
||||||
},
|
},
|
||||||
|
isPunchRecordDone(record = {}) {
|
||||||
|
if (record.punched === false || record.statusName === '未打卡') return false;
|
||||||
|
return Boolean(record.punched || record.punchTime || record.punchAt || record.punchDateTime);
|
||||||
|
},
|
||||||
|
isLoadPunchRecord(record = {}) {
|
||||||
|
if (!this.isPunchRecordDone(record)) return false;
|
||||||
|
const code = String(record.nodeCode || '')
|
||||||
|
.trim()
|
||||||
|
.toLowerCase();
|
||||||
|
const name = String(record.nodeName || '').trim();
|
||||||
|
return code === 'load' || name.includes('装货');
|
||||||
|
},
|
||||||
|
isUnloadPunchRecord(record = {}) {
|
||||||
|
if (!this.isPunchRecordDone(record)) return false;
|
||||||
|
const code = String(record.nodeCode || '')
|
||||||
|
.trim()
|
||||||
|
.toLowerCase();
|
||||||
|
const name = String(record.nodeName || '').trim();
|
||||||
|
return (
|
||||||
|
code === 'unload' ||
|
||||||
|
name.includes('卸货') ||
|
||||||
|
code === 'arrival' ||
|
||||||
|
name.includes('到货') ||
|
||||||
|
code === 'sign' ||
|
||||||
|
name.includes('签收')
|
||||||
|
);
|
||||||
|
},
|
||||||
|
waybillPunchRecords(row = {}) {
|
||||||
|
const key = String(row?.id || '');
|
||||||
|
if (!key) return [];
|
||||||
|
const records = this.waybillPunchMap[key];
|
||||||
|
return Array.isArray(records) ? records : [];
|
||||||
|
},
|
||||||
|
isWaybillLoadPunched(row = {}) {
|
||||||
|
return this.waybillPunchRecords(row).some(record => this.isLoadPunchRecord(record));
|
||||||
|
},
|
||||||
|
isWaybillUnloadPunched(row = {}) {
|
||||||
|
return this.waybillPunchRecords(row).some(record => this.isUnloadPunchRecord(record));
|
||||||
|
},
|
||||||
|
isWaybillPunchLocked(row = {}) {
|
||||||
|
return this.isWaybillLoadPunched(row) || this.isWaybillUnloadPunched(row);
|
||||||
|
},
|
||||||
|
isSelectedWaybillRemoveLocked(row = {}) {
|
||||||
|
if (this.isWaybillCompleted(row)) return true;
|
||||||
|
return this.isRunningEdit && this.isWaybillPunchLocked(row);
|
||||||
|
},
|
||||||
|
isRouteNodeTagLocked(tag, rows = this.selectedWaybillRows) {
|
||||||
|
const match = String(tag || '').match(/^(装|卸)(\d+)$/);
|
||||||
|
if (!match) return false;
|
||||||
|
const row = rows[Number(match[2]) - 1];
|
||||||
|
if (!row) return false;
|
||||||
|
if (this.isRunningEdit) {
|
||||||
|
return match[1] === '装' ? this.isWaybillLoadPunched(row) : this.isWaybillUnloadPunched(row);
|
||||||
|
}
|
||||||
|
return this.isWaybillCompleted(row);
|
||||||
|
},
|
||||||
isRouteChangeNodeLocked(node = {}) {
|
isRouteChangeNodeLocked(node = {}) {
|
||||||
return Boolean(node?.locked);
|
return Boolean(node?.locked);
|
||||||
},
|
},
|
||||||
syncRouteNodeLockedFlags(nodes = [], rows = this.selectedWaybillRows) {
|
syncRouteNodeLockedFlags(nodes = [], rows = this.selectedWaybillRows) {
|
||||||
return (nodes || []).map(node => {
|
return (nodes || []).map(node => {
|
||||||
const locked = (node.tags || []).some(tag => {
|
const locked = (node.tags || []).some(tag => this.isRouteNodeTagLocked(tag, rows));
|
||||||
const match = String(tag).match(/^(装|卸)(\d+)$/);
|
|
||||||
if (!match) return false;
|
|
||||||
const row = rows[Number(match[2]) - 1];
|
|
||||||
return row ? this.isWaybillCompleted(row) : false;
|
|
||||||
});
|
|
||||||
return { ...node, locked };
|
return { ...node, locked };
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
async refreshWaybillPunchMap() {
|
||||||
|
const rows = (this.selectedWaybillRows || []).filter(row => row?.id);
|
||||||
|
if (!rows.length) {
|
||||||
|
this.waybillPunchMap = {};
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const entries = await Promise.all(
|
||||||
|
rows.map(async row => {
|
||||||
|
try {
|
||||||
|
const res = await getWaybillPunchRecords(row.id);
|
||||||
|
const data = res?.data?.data || res?.data || {};
|
||||||
|
return [String(row.id), Array.isArray(data.records) ? data.records : []];
|
||||||
|
} catch (error) {
|
||||||
|
return [String(row.id), []];
|
||||||
|
}
|
||||||
|
})
|
||||||
|
);
|
||||||
|
this.waybillPunchMap = Object.fromEntries(entries);
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 进行中编辑:已打卡地点保持在前且不可插入,新增地址只能排在已打卡节点之后。
|
||||||
|
*/
|
||||||
|
mergeRouteNodesKeepingPunched(prevNodes = [], builtNodes = []) {
|
||||||
|
const prev = Array.isArray(prevNodes) ? prevNodes : [];
|
||||||
|
const built = Array.isArray(builtNodes) ? builtNodes : [];
|
||||||
|
if (!this.isRunningEdit) {
|
||||||
|
return built;
|
||||||
|
}
|
||||||
|
const builtByAddress = new Map();
|
||||||
|
built.forEach(node => {
|
||||||
|
if (node?.address && !builtByAddress.has(node.address)) {
|
||||||
|
builtByAddress.set(node.address, node);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
const lockedAddresses = new Set(
|
||||||
|
built.filter(node => node?.locked && node.address).map(node => node.address)
|
||||||
|
);
|
||||||
|
const used = new Set();
|
||||||
|
const lockedResult = [];
|
||||||
|
prev.forEach(node => {
|
||||||
|
if (!node?.address || !lockedAddresses.has(node.address) || used.has(node.address)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const latest = builtByAddress.get(node.address);
|
||||||
|
if (!latest) return;
|
||||||
|
lockedResult.push({ ...latest, locked: true });
|
||||||
|
used.add(node.address);
|
||||||
|
});
|
||||||
|
built.forEach(node => {
|
||||||
|
if (!node?.locked || !node.address || used.has(node.address)) return;
|
||||||
|
lockedResult.push({ ...node, locked: true });
|
||||||
|
used.add(node.address);
|
||||||
|
});
|
||||||
|
const unlockedResult = [];
|
||||||
|
prev.forEach(node => {
|
||||||
|
if (!node?.address || lockedAddresses.has(node.address) || used.has(node.address)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const latest = builtByAddress.get(node.address);
|
||||||
|
if (!latest) return;
|
||||||
|
unlockedResult.push({ ...latest, locked: false });
|
||||||
|
used.add(node.address);
|
||||||
|
});
|
||||||
|
built.forEach(node => {
|
||||||
|
if (node?.locked || !node?.address || used.has(node.address)) return;
|
||||||
|
unlockedResult.push({ ...node, locked: false });
|
||||||
|
used.add(node.address);
|
||||||
|
});
|
||||||
|
return [...lockedResult, ...unlockedResult].map((node, index) => ({
|
||||||
|
...node,
|
||||||
|
key: `${node.address}-${index}`,
|
||||||
|
}));
|
||||||
|
},
|
||||||
openRouteChangeMapDialog(row, field) {
|
openRouteChangeMapDialog(row, field) {
|
||||||
if (this.isWaybillCompleted(row)) return;
|
if (this.isWaybillCompleted(row)) return;
|
||||||
this.routeChangeMapTarget = { row, field };
|
this.routeChangeMapTarget = { row, field };
|
||||||
@@ -3699,20 +3896,24 @@ export default {
|
|||||||
async loadCandidateWaybills() {
|
async loadCandidateWaybills() {
|
||||||
this.candidateLoading = true;
|
this.candidateLoading = true;
|
||||||
try {
|
try {
|
||||||
|
const selectedProjectId = this.selectedWaybillRows.map(row => row.projectId).find(Boolean);
|
||||||
const query = {
|
const query = {
|
||||||
...this.buildQueryParams(this.candidateQuery),
|
...this.buildQueryParams(this.candidateQuery),
|
||||||
// 待执行(需接单未接)与进行中(无需接单或已接单)均可配载
|
// 公路、待执行、未配载的判定都在后端可配载开关内
|
||||||
businessStatus: 'pending,running',
|
// 该开关已把候选限定为公路,再按精确运输方式取值筛会漏掉「公路运输」这类历史写法
|
||||||
onlyUnassignedLoading: 1,
|
loadableOnly: 1,
|
||||||
// 仅查当前账户所属组织及子组织下的运单
|
// allDept=0 表示不指定组织:超管与「数据权限范围=全部组织」的账户后端不过滤组织,
|
||||||
|
// 其余账户限定本组织(不展开下级)
|
||||||
allDept: 0,
|
allDept: 0,
|
||||||
...(this.dialogMode === 'add' ? { transportType: 'road' } : {}),
|
|
||||||
};
|
};
|
||||||
const transportType = this.getCandidateTransportTypeQuery(query.transportType);
|
// 已选运单后,候选列表优先限定同一项目,便于再按承运商合同乙方交集筛选
|
||||||
|
if (selectedProjectId && !query.projectId && !query.projectName) {
|
||||||
|
query.projectId = selectedProjectId;
|
||||||
|
}
|
||||||
const res = await getWaybillList(
|
const res = await getWaybillList(
|
||||||
this.candidatePage.currentPage,
|
this.candidatePage.currentPage,
|
||||||
this.candidatePage.pageSize,
|
this.candidatePage.pageSize,
|
||||||
{ ...query, transportType }
|
query
|
||||||
);
|
);
|
||||||
const page = unwrapPage(res);
|
const page = unwrapPage(res);
|
||||||
this.candidateRows = page.records;
|
this.candidateRows = page.records;
|
||||||
@@ -3721,20 +3922,12 @@ export default {
|
|||||||
this.candidateLoading = false;
|
this.candidateLoading = false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getCandidateTransportTypeQuery(value) {
|
|
||||||
const normalized = String(value || '')
|
|
||||||
.trim()
|
|
||||||
.toLowerCase();
|
|
||||||
if (['road', '公路运输'].includes(normalized)) return 'road,公路运输';
|
|
||||||
return value || '';
|
|
||||||
},
|
|
||||||
handleCandidateSearch() {
|
handleCandidateSearch() {
|
||||||
this.candidatePage.currentPage = 1;
|
this.candidatePage.currentPage = 1;
|
||||||
this.loadCandidateWaybills();
|
this.loadCandidateWaybills();
|
||||||
},
|
},
|
||||||
handleCandidateReset() {
|
handleCandidateReset() {
|
||||||
this.candidateQuery = createCandidateSearchForm();
|
this.candidateQuery = createCandidateSearchForm();
|
||||||
if (this.dialogMode === 'add') this.candidateQuery.transportType = 'road';
|
|
||||||
this.candidatePage.currentPage = 1;
|
this.candidatePage.currentPage = 1;
|
||||||
this.loadCandidateWaybills();
|
this.loadCandidateWaybills();
|
||||||
},
|
},
|
||||||
@@ -3766,19 +3959,89 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
if (this.isRunningEdit && String(this.dialogForm.carrierType || '').trim() === '承运商') {
|
||||||
|
const contractId = this.dialogForm.carrierContractId;
|
||||||
|
if (contractId) {
|
||||||
|
const projectIds = [
|
||||||
|
...new Set(
|
||||||
|
[...this.selectedWaybillRows, ...selectedRows]
|
||||||
|
.map(row => row.projectId)
|
||||||
|
.filter(Boolean)
|
||||||
|
),
|
||||||
|
];
|
||||||
|
if (projectIds.length) {
|
||||||
|
try {
|
||||||
|
const waybillIds = [...this.selectedWaybillRows, ...selectedRows]
|
||||||
|
.map(row => row.id)
|
||||||
|
.filter(Boolean);
|
||||||
|
const response = await loadingApi.getCarrierContracts(projectIds, waybillIds);
|
||||||
|
const contracts = response?.data?.data || response?.data || [];
|
||||||
|
const stillAllowed = (Array.isArray(contracts) ? contracts : []).some(
|
||||||
|
item => String(item.id) === String(contractId)
|
||||||
|
);
|
||||||
|
if (!stillAllowed) {
|
||||||
|
ElMessage.warning('新增子运单须兼容当前配载单已选定的承运商合同');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
// 合同校验失败时仍允许添加,最终由后端确认拦截
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
const exists = new Set(
|
const exists = new Set(
|
||||||
this.selectedWaybillRows.map(row => String(row.id || row.waybillNo))
|
this.selectedWaybillRows.map(row => String(row.id || row.waybillNo))
|
||||||
);
|
);
|
||||||
|
// 一张配载单的全部子运单必须同项目:以已选运单(无已选时以本批首张)的项目为准
|
||||||
|
const anchorRow = [...this.selectedWaybillRows, ...selectedRows].find(row =>
|
||||||
|
this.waybillProjectKey(row)
|
||||||
|
);
|
||||||
|
const anchorKey = anchorRow ? this.waybillProjectKey(anchorRow) : '';
|
||||||
|
const mismatchedRows = anchorKey
|
||||||
|
? selectedRows.filter(
|
||||||
|
row => this.waybillProjectKey(row) && this.waybillProjectKey(row) !== anchorKey
|
||||||
|
)
|
||||||
|
: [];
|
||||||
|
if (mismatchedRows.length) {
|
||||||
|
const anchorName = anchorRow.projectName || anchorRow.projectId;
|
||||||
|
const mismatchedText = mismatchedRows
|
||||||
|
.map(
|
||||||
|
row =>
|
||||||
|
`${row.waybillNo || row.id}(项目:${row.projectName || row.projectId || '未知'})`
|
||||||
|
)
|
||||||
|
.join('、');
|
||||||
|
this.$message.warning(
|
||||||
|
`运单 ${mismatchedText} 与已选运单项目「${anchorName}」不一致,不能加入同一配载单`
|
||||||
|
);
|
||||||
|
}
|
||||||
const nextRows = [...this.selectedWaybillRows];
|
const nextRows = [...this.selectedWaybillRows];
|
||||||
selectedRows.forEach(row => {
|
selectedRows.forEach(row => {
|
||||||
|
if (mismatchedRows.includes(row)) return;
|
||||||
const key = String(row.id || row.waybillNo);
|
const key = String(row.id || row.waybillNo);
|
||||||
if (!exists.has(key)) {
|
if (!exists.has(key)) {
|
||||||
nextRows.push(row);
|
nextRows.push(row);
|
||||||
exists.add(key);
|
exists.add(key);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
// 承运商类型:新增后须仍存在共同的承运商合同乙方(按客户合同乙方=承运商合同甲方匹配后取交集)
|
||||||
|
if (
|
||||||
|
String(this.dialogForm.carrierType || '').trim() === '承运商' &&
|
||||||
|
nextRows.length > this.selectedWaybillRows.length
|
||||||
|
) {
|
||||||
|
const compatible = await this.hasCompatibleCarrierContracts(nextRows);
|
||||||
|
if (!compatible) {
|
||||||
|
this.$message.warning(
|
||||||
|
'所选运单在同一项目下没有共同的承运商合同乙方,不能加入同一配载单'
|
||||||
|
);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const prevRouteNodes = [...this.routeNodes];
|
||||||
this.selectedWaybillRows = nextRows;
|
this.selectedWaybillRows = nextRows;
|
||||||
this.rebuildSummaryFromWaybills();
|
if (this.isRunningEdit) {
|
||||||
|
await this.refreshWaybillPunchMap();
|
||||||
|
}
|
||||||
|
this.rebuildSummaryFromWaybills(true, prevRouteNodes);
|
||||||
await this.loadTaskCarrierOptions();
|
await this.loadTaskCarrierOptions();
|
||||||
this.$refs.candidateTableRef?.clearSelection?.();
|
this.$refs.candidateTableRef?.clearSelection?.();
|
||||||
this.candidateSelection = [];
|
this.candidateSelection = [];
|
||||||
@@ -3786,15 +4049,42 @@ export default {
|
|||||||
this.candidateAdding = false;
|
this.candidateAdding = false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
async hasCompatibleCarrierContracts(rows = []) {
|
||||||
|
const projectId = (rows || []).map(row => row.projectId).find(Boolean);
|
||||||
|
const waybillIds = (rows || []).map(row => row.id).filter(Boolean);
|
||||||
|
if (!projectId || waybillIds.length < 2) return true;
|
||||||
|
try {
|
||||||
|
const response = await loadingApi.getCarrierContracts([projectId], waybillIds);
|
||||||
|
const contracts = response?.data?.data || response?.data || [];
|
||||||
|
return (Array.isArray(contracts) ? contracts : []).length > 0;
|
||||||
|
} catch (error) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
},
|
||||||
async addSelectedWaybills() {
|
async addSelectedWaybills() {
|
||||||
await this.addWaybillRows(this.candidateSelection);
|
await this.addWaybillRows(this.candidateSelection);
|
||||||
},
|
},
|
||||||
|
waybillProjectKey(row = {}) {
|
||||||
|
return String(row.projectId || row.projectName || '').trim();
|
||||||
|
},
|
||||||
removeSelectedWaybill(index) {
|
removeSelectedWaybill(index) {
|
||||||
|
const row = this.selectedWaybillRows[index];
|
||||||
|
if (this.isSelectedWaybillRemoveLocked(row)) {
|
||||||
|
ElMessage.warning('已打卡的子运单不可移除');
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.selectedWaybillRows.splice(index, 1);
|
this.selectedWaybillRows.splice(index, 1);
|
||||||
|
if (this.isRunningEdit) {
|
||||||
|
this.refreshWaybillPunchMap().then(() => {
|
||||||
|
this.rebuildSummaryFromWaybills();
|
||||||
|
this.loadTaskCarrierOptions();
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.rebuildSummaryFromWaybills();
|
this.rebuildSummaryFromWaybills();
|
||||||
this.loadTaskCarrierOptions();
|
this.loadTaskCarrierOptions();
|
||||||
},
|
},
|
||||||
rebuildSummaryFromWaybills(rebuildRoute = true) {
|
rebuildSummaryFromWaybills(rebuildRoute = true, prevRouteNodes = null) {
|
||||||
const rows = this.selectedWaybillRows;
|
const rows = this.selectedWaybillRows;
|
||||||
this.dialogForm.loadingSubNos = rows
|
this.dialogForm.loadingSubNos = rows
|
||||||
.map(row => row.waybillNo)
|
.map(row => row.waybillNo)
|
||||||
@@ -3819,7 +4109,13 @@ export default {
|
|||||||
this.dialogForm.transportType = rows.find(row => row.transportType)?.transportType || '';
|
this.dialogForm.transportType = rows.find(row => row.transportType)?.transportType || '';
|
||||||
}
|
}
|
||||||
if (rebuildRoute) {
|
if (rebuildRoute) {
|
||||||
this.routeNodes = this.buildRouteNodes(rows);
|
const builtNodes = this.buildRouteNodes(rows);
|
||||||
|
this.routeNodes = this.isRunningEdit
|
||||||
|
? this.mergeRouteNodesKeepingPunched(
|
||||||
|
prevRouteNodes || this.routeNodes,
|
||||||
|
builtNodes
|
||||||
|
)
|
||||||
|
: builtNodes;
|
||||||
}
|
}
|
||||||
this.cargoRows = this.buildCargoRows(rows);
|
this.cargoRows = this.buildCargoRows(rows);
|
||||||
// 编辑回填阶段 routeNodes 尚未恢复时跳过,避免清空已有发到货地
|
// 编辑回填阶段 routeNodes 尚未恢复时跳过,避免清空已有发到货地
|
||||||
@@ -3839,7 +4135,9 @@ export default {
|
|||||||
if (locked) node.locked = true;
|
if (locked) node.locked = true;
|
||||||
};
|
};
|
||||||
rows.forEach((row, rowIndex) => {
|
rows.forEach((row, rowIndex) => {
|
||||||
const locked = this.isWaybillCompleted(row);
|
const locked = this.isRunningEdit
|
||||||
|
? this.isWaybillLoadPunched(row)
|
||||||
|
: this.isWaybillCompleted(row);
|
||||||
const departure = row.departureAddress || row.departureName;
|
const departure = row.departureAddress || row.departureName;
|
||||||
appendNode(
|
appendNode(
|
||||||
departure,
|
departure,
|
||||||
@@ -3849,7 +4147,9 @@ export default {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
rows.forEach((row, rowIndex) => {
|
rows.forEach((row, rowIndex) => {
|
||||||
const locked = this.isWaybillCompleted(row);
|
const locked = this.isRunningEdit
|
||||||
|
? this.isWaybillUnloadPunched(row)
|
||||||
|
: this.isWaybillCompleted(row);
|
||||||
const arrival = row.arrivalAddress || row.arrivalName;
|
const arrival = row.arrivalAddress || row.arrivalName;
|
||||||
appendNode(
|
appendNode(
|
||||||
arrival,
|
arrival,
|
||||||
@@ -3901,7 +4201,9 @@ export default {
|
|||||||
if (
|
if (
|
||||||
originalLockedKeys.some((key, lockedIndex) => key && key !== nextLockedKeys[lockedIndex])
|
originalLockedKeys.some((key, lockedIndex) => key && key !== nextLockedKeys[lockedIndex])
|
||||||
) {
|
) {
|
||||||
ElMessage.warning('已完成运单对应的路线不可调整');
|
ElMessage.warning(
|
||||||
|
this.isRunningEdit ? '已打卡地点不可调整,新地址只能在未打卡节点间拖拽' : '已完成运单对应的路线不可调整'
|
||||||
|
);
|
||||||
this.routeDragIndex = -1;
|
this.routeDragIndex = -1;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -3941,14 +4243,28 @@ export default {
|
|||||||
return [this.normalizeCargoRow(row, row)];
|
return [this.normalizeCargoRow(row, row)];
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
formatCargoQuantityDisplay(row = {}) {
|
||||||
|
const quantity = blankCargoSentinel(row.quantity ?? row.cargoQuantity ?? '');
|
||||||
|
const unit = String(
|
||||||
|
blankCargoSentinel(
|
||||||
|
row.quantityUnit ||
|
||||||
|
row.goodsQuantityUnit ||
|
||||||
|
row.cargoUnit ||
|
||||||
|
row.unit ||
|
||||||
|
''
|
||||||
|
) || ''
|
||||||
|
).trim();
|
||||||
|
if (quantity === '' || quantity === undefined || quantity === null) {
|
||||||
|
return unit || '';
|
||||||
|
}
|
||||||
|
return unit ? `${quantity} ${unit}` : String(quantity);
|
||||||
|
},
|
||||||
normalizeCargoRow(waybill, item = {}) {
|
normalizeCargoRow(waybill, item = {}) {
|
||||||
return sanitizeCargoRow({
|
return sanitizeCargoRow({
|
||||||
projectName: item.projectName || waybill.projectName || '',
|
projectName: item.projectName || waybill.projectName || '',
|
||||||
cargoName: item.cargoName || item.goodsName || waybill.cargoName || '',
|
cargoName: item.cargoName || item.goodsName || waybill.cargoName || '',
|
||||||
cargoType: item.cargoType || item.goodsType || waybill.cargoType || '',
|
cargoType: item.cargoType || item.goodsType || waybill.cargoType || '',
|
||||||
packageType: item.packageType || item.package || '',
|
packageType: item.packageType || item.package || '',
|
||||||
weight: item.weight || item.cargoWeight || '',
|
|
||||||
volume: item.volume || item.cargoVolume || '',
|
|
||||||
quantity: item.quantity || item.cargoQuantity || waybill.quantity || '',
|
quantity: item.quantity || item.cargoQuantity || waybill.quantity || '',
|
||||||
quantityUnit:
|
quantityUnit:
|
||||||
item.quantityUnit ||
|
item.quantityUnit ||
|
||||||
@@ -4145,15 +4461,15 @@ export default {
|
|||||||
try {
|
try {
|
||||||
const payload = {
|
const payload = {
|
||||||
...this.normalizePayload(),
|
...this.normalizePayload(),
|
||||||
// 确认生成正式配载单(待执行),覆盖草稿状态
|
// 进行中编辑保持 running;新建/草稿确认由后端按项目是否需接单写入 pending/running
|
||||||
businessStatus: 'pending',
|
...(this.isRunningEdit ? { businessStatus: 'running' } : {}),
|
||||||
};
|
};
|
||||||
if (this.dialogMode === 'reassign') {
|
if (this.dialogMode === 'reassign') {
|
||||||
await loadingApi.reassign(payload);
|
await loadingApi.reassign(payload);
|
||||||
ElMessage.success('派单成功');
|
ElMessage.success('派单成功');
|
||||||
} else {
|
} else {
|
||||||
await loadingApi.submit(payload);
|
await loadingApi.submit(payload);
|
||||||
ElMessage.success('确认成功');
|
ElMessage.success(this.isRunningEdit ? '保存成功' : '确认成功');
|
||||||
}
|
}
|
||||||
sessionStorage.setItem(loadingManageListRefreshKey, '1');
|
sessionStorage.setItem(loadingManageListRefreshKey, '1');
|
||||||
this.closeLoadingDialog();
|
this.closeLoadingDialog();
|
||||||
@@ -4273,12 +4589,6 @@ export default {
|
|||||||
this.dialogForm.escortPhone = '';
|
this.dialogForm.escortPhone = '';
|
||||||
this.driverOptions = [];
|
this.driverOptions = [];
|
||||||
},
|
},
|
||||||
getDialogCarrierFilter() {
|
|
||||||
return {
|
|
||||||
carrierId: this.dialogForm.carrierId || '',
|
|
||||||
carrierName: this.dialogForm.carrierName || '',
|
|
||||||
};
|
|
||||||
},
|
|
||||||
handleDriverChange(value) {
|
handleDriverChange(value) {
|
||||||
const driver = this.driverOptions.find(item => (item.driverName || item.name) === value);
|
const driver = this.driverOptions.find(item => (item.driverName || item.name) === value);
|
||||||
if (driver && !this.dialogForm.driverPhone) {
|
if (driver && !this.dialogForm.driverPhone) {
|
||||||
@@ -4312,16 +4622,12 @@ export default {
|
|||||||
},
|
},
|
||||||
fetchEscortSuggestions(queryString, callback) {
|
fetchEscortSuggestions(queryString, callback) {
|
||||||
const keyword = String(queryString || '').trim();
|
const keyword = String(queryString || '').trim();
|
||||||
const carrier = this.getDialogCarrierFilter();
|
|
||||||
if (!carrier.carrierId && !carrier.carrierName) {
|
|
||||||
callback([]);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.escortLoading = true;
|
this.escortLoading = true;
|
||||||
fetchDriversByCarrierOrganizations(
|
fetchDriverCandidates({
|
||||||
{ size: 20, ...(keyword ? { driverName: keyword } : {}), posts: '押运员' },
|
size: 20,
|
||||||
carrier
|
...(keyword ? { driverName: keyword } : {}),
|
||||||
)
|
posts: '押运员',
|
||||||
|
})
|
||||||
.then(records => {
|
.then(records => {
|
||||||
callback(
|
callback(
|
||||||
records.map(item => ({
|
records.map(item => ({
|
||||||
@@ -4401,17 +4707,13 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
async loadDialogDriverOptions(keyword = '') {
|
async loadDialogDriverOptions(keyword = '') {
|
||||||
const carrier = this.getDialogCarrierFilter();
|
|
||||||
if (!carrier.carrierId && !carrier.carrierName) {
|
|
||||||
this.driverOptions = [];
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
this.driverLoading = true;
|
this.driverLoading = true;
|
||||||
try {
|
try {
|
||||||
this.driverOptions = await fetchDriversByCarrierOrganizations(
|
this.driverOptions = await fetchDriverCandidates({
|
||||||
{ size: 20, ...(keyword ? { driverName: keyword } : {}), posts: '司机' },
|
size: 20,
|
||||||
carrier
|
...(keyword ? { driverName: keyword } : {}),
|
||||||
);
|
posts: '司机',
|
||||||
|
});
|
||||||
return this.driverOptions;
|
return this.driverOptions;
|
||||||
} finally {
|
} finally {
|
||||||
this.driverLoading = false;
|
this.driverLoading = false;
|
||||||
@@ -4442,10 +4744,13 @@ export default {
|
|||||||
}
|
}
|
||||||
this.taskCarrierLoading = true;
|
this.taskCarrierLoading = true;
|
||||||
try {
|
try {
|
||||||
const projectIds = [
|
// 配载单只有一个项目;传入子运单后按客户合同乙方=承运商合同甲方匹配并取承运商合同乙方交集
|
||||||
...new Set(this.selectedWaybillRows.map(row => row.projectId).filter(Boolean)),
|
const projectId = this.selectedWaybillRows.map(row => row.projectId).find(Boolean);
|
||||||
];
|
const waybillIds = this.selectedWaybillRows.map(row => row.id).filter(Boolean);
|
||||||
const response = await loadingApi.getCarrierContracts(projectIds);
|
const response = await loadingApi.getCarrierContracts(
|
||||||
|
projectId ? [projectId] : [],
|
||||||
|
waybillIds
|
||||||
|
);
|
||||||
if (requestId !== this.taskCarrierRequestId) return [];
|
if (requestId !== this.taskCarrierRequestId) return [];
|
||||||
const contracts = response.data?.data || response.data || [];
|
const contracts = response.data?.data || response.data || [];
|
||||||
if (this.dialogForm.carrierType !== '自运') {
|
if (this.dialogForm.carrierType !== '自运') {
|
||||||
@@ -4787,6 +5092,16 @@ export default {
|
|||||||
color: #909399;
|
color: #909399;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.loading-manage-dialog__route-hint {
|
||||||
|
color: #909399;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.loading-manage-dialog__locked-tip {
|
||||||
|
color: #909399;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
.loading-manage-dialog__route-type {
|
.loading-manage-dialog__route-type {
|
||||||
width: 28px;
|
width: 28px;
|
||||||
height: 28px;
|
height: 28px;
|
||||||
|
|||||||
@@ -245,7 +245,7 @@
|
|||||||
<el-radio-group
|
<el-radio-group
|
||||||
v-model="row.confirmMode"
|
v-model="row.confirmMode"
|
||||||
:disabled="dialogReadonly || !row.enabled"
|
:disabled="dialogReadonly || !row.enabled"
|
||||||
@change="handleReturnConfirmChange(row)"
|
@change="syncNodeFields"
|
||||||
>
|
>
|
||||||
<el-radio label="yes">是</el-radio>
|
<el-radio label="yes">是</el-radio>
|
||||||
<el-radio label="no_confirm_complete">无需确认完成</el-radio>
|
<el-radio label="no_confirm_complete">无需确认完成</el-radio>
|
||||||
@@ -253,10 +253,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="process-config-form__require-line">
|
<div class="process-config-form__require-line">
|
||||||
<span class="process-config-form__require-label">确认完成</span>
|
<span class="process-config-form__require-label">确认完成</span>
|
||||||
<el-checkbox
|
<el-checkbox v-model="row.confirmInternal" :disabled="true"
|
||||||
v-model="row.confirmInternal"
|
|
||||||
:disabled="dialogReadonly || !row.enabled || row.confirmMode !== 'yes'"
|
|
||||||
@change="syncNodeFields"
|
|
||||||
>内部人员</el-checkbox
|
>内部人员</el-checkbox
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
@@ -492,6 +489,12 @@ const NODE_TEMPLATES = [
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
// 过程配置必须覆盖装货端与卸货端各一个节点;货量下限只看装货端——
|
||||||
|
// 到场没有货量开关,不能拿它顶替货量采集
|
||||||
|
const PICKUP_NODE_KEYS = ['arrive_scene', 'load', 'dispatch'];
|
||||||
|
const DELIVERY_NODE_KEYS = ['unload', 'arrival', 'sign', 'return'];
|
||||||
|
const CARGO_NODE_KEYS = ['load', 'dispatch'];
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -538,7 +541,6 @@ export default {
|
|||||||
created() {
|
created() {
|
||||||
this.resetNodeRows();
|
this.resetNodeRows();
|
||||||
this.loadProjectOptions('');
|
this.loadProjectOptions('');
|
||||||
this.applyDefaultDeptSearch();
|
|
||||||
this.initDeptOptions();
|
this.initDeptOptions();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -549,15 +551,18 @@ export default {
|
|||||||
row.confirmDriver = row.confirmMode === 'yes';
|
row.confirmDriver = row.confirmMode === 'yes';
|
||||||
this.syncNodeFields();
|
this.syncNodeFields();
|
||||||
},
|
},
|
||||||
handleReturnConfirmChange(row) {
|
|
||||||
row.confirmInternal = row.confirmMode === 'yes';
|
|
||||||
this.syncNodeFields();
|
|
||||||
},
|
|
||||||
enforceAcceptDriver(node) {
|
enforceAcceptDriver(node) {
|
||||||
if (!node || (node.key !== 'accept' && node.name !== '接单')) return node;
|
if (!node || (node.key !== 'accept' && node.name !== '接单')) return node;
|
||||||
node.confirmDriver = node.confirmMode === 'yes';
|
node.confirmDriver = node.confirmMode === 'yes';
|
||||||
return node;
|
return node;
|
||||||
},
|
},
|
||||||
|
// 回单「确认完成」只有内部人员一种角色,是否确认为「是」时即由内部人员确认,
|
||||||
|
// 界面上只读展示,值始终由 confirmMode 推导
|
||||||
|
enforceReturnInternal(node) {
|
||||||
|
if (!node || (node.key !== 'return' && node.name !== '回单')) return node;
|
||||||
|
node.confirmInternal = node.confirmMode === 'yes';
|
||||||
|
return node;
|
||||||
|
},
|
||||||
initDeptOptions() {
|
initDeptOptions() {
|
||||||
getDeptTree(this.userInfo.tenantId).then(res => {
|
getDeptTree(this.userInfo.tenantId).then(res => {
|
||||||
const deptColumn = this.findColumn(this.option.column, 'searchDeptId');
|
const deptColumn = this.findColumn(this.option.column, 'searchDeptId');
|
||||||
@@ -566,27 +571,6 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
defaultDeptId() {
|
|
||||||
const raw = (this.userInfo && (this.userInfo.deptId || this.userInfo.dept_id)) || '';
|
|
||||||
return (
|
|
||||||
String(raw)
|
|
||||||
.split(',')
|
|
||||||
.map(item => item.trim())
|
|
||||||
.filter(Boolean)[0] || ''
|
|
||||||
);
|
|
||||||
},
|
|
||||||
applyDefaultDeptSearch() {
|
|
||||||
const deptId = this.defaultDeptId();
|
|
||||||
const deptColumn = this.findColumn(this.option.column, 'searchDeptId');
|
|
||||||
if (!deptId || !deptColumn) return;
|
|
||||||
deptColumn.searchValue = deptId;
|
|
||||||
this.query = { ...this.query, deptId };
|
|
||||||
this.$nextTick(() => {
|
|
||||||
if (this.$refs.crud?.searchForm) {
|
|
||||||
this.$refs.crud.searchForm.searchDeptId = deptId;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
flattenDept(tree, level = 0) {
|
flattenDept(tree, level = 0) {
|
||||||
return tree.flatMap(item => {
|
return tree.flatMap(item => {
|
||||||
const id =
|
const id =
|
||||||
@@ -724,7 +708,7 @@ export default {
|
|||||||
this.projectLoading = true;
|
this.projectLoading = true;
|
||||||
return getProjectList(1, 50, {
|
return getProjectList(1, 50, {
|
||||||
projectName: keyword,
|
projectName: keyword,
|
||||||
approvalStatus: 'approved',
|
approvalStatuses: 'approved,change_approved',
|
||||||
allDept: this.isAdmin ? 1 : 0,
|
allDept: this.isAdmin ? 1 : 0,
|
||||||
})
|
})
|
||||||
.then(res => {
|
.then(res => {
|
||||||
@@ -808,7 +792,10 @@ export default {
|
|||||||
this.syncNodeFields();
|
this.syncNodeFields();
|
||||||
},
|
},
|
||||||
syncNodeFields() {
|
syncNodeFields() {
|
||||||
this.nodeRows.forEach(item => this.enforceAcceptDriver(item));
|
this.nodeRows.forEach(item => {
|
||||||
|
this.enforceAcceptDriver(item);
|
||||||
|
this.enforceReturnInternal(item);
|
||||||
|
});
|
||||||
const enabledNodes = this.nodeRows.filter(item => item.enabled);
|
const enabledNodes = this.nodeRows.filter(item => item.enabled);
|
||||||
this.form.includedNodes = enabledNodes.map(item => item.name).join(',');
|
this.form.includedNodes = enabledNodes.map(item => item.name).join(',');
|
||||||
this.form.nodeConfigJson = JSON.stringify(
|
this.form.nodeConfigJson = JSON.stringify(
|
||||||
@@ -935,8 +922,24 @@ export default {
|
|||||||
this.$message.warning('备注不能超过500个字符');
|
this.$message.warning('备注不能超过500个字符');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!this.enabledNodes.length) {
|
const isEnabledNode = key => this.nodeRows.some(item => item.key === key && item.enabled);
|
||||||
this.$message.warning('请至少选择一个过程节点');
|
if (!PICKUP_NODE_KEYS.some(isEnabledNode)) {
|
||||||
|
this.$message.warning('发货、装货、到场至少选择一个');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!DELIVERY_NODE_KEYS.some(isEnabledNode)) {
|
||||||
|
this.$message.warning('卸货、到货、签收、回单至少选择一个');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
// 装货端没有节点采集货量时,整条配置在小程序侧等于不采集货量
|
||||||
|
const collectsCargo = CARGO_NODE_KEYS.some(key =>
|
||||||
|
this.nodeRows.some(
|
||||||
|
item =>
|
||||||
|
item.key === key && item.enabled && item.uploadCargo && (item.cargoTypes || []).length
|
||||||
|
)
|
||||||
|
);
|
||||||
|
if (!collectsCargo) {
|
||||||
|
this.$message.warning('发货或装货至少勾选一个货量类型');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
const transit = this.nodeRows.find(item => item.key === 'transit');
|
const transit = this.nodeRows.find(item => item.key === 'transit');
|
||||||
@@ -1110,7 +1113,6 @@ export default {
|
|||||||
},
|
},
|
||||||
searchReset() {
|
searchReset() {
|
||||||
this.query = {};
|
this.query = {};
|
||||||
this.applyDefaultDeptSearch();
|
|
||||||
this.page.currentPage = 1;
|
this.page.currentPage = 1;
|
||||||
this.onLoad(this.page, this.query);
|
this.onLoad(this.page, this.query);
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -84,7 +84,8 @@ export default {
|
|||||||
this.postFormData('save', lbpmFormValues, this.buildFormData());
|
this.postFormData('save', lbpmFormValues, this.buildFormData());
|
||||||
},
|
},
|
||||||
postFormData(status, formValues, formData) {
|
postFormData(status, formValues, formData) {
|
||||||
postMkPublicProcessMessage('project-apply', {
|
const bizType = this.$route.meta?.bizType || 'project-apply';
|
||||||
|
postMkPublicProcessMessage(bizType, {
|
||||||
status,
|
status,
|
||||||
formValues: formValues || {},
|
formValues: formValues || {},
|
||||||
formData,
|
formData,
|
||||||
|
|||||||
@@ -52,12 +52,37 @@
|
|||||||
>
|
>
|
||||||
批量删除
|
批量删除
|
||||||
</el-button>
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
type="warning"
|
||||||
|
plain
|
||||||
|
v-if="!readonlyScope && hcsImmediateEnabled"
|
||||||
|
:loading="hcsRepushingId === 'batch'"
|
||||||
|
@click="handleHcsBatchRepush"
|
||||||
|
>
|
||||||
|
<el-icon class="el-icon--left"><Position /></el-icon>批量推送合规
|
||||||
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template #approvalStatus="{ row }">
|
<template #approvalStatus="{ row }">
|
||||||
{{ displayStatus(row, 'approvalStatus') }}
|
{{ displayStatus(row, 'approvalStatus') }}
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<template #hcsSyncStatus="{ row }">
|
||||||
|
<el-tooltip v-if="row.hcsSyncMsg" placement="top" :content="row.hcsSyncMsg">
|
||||||
|
<el-tag :type="hcsSyncTagType(row.hcsSyncStatus)" class="status-text">
|
||||||
|
{{ hcsSyncLabel(row.hcsSyncStatus) }}
|
||||||
|
</el-tag>
|
||||||
|
</el-tooltip>
|
||||||
|
<el-tag
|
||||||
|
v-else-if="row.hcsSyncStatus"
|
||||||
|
:type="hcsSyncTagType(row.hcsSyncStatus)"
|
||||||
|
class="status-text"
|
||||||
|
>
|
||||||
|
{{ hcsSyncLabel(row.hcsSyncStatus) }}
|
||||||
|
</el-tag>
|
||||||
|
<span v-else>-</span>
|
||||||
|
</template>
|
||||||
|
|
||||||
<template #header>
|
<template #header>
|
||||||
<div class="project-apply-page__risk-search">
|
<div class="project-apply-page__risk-search">
|
||||||
<span class="project-apply-page__risk-label">
|
<span class="project-apply-page__risk-label">
|
||||||
@@ -128,6 +153,13 @@
|
|||||||
>
|
>
|
||||||
{{ operation.label }}
|
{{ operation.label }}
|
||||||
</el-link>
|
</el-link>
|
||||||
|
<el-link
|
||||||
|
v-if="hcsImmediateEnabled && canHcsRepush(row)"
|
||||||
|
type="warning"
|
||||||
|
@click="handleHcsRepush(row)"
|
||||||
|
>
|
||||||
|
{{ hcsRepushingId === row.id ? '推送中…' : '推送合规' }}
|
||||||
|
</el-link>
|
||||||
<el-link type="danger" v-if="canDelete(row)" @click="rowDel(row)"> 删除 </el-link>
|
<el-link type="danger" v-if="canDelete(row)" @click="rowDel(row)"> 删除 </el-link>
|
||||||
</template>
|
</template>
|
||||||
</avue-crud>
|
</avue-crud>
|
||||||
@@ -217,35 +249,63 @@
|
|||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="业务部门" prop="businessDeptId">
|
<el-form-item label="业务部门" prop="businessDeptId">
|
||||||
<el-cascader
|
<el-tooltip
|
||||||
v-model="businessDeptCascaderValue"
|
placement="top"
|
||||||
:options="businessDeptTreeOptions"
|
:disabled="!shouldShowBusinessDeptTooltip"
|
||||||
:props="deptCascaderProps"
|
:show-after="200"
|
||||||
placeholder="请选择"
|
>
|
||||||
filterable
|
<template #content>
|
||||||
clearable
|
<div class="project-apply-form__field-tooltip">{{ businessDeptTooltipText }}</div>
|
||||||
:disabled="isBasicInfoReadonly"
|
</template>
|
||||||
/>
|
<span class="project-apply-form__field-tooltip-trigger">
|
||||||
|
<el-select
|
||||||
|
v-model="form.businessDeptId"
|
||||||
|
placeholder="请选择"
|
||||||
|
filterable
|
||||||
|
clearable
|
||||||
|
:disabled="dialogReadonly"
|
||||||
|
@change="handleBusinessDeptChange"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in deptOptions"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</span>
|
||||||
|
</el-tooltip>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="平台公司" prop="undertakeDeptId">
|
<el-form-item label="平台公司" prop="undertakeDeptId">
|
||||||
<el-select
|
<el-tooltip
|
||||||
v-model="form.undertakeDeptId"
|
placement="top"
|
||||||
placeholder="请选择"
|
:disabled="!shouldShowUndertakeDeptTooltip"
|
||||||
multiple
|
:show-after="200"
|
||||||
collapse-tags
|
|
||||||
collapse-tags-tooltip
|
|
||||||
clearable
|
|
||||||
filterable
|
|
||||||
:disabled="isBasicInfoReadonly"
|
|
||||||
@change="handleUndertakeDeptChange"
|
|
||||||
>
|
>
|
||||||
<el-option
|
<template #content>
|
||||||
v-for="item in platformCompanyOptions"
|
<div class="project-apply-form__field-tooltip">{{ undertakeDeptTooltipText }}</div>
|
||||||
:key="item.value"
|
</template>
|
||||||
:label="item.label"
|
<span class="project-apply-form__field-tooltip-trigger">
|
||||||
:value="item.value"
|
<el-select
|
||||||
/>
|
v-model="form.undertakeDeptId"
|
||||||
</el-select>
|
placeholder="请选择"
|
||||||
|
multiple
|
||||||
|
collapse-tags
|
||||||
|
collapse-tags-tooltip
|
||||||
|
clearable
|
||||||
|
filterable
|
||||||
|
:disabled="dialogReadonly"
|
||||||
|
@change="handleUndertakeDeptChange"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in platformCompanyOptions"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</span>
|
||||||
|
</el-tooltip>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="项目由来" prop="projectSource">
|
<el-form-item label="项目由来" prop="projectSource">
|
||||||
<el-select
|
<el-select
|
||||||
@@ -778,7 +838,21 @@
|
|||||||
<template v-if="isChangeDialog">
|
<template v-if="isChangeDialog">
|
||||||
<el-button v-if="!isProjectFormPage" @click="handleCancelProject">取消</el-button>
|
<el-button v-if="!isProjectFormPage" @click="handleCancelProject">取消</el-button>
|
||||||
<el-button v-if="isProjectFormPage" @click="closeProjectForm">取消</el-button>
|
<el-button v-if="isProjectFormPage" @click="closeProjectForm">取消</el-button>
|
||||||
<el-button type="primary" :loading="submitLoading" @click="submitChangeProject">
|
<el-button
|
||||||
|
v-if="isProjectChangeModule && !dialogReadonly"
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
:loading="submitLoading"
|
||||||
|
@click="saveProjectChangeDraft"
|
||||||
|
>
|
||||||
|
保存
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
v-if="!dialogReadonly"
|
||||||
|
type="primary"
|
||||||
|
:loading="submitLoading"
|
||||||
|
@click="submitChangeProject"
|
||||||
|
>
|
||||||
提交
|
提交
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
@@ -916,12 +990,18 @@
|
|||||||
import { exportBlob } from '@/api/common';
|
import { exportBlob } from '@/api/common';
|
||||||
import { defineAsyncComponent } from 'vue';
|
import { defineAsyncComponent } from 'vue';
|
||||||
import * as api from '@/api/business/project-apply';
|
import * as api from '@/api/business/project-apply';
|
||||||
|
import {
|
||||||
|
loadHcsImmediateEnabled,
|
||||||
|
repush as hcsRepush,
|
||||||
|
repushBatch as hcsRepushBatch,
|
||||||
|
} from '@/api/business/hcs';
|
||||||
|
import { Position } from '@element-plus/icons-vue';
|
||||||
import { getMkPublicDetail } from '@/api/mk-process';
|
import { getMkPublicDetail } from '@/api/mk-process';
|
||||||
import {
|
import {
|
||||||
getList as getCustomerArchiveList,
|
getList as getCustomerArchiveList,
|
||||||
getDetail as getCustomerArchiveDetail,
|
getDetail as getCustomerArchiveDetail,
|
||||||
} from '@/api/vehicle/customer-archive';
|
} from '@/api/vehicle/customer-archive';
|
||||||
import { getDeptTree, getPlatformCompanySelect } from '@/api/system/dept';
|
import { getBusinessDeptSelect, getPlatformCompanySelect } from '@/api/system/dept';
|
||||||
import { getDictionary as getSystemDictionary } from '@/api/system/dict';
|
import { getDictionary as getSystemDictionary } from '@/api/system/dict';
|
||||||
import { getDictionary as getBizDictionary } from '@/api/system/dictbiz';
|
import { getDictionary as getBizDictionary } from '@/api/system/dictbiz';
|
||||||
import { getList as getUserList } from '@/api/system/user';
|
import { getList as getUserList } from '@/api/system/user';
|
||||||
@@ -951,6 +1031,7 @@ import {
|
|||||||
projectTypeOptions,
|
projectTypeOptions,
|
||||||
} from '@/option/business/common';
|
} from '@/option/business/common';
|
||||||
import { config, option } from '@/option/business/project-apply';
|
import { config, option } from '@/option/business/project-apply';
|
||||||
|
import * as projectChangeApi from '@/api/business/project-change';
|
||||||
|
|
||||||
const emptyForm = () => ({
|
const emptyForm = () => ({
|
||||||
projectType: '',
|
projectType: '',
|
||||||
@@ -1026,6 +1107,9 @@ const attachmentViewerPlugins = [
|
|||||||
const projectApplyListRoute = '/business/project-apply';
|
const projectApplyListRoute = '/business/project-apply';
|
||||||
const projectApplyFormRoute = '/business/project-apply/form';
|
const projectApplyFormRoute = '/business/project-apply/form';
|
||||||
const projectApplyListRefreshKey = 'project-apply-list-refresh';
|
const projectApplyListRefreshKey = 'project-apply-list-refresh';
|
||||||
|
const projectChangeListRoute = '/business/project-change';
|
||||||
|
const projectChangeFormRoute = '/business/project-change/form';
|
||||||
|
const projectChangeListRefreshKey = 'project-change-list-refresh';
|
||||||
|
|
||||||
const otherAttachmentType = { label: '其他附件', value: '其他附件' };
|
const otherAttachmentType = { label: '其他附件', value: '其他附件' };
|
||||||
|
|
||||||
@@ -1060,6 +1144,7 @@ export default {
|
|||||||
ElImageViewer,
|
ElImageViewer,
|
||||||
OpenFileViewer,
|
OpenFileViewer,
|
||||||
PdfPreview,
|
PdfPreview,
|
||||||
|
Position,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
const validateAmount = (rule, value, callback) => {
|
const validateAmount = (rule, value, callback) => {
|
||||||
@@ -1121,6 +1206,9 @@ export default {
|
|||||||
{ label: '高风险', value: 'high', statKey: 'high' },
|
{ label: '高风险', value: 'high', statKey: 'high' },
|
||||||
{ label: '中风险', value: 'medium', statKey: 'medium' },
|
{ label: '中风险', value: 'medium', statKey: 'medium' },
|
||||||
],
|
],
|
||||||
|
// 合规(HCS)推送状态;受 thirdParty.hcs.push.immediate-enabled 控制显隐
|
||||||
|
hcsRepushingId: null,
|
||||||
|
hcsImmediateEnabled: false,
|
||||||
page: {
|
page: {
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
pageSizes: [10, 20, 50, 100],
|
pageSizes: [10, 20, 50, 100],
|
||||||
@@ -1208,7 +1296,40 @@ export default {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
changeReason: [
|
changeReason: [
|
||||||
{ max: 2000, message: '变更原因不能超过2000个字符', trigger: 'blur' },
|
{
|
||||||
|
validator: (rule, value, callback) => {
|
||||||
|
if (!this.isChangeDialog) {
|
||||||
|
callback();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!value || !String(value).trim()) {
|
||||||
|
callback(new Error('请输入变更原因'));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (String(value).length > 2000) {
|
||||||
|
callback(new Error('变更原因不能超过2000个字符'));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
callback();
|
||||||
|
},
|
||||||
|
trigger: 'blur',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
changeType: [
|
||||||
|
{
|
||||||
|
validator: (rule, value, callback) => {
|
||||||
|
if (!this.isChangeDialog) {
|
||||||
|
callback();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!value) {
|
||||||
|
callback(new Error('请选择变更类型'));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
callback();
|
||||||
|
},
|
||||||
|
trigger: 'change',
|
||||||
|
},
|
||||||
],
|
],
|
||||||
projectIntro: [
|
projectIntro: [
|
||||||
{ max: 1000, message: '项目简介不能超过1000个字符', trigger: 'blur' },
|
{ max: 1000, message: '项目简介不能超过1000个字符', trigger: 'blur' },
|
||||||
@@ -1224,7 +1345,6 @@ export default {
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
deptOptions: [],
|
deptOptions: [],
|
||||||
businessDeptTreeOptions: [],
|
|
||||||
platformCompanyOptions: [],
|
platformCompanyOptions: [],
|
||||||
cargoTypeOptions: [],
|
cargoTypeOptions: [],
|
||||||
selectedCustomerId: [],
|
selectedCustomerId: [],
|
||||||
@@ -1289,30 +1409,27 @@ export default {
|
|||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters(['permission', 'userInfo']),
|
...mapGetters(['permission', 'userInfo']),
|
||||||
// 部门级联配置:checkStrictly 允许选中任意层级,不必选到末级
|
// 查看态禁用控件无 hover,用业务部门名称做 tooltip
|
||||||
deptCascaderProps() {
|
businessDeptTooltipText() {
|
||||||
return {
|
const id = this.form.businessDeptId;
|
||||||
label: 'label',
|
if (id) {
|
||||||
value: 'value',
|
const matched = this.deptOptions.find(item => String(item.value) === String(id));
|
||||||
children: 'children',
|
if (matched?.rawLabel || matched?.label) {
|
||||||
emitPath: true,
|
return matched.rawLabel || matched.label;
|
||||||
checkStrictly: true,
|
}
|
||||||
expandTrigger: 'click',
|
}
|
||||||
};
|
return String(this.form.businessDeptName || '').trim();
|
||||||
},
|
},
|
||||||
// 业务部门:form 存部门 id,级联控件用根到节点的 id 路径,两者在此双向转换
|
undertakeDeptTooltipText() {
|
||||||
businessDeptCascaderValue: {
|
const name = String(this.form.undertakeDeptName || '').trim();
|
||||||
get() {
|
if (name) return name;
|
||||||
const id = this.form.businessDeptId;
|
return this.resolveUndertakeDeptNames(this.parseUndertakeDeptIds(this.form.undertakeDeptId));
|
||||||
return id ? this.findDeptPath(id, this.businessDeptTreeOptions) || [id] : [];
|
},
|
||||||
},
|
shouldShowBusinessDeptTooltip() {
|
||||||
set(path) {
|
return this.dialogReadonly && !!this.businessDeptTooltipText;
|
||||||
const value = Array.isArray(path)
|
},
|
||||||
? path.filter(item => item !== undefined && item !== null && item !== '')
|
shouldShowUndertakeDeptTooltip() {
|
||||||
: [];
|
return this.dialogReadonly && !!this.undertakeDeptTooltipText;
|
||||||
this.form.businessDeptId = value.length ? value.at(-1) : '';
|
|
||||||
this.handleBusinessDeptChange(this.form.businessDeptId);
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
permissionList() {
|
permissionList() {
|
||||||
return {
|
return {
|
||||||
@@ -1337,8 +1454,11 @@ export default {
|
|||||||
isMajorProjectSupplementDialog() {
|
isMajorProjectSupplementDialog() {
|
||||||
return this.dialogType === 'majorSupplement';
|
return this.dialogType === 'majorSupplement';
|
||||||
},
|
},
|
||||||
|
isProjectChangeModule() {
|
||||||
|
return this.$route.path === projectChangeFormRoute;
|
||||||
|
},
|
||||||
isChangeDialog() {
|
isChangeDialog() {
|
||||||
return this.dialogType === 'change';
|
return this.dialogType === 'change' || this.isProjectChangeModule;
|
||||||
},
|
},
|
||||||
isNewProjectDialog() {
|
isNewProjectDialog() {
|
||||||
return ['add', 'majorSupplement'].includes(this.dialogType);
|
return ['add', 'majorSupplement'].includes(this.dialogType);
|
||||||
@@ -1347,7 +1467,13 @@ export default {
|
|||||||
return this.isFormPageInstance;
|
return this.isFormPageInstance;
|
||||||
},
|
},
|
||||||
isPublicViewPage() {
|
isPublicViewPage() {
|
||||||
return this.$route.path === '/business/project-apply/public-view';
|
return (
|
||||||
|
this.$route.path === '/business/project-apply/public-view' ||
|
||||||
|
this.$route.path === '/business/project-change/public-view'
|
||||||
|
);
|
||||||
|
},
|
||||||
|
publicBizType() {
|
||||||
|
return this.$route.meta?.bizType || 'project-apply';
|
||||||
},
|
},
|
||||||
projectFormContainer() {
|
projectFormContainer() {
|
||||||
// 表单页实例始终用页面容器,避免 keep-alive 失活时误切弹窗
|
// 表单页实例始终用页面容器,避免 keep-alive 失活时误切弹窗
|
||||||
@@ -1410,11 +1536,18 @@ export default {
|
|||||||
.catch(() => {
|
.catch(() => {
|
||||||
this.mkEnabled = false;
|
this.mkEnabled = false;
|
||||||
});
|
});
|
||||||
|
loadHcsImmediateEnabled()
|
||||||
|
.then(enabled => {
|
||||||
|
this.hcsImmediateEnabled = !!enabled;
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.hcsImmediateEnabled = false;
|
||||||
|
});
|
||||||
this.loadDeptOptions();
|
this.loadDeptOptions();
|
||||||
this.loadCargoTypeOptions();
|
this.loadCargoTypeOptions();
|
||||||
this.loadTransportTypeOptions();
|
this.loadTransportTypeOptions();
|
||||||
this.loadSettlementModeOptions();
|
this.loadSettlementModeOptions();
|
||||||
if (this.$route.path === projectApplyFormRoute) {
|
if (this.$route.path === projectApplyFormRoute || this.$route.path === projectChangeFormRoute) {
|
||||||
this.isFormPageInstance = true;
|
this.isFormPageInstance = true;
|
||||||
this.openProjectFormPage();
|
this.openProjectFormPage();
|
||||||
}
|
}
|
||||||
@@ -1480,14 +1613,14 @@ export default {
|
|||||||
},
|
},
|
||||||
openPublicProjectForm() {
|
openPublicProjectForm() {
|
||||||
const id = this.$route.query.id;
|
const id = this.$route.query.id;
|
||||||
this.dialogType = 'view';
|
this.dialogType = this.publicBizType === 'project-change' ? 'change' : 'view';
|
||||||
this.dialogReadonly = true;
|
this.dialogReadonly = true;
|
||||||
this.projectBox = true;
|
this.projectBox = true;
|
||||||
if (!id) {
|
if (!id) {
|
||||||
this.$message.error('缺少项目ID');
|
this.$message.error('缺少项目ID');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
getMkPublicDetail('project-apply', id)
|
getMkPublicDetail(this.publicBizType, id)
|
||||||
.then(res => {
|
.then(res => {
|
||||||
const detail = res.data?.data || {};
|
const detail = res.data?.data || {};
|
||||||
this.applyPublicDictOptions(detail);
|
this.applyPublicDictOptions(detail);
|
||||||
@@ -1515,9 +1648,10 @@ export default {
|
|||||||
detail.settlementMode
|
detail.settlementMode
|
||||||
);
|
);
|
||||||
if (detail.businessDeptId) {
|
if (detail.businessDeptId) {
|
||||||
const label = detail.businessDeptName || String(detail.businessDeptId);
|
const id = String(detail.businessDeptId);
|
||||||
this.businessDeptTreeOptions = [{ label, value: detail.businessDeptId }];
|
const label = detail.businessDeptName || id;
|
||||||
this.deptOptions = [{ label, rawLabel: label, value: detail.businessDeptId }];
|
this.form.businessDeptId = id;
|
||||||
|
this.deptOptions = [{ label, rawLabel: label, value: id }];
|
||||||
}
|
}
|
||||||
const undertakeDeptIds = this.parseUndertakeDeptIds(detail.undertakeDeptId);
|
const undertakeDeptIds = this.parseUndertakeDeptIds(detail.undertakeDeptId);
|
||||||
const undertakeDeptNames = this.parseUndertakeDeptNames(detail.undertakeDeptName);
|
const undertakeDeptNames = this.parseUndertakeDeptNames(detail.undertakeDeptName);
|
||||||
@@ -1550,15 +1684,32 @@ export default {
|
|||||||
openProjectFormPage() {
|
openProjectFormPage() {
|
||||||
const type = this.$route.query.mode || 'add';
|
const type = this.$route.query.mode || 'add';
|
||||||
const id = this.$route.query.id;
|
const id = this.$route.query.id;
|
||||||
this.dialogType = type;
|
this.dialogType = this.isProjectChangeModule ? (type === 'view' ? 'view' : 'change') : type;
|
||||||
this.dialogReadonly = type === 'view';
|
this.dialogReadonly = type === 'view';
|
||||||
this.projectBox = true;
|
this.projectBox = true;
|
||||||
|
if (this.isProjectChangeModule) {
|
||||||
|
if (!id) {
|
||||||
|
this.$message.error('缺少项目变更ID');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
projectChangeApi.getDetail(id).then(res => {
|
||||||
|
const detail = res.data.data || {};
|
||||||
|
this.applyProjectDetail({
|
||||||
|
...detail,
|
||||||
|
changeType: detail.changeType || '项目变更',
|
||||||
|
changeNo: detail.changeNo || '',
|
||||||
|
changeDate: detail.changeDate || this.$dayjs().format('YYYY-MM-DD'),
|
||||||
|
});
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (['add', 'majorSupplement'].includes(type)) {
|
if (['add', 'majorSupplement'].includes(type)) {
|
||||||
this.applyProjectDetail({
|
this.applyProjectDetail({
|
||||||
...emptyForm(),
|
...emptyForm(),
|
||||||
projectType: type === 'majorSupplement' ? '重大项目' : '普通项目',
|
projectType: type === 'majorSupplement' ? '重大项目' : '普通项目',
|
||||||
});
|
});
|
||||||
this.fillDefaultUsers();
|
this.fillDefaultUsers();
|
||||||
|
this.fillDefaultBusinessDept();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!id) return;
|
if (!id) return;
|
||||||
@@ -1575,6 +1726,12 @@ export default {
|
|||||||
},
|
},
|
||||||
closeProjectForm() {
|
closeProjectForm() {
|
||||||
if (this.isProjectFormPage) {
|
if (this.isProjectFormPage) {
|
||||||
|
if (this.isProjectChangeModule) {
|
||||||
|
sessionStorage.setItem(projectChangeListRefreshKey, '1');
|
||||||
|
this.$router.$avueRouter?.closeTag?.();
|
||||||
|
this.$router.push(projectChangeListRoute);
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.markProjectApplyListNeedRefresh();
|
this.markProjectApplyListNeedRefresh();
|
||||||
this.$router.$avueRouter?.closeTag?.();
|
this.$router.$avueRouter?.closeTag?.();
|
||||||
this.$router.push(projectApplyListRoute);
|
this.$router.push(projectApplyListRoute);
|
||||||
@@ -1612,6 +1769,94 @@ export default {
|
|||||||
return this.canOperation(operation, row);
|
return this.canOperation(operation, row);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
// ==================== 合规(HCS)推送/对账(照“同步金蝶”按钮模式) ====================
|
||||||
|
hcsSyncLabel(value) {
|
||||||
|
return { unsynced: '待推送', synced: '已推送', failed: '推送失败' }[value] || value;
|
||||||
|
},
|
||||||
|
hcsSyncTagType(value) {
|
||||||
|
return { unsynced: 'info', synced: 'success', failed: 'danger' }[value] || 'info';
|
||||||
|
},
|
||||||
|
canHcsRepush(row) {
|
||||||
|
return (
|
||||||
|
this.hcsImmediateEnabled &&
|
||||||
|
!this.readonlyScope &&
|
||||||
|
['approved', 'change_approved'].includes(row.approvalStatus) &&
|
||||||
|
row.hcsSyncStatus !== 'synced'
|
||||||
|
);
|
||||||
|
},
|
||||||
|
handleHcsRepush(row) {
|
||||||
|
if (this.hcsRepushingId) return;
|
||||||
|
this.$confirm('确定推送该数据到合同合规系统?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning',
|
||||||
|
}).then(() => {
|
||||||
|
// 同步推送合规耗时较长,加遮罩防重复操作(照审批通过遮罩)
|
||||||
|
const loading = this.$loading({
|
||||||
|
lock: true,
|
||||||
|
text: '正在推送合规,请稍候…',
|
||||||
|
background: 'rgba(255, 255, 255, 0.6)',
|
||||||
|
});
|
||||||
|
this.hcsRepushingId = row.id;
|
||||||
|
hcsRepush('project', row.id)
|
||||||
|
.then(res => {
|
||||||
|
if (res.data?.success === false) {
|
||||||
|
this.$message.error(res.data?.msg || '推送合规失败');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.$message.success(res.data?.data || '推送合规成功');
|
||||||
|
this.onLoad(this.page, this.query);
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
// 失败原因由 axios 拦截器统一弹出后端 msg,此处不再重复提示
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
this.hcsRepushingId = null;
|
||||||
|
loading.close();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleHcsBatchRepush() {
|
||||||
|
if (this.hcsRepushingId) return;
|
||||||
|
if (!this.selectionList.length) {
|
||||||
|
this.$message.warning('请选择至少一条数据');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const invalidCount = this.selectionList.filter(item => !this.canHcsRepush(item)).length;
|
||||||
|
if (invalidCount) {
|
||||||
|
this.$message.warning(`选中数据中有${invalidCount}条不符合推送条件(仅审批通过且未同步的可推送),请重新选择`);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.$confirm(`确定将选中的${this.selectionList.length}条数据推送到合同合规系统?`, '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning',
|
||||||
|
}).then(() => {
|
||||||
|
// 同步推送合规耗时较长,加遮罩防重复操作(照审批通过遮罩)
|
||||||
|
const loading = this.$loading({
|
||||||
|
lock: true,
|
||||||
|
text: '正在批量推送合规,请稍候…',
|
||||||
|
background: 'rgba(255, 255, 255, 0.6)',
|
||||||
|
});
|
||||||
|
this.hcsRepushingId = 'batch';
|
||||||
|
hcsRepushBatch('project', this.selectionList.map(item => item.id))
|
||||||
|
.then(res => {
|
||||||
|
if (res.data?.success === false) {
|
||||||
|
this.$message.error(res.data?.msg || '批量推送合规失败');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.$message.success(res.data?.data || '批量推送合规完成');
|
||||||
|
this.onLoad(this.page, this.query);
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
// 失败原因由 axios 拦截器统一弹出后端 msg,此处不再重复提示
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
this.hcsRepushingId = null;
|
||||||
|
loading.close();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
canOperation(operation, row) {
|
canOperation(operation, row) {
|
||||||
const permission = operation.permission || `${this.config.permission}_${operation.action}`;
|
const permission = operation.permission || `${this.config.permission}_${operation.action}`;
|
||||||
if (!this.hasPermission(permission) || this.readonlyScope || row.readonly) return false;
|
if (!this.hasPermission(permission) || this.readonlyScope || row.readonly) return false;
|
||||||
@@ -1733,7 +1978,7 @@ export default {
|
|||||||
},
|
},
|
||||||
handleCustomOperation(operation, row) {
|
handleCustomOperation(operation, row) {
|
||||||
if (operation.action === 'startChange') {
|
if (operation.action === 'startChange') {
|
||||||
this.openProjectDialog('change', row);
|
this.startIndependentProjectChange(row);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (operation.action === 'mkAudit') {
|
if (operation.action === 'mkAudit') {
|
||||||
@@ -1743,24 +1988,46 @@ export default {
|
|||||||
const run = value => {
|
const run = value => {
|
||||||
const args = operation.prompt ? [row.id, value] : [row.id];
|
const args = operation.prompt ? [row.id, value] : [row.id];
|
||||||
const request = () => this.api[operation.action](...args);
|
const request = () => this.api[operation.action](...args);
|
||||||
|
// 先本地提交再调 MK:MK 成功后会把状态同步成 reviewing,
|
||||||
|
// 若先 MK 再本地,已撤回/已驳回单据会被「当前状态不允许编辑」拦住。
|
||||||
const afterMk =
|
const afterMk =
|
||||||
operation.action === 'submitApproval'
|
operation.action === 'submitApproval'
|
||||||
? submitMkApprovalFlow({
|
? request().then(() =>
|
||||||
bizType: 'project-apply',
|
submitMkApprovalFlow({
|
||||||
bizId: row.id,
|
bizType: 'project-apply',
|
||||||
subjectName: row.projectName || '',
|
bizId: row.id,
|
||||||
approvalStatus: row.approvalStatus || '',
|
subjectName: row.projectName || '',
|
||||||
mkEnabled: this.mkEnabled,
|
approvalStatus: row.approvalStatus || '',
|
||||||
}).then(() => request())
|
mkEnabled: this.mkEnabled,
|
||||||
|
tempVarData: { projectType: row.projectType || '' },
|
||||||
|
})
|
||||||
|
)
|
||||||
: request();
|
: request();
|
||||||
afterMk.then(res => {
|
// 项目通过会同步等待合规推送,加遮罩防重复点击
|
||||||
if (res.data?.success === false || res.data?.data === false) {
|
const loading =
|
||||||
this.$message.error(res.data?.msg || `${operation.label}失败,请联系管理员`);
|
operation.action === 'approve'
|
||||||
return;
|
? this.$loading({
|
||||||
}
|
lock: true,
|
||||||
this.$message.success(`${operation.label}成功`);
|
text: '正在推送合规,请稍候…',
|
||||||
this.onLoad(this.page, this.query);
|
background: 'rgba(255, 255, 255, 0.6)',
|
||||||
});
|
})
|
||||||
|
: null;
|
||||||
|
afterMk
|
||||||
|
.then(res => {
|
||||||
|
// data=false 表示审批已通过但合规推送失败,msg 带具体原因(照正式结算单审批)
|
||||||
|
if (operation.action === 'approve' && res.data?.data === false) {
|
||||||
|
this.$message.warning(res.data?.msg);
|
||||||
|
this.onLoad(this.page, this.query);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (res.data?.success === false) {
|
||||||
|
this.$message.error(res.data?.msg || `${operation.label}失败,请联系管理员`);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.$message.success(`${operation.label}成功`);
|
||||||
|
this.onLoad(this.page, this.query);
|
||||||
|
})
|
||||||
|
.finally(() => loading && loading.close());
|
||||||
};
|
};
|
||||||
if (operation.prompt) {
|
if (operation.prompt) {
|
||||||
this.$prompt(operation.prompt, operation.label, {
|
this.$prompt(operation.prompt, operation.label, {
|
||||||
@@ -1891,6 +2158,7 @@ export default {
|
|||||||
.filter(Boolean);
|
.filter(Boolean);
|
||||||
this.syncSelectedCustomerOptions();
|
this.syncSelectedCustomerOptions();
|
||||||
this.ensureCurrentPlatformOption();
|
this.ensureCurrentPlatformOption();
|
||||||
|
this.ensureCurrentBusinessDeptOption();
|
||||||
},
|
},
|
||||||
fillDefaultUsers() {
|
fillDefaultUsers() {
|
||||||
const userId = this.userInfo?.userId || this.userInfo?.id || '';
|
const userId = this.userInfo?.userId || this.userInfo?.id || '';
|
||||||
@@ -1909,6 +2177,25 @@ export default {
|
|||||||
this.form.principalUserName = userName;
|
this.form.principalUserName = userName;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
* 新增/重大补录:业务部门默认取当前用户所属部门中第一个「是否业务部门=是」的组织。
|
||||||
|
*/
|
||||||
|
fillDefaultBusinessDept() {
|
||||||
|
if (!['add', 'majorSupplement'].includes(this.dialogType)) return;
|
||||||
|
if (this.form.businessDeptId) return;
|
||||||
|
const raw = this.userInfo?.deptId || this.userInfo?.dept_id || '';
|
||||||
|
const userDeptIds = String(raw)
|
||||||
|
.split(/[,,]/)
|
||||||
|
.map(item => String(item || '').trim())
|
||||||
|
.filter(item => item && item !== '-1');
|
||||||
|
if (!userDeptIds.length || !this.deptOptions.length) return;
|
||||||
|
const matched = userDeptIds.find(id =>
|
||||||
|
this.deptOptions.some(item => String(item.value) === String(id))
|
||||||
|
);
|
||||||
|
if (!matched) return;
|
||||||
|
this.form.businessDeptId = matched;
|
||||||
|
this.handleBusinessDeptChange(matched);
|
||||||
|
},
|
||||||
resolveUserRealName(row = {}, role) {
|
resolveUserRealName(row = {}, role) {
|
||||||
return (
|
return (
|
||||||
row[`${role}RealName`] ||
|
row[`${role}RealName`] ||
|
||||||
@@ -1958,6 +2245,9 @@ export default {
|
|||||||
subjectName: name,
|
subjectName: name,
|
||||||
approvalStatus: status,
|
approvalStatus: status,
|
||||||
mkEnabled: this.mkEnabled,
|
mkEnabled: this.mkEnabled,
|
||||||
|
tempVarData: {
|
||||||
|
projectType: this.form.projectType || data.projectType || '',
|
||||||
|
},
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.$message.success('提交成功!');
|
this.$message.success('提交成功!');
|
||||||
this.closeProjectForm();
|
this.closeProjectForm();
|
||||||
@@ -2007,6 +2297,52 @@ export default {
|
|||||||
this.closeProjectForm();
|
this.closeProjectForm();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
startIndependentProjectChange(row) {
|
||||||
|
if (!row?.id) {
|
||||||
|
this.$message.warning('项目ID为空,无法发起变更');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const loading = this.$loading({
|
||||||
|
lock: true,
|
||||||
|
text: '正在创建项目变更单…',
|
||||||
|
background: 'rgba(255, 255, 255, 0.6)',
|
||||||
|
});
|
||||||
|
projectChangeApi
|
||||||
|
.createFromProject(row.id)
|
||||||
|
.then(res => {
|
||||||
|
if (res.data?.success === false) {
|
||||||
|
this.$message.error(res.data?.msg || '创建项目变更失败');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const detail = res.data?.data || {};
|
||||||
|
if (!detail.id) {
|
||||||
|
this.$message.error('创建项目变更失败:未返回变更单ID');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.$router.push({
|
||||||
|
path: projectChangeFormRoute,
|
||||||
|
query: { mode: 'edit', id: detail.id, name: '项目变更' },
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.finally(() => loading.close());
|
||||||
|
},
|
||||||
|
saveProjectChangeDraft() {
|
||||||
|
if (!this.isProjectChangeModule) return;
|
||||||
|
this.submitLoading = true;
|
||||||
|
projectChangeApi
|
||||||
|
.saveDraft(this.normalizeSubmitForm({ includeChangeType: true }))
|
||||||
|
.then(res => {
|
||||||
|
if (res.data?.success === false || res.data?.data === false) {
|
||||||
|
this.$message.error(res.data?.msg || '保存失败,请联系管理员');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.$message.success('保存成功!');
|
||||||
|
this.closeProjectForm();
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
this.submitLoading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
submitChangeProject() {
|
submitChangeProject() {
|
||||||
this.$refs.projectForm.validate(valid => {
|
this.$refs.projectForm.validate(valid => {
|
||||||
if (!valid) {
|
if (!valid) {
|
||||||
@@ -2015,7 +2351,35 @@ export default {
|
|||||||
}
|
}
|
||||||
if (!this.validateAttachmentFileTypes()) return;
|
if (!this.validateAttachmentFileTypes()) return;
|
||||||
this.submitLoading = true;
|
this.submitLoading = true;
|
||||||
// 变更记录仅在提交时生成,保存草稿不落记录
|
if (this.isProjectChangeModule) {
|
||||||
|
const payload = this.normalizeSubmitForm({ includeChangeType: true });
|
||||||
|
const approvalStatus = this.form.approvalStatus || '';
|
||||||
|
projectChangeApi
|
||||||
|
.submit(payload)
|
||||||
|
.then(res => {
|
||||||
|
if (res.data?.success === false || res.data?.data === false) {
|
||||||
|
this.$message.error(res.data?.msg || '提交失败,请联系管理员');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const id = this.form.id;
|
||||||
|
return submitMkApprovalFlow({
|
||||||
|
bizType: 'project-change',
|
||||||
|
bizId: id,
|
||||||
|
subjectName: this.form.projectName || '',
|
||||||
|
approvalStatus,
|
||||||
|
mkEnabled: this.mkEnabled,
|
||||||
|
tempVarData: { projectType: this.form.projectType || '' },
|
||||||
|
}).then(() => {
|
||||||
|
this.$message.success('提交成功!');
|
||||||
|
this.closeProjectForm();
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
this.submitLoading = false;
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// 兼容旧入口:变更记录仅在提交时生成,保存草稿不落记录
|
||||||
this.api
|
this.api
|
||||||
.submitChange(this.normalizeSubmitForm({ includeChangeType: true }))
|
.submitChange(this.normalizeSubmitForm({ includeChangeType: true }))
|
||||||
.then(res => {
|
.then(res => {
|
||||||
@@ -2030,6 +2394,7 @@ export default {
|
|||||||
subjectName: this.form.projectName || '',
|
subjectName: this.form.projectName || '',
|
||||||
approvalStatus: this.form.approvalStatus || 'change_rejected',
|
approvalStatus: this.form.approvalStatus || 'change_rejected',
|
||||||
mkEnabled: this.mkEnabled,
|
mkEnabled: this.mkEnabled,
|
||||||
|
tempVarData: { projectType: this.form.projectType || '' },
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.$message.success('提交成功!');
|
this.$message.success('提交成功!');
|
||||||
this.closeProjectForm();
|
this.closeProjectForm();
|
||||||
@@ -2433,10 +2798,10 @@ export default {
|
|||||||
return `${base}-BG${this.$dayjs().format('YYYYMMDD')}`;
|
return `${base}-BG${this.$dayjs().format('YYYYMMDD')}`;
|
||||||
},
|
},
|
||||||
handleBusinessDeptChange(value) {
|
handleBusinessDeptChange(value) {
|
||||||
// 兼容级联路径数组(取末级)与单个部门 id
|
const id = value == null || value === '' ? '' : String(value);
|
||||||
const id = Array.isArray(value) ? value.at(-1) : value;
|
this.form.businessDeptId = id;
|
||||||
const dept = this.deptOptions.find(item => String(item.value) === String(id));
|
const dept = this.deptOptions.find(item => String(item.value) === id);
|
||||||
this.form.businessDeptName = dept ? dept.rawLabel : '';
|
this.form.businessDeptName = dept ? dept.rawLabel || dept.label : '';
|
||||||
this.$refs.projectForm?.validateField('businessDeptId');
|
this.$refs.projectForm?.validateField('businessDeptId');
|
||||||
},
|
},
|
||||||
handleUndertakeDeptChange(value) {
|
handleUndertakeDeptChange(value) {
|
||||||
@@ -2474,33 +2839,45 @@ export default {
|
|||||||
firstUndertakeDeptId(value) {
|
firstUndertakeDeptId(value) {
|
||||||
return this.parseUndertakeDeptIds(value)[0] || '';
|
return this.parseUndertakeDeptIds(value)[0] || '';
|
||||||
},
|
},
|
||||||
// 由部门 id 反查「根 → 该节点」的 id 路径,供级联回显(找不到返回 null)
|
|
||||||
findDeptPath(id, tree = [], parents = []) {
|
|
||||||
const target = Array.isArray(id) ? id.at(-1) : id;
|
|
||||||
if (target === undefined || target === null || target === '') return null;
|
|
||||||
for (const node of tree || []) {
|
|
||||||
const path = [...parents, node.value];
|
|
||||||
if (String(node.value) === String(target)) return path;
|
|
||||||
const matched = this.findDeptPath(target, node.children, path);
|
|
||||||
if (matched) return matched;
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
},
|
|
||||||
handleProjectTypeChange() {
|
handleProjectTypeChange() {
|
||||||
this.normalizeAttachmentFileTypes();
|
this.normalizeAttachmentFileTypes();
|
||||||
this.$refs.projectForm?.validateField('projectType');
|
this.$refs.projectForm?.validateField('projectType');
|
||||||
},
|
},
|
||||||
loadDeptOptions() {
|
loadDeptOptions() {
|
||||||
getDeptTree().then(res => {
|
getBusinessDeptSelect()
|
||||||
const deptTree = res.data.data || [];
|
.then(res => {
|
||||||
const businessDeptTree = ['add', 'edit', 'majorSupplement'].includes(this.dialogType)
|
const bizList = res.data.data || [];
|
||||||
? this.excludeExternalOrganization(deptTree)
|
// 仅展示「是否业务部门=是」的本级部门,扁平下拉
|
||||||
: deptTree;
|
this.deptOptions = bizList
|
||||||
this.deptOptions = this.flattenDept(businessDeptTree);
|
.map(item => {
|
||||||
this.businessDeptTreeOptions = this.toDeptCascaderOptions(businessDeptTree);
|
const value = item.id == null || item.id === '' ? '' : String(item.id);
|
||||||
});
|
const label = item.deptName || item.fullName || item.title || item.name || value;
|
||||||
|
return {
|
||||||
|
label,
|
||||||
|
rawLabel: label,
|
||||||
|
value,
|
||||||
|
};
|
||||||
|
})
|
||||||
|
.filter(item => item.value);
|
||||||
|
this.fillDefaultBusinessDept();
|
||||||
|
this.ensureCurrentBusinessDeptOption();
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.deptOptions = [];
|
||||||
|
});
|
||||||
this.loadPlatformCompanyOptions();
|
this.loadPlatformCompanyOptions();
|
||||||
},
|
},
|
||||||
|
ensureCurrentBusinessDeptOption() {
|
||||||
|
const id = this.form.businessDeptId == null || this.form.businessDeptId === ''
|
||||||
|
? ''
|
||||||
|
: String(this.form.businessDeptId);
|
||||||
|
if (!id) return;
|
||||||
|
this.form.businessDeptId = id;
|
||||||
|
const exists = this.deptOptions.some(item => String(item.value) === id);
|
||||||
|
if (exists) return;
|
||||||
|
const label = this.form.businessDeptName || id;
|
||||||
|
this.deptOptions.unshift({ label, rawLabel: label, value: id });
|
||||||
|
},
|
||||||
loadPlatformCompanyOptions() {
|
loadPlatformCompanyOptions() {
|
||||||
getPlatformCompanySelect().then(res => {
|
getPlatformCompanySelect().then(res => {
|
||||||
const list = res.data.data || [];
|
const list = res.data.data || [];
|
||||||
@@ -2531,40 +2908,6 @@ export default {
|
|||||||
return matched ? matched.value : id;
|
return matched ? matched.value : id;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
excludeExternalOrganization(list = []) {
|
|
||||||
return list.reduce((result, item) => {
|
|
||||||
const deptName = item.title || item.deptName || item.name;
|
|
||||||
if (String(deptName || '').trim() === '外部组织') return result;
|
|
||||||
result.push({
|
|
||||||
...item,
|
|
||||||
children: item.children?.length
|
|
||||||
? this.excludeExternalOrganization(item.children)
|
|
||||||
: item.children,
|
|
||||||
});
|
|
||||||
return result;
|
|
||||||
}, []);
|
|
||||||
},
|
|
||||||
toDeptCascaderOptions(list = []) {
|
|
||||||
return list.map(item => ({
|
|
||||||
label: item.title || item.deptName || item.name,
|
|
||||||
value: item.id,
|
|
||||||
children: item.children?.length ? this.toDeptCascaderOptions(item.children) : undefined,
|
|
||||||
}));
|
|
||||||
},
|
|
||||||
flattenDept(list = [], level = 0) {
|
|
||||||
return list.reduce((result, item) => {
|
|
||||||
const label = item.title || item.deptName || item.name;
|
|
||||||
result.push({
|
|
||||||
label: `${' '.repeat(level)}${label}`,
|
|
||||||
rawLabel: label,
|
|
||||||
value: item.id,
|
|
||||||
});
|
|
||||||
if (item.children && item.children.length) {
|
|
||||||
result.push(...this.flattenDept(item.children, level + 1));
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}, []);
|
|
||||||
},
|
|
||||||
loadCargoTypeOptions() {
|
loadCargoTypeOptions() {
|
||||||
getSystemDictionary({ code: 'type_of_goods' }).then(res => {
|
getSystemDictionary({ code: 'type_of_goods' }).then(res => {
|
||||||
this.cargoTypeOptions = (res.data.data || []).map(item => ({
|
this.cargoTypeOptions = (res.data.data || []).map(item => ({
|
||||||
@@ -2900,6 +3243,20 @@ export default {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&__field-tooltip-trigger {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
&__field-tooltip {
|
||||||
|
max-width: 480px;
|
||||||
|
max-height: 240px;
|
||||||
|
overflow: auto;
|
||||||
|
white-space: pre-wrap;
|
||||||
|
word-break: break-word;
|
||||||
|
line-height: 1.5;
|
||||||
|
}
|
||||||
|
|
||||||
:deep(.el-form-item) {
|
:deep(.el-form-item) {
|
||||||
//margin-bottom: 24px;
|
//margin-bottom: 24px;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,366 @@
|
|||||||
|
<template>
|
||||||
|
<basic-container class="project-change-page">
|
||||||
|
<avue-crud
|
||||||
|
:option="tableOption"
|
||||||
|
:table-loading="loading"
|
||||||
|
:data="data"
|
||||||
|
v-model:page="page"
|
||||||
|
v-model="tableForm"
|
||||||
|
ref="crud"
|
||||||
|
:permission="permissionList"
|
||||||
|
@search-change="searchChange"
|
||||||
|
@search-reset="searchReset"
|
||||||
|
@selection-change="selectionChange"
|
||||||
|
@current-change="currentChange"
|
||||||
|
@size-change="sizeChange"
|
||||||
|
@refresh-change="refreshChange"
|
||||||
|
@on-load="onLoad"
|
||||||
|
>
|
||||||
|
<template #menu-left>
|
||||||
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
plain
|
||||||
|
v-if="hasPermission(`${config.permission}_delete`)"
|
||||||
|
@click="handleDelete"
|
||||||
|
>
|
||||||
|
批量删除
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template #approvalStatus="{ row }">
|
||||||
|
{{ row.approvalStatusName || statusLabel(row.approvalStatus) }}
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template #syncStatus="{ row }">
|
||||||
|
<el-tag v-if="row.syncStatus" :type="syncTagType(row.syncStatus)" class="status-text">
|
||||||
|
{{ syncLabel(row.syncStatus) }}
|
||||||
|
</el-tag>
|
||||||
|
<span v-else>-</span>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template #menu="{ row }">
|
||||||
|
<el-link
|
||||||
|
type="primary"
|
||||||
|
v-if="canView(row)"
|
||||||
|
@click="openForm('view', row)"
|
||||||
|
>
|
||||||
|
查看
|
||||||
|
</el-link>
|
||||||
|
<el-link type="primary" v-if="canEdit(row)" @click="openForm('edit', row)">
|
||||||
|
编辑
|
||||||
|
</el-link>
|
||||||
|
<el-link
|
||||||
|
type="danger"
|
||||||
|
v-if="canDelete(row)"
|
||||||
|
@click="rowDel(row)"
|
||||||
|
>
|
||||||
|
删除
|
||||||
|
</el-link>
|
||||||
|
<el-link
|
||||||
|
v-for="operation in customOperations(row)"
|
||||||
|
:key="operation.action"
|
||||||
|
:type="operation.type === 'warning' ? 'warning' : operation.type === 'success' ? 'success' : 'primary'"
|
||||||
|
@click="handleCustomOperation(operation, row)"
|
||||||
|
>
|
||||||
|
{{ operation.label }}
|
||||||
|
</el-link>
|
||||||
|
</template>
|
||||||
|
</avue-crud>
|
||||||
|
</basic-container>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import * as api from '@/api/business/project-change';
|
||||||
|
import { getMKApprovalUrl } from '@/api/system/business-process';
|
||||||
|
import { config, option } from '@/option/business/project-change';
|
||||||
|
import { approvalStatusOptions } from '@/option/business/common';
|
||||||
|
import { loadMkEnabled, submitMkApprovalFlow } from '@/utils/mk-approval';
|
||||||
|
import { isAdministrator } from '@/utils/auth';
|
||||||
|
import { mapGetters } from 'vuex';
|
||||||
|
|
||||||
|
const projectChangeFormRoute = '/business/project-change/form';
|
||||||
|
const projectChangeListRefreshKey = 'project-change-list-refresh';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'ProjectChange',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
api,
|
||||||
|
config,
|
||||||
|
tableForm: {},
|
||||||
|
tableOption: this.buildTableOption(),
|
||||||
|
loading: true,
|
||||||
|
data: [],
|
||||||
|
page: {
|
||||||
|
pageSize: 10,
|
||||||
|
currentPage: 1,
|
||||||
|
total: 0,
|
||||||
|
},
|
||||||
|
query: {},
|
||||||
|
selectionList: [],
|
||||||
|
mkEnabled: false,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapGetters(['permission', 'userInfo', 'website']),
|
||||||
|
permissionList() {
|
||||||
|
return {
|
||||||
|
addBtn: false,
|
||||||
|
viewBtn: false,
|
||||||
|
delBtn: false,
|
||||||
|
editBtn: false,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
isAdmin() {
|
||||||
|
return isAdministrator(this.userInfo);
|
||||||
|
},
|
||||||
|
ids() {
|
||||||
|
return this.selectionList.map(item => item.id).join(',');
|
||||||
|
},
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
loadMkEnabled()
|
||||||
|
.then(enabled => {
|
||||||
|
this.mkEnabled = enabled;
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.mkEnabled = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
activated() {
|
||||||
|
if (sessionStorage.getItem(projectChangeListRefreshKey)) {
|
||||||
|
sessionStorage.removeItem(projectChangeListRefreshKey);
|
||||||
|
this.onLoad(this.page, this.query);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
buildTableOption() {
|
||||||
|
return {
|
||||||
|
...option,
|
||||||
|
addBtn: false,
|
||||||
|
viewBtn: false,
|
||||||
|
editBtn: false,
|
||||||
|
delBtn: false,
|
||||||
|
menuWidth: 320,
|
||||||
|
column: (option.column || []).map(column => ({
|
||||||
|
...column,
|
||||||
|
display: false,
|
||||||
|
align: 'center',
|
||||||
|
headerAlign: 'center',
|
||||||
|
})),
|
||||||
|
};
|
||||||
|
},
|
||||||
|
hasPermission(code) {
|
||||||
|
return this.isAdmin || this.validData(this.permission && this.permission[code], false);
|
||||||
|
},
|
||||||
|
statusLabel(status) {
|
||||||
|
return approvalStatusOptions.find(item => item.value === status)?.label || status || '-';
|
||||||
|
},
|
||||||
|
syncLabel(value) {
|
||||||
|
return { unsynced: '待推送', synced: '已推送', failed: '推送失败' }[value] || value;
|
||||||
|
},
|
||||||
|
syncTagType(value) {
|
||||||
|
return { unsynced: 'info', synced: 'success', failed: 'danger' }[value] || 'info';
|
||||||
|
},
|
||||||
|
inStatus(row, statusList) {
|
||||||
|
if (!statusList || !statusList.length) return true;
|
||||||
|
return statusList.includes(row.approvalStatus);
|
||||||
|
},
|
||||||
|
canEdit(row) {
|
||||||
|
return (
|
||||||
|
this.hasPermission(`${this.config.permission}_edit`) &&
|
||||||
|
!row.readonly &&
|
||||||
|
this.inStatus(row, this.config.editStatus)
|
||||||
|
);
|
||||||
|
},
|
||||||
|
canDelete(row) {
|
||||||
|
return (
|
||||||
|
this.hasPermission(`${this.config.permission}_delete`) &&
|
||||||
|
!row.readonly &&
|
||||||
|
this.inStatus(row, this.config.deleteStatus)
|
||||||
|
);
|
||||||
|
},
|
||||||
|
canView(row) {
|
||||||
|
return (
|
||||||
|
this.hasPermission(`${this.config.permission}_view`) &&
|
||||||
|
this.inStatus(row, this.config.viewStatus)
|
||||||
|
);
|
||||||
|
},
|
||||||
|
canOperation(operation, row) {
|
||||||
|
if (operation.permission && !this.hasPermission(operation.permission)) return false;
|
||||||
|
if (row.readonly && ['submitApproval', 'withdraw', 'approve', 'reject'].includes(operation.action)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return this.inStatus(row, operation.status);
|
||||||
|
},
|
||||||
|
customOperations(row) {
|
||||||
|
return (this.config.operations || []).filter(operation => {
|
||||||
|
if (operation.mkOnly && !this.mkEnabled) return false;
|
||||||
|
if (operation.localOnly && this.mkEnabled) return false;
|
||||||
|
return this.canOperation(operation, row);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
openForm(mode, row = {}) {
|
||||||
|
const query = { mode, id: row.id };
|
||||||
|
if (mode === 'edit') query.name = '编辑项目变更';
|
||||||
|
else if (mode === 'view') query.name = '查看项目变更';
|
||||||
|
this.$router.push({ path: projectChangeFormRoute, query });
|
||||||
|
},
|
||||||
|
handleCustomOperation(operation, row) {
|
||||||
|
if (operation.action === 'mkAudit') {
|
||||||
|
this.handleMkAudit(row);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const run = () => {
|
||||||
|
const request = () => this.api[operation.action](row.id);
|
||||||
|
// 先本地提交再调 MK,避免 MK 回写 reviewing 后本地 submitApproval 被编辑校验拦住。
|
||||||
|
const afterMk =
|
||||||
|
operation.action === 'submitApproval'
|
||||||
|
? request().then(() =>
|
||||||
|
submitMkApprovalFlow({
|
||||||
|
bizType: 'project-change',
|
||||||
|
bizId: row.id,
|
||||||
|
subjectName: row.projectName || '',
|
||||||
|
approvalStatus: row.approvalStatus || '',
|
||||||
|
mkEnabled: this.mkEnabled,
|
||||||
|
tempVarData: { projectType: row.projectType || '' },
|
||||||
|
})
|
||||||
|
)
|
||||||
|
: request();
|
||||||
|
const loading =
|
||||||
|
operation.action === 'approve'
|
||||||
|
? this.$loading({
|
||||||
|
lock: true,
|
||||||
|
text: '正在推送合规,请稍候…',
|
||||||
|
background: 'rgba(255, 255, 255, 0.6)',
|
||||||
|
})
|
||||||
|
: null;
|
||||||
|
afterMk
|
||||||
|
.then(res => {
|
||||||
|
if (operation.action === 'approve' && res.data?.data === false) {
|
||||||
|
this.$message.warning(res.data?.msg);
|
||||||
|
this.onLoad(this.page, this.query);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (res.data?.success === false) {
|
||||||
|
this.$message.error(res.data?.msg || `${operation.label}失败,请联系管理员`);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.$message.success(`${operation.label}成功`);
|
||||||
|
this.onLoad(this.page, this.query);
|
||||||
|
})
|
||||||
|
.finally(() => loading && loading.close());
|
||||||
|
};
|
||||||
|
this.$confirm(operation.confirm || `确定${operation.label}该${this.config.title}?`, '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning',
|
||||||
|
}).then(() => run());
|
||||||
|
},
|
||||||
|
handleMkAudit(row) {
|
||||||
|
if (!row?.id) {
|
||||||
|
this.$message.warning('变更单ID为空,无法打开审核页');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
getMKApprovalUrl({ bizId: String(row.id) })
|
||||||
|
.then(res => {
|
||||||
|
const url = res?.data?.data;
|
||||||
|
if (!url) {
|
||||||
|
this.$message.error('获取审核跳转地址失败');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
window.open(url, '_blank');
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.$message.error('获取审核跳转地址失败');
|
||||||
|
});
|
||||||
|
},
|
||||||
|
searchReset() {
|
||||||
|
this.query = {};
|
||||||
|
this.onLoad(this.page);
|
||||||
|
},
|
||||||
|
searchChange(params, done) {
|
||||||
|
this.query = params;
|
||||||
|
this.page.currentPage = 1;
|
||||||
|
this.onLoad(this.page, params);
|
||||||
|
done();
|
||||||
|
},
|
||||||
|
selectionChange(list) {
|
||||||
|
this.selectionList = list;
|
||||||
|
},
|
||||||
|
selectionClear() {
|
||||||
|
this.selectionList = [];
|
||||||
|
this.$refs.crud?.toggleSelection?.();
|
||||||
|
},
|
||||||
|
currentChange(currentPage) {
|
||||||
|
this.page.currentPage = currentPage;
|
||||||
|
},
|
||||||
|
sizeChange(pageSize) {
|
||||||
|
this.page.pageSize = pageSize;
|
||||||
|
},
|
||||||
|
refreshChange() {
|
||||||
|
this.onLoad(this.page, this.query);
|
||||||
|
},
|
||||||
|
rowDel(row) {
|
||||||
|
this.$confirm('确定将选择数据删除?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning',
|
||||||
|
}).then(() => {
|
||||||
|
this.api.remove(row.id).then(() => {
|
||||||
|
this.$message.success('删除成功!');
|
||||||
|
this.onLoad(this.page, this.query);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleDelete() {
|
||||||
|
if (!this.selectionList.length) {
|
||||||
|
this.$message.warning('请选择至少一条数据');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.$confirm('确定将选择数据删除?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning',
|
||||||
|
}).then(() => {
|
||||||
|
this.api.remove(this.ids).then(() => {
|
||||||
|
this.$message.success('删除成功!');
|
||||||
|
this.selectionClear();
|
||||||
|
this.onLoad(this.page, this.query);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
onLoad(page, params = {}) {
|
||||||
|
this.loading = true;
|
||||||
|
const values = {
|
||||||
|
...this.query,
|
||||||
|
...params,
|
||||||
|
};
|
||||||
|
this.api
|
||||||
|
.getList(page.currentPage, page.pageSize, values)
|
||||||
|
.then(res => {
|
||||||
|
const data = res.data.data || {};
|
||||||
|
this.page.total = data.total || 0;
|
||||||
|
this.data = data.records || [];
|
||||||
|
this.loading = false;
|
||||||
|
this.selectionClear();
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.project-change-page {
|
||||||
|
:deep(.avue-crud__menu) {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 8px;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -577,10 +577,7 @@ export default {
|
|||||||
this.$message.warning(`第${index + 1}条调度明细缺少承运商信息`);
|
this.$message.warning(`第${index + 1}条调度明细缺少承运商信息`);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!row.driverName) {
|
// 司机是否必填由调度明细弹窗按承运类型判定(承运商承运时司机选填),此处不再重复校验
|
||||||
this.$message.warning(`第${index + 1}条调度明细缺少司机信息`);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (!row.vehicleNo) {
|
if (!row.vehicleNo) {
|
||||||
this.$message.warning(`第${index + 1}条调度明细缺少车牌号`);
|
this.$message.warning(`第${index + 1}条调度明细缺少车牌号`);
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -602,6 +602,8 @@ export default {
|
|||||||
if (result.code !== 200) throw new Error(result.msg || '导入失败');
|
if (result.code !== 200) throw new Error(result.msg || '导入失败');
|
||||||
this.$message.success('导入完成');
|
this.$message.success('导入完成');
|
||||||
}
|
}
|
||||||
|
// 与运单/配载一致:通知 keep-alive 列表实例重新拉取
|
||||||
|
sessionStorage.setItem('transport-plan-list-refresh', '1');
|
||||||
this.$router.push('/business/transport-plan');
|
this.$router.push('/business/transport-plan');
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.$message.error(error.message || '导入失败');
|
this.$message.error(error.message || '导入失败');
|
||||||
|
|||||||
@@ -203,7 +203,11 @@
|
|||||||
@click="openBatchDialog(row)"
|
@click="openBatchDialog(row)"
|
||||||
>更换运单批次</el-link
|
>更换运单批次</el-link
|
||||||
><el-link
|
><el-link
|
||||||
v-if="(row.processStatus !== '处理完成' || row.auditStatus === '待审核') && row.auditStatus !== '审核驳回'"
|
v-if="
|
||||||
|
row.processStatus !== '处理失败' &&
|
||||||
|
(row.processStatus !== '处理完成' || row.auditStatus === '待审核') &&
|
||||||
|
row.auditStatus !== '审核驳回'
|
||||||
|
"
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="openBatchDialog(row)"
|
@click="openBatchDialog(row)"
|
||||||
>更换运单批次</el-link
|
>更换运单批次</el-link
|
||||||
@@ -320,7 +324,7 @@
|
|||||||
<el-form-item label="执行凭证" required
|
<el-form-item label="执行凭证" required
|
||||||
><el-upload
|
><el-upload
|
||||||
action="#"
|
action="#"
|
||||||
accept=".zip,.7z"
|
accept=".zip"
|
||||||
:auto-upload="false"
|
:auto-upload="false"
|
||||||
:limit="1"
|
:limit="1"
|
||||||
:on-change="selectVoucherFile"
|
:on-change="selectVoucherFile"
|
||||||
@@ -332,7 +336,7 @@
|
|||||||
>上传</el-button
|
>上传</el-button
|
||||||
><template #tip
|
><template #tip
|
||||||
><span class="voucher-manage-page__upload-tip"
|
><span class="voucher-manage-page__upload-tip"
|
||||||
>请上传车辆的执行凭证压缩包,支持zip、7z格式。 上传附件大于50M时为超大附件,确认提交后可在“批量补录->上传任务”中查看上传进度。</span
|
>请上传车辆的执行凭证压缩包,仅支持 zip 格式;无法解析的文件将标记为「处理失败」,可重新上传。上传附件大于50M时为超大附件,确认提交后可在“批量补录->上传任务”中查看上传进度。</span
|
||||||
></template
|
></template
|
||||||
></el-upload
|
></el-upload
|
||||||
><el-progress
|
><el-progress
|
||||||
@@ -549,7 +553,7 @@
|
|||||||
ref="resumeFileInput"
|
ref="resumeFileInput"
|
||||||
class="voucher-manage-page__hidden-file"
|
class="voucher-manage-page__hidden-file"
|
||||||
type="file"
|
type="file"
|
||||||
accept=".zip,.7z"
|
accept=".zip"
|
||||||
@change="resumeFileSelected"
|
@change="resumeFileSelected"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
@@ -998,6 +1002,12 @@ const uploadVoucher = async file => {
|
|||||||
};
|
};
|
||||||
const selectVoucherFile = file => {
|
const selectVoucherFile = file => {
|
||||||
if (!file?.raw) return;
|
if (!file?.raw) return;
|
||||||
|
const fileName = String(file.raw.name || '').toLowerCase();
|
||||||
|
if (!fileName.endsWith('.zip')) {
|
||||||
|
ElMessage.warning('仅支持 zip 压缩包,无法解析的文件将标记为处理失败');
|
||||||
|
clearFile();
|
||||||
|
return;
|
||||||
|
}
|
||||||
selectedVoucherFile.value = file.raw;
|
selectedVoucherFile.value = file.raw;
|
||||||
editing.fileName = file.raw.name;
|
editing.fileName = file.raw.name;
|
||||||
editing.fileUrl = '';
|
editing.fileUrl = '';
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
:config="config"
|
:config="config"
|
||||||
:crud-option="option"
|
:crud-option="option"
|
||||||
:detail-id="detailId"
|
:detail-id="detailId"
|
||||||
:menu-width="250"
|
:menu-width="320"
|
||||||
standalone-form-page
|
standalone-form-page
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -44,7 +44,8 @@
|
|||||||
reserve-keyword
|
reserve-keyword
|
||||||
:remote-method="searchCustomers"
|
:remote-method="searchCustomers"
|
||||||
:loading="customerLoading"
|
:loading="customerLoading"
|
||||||
placeholder="请选择客商基础档案"
|
placeholder="请选择"
|
||||||
|
@change="syncFeeBearer"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in customerOptions"
|
v-for="item in customerOptions"
|
||||||
@@ -63,6 +64,7 @@
|
|||||||
allow-create
|
allow-create
|
||||||
default-first-option
|
default-first-option
|
||||||
placeholder="请选择或输入"
|
placeholder="请选择或输入"
|
||||||
|
@change="syncFeeBearer"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in receiverOptions"
|
v-for="item in receiverOptions"
|
||||||
@@ -74,7 +76,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="票面金额" prop="faceAmount">
|
<el-form-item label="票面金额" prop="faceAmount" required>
|
||||||
<el-input-number
|
<el-input-number
|
||||||
v-model="form.faceAmount"
|
v-model="form.faceAmount"
|
||||||
:min="0"
|
:min="0"
|
||||||
@@ -111,17 +113,15 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="可用部门" prop="availableDeptIds">
|
<el-form-item label="可用部门" prop="availableDeptIds">
|
||||||
<el-tree-select
|
<el-cascader
|
||||||
v-model="form.availableDeptIds"
|
v-model="availableDeptCascaderValue"
|
||||||
:data="deptTree"
|
:options="businessDeptTreeOptions"
|
||||||
:props="deptProps"
|
:props="deptCascaderProps"
|
||||||
node-key="id"
|
placeholder="请选择"
|
||||||
multiple
|
filterable
|
||||||
show-checkbox
|
clearable
|
||||||
collapse-tags
|
collapse-tags
|
||||||
collapse-tags-tooltip
|
collapse-tags-tooltip
|
||||||
placeholder="请选择,默认全部"
|
|
||||||
@change="handleDeptChange"
|
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@@ -140,17 +140,9 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="费用承担方" prop="feeBearerId">
|
<el-form-item label="费用承担方" prop="feeBearerId">
|
||||||
<el-select
|
<el-select v-model="form.feeBearerId" filterable clearable placeholder="请选择">
|
||||||
v-model="form.feeBearerId"
|
|
||||||
filterable
|
|
||||||
remote
|
|
||||||
reserve-keyword
|
|
||||||
:remote-method="searchCustomers"
|
|
||||||
:loading="customerLoading"
|
|
||||||
placeholder="请选择客商基础档案"
|
|
||||||
>
|
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in customerOptions"
|
v-for="item in feeBearerOptions"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="customerName(item)"
|
:label="customerName(item)"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
@@ -245,13 +237,13 @@ const emptyForm = () => ({
|
|||||||
billNo: '',
|
billNo: '',
|
||||||
issuerId: null,
|
issuerId: null,
|
||||||
receiverName: '',
|
receiverName: '',
|
||||||
billType: 'issued',
|
billType: '',
|
||||||
faceAmount: null,
|
faceAmount: null,
|
||||||
availableBalance: 0,
|
availableBalance: 0,
|
||||||
issueDate: '',
|
issueDate: '',
|
||||||
maturityDate: '',
|
maturityDate: '',
|
||||||
availableDeptIds: ['all'],
|
availableDeptIds: [],
|
||||||
availableDeptNames: '全部',
|
availableDeptNames: '',
|
||||||
feeBearerId: null,
|
feeBearerId: null,
|
||||||
confirmedDiscountRate: null,
|
confirmedDiscountRate: null,
|
||||||
issuingBank: '',
|
issuingBank: '',
|
||||||
@@ -272,9 +264,17 @@ export default {
|
|||||||
receiverOptions: [],
|
receiverOptions: [],
|
||||||
customerLoading: false,
|
customerLoading: false,
|
||||||
saving: false,
|
saving: false,
|
||||||
deptTree: [],
|
businessDeptTreeOptions: [],
|
||||||
deptMap: new Map(),
|
deptMap: new Map(),
|
||||||
deptProps: { label: 'title', value: 'id', children: 'children' },
|
deptCascaderProps: {
|
||||||
|
label: 'label',
|
||||||
|
value: 'value',
|
||||||
|
children: 'children',
|
||||||
|
multiple: true,
|
||||||
|
checkStrictly: true,
|
||||||
|
emitPath: true,
|
||||||
|
expandTrigger: 'click',
|
||||||
|
},
|
||||||
bankOptions: [
|
bankOptions: [
|
||||||
'中国工商银行',
|
'中国工商银行',
|
||||||
'中国农业银行',
|
'中国农业银行',
|
||||||
@@ -309,7 +309,10 @@ export default {
|
|||||||
issuerId: [{ required: true, message: '请选择出票单位', trigger: 'change' }],
|
issuerId: [{ required: true, message: '请选择出票单位', trigger: 'change' }],
|
||||||
receiverName: [{ required: true, message: '请选择或输入收票单位', trigger: 'change' }],
|
receiverName: [{ required: true, message: '请选择或输入收票单位', trigger: 'change' }],
|
||||||
billType: [{ required: true, message: '请选择汇票类型', trigger: 'change' }],
|
billType: [{ required: true, message: '请选择汇票类型', trigger: 'change' }],
|
||||||
faceAmount: [{ validator: this.validateFaceAmount, trigger: 'change' }],
|
faceAmount: [
|
||||||
|
{ required: true, message: '请输入票面金额', trigger: 'change' },
|
||||||
|
{ validator: this.validateFaceAmount, trigger: 'change' },
|
||||||
|
],
|
||||||
issueDate: [{ required: true, message: '请选择出票日期', trigger: 'change' }],
|
issueDate: [{ required: true, message: '请选择出票日期', trigger: 'change' }],
|
||||||
maturityDate: [{ required: true, validator: this.validateMaturityDate, trigger: 'change' }],
|
maturityDate: [{ required: true, validator: this.validateMaturityDate, trigger: 'change' }],
|
||||||
availableDeptIds: [{ validator: this.validateDepartments, trigger: 'change' }],
|
availableDeptIds: [{ validator: this.validateDepartments, trigger: 'change' }],
|
||||||
@@ -340,6 +343,42 @@ export default {
|
|||||||
(Number(this.form.faceAmount || 0) * Number(this.form.confirmedDiscountRate || 0)) / 100
|
(Number(this.form.faceAmount || 0) * Number(this.form.confirmedDiscountRate || 0)) / 100
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
// 可用部门:表单存部门 id,级联多选回显用根到节点的路径
|
||||||
|
availableDeptCascaderValue: {
|
||||||
|
get() {
|
||||||
|
return (this.form.availableDeptIds || [])
|
||||||
|
.filter(id => id !== undefined && id !== null && String(id) !== 'all' && String(id) !== '')
|
||||||
|
.map(id => this.findDeptPath(id, this.businessDeptTreeOptions) || [String(id)]);
|
||||||
|
},
|
||||||
|
set(paths) {
|
||||||
|
const ids = [
|
||||||
|
...new Set(
|
||||||
|
(paths || [])
|
||||||
|
.map(path => {
|
||||||
|
const nodes = Array.isArray(path) ? path.filter(item => item !== undefined && item !== null && item !== '') : [];
|
||||||
|
return nodes.length ? String(nodes.at(-1)) : '';
|
||||||
|
})
|
||||||
|
.filter(Boolean)
|
||||||
|
),
|
||||||
|
];
|
||||||
|
this.form.availableDeptIds = ids;
|
||||||
|
this.form.availableDeptNames = ids
|
||||||
|
.map(id => this.deptMap.get(String(id)))
|
||||||
|
.filter(Boolean)
|
||||||
|
.join('、');
|
||||||
|
},
|
||||||
|
},
|
||||||
|
feeBearerOptions() {
|
||||||
|
const issuer = this.customerOptions.find(item => String(item.id) === String(this.form.issuerId));
|
||||||
|
const receiverName = String(this.form.receiverName || '').trim();
|
||||||
|
const receiver = receiverName
|
||||||
|
? this.customerOptions.find(item => this.customerName(item) === receiverName)
|
||||||
|
: null;
|
||||||
|
return [issuer, receiver].filter(
|
||||||
|
(item, index, rows) =>
|
||||||
|
item && rows.findIndex(row => row && String(row.id) === String(item.id)) === index
|
||||||
|
);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.initialize();
|
this.initialize();
|
||||||
@@ -352,7 +391,6 @@ export default {
|
|||||||
async initialize() {
|
async initialize() {
|
||||||
await Promise.all([this.loadDepartments(), this.searchCustomers('')]);
|
await Promise.all([this.loadDepartments(), this.searchCustomers('')]);
|
||||||
if (!this.recordId) {
|
if (!this.recordId) {
|
||||||
this.form.issueDate = this.$dayjs().format('YYYY-MM-DD');
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const data = this.unwrapData(await api.getDetail(this.recordId));
|
const data = this.unwrapData(await api.getDetail(this.recordId));
|
||||||
@@ -361,14 +399,20 @@ export default {
|
|||||||
...data,
|
...data,
|
||||||
confirmedDiscountRate: this.normalizeDiscountRate(data.confirmedDiscountRate),
|
confirmedDiscountRate: this.normalizeDiscountRate(data.confirmedDiscountRate),
|
||||||
bankDiscountReferenceRate: this.normalizeDiscountRate(data.bankDiscountReferenceRate),
|
bankDiscountReferenceRate: this.normalizeDiscountRate(data.bankDiscountReferenceRate),
|
||||||
availableDeptIds: this.parse(data.availableDeptIdsJson),
|
availableDeptIds: this.parse(data.availableDeptIdsJson)
|
||||||
|
.filter(id => String(id) !== 'all')
|
||||||
|
.map(id => String(id)),
|
||||||
attachments: this.parse(data.attachmentsJson),
|
attachments: this.parse(data.attachmentsJson),
|
||||||
};
|
};
|
||||||
this.usageRecords = data.usageRecords || [];
|
this.usageRecords = data.usageRecords || [];
|
||||||
this.receiverOptions = data.receiverName ? [data.receiverName] : [];
|
this.receiverOptions = data.receiverName ? [data.receiverName] : [];
|
||||||
this.ensureCustomerOption(data.issuerId, data.issuerName);
|
this.ensureCustomerOption(data.issuerId, data.issuerName);
|
||||||
this.ensureCustomerOption(data.feeBearerId, data.feeBearerName);
|
this.ensureCustomerOption(data.feeBearerId, data.feeBearerName);
|
||||||
this.handleDeptChange(this.form.availableDeptIds);
|
this.form.availableDeptNames = (this.form.availableDeptIds || [])
|
||||||
|
.map(id => this.deptMap.get(String(id)))
|
||||||
|
.filter(Boolean)
|
||||||
|
.join('、');
|
||||||
|
this.syncFeeBearer();
|
||||||
},
|
},
|
||||||
parse(value) {
|
parse(value) {
|
||||||
if (!value) return [];
|
if (!value) return [];
|
||||||
@@ -381,22 +425,52 @@ export default {
|
|||||||
},
|
},
|
||||||
async loadDepartments() {
|
async loadDepartments() {
|
||||||
const response = await getDeptTree(this.userInfo?.tenantId);
|
const response = await getDeptTree(this.userInfo?.tenantId);
|
||||||
const rows = this.unwrapData(response) || [];
|
const rows = this.excludeExternalOrganization(this.unwrapData(response) || []);
|
||||||
this.deptTree = [{ id: 'all', title: '全部', children: rows }];
|
this.businessDeptTreeOptions = this.toDeptCascaderOptions(rows);
|
||||||
this.deptMap = new Map([['all', '全部']]);
|
this.deptMap = new Map();
|
||||||
this.flattenDepartments(rows).forEach(item => this.deptMap.set(String(item.id), item.title));
|
this.flattenDepartments(rows).forEach(item =>
|
||||||
|
this.deptMap.set(String(item.id), item.title || item.deptName || item.name)
|
||||||
|
);
|
||||||
|
},
|
||||||
|
excludeExternalOrganization(list = []) {
|
||||||
|
return list.reduce((result, item) => {
|
||||||
|
const deptName = item.title || item.deptName || item.name;
|
||||||
|
if (String(deptName || '').trim() === '外部组织') return result;
|
||||||
|
result.push({
|
||||||
|
...item,
|
||||||
|
children: item.children?.length
|
||||||
|
? this.excludeExternalOrganization(item.children)
|
||||||
|
: item.children,
|
||||||
|
});
|
||||||
|
return result;
|
||||||
|
}, []);
|
||||||
|
},
|
||||||
|
toDeptCascaderOptions(list = []) {
|
||||||
|
return list.map(item => ({
|
||||||
|
label: item.title || item.deptName || item.name,
|
||||||
|
value: item.id == null || item.id === '' ? '' : String(item.id),
|
||||||
|
children: item.children?.length ? this.toDeptCascaderOptions(item.children) : undefined,
|
||||||
|
}));
|
||||||
},
|
},
|
||||||
flattenDepartments(rows) {
|
flattenDepartments(rows) {
|
||||||
return (rows || []).flatMap(item => [item, ...this.flattenDepartments(item.children || [])]);
|
return (rows || []).flatMap(item => [item, ...this.flattenDepartments(item.children || [])]);
|
||||||
},
|
},
|
||||||
handleDeptChange(values) {
|
findDeptPath(id, tree = [], parents = []) {
|
||||||
const ids = values || [];
|
const target = Array.isArray(id) ? id.at(-1) : id;
|
||||||
this.form.availableDeptNames = ids.some(item => String(item) === 'all')
|
if (target === undefined || target === null || target === '') return null;
|
||||||
? '全部'
|
for (const node of tree || []) {
|
||||||
: ids
|
const path = [...parents, node.value];
|
||||||
.map(item => this.deptMap.get(String(item)))
|
if (String(node.value) === String(target)) return path;
|
||||||
.filter(Boolean)
|
const matched = this.findDeptPath(target, node.children, path);
|
||||||
.join('、');
|
if (matched) return matched;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
},
|
||||||
|
syncFeeBearer() {
|
||||||
|
const allowed = this.feeBearerOptions.map(item => String(item.id));
|
||||||
|
if (this.form.feeBearerId && !allowed.includes(String(this.form.feeBearerId))) {
|
||||||
|
this.form.feeBearerId = null;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
async searchCustomers(keyword) {
|
async searchCustomers(keyword) {
|
||||||
this.customerLoading = true;
|
this.customerLoading = true;
|
||||||
@@ -545,7 +619,7 @@ export default {
|
|||||||
.bill-ledger-form-page__form :deep(.el-select),
|
.bill-ledger-form-page__form :deep(.el-select),
|
||||||
.bill-ledger-form-page__form :deep(.el-input-number),
|
.bill-ledger-form-page__form :deep(.el-input-number),
|
||||||
.bill-ledger-form-page__form :deep(.el-date-editor),
|
.bill-ledger-form-page__form :deep(.el-date-editor),
|
||||||
.bill-ledger-form-page__form :deep(.el-tree-select) {
|
.bill-ledger-form-page__form :deep(.el-cascader) {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
.bill-ledger-form-page__form :deep(.el-input-number .el-input__inner) {
|
.bill-ledger-form-page__form :deep(.el-input-number .el-input__inner) {
|
||||||
|
|||||||
@@ -271,7 +271,7 @@ export default {
|
|||||||
this.unwrapData(
|
this.unwrapData(
|
||||||
await billLedgerApi.getAvailableOptions(
|
await billLedgerApi.getAvailableOptions(
|
||||||
this.billDialog.keyword,
|
this.billDialog.keyword,
|
||||||
this.form.deptId,
|
undefined,
|
||||||
this.form.billLedgerId
|
this.form.billLedgerId
|
||||||
)
|
)
|
||||||
) || [];
|
) || [];
|
||||||
|
|||||||
@@ -156,9 +156,17 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
async handleApprove(row) {
|
async handleApprove(row) {
|
||||||
await api.approve({ id: row.id });
|
await this.$confirm('确认审批通过该汇票付款?', '提示', { type: 'warning' });
|
||||||
this.$message.success('审批通过');
|
// 防止重复点击:请求期间表格遮罩,后续点击直接忽略
|
||||||
this.loadTable();
|
if (this.loading) return;
|
||||||
|
this.loading = true;
|
||||||
|
try {
|
||||||
|
await api.approve({ id: row.id });
|
||||||
|
this.$message.success('审批通过');
|
||||||
|
await this.loadTable();
|
||||||
|
} finally {
|
||||||
|
this.loading = false;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
async handleReturn(row) {
|
async handleReturn(row) {
|
||||||
const { value } = await this.$prompt('请输入驳回原因', '审批驳回');
|
const { value } = await this.$prompt('请输入驳回原因', '审批驳回');
|
||||||
|
|||||||
@@ -251,10 +251,10 @@
|
|||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="不含税单价" min-width="130">
|
<el-table-column label="合计金额" min-width="140">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-input-number
|
<el-input-number
|
||||||
v-model="row.unitPriceNoTax"
|
v-model="row.totalAmount"
|
||||||
:disabled="readonly"
|
:disabled="readonly"
|
||||||
:min="0"
|
:min="0"
|
||||||
:precision="2"
|
:precision="2"
|
||||||
@@ -263,9 +263,6 @@
|
|||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="不含税金额" min-width="130" align="right">
|
|
||||||
<template #default="{ row }">{{ formatMoney(row.amountNoTax) }}</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="税率" min-width="110">
|
<el-table-column label="税率" min-width="110">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-select
|
<el-select
|
||||||
@@ -282,11 +279,14 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="税额" min-width="120">
|
<el-table-column label="不含税单价" min-width="140" align="right">
|
||||||
<template #default="{ row }">{{ formatMoney(row.taxAmount) }}</template>
|
<template #default="{ row }">{{ formatUnitPrice(row.unitPriceNoTax) }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="合计" min-width="130" align="right">
|
<el-table-column label="不含税金额" min-width="130" align="right">
|
||||||
<template #default="{ row }">{{ formatMoney(row.totalAmount) }}</template>
|
<template #default="{ row }">{{ formatMoney(row.amountNoTax) }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="税额" min-width="120" align="right">
|
||||||
|
<template #default="{ row }">{{ formatMoney(row.taxAmount) }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="备注" min-width="170">
|
<el-table-column label="备注" min-width="170">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
@@ -323,17 +323,8 @@
|
|||||||
<el-table-column label="可开票金额" min-width="140" align="right">
|
<el-table-column label="可开票金额" min-width="140" align="right">
|
||||||
<template #default="{ row }">{{ formatMoney(row.availableInvoiceAmount) }}</template>
|
<template #default="{ row }">{{ formatMoney(row.availableInvoiceAmount) }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="分摊发票金额" min-width="160">
|
<el-table-column label="分摊发票金额" min-width="140" align="right">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">{{ formatMoney(row.allocatedInvoiceAmount) }}</template>
|
||||||
<el-input-number
|
|
||||||
v-model="row.allocatedInvoiceAmount"
|
|
||||||
:disabled="readonly"
|
|
||||||
:min="0"
|
|
||||||
:max="Number(row.availableInvoiceAmount || 0)"
|
|
||||||
:precision="2"
|
|
||||||
:controls="false"
|
|
||||||
/>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</section-card>
|
</section-card>
|
||||||
@@ -454,6 +445,9 @@
|
|||||||
<el-table-column label="结算金额" min-width="130" align="right">
|
<el-table-column label="结算金额" min-width="130" align="right">
|
||||||
<template #default="{ row }">{{ formatMoney(row.settlementAmount) }}</template>
|
<template #default="{ row }">{{ formatMoney(row.settlementAmount) }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column label="已申请开票金额" min-width="140" align="right">
|
||||||
|
<template #default="{ row }">{{ formatMoney(row.invoicedAmount) }}</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="可开票金额" min-width="140" align="right">
|
<el-table-column label="可开票金额" min-width="140" align="right">
|
||||||
<template #default="{ row }">{{ formatMoney(row.availableInvoiceAmount) }}</template>
|
<template #default="{ row }">{{ formatMoney(row.availableInvoiceAmount) }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -774,7 +768,7 @@ export default {
|
|||||||
},
|
},
|
||||||
validateSettlements(rule, value, callback) {
|
validateSettlements(rule, value, callback) {
|
||||||
if (!this.form.settlements.length) {
|
if (!this.form.settlements.length) {
|
||||||
callback(new Error('请选择正式结算单'));
|
callback(new Error('请选择付款结算单'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
callback();
|
callback();
|
||||||
@@ -861,7 +855,6 @@ export default {
|
|||||||
keyword: this.settlementDialog.keyword,
|
keyword: this.settlementDialog.keyword,
|
||||||
contractCategory: '客户合同',
|
contractCategory: '客户合同',
|
||||||
settlementType: 'receivable',
|
settlementType: 'receivable',
|
||||||
invoiceStatus: 'unreceived',
|
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
@@ -913,7 +906,7 @@ export default {
|
|||||||
...item,
|
...item,
|
||||||
formalSettlementId: item.id,
|
formalSettlementId: item.id,
|
||||||
settlementId: item.id,
|
settlementId: item.id,
|
||||||
allocatedInvoiceAmount: rows.length === 1 ? Number(item.availableInvoiceAmount || 0) : 0,
|
allocatedInvoiceAmount: 0,
|
||||||
}));
|
}));
|
||||||
this.form.projectName = first.projectName;
|
this.form.projectName = first.projectName;
|
||||||
this.form.deptName = first.deptName;
|
this.form.deptName = first.deptName;
|
||||||
@@ -1108,15 +1101,30 @@ export default {
|
|||||||
addLine(sheet) {
|
addLine(sheet) {
|
||||||
sheet.lines.push(emptyLine());
|
sheet.lines.push(emptyLine());
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
* 填写合计金额 + 税率后反算:
|
||||||
|
* 合计金额 = 数量 × 不含税单价 × (1 + 税率)
|
||||||
|
* 不含税单价 = 合计金额 / 数量 / (1 + 税率),保留 6 位小数
|
||||||
|
* 不含税金额 = 数量 × 不含税单价,保留 2 位小数
|
||||||
|
*/
|
||||||
recalculateLine(row) {
|
recalculateLine(row) {
|
||||||
const quantity = Number(row.quantity || 0);
|
const quantity = Number(row.quantity || 0);
|
||||||
const unitPrice = Number(row.unitPriceNoTax || 0);
|
const totalAmount = Number(Number(row.totalAmount || 0).toFixed(2));
|
||||||
const amountNoTax = Number((quantity * unitPrice).toFixed(2));
|
|
||||||
const rate = Number(row.taxRate || 0) / 100;
|
const rate = Number(row.taxRate || 0) / 100;
|
||||||
|
row.totalAmount = totalAmount;
|
||||||
|
row.amountWithTax = totalAmount;
|
||||||
|
if (quantity <= 0 || totalAmount <= 0) {
|
||||||
|
row.unitPriceNoTax = 0;
|
||||||
|
row.amountNoTax = 0;
|
||||||
|
row.taxAmount = 0;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const factor = 1 + rate;
|
||||||
|
const unitPriceNoTax = Number((totalAmount / quantity / factor).toFixed(6));
|
||||||
|
const amountNoTax = Number((quantity * unitPriceNoTax).toFixed(2));
|
||||||
|
row.unitPriceNoTax = unitPriceNoTax;
|
||||||
row.amountNoTax = amountNoTax;
|
row.amountNoTax = amountNoTax;
|
||||||
row.taxAmount = rate ? Number((amountNoTax * rate).toFixed(2)) : 0;
|
row.taxAmount = Number((totalAmount - amountNoTax).toFixed(2));
|
||||||
row.totalAmount = Number((amountNoTax + row.taxAmount).toFixed(2));
|
|
||||||
row.amountWithTax = row.totalAmount;
|
|
||||||
},
|
},
|
||||||
validateBusiness() {
|
validateBusiness() {
|
||||||
if (!this.selectedDetailIds.length) throw new Error('请至少选择一条开票明细');
|
if (!this.selectedDetailIds.length) throw new Error('请至少选择一条开票明细');
|
||||||
@@ -1129,12 +1137,14 @@ export default {
|
|||||||
for (const line of sheet.lines) {
|
for (const line of sheet.lines) {
|
||||||
if (!line.goodsCategory || !line.goodsName) throw new Error('请完整填写商品和服务信息');
|
if (!line.goodsCategory || !line.goodsName) throw new Error('请完整填写商品和服务信息');
|
||||||
if (
|
if (
|
||||||
[line.quantity, line.unitPriceNoTax, line.amountNoTax, line.taxRate].some(
|
[line.quantity, line.totalAmount, line.unitPriceNoTax, line.amountNoTax, line.taxRate].some(
|
||||||
Number.isNaN
|
Number.isNaN
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
throw new Error('开票商品行金额格式不正确');
|
throw new Error('开票商品行金额格式不正确');
|
||||||
}
|
}
|
||||||
|
if (Number(line.quantity || 0) <= 0) throw new Error('开票商品行数量必须大于0');
|
||||||
|
if (Number(line.totalAmount || 0) <= 0) throw new Error('开票商品行合计金额必须大于0');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -1215,7 +1225,7 @@ export default {
|
|||||||
},
|
},
|
||||||
async syncReferenceData() {
|
async syncReferenceData() {
|
||||||
if (!this.settlementIds.length) {
|
if (!this.settlementIds.length) {
|
||||||
this.$message.warning('请先选择正式结算单');
|
this.$message.warning('请先选择付款结算单');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
await Promise.all([this.loadReceiverInformation(), this.loadSettlementDetails(false)]);
|
await Promise.all([this.loadReceiverInformation(), this.loadSettlementDetails(false)]);
|
||||||
@@ -1234,6 +1244,9 @@ export default {
|
|||||||
formatMoney(value) {
|
formatMoney(value) {
|
||||||
return Number(value || 0).toFixed(2);
|
return Number(value || 0).toFixed(2);
|
||||||
},
|
},
|
||||||
|
formatUnitPrice(value) {
|
||||||
|
return Number(value || 0).toFixed(6);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -270,6 +270,7 @@ export default {
|
|||||||
rows: [],
|
rows: [],
|
||||||
selection: [],
|
selection: [],
|
||||||
loading: false,
|
loading: false,
|
||||||
|
approveLoading: false,
|
||||||
batchSyncing: false,
|
batchSyncing: false,
|
||||||
page: { current: 1, size: 10, total: 0 },
|
page: { current: 1, size: 10, total: 0 },
|
||||||
mkEnabled: false,
|
mkEnabled: false,
|
||||||
@@ -359,7 +360,7 @@ export default {
|
|||||||
item => String(item.formalSettlementNo || '').trim() === normalizedNo
|
item => String(item.formalSettlementNo || '').trim() === normalizedNo
|
||||||
);
|
);
|
||||||
if (!row?.id) {
|
if (!row?.id) {
|
||||||
this.$message.warning('未找到对应的正式结算单');
|
this.$message.warning('未找到对应的付款结算单');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
@@ -408,15 +409,29 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
async handleApprove(row) {
|
async handleApprove(row) {
|
||||||
await this.$confirm('确认审批通过该开票申请?', '提示', { type: 'warning' });
|
// 防止重复点击:请求进行中忽略后续点击,避免重复审批和重复提示
|
||||||
const res = await api.approve({ id: row.id });
|
if (this.approveLoading) return;
|
||||||
// data=false 表示审批已通过但自动同步金蝶失败,msg 带具体原因
|
this.approveLoading = true;
|
||||||
if (res.data.data === false) {
|
let loading = null;
|
||||||
this.$message.warning(res.data.msg);
|
try {
|
||||||
} else {
|
await this.$confirm('确认审批通过该开票申请?', '提示', { type: 'warning' });
|
||||||
this.$message.success(res.data.msg || '审批通过');
|
loading = this.$loading({
|
||||||
|
lock: true,
|
||||||
|
text: '审批处理中,请稍候…',
|
||||||
|
background: 'rgba(255, 255, 255, 0.6)',
|
||||||
|
});
|
||||||
|
const res = await api.approve({ id: row.id });
|
||||||
|
// data=false 表示审批已通过但自动同步金蝶失败,msg 带具体原因
|
||||||
|
if (res.data.data === false) {
|
||||||
|
this.$message.warning(res.data.msg);
|
||||||
|
} else {
|
||||||
|
this.$message.success(res.data.msg || '审批通过');
|
||||||
|
}
|
||||||
|
this.loadTable();
|
||||||
|
} finally {
|
||||||
|
loading?.close();
|
||||||
|
this.approveLoading = false;
|
||||||
}
|
}
|
||||||
this.loadTable();
|
|
||||||
},
|
},
|
||||||
async handleReturn(row) {
|
async handleReturn(row) {
|
||||||
const { value } = await this.$prompt('请输入驳回原因', '审批驳回');
|
const { value } = await this.$prompt('请输入驳回原因', '审批驳回');
|
||||||
|
|||||||
@@ -16,13 +16,22 @@
|
|||||||
<el-row :gutter="32">
|
<el-row :gutter="32">
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="发票号码" prop="invoiceNo">
|
<el-form-item label="发票号码" prop="invoiceNo">
|
||||||
<el-input v-model="form.invoiceNo" readonly placeholder="请选择金蝶票据池发票">
|
<el-tooltip
|
||||||
<template v-if="!readonly" #append>
|
:content="form.invoiceNo"
|
||||||
<el-tooltip content="查询金蝶票据池" placement="top">
|
:disabled="!form.invoiceNo"
|
||||||
<el-button :icon="Search" @click="openInvoiceDialog" />
|
placement="top"
|
||||||
</el-tooltip>
|
:show-after="200"
|
||||||
</template>
|
>
|
||||||
</el-input>
|
<div class="receipt-form-page__overflow-trigger">
|
||||||
|
<el-input v-model="form.invoiceNo" readonly placeholder="请选择金蝶票据池发票">
|
||||||
|
<template v-if="!readonly" #append>
|
||||||
|
<el-tooltip content="查询金蝶票据池" placement="top">
|
||||||
|
<el-button :icon="Search" @click="openInvoiceDialog" />
|
||||||
|
</el-tooltip>
|
||||||
|
</template>
|
||||||
|
</el-input>
|
||||||
|
</div>
|
||||||
|
</el-tooltip>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
@@ -32,7 +41,16 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="发票类型">
|
<el-form-item label="发票类型">
|
||||||
<el-input v-model="form.invoiceType" disabled placeholder="从金蝶票据池带出" />
|
<el-tooltip
|
||||||
|
:content="form.invoiceType"
|
||||||
|
:disabled="!form.invoiceType"
|
||||||
|
placement="top"
|
||||||
|
:show-after="200"
|
||||||
|
>
|
||||||
|
<div class="receipt-form-page__overflow-trigger">
|
||||||
|
<el-input v-model="form.invoiceType" disabled placeholder="从金蝶票据池带出" />
|
||||||
|
</div>
|
||||||
|
</el-tooltip>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
@@ -64,23 +82,54 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="受票单位">
|
<el-form-item label="受票单位">
|
||||||
<el-input v-model="form.receiverName" disabled placeholder="从金蝶票据池带出" />
|
<el-tooltip
|
||||||
|
:content="form.receiverName"
|
||||||
|
:disabled="!form.receiverName"
|
||||||
|
placement="top"
|
||||||
|
:show-after="200"
|
||||||
|
>
|
||||||
|
<div class="receipt-form-page__overflow-trigger">
|
||||||
|
<el-input v-model="form.receiverName" disabled placeholder="从金蝶票据池带出" />
|
||||||
|
</div>
|
||||||
|
</el-tooltip>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="开票单位">
|
<el-form-item label="开票单位">
|
||||||
<el-input v-model="form.issuerName" disabled placeholder="从金蝶票据池带出" />
|
<el-tooltip
|
||||||
|
:content="form.issuerName"
|
||||||
|
:disabled="!form.issuerName"
|
||||||
|
placement="top"
|
||||||
|
:show-after="200"
|
||||||
|
>
|
||||||
|
<div class="receipt-form-page__overflow-trigger">
|
||||||
|
<el-input v-model="form.issuerName" disabled placeholder="从金蝶票据池带出" />
|
||||||
|
</div>
|
||||||
|
</el-tooltip>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="关联结算单" prop="settlementIds">
|
<el-form-item label="关联结算单" prop="settlementIds">
|
||||||
<el-input :model-value="settlementLabel" readonly placeholder="请选择应付正式结算单">
|
<el-tooltip
|
||||||
<template v-if="!readonly" #append>
|
:content="settlementLabel"
|
||||||
<el-tooltip content="选择正式结算单" placement="top">
|
:disabled="!settlementLabel"
|
||||||
<el-button :icon="Search" @click="openSettlementDialog" />
|
placement="top"
|
||||||
</el-tooltip>
|
:show-after="200"
|
||||||
</template>
|
>
|
||||||
</el-input>
|
<div class="receipt-form-page__overflow-trigger">
|
||||||
|
<el-input
|
||||||
|
:model-value="settlementLabel"
|
||||||
|
readonly
|
||||||
|
placeholder="请选择应付正式结算单"
|
||||||
|
>
|
||||||
|
<template v-if="!readonly" #append>
|
||||||
|
<el-tooltip content="选择付款结算单" placement="top">
|
||||||
|
<el-button :icon="Search" @click="openSettlementDialog" />
|
||||||
|
</el-tooltip>
|
||||||
|
</template>
|
||||||
|
</el-input>
|
||||||
|
</div>
|
||||||
|
</el-tooltip>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@@ -89,7 +138,12 @@
|
|||||||
<section-card title="结算信息">
|
<section-card title="结算信息">
|
||||||
<el-table :data="form.settlements" border>
|
<el-table :data="form.settlements" border>
|
||||||
<el-table-column type="index" label="序号" width="64" align="center" />
|
<el-table-column type="index" label="序号" width="64" align="center" />
|
||||||
<el-table-column label="结算单号" min-width="180" align="center">
|
<el-table-column
|
||||||
|
label="结算单号"
|
||||||
|
min-width="180"
|
||||||
|
align="center"
|
||||||
|
show-overflow-tooltip
|
||||||
|
>
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-link type="primary" @click="openSettlementDetail(row)">
|
<el-link type="primary" @click="openSettlementDetail(row)">
|
||||||
{{ row.formalSettlementNo }}
|
{{ row.formalSettlementNo }}
|
||||||
@@ -173,7 +227,7 @@
|
|||||||
<el-input
|
<el-input
|
||||||
v-model="settlementDialog.keyword"
|
v-model="settlementDialog.keyword"
|
||||||
clearable
|
clearable
|
||||||
placeholder="3结算单号、项目或合同"
|
placeholder="结算单号、项目或合同"
|
||||||
@keyup.enter="loadSettlementCandidates"
|
@keyup.enter="loadSettlementCandidates"
|
||||||
/>
|
/>
|
||||||
<el-button type="primary" @click="loadSettlementCandidates">查询</el-button>
|
<el-button type="primary" @click="loadSettlementCandidates">查询</el-button>
|
||||||
@@ -182,16 +236,32 @@
|
|||||||
ref="settlementTable"
|
ref="settlementTable"
|
||||||
v-loading="settlementDialog.loading"
|
v-loading="settlementDialog.loading"
|
||||||
:data="settlementDialog.rows"
|
:data="settlementDialog.rows"
|
||||||
|
row-key="id"
|
||||||
border
|
border
|
||||||
@selection-change="settlementDialog.selection = $event"
|
@selection-change="settlementDialog.selection = $event"
|
||||||
>
|
>
|
||||||
<el-table-column type="selection" width="52" align="center" />
|
<el-table-column type="selection" width="52" align="center" reserve-selection />
|
||||||
<el-table-column prop="formalSettlementNo" label="结算单号" min-width="170" />
|
<el-table-column
|
||||||
<el-table-column prop="projectName" label="所属项目" min-width="150" />
|
prop="formalSettlementNo"
|
||||||
<el-table-column prop="deptName" label="所属组织" min-width="150" />
|
label="结算单号"
|
||||||
<el-table-column prop="contractNo" label="合同编号" min-width="150" />
|
min-width="170"
|
||||||
<el-table-column prop="payerName" label="付款方" min-width="150" />
|
show-overflow-tooltip
|
||||||
<el-table-column prop="payeeName" label="收款方" min-width="150" />
|
/>
|
||||||
|
<el-table-column
|
||||||
|
prop="projectName"
|
||||||
|
label="所属项目"
|
||||||
|
min-width="150"
|
||||||
|
show-overflow-tooltip
|
||||||
|
/>
|
||||||
|
<el-table-column prop="deptName" label="所属组织" min-width="150" show-overflow-tooltip />
|
||||||
|
<el-table-column
|
||||||
|
prop="contractNo"
|
||||||
|
label="合同编号"
|
||||||
|
min-width="150"
|
||||||
|
show-overflow-tooltip
|
||||||
|
/>
|
||||||
|
<el-table-column prop="payerName" label="付款方" min-width="150" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="payeeName" label="收款方" min-width="150" show-overflow-tooltip />
|
||||||
<el-table-column label="结算总金额" min-width="140" align="right">
|
<el-table-column label="结算总金额" min-width="140" align="right">
|
||||||
<template #default="{ row }">{{ formatMoney(row.settlementAmount) }}</template>
|
<template #default="{ row }">{{ formatMoney(row.settlementAmount) }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -206,7 +276,9 @@
|
|||||||
</el-table>
|
</el-table>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<el-button @click="settlementDialog.visible = false">取消</el-button>
|
<el-button @click="settlementDialog.visible = false">取消</el-button>
|
||||||
<el-button type="primary" @click="confirmSettlements">确定</el-button>
|
<el-button type="primary" @click="confirmSettlements">
|
||||||
|
确定{{ settlementDialog.selection.length ? `(${settlementDialog.selection.length})` : '' }}
|
||||||
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</basic-container>
|
</basic-container>
|
||||||
@@ -437,7 +509,15 @@ export default {
|
|||||||
},
|
},
|
||||||
async openSettlementDialog() {
|
async openSettlementDialog() {
|
||||||
this.settlementDialog.visible = true;
|
this.settlementDialog.visible = true;
|
||||||
|
this.settlementDialog.selection = [];
|
||||||
await this.loadSettlementCandidates();
|
await this.loadSettlementCandidates();
|
||||||
|
await this.$nextTick();
|
||||||
|
const selectedIds = new Set(this.settlementIds.map(id => String(id)));
|
||||||
|
this.settlementDialog.rows.forEach(row => {
|
||||||
|
if (selectedIds.has(String(row.id))) {
|
||||||
|
this.$refs.settlementTable?.toggleRowSelection(row, true);
|
||||||
|
}
|
||||||
|
});
|
||||||
},
|
},
|
||||||
async loadSettlementCandidates() {
|
async loadSettlementCandidates() {
|
||||||
this.settlementDialog.loading = true;
|
this.settlementDialog.loading = true;
|
||||||
@@ -468,11 +548,21 @@ export default {
|
|||||||
this.$message.warning('关联结算单必须属于同一项目、组织及收付款方');
|
this.$message.warning('关联结算单必须属于同一项目、组织及收付款方');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
const previousAmount = new Map(
|
||||||
|
this.form.settlements.map(item => [
|
||||||
|
String(item.formalSettlementId || item.settlementId),
|
||||||
|
item.allocatedInvoiceAmount,
|
||||||
|
])
|
||||||
|
);
|
||||||
this.form.settlements = rows.map(item => ({
|
this.form.settlements = rows.map(item => ({
|
||||||
...item,
|
...item,
|
||||||
formalSettlementId: item.id,
|
formalSettlementId: item.id,
|
||||||
settlementId: item.id,
|
settlementId: item.id,
|
||||||
allocatedInvoiceAmount: rows.length === 1 ? Number(item.settlementAmount || 0) : 0,
|
allocatedInvoiceAmount: previousAmount.has(String(item.id))
|
||||||
|
? Number(previousAmount.get(String(item.id)) || 0)
|
||||||
|
: rows.length === 1
|
||||||
|
? Number(item.settlementAmount || 0)
|
||||||
|
: 0,
|
||||||
}));
|
}));
|
||||||
this.form.projectName = first.projectName;
|
this.form.projectName = first.projectName;
|
||||||
this.form.deptName = first.deptName;
|
this.form.deptName = first.deptName;
|
||||||
@@ -482,9 +572,8 @@ export default {
|
|||||||
await this.loadReferenceInformation();
|
await this.loadReferenceInformation();
|
||||||
this.$refs.formRef?.validateField('settlementIds').catch(() => {});
|
this.$refs.formRef?.validateField('settlementIds').catch(() => {});
|
||||||
},
|
},
|
||||||
async selectSettlement(row) {
|
selectSettlement(row) {
|
||||||
this.settlementDialog.selection = [row];
|
this.$refs.settlementTable?.toggleRowSelection(row);
|
||||||
await this.confirmSettlements();
|
|
||||||
},
|
},
|
||||||
async loadReferenceInformation() {
|
async loadReferenceInformation() {
|
||||||
const data = this.unwrapData(await api.getReferenceInformation(this.settlementIds.join(',')));
|
const data = this.unwrapData(await api.getReferenceInformation(this.settlementIds.join(',')));
|
||||||
@@ -617,6 +706,15 @@ export default {
|
|||||||
.receipt-form-page__form :deep(.el-input-number) {
|
.receipt-form-page__form :deep(.el-input-number) {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
.receipt-form-page__overflow-trigger {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
.receipt-form-page__form :deep(.el-tooltip__trigger:not(.el-select__wrapper)) {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
.receipt-form-page__remark :deep(.el-form-item__content) {
|
.receipt-form-page__remark :deep(.el-form-item__content) {
|
||||||
margin-left: 0 !important;
|
margin-left: 0 !important;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -255,6 +255,7 @@ export default {
|
|||||||
rows: [],
|
rows: [],
|
||||||
selection: [],
|
selection: [],
|
||||||
loading: false,
|
loading: false,
|
||||||
|
approveLoading: false,
|
||||||
pushLoading: false,
|
pushLoading: false,
|
||||||
page: { current: 1, size: 10, total: 0 },
|
page: { current: 1, size: 10, total: 0 },
|
||||||
mkEnabled: false,
|
mkEnabled: false,
|
||||||
@@ -365,15 +366,29 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
async handleApprove(row) {
|
async handleApprove(row) {
|
||||||
await this.$confirm('确认审批通过该收票登记?', '提示', { type: 'warning' });
|
// 防止重复点击:请求进行中忽略后续点击,避免重复审批和重复提示
|
||||||
const res = await api.approve({ id: row.id });
|
if (this.approveLoading) return;
|
||||||
// data=false 表示审批已通过但自动同步金蝶失败,msg 带具体原因
|
this.approveLoading = true;
|
||||||
if (res.data.data === false) {
|
let loading = null;
|
||||||
this.$message.warning(res.data.msg);
|
try {
|
||||||
} else {
|
await this.$confirm('确认审批通过该收票登记?', '提示', { type: 'warning' });
|
||||||
this.$message.success(res.data.msg || '审批通过');
|
loading = this.$loading({
|
||||||
|
lock: true,
|
||||||
|
text: '审批处理中,请稍候…',
|
||||||
|
background: 'rgba(255, 255, 255, 0.6)',
|
||||||
|
});
|
||||||
|
const res = await api.approve({ id: row.id });
|
||||||
|
// data=false 表示审批已通过但自动同步金蝶失败,msg 带具体原因
|
||||||
|
if (res.data.data === false) {
|
||||||
|
this.$message.warning(res.data.msg);
|
||||||
|
} else {
|
||||||
|
this.$message.success(res.data.msg || '审批通过');
|
||||||
|
}
|
||||||
|
this.loadTable();
|
||||||
|
} finally {
|
||||||
|
loading?.close();
|
||||||
|
this.approveLoading = false;
|
||||||
}
|
}
|
||||||
this.loadTable();
|
|
||||||
},
|
},
|
||||||
async handleReturn(row) {
|
async handleReturn(row) {
|
||||||
const { value } = await this.$prompt('请输入驳回原因', '审批驳回');
|
const { value } = await this.$prompt('请输入驳回原因', '审批驳回');
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -163,6 +163,7 @@ export default {
|
|||||||
rows: [],
|
rows: [],
|
||||||
selection: [],
|
selection: [],
|
||||||
loading: false,
|
loading: false,
|
||||||
|
approveLoading: false,
|
||||||
syncLoading: false,
|
syncLoading: false,
|
||||||
resultSyncing: false,
|
resultSyncing: false,
|
||||||
query: {},
|
query: {},
|
||||||
@@ -322,18 +323,32 @@ export default {
|
|||||||
approvalStatus: previousApprovalStatus,
|
approvalStatus: previousApprovalStatus,
|
||||||
mkEnabled: this.mkEnabled,
|
mkEnabled: this.mkEnabled,
|
||||||
});
|
});
|
||||||
|
this.$message.closeAll?.();
|
||||||
this.$message.success('提交成功');
|
this.$message.success('提交成功');
|
||||||
this.refreshChange();
|
this.refreshChange();
|
||||||
},
|
},
|
||||||
async handleApprove(row) {
|
async handleApprove(row) {
|
||||||
const res = await api.approve({ id: row.id });
|
// 防止重复点击:请求进行中忽略后续点击
|
||||||
// data=false 表示审批已通过但自动同步金蝶失败,msg 带具体原因
|
if (this.approveLoading) return;
|
||||||
if (res.data.data === false) {
|
this.approveLoading = true;
|
||||||
this.$message.warning(res.data.msg);
|
const loading = this.$loading({
|
||||||
} else {
|
lock: true,
|
||||||
this.$message.success(res.data.msg || '审批通过');
|
text: '审批处理中,请稍候…',
|
||||||
|
background: 'rgba(255, 255, 255, 0.6)',
|
||||||
|
});
|
||||||
|
try {
|
||||||
|
const res = await api.approve({ id: row.id });
|
||||||
|
// data=false 表示审批已通过但自动同步金蝶失败,msg 带具体原因
|
||||||
|
if (res.data.data === false) {
|
||||||
|
this.$message.warning(res.data.msg);
|
||||||
|
} else {
|
||||||
|
this.$message.success(res.data.msg || '审批通过');
|
||||||
|
}
|
||||||
|
this.refreshChange();
|
||||||
|
} finally {
|
||||||
|
loading.close();
|
||||||
|
this.approveLoading = false;
|
||||||
}
|
}
|
||||||
this.refreshChange();
|
|
||||||
},
|
},
|
||||||
handleMkAudit(row) {
|
handleMkAudit(row) {
|
||||||
if (!row?.id) {
|
if (!row?.id) {
|
||||||
|
|||||||
@@ -302,7 +302,10 @@ export default {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
flowRemaining(flow) {
|
flowRemaining(flow) {
|
||||||
return Math.max(Number(flow.unclaimedAmount || 0) - Number(flow.claimedAmount || 0), 0);
|
const unclaimed = Number(flow.unclaimedAmount || 0);
|
||||||
|
const receipt = Number(flow.receiptAmount || 0);
|
||||||
|
const ceiling = unclaimed > 0 && receipt > 0 ? Math.min(unclaimed, receipt) : unclaimed || receipt;
|
||||||
|
return Math.max(ceiling - Number(flow.claimedAmount || 0), 0);
|
||||||
},
|
},
|
||||||
maxAllocation(row) {
|
maxAllocation(row) {
|
||||||
const current = Number(row.settlement.allocations?.[row.flow.id] || 0);
|
const current = Number(row.settlement.allocations?.[row.flow.id] || 0);
|
||||||
|
|||||||
@@ -252,10 +252,11 @@ export default {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
claimableAmount() {
|
claimableAmount() {
|
||||||
return Math.max(
|
const unclaimed = Number(this.form.unclaimedAmount || 0);
|
||||||
Number(this.form.unclaimedAmount || 0) - Number(this.form.claimedAmount || 0),
|
const receipt = Number(this.form.receiptAmount || 0);
|
||||||
0
|
const ceiling =
|
||||||
);
|
unclaimed > 0 && receipt > 0 ? Math.min(unclaimed, receipt) : unclaimed || receipt;
|
||||||
|
return Math.max(ceiling - Number(this.form.claimedAmount || 0), 0);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@@ -274,14 +275,21 @@ export default {
|
|||||||
}
|
}
|
||||||
const data = this.unwrapData(await api.getDetail(this.flowId));
|
const data = this.unwrapData(await api.getDetail(this.flowId));
|
||||||
const userInfo = this.$store.getters.userInfo || {};
|
const userInfo = this.$store.getters.userInfo || {};
|
||||||
|
// 部分认领继续认领:预填本流水历史关联且仍有剩余可认领金额的结算单
|
||||||
|
const relatedSettlements = (data?.relatedSettlements || []).map(item => ({
|
||||||
|
...item,
|
||||||
|
formalSettlementId: item.id,
|
||||||
|
settlementId: item.id,
|
||||||
|
allocatedReceiptAmount: 0,
|
||||||
|
}));
|
||||||
this.form = {
|
this.form = {
|
||||||
...emptyForm(),
|
...emptyForm(),
|
||||||
...data,
|
...data,
|
||||||
claimerName: userInfo.realName || userInfo.userName || data.claimerName || '',
|
claimerName: userInfo.realName || userInfo.userName || data.claimerName || '',
|
||||||
claimerDeptName: userInfo.deptName || userInfo.dept_name || data.claimerDeptName || '',
|
claimerDeptName: userInfo.deptName || userInfo.dept_name || data.claimerDeptName || '',
|
||||||
claimDate: this.$dayjs().format('YYYY-MM-DD'),
|
claimDate: this.$dayjs().format('YYYY-MM-DD'),
|
||||||
settlementIds: [],
|
settlementIds: relatedSettlements.map(item => item.formalSettlementId),
|
||||||
settlements: [],
|
settlements: relatedSettlements,
|
||||||
attachments: [],
|
attachments: [],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@@ -347,7 +355,7 @@ export default {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (this.allocatedTotal > this.claimableAmount + 0.001) {
|
if (this.allocatedTotal > this.claimableAmount + 0.001) {
|
||||||
this.$message.warning('累计认领金额不能超过公告未认领金额(剩余可认领金额)');
|
this.$message.warning('累计认领金额不能超过剩余可认领金额');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
for (const row of this.form.settlements)
|
for (const row of this.form.settlements)
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user