Squashed commit of the following:

commit dee800f90f
Author: 浅念 <email@sample.com>
Date:   Thu Oct 9 18:07:35 2025 +0800

    客户导出 加筛选条件

commit 9925e2e2e4
Author: 浅念 <email@sample.com>
Date:   Wed Sep 24 19:06:26 2025 +0800

    Squashed commit of the following:

    commit 90df51097f
    Author: 浅念 <email@sample.com>
    Date:   Wed Sep 24 18:50:35 2025 +0800

        备货单 采购单

    commit 7b1fdf3883
    Author: 浅念 <email@sample.com>
    Date:   Wed Sep 24 11:15:31 2025 +0800

        渠道筛选

    commit 1c81d3108c
    Author: 浅念 <email@sample.com>
    Date:   Wed Sep 24 10:50:43 2025 +0800

        客户列表 添加渠道筛选

    commit 2b877e9b4d
    Author: 浅念 <email@sample.com>
    Date:   Mon Sep 22 10:20:46 2025 +0800

        去掉编码显示

    commit bee80af5af
    Author: 浅念 <email@sample.com>
    Date:   Fri Sep 19 16:43:30 2025 +0800

        港口添加 英文

    commit 045ce9289c
    Author: 浅念 <email@sample.com>
    Date:   Thu Sep 18 15:17:30 2025 +0800

        审批历史 和代办审批

    commit c5ec4bb5e1
    Author: 浅念 <email@sample.com>
    Date:   Thu Sep 18 11:31:22 2025 +0800

        修改kpi

    commit 9e260ddcd8
    Author: 浅念 <email@sample.com>
    Date:   Thu Sep 18 09:49:33 2025 +0800

        修改 kpi

    commit 6feb3ace75
    Author: 浅念 <email@sample.com>
    Date:   Thu Sep 18 09:42:44 2025 +0800

        kpi 统计

    commit ec257a246d
    Author: 浅念 <email@sample.com>
    Date:   Wed Sep 17 17:04:35 2025 +0800

        修改 弹框表格

    commit fa764852ab
    Author: 浅念 <email@sample.com>
    Date:   Wed Sep 17 15:54:35 2025 +0800

        添加 账户简称

    commit 65f7f4a123
    Author: 浅念 <email@sample.com>
    Date:   Wed Sep 17 15:10:28 2025 +0800

        品牌加热门  修改 仪表盘接口

    commit 922cfec81d
    Author: 浅念 <email@sample.com>
    Date:   Tue Sep 16 15:57:17 2025 +0800

        调整备货单  crm 端页面

    commit 5c8df36f12
    Author: 浅念 <email@sample.com>
    Date:   Mon Sep 15 17:14:38 2025 +0800

        调整备货单 及各页面名称

    commit 5503a14408
    Author: 浅念 <email@sample.com>
    Date:   Fri Sep 12 18:10:03 2025 +0800

        账户添加公司

    commit 3439b45d9a
    Author: 浅念 <email@sample.com>
    Date:   Fri Sep 12 17:53:26 2025 +0800

        修改终版备货单

    commit 045d13eb7b
    Author: 浅念 <email@sample.com>
    Date:   Fri Sep 12 17:49:07 2025 +0800

        修改备货单 等页面

    commit da690dfa06
    Author: 浅念 <email@sample.com>
    Date:   Thu Sep 11 17:44:37 2025 +0800

        修改 备货单 详情

    commit 853e9591b3
    Author: 浅念 <email@sample.com>
    Date:   Wed Sep 10 18:11:39 2025 +0800

        修改 备货单页面

    commit 9052bd1027
    Author: 浅念 <email@sample.com>
    Date:   Tue Sep 9 20:53:30 2025 +0800

        备货单  审核功能

    commit 079d9babb8
    Merge: ebd7479 91d810b
    Author: 浅念 <email@sample.com>
    Date:   Tue Sep 9 14:51:43 2025 +0800

        Merge branch 'feature/crm_pc' of http://219.157.255.213:25311/xinyouhe/art-design into feature/crm_vehicle

    commit ebd7479573
    Merge: 64e53b6 459d306
    Author: 浅念 <email@sample.com>
    Date:   Tue Sep 9 13:57:28 2025 +0800

        Merge branch 'feature/crm_pc' of http://219.157.255.213:25311/xinyouhe/art-design into feature/crm_vehicle

    commit 64e53b6ee9
    Author: 浅念 <email@sample.com>
    Date:   Mon Sep 8 19:09:55 2025 +0800

        备货单 加 审批流程

    commit 9bd7c89cb4
    Author: 浅念 <email@sample.com>
    Date:   Thu Sep 4 15:09:17 2025 +0800

        车辆信息,备货单  等页面

    # Conflicts:
    #	src/api/adminApi.ts
    #	src/api/crmApi.ts
    #	src/components/custom/OrderDetailContent.vue
    #	src/composables/useOrderDetailDialog.ts
    #	src/composables/useStockingForm.ts
    #	src/views/admin/approval/stocking_auth.vue
    #	src/views/admin/approval/stocking_auth_detil.vue
    #	src/views/admin/stock/final_list_admin.vue
    #	src/views/admin/stock/stocking_list_admin.vue
    #	src/views/admin/user/index.vue
    #	src/views/admin/vehicle/color.vue
    #	src/views/admin/vehicle/modification.vue
    #	src/views/admin/vehicle/port.vue
    #	src/views/admin/vehicle/vehicle_list.vue
    #	src/views/crmpc/approval/stocking_auth.vue
    #	src/views/crmpc/stocking/Add.vue
    #	src/views/crmpc/stocking/final_add.vue
    #	src/views/crmpc/stocking/final_edit.vue
    #	src/views/crmpc/stocking/final_list.vue
    #	src/views/crmpc/stocking/stocking_edit.vue
    #	src/views/crmpc/stocking/stocking_list.vue
    #	src/views/crmpc/vehicle/color.vue
    #	src/views/crmpc/vehicle/modification.vue
    #	src/views/crmpc/vehicle/vehicle_list.vue

commit 4f18a1b8bf
Author: 浅念 <email@sample.com>
Date:   Thu Sep 18 11:34:11 2025 +0800

    Squashed commit of the following:

    commit c5ec4bb5e1
    Author: 浅念 <email@sample.com>
    Date:   Thu Sep 18 11:31:22 2025 +0800

        修改kpi

    commit 9e260ddcd8
    Author: 浅念 <email@sample.com>
    Date:   Thu Sep 18 09:49:33 2025 +0800

        修改 kpi

    commit 6feb3ace75
    Author: 浅念 <email@sample.com>
    Date:   Thu Sep 18 09:42:44 2025 +0800

        kpi 统计

    commit ec257a246d
    Author: 浅念 <email@sample.com>
    Date:   Wed Sep 17 17:04:35 2025 +0800

        修改 弹框表格

    commit fa764852ab
    Author: 浅念 <email@sample.com>
    Date:   Wed Sep 17 15:54:35 2025 +0800

        添加 账户简称

    commit 65f7f4a123
    Author: 浅念 <email@sample.com>
    Date:   Wed Sep 17 15:10:28 2025 +0800

        品牌加热门  修改 仪表盘接口

    commit 922cfec81d
    Author: 浅念 <email@sample.com>
    Date:   Tue Sep 16 15:57:17 2025 +0800

        调整备货单  crm 端页面

    commit 5c8df36f12
    Author: 浅念 <email@sample.com>
    Date:   Mon Sep 15 17:14:38 2025 +0800

        调整备货单 及各页面名称

    commit 5503a14408
    Author: 浅念 <email@sample.com>
    Date:   Fri Sep 12 18:10:03 2025 +0800

        账户添加公司

    commit 3439b45d9a
    Author: 浅念 <email@sample.com>
    Date:   Fri Sep 12 17:53:26 2025 +0800

        修改终版备货单

    commit 045d13eb7b
    Author: 浅念 <email@sample.com>
    Date:   Fri Sep 12 17:49:07 2025 +0800

        修改备货单 等页面

    commit da690dfa06
    Author: 浅念 <email@sample.com>
    Date:   Thu Sep 11 17:44:37 2025 +0800

        修改 备货单 详情

    commit 853e9591b3
    Author: 浅念 <email@sample.com>
    Date:   Wed Sep 10 18:11:39 2025 +0800

        修改 备货单页面

    commit 9052bd1027
    Author: 浅念 <email@sample.com>
    Date:   Tue Sep 9 20:53:30 2025 +0800

        备货单  审核功能

    commit 079d9babb8
    Merge: ebd7479 91d810b
    Author: 浅念 <email@sample.com>
    Date:   Tue Sep 9 14:51:43 2025 +0800

        Merge branch 'feature/crm_pc' of http://219.157.255.213:25311/xinyouhe/art-design into feature/crm_vehicle

    commit ebd7479573
    Merge: 64e53b6 459d306
    Author: 浅念 <email@sample.com>
    Date:   Tue Sep 9 13:57:28 2025 +0800

        Merge branch 'feature/crm_pc' of http://219.157.255.213:25311/xinyouhe/art-design into feature/crm_vehicle

    commit 64e53b6ee9
    Author: 浅念 <email@sample.com>
    Date:   Mon Sep 8 19:09:55 2025 +0800

        备货单 加 审批流程

    commit 9bd7c89cb4
    Author: 浅念 <email@sample.com>
    Date:   Thu Sep 4 15:09:17 2025 +0800

        车辆信息,备货单  等页面

    # Conflicts:
    #	src/views/admin/kpi/kpi_annual.vue

commit a514bf4009
Author: 浅念 <email@sample.com>
Date:   Thu Sep 18 09:55:10 2025 +0800

    Squashed commit of the following:

    commit 9e260ddcd8
    Author: 浅念 <email@sample.com>
    Date:   Thu Sep 18 09:49:33 2025 +0800

        修改 kpi

    commit 6feb3ace75
    Author: 浅念 <email@sample.com>
    Date:   Thu Sep 18 09:42:44 2025 +0800

        kpi 统计

    commit ec257a246d
    Author: 浅念 <email@sample.com>
    Date:   Wed Sep 17 17:04:35 2025 +0800

        修改 弹框表格

    commit fa764852ab
    Author: 浅念 <email@sample.com>
    Date:   Wed Sep 17 15:54:35 2025 +0800

        添加 账户简称

    commit 65f7f4a123
    Author: 浅念 <email@sample.com>
    Date:   Wed Sep 17 15:10:28 2025 +0800

        品牌加热门  修改 仪表盘接口

    commit 922cfec81d
    Author: 浅念 <email@sample.com>
    Date:   Tue Sep 16 15:57:17 2025 +0800

        调整备货单  crm 端页面

    commit 5c8df36f12
    Author: 浅念 <email@sample.com>
    Date:   Mon Sep 15 17:14:38 2025 +0800

        调整备货单 及各页面名称

    commit 5503a14408
    Author: 浅念 <email@sample.com>
    Date:   Fri Sep 12 18:10:03 2025 +0800

        账户添加公司

    commit 3439b45d9a
    Author: 浅念 <email@sample.com>
    Date:   Fri Sep 12 17:53:26 2025 +0800

        修改终版备货单

    commit 045d13eb7b
    Author: 浅念 <email@sample.com>
    Date:   Fri Sep 12 17:49:07 2025 +0800

        修改备货单 等页面

    commit da690dfa06
    Author: 浅念 <email@sample.com>
    Date:   Thu Sep 11 17:44:37 2025 +0800

        修改 备货单 详情

    commit 853e9591b3
    Author: 浅念 <email@sample.com>
    Date:   Wed Sep 10 18:11:39 2025 +0800

        修改 备货单页面

    commit 9052bd1027
    Author: 浅念 <email@sample.com>
    Date:   Tue Sep 9 20:53:30 2025 +0800

        备货单  审核功能

    commit 079d9babb8
    Merge: ebd7479 91d810b
    Author: 浅念 <email@sample.com>
    Date:   Tue Sep 9 14:51:43 2025 +0800

        Merge branch 'feature/crm_pc' of http://219.157.255.213:25311/xinyouhe/art-design into feature/crm_vehicle

    commit ebd7479573
    Merge: 64e53b6 459d306
    Author: 浅念 <email@sample.com>
    Date:   Tue Sep 9 13:57:28 2025 +0800

        Merge branch 'feature/crm_pc' of http://219.157.255.213:25311/xinyouhe/art-design into feature/crm_vehicle

    commit 64e53b6ee9
    Author: 浅念 <email@sample.com>
    Date:   Mon Sep 8 19:09:55 2025 +0800

        备货单 加 审批流程

    commit 9bd7c89cb4
    Author: 浅念 <email@sample.com>
    Date:   Thu Sep 4 15:09:17 2025 +0800

        车辆信息,备货单  等页面

commit 91d810b33a
Author: 浅念 <email@sample.com>
Date:   Tue Sep 9 14:51:23 2025 +0800

    添加公司搜索

commit 459d306504
Author: 浅念 <email@sample.com>
Date:   Tue Sep 9 13:56:43 2025 +0800

    用户添加 公司搜索

commit 8a0d4fc516
Author: 浅念 <email@sample.com>
Date:   Thu Sep 4 14:38:09 2025 +0800

    自定义跟进时间  处理

commit 58f7d56f40
Author: 浅念 <email@sample.com>
Date:   Wed Sep 3 15:13:10 2025 +0800

    工单去掉 移动端不显示限制

commit a91e1d7820
Author: 浅念 <email@sample.com>
Date:   Tue Sep 2 14:13:15 2025 +0800

    将编号 后移

commit a9f8c5c4dc
Author: 浅念 <email@sample.com>
Date:   Wed Aug 27 09:20:56 2025 +0800

    客户重复通知

commit aefd43f79d
Author: 浅念 <email@sample.com>
Date:   Tue Aug 26 09:55:42 2025 +0800

    修改 通知详情样式  和 即时通讯

commit 1bd9d163ec
Author: 浅念 <email@sample.com>
Date:   Mon Aug 25 15:31:14 2025 +0800

    通知 列表富文本内容显示

commit be6093e57d
Author: 浅念 <email@sample.com>
Date:   Mon Aug 25 13:34:13 2025 +0800

    crm 客户添加自定义列  跟进添加图片粘贴上传

commit d83246ba8c
Author: 浅念 <email@sample.com>
Date:   Fri Aug 22 18:33:58 2025 +0800

    显示编号

commit 329acaf68d
Author: 浅念 <email@sample.com>
Date:   Fri Aug 22 18:27:26 2025 +0800

    通知板块 及 功能调整

commit b319944007
Author: 浅念 <email@sample.com>
Date:   Thu Aug 21 11:12:12 2025 +0800

    调整联系方式字段为电话  列表中多个联系方式纵向排列显示   会增加公司信息的自定义输入框  排序搜索 等功能

commit 70d26f0829
Author: 浅念 <email@sample.com>
Date:   Tue Aug 19 16:18:15 2025 +0800

    1.0.3  的相关功能

commit 0e84bedb67
Author: 浅念 <email@sample.com>
Date:   Fri Aug 15 16:31:55 2025 +0800

    v1.0.2 更新内容

commit f5deb7b8f7
Author: 浅念 <email@sample.com>
Date:   Wed Aug 13 19:27:49 2025 +0800

    添加菜单 权限 等页面

commit e797cb24de
Author: 浅念 <email@sample.com>
Date:   Mon Aug 11 19:24:24 2025 +0800

    添加工单附件  及样式

commit 619311dfbe
Author: chenlan <suya123456>
Date:   Fri Aug 8 22:13:25 2025 +0800

    添加crm  归属客户

commit b402e522bf
Author: 浅念 <email@sample.com>
Date:   Thu Aug 7 10:51:17 2025 +0800

    询单权限校验

commit f950f665a9
Author: 浅念 <email@sample.com>
Date:   Thu Aug 7 10:10:45 2025 +0800

    添加 询单图片预览

commit 8deecc8197
Author: 浅念 <email@sample.com>
Date:   Wed Aug 6 18:36:42 2025 +0800

    修改用户页面 询单

commit 3e24d1905f
Author: 浅念 <email@sample.com>
Date:   Tue Aug 5 18:25:32 2025 +0800

    添加用户页面 客户页面接口 等

commit 7542d80e38
Author: 浅念 <email@sample.com>
Date:   Mon Aug 4 18:05:07 2025 +0800

    修改 仪表盘页面样式

commit e5548f95e4
Author: 浅念 <email@sample.com>
Date:   Mon Aug 4 14:50:55 2025 +0800

    修改询单字段  仪表盘页面  及添加管理端客户页面

commit d30ea5b7bf
Author: 浅念 <email@sample.com>
Date:   Mon Aug 4 14:48:58 2025 +0800

    添加echarts 插件

commit 0e4160c5ca
Author: 浅念 <email@sample.com>
Date:   Fri Aug 1 18:27:22 2025 +0800

    仪表盘接口

commit bd23288acd
Author: 浅念 <email@sample.com>
Date:   Fri Aug 1 18:26:46 2025 +0800

    修改 仪表盘

commit 6bfb940881
Author: 浅念 <email@sample.com>
Date:   Fri Aug 1 10:01:35 2025 +0800

    客户列表 添加公海详情展示

commit b50f650565
Author: 浅念 <email@sample.com>
Date:   Thu Jul 31 17:26:36 2025 +0800

    修改 客户标签样式  个人信息添加邮箱 修复关闭全部页面404

commit ea1dbb7af4
Author: 浅念 <email@sample.com>
Date:   Wed Jul 30 18:50:31 2025 +0800

    修改公海和询单页面

commit 1bfbb95bd9
Author: 浅念 <email@sample.com>
Date:   Wed Jul 30 17:23:09 2025 +0800

    修改样式和添加用户数据显示

commit a9f5f76b35
Author: 浅念 <email@sample.com>
Date:   Wed Jul 30 15:06:03 2025 +0800

    设置默认页面

commit 3ea9d3d5df
Author: 浅念 <email@sample.com>
Date:   Wed Jul 30 11:46:31 2025 +0800

    修改飞书登录 公司id 系统id 获取不到问题  客户及公海添加用户信息显示

