Kaynağa Gözat

Merge branch 'master' into bjcz_his_scrm

# Conflicts:
#	src/api/hisStore/storePayment.js
#	src/views/components/course/userCourseCatalogDetails.vue
#	src/views/course/courseTrafficLog/index.vue
#	src/views/course/courseWatchLog/index.vue
#	src/views/hisStore/adv/index.vue
#	src/views/hisStore/storeOrder/index.vue
#	src/views/hisStore/storePayment/index.vue
#	src/views/hisStore/storeProduct/index.vue
#	src/views/qw/sopTemp/index.vue
#	src/views/system/config/config.vue
xw 3 hafta önce
ebeveyn
işleme
4f06808a94
100 değiştirilmiş dosya ile 9583 ekleme ve 609 silme
  1. 4 0
      .env.development
  2. 1 1
      .env.prod-bjzm
  3. 7 3
      .env.prod-cfryt
  4. 40 0
      .env.prod-fzbt
  5. 1 1
      .env.prod-gzzdy
  6. 4 0
      .env.prod-hat
  7. 3 0
      .env.prod-heyantang
  8. 44 0
      .env.prod-hsyy
  9. 4 0
      .env.prod-jnlzjk
  10. 40 0
      .env.prod-jnsyj
  11. 7 0
      .env.prod-myhk
  12. 4 1
      .env.prod-qdtst
  13. 40 0
      .env.prod-shdn
  14. 4 0
      .env.prod-sxjz
  15. 4 0
      .env.prod-syysy
  16. 12 7
      .env.prod-ylrz
  17. 4 1
      .env.prod-yxj
  18. 16 0
      Dockerfile
  19. 38 0
      nginx.conf
  20. 5 1
      package.json
  21. 53 0
      src/api/company/companyRedPacketBalanceLogs.js
  22. 4 4
      src/api/course/courseAnswerlogs.js
  23. 16 0
      src/api/course/coursePlaySourceConfig.js
  24. 14 5
      src/api/course/courseRedPacketLog.js
  25. 22 4
      src/api/course/courseWatchLog.js
  26. 9 0
      src/api/course/qw/courseWatchLog.js
  27. 7 0
      src/api/course/userCoursePeriod.js
  28. 34 0
      src/api/course/userVideo.js
  29. 71 0
      src/api/his/redPacketConfig.js
  30. 9 0
      src/api/hisStore/storePayment.js
  31. 24 0
      src/api/live/live.js
  32. 36 0
      src/api/live/liveData.js
  33. 8 0
      src/api/live/liveOrder.js
  34. 64 0
      src/api/live/mergedOrder.js
  35. 31 1
      src/api/login.js
  36. 53 0
      src/api/merchantAppConfig/merchantAppConfig.js
  37. 65 0
      src/api/qw/externalContactInfo.js
  38. 10 0
      src/api/qw/friendWelcome.js
  39. 4 4
      src/api/qw/sop.js
  40. 4 4
      src/api/qw/sopTemp.js
  41. 8 0
      src/api/qw/user.js
  42. 8 0
      src/api/system/user.js
  43. BIN
      src/assets/logo/hsyy.png
  44. BIN
      src/assets/logo/jnsyj.png
  45. 18 8
      src/store/modules/user.js
  46. 92 0
      src/utils/hsy.js
  47. 83 0
      src/views/WechatLoginDialog.vue
  48. 318 0
      src/views/company/companyRedPacketBalanceLogs/index.vue
  49. 25 3
      src/views/components/course/userCourseCatalogDetails.vue
  50. 25 13
      src/views/components/his/storeOrderDetails.vue
  51. 2 0
      src/views/components/his/storeOrderDetails2.vue
  52. 78 22
      src/views/course/courseAnswerlogs/index.vue
  53. 43 11
      src/views/course/courseFinishTemp/index.vue
  54. 159 1
      src/views/course/coursePlaySourceConfig/index.vue
  55. 168 45
      src/views/course/courseRedPacketLog/index.vue
  56. 42 6
      src/views/course/courseTrafficLog/index.vue
  57. 65 5
      src/views/course/courseTrafficLog/statistics.vue
  58. 45 4
      src/views/course/courseWatchLog/qw/statistics.vue
  59. 40 1
      src/views/course/courseWatchLog/statistics.vue
  60. 2 2
      src/views/course/fsCourseProductOrder/index.vue
  61. 3 1
      src/views/course/userCourse/index.vue
  62. 3 2
      src/views/course/userCourse/public.vue
  63. 18 1
      src/views/course/userCoursePeriod/statistics.vue
  64. 162 37
      src/views/course/videoResource/index.vue
  65. 9 1
      src/views/his/adv/index.vue
  66. 13 7
      src/views/his/company/index.vue
  67. 285 9
      src/views/his/integralOrder/index.vue
  68. 738 0
      src/views/his/merchantAppConfig/index.vue
  69. 15 4
      src/views/his/packageOrder/index.vue
  70. 423 0
      src/views/his/redPacketConfig/index.vue
  71. 5 4
      src/views/his/storeOrder/order1.vue
  72. 22 0
      src/views/his/userIntegralLogs/index.vue
  73. 21 21
      src/views/hisStore/adv/index.vue
  74. 21 0
      src/views/hisStore/components/productAfterSalesOrder.vue
  75. 4 0
      src/views/hisStore/components/productOrder.vue
  76. 2 0
      src/views/hisStore/integralGoods/index.vue
  77. 1 1
      src/views/hisStore/store/audit.vue
  78. 12 7
      src/views/hisStore/store/index.vue
  79. 44 5
      src/views/hisStore/storeAfterSales/index.vue
  80. 1 0
      src/views/hisStore/storeCouponIssue/index.vue
  81. 3 1
      src/views/hisStore/storeOrder/healthStoreList.vue
  82. 25 1
      src/views/hisStore/storePayment/index.vue
  83. 1 1
      src/views/hisStore/storeProduct/index.vue
  84. 8 0
      src/views/hisStore/storeProduct/indexZm.vue
  85. 8 0
      src/views/hisStore/storeProductAudit/index.vue
  86. 7 0
      src/views/hisStore/storeProductPackage/index.vue
  87. 21 2
      src/views/live/components/productAfterSalesOrder.vue
  88. 532 204
      src/views/live/live/index.vue
  89. 43 6
      src/views/live/liveAfteraSales/index.vue
  90. 130 15
      src/views/live/liveConfig/watchReward.vue
  91. 187 25
      src/views/live/liveConsole/LiveConsole.vue
  92. 170 57
      src/views/live/liveConsole/LivePlayer.vue
  93. 355 5
      src/views/live/liveData/index.vue
  94. 42 31
      src/views/live/liveOrder/index.vue
  95. 3 0
      src/views/live/liveOrder/liveOrderDetails.vue
  96. 1292 0
      src/views/live/order/index.vue
  97. 1118 0
      src/views/live/order/liveDetail.vue
  98. 880 0
      src/views/live/order/storeDetail.vue
  99. 880 0
      src/views/live/order/userDetail.vue
  100. 35 3
      src/views/login.vue

+ 4 - 0
.env.development

@@ -26,6 +26,10 @@ VUE_APP_COS_REGION = ap-chongqing
 VUE_APP_VIDEO_LINE_1 = https://xfktcpv.ylrzcloud.com
 # 线路二地址
 VUE_APP_VIDEO_LINE_2 = https://xfkobs.ylrztop.com
+#火山云视频地址域名
+VUE_APP_VIDEO_URL = https://myhkvolcengine.ylrztop.com
+#火山云视频点播空间名
+VUE_APP_HSY_SPACE = myhk-2114522511
 
 
 VUE_APP_LIVE_WS_URL = ws://127.0.0.1:7114/ws

+ 1 - 1
.env.prod-bjzm

@@ -23,7 +23,7 @@ VUE_APP_COS_BUCKET = bjzmky-1323137866
 # 存储桶配置
 VUE_APP_COS_REGION = ap-chongqing
 # 线路一地址
-VUE_APP_VIDEO_LINE_1 = https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com
+VUE_APP_VIDEO_LINE_1 = http://bjzmkytcpv.ylrzcloud.com
 # 线路二地址
 VUE_APP_VIDEO_LINE_2 = https://bjzmobs.ylrztop.com
 

+ 7 - 3
.env.prod-cfryt

@@ -19,13 +19,17 @@ VUE_APP_OBS_SERVER = https://obs.cn-north-4.myhuaweicloud.com
 # 存储桶配置
 VUE_APP_OBS_BUCKET = cfryt-hw079058881
 # 存储桶配置
-VUE_APP_COS_BUCKET = cfryt-1323137866
+VUE_APP_COS_BUCKET = ryt-1323137866
 # 存储桶配置
 VUE_APP_COS_REGION = ap-chongqing
 # 线路一地址
-VUE_APP_VIDEO_LINE_1 = https://cfrytcpv.ylrzcloud.com
+VUE_APP_VIDEO_LINE_1 = https://ryttcpv.ylrzcloud.com
 # 线路二地址
-VUE_APP_VIDEO_LINE_2 = https://cqtytobs.ylrztop.com
+VUE_APP_VIDEO_LINE_2 = https://cfrytobs.ylrztop.com
+#火山云视频地址域名
+VUE_APP_VIDEO_URL = https://rytvolcengine.ylrztop.com
+#火山云视频点播空间名
+VUE_APP_HSY_SPACE = ryt-2114522511
 
 # 开发环境配置
 ENV = 'production'

+ 40 - 0
.env.prod-fzbt

@@ -0,0 +1,40 @@
+# 页面标题
+VUE_APP_TITLE =福州白兔管理系统
+# 首页菜单标题
+VUE_APP_TITLE_INDEX =福州白兔管理系统
+# 公司名称
+VUE_APP_COMPANY_NAME =福州高新区白兔健康咨询有限公司
+# ICP备案号
+VUE_APP_ICP_RECORD =闽ICP备2024081011号-3
+# ICP网站访问地址
+VUE_APP_ICP_URL =https://beian.miit.gov.cn
+# 网站LOG
+VUE_APP_LOG_URL =@/assets/logo/myhk.png
+# 存储桶配置
+VUE_APP_OBS_ACCESS_KEY_ID = K2UTJGIN7UTZJR2XMXYG
+# 存储桶配置
+VUE_APP_OBS_SECRET_ACCESS_KEY = sbyeNJLbcYmH6copxeFP9pAoksM4NIT9Zw4x0SRX
+# 存储桶配置
+VUE_APP_OBS_SERVER = https://obs.cn-north-4.myhuaweicloud.com
+# 存储桶配置
+VUE_APP_OBS_BUCKET = myhk-hw079058881
+# 存储桶配置
+VUE_APP_COS_BUCKET = myhk-1323137866
+# 存储桶配置
+VUE_APP_COS_REGION = ap-chongqing
+# 线路一地址
+VUE_APP_VIDEO_LINE_1 = https://myhktcpv.ylrzcloud.com
+# 线路二地址
+VUE_APP_VIDEO_LINE_2 = https://myhkobs.ylrztop.com
+
+# 开发环境配置
+ENV = 'production'
+
+# FS管理系统/开发环境
+VUE_APP_BASE_API = '/prod-api'
+
+#默认 1、会员 2、企微
+VUE_APP_COURSE_DEFAULT = 2
+
+# 路由懒加载
+VUE_CLI_BABEL_TRANSPILE_MODULES = true

+ 1 - 1
.env.prod-gzzdy

@@ -19,7 +19,7 @@ VUE_APP_OBS_SERVER = https://obs.cn-north-4.myhuaweicloud.com
 # 存储桶配置
 VUE_APP_OBS_BUCKET = gzzdy1-hw079058881
 # 存储桶配置
-VUE_APP_COS_BUCKET = gzzdy-1323137866
+VUE_APP_COS_BUCKET = gzzdy1-1323137866
 # 存储桶配置
 VUE_APP_COS_REGION = ap-chongqing
 # 线路一地址

+ 4 - 0
.env.prod-hat

@@ -26,6 +26,10 @@ VUE_APP_COS_REGION = ap-chongqing
 VUE_APP_VIDEO_LINE_1 = https://hattcpv.ylrzcloud.com
 # 线路二地址
 VUE_APP_VIDEO_LINE_2 = https://hatobs.ylrztop.com
+#火山云视频地址域名
+VUE_APP_VIDEO_URL = https://hatvolcengine.ylrztop.com
+#火山云视频点播空间名
+VUE_APP_HSY_SPACE = hat-2114522511
 
 # 开发环境配置
 ENV = 'development'

+ 3 - 0
.env.prod-heyantang

@@ -38,3 +38,6 @@ VUE_APP_COURSE_DEFAULT = 2
 
 # 路由懒加载
 VUE_CLI_BABEL_TRANSPILE_MODULES = true
+
+
+VUE_APP_LIVE_WS_URL = wss://liveapp.yytcdta.com/ws

+ 44 - 0
.env.prod-hsyy

@@ -0,0 +1,44 @@
+# 页面标题
+VUE_APP_TITLE =河山医院
+# 首页菜单标题
+VUE_APP_TITLE_INDEX =河山医院
+# 公司名称
+VUE_APP_COMPANY_NAME =哈尔滨市河山医院有限公司
+# ICP备案号
+VUE_APP_ICP_RECORD =蒙ICP备2024019526号-1
+# ICP网站访问地址
+VUE_APP_ICP_URL =https://beian.miit.gov.cn
+# 网站LOG
+VUE_APP_LOG_URL =@/assets/logo/hsyy.png
+# 存储桶配置
+VUE_APP_OBS_ACCESS_KEY_ID = K2UTJGIN7UTZJR2XMXYG
+# 存储桶配置
+VUE_APP_OBS_SECRET_ACCESS_KEY = sbyeNJLbcYmH6copxeFP9pAoksM4NIT9Zw4x0SRX
+# 存储桶配置
+VUE_APP_OBS_SERVER = https://obs.cn-north-4.myhuaweicloud.com
+# 存储桶配置
+VUE_APP_OBS_BUCKET = hsyy-hw079058881
+# 存储桶配置
+VUE_APP_COS_BUCKET = heshanyy-1323137866
+# 存储桶配置
+VUE_APP_COS_REGION = ap-chongqing
+# 线路一地址
+VUE_APP_VIDEO_LINE_1 = https://heshanyytcpv.ylrzcloud.com
+# 线路二地址
+VUE_APP_VIDEO_LINE_2 = https://hsyyobs.ylrztop.com
+#火山云视频地址域名
+VUE_APP_VIDEO_URL = https://heshanyyvolcengine.ylrztop.com
+#火山云视频点播空间名
+VUE_APP_HSY_SPACE = heshanyy-2114522511
+
+# 开发环境配置
+ENV = 'production'
+
+# FS管理系统/开发环境
+VUE_APP_BASE_API = '/prod-api'
+
+#默认 1、会员 2、企微
+VUE_APP_COURSE_DEFAULT = 1
+
+# 路由懒加载
+VUE_CLI_BABEL_TRANSPILE_MODULES = true

+ 4 - 0
.env.prod-jnlzjk

@@ -26,6 +26,10 @@ VUE_APP_COS_REGION = ap-chongqing
 VUE_APP_VIDEO_LINE_1 = https://jnlzjktcpv.ylrzcloud.com
 # 线路二地址
 VUE_APP_VIDEO_LINE_2 = https://jnlzjkobs.ylrztop.com
+#火山云
+VUE_APP_VIDEO_URL = https://jnlzjkvolcengine.ylrztop.com
+#火山云
+VUE_APP_HSY_SPACE = lzjk-2114522511
 
 # 开发环境配置
 ENV = 'production'

+ 40 - 0
.env.prod-jnsyj

@@ -0,0 +1,40 @@
+# 页面标题
+VUE_APP_TITLE =济南顺亿景SCRM管理系统
+# 首页菜单标题
+VUE_APP_TITLE_INDEX =济南顺亿景
+# 公司名称
+VUE_APP_COMPANY_NAME =济南顺亿景
+# ICP备案号
+VUE_APP_ICP_RECORD =蜀ICP备2024052643号
+# ICP网站访问地址
+VUE_APP_ICP_URL =https://beian.miit.gov.cn
+# 网站LOG
+VUE_APP_LOG_URL =@/assets/logo/jnsyj.png
+# 存储桶配置
+VUE_APP_OBS_ACCESS_KEY_ID = K2UTJGIN7UTZJR2XMXYG
+# 存储桶配置
+VUE_APP_OBS_SECRET_ACCESS_KEY = sbyeNJLbcYmH6copxeFP9pAoksM4NIT9Zw4x0SRX
+# 存储桶配置
+VUE_APP_OBS_SERVER = https://obs.cn-north-4.myhuaweicloud.com
+# 存储桶配置
+VUE_APP_OBS_BUCKET = jnsyj-hw079058881
+# 存储桶配置
+VUE_APP_COS_BUCKET = jnsyj-1323137866
+# 存储桶配置
+VUE_APP_COS_REGION = ap-chongqing
+# 线路一地址
+VUE_APP_VIDEO_LINE_1 = https://jnsyjtcpv.ylrzcloud.com
+# 线路二地址
+VUE_APP_VIDEO_LINE_2 = https://jnsyjobs.ylrztop.com
+
+# 开发环境配置
+ENV = 'development'
+
+# FS管理系统/开发环境
+VUE_APP_BASE_API = '/prod-api'
+
+#默认 1、会员 2、企微
+VUE_APP_COURSE_DEFAULT = 1
+
+# 路由懒加载
+VUE_CLI_BABEL_TRANSPILE_MODULES = true

+ 7 - 0
.env.prod-myhk

@@ -26,6 +26,10 @@ VUE_APP_COS_REGION = ap-chongqing
 VUE_APP_VIDEO_LINE_1 = https://myhktcpv.ylrzcloud.com
 # 线路二地址
 VUE_APP_VIDEO_LINE_2 = https://myhkobs.ylrztop.com
+#火山云视频地址域名
+VUE_APP_VIDEO_URL = https://myhkvolcengine.ylrztop.com
+#火山云视频点播空间名
+VUE_APP_HSY_SPACE = myhk-2114522511
 
 # 开发环境配置
 ENV = 'production'
@@ -38,3 +42,6 @@ VUE_APP_COURSE_DEFAULT = 2
 
 # 路由懒加载
 VUE_CLI_BABEL_TRANSPILE_MODULES = true
+
+# 项目
+VUE_APP_PROJECT = 'myhk'

+ 4 - 1
.env.prod-qdtst

@@ -26,7 +26,10 @@ VUE_APP_COS_REGION = ap-chongqing
 VUE_APP_VIDEO_LINE_1 = https://qdtsttcpv.ylrzcloud.com
 # 线路二地址
 VUE_APP_VIDEO_LINE_2 = https://qdtstobs.ylrztop.com
-
+#火山云视频地址域名
+VUE_APP_VIDEO_URL = https://qdtstvolcengine.ylrztop.com
+#火山云视频点播空间名
+VUE_APP_HSY_SPACE = qdtst-2114522511
 # 开发环境配置
 ENV = 'development'
 

+ 40 - 0
.env.prod-shdn

@@ -0,0 +1,40 @@
+# 页面标题
+VUE_APP_TITLE =互联网医院管理系统
+# 首页菜单标题
+VUE_APP_TITLE_INDEX =宽益堂管理系统
+# 公司名称
+VUE_APP_COMPANY_NAME =重庆云联融智科技有限公司
+# ICP备案号
+VUE_APP_ICP_RECORD =渝ICP备2024031984号-1
+# ICP网站访问地址
+VUE_APP_ICP_URL =https://beian.miit.gov.cn
+# 网站LOG
+VUE_APP_LOG_URL =@/assets/logo/kyt.jpg
+# 存储桶配置
+VUE_APP_OBS_ACCESS_KEY_ID = K2UTJGIN7UTZJR2XMXYG
+# 存储桶配置
+VUE_APP_OBS_SECRET_ACCESS_KEY = sbyeNJLbcYmH6copxeFP9pAoksM4NIT9Zw4x0SRX
+# 存储桶配置
+VUE_APP_OBS_SERVER = https://obs.cn-north-4.myhuaweicloud.com
+# 存储桶配置
+VUE_APP_OBS_BUCKET = kyt-hw079058881
+# 存储桶配置
+VUE_APP_COS_BUCKET = kyt-1323137866
+# 存储桶配置
+VUE_APP_COS_REGION = ap-chongqing
+# 线路一地址
+VUE_APP_VIDEO_LINE_1 = https://kyttcpv.ylrzcloud.com
+# 线路二地址
+VUE_APP_VIDEO_LINE_2 = https://kytobs.ylrztop.com
+
+# 开发环境配置
+ENV = 'development'
+
+# FS管理系统/开发环境
+VUE_APP_BASE_API = '/prod-api'
+
+#默认 1、会员 2、企微
+VUE_APP_COURSE_DEFAULT = 2
+
+# 路由懒加载
+VUE_CLI_BABEL_TRANSPILE_MODULES = true

+ 4 - 0
.env.prod-sxjz

@@ -26,6 +26,10 @@ VUE_APP_COS_REGION = ap-chongqing
 VUE_APP_VIDEO_LINE_1 = https://sxjztcpv.ylrzcloud.com
 # 线路二地址
 VUE_APP_VIDEO_LINE_2 = https://sxjzobs.ylrztop.com
+#火山云视频地址域名
+VUE_APP_VIDEO_URL = https://sxjzvolcengine.ylrztop.com
+#火山云视频点播空间名
+VUE_APP_HSY_SPACE = sxjz-2114522511
 
 # 开发环境配置
 ENV = 'development'

+ 4 - 0
.env.prod-syysy

@@ -26,6 +26,10 @@ VUE_APP_COS_REGION = ap-chongqing
 VUE_APP_VIDEO_LINE_1 = https://syysytcpv.ylrzcloud.com
 # 线路二地址
 VUE_APP_VIDEO_LINE_2 = https://syysyobs.ylrztop.com
+#火山云视频地址域名
+VUE_APP_VIDEO_URL = https://syysyvolcengine.ylrztop.com
+#火山云视频点播空间名
+VUE_APP_HSY_SPACE = syysy-2114522511
 
 # 开发环境配置
 ENV = 'development'

+ 12 - 7
.env.prod-ylrz

@@ -1,10 +1,10 @@
 #该文本用于打包测试平台
 # 页面标题
-VUE_APP_TITLE =云联融智互联网医院管理系统
+VUE_APP_TITLE =云联融智SCRM管理系统
 # 首页菜单标题
-VUE_APP_TITLE_INDEX =云联融智互联网医院
+VUE_APP_TITLE_INDEX =云联融智SCRM
 # 公司名称
-VUE_APP_COMPANY_NAME =云联融智科技有公司
+VUE_APP_COMPANY_NAME =云联融智科技有公司
 # ICP备案号
 VUE_APP_ICP_RECORD =
 # ICP网站访问地址
@@ -18,15 +18,15 @@ VUE_APP_OBS_SECRET_ACCESS_KEY = sbyeNJLbcYmH6copxeFP9pAoksM4NIT9Zw4x0SRX
 # 存储桶配置
 VUE_APP_OBS_SERVER = https://obs.cn-north-4.myhuaweicloud.com
 # 存储桶配置
-VUE_APP_OBS_BUCKET = jkj-hw079058881
+VUE_APP_OBS_BUCKET = myhk-hw079058881
 # 存储桶配置
-VUE_APP_COS_BUCKET = jkj-1323137866
+VUE_APP_COS_BUCKET = ylrz-1323137866
 # 存储桶配置
 VUE_APP_COS_REGION = ap-chongqing
 # 线路一地址
-VUE_APP_VIDEO_LINE_1 = https://jkjtcpv.ylrzcloud.com
+VUE_APP_VIDEO_LINE_1 = https://ylrztcpv.ylrzcloud.com
 # 线路二地址
-VUE_APP_VIDEO_LINE_2 = https://jkjobs.ylrztop.com
+VUE_APP_VIDEO_LINE_2 = https://myhkkobs.ylrztop.com
 
 # 开发环境配置
 ENV = 'production'
@@ -39,3 +39,8 @@ VUE_APP_COURSE_DEFAULT = 1
 
 # 路由懒加载
 VUE_CLI_BABEL_TRANSPILE_MODULES = true
+
+# 患者信息
+VUE_APP_PATIENT_INFO = '客户信息'
+# 添加病人
+VUE_APP_ADD_PATIENT = '添加信息'

+ 4 - 1
.env.prod-yxj

@@ -26,7 +26,10 @@ VUE_APP_COS_REGION = ap-chongqing
 VUE_APP_VIDEO_LINE_1 = https://yxjtcpv.ylrzcloud.com
 # 线路二地址
 VUE_APP_VIDEO_LINE_2 = https://whyxjobs.ylrztop.com
-
+#火山云视频地址域名
+VUE_APP_VIDEO_URL = https://whyxjvolcengine.ylrztop.com
+#火山云视频点播空间名
+VUE_APP_HSY_SPACE = whyxj-2114522511
 # 开发环境配置
 ENV = 'development'
 

+ 16 - 0
Dockerfile

@@ -0,0 +1,16 @@
+
+
+#基于官方 NGINX 镜像部署(精简镜像)
+FROM nginx:alpine
+
+# 复制本地打包好的 dist 目录到 NGINX 静态资源目录
+COPY ./dist /usr/share/nginx/html
+
+# 替换 NGINX 默认配置(用我们自定义的 nginx.conf)
+COPY ./nginx.conf /etc/nginx/nginx.conf
+
+# 暴露容器端口(与 nginx.conf 中 listen 一致)
+#EXPOSE 80
+
+# 启动 NGINX(前台运行,避免容器启动后退出)
+CMD ["nginx", "-g", "daemon off;"]

+ 38 - 0
nginx.conf

@@ -0,0 +1,38 @@
+# nginx.conf
+worker_processes  5;
+
+events {
+    worker_connections  1024;
+}
+
+http {
+    include       mime.types;
+    default_type  application/octet-stream;
+    client_max_body_size 200m;
+    sendfile        on;
+    keepalive_timeout  65;
+
+    server {
+        listen       80;  # 容器内端口
+        server_name  localhost;
+
+        # 前端静态资源目录(对应容器内的 /usr/share/nginx/html)
+        root   /usr/share/nginx/html;
+        index  index.html;
+
+        # 关键:处理 VUE Router history 模式(避免刷新 404)
+        location / {
+            try_files $uri $uri/ /index.html;  # 所有路由指向 index.html
+        }
+
+        # 关键:反向代理 API(解决跨域,替换为你的真实后端地址)
+        location /prod-api/ {
+            proxy_pass http://192.168.58.159:7772/;  # 后端 API 地址(末尾加 / 避免路径拼接问题)
+            proxy_set_header Host $host;
+            proxy_set_header X-Real-IP $remote_addr;
+            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+            proxy_set_header X-Forwarded-Proto $scheme;  # 传递 HTTPS 协议
+        }
+
+     }
+}

+ 5 - 1
package.json

@@ -17,6 +17,7 @@
     "build:prod-cqtyt": "vue-cli-service build --mode prod-cqtyt",
     "build:prod-heyantang": "vue-cli-service build --mode prod-heyantang",
     "build:prod-bly": "vue-cli-service build --mode prod-bly",
+    "build:prod-fzbt": "vue-cli-service build --mode prod-fzbt",
     "build:prod-sxjz": "vue-cli-service build --mode prod-sxjz",
     "build:prod-xfk": "vue-cli-service build --mode prod-xfk",
     "build:prod-jnmy": "vue-cli-service build --mode prod-jnmy",
@@ -24,7 +25,6 @@
     "build:prod-knt2": "vue-cli-service build --mode prod-knt2",
     "build:prod-hdt": "vue-cli-service build --mode prod-hdt",
     "build:prod-yzt": "vue-cli-service build --mode prod-yzt",
-    "build:prod-fcky": "vue-cli-service build --mode prod-fcky",
     "build:prod-sft": "vue-cli-service build --mode prod-sft",
     "build:prod-zsjk": "vue-cli-service build --mode prod-zsjk",
     "build:prod-lmjy": "vue-cli-service build --mode prod-lmjy",
@@ -52,6 +52,9 @@
     "build:prod-bjzm": "vue-cli-service build --mode prod-bjzm",
     "build:prod-gzzdy": "vue-cli-service build --mode prod-gzzdy",
     "build:prod-cfryt": "vue-cli-service build --mode prod-cfryt",
+    "build:prod-hsyy": "vue-cli-service build --mode prod-hsyy",
+    "build:prod-jnsyj": "vue-cli-service build --mode prod-jnsyj",
+    "build:prod-shdn": "vue-cli-service build --mode prod-shdn",
     "preview": "node build/index.js --preview",
     "lint": "eslint --ext .js,.vue src"
   },
@@ -102,6 +105,7 @@
     "quill": "1.3.7",
     "screenfull": "5.0.2",
     "sortablejs": "1.10.2",
+    "tt-uploader": "^1.5.5",
     "vod-js-sdk-v6": "^1.7.0",
     "vue": "2.6.12",
     "vue-baidu-map": "^0.21.22",

+ 53 - 0
src/api/company/companyRedPacketBalanceLogs.js

@@ -0,0 +1,53 @@
+import request from '@/utils/request'
+
+// 查询企业红包余额记录列表
+export function listCompanyRedPacketBalanceLogs(query) {
+  return request({
+    url: '/company/companyRedPacketBalanceLogs/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询企业红包余额记录详细
+export function getCompanyRedPacketBalanceLogs(logsId) {
+  return request({
+    url: '/company/companyRedPacketBalanceLogs/' + logsId,
+    method: 'get'
+  })
+}
+
+// 新增企业红包余额记录
+export function addCompanyRedPacketBalanceLogs(data) {
+  return request({
+    url: '/company/companyRedPacketBalanceLogs',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改企业红包余额记录
+export function updateCompanyRedPacketBalanceLogs(data) {
+  return request({
+    url: '/company/companyRedPacketBalanceLogs',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除企业红包余额记录
+export function delCompanyRedPacketBalanceLogs(logsId) {
+  return request({
+    url: '/company/companyRedPacketBalanceLogs/' + logsId,
+    method: 'delete'
+  })
+}
+
+// 导出企业红包余额记录
+export function exportCompanyRedPacketBalanceLogs(query) {
+  return request({
+    url: '/company/companyRedPacketBalanceLogs/export',
+    method: 'get',
+    params: query
+  })
+}

+ 4 - 4
src/api/course/courseAnswerlogs.js

@@ -4,8 +4,8 @@ import request from '@/utils/request'
 export function listLogs(query) {
   return request({
     url: '/course/courseAnswerLog/list',
-    method: 'get',
-    params: query
+    method: 'post',
+    data: query
   })
 }
 
@@ -47,7 +47,7 @@ export function delLogs(logId) {
 export function exportLogs(query) {
   return request({
     url: '/course/courseAnswerLog/export',
-    method: 'get',
-    params: query
+    method: 'post',
+    data: query
   })
 }

+ 16 - 0
src/api/course/coursePlaySourceConfig.js

@@ -31,6 +31,22 @@ export function update(data) {
   })
 }
 
+export function updateBindConfig(data) {
+  return request({
+    url: '/course/playSourceConfig/updateBindConfig',
+    method: 'put',
+    data: data
+  })
+}
+
+export function updateUnbindConfig(data) {
+  return request({
+    url: '/course/playSourceConfig/updateUnbindConfig',
+    method: 'put',
+    data: data
+  })
+}
+
 export function del(id) {
   return request({
     url: '/course/playSourceConfig/' + id,

+ 14 - 5
src/api/course/courseRedPacketLog.js

@@ -4,8 +4,17 @@ import request from '@/utils/request'
 export function listCourseRedPacketLog(query) {
   return request({
     url: '/course/courseRedPacketLog/list',
-    method: 'get',
-    params: query
+    method: 'POST',
+    data: query
+  })
+}
+
+// 查询短链课程看课记录列表
+export function listCourseRedPacketLogPage(data) {
+  return request({
+    url: '/course/courseRedPacketLog/pageList',
+    method: 'post',
+    data: data
   })
 }
 
@@ -81,10 +90,10 @@ export function delCourseRedPacketLog(logId) {
 }
 
 // 导出短链课程看课记录
-export function exportCourseRedPacketLog(query) {
+export function exportCourseRedPacketLog(data) {
   return request({
     url: '/course/courseRedPacketLog/export',
-    method: 'get',
-    params: query
+    method: 'post',
+    data: data
   })
 }

+ 22 - 4
src/api/course/courseWatchLog.js

@@ -4,8 +4,17 @@ import request from '@/utils/request'
 export function listCourseWatchLog(query) {
   return request({
     url: '/course/courseWatchLog/list',
-    method: 'get',
-    params: query
+    method: 'POST',
+    data: query
+  })
+}
+
+// 查询短链课程看课记录列表
+export function listCourseWatchLogPage(query) {
+  return request({
+    url: '/course/courseWatchLog/pageList',
+    method: 'post',
+    data: query
   })
 }
 
@@ -47,10 +56,19 @@ export function delCourseWatchLog(logId) {
 export function exportCourseWatchLog(query) {
   return request({
     url: '/course/courseWatchLog/export',
-    method: 'get',
-    params: query
+    method: 'post',
+    data: query
   })
 }
+//会员看课统计导出
+export function exportCourseWatchLogStatisticsExport(query) {
+  return request({
+    url: '/course/courseWatchLog/statisticsExport',
+    method: 'POST',
+    data: query
+  })
+}
+
 
 
 export function statisticsList(query) {

+ 9 - 0
src/api/course/qw/courseWatchLog.js

@@ -112,6 +112,15 @@ export function exportCourseWatchLog(query) {
   })
 }
 
+export function exportCourseWatchLogStatisticsExportQw(query) {
+  return request({
+    url: '/qw/course/courseWatchLog/statisticsExport',
+    method: 'POST',
+    data: query
+  })
+}
+
+
 export function watchLogStatisticsExport(query) {
   return request({
     url: '/qw/course/courseWatchLog/watchLogStatisticsExport',

+ 7 - 0
src/api/course/userCoursePeriod.js

@@ -155,6 +155,13 @@ export function periodCountSelect(data) {
   })
 }
 
+export function exportInfo(query) {
+  return request({
+    url: '/course/period/exportInfo',
+    method: 'post',
+    data: query
+  })
+}
 // 获取营期选项列表
 export function getPeriodListLikeName(query) {
   return request({

+ 34 - 0
src/api/course/userVideo.js

@@ -104,3 +104,37 @@ export function getThumbnail(file) {
     }
   });
 }
+
+
+//火山云视频上传
+export function uploadUserVideo(file,uploadId) {
+  const formData = new FormData();
+  formData.append('file', file);
+  formData.append('uploadId', uploadId)
+  return request({
+    url: '/course/userVideo/uploadUserVideo',
+    method: 'post',
+    data: formData,
+    headers: {
+      'Content-Type': 'multipart/form-data'
+    }
+  });
+}
+
+// 查询火山云视频上传进度
+export function getUploadProgress(uploadId) {
+  return request({
+    url: '/course/userVideo/uploadProgress',
+    method: 'get',
+    params: { uploadId }
+  });
+}
+
+export function HsyAssumeRoleService() {
+  return request({
+    url: '/course/userVideo/HsyAssumeRoleService',
+    method: 'get',
+  });
+}
+
+

+ 71 - 0
src/api/his/redPacketConfig.js

@@ -0,0 +1,71 @@
+import request from '@/utils/request'
+
+// 查询多商户配置列表
+export function listMore(query) {
+  return request({
+    url: '/redPacket/more/list',
+    method: 'get',
+    params: query
+  })
+}
+
+
+export function getRedPacketMchId(query) {
+  return request({
+    url: '/redPacket/more/getRedPacketConfig',
+    method: 'get',
+    params: query
+  })
+}
+
+
+// 查询多商户配置详细
+export function getMore(id) {
+  return request({
+    url: '/redPacket/more/' + id,
+    method: 'get'
+  })
+}
+
+// 新增多商户配置
+export function addMore(data) {
+  return request({
+    url: '/redPacket/more',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改多商户配置
+export function updateMore(data) {
+  return request({
+    url: '/redPacket/more',
+    method: 'put',
+    data: data
+  })
+}
+
+export function updateChangeMchId(data) {
+  return request({
+    url: '/redPacket/more/updateChangeMchId',
+    method: 'post',
+    data: data
+  })
+}
+
+// 删除多商户配置
+export function delMore(id) {
+  return request({
+    url: '/redPacket/more/' + id,
+    method: 'delete'
+  })
+}
+
+// 导出多商户配置
+export function exportMore(query) {
+  return request({
+    url: '/redPacket/more/export',
+    method: 'get',
+    params: query
+  })
+}

+ 9 - 0
src/api/hisStore/storePayment.js

@@ -84,3 +84,12 @@ export function getMiniProgramList() {
     method: 'get'
   })
 }
+
+//同步订单状态
+export function oneClickShipping(data) {
+  return request({
+    url: '/store/store/storePayment/oneClickShipping',
+    method: 'post',
+    data: data
+  })
+}

+ 24 - 0
src/api/live/live.js

@@ -134,3 +134,27 @@ export function copyLive(data) {
     params: data
   })
 }
+
+// 查询公司list
+export function getCompanyDropList() {
+  return request({
+    url: '/live/live/getCompanyDropList',
+    method: 'get'
+  })
+}
+
+// 根据公司查询主体list
+export function getQwCorpList(companyId) {
+  return request({
+    url: '/live/live/getQwCorpList/' + companyId,
+    method: 'get'
+  })
+}
+// 根据主体条件查询标签信息
+export function getTagsListByCorpId(qwTagGroup) {
+  return request({
+    url: '/live/live/getTagsListByCorpId',
+    method: 'get',
+    params:qwTagGroup
+  })
+}

+ 36 - 0
src/api/live/liveData.js

@@ -20,3 +20,39 @@ export function listLiveData(data) {
     data:data,
   })
 }
+
+export function getLiveDataDetailBySql(liveId) {
+  return request({
+    url: '/liveData/liveData/getLiveDataDetailBySql?liveId=' + liveId,
+    method: 'get'
+  })
+}
+
+export function getLiveUserDetailListBySql(liveId) {
+  return request({
+    url: '/liveData/liveData/getLiveUserDetailListBySql?liveId=' + liveId,
+    method: 'get'
+  })
+}
+
+export function getLiveDataDetailByServer(liveId) {
+  return request({
+    url: '/liveData/liveData/getLiveDataDetailByServer?liveId=' + liveId,
+    method: 'get'
+  })
+}
+
+export function getLiveUserDetailListByServer(liveId) {
+  return request({
+    url: '/liveData/liveData/getLiveUserDetailListByServer?liveId=' + liveId,
+    method: 'get'
+  })
+}
+
+// 导出直播间用户详情数据
+export function exportLiveUserDetail(liveId) {
+  return request({
+    url: '/liveData/liveData/exportLiveUserDetail?liveId=' + liveId,
+    method: 'get'
+  })
+}

+ 8 - 0
src/api/live/liveOrder.js

@@ -85,6 +85,14 @@ export function exportLiveOrderZm(query) {
     params: query
   })
 }
+export function exportZmNew(query) {
+  return request({
+    url: '/live/liveOrder/exportZmNew',
+    method: 'get',
+    params: query
+  })
+}
+
 
 export function getExpress(data) {
   return request({

+ 64 - 0
src/api/live/mergedOrder.js

@@ -0,0 +1,64 @@
+import request from '@/utils/request'
+
+// 查询合并订单列表
+export function listMergedOrder(query) {
+  return request({
+    url: '/order/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 导出合并订单
+export function exportMergedOrder(query) {
+  return request({
+    url: '/order/export',
+    method: 'get',
+    params: query
+  })
+}
+
+// 导出合并订单明细
+export function exportMergedOrderItems(query) {
+  return request({
+    url: '/order/exportItems',
+    method: 'get',
+    params: query
+  })
+}
+
+// 导出合并订单(明文)
+export function exportMergedOrderDetails(query) {
+  return request({
+    url: '/order/exportDetails',
+    method: 'get',
+    params: query
+  })
+}
+
+// 导出合并订单明细(明文)
+export function exportMergedOrderItemsDetails(query) {
+  return request({
+    url: '/order/exportItemsDetails',
+    method: 'get',
+    params: query
+  })
+}
+
+// 导出发货单
+export function exportMergedShipping(query) {
+  return request({
+    url: '/order/exportShipping',
+    method: 'get',
+    params: query
+  })
+}
+
+// 导入物流单号模板下载
+export function importDeliveryNoteExpressTemplate() {
+  return request({
+    url: '/order/importDeliveryNoteTemplate',
+    method: 'get'
+  })
+}
+

+ 31 - 1
src/api/login.js

@@ -50,4 +50,34 @@ export function getCodeImg() {
     method: 'get',
     timeout: 20000
   })
-}
+}
+
+export function getWechatQrCode(data) {
+  return request({
+    url: '/getWechatQrCode',
+    method: 'post',
+    data: data
+  })
+}
+
+export function checkWechatScan(ticket) {
+  return request({
+    url: '/checkWechatScan',
+    method: 'get',
+    params: { ticket }
+  })
+}
+
+export function checkIsNeedCheck(username, password, code, uuid) {
+  const data = {
+    username,
+    password,
+    code,
+    uuid
+  }
+  return request({
+    url: '/checkIsNeedCheck',
+    method: 'post',
+    data: data
+  })
+}

+ 53 - 0
src/api/merchantAppConfig/merchantAppConfig.js

@@ -0,0 +1,53 @@
+import request from '@/utils/request'
+
+// 查询商户应用配置列表
+export function listMerchantAppConfig(query) {
+  return request({
+    url: '/his/merchantAppConfig/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询商户应用配置详细
+export function getMerchantAppConfig(id) {
+  return request({
+    url: '/his/merchantAppConfig/' + id,
+    method: 'get'
+  })
+}
+
+// 新增商户应用配置
+export function addMerchantAppConfig(data) {
+  return request({
+    url: '/his/merchantAppConfig',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改商户应用配置
+export function updateMerchantAppConfig(data) {
+  return request({
+    url: '/his/merchantAppConfig',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除商户应用配置
+export function delMerchantAppConfig(id) {
+  return request({
+    url: '/his/merchantAppConfig/' + id,
+    method: 'delete'
+  })
+}
+
+// 导出商户应用配置
+export function exportMerchantAppConfig(query) {
+  return request({
+    url: '/his/merchantAppConfig/export',
+    method: 'get',
+    params: query
+  })
+}

+ 65 - 0
src/api/qw/externalContactInfo.js

@@ -0,0 +1,65 @@
+import request from '@/utils/request'
+
+// 查询外部联系人信息表列表
+export function listExternalContactInfo(query) {
+  return request({
+    url: '/qw/externalContactInfo/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询外部联系人信息表详细
+export function getExternalContactInfo(id) {
+  return request({
+    url: '/qw/externalContactInfo/' + id,
+    method: 'get'
+  })
+}
+
+// 新增外部联系人信息表
+export function addExternalContactInfo(data) {
+  return request({
+    url: '/qw/externalContactInfo',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改外部联系人信息表
+export function updateExternalContactInfo(data) {
+  return request({
+    url: '/qw/externalContactInfo',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除外部联系人信息表
+export function delExternalContactInfo(id) {
+  return request({
+    url: '/qw/externalContactInfo/' + id,
+    method: 'delete'
+  })
+}
+export function editTalk(id) {
+  return request({
+    url: '/qw/externalContactInfo/editTalk/' + id,
+    method: 'put'
+  })
+}
+
+export function editAllTalk(id) {
+  return request({
+    url: '/qw/externalContactInfo/editAllTalk/' + id,
+    method: 'put'
+  })
+}
+// 导出外部联系人信息表
+export function exportExternalContactInfo(query) {
+  return request({
+    url: '/qw/externalContactInfo/export',
+    method: 'get',
+    params: query
+  })
+}

+ 10 - 0
src/api/qw/friendWelcome.js

@@ -0,0 +1,10 @@
+import request from '@/utils/request'
+
+// 查询好友欢迎语列表
+export function listFriendWelcome(query) {
+  return request({
+    url: '/qw/friendWelcome/list',
+    method: 'get',
+    params: query
+  })
+}

+ 4 - 4
src/api/qw/sop.js

@@ -4,8 +4,8 @@ import request from '@/utils/request'
 export function listSop(query) {
   return request({
     url: '/qw/sop/list',
-    method: 'get',
-    params: query
+    method: 'post',
+    data: query
   })
 }
 // 查询企微sop模板列表
@@ -98,8 +98,8 @@ export function updateStatus(ids) {
 export function exportSop(query) {
   return request({
     url: '/qw/sop/export',
-    method: 'get',
-    params: query
+    method: 'post',
+    data: query
   })
 }
 

+ 4 - 4
src/api/qw/sopTemp.js

@@ -4,8 +4,8 @@ import request from '@/utils/request'
 export function listSopTemp(query) {
   return request({
     url: '/qw/sopTemp/list',
-    method: 'get',
-    params: query
+    method: 'post',
+    data: query
   })
 }
 // 查询sop模板列表
@@ -145,8 +145,8 @@ export function shareSopTemp(data) {
 export function exportSopTemp(query) {
   return request({
     url: '/qw/sopTemp/export',
-    method: 'get',
-    params: query
+    method: 'post',
+    data: query
   })
 }
 

+ 8 - 0
src/api/qw/user.js

@@ -264,3 +264,11 @@ export function selectCloudAP(data) {
     data: data
   })
 }
+
+export function getQwAllUserList(query) {
+  return request({
+    url: '/qw/user/getQwAllUserList',
+    method: 'get',
+    params: query
+  })
+}

+ 8 - 0
src/api/system/user.js

@@ -150,3 +150,11 @@ export function isAdmin() {
   })
 }
 
+export function unBind(userId) {
+  return request({
+    url: '/system/user/unBind',
+    method: 'post',
+    data: { userId: userId }
+  })
+}
+

BIN
src/assets/logo/hsyy.png


BIN
src/assets/logo/jnsyj.png


+ 18 - 8
src/store/modules/user.js

@@ -1,4 +1,4 @@
-import { login, logout, getInfo } from '@/api/login'
+import {login, logout, getInfo, checkIsNeedCheck} from '@/api/login'
 import { getToken, setToken, removeToken } from '@/utils/auth'
 
 const user = {
@@ -48,13 +48,23 @@ const user = {
       const code = userInfo.code
       const uuid = userInfo.uuid
       return new Promise((resolve, reject) => {
-        login(username, password, code, uuid).then(res => {
-          setToken(res.token)
-          commit('SET_TOKEN', res.token)
-          resolve()
-        }).catch(error => {
-          reject(error)
-        })
+        checkIsNeedCheck(username,password,code,uuid).then(resp => {
+          console.log("检查是否需要验证", resp)
+          if (!resp){
+            // 不需要短信验证,直接登录
+            login(username, password, code, uuid).then(res => {
+              setToken(res.token)
+              commit('SET_TOKEN', res.token)
+              resolve({needSms: false})
+            }).catch(error => {
+              reject(error)
+            })
+          } else {
+            // 需要短信,交给页面去弹窗
+            resolve({ needSms: true })
+          }
+        }).catch(error => reject(error))
+
       })
     },
 

+ 92 - 0
src/utils/hsy.js

@@ -0,0 +1,92 @@
+import TTUploader from 'tt-uploader'
+import { HsyAssumeRoleService } from '@/api/course/userVideo'
+const  spaceName = process.env.VUE_APP_HSY_SPACE
+export const uploadToHSY = async (file, onProgress, type, callBackUp) => {
+  try {
+    const res = await HsyAssumeRoleService()
+    //console.log('火山云 STS 凭证:', res)
+    const credentials = res.data.result.credentials
+    //console.log('火山云 credentials 凭证:', credentials)
+
+    if (!credentials) {
+      throw new Error('未获取到火山云 STS 凭证')
+    }
+
+    const uploader = new TTUploader({
+      appId: '917052',
+      userId: '68185444',
+      videoConfig: {
+        spaceName: spaceName,
+      }
+    })
+
+    const date = new Date();
+    const yyyy = date.getFullYear();
+    const MM = String(date.getMonth() + 1).padStart(2, '0');
+    const dd = String(date.getDate()).padStart(2, '0');
+    const datePath = `${yyyy}${MM}${dd}`;
+
+
+    const fileName = `${Date.now()}.mp4`;
+
+    const remoteFileName = `course/${datePath}/${fileName}`;
+
+    const fileKey = uploader.addFile({
+      file,
+      type: 'video',
+      fileName:remoteFileName,
+      stsToken: {
+        CurrentTime: credentials.currentTime,
+        ExpiredTime: credentials.expiredTime,
+        SessionToken: credentials.sessionToken,
+        AccessKeyID: credentials.accessKeyId,
+        SecretAccessKey: credentials.secretAccessKey,
+      },
+    })
+
+    return new Promise((resolve, reject) => {
+
+      // 上传进度
+      uploader.on('progress', (info) => {
+        onProgress && onProgress({
+          percent: info.percent,
+        })
+      })
+
+      // 上传完成
+      uploader.on('complete', (info) => {
+        resolve({
+          ...info.uploadResult,
+          fileKey,
+        })
+      })
+
+      // 上传失败
+      uploader.on('error', (info) => {
+        reject(info)
+      })
+
+      // 取消上传支持
+      if (callBackUp) {
+        callBackUp({
+          uploader,
+          fileKey,
+          cancel: () => {
+            try {
+              uploader.removeFile(fileKey)
+              reject(new Error('Upload cancelled by user'))
+            } catch (e) {
+              reject(e)
+            }
+          }
+        })
+      }
+
+      uploader.start(fileKey)
+    })
+
+  } catch (error) {
+    console.error('火山云上传失败:', error)
+    throw error
+  }
+}

+ 83 - 0
src/views/WechatLoginDialog.vue

@@ -0,0 +1,83 @@
+<!--<template>-->
+<!--  <el-dialog title="微信扫码验证" :visible.sync="visible" width="300px">-->
+<!--    <div class="flex flex-col items-center justify-center">-->
+<!--      &lt;!&ndash; 直接用 qrcode-vue 生成二维码 &ndash;&gt;-->
+<!--      <qrcode-vue :value="qrUrl" :size="200" v-if="qrUrl" />-->
+<!--      <p v-if="status==='waiting'">请使用微信扫码确认</p>-->
+<!--      <p v-if="status==='success'">验证成功,正在跳转...</p>-->
+<!--    </div>-->
+<!--  </el-dialog>-->
+<!--</template>-->
+
+<script>
+import { getWechatQrCode, checkWechatScan } from "@/api/login";
+
+
+export default {
+  name: "WechatLoginDialog",
+  props: {
+    visible: Boolean,
+    username: String,
+    redirect: String
+  },
+  data() {
+    return {
+      qrUrl: "",     // 微信扫码登录URL(用来生成二维码内容)
+      ticket: "",
+      status: "waiting",
+      timer: null,
+      errorShown: false
+    };
+  },
+  watch: {
+    visible(newVal) {
+      if (newVal && this.username) this.open(this.username);
+    }
+  },
+  methods: {
+    open(username) {
+      getWechatQrCode({ username }).then(res => {
+        this.ticket = res.data.state;
+        const win = window.open(res.data.url); // 新开窗口扫码
+        this.startPolling(win); // 传入窗口对象
+      });
+    },
+    startPolling(win) {
+      this.timer = setInterval(() => {
+        checkWechatScan(this.ticket)
+          .then(res => {
+            if (res.code === 200 && res.data) {
+              this.status = "success";
+              clearInterval(this.timer);
+              console.log("扫码成功,准备 emit 事件", res.data);
+
+              this.$emit("update:visible", false);
+              this.$emit("loginSuccess", res.data);
+
+              if (win && !win.closed) {
+                win.close(); // 扫码完成后自动关闭窗口
+              }
+            }
+          })
+          .catch(err => {
+            clearInterval(this.timer);
+            this.$emit("update:visible", false);
+
+            if (!this.errorShown) {
+              this.errorShown = true;
+              this.$message.error(err.response?.data?.msg);
+            }
+
+            if (win && !win.closed) {
+              win.close(); // 异常也关闭窗口
+            }
+          });
+      }, 800);
+    }
+
+  },
+  beforeDestroy() {
+    if (this.timer) clearInterval(this.timer);
+  }
+};
+</script>

+ 318 - 0
src/views/company/companyRedPacketBalanceLogs/index.vue

@@ -0,0 +1,318 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="ID" prop="logsId">
+        <el-input
+          v-model="queryParams.logsId"
+          placeholder="请输入ID"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="公司名" prop="companyId">
+        <el-select filterable  style="width: 220px" v-model="queryParams.companyId" placeholder="请选择公司名" clearable size="small">
+          <el-option
+            v-for="item in companys"
+            :key="item.companyId"
+            :label="item.companyName"
+            :value="item.companyId"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item label="类型" prop="logsType">
+        <el-select v-model="queryParams.logsType" placeholder="请选择类型" clearable size="small">
+          <el-option
+            v-for="dict in logsTypeOptions"
+            :key="dict.dictValue"
+            :label="dict.dictLabel"
+            :value="dict.dictValue"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item label="创建时间">
+        <el-date-picker
+          v-model="daterangeCreateTime"
+          size="small"
+          style="width: 240px"
+          value-format="yyyy-MM-dd"
+          type="daterange"
+          range-separator="-"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期"
+        ></el-date-picker>
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          :loading="exportLoading"
+          @click="handleExport"
+          v-hasPermi="['company:companyRedPacketBalanceLogs:export']"
+        >导出</el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table border v-loading="loading" :data="companyRedPacketBalanceLogsList" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="ID" align="center" prop="logsId" />
+      <el-table-column label="企业" align="center" prop="companyName" />
+      <el-table-column label="金额" align="center" prop="money" />
+      <el-table-column label="余额" align="center" prop="balance" />
+      <el-table-column label="备注" align="center" prop="remark" />
+      <el-table-column label="类型" align="center" prop="logsType">
+        <template slot-scope="scope">
+          <dict-tag :options="logsTypeOptions" :value="scope.row.logsType"/>
+        </template>
+      </el-table-column>
+      <el-table-column v-if="false" label="操作" align="center" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['company:companyRedPacketBalanceLogs:edit']"
+          >修改</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['company:companyRedPacketBalanceLogs:remove']"
+          >删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改企业红包余额记录对话框 -->
+    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="企业ID" prop="companyId">
+          <el-input v-model="form.companyId" placeholder="请输入企业ID" />
+        </el-form-item>
+        <el-form-item label="金额" prop="money">
+          <el-input v-model="form.money" placeholder="请输入金额" />
+        </el-form-item>
+        <el-form-item label="备注" prop="remark">
+          <el-input v-model="form.remark" placeholder="请输入备注" />
+        </el-form-item>
+        <el-form-item label="余额" prop="balance">
+          <el-input v-model="form.balance" placeholder="请输入余额" />
+        </el-form-item>
+        <el-form-item label="类型 字典字段" prop="logsType">
+          <el-select v-model="form.logsType" placeholder="请选择类型 字典字段">
+            <el-option
+              v-for="dict in logsTypeOptions"
+              :key="dict.dictValue"
+              :label="dict.dictLabel"
+              :value="parseInt(dict.dictValue)"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { listCompanyRedPacketBalanceLogs, getCompanyRedPacketBalanceLogs, delCompanyRedPacketBalanceLogs, addCompanyRedPacketBalanceLogs, updateCompanyRedPacketBalanceLogs, exportCompanyRedPacketBalanceLogs } from "@/api/company/companyRedPacketBalanceLogs";
+import { getCompanyList } from '@/api/company/company'
+
+export default {
+  name: "CompanyRedPacketBalanceLogs",
+  data() {
+    return {
+      companys:[], // 公司列表
+      // 遮罩层
+      loading: true,
+      // 导出遮罩层
+      exportLoading: false,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 企业红包余额记录表格数据
+      companyRedPacketBalanceLogsList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 创建时间时间范围
+      daterangeCreateTime: [],
+      // 类型 字典字段字典
+      logsTypeOptions: [],
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        logsId: null,
+        companyId: null,
+        createTime: null,
+        logsType: null,
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+      }
+    };
+  },
+  created() {
+
+    this.getDicts("company_red_packet_balance_type").then(response => {
+      this.logsTypeOptions = response.data;
+    });
+    getCompanyList().then(response => {
+      this.companys = response.data;
+    });
+    this.getList();
+
+  },
+  methods: {
+    /** 查询企业红包余额记录列表 */
+    getList() {
+      this.loading = true;
+      this.queryParams.params = {};
+      if (null != this.daterangeCreateTime && '' != this.daterangeCreateTime) {
+        this.queryParams.params["beginCreateTime"] = this.daterangeCreateTime[0];
+        this.queryParams.params["endCreateTime"] = this.daterangeCreateTime[1];
+      }
+      listCompanyRedPacketBalanceLogs(this.queryParams).then(response => {
+        this.companyRedPacketBalanceLogsList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        logsId: null,
+        companyId: null,
+        money: null,
+        remark: null,
+        createTime: null,
+        balance: null,
+        logsType: null,
+        status: 0
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.daterangeCreateTime = [];
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.logsId)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加企业红包余额记录";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const logsId = row.logsId || this.ids
+      getCompanyRedPacketBalanceLogs(logsId).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改企业红包余额记录";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.logsId != null) {
+            updateCompanyRedPacketBalanceLogs(this.form).then(response => {
+              this.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addCompanyRedPacketBalanceLogs(this.form).then(response => {
+              this.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const logsIds = row.logsId || this.ids;
+      this.$confirm('是否确认删除企业红包余额记录编号为"' + logsIds + '"的数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          return delCompanyRedPacketBalanceLogs(logsIds);
+        }).then(() => {
+          this.getList();
+          this.msgSuccess("删除成功");
+        }).catch(() => {});
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      const queryParams = this.queryParams;
+      this.$confirm('是否确认导出所有企业红包余额记录数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(() => {
+          this.exportLoading = true;
+          return exportCompanyRedPacketBalanceLogs(queryParams);
+        }).then(response => {
+          this.download(response.msg);
+          this.exportLoading = false;
+        }).catch(() => {});
+    }
+  }
+};
+</script>

+ 25 - 3
src/views/components/course/userCourseCatalogDetails.vue

@@ -93,6 +93,12 @@
       <el-table-column label="红包金额" align="center" prop="redPacketMoney"/>
       <el-table-column label="排序" align="center" prop="courseSort"/>
       <el-table-column label="上传时间" align="center" prop="createTime"/>
+      <el-table-column label="是否上架" align="center" prop="isOnPut">
+        <template slot-scope="{ row }">
+          <el-tag v-if="row.isOnPut == 0">是</el-tag>
+          <el-tag type="danger" v-if="row.isOnPut == 1">否</el-tag>
+        </template>
+      </el-table-column>
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
         <template slot-scope="scope">
           <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
@@ -183,7 +189,7 @@
           <el-input-number v-model="form.redPacketMoney" :min="0.1" :max="200" :step="0.1"></el-input-number>
         </el-form-item>
          <!-- v-if="!!form.randomRedPacketRulesArr" -->
-        <el-form-item label="随机红包金额"  >
+        <el-form-item v-if="!!enableRandomRedPacket" label="随机红包金额"  >
           <template >
           <div v-for="(rule, index) in form.randomRedPacketRulesArr" :key="index" class="form-row">
            <el-form-item
@@ -275,6 +281,18 @@
             <el-radio :label="0">否</el-radio>
           </el-radio-group>
         </el-form-item>
+        <el-form-item label="是否启用倍速" prop="isSpeed">
+          <el-radio-group v-model="form.isSpeed">
+            <el-radio :label="1">是</el-radio>
+            <el-radio :label="0">否</el-radio>
+          </el-radio-group>
+        </el-form-item>
+        <el-form-item label="是否上架" prop="isOnPut">
+          <el-radio-group v-model="form.isOnPut">
+            <el-radio :label="0">上架</el-radio>
+            <el-radio :label="1">下架</el-radio>
+          </el-radio-group>
+        </el-form-item>
         <el-form-item label="商品选择" v-if="form.isProduct === 1">
           <el-button size="small" type="primary" @click="chooseCourseProduct">选取商品</el-button>
           <el-table border width="100%" style="margin-top:5px;" :data="form.courseProducts">
@@ -621,6 +639,7 @@ export default {
       openVideoSort: false,
       // 表单参数
       form: {
+        isOnPut: 0,
         courseProducts: [],
         randomRedPacketRules:null,
         randomRedPacketRulesArr:[
@@ -1022,6 +1041,8 @@ export default {
         transcodeFileKey: null,
         isProduct: 0,
         isFirst: 0,
+        isSpeed: 0,
+        isOnPut: 0,
         listingStartTime: null,
         listingEndTime: null,
         randomRedPacketRules:null,
@@ -1086,11 +1107,13 @@ export default {
     /** 修改按钮操作 */
     handleUpdate(row) {
       this.reset();
+      this.form.isOnPut=row.isOnPut
       this.packageList = [];
       const videoId = row.videoId || this.ids
       getUserCourseVideo(videoId).then(response => {
         console.log(response);
         this.form = response.data;
+        this.$set(this.form, 'isOnPut', response.data.isOnPut !== undefined ? response.data.isOnPut : 0);
         if(!!this.form.randomRedPacketRules){
            this.$set(this.form, 'randomRedPacketRulesArr', JSON.parse(this.form.randomRedPacketRules)) ;
           // this.form.randomRedPacketRulesArr = JSON.parse(this.form.randomRedPacketRules);
@@ -1174,7 +1197,6 @@ export default {
             let rulesJson = JSON.stringify(this.form.randomRedPacketRulesArr);
             this.form.randomRedPacketRules =  rulesJson;
           }
-
           if (this.form.videoId != null) {
             updateUserCourseVideo(this.form).then(response => {
               this.msgSuccess("修改成功");
@@ -1258,7 +1280,7 @@ export default {
         return syncTemplate(courseId);
       }).then(() => {
         this.getList();
-        this.msgSuccess("同步成功");
+        this.msgSuccess("正在同步模板中!!请稍后!");
       }).catch(() => {
       });
     },

+ 25 - 13
src/views/components/his/storeOrderDetails.vue

@@ -6,7 +6,8 @@
 <div class="contentx" v-if="item!=null">
   <div class="desct"></div>
 <div class="order-status" v-if="item!=null" >
-          <el-steps  :active="item.status==4?item.status:item.status-1" align-center finish-status="success">
+         <!-- 7为金牛药师待确认状态-->
+          <el-steps  :active="item.status==7?1:(item.status==4?item.status:item.status-1)" align-center finish-status="success">
             <el-step title="待支付"></el-step>
             <el-step title="待发货"></el-step>
             <el-step title="待收货"></el-step>
@@ -303,6 +304,8 @@
                          <el-option key="JD"  label="京东" value="JD" />
                          <el-option key="DBL"  label="德邦" value="DBL" />
 						              <el-option key="YD"  label="韵达" value="YD" />
+                         <el-option key="JTSD"  label="极兔" value="JTSD" />
+                         <el-option key="YTO"  label="圆通" value="YTO" />
                        </el-select>
                      </el-form-item>
                     <el-form-item label="物流单号" prop="deliverySn"  >
@@ -351,7 +354,7 @@
                       v-model="payMoney"
                       :precision="2"
                       :step="0.1"
-                      disabled   
+                      disabled
                     />
                   </el-form-item>
                   <el-form-item label="物流代收金额">
@@ -446,7 +449,7 @@
                 >
                 <el-table border v-if="refundShowProd!=null" :data="refundShowProd" ref="refundTable" size="small"  @selection-change="handleSelectionChange">
                   <el-table-column type="selection" width="55" align="center" />
-                  
+
                   <el-table-column label="商品编码" width="110" align="center">
                     <template slot-scope="scope">
                       <p>{{ JSON.parse(scope.row.jsonInfo).barCode }}</p>
@@ -467,10 +470,10 @@
 
                   <el-table-column label="退款单价" width="200" align="center">
                     <template slot-scope="scope">
-                      <el-input-number 
-                        v-model="scope.row.money" 
-                        :precision="2" 
-                        :step="0.1" 
+                      <el-input-number
+                        v-model="scope.row.money"
+                        :precision="2"
+                        :step="0.1"
                         :min="0"
                         size="mini"
                       />
@@ -479,17 +482,17 @@
 
                   <el-table-column label="退款数量" width="200" align="center">
                     <template slot-scope="scope">
-                      <el-input-number 
-                        v-model="scope.row.num" 
-                        :min="0" 
-                        :max="scope.row.originNum"   
+                      <el-input-number
+                        v-model="scope.row.num"
+                        :min="0"
+                        :max="scope.row.originNum"
                         size="mini"
                       />
                     </template>
                   </el-table-column>
 
                 </el-table>
-               
+
                 <div style="margin-top:10px;">
                   合计退款金额:
                   <span style="color:red; font-weight:bold;">
@@ -707,6 +710,15 @@ import {getCitys} from "@/api/store/city";
             });
 
     },
+    watch: {
+      'editForm.status': function(newVal, oldVal) {
+        if (newVal == 2) {
+          // 状态改为待发货时,物流状态设置为"暂无轨迹信息"(值0)
+          this.editForm.deliveryType = "";
+          this.editForm.deliveryStatus = "0"; // 对应"暂无轨迹信息"
+        }
+      }
+    },
     computed: {
        // 应收金额 = 实收金额 + 代收金额
       payPrice() {
@@ -1067,7 +1079,7 @@ import {getCitys} from "@/api/store/city";
         } else {
           this.refund(); //正常退款
         }
-        
+
       },
       submitRefundForm(){
         if(this.refundForm.refundAmount<=0){

+ 2 - 0
src/views/components/his/storeOrderDetails2.vue

@@ -298,8 +298,10 @@
                         <el-option key="SF"  label="顺丰" value="SF" />
                         <el-option key="EMS"  label="邮政" value="EMS" />
                          <el-option key="ZTO"  label="中通" value="ZTO" />
+                         <el-option key="STO"  label="申通" value="STO" />
                          <el-option key="JD"  label="京东" value="JD" />
                          <el-option key="DBL"  label="德邦" value="DBL" />
+                         <el-option key="JTSD"  label="极兔" value="JTSD" />
 						              <el-option key="YD"  label="韵达" value="YD" />
 						              <el-option key="STO"  label="申通" value="STO" />
                        </el-select>

+ 78 - 22
src/views/course/courseAnswerlogs/index.vue

@@ -1,15 +1,37 @@
 <template>
   <div class="app-container">
     <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="120px">
-      <el-form-item label="销售公司" prop="companyId">
-        <el-select filterable v-model="queryParams.companyId" clearable placeholder="请选择公司名" size="small">
-          <el-option
-            v-for="item in companys"
-            :key="item.companyId"
-            :label="item.companyName"
-            :value="item.companyId"
-          />
-        </el-select>
+<!--      <el-form-item label="销售公司" prop="companyId">-->
+<!--        <el-select filterable v-model="queryParams.companyId" clearable placeholder="请选择公司名" size="small">-->
+<!--          <el-option-->
+<!--            v-for="item in companys"-->
+<!--            :key="item.companyId"-->
+<!--            :label="item.companyName"-->
+<!--            :value="item.companyId"-->
+<!--          />-->
+<!--        </el-select>-->
+<!--      </el-form-item>-->
+      <el-form-item label="会员id" prop="userId">
+        <el-input
+          v-model="queryParams.userId"
+          placeholder="请输入会员id"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="公司名" prop="companyId">
+        <select-tree
+          v-model="selectedCompanyList"
+          :raw-data="deptList"
+          placeholder="请选择销售"
+          :parentSelectable="true"
+          :multiple="true"
+          component-width="300px"
+          :max-display-tags="3"
+          :check-strictly="false"
+          :return-leaf-only="false"
+        ></select-tree>
       </el-form-item>
       <el-form-item label="客户电话" prop="phone">
         <el-input
@@ -79,8 +101,8 @@
         </el-select>
       </el-form-item>
       <el-form-item label="创建时间" prop="createTime">
-        <el-date-picker v-model="createTime" size="small" style="width: 220px" value-format="yyyy-MM-dd"
-                        type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" @change="timeChange"></el-date-picker>
+        <el-date-picker v-model="createTime" size="small" style="width: 220px" value-format="yyyy-MM-dd HH:mm:ss"
+                        type="datetimerange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" @change="timeChange"></el-date-picker>
 
       </el-form-item>
       <el-form-item>
@@ -106,6 +128,7 @@
 
     <el-table border v-loading="loading" :data="logsList" @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="小程序会员id" align="center" prop="userId" />
       <el-table-column label="小程序用户名" align="center" prop="userName" />
       <el-table-column label="课程名称" align="center" prop="courseName" />
       <el-table-column label="小节名称" align="center" prop="videoName" />
@@ -135,13 +158,19 @@
 import { listLogs, getLogs, delLogs, addLogs, updateLogs, exportLogs } from "@/api/course/courseAnswerlogs";
 import { courseList, videoList } from '@/api/course/courseRedPacketLog'
 import { getCompanyList } from '@/api/company/company'
+import SelectTree from '@/components/TreeSelect/index.vue'
+import { getDeptData } from '@/api/system/employeeStats'
 
 export default {
   name: "Logs",
+  components: { SelectTree },
   data() {
     return {
+
+      selectedCompanyList: [],
+      deptList: [],
       // 遮罩层
-      loading: true,
+      loading: false,
       // 导出遮罩层
       exportLoading: false,
       // 选中数组
@@ -173,9 +202,11 @@ export default {
       open: false,
       // 查询参数
       queryParams: {
+        logId:null,
         pageNum: 1,
         pageSize: 10,
         phone: null,
+        userId: null,
         phoneMk: null,
         courseId: null,
         videoId: null,
@@ -196,31 +227,45 @@ export default {
   },
   created() {
 
+
+    getDeptData().then(response => {
+      this.deptList = response.data;
+    })
+
     courseList().then(response => {
       this.courseLists = response.list;
     });
 
     getCompanyList().then(response => {
       this.companys = response.data;
-      if(this.companys!=null&&this.companys.length>0){
-        this.companyId=this.companys[0].companyId;
-        this.getTreeselect();
-      }
+      // if(this.companys!=null&&this.companys.length>0){
+      //   this.companyId=this.companys[0].companyId;
+      //   this.getTreeselect();
+      // }
       this.companys.push({companyId:"-1",companyName:"无"})
     });
     this.getDicts("sys_company_or").then(response => {
       this.sysCompanyOr = response.data;
     });
-    this.getList();
+
+    // this.getList();
 
   },
   methods: {
     /** 查询答题日志列表 */
     getList() {
       this.loading = true;
+
+      if(this.selectedCompanyList != null && this.selectedCompanyList.length > 0) {
+        this.queryParams.companyUserIds = this.selectedCompanyList;
+      }else {
+        this.queryParams.companyUserIds = [];
+      }
+
+
       listLogs(this.queryParams).then(response => {
-        this.logsList = response.rows;
-        this.total = response.total;
+        this.logsList = response.data.list;
+        this.total = response.data.total;
         this.loading = false;
       });
     },
@@ -342,12 +387,23 @@ export default {
           cancelButtonText: "取消",
           type: "warning"
         }).then(() => {
-          this.exportLoading = true;
-          return exportLogs(queryParams);
+
+        const loadingInstance = this.$loading({
+          lock: true,
+          text: '正在导出数据,请稍候...',
+          background: 'rgba(0, 0, 0, 0.7)'
+        });
+
+        this.exportLoading = true;
+        return exportLogs(queryParams).finally(res=>{
+          loadingInstance.close();
+        });
         }).then(response => {
           this.download(response.msg);
           this.exportLoading = false;
-        }).catch(() => {});
+        }).catch(() => {}).finally(res=>{
+          this.exportLoading = false;
+      });
     }
   }
 };

+ 43 - 11
src/views/course/courseFinishTemp/index.vue

@@ -1,15 +1,28 @@
 <template>
   <div class="app-container">
     <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
-      <el-form-item label="销售公司" prop="companyId">
-        <el-select filterable  v-model="queryParams.companyId" clearable placeholder="请选择公司名" size="small">
-          <el-option
-            v-for="item in companys"
-            :key="item.companyId"
-            :label="item.companyName"
-            :value="item.companyId"
-          />
-        </el-select>
+<!--      <el-form-item label="销售公司" prop="companyId">-->
+<!--        <el-select filterable  v-model="queryParams.companyId" clearable placeholder="请选择公司名" size="small">-->
+<!--          <el-option-->
+<!--            v-for="item in companys"-->
+<!--            :key="item.companyId"-->
+<!--            :label="item.companyName"-->
+<!--            :value="item.companyId"-->
+<!--          />-->
+<!--        </el-select>-->
+<!--      </el-form-item>-->
+      <el-form-item label="公司名" prop="companyId">
+        <select-tree
+          v-model="selectedCompanyList"
+          :raw-data="deptList"
+          placeholder="请选择销售"
+          :parentSelectable="true"
+          :multiple="true"
+          component-width="300px"
+          :max-display-tags="3"
+          :check-strictly="false"
+          :return-leaf-only="false"
+        ></select-tree>
       </el-form-item>
       <el-form-item label="模板名称" prop="name">
         <el-input
@@ -123,6 +136,8 @@
       <el-table-column label="小节名称" align="center" prop="videoName"/>
       <el-table-column label="创建时间" align="center" prop="createTime"/>
       <el-table-column label="修改时间" align="center" prop="updateTime"/>
+      <el-table-column label="创建人" align="center" prop="createByName"/>
+      <el-table-column label="创建部门" align="center" prop="createByDeptName"/>
       <el-table-column label="全选销售" align="center" prop="isAllCompanyUser">
         <template slot-scope="scope">
           <dict-tag :options="allowSelect" :value="scope.row.isAllCompanyUser"/>
@@ -460,12 +475,16 @@ import {getAllUserlist} from '@/api/company/companyUser'
 import {courseList, videoList} from '@/api/qw/sop'
 import ImageUpload from "@/views/qw/sop/ImageUpload.vue";
 import { getCompanyList } from "@/api/company/company";
+import SelectTree from '@/components/TreeSelect/index.vue'
+import { getDeptData } from '@/api/system/employeeStats'
 
 export default {
   name: "CourseFinishTemp",
-  components: {ImageUpload},
+  components: { SelectTree, ImageUpload},
   data() {
     return {
+      selectedCompanyList: [],
+      deptList: [],
       //上传语音的遮罩层
       voiceLoading: false,
       uploadUrl: process.env.VUE_APP_BASE_API + "/common/uploadOSS2",
@@ -534,7 +553,10 @@ export default {
     };
   },
   created() {
-    this.getList();
+    getDeptData().then(response => {
+      this.deptList = response.data;
+    })
+
 
     getCompanyList().then(response => {
       this.companys = response.data;
@@ -558,6 +580,8 @@ export default {
     courseList().then(response => {
       this.courseList = response.list;
     });
+
+    this.getList();
   },
   methods: {
     courseChange() {
@@ -569,6 +593,13 @@ export default {
     /** 查询完课模板列表 */
     getList() {
       this.loading = true;
+
+      if(this.selectedCompanyList != null && this.selectedCompanyList.length > 0) {
+        this.queryParams.userIds = this.selectedCompanyList;
+      }else {
+        this.queryParams.userIds = [];
+      }
+
       listCourseFinishTemp(this.queryParams).then(response => {
         this.courseFinishTempList = response.rows;
         this.total = response.total;
@@ -744,6 +775,7 @@ export default {
     /** 重置按钮操作 */
     resetQuery() {
       this.resetForm("queryForm");
+      this.selectedCompanyList=[];
       this.handleQuery();
     },
     // 多选框选中数据

+ 159 - 1
src/views/course/coursePlaySourceConfig/index.vue

@@ -166,6 +166,7 @@
           </el-tag>
         </template>
       </el-table-column>
+      <el-table-column label="配置绑定Id" align="center" prop="merchantConfigId" />
       <el-table-column label="创建时间" align="center" prop="createTime" />
       <el-table-column label="修改时间" align="center" prop="updateTime" />
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
@@ -190,6 +191,22 @@
             icon="el-icon-setting"
             @click="handleSwitchConfig(scope.row)"
           >是否展示销售</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleBind(scope.row)"
+            v-hasPermi="['course:playSourceConfig:bind']"
+            v-if="!scope.row.merchantConfigId"
+          >绑定</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUnbind(scope.row)"
+            v-hasPermi="['course:playSourceConfig:unbind']"
+            v-if="scope.row.merchantConfigId"
+          >解绑</el-button>
         </template>
       </el-table-column>
     </el-table>
@@ -322,19 +339,67 @@
       </div>
     </el-dialog>
 
+    <!-- 绑定  -->
+    <el-dialog :title="bindForm.bindTitle" :visible.sync="bindForm.bindShow" width="800px" append-to-body :before-close="handleBindClose">
+      <el-form ref="bindForm" :model="bindForm" :rules="bindRules" label-width="130px">
+        <el-form-item label="商户类型" prop="merchantType">
+          <el-select v-model="bindForm.merchantType" placeholder="请选择商户类型" clearable size="small" @change="changeSysPayModes">
+            <el-option
+              v-for="dict in sysPayModes"
+              :key="dict.dictValue"
+              :label="dict.dictLabel"
+              :value="dict.dictValue"
+            />
+          </el-select>
+        </el-form-item>
+        <el-form-item label="商户号" prop="merchantId">
+          <el-select v-model="bindForm.id" placeholder="请选择商户号" clearable size="small">
+            <el-option
+              v-for="dict in merchantAppConfigList"
+              :key="dict.id"
+              :label="dict.merchantId"
+              :value="dict.id"
+            />
+          </el-select>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitFormBind(bindCurrentRow)" >确 定</el-button>
+        <el-button @click="cancelBind">取 消</el-button>
+      </div>
+    </el-dialog>
+
   </div>
 </template>
 
 <script>
-import {list, get, update, add, del} from '@/api/course/coursePlaySourceConfig'
+import {
+  list,
+  get,
+  update,
+  add,
+  del,
+  updateBindConfig,
+  updateUnbindConfig
+} from '@/api/course/coursePlaySourceConfig'
 import {updateIsTownOn} from "@/api/system/config";
 import { allList } from '@/api/company/company'
 import { resetForm } from '@/utils/common'
+import { listMerchantAppConfig } from "@/api/merchantAppConfig/merchantAppConfig";
 
 export default {
   name: 'CoursePlaySourceConfig',
   data() {
     return {
+      sysPayModes: [],
+      bindCurrentRow: {},
+      bindForm:{
+        bindTitle: '绑定支付配置',
+        bindShow: false,
+        merchantType: null,
+        id:null,
+      },
+      merchantAppConfigList:[],
       switchDialogVisible: false,
       // 公司搜索相关
       companySearchLoading: false,
@@ -406,6 +471,14 @@ export default {
       form: {
         setCompanyIdList: []
       },
+      bindRules:{
+        merchantType: [
+          { required: true, message: "商户类型不能为空", trigger: "blur" }
+        ],
+        id: [
+          { required: true, message: "商户号不能为空", trigger: "blur" }
+        ]
+      },
       rules: {
         name: [
           { required: true, message: "名称不能为空", trigger: "blur" }
@@ -441,6 +514,9 @@ export default {
     }
   },
   created() {
+    this.getDicts("sys_pay_mode").then(response => {
+      this.sysPayModes = response.data;
+    });
     this.getDicts("play_source_type").then(response => {
       this.typesOptions = response.data.map(item =>  {
         return {
@@ -461,7 +537,89 @@ export default {
       this.companyOptions = [];
       this.open = false;
     },
+    handleUnbind(row) {
+      this.$confirm('是否确认解绑该配置?', "警告", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(() => {
+        const params = {
+          id: row.id
+        };
+        updateUnbindConfig(params).then(response => {
+          if (response.code === 200) {
+            this.msgSuccess("解绑成功");
+            this.getList();
+          } else {
+            this.msgError("解绑失败: " + response.msg);
+          }
+        }).catch(error => {
+          this.msgError("请求失败: " + error.message);
+        });
+      }).catch(() => {
+        // 用户取消操作
+      });
+    }
+    ,
+    submitFormBind(row) {
+      this.$refs["bindForm"].validate(valid => {
+        if (valid) {
+          // 构造请求参数
+          const params = {
+            id: row.id,  // 使用传入行数据的ID
+            merchantType: this.bindForm.merchantType,
+            merchantConfigId: this.bindForm.id
+          };
 
+          // 调用API更新绑定关系
+          updateBindConfig(params).then(response => {
+            if (response.code === 200) {
+              this.msgSuccess("绑定配置更新成功");
+              this.bindForm.bindShow = false;
+              this.getList(); // 刷新列表数据
+              this.resetForm("bindForm");
+            } else {
+              this.msgError("更新失败: " + response.msg);
+            }
+          }).catch(error => {
+            this.msgError("请求失败: " + error.message);
+          });
+        }
+      });
+    },
+    handleBindClose(done) {
+      this.resetForm("bindForm");
+      this.bindForm.bindShow = false;
+      this.bindForm.id = null;
+      done();
+    },
+    cancelBind(){
+      this.resetForm("bindForm");
+
+      this.bindForm.bindShow = false;  // 关闭对话框
+
+    },
+    // 绑定支付配置
+    handleBind(row) {
+      this.merchantAppConfigList= [];
+      this.bindForm.merchantType = null;
+      this.bindForm.id = null;
+      this.bindCurrentRow = row;  // 保存当前行数据
+      this.bindForm.bindShow = true;
+    },
+    changeSysPayModes(value){
+      console.log(value)
+      const query = {
+        pageNum: 1,
+        pageSize: 100,
+        merchantType: value,
+        isDeleted: 0
+      }
+      listMerchantAppConfig(query).then( response => {
+          this.merchantAppConfigList = response.rows;
+        }
+      )
+    },
 
     // 处理开关配置
     handleSwitchConfig(row) {

+ 168 - 45
src/views/course/courseRedPacketLog/index.vue

@@ -1,30 +1,53 @@
 <template>
   <div class="app-container">
     <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
-		<el-form-item label="公司名" prop="companyId">
-		     <el-select filterable  v-model="queryParams.companyId" placeholder="请选择公司名"  clearable size="small">
-		         <el-option
-		           v-for="item in companys"
-		           :key="item.companyId"
-		           :label="item.companyName"
-		           :value="item.companyId"
-		         />
-		   </el-select>
-		 </el-form-item>
+<!--		<el-form-item label="公司名" prop="companyId">-->
+<!--		     <el-select filterable  v-model="queryParams.companyId" placeholder="请选择公司名"  clearable size="small">-->
+<!--		         <el-option-->
+<!--		           v-for="item in companys"-->
+<!--		           :key="item.companyId"-->
+<!--		           :label="item.companyName"-->
+<!--		           :value="item.companyId"-->
+<!--		         />-->
+<!--		   </el-select>-->
+<!--		 </el-form-item>-->
+      <el-form-item label="公司名" prop="companyId">
+        <select-tree
+          v-model="selectedCompanyList"
+          :raw-data="deptList"
+          placeholder="请选择销售"
+          :parentSelectable="true"
+          :multiple="true"
+          component-width="300px"
+          :max-display-tags="3"
+          :check-strictly="false"
+          :return-leaf-only="false"
+        ></select-tree>
+      </el-form-item>
+<!--    <el-form-item label="部门" prop="type">-->
+<!--      <TreeselectVue-->
+<!--        style="width: 220px"-->
+<!--        :clearable="false"-->
+<!--        v-model="queryParams.deptId"-->
+<!--        :options="deptOptions"-->
+<!--        clearable-->
+<!--        :show-count="true"-->
+<!--        placeholder="请选择归属部门"-->
+<!--      />-->
+<!--    </el-form-item>-->
 		<el-form-item label="员工" prop="companyUserName">
 		  <el-input
 		    v-model="queryParams.companyUserName"
-		    placeholder="员工"
+		    placeholder="所属员工"
 		    clearable
 		    size="small"
 		    @keyup.enter.native="handleQuery"
 		  />
 		</el-form-item>
-
-      <el-form-item label="用户ID" prop="userId">
+      <el-form-item label="会员ID" prop="userId">
         <el-input
           v-model="queryParams.userId"
-          placeholder="请输入用户ID"
+          placeholder="请输入会员ID"
           clearable
           size="small"
           @keyup.enter.native="handleQuery"
@@ -49,6 +72,28 @@
 	      @keyup.enter.native="handleQuery"
 	    />
 	  </el-form-item>
+
+      <el-form-item label="营期" prop="courseId">
+        <el-select
+          v-model="queryParams.periodId"
+          placeholder="请选择课程"
+          filterable
+          clearable
+          size="small"
+          remote
+          :remote-method="remoteMethod"
+          :loading="loadingPeriod"
+          @focus="handleFocus"
+        >
+          <el-option
+            v-for="dict in periodLists"
+            :key="dict.periodId"
+            :label="dict.periodName"
+            :value="parseInt(dict.periodId)"
+          />
+        </el-select>
+      </el-form-item>
+
 		<el-form-item label="课程" prop="courseId">
 		     <el-select filterable  v-model="queryParams.courseId" placeholder="请选择课程"  clearable size="small" @change="courseChange(queryParams.courseId)">
 		         <el-option
@@ -70,7 +115,7 @@
      </el-select>
 	</el-form-item>
 	 <el-form-item label="创建时间" prop="createTime">
-	           <el-date-picker v-model="createTime" size="small" style="width: 220px" value-format="yyyy-MM-dd" type="daterange"
+	           <el-date-picker v-model="createTime" size="small" style="width: 220px" value-format="yyyy-MM-dd HH:mm:ss" type="daterange"
                              range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" @change="change"></el-date-picker>
 	 </el-form-item>
 
@@ -101,8 +146,9 @@
     </el-tabs>
     <el-table border v-loading="loading" :data="courseRedPacketLogList" @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
-      <el-table-column label="记录编号" align="center" prop="logId" />
+<!--      <el-table-column label="记录编号" align="center" prop="logId" />-->
       <el-table-column label="批次单号" align="center" prop="outBatchNo" />
+      <el-table-column label="营期名称" align="center" prop="periodName" />
       <el-table-column label="课程名称" align="center" prop="courseId" >
         <template slot-scope="scope">
           <span prop="status" v-for="(item, index) in courseLists"    v-if="scope.row.courseId==item.dictValue">{{item.dictLabel}}</span>
@@ -110,9 +156,11 @@
       </el-table-column>
       <el-table-column label="小节名称" align="center" prop="title" />
       <el-table-column label="会员id" align="center" prop="userId" />
+      <el-table-column label="会员名称" align="center" prop="fsNickName" />
       <el-table-column label="会员电话" align="center" prop="phone" />
-      <el-table-column label="所属销售" align="center" prop="companyUserName" />
+      <el-table-column label="所属员工" align="center" prop="companyUserName" />
       <el-table-column label="所属公司" align="center" prop="companyName" />
+      <el-table-column label="员工部门" align="center" prop="deptName" />
       <el-table-column label="转帐金额" align="center" prop="amount" />
       <el-table-column label="状态" align="center" prop="status" >
         <template slot-scope="scope">
@@ -138,14 +186,14 @@
         <el-form-item label="课程id" prop="courseId">
           <el-input v-model="form.courseId" placeholder="请输入课程id" />
         </el-form-item>
-        <el-form-item label="用户id" prop="userId">
-          <el-input v-model="form.userId" placeholder="请输入用户id" />
+        <el-form-item label="会员id" prop="userId">
+          <el-input v-model="form.userId" placeholder="请输入会员id" />
         </el-form-item>
         <el-form-item label="小节id" prop="videoId">
           <el-input v-model="form.videoId" placeholder="请输入小节id" />
         </el-form-item>
-        <el-form-item label="公司员工id" prop="companyUserId">
-          <el-input v-model="form.companyUserId" placeholder="请输入公司员工id" />
+        <el-form-item label="员工id" prop="companyUserId">
+          <el-input v-model="form.companyUserId" placeholder="请输入员工id" />
         </el-form-item>
         <el-form-item label="公司id" prop="companyId">
           <el-input v-model="form.companyId" placeholder="请输入公司id" />
@@ -166,17 +214,24 @@
 </template>
 
 <script>
-import { courseList,videoList,listCourseRedPacketLog, getCourseRedPacketLog, delCourseRedPacketLog, addCourseRedPacketLog, updateCourseRedPacketLog, exportCourseRedPacketLog } from "@/api/course/courseRedPacketLog";
+import { courseList,videoList,getCourseRedPacketLog, delCourseRedPacketLog, addCourseRedPacketLog, updateCourseRedPacketLog, exportCourseRedPacketLog,listCourseRedPacketLogPage } from "@/api/course/courseRedPacketLog";
 import { getCompanyList } from "@/api/company/company";
+import { periodList } from "@/api/course/userCoursePeriod";
+import {treeselect} from "../../../api/company/companyDept";
+import SelectTree from '@/components/TreeSelect/index.vue'
+import { getDeptData } from '@/api/system/employeeStats'
 
 export default {
   name: "CourseRedPacketLog",
+  components: {SelectTree},
   data() {
     return {
 	  companys:[],
-	  deptOptions:[],
+    selectedCompanyList: [],
+    deptList: [],
       // 遮罩层
       loading: true,
+      loadingPeriod: false,
       // 导出遮罩层
       exportLoading: false,
       // 选中数组
@@ -189,6 +244,7 @@ export default {
       showSearch: true,
       activeName:"00",
       courseLists:[],
+      periodLists:[],
       videoList:[],
       // 总条数
       total: 0,
@@ -198,6 +254,10 @@ export default {
       title: "",
       // 是否显示弹出层
       open: false,
+      queryPeriod: {
+        pageNum: 1,
+        pageSize: 20
+      },
       // 查询参数
       queryParams: {
         pageNum: 1,
@@ -214,6 +274,7 @@ export default {
         phoneMk: null,
         sTime:null,
         eTime:null,
+        userIds: null
       },
 	   createTime:null,
       // 表单参数
@@ -231,22 +292,75 @@ export default {
 	  courseList().then(response => {
 	    this.courseLists = response.list;
 	  });
+    getDeptData().then(response => {
+      this.deptList = response.data;
+    })
+    periodList(this.queryPeriod).then(response => {
+	    this.periodLists = response.data;
+	  });
+
+    // this.getList();
   },
   methods: {
-	  handleClick(tab, event) {
+    // 远程搜索方法
+    async remoteMethod(query) {
+      this.searchKeyword = query
+      if (query !== '') {
+        this.loadingPeriod = true
+        await this.getPeriodList(query)
+        this.loadingPeriod = false
+      } else {
+        // 如果输入为空,可以清空列表或加载默认数据
+        this.periodLists = []
+      }
+    },
+
+    // 获取营期列表
+    async getPeriodList(keyword = '') {
+      try {
+        const params = {
+          periodName: keyword, // 搜索关键词
+          pageNum: 1,
+          pageSize: 50 // 根据需求调整
+        }
+
+        const response = await periodList(params)
+        this.periodLists = response.data.list || response.data || []
+      } catch (error) {
+        console.error('获取营期列表失败:', error)
+        this.periodLists = []
+      }
+    },
+    // 下拉框获取焦点时加载数据
+    async handleFocus() {
+      if (this.periodLists.length === 0) {
+        this.getPeriodList();
+      }
+    },
+
+
+    handleClick(tab, event) {
 	    this.activeName=tab.name;
-	    this.queryParams.status=tab.name
-	    console.log(this.queryParams.status)
-	    this.getList();
+      if(tab.name == "00") {
+        this.queryParams.status = null;
+      } else {
+        this.queryParams.status = tab.name;
+      }
+        this.getList();
 	  },
     /** 查询短链课程看课记录列表 */
     getList() {
       this.loading = true;
-      listCourseRedPacketLog(this.queryParams).then(response => {
-        this.courseRedPacketLogList = response.rows;
-        this.total = response.total;
+      if(this.selectedCompanyList != null && this.selectedCompanyList.length > 0) {
+        this.queryParams.userIds = this.selectedCompanyList;
+      }else {
+        this.queryParams.userIds = [];
+      }
+      listCourseRedPacketLogPage(this.queryParams).then(response => {
+        this.courseRedPacketLogList = response.data.list;
+        this.total = response.data.total;
         this.loading = false;
-      });
+      })
     },
 	change(){
 	      if(this.createTime!=null){
@@ -259,7 +373,6 @@ export default {
 
 	    },
 	courseChange(row){
-
 		if(row==""){
 			this.videoList=[]
 			this.queryParams.videoId=null
@@ -302,6 +415,10 @@ export default {
 	   this.createTime=null;
 	  this.queryParams.sTime=null;
 	  this.queryParams.eTime=null;
+      this.selectedCompanyList = [];
+      this.queryParams.pageNum = 1;    // Reset to first page
+      this.queryParams.pageSize = 10;  // Reset to default page size
+	  this.queryParams.periodId=null;
       this.handleQuery();
     },
     // 多选框选中数据
@@ -360,30 +477,36 @@ export default {
           this.msgSuccess("删除成功");
         }).catch(() => {});
     },
-	getSubCateList(pid){
-	  this.form.subCateId=null;
-	  if(pid == ''){
-	    this.subCategoryOptions=[];
-	    return
-	  }
-	  getCateListByPid(pid).then(response => {
-	    this.subCategoryOptions = response.data;
-	  });
-	},
     /** 导出按钮操作 */
     handleExport() {
+      if(this.selectedCompanyList != null && this.selectedCompanyList.length > 0) {
+        this.queryParams.userIds = this.selectedCompanyList;
+      }else {
+        this.queryParams.userIds = [];
+      }
       const queryParams = this.queryParams;
       this.$confirm('是否确认导出所有短链课程看课记录数据项?', "警告", {
           confirmButtonText: "确定",
           cancelButtonText: "取消",
           type: "warning"
         }).then(() => {
-          this.exportLoading = true;
-          return exportCourseRedPacketLog(queryParams);
+        const loadingInstance = this.$loading({
+          lock: true,
+          text: '正在导出数据,请稍候...',
+          background: 'rgba(0, 0, 0, 0.7)'
+        });
+
+        this.exportLoading = true;
+          // return exportCourseRedPacketLog(queryParams);
+        return exportCourseRedPacketLog(queryParams).finally(res=>{
+          loadingInstance.close();
+        })
         }).then(response => {
           this.download(response.msg);
           this.exportLoading = false;
-        }).catch(() => {});
+        }).catch(() => {}).finally(res=>{
+
+      });
     }
   }
 };

+ 42 - 6
src/views/course/courseTrafficLog/index.vue

@@ -52,12 +52,13 @@
       <el-form-item>
         <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
-        <el-button type="warning" plain icon="el-icon-download" size="mini" :loading="exportLoading" @click="handleExport" >导出</el-button>
+        <el-button type="warning" plain icon="el-icon-download" size="mini" :loading="exportLoading" @click="handleExport" v-hasPermi="['course:courseTrafficLog:export']" >导出</el-button>
       </el-form-item>
     </el-form>
 
     <!-- 表格 -->
-    <el-table border v-loading="loading" :data="courseTrafficLogList" @selection-change="handleSelectionChange">
+    <el-table border v-loading="loading" :data="courseTrafficLogList" @selection-change="handleSelectionChange"
+              show-summary :summary-method="getSummaries">
       <el-table-column type="selection" width="55" align="center" />
       <!-- 公司列 -->
       <el-table-column label="公司" align="center" prop="companyName" v-if="activeTab === 'all' || activeTab === 'company'" />
@@ -158,7 +159,7 @@ export default {
   created() {
     // 初始化为当天日期
     this.initTodayDate();
-    
+
     courseList().then(res => this.courseLists = res.list);
     this.getDicts("sys_course_project").then(res => this.projectOptions = res.data);
     this.getAllCompany();
@@ -169,17 +170,51 @@ export default {
     initTodayDate() {
       const yesterday = new Date();
       yesterday.setDate(yesterday.getDate() - 1); // 减去1天,得到昨天
-      
+
       const year = yesterday.getFullYear();
       const month = String(yesterday.getMonth() + 1).padStart(2, '0');
       const day = String(yesterday.getDate()).padStart(2, '0');
       const yesterdayStr = `${year}-${month}-${day}`;
-      
+
       this.timeRange = [yesterdayStr, yesterdayStr];
       this.queryParams.startDate = yesterdayStr;
       this.queryParams.endDate = yesterdayStr;
     },
-    
+
+
+    getSummaries(param) {
+      const { columns, data } = param
+      const sums = []
+
+      columns.forEach((column, index) => {
+        if (index === 0) {
+          // 第一列显示"总计"
+          sums[index] = '总计'
+          return
+        }
+
+        // 如果是流量列
+        if (column.property === 'totalInternetTraffic' ||
+          (column.label === '使用流量' && !column.property)) {
+          const values = data.map(item => Number(item.totalInternetTraffic) || 0)
+          if (!values.every(value => isNaN(value))) {
+            const total = values.reduce((prev, curr) => {
+              const value = Number(curr)
+              return prev + (isNaN(value) ? 0 : value)
+            }, 0)
+            sums[index] = this.formatTrafficData(total)
+          } else {
+            sums[index] = 'N/A'
+          }
+        } else {
+          // 其他列留空
+          sums[index] = ''
+        }
+      })
+
+      return sums
+    },
+
     handleTabClick(tab) {
       this.queryParams.tabType = tab.name;
       this.queryParams.pageNum = 1;
@@ -214,6 +249,7 @@ export default {
       });
     },
     handleQuery() {
+      this.queryParams.tabType = this.activeTab
       this.queryParams.pageNum = 1;
       this.getList();
     },

+ 65 - 5
src/views/course/courseTrafficLog/statistics.vue

@@ -27,8 +27,8 @@
           @change="handleDateData"
         ></el-date-picker>
       </el-form-item>
-     
-    
+
+
       <el-form-item>
         <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
@@ -48,10 +48,11 @@
       </el-col>
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
-    
+
 
     <!-- 表格 -->
-    <el-table border v-loading="loading" :data="courseTrafficLogList" @selection-change="handleSelectionChange">
+    <el-table border v-loading="loading" :data="courseTrafficLogList" @selection-change="handleSelectionChange"
+              show-summary :summary-method="getSummaries">
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column label="公司" align="center" prop="companyName" />
       <el-table-column v-if="showDept" label="部门" align="center" prop="deptName" />
@@ -61,7 +62,6 @@
       <el-table-column label="金额" align="center" prop="totalAmount">
       </el-table-column>
     </el-table>
-
     <!-- 分页 -->
     <pagination
       v-show="total > 0"
@@ -155,6 +155,66 @@ export default {
     this.getList();
   },
   methods: {
+
+    getSummaries(param) {
+      // 原有的汇总方法
+      const { columns, data } = param;
+      const sums = [];
+
+      columns.forEach((column, index) => {
+        if (index === 0) {
+          sums[index] = '总计';
+          return;
+        }
+
+        if (column.property === 'formattedTotalTraffic') {
+          sums[index] = this.getTotalTraffic();
+        } else if (column.property === 'totalAmount') {
+          sums[index] = '¥' + this.getTotalAmount();
+        } else {
+          sums[index] = '';
+        }
+      });
+
+      return sums;
+    },
+
+
+    // 计算总流量(不四舍五入)
+    getTotalTraffic() {
+      if (!this.courseTrafficLogList || this.courseTrafficLogList.length === 0) {
+        return '0';
+      }
+      let total = 0;
+
+      // 方法B:从格式化字符串中提取数值(如果formattedTotalTraffic类似 "1.23GB")
+      total = this.courseTrafficLogList.reduce((sum, item) => {
+        // 移除非数字字符,只保留数字和小数点
+        if (item.formattedTotalTraffic) {
+          const numStr = item.formattedTotalTraffic.replace(/[^\d.]/g, '');
+          return sum + parseFloat(numStr || 0);
+        }
+        return sum;
+      }, 0);
+
+      // 保留所有小数,不四舍五入
+      return total.toFixed(10).replace(/\.?0+$/, '');
+    },
+
+    // 计算总金额(不四舍五入)
+    getTotalAmount() {
+      if (!this.courseTrafficLogList || this.courseTrafficLogList.length === 0) {
+        return '0';
+      }
+
+      const total = this.courseTrafficLogList.reduce((sum, item) => {
+        return sum + (parseFloat(item.totalAmount) || 0);
+      }, 0);
+
+      // 保留两位小数,不四舍五入
+      return Math.floor(total * 100) / 100;
+    },
+
     handleTabClick(tab) {
       this.queryParams.tabType = tab.name;
       this.queryParams.pageNum = 1;

+ 45 - 4
src/views/course/courseWatchLog/qw/statistics.vue

@@ -50,6 +50,21 @@
       </el-form-item>
     </el-form>
 
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          :loading="exportLoading"
+          @click="handleStatisExport"
+          v-hasPermi="['course:courseWatchLog:statisticsExport']"
+        >导出</el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
     <el-table v-if="'济南联志健康' == this.signProjectName" border v-loading="loading" :data="courseWatchLogList" @selection-change="handleSelectionChange"  show-summary :summary-method="getSummaries">
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column label="企微员工名称" align="center" prop="qwUserName" />
@@ -96,7 +111,18 @@
 </template>
 
 <script>
-import { listCourseWatchLog, getCourseWatchLog, delCourseWatchLog, addCourseWatchLog, updateCourseWatchLog, exportCourseWatchLog,statisticsList,getSignProjectName } from "@/api/course/qw/courseWatchLog";
+import {
+  listCourseWatchLog,
+  getCourseWatchLog,
+  delCourseWatchLog,
+  addCourseWatchLog,
+  updateCourseWatchLog,
+  exportCourseWatchLog,
+  statisticsList,
+  getSignProjectName,
+  exportCourseWatchLogStatisticsExport,
+  exportCourseWatchLogStatisticsExportQw
+} from '@/api/course/qw/courseWatchLog'
 import { courseList,videoList } from '@/api/course/courseRedPacketLog'
 import {getCompanyList} from "@/api/company/company";
 export default {
@@ -179,20 +205,35 @@ export default {
     });
   },
   methods: {
-   getSummaries(param) {
+
+    handleStatisExport(){
+      const queryParams = this.queryParams;
+      this.$confirm('是否确认导出所有会员看课统计数据项?', "警告", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(() => {
+        this.exportLoading = true;
+        return exportCourseWatchLogStatisticsExportQw(queryParams);
+      }).then(response => {
+        this.download(response.msg);
+        this.exportLoading = false;
+      }).catch(() => {});
+    },
+    getSummaries(param) {
         const { columns, data } = param;
         const sums = [];
          // 关键改动:创建一个不包含最后一行的新数据数组
         // 如果数据长度大于1,则截取掉最后一行;否则,使用空数组避免错误
         const dataToSum = data.length > 1 ? data.slice(0, -1) : [];
         columns.forEach((column, index) => {
-          
+
           if (index === 0) {
             sums[index] = '页总计';
             return;
           }
           const values = dataToSum.map(item => Number(item[column.property]));
-          
+
           if (!values.every(value => isNaN(value))) {
             sums[index] = values.reduce((prev, curr) => {
               const value = Number(curr);

+ 40 - 1
src/views/course/courseWatchLog/statistics.vue

@@ -75,6 +75,21 @@
       </el-form-item>
     </el-form>
 
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          :loading="exportLoading"
+          @click="handleStatisExport"
+          v-hasPermi="['course:courseWatchLog:statisticsExport']"
+        >导出</el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
     <el-table
       border
       v-loading="loading"
@@ -106,7 +121,16 @@
 </template>
 
 <script>
-import { listCourseWatchLog, getCourseWatchLog, delCourseWatchLog, addCourseWatchLog, updateCourseWatchLog, exportCourseWatchLog,statisticsList } from "@/api/course/courseWatchLog";
+import {
+  listCourseWatchLog,
+  getCourseWatchLog,
+  delCourseWatchLog,
+  addCourseWatchLog,
+  updateCourseWatchLog,
+  exportCourseWatchLog,
+  statisticsList,
+  exportCourseWatchLogStatisticsExport
+} from '@/api/course/courseWatchLog'
 import { courseList,videoList } from '@/api/course/courseRedPacketLog'
 import {getUserList} from "@/api/company/companyUser";
 import {getFsUserList} from "@/api/users/user";
@@ -421,6 +445,21 @@ export default {
         this.exportLoading = false;
       }).catch(() => {});
     },
+
+    handleStatisExport(){
+      const queryParams = this.queryParams;
+      this.$confirm('是否确认导出所有会员看课统计数据项?', "警告", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(() => {
+        this.exportLoading = true;
+        return exportCourseWatchLogStatisticsExport(queryParams);
+      }).then(response => {
+        this.download(response.msg);
+        this.exportLoading = false;
+      }).catch(() => {});
+    },
     handleScheduleTimeChange(val) {
       if (val) {
         this.queryParams.scheduleStartTime = val[0];

+ 2 - 2
src/views/course/fsCourseProductOrder/index.vue

@@ -167,7 +167,7 @@
       </el-table-column>
       <el-table-column label="支付时间" align="center" prop="payTime" width="180">
         <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.payTime, '{y}-{m}-{d}') }}</span>
+          <span>{{ parseTime(scope.row.payTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
         </template>
       </el-table-column>
       <el-table-column label="订单状态" align="center" prop="status">
@@ -181,7 +181,7 @@
       </el-table-column>
       <el-table-column label="申请退款时间" align="center" prop="refundTime" width="180">
         <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.refundTime, '{y}-{m}-{d}') }}</span>
+          <span>{{ parseTime(scope.row.refundTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
         </template>
       </el-table-column>
       <el-table-column label="申请退款理由" :show-overflow-tooltip="true" align="center" prop="refundExplain" />

+ 3 - 1
src/views/course/userCourse/index.vue

@@ -114,7 +114,8 @@
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
-    <el-table height="600" border v-loading="loading" :data="userCourseList" @selection-change="handleSelectionChange" style="width: 100%" :fit="true">
+<!--    <el-table height="600" border v-loading="loading" :data="userCourseList" @selection-change="handleSelectionChange" style="width: 100%" :fit="true">-->
+    <el-table max-height="600" border v-loading="loading" :data="userCourseList" @selection-change="handleSelectionChange" style="width: 100%" :fit="true">
       <el-table-column type="selection" width="55" align="center"/>
       <el-table-column label="课程ID" align="center" prop="courseId" width="55"/>
       <el-table-column label="所属项目" align="center" prop="projectName" width="120"/>
@@ -855,6 +856,7 @@ export default {
     /** 重置按钮操作 */
     resetQuery() {
       this.resetForm("queryForm");
+      this.queryParams.companyIdsList = [];
       this.queryParams.isShow = this.activeName
       this.handleQuery();
     },

+ 3 - 2
src/views/course/userCourse/public.vue

@@ -662,9 +662,10 @@ export default {
     },
     handleShow(row) {
       var isShowValue = row.isShow === 0 ? 1 : 0;
-      var course = {courseId: row.courseId, isShow: isShowValue};
+      var course = {courseId: row.courseId, isShow: isShowValue, isPrivate: row.isPrivate};
       updateIsShow(course).then(response => {
-        this.msgSuccess("修改成功");
+        var isShowText = isShowValue === 1 ? "上架成功" : "下架成功";
+        this.msgSuccess(isShowText);
         this.getList();
       });
     },

+ 18 - 1
src/views/course/userCoursePeriod/statistics.vue

@@ -48,6 +48,7 @@
         </el-form-item>
         <el-form-item>
           <el-button type="primary" @click="handleQuery">查询</el-button>
+          <el-button type="info" :loading="exportLoading" @click="exportHandle">导出</el-button>
         </el-form-item>
       </el-form>
 
@@ -140,7 +141,7 @@
 </template>
 
 <script>
-import {getDays, periodCountSelect, getPeriodCompanyList} from "@/api/course/userCoursePeriod";
+import {getDays, periodCountSelect, getPeriodCompanyList,exportInfo} from "@/api/course/userCoursePeriod";
 
 export default {
   name: "CourseStatistics",
@@ -156,6 +157,7 @@ export default {
   },
   data() {
     return {
+      exportLoading: false,
       // 遮罩层
       loading: false,
       courseLoading: false,
@@ -300,6 +302,21 @@ export default {
       this.getCountList();
     },
 
+    /** 导出 */
+    exportHandle(){
+      this.$confirm('是否确认导出所有课程统计信息数据项?', "警告", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(() => {
+        this.exportLoading = true;
+        return exportInfo(this.queryParams);
+      }).then(response => {
+        this.download(response.msg);
+        this.exportLoading = false;
+      }).catch(() => {});
+    },
+
     /** 获取列表数据 */
     getCountList() {
       this.loading = true;

+ 162 - 37
src/views/course/videoResource/index.vue

@@ -552,7 +552,7 @@
           </el-form-item>
 
           <el-form-item label="子分类" prop="typeSubId" :rules="[{ required: true, message: '请选择子分类', trigger: 'blur' }]">
-            <el-select v-model="batchUploadForm.typeSubId" clearable placeholder="请选择子分类" style="width: 100%">
+            <el-select v-model="batchUploadForm.typeSubId" clearable placeholder="请选择子分类" style="width: 100%" @change="changeSubType">
               <el-option
                 v-for="item in subTypeList"
                 :key="item.dictValue"
@@ -562,7 +562,7 @@
             </el-select>
           </el-form-item>
 
-          <el-form-item label="关联题目" prop="projectIds" style="display: none">
+          <el-form-item label="关联题目" prop="projectIds" v-show="currentProject === 'myhk'">
             <el-select
               ref="customSelect"
               class="custom-select-class"
@@ -776,7 +776,9 @@ import {getByIds, listCourseQuestionBank} from '@/api/course/courseQuestionBank'
 import {getThumbnail} from "@/api/course/userVideo";
 import {uploadObject} from "@/utils/cos.js";
 import {uploadToOBS} from "@/utils/obs.js";
+import {uploadToHSY} from "@/utils/hsy.js";
 import MinimizableDialog from "@/components/MinimizableDialog"
+import log from "@/views/monitor/job/log.vue";
 
 export default {
   name: 'VideoResource',
@@ -829,6 +831,8 @@ export default {
         typeSubId: null,
         projectIds: [],
         sort: null,
+        hsyVid:null,//火山云上传视频返回vid
+        hsyVodUrl:null,//火山云url
         // 新增上传状态字段
         uploadStatus: 'pending', // pending, uploading, success, failed
         uploadProgress: {
@@ -947,6 +951,7 @@ export default {
       isProcessingBatch: false, // 是否正在处理批次
       currentBatchIndex: 0, // 当前批次索引
       uploadCancellationTokens: new Map(), // Store cancellation functions by video ID
+      currentProject: process.env.VUE_APP_PROJECT
     }
   },
   watch: {
@@ -1127,6 +1132,7 @@ export default {
           this.add = true
 
           const params = Object.assign({}, this.form);
+          console.log("提交素材表单参数",this.form)
           params.projectIds = this.form.projectIds.join(',');
           if (this.form.id != null) {
             updateVideoResource(params).then(response => {
@@ -1182,6 +1188,9 @@ export default {
       }
       if (type === 3) {
         this.batchUploadForm.typeSubId = null
+        if (this.currentProject === 'myhk') {
+          this.batchUploadForm.projectIds = []
+        }
       }
       this.subTypeList = []
       if (!val) {
@@ -1191,6 +1200,25 @@ export default {
         this.subTypeList = response.data
       })
     },
+    changeSubType(val) {
+      if (this.currentProject !== 'myhk') {
+        return
+      }
+      this.projectShowList = []
+      this.batchUploadForm.projectIds = []
+      listCourseQuestionBank({questionSubType: val}).then(async response => {
+        const projectIds = response.rows.map(item => item.id)
+
+        // 如果存在关联项目,获取项目详情用于回显
+        if (projectIds && projectIds.length > 0) {
+          // 加载项目列表信息用于回显
+          await getByIds({ids: projectIds.join(',')}).then(reponse => {
+            this.projectShowList = reponse.data
+            this.batchUploadForm.projectIds = projectIds
+          });
+        }
+      })
+    },
     /** 预览视频 */
     handleVideoPreview(url) {
       this.videoPreviewVisible = true;
@@ -1321,37 +1349,95 @@ export default {
       }
     },
     //上传华为云Obs
-    async uploadVideoToHwObs(file, form, onProgress) {
+    // async uploadVideoToHwObs(file, form, onProgress) {
+    //   try {
+    //     // 更新线路2状态为上传中
+    //     this.updateUploadProgress('line2Status', 'uploading');
+    //
+    //     const data = await uploadToOBS(file, (progress) => {
+    //       const progressPercent = Math.floor(progress);
+    //       this.updateUploadProgress('line2', progressPercent);
+    //       const progressEvent = { percent: progressPercent, loaded: progress, total: progress, lengthComputable: true };
+    //       onProgress(progressEvent);
+    //     }, 1, (uploadInfo) => {
+    //       if (form.tempId) {
+    //         const tokens = this.uploadCancellationTokens.get(form.tempId) || {};
+    //         tokens.obs = uploadInfo.cancel;
+    //         this.uploadCancellationTokens.set(form.tempId, tokens);
+    //       }
+    //     });
+    //
+    //     form.line2 = `${process.env.VUE_APP_VIDEO_LINE_2}/${data.urlPath}`;
+    //
+    //     // 更新线路2状态为成功
+    //     this.updateUploadProgress('line2Status', 'success');
+    //     this.updateUploadProgress('line2', 100);
+    //
+    //     this.$message.success("线路二上传成功");
+    //     return { success: true, url: form.line2 };
+    //   } catch (error) {
+    //     // 更新线路2状态为失败
+    //     this.updateUploadProgress('line2Status', 'failed');
+    //     this.$message.error("线路二上传失败");
+    //     return { success: false, error: error.message };
+    //   }
+    // },
+    //上传火山云
+    async uploadVideoToHsy(file, form, onProgress) {
       try {
-        // 更新线路2状态为上传中
         this.updateUploadProgress('line2Status', 'uploading');
 
-        const data = await uploadToOBS(file, (progress) => {
-          const progressPercent = Math.floor(progress);
-          this.updateUploadProgress('line2', progressPercent);
-          const progressEvent = { percent: progressPercent, loaded: progress, total: progress, lengthComputable: true };
-          onProgress(progressEvent);
-        }, 1, (uploadInfo) => {
-          if (form.tempId) {
-            const tokens = this.uploadCancellationTokens.get(form.tempId) || {};
-            tokens.obs = uploadInfo.cancel;
-            this.uploadCancellationTokens.set(form.tempId, tokens);
-          }
-        });
+        const data = await uploadToHSY(
+          file,
+          (progress) => {
+            // 火山云的进度是小数0-1
+            if (typeof progress.percent === 'number') {
+              const percent = Math.floor(progress.percent * 100);
+
+              // 更新线路2进度
+              this.updateUploadProgress('line2', percent);
+
+              // 对外统一 progress 事件(模拟 xhr)
+              onProgress?.({
+                percent,
+                loaded: percent,
+                total: 100,
+                lengthComputable: true
+              });
+            }
 
-        form.line2 = `${process.env.VUE_APP_VIDEO_LINE_2}/${data.urlPath}`;
+            // 状态同步(成功 / 失败)
+            if (progress.status === 'success') {
+              this.updateUploadProgress('line2Status', 'success');
+              this.updateUploadProgress('line2', 100);
+            }
 
-        // 更新线路2状态为成功
-        this.updateUploadProgress('line2Status', 'success');
-        this.updateUploadProgress('line2', 100);
+            if (progress.status === 'failed') {
+              this.updateUploadProgress('line2Status', 'failed');
+            }
+          },
+          1,
+          (uploadInfo) => {
+            if (form.tempId) {
+              const tokens = this.uploadCancellationTokens.get(form.tempId) || {};
+              tokens.hsy = uploadInfo.cancel;
+              this.uploadCancellationTokens.set(form.tempId, tokens);
+            }
+          }
+        );
+        console.log("上传火山云返回参数",data)
 
-        this.$message.success("线路二上传成功");
+        form.line2 = `${process.env.VUE_APP_VIDEO_URL}/${data.SourceInfo.FileName}`;
+        this.form.hsyVid = data.Vid
+        this.form.hsyVodUrl = process.env.VUE_APP_VIDEO_URL+"/"+data.SourceInfo.FileName
+        console.log("this.form",this.form)
+        this.$message.success('线路二上传成功');
         return { success: true, url: form.line2 };
+
       } catch (error) {
-        // 更新线路2状态为失败
         this.updateUploadProgress('line2Status', 'failed');
-        this.$message.error("线路二上传失败");
-        return { success: false, error: error.message };
+        this.$message.error('线路二上传失败');
+        return { success: false, error: error?.message || 'upload failed' };
       }
     },
     // 更新上传进度的辅助方法
@@ -1388,7 +1474,8 @@ export default {
         await this.getFirstThumbnail(file, this.form);
         const [line1Result, line2Result] = await Promise.allSettled([
           this.uploadVideoToTxPcdn(file, this.form, options.onProgress),
-          this.uploadVideoToHwObs(file, this.form, options.onProgress)
+          //this.uploadVideoToHwObs(file, this.form, options.onProgress)
+          this.uploadVideoToHsy(file, this.form, options.onProgress)
         ]);
 
         const line1Success = line1Result.status === 'fulfilled' && line1Result.value.success;
@@ -1490,6 +1577,7 @@ export default {
     },
     /** 批量修改 */
     submitBatchUpdate() {
+      console.log("批量上传表单提交参数",this.form)
       this.$refs["form"].validate(valid => {
         if (valid) {
           if (this.batchUpdateForm.ids.length === 0) {
@@ -1523,6 +1611,7 @@ export default {
       }
 
       // 检查是否所有选中的视频都已上传完成
+      console.log("videoList",this.videoList)
       const incompleteVideos = this.videoList.filter(item => (item.progress || 0) < 100);
       if (incompleteVideos.length > 0) {
         this.$message.warning('有未完成上传的视频,请先完成上传');
@@ -1681,14 +1770,23 @@ export default {
     /** 显示上传面板 */
     showUploadPanel() {
       this.showUpload = true;
-      this.batchUploadForm = {
-        typeId: null,
-        typeSubId: null,
-        projectIds: [],
-        files: []
-      };
+
+      if (this.currentProject === 'myhk') {
+        this.batchUploadForm = {
+          ...this.batchUploadForm,
+          files: []
+        };
+      } else {
+        this.batchUploadForm = {
+          typeId: null,
+          typeSubId: null,
+          projectIds: [],
+          files: []
+        };
+        this.subTypeList = []
+      }
+
       this.batchFileList = [];
-      this.subTypeList = []
       if (this.$refs.batchVideoUpload) {
         this.$refs.batchVideoUpload.clearFiles();
       }
@@ -1796,6 +1894,7 @@ export default {
       this.isProcessingBatch = false;
       this.isUploading = false;
       this.$message.success('所有视频上传队列处理完成!');
+      console.log("批量上传form",this.form)
     },
 
     async uploadSingleVideo(tempVideo) {
@@ -1806,7 +1905,9 @@ export default {
         // 并行上传到两个服务器
         const [line1Result, line2Result] = await Promise.allSettled([
           this.uploadVideoToTxPcdnBatch(tempVideo.file, tempVideo),
-          this.uploadVideoToHwObsBatch(tempVideo.file, tempVideo)
+          // this.uploadVideoToHwObsBatch(tempVideo.file, tempVideo)
+          this.uploadVideoToHSYBatch(tempVideo.file, tempVideo),
+
         ]);
 
         // 检查上传结果
@@ -2130,9 +2231,31 @@ export default {
       }
     },
     // 批量上传 - 华为云
-    async uploadVideoToHwObsBatch(file, tempVideo) {
+    // async uploadVideoToHwObsBatch(file, tempVideo) {
+    //   try {
+    //     const data = await uploadToOBS(file, (progress) => {
+    //       const progressPercent = Math.floor(progress);
+    //       const index = this.videoList.findIndex(item => item.tempId === tempVideo.tempId);
+    //       if (index !== -1) {
+    //         this.videoList[index].uploadDetails.line2 = progressPercent;
+    //         this.videoList[index].uploadDetails.line2Status = 'uploading';
+    //         this.updateBatchProgress(index);
+    //       }
+    //     }, 1, (uploadInfo) => {
+    //       const tokens = this.uploadCancellationTokens.get(tempVideo.tempId) || {};
+    //       tokens.obs = uploadInfo.cancel;
+    //       this.uploadCancellationTokens.set(tempVideo.tempId, tokens);
+    //     });
+    //
+    //     tempVideo.line2 = `${process.env.VUE_APP_VIDEO_LINE_2}/${data.urlPath}`;
+    //     return { success: true, url: tempVideo.line2 };
+    //   } catch (error) {
+    //     return { success: false, error: error.message };
+    //   }
+    // },
+    async uploadVideoToHSYBatch(file, tempVideo) {
       try {
-        const data = await uploadToOBS(file, (progress) => {
+        const data = await uploadToHSY(file, (progress) => {
           const progressPercent = Math.floor(progress);
           const index = this.videoList.findIndex(item => item.tempId === tempVideo.tempId);
           if (index !== -1) {
@@ -2145,9 +2268,11 @@ export default {
           tokens.obs = uploadInfo.cancel;
           this.uploadCancellationTokens.set(tempVideo.tempId, tokens);
         });
+        console.log("批量上传返回参数",data)
+        tempVideo.line2 = `${process.env.VUE_APP_VIDEO_URL}/${data.SourceInfo.FileName}`;
+        tempVideo.hsyVid = data.Vid;
 
-        tempVideo.line2 = `${process.env.VUE_APP_VIDEO_LINE_2}/${data.urlPath}`;
-        return { success: true, url: tempVideo.line2 };
+        return { success: true, url: tempVideo.line2};
       } catch (error) {
         return { success: false, error: error.message };
       }

+ 9 - 1
src/views/his/adv/index.vue

@@ -109,6 +109,7 @@
         </template>
       </el-table-column>
       <el-table-column label="地址" show-overflow-tooltip align="center" prop="advUrl" width="150px" />
+      <el-table-column label="跳转小程序原始id" show-overflow-tooltip align="center" prop="originalId" width="150px" />
 
       <el-table-column label="排序" align="center" prop="sort" />
       <el-table-column label="类型" align="center" prop="advType" width="130px">
@@ -199,6 +200,9 @@
        <el-form-item label="APP地址" prop="advUrl" v-if="form.showType==2||form.showType==4 ">
          <el-input v-model="form.appAdvUrl" placeholder="请输入APP地址" />
        </el-form-item>
+        <el-form-item label="跳转小程序原始id" prop="advUrl" v-if="form.showType==2||form.showType==4 ">
+          <el-input v-model="form.originalId" placeholder="请输入跳转小程序原始id" />
+        </el-form-item>
        <el-form-item label="文章内容" v-show="form.showType==3">
          <editor ref="myeditor" @on-text-change="updateText" />
        </el-form-item>
@@ -297,6 +301,9 @@ export default {
         showType: [
           { required: true, message: "显示类别不能为空", trigger: "blur" }
         ],
+        activeId: [
+          { required: true, message: "活动不能为空", trigger: "blur" }
+        ],
       }
     };
   },
@@ -368,7 +375,8 @@ export default {
         sort: null,
         advType: null,
         showType: null,
-        activeId: null
+        activeId: null,
+        originalId: null
       };
       this.resetForm("form");
     },

+ 13 - 7
src/views/his/company/index.vue

@@ -190,6 +190,7 @@
           >扣款
           </el-button>
           <el-button
+            v-if="showRedPacket"
             size="mini"
             type="text"
             icon="el-icon-edit"
@@ -198,6 +199,7 @@
           >红包充值
           </el-button>
           <el-button
+            v-if="showRedPacket"
             size="mini"
             type="text"
             icon="el-icon-edit"
@@ -773,6 +775,7 @@ export default {
         open: false,
         title: '红包充值'
       },
+      showRedPacket: false,
       // 遮罩层
       loading: true,
       // 导出遮罩层
@@ -949,13 +952,16 @@ export default {
     listDept().then(response => {
       this.deptOptions = response.data
     })
-    // getConfigByKey("courseMa.config").then(response => {
-    //   if(response.data && response.data.configValue) {
-    //     this.miniAppList = JSON.parse(response.data.configValue);
-    //   } else {
-    //     this.miniAppList = [];
-    //   }
-    // });
+    getConfigByKey("course.config").then(response => {
+      if(response.data && response.data.configValue) {
+        const  config = JSON.parse(response.data.configValue);
+        if( config.isRedPackageBalanceDeduction && config.isRedPackageBalanceDeduction==1){
+          this.showRedPacket=true
+        }
+      } else {
+        this.showRedPacket = false;
+      }
+    });
     docList().then(response => {
       this.doctor = response.rows
     })

+ 285 - 9
src/views/his/integralOrder/index.vue

@@ -1,14 +1,60 @@
 <template>
   <div class="app-container">
     <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
-      <el-form-item label="订单编号" prop="orderCode">
-        <el-input
-          v-model="queryParams.orderCode"
-          placeholder="请输入订单编号"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
+      <el-form-item label="订单编号" prop="orderCodes">
+        <div class="tag-input-container">
+          <!-- 标签显示区域 -->
+          <div class="tags-wrapper" @click="focusInput">
+            <!-- 已添加的订单号标签 -->
+            <el-tag
+              v-for="(code, index) in queryParams.orderCodes"
+              :key="index"
+              closable
+              size="small"
+              @close="removeOrderCode(index)"
+              class="order-tag"
+              :class="{ 'tag-error': false }"
+            >
+              {{ code }}
+            </el-tag>
+
+            <!-- 输入框 -->
+            <el-input
+              ref="tagInput"
+              v-model="currentInput"
+              v-show="inputVisible || queryParams.orderCodes.length === 0"
+              :placeholder="queryParams.orderCodes.length === 0 ? '请输入订单号,按回车或逗号分隔' : '继续输入...'"
+              size="small"
+              class="tag-input"
+              @keydown.native="handleKeyDown"
+              @keyup.native="handleKeyUp"
+              @blur="handleInputConfirm"
+              @focus="inputVisible = true"
+              clearable
+            />
+
+            <!-- 添加按钮(当没有输入时显示) -->
+            <el-button
+              v-if="!inputVisible && queryParams.orderCodes.length > 0"
+              class="button-new-tag"
+              size="small"
+              @click="showInput"
+              icon="el-icon-plus"
+              type="text"
+            >
+              添加订单号
+            </el-button>
+          </div>
+
+          <!-- 输入提示 -->
+          <div class="input-tips">
+            <span class="tip-text">
+              支持:回车、逗号、空格分隔 |
+              已添加 {{ queryParams.orderCodes.length }} 个订单号
+              <span v-if="maxOrderCodes > 0"> (最多{{ maxOrderCodes }}个)</span>
+            </span>
+          </div>
+        </div>
       </el-form-item>
       <el-form-item label="用户名称" prop="userName">
         <el-input
@@ -174,6 +220,20 @@
       <el-table-column label="ERP账号" align="center" prop="loginAccount" />
       <el-table-column label="ERP电话" align="center" prop="erpPhone" />
       <el-table-column label="订单编号" align="center" prop="orderCode" />
+      <el-table-column label="商品名称" align="center" width="200">
+        <template slot-scope="scope">
+          <div style="display: flex; align-items: center; justify-content: center;">
+            <span>{{ scope.row.goodsName }}</span>
+            <el-image
+              v-if="scope.row.goodsImage"
+              :src="scope.row.goodsImage"
+              style="width: 40px; height: 40px; margin-left: 8px;"
+              fit="cover"
+              :preview-src-list="[scope.row.goodsImage]"
+            />
+          </div>
+        </template>
+      </el-table-column>
       <el-table-column label="用户名称" align="center" prop="userName" />
       <el-table-column label="用户电话" align="center" prop="userPhone" />
       <el-table-column label="用户地址" align="center" prop="userAddress" show-overflow-tooltip />
@@ -528,6 +588,7 @@ export default {
         pageNum: 1,
         pageSize: 10,
         orderCode: null,
+        orderCodes: [], // 添加订单号数组
         userName: null,
         userPhone: null,
         integral: null,
@@ -541,6 +602,15 @@ export default {
         companyId:null,
         loginAccount: null  // 添加ERP账号筛选字段
       },
+      // 最大订单号数量限制
+      maxOrderCodes: {
+        type: Number,
+        default: 50
+      },
+      // 输入框是否可见
+      inputVisible: false,
+      // 当前输入值
+      currentInput: '',
        createTime:null,
       qwCompanyList:[],
       companyUserNameList:[],
@@ -691,10 +761,57 @@ export default {
     /** 查询积分商品订单列表 */
     getList() {
       this.loading = true;
+      
+      // 直接传递订单编号数组给后端
       listIntegralOrder(this.queryParams).then(response => {
-        this.integralOrderList = response.rows;
+        // 解析itemJson字段,提取goodsName和图片
+        const processedData = response.rows.map(item => {
+          let goodsName = '';
+          let goodsImage = '';
+          try {
+            if (item.itemJson) {
+              const itemData = JSON.parse(item.itemJson);
+              // 如果itemJson是数组格式,取第一个商品的名称和图片
+              if (Array.isArray(itemData) && itemData.length > 0) {
+                goodsName = itemData[0].goodsName || '';
+                // 提取图片,优先使用imgUrl,如果没有则使用images的第一张
+                if (itemData[0].imgUrl) {
+                  goodsImage = itemData[0].imgUrl;
+                } else if (itemData[0].images && itemData[0].images.split(',').length > 0) {
+                  goodsImage = itemData[0].images.split(',')[0];
+                }
+              }
+              // 如果itemJson是对象格式,直接取goodsName和图片
+              else if (itemData.goodsName) {
+                goodsName = itemData.goodsName;
+                // 提取图片,优先使用imgUrl,如果没有则使用images的第一张
+                if (itemData.imgUrl) {
+                  goodsImage = itemData.imgUrl;
+                } else if (itemData.images && itemData.images.split(',').length > 0) {
+                  goodsImage = itemData.images.split(',')[0];
+                }
+              }
+            }
+          } catch (error) {
+            console.error('解析itemJson失败:', error);
+            goodsName = '';
+            goodsImage = '';
+          }
+          
+          return {
+            ...item,
+            goodsName: goodsName,
+            goodsImage: goodsImage
+          };
+        });
+        
+        this.integralOrderList = processedData;
         this.total = response.total;
         this.loading = false;
+      }).catch(error => {
+        console.error('查询订单列表失败:', error);
+        this.loading = false;
+        this.$message.error('查询订单列表失败');
       });
     },
     // 取消按钮
@@ -739,6 +856,12 @@ export default {
       this.queryParams.qwUserId=null;
       this.queryParams.companyId=null;
       this.queryParams.companyUserId=null;
+      
+      // 清除订单号标签
+      this.queryParams.orderCodes = [];
+      this.currentInput = '';
+      this.inputVisible = false;
+      
       this.handleQuery();
 
     },
@@ -1093,6 +1216,159 @@ export default {
     submitOrderStatusFileForm(){
       this.$refs.uploadStatus.submit();
     },
+    // 处理键盘按下事件
+    handleKeyDown(event) {
+      const { key, target } = event
+      
+      // 处理退格键删除标签
+      if (key === 'Backspace' && !target.value && this.queryParams.orderCodes.length > 0) {
+        event.preventDefault()
+        this.removeOrderCode(this.queryParams.orderCodes.length - 1)
+      }
+      
+      // 处理分隔符
+      if ([',', ',', ' ', 'Enter'].includes(key)) {
+        event.preventDefault()
+        this.handleInputConfirm()
+      }
+    },
+
+    // 处理键盘抬起事件(实时分割输入)
+    handleKeyUp(event) {
+      const value = event.target.value
+      
+      // 检查是否包含分隔符
+      if (/[,,\s]/.test(value)) {
+        this.handleInputConfirm()
+      }
+    },
+
+    // 确认输入
+    handleInputConfirm() {
+      const inputValue = this.currentInput.trim()
+      
+      if (inputValue) {
+        // 分割多个订单号
+        const codes = inputValue.split(/[,,\s]+/).filter(code => code.trim())
+        
+        codes.forEach(code => {
+          this.addOrderCode(code.trim())
+        })
+      }
+      
+      this.currentInput = ''
+    },
+
+    // 添加订单号
+    addOrderCode(code) {
+      if (!code) return
+      
+      // 检查数量限制
+      if (this.maxOrderCodes > 0 && this.queryParams.orderCodes.length >= this.maxOrderCodes) {
+        this.$message.warning(`最多只能添加 ${this.maxOrderCodes} 个订单号`)
+        return
+      }
+      
+      // 检查重复
+      if (this.queryParams.orderCodes.includes(code)) {
+        this.$message.warning(`订单号 "${code}" 已存在`)
+        return
+      }
+      
+      // 添加到列表
+      this.queryParams.orderCodes.push(code)
+    },
+
+    // 删除订单号
+    removeOrderCode(index) {
+      this.queryParams.orderCodes.splice(index, 1)
+    },
+
+    // 显示输入框
+    showInput() {
+      this.inputVisible = true
+      this.$nextTick(() => {
+        this.$refs.tagInput.focus()
+      })
+    },
+    // 聚焦输入框
+    focusInput() {
+      if (!this.inputVisible) {
+        this.showInput()
+      }
+    },
   }
 };
 </script>
+
+<style scoped>
+.tag-input-container {
+  min-width: 445px;
+}
+
+.tags-wrapper {
+  min-height: 32px;
+  padding: 4px 8px;
+  border: 1px solid #dcdfe6;
+  border-radius: 4px;
+  cursor: text;
+  display: flex;
+  flex-wrap: wrap;
+  align-items: center;
+  gap: 4px;
+  transition: border-color 0.2s;
+}
+
+.tags-wrapper:hover {
+  border-color: #c0c4cc;
+}
+
+.tags-wrapper:focus-within {
+  border-color: #409eff;
+  box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.2);
+}
+
+.order-tag {
+  margin: 2px;
+  flex-shrink: 0;
+}
+
+.tag-error {
+  background-color: #fef0f0;
+  border-color: #fbc4c4;
+  color: #f56c6c;
+}
+
+.tag-input {
+  border: none;
+  outline: none;
+  flex: 1;
+  min-width: 120px;
+}
+
+.tag-input >>> .el-input__inner {
+  border: none;
+  padding: 0;
+  height: 24px;
+  line-height: 24px;
+}
+
+.button-new-tag {
+  height: 24px;
+  line-height: 22px;
+  padding: 0 8px;
+  margin: 2px;
+}
+
+.input-tips {
+  margin-top: 4px;
+  font-size: 12px;
+  color: #909399;
+}
+
+.tip-text {
+  display: flex;
+  align-items: center;
+  gap: 8px;
+}
+</style>

+ 738 - 0
src/views/his/merchantAppConfig/index.vue

@@ -0,0 +1,738 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+      <!--   主键ID   -->
+      <el-form-item label="主键ID" prop="id">
+        <el-input v-model="queryParams.id" placeholder="请输入主键ID" clearable size="small" @keyup.enter.native="handleQuery" />
+      </el-form-item>
+      <el-form-item label="商户类型" prop="merchantType">
+        <el-select v-model="queryParams.merchantType" placeholder="请选择商户类型" clearable size="small">
+          <el-option
+            v-for="dict in sysPayModes"
+            :key="dict.dictValue"
+            :label="dict.dictLabel"
+            :value="dict.dictValue"
+          />
+        </el-select>
+      </el-form-item>
+      <!--  商户号    -->
+      <el-form-item label="商户号" prop="merchantId">
+        <el-input v-model="queryParams.merchantId" placeholder="请输入商户号" clearable size="small" @keyup.enter.native="handleQuery" />
+      </el-form-item>
+<!--      <el-form-item label="应用ID" prop="appIds">-->
+<!--        <el-select-->
+<!--          v-model="queryParams.appIds"-->
+<!--          placeholder="请选择应用ID"-->
+<!--          clearable-->
+<!--          size="small"-->
+<!--        >-->
+<!--          <el-option-->
+<!--            v-for="dict in appIdOptions"-->
+<!--            :key="dict.appid"-->
+<!--            :label="dict.name"-->
+<!--            :value="dict.appid"-->
+<!--          />-->
+<!--        </el-select>-->
+<!--      </el-form-item>-->
+<!--      <el-form-item label="创建时间">-->
+<!--        <el-date-picker-->
+<!--          v-model="daterangeCreatedTime"-->
+<!--          size="small"-->
+<!--          style="width: 240px"-->
+<!--          value-format="yyyy-MM-dd"-->
+<!--          type="daterange"-->
+<!--          range-separator="-"-->
+<!--          start-placeholder="开始日期"-->
+<!--          end-placeholder="结束日期"-->
+<!--        ></el-date-picker>-->
+<!--      </el-form-item>-->
+      <el-form-item label="状态" prop="isDeleted">
+        <el-select v-model="queryParams.isDeleted" placeholder="请选择状态" clearable size="small">
+          <el-option
+            v-for="dict in isDeletedOptions"
+            :key="dict.dictValue"
+            :label="dict.dictLabel"
+            :value="dict.dictValue"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['merchantAppConfig:merchantAppConfig:add']"
+        >新增</el-button>
+      </el-col>
+<!--      <el-col :span="1.5">-->
+<!--        <el-button-->
+<!--          type="success"-->
+<!--          plain-->
+<!--          icon="el-icon-edit"-->
+<!--          size="mini"-->
+<!--          :disabled="single"-->
+<!--          @click="handleUpdate"-->
+<!--          v-hasPermi="['merchantAppConfig:merchantAppConfig:edit']"-->
+<!--        >修改</el-button>-->
+<!--      </el-col>-->
+<!--      <el-col :span="1.5">-->
+<!--        <el-button-->
+<!--          type="danger"-->
+<!--          plain-->
+<!--          icon="el-icon-delete"-->
+<!--          size="mini"-->
+<!--          :disabled="multiple"-->
+<!--          @click="handleDelete"-->
+<!--          v-hasPermi="['merchantAppConfig:merchantAppConfig:remove']"-->
+<!--        >删除</el-button>-->
+<!--      </el-col>-->
+<!--      <el-col :span="1.5">-->
+<!--        <el-button-->
+<!--          type="warning"-->
+<!--          plain-->
+<!--          icon="el-icon-download"-->
+<!--          size="mini"-->
+<!--          :loading="exportLoading"-->
+<!--          @click="handleExport"-->
+<!--          v-hasPermi="['merchantAppConfig:merchantAppConfig:export']"-->
+<!--        >导出</el-button>-->
+<!--      </el-col>-->
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table border v-loading="loading" :data="merchantAppConfigList" @selection-change="handleSelectionChange">
+<!--      <el-table-column type="selection" width="55" align="center" />-->
+      <el-table-column label="主键ID" align="center" prop="id" />
+      <el-table-column label="商户号" align="center" prop="merchantId" />
+      <el-table-column label="商户类型" align="center" prop="merchantType">
+        <template slot-scope="scope">
+          <dict-tag :options="sysPayModes" :value="scope.row.merchantType"/>
+        </template>
+      </el-table-column>
+
+      <!--   appId 转化 appIdOptions   -->
+      <el-table-column label="应用名称" align="center" prop="appId">
+        <template slot-scope="scope">
+          <span v-if="scope.row.appId">
+            {{ getAppNames(scope.row.appId) }}
+          </span>
+        </template>
+      </el-table-column>
+      <el-table-column label="应用ID" align="center" prop="appId">
+        <template slot-scope="scope">
+          <span>{{ scope.row.appId }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="回调地址" align="center" prop="callbackUrl" />
+      <el-table-column label="配置详情" align="center" prop="dataJson">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleView(scope.row)"
+          >详情</el-button>
+        </template>
+      </el-table-column>
+      <el-table-column label="创建时间" align="center" prop="createdTime" width="180">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.createdTime, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="修改时间" align="center" prop="updatedTime" width="180">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.updatedTime, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="状态" align="center" prop="isDeleted">
+        <template slot-scope="scope">
+          <dict-tag :options="isDeletedOptions" :value="scope.row.isDeleted"/>
+        </template>
+      </el-table-column>
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['merchantAppConfig:merchantAppConfig:edit']"
+          >修改</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['merchantAppConfig:merchantAppConfig:remove']"
+          >删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改商户应用配置对话框 -->
+    <el-dialog :title="title" :visible.sync="dialogVisible" width="800px" append-to-body>
+      <el-form ref="form" :model="form" :rules="!isViewMode ? rules : {}" label-width="160px" :disabled="isViewMode">
+        <el-form-item label="商户类型" prop="merchantType">
+          <el-select
+            v-model="form.merchantType"
+            placeholder="请选择商户类型"
+            :disabled="form.id !== null"
+            @change="handleMerchantTypeChange"
+          >
+            <el-option
+              v-for="dict in sysPayModes"
+              :key="dict.dictValue"
+              :label="dict.dictLabel"
+              :value="dict.dictValue"
+            />
+          </el-select>
+        </el-form-item>
+        <el-form-item label="应用ID" prop="appIds">
+          <el-select
+            v-model="form.appIds"
+            placeholder="请选择应用ID"
+            clearable
+            size="small"
+            multiple
+          >
+            <el-option
+              v-for="dict in appIdOptions"
+              :key="dict.appid"
+              :label="dict.name"
+              :value="dict.appid"
+            />
+          </el-select>
+        </el-form-item>
+        <el-form-item>
+          <el-divider></el-divider>
+        </el-form-item>
+
+
+        <!-- 动态渲染不同商户类型的配置表单 -->
+        <div v-if="form.merchantType">
+          <!-- 易宝支付配置 -->
+          <div v-if="form.merchantType === 'yb'">
+            <el-form-item label="易宝商户号" prop="ybAccount">
+              <el-input v-model="ybConfig.ybAccount" placeholder="请输入易宝商户号"></el-input>
+            </el-form-item>
+            <el-form-item label="易宝Key" prop="ybKey">
+              <el-input v-model="ybConfig.ybKey" placeholder="请输入易宝Key"></el-input>
+            </el-form-item>
+            <el-form-item label="易宝回调地址" prop="ybNotifyUrl">
+              <el-input v-model="ybConfig.ybNotifyUrl" placeholder="易宝回调地址"></el-input>
+            </el-form-item>
+          </div>
+
+          <!-- 台州银行配置 -->
+          <div v-else-if="form.merchantType === 'tz'">
+            <el-form-item label="台州商户号" prop="tzPlatMerCstNo">
+              <el-input v-model="tzConfig.tzPlatMerCstNo" placeholder="请输入台州商户号"></el-input>
+            </el-form-item>
+            <el-form-item label="台州appSecret" prop="tzAppSecret">
+              <el-input v-model="tzConfig.tzAppSecret" placeholder="请输入台州appSecret"></el-input>
+            </el-form-item>
+            <el-form-item label="台州私钥" prop="tzPrivateKey">
+              <el-input v-model="tzConfig.tzPrivateKey" placeholder="请输入台州私钥"></el-input>
+            </el-form-item>
+            <el-form-item label="台州平台公钥" prop="tzPlatformPublicKey">
+              <el-input v-model="tzConfig.tzPlatformPublicKey" placeholder="请输入台州平台公钥"></el-input>
+            </el-form-item>
+            <el-form-item label="台州appKey" prop="tzAppKey">
+              <el-input v-model="tzConfig.tzAppKey" placeholder="请输入台州appKey"></el-input>
+            </el-form-item>
+            <el-form-item label="台州支付回调地址" prop="tzPayDecrypt">
+              <el-input v-model="tzConfig.tzPayDecrypt" placeholder="请输入台州支付回调地址"></el-input>
+            </el-form-item>
+            <el-form-item label="退款回调地址" prop="tzRefundDecrypt">
+              <el-input v-model="tzConfig.tzRefundDecrypt" placeholder="请输入退款回调地址"></el-input>
+            </el-form-item>
+            <el-form-item label="分账回调地址" prop="tzOrderShareDecrypt">
+              <el-input v-model="tzConfig.tzOrderShareDecrypt" placeholder="请输入台州分账回调地址"></el-input>
+            </el-form-item>
+          </div>
+
+          <!-- 微信支付配置 -->
+            <div v-else-if="form.merchantType === 'wx'">
+            <el-form-item label="微信商户号" prop="wxMchId">
+              <el-input v-model="wxConfig.wxMchId" placeholder="请输入微信商户号"></el-input>
+            </el-form-item>
+            <el-form-item label="微信Key" prop="wxMchKey">
+              <el-input v-model="wxConfig.wxMchKey" placeholder="请输入微信Key"></el-input>
+            </el-form-item>
+            <el-form-item label="微信商户V3密钥" prop="wxApiV3Key">
+              <el-input v-model="wxConfig.wxApiV3Key" placeholder="请输入商户V3密钥"></el-input>
+            </el-form-item>
+            <el-form-item label="微信回调地址(scrm)" prop="notifyUrlScrm">
+              <el-input v-model="wxConfig.notifyUrlScrm" placeholder="请输入商城微信回调地址"></el-input>
+            </el-form-item>
+            <el-form-item label="p12证书路径" prop="keyPath">
+              <el-input v-model="wxConfig.keyPath" placeholder="请输入p12证书文件的绝对路径"></el-input>
+            </el-form-item>
+          </div>
+
+          <!-- 汇付支付配置 -->
+          <div v-else-if="form.merchantType === 'hf'">
+            <el-form-item label="汇付产品号" prop="hfProductId">
+              <el-input v-model="hfConfig.hfProductId" placeholder="汇付产品号"></el-input>
+            </el-form-item>
+            <el-form-item label="系统号" prop="hfSysId">
+              <el-input v-model="hfConfig.hfSysId" placeholder="系统号Key"></el-input>
+            </el-form-item>
+            <el-form-item label="商户号" prop="hfHuifuId">
+              <el-input v-model="hfConfig.huifuId" placeholder="商户号"></el-input>
+            </el-form-item>
+            <el-form-item label="商户私钥" prop="hfRsaPrivateKey">
+              <el-input v-model="hfConfig.hfRsaPrivateKey" placeholder="商户私钥"></el-input>
+            </el-form-item>
+            <el-form-item label="汇付公钥" prop="hfRsaPublicKey">
+              <el-input v-model="hfConfig.hfRsaPublicKey" placeholder="汇付公钥"></el-input>
+            </el-form-item>
+            <el-form-item label="汇付支付回调地址" prop="hfPayNotifyUrl">
+              <el-input v-model="hfConfig.hfPayNotifyUrl" placeholder="汇付支付回调地址"></el-input>
+            </el-form-item>
+            <el-form-item label="大额支付回调地址" prop="hfPayOnlineNotifyUrl">
+              <el-input v-model="hfConfig.hfPayOnlineNotifyUrl" placeholder="汇付支付回调地址"></el-input>
+            </el-form-item>
+            <el-form-item label="汇付退款回调地址" prop="hfRefundNotifyUrl">
+              <el-input v-model="hfConfig.hfRefundNotifyUrl" placeholder="汇付退款回调地址"></el-input>
+            </el-form-item>
+            <el-form-item label="汇付大额退款回调地址" prop="hfOnlineRefundNotifyUrl">
+              <el-input v-model="hfConfig.hfOnlineRefundNotifyUrl" placeholder="汇付分账回调地址"></el-input>
+            </el-form-item>
+          </div>
+        </div>
+      </el-form>
+
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm" v-if="!isViewMode">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+
+  </div>
+</template>
+
+<script>
+import { listMerchantAppConfig, getMerchantAppConfig, delMerchantAppConfig, addMerchantAppConfig, updateMerchantAppConfig, exportMerchantAppConfig } from "@/api/merchantAppConfig/merchantAppConfig";
+import { listAll } from "@/api/course/coursePlaySourceConfig";
+
+export default {
+  name: "MerchantAppConfig",
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 导出遮罩层
+      exportLoading: false,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 商户应用配置表格数据
+      merchantAppConfigList: [],
+      // 弹出层标题
+      title: "",
+      // 创建时间时间范围
+      daterangeCreatedTime: [],
+      // 删除状态:0-正常,1-已删除字典
+      isDeletedOptions: [],
+      sysPayModes: [],
+      detailOpen: false,  // 详情对话框开关
+      isViewMode: false,  // 是否为查看模式
+      dialogVisible: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        merchantType: null,
+        appIds: null,
+        createdTime: null,
+        isDeleted: "0",
+        id: null
+      },
+      appIdOptions:[],
+      ybConfig: {}, // 易宝配置
+      tzConfig: {}, // 台州银行配置
+      wxConfig: {}, // 微信配置
+      hfConfig: {}, // 汇付配置
+      // 表单参数
+      form: {
+        id: null,
+        merchantType: null,
+        appIds: [],
+        callbackUrl: null,
+        dataJson: null,
+        createdTime: null,
+        updatedTime: null,
+        isDeleted: null,
+        createdBy: null,
+        updatedBy: null
+      },
+      // 表单校验
+      rules: {
+        merchantType: [
+          { required: true, message: "商户类型不能为空", trigger: "change" }
+        ],
+        isDeleted: [
+          { required: true, message: "删除状态:0-正常,1-已删除不能为空", trigger: "change" }
+        ],
+        createdBy: [
+          { required: true, message: "创建人ID或用户名不能为空", trigger: "blur" }
+        ],
+        updatedBy: [
+          { required: true, message: "修改人ID或用户名不能为空", trigger: "blur" }
+        ]
+      }
+    };
+  },
+  created() {
+
+    this.getDicts("sys_normal_disable").then(response => {
+      this.isDeletedOptions = response.data;
+    });
+    this.getDicts("sys_pay_mode").then(response => {
+      this.sysPayModes = response.data;
+    });
+    listAll().then(response => {
+      this.appIdOptions=response.data;
+    });
+    this.getList();
+
+  },
+  methods: {
+    /** 详情按钮操作 */
+    handleView(row) {
+      this.isViewMode = true;
+      this.dialogVisible = true;  // 改为设置 dialogVisible
+      this.title = "查看商户应用配置";
+
+      // 加载数据(复用修改逻辑)
+      getMerchantAppConfig(row.id).then(response => {
+        // 先设置基础数据
+        Object.keys(response.data).forEach(key => {
+          if (key !== 'appIds') { // appIds单独处理
+            this.$set(this.form, key, response.data[key]);
+          }
+        });
+
+        // 单独处理 appIds,确保它是响应式的数组
+        let appIdsArray = [];
+        if (response.data.appId) {
+          if (typeof response.data.appId === 'string') {
+            appIdsArray = response.data.appId.split(',').map(item => item.trim()).filter(item => item);
+          } else if (Array.isArray(response.data.appId)) {
+            appIdsArray = [...response.data.appId];
+          }
+        }
+
+        // 使用 $set 确保响应式
+        this.$set(this.form, 'appIds', appIdsArray);
+
+        // 解析配置详情JSON
+        if (this.form.dataJson) {
+          try {
+            const configData = JSON.parse(this.form.dataJson);
+            switch(this.form.merchantType) {
+              case 'yb':
+                this.ybConfig = { ...configData };
+                break;
+              case 'tz':
+                this.tzConfig = { ...configData };
+                break;
+              case 'wx':
+                this.wxConfig = { ...configData };
+                break;
+              case 'hf':
+                this.hfConfig = { ...configData };
+                break;
+            }
+          } catch (e) {
+            console.error('解析配置详情失败:', e);
+          }
+        }
+      });
+    }
+    ,
+    /** 关闭详情对话框 */
+    closeDetailView() {
+      this.detailOpen = false;
+      this.isViewMode = false;
+      this.reset();
+    },
+    getAppNames(appIds) {
+      if (!appIds) return '';
+
+      // 处理逗号分隔的字符串
+      const appIdArray = typeof appIds === 'string' ? appIds.split(',') : Array.isArray(appIds) ? appIds : [appIds];
+
+      // 根据 appIdOptions 查找对应的应用名称
+      const names = appIdArray
+        .map(id => {
+          const option = this.appIdOptions.find(opt => opt.appid === id.trim());
+          return option ? option.name : id;
+        })
+        .filter(name => name); // 过滤掉空值
+
+      return names.join(', ');
+    },
+    /** 商户类型变化处理 */
+    handleMerchantTypeChange(value) {
+      // 清空之前的选择
+      this.ybConfig = {};
+      this.tzConfig = {};
+      this.wxConfig = {};
+      this.hfConfig = {};
+    },
+
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          // 构建配置详情JSON
+          let configData = {};
+          switch(this.form.merchantType) {
+            case 'yb':
+              configData = { ...this.ybConfig };
+              break;
+            case 'tz':
+              configData = { ...this.tzConfig };
+              break;
+            case 'wx':
+              configData = { ...this.wxConfig };
+              break;
+            case 'hf':
+              configData = { ...this.hfConfig };
+              break;
+          }
+
+          // 正确处理多选应用ID转字符串
+          if (this.form.appIds && Array.isArray(this.form.appIds) && this.form.appIds.length > 0) {
+            this.form.appId = this.form.appIds.join(',');
+          } else {
+            this.form.appId = '';
+          }
+
+          // 将配置转换为JSON字符串
+          this.form.dataJson = JSON.stringify(configData);
+
+          if (this.form.id != null) {
+            updateMerchantAppConfig(this.form).then(response => {
+              this.msgSuccess("修改成功");
+              this.dialogVisible = false;
+              this.getList();
+            });
+          } else {
+            addMerchantAppConfig(this.form).then(response => {
+              this.msgSuccess("新增成功");
+              this.dialogVisible = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+
+    /** 修改按钮操作 */
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const id = row.id || this.ids;
+      getMerchantAppConfig(id).then(response => {
+        // 先设置基础数据
+        Object.keys(response.data).forEach(key => {
+          if (key !== 'appIds') { // appIds单独处理
+            this.$set(this.form, key, response.data[key]);
+          }
+        });
+
+        // 单独处理 appIds,确保它是响应式的数组
+        let appIdsArray = [];
+        if (response.data.appId) {
+          if (typeof response.data.appId === 'string') {
+            appIdsArray = response.data.appId.split(',').map(item => item.trim()).filter(item => item);
+          } else if (Array.isArray(response.data.appId)) {
+            appIdsArray = [...response.data.appId];
+          }
+        }
+
+        // 使用 $set 确保响应式
+        this.$set(this.form, 'appIds', appIdsArray);
+
+        // 解析配置详情JSON
+        if (this.form.dataJson) {
+          try {
+            const configData = JSON.parse(this.form.dataJson);
+            switch(this.form.merchantType) {
+              case 'yb':
+                this.ybConfig = { ...configData };
+                break;
+              case 'tz':
+                this.tzConfig = { ...configData };
+                break;
+              case 'wx':
+                this.wxConfig = { ...configData };
+                break;
+              case 'hf':
+                this.hfConfig = { ...configData };
+                break;
+            }
+          } catch (e) {
+            console.error('解析配置详情失败:', e);
+          }
+        }
+
+        this.isViewMode = false; // 添加此行
+        this.dialogVisible = true; // 替代 this.open = true
+        this.title = "修改商户应用配置";
+      });
+    }
+
+    ,
+    /** 查询商户应用配置列表 */
+    getList() {
+      this.loading = true;
+      // if (this.queryParams.appIds && this.queryParams.appIds.length > 0) {
+      //   this.queryParams.appIds = this.queryParams.appIds.join(',');
+      // }
+      this.queryParams.params = {};
+      if (null != this.daterangeCreatedTime && '' != this.daterangeCreatedTime) {
+        this.queryParams.params["beginCreatedTime"] = this.daterangeCreatedTime[0];
+        this.queryParams.params["endCreatedTime"] = this.daterangeCreatedTime[1];
+      }
+      listMerchantAppConfig(this.queryParams).then(response => {
+        this.merchantAppConfigList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.dialogVisible = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        merchantType: null,
+        appId: null,  // 应该删除这一行
+        appIds: [],   // 初始化为空数组而不是null
+        callbackUrl: null,
+        dataJson: null,
+        createdTime: null,
+        updatedTime: null,
+        isDeleted: null,
+        createdBy: null,
+        updatedBy: null
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.daterangeCreatedTime = [];
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.id)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.isViewMode = false; // 添加此行
+      this.dialogVisible = true; // 替代 this.open = true
+      this.title = "添加商户应用配置";
+    },
+    // /** 修改按钮操作 */
+    // handleUpdate(row) {
+    //   this.reset();
+    //   const id = row.id || this.ids
+    //   getMerchantAppConfig(id).then(response => {
+    //     this.form = response.data;
+    //     this.open = true;
+    //     this.title = "修改商户应用配置";
+    //   });
+    // },
+    // /** 提交按钮 */
+    // submitForm() {
+    //   this.$refs["form"].validate(valid => {
+    //     if (valid) {
+    //       if (this.form.id != null) {
+    //         updateMerchantAppConfig(this.form).then(response => {
+    //           this.msgSuccess("修改成功");
+    //           this.open = false;
+    //           this.getList();
+    //         });
+    //       } else {
+    //         addMerchantAppConfig(this.form).then(response => {
+    //           this.msgSuccess("新增成功");
+    //           this.open = false;
+    //           this.getList();
+    //         });
+    //       }
+    //     }
+    //   });
+    // },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$confirm('是否确认删除商户应用配置编号为"' + ids + '"的数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          return delMerchantAppConfig(ids);
+        }).then(() => {
+          this.getList();
+          this.msgSuccess("删除成功");
+        }).catch(() => {});
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      const queryParams = this.queryParams;
+      this.$confirm('是否确认导出所有商户应用配置数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(() => {
+          this.exportLoading = true;
+          return exportMerchantAppConfig(queryParams);
+        }).then(response => {
+          this.download(response.msg);
+          this.exportLoading = false;
+        }).catch(() => {});
+    }
+  }
+};
+</script>

+ 15 - 4
src/views/his/packageOrder/index.vue

@@ -51,10 +51,19 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="员工" prop="companyUserName">
+      <el-form-item label="员工账号" prop="companyUserName">
         <el-input
           v-model="queryParams.companyUserName"
-          placeholder="员工"
+          placeholder="员工账号"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="员工昵称" prop="companyNickName">
+        <el-input
+          v-model="queryParams.companyNickName"
+          placeholder="员工昵称"
           clearable
           size="small"
           @keyup.enter.native="handleQuery"
@@ -156,7 +165,8 @@
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column label="订单号" align="center" prop="orderSn" width="120px"/>
       <el-table-column label="所属公司" align="center" prop="companyName" />
-      <el-table-column label="员工" align="center" prop="companyUserName" />
+      <el-table-column label="员工账号" align="center" prop="companyUserName" />
+      <el-table-column label="员工昵称" align="center" prop="companyNickName" />
       <el-table-column label="小程序名称" align="center" prop="miniProgramName" width="120px" />
       <el-table-column label="套餐名称" align="center" prop="packageName" />
       <el-table-column label="套餐别名" align="center" prop="packageSecondName" width="100px"/>
@@ -377,6 +387,7 @@ export default {
         endStartTime:null,
         endEndTime:null,
         companyUserName:null,
+        companyNickName:null,
         companyName:null,
         deptId:null,
         source:null,
@@ -423,7 +434,7 @@ export default {
     this.getDicts("sys_package_sub_type").then(response => {
       this.packageSubTypeOptions = response.data;
     });
-    
+
     // 获取小程序选项列表
     this.getAppMallOptions();
   },

+ 423 - 0
src/views/his/redPacketConfig/index.vue

@@ -0,0 +1,423 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="100px">
+
+      <el-form-item label="公众号appId" prop="appId">
+        <el-input
+          v-model="queryParams.appId"
+          placeholder="请输入公众号appId"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="小程序appId" prop="miniappId">
+        <el-input
+          v-model="queryParams.miniappId"
+          placeholder="请输入小程序appId"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="商户号" prop="mchId">
+        <el-input
+          v-model="queryParams.mchId"
+          placeholder="请输入商户号"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['redPacket:more:add']"
+        >新增</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          plain
+          icon="el-icon-edit"
+          size="mini"
+          :disabled="single"
+          @click="handleUpdate"
+          v-hasPermi="['redPacket:more:edit']"
+        >修改</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          plain
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+          v-hasPermi="['redPacket:more:remove']"
+        >删除</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-tag
+          type="primary"
+          size="large"
+          style="font-size: 16px;"
+        >
+          当前使用的商户号:{{this.redPacketMchId}}
+        </el-tag>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          plain
+          icon="el-icon-edit"
+          size="small"
+          @click="handleEditRedPacket"
+          v-hasPermi="['redPacket:more:editRedPacket']"
+        >修改当前发送的红包的商户号</el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table border v-loading="loading" :data="moreList" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="id" align="center" prop="id" />
+      <el-table-column label="商户类型" align="center" prop="isNew" >
+        <template slot-scope="scope">
+          {{ scope.row.isNew === 0 ? '老商户' : '新商户' }}
+        </template>
+      </el-table-column>
+      <el-table-column label="公众号appId" align="center" prop="appId" />
+      <el-table-column label="小程序appId" align="center" prop="miniappId" />
+      <el-table-column label="商户号" align="center" prop="mchId" />
+      <el-table-column label="商户密钥" align="center" prop="mchKey" />
+      <el-table-column label="p12证书文件" align="center" prop="keyPath" />
+      <el-table-column label="apiclient_key.pem证书" align="center" prop="privateKeyPath" />
+      <el-table-column label="apiclient_cert.pem证书" align="center" prop="privateCertPath" />
+      <el-table-column label="apiV3" align="center" prop="apiV3Key" />
+      <el-table-column label="公钥ID" align="center" prop="publicKeyId" />
+      <el-table-column label="pub_key.pem证书" align="center" prop="publicKeyPath" />
+      <el-table-column label="回调地址" align="center" prop="notifyUrl" />
+      <el-table-column label="回调地址" align="center" prop="notifyUrlScrm" />
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['redPacket:more:edit']"
+          >修改</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['redPacket:more:remove']"
+          >删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改多商户配置对话框 -->
+    <el-dialog :title="title" :visible.sync="open" width="1000px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="110px">
+        <el-form-item label="商户类型" prop="isNew">
+          <el-radio-group v-model="form.isNew">
+            <el-radio :label="0">商家转账到零钱(旧)</el-radio>
+            <el-radio :label="1">商家转账(新)</el-radio>
+          </el-radio-group>
+        </el-form-item>
+        <el-form-item label="公众号appId" prop="appId">
+          <el-input v-model="form.appId" placeholder="请输入公众号appId" />
+        </el-form-item>
+        <el-form-item label="小程序appId" prop="miniappId">
+          <el-input v-model="form.miniappId" placeholder="请输入小程序appId" />
+        </el-form-item>
+        <el-form-item label="商户号" prop="mchId">
+          <el-input v-model="form.mchId" placeholder="请输入商户号" />
+        </el-form-item>
+        <el-form-item label="商户密钥" prop="mchKey">
+          <el-input v-model="form.mchKey" placeholder="请输入商户密钥" />
+        </el-form-item>
+        <el-form-item label="p12证书文件" prop="keyPath">
+          <el-input v-model="form.keyPath" placeholder="请输入p12证书文件的绝对路径或者以classpath:开头的类路径." />
+        </el-form-item>
+        <el-form-item label="apiclient_key证书地址" prop="privateKeyPath">
+          <el-input v-model="form.privateKeyPath" placeholder="请输入apiclient_key.pem证书文件的绝对路径或者以classpath:开头的类路径." />
+        </el-form-item>
+        <el-form-item label="apiclient_cert证书地址" prop="privateCertPath">
+          <el-input v-model="form.privateCertPath" placeholder="请输入apiclient_cert.pem证书文件的绝对路径或者以classpath:开头的类路径." />
+        </el-form-item>
+        <el-form-item label="apiV3秘钥" prop="apiV3Key">
+          <el-input v-model="form.apiV3Key" placeholder="请输入apiV3 秘钥值." />
+        </el-form-item>
+        <el-form-item label="公钥ID" prop="publicKeyId">
+          <el-input v-model="form.publicKeyId" placeholder="请输入公钥ID" />
+        </el-form-item>
+        <el-form-item label="pub_key.pem证书地址" prop="publicKeyPath">
+          <el-input v-model="form.publicKeyPath" placeholder="请输入pub_key.pem证书文件的绝对路径或者以classpath:开头的类路径." />
+        </el-form-item>
+        <el-form-item label="回调地址" prop="notifyUrl">
+          <el-input v-model="form.notifyUrl" placeholder="请输入回调地址notifyUrl" />
+        </el-form-item>
+        <el-form-item label="回调地址" prop="notifyUrlScrm">
+          <el-input v-model="form.notifyUrlScrm" placeholder="请输入回调地址notifyUrlScrm" />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+
+    <el-dialog :title="redPacketOpen.title" :visible.sync="redPacketOpen.open" width="600px" append-to-body>
+      <el-form ref="redPacketOpen" :model="redPacketOpen" label-width="110px">
+        <el-form-item label="商户号" prop="cateId">
+          <el-select v-model="redPacketOpen.newChangeMchId" placeholder="请选择" clearable size="small">
+            <el-option
+              v-for="dict in moreList"
+              :key="dict.mchId"
+              :label="dict.mchId"
+              :value="dict.mchId"
+            />
+          </el-select>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitFormChangeMchId">确 定</el-button>
+        <el-button @click="cancelChangeMchId">取 消</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import {
+  listMore,
+  getMore,
+  delMore,
+  addMore,
+  updateMore,
+  getRedPacketMchId,
+  updateChangeMchId
+} from '@/api/his/redPacketConfig'
+
+export default {
+  name: "redPacketConfig",
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 导出遮罩层
+      exportLoading: false,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      redPacketMchId: null,
+      redPacketOpen:{
+        open:false,
+        title:null,
+        oldChangeMchId:null,
+        newChangeMchId:null,
+      },
+      // 多商户配置表格数据
+      moreList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        isNew: null,
+        appId: null,
+        miniappId: null,
+        mchId: null,
+        mchKey: null,
+        keyPath: null,
+        privateKeyPath: null,
+        privateCertPath: null,
+        apiV3Key: null,
+        publicKeyId: null,
+        publicKeyPath: null,
+        notifyUrl: null,
+        notifyUrlScrm: null
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {},
+      redPacketOpenRule:{
+        newChangeMchId:[{ required: true, trigger: "blur", message: "商户号不能为空" }]
+      },
+    };
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    /** 查询多商户配置列表 */
+    getList() {
+      this.loading = true;
+      listMore(this.queryParams).then(response => {
+        console.log("response.rows",response.rows)
+        this.moreList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+      getRedPacketMchId().then(res=>{
+        this.redPacketMchId=res.data
+      })
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    cancelChangeMchId() {
+      this.redPacketOpen.open=false;
+      this.redPacketOpen.title=false;
+      this.redPacketOpen.oldChangeMchId=false;
+      this.redPacketOpen.newChangeMchId=false;
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        isNew: null,
+        appId: null,
+        miniappId: null,
+        mchId: null,
+        mchKey: null,
+        keyPath: null,
+        privateKeyPath: null,
+        privateCertPath: null,
+        apiV3Key: null,
+        publicKeyId: null,
+        publicKeyPath: null,
+        notifyUrl: null,
+        notifyUrlScrm: null
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.id)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加多商户配置";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const id = row.id || this.ids
+      getMore(id).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改多商户配置";
+      });
+    },
+    handleEditRedPacket(){
+      this.redPacketOpen.open= true;
+      this.redPacketOpen.title="修改发送红包的商户号";
+
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.id != null) {
+            updateMore(this.form).then(response => {
+              this.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addMore(this.form).then(response => {
+              this.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+
+    /** 提交修改发送红包的商户号- */
+    submitFormChangeMchId() {
+      this.$refs["redPacketOpen"].validate(valid => {
+        if (valid) {
+            this.redPacketOpen.oldChangeMchId=this.redPacketMchId;
+            if (this.redPacketOpen.newChangeMchId==null){
+              return this.$message.error("修改的商户号不能为空")
+            }
+
+            updateChangeMchId(this.redPacketOpen).then(response => {
+              this.msgSuccess("修改成功");
+              this.cancelChangeMchId();
+              this.getList();
+            });
+
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$confirm('是否确认删除多商户配置编号为"' + ids + '"的数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          return delMore(ids);
+        }).then(() => {
+          this.getList();
+          this.msgSuccess("删除成功");
+        }).catch(() => {});
+    },
+  }
+};
+</script>

+ 5 - 4
src/views/his/storeOrder/order1.vue

@@ -318,7 +318,7 @@
       <el-form-item label="入账时间" prop="tuiMoneyTime">
             <el-date-picker v-model="tuiMoneyTime" size="small" style="width: 220px" value-format="yyyy-MM-dd" type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" @change="changeTime"></el-date-picker>
       </el-form-item>
-      <el-form-item label="ERP账户" prop="erpAccount" v-if="SFDFopen">
+      <el-form-item label="ERP账户" prop="erpAccount" v-if="SFDFopen && (this.actName !=='1' && this.actName !== '7') ">
         <el-select v-model="queryParams.erpAccount" placeholder="ERP账户" clearable size="small">
           <el-option
             v-for="dict in erpAccountQueryList"
@@ -328,7 +328,7 @@
           />
         </el-select>
       </el-form-item>
-      <el-form-item label="ERP电话" prop="erpPhoneNumber" v-if="SFDFopen">
+      <el-form-item label="ERP电话" prop="erpPhoneNumber" v-if="SFDFopen && (this.actName !=='1' && this.actName !== '7')">
         <el-input
           v-model="queryParams.erpPhoneNumber"
           placeholder="ERP电话"
@@ -480,7 +480,7 @@
       </el-row>
       <el-tabs type="card" v-model="actName" @tab-click="handleClickX">
         <el-tab-pane label="全部订单" name="10"></el-tab-pane>
-        <el-tab-pane v-for="(item,index) in orderOptions" :label="item.dictLabel" :name="item.dictValue"></el-tab-pane>
+        <el-tab-pane v-for="(item,index) in orderOptions" :key="index" :label="item.dictLabel" :name="item.dictValue"></el-tab-pane>
       </el-tabs>
       <el-table ref="orderTable" height="500" v-loading="loading" border :data="orderList" @selection-change="handleSelectionChange"
         @sort-change="handleSortChange" :default-sort="{prop: 'createTime', order: 'descending'}">
@@ -1047,7 +1047,8 @@ export default {
         { key: 'sex', label: '性别', checked: false },
         { key: 'erpPhone', label: 'ERP电话', checked: false },
         { key: 'erpAccount', label: 'ERP账号', checked: false },
-        { key: 'source', label: '订单来源', checked: false }
+        { key: 'source', label: '订单来源', checked: false },
+        { key: 'countGoods', label: '统计商品数量', checked: false }
       ],
       // 已选择的导出字段
       selectedExportFields: [],

+ 22 - 0
src/views/his/userIntegralLogs/index.vue

@@ -27,6 +27,16 @@
           size="small"
           @keyup.enter.native="handleQuery"
         />
+      </el-form-item>
+      <el-form-item label="类别" prop="logType">
+        <el-select v-model="queryParams.logType" placeholder="请选择类别" clearable size="small">
+          <el-option
+            v-for="dict in intefralLogTypeOptions"
+            :key="dict.dictValue"
+            :label="dict.dictLabel"
+            :value="dict.dictValue"
+          />
+        </el-select>
       </el-form-item>
        <el-form-item label="时间" prop="createTime">
                  <el-date-picker v-model="createTime" size="small" style="width: 220px" value-format="yyyy-MM-dd" type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" @change="change"></el-date-picker>
@@ -38,6 +48,17 @@
     </el-form>
 
     <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          plain
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+          v-hasPermi="['his:userIntegralLogs:remove']"
+        >删除</el-button>
+      </el-col>
       <el-col :span="1.5">
         <el-button
           type="warning"
@@ -53,6 +74,7 @@
     </el-row>
 
     <el-table v-loading="loading" border :data="userIntegralLogsList" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="55" align="center" />
       <el-table-column label="用户id" align="center" prop="userId" />
       <el-table-column label="用户昵称" align="center" prop="nickName" />
       <el-table-column label="用户电话" align="center" prop="phone" />

+ 21 - 21
src/views/hisStore/adv/index.vue

@@ -356,19 +356,19 @@ export default {
       }
       return true;
     },
-    
+
     // 验证广告图片尺寸
     validateAdvertImage(imageUrl) {
       if (!imageUrl) {
         this.imageValidation.show = false;
         return;
       }
-      
+
       console.log('开始验证广告图片尺寸:', imageUrl);
-      
+
       const img = new Image();
       const config = this.imageSizeConfig;
-      
+
       // 设置超时处理
       const timeoutId = setTimeout(() => {
         this.imageValidation = {
@@ -378,23 +378,23 @@ export default {
         };
         console.log('图片加载超时');
       }, 10000);
-      
+
       img.onload = () => {
         clearTimeout(timeoutId);
         const { width: actualWidth, height: actualHeight } = img;
         const { width: expectedWidth, height: expectedHeight, tolerance } = config;
-        
+
         console.log(`实际尺寸: ${actualWidth}x${actualHeight}px, 期望尺寸: ${expectedWidth}x${expectedHeight}px`);
-        
+
         // 计算比例差异
         const expectedRatio = expectedWidth / expectedHeight;
         const actualRatio = actualWidth / actualHeight;
         const ratioDiff = Math.abs(actualRatio - expectedRatio) / expectedRatio;
-        
+
         console.log(`期望比例: ${expectedRatio.toFixed(3)}, 实际比例: ${actualRatio.toFixed(3)}, 差异: ${(ratioDiff * 100).toFixed(2)}%`);
-        
+
         this.imageValidation.show = true;
-        
+
         if (ratioDiff <= tolerance) {
           this.imageValidation.type = 'success';
           this.imageValidation.message = `✓ 尺寸符合要求 (实际: ${actualWidth}x${actualHeight}px)`;
@@ -405,11 +405,11 @@ export default {
           console.log('尺寸验证失败');
         }
       };
-      
+
       img.onerror = (error) => {
         clearTimeout(timeoutId);
         console.error('图片加载失败:', error);
-        
+
         // 检查URL格式和可访问性
         this.checkImageUrl(imageUrl).then(isValid => {
           if (!isValid) {
@@ -427,27 +427,27 @@ export default {
           }
         });
       };
-      
+
       // 处理完整的图片URL
       const fullImageUrl = this.getFullImageUrl(imageUrl);
       img.crossOrigin = 'anonymous'; // 尝试处理跨域
       img.src = fullImageUrl;
     },
-    
+
     // 获取完整的图片URL
     getFullImageUrl(imageUrl) {
       if (!imageUrl) return '';
-      
+
       // 如果已经是完整URL(http/https开头)
       if (imageUrl.startsWith('http://') || imageUrl.startsWith('https://')) {
         return imageUrl;
       }
-      
+
       // 如果是base64
       if (imageUrl.startsWith('data:image/')) {
         return imageUrl;
       }
-      
+
       // 如果是相对路径,拼接基础URL
       const baseUrl = process.env.VUE_APP_BASE_API || '';
       if (imageUrl.startsWith('/')) {
@@ -456,7 +456,7 @@ export default {
         return baseUrl + '/' + imageUrl;
       }
     },
-    
+
     // 检查图片URL有效性
     async checkImageUrl(imageUrl) {
       try {
@@ -468,7 +468,7 @@ export default {
         return false;
       }
     },
-    
+
     /** 查询广告列表 */
     getList() {
       this.loading = true;
@@ -535,14 +535,14 @@ export default {
         this.form.status = response.data.status.toString();
         this.form.advType = response.data.advType.toString();
         this.form.showType = response.data.showType ? response.data.showType.toString() : "";
-        
+
         // 如果有广告图片且是图片类型,验证其尺寸
         if (this.form.imageUrl && this.form.urlType === 1) {
           setTimeout(() => {
             this.validateAdvertImage(this.form.imageUrl);
           }, 1000);
         }
-        
+
         this.open = true;
         this.title = "修改广告";
         setTimeout(() => {

+ 21 - 0
src/views/hisStore/components/productAfterSalesOrder.vue

@@ -43,6 +43,11 @@
                   {{afterSales.refundAmount}}
                 </span>
             </el-descriptions-item>
+            <el-descriptions-item label="运费"  >
+                <span v-if="order!=null">
+                  {{order.payPostage}}
+                </span>
+            </el-descriptions-item>
             <el-descriptions-item label="申请类型"  >
                 <span v-if="afterSales!=null">
                   <el-tag  v-for="(item, index) in serviceTypeOptions"    v-if="afterSales.serviceType==item.dictValue" >{{item.dictLabel}}</el-tag>
@@ -145,6 +150,11 @@
             </template>
           </el-table-column>
         </el-table>
+        <div style="margin-top: 12px; text-align: right;" v-if="order">
+          <div>订单金额:¥{{ goodsTotal.toFixed(2) }}</div>
+          <div>运费金额:¥{{ (order.payPostage || 0).toFixed(2) }}</div>
+          <div>实付金额:¥{{ (goodsTotal + (order.payPostage || 0)).toFixed(2) }}</div>
+        </div>
         <div style="margin-top: 20px">
           <svg-icon icon-class="marker" style="color: #606266"></svg-icon>
           <span class="font-small">操作信息</span>
@@ -265,6 +275,17 @@ export default {
 
     };
   },
+  computed: {
+    goodsTotal() {
+      if (!this.items || this.items.length === 0) return 0;
+      return this.items.reduce((sum, it) => {
+        const info = JSON.parse(it.jsonInfo || "{}");
+        const num = Number(it.num != null ? it.num : info.num) || 0;
+        const price = Number(info.price) || 0;
+        return sum + num * price;
+      }, 0);
+    }
+  },
   created() {
     this.getDicts("store_after_sales_sales_status").then((response) => {
         this.salesStatusOptions = response.data;

+ 4 - 0
src/views/hisStore/components/productOrder.vue

@@ -403,8 +403,12 @@
             <el-option key="SF"  label="顺丰" value="SF" />
             <el-option key="EMS"  label="邮政" value="EMS" />
              <el-option key="ZTO"  label="中通" value="ZTO" />
+             <el-option key="STO"  label="申通" value="STO" />
              <el-option key="JD"  label="京东" value="JD" />
              <el-option key="DBL"  label="德邦" value="DBL" />
+             <el-option key="JTSD"  label="极兔" value="JTSD" />
+             <el-option key="YD"  label="韵达" value="YD" />
+             <el-option key="YTO"  label="圆通" value="YTO" />
            </el-select>
          </el-form-item>
         <el-form-item label="物流单号" prop="deliveryId"  >

+ 2 - 0
src/views/hisStore/integralGoods/index.vue

@@ -417,6 +417,8 @@ export default {
         descs: null,
         createTime: null
       };
+      this.imageArr = [];
+      this.photoArr = [];
       this.resetForm("form");
     },
     /** 搜索按钮操作 */

+ 1 - 1
src/views/hisStore/store/audit.vue

@@ -63,7 +63,7 @@
           size="mini"
           :loading="exportLoading"
           @click="handleExport"
-          v-hasPermi="['his:store:export']"
+          v-hasPermi="['store:his:store:export']"
         >导出</el-button>
       </el-col>
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>

+ 12 - 7
src/views/hisStore/store/index.vue

@@ -71,7 +71,7 @@
           icon="el-icon-plus"
           size="mini"
           @click="handleAdd"
-          v-hasPermi="['his:store:add']"
+          v-hasPermi="['store:his:store:add']"
         >新增</el-button>
       </el-col>
       <el-col :span="1.5">
@@ -82,7 +82,7 @@
           size="mini"
           :disabled="single"
           @click="handleUpdate"
-          v-hasPermi="['his:store:edit']"
+          v-hasPermi="['store:his:store:edit']"
         >修改</el-button>
       </el-col>
       <el-col :span="1.5">
@@ -93,7 +93,7 @@
           size="mini"
           :disabled="multiple"
           @click="handleDelete"
-          v-hasPermi="['his:store:remove']"
+          v-hasPermi="['store:his:store:remove']"
         >删除</el-button>
       </el-col>
       <el-col :span="1.5">
@@ -104,7 +104,7 @@
           size="mini"
           :loading="exportLoading"
           @click="handleExport"
-          v-hasPermi="['his:store:export']"
+          v-hasPermi="['store:his:store:export']"
         >导出</el-button>
       </el-col>
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
@@ -173,13 +173,14 @@
             type="text"
             icon="el-icon-edit"
             @click="handleUpdate(scope.row)"
-            v-hasPermi="['his:store:edit']"
+            v-hasPermi="['store:his:store:edit']"
           >修改</el-button>
           <el-button
             size="mini"
             type="text"
             icon="el-icon-s-promotion"
             @click="handledetails(scope.row)"
+            v-hasPermi="['store:his:store:query']"
           >详情
           </el-button>
           <el-button
@@ -187,14 +188,14 @@
             type="text"
             icon="el-icon-delete"
             @click="handleDelete(scope.row)"
-            v-hasPermi="['his:store:remove']"
+            v-hasPermi="['store:his:store:remove']"
           >删除</el-button>
           <el-button
             size="mini"
             type="text"
             icon="el-icon-refresh"
             @click="handleRefresh(scope.row)"
-            v-hasPermi="['his:store:refresh']"
+            v-hasPermi="['store:his:store:refresh']"
           >重置密码</el-button>
         </template>
       </el-table-column>
@@ -903,6 +904,10 @@ export default {
         this.form = response.data;
         this.open = true;
         this.title = "修改店铺";
+        // 移除 phone 字段的验证规则
+        const newRules = Object.assign({}, this.rules);
+        delete newRules.phone;
+        this.rules = newRules;
         let str = this.form.shippingType
         this.form.shippingType = str.split(",")
         this.form.cityIds = ((this.form.cityIds).split(",")).map(Number)

+ 44 - 5
src/views/hisStore/storeAfterSales/index.vue

@@ -25,10 +25,10 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="员工姓名" prop="companyUserNickName">
+      <el-form-item label="销售名称" prop="companyUserNickName">
         <el-input
           v-model="queryParams.companyUserNickName"
-          placeholder="请输入员工姓名"
+          placeholder="请输入销售名称"
           clearable
           size="small"
           @keyup.enter.native="handleQuery"
@@ -43,6 +43,15 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
+      <el-form-item label="产品名称" prop="productName">
+        <el-input
+          v-model="queryParams.productName"
+          placeholder="请输入产品名称"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
 
 
 
@@ -108,8 +117,24 @@
             size="small"
             @keyup.enter.native="handleQuery"/>
        </el-form-item>
+      <el-form-item label="退货物流单号" prop="returnDeliverySn">
+        <el-input
+          v-model="queryParams.returnDeliverySn"
+          placeholder="请输入退货物流单号"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
 
-
+      <el-form-item label="汇付商户订单" prop="hfOrderCode" label-width="100">
+          <el-input
+            v-model="queryParams.hfOrderCode"
+            placeholder="请输入汇付商户订单"
+            clearable
+            size="small"
+            @keyup.enter.native="handleQuery"/>
+       </el-form-item>
       <el-form-item label="提交时间" prop="createTime">
         <el-date-picker
           style="width:205.4px"
@@ -145,7 +170,9 @@
       <el-table-column label="所属公司" align="center" prop="companyName" />
       <el-table-column label="所属员工" align="center" prop="companyUserNickName" />
       <el-table-column label="订单单号" align="center" prop="orderCode" />
+      <el-table-column label="支付单号" align="center" prop="payCode" />
       <el-table-column label="会员手机号" align="center" prop="userPhone" />
+      <el-table-column label="产品名称" align="center" prop="productName" :show-overflow-tooltip="true" />
       <el-table-column label="退款金额" align="center" prop="refundAmount" />
        <el-table-column label="退款类型" align="center" prop="serviceType" >
           <template slot-scope="scope">
@@ -267,6 +294,7 @@ export default {
         explainImg: null,
         shipperCode: null,
         deliverySn: null,
+        hfOrderCode:null,
         deliveryName: null,
         status: null,
         salesStatus: null,
@@ -274,7 +302,9 @@ export default {
         userId: null,
         consignee: null,
         phoneNumber: null,
-        address: null
+        address: null,
+        productName: null,
+        returnDeliverySn: null        // 退货物流单号(售后物流单号)
       },
       // 表单参数
       form: {},
@@ -329,7 +359,15 @@ export default {
     /** 查询售后记录列表 */
     getList() {
       this.loading = true;
-      listStoreAfterSales(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
+      const params = {
+        ...this.queryParams,
+        deliverySn: this.queryParams.returnDeliverySn || this.queryParams.deliverySn
+      };
+      if(!!params.hfOrderCode && params.hfOrderCode.indexOf("-") > -1){
+        let ss = params.hfOrderCode.split("-");
+        params.hfOrderCode = ss[1];
+      }
+      listStoreAfterSales(this.addDateRange(params, this.dateRange)).then(response => {
         this.storeAfterSalesList = response.rows;
         this.total = response.total;
         this.loading = false;
@@ -352,6 +390,7 @@ export default {
         explainImg: null,
         shipperCode: null,
         deliverySn: null,
+        hfOrderCode:null,
         deliveryName: null,
         status: 0,
         salesStatus: 0,

+ 1 - 0
src/views/hisStore/storeCouponIssue/index.vue

@@ -234,6 +234,7 @@ export default {
     },
     /** 重置按钮操作 */
     resetQuery() {
+      this.dateRange = [];
       this.resetForm("queryForm");
       this.handleQuery();
     },

+ 3 - 1
src/views/hisStore/storeOrder/healthStoreList.vue

@@ -493,7 +493,8 @@
         </el-table-column>
 
       <el-table-column label="成本价格" align="center" prop="cost" v-if="showFinanceTableField"/>
-      <el-table-column label="结算价格" align="center" prop="fprice"  v-if="showFinanceTableField"/>
+      <!-- <el-table-column label="结算价格" align="center" prop="fprice"  v-if="showFinanceTableField"/> -->
+       <el-table-column label="实付金额" align="center" prop="payMoney"  v-if="showFinanceTableField"/>
       <el-table-column label="额外运费" align="center" prop="payPostage" v-if="showFinanceTableField"/>
       <el-table-column label="商品编码" align="center" prop="barCode"  v-if="showFinanceTableField"/>
       <el-table-column label="商品分类" align="center" prop="cateName" v-if="showFinanceTableField"/>
@@ -1022,6 +1023,7 @@ import { getMiniProgramList } from '@/api/hisStore/storePayment'
 import {list as getAppMallOptions} from '@/api/course/coursePlaySourceConfig';
 import {checkPermi} from "@/utils/permission";
 
+// 商城订单
 export default {
   components: { productOrder, productSelect, addUser, addUserAddress, Treeselect },
   name: 'HisHealthStoreOrderList',

+ 25 - 1
src/views/hisStore/storePayment/index.vue

@@ -160,6 +160,15 @@
           @click="handlePayNotify"
           v-hasPermi="['store:storePayment:payNotify']"
         >同步订单状态</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          icon="el-icon-s-order"
+          size="mini"
+          type="success"
+          @click="wxOneClickShipping"
+        >微信一键线下自提发货
+        </el-button>
       </el-col>
 	  <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
@@ -304,7 +313,7 @@
 </template>
 
 <script>
-import { refundStorePayment,listStorePayment, getStorePayment, delStorePayment, addStorePayment, updateStorePayment, exportStorePayment,setPayNotify,getMiniProgramList } from "@/api/hisStore/storePayment";
+import { refundStorePayment,listStorePayment, getStorePayment, delStorePayment, addStorePayment, updateStorePayment, exportStorePayment,setPayNotify,getMiniProgramList,oneClickShipping } from "@/api/hisStore/storePayment";
 import { getCompanyList } from "@/api/company/company";
 import { listLiveOrderPayments,getLivePayment,updateLivePayment,exportLiveOrderPayments } from "@/api/live/liveOrderPayment";
 
@@ -635,6 +644,21 @@ export default {
         }
       })
     },
+    wxOneClickShipping(){
+      this.$confirm('是否同步微信线下发货?', '一键发货', {
+        confirmButtonText: '是',
+        cancelButtonText: '否',
+        type: 'warning'
+      }).then(() => {
+        oneClickShipping().then(response => {
+          if(response.code === 200) {
+            this.$message.success("操作成功!")
+            this.getList();
+          }
+        })
+      }).catch(() => {
+      });
+    }
   }
 };
 </script>

+ 1 - 1
src/views/hisStore/storeProduct/index.vue

@@ -1074,7 +1074,7 @@ export default {
         // 设置上传的请求头部
         headers: { Authorization: "Bearer " + getToken() },
         // 上传的地址
-        url: process.env.VUE_APP_BASE_API + "/store/storeProduct/importData"
+        url: process.env.VUE_APP_BASE_API + "/store/store/storeProduct/importData"
       },
       // 添加药品相关字段
       isDrugOptions: [

+ 8 - 0
src/views/hisStore/storeProduct/indexZm.vue

@@ -1488,6 +1488,7 @@ export default {
     getTreeselect() {
       getAllStoreProductCategory().then(response => {
         this.categoryOptions = [];
+        debugger;
         const data = this.handleTree(response.data, "cateId", "pid");
         this.categoryOptions=data;
       });
@@ -1608,6 +1609,13 @@ export default {
     /** 重置按钮操作 */
     resetQuery() {
       this.resetForm("queryForm");
+      const showFlag = this.queryParams.isShow
+      this.queryParams = {
+        pageNum:1,
+        pageSize:10,
+        isShow:showFlag
+      }
+      this.companyId = '';
       this.handleQuery();
     },
     // 多选框选中数据

+ 8 - 0
src/views/hisStore/storeProductAudit/index.vue

@@ -1282,6 +1282,14 @@ export default {
     /** 重置按钮操作 */
     resetQuery() {
       this.resetForm("queryForm");
+      this.queryParams = {
+        pageNum:1,
+        pageSize:10,
+        isShow:1,
+        isAudit:0
+      }
+      this.companyId = ''
+      this.storeId = ''
       this.handleQuery();
     },
     // 多选框选中数据

+ 7 - 0
src/views/hisStore/storeProductPackage/index.vue

@@ -132,6 +132,7 @@
       </el-table-column>
 
       <el-table-column label="限购次数" align="center" prop="limitCount" />
+      <el-table-column label="赠送积分" align="center" prop="integral" />
       <el-table-column label="排序" align="center" prop="sort" />
       <!-- <el-table-column label="所属部门" align="center" prop="deptName" /> -->
       <el-table-column label="状态" align="center" prop="status" >
@@ -308,6 +309,9 @@
          <el-form-item label="限购次数" prop="limitCount">
               <el-input-number v-model="form.limitCount" :min="0" :step="1" placeholder="请输入限购次数" />
         </el-form-item>
+        <el-form-item label="赠送积分" prop="integral">
+          <el-input-number v-model="form.integral" :min="0" :step="1" placeholder="不填默认0积分" width="100px"/>
+        </el-form-item>
         <el-form-item label="排序" prop="sort">
           <el-input-number v-model="form.sort"  :min="1"  />
         </el-form-item>
@@ -633,6 +637,9 @@ export default {
         var data={id:item.id,count:item.count}
         this.form.productList.push(data)
       })
+      if (this.form.integral==null || this.form.integral<0){
+        this.form.integral = 0;
+      }
       // console.log(this.form)
       // return;
       this.$refs["form"].validate(valid => {

+ 21 - 2
src/views/live/components/productAfterSalesOrder.vue

@@ -20,7 +20,6 @@
             <el-button size="mini"  v-hasPermi="['store:storeAfterSales:audit1']" v-show="afterSales.salesStatus==0&&afterSales.status===0" @click="handleAudit1">平台审核</el-button>
             <el-button size="mini"  v-hasPermi="['store:storeAfterSales:audit2']" v-show="afterSales.salesStatus==0&&afterSales.status===2" @click="handleAudit2">仓库审核</el-button>
             <el-button size="mini"  v-hasPermi="['store:storeAfterSales:refund']" @click="handleRefund"  v-show="afterSales.salesStatus==0&&afterSales.status===3">财务审核</el-button>
-            <el-button size="mini"  v-hasPermi="['store:storeAfterSales:refund']" @click="handleImmediatelyRefund"  v-show="afterSales.salesStatus==0">立即退款</el-button>
             <el-button size="mini"  v-hasPermi="['store:storeAfterSales:cancel']" @click="cancel"  v-show="afterSales.salesStatus==0">撤销</el-button>
             <el-button size="mini"  @click="showOrder">查看订单</el-button>
           </div>
@@ -44,6 +43,11 @@
                   {{afterSales.refundAmount}}
                 </span>
           </el-descriptions-item>
+          <el-descriptions-item label="运费"  >
+                <span v-if="order!=null">
+                  {{order.payDelivery}}
+                </span>
+          </el-descriptions-item>
           <el-descriptions-item label="申请类型"  >
                 <span v-if="afterSales!=null">
                   <el-tag prop="serviceType" v-for="(item, index) in serviceTypeOptions"    v-if="afterSales.serviceType==item.dictValue">{{item.dictLabel}}</el-tag>
@@ -145,6 +149,10 @@
             </template>
           </el-table-column>
         </el-table>
+        <div style="margin-top: 12px; text-align: right;" v-if="order">
+          <div>订单金额:¥{{ goodsTotal.toFixed(2) }}</div>
+          <div>运费金额:¥{{ (order.payDelivery || 0).toFixed(2) }}</div>
+        </div>
         <div style="margin-top: 20px">
           <span class="font-small">操作信息</span>
         </div>
@@ -290,6 +298,17 @@ export default {
       this.serviceTypeOptions = response.data;
     });
   },
+  computed: {
+    goodsTotal() {
+      if (!this.items || this.items.length === 0) return 0;
+      return this.items.reduce((sum, it) => {
+        const info = JSON.parse(it.jsonInfo || "{}");
+        const num = Number(info.num) || 0;
+        const price = Number(info.price) || 0;
+        return sum + num * price;
+      }, 0);
+    }
+  },
   methods: {
     submitForm() {
       var id=this.afterSales.id;
@@ -335,7 +354,7 @@ export default {
         cancelButtonText: "取消",
         type: "warning"
       }).then(function() {
-       
+
         let param ={orderId:_this.order.orderId}
         console.log(param)
          debugger;

Dosya farkı çok büyük olduğundan ihmal edildi
+ 532 - 204
src/views/live/live/index.vue


+ 43 - 6
src/views/live/liveAfteraSales/index.vue

@@ -15,10 +15,10 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="员工姓名" prop="companyUserNickName">
+      <el-form-item label="销售名称" prop="companyUserNickName">
         <el-input
           v-model="queryParams.companyUserNickName"
-          placeholder="请输入员工姓名"
+          placeholder="请输入销售名称"
           clearable
           size="small"
           @keyup.enter.native="handleQuery"
@@ -33,6 +33,15 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
+      <el-form-item label="产品名称" prop="productName">
+        <el-input
+          v-model="queryParams.productName"
+          placeholder="请输入产品名称"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
 
 
 
@@ -98,7 +107,23 @@
           size="small"
           @keyup.enter.native="handleQuery"/>
       </el-form-item>
-
+      <el-form-item label="退货物流单号" prop="returnDeliverySn">
+        <el-input
+          v-model="queryParams.returnDeliverySn"
+          placeholder="请输入退货物流单号"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="汇付商户订单" prop="hfOrderCode" label-width="100">
+          <el-input
+            v-model="queryParams.hfOrderCode"
+            placeholder="请输入汇付商户订单"
+            clearable
+            size="small"
+            @keyup.enter.native="handleQuery"/>
+       </el-form-item>
 
       <el-form-item label="提交时间" prop="createTime">
         <el-date-picker
@@ -125,7 +150,7 @@
             size="mini"
             :disabled="exportLoading"
             @click="handleExport"
-            v-hasPermi="['live:liveAfteraSales:export']"
+            v-hasPermi="['live:liveAfterSales:export']"
           >导出</el-button>
         </el-col>
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
@@ -138,7 +163,9 @@
       <el-table-column label="所属员工" align="center" prop="companyUserNickName" />
       <el-table-column label="购买用户" align="center" prop="userName" />
       <el-table-column label="订单单号" align="center" prop="orderCode" />
+      <el-table-column label="支付单号" align="center" prop="payCode" />
       <el-table-column label="会员手机号" align="center" prop="userPhone" />
+      <el-table-column label="产品名称" align="center" prop="productName" :show-overflow-tooltip="true" />
       <el-table-column label="退款金额" align="center" prop="refundAmount" />
       <el-table-column label="退款类型" align="center" prop="refundType" >
         <template slot-scope="scope">
@@ -252,6 +279,7 @@ export default {
         deliveryCode: null,
         deliverySn: null,
         deliveryName: null,
+        hfOrderCode:null,
         status: null,
         Status: null,
         isDel: null,
@@ -266,7 +294,9 @@ export default {
         deliveryStatus: null,         // 物流状态,确认是否接口支持
         createTimeBegin: null,        // 创建时间起
         createTimeEnd: null,          // 创
-        userPhone: null
+        userPhone: null,
+        productName: null,
+        returnDeliverySn: null        // 退货物流单号(售后物流单号)
       },
       // 表单参数
       form: {},
@@ -318,7 +348,12 @@ export default {
     /** 查询售后记录列表 */
     getList() {
       this.loading = true;
-      listLiveAfterSales(this.queryParams).then(response => {
+      const params = { ...this.queryParams, deliverySn: this.queryParams.returnDeliverySn || this.queryParams.deliverySn };
+      if(!!params.hfOrderCode && params.hfOrderCode.indexOf("-") > -1){
+        let ss = params.hfOrderCode.split("-");
+        params.hfOrderCode = ss[1];
+      }
+      listLiveAfterSales(params).then(response => {
         this.liveAfterSalesList = response.rows;
         this.total = response.total;
         this.loading = false;
@@ -339,11 +374,13 @@ export default {
         refundAmount: null,
         refundType: null,
         reasons: null,
+        hfOrderCode:null,
         explains: null,
         explainImg: null,
         deliveryCode: null,
         deliverySn: null,
         deliveryName: null,
+        companyUserNickName:null,
         status: 0,
         salesStatus: 0,
         orderStatus: 0,

+ 130 - 15
src/views/live/liveConfig/watchReward.vue

@@ -24,20 +24,51 @@
       >
         <!-- 参与条件 -->
         <el-form-item label="参与条件" prop="participateCondition">
-          <el-radio v-model="watchRewardForm.participateCondition" label="1">
-            达到指定观看时长
-          </el-radio>
+          <el-radio-group v-model="watchRewardForm.participateCondition">
+            <el-radio label="1">达到指定观看时长</el-radio>
+            <el-radio label="2">启用完课积分</el-radio>
+          </el-radio-group>
         </el-form-item>
 
         <!-- 观看时长 -->
-        <el-form-item label="观看时长" prop="watchDuration">
+        <el-form-item label="观看时长" prop="watchDuration" v-if="watchRewardForm.participateCondition === '1'">
           <el-input v-model="watchRewardForm.watchDuration" placeholder="请输入观看时长" class="duration-input">
             <template #append>分钟</template>
           </el-input>
         </el-form-item>
 
-        <!-- 实施动作 -->
-        <el-form-item label="实施动作" prop="action">
+        <!-- 完课率要求 -->
+        <el-form-item label="完课率要求" prop="completionRate" v-if="watchRewardForm.participateCondition === '2'">
+          <el-input-number 
+            v-model="watchRewardForm.completionRate" 
+            :min="1" 
+            :max="100" 
+            :precision="0"
+            placeholder="请输入完课率"
+            style="width: 200px;"
+          ></el-input-number>
+          <span style="margin-left: 10px; color: #909399;">%(观看时长占直播总时长的比例)</span>
+        </el-form-item>
+
+        <!-- 连续完课积分配置 -->
+        <el-form-item label="连续完课积分" prop="pointsConfig" v-if="watchRewardForm.participateCondition === '2'">
+          <div style="display: flex; flex-direction: column; gap: 10px;">
+            <div v-for="(point, index) in watchRewardForm.pointsConfig" :key="index" style="display: flex; align-items: center;">
+              <span style="width: 80px;">第{{ index + 1 }}天:</span>
+              <el-input-number 
+                v-model="watchRewardForm.pointsConfig[index]" 
+                :min="0" 
+                :precision="0"
+                placeholder="请输入积分值"
+                style="width: 200px;"
+              ></el-input-number>
+              <span style="margin-left: 10px; color: #909399;">积分</span>
+            </div>
+          </div>
+        </el-form-item>
+
+        <!-- 实施动作(仅在达到指定观看时长时显示) -->
+        <el-form-item label="实施动作" prop="action" v-if="watchRewardForm.participateCondition === '1'">
           <el-select v-model="watchRewardForm.action" placeholder="请选择实施动作" style="width: 300px;">
             <el-option
               v-for="item in actionOptions"
@@ -53,8 +84,8 @@
 <!--          <el-input v-model="watchRewardForm.receivePrompt" placeholder="请输入领取提示语"></el-input>-->
 <!--        </el-form-item>-->
 
-        <!-- 红包设置 -->
-        <div>
+        <!-- 红包设置(仅在达到指定观看时长时显示) -->
+        <div v-if="watchRewardForm.participateCondition === '1'">
           <div class="section-title">红包设置</div>
 
           <!-- 根据实施动作类型显示不同的表单内容 -->
@@ -107,8 +138,8 @@
           </template>
         </div>
 
-        <!-- 其他设置 -->
-        <div >
+        <!-- 其他设置(仅在达到指定观看时长时显示) -->
+        <div v-if="watchRewardForm.participateCondition === '1'">
           <div class="section-title">其他设置</div>
 
           <template v-if="watchRewardForm.action === '1'">
@@ -178,7 +209,7 @@ export default {
         liveId: null,
         // 是否启用观看奖励
         enabled: false,
-        // 参与条件
+        // 参与条件 1:达到指定观看时长 2:启用完课积分
         participateCondition: '1',
         // 观看时长
         watchDuration: '',
@@ -205,17 +236,66 @@ export default {
         // 积分使用引导语
         scoreGuideText: '',
         // 积分使用引导链接
-        scoreGuideLink: ''
+        scoreGuideLink: '',
+        // 完课积分相关配置(participateCondition为2时使用)
+        // 完课率要求(1-100)
+        completionRate: 90,
+        // 连续完课积分配置(第1-10天)
+        pointsConfig: [100, 110, 120, 130, 140, 150, 160, 170, 180, 200]
       },
       rules:{
         participateCondition:[
-          { required: true, message: '请选择参与条件', trigger: 'blur'}
+          { required: true, message: '请选择参与条件', trigger: 'change'}
         ],
         watchDuration:[
-          { required: true, message: '请输入观看时长', trigger: 'blur'}
+          { 
+            validator: (rule, value, callback) => {
+              if (this.watchRewardForm.participateCondition === '1') {
+                if (!value) {
+                  callback(new Error('请输入观看时长'));
+                } else {
+                  callback();
+                }
+              } else {
+                callback();
+              }
+            }, 
+            trigger: 'blur'
+          }
+        ],
+        completionRate:[
+          { 
+            validator: (rule, value, callback) => {
+              if (this.watchRewardForm.participateCondition === '2') {
+                if (!value && value !== 0) {
+                  callback(new Error('请输入完课率要求'));
+                } else if (value < 1 || value > 100) {
+                  callback(new Error('完课率要求范围为1-100'));
+                } else {
+                  callback();
+                }
+              } else {
+                callback();
+              }
+            }, 
+            trigger: 'blur'
+          }
         ],
         action:[
-          { required: true, message: '请选择实施动作', trigger: 'blur'}
+          { 
+            validator: (rule, value, callback) => {
+              if (this.watchRewardForm.participateCondition === '1') {
+                if (!value) {
+                  callback(new Error('请选择实施动作'));
+                } else {
+                  callback();
+                }
+              } else {
+                callback();
+              }
+            }, 
+            trigger: 'change'
+          }
         ],
         // receivePrompt:[
         //   { required: true, message: '请输入领取提示语', trigger: 'blur'}
@@ -263,6 +343,15 @@ export default {
       },
       // 初始化时立即执行一次
       immediate: true
+    },
+    // 监听开启观看奖励开关变化
+    'watchRewardForm.enabled': {
+      handler(newValue, oldValue) {
+        // 只有当关闭开关时才自动保存(从 true 变为 false)
+        if (oldValue === true && newValue === false && this.liveId) {
+          this.autoSaveEnabled();
+        }
+      }
     }
   },
   created() {
@@ -276,6 +365,32 @@ export default {
         this.loading = false
       })
     },
+    // 自动保存开关状态
+    autoSaveEnabled() {
+      if (this.watchRewardForm.id == null) {
+        addConfig(this.watchRewardForm, this.liveId).then(res => {
+          if (res.code == 200) {
+            this.msgSuccess("已关闭观看奖励");
+            // 更新 id,下次修改时使用 update
+            if (res.data && res.data.id) {
+              this.watchRewardForm.id = res.data.id;
+            }
+          }
+        }).catch(() => {
+          // 如果保存失败,恢复开关状态
+          this.watchRewardForm.enabled = true;
+        });
+      } else {
+        updateConfig(this.watchRewardForm, this.liveId).then(response => {
+          if (response.code == 200) {
+            this.msgSuccess("已关闭观看奖励");
+          }
+        }).catch(() => {
+          // 如果保存失败,恢复开关状态
+          this.watchRewardForm.enabled = true;
+        });
+      }
+    },
     saveWatchReward() {
       this.$refs["watchRewardForm"].validate(valid => {
         console.log(valid)

+ 187 - 25
src/views/live/liveConsole/LiveConsole.vue

@@ -111,8 +111,9 @@
             全局用户自见
           </label>
         </div>
-        <el-scrollbar class="custom-scrollbar" style="height: 500px; width: 100%;" ref="manageRightRef">
-          <el-row v-for="m in msgList" :key="m.msgId">
+        <div class="message-container" @click="handleMessageBoxClick">
+          <el-scrollbar class="custom-scrollbar" style="height: 500px; width: 100%;" ref="manageRightRef">
+            <el-row v-for="m in msgList" :key="m.msgId">
             <el-row v-if="m.userId === userId && m.msgId == null" style="padding: 8px 0" type="flex" align="top" justify="end">
               <div style="display: flex;justify-content: flex-end">
                 <div style="display: flex;justify-content: flex-end;flex-direction: column;max-width: 200px;align-items: flex-end">
@@ -133,11 +134,11 @@
                     </div>
                   </el-col>
                   <el-col>
-                    <a style="cursor: pointer;color: #ff0000;padding: 8px 8px 0 0;font-size: 12px;" @click="changeUserState(m)">{{ m.msgStatus === 1 ? '解禁' : '禁言' }}</a>
-                    <a style="cursor: pointer;color: #ff0000;padding: 8px 8px 0 0;font-size: 12px;" @click="blockUser(m)">拉黑</a>
-                    <a v-if="m.singleVisible === 1" style="cursor: pointer;color: #ff0000;padding: 8px 8px 0 0;font-size: 12px;" @click="singleVisible(m)">解除用户自见</a>
-                    <a v-else style="cursor: pointer;color: #ff0000;padding: 8px 8px 0 0;font-size: 12px;" @click="singleVisible(m)">用户自见</a>
-                    <a style="cursor: pointer;color: #ff0000;padding: 8px 8px 0 0;font-size: 12px;" @click="deleteMsg(m)">删除</a>
+                    <a style="cursor: pointer;color: #ff0000;padding: 8px 8px 0 0;font-size: 12px;" @click.stop="changeUserState(m)">{{ m.msgStatus === 1 ? '解禁' : '禁言' }}</a>
+                    <a style="cursor: pointer;color: #ff0000;padding: 8px 8px 0 0;font-size: 12px;" @click.stop="blockUser(m)">拉黑</a>
+                    <a v-if="m.singleVisible === 1" style="cursor: pointer;color: #ff0000;padding: 8px 8px 0 0;font-size: 12px;" @click.stop="singleVisible(m)">解除用户自见</a>
+                    <a v-else style="cursor: pointer;color: #ff0000;padding: 8px 8px 0 0;font-size: 12px;" @click.stop="singleVisible(m)">用户自见</a>
+                    <a style="cursor: pointer;color: #ff0000;padding: 8px 8px 0 0;font-size: 12px;" @click.stop="deleteMsg(m)">删除</a>
                   </el-col>
                 </el-row>
               </el-col>
@@ -146,7 +147,20 @@
           </el-row>
           <!-- 底部留白 -->
           <div style="height: 20px;"></div>
-        </el-scrollbar>
+          </el-scrollbar>
+          <!-- 加载最新消息按钮 -->
+          <el-button
+            v-if="showLoadLatestBtn"
+            class="load-latest-btn"
+            type="primary"
+            size="small"
+            @click.stop="loadLatestMessages"
+            :disabled="isLoadingLatest"
+            :loading="isLoadingLatest"
+            icon="el-icon-refresh">
+            加载最新消息
+          </el-button>
+        </div>
         <!--        <div class="message-list">-->
         <!--          <div class="message-item" v-for="msg in msgList" :key="msg.id">-->
         <!--            <div class="message-avatar">-->
@@ -391,6 +405,17 @@ export default {
       topMsgForm: {
         msg: '',
         duration: 5
+      },
+      // 消息滚动控制
+      isAutoScrollEnabled: true, // 是否启用自动滚动
+      autoScrollTimer: null, // 自动滚动定时器
+      showLoadLatestBtn: false, // 是否显示加载最新消息按钮
+      isLoadingLatest: false, // 是否正在加载最新消息
+      scrollDebounceTimer: null, // 滚动防抖定时器
+      msgParams: {
+        pageNum: 1,
+        pageSize: 30,
+        liveId: null
       }
     };
   },
@@ -432,6 +457,70 @@ export default {
     this.initScrollListeners();
   },
   methods: {
+    // 点击消息框
+    handleMessageBoxClick() {
+      // 点击消息框时,停止自动滚动
+      this.isAutoScrollEnabled = false;
+      // 停止自动滚动定时器
+      if (this.autoScrollTimer) {
+        clearTimeout(this.autoScrollTimer);
+        this.autoScrollTimer = null;
+      }
+      // 检查是否在底部,如果不在底部则显示加载最新消息按钮
+      this.$nextTick(() => {
+        if (this.$refs.manageRightRef && this.$refs.manageRightRef.wrap) {
+          const wrap = this.$refs.manageRightRef.wrap;
+          const scrollHeight = wrap.scrollHeight;
+          const clientHeight = wrap.clientHeight;
+          const currentScrollTop = wrap.scrollTop;
+          const maxScrollTop = scrollHeight - clientHeight;
+
+          if (currentScrollTop < maxScrollTop - 50) {
+            this.showLoadLatestBtn = true;
+          }
+        }
+      });
+    },
+    // 滚动到底部
+    scrollToBottom(forceScroll = false) {
+      // 如果自动滚动被禁用且不是强制滚动,则不执行
+      if (!this.isAutoScrollEnabled && !forceScroll) {
+        return;
+      }
+
+      if (this.$refs.manageRightRef && this.$refs.manageRightRef.wrap) {
+        this.$nextTick(() => {
+          const wrap = this.$refs.manageRightRef.wrap;
+          if (!wrap) return;
+
+          const scrollHeight = wrap.scrollHeight;
+          const clientHeight = wrap.clientHeight;
+          const currentScrollTop = wrap.scrollTop;
+          const maxScrollTop = scrollHeight - clientHeight;
+
+          // 强制滚动或启用自动滚动时,直接滚动到底部并隐藏按钮
+          if (forceScroll || this.isAutoScrollEnabled) {
+            this.showLoadLatestBtn = false;
+            wrap.scrollTop = maxScrollTop;
+          }
+        });
+      }
+    },
+    // 加载最新消息
+    loadLatestMessages() {
+      // 如果正在加载,直接返回
+      if (this.isLoadingLatest) {
+        return;
+      }
+      this.isLoadingLatest = true;
+      this.showLoadLatestBtn = false;
+      // 恢复自动滚动
+      this.isAutoScrollEnabled = true;
+      // 重新请求最新消息
+      this.resetMsgParams();
+      // loadMsgList 中会自动滚动到底部,因为 isAutoScrollEnabled 已经是 true
+      this.loadMsgList();
+    },
     singleVisible(m){
       // 过滤当前所有消息 找到userId的相同的消息 更改他们的自可见状态
       m.singleVisible= m.singleVisible === 1 ? 0 : 1
@@ -638,12 +727,17 @@ export default {
             this.msgList.shift()
           }
           this.msgList.push(message)
-          // 移动到底部
-          this.$nextTick(() => {
-            setTimeout(() => {
-              this.$refs.manageRightRef.wrap.scrollTop = this.$refs.manageRightRef.wrap.scrollHeight - this.$refs.manageRightRef.wrap.clientHeight
-            }, 200)
-          })
+          // 如果启用自动滚动,自动滚动到底部
+          if (this.isAutoScrollEnabled) {
+            this.$nextTick(() => {
+              this.autoScrollTimer = setTimeout(() => {
+                this.scrollToBottom();
+              }, 200);
+            });
+          } else {
+            // 自动滚动被禁用时,显示加载最新消息按钮
+            this.showLoadLatestBtn = true;
+          }
         } else if (cmd === 'entry' || cmd === 'out') {
           const user = data;
           const online = cmd === 'entry' ? 0 : 1; // 0=在线,1=离线
@@ -717,7 +811,7 @@ export default {
             }
             if (res.data.liveType == 1) {
               this.videoParam.livingUrl = res.data.flvHlsUrl
-              this.videoParam.livingUrl = this.livingUrl.replace("flv","m3u8")
+              this.videoParam.livingUrl = this.videoParam.livingUrl.replace("flv","m3u8")
               // this.$nextTick(() => {
               //   this.initPlayer()
               // })
@@ -1077,22 +1171,13 @@ export default {
           let totalPage = (total % this.msgParams.pageSize == 0) ? Math.floor(total / this.msgParams.pageSize) : Math.floor(total / this.msgParams.pageSize + 1);
           rows.forEach(row => {
             if (!this.msgList.some(m => m.msgId === row.msgId)) {
-
               let user = this.alDisplayList.find(u => u.userId === row.userId)
               if (user) {
                 row.msgStatus = user.msgStatus
               } else {
                 row.msgStatus = 0
               }
-
               this.msgList.push(row)
-
-              // 移动到底部
-              this.$nextTick(() => {
-                setTimeout(() => {
-                  this.$refs.manageRightRef.wrap.scrollTop = this.$refs.manageRightRef.wrap.scrollHeight - this.$refs.manageRightRef.wrap.clientHeight
-                }, 200)
-              })
             }
           })
 
@@ -1101,14 +1186,70 @@ export default {
           this.alDisplayList.forEach(u => {
             this.msgList.filter(m => m.userId === u.userId).forEach(m => m.msgStatus = u.msgStatus)
           })
+          // 所有消息加载完成后,根据自动滚动状态决定是否滚动
+          this.$nextTick(() => {
+            setTimeout(() => {
+              // 重置加载状态
+              this.isLoadingLatest = false;
+
+              if (this.isAutoScrollEnabled) {
+                // 如果启用自动滚动,强制滚动到底部并隐藏按钮
+                this.scrollToBottom(true);
+              } else {
+                // 如果禁用自动滚动,检查是否在底部,决定是否显示按钮
+                if (this.$refs.manageRightRef && this.$refs.manageRightRef.wrap) {
+                  const wrap = this.$refs.manageRightRef.wrap;
+                  const scrollHeight = wrap.scrollHeight;
+                  const clientHeight = wrap.clientHeight;
+                  const currentScrollTop = wrap.scrollTop;
+                  const maxScrollTop = scrollHeight - clientHeight;
+
+                  if (currentScrollTop < maxScrollTop - 50) {
+                    this.showLoadLatestBtn = true;
+                  } else {
+                    this.showLoadLatestBtn = false;
+                  }
+                }
+              }
+            }, 300);
+          });
         }
       })
 
       // 添加滚动监听
       this.$nextTick(() => {
-        this.$refs.manageRightRef.wrap.addEventListener("scroll", this.manageRightScroll)
+        if (this.$refs.manageRightRef && this.$refs.manageRightRef.wrap) {
+          this.$refs.manageRightRef.wrap.addEventListener("scroll", this.manageRightScroll)
+        }
       })
     },
+    // 消息滚动监听(带防抖)
+    manageRightScroll() {
+      // 清除之前的防抖定时器
+      if (this.scrollDebounceTimer) {
+        clearTimeout(this.scrollDebounceTimer);
+      }
+
+      // 设置防抖,300ms内只执行一次
+      this.scrollDebounceTimer = setTimeout(() => {
+        this.saveChatScrollPosition();
+
+        // 检查是否滚动到底部
+        if (this.$refs.manageRightRef && this.$refs.manageRightRef.wrap) {
+          const wrap = this.$refs.manageRightRef.wrap;
+          const scrollHeight = wrap.scrollHeight;
+          const clientHeight = wrap.clientHeight;
+          const currentScrollTop = wrap.scrollTop;
+          const maxScrollTop = scrollHeight - clientHeight;
+
+          // 如果滚动到底部(距离底部小于50px),隐藏按钮并恢复自动滚动
+          if (currentScrollTop >= maxScrollTop - 50) {
+            this.showLoadLatestBtn = false;
+            this.isAutoScrollEnabled = true;
+          }
+        }
+      }, 300);
+    },
     loadUserTotals() {
       if (!this.liveId) return;
       // 假设后端提供一个接口返回总人数(如果没有,可通过首次加载全量数据后统计)
@@ -1201,6 +1342,7 @@ export default {
         pageSize: 30,
         liveId: this.liveId
       };
+      // 重置时不改变按钮状态,由后续的滚动逻辑决定
       this.taskParams = {
         currentPage: 1,
         pageSize: 20,
@@ -1321,6 +1463,16 @@ export default {
     if (this.autoMsgTimer != null) {
       clearInterval(this.autoMsgTimer);
     }
+    if (this.autoScrollTimer) {
+      clearTimeout(this.autoScrollTimer);
+    }
+    if (this.scrollDebounceTimer) {
+      clearTimeout(this.scrollDebounceTimer);
+    }
+    // 移除滚动监听器
+    if (this.$refs.manageRightRef && this.$refs.manageRightRef.wrap) {
+      this.$refs.manageRightRef.wrap.removeEventListener("scroll", this.manageRightScroll);
+    }
   },
   // 使用 deactivated 和 activated 钩子替代 beforeDestroy 和 destroyed
   deactivated() {
@@ -1624,4 +1776,14 @@ export default {
   text-align: center;
   border-radius: 4px;
 }
+.message-container {
+  position: relative;
+}
+.load-latest-btn {
+  position: absolute;
+  bottom: 20px;
+  right: 20px;
+  z-index: 10;
+  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
+}
 </style>

+ 170 - 57
src/views/live/liveConsole/LivePlayer.vue

@@ -1,7 +1,22 @@
 <template>
   <div class="live-player">
-    <video ref="videoPlayer" loop autoplay class="player">
-      <source :src="videoParam.videoUrl" type="application/x-mpegURL">
+    <!-- 修改:所有录播和回放都使用同一个video元素,MP4和HLS都支持 -->
+    <video
+      v-if="videoParam.liveType == 2 || videoParam.liveType == 3"
+      ref="videoPlayer"
+      :loop="videoParam.liveType == 2"
+      autoplay
+      class="player"
+    >
+      <!-- 去掉type,让浏览器自动检测 -->
+    </video>
+
+    <video
+      v-if="videoParam.liveType == 1"
+      ref="livePlayer"
+      autoplay
+      class="player"
+    >
     </video>
   </div>
 </template>
@@ -25,23 +40,33 @@ export default {
   },
   data() {
     return {
-      videoDuration: 0, // 视频总时长(秒)
-      startTime: 0, // 开播时间戳(毫秒)
-      hls: null, // HLS 实例
+      videoDuration: 0,
+      startTime: 0,
+      hls: null,
+      liveHls: null // 分开管理直播和录播的HLS实例
     };
   },
   mounted() {
-
-    // 这里可以添加播放器初始化逻辑
+    this.initPlayer();
   },
   methods: {
     videoPlay(url) {
-      if (Hls.isSupported()) {
-        const videoElement = this.$refs.videoPlayer
-        if (!videoElement) {
-          console.error('找不到 video 元素')
-          return
-        }
+      const videoElement = this.$refs.videoPlayer;
+      if (!videoElement) {
+        console.error('找不到 video 元素');
+        return;
+      }
+
+      // 判断是否是MP4格式
+      const isMp4 = url.toLowerCase().endsWith('.mp4') ||
+        url.toLowerCase().includes('.mp4?');
+
+      // 判断是否是HLS格式(m3u8)
+      const isHls = url.toLowerCase().endsWith('.m3u8') ||
+        url.toLowerCase().includes('.m3u8?');
+
+      if (isHls && Hls.isSupported()) {
+        // HLS格式使用hls.js播放
         this.hls = new Hls();
         this.hls.attachMedia(videoElement);
         this.hls.on(Hls.Events.MEDIA_ATTACHED, () => {
@@ -53,80 +78,165 @@ export default {
         this.hls.on(Hls.Events.ERROR, (event, data) => {
           console.error('HLS 错误:', data);
         });
-        // 1. 初始化开播时间
-        this.startTime = new Date(this.videoParam.startTime).getTime();
+
+        // 录播的时间位置计算
         if (this.videoParam.liveType === 2) {
-          // 2. 监听视频元数据加载完成(获取视频时长)
           videoElement.addEventListener('loadedmetadata', () => {
-            this.videoDuration = videoElement.duration; // 获取视频时长(秒)
-
-            // 初始化视频播放位置
+            this.videoDuration = videoElement.duration;
             this.updateVideoPosition(videoElement);
+          });
+        }
 
+      } else if (isMp4 || !isHls) {
+        // MP4格式或非HLS格式直接使用video元素播放
+        videoElement.src = url;
+
+        // 录播的时间位置计算
+        if (this.videoParam.liveType === 2) {
+          videoElement.addEventListener('loadedmetadata', () => {
+            this.videoDuration = videoElement.duration;
+            this.updateVideoPosition(videoElement);
           });
         }
+
+        // 触发播放
+        videoElement.load();
+        videoElement.play().catch(e => {
+          console.warn('自动播放失败:', e);
+        });
+
       } else {
-        console.error('浏览器不支持 HLS')
+        // 不支持HLS的浏览器,尝试直接播放
+        console.warn('浏览器不支持HLS,尝试直接播放');
+        videoElement.src = url;
+        videoElement.load();
+        videoElement.play().catch(e => {
+          console.warn('播放失败:', e);
+        });
       }
     },
-    updateVideoPosition(video){
-      const currentTime = new Date().getTime(); // 当前时间戳(毫秒)
-      const elapsedTime = currentTime - this.startTime; // 已流逝时间(毫秒)
+
+    updateVideoPosition(video) {
+      const currentTime = new Date().getTime();
+      this.startTime = new Date(this.videoParam.startTime).getTime();
+      const elapsedTime = currentTime - this.startTime;
+
       if (elapsedTime < 0) {
-        // 未开播:视频停在初始位置
         video.currentTime = 0;
         return;
       }
 
-      // 已开播:计算视频循环后的位置(流逝时间 % 视频时长)
-      const elapsedSeconds = elapsedTime / 1000; // 转换为秒
-      // 视频内的播放位置(秒)
-      // 设置视频播放位置
-      video.currentTime = elapsedSeconds % this.videoDuration;
+      const elapsedSeconds = elapsedTime / 1000;
+      if (this.videoDuration > 0) {
+        video.currentTime = elapsedSeconds % this.videoDuration;
+      }
+    },
+
+    livePlay(url) {
+      if (Hls.isSupported()) {
+        const videoElement = this.$refs.livePlayer;
+        if (!videoElement) {
+          console.error('找不到 video 元素');
+          return;
+        }
+
+        this.liveHls = new Hls();
+        this.liveHls.attachMedia(videoElement);
+        this.liveHls.on(Hls.Events.MEDIA_ATTACHED, () => {
+          this.liveHls.loadSource(url);
+          this.liveHls.on(Hls.Events.STREAM_LOADED, (event, data) => {
+            videoElement.play();
+          });
+        });
+        this.liveHls.on(Hls.Events.ERROR, (event, data) => {
+          console.error('HLS 错误:', data);
+        });
+
+      } else {
+        // 浏览器原生支持HLS(如Safari)
+        const videoElement = this.$refs.livePlayer;
+        if (videoElement.canPlayType('application/vnd.apple.mpegurl')) {
+          videoElement.src = url;
+          videoElement.play().catch(e => {
+            console.warn('自动播放失败:', e);
+          });
+        } else {
+          console.error('浏览器不支持 HLS');
+        }
+      }
     },
+
     initPlayer() {
+      // 清理之前的实例
+      if (this.hls) {
+        this.hls.destroy();
+        this.hls = null;
+      }
+      if (this.liveHls) {
+        this.liveHls.destroy();
+        this.liveHls = null;
+      }
 
       if (this.videoParam.liveType === 1) {
         // 直播
         const isUrl = this.videoParam.livingUrl === null || this.videoParam.livingUrl.trim() === '';
         if (isUrl) {
-          console.error('直播地址为空,无法初始化播放器')
-          return
+          console.error('直播地址为空,无法初始化播放器');
+          return;
         }
-        this.videoPlay(this.videoParam.livingUrl);
+        this.$nextTick(() => {
+          this.livePlay(this.videoParam.livingUrl);
+        });
         return;
       }
-      const viUrl = this.videoParam.videoUrl === null || this.videoParam.videoUrl.trim() === ''
+
+      const viUrl = this.videoParam.videoUrl === null || this.videoParam.videoUrl.trim() === '';
       if (viUrl) {
-        console.error('播放地址为空,无法初始化播放器')
-        return
+        console.error('播放地址为空,无法初始化播放器');
+        return;
       }
-      if(this.videoParam.liveType === 2){
-        // 录播
-        this.videoPlay(this.videoParam.videoUrl);
-      } else if(this.videoParam.liveType === 3){
-        // 直播回放
-        this.videoPlay(this.videoParam.videoUrl);
-      }else {
-        console.error('直播类型错误,无法初始化播放器')
+
+      if (this.videoParam.liveType === 2 || this.videoParam.liveType === 3) {
+        // 录播或直播回放
+        this.$nextTick(() => {
+          this.videoPlay(this.videoParam.videoUrl);
+        });
+      } else {
+        console.error('直播类型错误,无法初始化播放器');
       }
-      // 创建播放器实例
-      const videoPlayer = this.$refs.videoPlayer;
-      // 添加播放器事件监听器
-      videoPlayer.addEventListener('play', () => {
-        console.log('播放器已开始播放');
-      });
-      videoPlayer.addEventListener('pause', () => {
-        console.log('播放器已暂停');
-      });
-      videoPlayer.addEventListener('ended', () => {
-        console.log('播放器已结束');
-      });
     }
   },
+
+  watch: {
+    // 监听videoParam变化,重新初始化播放器
+    videoParam: {
+      handler() {
+        this.$nextTick(() => {
+          this.initPlayer();
+        });
+      },
+      deep: true
+    }
+  },
+
   beforeDestroy() {
-    this.hls?.destroy()
-    // 销毁播放器实例
+    // 销毁HLS实例
+    this.hls?.destroy();
+    this.liveHls?.destroy();
+
+    // 清理video元素
+    const videoElements = [
+      this.$refs.videoPlayer,
+      this.$refs.livePlayer
+    ];
+
+    videoElements.forEach(video => {
+      if (video) {
+        video.pause();
+        video.src = '';
+        video.load();
+      }
+    });
   }
 };
 </script>
@@ -140,5 +250,8 @@ export default {
   width: 100%;
   height: auto;
   border-radius: 8px;
+  max-height: 300px; /* 设置最大高度,避免过大 */
+  object-fit: contain; /* 保持比例,不拉伸 */
+  background-color: #000; /* 黑色背景,避免视频加载时显示白色 */
 }
 </style>

+ 355 - 5
src/views/live/liveData/index.vue

@@ -153,7 +153,7 @@
           size="small"
         ></el-input-number>
       </el-form-item>
-      <el-form-item label="时间范围" prop="dateRange">
+      <el-form-item label="开始时间范围" prop="dateRange">
         <el-date-picker
           v-model="dateRange"
           type="datetimerange"
@@ -309,11 +309,259 @@
         <el-button type="primary" @click="confirmAutoRemark">确 定</el-button>
       </div>
     </el-dialog>
+
+    <!-- 详情侧边栏 -->
+    <el-drawer
+      title="直播间详情"
+      :visible.sync="detailDrawerVisible"
+      direction="rtl"
+      size="60%"
+      :before-close="closeDetailDrawer"
+    >
+      <div v-if="!showUserDetail" class="detail-content">
+        <el-card shadow="never" style="margin-bottom: 20px;">
+          <div slot="header">
+            <span>总体数据</span>
+            <el-button style="float: right; padding: 3px 0" type="text" @click="handleViewUserDetail">查看用户详情</el-button>
+          </div>
+          <el-row :gutter="20">
+            <el-col :span="12">
+              <div class="detail-item">
+                <span class="detail-label">视频时长:</span>
+                <span class="detail-value">{{ formatDuration(detailData.videoDuration || 0) }}</span>
+              </div>
+            </el-col>
+            <el-col :span="12">
+              <div class="detail-item">
+                <span class="detail-label">累计观看人数:</span>
+                <span class="detail-value">{{ detailData.totalViewers || 0 }}</span>
+              </div>
+            </el-col>
+            <el-col :span="12">
+              <div class="detail-item">
+                <span class="detail-label">累计完课人数:</span>
+                <span class="detail-value">{{ detailData.totalCompletedCourses || 0 }}</span>
+              </div>
+            </el-col>
+            <el-col :span="12">
+              <div class="detail-item">
+                <span class="detail-label">到课完课率:</span>
+                <span class="detail-value">{{ formatPercent(detailData.totalCompletionRate) }}</span>
+              </div>
+            </el-col>
+          </el-row>
+        </el-card>
+
+        <el-card shadow="never" style="margin-bottom: 20px;">
+          <div slot="header">直播数据</div>
+          <el-row :gutter="20">
+            <el-col :span="12">
+              <div class="detail-item">
+                <span class="detail-label">直播观看人数:</span>
+                <span class="detail-value">{{ detailData.liveViewers || 0 }}</span>
+              </div>
+            </el-col>
+            <el-col :span="12">
+              <div class="detail-item">
+                <span class="detail-label">>20分钟人数(直播):</span>
+                <span class="detail-value">{{ detailData.liveOver20Minutes || 0 }}</span>
+              </div>
+            </el-col>
+            <el-col :span="12">
+              <div class="detail-item">
+                <span class="detail-label">>30分钟人数(直播):</span>
+                <span class="detail-value">{{ detailData.liveOver30Minutes || 0 }}</span>
+              </div>
+            </el-col>
+            <el-col :span="12">
+              <div class="detail-item">
+                <span class="detail-label">到课完课率直播(>20分钟):</span>
+                <span class="detail-value">{{ formatPercent(detailData.liveCompletionRate20) }}</span>
+              </div>
+            </el-col>
+            <el-col :span="12">
+              <div class="detail-item">
+                <span class="detail-label">到课完课率直播(>30分钟):</span>
+                <span class="detail-value">{{ formatPercent(detailData.liveCompletionRate30) }}</span>
+              </div>
+            </el-col>
+          </el-row>
+        </el-card>
+
+        <el-card shadow="never" style="margin-bottom: 20px;">
+          <div slot="header">回放数据</div>
+          <el-row :gutter="20">
+            <el-col :span="12">
+              <div class="detail-item">
+                <span class="detail-label">回放观看人数:</span>
+                <span class="detail-value">{{ detailData.playbackViewers || 0 }}</span>
+              </div>
+            </el-col>
+            <el-col :span="12">
+              <div class="detail-item">
+                <span class="detail-label">>20分钟人数(回放):</span>
+                <span class="detail-value">{{ detailData.playbackOver20Minutes || 0 }}</span>
+              </div>
+            </el-col>
+            <el-col :span="12">
+              <div class="detail-item">
+                <span class="detail-label">>30分钟人数(回放):</span>
+                <span class="detail-value">{{ detailData.playbackOver30Minutes || 0 }}</span>
+              </div>
+            </el-col>
+            <el-col :span="12">
+              <div class="detail-item">
+                <span class="detail-label">到课完课率回放(>20分钟):</span>
+                <span class="detail-value">{{ formatPercent(detailData.playbackCompletionRate20) }}</span>
+              </div>
+            </el-col>
+            <el-col :span="12">
+              <div class="detail-item">
+                <span class="detail-label">到课完课率回放(>30分钟):</span>
+                <span class="detail-value">{{ formatPercent(detailData.playbackCompletionRate30) }}</span>
+              </div>
+            </el-col>
+          </el-row>
+        </el-card>
+
+        <el-card shadow="never" style="margin-bottom: 20px;">
+          <div slot="header">时长统计</div>
+          <el-row :gutter="20">
+            <el-col :span="12">
+              <div class="detail-item">
+                <span class="detail-label">直播峰值:</span>
+                <span class="detail-value">{{ detailData.livePeak || 0 }}</span>
+              </div>
+            </el-col>
+            <el-col :span="12">
+              <div class="detail-item">
+                <span class="detail-label">直播平均时长:</span>
+                <span class="detail-value">{{ formatDuration(detailData.liveAvgDuration || 0) }}</span>
+              </div>
+            </el-col>
+            <el-col :span="12">
+              <div class="detail-item">
+                <span class="detail-label">回放平均时长:</span>
+                <span class="detail-value">{{ formatDuration(detailData.playbackAvgDuration || 0) }}</span>
+              </div>
+            </el-col>
+            <el-col :span="12">
+              <div class="detail-item">
+                <span class="detail-label">回放完播率:</span>
+                <span class="detail-value">{{ formatPercent(detailData.playbackFinishRate) }}</span>
+              </div>
+            </el-col>
+          </el-row>
+        </el-card>
+
+        <el-card shadow="never" style="margin-bottom: 20px;">
+          <div slot="header">订单数据</div>
+          <el-row :gutter="20">
+            <el-col :span="12">
+              <div class="detail-item">
+                <span class="detail-label">GMV:</span>
+                <span class="detail-value">{{ formatMoney(detailData.gmv) }}</span>
+              </div>
+            </el-col>
+            <el-col :span="12">
+              <div class="detail-item">
+                <span class="detail-label">付费人数:</span>
+                <span class="detail-value">{{ detailData.paidUsers || 0 }}</span>
+              </div>
+            </el-col>
+            <el-col :span="12">
+              <div class="detail-item">
+                <span class="detail-label">付费单数:</span>
+                <span class="detail-value">{{ detailData.paidOrders || 0 }}</span>
+              </div>
+            </el-col>
+            <el-col :span="12">
+              <div class="detail-item">
+                <span class="detail-label">峰值转化率:</span>
+                <span class="detail-value">{{ formatPercent(detailData.peakConversionRate) }}</span>
+              </div>
+            </el-col>
+            <el-col :span="12">
+              <div class="detail-item">
+                <span class="detail-label">总到课转化率:</span>
+                <span class="detail-value">{{ formatPercent(detailData.totalViewerConversionRate) }}</span>
+              </div>
+            </el-col>
+            <el-col :span="12">
+              <div class="detail-item">
+                <span class="detail-label">30min完课转化率:</span>
+                <span class="detail-value">{{ formatPercent(detailData.completion30MinConversionRate) }}</span>
+              </div>
+            </el-col>
+            <el-col :span="12">
+              <div class="detail-item">
+                <span class="detail-label">峰值R值:</span>
+                <span class="detail-value">{{ formatMoney(detailData.peakRValue) }}</span>
+              </div>
+            </el-col>
+            <el-col :span="12">
+              <div class="detail-item">
+                <span class="detail-label">完课R值:</span>
+                <span class="detail-value">{{ formatMoney(detailData.completionRValue) }}</span>
+              </div>
+            </el-col>
+          </el-row>
+        </el-card>
+
+        <el-card shadow="never" v-if="detailData.productSalesList && detailData.productSalesList.length > 0">
+          <div slot="header">单品销量统计</div>
+          <el-table :data="detailData.productSalesList" border>
+            <el-table-column prop="productName" label="商品名称" min-width="200"></el-table-column>
+            <el-table-column prop="salesCount" label="销量" width="100" align="center"></el-table-column>
+            <el-table-column prop="salesAmount" label="销售额" width="150" align="center">
+              <template slot-scope="scope">
+                {{ formatMoney(scope.row.salesAmount) }}
+              </template>
+            </el-table-column>
+          </el-table>
+        </el-card>
+      </div>
+
+      <!-- 用户详情列表 -->
+      <div v-else class="user-detail-content">
+        <div style="margin-bottom: 20px; display: flex; justify-content: space-between; align-items: center;">
+          <el-button type="text" icon="el-icon-arrow-left" @click="showUserDetail = false">返回</el-button>
+          <el-button type="primary" size="small" icon="el-icon-download" :loading="userDetailExportLoading" @click="handleExportUserDetail">导出用户详情</el-button>
+        </div>
+        <el-table
+          :data="userDetailList"
+          v-loading="userDetailLoading"
+          border
+          style="width: 100%"
+        >
+          <el-table-column type="index" label="序号" width="60" align="center"></el-table-column>
+          <el-table-column prop="userName" label="用户名称" min-width="120"></el-table-column>
+          <el-table-column prop="liveWatchDuration" label="直播观看时长" width="140" align="center">
+            <template slot-scope="scope">
+              {{ formatDuration(scope.row.liveWatchDuration || 0) }}
+            </template>
+          </el-table-column>
+          <el-table-column prop="playbackWatchDuration" label="回放观看时长" width="140" align="center">
+            <template slot-scope="scope">
+              {{ formatDuration(scope.row.playbackWatchDuration || 0) }}
+            </template>
+          </el-table-column>
+          <el-table-column prop="orderCount" label="订单数" width="100" align="center"></el-table-column>
+          <el-table-column prop="orderAmount" label="订单金额" width="120" align="center">
+            <template slot-scope="scope">
+              {{ formatMoney(scope.row.orderAmount) }}
+            </template>
+          </el-table-column>
+          <el-table-column prop="companyName" label="分公司" min-width="150"></el-table-column>
+          <el-table-column prop="salesName" label="销售" min-width="120"></el-table-column>
+        </el-table>
+      </div>
+    </el-drawer>
   </div>
 </template>
 
 <script>
-import { listLiveData, exportLiveData, autoTagAndRemark, dashboardData } from "@/api/live/liveData";
+import { listLiveData, exportLiveData, autoTagAndRemark, dashboardData, getLiveDataDetailBySql, getLiveUserDetailListBySql, exportLiveUserDetail } from "@/api/live/liveData";
 import { batchUpdateExternalContactNotes } from "@/api/qw/externalContact";
 import { addTag } from "@/api/qw/externalContact";
 
@@ -377,7 +625,15 @@ export default {
         rules: [],
         remarkFormat: 'time',
         position: 1
-      }
+      },
+      // 详情侧边栏
+      detailDrawerVisible: false,
+      currentLiveId: null,
+      detailData: {},
+      userDetailList: [],
+      userDetailLoading: false,
+      showUserDetail: false,
+      userDetailExportLoading: false
     };
   },
   created() {
@@ -582,8 +838,9 @@ export default {
     },
     /** 查看详情 */
     handleViewDetail(row) {
-      // 可以跳转到详情页面或打开详情弹窗
-      this.$message.info('查看详情功能待实现');
+      this.currentLiveId = row.liveId;
+      this.detailDrawerVisible = true;
+      this.loadDetailData();
     },
     /** 格式化时长 */
     formatDuration(seconds) {
@@ -609,6 +866,75 @@ export default {
       // this.getStatistics();
       this.getList();
       this.$message.success('设置成功');
+    },
+    /** 加载详情数据 */
+    loadDetailData() {
+      if (!this.currentLiveId) return;
+      // 使用SQL方式获取详情数据
+      getLiveDataDetailBySql(this.currentLiveId).then(response => {
+        if (response.code === 200) {
+          this.detailData = response.data || {};
+        }
+      });
+    },
+    /** 查看用户详情 */
+    handleViewUserDetail() {
+      if (!this.currentLiveId) return;
+      this.showUserDetail = true;
+      this.userDetailLoading = true;
+      getLiveUserDetailListBySql(this.currentLiveId).then(response => {
+        if (response.code === 200) {
+          this.userDetailList = response.data || [];
+        }
+        this.userDetailLoading = false;
+      }).catch(() => {
+        this.userDetailLoading = false;
+      });
+    },
+    /** 关闭详情侧边栏 */
+    closeDetailDrawer() {
+      this.detailDrawerVisible = false;
+      this.showUserDetail = false;
+      this.detailData = {};
+      this.userDetailList = [];
+      this.currentLiveId = null;
+    },
+    /** 格式化百分比 */
+    formatPercent(value) {
+      if (value == null || value === undefined) return '0%';
+      return (typeof value === 'number' ? value : parseFloat(value)).toFixed(2) + '%';
+    },
+    /** 格式化金额 */
+    formatMoney(value) {
+      if (value == null || value === undefined) return '¥0.00';
+      return '¥' + (typeof value === 'number' ? value : parseFloat(value)).toFixed(2);
+    },
+    /** 导出用户详情数据 */
+    handleExportUserDetail() {
+      if (!this.currentLiveId) {
+        this.$message.warning('无法获取直播间ID');
+        return;
+      }
+      if (!this.userDetailList || this.userDetailList.length === 0) {
+        this.$message.warning('暂无用户详情数据可导出');
+        return;
+      }
+      this.$confirm('是否确认导出当前直播间的用户详情数据?', "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(() => {
+        this.userDetailExportLoading = true;
+        return exportLiveUserDetail(this.currentLiveId);
+      }).then(response => {
+        if (response.code === 200) {
+          this.download(response.msg);
+          this.$message.success('导出成功');
+        }
+        this.userDetailExportLoading = false;
+      }).catch(() => {
+        this.userDetailExportLoading = false;
+      });
     }
   }
 };
@@ -656,4 +982,28 @@ export default {
   padding-left: 10px;
   padding-top: 30px;
 }
+
+.detail-content {
+  padding: 20px;
+}
+
+.detail-item {
+  margin-bottom: 15px;
+  line-height: 32px;
+}
+
+.detail-label {
+  color: #606266;
+  font-size: 14px;
+}
+
+.detail-value {
+  color: #303133;
+  font-size: 14px;
+  font-weight: bold;
+}
+
+.user-detail-content {
+  padding: 20px;
+}
 </style>

+ 42 - 31
src/views/live/liveOrder/index.vue

@@ -25,6 +25,15 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
+      <el-form-item label="销售名称" prop="companyUserName">
+        <el-input
+          v-model="queryParams.companyUserName"
+          placeholder="请输入销售名称"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
       <el-form-item label="订单号" prop="orderCode">
         <el-input
           v-model="queryParams.orderCode"
@@ -74,25 +83,25 @@
         />
       </el-form-item>
 
-      <el-form-item label="商品数量" prop="totalNum">
-        <el-input
-          v-model="queryParams.totalNum"
-          placeholder="请输入商品数量"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-
-      <el-form-item label="销售价格" prop="price">
-        <el-input
-          v-model="queryParams.price"
-          placeholder="请输入销售价格"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
+<!--      <el-form-item label="商品数量" prop="totalNum">-->
+<!--        <el-input-->
+<!--          v-model="queryParams.totalNum"-->
+<!--          placeholder="请输入商品数量"-->
+<!--          clearable-->
+<!--          size="small"-->
+<!--          @keyup.enter.native="handleQuery"-->
+<!--        />-->
+<!--      </el-form-item>-->
+
+<!--      <el-form-item label="销售价格" prop="price">-->
+<!--        <el-input-->
+<!--          v-model="queryParams.price"-->
+<!--          placeholder="请输入销售价格"-->
+<!--          clearable-->
+<!--          size="small"-->
+<!--          @keyup.enter.native="handleQuery"-->
+<!--        />-->
+<!--      </el-form-item>-->
 
       <el-form-item label="收货地址" prop="userAddress">
         <el-input
@@ -124,15 +133,15 @@
         />
       </el-form-item>
 
-      <el-form-item label="供应商" prop="supplierName">
-        <el-input
-          v-model="queryParams.supplierName"
-          placeholder="请输入供应商名称"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
+<!--      <el-form-item label="供应商" prop="supplierName">-->
+<!--        <el-input-->
+<!--          v-model="queryParams.supplierName"-->
+<!--          placeholder="请输入供应商名称"-->
+<!--          clearable-->
+<!--          size="small"-->
+<!--          @keyup.enter.native="handleQuery"-->
+<!--        />-->
+<!--      </el-form-item>-->
 
       <!-- 下单时间范围选择 -->
       <el-form-item label="下单时间" prop="orderTimeRange">
@@ -244,7 +253,7 @@
       <el-table-column label="商品分类" align="center" prop="cateName" v-if="showFinanceTableField"/>
       <el-table-column label="成交价" align="center" prop="payMoney"/>
       <el-table-column label="收货地址" align="center" prop="userAddress" width="200" />
-      <el-table-column label="对应供应商" align="center" prop="supplierName" width="120" />
+<!--      <el-table-column label="对应供应商" align="center" prop="supplierName" width="120" />-->
       <el-table-column label="下单时间" align="center" prop="createTime" width="180">
         <template slot-scope="scope">
           <span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
@@ -333,7 +342,7 @@
 </template>
 
 <script>
-import { listLiveOrderZm, exportLiveOrderZm,healthExportShippingOrder,importDeliveryNoteExpressTemplate } from "@/api/live/liveOrder";
+import { listLiveOrderZm, exportLiveOrderZm,healthExportShippingOrder,importDeliveryNoteExpressTemplate,exportZmNew } from "@/api/live/liveOrder";
 import liveOrderDetails from './liveOrderDetails.vue';
 import {getCompanyList} from "@/api/company/company";
 import Treeselect from "@riophae/vue-treeselect";
@@ -411,6 +420,7 @@ export default {
         liveId: null,
         pageSize: 10,
         companyId: null,
+        companyUserName: null,
         deptId: null,
         productName: null,
         productSpec: null,
@@ -610,7 +620,8 @@ export default {
         type: "warning"
       }).then(() => {
         this.exportLoading = true;
-        return exportLiveOrderZm(queryParams);
+        return exportZmNew(queryParams);
+        // return exportLiveOrderZm(queryParams);
       }).then(response => {
         this.download(response.msg);
         this.exportLoading = false;

+ 3 - 0
src/views/live/liveOrder/liveOrderDetails.vue

@@ -355,9 +355,12 @@
             <el-option key="SF"  label="顺丰" value="SF" />
             <el-option key="EMS"  label="邮政" value="EMS" />
             <el-option key="ZTO"  label="中通" value="ZTO" />
+            <el-option key="STO"  label="申通" value="STO" />
             <el-option key="JD"  label="京东" value="JD" />
             <el-option key="DBL"  label="德邦" value="DBL" />
+            <el-option key="JTSD"  label="极兔" value="JTSD" />
             <el-option key="YD"  label="韵达" value="YD" />
+            <el-option key="YTO"  label="圆通" value="YTO" />
           </el-select>
         </el-form-item>
         <el-form-item label="物流单号" prop="deliverySn"  >

+ 1292 - 0
src/views/live/order/index.vue

@@ -0,0 +1,1292 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="100px">
+      <el-form-item label="公司名" prop="companyId">
+        <el-select filterable v-model="queryParams.companyId" placeholder="请选择公司名" @change="companyChange" clearable size="small">
+          <el-option
+            v-for="item in companys"
+            :key="item.companyId"
+            :label="item.companyName"
+            :value="item.companyId"
+          />
+        </el-select>
+      </el-form-item>
+
+      <el-form-item>
+        <treeselect style="width: 220px" :clearable="false" v-model="queryParams.deptId" :options="deptOptions" :show-count="true" placeholder="请选择归属部门" />
+      </el-form-item>
+
+      <el-form-item label="订单类型" prop="orderTypeFilter">
+        <el-select v-model="queryParams.orderTypeFilter" placeholder="请选择订单类型" clearable size="small">
+          <el-option label="全部" :value="null" />
+          <el-option label="销售订单" :value="1" />
+          <el-option label="商城订单" :value="2" />
+          <el-option label="直播订单" :value="3" />
+        </el-select>
+      </el-form-item>
+
+      <el-form-item label="销售名称" prop="salesName">
+        <el-input
+          v-model="queryParams.salesName"
+          placeholder="请输入销售名称"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+
+      <el-form-item label="订单号" prop="orderCodes">
+        <div class="tag-input-container">
+          <div class="tags-wrapper" @click="focusInput">
+            <el-tag
+              v-for="(code, index) in queryParams.orderCodes"
+              :key="index"
+              closable
+              size="small"
+              @close="removeOrderCode(index)"
+              class="order-tag"
+            >
+              {{ code }}
+            </el-tag>
+            <el-input
+              ref="tagInput"
+              v-model="currentInput"
+              v-show="inputVisible || queryParams.orderCodes.length === 0"
+              :placeholder="queryParams.orderCodes.length === 0 ? '请输入订单号,按回车或逗号分隔' : '继续输入...'"
+              size="small"
+              class="tag-input"
+              @keydown.native="handleKeyDown"
+              @keyup.native="handleKeyUp"
+              @blur="handleInputConfirm"
+              @focus="inputVisible = true"
+              clearable
+            />
+            <el-button
+              v-if="!inputVisible && queryParams.orderCodes.length > 0"
+              class="button-new-tag"
+              size="small"
+              @click="showInput"
+              icon="el-icon-plus"
+              type="text"
+            >
+              添加订单号
+            </el-button>
+          </div>
+          <div class="input-tips">
+            <span class="tip-text">
+              支持:回车、逗号、空格分隔 |
+              已添加 {{ queryParams.orderCodes.length }} 个订单号
+            </span>
+          </div>
+        </div>
+      </el-form-item>
+
+      <el-form-item label="运单号" prop="deliveryId">
+        <el-input
+          v-model="queryParams.deliveryId"
+          placeholder="请输入运单号"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+
+      <el-form-item label="银行交易流水号" prop="bankTransactionId">
+        <el-input
+          v-model="queryParams.bankTransactionId"
+          placeholder="请输入银行交易流水号"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+
+      <el-form-item label="产品名称" prop="productName">
+        <el-input
+          v-model="queryParams.productName"
+          placeholder="请输入产品名称"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+
+      <el-form-item label="手机号" prop="userPhone">
+        <el-input
+          v-model="queryParams.userPhone"
+          placeholder="请输入手机号"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+
+      <el-form-item label="收件人" prop="realName">
+        <el-input
+          v-model="queryParams.realName"
+          placeholder="请输入收件人姓名"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+
+
+      <el-form-item label="支付方式" prop="payType">
+        <el-select v-model="queryParams.payType" placeholder="请选择支付方式" clearable size="small">
+          <el-option
+            v-for="item in payTypeOptions"
+            :key="item.dictValue"
+            :label="item.dictLabel"
+            :value="item.dictValue"
+          />
+        </el-select>
+      </el-form-item>
+
+<!--      <el-form-item label="上传凭证" prop="isUpload">-->
+<!--        <el-select v-model="queryParams.isUpload" placeholder="请选择" clearable size="small">-->
+<!--          <el-option key="0" label="未上传" value="0" />-->
+<!--          <el-option key="1" label="已上传" value="1" />-->
+<!--        </el-select>-->
+<!--      </el-form-item>-->
+
+<!--      <el-form-item label="物流状态" prop="deliveryStatus">-->
+<!--        <el-select v-model="queryParams.deliveryStatus" placeholder="请选择物流状态" clearable size="small">-->
+<!--          <el-option-->
+<!--            v-for="item in deliveryStatusOptions"-->
+<!--            :key="item.dictValue"-->
+<!--            :label="item.dictLabel"-->
+<!--            :value="item.dictValue"-->
+<!--          />-->
+<!--        </el-select>-->
+<!--      </el-form-item>-->
+
+      <el-form-item label="结算状态" prop="deliveryPayStatus">
+        <el-select v-model="queryParams.deliveryPayStatus" placeholder="请选择物流结算状态" clearable size="small">
+          <el-option
+            v-for="item in deliveryPayStatusOptions"
+            :key="item.dictValue"
+            :label="item.dictLabel"
+            :value="item.dictValue"
+          />
+        </el-select>
+      </el-form-item>
+
+      <el-form-item label="小程序" prop="appId">
+        <el-select v-model="queryParams.appId" placeholder="请选择所属小程序" clearable size="small">
+          <el-option
+            v-for="dict in appMallOptions"
+            :key="dict.appid"
+            :label="dict.name + '(' + dict.appid + ')'"
+            :value="dict.appid"
+          />
+        </el-select>
+      </el-form-item>
+
+      <el-form-item label="商品规格" prop="productSpec">
+        <el-input
+          v-model="queryParams.productSpec"
+          placeholder="请输入商品规格"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+
+<!--      <el-form-item label="商品数量" prop="totalNum">-->
+<!--        <el-input-->
+<!--          v-model="queryParams.totalNum"-->
+<!--          placeholder="请输入商品数量"-->
+<!--          clearable-->
+<!--          size="small"-->
+<!--          @keyup.enter.native="handleQuery"-->
+<!--        />-->
+<!--      </el-form-item>-->
+
+<!--      <el-form-item label="销售价格" prop="price">-->
+<!--        <el-input-->
+<!--          v-model="queryParams.price"-->
+<!--          placeholder="请输入销售价格"-->
+<!--          clearable-->
+<!--          size="small"-->
+<!--          @keyup.enter.native="handleQuery"-->
+<!--        />-->
+<!--      </el-form-item>-->
+
+      <el-form-item label="收货地址" prop="userAddress">
+        <el-input
+          v-model="queryParams.userAddress"
+          placeholder="请输入收货地址"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+
+      <el-form-item label="商品ID" prop="productId">
+        <el-input
+          v-model="queryParams.productId"
+          placeholder="请输入商品ID"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+
+<!--      <el-form-item label="成本价格" prop="cost">-->
+<!--        <el-input-->
+<!--          v-model="queryParams.cost"-->
+<!--          placeholder="请输入成本价格"-->
+<!--          clearable-->
+<!--          size="small"-->
+<!--          @keyup.enter.native="handleQuery"-->
+<!--        />-->
+<!--      </el-form-item>-->
+
+<!--      <el-form-item label="供应商" prop="supplierName">-->
+<!--        <el-input-->
+<!--          v-model="queryParams.supplierName"-->
+<!--          placeholder="请输入供应商名称"-->
+<!--          clearable-->
+<!--          size="small"-->
+<!--          @keyup.enter.native="handleQuery"-->
+<!--        />-->
+<!--      </el-form-item>-->
+
+      <el-form-item label="档期归属" prop="scheduleId">
+        <el-select filterable style="width: 215px" v-model="queryParams.scheduleId" placeholder="请选择档期" clearable size="small">
+          <el-option
+            v-for="item in scheduleOptions"
+            :key="item.id"
+            :label="item.name"
+            :value="item.id"
+          />
+        </el-select>
+      </el-form-item>
+
+      <el-form-item label="代服账户" prop="erpAccount" v-if="SFDFopen">
+        <el-select v-model="queryParams.erpAccount" style="width: 215px" placeholder="ERP账户" clearable size="small">
+          <el-option
+            v-for="dict in erpAccountQueryList"
+            :key="dict"
+            :label="dict"
+            :value="dict"
+          />
+        </el-select>
+      </el-form-item>
+
+      <el-form-item label="代服电话" prop="erpPhoneNumber" v-if="SFDFopen">
+        <el-input
+          v-model="queryParams.erpPhoneNumber"
+          placeholder="ERP电话"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+
+      <el-form-item label="下单时间" prop="createTimeRange">
+        <el-date-picker
+          style="width:215px"
+          clearable
+          size="small"
+          v-model="createTimeRange"
+          type="datetimerange"
+          value-format="yyyy-MM-dd HH:mm:ss"
+          range-separator="至"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期"
+          @change="handleOrderTimeChange"
+        />
+      </el-form-item>
+
+      <el-form-item label="支付时间" prop="payTimeRange">
+        <el-date-picker
+          style="width: 215px"
+          clearable
+          size="small"
+          v-model="payTimeRange"
+          type="datetimerange"
+          value-format="yyyy-MM-dd HH:mm:ss"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期"
+        />
+      </el-form-item>
+
+<!--      <el-form-item label="发货时间" prop="deliverySendTimeRange">-->
+<!--        <el-date-picker-->
+<!--          style="width:215px"-->
+<!--          clearable-->
+<!--          size="small"-->
+<!--          v-model="deliverySendTimeRange"-->
+<!--          type="daterange"-->
+<!--          value-format="yyyy-MM-dd"-->
+<!--          start-placeholder="开始日期"-->
+<!--          end-placeholder="结束日期"-->
+<!--        />-->
+<!--      </el-form-item>-->
+
+<!--      <el-form-item label="回单时间" prop="deliveryImportTimeRange">-->
+<!--        <el-date-picker-->
+<!--          style="width:215px"-->
+<!--          clearable-->
+<!--          size="small"-->
+<!--          v-model="deliveryImportTimeRange"-->
+<!--          type="daterange"-->
+<!--          value-format="yyyy-MM-dd"-->
+<!--          start-placeholder="开始日期"-->
+<!--          end-placeholder="结束日期"-->
+<!--        />-->
+<!--      </el-form-item>-->
+
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+<!--      <el-col :span="1.5">-->
+<!--        <el-button-->
+<!--          plain-->
+<!--          type="info"-->
+<!--          icon="el-icon-upload2"-->
+<!--          size="mini"-->
+<!--          @click="handleImport"-->
+<!--        >导入银行回单</el-button>-->
+<!--      </el-col>-->
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          icon="el-icon-download"
+          size="mini"
+          v-hasPermi="['live:order:export']"
+          :loading="exportLoading"
+          @click="handleExport"
+        >导出订单</el-button>
+      </el-col>
+<!--      <el-col :span="1.5">-->
+<!--        <el-button-->
+<!--          type="warning"-->
+<!--          icon="el-icon-download"-->
+<!--          size="mini"-->
+<!--          @click="handleExportItems"-->
+<!--        >导出订单明细</el-button>-->
+<!--      </el-col>-->
+<!--      <el-col :span="1.5">-->
+<!--        <el-button-->
+<!--          type="warning"-->
+<!--          icon="el-icon-s-order"-->
+<!--          size="mini"-->
+<!--          @click="openDeliveryNote"-->
+<!--        >批量导入物流单号</el-button>-->
+<!--      </el-col>-->
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          icon="el-icon-download"
+          size="mini"
+          v-hasPermi="['live:order:exportAll']"
+          @click="handleExportDetails"
+        >导出订单(明文)</el-button>
+      </el-col>
+<!--      <el-col :span="1.5">-->
+<!--        <el-button-->
+<!--          type="warning"-->
+<!--          icon="el-icon-download"-->
+<!--          size="mini"-->
+<!--          @click="handleExportItemsDetails"-->
+<!--        >导出订单明细(明文)</el-button>-->
+<!--      </el-col>-->
+      <el-col :span="1.5">
+        <el-button
+          icon="el-icon-tickets"
+          size="mini"
+          type="success"
+          :loading="exportShippingLoading"
+          @click="handleExportShippingOrder"
+        >导出发货单</el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-tabs type="card" v-model="activeName" @tab-click="handleClick">
+      <el-tab-pane label="全部订单" name="00"></el-tab-pane>
+      <el-tab-pane label="待支付" name="0"></el-tab-pane>
+      <el-tab-pane label="待发货" name="1"></el-tab-pane>
+      <el-tab-pane label="待收货" name="2"></el-tab-pane>
+      <el-tab-pane label="交易完成" name="3"></el-tab-pane>
+      <el-tab-pane label="退款中" name="-1"></el-tab-pane>
+      <el-tab-pane label="已退款" name="-2"></el-tab-pane>
+      <el-tab-pane label="已取消" name="-3"></el-tab-pane>
+    </el-tabs>
+
+    <el-table
+      ref="orderTable"
+      border
+      v-loading="loading"
+      :data="orderList"
+      @selection-change="handleSelectionChange"
+      :default-sort="{prop: 'createTime', order: 'descending'}"
+    >
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="订单类型" align="center" prop="orderTypeName" width="100px">
+        <template slot-scope="scope">
+          <el-tag :type="getOrderTypeTagType(scope.row.orderType)">
+            {{ scope.row.orderTypeName }}
+          </el-tag>
+        </template>
+      </el-table-column>
+      <el-table-column label="订单号" align="center" prop="orderCode" width="200px" />
+      <el-table-column label="银行交易流水号" align="center" prop="bankTransactionId" width="200px" />
+      <el-table-column label="所属公司" align="center" prop="companyName" />
+      <el-table-column label="销售名称" align="center" prop="salesName" width="120px" />
+      <el-table-column label="员工昵称" align="center" prop="companyUserNickName" width="120px" />
+      <el-table-column label="用户昵称" align="center" prop="nickname" width="150px" />
+      <el-table-column label="收件人" align="center" prop="realName" width="120px" />
+      <el-table-column label="手机号" align="center" prop="userPhone" width="120px" />
+      <el-table-column label="商品规格" align="center" prop="productSpec" width="120px" />
+      <el-table-column label="商品数量" align="center" prop="totalNum" width="100px" />
+      <el-table-column label="订单金额" align="center" prop="totalPrice" width="100px">
+        <template slot-scope="scope">
+          <span v-if="scope.row.totalPrice != null">{{ scope.row.totalPrice.toFixed(2) }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="应付金额" align="center" prop="payPrice" width="100px">
+        <template slot-scope="scope">
+          <span v-if="scope.row.payPrice != null">{{ scope.row.payPrice.toFixed(2) }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="实付金额" align="center" prop="payMoney" width="100px">
+        <template slot-scope="scope">
+          <span v-if="scope.row.payMoney != null">{{ scope.row.payMoney.toFixed(2) }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="下单时间" align="center" prop="createTime" width="180" />
+      <el-table-column label="支付时间" align="center" prop="payTime" width="180" />
+      <el-table-column label="支付方式" align="center" prop="payType" width="100px">
+        <template slot-scope="scope">
+          <el-tag v-for="(item, index) in payTypeOptions" :key="index" v-if="scope.row.payType == item.dictValue" size="mini">
+            {{ item.dictLabel }}
+          </el-tag>
+        </template>
+      </el-table-column>
+      <el-table-column label="状态" align="center" prop="status" width="100px">
+        <template slot-scope="scope">
+          <el-tag v-for="(item, index) in statusOptions" :key="index" v-if="scope.row.status == item.dictValue" size="mini">
+            {{ item.dictLabel }}
+          </el-tag>
+        </template>
+      </el-table-column>
+<!--      <el-table-column label="物流状态" align="center" prop="deliveryStatus" width="100px">-->
+<!--        <template slot-scope="scope">-->
+<!--          <el-tag v-for="(item, index) in deliveryStatusOptions" :key="index" v-if="scope.row.deliveryStatus == item.dictValue" size="mini">-->
+<!--            {{ item.dictLabel }}-->
+<!--          </el-tag>-->
+<!--        </template>-->
+<!--      </el-table-column>-->
+      <el-table-column label="运单号" align="center" prop="deliveryId" width="150px" />
+      <el-table-column label="商品ID" align="center" prop="productId" width="120px" />
+      <el-table-column label="商品名称" align="center" prop="productName" width="150px" />
+      <el-table-column label="条码" align="center" prop="barCode" width="120px" />
+      <el-table-column label="分类" align="center" prop="cateName" width="120px" />
+      <el-table-column label="运费" align="center" prop="payDelivery" width="100px">
+        <template slot-scope="scope">
+          <span v-if="scope.row.payDelivery != null">{{ scope.row.payDelivery }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="成本价" align="center" prop="cost" width="100px">
+        <template slot-scope="scope">
+          <span v-if="scope.row.cost != null">{{ scope.row.cost }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="操作" fixed="right" width="80px" align="center">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            @click="handleDetails(scope.row)"
+          >查看</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total > 0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 订单详情侧边栏 -->
+    <el-drawer
+      :title="drawerTitle"
+      :visible.sync="drawerVisible"
+      direction="rtl"
+      size="75%"
+      :before-close="closeDrawer"
+    >
+      <div v-loading="drawerLoading" style="min-height: 200px;">
+        <!-- 直播订单详情 -->
+        <liveDetail
+          v-if="currentOrderType === 3 && drawerVisible"
+          ref="liveDetailRef"
+          :order-id="currentOrderId"
+        />
+        <!-- 销售订单详情 -->
+        <userDetail
+          v-if="currentOrderType === 1 && drawerVisible"
+          ref="userDetailRef"
+          :order-id="currentOrderId"
+        />
+        <!-- 商城订单详情 -->
+        <storeDetail
+          v-if="currentOrderType === 2 && drawerVisible"
+          ref="storeDetailRef"
+          :order-id="currentOrderId"
+        />
+      </div>
+    </el-drawer>
+
+    <!-- 批量导入物流单号对话框 -->
+    <el-dialog
+      :before-close="cancelResetDeliveryNote"
+      :visible.sync="deliveryNoteOpen"
+      center
+      title="批量发货"
+      width="35%"
+    >
+      <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
+        <el-form-item label="小程序:" prop="miniAppId">
+          <el-select
+            v-model="ruleForm.miniAppId"
+            clearable
+            placeholder="请选择发货小程序"
+            style="width: 100%"
+          >
+            <el-option
+              v-for="item in miniAppList"
+              :key="item.appId"
+              :label="item.appName"
+              :value="item.appId"
+            />
+          </el-select>
+        </el-form-item>
+      </el-form>
+      <el-upload ref="upload" :action="uploadUrl" :auto-upload="false" :disabled="orderUpload.isUploading" :headers="orderUpload.headers"
+                 :limit="1" :on-progress="handleFileUploadProgress"
+                 :on-success="handleFileSuccess" accept=".xlsx, .xls" drag
+      >
+        <i class="el-icon-upload"></i>
+        <div class="el-upload__text">
+          将文件拖到此处,或
+          <em>点击上传</em>
+        </div>
+        <div slot="tip" class="el-upload__tip">
+          <el-link style="font-size:12px" type="info" @click="importDeliveryNoteTemplate">下载模板</el-link>
+        </div>
+        <div slot="tip" class="el-upload__tip" style="color:red">提示:仅允许导入"xls"或"xlsx"格式文件!</div>
+      </el-upload>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="cancelResetDeliveryNote">取 消</el-button>
+        <el-button type="primary" @click="submitDeliveryNote('ruleForm')">确 定</el-button>
+      </div>
+    </el-dialog>
+
+    <!-- 导入银行回单对话框 -->
+    <el-dialog :title="upload.title" :visible.sync="upload.open" append-to-body width="400px">
+      <el-upload ref="upload" :action="upload.url + '?updateSupport=' + upload.updateSupport" :auto-upload="false" :disabled="upload.isUploading"
+                 :headers="upload.headers" :limit="1"
+                 :on-progress="handleFileUploadProgress" :on-success="handleFileSuccess" accept=".xlsx, .xls" drag
+      >
+        <i class="el-icon-upload"></i>
+        <div class="el-upload__text">
+          将文件拖到此处,或
+          <em>点击上传</em>
+        </div>
+        <div slot="tip" class="el-upload__tip" style="color:red">提示:仅允许导入"xls"或"xlsx"格式文件!</div>
+      </el-upload>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitFileForm">确 定</el-button>
+        <el-button @click="upload.open = false">取 消</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { listMergedOrder, exportMergedOrder, exportMergedShipping, exportMergedOrderItems, exportMergedOrderDetails, exportMergedOrderItemsDetails, importDeliveryNoteExpressTemplate } from '@/api/live/mergedOrder'
+import { getCompanyList } from '@/api/company/company'
+import { treeselect } from '@/api/company/companyDept'
+import Treeselect from '@riophae/vue-treeselect'
+import '@riophae/vue-treeselect/dist/vue-treeselect.css'
+import liveDetail from './liveDetail.vue'
+import userDetail from './userDetail.vue'
+import storeDetail from './storeDetail.vue'
+import { getToken } from '@/utils/auth'
+import { getTcmScheduleList } from '@/api/company/schedule'
+import { list as getAppMallOptions } from '@/api/course/coursePlaySourceConfig'
+import { getErpAccount } from '@/api/hisStore/storeOrder'
+import { getConfigByKey } from '@/api/system/config'
+
+export default {
+  name: 'MergedOrder',
+  components: {Treeselect, liveDetail, userDetail, storeDetail },
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      exportLoading: false,
+      exportShippingLoading: false,
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 订单表格数据
+      orderList: [],
+      // 公司列表
+      companys: [],
+      companyId: null,
+      // 部门树选项
+      deptOptions: [],
+      // 字典
+      payTypeOptions: [],
+      deliveryStatusOptions: [],
+      deliveryPayStatusOptions: [],
+      statusOptions: [],
+      orderTypeOptions: [],
+      appMallOptions: [],
+      scheduleOptions: [],
+      erpAccountQueryList: [],
+      SFDFopen: false,
+      // 订单号标签输入相关
+      maxOrderCodes: 50,
+      inputVisible: false,
+      currentInput: '',
+      // 弹出层标题
+      title: '',
+      // 是否显示弹出层
+      open: false,
+      createTimeRange: [],
+      payTimeRange: [],
+      deliverySendTimeRange: [],
+      deliveryImportTimeRange: [],
+      activeName: '00',
+      // 侧边栏相关
+      drawerVisible: false,
+      drawerTitle: '订单详情',
+      currentOrderType: null,
+      currentOrderId: null,
+      drawerLoading: false,
+      // 上传相关
+      upload: {
+        open: false,
+        title: '',
+        isUploading: false,
+        updateSupport: 0,
+        headers: { Authorization: 'Bearer ' + getToken() },
+        url: process.env.VUE_APP_BASE_API + '/order/importExpress'
+      },
+      orderUpload: {
+        open: false,
+        title: '',
+        isUploading: false,
+        updateSupport: 0,
+        headers: { Authorization: 'Bearer ' + getToken() }
+      },
+      deliveryNoteOpen: false,
+      miniAppList: [],
+      ruleForm: {
+        miniAppId: null
+      },
+      rules: {
+        miniAppId: [
+          { required: true, message: '发货小程序不能为空' }
+        ]
+      },
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        companyId: null,
+        deptId: null,
+        orderTypeFilter: null,
+        salesName: null,
+        orderCodes: [],
+        orderCode: null,
+        orderCodeList: null,
+        deliveryId: null,
+        userPhone: null,
+        realName: null,
+        productName: null,
+        bankTransactionId: null,
+        productSpec: null,
+        productId: null,
+        totalNum: null,
+        price: null,
+        userAddress: null,
+        cost: null,
+        supplierName: null,
+        companyUserNickName: null,
+        orderType: null,
+        isUpload: null,
+        payType: null,
+        deliveryStatus: null,
+        deliveryPayStatus: null,
+        appId: null,
+        scheduleId: null,
+        erpAccount: null,
+        erpPhoneNumber: null,
+        status: null,
+        createTimeStart: null,
+        createTimeEnd: null,
+        createTimeRange: null,
+        payTimeRange: null,
+        deliverySendTimeRange: null,
+        deliveryImportTimeRange: null
+      }
+    }
+  },
+  created() {
+    // 初始化公司列表
+    getCompanyList().then(response => {
+      this.companys = response.data || []
+      if (this.companys != null && this.companys.length > 0) {
+        this.companyId = this.companys[0].companyId
+        this.getTreeselect()
+      }
+    }).catch(error => {
+      console.error('获取公司列表失败:', error)
+      this.companys = []
+    })
+
+    // 初始化支付方式字典
+    this.getDicts('store_pay_type').then((response) => {
+      this.payTypeOptions = response.data || []
+    }).catch(error => {
+      console.error('获取支付方式字典失败:', error)
+      this.payTypeOptions = []
+    })
+
+    // 初始化订单状态字典
+    this.getDicts('store_order_status').then((response) => {
+      this.statusOptions = response.data || []
+    }).catch(error => {
+      console.error('获取订单状态字典失败:', error)
+      this.statusOptions = []
+    })
+
+    // 初始化物流状态字典
+    this.getDicts('store_order_delivery_status').then((response) => {
+      this.deliveryStatusOptions = response.data || []
+    }).catch(error => {
+      console.error('获取物流状态字典失败:', error)
+      this.deliveryStatusOptions = []
+    })
+
+    // 初始化物流结算状态字典
+    this.getDicts('store_delivery_pay_status').then((response) => {
+      this.deliveryPayStatusOptions = response.data || []
+    }).catch(error => {
+      console.error('获取物流结算状态字典失败:', error)
+      this.deliveryPayStatusOptions = []
+    })
+
+    // // 初始化订单类型字典
+    // this.getDicts('store_order_type').then((response) => {
+    //   this.orderTypeOptions = response.data || []
+    // }).catch(error => {
+    //   console.error('获取订单类型字典失败:', error)
+    //   this.orderTypeOptions = []
+    // })
+
+    // 初始化档期归属列表
+    getTcmScheduleList().then(response => {
+      this.scheduleOptions = response.data || []
+    }).catch(error => {
+      console.error('获取档期归属列表失败:', error)
+      this.scheduleOptions = []
+    })
+
+    // 初始化小程序列表
+    this.getAppMallOptions()
+
+    // 初始化ERP账户列表
+    this.getErpAccountList()
+
+    // 加载订单列表
+    this.getList()
+  },
+  computed: {
+    uploadUrl() {
+      return process.env.VUE_APP_BASE_API +
+        '/order/importDeliveryNoteExpress?miniAppId=' +
+        this.ruleForm.miniAppId
+    }
+  },
+  methods: {
+    /** 查询订单列表 */
+    getList() {
+      this.loading = true
+      if (this.queryParams.status == '00') {
+        this.queryParams.status = null
+      }
+
+      // 处理订单号数组
+      if (this.queryParams.orderCodes && this.queryParams.orderCodes.length > 0) {
+        this.queryParams.orderCodeList = this.queryParams.orderCodes.join(',')
+      } else {
+        this.queryParams.orderCodeList = null
+      }
+
+      // 处理时间范围
+      if (this.createTimeRange != null && this.createTimeRange.length === 2) {
+        this.queryParams.createTimeRange = this.createTimeRange[0] + '--' + this.createTimeRange[1]
+      } else {
+        this.queryParams.createTimeRange = null
+      }
+
+      if (this.payTimeRange != null && this.payTimeRange.length === 2) {
+        this.queryParams.payTimeRange = this.payTimeRange[0] + '--' + this.payTimeRange[1]
+      } else {
+        this.queryParams.payTimeRange = null
+      }
+
+      if (this.deliverySendTimeRange != null && this.deliverySendTimeRange.length === 2) {
+        this.queryParams.deliverySendTimeRange = this.deliverySendTimeRange[0] + '--' + this.deliverySendTimeRange[1]
+      } else {
+        this.queryParams.deliverySendTimeRange = null
+      }
+
+      if (this.deliveryImportTimeRange != null && this.deliveryImportTimeRange.length === 2) {
+        this.queryParams.deliveryImportTimeRange = this.deliveryImportTimeRange[0] + '--' + this.deliveryImportTimeRange[1]
+      } else {
+        this.queryParams.deliveryImportTimeRange = null
+      }
+
+      listMergedOrder(this.queryParams).then(response => {
+        this.orderList = response.rows
+        this.total = response.total
+        this.loading = false
+        if (response.msg == 'knt') {
+          this.SFDFopen = true
+        } else {
+          this.SFDFopen = false
+        }
+      }).catch(error => {
+        console.error('查询失败:', error)
+        this.loading = false
+        this.$message.error('查询数据失败')
+      })
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1
+      this.getList()
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.createTimeRange = []
+      this.payTimeRange = []
+      this.deliverySendTimeRange = []
+      this.deliveryImportTimeRange = []
+      this.queryParams.orderCodes = []
+      this.currentInput = ''
+      this.inputVisible = false
+      this.resetForm('queryForm')
+      this.handleQuery()
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.id || item.orderId)
+      this.single = selection.length !== 1
+      this.multiple = !selection.length
+    },
+    handleClick(tab, event) {
+      this.activeName = tab.name
+      this.queryParams.status = tab.name
+      this.getList()
+    },
+    handleOrderTimeChange(value) {
+      if (value && value.length === 2) {
+        this.queryParams.createTimeStart = value[0]
+        this.queryParams.createTimeEnd = value[1]
+      } else {
+        this.queryParams.createTimeStart = null
+        this.queryParams.createTimeEnd = null
+      }
+    },
+    /** 导出订单 */
+    handleExport() {
+      this.prepareExportParams()
+      this.$confirm('是否确认导出所有订单数据项?', '警告', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        this.exportLoading = true
+        return exportMergedOrder(this.queryParams)
+      }).then(response => {
+        this.download(response.msg)
+        this.exportLoading = false
+      }).catch(() => {
+        this.exportLoading = false
+      })
+    },
+    /** 导出发货单 */
+    handleExportShippingOrder() {
+      this.prepareExportParams()
+      this.$confirm('是否确认导出所有订单明细数据项?', '警告', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        this.exportShippingLoading = true
+        return exportMergedShipping(this.queryParams)
+      }).then(response => {
+        this.download(response.msg)
+        this.exportShippingLoading = false
+      }).catch(() => {
+        this.exportShippingLoading = false
+      })
+    },
+    handleDetails(row) {
+      // 根据订单类型打开对应的侧边栏详情
+      this.currentOrderType = row.orderType
+
+      if (row.orderType === 1) {
+        // 销售订单
+        this.currentOrderId = row.id
+        this.drawerTitle = '销售订单详情'
+      } else if (row.orderType === 2) {
+        // 商城订单
+        this.currentOrderId = row.id
+        this.drawerTitle = '商城订单详情'
+      } else if (row.orderType === 3) {
+        // 直播订单
+        this.currentOrderId = row.orderId
+        this.drawerTitle = '直播订单详情'
+      }
+
+      this.drawerVisible = true
+    },
+    closeDrawer() {
+      this.drawerVisible = false
+      this.currentOrderType = null
+      this.currentOrderId = null
+    },
+    getOrderTypeTagType(orderType) {
+      const typeMap = {
+        1: 'success', // 销售订单
+        2: 'warning', // 商城订单
+        3: 'info' // 直播订单
+      }
+      return typeMap[orderType] || ''
+    },
+    /** 查询部门下拉树结构 */
+    getTreeselect() {
+      var param = { companyId: this.companyId }
+      treeselect(param).then((response) => {
+        this.deptOptions = response.data
+      })
+    },
+    companyChange(val) {
+      this.companyId = val
+      this.getTreeselect()
+    },
+    // 订单号标签输入相关方法
+    handleKeyDown(event) {
+      const { key, target } = event
+      if (key === 'Backspace' && !target.value && this.queryParams.orderCodes.length > 0) {
+        event.preventDefault()
+        this.removeOrderCode(this.queryParams.orderCodes.length - 1)
+      }
+      if ([',', ',', ' ', 'Enter'].includes(key)) {
+        event.preventDefault()
+        this.handleInputConfirm()
+      }
+    },
+    handleKeyUp(event) {
+      const value = event.target.value
+      if (/[,,\s]/.test(value)) {
+        this.handleInputConfirm()
+      }
+    },
+    handleInputConfirm() {
+      const inputValue = this.currentInput.trim()
+      if (inputValue) {
+        const codes = inputValue.split(/[,,\s]+/).filter(code => code.trim())
+        codes.forEach(code => {
+          this.addOrderCode(code.trim())
+        })
+      }
+      this.currentInput = ''
+    },
+    addOrderCode(code) {
+      if (!code) return
+      if (this.maxOrderCodes > 0 && this.queryParams.orderCodes.length >= this.maxOrderCodes) {
+        this.$message.warning(`最多只能添加 ${this.maxOrderCodes} 个订单号`)
+        return
+      }
+      if (this.queryParams.orderCodes.includes(code)) {
+        this.$message.warning(`订单号 "${code}" 已存在`)
+        return
+      }
+      this.queryParams.orderCodes.push(code)
+    },
+    removeOrderCode(index) {
+      this.queryParams.orderCodes.splice(index, 1)
+    },
+    showInput() {
+      this.inputVisible = true
+      this.$nextTick(() => {
+        if (this.$refs.tagInput) {
+          this.$refs.tagInput.focus()
+        }
+      })
+    },
+    focusInput() {
+      if (!this.inputVisible) {
+        this.showInput()
+      }
+    },
+    // 导出相关方法
+    handleExportItems() {
+      this.prepareExportParams()
+      this.$confirm('是否确认导出所有订单明细数据项?', '警告', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        return exportMergedOrderItems(this.queryParams)
+      }).then(response => {
+        this.download(response.msg)
+      }).catch(() => {})
+    },
+    handleExportDetails() {
+      this.prepareExportParams()
+      this.$confirm('是否确认导出所有订单数据项(明文)?', '警告', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        return exportMergedOrderDetails(this.queryParams)
+      }).then(response => {
+        this.download(response.msg)
+      }).catch(() => {})
+    },
+    handleExportItemsDetails() {
+      this.prepareExportParams()
+      this.$confirm('是否确认导出所有订单明细数据项(明文)?', '警告', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        return exportMergedOrderItemsDetails(this.queryParams)
+      }).then(response => {
+        this.download(response.msg)
+      }).catch(() => {})
+    },
+    prepareExportParams() {
+      if (this.queryParams.status == '00') {
+        this.queryParams.status = null
+      }
+      if (this.createTimeRange != null && this.createTimeRange.length === 2) {
+        this.queryParams.createTimeRange = this.createTimeRange[0] + '--' + this.createTimeRange[1]
+      } else {
+        this.queryParams.createTimeRange = null
+      }
+      if (this.payTimeRange != null && this.payTimeRange.length === 2) {
+        this.queryParams.payTimeRange = this.payTimeRange[0] + '--' + this.payTimeRange[1]
+      } else {
+        this.queryParams.payTimeRange = null
+      }
+      if (this.deliverySendTimeRange != null && this.deliverySendTimeRange.length === 2) {
+        this.queryParams.deliverySendTimeRange = this.deliverySendTimeRange[0] + '--' + this.deliverySendTimeRange[1]
+      } else {
+        this.queryParams.deliverySendTimeRange = null
+      }
+      if (this.deliveryImportTimeRange != null && this.deliveryImportTimeRange.length === 2) {
+        this.queryParams.deliveryImportTimeRange = this.deliveryImportTimeRange[0] + '--' + this.deliveryImportTimeRange[1]
+      } else {
+        this.queryParams.deliveryImportTimeRange = null
+      }
+      if (this.queryParams.orderCodes && this.queryParams.orderCodes.length > 0) {
+        this.queryParams.orderCodeList = this.queryParams.orderCodes.join(',')
+      } else {
+        this.queryParams.orderCodeList = null
+      }
+    },
+    // 导入相关方法
+    handleImport() {
+      this.upload.title = '导入银行回单'
+      this.upload.open = true
+    },
+    submitFileForm() {
+      this.$refs.upload.submit()
+    },
+    handleFileUploadProgress(event, file, fileList) {
+      this.upload.isUploading = true
+    },
+    handleFileSuccess(response, file, fileList) {
+      this.upload.open = false
+      this.upload.isUploading = false
+      if (this.$refs.upload) {
+        this.$refs.upload.clearFiles()
+      }
+      this.$message.success('导入成功')
+      this.getList()
+    },
+    // 批量导入物流单号
+    openDeliveryNote() {
+      this.deliveryNoteOpen = true
+      this.getAppList()
+    },
+    getAppList() {
+      this.miniAppList = []
+      const key = 'courseMa.config'
+      getConfigByKey(key).then(response => {
+        const { code, data } = response
+        if (code === 200) {
+          let value = data?.configValue
+          if (value) {
+            try {
+              const appList = JSON.parse(value)
+              this.miniAppList = appList.filter(v => v.type === '1').map(v => {
+                return { appId: v.appid, appName: v.name }
+              })
+            } catch (parseError) {
+              console.error('解析小程序配置失败:', parseError)
+              this.miniAppList = []
+            }
+          }
+        }
+      }).catch(error => {
+        console.error('获取小程序配置失败:', error)
+        this.miniAppList = []
+      })
+    },
+    importDeliveryNoteTemplate() {
+      importDeliveryNoteExpressTemplate().then((response) => {
+        this.download(response.msg)
+      })
+    },
+    submitDeliveryNote(formName) {
+      this.$refs[formName].validate((valid) => {
+        if (valid) {
+          const uploadFiles = this.$refs.upload.uploadFiles
+          if (uploadFiles.length === 0) {
+            this.$message.error('请选择要上传的文件')
+            return
+          }
+          this.$refs.upload.submit()
+        } else {
+          return false
+        }
+      })
+    },
+    cancelResetDeliveryNote() {
+      this.deliveryNoteOpen = false
+      this.resetForm('ruleForm')
+    },
+    // 获取小程序选项列表
+    getAppMallOptions() {
+      getAppMallOptions({ pageNum: 1, pageSize: 100, isMall: 1 }).then(response => {
+        this.appMallOptions = response.rows || []
+      }).catch(error => {
+        console.error('获取小程序选项列表失败:', error)
+        this.appMallOptions = []
+      })
+    },
+    // 获取ERP账户列表
+    async getErpAccountList() {
+      try {
+        const response = await getErpAccount()
+        if (response.code === 200) {
+          const list = response.data || []
+          this.erpAccountQueryList = [...list, '未分拣']
+        } else {
+          this.erpAccountQueryList = []
+        }
+      } catch (error) {
+        console.error('获取ERP账户列表失败:', error)
+        this.erpAccountQueryList = []
+      }
+    }
+  }
+}
+</script>
+
+<style scoped>
+.tag-input-container {
+  min-width: 445px;
+}
+
+.tags-wrapper {
+  min-height: 32px;
+  padding: 4px 8px;
+  border: 1px solid #dcdfe6;
+  border-radius: 4px;
+  cursor: text;
+  display: flex;
+  flex-wrap: wrap;
+  align-items: center;
+  gap: 4px;
+  transition: border-color 0.2s;
+}
+
+.tags-wrapper:hover {
+  border-color: #c0c4cc;
+}
+
+.tags-wrapper:focus-within {
+  border-color: #409eff;
+  box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.2);
+}
+
+.order-tag {
+  margin: 2px;
+  flex-shrink: 0;
+}
+
+.tag-input {
+  border: none;
+  outline: none;
+  flex: 1;
+  min-width: 120px;
+}
+
+.tag-input >>> .el-input__inner {
+  border: none;
+  padding: 0;
+  height: 24px;
+  line-height: 24px;
+}
+
+.button-new-tag {
+  height: 24px;
+  line-height: 22px;
+  padding: 0 8px;
+  margin: 2px;
+}
+
+.input-tips {
+  margin-top: 4px;
+  font-size: 12px;
+  color: #909399;
+}
+
+.tip-text {
+  display: flex;
+  align-items: center;
+  gap: 8px;
+}
+</style>
+

+ 1118 - 0
src/views/live/order/liveDetail.vue

@@ -0,0 +1,1118 @@
+<template>
+  <div style="background-color: #f0f2f5; padding-bottom: 20px; min-height: 100%; " >
+    <div style="padding: 20px; background-color: #fff;">
+      订单详情
+    </div>
+    <div class="contentx" v-if="item!=null">
+      <div class="desct"></div>
+      <div class="order-status" v-if="item!=null" >
+        <el-steps  :active="item.status+1" align-center>
+          <el-step title="待支付"></el-step>
+          <el-step title="待发货"></el-step>
+          <el-step title="待收货"></el-step>
+          <el-step title="已完成"></el-step>
+        </el-steps>
+      </div>
+      <el-card shadow="never" style="margin-top: 15px">
+        <div class="operate-container"  v-if="item!=null">
+               <span style="margin-left: 20px" class="color-danger">订单状态:
+                  <el-tag prop="status" v-for="(ite, index) in orderOptions"    v-if="item.status==ite.dictValue">{{ite.dictLabel}}</el-tag>
+               </span>
+          <div class="operate-button-container" v-if="item.status==3">
+            <el-button size="mini" @click="finishOrder()" v-hasPermi="['his:liveOrder:good']">确认收货</el-button>
+          </div>
+          <div class="operate-button-container"  v-if="item.status==2&&item.orderType==1">
+            <el-button size="mini" @click="sendVisible=true" v-hasPermi="['his:liveOrder:sendGoods']">发货</el-button>
+          </div>
+          <div class="operate-button-container"  v-if="item.status==2&&item.orderType==2">
+            <el-button size="mini" @click="tuiOrder()" v-hasPermi="['his:liveOrder:sendHisGoods']" >推送订单</el-button>
+          </div>
+          <div class="operate-button-container"   v-if="item.deliverySn!=null" v-hasPermi="['his:liveOrder:express']">
+            <el-button size="mini" @click="showExpress()" >查看物流</el-button>
+          </div>
+          <div class="operate-button-container" >
+            <el-button size="mini" @click="editDelivery()"  v-hasPermi="['his:liveOrder:updateDelivery']" >修改物流单号</el-button>
+          </div>
+
+          <div class="operate-button-container" >
+            <el-button size="mini" @click="editOrder()"  v-hasPermi="['his:liveOrder:edit']" >修改订单</el-button>
+          </div>
+          <div class="operate-button-container" v-if="item.extendOrderId == null"  >
+            <el-button size="mini" @click="addErpOrder()" >创建ERP订单信息</el-button>
+          </div>
+          <div class="operate-button-container" v-if="item.extendOrderId!=null"  >
+            <el-button size="mini" @click="showErpOrder()" >ERP订单信息</el-button>
+          </div>
+          <div class="operate-button-container" v-if="item.status>1">
+            <el-button size="mini" @click="refund()" v-hasPermi="['his:liveOrder:refundOrderMoney']">退款</el-button>
+          </div>
+        </div>
+        <div class="desct">
+          基本信息
+        </div>
+        <el-descriptions :column="3" border  >
+          <el-descriptions-item label="订单编号"  ><span v-if="item!=null">{{item.orderCode}}</span></el-descriptions-item>
+          <el-descriptions-item label="会员"><span v-if="item.nickName!=null">{{item.nickName}}({{item.phone}})</span></el-descriptions-item>
+          <el-descriptions-item label="支付方式"  ><dict-tag :options="PayOptions" :value="item.payType"/></el-descriptions-item>
+          <el-descriptions-item label="收货人" >  <span v-if="item!=null">{{item.userName}}</span>  </el-descriptions-item>
+          <el-descriptions-item label="手机号码" > <span v-if="item!=null">{{item.userPhone}}</span>
+            <el-button icon="el-icon-search" size="mini" @click="handlePhone()" style="margin-left: 20px;" circle v-hasPermi="['his:liveOrder:queryPhone']"></el-button>
+          </el-descriptions-item>
+          <el-descriptions-item label="收货地址" > <span>{{item.userAddress}}</span>  </el-descriptions-item>
+          <el-descriptions-item label="所属公司"><span v-if="item!=null">{{item.companyName}}</span></el-descriptions-item>
+          <el-descriptions-item label="员工"><span v-if="item!=null">{{item.companyUserName}}</span></el-descriptions-item>
+          <el-descriptions-item label="推广佣金" ><span v-if="item.tuiMoney!=null">{{item.tuiMoney.toFixed(2)}}</span></el-descriptions-item>
+          <el-descriptions-item label="推广佣金状态" ><span v-if="item!=null"><dict-tag :options="tuiOptions" :value="item.tuiMoneyStatus"/> </span></el-descriptions-item>
+          <el-descriptions-item label="ERP编号" ><span v-if="item!=null">{{item.extendOrderId}}</span></el-descriptions-item>
+          <el-descriptions-item label="用户备注" ><span v-if="item!=null">{{item.remark}}</span></el-descriptions-item>
+          <el-descriptions-item label="档期归属" >
+            <el-tag prop="scheduleId" v-for="(schedule, index) in scheduleOptions"    v-if="item!=null&&item.scheduleId==schedule.id">{{schedule.name}}
+            </el-tag>
+          </el-descriptions-item>
+          <el-descriptions-item label="订单购买类型" ><span v-if="item!=null"><dict-tag :options="orderBuyTypeOptions" :value="item.orderBuyType"/></span></el-descriptions-item>
+          <el-descriptions-item label=" 公众号/渠道" ><span v-if="item!=null">{{item.channel}}</span></el-descriptions-item>
+          <el-descriptions-item label=" 渠道" ><span v-if="item!=null"><dict-tag :options="channelOptions" :value="item.orderChannel"/></span></el-descriptions-item>
+          <el-descriptions-item label=" 企微主体" ><span v-if="item!=null"><dict-tag :options="qwSubjectOptions" :value="item.qwSubject"/></span></el-descriptions-item>
+        </el-descriptions>
+      </el-card>
+    </div>
+<!--    <div class="contentx" v-if="item!=null" style="padding-bottom: 70px;">-->
+<!--      <div style="margin-top: 20px">-->
+<!--        <div class="desct">-->
+<!--          物流信息-->
+<!--        </div>-->
+<!--        &nbsp;-->
+<!--        <el-link  type="primary" @click="editDelivery(null)">添加物流信息</el-link>-->
+<!--      </div>-->
+<!--      <el-table-->
+<!--        border-->
+<!--        :data="deliverList"-->
+<!--        size="small"-->
+<!--        style="width: 100%;margin-top: 20px" >-->
+<!--        <el-table-column label="物流公司编码" width="150" align="center">-->
+<!--          <template slot-scope="scope">-->
+<!--            <p>{{scope.row.deliverSn}}</p>-->
+<!--          </template>-->
+<!--        </el-table-column>-->
+<!--        <el-table-column label="物流公司名称" width="300" align="center">-->
+<!--          <template slot-scope="scope">-->
+<!--            <p>{{scope.row.deliverName}}</p>-->
+<!--          </template>-->
+<!--        </el-table-column>-->
+<!--        <el-table-column label="物流单号" width="300" align="center">-->
+<!--          <template slot-scope="scope">-->
+<!--            <p>{{scope.row.deliverId}}</p>-->
+<!--          </template>-->
+<!--        </el-table-column>-->
+<!--        <el-table-column label="物流状态" width="300" align="center">-->
+<!--          <template slot-scope="scope">-->
+<!--              <span>-->
+<!--              <el-tag v-for="(item, index) in deliveryStatusOptions"    v-if="scope.row!=null&&scope.row.status==item.dictValue">-->
+<!--              {{item.dictLabel}}-->
+<!--              </el-tag>-->
+<!--              </span>-->
+<!--          </template>-->
+<!--        </el-table-column>-->
+<!--        <el-table-column label="发货时间" width="240" align="center">-->
+<!--          <template slot-scope="scope">-->
+<!--            {{scope.row.deliverySendTime}}-->
+<!--          </template>-->
+<!--        </el-table-column>-->
+<!--        <el-table-column label="操作" width="240" align="center">-->
+<!--          <template slot-scope="scope">-->
+<!--            <el-link  type="primary" @click="showExpress(scope)">查看物流跟踪</el-link>-->
+<!--            &nbsp;&nbsp;-->
+<!--            <el-link  type="primary" @click="editDelivery(scope)">修改物流</el-link>-->
+<!--          </template>-->
+<!--        </el-table-column>-->
+<!--      </el-table>-->
+<!--    </div>-->
+    <div class="contentx" v-if="item!=null" style="padding-bottom: 70px;">
+      <div class="desct">
+        商品信息
+      </div>
+      <el-tooltip class="item" effect="dark" :content="showList ? '显示全部' : '隐藏'" placement="top" style="float: right;">
+        <el-button size="mini" circle icon="el-icon-search" @click="showListD()" />
+      </el-tooltip>
+      <el-table border v-if="showProd!=null" :data="showProd" size="small" style="width: 100%;margin-top: 20px" >
+        <el-table-column label="商品图片" width="150" align="center">
+          <template slot-scope="scope">
+            <img :src="scope.row.imgUrl" style="height: 80px">
+          </template>
+        </el-table-column>
+        <el-table-column label="商品编码" width="300" align="center">
+          <template slot-scope="scope">
+            <p>{{scope.row.barCode}}</p>
+          </template>
+        </el-table-column>
+        <el-table-column label="仓库代码" width="300" align="center">
+          <template slot-scope="scope">
+            <p>{{scope.row.warehouseCode}}</p>
+          </template>
+        </el-table-column>
+        <el-table-column label="商品名称" width="300" align="center">
+          <template slot-scope="scope">
+            <p>{{scope.row.productName}}</p>
+          </template>
+        </el-table-column>
+        <el-table-column label="单价" width="240" align="center">
+          <template slot-scope="scope">
+            <p>¥{{scope.row.price.toFixed(2)}}</p>
+          </template>
+        </el-table-column>
+        <el-table-column label="市场价" width="240" align="center">
+          <template slot-scope="scope">
+            {{scope.row.otPrice}}
+          </template>
+        </el-table-column>
+      </el-table>
+      <div style="float: right;margin: 20px" v-if="item.totalPrice!=null">
+        合计:<span class="color-danger">¥{{item.totalPrice.toFixed(2)}}</span>
+      </div>
+    </div>
+    <div class="contentx" v-if="item!=null" style="padding-bottom: 70px;">
+      <div class="desct">
+        费用信息
+      </div>
+      <el-tooltip class="item" effect="dark" :content="showList ? '显示全部' : '隐藏'" placement="top" style="float: right;">
+        <el-button size="mini" circle icon="el-icon-search" @click="showListD()" />
+      </el-tooltip>
+      <el-descriptions :column="3" border  >
+        <el-descriptions-item label="商品合计"  ><span v-if="item!=null">{{item.totalPrice}}</span></el-descriptions-item>
+        <el-descriptions-item label="应付金额"><span v-if="item.totalPrice!=null">{{item.totalPrice}}</span></el-descriptions-item>
+        <el-descriptions-item label="运费"><span v-if="item.payDelivery!=null">{{item.payDelivery}}</span></el-descriptions-item>
+        <el-descriptions-item label="优惠券"  ><span v-if="item.discountMoney!=null"/>{{item.discountMoney}}</el-descriptions-item>
+        <el-descriptions-item label="积分抵扣" >  <span v-if="item!=null">{{item.payIntegral}}</span>  </el-descriptions-item>
+        <el-descriptions-item label="实付金额" >  <span v-if="item!=null">{{item.payMoney}}</span>  </el-descriptions-item>
+        <el-descriptions-item label="代收金额" >  <span v-if="item!=null">{{item.payRemain}}</span>  </el-descriptions-item>
+        <el-descriptions-item label="服务费" >  <span v-if="item!=null">{{0.00}}</span>  </el-descriptions-item>
+      </el-descriptions>
+      <div style="float: right;margin: 20px" v-if="item.totalPrice!=null">
+        合计:<span class="color-danger">¥{{item.totalPrice.toFixed(2)}}</span>
+      </div>
+    </div>
+
+    <div class="contentx" v-if="payments!=null" style="padding-bottom: 70px;">
+      <div class="desct">
+        支付信息
+      </div>
+    <el-table
+      border
+      :data="payments"
+      size="small"
+      style="width: 100%;margin-top: 20px" >
+      <el-table-column label="支付单号" align="center" prop="payCode" width="120px" />
+      <el-table-column label="支付金额" align="center" prop="payMoney" />
+      <el-table-column label="类型" align="center" prop="payTypeCode" />
+      <el-table-column label="交易单号" align="center" prop="bankTransactionId" />
+      <el-table-column label="银行单号" align="center" prop="bankSerialNo" />
+      <el-table-column label="创建时间" align="center" prop="createTime" />
+      <el-table-column label="支付时间" align="center" prop="payTime" />
+    </el-table>
+    </div>
+
+    <div class="contentx" v-if="logs!=null" style="padding-bottom: 70px;">
+
+      <div class="desct">
+        操作信息
+      </div>
+    <el-table style="margin-top: 20px;width: 100%"
+              ref="orderHistoryTable"
+              :data="logs" border>
+      <el-table-column label="操作时间"  width="160" align="center">
+        <template slot-scope="scope">
+          {{scope.row.changeTime}}
+        </template>
+      </el-table-column>
+      <el-table-column label="备注" align="center">
+        <template slot-scope="scope">
+          {{scope.row.changeMessage}}
+        </template>
+      </el-table-column>
+    </el-table>
+</div>
+
+    <div class="contentx" v-if="tuiMoneyLogs!=null" style="padding-bottom: 70px;">
+
+      <div class="desct">
+        分佣信息
+      </div>
+    <el-table
+      border
+      :data="tuiMoneyLogs"
+      size="small"
+      style="width: 100%;margin-top: 20px" >
+      <el-table-column label="公司名称" align="center" prop="companyName" width="120px" />
+      <el-table-column label="金额" align="center" prop="money" />
+      <el-table-column label="余额" align="center" prop="balance" />
+      <el-table-column label="创建时间" align="center" prop="createTime" />
+      <el-table-column label="备注" align="center" prop="remark" />
+    </el-table>
+    </div>
+
+    <el-dialog :title="edit.title" :visible.sync="edit.open" width="600px" append-to-body>
+      <el-form ref="editForm" :model="editForm" :rules="editRules" label-width="100px">
+
+        <el-form-item label="订单状态" prop="status" >
+          <el-select v-model="editForm.status" placeholder="请选择状态" clearable size="small" filterable>
+            <el-option
+              v-for="dict in orderOptions "
+              :key="dict.dictValue"
+              :label="dict.dictLabel"
+              :value="dict.dictValue"
+            />
+          </el-select>
+        </el-form-item>
+        <el-form-item label="物流状态" prop="deliveryStatus" >
+          <el-select v-model="editForm.deliveryStatus" placeholder="请选择物流状态" clearable size="small" filterable>
+            <el-option
+              v-for="dict in deliveryStatusOptions "
+              :key="dict.dictValue"
+              :label="dict.dictLabel"
+              :value="dict.dictValue"
+            />
+          </el-select>
+        </el-form-item>
+        <el-form-item label="物流跟踪状态" prop="deliveryType" >
+          <el-select v-model="editForm.deliveryType" placeholder="请选择状态" clearable size="small" filterable>
+            <el-option
+              v-for="dict in deliveryTypeOptions "
+              :key="dict.dictValue"
+              :label="dict.dictLabel"
+              :value="dict.dictValue"
+            />
+          </el-select>
+        </el-form-item>
+        <el-form-item label="详情地址" prop="userAddress"  >
+          <el-input v-model="editForm.userAddress" placeholder="请输入" />
+        </el-form-item>
+        <el-form-item label="备注" prop="remark"  >
+          <el-input v-model="editForm.remark" placeholder="请输入备注" />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitEditForm">确 定</el-button>
+      </div>
+    </el-dialog>
+
+
+    <el-dialog :title="erpDialog.title" :visible.sync="erpDialog.open" width="600px" append-to-body>
+      <div v-if="order!=null&&order.extendOrderId!=null&&order.status==1"  v-hasPermi="['store:storeOrder:updateExpress']"  >
+        <el-button size="mini" @click="updateExpress()" >同步物流发货</el-button>
+      </div>
+      <div class="table-layout"  v-if="erpOrder!=null">
+        <el-row>
+          <el-col :span="6" class="table-cell-title">订单编号</el-col>
+          <el-col :span="6" class="table-cell-title">是否代收</el-col>
+          <el-col :span="6" class="table-cell-title">快递编号</el-col>
+          <el-col :span="6" class="table-cell-title">快递名称</el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="6" class="table-cell">
+            {{erpOrder.code}}
+          </el-col>
+          <el-col :span="6" class="table-cell">
+            {{erpOrder.cod?'是':'否'}}
+          </el-col>
+          <el-col :span="6" class="table-cell">
+            {{erpOrder.express_code}}
+          </el-col>
+          <el-col :span="6" class="table-cell">
+            {{erpOrder.express_name}}
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="6" class="table-cell-title">收货人</el-col>
+          <el-col :span="6" class="table-cell-title">电话</el-col>
+          <el-col :span="6" class="table-cell-title">地址</el-col>
+          <el-col :span="6" class="table-cell-title">运单号</el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="6" class="table-cell">
+            {{erpOrder.receiver_name}}
+          </el-col>
+          <el-col :span="6" class="table-cell">
+            {{erpOrder.receiver_mobile}}
+          </el-col>
+          <el-col :span="6" class="table-cell">
+            {{erpOrder.receiver_address}}
+          </el-col>
+          <el-col :span="6" class="table-cell">
+            {{erpOrder.deliverys!=null&&erpOrder.deliverys.length>0?erpOrder.deliverys[0].mail_no:''}}
+          </el-col>
+
+        </el-row>
+      </div>
+    </el-dialog>
+
+    <el-dialog :title="editDy.title" :visible.sync="editDy.open" width="600px" append-to-body>
+      <el-form ref="editDyForm" :model="editDyForm" :rules="editDyRules" label-width="100px">
+        <div  v-hasPermi="['his:liveOrder:updateErpOrder']"  style="margin-bottom: 20px;" >
+          <el-button size="mini" @click="updateErpOrder" >同步物流单号信息</el-button>
+        </div>
+        <el-form-item label="物流公司" prop="deliveryCode" >
+          <el-select style="width:220px" v-model="editDyForm.deliveryCode" placeholder="请选择" clearable size="small">
+            <el-option key="SF"  label="顺丰" value="SF" />
+            <el-option key="EMS"  label="邮政" value="EMS" />
+            <el-option key="ZTO"  label="中通" value="ZTO" />
+            <el-option key="STO"  label="申通" value="STO" />
+            <el-option key="JD"  label="京东" value="JD" />
+            <el-option key="DBL"  label="德邦" value="DBL" />
+            <el-option key="JTSD"  label="极兔" value="JTSD" />
+            <el-option key="YD"  label="韵达" value="YD" />
+            <el-option key="YTO"  label="圆通" value="YTO" />
+          </el-select>
+        </el-form-item>
+        <el-form-item label="物流单号" prop="deliverySn"  >
+          <el-input v-model="editDyForm.deliverySn" placeholder="请输入物流单号" />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitEditDyForm">确 定</el-button>
+        <el-button @click="editDy.open = false">取 消</el-button>
+      </div>
+    </el-dialog>
+
+    <el-dialog :title="expressDialog.title" :visible.sync="expressDialog.open" width="600px" append-to-body>
+      <div  v-hasPermi="['his:storeOrder:syncExpress']"  >
+        <el-button size="mini" @click="syncExpress()" >同步快递鸟物流状态</el-button>
+      </div>
+      <el-table style="margin-top: 20px;width: 100%"
+                ref="orderHistoryTable"
+                :data="traces" border>
+        <el-table-column label="操作时间"  width="160" align="center">
+          <template slot-scope="scope">
+            {{scope.row.AcceptTime}}
+          </template>
+        </el-table-column>
+        <el-table-column label="位置" align="center">
+          <template slot-scope="scope">
+            {{scope.row.Location}}
+          </template>
+        </el-table-column>
+        <el-table-column label="描述" align="center">
+          <template slot-scope="scope">
+            {{scope.row.AcceptStation}}
+          </template>
+        </el-table-column>
+      </el-table>
+    </el-dialog>
+
+
+  </div>
+</template>
+
+
+<script>
+import {
+  getLiveOrder,
+  syncExpress,
+  updateLiveOrder,
+  updateErp,
+  getExpress,
+  listOrderitem,
+  tuiOrder,
+  refundOrderMoney,
+  editDeliveryId,
+  finishOrder,
+  getOrderExpress,
+  getOrderPayments,
+  getOrderLog,
+  tuiMoneyLogs,
+  updateExpress,
+  createErpOrder, getEroOrder
+} from "@/api/live/liveOrder";
+import {getStoreOrderLive} from "@/api/store/storeOrder";
+
+
+export default {
+  props:{
+    data: [Object, Array, String, Number, Boolean],
+    orderId: {
+      type: [String, Number],
+      default: null
+    }
+  },
+  watch: {
+    orderId: {
+      immediate: true,
+      handler(val) {
+        if (val) {
+          this.getDetails(val, null, null)
+        }
+      }
+    }
+  },
+  data() {
+    return {
+      expressDialog:{
+        title:"物流信息",
+        open:false,
+      },
+      editDy:{
+        title:"修改物流单号",
+        open:false,
+      },
+      sourceOptions:[],
+      payments: [],
+      followDialogVisible:false,
+      dialogVisible:false,
+      total: 0,
+      msgForm:{
+        pageNum: 1,
+        pageSize: 10,
+        userId:null,
+        followDoctorId:null,
+      },
+      editDyForm:{
+        orderId:null,
+        deliveryId:null,
+        deliveryCode:null,
+      },
+      showList:true,
+      edit:{
+        title:"修改订单",
+        open:false,
+      },
+      erpDialog:{
+        title:"ERP订单信息",
+        open:false,
+      },
+      show:{
+        title:"问诊详情",
+        open:false,
+      },
+      pack:{
+        title:"套餐包",
+        open:false,
+      },
+      followList:[],
+      money:null,
+      moneyVisible:false,
+      rules:{},
+      sendVisible:false,
+      logs:[],
+      pay:[],
+      nickName:null,
+      storeName:null,
+      PayOptions:[],
+      orderOptions:[],
+      payStatusOptions:[],
+      express:null,
+      traces:[],
+      msg:[],
+      deliverList: [],
+      sexOptions:[],
+      refundOptions:[],
+      channelOptions:[],
+      qwSubjectOptions:[],
+      tuiOptions:[],
+      orOptions:[],
+      storeOPtions:[],
+      deliveryStatusOptions:[],
+      deliveryPayStatusOptions:[],
+      deliveryTypeOptions:[],
+      orderTypeOptions:[],
+      orderBuyTypeOptions:[],
+      scheduleOptions:[],
+      item:null,
+      tuiMoneyLogs:[],
+      erpOrder:null,
+      prod:null,
+      showProd:null,
+      editForm:{
+        orderId:null,
+        status:null,
+        userAddress:null,
+        deliveryStatus:null,
+        deliveryType:null,
+        remark:"",
+      },
+      editDyRules:{
+        deliverySn: [
+          { required: true, message: "物流单号不能为空", trigger: "blur" }
+        ],
+        deliveryCode: [
+          { required: true, message: "物流公司不能为空", trigger: "blur" }
+        ],
+      },
+      editRules:{
+        userAddress: [
+          { required: true, message: "收货地址不能为空", trigger: "blur" }
+        ],
+      },
+      mrules:{
+      },
+      form: {
+        deliveryCode: null,
+        deliveryName:null,
+        deliverySn:null,
+        orderId:null,
+      }
+    }
+  },
+
+  created() {
+    this.getDicts("sys_store_pay_type").then(response => {
+      this.PayOptions = response.data;
+    });
+    this.getDicts("sys_live_order_status").then(response => {
+      this.orderOptions = response.data;
+    });
+    this.getDicts("sys_order_pay").then(response => {
+      this.payStatusOptions = response.data;
+    });
+    this.getDicts("sys_order_source").then(response => {
+      this.sourceOptions = response.data;
+    });
+    this.getDicts("sys_store_order_type").then(response => {
+      this.orderTypeOptions = response.data;
+    });
+    this.getDicts("sys_store_order_buy_type").then(response => {
+      this.orderBuyTypeOptions = response.data;
+    });
+    this.getDicts("sys_refund_status").then(response => {
+      this.refundOptions = response.data;
+    });
+    this.getDicts("sys_store_channel").then(response => {
+      this.channelOptions = response.data;
+    });
+    this.getDicts("sys_store_qw_subject").then(response => {
+      this.qwSubjectOptions = response.data;
+    });
+    this.getDicts("sys_tui_money_status").then(response => {
+      this.tuiOptions = response.data;
+    });
+    this.getDicts("sys_company_or").then(response => {
+      this.orOptions = response.data;
+    });
+    this.getDicts("sys_patient_sex").then(response => {
+      this.sexOptions = response.data;
+    });
+    this.getDicts("sys_store_delivery_pay_status").then(response => {
+      this.deliveryPayStatusOptions = response.data;
+    });
+    this.getDicts("store_order_delivery_status").then(response => {
+      this.deliveryStatusOptions = response.data;
+    });
+    this.getDicts("logistics_status").then(response => {
+      this.deliveryTypeOptions = response.data;
+    });
+
+  },
+  methods: {
+
+    getOrderLive(orderId){
+      getLiveOrder(orderId).then(response => {
+        this.item=response.data
+      });
+      this.getlistOrderitem(orderId);
+    },
+    followMsg(row){
+      const userId = this.item.userId;
+      const followDoctorId =this.item.followDoctorId;
+      const doctorName = this.item.doctorName;
+      const patientName = this.item.patientName;
+
+      setTimeout(() => {
+        this.$refs.msgDetails.getDetails(userId,followDoctorId,doctorName,patientName);
+      }, 500);
+      this.dialogVisible = true;
+    },
+    msgDialogClose(){
+      this.dialogVisible = false;
+    },
+    handlePhone(){
+      const orderId = this.item.orderId;
+      getOrderUserPhone(orderId).then(response =>{
+        this.item.userPhone = response.userPhone;
+      })
+    },
+    editDelivery(){
+      this.editDy.open = true;
+      this.editDyForm.orderId = this.item.orderId;
+
+    },
+    showListD(){
+      if(this.showList){
+        this.showProd=this.prod
+      }else{
+        this.showProd=[this.prod[0]]
+      }
+      this.showList=this.showList?false:true;
+    },
+
+    showExpress(){
+      this.expressDialog.open=true;
+      getExpress({
+        orderId: this.item.orderId,
+        deliverId: this.item.deliverySn,
+        deliverSn: this.item.deliveryCode,
+      }).then(response => {
+        this.express = response.data;
+        if(this.express!=null&&this.express.Traces!=null){
+          this.traces=this.express.Traces
+        }
+      });
+    },
+    updateErpOrder(){
+      var that=this;
+      this.$confirm('确定同步物流单号信息吗', "警告", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(function() {
+        var data={orderId:that.item.orderId}
+        return updateErp(data);
+      }).then(() => {
+        this.msgSuccess("操作成功");
+        getLiveOrder(this.item.orderId).then(response => {
+          this.item=response.data
+          that.getlogList(this.item.orderId);
+          that.$parent.$parent.getList();
+        });
+        this.editDy.open = false
+      }).catch(function() {});
+
+    },
+    sendFollowMsg(){
+      var that=this;
+      this.$confirm('是否确认发送消息?', "警告", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(function() {
+        return sendMsg(that.item.orderId);
+      }).then(() => {
+        this.msgSuccess("操作成功");
+      }).catch(function() {});
+    },
+    handleClose1(){
+      this.dialogVisible=false;
+    },
+    handleClose2(){
+      this.followDialogVisible=false;
+    },
+    follow(row){
+      getMsgFollow(row).then(response => {
+        if(response.data.formJson!=null&&response.data.formJson!=''&&response.data.writeStatus==1){
+          this.messageFollowList=JSON.parse(response.data.formJson );
+          this.followDialogVisible=true;
+        }else{
+          this.$message({
+            message: '未填写随访单',
+            type: 'info'
+          });
+          return
+        }
+      });
+    },
+
+    //修改订单状态
+    submitEditForm(){
+      this.$refs["editForm"].validate(valid => {
+        if (valid) {
+          updateLiveOrder(this.editForm).then(response => {
+            if (response.code === 200) {
+              this.msgSuccess("操作成功");
+              this.edit.open = false;
+              getLiveOrder(this.item.orderId).then(response => {
+                this.item=response.data
+                that.getlogList(this.item.orderId);
+                that.$parent.$parent.getList();
+              });
+            }
+          });
+        }
+      });
+    },
+    editOrder(){
+      this.edit.open=true;
+      this.editForm.orderId=this.item.orderId;
+      this.editForm.remark=this.item.remark;
+      this.editForm.userAddress = this.item.userAddress == null ? '' : this.item.userAddress.toString();
+      this.editForm.status = this.item.status == null ? '' : this.item.status.toString();
+      this.editForm.deliveryType = this.item.deliveryType == null ? '' : this.item.deliveryType.toString();
+      this.editForm.deliveryStatus = this.item.deliveryStatus == null ? '' : this.item.deliveryStatus.toString();
+
+    },
+    updateExpress(){
+      var that=this;
+      this.$confirm('确定同步物流信息吗,同步后将自动发货?', "警告", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(function() {
+        var data=that.item.orderId
+        return updateExpress(data);
+      }).then(() => {
+        this.msgSuccess("操作成功");
+        getLiveOrder(this.item.orderId).then(response => {
+          this.item=response.data
+          that.getlogList(this.item.orderId);
+          that.$parent.$parent.getList();
+        });
+      }).catch(function() {});
+    },
+    addErpOrder(){
+      var that=this;
+      this.$confirm('是否确认推送管易?', "警告", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(function() {
+        var data=that.item.orderCode
+        return createErpOrder({
+          orderCode: data
+        });
+      }).then(() => {
+        this.msgSuccess("操作成功");
+        getLiveOrder(this.item.orderId).then(response => {
+          this.item=response.data
+          that.getlogList(this.item.orderId);
+          that.$parent.$parent.getList();
+        });
+      }).catch(function() {});
+    },
+    showErpOrder(){
+      this.erpDialog.open=true;
+      var data=this.item.extendOrderId;
+      getEroOrder({
+        extendOrderId: data
+      }).then(response => {
+        this.erp = response.data;
+        if(response.data.orders!=null&&response.data.orders.length==1){
+          this.erpOrder=response.data.orders[0]
+        }
+      });
+    },
+
+    editTuiMoney1(){
+      var that=this;
+      this.$confirm('是否解冻此订单推广佣金吗?', "警告", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(function() {
+        var data=that.item.orderId;
+        return editTuiMoney(data);
+      }).then(() => {
+        this.msgSuccess("操作成功");
+        getLiveOrder(this.item.orderId).then(response => {
+          this.item=response.data
+          that.getlogList(this.item.orderId);
+          that.$parent.$parent.getList();
+        });
+      }).catch(function() {});
+    },
+    editTuiMoney2(){
+      var that=this;
+      this.$confirm('是否冻结此订单推广佣金吗?', "警告", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(function() {
+        var data=that.item.orderId;
+        return editTuiMoney(data);
+      }).then(() => {
+        this.msgSuccess("操作成功");
+        getLiveOrder(this.item.orderId).then(response => {
+          this.item=response.data
+          that.getlogList(this.item.orderId);
+          that.$parent.$parent.getList();
+        });
+      }).catch(function() {});
+    },
+    returnCost(){
+      var that=this;
+      this.$confirm('是否退还此订单成本吗?', "警告", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(function() {
+        var data=that.item.orderId;
+        return returnCost(data);
+      }).then(() => {
+        this.msgSuccess("操作成功");
+        this.getDetails(this.item.orderId,null,null)
+      }).catch(function() {});
+    },
+    moneyCancel(){
+      this.money=null;
+      this.moneyVisible=false;
+    },
+    refund(){
+      var that=this;
+      this.$confirm('是否确认申请退款?', "警告", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(function() {
+        var data={
+          orderId:that.item.orderId
+        }
+        return refundOrderMoney(data);
+      }).then(() => {
+        this.msgSuccess("操作成功");
+        getLiveOrder(this.item.orderId).then(response => {
+          this.item = response.data;
+          // this.getlogList(this.item.orderId);
+          this.$parent.$parent.getList();
+        });
+      }).catch(function() {});
+    },
+    finishOrder(){
+      var that=this;
+      this.$confirm('是否确认客户已收货?', "警告", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(function() {
+        var data={
+          orderId:that.item.orderId
+        }
+        return finishOrder(data);
+      }).then(() => {
+        this.msgSuccess("操作成功");
+        getLiveOrder(this.item.orderId).then(response => {
+          this.item = response.data;
+          this.getlistOrderitem(this.item.orderId);
+          this.$parent.$parent.getList();
+        });
+      }).catch(function() {});
+    },
+
+
+    syncExpress(){
+      var that=this;
+      this.$confirm('确定同步物流状态吗', "警告", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(function() {
+        var data=that.item.orderId
+        return syncExpress(data);
+      }).then(() => {
+        this.msgSuccess("操作成功");
+        this.expressDialog.open=false
+        getLiveOrder(this.item.orderId).then(response => {
+          this.item=response.data
+          that.getlogList(this.item.orderId);
+          that.$parent.$parent.getList();
+        });
+      }).catch(function() {});
+    },
+    getInquiryOrder(){
+
+      this.show.open=true;
+      setTimeout(() => {
+        this.$refs.Details.getDetails(this.item.inquiryOrderId);
+      }, 1);
+    },
+    getPackageOrder(){
+      this.pack.open=true;
+      console.log(this.item.packageOrderId)
+      setTimeout(() => {
+        this.$refs.packDetails.getDetails(this.item.packageOrderId);
+      }, 1);
+    },
+    tuiOrder(){
+      var that=this;
+      this.$confirm('是否确认推送订单?', "警告", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(function() {
+        var data={
+          orderId:that.item.orderId
+        }
+        return tuiOrder(data);
+      }).then(() => {
+        this.msgSuccess("操作成功");
+        getLiveOrder(this.item.orderId).then(response => {
+          this.item = response.data;
+          this.getlogList(this.item.orderId);
+          this.$parent.$parent.getList();
+        });
+      }).catch(function() {});
+    },
+    getDetails(orderId,nickName,storeName) {
+      this.nickName=nickName;
+      this.storeName=storeName;
+      this.item=null;
+      this.tuiMoneyLogs=null;
+      getLiveOrder(orderId).then(response => {
+        this.item = response.data;
+        console.log(this.tuiMoneyLogs)
+        this.tuiMoneyLogs = response.tuiMoneyLogs;
+        this.msgForm.userId=response.data.userId;
+        this.msgForm.followDoctorId=response.data.followDoctorId;
+        this.getlistOrderitem(this.item.orderId);
+        getOrderExpress(orderId).then(response => {
+          this.deliverList = response.data;
+          console.log(this.deliverList)
+        });
+
+        getOrderPayments(this.item.orderId).then(response => {
+          this.payments = response.payments;
+        });
+
+        getOrderLog(this.item.orderId).then(response => {
+          this.logs = response.logs
+        });
+
+        tuiMoneyLogs(this.item.orderId).then(response => {
+          this.tuiMoneyLogs = response.data
+        })
+      });
+
+    },
+    getOrder(){
+      getLiveOrder(this.item.orderId).then(response => {
+        this.item = response.data;
+        this.getlistOrderitem(this.item.orderId);
+      });
+    },
+    submitEditDyForm(){
+      this.$refs["editDyForm"].validate(valid => {
+        if (valid) {
+          editDeliveryId({orderId: this.editDyForm.orderId,
+            deliverSn: this.editDyForm.deliveryCode,
+            deliverId: this.editDyForm.deliverySn,type: 1}).then(response => {
+            if (response.code === 200) {
+              this.msgSuccess("操作成功");
+              this.editDy.open = false;
+              getLiveOrder(this.item.orderId).then(response => {
+                this.item = response.data;
+                this.$parent.$parent.getList();
+              });
+            }
+          })
+        }
+      });
+    },
+    getlistOrderitem(orderId){
+      this.prod = null
+      this.showProd=[]
+      this.showList = true
+      listOrderitem(orderId).then(response => {
+        this.prod = response.rows;
+        if (this.prod.length > 0) {
+          this.showProd=[this.prod[0]];
+        }
+      });
+    },
+    // getlogList(orderId){
+    //   logList(orderId).then(response => {
+    //     this.logs = response.rows;
+    //   });
+    // },
+    // getPayment(orderId){
+    //   payment(orderId).then(response => {
+    //     console.log(response)
+    //     this.pay = response.data;
+    //   });
+    // }
+  }
+}
+
+</script>
+
+
+<style scoped>
+.content{
+  height: 100%;
+  background-color: #fff;
+  padding: 0px 20px;
+
+}
+.contentx{
+  height: 100%;
+  background-color: #fff;
+  padding: 0px 20px 20px;
+
+
+  margin: 20px;
+}
+.el-descriptions-item__label.is-bordered-label{
+  font-weight: normal;
+}
+.el-descriptions-item__content {
+  max-width: 150px;
+  min-width: 100px;
+}
+.desct{
+  padding-top: 20px;
+  padding-bottom: 20px;
+  color: #524b4a;
+  font-weight: bold;
+}
+
+.order-content{
+  margin: 10px;
+
+}
+
+.operate-container {
+  background: #F2F6FC;
+  height: 60px;
+  margin: -20px -20px 0;
+  line-height: 60px;
+}
+
+.operate-button-container {
+  float: right;
+  margin-right: 20px
+}
+</style>
+
+<style scoped>
+.chat-records {
+
+  overflow-y: auto;
+}
+.timestamp {
+  font-size: 12px;
+  color: #A9A9A9;
+}
+.chat-record {
+  margin: 10px;
+  flex-direction: column;
+  align-items: flex-start;
+}
+.sent {
+  background-color: #fbfdff;
+  color: #000839;
+}
+.sent .timestamp {
+  float: right;
+}
+.right{
+  float: right;
+}
+.received {
+  background-color: #fbfdff;
+  color: #000000;
+}
+
+.el-descriptions-item__content {
+  max-width: 150px;
+  min-width: 100px;
+}
+.order-content{
+  margin: 10px;
+
+}
+
+.operate-container {
+  background: #F2F6FC;
+  height: 60px;
+  margin: -20px -20px 0;
+  line-height: 60px;
+}
+
+.operate-button-container {
+  float: right;
+  margin-right: 20px
+}
+</style>

+ 880 - 0
src/views/live/order/storeDetail.vue

@@ -0,0 +1,880 @@
+<template>
+  <div class="order-content">
+      <div class="order-status" v-if="order!=null" >
+          <el-steps  :active="order.status==3?order.status+1:order.status" align-center>
+            <el-step title="待支付"></el-step>
+            <el-step title="待发货"></el-step>
+            <el-step title="待收货"></el-step>
+            <el-step title="交易完成"></el-step>
+          </el-steps>
+      </div>
+      <div>
+      <el-card shadow="never" style="margin-top: 15px">
+      <div class="operate-container"  v-if="order!=null">
+        <span style="margin-left: 20px" class="color-danger">订单状态:
+           <el-tag prop="status" v-for="(item, index) in statusOptions"   v-if="order.status==item.dictValue">{{item.dictLabel}}</el-tag>
+        </span>
+        <div class="operate-button-container" >
+          <el-button size="mini" @click="editOrder()"  v-hasPermi="['store:storeOrder:edit']" >修改订单</el-button>
+        </div>
+        <div class="operate-button-container"  v-hasPermi="['store:storeOrder:finishOrder']" v-if="order.status===2">
+          <el-button size="mini" @click="finishOrder()" >确认收货</el-button>
+        </div>
+        <div class="operate-button-container" v-if="order.status==1||order.status==2"  v-hasPermi="['store:storeOrder:refundOrderMoney']"  >
+          <el-button size="mini" @click="refundOrderMoney()" >退款</el-button>
+        </div>
+        <div class="operate-button-container"  v-hasPermi="['store:storeOrder:express']"  >
+          <el-button size="mini" @click="showExpress()">查看物流</el-button>
+        </div>
+        <div class="operate-button-container" v-if="order.tuiMoneyStatus==0"  v-hasPermi="['store:storeOrder:editTuiMoney']"  >
+          <el-button size="mini" @click="editTuiMoney1()" >解冻</el-button>
+        </div>
+        <div class="operate-button-container" v-if="order.tuiMoneyStatus==1"  v-hasPermi="['store:storeOrder:editTuiMoney']"  >
+          <el-button size="mini" @click="editTuiMoney2()" >冻结</el-button>
+        </div>
+
+        <div class="operate-button-container" v-if="order.status==3&&order.tuiMoneyStatus==null"  v-hasPermi="['store:storeOrder:addTuiMoney']"  >
+          <el-button size="mini" @click="addTuiMoney()" >分佣</el-button>
+        </div>
+
+<!--        <div class="operate-button-container" v-if="order.extendOrderId!=null"  v-hasPermi="['store:storeOrder:getEroOrder']"  >
+          <el-button size="mini" @click="showErpOrder()" >查看ERP订单信息</el-button>
+        </div>-->
+        <div class="operate-button-container" v-if="order.isPayRemain!=null&&order.isPayRemain==1"  v-hasPermi="['store:storeOrder:auditPayRemain']"  >
+          <el-button size="mini" @click="auditPayRemain()" >尾款审核</el-button>
+        </div>
+        <div class="operate-button-container" >
+          <el-button size="mini" @click="editDelivery()"  v-hasPermi="['store:storeOrder:editDeliveryId']" >修改物流</el-button>
+        </div>
+        <div class="operate-button-container" v-if="order.status >=1 && order.extendOrderId == null && order.deliveryId == null"  v-hasPermi="['store:storeOrder:createErpOrder']"  >
+          <el-button size="mini" @click="addErpOrder()" >创建ERP订单信息</el-button>
+        </div>
+        <!-- <div class="operate-button-container" v-show="order.status===2">
+          <el-button size="mini"  >去发货</el-button>
+          <el-button size="mini" >备注订单</el-button>
+        </div>
+        <div class="operate-button-container" v-show="order.status===4">
+          <el-button size="mini"  >订单跟踪</el-button>
+          <el-button size="mini"  disabled>备注订单</el-button>
+        </div> -->
+      </div>
+      <div style="margin: 20px 0px">
+        <span class="font-small">基本信息</span>
+      </div>
+      <el-descriptions :column="4" border  >
+            <el-descriptions-item label="订单编号"  >
+                <span v-if="order!=null">
+                  {{order.orderCode}}
+                </span>
+                <el-tag  v-for="(item, index) in createTypeOptions"    v-if="order!=null&&order.orderCreateType==item.dictValue">{{item.dictLabel}}
+                </el-tag>
+            </el-descriptions-item>
+            <el-descriptions-item label="会员"  >
+                <span v-if="user!=null">
+                  {{user.nickname}}({{user.phone}})
+                </span>
+            </el-descriptions-item>
+            <el-descriptions-item label="支付方式"  >
+              <el-tag prop="payType" v-for="(item, index) in payTypeOptions"    v-if="order!=null&&order.payType==item.dictValue">{{item.dictLabel}}
+              </el-tag>
+            </el-descriptions-item>
+<!--            <el-descriptions-item label="订单类型"  >
+              <el-tag prop="orderType" v-for="(item, index) in orderTypeOptions"    v-if="order!=null&&order.orderType==item.dictValue">{{item.dictLabel}}</el-tag>
+            </el-descriptions-item>-->
+            <el-descriptions-item label="物流公司编号"  >
+                <span v-if="order!=null">
+                  {{order.deliverySn}}
+                </span>
+            </el-descriptions-item>
+            <el-descriptions-item label="物流公司名称"  >
+                <span v-if="order!=null">
+                  {{order.deliveryName}}
+                </span>
+            </el-descriptions-item>
+            <el-descriptions-item label="物流单号"  >
+                <span v-if="order!=null">
+                  {{order.deliveryId}}
+                </span>
+            </el-descriptions-item>
+            <el-descriptions-item label="物流状态"  >
+                <span v-if="order!=null">
+                  <el-tag prop="deliveryId" v-for="(item, index) in deliveryStatusOptions"    v-if="order!=null&&order.deliveryStatus==item.dictValue">{{item.dictLabel}}</el-tag>
+                </span>
+            </el-descriptions-item>
+            <el-descriptions-item label="物流跟踪状态"  >
+                <span v-if="order!=null">
+                  <el-tag prop="deliveryId" v-for="(item, index) in deliveryTypeOptions"    v-if="order!=null&&order.deliveryType==item.dictValue">{{item.dictLabel}}</el-tag>
+                </span>
+            </el-descriptions-item>
+            <el-descriptions-item label="物流结算费用"  >
+                <span v-if="order!=null&&order.deliveryPayMoney!=null ">
+                  {{order.deliveryPayMoney.toFixed(2) }}
+                </span>
+            </el-descriptions-item>
+            <el-descriptions-item label="快递帐单日期"  >
+                <span v-if="order!=null ">
+                  {{order.deliveryTime }}
+                </span>
+            </el-descriptions-item>
+            <el-descriptions-item label="快递结算日期"  >
+                <span v-if="order!=null ">
+                  {{order.deliveryPayTime }}
+                </span>
+            </el-descriptions-item>
+            <el-descriptions-item label="推广佣金"  >
+                <span v-if="order!=null ">
+                  {{order.tuiMoney }}
+                </span>
+            </el-descriptions-item>
+            <el-descriptions-item label="收货人"  >
+                <span v-if="order!=null ">
+                  {{order.realName }}
+                </span>
+            </el-descriptions-item>
+            <el-descriptions-item label="手机号码"  >
+                <span v-if="order!=null ">
+                  {{order.userPhone }}
+                </span>
+                <el-button icon="el-icon-search" size="mini" @click="handlePhone()" style="margin-left: 20px;" circle v-hasPermi="['store:storeOrder:queryPhone']"></el-button>
+            </el-descriptions-item>
+            <el-descriptions-item label="收货地址"  >
+              <el-popover
+                v-if="order!=null"
+                placement="top-start"
+                title="收货地址"
+                width="300"
+                trigger="hover"
+                :content="order.userAddress">
+                <span slot="reference">{{order.userAddress}}</span>
+                <el-button icon="el-icon-search" size="mini" @click="handleAddress()" style="margin-left: 20px;" circle v-hasPermi="['store:storeOrder:queryAddress']"></el-button>
+              </el-popover>
+            </el-descriptions-item>
+            <el-descriptions-item label="档期归属"  >
+              <el-tag prop="scheduleId" v-for="(item, index) in scheduleOptions"    v-if="order!=null&&order.scheduleId==item.id">{{item.name}}
+              </el-tag>
+            </el-descriptions-item>
+            <el-descriptions-item label="用户备注"  >
+                <span v-if="order!=null">
+                  {{order.mark}}
+                </span>
+            </el-descriptions-item>
+      </el-descriptions>
+      <div style="margin: 20px 0px"  v-if="order!=null">
+        <span class="font-small">
+          凭证信息
+        </span>
+      </div>
+      <el-image
+          v-if="certificates != null"
+          :src="certificates"
+          :preview-src-list="[certificates]"
+          :style="{ width: '100px', height: '100px' }"
+          @click.native="showImageDialog"
+        ></el-image>
+        <el-dialog :visible.sync="dialogVisibleImage" width="10%">
+          <img :src="certificates" style="width: 100%" alt="">
+        </el-dialog>
+      <div style="margin-top: 20px">
+        <span class="font-small">商品信息</span>
+      </div>
+      <el-table
+        border
+        v-if="items!=null"
+        :data="items"
+        size="small"
+        style="width: 100%;margin-top: 20px" >
+        <el-table-column label="商品图片" width="150" align="center">
+          <template slot-scope="scope">
+            <img :src="JSON.parse(scope.row.jsonInfo).image" style="height: 80px">
+          </template>
+        </el-table-column>
+        <el-table-column label="商品编码" width="300" align="center">
+          <template slot-scope="scope">
+            <p>{{JSON.parse(scope.row.jsonInfo).barCode}}</p>
+          </template>
+        </el-table-column>
+        <el-table-column label="商品组合编码" width="300" align="center">
+          <template slot-scope="scope">
+            <p>{{JSON.parse(scope.row.jsonInfo).groupBarCode}}</p>
+          </template>
+        </el-table-column>
+        <el-table-column label="商品名称" width="300" align="center">
+          <template slot-scope="scope">
+            <p>{{JSON.parse(scope.row.jsonInfo).productName}}</p>
+          </template>
+        </el-table-column>
+        <el-table-column label="单价" width="240" align="center">
+          <template slot-scope="scope">
+            <p>¥{{JSON.parse(scope.row.jsonInfo).price.toFixed(2)}}</p>
+          </template>
+        </el-table-column>
+        <el-table-column label="规格" width="240" align="center">
+          <template slot-scope="scope">
+            {{JSON.parse(scope.row.jsonInfo).sku}}
+          </template>
+        </el-table-column>
+        <el-table-column label="数量" width="180" align="center">
+          <template slot-scope="scope">
+            {{scope.row.num}}
+          </template>
+        </el-table-column>
+        <el-table-column label="处方药" width="240" align="center">
+          <template slot-scope="scope">
+            {{scope.row.isPrescribe!=null&&scope.row.isPrescribe==1?'是':'否'}}
+          </template>
+        </el-table-column>
+        <el-table-column label="小计"  align="center">
+          <template slot-scope="scope" >
+            ¥{{scope.row.num*JSON.parse(scope.row.jsonInfo).price.toFixed(2)}}
+          </template>
+        </el-table-column>
+      </el-table>
+      <div style="float: right;margin: 20px" v-if="order!=null">
+        合计:<span class="color-danger">¥{{order.totalPrice.toFixed(2)}}</span>
+      </div>
+      <div style="margin: 60px 0px 20px 0px">
+        <span class="font-small">费用信息</span>
+      </div>
+      <el-descriptions   :column="4" border  >
+          <el-descriptions-item label="商品合计"  >
+              <span v-if="order!=null">
+                ¥{{order.totalPrice.toFixed(2)}}
+              </span>
+          </el-descriptions-item>
+          <el-descriptions-item label="应付金额"  >
+              <span v-if="order!=null">
+                ¥{{order.payPrice.toFixed(2)}}
+              </span>
+          </el-descriptions-item>
+          <el-descriptions-item label="运费"  >
+              <span v-if="order!=null">
+                ¥{{order.payPostage.toFixed(2)}}
+              </span>
+          </el-descriptions-item>
+          <el-descriptions-item label="优惠券"  >
+              <span v-if="order!=null">
+                ¥{{order.couponPrice.toFixed(2)}}
+              </span>
+          </el-descriptions-item>
+          <el-descriptions-item label="积分抵扣"  >
+              <span v-if="order!=null">
+                ¥{{order.deductionPrice.toFixed(2)}}
+              </span>
+          </el-descriptions-item>
+          <el-descriptions-item label="实付金额"  >
+              <span v-if="order!=null">
+                ¥{{order.payMoney.toFixed(2)}}
+              </span>
+          </el-descriptions-item>
+          <el-descriptions-item label="代收金额"  >
+              <span v-if="order!=null">
+                ¥{{order.payDelivery.toFixed(2)}}
+              </span>
+          </el-descriptions-item>
+      </el-descriptions>
+
+      <div style="margin-top: 20px">
+        <span class="font-small">支付信息</span>
+      </div>
+      <el-table
+        border
+        :data="payments"
+        size="small"
+        style="width: 100%;margin-top: 20px" >
+          <el-table-column label="支付单号" align="center" prop="payCode" width="120px" />
+          <el-table-column label="支付金额" align="center" prop="payMoney" />
+          <el-table-column label="类型" align="center" prop="payTypeCode" />
+          <el-table-column label="交易单号" align="center" prop="bankTransactionId" />
+          <el-table-column label="银行单号" align="center" prop="bankSerialNo" />
+          <el-table-column label="创建时间" align="center" prop="createTime" />
+          <el-table-column label="支付时间" align="center" prop="payTime" />
+      </el-table>
+
+
+      <div style="margin-top: 20px">
+        <span class="font-small">操作信息</span>
+      </div>
+      <el-table style="margin-top: 20px;width: 100%"
+                ref="orderHistoryTable"
+                :data="logs" border>
+        <el-table-column label="操作时间"  width="160" align="center">
+          <template slot-scope="scope">
+            {{scope.row.changeTime}}
+          </template>
+        </el-table-column>
+        <el-table-column label="备注" align="center">
+          <template slot-scope="scope">
+            {{scope.row.changeMessage}}
+          </template>
+        </el-table-column>
+      </el-table>
+
+      <div style="margin-top: 20px">
+        <!-- <svg-icon icon-class="marker" style="color: #606266"></svg-icon> -->
+        <span class="font-small">分佣信息</span>
+      </div>
+      <el-table
+        border
+        :data="tuiMoneyLogs"
+        size="small"
+                style="width: 100%;margin-top: 20px" >
+          <el-table-column label="公司名称" align="center" prop="companyName" width="120px" />
+          <el-table-column label="金额" align="center" prop="money" />
+          <el-table-column label="余额" align="center" prop="balance" />
+          <el-table-column label="创建时间" align="center" prop="createTime" />
+          <el-table-column label="备注" align="center" prop="remark" />
+      </el-table>
+
+        <div style="margin-top: 20px">
+          <span class="font-small">审批信息</span>
+        </div>
+        <el-table style="margin-top: 20px;width: 100%"
+                  :data="auditLogs" border>
+          <el-table-column label="操作时间"  width="160" align="center">
+            <template slot-scope="scope">
+              {{scope.row.createTime}}
+            </template>
+          </el-table-column>
+          <el-table-column label="备注" align="center">
+            <template slot-scope="scope">
+              {{scope.row.content}}
+            </template>
+          </el-table-column>
+        </el-table>
+      </el-card>
+    </div>
+
+    <el-dialog :title="edit.title" :visible.sync="edit.open" width="600px" append-to-body>
+      <el-form ref="editForm" :model="editForm" :rules="editRules" label-width="100px">
+<!--        <el-form-item label="订单类型" prop="orderType"  >
+            <el-select style="width: 200px" v-model="editForm.orderType" placeholder="请选择订单类型" clearable size="small" >
+              <el-option
+                      v-for="item in orderTypeOptions"
+                      :key="item.dictValue"
+                      :label="item.dictLabel"
+                      :value="item.dictValue"
+                    />
+            </el-select>
+        </el-form-item>-->
+       <el-form-item label="状态" prop="status" >
+           <el-select style="width:220px" v-model="editForm.status" placeholder="请选择状态" clearable size="small">
+            <el-option key="0"  label="待支付" value="0" />
+            <el-option key="1"  label="待发货" value="1" />
+             <el-option key="2"  label="待收货" value="2" />
+             <el-option key="3"  label="交易成功" value="3" />
+             <el-option key="-1"  label="退款中" value="-1" />
+             <el-option key="-2"  label="已退款" value="-2" />
+             <el-option key="-3"  label="已取消" value="-3" />
+           </el-select>
+         </el-form-item>
+<!--         <el-form-item label="档期归属" prop="scheduleId"  >
+            <el-select filterable style="width: 200px" v-model="editForm.scheduleId" placeholder="请选择档期" clearable size="small" >
+              <el-option
+                      v-for="item in scheduleOptions"
+                      :key="item.id"
+                      :label="item.name"
+                      :value="item.id"
+                    />
+            </el-select>
+        </el-form-item>-->
+         <el-form-item label="详情地址" prop="userAddress"  >
+          <el-input v-model="editForm.userAddress" placeholder="请输入" />
+        </el-form-item>
+        <!-- <el-form-item label="erp单号" prop="extendOrderId"  >
+          <el-input v-model="editForm.extendOrderId" placeholder="请输入" />
+        </el-form-item> -->
+        <el-form-item label="备注" prop="mark"  >
+          <el-input v-model="editForm.mark" placeholder="请输入备注" />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitEditForm">确 定</el-button>
+      </div>
+    </el-dialog>
+
+    <el-dialog :title="editDy.title" :visible.sync="editDy.open" width="600px" append-to-body>
+      <el-form ref="editDyForm" :model="editDyForm" :rules="editDyRules" label-width="120px">
+<!--      <div  v-hasPermi="['store:storeOrder:updateErpOrder']"  style="margin-bottom: 20px;" >
+        <el-button size="mini" @click="updateErpOrder" >同步物流单号信息</el-button>
+      </div>-->
+        <el-form-item label="物流公司" prop="deliverySn" >
+           <el-select style="width:220px" v-model="editDyForm.deliverySn" placeholder="请选择" clearable size="small">
+            <el-option key="SF"  label="顺丰" value="SF" />
+            <el-option key="EMS"  label="邮政" value="EMS" />
+             <el-option key="ZTO"  label="中通" value="ZTO" />
+             <el-option key="STO"  label="申通" value="STO" />
+             <el-option key="JD"  label="京东" value="JD" />
+             <el-option key="DBL"  label="德邦" value="DBL" />
+             <el-option key="JTSD"  label="极兔" value="JTSD" />
+             <el-option key="YD"  label="韵达" value="YD" />
+             <el-option key="YTO"  label="圆通" value="YTO" />
+           </el-select>
+         </el-form-item>
+        <el-form-item label="物流单号" prop="deliveryId"  >
+          <el-input v-model="editDyForm.deliveryId" placeholder="请输入物流单号" />
+        </el-form-item>
+
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitEditDyForm">确 定</el-button>
+        <el-button @click="editDy.open = false">取 消</el-button>
+      </div>
+    </el-dialog>
+
+    <el-dialog :title="expressDialog.title" :visible.sync="expressDialog.open" width="600px" append-to-body>
+<!--      <div  v-hasPermi="['store:storeOrder:syncExpress']"  >
+        <el-button size="mini" @click="syncExpress()" >同步快递鸟物流状态</el-button>
+      </div>-->
+      <el-table style="margin-top: 20px;width: 100%"
+                ref="orderHistoryTable"
+                :data="traces" border>
+        <el-table-column label="操作时间"  width="160" align="center">
+          <template slot-scope="scope">
+            {{scope.row.AcceptTime}}
+          </template>
+        </el-table-column>
+         <el-table-column label="位置" align="center">
+          <template slot-scope="scope">
+            {{scope.row.Location}}
+          </template>
+        </el-table-column>
+        <el-table-column label="描述" align="center">
+          <template slot-scope="scope">
+            {{scope.row.AcceptStation}}
+          </template>
+        </el-table-column>
+      </el-table>
+    </el-dialog>
+
+    <el-dialog :title="erpDialog.title" :visible.sync="erpDialog.open" width="600px" append-to-body>
+      <div v-if="order!=null&&order.extendOrderId!=null&&order.status==1"  v-hasPermi="['store:storeOrder:updateExpress']"  >
+        <el-button size="mini" @click="updateExpress()" >同步物流发货</el-button>
+      </div>
+      <div class="table-layout"  v-if="erpOrder!=null">
+        <el-row>
+          <el-col :span="6" class="table-cell-title">订单编号</el-col>
+          <el-col :span="6" class="table-cell-title">是否代收</el-col>
+          <el-col :span="6" class="table-cell-title">快递编号</el-col>
+          <el-col :span="6" class="table-cell-title">快递名称</el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="6" class="table-cell">
+            {{erpOrder.code}}
+          </el-col>
+          <el-col :span="6" class="table-cell">
+            {{erpOrder.cod?'是':'否'}}
+          </el-col>
+          <el-col :span="6" class="table-cell">
+            {{erpOrder.express_code}}
+          </el-col>
+          <el-col :span="6" class="table-cell">
+            {{erpOrder.express_name}}
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="6" class="table-cell-title">收货人</el-col>
+          <el-col :span="6" class="table-cell-title">电话</el-col>
+          <el-col :span="6" class="table-cell-title">地址</el-col>
+          <el-col :span="6" class="table-cell-title">运单号</el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="6" class="table-cell">
+            {{erpOrder.receiver_name}}
+          </el-col>
+          <el-col :span="6" class="table-cell">
+            {{erpOrder.receiver_mobile}}
+          </el-col>
+          <el-col :span="6" class="table-cell">
+            {{erpOrder.receiver_address}}
+          </el-col>
+          <el-col :span="6" class="table-cell">
+            {{erpOrder.deliverys!=null&&erpOrder.deliverys.length>0?erpOrder.deliverys[0].mail_no:''}}
+          </el-col>
+
+        </el-row>
+      </div>
+    </el-dialog>
+
+  </div>
+</template>
+
+<script>
+import {auditPayRemain,addTuiMoney,syncExpress,updateExpress,getEroOrder,refundOrderMoney, editTuiMoney,getExpress,finishOrder,listStoreOrder, getStoreOrder, delStoreOrder, addStoreOrder, updateStoreOrder, exportStoreOrder,updateDeliveryId, createErpOrder,updateErp,getStoreOrderAddress,getStoreOrderPhone} from "@/api/hisStore/storeOrder";
+import { getTcmScheduleList } from "@/api/company/schedule";
+export default {
+  name: "StoreDetail",
+  props: {
+    orderId: {
+      type: [String, Number],
+      default: null
+    }
+  },
+  watch: {
+    orderId: {
+      immediate: true,
+      handler(val) {
+        if (val) {
+          this.getOrder(val);
+        }
+      }
+    }
+  },
+  data() {
+    return {
+      dialogVisibleImage: false,
+      createTypeOptions:[],
+      deliveryStatusOptions:[],
+      deliveryTypeOptions:[],
+      scheduleOptions:[],
+      schedules:[],
+      orderId:null,
+      erpDialog:{
+        title:"ERP订单信息",
+        open:false,
+      },
+      expressDialog:{
+        title:"物流信息",
+        open:false,
+      },
+      edit:{
+        title:"",
+        open:false,
+      },
+      editDy:{
+        title:"修改物流单号",
+        open:false,
+      },
+      editDyForm:{
+        deliverySn:null,
+        deliveryId:null,
+      },
+      editForm:{
+        orderType:null,
+        status:null,
+        userAddress:null,
+        // extendOrderId:null,
+        scheduleId:null,
+        mark:"",
+      },
+
+      editDyRules:{
+        deliverySn: [
+          { required: true, message: "物流公司不能为空", trigger: "blur" }
+        ],
+        deliveryId: [
+          { required: true, message: "物流单号不能为空", trigger: "blur" }
+        ],
+      },
+      editRules:{
+        userAddress: [
+          { required: true, message: "收货地址不能为空", trigger: "blur" }
+        ],
+
+      },
+      orderTypeOptions:[],
+      payTypeOptions:[],
+      statusOptions:[],
+      certificates:null,
+      orderStatus:null,
+      order:null,
+      user:{},
+      logs:[],
+      items:[],
+      express:null,
+      traces:[],
+      payments:[],
+      tuiMoneyLogs:[],
+      erpOrder:null,
+      auditLogs: [],
+    };
+  },
+  created() {
+    this.getDicts("store_order_delivery_status").then((response) => {
+      this.deliveryStatusOptions = response.data;
+    });
+    this.getDicts("store_order_delivery_type").then((response) => {
+      this.deliveryTypeOptions = response.data;
+    });
+
+    this.getDicts("store_order_type").then((response) => {
+      this.orderTypeOptions = response.data;
+    });
+    this.getDicts("store_order_status").then((response) => {
+      this.statusOptions = response.data;
+    });
+    this.getDicts("store_pay_type").then((response) => {
+      this.payTypeOptions = response.data;
+    });
+    this.getDicts("store_order_create_type").then((response) => {
+      this.createTypeOptions = response.data;
+    });
+    getTcmScheduleList().then(response => {
+      this.scheduleOptions = response.data;
+    });
+  },
+  methods: {
+    handleAddress(){
+        const id = this.order.id;
+        getStoreOrderAddress(id).then(response =>{
+            this.order.userAddress = response.address;
+        })
+      },
+      handlePhone(){
+        const id = this.order.id;
+        getStoreOrderPhone(id).then(response =>{
+            this.order.userPhone = response.userPhone;
+        })
+      },
+    showImageDialog() {
+      this.dialogVisible = true;
+    },
+    syncExpress(){
+      var that=this;
+        this.$confirm('确定同步物流状态吗', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          var data={orderId:that.order.id}
+          return syncExpress(data);
+        }).then(() => {
+          this.msgSuccess("操作成功");
+          this.getOrder(this.order.id);
+        }).catch(function() {});
+    },
+    updateErpOrder(){
+      var that=this;
+        this.$confirm('确定同步物流单号信息吗', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          var data={orderId:that.order.id}
+          return updateErp(data);
+        }).then(() => {
+          this.msgSuccess("操作成功");
+          this.getOrder(this.order.id);
+          this.editDy.open = false
+        }).catch(function() {});
+    },
+    updateExpress(){
+      var that=this;
+        this.$confirm('确定同步物流信息吗,同步后将自动发货', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          var data={orderId:that.order.id}
+          return updateExpress(data);
+        }).then(() => {
+          this.msgSuccess("操作成功");
+          this.getOrder(this.order.id);
+        }).catch(function() {});
+    },
+    showErpOrder(){
+      this.erpDialog.open=true;
+      var data={extendOrderId:this.order.extendOrderId};
+      getEroOrder(data).then(response => {
+          this.erp = response.data;
+          if(response.data.orders!=null&&response.data.orders.length==1){
+            this.erpOrder=response.data.orders[0]
+          }
+          console.log(this.erpOrder)
+
+      });
+    },
+    showExpress(){
+      this.expressDialog.open=true;
+      getExpress(this.orderId).then(response => {
+          this.express = response.data;
+          if(this.express!=null&&this.express.Traces!=null){
+              this.traces=this.express.Traces
+          }
+
+      });
+
+    },
+    submitEditForm(){
+        this.$refs["editForm"].validate(valid => {
+        if (valid) {
+          updateStoreOrder(this.editForm).then(response => {
+            if (response.code === 200) {
+              this.msgSuccess("操作成功");
+              this.edit.open = false;
+              this.getOrder(this.order.id);
+            }
+          });
+
+        }
+      });
+    },
+    submitEditDyForm(){
+        this.$refs["editDyForm"].validate(valid => {
+        if (valid) {
+          updateDeliveryId(this.editDyForm).then(response => {
+            if (response.code === 200) {
+              this.msgSuccess("操作成功");
+              this.editDy.open = false;
+              this.getOrder(this.order.id);
+            }
+          });
+
+        }
+      });
+    },
+    editTuiMoney1(){
+      var that=this;
+        this.$confirm('是否冻结此订单推广佣金吗?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          var data={orderId:that.order.id}
+          return editTuiMoney(data);
+        }).then(() => {
+          this.msgSuccess("操作成功");
+          this.getOrder(this.order.id);
+        }).catch(function() {});
+    },
+    editTuiMoney2(){
+      var that=this;
+        this.$confirm('是否解冻此订单推广佣金吗?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          var data={orderId:that.order.id}
+          return editTuiMoney(data);
+        }).then(() => {
+          this.msgSuccess("操作成功");
+          this.getOrder(this.order.id);
+        }).catch(function() {});
+    },
+    addTuiMoney(){
+      var that=this;
+        this.$confirm('确定手动分佣金吗?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          var data={orderId:that.order.id}
+          return addTuiMoney(data);
+        }).then(() => {
+          this.msgSuccess("操作成功");
+          this.getOrder(this.order.id);
+        }).catch(function() {});
+    },
+    refundOrderMoney(){
+        var that=this;
+        this.$confirm('确认退款吗', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          var data={orderId:that.order.id}
+          return refundOrderMoney(data);
+        }).then(() => {
+          this.msgSuccess("操作成功");
+          this.getOrder(this.order.id);
+        }).catch(function() {});
+    },
+    finishOrder(){
+        var that=this;
+        this.$confirm('是否确认客户已收货?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          var data={orderId:that.order.id}
+          return finishOrder(data);
+        }).then(() => {
+          this.msgSuccess("操作成功");
+          this.getOrder(this.order.id);
+        }).catch(function() {});
+    },
+    auditPayRemain(){
+        var that=this;
+        this.$confirm('是否确认已收尾款?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          var data={orderId:that.order.id}
+          return auditPayRemain(data);
+        }).then(() => {
+          this.msgSuccess("操作成功");
+          this.getOrder(this.order.id);
+        }).catch(function() {});
+    },
+    editOrder(){
+        this.edit.open=true;
+        this.editForm.id=this.order.id;
+        this.editForm.mark=this.order.mark
+        this.editForm.orderType=this.order.orderType.toString();
+        this.editForm.status = this.order.status.toString();
+        this.editForm.userAddress = this.order.userAddress.toString();
+        this.editForm.scheduleId = this.order.scheduleId;
+        // this.editForm.extendOrderId = this.order.extendOrderId.toString();
+
+    },
+    //推送管易按钮
+    addErpOrder(){
+        var that=this;
+        this.$confirm('是否确认推送erp?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          var data={orderCode:that.order.orderCode}
+          return createErpOrder(data);
+        }).then(() => {
+          this.msgSuccess("操作成功");
+          this.getOrder(this.order.id);
+        }).catch(function() {});
+    },
+    editDelivery(){
+      this.editDy.open = true;
+      this.editDyForm.id = this.order.id;
+      this.editDyForm.deliveryId = this.order.deliveryId;
+      this.editDyForm.deliverySn = this.order.deliverySn;
+    },
+    getOrder(orderId){
+        this.orderId=orderId;
+        this.certificates = null;
+        getStoreOrder(orderId).then(response => {
+            this.order = response.order;
+            if(response.order.certificates != null){
+              this.certificates = response.order.certificates;
+            }
+            if(response.order.status != null){
+              this.orderStatus = response.order.status;
+            }
+            this.user = response.user;
+            this.logs = response.logs;
+            this.items = response.items;
+            this.payments=response.payments;
+            this.tuiMoneyLogs=response.tuiMoneyLogs;
+            this.auditLogs = response.auditLogs;
+        });
+     }
+  }
+};
+</script>
+<style scoped>
+.order-content{
+  margin: 10px;
+
+}
+
+.operate-container {
+  background: #F2F6FC;
+  height: 60px;
+  margin: -20px -20px 0;
+  line-height: 60px;
+}
+
+.operate-button-container {
+  float: right;
+  margin-right: 20px
+}
+</style>

+ 880 - 0
src/views/live/order/userDetail.vue

@@ -0,0 +1,880 @@
+<template>
+  <div class="order-content">
+      <div class="order-status" v-if="order!=null" >
+          <el-steps  :active="order.status==3?order.status+1:order.status" align-center>
+            <el-step title="待支付"></el-step>
+            <el-step title="待发货"></el-step>
+            <el-step title="待收货"></el-step>
+            <el-step title="交易完成"></el-step>
+          </el-steps>
+      </div>
+      <div>
+      <el-card shadow="never" style="margin-top: 15px">
+      <div class="operate-container"  v-if="order!=null">
+        <span style="margin-left: 20px" class="color-danger">订单状态:
+           <el-tag prop="status" v-for="(item, index) in statusOptions"   v-if="order.status==item.dictValue">{{item.dictLabel}}</el-tag>
+        </span>
+        <div class="operate-button-container" >
+          <el-button size="mini" @click="editOrder()"  v-hasPermi="['store:storeOrder:edit']" >修改订单</el-button>
+        </div>
+        <div class="operate-button-container"  v-hasPermi="['store:storeOrder:finishOrder']" v-if="order.status===2">
+          <el-button size="mini" @click="finishOrder()" >确认收货</el-button>
+        </div>
+        <div class="operate-button-container" v-if="order.status==1||order.status==2"  v-hasPermi="['store:storeOrder:refundOrderMoney']"  >
+          <el-button size="mini" @click="refundOrderMoney()" >退款</el-button>
+        </div>
+        <div class="operate-button-container"  v-hasPermi="['store:storeOrder:express']"  >
+          <el-button size="mini" @click="showExpress()">查看物流</el-button>
+        </div>
+        <div class="operate-button-container" v-if="order.tuiMoneyStatus==0"  v-hasPermi="['store:storeOrder:editTuiMoney']"  >
+          <el-button size="mini" @click="editTuiMoney1()" >解冻</el-button>
+        </div>
+        <div class="operate-button-container" v-if="order.tuiMoneyStatus==1"  v-hasPermi="['store:storeOrder:editTuiMoney']"  >
+          <el-button size="mini" @click="editTuiMoney2()" >冻结</el-button>
+        </div>
+
+        <div class="operate-button-container" v-if="order.status==3&&order.tuiMoneyStatus==null"  v-hasPermi="['store:storeOrder:addTuiMoney']"  >
+          <el-button size="mini" @click="addTuiMoney()" >分佣</el-button>
+        </div>
+
+<!--        <div class="operate-button-container" v-if="order.extendOrderId!=null"  v-hasPermi="['store:storeOrder:getEroOrder']"  >
+          <el-button size="mini" @click="showErpOrder()" >查看ERP订单信息</el-button>
+        </div>-->
+        <div class="operate-button-container" v-if="order.isPayRemain!=null&&order.isPayRemain==1"  v-hasPermi="['store:storeOrder:auditPayRemain']"  >
+          <el-button size="mini" @click="auditPayRemain()" >尾款审核</el-button>
+        </div>
+        <div class="operate-button-container" >
+          <el-button size="mini" @click="editDelivery()"  v-hasPermi="['store:storeOrder:editDeliveryId']" >修改物流</el-button>
+        </div>
+        <div class="operate-button-container" v-if="order.status >=1 && order.extendOrderId == null && order.deliveryId == null"  v-hasPermi="['store:storeOrder:createErpOrder']"  >
+          <el-button size="mini" @click="addErpOrder()" >创建ERP订单信息</el-button>
+        </div>
+        <!-- <div class="operate-button-container" v-show="order.status===2">
+          <el-button size="mini"  >去发货</el-button>
+          <el-button size="mini" >备注订单</el-button>
+        </div>
+        <div class="operate-button-container" v-show="order.status===4">
+          <el-button size="mini"  >订单跟踪</el-button>
+          <el-button size="mini"  disabled>备注订单</el-button>
+        </div> -->
+      </div>
+      <div style="margin: 20px 0px">
+        <span class="font-small">基本信息</span>
+      </div>
+      <el-descriptions :column="4" border  >
+            <el-descriptions-item label="订单编号"  >
+                <span v-if="order!=null">
+                  {{order.orderCode}}
+                </span>
+                <el-tag  v-for="(item, index) in createTypeOptions"    v-if="order!=null&&order.orderCreateType==item.dictValue">{{item.dictLabel}}
+                </el-tag>
+            </el-descriptions-item>
+            <el-descriptions-item label="会员"  >
+                <span v-if="user!=null">
+                  {{user.nickname}}({{user.phone}})
+                </span>
+            </el-descriptions-item>
+            <el-descriptions-item label="支付方式"  >
+              <el-tag prop="payType" v-for="(item, index) in payTypeOptions"    v-if="order!=null&&order.payType==item.dictValue">{{item.dictLabel}}
+              </el-tag>
+            </el-descriptions-item>
+<!--            <el-descriptions-item label="订单类型"  >
+              <el-tag prop="orderType" v-for="(item, index) in orderTypeOptions"    v-if="order!=null&&order.orderType==item.dictValue">{{item.dictLabel}}</el-tag>
+            </el-descriptions-item>-->
+            <el-descriptions-item label="物流公司编号"  >
+                <span v-if="order!=null">
+                  {{order.deliverySn}}
+                </span>
+            </el-descriptions-item>
+            <el-descriptions-item label="物流公司名称"  >
+                <span v-if="order!=null">
+                  {{order.deliveryName}}
+                </span>
+            </el-descriptions-item>
+            <el-descriptions-item label="物流单号"  >
+                <span v-if="order!=null">
+                  {{order.deliveryId}}
+                </span>
+            </el-descriptions-item>
+            <el-descriptions-item label="物流状态"  >
+                <span v-if="order!=null">
+                  <el-tag prop="deliveryId" v-for="(item, index) in deliveryStatusOptions"    v-if="order!=null&&order.deliveryStatus==item.dictValue">{{item.dictLabel}}</el-tag>
+                </span>
+            </el-descriptions-item>
+            <el-descriptions-item label="物流跟踪状态"  >
+                <span v-if="order!=null">
+                  <el-tag prop="deliveryId" v-for="(item, index) in deliveryTypeOptions"    v-if="order!=null&&order.deliveryType==item.dictValue">{{item.dictLabel}}</el-tag>
+                </span>
+            </el-descriptions-item>
+            <el-descriptions-item label="物流结算费用"  >
+                <span v-if="order!=null&&order.deliveryPayMoney!=null ">
+                  {{order.deliveryPayMoney.toFixed(2) }}
+                </span>
+            </el-descriptions-item>
+            <el-descriptions-item label="快递帐单日期"  >
+                <span v-if="order!=null ">
+                  {{order.deliveryTime }}
+                </span>
+            </el-descriptions-item>
+            <el-descriptions-item label="快递结算日期"  >
+                <span v-if="order!=null ">
+                  {{order.deliveryPayTime }}
+                </span>
+            </el-descriptions-item>
+            <el-descriptions-item label="推广佣金"  >
+                <span v-if="order!=null ">
+                  {{order.tuiMoney }}
+                </span>
+            </el-descriptions-item>
+            <el-descriptions-item label="收货人"  >
+                <span v-if="order!=null ">
+                  {{order.realName }}
+                </span>
+            </el-descriptions-item>
+            <el-descriptions-item label="手机号码"  >
+                <span v-if="order!=null ">
+                  {{order.userPhone }}
+                </span>
+                <el-button icon="el-icon-search" size="mini" @click="handlePhone()" style="margin-left: 20px;" circle v-hasPermi="['store:storeOrder:queryPhone']"></el-button>
+            </el-descriptions-item>
+            <el-descriptions-item label="收货地址"  >
+              <el-popover
+                v-if="order!=null"
+                placement="top-start"
+                title="收货地址"
+                width="300"
+                trigger="hover"
+                :content="order.userAddress">
+                <span slot="reference">{{order.userAddress}}</span>
+                <el-button icon="el-icon-search" size="mini" @click="handleAddress()" style="margin-left: 20px;" circle v-hasPermi="['store:storeOrder:queryAddress']"></el-button>
+              </el-popover>
+            </el-descriptions-item>
+            <el-descriptions-item label="档期归属"  >
+              <el-tag prop="scheduleId" v-for="(item, index) in scheduleOptions"    v-if="order!=null&&order.scheduleId==item.id">{{item.name}}
+              </el-tag>
+            </el-descriptions-item>
+            <el-descriptions-item label="用户备注"  >
+                <span v-if="order!=null">
+                  {{order.mark}}
+                </span>
+            </el-descriptions-item>
+      </el-descriptions>
+      <div style="margin: 20px 0px"  v-if="order!=null">
+        <span class="font-small">
+          凭证信息
+        </span>
+      </div>
+      <el-image
+          v-if="certificates != null"
+          :src="certificates"
+          :preview-src-list="[certificates]"
+          :style="{ width: '100px', height: '100px' }"
+          @click.native="showImageDialog"
+        ></el-image>
+        <el-dialog :visible.sync="dialogVisibleImage" width="10%">
+          <img :src="certificates" style="width: 100%" alt="">
+        </el-dialog>
+      <div style="margin-top: 20px">
+        <span class="font-small">商品信息</span>
+      </div>
+      <el-table
+        border
+        v-if="items!=null"
+        :data="items"
+        size="small"
+        style="width: 100%;margin-top: 20px" >
+        <el-table-column label="商品图片" width="150" align="center">
+          <template slot-scope="scope">
+            <img :src="JSON.parse(scope.row.jsonInfo).image" style="height: 80px">
+          </template>
+        </el-table-column>
+        <el-table-column label="商品编码" width="300" align="center">
+          <template slot-scope="scope">
+            <p>{{JSON.parse(scope.row.jsonInfo).barCode}}</p>
+          </template>
+        </el-table-column>
+        <el-table-column label="商品组合编码" width="300" align="center">
+          <template slot-scope="scope">
+            <p>{{JSON.parse(scope.row.jsonInfo).groupBarCode}}</p>
+          </template>
+        </el-table-column>
+        <el-table-column label="商品名称" width="300" align="center">
+          <template slot-scope="scope">
+            <p>{{JSON.parse(scope.row.jsonInfo).productName}}</p>
+          </template>
+        </el-table-column>
+        <el-table-column label="单价" width="240" align="center">
+          <template slot-scope="scope">
+            <p>¥{{JSON.parse(scope.row.jsonInfo).price.toFixed(2)}}</p>
+          </template>
+        </el-table-column>
+        <el-table-column label="规格" width="240" align="center">
+          <template slot-scope="scope">
+            {{JSON.parse(scope.row.jsonInfo).sku}}
+          </template>
+        </el-table-column>
+        <el-table-column label="数量" width="180" align="center">
+          <template slot-scope="scope">
+            {{scope.row.num}}
+          </template>
+        </el-table-column>
+        <el-table-column label="处方药" width="240" align="center">
+          <template slot-scope="scope">
+            {{scope.row.isPrescribe!=null&&scope.row.isPrescribe==1?'是':'否'}}
+          </template>
+        </el-table-column>
+        <el-table-column label="小计"  align="center">
+          <template slot-scope="scope" >
+            ¥{{scope.row.num*JSON.parse(scope.row.jsonInfo).price.toFixed(2)}}
+          </template>
+        </el-table-column>
+      </el-table>
+      <div style="float: right;margin: 20px" v-if="order!=null">
+        合计:<span class="color-danger">¥{{order.totalPrice.toFixed(2)}}</span>
+      </div>
+      <div style="margin: 60px 0px 20px 0px">
+        <span class="font-small">费用信息</span>
+      </div>
+      <el-descriptions   :column="4" border  >
+          <el-descriptions-item label="商品合计"  >
+              <span v-if="order!=null">
+                ¥{{order.totalPrice.toFixed(2)}}
+              </span>
+          </el-descriptions-item>
+          <el-descriptions-item label="应付金额"  >
+              <span v-if="order!=null">
+                ¥{{order.payPrice.toFixed(2)}}
+              </span>
+          </el-descriptions-item>
+          <el-descriptions-item label="运费"  >
+              <span v-if="order!=null">
+                ¥{{order.payPostage.toFixed(2)}}
+              </span>
+          </el-descriptions-item>
+          <el-descriptions-item label="优惠券"  >
+              <span v-if="order!=null">
+                ¥{{order.couponPrice.toFixed(2)}}
+              </span>
+          </el-descriptions-item>
+          <el-descriptions-item label="积分抵扣"  >
+              <span v-if="order!=null">
+                ¥{{order.deductionPrice.toFixed(2)}}
+              </span>
+          </el-descriptions-item>
+          <el-descriptions-item label="实付金额"  >
+              <span v-if="order!=null">
+                ¥{{order.payMoney.toFixed(2)}}
+              </span>
+          </el-descriptions-item>
+          <el-descriptions-item label="代收金额"  >
+              <span v-if="order!=null">
+                ¥{{order.payDelivery.toFixed(2)}}
+              </span>
+          </el-descriptions-item>
+      </el-descriptions>
+
+      <div style="margin-top: 20px">
+        <span class="font-small">支付信息</span>
+      </div>
+      <el-table
+        border
+        :data="payments"
+        size="small"
+        style="width: 100%;margin-top: 20px" >
+          <el-table-column label="支付单号" align="center" prop="payCode" width="120px" />
+          <el-table-column label="支付金额" align="center" prop="payMoney" />
+          <el-table-column label="类型" align="center" prop="payTypeCode" />
+          <el-table-column label="交易单号" align="center" prop="bankTransactionId" />
+          <el-table-column label="银行单号" align="center" prop="bankSerialNo" />
+          <el-table-column label="创建时间" align="center" prop="createTime" />
+          <el-table-column label="支付时间" align="center" prop="payTime" />
+      </el-table>
+
+
+      <div style="margin-top: 20px">
+        <span class="font-small">操作信息</span>
+      </div>
+      <el-table style="margin-top: 20px;width: 100%"
+                ref="orderHistoryTable"
+                :data="logs" border>
+        <el-table-column label="操作时间"  width="160" align="center">
+          <template slot-scope="scope">
+            {{scope.row.changeTime}}
+          </template>
+        </el-table-column>
+        <el-table-column label="备注" align="center">
+          <template slot-scope="scope">
+            {{scope.row.changeMessage}}
+          </template>
+        </el-table-column>
+      </el-table>
+
+      <div style="margin-top: 20px">
+        <!-- <svg-icon icon-class="marker" style="color: #606266"></svg-icon> -->
+        <span class="font-small">分佣信息</span>
+      </div>
+      <el-table
+        border
+        :data="tuiMoneyLogs"
+        size="small"
+                style="width: 100%;margin-top: 20px" >
+          <el-table-column label="公司名称" align="center" prop="companyName" width="120px" />
+          <el-table-column label="金额" align="center" prop="money" />
+          <el-table-column label="余额" align="center" prop="balance" />
+          <el-table-column label="创建时间" align="center" prop="createTime" />
+          <el-table-column label="备注" align="center" prop="remark" />
+      </el-table>
+
+        <div style="margin-top: 20px">
+          <span class="font-small">审批信息</span>
+        </div>
+        <el-table style="margin-top: 20px;width: 100%"
+                  :data="auditLogs" border>
+          <el-table-column label="操作时间"  width="160" align="center">
+            <template slot-scope="scope">
+              {{scope.row.createTime}}
+            </template>
+          </el-table-column>
+          <el-table-column label="备注" align="center">
+            <template slot-scope="scope">
+              {{scope.row.content}}
+            </template>
+          </el-table-column>
+        </el-table>
+      </el-card>
+    </div>
+
+    <el-dialog :title="edit.title" :visible.sync="edit.open" width="600px" append-to-body>
+      <el-form ref="editForm" :model="editForm" :rules="editRules" label-width="100px">
+<!--        <el-form-item label="订单类型" prop="orderType"  >
+            <el-select style="width: 200px" v-model="editForm.orderType" placeholder="请选择订单类型" clearable size="small" >
+              <el-option
+                      v-for="item in orderTypeOptions"
+                      :key="item.dictValue"
+                      :label="item.dictLabel"
+                      :value="item.dictValue"
+                    />
+            </el-select>
+        </el-form-item>-->
+       <el-form-item label="状态" prop="status" >
+           <el-select style="width:220px" v-model="editForm.status" placeholder="请选择状态" clearable size="small">
+            <el-option key="0"  label="待支付" value="0" />
+            <el-option key="1"  label="待发货" value="1" />
+             <el-option key="2"  label="待收货" value="2" />
+             <el-option key="3"  label="交易成功" value="3" />
+             <el-option key="-1"  label="退款中" value="-1" />
+             <el-option key="-2"  label="已退款" value="-2" />
+             <el-option key="-3"  label="已取消" value="-3" />
+           </el-select>
+         </el-form-item>
+<!--         <el-form-item label="档期归属" prop="scheduleId"  >
+            <el-select filterable style="width: 200px" v-model="editForm.scheduleId" placeholder="请选择档期" clearable size="small" >
+              <el-option
+                      v-for="item in scheduleOptions"
+                      :key="item.id"
+                      :label="item.name"
+                      :value="item.id"
+                    />
+            </el-select>
+        </el-form-item>-->
+         <el-form-item label="详情地址" prop="userAddress"  >
+          <el-input v-model="editForm.userAddress" placeholder="请输入" />
+        </el-form-item>
+        <!-- <el-form-item label="erp单号" prop="extendOrderId"  >
+          <el-input v-model="editForm.extendOrderId" placeholder="请输入" />
+        </el-form-item> -->
+        <el-form-item label="备注" prop="mark"  >
+          <el-input v-model="editForm.mark" placeholder="请输入备注" />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitEditForm">确 定</el-button>
+      </div>
+    </el-dialog>
+
+    <el-dialog :title="editDy.title" :visible.sync="editDy.open" width="600px" append-to-body>
+      <el-form ref="editDyForm" :model="editDyForm" :rules="editDyRules" label-width="120px">
+<!--      <div  v-hasPermi="['store:storeOrder:updateErpOrder']"  style="margin-bottom: 20px;" >
+        <el-button size="mini" @click="updateErpOrder" >同步物流单号信息</el-button>
+      </div>-->
+        <el-form-item label="物流公司" prop="deliverySn" >
+           <el-select style="width:220px" v-model="editDyForm.deliverySn" placeholder="请选择" clearable size="small">
+            <el-option key="SF"  label="顺丰" value="SF" />
+            <el-option key="EMS"  label="邮政" value="EMS" />
+             <el-option key="ZTO"  label="中通" value="ZTO" />
+             <el-option key="STO"  label="申通" value="STO" />
+             <el-option key="JD"  label="京东" value="JD" />
+             <el-option key="DBL"  label="德邦" value="DBL" />
+             <el-option key="JTSD"  label="极兔" value="JTSD" />
+             <el-option key="YD"  label="韵达" value="YD" />
+             <el-option key="YTO"  label="圆通" value="YTO" />
+           </el-select>
+         </el-form-item>
+        <el-form-item label="物流单号" prop="deliveryId"  >
+          <el-input v-model="editDyForm.deliveryId" placeholder="请输入物流单号" />
+        </el-form-item>
+
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitEditDyForm">确 定</el-button>
+        <el-button @click="editDy.open = false">取 消</el-button>
+      </div>
+    </el-dialog>
+
+    <el-dialog :title="expressDialog.title" :visible.sync="expressDialog.open" width="600px" append-to-body>
+<!--      <div  v-hasPermi="['store:storeOrder:syncExpress']"  >
+        <el-button size="mini" @click="syncExpress()" >同步快递鸟物流状态</el-button>
+      </div>-->
+      <el-table style="margin-top: 20px;width: 100%"
+                ref="orderHistoryTable"
+                :data="traces" border>
+        <el-table-column label="操作时间"  width="160" align="center">
+          <template slot-scope="scope">
+            {{scope.row.AcceptTime}}
+          </template>
+        </el-table-column>
+         <el-table-column label="位置" align="center">
+          <template slot-scope="scope">
+            {{scope.row.Location}}
+          </template>
+        </el-table-column>
+        <el-table-column label="描述" align="center">
+          <template slot-scope="scope">
+            {{scope.row.AcceptStation}}
+          </template>
+        </el-table-column>
+      </el-table>
+    </el-dialog>
+
+    <el-dialog :title="erpDialog.title" :visible.sync="erpDialog.open" width="600px" append-to-body>
+      <div v-if="order!=null&&order.extendOrderId!=null&&order.status==1"  v-hasPermi="['store:storeOrder:updateExpress']"  >
+        <el-button size="mini" @click="updateExpress()" >同步物流发货</el-button>
+      </div>
+      <div class="table-layout"  v-if="erpOrder!=null">
+        <el-row>
+          <el-col :span="6" class="table-cell-title">订单编号</el-col>
+          <el-col :span="6" class="table-cell-title">是否代收</el-col>
+          <el-col :span="6" class="table-cell-title">快递编号</el-col>
+          <el-col :span="6" class="table-cell-title">快递名称</el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="6" class="table-cell">
+            {{erpOrder.code}}
+          </el-col>
+          <el-col :span="6" class="table-cell">
+            {{erpOrder.cod?'是':'否'}}
+          </el-col>
+          <el-col :span="6" class="table-cell">
+            {{erpOrder.express_code}}
+          </el-col>
+          <el-col :span="6" class="table-cell">
+            {{erpOrder.express_name}}
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="6" class="table-cell-title">收货人</el-col>
+          <el-col :span="6" class="table-cell-title">电话</el-col>
+          <el-col :span="6" class="table-cell-title">地址</el-col>
+          <el-col :span="6" class="table-cell-title">运单号</el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="6" class="table-cell">
+            {{erpOrder.receiver_name}}
+          </el-col>
+          <el-col :span="6" class="table-cell">
+            {{erpOrder.receiver_mobile}}
+          </el-col>
+          <el-col :span="6" class="table-cell">
+            {{erpOrder.receiver_address}}
+          </el-col>
+          <el-col :span="6" class="table-cell">
+            {{erpOrder.deliverys!=null&&erpOrder.deliverys.length>0?erpOrder.deliverys[0].mail_no:''}}
+          </el-col>
+
+        </el-row>
+      </div>
+    </el-dialog>
+
+  </div>
+</template>
+
+<script>
+import {auditPayRemain,addTuiMoney,syncExpress,updateExpress,getEroOrder,refundOrderMoney, editTuiMoney,getExpress,finishOrder,listStoreOrder, getStoreOrder, delStoreOrder, addStoreOrder, updateStoreOrder, exportStoreOrder,updateDeliveryId, createErpOrder,updateErp,getStoreOrderAddress,getStoreOrderPhone} from "@/api/hisStore/storeOrder";
+import { getTcmScheduleList } from "@/api/company/schedule";
+export default {
+  name: "UserDetail",
+  props: {
+    orderId: {
+      type: [String, Number],
+      default: null
+    }
+  },
+  watch: {
+    orderId: {
+      immediate: true,
+      handler(val) {
+        if (val) {
+          this.getOrder(val);
+        }
+      }
+    }
+  },
+  data() {
+    return {
+      dialogVisibleImage: false,
+      createTypeOptions:[],
+      deliveryStatusOptions:[],
+      deliveryTypeOptions:[],
+      scheduleOptions:[],
+      schedules:[],
+      orderId:null,
+      erpDialog:{
+        title:"ERP订单信息",
+        open:false,
+      },
+      expressDialog:{
+        title:"物流信息",
+        open:false,
+      },
+      edit:{
+        title:"",
+        open:false,
+      },
+      editDy:{
+        title:"修改物流单号",
+        open:false,
+      },
+      editDyForm:{
+        deliverySn:null,
+        deliveryId:null,
+      },
+      editForm:{
+        orderType:null,
+        status:null,
+        userAddress:null,
+        // extendOrderId:null,
+        scheduleId:null,
+        mark:"",
+      },
+
+      editDyRules:{
+        deliverySn: [
+          { required: true, message: "物流公司不能为空", trigger: "blur" }
+        ],
+        deliveryId: [
+          { required: true, message: "物流单号不能为空", trigger: "blur" }
+        ],
+      },
+      editRules:{
+        userAddress: [
+          { required: true, message: "收货地址不能为空", trigger: "blur" }
+        ],
+
+      },
+      orderTypeOptions:[],
+      payTypeOptions:[],
+      statusOptions:[],
+      certificates:null,
+      orderStatus:null,
+      order:null,
+      user:{},
+      logs:[],
+      items:[],
+      express:null,
+      traces:[],
+      payments:[],
+      tuiMoneyLogs:[],
+      erpOrder:null,
+      auditLogs: [],
+    };
+  },
+  created() {
+    this.getDicts("store_order_delivery_status").then((response) => {
+      this.deliveryStatusOptions = response.data;
+    });
+    this.getDicts("store_order_delivery_type").then((response) => {
+      this.deliveryTypeOptions = response.data;
+    });
+
+    this.getDicts("store_order_type").then((response) => {
+      this.orderTypeOptions = response.data;
+    });
+    this.getDicts("store_order_status").then((response) => {
+      this.statusOptions = response.data;
+    });
+    this.getDicts("store_pay_type").then((response) => {
+      this.payTypeOptions = response.data;
+    });
+    this.getDicts("store_order_create_type").then((response) => {
+      this.createTypeOptions = response.data;
+    });
+    getTcmScheduleList().then(response => {
+      this.scheduleOptions = response.data;
+    });
+  },
+  methods: {
+    handleAddress(){
+        const id = this.order.id;
+        getStoreOrderAddress(id).then(response =>{
+            this.order.userAddress = response.address;
+        })
+      },
+      handlePhone(){
+        const id = this.order.id;
+        getStoreOrderPhone(id).then(response =>{
+            this.order.userPhone = response.userPhone;
+        })
+      },
+    showImageDialog() {
+      this.dialogVisible = true;
+    },
+    syncExpress(){
+      var that=this;
+        this.$confirm('确定同步物流状态吗', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          var data={orderId:that.order.id}
+          return syncExpress(data);
+        }).then(() => {
+          this.msgSuccess("操作成功");
+          this.getOrder(this.order.id);
+        }).catch(function() {});
+    },
+    updateErpOrder(){
+      var that=this;
+        this.$confirm('确定同步物流单号信息吗', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          var data={orderId:that.order.id}
+          return updateErp(data);
+        }).then(() => {
+          this.msgSuccess("操作成功");
+          this.getOrder(this.order.id);
+          this.editDy.open = false
+        }).catch(function() {});
+    },
+    updateExpress(){
+      var that=this;
+        this.$confirm('确定同步物流信息吗,同步后将自动发货', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          var data={orderId:that.order.id}
+          return updateExpress(data);
+        }).then(() => {
+          this.msgSuccess("操作成功");
+          this.getOrder(this.order.id);
+        }).catch(function() {});
+    },
+    showErpOrder(){
+      this.erpDialog.open=true;
+      var data={extendOrderId:this.order.extendOrderId};
+      getEroOrder(data).then(response => {
+          this.erp = response.data;
+          if(response.data.orders!=null&&response.data.orders.length==1){
+            this.erpOrder=response.data.orders[0]
+          }
+          console.log(this.erpOrder)
+
+      });
+    },
+    showExpress(){
+      this.expressDialog.open=true;
+      getExpress(this.orderId).then(response => {
+          this.express = response.data;
+          if(this.express!=null&&this.express.Traces!=null){
+              this.traces=this.express.Traces
+          }
+
+      });
+
+    },
+    submitEditForm(){
+        this.$refs["editForm"].validate(valid => {
+        if (valid) {
+          updateStoreOrder(this.editForm).then(response => {
+            if (response.code === 200) {
+              this.msgSuccess("操作成功");
+              this.edit.open = false;
+              this.getOrder(this.order.id);
+            }
+          });
+
+        }
+      });
+    },
+    submitEditDyForm(){
+        this.$refs["editDyForm"].validate(valid => {
+        if (valid) {
+          updateDeliveryId(this.editDyForm).then(response => {
+            if (response.code === 200) {
+              this.msgSuccess("操作成功");
+              this.editDy.open = false;
+              this.getOrder(this.order.id);
+            }
+          });
+
+        }
+      });
+    },
+    editTuiMoney1(){
+      var that=this;
+        this.$confirm('是否冻结此订单推广佣金吗?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          var data={orderId:that.order.id}
+          return editTuiMoney(data);
+        }).then(() => {
+          this.msgSuccess("操作成功");
+          this.getOrder(this.order.id);
+        }).catch(function() {});
+    },
+    editTuiMoney2(){
+      var that=this;
+        this.$confirm('是否解冻此订单推广佣金吗?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          var data={orderId:that.order.id}
+          return editTuiMoney(data);
+        }).then(() => {
+          this.msgSuccess("操作成功");
+          this.getOrder(this.order.id);
+        }).catch(function() {});
+    },
+    addTuiMoney(){
+      var that=this;
+        this.$confirm('确定手动分佣金吗?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          var data={orderId:that.order.id}
+          return addTuiMoney(data);
+        }).then(() => {
+          this.msgSuccess("操作成功");
+          this.getOrder(this.order.id);
+        }).catch(function() {});
+    },
+    refundOrderMoney(){
+        var that=this;
+        this.$confirm('确认退款吗', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          var data={orderId:that.order.id}
+          return refundOrderMoney(data);
+        }).then(() => {
+          this.msgSuccess("操作成功");
+          this.getOrder(this.order.id);
+        }).catch(function() {});
+    },
+    finishOrder(){
+        var that=this;
+        this.$confirm('是否确认客户已收货?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          var data={orderId:that.order.id}
+          return finishOrder(data);
+        }).then(() => {
+          this.msgSuccess("操作成功");
+          this.getOrder(this.order.id);
+        }).catch(function() {});
+    },
+    auditPayRemain(){
+        var that=this;
+        this.$confirm('是否确认已收尾款?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          var data={orderId:that.order.id}
+          return auditPayRemain(data);
+        }).then(() => {
+          this.msgSuccess("操作成功");
+          this.getOrder(this.order.id);
+        }).catch(function() {});
+    },
+    editOrder(){
+        this.edit.open=true;
+        this.editForm.id=this.order.id;
+        this.editForm.mark=this.order.mark
+        this.editForm.orderType=this.order.orderType.toString();
+        this.editForm.status = this.order.status.toString();
+        this.editForm.userAddress = this.order.userAddress.toString();
+        this.editForm.scheduleId = this.order.scheduleId;
+        // this.editForm.extendOrderId = this.order.extendOrderId.toString();
+
+    },
+    //推送管易按钮
+    addErpOrder(){
+        var that=this;
+        this.$confirm('是否确认推送erp?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          var data={orderCode:that.order.orderCode}
+          return createErpOrder(data);
+        }).then(() => {
+          this.msgSuccess("操作成功");
+          this.getOrder(this.order.id);
+        }).catch(function() {});
+    },
+    editDelivery(){
+      this.editDy.open = true;
+      this.editDyForm.id = this.order.id;
+      this.editDyForm.deliveryId = this.order.deliveryId;
+      this.editDyForm.deliverySn = this.order.deliverySn;
+    },
+    getOrder(orderId){
+        this.orderId=orderId;
+        this.certificates = null;
+        getStoreOrder(orderId).then(response => {
+            this.order = response.order;
+            if(response.order.certificates != null){
+              this.certificates = response.order.certificates;
+            }
+            if(response.order.status != null){
+              this.orderStatus = response.order.status;
+            }
+            this.user = response.user;
+            this.logs = response.logs;
+            this.items = response.items;
+            this.payments=response.payments;
+            this.tuiMoneyLogs=response.tuiMoneyLogs;
+            this.auditLogs = response.auditLogs;
+        });
+     }
+  }
+};
+</script>
+<style scoped>
+.order-content{
+  margin: 10px;
+
+}
+
+.operate-container {
+  background: #F2F6FC;
+  height: 60px;
+  margin: -20px -20px 0;
+  line-height: 60px;
+}
+
+.operate-button-container {
+  float: right;
+  margin-right: 20px
+}
+</style>

+ 35 - 3
src/views/login.vue

@@ -71,6 +71,15 @@
       <span>{{companyName}}</span>
       <a :href="icpUrl" target="_bank">{{icpRecord}}</a>
     </div>
+
+    <!-- 微信扫码弹框 -->
+    <WechatLoginDialog
+      ref="wechatDialog"
+      :ticket="loginForm.username"
+      :visible.sync="wechatDialogVisible"
+      @loginSuccess="handleWechatLoginSuccess"
+      :redirect="redirect"
+    />
   </div>
 </template>
 
@@ -78,9 +87,12 @@
 import { getCodeImg } from "@/api/login";
 import Cookies from "js-cookie";
 import { encrypt, decrypt } from '@/utils/jsencrypt'
+import WechatLoginDialog from "@/views/WechatLoginDialog.vue";
+import { setToken } from "@/utils/auth";
 
 export default {
   name: "Login",
+  components: { WechatLoginDialog },
   data() {
     return {
       codeUrl: "",
@@ -89,6 +101,7 @@ export default {
       icpRecord: process.env.VUE_APP_ICP_RECORD,
       icpUrl: process.env.VUE_APP_ICP_URL,
       cookiePassword: "",
+      wechatDialogVisible: false,
       loginForm: {
         username: "",
         password: "",
@@ -164,8 +177,19 @@ export default {
           }
           this.$store
             .dispatch("Login", this.loginForm)
-            .then(() => {
-              this.$router.push({ path: this.redirect || "/" });
+            .then(res => {
+              if (res.needSms){
+                console.log("打开弹窗")
+                this.wechatDialogVisible = true;
+                // 等 visible 更新后,直接调用弹窗 open()
+                this.$nextTick(() => {
+                  if (this.$refs.wechatDialog) {
+                    this.$refs.wechatDialog.open(this.loginForm.username);
+                  }
+                });
+              } else {
+                this.$router.push({ path: this.redirect || "/" });
+              }
             })
             .catch(() => {
               this.loading = false;
@@ -181,7 +205,15 @@ export default {
       }else{
         this.passwordtype="text"
       }
-    }
+    },
+    // 微信扫码成功回调
+    handleWechatLoginSuccess(token) {
+      this.loading = false
+      console.log("父组件收到 loginSuccess:", token);
+      this.$store.commit("SET_TOKEN", token);
+      setToken(token);
+      this.$router.push({ path: this.redirect || "/" });
+    },
   }
 };
 </script>

Bu fark içinde çok fazla dosya değişikliği olduğu için bazı dosyalar gösterilmiyor