93 Revize 47ab5a319c ... 42c294adc2

Autor SHA1 Zpráva Datum
  Lita-Tako 42c294adc2 fix bug před 4 měsíci
  Lita-Tako 9849715af4 fix bug před 4 měsíci
  Lita-Tako a54666eedc fix bug před 4 měsíci
  Lita-Tako 09f9f5df89 fix bug před 4 měsíci
  Lita-Tako 546700ccf6 fix bug před 4 měsíci
  Lita-Tako 6c0f3d26c3 fix bug před 4 měsíci
  Lita-Tako c733838339 fix bug před 4 měsíci
  Lita-Tako 1cb23b6167 fix bug před 4 měsíci
  Lita-Tako cc1782a7a1 fix bug před 4 měsíci
  Lita-Tako 1abca0355b fix bug před 5 měsíci
  Lita-Tako 8ce7bc161b fix bug před 5 měsíci
  Lita-Tako d6ac5db5bc fix bug před 5 měsíci
  wzq 27fc26d827 Merge branch 'dev-2.19.1' into dev před 5 měsíci
  wzq 7d48a1f969 flx:更改++油罐 před 5 měsíci
  Lita-Tako 5bf9381950 Merge branch 'refs/heads/zly' into dev před 5 měsíci
  Lita-Tako a2a2193111 fix bug před 5 měsíci
  chenghanbin c42e7f8d35 Merge branch 'dev' of http://101.36.160.140:21044/depot-qinghai/depot-vue-qinghai into dev před 5 měsíci
  chenghanbin ec5e5a8ea3 Merge branch 'dev-2.19.2' of http://101.36.160.140:21044/depot-qinghai/depot-vue-qinghai into dev před 5 měsíci
  chenghanbin f65e65a7e0 Merge branch 'dev-2.19.1' of http://101.36.160.140:21044/depot-qinghai/depot-vue-qinghai into dev před 5 měsíci
  chenghanbin 1c0e8de9db Merge branch 'dev-2.19.1' of http://101.36.160.140:21044/depot-qinghai/depot-vue-qinghai into dev-2.19.1 před 5 měsíci
  chenghanbin bfece82f51 删除测试数据 před 5 měsíci
  chenghanbin 137785a86d 完成销售收入上缴 před 5 měsíci
  chenghanbin 2d8ae2fdda 隐藏显示按钮 před 5 měsíci
  chenghanbin 9e57ed589e 完善接口 před 5 měsíci
  chenghanbin 8bd6e61487 完善 před 5 měsíci
  Lita-Tako 9c35a84652 test před 5 měsíci
  Lita-Tako da0edeeaaa test před 5 měsíci
  Lita-Tako 4048672f1a 添加视频 js 依赖 před 5 měsíci
  Lita-Tako 264e95f06b Merge remote-tracking branch 'origin/dev' into dev před 5 měsíci
  Lita-Tako 0385c86d3c 视频接口修改 před 5 měsíci
  wzq 6f2f81845e Merge branch 'dev-2.19.1' into dev před 5 měsíci
  wzq e2f7162820 flx:更改++4456 před 5 měsíci
  wzq d43061e8a3 Merge branch 'dev-2.19.1' into dev před 5 měsíci
  wzq 0399a801b7 flx:更改++223 před 5 měsíci
  Lita-Tako 8861f7599d Merge remote-tracking branch 'origin/dev' into dev před 5 měsíci
  Lita-Tako 1749f290db 补齐调用 před 5 měsíci
  yangchengfei 1a206beac8 Merge branch 'dev-2.24.0' of depot-qinghai/depot-vue-qinghai into dev před 5 měsíci
  yangchengfei 8244cec0b6 fix:样式问题 před 5 měsíci
  yangchengfei 2957430b54 Merge branch 'dev-2.24.0' of depot-qinghai/depot-vue-qinghai into dev před 5 měsíci
  yangchengfei a86cfa296d fix:出入库 před 5 měsíci
  Lita-Tako 0b9dc029b5 Merge remote-tracking branch 'origin/dev' into dev před 5 měsíci
  Lita-Tako f102684510 接口添加参数 před 5 měsíci
  yangchengfei 0337480ae2 Merge branch 'dev-2.24.0' of depot-qinghai/depot-vue-qinghai into dev před 5 měsíci
  yangchengfei 176981cfc7 侧边栏改造 před 5 měsíci
  Lita-Tako 61276be4af Merge remote-tracking branch 'origin/dev' into dev před 5 měsíci
  Lita-Tako eb05f66205 添加视频 před 5 měsíci
  yangchengfei 6d4ad1b90a Merge branch 'dev-2.24.0' of depot-qinghai/depot-vue-qinghai into dev před 5 měsíci
  yangchengfei e8fe5bf5a3 入库确认单获取合同 před 5 měsíci
  chenghanbin fb51a9247f Merge branch 'dev-2.19.2' of http://101.36.160.140:21044/depot-qinghai/depot-vue-qinghai into dev před 5 měsíci
  chenghanbin 824021f5e9 Merge branch 'dev-2.19.1' of http://101.36.160.140:21044/depot-qinghai/depot-vue-qinghai into dev před 5 měsíci
  chenghanbin 8daf3b772d 完善细节 před 5 měsíci
  chenghanbin 88c903a739 完善单位 před 5 měsíci
  chenghanbin 1f4b049115 添加单位 před 5 měsíci
  chenghanbin cdf0066a8a Merge branch 'dev-2.19.1' of http://101.36.160.140:21044/depot-qinghai/depot-vue-qinghai into dev před 5 měsíci
  chenghanbin ea4005e951 修改细节 před 5 měsíci
  chenghanbin 2b2ddb4289 修改细节 před 5 měsíci
  chenghanbin 486e302685 Merge branch 'dev' of http://101.36.160.140:21044/depot-qinghai/depot-vue-qinghai into dev před 5 měsíci
  chenghanbin 1a6d16ad3d Merge branch 'dev-2.19.2' of http://101.36.160.140:21044/depot-qinghai/depot-vue-qinghai into dev před 5 měsíci
  chenghanbin 140d6d183d Merge branch 'dev-2.19.1' of http://101.36.160.140:21044/depot-qinghai/depot-vue-qinghai into dev před 5 měsíci
  chenghanbin eff6ad0c46 Merge branch 'dev-2.19.1' of http://101.36.160.140:21044/depot-qinghai/depot-vue-qinghai into dev-2.19.1 před 5 měsíci
  chenghanbin 1736a6f6ec 优化细节 před 5 měsíci
  chenghanbin afb021e7ee 优化 před 5 měsíci
  chenghanbin 0d94dc3cde 修改样式 před 5 měsíci
  yangchengfei 5fb7e81519 Merge branch 'dev-2.24.0' of depot-qinghai/depot-vue-qinghai into dev před 5 měsíci
  yangchengfei 5eab424dd7 fix:bug před 5 měsíci
  yangchengfei a7ea6080ce Merge branch 'dev-2.24.0' of depot-qinghai/depot-vue-qinghai into dev před 5 měsíci
  yangchengfei 70137ae240 fix:修改出入库系统地址 před 5 měsíci
  wzq 79b315a411 Merge branch 'dev-2.19.1' into dev před 5 měsíci
  wzq 866246b483 flx:更改++445 před 5 měsíci
  Lita-Tako c8d6498453 增加字段 před 5 měsíci
  wzq 76d56330af Merge branch 'dev-2.19.1' into dev před 5 měsíci
  wzq cdf923dc4c flx:更改435 před 5 měsíci
  chenghanbin 12a15e72ee 编写销售收入上缴模块 před 5 měsíci
  wzq b4bc7b7269 Merge branch 'dev-2.19.1' into dev před 5 měsíci
  wzq ece31fab93 flx:更改成品粮 před 5 měsíci
  Lita-Tako 5ce5c67215 搜索 před 5 měsíci
  Lita-Tako 453df1f1eb 熬煎导入 před 5 měsíci
  Lita-Tako 04080e1f0e 修改 每个请求之前 请求是否登录 před 5 měsíci
  Holla-Tako 834223a2af fix bug před 5 měsíci
  Holla-Tako 891b3d20a7 2.23.0 před 5 měsíci
  Holla-Tako bdb001b645 2.23.0 před 5 měsíci
  yangchengfei 42f96af422 Merge branch 'dev-2.24.0' of depot-qinghai/depot-vue-qinghai into dev před 5 měsíci
  yangchengfei 48639002de 测试 před 5 měsíci
  Holla-Tako 1946076502 2.23.0 před 5 měsíci
  Holla-Tako c94e1f12ff 2.23.0 před 5 měsíci
  Holla-Tako 6de7f15b80 fix bug před 5 měsíci
  Holla-Tako 5b020c6327 Merge remote-tracking branch 'origin/dev' into dev před 5 měsíci
  Holla-Tako 4867387ea7 fix bug před 5 měsíci
  WZQ 2cfecc6c84 Merge branch 'dev-2.19.1' into dev před 5 měsíci
  WZQ 18c81327be flx : 费用标准 před 5 měsíci
  Holla-Tako e7161aa695 fix bug před 5 měsíci
  WZQ 4de116a4ba Merge branch 'dev' into dev-2.19.1 před 5 měsíci
  WZQ ff09e499ea flx:更改+999 před 5 měsíci
91 změnil soubory, kde provedl 13749 přidání a 505 odebrání
  1. 1 0
      index.html
  2. 4 4
      src/api/base/index.js
  3. 172 84
      src/api/base/rotationApi.js
  4. 33 24
      src/api/deviceManagement/index.js
  5. 3 3
      src/api/receiptConfirmation/index.js
  6. 114 0
      src/api/revenueContributionModule/index.js
  7. 1 1
      src/api/system/index.js
  8. 62 0
      src/api/video/index.js
  9. binární
      src/assets/theme/leftbg.png
  10. 6 6
      src/components/common/data.js
  11. 476 0
      src/components/common/player/live_v2.vue
  12. 364 0
      src/components/common/player/playback_v2.vue
  13. 65 58
      src/components/common/topMenu.vue
  14. 55 2
      src/components/system/oilTankEdit.vue
  15. 4 3
      src/main.js
  16. 848 0
      src/page/APayment/components/monthlyReport.vue
  17. 255 0
      src/page/APayment/index.vue
  18. 337 0
      src/page/Amaintenance/components/monthlyReport.vue
  19. 259 0
      src/page/Amaintenance/index.vue
  20. 0 1
      src/page/CostStandard/index.vue
  21. 22 4
      src/page/Layout/layout.vue
  22. 10 13
      src/page/Layout/menuList/menuItem.vue
  23. 30 17
      src/page/Layout/menuList/menuList.vue
  24. 4 0
      src/page/Layout/menuList/myMenuItem.vue
  25. 20 7
      src/page/basicData/components/cameraListEdit.vue
  26. 51 29
      src/page/basicData/components/warehouseListEdit.vue
  27. 37 3
      src/page/basicData/granaryList.vue
  28. 4 2
      src/page/basicData/storehouseList.vue
  29. 4 2
      src/page/basicData/warehouseList.vue
  30. 16 1
      src/page/contractsManagement/components/contractsEdit/index.vue
  31. 15 1
      src/page/contractsManagement/components/planDetailTableIn.vue
  32. 15 1
      src/page/contractsManagement/components/planDetailTableOut.vue
  33. 4 3
      src/page/deviceManagement/components/deviceGetEdit.vue
  34. 4 3
      src/page/deviceManagement/components/deviceGetReturn.vue
  35. 24 22
      src/page/deviceManagement/components/inventoryEdit.vue
  36. 4 3
      src/page/deviceManagement/components/maintenanceEdit.vue
  37. 4 3
      src/page/deviceManagement/components/repairEdit.vue
  38. 2 0
      src/page/deviceManagement/deviceGet.vue
  39. 6 6
      src/page/deviceManagement/inventory.vue
  40. 7 3
      src/page/deviceManagement/maintenance.vue
  41. 6 3
      src/page/deviceManagement/repair.vue
  42. 1 1
      src/page/granaryComprehensiveExhibition/granaryLive.vue
  43. 75 0
      src/page/granaryComprehensiveExhibition/granaryReplay.vue
  44. 83 48
      src/page/home.vue
  45. 2 2
      src/page/intelligentStorage/components/quantityDetectionDeviceConfigEdit.vue
  46. 60 0
      src/page/mixin/legacyUpload.js
  47. 3 1
      src/page/monitoringChannel/index.vue
  48. 8 2
      src/page/purchaseOfFinished/components/monthlyReport.vue
  49. 15 21
      src/page/purchaseOfFinished/purchaseOfFinished.vue
  50. 15 7
      src/page/receiptConfirmation/entryPriceCheckn/details.vue
  51. 5 3
      src/page/receiptConfirmation/entryPriceCheckn/detailsModule.vue
  52. 358 0
      src/page/receiptConfirmation/revenueContributionModule/addDataModule.vue
  53. 875 0
      src/page/receiptConfirmation/revenueContributionModule/details.vue
  54. 99 0
      src/page/receiptConfirmation/revenueContributionModule/detailsModule.vue
  55. 214 0
      src/page/receiptConfirmation/revenueContributionModule/index.vue
  56. 4 4
      src/page/spillageLeakageLossCollection/components/spillageLeakageLossCollectionEdit.vue
  57. 3 45
      src/page/storehouseManagement/components/hazardControlEdit.vue
  58. 25 6
      src/page/system/functionManagement.vue
  59. 1 1
      src/router/index.js
  60. 19 0
      src/router/system/financeModule.js
  61. 19 3
      src/router/system/financialManagementModule.js
  62. 8 0
      src/router/system/granaryComprehensiveExhibitionModule.js
  63. 2 1
      src/style/common/variables.scss
  64. 52 45
      src/style/style.scss
  65. 95 0
      src/style/theme.scss
  66. 24 0
      src/utils/loginStatusChecker.js
  67. 1 1
      src/utils/menuMock.js
  68. 3 1
      src/utils/require.js
  69. 1 1
      src/utils/ruleDatas.js
  70. binární
      static/file/廒间信息导入模板.xlsx
  71. binární
      static/file/货位信息导入模板.xlsx
  72. binární
      static/file/货位信息导入模板_v1.xlsx
  73. 313 0
      static/js/h5player/h5player.min.js
  74. 642 0
      static/js/h5player/playctrl1/DecodeWorker.js
  75. 1 0
      static/js/h5player/playctrl1/Decoder.js
  76. 642 0
      static/js/h5player/playctrl1simd/DecodeWorker.js
  77. 1 0
      static/js/h5player/playctrl1simd/Decoder.js
  78. 21 0
      static/js/h5player/playctrl2/Decoder.js
  79. binární
      static/js/h5player/playctrl2/Decoder.wasm
  80. 1 0
      static/js/h5player/playctrl2/Decoder.worker.js
  81. 21 0
      static/js/h5player/playctrl3/Decoder.js
  82. binární
      static/js/h5player/playctrl3/Decoder.wasm
  83. 1 0
      static/js/h5player/playctrl3/Decoder.worker.js
  84. 21 0
      static/js/h5player/talk/AudioInterCom.js
  85. binární
      static/js/h5player/talk/AudioInterCom.wasm
  86. 21 0
      static/js/h5player/talkW/AudioInterCom.js
  87. binární
      static/js/h5player/talkW/AudioInterCom.wasm
  88. 1 0
      static/js/h5player/talkW/AudioInterCom.worker.js
  89. 6525 0
      static/js/h5player/transform/libSystemTransform.js
  90. binární
      static/js/h5player/transform/libSystemTransform.wasm
  91. 120 0
      static/js/h5player/transform/systemTransform-worker.js

+ 1 - 0
index.html

@@ -6,6 +6,7 @@
6 6
     <meta name="viewport" content="width=device-width,initial-scale=1.0">
7 7
     <link rel="ico" type="image/x-icon" href="static/favicon.ico">
8 8
     <link rel="shortcut icon" type="image/x-icon" href="static/favicon.ico">
9
+  <script src="./static/js/h5player/h5player.min.js"></script>
9 10
     <title>智慧青粮粮库管理系统</title>
10 11
 </head>
11 12
 

+ 4 - 4
src/api/base/index.js

@@ -5,6 +5,7 @@ import {PLUS} from "@/utils/systemUtils";
5 5
 export const basicUploadUrl = `${depot_basic}/fileUpload/uploadFile`
6 6
 export const storehouseImportUrl = `${depot_basic}/Storehouse/importFile`
7 7
 export const wareImportUrl = `${depot_basic}/Warehouse/importFile`
8
+export const aojianImportUrl = `${depot_basic}/UnitAisle/importFile`
8 9
 export const tankImportUrl = `${depot_basic}/Tank/importFile`
9 10
 export const uploadUrlV2 = `${depot_smart_storage}/dev/file/uploadMinioReturnUrl`
10 11
 export const cameraImportUrl = `${depot_monitor}/camera/importFile`
@@ -460,12 +461,12 @@ export function cameraEdit(id) {
460 461
 }
461 462
 
462 463
 export function cameraSave(data) {
463
-  const formData = Object.keys(data).map(k => `${k}=${encodeURIComponent(data[k])}`).join('&').replace(/_____PLACEHOLDER_PLUS_____/g, '+')
464
+  // const formData = Object.keys(data).map(k => `${k}=${encodeURIComponent(data[k])}`).join('&').replace(/_____PLACEHOLDER_PLUS_____/g, '+')
464 465
   return request({
465 466
     url: `${depot_monitor}/camera/saveCamera`,
466
-    headers: {'content-type': 'application/x-www-form-urlencoded;charset=utf-8'},
467
+    // headers: {'content-type': 'application/x-www-form-urlencoded;charset=utf-8'},
467 468
     method: 'post',
468
-    data: formData,
469
+    data,
469 470
   })
470 471
 }
471 472
 
@@ -544,7 +545,6 @@ export function getFileAojian(formData) {
544 545
     params: formData,
545 546
   })
546 547
 }
547
-//
548 548
 
549 549
 export function getFileAojianAddOrEdit(data) {
550 550
   const formData = Object.keys(data).map(k => `${k}=${encodeURIComponent(data[k])}`).join('&').replace(/_____PLACEHOLDER_PLUS_____/g, '+')

+ 172 - 84
src/api/base/rotationApi.js

@@ -6,75 +6,73 @@ import {
6 6
   depot_monitor,
7 7
   depot_qualitycheck,
8 8
   depot_device,
9
-  depot_storage
9
+  depot_storage,
10 10
 } from "@/api"
11 11
 import request from "@/utils/require"
12
-import { PLUS } from "@/utils/systemUtils"
13
-// depot-smart-storage
14 12
 // 半月报表列表接口
15
-export function list(data) {
13
+export function list (data) {
16 14
   return request({
17 15
     url: `${depot_business}/business-rp-biweekly-report/getList`,
18 16
     // headers: { "content-type": "application/x-www-form-urlencoded" },
19 17
     method: "post",
20 18
     params: data,
21
-  });
19
+  })
22 20
 }
23 21
 // 半月报表删除
24
-export function removeById(query) {
22
+export function removeById (query) {
25 23
   return request({
26 24
     url: `${depot_business}/business-rp-biweekly-report/removeById`,
27 25
     method: "get",
28 26
     params: query || {},
29
-  });
27
+  })
30 28
 }
31 29
 // 新增时候获取轮换计划下拉列表数据
32
-export function getRpReportList(query) {
30
+export function getRpReportList (query) {
33 31
   return request({
34 32
     url: `${depot_business}/business-rp-biweekly-report/getRpReportList`,
35 33
     method: "get",
36 34
     params: query || {},
37
-  });
35
+  })
38 36
 }
39 37
 // 轮换计划下拉列表数据触发change事件接口
40
-export function getRpReportDetailsByAdd(query) {
38
+export function getRpReportDetailsByAdd (query) {
41 39
   return request({
42 40
     url: `${depot_business}/business-rp-biweekly-report/getRpReportDetailsByAdd`,
43 41
     method: "get",
44 42
     params: query || {},
45
-  });
43
+  })
46 44
 }
47 45
 // 轮换计划新增数据
48
-export function addData(data) {
46
+export function addData (data) {
49 47
   return request({
50 48
     url: `${depot_business}/business-rp-biweekly-report/add`,
51 49
     // headers: { "content-type": "application/x-www-form-urlencoded" },
52 50
     method: "post",
53 51
     data: data,
54
-  });
52
+  })
55 53
 }
56 54
 // 轮换计划上报数据
57
-export function reporting(data) {
55
+export function reporting (data) {
58 56
   return request({
59 57
     url: `${depot_business}/business-rp-biweekly-report/add`,
60 58
     // headers: { "content-type": "application/x-www-form-urlencoded" },
61 59
     method: "post",
62 60
     data: data,
63
-  });
61
+  })
64 62
 }
65 63
 // 轮换计划上报
66
-export function getDetailData(query) {
64
+export function getDetailData (query) {
67 65
   return request({
68 66
     url: `${depot_business}/business-rp-biweekly-report/getDetail`,
69 67
     method: "get",
70 68
     params: query || {},
71
-  });
69
+  })
72 70
 }
73 71
 
74 72
 // -----------轮换计划上报模块接口-------------
75 73
 
76 74
 // 轮换上报列表分页
77
-export function getListData(data) {
75
+export function getListData (data) {
78 76
   // const formData = Object.keys(data)
79 77
   //   .map((k) => `${k}=${encodeURIComponent(data[k])}`)
80 78
   //   .join("&")
@@ -84,271 +82,271 @@ export function getListData(data) {
84 82
     // headers: { "content-type": "application/x-www-form-urlencoded" },
85 83
     method: "post",
86 84
     params: data,
87
-  });
85
+  })
88 86
 }
89 87
 // 轮换上报删除接口
90
-export function removeByIdData(data) {
88
+export function removeByIdData (data) {
91 89
   return request({
92 90
     url: `${depot_business}/business-rp-report/removeById`,
93 91
     method: "post",
94 92
     params: data,
95
-  });
93
+  })
96 94
 }
97 95
 // 新增时候调取单位信息接口
98
-export function getUnitInfoData(query) {
96
+export function getUnitInfoData (query) {
99 97
   return request({
100 98
     url: `${depot_system}/unitInfo/getById`,
101 99
     method: "get",
102 100
     params: query || {},
103
-  });
101
+  })
104 102
 }
105 103
 // 列表定检数据
106
-export function getDetailReportIds(query) {
104
+export function getDetailReportIds (query) {
107 105
   return request({
108 106
     url: `${depot_business}/business-rp-report/getFindByReportIds`,
109 107
     method: "get",
110 108
     params: query || {},
111
-  });
109
+  })
112 110
 }
113 111
 // 出库信息内粮库下拉框数据
114
-export function getFindByOrgInfo(query) {
112
+export function getFindByOrgInfo (query) {
115 113
   return request({
116 114
     url: `${depot_business}/business-rp-report/findByOrgInfo`,
117 115
     method: "get",
118 116
     params: query || {},
119
-  });
117
+  })
120 118
 }
121 119
 // 出库信息内仓房下拉框数据
122
-export function getFindByStoreHouseInfo(query) {
120
+export function getFindByStoreHouseInfo (query) {
123 121
   return request({
124 122
     url: `${depot_business}/business-rp-report/findByStoreHouseInfo`,
125 123
     method: "get",
126 124
     params: query || {},
127
-  });
125
+  })
128 126
 }
129 127
 // 出库信息内货位下拉框数据
130
-export function getFindByWareHouseInfo(query) {
128
+export function getFindByWareHouseInfo (query) {
131 129
   return request({
132 130
     url: `${depot_business}/business-rp-report/findByWareHouseInfoDatd`,
133 131
     method: "get",
134 132
     params: query || {},
135
-  });
133
+  })
136 134
 }
137 135
 // 根据warehouseId查询粮情卡数据
138
-export function getGrainSituation(query) {
136
+export function getGrainSituation (query) {
139 137
   return request({
140 138
     url: `${depot_business}/business-rp-report/findByWarehouseInfo`,
141 139
     method: "get",
142 140
     params: query || {},
143
-  });
141
+  })
144 142
 }
145 143
 // 新增增加数据接口
146
-export function getRecListDataAdd(data) {
144
+export function getRecListDataAdd (data) {
147 145
   return request({
148 146
     url: `${depot_business}/business-rp-report/add`,
149 147
     // headers: { "content-type": "application/x-www-form-urlencoded" },
150 148
     method: "post",
151 149
     data: data,
152
-  });
150
+  })
153 151
 }
154 152
 // 根据warehouseId货位查询粮情卡质检报告
155
-export function getDetectionReport(query) {
153
+export function getDetectionReport (query) {
156 154
   return request({
157 155
     url: `${depot_business}/business-rp-biweekly-report/sbjk/getFindByWarehouseId`,
158 156
     // headers: { "content-type": "application/x-www-form-urlencoded" },
159 157
     method: "get",
160 158
     params: query,
161
-  });
159
+  })
162 160
 }
163 161
 // 查看详情数据
164
-export function getDetectioncheckData(query) {
162
+export function getDetectioncheckData (query) {
165 163
   return request({
166 164
     url: `${depot_business}/business-rp-report/getRpReportFindByById`,
167 165
     method: "get",
168 166
     params: query || {},
169
-  });
167
+  })
170 168
 }
171 169
 
172 170
 // ---------------轮换计划接收页面------------------
173 171
 // 轮换计划接收列表
174
-export function getRecListData(data) {
172
+export function getRecListData (data) {
175 173
   return request({
176 174
     url: `${depot_business}/business-rp-report/getRecList`,
177 175
     // headers: { "content-type": "application/x-www-form-urlencoded" },
178 176
     method: "post",
179 177
     params: data,
180
-  });
178
+  })
181 179
 }
182 180
 // 轮换计划接收查看详情
183
-export function getRpReportDil(query) {
181
+export function getRpReportDil (query) {
184 182
   return request({
185 183
     url: `${depot_business}/business-rp-report/getRpReportRecDetail`,
186 184
     method: "get",
187 185
     params: query || {},
188
-  });
186
+  })
189 187
 }
190 188
 
191 189
 // --- 采购销售管理
192
-export function CAIGUOgetList(query) {
190
+export function CAIGUOgetList (query) {
193 191
   return request({
194 192
     url: `${depot_device}/business-im-purchase-sale/getList`,
195 193
     method: "get",
196 194
     params: query || {},
197
-  });
195
+  })
198 196
 }
199
-export function CAIGUOadd(data) {
197
+export function CAIGUOadd (data) {
200 198
   return request({
201 199
     url: `${depot_device}/business-im-purchase-sale/saveAndUpdate`,
202 200
     // headers: { "content-type": "application/x-www-form-urlencoded" },
203 201
     // headers: { 'Content-Type': 'application/json' },
204 202
     method: "post",
205 203
     data: data,
206
-  });
204
+  })
207 205
 }
208 206
 
209
-export function CAIGUOview(query) {
207
+export function CAIGUOview (query) {
210 208
   return request({
211 209
     url: `${depot_device}/business-im-purchase-sale/getById`,
212 210
     method: "get",
213 211
     params: query || {},
214
-  });
212
+  })
215 213
 }
216
-export function CAIGUOdelit(data) {
214
+export function CAIGUOdelit (data) {
217 215
   return request({
218 216
     url: `${depot_device}/business-im-purchase-sale/saveAndUpdate`,
219 217
     method: "post",
220 218
     params: data,
221
-  });
219
+  })
222 220
 }
223 221
 ///business-im-purchase-sale/delete/{id}
224
-export function CAIGUOdel(query) {
222
+export function CAIGUOdel (query) {
225 223
   return request({
226 224
     url: `${depot_device}/business-im-purchase-sale/delete/${query}`,
227 225
     method: "delete",
228 226
     params: query || {},
229
-  });
227
+  })
230 228
 }
231 229
 
232 230
 // /资产管理 --
233
-export function ZICHANGLIList(query) {
231
+export function ZICHANGLIList (query) {
234 232
   return request({
235 233
     url: `${depot_device}/businessImAsset/getList`,
236 234
     method: "get",
237 235
     params: query || {},
238
-  });
236
+  })
239 237
 }
240
-export function ZICHANGadd(data) {
238
+export function ZICHANGadd (data) {
241 239
   return request({
242 240
     url: `${depot_device}/businessImAsset/save`,
243 241
     method: "post",
244 242
     data: data,
245
-  });
243
+  })
246 244
 }
247 245
 
248
-export function ZICHANGview(query) {
246
+export function ZICHANGview (query) {
249 247
   return request({
250 248
     url: `${depot_device}/businessImAsset/loadDataById`,
251 249
     method: "get",
252 250
     params: query || {},
253
-  });
251
+  })
254 252
 }
255 253
 
256
-export function ZICHANGdel(data) {
254
+export function ZICHANGdel (data) {
257 255
   return request({
258 256
     url: `${depot_device}/businessImAsset/remove`,
259 257
     method: "post",
260 258
     params: data,
261
-  });
259
+  })
262 260
 }
263 261
 //获取资产编号
264
-export function ZICHANGorgId(query) {
262
+export function ZICHANGorgId (query) {
265 263
   return request({
266 264
     url: `${depot_device}/businessImAsset/getAssetCode?orgId=${query}`,
267 265
     method: "get",
268 266
     params: query || {},
269
-  });
267
+  })
270 268
 }
271 269
 
272 270
 //成品粮购销计划列表
273
-export function CPLGXIAOJIHAOlist(data) {
271
+export function CPLGXIAOJIHAOlist (data) {
274 272
   return request({
275 273
     url: `${depot_business}/pgGopsPlan/getList`,
276 274
     method: "post",
277 275
     params: data,
278
-  });
276
+  })
279 277
 }
280
-export function CPLGXIAOJIHAOadd(data) {
278
+export function CPLGXIAOJIHAOadd (data) {
281 279
   return request({
282 280
     url: `${depot_business}pgGopsPlan/add`,
283 281
     method: "post",
284 282
     data: data,
285
-  });
283
+  })
286 284
 }
287 285
 
288
-export function CPLGXIAOJIHAOgetCplSpList(query) {
286
+export function CPLGXIAOJIHAOgetCplSpList (query) {
289 287
   return request({
290 288
     url: `${depot_business}/pgGopsPlan/getCplSpList`,
291 289
     method: "get",
292 290
     params: query || {},
293
-  });
291
+  })
294 292
 }
295 293
 
296
-export function CPLGXIAOJIHAOgetPgPlanDetail(query) {
294
+export function CPLGXIAOJIHAOgetPgPlanDetail (query) {
297 295
   return request({
298 296
     url: `${depot_business}/pgGopsPlan/getPgPlanDetail`,
299 297
     method: "get",
300 298
     params: query || {},
301
-  });
299
+  })
302 300
 }
303 301
 
304
-export function CPLGXIAOJIHAOdel(data) {
302
+export function CPLGXIAOJIHAOdel (data) {
305 303
   return request({
306 304
     url: `${depot_business}/pgGopsPlan/removeById`,
307 305
     method: "post",
308 306
     params: data,
309
-  });
307
+  })
310 308
 }
311 309
 
312
-export function FYBZWHList(query) {
310
+export function FYBZWHList (query) {
313 311
   return request({
314 312
     url: `${depot_intelligent}/business-fs-cost-standard/getList`,
315 313
     method: "get",
316 314
     params: query || {},
317
-  });
315
+  })
318 316
 }
319 317
 
320
-export function FYBZWHdel(query) {
318
+export function FYBZWHdel (query) {
321 319
   return request({
322 320
     url: `${depot_intelligent}/business-fs-cost-standard/delete/${query}`,
323 321
     method: "delete",
324 322
     params: query || {},
325
-  });
323
+  })
326 324
 }
327 325
 
328
-export function FYBZWHgetGrainVariety(query) {
326
+export function FYBZWHgetGrainVariety (query) {
329 327
   return request({
330 328
     url: `${depot_intelligent}/business-fs-cost-standard/getGrainVariety`,
331 329
     method: "get",
332 330
     params: query || {},
333
-  });
331
+  })
334 332
 }
335 333
 
336
-export function FYBZWHadd(data) {
334
+export function FYBZWHadd (data) {
337 335
   return request({
338 336
     url: `${depot_intelligent}/business-fs-cost-standard/save`,
339 337
     method: "post",
340 338
     data: data,
341
-  });
339
+  })
342 340
 }
343
-export function FYBZWHview(query) {
341
+export function FYBZWHview (query) {
344 342
   return request({
345 343
     url: `${depot_intelligent}/business-fs-cost-standard/getById/${query}`,
346 344
     method: "get",
347 345
     params: query || {},
348
-  });
346
+  })
349 347
 }
350 348
 
351
-export function FYBZWHput(data) {
349
+export function FYBZWHput (data) {
352 350
   return request({
353 351
     url: `${depot_intelligent}/business-fs-cost-standard/update`,
354 352
     method: "put",
@@ -371,3 +369,93 @@ export function CPLview (query) {
371 369
     params: query || {},
372 370
   })
373 371
 }
372
+// 利息维护 depot-smart-storage
373
+export function LXWHlist (query) {
374
+  return request({
375
+    url: `${depot_intelligent}/business-fs-interest-maintain/getList`,
376
+    method: "get",
377
+    params: query || {},
378
+  })
379
+}
380
+export function LXWHadd (data) {
381
+  return request({
382
+    url: `${depot_intelligent}/business-fs-interest-maintain/save`,
383
+    method: "post",
384
+    data: data,
385
+  })
386
+}
387
+export function LXWHdel (query) {
388
+  return request({
389
+    url: `${depot_intelligent}/business-fs-interest-maintain/delete/${query}`,
390
+    method: "delete",
391
+    params: query || {},
392
+  })
393
+}
394
+export function LXWHview (query) {
395
+  return request({
396
+    url: `${depot_intelligent}/business-fs-interest-maintain/getById/${query}`,
397
+    method: "get",
398
+    params: query || {},
399
+  })
400
+}
401
+
402
+export function LXWHput (data) {
403
+  return request({
404
+    url: `${depot_intelligent}/business-fs-interest-maintain/update`,
405
+    method: "put",
406
+    data: data,
407
+  })
408
+}
409
+// 出库验收确认
410
+export function CRKYSQRlist (query) {
411
+  return request({
412
+    url: `${depot_intelligent}/business-fs-out-confirm/getList`,
413
+    method: "get",
414
+    params: query || {},
415
+  })
416
+}
417
+export function CRKYSQRadd (data) {
418
+  return request({
419
+    url: `${depot_intelligent}/business-fs-out-confirm/save`,
420
+    method: "post",
421
+    data: data,
422
+  })
423
+}
424
+export function CRKYSQRgetContractData (query) {
425
+  return request({
426
+    url: `${depot_intelligent}/business-fs-out-confirm/getContractData`,
427
+    method: "get",
428
+    params: query || {},
429
+  })
430
+}
431
+
432
+export function CRKYSQRgetByContractId (query) {
433
+  return request({
434
+    url: `${depot_intelligent}/business-fs-out-confirm/getByContractId/${query}`,
435
+    method: "get",
436
+    params: query || {},
437
+  })
438
+}
439
+
440
+export function CRKYSQRview (query) {
441
+  return request({
442
+    url: `${depot_intelligent}/business-fs-out-confirm/getById/${query}`,
443
+    method: "get",
444
+    params: query || {},
445
+  })
446
+}
447
+export function CRKYSQRdel (query) {
448
+  return request({
449
+    url: `${depot_intelligent}/business-fs-out-confirm/delete/${query}`,
450
+    method: "delete",
451
+    params: query || {},
452
+  })
453
+}
454
+
455
+export function CRKYSQRput (data) {
456
+  return request({
457
+    url: `${depot_intelligent}/business-fs-out-confirm/update`,
458
+    method: "put",
459
+    data: data,
460
+  })
461
+}

+ 33 - 24
src/api/deviceManagement/index.js

@@ -96,6 +96,14 @@ export function getCheckListNoPage(query) {
96 96
   })
97 97
 }
98 98
 
99
+export function checkListRemove(data) {
100
+  return request({
101
+    url: `${depot_device}/deviceCheck/remove`,
102
+    method: 'post',
103
+    params: data
104
+  })
105
+}
106
+
99 107
 export function deviceCheckList(page, query) {
100 108
   return request({
101 109
     url: `${depot_device}/deviceCheck/getCheckList?pageNum=${page.page}&pageSize=${page.size}`,
@@ -121,12 +129,12 @@ export function getByDeviceCode(query) {
121 129
 }
122 130
 
123 131
 export function deviceCheckSave(data) {
124
-  const formData = Object.keys(data).map(k => `${k}=${encodeURIComponent(data[k])}`).join('&').replace('_____PLACEHOLDER_PLUS_____', '+')
132
+  // const formData = Object.keys(data).map(k => `${k}=${encodeURIComponent(data[k])}`).join('&').replace('_____PLACEHOLDER_PLUS_____', '+')
125 133
   return request({
126 134
     url: `${depot_device}/deviceCheck/save`,
127
-    headers: {'content-type': 'application/x-www-form-urlencoded;charset=utf-8'},
135
+    // headers: {'content-type': 'application/x-www-form-urlencoded;charset=utf-8'},
128 136
     method: 'post',
129
-    data: formData,
137
+    data: data,
130 138
   })
131 139
 }
132 140
 
@@ -163,12 +171,12 @@ export function deviceSbCodeModelList(query) {
163 171
 }
164 172
 
165 173
 export function deviceKeepSave(data) {
166
-  const formData = Object.keys(data).map(k => `${k}=${encodeURIComponent(data[k])}`).join('&').replace(PLUS, '+')
174
+  // const formData = Object.keys(data).map(k => `${k}=${encodeURIComponent(data[k])}`).join('&').replace(PLUS, '+')
167 175
   return request({
168 176
     url: `${depot_device}/deviceKeep/save`,
169
-    headers: {'content-type': 'application/x-www-form-urlencoded;charset=utf-8'},
177
+    // headers: {'content-type': 'application/x-www-form-urlencoded;charset=utf-8'},
170 178
     method: 'post',
171
-    data: formData,
179
+    data: data,
172 180
   })
173 181
 }
174 182
 
@@ -189,62 +197,63 @@ export function deviceRepairLoadDataById (query) {
189 197
 }
190 198
 
191 199
 export function deviceKeepEnd(data) {
192
-  const formData = Object.keys(data).map(k => `${k}=${encodeURIComponent(data[k])}`).join('&').replace(PLUS, '+')
200
+  // const formData = Object.keys(data).map(k => `${k}=${encodeURIComponent(data[k])}`).join('&').replace(PLUS, '+')
193 201
   return request({
194 202
     url: `${depot_device}/deviceKeep/end`,
195
-    headers: {'content-type': 'application/x-www-form-urlencoded;charset=utf-8'},
203
+    // headers: {'content-type': 'application/x-www-form-urlencoded;charset=utf-8'},
196 204
     method: 'post',
197
-    data: formData,
205
+    data: data,
198 206
   })
199 207
 }
200 208
 
201 209
 export function deviceRepairEnd(data) {
202
-  const formData = Object.keys(data).map(k => `${k}=${encodeURIComponent(data[k])}`).join('&').replace(PLUS, '+')
210
+  // const formData = Object.keys(data).map(k => `${k}=${encodeURIComponent(data[k])}`).join('&').replace(PLUS, '+')
203 211
   return request({
204 212
     url: `${depot_device}/deviceRepair/end`,
205
-    headers: {'content-type': 'application/x-www-form-urlencoded;charset=utf-8'},
213
+    // headers: {'content-type': 'application/x-www-form-urlencoded;charset=utf-8'},
206 214
     method: 'post',
207
-    data: formData,
215
+    data: data,
208 216
   })
209 217
 }
210 218
 
211 219
 export function deviceGetSave(data) {
212
-  const formData = Object.keys(data).map(k => `${k}=${encodeURIComponent(data[k])}`).join('&').replace(PLUS, '+')
220
+  // const formData = Object.keys(data).map(k => `${k}=${encodeURIComponent(data[k])}`).join('&').replace(PLUS, '+')
213 221
   return request({
214 222
     url: `${depot_device}/deviceGet/save`,
215
-    headers: {'content-type': 'application/x-www-form-urlencoded;charset=utf-8'},
223
+    // headers: {'content-type': 'application/x-www-form-urlencoded;charset=utf-8'},
216 224
     method: 'post',
217
-    data: formData,
225
+    data: data,
218 226
   })
219 227
 }
220 228
 
221 229
 export function saveBack(data) {
222
-  const formData = Object.keys(data).map(k => `${k}=${encodeURIComponent(data[k])}`).join('&').replace(PLUS, '+')
230
+  // const formData = Object.keys(data).map(k => `${k}=${encodeURIComponent(data[k])}`).join('&').replace(PLUS, '+')
223 231
   return request({
224 232
     url: `${depot_device}/deviceGet/saveBack`,
225
-    headers: {'content-type': 'application/x-www-form-urlencoded;charset=utf-8'},
233
+    // headers: {'content-type': 'application/x-www-form-urlencoded;charset=utf-8'},
226 234
     method: 'post',
227
-    data: formData,
235
+    data: data,
228 236
   })
229 237
 }
230 238
 
231 239
 export function deviceRepairSave(data) {
232
-  const formData = Object.keys(data).map(k => `${k}=${encodeURIComponent(data[k])}`).join('&').replace(PLUS, '+')
240
+  // const formData = Object.keys(data).map(k => `${k}=${encodeURIComponent(data[k])}`).join('&').replace(PLUS, '+')
233 241
   return request({
234 242
     url: `${depot_device}/deviceRepair/save`,
235
-    headers: {'content-type': 'application/x-www-form-urlencoded;charset=utf-8'},
243
+    // headers: {'content-type': 'application/x-www-form-urlencoded;charset=utf-8'},
236 244
     method: 'post',
237
-    data: formData,
245
+    data: data,
238 246
   })
239 247
 }
240 248
 
241 249
 export function outUpdate(data) {
242
-  const formData = Object.keys(data).map(k => `${k}=${encodeURIComponent(data[k])}`).join('&').replace(PLUS, '+')
250
+  // const formData = Object.keys(data).map(k => `${k}=${encodeURIComponent(data[k])}`).join('&').replace(PLUS, '+')
243 251
   return request({
244 252
     url: `${depot_device}/devicePutStorage/outUpdate`,
245
-    headers: {'content-type': 'application/x-www-form-urlencoded;charset=utf-8'},
253
+    // headers: {'content-type': 'application/x-www-form-urlencoded;charset=utf-8'},
246 254
     method: 'post',
247
-    data: formData,
255
+    params: data,
256
+    // data: formData,
248 257
   })
249 258
 }
250 259
 

+ 3 - 3
src/api/receiptConfirmation/index.js

@@ -49,11 +49,11 @@ export function InConfirmDelete(id) {
49 49
     })
50 50
 }
51 51
 
52
-
52
+// /business-fs-in-confirm/getContractData
53 53
 // 合同下拉  
54 54
 export function getContractInfo(orgId) {
55 55
     return request({
56
-        url: `${depot_intelligent}/business-fs-statistical-account/getContract/?orgId=${orgId}`,
56
+        url: `${depot_intelligent}/business-fs-in-confirm/getContractData/?orgId=${orgId}`,
57 57
         method: 'get',
58 58
     })
59 59
 }
@@ -65,4 +65,4 @@ export function updateInConfirm(data) {
65 65
         method: 'put',
66 66
         data,
67 67
     })
68
-}
68
+}

+ 114 - 0
src/api/revenueContributionModule/index.js

@@ -0,0 +1,114 @@
1
+import request from "@/utils/require";
2
+import { depot_intelligent } from "../index";
3
+// 分页列表
4
+export function getPageList(query) {
5
+  return request({
6
+    url: `${depot_intelligent}/business-fs-sale-revenue/getPageList`,
7
+    method: "get",
8
+    params: query,
9
+  });
10
+}
11
+
12
+// 获取合同列表
13
+export function getContractInfo(orgId) {
14
+  return request({
15
+    url: `${depot_intelligent}/business-fs-sale-revenue/getContractInfo/${orgId}`,
16
+    method: "get",
17
+  });
18
+}
19
+
20
+// 销售收入上缴详情
21
+export function getDetails(id) {
22
+  return request({
23
+    url: `${depot_intelligent}/business-fs-sale-revenue/details/${id}`,
24
+    method: "post",
25
+  });
26
+}
27
+
28
+// 合同信息
29
+export function getContractInfoById(id) {
30
+  return request({
31
+    url: `${depot_intelligent}/business-fs-sale-revenue/getContractInfoById/${id}`,
32
+    method: "get",
33
+  });
34
+}
35
+
36
+// 原核定入库价格
37
+export function getCardInfo(data) {
38
+  return request({
39
+    url: `${depot_intelligent}/business-fs-sale-revenue/getCardInfo/${data.orgId}/${data.basicStorehouseId}/${data.warehouseId}`,
40
+    method: "get",
41
+  });
42
+}
43
+
44
+// 质检损益信息
45
+export function getConsistenceAccountInfo(data) {
46
+  return request({
47
+    url: `${depot_intelligent}/business-fs-sale-revenue/getConsistenceAccountInfo/${data.orgId}/${data.basicStorehouseId}/${data.warehouseId}`,
48
+    method: "get",
49
+  });
50
+}
51
+
52
+// 三账一致性-会计账
53
+export function accountingBooks(contractNumber) {
54
+  return request({
55
+    url: `${depot_intelligent}/business-fs-sale-revenue/getConsistenceAccountInfo/${contractNumber}`,
56
+    method: "get",
57
+  });
58
+}
59
+
60
+//三账一致性-实际出库情况
61
+export function getOutStorageInfo(contractNumber) {
62
+  return request({
63
+    url: `${depot_intelligent}/business-fs-sale-revenue/getOutStorageInfo/${contractNumber}`,
64
+    method: "get",
65
+  });
66
+}
67
+
68
+// 三账一致性-出库明细
69
+export function getOutStorageDetailed(contractNumber) {
70
+  return request({
71
+    url: `${depot_intelligent}/business-fs-sale-revenue/getOutStorageDetailed/${contractNumber}`,
72
+    method: "get",
73
+  });
74
+}
75
+
76
+// 结算信息
77
+export function getSettlementInfo(contractNumber) {
78
+  return request({
79
+    url: `${depot_intelligent}/business-fs-sale-revenue/getSettlementInfo/${contractNumber}`,
80
+    method: "get",
81
+  });
82
+}
83
+
84
+// 差价上缴
85
+export function getDiffPriceInfo(contractNumber) {
86
+  return request({
87
+    url: `${depot_intelligent}/business-fs-sale-revenue/getDiffPriceInfo/${contractNumber}`,
88
+    method: "get",
89
+  });
90
+}
91
+// 会计账新增
92
+export function saveData(data) {
93
+  return request({
94
+    url: `${depot_intelligent}/business-fs-sale-revenue/save`,
95
+    method: "post",
96
+    data: data,
97
+  });
98
+}
99
+// 修改
100
+export function update(data) {
101
+  return request({
102
+    url: `${depot_intelligent}/business-fs-sale-revenue/update`,
103
+    method: "post",
104
+    data: data,
105
+  });
106
+}
107
+
108
+// 删除
109
+export function deleteData(id) {
110
+  return request({
111
+    url: `${depot_intelligent}/business-fs-sale-revenue/delete/${id}`,
112
+    method: "post",
113
+  });
114
+}

+ 1 - 1
src/api/system/index.js

@@ -174,7 +174,7 @@ export function getgetTreeList(page, query) {
174 174
  * {"funcId":40,"funcName":"待办与审批","funcUrl":"123","funcSort":1,"parentId":8,"icoUrl":null,"status":null,"remark":null,"delFlag":null,"children":null}
175 175
  */
176 176
 export const saveFuncInfo = (data) => {
177
-  const formData = Object.keys(data).map(k => `${k}=${encodeURIComponent(data[k])}`).join('&').replaceAll('_____PLACEHOLDER_PLUS_____', '+')
177
+  const formData = Object.keys(data).map(k => `${k}=${encodeURIComponent(data[k])}`).join('&').replace(/_____PLACEHOLDER_PLUS_____/g, '+')
178 178
   return request({
179 179
     url: `${depot_system}/funcInfo/save`,
180 180
     method: 'post',

+ 62 - 0
src/api/video/index.js

@@ -0,0 +1,62 @@
1
+import request from '@/utils/require'
2
+import {depot_business, depot_system, depot_monitor} from '../index'
3
+
4
+export function getPreview(query) {
5
+  return request({
6
+    url: `${depot_monitor}/previewPlayback/getPreview`,
7
+    method: 'get',
8
+    params: query
9
+  })
10
+}
11
+
12
+export function getNVRVideo(query) {
13
+  return request({
14
+    url: `${depot_monitor}/camera/getNVRVideo`,
15
+    method: 'get',
16
+    params: query
17
+  })
18
+}
19
+
20
+export function recordStart(data) {
21
+  const formData = Object.keys(data).map(k => `${k}=${encodeURIComponent(data[k])}`).join('&')
22
+  return request({
23
+    url: `${depot_monitor}/previewPlayback/recordStart`,
24
+    headers: {'Content-Type': 'application/x-www-form-urlencoded'},
25
+    method: 'post',
26
+    data: formData
27
+  })
28
+}
29
+
30
+export function recordStop(query) {
31
+  return request({
32
+    url: `${depot_monitor}/previewPlayback/recordStop`,
33
+    method: 'get',
34
+    params: query
35
+  })
36
+}
37
+
38
+export function controlling(data) {
39
+  return request({
40
+    url: `${depot_monitor}/previewPlayback/controlling`,
41
+    method: 'get',
42
+    params: data
43
+  })
44
+}
45
+
46
+export function manualCapture(data) {
47
+  const formData = Object.keys(data).map(k => `${k}=${encodeURIComponent(data[k])}`).join('&')
48
+  return request({
49
+    url: `${depot_monitor}/previewPlayback/manualCapture`,
50
+    headers: {'Content-Type': 'application/x-www-form-urlencoded'},
51
+    method: 'post',
52
+    data: formData
53
+  })
54
+}
55
+
56
+export function getPlayback(data) {
57
+  return request({
58
+    url: `${depot_monitor}/previewPlayback/getPlayback`,
59
+    method: 'post',
60
+    data: data
61
+  })
62
+}

binární
src/assets/theme/leftbg.png


+ 6 - 6
src/components/common/data.js

@@ -489,10 +489,10 @@ export const LEVEL = [
489 489
 ]
490 490
 
491 491
 export const NUM = [
492
-  { value: '1', label: '1'},
493
-  { value: '2', label: '2'},
494
-  { value: '3', label: '3'},
495
-  { value: '4', label: '4'},
492
+  { value: '1', label: '1x1'},
493
+  { value: '2', label: '2x2'},
494
+  { value: '3', label: '3x3'},
495
+  { value: '4', label: '4x4'},
496 496
 ]
497 497
 
498 498
 export const IN_APPLICATION = [
@@ -616,8 +616,8 @@ export const DEVICE_TYPE_2 = [
616 616
 
617 617
 export const CAMERA_TYPE = [
618 618
   { value: '1', label: '球形摄像机'},
619
-  { value: '2', label: '球形摄像机'},
620
-  { value: '3', label: '球形摄像机'},
619
+  { value: '2', label: '枪式摄像机'},
620
+  { value: '3', label: '球形摄像机'},
621 621
 ]
622 622
 
623 623
 export const BUS_TYPE = [

+ 476 - 0
src/components/common/player/live_v2.vue

@@ -0,0 +1,476 @@
1
+<script>
2
+import liveControl from "@/components/common/player/components/liveControl.vue";
3
+import videoPlayer from "@/components/common/player/components/videoPlayer.vue";
4
+import {mapGetters} from "vuex";
5
+import cameraControl from "@/components/common/player/components/cameraControl.vue";
6
+import CommonSelect from "@/components/common/commonSelect/index.vue";
7
+import {getPreview, getNVRVideo, recordStart, recordStop, controlling, manualCapture} from "@/api/video";
8
+const IS_MOVE_DEVICE = false
9
+const MSE_IS_SUPPORT = !!window.MediaSource // 是否支持mse
10
+
11
+export default {
12
+  name: "live_v2",
13
+  components: {CommonSelect, cameraControl, videoPlayer, liveControl},
14
+  computed: {
15
+    ... mapGetters(['orgName', 'orgId']),
16
+    mode: function() {
17
+      // return this.tabActive === 'mse' ? 0 : 1
18
+      return 0 // 0 普通模式   1 高级模式
19
+    }
20
+  },
21
+  data() {
22
+    return {
23
+      cameraListData: [],
24
+      activeName: 'cameraList',
25
+      isMoveDevice: IS_MOVE_DEVICE,
26
+      player: null,
27
+      splitNum: 1,
28
+      mseSupport: MSE_IS_SUPPORT,
29
+      videoMap: {}, // window index - {ws url, camera index code}
30
+      currentWindowIndex: 0,
31
+      viewUrl: null,
32
+    }
33
+  },
34
+  mounted() {
35
+    this.init()
36
+    this.createPlayer()
37
+  },
38
+  methods: {
39
+    init() {
40
+      window.addEventListener('resize', () => {
41
+        this.player.JS_Resize()
42
+      })
43
+      this.getCameraList()
44
+    },
45
+    createPlayer() {
46
+      this.player = new window.JSPlugin({
47
+        szId: 'player',
48
+        szBasePath: "/static/js/h5player/",
49
+        iMaxSplit: 4,
50
+        iCurrentSplit: this.splitNum,
51
+        openDebug: true,
52
+        oStyle: {
53
+          borderSelect: IS_MOVE_DEVICE ? '#000' : '#FFCC00',
54
+        }
55
+      })
56
+
57
+      // 事件回调绑定
58
+      this.player.JS_SetWindowControlCallback({
59
+        windowEventSelect: function (iWndIndex) {  //插件选中窗口回调
60
+          console.log('windowSelect callback: ', iWndIndex);
61
+          this.currentWindowIndex = iWndIndex
62
+        },
63
+        pluginErrorHandler: function (iWndIndex, iErrorCode, oError) {  //插件错误回调
64
+          console.log('pluginError callback: ', iWndIndex, iErrorCode, oError);
65
+        },
66
+        windowEventOver: function (iWndIndex) {  //鼠标移过回调
67
+          //console.log(iWndIndex);
68
+        },
69
+        windowEventOut: function (iWndIndex) {  //鼠标移出回调
70
+          //console.log(iWndIndex);
71
+        },
72
+        windowEventUp: function (iWndIndex) {  //鼠标mouseup事件回调
73
+          //console.log(iWndIndex);
74
+        },
75
+        windowFullCcreenChange: function (bFull) {  //全屏切换回调
76
+          console.log('fullScreen callback: ', bFull);
77
+        },
78
+        firstFrameDisplay: function (iWndIndex, iWidth, iHeight) {  //首帧显示回调
79
+          console.log('firstFrame loaded callback: ', iWndIndex, iWidth, iHeight);
80
+        },
81
+        performanceLack: function () {  //性能不足回调
82
+          console.log('performanceLack callback: ');
83
+        }
84
+      });
85
+    },
86
+    play(index, url) {
87
+      return new Promise((resolve, reject) => {
88
+        this.player.JS_Play(url, { playURL: url, mode: this.mode }, index).then(
89
+          () => {
90
+            console.log('realplay success')
91
+            resolve()
92
+          },
93
+          e => {
94
+            console.error(e)
95
+            reject(e)
96
+          }
97
+        )
98
+      })
99
+    },
100
+    testPaly() {
101
+      this.viewUrl = this.viewUrl.replace('59.220.180.103', '172.18.93.217')
102
+      this.player.JS_Play(this.viewUrl, { playURL: this.viewUrl, mode: this.mode }, 0).then(
103
+        () => {
104
+          console.log('realplay success')
105
+          resolve()
106
+        },
107
+        e => {
108
+          console.error(e)
109
+          reject(e)
110
+        }
111
+      )
112
+    },
113
+    stopPlay() {
114
+      if(this.videoMap[this.currentWindowIndex]) {
115
+        const data = this.videoMap[this.currentWindowIndex]
116
+        if(data.taskID) {
117
+          return this.$message.warning('该窗口有正在录制的视频,请先结束录制')
118
+        }
119
+      }
120
+      this.player.JS_Stop().then(
121
+        () => {
122
+          console.log('stop realplay success')
123
+          if(this.videoMap[this.currentWindowIndex]) {
124
+            delete this.videoMap[this.currentWindowIndex]
125
+          }
126
+        },
127
+        e => { console.error(e) }
128
+      )
129
+    },
130
+    stopAllPlay() {
131
+      for(const i of Object.keys(this.videoMap)) {
132
+        const data = this.videoMap[i]
133
+        if(data.taskID) {
134
+          return this.$message.warning('该窗口有正在录制的视频,请先结束录制')
135
+        }
136
+      }
137
+      this.player.JS_StopRealPlayAll().then(
138
+        () => { console.log('stopAllPlay success'); this.videoMap = {} },
139
+        e => { console.error(e) }
140
+      )
141
+    },
142
+    wholeFullScreen() {
143
+      this.player.JS_FullScreenDisplay(true).then(
144
+        () => { console.log(`wholeFullScreen success`) },
145
+        e => { console.error(e) }
146
+      )
147
+    },
148
+    arrangeWindow(n) {
149
+      let splitNum = parseInt(this.splitNum)
150
+      console.log('split num', splitNum)
151
+      this.player.JS_ArrangeWindow(splitNum).then(
152
+        () => { console.log(`arrangeWindow to ${splitNum}x${splitNum} success`) },
153
+        e => { console.error(e) }
154
+      )
155
+    },
156
+    getCameraList() {
157
+      this.cameraListData = []
158
+      return getNVRVideo({orgid: this.orgId}).then(resp => {
159
+        const list = resp || []
160
+        const tree = [
161
+          {
162
+            root: true,
163
+            label: '仓内',
164
+            children: [],
165
+          },
166
+          {
167
+            root: true,
168
+            label: '业务',
169
+            children: [],
170
+          },
171
+          {
172
+            root: true,
173
+            label: '安防',
174
+            children: [],
175
+          },
176
+        ]
177
+        list.forEach(d => {
178
+          const type = d.cameraType
179
+          const temp = {
180
+            label: d.cameraName,
181
+            ... d
182
+          }
183
+          if(type === '1') {
184
+            tree[0].children.push(temp)
185
+          }else if(type === '2') {
186
+            tree[1].children.push(temp)
187
+          }else if(type === '3') {{
188
+            tree[2].children.push(temp)
189
+          }}
190
+        })
191
+        this.cameraListData = tree
192
+      })
193
+    },
194
+    onTreeNodeClick(n) {
195
+      console.log('select tree node', n)
196
+      if(n.root) return
197
+      const cameraId = n.cameraId
198
+      this.getVideo(n.cameraIndexCode).then(resp => {
199
+        if(! resp || ! resp.url) return this.$message.error('无法获取视频地址')
200
+        const url = resp.url
201
+        const exists = Object.values(this.videoMap).findIndex(u => u.cameraIndexCode === n.cameraIndexCode)
202
+        if(exists >= 0) {
203
+          return this.$message.warning(`该视频已经在 ${exists + 1} 窗口播放`)
204
+        }
205
+        this.play(this.currentWindowIndex, url).then(_ => {
206
+          this.$set(this.videoMap, this.currentWindowIndex, {
207
+            url, cameraIndexCode: n.cameraIndexCode, cameraId
208
+          })
209
+        }).catch(err => {
210
+          console.error('play error', err)
211
+          this.$message.error('播放失败')
212
+        })
213
+      })
214
+
215
+    },
216
+    getVideo(cameraIndexCode) {
217
+      return getPreview({cameraIndexCode, protocol: 'WS'})
218
+    },
219
+    recordBegin() {
220
+      if(this.videoMap[this.currentWindowIndex]) {
221
+        const data = this.videoMap[this.currentWindowIndex]
222
+        if(data.taskID) {
223
+          return this.$message.warning('该视频正在录制')
224
+        }
225
+        const d = {
226
+          cameraRecordJson: JSON.stringify({ cameraIndexCode: data.cameraIndexCode, cameraId: data.cameraId }),
227
+          recordStartReqDTOJson: JSON.stringify({ cameraIndexCode: data.cameraIndexCode, type: 1 })
228
+        }
229
+        recordStart(d).then(resp => {
230
+          if(resp && resp.taskID) {
231
+            this.$message.success('开始录制')
232
+            data.taskID = resp.taskID
233
+            this.$set(this.videoMap, this.currentWindowIndex, data)
234
+          }else {
235
+            return this.$message.error('录制失败')
236
+          }
237
+        })
238
+      }else {
239
+        return this.$message.warning('请先选择预览该窗口,或者选择已经预览中的窗口录制')
240
+      }
241
+    },
242
+    recordEnd() {
243
+      if(this.videoMap[this.currentWindowIndex]) {
244
+        const data = this.videoMap[this.currentWindowIndex]
245
+        if(!data.taskID) {
246
+          return this.$message.warning('该窗口没有正在录制的视频任务')
247
+        }
248
+        recordStop({taskID: data.taskID, cameraIndexCode: data.cameraIndexCode}).then(_ => {
249
+          this.$message.success('录制结束')
250
+          delete data['taskID']
251
+          this.$set(this.videoMap, this.currentWindowIndex, data)
252
+        })
253
+      }else {
254
+        return this.$message.warning('该窗口没有正在录制的视频')
255
+      }
256
+    },
257
+    doControl(command, action = 0, speed = 20, presetIndex = 10) {
258
+      if(this.videoMap[this.currentWindowIndex]) {
259
+        const data = this.videoMap[this.currentWindowIndex]
260
+        const cameraId = data.cameraId
261
+        const c = this.findCameraByCameraId(cameraId)
262
+        if(c.cameraType	!== '1') {
263
+          return this.$message.warning('该操作必须是球形摄像机')
264
+        }
265
+        const cmd = {
266
+          action,
267
+          command,
268
+          speed,
269
+          presetIndex,
270
+          cameraIndexCode: data.cameraIndexCode,
271
+        }
272
+        controlling(cmd)
273
+      }else {
274
+        return this.$message.warning('请选择播放中的窗口')
275
+      }
276
+    },
277
+    doControl1(command) {
278
+      this.doControl(command, 0)
279
+      setTimeout(() => {
280
+        this.doControl(command, 1)
281
+      }, 2000)
282
+    },
283
+    startTrack() {
284
+      this.doControl('START_TRACK', 0)
285
+    },
286
+    stopTrack() {
287
+      this.doControl('STOP_TRACK', 1)
288
+    },
289
+    findCameraByCameraId(cameraId) {
290
+      for(const root of this.cameraListData) {
291
+        const list = root.children || []
292
+        for(const d of list) {
293
+          if(d.cameraId == cameraId) {
294
+            return d
295
+          }
296
+        }
297
+      }
298
+      return undefined
299
+    },
300
+    doRemoteCapture(data) {
301
+      const cameraId = data.cameraId
302
+      const d = this.findCameraByCameraId(cameraId)
303
+      if(d) {
304
+        const storehouseId = d.storehouseId
305
+        const q = {
306
+          captureReqDTOJson: JSON.stringify({ "cameraIndexCode": data.cameraIndexCode }),
307
+          cameraCaptureJson: JSON.stringify({"orgId": this.orgId,"storehouseId": storehouseId,"cameraId": cameraId} )
308
+        }
309
+        manualCapture(q).then(resp => {
310
+          if(resp) {
311
+            this.$systemUtils.download(resp)
312
+          }
313
+        })
314
+      }
315
+    },
316
+    captureOne() {
317
+      if(this.videoMap[this.currentWindowIndex]) {
318
+        const data = this.videoMap[this.currentWindowIndex]
319
+        this.doRemoteCapture(data)
320
+      }else {
321
+        return this.$message.warning('请选择播放中的窗口')
322
+      }
323
+
324
+    },
325
+    captureAll() {
326
+      for(const d of Object.values(this.videoMap)) {
327
+        this.doRemoteCapture(d)
328
+      }
329
+    }
330
+  }
331
+}
332
+</script>
333
+
334
+<template>
335
+  <div class="box">
336
+    <div class="player-box">
337
+    <div class="title">
338
+      <span><i></i> 播放通道</span>
339
+      <span>{{orgName}}</span>
340
+      <span @click="wholeFullScreen" style="cursor: pointer;"><i></i>全屏画面播放</span>
341
+    </div>
342
+    <div id="player"></div>
343
+    </div>
344
+    <div class="control-box">
345
+      <el-tabs v-model="activeName" type="card">
346
+        <el-tab-pane label="摄像头列表" name="cameraList" style="margin: 5px 5px 5px 5px;">
347
+          <el-tree :data="cameraListData" :props="{children: 'children', label: 'label'}" @node-click="onTreeNodeClick"/>
348
+        </el-tab-pane>
349
+      <el-tab-pane label="操作" name="options" style="margin: 5px 5px 5px 5px;">
350
+        <el-row type="flex" align="middle" justify="center" class="row">
351
+          <el-col :span="8">窗口数量</el-col>
352
+          <el-col :span="16"><common-select v-model="splitNum" type="NUM" @native-change="arrangeWindow" :clearable="false"></common-select></el-col>
353
+        </el-row>
354
+        <el-row class="row">
355
+          <el-col :span="12">
356
+            <el-button type="primary" class="btn" @click="startTrack">轮巡</el-button>
357
+          </el-col>
358
+          <el-col :span="12">
359
+            <el-button type="primary" class="btn" @click="stopTrack">终止轮巡</el-button>
360
+          </el-col>
361
+        </el-row>
362
+        <el-row class="row">
363
+          <el-col :span="12">
364
+            <el-button type="primary" class="btn" @click="captureOne">窗口抓拍</el-button>
365
+          </el-col>
366
+          <el-col :span="12">
367
+            <el-button type="primary" class="btn" @click="stopPlay">窗口关闭</el-button>
368
+          </el-col>
369
+        </el-row>
370
+        <el-row class="row">
371
+          <el-col :span="12">
372
+            <el-button type="primary" class="btn" @click="captureAll">全部抓图</el-button>
373
+          </el-col>
374
+          <el-col :span="12">
375
+            <el-button type="primary" class="btn" @click="stopAllPlay">全部关闭</el-button>
376
+          </el-col>
377
+        </el-row>
378
+        <el-row class="row">
379
+          云控制台
380
+        </el-row>
381
+        <el-row class="row">
382
+          <template v-for="list in
383
+                  [[{label: '↖', code: 'LEFT_UP'}, {label: '↑', code: 'UP'}, {label: '↗', code: 'RIGHT_UP'}],
384
+                  [{label: '←', code: 'LEFT'}, {label: 'center', code: 'GOTO_PRESET'}, {label: '→', code: 'RIGHT'}],
385
+                  [{label: '↙', code: 'LEFT_DOWN'}, {label: '↓', code: 'DOWN'}, {label: '↘', code: 'RIGHT_DOWN'}]]">
386
+            <el-row class="row">
387
+              <el-button v-if="item.code !== 'GOTO_PRESET'" v-for="item in list" :key="item.code" class="small-btn" @click="doControl1(item.code)">{{item.label}}</el-button>
388
+              <el-button v-else class="small-btn" icon="el-icon-refresh" @click="doControl(item.code)"></el-button>
389
+            </el-row>
390
+          </template>
391
+        </el-row>
392
+        <el-row class="row">
393
+          <el-col :span="12">
394
+            <el-button type="primary" class="btn" icon="el-icon-plus" @click="doControl1('FOCUS_NEAR')">聚焦</el-button>
395
+          </el-col>
396
+          <el-col :span="12">
397
+            <el-button type="primary" class="btn" icon="el-icon-remove" @click="doControl1('FOCUS_FAR')">聚焦</el-button>
398
+          </el-col>
399
+        </el-row>
400
+        <el-row class="row">
401
+          <el-col :span="12">
402
+            <el-button type="primary" class="btn" icon="el-icon-plus"  @click="doControl1('ZOOM_IN')">调焦</el-button>
403
+          </el-col>
404
+          <el-col :span="12">
405
+            <el-button type="primary" class="btn" icon="el-icon-remove"  @click="doControl1('ZOOM_OUT')">调焦</el-button>
406
+          </el-col>
407
+        </el-row>
408
+<!--        <el-row class="row">-->
409
+<!--          <el-col :span="12">-->
410
+<!--            <el-button type="primary" class="btn" @click="recordBegin">录像开始</el-button>-->
411
+<!--          </el-col>-->
412
+<!--          <el-col :span="12">-->
413
+<!--            <el-button type="primary" class="btn" @click="recordEnd">录像结束</el-button>-->
414
+<!--          </el-col>-->
415
+<!--        </el-row>-->
416
+<!--        <el-row class="row" style="margin-top: 10px">-->
417
+<!--          <el-col :span="12">-->
418
+<!--            <el-input v-model="viewUrl"/>-->
419
+<!--          </el-col>-->
420
+<!--          <el-col :span="12">-->
421
+<!--            <el-button type="primary" class="btn" @click="testPaly">test</el-button>-->
422
+<!--          </el-col>-->
423
+<!--        </el-row>-->
424
+      </el-tab-pane>
425
+      </el-tabs>
426
+    </div>
427
+
428
+  </div>
429
+</template>
430
+
431
+<style scoped lang="scss">
432
+.box {
433
+  width: 100%;
434
+  display: flex;
435
+  .player-box {
436
+    .title {
437
+      display: flex;
438
+      justify-content: space-between;
439
+      margin-bottom: 5px;
440
+    }
441
+  }
442
+  .control-box {
443
+    margin-left: 10px;
444
+    width: 30%;
445
+
446
+    .btn {
447
+      width: 120px;
448
+      margin-top: 5px;
449
+    }
450
+
451
+    .small-btn {
452
+      width: 80px;
453
+      margin-top: 5px;
454
+    }
455
+  }
456
+}
457
+
458
+@media screen and (max-width: 991px) {
459
+  #player {
460
+    width: calc(100vw - 16px);
461
+    height: calc((100vw - 16px) * 5 / 8);
462
+  }
463
+  .title {
464
+    width: calc(100vw - 16px);
465
+  }
466
+}
467
+@media screen and (min-width: 992px) {
468
+  #player {
469
+    width: calc(50vw - 8px);
470
+    height: calc((50vw - 8px) * 5 / 8);
471
+  }
472
+  .title {
473
+    width: calc(50vw - 8px);
474
+  }
475
+}
476
+</style>

+ 364 - 0
src/components/common/player/playback_v2.vue

@@ -0,0 +1,364 @@
1
+<script>
2
+import liveControl from "@/components/common/player/components/liveControl.vue";
3
+import videoPlayer from "@/components/common/player/components/videoPlayer.vue";
4
+import {mapGetters} from "vuex";
5
+import cameraControl from "@/components/common/player/components/cameraControl.vue";
6
+import CommonSelect from "@/components/common/commonSelect/index.vue";
7
+import {getPreview, getNVRVideo, recordStart, recordStop, controlling, manualCapture, getPlayback} from "@/api/video";
8
+const IS_MOVE_DEVICE = false
9
+const MSE_IS_SUPPORT = !!window.MediaSource // 是否支持mse
10
+
11
+export default {
12
+  components: {CommonSelect, cameraControl, videoPlayer, liveControl},
13
+  computed: {
14
+    ... mapGetters(['orgName', 'orgId']),
15
+    mode: function() {
16
+      // return this.tabActive === 'mse' ? 0 : 1
17
+      return 0 // 0 普通模式   1 高级模式
18
+    }
19
+  },
20
+  data() {
21
+    return {
22
+      cameraListData: [],
23
+      activeName: 'cameraList',
24
+      isMoveDevice: IS_MOVE_DEVICE,
25
+      player: null,
26
+      splitNum: 1,
27
+      mseSupport: MSE_IS_SUPPORT,
28
+      videoMap: {}, // window index - {ws url, camera index code}
29
+      currentWindowIndex: 0,
30
+      viewUrl: null,
31
+      date: []
32
+    }
33
+  },
34
+  mounted() {
35
+    this.init()
36
+    this.createPlayer()
37
+  },
38
+  methods: {
39
+    init() {
40
+      window.addEventListener('resize', () => {
41
+        this.player.JS_Resize()
42
+      })
43
+      this.getCameraList()
44
+    },
45
+    createPlayer() {
46
+      this.player = new window.JSPlugin({
47
+        szId: 'player',
48
+        szBasePath: "/static/js/h5player/",
49
+        iMaxSplit: 4,
50
+        iCurrentSplit: this.splitNum,
51
+        openDebug: true,
52
+        oStyle: {
53
+          borderSelect: IS_MOVE_DEVICE ? '#000' : '#FFCC00',
54
+        }
55
+      })
56
+
57
+      // 事件回调绑定
58
+      this.player.JS_SetWindowControlCallback({
59
+        windowEventSelect: function (iWndIndex) {  //插件选中窗口回调
60
+          console.log('windowSelect callback: ', iWndIndex);
61
+          this.currentWindowIndex = iWndIndex
62
+        },
63
+        pluginErrorHandler: function (iWndIndex, iErrorCode, oError) {  //插件错误回调
64
+          console.log('pluginError callback: ', iWndIndex, iErrorCode, oError);
65
+        },
66
+        windowEventOver: function (iWndIndex) {  //鼠标移过回调
67
+          //console.log(iWndIndex);
68
+        },
69
+        windowEventOut: function (iWndIndex) {  //鼠标移出回调
70
+          //console.log(iWndIndex);
71
+        },
72
+        windowEventUp: function (iWndIndex) {  //鼠标mouseup事件回调
73
+          //console.log(iWndIndex);
74
+        },
75
+        windowFullCcreenChange: function (bFull) {  //全屏切换回调
76
+          console.log('fullScreen callback: ', bFull);
77
+        },
78
+        firstFrameDisplay: function (iWndIndex, iWidth, iHeight) {  //首帧显示回调
79
+          console.log('firstFrame loaded callback: ', iWndIndex, iWidth, iHeight);
80
+        },
81
+        performanceLack: function () {  //性能不足回调
82
+          console.log('performanceLack callback: ');
83
+        }
84
+      });
85
+    },
86
+    play(index, url) {
87
+      return new Promise((resolve, reject) => {
88
+        this.player.JS_Play(url, { playURL: url, mode: this.mode }, index).then(
89
+          () => {
90
+            console.log('realplay success')
91
+            resolve()
92
+          },
93
+          e => {
94
+            console.error(e)
95
+            reject(e)
96
+          }
97
+        )
98
+      })
99
+    },
100
+    testPaly() {
101
+      this.viewUrl = this.viewUrl.replace('59.220.180.103', '172.18.93.217')
102
+      this.player.JS_Play(this.viewUrl, { playURL: this.viewUrl, mode: this.mode }, 0).then(
103
+        () => {
104
+          console.log('realplay success')
105
+          resolve()
106
+        },
107
+        e => {
108
+          console.error(e)
109
+          reject(e)
110
+        }
111
+      )
112
+    },
113
+    stopPlay() {
114
+      if(this.videoMap[this.currentWindowIndex]) {
115
+        const data = this.videoMap[this.currentWindowIndex]
116
+        if(data.taskID) {
117
+          return this.$message.warning('该窗口有正在录制的视频,请先结束录制')
118
+        }
119
+      }
120
+      this.player.JS_Stop().then(
121
+        () => {
122
+          console.log('stop realplay success')
123
+          if(this.videoMap[this.currentWindowIndex]) {
124
+            delete this.videoMap[this.currentWindowIndex]
125
+          }
126
+        },
127
+        e => { console.error(e) }
128
+      )
129
+    },
130
+    stopAllPlay() {
131
+      for(const i of Object.keys(this.videoMap)) {
132
+        const data = this.videoMap[i]
133
+        if(data.taskID) {
134
+          return this.$message.warning('该窗口有正在录制的视频,请先结束录制')
135
+        }
136
+      }
137
+      this.player.JS_StopRealPlayAll().then(
138
+        () => { console.log('stopAllPlay success'); this.videoMap = {} },
139
+        e => { console.error(e) }
140
+      )
141
+    },
142
+    wholeFullScreen() {
143
+      this.player.JS_FullScreenDisplay(true).then(
144
+        () => { console.log(`wholeFullScreen success`) },
145
+        e => { console.error(e) }
146
+      )
147
+    },
148
+    arrangeWindow(n) {
149
+      let splitNum = parseInt(this.splitNum)
150
+      console.log('split num', splitNum)
151
+      this.player.JS_ArrangeWindow(splitNum).then(
152
+        () => { console.log(`arrangeWindow to ${splitNum}x${splitNum} success`) },
153
+        e => { console.error(e) }
154
+      )
155
+    },
156
+    getCameraList() {
157
+      this.cameraListData = []
158
+      return getNVRVideo({orgid: this.orgId}).then(resp => {
159
+        const list = resp || []
160
+        const tree = [
161
+          {
162
+            root: true,
163
+            label: '仓内',
164
+            children: [],
165
+          },
166
+          {
167
+            root: true,
168
+            label: '业务',
169
+            children: [],
170
+          },
171
+          {
172
+            root: true,
173
+            label: '安防',
174
+            children: [],
175
+          },
176
+        ]
177
+        list.forEach(d => {
178
+          const type = d.cameraType
179
+          const temp = {
180
+            label: d.cameraName,
181
+            ... d
182
+          }
183
+          if(type === '1') {
184
+            tree[0].children.push(temp)
185
+          }else if(type === '2') {
186
+            tree[1].children.push(temp)
187
+          }else if(type === '3') {{
188
+            tree[2].children.push(temp)
189
+          }}
190
+        })
191
+        this.cameraListData = tree
192
+      })
193
+    },
194
+    onTreeNodeClick(n) {
195
+      console.log('select tree node', n)
196
+      if(n.root) return
197
+      if(! this.date || this.date.length <= 0 ) {
198
+        return this.$message.warning('请先选择日期')
199
+      }
200
+      this.getPlaybackVideo(n.cameraIndexCode).then(resp => {
201
+        const {url} = resp
202
+        if(url) {
203
+          const [realUrl, params] = url.split('?')
204
+          const [ startTime, endTime ] = this.date
205
+          console.log('实际播放的 url', realUrl)
206
+          this.player.JS_Play(realUrl, { playURL: realUrl, mode: this.mode }, 0, startTime, endTime).then(
207
+            () => {
208
+              console.log('playbackStart success')
209
+            },
210
+            e => { console.error(e) }
211
+          )
212
+        }else {
213
+          this.$message.error('无法获取视频地址')
214
+        }
215
+      })
216
+
217
+    },
218
+    getPlaybackVideo(cameraIndexCode) {
219
+      const [beginTime, endTime] = this.date
220
+      return getPlayback({
221
+        beginTime, endTime, cameraIndexCode, recordLocation: 1, protocol: 'wss'
222
+      })
223
+    },
224
+
225
+    pause() {
226
+      this.player.JS_Pause().then(
227
+        () => { console.log('playbackPause success') },
228
+        e => { console.error(e) }
229
+      )
230
+    },
231
+    resume() {
232
+      this.player.JS_Resume().then(
233
+        () => { console.log('playbackResume success') },
234
+        e => { console.error(e) }
235
+      )
236
+    },
237
+    stop() {
238
+      this.player.JS_Stop().then(
239
+        () => {  },
240
+        e => { console.error(e) }
241
+      )
242
+    },
243
+    slow() {
244
+      this.player.JS_Slow().then(
245
+        rate => {
246
+          // this.playback.rate = rate
247
+        },
248
+        e => { console.error(e) }
249
+      )
250
+    },
251
+    fast(){
252
+      this.player.JS_Fast().then(
253
+        rate => {
254
+          // this.playback.rate = rate
255
+        },
256
+        e => { console.error(e) }
257
+      )
258
+    },
259
+    findCameraByCameraId(cameraId) {
260
+      for(const root of this.cameraListData) {
261
+        const list = root.children || []
262
+        for(const d of list) {
263
+          if(d.cameraId == cameraId) {
264
+            return d
265
+          }
266
+        }
267
+      }
268
+      return undefined
269
+    },
270
+
271
+  }
272
+}
273
+</script>
274
+
275
+<template>
276
+  <div class="box">
277
+    <div class="player-box">
278
+      <div class="title">
279
+        <span><i></i> 播放通道</span>
280
+        <span>{{orgName}}</span>
281
+        <span @click="wholeFullScreen" style="cursor: pointer;"><i></i>全屏画面播放</span>
282
+      </div>
283
+      <div id="player"></div>
284
+    </div>
285
+    <div class="control-box">
286
+      <el-tabs v-model="activeName" type="card">
287
+        <el-tab-pane label="摄像头列表" name="cameraList" style="margin: 5px 5px 5px 5px;">
288
+          回放日期: <el-date-picker type="datetimerange" value-format="yyyy-MM-ddTHH:mm:ss.000+08:00" v-model="date" style="margin-top: 5px;"/>
289
+          <el-tree :data="cameraListData" :props="{children: 'children', label: 'label'}" @node-click="onTreeNodeClick" style="margin-top: 10px" />
290
+        </el-tab-pane>
291
+        <el-tab-pane label="操作" name="options" style="margin: 5px 5px 5px 5px;">
292
+          <el-row class="row">
293
+            <el-col :span="12">
294
+              <el-button type="primary" class="btn" @click="slow">慢放</el-button>
295
+            </el-col>
296
+            <el-col :span="12">
297
+              <el-button type="primary" class="btn" @click="fast">快放</el-button>
298
+            </el-col>
299
+          </el-row>
300
+          <el-row class="row">
301
+            <el-col :span="6">
302
+              <el-button type="primary" class="btn" @click="pause">暂停</el-button>
303
+            </el-col>
304
+            <el-col :span="6">
305
+              <el-button type="primary" class="btn" @click="resume">恢复</el-button>
306
+            </el-col>
307
+            <el-col :span="6">
308
+              <el-button type="primary" class="btn" @click="stop">停止</el-button>
309
+            </el-col>
310
+          </el-row>
311
+        </el-tab-pane>
312
+      </el-tabs>
313
+    </div>
314
+
315
+  </div>
316
+</template>
317
+
318
+<style scoped lang="scss">
319
+.box {
320
+  width: 100%;
321
+  display: flex;
322
+  .player-box {
323
+    .title {
324
+      display: flex;
325
+      justify-content: space-between;
326
+      margin-bottom: 5px;
327
+    }
328
+  }
329
+  .control-box {
330
+    margin-left: 10px;
331
+    width: 30%;
332
+
333
+    .btn {
334
+      width: 100px;
335
+      margin-top: 5px;
336
+      margin-left: 10px;
337
+    }
338
+
339
+    .small-btn {
340
+      width: 80px;
341
+      margin-top: 5px;
342
+    }
343
+  }
344
+}
345
+
346
+@media screen and (max-width: 991px) {
347
+  #player {
348
+    width: calc(100vw - 16px);
349
+    height: calc((100vw - 16px) * 5 / 8);
350
+  }
351
+  .title {
352
+    width: calc(100vw - 16px);
353
+  }
354
+}
355
+@media screen and (min-width: 992px) {
356
+  #player {
357
+    width: calc(50vw - 8px);
358
+    height: calc((50vw - 8px) * 5 / 8);
359
+  }
360
+  .title {
361
+    width: calc(50vw - 8px);
362
+  }
363
+}
364
+</style>

+ 65 - 58
src/components/common/topMenu.vue

@@ -1,26 +1,31 @@
1 1
 <template>
2 2
   <div class="menu-container">
3 3
     <div class="btn left-btn" @click="scrollLeft">
4
-      <img v-show="hasPrev" src="@/assets/wisdom_images/left-nav.png">
4
+      <img v-show="hasPrev" src="@/assets/wisdom_images/left-nav.png" />
5 5
     </div>
6 6
     <nav class="menu" ref="menu">
7 7
       <ul>
8
-        <li v-for="(item, index) in list" :key="index" class="menu-item" :class="{activate: $store.state.user.topMenuIndex === index}" @click="openMenu(item, index)">
8
+        <li
9
+          v-for="(item, index) in list"
10
+          :key="index"
11
+          class="menu-item"
12
+          :class="{ activate: $store.state.user.topMenuIndex === index }"
13
+          @click="openMenu(item, index)"
14
+        >
9 15
           <i :class="item.icon"></i>
10
-          {{item.funcName}}
16
+          {{ item.funcName }}
11 17
         </li>
12 18
       </ul>
13 19
     </nav>
14 20
     <div class="btn right-btn" @click="scrollRight">
15
-      <img v-show="hasNext" src="@/assets/wisdom_images/right-nav.png">
21
+      <img v-show="hasNext" src="@/assets/wisdom_images/right-nav.png" />
16 22
     </div>
17 23
   </div>
18 24
 </template>
19 25
 
20 26
 <script>
21
-
22
-const ITEM_WIDTH = 130
23
-const ITEM_BORDER = 1
27
+const ITEM_WIDTH = 130;
28
+const ITEM_BORDER = 1;
24 29
 export default {
25 30
   data() {
26 31
     return {
@@ -31,9 +36,9 @@ export default {
31 36
       funcTree: null,
32 37
       list: [
33 38
         {
34
-          icon: 'el-icon-s-home',
35
-          funcName: '首页',
36
-          funcUrl: '/home',
39
+          icon: "el-icon-s-home",
40
+          funcName: "首页",
41
+          funcUrl: "/home",
37 42
           resourceCode: null,
38 43
         },
39 44
         // {
@@ -91,14 +96,13 @@ export default {
91 96
         //   funcUrl: '/system/userManagement',
92 97
         //   resourceCode: 'RM1001008008',
93 98
         // },
94
-
95
-      ]
96
-    }
99
+      ],
100
+    };
97 101
   },
98 102
   created() {
99
-    this.visibleItems = this.list.length
103
+    this.visibleItems = this.list.length;
100 104
     // this.welcome()
101
-    this.welcome2()
105
+    this.welcome2();
102 106
     const menuCode = sessionStorage.getItem("menuCode");
103 107
     const menuData = JSON.parse(sessionStorage.getItem("xzdata"));
104 108
 
@@ -109,28 +113,26 @@ export default {
109 113
     //     }
110 114
     //   });
111 115
     // }
112
-    window.addEventListener('resize', this.updateVisibleItems);
116
+    window.addEventListener("resize", this.updateVisibleItems);
113 117
   },
114 118
   mounted() {
115 119
     this.updateVisibleItems();
116 120
     this.$nextTick(() => {
117
-      this.$refs.menu.scrollLeft = 0
118
-    })
121
+      this.$refs.menu.scrollLeft = 0;
122
+    });
119 123
   },
120 124
   beforeDestroy() {
121
-    window.removeEventListener('resize', this.updateVisibleItems);
125
+    window.removeEventListener("resize", this.updateVisibleItems);
122 126
   },
123 127
   watch: {
124 128
     defaultActiveUrl(n, o) {
125
-      console.log('------', n)
126
-    }
129
+      console.log("------", n);
130
+    },
127 131
   },
128 132
   methods: {
129
-    handleSelect() {
130
-
131
-    },
133
+    handleSelect() {},
132 134
     scrollLeft() {
133
-      this.$refs.menu.scrollLeft -= (ITEM_WIDTH + 2);
135
+      this.$refs.menu.scrollLeft -= ITEM_WIDTH + 2;
134 136
       // if(this.$refs.menu.scrollLeft <= 0) {
135 137
       //   this.hasPrev = false
136 138
       // }else {
@@ -138,7 +140,7 @@ export default {
138 140
       // }
139 141
     },
140 142
     scrollRight() {
141
-      this.$refs.menu.scrollLeft += (ITEM_WIDTH + 2);
143
+      this.$refs.menu.scrollLeft += ITEM_WIDTH + 2;
142 144
       // if(this.$refs.menu.scrollLeft >= (ITEM_WIDTH + 2) * this.list.length) {
143 145
       //   this.hasNext = false
144 146
       // }else {
@@ -146,7 +148,10 @@ export default {
146 148
       // }
147 149
     },
148 150
     updateVisibleItems() {
149
-      const width = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
151
+      const width =
152
+        window.innerWidth ||
153
+        document.documentElement.clientWidth ||
154
+        document.body.clientWidth;
150 155
       if (width <= 690) {
151 156
         this.visibleItems = 2;
152 157
       } else if (width <= 800) {
@@ -160,55 +165,58 @@ export default {
160 165
       } else {
161 166
         this.visibleItems = this.list.length;
162 167
       }
163
-      this.$refs.menu.style.width = `${this.visibleItems * ITEM_WIDTH + this.visibleItems * 2}px`;
168
+      this.$refs.menu.style.width = `${
169
+        this.visibleItems * ITEM_WIDTH + this.visibleItems * 2
170
+      }px`;
164 171
     },
165 172
     openMenu(item, index) {
166
-      console.log('open menu', item, index)
167
-      if (['crk', '/crk'].indexOf(item.funcUrl) >= 0) {
168
-        // this.$store.state.flag = 1;
173
+      console.log("open menu", item, index);
174
+      if (["crk", "/crk"].indexOf(item.funcUrl) >= 0) {
175
+        this.$store.state.flag = 1;
169 176
         // return
170
-        return this.$systemUtils.gotoCrkSystem(this)
171
-      }else {
172
-        // this.$store.state.flag = 2;
177
+        this.$store.commit("SET_TOP_MENU_INDEX", index);
178
+        // return this.$systemUtils.gotoCrkSystem(this)
179
+      } else {
180
+        this.$store.state.flag = 2;
173 181
       }
174
-      if (this.$store.state.user.topMenuIndex === index) return
175
-      this.$store.commit('SET_TOP_MENU_INDEX', index)
182
+      if (this.$store.state.user.topMenuIndex === index) return;
183
+      this.$store.commit("SET_TOP_MENU_INDEX", index);
176 184
       // if(!item.resourceCode) {
177 185
       //   return this.$router.push({path: item.funcUrl})
178 186
       // }
179 187
 
180
-      this.getMenuList(item, index)
188
+      this.getMenuList(item, index);
181 189
     },
182 190
     welcome() {
183 191
       this.loginPeople = sessionStorage.getItem("userName");
184 192
       const data = JSON.parse(sessionStorage.getItem("xzdata"));
185
-      this.xzdata = data
186
-      this.$store.commit("SET_MENU_DATA", data)
187
-      const defaultCode = 'RM1001008001'
188
-      let leftMenuList = []
193
+      this.xzdata = data;
194
+      this.$store.commit("SET_MENU_DATA", data);
195
+      const defaultCode = "RM1001008001";
196
+      let leftMenuList = [];
189 197
       this.xzdata.forEach((item) => {
190 198
         if (item.resourceCode == defaultCode) {
191
-          leftMenuList = [item]
199
+          leftMenuList = [item];
192 200
         }
193 201
       });
194 202
       this.$store.dispatch("changeLeftMenu", leftMenuList);
195 203
     },
196 204
     welcome2() {
197 205
       const tree = JSON.parse(sessionStorage.getItem("FUN_TREE"));
198
-      this.funcTree = tree
199
-      let defaultChild = []
206
+      this.funcTree = tree;
207
+      let defaultChild = [];
200 208
       for (const menu of tree) {
201 209
         if (defaultChild.length <= 0) {
202
-          defaultChild = menu.children
210
+          defaultChild = menu.children;
203 211
         }
204 212
         this.list.push({
205
-          icon: 'el-icon-s-home',
213
+          icon: "el-icon-s-home",
206 214
           funcName: menu.funcName,
207 215
           funcUrl: menu.funcUrl,
208 216
           funcId: menu.funcId,
209
-          resourceCode: 'RM1001008007',
210
-          children: menu.children
211
-        })
217
+          resourceCode: "RM1001008007",
218
+          children: menu.children,
219
+        });
212 220
       }
213 221
       this.$store.dispatch("changeLeftMenu", defaultChild);
214 222
     },
@@ -219,21 +227,21 @@ export default {
219 227
       if (arr[0] && arr[0].children && arr[0].children.length) {
220 228
         this.getFirstMenu(arr[0].children);
221 229
       } else {
222
-        console.log('first menu', arr[0])
230
+        console.log("first menu", arr[0]);
223 231
         this.menuUrl = arr[0].funcUrl;
224 232
       }
225 233
     },
226 234
     getMenuList(item, index) {
227
-      console.log('get menu list', item, index,)
235
+      console.log("get menu list", item, index);
228 236
       // debugger
229 237
       let leftMenuList = item.children;
230 238
       if (item.children && item.children.length > 0) {
231 239
         this.getFirstMenu(item.children);
232
-        console.log('menuUrl', this.menuUrl)
233
-        this.$router.push({path: this.menuUrl});
240
+        console.log("menuUrl", this.menuUrl);
241
+        this.$router.push({ path: this.menuUrl });
234 242
       } else {
235 243
         if (item.funcUrl.indexOf("http") == -1) {
236
-          this.$router.push({path: item.funcUrl});
244
+          this.$router.push({ path: item.funcUrl });
237 245
         } else {
238 246
           window.location.href = item.funcUrl;
239 247
         }
@@ -242,7 +250,7 @@ export default {
242 250
       this.isClick = index;
243 251
       sessionStorage.menuIdx = index;
244 252
       // this.getFirstMenu([item]);
245
-      this.$store.commit('SET_DEFAULT_ACTIVE_URL', this.menuUrl)
253
+      this.$store.commit("SET_DEFAULT_ACTIVE_URL", this.menuUrl);
246 254
       sessionStorage.setItem("leftMenuList", JSON.stringify(leftMenuList));
247 255
       sessionStorage.setItem("menuCode", code);
248 256
       sessionStorage.setItem("resourceCode", code);
@@ -251,8 +259,8 @@ export default {
251 259
 
252 260
       this.$store.dispatch("changeLeftMenu", leftMenuList);
253 261
     },
254
-  }
255
-}
262
+  },
263
+};
256 264
 </script>
257 265
 
258 266
 
@@ -302,7 +310,6 @@ export default {
302 310
   list-style-type: none;
303 311
 }
304 312
 
305
-
306 313
 .menu-item {
307 314
   width: 130px;
308 315
   height: 100%;

+ 55 - 2
src/components/system/oilTankEdit.vue

@@ -166,6 +166,51 @@
166 166
             </el-form-item>
167 167
           </el-col>
168 168
         </el-row>
169
+        <!-- 新 -->
170
+        <el-row type="flex" align="middle" justify="center" class="row">
171
+          <el-col :span="8">
172
+            <el-form-item label="设计单位" prop="orgCode">
173
+              <el-input v-model="form.sjdw" :readonly="readonly"></el-input>
174
+            </el-form-item>
175
+          </el-col>
176
+          <el-col :span="8">
177
+            <el-form-item label="建设单位" prop="orgCode">
178
+              <el-input v-model="form.jsdw" :readonly="readonly"></el-input>
179
+            </el-form-item>
180
+          </el-col>
181
+          <el-col :span="8">
182
+            <el-form-item label="监理单位" prop="orgCode">
183
+              <el-input v-model="form.jldw" :readonly="readonly"></el-input>
184
+            </el-form-item>
185
+          </el-col>
186
+        </el-row>
187
+        <el-row type="flex" align="middle" justify="center" class="row">
188
+          <el-col :span="8">
189
+            <el-form-item label="设计年限" prop="orgCode">
190
+              <el-input
191
+                v-model="form.designLife"
192
+                :readonly="readonly"
193
+              ></el-input>
194
+            </el-form-item>
195
+          </el-col>
196
+
197
+          <el-col :span="8">
198
+            <el-form-item label="启用日期" prop="builddate">
199
+              <el-date-picker
200
+                value-format="yyyy-MM-dd"
201
+                type="date"
202
+                v-model="form.startDate"
203
+                :readonly="readonly"
204
+              />
205
+            </el-form-item>
206
+          </el-col>
207
+          <el-col :span="8">
208
+            <el-form-item label="保管员" prop="orgCode">
209
+              <el-input v-model="form.keeper" :readonly="readonly"></el-input>
210
+            </el-form-item>
211
+          </el-col>
212
+        </el-row>
213
+
169 214
         <el-row type="flex" align="middle" justify="center" class="row">
170 215
           <el-col :span="8">
171 216
             <el-form-item label="油罐图" prop="agentDepotName">
@@ -385,6 +430,12 @@ export default {
385 430
         tankChart: null,
386 431
         tanklibChart: null,
387 432
         builddate: null,
433
+        sjdw: null,
434
+        jsdw: null,
435
+        jldw: null,
436
+        designLife: null,
437
+        startDate: null,
438
+        keeper: null,
388 439
       };
389 440
     },
390 441
     onUpload(state, resp) {
@@ -404,8 +455,10 @@ export default {
404 455
         ...this.form,
405 456
       };
406 457
       this.$systemUtils.parseField2Float(data, [
407
-        'tankCapacity', 'height', 'diameter'
408
-      ])
458
+        "tankCapacity",
459
+        "height",
460
+        "diameter",
461
+      ]);
409 462
       return {
410 463
         tankJson: JSON.stringify(data),
411 464
         orgId: this.orgId,

+ 4 - 3
src/main.js

@@ -43,12 +43,12 @@ import VueAwesomeSwiper from 'vue-awesome-swiper'
43 43
 
44 44
 import dateUtils from "./utils/dateUtils";
45 45
 import {printElement} from "./utils/el-print";
46
-import * as systemUtils from "./utils/systemUtils";
47 46
 import enumUtils from "./utils/enumUtils"
47
+import * as systemUtils from "./utils/systemUtils";
48 48
 
49 49
 Vue.use(VueAwesomeSwiper)
50 50
 
51
-import {startCheck} from "@/utils/loginStatusChecker";
51
+import { startCheckPreApi} from "@/utils/loginStatusChecker";
52 52
 
53 53
 //1.引入时间处理函数
54 54
 import utils from './utils/index'
@@ -87,6 +87,7 @@ enumUtils.tryRefresh().then(resp => {
87 87
     components: { App },
88 88
     template: '<App/>'
89 89
   })
90
-  startCheck()
90
+  startCheckPreApi()
91
+  // startCheck()
91 92
 })
92 93
 

+ 848 - 0
src/page/APayment/components/monthlyReport.vue

@@ -0,0 +1,848 @@
1
+<template>
2
+  <div>
3
+    <el-dialog
4
+      :close-on-press-escape="false"
5
+      :visible.sync="visible"
6
+      :before-close="handleDialogClose"
7
+      :close-on-click-modal="false"
8
+      class="dialog-box"
9
+      width="86%"
10
+    >
11
+      <el-divider>{{ titleText }}出库确认单</el-divider>
12
+      <el-form
13
+        label-width="150px"
14
+        :rules="rules"
15
+        ref="ruleForm"
16
+        :model="formState"
17
+      >
18
+        <el-row>
19
+          <el-col :span="8"
20
+            ><el-form-item label="合同编号" prop="contractId">
21
+              <el-select
22
+                v-model="formState.contractId"
23
+                clearable
24
+                :disabled="showLock"
25
+                placeholder="请选择"
26
+                @change="houseOptionsChange"
27
+              >
28
+                <el-option
29
+                  v-for="item in houseOptions"
30
+                  :key="item.id"
31
+                  :label="item.contractNumber"
32
+                  :value="item.id"
33
+                >
34
+                </el-option>
35
+              </el-select>
36
+            </el-form-item>
37
+          </el-col>
38
+          <el-col :span="8"
39
+            ><el-form-item label="合同名称" prop="grainTypeId">
40
+              <el-input
41
+                class="title-box"
42
+                autocomplete="off"
43
+                :disabled="true"
44
+                v-model:value="formStateDEl.contractTitle"
45
+              />
46
+            </el-form-item>
47
+          </el-col>
48
+          <el-col :span="8"
49
+            ><el-form-item label="合同类型" prop="grainVarietyId">
50
+              <el-select
51
+                v-model="formStateDEl.contractType"
52
+                clearable
53
+                :disabled="true"
54
+                placeholder="请选择"
55
+              >
56
+                <el-option label="采购合同" :value="1"> </el-option>
57
+                <el-option label="销售合同" :value="2"> </el-option>
58
+              </el-select>
59
+            </el-form-item>
60
+          </el-col>
61
+          <el-col :span="8"
62
+            ><el-form-item label="销往单位" prop="standardType">
63
+              <el-input
64
+                class="title-box"
65
+                autocomplete="off"
66
+                :disabled="true"
67
+                v-model:value="formStateDEl.purchaseUnit"
68
+              />
69
+            </el-form-item>
70
+          </el-col>
71
+
72
+          <el-col :span="8"
73
+            ><el-form-item label="出库确认时间" prop="outboundConfirmationTime">
74
+              <el-date-picker
75
+                v-model="formState.outboundConfirmationTime"
76
+                value-format="yyyy-MM-dd HH:mm:ss"
77
+                type="date"
78
+                :disabled="showLock"
79
+                placeholder="日期"
80
+              />
81
+            </el-form-item>
82
+          </el-col>
83
+
84
+          <el-col :span="8"
85
+            ><el-form-item label="出库确认单号" prop="standardType">
86
+              <el-input
87
+                class="title-box"
88
+                autocomplete="off"
89
+                :disabled="true"
90
+                v-model:value="formState.outboundConfirmationNumber"
91
+              />
92
+            </el-form-item>
93
+          </el-col>
94
+        </el-row>
95
+        <el-row>
96
+          <el-col :span="24">
97
+            <!-- 表格 -->
98
+            <el-table
99
+              :summary-method="getSummaries"
100
+              show-summary
101
+              :data="tableData"
102
+              border
103
+              stripe
104
+              highlight-current-row
105
+              v-loading="listLoading"
106
+              style="width: 100%"
107
+            >
108
+              <el-table-column
109
+                align="center"
110
+                type="index"
111
+                width="60"
112
+                label="序号"
113
+              ></el-table-column>
114
+              <el-table-column
115
+                align="center"
116
+                prop="basicStorehouseName"
117
+                label="仓房名称"
118
+              >
119
+              </el-table-column>
120
+              <el-table-column
121
+                align="center"
122
+                prop="warehouseName"
123
+                label="货位名称"
124
+              >
125
+              </el-table-column>
126
+              <el-table-column
127
+                align="center"
128
+                prop="grainVarietyName"
129
+                label="品种"
130
+              >
131
+              </el-table-column>
132
+              <el-table-column
133
+                align="center"
134
+                prop="grainNatureName"
135
+                label="性质"
136
+              ></el-table-column>
137
+              <el-table-column
138
+                align="center"
139
+                prop="settleQuantity"
140
+                label="结算数量(吨)"
141
+                v-slot="scope"
142
+              >
143
+                <el-input
144
+                  class="title-box"
145
+                  autocomplete="off"
146
+                  v-model="scope.row.settleQuantity"
147
+                  :disabled="!formState.contractId || showLock"
148
+                  @input="unitPricechange(scope.row)"
149
+                />
150
+              </el-table-column>
151
+              <el-table-column
152
+                align="center"
153
+                prop="settlePrice"
154
+                label="结算价格(元/吨)"
155
+                v-slot="scope"
156
+              >
157
+                <el-input
158
+                  class="title-box"
159
+                  autocomplete="off"
160
+                  v-model="scope.row.settlePrice"
161
+                  :disabled="!formState.contractId || showLock"
162
+                  @input="Sliangchange(scope.row)"
163
+                />
164
+              </el-table-column>
165
+              <el-table-column
166
+                align="center"
167
+                prop="settleAmount"
168
+                label="结算金额"
169
+                v-slot="scope"
170
+              >
171
+                <div>
172
+                  {{
173
+                    (scope.row.settleAmount =
174
+                      scope.row.settleQuantity * scope.row.settlePrice)
175
+                  }}
176
+                </div>
177
+              </el-table-column>
178
+              <el-table-column label="操作" align="center" width="100">
179
+                <template v-slot="scope">
180
+                  <el-popconfirm
181
+                    title="确定删除吗?"
182
+                    icon="el-icon-info"
183
+                    icon-color="red"
184
+                    @confirm="deleteList(scope.row)"
185
+                  >
186
+                    <el-button
187
+                      type="primary"
188
+                      size="small"
189
+                      :disabled="showLock"
190
+                      slot="reference"
191
+                      icon="el-icon-delete"
192
+                      >删除</el-button
193
+                    >
194
+                  </el-popconfirm>
195
+                </template>
196
+              </el-table-column>
197
+            </el-table>
198
+          </el-col>
199
+        </el-row>
200
+
201
+        <el-divider>{{ titleText }}贷款信息</el-divider>
202
+        <el-row>
203
+          <el-col :span="8"
204
+            ><el-form-item label="贷款收回单位" prop="loanRecoveryUnit">
205
+              <el-input
206
+                class="title-box"
207
+                autocomplete="off"
208
+                :disabled="showLock"
209
+                v-model:value="formState.loanRecoveryUnit"
210
+              /> </el-form-item
211
+          ></el-col>
212
+          <el-col :span="8"
213
+            ><el-form-item label="贷款收回数量" prop="loanRecoveryQuantity">
214
+              <el-input
215
+                class="title-box"
216
+                autocomplete="off"
217
+                :disabled="showLock"
218
+                v-model:value="formState.loanRecoveryQuantity"
219
+              />
220
+            </el-form-item>
221
+          </el-col>
222
+          <el-col :span="8"
223
+            ><el-form-item label="贷款收回金额" prop="loanRecoveryAmount">
224
+              <el-input
225
+                class="title-box"
226
+                autocomplete="off"
227
+                :disabled="showLock"
228
+                v-model:value="formState.loanRecoveryAmount"
229
+              />
230
+            </el-form-item>
231
+          </el-col>
232
+          <el-col :span="8"
233
+            ><el-form-item label="贷款归还时间" prop="loanReturnTime">
234
+              <el-date-picker
235
+                v-model="formState.loanReturnTime"
236
+                value-format="yyyy-MM-dd HH:mm:ss"
237
+                type="date"
238
+                :disabled="showLock"
239
+                placeholder="日期"
240
+              />
241
+            </el-form-item>
242
+          </el-col>
243
+
244
+          <el-col :span="8"
245
+            ><el-form-item label="贷款归还金额" prop="loanReturnAmount">
246
+              <el-input
247
+                class="title-box"
248
+                autocomplete="off"
249
+                :disabled="showLock"
250
+                v-model:value="formState.loanReturnAmount"
251
+              />
252
+            </el-form-item>
253
+          </el-col>
254
+        </el-row>
255
+        <el-divider>{{ titleText }}销售发票情况</el-divider>
256
+        <el-row>
257
+          <el-col :span="8"
258
+            ><el-form-item label="单位" prop="invoiceUnit">
259
+              <el-input
260
+                class="title-box"
261
+                autocomplete="off"
262
+                :disabled="showLock"
263
+                v-model:value="formState.invoiceUnit"
264
+              /> </el-form-item
265
+          ></el-col>
266
+          <el-col :span="8"
267
+            ><el-form-item label="发票数量" prop="invoiceQuantity">
268
+              <el-input
269
+                class="title-box"
270
+                autocomplete="off"
271
+                :disabled="showLock"
272
+                v-model:value="formState.invoiceQuantity"
273
+              />
274
+            </el-form-item>
275
+          </el-col>
276
+          <el-col :span="8"
277
+            ><el-form-item label="发票单价" prop="invoiceUnitPrice">
278
+              <el-input
279
+                class="title-box"
280
+                autocomplete="off"
281
+                :disabled="showLock"
282
+                v-model:value="formState.invoiceUnitPrice"
283
+              />
284
+            </el-form-item>
285
+          </el-col>
286
+
287
+          <el-col :span="8"
288
+            ><el-form-item label="发票金额" prop="invoiceAmount">
289
+              <el-input
290
+                class="title-box"
291
+                autocomplete="off"
292
+                :disabled="showLock"
293
+                v-model:value="formState.invoiceAmount"
294
+              />
295
+            </el-form-item>
296
+          </el-col>
297
+        </el-row>
298
+        <el-divider>{{ titleText }}差价上缴</el-divider>
299
+
300
+        <el-row>
301
+          <el-col :span="24">
302
+            <el-table
303
+              :data="tableDataSZ"
304
+              border
305
+              stripe
306
+              highlight-current-row
307
+              v-loading="listLoading"
308
+              style="width: 100%"
309
+            >
310
+              <el-table-column
311
+                align="center"
312
+                prop="projectType"
313
+                label="项目"
314
+                v-slot="scope"
315
+              >
316
+                <div v-if="scope.row.projectType == 1">销售</div>
317
+                <div v-if="scope.row.projectType == 2">损耗</div>
318
+                <div v-if="scope.row.projectType == 3">入库(用负数表示)</div>
319
+                <div v-if="scope.row.projectType == 4">
320
+                  交易手续费(用负数表示)
321
+                </div>
322
+              </el-table-column>
323
+              <el-table-column
324
+                align="center"
325
+                prop="quantity"
326
+                label="数量"
327
+                v-slot="scope"
328
+              >
329
+                <el-input
330
+                  class="title-box"
331
+                  autocomplete="off"
332
+                  v-model="scope.row.quantity"
333
+                  :disabled="showLock"
334
+                />
335
+              </el-table-column>
336
+              <el-table-column
337
+                align="center"
338
+                prop="amount"
339
+                label="金额"
340
+                v-slot="scope"
341
+              >
342
+                <el-input
343
+                  class="title-box"
344
+                  autocomplete="off"
345
+                  v-model="scope.row.amount"
346
+                  :disabled="showLock"
347
+                />
348
+              </el-table-column>
349
+            </el-table>
350
+          </el-col>
351
+        </el-row>
352
+        <el-row>
353
+          <el-col style="height: 30px" :span="24"> </el-col>
354
+        </el-row>
355
+      </el-form>
356
+      <span slot="footer" class="dialog-footer">
357
+        <el-button v-if="this.isTypeData != '3'" @click="preserve"
358
+          >提交</el-button
359
+        >
360
+        <el-button @click="handleDialogClose">关闭</el-button>
361
+      </span>
362
+    </el-dialog>
363
+  </div>
364
+</template>
365
+<script>
366
+import {
367
+  CRKYSQRadd,
368
+  CRKYSQRview,
369
+  CRKYSQRput,
370
+  CRKYSQRgetContractData,
371
+  CRKYSQRgetByContractId,
372
+} from "@/api/base/rotationApi.js";
373
+export default {
374
+  props: {
375
+    dataObj: {
376
+      type: Object,
377
+      default: () => ({}),
378
+    },
379
+  },
380
+  data() {
381
+    return {
382
+      RRTYUQQW: [],
383
+      tableData: [],
384
+      tableDataSZ: [
385
+        { projectType: "1", quantity: "", amount: "" },
386
+        { projectType: "2", quantity: "", amount: "" },
387
+        { projectType: "3", quantity: "", amount: "" },
388
+        { projectType: "4", quantity: "", amount: "" },
389
+      ],
390
+      listLoading: false,
391
+      isTypeData: "",
392
+      showLock: false,
393
+      visible: false,
394
+      titleText: "",
395
+      orgId: null,
396
+      formState: {
397
+        id: "",
398
+        contractId: "",
399
+        outboundConfirmationTime: "",
400
+        loanRecoveryUnit: null,
401
+        loanRecoveryQuantity: null,
402
+        loanRecoveryAmount: "",
403
+        loanReturnTime: null,
404
+        loanReturnAmount: null,
405
+        invoiceUnit: "",
406
+        invoiceQuantity: "",
407
+        invoiceUnitPrice: "",
408
+        invoiceAmount: "",
409
+        outboundConfirmationNumber: "",
410
+      },
411
+      formStateDEl: {
412
+        contractTitle: "",
413
+        contractType: "",
414
+        purchaseUnit: "",
415
+      },
416
+      houseOptions: [],
417
+      rules: {
418
+        contractId: [
419
+          { required: true, message: "请输入或选择", trigger: "blur" },
420
+        ],
421
+        outboundConfirmationTime: [
422
+          { required: true, message: "请输入或选择", trigger: "blur" },
423
+        ],
424
+        loanRecoveryUnit: [
425
+          { required: true, message: "请输入或选择", trigger: "blur" },
426
+        ],
427
+        loanRecoveryQuantity: [
428
+          { required: true, message: "请输入或选择", trigger: "blur" },
429
+        ],
430
+        loanRecoveryAmount: [
431
+          { required: true, message: "请输入或选择", trigger: "blur" },
432
+        ],
433
+        loanReturnTime: [
434
+          { required: true, message: "请输入或选择", trigger: "blur" },
435
+        ],
436
+        loanReturnAmount: [
437
+          { required: true, message: "请输入或选择", trigger: "blur" },
438
+        ],
439
+        invoiceUnit: [
440
+          { required: true, message: "请输入或选择", trigger: "blur" },
441
+        ],
442
+        invoiceQuantity: [
443
+          { required: true, message: "请输入或选择", trigger: "blur" },
444
+        ],
445
+        invoiceUnitPrice: [
446
+          { required: true, message: "请输入或选择", trigger: "blur" },
447
+        ],
448
+        invoiceAmount: [
449
+          { required: true, message: "请输入或选择", trigger: "blur" },
450
+        ],
451
+      },
452
+    };
453
+  },
454
+  watch: {
455
+    dataObj: {
456
+      handler(val) {
457
+        this.titleText = val.titleText;
458
+        this.visible = val.visible;
459
+        this.showLock = val.showLock;
460
+        this.isTypeData = val.isType; //isType = 1是新增 2是编辑 3是查看
461
+        this.lengthACC = val.lengthACC;
462
+        this.$nextTick(() => {
463
+          if (val.isType == "1") {
464
+            this.tableData = [];
465
+            // this.tableData.push({ acc: new Date().getTime() });
466
+            // this.formState.purchaseCode = this.getCurrentTimeWithPrefix();
467
+          }
468
+          if (val.isType == "2" || val.isType == "3") {
469
+            this.checkData();
470
+          }
471
+          this.getRpReportListData();
472
+          this.xialalbList();
473
+        });
474
+      },
475
+      // immediate: true,
476
+      deep: true,
477
+    },
478
+    // tableData: {
479
+    //   handler(val) {
480
+    //     this.total = this.tableData.reduce((total, item) => {
481
+    //       console.log(item.settleAmount);
482
+    //       const delTT = parseFloat(+item.settleAmount);
483
+    //       if (!isNaN(delTT)) {
484
+    //         return total + delTT;
485
+    //       } else {
486
+    //         return total;
487
+    //       }
488
+    //     }, 0);
489
+    //   },
490
+    //   // immediate: true,
491
+    //   deep: true,
492
+    // },
493
+  },
494
+  mounted() {},
495
+
496
+  methods: {
497
+    getRpReportListData() {
498
+      const userInfoJSON = JSON.parse(sessionStorage.getItem("userInfo"));
499
+      this.orgId = userInfoJSON.orgId;
500
+    },
501
+    async xialalbList() {
502
+      const userInfoJSON = JSON.parse(sessionStorage.getItem("userInfo"));
503
+      const res = await CRKYSQRgetContractData({ orgId: userInfoJSON.orgId });
504
+      this.houseOptions = res.data;
505
+    },
506
+
507
+    houseOptionsChange(v) {
508
+      this.xiCRKYSQRgetByContractId(v);
509
+    },
510
+
511
+    async xiCRKYSQRgetByContractId(id) {
512
+      const res = await CRKYSQRgetByContractId(id);
513
+      this.formStateDEl = res.data;
514
+      this.tableData = [];
515
+      this.RRTYUQQW = [];
516
+      this.tableData = res.data.storeWareDetailDataVOList;
517
+      // this.RRTYUQQW = res.data.storeWareDetailDataVOList;
518
+      this.RRTYUQQW = JSON.parse(
519
+        JSON.stringify(res.data.storeWareDetailDataVOList)
520
+      );
521
+    },
522
+    houseChanged(val) {},
523
+    editData(v) {
524
+      this.tableData.push({ acc: new Date().getTime() });
525
+    },
526
+    deleteList(v) {
527
+      if (this.tableData.length <= 1) return;
528
+      this.tableData = this.tableData.filter((item) => {
529
+        return item.id !== v.id;
530
+      });
531
+    },
532
+
533
+    validateData(tableData, RRTYUQQW) {
534
+      let del = [];
535
+      for (const item of tableData) {
536
+        const matchingItem = RRTYUQQW.find((cun) => cun.id === item.id);
537
+        if (matchingItem) {
538
+          //新
539
+          const itemSettleQuantity = Number(item.settleQuantity);
540
+          //初
541
+          const cunSettleQuantity = Number(matchingItem.settleQuantity);
542
+
543
+          if (Math.round(itemSettleQuantity) > Math.round(cunSettleQuantity)) {
544
+            del.push(false);
545
+          } else if (
546
+            Math.round(itemSettleQuantity) == Math.round(cunSettleQuantity)
547
+          ) {
548
+            del.push(true);
549
+          }
550
+        }
551
+        // if (
552
+        //   item.settleQuantity === -1 ||
553
+        //   item.settleQuantity === "" ||
554
+        //   item.settleQuantity === null ||
555
+        //   item.settleQuantity === undefined
556
+        // ) {
557
+        //   this.$message.error("结算数量(吨)不能为 -1 或 空 !");
558
+        //   return false;
559
+        // }
560
+      }
561
+      return del;
562
+    },
563
+    // 保存
564
+    preserve() {
565
+      // 判断新增还是编辑  isType = 1是新增 2是编辑 3是查看
566
+      if (this.isTypeData === "1") {
567
+        this.$refs["ruleForm"].validate((valid) => {
568
+          if (valid) {
569
+            let EERT = this.validateData(this.tableData, this.RRTYUQQW);
570
+            console.log(EERT);
571
+            if (EERT.every((item) => item === true)) {
572
+              console.log("通过");
573
+            } else {
574
+              this.$message.error("结算数量(吨)修改数量不能大于之前数量!");
575
+              return;
576
+            }
577
+            for (const item of this.tableData) {
578
+              if (
579
+                item.settleQuantity == -1 ||
580
+                item.settleQuantity == "" ||
581
+                item.settleQuantity == null ||
582
+                item.settleQuantity == undefined
583
+              ) {
584
+                return this.$message.error("结算数量(吨)不能为 -1 或 空 !");
585
+              }
586
+            }
587
+
588
+            let totalSettleAmount = this.tableData.reduce((total, item) => {
589
+              const delTT = parseFloat(+item.settleAmount);
590
+              if (!isNaN(delTT)) {
591
+                return total + delTT;
592
+              } else {
593
+                return total;
594
+              }
595
+            }, 0);
596
+            let totalSettleQuantity = this.tableData.reduce((total, item) => {
597
+              const delTT = parseFloat(+item.settleQuantity);
598
+              if (!isNaN(delTT)) {
599
+                return total + delTT;
600
+              } else {
601
+                return total;
602
+              }
603
+            }, 0);
604
+
605
+            let data = {
606
+              ...this.formState,
607
+              fsOutConfirmContractItemList: this.tableData,
608
+              fsOutConfirmDiffPriceItemList: this.tableDataSZ,
609
+              totalSettleAmount: totalSettleAmount,
610
+              totalSettleQuantity: totalSettleQuantity,
611
+              orgId: this.orgId,
612
+            };
613
+            delete data.id;
614
+            delete data.outboundConfirmationNumber;
615
+            return CRKYSQRadd(data).then((res) => {
616
+              this.handleDialogClose();
617
+            });
618
+          } else {
619
+            console.log("error submit!!");
620
+            return false;
621
+          }
622
+        });
623
+      } else if (this.isTypeData === "2") {
624
+        // console.log("1", this.RRTYUQQW, "2", this.tableData);
625
+        this.$refs["ruleForm"].validate((valid) => {
626
+          if (valid) {
627
+            let EERT = this.validateData(this.tableData, this.RRTYUQQW);
628
+            console.log(EERT);
629
+            if (EERT.every((item) => item === true)) {
630
+              console.log("通过");
631
+            } else {
632
+              this.$message.error("结算数量(吨)修改数量不能大于之前数量!");
633
+              return;
634
+            }
635
+            for (const item of this.tableData) {
636
+              if (
637
+                item.settleQuantity === -1 ||
638
+                item.settleQuantity === "" ||
639
+                item.settleQuantity === null ||
640
+                item.settleQuantity === undefined
641
+              ) {
642
+                return this.$message.error("结算数量(吨)不能为 -1 或 空 !");
643
+              }
644
+            }
645
+
646
+            let totalSettleAmount = this.tableData.reduce((total, item) => {
647
+              const delTT = parseFloat(+item.settleAmount);
648
+              if (!isNaN(delTT)) {
649
+                return total + delTT;
650
+              } else {
651
+                return total;
652
+              }
653
+            }, 0);
654
+            let totalSettleQuantity = this.tableData.reduce((total, item) => {
655
+              const delTT = parseFloat(+item.settleQuantity);
656
+              if (!isNaN(delTT)) {
657
+                return total + delTT;
658
+              } else {
659
+                return total;
660
+              }
661
+            }, 0);
662
+
663
+            let data = {
664
+              ...this.formState,
665
+              fsOutConfirmContractItemList: this.tableData,
666
+              fsOutConfirmDiffPriceItemList: this.tableDataSZ,
667
+              totalSettleAmount: totalSettleAmount,
668
+              totalSettleQuantity: totalSettleQuantity,
669
+              orgId: this.orgId,
670
+              id: this.dataObj.id,
671
+            };
672
+            return CRKYSQRput(data).then((res) => {
673
+              this.handleDialogClose();
674
+            });
675
+          } else {
676
+            console.log("error submit!!");
677
+            return false;
678
+          }
679
+        });
680
+      }
681
+    },
682
+
683
+    async xiCRKd(id) {
684
+      const res = await CRKYSQRgetByContractId(id);
685
+      this.formStateDEl = {
686
+        contractTitle: res.data.contractTitle,
687
+        contractType: res.data.contractType,
688
+        purchaseUnit: res.data.purchaseUnit,
689
+      };
690
+    },
691
+    //  查看
692
+    checkData() {
693
+      return CRKYSQRview(this.dataObj.id).then((res) => {
694
+        this.formState = {
695
+          id: res.data.id,
696
+          contractId: res.data.contractId,
697
+          outboundConfirmationTime: res.data.outboundConfirmationTime,
698
+          loanRecoveryUnit: res.data.loanRecoveryUnit,
699
+          loanRecoveryQuantity: res.data.loanRecoveryQuantity,
700
+          loanRecoveryAmount: res.data.loanRecoveryAmount,
701
+          loanReturnTime: res.data.loanReturnTime,
702
+          loanReturnAmount: res.data.loanReturnAmount,
703
+          invoiceUnit: res.data.invoiceUnit,
704
+          invoiceQuantity: res.data.invoiceQuantity,
705
+          invoiceUnitPrice: res.data.invoiceUnitPrice,
706
+          invoiceAmount: res.data.invoiceAmount,
707
+          outboundConfirmationNumber: res.data.outboundConfirmationNumber,
708
+        };
709
+        this.tableData = [];
710
+        this.RRTYUQQW = [];
711
+        this.tableDataSZ = [
712
+          { projectType: "1", quantity: "", amount: "" },
713
+          { projectType: "2", quantity: "", amount: "" },
714
+          { projectType: "3", quantity: "", amount: "" },
715
+          { projectType: "4", quantity: "", amount: "" },
716
+        ];
717
+
718
+        this.RRTYUQQW = JSON.parse(
719
+          JSON.stringify(res.data.storeWareDetailDataVOList)
720
+        );
721
+        this.tableData = JSON.parse(
722
+          JSON.stringify(res.data.storeWareDetailDataVOList)
723
+        );
724
+        // this.tableData = res.data.storeWareDetailDataVOList;
725
+        this.tableDataSZ = res.data.fsOutConfirmDiffPriceItemList;
726
+        this.xiCRKd(this.formState.contractId);
727
+        // 因为在弹框关闭时候还是调用一次查看接口,避免出现新增时候数据渲染了需手动清空
728
+        if (!this.visible) {
729
+          for (let key in this.formState) {
730
+            this.formState[key] = "";
731
+          }
732
+          for (let key in this.formStateDEl) {
733
+            this.formState[key] = "";
734
+          }
735
+          this.tableDataSZ = [
736
+            { projectType: "1", quantity: "", amount: "" },
737
+            { projectType: "2", quantity: "", amount: "" },
738
+            { projectType: "3", quantity: "", amount: "" },
739
+            { projectType: "4", quantity: "", amount: "" },
740
+          ];
741
+        }
742
+      });
743
+    },
744
+    getCurrentTimeWithPrefix() {
745
+      const currentDate = new Date();
746
+      const year = currentDate.getFullYear().toString();
747
+      const month = (currentDate.getMonth() + 1).toString().padStart(2, "0");
748
+      const day = currentDate.getDate().toString().padStart(2, "0");
749
+      const timePrefix = "ZC";
750
+      const currentTimeWithPrefix = `${timePrefix}${year}${month}${day}0${this.lengthACC}`;
751
+      return currentTimeWithPrefix;
752
+    },
753
+
754
+    getSummaries(param) {
755
+      const { columns, data } = param;
756
+      const sums = [];
757
+      columns.forEach((column, index) => {
758
+        if (index === 0) {
759
+          sums[index] = "小计";
760
+          return;
761
+        }
762
+        const values = data.map((item) => Number(item[column.property]));
763
+        !values.every((value) => isNaN(value));
764
+        if (
765
+          column.property === "settleAmount" ||
766
+          column.property === "settleQuantity" ||
767
+          column.property === "settlePrice"
768
+        ) {
769
+          sums[index] = values.reduce((prev, curr) => {
770
+            const value = Number(curr);
771
+            if (!isNaN(value)) {
772
+              return prev + curr;
773
+            } else {
774
+              return prev;
775
+            }
776
+          }, 0);
777
+          sums[index];
778
+        } else {
779
+          sums[index] = "";
780
+        }
781
+      });
782
+      return sums;
783
+    },
784
+    // 左上角x的关闭
785
+    handleDialogClose() {
786
+      this.$refs["ruleForm"].resetFields();
787
+      for (let key in this.formState) {
788
+        this.formState[key] = "";
789
+      }
790
+      for (let key in this.formStateDEl) {
791
+        this.formState[key] = "";
792
+      }
793
+      this.tableDataSZ = [
794
+        { projectType: "1", quantity: "", amount: "" },
795
+        { projectType: "2", quantity: "", amount: "" },
796
+        { projectType: "3", quantity: "", amount: "" },
797
+        { projectType: "4", quantity: "", amount: "" },
798
+      ];
799
+      this.visible = false;
800
+      this.$emit("isVisible", false);
801
+    },
802
+  },
803
+};
804
+</script>
805
+<style lang="scss" scoped>
806
+/deep/.el-table .el-table__cell {
807
+  padding: 6px 0 !important;
808
+}
809
+
810
+/deep/.el-date-editor {
811
+  width: 100%;
812
+}
813
+
814
+/* 整个滚动条 */
815
+div::-webkit-scrollbar {
816
+  width: 8px;
817
+  /* 设置滚动条的宽度 */
818
+}
819
+
820
+/* 滚动条轨道 */
821
+div::-webkit-scrollbar-track {
822
+  background: #f1f1f1;
823
+  border-radius: 4px;
824
+  /* 设置轨道的背景颜色 */
825
+}
826
+
827
+/* 滚动条的滑块 */
828
+div::-webkit-scrollbar-thumb {
829
+  background: #888;
830
+  border-radius: 4px;
831
+  /* 设置滑块的背景颜色 */
832
+}
833
+
834
+.outbound-btn {
835
+  height: 200px;
836
+  margin-bottom: 36px;
837
+}
838
+
839
+.table-title {
840
+  float: right;
841
+  margin-bottom: 8px;
842
+}
843
+
844
+.tab-box {
845
+  height: 220px;
846
+  overflow-y: auto;
847
+}
848
+</style>

+ 255 - 0
src/page/APayment/index.vue

@@ -0,0 +1,255 @@
1
+<!-- 出库验收确认 -->
2
+<template>
3
+  <div class="content-main">
4
+    <div class="search-bm-boder">
5
+      <el-row>
6
+        <el-form
7
+          label-width="120px"
8
+          :inline="true"
9
+          class="demo-form-inline search-form"
10
+        >
11
+          <el-form-item>
12
+            <el-button
13
+              type="primary"
14
+              size="small"
15
+              icon="el-icon-plus"
16
+              @click="addData"
17
+              >新增</el-button
18
+            >
19
+            <el-divider direction="vertical"></el-divider>
20
+          </el-form-item>
21
+          <el-form-item label="合同编号:" prop="unitName">
22
+            <el-input
23
+              class="title-box"
24
+              autocomplete="off"
25
+              placeholder="请输入"
26
+              v-model="searchData.contractNumber"
27
+            />
28
+          </el-form-item>
29
+          <el-form-item>
30
+            <el-button
31
+              type="primary"
32
+              size="small"
33
+              icon="el-icon-plus"
34
+              @click="search"
35
+              >查询</el-button
36
+            >
37
+            <el-button
38
+              type="primary"
39
+              size="small"
40
+              icon="el-icon-plus"
41
+              @click="reset('searchForm')"
42
+              >重置</el-button
43
+            >
44
+          </el-form-item>
45
+        </el-form>
46
+      </el-row>
47
+    </div>
48
+    <!-- 表格 -->
49
+    <el-table
50
+      :data="tableData"
51
+      border
52
+      stripe
53
+      highlight-current-row
54
+      v-loading="listLoading"
55
+      style="width: 100%"
56
+    >
57
+      <el-table-column
58
+        align="center"
59
+        type="index"
60
+        width="60"
61
+        label="序号"
62
+      ></el-table-column>
63
+      <el-table-column
64
+        align="center"
65
+        prop="contractNumber"
66
+        label="合同编号"
67
+      ></el-table-column>
68
+      <el-table-column align="center" prop="totalNum" label="数量(公斤)">
69
+      </el-table-column>
70
+      <el-table-column
71
+        align="center"
72
+        prop="totalPrice"
73
+        label="金额(元)"
74
+      ></el-table-column>
75
+      <el-table-column
76
+        align="center"
77
+        prop="confirmNum"
78
+        label="确认数量(公斤)"
79
+      ></el-table-column>
80
+      <el-table-column
81
+        align="center"
82
+        prop="createdate"
83
+        label="创建日期"
84
+      ></el-table-column>
85
+      <el-table-column label="操作" align="center" width="320">
86
+        <template v-slot="scope">
87
+          <el-button
88
+            type="primary"
89
+            @click="editData(scope.row)"
90
+            size="small"
91
+            icon="el-icon-edit"
92
+            >编辑</el-button
93
+          >
94
+          <el-button
95
+            type="primary"
96
+            @click="viewData(scope.row)"
97
+            size="small"
98
+            icon="el-icon-view"
99
+            >查看</el-button
100
+          >
101
+          <el-popconfirm
102
+            title="确定删除吗?"
103
+            icon="el-icon-info"
104
+            icon-color="red"
105
+            @confirm="deleteList(scope.row)"
106
+          >
107
+            <el-button
108
+              type="primary"
109
+              size="small"
110
+              slot="reference"
111
+              icon="el-icon-delete"
112
+              >删除</el-button
113
+            >
114
+          </el-popconfirm>
115
+        </template>
116
+      </el-table-column>
117
+    </el-table>
118
+    <!-- 分页开始 -->
119
+    <div class="pag-right clearFix">
120
+      <el-pagination
121
+        class="right"
122
+        :current-page.sync="limit.page"
123
+        :page-size="limit.size"
124
+        :page-sizes="[10, 20, 30, 40]"
125
+        :total="limit.total"
126
+        @current-change="handleCurrentChangeTask"
127
+        @size-change="handleSizeChangeTask"
128
+        layout="total, sizes, prev, pager, next, jumper"
129
+        v-if="paginationShow"
130
+      ></el-pagination>
131
+    </div>
132
+    <MonthlyReport :dataObj="dataObj" @isVisible="isVisible" />
133
+  </div>
134
+</template>
135
+<script>
136
+import MonthlyReport from "./components/monthlyReport.vue";
137
+import { CRKYSQRlist, CRKYSQRdel } from "@/api/base/rotationApi.js";
138
+export default {
139
+  components: { MonthlyReport },
140
+  data() {
141
+    return {
142
+      listLoading: false,
143
+      paginationShow: true,
144
+      dataObj: {
145
+        visible: false,
146
+        titleText: "",
147
+        showLock: false,
148
+        isType: "",
149
+        lengthACC: 0,
150
+      },
151
+      searchData: {
152
+        contractNumber: "",
153
+      },
154
+      limit: {
155
+        page: 1,
156
+        size: 10,
157
+        total: 0,
158
+      },
159
+      tableData: [],
160
+    };
161
+  },
162
+
163
+  mounted() {
164
+    this.getList();
165
+  },
166
+
167
+  methods: {
168
+    getList() {
169
+      const userInfoJSON = JSON.parse(sessionStorage.getItem("userInfo"));
170
+      const obj = {
171
+        ...this.searchData,
172
+        orgId: userInfoJSON.orgId,
173
+        pageNum: this.limit.page,
174
+        pageSize: this.limit.size,
175
+      };
176
+      return CRKYSQRlist(obj).then((res) => {
177
+        this.tableData = [];
178
+        this.tableData = res.data.records;
179
+        this.limit.total = res.data.total;
180
+      });
181
+    },
182
+    // 查询
183
+    search() {
184
+      this.getList();
185
+    },
186
+    // 重置
187
+    reset() {
188
+      this.searchData.contractNumber = "";
189
+      this.getList();
190
+    },
191
+    // 新增
192
+    addData() {
193
+      this.dataObj.isType = "1";
194
+      this.dataObj.titleText = "新增";
195
+      // this.dataObj.lengthACC = this.tableData.length + 1
196
+      this.dataObj.visible = true;
197
+      this.dataObj.showLock = false;
198
+    },
199
+    // 编辑
200
+    editData(row) {
201
+      this.dataObj.id = row.id;
202
+      this.dataObj.isType = "2";
203
+      this.dataObj.titleText = "编辑";
204
+      this.dataObj.visible = true;
205
+      this.dataObj.showLock = false;
206
+    },
207
+    // 查看
208
+    viewData(row) {
209
+      this.dataObj.id = row.id;
210
+      this.dataObj.isType = "3";
211
+      this.dataObj.titleText = "查看";
212
+      this.dataObj.visible = true;
213
+      this.dataObj.showLock = true;
214
+    },
215
+    // 删除
216
+    deleteList(row) {
217
+      return CRKYSQRdel(row.id).then((res) => {
218
+        this.getList();
219
+      });
220
+    },
221
+    // 子组件传递
222
+    isVisible(val) {
223
+      this.dataObj.visible = val;
224
+      this.dataObj.showLock = val;
225
+      this.dataObj.titleText = "";
226
+      this.searchData.contractNumber = "";
227
+      this.getList();
228
+    },
229
+    // 分页
230
+    handleCurrentChangeTask(page) {
231
+      this.limit.page = page;
232
+      this.getList();
233
+    },
234
+    handleSizeChangeTask(size) {
235
+      this.limit.size = size;
236
+      this.getList();
237
+    },
238
+  },
239
+};
240
+</script>
241
+<style lang="scss" scoped>
242
+.hide-buttons .el-input-number__decrease,
243
+.hide-buttons .el-input-number__increase {
244
+  display: none;
245
+}
246
+
247
+.hide-buttons .el-input__inner {
248
+  text-align: left;
249
+  padding-left: 14px;
250
+  padding-right: 0;
251
+}
252
+.button_S {
253
+  margin-bottom: 10px;
254
+}
255
+</style>

+ 337 - 0
src/page/Amaintenance/components/monthlyReport.vue

@@ -0,0 +1,337 @@
1
+<template>
2
+  <div>
3
+    <el-dialog
4
+      :close-on-press-escape="false"
5
+      :visible.sync="visible"
6
+      :before-close="handleDialogClose"
7
+      :close-on-click-modal="false"
8
+      class="dialog-box"
9
+      width="86%"
10
+    >
11
+      <el-divider>{{ titleText }}</el-divider>
12
+      <el-form
13
+        label-width="150px"
14
+        :rules="rules"
15
+        ref="ruleForm"
16
+        :model="formState"
17
+      >
18
+        <el-row>
19
+          <el-col :span="8"
20
+            ><el-form-item label="利息单号" prop="standardName">
21
+              <el-input
22
+                class="title-box"
23
+                autocomplete="off"
24
+                :disabled="true"
25
+                v-model:value="formState.interestBillNo"
26
+              /> </el-form-item
27
+          ></el-col>
28
+          <el-col :span="8"
29
+            ><el-form-item label="日期" prop="year">
30
+              <!-- -MM-dd HH:mm:ss -->
31
+              <el-date-picker
32
+                v-model="formState.year"
33
+                value-format="yyyy-MM"
34
+                type="month"
35
+                :disabled="showLock"
36
+                placeholder="日期年月"
37
+              />
38
+            </el-form-item>
39
+          </el-col>
40
+          <el-col :span="8"
41
+            ><el-form-item label="农发行实收利息" prop="actualInterestReceived">
42
+              <el-input
43
+                class="title-box"
44
+                autocomplete="off"
45
+                :disabled="showLock"
46
+                v-model:value="formState.actualInterestReceived"
47
+              />
48
+            </el-form-item>
49
+          </el-col>
50
+          <el-col :span="8"
51
+            ><el-form-item label="对其他扣款" prop="otherDeduction">
52
+              <el-input
53
+                class="title-box"
54
+                autocomplete="off"
55
+                :disabled="showLock"
56
+                v-model:value="formState.otherDeduction"
57
+              />
58
+            </el-form-item>
59
+          </el-col>
60
+          <el-col :span="24"
61
+            ><el-form-item label="备注" prop="remark">
62
+              <el-input
63
+                type="textarea"
64
+                class="title-box"
65
+                autocomplete="off"
66
+                :disabled="showLock"
67
+                v-model:value="formState.remark"
68
+              />
69
+            </el-form-item>
70
+          </el-col>
71
+        </el-row>
72
+        <el-row>
73
+          <el-col style="height: 100px" :span="24"> </el-col>
74
+        </el-row>
75
+      </el-form>
76
+      <span slot="footer" class="dialog-footer">
77
+        <el-button v-if="this.isTypeData != '3'" @click="preserve"
78
+          >提交</el-button
79
+        >
80
+        <el-button @click="handleDialogClose">关闭</el-button>
81
+      </span>
82
+    </el-dialog>
83
+  </div>
84
+</template>
85
+<script>
86
+import {
87
+  reporting,
88
+  LXWHadd,
89
+  FYBZWHgetGrainVariety,
90
+  LXWHview,
91
+  LXWHput,
92
+} from "@/api/base/rotationApi.js";
93
+export default {
94
+  props: {
95
+    dataObj: {
96
+      type: Object,
97
+      default: () => ({}),
98
+    },
99
+  },
100
+  data() {
101
+    return {
102
+      tableData: [{ acc: new Date().getTime() }],
103
+      listLoading: false,
104
+      isTypeData: "",
105
+      showLock: false,
106
+      visible: false,
107
+      titleText: "",
108
+      orgId: null,
109
+      formState: {
110
+        id: "",
111
+        interestBillNo: "",
112
+        year: null,
113
+        actualInterestReceived: null,
114
+        otherDeduction: "",
115
+        remark: null,
116
+        month: null,
117
+        // standardValue: null,
118
+        // updatedate: "",
119
+        // updatename: "",
120
+      },
121
+      houseOptions: [],
122
+      rules: {
123
+        year: [{ required: true, message: "请输入或选择", trigger: "blur" }],
124
+        actualInterestReceived: [
125
+          { required: true, message: "请输入或选择", trigger: "blur" },
126
+        ],
127
+        otherDeduction: [
128
+          { required: true, message: "请输入或选择", trigger: "blur" },
129
+        ],
130
+      },
131
+    };
132
+  },
133
+  watch: {
134
+    dataObj: {
135
+      handler(val) {
136
+        this.titleText = val.titleText;
137
+        this.visible = val.visible;
138
+        this.showLock = val.showLock;
139
+        this.isTypeData = val.isType; //isType = 1是新增 2是编辑 3是查看
140
+        this.lengthACC = val.lengthACC;
141
+        this.$nextTick(() => {
142
+          if (val.isType == "1") {
143
+            this.getRpReportListData();
144
+            // this.formState.purchaseCode = this.getCurrentTimeWithPrefix();
145
+          }
146
+          if (val.isType == "2" || val.isType == "3") {
147
+            this.checkData();
148
+          }
149
+          // this.xialalbList();
150
+        });
151
+      },
152
+      // immediate: true,
153
+      deep: true,
154
+    },
155
+  },
156
+  mounted() {},
157
+
158
+  methods: {
159
+    getRpReportListData() {
160
+      const userInfoJSON = JSON.parse(sessionStorage.getItem("userInfo"));
161
+      this.orgId = userInfoJSON.orgId;
162
+    },
163
+
164
+    async xialalbList() {
165
+      const res = await FYBZWHgetGrainVariety();
166
+      this.houseOptions = res.data;
167
+      // grainVarietyName grainVarietyId
168
+    },
169
+
170
+    houseChanged(val) {},
171
+    // 保存
172
+    preserve() {
173
+      // 判断新增还是编辑  isType = 1是新增 2是编辑 3是查看
174
+      if (this.isTypeData === "1") {
175
+        this.$refs["ruleForm"].validate((valid) => {
176
+          if (valid) {
177
+            let del = this.formState.year.split("-");
178
+            this.formState.year = del[0];
179
+            this.formState.month = del[1];
180
+            let data = {
181
+              ...this.formState,
182
+              orgId: this.orgId,
183
+            };
184
+            delete data.interestBillNo;
185
+            delete data.id;
186
+            return LXWHadd(data).then((res) => {
187
+              this.handleDialogClose();
188
+            });
189
+          } else {
190
+            console.log("error submit!!");
191
+            return false;
192
+          }
193
+        });
194
+      } else if (this.isTypeData === "2") {
195
+        this.$refs["ruleForm"].validate((valid) => {
196
+          if (valid) {
197
+            let del = this.formState.year.split("-");
198
+            this.formState.year = del[0];
199
+            this.formState.month = del[1];
200
+            let obj = {
201
+              ...this.formState,
202
+              orgId: this.orgId,
203
+            };
204
+            return LXWHput(obj).then((res) => {
205
+              this.handleDialogClose();
206
+            });
207
+          } else {
208
+            console.log("error submit!!");
209
+            return false;
210
+          }
211
+        });
212
+      }
213
+    },
214
+    // 上报
215
+    reporting() {
216
+      // 判断新增还是编辑
217
+      if (this.isTypeData === "1") {
218
+        this.$refs["ruleForm"].validate((valid) => {
219
+          if (valid) {
220
+            let obj = {
221
+              reportGrainList: this.formState.warehousinglist,
222
+              orgId: this.orgId,
223
+              rpReportId: this.formState.rpReportId,
224
+              reportTime: this.formState.reportTime,
225
+              status: 1,
226
+            };
227
+            return reporting(obj).then((res) => {
228
+              this.handleDialogClose();
229
+            });
230
+          } else {
231
+            console.log("error submit!!");
232
+            return false;
233
+          }
234
+        });
235
+      } else if (this.isTypeData === "2") {
236
+        this.$refs["ruleForm"].validate((valid) => {
237
+          if (valid) {
238
+            let obj = {
239
+              id: this.dataObj.id,
240
+              reportGrainList: this.formState.warehousinglist,
241
+              orgId: this.orgId,
242
+              rpReportId: this.formState.rpReportId,
243
+              reportTime: this.formState.reportTime,
244
+              status: 1,
245
+            };
246
+            return reporting(obj).then((res) => {
247
+              this.handleDialogClose();
248
+            });
249
+          } else {
250
+            console.log("error submit!!");
251
+            return false;
252
+          }
253
+        });
254
+      }
255
+    },
256
+    //  查看
257
+    checkData() {
258
+      return LXWHview(this.dataObj.id).then((res) => {
259
+        this.formState.id = res.data.id;
260
+        this.formState.interestBillNo = res.data.interestBillNo;
261
+        this.formState.otherDeduction = res.data.otherDeduction;
262
+        this.formState.actualInterestReceived = res.data.otherDeduction;
263
+        this.formState.remark = res.data.remark;
264
+        this.formState.year = res.data.yearAndMonth;
265
+        // 因为在弹框关闭时候还是调用一次查看接口,避免出现新增时候数据渲染了需手动清空
266
+        if (!this.visible) {
267
+          for (let key in this.formState) {
268
+            this.formState[key] = "";
269
+          }
270
+        }
271
+      });
272
+    },
273
+    // getCurrentTimeWithPrefix() {
274
+    //   const currentDate = new Date();
275
+    //   const year = currentDate.getFullYear().toString();
276
+    //   const month = (currentDate.getMonth() + 1).toString().padStart(2, "0");
277
+    //   const day = currentDate.getDate().toString().padStart(2, "0");
278
+    //   const timePrefix = "ZC";
279
+    //   const currentTimeWithPrefix = `${timePrefix}${year}${month}${day}0${this.lengthACC}`;
280
+    //   return currentTimeWithPrefix;
281
+    // },
282
+    // 左上角x的关闭
283
+    handleDialogClose() {
284
+      this.$refs["ruleForm"].resetFields();
285
+      for (let key in this.formState) {
286
+        this.formState[key] = "";
287
+      }
288
+      this.visible = false;
289
+      this.$emit("isVisible", false);
290
+    },
291
+  },
292
+};
293
+</script>
294
+<style lang="scss" scoped>
295
+/deep/.el-table .el-table__cell {
296
+  padding: 6px 0 !important;
297
+}
298
+
299
+/deep/.el-date-editor {
300
+  width: 100%;
301
+}
302
+
303
+/* 整个滚动条 */
304
+div::-webkit-scrollbar {
305
+  width: 8px;
306
+  /* 设置滚动条的宽度 */
307
+}
308
+
309
+/* 滚动条轨道 */
310
+div::-webkit-scrollbar-track {
311
+  background: #f1f1f1;
312
+  border-radius: 4px;
313
+  /* 设置轨道的背景颜色 */
314
+}
315
+
316
+/* 滚动条的滑块 */
317
+div::-webkit-scrollbar-thumb {
318
+  background: #888;
319
+  border-radius: 4px;
320
+  /* 设置滑块的背景颜色 */
321
+}
322
+
323
+.outbound-btn {
324
+  height: 200px;
325
+  margin-bottom: 36px;
326
+}
327
+
328
+.table-title {
329
+  float: right;
330
+  margin-bottom: 8px;
331
+}
332
+
333
+.tab-box {
334
+  height: 220px;
335
+  overflow-y: auto;
336
+}
337
+</style>

+ 259 - 0
src/page/Amaintenance/index.vue

@@ -0,0 +1,259 @@
1
+<!-- 利息维护 -->
2
+<template>
3
+  <div class="content-main">
4
+    <div class="search-bm-boder">
5
+      <el-row>
6
+        <el-form
7
+          label-width="120px"
8
+          :inline="true"
9
+          class="demo-form-inline search-form"
10
+        >
11
+          <el-form-item>
12
+            <el-button
13
+              type="primary"
14
+              size="small"
15
+              icon="el-icon-plus"
16
+              @click="addData"
17
+              >新增</el-button
18
+            >
19
+            <el-divider direction="vertical"></el-divider>
20
+          </el-form-item>
21
+          <el-form-item label="利息单号:" prop="unitName">
22
+            <el-input
23
+              class="title-box"
24
+              autocomplete="off"
25
+              placeholder="请输入"
26
+              v-model="searchData.interestBillNo"
27
+            />
28
+          </el-form-item>
29
+          <el-form-item>
30
+            <el-button
31
+              type="primary"
32
+              size="small"
33
+              icon="el-icon-plus"
34
+              @click="search"
35
+              >查询</el-button
36
+            >
37
+            <el-button
38
+              type="primary"
39
+              size="small"
40
+              icon="el-icon-plus"
41
+              @click="reset('searchForm')"
42
+              >重置</el-button
43
+            >
44
+          </el-form-item>
45
+        </el-form>
46
+      </el-row>
47
+    </div>
48
+    <!-- 表格 -->
49
+    <el-table
50
+      :data="tableData"
51
+      border
52
+      stripe
53
+      highlight-current-row
54
+      v-loading="listLoading"
55
+      style="width: 100%"
56
+    >
57
+      <el-table-column
58
+        align="center"
59
+        type="index"
60
+        width="60"
61
+        label="序号"
62
+      ></el-table-column>
63
+      <el-table-column
64
+        align="center"
65
+        prop="interestBillNo"
66
+        label="利息单号"
67
+      ></el-table-column>
68
+      <el-table-column align="center" prop="yearAndMonth" label="日期">
69
+        <!-- <template v-slot="scope">
70
+          <div v-if="scope.row.standardType == 1">保管费用标准</div>
71
+          <div v-if="scope.row.standardType == 2">轮换费用标准</div>
72
+        </template> -->
73
+      </el-table-column>
74
+      <el-table-column
75
+        align="center"
76
+        prop="actualInterestReceived"
77
+        label="农发行实收利息"
78
+      ></el-table-column>
79
+      <el-table-column
80
+        align="center"
81
+        prop="otherDeduction"
82
+        label="其他扣款"
83
+      ></el-table-column>
84
+      <el-table-column
85
+        align="center"
86
+        prop="createdate"
87
+        label="创建时间"
88
+      ></el-table-column>
89
+      <el-table-column label="操作" align="center" width="320">
90
+        <template v-slot="scope">
91
+          <el-button
92
+            type="primary"
93
+            @click="editData(scope.row)"
94
+            size="small"
95
+            icon="el-icon-edit"
96
+            >编辑</el-button
97
+          >
98
+          <el-button
99
+            type="primary"
100
+            @click="viewData(scope.row)"
101
+            size="small"
102
+            icon="el-icon-view"
103
+            >查看</el-button
104
+          >
105
+          <el-popconfirm
106
+            title="确定删除吗?"
107
+            icon="el-icon-info"
108
+            icon-color="red"
109
+            @confirm="deleteList(scope.row)"
110
+          >
111
+            <el-button
112
+              type="primary"
113
+              size="small"
114
+              slot="reference"
115
+              icon="el-icon-delete"
116
+              >删除</el-button
117
+            >
118
+          </el-popconfirm>
119
+        </template>
120
+      </el-table-column>
121
+    </el-table>
122
+    <!-- 分页开始 -->
123
+    <div class="pag-right clearFix">
124
+      <el-pagination
125
+        class="right"
126
+        :current-page.sync="limit.page"
127
+        :page-size="limit.size"
128
+        :page-sizes="[10, 20, 30, 40]"
129
+        :total="limit.total"
130
+        @current-change="handleCurrentChangeTask"
131
+        @size-change="handleSizeChangeTask"
132
+        layout="total, sizes, prev, pager, next, jumper"
133
+        v-if="paginationShow"
134
+      ></el-pagination>
135
+    </div>
136
+    <MonthlyReport :dataObj="dataObj" @isVisible="isVisible" />
137
+  </div>
138
+</template>
139
+<script>
140
+import MonthlyReport from "./components/monthlyReport.vue";
141
+import { LXWHlist, LXWHdel } from "@/api/base/rotationApi.js";
142
+export default {
143
+  components: { MonthlyReport },
144
+  data() {
145
+    return {
146
+      listLoading: false,
147
+      paginationShow: true,
148
+      dataObj: {
149
+        visible: false,
150
+        titleText: "",
151
+        showLock: false,
152
+        isType: "",
153
+        lengthACC: 0,
154
+      },
155
+      searchData: {
156
+        interestBillNo: "",
157
+      },
158
+      limit: {
159
+        page: 1,
160
+        size: 10,
161
+        total: 0,
162
+      },
163
+      tableData: [],
164
+    };
165
+  },
166
+
167
+  mounted() {
168
+    this.getList();
169
+  },
170
+
171
+  methods: {
172
+    getList() {
173
+      const userInfoJSON = JSON.parse(sessionStorage.getItem("userInfo"));
174
+      const obj = {
175
+        ...this.searchData,
176
+        orgId: userInfoJSON.orgId,
177
+        pageNum: this.limit.page,
178
+        pageSize: this.limit.size,
179
+      };
180
+      return LXWHlist(obj).then((res) => {
181
+        this.tableData = [];
182
+        this.tableData = res.data.records;
183
+        this.limit.total = res.data.total;
184
+      });
185
+    },
186
+    // 查询
187
+    search() {
188
+      this.getList();
189
+    },
190
+    // 重置
191
+    reset() {
192
+      this.searchData.interestBillNo = "";
193
+      this.getList();
194
+    },
195
+    // 新增
196
+    addData() {
197
+      this.dataObj.isType = "1";
198
+      this.dataObj.titleText = "新增利息维护";
199
+      // this.dataObj.lengthACC = this.tableData.length + 1
200
+      this.dataObj.visible = true;
201
+      this.dataObj.showLock = false;
202
+    },
203
+    // 编辑
204
+    editData(row) {
205
+      this.dataObj.id = row.id;
206
+      this.dataObj.isType = "2";
207
+      this.dataObj.titleText = "编辑利息维护";
208
+      this.dataObj.visible = true;
209
+      this.dataObj.showLock = false;
210
+    },
211
+    // 查看
212
+    viewData(row) {
213
+      this.dataObj.id = row.id;
214
+      this.dataObj.isType = "3";
215
+      this.dataObj.titleText = "查看利息维护";
216
+      this.dataObj.visible = true;
217
+      this.dataObj.showLock = true;
218
+    },
219
+    // 删除
220
+    deleteList(row) {
221
+      return LXWHdel(row.id).then((res) => {
222
+        this.getList();
223
+      });
224
+    },
225
+    // 子组件传递
226
+    isVisible(val) {
227
+      this.dataObj.visible = val;
228
+      this.dataObj.showLock = val;
229
+      this.dataObj.titleText = "";
230
+      this.searchData.interestBillNo = "";
231
+      this.getList();
232
+    },
233
+    // 分页
234
+    handleCurrentChangeTask(page) {
235
+      this.limit.page = page;
236
+      this.getList();
237
+    },
238
+    handleSizeChangeTask(size) {
239
+      this.limit.size = size;
240
+      this.getList();
241
+    },
242
+  },
243
+};
244
+</script>
245
+<style lang="scss" scoped>
246
+.hide-buttons .el-input-number__decrease,
247
+.hide-buttons .el-input-number__increase {
248
+  display: none;
249
+}
250
+
251
+.hide-buttons .el-input__inner {
252
+  text-align: left;
253
+  padding-left: 14px;
254
+  padding-right: 0;
255
+}
256
+.button_S {
257
+  margin-bottom: 10px;
258
+}
259
+</style>

+ 0 - 1
src/page/CostStandard/index.vue

@@ -68,7 +68,6 @@
68 68
         prop="standardName"
69 69
         label="标准名称"
70 70
       ></el-table-column>
71
-      </el-table-column>
72 71
       <el-table-column
73 72
         align="center"
74 73
         prop="standardType"

+ 22 - 4
src/page/Layout/layout.vue

@@ -10,7 +10,12 @@
10 10
       <!-- <div class="project-title iconfont iconchubeiliangguanli"> 储备粮管理</div> -->
11 11
     </el-row>
12 12
     <el-row>
13
-      <el-col :span="4" :style="{ height: wrapHeight + 'px' }" id="nav">
13
+      <el-col
14
+        :span="4"
15
+        :style="{ height: wrapHeight + 'px' }"
16
+        id="nav"
17
+        class="menuList-wrap"
18
+      >
14 19
         <MenuList></MenuList>
15 20
       </el-col>
16 21
       <el-col :span="20" id="main" :style="{ height: wrapHeight + 'px' }">
@@ -44,8 +49,6 @@ export default {
44 49
     // Applications
45 50
   },
46 51
   data() {
47
-    const u = localStorage.getItem("_userName");
48
-    const p = localStorage.getItem("_password");
49 52
     return {
50 53
       id: this.$route.params.id,
51 54
       dat: {
@@ -55,9 +58,24 @@ export default {
55 58
       u: localStorage.getItem("_userName"),
56 59
       p: localStorage.getItem("_password"),
57 60
       clientHeight: document.documentElement.clientHeight,
58
-      url: `http://101.36.160.210:31055/crk/#/welcome?username=${u}&password=${p}`,
61
+      // url: `http://101.36.160.210:31055/crk/?k_username=${u}&k_password=${p}&code=1`,
62
+      // url: `http://59.220.179.234:80/#/welcome/?username=${u}&password=${p}&code=1`,
63
+      // url: `http://172.18.93.228:80/#/welcome?username=${u}&password=${p}`,
64
+      url: "",
59 65
     };
60 66
   },
67
+  created() {
68
+    const u = localStorage.getItem("_userName");
69
+    const p = localStorage.getItem("_password");
70
+    const isProd = process.env.NODE_ENV === "production";
71
+    // let url;
72
+    if (!isProd) {
73
+      // this.url = `http://101.36.160.210:31055/crk/#/welcome/?username=${u}&password=${p}`;
74
+      this.url = `http://101.36.160.210:31055/crk/?k_username=${u}&k_password=${p}`;
75
+    } else {
76
+      this.url = `http://172.18.93.228:80/#/welcome?username=${u}&password=${p}`;
77
+    }
78
+  },
61 79
   computed: {
62 80
     wrapHeight() {
63 81
       return this.clientHeight - 70 - 40;

+ 10 - 13
src/page/Layout/menuList/menuItem.vue

@@ -6,7 +6,7 @@
6 6
       :item="firstItem"
7 7
       :index="firstIndex + ''"
8 8
       @handle-select="handleSelect"
9
-      />
9
+    />
10 10
   </div>
11 11
 </template>
12 12
 
@@ -19,36 +19,34 @@ export default {
19 19
   name: "menuItem",
20 20
   props: {
21 21
     routeList: {
22
-      type: Array
23
-    }
22
+      type: Array,
23
+    },
24 24
   },
25
-  components: {MyMenuItem},
25
+  components: { MyMenuItem },
26 26
   data() {
27 27
     return {};
28 28
   },
29
-  created() {
30
-
31
-  },
29
+  created() {},
32 30
   methods: {
33 31
     handleSelect(item) {
34 32
       sessionStorage.setItem("searchData", null);
35 33
       sessionStorage.setItem("searchDataTab1", null);
36 34
       sessionStorage.setItem("pageData", null);
37 35
       sessionStorage.setItem("resourceCode", item.resourceCode);
38
-    }
39
-  }
36
+    },
37
+  },
40 38
 };
41 39
 </script>
42 40
 
43
-<style scoped>
41
+<style scoped lang="scss">
44 42
 .router-link-active {
45 43
   text-decoration: none;
46 44
 }
47 45
 .el-menu-item,
48 46
 .el-submenu /deep/ .el-submenu__title {
49 47
   margin: 1px 0;
50
-  background: url("../../../assets/wisdom_images/menuBottomLine.png") no-repeat
51
-    bottom;
48
+  /* background: url("../../../assets/wisdom_images/menuBottomLine.png") no-repeat
49
+    bottom; */
52 50
 }
53 51
 .iconStyle {
54 52
   color: #0357ab !important;
@@ -64,7 +62,6 @@ export default {
64 62
   padding-left: 55px !important;
65 63
 }
66 64
 .menuSecondary2 {
67
-
68 65
 }
69 66
 
70 67
 .menuSecondaryWrap2:before {

+ 30 - 17
src/page/Layout/menuList/menuList.vue

@@ -4,13 +4,22 @@
4 4
       <el-menu
5 5
         router
6 6
         :default-active="defaultActive"
7
+        :default-openeds="defaultOpened"
8
+        :background-color="theme.menuBg"
9
+        :text-color="theme.menuText"
10
+        :unique-opened="false"
11
+        active-text-color="#fff"
12
+      >
13
+        <!-- <el-menu
14
+        router
15
+        :default-active="defaultActive"
7 16
         class="el-menu-vertical-demo"
8 17
         background-color="#F4F5F8"
9 18
         text-color="#797979"
10 19
         active-text-color="#fff"
11 20
         :default-openeds="defaultOpened"
12 21
         :unique-opened="true"
13
-      >
22
+      > -->
14 23
         <Menu-item :routeList="routeList"></Menu-item>
15 24
       </el-menu>
16 25
     </el-scrollbar>
@@ -20,6 +29,7 @@
20 29
 <script>
21 30
 import MenuItem from "./menuItem";
22 31
 import { mapGetters } from "vuex";
32
+import theme from "@/style/theme.scss";
23 33
 
24 34
 export default {
25 35
   name: "menuList",
@@ -27,37 +37,40 @@ export default {
27 37
     return {
28 38
       routeList: [],
29 39
       defaultActive: "",
30
-      defaultOpened: ['0'],
40
+      defaultOpened: ["0"],
31 41
     };
32 42
   },
33 43
   components: {
34 44
     MenuItem,
35 45
   },
36 46
   computed: {
47
+    theme() {
48
+      return theme;
49
+    },
37 50
     ...mapGetters({
38 51
       leftMenuList: "leftMenuList",
39
-      defaultActiveUrl: 'defaultActiveUrl',
52
+      defaultActiveUrl: "defaultActiveUrl",
40 53
     }),
41
-    firstLevelName () {
42
-      if((! this.leftMenuList) || this.leftMenuList.length <= 0) return ''
43
-      return this.leftMenuList[0].resourceName
44
-    }
54
+    firstLevelName() {
55
+      if (!this.leftMenuList || this.leftMenuList.length <= 0) return "";
56
+      return this.leftMenuList[0].resourceName;
57
+    },
45 58
   },
46 59
   watch: {
47 60
     leftMenuList(n, o) {
48
-      this.defaultActive = this.defaultActiveUrl
49
-      this.routeList = n
50
-      console.log('菜单修改', n, this.defaultActive)
61
+      this.defaultActive = this.defaultActiveUrl;
62
+      this.routeList = n;
63
+      console.log("菜单修改", n, this.defaultActive);
51 64
     },
52 65
     defaultActiveUrl(n, o) {
53
-      this.defaultActive = this.defaultActiveUrl
54
-    }
66
+      this.defaultActive = this.defaultActiveUrl;
67
+    },
55 68
   },
56 69
   created() {
57 70
     // alert("99");
58 71
     // console.log(JSON.parse(sessionStorage.getItem('leftMenuList')))
59
-    this.routeList = this.routes()
60
-    console.log('left menu list', this.routeList)
72
+    this.routeList = this.routes();
73
+    console.log("left menu list", this.routeList);
61 74
     let href = window.location.href;
62 75
     // console.log(href, "href");
63 76
     // console.log(this.$route.path, "this.$route.path");
@@ -90,14 +103,14 @@ export default {
90 103
 };
91 104
 </script>
92 105
 
93
-<style scoped lang="scss">
106
+<style  lang="scss" scoped>
94 107
 .live-scrollbar {
95 108
   height: 100%;
96 109
 }
97 110
 
98 111
 /*   隐藏 横向滚动条*/
99
-.el-scrollbar /deep/ .el-scrollbar__wrap {
100
-  overflow-x: hidden;
112
+.el-scrollbar__wrap {
113
+  overflow-x: hidden !important;
101 114
 }
102 115
 .el-scrollbar /deep/ .is-horizontal {
103 116
   display: none;

+ 4 - 0
src/page/Layout/menuList/myMenuItem.vue

@@ -36,3 +36,7 @@ export default {
36 36
   }
37 37
 };
38 38
 </script>
39
+
40
+<style lang="scss" scoped>
41
+
42
+</style>

+ 20 - 7
src/page/basicData/components/cameraListEdit.vue

@@ -113,6 +113,15 @@
113 113
             </el-form-item>
114 114
           </el-col>
115 115
         </el-row>
116
+        <el-row type="flex" align="middle" justify="center" class="row">
117
+          <el-col :span="8">
118
+            <el-form-item label="摄像头唯一标识" prop="cameraIndexCode">
119
+              <el-input v-model="form.cameraIndexCode" :readonly="readonly"/>
120
+            </el-form-item>
121
+          </el-col>
122
+          <el-col :span="16">
123
+          </el-col>
124
+        </el-row>
116 125
         <el-divider> 硬盘录像机信息</el-divider>
117 126
         <div v-if="!readonly" class="btn-group">
118 127
           <el-button type="primary" icon="el-icon-plus" @click="add">添加</el-button>
@@ -194,7 +203,7 @@ export default {
194 203
     return {
195 204
       selectShow: false,
196 205
       tableData: [],
197
-      nvrId: null,
206
+
198 207
       defaultForm: {
199 208
         name: null,
200 209
         alias: null,
@@ -203,6 +212,7 @@ export default {
203 212
         password: null,
204 213
         ip: null,
205 214
         subnetmask: null,
215
+        nvrId: null,
206 216
         gateway: null,
207 217
         type: null,
208 218
         port: null,
@@ -215,11 +225,13 @@ export default {
215 225
         powerPosition: null,
216 226
         storehouseId: null,
217 227
         channelNumber: null,
228
+        cameraIndexCode: null,
218 229
       },
219 230
       rules: {
220 231
         name: simple_required, alias: simple_required, factory: simple_required,
221 232
         username: simple_required, password: simple_required, ip: simple_required,
222 233
         type: simple_required, port :simple_required, live: simple_required,
234
+        cameraIndexCode: simple_required,
223 235
       }
224 236
     }
225 237
   },
@@ -236,7 +248,7 @@ export default {
236 248
       if(resp.nvrEdit) {
237 249
         // resp.nvrEdit.channelNumber = ret.channelNumber
238 250
         this.tableData = [resp.nvrEdit]
239
-        this.nvrId = resp.nvrEdit.id
251
+        ret.nvrId = resp.nvrEdit.id
240 252
       }else {
241 253
         this.tableData = []
242 254
       }
@@ -247,10 +259,11 @@ export default {
247 259
         ... this.form ,
248 260
         orgId: this.orgId,
249 261
       }
250
-      return {
251
-        cameraJson: JSON.stringify(d),
252
-        nvrId: this.nvrId,
253
-      }
262
+      // return {
263
+      //   cameraJson: JSON.stringify(d),
264
+      //   nvrId: this.nvrId,
265
+      // }
266
+      return d
254 267
     },
255 268
     beforeSaveCheck() {
256 269
       if(this.tableData.length > 1) {
@@ -279,7 +292,7 @@ export default {
279 292
     },
280 293
 
281 294
     onSelect(data) {
282
-      this.nvrId = data.id
295
+      this.form.nvrId = data.id
283 296
       this.tableData.push(data)
284 297
     },
285 298
 

+ 51 - 29
src/page/basicData/components/warehouseListEdit.vue

@@ -71,7 +71,7 @@
71 71
           <template>
72 72
             <el-col :span="8">
73 73
               <el-form-item label="统一货位编码" prop="tyhwbm">
74
-                <el-input v-model="form.tyhwbm" :readonly="readonly || isEdit" />
74
+                <el-input v-model="form.tyhwbm" disabled placeholder="保存后生成" />
75 75
               </el-form-item>
76 76
             </el-col>
77 77
 
@@ -251,6 +251,7 @@ export default {
251 251
       orgNameDEl: "",
252 252
       aisleId: null,
253 253
       ajdh: null,
254
+      tyajbm: null,
254 255
       gaojOption: [],
255 256
       form: {
256 257
         warehouseCode: "",
@@ -263,13 +264,17 @@ export default {
263 264
         warehouseCode: number_data_del_tw,
264 265
         warehouseUseTime: simple_required,
265 266
         warehouseCapacity: simple_required,
266
-        tyhwbm: simple_required,
267
+        // tyhwbm: simple_required,
267 268
       },
268 269
     };
269 270
   },
270 271
   created() {},
271 272
   methods: {
272 273
     setUp() {
274
+      this.tyajbm = null
275
+      this.aisleId = null
276
+      this.ajdh = null
277
+      this.gaojOption = []
273 278
       this.initHouseIdNameMap("storehouseId");
274 279
       this.initOrgIdNameMap();
275 280
       this.initHouseOptions();
@@ -280,7 +285,13 @@ export default {
280 285
     parseResp(resp) {
281 286
       console.log("resp", resp);
282 287
       resp.houseName = parseInt(resp.houseName);
283
-      this.getFileAojianGet({ orgId: this.orgId, cfid: resp.storehouseId });
288
+      this.aisleId = resp.aisleId
289
+      this.getFileAojianGet({ unitId: this.orgId, storehouseId: resp.storehouseId, libraryType: 0 }).then(_ => {
290
+        const h = this.gaojOption.find((d) => d.id === resp.aisleId);
291
+        if(h) {
292
+          this.tyajbm = h.tyajbm
293
+        }
294
+      })
284 295
       return resp;
285 296
     },
286 297
 
@@ -310,9 +321,11 @@ export default {
310 321
         console.log("3333", h);
311 322
         this.ajmc = h.ajmc;
312 323
         this.ajdh = h.ajdh;
324
+        this.tyajbm = h.tyajbm
313 325
       }else {
314 326
         this.ajmc = null
315 327
         this.ajdh = null
328
+        this.tyajbm = null
316 329
       }
317 330
 
318 331
     },
@@ -365,6 +378,7 @@ export default {
365 378
       return {
366 379
         warehouseJson: JSON.stringify(data),
367 380
         fileIds: '[]',
381
+        tyajbm: this.tyajbm,
368 382
       };
369 383
     },
370 384
     checkWareCode() {
@@ -381,38 +395,46 @@ export default {
381 395
         })
382 396
       }
383 397
     },
398
+
399
+    async doSave() {
400
+      const data = this.getLocalData();
401
+
402
+      const fd = new FormData();
403
+      for (const key in data) {
404
+        fd.append(key, data[key]);
405
+      }
406
+
407
+      // console.log(fd.get("storehouseJson"));
408
+
409
+      const resp = await getFileAojianAddOrEdit(data);
410
+      if (resp.status === "success") {
411
+        this.$message.success("保存成功");
412
+        this.show = false;
413
+        this.$emit("on-save");
414
+      } else {
415
+        this.$message.error(resp.msg);
416
+      }
417
+    },
384 418
     save() {
385 419
 
386 420
       console.log("data", this.form);
387 421
       this.$refs.editForm.validate(async (ok) => {
388 422
         if (ok) {
389
-          findWareCode({
390
-            storehouseId: this.form.storehouseId,
391
-            warehouseCode: this.form.warehouseCode,
392
-            orgId: this.orgId,
393
-          }).then(async (resp) => {
394
-            if(resp == 0) {
395
-              return this.$message.error('货位编号已存在')
396
-            }else if(resp == 1) {
397
-              const data = this.getLocalData();
398
-
399
-              const fd = new FormData();
400
-              for (const key in data) {
401
-                fd.append(key, data[key]);
402
-              }
403
-
404
-              // console.log(fd.get("storehouseJson"));
405
-
406
-              const resp = await getFileAojianAddOrEdit(data);
407
-              if (resp.status === "success") {
408
-                this.$message.success("保存成功");
409
-                this.show = false;
410
-                this.$emit("on-save");
411
-              } else {
412
-                this.$message.error(resp.msg);
423
+          if(this.isAdd) {
424
+            findWareCode({
425
+              storehouseId: this.form.storehouseId,
426
+              warehouseCode: this.form.warehouseCode,
427
+              orgId: this.orgId,
428
+            }).then(async (resp) => {
429
+              if(resp == 0) {
430
+                return this.$message.error('货位编号已存在')
431
+              }else if(resp == 1) {
432
+                this.doSave()
413 433
               }
414
-            }
415
-          })
434
+            })
435
+          }else if(this.isEdit) {
436
+            this.doSave()
437
+          }
416 438
         }
417 439
       });
418 440
     },

+ 37 - 3
src/page/basicData/granaryList.vue

@@ -18,9 +18,18 @@
18 18
               @click="add"
19 19
               >新增</el-button
20 20
             >
21
-            <el-button type="primary" size="small" icon="el-icon-download"
22
-              >导入</el-button
21
+            <el-upload
22
+              style="display: inline-block"
23
+              accept=".xlsx"
24
+              :action="aojianImportUrl"
25
+              :before-upload="beforeImport"
26
+              :on-success="afterImport"
27
+              :show-file-list="false"
28
+              :data="{userInfo: JSON.stringify($store.state.user.userInfo), orgId: orgId, fileType: 'xlsx'}"
29
+              :limit="100"
23 30
             >
31
+              <el-button size="small" type="primary" icon="el-icon-download">导入</el-button>
32
+            </el-upload>
24 33
             <el-button type="primary" size="small" icon="el-icon-upload2">
25 34
               <template v-slot>
26 35
                 <a
@@ -158,6 +167,17 @@
158 167
       :edit-data="editData"
159 168
       @on-save="getList"
160 169
     />
170
+
171
+    <el-dialog
172
+      title="上传结果"
173
+      :visible.sync="uploadResultShow"
174
+      width="30%"
175
+    >
176
+      {{importMsg}}
177
+      <span slot="footer" class="dialog-footer">
178
+    <el-button type="primary" @click="uploadResultShow = false">确 定</el-button>
179
+  </span>
180
+    </el-dialog>
161 181
   </div>
162 182
 </template>
163 183
 
@@ -169,7 +189,7 @@ import {
169 189
   hasOrgName,
170 190
   houseAndWareQuery,
171 191
 } from "@/components/simpleList";
172
-import { granaryList, granaryRemove } from "@/api/base";
192
+import { granaryList, granaryRemove, aojianImportUrl } from "@/api/base";
173 193
 import edit from "./components/granaryListEdit.vue";
174 194
 
175 195
 export default {
@@ -178,6 +198,9 @@ export default {
178 198
   components: { edit },
179 199
   data() {
180 200
     return {
201
+      aojianImportUrl,
202
+      uploadResultShow: false,
203
+      importMsg: null,
181 204
       form: {
182 205
         storeName: null,
183 206
         ajmc: null,
@@ -191,6 +214,17 @@ export default {
191 214
       this.initHouseOptions();
192 215
       this.initHouseIdNameMap("vcfcode", "storehouseCode");
193 216
     },
217
+    beforeImport() {
218
+      this.listLoading = true
219
+    },
220
+    afterImport(response, file, fileList) {
221
+      if(response) {
222
+        this.importMsg = response
223
+        this.uploadResultShow = true
224
+      }
225
+      this.listLoading = false
226
+      this.getList()
227
+    },
194 228
     // 删除 id
195 229
     getDelParams(data) {
196 230
       return data.id;

+ 4 - 2
src/page/basicData/storehouseList.vue

@@ -273,8 +273,10 @@ export default {
273 273
       this.listLoading = true
274 274
     },
275 275
     afterImport(response, file, fileList) {
276
-      this.importMsg = response
277
-      this.uploadResultShow = true
276
+      if(response) {
277
+        this.importMsg = response
278
+        this.uploadResultShow = true
279
+      }
278 280
       this.listLoading = false
279 281
       this.getList()
280 282
     },

+ 4 - 2
src/page/basicData/warehouseList.vue

@@ -219,8 +219,10 @@ export default {
219 219
       this.listLoading = true
220 220
     },
221 221
     afterImport(response, file, fileList) {
222
-      this.importMsg = response
223
-      this.uploadResultShow = true
222
+      if(response) {
223
+        this.importMsg = response
224
+        this.uploadResultShow = true
225
+      }
224 226
       this.listLoading = false
225 227
       this.getList()
226 228
     },

+ 16 - 1
src/page/contractsManagement/components/contractsEdit/index.vue

@@ -414,6 +414,8 @@ export default {
414 414
         contractType: simple_required,
415 415
         signingTime: simple_required,
416 416
         customerName: simple_required,
417
+        moneyQuantity: simple_required,
418
+        grainQuantity: simple_required,
417 419
       },
418 420
       rawData: null,
419 421
       canSave: false,
@@ -515,6 +517,9 @@ export default {
515 517
       this.rawData = data
516 518
       this.loading = false
517 519
       this.form = data.contract
520
+      data.storeWareDetailList.forEach(d => {
521
+        d.key = this.$systemUtils.genKey()
522
+      })
518 523
       this.grainInfoList = data.storeWareDetailList
519 524
       console.log('合同获取数据', data)
520 525
       if(data.contract.attachment) {
@@ -626,6 +631,9 @@ export default {
626 631
           return list
627 632
         })
628 633
       }).then(list => {
634
+        list.forEach(d => {
635
+          d.key = this.$systemUtils.genKey()
636
+        })
629 637
         this.grainInfoList = list
630 638
       }).finally(_ => {
631 639
         this.planSelectShow = false
@@ -708,12 +716,19 @@ export default {
708 716
     doSave() {
709 717
       const contractJson = JSON.stringify(this.getLocalData())
710 718
       let details = []
719
+      let tableRef
711 720
       if(this.isInContract) {
721
+        tableRef = this.$refs.inTable
712 722
         details = this.$refs.inTable.getTableData()
713 723
       }else {
724
+        tableRef = this.$refs.outTable
714 725
         details = this.$refs.outTable.getTableData()
715 726
       }
716
-      if(details.length <= 0) return this.$message.error('必须填写一条计划详情信息')
727
+      if(! tableRef.checkInput()) return Promise.reject()
728
+      if(details.length <= 0) {
729
+        this.$message.error('必须填写一条计划详情信息')
730
+        return Promise.reject()
731
+      }
717 732
       const delKeys = ['basic_storehouse_id', 'warehouse_id', 'key', 'inspection_report_id']
718 733
       details.forEach(d => {
719 734
         if(this.isAdd) {

+ 15 - 1
src/page/contractsManagement/components/planDetailTableIn.vue

@@ -54,7 +54,7 @@
54 54
         <el-button
55 55
           type="primary"
56 56
           size="small"
57
-          @click="del(scope)"
57
+          @click="del(scope.row)"
58 58
         >删除</el-button>
59 59
       </template>
60 60
     </el-table-column>
@@ -139,6 +139,7 @@ export default {
139 139
     del(data) {
140 140
       if(this.readonly) return
141 141
       this.tableData = this.tableData.filter(d => d.key !== data.key)
142
+      this.calTotal()
142 143
       // const index = data.$index
143 144
       // this.$emit('on-del', index)
144 145
     },
@@ -150,6 +151,19 @@ export default {
150 151
     },
151 152
     calOutTotal(data) {
152 153
       return calOutTotal(data)
154
+    },
155
+    checkInput() {
156
+      const w = this.tableData.find(d => {
157
+        const isBlank = this.$systemUtils.isBlank(d.inPrice)
158
+        const isNull = d.inPrice === null || d.inPrice === undefined || d.inPrice === ''
159
+        const isNan = isNaN(d.inPrice)
160
+        return isNull || isNan || isBlank
161
+      })
162
+      if(w) {
163
+        this.$message.warning('您有单价没有正确输出, 请重新填写')
164
+        return false
165
+      }
166
+      return true
153 167
     }
154 168
   }
155 169
 }

+ 15 - 1
src/page/contractsManagement/components/planDetailTableOut.vue

@@ -72,7 +72,7 @@
72 72
         <el-button
73 73
           type="primary"
74 74
           size="small"
75
-          @click="del(scope)"
75
+          @click="del(scope.row)"
76 76
         >删除</el-button>
77 77
       </template>
78 78
     </el-table-column>
@@ -182,6 +182,7 @@ export default {
182 182
     del(data) {
183 183
       if(this.readonly) return
184 184
       this.tableData = this.tableData.filter(d => d.key !== data.key)
185
+      this.calTotal()
185 186
       // const index = data.$index
186 187
       // this.$emit('on-del', data)
187 188
     },
@@ -193,6 +194,19 @@ export default {
193 194
     },
194 195
     calOutTotal(data) {
195 196
       return calOutTotal(data)
197
+    },
198
+    checkInput() {
199
+      const w = this.tableData.find(d => {
200
+        const isBlank = this.$systemUtils.isBlank(d.outPrice)
201
+        const isNull = d.outPrice === null || d.outPrice === undefined || d.outPrice === ''
202
+        const isNan = isNaN(d.outPrice)
203
+        return isNull || isNan || isBlank
204
+      })
205
+      if(w) {
206
+        this.$message.warning('您有单价没有正确输出, 请重新填写')
207
+        return false
208
+      }
209
+      return true
196 210
     }
197 211
   }
198 212
 }

+ 4 - 3
src/page/deviceManagement/components/deviceGetEdit.vue

@@ -206,9 +206,10 @@ export default {
206 206
       }
207 207
       d.model = d.sbggxh
208 208
       this.$systemUtils.deleteField(d, ['ssfl', 'sbsl', 'sbyqmc', 'sbggxh'])
209
-      return {
210
-        deviceGetJson: JSON.stringify(d)
211
-      }
209
+      // return {
210
+      //   deviceGetJson: JSON.stringify(d)
211
+      // }
212
+      return d
212 213
     },
213 214
     beforeSaveCheck() {
214 215
       if(this.form.getCount > this.form.sbsl) return Promise.reject('领用数量不能超过可用数量')

+ 4 - 3
src/page/deviceManagement/components/deviceGetReturn.vue

@@ -100,9 +100,10 @@ export default {
100 100
       }
101 101
       d.id = this.editData.id
102 102
       this.$systemUtils.parseField2Float(d, ['backCount', 'brokenCount'])
103
-      return {
104
-        deviceBackJson: JSON.stringify(d)
105
-      }
103
+      // return {
104
+      //   deviceBackJson: JSON.stringify(d)
105
+      // }
106
+      return d
106 107
     },
107 108
     beforeSaveCheck() {
108 109
       if(this.form.brokenCount > this.form.backCount) return Promise.reject('损坏数量不能大于归还数量')

+ 24 - 22
src/page/deviceManagement/components/inventoryEdit.vue

@@ -1,7 +1,6 @@
1 1
 <template>
2 2
   <el-dialog :visible.sync="show" width="70%" append-to-body>
3 3
     <div v-loading="loading">
4
-      <div style="text-align: center;"><h1>季度详情</h1></div>
5 4
       <el-form ref="editForm" :model="form" :rules="rules" label-width="150px">
6 5
         <el-divider>基本信息</el-divider>
7 6
         <el-row type="flex" align="middle" justify="center" class="row">
@@ -26,8 +25,8 @@
26 25
         </el-row>
27 26
         <el-row type="flex" align="middle" justify="center" class="row">
28 27
           <el-col :span="12">
29
-            <el-form-item label="设备编号" prop="check_number">
30
-              <el-select v-model="form.check_number" clearable placeholder="请选择" @change="noChange" :disabled="readonly">
28
+            <el-form-item label="设备编号" prop="checkNumber">
29
+              <el-select v-model="form.checkNumber" clearable placeholder="请选择" @change="noChange" :disabled="readonly">
31 30
                 <el-option
32 31
                   v-for="item in noOptions"
33 32
                   :key="item.value"
@@ -38,8 +37,8 @@
38 37
             </el-form-item>
39 38
           </el-col>
40 39
           <el-col :span="12">
41
-            <el-form-item label="负责人" prop="check_person">
42
-              <el-input v-model="form.check_person" :readonly="readonly"/>
40
+            <el-form-item label="负责人" prop="checkPerson">
41
+              <el-input v-model="form.checkPerson" :readonly="readonly"/>
43 42
             </el-form-item>
44 43
           </el-col>
45 44
         </el-row>
@@ -73,20 +72,20 @@
73 72
           ></el-table-column>
74 73
           <el-table-column
75 74
             align="center"
76
-            prop="really_count"
75
+            prop="reallyCount"
77 76
             label="实际库存数量"
78 77
           >
79 78
             <template v-slot="scope">
80
-              <el-input v-model="form.really_count" :readonly="readonly" />
79
+              <el-input v-model="form.reallyCount" :readonly="readonly" />
81 80
             </template>
82 81
           </el-table-column>
83 82
           <el-table-column
84 83
             align="center"
85
-            prop="check_result"
84
+            prop="checkResult"
86 85
             label="盘点情况"
87 86
           >
88 87
             <template v-slot="scope">
89
-              <el-select v-model="form.check_result" clearable placeholder="请选择" :disabled="readonly">
88
+              <el-select v-model="form.checkResult" clearable placeholder="请选择" :disabled="readonly">
90 89
                 <el-option
91 90
                   v-for="(item, index) in ['盘盈', '盘亏', '账实相符']"
92 91
                   :key="index"
@@ -158,7 +157,7 @@ export default {
158 157
       const enumId = n === '1' ? 5476 : 5475
159 158
       this.options = []
160 159
       this.deviceEnumId = null
161
-      this.form.device_name = null
160
+      this.form.deviceName = null
162 161
       this.$enumUtils.getTreeDataByEnumId(enumId).then(opts => {
163 162
         this.options = opts
164 163
       }).finally(() => {
@@ -226,14 +225,16 @@ export default {
226 225
       }
227 226
     },
228 227
     resetForm() {
228
+      this.ssfl = null
229
+      this.deviceEnumId = null
229 230
       this.form = {
230
-        device_name: null,
231
-        check_number: null,
232
-        store_count: null,
233
-        really_count: null,
234
-        check_result: null,
231
+        deviceName: null,
232
+        checkNumber: null,
233
+        storeCount: null,
234
+        reallyCount: null,
235
+        checkResult: null,
235 236
         reason: null,
236
-        check_person: null,
237
+        checkPerson: null,
237 238
         model: null,
238 239
       }
239 240
     },
@@ -241,7 +242,7 @@ export default {
241 242
       const opt = this.getOption(id, this.options)
242 243
       console.log('名称变化', id, opt, this.options)
243 244
       this.noOptions = []
244
-      this.form.device_name = opt.label
245
+      this.form.deviceName = opt.label
245 246
       if(opt) {
246 247
         this.loading = true
247 248
         getDeviceName({orgId: this.orgId, sbyqmc: opt.label}).then(list => {
@@ -261,7 +262,7 @@ export default {
261 262
       this.loading = true
262 263
       getByDeviceCode({orgId: this.orgId, sbbh: id}).then(resp => {
263 264
         this.form.model = resp.sbggxh
264
-        this.form.store_count = resp.sbsl
265
+        this.form.storeCount = resp.sbsl
265 266
 
266 267
         this.tableData = [
267 268
           {
@@ -279,10 +280,11 @@ export default {
279 280
         ... this.form,
280 281
         orgId: this.orgId,
281 282
       }
282
-      return {
283
-        deviceCheckJson: JSON.stringify(data),
284
-        type: 'add'
285
-      }
283
+      // return {
284
+      //   deviceCheckJson: JSON.stringify(data),
285
+      //   type: 'add'
286
+      // }
287
+      return data
286 288
     },
287 289
     getOption(id, items) {
288 290
       for (let i = 0; i < items.length; i++) {

+ 4 - 3
src/page/deviceManagement/components/maintenanceEdit.vue

@@ -162,9 +162,10 @@ export default {
162 162
         ... this.form,
163 163
         orgId: this.orgId,
164 164
       }
165
-      return {
166
-        deviceAddJson: JSON.stringify(d)
167
-      }
165
+      // return {
166
+      //   deviceAddJson: JSON.stringify(d)
167
+      // }
168
+      return d
168 169
     },
169 170
     getSaveFun() {
170 171
       return deviceKeepSave

+ 4 - 3
src/page/deviceManagement/components/repairEdit.vue

@@ -178,9 +178,10 @@ export default {
178 178
         orgId: this.orgId,
179 179
       }
180 180
       this.$systemUtils.parseField2Float(d, ['repairNumber', 'repairSumnumber'])
181
-      return {
182
-        deviceRepairJson: JSON.stringify(d)
183
-      }
181
+      // return {
182
+      //   deviceRepairJson: JSON.stringify(d)
183
+      // }
184
+      return d
184 185
     },
185 186
     getSaveFun() {
186 187
       return deviceRepairSave

+ 2 - 0
src/page/deviceManagement/deviceGet.vue

@@ -83,10 +83,12 @@
83 83
       ></el-table-column>
84 84
       <el-table-column
85 85
         align="center"
86
+        prop="bookKeeper"
86 87
         label="记账人"
87 88
       ></el-table-column>
88 89
       <el-table-column
89 90
         align="center"
91
+        prop="handler"
90 92
         label="经手人"
91 93
       ></el-table-column>
92 94
       <el-table-column label="操作" align="center" width="80">

+ 6 - 6
src/page/deviceManagement/inventory.vue

@@ -78,11 +78,11 @@
78 78
         prop="checkDate"
79 79
         label="盘点时间"
80 80
       ></el-table-column>
81
-      <el-table-column label="操作" align="center" width="80">
82
-        <template slot-scope="scope">
81
+<!--      <el-table-column label="操作" align="center" width="80">-->
82
+<!--        <template slot-scope="scope">-->
83 83
 
84
-        </template>
85
-      </el-table-column>
84
+<!--        </template>-->
85
+<!--      </el-table-column>-->
86 86
     </el-table>
87 87
     <!-- 分页开始 -->
88 88
     <div class="pag-right clearFix">
@@ -111,7 +111,7 @@
111 111
 
112 112
 import commonSelect from "@/components/common/commonSelect"
113 113
 import edit from "./components/inventoryEdit.vue";
114
-import {deviceCheckList, getCheckListNoPage} from "@/api/deviceManagement";
114
+import {deviceCheckList, getCheckListNoPage, checkListRemove} from "@/api/deviceManagement";
115 115
 import {mapGetters} from "vuex";
116 116
 
117 117
 
@@ -181,7 +181,7 @@ export default {
181 181
       this.addShow = true
182 182
     },
183 183
     del(data) {
184
-      removeAgentTemperature(data.id).then(resp => {
184
+      checkListRemove(data.id).then(resp => {
185 185
         if(resp.status === 'success') {
186 186
           this.$message.success('删除成功')
187 187
           this.getList()

+ 7 - 3
src/page/deviceManagement/maintenance.vue

@@ -87,6 +87,7 @@
87 87
             icon="el-icon-video-pause"
88 88
           >查看</el-button>
89 89
           <el-button
90
+            v-if="!scope.row.keepEnd"
90 91
             type="primary"
91 92
             @click="end(scope.row)"
92 93
             size="small"
@@ -226,10 +227,13 @@ export default {
226 227
       })
227 228
     },
228 229
     end(data) {
230
+      // const d = {
231
+      //   deviceListJson: JSON.stringify({
232
+      //     id: data.id
233
+      //   })
234
+      // }
229 235
       const d = {
230
-        deviceListJson: JSON.stringify({
231
-          id: data.id
232
-        })
236
+        id: data.id
233 237
       }
234 238
       deviceKeepEnd(d).then(resp => {
235 239
         if(resp.status === 'success') {

+ 6 - 3
src/page/deviceManagement/repair.vue

@@ -215,10 +215,13 @@ export default {
215 215
       })
216 216
     },
217 217
     end(data) {
218
+      // const d = {
219
+      //   deviceListJson: JSON.stringify({
220
+      //     id: data.id
221
+      //   })
222
+      // }
218 223
       const d = {
219
-        deviceListJson: JSON.stringify({
220
-          id: data.id
221
-        })
224
+        id: data.id
222 225
       }
223 226
       deviceRepairEnd(d).then(resp => {
224 227
         if(resp.status === 'success') {

+ 1 - 1
src/page/granaryComprehensiveExhibition/granaryLive.vue

@@ -7,7 +7,7 @@
7 7
 <script>
8 8
 
9 9
 import commonSelect from "@/components/common/commonSelect"
10
-import live from "@/components/common/player/live"
10
+import live from "@/components/common/player/live_v2.vue"
11 11
 
12 12
 export default {
13 13
   name: "granaryLive",

+ 75 - 0
src/page/granaryComprehensiveExhibition/granaryReplay.vue

@@ -0,0 +1,75 @@
1
+<template>
2
+  <div class="content-main">
3
+    <replay :show-camera-control="true"></replay>
4
+  </div>
5
+</template>
6
+
7
+<script>
8
+
9
+import commonSelect from "@/components/common/commonSelect"
10
+import replay from "@/components/common/player/playback_v2.vue"
11
+
12
+export default {
13
+  name: "granaryReplay",
14
+  components: {
15
+    replay,
16
+    commonSelect,
17
+  },
18
+  data() {
19
+    return {
20
+      limit: {
21
+        page: 1,
22
+        size: 10,
23
+        total: 0
24
+      },
25
+      tableData: [],
26
+      form: {
27
+        type: null,
28
+        status: null,
29
+        name: null,
30
+      },
31
+      paginationShow: true,
32
+      listLoading: false,
33
+      inOutType: 'in',
34
+      notificationType: 'grain',
35
+      addShow: false,
36
+      addShowCookingOil: false,
37
+    }
38
+  },
39
+  computed: {
40
+
41
+  },
42
+  methods: {
43
+    search() {
44
+
45
+    },
46
+    reset(formName) {
47
+      if(this.$refs[formName]) {
48
+        this.$refs[formName].resetFields()
49
+      }
50
+    },
51
+    add() {
52
+      this.addShow = true
53
+
54
+    },
55
+    manage(data) {
56
+
57
+    },
58
+    handleCurrentChangeTask() {
59
+
60
+    },
61
+    handleSizeChangeTask() {
62
+
63
+    }
64
+  }
65
+}
66
+</script>
67
+
68
+<style scoped lang="scss">
69
+.small-field {
70
+  width: 150px;
71
+}
72
+.small-date {
73
+  width: 250px;
74
+}
75
+</style>

+ 83 - 48
src/page/home.vue

@@ -1,12 +1,14 @@
1 1
 <template>
2
-  <div class="content-main multi-column">
2
+  <div class="content-main multi-column" v-if="$store.state.flag == 2">
3 3
     <div class="column aside-column full-column">
4 4
       <el-card class="box-card">
5 5
         <div slot="header" class="clearfix">
6 6
           <span>待办事项</span>
7 7
         </div>
8 8
         <div class="text item">
9
-          <span class="todoTips" @click="goTodo">智能粮库待办事项 <span style="color: red;">0</span> 条</span>
9
+          <span class="todoTips" @click="goTodo"
10
+            >智能粮库待办事项 <span style="color: red">0</span> 条</span
11
+          >
10 12
         </div>
11 13
       </el-card>
12 14
       <el-card class="box-card">
@@ -28,40 +30,50 @@
28 30
     </div>
29 31
     <div class="column main-column full-column">
30 32
       <div class="main-top">
31
-        <div class="left" style="height: auto;display: flex;flex-direction: column">
33
+        <div
34
+          class="left"
35
+          style="height: auto; display: flex; flex-direction: column"
36
+        >
32 37
           <div class="welcome">
33 38
             <el-card class="box-card">
34
-              <div class="welcome-title"> {{ welcome }} <span style="margin-left: 5px;"> {{ $dateUtils.formatNow() }} </span></div>
39
+              <div class="welcome-title">
40
+                {{ welcome }}
41
+                <span style="margin-left: 5px">
42
+                  {{ $dateUtils.formatNow() }}
43
+                </span>
44
+              </div>
35 45
             </el-card>
36 46
           </div>
37 47
           <el-image
38 48
             v-if="birdsEye"
39 49
             :src="birdsEye"
40
-            style="max-height:520px;flex: 1"
41
-            fit="fill"></el-image>
42
-<!--          <el-tabs type="border-card" style="min-height: 500px;">-->
43
-<!--            <el-tab-pane label="粮情">-->
44
-<!--              <div style="width: 100%; height: 100%; display: flex; justify-content: center; align-items: center;">-->
45
-<!--              -->
46
-<!--              </div>-->
47
-<!--            </el-tab-pane>-->
48
-<!--&lt;!&ndash;            <el-tab-pane label="监控"></el-tab-pane>&ndash;&gt;-->
49
-<!--          </el-tabs>-->
50
+            style="max-height: 520px; flex: 1"
51
+            fit="fill"
52
+          ></el-image>
53
+          <!--          <el-tabs type="border-card" style="min-height: 500px;">-->
54
+          <!--            <el-tab-pane label="粮情">-->
55
+          <!--              <div style="width: 100%; height: 100%; display: flex; justify-content: center; align-items: center;">-->
56
+          <!--              -->
57
+          <!--              </div>-->
58
+          <!--            </el-tab-pane>-->
59
+          <!--&lt;!&ndash;            <el-tab-pane label="监控"></el-tab-pane>&ndash;&gt;-->
60
+          <!--          </el-tabs>-->
50 61
         </div>
51 62
         <div class="right">
52 63
           <el-card class="box-card">
53 64
             <div slot="header" class="clearfix">
54 65
               <span>当前作业</span>
55 66
             </div>
56
-            <div class="text item">
57
-            </div>
67
+            <div class="text item"></div>
58 68
           </el-card>
59 69
           <el-card class="box-card">
60 70
             <div slot="header" class="clearfix">
61 71
               <span>库存/库容比</span>
62 72
             </div>
63 73
             <div class="text item">
64
-              <el-image :src="require('@/assets/wisdom_images/chart1.png')"></el-image>
74
+              <el-image
75
+                :src="require('@/assets/wisdom_images/chart1.png')"
76
+              ></el-image>
65 77
             </div>
66 78
           </el-card>
67 79
           <el-card class="box-card">
@@ -69,7 +81,9 @@
69 81
               <span>储粮等级(单位: 吨)</span>
70 82
             </div>
71 83
             <div class="text item">
72
-              <el-image :src="require('@/assets/wisdom_images/chart2.png')"></el-image>
84
+              <el-image
85
+                :src="require('@/assets/wisdom_images/chart2.png')"
86
+              ></el-image>
73 87
             </div>
74 88
           </el-card>
75 89
         </div>
@@ -80,7 +94,9 @@
80 94
             <span>五温曲线图</span>
81 95
           </div>
82 96
           <div class="text item">
83
-            <el-image :src="require('@/assets/wisdom_images/chart3.png')"></el-image>
97
+            <el-image
98
+              :src="require('@/assets/wisdom_images/chart3.png')"
99
+            ></el-image>
84 100
           </div>
85 101
         </el-card>
86 102
         <el-card class="box-card">
@@ -88,32 +104,40 @@
88 104
             <span>粮食品种(单位: 吨)</span>
89 105
           </div>
90 106
           <div class="text item">
91
-            <el-image :src="require('@/assets/wisdom_images/chart3.png')"></el-image>
107
+            <el-image
108
+              :src="require('@/assets/wisdom_images/chart3.png')"
109
+            ></el-image>
92 110
           </div>
93 111
         </el-card>
94 112
       </div>
95 113
     </div>
96 114
   </div>
115
+  <div v-else class="content-wrap" style="width: 100vw; height: 86vh">
116
+    <iframe
117
+      id="iframeContainer"
118
+      :src="url"
119
+      style="width: 100%; height: 100%"
120
+    ></iframe>
121
+  </div>
97 122
 </template>
98 123
 
99 124
 <script>
100
-
101
-import commonSelect from "@/components/common/commonSelect"
102
-import { mapGetters } from 'vuex'
103
-import {depotImageList} from "@/api/system";
125
+import commonSelect from "@/components/common/commonSelect";
126
+import { mapGetters } from "vuex";
127
+import { depotImageList } from "@/api/system";
104 128
 export default {
105 129
   name: "home",
106 130
   components: {
107
-    commonSelect
131
+    commonSelect,
108 132
   },
109 133
   data() {
110 134
     return {
111
-      welcome: '',
112
-      desc: '',
135
+      welcome: "",
136
+      desc: "",
113 137
       limit: {
114 138
         page: 1,
115 139
         size: 10,
116
-        total: 0
140
+        total: 0,
117 141
       },
118 142
       depotImages: [],
119 143
       tableData: [],
@@ -125,33 +149,46 @@ export default {
125 149
       listLoading: false,
126 150
       addShow: false,
127 151
       birdsEye: null,
152
+      url: "",
153
+    };
154
+  },
155
+  created() {
156
+    const u = localStorage.getItem("_userName");
157
+    const p = localStorage.getItem("_password");
158
+    const isProd = process.env.NODE_ENV === "production";
159
+    // let url;
160
+    if (!isProd) {
161
+      // this.url = `http://101.36.160.210:31055/crk/#/welcome/?username=${u}&password=${p}`;
162
+       this.url = `http://101.36.160.210:31055/crk/?k_username=${u}&k_password=${p}`;
163
+    } else {
164
+      this.url = `http://172.18.93.228:80/#/welcome?username=${u}&password=${p}`;
128 165
     }
129 166
   },
130 167
   computed: {
131
-    ...mapGetters(['orgName', 'orgId']),
168
+    ...mapGetters(["orgName", "orgId"]),
132 169
   },
133 170
   mounted() {
134
-    this.welcome = this.orgName + '欢迎您'
135
-    this.desc = this.$store.state.user.orgInfo.briefIntroduction
136
-    const orgInfo = JSON.parse(sessionStorage.getItem('orgInfo'))
137
-    console.log('orgInfo', orgInfo)
138
-    this.birdsEye = orgInfo.birdsEye
139
-    this.getDeopImages()
171
+    this.welcome = this.orgName + "欢迎您";
172
+    this.desc = this.$store.state.user.orgInfo.briefIntroduction;
173
+    const orgInfo = JSON.parse(sessionStorage.getItem("orgInfo"));
174
+    console.log("orgInfo", orgInfo);
175
+    this.birdsEye = orgInfo.birdsEye;
176
+    this.getDeopImages();
140 177
   },
141 178
   methods: {
142 179
     getDeopImages() {
143
-      depotImageList({orgId: this.orgId}).then(resp => {
144
-        const list = resp || []
145
-        this.depotImages = list
146
-        console.log('轮播图片', list)
147
-      })
180
+      depotImageList({ orgId: this.orgId }).then((resp) => {
181
+        const list = resp || [];
182
+        this.depotImages = list;
183
+        console.log("轮播图片", list);
184
+      });
148 185
     },
149 186
     goTodo() {
150
-      this.$store.commit('SET_TOP_MENU_INDEX', 1)
151
-      this.$router.push({ path: '/toDoNav/toDoThings' })
152
-    }
153
-  }
154
-}
187
+      this.$store.commit("SET_TOP_MENU_INDEX", 1);
188
+      this.$router.push({ path: "/toDoNav/toDoThings" });
189
+    },
190
+  },
191
+};
155 192
 </script>
156 193
 
157 194
 <style scoped lang="scss">
@@ -167,7 +204,7 @@ export default {
167 204
   }
168 205
 
169 206
   .main-column {
170
-    margin-left:5px;
207
+    margin-left: 5px;
171 208
     width: 76%;
172 209
   }
173 210
 }
@@ -182,7 +219,6 @@ export default {
182 219
 }
183 220
 
184 221
 .welcome {
185
-
186 222
 }
187 223
 
188 224
 .welcome-title {
@@ -224,5 +260,4 @@ export default {
224 260
 //.el-carousel__item:nth-child(2n+1) {
225 261
 //  background-color: #d3dce6;
226 262
 //}
227
-
228 263
 </style>

+ 2 - 2
src/page/intelligentStorage/components/quantityDetectionDeviceConfigEdit.vue

@@ -142,8 +142,8 @@ export default {
142 142
       this.initHouseOptions();
143 143
     },
144 144
     beforeAll() {
145
-      if(this.isAdd) {
146
-        this.form.updatePerson = this.realName
145
+      if(this.isAdd || this.isEdit) {
146
+        this.form.updatePerson = this.userId
147 147
       }
148 148
     },
149 149
     getDataFun() {

+ 60 - 0
src/page/mixin/legacyUpload.js

@@ -0,0 +1,60 @@
1
+import {uploadUrl_2} from "@/api/settlementManagement";
2
+import {downloadBase} from "@/api/inventoryQualityTraceability";
3
+import {basicUploadUrl, getFileList} from "@/api/base";
4
+export default {
5
+  data() {
6
+    return {
7
+      uploadUrl_2,
8
+      downloadBase,
9
+      fileList: [],
10
+      fileIds: [],
11
+      deleteFileIds: [],
12
+    }
13
+  },
14
+  methods: {
15
+    getFileListById(dataId) {
16
+      getFileList({bid: dataId, orgId: this.orgId}).then(resp => {
17
+
18
+        this.fileList = resp.map(d => {
19
+          return {
20
+            id: d.id,
21
+            name: d.originalFileName,
22
+            url: `${downloadBase}/${d.filePath}`
23
+          }
24
+        })
25
+        console.log('文件列表', resp, this.fileList)
26
+      })
27
+    },
28
+    onUploadSuccess(resp, file, fileList) {
29
+      console.log('上传文件 resp', resp, file, fileList)
30
+      this.fileList = fileList.map(f => {
31
+        let url
32
+        let id
33
+        if(f.response) {
34
+          url = f.response.filePath
35
+          id = f.response.id
36
+        }else {
37
+          url = f.url
38
+          id = f.id
39
+        }
40
+        return {
41
+          name: f.name,
42
+          url: url,
43
+          id: id,
44
+        }
45
+      })
46
+    },
47
+    onUploadRemove(fileList) {
48
+      const removeFiles = []
49
+      for(const f of this.fileList) {
50
+        const file = fileList.find(temp => temp.id === f.id)
51
+        if(! file) {
52
+          removeFiles.push(f)
53
+        }
54
+      }
55
+      this.fileList = fileList
56
+      this.deleteFileIds.push(... removeFiles.map(f => f.id))
57
+      console.log('删除文件 ', fileList, removeFiles)
58
+    }
59
+  }
60
+}

+ 3 - 1
src/page/monitoringChannel/index.vue

@@ -1,6 +1,6 @@
1 1
 <template>
2 2
   <div class="content-main">
3
-    <live :show-live-control="false" :show-camera-control="true"></live>
3
+    <live_v2 :show-live-control="false" :show-camera-control="true"></live_v2>
4 4
   </div>
5 5
 </template>
6 6
 
@@ -8,11 +8,13 @@
8 8
 
9 9
 import commonSelect from "@/components/common/commonSelect"
10 10
 import live from "@/components/common/player/live"
11
+import live_v2 from "@/components/common/player/live_v2.vue"
11 12
 
12 13
 export default {
13 14
   name: "monitoringChannel",
14 15
   components: {
15 16
     live,
17
+    live_v2,
16 18
     commonSelect,
17 19
   },
18 20
   data() {

+ 8 - 2
src/page/purchaseOfFinished/components/monthlyReport.vue

@@ -331,7 +331,7 @@ export default {
331 331
         orgName: "",
332 332
         id: "",
333 333
         createdate: "",
334
-        planName:'',
334
+        planName: "",
335 335
         updatename: "",
336 336
         updatedate: "",
337 337
         orgId: "",
@@ -350,11 +350,17 @@ export default {
350 350
       houseOptions: [],
351 351
       rules: {
352 352
         planCode: [
353
-          { required: true, message: "输入计划编号", trigger: "change" },
353
+          { required: true, message: "输入计划编号", trigger: "change" },
354 354
         ],
355 355
         planType: [
356 356
           { required: true, message: "请选择计划类型", trigger: "change" },
357 357
         ],
358
+        planStartTime: [
359
+          { required: true, message: "请输入计划开始时间", trigger: "change" },
360
+        ],
361
+        planEndTime: [
362
+          { required: true, message: "请输入计划结束时间", trigger: "change" },
363
+        ],
358 364
       },
359 365
     };
360 366
   },

+ 15 - 21
src/page/purchaseOfFinished/purchaseOfFinished.vue

@@ -22,12 +22,12 @@
22 22
             <el-input placeholder="请输入内容" v-model="searchData.unitName" />
23 23
           </el-form-item>
24 24
           <el-form-item label="年度:" prop="lspzName">
25
-              <el-date-picker
26
-                v-model="searchData.year"
27
-                value-format="yyyy"
28
-                type="year"
29
-                placeholder="日期"
30
-              />
25
+            <el-date-picker
26
+              v-model="searchData.year"
27
+              value-format="yyyy"
28
+              type="year"
29
+              placeholder="日期"
30
+            />
31 31
           </el-form-item>
32 32
           <!-- <el-form-item label="粮食性质:" prop="lsxzName">
33 33
             <el-input
@@ -78,22 +78,16 @@
78 78
         prop="dwmc"
79 79
         label="企业名称"
80 80
       ></el-table-column>
81
-      </el-table-column>
82 81
       <el-table-column
83 82
         align="center"
84 83
         prop="planCode"
85 84
         label="计划编号"
86 85
       ></el-table-column>
87
-      <el-table-column
88
-        align="center"
89
-        prop="planType"
90
-        label="计划类型"
91
-      >
92
- <template v-slot="scope">
93
-<div v-if="scope.row.planType == 1">销售计划 </div>
94
-<div v-if="scope.row.planType == 2">收购计划 </div>
86
+      <el-table-column align="center" prop="planType" label="计划类型">
87
+        <template v-slot="scope">
88
+          <div v-if="scope.row.planType == 1">销售计划</div>
89
+          <div v-if="scope.row.planType == 2">收购计划</div>
95 90
         </template>
96
-      
97 91
       </el-table-column>
98 92
       <el-table-column
99 93
         align="center"
@@ -182,7 +176,7 @@
182 176
 </template>
183 177
 <script>
184 178
 import MonthlyReport from "./components/monthlyReport.vue";
185
-import {  CPLGXIAOJIHAOlist ,CPLGXIAOJIHAOdel} from "@/api/base/rotationApi.js";
179
+import { CPLGXIAOJIHAOlist, CPLGXIAOJIHAOdel } from "@/api/base/rotationApi.js";
186 180
 export default {
187 181
   components: { MonthlyReport },
188 182
   data() {
@@ -194,7 +188,7 @@ export default {
194 188
         titleText: "",
195 189
         showLock: false,
196 190
         isType: "",
197
-        lengthACC:0
191
+        lengthACC: 0,
198 192
       },
199 193
       searchData: {
200 194
         unitName: "",
@@ -216,10 +210,10 @@ export default {
216 210
 
217 211
   methods: {
218 212
     getList() {
219
-    const userInfoJSON = JSON.parse(sessionStorage.getItem("userInfo"));
213
+      const userInfoJSON = JSON.parse(sessionStorage.getItem("userInfo"));
220 214
       const obj = {
221 215
         ...this.searchData,
222
-        orgId:userInfoJSON.orgId,
216
+        orgId: userInfoJSON.orgId,
223 217
         current: this.limit.page,
224 218
         size: this.limit.size,
225 219
       };
@@ -244,7 +238,7 @@ export default {
244 238
     // 新增
245 239
     addData() {
246 240
       this.dataObj.isType = "1";
247
-      this.dataObj.lengthACC = this.tableData.length + 1
241
+      this.dataObj.lengthACC = this.tableData.length + 1;
248 242
       this.dataObj.titleText = "新增购销计划管理";
249 243
       this.dataObj.visible = true;
250 244
       this.dataObj.showLock = false;

+ 15 - 7
src/page/receiptConfirmation/entryPriceCheckn/details.vue

@@ -141,16 +141,19 @@
141 141
                   prop="zjbgdh"
142 142
                   label="报告单号"
143 143
                   align="center"
144
+                  show-overflow-tooltip
144 145
                 />
145 146
                 <el-table-column
146 147
                   prop="storehouseName"
147 148
                   label="仓号"
148 149
                   align="center"
150
+                  show-overflow-tooltip
149 151
                 />
150 152
                 <el-table-column
151 153
                   prop="warehouseName"
152 154
                   label="货位名称"
153 155
                   align="center"
156
+                  show-overflow-tooltip
154 157
                 />
155 158
                 <el-table-column prop="sf" label="水分" align="center" />
156 159
                 <el-table-column prop="zz" label="杂质" align="center" />
@@ -184,12 +187,12 @@
184 187
                 />
185 188
                 <el-table-column
186 189
                   align="center"
187
-                  label="其中:等量补库"
190
+                  label="其中:等量补库(公斤)"
188 191
                   prop="equalQuantitySupplement"
189 192
                 />
190 193
                 <el-table-column
191 194
                   align="center"
192
-                  label="保管账数量"
195
+                  label="保管账数量(公斤)"
193 196
                   prop="custodyAccountQuantity"
194 197
                 />
195 198
                 <el-table-column
@@ -252,7 +255,7 @@
252 255
                 </el-table-column>
253 256
                 <el-table-column
254 257
                   align="center"
255
-                  label="确认数量"
258
+                  label="确认数量(公斤)"
256 259
                   prop="totalSettleQuantity"
257 260
                 />
258 261
                 <el-table-column
@@ -272,11 +275,13 @@
272 275
                   align="center"
273 276
                   label="凭证号"
274 277
                   prop="voucherNumber"
278
+                  show-overflow-tooltip
275 279
                 />
276 280
                 <el-table-column
277 281
                   align="center"
278 282
                   label="单位"
279 283
                   prop="payerUnitName"
284
+                  show-overflow-tooltip
280 285
                 />
281 286
                 <el-table-column
282 287
                   label="已付粮款(元)"
@@ -320,15 +325,18 @@
320 325
                 align="center"
321 326
                 label="对方单位"
322 327
                 prop="wcmCostMainUnit"
328
+                show-overflow-tooltip
323 329
               />
324 330
               <el-table-column
325 331
                 align="center"
326 332
                 label="费用名称"
327 333
                 prop="wcmCostName"
334
+                show-overflow-tooltip
328 335
               />
329 336
               <el-table-column
330 337
                 align="center"
331 338
                 label="会计凭证号"
339
+                show-overflow-tooltip
332 340
                 prop="wcmAccountingVoucherNumber"
333 341
               />
334 342
               <el-table-column
@@ -573,8 +581,6 @@ export default {
573 581
     },
574 582
     // 下载文件
575 583
     downloadEvent(data) {
576
-      data =
577
-        "https://image.baidu.com/search/down?tn=download&word=download&ie=utf8&fr=detail&url=https%3A%2F%2Fphoto.669pic.com%2Fshow_photos%2F84%2F82%2F29%2F45%2F54729df1d8df72d6a006fd0fdd4a89a3.jpg&thumburl=https%3A%2F%2Fimg1.baidu.com%2Fit%2Fu%3D2829212510%2C1692384975%26fm%3D253%26fmt%3Dauto%26app%3D138%26f%3DJPEG%3Fw%3D500%26h%3D750";
578 584
       downloadFile(data, "合同附件");
579 585
     },
580 586
     // 入库明细、会计凭证明细弹框打开事件
@@ -610,8 +616,10 @@ export default {
610 616
   .el-card {
611 617
     margin-bottom: 15px;
612 618
     .el-card__header {
613
-      font-size: 16px;
614
-      font-weight: bold;
619
+      span {
620
+        font-size: 16px;
621
+        font-weight: bold;
622
+      }
615 623
       .el-select {
616 624
         float: right;
617 625
       }

+ 5 - 3
src/page/receiptConfirmation/entryPriceCheckn/detailsModule.vue

@@ -11,6 +11,7 @@
11 11
     :visible.sync="moduleData.show"
12 12
   >
13 13
     <el-table
14
+      border
14 15
       show-summary
15 16
       :data="tableData"
16 17
       :summary-method="getSummaries"
@@ -25,9 +26,9 @@
25 26
       <el-table-column prop="storehouseName" align="center" label="仓房名称" />
26 27
       <el-table-column prop="warehouseName" align="center" label="货位名称" />
27 28
       <el-table-column prop="qcph" label="车牌号" align="center" />
28
-      <el-table-column prop="mzzl" align="center" label="毛重" />
29
-      <el-table-column prop="pz" align="center" label="皮重" />
30
-      <el-table-column prop="bzwkl" align="center" label="扣量" />
29
+      <el-table-column prop="mzzl" align="center" label="毛重(公斤)" />
30
+      <el-table-column prop="pz" align="center" label="皮重(公斤)" />
31
+      <el-table-column prop="bzwkl" align="center" label="扣量(公斤)" />
31 32
       <el-table-column
32 33
         width="160"
33 34
         prop="cpzsj"
@@ -37,6 +38,7 @@
37 38
     </el-table>
38 39
     <el-table
39 40
       v-else
41
+      border
40 42
       show-summary
41 43
       :data="tableData"
42 44
       :summary-method="getSummaries"

+ 358 - 0
src/page/receiptConfirmation/revenueContributionModule/addDataModule.vue

@@ -0,0 +1,358 @@
1
+<template>
2
+  <el-dialog
3
+    top="0"
4
+    width="66%"
5
+    :limit="1"
6
+    class="dialog-box"
7
+    :append-to-body="true"
8
+    :title="addModuleData.title"
9
+    :before-close="closeModule"
10
+    :close-on-click-modal="false"
11
+    :close-on-press-escape="false"
12
+    :visible.sync="addModuleData.show"
13
+  >
14
+    <div class="queryBox">
15
+      <el-form
16
+        :rules="rules"
17
+        ref="ruleForm"
18
+        label-width="160px"
19
+        :model="searchData"
20
+      >
21
+        <el-row>
22
+          <el-col :span="8">
23
+            <el-form-item label="仓房:" prop="basicStorehouseId">
24
+              <el-select
25
+                size="small"
26
+                style="width: 340px"
27
+                placeholder="请选择仓房"
28
+                @change="selectStoreHouse"
29
+                v-model="searchData.basicStorehouseId"
30
+              >
31
+                <el-option
32
+                  v-for="item in dictList.storehouseList"
33
+                  :key="item.storehouseId"
34
+                  :value="item.storehouseId"
35
+                  :label="item.storehouseName"
36
+                />
37
+              </el-select>
38
+            </el-form-item>
39
+          </el-col>
40
+          <el-col :span="8">
41
+            <el-form-item label="货位:" prop="warehouseId">
42
+              <el-select
43
+                size="small"
44
+                style="width: 340px"
45
+                placeholder="请选择货位"
46
+                v-model="searchData.warehouseId"
47
+                :disabled="!searchData.basicStorehouseId"
48
+              >
49
+                <el-option
50
+                  v-for="item in dictList.warehouseList"
51
+                  :key="item.warehouseId"
52
+                  :value="item.warehouseId"
53
+                  :label="item.warehouseName"
54
+                />
55
+              </el-select>
56
+            </el-form-item>
57
+          </el-col>
58
+          <el-col :span="8">
59
+            <el-form-item>
60
+              <el-button
61
+                size="small"
62
+                type="primary"
63
+                @click="queryData"
64
+                class="iconfont iconchaxun"
65
+                >查询</el-button
66
+              >
67
+            </el-form-item>
68
+          </el-col>
69
+        </el-row>
70
+      </el-form>
71
+    </div>
72
+    <div class="formBox">
73
+      <el-form
74
+        :model="formData"
75
+        label-width="160px"
76
+        v-if="addModuleData.type == 'ZJSYXX'"
77
+      >
78
+        <el-row>
79
+          <el-col :span="12">
80
+            <el-form-item label="入仓水分">
81
+              <el-input disabled v-model="formData.sfOut" />
82
+            </el-form-item>
83
+          </el-col>
84
+          <el-col :span="12">
85
+            <el-form-item label="出仓水分">
86
+              <el-input disabled v-model="formData.sfOut" />
87
+            </el-form-item>
88
+          </el-col>
89
+          <el-col :span="12">
90
+            <el-form-item label="入仓杂质">
91
+              <el-input disabled v-model="formData.zzIn" />
92
+            </el-form-item>
93
+          </el-col>
94
+          <el-col :span="12">
95
+            <el-form-item label="出仓杂质">
96
+              <el-input disabled v-model="formData.zzOut" />
97
+            </el-form-item>
98
+          </el-col>
99
+          <el-col :span="12">
100
+            <el-form-item label="实际损耗量(公斤)">
101
+              <el-input disabled v-model="formData.actualLossQuantity" />
102
+            </el-form-item>
103
+          </el-col>
104
+          <el-col :span="12">
105
+            <el-form-item label="定额损耗小计(公斤)">
106
+              <el-input disabled v-model="formData.quotaLoss" />
107
+            </el-form-item>
108
+          </el-col>
109
+          <el-col :span="12">
110
+            <el-form-item label="保管损耗(公斤)">
111
+              <el-input disabled v-model="formData.naturalLoss" />
112
+            </el-form-item>
113
+          </el-col>
114
+          <el-col :span="12">
115
+            <el-form-item label="水分减量(公斤)">
116
+              <el-input disabled v-model="formData.moistureLoss" />
117
+            </el-form-item>
118
+          </el-col>
119
+          <el-col :span="12">
120
+            <el-form-item label="杂质减量(公斤)">
121
+              <el-input disabled v-model="formData.impurityReductionQuality" />
122
+            </el-form-item>
123
+          </el-col>
124
+          <el-col :span="12">
125
+            <el-form-item label="超耗数量(公斤)">
126
+              <el-input disabled v-model="formData.excessLossQuantity" />
127
+            </el-form-item>
128
+          </el-col>
129
+          <el-col :span="24">
130
+            <el-form-item label="超耗原因">
131
+              <el-input
132
+                disabled
133
+                type="textarea"
134
+                v-model="formData.lossProfitReason"
135
+              />
136
+            </el-form-item>
137
+          </el-col>
138
+        </el-row>
139
+      </el-form>
140
+      <el-form
141
+        v-else
142
+        ref="priceForm"
143
+        :model="formData"
144
+        label-width="160px"
145
+        :rules="priceRules"
146
+      >
147
+        <el-row>
148
+          <el-col :span="12">
149
+            <el-form-item label="入库数量(公斤)" prop="lssl">
150
+              <el-input disabled v-model="formData.lssl" />
151
+            </el-form-item>
152
+          </el-col>
153
+          <el-col :span="12">
154
+            <el-form-item label="核定单价(元)" prop="inNinancialVerification">
155
+              <el-input disabled v-model="formData.inNinancialVerification" />
156
+            </el-form-item>
157
+          </el-col>
158
+          <el-col :span="12">
159
+            <el-form-item label="入库金额(元)" prop="storageAmount">
160
+              <el-input disabled v-model="formData.storageAmount" />
161
+            </el-form-item>
162
+          </el-col>
163
+          <el-col :span="12">
164
+            <el-form-item label="文件号">
165
+              <el-input disabled v-model="formData.documentNumber" />
166
+            </el-form-item>
167
+          </el-col>
168
+          <el-col :span="12">
169
+            <el-form-item label="文档上传" prop="fileList">
170
+              <el-upload
171
+                :action="actionUrl"
172
+                class="upload-demo"
173
+                :on-remove="handleRemove"
174
+                :on-success="handleSuccess"
175
+                :file-list="formData.fileList"
176
+              >
177
+                <el-button size="small" type="primary" icon="el-icon-upload"
178
+                  >点击上传</el-button
179
+                >
180
+              </el-upload>
181
+            </el-form-item>
182
+          </el-col>
183
+        </el-row>
184
+      </el-form>
185
+    </div>
186
+    <template #footer>
187
+      <div class="dialog-footer">
188
+        <el-button size="large" class="successBtn" @click="saveData"
189
+          >保存</el-button
190
+        >
191
+        <el-button size="large" @click="closeModule">关闭</el-button>
192
+      </div>
193
+    </template>
194
+  </el-dialog>
195
+</template>
196
+<script>
197
+import { depot_smart_storage } from "@/api";
198
+import * as api from "@/api/revenueContributionModule/index.js";
199
+
200
+export default {
201
+  props: {
202
+    dictList: {
203
+      type: Object,
204
+      default: () => {},
205
+    },
206
+    addModuleData: {
207
+      type: Object,
208
+      default: () => {},
209
+    },
210
+  },
211
+  data() {
212
+    return {
213
+      formData: {
214
+        fileList: [],
215
+      },
216
+      showDialog: true,
217
+      warehouseList: [],
218
+      searchData: {
219
+        warehouseId: 100042,
220
+        basicStorehouseId: "",
221
+        orgId: this.$store.state.user.orgInfo.orgId,
222
+      },
223
+      actionUrl: `${depot_smart_storage}/dev/file/uploadMinioReturnUrl`,
224
+      rules: {
225
+        warehouseId: [
226
+          { required: true, message: "请选择货位", trigger: "change" },
227
+        ],
228
+        basicStorehouseId: [
229
+          { required: true, message: "请选择仓房", trigger: "change" },
230
+        ],
231
+      },
232
+      priceRules: {
233
+        lssl: [{ required: true, message: "请输入入库数量", trigger: "blur" }],
234
+        storageAmount: [
235
+          { required: true, message: "请输入入库金额", trigger: "blur" },
236
+        ],
237
+        fileList: [
238
+          { required: true, message: "请上传文档", trigger: "change" },
239
+        ],
240
+        inNinancialVerification: [
241
+          { required: true, message: "请输入核定单价", trigger: "blur" },
242
+        ],
243
+      },
244
+    };
245
+  },
246
+  mounted() {
247
+    if (this.addModuleData.data) {
248
+      Object.assign(this.formData, this.addModuleData.data);
249
+      this.searchData.warehouseId = this.formData.warehouseId;
250
+      this.searchData.basicStorehouseId =
251
+        this.formData.basicStorehouseId || this.formData.storehouseId;
252
+      if (this.formData.fileList.length < 1) {
253
+        this.formData.fileList = [];
254
+        this.formData.fileList.push({
255
+          status: "success",
256
+          name: this.formData.documentNumber,
257
+          response: this.formData.documentUpload,
258
+        });
259
+      }
260
+    }
261
+  },
262
+  methods: {
263
+    queryData() {
264
+      let apiFun = "";
265
+      if (this.addModuleData.type == "YHDRKJG") {
266
+        //原核定入库价格
267
+        apiFun = api.getCardInfo;
268
+      } else {
269
+        // 质检损益信息
270
+        apiFun = api.getConsistenceAccountInfo;
271
+      }
272
+      this.$refs.ruleForm.validate((valid) => {
273
+        if (valid) {
274
+          apiFun(this.searchData).then((res) => {
275
+            this.formData = res.data;
276
+            this.formData.fileList = [];
277
+          });
278
+        }
279
+      });
280
+    },
281
+    saveData() {
282
+      this.formData.warehouseId = this.searchData.warehouseId;
283
+      this.formData.basicStorehouseId = this.searchData.basicStorehouseId;
284
+      let obj = {
285
+        data: this.formData,
286
+        type: this.addModuleData.type,
287
+      };
288
+      if (this.addModuleData.type == "YHDRKJG") {
289
+        this.formData.fileList.map((item) => {
290
+          obj.data.documentUpload = item.response;
291
+        });
292
+        this.$refs.priceForm.validate((valid) => {
293
+          if (valid) {
294
+            this.formData = {};
295
+            this.$emit("closeAddModule", obj);
296
+          }
297
+        });
298
+      } else {
299
+        if (this.formData.zjbgdhIn && this.formData.zjbgdhOut) {
300
+          this.formData = {};
301
+          this.$emit("closeAddModule", obj);
302
+        } else {
303
+          this.$message.warning("请选择质检损益信息");
304
+        }
305
+      }
306
+    },
307
+    // 联动仓房
308
+    selectStoreHouse(data) {
309
+      this.warehouseList = [];
310
+      this.searchData.warehouseId = "";
311
+      this.dictList.warehouseList.map((item) => {
312
+        if (item.storehouseId == data) {
313
+          this.warehouseList.push(item);
314
+        }
315
+      });
316
+    },
317
+    // 文件上传成功
318
+    handleSuccess(response, file, fileList) {
319
+      if (file.status == "success") {
320
+        this.formData.documentNumber = file.name;
321
+        this.formData.fileList.push(file);
322
+      }
323
+    },
324
+    // 移除文件
325
+    handleRemove(file, fileList) {
326
+      this.formData.fileList = [];
327
+      this.formData.documentUpload = "";
328
+    },
329
+    closeModule() {
330
+      this.formData = {};
331
+      this.$emit("closeAddModule", null);
332
+    },
333
+  },
334
+};
335
+</script>
336
+<style lang="scss" scoped>
337
+.el-dialog {
338
+  .el-dialog__footer {
339
+    .dialog-footer {
340
+      display: flex;
341
+      justify-content: flex-end;
342
+      .successBtn {
343
+        color: #fff;
344
+        background: #67c23a;
345
+      }
346
+    }
347
+  }
348
+  .queryBox {
349
+    padding-top: 20px;
350
+    box-shadow: 5px 10px 20px #e4e7ed;
351
+  }
352
+  .formBox {
353
+    margin-top: 30px;
354
+    padding: 30px 15px;
355
+    height: calc(100% - 180px);
356
+  }
357
+}
358
+</style>

+ 875 - 0
src/page/receiptConfirmation/revenueContributionModule/details.vue

@@ -0,0 +1,875 @@
1
+<template>
2
+  <div class="entryPriceCheckn">
3
+    <el-dialog
4
+      top="0"
5
+      width="86%"
6
+      class="dialog-box"
7
+      :append-to-body="true"
8
+      :close-on-click-modal="false"
9
+      :close-on-press-escape="false"
10
+      :visible.sync="sendData.visible"
11
+      :before-close="handleDialogClose"
12
+      :title="sendData.titleText + '省级储备差价上缴表'"
13
+    >
14
+      <el-form
15
+        :rules="rules"
16
+        ref="ruleForm"
17
+        :model="pageData"
18
+        label-width="100px"
19
+      >
20
+        <el-row>
21
+          <el-col :span="8">
22
+            <el-form-item label="上报库区:">
23
+              <el-input
24
+                disabled
25
+                v-model="pageData.orgName"
26
+                placeholder="自动带出"
27
+              />
28
+            </el-form-item>
29
+          </el-col>
30
+          <el-col :span="8">
31
+            <el-form-item label="上报时间:" prop="reportTime">
32
+              <el-date-picker
33
+                type="date"
34
+                style="width: 100%"
35
+                v-model="pageData.reportTime"
36
+                placeholder="请选择上报时间"
37
+                value-format="yyyy-MM-dd HH:mm:ss"
38
+                :disabled="sendData.type == 'look'"
39
+              />
40
+            </el-form-item>
41
+          </el-col>
42
+          <el-col :span="8">
43
+            <el-form-item label="计划类型:">
44
+              <el-input disabled v-model="pageData.planType" />
45
+            </el-form-item>
46
+          </el-col>
47
+          <el-col :span="8">
48
+            <el-form-item label="销往单位:" prop="salesUnit">
49
+              <el-input
50
+                v-model="pageData.salesUnit"
51
+                placeholder="请填写销往单位"
52
+                :disabled="sendData.type == 'look'"
53
+              />
54
+            </el-form-item>
55
+          </el-col>
56
+          <el-col :span="8">
57
+            <el-form-item label="合同编号:" prop="contractId">
58
+              <el-select
59
+                placeholder="请选择合同编号"
60
+                @change="selectContract"
61
+                v-model="pageData.contractId"
62
+                :disabled="sendData.type == 'look'"
63
+              >
64
+                <el-option
65
+                  v-for="item in dictList.contractDetails"
66
+                  :key="item.id"
67
+                  :value="item.id"
68
+                  :label="item.contractTitle"
69
+                />
70
+              </el-select>
71
+            </el-form-item>
72
+          </el-col>
73
+          <el-col :span="8"> </el-col>
74
+          <!---------------------------------------------- 合同信息 ----------------------------------------------->
75
+          <el-card class="box-card">
76
+            <span slot="header">合同信息</span>
77
+            <el-table
78
+              show-summary
79
+              :data="cacheData.contractDetails"
80
+              :summary-method="getSummaries"
81
+            >
82
+              <el-table-column align="center" label="合同签订情况">
83
+                <el-table-column prop="houseName" label="仓房" align="center" />
84
+                <el-table-column
85
+                  prop="warehouseName"
86
+                  label="货位"
87
+                  align="center"
88
+                />
89
+                <el-table-column
90
+                  prop="grainKindName"
91
+                  label="品种"
92
+                  align="center"
93
+                />
94
+                <el-table-column
95
+                  prop="inCount"
96
+                  label="数量(吨)"
97
+                  align="center"
98
+                />
99
+                <el-table-column
100
+                  prop="inPrice"
101
+                  label="单价(元/吨)"
102
+                  align="center"
103
+                />
104
+                <el-table-column
105
+                  prop="inDetailTotalPrice"
106
+                  label="金额(元)"
107
+                  align="center"
108
+                />
109
+              </el-table-column>
110
+            </el-table>
111
+          </el-card>
112
+          <!---------------------------------------------- 质检损益信息 ----------------------------------------------->
113
+          <el-card class="box-card">
114
+            <div slot="header" class="clearfix">
115
+              <span>质检损益信息</span>
116
+              <el-button
117
+                type="success"
118
+                size="small"
119
+                icon="el-icon-plus"
120
+                v-if="sendData.type != 'look'"
121
+                @click="openAddModule('ZJSYXX')"
122
+                >添加</el-button
123
+              >
124
+            </div>
125
+            <el-table :data="pageData.inspectionLossList">
126
+              <el-table-column align="center" label="分仓出入库质检报告">
127
+                <el-table-column
128
+                  label="报告单号"
129
+                  align="center"
130
+                  show-overflow-tooltip
131
+                >
132
+                  <el-table-column
133
+                    label="入库单号"
134
+                    show-overflow-tooltip
135
+                    prop="zjbgdhIn"
136
+                  />
137
+                  <el-table-column
138
+                    label="出库单号"
139
+                    show-overflow-tooltip
140
+                    prop="zjbgdhOut"
141
+                  />
142
+                </el-table-column>
143
+                <el-table-column
144
+                  prop="storehouseName"
145
+                  label="仓号"
146
+                  align="center"
147
+                  show-overflow-tooltip
148
+                />
149
+                <el-table-column
150
+                  prop="warehouseName"
151
+                  label="货位名称"
152
+                  align="center"
153
+                  show-overflow-tooltip
154
+                />
155
+                <el-table-column prop="sfIn" label="入仓水分" align="center" />
156
+                <el-table-column prop="sfOut" label="出仓水分" align="center" />
157
+                <el-table-column prop="zzIn" label="入仓杂质" align="center" />
158
+                <el-table-column prop="zzOut" label="出仓杂质" align="center" />
159
+              </el-table-column>
160
+              <el-table-column align="center" label="分仓损耗">
161
+                <el-table-column
162
+                  prop="actualLossQuantity"
163
+                  label="实际损耗量(公斤)"
164
+                  align="center"
165
+                />
166
+                <el-table-column
167
+                  prop="quotaLoss"
168
+                  label="定额损耗小计(公斤)"
169
+                  align="center"
170
+                />
171
+                <el-table-column prop="sf" label="其中:" align="center">
172
+                  <el-table-column
173
+                    prop="naturalLoss"
174
+                    label="保管损耗(公斤)"
175
+                    align="center"
176
+                  />
177
+                  <el-table-column
178
+                    prop="moistureLoss"
179
+                    label="水分减量(公斤)"
180
+                    align="center"
181
+                  />
182
+                  <el-table-column
183
+                    prop="impurityReductionQuality"
184
+                    label="杂质减量(公斤)"
185
+                    align="center"
186
+                  />
187
+                </el-table-column>
188
+                <el-table-column
189
+                  prop="excessLossQuantity"
190
+                  label="超耗数量(公斤)"
191
+                  align="center"
192
+                />
193
+                <el-table-column
194
+                  prop="lossProfitReason"
195
+                  label="超耗原因"
196
+                  align="center"
197
+                  show-overflow-tooltip
198
+                />
199
+              </el-table-column>
200
+              <el-table-column
201
+                align="center"
202
+                label="操作"
203
+                v-if="sendData.type != 'look'"
204
+              >
205
+                <template slot-scope="scope">
206
+                  <el-button
207
+                    size="mini"
208
+                    type="danger"
209
+                    @click="deleteData('ZJSYXX', scope.$index)"
210
+                    >删除</el-button
211
+                  >
212
+                </template>
213
+              </el-table-column>
214
+            </el-table>
215
+          </el-card>
216
+
217
+          <!---------------------------------------------- 三账一致性 ----------------------------------------------->
218
+          <el-card class="box-card">
219
+            <span slot="header">三账一致性</span>
220
+            <el-table :data="pageData.threeConsistenceAccountList">
221
+              <el-table-column label="会计账" align="center">
222
+                <el-table-column label="月份" align="center" prop="month" />
223
+                <el-table-column label="凭证号" align="center" prop="id" />
224
+                <el-table-column
225
+                  label="销售数量(公斤)"
226
+                  align="center"
227
+                  prop="provinceAccountingQuantity"
228
+                />
229
+                <el-table-column
230
+                  label="销售单价(元)"
231
+                  align="center"
232
+                  prop="provinceAccountingUnitPrice"
233
+                />
234
+                <el-table-column
235
+                  label="销售金额(元)"
236
+                  align="center"
237
+                  prop="provinceAccountingAmount"
238
+                />
239
+              </el-table-column>
240
+            </el-table>
241
+            <el-table
242
+              show-summary
243
+              :summary-method="getSummaries"
244
+              :data="pageData.threeConsistenceList"
245
+            >
246
+              <el-table-column label="实际出库情况" align="center">
247
+                <el-table-column label="月份" align="center" prop="month" />
248
+                <el-table-column
249
+                  label="仓房"
250
+                  align="center"
251
+                  prop="storehouseName"
252
+                />
253
+                <el-table-column
254
+                  label="货位"
255
+                  align="center"
256
+                  prop="warehouseName"
257
+                />
258
+                <el-table-column
259
+                  label="其中:损耗"
260
+                  align="center"
261
+                  prop="loss"
262
+                />
263
+                <el-table-column
264
+                  label="保管账数量(公斤)"
265
+                  align="center"
266
+                  prop="provinceCustodyAccountQuantity"
267
+                />
268
+                <el-table-column
269
+                  label="统计账数量(公斤)"
270
+                  align="center"
271
+                  prop="provinceStatisticalAccountQuantity"
272
+                />
273
+                <el-table-column
274
+                  label="完成时间"
275
+                  align="center"
276
+                  prop="completeTime"
277
+                />
278
+                <el-table-column label="查看出库明细" align="center">
279
+                  <el-button
280
+                    link
281
+                    size="mini"
282
+                    type="primary"
283
+                    icon="el-icon-view"
284
+                    @click="moduleData.show = true"
285
+                    >查看</el-button
286
+                  >
287
+                </el-table-column>
288
+              </el-table-column>
289
+            </el-table>
290
+          </el-card>
291
+
292
+          <!---------------------------------------------- 结算信息 ----------------------------------------------->
293
+          <el-card class="box-card">
294
+            <span slot="header">结算信息</span>
295
+            <el-table
296
+              show-summary
297
+              :data="pageData.revenueSettleList"
298
+              :summary-method="getSummaries"
299
+            >
300
+              <el-table-column label="出库验收确认" align="center">
301
+                <el-table-column
302
+                  label="单位"
303
+                  align="center"
304
+                  prop="orgName"
305
+                  show-overflow-tooltip
306
+                />
307
+                <el-table-column
308
+                  align="center"
309
+                  label="数量(吨)"
310
+                  prop="provinceTotalSettleQuantity"
311
+                />
312
+                <el-table-column
313
+                  align="center"
314
+                  label="金额(元)"
315
+                  prop="provinceTotalSettleAmount"
316
+                />
317
+              </el-table-column>
318
+              <el-table-column label="贷款收回情况" align="center">
319
+                <el-table-column
320
+                  label="日期"
321
+                  align="center"
322
+                  width="160"
323
+                  prop="loanReturnTime"
324
+                  show-overflow-tooltip
325
+                />
326
+                <el-table-column
327
+                  align="center"
328
+                  label="数量"
329
+                  prop="provinceLoanRecoveryQuantity"
330
+                />
331
+                <el-table-column
332
+                  label="金额(元)"
333
+                  align="center"
334
+                  prop="provinceLoanRecoveryAmount"
335
+                />
336
+              </el-table-column>
337
+              <el-table-column label="销售发票情况" align="center">
338
+                <el-table-column
339
+                  align="center"
340
+                  label="单位"
341
+                  prop="provinceInvoiceUnit"
342
+                />
343
+                <el-table-column
344
+                  width="100"
345
+                  align="center"
346
+                  label="发票数量"
347
+                  prop="provinceInvoiceQuantity"
348
+                />
349
+                <el-table-column
350
+                  align="center"
351
+                  label="发票单价(元)"
352
+                  prop="provinceInvoiceUnitPrice"
353
+                />
354
+                <el-table-column
355
+                  align="center"
356
+                  label="发票金额(元)"
357
+                  prop="provinceInvoiceAmount"
358
+                />
359
+              </el-table-column>
360
+              <el-table-column label="贷款归还" align="center">
361
+                <el-table-column
362
+                  align="center"
363
+                  label="日期"
364
+                  show-overflow-tooltip
365
+                  prop="provinceLoanReturnTime"
366
+                />
367
+                <el-table-column
368
+                  align="center"
369
+                  label="金额(元)"
370
+                  prop="provinceLoanReturnAmount"
371
+                />
372
+              </el-table-column>
373
+            </el-table>
374
+          </el-card>
375
+          <!---------------------------------------------- 原核定入库价格 ----------------------------------------------->
376
+          <el-card class="box-card">
377
+            <div slot="header" class="clearfix">
378
+              <span>原核定入库价格</span>
379
+              <el-button
380
+                type="success"
381
+                size="small"
382
+                icon="el-icon-plus"
383
+                v-if="sendData.type != 'look'"
384
+                @click="openAddModule('YHDRKJG')"
385
+                >添加</el-button
386
+              >
387
+            </div>
388
+            <el-table :data="pageData.approvalPriceList">
389
+              <el-table-column align="center" label="原核定入库价格">
390
+                <el-table-column
391
+                  align="center"
392
+                  label="仓房名称"
393
+                  prop="storehouseName"
394
+                />
395
+                <el-table-column
396
+                  align="center"
397
+                  label="货位名称"
398
+                  prop="warehouseName"
399
+                />
400
+                <el-table-column align="center" label="入库数量" prop="lssl" />
401
+                <el-table-column
402
+                  align="center"
403
+                  label="核定单价(元)"
404
+                  prop="inNinancialVerification"
405
+                />
406
+                <el-table-column
407
+                  align="center"
408
+                  label="入库金额(元)"
409
+                  prop="storageAmount"
410
+                />
411
+                <el-table-column
412
+                  align="center"
413
+                  label="文件号"
414
+                  prop="documentNumber"
415
+                  show-overflow-tooltip
416
+                />
417
+                <el-table-column
418
+                  align="center"
419
+                  label="附件"
420
+                  show-overflow-tooltip
421
+                >
422
+                  <template slot-scope="scope">
423
+                    <el-link
424
+                      type="primary"
425
+                      @click="downloadEvent(scope.row.documentUpload)"
426
+                      >{{ scope.row.documentUpload }}</el-link
427
+                    >
428
+                  </template>
429
+                </el-table-column>
430
+                <el-table-column
431
+                  align="center"
432
+                  label="操作"
433
+                  v-if="sendData.type != 'look'"
434
+                >
435
+                  <template slot-scope="scope">
436
+                    <el-button
437
+                      size="mini"
438
+                      type="primary"
439
+                      @click="openAddModule('YHDRKJG', scope.row)"
440
+                      >编辑</el-button
441
+                    >
442
+                    <el-button
443
+                      size="mini"
444
+                      type="danger"
445
+                      @click="deleteData('YHDRKJG', scope.$index)"
446
+                      >删除</el-button
447
+                    >
448
+                  </template>
449
+                </el-table-column>
450
+              </el-table-column>
451
+            </el-table>
452
+          </el-card>
453
+          <el-card class="box-card">
454
+            <span slot="header">差价上缴</span>
455
+            <el-table :data="pageData.diffPriceList">
456
+              <el-table-column align="center" label="差价上缴">
457
+                <el-table-column align="center" label="项目">
458
+                  <template slot-scope="scope">
459
+                    {{ filtrData(scope.row.projectType) }}
460
+                  </template>
461
+                </el-table-column>
462
+                <el-table-column
463
+                  align="center"
464
+                  label="数量(公斤)"
465
+                  prop="totalQuantity"
466
+                />
467
+                <el-table-column
468
+                  align="center"
469
+                  label="金额(元)"
470
+                  prop="totalAmount"
471
+                />
472
+              </el-table-column>
473
+            </el-table>
474
+          </el-card>
475
+          <el-col :span="24">
476
+            <el-form-item disabled label="附件:">
477
+              <el-link
478
+                type="primary"
479
+                v-if="pageData.contractDetails.length"
480
+                @click="downloadEvent(pageData.contractDetails[0].attachment)"
481
+                >{{ pageData.contractDetails[0].attachment }}</el-link
482
+              >
483
+            </el-form-item>
484
+          </el-col>
485
+        </el-row>
486
+      </el-form>
487
+
488
+      <template #footer>
489
+        <div class="dialog-footer">
490
+          <el-button
491
+            size="large"
492
+            class="successBtn"
493
+            @click="btnEven('save', 0)"
494
+            v-if="sendData.type != 'look'"
495
+            >保存</el-button
496
+          >
497
+          <el-button
498
+            size="large"
499
+            type="primary"
500
+            @click="btnEven('save', 1)"
501
+            v-if="sendData.type != 'look'"
502
+            >上报</el-button
503
+          >
504
+          <el-button size="large" @click="btnEven('close')">关闭</el-button>
505
+        </div>
506
+      </template>
507
+      <addDataModule
508
+        :dictList="dictList"
509
+        v-if="addModuleData.show"
510
+        :addModuleData="addModuleData"
511
+        @closeAddModule="closeAddModule"
512
+      />
513
+      <detailsModule
514
+        v-if="moduleData.show"
515
+        :moduleData="moduleData"
516
+        @closDetailsModule="moduleData.show = false"
517
+      />
518
+    </el-dialog>
519
+  </div>
520
+</template>
521
+<script>
522
+import addDataModule from "./addDataModule.vue";
523
+import detailsModule from "./detailsModule.vue";
524
+import { downloadFile } from "@/utils/downloadFile.js";
525
+import { getStorehouseList, getWarehouse } from "@/api/base";
526
+import * as api from "@/api/revenueContributionModule/index.js";
527
+export default {
528
+  props: {
529
+    sendData: {
530
+      type: Object,
531
+      default: () => ({}),
532
+    },
533
+  },
534
+  components: { detailsModule, addDataModule },
535
+  data() {
536
+    return {
537
+      dictList: {
538
+        warehouseList: [],
539
+        storehouseList: [],
540
+        contractDetails: [],
541
+        projectTypeList: [
542
+          {
543
+            value: 1,
544
+            label: "销售",
545
+          },
546
+          {
547
+            value: 2,
548
+            label: "损耗",
549
+          },
550
+          {
551
+            value: 3,
552
+            label: "入库(用负数表示)",
553
+          },
554
+          {
555
+            value: 4,
556
+            label: "交易手续费(用负数表示)",
557
+          },
558
+          {
559
+            value: 5,
560
+            label: "应上缴价差合计",
561
+          },
562
+        ],
563
+      },
564
+      addModuleData: {
565
+        type: "",
566
+        title: "",
567
+        show: false,
568
+      },
569
+      cacheData: {
570
+        contractDetails: [],
571
+        inspectionLossList: [],
572
+      },
573
+      moduleData: {
574
+        show: false,
575
+        type: "",
576
+        contractNumber: "",
577
+        orgId: this.$store.state.user.orgInfo.orgId,
578
+      },
579
+      pageData: {
580
+        contractId: "",
581
+        planType: "轮换计划",
582
+        diffPriceList: [], // 差价上缴
583
+        contractDetails: [], // 合同信息
584
+        revenueSettleList: [], // 结算信息
585
+        approvalPriceList: [], // 原核定入库价格
586
+        inspectionLossList: [], // 质检信息
587
+        threeConsistenceList: [], // 三账一致性-实际出库情况
588
+        threeConsistenceAccountList: [], // 三账一致性-会计账
589
+        orgId: this.$store.state.user.orgInfo.orgId,
590
+      },
591
+      rules: {
592
+        reportTime: [
593
+          { required: true, message: "请选择上报时间", trigger: "change" },
594
+        ],
595
+        salesUnit: [
596
+          { required: true, message: "请填写采购单位", trigger: "blur" },
597
+        ],
598
+        contractId: [
599
+          { required: true, message: "请选择合同编号", trigger: "change" },
600
+        ],
601
+      },
602
+    };
603
+  },
604
+  mounted() {
605
+    this.getDictList();
606
+    this.getPageData();
607
+  },
608
+  methods: {
609
+    async getPageData() {
610
+      if (this.sendData.type != "add") {
611
+        api.getDetails(this.sendData.id).then((res) => {
612
+          if (res.retCode == 200) {
613
+            this.pageData = res.data;
614
+            this.cacheData.contractDetails = res.data.contractDetails; // 合同信息
615
+            this.dictList.contractDetails.map((item) => {
616
+              if (item.id == this.pageData.contractId) {
617
+                this.pageData.contractDetails.map((el) => {
618
+                  el.attachment = item.attachment;
619
+                });
620
+              }
621
+            });
622
+          }
623
+        });
624
+      }
625
+      this.pageData.orgName = this.$store.state.user.orgInfo.orgName;
626
+    },
627
+    // 获取合同列表
628
+    getDictList() {
629
+      let obj = { unitId: this.pageData.orgId, libraryType: 0 };
630
+      // 获取合同下拉表;
631
+      api.getContractInfo(this.pageData.orgId).then((res) => {
632
+        if (res.retCode == 200) {
633
+          this.dictList.contractDetails = res.data;
634
+        }
635
+      });
636
+      // 仓房
637
+      getWarehouse(obj).then((res) => {
638
+        this.dictList.warehouseList = res.wareList;
639
+      });
640
+      // 货位
641
+      getStorehouseList(obj).then((res) => {
642
+        this.dictList.storehouseList = res.houseList;
643
+      });
644
+    },
645
+    // 加载合同信息
646
+    selectContract(data) {
647
+      let obj = {
648
+        orgId: this.pageData.orgId,
649
+      };
650
+      this.pageData.contractDetails = [];
651
+      this.dictList.contractDetails.map((item) => {
652
+        if (data == item.id) {
653
+          this.moduleData.contractNumber = item.contractNumber;
654
+          this.pageData.contractDetails.push(item);
655
+        }
656
+      });
657
+      // 获取合同详情;
658
+      api.getContractInfoById(data).then((res) => {
659
+        if (res.retCode == 200) {
660
+          this.cacheData.contractDetails = res.data;
661
+        }
662
+      });
663
+      if (this.sendData.type == "add") {
664
+        // 三账一致性-会计账
665
+        api.accountingBooks(this.moduleData.contractNumber).then((res) => {
666
+          if (res.retCode == 200) {
667
+            this.pageData.threeConsistenceAccountList = res.data;
668
+          }
669
+        });
670
+        // 三账一致性-实际出库情况
671
+        api.getOutStorageInfo(this.moduleData.contractNumber).then((res) => {
672
+          if (res.retCode == 200) {
673
+            this.pageData.threeConsistenceList = res.data;
674
+          }
675
+        });
676
+        // 结算信息
677
+        api.getSettlementInfo(this.moduleData.contractNumber).then((res) => {
678
+          if (res.retCode == 200) {
679
+            this.pageData.revenueSettleList = res.data;
680
+          }
681
+        });
682
+        // 差价上缴
683
+        api.getDiffPriceInfo(this.moduleData.contractNumber).then((res) => {
684
+          if (res.retCode == 200 && res.data.length) {
685
+            let obj = {
686
+              projectType: 5,
687
+              totalAmount: 0,
688
+              totalQuantity: 0,
689
+            };
690
+
691
+            res.data.map((item) => {
692
+              if (item.totalAmount) {
693
+                obj.totalAmount = item.totalAmount + obj.totalAmount;
694
+              }
695
+              if (item.totalQuantity) {
696
+                obj.totalQuantity = item.totalQuantity + obj.totalQuantity;
697
+              }
698
+            });
699
+            this.pageData.diffPriceList = res.data;
700
+            this.pageData.diffPriceList.push(obj);
701
+          }
702
+        });
703
+      }
704
+    },
705
+    // 合计
706
+    getSummaries(param) {
707
+      const sums = [];
708
+      const { columns, data } = param;
709
+      columns.forEach((column, index) => {
710
+        if (index === 0) {
711
+          sums[index] = "合计";
712
+          return;
713
+        }
714
+        const values = data.map((item) => Number(item[column.property]));
715
+        if (
716
+          column.property == "loss" ||
717
+          column.property == "inCount" ||
718
+          column.property == "inDetailTotalPrice" ||
719
+          column.property == "provinceInvoiceAmount" ||
720
+          column.property == "provinceLoanReturnAmount" ||
721
+          column.property == "provinceInvoiceQuantity" ||
722
+          column.property == "provinceLoanRecoveryAmount" ||
723
+          column.property == "provinceTotalSettleAmount" ||
724
+          column.property == "provinceTotalSettleQuantity" ||
725
+          column.property == "provinceTotalSettleQuantity" ||
726
+          column.property == "provinceLoanRecoveryQuantity" ||
727
+          column.property == "provinceCustodyAccountQuantity" ||
728
+          column.property == "provinceStatisticalAccountQuantity"
729
+        ) {
730
+          if (!values.every((value) => isNaN(value))) {
731
+            sums[index] = values.reduce((prev, curr) => {
732
+              const value = Number(curr);
733
+              if (!isNaN(value)) {
734
+                return prev + curr;
735
+              } else {
736
+                return prev;
737
+              }
738
+            }, 0);
739
+          } else {
740
+            sums[index] = "";
741
+          }
742
+        }
743
+      });
744
+      return sums;
745
+    },
746
+    // 保存 上报
747
+    btnEven(type, code) {
748
+      if (type == "save") {
749
+        let apiFun = this.sendData.type == "add" ? api.saveData : api.update;
750
+        this.$refs.ruleForm.validate((valid) => {
751
+          if (valid) {
752
+            this.pageData.status = code;
753
+            if (this.pageData.inspectionLossList.length) {
754
+              if (this.pageData.approvalPriceList.length) {
755
+                apiFun(this.pageData).then((res) => {
756
+                  if (res.retCode == 200) {
757
+                    this.$message.success("操作成功");
758
+                    this.handleDialogClose(true);
759
+                  }
760
+                });
761
+              } else {
762
+                this.$message.warning("请添加原核定入库价格");
763
+              }
764
+            } else {
765
+              this.$message.warning("请添加质检损益信息");
766
+            }
767
+          } else {
768
+            this.$message.warning("请完善必填项");
769
+          }
770
+        });
771
+      } else {
772
+        this.handleDialogClose();
773
+      }
774
+    },
775
+    // 下载文件
776
+    downloadEvent(data) {
777
+      downloadFile(data, "合同附件");
778
+    },
779
+    // 过滤字段
780
+    filtrData(data) {
781
+      let str = "";
782
+      this.dictList.projectTypeList.map((item) => {
783
+        if (data == item.value) {
784
+          str = item.label;
785
+        }
786
+      });
787
+      return str;
788
+    },
789
+    // 打开添加框
790
+    openAddModule(type, data) {
791
+      this.addModuleData.show = true;
792
+      this.addModuleData.type = type;
793
+      this.addModuleData.title =
794
+        type == "ZJSYXX" ? "添加质检损益信息" : "添加原核定入库价格";
795
+      if (data) {
796
+        this.addModuleData.title = "修改原核定入库价格";
797
+        this.addModuleData.data = data;
798
+      }
799
+    },
800
+    // 删除
801
+    deleteData(type, index) {
802
+      if (type == "YHDRKJG") {
803
+        this.pageData.approvalPriceList.splice(index, 1);
804
+      } else {
805
+        this.pageData.inspectionLossList.splice(index, 1);
806
+      }
807
+    },
808
+    // 关闭添加弹窗
809
+    closeAddModule(val) {
810
+      this.addModuleData.type = "";
811
+      this.addModuleData.title = "";
812
+      this.addModuleData.show = false;
813
+      if (val) {
814
+        // 原核定入库价格
815
+        if (val.type == "YHDRKJG") {
816
+          let index = this.pageData.approvalPriceList.findIndex(
817
+            (item) =>
818
+              item.warehouseId === val.data.warehouseId &&
819
+              item.basicStorehouseId === val.data.basicStorehouseId
820
+          );
821
+          if (index > 0) {
822
+            // 编辑
823
+            this.pageData.approvalPriceList[index] = val.data;
824
+          } else {
825
+            // 添加
826
+            this.pageData.approvalPriceList.push(val.data);
827
+          }
828
+        } else {
829
+          // 质检损益信息
830
+          this.pageData.inspectionLossList.push(val.data);
831
+        }
832
+      }
833
+    },
834
+    // 关闭
835
+    handleDialogClose(data) {
836
+      this.$emit("closeDialog", data);
837
+    },
838
+  },
839
+};
840
+</script>
841
+<style lang="scss" scoped>
842
+.el-dialog {
843
+  .el-dialog__footer {
844
+    .dialog-footer {
845
+      display: flex;
846
+      justify-content: flex-end;
847
+      .successBtn {
848
+        color: #fff;
849
+        background: #67c23a;
850
+      }
851
+    }
852
+  }
853
+  .el-card {
854
+    width: 100%;
855
+    margin-bottom: 15px;
856
+    .el-card__header {
857
+      span {
858
+        font-size: 16px;
859
+        font-weight: bold;
860
+      }
861
+      .el-button {
862
+        float: right;
863
+      }
864
+    }
865
+    .el-table {
866
+      width: 100%;
867
+      margin-bottom: 30px;
868
+      .el-button--primary {
869
+        width: 56px;
870
+        height: 28px;
871
+      }
872
+    }
873
+  }
874
+}
875
+</style>

+ 99 - 0
src/page/receiptConfirmation/revenueContributionModule/detailsModule.vue

@@ -0,0 +1,99 @@
1
+<template>
2
+  <el-dialog
3
+    top="0"
4
+    width="66%"
5
+    title="出库明细"
6
+    class="dialog-box"
7
+    :append-to-body="true"
8
+    :close-on-click-modal="false"
9
+    :close-on-press-escape="false"
10
+    :before-close="handleDialogClose"
11
+    :visible.sync="moduleData.show"
12
+  >
13
+    <el-table
14
+      border
15
+      show-summary
16
+      :data="tableData"
17
+      :summary-method="getSummaries"
18
+    >
19
+      <el-table-column
20
+        prop="htbh"
21
+        width="220"
22
+        label="合同编号"
23
+        align="center"
24
+      />
25
+      <el-table-column prop="storehouseName" align="center" label="仓房名称" />
26
+      <el-table-column prop="warehouseName" align="center" label="货位名称" />
27
+      <el-table-column prop="qcph" label="车牌号" align="center" />
28
+      <el-table-column prop="mzzl" align="center" label="毛重(公斤)" />
29
+      <el-table-column prop="pz" align="center" label="皮重(公斤)" />
30
+      <el-table-column prop="bzwkl" align="center" label="扣量(公斤)" />
31
+      <el-table-column
32
+        width="160"
33
+        prop="cpzsj"
34
+        align="center"
35
+        label="出入库时间"
36
+      />
37
+    </el-table>
38
+  </el-dialog>
39
+</template>
40
+<script>
41
+import * as api from "@/api/revenueContributionModule/index.js";
42
+export default {
43
+  props: {
44
+    moduleData: {
45
+      type: Object,
46
+      default: () => ({}),
47
+    },
48
+  },
49
+  data() {
50
+    return {
51
+      tableData: [],
52
+    };
53
+  },
54
+  mounted() {
55
+    this.getPageData();
56
+  },
57
+  methods: {
58
+    getPageData() {
59
+      api.getOutStorageDetailed(this.moduleData.contractNumber).then((res) => {
60
+        if (res.retCode == 200) {
61
+          this.tableData = res.data;
62
+        }
63
+      });
64
+    },
65
+    // 合计
66
+    getSummaries(param) {
67
+      const sums = [];
68
+      const { columns, data } = param;
69
+
70
+      columns.forEach((column, index) => {
71
+        if (index === 0) {
72
+          sums[index] = "合计";
73
+          return;
74
+        }
75
+        if (column.property != "contractNumber" && column.property != "qcph") {
76
+          const values = data.map((item) => Number(item[column.property]));
77
+          if (!values.every((value) => isNaN(value))) {
78
+            sums[index] = values.reduce((prev, curr) => {
79
+              const value = Number(curr);
80
+              if (!isNaN(value)) {
81
+                return prev + curr;
82
+              } else {
83
+                return prev;
84
+              }
85
+            }, 0);
86
+          } else {
87
+            sums[index] = "";
88
+          }
89
+        }
90
+      });
91
+
92
+      return sums;
93
+    },
94
+    handleDialogClose() {
95
+      this.$emit("closDetailsModule");
96
+    },
97
+  },
98
+};
99
+</script>

+ 214 - 0
src/page/receiptConfirmation/revenueContributionModule/index.vue

@@ -0,0 +1,214 @@
1
+<template>
2
+  <div class="content-main">
3
+    <div class="search-bm-boder">
4
+      <el-row>
5
+        <el-form
6
+          :inline="true"
7
+          ref="searchForm"
8
+          label-width="120px"
9
+          :model="searchData"
10
+          class="demo-form-inline search-form"
11
+        >
12
+          <el-form-item label="合同编号:" prop="contractNumber">
13
+            <el-input
14
+              v-model="searchData.contractNumber"
15
+              placeholder="请输入合同编号"
16
+            />
17
+          </el-form-item>
18
+          <div class="search-button">
19
+            <span class="search-line"></span>
20
+            <el-button
21
+              size="small"
22
+              type="primary"
23
+              @click="btnEvent('query')"
24
+              class="iconfont iconchaxun"
25
+              >查询</el-button
26
+            >
27
+            <el-button
28
+              size="small"
29
+              type="primary"
30
+              @click="btnEvent('reset')"
31
+              class="iconfont iconzhongzhi"
32
+              >重置</el-button
33
+            >
34
+            <el-button
35
+              size="small"
36
+              type="primary"
37
+              @click="btnEvent('add')"
38
+              class="iconfont iconxinzeng"
39
+              >新增</el-button
40
+            >
41
+          </div>
42
+        </el-form>
43
+      </el-row>
44
+    </div>
45
+    <el-table
46
+      border
47
+      stripe
48
+      :data="tableData"
49
+      highlight-current-row
50
+      v-loading="listLoading"
51
+      style="width: 100%"
52
+    >
53
+      <el-table-column label="序号" type="index" align="center" width="60" />
54
+      <el-table-column align="center" prop="contractNumber" label="合同编号" />
55
+      <el-table-column align="center" prop="grainQuantity" label="数量" />
56
+      <el-table-column align="center" prop="moneyQuantity" label="金额(元)" />
57
+      <el-table-column
58
+        align="center"
59
+        label="确认数量"
60
+        prop="performanceQuantity"
61
+      />
62
+      <el-table-column align="center" prop="createdate" label="创建日期" />
63
+      <el-table-column align="center" label="状态">
64
+        <template slot-scope="scope">
65
+          {{
66
+            scope.row.status == 0
67
+              ? "保存"
68
+              : scope.row.status == 1
69
+              ? "上报"
70
+              : "已核定"
71
+          }}
72
+        </template>
73
+      </el-table-column>
74
+      <el-table-column label="操作" align="center" width="240">
75
+        <template slot-scope="scope">
76
+          <el-button
77
+            size="small"
78
+            type="primary"
79
+            icon="el-icon-edit"
80
+            v-if="scope.row.status == 0"
81
+            @click="btnEvent('edit', scope.row.id)"
82
+            >修改</el-button
83
+          >
84
+          <el-button
85
+            size="small"
86
+            type="primary"
87
+            icon="el-icon-delete"
88
+            v-if="scope.row.status == 0"
89
+            @click="btnEvent('delete', scope.row.id)"
90
+            >删除</el-button
91
+          >
92
+          <el-button
93
+            size="small"
94
+            type="primary"
95
+            icon="el-icon-view"
96
+            @click="btnEvent('look', scope.row.id)"
97
+            >查看</el-button
98
+          >
99
+        </template>
100
+      </el-table-column>
101
+    </el-table>
102
+    <!-- 分页开始 -->
103
+    <div class="pag-right clearFix">
104
+      <el-pagination
105
+        class="right"
106
+        :total="searchData.total"
107
+        :page-size="searchData.size"
108
+        :page-sizes="[10, 20, 30, 40]"
109
+        :current-page.sync="searchData.current"
110
+        @current-change="handleCurrentChangeTask"
111
+        @size-change="handleSizeChangeTask"
112
+        layout="total, sizes, prev, pager, next, jumper"
113
+      />
114
+    </div>
115
+    <detailsModule
116
+      :sendData="sendData"
117
+      @closeDialog="closeDialog"
118
+      v-if="sendData.visible"
119
+    />
120
+  </div>
121
+</template>
122
+<script>
123
+import detailsModule from "./details.vue";
124
+import * as api from "@/api/revenueContributionModule/index.js";
125
+export default {
126
+  components: { detailsModule },
127
+  data() {
128
+    return {
129
+      searchData: {
130
+        size: 10,
131
+        total: 0,
132
+        current: 1,
133
+        orgId: this.$store.state.user.userInfo.orgId,
134
+      },
135
+      sendData: {
136
+        visible: false,
137
+      },
138
+      tableData: [],
139
+      listLoading: false,
140
+    };
141
+  },
142
+  mounted() {
143
+    this.btnEvent("query");
144
+  },
145
+  methods: {
146
+    btnEvent(type, id) {
147
+      if (type == "query") {
148
+        this.listLoading = true;
149
+        this.listLoading = false;
150
+        api.getPageList(this.searchData).then((res) => {
151
+          if (res.retCode == 200) {
152
+            this.listLoading = false;
153
+            this.tableData = res.data.records;
154
+            this.searchData.size = res.data.size;
155
+            this.searchData.total = res.data.total;
156
+            this.searchData.current = res.data.current;
157
+          }
158
+        });
159
+      } else if (type == "add") {
160
+        this.sendData.type = type;
161
+        this.sendData.visible = true;
162
+        this.sendData.titleText = "新增";
163
+      } else if (type == "edit") {
164
+        this.sendData.id = id;
165
+        this.sendData.type = type;
166
+        this.sendData.visible = true;
167
+        this.sendData.titleText = "编辑";
168
+      } else if (type == "look") {
169
+        this.sendData.id = id;
170
+        this.sendData.type = type;
171
+        this.sendData.visible = true;
172
+        this.sendData.titleText = "查看";
173
+      } else if (type == "delete") {
174
+        this.$confirm("此操作将永久删除该文件, 是否继续?", "提示", {
175
+          confirmButtonText: "确定",
176
+          cancelButtonText: "取消",
177
+          type: "warning",
178
+        }).then(() => {
179
+          api.deleteData(id).then((res) => {
180
+            if (res.retCode == 200) {
181
+              this.btnEvent("query");
182
+              this.$message({
183
+                type: "success",
184
+                message: "删除成功!",
185
+              });
186
+            }
187
+          });
188
+        });
189
+      } else {
190
+        this.$refs.searchForm.resetFields();
191
+        this.btnEvent("query");
192
+      }
193
+    },
194
+    // 改变显示条数
195
+    handleSizeChangeTask(size) {
196
+      this.searchData.current = size;
197
+      this.btnEvent("query");
198
+    },
199
+    // 改变显示页数
200
+    handleCurrentChangeTask(current) {
201
+      this.searchData.current = current;
202
+      this.btnEvent("query");
203
+    },
204
+    closeDialog(data) {
205
+      if (data) {
206
+        this.btnEvent("query");
207
+      }
208
+      this.sendData.type = "";
209
+      this.sendData.visible = false;
210
+      this.sendData.titleText = "";
211
+    },
212
+  },
213
+};
214
+</script>

+ 4 - 4
src/page/spillageLeakageLossCollection/components/spillageLeakageLossCollectionEdit.vue

@@ -5,7 +5,7 @@
5 5
       <el-form ref="editForm" :model="form" :rules="rules" label-width="150px">
6 6
         <el-row type="flex" align="middle" justify="center" class="row">
7 7
           <el-col :span="8">
8
-            <el-form-item label="损单号" prop="sydh">
8
+            <el-form-item label="损单号" prop="sydh">
9 9
               <el-input v-model="form.sydh" placeholder="选择仓房/货位后生成" readonly />
10 10
             </el-form-item>
11 11
           </el-col>
@@ -182,7 +182,7 @@
182 182
 
183 183
         <el-row type="flex" align="middle" justify="center" class="row">
184 184
           <el-col :span="8">
185
-            <el-form-item label="损原因" prop="lossProfitReason">
185
+            <el-form-item label="损原因" prop="lossProfitReason">
186 186
               <el-input v-model="form.lossProfitReason" :readonly="readonly"/>
187 187
             </el-form-item>
188 188
           </el-col>
@@ -280,7 +280,7 @@ export default {
280 280
         impurityOut: null, // number 出库杂质
281 281
         isNormalLoss: null, // integer($int32) 损溢是否正常 1:正常;2:不正常;
282 282
         leadershipAuditor: null, // string 领导审核人
283
-        lossProfitReason: null, // string 损原因
283
+        lossProfitReason: null, // string 损原因
284 284
         moistureImpurityLoss: null, // number 水杂减量
285 285
         moistureIn: null, // number 入库水分
286 286
         moistureLoss: null, // number 水分减量
@@ -295,7 +295,7 @@ export default {
295 295
         storageLoss: null, // number 存储损耗
296 296
         storageTime: null, // string($date-time) 入库时间
297 297
         storageYears: null, // integer($int32) 存储年限
298
-        sydh: null, // string 损单号
298
+        sydh: null, // string 损单号
299 299
         updatedate: null, // string($date-time) 更新日期
300 300
         updatename: null, // string 更新人
301 301
         warehouseAuditor: null, // string 仓储审核人

+ 3 - 45
src/page/storehouseManagement/components/hazardControlEdit.vue

@@ -163,8 +163,10 @@ import {simple_required} from "@/utils/ruleDatas";
163 163
 import upload from '@/components/upload/v2.vue'
164 164
 import {basicUploadUrl, getFileList, minioUrl} from "@/api/base";
165 165
 import {downloadBase} from "@/api/inventoryQualityTraceability";
166
+import legacyUpload from "@/page/mixin/legacyUpload";
166 167
 
167 168
 export default {
169
+  mixins: [legacyUpload, ],
168 170
   props: {
169 171
     visible: {
170 172
       type: Boolean,
@@ -220,9 +222,6 @@ export default {
220 222
       uploadUrl_2,
221 223
       show: this.visible,
222 224
       form: { },
223
-      fileList: [],
224
-      fileIds: [],
225
-      deleteFileIds: [],
226 225
       rules: {
227 226
         sbr: simple_required, fxxx: simple_required, hjbw: simple_required,
228 227
         fxlx: simple_required, fxfj: simple_required, fxglcs: simple_required,
@@ -240,17 +239,7 @@ export default {
240 239
       if(this.isAdd) {
241 240
       }else {
242 241
         console.log('查看 id', this.dataId)
243
-        getFileList({bid: this.dataId, orgId: this.orgId}).then(resp => {
244
-
245
-          this.fileList = resp.map(d => {
246
-            return {
247
-              id: d.id,
248
-              name: d.originalFileName,
249
-              url: `${basicUploadUrl}${d.filePath}`
250
-            }
251
-          })
252
-          console.log('文件列表', resp, this.fileList)
253
-        })
242
+        this.getFileListById(this.dataId)
254 243
         StorageSafeManageControllerEdit(this.dataId).then(resp  => {
255 244
           this.form = resp.storageSafeManageWithBLOBs
256 245
           // const fl = resp.fileList || []
@@ -331,37 +320,6 @@ export default {
331 320
         }
332 321
       })
333 322
     },
334
-    onUploadSuccess(resp, file, fileList) {
335
-      console.log('上传文件 resp', resp, file, fileList)
336
-      this.fileList = fileList.map(f => {
337
-        let url
338
-        let id
339
-        if(f.response) {
340
-          url = f.response.filePath
341
-          id = f.response.id
342
-        }else {
343
-          url = f.url
344
-          id = f.id
345
-        }
346
-        return {
347
-          name: f.name,
348
-          url: url,
349
-          id: id,
350
-        }
351
-      })
352
-    },
353
-    onUploadRemove(fileList) {
354
-      const removeFiles = []
355
-      for(const f of this.fileList) {
356
-        const file = fileList.find(temp => temp.id === f.id)
357
-        if(! file) {
358
-          removeFiles.push(f)
359
-        }
360
-      }
361
-      this.fileList = fileList
362
-      this.deleteFileIds.push(... removeFiles.map(f => f.id))
363
-      console.log('删除文件 ', fileList, removeFiles)
364
-    }
365 323
   }
366 324
 
367 325
 }

+ 25 - 6
src/page/system/functionManagement.vue

@@ -13,8 +13,8 @@
13 13
             <el-button type="primary" size="small" icon="el-icon-plus" @click="add">新增</el-button>
14 14
             <el-divider direction="vertical"></el-divider>
15 15
           </el-form-item>
16
-          <el-form-item label="功能名称:" prop="name">
17
-            <el-input></el-input>
16
+          <el-form-item label="功能名称:" prop="funcName">
17
+            <el-input v-model="form.funcName"></el-input>
18 18
           </el-form-item>
19 19
 
20 20
           <div class="search-button">
@@ -129,9 +129,7 @@ export default {
129 129
       },
130 130
       tableData: [],
131 131
       form: {
132
-        type: null,
133
-        status: null,
134
-        name: null,
132
+        funcName: null,
135 133
       },
136 134
       paginationShow: false,
137 135
       listLoading: false,
@@ -148,7 +146,27 @@ export default {
148 146
   },
149 147
   methods: {
150 148
     search() {
151
-      this.getList()
149
+      if(this.form.funcName) {
150
+        this.tableData = this.searchByName(this.tableData, this.form.funcName)
151
+      }else {
152
+        this.getList()
153
+      }
154
+    },
155
+    searchByName(data, name) {
156
+      let results = [];
157
+      for (let item of data) {
158
+        let copy = {...item};
159
+        if (item.funcName.indexOf(name) >= 0) {
160
+          results.push(copy);
161
+        }
162
+        if (item.children && item.children.length > 0) {
163
+          copy.children = this.searchByName(item.children, name);
164
+          if (copy.children.length > 0) {
165
+            results.push(copy);
166
+          }
167
+        }
168
+      }
169
+      return results;
152 170
     },
153 171
     reset(formName) {
154 172
       if(this.$refs[formName]) {
@@ -185,6 +203,7 @@ export default {
185 203
     getList() {
186 204
       this.listLoading = true
187 205
       getFunc({
206
+        ... this.form
188 207
       }).then(resp => {
189 208
         this.tableData = this.$systemUtils.buildFuncTree(resp)
190 209
       }).finally(_ => {

+ 1 - 1
src/router/index.js

@@ -166,7 +166,7 @@ export default new Router({
166 166
         transferManagementModule,
167 167
         // settlementManagementModule,
168 168
         // statisticsManagementModule,
169
-        // financialManagementModule,
169
+        financialManagementModule,
170 170
         progressManagementModule,
171 171
         consumerManagementModule,
172 172
         alertingModule,

+ 19 - 0
src/router/system/financeModule.js

@@ -1,3 +1,11 @@
1
+/*
2
+ * @Author: chenghanbin chenghanbin@foxmail.com
3
+ * @Date: 2024-07-22 18:17:22
4
+ * @LastEditors: chenghanbin chenghanbin@foxmail.com
5
+ * @LastEditTime: 2024-07-23 14:41:03
6
+ * @FilePath: \depot-vue-qinghai\src\router\system\financeModule.js
7
+ * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
8
+ */
1 9
 export default {
2 10
   path: "/financeModule",
3 11
   name: "financeModule",
@@ -39,6 +47,17 @@ export default {
39 47
       },
40 48
     },
41 49
     {
50
+      path: "/financial/revenueContributionModule",
51
+      name: "revenueContributionModule",
52
+      component: () =>
53
+        import(
54
+          "@/page/receiptConfirmation/revenueContributionModule/index.vue"
55
+        ),
56
+      meta: {
57
+        title: "销售收入上缴",
58
+      },
59
+    },
60
+    {
42 61
       path: "/financial/receiptConfirmation",
43 62
       name: "receiptConfirmation",
44 63
       component: () =>

+ 19 - 3
src/router/system/financialManagementModule.js

@@ -11,8 +11,8 @@ export default {
11 11
       path: "/financialManagementNav",
12 12
       name: "financialManagementNav",
13 13
       component: {
14
-        render(c) {
15
-          return c("router-view");
14
+        render (c) {
15
+          return c("router-view")
16 16
         },
17 17
       },
18 18
       children: [
@@ -41,6 +41,22 @@ export default {
41 41
           },
42 42
         },
43 43
         {
44
+          path: "/financialManagement/Amaintenance",
45
+          name: "Amaintenance",
46
+          component: () => import("@/page/Amaintenance/index.vue"),
47
+          meta: {
48
+            title: "利息维护",
49
+          },
50
+        },
51
+        {
52
+          path: "/financialManagement/APayment",
53
+          name: "APayment",
54
+          component: () => import("@/page/APayment/index.vue"),
55
+          meta: {
56
+            title: "出库验收确认",
57
+          },
58
+        },
59
+        {
44 60
           path: "/financialManagement/CostStandard",
45 61
           name: "CostStandard",
46 62
           component: () => import("@/page/CostStandard/index.vue"),
@@ -51,4 +67,4 @@ export default {
51 67
       ],
52 68
     },
53 69
   ],
54
-};
70
+}

+ 8 - 0
src/router/system/granaryComprehensiveExhibitionModule.js

@@ -39,6 +39,14 @@ export default {
39 39
       }
40 40
     },
41 41
     {
42
+      path: "/granaryComprehensiveExhibition/granaryReplay",
43
+      name: "granaryLive",
44
+      component: () => import("@/page/granaryComprehensiveExhibition/granaryReplay"),
45
+      meta: {
46
+        title: "视频回放"
47
+      }
48
+    },
49
+    {
42 50
       path: "/granaryComprehensiveExhibition/storehouseWorkRecord",
43 51
       name: "storehouseWorkRecord",
44 52
       component: () => import("@/page/granaryComprehensiveExhibition/storehouseWorkRecord"),

+ 2 - 1
src/style/common/variables.scss

@@ -26,4 +26,5 @@ $dialog-header:#006bd5!default;
26 26
 $dialog-tit-color:#ffffff!default;
27 27
 $dialog-con-color:#525357!default;
28 28
 $breadcrumb-bg:#49a2fa!default;
29
-$breadcrumb-color:#ffffff!default;
29
+// $breadcrumb-bg:#f5f9fe!default;
30
+$breadcrumb-color:#ffffff!default;

+ 52 - 45
src/style/style.scss

@@ -11,10 +11,10 @@ body {
11 11
 }
12 12
 
13 13
 .el-button--default {
14
-  height: 34px;
15
-  padding: 0 10px;
16
-  border-radius: 4px;
17
-  vertical-align: middle;
14
+	height: 34px;
15
+	padding: 0 10px;
16
+	border-radius: 4px;
17
+	vertical-align: middle;
18 18
 }
19 19
 
20 20
 .el-table thead {
@@ -271,38 +271,41 @@ body {
271 271
 	margin-left: 136px;
272 272
 }
273 273
 
274
-.el-dialog{
275
-  top: 25px;
276
-  overflow: hidden;
277
-  height: calc(100vh - 60px);
274
+.el-dialog {
275
+	top: 25px;
276
+	overflow: hidden;
277
+	height: calc(100vh - 60px);
278 278
 }
279
+
279 280
 //普通弹窗样式
280 281
 .el-dialog .el-dialog__header {
281 282
 	background-color: $dialog-header;
282 283
 	padding: 20px 10px 9px;
283 284
 }
285
+
284 286
 .el-dialog .el-dialog__body {
285
-  height: calc(100% - 170px);
286
-  overflow: auto;
287
+	height: calc(100% - 170px);
288
+	overflow: auto;
287 289
 }
290
+
288 291
 /* 整个滚动条 */
289 292
 .el-dialog .el-dialog__body::-webkit-scrollbar {
290
-  width: 8px;
291
-  /* 设置滚动条的宽度 */
293
+	width: 8px;
294
+	/* 设置滚动条的宽度 */
292 295
 }
293 296
 
294 297
 /* 滚动条轨道 */
295 298
 .el-dialog .el-dialog__body::-webkit-scrollbar-track {
296
-  background: #f1f1f1;
297
-  border-radius: 4px;
298
-  /* 设置轨道的背景颜色 */
299
+	background: #f1f1f1;
300
+	border-radius: 4px;
301
+	/* 设置轨道的背景颜色 */
299 302
 }
300 303
 
301 304
 /* 滚动条的滑块 */
302 305
 .el-dialog .el-dialog__body::-webkit-scrollbar-thumb {
303
-  background: #888;
304
-  border-radius: 4px;
305
-  /* 设置滑块的背景颜色 */
306
+	background: #888;
307
+	border-radius: 4px;
308
+	/* 设置滑块的背景颜色 */
306 309
 }
307 310
 
308 311
 .el-dialog .el-dialog__title {
@@ -419,36 +422,40 @@ body {
419 422
 }
420 423
 
421 424
 .static-table {
422
-  width: 100%;
423
-  //border: 1px solid #dddddd;
424
-  border-collapse: collapse;
425
-  td {
426
-    border: 1px solid #dddddd;
427
-    height: 51px;
428
-    text-align: center;
429
-    vertical-align: middle;
430
-  }
431
-  tr:nth-child(odd) {
432
-    background-color: #f9f9f9;
433
-  }
434
-  tr:nth-child(even) {
435
-    background-color: #ffffff;
436
-  }
437
-  tr:hover {
438
-    background-color: #ecf3f8;
439
-  }
425
+	width: 100%;
426
+	//border: 1px solid #dddddd;
427
+	border-collapse: collapse;
428
+
429
+	td {
430
+		border: 1px solid #dddddd;
431
+		height: 51px;
432
+		text-align: center;
433
+		vertical-align: middle;
434
+	}
435
+
436
+	tr:nth-child(odd) {
437
+		background-color: #f9f9f9;
438
+	}
439
+
440
+	tr:nth-child(even) {
441
+		background-color: #ffffff;
442
+	}
443
+
444
+	tr:hover {
445
+		background-color: #ecf3f8;
446
+	}
440 447
 }
441 448
 
442 449
 .store-static-table {
443
-  td {
444
-    height: 75px;
450
+	td {
451
+		height: 75px;
445 452
 
446
-    .el-form-item {
447
-      margin: 5px 5px;
448
-    }
449
-  }
453
+		.el-form-item {
454
+			margin: 5px 5px;
455
+		}
456
+	}
450 457
 
451
-  /deep/ .el-form-item__error {
452
-    width: 100%;
453
-  }
458
+	/deep/ .el-form-item__error {
459
+		width: 100%;
460
+	}
454 461
 }

+ 95 - 0
src/style/theme.scss

@@ -0,0 +1,95 @@
1
+$blueColor: #295dac;
2
+$blueHoverColor: #3866ab;
3
+$whiteColor: #ffffff;
4
+
5
+$menuText: #ffffff;
6
+$menuActiveText: #295dac;
7
+$menuBg: rgba(0, 0, 0, 0);
8
+$subMenuActiveText: #ffffff;
9
+
10
+:export {
11
+    menuText: $menuText;
12
+    menuActiveText: $menuActiveText;
13
+    menuBg: $menuBg;
14
+    subMenuActiveText: $subMenuActiveText;
15
+    blueColor: $blueColor;
16
+}
17
+
18
+
19
+.menuList-wrap {
20
+    background: url(./../assets/theme/leftbg.png);
21
+
22
+    .el-menu-item.is-active {
23
+        background-color: $whiteColor !important;
24
+        color: $menuActiveText !important;
25
+    }
26
+
27
+    .router-link-active .el-menu-item {
28
+        color: $blueColor !important;
29
+        background-color: $whiteColor !important;
30
+    }
31
+
32
+    .navbar {
33
+        color: $whiteColor;
34
+    }
35
+
36
+    .el-menu-item {
37
+        font-size: 16px;
38
+    }
39
+
40
+    //menu
41
+    .el-submenu__title {
42
+        font-size: 16px !important;
43
+
44
+    }
45
+
46
+    .el-submenu__title i {
47
+        background: transparent !important;
48
+        color: $whiteColor;
49
+    }
50
+
51
+    .el-submenu__title i {
52
+        font-size: 16px;
53
+        margin-left: 13px !important;
54
+    }
55
+
56
+    .live-scrollbar .el-submenu .el-menu-item:hover {
57
+        background-color: $whiteColor !important;
58
+        color: $blueColor !important;
59
+    }
60
+
61
+    .router-link-active .el-menu-item .is-active {
62
+        background-color: $whiteColor !important;
63
+        color: $blueColor !important;
64
+    }
65
+
66
+    .router-link-active .el-menu-item:hover {
67
+        color: $blueColor !important;
68
+        background-color: $whiteColor !important;
69
+    }
70
+
71
+    // menu hover
72
+    .submenu-title-noDropdown,
73
+    .el-submenu__title {
74
+        background: transparent !important;
75
+
76
+        &:hover {
77
+            background-color: rgba(20, 74, 156, 0.4) !important;
78
+        }
79
+    }
80
+
81
+    .is-active>.el-submenu__title {
82
+        background: transparent !important;
83
+        color: $whiteColor !important;
84
+
85
+    }
86
+
87
+    .el-submenu .is-active .is-opened {
88
+        color: $blueColor !important;
89
+        background-color: $whiteColor !important;
90
+    }
91
+
92
+    .el-submenu .el-menu-item:hover {
93
+        background-color: rgba(20, 74, 156, 0.4) !important;
94
+    }
95
+}

+ 24 - 0
src/utils/loginStatusChecker.js

@@ -1,7 +1,11 @@
1 1
 import {getCurrUserDetails} from "@/api/login/login";
2
+import axios from "axios";
3
+import service from '@/utils/require'
2 4
 import router from '@/router'
3 5
 let worker = null
4 6
 
7
+const whiteList = ['/userInfo/getCode', '/userInfo/login', '/userInfo/getLoginInfo']
8
+
5 9
 const isWhiteList = () => {
6 10
   if(! router) return false
7 11
   if(! router.currentRoute) return false
@@ -25,6 +29,26 @@ export const startCheck = (delay = 30000) => {
25 29
   }, delay)
26 30
 }
27 31
 
32
+export const startCheckPreApi = () => {
33
+  service.interceptors.request.use(async (config) => {
34
+    const url = config.url
35
+    console.log('拦截器 1', url)
36
+    if(whiteList.some(u => url.includes(u))) {
37
+      return config
38
+    }
39
+    // const api = require('../api/login/login')
40
+    const online = await getCurrUserDetails()
41
+    if(isInvalidLogin(online)) {
42
+      clearCacheAndGotoLogin()
43
+      return Promise.reject(new axios.Cancel('请重新登录'))
44
+      // Promise.resolve(config)
45
+    }
46
+    return Promise.resolve(config)
47
+  }, err => {
48
+    Promise.reject(err)
49
+  })
50
+}
51
+
28 52
 export const stopCheck = () => {
29 53
   if(! worker) {
30 54
     window.clearInterval(this.worker)

+ 1 - 1
src/utils/menuMock.js

@@ -100,7 +100,7 @@ const modules1 = [
100 100
   transferManagementModule,
101 101
   // settlementManagementModule,
102 102
   // statisticsManagementModule,
103
-  // financialManagementModule,
103
+  financialManagementModule,
104 104
   progressManagementModule,
105 105
   consumerManagementModule,
106 106
   alertingModule,

+ 3 - 1
src/utils/require.js

@@ -24,7 +24,9 @@ const service = axios.create({
24 24
 
25 25
 // request拦截器
26 26
 if (!window.flag) {
27
+
27 28
 	service.interceptors.request.use(config => {
29
+    console.log('拦截器 2')
28 30
 		if (config.method === 'get') {
29 31
 		config.params = {
30 32
 			_t: Date.parse(new Date()) / 1000,
@@ -75,7 +77,7 @@ if (!window.flag) {
75 77
 
76 78
 		return config
77 79
 	}, error => {
78
-		Promise.reject(error)
80
+		return Promise.reject(error)
79 81
 	})
80 82
 }
81 83
 

+ 1 - 1
src/utils/ruleDatas.js

@@ -1,5 +1,5 @@
1 1
 
2
-export const required_data = { required: true, message: '必须填写', trigger: 'blur' }
2
+export const required_data = { required: true, message: '必须填写', trigger: ['blur', 'change'] }
3 3
 
4 4
 export const number_data_del = { pattern: /^\d{3}$/, message: '长度为三位,数字', trigger: 'blur' }
5 5
 export const number_data_del_tw = { required: true, pattern: /^\d{2}$/, message: '长度为二位,数字', trigger: 'blur' }

binární
static/file/廒间信息导入模板.xlsx


binární
static/file/货位信息导入模板.xlsx


binární
static/file/货位信息导入模板_v1.xlsx


Diff nebyl zobrazen, protože je příliš veliký
+ 313 - 0
static/js/h5player/h5player.min.js


+ 642 - 0
static/js/h5player/playctrl1/DecodeWorker.js

@@ -0,0 +1,642 @@
1
+/**
2
+ * Created by wangweijie5 on 2016/12/5.
3
+ */
4
+(function (event) {
5
+    const AUDIO_TYPE = 0;	// 音频
6
+    const VIDEO_TYPE = 1;   // 视频
7
+    const PRIVT_TYPE = 2;  // 私有帧
8
+
9
+    const PLAYM4_AUDIO_FRAME = 100; // 音频帧
10
+    const PLAYM4_VIDEO_FRAME = 101; // 视频帧
11
+
12
+    const PLAYM4_OK = 1;
13
+    const PLAYM4_ORDER_ERROR = 2;
14
+    const PLAYM4_DECODE_ERROR = 44 	// 解码失败
15
+    const PLAYM4_NOT_KEYFRAME = 48; 	// 非关键帧
16
+    const PLAYM4_NEED_MORE_DATA = 31;   // 需要更多数据才能解析
17
+    const PLAYM4_NEED_NEET_LOOP = 35; //丢帧需要下个循环
18
+    const PLAYM4_SYS_NOT_SUPPORT = 16; 	// 不支持
19
+
20
+    importScripts('Decoder.js');
21
+    Module.addOnPostRun(function () {
22
+        postMessage({ 'function': "loaded" });
23
+    });
24
+
25
+    var iStreamMode = 0;  // 流模式
26
+
27
+    var bOpenMode = false;
28
+    var bOpenStream = false;
29
+
30
+    var funGetFrameData = null;
31
+    var funGetAudFrameData = null;
32
+
33
+    var bWorkerPrintLog = false;//worker层log开关
34
+
35
+    var g_nPort = -1;
36
+    var pInputData = null;
37
+    var inputBufferSize = 40960;
38
+
39
+    self.JSPlayM4_RunTimeInfoCallBack = function (nPort, pstRunTimeInfo, pUser) {
40
+        let port = nPort;
41
+        let user = pUser;
42
+        let nRunTimeModule = Module.HEAP32[pstRunTimeInfo >> 2];
43
+        let nStrVersion = Module.HEAP32[pstRunTimeInfo + 4 >> 2];
44
+        let nFrameTimeStamp = Module.HEAP32[pstRunTimeInfo + 8 >> 2];
45
+        let nFrameNum = Module.HEAP32[pstRunTimeInfo + 12 >> 2];
46
+        let nErrorCode = Module.HEAP32[pstRunTimeInfo + 16 >> 2];
47
+        // console.log("nRunTimeModule:"+nRunTimeModule+",nFrameNum:"+nFrameNum+",nErrorCode:"+nErrorCode);
48
+        postMessage({ 'function': "RunTimeInfoCallBack", 'nRunTimeModule': nRunTimeModule, 'nStrVersion': nStrVersion, 'nFrameTimeStamp': nFrameTimeStamp, 'nFrameNum': nFrameNum, 'nErrorCode': nErrorCode });
49
+    }
50
+
51
+    onmessage = function (event) {
52
+        var eventData = event.data;
53
+        var res = 0;
54
+        switch (eventData.command) {
55
+            case "printLog":
56
+                let downloadFlag = eventData.data;
57
+                if (downloadFlag === true) {
58
+                    bWorkerPrintLog = true;
59
+                    res = Module._SetPrintLogFlag(g_nPort, downloadFlag);
60
+                }
61
+                else {
62
+                    bWorkerPrintLog = false;
63
+                    res = Module._SetPrintLogFlag(g_nPort, downloadFlag);
64
+                }
65
+
66
+                if (res !== PLAYM4_OK) {
67
+                    console.log("DecodeWorker.js: PlayerSDK print log failed,res" + res);
68
+                    postMessage({ 'function': "printLog", 'errorCode': res });
69
+                }
70
+                break;
71
+            case "SetPlayPosition":
72
+                let nFrameNumOrTime = eventData.data;
73
+                let enPosType = eventData.type;
74
+                // res = Module._SetPlayPosition(nFrameNumOrTime,enPosType);
75
+                // if (res !== PLAYM4_OK)
76
+                // {
77
+                //     postMessage({'function': "SetPlayPosition", 'errorCode': res});
78
+                //     return;
79
+                // }
80
+                // //有没有buffer需要清除
81
+
82
+                break;
83
+            case "SetStreamOpenMode":
84
+                //获取端口号
85
+                g_nPort = Module._GetPort();
86
+                //设置流打开模式
87
+                iStreamMode = eventData.data;
88
+                res = Module._SetStreamOpenMode(g_nPort, iStreamMode);
89
+                if (res !== PLAYM4_OK) {
90
+                    postMessage({ 'function': "SetStreamOpenMode", 'errorCode': res });
91
+                    return;
92
+                }
93
+                bOpenMode = true;
94
+                break;
95
+
96
+            case "OpenStream":
97
+                // 接收到的数据
98
+                var iHeadLen = eventData.dataSize;
99
+                var pHead = Module._malloc(iHeadLen + 4);
100
+                if (pHead === null) {
101
+                    return;
102
+                }
103
+                var aHead = Module.HEAPU8.subarray(pHead, pHead + iHeadLen);
104
+                aHead.set(new Uint8Array(eventData.data));
105
+                res = Module._OpenStream(g_nPort, pHead, iHeadLen, eventData.bufPoolSize);
106
+                postMessage({ 'function': "OpenStream", 'errorCode': res });
107
+                if (res !== PLAYM4_OK) {
108
+                    //释放内存
109
+                    Module._free(pHead);
110
+                    pHead = null;
111
+                    return;
112
+                }
113
+                bOpenStream = true;
114
+                break;
115
+            case "Play":
116
+                let resP = Module._Play(g_nPort);
117
+                if (resP !== PLAYM4_OK) {
118
+                    return;
119
+                }
120
+                break;
121
+            case "InputData":
122
+                // 接收到的数据
123
+                var iLen = eventData.dataSize;
124
+                if (iLen > 0) {
125
+                    if (pInputData == null || iLen > inputBufferSize) {
126
+                        if (pInputData != null) {
127
+                            Module._free(pInputData);
128
+                            pInputData = null;
129
+                        }
130
+                        if (iLen > inputBufferSize) {
131
+                            inputBufferSize = iLen;
132
+                        }
133
+
134
+                        pInputData = Module._malloc(inputBufferSize);
135
+                        if (pInputData === null) {
136
+                            return;
137
+                        }
138
+                    }
139
+
140
+                    var inputData = new Uint8Array(eventData.data);
141
+                    // var aInputData = Module.HEAPU8.subarray(pInputData, pInputData + iLen);
142
+                    // aInputData.set(inputData);
143
+                    Module.writeArrayToMemory(inputData, pInputData);
144
+                    inputData = null;
145
+                    res = Module._InputData(g_nPort, pInputData, iLen);
146
+                    if (res !== PLAYM4_OK) {
147
+                        let errorCode = Module._GetLastError(g_nPort);
148
+                        let sourceRemain = Module._GetSourceBufferRemain(g_nPort);
149
+                        postMessage({ 'function': "InputData", 'errorCode': errorCode, "sourceRemain": sourceRemain });
150
+                    }
151
+                    //Module._free(pInputData);
152
+                    //pInputData = null;
153
+                } else {
154
+                    let sourceRemain = Module._GetSourceBufferRemain(g_nPort);
155
+                    if (sourceRemain == 0) {
156
+                        postMessage({ 'function': "InputData", 'errorCode': PLAYM4_NEED_MORE_DATA });
157
+                        return;
158
+                    }
159
+                }
160
+
161
+                /////////////////////
162
+                // if (funGetFrameData === null) {
163
+                //     funGetFrameData = Module.cwrap('GetFrameData', 'number');
164
+                // }
165
+
166
+                while (bOpenMode && bOpenStream) {
167
+
168
+                    var ret = getFrameData();
169
+                    // 直到获取视频帧或数据不足为止
170
+                    if (PLAYM4_VIDEO_FRAME === ret || PLAYM4_NEED_MORE_DATA === ret || PLAYM4_ORDER_ERROR === ret)//PLAYM4_VIDEO_FRAME === ret ||  || PLAYM4_NEED_NEET_LOOP === ret
171
+                    {
172
+                        break;
173
+                    }
174
+                }
175
+                break;
176
+
177
+            case "SetSecretKey":
178
+                var keyLen = eventData.nKeyLen;
179
+                var pKeyData = Module._malloc(keyLen);
180
+                if (pKeyData === null) {
181
+                    return;
182
+                }
183
+                var nKeySize = eventData.data.length
184
+                var bufData = stringToBytes(eventData.data);
185
+                var aKeyData = Module.HEAPU8.subarray(pKeyData, pKeyData + keyLen);
186
+                let u8array = new Uint8Array(keyLen);
187
+                aKeyData.set(u8array, 0);
188
+                aKeyData.set(new Uint8Array(bufData));
189
+                aKeyData = null;
190
+                u8array = null;
191
+
192
+                res = Module._SetSecretKey(g_nPort, eventData.nKeyType, pKeyData, keyLen);//, nKeySize
193
+                if (res !== PLAYM4_OK) {
194
+                    postMessage({ 'function': "SetSecretKey", 'errorCode': res });
195
+                    Module._free(pKeyData);
196
+                    pKeyData = null;
197
+                    return;
198
+                }
199
+
200
+                Module._free(pKeyData);
201
+                pKeyData = null;
202
+                break;
203
+
204
+            case "GetBMP":
205
+                var nBMPWidth = eventData.width;
206
+                var nBMPHeight = eventData.height;
207
+                var pYUVData = eventData.data;
208
+                var nYUVSize = nBMPWidth * nBMPHeight * 3 / 2;
209
+                var oJpegCropRect = {
210
+                    left: eventData.left,
211
+                    top: eventData.top,
212
+                    right: eventData.right,
213
+                    bottom: eventData.bottom
214
+                };
215
+
216
+                var pDataYUV = Module._malloc(nYUVSize);
217
+                if (pDataYUV === null) {
218
+                    return;
219
+                }
220
+
221
+                Module.writeArrayToMemory(new Uint8Array(pYUVData, 0, nYUVSize), pDataYUV);
222
+
223
+                // 分配BMP空间
224
+                var nBmpSize = nBMPWidth * nBMPHeight * 4 + 60;
225
+                var pBmpData = Module._malloc(nBmpSize);
226
+                var pBmpSize = Module._malloc(4);
227
+                if (pBmpData === null || pBmpSize === null) {
228
+                    Module._free(pDataYUV);
229
+                    pDataYUV = null;
230
+
231
+                    if (pBmpData != null) {
232
+                        Module._free(pBmpData);
233
+                        pBmpData = null;
234
+                    }
235
+
236
+                    if (pBmpSize != null) {
237
+                        Module._free(pBmpSize);
238
+                        pBmpSize = null;
239
+                    }
240
+                    return;
241
+                }
242
+
243
+                //Module._memset(pBmpSize, nBmpSize, 4); // 防止bmp截图出现输入数据过大的错误码
244
+                Module.setValue(pBmpSize, nBmpSize, "i32");
245
+                res = Module._GetBMP(g_nPort, pDataYUV, nYUVSize, pBmpData, pBmpSize,
246
+                    oBMPCropRect.left, oBMPCropRect.top, oBMPCropRect.right, oBMPCropRect.bottom);
247
+                if (res !== PLAYM4_OK) {
248
+                    postMessage({ 'function': "GetBMP", 'errorCode': res });
249
+                    Module._free(pDataYUV);
250
+                    pDataYUV = null;
251
+                    Module._free(pBmpData);
252
+                    pBmpData = null;
253
+                    Module._free(pBmpSize);
254
+                    pBmpSize = null;
255
+                    return;
256
+                }
257
+
258
+                // 获取BMP图片大小
259
+                var nBmpDataSize = Module.getValue(pBmpSize, "i32");
260
+
261
+                // 获取BMP图片数据
262
+                var aBmpData = new Uint8Array(nBmpDataSize);
263
+                aBmpData.set(Module.HEAPU8.subarray(pBmpData, pBmpData + nBmpDataSize));
264
+
265
+                postMessage({ 'function': "GetBMP", 'data': aBmpData, 'errorCode': res }, [aBmpData.buffer]);
266
+                aBmpData = null;
267
+                if (pDataYUV != null) {
268
+                    Module._free(pDataYUV);
269
+                    pDataYUV = null;
270
+                }
271
+                if (pBmpData != null) {
272
+                    Module._free(pBmpData);
273
+                    pBmpData = null;
274
+                }
275
+                if (pBmpSize != null) {
276
+                    Module._free(pBmpSize);
277
+                    pBmpSize = null;
278
+                }
279
+                break;
280
+
281
+            case "GetJPEG":
282
+                var nJpegWidth = eventData.width;
283
+                var nJpegHeight = eventData.height;
284
+                var pYUVData1 = eventData.data;
285
+                var nYUVSize1 = nJpegWidth * nJpegHeight * 3 / 2;
286
+                var oJpegCropRect = {
287
+                    left: eventData.left,
288
+                    top: eventData.top,
289
+                    right: eventData.right,
290
+                    bottom: eventData.bottom
291
+                };
292
+
293
+                var pDataYUV1 = Module._malloc(nYUVSize1);
294
+                if (pDataYUV1 === null) {
295
+                    return;
296
+                }
297
+
298
+                Module.writeArrayToMemory(new Uint8Array(pYUVData1, 0, nYUVSize1), pDataYUV1);
299
+
300
+                // 分配JPEG空间
301
+                var pJpegData = Module._malloc(nYUVSize1);
302
+                var pJpegSize = Module._malloc(4);
303
+                if (pJpegData === null || pJpegSize === null) {
304
+                    if (pJpegData != null) {
305
+                        Module._free(pJpegData);
306
+                        pJpegData = null;
307
+                    }
308
+
309
+                    if (pJpegSize != null) {
310
+                        Module._free(pJpegSize);
311
+                        pJpegSize = null;
312
+                    }
313
+
314
+                    if (pDataYUV1 != null) {
315
+                        Module._free(pDataYUV1);
316
+                        pDataYUV1 = null;
317
+                    }
318
+                    return;
319
+                }
320
+
321
+                Module.setValue(pJpegSize, nJpegWidth * nJpegHeight * 2, "i32");    // JPEG抓图,输入缓冲长度不小于当前帧YUV大小
322
+
323
+                res = Module._GetJPEG(g_nPort, pDataYUV1, nYUVSize1, pJpegData, pJpegSize,
324
+                    oJpegCropRect.left, oJpegCropRect.top, oJpegCropRect.right, oJpegCropRect.bottom);
325
+                if (res !== PLAYM4_OK) {
326
+                    postMessage({ 'function': "GetJPEG", 'errorCode': res });
327
+                    if (pJpegData != null) {
328
+                        Module._free(pJpegData);
329
+                        pJpegData = null;
330
+                    }
331
+
332
+                    if (pJpegSize != null) {
333
+                        Module._free(pJpegSize);
334
+                        pJpegSize = null;
335
+                    }
336
+
337
+                    if (pDataYUV1 != null) {
338
+                        Module._free(pDataYUV1);
339
+                        pDataYUV1 = null;
340
+                    }
341
+                    return;
342
+                }
343
+
344
+                // 获取JPEG图片大小
345
+                var nJpegSize = Module.getValue(pJpegSize, "i32");
346
+
347
+                // 获取JPEG图片数据
348
+                var aJpegData = new Uint8Array(nJpegSize);
349
+                aJpegData.set(Module.HEAPU8.subarray(pJpegData, pJpegData + nJpegSize));
350
+
351
+                postMessage({ 'function': "GetJPEG", 'data': aJpegData, 'errorCode': res }, [aJpegData.buffer]);
352
+
353
+                nJpegSize = null;
354
+                aJpegData = null;
355
+
356
+                if (pDataYUV1 != null) {
357
+                    Module._free(pDataYUV1);
358
+                    pDataYUV1 = null;
359
+                }
360
+                if (pJpegData != null) {
361
+                    Module._free(pJpegData);
362
+                    pJpegData = null;
363
+                }
364
+                if (pJpegSize != null) {
365
+                    Module._free(pJpegSize);
366
+                    pJpegSize = null;
367
+                }
368
+                break;
369
+
370
+            case "SetDecodeFrameType":
371
+                var nFrameType = eventData.data;
372
+                res = Module._SetDecodeFrameType(g_nPort, nFrameType);
373
+                if (res !== PLAYM4_OK) {
374
+                    postMessage({ 'function': "SetDecodeFrameType", 'errorCode': res });
375
+                    return;
376
+                }
377
+                break;
378
+            case "CloseStream":
379
+                //stop
380
+                let resS = Module._Stop(g_nPort);
381
+                if (resS !== PLAYM4_OK) {
382
+                    postMessage({ 'function': "Stop", 'errorCode': res });
383
+                    return;
384
+                }
385
+                //closeStream
386
+                res = Module._CloseStream(g_nPort);
387
+                if (res !== PLAYM4_OK) {
388
+                    postMessage({ 'function': "CloseStream", 'errorCode': res });
389
+                    return;
390
+                }
391
+                //freePort
392
+                let resF = Module._FreePort(g_nPort);
393
+                if (resF !== PLAYM4_OK) {
394
+                    postMessage({ 'function': "FreePort", 'errorCode': res });
395
+                    return;
396
+                }
397
+                if (pInputData != null) {
398
+                    Module._free(pInputData);
399
+                    pInputData = null;
400
+                }
401
+                break;
402
+            case "PlaySound":
403
+                let resPS = Module._PlaySound(g_nPort);
404
+                if (resPS !== PLAYM4_OK) {
405
+                    console.log("PlaySound failed");
406
+                    return;
407
+                }
408
+                break;
409
+            case "StopSound":
410
+                let resSS = Module._StopSound();
411
+                if (resSS !== PLAYM4_OK) {
412
+                    console.log("StopSound failed");
413
+                    return;
414
+                }
415
+                break;
416
+            case "SetVolume":
417
+                let resSV = Module._SetVolume(g_nPort, eventData.volume);
418
+                if (resSV !== PLAYM4_OK) {
419
+                    console.log("Audio SetVolume failed");
420
+                    return;
421
+                }
422
+                break;
423
+            case "GetVolume":
424
+                let volume = Module._GetVolume();
425
+                if (volume > 0) {
426
+                    postMessage({ 'function': "GetVolume", 'volume': volume });
427
+                }
428
+                else {
429
+                    console.log("Audio GetVolume failed");
430
+                    return;
431
+                }
432
+                break;
433
+            case "OnlyPlaySound":
434
+                let resOPS = Module._OnlyPlaySound(g_nPort);
435
+                if (resOPS !== PLAYM4_OK) {
436
+                    console.log("OnlyPlaySound failed");
437
+                    return;
438
+                }
439
+                break;
440
+            case "Pause":
441
+                let resPa = Module._Pause(g_nPort, eventData.bPlay);
442
+                if (resPa !== PLAYM4_OK) {
443
+                    console.log("Pause failed");
444
+                    return;
445
+                }
446
+            case "PlayRate":
447
+                Module._SetPlayRate(g_nPort, eventData.playRate);
448
+                break;
449
+            case "SetIFrameDecInterval":
450
+                Module._SetIFrameDecInterval(g_nPort, eventData.data);
451
+                break;
452
+            case "SetLostFrameMode":
453
+                Module._SetLostFrameMode(g_nPort, eventData.data, 0);
454
+                break;
455
+            case "SetDemuxModel":
456
+                Module._SetDemuxModel(g_nPort, eventData.nIdemuxType, eventData.bTrue);
457
+                break;
458
+            case "SkipErrorData":
459
+                Module._SkipErrorData(g_nPort, eventData.bSkip);
460
+                break;
461
+            case "SetDecodeERC":
462
+                Module._SetDecodeERC(g_nPort, eventData.nLevel);
463
+                break;
464
+            case "SetANRParam":
465
+                Module._SetANRParam(g_nPort, eventData.nEnable, eventData.nANRLevel);
466
+                break;
467
+            case "SetResampleValue":
468
+                Module._SetResampleValue(g_nPort, eventData.nEnable, eventData.resampleValue);
469
+                break;
470
+            case "GetLastError":
471
+                let errorCode = Module._GetLastError(g_nPort);
472
+                postMessage({ 'function': "GetLastError", 'errorCode': errorCode });
473
+                break;
474
+            case "SetGlobalBaseTime":
475
+                Module._SetGlobalBaseTime(g_nPort, eventData.year, eventData.month, eventData.day, eventData.hour, eventData.min, eventData.sec, eventData.ms);
476
+                break;
477
+            case "SetRunTimeInfoCB":
478
+                Module._SetRunTimeInfoCallBackEx(g_nPort, eventData.nModuleType, 0);
479
+                break;
480
+            default:
481
+                break;
482
+        }
483
+    };
484
+
485
+    function getOSDTime(oFrameInfo) {
486
+        var iYear = oFrameInfo.year;
487
+        var iMonth = oFrameInfo.month;
488
+        var iDay = oFrameInfo.day;
489
+        var iHour = oFrameInfo.hour;
490
+        var iMinute = oFrameInfo.minute;
491
+        var iSecond = oFrameInfo.second;
492
+
493
+        if (iMonth < 10) {
494
+            iMonth = "0" + iMonth;
495
+        }
496
+        if (iDay < 10) {
497
+            iDay = "0" + iDay;
498
+        }
499
+        if (iHour < 10) {
500
+            iHour = "0" + iHour;
501
+        }
502
+        if (iMinute < 10) {
503
+            iMinute = "0" + iMinute;
504
+        }
505
+        if (iSecond < 10) {
506
+            iSecond = "0" + iSecond;
507
+        }
508
+
509
+        return iYear + "-" + iMonth + "-" + iDay + " " + iHour + ":" + iMinute + ":" + iSecond;
510
+    }
511
+    // 获取帧数据
512
+    function getFrameData() {
513
+        // function getFrameData() {
514
+        // 获取帧数据
515
+        var res = Module._GetFrameData();
516
+        //var res = fun();
517
+        if (res === PLAYM4_OK) {
518
+            var oFrameInfo = Module._GetFrameInfo();
519
+            switch (oFrameInfo.frameType) {
520
+                case AUDIO_TYPE:
521
+                    var iSize = oFrameInfo.frameSize;
522
+                    if (0 === iSize) {
523
+                        return -1;
524
+                    }
525
+                    var pPCM = Module._GetFrameBuffer();
526
+                    // var audioBuf = new ArrayBuffer(iSize);
527
+                    var aPCMData = new Uint8Array(iSize);
528
+                    aPCMData.set(Module.HEAPU8.subarray(pPCM, pPCM + iSize));
529
+                    if (bWorkerPrintLog) {
530
+                        console.log("<<<Worker: audio media Info: nSise:" + oFrameInfo.frameSize + ",nSampleRate:" + oFrameInfo.samplesPerSec + ',channel:' + oFrameInfo.channels + ',bitsPerSample:' + oFrameInfo.bitsPerSample);
531
+                    }
532
+                    postMessage({
533
+                        'function': "GetFrameData", 'type': "audioType", 'data': aPCMData.buffer,
534
+                        'frameInfo': oFrameInfo, 'errorCode': res
535
+                    }, [aPCMData.buffer]);
536
+
537
+                    oFrameInfo = null;
538
+                    pPCM = null;
539
+                    aPCMData = null;
540
+                    return PLAYM4_AUDIO_FRAME;
541
+
542
+                case VIDEO_TYPE:
543
+                    var szOSDTime = getOSDTime(oFrameInfo);
544
+
545
+                    var iWidth = oFrameInfo.width;
546
+                    var iHeight = oFrameInfo.height;
547
+
548
+                    var iYUVSize = iWidth * iHeight * 3 / 2;
549
+                    if (0 === iYUVSize) {
550
+                        return -1;
551
+                    }
552
+
553
+                    var pYUV = Module._GetFrameBuffer();
554
+
555
+                    // 图像数据渲染后压回,若从主码流切到子码流,存在数组大小与图像大小不匹配现象
556
+                    var aYUVData = new Uint8Array(iYUVSize);
557
+                    aYUVData.set(Module.HEAPU8.subarray(pYUV, pYUV + iYUVSize));
558
+                    if (bWorkerPrintLog) {
559
+                        console.log("<<<Worker: video media Info: Width:" + oFrameInfo.width + ",Height:" + oFrameInfo.height + ",timeStamp:" + oFrameInfo.timeStamp);
560
+                    }
561
+
562
+                    postMessage({
563
+                        'function': "GetFrameData", 'type': "videoType", 'data': aYUVData.buffer,
564
+                        'dataLen': aYUVData.length, 'osd': szOSDTime, 'frameInfo': oFrameInfo, 'errorCode': res
565
+                    }, [aYUVData.buffer]);
566
+
567
+                    oFrameInfo = null;
568
+                    pYUV = null;
569
+                    aYUVData = null;
570
+                    return PLAYM4_VIDEO_FRAME;
571
+
572
+                case PRIVT_TYPE:
573
+                    postMessage({
574
+                        'function': "GetFrameData", 'type': "", 'data': null,
575
+                        'dataLen': -1, 'osd': 0, 'frameInfo': null, 'errorCode': PLAYM4_SYS_NOT_SUPPORT
576
+                    });
577
+                    return PLAYM4_SYS_NOT_SUPPORT;
578
+
579
+                default:
580
+                    postMessage({
581
+                        'function': "GetFrameData", 'type': "", 'data': null,
582
+                        'dataLen': -1, 'osd': 0, 'frameInfo': null, 'errorCode': PLAYM4_SYS_NOT_SUPPORT
583
+                    });
584
+                    return PLAYM4_SYS_NOT_SUPPORT;
585
+            }
586
+        }
587
+        else {
588
+            let errorCode = Module._GetLastError(g_nPort);
589
+            //解码失败返回裸数据
590
+            if (PLAYM4_DECODE_ERROR === errorCode) {
591
+                var rawInfo = Module._GetRawDataInfo();
592
+                var pRawData = Module._GetRawDataBuffer();
593
+                var aRawData = new Uint8Array(rawInfo.isize);
594
+                aRawData.set(Module.HEAPU8.subarray(pRawData, pRawData + rawInfo.isize));
595
+                postMessage({
596
+                    'function': "GetRawData", 'type': "", 'data': aRawData.buffer,
597
+                    'rawDataLen': rawInfo.isize, 'osd': 0, 'frameInfo': null, 'errorCode': errorCode
598
+                });
599
+                rawInfo = null;
600
+                pRawData = null;
601
+                aRawData = null;
602
+            }
603
+            //需要更多数据
604
+            if (PLAYM4_NEED_MORE_DATA === errorCode || PLAYM4_SYS_NOT_SUPPORT === errorCode || PLAYM4_NEED_NEET_LOOP === errorCode) {
605
+                postMessage({
606
+                    'function': "GetFrameData", 'type': "", 'data': null,
607
+                    'dataLen': -1, 'osd': 0, 'frameInfo': null, 'errorCode': errorCode
608
+                });
609
+            }
610
+            return errorCode;
611
+        }
612
+    }
613
+
614
+    // 开始计算时间
615
+    function startTime() {
616
+        return new Date().getTime();
617
+    }
618
+
619
+    // 结束计算时间
620
+    function endTime() {
621
+        return new Date().getTime();
622
+    }
623
+
624
+    // 字母字符串转byte数组
625
+    function stringToBytes(str) {
626
+        var ch, st, re = [];
627
+        for (var i = 0; i < str.length; i++) {
628
+            ch = str.charCodeAt(i);  // get char
629
+            st = [];                 // set up "stack"
630
+            do {
631
+                st.push(ch & 0xFF);  // push byte to stack
632
+                ch = ch >> 8;          // shift value down by 1 byte
633
+            }
634
+            while (ch);
635
+            // add stack contents to result
636
+            // done because chars have "wrong" endianness
637
+            re = re.concat(st.reverse());
638
+        }
639
+        // return an array of bytes
640
+        return re;
641
+    }
642
+})();

Diff nebyl zobrazen, protože je příliš veliký
+ 1 - 0
static/js/h5player/playctrl1/Decoder.js


+ 642 - 0
static/js/h5player/playctrl1simd/DecodeWorker.js

@@ -0,0 +1,642 @@
1
+/**
2
+ * Created by wangweijie5 on 2016/12/5.
3
+ */
4
+(function (event) {
5
+    const AUDIO_TYPE = 0;	// 音频
6
+    const VIDEO_TYPE = 1;   // 视频
7
+    const PRIVT_TYPE = 2;  // 私有帧
8
+
9
+    const PLAYM4_AUDIO_FRAME = 100; // 音频帧
10
+    const PLAYM4_VIDEO_FRAME = 101; // 视频帧
11
+
12
+    const PLAYM4_OK = 1;
13
+    const PLAYM4_ORDER_ERROR = 2;
14
+    const PLAYM4_DECODE_ERROR = 44 	// 解码失败
15
+    const PLAYM4_NOT_KEYFRAME = 48; 	// 非关键帧
16
+    const PLAYM4_NEED_MORE_DATA = 31;   // 需要更多数据才能解析
17
+    const PLAYM4_NEED_NEET_LOOP = 35; //丢帧需要下个循环
18
+    const PLAYM4_SYS_NOT_SUPPORT = 16; 	// 不支持
19
+
20
+    importScripts('Decoder.js');
21
+    Module.addOnPostRun(function () {
22
+        postMessage({ 'function': "loaded" });
23
+    });
24
+
25
+    var iStreamMode = 0;  // 流模式
26
+
27
+    var bOpenMode = false;
28
+    var bOpenStream = false;
29
+
30
+    var funGetFrameData = null;
31
+    var funGetAudFrameData = null;
32
+
33
+    var bWorkerPrintLog = false;//worker层log开关
34
+
35
+    var g_nPort = -1;
36
+    var pInputData = null;
37
+    var inputBufferSize = 40960;
38
+
39
+    self.JSPlayM4_RunTimeInfoCallBack = function (nPort, pstRunTimeInfo, pUser) {
40
+        let port = nPort;
41
+        let user = pUser;
42
+        let nRunTimeModule = Module.HEAP32[pstRunTimeInfo >> 2];
43
+        let nStrVersion = Module.HEAP32[pstRunTimeInfo + 4 >> 2];
44
+        let nFrameTimeStamp = Module.HEAP32[pstRunTimeInfo + 8 >> 2];
45
+        let nFrameNum = Module.HEAP32[pstRunTimeInfo + 12 >> 2];
46
+        let nErrorCode = Module.HEAP32[pstRunTimeInfo + 16 >> 2];
47
+        // console.log("nRunTimeModule:"+nRunTimeModule+",nFrameNum:"+nFrameNum+",nErrorCode:"+nErrorCode);
48
+        postMessage({ 'function': "RunTimeInfoCallBack", 'nRunTimeModule': nRunTimeModule, 'nStrVersion': nStrVersion, 'nFrameTimeStamp': nFrameTimeStamp, 'nFrameNum': nFrameNum, 'nErrorCode': nErrorCode });
49
+    }
50
+
51
+    onmessage = function (event) {
52
+        var eventData = event.data;
53
+        var res = 0;
54
+        switch (eventData.command) {
55
+            case "printLog":
56
+                let downloadFlag = eventData.data;
57
+                if (downloadFlag === true) {
58
+                    bWorkerPrintLog = true;
59
+                    res = Module._SetPrintLogFlag(g_nPort, downloadFlag);
60
+                }
61
+                else {
62
+                    bWorkerPrintLog = false;
63
+                    res = Module._SetPrintLogFlag(g_nPort, downloadFlag);
64
+                }
65
+
66
+                if (res !== PLAYM4_OK) {
67
+                    console.log("DecodeWorker.js: PlayerSDK print log failed,res" + res);
68
+                    postMessage({ 'function': "printLog", 'errorCode': res });
69
+                }
70
+                break;
71
+            case "SetPlayPosition":
72
+                let nFrameNumOrTime = eventData.data;
73
+                let enPosType = eventData.type;
74
+                // res = Module._SetPlayPosition(nFrameNumOrTime,enPosType);
75
+                // if (res !== PLAYM4_OK)
76
+                // {
77
+                //     postMessage({'function': "SetPlayPosition", 'errorCode': res});
78
+                //     return;
79
+                // }
80
+                // //有没有buffer需要清除
81
+
82
+                break;
83
+            case "SetStreamOpenMode":
84
+                //获取端口号
85
+                g_nPort = Module._GetPort();
86
+                //设置流打开模式
87
+                iStreamMode = eventData.data;
88
+                res = Module._SetStreamOpenMode(g_nPort, iStreamMode);
89
+                if (res !== PLAYM4_OK) {
90
+                    postMessage({ 'function': "SetStreamOpenMode", 'errorCode': res });
91
+                    return;
92
+                }
93
+                bOpenMode = true;
94
+                break;
95
+
96
+            case "OpenStream":
97
+                // 接收到的数据
98
+                var iHeadLen = eventData.dataSize;
99
+                var pHead = Module._malloc(iHeadLen + 4);
100
+                if (pHead === null) {
101
+                    return;
102
+                }
103
+                var aHead = Module.HEAPU8.subarray(pHead, pHead + iHeadLen);
104
+                aHead.set(new Uint8Array(eventData.data));
105
+                res = Module._OpenStream(g_nPort, pHead, iHeadLen, eventData.bufPoolSize);
106
+                postMessage({ 'function': "OpenStream", 'errorCode': res });
107
+                if (res !== PLAYM4_OK) {
108
+                    //释放内存
109
+                    Module._free(pHead);
110
+                    pHead = null;
111
+                    return;
112
+                }
113
+                bOpenStream = true;
114
+                break;
115
+            case "Play":
116
+                let resP = Module._Play(g_nPort);
117
+                if (resP !== PLAYM4_OK) {
118
+                    return;
119
+                }
120
+                break;
121
+            case "InputData":
122
+                // 接收到的数据
123
+                var iLen = eventData.dataSize;
124
+                if (iLen > 0) {
125
+                    if (pInputData == null || iLen > inputBufferSize) {
126
+                        if (pInputData != null) {
127
+                            Module._free(pInputData);
128
+                            pInputData = null;
129
+                        }
130
+                        if (iLen > inputBufferSize) {
131
+                            inputBufferSize = iLen;
132
+                        }
133
+
134
+                        pInputData = Module._malloc(inputBufferSize);
135
+                        if (pInputData === null) {
136
+                            return;
137
+                        }
138
+                    }
139
+
140
+                    var inputData = new Uint8Array(eventData.data);
141
+                    // var aInputData = Module.HEAPU8.subarray(pInputData, pInputData + iLen);
142
+                    // aInputData.set(inputData);
143
+                    Module.writeArrayToMemory(inputData, pInputData);
144
+                    inputData = null;
145
+                    res = Module._InputData(g_nPort, pInputData, iLen);
146
+                    if (res !== PLAYM4_OK) {
147
+                        let errorCode = Module._GetLastError(g_nPort);
148
+                        let sourceRemain = Module._GetSourceBufferRemain(g_nPort);
149
+                        postMessage({ 'function': "InputData", 'errorCode': errorCode, "sourceRemain": sourceRemain });
150
+                    }
151
+                    //Module._free(pInputData);
152
+                    //pInputData = null;
153
+                } else {
154
+                    let sourceRemain = Module._GetSourceBufferRemain(g_nPort);
155
+                    if (sourceRemain == 0) {
156
+                        postMessage({ 'function': "InputData", 'errorCode': PLAYM4_NEED_MORE_DATA });
157
+                        return;
158
+                    }
159
+                }
160
+
161
+                /////////////////////
162
+                // if (funGetFrameData === null) {
163
+                //     funGetFrameData = Module.cwrap('GetFrameData', 'number');
164
+                // }
165
+
166
+                while (bOpenMode && bOpenStream) {
167
+
168
+                    var ret = getFrameData();
169
+                    // 直到获取视频帧或数据不足为止
170
+                    if (PLAYM4_VIDEO_FRAME === ret || PLAYM4_NEED_MORE_DATA === ret || PLAYM4_ORDER_ERROR === ret)//PLAYM4_VIDEO_FRAME === ret ||  || PLAYM4_NEED_NEET_LOOP === ret
171
+                    {
172
+                        break;
173
+                    }
174
+                }
175
+                break;
176
+
177
+            case "SetSecretKey":
178
+                var keyLen = eventData.nKeyLen;
179
+                var pKeyData = Module._malloc(keyLen);
180
+                if (pKeyData === null) {
181
+                    return;
182
+                }
183
+                var nKeySize = eventData.data.length
184
+                var bufData = stringToBytes(eventData.data);
185
+                var aKeyData = Module.HEAPU8.subarray(pKeyData, pKeyData + keyLen);
186
+                let u8array = new Uint8Array(keyLen);
187
+                aKeyData.set(u8array, 0);
188
+                aKeyData.set(new Uint8Array(bufData));
189
+                aKeyData = null;
190
+                u8array = null;
191
+
192
+                res = Module._SetSecretKey(g_nPort, eventData.nKeyType, pKeyData, keyLen);//, nKeySize
193
+                if (res !== PLAYM4_OK) {
194
+                    postMessage({ 'function': "SetSecretKey", 'errorCode': res });
195
+                    Module._free(pKeyData);
196
+                    pKeyData = null;
197
+                    return;
198
+                }
199
+
200
+                Module._free(pKeyData);
201
+                pKeyData = null;
202
+                break;
203
+
204
+            case "GetBMP":
205
+                var nBMPWidth = eventData.width;
206
+                var nBMPHeight = eventData.height;
207
+                var pYUVData = eventData.data;
208
+                var nYUVSize = nBMPWidth * nBMPHeight * 3 / 2;
209
+                var oJpegCropRect = {
210
+                    left: eventData.left,
211
+                    top: eventData.top,
212
+                    right: eventData.right,
213
+                    bottom: eventData.bottom
214
+                };
215
+
216
+                var pDataYUV = Module._malloc(nYUVSize);
217
+                if (pDataYUV === null) {
218
+                    return;
219
+                }
220
+
221
+                Module.writeArrayToMemory(new Uint8Array(pYUVData, 0, nYUVSize), pDataYUV);
222
+
223
+                // 分配BMP空间
224
+                var nBmpSize = nBMPWidth * nBMPHeight * 4 + 60;
225
+                var pBmpData = Module._malloc(nBmpSize);
226
+                var pBmpSize = Module._malloc(4);
227
+                if (pBmpData === null || pBmpSize === null) {
228
+                    Module._free(pDataYUV);
229
+                    pDataYUV = null;
230
+
231
+                    if (pBmpData != null) {
232
+                        Module._free(pBmpData);
233
+                        pBmpData = null;
234
+                    }
235
+
236
+                    if (pBmpSize != null) {
237
+                        Module._free(pBmpSize);
238
+                        pBmpSize = null;
239
+                    }
240
+                    return;
241
+                }
242
+
243
+                //Module._memset(pBmpSize, nBmpSize, 4); // 防止bmp截图出现输入数据过大的错误码
244
+                Module.setValue(pBmpSize, nBmpSize, "i32");
245
+                res = Module._GetBMP(g_nPort, pDataYUV, nYUVSize, pBmpData, pBmpSize,
246
+                    oBMPCropRect.left, oBMPCropRect.top, oBMPCropRect.right, oBMPCropRect.bottom);
247
+                if (res !== PLAYM4_OK) {
248
+                    postMessage({ 'function': "GetBMP", 'errorCode': res });
249
+                    Module._free(pDataYUV);
250
+                    pDataYUV = null;
251
+                    Module._free(pBmpData);
252
+                    pBmpData = null;
253
+                    Module._free(pBmpSize);
254
+                    pBmpSize = null;
255
+                    return;
256
+                }
257
+
258
+                // 获取BMP图片大小
259
+                var nBmpDataSize = Module.getValue(pBmpSize, "i32");
260
+
261
+                // 获取BMP图片数据
262
+                var aBmpData = new Uint8Array(nBmpDataSize);
263
+                aBmpData.set(Module.HEAPU8.subarray(pBmpData, pBmpData + nBmpDataSize));
264
+
265
+                postMessage({ 'function': "GetBMP", 'data': aBmpData, 'errorCode': res }, [aBmpData.buffer]);
266
+                aBmpData = null;
267
+                if (pDataYUV != null) {
268
+                    Module._free(pDataYUV);
269
+                    pDataYUV = null;
270
+                }
271
+                if (pBmpData != null) {
272
+                    Module._free(pBmpData);
273
+                    pBmpData = null;
274
+                }
275
+                if (pBmpSize != null) {
276
+                    Module._free(pBmpSize);
277
+                    pBmpSize = null;
278
+                }
279
+                break;
280
+
281
+            case "GetJPEG":
282
+                var nJpegWidth = eventData.width;
283
+                var nJpegHeight = eventData.height;
284
+                var pYUVData1 = eventData.data;
285
+                var nYUVSize1 = nJpegWidth * nJpegHeight * 3 / 2;
286
+                var oJpegCropRect = {
287
+                    left: eventData.left,
288
+                    top: eventData.top,
289
+                    right: eventData.right,
290
+                    bottom: eventData.bottom
291
+                };
292
+
293
+                var pDataYUV1 = Module._malloc(nYUVSize1);
294
+                if (pDataYUV1 === null) {
295
+                    return;
296
+                }
297
+
298
+                Module.writeArrayToMemory(new Uint8Array(pYUVData1, 0, nYUVSize1), pDataYUV1);
299
+
300
+                // 分配JPEG空间
301
+                var pJpegData = Module._malloc(nYUVSize1);
302
+                var pJpegSize = Module._malloc(4);
303
+                if (pJpegData === null || pJpegSize === null) {
304
+                    if (pJpegData != null) {
305
+                        Module._free(pJpegData);
306
+                        pJpegData = null;
307
+                    }
308
+
309
+                    if (pJpegSize != null) {
310
+                        Module._free(pJpegSize);
311
+                        pJpegSize = null;
312
+                    }
313
+
314
+                    if (pDataYUV1 != null) {
315
+                        Module._free(pDataYUV1);
316
+                        pDataYUV1 = null;
317
+                    }
318
+                    return;
319
+                }
320
+
321
+                Module.setValue(pJpegSize, nJpegWidth * nJpegHeight * 2, "i32");    // JPEG抓图,输入缓冲长度不小于当前帧YUV大小
322
+
323
+                res = Module._GetJPEG(g_nPort, pDataYUV1, nYUVSize1, pJpegData, pJpegSize,
324
+                    oJpegCropRect.left, oJpegCropRect.top, oJpegCropRect.right, oJpegCropRect.bottom);
325
+                if (res !== PLAYM4_OK) {
326
+                    postMessage({ 'function': "GetJPEG", 'errorCode': res });
327
+                    if (pJpegData != null) {
328
+                        Module._free(pJpegData);
329
+                        pJpegData = null;
330
+                    }
331
+
332
+                    if (pJpegSize != null) {
333
+                        Module._free(pJpegSize);
334
+                        pJpegSize = null;
335
+                    }
336
+
337
+                    if (pDataYUV1 != null) {
338
+                        Module._free(pDataYUV1);
339
+                        pDataYUV1 = null;
340
+                    }
341
+                    return;
342
+                }
343
+
344
+                // 获取JPEG图片大小
345
+                var nJpegSize = Module.getValue(pJpegSize, "i32");
346
+
347
+                // 获取JPEG图片数据
348
+                var aJpegData = new Uint8Array(nJpegSize);
349
+                aJpegData.set(Module.HEAPU8.subarray(pJpegData, pJpegData + nJpegSize));
350
+
351
+                postMessage({ 'function': "GetJPEG", 'data': aJpegData, 'errorCode': res }, [aJpegData.buffer]);
352
+
353
+                nJpegSize = null;
354
+                aJpegData = null;
355
+
356
+                if (pDataYUV1 != null) {
357
+                    Module._free(pDataYUV1);
358
+                    pDataYUV1 = null;
359
+                }
360
+                if (pJpegData != null) {
361
+                    Module._free(pJpegData);
362
+                    pJpegData = null;
363
+                }
364
+                if (pJpegSize != null) {
365
+                    Module._free(pJpegSize);
366
+                    pJpegSize = null;
367
+                }
368
+                break;
369
+
370
+            case "SetDecodeFrameType":
371
+                var nFrameType = eventData.data;
372
+                res = Module._SetDecodeFrameType(g_nPort, nFrameType);
373
+                if (res !== PLAYM4_OK) {
374
+                    postMessage({ 'function': "SetDecodeFrameType", 'errorCode': res });
375
+                    return;
376
+                }
377
+                break;
378
+            case "CloseStream":
379
+                //stop
380
+                let resS = Module._Stop(g_nPort);
381
+                if (resS !== PLAYM4_OK) {
382
+                    postMessage({ 'function': "Stop", 'errorCode': res });
383
+                    return;
384
+                }
385
+                //closeStream
386
+                res = Module._CloseStream(g_nPort);
387
+                if (res !== PLAYM4_OK) {
388
+                    postMessage({ 'function': "CloseStream", 'errorCode': res });
389
+                    return;
390
+                }
391
+                //freePort
392
+                let resF = Module._FreePort(g_nPort);
393
+                if (resF !== PLAYM4_OK) {
394
+                    postMessage({ 'function': "FreePort", 'errorCode': res });
395
+                    return;
396
+                }
397
+                if (pInputData != null) {
398
+                    Module._free(pInputData);
399
+                    pInputData = null;
400
+                }
401
+                break;
402
+            case "PlaySound":
403
+                let resPS = Module._PlaySound(g_nPort);
404
+                if (resPS !== PLAYM4_OK) {
405
+                    console.log("PlaySound failed");
406
+                    return;
407
+                }
408
+                break;
409
+            case "StopSound":
410
+                let resSS = Module._StopSound();
411
+                if (resSS !== PLAYM4_OK) {
412
+                    console.log("StopSound failed");
413
+                    return;
414
+                }
415
+                break;
416
+            case "SetVolume":
417
+                let resSV = Module._SetVolume(g_nPort, eventData.volume);
418
+                if (resSV !== PLAYM4_OK) {
419
+                    console.log("Audio SetVolume failed");
420
+                    return;
421
+                }
422
+                break;
423
+            case "GetVolume":
424
+                let volume = Module._GetVolume();
425
+                if (volume > 0) {
426
+                    postMessage({ 'function': "GetVolume", 'volume': volume });
427
+                }
428
+                else {
429
+                    console.log("Audio GetVolume failed");
430
+                    return;
431
+                }
432
+                break;
433
+            case "OnlyPlaySound":
434
+                let resOPS = Module._OnlyPlaySound(g_nPort);
435
+                if (resOPS !== PLAYM4_OK) {
436
+                    console.log("OnlyPlaySound failed");
437
+                    return;
438
+                }
439
+                break;
440
+            case "Pause":
441
+                let resPa = Module._Pause(g_nPort, eventData.bPlay);
442
+                if (resPa !== PLAYM4_OK) {
443
+                    console.log("Pause failed");
444
+                    return;
445
+                }
446
+            case "PlayRate":
447
+                Module._SetPlayRate(g_nPort, eventData.playRate);
448
+                break;
449
+            case "SetIFrameDecInterval":
450
+                Module._SetIFrameDecInterval(g_nPort, eventData.data);
451
+                break;
452
+            case "SetLostFrameMode":
453
+                Module._SetLostFrameMode(g_nPort, eventData.data, 0);
454
+                break;
455
+            case "SetDemuxModel":
456
+                Module._SetDemuxModel(g_nPort, eventData.nIdemuxType, eventData.bTrue);
457
+                break;
458
+            case "SkipErrorData":
459
+                Module._SkipErrorData(g_nPort, eventData.bSkip);
460
+                break;
461
+            case "SetDecodeERC":
462
+                Module._SetDecodeERC(g_nPort, eventData.nLevel);
463
+                break;
464
+            case "SetANRParam":
465
+                Module._SetANRParam(g_nPort, eventData.nEnable, eventData.nANRLevel);
466
+                break;
467
+            case "SetResampleValue":
468
+                Module._SetResampleValue(g_nPort, eventData.nEnable, eventData.resampleValue);
469
+                break;
470
+            case "GetLastError":
471
+                let errorCode = Module._GetLastError(g_nPort);
472
+                postMessage({ 'function': "GetLastError", 'errorCode': errorCode });
473
+                break;
474
+            case "SetGlobalBaseTime":
475
+                Module._SetGlobalBaseTime(g_nPort, eventData.year, eventData.month, eventData.day, eventData.hour, eventData.min, eventData.sec, eventData.ms);
476
+                break;
477
+            case "SetRunTimeInfoCB":
478
+                Module._SetRunTimeInfoCallBackEx(g_nPort, eventData.nModuleType, 0);
479
+                break;
480
+            default:
481
+                break;
482
+        }
483
+    };
484
+
485
+    function getOSDTime(oFrameInfo) {
486
+        var iYear = oFrameInfo.year;
487
+        var iMonth = oFrameInfo.month;
488
+        var iDay = oFrameInfo.day;
489
+        var iHour = oFrameInfo.hour;
490
+        var iMinute = oFrameInfo.minute;
491
+        var iSecond = oFrameInfo.second;
492
+
493
+        if (iMonth < 10) {
494
+            iMonth = "0" + iMonth;
495
+        }
496
+        if (iDay < 10) {
497
+            iDay = "0" + iDay;
498
+        }
499
+        if (iHour < 10) {
500
+            iHour = "0" + iHour;
501
+        }
502
+        if (iMinute < 10) {
503
+            iMinute = "0" + iMinute;
504
+        }
505
+        if (iSecond < 10) {
506
+            iSecond = "0" + iSecond;
507
+        }
508
+
509
+        return iYear + "-" + iMonth + "-" + iDay + " " + iHour + ":" + iMinute + ":" + iSecond;
510
+    }
511
+    // 获取帧数据
512
+    function getFrameData() {
513
+        // function getFrameData() {
514
+        // 获取帧数据
515
+        var res = Module._GetFrameData();
516
+        //var res = fun();
517
+        if (res === PLAYM4_OK) {
518
+            var oFrameInfo = Module._GetFrameInfo();
519
+            switch (oFrameInfo.frameType) {
520
+                case AUDIO_TYPE:
521
+                    var iSize = oFrameInfo.frameSize;
522
+                    if (0 === iSize) {
523
+                        return -1;
524
+                    }
525
+                    var pPCM = Module._GetFrameBuffer();
526
+                    // var audioBuf = new ArrayBuffer(iSize);
527
+                    var aPCMData = new Uint8Array(iSize);
528
+                    aPCMData.set(Module.HEAPU8.subarray(pPCM, pPCM + iSize));
529
+                    if (bWorkerPrintLog) {
530
+                        console.log("<<<Worker: audio media Info: nSise:" + oFrameInfo.frameSize + ",nSampleRate:" + oFrameInfo.samplesPerSec + ',channel:' + oFrameInfo.channels + ',bitsPerSample:' + oFrameInfo.bitsPerSample);
531
+                    }
532
+                    postMessage({
533
+                        'function': "GetFrameData", 'type': "audioType", 'data': aPCMData.buffer,
534
+                        'frameInfo': oFrameInfo, 'errorCode': res
535
+                    }, [aPCMData.buffer]);
536
+
537
+                    oFrameInfo = null;
538
+                    pPCM = null;
539
+                    aPCMData = null;
540
+                    return PLAYM4_AUDIO_FRAME;
541
+
542
+                case VIDEO_TYPE:
543
+                    var szOSDTime = getOSDTime(oFrameInfo);
544
+
545
+                    var iWidth = oFrameInfo.width;
546
+                    var iHeight = oFrameInfo.height;
547
+
548
+                    var iYUVSize = iWidth * iHeight * 3 / 2;
549
+                    if (0 === iYUVSize) {
550
+                        return -1;
551
+                    }
552
+
553
+                    var pYUV = Module._GetFrameBuffer();
554
+
555
+                    // 图像数据渲染后压回,若从主码流切到子码流,存在数组大小与图像大小不匹配现象
556
+                    var aYUVData = new Uint8Array(iYUVSize);
557
+                    aYUVData.set(Module.HEAPU8.subarray(pYUV, pYUV + iYUVSize));
558
+                    if (bWorkerPrintLog) {
559
+                        console.log("<<<Worker: video media Info: Width:" + oFrameInfo.width + ",Height:" + oFrameInfo.height + ",timeStamp:" + oFrameInfo.timeStamp);
560
+                    }
561
+
562
+                    postMessage({
563
+                        'function': "GetFrameData", 'type': "videoType", 'data': aYUVData.buffer,
564
+                        'dataLen': aYUVData.length, 'osd': szOSDTime, 'frameInfo': oFrameInfo, 'errorCode': res
565
+                    }, [aYUVData.buffer]);
566
+
567
+                    oFrameInfo = null;
568
+                    pYUV = null;
569
+                    aYUVData = null;
570
+                    return PLAYM4_VIDEO_FRAME;
571
+
572
+                case PRIVT_TYPE:
573
+                    postMessage({
574
+                        'function': "GetFrameData", 'type': "", 'data': null,
575
+                        'dataLen': -1, 'osd': 0, 'frameInfo': null, 'errorCode': PLAYM4_SYS_NOT_SUPPORT
576
+                    });
577
+                    return PLAYM4_SYS_NOT_SUPPORT;
578
+
579
+                default:
580
+                    postMessage({
581
+                        'function': "GetFrameData", 'type': "", 'data': null,
582
+                        'dataLen': -1, 'osd': 0, 'frameInfo': null, 'errorCode': PLAYM4_SYS_NOT_SUPPORT
583
+                    });
584
+                    return PLAYM4_SYS_NOT_SUPPORT;
585
+            }
586
+        }
587
+        else {
588
+            let errorCode = Module._GetLastError(g_nPort);
589
+            //解码失败返回裸数据
590
+            if (PLAYM4_DECODE_ERROR === errorCode) {
591
+                var rawInfo = Module._GetRawDataInfo();
592
+                var pRawData = Module._GetRawDataBuffer();
593
+                var aRawData = new Uint8Array(rawInfo.isize);
594
+                aRawData.set(Module.HEAPU8.subarray(pRawData, pRawData + rawInfo.isize));
595
+                postMessage({
596
+                    'function': "GetRawData", 'type': "", 'data': aRawData.buffer,
597
+                    'rawDataLen': rawInfo.isize, 'osd': 0, 'frameInfo': null, 'errorCode': errorCode
598
+                });
599
+                rawInfo = null;
600
+                pRawData = null;
601
+                aRawData = null;
602
+            }
603
+            //需要更多数据
604
+            if (PLAYM4_NEED_MORE_DATA === errorCode || PLAYM4_SYS_NOT_SUPPORT === errorCode || PLAYM4_NEED_NEET_LOOP === errorCode) {
605
+                postMessage({
606
+                    'function': "GetFrameData", 'type': "", 'data': null,
607
+                    'dataLen': -1, 'osd': 0, 'frameInfo': null, 'errorCode': errorCode
608
+                });
609
+            }
610
+            return errorCode;
611
+        }
612
+    }
613
+
614
+    // 开始计算时间
615
+    function startTime() {
616
+        return new Date().getTime();
617
+    }
618
+
619
+    // 结束计算时间
620
+    function endTime() {
621
+        return new Date().getTime();
622
+    }
623
+
624
+    // 字母字符串转byte数组
625
+    function stringToBytes(str) {
626
+        var ch, st, re = [];
627
+        for (var i = 0; i < str.length; i++) {
628
+            ch = str.charCodeAt(i);  // get char
629
+            st = [];                 // set up "stack"
630
+            do {
631
+                st.push(ch & 0xFF);  // push byte to stack
632
+                ch = ch >> 8;          // shift value down by 1 byte
633
+            }
634
+            while (ch);
635
+            // add stack contents to result
636
+            // done because chars have "wrong" endianness
637
+            re = re.concat(st.reverse());
638
+        }
639
+        // return an array of bytes
640
+        return re;
641
+    }
642
+})();

Diff nebyl zobrazen, protože je příliš veliký
+ 1 - 0
static/js/h5player/playctrl1simd/Decoder.js


Diff nebyl zobrazen, protože je příliš veliký
+ 21 - 0
static/js/h5player/playctrl2/Decoder.js


binární
static/js/h5player/playctrl2/Decoder.wasm


Diff nebyl zobrazen, protože je příliš veliký
+ 1 - 0
static/js/h5player/playctrl2/Decoder.worker.js


Diff nebyl zobrazen, protože je příliš veliký
+ 21 - 0
static/js/h5player/playctrl3/Decoder.js


binární
static/js/h5player/playctrl3/Decoder.wasm


Diff nebyl zobrazen, protože je příliš veliký
+ 1 - 0
static/js/h5player/playctrl3/Decoder.worker.js


Diff nebyl zobrazen, protože je příliš veliký
+ 21 - 0
static/js/h5player/talk/AudioInterCom.js


binární
static/js/h5player/talk/AudioInterCom.wasm


Diff nebyl zobrazen, protože je příliš veliký
+ 21 - 0
static/js/h5player/talkW/AudioInterCom.js


binární
static/js/h5player/talkW/AudioInterCom.wasm


Diff nebyl zobrazen, protože je příliš veliký
+ 1 - 0
static/js/h5player/talkW/AudioInterCom.worker.js


Diff nebyl zobrazen, protože je příliš veliký
+ 6525 - 0
static/js/h5player/transform/libSystemTransform.js


binární
static/js/h5player/transform/libSystemTransform.wasm


+ 120 - 0
static/js/h5player/transform/systemTransform-worker.js

@@ -0,0 +1,120 @@
1
+importScripts('libSystemTransform.js');
2
+    const RECORDRTP = 0;  //录制一份未经过转封装的码流原始数据,用于定位问题
3
+    let dataType = 1;
4
+    
5
+    // 转封装库回调函数
6
+    self.STCallBack = function (fileIndex,indexLen, data, dataLen)
7
+    {
8
+        //stFrameInfo的类型见DETAIL_FRAME_INFO
9
+		let stFrameInfo = Module._GetDetialFrameInfo();
10
+        let nIsMp4Index = stFrameInfo.nIsMp4Index;
11
+		//console.log("FrameType is " , stFrameInfo);	
12
+		//console.log("nIsMp4Index is " + nIsMp4Index);
13
+        //debugger
14
+        var pData = null;
15
+        pData = new Uint8Array(dataLen);
16
+        pData.set(Module.HEAPU8.subarray(data, data + dataLen));
17
+        if (dataType === 1) {
18
+            if (pData[0] == 0x49 && pData[1] == 0x4d && pData[2] == 0x4b && pData[3] == 0x48) {//码流头丢掉
19
+                return;
20
+            }
21
+            postMessage({type: "outputData", buf: pData, dType: 1});
22
+            dataType = 2;
23
+        } else {
24
+            if (nIsMp4Index) {
25
+                postMessage({type: "outputData", buf: pData, dType: 6}); //6:索引类型
26
+            } else {
27
+                postMessage({type: "outputData", buf: pData, dType: 2}); //2:码流
28
+            }
29
+        }
30
+
31
+        //stFrameInfo的类型见DETAIL_FRAME_INFO
32
+		//let stFrameInfo = Module._GetDetialFrameInfo();
33
+		//let stFrameType = stFrameInfo.nFrameType;
34
+		//let nFrameNum = stFrameInfo.nFrameNum;
35
+		//let nTimeStamp = stFrameInfo.nTimeStamp;
36
+        //let nIsMp4Index = stFrameInfo.nIsMp4Index;
37
+		
38
+		//console.log("FrameType is " + stFrameType);	
39
+		//console.log("nIsMp4Index is " + nIsMp4Index);	
40
+        
41
+    }
42
+
43
+    // self.Module = { memoryInitializerRequest: loadMemInitFile(), TOTAL_MEMORY: 128*1024*1024 };
44
+    // importScripts('SystemTransform.js');
45
+
46
+    self.Module['onRuntimeInitialized'] = function (){
47
+        postMessage({type: "loaded"});
48
+    }
49
+    onmessage = function (e) {
50
+        var data = e.data;
51
+        if ("create" === data.type) {
52
+            if (RECORDRTP) {
53
+                postMessage({type: "created"});
54
+                postMessage({type: "outputData", buf: data.buf, dType: 1});
55
+            } else {
56
+                var iHeadLen = data.len;
57
+                var pHead = Module._malloc(iHeadLen);
58
+    
59
+                self.writeArrayToMemory(new Uint8Array(data.buf), pHead);
60
+                var iTransType = data.packType;//目标格式
61
+                var iRet = Module._CreatHandle(pHead, iTransType, 4096);
62
+                if (iRet != 0) {
63
+                    console.log("_CreatHandle failed!" + iRet);
64
+                } else {
65
+                    iRet = Module._SysTransRegisterDataCallBack();			
66
+                    if(iRet != 0)
67
+                    {
68
+                        console.log("_SysTransRegisterDataCallBack Failed:" + iRet);
69
+                    }
70
+
71
+                    iRet = Module._SysTransStart(null, null);
72
+                    if(iRet != 0)
73
+                    {
74
+                        console.log("_SysTransStart Failed:" + iRet);
75
+                    }
76
+                    postMessage({type: "created"});
77
+                }
78
+            }
79
+
80
+        } else if ("inputData" === data.type) {
81
+            if (RECORDRTP) {
82
+                var aFileData = new Uint8Array(data.buf);  // 拷贝一份
83
+                var iBufferLen = aFileData.length;
84
+                var szBufferLen = iBufferLen.toString(16);
85
+                if (szBufferLen.length === 1) {
86
+                    szBufferLen = "000" + szBufferLen;
87
+                } else if (szBufferLen.length === 2) {
88
+                    szBufferLen = "00" + szBufferLen;
89
+                } else if (szBufferLen.length === 3) {
90
+                    szBufferLen = "0" + szBufferLen;
91
+                }
92
+                var aData = [0, 0, parseInt(szBufferLen.substring(0, 2), 16), parseInt(szBufferLen.substring(2, 4), 16)];
93
+                for(var iIndex = 0, iDataLength = aFileData.length; iIndex < iDataLength; iIndex++) {
94
+                    aData[iIndex + 4] = aFileData[iIndex]
95
+                }
96
+                var dataUint8 = new Uint8Array(aData);
97
+                postMessage({type: "outputData", buf: dataUint8.buffer, dType: 2});
98
+            } else {
99
+                let pInputDataBuf = Module._malloc(data.len);
100
+                var idataLen = data.len;
101
+                self.writeArrayToMemory(new Uint8Array(data.buf), pInputDataBuf);
102
+                    // 输入数据,每次最多2m
103
+                let pp = Module._SysTransInputData(0, pInputDataBuf, idataLen);
104
+                if(pp != 0) {
105
+                    //console.log("InputData Failed:" + pp);
106
+                }
107
+                Module._free(pInputDataBuf);
108
+            }
109
+        } else if ("release" === data.type) {
110
+            var iRet = Module._SysTransStop();
111
+            if (iRet != 0) {
112
+                console.log("_SysTransStop Failed:", iRet);
113
+            }
114
+            Module._SysTransRelease();
115
+            if (iRet != 0) {
116
+                console.log("_SysTransRelease Failed:", iRet);
117
+            }
118
+            close();
119
+        }
120
+    };