commit 0cef82279f
Author: 浅念 <email@sample.com>
Date:   Tue Jul 29 16:42:36 2025 +0800

    修改工单 客户等页面

commit 695ebbcc71
Author: 浅念 <email@sample.com>
Date:   Fri Jul 25 17:50:04 2025 +0800

    修改默认值

commit ffc194a1c1
Author: 浅念 <email@sample.com>
Date:   Fri Jul 25 17:05:33 2025 +0800

    飞书授权添加系统码  及登录进入页面路由

commit 48b95e252f
Author: 浅念 <email@sample.com>
Date:   Fri Jul 25 15:48:49 2025 +0800

    回收站添加占位

commit 382011d592
Author: 浅念 <email@sample.com>
Date:   Fri Jul 25 15:11:50 2025 +0800

    修改登录页样式公海数据 个人信息默认图

commit 0f790269db
Author: 浅念 <email@sample.com>
Date:   Fri Jul 25 09:16:55 2025 +0800

    修改字段名称

commit f18cfdb69e
Author: 浅念 <email@sample.com>
Date:   Thu Jul 24 17:28:51 2025 +0800

    调整代码格式

commit 858147fbbd
Author: 浅念 <email@sample.com>
Date:   Thu Jul 24 10:17:22 2025 +0800

    修改token刷新 及修改询单详情展示

commit c333b907e6
Author: 浅念 <email@sample.com>
Date:   Wed Jul 23 18:22:56 2025 +0800

    对接询单接口

commit 7979a31e36
Author: 浅念 <email@sample.com>
Date:   Wed Jul 23 14:40:02 2025 +0800

    修改代码格式

commit 4a39387865
Author: 浅念 <email@sample.com>
Date:   Wed Jul 23 14:07:13 2025 +0800

    设置客户列表权限

commit fc4de02582
Author: 浅念 <email@sample.com>
Date:   Tue Jul 22 17:08:13 2025 +0800

    feat(router): 调整菜单

commit 2ffe0c9753
Author: 浅念 <email@sample.com>
Date:   Tue Jul 22 17:04:16 2025 +0800

    feat(crmApi.ts): 调整结构

commit c3fb2c48d3
Author: 浅念 <email@sample.com>
Date:   Tue Jul 22 17:00:25 2025 +0800

    feat(router): 路由调整

commit c5b0a8265a
Author: 浅念 <email@sample.com>
Date:   Tue Jul 22 16:54:06 2025 +0800

    chore: 添加询单页面及调整菜单

commit ca06c9bc46
Author: 浅念 <email@sample.com>
Date:   Tue Jul 22 16:35:43 2025 +0800

    询单页面及菜单

commit 3b6de4c7fa
Merge: d3bb4ec 85e8b9b
Author: 浅念 <email@sample.com>
Date:   Tue Jul 22 09:22:20 2025 +0800

    Merge branch 'master' into feature/crm_pc

commit d3bb4ec6e5
Merge: c7d8908 d7ab6f1
Author: 浅念 <email@sample.com>
Date:   Mon Jul 21 18:22:55 2025 +0800

    Merge branch 'master' into feature/crm_pc

    # Conflicts:
    #	.gitignore
    #	src/api/crmApi.ts
    #	src/api/usersApi.ts
    #	src/store/modules/user.ts
    #	src/utils/http/index.ts
    #	src/views/auth/login/index.vue
    #	src/views/crmpc/customer/Show.vue
    #	src/views/crmpc/customer/index.vue

commit c7d890809c
Author: 浅念 <email@sample.com>
Date:   Mon Jul 21 18:12:16 2025 +0800

    添加系统码

commit 31cd18fade
Author: 浅念 <email@sample.com>
Date:   Mon Jul 21 18:02:48 2025 +0800

    Merge branch 'master' into feature/crm_pc

    # Conflicts:
    #	.gitignore

commit 59c9c97c08
Author: 浅念 <email@sample.com>
Date:   Mon Jul 21 17:56:52 2025 +0800

    Merge branch 'master' into feature/crm_pc

    # Conflicts:
    #	.gitignore

commit d4b577c42e
Author: 浅念 <email@sample.com>
Date:   Mon Jul 21 13:03:56 2025 +0800

    feat(crm): 添加相关图片

commit e4967760b7
Merge: 0c67666 85102fc
Author: 浅念 <email@sample.com>
Date:   Mon Jul 21 11:25:49 2025 +0800

    Finish crm_pc

commit 85102fcf32
Author: 浅念 <email@sample.com>
Date:   Mon Jul 21 11:24:06 2025 +0800

    crm 接口对接

commit 0c67666793
Author: 浅念 <email@sample.com>
Date:   Wed Jul 16 17:18:14 2025 +0800

    添加上传头部信息

commit a41c75f703
Author: 浅念 <email@sample.com>
Date:   Tue Jul 15 09:40:53 2025 +0800

    修改页面

commit 22ae0e86c8
Author: 浅念 <email@sample.com>
Date:   Mon Jul 14 17:59:02 2025 +0800

    修改页面

commit 812e3c4b0c
Author: 浅念 <email@sample.com>
Date:   Mon Jul 14 10:09:10 2025 +0800

    修改菜单问题

commit 2ad479b006
Author: 浅念 <email@sample.com>
Date:   Fri Jul 11 19:45:57 2025 +0800

    修改样式

commit 5802e157bf
Author: 浅念 <email@sample.com>
Date:   Fri Jul 11 19:43:34 2025 +0800

    修改工单

commit 713d43f7b4
Author: 浅念 <email@sample.com>
Date:   Fri Jul 11 18:37:16 2025 +0800

    添加登录

commit 719911918f
Author: 浅念 <email@sample.com>
Date:   Fri Jul 4 17:16:38 2025 +0800

    项目创建

commit ce47b39fa5
Author: 浅念 <email@sample.com>
Date:   Wed Jul 2 09:37:51 2025 +0800

    删除

# Conflicts:
#	.env.development
#	src/api/adminApi.ts
#	src/api/crmApi.ts
#	src/components/custom/OrderDetailContent.vue
#	src/composables/useOrderDetailDialog.ts
#	src/composables/useStockingForm.ts
#	src/views/admin/approval/stocking_auth.vue
#	src/views/admin/approval/stocking_auth_detil.vue
#	src/views/admin/customer/index.vue
#	src/views/admin/kpi/kpi_annual.vue
#	src/views/admin/stock/final_list_admin.vue
#	src/views/admin/stock/stocking_list_admin.vue
#	src/views/admin/user/index.vue
#	src/views/admin/vehicle/color.vue
#	src/views/admin/vehicle/modification.vue
#	src/views/admin/vehicle/port.vue
#	src/views/admin/vehicle/vehicle_list.vue
#	src/views/crmpc/approval/stocking_auth.vue
#	src/views/crmpc/stocking/Add.vue
#	src/views/crmpc/stocking/final_add.vue
#	src/views/crmpc/stocking/final_edit.vue
#	src/views/crmpc/stocking/final_list.vue
#	src/views/crmpc/stocking/stocking_edit.vue
#	src/views/crmpc/stocking/stocking_list.vue
#	src/views/crmpc/vehicle/color.vue
#	src/views/crmpc/vehicle/modification.vue
#	src/views/crmpc/vehicle/vehicle_list.vue
This commit is contained in:
浅念
2025-10-10 10:14:26 +08:00
parent c7cdec27e0
commit 938ef89ec0
41 changed files with 3875 additions and 171 deletions
+2 -1
View File
@@ -309,6 +309,7 @@
"watchWithFilter": true,
"whenever": true,
"ElMessage": true,
"ElTag": true
"ElTag": true,
"ElMessageBox": true
}
}
+2 -2
View File
@@ -7,8 +7,8 @@ VITE_BASE_URL = /
# VITE_API_URL = https://m1.apifoxmock.com/m1/6400575-6097373-default
# VITE_API_URL = http://219.157.255.213:25703
# VITE_API_URL = https://mzl.dev.hnxinyouhe.com
# VITE_API_URL = https://fdesk.hnxinyouhe.com
VITE_API_URL = https://x-server.hnxinyouhe.com
VITE_API_URL = https://fdesk.hnxinyouhe.com
# VITE_API_URL = https://x-server.hnxinyouhe.com
# VITE_API_URL_WSS = wss://mzl.dev.hnxinyouhe.com
# VITE_API_URL_WSS = wss://fdesk.hnxinyouhe.com
+74
View File
@@ -0,0 +1,74 @@
import request from '@/utils/http'
export class financeService {
// 收款记录-列表
static getReceiptList(params: Api.Common.PaginatingParams) {
return request.get<Api.Common.CommonListData>({
url: '/admin/receipt/list',
params
})
}
// 收款记录-详情
static getReceiptDetail(params: any) {
return request.get<any>({
url: '/admin/receipt/show',
params
})
}
// 收款记录-添加
static addReceipt(params: any) {
return request.post<Api.Common.AddResponse>({
url: '/admin/receipt/store',
params
})
}
// 收款记录-更新
static updateReceipt(params: any) {
return request.post<Api.Common.AddResponse>({
url: '/admin/receipt/update',
params
})
}
// 收款记录-删除
static deleteReceipt(params: any) {
return request.post<Api.Common.AddResponse>({
url: '/admin/receipt/destroy',
params
})
}
//付款申请-列表
static getPaymentList(params: Api.Common.PaginatingParams) {
return request.get<Api.Common.CommonListData>({
url: '/admin/payment/list',
params
})
}
//付款申请-详情
static getPaymentDetail(params: any) {
return request.get<any>({
url: '/admin/payment/show',
params
})
}
//付款申请-添加
static addPayment(params: any) {
return request.post<Api.Common.AddResponse>({
url: '/admin/payment/store',
params
})
}
//付款申请-更新
static updatePayment(params: any) {
return request.post<Api.Common.AddResponse>({
url: '/admin/payment/update',
params
})
}
//付款申请-删除
static deletePayment(params: any) {
return request.post<Api.Common.AddResponse>({
url: '/admin/payment/destroy',
params
})
}
}
+46
View File
@@ -0,0 +1,46 @@
import request from '@/utils/http'
export class purchaseService {
// 采购单预置
static purchaseorderpredata(params: any) {
return request.get<Api.Common.AddResponse>({
url: '/admin/purchase/order/predata',
params
})
}
// 采购单列表
static purchaseorderlist(params: Api.Common.PaginatingParams) {
return request.get<Api.Common.CommonListData>({
url: '/admin/purchase/order/list',
params
})
}
// 采购单添加
static purchaseorderadd(params: any) {
return request.post<Api.Common.AddResponse>({
url: '/admin/purchase/order/store',
params
})
}
// 采购单更新
static purchaseorderupdate(params: any) {
return request.post<Api.Common.AddResponse>({
url: '/admin/purchase/order/update',
params
})
}
// 采购单删除
static purchaseorderdelete(params: any) {
return request.post<Api.Common.AddResponse>({
url: '/admin/purchase/order/destroy',
params
})
}
// 采购单详情
static purchaseorderdetail(params: any) {
return request.get<any>({
url: '/admin/purchase/order/show',
params
})
}
}
+22 -1
View File
@@ -251,7 +251,7 @@ export class manageService {
//审批记录
static stockapprovalrecord(params: any) {
return request.get<any>({
url: '/admin/approval/records/list',
url: '/admin/approval/records/todo',
params
})
}
@@ -305,4 +305,25 @@ export class manageService {
params
})
}
//审核详情
static stockapprovaldetailborder(params: any) {
return request.get<any>({
url: '/admin/approval/records/border',
params
})
}
//审批转交
static stockapprovaltransfer(params: any) {
return request.post<Api.Common.AddResponse>({
url: '/admin/approval/records/transfer',
params
})
}
//审批时间轴
static stockapprovaltimeline(params: any) {
return request.get<any>({
url: '/admin/approval/records/timeline',
params
})
}
}
+1 -1
View File
@@ -260,7 +260,7 @@ export class CrmService {
//审批记录
static stockapprovalrecord(params: any) {
return request.get<any>({
url: '/crm/approval/records/list',
url: '/crm/approval/records/todo',
params
})
}
+4 -6
View File
@@ -184,12 +184,11 @@
const elTable = tableRef.value
if (!elTable) return
// 递归处理树形数据
// 支持普通与树形数据行展开
const processRows = (rows: any[]) => {
rows.forEach((row) => {
const hasChildren = row.children?.length > 0
if (hasChildren) {
elTable.toggleRowExpansion(row, true)
if (row.children?.length > 0) {
processRows(row.children)
}
})
@@ -203,12 +202,11 @@
const elTable = tableRef.value
if (!elTable) return
// 递归处理树形数据
// 支持普通与树形数据行收起
const processRows = (rows: any[]) => {
rows.forEach((row) => {
const hasChildren = row.children?.length > 0
if (hasChildren) {
elTable.toggleRowExpansion(row, false)
if (row.children?.length > 0) {
processRows(row.children)
}
})
+132
View File
@@ -0,0 +1,132 @@
<template>
<div class="approval-timeline">
<div v-for="(rec, idx) in records" :key="idx" class="timeline-item">
<div class="left">
<div class="avatar-box">
<span class="initial">{{ rec.name?.slice(0, 1) || '—' }}</span>
<i v-if="rec.approved" class="status-dot iconfont-sys">&#xe621;</i>
<i v-if="rec.rejected" class="status-dot rejected">&#xe83a;</i>
<i v-else-if="rec.pending" class="status-dot pending iconfont-sys">&#xe839;</i>
</div>
</div>
<div class="right">
<div class="row name-role">
<span class="name">{{ rec.name }}</span>
<span class="role">({{ rec.role }})</span>
</div>
<div >
审核说明:{{ rec.comment }}
</div>
<div class="row time">{{ rec.time }}</div>
</div>
</div>
<div v-if="!records || !records.length" class="empty">暂无审批记录</div>
</div>
</template>
<script setup lang="ts">
interface ApprovalRecordItem {
name?: string
role?: string
type?: string
time?: string
approved?: boolean
rejected?: boolean
pending?: boolean
comment?: string
}
defineProps<{ records: ApprovalRecordItem[] }>()
</script>
<style scoped lang="scss">
/* 审批记录 时间线 */
.approval-timeline {
padding: 8px 4px 8px 0;
}
.timeline-item {
display: flex;
align-items: flex-start;
gap: 10px;
position: relative;
}
.timeline-item + .timeline-item {
margin-top: 50px;
}
.left {
width: 46px;
display: flex;
flex-direction: column;
align-items: center;
position: relative;
}
.avatar-box {
width: 46px;
height: 46px;
background: #3d7bff;
border-radius: 10px;
color: #fff;
position: relative;
display: flex;
align-items: center;
justify-content: center;
font-weight: 700;
font-size: 20px;
}
.status-dot {
position: absolute;
right: -4px;
bottom: -4px;
font-size: 9px;
padding: 3px 1px;
border-radius: 50%;
background: #22c55e;
border: 2px solid #fff;
box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05);
}
.status-dot.pending {
background: #3471ff;
padding: 3px 3px;
}
.status-dot.rejected {
background: #ff0000;
padding: 3px 3px;
}
/* 连接下一个节点的虚线 */
.timeline-item:not(:last-child) .left::after {
content: '';
position: absolute;
top: 52px; /* avatar 46px + 间距 6px */
left: 23px; /* 盒子宽度一半,确保竖线居中 */
width: 0;
height: calc(100% + 16px); /* 加上相邻项之间的间距 */
border-left: 2px dotted #bfbfbf;
}
.right {
flex: 1;
padding-top: 2px;
}
.row.name-role {
color: #222;
margin-bottom: 10px;
}
.name {
font-weight: 600;
}
.role {
color: #666;
margin-left: 4px;
}
.time {
color: #888;
font-size: 12px;
margin-top: 2px;
margin-top: 10px;
}
.empty {
color: #999;
padding: 8px 0 4px 4px;
}
</style>
+197 -33
View File
@@ -8,7 +8,9 @@
</div>
<div class="basic-info-item">
<span class="label">业务员:</span>
<span class="value">{{ orderData.salesperson_snapshot || orderData.salesperson || '—' }}</span>
<span class="value">{{
orderData.salesperson_snapshot || orderData.salesperson || '—'
}}</span>
</div>
</div>
@@ -26,19 +28,27 @@
</td>
<td>
<span class="info-label"> 清关目的国:</span>
<span class="info-value">{{ orderData.clearance_country_snapshot || orderData.clearanceCountry || '—' }}</span>
<span class="info-value">{{
orderData.clearance_country_snapshot || orderData.clearanceCountry || '—'
}}</span>
</td>
<td>
<span class="info-label"> 客户来源:</span>
<span class="info-value">{{ orderData.customer_source_snapshot || orderData.customerSource || '—' }}</span>
<span class="info-value">{{
orderData.customer_source_snapshot || orderData.customerSource || '—'
}}</span>
</td>
<td>
<span class="info-label"> 客户名称:</span>
<span class="info-value">{{ orderData.customer_snapshot || orderData.customerName || '—' }}</span>
<span class="info-value">{{
orderData.customer_snapshot || orderData.customerName || '—'
}}</span>
</td>
<td>
<span class="info-label"> 客户所在国:</span>
<span class="info-value">{{ orderData.customer_country_snapshot || orderData.customerCountry || '—' }}</span>
<span class="info-value">{{
orderData.customer_country_snapshot || orderData.customerCountry || '—'
}}</span>
</td>
</tr>
</table>
@@ -46,8 +56,16 @@
<!-- 订单详情表格(ArtTable) -->
<div class="table-section">
<ArtTable :data="vehItems" border :pagination="false">
<ArtTable ref="tableRef" :data="vehItems" border :pagination="false">
<template #default>
<ElTableColumn type="expand" width="30">
<template #default="scope">
<div style="padding: 6px">
<strong>备注:</strong>
<span>{{ scope.row.remark || '暂无备注' }}</span>
</div>
</template>
</ElTableColumn>
<ElTableColumn label="编号" width="60" align="center">
<template #default="scope">{{ scope.$index + 1 }}</template>
</ElTableColumn>
@@ -61,66 +79,163 @@
<template #default="scope">{{ scope.row.num ?? scope.row.quantity ?? 1 }}</template>
</ElTableColumn>
<ElTableColumn label="颜色/外" align="center" prop="color_exterior_snapshot" />
<ElTableColumn label="内饰" min-width="120" align="center" prop="color_interior_snapshot" />
<ElTableColumn
label="内饰"
min-width="120"
align="center"
prop="color_interior_snapshot"
/>
<ElTableColumn label="改装" min-width="120" align="center" prop="modify" />
<ElTableColumn label="官方指导价/二手挂牌价" min-width="175" align="center">
<template #default="scope">
<span v-if="scope.row.mileage > 0">
{{ scope.row.listing_price?.currency_info || scope.row.listing_price?.amount || scope.row.discount || '—' }}
{{
scope.row.listing_price?.currency_info ||
scope.row.listing_price?.amount ||
scope.row.discount ||
'—'
}}
</span>
<span v-else>
{{ scope.row.official_price?.currency_info || scope.row.official_price?.amount || scope.row.discount || '—' }}
{{
scope.row.official_price?.currency_info ||
scope.row.official_price?.amount ||
scope.row.discount ||
'—'
}}
</span>
</template>
</ElTableColumn>
<ElTableColumn label="优惠" min-width="120" align="center">
<template #default="scope">
<span v-if="scope.row.mileage > 0">
{{ scope.row.reduction_price?.currency_info || scope.row.reduction_price?.amount || scope.row.discount || '—' }}
{{
scope.row.reduction_price?.currency_info ||
scope.row.reduction_price?.amount ||
scope.row.discount ||
'—'
}}
</span>
<span v-else>
{{ scope.row.discount_price?.currency_info || scope.row.discount_price?.amount || scope.row.discount || '—' }}
{{
scope.row.discount_price?.currency_info ||
scope.row.discount_price?.amount ||
scope.row.discount ||
'—'
}}
</span>
</template>
</ElTableColumn>
<ElTableColumn label="手续费" min-width="120" align="center">
<template #default="scope">{{ scope.row.handling_fee?.currency_info || scope.row.handling_fee?.amount || scope.row.discount || '—' }}</template>
<template #default="scope">{{
scope.row.handling_fee?.currency_info ||
scope.row.handling_fee?.amount ||
scope.row.discount ||
'—'
}}</template>
</ElTableColumn>
<ElTableColumn label="改装费" min-width="120" align="center">
<template #default="scope">{{ scope.row.retrofit_fee?.currency_info || scope.row.retrofit_fee?.amount || scope.row.discount || '—' }}</template>
<template #default="scope">{{
scope.row.retrofit_fee?.currency_info ||
scope.row.retrofit_fee?.amount ||
scope.row.discount ||
'—'
}}</template>
</ElTableColumn>
<ElTableColumn label="FOB运费" min-width="120" align="center">
<template #default="scope">{{ scope.row.fob_transport_fee?.currency_info || scope.row.fob_transport_fee?.amount || scope.row.discount || '—' }}</template>
<template #default="scope">{{
scope.row.fob_transport_fee?.currency_info ||
scope.row.fob_transport_fee?.amount ||
scope.row.discount ||
'—'
}}</template>
</ElTableColumn>
<ElTableColumn label="港杂费" min-width="120" align="center">
<template #default="scope">{{ scope.row.port_misc_fee?.currency_info || scope.row.port_misc_fee?.amount || scope.row.discount || '—' }}</template>
<template #default="scope">{{
scope.row.port_misc_fee?.currency_info ||
scope.row.port_misc_fee?.amount ||
scope.row.discount ||
'—'
}}</template>
</ElTableColumn>
<ElTableColumn label="海运费" min-width="120" align="center">
<template #default="scope">{{ scope.row.ocean_freight?.currency_info || scope.row.ocean_freight?.amount || scope.row.discount || '—' }}</template>
<template #default="scope">{{
scope.row.ocean_freight?.currency_info ||
scope.row.ocean_freight?.amount ||
scope.row.discount ||
'—'
}}</template>
</ElTableColumn>
<ElTableColumn label="佣金" min-width="120" align="center">
<template #default="scope">{{
scope.row.commission?.currency_info ||
scope.row.commission?.amount ||
scope.row.discount ||
'—'
}}</template>
</ElTableColumn>
<ElTableColumn label="购置税" min-width="120" align="center">
<template #default="scope">{{
scope.row.purchase_tax?.currency_info ||
scope.row.purchase_tax?.amount ||
scope.row.discount ||
'—'
}}</template>
</ElTableColumn>
<ElTableColumn label="预估退税额" min-width="120" align="center">
<template #default="scope">{{
scope.row.tax_refund?.currency_info ||
scope.row.tax_refund?.amount ||
scope.row.discount ||
'—'
}}</template>
</ElTableColumn>
<ElTableColumn label="单价" min-width="120" align="center">
<template #default="scope">{{ scope.row.unit_price?.currency_info || scope.row.unit_price?.amount || scope.row.discount || '—' }}</template>
<template #default="scope">{{
scope.row.unit_price?.currency_info ||
scope.row.unit_price?.amount ||
scope.row.discount ||
'—'
}}</template>
</ElTableColumn>
<ElTableColumn label="总价" min-width="120" align="center">
<template #default="scope">{{ scope.row.total_price?.currency_info || scope.row.total_price?.amount || scope.row.discount || '—' }}</template>
<template #default="scope">{{
scope.row.total_price?.currency_info ||
scope.row.total_price?.amount ||
scope.row.discount ||
'—'
}}</template>
</ElTableColumn>
<ElTableColumn fixed="right" label="利润" min-width="120" align="center">
<template #default="scope">{{ scope.row.profit?.currency_info || scope.row.profit?.amount || scope.row.discount || '—' }}</template>
<template #default="scope">{{
scope.row.profit?.currency_info ||
scope.row.profit?.amount ||
scope.row.discount ||
'—'
}}</template>
</ElTableColumn>
</template>
</ArtTable>
<div class="order-summary">
<div class="summary-item">
<span class="label">合同汇率:</span>
<span class="value">{{ orderData.contract_exchange_rate || orderData.contractRate || '—' }}</span>
<span class="value">{{
orderData.contract_exchange_rate || orderData.contractRate || '—'
}}</span>
</div>
<div class="summary-item">
<span class="label">合计到岸价:</span>
<span class="value">${{ formatPrice(Number(orderData.cif_total_amount?.amount ?? orderData.totalCif ?? 0)) }}</span>
<span class="value"
>${{
formatPrice(Number(orderData.cif_total_amount?.amount ?? orderData.totalCif ?? 0))
}}</span
>
</div>
<div class="summary-item">
<span class="label">利润:</span>
<span class="value">{{ orderData.profit_total?.currency_info || orderData.profit_total?.amount || '—' }}</span>
<span class="value">{{
orderData.profit_total?.currency_info || orderData.profit_total?.amount || '—'
}}</span>
</div>
</div>
</div>
@@ -131,34 +246,54 @@
<tr>
<td>
<span class="info-label"> 清关人:</span>
<span class="info-value">{{ orderData.declarant_name || orderData.declarant || '—' }}</span>
<span class="info-value">{{
orderData.declarant_name || orderData.declarant || '—'
}}</span>
</td>
<td>
<span class="info-label"> 预计发运日期:</span>
<span class="info-value">{{ orderData.eta_ship_date || orderData.etaShipDate || '—' }}</span>
<span class="info-value">{{
orderData.eta_ship_date || orderData.etaShipDate || '—'
}}</span>
</td>
<td>
<span class="info-label"> 出运方式:</span>
<span class="info-value">{{ orderData.shipping_method_snapshot || orderData.shippingMethod || '—' }}</span>
<span class="info-value">{{
orderData.shipping_method_snapshot || orderData.shippingMethod || '—'
}}</span>
</td>
<td>
<span class="info-label"> 国内收货港:</span>
<span class="info-value">{{ orderData.domestic_port_snapshot || orderData.domesticPort || '—' }}</span>
<span class="info-value">{{
orderData.domestic_port_snapshot || orderData.domesticPort || '—'
}}</span>
</td>
<td>
<span class="info-label"> 贸易条款/清关目的港:</span>
<span class="info-value">{{ orderData.trade_term_snapshot || orderData.tradeTerms || '—' }}/{{ orderData.clearance_port_snapshot || '—' }}</span>
<span class="info-value"
>{{ orderData.trade_term_snapshot || orderData.tradeTerms || '—' }}/{{
orderData.clearance_port_snapshot || '—'
}}</span
>
</td>
<td>
<span class="info-label"> 最迟到港时间:</span>
<span class="info-value">{{ orderData.latest_arrival_date || orderData.latestArrival || '—' }}</span>
<span class="info-value">{{
orderData.latest_arrival_date || orderData.latestArrival || '—'
}}</span>
</td>
</tr>
</table>
</div>
<!-- 计划收款信息 -->
<div class="payment-section" v-if="(orderData.account_list && orderData.account_list.length) || (orderData.payments && orderData.payments.length)">
<div
class="payment-section"
v-if="
(orderData.account_list && orderData.account_list.length) ||
(orderData.payments && orderData.payments.length)
"
>
<div class="table-wrapper">
<table class="payment-table">
<thead>
@@ -192,8 +327,7 @@
</template>
<script lang="ts">
import { defineComponent, computed } from 'vue'
import { defineComponent, computed, ref, onMounted, nextTick, watch } from 'vue'
export default defineComponent({
name: 'OrderDetailContent',
props: {
@@ -231,11 +365,34 @@
const vehItems = computed(() => {
return (props.orderData as any).veh_list || (props.orderData as any).items || []
})
const tableRef = ref()
const expandWhenReady = () => {
nextTick(() => {
nextTick(() => {
if (vehItems.value && vehItems.value.length) {
tableRef.value?.expandAll?.()
}
})
})
}
onMounted(() => {
// 默认展开所有行(等数据和表格渲染完成后再触发)
expandWhenReady()
})
watch(
() => vehItems.value?.length,
(len) => {
if (len && len > 0) expandWhenReady()
},
{ immediate: true }
)
return {
paymentTableData,
vehItems,
formatPrice
formatPrice,
tableRef
}
}
})
@@ -406,7 +563,14 @@
padding: 10px 8px;
vertical-align: middle;
}
.el-table__expand-cell {
padding: 0;
border-top: none;
}
.el-table__expand-wrapper {
padding: 10px;
background-color: #f9f9f9;
}
/* 打印优化 */
@media print {
.order-detail-content {
@@ -0,0 +1,175 @@
<template>
<div class="detail-wrap">
<div class="detail-grid">
<div class="item">
<span class="label">采购单号:</span>
<span class="value">{{ detailData.order_no || '—' }}</span>
</div>
<div class="item">
<span class="label">PI号:</span>
<span class="value">{{ detailData.pi_no || '—' }}</span>
</div>
<div class="item">
<span class="label">提交人:</span>
<span class="value">{{ detailData.buyer_name || '—' }}</span>
</div>
<div class="item full">
<span class="label">备注:</span>
<span class="value">{{ detailData.remark || '—' }}</span>
</div>
</div>
<div class="detail-block">
<div class="block-title">合同文件</div>
<div
v-if="detailData.contract_file_url && detailData.contract_file_url.length"
class="files-list"
>
<div class="file-row" v-for="(f, idx) in detailData.contract_file_url" :key="idx">
<el-icon class="file-icon"><Document /></el-icon>
<span class="file-name">{{ f.name }}</span>
<a class="el-link el-link--primary" :href="f.url" target="_blank" rel="noopener">查看</a>
<a class="el-link el-link--info" :href="f.url" :download="f.name">下载</a>
</div>
</div>
<div v-else class="empty-tip">无合同文件</div>
</div>
<div class="detail-block">
<div class="block-title">备货单组</div>
<div v-if="detailData.stock_order && detailData.stock_order.length" class="groups">
<div class="group" v-for="(g, gi) in detailData.stock_order" :key="gi">
<div class="group-head">
<span class="order">{{ g.order_no || '备货单' }}</span>
<span class="seller" v-if="g.salesperson_snapshot"
>({{ g.salesperson_snapshot }})</span
>
<span class="date" v-if="g.biz_date">{{ g.biz_date }}</span>
</div>
<div class="chips">
<span class="chip" v-for="(v, vi) in g.stock_order_items || []" :key="vi">
{{ v.model_snapshot }}
</span>
</div>
</div>
</div>
<div v-else class="empty-tip">无备货单数据</div>
</div>
</div>
</template>
<script lang="ts">
import { Document } from '@element-plus/icons-vue'
import { PropType } from 'vue'
// 定义组件的数据类型
interface DetailData {
order_no?: string
pi_no?: string
buyer_name?: string
remark?: string
contract_file_url?: Array<{ name: string; url: string }>
stock_order?: Array<{
order_no?: string
salesperson_snapshot?: string
biz_date?: string
stock_order_items?: Array<{ model_snapshot: string }>
}>
}
// 使用 Vue 的 props 传递数据
export default {
name: 'ProcurementDetailView',
props: {
detailData: {
type: Object as PropType<DetailData>,
required: true
}
}
}
</script>
<style scoped lang="scss">
.detail-wrap {
display: flex;
flex-direction: column;
gap: 16px;
}
.detail-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 10px 16px;
}
.detail-grid .item {
display: flex;
align-items: center;
gap: 8px;
}
.detail-grid .item.full {
grid-column: 1 / -1;
}
.detail-grid .label {
color: var(--el-text-color-regular);
}
.detail-grid .value {
font-weight: 600;
color: var(--el-text-color-primary);
}
.detail-block {
border-top: 1px dashed var(--el-border-color-lighter);
padding-top: 8px;
}
.block-title {
font-weight: 600;
margin-bottom: 8px;
}
.files-list {
display: flex;
flex-direction: column;
gap: 8px;
}
.file-row {
display: flex;
align-items: center;
gap: 10px;
}
.file-name {
flex: 1;
}
.empty-tip {
color: var(--el-text-color-secondary);
}
.groups {
display: flex;
flex-direction: column;
max-height: 38vh;
overflow-y: auto;
gap: 12px;
}
.group {
border: 1px solid var(--el-border-color-lighter);
border-radius: 10px;
padding: 14px 6px 8px;
background: var(--el-fill-color-blank);
}
.group-head {
display: flex;
gap: 8px;
margin-bottom: 10px;
align-content: center;
}
.chips {
display: flex;
flex-wrap: wrap;
gap: 6px;
}
.chip {
padding: 4px 8px;
border-radius: 12px;
background: #f0f6ff;
color: #3a7af3;
border: 1px solid #e3edff;
font-size: 12px;
line-height: 18px;
}
</style>
@@ -0,0 +1,169 @@
<template>
<div class="detail-wrap">
<div class="detail-grid">
<div class="item">
<span class="label">采购单号:</span>
<span class="value">{{ detailData.order_no || '—' }}</span>
</div>
<div class="item">
<span class="label">PI号:</span>
<span class="value">{{ detailData.pi_no || '—' }}</span>
</div>
<div class="item">
<span class="label">提交人:</span>
<span class="value">{{ detailData.buyer_name || '—' }}</span>
</div>
<div class="item full">
<span class="label">备注:</span>
<span class="value">{{ detailData.remark || '—' }}</span>
</div>
</div>
<div class="detail-block">
<div class="block-title">合同文件</div>
<div
v-if="detailData.contract_file_url && detailData.contract_file_url.length"
class="files-list"
>
<div class="file-row" v-for="(f, idx) in detailData.contract_file_url" :key="idx">
<el-icon class="file-icon"><Document /></el-icon>
<span class="file-name">{{ f.name }}</span>
<a class="el-link el-link--primary" :href="f.url" target="_blank" rel="noopener">查看</a>
<a class="el-link el-link--info" :href="f.url" :download="f.name">下载</a>
</div>
</div>
<div v-else class="empty-tip">无合同文件</div>
</div>
<div class="detail-block">
<div class="block-title">备货单组</div>
<div v-if="detailData.stock_order && detailData.stock_order.length" class="groups">
<div class="group" v-for="(g, gi) in detailData.stock_order" :key="gi">
<div class="group-head">
<span class="order">{{ g.order_no || '备货单' }}</span>
<span class="seller" v-if="g.salesperson_snapshot"
>({{ g.salesperson_snapshot }})</span
>
<span class="date" v-if="g.biz_date">{{ g.biz_date }}</span>
</div>
<div class="chips">
<span class="chip" v-for="(v, vi) in g.stock_order_items || []" :key="vi">
{{ v.model_snapshot }}
</span>
</div>
</div>
</div>
<div v-else class="empty-tip">无备货单数据</div>
</div>
</div>
</template>
<script setup lang="ts">
import { Document } from '@element-plus/icons-vue'
import { PropType } from 'vue'
interface DetailData {
order_no?: string
pi_no?: string
buyer_name?: string
remark?: string
contract_file_url?: Array<{ name: string; url: string }>
stock_order?: Array<{
order_no?: string
salesperson_snapshot?: string
biz_date?: string
stock_order_items?: Array<{ model_snapshot: string }>
}>
}
defineProps({
detailData: {
type: Object as PropType<DetailData>,
required: true
}
})
</script>
<style scoped lang="scss">
.detail-wrap {
display: flex;
flex-direction: column;
gap: 16px;
}
.detail-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 10px 16px;
}
.detail-grid .item {
display: flex;
align-items: center;
gap: 8px;
}
.detail-grid .item.full {
grid-column: 1 / -1;
}
.detail-grid .label {
color: var(--el-text-color-regular);
}
.detail-grid .value {
font-weight: 600;
color: var(--el-text-color-primary);
}
.detail-block {
border-top: 1px dashed var(--el-border-color-lighter);
padding-top: 8px;
}
.block-title {
font-weight: 600;
margin-bottom: 8px;
}
.files-list {
display: flex;
flex-direction: column;
gap: 8px;
}
.file-row {
display: flex;
align-items: center;
gap: 10px;
}
.file-name {
flex: 1;
}
.empty-tip {
color: var(--el-text-color-secondary);
}
.groups {
display: flex;
flex-direction: column;
max-height: 38vh;
overflow-y: auto;
gap: 12px;
}
.group {
border: 1px solid var(--el-border-color-lighter);
border-radius: 10px;
padding: 14px 6px 8px;
background: var(--el-fill-color-blank);
}
.group-head {
display: flex;
gap: 8px;
margin-bottom: 10px;
align-content: center;
}
.chips {
display: flex;
flex-wrap: wrap;
gap: 6px;
}
.chip {
padding: 4px 8px;
border-radius: 12px;
background: #f0f6ff;
color: #3a7af3;
border: 1px solid #e3edff;
font-size: 12px;
line-height: 18px;
}
</style>
@@ -0,0 +1,213 @@
<template>
<el-drawer :with-header="false" :model-value="modelValue" :size="isMobile ? '100%' : '480px'" @close="$emit('update:modelValue', false)">
<div class="chat-container">
<div class="header">
<div class="header-left">
<span class="name">{{ title }}</span>
</div>
<div class="header-right">
<el-icon class="icon-close" :size="20" @click="$emit('update:modelValue', false)">
<Close />
</el-icon>
</div>
</div>
<div class="chat-messages" ref="messageContainer">
<template v-for="(message, index) in messages" :key="index">
<div :class="['message-item', String(message.user_id) === String(currentUserId) ? 'message-right' : 'message-left']">
<el-avatar :size="32" :src="message.user_avatar" class="message-avatar" />
<div class="message-content">
<div class="message-info">
<span class="sender-name">{{ message.user_name }}</span>
<span class="message-time">{{ message.updated_at }}</span>
</div>
<div class="message-text" v-html="message.content"></div>
<div class="message-attachments" v-if="message.attachment && message.attachment.length > 0">
<div class="attachment-item" v-for="(attachment, attIndex) in message.attachment" :key="attIndex">
<template v-if="/\.(jpg|jpeg|png|gif|webp|bmp)$/i.test(attachment.original_name)">
<img :src="attachment.storage_path_full" :alt="attachment.original_name" class="attachment-thumb" @click="handleChatImageClick(attachment.storage_path_full)" />
</template>
<template v-else-if="/\.(mp4|webm|ogg)$/i.test(attachment.original_name)">
<video :src="attachment.storage_path_full" controls class="attachment-thumb" @click.prevent="handleChatVideoClick(attachment.storage_path_full)"></video>
</template>
<template v-else>
<div class="file-attachment">
<el-icon class="file-icon"><Document /></el-icon>
<span class="file-name">{{ attachment.original_name }}</span>
<el-button type="primary" size="small" link @click="$emit('download', attachment)">下载</el-button>
</div>
</template>
</div>
</div>
</div>
</div>
</template>
</div>
<div class="chat-input" v-if="canAdd">
<div class="chat-attachment-upload">
<el-upload v-model:file-list="chatFileList" class="chat-upload" :action="actionImageUplode" :on-success="handleChatUploadSuccess" :headers="uploadHeaders" multiple :limit="5" :on-exceed="handleChatExceed" :show-file-list="false">
<el-button type="primary" link>
<el-icon><Paperclip /></el-icon>
添加附件
</el-button>
</el-upload>
<div class="uploaded-attachments" v-if="chatFileList.length > 0">
<div class="attachment-preview-item" v-for="(file, idx) in chatFileList" :key="idx">
<template v-if="/\.(jpg|jpeg|png|gif|webp|bmp)$/i.test(file.name)">
<img :src="file.file_url || file.response?.data?.file_url" :alt="file.name" class="preview-thumb" />
</template>
<template v-else>
<el-icon class="file-icon"><Document /></el-icon>
</template>
<span class="file-name">{{ file.name }}</span>
<el-button type="danger" size="small" link @click="removeChatFile(idx)">
<el-icon><Close /></el-icon>
</el-button>
</div>
</div>
</div>
<el-input v-model="messageText" type="textarea" :rows="3" placeholder="输入消息" resize="none" />
<div class="chat-input-actions">
<el-button type="primary" @click="emitSend">发送</el-button>
</div>
</div>
</div>
<!-- 内置预览 -->
<ElImageViewer v-if="imageViewerVisible" :url-list="chatImageList" :initial-index="imageViewerIndex" @close="closeImageViewer" />
<ElDialog v-model="videoDialogVisible" width="60%" top="10vh" :show-close="true" append-to-body>
<video v-if="currentVideoUrl" :src="currentVideoUrl" controls autoplay style="width: 100%; max-height: 70vh; display: block"></video>
</ElDialog>
</el-drawer>
</template>
<script setup lang="ts">
import { ElImageViewer } from 'element-plus'
import { Paperclip, Document, Close } from '@element-plus/icons-vue'
const props = defineProps<{
modelValue: boolean
title?: string
messages: any[]
currentUserId: string | number
canAdd?: boolean
actionImageUplode?: string
uploadHeaders?: Record<string, any>
}>()
const emit = defineEmits<{
(e: 'update:modelValue', v: boolean): void
(e: 'send', payload: { text: string; attachments: any[] }): void
(e: 'download', attachment: any): void
}>()
const { width } = useWindowSize()
const isMobile = computed(() => width.value < 500)
const messageText = ref('')
const chatFileList = ref<any[]>([])
const messageContainer = ref<HTMLElement | null>(null)
watch(
() => props.messages,
() => {
nextTick(() => {
if (messageContainer.value) {
messageContainer.value.scrollTop = messageContainer.value.scrollHeight
}
})
},
{ immediate: true, deep: true }
)
const handleChatUploadSuccess = (response: any, uploadFile: any, uploadFiles: any[]) => {
chatFileList.value = uploadFiles
.filter((item) => item.status === 'success')
.map((item) => {
const data = item.response?.data
if (data) {
return {
name: data.original_name,
file_url: data.storage_path_full,
status: 'success',
response: { data }
}
}
return null
})
.filter(Boolean) as any[]
}
const handleChatExceed = () => {
// no-op; parent can handle toast
}
const removeChatFile = (index: number) => {
chatFileList.value.splice(index, 1)
}
const emitSend = () => {
const text = messageText.value.trim()
if (!text && chatFileList.value.length === 0) return
const attachments = chatFileList.value.map((file) => {
const data = file.response?.data
if (data) {
return {
original_name: data.original_name,
storage_path: data.storage_path || data.file_name
}
}
return null
}).filter(Boolean) as any[]
emit('send', { text, attachments })
messageText.value = ''
chatFileList.value = []
}
// 预览
const chatImageList = ref<string[]>([])
const imageViewerVisible = ref(false)
const imageViewerIndex = ref(0)
function handleChatImageClick(url: string) {
chatImageList.value = [url]
imageViewerIndex.value = 0
imageViewerVisible.value = true
}
const currentVideoUrl = ref('')
const videoDialogVisible = ref(false)
function handleChatVideoClick(url: string) {
currentVideoUrl.value = url
videoDialogVisible.value = true
}
function closeImageViewer() {
imageViewerVisible.value = false
chatImageList.value = []
}
</script>
<style scoped lang="scss">
.header {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 20px;
.header-left .name { font-size: 16px; font-weight: 500; }
.header-right .icon-close { cursor: pointer; }
}
.chat-container { display: flex; flex-direction: column; height: calc(100% - 70px); }
.chat-messages { flex: 1; padding: 30px 16px; overflow-y: auto; border-top: 1px solid var(--el-border-color-lighter); }
.message-item { display: flex; gap: 8px; align-items: flex-start; width: 100%; margin-bottom: 30px; }
.message-item.message-left { justify-content: flex-start; }
.message-item.message-right { flex-direction: row-reverse; }
.message-content { display: flex; flex-direction: column; max-width: 70%; }
.message-info { display: flex; gap: 8px; margin-bottom: 4px; font-size: 12px; }
.message-text { font-size: 14px; color: var(--art-gray-900); border-radius: 6px; padding: 10px 14px; line-height: 1.4; white-space: pre-line; }
.message-left .message-text { background-color: #f8f5ff; }
.message-right .message-text { background-color: #e9f3ff; }
.message-attachments { margin-top: 8px; }
.message-attachments .attachment-thumb { max-width: 200px; max-height: 150px; border-radius: 6px; cursor: pointer; border: 1px solid var(--el-border-color-lighter); }
.chat-input { padding: 16px 16px 0; }
.chat-input-actions { display: flex; justify-content: right; margin-top: 12px; }
.chat-attachment-upload { margin-bottom: 12px; }
.uploaded-attachments { display: flex; flex-wrap: wrap; gap: 8px; }
.attachment-preview-item { display: flex; align-items: center; gap: 6px; padding: 6px 10px; background: var(--el-fill-color-light); border-radius: 6px; border: 1px solid var(--el-border-color-lighter); max-width: 200px; }
.preview-thumb { width: 40px; height: 40px; border-radius: 4px; object-fit: cover; }
</style>
+6 -1
View File
@@ -22,6 +22,7 @@ export interface PaymentItem {
}
export interface OrderData {
contract_file_url: { name: string; url: string }[]
orderNo?: string
salesperson?: string
piNo?: string
@@ -45,7 +46,11 @@ export interface OrderData {
export function useOrderDetailDialog() {
const visible = ref(false)
const title = ref('订单详情')
const orderData = ref<OrderData>({})
const orderData = ref<OrderData>({
contract_file_url: [],
items: [],
payments: []
})
const show = (data: OrderData, dialogTitle?: string) => {
orderData.value = data
+75 -4
View File
@@ -1,5 +1,5 @@
import { ref, reactive, watch, onMounted } from 'vue'
import { ElMessage } from 'element-plus'
import { componentSizeMap, ElMessage } from 'element-plus'
import { CrmService } from '@/api/crmApi'
import { commonService } from '@/api/commonApi'
import { vehicleService } from '@/api/vehicleApi'
@@ -62,9 +62,19 @@ export interface ItemRow {
handling_fee: string
fob_transport_fee: number | undefined
port_misc_fee: string
remark: string
ocean_freight: string
ocean_freight_currency: string
ocean_freight_currency_snapshot: string
commission: string
commission_currency: string
commission_currency_snapshot: string
purchase_tax: string
purchase_tax_currency: string
purchase_tax_currency_snapshot: string
tax_refund: string
tax_refund_currency: string
tax_refund_currency_snapshot: string
retrofit_fee: string
total_price: number | undefined
official_price: number | undefined
@@ -195,9 +205,19 @@ export function useStockingForm(isFinal = false, stockingId?: string | number) {
handling_fee: '',
fob_transport_fee: undefined,
port_misc_fee: '',
remark: '',
ocean_freight: '',
ocean_freight_currency: 'CNY',
ocean_freight_currency_snapshot: '人民币',
commission: '',
commission_currency: 'CNY',
commission_currency_snapshot: '人民币',
purchase_tax: '',
purchase_tax_currency: 'CNY',
purchase_tax_currency_snapshot: '人民币',
tax_refund: '',
tax_refund_currency: 'CNY',
tax_refund_currency_snapshot: '人民币',
retrofit_fee: '',
total_price: undefined,
official_price: undefined,
@@ -326,7 +346,13 @@ export function useStockingForm(isFinal = false, stockingId?: string | number) {
const loadPortOptions = async () => {
try {
const res = await commonService.getPortSelect({ scene: 'domestic' })
const resall = await commonService.getPortSelect({})
res.forEach((item: any) => {
item.port_names = item.port_name + '(' + item.port_name_en + ')'
})
const resall = await commonService.getPortSelect({ scene: 'overseas' })
resall.forEach((item: any) => {
item.port_names = item.port_name + '(' + item.port_name_en + ')'
})
portOptions.value = res
portOptionsall.value = resall
} catch (error) {
@@ -428,6 +454,21 @@ export function useStockingForm(isFinal = false, stockingId?: string | number) {
(it as any).ocean_freight_currency,
targetCurrency
)
const commission = convertCurrency(
it.commission ?? (it as any).commission,
(it as any).commission_currency,
targetCurrency
)
const purchaseTax = convertCurrency(
it.purchase_tax ?? (it as any).purchase_tax,
(it as any).purchase_tax_currency,
targetCurrency
)
const taxRefund = convertCurrency(
it.tax_refund ?? (it as any).tax_refund,
(it as any).tax_refund_currency,
targetCurrency
)
const mileageVal = Number(it.mileage ?? 0)
if (mileageVal > 0) {
// 二手车:用挂牌价与二手减价替代官方指导价与优惠
@@ -441,7 +482,19 @@ export function useStockingForm(isFinal = false, stockingId?: string | number) {
(it as any).reduction_price_currency,
targetCurrency
)
return unit - (retrofit + fob + listing + reduction + handling + port + ocean)
return (
unit -
(retrofit +
fob +
listing +
reduction +
handling +
port +
ocean +
commission +
purchaseTax) +
taxRefund
)
}
// 新车/里程<=0:保持原有计算(官方指导价与优惠)
@@ -455,7 +508,11 @@ export function useStockingForm(isFinal = false, stockingId?: string | number) {
(it as any).discount_currency,
targetCurrency
)
return unit - (retrofit + fob + guide + discount + handling + port + ocean)
return (
unit -
(retrofit + fob + guide + discount + handling + port + ocean + commission + purchaseTax) +
taxRefund
)
}
// 合同文件相关方法
@@ -672,9 +729,19 @@ export function useStockingForm(isFinal = false, stockingId?: string | number) {
handling_fee: it.handling_fee?.amount ?? '',
fob_transport_fee: it.fob_transport_fee?.amount ? Number(it.fob_transport_fee.amount) : undefined,
port_misc_fee: it.port_misc_fee?.amount ?? '',
remark: it.remark || '',
ocean_freight: it.ocean_freight?.amount ?? '',
ocean_freight_currency: it.ocean_freight?.currency || 'CNY',
ocean_freight_currency_snapshot: '',
commission: it.commission?.amount ?? '',
commission_currency: it.commission?.currency || 'CNY',
commission_currency_snapshot: '',
purchase_tax: it.purchase_tax?.amount ?? '',
purchase_tax_currency: it.purchase_tax?.currency || 'CNY',
purchase_tax_currency_snapshot: '',
tax_refund: it.tax_refund?.amount ?? '',
tax_refund_currency: it.tax_refund?.currency || 'CNY',
tax_refund_currency_snapshot: '',
retrofit_fee: it.retrofit_fee?.amount ?? '',
total_price: it.total_price?.amount ? Number(it.total_price.amount) : undefined,
official_price: it.official_price?.amount ? Number(it.official_price.amount) : undefined,
@@ -753,6 +820,7 @@ export function useStockingForm(isFinal = false, stockingId?: string | number) {
color_interior_snapshot: it.color_interior_snapshot,
color_exterior_code: it.color_exterior_code,
color_exterior_snapshot: it.color_exterior_snapshot,
remark: it.remark,
unit_price: wrapMoney(it.unit_price, (it as any).unit_price_currency, '单价'),
handling_fee: wrapMoney(it.handling_fee, (it as any).helper_fee_currency, '手续费'),
fob_transport_fee: wrapMoney(
@@ -766,6 +834,9 @@ export function useStockingForm(isFinal = false, stockingId?: string | number) {
'港杂费'
),
ocean_freight: wrapMoney(it.ocean_freight, (it as any).ocean_freight_currency, '海运费'),
commission: wrapMoney(it.commission, (it as any).commission_currency, '佣金'),
purchase_tax: wrapMoney(it.purchase_tax, (it as any).purchase_tax_currency, '购置税'),
tax_refund: wrapMoney(it.tax_refund, (it as any).tax_refund_currency, '退税'),
retrofit_fee: wrapMoney((it as any).retrofit_fee, (it as any).modify_fee_currency, '改装费'),
modify_list: it.modify_list,
// total_price: wrapMoney(it.total_price, (it as any).total_price_currency, '总价'),
+1 -1
View File
@@ -9,7 +9,7 @@ declare global {
const EffectScope: typeof import('vue')['EffectScope']
const ElButton: (typeof import('element-plus/es'))['ElButton']
const ElMessage: typeof import('element-plus/es')['ElMessage']
const ElMessageBox: (typeof import('element-plus/es'))['ElMessageBox']
const ElMessageBox: typeof import('element-plus/es')['ElMessageBox']
const ElNotification: (typeof import('element-plus/es'))['ElNotification']
const ElPopconfirm: (typeof import('element-plus/es'))['ElPopconfirm']
const ElPopover: (typeof import('element-plus/es'))['ElPopover']
+13
View File
@@ -7,6 +7,7 @@ export {}
/* prettier-ignore */
declare module 'vue' {
export interface GlobalComponents {
ApprovalTimeline: typeof import('./../components/custom/ApprovalTimeline.vue')['default']
ArtBackToTop: typeof import('./../components/core/base/art-back-to-top/index.vue')['default']
ArtBarChart: typeof import('./../components/core/charts/ArtBarChart.vue')['default']
ArtBarChartCard: typeof import('./../components/core/cards/art-bar-chart-card/index.vue')['default']
@@ -72,12 +73,16 @@ declare module 'vue' {
CommentItem: typeof import('./../components/custom/comment-widget/widget/CommentItem.vue')['default']
CommentWidget: typeof import('./../components/custom/comment-widget/index.vue')['default']
ContainerSettings: typeof import('./../components/core/layouts/art-settings-panel/widget/ContainerSettings.vue')['default']
copy: typeof import('./../components/custom/ProcurementDetailView copy.vue')['default']
ElAvatar: typeof import('element-plus/es')['ElAvatar']
ElBadge: typeof import('element-plus/es')['ElBadge']
ElButton: typeof import('element-plus/es')['ElButton']
ElButtonGroup: typeof import('element-plus/es')['ElButtonGroup']
ElCalendar: typeof import('element-plus/es')['ElCalendar']
ElCard: typeof import('element-plus/es')['ElCard']
ElCascader: typeof import('element-plus/es')['ElCascader']
ElCheckbox: typeof import('element-plus/es')['ElCheckbox']
ElCheckboxGroup: typeof import('element-plus/es')['ElCheckboxGroup']
ElCol: typeof import('element-plus/es')['ElCol']
ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
ElDatePicker: typeof import('element-plus/es')['ElDatePicker']
@@ -93,8 +98,10 @@ declare module 'vue' {
ElFormItem: typeof import('element-plus/es')['ElFormItem']
ElIcon: typeof import('element-plus/es')['ElIcon']
ElImage: typeof import('element-plus/es')['ElImage']
ElImageViewer: typeof import('element-plus/es')['ElImageViewer']
ElInput: typeof import('element-plus/es')['ElInput']
ElInputNumber: typeof import('element-plus/es')['ElInputNumber']
ElLink: typeof import('element-plus/es')['ElLink']
ElMenu: typeof import('element-plus/es')['ElMenu']
ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
ElOption: typeof import('element-plus/es')['ElOption']
@@ -117,16 +124,21 @@ declare module 'vue' {
ElTabPane: typeof import('element-plus/es')['ElTabPane']
ElTabs: typeof import('element-plus/es')['ElTabs']
ElTag: typeof import('element-plus/es')['ElTag']
ElText: typeof import('element-plus/es')['ElText']
ElTimeline: typeof import('element-plus/es')['ElTimeline']
ElTimelineItem: typeof import('element-plus/es')['ElTimelineItem']
ElTooltip: typeof import('element-plus/es')['ElTooltip']
ElTree: typeof import('element-plus/es')['ElTree']
ElTreeSelect: typeof import('element-plus/es')['ElTreeSelect']
ElUpload: typeof import('element-plus/es')['ElUpload']
ElWatermark: typeof import('element-plus/es')['ElWatermark']
HorizontalSubmenu: typeof import('./../components/core/layouts/art-menus/art-horizontal-menu/widget/HorizontalSubmenu.vue')['default']
LoginLeftView: typeof import('./../components/core/views/login/LoginLeftView.vue')['default']
MenuLayoutSettings: typeof import('./../components/core/layouts/art-settings-panel/widget/MenuLayoutSettings.vue')['default']
MenuStyleSettings: typeof import('./../components/core/layouts/art-settings-panel/widget/MenuStyleSettings.vue')['default']
OrderDetailContent: typeof import('./../components/custom/OrderDetailContent.vue')['default']
ProcurementDetailView: typeof import('./../components/custom/ProcurementDetailView.vue')['default']
'ProcurementDetailView copy': typeof import('./../components/custom/ProcurementDetailView copy.vue')['default']
RouterLink: typeof import('vue-router')['RouterLink']
RouterView: typeof import('vue-router')['RouterView']
SectionTitle: typeof import('./../components/core/layouts/art-settings-panel/widget/SectionTitle.vue')['default']
@@ -135,6 +147,7 @@ declare module 'vue' {
SettingItem: typeof import('./../components/core/layouts/art-settings-panel/widget/SettingItem.vue')['default']
SidebarSubmenu: typeof import('./../components/core/layouts/art-menus/art-sidebar-menu/widget/SidebarSubmenu.vue')['default']
ThemeSettings: typeof import('./../components/core/layouts/art-settings-panel/widget/ThemeSettings.vue')['default']
WorkChatDrawer: typeof import('./../components/custom/chat/WorkChatDrawer.vue')['default']
}
export interface ComponentCustomProperties {
vLoading: typeof import('element-plus/es')['ElLoadingDirective']
+151 -51
View File
@@ -1,9 +1,6 @@
<template>
<div class="stocking-page">
<div class="stocking-toolbar boxshadow">
<!-- <div class="toolbar-left">
<ElButton type="primary" v-ripple @click="handleCreate">创建备货单</ElButton>
</div> -->
<div class="toolbar-right">
<el-input
v-model="keyword"
@@ -34,12 +31,17 @@
<template #default>
<ElTableColumn label="审批单名称" prop="flows_name" min-width="140" />
<ElTableColumn label="审批说明" prop="biz_desc" min-width="160" />
<ElTableColumn label="审批结果" prop="action_desc" min-width="160" />
<ElTableColumn label="提交人" prop="initiator_name" min-width="120" />
<ElTableColumn label="提交人" prop="initiator_name" min-width="120">
<template #default="scope">
<div style="display: flex; align-items: center">
<img class="avatar" :src="scope.row.initiator_avatar" alt="" />
<p>{{ scope.row.initiator_name }}</p>
</div>
</template>
</ElTableColumn>
<ElTableColumn label="审核人" prop="approver_name" min-width="120" />
<ElTableColumn label="状态" prop="status_desc" min-width="120" />
<ElTableColumn label="审批时间" prop="approved_at" min-width="120" />
<ElTableColumn label="创建时间" prop="created_at" min-width="120" />
<ElTableColumn label="提交时间" prop="created_at" min-width="120" />
<ElTableColumn label="操作" fixed="right" min-width="140" align="center">
<template #default="scope">
<ElRow :gutter="10" justify="center">
@@ -69,7 +71,7 @@
<!-- 快速审批弹出框 -->
<el-dialog
v-model="approvalDialogVisible"
title="合塑实业-汽车事业部-备货单(客户下定)"
:title="orderDialog.title"
width="80%"
:close-on-click-modal="false"
:close-on-press-escape="false"
@@ -77,7 +79,12 @@
>
<div class="approval-content">
<!-- 头部信息 -->
<div v-if="orderDialog.type == 'stock_orders'">
<OrderDetailContent :orderData="orderDialog.orderData" />
</div>
<div v-if="orderDialog.type == 'purchase_orders'">
<ProcurementDetailView :detailData="orderDialog.orderData" />
</div>
<!-- 审批备注 -->
<div class="info-section">
<ElRow :gutter="12">
@@ -96,15 +103,50 @@
<template #footer>
<div class="dialog-footer">
<ElButton type="primary" plain size="large" class="submit-btn" @click="handleApprove('reject')"
<ElButton
type="primary"
plain
size="large"
class="submit-btn"
@click="handleApprove('reject')"
>驳回</ElButton
>
<ElButton type="primary" size="large" class="submit-btn" @click="handleApprove('approve')"
>同意</ElButton
>
<ElButton type="warning" size="large" class="submit-btn" @click="handleTransfer()"
>转交</ElButton
>
</div>
</template>
</el-dialog>
<!-- 转交弹出框 -->
<el-dialog v-model="zjDialogVisible" title="转交" width="450px">
<el-form :model="zjForm" label-width="80px">
<el-form-item label="转交人" prop="to_uid">
<el-select
v-model="zjForm.to_uid"
filterable
placeholder="请选择转交人"
style="width: 100%"
>
<el-option
v-for="item in userOptions"
:key="item.id"
:label="item.name"
:value="item.id"
/>
</el-select>
</el-form-item>
<ElFormItem label="转交原因" prop="reason">
<ElInput v-model="zjForm.reason" type="textarea" :rows="3" placeholder="请输入转交原因" />
</ElFormItem>
<div style="display: flex; justify-content: space-around; margin-top: 24px">
<el-button @click="zjDialogVisible = false">取消</el-button>
<el-button type="primary" @click="handlezjSubmit">确定</el-button>
</div>
</el-form>
</el-dialog>
</div>
</template>
@@ -112,13 +154,16 @@
import { router } from '@/router'
import { manageService } from '@/api/adminApi'
import { useAuth } from '@/composables/useAuth'
import { CrmService } from '@/api/crmApi'
import { commonService } from '@/api/commonApi'
import OrderDetailContent from '@/components/custom/OrderDetailContent.vue'
import type { OrderData } from '@/composables/useOrderDetailDialog'
import ProcurementDetailView from '@/components/custom/ProcurementDetailView.vue'
defineOptions({ name: 'AdminStockingPage' })
const zjDialogVisible = ref(false)
const orderDialog = reactive({
orderData: {} as OrderData
orderData: {} as OrderData,
title: '',
type: ''
})
const { hasAuth } = useAuth()
const loading = ref(false)
@@ -126,28 +171,23 @@
const tableRef = ref()
const tableData = ref<any[]>([])
const pagination = reactive({ currentPage: 1, pageSize: 10, total: 0 })
const userOptions = ref<any>()
const getuserList = async () => {
// 这里调用获取用户列表的接口
const res = await manageService.presetusers()
userOptions.value = res || []
// return res || []
}
const zjForm = reactive({
to_uid: '',
instance_id: '',
step_index: '',
reason: ''
})
// 审批弹出框相关
const approvalDialogVisible = ref(false)
const stockingInfo = ref<any>({})
// 回显视图模型,字段与模板一致
const header = reactive({ order_no: '', salesman: '' })
const base = reactive({
pn_no: '',
date: '',
close_date: '',
channel: '',
customer_name: '',
client_country: '',
total_cif: '',
total_cif_currency: '',
contract_rate: ''
})
const items = ref<any[]>([])
const approvalNotes = ref('')
const approvalAction = ref('')
onMounted(() => {
getList()
})
@@ -164,7 +204,7 @@
const params = {
current: currentPage,
size: pageSize,
is_final: 0, // 只获取备货单,非终版
scene: 'todo',
keyword: keyword.value
}
@@ -186,36 +226,58 @@
pagination.currentPage = page
getList()
}
const handleCreate = () => {
// TODO: 跳转到创建备货单页面
router.push('/crmpc/stocking_list/Add')
}
const handleView = (row: any) => {
router.push({
path: '/admin/approval/stocking_auth_detil',
query: { id: row.id, biz_id: row.biz_id, instance_id: row.instance_id, status: row.status } // 可带客户名等参数
query: {
id: row.id,
biz_id: row.biz_id,
instance_id: row.instance_id,
status: row.status,
flow_type: row.flow_type,
step_index: row.step_index
} // 可带客户名等参数
})
}
const handleView1 = (row: any) => {
router.push('/crmpc/stocking_list/final_show')
// TODO: 跳转或弹窗查看备货单
}
const toMoneyView = (m: any) => ({
amount: m?.amount ?? '',
currency: m?.currency ?? ''
})
const getDictItemSelectlist = ref<any[]>([])
const getDictItemSelect = async () => {
const res = await commonService.getDictItemSelect({ dict_id: '18' })
getDictItemSelectlist.value = res
}
const instance_id = ref('')
function extractFileName(pathOrUrl: string | undefined | null): string {
if (!pathOrUrl) return '合同文件'
try {
const clean = String(pathOrUrl)
const afterSlash = clean.split(/[\\/]/).pop() || '合同文件'
return decodeURIComponent(afterSlash)
} catch {
return '合同文件'
}
}
const activerow = ref()
const handleCreateRepair = async (row: any) => {
activerow.value = row
instance_id.value = row.instance_id
const res = await manageService.checkStock({ id: row.biz_id })
const res = await manageService.stockapprovaldetailborder({
id: row.id,
flow_type: row.flow_type
})
if (row.flow_type == 'stock_orders') {
const orderData: OrderData = res
orderDialog.orderData = orderData
orderDialog.type = row.flow_type
orderDialog.title = '合塑实业-汽车事业部-备货单(客户下定)'
} else if (row.flow_type == 'purchase_orders') {
const orderData: OrderData = res
const urls = res.contract_file_url
const paths = res.contract_file
const list: Array<{ name: string; url: string }> = []
const nameFromPath = (p: string) => extractFileName(p)
urls.forEach((u: string, i: number) => {
const p = paths[i] || ''
list.push({ name: p ? nameFromPath(p) : extractFileName(u), url: u })
})
orderData.contract_file_url = list
orderDialog.orderData = orderData
orderDialog.type = row.flow_type
orderDialog.title = '合塑实业-汽车事业部-采购单(采购)'
}
approvalDialogVisible.value = true
}
@@ -240,9 +302,47 @@
ElMessage.error('审批失败')
}
}
// 转交操作
const handleTransfer = async () => {
zjForm.instance_id = activerow.value.instance_id
zjForm.step_index = activerow.value.step_index
getuserList()
zjDialogVisible.value = true
}
const handlezjSubmit = async () => {
if (!zjForm.to_uid) {
ElMessage.warning('请选择转交人')
return
}
if (!zjForm.reason) {
ElMessage.warning('请输入转交原因')
return
}
try {
const { message } = await manageService.stockapprovaltransfer(zjForm)
ElMessage.success(message)
zjDialogVisible.value = false
approvalDialogVisible.value = false
approvalNotes.value = ''
zjForm.to_uid = ''
zjForm.reason = ''
instance_id.value = ''
// 刷新列表
getList()
} catch (error) {
console.error('转交失败:', error)
// ElMessage.error('转交失败')
}
}
</script>
<style scoped lang="scss">
.avatar {
width: 40px;
height: 40px;
border-radius: 6px;
margin-right: 10px;
}
.stocking-page {
background: var(--art-main-bg-color);
min-height: 100vh;
@@ -285,7 +385,7 @@
}
.info-section {
margin-bottom: 24px;
margin: 24px 0px;
.section-title {
display: flex;
@@ -1,8 +1,13 @@
<template>
<div class="stocking-show-page">
<div class="boxshadow">
<div v-if="flow_type == 'stock_orders'">
<OrderDetailContent :orderData="orderDialog.orderData" />
</div>
<div v-if="flow_type == 'purchase_orders'">
<ProcurementDetailView :detailData="orderDialog.orderData" />
</div>
</div>
<!-- 上传合同 -->
<div class="boxshadow">
<div class="form-title">
@@ -99,6 +104,9 @@
<ElButton type="primary" size="large" class="submit-btn" @click="handleSubmit('approve')"
>同意</ElButton
>
<ElButton type="warning" size="large" class="submit-btn" @click="handleTransfer()"
>转交</ElButton
>
</div>
</div>
<!-- PDF 预览弹窗 -->
@@ -122,30 +130,102 @@
/>
</div>
</el-dialog>
<!-- 转交弹出框 -->
<el-dialog v-model="zjDialogVisible" title="转交" width="450px">
<el-form :model="zjForm" label-width="80px">
<el-form-item label="转交人" prop="to_uid">
<el-select
v-model="zjForm.to_uid"
filterable
placeholder="请选择转交人"
style="width: 100%"
>
<el-option
v-for="item in userOptions"
:key="item.id"
:label="item.name"
:value="item.id"
/>
</el-select>
</el-form-item>
<ElFormItem label="转交原因" prop="reason">
<ElInput v-model="zjForm.reason" type="textarea" :rows="3" placeholder="请输入转交原因" />
</ElFormItem>
<div style="display: flex; justify-content: space-around; margin-top: 24px">
<el-button @click="zjDialogVisible = false">取消</el-button>
<el-button type="primary" @click="handlezjSubmit">确定</el-button>
</div>
</el-form>
</el-dialog>
</div>
</template>
<script setup lang="ts">
import { CrmService } from '@/api/crmApi'
import { commonService } from '@/api/commonApi'
import { manageService } from '@/api/adminApi'
import { useRoute } from 'vue-router'
import { ElMessage } from 'element-plus'
import { usePdfPreview } from '@/composables/usePdfPreview'
import OrderDetailContent from '@/components/custom/OrderDetailContent.vue'
import ProcurementDetailView from '@/components/custom/ProcurementDetailView.vue'
import type { OrderData } from '@/composables/useOrderDetailDialog'
import { router } from '@/router'
defineOptions({ name: 'AdminStockingAuthDetil' })
const { pdf, frameRef, download } = usePdfPreview()
const zjDialogVisible = ref(false)
const route = useRoute()
// const approval_id = route.query.id
const approval_id = route.query.id
const stocking_id = route.query.biz_id
const instance_id = route.query.instance_id
const step_index = route.query.step_index
const status = route.query.status
const flow_type = route.query.flow_type
const approvalNotes = ref('')
const orderDialog = reactive({
orderData: {} as OrderData
})
const userOptions = ref<any>()
const getuserList = async () => {
// 这里调用获取用户列表的接口
const res = await manageService.presetusers()
userOptions.value = res || []
// return res || []
}
const zjForm = reactive({
to_uid: '',
instance_id: '',
step_index: '',
reason: ''
})
// 转交操作
const handleTransfer = async () => {
getuserList()
zjDialogVisible.value = true
}
const handlezjSubmit = async () => {
if (!zjForm.to_uid) {
ElMessage.warning('请选择转交人')
return
}
if (!zjForm.reason) {
ElMessage.warning('请输入转交原因')
return
}
try {
const zjForms = {
to_uid: zjForm.to_uid,
instance_id: instance_id,
step_index: step_index,
reason: zjForm.reason
}
const { message } = await manageService.stockapprovaltransfer(zjForms)
ElMessage.success(message)
router.push('/admin/approval/stocking_auth')
} catch (error) {
console.error('转交失败:', error)
// ElMessage.error('转交失败')
}
}
const handleSubmit = async (approvalAction: string) => {
try {
const { message } = await manageService.stockapprovalpass({
@@ -169,17 +249,38 @@
// 合同文件
const contractFile = ref<{ name: string; url: string; file_name: string } | null>(null)
const toMoneyView = (m: any) => ({
amount: m?.amount ?? '',
currency: m?.currency ?? ''
})
function extractFileName(pathOrUrl: string | undefined | null): string {
if (!pathOrUrl) return '合同文件'
try {
const clean = String(pathOrUrl)
const afterSlash = clean.split(/[\\/]/).pop() || '合同文件'
return decodeURIComponent(afterSlash)
} catch {
return '合同文件'
}
}
//获取详情并映射到回显模型
const getdetilfn = async () => {
const res = await manageService.checkStock({ id: stocking_id })
const res = await manageService.stockapprovaldetailborder({
id: approval_id,
flow_type: flow_type
})
if (flow_type == 'stock_orders') {
const orderData: OrderData = res
orderDialog.orderData = orderData
} else if (flow_type == 'purchase_orders') {
const orderData: OrderData = res
const urls = res.contract_file_url
const paths = res.contract_file
const list: Array<{ name: string; url: string }> = []
const nameFromPath = (p: string) => extractFileName(p)
urls.forEach((u: string, i: number) => {
const p = paths[i] || ''
list.push({ name: p ? nameFromPath(p) : extractFileName(u), url: u })
})
orderData.contract_file_url = list
orderDialog.orderData = orderData
}
// 合同文件
if (res?.contract) {
contractFile.value = {
@@ -0,0 +1,406 @@
<template>
<div class="stocking-page">
<div class="stocking-toolbar boxshadow">
<!-- <div class="toolbar-left">
<ElButton type="primary" v-ripple @click="handleCreate">创建备货单</ElButton>
</div> -->
<div class="toolbar-right">
<el-input
v-model="keyword"
placeholder="请输入客户名称"
clearable
style="width: 260px"
@keyup.enter="getList"
>
<template #suffix>
<el-icon class="clickable" @click="getList"><Search /></el-icon>
</template>
</el-input>
</div>
</div>
<div class="boxshadow">
<ArtTable
ref="tableRef"
row-key="id"
:loading="loading"
:data="tableData"
:currentPage="pagination.currentPage"
:pageSize="pagination.pageSize"
:total="pagination.total"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
>
<template #default>
<ElTableColumn label="审批单名称" prop="flows_name" min-width="140" />
<ElTableColumn label="审批说明" prop="biz_desc" min-width="160" />
<ElTableColumn label="审批结果" prop="action_desc" min-width="160" />
<ElTableColumn label="提交人" prop="initiator_name" min-width="120">
<template #default="scope">
<div style="display: flex; align-items: center">
<img class="avatar" :src="scope.row.initiator_avatar" alt="" />
<p>{{ scope.row.initiator_name }}</p>
</div>
</template>
</ElTableColumn>
<ElTableColumn label="审核人" prop="approver_name" min-width="120" />
<ElTableColumn label="状态" prop="status_desc" min-width="120" />
<ElTableColumn label="审批时间" prop="approved_at" min-width="120" />
<ElTableColumn label="提交时间" prop="created_at" min-width="120" />
<ElTableColumn label="操作" fixed="right" min-width="140" align="center">
<template #default="scope">
<ElRow :gutter="10" justify="center">
<el-link
type="primary"
underline="never"
@click="handleView(scope.row)"
style="margin-right: 8px"
>
<i class="iconfont-sys">&#xe76c;</i> 查看审批
</el-link>
<el-link
v-if="scope.row.status == 'pending'"
type="success"
underline="never"
@click="handleCreateRepair(scope.row)"
>
<i class="iconfont-sys">&#xe6bf;</i> 快速审批
</el-link>
</ElRow>
</template>
</ElTableColumn>
</template>
</ArtTable>
</div>
<!-- 快速审批弹出框 -->
<el-dialog
v-model="approvalDialogVisible"
title="合塑实业-汽车事业部-备货单(客户下定)"
width="80%"
:close-on-click-modal="false"
:close-on-press-escape="false"
class="approval-dialog"
>
<div class="approval-content">
<!-- 头部信息 -->
<OrderDetailContent :orderData="orderDialog.orderData" />
<!-- 审批备注 -->
<div class="info-section">
<ElRow :gutter="12">
<ElCol :span="24">
<el-input
v-model="approvalNotes"
type="textarea"
:rows="2"
placeholder="备注"
class="approval-notes"
/>
</ElCol>
</ElRow>
</div>
</div>
<template #footer>
<div class="dialog-footer">
<ElButton type="primary" plain size="large" class="submit-btn" @click="handleApprove('reject')"
>驳回</ElButton
>
<ElButton type="primary" size="large" class="submit-btn" @click="handleApprove('approve')"
>同意</ElButton
>
</div>
</template>
</el-dialog>
</div>
</template>
<script setup lang="ts">
import { router } from '@/router'
import { manageService } from '@/api/adminApi'
import { useAuth } from '@/composables/useAuth'
import { CrmService } from '@/api/crmApi'
import { commonService } from '@/api/commonApi'
import OrderDetailContent from '@/components/custom/OrderDetailContent.vue'
import type { OrderData } from '@/composables/useOrderDetailDialog'
defineOptions({ name: 'AdminStockingPage' })
const orderDialog = reactive({
orderData: {} as OrderData
})
const { hasAuth } = useAuth()
const loading = ref(false)
const keyword = ref('')
const tableRef = ref()
const tableData = ref<any[]>([])
const pagination = reactive({ currentPage: 1, pageSize: 10, total: 0 })
// 审批弹出框相关
const approvalDialogVisible = ref(false)
const stockingInfo = ref<any>({})
// 回显视图模型,字段与模板一致
const header = reactive({ order_no: '', salesman: '' })
const base = reactive({
pn_no: '',
date: '',
close_date: '',
channel: '',
customer_name: '',
client_country: '',
total_cif: '',
total_cif_currency: '',
contract_rate: ''
})
const items = ref<any[]>([])
const approvalNotes = ref('')
const approvalAction = ref('')
onMounted(() => {
getList()
})
watch([keyword], () => {
pagination.currentPage = 1
// 不自动请求,保持与截图行为一致,点击搜索或回车触发
})
const getList = async () => {
loading.value = true
try {
const { currentPage, pageSize } = pagination
const params = {
current: currentPage,
size: pageSize,
scene: 'history',
keyword: keyword.value
}
const { records, current, size, total } = await manageService.stockapprovalrecord(params)
tableData.value = records || []
Object.assign(pagination, { currentPage: current, pageSize: size, total })
} catch (error) {
console.error('获取列表失败:', error)
} finally {
loading.value = false
}
}
const handleSizeChange = (size: number) => {
pagination.pageSize = size
getList()
}
const handleCurrentChange = (page: number) => {
pagination.currentPage = page
getList()
}
const handleView = (row: any) => {
router.push({
path: '/admin/approval/stocking_auth_detil',
query: {
id: row.id,
biz_id: row.biz_id,
instance_id: row.instance_id,
status: row.status,
flow_type: row.flow_type,
step_index: row.step_index
} // 可带客户名等参数
})
}
const instance_id = ref('')
const handleCreateRepair = async (row: any) => {
instance_id.value = row.instance_id
const res = await manageService.checkStock({ id: row.biz_id })
const orderData: OrderData = res
orderDialog.orderData = orderData
approvalDialogVisible.value = true
}
// 审批操作
const handleApprove = async (approvalAction: string) => {
try {
// 这里调用审批API
const { message } = await manageService.stockapprovalpass({
instance_id: instance_id.value,
action: approvalAction,
comment: approvalNotes.value
})
ElMessage.success(message)
approvalDialogVisible.value = false
approvalNotes.value = ''
instance_id.value = ''
// 刷新列表
getList()
} catch (error) {
console.error('审批失败:', error)
ElMessage.error('审批失败')
}
}
</script>
<style scoped lang="scss">
.avatar {
width: 40px;
height: 40px;
border-radius: 6px;
margin-right: 10px;
}
.stocking-page {
background: var(--art-main-bg-color);
min-height: 100vh;
}
.stocking-toolbar {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 16px;
padding: 12px 16px;
background: var(--art-main-bg-color);
}
.toolbar-left {
display: flex;
align-items: center;
gap: 8px;
}
.toolbar-right {
display: flex;
align-items: center;
}
.clickable {
cursor: pointer;
}
// 审批弹出框样式
.approval-dialog {
.approval-content {
max-height: 70vh;
overflow-y: auto;
}
.header {
display: flex;
justify-content: center;
align-items: center;
margin-bottom: 12px;
color: #333333;
.mr40 { margin-right: 40px; }
}
.info-section {
margin-bottom: 24px;
.section-title {
display: flex;
align-items: center;
margin-bottom: 16px;
.title-bar {
width: 4px;
height: 20px;
background: #409eff;
margin-right: 8px;
border-radius: 2px;
}
span {
font-size: 16px;
font-weight: 600;
color: #303133;
}
}
}
.order-items {
.order-item {
border: 1px solid #e4e7ed;
border-radius: 8px;
padding: 16px;
margin-bottom: 16px;
background: #fafafa;
.item-header {
margin-bottom: 16px;
padding-bottom: 12px;
border-bottom: 1px solid #e4e7ed;
.item-title {
font-size: 16px;
font-weight: 600;
color: #303133;
}
}
.item-details {
.detail-row {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 16px;
margin-bottom: 12px;
.detail-item {
display: flex;
flex-direction: column;
label {
margin-bottom: 6px;
font-size: 14px;
font-weight: 500;
color: #606266;
}
}
}
}
}
}
.summary-section {
display: flex;
justify-content: space-between;
align-items: center;
padding: 16px;
background: #f0f9ff;
border-radius: 8px;
margin-bottom: 24px;
.summary-item {
.summary-label {
font-weight: 600;
color: #606266;
margin-right: 8px;
}
.summary-value {
font-size: 18px;
font-weight: 700;
color: #409eff;
}
}
}
.approval-notes {
width: 100%;
}
.dialog-footer {
display: flex;
justify-content: space-around;
width: 500px;
margin: auto;
gap: 12px;
.reject-btn {
border-color: #409eff;
color: #409eff;
background: white;
&:hover {
background: #ecf5ff;
}
}
.approve-btn {
background: #409eff;
border-color: #409eff;
}
}
}
</style>
+27 -3
View File
@@ -19,6 +19,17 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item label="客户渠道" prop="channel_id">
<el-select v-model="selectchannel_id" filterable placeholder="请选择客户渠道">
<el-option label="全部" value="" />
<el-option
v-for="item in channelOptions"
:key="item.id"
:label="item.name"
:value="item.id"
/>
</el-select>
</el-form-item>
</div>
<el-button type="primary" @click="exportfn" v-if="hasAuth('customer@export')">
<i class="iconfont-sys">&#xe89f;</i> 导出
@@ -346,6 +357,7 @@
const activecolor = '#3471ff'
const { hasAuth } = useAuth()
const selectValue = ref<string[]>([])
const selectchannel_id = ref<string>('')
const showMore = ref(false)
const loading = ref(false)
const detailDialogVisible = ref(false)
@@ -373,6 +385,12 @@
customer_id: '',
user_id: ''
})
const channelOptions = ref<any>()
//渠道
const getgetChannel = async () => {
const res = await CrmService.getChannel()
channelOptions.value = res || []
}
const userOptions = ref<any>()
const getuserList = async () => {
// 这里调用获取用户列表的接口
@@ -402,12 +420,13 @@
// 表格数据
const tableData = ref<any[]>([])
onMounted(() => {
getgetChannel()
getuserList()
gettableList()
tagGrouplistfn()
})
// tabs 切换联动
watch([selectValue, keyword], () => {
watch([selectValue, keyword, selectchannel_id], () => {
pagination.currentPage = 1
gettableList()
})
@@ -425,6 +444,9 @@
if (keyword.value) {
params.keyword = keyword.value
}
if (selectchannel_id.value) {
params.channel_id = selectchannel_id.value
}
// 标签参数,所有选中的标签id组成数组
const selectedTagIds = Object.values(tagActiveMap).filter(Boolean)
if (selectedTagIds.length) {
@@ -464,7 +486,9 @@
current: currentPage,
size: pageSize,
user_id: selectValue.value.join(','),
tag_id: Object.values(tagActiveMap).filter(Boolean)
tag_id: Object.values(tagActiveMap).filter(Boolean),
keyword: keyword.value,
channel_id: selectchannel_id.value
}
// manageService.crmCustomerExport(params)
try {
@@ -472,7 +496,7 @@
// const res = await manageService.crmCustomerExport(params)
const urls =
import.meta.env.VITE_API_URL +
`/admin/crm/customer/export?current=${params.currentPage}&size=${params.pageSize}&user_id=${params.user_id}&tag_id=${params.tag_id}`
`/admin/crm/customer/export?current=${params.current}&size=${params.size}&user_id=${params.user_id}&tag_id=${params.tag_id}&channel_id=${params.channel_id}&keyword=${params.keyword}`
// 2. 创建blob对象
// const blob = new Blob([res], { type: 'application/vnd.ms-excel' }) // 或根据后端实际类型调整
// 3. 创建下载链接
+8 -8
View File
@@ -42,11 +42,11 @@
@current-change="handleCurrentChange"
>
<template #default>
<ElTableColumn label="公司" prop="corp_id">
<!-- <ElTableColumn label="公司" prop="corp_id">
<template #default="scope">
<p> {{ scope.row.corp_name ? scope.row.corp_name : '' }}</p>
</template>
</ElTableColumn>
</ElTableColumn> -->
<ElTableColumn label="年份" prop="year" />
<ElTableColumn label="业务员" prop="user_name" />
<ElTableColumn label="年度目标数" prop="annual_target" />
@@ -94,7 +94,8 @@
</ElSelect>
</ElFormItem> -->
<ElFormItem label="年份" prop="year">
<ElInputNumber v-model="form.year" :min="1970" :max="2999" style="width: 100%" />
<el-input v-model="form.year" placeholder="请输入年份" />
<!-- <ElInputNumber v-model="form.year" :min="1970" :max="2999" style="width: 100%" /> -->
</ElFormItem>
<ElFormItem label="业务员" prop="user_id">
<ElSelect v-model="form.user_id" filterable placeholder="请选择业务员">
@@ -108,7 +109,7 @@
<el-text class="mx-1" type="warning">不选业务员表示公司年度总目标</el-text>
</ElFormItem>
<ElFormItem label="年度目标数" prop="annual_target">
<ElInputNumber v-model="form.annual_target" :min="0" :max="999" style="width: 100%" />
<ElInputNumber v-model="form.annual_target" :min="0" :max="9999999" style="width: 100%" />
</ElFormItem>
</ElForm>
<template #footer>
@@ -153,11 +154,10 @@
// 表单数据
const form = reactive<any>({
id: '',
year: '',
year: new Date().getFullYear(),
user_id: '',
annual_target: 0
})
// 表单验证规则
const rules = reactive<FormRules>({
year: [{ required: true, message: '请输入年份', trigger: 'blur' }],
@@ -201,8 +201,8 @@
tableData.value = records || []
Object.assign(pagination, { currentPage: current, pageSize: size, total })
} catch (error) {
console.error('获取颜色列表失败:', error)
ElMessage.error('获取颜色列表失败')
console.error('获取列表失败:', error)
ElMessage.error('获取列表失败')
} finally {
loading.value = false
}
File diff suppressed because it is too large Load Diff
@@ -66,6 +66,9 @@
<el-link type="primary" underline="never" @click="handleView1(scope.row)">
<i class="iconfont-sys">&#xe76c;</i> 查看终版
</el-link>
<el-link type="warning" underline="never" @click="showDialogtimeline(scope.row)">
<i class="iconfont-sys">&#xe728;</i> 查看审批
</el-link>
</ElRow>
</template>
</ElTableColumn>
@@ -156,6 +159,19 @@
/>
</div>
</el-dialog>
<el-dialog
v-model="timelineDialogVisible"
title="审批历史"
width="600px"
:close-on-click-modal="false"
:close-on-press-escape="false"
class="approval-dialog"
>
<div class="approval-content">
<!-- 头部信息 -->
<ApprovalTimeline :records="approvalRecords" />
</div>
</el-dialog>
</div>
</template>
@@ -165,8 +181,11 @@
import { manageService } from '@/api/adminApi'
import { useAuth } from '@/composables/useAuth'
import OrderDetailContent from '@/components/custom/OrderDetailContent.vue'
import ApprovalTimeline from '@/components/custom/ApprovalTimeline.vue'
import type { OrderData } from '@/composables/useOrderDetailDialog'
import { usePdfPreview } from '@/composables/usePdfPreview'
const timelineDialogVisible = ref(false)
const approvalRecords = ref<any[]>([])
// PDF 预览/打印(公共)
const { pdf, frameRef, openWithResponse, download, print, preparePreview, prepareImages } = usePdfPreview()
defineOptions({ name: 'AdminFinalListPage' })
@@ -370,6 +389,28 @@
ElMessage.error('下载失败,请稍后重试')
}
}
//审批进度
const showDialogtimeline = async (row: any) => {
// 审批记录(兼容多种字段)
const resstockapprovallogs = await manageService.stockapprovaltimeline({
id: row.id,
flow_type: 'stock_orders'
})
console.log(resstockapprovallogs)
const historyList = resstockapprovallogs
if (historyList.length > 0) {
approvalRecords.value = historyList.map((h: any) => ({
name: h?.initiator_name ? h?.initiator_name : h?.name,
role: h?.status_desc,
time: h?.time || '',
approved: h?.status === 'approved' || h?.status === 'submitted',
rejected: h?.status === 'rejected',
pending: h?.status != 'approved' && h?.status != 'rejected' && h?.status != 'submitted',
comment: h?.comment || h?.remark || ''
}))
}
timelineDialogVisible.value = true
}
</script>
<style scoped lang="scss">
@@ -80,6 +80,9 @@
>
<i class="iconfont-sys">&#xe76c;</i> 查看终版
</el-link>
<el-link type="warning" underline="never" @click="showDialogtimeline(scope.row)">
<i class="iconfont-sys">&#xe728;</i> 查看审批
</el-link>
</ElRow>
</template>
</ElTableColumn>
@@ -171,6 +174,19 @@
</div>
</template>
</el-dialog>
<el-dialog
v-model="timelineDialogVisible"
title="审批历史"
width="600px"
:close-on-click-modal="false"
:close-on-press-escape="false"
class="approval-dialog"
>
<div class="approval-content">
<!-- 头部信息 -->
<ApprovalTimeline :records="approvalRecords" />
</div>
</el-dialog>
</div>
</template>
@@ -178,7 +194,10 @@
import { manageService } from '@/api/adminApi'
import { usePdfPreview } from '@/composables/usePdfPreview'
import OrderDetailContent from '@/components/custom/OrderDetailContent.vue'
import ApprovalTimeline from '@/components/custom/ApprovalTimeline.vue'
import type { OrderData } from '@/composables/useOrderDetailDialog'
const timelineDialogVisible = ref(false)
const approvalRecords = ref<any[]>([])
defineOptions({ name: 'StockingListAdmin' })
// import { useAuth } from '@/composables/useAuth'
// const { hasAuth } = useAuth()
@@ -413,6 +432,28 @@
console.log(err)
})
}
//审批进度
const showDialogtimeline = async (row: any) => {
// 审批记录(兼容多种字段)
const resstockapprovallogs = await manageService.stockapprovaltimeline({
id: row.id,
flow_type: 'stock_orders'
})
console.log(resstockapprovallogs)
const historyList = resstockapprovallogs
if (historyList.length > 0) {
approvalRecords.value = historyList.map((h: any) => ({
name: h?.initiator_name ? h?.initiator_name : h?.name,
role: h?.status_desc,
time: h?.time || '',
approved: h?.status === 'approved' || h?.status === 'submitted',
rejected: h?.status === 'rejected',
pending: h?.status != 'approved' && h?.status != 'rejected' && h?.status != 'submitted',
comment: h?.comment || h?.remark || ''
}))
}
timelineDialogVisible.value = true
}
</script>
<style scoped lang="scss">
+30
View File
@@ -116,9 +116,22 @@
<!-- 详情对话框 -->
<el-dialog v-model="detailDialogVisible" title="详情" width="75%">
<div>
<div style="display: flex; justify-content: space-between">
<el-button type="primary" @click="plzyDialogVisiblefn">
<i class="iconfont-sys">&#xe794;</i> 批量转移
</el-button>
<el-form-item label="客户渠道" prop="channel_id">
<el-select v-model="selectchannel_id" filterable placeholder="请选择客户渠道">
<el-option label="全部" value="" />
<el-option
v-for="item in channelOptions"
:key="item.id"
:label="item.name"
:value="item.id"
/>
</el-select>
</el-form-item>
</div>
<!-- 表格 -->
<ArtTable
ref="tableRef"
@@ -410,11 +423,13 @@
import { systemService } from '@/api/systemApi'
import { formatMenuTitle } from '@/router/utils/utils'
import { UserService } from '@/api/usersApi'
import { CrmService } from '@/api/crmApi'
defineOptions({ name: 'UserList' })
const { hasAuth } = useAuth()
const activeName = ref('1')
const selectValue = ref('1')
const company_id = ref('')
const selectchannel_id = ref('')
const keyword = ref<string>('')
const loading = ref(false)
const loadingkh = ref(false)
@@ -542,6 +557,10 @@
loading.value = false
}
}
watch([selectchannel_id], () => {
paginationkh.currentPage = 1
gettableListkh(zyForm.customer_id)
})
const gettableListkh = async (user_id: any) => {
loadingkh.value = true
try {
@@ -551,6 +570,9 @@
size: pageSize,
user_id: user_id
}
if (selectchannel_id.value) {
params.channel_id = selectchannel_id.value
}
const { data, current, size, total } = await manageService.getcrmCustomerList(params)
tableDatakh.value = data.map((item: any) => ({
...item
@@ -585,7 +607,15 @@
if (status === 0) return 'status-lost'
return ''
}
const channelOptions = ref<any>()
//渠道
const getgetChannel = async () => {
const res = await CrmService.getChannel()
channelOptions.value = res || []
}
const gotransfer = (row: any) => {
getgetChannel()
selectchannel_id.value = ''
paginationkh.currentPage = 1
paginationkh.pageSize = 10
paginationkh.total = 0
+1 -1
View File
@@ -55,7 +55,7 @@
@current-change="handleCurrentChange"
>
<template #default>
<ElTableColumn label="颜色编码" prop="color_code" min-width="120" />
<!-- <ElTableColumn label="颜色编码" prop="color_code" min-width="120" /> -->
<ElTableColumn label="颜色名称" prop="color_text" min-width="150" />
<ElTableColumn label="类型" prop="type" width="120">
<template #default="scope">
+1 -1
View File
@@ -42,7 +42,7 @@
@current-change="handleCurrentChange"
>
<template #default>
<ElTableColumn label="项目编码" prop="code" min-width="120" />
<!-- <ElTableColumn label="项目编码" prop="code" min-width="120" /> -->
<ElTableColumn label="项目名称" prop="name" min-width="150" />
<ElTableColumn label="改装类型" prop="type" width="120">
<template #default="scope">
+10 -1
View File
@@ -33,8 +33,9 @@
@current-change="handleCurrentChange"
>
<template #default>
<ElTableColumn label="港口代码" prop="port_code" min-width="120" />
<!-- <ElTableColumn label="港口代码" prop="port_code" min-width="120" /> -->
<ElTableColumn label="港口名称" prop="port_name" min-width="150" />
<ElTableColumn label="英文名称" prop="port_name_en" min-width="150" />
<ElTableColumn label="国家" prop="country_id" min-width="140">
<template #default="scope">
<span>{{ scope.row.country_name }}</span>
@@ -84,6 +85,9 @@
<ElFormItem label="港口名称" prop="port_name">
<ElInput v-model="form.port_name" placeholder="请输入港口名称" />
</ElFormItem>
<ElFormItem label="英文名称" prop="port_name_en">
<ElInput v-model="form.port_name_en" placeholder="请输入港口英文名称" />
</ElFormItem>
<ElFormItem label="国家" prop="country_id">
<el-select
v-model="form.country_id"
@@ -164,6 +168,7 @@
sort: 0,
port_code: '',
port_name: '',
port_name_en: '',
lat: '',
lng: '',
description: '',
@@ -232,6 +237,7 @@
sort: row.sort ?? 0,
port_code: row.port_code,
port_name: row.port_name,
port_name_en: row.port_name_en,
lat: row.lat,
lng: row.lng,
description: row.description,
@@ -244,6 +250,7 @@
sort: 0,
port_code: '',
port_name: '',
port_name_en: '',
lat: '',
lng: '',
description: '',
@@ -280,6 +287,7 @@
sort: form.sort,
port_code: form.port_code,
port_name: form.port_name,
port_name_en: form.port_name_en,
lat: form.lat,
lng: form.lng,
description: form.description,
@@ -293,6 +301,7 @@
sort: form.sort,
port_code: form.port_code,
port_name: form.port_name,
port_name_en: form.port_name_en,
lat: form.lat,
lng: form.lng,
description: form.description,
+2 -2
View File
@@ -109,7 +109,7 @@
<ElRow :gutter="16">
<ElCol :span="8">
<ElFormItem label="品牌名称" prop="brand_name">
<ElSelect v-model="formData.brand_name" placeholder="请选择品牌名称">
<ElSelect v-model="formData.brand_name" filterable placeholder="请选择品牌名称">
<ElOption
v-for="item in brandOptions"
:key="item.brand_code || item.code"
@@ -122,7 +122,7 @@
</ElCol>
<ElCol :span="8">
<ElFormItem label="车系名称" prop="series_name">
<ElSelect v-model="formData.series_name" placeholder="请选择车系名称">
<ElSelect v-model="formData.series_name" filterable placeholder="请选择车系名称">
<ElOption
v-for="s in seriesOptions"
:key="s.series_code || s.code"
+2 -2
View File
@@ -36,11 +36,11 @@
<div class="form">
<!-- 登录方式切换 tab -->
<div class="login-type-tabs">
<span
<!-- <span
:class="{ active: activeLoginType === 'password' }"
@click="activeLoginType = 'password'"
>账号密码登录</span
>
> -->
<span
:class="{ active: activeLoginType === 'qrcode' }"
@click="activeLoginType = 'qrcode'"
+1 -1
View File
@@ -149,7 +149,7 @@
const params = {
current: currentPage,
size: pageSize,
is_final: 0, // 只获取备货单,非终版
scene: 'todo',
keyword: keyword.value
}
@@ -0,0 +1,384 @@
<template>
<div class="stocking-page">
<div class="stocking-toolbar boxshadow">
<!-- <div class="toolbar-left">
<ElButton type="primary" v-ripple @click="handleCreate">创建备货单</ElButton>
</div> -->
<div class="toolbar-right">
<el-input
v-model="keyword"
placeholder="请输入客户名称"
clearable
style="width: 260px"
@keyup.enter="getList"
>
<template #suffix>
<el-icon class="clickable" @click="getList"><Search /></el-icon>
</template>
</el-input>
</div>
</div>
<div class="boxshadow">
<ArtTable
ref="tableRef"
row-key="id"
:loading="loading"
:data="tableData"
:currentPage="pagination.currentPage"
:pageSize="pagination.pageSize"
:total="pagination.total"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
>
<template #default>
<ElTableColumn label="审批单名称" prop="flows_name" min-width="140" />
<ElTableColumn label="审批说明" prop="biz_desc" min-width="160" />
<ElTableColumn label="审批结果" prop="action_desc" min-width="160" />
<ElTableColumn label="提交人" prop="initiator_name" min-width="120" />
<ElTableColumn label="审核人" prop="approver_name" min-width="120" />
<ElTableColumn label="审批时间" prop="approved_at" min-width="120" />
<ElTableColumn label="状态" prop="status_desc" min-width="120" />
<ElTableColumn label="创建时间" prop="created_at" min-width="120" />
<ElTableColumn label="操作" fixed="right" min-width="140" align="center">
<template #default="scope">
<ElRow :gutter="10" justify="center">
<el-link
type="primary"
underline="never"
@click="handleView(scope.row)"
style="margin-right: 8px"
>
<i class="iconfont-sys">&#xe76c;</i> 查看审批
</el-link>
<el-link
v-if="scope.row.status == 'pending'"
type="success"
underline="never"
@click="handleCreateRepair(scope.row)"
>
<i class="iconfont-sys">&#xe6bf;</i> 快速审批
</el-link>
</ElRow>
</template>
</ElTableColumn>
</template>
</ArtTable>
</div>
<!-- 快速审批弹出框 -->
<el-dialog
v-model="approvalDialogVisible"
title="合塑实业-汽车事业部-备货单(客户下定)"
width="80%"
:close-on-click-modal="false"
:close-on-press-escape="false"
class="approval-dialog"
>
<div class="approval-content">
<!-- 头部信息 -->
<OrderDetailContent :orderData="orderDialog.orderData" />
<!-- 审批备注 -->
<div class="info-section">
<ElRow :gutter="12">
<ElCol :span="24">
<el-input
v-model="approvalNotes"
type="textarea"
:rows="2"
placeholder="备注"
class="approval-notes"
/>
</ElCol>
</ElRow>
</div>
</div>
<template #footer>
<div class="dialog-footer">
<ElButton type="primary" plain size="large" class="submit-btn" @click="handleApprove('reject')"
>驳回</ElButton
>
<ElButton type="primary" size="large" class="submit-btn" @click="handleApprove('approve')"
>同意</ElButton
>
</div>
</template>
</el-dialog>
</div>
</template>
<script setup lang="ts">
import { router } from '@/router'
// import { manageService } from '@/api/adminApi'
import { useAuth } from '@/composables/useAuth'
import { CrmService } from '@/api/crmApi'
import { commonService } from '@/api/commonApi'
import OrderDetailContent from '@/components/custom/OrderDetailContent.vue'
import type { OrderData } from '@/composables/useOrderDetailDialog'
defineOptions({ name: 'CrmStockingAuth' }) // 定义组件名称,用于 KeepAlive 缓存控制
const { hasAuth } = useAuth()
const orderDialog = reactive({
orderData: {} as OrderData
})
const loading = ref(false)
const keyword = ref('')
const tableRef = ref()
const tableData = ref<any[]>([])
const pagination = reactive({ currentPage: 1, pageSize: 10, total: 0 })
// 审批弹出框相关
const approvalDialogVisible = ref(false)
const approvalNotes = ref('')
onMounted(() => {
getList()
})
watch([keyword], () => {
pagination.currentPage = 1
// 不自动请求,保持与截图行为一致,点击搜索或回车触发
})
const getList = async () => {
loading.value = true
try {
const { currentPage, pageSize } = pagination
const params = {
current: currentPage,
size: pageSize,
scene: 'history',
keyword: keyword.value
}
const { records, current, size, total } = await CrmService.stockapprovalrecord(params)
tableData.value = records || []
Object.assign(pagination, { currentPage: current, pageSize: size, total })
} catch (error) {
console.error('获取列表失败:', error)
} finally {
loading.value = false
}
}
const handleSizeChange = (size: number) => {
pagination.pageSize = size
getList()
}
const handleCurrentChange = (page: number) => {
pagination.currentPage = page
getList()
}
const handleView = (row: any) => {
router.push({
path: '/crmpc/approval/auth_detil',
query: { id: row.id, biz_id: row.biz_id, instance_id: row.instance_id, status: row.status } // 可带客户名等参数
})
}
const getDictItemSelectlist = ref<any[]>([])
const getDictItemSelect = async () => {
const res = await commonService.getDictItemSelect({ dict_id: '18' })
getDictItemSelectlist.value = res
}
const instance_id = ref('')
const handleCreateRepair = async (row: any) => {
// getDictItemSelect()
instance_id.value = row.instance_id
const res = await CrmService.checkStock({ id: row.biz_id })
const orderData: OrderData = res
orderDialog.orderData = orderData
approvalDialogVisible.value = true
}
// 审批操作
const handleApprove = async (approvalAction: string) => {
try {
// 这里调用审批API
const { message } = await CrmService.stockapprovalpass({
instance_id: instance_id.value,
action: approvalAction,
comment: approvalNotes.value
})
ElMessage.success(message)
approvalDialogVisible.value = false
approvalNotes.value = ''
instance_id.value = ''
// 刷新列表
getList()
} catch (error) {
console.error('审批失败:', error)
ElMessage.error('审批失败')
}
}
</script>
<style scoped lang="scss">
:deep(.el-table__empty-block) {
height: 100% !important;
min-height: 200px;
display: flex;
align-items: center;
justify-content: center;
}
.stocking-page {
background: var(--art-main-bg-color);
min-height: 100vh;
}
.stocking-toolbar {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 16px;
padding: 12px 16px;
background: var(--art-main-bg-color);
}
.toolbar-left {
display: flex;
align-items: center;
gap: 8px;
}
.toolbar-right {
display: flex;
align-items: center;
}
.clickable {
cursor: pointer;
}
// 审批弹出框样式
.approval-dialog {
.approval-content {
max-height: 70vh;
overflow-y: auto;
}
.header {
display: flex;
justify-content: center;
align-items: center;
margin-bottom: 12px;
color: #333333;
.mr40 { margin-right: 40px; }
}
.info-section {
margin-bottom: 24px;
.section-title {
display: flex;
align-items: center;
margin-bottom: 16px;
.title-bar {
width: 4px;
height: 20px;
background: #409eff;
margin-right: 8px;
border-radius: 2px;
}
span {
font-size: 16px;
font-weight: 600;
color: #303133;
}
}
}
.order-items {
.order-item {
border: 1px solid #e4e7ed;
border-radius: 8px;
padding: 16px;
margin-bottom: 16px;
background: #fafafa;
.item-header {
margin-bottom: 16px;
padding-bottom: 12px;
border-bottom: 1px solid #e4e7ed;
.item-title {
font-size: 16px;
font-weight: 600;
color: #303133;
}
}
.item-details {
.detail-row {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 16px;
margin-bottom: 12px;
.detail-item {
display: flex;
flex-direction: column;
label {
margin-bottom: 6px;
font-size: 14px;
font-weight: 500;
color: #606266;
}
}
}
}
}
}
.summary-section {
display: flex;
justify-content: space-between;
align-items: center;
padding: 16px;
background: #f0f9ff;
border-radius: 8px;
margin-bottom: 24px;
.summary-item {
.summary-label {
font-weight: 600;
color: #606266;
margin-right: 8px;
}
.summary-value {
font-size: 18px;
font-weight: 700;
color: #409eff;
}
}
}
.approval-notes {
width: 100%;
}
.dialog-footer {
justify-content: space-around;
width: 500px;
margin: auto;
display: flex;
gap: 12px;
.reject-btn {
border-color: #409eff;
color: #409eff;
background: white;
&:hover {
background: #ecf5ff;
}
}
.approve-btn {
background: #409eff;
border-color: #409eff;
}
}
}
</style>
+65 -2
View File
@@ -373,6 +373,57 @@
<ElInput v-model="item.ocean_freight_currency_snapshot" type="hidden" />
</ElFormItem>
</ElCol>
<ElCol :sm="12" :md="12" :lg="6" :xl="4">
<ElFormItem label="佣金" label-width="85px">
<ElInput v-model="item.commission" placeholder="请输入佣金">
<template #suffix>
<ElSelect v-model="item.commission_currency" style="width: 64px">
<ElOption
v-for="c in currencyOptions"
:key="c.currency_code"
:label="c.currency_name"
:value="c.currency_code"
/>
</ElSelect>
</template>
</ElInput>
<ElInput v-model="item.commission_currency_snapshot" type="hidden" />
</ElFormItem>
</ElCol>
<ElCol :sm="12" :md="12" :lg="6" :xl="4">
<ElFormItem label="购置税" label-width="85px">
<ElInput v-model="item.purchase_tax" placeholder="请输入购置税">
<template #suffix>
<ElSelect v-model="item.purchase_tax_currency" style="width: 64px">
<ElOption
v-for="c in currencyOptions"
:key="c.currency_code"
:label="c.currency_name"
:value="c.currency_code"
/>
</ElSelect>
</template>
</ElInput>
<ElInput v-model="item.purchase_tax_currency_snapshot" type="hidden" />
</ElFormItem>
</ElCol>
<ElCol :sm="12" :md="12" :lg="6" :xl="4">
<ElFormItem label="预估退税额" label-width="85px">
<ElInput v-model="item.tax_refund" placeholder="请输入预估退税额">
<template #suffix>
<ElSelect v-model="item.tax_refund_currency" style="width: 64px">
<ElOption
v-for="c in currencyOptions"
:key="c.currency_code"
:label="c.currency_name"
:value="c.currency_code"
/>
</ElSelect>
</template>
</ElInput>
<ElInput v-model="item.tax_refund_currency_snapshot" type="hidden" />
</ElFormItem>
</ElCol>
</ElRow>
<ElRow :gutter="12" class="item-row-wrap">
<ElCol :sm="12" :md="12" :lg="6" :xl="4">
@@ -429,6 +480,13 @@
</ElFormItem>
</ElCol>
</ElRow>
<ElRow :gutter="12" class="item-row-wrap">
<ElCol :sm="24" :md="24" :lg="24" :xl="24">
<ElFormItem label="备注" label-width="85px">
<ElInput type="textarea" :rows="2" v-model="item.remark" placeholder="请输入备注" />
</ElFormItem>
</ElCol>
</ElRow>
<ElRow :gutter="12">
<ElCol :span="24" style="text-align: right">
<el-tag effect="light" type="success" @click="copyRow(idx)" class="row-actions">
@@ -527,7 +585,12 @@
(portOptions || []).find((x: any) => x.id === val)?.port_name || '')
"
>
<ElOption v-for="p in portOptions" :key="p.id" :label="p.port_name" :value="p.id" />
<ElOption
v-for="p in portOptions"
:key="p.id"
:label="p.port_names"
:value="p.id"
/>
</ElSelect>
<ElInput v-model="baseForm.domestic_port_snapshot" type="hidden" />
</ElFormItem>
@@ -589,7 +652,7 @@
<ElOption
v-for="p in portOptionsall"
:key="p.id"
:label="p.port_name"
:label="p.port_names"
:value="p.id"
/>
</ElSelect>
+65 -2
View File
@@ -374,6 +374,57 @@
<ElInput v-model="item.ocean_freight_currency_snapshot" type="hidden" />
</ElFormItem>
</ElCol>
<ElCol :sm="12" :md="12" :lg="6" :xl="4">
<ElFormItem label="佣金" label-width="85px">
<ElInput v-model="item.commission" placeholder="请输入佣金">
<template #suffix>
<ElSelect v-model="item.commission_currency" style="width: 64px">
<ElOption
v-for="c in currencyOptions"
:key="c.currency_code"
:label="c.currency_name"
:value="c.currency_code"
/>
</ElSelect>
</template>
</ElInput>
<ElInput v-model="item.commission_currency_snapshot" type="hidden" />
</ElFormItem>
</ElCol>
<ElCol :sm="12" :md="12" :lg="6" :xl="4">
<ElFormItem label="购置税" label-width="85px">
<ElInput v-model="item.purchase_tax" placeholder="请输入购置税">
<template #suffix>
<ElSelect v-model="item.purchase_tax_currency" style="width: 64px">
<ElOption
v-for="c in currencyOptions"
:key="c.currency_code"
:label="c.currency_name"
:value="c.currency_code"
/>
</ElSelect>
</template>
</ElInput>
<ElInput v-model="item.purchase_tax_currency_snapshot" type="hidden" />
</ElFormItem>
</ElCol>
<ElCol :sm="12" :md="12" :lg="6" :xl="4">
<ElFormItem label="预估退税额" label-width="85px">
<ElInput v-model="item.tax_refund" placeholder="请输入预估退税额">
<template #suffix>
<ElSelect v-model="item.tax_refund_currency" style="width: 64px">
<ElOption
v-for="c in currencyOptions"
:key="c.currency_code"
:label="c.currency_name"
:value="c.currency_code"
/>
</ElSelect>
</template>
</ElInput>
<ElInput v-model="item.tax_refund_currency_snapshot" type="hidden" />
</ElFormItem>
</ElCol>
</ElRow>
<ElRow :gutter="12" class="item-row-wrap">
<ElCol :sm="12" :md="12" :lg="6" :xl="4">
@@ -435,6 +486,13 @@
</ElFormItem>
</ElCol>
</ElRow>
<ElRow :gutter="12" class="item-row-wrap">
<ElCol :sm="24" :md="24" :lg="24" :xl="24">
<ElFormItem label="备注" label-width="85px">
<ElInput type="textarea" :rows="2" v-model="item.remark" placeholder="请输入备注" />
</ElFormItem>
</ElCol>
</ElRow>
</div>
<ElRow :gutter="12">
<ElCol :sm="12" :md="12" :lg="6" :xl="6">
@@ -509,7 +567,12 @@
(portOptions || []).find((x: any) => x.id === val)?.port_name || '')
"
>
<ElOption v-for="p in portOptions" :key="p.id" :label="p.port_name" :value="p.id" />
<ElOption
v-for="p in portOptions"
:key="p.id"
:label="p.port_names"
:value="p.id"
/>
</ElSelect>
<ElInput v-model="baseForm.domestic_port_snapshot" type="hidden" />
</ElFormItem>
@@ -571,7 +634,7 @@
<ElOption
v-for="p in portOptionsall"
:key="p.id"
:label="p.port_name"
:label="p.port_names"
:value="p.id"
/>
</ElSelect>
+65 -2
View File
@@ -453,6 +453,57 @@
<ElInput v-model="item.ocean_freight_currency_snapshot" type="hidden" />
</ElFormItem>
</ElCol>
<ElCol :sm="12" :md="12" :lg="6" :xl="4">
<ElFormItem label="佣金" label-width="85px">
<ElInput v-model="item.commission" placeholder="请输入佣金">
<template #suffix>
<ElSelect v-model="item.commission_currency" style="width: 64px">
<ElOption
v-for="c in currencyOptions"
:key="c.currency_code"
:label="c.currency_name"
:value="c.currency_code"
/>
</ElSelect>
</template>
</ElInput>
<ElInput v-model="item.commission_currency_snapshot" type="hidden" />
</ElFormItem>
</ElCol>
<ElCol :sm="12" :md="12" :lg="6" :xl="4">
<ElFormItem label="购置税" label-width="85px">
<ElInput v-model="item.purchase_tax" placeholder="请输入购置税">
<template #suffix>
<ElSelect v-model="item.purchase_tax_currency" style="width: 64px">
<ElOption
v-for="c in currencyOptions"
:key="c.currency_code"
:label="c.currency_name"
:value="c.currency_code"
/>
</ElSelect>
</template>
</ElInput>
<ElInput v-model="item.purchase_tax_currency_snapshot" type="hidden" />
</ElFormItem>
</ElCol>
<ElCol :sm="12" :md="12" :lg="6" :xl="4">
<ElFormItem label="预估退税额" label-width="85px">
<ElInput v-model="item.tax_refund" placeholder="请输入预估退税额">
<template #suffix>
<ElSelect v-model="item.tax_refund_currency" style="width: 64px">
<ElOption
v-for="c in currencyOptions"
:key="c.currency_code"
:label="c.currency_name"
:value="c.currency_code"
/>
</ElSelect>
</template>
</ElInput>
<ElInput v-model="item.tax_refund_currency_snapshot" type="hidden" />
</ElFormItem>
</ElCol>
</ElRow>
<ElRow :gutter="12" class="item-row-wrap">
<ElCol :sm="12" :md="12" :lg="6" :xl="6">
@@ -526,6 +577,13 @@
</ElFormItem>
</ElCol>
</ElRow>
<ElRow :gutter="12" class="item-row-wrap">
<ElCol :sm="24" :md="24" :lg="24" :xl="24">
<ElFormItem label="备注" label-width="85px">
<ElInput type="textarea" :rows="2" v-model="item.remark" placeholder="请输入备注" />
</ElFormItem>
</ElCol>
</ElRow>
</div>
<ElRow :gutter="12">
<ElCol :sm="12" :md="12" :lg="6" :xl="6">
@@ -600,7 +658,12 @@
(portOptions || []).find((x: any) => x.id === val)?.port_name || '')
"
>
<ElOption v-for="p in portOptions" :key="p.id" :label="p.port_name" :value="p.id" />
<ElOption
v-for="p in portOptions"
:key="p.id"
:label="p.port_names"
:value="p.id"
/>
</ElSelect>
<ElInput v-model="baseForm.domestic_port_snapshot" type="hidden" />
</ElFormItem>
@@ -661,7 +724,7 @@
<ElOption
v-for="p in portOptionsall"
:key="p.id"
:label="p.port_name"
:label="p.port_names"
:value="p.id"
/>
</ElSelect>
+42 -1
View File
@@ -85,6 +85,9 @@
<el-link type="primary" underline="never" @click="handleView1(scope.row)">
<i class="iconfont-sys">&#xe76c;</i> 查看终版
</el-link>
<el-link type="warning" underline="never" @click="showDialogtimeline(scope.row)">
<i class="iconfont-sys">&#xe728;</i> 查看审批
</el-link>
</template>
</ElTableColumn>
</template>
@@ -174,6 +177,19 @@
/>
</div>
</el-dialog>
<el-dialog
v-model="timelineDialogVisible"
title="审批历史"
width="600px"
:close-on-click-modal="false"
:close-on-press-escape="false"
class="approval-dialog"
>
<div class="approval-content">
<!-- 头部信息 -->
<ApprovalTimeline :records="approvalRecords" />
</div>
</el-dialog>
</div>
</template>
@@ -184,6 +200,10 @@
import { usePdfPreview } from '@/composables/usePdfPreview'
import OrderDetailContent from '@/components/custom/OrderDetailContent.vue'
import type { OrderData } from '@/composables/useOrderDetailDialog'
import ApprovalTimeline from '@/components/custom/ApprovalTimeline.vue'
import { manageService } from '@/api/adminApi'
const timelineDialogVisible = ref(false)
const approvalRecords = ref<any[]>([])
defineOptions({ name: 'CrmFinalList' })
// 订单详情弹窗
const orderDialog = reactive({
@@ -207,7 +227,28 @@
onMounted(() => {
getList()
})
//审批进度
const showDialogtimeline = async (row: any) => {
// 审批记录(兼容多种字段)
const resstockapprovallogs = await manageService.stockapprovaltimeline({
id: row.id,
flow_type: 'stock_orders'
})
console.log(resstockapprovallogs)
const historyList = resstockapprovallogs
if (historyList.length > 0) {
approvalRecords.value = historyList.map((h: any) => ({
name: h?.initiator_name ? h?.initiator_name : h?.name,
role: h?.status_desc,
time: h?.finished_at || '',
approved: h?.status === 'approved' || h?.status === 'submitted',
rejected: h?.status === 'rejected',
pending: h?.status != 'approved' && h?.status != 'rejected' && h?.status != 'submitted',
comment: h?.comment || h?.remark || ''
}))
}
timelineDialogVisible.value = true
}
watch([keyword], () => {
pagination.currentPage = 1
// 不自动请求,保持与截图行为一致,点击搜索或回车触发
+65 -2
View File
@@ -373,6 +373,57 @@
<ElInput v-model="item.ocean_freight_currency_snapshot" type="hidden" />
</ElFormItem>
</ElCol>
<ElCol :sm="12" :md="12" :lg="6" :xl="4">
<ElFormItem label="佣金" label-width="85px">
<ElInput v-model="item.commission" placeholder="请输入佣金">
<template #suffix>
<ElSelect v-model="item.commission_currency" style="width: 64px">
<ElOption
v-for="c in currencyOptions"
:key="c.currency_code"
:label="c.currency_name"
:value="c.currency_code"
/>
</ElSelect>
</template>
</ElInput>
<ElInput v-model="item.commission_currency_snapshot" type="hidden" />
</ElFormItem>
</ElCol>
<ElCol :sm="12" :md="12" :lg="6" :xl="4">
<ElFormItem label="购置税" label-width="85px">
<ElInput v-model="item.purchase_tax" placeholder="请输入购置税">
<template #suffix>
<ElSelect v-model="item.purchase_tax_currency" style="width: 64px">
<ElOption
v-for="c in currencyOptions"
:key="c.currency_code"
:label="c.currency_name"
:value="c.currency_code"
/>
</ElSelect>
</template>
</ElInput>
<ElInput v-model="item.purchase_tax_currency_snapshot" type="hidden" />
</ElFormItem>
</ElCol>
<ElCol :sm="12" :md="12" :lg="6" :xl="4">
<ElFormItem label="预估退税额" label-width="85px">
<ElInput v-model="item.tax_refund" placeholder="请输入预估退税额">
<template #suffix>
<ElSelect v-model="item.tax_refund_currency" style="width: 64px">
<ElOption
v-for="c in currencyOptions"
:key="c.currency_code"
:label="c.currency_name"
:value="c.currency_code"
/>
</ElSelect>
</template>
</ElInput>
<ElInput v-model="item.tax_refund_currency_snapshot" type="hidden" />
</ElFormItem>
</ElCol>
</ElRow>
<ElRow :gutter="12" class="item-row-wrap">
<ElCol :sm="12" :md="12" :lg="6" :xl="6">
@@ -429,6 +480,13 @@
</ElFormItem>
</ElCol>
</ElRow>
<ElRow :gutter="12" class="item-row-wrap">
<ElCol :sm="24" :md="24" :lg="24" :xl="24">
<ElFormItem label="备注" label-width="85px">
<ElInput type="textarea" :rows="2" v-model="item.remark" placeholder="请输入备注" />
</ElFormItem>
</ElCol>
</ElRow>
<ElRow :gutter="12">
<ElCol :span="24" style="text-align: right">
<el-tag effect="light" class="row-actions" type="success" @click="copyRow(idx)"> 复制 </el-tag>
@@ -525,7 +583,12 @@
(portOptions || []).find((x: any) => x.id === val)?.port_name || '')
"
>
<ElOption v-for="p in portOptions" :key="p.id" :label="p.port_name" :value="p.id" />
<ElOption
v-for="p in portOptions"
:key="p.id"
:label="p.port_names"
:value="p.id"
/>
</ElSelect>
<ElInput v-model="baseForm.domestic_port_snapshot" type="hidden" />
</ElFormItem>
@@ -586,7 +649,7 @@
<ElOption
v-for="p in portOptionsall"
:key="p.id"
:label="p.port_name"
:label="p.port_names"
:value="p.id"
/>
</ElSelect>
@@ -114,6 +114,9 @@
<el-link type="warning" underline="never" @click="copys(scope.row)">
<i class="iconfont-sys">&#xe8b7;</i> 复制
</el-link>
<el-link type="warning" underline="never" @click="showDialogtimeline(scope.row)">
<i class="iconfont-sys">&#xe728;</i> 查看审批
</el-link>
</ElRow>
</template>
</ElTableColumn>
@@ -207,6 +210,19 @@
</template>
</el-dialog>
<!-- 终版详情 -->
<el-dialog
v-model="timelineDialogVisible"
title="审批历史"
width="600px"
:close-on-click-modal="false"
:close-on-press-escape="false"
class="approval-dialog"
>
<div class="approval-content">
<!-- 头部信息 -->
<ApprovalTimeline :records="approvalRecords" />
</div>
</el-dialog>
</div>
</template>
@@ -216,6 +232,10 @@
import { usePdfPreview } from '@/composables/usePdfPreview'
import OrderDetailContent from '@/components/custom/OrderDetailContent.vue'
import type { OrderData } from '@/composables/useOrderDetailDialog'
import ApprovalTimeline from '@/components/custom/ApprovalTimeline.vue'
import { manageService } from '@/api/adminApi'
const timelineDialogVisible = ref(false)
const approvalRecords = ref<any[]>([])
// import { useAuth } from '@/composables/useAuth'
// const { hasAuth } = useAuth()
@@ -241,6 +261,28 @@
onMounted(() => {
getList()
})
//审批进度
const showDialogtimeline = async (row: any) => {
// 审批记录(兼容多种字段)
const resstockapprovallogs = await manageService.stockapprovaltimeline({
id: row.id,
flow_type: 'stock_orders'
})
console.log(resstockapprovallogs)
const historyList = resstockapprovallogs
if (historyList.length > 0) {
approvalRecords.value = historyList.map((h: any) => ({
name: h?.initiator_name ? h?.initiator_name : h?.name,
role: h?.status_desc,
time: h?.time || '',
approved: h?.status === 'approved' || h?.status === 'submitted',
rejected: h?.status === 'rejected',
pending: h?.status != 'approved' && h?.status != 'rejected' && h?.status != 'submitted',
comment: h?.comment || h?.remark || ''
}))
}
timelineDialogVisible.value = true
}
function statusClass(status: any) {
if (status === 'rejected') return 'status-lost'
if (status === 'approved') return 'status-following'
+1 -1
View File
@@ -55,7 +55,7 @@
@current-change="handleCurrentChange"
>
<template #default>
<ElTableColumn label="颜色编码" prop="color_code" min-width="120" />
<!-- <ElTableColumn label="颜色编码" prop="color_code" min-width="120" /> -->
<ElTableColumn label="颜色名称" prop="color_text" min-width="150" />
<ElTableColumn label="类型" prop="type" width="120">
<template #default="scope">
+1 -1
View File
@@ -42,7 +42,7 @@
@current-change="handleCurrentChange"
>
<template #default>
<ElTableColumn label="项目编码" prop="code" min-width="120" />
<!-- <ElTableColumn label="项目编码" prop="code" min-width="120" /> -->
<ElTableColumn label="项目名称" prop="name" min-width="150" />
<ElTableColumn label="改装类型" prop="type" width="120">
<template #default="scope">
+2 -2
View File
@@ -109,7 +109,7 @@
<ElRow :gutter="16">
<ElCol :span="8">
<ElFormItem label="品牌名称" prop="brand_name">
<ElSelect v-model="formData.brand_name" placeholder="请选择品牌名称">
<ElSelect v-model="formData.brand_name" filterable placeholder="请选择品牌名称">
<ElOption
v-for="item in brandOptions"
:key="item.brand_code || item.code"
@@ -122,7 +122,7 @@
</ElCol>
<ElCol :span="8">
<ElFormItem label="车系名称" prop="series_name">
<ElSelect v-model="formData.series_name" placeholder="请选择车系名称">
<ElSelect v-model="formData.series_name" filterable placeholder="请选择车系名称">
<ElOption
v-for="s in seriesOptions"
:key="s.series_code || s.code"